Windows-MFC-Examples: Class List

  • Main Page
  • Namespaces
  • Classes
  • Files
  • Directories
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
ACDual::Document
ACDual::IAClick
ACDual::IAutoClickPoint
ACDual::IDualAClick
ACDual::IDualAutoClickPoint
ACDual::Point
AutoClik::CAutoClickDoc
AutoClik::CAutoClickPoint
AutoClik::IAClick
AutoClik::IAutoClickPoint
BITMAPINFO256
ButtonLib::_DButton
ButtonLib::_DButtonEvents
ButtonLib::Button
C3WaySplitterFrame
CAboutBox
CAboutDlg
CAdderDialog
CAddNodeDlg
CAddressBox
CAddressCombo
CAllControlsSheet
CAmbientPropertiesDlg
CAmbientProperty
CAnimateCtrlPage
CAppLookDlg
CaptureData
CAutoClickApp
CAutoClickDoc
CAutoClickPoint
CAutoClickView
CAutoClik
CAutoDrivApp
CAutoDrivDlg
CBallThread
CBasePiece
CBigIcon
CBitmapProperty
CBkfstPage
CBMTest1Dlg
CBMTest2Dlg
CBMTest3Dlg
CBounceDoc
CBounceFrame
CBounceMDIChildWnd
CBounceThread
CBounceView
CBounceWnd
CBoundedNumberPairProp
CBoundedNumberSubProp
CBrightLeader
CButtonApp
CButtonCtrl
CButtonDialog
CButtonPropPage
CCalcApp
CCalcDlg
CCalcDrivApp
CCalendarBar
CChangeNameDlg
CChangeText
CCharFormat
CCheckBoxProp
CChildFrame
CChildView
CCImageApp
CCircApp
CCircCtrl
CCircPropPage
CClassToolBar
CClassTreeWnd
CClassViewBar
CClassViewMenuButton
CClikPoint
CCmnCtrl1App
CCmnCtrl2App
CCmnCtrl3App
CCmnCtrl3Dlg
CCollectApp
CCollectDoc
CCollectView
CColorListBox
CColorMenu
CColorOptDlg
CColorPage
CColorView
CComboBoxExProp
CComboRulerItem
CComboToolBar
CCommandLinkCtrlPage
CComponentCategoriesDlg
CConfigDlg
CContainerApp
CContainerDoc
CContainerInfoDlg
CContainerItem
CContainerView
CCounterThread
CCSDialog
CCSPropertyPage
CCSPropertySheet
CCtrlbarsApp
CCubeApp
CCubeDoc
CCubeView
CCustListDlg
CCustomDlgProp
CCustomEditListBox
CCustomFileDialog
CCustomList
CCustomPagesApp
CCustomPagesDoc
CCustomPagesView
CCustomSliderCtrl
CCustomToolTipCtrl
CDataObjectDlg
CDataObjectViewer
CDateDialog
CDateTimePage
CDBVListApp
CDBVListDoc
CDBVListSet
CDBVListView
CDebugLog
CDemoOptionsPage
CDemoOptionsPropSheet
CDerEditDlg
CDesktopAlertDemoApp
CDesktopAlertDemoDlg
CDHtmlExploreApp
CDHtmlExploreDlg
CDialogItem
CDibDoc
CDibLookApp
CDibView
CDinnerPage
CDispatchDlg
CDispatchViewer
CDisplayIC
CDisplayThread
CDlgBanner
CDlgStatusBar
CDlgtempApp
CDlgtempDlg
CDlgToolBar
CDlgToolTipsApp
CDlgToolTipsDlg
CDllScreenCapApp
CDockApp
CDockDoc
CDockView
CDocOptions
CDocOptPage
CDrawApp
CDrawClientHandlersApp
CDrawClientHandlersModule
CDrawCliLiveIconsHandler
CDrawCliSearchHandler
CDrawDoc
CDrawItem
CDrawObj
CDrawObjFriend
CDrawOleObj
CDrawPoly
CDrawRect
CDrawTool
CDrawView
CDrawView::XPreviewStateItem
CDriveApp
CDriverDlg
CDriverDoc
CDriverView
CDropTargetView
CDummyDoc
CDWordArrayView
CDynaMDIChildWnd
CDynaMenuApp
CDynaMenuDoc
CDynaMenuView
CDynamicHelpViewBar
CDynamicMenuApp
CDynamicMenuDoc
CDynamicMenuView
CEditBar
CEditToolbar
CEmbeddedItem
CEmbeddedOptPage
CEmpView
CEndWizardDialog
CEnterDlg
CEntryInfoDlg
CEnumVariant
CEventLoggingPage
CExampleThread
CExcepInfo
CExplorerApp
CExplorerBar
CExplorerDoc
CExplorerView
CExtendedControl
CFavorit
CFavoritesManager
CFeaturesPage
CFigCommand
CFigure
CFileDlgWatcherApp
CFileDlgWatcherDlg
CFileLog
CFileNewDialog
CFileViewBar
CFileViewToolBar
CFindComboButton
CFindDlg
CFolderBar
CFolderListBar
CFolderListPopupWnd
CFoldersTree
CFontComboBox
CFontDesc
CFormatBar
CFormatMenu
CFormatParaDlg
CFormatTabDlg
CGDIThread
CGetURL
CGotoDlg
CGuidGenApp
CGuidGenDlg
CHandleSize
CHARHDR
CHelloApp
CHelloDoc
CHelloFrame
CHelloView
CHelloWindow
CHelloWnd
CHelpToolBar
CHierSvrDocTemplate
CHistoryList
CHistoryObj
CHTMLEdDoc
CHTMLEditApp
CHTMLEdView
CHueLeader
CHuskApp
CIconCombo
CIconComboBox
CIconListProp
CIDataObjectDlg
CIEDemoApp
CIEDemoDoc
CIEDemoView
CImageApp
CImageCtrl
CImagePropPage
CImpIAdviseSink
CInfoBar
CInfoDlg
CInPlaceFrame
CInProcApp
CInputView
CInsertControlDlg
CInsertTableDlg
CInterfaceInfo
CInterfacesPage
CInterfaceViewer
CIntListView
CircLib::_DCirc
CircLib::_DCircEvents
CircLib::Circ
CItemData
CItemIcons
CIViewersApp
CKey
CLeader
CLicensedApp
CLicensedCtrl
CLicensedPropPage
CLineFile
CLineStyleMenuItem
CLineThread
CLineWeightDlg
CLinkButton
CLinksBar
CListDlg
CListHdrApp
CListHdrDlg
CListOutputFrame
CListViewEx
CLlama
CLocalComboBox
CLocalizeApp
CLocalizeCtrl
CLocalizePropPage
CLog
CLoggingDlg
CLunchPage
CMacroComboBox
CMacroDialogBar
CMacroDlg
CMailBar
CMailFrame
CMailView
CMainDlg
CMainDoc
CMainFrame
CMainFrame::XStyle
CMainView
CMainWindow
CMapDWordToMyStructView
CMapInfo
CMapStringToStringView
CMargueeTaskDialog
CMdiApp
CMDIApp
CMDITabOptions
CMDITabsDemoApp
CMDITabsDemoDoc
CMDITabsDemoView
CMenuSubSetApp
CMenuSubSetDoc
CMenuSubSetView
CMetaFileWnd
CMethodDlg
CMethodInfo
CMethodParamInfo
CMFCBindApp
CMFCBindCntrItem
CMFCBindDoc
CMFCBindView
CMfcieApp
CMfcieDoc
CMfcieView
CMFCRibbonNumEdit
CMFCRibbonNumEditCtrl
CMinSize
CMMXSurface16Intrinsic
CMMXSurface24Intrinsic
CMMXSurface32Intrinsic
CMMXSwarmApp
CMMXUnsigned16Saturated
CModalShapePropSheet
CModelessApp
CModelessDialog
CModelessMain
CModelessShapePropSheet
CMonthCalPage
CMSMCaptionBar
CMSMCaptionBarButton
CMSMCategoryBar
CMSMCategoryBarButton
CMSMDialog
CMSMLinksBar
CMSMLinksBarButton
CMSMMenuBar
CMSMoneyDemoApp
CMSMoneyDemoDoc
CMSMoneyDemoView
CMSMTasksPane
CMSMToolBar
CMSMVisualManager
CMSNDlg
CMSNVisualManager
CMSOffice2007DemoApp
CMSOffice2007DemoCntrItem
CMSOffice2007DemoDoc
CMSOffice2007DemoView
CMultiPadApp
CMutexesApp
CMutexesDlg
CMyBrowseEdit
CMyCustomizationPage
CMyDialogTemplate
CMyListBox
CMyListCtrl
CMyMenuBar
CMyObject
CMyOutlookBar
CMyPopupDlg
CMyPropertyPage1
CMyPropertyPage2
CMyPropertyPage3
CMyPropertyPage4
CMyPropertySheet
CMyScheduler
CMyStruct
CMyToolTipCtrl
CMyTreeCtrl
CNetAddressCtrlPage
CNetAddrVerifierApp
CNetAddrVerifierDlg
CNewAmbientPropertyDlg
CNewControlsApp
CNextWizardDialog
CNotepadApp
CNotepadDoc
CNotepadView
CNotifyShowCase
CNullLog
CObjectData
CObjListView
CObjTreeView
COEMFile
COIPF
COle2ViewApp
COle2ViewDoc
COleClientApp
COlePropertiesEx
ColourTableEntry
COnCmdMsg
COptionsDlg
COptionSheet
COptionsPage1
COptionsPage12
COptionsPage21
COptionsPage22
COptionsPage31
COptionsPage32
COutlookDemoApp
COutlookDemoDoc
COutlookDemoView
COutlookMultiViewsApp
COutlookMultiViewsDoc
COutlookMultiViewsView
COutputBar
COutputList
COutputList1
COutputToolBar
COutputViewBar
COutputWindowLog
COutputWindowView
COwnerDrawDescrProp
COwnerDrawMenuApp
COwnerDrawMenuDoc
COwnerDrawMenuView
CPadDoc
CPadFrame
CPadLinkItem
CPadView
CPage1
CPage2
CPage3
CPage4
CPage5
CPage6
CPagerCtrlPage
CPageSetupDlg
CPalApp
CPalCtrl
CPaletteBar
CPaletteDemoApp
CPaletteDemoDoc
CPaletteDemoView
CPalPropPage
CParaFormat
CParsedEdit
CParsedEditExported
CPasswordProp
CPenWidthsDlg
CPointArrayView
CPolyTool
CPreviewPane
CProgCtrlPage
CProgressBarTaskDialog
CPropDlgApp
CPropertiesDlg
CPropertiesToolBar
CPropertiesViewBar
CProperty
CPropertyBag
CPropertyBagDlg
CPropertyBagItem
CPropertyChangesPage
CPropertyEditRequestsPage
CPropertyEditRequestsPage::CPropertyInfo
CPropertySection
CPropertySet
CPropSheetDemoApp
CPropSheetDemoDlg
CPropSliderCtrl
CPushApp
CPushCtrl
CPushPropPage
CRateDlg
CRebarTestApp
CRebarTestDoc
CRebarTestView
CRecalcApp
CRecalcDoc
CRecalcThreadInfo
CRecalcView
CRectDlg
CRectItem
CRectThread
CRectTool
CRegEntry
CRegisterControlsDlg
CRegistryView
CRemoteCalcDlg
CResourcePage
CResourceViewBar
CRibbonGadgetsApp
CRibbonGadgetsDoc
CRibbonGadgetsView
CRibbonListButton
CRibbonListFontButton
CRibbonListFontButton::XItem
CRibbonMDIDemoApp
CRibbonMDIDemoDoc
CRibbonMDIDemoView
CRibbonTableButton
CRibbonTooltipCtrl
CRing
CRoamer
CRollupPaneApp
CRollupPaneDoc
CRollupPaneView
CRowListApp
CRowListDoc
CRowListView
CRulerBar
CRulerItem
CSchedulerApp
CSchedulerDlg
CScreenCapApp
CScribbleApp
CScribbleDoc
CScribbleItem
CScribbleView
CScript
CScriptManager
CSearchBox
CSelectTool
CServerApp
CServerDC
CServerDoc
CServerItem
CServerNode
CServerView
CServicesPage
CSetPaneSizeApp
CSetPaneSizeDoc
CSetPaneSizeView
CSetTabStops
CShape
CShapePreviewWnd
CShapePropSheetFrame
CShapesDoc
CShapesView
CShellTreeCtrl
CSizeComboBox
CSliderApp
CSliderButton
CSliderCtrlPage
CSliderDoc
CSliderProp
CSliderView
CSmartFuncDesc
CSmartTypeAttr
CSmartVarDesc
CSnapApp
CSnapDoc
CSnapPropertySheet
CSnapView
CSourceView
CSpeakNApp
CSpeakNDlg
CSpeedDlg
CSpinCtrlPage
CSpindialApp
CSpindialCtrl
CSpindialPropPage
CSpinEditDlg
CSpiroApp
CSpiroDoc
CSpiroRect
CSpiroView
CSplashWnd
CSplitButtonCtrlPage
CSplitFrame
CSplitterFrame
CSSE2Surface16Intrinsic
CSSE2Surface24Intrinsic
CSSE2Surface32Intrinsic
CSSE2Unsigned16Saturated
CStandardBar
CStartView
CStateCollectionApp
CStateCollectionDoc
CStateCollectionView
CStatPage
CStatusBarDemoApp
CStatusBarDemoDoc
CStatusBarDemoView
CStringCollect
CStringListView
CStroke
CStyleBar
CStylePage
CSubEditDlg
CSummInfo
CSummPage
CSurface
CSwarm
CTabbedViewApp
CTabbedViewDoc
CTabbedViewView
CTabControlApp
CTabControlDoc
CTabControlView
CTabOrderDlg
CTabRulerItem
CTaskDialogTestApp
CTaskDialogTestDlg
CTaskPane
CTasksPaneApp
CTasksPaneDoc
CTasksPaneView
CTBComboBox
CTCBindHost
CTCCommandLineInfo
CTCExtPage
CTCOptions
CTCPropsModule
CTCSplitter
CTestApp
CTestContainer98App
CTestContainer98Doc
CTestContainer98Item
CTestContainer98View
CTesthelpApp
CTesthelpCtrl
CTesthelpPropPage
CTestWindow
CTextDoc
CTextView
CTheApp
CThreadApp
CThreadDoc
CThreadView
CTimeApp
CTimeCtrl
CTimePropPage
CToolBarCtrlPage
CToolbarDateTimePickerApp
CToolbarDateTimePickerDoc
CToolbarDateTimePickerView
CToolbarLabel
CToolDlg
CToolsPalette
CTooltipDemoApp
CTooltipDemoDoc
CTooltipDemoView
CTrackerApp
CTrackerDoc
CTrackerView
CTrackFile
CTrayMenuApp
CTrayMenuDlg
CTreeCtrlPage
CTreeItem
CTwoButtonsProp
CTypedPtrArrayView
CTypedPtrListView
CTypedPtrMapView
CTypeLibListView
CTypeLibODLView
CTypeLibTreeView
CTypeLibViewer
CTypeLibWnd
CUndoBar
CUndoButton
CUndoListBox
CUndoMenu
CUnit
CUnitsPage
CVariantAssoc
CVariantMap
CVarUseApp
CVarUseDlg
CVector
CView1
CView2
CView3
CView4
CViewExApp
CViewExSplitWnd
CVisualStudioDemoApp
CVisualStudioDemoDoc
CVisualStudioDemoView
CWatchBar
CWclsEditDlg
CWheel
CWizardDialog
CWndListDlg
CWordPadApp
CWordPadCntrItem
CWordPadCommandLineInfo
CWordPadDoc
CWordPadResizeBar
CWordPadView
CWorkspaceBar
CWorkspaceBar2
CWorkspaceObj
CWorkspaceToolBar
CWorkSpaceToolBarApp
CWorkSpaceToolBarDoc
CWorkSpaceToolBarView
CXlistApp
CXlistCtrl
CXlistPropPage
CZoomDlg
DICTENTRY
DICTENTRYHEADER
DocType
DrawClientHandlersLib::DrawCliLiveIconsHandler
DrawClientHandlersLib::DrawCliSearchHandler
DynaMenuDef
IDrawCliLiveIconsHandler
IDrawCliSearchHandler
IMAGELib::_DImage
IMAGELib::_DImageEvents
IMAGELib::Image
inproc::CStringCollect
inproc::CVariantAssoc
inproc::CVariantMap
inproc::IStringCollect
inproc::IVariantAssoc
inproc::IVariantMap
INVOKEKIND_ENTRY
LicensedLib::_DLicensed
LicensedLib::_DLicensedEvents
LicensedLib::Licensed
LocalizeLib::_DLocalize
LocalizeLib::_DLocalizeEvents
LocalizeLib::Localize
mfccalc::CCCalcDlg
mfccalc::ICalcDlg
MSOfficeDemoKey
NewControlsPropSheet
notif_tag
PalLib::_DPal
PalLib::_DPalEvents
PalLib::Pal
PushLib::_DPush
PushLib::_DPushEvents
PushLib::Push
QAAMBIENTENTRY
SHAPE_COLOR
SpindialLib::_DSpindial
SpindialLib::_DSpindialEvents
SpindialLib::Spindial
tagABSTIME
tagANIMATEINFO
tagBOXEDITINFO
tagBOXLAYOUT
tagBOXRESULTS
tagCALBSTRUCT
tagCOLUMNSTRUCT
tagCTLINITBEDIT
tagCTLINITHEDIT
tagCTLINITIEDIT
tagFORMATIDOFFSET
tagGUIDE
tagIMECOLORS
tagINKINGINFO
tagINPPARAMS
tagINTERVAL
tagITEMDATA
tagOEM_PENPACKET
tagOEMPENINFO
tagPCMINFO
tagPDEVENT
tagPENDATAHEADER
tagPENINFO
tagPENPACKET
tagPENTIP
tagPROPERTYIDOFFSET
tagPROPHEADER
tagRC
tagRCRESULT
tagRECTL
tagRECTOFS
tagSECTIONHEADER
tagSTRKFMT
tagSTROKEINFO
tagSYC
tagSYE
tagSYG
tagTARGET
tagTARGINFO
tagVS_VERSION
TCPropsLib::ITCExtendedControl
TCPropsLib::TCExtPage
TestContainer98::Document
TestContainer98::ITestContainer98
TestContainer98::ITestContainer98Events
TESTHELPLib::_DTesthelp
TESTHELPLib::_DTesthelpEvents
TESTHELPLib::Testhelp
TimeLib::_DTime
TimeLib::_DTimeEvents
TimeLib::Time
VARTYPE_ENTRY
XlistLib::_DXlist
XlistLib::_DXlistEvents
XlistLib::Xlist
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ACDual::Document Class Reference

  • Files
  • Directories
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ACDual
  • ACDual::Document

ACDual::Document Class Reference

Detailed Description

Definition at line 111 of file autoclik.odl.

The documentation for this class was generated from the following file:
  • ole/acdual/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ACDual::IAClick Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ACDual
  • ACDual::IAClick
Public Member Functions | Properties

ACDual::IAClick Interface Reference

List of all members.

Public Member Functions

void | RefreshWindow ()
void | SetAllProps (short x, short y, BSTR text)
void | ShowWindow ()
void | TestError (short wCode)

Properties

x | id
Position | id

Detailed Description

Definition at line 27 of file autoclik.odl.

Member Function Documentation

void ACDual::IAClick::RefreshWindow ( )
void ACDual::IAClick::SetAllProps | ( | short | x,
 |  | short | y,
 |  | BSTR | text
 | ) |  |
void ACDual::IAClick::ShowWindow ( )
void ACDual::IAClick::TestError ( short wCode )

Property Documentation

x ACDual::IAClick::id
Position ACDual::IAClick::id
The documentation for this interface was generated from the following file:
  • ole/acdual/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ACDual::IAutoClickPoint Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ACDual
  • ACDual::IAutoClickPoint
Properties

ACDual::IAutoClickPoint Interface Reference

List of all members.

Properties

y id

Detailed Description

Definition at line 130 of file autoclik.odl.

Property Documentation

y ACDual::IAutoClickPoint::id
The documentation for this interface was generated from the following file:
  • ole/acdual/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ACDual::IDualAClick Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ACDual
  • ACDual::IDualAClick
Public Member Functions

ACDual::IDualAClick Interface Reference

List of all members.

Public Member Functions

HRESULT | Position ([in] IDualAutoClickPoint *newPosition)
HRESULT | Position ([out, retval] IDualAutoClickPoint **retval)
HRESULT | Position ([in] IDualAutoClickPoint *newPosition)
HRESULT | RefreshWindow ()
HRESULT | SetAllProps ([in] short x,[in] short y,[in] BSTR text)
HRESULT | ShowWindow ()
HRESULT | TestError ([in] short wCode)
HRESULT | text ([in] BSTR newText)
HRESULT | text ([out, retval] BSTR *retval)
HRESULT | x ([in] short newX)
HRESULT | x ([out, retval] short *retval)
HRESULT | y ([in] short newY)
HRESULT | y ([out, retval] short *retval)

Detailed Description

Definition at line 64 of file autoclik.odl.

Member Function Documentation

HRESULT ACDual::IDualAClick::Position ( [in] IDualAutoClickPoint * newPosition ) [set]
HRESULT ACDual::IDualAClick::Position ( [out, retval] IDualAutoClickPoint ** retval ) [get]
HRESULT ACDual::IDualAClick::Position ( [in] IDualAutoClickPoint * newPosition ) [set]
HRESULT ACDual::IDualAClick::RefreshWindow ( )
HRESULT ACDual::IDualAClick::SetAllProps | ( | [in] short | x,
 |  | [in] short | y,
 |  | [in] BSTR | text
 | ) |  |
HRESULT ACDual::IDualAClick::ShowWindow ( )
HRESULT ACDual::IDualAClick::TestError ( [in] short wCode )
HRESULT ACDual::IDualAClick::text ( [in] BSTR newText ) [set]
HRESULT ACDual::IDualAClick::text ( [out, retval] BSTR * retval ) [get]
HRESULT ACDual::IDualAClick::x ( [in] short newX ) [set]
HRESULT ACDual::IDualAClick::x ( [out, retval] short * retval ) [get]
HRESULT ACDual::IDualAClick::y ( [in] short newY ) [set]
HRESULT ACDual::IDualAClick::y ( [out, retval] short * retval ) [get]
The documentation for this interface was generated from the following file:
  • ole/acdual/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ACDual::IDualAutoClickPoint Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ACDual
  • ACDual::IDualAutoClickPoint
Public Member Functions

ACDual::IDualAutoClickPoint Interface Reference

List of all members.

Public Member Functions

HRESULT | x ([in] short newX)
HRESULT | x ([out, retval] short *retval)
HRESULT | y ([in] short newY)
HRESULT | y ([out, retval] short *retval)

Detailed Description

Definition at line 154 of file autoclik.odl.

Member Function Documentation

HRESULT ACDual::IDualAutoClickPoint::x ( [in] short newX ) [set]
HRESULT ACDual::IDualAutoClickPoint::x ( [out, retval] short * retval ) [get]
HRESULT ACDual::IDualAutoClickPoint::y ( [in] short newY ) [set]
HRESULT ACDual::IDualAutoClickPoint::y ( [out, retval] short * retval ) [get]
The documentation for this interface was generated from the following file:
  • ole/acdual/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ACDual::Point Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ACDual
  • ACDual::Point

ACDual::Point Class Reference

Detailed Description

Definition at line 176 of file autoclik.odl.

The documentation for this class was generated from the following file:
  • ole/acdual/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: AutoClik::CAutoClickDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AutoClik
  • AutoClik::CAutoClickDoc

AutoClik::CAutoClickDoc Class Reference

Detailed Description

Definition at line 40 of file autoclik.odl.

The documentation for this class was generated from the following file:
  • ole/autoclik/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: AutoClik::CAutoClickPoint Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AutoClik
  • AutoClik::CAutoClickPoint

AutoClik::CAutoClickPoint Class Reference

Detailed Description

Definition at line 70 of file autoclik.odl.

The documentation for this class was generated from the following file:
  • ole/autoclik/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: AutoClik::IAClick Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AutoClik
  • AutoClik::IAClick
Public Member Functions | Properties

AutoClik::IAClick Interface Reference

List of all members.

Public Member Functions

void | RefreshWindow ()
void | SetAllProps (short x, short y, BSTR text)
void | ShowWindow ()

Properties

x | id
Position | id

Detailed Description

Definition at line 14 of file autoclik.odl.

Member Function Documentation

void AutoClik::IAClick::RefreshWindow ( )
void AutoClik::IAClick::SetAllProps | ( | short | x,
 |  | short | y,
 |  | BSTR | text
 | ) |  |
void AutoClik::IAClick::ShowWindow ( )

Property Documentation

x AutoClik::IAClick::id
Position AutoClik::IAClick::id
The documentation for this interface was generated from the following file:
  • ole/autoclik/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: AutoClik::IAutoClickPoint Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AutoClik
  • AutoClik::IAutoClickPoint
Properties

AutoClik::IAutoClickPoint Interface Reference

List of all members.

Properties

y id

Detailed Description

Definition at line 49 of file autoclik.odl.

Property Documentation

y AutoClik::IAutoClickPoint::id
The documentation for this interface was generated from the following file:
  • ole/autoclik/autoclik.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: BITMAPINFO256 Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

BITMAPINFO256 Struct Reference

#include "bmpprop.h"

List of all members.

Public Attributes

RGBQUAD bmiOtherColors [255]

Detailed Description

Definition at line 12 of file bmpprop.h.

Member Data Documentation

RGBQUAD BITMAPINFO256::bmiOtherColors[255]

Definition at line 14 of file bmpprop.h.

The documentation for this struct was generated from the following file:
  • controls/IMAGE/bmpprop.h
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ButtonLib::_DButton Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ButtonLib
  • ButtonLib::_DButton
Public Member Functions | Properties

ButtonLib::_DButton Interface Reference

List of all members.

Public Member Functions

void | AboutBox ()

Properties

Caption | id (bindable)
Font | id

Detailed Description

Definition at line 29 of file button.odl.

Member Function Documentation

void ButtonLib::_DButton::AboutBox ( )

Property Documentation

Caption ButtonLib::_DButton::id( bindable)
Font ButtonLib::_DButton::id
The documentation for this interface was generated from the following file:
  • controls/button/button.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ButtonLib::_DButtonEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ButtonLib
  • ButtonLib::_DButtonEvents
Public Member Functions

ButtonLib::_DButtonEvents Interface Reference

List of all members.

Public Member Functions

void Click ()

Detailed Description

Definition at line 50 of file button.odl.

Member Function Documentation

void ButtonLib::_DButtonEvents::Click ( )
The documentation for this interface was generated from the following file:
  • controls/button/button.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ButtonLib::Button Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ButtonLib
  • ButtonLib::Button

ButtonLib::Button Class Reference

Detailed Description

Definition at line 65 of file button.odl.

The documentation for this class was generated from the following file:
  • controls/button/button.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: C3WaySplitterFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

C3WaySplitterFrame Class Reference

#include "splitter.h"

List of all members.

Public Member Functions

virtual | ~C3WaySplitterFrame ()
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)

Protected Member Functions

C3WaySplitterFrame ()

Protected Attributes

CViewExSplitWnd m_wndSplitter
CViewExSplitWnd m_wndSplitter2

Detailed Description

Definition at line 54 of file splitter.h.

Constructor & Destructor Documentation

C3WaySplitterFrame::C3WaySplitterFrame ( ) [protected]

Definition at line 87 of file splitter.cpp.

{
}

C3WaySplitterFrame::~C3WaySplitterFrame ( ) [virtual]

Definition at line 91 of file splitter.cpp.

{
}

Member Function Documentation

BOOL C3WaySplitterFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [virtual]

Definition at line 96 of file splitter.cpp.

{
  // create a splitter with 1 row, 2 columns
  if (!m_wndSplitter.CreateStatic(this, 1, 2))
  {
    TRACE0("Failed to CreateStaticSplitter\n");
    return FALSE;
  }

  // add the first splitter pane - the default view in column 0
  if (!m_wndSplitter.CreateView(0, 0,
    pContext->m_pNewViewClass, CSize(200, 50), pContext))
  {
    TRACE0("Failed to create first pane\n");
    return FALSE;
  }

  // add the second splitter pane - which is a nested splitter with 2 rows
  if (!m_wndSplitter2.CreateStatic(
    &m_wndSplitter,     // our parent window is the first splitter
    2, 1,               // the new splitter is 2 rows, 1 column
    WS_CHILD | WS_VISIBLE | WS_BORDER,  // style, WS_BORDER is needed
    m_wndSplitter.IdFromRowCol(0, 1)
      // new splitter is in the first row, 2nd column of first splitter
     ))
  {
    TRACE0("Failed to create nested splitter\n");
    return FALSE;
  }

  // now create the two views inside the nested splitter
  int cyText = max(lpcs->cy - 70, 20);    // height of text pane

  if (!m_wndSplitter2.CreateView(0, 0,
    RUNTIME_CLASS(CTextView), CSize(0, cyText), pContext))
  {
    TRACE0("Failed to create second pane\n");
    return FALSE;
  }
  if (!m_wndSplitter2.CreateView(1, 0,
    RUNTIME_CLASS(CColorView), CSize(0, 0), pContext))
  {
    TRACE0("Failed to create third pane\n");
    return FALSE;
  }

  // it all worked, we now have two splitter windows which contain
  //  three different views
  return TRUE;
}

Member Data Documentation

CViewExSplitWnd C3WaySplitterFrame::m_wndSplitter [protected]

Definition at line 62 of file splitter.h.

CViewExSplitWnd C3WaySplitterFrame::m_wndSplitter2 [protected]

Definition at line 63 of file splitter.h.

The documentation for this class was generated from the following files:
  • general/viewex/splitter.h
  • general/viewex/splitter.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAboutBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CAboutBox Class Reference

#include "aboutbox.h"

List of all members.

Public Types

enum | { IDD = IDD_ABOUTBOX }

Public Member Functions

CAboutBox (CWnd *pParent=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Protected Attributes

CBigIcon m_icon

Detailed Description

Definition at line 39 of file aboutbox.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 50 of file aboutbox.h.

{ IDD = IDD_ABOUTBOX };

Constructor & Destructor Documentation

CAboutBox::CAboutBox ( CWnd * pParent = NULL )

Definition at line 33 of file aboutbox.cpp.

  : CDialog(CAboutBox::IDD, pParent)
{
  //{{AFX_DATA_INIT(CAboutBox)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CAboutBox::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 41 of file aboutbox.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CAboutBox)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

BOOL CAboutBox::OnInitDialog ( ) [protected, virtual]

Definition at line 52 of file aboutbox.cpp.

{
  CDialog::OnInitDialog();

  // initialize the big icon control
  m_icon.SubclassDlgItem(IDC_BIGICON, this);
  m_icon.SizeToContent();

  // fill available memory
  CString str, strFmt;
  strFmt.LoadString(IDS_PHYSICAL_MEM);

  MEMORYSTATUS MemStat;
  MemStat.dwLength = sizeof(MEMORYSTATUS);
  GlobalMemoryStatus(&MemStat);
  _stprintf_s(str.GetBuffer(80), 80, strFmt, MemStat.dwTotalPhys / 1024L);
  str.ReleaseBuffer();
  SetDlgItemText(IDC_PHYSICAL_MEM, str);

  // fill disk free information
  struct _diskfree_t diskfree;
  if (_getdiskfree(_getdrive(), &diskfree) == 0)
  {
    strFmt.LoadString(IDS_DISK_SPACE);
    _stprintf_s(str.GetBuffer(80), 80, strFmt,
      (DWORD)diskfree.avail_clusters *
      (DWORD)diskfree.sectors_per_cluster *
      (DWORD)diskfree.bytes_per_sector / (DWORD)1024L);
    str.ReleaseBuffer();
  }
  else
    str.LoadString(IDS_DISK_SPACE_UNAVAIL);
  SetDlgItemText(IDC_DISK_SPACE, str);

  return TRUE;  // return TRUE  unless you set the focus to a control
}

Member Data Documentation

CBigIcon CAboutBox::m_icon [protected]

Definition at line 58 of file aboutbox.h.

The documentation for this class was generated from the following files:
  • ole/superpad/aboutbox.h
  • ole/superpad/aboutbox.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAboutDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CAboutDlg Class Reference

#include "Aboutdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }
enum | { IDD = IDD_ABOUTBOX }

Public Member Functions

CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg (CWnd *pParent=NULL)
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()
CAboutDlg ()

Public Attributes

CStatic | m_AppName
CButton | m_Cancel
CStatic | m_Copyright
CStatic | m_Group
CStatic | m_WrittenBy

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 82 of file collect.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 89 of file collect.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 96 of file cube.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 95 of file CImage.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 107 of file snapvw.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 156 of file spiro.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 107 of file trackapp.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 33 of file VariantUseDlg.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 21 of file DHtmlExploreDlg.cpp.

: public CDialog

anonymous enum
Enumerator:
IDD

Definition at line 86 of file ScreenCap.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 118 of file htmledit.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 110 of file mfcie.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 32 of file SchedulerDlg.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 173 of file autoclik.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 159 of file autoclik.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 86 of file mtgdi.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 133 of file drawcli.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 172 of file hiersvr.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 115 of file mtrecalc.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 103 of file ipdrive.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 111 of file MFCBind.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 21 of file calcdlg.cpp.

: public CDialog

anonymous enum
Enumerator:
IDD

Definition at line 252 of file oleview.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 38 of file mutexdlg.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 571 of file TstCon.Cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 21 of file guidgdlg.cpp.

: public CDialog

anonymous enum
Enumerator:
IDD

Definition at line 138 of file CustomPages.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 178 of file DrawClient.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 138 of file DynamicMenu.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 141 of file Explorer.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 137 of file IEDemo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 217 of file MDITabsDemo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 157 of file MenuSubSet.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 147 of file MSOffice2007Demo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 49 of file NewControls.h.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 186 of file OutlookDemo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 111 of file OutlookMultiViews.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 121 of file OwnerDrawMenu.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 111 of file PaletteDemo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 165 of file RebarTest.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 133 of file RibbonGadgets.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 150 of file RibbonMDIDemo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 167 of file RollupPane.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 137 of file SetPaneSize.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 124 of file Slider.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 148 of file StateCollection.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 142 of file StatusBarDemo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 147 of file TabbedView.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 123 of file TabControl.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 124 of file TasksPane.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 132 of file ToolbarDateTimePicker.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 23 of file TooltipDemo.cpp.

: public CDialog

anonymous enum
Enumerator:
IDD

Definition at line 157 of file VisualStudioDemo.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 146 of file WorkSpaceToolBar.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 128 of file contain.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 31 of file propsht.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 31 of file propsht.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 94 of file DBVList.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 111 of file diblook.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 46 of file Aboutdlg.h.

{ IDD = IDD_ABOUT };

anonymous enum
Enumerator:
IDD

Definition at line 33 of file setupdlg.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 91 of file docktool.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 146 of file dynamenu.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 21 of file LHdrDlg.cpp.

: public CDialog

anonymous enum
Enumerator:
IDD

Definition at line 107 of file mdi.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 91 of file MMXSwarm.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 22 of file modeldlg.cpp.

: public CDialog

anonymous enum
Enumerator:
IDD

Definition at line 92 of file np.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 117 of file propdlg.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 99 of file rowlist.cpp.

{ IDD = IDD_ABOUTBOX };

anonymous enum
Enumerator:
IDD

Definition at line 163 of file scribble.cpp.

{ IDD = IDD_ABOUTBOX };

Constructor & Destructor Documentation

CAboutDlg::CAboutDlg ( )

Definition at line 101 of file collect.cpp.

                     : CDialog(CAboutDlg::IDD)
{
  //{{AFX_DATA_INIT(CAboutDlg)
  //}}AFX_DATA_INIT
}

CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( ) [inline]

Definition at line 103 of file diblook.cpp.

              : CDialog(CAboutDlg::IDD)
    {
      //{{AFX_DATA_INIT(CAboutDlg)
      //}}AFX_DATA_INIT
    }

CAboutDlg::CAboutDlg ( CWnd * pParent = NULL )

Definition at line 27 of file Aboutdlg.cpp.

  : CDialog(CAboutDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CAboutDlg)
  //}}AFX_DATA_INIT
}

CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( ) [inline]

Definition at line 164 of file hiersvr.cpp.

              : CDialog(CAboutDlg::IDD)
  {
  //{{AFX_DATA_INIT(CAboutDlg)
  //}}AFX_DATA_INIT
  }

CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )
CAboutDlg::CAboutDlg ( )

Member Function Documentation

void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 107 of file collect.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CAboutDlg)
  //}}AFX_DATA_MAP
}

virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
BOOL CAboutDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 65 of file calcdlg.cpp.

{
  CDialog::OnInitDialog();

  // TODO: Add extra initialization here

  return TRUE;
}

virtual BOOL CAboutDlg::OnInitDialog ( ) [protected, virtual]
virtual BOOL CAboutDlg::OnInitDialog ( ) [protected, virtual]

Member Data Documentation

CStatic CAboutDlg::m_AppName

Definition at line 257 of file oleview.cpp.

CButton CAboutDlg::m_Cancel

Definition at line 253 of file oleview.cpp.

CStatic CAboutDlg::m_Copyright

Definition at line 256 of file oleview.cpp.

CStatic CAboutDlg::m_Group

Definition at line 255 of file oleview.cpp.

CStatic CAboutDlg::m_WrittenBy

Definition at line 254 of file oleview.cpp.

The documentation for this class was generated from the following files:
  • advanced/collect/collect.cpp
  • advanced/cube/cube.cpp
  • advanced/DllScreenCap/ScreenCap/ScreenCap.cpp
  • advanced/mtgdi/mtgdi.cpp
  • advanced/mtrecalc/mtrecalc.cpp
  • advanced/mutexes/mutexdlg.cpp
  • controls/contain/contain.cpp
  • general/CmnCtrl1/propsht.cpp
  • general/CmnCtrl2/propsht.cpp
  • general/DBVList/DBVList.cpp
  • general/diblook/diblook.cpp
  • general/dlgcbr32/Aboutdlg.h
  • general/dlgtempl/setupdlg.cpp
  • general/docktool/docktool.cpp
  • general/dynamenu/dynamenu.cpp
  • general/ListHdr/LHdrDlg.cpp
  • general/mdidocvw/mdi.cpp
  • general/MMXSwarm/MMXSwarm.cpp
  • general/modeless/modeldlg.cpp
  • general/npp/np.cpp
  • general/propdlg/propdlg.cpp
  • general/rowlist/rowlist.cpp
  • general/Scribble/scribble.cpp
  • general/SimpleImage/CImage.cpp
  • general/snapvw/snapvw.cpp
  • general/spiro/spiro.cpp
  • general/tracker/trackapp.cpp
  • general/VariantUse/VariantUseDlg.cpp
  • internet/DHtmlExplore/DHtmlExploreDlg.cpp
  • internet/HTMLEdit/htmledit.cpp
  • internet/MFCIE/mfcie.cpp
  • internet/Scheduler/SchedulerDlg.cpp
  • ole/acdual/autoclik.cpp
  • ole/autoclik/autoclik.cpp
  • ole/drawcli/drawcli.cpp
  • ole/hiersvr/hiersvr.cpp
  • ole/ipdrive/ipdrive.cpp
  • ole/MFCBind/MFCBind.cpp
  • ole/mfccalc/calcdlg.cpp
  • ole/oleview/oleview.cpp
  • ole/TstCon/TstCon.Cpp
  • utility/guidgen/guidgdlg.cpp
  • vc2008fp/CustomPages/CustomPages.cpp
  • vc2008fp/DrawClient/DrawClient.cpp
  • vc2008fp/DynamicMenu/DynamicMenu.cpp
  • vc2008fp/Explorer/Explorer.cpp
  • vc2008fp/IEDemo/IEDemo.cpp
  • vc2008fp/MDITabsDemo/MDITabsDemo.cpp
  • vc2008fp/MenuSubSet/MenuSubSet.cpp
  • vc2008fp/MSOffice2007Demo/MSOffice2007Demo.cpp
  • vc2008fp/NewControls/NewControls.h
  • vc2008fp/OutlookDemo/OutlookDemo.cpp
  • vc2008fp/OutlookMultiViews/OutlookMultiViews.cpp
  • vc2008fp/OwnerDrawMenu/OwnerDrawMenu.cpp
  • vc2008fp/PaletteDemo/PaletteDemo.cpp
  • vc2008fp/RebarTest/RebarTest.cpp
  • vc2008fp/RibbonGadgets/RibbonGadgets.cpp
  • vc2008fp/RibbonMDI/RibbonMDIDemo.cpp
  • vc2008fp/RollupPane/RollupPane.cpp
  • vc2008fp/SetPaneSize/SetPaneSize.cpp
  • vc2008fp/Slider/Slider.cpp
  • vc2008fp/StateCollection/StateCollection.cpp
  • vc2008fp/StatusBarDemo/StatusBarDemo.cpp
  • vc2008fp/TabbedView/TabbedView.cpp
  • vc2008fp/TabControl/TabControl.cpp
  • vc2008fp/TasksPane/TasksPane.cpp
  • vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.cpp
  • vc2008fp/ToolTipDemo/TooltipDemo.cpp
  • vc2008fp/VisualStudioDemo/VisualStudioDemo.cpp
  • vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.cpp
  • general/dlgcbr32/Aboutdlg.cpp
  • vc2008fp/NewControls/NewControls.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAdderDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CAdderDialog Class Reference

#include "adderdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_ADDME }

Public Member Functions

CAdderDialog (CWnd *pParent)
BOOL | Create ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnCancel ()
virtual void | OnOK ()
virtual void | PostNcDestroy ()

Protected Attributes

int | m_nID
CWnd * | m_pParent

Detailed Description

Definition at line 16 of file adderdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file adderdlg.h.

{ IDD = IDD_ADDME };

Constructor & Destructor Documentation

CAdderDialog::CAdderDialog ( CWnd * pParent )

Definition at line 28 of file adderdlg.cpp.

  : CDialog(CAdderDialog::IDD, pParent)
{
  //{{AFX_DATA_INIT(CAdderDialog)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
  ASSERT(pParent != NULL);

  m_pParent = pParent;
  m_nID = CAdderDialog::IDD;
}

Member Function Documentation

BOOL CAdderDialog::Create ( )

Definition at line 74 of file adderdlg.cpp.

{
  return CDialog::Create(m_nID, m_pParent);
}

void CAdderDialog::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 40 of file adderdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CAdderDialog)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

void CAdderDialog::OnCancel ( ) [protected, virtual]

Definition at line 79 of file adderdlg.cpp.

{
  ((CMainDlg*)m_pParent)->BoxDone();
  DestroyWindow();
}

void CAdderDialog::OnOK ( ) [protected, virtual]

Definition at line 58 of file adderdlg.cpp.

{
  CEdit* pEdit = (CEdit*) GetDlgItem(IDC_NEWTEXT);
  CListBox* pList = (CListBox*) (m_pParent->GetDlgItem(IDC_LIST));

  ASSERT(pList != NULL);
  ASSERT(pEdit != NULL);

  if (pList != NULL && pEdit != NULL)
  {
    CString str;
    pEdit->GetWindowText(str);
    pList->AddString(str);
  }
}

void CAdderDialog::PostNcDestroy ( ) [protected, virtual]

Definition at line 85 of file adderdlg.cpp.

{
  delete this;
}

Member Data Documentation

int CAdderDialog::m_nID [protected]

Definition at line 45 of file adderdlg.h.

CWnd* CAdderDialog::m_pParent [protected]

Definition at line 44 of file adderdlg.h.

The documentation for this class was generated from the following files:
  • general/modeless/adderdlg.h
  • general/modeless/adderdlg.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAddNodeDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CAddNodeDlg Class Reference

List of all members.

Public Types

enum | { IDD = IDD_ADD_NODE }

Public Member Functions

CAddNodeDlg (CWnd *pParent=NULL)

Public Attributes

CButton | m_btnOK
CEdit | m_editDescription
int | m_shape
CString | m_strDescription
CString | m_strLinkKey

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnChange ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 57 of file svritem.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 65 of file svritem.cpp.

{ IDD = IDD_ADD_NODE };

Constructor & Destructor Documentation

CAddNodeDlg::CAddNodeDlg ( CWnd * pParent = NULL )

Definition at line 620 of file svritem.cpp.

  : CDialog(CAddNodeDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CAddNodeDlg)
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CAddNodeDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 634 of file svritem.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CAddNodeDlg)
  DDX_Text(pDX, IDC_EDIT1, m_strDescription);
  DDX_Text(pDX, IDC_EDIT2, m_strLinkKey);
  DDX_CBIndex(pDX, IDC_COMBO1, m_shape);
  DDX_Control(pDX, IDC_EDIT1, m_editDescription);
  DDX_Control(pDX, IDOK, m_btnOK);
  //}}AFX_DATA_MAP
}

void CAddNodeDlg::OnChange ( ) [protected]

Definition at line 653 of file svritem.cpp.

{
  if (m_btnOK.m_hWnd)
    m_btnOK.EnableWindow(m_editDescription.GetWindowTextLength() > 0);
}

BOOL CAddNodeDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 627 of file svritem.cpp.

{
  CDialog::OnInitDialog();
  OnChange(); // after DDX
  return TRUE;
}

Member Data Documentation

CButton CAddNodeDlg::m_btnOK

Definition at line 70 of file svritem.cpp.

CEdit CAddNodeDlg::m_editDescription

Definition at line 69 of file svritem.cpp.

int CAddNodeDlg::m_shape

Definition at line 68 of file svritem.cpp.

CString CAddNodeDlg::m_strDescription

Definition at line 66 of file svritem.cpp.

CString CAddNodeDlg::m_strLinkKey

Definition at line 67 of file svritem.cpp.

The documentation for this class was generated from the following file:
  • ole/hiersvr/svritem.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAddressBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CAddressBox Class Reference

#include "MainFrm.h"

List of all members.

Private Member Functions

virtual HRESULT get_accName (VARIANT, BSTR *pszName)

Detailed Description

Definition at line 17 of file MainFrm.h.

Member Function Documentation

virtual HRESULT CAddressBox::get_accName | ( | VARIANT | ,
 |  | BSTR * | pszName |
 | ) |  |  | [inline, private, virtual]

Definition at line 19 of file MainFrm.h.

  {
    CString strText = _T("Address");
    *pszName = strText.AllocSysString();

    return S_OK;
  }

The documentation for this class was generated from the following file:
  • vc2008fp/Explorer/MainFrm.h
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAddressCombo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CAddressCombo Class Reference

#include "AddressCombo.h"

List of all members.

Public Member Functions

CAddressCombo ()
virtual | ~CAddressCombo ()
void | FillWithExplorerHistory ()

Public Attributes

CFont | m_font

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Detailed Description

Definition at line 22 of file AddressCombo.h.

Constructor & Destructor Documentation

CAddressCombo::CAddressCombo ( )

Definition at line 25 of file AddressCombo.cpp.

{
}

CAddressCombo::~CAddressCombo ( ) [virtual]

Definition at line 29 of file AddressCombo.cpp.

{
}

Member Function Documentation

void CAddressCombo::FillWithExplorerHistory ( )

Definition at line 43 of file AddressCombo.cpp.

{
  HKEY hkUserURL;
  DWORD dwIndex = 0, dwType;
  TCHAR buffName[BUFF_LEN];
  BYTE buffData[BUFF_LEN];
  DWORD dwNameSize,dwDataSize;
  DWORD dwErr = ERROR_SUCCESS;
  if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Microsoft\\Internet Explorer\\TypedURLs"),0,KEY_QUERY_VALUE,&hkUserURL))
  {
    //enumerate this key's values
    while(ERROR_SUCCESS == dwErr)
    {
      dwNameSize = BUFF_LEN;
      dwDataSize = BUFF_LEN;
      dwErr = RegEnumValue(hkUserURL,dwIndex++,buffName,&dwNameSize,NULL,
                &dwType,buffData,&dwDataSize);
      if(dwErr == ERROR_SUCCESS)
      {
        AddString((TCHAR*)buffData);
      }
    }
    RegCloseKey(hkUserURL);
  }
  else
    TRACE(_T("Couldn't open registry key\n"));

}

int CAddressCombo::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 71 of file AddressCombo.cpp.

{
  if (CComboBox::OnCreate(lpCreateStruct) == -1)
    return -1;
    //try for courier, if that fails, go for the ANSI fixed font
  if(!m_font.CreateFont(-MulDiv(10, GetDeviceCaps(GetDC()->m_hDC, LOGPIXELSY), 72)
      ,0,0,0,FW_DONTCARE,0,0,0,ANSI_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS
      ,DEFAULT_QUALITY,DEFAULT_PITCH,_T("TAHOMA")))
  {
    m_font.CreateStockObject(ANSI_FIXED_FONT);
  }
  SetFont(&m_font);
  FillWithExplorerHistory();

  return 0;
}

Member Data Documentation

CFont CAddressCombo::m_font

Definition at line 41 of file AddressCombo.h.

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/AddressCombo.h
  • internet/HTMLEdit/AddressCombo.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAllControlsSheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CAllControlsSheet Class Reference

#include "AllControlsSheet.h"

List of all members.

Public Member Functions

CAllControlsSheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CAllControlsSheet (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CAllControlsSheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CAllControlsSheet (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CAllControlsSheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CAllControlsSheet (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
virtual | ~CAllControlsSheet ()
virtual | ~CAllControlsSheet ()
virtual | ~CAllControlsSheet ()
virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()

Public Attributes

CAnimateCtrlPage m_animctrlpage
CCommandLinkCtrlPage m_commandLinkpage
CDateTimePage m_datetimepage
CMonthCalPage m_monthcalpage
CNetAddressCtrlPage m_netaddressctrlpage
CPagerCtrlPage m_pagectrlpage
CProgCtrlPage m_progctrlpage
CSliderCtrlPage m_sliderctrlpage
CSpinCtrlPage m_spinctrlpage
CSplitButtonCtrlPage m_splitButtonpage
CToolBarCtrlPage m_toolbarpage
CTreeCtrlPage m_treectrlpage

Protected Member Functions

void | AddControlPages (void)
void | AddControlPages (void)
void | AddControlPages (void)
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 22 of file AllControlsSheet.h.

Constructor & Destructor Documentation

CAllControlsSheet::CAllControlsSheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 28 of file AllControlsSheet.cpp.

  :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
  AddControlPages();
}

CAllControlsSheet::CAllControlsSheet | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 34 of file AllControlsSheet.cpp.

  :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
  AddControlPages();
}

CAllControlsSheet::~CAllControlsSheet ( ) [virtual]

Definition at line 40 of file AllControlsSheet.cpp.

{
}

CAllControlsSheet::CAllControlsSheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |
CAllControlsSheet::CAllControlsSheet | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |
virtual CAllControlsSheet::~CAllControlsSheet ( ) [virtual]
CAllControlsSheet::CAllControlsSheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |
CAllControlsSheet::CAllControlsSheet | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |
virtual CAllControlsSheet::~CAllControlsSheet ( ) [virtual]

Member Function Documentation

void CAllControlsSheet::AddControlPages ( void ) [protected]

Definition at line 44 of file AllControlsSheet.cpp.

{
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  m_psh.dwFlags |= PSP_USEHICON;
  m_psh.dwFlags |= PSH_NOAPPLYNOW; // Eliminate the Apply button
  m_psh.hIcon = m_hIcon;

  // Eliminate the Help button
  m_psh.dwFlags &= ~PSH_HASHELP;
  m_pagectrlpage.m_psp.dwFlags &= ~PSP_HASHELP;
  m_commandLinkpage.m_psp.dwFlags &= ~PSP_HASHELP;
  m_splitButtonpage.m_psp.dwFlags &= ~PSP_HASHELP;
  m_netaddressctrlpage.m_psp.dwFlags &= ~PSP_HASHELP;

  AddPage(&m_pagectrlpage);
  AddPage(&m_commandLinkpage);
  AddPage(&m_splitButtonpage);
  AddPage(&m_netaddressctrlpage);
}

void CAllControlsSheet::AddControlPages ( void ) [protected]
void CAllControlsSheet::AddControlPages ( void ) [protected]
BOOL CAllControlsSheet::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]

Definition at line 85 of file AllControlsSheet.cpp.

{
  return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}

virtual BOOL CAllControlsSheet::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]
BOOL CAllControlsSheet::OnInitDialog ( ) [virtual]

Definition at line 74 of file AllControlsSheet.cpp.

{
  SetIcon(m_hIcon, TRUE);
  SetIcon(m_hIcon, FALSE);
  return CPropertySheet::OnInitDialog();
}

virtual BOOL CAllControlsSheet::OnInitDialog ( ) [virtual]
virtual BOOL CAllControlsSheet::OnInitDialog ( ) [virtual]
HCURSOR CAllControlsSheet::OnQueryDragIcon ( ) [protected]

Definition at line 80 of file AllControlsSheet.cpp.

{
  return (HCURSOR) m_hIcon;
}

afx_msg HCURSOR CAllControlsSheet::OnQueryDragIcon ( ) [protected]
afx_msg HCURSOR CAllControlsSheet::OnQueryDragIcon ( ) [protected]
afx_msg void CAllControlsSheet::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]
afx_msg void CAllControlsSheet::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]
void CAllControlsSheet::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 90 of file AllControlsSheet.cpp.

{
  CPropertySheet::OnSysCommand(nID, lParam);
}

Member Data Documentation

CAnimateCtrlPage CAllControlsSheet::m_animctrlpage

Definition at line 38 of file propsht.h.

CCommandLinkCtrlPage CAllControlsSheet::m_commandLinkpage

Definition at line 40 of file AllControlsSheet.h.

CDateTimePage CAllControlsSheet::m_datetimepage

Definition at line 40 of file propsht.h.

HICON CAllControlsSheet::m_hIcon [protected]

Definition at line 60 of file AllControlsSheet.h.

CMonthCalPage CAllControlsSheet::m_monthcalpage

Definition at line 41 of file propsht.h.

CNetAddressCtrlPage CAllControlsSheet::m_netaddressctrlpage

Definition at line 39 of file AllControlsSheet.h.

CPagerCtrlPage CAllControlsSheet::m_pagectrlpage

Definition at line 38 of file AllControlsSheet.h.

CProgCtrlPage CAllControlsSheet::m_progctrlpage

Definition at line 35 of file propsht.h.

CSliderCtrlPage CAllControlsSheet::m_sliderctrlpage

Definition at line 36 of file propsht.h.

CSpinCtrlPage CAllControlsSheet::m_spinctrlpage

Definition at line 37 of file propsht.h.

CSplitButtonCtrlPage CAllControlsSheet::m_splitButtonpage

Definition at line 37 of file AllControlsSheet.h.

CToolBarCtrlPage CAllControlsSheet::m_toolbarpage

Definition at line 39 of file propsht.h.

CTreeCtrlPage CAllControlsSheet::m_treectrlpage

Definition at line 37 of file propsht.h.

The documentation for this class was generated from the following files:
  • controls/cmnctrl/AllControlsSheet.h
  • general/CmnCtrl1/propsht.h
  • general/CmnCtrl2/propsht.h
  • controls/cmnctrl/AllControlsSheet.cpp
  • general/CmnCtrl1/propsht.cpp
  • general/CmnCtrl2/propsht.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAmbientPropertiesDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CAmbientPropertiesDlg Class Reference

#include "APropDg.H"

List of all members.

Public Types

enum | { IDD = IDD_AMBIENTPROPERTIES }

Public Member Functions

CAmbientPropertiesDlg (CWnd *pParent, CTestContainer98Doc *pDoc)
BOOL | GetChangedPropertyID (DISPID *pdispid) const

Public Attributes

CButton | m_butChooseColor
CButton | m_butChooseFont
CButton | m_butSetValue
CComboBox | m_cboxPropName
CComboBox | m_cboxPropType
CComboBox | m_cboxPropValue
CButton | m_checkEnabled
CDateTimeCtrl | m_date
CEdit | m_editDISPID
CEdit | m_editPropValue
CStatic | m_staticPropertyValue

Protected Member Functions

void | DisplayPropValues (int iType)
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnChooseColor ()
afx_msg void | OnChooseFont ()
afx_msg void | OnContextMenu (CWnd *, CPoint)
afx_msg void | OnEnabled ()
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()
afx_msg void | OnNewProperty ()
void | OnPropertyChanged (DISPID id)
afx_msg void | OnPropNameSelChange ()
afx_msg void | OnPropTypeSelChange ()
afx_msg void | OnPropValueSetFocus ()
afx_msg void | OnSetValue ()

Protected Attributes

DISPID | m_dispidChanged
CTestContainer98Doc * m_pDoc
CAmbientProperty * m_pProp
BOOL | m_tChanged

Detailed Description

Definition at line 22 of file APropDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 32 of file APropDg.H.

{ IDD = IDD_AMBIENTPROPERTIES };

Constructor & Destructor Documentation

CAmbientPropertiesDlg::CAmbientPropertiesDlg | ( | CWnd * | pParent,
 |  | CTestContainer98Doc * | pDoc
 | ) |  |

Definition at line 24 of file APropDg.Cpp.

                               :
   CDialog( CAmbientPropertiesDlg::IDD, pParent ),
   m_pDoc( pDoc ),
   m_tChanged( FALSE ),
   m_dispidChanged( DISPID_UNKNOWN )
{
   ASSERT( m_pDoc != NULL );
  //{{AFX_DATA_INIT(CAmbientPropertiesDlg)
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CAmbientPropertiesDlg::DisplayPropValues ( int iType ) [protected]

Definition at line 233 of file APropDg.Cpp.

{
   CString strValue;

   m_cboxPropValue.ResetContent();
   switch( iType )
   {
   case VTI_BOOL:
      LOAD_STRING_FROM_RESOURCE( strValue, IDS_FALSE );
      m_cboxPropValue.AddString( strValue );
      LOAD_STRING_FROM_RESOURCE( strValue, IDS_TRUE );
      m_cboxPropValue.AddString( strValue );
      break;

   default:
      ASSERT( FALSE );
      break;
   }
}

void CAmbientPropertiesDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 37 of file APropDg.Cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CAmbientPropertiesDlg)
  DDX_Control(pDX, IDC_PROPVALUECOMBO_AMBIENT, m_cboxPropValue);
  DDX_Control(pDX, IDC_DATE_AMBIENT, m_date);
  DDX_Control(pDX, IDC_STATIC_PROPERTYVALUE, m_staticPropertyValue);
  DDX_Control(pDX, IDC_DISPID, m_editDISPID);
  DDX_Control(pDX, IDC_CHOOSEFONT_AMBIENT, m_butChooseFont);
  DDX_Control(pDX, IDC_CHOOSECOLOR_AMBIENT, m_butChooseColor);
  DDX_Control(pDX, IDC_PROPNAME, m_cboxPropName);
  DDX_Control(pDX, IDC_SETVALUE_AMBIENT, m_butSetValue);
  DDX_Control(pDX, IDC_PROPVALUE, m_editPropValue);
  DDX_Control(pDX, IDC_PROPTYPE, m_cboxPropType);
  DDX_Control(pDX, IDC_ENABLED, m_checkEnabled);
  //}}AFX_DATA_MAP
}

BOOL CAmbientPropertiesDlg::GetChangedPropertyID ( DISPID * pdispid ) const

Definition at line 310 of file APropDg.Cpp.

{
   if( m_tChanged )
   {
    *pdispid = m_dispidChanged;
   }
   else
   {
    *pdispid = DISPID_UNKNOWN;
   }

   return( m_tChanged );
}

void CAmbientPropertiesDlg::OnChooseColor ( ) [protected]

Definition at line 324 of file APropDg.Cpp.

{
   int nResult;
   COleVariant varColor;

   varColor = m_pProp->GetValue();
   try
   {
    varColor.ChangeType( VT_COLOR );
   }
   catch( CException* pException )
   {
    varColor = COleVariant( long( 0 ), VT_COLOR );

   pException->Delete();
   }

   ASSERT( varColor.vt == VT_COLOR );

   CColorDialog dlg( varColor.lVal );

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   varColor = COleVariant( long( dlg.GetColor() ), VT_COLOR );
   m_pProp->SetValue( varColor );
   OnPropertyChanged( m_pProp->GetID() );
}

void CAmbientPropertiesDlg::OnChooseFont ( ) [protected]

Definition at line 356 of file APropDg.Cpp.

{

   int nResult;
   IFontDispPtr pFontDisp;
   IFontPtr pFont;
   FONTDESC desc;
   HRESULT hResult;
   COleVariant varFont;
   CFont font;
   HFONT hFont;
   LOGFONT logfont;
   LOGFONT* pLogFont;
   BOOL tSuccess;

   hFont = NULL;
   varFont = m_pProp->GetValue();
   if( varFont.vt == VT_FONT )
   {
    pFont = varFont.pdispVal;
    if( pFont != NULL )
    {
     hResult = pFont->get_hFont( &hFont );
     if( FAILED( hResult ) )
     {
      hFont = NULL;
     }
     pFont.Release();
    }
   }

   if( hFont != NULL )
   {
    font.Attach( hFont );
    tSuccess = font.GetLogFont( &logfont );
    font.Detach();
    if( !tSuccess )
    {
     hFont = NULL;
    }
   }

   if( hFont != NULL )
   {
    pLogFont = &logfont;
   }
   else
   {
    pLogFont = NULL;
   }

   CFontDialog dlg( pLogFont );

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   memset( &desc, 0, sizeof( desc ) );
   desc.cbSizeofstruct = sizeof( desc );
   CT2OLE tName(dlg.m_cf.lpLogFont->lfFaceName);
   desc.lpstrName = tName;
   desc.cySize = COleCurrency( dlg.m_cf.iPointSize/10, 1000*
    (dlg.m_cf.iPointSize%10) );
   desc.sWeight = short( dlg.m_cf.lpLogFont->lfWeight );
   desc.sCharset = dlg.m_cf.lpLogFont->lfCharSet;
   desc.fItalic = dlg.m_cf.lpLogFont->lfItalic;
   desc.fUnderline = dlg.m_cf.lpLogFont->lfUnderline;
   desc.fStrikethrough = dlg.m_cf.lpLogFont->lfStrikeOut;

   hResult = OleCreateFontIndirect( &desc, IID_IFontDisp, (void**)&pFontDisp );
   if( FAILED( hResult ) )
   {
    TRACE( "OleCreateFontIndirect() failed\n" );
    return;
   }

   varFont.vt = VT_DISPATCH;
   varFont.pdispVal = pFontDisp;
   varFont.pdispVal->AddRef();
   m_pProp->SetValue( varFont );
   OnPropertyChanged( m_pProp->GetID() );
}

void CAmbientPropertiesDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint |  |
 | ) |  |  | [protected]

Definition at line 527 of file APropDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

void CAmbientPropertiesDlg::OnEnabled ( ) [protected]

Definition at line 296 of file APropDg.Cpp.

{
   if( m_checkEnabled.GetCheck() )
   {
    m_pProp->Enable( TRUE );
    OnPropNameSelChange();
   }
   else
   {
    m_pProp->Enable( FALSE );
    OnPropNameSelChange();
   }
}

BOOL CAmbientPropertiesDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 519 of file APropDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CAmbientPropertiesDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 74 of file APropDg.Cpp.

{
   int iProp;
   int iType;
   int iItem;

  CDialog::OnInitDialog();

   // Fill in the available ambient properties
   for( iProp = 0; iProp < m_pDoc->GetNumAmbientProperties(); iProp++ )
   {
    iItem = m_cboxPropName.AddString( m_pDoc->GetAmbientProperty(
     iProp )->GetName() );
    m_cboxPropName.SetItemData( iItem, iProp );
   }

   for( iType = 0; iType < NUM_VARTYPES; iType++ )
   {
    iItem = m_cboxPropType.AddString( VTIToString( iType ) );
    m_cboxPropType.SetItemData( iItem, iType );
   }

   m_cboxPropName.SetCurSel( 0 );
   OnPropNameSelChange();

   return( TRUE );  // return TRUE unless you set the focus to a control
}

void CAmbientPropertiesDlg::OnNewProperty ( ) [protected]

Definition at line 460 of file APropDg.Cpp.

{
   COleVariant var;
   int iProp;
   int iItem;
   CNewAmbientPropertyDlg dlg;
   int nResult;

   LOAD_STRING_FROM_RESOURCE( dlg.m_strName, IDS_NEWPROPERTY );
   dlg.m_dispid = DISPID_UNKNOWN;

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   var = COleVariant( VARIANT_FALSE, VT_BOOL );
   try
   {
    iProp = m_pDoc->AddAmbientProperty( dlg.m_dispid, dlg.m_strName, var,
     VTI_BOOL );
    iItem = m_cboxPropName.AddString( dlg.m_strName );
    m_cboxPropName.SetItemData( iItem, iProp );
    m_cboxPropName.SetCurSel( iItem );
    OnPropertyChanged( dlg.m_dispid );
    OnPropNameSelChange();
   }
   catch( ... )
   {
    TRACE( "Failed to add ambient property\n" );
   }
}

void CAmbientPropertiesDlg::OnPropertyChanged ( DISPID id ) [protected]

Definition at line 441 of file APropDg.Cpp.

{
   if( m_tChanged == FALSE )
   {
    // This is the first property we changed.
    m_tChanged = TRUE;
    m_dispidChanged = dispid;
   }
   else
   {
    if( m_dispidChanged != dispid )
    {
     // We've already changed a different property, so we'll have to do
     // a bulk notify.
     m_dispidChanged = DISPID_UNKNOWN;
    }
   }
}

void CAmbientPropertiesDlg::OnPropNameSelChange ( ) [protected]

Definition at line 102 of file APropDg.Cpp.

{

   int iProp;
   int iItem;
   CString strDisplay;

   iItem = m_cboxPropName.GetCurSel();
   ASSERT( iItem != CB_ERR );
   iProp = (int)m_cboxPropName.GetItemData( iItem );

   m_pProp = m_pDoc->GetAmbientProperty( iProp );

   strDisplay.Format( _T( "%d" ), m_pProp->GetID() );
   m_editDISPID.SetWindowText( strDisplay );
   m_editDISPID.SetReadOnly( m_pProp->IsStock() );

//   m_cboxPropType.SetCurSel( m_pProp->GetVTI() );
   m_cboxPropType.SelectString( -1, VTIToString( m_pProp->GetVTI() ) );
   OnPropTypeSelChange();
   TRY
   {
      if( m_pProp->GetVTI() == VTI_DATE )
      {
         m_date.SetTime( COleDateTime( m_pProp->GetValue() ) );
      }
      else if( m_pProp->GetVTI() == VTI_BOOL )
      {
         m_cboxPropValue.SetCurSel( m_pProp->GetValue().boolVal ? 1 : 0 );
      }
      else
      {
       strDisplay = VariantToString( m_pProp->GetValue() );
       m_editPropValue.SetWindowText( strDisplay );
      }
   }
   CATCH( COleException, e )
   {
    TRACE( "ChangeType() failed.\n" );
   }
   END_CATCH

   if( m_pProp->IsEnabled() )
   {
    m_checkEnabled.SetCheck( 1 );
     m_date.EnableWindow( TRUE );
     m_cboxPropValue.EnableWindow( TRUE );
    m_cboxPropType.EnableWindow( TRUE );
    m_editPropValue.EnableWindow( TRUE );
    m_butSetValue.EnableWindow( TRUE );
    m_butChooseColor.EnableWindow( TRUE );
    m_butChooseFont.EnableWindow( TRUE );
   }
   else
   {
    m_checkEnabled.SetCheck( 0 );
     m_cboxPropValue.EnableWindow( FALSE );
     m_date.EnableWindow( FALSE );
    m_cboxPropType.EnableWindow( FALSE );
    m_editPropValue.EnableWindow( FALSE );
    m_butSetValue.EnableWindow( FALSE );
    m_butChooseColor.EnableWindow( FALSE );
    m_butChooseFont.EnableWindow( FALSE );
   }
}

void CAmbientPropertiesDlg::OnPropTypeSelChange ( ) [protected]

Definition at line 168 of file APropDg.Cpp.

{
   int iType;
   int iItem;

   iItem = m_cboxPropType.GetCurSel();
   ASSERT( iItem != CB_ERR );
   iType = (int)m_cboxPropType.GetItemData( iItem );

   switch( iType )
   {
   case VTI_BOOL:
      m_butChooseColor.ShowWindow( SW_HIDE );
      m_editPropValue.ShowWindow( SW_HIDE );
      m_butChooseFont.ShowWindow( SW_HIDE );
      m_date.ShowWindow( SW_HIDE );
      m_butSetValue.ShowWindow( SW_NORMAL );
      m_staticPropertyValue.ShowWindow( SW_NORMAL );
      m_cboxPropValue.ShowWindow( SW_NORMAL );
      DisplayPropValues( iType );
    m_cboxPropValue.SetCurSel( 0 );
      break;

   case VTI_FONT:
      m_cboxPropValue.ShowWindow( SW_HIDE );
    m_butChooseColor.ShowWindow( SW_HIDE );
    m_staticPropertyValue.ShowWindow( SW_HIDE );
    m_editPropValue.ShowWindow( SW_HIDE );
    m_butSetValue.ShowWindow( SW_HIDE );
     m_date.ShowWindow( SW_HIDE );
    m_butChooseFont.ShowWindow( SW_NORMAL );
    break;

   case VTI_COLOR:
      m_cboxPropValue.ShowWindow( SW_HIDE );
    m_butChooseFont.ShowWindow( SW_HIDE );
    m_staticPropertyValue.ShowWindow( SW_HIDE );
    m_editPropValue.ShowWindow( SW_HIDE );
    m_butSetValue.ShowWindow( SW_HIDE );
    m_butChooseColor.ShowWindow( SW_NORMAL );
     m_date.ShowWindow( SW_HIDE );
    break;

   case VTI_DATE:
      m_cboxPropValue.ShowWindow( SW_HIDE );
    m_butChooseFont.ShowWindow( SW_HIDE );
    m_staticPropertyValue.ShowWindow( SW_NORMAL );
    m_editPropValue.ShowWindow( SW_HIDE );
    m_butSetValue.ShowWindow( SW_NORMAL );
    m_butChooseColor.ShowWindow( SW_HIDE );
     m_date.ShowWindow( SW_NORMAL );
      break;

   default:
      m_cboxPropValue.ShowWindow( SW_HIDE );
    m_butChooseColor.ShowWindow( SW_HIDE );
    m_butChooseFont.ShowWindow( SW_HIDE );
    m_staticPropertyValue.ShowWindow( SW_NORMAL );
    m_editPropValue.ShowWindow( SW_NORMAL );
    m_butSetValue.ShowWindow( SW_NORMAL );
     m_date.ShowWindow( SW_HIDE );
    break;
   }
}

void CAmbientPropertiesDlg::OnPropValueSetFocus ( ) [protected]

Definition at line 494 of file APropDg.Cpp.

{
   // The ParamValue edit box just got the keyboard focus.  The user should be
   // able to set the value to the contents of the edit box just by hitting
   // ENTER.
   SetDefID( IDC_SETVALUE_AMBIENT );
}

void CAmbientPropertiesDlg::OnSetValue ( ) [protected]

Definition at line 253 of file APropDg.Cpp.

{
   COleVariant varValue;
   CString strValue;
   int iType;
   int iItem;
   COleDateTime date;

   iItem = m_cboxPropType.GetCurSel();
   ASSERT( iItem != CB_ERR );
   iType = (int)m_cboxPropType.GetItemData( iItem );
   if( iType == VTI_DATE )
   {
      m_date.GetTime( date );
      varValue = date;
   }
   else if( iType == VTI_BOOL )
   {
      varValue = COleVariant( VARIANT_BOOL( (m_cboxPropValue.GetCurSel() ==
         1) ? ~VARIANT_FALSE : VARIANT_FALSE ), VT_BOOL );
   }
   else
   {
      m_editPropValue.GetWindowText( strValue );
      varValue = strValue;
   }

   TRY
   {
    varValue.ChangeType( VTIToVT( iType ) );
    m_pProp->SetValue( varValue, iType );
    OnPropertyChanged( m_pProp->GetID() );
   }
   CATCH( COleException, e )
   {
    TRACE( "ChangeType() failed.\n" );
   }
   END_CATCH

   m_editPropValue.SetFocus();
   m_editPropValue.SetSel( 0, -1 );
}

Member Data Documentation

CButton CAmbientPropertiesDlg::m_butChooseColor

Definition at line 38 of file APropDg.H.

CButton CAmbientPropertiesDlg::m_butChooseFont

Definition at line 37 of file APropDg.H.

CButton CAmbientPropertiesDlg::m_butSetValue

Definition at line 40 of file APropDg.H.

CComboBox CAmbientPropertiesDlg::m_cboxPropName

Definition at line 39 of file APropDg.H.

CComboBox CAmbientPropertiesDlg::m_cboxPropType

Definition at line 42 of file APropDg.H.

CComboBox CAmbientPropertiesDlg::m_cboxPropValue

Definition at line 33 of file APropDg.H.

CButton CAmbientPropertiesDlg::m_checkEnabled

Definition at line 43 of file APropDg.H.

CDateTimeCtrl CAmbientPropertiesDlg::m_date

Definition at line 34 of file APropDg.H.

DISPID CAmbientPropertiesDlg::m_dispidChanged [protected]

Definition at line 63 of file APropDg.H.

CEdit CAmbientPropertiesDlg::m_editDISPID

Definition at line 36 of file APropDg.H.

CEdit CAmbientPropertiesDlg::m_editPropValue

Definition at line 41 of file APropDg.H.

CTestContainer98Doc* CAmbientPropertiesDlg::m_pDoc [protected]

Definition at line 60 of file APropDg.H.

CAmbientProperty* CAmbientPropertiesDlg::m_pProp [protected]

Definition at line 61 of file APropDg.H.

CStatic CAmbientPropertiesDlg::m_staticPropertyValue

Definition at line 35 of file APropDg.H.

BOOL CAmbientPropertiesDlg::m_tChanged [protected]

Definition at line 62 of file APropDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/APropDg.H
  • ole/TstCon/APropDg.Cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAmbientProperty Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes | Private Member Functions

CAmbientProperty Class Reference

#include "AProp.H"

List of all members.

Public Member Functions

CAmbientProperty ()
CAmbientProperty (DISPID dispid, LPCTSTR pszName, const VARIANT &var, int vti, BOOL tStock=FALSE)
void | Enable (BOOL tEnabled)
DISPID | GetID () const
CString | GetName () const
const COleVariant & | GetValue () const
int | GetVTI () const
BOOL | IsEnabled () const
BOOL | IsStock () const
CAmbientProperty & | operator= (const CAmbientProperty &prop)
void | Serialize (CArchive &ar)
void | SetValue (const VARIANT &varValue, int vti=-1)

Protected Attributes

DISPID | m_dispid
CString | m_strName
BOOL | m_tEnabled
BOOL | m_tStock
COleVariant | m_varValue
int | m_vti

Private Member Functions

DECLARE_SERIAL (CAmbientProperty)

Detailed Description

Definition at line 10 of file AProp.H.

Constructor & Destructor Documentation

CAmbientProperty::CAmbientProperty ( )

Definition at line 22 of file AProp.Cpp.

                                   :
   m_dispid( 0 ),
   m_tEnabled( FALSE )
{
}

CAmbientProperty::CAmbientProperty | ( | DISPID | dispid,
 |  | LPCTSTR | pszName,
 |  | const VARIANT & | var,
 |  | int | vti,
 |  | BOOL | tStock = FALSE
 | ) |  |

Definition at line 28 of file AProp.Cpp.

                                              :
   m_dispid( dispid ),
   m_strName( pszName ),
   m_varValue( var ),
   m_vti( vti ),
   m_tEnabled( TRUE ),
   m_tStock( tStock )
{
}

Member Function Documentation

CAmbientProperty::DECLARE_SERIAL ( CAmbientProperty ) [private]
void CAmbientProperty::Enable ( BOOL tEnabled )

Definition at line 51 of file AProp.Cpp.

{
   m_tEnabled = tEnabled;
}

DISPID CAmbientProperty::GetID ( void ) const

Definition at line 56 of file AProp.Cpp.

{
   return( m_dispid );
}

CString CAmbientProperty::GetName ( ) const

Definition at line 61 of file AProp.Cpp.

{
   return( m_strName );
}

const COleVariant & CAmbientProperty::GetValue ( ) const

Definition at line 66 of file AProp.Cpp.

{
   return( m_varValue );
}

int CAmbientProperty::GetVTI ( ) const

Definition at line 71 of file AProp.Cpp.

{
   return( m_vti );
}

BOOL CAmbientProperty::IsEnabled ( ) const

Definition at line 76 of file AProp.Cpp.

{
   return( m_tEnabled );
}

BOOL CAmbientProperty::IsStock ( ) const

Definition at line 81 of file AProp.Cpp.

{
   return( m_tStock );
}

CAmbientProperty & CAmbientProperty::operator= ( const CAmbientProperty & prop )

Definition at line 39 of file AProp.Cpp.

{
   m_dispid = prop.m_dispid;
   m_strName = prop.m_strName;
   m_varValue = prop.m_varValue;
   m_vti = prop.m_vti;
   m_tEnabled = prop.m_tEnabled;
   m_tStock = prop.m_tStock;

   return( *this );
}

void CAmbientProperty::Serialize ( CArchive & ar )

Definition at line 100 of file AProp.Cpp.

{
   CObject::Serialize( ar );

   if( ar.IsStoring() )
   {
    ar<<m_dispid;
    ar<<m_strName;
    ar<<m_varValue;
    ar<<m_vti;
    ar<<m_tEnabled;
    ar<<m_tStock;
   }
   else
   {
    ar>>m_dispid;
    ar>>m_strName;
    ar>>m_varValue;
    ar>>m_vti;
    ar>>m_tEnabled;
    ar>>m_tStock;
   }
}

void CAmbientProperty::SetValue | ( | const VARIANT & | varValue,
 |  | int | vti = -1
 | ) |  |

Definition at line 86 of file AProp.Cpp.

{
   m_varValue = varValue;
   if( vti == -1 )
   {
    m_vti = VTToVTI( varValue.vt );
   }
   else
   {
    ASSERT( VTIToVT( vti ) == varValue.vt );
    m_vti = vti;
   }
}

Member Data Documentation

DISPID CAmbientProperty::m_dispid [protected]

Definition at line 34 of file AProp.H.

CString CAmbientProperty::m_strName [protected]

Definition at line 35 of file AProp.H.

BOOL CAmbientProperty::m_tEnabled [protected]

Definition at line 38 of file AProp.H.

BOOL CAmbientProperty::m_tStock [protected]

Definition at line 39 of file AProp.H.

COleVariant CAmbientProperty::m_varValue [protected]

Definition at line 36 of file AProp.H.

int CAmbientProperty::m_vti [protected]

Definition at line 37 of file AProp.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/AProp.H
  • ole/TstCon/AProp.Cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAnimateCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CAnimateCtrlPage Class Reference

#include "animctrl.h"

List of all members.

Public Types

enum | { IDD = IDD_ANIMCTRL }

Public Member Functions

CAnimateCtrlPage ()

Public Attributes

CAnimateCtrl | m_AnimateCtrl
BOOL | m_bAutoplay
BOOL | m_bCentered
BOOL | m_bTransparent
CString | m_cstrFileName
DWORD | m_dwStyle
CRect | m_rectAnimateCtrl

Protected Member Functions

void | ApplyChanges ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAutoplay ()
afx_msg void | OnBrowse ()
afx_msg void | OnCenter ()
afx_msg void | OnFileChange ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnPlay ()
afx_msg void | OnStop ()
afx_msg void | OnTransparent ()

Detailed Description

Definition at line 19 of file animctrl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file animctrl.h.

{ IDD = IDD_ANIMCTRL };

Constructor & Destructor Documentation

CAnimateCtrlPage::CAnimateCtrlPage ( )

Definition at line 24 of file animctrl.cpp.

  : CPropertyPage(CAnimateCtrlPage::IDD),
  m_dwStyle(WS_CHILD|WS_VISIBLE|ACS_CENTER)
{
  //{{AFX_DATA_INIT(CAnimateCtrlPage)
  m_cstrFileName = _T("");
  m_bCentered = TRUE;
  m_bTransparent = FALSE;
  m_bAutoplay = FALSE;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
}

Member Function Documentation

void CAnimateCtrlPage::ApplyChanges ( ) [protected]

Definition at line 143 of file animctrl.cpp.

{
  // Stop any current animation and close the animation file
  m_AnimateCtrl.Stop();
  m_AnimateCtrl.Close();

  // Set the new style
  ::SetWindowLong(m_AnimateCtrl.GetSafeHwnd(), GWL_STYLE, m_dwStyle);
  // A call to SetWindowPos forces the window to re-read its style
  m_AnimateCtrl.SetWindowPos(NULL, 0, 0, m_rectAnimateCtrl.Width(), m_rectAnimateCtrl.Height(),
                 SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE|SWP_SHOWWINDOW);

  m_AnimateCtrl.Open(m_cstrFileName);
  // force repaint of the portion of the property page occupied by the control
  InvalidateRect(&m_rectAnimateCtrl);
  UpdateWindow();
}

void CAnimateCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 37 of file animctrl.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CAnimateCtrlPage)
  DDX_Check(pDX, IDC_CENTER, m_bCentered);
  DDX_Check(pDX, IDC_TRANSPARENT, m_bTransparent);
  DDX_Check(pDX, IDC_AUTOPLAY, m_bAutoplay);
  DDX_Text(pDX, IDC_EDIT1, m_cstrFileName);
  //}}AFX_DATA_MAP
}

void CAnimateCtrlPage::OnAutoplay ( ) [protected]

Definition at line 121 of file animctrl.cpp.

{
  UpdateData();
  if( m_bAutoplay )
    m_dwStyle |= ACS_AUTOPLAY;
  else
    m_dwStyle &= ~ACS_AUTOPLAY;
  ApplyChanges();
}

void CAnimateCtrlPage::OnBrowse ( ) [protected]

Definition at line 87 of file animctrl.cpp.

{
  CFileDialog dlg( TRUE,_T("AVI"),_T("*.AVI"),
           OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
           _T("Animation (*.AVI)|*.AVI|"));

  if( dlg.DoModal()==IDOK )
  {
    m_cstrFileName = dlg.GetPathName();
    UpdateData(FALSE);
    ApplyChanges();
  }
}

void CAnimateCtrlPage::OnCenter ( ) [protected]

Definition at line 101 of file animctrl.cpp.

{
  UpdateData();
  if( m_bCentered )
    m_dwStyle |= ACS_CENTER;
  else
    m_dwStyle &= ~ACS_CENTER;
  ApplyChanges();
}

void CAnimateCtrlPage::OnFileChange ( ) [protected]

Definition at line 79 of file animctrl.cpp.

{
  UpdateData();
  CFileStatus filestatus;
  if(CFile::GetStatus(m_cstrFileName, filestatus))
    ApplyChanges();
}

BOOL CAnimateCtrlPage::OnInitDialog ( ) [protected, virtual]

Definition at line 62 of file animctrl.cpp.

{
  if(!CPropertyPage::OnInitDialog())
    return FALSE;

  // Create animation control inside static frame.
  // This is necessary to avoid having the animation control
  // "overflow" the rectangle assigned to it when the
  // ACS_CENTER style is removed.

  CWnd* pFrame = GetDlgItem(IDC_ANIMFRAME);
  pFrame->GetClientRect(&m_rectAnimateCtrl);
  m_AnimateCtrl.Create(m_dwStyle, m_rectAnimateCtrl, pFrame, IDC_ANIMATE);

  return TRUE;
}

void CAnimateCtrlPage::OnPlay ( ) [protected]

Definition at line 131 of file animctrl.cpp.

{
  // From frame: 1, To frame: end (0xFFFF, or -1),
  // Play once (1)
  m_AnimateCtrl.Play(0,0xFFFF,1);
}

void CAnimateCtrlPage::OnStop ( ) [protected]

Definition at line 138 of file animctrl.cpp.

{
  m_AnimateCtrl.Stop();
}

void CAnimateCtrlPage::OnTransparent ( ) [protected]

Definition at line 111 of file animctrl.cpp.

{
  UpdateData();
  if( m_bTransparent )
    m_dwStyle |= ACS_TRANSPARENT;
  else
    m_dwStyle &= ~ACS_TRANSPARENT;
  ApplyChanges();
}

Member Data Documentation

CAnimateCtrl CAnimateCtrlPage::m_AnimateCtrl

Definition at line 33 of file animctrl.h.

BOOL CAnimateCtrlPage::m_bAutoplay

Definition at line 31 of file animctrl.h.

BOOL CAnimateCtrlPage::m_bCentered

Definition at line 29 of file animctrl.h.

BOOL CAnimateCtrlPage::m_bTransparent

Definition at line 30 of file animctrl.h.

CString CAnimateCtrlPage::m_cstrFileName

Definition at line 28 of file animctrl.h.

DWORD CAnimateCtrlPage::m_dwStyle

Definition at line 35 of file animctrl.h.

CRect CAnimateCtrlPage::m_rectAnimateCtrl

Definition at line 34 of file animctrl.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/animctrl.h
  • general/CmnCtrl1/animctrl.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAppLookDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CAppLookDlg Class Reference

#include "AppLookDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_APP_LOOK }
enum | { IDD = IDD_APP_LOOK }
enum | { IDD = IDD_APP_LOOK }

Public Member Functions

CAppLookDlg (BOOL bStartup, CWnd *pParent=NULL)
CAppLookDlg (BOOL bStartup, CWnd *pParent=NULL)
CAppLookDlg (BOOL bStartup, CWnd *pParent=NULL)

Public Attributes

BOOL | m_bActiveTabCloseButton
BOOL | m_bCustomTooltips
BOOL | m_bDockTabColors
BOOL | m_bOneNoteTabs
BOOL | m_bOutlookBar2003
BOOL | m_bRoundedTabs
BOOL | m_bShowAtStartup
int | m_nAppLook
int | m_nStyle
int | m_nStyle2007
CButton | m_wndCancel
CButton | m_wndDockTabColors
CButton | m_wndOK
CButton | m_wndOneNoteTabs
CButton | m_wndOutlookBar2003
CButton | m_wndRoundedTabs
CComboBox | m_wndStyle
CComboBox | m_wndStyle2007

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAppLook ()
afx_msg void | OnAppLook ()
afx_msg void | OnAppLook ()
afx_msg void | OnApply ()
afx_msg void | OnApply ()
afx_msg void | OnApply ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
virtual void | OnOK ()
virtual void | OnOK ()
virtual void | OnOK ()
void | SetLook ()
void | SetLook ()
void | SetLook ()

Protected Attributes

const BOOL | m_bStartup

Detailed Description

Definition at line 15 of file AppLookDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 22 of file AppLookDlg.h.

{ IDD = IDD_APP_LOOK };

anonymous enum
Enumerator:
IDD

Definition at line 22 of file AppLookDlg.h.

{ IDD = IDD_APP_LOOK };

anonymous enum
Enumerator:
IDD

Definition at line 14 of file AppLookDlg.h.

{ IDD = IDD_APP_LOOK };

Constructor & Destructor Documentation

CAppLookDlg::CAppLookDlg | ( | BOOL | bStartup,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 24 of file AppLookDlg.cpp.

                                                               :
  CDialog(CAppLookDlg::IDD, pParent), m_bStartup(bStartup)
{
  m_nAppLook = 1;
  m_bShowAtStartup = FALSE;
  m_bOutlookBar2003 = FALSE;
  m_nStyle2007 = 0;

  m_nAppLook = theApp.GetInt(_T("AppLook"), 2);
  m_bShowAtStartup = theApp.GetInt(_T("ShowAppLookAtStartup"), TRUE);
  m_nStyle2007 = theApp.GetInt(_T("Style2007"), 0);
  m_bOutlookBar2003 = theApp.GetInt(_T("OutlookBar2003"), m_nAppLook == 2);
}

CAppLookDlg::CAppLookDlg | ( | BOOL | bStartup,
 |  | CWnd * | pParent = NULL
 | ) |  |
CAppLookDlg::CAppLookDlg | ( | BOOL | bStartup,
 |  | CWnd * | pParent = NULL
 | ) |  |

Member Function Documentation

void CAppLookDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 38 of file AppLookDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_STYLE2007, m_wndStyle2007);
  DDX_Control(pDX, IDC_OUTLOOKBAR2003, m_wndOutlookBar2003);
  DDX_Control(pDX, IDOK, m_wndOK);
  DDX_Control(pDX, IDCANCEL, m_wndCancel);
  DDX_Radio(pDX, IDC_APP_LOOK1, m_nAppLook);
  DDX_Check(pDX, IDC_SHOW_AT_STARTUP, m_bShowAtStartup);
  DDX_Check(pDX, IDC_OUTLOOKBAR2003, m_bOutlookBar2003);
  DDX_CBIndex(pDX, IDC_STYLE2007, m_nStyle2007);
}

virtual void CAppLookDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CAppLookDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
void CAppLookDlg::OnAppLook ( ) [protected]

Definition at line 158 of file AppLookDlg.cpp.

{
  UpdateData();

  m_wndStyle2007.EnableWindow(m_nAppLook == 2);
  m_wndOutlookBar2003.EnableWindow(m_nAppLook == 1 || m_nAppLook == 2);
}

afx_msg void CAppLookDlg::OnAppLook ( ) [protected]
afx_msg void CAppLookDlg::OnAppLook ( ) [protected]
afx_msg void CAppLookDlg::OnApply ( ) [protected]
afx_msg void CAppLookDlg::OnApply ( ) [protected]
void CAppLookDlg::OnApply ( ) [protected]

Definition at line 97 of file AppLookDlg.cpp.

{
  SetLook();

  if (!m_bStartup)
  {
    m_wndCancel.SetWindowText(_T("Close"));
  }
}

virtual BOOL CAppLookDlg::OnInitDialog ( ) [protected, virtual]
BOOL CAppLookDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 61 of file AppLookDlg.cpp.

{
  CDialog::OnInitDialog();

  SetLook();

  m_wndStyle2007.EnableWindow(m_nAppLook == 2);

  if (m_bStartup)
  {
    if (!m_bShowAtStartup)
    {
      EndDialog(IDCANCEL);
      return TRUE;
    }

    CRect rectBtn;

    // Hide "Cancel" button:
    m_wndCancel.GetWindowRect(rectBtn);
    ScreenToClient(rectBtn);

    m_wndOK.MoveWindow(rectBtn);

    m_wndCancel.ShowWindow(SW_HIDE);
  }

  return TRUE;  // return TRUE unless you set the focus to a control
}

virtual BOOL CAppLookDlg::OnInitDialog ( ) [protected, virtual]
void CAppLookDlg::OnOK ( ) [protected, virtual]

Definition at line 91 of file AppLookDlg.cpp.

{
  CDialog::OnOK();
  SetLook();
}

virtual void CAppLookDlg::OnOK ( ) [protected, virtual]
virtual void CAppLookDlg::OnOK ( ) [protected, virtual]
void CAppLookDlg::SetLook ( ) [protected]
void CAppLookDlg::SetLook ( ) [protected]

Definition at line 107 of file AppLookDlg.cpp.

{
  UpdateData();
  OnAppLook();

  switch (m_nAppLook)
  {
  case 0:
    CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOfficeXP));
    break;

  case 1:
    CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
    break;

  case 2:
    switch (m_nStyle2007)
    {
    case 0:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_LunaBlue);
      break;

    case 1:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
      break;

    case 2:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);
      break;

    case 3:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);
      break;
    }

    CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));
    break;
  }

  theApp.WriteInt(_T("AppLook"), m_nAppLook);
  theApp.WriteInt(_T("Style2007"), m_nStyle2007);
  theApp.WriteInt(_T("ShowAppLookAtStartup"), m_bShowAtStartup);
  theApp.WriteInt(_T("OutlookBar2003"), m_bOutlookBar2003);

  CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
  if (pMainFrame != NULL)
  {
    pMainFrame->OnChangeLook((m_nAppLook == 2 || m_nAppLook == 3) && m_bOutlookBar2003);
  }
}

void CAppLookDlg::SetLook ( ) [protected]

Member Data Documentation

BOOL CAppLookDlg::m_bActiveTabCloseButton

Definition at line 36 of file AppLookDlg.h.

BOOL CAppLookDlg::m_bCustomTooltips

Definition at line 33 of file AppLookDlg.h.

BOOL CAppLookDlg::m_bDockTabColors

Definition at line 31 of file AppLookDlg.h.

BOOL CAppLookDlg::m_bOneNoteTabs

Definition at line 30 of file AppLookDlg.h.

BOOL CAppLookDlg::m_bOutlookBar2003

Definition at line 29 of file AppLookDlg.h.

BOOL CAppLookDlg::m_bRoundedTabs

Definition at line 32 of file AppLookDlg.h.

BOOL CAppLookDlg::m_bShowAtStartup

Definition at line 28 of file AppLookDlg.h.

const BOOL CAppLookDlg::m_bStartup [protected]

Definition at line 45 of file AppLookDlg.h.

int CAppLookDlg::m_nAppLook

Definition at line 27 of file AppLookDlg.h.

int CAppLookDlg::m_nStyle

Definition at line 35 of file AppLookDlg.h.

int CAppLookDlg::m_nStyle2007

Definition at line 30 of file AppLookDlg.h.

CButton CAppLookDlg::m_wndCancel

Definition at line 26 of file AppLookDlg.h.

CButton CAppLookDlg::m_wndDockTabColors

Definition at line 25 of file AppLookDlg.h.

CButton CAppLookDlg::m_wndOK

Definition at line 25 of file AppLookDlg.h.

CButton CAppLookDlg::m_wndOneNoteTabs

Definition at line 26 of file AppLookDlg.h.

CButton CAppLookDlg::m_wndOutlookBar2003

Definition at line 24 of file AppLookDlg.h.

CButton CAppLookDlg::m_wndRoundedTabs

Definition at line 24 of file AppLookDlg.h.

CComboBox CAppLookDlg::m_wndStyle

Definition at line 23 of file AppLookDlg.h.

CComboBox CAppLookDlg::m_wndStyle2007

Definition at line 23 of file AppLookDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/AppLookDlg.h
  • vc2008fp/VisualStudioDemo/AppLookDlg.h
  • vc2008fp/WordPad/AppLookDlg.h
  • vc2008fp/OutlookDemo/AppLookDlg.cpp
  • vc2008fp/VisualStudioDemo/AppLookDlg.cpp
  • vc2008fp/WordPad/AppLookDlg.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CaptureData Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

CaptureData Struct Reference

#include "ScreenCapApi.h"

List of all members.

Public Attributes

BOOL | bCaptureFullScreen
char | szCaptureFilename [MAX_PATH]
char | szCapturePath [MAX_PATH]

Detailed Description

Definition at line 17 of file ScreenCapApi.h.

Member Data Documentation

BOOL CaptureData::bCaptureFullScreen

Definition at line 19 of file ScreenCapApi.h.

char CaptureData::szCaptureFilename[MAX_PATH]

Definition at line 21 of file ScreenCapApi.h.

char CaptureData::szCapturePath[MAX_PATH]

Definition at line 20 of file ScreenCapApi.h.

The documentation for this struct was generated from the following file:
  • advanced/DllScreenCap/DllScreenCap/ScreenCapApi.h
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAutoClickApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CAutoClickApp Class Reference

#include "autoclik.h"

List of all members.

Public Member Functions

CAutoClickApp ()
CAutoClickApp ()
virtual BOOL | InitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
afx_msg void | OnAppAbout ()

Public Attributes

COleTemplateServer | m_server

Detailed Description

Definition at line 23 of file autoclik.h.

Constructor & Destructor Documentation

CAutoClickApp::CAutoClickApp ( )

Definition at line 46 of file autoclik.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

CAutoClickApp::CAutoClickApp ( )

Member Function Documentation

BOOL CAutoClickApp::InitInstance ( ) [virtual]

Definition at line 73 of file autoclik.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_ACLICKTYPE,
    RUNTIME_CLASS(CAutoClickDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CAutoClickView));
  AddDocTemplate(pDocTemplate);

  // Connect the COleTemplateServer to the document template.
  //  The COleTemplateServer creates new documents on behalf
  //  of requesting OLE containers by using information
  //  specified in the document template.

  // DUAL_SUPPORT_START
  // Original Code:
  //     m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
  m_server.ConnectTemplate(CLSID_Document, pDocTemplate, FALSE);
  // DUAL_SUPPORT_END

  // Register all OLE server factories as running.  This enables the
  //  OLE libraries to create objects from other applications.
  COleTemplateServer::RegisterAll();
    // Note: MDI applications register all server objects without regard
    //  to the /Embedding or /Automation on the command line.

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

  // Enable drag/drop open
  m_pMainWnd->DragAcceptFiles();

  // Enable DDE Execute open
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Check to see if launched as OLE server
  if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
  {
    // Application was run with /Embedding or /Automation.  Don't show the
    //  main window in this case.
    return TRUE;
  }

  // When a server application is launched stand-alone, it is a good idea
  //  to update the system registry in case it has been damaged.
  m_server.UpdateRegistry(OAT_DISPATCH_OBJECT);
  COleObjectFactory::UpdateRegistryAll();

  // DUAL_SUPPORT_START
  //    make sure the type library is registerd. Otherwise dual interface won't work!
  AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_ACDual, _T("AutoClik.TLB"));
  // DUAL_SUPPORT_END

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

virtual BOOL CAutoClickApp::InitInstance ( ) [virtual]
afx_msg void CAutoClickApp::OnAppAbout ( )
void CAutoClickApp::OnAppAbout ( )

Definition at line 210 of file autoclik.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

Member Data Documentation

COleTemplateServer CAutoClickApp::m_server

Definition at line 36 of file autoclik.h.

The documentation for this class was generated from the following files:
  • ole/acdual/autoclik.h
  • ole/autoclik/autoclik.h
  • ole/acdual/autoclik.cpp
  • ole/autoclik/autoclik.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAutoClickDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CAutoClickDoc Class Reference

#include "aclikdoc.h"

List of all members.

Public Member Functions

virtual | ~CAutoClickDoc ()
virtual | ~CAutoClickDoc ()
STDMETHOD() | get_Position (THIS_ IDualAutoClickPoint FAR *FAR *retval)
STDMETHOD() | get_text (THIS_ BSTR FAR *retval)
STDMETHOD() | get_x (THIS_ short FAR *retval)
STDMETHOD() | get_y (THIS_ short FAR *retval)
afx_msg LPDISPATCH | GetPosition ()
afx_msg LPDISPATCH | GetPosition ()
afx_msg short | GetX ()
afx_msg short | GetX ()
afx_msg short | GetY ()
afx_msg short | GetY ()
virtual BOOL | OnNewDocument ()
virtual BOOL | OnNewDocument ()
STDMETHOD() | put_Position (THIS_ IDualAutoClickPoint FAR *newPosition)
STDMETHOD() | put_text (THIS_ BSTR newText)
STDMETHOD() | put_x (THIS_ short newX)
STDMETHOD() | put_y (THIS_ short newY)
STDMETHOD() | putref_Position (THIS_ IDualAutoClickPoint FAR *newPosition)
afx_msg void | Refresh ()
afx_msg void | Refresh ()
STDMETHOD() | RefreshWindow (THIS)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)
afx_msg void | SetAllProps (short x, short y, LPCTSTR text)
afx_msg void | SetAllProps (short x, short y, LPCTSTR text)
STDMETHOD() | SetAllProps (THIS_ short x, short y, BSTR text)
afx_msg void | SetPosition (LPDISPATCH newValue)
afx_msg void | SetPosition (LPDISPATCH newValue)
afx_msg void | SetX (short nNewValue)
afx_msg void | SetX (short nNewValue)
afx_msg void | SetY (short nNewValue)
afx_msg void | SetY (short nNewValue)
STDMETHOD() | ShowWindow (THIS)
afx_msg void | ShowWindow ()
afx_msg void | ShowWindow ()
STDMETHOD() | TestError (THIS_ short wCode)
afx_msg void | TestErrorHandler (short wCode)

Public Attributes

CPoint | m_pt
CString | m_str

Protected Member Functions

CAutoClickDoc ()
CAutoClickDoc ()
afx_msg void | OnEditChangetext ()
afx_msg void | OnEditChangetext ()

Detailed Description

Definition at line 13 of file aclikdoc.h.

Constructor & Destructor Documentation

CAutoClickDoc::CAutoClickDoc ( ) [protected]

Definition at line 83 of file aclikdoc.cpp.

{
  EnableAutomation();
  m_pt = CPoint(10, 10);
  m_str = _T("Automation!");

  AfxOleLockApp();
}

CAutoClickDoc::~CAutoClickDoc ( ) [virtual]

Definition at line 92 of file aclikdoc.cpp.

{
  AfxOleUnlockApp();
}

CAutoClickDoc::CAutoClickDoc ( ) [protected]
virtual CAutoClickDoc::~CAutoClickDoc ( ) [virtual]

Member Function Documentation

STDMETHOD() CAutoClickDoc::get_Position ( THIS_ IDualAutoClickPoint FAR *FAR * retval )
STDMETHOD() CAutoClickDoc::get_text ( THIS_ BSTR FAR * retval )
STDMETHOD() CAutoClickDoc::get_x ( THIS_ short FAR * retval )
STDMETHOD() CAutoClickDoc::get_y ( THIS_ short FAR * retval )
afx_msg LPDISPATCH CAutoClickDoc::GetPosition ( )
LPDISPATCH CAutoClickDoc::GetPosition ( )

Definition at line 202 of file aclikdoc.cpp.

{
  CAutoClickPoint* pPos = new CAutoClickPoint;
  pPos->SetClickPoint(m_pt);

  LPDISPATCH lpResult = pPos->GetIDispatch(FALSE);
  return lpResult;
}

short CAutoClickDoc::GetX ( )

Definition at line 158 of file aclikdoc.cpp.

{
  return (short)m_pt.x;
}

afx_msg short CAutoClickDoc::GetX ( )
afx_msg short CAutoClickDoc::GetY ( )
short CAutoClickDoc::GetY ( )

Definition at line 169 of file aclikdoc.cpp.

{
  return (short)m_pt.y;
}

void CAutoClickDoc::OnEditChangetext ( ) [protected]

Definition at line 147 of file aclikdoc.cpp.

{
  CChangeText dlg;
  dlg.m_str = m_str;
  if (dlg.DoModal())
  {
    m_str = dlg.m_str;
    Refresh();
  }
}

afx_msg void CAutoClickDoc::OnEditChangetext ( ) [protected]
BOOL CAutoClickDoc::OnNewDocument ( ) [virtual]

Definition at line 97 of file aclikdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

virtual BOOL CAutoClickDoc::OnNewDocument ( ) [virtual]
STDMETHOD() CAutoClickDoc::put_Position ( THIS_ IDualAutoClickPoint FAR * newPosition )
STDMETHOD() CAutoClickDoc::put_text ( THIS_ BSTR newText )
STDMETHOD() CAutoClickDoc::put_x ( THIS_ short newX )
STDMETHOD() CAutoClickDoc::put_y ( THIS_ short newY )
STDMETHOD() CAutoClickDoc::putref_Position ( THIS_ IDualAutoClickPoint FAR * newPosition )
afx_msg void CAutoClickDoc::Refresh ( )
void CAutoClickDoc::Refresh ( )

Definition at line 108 of file aclikdoc.cpp.

{
  UpdateAllViews(NULL);
  SetModifiedFlag();
}

STDMETHOD() CAutoClickDoc::RefreshWindow ( THIS )
void CAutoClickDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 117 of file aclikdoc.cpp.

{
  if (ar.IsStoring())
  {
    ar << m_pt << m_str;
  }
  else
  {
    ar >> m_pt >> m_str;
  }
}

virtual void CAutoClickDoc::Serialize ( CArchive & ar ) [virtual]
void CAutoClickDoc::SetAllProps | ( | short | x,
 |  | short | y,
 |  | LPCTSTR | text
 | ) |  |

Definition at line 180 of file aclikdoc.cpp.

{
  m_pt.x = x;
  m_pt.y = y;
  m_str = text;
  Refresh();
}

STDMETHOD() CAutoClickDoc::SetAllProps | ( | THIS_ short | x,
 |  | short | y,
 |  | BSTR | text
 | ) |  |
afx_msg void CAutoClickDoc::SetAllProps | ( | short | x,
 |  | short | y,
 |  | LPCTSTR | text
 | ) |  |
afx_msg void CAutoClickDoc::SetPosition ( LPDISPATCH newValue )
void CAutoClickDoc::SetPosition ( LPDISPATCH newValue )

Definition at line 211 of file aclikdoc.cpp.

{
  CAutoClickPoint* pPos = (CAutoClickPoint*)CCmdTarget::FromIDispatch(newValue);
  if (pPos != NULL && pPos->IsKindOf(RUNTIME_CLASS(CAutoClickPoint)))
  {
    m_pt = pPos->GetClickPoint();
    Refresh();
  }
}

afx_msg void CAutoClickDoc::SetX ( short nNewValue )
void CAutoClickDoc::SetX ( short nNewValue )

Definition at line 163 of file aclikdoc.cpp.

{
  m_pt.x = nNewValue;
  Refresh();
}

afx_msg void CAutoClickDoc::SetY ( short nNewValue )
void CAutoClickDoc::SetY ( short nNewValue )

Definition at line 174 of file aclikdoc.cpp.

{
  m_pt.y = nNewValue;
  Refresh();
}

void CAutoClickDoc::ShowWindow ( )

Definition at line 188 of file aclikdoc.cpp.

{
  POSITION pos = GetFirstViewPosition();
  CView* pView = GetNextView(pos);
  if (pView != NULL)
  {
    CFrameWnd* pFrameWnd = pView->GetParentFrame();
    pFrameWnd->ActivateFrame(SW_SHOW);
    pFrameWnd = pFrameWnd->GetParentFrame();
    if (pFrameWnd != NULL)
      pFrameWnd->ActivateFrame(SW_SHOW);
  }
}

STDMETHOD() CAutoClickDoc::ShowWindow ( THIS )
afx_msg void CAutoClickDoc::ShowWindow ( )
STDMETHOD() CAutoClickDoc::TestError ( THIS_ short wCode )
void CAutoClickDoc::TestErrorHandler ( short wCode )

Definition at line 221 of file aclikdoc.cpp.

{
  CString strError;
  strError.Format(IDS_TESTERROR, wCode);
  AfxThrowOleDispatchException((WORD)wCode,
                 strError,
                 (UINT)wCode);
}

Member Data Documentation

CPoint CAutoClickDoc::m_pt

Definition at line 21 of file aclikdoc.h.

CString CAutoClickDoc::m_str

Definition at line 54 of file aclikdoc.h.

The documentation for this class was generated from the following files:
  • ole/acdual/aclikdoc.h
  • ole/autoclik/aclikdoc.h
  • ole/acdual/aclikdoc.cpp
  • ole/autoclik/aclikdoc.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAutoClickPoint Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions

CAutoClickPoint Class Reference

#include "clikpnt.h"

List of all members.

Public Member Functions

STDMETHOD() | get_x (THIS_ short FAR *retval)
STDMETHOD() | get_y (THIS_ short FAR *retval)
CPoint | GetClickPoint ()
CPoint | GetClickPoint ()
virtual void | OnFinalRelease ()
virtual void | OnFinalRelease ()
STDMETHOD() | put_x (THIS_ short newX)
STDMETHOD() | put_y (THIS_ short newY)
void | SetClickPoint (CPoint point)
void | SetClickPoint (CPoint point)

Public Attributes

short | m_x
short | m_y

Protected Member Functions

virtual | ~CAutoClickPoint ()
virtual | ~CAutoClickPoint ()

Private Member Functions

CAutoClickPoint ()
CAutoClickPoint ()

Detailed Description

Definition at line 17 of file clikpnt.h.

Constructor & Destructor Documentation

CAutoClickPoint::CAutoClickPoint ( ) [private]

Definition at line 26 of file clikpnt.cpp.

{
  EnableAutomation();

  // To keep the application running as long as an OLE automation
  //  object is active, the constructor calls AfxOleLockApp.

  AfxOleLockApp();
}

CAutoClickPoint::~CAutoClickPoint ( ) [protected, virtual]

Definition at line 36 of file clikpnt.cpp.

{
  // To terminate the application when all objects created with
  //  with OLE automation, the destructor calls AfxOleUnlockApp.

  AfxOleUnlockApp();
}

CAutoClickPoint::CAutoClickPoint ( ) [private]
virtual CAutoClickPoint::~CAutoClickPoint ( ) [protected, virtual]

Member Function Documentation

STDMETHOD() CAutoClickPoint::get_x ( THIS_ short FAR * retval )
STDMETHOD() CAutoClickPoint::get_y ( THIS_ short FAR * retval )
CPoint CAutoClickPoint::GetClickPoint ( ) [inline]

Definition at line 28 of file clikpnt.h.

{ return CPoint(m_x, m_y); }

CPoint CAutoClickPoint::GetClickPoint ( ) [inline]

Definition at line 28 of file clikpnt.h.

{ return CPoint(m_x, m_y); }

virtual void CAutoClickPoint::OnFinalRelease ( ) [virtual]
void CAutoClickPoint::OnFinalRelease ( ) [virtual]

Definition at line 44 of file clikpnt.cpp.

{
  // When the last reference for an automation object is released
  //  OnFinalRelease is called.  This implementation deletes the
  //  object.  Add additional cleanup required for your object before
  //  deleting it from memory.

  delete this;
}

STDMETHOD() CAutoClickPoint::put_x ( THIS_ short newX )
STDMETHOD() CAutoClickPoint::put_y ( THIS_ short newY )
void CAutoClickPoint::SetClickPoint ( CPoint point ) [inline]

Definition at line 29 of file clikpnt.h.

{ m_x = (short)point.x; m_y = (short)point.y; }

void CAutoClickPoint::SetClickPoint ( CPoint point ) [inline]

Definition at line 29 of file clikpnt.h.

{ m_x = (short)point.x; m_y = (short)point.y; }

Member Data Documentation

short CAutoClickPoint::m_x

Definition at line 51 of file clikpnt.h.

short CAutoClickPoint::m_y

Definition at line 52 of file clikpnt.h.

The documentation for this class was generated from the following files:
  • ole/acdual/clikpnt.h
  • ole/autoclik/clikpnt.h
  • ole/acdual/clikpnt.cpp
  • ole/autoclik/clikpnt.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAutoClickView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CAutoClickView Class Reference

#include "aclikvw.h"

List of all members.

Public Member Functions

virtual | ~CAutoClickView ()
virtual | ~CAutoClickView ()
CAutoClickDoc * GetDocument ()
CAutoClickDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CAutoClickView ()
CAutoClickView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file aclikvw.h.

Constructor & Destructor Documentation

CAutoClickView::CAutoClickView ( ) [protected]

Definition at line 42 of file aclikvw.cpp.

{
  // TODO: add construction code here

}

CAutoClickView::~CAutoClickView ( ) [virtual]

Definition at line 48 of file aclikvw.cpp.

{
}

CAutoClickView::CAutoClickView ( ) [protected]
virtual CAutoClickView::~CAutoClickView ( ) [virtual]

Member Function Documentation

CAutoClickDoc * CAutoClickView::GetDocument ( ) [inline]

Definition at line 57 of file aclikvw.h.

   { return (CAutoClickDoc*)m_pDocument; }

CAutoClickDoc* CAutoClickView::GetDocument ( )
void CAutoClickView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 80 of file aclikvw.cpp.

{
  // TODO: add extra initialization before printing
}

virtual void CAutoClickView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]
virtual void CAutoClickView::OnDraw ( CDC * pDC ) [virtual]
void CAutoClickView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 63 of file aclikvw.cpp.

{
  CAutoClickDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pDC->TextOut(pDoc->m_pt.x, pDoc->m_pt.y, pDoc->m_str);
}

virtual void CAutoClickView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]
void CAutoClickView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 85 of file aclikvw.cpp.

{
  // TODO: add cleanup after printing
}

afx_msg void CAutoClickView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
void CAutoClickView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 114 of file aclikvw.cpp.

{
  CAutoClickDoc* pDoc = GetDocument();
  pDoc->m_pt = point;
  pDoc->Refresh();

  CView::OnLButtonDown(nFlags, point);
}

virtual BOOL CAutoClickView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]
BOOL CAutoClickView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 74 of file aclikvw.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CAutoClickView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 52 of file aclikvw.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

virtual BOOL CAutoClickView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
The documentation for this class was generated from the following files:
  • ole/acdual/aclikvw.h
  • ole/autoclik/aclikvw.h
  • ole/acdual/aclikvw.cpp
  • ole/autoclik/aclikvw.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAutoClik Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CAutoClik Class Reference

#include "autoclik.h"

List of all members.

Public Member Functions

LPDISPATCH | GetPosition ()
LPDISPATCH | GetPosition ()
CString | GetText ()
CString | GetText ()
short | GetX ()
short | GetX ()
short | GetY ()
short | GetY ()
void | RefreshWindow ()
void | RefreshWindow ()
void | SetAllProps (short x, short y, LPCTSTR text)
void | SetAllProps (short x, short y, LPCTSTR text)
void | SetPosition (LPDISPATCH)
void | SetPosition (LPDISPATCH)
void | SetText (LPCTSTR)
void | SetText (LPCTSTR)
void | SetX (short)
void | SetX (short)
void | SetY (short)
void | SetY (short)
void | ShowWindow ()
void | ShowWindow ()

Detailed Description

Definition at line 17 of file autoclik.h.

Member Function Documentation

LPDISPATCH CAutoClik::GetPosition ( )

Definition at line 54 of file autoclik.cpp.

{
  LPDISPATCH result;
  GetProperty(0x4, VT_DISPATCH, (void*)&result);
  return result;
}

LPDISPATCH CAutoClik::GetPosition ( )
CString CAutoClik::GetText ( )

Definition at line 18 of file autoclik.cpp.

{
  CString result;
  GetProperty(0x1, VT_BSTR, (void*)&result);
  return result;
}

CString CAutoClik::GetText ( )
short CAutoClik::GetX ( )

Definition at line 30 of file autoclik.cpp.

{
  short result;
  GetProperty(0x2, VT_I2, (void*)&result);
  return result;
}

short CAutoClik::GetX ( )
short CAutoClik::GetY ( )

Definition at line 42 of file autoclik.cpp.

{
  short result;
  GetProperty(0x3, VT_I2, (void*)&result);
  return result;
}

short CAutoClik::GetY ( )
void CAutoClik::RefreshWindow ( )

Definition at line 69 of file autoclik.cpp.

{
  InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CAutoClik::RefreshWindow ( )
void CAutoClik::SetAllProps | ( | short | x,
 |  | short | y,
 |  | LPCTSTR | text
 | ) |  |

Definition at line 74 of file autoclik.cpp.

{
  static BYTE BASED_CODE parms[] =
    VTS_I2 VTS_I2 VTS_BSTR;
  InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
     x, y, text);
}

void CAutoClik::SetAllProps | ( | short | x,
 |  | short | y,
 |  | LPCTSTR | text
 | ) |  |
void CAutoClik::SetPosition ( LPDISPATCH propVal )

Definition at line 61 of file autoclik.cpp.

{
  SetProperty(0x4, VT_DISPATCH, propVal);
}

void CAutoClik::SetPosition ( LPDISPATCH )
void CAutoClik::SetText ( LPCTSTR propVal )

Definition at line 25 of file autoclik.cpp.

{
  SetProperty(0x1, VT_BSTR, propVal);
}

void CAutoClik::SetText ( LPCTSTR )
void CAutoClik::SetX ( short propVal )

Definition at line 37 of file autoclik.cpp.

{
  SetProperty(0x2, VT_I2, propVal);
}

void CAutoClik::SetX ( short )
void CAutoClik::SetY ( short )
void CAutoClik::SetY ( short propVal )

Definition at line 49 of file autoclik.cpp.

{
  SetProperty(0x3, VT_I2, propVal);
}

void CAutoClik::ShowWindow ( )

Definition at line 82 of file autoclik.cpp.

{
  InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CAutoClik::ShowWindow ( )
The documentation for this class was generated from the following files:
  • ole/acdual/acdualdriv/autoclik.h
  • ole/autoclik/autodriv/autoclik.h
  • ole/acdual/acdualdriv/autoclik.cpp
  • ole/autoclik/autodriv/autoclik.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAutoDrivApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CAutoDrivApp Class Reference

#include "autodriv.h"

List of all members.

Public Member Functions

CAutoDrivApp ()
CAutoDrivApp ()
virtual BOOL | InitInstance ()
virtual BOOL | InitInstance ()

Detailed Description

Definition at line 23 of file autodriv.h.

Constructor & Destructor Documentation

CAutoDrivApp::CAutoDrivApp ( )

Definition at line 36 of file autodriv.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

CAutoDrivApp::CAutoDrivApp ( )

Member Function Documentation

BOOL CAutoDrivApp::InitInstance ( ) [virtual]

Definition at line 50 of file autodriv.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  CAutoDrivDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int)dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

virtual BOOL CAutoDrivApp::InitInstance ( ) [virtual]
The documentation for this class was generated from the following files:
  • ole/acdual/acdualdriv/autodriv.h
  • ole/autoclik/autodriv/autodriv.h
  • ole/acdual/acdualdriv/autodriv.cpp
  • ole/autoclik/autodriv/autodriv.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CAutoDrivDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CAutoDrivDlg Class Reference

#include "autoddlg.h"

List of all members.

Public Types

enum | { IDD = IDD_AUTODRIV_DIALOG }
enum | { IDD = IDD_AUTODRIV_DIALOG }

Public Member Functions

CAutoDrivDlg (CWnd *pParent=NULL)
CAutoDrivDlg (CWnd *pParent=NULL)

Public Attributes

BOOL | m_bUseDispatch
CString | m_szText
int | m_x
int | m_y

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAnimatePos ()
afx_msg void | OnAnimatePos ()
afx_msg void | OnAnimateXY ()
afx_msg void | OnAnimateXY ()
afx_msg void | OnClose ()
afx_msg void | OnClose ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnGetAll ()
afx_msg void | OnGetAll ()
afx_msg void | OnGetPosition ()
afx_msg void | OnGetPosition ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnRefresh ()
afx_msg void | OnRefresh ()
afx_msg void | OnSetAll ()
afx_msg void | OnSetAll ()
afx_msg void | OnSetPosition ()
afx_msg void | OnSetPosition ()
afx_msg void | OnSetText ()
afx_msg void | OnSetText ()
afx_msg void | OnSetX ()
afx_msg void | OnSetX ()
afx_msg void | OnSetY ()
afx_msg void | OnSetY ()
afx_msg void | OnUseDispatch ()

Protected Attributes

CAutoClik m_autoClikObject
HICON | m_hIcon
IDualAClick * | m_pDualAutoClikObject

Detailed Description

Definition at line 15 of file autoddlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file autoddlg.h.

{ IDD = IDD_AUTODRIV_DIALOG };

anonymous enum
Enumerator:
IDD

Definition at line 23 of file autoddlg.h.

{ IDD = IDD_AUTODRIV_DIALOG };

Constructor & Destructor Documentation

CAutoDrivDlg::CAutoDrivDlg ( CWnd * pParent = NULL )

Definition at line 27 of file autoddlg.cpp.

  : CDialog(CAutoDrivDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CAutoDrivDlg)
  m_szText = _T("");
  m_x = 0;
  m_y = 0;
  m_bUseDispatch = TRUE;
  //}}AFX_DATA_INIT
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

  m_pDualAutoClikObject = NULL;
}

CAutoDrivDlg::CAutoDrivDlg ( CWnd * pParent = NULL )

Member Function Documentation

void CAutoDrivDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 43 of file autoddlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CAutoDrivDlg)
  DDX_Text(pDX, IDC_EDITTEXT, m_szText);
  DDX_Text(pDX, IDC_EDITX, m_x);
  DDX_Text(pDX, IDC_EDITY, m_y);
  DDX_Check(pDX, IDC_USEDISPATCH, m_bUseDispatch);
  //}}AFX_DATA_MAP
}

virtual void CAutoDrivDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
void CAutoDrivDlg::OnAnimatePos ( ) [protected]

Definition at line 179 of file autoddlg.cpp.

{
  if (m_bUseDispatch)
  {
    CClikPoint point;
    LPDISPATCH lpPointDispatch = m_autoClikObject.GetPosition();

    point.AttachDispatch(lpPointDispatch);
    for (short i = 10; i <= 100; i += 5)
    {
      point.SetX(i);
      point.SetY(i);
      m_autoClikObject.SetPosition(lpPointDispatch);
    }
  }
  else
  {
    ENSURE(m_pDualAutoClikObject != NULL);
    IDualAutoClickPoint* lpPoint = NULL;
    m_pDualAutoClikObject->get_Position(&lpPoint);
    if (lpPoint)
    {
      for (short i = 10; i <= 100; i += 5)
      {
        lpPoint->put_x(i);
        lpPoint->put_y(i);
        m_pDualAutoClikObject->put_Position(lpPoint);
      }
      lpPoint->Release();
    }
  }
}

afx_msg void CAutoDrivDlg::OnAnimatePos ( ) [protected]
void CAutoDrivDlg::OnAnimateXY ( ) [protected]

Definition at line 158 of file autoddlg.cpp.

{
  if (m_bUseDispatch)
  {
    for (short i = 10; i <= 100; i += 5)
    {
      m_autoClikObject.SetX(i);
      m_autoClikObject.SetY(i);
    }
  }
  else
  {
    ENSURE(m_pDualAutoClikObject != NULL);
    for (short i = 10; i <= 100; i += 5)
    {
      m_pDualAutoClikObject->put_x(i);
      m_pDualAutoClikObject->put_y(i);
    }
  }
}

afx_msg void CAutoDrivDlg::OnAnimateXY ( ) [protected]
void CAutoDrivDlg::OnClose ( ) [protected]

Definition at line 148 of file autoddlg.cpp.

{
  if (m_pDualAutoClikObject)
  {
    m_pDualAutoClikObject->Release();
    m_pDualAutoClikObject = NULL;
  }
  EndDialog(0);
}

afx_msg void CAutoDrivDlg::OnClose ( ) [protected]
afx_msg int CAutoDrivDlg::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int CAutoDrivDlg::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 127 of file autoddlg.cpp.

{
  if (CDialog::OnCreate(lpCreateStruct) == -1)
    return -1;  // fail

  if (!m_autoClikObject.CreateDispatch(_T("ACDual.Document")))
  {
    AfxMessageBox(IDP_CANNOT_CREATE_AUTOCLIK);
    return -1;  // fail
  }

  // Get the custom interface corresponding to this dispatch object
  ASSERT(m_pDualAutoClikObject == NULL);
  m_autoClikObject.m_lpDispatch->QueryInterface(IID_IDualAClick,
                          (LPVOID*)&m_pDualAutoClikObject);

  m_autoClikObject.ShowWindow();

  return 0;   // success
}

afx_msg void CAutoDrivDlg::OnGetAll ( ) [protected]
void CAutoDrivDlg::OnGetAll ( ) [protected]

Definition at line 315 of file autoddlg.cpp.

{
  if (m_bUseDispatch)
  {
    m_x = m_autoClikObject.GetX();
    m_y = m_autoClikObject.GetY();
    m_szText = m_autoClikObject.GetText();
  }
  else
  {
    ENSURE(m_pDualAutoClikObject != NULL);
    short x, y;
    m_pDualAutoClikObject->get_x(&x); m_x = x;
    m_pDualAutoClikObject->get_y(&y); m_y = y;

    BSTR bstrText;
    m_pDualAutoClikObject->get_text(&bstrText);
    m_szText = bstrText;
    ::SysFreeString(bstrText);
  }

  UpdateData(FALSE);
}

void CAutoDrivDlg::OnGetPosition ( ) [protected]

Definition at line 339 of file autoddlg.cpp.

{
  if (m_bUseDispatch)
  {
    CClikPoint point;
    point.AttachDispatch(m_autoClikObject.GetPosition());

    m_x = point.GetX();
    m_y = point.GetY();
  }
  else
  {
    ENSURE(m_pDualAutoClikObject != NULL);
    IDualAutoClickPoint* lpPoint = NULL;
    m_pDualAutoClikObject->get_Position(&lpPoint);
    if (lpPoint)
    {
      short x, y;
      lpPoint->get_x(&x); m_x = x;
      lpPoint->get_y(&y); m_y = y;
      lpPoint->Release();
    }
  }
  UpdateData(FALSE);
}

afx_msg void CAutoDrivDlg::OnGetPosition ( ) [protected]
virtual BOOL CAutoDrivDlg::OnInitDialog ( ) [protected, virtual]
BOOL CAutoDrivDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 77 of file autoddlg.cpp.

{
  if (!m_pDualAutoClikObject)
  {
    m_bUseDispatch = TRUE;
    GetDlgItem(IDC_USEDISPATCH)->EnableWindow(FALSE);
  }

  CDialog::OnInitDialog();
  CenterWindow();

  return TRUE;  // return TRUE  unless you set the focus to a control
}

afx_msg void CAutoDrivDlg::OnPaint ( ) [protected]
void CAutoDrivDlg::OnPaint ( ) [protected]

Definition at line 95 of file autoddlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

afx_msg HCURSOR CAutoDrivDlg::OnQueryDragIcon ( ) [protected]
HCURSOR CAutoDrivDlg::OnQueryDragIcon ( ) [protected]

Definition at line 122 of file autoddlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

afx_msg void CAutoDrivDlg::OnRefresh ( ) [protected]
void CAutoDrivDlg::OnRefresh ( ) [protected]

Definition at line 302 of file autoddlg.cpp.

{
  if (m_bUseDispatch)
  {
    m_autoClikObject.RefreshWindow();
  }
  else
  {
    ENSURE(m_pDualAutoClikObject != NULL);
    m_pDualAutoClikObject->RefreshWindow();
  }
}

void CAutoDrivDlg::OnSetAll ( ) [protected]

Definition at line 212 of file autoddlg.cpp.

{
  UpdateData(TRUE);

  if (m_bUseDispatch)
  {
    m_autoClikObject.SetAllProps((short)m_x, (short)m_y, m_szText);
  }
  else
  {
    ASSERT(m_pDualAutoClikObject != NULL);
    m_pDualAutoClikObject->SetAllProps((short)m_x, (short)m_y,
                       m_szText.AllocSysString());
  }

}

afx_msg void CAutoDrivDlg::OnSetAll ( ) [protected]
void CAutoDrivDlg::OnSetPosition ( ) [protected]

Definition at line 229 of file autoddlg.cpp.

{
  if (m_bUseDispatch)
  {
    CClikPoint point;
    point.AttachDispatch(m_autoClikObject.GetPosition());

    UpdateData(TRUE);
    point.SetX((short)m_x);
    point.SetY((short)m_y);
    m_autoClikObject.SetPosition(point.m_lpDispatch);
  }
  else
  {
    ENSURE(m_pDualAutoClikObject != NULL);
    IDualAutoClickPoint* lpPoint = NULL;
    m_pDualAutoClikObject->get_Position(&lpPoint);
    if (lpPoint)
    {
      UpdateData(TRUE);
      lpPoint->put_x((short)m_x);
      lpPoint->put_y((short)m_y);
      m_pDualAutoClikObject->put_Position(lpPoint);
      lpPoint->Release();
    }
  }
}

afx_msg void CAutoDrivDlg::OnSetPosition ( ) [protected]
void CAutoDrivDlg::OnSetText ( ) [protected]

Definition at line 257 of file autoddlg.cpp.

{
  UpdateData(TRUE);

  if (m_bUseDispatch)
  {
    m_autoClikObject.SetText(m_szText);
  }
  else
  {
    ASSERT(m_pDualAutoClikObject != NULL);
    m_pDualAutoClikObject->put_text(m_szText.AllocSysString());
  }
}

afx_msg void CAutoDrivDlg::OnSetText ( ) [protected]
afx_msg void CAutoDrivDlg::OnSetX ( ) [protected]
void CAutoDrivDlg::OnSetX ( ) [protected]

Definition at line 272 of file autoddlg.cpp.

{
  UpdateData(TRUE);

  if (m_bUseDispatch)
  {
    m_autoClikObject.SetX((short)m_x);
  }
  else
  {
    ASSERT(m_pDualAutoClikObject != NULL);
    m_pDualAutoClikObject->put_x((short)m_x);
  }
}

void CAutoDrivDlg::OnSetY ( ) [protected]

Definition at line 287 of file autoddlg.cpp.

{
  UpdateData(TRUE);

  if (m_bUseDispatch)
  {
    m_autoClikObject.SetY((short)m_y);
  }
  else
  {
    ASSERT(m_pDualAutoClikObject != NULL);
    m_pDualAutoClikObject->put_y((short)m_y);
  }
}

afx_msg void CAutoDrivDlg::OnSetY ( ) [protected]
void CAutoDrivDlg::OnUseDispatch ( ) [protected]

Definition at line 365 of file autoddlg.cpp.

{
  UpdateData(TRUE);
}

Member Data Documentation

CAutoClik CAutoDrivDlg::m_autoClikObject [protected]

Definition at line 39 of file autoddlg.h.

BOOL CAutoDrivDlg::m_bUseDispatch

Definition at line 27 of file autoddlg.h.

HICON CAutoDrivDlg::m_hIcon [protected]

Definition at line 38 of file autoddlg.h.

IDualAClick* CAutoDrivDlg::m_pDualAutoClikObject [protected]

Definition at line 40 of file autoddlg.h.

CString CAutoDrivDlg::m_szText

Definition at line 24 of file autoddlg.h.

int CAutoDrivDlg::m_x

Definition at line 25 of file autoddlg.h.

int CAutoDrivDlg::m_y

Definition at line 26 of file autoddlg.h.

The documentation for this class was generated from the following files:
  • ole/acdual/acdualdriv/autoddlg.h
  • ole/autoclik/autodriv/autoddlg.h
  • ole/acdual/acdualdriv/autoddlg.cpp
  • ole/autoclik/autodriv/autoddlg.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBallThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CBallThread Class Reference

#include "threads.h"

Inherits CGDIThread.

List of all members.

Public Member Functions

CBallThread (CWnd *pWnd, HDC hDC, CPoint ptPos, CPoint ptVel, CSize Size, COLORREF color)
virtual BOOL | InitInstance ()
virtual void | SingleStep ()

Public Attributes

CBrush | m_brush
HBRUSH | m_hBrush
CPoint | m_ptVelocity
CRect | m_rectPosition

Protected Member Functions

virtual | ~CBallThread ()

Detailed Description

Definition at line 65 of file threads.h.

Constructor & Destructor Documentation

CBallThread::CBallThread | ( | CWnd * | pWnd,
 |  | HDC | hDC,
 |  | CPoint | ptPos,
 |  | CPoint | ptVel,
 |  | CSize | Size,
 |  | COLORREF | color
 | ) |  |

Definition at line 133 of file threads.cpp.

  : CGDIThread(pWnd,hDC)
{
  m_rectPosition.SetRect(ptPos.x,ptPos.y,ptPos.x+Size.cx,ptPos.y+Size.cx);
  m_ptVelocity = ptVel;

  CBrush brush(color);
  m_hBrush = (HBRUSH)brush.Detach();
}

virtual CBallThread::~CBallThread ( ) [inline, protected, virtual]

Definition at line 91 of file threads.h.

{};

Member Function Documentation

BOOL CBallThread::InitInstance ( ) [virtual]

Reimplemented from CGDIThread.

Definition at line 151 of file threads.cpp.

{
  m_brush.Attach(m_hBrush);

  return CGDIThread::InitInstance();
}

void CBallThread::SingleStep ( ) [virtual]

Implements CGDIThread.

Definition at line 158 of file threads.cpp.

{
  m_rectPosition.OffsetRect(m_ptVelocity);

  if (m_rectPosition.top<m_rectBorder.top)
    m_ptVelocity.y = (m_ptVelocity.y>0) ? m_ptVelocity.y : -m_ptVelocity.y;

  if (m_rectPosition.bottom>m_rectBorder.bottom)
    m_ptVelocity.y = (m_ptVelocity.y>0) ? -m_ptVelocity.y : m_ptVelocity.y;

  if (m_rectPosition.left<m_rectBorder.left)
    m_ptVelocity.x = (m_ptVelocity.x>0) ? m_ptVelocity.x : -m_ptVelocity.x;

  if (m_rectPosition.right>m_rectBorder.right)
    m_ptVelocity.x = (m_ptVelocity.x>0) ? -m_ptVelocity.x : m_ptVelocity.x;

  // Since all threads share the same HDC it is necessary
  // to block all other threads while we render in the HDC
  EnterCriticalSection(&CGDIThread::m_csGDILock);
  {
    CBrush* oldbrush;

    oldbrush = m_dc.SelectObject(&m_brush);
    m_dc.Ellipse(m_rectPosition);
    m_dc.SelectObject(oldbrush);

    // Win32 optimizes GDI calls by collecting them in a batch
    // and then thunking the whole batch at once on a per
    // thread basis.  Since we share an HDC with multiple
    // threads, we must flush the batch before yielding to
    // other threads that will adjust the HDC.  To see what
    // I mean, comment out the GdiFlush() function call and
    // watch the results.
    GdiFlush();
  }
  LeaveCriticalSection(&CGDIThread::m_csGDILock);
}

Member Data Documentation

CBrush CBallThread::m_brush

Definition at line 77 of file threads.h.

HBRUSH CBallThread::m_hBrush

Definition at line 76 of file threads.h.

CPoint CBallThread::m_ptVelocity

Definition at line 75 of file threads.h.

CRect CBallThread::m_rectPosition

Definition at line 74 of file threads.h.

The documentation for this class was generated from the following files:
  • advanced/mtgdi/threads.h
  • advanced/mtgdi/threads.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBasePiece Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CBasePiece Class Reference

#include "piece.h"

Inherited by CWheel.

List of all members.

Public Member Functions

CBasePiece (COLORREF co, bool bIsWheel=false)
virtual void | AdvanceTrace (CPoint &ptContact, double &dAngle, double &dAngleExtra, bool bMove=true)=0
virtual void | Draw (CDC *pDC, long nZoomNumer, long nZoomDenom) const =0
virtual void | GetBoundingRect (CSpiroRect *prect, long nZoomNumer, long nZoomDenom) const =0
virtual void | GetContactPosition (CPoint poing, long nZoomNumer, long nZoomDenom, CPoint &ptContact, double &dAngle)=0
virtual long | GetCycleError () const =0
virtual void | GetDevPieceRgn (CDC *pDC, CRgn *pRgn, long nZoomNumer, long nZoomDenom, bool bInflate) const =0
virtual double | GetFigData () const =0
virtual void | GetLogPieceRgn (CRgn *pRgn, long nZoomNumer, long nZoomDenom) const =0
virtual void | GetPenLocation (CPoint *pPoint) const =0
virtual void | GetPenRect (CRect *pRect) const =0
virtual double | GetPerimeter () const =0
virtual int | HitTest (CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom) const =0
virtual bool | IsWheel () const
virtual void | MovePiece (CSpiroView *pView, CPoint point, double dWheelData, long nZoomNumer, long nZoomDenom)=0
virtual bool | ReverseWheelDirection () const =0
virtual void | SetAngleDelta (long nDistance, bool bReverse)=0
virtual void | SetFigData (double dData)=0
virtual bool | SetPenLocation (CSpiroView *pView, CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom)=0
virtual void | SetPosition (CPoint pt)=0
virtual void | SetPosition (CPoint pt, double dAngle)=0
virtual void | SetWheelMode (bool bWheel=true)=0

Public Attributes

bool | m_bIsWheel
COLORREF | m_co
int | m_icoCurrent
int | m_nColorCount
CPoint | m_ptPos
COLORREF | m_rgCo [6]

Detailed Description

Definition at line 98 of file piece.h.

Constructor & Destructor Documentation

CBasePiece::CBasePiece | ( | COLORREF | co,
 |  | bool | bIsWheel = false
 | ) |  |

Definition at line 142 of file piece.cpp.

                                                 :
            m_ptPos(0, 0)
{
  m_co = co;
  m_bIsWheel = bIsWheel;
  m_nColorCount = 1;
  m_icoCurrent = -1;
  memset(m_rgCo, 0, sizeof(m_rgCo));   // the current color is black, which is 0 anyway
}

Member Function Documentation

virtual void CBasePiece::AdvanceTrace | ( | CPoint & | ptContact,
 |  | double & | dAngle,
 |  | double & | dAngleExtra,
 |  | bool | bMove = true |
 | ) |  |  | [pure virtual]

Implemented in CWheel, and CRing.

virtual void CBasePiece::Draw | ( | CDC * | pDC,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [pure virtual]

Implemented in CWheel, and CRing.

virtual void CBasePiece::GetBoundingRect | ( | CSpiroRect * | prect,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [pure virtual]

Implemented in CWheel.

virtual void CBasePiece::GetContactPosition | ( | CPoint | poing,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom,
 |  | CPoint & | ptContact,
 |  | double & | dAngle |
 | ) |  |  | [pure virtual]

Implemented in CWheel, and CRing.

virtual long CBasePiece::GetCycleError ( ) const [pure virtual]

Implemented in CWheel, and CRing.

virtual void CBasePiece::GetDevPieceRgn | ( | CDC * | pDC,
 |  | CRgn * | pRgn,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom,
 |  | bool | bInflate |
 | ) |  |  | const [pure virtual]

Implemented in CWheel, and CRing.

virtual double CBasePiece::GetFigData ( ) const [pure virtual]

Implemented in CWheel.

virtual void CBasePiece::GetLogPieceRgn | ( | CRgn * | pRgn,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [pure virtual]

Implemented in CWheel, and CRing.

virtual void CBasePiece::GetPenLocation ( CPoint * pPoint ) const [pure virtual]

Implemented in CWheel.

virtual void CBasePiece::GetPenRect ( CRect * pRect ) const [pure virtual]

Implemented in CWheel.

virtual double CBasePiece::GetPerimeter ( ) const [pure virtual]

Implemented in CWheel, and CRing.

virtual int CBasePiece::HitTest | ( | CDC * | pDC,
 |  | CPoint | point,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [pure virtual]

Implemented in CWheel.

virtual bool CBasePiece::IsWheel ( ) const [inline, virtual]

Definition at line 116 of file piece.h.

{return m_bIsWheel;}

virtual void CBasePiece::MovePiece | ( | CSpiroView * | pView,
 |  | CPoint | point,
 |  | double | dWheelData,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | [pure virtual]

Implemented in CWheel.

virtual bool CBasePiece::ReverseWheelDirection ( ) const [pure virtual]

Implemented in CWheel, and CRing.

virtual void CBasePiece::SetAngleDelta | ( | long | nDistance,
 |  | bool | bReverse |
 | ) |  |  | [pure virtual]

Implemented in CWheel, and CRing.

virtual void CBasePiece::SetFigData ( double dData ) [pure virtual]

Implemented in CWheel.

virtual bool CBasePiece::SetPenLocation | ( | CSpiroView * | pView,
 |  | CDC * | pDC,
 |  | CPoint | point,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | [pure virtual]

Implemented in CWheel.

virtual void CBasePiece::SetPosition ( CPoint pt ) [pure virtual]

Implemented in CWheel.

virtual void CBasePiece::SetPosition | ( | CPoint | pt,
 |  | double | dAngle |
 | ) |  |  | [pure virtual]

Implemented in CWheel.

virtual void CBasePiece::SetWheelMode ( bool bWheel = true ) [pure virtual]

Implemented in CWheel.

Member Data Documentation

bool CBasePiece::m_bIsWheel

Definition at line 103 of file piece.h.

COLORREF CBasePiece::m_co

Definition at line 101 of file piece.h.

int CBasePiece::m_icoCurrent

Definition at line 106 of file piece.h.

int CBasePiece::m_nColorCount

Definition at line 105 of file piece.h.

CPoint CBasePiece::m_ptPos

Definition at line 102 of file piece.h.

COLORREF CBasePiece::m_rgCo[6]

Definition at line 104 of file piece.h.

The documentation for this class was generated from the following files:
  • general/spiro/piece.h
  • general/spiro/piece.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBigIcon Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CBigIcon Class Reference

#include "aboutbox.h"

List of all members.

Public Member Functions

void | SizeToContent ()
void | SizeToContent ()
void | SizeToContent ()

Public Attributes

CBitmap | m_bitmap
CSize | m_sizeBitmap

Protected Member Functions

virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Detailed Description

Definition at line 17 of file aboutbox.h.

Member Function Documentation

void CBigIcon::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [protected, virtual]

Definition at line 162 of file aboutbox.cpp.

{
  CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
  ASSERT(pDC != NULL);

  CRect rect;
  GetClientRect(rect);
  int cxClient = rect.Width();
  int cyClient = rect.Height();

  // load icon
  HICON hicon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  if (hicon == NULL)
    return;

  // draw icon into off-screen bitmap
  int cxIcon = ::GetSystemMetrics(SM_CXICON);
  int cyIcon = ::GetSystemMetrics(SM_CYICON);

  CBitmap bitmap;
  if (!bitmap.CreateCompatibleBitmap(pDC, cxIcon, cyIcon))
    return;
  CDC dcMem;
  if (!dcMem.CreateCompatibleDC(pDC))
    return;
  CBitmap* pBitmapOld = dcMem.SelectObject(&bitmap);
  if (pBitmapOld == NULL)
    return;

  // blt the bits already on the window onto the off-screen bitmap
  dcMem.StretchBlt(0, 0, cxIcon, cyIcon, pDC,
    2, 2, cxClient-CX_SHADOW-4, cyClient-CY_SHADOW-4, SRCCOPY);

  // draw the icon on the background
  dcMem.DrawIcon(0, 0, hicon);

  // draw border around icon
  CPen pen;
  pen.CreateStockObject(BLACK_PEN);
  ENSURE(pDC != NULL);
  CPen* pPenOld = pDC->SelectObject(&pen);
  pDC->Rectangle(0, 0, cxClient-CX_SHADOW, cyClient-CY_SHADOW);
  if (pPenOld)
    pDC->SelectObject(pPenOld);

  // draw shadows around icon
  CBrush br;
  br.CreateStockObject(DKGRAY_BRUSH);
  rect.SetRect(cxClient-CX_SHADOW, CY_SHADOW, cxClient, cyClient);
  pDC->FillRect(rect, &br);
  rect.SetRect(CX_SHADOW, cyClient-CY_SHADOW, cxClient, cyClient);
  pDC->FillRect(rect, &br);

  // draw the icon contents
  pDC->StretchBlt(2, 2, cxClient-CX_SHADOW-4, cyClient-CY_SHADOW-4,
    &dcMem, 0, 0, cxIcon, cyIcon, SRCCOPY);

  dcMem.DeleteDC();

}

virtual void CBigIcon::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [protected, virtual]
virtual void CBigIcon::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [protected, virtual]
afx_msg BOOL CBigIcon::OnEraseBkgnd ( CDC * pDC ) [protected]
afx_msg BOOL CBigIcon::OnEraseBkgnd ( CDC * pDC ) [protected]
BOOL CBigIcon::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 223 of file aboutbox.cpp.

{
  return TRUE;    // we don't do any erasing...
}

void CBigIcon::SizeToContent ( )
void CBigIcon::SizeToContent ( )

Definition at line 151 of file aboutbox.cpp.

{
  // get system icon size
  int cxIcon = ::GetSystemMetrics(SM_CXICON);
  int cyIcon = ::GetSystemMetrics(SM_CYICON);

  // a big icon should be twice the size of an icon + shadows
  SetWindowPos(NULL, 0, 0, cxIcon*2 + CX_SHADOW + 4, cyIcon*2 + CY_SHADOW + 4,
    SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
}

void CBigIcon::SizeToContent ( )

Member Data Documentation

CBitmap CBigIcon::m_bitmap

Definition at line 19 of file splash.h.

CSize CBigIcon::m_sizeBitmap

Definition at line 20 of file splash.h.

The documentation for this class was generated from the following files:
  • ole/superpad/aboutbox.h
  • ole/wordpad/splash.h
  • vc2008fp/WordPad/splash.h
  • ole/superpad/aboutbox.cpp
  • ole/wordpad/splash.cpp
  • vc2008fp/WordPad/splash.cpp
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBitmapProperty Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CBitmapProperty Class Reference

#include "bmpprop.h"

List of all members.

Public Types

enum DLState {
dlNone, dlFileHeader, dlInfoHeader, dlColorTable,
dlDone
}

Public Member Functions

CBitmapProperty (COleControl *pControl=NULL)
virtual | ~CBitmapProperty ()
int | ReadArray (DWORD &rdwSize, void **pb, int cElem, int cMax)
BOOL | ReadStruct (DWORD &rdwSize, void *pb, int cLen)
virtual void | ResetData ()

Public Attributes

CBitmap | m_Bitmap
CSize | m_BitmapSize
BITMAPINFO256 m_bmInfo
CMemFile | m_CacheFile
DWORD | m_cbRead
enum CBitmapProperty::DLState | m_dlState
int | m_nScanLine

Protected Member Functions

virtual void | OnDataAvailable (DWORD dwSize, DWORD bscfFlag)

Detailed Description

Definition at line 20 of file bmpprop.h.

Member Enumeration Documentation

enum CBitmapProperty::DLState
Enumerator:
dlNone
dlFileHeader
dlInfoHeader
dlColorTable
dlDone

Definition at line 33 of file bmpprop.h.

  {
    dlNone,
    dlFileHeader,
    dlInfoHeader,
    dlColorTable,
    dlDone
  } m_dlState;

Constructor & Destructor Documentation

CBitmapProperty::CBitmapProperty ( COleControl * pControl = NULL )

Definition at line 28 of file bmpprop.cpp.

                                                      : CDataPathProperty(pControl),
  m_dlState(dlNone)
{
}

CBitmapProperty::~CBitmapProperty ( ) [virtual]

Definition at line 33 of file bmpprop.cpp.

{
}

Member Function Documentation

void CBitmapProperty::OnDataAvailable | ( | DWORD | dwSize,
 |  | DWORD | bscfFlag |
 | ) |  |  | [protected, virtual]

Definition at line 49 of file bmpprop.cpp.

{
  if (bscfFlag & BSCF_FIRSTDATANOTIFICATION)
    ResetData();

  CDataPathProperty::OnDataAvailable(dwSize, bscfFlag);

  if (dwSize <= m_cbRead)
    return;
  else
    dwSize -= m_cbRead;
  m_cbRead += dwSize;

  BOOL bContinue = m_dlState != dlDone;
  while (bContinue)
  {
    switch (m_dlState)
    {
    case dlNone:
      // Try to read the bitmapfileheader.
      {
        BITMAPFILEHEADER bmfh;
        if (ReadStruct(dwSize, &bmfh, sizeof(bmfh)))
        {
          ASSERT(bmfh.bfType == ('B' | ('M' << 8)));
          m_dlState = dlFileHeader;
        }
        else
        {
          bContinue = FALSE;
          break;
        }
      }
      break;

    case dlFileHeader:
      // Try to read the bitmapinfoheader.
      if (ReadStruct(dwSize, &m_bmInfo.bmiHeader, sizeof(m_bmInfo.bmiHeader)))
      {
        // Now we know the image size.
        m_BitmapSize.cx = m_bmInfo.bmiHeader.biWidth;
        m_BitmapSize.cy = m_bmInfo.bmiHeader.biHeight;
        ASSERT_KINDOF(CImageCtrl, GetControl());
        ((CImageCtrl*)GetControl())->InformSize();

        m_dlState = dlInfoHeader;
      }
      else
      {
        bContinue = FALSE;
        break;
      }
      break;

    case dlInfoHeader:
      // Read the color table.
      if (ReadStruct(dwSize, &m_bmInfo.bmiColors,
        sizeof(RGBQUAD) * ((int)(1 << m_bmInfo.bmiHeader.biBitCount))))
      {
        // Create the bitmap.
        CWindowDC screenDC(NULL);
        m_Bitmap.CreateCompatibleBitmap(&screenDC, m_BitmapSize.cx, m_BitmapSize.cy);

        m_dlState =  dlColorTable;
      }
      else
      {
        bContinue = FALSE;
        break;
      }
      break;

    case dlColorTable:
      // Read some pels.
      {
        BYTE* pb = NULL;
        int nLines = ReadArray(dwSize, (void **)&pb,
          ((((m_bmInfo.bmiHeader.biBitCount * m_BitmapSize.cx) + 31) / 32) * 4),
            m_BitmapSize.cy - m_nScanLine);
        if (nLines > 0)
        {
          CWindowDC screenDC(NULL);
          CDC dc;
          dc.CreateCompatibleDC(&screenDC);
          CBitmap* pBitmap;

          pBitmap = dc.SelectObject(&m_Bitmap);
          SetDIBits(dc.m_hDC, (HBITMAP)m_Bitmap.m_hObject, m_nScanLine, nLines,
                 pb, &m_bmInfo, DIB_RGB_COLORS);

          m_nScanLine += nLines;
          GetControl()->InvalidateControl(NULL);
        }
        else
        {
          bContinue = FALSE;
          break;
        }

        delete [] pb;

        if (m_nScanLine == m_BitmapSize.cy)
          m_dlState = dlDone;
      }
      break;
    }; //switch

    bContinue = bContinue && (m_dlState != dlDone);
  } //while

  ASSERT_KINDOF(CImageCtrl, GetControl());
  ((CImageCtrl*)GetControl())->InformDlStatus(m_dlState);
}

int CBitmapProperty::ReadArray | ( | DWORD & | rdwSize,
 |  | void ** | pb,
 |  | int | cElem,
 |  | int | cMax
 | ) |  |

Definition at line 228 of file bmpprop.cpp.

{
  // Cache contents.
  AfxTransferFileContent(this, &m_CacheFile, rdwSize);
  rdwSize = 0;
  int nElems = 0;

  // Do we have enough data yet?
#pragma warning(disable:4244)
  int cCache = m_CacheFile.GetLength();
#pragma warning(default:4244)
  if (cCache >= cElem)
  {
    m_CacheFile.SeekToBegin();

    nElems = min(cCache / cElem, cMax);
    int cSize = nElems * cElem;
    ASSERT(cSize <= cCache);

    *pb = new BYTE[cSize];
    ASSERT(m_CacheFile.Read(*pb, cSize) == (UINT)cSize);

    // Is there more?
    if (cCache > cSize)
    {
      CMemFile memFile;
      AfxTransferFileContent(&m_CacheFile, &memFile, cCache - cSize);
      m_CacheFile.SetLength(0);
      memFile.SeekToBegin();
      AfxTransferFileContent(&memFile, &m_CacheFile, cCache - cSize);
    }
    else
    {
      m_CacheFile.SetLength(0);
    }
  }

  return nElems;
}

BOOL CBitmapProperty::ReadStruct | ( | DWORD & | rdwSize,
 |  | void * | pb,
 |  | int | cLen
 | ) |  |

Definition at line 191 of file bmpprop.cpp.

{
  // Cache contents.
  AfxTransferFileContent(this, &m_CacheFile, rdwSize);
  rdwSize = 0;

  // Do we have enough data yet?
#pragma warning(disable:4244)
  int cCache = m_CacheFile.GetLength();
  if (cCache >= cLen)
  {
    m_CacheFile.SeekToBegin();
    VERIFY(m_CacheFile.Read(pb, cLen) == (UINT)cLen);

    // Is there more?
    if (cCache > cLen)
    {
      CMemFile memFile;
      AfxTransferFileContent(&m_CacheFile, &memFile, cCache - cLen);
      m_CacheFile.SetLength(0);
      memFile.SeekToBegin();
      AfxTransferFileContent(&memFile, &m_CacheFile, cCache - cLen);
    }
    else
    {
      m_CacheFile.SetLength(0);
    }

    return TRUE;
  }
  else
  {
    return FALSE;
  }
#pragma warning(default:4244)
}

void CBitmapProperty::ResetData ( ) [virtual]

Definition at line 163 of file bmpprop.cpp.

{
  CDataPathProperty::ResetData();
  m_dlState = dlNone;
  if (m_Bitmap.m_hObject != NULL)
    m_Bitmap.DeleteObject();

  m_CacheFile.SetLength(0);
  m_nScanLine = 0;
  m_cbRead = 0;
}

Member Data Documentation

CBitmap CBitmapProperty::m_Bitmap

Definition at line 29 of file bmpprop.h.

CSize CBitmapProperty::m_BitmapSize

Definition at line 30 of file bmpprop.h.

BITMAPINFO256 CBitmapProperty::m_bmInfo

Definition at line 31 of file bmpprop.h.

CMemFile CBitmapProperty::m_CacheFile

Definition at line 32 of file bmpprop.h.

DWORD CBitmapProperty::m_cbRead

Definition at line 42 of file bmpprop.h.

enum CBitmapProperty::DLState CBitmapProperty::m_dlState
int CBitmapProperty::m_nScanLine

Definition at line 41 of file bmpprop.h.

The documentation for this class was generated from the following files:
  • controls/IMAGE/bmpprop.h
  • controls/IMAGE/bmpprop.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBkfstPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CBkfstPage Class Reference

#include "BkfstPg.h"

List of all members.

Public Types

enum | { IDD = IDD_BREAKFAST }

Public Member Functions

CBkfstPage ()
~CBkfstPage ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 15 of file BkfstPg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file BkfstPg.h.

{ IDD = IDD_BREAKFAST };

Constructor & Destructor Documentation

CBkfstPage::CBkfstPage ( )

Definition at line 27 of file BkfstPg.cpp.

                       : CPropertyPage(CBkfstPage::IDD)
{
  //{{AFX_DATA_INIT(CBkfstPage)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

CBkfstPage::~CBkfstPage ( )

Definition at line 34 of file BkfstPg.cpp.

{
}

Member Function Documentation

void CBkfstPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 38 of file BkfstPg.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CBkfstPage)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

BOOL CBkfstPage::OnInitDialog ( ) [protected, virtual]

Definition at line 55 of file BkfstPg.cpp.

{
  CPropertyPage::OnInitDialog();

  CButton* pBevButton;
  pBevButton = (CButton*) GetDlgItem(IDC_HOT_TEA);
  pBevButton->SetCheck(1);

  CButton* pStyleButton;
  pStyleButton = (CButton*) GetDlgItem(IDC_CONTINENTAL2);
  pStyleButton->SetCheck(1);

  CButton* pNewsButton;
  pNewsButton = (CButton*) GetDlgItem(IDC_FINANCE);
  pNewsButton->SetCheck(1);

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

The documentation for this class was generated from the following files:
  • general/snapvw/BkfstPg.h
  • general/snapvw/BkfstPg.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBMTest1Dlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Attributes

CBMTest1Dlg Class Reference

List of all members.

Public Types

enum | { IDD = IDM_TEST_BITMAP_BUTTON1 }

Public Member Functions

CBMTest1Dlg ()
BOOL | OnInitDialog ()

Protected Attributes

CBitmapButton | button1
CBitmapButton | button2

Detailed Description

Definition at line 22 of file bbutton.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 19 of file bbutton.cpp.

: public CDialog

Constructor & Destructor Documentation

CBMTest1Dlg::CBMTest1Dlg ( )

Definition at line 44 of file bbutton.cpp.

  : CDialog(CBMTest1Dlg::IDD)
{
  // NOTE: The obsolete MFC V1 CBitmapButton constructor with 3 arguments is
  //  replaced by a call to LoadBitmaps.
  if (!button1.LoadBitmaps(_T("Image1Up"), _T("Image1Down"), _T("Image1Focus")) ||
    !button2.LoadBitmaps(_T("Image2Up"), _T("Image2Down"), _T("Image2Focus")))
  {
    TRACE0("Failed to load bitmaps for buttons\n");
    AfxThrowResourceException();
  }
}

Member Function Documentation

BOOL CBMTest1Dlg::OnInitDialog ( )

Definition at line 57 of file bbutton.cpp.

{
  // each dialog control has special bitmaps
  VERIFY(button1.SubclassDlgItem(IDOK, this));
  button1.SizeToContent();
  VERIFY(button2.SubclassDlgItem(IDCANCEL, this));
  button2.SizeToContent();

  return TRUE;
}

Member Data Documentation

CBitmapButton CBMTest1Dlg::button1 [protected]

Definition at line 16 of file bbutton.cpp.

CBitmapButton CBMTest1Dlg::button2 [protected]

Definition at line 16 of file bbutton.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/bbutton.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBMTest2Dlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Attributes

CBMTest2Dlg Class Reference

List of all members.

Public Types

enum | { IDD = IDM_TEST_BITMAP_BUTTON2 }

Public Member Functions

CBMTest2Dlg ()
BOOL | OnInitDialog ()

Protected Attributes

CBitmapButton | buttons [N_BUTTONS]

Detailed Description

Definition at line 80 of file bbutton.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 87 of file bbutton.cpp.

{ IDD = IDM_TEST_BITMAP_BUTTON2 };

Constructor & Destructor Documentation

CBMTest2Dlg::CBMTest2Dlg ( ) [inline]

Definition at line 89 of file bbutton.cpp.

    : CDialog(CBMTest2Dlg::IDD)
    { }

Member Function Documentation

BOOL CBMTest2Dlg::OnInitDialog ( )

Definition at line 105 of file bbutton.cpp.

{
  // load bitmaps for all the bitmap buttons (does SubclassButton as well)
  for (int i = 0; i < N_BUTTONS; i++)
    VERIFY(buttons[i].AutoLoad(ID_BUTTON_MIN + i, this));
  return TRUE;
}

Member Data Documentation

CBitmapButton CBMTest2Dlg::buttons[N_BUTTONS] [protected]

Definition at line 84 of file bbutton.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/bbutton.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBMTest3Dlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Attributes

CBMTest3Dlg Class Reference

List of all members.

Public Types

enum | { IDD = IDM_TEST_BITMAP_BUTTON3 }

Public Member Functions

CBMTest3Dlg ()
BOOL | OnInitDialog ()
afx_msg void | OnNextNumber ()
afx_msg void | OnPrevNumber ()
void | Update ()

Public Attributes

int | m_nNumber

Protected Attributes

CBitmapButton | nextButton
CBitmapButton | okButton
CBitmapButton | prevButton

Detailed Description

Definition at line 122 of file bbutton.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 133 of file bbutton.cpp.

{ IDD = IDM_TEST_BITMAP_BUTTON3 };

Constructor & Destructor Documentation

CBMTest3Dlg::CBMTest3Dlg ( ) [inline]

Definition at line 136 of file bbutton.cpp.

    : CDialog(CBMTest3Dlg::IDD)
    { }

Member Function Documentation

BOOL CBMTest3Dlg::OnInitDialog ( )

Definition at line 150 of file bbutton.cpp.

{
  // load bitmaps for all the bitmap buttons (does SubclassButton as well)
  VERIFY(okButton.AutoLoad(IDOK, this));
  VERIFY(prevButton.AutoLoad(ID_PREV, this));
  VERIFY(nextButton.AutoLoad(ID_NEXT, this));
  Update();
  return TRUE;
}

void CBMTest3Dlg::OnNextNumber ( )

Definition at line 173 of file bbutton.cpp.

{
  m_nNumber++;
  Update();
}

void CBMTest3Dlg::OnPrevNumber ( )

Definition at line 167 of file bbutton.cpp.

{
  m_nNumber--;
  Update();
}

void CBMTest3Dlg::Update ( )

Definition at line 179 of file bbutton.cpp.

{
  SetDlgItemInt(IDC_NUMBEROUT, m_nNumber);
  prevButton.EnableWindow(m_nNumber > 1);
  nextButton.EnableWindow(m_nNumber < 10);
  // move focus to active button
  if (!prevButton.IsWindowEnabled())
    nextButton.SetFocus();
  else if (!nextButton.IsWindowEnabled())
    prevButton.SetFocus();
}

Member Data Documentation

int CBMTest3Dlg::m_nNumber

Definition at line 131 of file bbutton.cpp.

CBitmapButton CBMTest3Dlg::nextButton [protected]

Definition at line 128 of file bbutton.cpp.

CBitmapButton CBMTest3Dlg::okButton [protected]

Definition at line 126 of file bbutton.cpp.

CBitmapButton CBMTest3Dlg::prevButton [protected]

Definition at line 127 of file bbutton.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/bbutton.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBounceDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CBounceDoc Class Reference

#include "BncDoc.h"

List of all members.

Public Member Functions

virtual | ~CBounceDoc ()
void | ClearAllColors ()
virtual void | Serialize (CArchive &ar)
void | SetBallRadius (CSize radius)
void | SetCustomBallColor (COLORREF clr)

Public Attributes

BOOL | m_bBlack
BOOL | m_bBlue
BOOL | m_bCustom
BOOL | m_bFastSpeed
BOOL | m_bGreen
CBitmap | m_bmBall
BOOL | m_bRed
BOOL | m_bWhite
COLORREF | m_clrBall
CPoint | m_ptCenter
CPoint | m_ptPixel
CSize | m_sizeMove
CSize | m_sizeRadius
CSize | m_sizeTotal

Protected Member Functions

CBounceDoc ()
virtual BOOL | OnNewDocument ()

Detailed Description

Definition at line 16 of file BncDoc.h.

Constructor & Destructor Documentation

CBounceDoc::CBounceDoc ( ) [protected]

Definition at line 28 of file BncDoc.cpp.

{
}

CBounceDoc::~CBounceDoc ( ) [virtual]

Definition at line 47 of file BncDoc.cpp.

{
}

Member Function Documentation

void CBounceDoc::ClearAllColors ( )

Definition at line 100 of file BncDoc.cpp.

{
  m_bBlack= m_bBlue= m_bRed= 0;
  m_bWhite= m_bGreen= m_bCustom= 0;
}

BOOL CBounceDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 32 of file BncDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  m_clrBall = RGB(0, 0, 255);
  m_bFastSpeed = FALSE;

  m_bBlue= 1;
  m_bWhite= m_bRed= 0;
  m_bGreen= m_bBlack= m_bCustom= 0;

  return TRUE;
}

void CBounceDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 76 of file BncDoc.cpp.

{
  if (ar.IsStoring())
  {
  }
  else
  {
  }
}

void CBounceDoc::SetBallRadius ( CSize radius )

Definition at line 94 of file BncDoc.cpp.

{
  m_sizeRadius= radius;
  UpdateAllViews(NULL);
}

void CBounceDoc::SetCustomBallColor ( COLORREF clr )

Definition at line 88 of file BncDoc.cpp.

{
  m_clrBall= clr;
  UpdateAllViews(NULL);
}

Member Data Documentation

BOOL CBounceDoc::m_bBlack

Definition at line 36 of file BncDoc.h.

BOOL CBounceDoc::m_bBlue

Definition at line 38 of file BncDoc.h.

BOOL CBounceDoc::m_bCustom

Definition at line 41 of file BncDoc.h.

BOOL CBounceDoc::m_bFastSpeed

Definition at line 27 of file BncDoc.h.

BOOL CBounceDoc::m_bGreen

Definition at line 40 of file BncDoc.h.

CBitmap CBounceDoc::m_bmBall

Definition at line 44 of file BncDoc.h.

BOOL CBounceDoc::m_bRed

Definition at line 39 of file BncDoc.h.

BOOL CBounceDoc::m_bWhite

Definition at line 37 of file BncDoc.h.

COLORREF CBounceDoc::m_clrBall

Definition at line 25 of file BncDoc.h.

CPoint CBounceDoc::m_ptCenter

Definition at line 33 of file BncDoc.h.

CPoint CBounceDoc::m_ptPixel

Definition at line 29 of file BncDoc.h.

CSize CBounceDoc::m_sizeMove

Definition at line 31 of file BncDoc.h.

CSize CBounceDoc::m_sizeRadius

Definition at line 30 of file BncDoc.h.

CSize CBounceDoc::m_sizeTotal

Definition at line 32 of file BncDoc.h.

The documentation for this class was generated from the following files:
  • general/mdidocvw/BncDoc.h
  • general/mdidocvw/BncDoc.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBounceFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CBounceFrame Class Reference

#include "BncFrm.h"

List of all members.

Public Member Functions

virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_OVERLAPPEDWINDOW, const RECT &rect=rectDefault, CMDIFrameWnd *pParentWnd=NULL, CCreateContext *pContext=NULL)

Protected Member Functions

CBounceFrame ()
virtual | ~CBounceFrame ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Detailed Description

Definition at line 16 of file BncFrm.h.

Constructor & Destructor Documentation

CBounceFrame::CBounceFrame ( ) [protected]

Definition at line 28 of file BncFrm.cpp.

{
}

CBounceFrame::~CBounceFrame ( ) [protected, virtual]

Definition at line 32 of file BncFrm.cpp.

{
}

Member Function Documentation

BOOL CBounceFrame::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW,
 |  | const RECT & | rect = rectDefault,
 |  | CMDIFrameWnd * | pParentWnd = NULL,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]

Definition at line 50 of file BncFrm.cpp.

{
  return CMDIChildWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, pContext);
}

BOOL CBounceFrame::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 45 of file BncFrm.cpp.

{
  return CMDIChildWnd::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • general/mdidocvw/BncFrm.h
  • general/mdidocvw/BncFrm.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBounceMDIChildWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Static Protected Attributes

CBounceMDIChildWnd Class Reference

#include "bounce.h"

List of all members.

Public Member Functions

CBounceMDIChildWnd ()
BOOL | Create (LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL)
virtual BOOL | DestroyWindow ()

Protected Member Functions

virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
afx_msg LRESULT | OnPrepareToClose (WPARAM wParam=0, LPARAM lParam=0)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Static Protected Attributes

static CMenu NEAR | menu

Detailed Description

Definition at line 37 of file bounce.h.

Constructor & Destructor Documentation

CBounceMDIChildWnd::CBounceMDIChildWnd ( )

Definition at line 31 of file bounce.cpp.

{
}

Member Function Documentation

BOOL CBounceMDIChildWnd::Create | ( | LPCTSTR | szTitle,
 |  | LONG | style = 0,
 |  | const RECT & | rect = rectDefault,
 |  | CMDIFrameWnd * | pParent = NULL
 | ) |  |

Definition at line 35 of file bounce.cpp.

{
  // Setup the shared menu
  if (menu.m_hMenu == NULL)
    menu.LoadMenu(IDR_BOUNCE);
  m_hMenuShared = menu.m_hMenu;

  if (!CMDIChildWnd::Create(NULL, szTitle, style, rect, parent))
    return FALSE;

  // The default PostNcDestroy handler will delete this CBounceMDIChildWnd
  // object when destroyed.  When Windows destroys the CBounceMDIChildWnd
  // window, it will also destroy the CBounceWnd, which is the child
  // window of the MDI child window, executing in the separate thread.
  // Finally, when the child CBounceWnd window is destroyed, the
  // CWinThread object will be automatically destroyed, as explained
  // in the comment for CBounceThread::InitInstance in mtbounce.cpp.

#pragma warning(push)
#pragma warning(disable:6014)
  CBounceThread* pBounceThread = new CBounceThread(m_hWnd);
#pragma warning(pop)

  pBounceThread->CreateThread();

  return TRUE;
}

BOOL CBounceMDIChildWnd::DestroyWindow ( ) [virtual]

Definition at line 130 of file bounce.cpp.

{
  OnPrepareToClose();

  return CMDIChildWnd::DestroyWindow();
}

BOOL CBounceMDIChildWnd::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [protected, virtual]

Definition at line 66 of file bounce.cpp.

{
  // The default CFrameWnd::OnCmdMsg function is responsible for
  // dispatching menu commands to ON_COMMAND handlers and for
  // initializing menus and toolbars via ON_UPDATE_COMMAND_UI
  // handlers.  For the MDI child window, all such dispatching
  // and command user interface initialization are done in the
  // main application thread.  The CBounceWnd object processes
  // user interface events in a separate thread.  This override,
  // CBounceMDIChildWnd::OnCmdMsg, delegates command handling to
  // the child CBounceWnd window.  It cannot do this delegation
  // by simply calling CBounceWnd::OnCmdMsg, because doing so
  // would defeat the design of handling CBounceWnd user interface
  // events in the separate thread.  If CBounceMDIChildWnd::OnCmdMsg
  // simply called CBounceWnd::OnCmdMsg, then the command handling
  // would be processed in the same main application thread as that
  // of the MDI child window.
  //
  // A common and safe way to make a call from one thread to another
  // is to call SendMessage for a window whose message pump runs in
  // a second thread.  That is how CBounceMDIChildWnd::OnCmdMsg is
  // implemented.  All of the OnCmdMsg parameters are gathered into
  // an application-defined (but re-usable) COnCmdMsg structure,
  // that is sent by reference to the CBounceWnd window via the
  // lParam of SendMessage.

  CWnd* pBounceWnd = (CBounceWnd*)GetDlgItem(IDC_BOUNCE_WND);
  if (pBounceWnd == NULL)
    return FALSE; // child CBounceWnd not created yet.

  // It is safe to create the COnCmdMsg on the stack because
  // it will not be deleted until the SendMessage call has
  // synchronously executed.

  COnCmdMsg oncmdmsg;
  oncmdmsg.m_nID =    nID;
  oncmdmsg.m_nCode = nCode;
  oncmdmsg.m_pExtra = pExtra;
  oncmdmsg.m_pHandlerInfo = pHandlerInfo;

  // In addition to passing all of the OnCmdMsg parameters to
  // the CBounceWnd window via the SendMessage lParam, it is also
  // necessary to forward the implicit wParam originally passed
  // in the WM_COMMAND message for the menu command.  The original
  // WM_COMMAND wParam is not a parameter of OnCmdMsg, but it can
  // be obtained by calling GetCurrentMessage.  The wParam is needed by
  // the CBounceWnd::OnColor command handler to distinguish which
  // menu item, i.e., which color, was selected from the Color menu.
  //
  // The original single thread MDI sample application, the
  // CBounceWnd::OnColor command handler calls GetCurrentMessage
  // to retrieve the wParam from the WM_COMMAND message.  To satisfy
  // that implementation of CBounceWnd::OnColor, we call
  // GetCurrentMessage() and forward the wParam in the user-defined
  // WM_USER_ONCMDMSG message.  Alternatively, we could have
  // called GetMessageMsg and passed the wParam as an additional
  // member of the COnCmdMsg structure.

  return (BOOL)pBounceWnd->SendMessage(WM_USER_ONCMDMSG,
    GetCurrentMessage()->wParam, (LPARAM)&oncmdmsg);
}

LRESULT CBounceMDIChildWnd::OnPrepareToClose | ( | WPARAM | wParam = 0,
 |  | LPARAM | lParam = 0 |
 | ) |  |  | [protected]

Definition at line 137 of file bounce.cpp.

{
  // Wait for the bounce thread to auto-destroy its CWinThread object
  // before continuing.  This avoids a possible false memory leak
  // detection in debug mode when exiting the application.  The false
  // memory leak might be reported if the main application thread
  // terminates sooner than the bounce thread auto-destroys its own
  // CWinThread object.  See also comments for CBounceWnd::OnNcDestroy.

  CWnd* pBounceWnd = (CBounceWnd*)GetDlgItem(IDC_BOUNCE_WND);
  pBounceWnd->SendMessage(WM_USER_PREPARE_TO_CLOSE);

  WaitForSingleObject(CBounceThread::m_hEventBounceThreadKilled, INFINITE);

  return 0;
}

void CBounceMDIChildWnd::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 428 of file bounce.cpp.

{
  CMDIChildWnd::OnSize(nType, cx, cy);

  CWnd* pBounceWnd = GetDlgItem(IDC_BOUNCE_WND);
  if (pBounceWnd == NULL)
    return; // child CBounceWnd not created yet

  CRect rect;
  GetClientRect(&rect);
  pBounceWnd->SetWindowPos(NULL, 0, 0, rect.Width(), rect.Height(),
    SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);
}

Member Data Documentation

CMenu CBounceMDIChildWnd::menu [static, protected]

Definition at line 59 of file bounce.h.

The documentation for this class was generated from the following files:
  • advanced/mtmdi/bounce.h
  • advanced/mtmdi/bounce.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBounceThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes

CBounceThread Class Reference

#include "mtbounce.h"

List of all members.

Public Member Functions

CBounceThread (HWND hwndParent)
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
void | operator delete (void *p)

Static Public Attributes

static HANDLE | m_hEventBounceThreadKilled

Protected Member Functions

CBounceThread ()
virtual | ~CBounceThread ()

Protected Attributes

HWND | m_hwndParent
CBounceWnd m_wndBounce

Detailed Description

Definition at line 16 of file mtbounce.h.

Constructor & Destructor Documentation

CBounceThread::CBounceThread ( ) [protected]

Definition at line 43 of file mtbounce.cpp.

{
}

CBounceThread::CBounceThread ( HWND hwndParent )

Definition at line 47 of file mtbounce.cpp.

                                            : m_hwndParent(hwndParent)
{
}

CBounceThread::~CBounceThread ( ) [protected, virtual]

Definition at line 51 of file mtbounce.cpp.

{
}

Member Function Documentation

int CBounceThread::ExitInstance ( ) [virtual]

Definition at line 88 of file mtbounce.cpp.

{
  return CWinThread::ExitInstance();
}

int CBounceThread::InitInstance ( ) [virtual]

Definition at line 66 of file mtbounce.cpp.

{
  CWnd* pParent = CWnd::FromHandle(m_hwndParent);
  CRect rect;
  pParent->GetClientRect(&rect);

  BOOL bReturn = m_wndBounce.Create(_T("BounceMTChildWnd"),
    WS_CHILD | WS_VISIBLE, rect, pParent);

  // It is important to set CWinThread::m_pMainWnd to the user interface
  // window.  This is required so that when the m_pMainWnd is destroyed,
  // the CWinThread is also automatically destroyed.  For insight into
  // how the CWinThread is automatically destroyed when the m_pMainWnd
  // window is destroyed, see the implementation of CWnd::OnNcDestroy
  // in wincore.cpp of the MFC sources.

  if (bReturn)
    m_pMainWnd = &m_wndBounce;

  return bReturn;
}

void CBounceThread::operator delete ( void * p )

Definition at line 55 of file mtbounce.cpp.

{
  // The exiting main application thread waits for this event before completely
  // terminating in order to avoid a false memory leak detection.  See also
  // CBounceWnd::OnNcDestroy in bounce.cpp.

  SetEvent(m_hEventBounceThreadKilled);

  CWinThread::operator delete(p);
}

Member Data Documentation

HANDLE CBounceThread::m_hEventBounceThreadKilled [static]

Definition at line 27 of file mtbounce.h.

HWND CBounceThread::m_hwndParent [protected]

Definition at line 30 of file mtbounce.h.

CBounceWnd CBounceThread::m_wndBounce [protected]

Definition at line 31 of file mtbounce.h.

The documentation for this class was generated from the following files:
  • advanced/mtmdi/mtbounce.h
  • advanced/mtmdi/mtbounce.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBounceView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CBounceView Class Reference

#include "BncVw.h"

List of all members.

Public Member Functions

void | ChangeSpeed ()
CBounceDoc * GetDocument ()
void | MakeNewBall ()
void | MixColors ()
virtual void | OnInitialUpdate ()

Protected Member Functions

CBounceView ()
virtual | ~CBounceView ()
afx_msg void | OnColor ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnCustomColor ()
virtual void | OnDraw (CDC *pDC)
afx_msg void | OnFast ()
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSlow ()
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnUpdateBlack (CCmdUI *pCmdUI)
afx_msg void | OnUpdateBlue (CCmdUI *pCmdUI)
afx_msg void | OnUpdateCustom (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFast (CCmdUI *pCmdUI)
afx_msg void | OnUpdateGreen (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRed (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSlow (CCmdUI *pCmdUI)
afx_msg void | OnUpdateWhite (CCmdUI *pCmdUI)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Detailed Description

Definition at line 16 of file BncVw.h.

Constructor & Destructor Documentation

CBounceView::CBounceView ( ) [protected]

Definition at line 32 of file BncVw.cpp.

{
}

CBounceView::~CBounceView ( ) [protected, virtual]

Definition at line 36 of file BncVw.cpp.

{
}

Member Function Documentation

void CBounceView::ChangeSpeed ( )

Definition at line 107 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

// re-create the timer
  KillTimer(1);
  if (!SetTimer(1, pDoc->m_bFastSpeed ? 0 : 100, NULL))
  {
    AfxMessageBox(_T("Not enough timers available for this window"),
      MB_ICONEXCLAMATION | MB_OK);
    DestroyWindow();
  }
}

CBounceDoc * CBounceView::GetDocument ( ) [inline]

Definition at line 73 of file BncVw.h.

   { return (CBounceDoc*)m_pDocument; }

void CBounceView::MakeNewBall ( )

Definition at line 122 of file BncVw.cpp.

{

// Computes the attributes of the ball bitmap using
// aspect and window size

  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CSize radius, move, total;
  CBitmap* pbmBall;

  pbmBall = &(pDoc->m_bmBall);
  radius = pDoc->m_sizeRadius;
  move = pDoc->m_sizeMove;

  total.cx = (radius.cx + ABS(move.cx)) << 1;
  total.cy = (radius.cy + ABS(move.cy)) << 1;
  pDoc->m_sizeTotal = total;

  if (pbmBall->m_hObject != NULL)
    pbmBall->DeleteObject();        //get rid of old bitmap

  CClientDC dc(this);
  CDC dcMem;
  dcMem.CreateCompatibleDC(&dc);

  pbmBall->CreateCompatibleBitmap(&dc, total.cx, total.cy);
  ASSERT(pbmBall->m_hObject != NULL);

  CBitmap* pOldBitmap = dcMem.SelectObject(pbmBall);

  // draw a rectangle in the background (window) color

  CRect rect(0, 0, total.cx, total.cy);
  CBrush brBackground(::GetSysColor(COLOR_WINDOW));
  dcMem.FillRect(rect, &brBackground);

  CBrush brCross(HS_DIAGCROSS, 0L);
  CBrush* pOldBrush = dcMem.SelectObject(&brCross);

  dcMem.SetBkColor(pDoc->m_clrBall);
  dcMem.Ellipse(ABS(move.cx), ABS(move.cy),
    total.cx - ABS(move.cx),
    total.cy - ABS(move.cy));

  dcMem.SelectObject(pOldBrush);
  dcMem.SelectObject(pOldBitmap);
  dcMem.DeleteDC();
}

void CBounceView::MixColors ( )

Definition at line 371 of file BncVw.cpp.

{
// This function will take the current color selections, mix
// them, and use the result as the current color of the ball.

  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  COLORREF tmpClr;
  int r, g, b;
  BOOL bSetColor;

  bSetColor = pDoc->m_bRed || pDoc->m_bGreen || pDoc->m_bBlue
    || pDoc->m_bWhite || pDoc->m_bBlack;
  if(!bSetColor && pDoc->m_bCustom)
    return;

  r = g = b = 0;

  if(pDoc->m_bRed)
    r = 255;
  if(pDoc->m_bGreen)
    g = 255;
  if(pDoc->m_bBlue)
    b = 255;
  tmpClr = RGB(r, g, b);

// NOTE: Because a simple algorithm is used to mix colors
// if the current selection contains black or white, the
// result will be black or white; respectively. This is due
// to the additive method for mixing the colors

  if(pDoc->m_bWhite)
    tmpClr = RGB(255, 255, 255);

  if((pDoc->m_bBlack))
    tmpClr = RGB(0, 0, 0);

  // Once the color has been determined, update document
  // data, and force repaint of all views.

  if(!bSetColor)
    pDoc->m_bBlack = TRUE;
   pDoc->m_clrBall = tmpClr;
   pDoc->m_bCustom = FALSE;
   MakeNewBall();
}

void CBounceView::OnColor ( ) [protected]

Definition at line 458 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  UINT m_nIDColor;

  m_nIDColor = LOWORD(GetCurrentMessage()->wParam);

// Determines the color being modified
// and then updates the color state

  switch(m_nIDColor)
  {
   case ID_BLACK:
    pDoc->ClearAllColors();
    pDoc->m_bBlack = !(pDoc->m_bBlack);
    break;
   case ID_WHITE:
    pDoc->ClearAllColors();
    pDoc->m_bWhite = !(pDoc->m_bWhite);
    break;
   case ID_RED:
    pDoc->m_bRed = !(pDoc->m_bRed);
    pDoc->m_bBlack = FALSE;
    pDoc->m_bWhite = FALSE;
    break;
   case ID_GREEN:
    pDoc->m_bGreen = !(pDoc->m_bGreen);
    pDoc->m_bBlack = FALSE;
    pDoc->m_bWhite = FALSE;
    break;
   case ID_BLUE:
    pDoc->m_bBlue = !(pDoc->m_bBlue);
    pDoc->m_bBlack = FALSE;
    pDoc->m_bWhite = FALSE;
    break;
   default:
     AfxMessageBox(IDS_UNKCOLOR);
     return;
  }
  MixColors();
}

int CBounceView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 191 of file BncVw.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  if (!SetTimer(1, 100 /* start slow */, NULL))
  {
    MessageBox(_T("Not enough timers available for this window."),
        _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);

    // signal creation failure...
    return -1;
  }

  // Get the aspect ratio of the device the ball will be drawn
  // on and then update the document data with the correct value.

  CDC* pDC = GetDC();
  CPoint aspect;
  aspect.x = pDC->GetDeviceCaps(ASPECTX);
  aspect.y = pDC->GetDeviceCaps(ASPECTY);
  ReleaseDC(pDC);
  pDoc->m_ptPixel = aspect;

  // Note that we could call MakeNewBall here (which should be called
  // whenever the ball's speed, color or size has been changed), but the
  // OnSize member function is always called after the OnCreate. Since
  // the OnSize member has to call MakeNewBall anyway, we don't here.

  return 0;
}

void CBounceView::OnCustomColor ( ) [protected]

Definition at line 348 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CColorDialog dlgColor(pDoc->m_clrBall);
  if (dlgColor.DoModal() == IDOK)
  {
    pDoc->SetCustomBallColor(dlgColor.GetColor());
    pDoc->ClearAllColors();
    pDoc->m_bCustom = TRUE;
    MakeNewBall();
  }
}

void CBounceView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 68 of file BncVw.cpp.

{
  CDocument* pDoc = GetDocument();

// NOTE: Because the animation depends on timer events
// and resizing of the window, the rendering code is
// mostly found in the MakeNewBall function; called by handlers
// for WM_TIMER and WM_SIZE commands. These handlers make the code easier
// to read. However, the side-effect is that the ball will not be
// rendered when the document is printed because there is no rendering
// code in the OnDraw override.

}

void CBounceView::OnFast ( ) [protected]

Definition at line 173 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pDoc->m_bFastSpeed = TRUE;
  ChangeSpeed();
}

void CBounceView::OnInitialUpdate ( ) [virtual]

Definition at line 517 of file BncVw.cpp.

{
  CView::OnInitialUpdate();

  MixColors();
}

void CBounceView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 226 of file BncVw.cpp.

{
  CView::OnSize(nType, cx, cy);

  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  LONG lScale;
  CPoint center, ptPixel;

  center.x = cx >> 1;
  center.y = cy >> 1;
  center.x += cx >> 3; // make the ball a little off-center
  pDoc->m_ptCenter = center;

  CSize radius, move;

  // Because the window size has changed, re-calculate
  // the ball's dimensions.

  ptPixel = pDoc->m_ptPixel;

  lScale = min((LONG)cx * ptPixel.x,
    (LONG)cy * ptPixel.y) >> 4;

  radius.cx = (int)(lScale / ptPixel.x);
  radius.cy = (int)(lScale / ptPixel.y);
  pDoc->m_sizeRadius = radius;

  //Re-calculate the ball's rate of movement.

  move.cx = max(1, radius.cy >> 2);
  move.cy = max(1, radius.cy >> 2);
  pDoc->m_sizeMove = move;

  // Redraw ball.

  MakeNewBall();
}

void CBounceView::OnSlow ( ) [protected]

Definition at line 182 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pDoc->m_bFastSpeed = FALSE;
  ChangeSpeed();
}

void CBounceView::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 266 of file BncVw.cpp.

{
  //Time to redraw the ball.

  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CBitmap* pbmBall;
  pbmBall = &(pDoc->m_bmBall);

  if (pbmBall->m_hObject == NULL)
    return;     // no bitmap for the ball

  // Get the current dimensions and create
  // a compatible DC to work with.

  CRect rcClient;
  GetClientRect(rcClient);

  CClientDC dc(this);
  CBitmap* pbmOld = NULL;

  CDC dcMem;
  dcMem.CreateCompatibleDC(&dc);
  pbmOld = dcMem.SelectObject(pbmBall);

  CPoint center;
  CSize total, move, radius;

  // Get the current dimensions and create
  // a compatible DC to work with.

  center = pDoc->m_ptCenter;
  radius = pDoc->m_sizeRadius;
  total = pDoc->m_sizeTotal;
  move = pDoc->m_sizeMove;

  // Now that the ball has been updated, draw it
  // by BitBlt'ing to the view.

  dc.BitBlt(center.x - total.cx / 2, center.y - total.cy / 2,
      total.cx, total.cy, &dcMem, 0, 0, SRCCOPY);

  // Move ball and check for collisions

  center += move;
  pDoc->m_ptCenter = center;

  if ((center.x + radius.cx >= rcClient.right) ||
    (center.x - radius.cx <= 0))
  {
    move.cx = -move.cx;
  }

  if ((center.y + radius.cy >= rcClient.bottom) ||
    (center.y - radius.cy <= 0))
  {
    move.cy = -move.cy;
  }
  pDoc->m_sizeMove = move;

  dcMem.SelectObject(pbmOld);
  dcMem.DeleteDC();
}

void CBounceView::OnUpdateBlack ( CCmdUI * pCmdUI ) [protected]

Definition at line 418 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bBlack);
}

void CBounceView::OnUpdateBlue ( CCmdUI * pCmdUI ) [protected]

Definition at line 434 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bBlue);
}

void CBounceView::OnUpdateCustom ( CCmdUI * pCmdUI ) [protected]

Definition at line 363 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bCustom);
}

void CBounceView::OnUpdateFast ( CCmdUI * pCmdUI ) [protected]

Definition at line 331 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bFastSpeed);

}

void CBounceView::OnUpdateGreen ( CCmdUI * pCmdUI ) [protected]

Definition at line 442 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bGreen);
}

void CBounceView::OnUpdateRed ( CCmdUI * pCmdUI ) [protected]

Definition at line 450 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bRed);
}

void CBounceView::OnUpdateSlow ( CCmdUI * pCmdUI ) [protected]

Definition at line 340 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(!pDoc->m_bFastSpeed);
}

void CBounceView::OnUpdateWhite ( CCmdUI * pCmdUI ) [protected]

Definition at line 426 of file BncVw.cpp.

{
  CBounceDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bWhite);
}

BOOL CBounceView::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 502 of file BncVw.cpp.

{
  if (!CView::PreCreateWindow(cs))
    return FALSE;

  cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW,
      AfxGetApp()->LoadStandardCursor(IDC_SIZENS),
      (HBRUSH)(COLOR_WINDOW+1));

  if (cs.lpszClass != NULL)
    return TRUE;
  else
    return FALSE;
}

The documentation for this class was generated from the following files:
  • general/mdidocvw/BncVw.h
  • general/mdidocvw/BncVw.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBounceWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

CBounceWnd Class Reference

#include "bounce.h"

List of all members.

Public Member Functions

CBounceWnd ()
CBounceWnd ()
BOOL | Create (LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL)
BOOL | Create (LPCTSTR szTitle, LONG style, const RECT &rect, CWnd *pParent)

Protected Member Functions

void | ChangeSpeed ()
void | ChangeSpeed ()
void | MakeNewBall ()
void | MakeNewBall ()
afx_msg void | OnColor ()
afx_msg void | OnColor ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnCustomColor ()
afx_msg void | OnCustomColor ()
afx_msg LRESULT | OnDelegatedCmdMsg (WPARAM, LPARAM)
afx_msg void | OnDestroy ()
afx_msg void | OnFast ()
afx_msg void | OnFast ()
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg LRESULT | OnPrepareToClose (WPARAM wParam=0, LPARAM lParam=0)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSlow ()
afx_msg void | OnSlow ()
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnUpdateColor (CCmdUI *pCmdUI)
afx_msg void | OnUpdateColor (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFast (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFast (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSlow (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSlow (CCmdUI *pCmdUI)

Protected Attributes

BOOL | m_bFastSpeed
CBitmap | m_bmBall
COLORREF | m_clrBall
UINT m_nIDColor
CPoint | m_ptCenter
CPoint | m_ptPixel
CSize | m_sizeMove
CSize | m_sizeRadius
CSize | m_sizeTotal

Static Protected Attributes

static CMenu NEAR | menu

Detailed Description

Definition at line 70 of file bounce.h.

Constructor & Destructor Documentation

CBounceWnd::CBounceWnd ( )

Definition at line 205 of file bounce.cpp.

{
  m_nIDColor = IDM_BLACK;
  m_clrBall = RGB(0,0,0);
  m_bFastSpeed = FALSE;
}

CBounceWnd::CBounceWnd ( )

Member Function Documentation

void CBounceWnd::ChangeSpeed ( ) [protected]

Definition at line 355 of file bounce.cpp.

{
  // re-create the timer
  KillTimer(1);
  if (!SetTimer(1, m_bFastSpeed ? 0 : 100, NULL))
  {
    MessageBox(_T("Not enough timers available for this window."),
        _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);
    DestroyWindow();
  }
}

void CBounceWnd::ChangeSpeed ( ) [protected]
BOOL CBounceWnd::Create | ( | LPCTSTR | szTitle,
 |  | LONG | style = 0,
 |  | const RECT & | rect = rectDefault,
 |  | CMDIFrameWnd * | pParent = NULL
 | ) |  |

Definition at line 52 of file bounce.cpp.

{
  // Setup the shared menu
  if (menu.m_hMenu == NULL)
    menu.LoadMenu(IDR_BOUNCE);
  m_hMenuShared = menu.m_hMenu;

  // Register a custom WndClass and create a window.
  // This must be done because CBounceWnd has a custom cursor, and
  //  no icon.
  LPCTSTR lpszBounceClass =
    AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
      LoadCursor(NULL, IDC_UPARROW),
      (HBRUSH)(COLOR_WINDOW+1),
      NULL);

  return CMDIChildWnd::Create(lpszBounceClass, szTitle, style, rect, parent);
}

BOOL CBounceWnd::Create | ( | LPCTSTR | szTitle,
 |  | LONG | style,
 |  | const RECT & | rect,
 |  | CWnd * | pParent
 | ) |  |

Definition at line 190 of file bounce.cpp.

{
  // Register a custom WndClass and create a window.
  // This must be done because CBounceWnd has a custom cursor, and
  //  no icon.
  LPCTSTR lpszBounceClass =
    AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
      LoadCursor(NULL, IDC_UPARROW),
      (HBRUSH)(COLOR_WINDOW+1),
      NULL);

  return CWnd::Create(lpszBounceClass, szTitle, style, rect, parent,
    IDC_BOUNCE_WND);
}

void CBounceWnd::MakeNewBall ( ) [protected]

Definition at line 255 of file bounce.cpp.

{
  m_sizeTotal.cx = (m_sizeRadius.cx + ABS(m_sizeMove.cx)) << 1;
  m_sizeTotal.cy = (m_sizeRadius.cy + ABS(m_sizeMove.cy)) << 1;

  if (m_bmBall.m_hObject != NULL)
    m_bmBall.DeleteObject();        // get rid of old bitmap

  CClientDC dc(this);
  CDC dcMem;
  dcMem.CreateCompatibleDC(&dc);

  m_bmBall.CreateCompatibleBitmap(&dc, m_sizeTotal.cx, m_sizeTotal.cy);
  ASSERT(m_bmBall.m_hObject != NULL);

  CBitmap* pOldBitmap = dcMem.SelectObject(&m_bmBall);

  // draw a rectangle in the background (window) color
  CRect rect(0, 0, m_sizeTotal.cx, m_sizeTotal.cy);
  CBrush brBackground(::GetSysColor(COLOR_WINDOW));
  dcMem.FillRect(rect, &brBackground);

  CBrush brCross(HS_DIAGCROSS, 0L);
  CBrush* pOldBrush = dcMem.SelectObject(&brCross);

  dcMem.SetBkColor(m_clrBall);
  dcMem.Ellipse(ABS(m_sizeMove.cx), ABS(m_sizeMove.cy),
    m_sizeTotal.cx - ABS(m_sizeMove.cx),
    m_sizeTotal.cy - ABS(m_sizeMove.cy));

  dcMem.SelectObject(pOldBrush);
  dcMem.SelectObject(pOldBitmap);
  dcMem.DeleteDC();
}

void CBounceWnd::MakeNewBall ( ) [protected]
void CBounceWnd::OnColor ( ) [protected]

Definition at line 332 of file bounce.cpp.

{
  m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
  m_clrBall = colorArray[m_nIDColor - IDM_BLACK];

  // Force the client area text to be repainted in the new color
  MakeNewBall();
  Invalidate();
}

afx_msg void CBounceWnd::OnColor ( ) [protected]
int CBounceWnd::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 227 of file bounce.cpp.

{
  if (!SetTimer(1, 100 /*start slow*/, NULL))
  {
    MessageBox(_T("Not enough timers available for this window."),
        _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);

    // signal creation failure...
    return -1;
  }

  CDC* pDC = GetDC();
  m_ptPixel.x = pDC->GetDeviceCaps(ASPECTX);
  m_ptPixel.y = pDC->GetDeviceCaps(ASPECTY);
  ReleaseDC(pDC);

  // Note that we could call MakeNewBall here (which should be called
  // whenever the ball's speed, color or size has been changed), but the
  // OnSize member function is always called after the OnCreate. Since
  // the OnSize member has to call MakeNewBall anyway, we don't here.

  return 0;
}

afx_msg int CBounceWnd::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
void CBounceWnd::OnCustomColor ( ) [protected]

Definition at line 342 of file bounce.cpp.

{
  CColorDialog dlgColor(m_clrBall);
  if (dlgColor.DoModal() == IDOK)
  {
    m_clrBall = dlgColor.GetColor();
    m_nIDColor = IDM_CUSTOM;
    MakeNewBall();
    Invalidate();
  }
}

afx_msg void CBounceWnd::OnCustomColor ( ) [protected]
LRESULT CBounceWnd::OnDelegatedCmdMsg | ( | WPARAM | ,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 314 of file bounce.cpp.

{
  COnCmdMsg* pOnCmdMsg = (COnCmdMsg*)lParam;
  return CWnd::OnCmdMsg(pOnCmdMsg->m_nID, pOnCmdMsg->m_nCode, pOnCmdMsg->m_pExtra,
      pOnCmdMsg->m_pHandlerInfo);
}

void CBounceWnd::OnDestroy ( ) [protected]

Definition at line 212 of file bounce.cpp.

{
  // The following code forces a condition where the exiting application will
  // report a memory leak of the bounce CWinThread object if the application
  // does not wait for the bounce thread to auto-destroy its CWinThread object.
  // See also CMDIChildBounceWnd::OnNcDestroy.

#ifdef _DEBUG
  TRACE0("This is an intentional 1-second delay in terminating the bounce thread\n");
  Sleep(1000);
#endif
  CWnd::OnDestroy();
}

void CBounceWnd::OnFast ( ) [protected]

Definition at line 422 of file bounce.cpp.

{
  m_bFastSpeed = TRUE;
  ChangeSpeed();
}

afx_msg void CBounceWnd::OnFast ( ) [protected]
void CBounceWnd::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 442 of file bounce.cpp.

{
  Invalidate();

  CRect rcClient;
  GetClientRect(rcClient);

  point.x = min(point.x, rcClient.right - 2*m_sizeRadius.cx);
  point.x = max(point.x, 2*m_sizeRadius.cx);
  point.y = min(point.y, rcClient.bottom - 2*m_sizeRadius.cx);
  point.y = max(point.y, 2*m_sizeRadius.cy);

  m_ptCenter = point;
}

LRESULT CBounceWnd::OnPrepareToClose | ( | WPARAM | wParam = 0,
 |  | LPARAM | lParam = 0 |
 | ) |  |  | [protected]

Definition at line 321 of file bounce.cpp.

{
  DestroyWindow();
  return 0;
}

void CBounceWnd::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 291 of file bounce.cpp.

{
  LONG lScale;

  m_ptCenter.x = cx >> 1;
  m_ptCenter.y = cy >> 1;
  m_ptCenter.x += cx >> 3; // make the ball a little off-center

  lScale = min((LONG)cx * m_ptPixel.x,
    (LONG)cy * m_ptPixel.y) >> 4;
  m_sizeRadius.cx = (int)(lScale / m_ptPixel.x);
  m_sizeRadius.cy = (int)(lScale / m_ptPixel.y);
  m_sizeMove.cx = max(1, m_sizeRadius.cy >> 2);
  m_sizeMove.cy = max(1, m_sizeRadius.cy >> 2);

  MakeNewBall();

  CWnd::OnSize(nType, cx, cy);
}

afx_msg void CBounceWnd::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
void CBounceWnd::OnSlow ( ) [protected]

Definition at line 411 of file bounce.cpp.

{
  m_bFastSpeed = FALSE;
  ChangeSpeed();
}

afx_msg void CBounceWnd::OnSlow ( ) [protected]
void CBounceWnd::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 368 of file bounce.cpp.

{
  if (m_bmBall.m_hObject == NULL)
    return;     // no bitmap for the ball

  CRect rcClient;
  GetClientRect(rcClient);

  CClientDC dc(this);
  CBitmap* pbmOld = NULL;

  CDC dcMem;
  dcMem.CreateCompatibleDC(&dc);
  pbmOld = dcMem.SelectObject(&m_bmBall);

  dc.BitBlt(m_ptCenter.x - m_sizeTotal.cx / 2,
      m_ptCenter.y - m_sizeTotal.cy / 2,
      m_sizeTotal.cx, m_sizeTotal.cy,
      &dcMem, 0, 0, SRCCOPY);

  m_ptCenter += m_sizeMove;

  if ((m_ptCenter.x + m_sizeRadius.cx >= rcClient.right) ||
    (m_ptCenter.x - m_sizeRadius.cx <= 0))
  {
    m_sizeMove.cx = -m_sizeMove.cx;
  }

  if ((m_ptCenter.y + m_sizeRadius.cy >= rcClient.bottom) ||
    (m_ptCenter.y - m_sizeRadius.cy <= 0))
  {
    m_sizeMove.cy = -m_sizeMove.cy;
  }

  dcMem.SelectObject(pbmOld);
  dcMem.DeleteDC();
}

afx_msg void CBounceWnd::OnTimer ( UINT_PTR nIDEvent ) [protected]
afx_msg void CBounceWnd::OnUpdateColor ( CCmdUI * pCmdUI ) [protected]
void CBounceWnd::OnUpdateColor ( CCmdUI * pCmdUI ) [protected]

Definition at line 327 of file bounce.cpp.

{
  pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
}

void CBounceWnd::OnUpdateFast ( CCmdUI * pCmdUI ) [protected]

Definition at line 417 of file bounce.cpp.

{
  pCmdUI->SetCheck(m_bFastSpeed);
}

afx_msg void CBounceWnd::OnUpdateFast ( CCmdUI * pCmdUI ) [protected]
void CBounceWnd::OnUpdateSlow ( CCmdUI * pCmdUI ) [protected]

Definition at line 406 of file bounce.cpp.

{
  pCmdUI->SetCheck(!m_bFastSpeed);
}

afx_msg void CBounceWnd::OnUpdateSlow ( CCmdUI * pCmdUI ) [protected]

Member Data Documentation

BOOL CBounceWnd::m_bFastSpeed [protected]

Definition at line 91 of file bounce.h.

CBitmap CBounceWnd::m_bmBall [protected]

Definition at line 100 of file bounce.h.

COLORREF CBounceWnd::m_clrBall [protected]

Definition at line 89 of file bounce.h.

UINT CBounceWnd::m_nIDColor [protected]

Definition at line 88 of file bounce.h.

CPoint CBounceWnd::m_ptCenter [protected]

Definition at line 97 of file bounce.h.

CPoint CBounceWnd::m_ptPixel [protected]

Definition at line 93 of file bounce.h.

CSize CBounceWnd::m_sizeMove [protected]

Definition at line 95 of file bounce.h.

CSize CBounceWnd::m_sizeRadius [protected]

Definition at line 94 of file bounce.h.

CSize CBounceWnd::m_sizeTotal [protected]

Definition at line 96 of file bounce.h.

CMenu NEAR CBounceWnd::menu [static, protected]

Definition at line 31 of file bounce.h.

The documentation for this class was generated from the following files:
  • advanced/mtmdi/bounce.h
  • general/mdi/bounce.h
  • advanced/mtmdi/bounce.cpp
  • general/mdi/bounce.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBoundedNumberPairProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CBoundedNumberPairProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CBoundedNumberPairProp (const CString &strGroupName, int nMinValue1, int nMaxValue1, int nMinValue2, int nMaxValue2, DWORD_PTR dwData=0, BOOL bIsValueList=FALSE)
virtual BOOL | OnUpdateValue ()

Private Attributes

int | m_nMaxValue1
int | m_nMaxValue2
int | m_nMinValue1
int | m_nMinValue2

Detailed Description

Definition at line 55 of file CustomProperties.h.

Constructor & Destructor Documentation

CBoundedNumberPairProp::CBoundedNumberPairProp | ( | const CString & | strGroupName,
 |  | int | nMinValue1,
 |  | int | nMaxValue1,
 |  | int | nMinValue2,
 |  | int | nMaxValue2,
 |  | DWORD_PTR | dwData = 0,
 |  | BOOL | bIsValueList = FALSE
 | ) |  |

Definition at line 206 of file CustomProperties.cpp.

                                                                                :
  CMFCPropertyGridProperty(strGroupName, dwData, bIsValueList)
{
  m_nMinValue1 = nMinValue1;
  m_nMaxValue1 = nMaxValue1;
  m_nMinValue2 = nMinValue2;
  m_nMaxValue2 = nMaxValue2;
}

Member Function Documentation

BOOL CBoundedNumberPairProp::OnUpdateValue ( ) [virtual]

Definition at line 215 of file CustomProperties.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(m_pWndInPlace);
  ASSERT_VALID(m_pWndList);
  ASSERT(::IsWindow(m_pWndInPlace->GetSafeHwnd()));

  CString strText;
  m_pWndInPlace->GetWindowText(strText);

  BOOL bIsChanged = FormatProperty() != strText;

  if (bIsChanged)
  {
    CString strDelimeter(_T(","));

    for (int i = 0; !strText.IsEmpty() && i < GetSubItemsCount(); i++)
    {
      CString strItem = strText.SpanExcluding(strDelimeter);
      if (strItem.GetLength() + 1 > strText.GetLength())
      {
        strText.Empty();
      }
      else
      {
        strText = strText.Mid(strItem.GetLength() + 1);
      }
      strItem.TrimLeft();
      strItem.TrimRight();

      int nItem = _ttoi(strItem);
      if ((i == 0) && ((nItem < m_nMinValue1) || (nItem > m_nMaxValue1)))
      {
        static BOOL bRecursedHere = FALSE;
        if (bRecursedHere)
          return TRUE;
        bRecursedHere = TRUE;

        CString strMessage;
        strMessage.Format(_T("Height value must be between %d and %d."), m_nMinValue1, m_nMaxValue1);
        AfxMessageBox(strMessage);

        bRecursedHere = FALSE;
        return FALSE;
      }
      else if ((i == 1) && ((nItem < m_nMinValue2) || (nItem > m_nMaxValue2)))
      {
        static BOOL bRecursedHere = FALSE;
        if (bRecursedHere)
          return TRUE;
        bRecursedHere = TRUE;

        CString strMessage;
        strMessage.Format(_T("Width value must be between %d and %d."), m_nMinValue2, m_nMaxValue2);
        AfxMessageBox(strMessage);

        bRecursedHere = FALSE;
        return FALSE;
      }
    }

    return CMFCPropertyGridProperty::OnUpdateValue();
  }

  return TRUE;
}

Member Data Documentation

int CBoundedNumberPairProp::m_nMaxValue1 [private]

Definition at line 64 of file CustomProperties.h.

int CBoundedNumberPairProp::m_nMaxValue2 [private]

Definition at line 66 of file CustomProperties.h.

int CBoundedNumberPairProp::m_nMinValue1 [private]

Definition at line 63 of file CustomProperties.h.

int CBoundedNumberPairProp::m_nMinValue2 [private]

Definition at line 65 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBoundedNumberSubProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CBoundedNumberSubProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CBoundedNumberSubProp (const CString &strName, const COleVariant &varValue, int nMinValue, int nMaxValue, LPCTSTR lpszDescr=NULL)
virtual BOOL | OnUpdateValue ()

Private Attributes

int | m_nMaxValue
int | m_nMinValue

Detailed Description

Definition at line 69 of file CustomProperties.h.

Constructor & Destructor Documentation

CBoundedNumberSubProp::CBoundedNumberSubProp | ( | const CString & | strName,
 |  | const COleVariant & | varValue,
 |  | int | nMinValue,
 |  | int | nMaxValue,
 |  | LPCTSTR | lpszDescr = NULL
 | ) |  |

Definition at line 285 of file CustomProperties.cpp.

                                                                                :
  CMFCPropertyGridProperty(strName, varValue, lpszDescr)
{
  m_nMinValue = nMinValue;
  m_nMaxValue = nMaxValue;
}

Member Function Documentation

BOOL CBoundedNumberSubProp::OnUpdateValue ( ) [virtual]

Definition at line 292 of file CustomProperties.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(m_pWndInPlace);
  ASSERT_VALID(m_pWndList);
  ASSERT(::IsWindow(m_pWndInPlace->GetSafeHwnd()));

  BOOL bRet = TRUE;
  CString strText;
  m_pWndInPlace->GetWindowText(strText);

  BOOL bIsChanged = FormatProperty() != strText;
  if (bIsChanged)
  {
    int nItem = _ttoi(strText);
    if ((nItem < m_nMinValue) || (nItem > m_nMaxValue))
    {
      static BOOL bRecursedHere = FALSE;
      if (bRecursedHere)
        return TRUE;
      bRecursedHere = TRUE;

      CString strMessage;
      strMessage.Format(_T("Value must be between %d and %d."), m_nMinValue, m_nMaxValue);
      AfxMessageBox(strMessage);

      bRecursedHere = FALSE;
      return FALSE;
    }

    bRet = CMFCPropertyGridProperty::OnUpdateValue();

    if (m_pParent != NULL)
    {
      m_pWndList->OnPropertyChanged(m_pParent);
    }
  }

  return bRet;
}

Member Data Documentation

int CBoundedNumberSubProp::m_nMaxValue [private]

Definition at line 77 of file CustomProperties.h.

int CBoundedNumberSubProp::m_nMinValue [private]

Definition at line 76 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CBrightLeader Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes | Static Private Attributes

CBrightLeader Class Reference

#include "Swarm.h"

Inherits CLeader.

List of all members.

Public Member Functions

CBrightLeader ()
virtual COLORREF | GetInitialLlamaColor ()
virtual COLORREF | GetLlamaColor (COLORREF oldColor)
virtual void | Tick ()

Private Attributes

int | m_nColorCounter

Static Private Attributes

static COLORREF | m_sColorTable [256] = { 0 }

Detailed Description

Definition at line 103 of file Swarm.h.

Constructor & Destructor Documentation

CBrightLeader::CBrightLeader ( )

Definition at line 263 of file Swarm.cpp.

{
  if (m_sColorTable[0] == 0) { // 1 time init
    for (int i = 0; i <= 255; i++) {
        m_sColorTable[i] = HSB((BYTE)i, 255, 255);
    }
  }
  m_nColorCounter = Random(256);
}

Member Function Documentation

COLORREF CBrightLeader::GetInitialLlamaColor ( ) [virtual]

Implements CLeader.

Definition at line 285 of file Swarm.cpp.

{
  return(m_sColorTable[m_nColorCounter]);
}

COLORREF CBrightLeader::GetLlamaColor ( COLORREF oldColor ) [virtual]

Implements CLeader.

Definition at line 280 of file Swarm.cpp.

{
  return(m_sColorTable[m_nColorCounter]);
}

void CBrightLeader::Tick ( ) [virtual]

Reimplemented from CLeader.

Definition at line 273 of file Swarm.cpp.

{
  if (++m_nColorCounter > 255)
    m_nColorCounter = 0;
  __super::Tick();
}

Member Data Documentation

int CBrightLeader::m_nColorCounter [private]

Definition at line 112 of file Swarm.h.

COLORREF CBrightLeader::m_sColorTable = { 0 } [static, private]

Definition at line 111 of file Swarm.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/Swarm.h
  • general/MMXSwarm/Swarm.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CButtonApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CButtonApp Class Reference

#include "button.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 21 of file button.h.

Member Function Documentation

int CButtonApp::ExitInstance ( )

Definition at line 47 of file button.cpp.

{
  return COleControlModule::ExitInstance();
}

BOOL CButtonApp::InitInstance ( )

Definition at line 32 of file button.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/button/button.h
  • controls/button/button.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CButtonCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CButtonCtrl Class Reference

#include "btnctl.h"

List of all members.

Public Types

enum

Public Member Functions

CButtonCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual HMENU | OnGetInPlaceMenu (void)
virtual void | OnResetState ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

~CButtonCtrl ()
afx_msg void | AboutBox ()
afx_msg void | CmdAbout ()
DECLARE_OLECREATE_EX (CButtonCtrl) DECLARE_OLETYPELIB(CButtonCtrl) DECLARE_PROPPAGEIDS(CButtonCtrl) DECLARE_OLECTLTYPE(CButtonCtrl) BOOL PreCreateWindow(CREATESTRUCT &cs)
void | FireClick ()
BOOL | IsSubclassedControl ()
LRESULT | OnOcmCommand (WPARAM wParam, LPARAM lParam)
afx_msg void | OnOptionsOption1 ()
afx_msg void | OnOptionsOption2 ()
afx_msg void | OnOptionsOption3 ()

Protected Attributes

CMenu | m_menuInPlace

Detailed Description

Definition at line 15 of file btnctl.h.

Member Enumeration Documentation

anonymous enum

Definition at line 81 of file btnctl.h.

       {
  //{{AFX_DISP_ID(CButtonCtrl)
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CButtonCtrl::CButtonCtrl ( )

Definition at line 137 of file btnctl.cpp.

{
  InitializeIIDs(&IID_DButton, &IID_DButtonEvents);
}

CButtonCtrl::~CButtonCtrl ( ) [protected]

Definition at line 146 of file btnctl.cpp.

{
}

Member Function Documentation

void CButtonCtrl::AboutBox ( ) [protected]

Definition at line 183 of file btnctl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_BUTTON);
  dlgAbout.DoModal();
}

void CButtonCtrl::CmdAbout ( ) [protected]

Definition at line 251 of file btnctl.cpp.

{
  AboutBox();
}

CButtonCtrl::DECLARE_OLECREATE_EX ( CButtonCtrl ) [protected]
void CButtonCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 164 of file btnctl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);
}

void CButtonCtrl::FireClick ( ) [inline, protected]

Definition at line 74 of file btnctl.h.

    {FireEvent(DISPID_CLICK,EVENT_PARAM(VTS_NONE));}

BOOL CButtonCtrl::IsSubclassedControl ( ) [protected]

Definition at line 203 of file btnctl.cpp.

{
  return TRUE;
}

void CButtonCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 154 of file btnctl.cpp.

{
  DoSuperclassPaint(pdc, rcBounds);
}

HMENU CButtonCtrl::OnGetInPlaceMenu ( void ) [virtual]

Definition at line 260 of file btnctl.cpp.

{
  if (m_menuInPlace.m_hMenu == NULL)
    m_menuInPlace.LoadMenu(IDR_INPLACEMENU);

  return m_menuInPlace.m_hMenu;
}

LRESULT CButtonCtrl::OnOcmCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 223 of file btnctl.cpp.

{
#ifdef _WIN32
  WORD wNotifyCode = HIWORD(wParam);
  lParam;
#else
  WORD wNotifyCode = HIWORD(lParam);
  wParam;
#endif
  switch (wNotifyCode)
  {
  case BN_CLICKED:
    // Fire click event when button is clicked
    FireClick();
    break;
  }
  return 0;
}

void CButtonCtrl::OnOptionsOption1 ( ) [protected]

Definition at line 268 of file btnctl.cpp.

{
  // TODO: Add your command handler code here

}

void CButtonCtrl::OnOptionsOption2 ( ) [protected]

Definition at line 274 of file btnctl.cpp.

{
  // TODO: Add your command handler code here

}

void CButtonCtrl::OnOptionsOption3 ( ) [protected]

Definition at line 280 of file btnctl.cpp.

{
  // TODO: Add your command handler code here

}

void CButtonCtrl::OnResetState ( ) [virtual]

Definition at line 174 of file btnctl.cpp.

{
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange
}

BOOL CButtonCtrl::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 211 of file btnctl.cpp.

{
  // give container a shot at processing accelerators
  if (pMsg->message >= WM_KEYFIRST && pMsg->message <= WM_KEYLAST)
    if (::OleTranslateAccelerator(m_pInPlaceFrame,&m_frameInfo,pMsg)==S_OK)
      return TRUE;

  return COleControl::PreTranslateMessage(pMsg);
}

Member Data Documentation

CMenu CButtonCtrl::m_menuInPlace [protected]

Definition at line 44 of file btnctl.h.

The documentation for this class was generated from the following files:
  • controls/button/btnctl.h
  • controls/button/btnctl.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CButtonDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CButtonDialog Class Reference

#include "buttondi.h"

Inherits CCSDialog, and CCSDialog.

List of all members.

Public Member Functions

CButtonDialog (LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL)
CButtonDialog (LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL)
~CButtonDialog ()
~CButtonDialog ()
void | AddButton (CString &strButton)
void | AddButton (CString &strButton)
void | AddButtons (LPCTSTR lpszButton)
void | AddButtons (LPCTSTR lpszButton)
virtual INT_PTR | DoModal ()
virtual INT_PTR | DoModal ()
void | FillInHeader (LPDLGTEMPLATE lpDlgTmp)
void | FillInHeader (LPDLGTEMPLATE lpDlgTmp)
virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam)
virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam)
void | SetCancel (int nCancel)
void | SetCancel (int nCancel)
void | SetDefault (int nDef)
void | SetDefault (int nDef)

Static Public Member Functions

static INT_PTR | DisplayMessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, int nDef=0, int nCancel=-1, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL)
static int | DisplayMessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, int nDef=0, int nCancel=-1, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL)

Public Attributes

CFont | m_font

Protected Member Functions

CSize | GetBaseUnits ()
CSize | GetBaseUnits ()
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()
LPCTSTR | GetIconID (WORD wFlags)
LPCTSTR | GetIconID (WORD wFlags)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
void | PositionControls ()
void | PositionControls ()

Protected Attributes

HGLOBAL | m_hDlgTmp
UINT m_nBaseID
int | m_nCancel
int | m_nDefButton
CButton * | m_pButtons
DWORD * | m_pHelpIDs
CStatic | m_staticIcon
CStatic | m_staticText
CStringArray | m_strArray
CString | m_strCaption
CString | m_strText
WORD | m_wStyle

Detailed Description

Definition at line 15 of file buttondi.h.

Constructor & Destructor Documentation

CButtonDialog::CButtonDialog | ( | LPCTSTR | lpszText,
 |  | LPCTSTR | lpszCaption,
 |  | LPCTSTR | lpszButtons,
 |  | WORD | wStyle,
 |  | DWORD * | pHelpIDs = NULL,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |

Definition at line 43 of file buttondi.cpp.

                    : CCSDialog()
{

  ASSERT(lpszText != NULL);
  ASSERT(lpszCaption != NULL);
  if (HIWORD(lpszText) == NULL)
    VERIFY(m_strText.LoadString(LOWORD((DWORD)(DWORD_PTR)lpszText)));
  else
    m_strText = lpszText;
  if (HIWORD(lpszCaption) == NULL)
    VERIFY(m_strCaption.LoadString(LOWORD((DWORD)(DWORD_PTR)lpszCaption)));
  else
    m_strCaption = lpszCaption;
  if (lpszButtons != NULL)
    AddButtons(lpszButtons);

  m_pParentWnd = pParentWnd;
  m_nDefButton = 0;
  m_nCancel = -1;
  m_pButtons = NULL;
  m_wStyle = wStyle;
  m_nBaseID = nFontSize; // don't use IDOK, IDCANCEL, etc
  m_hDlgTmp = NULL;

  LOGFONT lf;
  memcpy_s(&lf, sizeof(LOGFONT), &theApp.m_lf, sizeof(LOGFONT));
  lf.lfHeight = -nFontSize;
  lf.lfWidth = 0;
  lf.lfWeight = FW_NORMAL;
  VERIFY(m_font.CreateFontIndirect(&lf));

//  m_font.CreateFont(-nFontSize, 0, 0, 0, FW_NORMAL, FALSE, FALSE,
//      FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
//      DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, szFontName);
  m_pHelpIDs = pHelpIDs;
}

CButtonDialog::~CButtonDialog ( )

Definition at line 82 of file buttondi.cpp.

{
  delete [] m_pButtons;
  if (m_hDlgTmp != NULL)
    GlobalFree(m_hDlgTmp);
}

CButtonDialog::CButtonDialog | ( | LPCTSTR | lpszText,
 |  | LPCTSTR | lpszCaption,
 |  | LPCTSTR | lpszButtons,
 |  | WORD | wStyle,
 |  | DWORD * | pHelpIDs = NULL,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |
CButtonDialog::~CButtonDialog ( )

Member Function Documentation

void CButtonDialog::AddButton ( CString & strButton ) [inline]

Definition at line 30 of file buttondi.h.

{ m_strArray.Add(strButton);}

void CButtonDialog::AddButton ( CString & strButton ) [inline]

Definition at line 31 of file buttondi.h.

{ m_strArray.Add(strButton);}

void CButtonDialog::AddButtons ( LPCTSTR lpszButton )
void CButtonDialog::AddButtons ( LPCTSTR lpszButton )

Definition at line 154 of file buttondi.cpp.

{
  CString str, strButtons;
  int i=0;
  if (HIWORD(lpszButton) == NULL)
    strButtons.LoadString(LOWORD((DWORD)(DWORD_PTR)lpszButton));
  else
    strButtons = lpszButton;
  while (AfxExtractSubString(str, strButtons, i++, '\n'))
    AddButton(str);
}

int CButtonDialog::DisplayMessageBox | ( | LPCTSTR | lpszText,
 |  | LPCTSTR | lpszCaption,
 |  | LPCTSTR | lpszButtons,
 |  | WORD | wStyle,
 |  | int | nDef = 0,
 |  | int | nCancel = -1,
 |  | DWORD * | pHelpIDs = NULL,
 |  | CWnd * | pParentWnd = NULL |
 | ) |  |  | [static]

Definition at line 32 of file buttondi.cpp.

{
  CButtonDialog dlg(lpszText, lpszCaption, lpszButtons, wStyle, pHelpIDs,
    pParentWnd);
  dlg.SetDefault(nDef);
  dlg.SetCancel(nCancel);
  return dlg.DoModal();
}

static int CButtonDialog::DisplayMessageBox | ( | LPCTSTR | lpszText,
 |  | LPCTSTR | lpszCaption,
 |  | LPCTSTR | lpszButtons,
 |  | WORD | wStyle,
 |  | int | nDef = 0,
 |  | int | nCancel = -1,
 |  | DWORD * | pHelpIDs = NULL,
 |  | CWnd * | pParentWnd = NULL |
 | ) |  |  | [static]
INT_PTR CButtonDialog::DoModal ( void ) [virtual]

Definition at line 217 of file buttondi.cpp.

{
  ASSERT(m_strArray.GetSize() != 0);
  if (m_strArray.GetSize() == 0)
    return (m_nCancel != -1) ? m_nCancel : 0;

  // compute size of header
  // Fixed portions of DLG template header = sizeof(DLGTEMPLATE);
  // One null byte for menu name and one for class name = 2
  // Caption text plus NULL = m_strCaption.GetLength()+1
  int nSize = sizeof(DLGTEMPLATE);
  nSize += (2 + m_strCaption.GetLength()+1+lstrlen(theApp.m_lf.lfFaceName)+1)*2 +sizeof(WORD);
  m_hDlgTmp = GlobalAlloc(GPTR, nSize);
  if (m_hDlgTmp == NULL)
    return IDCANCEL;
  LPDLGTEMPLATE lpDlgTmp = (LPDLGTEMPLATE)GlobalLock(m_hDlgTmp);
  FillInHeader(lpDlgTmp);
  GlobalUnlock(m_hDlgTmp);
  InitModalIndirect(m_hDlgTmp);

  return CCSDialog::DoModal();
}

virtual INT_PTR CButtonDialog::DoModal ( ) [virtual]
void CButtonDialog::FillInHeader ( LPDLGTEMPLATE lpDlgTmp )
void CButtonDialog::FillInHeader ( LPDLGTEMPLATE lpDlgTmp )

Definition at line 170 of file buttondi.cpp.

{
  USES_CONVERSION;
  lpDlgTmp->style = DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE |
    WS_CAPTION | WS_SYSMENU;
  if (theApp.m_bWin4)
    lpDlgTmp->style |= DS_CONTEXTHELP;
  lpDlgTmp->dwExtendedStyle = 0;
  lpDlgTmp->cdit = 0;
  lpDlgTmp->x = 0;
  lpDlgTmp->y = 0;
  lpDlgTmp->cx = 100;
  lpDlgTmp->cy = 100;

  LPWSTR lpStr = (LPWSTR)(lpDlgTmp + 1); /* Move ptr to the variable fields */

  *lpStr++ = 0;  /* No Menu resource for Message Box */
  *lpStr++ = 0;  /* No Class name for MessageBox */

  int nLen = m_strCaption.GetLength();
  wcscpy_s(lpStr, sizeof(DLGTEMPLATE), CT2CW(m_strCaption));

  lpStr += nLen+1;
  WORD* pWord = (WORD*)lpStr;
  *pWord = 10; // 10 pt font
  pWord++;
  lpStr = (LPWSTR) pWord;

  wcscpy_s(lpStr, sizeof(DLGTEMPLATE),CT2W(theApp.m_lf.lfFaceName));
}

CSize CButtonDialog::GetBaseUnits ( ) [protected]

Definition at line 337 of file buttondi.cpp.

{
  CDisplayIC dc;
  CFont* pFont = dc.SelectObject(&m_font);
  TEXTMETRIC tm;
  VERIFY(dc.GetTextMetrics(&tm));
  dc.SelectObject(pFont);
  return CSize(tm.tmAveCharWidth, tm.tmHeight);
}

CSize CButtonDialog::GetBaseUnits ( ) [protected]
virtual const DWORD* CButtonDialog::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 44 of file buttondi.h.

{return m_pHelpIDs;}

virtual const DWORD* CButtonDialog::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 45 of file buttondi.h.

{return m_pHelpIDs;}

LPCTSTR CButtonDialog::GetIconID ( WORD wFlags ) [protected]
LPCTSTR CButtonDialog::GetIconID ( WORD wFlags ) [protected]

Definition at line 347 of file buttondi.cpp.

{
  LPCTSTR lpszIcon = NULL;
  wFlags &= MB_ICONMASK;
  if (wFlags == MB_ICONHAND)
    lpszIcon = IDI_HAND;
  else if (wFlags == MB_ICONQUESTION)
    lpszIcon = IDI_QUESTION;
  else if (wFlags == MB_ICONEXCLAMATION)
    lpszIcon = IDI_EXCLAMATION;
  else if (wFlags == MB_ICONASTERISK)
    lpszIcon = IDI_ASTERISK;
  return lpszIcon;
}

virtual BOOL CButtonDialog::OnCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [virtual]
BOOL CButtonDialog::OnCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [virtual]

Definition at line 204 of file buttondi.cpp.

{
  if (wParam == IDCANCEL && m_nCancel != -1)
  {
    EndDialog(m_nCancel);
    return TRUE;
  }
  if (::GetDlgItem(m_hWnd, (int)wParam)==NULL)
    return FALSE;
  EndDialog((int)wParam-m_nBaseID);
  return TRUE;
}

afx_msg int CButtonDialog::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int CButtonDialog::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 98 of file buttondi.cpp.

{
  if (m_pHelpIDs != NULL)
  {
    for (int i=0;i<m_strArray.GetSize();i++)
      m_pHelpIDs[i*2] = i+m_nBaseID;
  }
  if (CCSDialog::OnCreate(lpCreateStruct) == -1)
    return -1;

  SetWindowText(m_strCaption);
  m_pButtons = new CButton[m_strArray.GetSize()];

  CRect rect(0, 0, 10, 10);
  if (!m_staticIcon.Create(NULL,
    SS_ICON | WS_GROUP | WS_CHILD | WS_VISIBLE, rect, this))
  {
    return -1;
  }
  m_staticIcon.SetIcon(::LoadIcon(NULL, GetIconID(m_wStyle)));

  if (!m_staticText.Create(m_strText, SS_LEFT | SS_NOPREFIX | WS_GROUP |
    WS_CHILD | WS_VISIBLE, rect, this))
  {
    return -1;
  }
  m_staticText.SetFont(&m_font);

  for (int i=0;i<m_strArray.GetSize();i++)
  {
    if (!m_pButtons[i].Create(m_strArray[i], WS_TABSTOP | WS_CHILD |
      WS_VISIBLE | ((i == 0) ? WS_GROUP : 0) |
      ((i == m_nDefButton) ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON),
      rect, this, i+m_nBaseID))
    {
      return -1;
    }
    m_pButtons[i].SetFont(&m_font);
  }
  PositionControls();
  return 0;
}

virtual BOOL CButtonDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

BOOL CButtonDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

Definition at line 141 of file buttondi.cpp.

{
  CCSDialog::OnInitDialog();
  if (m_pHelpIDs == NULL) // no context help
    ModifyStyleEx(WS_EX_CONTEXTHELP, 0); //remove

  m_pButtons[m_nDefButton].SetFocus();
  return FALSE;  // return TRUE  unless you set the focus to a control
}

void CButtonDialog::PositionControls ( ) [protected]
void CButtonDialog::PositionControls ( ) [protected]

Definition at line 243 of file buttondi.cpp.

{
  CSize sizeBase = GetBaseUnits();
  int nButtonHeight = (sizeBase.cy*14)/8;
  int nHeight = 0;
  int nSep,nLeftMargin,nRightMargin,nTopMargin,nBottomMargin;
  int nButtonAdj;
  int nWidth = 0;
  CRect rectText;

  // a) 5/8 screen Width
  // b) Caption
  // c) nLeftMargin ICON nSep TEXT nRightMargin
  // d) nLeftMargin Button1 nSep Button2 ... nRightMargin
  // client width is max(b,d, min(c,a))

  CSize sizeIcon(GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON));
  nSep = sizeIcon.cx/2;
  nLeftMargin = nSep;
  nRightMargin = nSep;
  nTopMargin = nSep;
  nBottomMargin = nSep;

  CClientDC dc(this);
  CFont* pOldFont = dc.SelectObject(&m_font);

  nButtonAdj = dc.GetTextExtent(_T("XXX"),3).cx; // padding on buttons

  int nScreenWidth58 = dc.GetDeviceCaps(HORZRES)*5/8;
  int nCaptionWidth = dc.GetTextExtent(m_strCaption, m_strCaption.
    GetLength()).cx;
  CSize sizeText = dc.GetTextExtent(m_strText,m_strText.GetLength());
  int nTextIconWidth = nLeftMargin+sizeIcon.cx+nSep+sizeText.cx+nRightMargin;
  INT_PTR nButtons = m_strArray.GetSize();
  int nButtonsWidth = (int)(nLeftMargin+nRightMargin+(nButtons-1)*nSep);
  INT_PTR i;
  for (i=0;i<nButtons;i++)
  {
    nButtonsWidth +=
      dc.GetTextExtent(m_strArray[i],m_strArray[i].GetLength()).cx+
      nButtonAdj*2;
  }

  nWidth = min(nTextIconWidth,nScreenWidth58);
  nWidth = max(nWidth, nCaptionWidth);
  nWidth = max(nWidth, nButtonsWidth);

  m_staticIcon.SetWindowPos(NULL, nLeftMargin, nTopMargin, sizeIcon.cx,
    sizeIcon.cy, SWP_NOZORDER);

  if (sizeText.cx > nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep)
  {
    sizeText.cx = nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep;
//      int nTextWidth = nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep;
//      rectText.SetRect(0, 0, nTextWidth, 32767);
    rectText.SetRect(0, 0, sizeText.cx, 32767);
    /* Ask DrawText for the right cy */
    sizeText.cy = dc.DrawText(m_strText, m_strText.GetLength(), &rectText,
      DT_CALCRECT | DT_WORDBREAK | DT_EXPANDTABS | DT_NOPREFIX);
  }

  m_staticText.SetWindowPos(NULL, nSep+sizeIcon.cx+nSep, nTopMargin,
    sizeText.cx, sizeText.cy, SWP_NOZORDER);

  sizeText.cy = max(sizeText.cy, sizeIcon.cy); // at least icon height
  nHeight = nTopMargin + sizeText.cy + nSep + nButtonHeight + nBottomMargin;

  CRect rect;
  rect.left = (nWidth - (nButtonsWidth - nLeftMargin - nRightMargin))/2;
  rect.top = nTopMargin + sizeText.cy + nSep;
  rect.bottom = rect.top + nButtonHeight;

  for (i=0;i<m_strArray.GetSize();i++)
  {
    rect.right = rect.left + dc.GetTextExtent(m_strArray[i],m_strArray[i].GetLength()).cx +
      2*nButtonAdj;
    m_pButtons[i].MoveWindow(&rect);
    rect.left = rect.right + nSep;
  }

  rect.SetRect(0,0,nWidth,nHeight);
  CalcWindowRect(&rect);
  SetWindowPos(NULL, (dc.GetDeviceCaps(HORZRES)-rect.Width())/2,
    (dc.GetDeviceCaps(VERTRES)-rect.Height())/2, rect.Width(), rect.Height(),
    SWP_NOZORDER|SWP_NOACTIVATE);
  if(m_nCancel == -1) // no cancel button
  {
//      CMenu* pMenu = GetSystemMenu(FALSE);
//      if (pMenu != NULL)
//          pMenu->DeleteMenu(SC_CLOSE, MF_BYCOMMAND);
  }
  dc.SelectObject(pOldFont);
}

void CButtonDialog::SetCancel ( int nCancel ) [inline]

Definition at line 33 of file buttondi.h.

    { ASSERT(nCancel < m_strArray.GetSize()); m_nCancel = nCancel;}

void CButtonDialog::SetCancel ( int nCancel ) [inline]

Definition at line 32 of file buttondi.h.

    { ASSERT(nCancel < m_strArray.GetSize()); m_nCancel = nCancel;}

void CButtonDialog::SetDefault ( int nDef ) [inline]

Definition at line 34 of file buttondi.h.

    { ASSERT(nDef < m_strArray.GetSize()); m_nDefButton = nDef;}

void CButtonDialog::SetDefault ( int nDef ) [inline]

Definition at line 35 of file buttondi.h.

    { ASSERT(nDef < m_strArray.GetSize()); m_nDefButton = nDef;}

Member Data Documentation

CFont CButtonDialog::m_font

Definition at line 24 of file buttondi.h.

HGLOBAL CButtonDialog::m_hDlgTmp [protected]

Definition at line 48 of file buttondi.h.

UINT CButtonDialog::m_nBaseID [protected]

Definition at line 49 of file buttondi.h.

int CButtonDialog::m_nCancel [protected]

Definition at line 47 of file buttondi.h.

int CButtonDialog::m_nDefButton [protected]

Definition at line 46 of file buttondi.h.

CButton * CButtonDialog::m_pButtons [protected]

Definition at line 51 of file buttondi.h.

DWORD * CButtonDialog::m_pHelpIDs [protected]

Definition at line 45 of file buttondi.h.

CStatic CButtonDialog::m_staticIcon [protected]

Definition at line 52 of file buttondi.h.

CStatic CButtonDialog::m_staticText [protected]

Definition at line 53 of file buttondi.h.

CStringArray CButtonDialog::m_strArray [protected]

Definition at line 56 of file buttondi.h.

CString CButtonDialog::m_strCaption [protected]

Definition at line 54 of file buttondi.h.

CString CButtonDialog::m_strText [protected]

Definition at line 55 of file buttondi.h.

WORD CButtonDialog::m_wStyle [protected]

Definition at line 50 of file buttondi.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/buttondi.h
  • vc2008fp/WordPad/buttondi.h
  • ole/wordpad/buttondi.cpp
  • vc2008fp/WordPad/buttondi.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CButtonPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CButtonPropPage Class Reference

#include "btnppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_BUTTON }

Public Member Functions

CButtonPropPage ()

Public Attributes

CString | m_Caption

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file btnppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file btnppg.h.

{ IDD = IDD_PROPPAGE_BUTTON };

Constructor & Destructor Documentation

CButtonPropPage::CButtonPropPage ( )

Definition at line 58 of file btnppg.cpp.

                                 :
  COlePropertyPage(IDD, IDS_BUTTON_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CButtonPropPage)
  m_Caption = _T("");
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CButtonPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 70 of file btnppg.cpp.

{
  //{{AFX_DATA_MAP(CButtonPropPage)
  DDP_Text(pDX, IDC_CAPTIONEDIT, m_Caption, _T("Caption") );
  DDX_Text(pDX, IDC_CAPTIONEDIT, m_Caption);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

CString CButtonPropPage::m_Caption

Definition at line 27 of file btnppg.h.

The documentation for this class was generated from the following files:
  • controls/button/btnppg.h
  • controls/button/btnppg.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCalcApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCalcApp Class Reference

#include "mfccalc.h"

List of all members.

Public Member Functions

CCalcApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 23 of file mfccalc.h.

Constructor & Destructor Documentation

CCalcApp::CCalcApp ( )

Definition at line 35 of file mfccalc.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CCalcApp::InitInstance ( ) [virtual]

Definition at line 49 of file mfccalc.cpp.

{
  // Initialize OLE 2.0 libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Parse the command line to see if launched as OLE server
  if (RunEmbedded() || RunAutomated())
  {
    // Register all OLE server (factories) as running.  This enables the
    //  OLE 2.0 libraries to create objects from other applications.
    COleTemplateServer::RegisterAll();

    // Do not continue with rest of initialization.  Wait for
    // client to create a CCalcDlg object instead.
    return TRUE;
  }

  // When a server application is launched stand-alone, it is a good idea
  //  to update the system registry in case it has been damaged.
  COleObjectFactory::UpdateRegistryAll();

  // create a modeless dialog as the main window of the application
  //This disables the warning that the dialog could leak -
  //it will not leak since the Set Visible registers the dialog as
  //the main frame and any windows message that closes that dialog
  //causes the parent class to call the destructor
  #pragma warning( push )
  #pragma warning(disable:6014)
  CCalcDlg* pDlg = new CCalcDlg;
  #pragma warning( pop )
  pDlg->SetVisible(TRUE);
  if (!pDlg->GetVisible())
  {
    // if GetVisible fails after SetVisibile, we never registered
    // the pDlg with the parent class, and it will not be deleted
    AfxMessageBox(IDP_UNABLE_TO_SHOW_CALC);
    delete pDlg;
    return FALSE;
  }
  pDlg->RegisterActive();

  // We are using a modeless dialog so we can translate accelerator keys
  // against the dialog.  In order to run the main message pump,
  // InitInstance must return TRUE even though this application is
  // a dialog-based application.
  return TRUE;
}

The documentation for this class was generated from the following files:
  • ole/mfccalc/mfccalc.h
  • ole/mfccalc/mfccalc.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCalcDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CCalcDlg Class Reference

#include "calcdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_MFCCALC_DIALOG }

Public Member Functions

CCalcDlg (CWnd *pParent=NULL)
virtual | ~CCalcDlg ()
afx_msg BOOL | Button (LPCTSTR szButton)
afx_msg void | Clear ()
afx_msg void | Close ()
afx_msg void | Display ()
afx_msg BOOL | Evaluate ()
afx_msg long | GetAccum ()
afx_msg long | GetOperand ()
afx_msg short | GetOperation ()
afx_msg BOOL | GetVisible ()
virtual void | OnCancel ()
afx_msg void | OnClickedClear ()
afx_msg void | OnClickedDivide ()
afx_msg void | OnClickedEqual ()
afx_msg void | OnClickedMinus ()
afx_msg void | OnClickedNumber (UINT nID)
afx_msg void | OnClickedPlus ()
afx_msg void | OnClickedTimes ()
virtual BOOL | OnInitDialog ()
virtual void | OnOK ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSetFocusAccum ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
BOOL | RegisterActive ()
afx_msg void | SetAccum (long nNewValue)
afx_msg void | SetOperand (long nNewValue)
afx_msg void | SetOperation (short nNewValue)
afx_msg void | SetVisible (BOOL bNewValue)

Protected Member Functions

void | ClickedNumber (long lNum)
virtual void | DoDataExchange (CDataExchange *pDX)
void | PerformOperation ()
virtual void | PostNcDestroy ()
void | UpdateDisplay ()

Protected Attributes

long | m_accum
BOOL | m_bAutoDelete
BOOL | m_bOperandAvail
DWORD | m_dwRegister
CalcError m_errorState
HACCEL | m_hAccel
HICON | m_hIcon
long | m_operand
Operator m_operator

Detailed Description

Definition at line 18 of file calcdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 29 of file calcdlg.h.

{ IDD = IDD_MFCCALC_DIALOG };

Constructor & Destructor Documentation

CCalcDlg::CCalcDlg ( CWnd * pParent = NULL )

Definition at line 107 of file calcdlg.cpp.

  : CDialog(CCalcDlg::IDD, pParent)
{
  m_bAutoDelete = TRUE;       // default to auto-delete
  m_dwRegister = 0;               // not registered as active by default

  //{{AFX_DATA_INIT(CCalcDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT

  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

  // Note that LoadAccelerator does not require DestroyAcceleratorTable
  m_hAccel = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDD));

  // clear the contents of the calculator and reset state
  OnClickedClear();

  // enable this object for OLE automation
  EnableAutomation();
}

CCalcDlg::~CCalcDlg ( ) [virtual]

Definition at line 130 of file calcdlg.cpp.

{
  if (m_dwRegister != 0)
    RevokeActiveObject(m_dwRegister, NULL);
}

Member Function Documentation

BOOL CCalcDlg::Button ( LPCTSTR szButton )

Definition at line 475 of file calcdlg.cpp.

{
  switch (szButton[0])
  {
  case 'c':
  case 'C':
    OnClickedClear();
    break;

  case '/':
    OnClickedDivide();
    break;
  case '+':
    OnClickedPlus();
    break;
  case '-':
    OnClickedMinus();
    break;
  case '*':
    OnClickedTimes();
    break;
  case '=':
    OnClickedEqual();
    break;

  default:
    if (szButton[0] >= '0' && szButton[0] <= '9')
      ClickedNumber(szButton[0] - '0');
    else
      return FALSE;
    break;
  }
  return TRUE;
}

void CCalcDlg::Clear ( )

Definition at line 451 of file calcdlg.cpp.

{
  OnClickedClear();
}

void CCalcDlg::ClickedNumber ( long lNum ) [protected]

Definition at line 175 of file calcdlg.cpp.

{
  if (m_errorState != ErrNone)
    return;

  if (!m_bOperandAvail)
    m_operand = 0L;

  SetOperand(m_operand*10+l);
  UpdateDisplay();
}

void CCalcDlg::Close ( )

Definition at line 461 of file calcdlg.cpp.

{
  if (m_hWnd == NULL)
  {
    AfxPostQuitMessage(0);
    return;
  }

  BOOL bAutoDelete = m_bAutoDelete;
  m_bAutoDelete = FALSE;
  DestroyWindow();
  m_bAutoDelete = bAutoDelete;
}

void CCalcDlg::Display ( )

Definition at line 456 of file calcdlg.cpp.

{
  UpdateDisplay();
}

void CCalcDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 136 of file calcdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CCalcDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

BOOL CCalcDlg::Evaluate ( )

Definition at line 445 of file calcdlg.cpp.

{
  OnClickedEqual();
  return m_errorState == ErrNone;
}

long CCalcDlg::GetAccum ( )

Definition at line 382 of file calcdlg.cpp.

{
  return m_accum;
}

long CCalcDlg::GetOperand ( )

Definition at line 392 of file calcdlg.cpp.

{
  return m_operand;
}

short CCalcDlg::GetOperation ( )

Definition at line 403 of file calcdlg.cpp.

{
#pragma warning(disable:4244)
  return m_operator;
#pragma warning(default:4244)
}

BOOL CCalcDlg::GetVisible ( )

Definition at line 415 of file calcdlg.cpp.

{
  return m_hWnd != NULL && (GetStyle() & WS_VISIBLE) != 0;
}

void CCalcDlg::OnCancel ( ) [virtual]

Definition at line 358 of file calcdlg.cpp.

{
  DestroyWindow();
}

void CCalcDlg::OnClickedClear ( )

Definition at line 304 of file calcdlg.cpp.

{
  m_operator = OpNone;
  m_operand = 0L;
  m_accum = 0L;
  m_bOperandAvail = FALSE;
  m_errorState = ErrNone;
  UpdateDisplay();
}

void CCalcDlg::OnClickedDivide ( )

Definition at line 314 of file calcdlg.cpp.

{
  PerformOperation();
  m_operator = OpDivide;
}

void CCalcDlg::OnClickedEqual ( )

Definition at line 320 of file calcdlg.cpp.

{
  PerformOperation();
  m_operator = OpNone;
}

void CCalcDlg::OnClickedMinus ( )

Definition at line 326 of file calcdlg.cpp.

{
  PerformOperation();
  m_operator = OpSubtract;
}

void CCalcDlg::OnClickedNumber ( UINT nID )

Definition at line 298 of file calcdlg.cpp.

{
  ASSERT(nID >= IDB_0 && nID <= IDB_9);
  ClickedNumber(nID - IDB_0);
}

void CCalcDlg::OnClickedPlus ( )

Definition at line 332 of file calcdlg.cpp.

{
  PerformOperation();
  m_operator = OpAdd;
}

void CCalcDlg::OnClickedTimes ( )

Definition at line 338 of file calcdlg.cpp.

{
  PerformOperation();
  m_operator = OpMultiply;
}

BOOL CCalcDlg::OnInitDialog ( ) [virtual]

Definition at line 223 of file calcdlg.cpp.

{
  CDialog::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  CString strAboutMenu;
  strAboutMenu.LoadString(IDS_ABOUTBOX);
  if (!strAboutMenu.IsEmpty())
  {
    pSysMenu->AppendMenu(MF_SEPARATOR);
    pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  }

  pSysMenu->RemoveMenu(SC_MAXIMIZE, MF_BYCOMMAND);
  pSysMenu->RemoveMenu(SC_SIZE, MF_BYCOMMAND);

  // want focus to stay on the dialog itself (until a button is clicked)
  SetFocus();
  return FALSE;
}

void CCalcDlg::OnOK ( ) [virtual]

Definition at line 363 of file calcdlg.cpp.

{
}

void CCalcDlg::OnPaint ( )

Definition at line 267 of file calcdlg.cpp.

{
  if (!IsIconic())
  {
    CDialog::OnPaint();
    return;
  }

  CPaintDC dc(this); // device context for painting

  SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

  // Center icon in client rectangle
  int cxIcon = GetSystemMetrics(SM_CXICON);
  int cyIcon = GetSystemMetrics(SM_CYICON);
  CRect rect;
  GetClientRect(&rect);
  int x = (rect.Width() - cxIcon + 1) / 2;
  int y = (rect.Height() - cyIcon + 1) / 2;

  // Draw the icon
  dc.DrawIcon(x, y, m_hIcon);
}

HCURSOR CCalcDlg::OnQueryDragIcon ( )

Definition at line 293 of file calcdlg.cpp.

{
  return (HCURSOR)m_hIcon;
}

void CCalcDlg::OnSetFocusAccum ( )

Definition at line 367 of file calcdlg.cpp.

{
  GetDlgItem(IDC_INVISIBLE_FOCUS)->SetFocus();
}

void CCalcDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam
 | ) |  |

Definition at line 250 of file calcdlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDialog::OnSysCommand(nID, lParam);
  }
}

void CCalcDlg::PerformOperation ( ) [protected]

Definition at line 147 of file calcdlg.cpp.

{
  if (m_errorState != ErrNone)
    return;

  if (m_bOperandAvail)
  {
    if (m_operator == OpNone)
      m_accum = m_operand;
    else if (m_operator == OpMultiply)
      m_accum *= m_operand;
    else if (m_operator == OpDivide)
    {
      if (m_operand == 0)
        m_errorState = ErrDivideByZero;
      else
        m_accum /= m_operand;
    }
    else if (m_operator == OpAdd)
      m_accum += m_operand;
    else if (m_operator == OpSubtract)
      m_accum -= m_operand;
  }

  m_bOperandAvail = FALSE;
  UpdateDisplay();
}

void CCalcDlg::PostNcDestroy ( ) [protected, virtual]

Definition at line 352 of file calcdlg.cpp.

{
  if (m_bAutoDelete)
    delete this;
}

BOOL CCalcDlg::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 344 of file calcdlg.cpp.

{
  if (m_hAccel != NULL && TranslateAccelerator(m_hWnd, m_hAccel, pMsg))
    return TRUE;

  return CDialog::PreTranslateMessage(pMsg);
}

BOOL CCalcDlg::RegisterActive ( )

Definition at line 375 of file calcdlg.cpp.

{
  // attempt to register as the active object for the CCalcDlg CLSID
  return RegisterActiveObject(GetInterface(&IID_IUnknown),
    CCalcDlg::guid, NULL, &m_dwRegister) == NOERROR;
}

void CCalcDlg::SetAccum ( long nNewValue )

Definition at line 387 of file calcdlg.cpp.

{
  m_accum = nNewValue;
}

void CCalcDlg::SetOperand ( long nNewValue )

Definition at line 397 of file calcdlg.cpp.

{
  m_operand = nNewValue;
  m_bOperandAvail = TRUE;
}

void CCalcDlg::SetOperation ( short nNewValue )

Definition at line 410 of file calcdlg.cpp.

{
  m_operator = (Operator)nNewValue;
}

void CCalcDlg::SetVisible ( BOOL bNewValue )

Definition at line 420 of file calcdlg.cpp.

{
  if (bNewValue == GetVisible())
    return;

  if (bNewValue)
  {
    // create it if necessary
    if (m_hWnd == NULL && !Create(CCalcDlg::IDD))
      return;

    // set up as the active window for the application
    if (AfxGetThread()->m_pMainWnd == NULL)
      AfxGetThread()->m_pMainWnd = this;

    // show it
    ShowWindow(SW_SHOWNORMAL);
  }
  else
  {
    if (m_hWnd != NULL)
      ShowWindow(SW_HIDE);
  }
}

void CCalcDlg::UpdateDisplay ( ) [protected]

Definition at line 187 of file calcdlg.cpp.

{
  if (GetSafeHwnd() == NULL)
    return;

  CString str;
  if (m_errorState != ErrNone)
    str.LoadString(IDS_ERROR);
  else
  {
    long lVal = (m_bOperandAvail) ? m_operand : m_accum;
    str.Format(_T("%ld"), lVal);
  }
  GetDlgItem(IDE_ACCUM)->SetWindowText(str);
  GetDlgItem(IDC_INVISIBLE_FOCUS)->SetFocus();
}

Member Data Documentation

long CCalcDlg::m_accum [protected]

Definition at line 55 of file calcdlg.h.

BOOL CCalcDlg::m_bAutoDelete [protected]

Definition at line 51 of file calcdlg.h.

BOOL CCalcDlg::m_bOperandAvail [protected]

Definition at line 59 of file calcdlg.h.

DWORD CCalcDlg::m_dwRegister [protected]

Definition at line 52 of file calcdlg.h.

CalcError CCalcDlg::m_errorState [protected]

Definition at line 58 of file calcdlg.h.

HACCEL CCalcDlg::m_hAccel [protected]

Definition at line 49 of file calcdlg.h.

HICON CCalcDlg::m_hIcon [protected]

Definition at line 48 of file calcdlg.h.

long CCalcDlg::m_operand [protected]

Definition at line 56 of file calcdlg.h.

Operator CCalcDlg::m_operator [protected]

Definition at line 57 of file calcdlg.h.

The documentation for this class was generated from the following files:
  • ole/mfccalc/calcdlg.h
  • ole/mfccalc/calcdlg.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCalcDrivApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCalcDrivApp Class Reference

#include "calcdriv.h"

List of all members.

Public Member Functions

CCalcDrivApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 22 of file calcdriv.h.

Constructor & Destructor Documentation

CCalcDrivApp::CCalcDrivApp ( )

Definition at line 34 of file calcdriv.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CCalcDrivApp::InitInstance ( ) [virtual]

Definition at line 48 of file calcdriv.cpp.

{
#ifdef _DEBUG
  // turn on extra memory tracking
  afxMemDF |= checkAlwaysMemDF;
#endif

  // Initialize OLE 2.0 libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Simple application that simply invokes a dialog
  CDriverDlg dlg;
  m_pMainWnd = &dlg;
  dlg.DoModal();

  return FALSE;   // don't run after the dialog is done
}

The documentation for this class was generated from the following files:
  • ole/calcdriv/calcdriv.h
  • ole/calcdriv/calcdriv.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCalendarBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CCalendarBar Class Reference

#include "CalendarBar.h"

List of all members.

Public Member Functions

CCalendarBar ()
virtual | ~CCalendarBar ()
virtual BOOL | Create (const RECT &rect, CWnd *pParentWnd, UINT nID=(UINT)-1)

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

CImageList | m_Images
int | m_nMyCalendarsY
CMonthCalCtrl | m_wndCalendar

Detailed Description

Definition at line 15 of file CalendarBar.h.

Constructor & Destructor Documentation

CCalendarBar::CCalendarBar ( )

Definition at line 25 of file CalendarBar.cpp.

{
  m_nMyCalendarsY = 0;
}

CCalendarBar::~CCalendarBar ( ) [virtual]

Definition at line 30 of file CalendarBar.cpp.

{
}

Member Function Documentation

BOOL CCalendarBar::Create | ( | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID = (UINT)-1 |
 | ) |  |  | [virtual]

Definition at line 81 of file CalendarBar.cpp.

{
  return CWnd::Create(NULL, _T(""), WS_CHILD | WS_VISIBLE, rect, pParentWnd, nID);
}

int CCalendarBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 45 of file CalendarBar.cpp.

{
  if (CWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy(0, 0, 0, 0);
  m_wndCalendar.Create(WS_CHILD | WS_VISIBLE, rectDummy, this, 1);

  CBitmap bmp;
  bmp.LoadBitmap(IDB_PAGES_SMALL_HC);

  m_Images.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 0);
  m_Images.Add(&bmp, RGB(255, 0, 255));

  return 0;
}

BOOL CCalendarBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 62 of file CalendarBar.cpp.

{
  return TRUE;
}

void CCalendarBar::OnPaint ( ) [protected]

Definition at line 86 of file CalendarBar.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectClient;
  GetClientRect(rectClient);

  dc.FillRect(rectClient, &afxGlobalData.brWindow);

  if (rectClient.bottom - m_nMyCalendarsY > 0)
  {
    CRect rectMyCalendarsCaption = rectClient;
    rectMyCalendarsCaption.top = m_nMyCalendarsY;
    rectMyCalendarsCaption.bottom = rectMyCalendarsCaption.top + afxGlobalData.GetTextHeight(TRUE) * 3 / 2;

    COLORREF clrText = CMFCVisualManager::GetInstance()->OnDrawPaneCaption(&dc, NULL, FALSE, rectMyCalendarsCaption, CRect(0, 0, 0, 0));

    CPen* pOldPen = dc.SelectObject(&afxGlobalData.penBarShadow);

    dc.MoveTo(rectMyCalendarsCaption.left - 1, rectMyCalendarsCaption.top);
    dc.LineTo(rectMyCalendarsCaption.right, rectMyCalendarsCaption.top);

    dc.SelectStockObject(BLACK_PEN);

    dc.MoveTo(rectMyCalendarsCaption.left - 1, rectMyCalendarsCaption.bottom);
    dc.LineTo(rectMyCalendarsCaption.right, rectMyCalendarsCaption.bottom);

    dc.SelectObject(pOldPen);

    CRect rectText = rectMyCalendarsCaption;
    rectText.DeflateRect(10, 0);

    dc.SetBkMode(TRANSPARENT);
    dc.SetTextColor(clrText);

    CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);

    CString str = _T("My Calendars");
    dc.DrawText(str, rectText, DT_VCENTER | DT_LEFT | DT_SINGLELINE);

    CRect rectCalendar = rectClient;
    rectCalendar.top = rectMyCalendarsCaption.bottom + 5;
    rectCalendar.bottom = rectCalendar.top + afxGlobalData.GetTextHeight(TRUE) * 3 / 2 - 5;

    dc.FillSolidRect(rectCalendar, RGB(255, 255, 213));

    rectCalendar.DeflateRect(20, 0);
    m_Images.Draw(&dc, 3, rectCalendar.TopLeft(), 0);

    rectCalendar.left += 20;

    str = _T("Calendar");

    dc.SetTextColor(afxGlobalData.clrHotLinkNormalText);
    dc.DrawText(str, rectCalendar, DT_VCENTER | DT_LEFT | DT_SINGLELINE);

    dc.SelectObject(pOldFont);
  }
}

void CCalendarBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 67 of file CalendarBar.cpp.

{
  CWnd::OnSize(nType, cx, cy);

  int nMyCalendarsHeight = 70;

  if (m_wndCalendar.GetSafeHwnd() != NULL)
  {
    m_wndCalendar.SetWindowPos(NULL, nBorderSize, nBorderSize, cx - 2 * nBorderSize, cy - 2 * nBorderSize - nMyCalendarsHeight - 10, SWP_NOZORDER | SWP_NOACTIVATE);
  }

  m_nMyCalendarsY = cy - nMyCalendarsHeight;
}

Member Data Documentation

CImageList CCalendarBar::m_Images [protected]

Definition at line 25 of file CalendarBar.h.

int CCalendarBar::m_nMyCalendarsY [protected]

Definition at line 24 of file CalendarBar.h.

CMonthCalCtrl CCalendarBar::m_wndCalendar [protected]

Definition at line 23 of file CalendarBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/CalendarBar.h
  • vc2008fp/OutlookDemo/CalendarBar.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CChangeNameDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CChangeNameDlg Class Reference

List of all members.

Public Types

enum | { IDD = IDD_CHANGE_NAME }

Public Member Functions

CChangeNameDlg (CWnd *pParent=NULL)

Public Attributes

CButton | m_btnOK
CEdit | m_editDescription
int | m_shape
CString | m_strDescription
CString | m_strLinkKey

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnChange ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 30 of file svritem.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 38 of file svritem.cpp.

{ IDD = IDD_CHANGE_NAME };

Constructor & Destructor Documentation

CChangeNameDlg::CChangeNameDlg ( CWnd * pParent = NULL )

Definition at line 578 of file svritem.cpp.

  : CDialog(CChangeNameDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CChangeNameDlg)
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CChangeNameDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 592 of file svritem.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CChangeNameDlg)
  DDX_CBIndex(pDX, IDC_COMBO1, m_shape);
  DDX_Text(pDX, IDC_EDIT1, m_strDescription);
  DDX_Text(pDX, IDC_EDIT2, m_strLinkKey);
  DDX_Control(pDX, IDC_EDIT1, m_editDescription);
  DDX_Control(pDX, IDOK, m_btnOK);
  //}}AFX_DATA_MAP
}

void CChangeNameDlg::OnChange ( ) [protected]

Definition at line 611 of file svritem.cpp.

{
  if (m_btnOK.m_hWnd)
    m_btnOK.EnableWindow(m_editDescription.GetWindowTextLength() > 0);
}

BOOL CChangeNameDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 585 of file svritem.cpp.

{
  CDialog::OnInitDialog();
  OnChange(); // after DDX
  return TRUE;
}

Member Data Documentation

CButton CChangeNameDlg::m_btnOK

Definition at line 43 of file svritem.cpp.

CEdit CChangeNameDlg::m_editDescription

Definition at line 42 of file svritem.cpp.

int CChangeNameDlg::m_shape

Definition at line 39 of file svritem.cpp.

CString CChangeNameDlg::m_strDescription

Definition at line 40 of file svritem.cpp.

CString CChangeNameDlg::m_strLinkKey

Definition at line 41 of file svritem.cpp.

The documentation for this class was generated from the following file:
  • ole/hiersvr/svritem.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CChangeText Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CChangeText Class Reference

#include "dialogs.h"

List of all members.

Public Types

enum | { IDD = IDD_CHANGE_TEXT }
enum | { IDD = IDD_CHANGE_TEXT }

Public Member Functions

CChangeText (CWnd *pParent=NULL)
CChangeText (CWnd *pParent=NULL)

Public Attributes

CString | m_str

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file dialogs.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file dialogs.h.

{ IDD = IDD_CHANGE_TEXT };

anonymous enum
Enumerator:
IDD

Definition at line 23 of file dialogs.h.

{ IDD = IDD_CHANGE_TEXT };

Constructor & Destructor Documentation

CChangeText::CChangeText ( CWnd * pParent = NULL )

Definition at line 25 of file dialogs.cpp.

  : CDialog(CChangeText::IDD, pParent)
{
  //{{AFX_DATA_INIT(CChangeText)
  m_str = _T("");
  //}}AFX_DATA_INIT
}

CChangeText::CChangeText ( CWnd * pParent = NULL )

Member Function Documentation

void CChangeText::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file dialogs.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CChangeText)
  DDX_Text(pDX, IDC_EDIT1, m_str);
  //}}AFX_DATA_MAP
}

virtual void CChangeText::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Member Data Documentation

CString CChangeText::m_str

Definition at line 24 of file dialogs.h.

The documentation for this class was generated from the following files:
  • ole/acdual/dialogs.h
  • ole/autoclik/dialogs.h
  • ole/acdual/dialogs.cpp
  • ole/autoclik/dialogs.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCharFormat Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCharFormat Struct Reference

#include "stdafx.h"

List of all members.

Public Member Functions

CCharFormat ()
CCharFormat ()
CCharFormat ()
BOOL | operator== (CCharFormat &cf)
BOOL | operator== (CCharFormat &cf)
BOOL | operator== (CCharFormat &cf)

Detailed Description

Definition at line 38 of file stdafx.h.

Constructor & Destructor Documentation

CCharFormat::CCharFormat ( ) [inline]

Definition at line 40 of file stdafx.h.

{cbSize = sizeof(CHARFORMAT2);}

CCharFormat::CCharFormat ( ) [inline]

Definition at line 41 of file MSOffice2007DemoView.cpp.

{cbSize = sizeof(WPD_CHARFORMAT);}

CCharFormat::CCharFormat ( ) [inline]

Definition at line 45 of file stdafx.h.

{cbSize = sizeof(WPD_CHARFORMAT);}

Member Function Documentation

BOOL CCharFormat::operator== ( CCharFormat & cf )

Definition at line 36 of file wordpvw.cpp.

{
  return
  dwMask == cf.dwMask
  && dwEffects == cf.dwEffects
  && yHeight == cf.yHeight
  && yOffset == cf.yOffset
  && crTextColor == cf.crTextColor
  && bPitchAndFamily == cf.bPitchAndFamily
  && (lstrcmp(szFaceName, cf.szFaceName) == 0);
}

BOOL CCharFormat::operator== ( CCharFormat & cf )
BOOL CCharFormat::operator== ( CCharFormat & cf )
The documentation for this struct was generated from the following files:
  • ole/wordpad/stdafx.h
  • vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.cpp
  • vc2008fp/WordPad/stdafx.h
  • ole/wordpad/wordpvw.cpp
  • vc2008fp/WordPad/wordpvw.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCheckBoxProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CCheckBoxProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CCheckBoxProp (const CString &strName, BOOL bCheck, LPCTSTR lpszDescr=NULL, DWORD dwData=0)

Protected Member Functions

virtual BOOL | HasButton () const
virtual void | OnClickName (CPoint point)
virtual BOOL | OnDblClk (CPoint point)
virtual void | OnDrawButton (CDC *, CRect)
virtual void | OnDrawCheckBox (CDC *pDC, CRect rectCheck, BOOL bChecked)
virtual void | OnDrawName (CDC *pDC, CRect rect)
virtual void | OnDrawValue (CDC *, CRect)
virtual BOOL | OnEdit (LPPOINT)
virtual BOOL | PushChar (UINT nChar)

Protected Attributes

CRect | m_rectCheck

Detailed Description

Definition at line 12 of file CustomProperties.h.

Constructor & Destructor Documentation

CCheckBoxProp::CCheckBoxProp | ( | const CString & | strName,
 |  | BOOL | bCheck,
 |  | LPCTSTR | lpszDescr = NULL,
 |  | DWORD | dwData = 0
 | ) |  |

Definition at line 23 of file CustomProperties.cpp.

                                                                                :
  CMFCPropertyGridProperty(strName, COleVariant((long)bCheck), lpszDescr, dwData)
{
  m_rectCheck.SetRectEmpty();
}

Member Function Documentation

virtual BOOL CCheckBoxProp::HasButton ( ) const [inline, protected, virtual]

Definition at line 21 of file CustomProperties.h.

{ return FALSE; }

void CCheckBoxProp::OnClickName ( CPoint point ) [protected, virtual]

Definition at line 43 of file CustomProperties.cpp.

{
  if (m_bEnabled && m_rectCheck.PtInRect(point))
  {
    m_varValue.boolVal = !(m_varValue.boolVal);
    m_pWndList->InvalidateRect(m_rectCheck);
  }
}

BOOL CCheckBoxProp::OnDblClk ( CPoint point ) [protected, virtual]

Definition at line 52 of file CustomProperties.cpp.

{
  if (m_bEnabled && m_rectCheck.PtInRect(point))
  {
    return TRUE;
  }

  m_varValue.boolVal = !(m_varValue.boolVal);
  m_pWndList->InvalidateRect(m_rectCheck);
  return TRUE;
}

virtual void CCheckBoxProp::OnDrawButton | ( | CDC * | ,
 |  | CRect |  |
 | ) |  |  | [inline, protected, virtual]

Definition at line 19 of file CustomProperties.h.

{}

void CCheckBoxProp::OnDrawCheckBox | ( | CDC * | pDC,
 |  | CRect | rectCheck,
 |  | BOOL | bChecked |
 | ) |  |  | [protected, virtual]

Definition at line 64 of file CustomProperties.cpp.

{
  COLORREF clrTextOld = pDC->GetTextColor();

  CMFCVisualManager::GetInstance()->OnDrawCheckBox(pDC, rect, FALSE, bChecked, m_bEnabled);

  pDC->SetTextColor(clrTextOld);
}

void CCheckBoxProp::OnDrawName | ( | CDC * | pDC,
 |  | CRect | rect |
 | ) |  |  | [protected, virtual]

Definition at line 29 of file CustomProperties.cpp.

{
  m_rectCheck = rect;
  m_rectCheck.DeflateRect(1, 1);

  m_rectCheck.right = m_rectCheck.left + m_rectCheck.Height();

  rect.left = m_rectCheck.right + 1;

  CMFCPropertyGridProperty::OnDrawName(pDC, rect);

  OnDrawCheckBox(pDC, m_rectCheck, (m_varValue.boolVal));
}

virtual void CCheckBoxProp::OnDrawValue | ( | CDC * | ,
 |  | CRect |  |
 | ) |  |  | [inline, protected, virtual]

Definition at line 20 of file CustomProperties.h.

{}

virtual BOOL CCheckBoxProp::OnEdit ( LPPOINT ) [inline, protected, virtual]

Definition at line 18 of file CustomProperties.h.

{ return FALSE; }

BOOL CCheckBoxProp::PushChar ( UINT nChar ) [protected, virtual]

Definition at line 73 of file CustomProperties.cpp.

{
  if (nChar == VK_SPACE)
  {
    OnDblClk(CPoint(-1, -1));
  }

  return TRUE;
}

Member Data Documentation

CRect CCheckBoxProp::m_rectCheck [protected]

Definition at line 30 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CChildFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CChildFrame Class Reference

#include "childfrm.h"

List of all members.

Public Member Functions

CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual | ~CChildFrame ()
virtual void | ActivateFrame (int nCmdShow=-1)
virtual void | ActivateFrame (int nCmdShow)
virtual void | ActivateFrame (int nCmdShow)
virtual LPCTSTR | GetDocumentName (CObject **pObj)
virtual BOOL | IsReadOnly ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnEditPaste ()
afx_msg void | OnEditPasteSpecial ()

Protected Attributes

CSplitterWnd | m_wndSplitter

Detailed Description

Definition at line 12 of file childfrm.h.

Constructor & Destructor Documentation

CChildFrame::CChildFrame ( )

Definition at line 37 of file childfrm.cpp.

{
  // TODO: add member initialization code here

}

CChildFrame::~CChildFrame ( ) [virtual]

Definition at line 43 of file childfrm.cpp.

{
}

CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]
CChildFrame::CChildFrame ( )
virtual CChildFrame::~CChildFrame ( ) [virtual]

Member Function Documentation

void CChildFrame::ActivateFrame ( int nCmdShow ) [virtual]

Definition at line 59 of file ChildFrm.cpp.

{
  CMDIChildWndEx::ActivateFrame(nCmdShow);
}

virtual void CChildFrame::ActivateFrame ( int nCmdShow = -1 ) [virtual]
virtual void CChildFrame::ActivateFrame ( int nCmdShow ) [virtual]
LPCTSTR CChildFrame::GetDocumentName ( CObject ** pObj ) [virtual]

Definition at line 92 of file ChildFrm.cpp.

{
  if (DYNAMIC_DOWNCAST(CStartView, GetActiveView()) != NULL)
  {
    return g_strStartViewName;
  }
  return CMDIChildWndEx::GetDocumentName(pObj);
}

BOOL CChildFrame::IsReadOnly ( ) [virtual]

Definition at line 87 of file ChildFrm.cpp.

{
  return DYNAMIC_DOWNCAST(CStartView, GetActiveView()) != NULL;
}

int CChildFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 73 of file ChildFrm.cpp.

{
  if (CMDIChildWndEx::OnCreate(lpCreateStruct) == -1)
    return -1;

  return 0;
}

BOOL CChildFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [protected, virtual]

Definition at line 75 of file childfrm.cpp.

{
  return m_wndSplitter.Create(this,
    2, 2,       // TODO: adjust the number of rows, columns
    CSize(10, 10),  // TODO: adjust the minimum pane size
    pContext);
}

void CChildFrame::OnEditCopy ( ) [protected]

Definition at line 89 of file ChildFrm.cpp.

{
  // TODO: Add your command handler code here

}

void CChildFrame::OnEditCut ( ) [protected]

Definition at line 95 of file ChildFrm.cpp.

{
  // TODO: Add your command handler code here

}

void CChildFrame::OnEditPaste ( ) [protected]

Definition at line 101 of file ChildFrm.cpp.

{
  // TODO: Add your command handler code here

}

void CChildFrame::OnEditPasteSpecial ( ) [protected]

Definition at line 107 of file ChildFrm.cpp.

{
  // TODO: Add your command handler code here

}

BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 47 of file childfrm.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CMDIChildWnd::PreCreateWindow(cs);
}

virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CChildFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Member Data Documentation

CSplitterWnd CChildFrame::m_wndSplitter [protected]

Definition at line 21 of file childfrm.h.

The documentation for this class was generated from the following files:
  • controls/contain/childfrm.h
  • general/Scribble/childfrm.h
  • general/snapvw/childfrm.h
  • ole/acdual/childfrm.h
  • ole/autoclik/childfrm.h
  • vc2008fp/MDITabsDemo/ChildFrm.h
  • vc2008fp/MenuSubSet/ChildFrm.h
  • vc2008fp/RebarTest/ChildFrm.h
  • vc2008fp/RibbonMDI/ChildFrm.h
  • vc2008fp/TabbedView/ChildFrm.h
  • vc2008fp/VisualStudioDemo/ChildFrm.h
  • vc2008fp/WorkSpaceToolBar/ChildFrm.h
  • controls/contain/childfrm.cpp
  • general/Scribble/childfrm.cpp
  • general/snapvw/childfrm.cpp
  • ole/acdual/childfrm.cpp
  • ole/autoclik/childfrm.cpp
  • vc2008fp/MDITabsDemo/ChildFrm.cpp
  • vc2008fp/MenuSubSet/ChildFrm.cpp
  • vc2008fp/RebarTest/ChildFrm.cpp
  • vc2008fp/RibbonMDI/ChildFrm.cpp
  • vc2008fp/TabbedView/ChildFrm.cpp
  • vc2008fp/VisualStudioDemo/ChildFrm.cpp
  • vc2008fp/WorkSpaceToolBar/ChildFrm.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CChildView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes

CChildView Class Reference

#include "ChildView.h"

List of all members.

Public Member Functions

CChildView ()
CChildView ()
CChildView ()
virtual | ~CChildView ()
virtual | ~CChildView ()
virtual | ~CChildView ()
CSurface * | GetSurface () const
void | OnChangeSize (UINT nID)
afx_msg void | OnDestroy (void)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
void | OnFileOpenimage (void)
void | OnFileSaveImage (void)
BOOL | OnIdle (LONG lCount)
void | OnImageInfo (void)
void | OnToolsMakeBW (void)
void | OnUpdateImage (CCmdUI *pCmdUI)
void | OnUpdateSizeDouble (CCmdUI *pCmdUI)
void | OnUpdateSizeFill (CCmdUI *pCmdUI)
void | OnUpdateSizeHalf (CCmdUI *pCmdUI)
void | OnUpdateSizeOriginal (CCmdUI *pCmdUI)
void | SetImage (const CString &strPath)

Protected Member Functions

afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFileOpen ()
afx_msg void | OnFileSave ()
afx_msg void | OnImageFormats (UINT nID)
afx_msg void | OnPaint ()
afx_msg void | OnPaint ()
afx_msg void | OnPaint ()
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnUpdateFPS (CCmdUI *pCmdUI)
afx_msg void | OnUpdateImageFormats (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePauseBlit (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePauseBlur (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePauseSwarm (CCmdUI *pCmdUI)
afx_msg void | OnUpdateResolution (CCmdUI *pCmdUI)
afx_msg void | OnViewPauseBlit ()
afx_msg void | OnViewPauseBlur ()
afx_msg void | OnViewPauseSwarm ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Private Types

enum ESurface {
eNone = 0, e16BitSSE2Intrin = IDD_16BIT_SSE2INTRINSICS, e16BitMMXIntrin = IDD_16BIT_MMXINTRINSICS, e16BitGeneric = IDD_16BIT_GENERICCBLUR,
e24BitSSE2Intrin = IDD_24BIT_SSE2INTRINSICS, e24BitMMXIntrin = IDD_24BIT_MMXINTRINSICS, e24BitGeneric = IDD_24BIT_GENERICCBLUR, e32BitSSE2Intrin = IDD_32BIT_SSE2INTRINSICS,
e32BitMMXIntrin = IDD_32BIT_MMXINTRINSICS, e32BitGeneric = IDD_32BIT_GENERICCBLUR
}

Private Member Functions

void | CreateSurface ()

Private Attributes

CImage | imgOriginal
bool | m_bPauseBlit
bool | m_bPauseBlur
bool | m_bPauseSwarm
bool | m_bSizeChanged
bool | m_bTimerPopped
DWORD | m_dwTickStart
ESurface m_eSurf
CImage | m_image
int | m_nFilterLoad
int | m_nFilterSave
int | m_nFrameCounter
SizesEnum m_nImageSize
CSurface * m_pSurface
CSwarm m_swarm

Static Private Attributes

static const UINT | m_kTimerDelay = 1500
static const UINT_PTR | m_kTimerID = 31

Detailed Description

Definition at line 16 of file ChildView.h.

Member Enumeration Documentation

enum CChildView::ESurface [private]
Enumerator:
eNone
e16BitSSE2Intrin
e16BitMMXIntrin
e16BitGeneric
e24BitSSE2Intrin
e24BitMMXIntrin
e24BitGeneric
e32BitSSE2Intrin
e32BitMMXIntrin
e32BitGeneric

Definition at line 65 of file ChildView.h.

                {
    eNone       = 0,
    e16BitSSE2Intrin  = IDD_16BIT_SSE2INTRINSICS,
    e16BitMMXIntrin   = IDD_16BIT_MMXINTRINSICS,
    e16BitGeneric   = IDD_16BIT_GENERICCBLUR,
    e24BitSSE2Intrin  = IDD_24BIT_SSE2INTRINSICS,
    e24BitMMXIntrin   = IDD_24BIT_MMXINTRINSICS,
    e24BitGeneric   = IDD_24BIT_GENERICCBLUR,
    e32BitSSE2Intrin  = IDD_32BIT_SSE2INTRINSICS,
    e32BitMMXIntrin   = IDD_32BIT_MMXINTRINSICS,
    e32BitGeneric   = IDD_32BIT_GENERICCBLUR,
  };

Constructor & Destructor Documentation

CChildView::CChildView ( )

Definition at line 23 of file ChildView.cpp.

{
}

CChildView::~CChildView ( ) [virtual]

Definition at line 27 of file ChildView.cpp.

{
}

CChildView::CChildView ( )
virtual CChildView::~CChildView ( ) [virtual]
CChildView::CChildView ( )
virtual CChildView::~CChildView ( ) [virtual]

Member Function Documentation

void CChildView::CreateSurface ( ) [private]

Definition at line 337 of file ChildView.cpp.

{
  int nBits = 0;

  delete m_pSurface;
  m_pSurface = NULL;

  switch (m_eSurf) {
    case e16BitSSE2Intrin:
      nBits = 16;
      m_pSurface = new CSSE2Surface16Intrinsic();
      break;
    case e16BitMMXIntrin:
      nBits = 16;
      m_pSurface = new CMMXSurface16Intrinsic();
      break;
    case e16BitGeneric:
      nBits = 16;
      m_pSurface = new CSurface();
      break;
    case e24BitSSE2Intrin:
      nBits = 24;
      m_pSurface = new CSSE2Surface24Intrinsic();
      break;
    case e24BitMMXIntrin:
      nBits = 24;
      m_pSurface = new CMMXSurface24Intrinsic();
      break;
    case e24BitGeneric:
      nBits = 24;
      m_pSurface = new CSurface();
      break;
    case e32BitSSE2Intrin:
      nBits = 32;
      m_pSurface = new CSSE2Surface32Intrinsic();
      break;
    case e32BitMMXIntrin:
      nBits = 32;
      m_pSurface = new CMMXSurface32Intrinsic();
      break;
    case e32BitGeneric:
      nBits = 32;
      m_pSurface = new CSurface();
      break;
    default:
      ASSERT(FALSE);
      break;

  }
  ASSERT(m_pSurface != NULL);
  m_pSurface->Create(this, nBits);
    m_pSurface->ClearBits();

  CRect cRect;
  GetClientRect(&cRect);
  int numLeaders = max(2, (cRect.Width()*cRect.Height())>>16);
  int numLlamas = numLeaders*35;
  m_swarm.Initialize(m_pSurface, numLeaders, numLlamas, cRect.Size());
}

CSurface* CChildView::GetSurface ( ) const [inline]

Definition at line 31 of file ChildView.h.

  { return(m_pSurface); }

void CChildView::OnChangeSize ( UINT nID )

Definition at line 250 of file ChildView.cpp.

{
  m_nImageSize = (SizesEnum)(nID - ID_SIZE_BASE);
  Invalidate();
  UpdateWindow();
}

void CChildView::OnDestroy ( void )

Definition at line 500 of file ChildView.cpp.

{
  CWnd::OnDestroy();
  KillTimer(m_kTimerID);
}

afx_msg BOOL CChildView::OnEraseBkgnd ( CDC * pDC ) [protected]
BOOL CChildView::OnEraseBkgnd ( CDC * pDC )

Definition at line 77 of file ChildView.cpp.

{
  if (m_image.IsNull())
    return(CWnd::OnEraseBkgnd(pDC));
  return(TRUE);
}

void CChildView::OnFileOpen ( ) [protected]

Definition at line 88 of file ChildView.cpp.

{
  CImage image;
  CString strFilter;
  CString strAllFilePrompt;
  CSimpleArray<GUID> aguidFileTypes;
  HRESULT hResult;
  INT_PTR nResult;

  if (m_pSurface == NULL)
    return;
  VERIFY(strAllFilePrompt.LoadString(IDS_ALL_IMAGES));
  hResult = image.GetImporterFilterString(strFilter, aguidFileTypes, strAllFilePrompt);
  if(FAILED(hResult)) {
    CString fmt;
    fmt.Format(IDS_ERROR_GETEXPORTERFILTER, hResult, _com_error(hResult).ErrorMessage());
    ::AfxMessageBox(fmt);
    return;
  }

  CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST, strFilter);
  dlg.m_ofn.nFilterIndex = m_nFilterLoad;

  nResult = dlg.DoModal();
  if(nResult != IDOK) {
    return;
  }

  m_nFilterLoad = dlg.m_ofn.nFilterIndex;
  hResult = image.Load(dlg.GetFileName());
  ASSERT(SUCCEEDED(hResult));
  if (SUCCEEDED(hResult)) {
    m_pSurface->Import(image);
    // Stop the weird effects
    m_bPauseBlur = true;
    m_bPauseSwarm = true;
  }
}

void CChildView::OnFileOpenimage ( void )

Definition at line 97 of file ChildView.cpp.

{
  // TODO: Add your command handler code here
  CString strFilter;
  CSimpleArray<GUID> aguidFileTypes;
  HRESULT hResult;

  hResult = imgOriginal.GetExporterFilterString(strFilter,aguidFileTypes);
  if (FAILED(hResult)) {
    CString fmt;
    fmt.Format("GetExporterFilter failed:\n%x - %s", hResult, _com_error(hResult).ErrorMessage());
    ::AfxMessageBox(fmt);
    return;
  }

  CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST, strFilter);
  dlg.m_ofn.nFilterIndex = m_nFilterLoad;
  hResult = (int)dlg.DoModal();
  if(FAILED(hResult)) {
    return;
  }

  m_nFilterLoad = dlg.m_ofn.nFilterIndex;
  imgOriginal.Destroy();
  hResult = imgOriginal.Load(dlg.GetFileName());
  if (FAILED(hResult)) {
    CString fmt;
    fmt.Format("Load image failed:\n%x - %s", hResult, _com_error(hResult).ErrorMessage());
    ::AfxMessageBox(fmt);
    return;
  }

  m_nImageSize = SIZE_ORIGINAL;
  Invalidate();
  UpdateWindow();

}

void CChildView::OnFileSave ( ) [protected]

Definition at line 127 of file ChildView.cpp.

{
  CString strFilter;
  CSimpleArray<GUID> aguidFileTypes;
  CImage *pImage;
  CString fmt;
  HRESULT hResult;
  INT_PTR nResult;

  pImage = m_pSurface->GetImage();
  ASSERT(pImage != NULL);
  hResult = pImage->GetExporterFilterString( strFilter, aguidFileTypes );
  if(FAILED(hResult)) {
    fmt.Format(IDS_ERROR_GETEXPORTERFILTER, hResult, _com_error(hResult).ErrorMessage());
    ::AfxMessageBox(fmt);
    return;
  }

  CFileDialog dlg(FALSE, NULL, NULL,
    OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, strFilter);
  dlg.m_ofn.nFilterIndex = m_nFilterSave;

  nResult = dlg.DoModal();
  if( nResult != IDOK ) {
    return;
  }
  m_nFilterSave = dlg.m_ofn.nFilterIndex;
  GUID guid = m_nFilterSave > 0 ? aguidFileTypes[m_nFilterSave-1] : GUID(GUID_NULL);
  CString strFileName = dlg.GetPathName();
  if (dlg.GetFileExt().IsEmpty()) {
    if (strFileName[strFileName.GetLength()-1] == '.') {
      strFileName = strFileName.Left(strFileName.GetLength()-1);
    }
    CString strExt;
    if (m_nFilterSave == 0) {
      strExt = _T(".jpg"); // default to JPEG
    }
    else {
      // Look up the first extension in the filters
      int nCount = (m_nFilterSave*2)-1;
      int nLeft = 0;
      while (nCount) {
        if (strFilter[nLeft++] == '|') {
          nCount--;
        }
      }
      ASSERT(nLeft < strFilter.GetLength());
      strExt = strFilter.Tokenize(_T(";|"), nLeft).MakeLower();
      strExt = ::PathFindExtension(strExt);
    }
    strFileName += strExt;
  }

  hResult = pImage->Save(strFileName, guid);
  if(FAILED(hResult)) {
    fmt.Format(IDS_ERROR_SAVE, hResult, _com_error(hResult).ErrorMessage());
    ::AfxMessageBox(fmt);
  }
}

void CChildView::OnFileSaveImage ( void )

Definition at line 135 of file ChildView.cpp.

{
  CString strFilter;
  CSimpleArray<GUID> aguidFileTypes;
  HRESULT hResult;

  strFilter = "Bitmap image|*.bmp|JPEG image|*.jpg|GIF image|*.gif|PNG image|*.png||";

  CFileDialog dlg(FALSE,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_EXPLORER,strFilter);
  dlg.m_ofn.nFilterIndex = m_nFilterLoad;
  hResult = (int)dlg.DoModal();
  if (FAILED(hResult)) {
    return;
  }

    // Add the appropriate extension if the user didn't type one

  CString strFileName;
  CString strExtension;

  strFileName = dlg.m_ofn.lpstrFile;

  // add the file extension if the user didn't supply one
  if (dlg.m_ofn.nFileExtension == 0)
  {
    switch (dlg.m_ofn.nFilterIndex)
    {
    case 1:
      strExtension = "bmp";
      break;
    case 2:
      strExtension = "jpg";
      break;
    case 3:
      strExtension = "gif";
      break;
    case 4:
      strExtension = "png";
      break;
    default:
      break;
    }

    strFileName = strFileName + '.' + strExtension;

  }

  // the extension on the file name will determine the file type that is saved
  hResult = imgOriginal.Save(strFileName);
  if (FAILED(hResult)) {
    CString fmt;
    fmt.Format("Save image failed:\n%x - %s", hResult, _com_error(hResult).ErrorMessage());
    ::AfxMessageBox(fmt);
    return;
  }

}

BOOL CChildView::OnIdle ( LONG lCount )

Definition at line 217 of file ChildView.cpp.

{
  BOOL bContinue = FALSE;
  if (m_pSurface == NULL)
    return(FALSE);

  // Debugging helper for blur
  // m_pSurface->Line(CPoint(160, 120), CPoint(160, 0), RGB(255, 128, 128));
  // m_pSurface->Line(CPoint(80, 60), CPoint(240, 60), RGB(128, 128, 255));

    if (::GetAsyncKeyState(VK_SHIFT) & 0x8000) {
        m_pSurface->RandomLine((int)Random() << 15 | Random());
    bContinue = TRUE;
    }
    if (::GetAsyncKeyState(VK_DELETE) & 0x8000) {
        m_pSurface->ClearBits();
    bContinue = TRUE;
    }
    if (::GetAsyncKeyState(VK_SPACE) & 0x8000) {
        m_pSurface->RandomBits();
    bContinue = TRUE;
    }
  if (::GetAsyncKeyState(VK_UP) & 0x8000) {
    m_pSurface->ShiftBits();
    bContinue = TRUE;
  }

  // The guts...
  if (!m_bPauseBlur) {
    m_pSurface->BlurBits();
    bContinue = TRUE;
  }

  if (!m_bPauseSwarm) {
    m_swarm.Tick();
    bContinue = TRUE;
  }

  if (bContinue) {
    m_nFrameCounter++;
    if (!m_bPauseBlit) {
      m_pSurface->BlitBits();
    }
  }
  ::GdiFlush();
    return(bContinue);
}

void CChildView::OnImageFormats ( UINT nID ) [protected]

Definition at line 187 of file ChildView.cpp.

{
  ASSERT((nID >= IDD_16BIT_MMXINTRINSICS) && (nID <= IDD_32BIT_GENERICCBLUR));
  m_eSurf = ESurface(nID);
  CreateSurface();
}

void CChildView::OnImageInfo ( void )

Definition at line 243 of file ChildView.cpp.

{
  CInfoDlg infoDlg(imgOriginal);
  infoDlg.DoModal();
}

afx_msg void CChildView::OnPaint ( ) [protected]
void CChildView::OnPaint ( ) [protected]

Definition at line 64 of file ChildView.cpp.

{
  CPaintDC dc(this); // device context for painting
  // Do not call CWnd::OnPaint() for painting messages
  if (m_image.IsNull())
    return;
  CRect rect;
  GetClientRect(rect);
  // In a real app you would probably want to maintain aspect ratio.
  dc.SetStretchBltMode(HALFTONE);
  m_image.StretchBlt(dc, rect);
}

afx_msg void CChildView::OnPaint ( ) [protected]
BOOL CChildView::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 265 of file ChildView.cpp.

{
  // Add your message handler code here and/or call default
    if (nHitTest == HTCLIENT) {
        SetCursor(LoadCursor(NULL, IDC_CROSS));
        return(TRUE);
    }

  return CWnd::OnSetCursor(pWnd, nHitTest, message);
}

void CChildView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 276 of file ChildView.cpp.

{
  CWnd::OnSize(nType, cx, cy);
    if (m_hWnd && cx && cy) {
        TRACE("OnSize: width == %d, height == %d\n", cx, cy);

    // Initialize screen format
    // First time init with an hwnd
    if (m_eSurf == eNone) {
      CClientDC dc(this);
      int pixels;
      bool bWarnDepth = false;
      bool bWarnDebug = false;

      SetTimer(m_kTimerID, m_kTimerDelay, NULL);
      pixels = dc.GetDeviceCaps(BITSPIXEL) * dc.GetDeviceCaps(PLANES);
      switch (pixels) {
        case 16:
          m_eSurf = IsSSE2() ? e16BitSSE2Intrin :
            IsMMX() ? e16BitMMXIntrin : e16BitGeneric;
          break;
        case 24:
          m_eSurf =  IsSSE2() ? e24BitSSE2Intrin :
            IsMMX() ? e24BitMMXIntrin : e24BitGeneric;
          break;
        case 32:
          m_eSurf =  IsSSE2() ? e32BitSSE2Intrin :
            IsMMX() ? e32BitMMXIntrin : e32BitGeneric;
          break;
        default:
          bWarnDepth = true;
          m_eSurf =  IsSSE2() ? e32BitSSE2Intrin :
            IsMMX() ? e32BitMMXIntrin : e32BitGeneric;
          break;
      }
#ifdef _DEBUG
      bWarnDebug = true;
#endif
      if (bWarnDepth || bWarnDebug) {
        CString fmt;
        if (bWarnDepth) {
          fmt.LoadString(IDS_WARNING_BITDEPTH);
        }
        if (bWarnDepth && bWarnDebug) {
          fmt += "\n";
        }
        if (bWarnDebug) {
          CString temp;
          temp.LoadString(IDS_WARNING_DEBUG);
          fmt += temp;
        }
        ::AfxMessageBox(fmt, MB_ICONINFORMATION);
      }

    }

    m_bSizeChanged = true;
    CreateSurface();
    }
}

void CChildView::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 397 of file ChildView.cpp.

{
  nIDEvent;
  ASSERT(nIDEvent == m_kTimerID);
  // This only exists to kick the UI handler for fps.
  m_bTimerPopped = true;
}

void CChildView::OnToolsMakeBW ( void )

Definition at line 195 of file ChildView.cpp.

{

  CWaitCursor wait;

  if (!imgOriginal.IsIndexed()) {

    // the image does not use an indexed palette, so we will change each pixel to B&W (slow)
    COLORREF pixel;
    int maxY = imgOriginal.GetHeight(), maxX = imgOriginal.GetWidth();
    byte r,g,b,avg;
    for (int x=0; x<maxX; x++) {
      for (int y=0; y<maxY; y++) {
        pixel = imgOriginal.GetPixel(x,y);
        r = GetRValue(pixel);
        g = GetGValue(pixel);
        b = GetBValue(pixel);
        avg = ((r + g + b)/3);
        imgOriginal.SetPixelRGB(x,y,avg,avg,avg);
      }
    }

  } else {

    // the image uses an indexed palette, so we will just change the palette table entries to
    // their B&W equivalents
    int MaxColors = imgOriginal.GetMaxColorTableEntries();
    RGBQUAD* ColorTable;
    ColorTable = new RGBQUAD[MaxColors];

    imgOriginal.GetColorTable(0,MaxColors,ColorTable);
    for (int i=0; i<MaxColors; i++)
    {
      int avg = (ColorTable[i].rgbBlue + ColorTable[i].rgbGreen + ColorTable[i].rgbRed)/3;
      ColorTable[i].rgbBlue = (BYTE)avg;
      ColorTable[i].rgbGreen = (BYTE)avg;
      ColorTable[i].rgbRed = (BYTE)avg;
    }
    imgOriginal.SetColorTable(0,MaxColors,ColorTable);

    delete[] ColorTable;
  }

  Invalidate();
  UpdateWindow();
}

void CChildView::OnUpdateFPS ( CCmdUI * pCmdUI ) [protected]

Definition at line 405 of file ChildView.cpp.

{
  if (!m_bTimerPopped) // Only update on regular intervals
    return;

    DWORD dwStop = max(m_dwTickStart+1, ::GetTickCount());
    CString fmt;
    fmt.Format(_T("%d fps"), (m_nFrameCounter*1000L)/(dwStop-m_dwTickStart));

  m_nFrameCounter = 0;
  m_bTimerPopped = false;
    m_dwTickStart = dwStop;

  pCmdUI->SetText(fmt);
  pCmdUI->Enable(TRUE);
}

void CChildView::OnUpdateImage ( CCmdUI * pCmdUI )

Definition at line 281 of file ChildView.cpp.

{
  pCmdUI->Enable(!imgOriginal.IsNull());
}

void CChildView::OnUpdateImageFormats ( CCmdUI * pCmdUI ) [protected]

Definition at line 469 of file ChildView.cpp.

{
  BOOL bEnable = TRUE;

  switch (pCmdUI->m_nID) {
    case IDD_16BIT_MMXINTRINSICS:
    case IDD_24BIT_MMXINTRINSICS:
    case IDD_32BIT_MMXINTRINSICS:
      bEnable = IsMMX();
      break;
    case IDD_16BIT_SSE2INTRINSICS:
    case IDD_24BIT_SSE2INTRINSICS:
    case IDD_32BIT_SSE2INTRINSICS:
      bEnable = IsSSE2();
      break;
    default:
      break;
  }
  if (ESurface(pCmdUI->m_nID) == m_eSurf)
    pCmdUI->SetCheck(1);
  else
    pCmdUI->SetCheck(0);

  pCmdUI->Enable(bEnable);
}

void CChildView::OnUpdatePauseBlit ( CCmdUI * pCmdUI ) [protected]

Definition at line 446 of file ChildView.cpp.

{
  if (pCmdUI->m_nID == ID_INDICATOR_PAUSE_BLIT) {
    pCmdUI->Enable(m_bPauseBlit ? FALSE : TRUE);
  }
  else {
    ASSERT(pCmdUI->m_nID == ID_VIEW_PAUSE_BLIT);
    pCmdUI->SetCheck(m_bPauseBlit ? 1 : 0);
    pCmdUI->Enable(TRUE);
  }
}

void CChildView::OnUpdatePauseBlur ( CCmdUI * pCmdUI ) [protected]

Definition at line 422 of file ChildView.cpp.

{
  if (pCmdUI->m_nID == ID_INDICATOR_PAUSE_BLUR) {
    pCmdUI->Enable(m_bPauseBlur ? FALSE : TRUE);
  }
  else {
    ASSERT(pCmdUI->m_nID == ID_VIEW_PAUSE_BLUR);
    pCmdUI->SetCheck(m_bPauseBlur ? 1 : 0);
    pCmdUI->Enable(TRUE);
  }
}

void CChildView::OnUpdatePauseSwarm ( CCmdUI * pCmdUI ) [protected]

Definition at line 434 of file ChildView.cpp.

{
  if (pCmdUI->m_nID == ID_INDICATOR_PAUSE_SWARM) {
    pCmdUI->Enable(m_bPauseSwarm ? FALSE : TRUE);
  }
  else {
    ASSERT(pCmdUI->m_nID == ID_VIEW_PAUSE_SWARM);
    pCmdUI->SetCheck(m_bPauseSwarm ? 1 : 0);
    pCmdUI->Enable(TRUE);
  }
}

void CChildView::OnUpdateResolution ( CCmdUI * pCmdUI ) [protected]

Definition at line 458 of file ChildView.cpp.

{
  if (m_bSizeChanged) {
    CString str;
    str.Format(_T("%dx%d"), m_pSurface->GetVisibleWidth(), m_pSurface->GetVisibleHeight());
    pCmdUI->SetText(str);
    m_bSizeChanged = false;
  }
  pCmdUI->Enable(TRUE);
}

void CChildView::OnUpdateSizeDouble ( CCmdUI * pCmdUI )

Definition at line 269 of file ChildView.cpp.

{
  pCmdUI->Enable(!imgOriginal.IsNull());
  pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_DOUBLE));
}

void CChildView::OnUpdateSizeFill ( CCmdUI * pCmdUI )

Definition at line 275 of file ChildView.cpp.

{
  pCmdUI->Enable(!imgOriginal.IsNull());
  pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_FILL));
}

void CChildView::OnUpdateSizeHalf ( CCmdUI * pCmdUI )

Definition at line 257 of file ChildView.cpp.

{
  pCmdUI->Enable(!imgOriginal.IsNull());
  pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_HALF));
}

void CChildView::OnUpdateSizeOriginal ( CCmdUI * pCmdUI )

Definition at line 263 of file ChildView.cpp.

{
  pCmdUI->Enable(!imgOriginal.IsNull());
  pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_ORIGINAL));
}

void CChildView::OnViewPauseBlit ( ) [protected]

Definition at line 204 of file ChildView.cpp.

{
  m_bPauseBlit = !m_bPauseBlit;
}

void CChildView::OnViewPauseBlur ( ) [protected]

Definition at line 194 of file ChildView.cpp.

{
  m_bPauseBlur = !m_bPauseBlur;
}

void CChildView::OnViewPauseSwarm ( ) [protected]

Definition at line 199 of file ChildView.cpp.

{
  m_bPauseSwarm = !m_bPauseSwarm;
}

virtual BOOL CChildView::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
virtual BOOL CChildView::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
BOOL CChildView::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 39 of file ChildView.cpp.

{
  if (!CWnd::PreCreateWindow(cs))
    return FALSE;

  cs.dwExStyle |= WS_EX_CLIENTEDGE;
  cs.style &= ~WS_BORDER;
  cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS,
    ::LoadCursor(NULL, IDC_ARROW), reinterpret_cast<HBRUSH>(COLOR_WINDOW+1), NULL);

  return TRUE;
}

void CChildView::SetImage ( const CString & strPath )

Definition at line 52 of file ChildView.cpp.

{
  if (!m_image.IsNull())
    m_image.Destroy();

  HRESULT hr = m_image.Load(strPath);
  if (FAILED(hr)) {
    TRACE("Image Load Failed: %x\n", hr);
  }
  Invalidate();
}

Member Data Documentation

CImage CChildView::imgOriginal [private]

Definition at line 54 of file ChildView.h.

bool CChildView::m_bPauseBlit [private]

Definition at line 91 of file ChildView.h.

bool CChildView::m_bPauseBlur [private]

Definition at line 89 of file ChildView.h.

bool CChildView::m_bPauseSwarm [private]

Definition at line 90 of file ChildView.h.

bool CChildView::m_bSizeChanged [private]

Definition at line 88 of file ChildView.h.

bool CChildView::m_bTimerPopped [private]

Definition at line 92 of file ChildView.h.

DWORD CChildView::m_dwTickStart [private]

Definition at line 87 of file ChildView.h.

ESurface CChildView::m_eSurf [private]

Definition at line 80 of file ChildView.h.

CImage CChildView::m_image [private]

Definition at line 44 of file ChildView.h.

const UINT CChildView::m_kTimerDelay = 1500 [static, private]

Definition at line 95 of file ChildView.h.

const UINT_PTR CChildView::m_kTimerID = 31 [static, private]

Definition at line 94 of file ChildView.h.

int CChildView::m_nFilterLoad [private]

Definition at line 85 of file ChildView.h.

int CChildView::m_nFilterSave [private]

Definition at line 86 of file ChildView.h.

int CChildView::m_nFrameCounter [private]

Definition at line 84 of file ChildView.h.

SizesEnum CChildView::m_nImageSize [private]

Definition at line 56 of file ChildView.h.

CSurface* CChildView::m_pSurface [private]

Definition at line 81 of file ChildView.h.

CSwarm CChildView::m_swarm [private]

Definition at line 82 of file ChildView.h.

The documentation for this class was generated from the following files:
  • advanced/DllScreenCap/ScreenCap/ChildView.h
  • general/MMXSwarm/ChildView.h
  • general/SimpleImage/ChildView.h
  • advanced/DllScreenCap/ScreenCap/ChildView.cpp
  • general/MMXSwarm/ChildView.cpp
  • general/SimpleImage/ChildView.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCImageApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCImageApp Class Reference

#include "CImage.h"

List of all members.

Public Member Functions

CCImageApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 25 of file CImage.h.

Constructor & Destructor Documentation

CCImageApp::CCImageApp ( )

Definition at line 34 of file CImage.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CCImageApp::InitInstance ( ) [virtual]

Definition at line 47 of file CImage.cpp.

{
  CWinApp::InitInstance();

  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }
  AfxEnableControlContainer();
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  // To create the main window, this code creates a new frame window
  // object and then sets it as the application's main window object
  CMainFrame* pFrame = new CMainFrame;
  m_pMainWnd = pFrame;
  // create and load the frame with its resources
  pFrame->LoadFrame(IDR_MAINFRAME,
    WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
    NULL);
  // The one and only window has been initialized, so show and update it
  pFrame->ShowWindow(SW_SHOW);
  pFrame->UpdateWindow();
  // call DragAcceptFiles only if there's a suffix
  //  In an SDI app, this should occur after ProcessShellCommand
  return TRUE;
}

void CCImageApp::OnAppAbout ( )

Definition at line 118 of file CImage.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/SimpleImage/CImage.h
  • general/SimpleImage/CImage.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCircApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCircApp Class Reference

#include "circ.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 21 of file circ.h.

Member Function Documentation

int CCircApp::ExitInstance ( )

Definition at line 48 of file circ.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CCircApp::InitInstance ( )

Definition at line 32 of file circ.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/circ/circ.h
  • controls/circ/circ.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCircCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CCircCtrl Class Reference

#include "circctl.h"

List of all members.

Public Types

enum {
dispidCircleShape = 1L, dispidCircleOffset = 3L, dispidNote = 4L, dispidFlashColor = 2L,
eventidClickIn = 1L, eventidClickOut = 2L
}

Public Member Functions

CCircCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual BOOL | OnMapPropertyToPage (DISPID dispid, LPCLSID lpclsid, BOOL *pbPageOptional)
virtual void | OnResetState ()

Protected Member Functions

~CCircCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CCircCtrl) DECLARE_OLETYPELIB(CCircCtrl) DECLARE_PROPPAGEIDS(CCircCtrl) DECLARE_OLECTLTYPE(CCircCtrl) afx_msg void OnLButtonDown(UINT nFlags
void | FireClickIn (OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
void | FireClickOut ()
void | FlashColor (CDC *pdc)
afx_msg short | GetCircleOffset ()
void | GetDrawRect (CRect *rc)
afx_msg BSTR | GetNote ()
BOOL | InBounds (short nOffset)
BOOL | InCircle (CPoint &point)
afx_msg void | OnCircleShapeChanged ()
afx_msg void | OnFlashColorChanged ()
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | SetCircleOffset (short nNewValue)
afx_msg void | SetNote (LPCTSTR lpszNewValue)

Protected Attributes

short | m_circleOffset
BOOL | m_circleShape
OLE_COLOR | m_flashColor
CString | m_note
CPoint | point

Detailed Description

Definition at line 15 of file circctl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidCircleShape
dispidCircleOffset
dispidNote
dispidFlashColor
eventidClickIn
eventidClickOut

Definition at line 88 of file circctl.h.

       {
  //{{AFX_DISP_ID(CCircCtrl)
  dispidCircleShape = 1L,
  dispidCircleOffset = 3L,
  dispidNote = 4L,
  dispidFlashColor = 2L,
  eventidClickIn = 1L,
  eventidClickOut = 2L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CCircCtrl::CCircCtrl ( )

Definition at line 142 of file circctl.cpp.

{
  InitializeIIDs(&IID_DCirc, &IID_DCircEvents);

  // TODO: Initialize your control's instance data here.
}

CCircCtrl::~CCircCtrl ( ) [protected]

Definition at line 153 of file circctl.cpp.

{
  // TODO: Cleanup your control's instance data here.
}

Member Function Documentation

void CCircCtrl::AboutBox ( ) [protected]

Definition at line 253 of file circctl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_CIRC);
  dlgAbout.DoModal();
}

CCircCtrl::DECLARE_OLECREATE_EX ( CCircCtrl ) [protected]
void CCircCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 206 of file circctl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  if (pPX->GetVersion() == (DWORD)MAKELONG(_wVerMinor, _wVerMajor))
  {
    PX_Bool(pPX, _T("CircleShape"), m_circleShape, TRUE);
    PX_Short(pPX, _T("CircleOffset"), m_circleOffset, 0);
    PX_Long(pPX, _T("FlashColor"), (long &)m_flashColor, RGB(0xFF, 0x00, 0x00));
    PX_String(pPX, _T("Note"), m_note, _T(""));
  }
  else if (pPX->IsLoading())
  {
    // Skip over persistent data
    BOOL bDummy;
    short sDummy;
    long lDummy;
    CString strDummy;
    PX_Bool(pPX, _T("CircleShape"), bDummy, FALSE);
    PX_Short(pPX, _T("CircleOffset"), sDummy, 0);
    PX_Long(pPX, _T("FlashColor"), lDummy, 0);
    PX_String(pPX, _T("Note"), strDummy, _T(""));

    // Force property values to these defaults
    m_circleShape = TRUE;
    m_circleOffset = 0;
    m_flashColor = RGB(0xFF, 0x00, 0x00);
    m_note = _T("");
  }
}

void CCircCtrl::FireClickIn | ( | OLE_XPOS_PIXELS | x,
 |  | OLE_YPOS_PIXELS | y |
 | ) |  |  | [inline, protected]

Definition at line 79 of file circctl.h.

    {FireEvent(eventidClickIn,EVENT_PARAM(VTS_XPOS_PIXELS  VTS_YPOS_PIXELS), x, y);}

void CCircCtrl::FireClickOut ( ) [inline, protected]

Definition at line 81 of file circctl.h.

    {FireEvent(eventidClickOut,EVENT_PARAM(VTS_NONE));}

void CCircCtrl::FlashColor ( CDC * pdc ) [protected]

Definition at line 416 of file circctl.cpp.

{
  CBrush* pOldBrush;
  CBrush flashBrush(TranslateColor(m_flashColor));
  CPen* pOldPen;
  CRect rc;

  GetClientRect(rc);
  GetDrawRect(&rc);
  pOldBrush = pdc->SelectObject(&flashBrush);
  pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
  pdc->Ellipse(rc);
  pdc->SelectObject(pOldPen);
  pdc->SelectObject(pOldBrush);
}

short CCircCtrl::GetCircleOffset ( ) [protected]

Definition at line 306 of file circctl.cpp.

{
  return m_circleOffset;
}

void CCircCtrl::GetDrawRect ( CRect * rc ) [protected]

Definition at line 277 of file circctl.cpp.

{
  if (m_circleShape)
  {
    int cx = rc->right - rc->left;
    int cy = rc->bottom - rc->top;

    if (cx > cy)
    {
      rc->left += (cx - cy) / 2;
      rc->right = rc->left + cy;

      // offset circle in bounding rect
      rc->left += m_circleOffset;
      rc->right += m_circleOffset;
    }
    else
    {
      rc->top += (cy - cx) / 2;
      rc->bottom = rc->top + cx;

      // offset circle in bounding rect
      rc->bottom -= m_circleOffset;
      rc->top -= m_circleOffset;
    }
  }
}

BSTR CCircCtrl::GetNote ( ) [protected]

Definition at line 447 of file circctl.cpp.

{
  return m_note.AllocSysString();
}

BOOL CCircCtrl::InBounds ( short nOffset ) [protected]

Definition at line 324 of file circctl.cpp.

{
  int diameter;
  int length;
  int cx;
  int cy;

  GetControlSize(&cx, &cy);

  if (cx > cy)
  {
    length = cx;
    diameter = cy;
  }
  else
  {
    length = cy;
    diameter = cx;
  }
  if (nOffset < 0)
    nOffset = (short) -nOffset;
  return (diameter / 2 + nOffset) <= (length / 2);
}

BOOL CCircCtrl::InCircle ( CPoint & point ) [protected]

Definition at line 397 of file circctl.cpp.

{
  CRect rc;
  GetClientRect(rc);
  GetDrawRect(&rc);

  // Determine radii
  double a = (rc.right - rc.left) / 2;
  double b = (rc.bottom - rc.top) / 2;

  // Determine x, y
  double x = point.x - (rc.left + rc.right) / 2;
  double y = point.y - (rc.top + rc.bottom) / 2;

  // Apply ellipse formula
  return ((x * x) / (a * a) + (y * y) / (b * b) <= 1);
}

void CCircCtrl::OnCircleShapeChanged ( ) [protected]

Definition at line 264 of file circctl.cpp.

{
  SetModifiedFlag();

  // force the control to redraw itself
  InvalidateControl();

  // reset the circle offset, if necessary
  if (m_circleShape)
    SetCircleOffset(0);
}

void CCircCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 162 of file circctl.cpp.

{
  CBrush* pOldBrush;
  CBrush bkBrush(TranslateColor(GetBackColor()));
  CPen* pOldPen;
  CRect rc = rcBounds;
  CFont* pOldFont;
  TEXTMETRIC tm;
  const CString& strCaption = InternalGetText();

  // Set the ForeColor property color and transparent background mode into the device context
  pdc->SetTextColor(TranslateColor(GetForeColor()));
  pdc->SetBkMode(TRANSPARENT);

  // Paint the background using the BackColor property
  pdc->FillRect(rcBounds, &bkBrush);

  // Draw the ellipse using the BackColor property and a black pen
  GetDrawRect(&rc);
  pOldBrush = pdc->SelectObject(&bkBrush);
  pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
  pdc->Ellipse(rc);

  // Draw the caption and note using the stock Font and ForeColor properties
  pOldFont = SelectStockFont(pdc);
  GetStockTextMetrics(&tm);

  pdc->SetTextAlign(TA_CENTER | TA_TOP);
  pdc->ExtTextOut((rc.left + rc.right) / 2, (rc.top + rc.bottom - tm.tmHeight) / 2,
    ETO_CLIPPED, rc, strCaption, strCaption.GetLength(), NULL);
  pdc->SetTextAlign(TA_LEFT | TA_TOP);
  pdc->ExtTextOut(rcBounds.left, rcBounds.top,
    ETO_CLIPPED, rcBounds, m_note, m_note.GetLength(), NULL);
  pdc->SelectObject(pOldFont);

  pdc->SelectObject(pOldPen);
  pdc->SelectObject(pOldBrush);
}

void CCircCtrl::OnFlashColorChanged ( ) [protected]

Definition at line 474 of file circctl.cpp.

{
  // TODO: Add notification handler code

  SetModifiedFlag();
}

void CCircCtrl::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 371 of file circctl.cpp.

{
  CDC* pdc;

  // Flash the color of the control if within the ellipse.
  if (InCircle(point))
  {
    pdc = GetDC();
    FlashColor(pdc);
    ReleaseDC(pdc);
  }

  COleControl::OnLButtonDblClk(nFlags, point);
}

void CCircCtrl::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 387 of file circctl.cpp.

{
  // Redraw the control.
  if (InCircle(point))
    InvalidateControl();

  COleControl::OnLButtonUp(nFlags, point);
}

BOOL CCircCtrl::OnMapPropertyToPage | ( | DISPID | dispid,
 |  | LPCLSID | lpclsid,
 |  | BOOL * | pbPageOptional |
 | ) |  |  | [virtual]

Definition at line 433 of file circctl.cpp.

{
  switch(dispid)
  {
    case dispidFlashColor:
      *lpclsid = CLSID_CColorPropPage;
      *pbPageOptional = TRUE;
      return TRUE;
  }
  return COleControl::OnMapPropertyToPage(dispid, lpclsid, pbPageOptional);
}

void CCircCtrl::OnResetState ( ) [virtual]

Definition at line 242 of file circctl.cpp.

{
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange

  // TODO: Reset any other control state here.
}

void CCircCtrl::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 464 of file circctl.cpp.

{
  COleControl::OnSize(nType, cx, cy);

  // If circle shape is true & cicrle does not fit in new size, reset the offset
  if (m_circleShape && !InBounds(GetCircleOffset()))
    SetCircleOffset(0);

}

void CCircCtrl::SetCircleOffset ( short nNewValue ) [protected]

Definition at line 312 of file circctl.cpp.

{
  // Validate the specified offset value
  if ((m_circleOffset != nNewValue) && m_circleShape && InBounds(nNewValue))
  {
    m_circleOffset = nNewValue;
    SetModifiedFlag();
    InvalidateControl();
  }
}

void CCircCtrl::SetNote ( LPCTSTR lpszNewValue ) [protected]

Definition at line 453 of file circctl.cpp.

{
  if (m_note != lpszNewValue)
  {
    m_note = lpszNewValue;
    SetModifiedFlag();
    InvalidateControl();
    BoundPropertyChanged(dispidNote);
  }
}

Member Data Documentation

short CCircCtrl::m_circleOffset [protected]

Definition at line 42 of file circctl.h.

BOOL CCircCtrl::m_circleShape [protected]

Definition at line 64 of file circctl.h.

OLE_COLOR CCircCtrl::m_flashColor [protected]

Definition at line 66 of file circctl.h.

CString CCircCtrl::m_note [protected]

Definition at line 46 of file circctl.h.

CPoint CCircCtrl::point [protected]

Definition at line 55 of file circctl.h.

The documentation for this class was generated from the following files:
  • controls/circ/circctl.h
  • controls/circ/circctl.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCircPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CCircPropPage Class Reference

#include "circppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_CIRC }

Public Member Functions

CCircPropPage ()

Public Attributes

CString | m_caption
int | m_circleOffset
BOOL | m_circleShape
CString | m_note

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file circppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file circppg.h.

{ IDD = IDD_PROPPAGE_CIRC };

Constructor & Destructor Documentation

CCircPropPage::CCircPropPage ( )

Definition at line 60 of file circppg.cpp.

                             :
  COlePropertyPage(IDD, IDS_CIRC_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CCircPropPage)
  m_caption = _T("");
  m_circleOffset = 0;
  m_circleShape = FALSE;
  m_note = _T("");
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CCircPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 75 of file circppg.cpp.

{
  //{{AFX_DATA_MAP(CCircPropPage)
  DDP_Text(pDX, IDC_CAPTION, m_caption, _T("Caption") );
  DDX_Text(pDX, IDC_CAPTION, m_caption);
  DDP_Text(pDX, IDC_CIRCLEOFFSET, m_circleOffset, _T("CircleOffset") );
  DDX_Text(pDX, IDC_CIRCLEOFFSET, m_circleOffset);
  DDP_Check(pDX, IDC_CIRCLESHAPE, m_circleShape, _T("CircleShape") );
  DDX_Check(pDX, IDC_CIRCLESHAPE, m_circleShape);
  DDP_Text(pDX, IDC_NOTE, m_note, _T("Note") );
  DDX_Text(pDX, IDC_NOTE, m_note);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

CString CCircPropPage::m_caption

Definition at line 27 of file circppg.h.

int CCircPropPage::m_circleOffset

Definition at line 28 of file circppg.h.

BOOL CCircPropPage::m_circleShape

Definition at line 29 of file circppg.h.

CString CCircPropPage::m_note

Definition at line 30 of file circppg.h.

The documentation for this class was generated from the following files:
  • controls/circ/circppg.h
  • controls/circ/circppg.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CClassToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CClassToolBar Class Reference

#include "ClassViewBar.h"

List of all members.

Private Member Functions

virtual BOOL | AllowShowOnList () const
virtual void | OnUpdateCmdUI (CFrameWnd *, BOOL bDisableIfNoHndler)

Detailed Description

Definition at line 14 of file ClassViewBar.h.

Member Function Documentation

virtual BOOL CClassToolBar::AllowShowOnList ( ) const [inline, private, virtual]

Definition at line 21 of file ClassViewBar.h.

{ return FALSE; }

virtual void CClassToolBar::OnUpdateCmdUI | ( | CFrameWnd * | ,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [inline, private, virtual]

Definition at line 16 of file ClassViewBar.h.

  {
    CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
  }

The documentation for this class was generated from the following file:
  • vc2008fp/VisualStudioDemo/ClassViewBar.h
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CClassTreeWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CClassTreeWnd Class Reference

#include "ClassTreeWnd.h"

List of all members.

Public Member Functions

CClassTreeWnd ()
virtual | ~CClassTreeWnd ()

Protected Member Functions

virtual BOOL | OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult)

Detailed Description

Definition at line 15 of file ClassTreeWnd.h.

Constructor & Destructor Documentation

CClassTreeWnd::CClassTreeWnd ( )

Definition at line 23 of file ClassTreeWnd.cpp.

{
}

CClassTreeWnd::~CClassTreeWnd ( ) [virtual]

Definition at line 27 of file ClassTreeWnd.cpp.

{
}

Member Function Documentation

BOOL CClassTreeWnd::OnNotify | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected, virtual]

Definition at line 37 of file ClassTreeWnd.cpp.

{
  BOOL bRes = CTreeCtrl::OnNotify(wParam, lParam, pResult);

  NMHDR* pNMHDR = (NMHDR*)lParam;
  ASSERT(pNMHDR != NULL);

  if (pNMHDR && pNMHDR->code == TTN_SHOW && GetToolTips() != NULL)
  {
    GetToolTips()->SetWindowPos(&wndTop, -1, -1, -1, -1, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE);
  }

  return bRes;
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/ClassTreeWnd.h
  • vc2008fp/VisualStudioDemo/ClassTreeWnd.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CClassViewBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CClassViewBar Class Reference

#include "ClassViewBar.h"

List of all members.

Public Member Functions

CClassViewBar ()
virtual | ~CClassViewBar ()
void | AdjustLayout ()
void | OnChangeVisualStyle ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

void | FillClassView ()
afx_msg LRESULT | OnChangeActiveTab (WPARAM, LPARAM)
afx_msg void | OnClassAddMemeberFunction ()
afx_msg void | OnClassAddMemeberVariable ()
afx_msg void | OnClassDefinition ()
afx_msg void | OnClassProperties ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnNewFolder ()
afx_msg void | OnPaint ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSort (UINT id)
afx_msg void | OnUpdateSort (CCmdUI *pCmdUI)

Protected Attributes

CImageList | m_ClassViewImages
UINT m_nCurrSort
CClassTreeWnd m_wndClassView
CClassToolBar m_wndToolBar

Detailed Description

Definition at line 24 of file ClassViewBar.h.

Constructor & Destructor Documentation

CClassViewBar::CClassViewBar ( )

Definition at line 46 of file ClassViewBar.cpp.

{
  m_nCurrSort = ID_SORTING_GROUPBYTYPE;
}

CClassViewBar::~CClassViewBar ( ) [virtual]

Definition at line 51 of file ClassViewBar.cpp.

{
}

Member Function Documentation

void CClassViewBar::AdjustLayout ( )

Definition at line 223 of file ClassViewBar.cpp.

{
  if (GetSafeHwnd() == NULL)
  {
    return;
  }

  CRect rectClient;
  GetClientRect(rectClient);

  int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;

  m_wndToolBar.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
  m_wndClassView.SetWindowPos(NULL, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
}

void CClassViewBar::FillClassView ( ) [protected]

Definition at line 131 of file ClassViewBar.cpp.

{
  HTREEITEM hRoot = m_wndClassView.InsertItem(_T("Hello classes"), 0, 0);
  m_wndClassView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);

  HTREEITEM hClass = m_wndClassView.InsertItem(_T("CAboutDlg"), 1, 1, hRoot);
  m_wndClassView.InsertItem(_T("CAboutDlg()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("DoDataExchange(CDataExchange* pDX)"), 4, 4, hClass);

  m_wndClassView.Expand(hRoot, TVE_EXPAND);

  hClass = m_wndClassView.InsertItem(_T("CHelloApp"), 1, 1, hRoot);
  m_wndClassView.InsertItem(_T("CHelloApp()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("InitInstance()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("OnAppAbout()"), 3, 3, hClass);

  hClass = m_wndClassView.InsertItem(_T("CHelloDoc"), 1, 1, hRoot);
  m_wndClassView.InsertItem(_T("AssertValid()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("CHelloDoc()"), 4, 4, hClass);
  m_wndClassView.InsertItem(_T("~CHelloDoc()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("Dump(CDumpContext& dc)"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("OnNewDocument()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("Serialize()"), 3, 3, hClass);

  hClass = m_wndClassView.InsertItem(_T("CHelloView"), 1, 1, hRoot);
  m_wndClassView.InsertItem(_T("AssertValid()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("CHelloView()"), 4, 4, hClass);
  m_wndClassView.InsertItem(_T("~CHelloView()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("Dump(CDumpContext& dc)"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("GetDocument()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("OnDraw(CDC* pDC)"), 3, 3, hClass);
  m_wndClassView.Expand(hClass, TVE_EXPAND);

  hClass = m_wndClassView.InsertItem(_T("CMainFrame"), 1, 1, hRoot);
  m_wndClassView.InsertItem(_T("AssertValid()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("CMainFrame()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("~CMainFrame()"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("Dump(CDumpContext& dc)"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("OnCreate(LPCREATESTRUCT lpCreateStruct)"), 4, 4, hClass);
  m_wndClassView.InsertItem(_T("PreCreateWindow(CREATESTRUCT& cs)"), 3, 3, hClass);
  m_wndClassView.InsertItem(_T("m_wndMenuBar"), 6, 6, hClass);
  m_wndClassView.InsertItem(_T("m_wndToolBar"), 6, 6, hClass);
  m_wndClassView.InsertItem(_T("m_wndStatusBar"), 6, 6, hClass);

  hClass = m_wndClassView.InsertItem(_T("Globals"), 2, 2, hRoot);
  m_wndClassView.InsertItem(_T("theApp"), 5, 5, hClass);
  m_wndClassView.Expand(hClass, TVE_EXPAND);
}

afx_msg LRESULT CClassViewBar::OnChangeActiveTab | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
void CClassViewBar::OnChangeVisualStyle ( )

Definition at line 312 of file ClassViewBar.cpp.

{
  m_ClassViewImages.DeleteImageList();

  UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_CLASS_VIEW_24 : IDB_CLASS_VIEW;

  CBitmap bmp;
  if (!bmp.LoadBitmap(uiBmpId))
  {
    TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
    ASSERT(FALSE);
    return;
  }

  BITMAP bmpObj;
  bmp.GetBitmap(&bmpObj);

  UINT nFlags = ILC_MASK;

  nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;

  m_ClassViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
  m_ClassViewImages.Add(&bmp, RGB(255, 0, 0));

  m_wndClassView.SetImageList(&m_ClassViewImages, TVSIL_NORMAL);

  m_wndToolBar.CleanUpLockedImages();
  m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_SORT24 : IDR_SORT, 0, 0, TRUE /* Locked */);
}

void CClassViewBar::OnClassAddMemeberFunction ( ) [protected]

Definition at line 268 of file ClassViewBar.cpp.

{
  AfxMessageBox(_T("Add member function..."));
}

void CClassViewBar::OnClassAddMemeberVariable ( ) [protected]

Definition at line 273 of file ClassViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CClassViewBar::OnClassDefinition ( ) [protected]

Definition at line 278 of file ClassViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CClassViewBar::OnClassProperties ( ) [protected]

Definition at line 283 of file ClassViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CClassViewBar::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 180 of file ClassViewBar.cpp.

{
  CTreeCtrl* pWndTree = (CTreeCtrl*)&m_wndClassView;
  ASSERT_VALID(pWndTree);

  if (pWnd != pWndTree)
  {
    CDockablePane::OnContextMenu(pWnd, point);
    return;
  }

  if (point != CPoint(-1, -1))
  {
    // Select clicked item:
    CPoint ptTree = point;
    pWndTree->ScreenToClient(&ptTree);

    UINT flags = 0;
    HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
    if (hTreeItem != NULL)
    {
      pWndTree->SelectItem(hTreeItem);
    }
  }

  pWndTree->SetFocus();
  CMenu menu;
  menu.LoadMenu(IDR_POPUP_SORT);

  CMenu* pSumMenu = menu.GetSubMenu(0);

  if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
  {
    CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;

    if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
      return;

    ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
    UpdateDialogControls(this, FALSE);
  }
}

int CClassViewBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 73 of file ClassViewBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy;
  rectDummy.SetRectEmpty();

  // Create views:
  const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;

  if (!m_wndClassView.Create(dwViewStyle, rectDummy, this, 2))
  {
    TRACE0("Failed to create Class View\n");
    return -1;      // fail to create
  }

  // Load images:
  m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_SORT);
  m_wndToolBar.LoadToolBar(IDR_SORT, 0, 0, TRUE /* Is locked */);

  OnChangeVisualStyle();

  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));

  m_wndToolBar.SetOwner(this);

  // All commands will be routed via this control , not via the parent frame:
  m_wndToolBar.SetRouteCommandsViaFrame(FALSE);

  CMenu menuSort;
  menuSort.LoadMenu(IDR_POPUP_SORT);

  m_wndToolBar.ReplaceButton(ID_SORT_MENU, CClassViewMenuButton(menuSort.GetSubMenu(0)->GetSafeHmenu()));

  CClassViewMenuButton* pButton =  DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0));

  if (pButton != NULL)
  {
    pButton->m_bText = FALSE;
    pButton->m_bImage = TRUE;
    pButton->SetImage(GetCmdMgr()->GetCmdImage(m_nCurrSort));
    pButton->SetMessageWnd(this);
  }

  // Fill view context(dummy code, don't seek here something magic :-)):
  FillClassView();

  return 0;
}

void CClassViewBar::OnNewFolder ( ) [protected]

Definition at line 288 of file ClassViewBar.cpp.

{
  AfxMessageBox(_T("New Folder..."));
}

void CClassViewBar::OnPaint ( ) [protected]

Definition at line 293 of file ClassViewBar.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndClassView.GetWindowRect(rectTree);
  ScreenToClient(rectTree);

  rectTree.InflateRect(1, 1);
  dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
}

void CClassViewBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 305 of file ClassViewBar.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);

  m_wndClassView.SetFocus();
}

void CClassViewBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 125 of file ClassViewBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);
  AdjustLayout();
}

void CClassViewBar::OnSort ( UINT id ) [protected]

Definition at line 244 of file ClassViewBar.cpp.

{
  if (m_nCurrSort == id)
  {
    return;
  }

  m_nCurrSort = id;

  CClassViewMenuButton* pButton =  DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0));

  if (pButton != NULL)
  {
    pButton->SetImage(GetCmdMgr()->GetCmdImage(id));
    m_wndToolBar.Invalidate();
    m_wndToolBar.UpdateWindow();
  }
}

void CClassViewBar::OnUpdateSort ( CCmdUI * pCmdUI ) [protected]

Definition at line 263 of file ClassViewBar.cpp.

{
  pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrSort);
}

BOOL CClassViewBar::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 239 of file ClassViewBar.cpp.

{
  return CDockablePane::PreTranslateMessage(pMsg);
}

Member Data Documentation

CImageList CClassViewBar::m_ClassViewImages [protected]

Definition at line 36 of file ClassViewBar.h.

UINT CClassViewBar::m_nCurrSort [protected]

Definition at line 37 of file ClassViewBar.h.

CClassTreeWnd CClassViewBar::m_wndClassView [protected]

Definition at line 35 of file ClassViewBar.h.

CClassToolBar CClassViewBar::m_wndToolBar [protected]

Definition at line 34 of file ClassViewBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/ClassViewBar.h
  • vc2008fp/VisualStudioDemo/ClassViewBar.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CClassViewMenuButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Friends

CClassViewMenuButton Class Reference

List of all members.

Public Member Functions

CClassViewMenuButton (HMENU hMenu=NULL)
virtual void | OnDraw (CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE)

Friends

class | CClassViewBar

Detailed Description

Definition at line 15 of file ClassViewBar.cpp.

Constructor & Destructor Documentation

CClassViewMenuButton::CClassViewMenuButton ( HMENU hMenu = NULL ) [inline]

Definition at line 22 of file ClassViewBar.cpp.

                                           : CMFCToolBarMenuButton((UINT)-1, hMenu, -1)
  {
  }

Member Function Documentation

virtual void CClassViewMenuButton::OnDraw | ( | CDC * | pDC,
 |  | const CRect & | rect,
 |  | CMFCToolBarImages * | pImages,
 |  | BOOL | bHorz = TRUE,
 |  | BOOL | bCustomizeMode = FALSE,
 |  | BOOL | bHighlight = FALSE,
 |  | BOOL | bDrawBorder = TRUE,
 |  | BOOL | bGrayDisabledButtons = TRUE |
 | ) |  |  | [inline, virtual]

Definition at line 26 of file ClassViewBar.cpp.

  {
    pImages = CMFCToolBar::GetImages();

    CAfxDrawState ds;
    pImages->PrepareDrawImage(ds);

    CMFCToolBarMenuButton::OnDraw(pDC, rect, pImages, bHorz, bCustomizeMode, bHighlight, bDrawBorder, bGrayDisabledButtons);

    pImages->EndDrawImage(ds);
  }

Friends And Related Function Documentation

friend class CClassViewBar [friend]

Definition at line 17 of file ClassViewBar.cpp.

The documentation for this class was generated from the following file:
  • vc2008fp/VisualStudioDemo/ClassViewBar.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CClikPoint Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CClikPoint Class Reference

#include "autoclik.h"

List of all members.

Public Member Functions

short | GetX ()
short | GetX ()
short | GetY ()
short | GetY ()
void | SetX (short)
void | SetX (short)
void | SetY (short)
void | SetY (short)

Detailed Description

Definition at line 41 of file autoclik.h.

Member Function Documentation

short CClikPoint::GetX ( )

Definition at line 89 of file autoclik.cpp.

{
  short result;
  GetProperty(0x1, VT_I2, (void*)&result);
  return result;
}

short CClikPoint::GetX ( )
short CClikPoint::GetY ( )
short CClikPoint::GetY ( )

Definition at line 101 of file autoclik.cpp.

{
  short result;
  GetProperty(0x2, VT_I2, (void*)&result);
  return result;
}

void CClikPoint::SetX ( short propVal )

Definition at line 96 of file autoclik.cpp.

{
  SetProperty(0x1, VT_I2, propVal);
}

void CClikPoint::SetX ( short )
void CClikPoint::SetY ( short propVal )

Definition at line 108 of file autoclik.cpp.

{
  SetProperty(0x2, VT_I2, propVal);
}

void CClikPoint::SetY ( short )
The documentation for this class was generated from the following files:
  • ole/acdual/acdualdriv/autoclik.h
  • ole/autoclik/autodriv/autoclik.h
  • ole/acdual/acdualdriv/autoclik.cpp
  • ole/autoclik/autodriv/autoclik.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCmnCtrl1App Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCmnCtrl1App Class Reference

#include "CmnCtrl1.h"

List of all members.

Public Member Functions

CCmnCtrl1App ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 33 of file CmnCtrl1.h.

Constructor & Destructor Documentation

CCmnCtrl1App::CCmnCtrl1App ( )

Definition at line 33 of file CmnCtrl1.cpp.

{
}

Member Function Documentation

BOOL CCmnCtrl1App::InitInstance ( ) [virtual]

Definition at line 45 of file CmnCtrl1.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization

  CAllControlsSheet   allcontrolssheet(_T("Common Controls Sample"));
  m_pMainWnd = &allcontrolssheet;
  allcontrolssheet.DoModal();
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/CmnCtrl1.h
  • general/CmnCtrl1/CmnCtrl1.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCmnCtrl2App Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCmnCtrl2App Class Reference

#include "CmnCtrl2.h"

List of all members.

Public Member Functions

CCmnCtrl2App ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 31 of file CmnCtrl2.h.

Constructor & Destructor Documentation

CCmnCtrl2App::CCmnCtrl2App ( )

Definition at line 34 of file CmnCtrl2.cpp.

{
}

Member Function Documentation

BOOL CCmnCtrl2App::InitInstance ( ) [virtual]

Definition at line 46 of file CmnCtrl2.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization

  CAllControlsSheet   allcontrolssheet(_T("Common Controls Sample"));
  m_pMainWnd = &allcontrolssheet;
  allcontrolssheet.DoModal();
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/CmnCtrl2/CmnCtrl2.h
  • general/CmnCtrl2/CmnCtrl2.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCmnCtrl3App Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCmnCtrl3App Class Reference

#include "CmnCtrl3.h"

List of all members.

Public Member Functions

CCmnCtrl3App ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 17 of file CmnCtrl3.h.

Constructor & Destructor Documentation

CCmnCtrl3App::CCmnCtrl3App ( )

Definition at line 20 of file CmnCtrl3.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CCmnCtrl3App::InitInstance ( ) [virtual]

Definition at line 30 of file CmnCtrl3.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization

  CAllControlsSheet   allcontrolssheet(_T("Common Controls Sample"));
  m_pMainWnd = &allcontrolssheet;
  allcontrolssheet.DoModal();
  return FALSE;
}

The documentation for this class was generated from the following files:
  • controls/cmnctrl/CmnCtrl3.h
  • controls/cmnctrl/CmnCtrl3.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCmnCtrl3Dlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CCmnCtrl3Dlg Class Reference

#include "CmnCtrl3Dlg.h"

List of all members.

Public Types

enum | { IDD = IDD_CMNCTRL3_DIALOG }

Public Member Functions

CCmnCtrl3Dlg (CWnd *pParent=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 8 of file CmnCtrl3Dlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 15 of file CmnCtrl3Dlg.h.

{ IDD = IDD_CMNCTRL3_DIALOG };

Constructor & Destructor Documentation

CCmnCtrl3Dlg::CCmnCtrl3Dlg ( CWnd * pParent = NULL )

Definition at line 18 of file CmnCtrl3Dlg.cpp.

  : CDialog(CCmnCtrl3Dlg::IDD, pParent)
{
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CCmnCtrl3Dlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 24 of file CmnCtrl3Dlg.cpp.

{
  CDialog::DoDataExchange(pDX);
}

BOOL CCmnCtrl3Dlg::OnInitDialog ( ) [protected, virtual]

Definition at line 38 of file CmnCtrl3Dlg.cpp.

{
  CDialog::OnInitDialog();

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CCmnCtrl3Dlg::OnPaint ( ) [protected]

Definition at line 56 of file CmnCtrl3Dlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CCmnCtrl3Dlg::OnQueryDragIcon ( ) [protected]

Definition at line 83 of file CmnCtrl3Dlg.cpp.

{
  return static_cast<HCURSOR>(m_hIcon);
}

Member Data Documentation

HICON CCmnCtrl3Dlg::m_hIcon [protected]

Definition at line 23 of file CmnCtrl3Dlg.h.

The documentation for this class was generated from the following files:
  • controls/cmnctrl/CmnCtrl3Dlg.h
  • controls/cmnctrl/CmnCtrl3Dlg.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCollectApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCollectApp Class Reference

#include "collect.h"

List of all members.

Public Member Functions

CCollectApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 23 of file collect.h.

Constructor & Destructor Documentation

CCollectApp::CCollectApp ( )

Definition at line 41 of file collect.cpp.

{
}

Member Function Documentation

BOOL CCollectApp::InitInstance ( ) [virtual]

Definition at line 53 of file collect.cpp.

{
  // Standard initialization

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register document templates

  CSingleDocTemplate* pDocTemplate;
  pDocTemplate = new CSingleDocTemplate(
    IDR_MAINFRAME,
    RUNTIME_CLASS(CCollectDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CStringListView));
  AddDocTemplate(pDocTemplate);

  // create a new (empty) document
  OnFileNew();

  if (m_lpCmdLine[0] != '\0')
  {
  }

  return TRUE;
}

void CCollectApp::OnAppAbout ( )

Definition at line 121 of file collect.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • advanced/collect/collect.h
  • advanced/collect/collect.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCollectDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CCollectDoc Class Reference

#include "colledoc.h"

List of all members.

Public Member Functions

virtual | ~CCollectDoc ()
virtual void | DeleteContents ()
virtual void | Serialize (CArchive &ar)

Public Attributes

CDWordArray | m_dwArray
CList< int, int > | m_intList
CMapDWordToMyStruct m_mapDWordToMyStruct
CMapStringToMyObject m_mapStringToMyObject
CMapStringToString | m_mapStringToString
CMyObjectArray m_myobArray
CMyStructList m_mystructList
CArray< CPoint, CPoint > | m_ptArray
CStringList | m_stringList

Protected Member Functions

CCollectDoc ()
virtual BOOL | OnNewDocument ()

Detailed Description

Definition at line 65 of file colledoc.h.

Constructor & Destructor Documentation

CCollectDoc::CCollectDoc ( ) [protected]

Definition at line 118 of file colledoc.cpp.

{
}

CCollectDoc::~CCollectDoc ( ) [virtual]

Definition at line 122 of file colledoc.cpp.

{
}

Member Function Documentation

void CCollectDoc::DeleteContents ( ) [virtual]

Definition at line 175 of file colledoc.cpp.

{
  m_stringList.RemoveAll();

  POSITION pos = m_mystructList.GetHeadPosition();
  while (pos != NULL)
  {
    delete m_mystructList.GetNext(pos);
  }
  m_mystructList.RemoveAll();

  m_intList.RemoveAll();

  m_dwArray.RemoveAll();

  for (int n = 0; n < m_myobArray.GetSize(); n++)
  {
    delete m_myobArray[n];
  }
  m_myobArray.RemoveAll();

  m_mapStringToString.RemoveAll();

  m_ptArray.RemoveAll();

  pos = m_mapStringToMyObject.GetStartPosition();
  while (pos != NULL)
  {
    CString str;
    CMyObject* pMyObject;
    m_mapStringToMyObject.GetNextAssoc(pos, str, pMyObject);
    delete pMyObject;
  }
  m_mapStringToMyObject.RemoveAll();

  pos = m_mapDWordToMyStruct.GetStartPosition();
  while (pos != NULL)
  {
    DWORD dwKey;
    CMyStruct* pMyStruct;
    m_mapDWordToMyStruct.GetNextAssoc(pos, dwKey, pMyStruct);
    delete pMyStruct;
  }
  m_mapDWordToMyStruct.RemoveAll();
}

BOOL CCollectDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 126 of file colledoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  CString strFirst;
  strFirst.LoadString(IDS_INITIAL_STRING);
  m_stringList.AddTail(strFirst);

  CMyStruct* pMyStruct = new CMyStruct();
  pMyStruct->m_int = 1234;
  pMyStruct->m_float = 12.34f;
  pMyStruct->m_str.LoadString(IDS_INITIAL_STRING);
  m_mystructList.AddTail(pMyStruct);

  m_intList.AddTail(100);

  m_dwArray.Add(100000);

  CMyObject* pMyObject = new CMyObject();
  pMyObject->m_int = 5678;
  pMyObject->m_float = 56.78f;
  pMyObject->m_str.LoadString(IDS_INITIAL_STRING);
  m_myobArray.Add(pMyObject);

  CPoint pt(10,10);
  m_ptArray.Add(pt);

  CString strKey, strValue;
  strKey.LoadString(IDS_INITIAL_KEY);
  strValue.LoadString(IDS_INITIAL_VALUE);
  m_mapStringToString[strKey] = strValue;

  CMyObject* pMyObject2 = new CMyObject();
  pMyObject2->m_int = 1357;
  pMyObject2->m_float = 13.57f;
  pMyObject2->m_str.LoadString(IDS_INITIAL_STRING);
  m_mapStringToMyObject[strKey] = pMyObject2;

  CMyStruct* pMyStruct2 = new CMyStruct();
  pMyStruct2->m_int = 2468;
  pMyStruct2->m_float = 24.68f;
  pMyStruct2->m_str.LoadString(IDS_INITIAL_STRING);
  m_mapDWordToMyStruct[100] = pMyStruct2;

  return TRUE;
}

void CCollectDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 224 of file colledoc.cpp.

{
  POSITION pos;
  WORD nCount;
  WORD w;

  m_stringList.Serialize(ar);

  if (ar.IsStoring())
  {
    nCount = (WORD)m_mystructList.GetCount();
    ar << nCount;
    pos = m_mystructList.GetHeadPosition();
    while (pos != NULL)
    {
      CMyStruct* pMyStruct = m_mystructList.GetNext(pos);
      w = (WORD)pMyStruct->m_int;
      ar << w;
      ar << pMyStruct->m_float;
      ar << pMyStruct->m_str;
      nCount--;
    }
    ASSERT(nCount == 0);
  }
  else
  {
    ar >> nCount;
    while (nCount-- > 0)
    {
      CMyStruct* pMyStruct = new CMyStruct;
      ar >> w;
      pMyStruct->m_int = w;
      ar >> pMyStruct->m_float;
      ar >> pMyStruct->m_str;
      m_mystructList.AddTail(pMyStruct);
    }
  }

  m_intList.Serialize(ar);

  m_dwArray.Serialize(ar);

  m_myobArray.Serialize(ar);

  m_ptArray.Serialize(ar);

  m_mapStringToString.Serialize(ar);

  m_mapStringToMyObject.Serialize(ar);

  m_mapDWordToMyStruct.Serialize(ar);
}

Member Data Documentation

CDWordArray CCollectDoc::m_dwArray

Definition at line 76 of file colledoc.h.

CList<int,int> CCollectDoc::m_intList

Definition at line 75 of file colledoc.h.

CMapDWordToMyStruct CCollectDoc::m_mapDWordToMyStruct

Definition at line 81 of file colledoc.h.

CMapStringToMyObject CCollectDoc::m_mapStringToMyObject

Definition at line 80 of file colledoc.h.

CMapStringToString CCollectDoc::m_mapStringToString

Definition at line 79 of file colledoc.h.

CMyObjectArray CCollectDoc::m_myobArray

Definition at line 77 of file colledoc.h.

CMyStructList CCollectDoc::m_mystructList

Definition at line 74 of file colledoc.h.

CArray<CPoint,CPoint> CCollectDoc::m_ptArray

Definition at line 78 of file colledoc.h.

CStringList CCollectDoc::m_stringList

Definition at line 73 of file colledoc.h.

The documentation for this class was generated from the following files:
  • advanced/collect/colledoc.h
  • advanced/collect/colledoc.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCollectView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CCollectView Class Reference

#include "collevw.h"

List of all members.

Public Member Functions

virtual | ~CCollectView ()
CCollectDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)

Protected Member Functions

CCollectView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Protected Attributes

CStringList | m_stringList

Detailed Description

Definition at line 12 of file collevw.h.

Constructor & Destructor Documentation

CCollectView::CCollectView ( ) [protected]

Definition at line 39 of file collevw.cpp.

{
}

CCollectView::~CCollectView ( ) [virtual]

Definition at line 43 of file collevw.cpp.

{
}

Member Function Documentation

CCollectDoc * CCollectView::GetDocument ( ) [inline]

Definition at line 57 of file collevw.h.

   { return (CCollectDoc*)m_pDocument; }

void CCollectView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 67 of file collevw.cpp.

{
}

void CCollectView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 50 of file collevw.cpp.

{
  CCollectDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pDC;    // not used
}

void CCollectView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 71 of file collevw.cpp.

{
}

BOOL CCollectView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 61 of file collevw.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

Member Data Documentation

CStringList CCollectView::m_stringList [protected]

Definition at line 23 of file collevw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/collevw.h
  • advanced/collect/collevw.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CColorListBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CColorListBox Class Reference

List of all members.

Public Member Functions

void | AddColorItem (COLORREF color)
virtual int | CompareItem (LPCOMPAREITEMSTRUCT lpCIS)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDIS)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMIS)

Detailed Description

Definition at line 20 of file custlist.cpp.

Member Function Documentation

void CColorListBox::AddColorItem ( COLORREF color )

Definition at line 32 of file custlist.cpp.

{
  // add a listbox item
  AddString((LPCTSTR) color);
    // Listbox does not have the LBS_HASSTRINGS style, so the
    //  normal listbox string is used to store an RGB color
}

int CColorListBox::CompareItem ( LPCOMPAREITEMSTRUCT lpCIS ) [virtual]

Definition at line 82 of file custlist.cpp.

{
  COLORREF cr1 = (COLORREF)lpCIS->itemData1;
  COLORREF cr2 = (COLORREF)lpCIS->itemData2;
  if (cr1 == cr2)
    return 0;       // exact match

  // first do an intensity sort, lower intensities go first
  int intensity1 = GetRValue(cr1) + GetGValue(cr1) + GetBValue(cr1);
  int intensity2 = GetRValue(cr2) + GetGValue(cr2) + GetBValue(cr2);
  if (intensity1 < intensity2)
    return -1;      // lower intensity goes first
  else if (intensity1 > intensity2)
    return 1;       // higher intensity goes second

  // if same intensity, sort by color (blues first, reds last)
  if (GetBValue(cr1) > GetBValue(cr2))
    return -1;
  else if (GetGValue(cr1) > GetGValue(cr2))
    return -1;
  else if (GetRValue(cr1) > GetRValue(cr2))
    return -1;
  else
    return 1;
}

void CColorListBox::DrawItem ( LPDRAWITEMSTRUCT lpDIS ) [virtual]

Definition at line 51 of file custlist.cpp.

{
  CDC* pDC = CDC::FromHandle(lpDIS->hDC);
  COLORREF cr = (COLORREF)lpDIS->itemData; // RGB in item data

  if (lpDIS->itemAction & ODA_DRAWENTIRE)
  {
    // Paint the color item in the color requested
    CBrush br(cr);
    pDC->FillRect(&lpDIS->rcItem, &br);
  }

  if ((lpDIS->itemState & ODS_SELECTED) &&
    (lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)))
  {
    // item has been selected - hilite frame
    COLORREF crHilite = RGB(255-GetRValue(cr),
            255-GetGValue(cr), 255-GetBValue(cr));
    CBrush br(crHilite);
    pDC->FrameRect(&lpDIS->rcItem, &br);
  }

  if (!(lpDIS->itemState & ODS_SELECTED) &&
    (lpDIS->itemAction & ODA_SELECT))
  {
    // Item has been de-selected -- remove frame
    CBrush br(cr);
    pDC->FrameRect(&lpDIS->rcItem, &br);
  }
}

void CColorListBox::MeasureItem ( LPMEASUREITEMSTRUCT lpMIS ) [virtual]

Definition at line 44 of file custlist.cpp.

{
  // all items are of fixed size
  // must use LBS_OWNERDRAWVARIABLE for this to work
  lpMIS->itemHeight = COLOR_ITEM_HEIGHT;
}

The documentation for this class was generated from the following file:
  • general/ctrltest/custlist.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CColorMenu Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

CColorMenu Class Reference

#include "ctrltest.h"

List of all members.

Public Member Functions

CColorMenu ()
CColorMenu ()
virtual | ~CColorMenu ()
void | AppendColorMenuItem (UINT nID, COLORREF color)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDIS)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDIS)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMIS)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMIS)

Static Public Member Functions

static COLORREF | GetColor (UINT id)

Static Public Attributes

static int BASED_CODE | indexMap [17]

Detailed Description

Definition at line 20 of file ctrltest.h.

Constructor & Destructor Documentation

CColorMenu::CColorMenu ( )

Definition at line 25 of file custmenu.cpp.

{
  VERIFY(CreateMenu());
}

CColorMenu::~CColorMenu ( ) [virtual]

Definition at line 30 of file custmenu.cpp.

{
  Detach();
  ASSERT(m_hMenu == NULL);    // defaul CMenu::~CMenu will destroy
}

CColorMenu::CColorMenu ( )

Member Function Documentation

void CColorMenu::AppendColorMenuItem | ( | UINT | nID,
 |  | COLORREF | color
 | ) |  |

Definition at line 36 of file custmenu.cpp.

{
  VERIFY(AppendMenu(MF_ENABLED | MF_OWNERDRAW, nID, (LPCTSTR)color));
}

virtual void CColorMenu::DrawItem ( LPDRAWITEMSTRUCT lpDIS ) [virtual]
void CColorMenu::DrawItem ( LPDRAWITEMSTRUCT lpDIS ) [virtual]

Definition at line 54 of file custmenu.cpp.

{
  CDC* pDC = CDC::FromHandle(lpDIS->hDC);
  COLORREF cr = (COLORREF)lpDIS->itemData; // RGB in item data

  if (lpDIS->itemAction & ODA_DRAWENTIRE)
  {
    // Paint the color item in the color requested
    CBrush br(cr);
    pDC->FillRect(&lpDIS->rcItem, &br);
  }

  if ((lpDIS->itemState & ODS_SELECTED) &&
    (lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)))
  {
    // item has been selected - hilite frame
    COLORREF crHilite = RGB(255-GetRValue(cr),
            255-GetGValue(cr), 255-GetBValue(cr));
    CBrush br(crHilite);
    pDC->FrameRect(&lpDIS->rcItem, &br);
  }

  if (!(lpDIS->itemState & ODS_SELECTED) &&
    (lpDIS->itemAction & ODA_SELECT))
  {
    // Item has been de-selected -- remove frame
    CBrush br(cr);
    pDC->FrameRect(&lpDIS->rcItem, &br);
  }
}

COLORREF CColorMenu::GetColor ( UINT id ) [static]

Definition at line 72 of file colorlis.cpp.

{
  ENSURE(id >= ID_COLOR0);
  ENSURE(id <= ID_COLOR16);
  if (id == ID_COLOR16) // autocolor
    return ::GetSysColor(COLOR_WINDOWTEXT);
  else
  {
    CPalette* pPal = CPalette::FromHandle( (HPALETTE) GetStockObject(DEFAULT_PALETTE));
    ENSURE(pPal != NULL);
    PALETTEENTRY pe;
    if (pPal->GetPaletteEntries(indexMap[id-ID_COLOR0], 1, &pe) == 0)
      return ::GetSysColor(COLOR_WINDOWTEXT);
    else
      return RGB(pe.peRed,pe.peGreen,pe.peBlue);
//      return PALETTEINDEX(CColorMenu::indexMap[id-ID_COLOR0]);
  }
}

virtual void CColorMenu::MeasureItem ( LPMEASUREITEMSTRUCT lpMIS ) [virtual]
void CColorMenu::MeasureItem ( LPMEASUREITEMSTRUCT lpMIS ) [virtual]

Definition at line 47 of file custmenu.cpp.

{
  // all items are of fixed size
  lpMIS->itemWidth = COLOR_BOX_WIDTH;
  lpMIS->itemHeight = COLOR_BOX_HEIGHT;
}

Member Data Documentation

int BASED_CODE CColorMenu::indexMap [static]
Initial value:
 {
  0,
  1,
  2,
  3,
  4,
  5,
  6,
  12,
  7,
  13,
  14,
  15,
  16,
  17,
  18,
  19,
  0}

Definition at line 23 of file colorlis.h.

The documentation for this class was generated from the following files:
  • general/ctrltest/ctrltest.h
  • ole/wordpad/colorlis.h
  • general/ctrltest/custmenu.cpp
  • ole/wordpad/colorlis.cpp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CColorOptDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CColorOptDlg Class Reference

#include "coloropt.h"

List of all members.

Public Types

enum | { IDD = IDD_CHANGECOLOR }

Public Member Functions

CColorOptDlg (CDynaMenuDoc *pDoc, CWnd *pParent=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Protected Attributes

CDynaMenuDoc * m_pDoc

Detailed Description

Definition at line 29 of file coloropt.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 37 of file coloropt.h.

{ IDD = IDD_CHANGECOLOR };

Constructor & Destructor Documentation

CColorOptDlg::CColorOptDlg | ( | CDynaMenuDoc * | pDoc,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 60 of file coloropt.cpp.

  : CDialog(CColorOptDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CColorOptDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT

  m_pDoc = pDoc;
}

Member Function Documentation

void CColorOptDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 96 of file coloropt.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CColorOptDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP

  for (int i = 0; i < NUM_TEXTCOLOR; i++)
    DDX_Check(pDX, IDC_COLOR1 + i, m_pDoc->m_abAllowColor[i]);
}

BOOL CColorOptDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 138 of file coloropt.cpp.

{
  // set the text of each color checkbox
  for (int i = 0; i < NUM_TEXTCOLOR; i++)
  {
    CWnd* pCtl = GetDlgItem(i + IDC_COLOR1);
    CString strColor;
    strColor.LoadString(CDynaMenuDoc::m_aColorDef[i].m_nString);
    pCtl->SetWindowText(strColor);
  }

  // center the dialog window
  CenterWindow();

  // do the default processing (including DDX)
  return CDialog::OnInitDialog();
}

Member Data Documentation

CDynaMenuDoc* CColorOptDlg::m_pDoc [protected]

Definition at line 46 of file coloropt.h.

The documentation for this class was generated from the following files:
  • general/dynamenu/coloropt.h
  • general/dynamenu/coloropt.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CColorPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CColorPage Class Reference

#include "colorpge.h"

List of all members.

Public Types

enum | { IDD = IDD_COLOR }

Public Member Functions

CColorPage ()

Public Attributes

int | m_nColor

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
void | OnColorClicked (UINT nCmdID)

Detailed Description

Definition at line 15 of file colorpge.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file colorpge.h.

{ IDD = IDD_COLOR };

Constructor & Destructor Documentation

CColorPage::CColorPage ( )

Definition at line 29 of file colorpge.cpp.

  : CPropertyPage(CColorPage::IDD)
{
  //{{AFX_DATA_INIT(CColorPage)
  //}}AFX_DATA_INIT
  m_nColor = black;
}

Member Function Documentation

void CColorPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 37 of file colorpge.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CColorPage)
  DDX_Radio(pDX, IDC_BLACK, m_nColor);
  //}}AFX_DATA_MAP
}

void CColorPage::OnColorClicked ( UINT nCmdID ) [protected]

Definition at line 45 of file colorpge.cpp.

{
  // The CColorPage property page is used for both the
  // CModalShapePropSheet and the CModelessShapePropSheet.
  // Both these versions of the property sheet share a common
  // feature that they immediately update a shape.  In the
  // case of CModalShapePropSheet, the shape is in the preview
  // window.  In the case of CModelessShapePropSheet, the shape
  // is the currently selected shape in the view.

  CPropertySheet* pSheet = STATIC_DOWNCAST(CPropertySheet, GetParent());

  CModalShapePropSheet* pModalSheet =
    DYNAMIC_DOWNCAST(CModalShapePropSheet, pSheet);
  if (pModalSheet != NULL)
  {
    UpdateData();
    pModalSheet->UpdateShapePreview();
    SetModified(); // enable Apply Now button
  }

  CModelessShapePropSheet* pModelessSheet =
    DYNAMIC_DOWNCAST(CModelessShapePropSheet, pSheet);
  if (pModelessSheet != NULL)
  {
    UpdateData();
    CFrameWnd* pFrameWnd = STATIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
    CView* pView = pFrameWnd->GetActiveFrame()->GetActiveView();
    pView->SendMessage(WM_USER_CHANGE_OBJECT_PROPERTIES, 0, 0);
  }
}

Member Data Documentation

int CColorPage::m_nColor

Definition at line 24 of file colorpge.h.

The documentation for this class was generated from the following files:
  • general/propdlg/colorpge.h
  • general/propdlg/colorpge.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CColorView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CColorView Class Reference

#include "simpvw.h"

List of all members.

Public Member Functions

virtual | ~CColorView ()
CMainDoc * GetDocument ()
virtual void | OnActivateView (BOOL bActivate, CView *pActivateView, CView *pDeactiveView)
virtual void | OnDraw (CDC *pDC)

Protected Member Functions

CColorView ()
afx_msg int | OnMouseActivate (CWnd *pDesktopWnd, UINT nHitTest, UINT message)

Detailed Description

Definition at line 49 of file simpvw.h.

Constructor & Destructor Documentation

CColorView::CColorView ( ) [protected]

Definition at line 83 of file simpvw.cpp.

{
}

CColorView::~CColorView ( ) [virtual]

Definition at line 87 of file simpvw.cpp.

{
}

Member Function Documentation

CMainDoc* CColorView::GetDocument ( ) [inline]

Definition at line 57 of file simpvw.h.

      {
        ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
        return (CMainDoc*) m_pDocument;
      }

void CColorView::OnActivateView | ( | BOOL | bActivate,
 |  | CView * | pActivateView,
 |  | CView * | pDeactiveView |
 | ) |  |  | [virtual]

Definition at line 113 of file simpvw.cpp.

{
  ASSERT(FALSE);      // output only view - should never be active
}

void CColorView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 94 of file simpvw.cpp.

{
  CMainDoc* pDoc = GetDocument();

  CRect rect;
  GetClientRect(rect);

  // fill the view with the specified color
  CBrush br(pDoc->m_colorData);
  pDC->FillRect(rect, &br);
}

int CColorView::OnMouseActivate | ( | CWnd * | pDesktopWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 106 of file simpvw.cpp.

{
  // side-step CView's implementation since we don't want to activate
  //  this view
  return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
}

The documentation for this class was generated from the following files:
  • general/viewex/simpvw.h
  • general/viewex/simpvw.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CComboBoxExProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CComboBoxExProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CComboBoxExProp (const CString &strName, const CString &strValue, LPCTSTR lpszDescr=NULL, DWORD dwData=0, CImageList *pImageList=NULL)
BOOL | AddOption (LPCTSTR lpszOption, int nIcon=-1, int nIndent=0)

Protected Member Functions

virtual CComboBox * | CreateCombo (CWnd *pWndParent, CRect rect)
virtual BOOL | OnEdit (LPPOINT lptClick)

Protected Attributes

CArray< int, int > | m_lstIcons
CArray< int, int > | m_lstIndents
CImageList * | m_pImageList

Detailed Description

Definition at line 149 of file CustomProperties.h.

Constructor & Destructor Documentation

CComboBoxExProp::CComboBoxExProp | ( | const CString & | strName,
 |  | const CString & | strValue,
 |  | LPCTSTR | lpszDescr = NULL,
 |  | DWORD | dwData = 0,
 |  | CImageList * | pImageList = NULL
 | ) |  |

Definition at line 537 of file CustomProperties.cpp.

                                                                                :
  CMFCPropertyGridProperty(strName, (LPCTSTR) strValue, lpszDescr, dwData), m_pImageList(pImageList)
{
}

Member Function Documentation

BOOL CComboBoxExProp::AddOption | ( | LPCTSTR | lpszOption,
 |  | int | nIcon = -1,
 |  | int | nIndent = 0
 | ) |  |

Definition at line 601 of file CustomProperties.cpp.

{
  if (!CMFCPropertyGridProperty::AddOption(lpszOption))
  {
    return FALSE;
  }

  m_lstIcons.Add(nIcon);
  m_lstIndents.Add(nIndent);

  return TRUE;
}

CComboBox * CComboBoxExProp::CreateCombo | ( | CWnd * | pWndParent,
 |  | CRect | rect |
 | ) |  |  | [protected, virtual]

Definition at line 542 of file CustomProperties.cpp.

{
  rect.bottom = rect.top + 400;

  CComboBoxEx* pWndCombo = new CComboBoxEx;

  if (!pWndCombo->Create(WS_CHILD | CBS_DROPDOWNLIST | WS_VSCROLL, rect, pWndParent, AFX_PROPLIST_ID_INPLACE))
  {
    delete pWndCombo;
    return NULL;
  }

  if (m_pImageList != NULL)
  {
    pWndCombo->SetImageList(m_pImageList);
  }

  return pWndCombo;
}

BOOL CComboBoxExProp::OnEdit ( LPPOINT lptClick ) [protected, virtual]

Definition at line 562 of file CustomProperties.cpp.

{
  if (!CMFCPropertyGridProperty::OnEdit(lptClick))
  {
    return FALSE;
  }

  CComboBoxEx* pWndComboEx = DYNAMIC_DOWNCAST(CComboBoxEx, m_pWndCombo);
  if (pWndComboEx == NULL)
  {
    ASSERT(FALSE);
    return FALSE;
  }

  pWndComboEx->ResetContent();

  int i = 0;

  COMBOBOXEXITEM item;
  memset(&item, 0, sizeof(item));

  item.mask = CBEIF_IMAGE | CBEIF_INDENT | CBEIF_SELECTEDIMAGE | CBEIF_TEXT;

  for (POSITION pos = m_lstOptions.GetHeadPosition(); pos != NULL; i++)
  {
    CString strItem = m_lstOptions.GetNext(pos);

    item.iItem = i;
    item.iSelectedImage = item.iImage = m_lstIcons [i];
    item.iIndent = m_lstIndents [i];
    item.pszText = (LPTSTR)(LPCTSTR) strItem;
    item.cchTextMax = strItem.GetLength();

    pWndComboEx->InsertItem(&item);
  }

  return TRUE;
}

Member Data Documentation

CArray<int, int> CComboBoxExProp::m_lstIcons [protected]

Definition at line 161 of file CustomProperties.h.

CArray<int, int> CComboBoxExProp::m_lstIndents [protected]

Definition at line 162 of file CustomProperties.h.

CImageList* CComboBoxExProp::m_pImageList [protected]

Definition at line 160 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CComboRulerItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CComboRulerItem Class Reference

#include "ruler.h"

Inherits CRulerItem, and CRulerItem.

List of all members.

Public Member Functions

CComboRulerItem (UINT nBitmapID1, UINT nBitmapID2, CRulerItem &item)
CComboRulerItem (UINT nBitmapID1, UINT nBitmapID2, CRulerItem &item)
virtual void | Draw (CDC &dc)
virtual void | Draw (CDC &dc)
int | GetMax ()
int | GetMax ()
int | GetMin ()
int | GetMin ()
virtual BOOL | HitTestPix (CPoint pt)
virtual BOOL | HitTestPix (CPoint pt)
virtual void | SetAlignment (int nAlign)
virtual void | SetAlignment (int nAlign)
virtual void | SetBounds (int nMin, int nMax)
virtual void | SetBounds (int nMin, int nMax)
virtual void | SetHorzPosTwips (int nXPos)
virtual void | SetHorzPosTwips (int nXPos)
virtual void | SetRuler (CRulerBar *pRuler)
virtual void | SetRuler (CRulerBar *pRuler)
virtual void | SetVertPos (int nYPos)
virtual void | SetVertPos (int nYPos)
virtual void | TrackHorzPosTwips (int nXPos, BOOL bOnRuler=TRUE)
virtual void | TrackHorzPosTwips (int nXPos, BOOL bOnRuler=TRUE)

Protected Attributes

BOOL | m_bHitPrimary
CRulerItem & m_link
CRulerItem m_secondary

Detailed Description

Definition at line 64 of file ruler.h.

Constructor & Destructor Documentation

CComboRulerItem::CComboRulerItem | ( | UINT | nBitmapID1,
 |  | UINT | nBitmapID2,
 |  | CRulerItem & | item
 | ) |  |

Definition at line 182 of file ruler.cpp.

  : CRulerItem(nBitmapID1), m_secondary(nBitmapID2) , m_link(item)
{
  m_bHitPrimary = TRUE;
}

CComboRulerItem::CComboRulerItem | ( | UINT | nBitmapID1,
 |  | UINT | nBitmapID2,
 |  | CRulerItem & | item
 | ) |  |

Member Function Documentation

void CComboRulerItem::Draw ( CDC & dc ) [virtual]

Reimplemented from CRulerItem.

Definition at line 198 of file ruler.cpp.

{
  CRulerItem::Draw(dc);
  m_secondary.Draw(dc);
}

virtual void CComboRulerItem::Draw ( CDC & dc ) [virtual]

Reimplemented from CRulerItem.

int CComboRulerItem::GetMax ( )

Reimplemented from CRulerItem.

Definition at line 260 of file ruler.cpp.

{
  if (m_bHitPrimary)
  {
    int nPDist = CRulerItem::GetMax() - GetHorzPosTwips();
    int nLDist = m_link.GetMax() - m_link.GetHorzPosTwips();
    int nMinDist = (nPDist < nLDist) ? nPDist : nLDist;
    return GetHorzPosTwips() + nMinDist;
  }
  else
    return CRulerItem::GetMax();
}

int CComboRulerItem::GetMax ( )

Reimplemented from CRulerItem.

int CComboRulerItem::GetMin ( )

Reimplemented from CRulerItem.

int CComboRulerItem::GetMin ( )

Reimplemented from CRulerItem.

Definition at line 248 of file ruler.cpp.

{
  if (m_bHitPrimary)
  {
    int nPDist = GetHorzPosTwips() - CRulerItem::GetMin();
    int nLDist = m_link.GetHorzPosTwips() - m_link.GetMin();
    return GetHorzPosTwips() - min(nPDist, nLDist);
  }
  else
    return CRulerItem::GetMin();
}

BOOL CComboRulerItem::HitTestPix ( CPoint pt ) [virtual]

Reimplemented from CRulerItem.

Definition at line 188 of file ruler.cpp.

{
  m_bHitPrimary = FALSE;
  if (CRulerItem::GetHitRectPix().PtInRect(pt))
    m_bHitPrimary = TRUE;
  else
    return m_secondary.HitTestPix(pt);
  return TRUE;
}

virtual BOOL CComboRulerItem::HitTestPix ( CPoint pt ) [virtual]

Reimplemented from CRulerItem.

virtual void CComboRulerItem::SetAlignment ( int nAlign ) [virtual]

Reimplemented from CRulerItem.

void CComboRulerItem::SetAlignment ( int nAlign ) [virtual]

Reimplemented from CRulerItem.

Definition at line 230 of file ruler.cpp.

{
  CRulerItem::SetAlignment(nAlign);
  m_secondary.SetAlignment(nAlign);
}

virtual void CComboRulerItem::SetBounds | ( | int | nMin,
 |  | int | nMax |
 | ) |  |  | [virtual]

Reimplemented from CRulerItem.

void CComboRulerItem::SetBounds | ( | int | nMin,
 |  | int | nMax |
 | ) |  |  | [virtual]

Reimplemented from CRulerItem.

Definition at line 242 of file ruler.cpp.

{
  CRulerItem::SetBounds(nMin, nMax);
  m_secondary.SetBounds(nMin, nMax);
}

virtual void CComboRulerItem::SetHorzPosTwips ( int nXPos ) [virtual]

Reimplemented from CRulerItem.

void CComboRulerItem::SetHorzPosTwips ( int nXPos ) [virtual]

Reimplemented from CRulerItem.

Definition at line 204 of file ruler.cpp.

{
  if (m_bHitPrimary) // only change linked items by delta
    m_link.SetHorzPosTwips(m_link.GetHorzPosTwips() + nXPos - GetHorzPosTwips());
  CRulerItem::SetHorzPosTwips(nXPos);
  m_secondary.SetHorzPosTwips(nXPos);
}

virtual void CComboRulerItem::SetRuler ( CRulerBar * pRuler ) [virtual]

Reimplemented from CRulerItem.

void CComboRulerItem::SetRuler ( CRulerBar * pRuler ) [virtual]

Reimplemented from CRulerItem.

Definition at line 236 of file ruler.cpp.

{
  m_pRuler = pRuler;
  m_secondary.SetRuler(pRuler);
}

virtual void CComboRulerItem::SetVertPos ( int nYPos ) [virtual]

Reimplemented from CRulerItem.

void CComboRulerItem::SetVertPos ( int nYPos ) [virtual]

Reimplemented from CRulerItem.

Definition at line 223 of file ruler.cpp.

{
  m_secondary.SetVertPos(nYPos);
  nYPos += m_secondary.GetHitRectPix().Height();
  CRulerItem::SetVertPos(nYPos);
}

void CComboRulerItem::TrackHorzPosTwips | ( | int | nXPos,
 |  | BOOL | bOnRuler = TRUE |
 | ) |  |  | [virtual]

Reimplemented from CRulerItem.

Definition at line 212 of file ruler.cpp.

{
  int nMin = GetMin();
  int nMax = GetMax();
  if (nXPos < nMin)
    nXPos = nMin;
  if (nXPos > nMax)
    nXPos = nMax;
  SetHorzPosTwips(nXPos);
}

virtual void CComboRulerItem::TrackHorzPosTwips | ( | int | nXPos,
 |  | BOOL | bOnRuler = TRUE |
 | ) |  |  | [virtual]

Reimplemented from CRulerItem.

Member Data Documentation

BOOL CComboRulerItem::m_bHitPrimary [protected]

Definition at line 81 of file ruler.h.

CRulerItem & CComboRulerItem::m_link [protected]

Definition at line 80 of file ruler.h.

CRulerItem CComboRulerItem::m_secondary [protected]

Definition at line 79 of file ruler.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/ruler.h
  • vc2008fp/WordPad/ruler.h
  • ole/wordpad/ruler.cpp
  • vc2008fp/WordPad/ruler.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CComboToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CComboToolBar Class Reference

#include "combobar.h"

List of all members.

Public Member Functions

CNotepadView * GetView ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Public Attributes

CTBComboBox m_toolBarCombo

Protected Member Functions

afx_msg void | OnSelectEndOk ()
afx_msg void | OnSetFocus ()

Detailed Description

Definition at line 33 of file combobar.h.

Member Function Documentation

CNotepadView* CComboToolBar::GetView ( )
afx_msg void CComboToolBar::OnSelectEndOk ( ) [protected]
void CComboToolBar::OnSetFocus ( ) [protected]

Definition at line 33 of file combobar.cpp.

{
  // combobox is gaining focus, highlight text in edit control
  m_toolBarCombo.SetEditSel(0,-1);
}

BOOL CComboToolBar::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 39 of file combobar.cpp.

{
  // 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())
    {
      CNotepadView* 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 DOWN-ARROW
  if (pMsg->wParam == VK_DOWN && GetKeyState(VK_DOWN) < 0 &&
    m_toolBarCombo.GetDroppedState() == FALSE)
  {
    m_toolBarCombo.ShowDropDown();
    return TRUE; // key processed
  }

  return  CToolBar::PreTranslateMessage(pMsg);
}

Member Data Documentation

CTBComboBox CComboToolBar::m_toolBarCombo

Definition at line 37 of file combobar.h.

The documentation for this class was generated from the following files:
  • general/npp/combobar.h
  • general/npp/combobar.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCommandLinkCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Private Attributes

CCommandLinkCtrlPage Class Reference

#include "CommandLinkCtrlPage.h"

List of all members.

Public Types

enum | { IDD = IDD_COMMAND_LINK_CONTROL }

Public Member Functions

CCommandLinkCtrlPage ()
virtual | ~CCommandLinkCtrlPage ()
afx_msg void | OnBnClickedCheckElev ()
afx_msg void | OnBnClickedSetButtonNote ()
virtual BOOL | OnInitDialog ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Private Attributes

CButton | m_checkShowElev
CButton | m_cmdbtn
CEdit | m_editNote

Detailed Description

Definition at line 7 of file CommandLinkCtrlPage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 16 of file CommandLinkCtrlPage.h.

{ IDD = IDD_COMMAND_LINK_CONTROL };

Constructor & Destructor Documentation

CCommandLinkCtrlPage::CCommandLinkCtrlPage ( )

Definition at line 13 of file CommandLinkCtrlPage.cpp.

  : CPropertyPage(CCommandLinkCtrlPage::IDD)
{
}

CCommandLinkCtrlPage::~CCommandLinkCtrlPage ( ) [virtual]

Definition at line 18 of file CommandLinkCtrlPage.cpp.

{
}

Member Function Documentation

void CCommandLinkCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 22 of file CommandLinkCtrlPage.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_BUTTON_NOTE, m_editNote);
  DDX_Control(pDX, IDC_CHECK_ELEV, m_checkShowElev);
  DDX_Control(pDX, IDC_COMMAND, m_cmdbtn);
}

void CCommandLinkCtrlPage::OnBnClickedCheckElev ( )

Definition at line 55 of file CommandLinkCtrlPage.cpp.

{
  m_cmdbtn.SetShield(m_checkShowElev.GetCheck() == BST_CHECKED);
}

void CCommandLinkCtrlPage::OnBnClickedSetButtonNote ( )

Definition at line 48 of file CommandLinkCtrlPage.cpp.

{
  CString note;
  m_editNote.GetWindowText(note);
  m_cmdbtn.SetNote(note);
}

BOOL CCommandLinkCtrlPage::OnInitDialog ( ) [virtual]

Definition at line 30 of file CommandLinkCtrlPage.cpp.

{
  CPropertyPage::OnInitDialog();

  // Init UI
  LPCTSTR szInitialNote = _T("and the note goes here ...");
  m_editNote.SetWindowText(szInitialNote);
  OnBnClickedSetButtonNote();

  return TRUE;
}

Member Data Documentation

CButton CCommandLinkCtrlPage::m_checkShowElev [private]

Definition at line 31 of file CommandLinkCtrlPage.h.

CButton CCommandLinkCtrlPage::m_cmdbtn [private]

Definition at line 29 of file CommandLinkCtrlPage.h.

CEdit CCommandLinkCtrlPage::m_editNote [private]

Definition at line 30 of file CommandLinkCtrlPage.h.

The documentation for this class was generated from the following files:
  • controls/cmnctrl/CommandLinkCtrlPage.h
  • controls/cmnctrl/CommandLinkCtrlPage.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CComponentCategoriesDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CComponentCategoriesDlg Class Reference

#include "ComCatDg.H"

List of all members.

Public Types

enum | { IDD = IDD_COMPONENTCATEGORIES }

Public Member Functions

CComponentCategoriesDlg (UINT idCaption, CWnd *pParent=NULL)

Public Attributes

UINT m_idCaption
CCheckListBox | m_lbCategories
CList< CATID, CATID & > | m_lSelectedCategories

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()
afx_msg void | OnSelectAll ()

Protected Attributes

CArray< CATID, CATID & > | m_aAvailableCategories
ICatInformationPtr | m_pCatInfo

Detailed Description

Definition at line 22 of file ComCatDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file ComCatDg.H.

{ IDD = IDD_COMPONENTCATEGORIES };

Constructor & Destructor Documentation

CComponentCategoriesDlg::CComponentCategoriesDlg | ( | UINT | idCaption,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 24 of file ComCatDg.Cpp.

                   :
   CDialog( CComponentCategoriesDlg::IDD, pParent ),
   m_idCaption( idCaption )
{
  //{{AFX_DATA_INIT(CComponentCategoriesDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CComponentCategoriesDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 35 of file ComCatDg.Cpp.

{
   int iItem;
   int iCategory;
   POSITION posSelectedCategory;
   CATID catid;

  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CComponentCategoriesDlg)
  DDX_Control(pDX, IDC_CATEGORIES, m_lbCategories);
  //}}AFX_DATA_MAP

   if( pDX->m_bSaveAndValidate )
   {
    m_lSelectedCategories.RemoveAll();
    for( iItem = 0; iItem < m_lbCategories.GetCount(); iItem++ )
    {
     if( m_lbCategories.GetCheck( iItem ) )
     {
      iCategory = (int)m_lbCategories.GetItemData( iItem );
      m_lSelectedCategories.AddTail( m_aAvailableCategories[iCategory] );
     }
    }
   }
   else
   {
    posSelectedCategory = m_lSelectedCategories.GetHeadPosition();
    while( posSelectedCategory != NULL )
    {
     catid = m_lSelectedCategories.GetNext( posSelectedCategory );
     iCategory = 0;
     while( (iCategory < m_aAvailableCategories.GetSize()) && !IsEqualGUID(
      m_aAvailableCategories[iCategory], catid ) )
     {
      iCategory++;
     }
     if( iCategory < m_aAvailableCategories.GetSize() )
     {
      // We found the category
      iItem = 0;
      while( int( m_lbCategories.GetItemData( iItem ) ) != iCategory )
      {
         iItem++;
         ASSERT( iItem < m_lbCategories.GetCount() );
      }
      m_lbCategories.SetCheck( iItem, 1 );
     }
    }
   }
}

void CComponentCategoriesDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 174 of file ComCatDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CComponentCategoriesDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 166 of file ComCatDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CComponentCategoriesDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 98 of file ComCatDg.Cpp.

{
   IEnumCATEGORYINFOPtr pEnum;
   HRESULT hResult;
   BOOL tDone;
   CATEGORYINFO info;
   CString strCategory;
   CString strCaption;
   int iItem;
   int iCategory;

  CDialog::OnInitDialog();

   LOAD_STRING_FROM_RESOURCE( strCaption, m_idCaption );
   SetWindowText( strCaption );

   hResult = m_pCatInfo.CreateInstance( CLSID_StdComponentCategoriesMgr, NULL,
    CLSCTX_INPROC_SERVER );
   if( FAILED( hResult ) )
   {
    TRACE( "Failed to create category manager.\n" );
    return( TRUE );
   }

   LOAD_STRING_FROM_RESOURCE( strCaption, m_idCaption );
   SetWindowText( strCaption );

   hResult = m_pCatInfo->EnumCategories( GetUserDefaultLCID(), &pEnum );
   if( FAILED( hResult ) )
   {
    TRACE( "Failed to enumerate categories.\n" );
    return( TRUE );
   }

   tDone = FALSE;
   while( !tDone )
   {
    hResult = pEnum->Next( 1, &info, NULL );
    if( hResult == S_OK )
    {
     strCategory = info.szDescription;
     iItem = m_lbCategories.AddString( strCategory );
     iCategory = (int)m_aAvailableCategories.Add( info.catid );
     m_lbCategories.SetItemData( iItem, iCategory );
    }
    else
    {
     tDone = TRUE;
    }
   }

   UpdateData( FALSE );

  return( TRUE );
}

void CComponentCategoriesDlg::OnSelectAll ( ) [protected]

Definition at line 154 of file ComCatDg.Cpp.

{
   m_lbCategories.SelItemRange( TRUE, 0, m_lbCategories.GetCount() );
}

Member Data Documentation

CArray< CATID, CATID& > CComponentCategoriesDlg::m_aAvailableCategories [protected]

Definition at line 47 of file ComCatDg.H.

UINT CComponentCategoriesDlg::m_idCaption

Definition at line 34 of file ComCatDg.H.

CCheckListBox CComponentCategoriesDlg::m_lbCategories

Definition at line 31 of file ComCatDg.H.

CList< CATID, CATID& > CComponentCategoriesDlg::m_lSelectedCategories

Definition at line 35 of file ComCatDg.H.

ICatInformationPtr CComponentCategoriesDlg::m_pCatInfo [protected]

Definition at line 46 of file ComCatDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/ComCatDg.H
  • ole/TstCon/ComCatDg.Cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CConfigDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CConfigDlg Class Reference

#include "ConfigDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_CONFIG }
enum | { IDD = IDD_CONFIG }

Public Member Functions

CConfigDlg (BOOL bFullScreen, LPCTSTR szPath, CWnd *pParent=NULL)
CConfigDlg (BOOL bIsStartup=FALSE)
virtual | ~CConfigDlg ()
void | OnBnClickedBrowse (void)

Public Attributes

CButton | m_btnCancel
int | m_nConfig
int | m_nFullScreen
CString | m_strPath

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Protected Attributes

BOOL | m_bIsStartup

Detailed Description

Definition at line 14 of file ConfigDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file ConfigDlg.h.

{ IDD = IDD_CONFIG };

anonymous enum
Enumerator:
IDD

Definition at line 23 of file ConfigDlg.h.

{ IDD = IDD_SELECT_CONF };

Constructor & Destructor Documentation

CConfigDlg::CConfigDlg | ( | BOOL | bFullScreen,
 |  | LPCTSTR | szPath,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 19 of file ConfigDlg.cpp.

  : CDialog(CConfigDlg::IDD, pParent)
  , m_strPath(szPath)
  , m_nFullScreen(bFullScreen)
{
}

CConfigDlg::~CConfigDlg ( ) [virtual]

Definition at line 26 of file ConfigDlg.cpp.

{
}

CConfigDlg::CConfigDlg ( BOOL bIsStartup = FALSE )

Definition at line 25 of file ConfigDlg.cpp.

  : CDialog(CConfigDlg::IDD, NULL)
{
  m_nConfig = 0;

  m_bIsStartup = bIsStartup;
}

Member Function Documentation

void CConfigDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 30 of file ConfigDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  DDX_Text(pDX, IDC_PATH, m_strPath);
  DDV_MaxChars(pDX, m_strPath, 255);
  DDX_Radio(pDX, IDC_WINDOW, m_nFullScreen);
}

virtual void CConfigDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
void CConfigDlg::OnBnClickedBrowse ( void )

Definition at line 46 of file ConfigDlg.cpp.

{
  HRESULT hr;
  LPITEMIDLIST pItemList;
  BROWSEINFO browseinfo;
  TCHAR path[MAX_PATH];
  hr = ::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
  if (FAILED(hr)) {
    TRACE("CoInitEx failed: %x\n", hr);
    return;
  }

  IMalloc *pMalloc = NULL;
  hr = SHGetMalloc(&pMalloc);
  if (FAILED(hr)) {
    TRACE("Can't retrieve system's IMalloc interface: %x\n", hr);
    return;
  }
  ENSURE(pMalloc);

  memset(&browseinfo, 0, sizeof(BROWSEINFO));
  CString strCaption;
  browseinfo.hwndOwner = GetSafeHwnd();
  browseinfo.pszDisplayName = path;
  browseinfo.ulFlags = BIF_NEWDIALOGSTYLE | BIF_RETURNONLYFSDIRS;
  strCaption.LoadString(IDS_CONFIG_CAPTION);
  browseinfo.lpszTitle = strCaption;

  pItemList = ::SHBrowseForFolder(&browseinfo);
  if (pItemList) {
    // Behold the elegance of CStrBuf!
    ::SHGetPathFromIDList(pItemList, CStrBuf(m_strPath, MAX_PATH));
    pMalloc->Free(pItemList);
    UpdateData(FALSE);
  }
  pMalloc->Release();
  pMalloc = NULL;
  ::CoUninitialize();
}

BOOL CConfigDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 48 of file ConfigDlg.cpp.

{
  CDialog::OnInitDialog();

  if (m_bIsStartup)
  {
    m_btnCancel.EnableWindow (FALSE);
    m_btnCancel.ShowWindow (SW_HIDE);
  }

  return TRUE;  // return TRUE unless you set the focus to a control
                // EXCEPTION: OCX Property Pages should return FALSE
}

Member Data Documentation

BOOL CConfigDlg::m_bIsStartup [protected]

Definition at line 38 of file ConfigDlg.h.

CButton CConfigDlg::m_btnCancel

Definition at line 24 of file ConfigDlg.h.

int CConfigDlg::m_nConfig

Definition at line 25 of file ConfigDlg.h.

int CConfigDlg::m_nFullScreen

Definition at line 31 of file ConfigDlg.h.

CString CConfigDlg::m_strPath

Definition at line 30 of file ConfigDlg.h.

The documentation for this class was generated from the following files:
  • advanced/DllScreenCap/DllScreenCap/ConfigDlg.h
  • vc2008fp/MenuSubSet/ConfigDlg.h
  • advanced/DllScreenCap/DllScreenCap/ConfigDlg.cpp
  • vc2008fp/MenuSubSet/ConfigDlg.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CContainerApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CContainerApp Class Reference

#include "contain.h"

List of all members.

Public Member Functions

CContainerApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 22 of file contain.h.

Constructor & Destructor Documentation

CContainerApp::CContainerApp ( )

Definition at line 44 of file contain.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CContainerApp::InitInstance ( ) [virtual]

Definition at line 58 of file contain.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_CONTRTYPE,
    RUNTIME_CLASS(CContainerDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CContainerView));
  pDocTemplate->SetContainerInfo(IDR_CONTRTYPE_CNTR_IP);
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    // free the memory
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // Enable drag/drop open
  m_pMainWnd->DragAcceptFiles();

  // Enable DDE Execute open
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CContainerApp::OnAppAbout ( )

Definition at line 165 of file contain.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • controls/contain/contain.h
  • controls/contain/contain.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CContainerDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CContainerDoc Class Reference

#include "contrdoc.h"

List of all members.

Public Member Functions

virtual | ~CContainerDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CContainerDoc ()

Detailed Description

Definition at line 15 of file contrdoc.h.

Constructor & Destructor Documentation

CContainerDoc::CContainerDoc ( ) [protected]

Definition at line 46 of file contrdoc.cpp.

{
  // Use OLE compound files
  EnableCompoundFile();

  // TODO: add one-time construction code here

}

CContainerDoc::~CContainerDoc ( ) [virtual]

Definition at line 55 of file contrdoc.cpp.

{
}

Member Function Documentation

BOOL CContainerDoc::OnNewDocument ( ) [virtual]

Definition at line 59 of file contrdoc.cpp.

{
  if (!COleDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CContainerDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 73 of file contrdoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }

  // Calling the base class COleDocument enables serialization
  //  of the container document's COleClientItem objects.
  COleDocument::Serialize(ar);
}

The documentation for this class was generated from the following files:
  • controls/contain/contrdoc.h
  • controls/contain/contrdoc.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CContainerInfoDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CContainerInfoDlg Class Reference

#include "ConInfDg.H"

List of all members.

Public Types

enum | { IDD = IDD_CONTAINERINFO }

Public Member Functions

CContainerInfoDlg (CWnd *pParent, CTestContainer98Doc *pDoc)

Public Attributes

CListCtrl | m_listObjects

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()

Protected Attributes

CTestContainer98Doc * m_pDoc

Detailed Description

Definition at line 22 of file ConInfDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file ConInfDg.H.

{ IDD = IDD_CONTAINERINFO };

Constructor & Destructor Documentation

CContainerInfoDlg::CContainerInfoDlg | ( | CWnd * | pParent,
 |  | CTestContainer98Doc * | pDoc
 | ) |  |

Definition at line 24 of file ConInfDg.Cpp.

                               :
   CDialog( CContainerInfoDlg::IDD, pParent ),
   m_pDoc( pDoc )
{
   ASSERT( m_pDoc != NULL );

  //{{AFX_DATA_INIT(CContainerInfoDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CContainerInfoDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 37 of file ConInfDg.Cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CContainerInfoDlg)
  DDX_Control(pDX, IDC_OBJECTS, m_listObjects);
  //}}AFX_DATA_MAP
}

void CContainerInfoDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 172 of file ConInfDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CContainerInfoDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 164 of file ConInfDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CContainerInfoDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 56 of file ConInfDg.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;
   int iItem;
   CString strItemName;
   CString strState;
   CString strObject;
   CString strWindowStatus;
   int nAutoWidth;
   int nAutoHeaderWidth;

  CDialog::OnInitDialog();

   LOAD_STRING_FROM_RESOURCE( strObject, IDS_CONTAINERINFOOBJECTHEADER );
   m_listObjects.InsertColumn( 0, strObject, LVCFMT_LEFT, 100 );

   LOAD_STRING_FROM_RESOURCE( strState, IDS_CONTAINERINFOSTATEHEADER );
   m_listObjects.InsertColumn( 1, strState, LVCFMT_LEFT, 100 );

   LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_CONTAINERINFOWINDOWHEADER );
   m_listObjects.InsertColumn( 2, strWindowStatus, LVCFMT_LEFT, 100 );

   iItem = 0;
   posItem = m_pDoc->GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)m_pDoc->GetNextItem( posItem );
    strItemName = pItem->GetDisplayName();
    m_listObjects.InsertItem( iItem, strItemName );
    m_listObjects.SetItemText( iItem, 0, strItemName );
    switch( pItem->GetItemState() )
    {
    case COleClientItem::activeState:
     LOAD_STRING_FROM_RESOURCE( strState, IDS_ACTIVESTATE );
     if( pItem->IsWindowless() )
     {
      LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWLESS );
     }
     else
     {
      LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWED );
     }
     break;

    case COleClientItem::activeUIState:
     LOAD_STRING_FROM_RESOURCE( strState, IDS_UIACTIVESTATE );
     if( pItem->IsWindowless() )
     {
      LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWLESS );
     }
     else
     {
      LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWED );
     }
     break;

    case COleClientItem::openState:
     LOAD_STRING_FROM_RESOURCE( strState, IDS_OPENSTATE );
     strWindowStatus.Empty();
     break;

    case COleClientItem::loadedState:
     LOAD_STRING_FROM_RESOURCE( strState, IDS_LOADEDSTATE );
     strWindowStatus.Empty();
     break;

    case COleClientItem::emptyState:
     LOAD_STRING_FROM_RESOURCE( strState, IDS_EMPTYSTATE );
     strWindowStatus.Empty();
     break;

    default:
     ASSERT( FALSE );
     break;
    }
    m_listObjects.SetItemText( iItem, 1, strState );
    m_listObjects.SetItemText( iItem, 2, strWindowStatus );
    iItem++;
   }

   m_listObjects.SetColumnWidth( 0, LVSCW_AUTOSIZE );
   nAutoWidth = m_listObjects.GetColumnWidth( 0 );
   m_listObjects.SetColumnWidth( 0, LVSCW_AUTOSIZE_USEHEADER );
   nAutoHeaderWidth = m_listObjects.GetColumnWidth( 0 );
   m_listObjects.SetColumnWidth( 0, max( nAutoWidth, nAutoHeaderWidth ) );

   m_listObjects.SetColumnWidth( 1, LVSCW_AUTOSIZE );
   nAutoWidth = m_listObjects.GetColumnWidth( 1 );
   m_listObjects.SetColumnWidth( 1, LVSCW_AUTOSIZE_USEHEADER );
   nAutoHeaderWidth = m_listObjects.GetColumnWidth( 1 );
   m_listObjects.SetColumnWidth( 1, max( nAutoWidth, nAutoHeaderWidth ) );

   m_listObjects.SetColumnWidth( 2, LVSCW_AUTOSIZE );
   nAutoWidth = m_listObjects.GetColumnWidth( 2 );
   m_listObjects.SetColumnWidth( 2, LVSCW_AUTOSIZE_USEHEADER );
   nAutoHeaderWidth = m_listObjects.GetColumnWidth( 2 );
   m_listObjects.SetColumnWidth( 2, max( nAutoWidth, nAutoHeaderWidth ) );

  return( TRUE );
}

Member Data Documentation

CListCtrl CContainerInfoDlg::m_listObjects

Definition at line 31 of file ConInfDg.H.

CTestContainer98Doc* CContainerInfoDlg::m_pDoc [protected]

Definition at line 44 of file ConInfDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/ConInfDg.H
  • ole/TstCon/ConInfDg.Cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CContainerItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CContainerItem Class Reference

#include "cntritem.h"

List of all members.

Public Member Functions

CContainerItem (CContainerDoc *pContainer=NULL)
~CContainerItem ()
CContainerView * GetActiveView ()
CContainerDoc * GetDocument ()
void | InvalidateItem ()
virtual void | OnChange (OLE_NOTIFICATION wNotification, DWORD dwParam)
virtual void | Serialize (CArchive &ar)
void | UpdateFromServerExtent ()

Public Attributes

CRect | m_rect

Protected Member Functions

virtual void | OnActivate ()
virtual BOOL | OnChangeItemPosition (const CRect &rectPos)
virtual void | OnDeactivateUI (BOOL bUndoable)
virtual void | OnGetItemPosition (CRect &rPosition)

Detailed Description

Definition at line 14 of file cntritem.h.

Constructor & Destructor Documentation

CContainerItem::CContainerItem ( CContainerDoc * pContainer = NULL )

Definition at line 29 of file cntritem.cpp.

  : COleClientItem(pContainer)
{
  // TODO: add one-time construction code here
  m_rect.SetRect(10, 10, 50, 50);
}

CContainerItem::~CContainerItem ( )

Definition at line 36 of file cntritem.cpp.

{
  // TODO: add cleanup code here

}

Member Function Documentation

CContainerView* CContainerItem::GetActiveView ( ) [inline]

Definition at line 31 of file cntritem.h.

    { return (CContainerView*)COleClientItem::GetActiveView(); }

CContainerDoc* CContainerItem::GetDocument ( ) [inline]

Definition at line 29 of file cntritem.h.

    { return (CContainerDoc*)COleClientItem::GetDocument(); }

void CContainerItem::InvalidateItem ( )

Definition at line 42 of file cntritem.cpp.

{
  GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_ITEM, this);
}

void CContainerItem::OnActivate ( ) [protected, virtual]

Definition at line 132 of file cntritem.cpp.

{
  // allow only one inplace active item per frame
  CView* pView = GetActiveView();
  ASSERT_VALID(pView);
  COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
  if (pItem != NULL && pItem != this)
    pItem->Close();

  COleClientItem::OnActivate();
}

void CContainerItem::OnChange | ( | OLE_NOTIFICATION | wNotification,
 |  | DWORD | dwParam |
 | ) |  |  | [virtual]

Definition at line 76 of file cntritem.cpp.

{
  ASSERT_VALID(this);

  COleClientItem::OnChange(nCode, dwParam);

  // When an item is being edited (either in-place or fully open)
  //  it sends OnChange notifications for changes in the state of the
  //  item or visual appearance of its content.
  switch (nCode)
  {
  case OLE_CHANGED:
    InvalidateItem();
    UpdateFromServerExtent();
    break;
  case OLE_CHANGED_STATE:
  case OLE_CHANGED_ASPECT:
    InvalidateItem();
    break;
  }

}

BOOL CContainerItem::OnChangeItemPosition ( const CRect & rectPos ) [protected, virtual]

Definition at line 99 of file cntritem.cpp.

{
  ASSERT_VALID(this);

  // During in-place activation CContainerItem::OnChangeItemPosition
  //  is called by the server to change the position of the in-place
  //  window.  Usually, this is a result of the data in the server
  //  document changing such that the extent has changed or as a result
  //  of in-place resizing.
  //
  // The default here is to call the base class, which will call
  //  COleClientItem::SetItemRects to move the item
  //  to the new position.

  if (!COleClientItem::OnChangeItemPosition(rectPos))
    return FALSE;
  InvalidateItem();
  m_rect = rectPos;
  InvalidateItem();

  // mark document as dirty
  GetDocument()->SetModifiedFlag();

  return TRUE;
}

void CContainerItem::OnDeactivateUI ( BOOL bUndoable ) [protected, virtual]

Definition at line 144 of file cntritem.cpp.

{
  COleClientItem::OnDeactivateUI(bUndoable);

  // hide the object if it is not an outside-in object
  DWORD dwMisc = 0;
  m_lpObject->GetMiscStatus(GetDrawAspect(), &dwMisc);
  if (dwMisc & OLEMISC_INSIDEOUT)
    DoVerb(OLEIVERB_HIDE, NULL);
}

void CContainerItem::OnGetItemPosition ( CRect & rPosition ) [protected, virtual]

Definition at line 125 of file cntritem.cpp.

{
  ASSERT_VALID(this);
  // return rect relative to client area of view
  rPosition = m_rect;
}

void CContainerItem::Serialize ( CArchive & ar ) [virtual]

Definition at line 155 of file cntritem.cpp.

{
  ASSERT_VALID(this);

  // Call base class first to read in COleClientItem data.
  // Since this sets up the m_pDocument pointer returned from
  //  CContainerItem::GetDocument, it is a good idea to call
  //  the base class Serialize first.
  COleClientItem::Serialize(ar);

  // now store/retrieve data specific to CContainerItem
  if (ar.IsStoring())
  {
    // TODO: add storing code here
    ar << m_rect;
  }
  else
  {
    // TODO: add loading code here
    ar >> m_rect;
  }
}

void CContainerItem::UpdateFromServerExtent ( )

Definition at line 47 of file cntritem.cpp.

{
  CSize size;
  if (GetCachedExtent(&size))
  {
    // OLE returns the extent in HIMETRIC units -- we need pixels
    CClientDC dc(NULL);
    dc.HIMETRICtoDP(&size);

    // Only invalidate if it has actually changed, and also
    // only if it is not in-place active.  When in-place active, the
    // container item size should sync with the "window size" of the
    // object.  Only when not in-place active should the container
    // item size should sync with the natural size of the object.

    if ((size != m_rect.Size()) && !IsInPlaceActive())
    {
      // invalidate old, update, invalidate new
      InvalidateItem();
      m_rect.bottom = m_rect.top + size.cy;
      m_rect.right = m_rect.left + size.cx;
      InvalidateItem();

      // mark document as modified
      GetDocument()->SetModifiedFlag();
    }
  }
}

Member Data Documentation

CRect CContainerItem::m_rect

Definition at line 28 of file cntritem.h.

The documentation for this class was generated from the following files:
  • controls/contain/cntritem.h
  • controls/contain/cntritem.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CContainerView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CContainerView Class Reference

#include "contrvw.h"

List of all members.

Public Member Functions

virtual | ~CContainerView ()
CContainerDoc * GetDocument ()
CContainerItem * | HitTestItems (CPoint point)
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
void | SetSelection (CContainerItem *pItem)
void | SetupTracker (CContainerItem *pItem, CRectTracker *pTracker)

Public Attributes

CContainerItem * m_pSelection

Protected Member Functions

CContainerView ()
virtual BOOL | IsSelected (const CObject *pDocItem) const
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnCancelEditCntr ()
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditPaste ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnInitialUpdate ()
afx_msg void | OnInsertObject ()
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
afx_msg void | OnUpdateEditClear (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditCopy (CCmdUI *pCmdUI)

Detailed Description

Definition at line 14 of file contrvw.h.

Constructor & Destructor Documentation

CContainerView::CContainerView ( ) [protected]

Definition at line 55 of file contrvw.cpp.

{
  m_pSelection = NULL;
  // TODO: add construction code here

}

CContainerView::~CContainerView ( ) [virtual]

Definition at line 62 of file contrvw.cpp.

{
}

Member Function Documentation

CContainerDoc * CContainerView::GetDocument ( ) [inline]

Definition at line 85 of file contrvw.h.

   { return (CContainerDoc*)m_pDocument; }

CContainerItem * CContainerView::HitTestItems ( CPoint point )

Definition at line 230 of file contrvw.cpp.

{
  CContainerDoc* pDoc = GetDocument();
  CContainerItem* pItemHit = NULL;
  POSITION pos = pDoc->GetStartPosition();
  while (pos != NULL)
  {
    CContainerItem* pItem = (CContainerItem*)pDoc->GetNextItem(pos);
    if (pItem->m_rect.PtInRect(point))
      pItemHit = pItem;
  }
  return pItemHit;    // return top item at point
}

BOOL CContainerView::IsSelected ( const CObject * pDocItem ) const [protected, virtual]

Definition at line 128 of file contrvw.cpp.

{
  // The implementation below is adequate if your selection consists of
  //  only CContainerItem objects.  To handle different selection
  //  mechanisms, the implementation here should be replaced.

  // TODO: implement this function that tests for a selected OLE client item

  return pDocItem == m_pSelection;
}

void CContainerView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 115 of file contrvw.cpp.

{
  // TODO: add extra initialization before printing
}

void CContainerView::OnCancelEditCntr ( ) [protected]

Definition at line 192 of file contrvw.cpp.

{
  // Close any in-place active item on this view.
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL)
  {
    pActiveItem->Close();
  }
  ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
}

void CContainerView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 77 of file contrvw.cpp.

{
  CContainerDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  // draw the OLE items from the list
  POSITION pos = pDoc->GetStartPosition();
  while (pos != NULL)
  {
    // draw the item
    CContainerItem* pItem = (CContainerItem*)pDoc->GetNextItem(pos);
    pItem->Draw(pDC, pItem->m_rect);

    // draw the tracker over the item
    CRectTracker tracker;
    SetupTracker(pItem, &tracker);
    tracker.Draw(pDC);
  }
}

void CContainerView::OnEditClear ( ) [protected]

Definition at line 358 of file contrvw.cpp.

{
  if (m_pSelection != NULL)
  {
    m_pSelection->Delete();
    m_pSelection = NULL;
    GetDocument()->UpdateAllViews(NULL);
  }
}

void CContainerView::OnEditCopy ( ) [protected]

Definition at line 373 of file contrvw.cpp.

{
  if (m_pSelection != NULL)
    m_pSelection->CopyToClipboard();
}

void CContainerView::OnEditPaste ( ) [protected]

Definition at line 384 of file contrvw.cpp.

{
  CContainerItem* pItem = NULL;

  TRY
  {
    // Create new item connected to this document.
    CContainerDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);
    pItem = new CContainerItem(pDoc);
    ASSERT_VALID(pItem);

    // Initialize the item from clipboard data
    if (!pItem->CreateFromClipboard())
      AfxThrowMemoryException();  // any exception will do
    ASSERT_VALID(pItem);

    // update the size before displaying
    pItem->UpdateFromServerExtent();

    // set selection to newly pasted item
    SetSelection(pItem);
    pItem->InvalidateItem();
  }
  CATCH(CException, e)
  {
    if (pItem != NULL)
    {
      ASSERT_VALID(pItem);
      pItem->Delete();
    }
    AfxMessageBox(IDP_FAILED_TO_CREATE);
  }
  END_CATCH
}

void CContainerView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 120 of file contrvw.cpp.

{
  // TODO: add cleanup after printing
}

void CContainerView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 97 of file contrvw.cpp.

{
  CView::OnInitialUpdate();

  // TODO: remove this code when final selection model code is written
  m_pSelection = NULL;    // initialize selection

}

void CContainerView::OnInsertObject ( ) [protected]

Definition at line 139 of file contrvw.cpp.

{
  // Invoke the standard Insert Object dialog box to obtain information
  //  for new CContainerItem object.
  COleInsertDialog dlg;
  if (dlg.DoModal() != IDOK)
    return;

  BeginWaitCursor();

  CContainerItem* pItem = NULL;
  TRY
  {
    // Create new item connected to this document.
    CContainerDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);
    pItem = new CContainerItem(pDoc);
    ASSERT_VALID(pItem);

    // Initialize the item from the dialog data.
    if (!dlg.CreateItem(pItem))
      AfxThrowMemoryException();  // any exception will do
    ASSERT_VALID(pItem);
    pItem->UpdateLink();
    pItem->UpdateFromServerExtent();

    // If item created from class list (not from file) then launch
    //  the server to edit the item.
    if (dlg.GetSelectionType() == COleInsertDialog::createNewItem)
      pItem->DoVerb(OLEIVERB_SHOW, this);

    ASSERT_VALID(pItem);

    SetSelection(pItem);
    pItem->InvalidateItem();
  }
  CATCH(CException, e)
  {
    if (pItem != NULL)
    {
      ASSERT_VALID(pItem);
      pItem->Delete();
    }
    AfxMessageBox(IDP_FAILED_TO_CREATE);
  }
  END_CATCH

  EndWaitCursor();
}

void CContainerView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 331 of file contrvw.cpp.

{
  OnLButtonDown(nFlags, point);

  if (m_pSelection != NULL)
  {
    m_pSelection->DoVerb(GetKeyState(VK_CONTROL) < 0 ?
      OLEIVERB_OPEN : OLEIVERB_PRIMARY, this);
  }

  CView::OnLButtonDblClk(nFlags, point);
}

void CContainerView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 308 of file contrvw.cpp.

{
  CContainerItem* pItemHit = HitTestItems(point);
  SetSelection(pItemHit);

  if (pItemHit != NULL)
  {
    CRectTracker tracker;
    SetupTracker(pItemHit, &tracker);

    UpdateWindow();
    if (tracker.Track(this, point))
    {
      pItemHit->InvalidateItem();
      pItemHit->m_rect = tracker.m_rect;
      pItemHit->InvalidateItem();
      GetDocument()->SetModifiedFlag();
    }
  }

  CView::OnLButtonDown(nFlags, point);
}

BOOL CContainerView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 109 of file contrvw.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CContainerView::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 344 of file contrvw.cpp.

{
  if (pWnd == this && m_pSelection != NULL)
  {
    // give the tracker for the selection a chance
    CRectTracker tracker;
    SetupTracker(m_pSelection, &tracker);
    if (tracker.SetCursor(this, nHitTest))
      return TRUE;
  }

  return CView::OnSetCursor(pWnd, nHitTest, message);
}

void CContainerView::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 205 of file contrvw.cpp.

{
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL &&
    pActiveItem->GetItemState() == COleClientItem::activeUIState)
  {
    // need to set focus to this item if it is in the same view
    CWnd* pWnd = pActiveItem->GetInPlaceWindow();
    if (pWnd != NULL)
    {
      pWnd->SetFocus();   // don't call the base class
      return;
    }
  }

  CView::OnSetFocus(pOldWnd);
}

void CContainerView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 223 of file contrvw.cpp.

{
  CView::OnSize(nType, cx, cy);
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL)
    pActiveItem->SetItemRects();
}

void CContainerView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 419 of file contrvw.cpp.

{
  switch (lHint)
  {
  case HINT_UPDATE_WINDOW:    // invalidate entire window
    Invalidate();
    break;
  case HINT_UPDATE_ITEM:      // invalidate single item
    {
      CRectTracker tracker;
      SetupTracker((CContainerItem*)pHint, &tracker);
      CRect rect;
      tracker.GetTrueRect(rect);
      InvalidateRect(rect);
    }
    break;
  }
}

void CContainerView::OnUpdateEditClear ( CCmdUI * pCmdUI ) [protected]

Definition at line 368 of file contrvw.cpp.

{
  pCmdUI->Enable(m_pSelection != NULL);

}

void CContainerView::OnUpdateEditCopy ( CCmdUI * pCmdUI ) [protected]

Definition at line 379 of file contrvw.cpp.

{
  pCmdUI->Enable(m_pSelection != NULL);
}

BOOL CContainerView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 66 of file contrvw.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

void CContainerView::SetSelection ( CContainerItem * pItem )

Definition at line 244 of file contrvw.cpp.

{
  // close in-place active item
  if (pItem == NULL || m_pSelection != pItem)
  {
    COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
    if (pActiveItem != NULL && pActiveItem != pItem)
      pActiveItem->Close();
  }
  // update view to new selection
  if (m_pSelection != pItem)
  {
    if (m_pSelection != NULL)
      OnUpdate(NULL, HINT_UPDATE_ITEM, m_pSelection);

    m_pSelection = pItem;
    if (m_pSelection != NULL)
      OnUpdate(NULL, HINT_UPDATE_ITEM, m_pSelection);
  }
}

void CContainerView::SetupTracker | ( | CContainerItem * | pItem,
 |  | CRectTracker * | pTracker
 | ) |  |

Definition at line 265 of file contrvw.cpp.

{
  pTracker->m_rect = pItem->m_rect;

  if (pItem == m_pSelection)
    pTracker->m_nStyle |= CRectTracker::resizeInside;

  if (pItem->GetType() == OT_LINK)
    pTracker->m_nStyle |= CRectTracker::dottedLine;
  else
    pTracker->m_nStyle |= CRectTracker::solidLine;

  if (pItem->GetItemState() == COleClientItem::openState ||
    pItem->GetItemState() == COleClientItem::activeUIState)
  {
    pTracker->m_nStyle |= CRectTracker::hatchInside;
  }
}

Member Data Documentation

CContainerItem* CContainerView::m_pSelection

Definition at line 30 of file contrvw.h.

The documentation for this class was generated from the following files:
  • controls/contain/contrvw.h
  • controls/contain/contrvw.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCounterThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCounterThread Class Reference

#include "threads.h"

Inherits CExampleThread.

List of all members.

Public Member Functions

virtual | ~CCounterThread ()
virtual BOOL | InitInstance ()
virtual int | Run ()

Protected Member Functions

CCounterThread ()

Detailed Description

Definition at line 34 of file threads.h.

Constructor & Destructor Documentation

CCounterThread::CCounterThread ( ) [protected]

Definition at line 41 of file threads.cpp.

{
}

CCounterThread::~CCounterThread ( ) [virtual]

Definition at line 45 of file threads.cpp.

{
}

Member Function Documentation

BOOL CCounterThread::InitInstance ( ) [virtual]

Definition at line 49 of file threads.cpp.

{
  // TODO:  perform and per-thread initialization here
  return TRUE;
}

int CCounterThread::Run ( ) [virtual]

Definition at line 55 of file threads.cpp.

{
  BOOL fSyncChecked;
  unsigned int nNumber;

  if (m_pOwner == NULL)
    return -1;

  CSingleLock sLock(&(m_pOwner->m_mutex));

  while (!m_bDone)
  {
    // Get the status of the Synchronize
    // check box and save it.

    fSyncChecked = m_pOwner->IsDlgButtonChecked(IDC_SYNCHRONIZE);

    // If the user wants us synchronized, do it!
    if (fSyncChecked)
      sLock.Lock();

    VERIFY( _stscanf_s((LPCTSTR) m_pOwner->m_strNumber, _T("%d"), &nNumber) == 1 );
    nNumber++;

    m_pOwner->m_strNumber.SetAt(0,L'\0');
    int nCurrentDigitPos=0;
    while (nNumber != 0)
    {
      m_pOwner->m_strNumber.ReleaseBufferSetLength(nCurrentDigitPos+1);
      m_pOwner->m_strNumber.SetAt(nCurrentDigitPos,(TCHAR) ('0' + nNumber%10));

      // A call to Sleep() here tells the system that we want
      // to relinquis the remainder of our time slice to
      // another thread.  this call is needed for
      // single-CPU systems so that the results of the
      // synchronization or lack thereof are obvious.
      // Normally, your programs would NOT call Sleep() here.

      Sleep(0);

      // get ready to get the next digit.
      nNumber /= 10;
      ++nCurrentDigitPos;
    }

    // Characters were generated in reverse order,
    // reverse the string
    m_pOwner->m_strNumber.MakeReverse();

    if (fSyncChecked)
    {
    // If the user wants synchronization, do it.
      sLock.Unlock();
    }

    // If the user wants to display something
    // after each iteration, do it.

    if (m_pOwner->IsDlgButtonChecked(IDC_SHOWCNTRTHRD))
      m_pOwner->AddToListBox(_T("Cntr: Increment"));
  }

  m_pOwner->PostMessage(WM_CLOSE, 0, 0L);
  return 0;
}

The documentation for this class was generated from the following files:
  • advanced/mutexes/threads.h
  • advanced/mutexes/threads.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCSDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCSDialog Class Reference

#include "chicdial.h"

Inherited by CButtonDialog, CButtonDialog, CDateDialog, CDateDialog, CFileNewDialog, CFileNewDialog, CFormatParaDlg, CFormatParaDlg, CFormatTabDlg, CFormatTabDlg, CPageSetupDlg, and CPageSetupDlg.

List of all members.

Public Member Functions

CCSDialog ()
CCSDialog (UINT nIDTemplate, CWnd *pParentWnd=NULL)
CCSDialog (LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL)
CCSDialog ()
CCSDialog (UINT nIDTemplate, CWnd *pParentWnd=NULL)
CCSDialog (LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL)

Protected Member Functions

virtual const DWORD * | GetHelpIDs ()=0
virtual const DWORD * | GetHelpIDs ()=0
afx_msg LRESULT | OnHelp (WPARAM wParam, LPARAM lParam)
afx_msg LONG_PTR | OnHelp (UINT_PTR wParam, LONG_PTR lParam)
afx_msg LONG_PTR | OnHelpContextMenu (UINT_PTR wParam, LONG_PTR lParam)
afx_msg LRESULT | OnHelpContextMenu (WPARAM wParam, LPARAM lParam)
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 15 of file chicdial.h.

Constructor & Destructor Documentation

CCSDialog::CCSDialog ( )

Definition at line 32 of file chicdial.cpp.

                     : CDialog()
{
}

CCSDialog::CCSDialog | ( | LPCTSTR | lpszTemplateName,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |

Definition at line 27 of file chicdial.cpp.

  : CDialog(lpszTemplateName, pParentWnd)
{
}

CCSDialog::CCSDialog | ( | UINT | nIDTemplate,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |

Definition at line 22 of file chicdial.cpp.

  : CDialog(nIDTemplate, pParentWnd)
{
}

CCSDialog::CCSDialog ( )
CCSDialog::CCSDialog | ( | LPCTSTR | lpszTemplateName,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |
CCSDialog::CCSDialog | ( | UINT | nIDTemplate,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |

Member Function Documentation

virtual const DWORD* CCSDialog::GetHelpIDs ( ) [protected, pure virtual]

Implemented in CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, CFormatTabDlg, CPageSetupDlg, CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, CFormatTabDlg, and CPageSetupDlg.

virtual const DWORD* CCSDialog::GetHelpIDs ( ) [protected, pure virtual]

Implemented in CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, CFormatTabDlg, CPageSetupDlg, CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, CFormatTabDlg, and CPageSetupDlg.

LRESULT CCSDialog::OnHelp | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 49 of file chicdial.cpp.

{
  ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
    HELP_WM_HELP, (ULONG_PTR)(LPVOID)GetHelpIDs());
  return 0;
}

LONG_PTR CCSDialog::OnHelp | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 47 of file chicdial.cpp.

{
  ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
    HELP_WM_HELP, (ULONG_PTR)GetHelpIDs());
  return 0;
}

LONG_PTR CCSDialog::OnHelpContextMenu | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 54 of file chicdial.cpp.

{
  ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
    HELP_CONTEXTMENU, (ULONG_PTR)GetHelpIDs());
  return 0;
}

LRESULT CCSDialog::OnHelpContextMenu | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 56 of file chicdial.cpp.

{
  ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
    HELP_CONTEXTMENU, (ULONG_PTR)(LPVOID)GetHelpIDs());
  return 0;
}

virtual BOOL CCSDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented in CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, CFormatTabDlg, CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, and CFormatTabDlg.

BOOL CCSDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented in CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, CFormatTabDlg, CButtonDialog, CDateDialog, CFileNewDialog, CFormatParaDlg, and CFormatTabDlg.

Definition at line 61 of file chicdial.cpp.

{
  CDialog::OnInitDialog();
  ModifyStyleEx(0, WS_EX_CONTEXTHELP);
  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

The documentation for this class was generated from the following files:
  • ole/wordpad/chicdial.h
  • vc2008fp/WordPad/chicdial.h
  • ole/wordpad/chicdial.cpp
  • vc2008fp/WordPad/chicdial.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCSPropertyPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCSPropertyPage Class Reference

#include "chicdial.h"

Inherited by CDocOptPage, CDocOptPage, CUnitsPage, and CUnitsPage.

List of all members.

Public Member Functions

CCSPropertyPage (UINT nIDTemplate, UINT nIDCaption=0)
CCSPropertyPage (LPCTSTR lpszTemplateName, UINT nIDCaption=0)
CCSPropertyPage (UINT nIDTemplate, UINT nIDCaption=0)
CCSPropertyPage (LPCTSTR lpszTemplateName, UINT nIDCaption=0)

Protected Member Functions

virtual const DWORD * | GetHelpIDs ()=0
virtual const DWORD * | GetHelpIDs ()=0
afx_msg LRESULT | OnHelp (WPARAM wParam, LPARAM lParam)
afx_msg LONG_PTR | OnHelp (UINT_PTR wParam, LONG_PTR lParam)
afx_msg LONG_PTR | OnHelpContextMenu (UINT_PTR wParam, LONG_PTR lParam)
afx_msg LRESULT | OnHelpContextMenu (WPARAM wParam, LPARAM lParam)

Detailed Description

Definition at line 36 of file chicdial.h.

Constructor & Destructor Documentation

CCSPropertyPage::CCSPropertyPage | ( | UINT | nIDTemplate,
 |  | UINT | nIDCaption = 0
 | ) |  |

Definition at line 72 of file chicdial.cpp.

  : CPropertyPage(nIDTemplate, nIDCaption)
{
}

CCSPropertyPage::CCSPropertyPage | ( | LPCTSTR | lpszTemplateName,
 |  | UINT | nIDCaption = 0
 | ) |  |

Definition at line 77 of file chicdial.cpp.

                   : CPropertyPage(lpszTemplateName, nIDCaption)
{
}

CCSPropertyPage::CCSPropertyPage | ( | UINT | nIDTemplate,
 |  | UINT | nIDCaption = 0
 | ) |  |
CCSPropertyPage::CCSPropertyPage | ( | LPCTSTR | lpszTemplateName,
 |  | UINT | nIDCaption = 0
 | ) |  |

Member Function Documentation

virtual const DWORD* CCSPropertyPage::GetHelpIDs ( ) [protected, pure virtual]

Implemented in CDocOptPage, CUnitsPage, CDocOptPage, and CUnitsPage.

virtual const DWORD* CCSPropertyPage::GetHelpIDs ( ) [protected, pure virtual]

Implemented in CDocOptPage, CUnitsPage, CDocOptPage, and CUnitsPage.

LRESULT CCSPropertyPage::OnHelp | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 95 of file chicdial.cpp.

{
  ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
    HELP_WM_HELP, (ULONG_PTR)(LPVOID)GetHelpIDs());
  return 0;
}

LONG_PTR CCSPropertyPage::OnHelp | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 93 of file chicdial.cpp.

{
  ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
    HELP_WM_HELP, (ULONG_PTR)GetHelpIDs());
  return 0;
}

LONG_PTR CCSPropertyPage::OnHelpContextMenu | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 100 of file chicdial.cpp.

{
  ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
    HELP_CONTEXTMENU, (ULONG_PTR)GetHelpIDs());
  return 0;
}

LRESULT CCSPropertyPage::OnHelpContextMenu | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 102 of file chicdial.cpp.

{
  ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
    HELP_CONTEXTMENU, (ULONG_PTR)(LPVOID)GetHelpIDs());
  return 0;
}

The documentation for this class was generated from the following files:
  • ole/wordpad/chicdial.h
  • vc2008fp/WordPad/chicdial.h
  • ole/wordpad/chicdial.cpp
  • vc2008fp/WordPad/chicdial.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCSPropertySheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCSPropertySheet Class Reference

#include "chicdial.h"

Inherited by COptionSheet, and COptionSheet.

List of all members.

Public Member Functions

CCSPropertySheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CCSPropertySheet (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CCSPropertySheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CCSPropertySheet (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)

Protected Member Functions

afx_msg LONG_PTR | OnHelp (UINT_PTR wParam, LONG_PTR lParam)
afx_msg LRESULT | OnHelp (WPARAM wParam, LPARAM lParam)
afx_msg LRESULT | OnHelpContextMenu (WPARAM wParam, LPARAM lParam)
afx_msg LONG_PTR | OnHelpContextMenu (UINT_PTR wParam, LONG_PTR lParam)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Detailed Description

Definition at line 55 of file chicdial.h.

Constructor & Destructor Documentation

CCSPropertySheet::CCSPropertySheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 117 of file chicdial.cpp.

                    : CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}

CCSPropertySheet::CCSPropertySheet | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 122 of file chicdial.cpp.

                    : CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
}

CCSPropertySheet::CCSPropertySheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |
CCSPropertySheet::CCSPropertySheet | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Member Function Documentation

LONG_PTR CCSPropertySheet::OnHelp | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 130 of file chicdial.cpp.

{
  GetActivePage()->SendMessage(WM_HELP, wParam, lParam);
  return 0;
}

LRESULT CCSPropertySheet::OnHelp | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 132 of file chicdial.cpp.

{
  GetActivePage()->SendMessage(WM_HELP, wParam, lParam);
  return 0;
}

LRESULT CCSPropertySheet::OnHelpContextMenu | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 138 of file chicdial.cpp.

{
  GetActivePage()->SendMessage(WM_CONTEXTMENU, wParam, lParam);
  return 0;
}

LONG_PTR CCSPropertySheet::OnHelpContextMenu | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 136 of file chicdial.cpp.

{
  GetActivePage()->SendMessage(WM_CONTEXTMENU, wParam, lParam);
  return 0;
}

virtual BOOL CCSPropertySheet::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
BOOL CCSPropertySheet::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 142 of file chicdial.cpp.

{
  cs.dwExStyle |= WS_EX_CONTEXTHELP;
  return CPropertySheet::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • ole/wordpad/chicdial.h
  • vc2008fp/WordPad/chicdial.h
  • ole/wordpad/chicdial.cpp
  • vc2008fp/WordPad/chicdial.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCtrlbarsApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCtrlbarsApp Class Reference

#include "ctrlbars.h"

List of all members.

Public Member Functions

CCtrlbarsApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual BOOL | OnIdle (LONG lCount)

Detailed Description

Definition at line 25 of file ctrlbars.h.

Constructor & Destructor Documentation

CCtrlbarsApp::CCtrlbarsApp ( )

Definition at line 35 of file ctrlbars.cpp.

{
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CCtrlbarsApp::InitInstance ( ) [virtual]

Definition at line 48 of file ctrlbars.cpp.

{
  // create a new SDI main frame window
  CFrameWnd* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    // free the memory
    delete pMainFrame;
    return FALSE;
  }
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();
  m_pMainWnd = pMainFrame;

  pMainFrame->SendMessage(WM_COMMAND, IDM_VIEWPALETTE, (LPARAM)0);
  return TRUE;
}

void CCtrlbarsApp::OnAppAbout ( )

Definition at line 100 of file ctrlbars.cpp.

{
  CDialog(IDD_ABOUTBOX).DoModal();
}

BOOL CCtrlbarsApp::OnIdle ( LONG lCount ) [virtual]

Definition at line 71 of file ctrlbars.cpp.

{
  if (lCount == 0)
  {
    ENSURE(m_pMainWnd != NULL);

    // look for any top-level windows owned by us
    // we use 'HWND's to avoid generation of too many temporary CWnds
    for (HWND hWnd = ::GetWindow(m_pMainWnd->m_hWnd, GW_HWNDFIRST);
        hWnd != NULL; hWnd = ::GetNextWindow(hWnd, GW_HWNDNEXT))
    {
      if (::GetParent(hWnd) == m_pMainWnd->m_hWnd)
      {
        // if owned window is active, move the activation to the
        //   application window
        if (GetActiveWindow() == hWnd && (::GetCapture() == NULL))
          m_pMainWnd->SetActiveWindow();

        // also update the buttons for the top-level window
        SendMessage(hWnd, WM_IDLEUPDATECMDUI, (WPARAM)TRUE, 0L);
      }
    }
  }
  return CWinApp::OnIdle(lCount);
}

The documentation for this class was generated from the following files:
  • general/ctrlbars/ctrlbars.h
  • general/ctrlbars/ctrlbars.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCubeApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCubeApp Class Reference

#include "cube.h"

List of all members.

Public Member Functions

CCubeApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 23 of file cube.h.

Constructor & Destructor Documentation

CCubeApp::CCubeApp ( )

Definition at line 41 of file cube.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CCubeApp::InitInstance ( ) [virtual]

Definition at line 55 of file cube.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // 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(CCubeDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CCubeView));
  AddDocTemplate(pDocTemplate);

  // create a new (empty) document
  OnFileNew();

  if (m_lpCmdLine[0] != '\0')
  {
    // TODO: add command line processing here
  }

  return TRUE;
}

void CCubeApp::OnAppAbout ( )

Definition at line 128 of file cube.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • advanced/cube/cube.h
  • advanced/cube/cube.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCubeDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCubeDoc Class Reference

#include "cubedoc.h"

List of all members.

Public Member Functions

virtual | ~CCubeDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CCubeDoc ()

Detailed Description

Definition at line 12 of file cubedoc.h.

Constructor & Destructor Documentation

CCubeDoc::CCubeDoc ( ) [protected]

Definition at line 37 of file cubedoc.cpp.

{
  // TODO: add one-time construction code here

}

CCubeDoc::~CCubeDoc ( ) [virtual]

Definition at line 43 of file cubedoc.cpp.

{
}

Member Function Documentation

BOOL CCubeDoc::OnNewDocument ( ) [virtual]

Definition at line 47 of file cubedoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CCubeDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 61 of file cubedoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • advanced/cube/cubedoc.h
  • advanced/cube/cubedoc.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCubeView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CCubeView Class Reference

#include "cubeview.h"

List of all members.

Public Member Functions

virtual | ~CCubeView ()
BOOL | bSetupPixelFormat (void)
unsigned char | ComponentFromIndex (int i, UINT nbits, UINT shift)
void | CreateRGBPalette (void)
void | DrawScene (void)
CCubeDoc * GetDocument ()
void | Init ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

CPalette | m_cPalette
float | m_fRadius
CRect | m_oldRect
CClientDC * | m_pDC
CPalette * | m_pOldPalette

Protected Member Functions

CCubeView ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFilePlay ()
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnUpdateFilePlay (CCmdUI *pCmdUI)

Protected Attributes

BOOL | m_play

Detailed Description

Definition at line 12 of file cubeview.h.

Constructor & Destructor Documentation

CCubeView::CCubeView ( ) [protected]

Definition at line 92 of file cubeview.cpp.

{
  m_pDC = NULL;
  m_pOldPalette = NULL;
  m_play = FALSE;
}

CCubeView::~CCubeView ( ) [virtual]

Definition at line 99 of file cubeview.cpp.

{
}

Member Function Documentation

BOOL CCubeView::bSetupPixelFormat ( void )

Definition at line 270 of file cubeview.cpp.

{
  static PIXELFORMATDESCRIPTOR pfd =
  {
    sizeof(PIXELFORMATDESCRIPTOR),  // size of this pfd
    1,                              // version number
    PFD_DRAW_TO_WINDOW |            // support window
      PFD_SUPPORT_OPENGL |          // support OpenGL
      PFD_DOUBLEBUFFER,             // double buffered
    PFD_TYPE_RGBA,                  // RGBA type
    24,                             // 24-bit color depth
    0, 0, 0, 0, 0, 0,               // color bits ignored
    0,                              // no alpha buffer
    0,                              // shift bit ignored
    0,                              // no accumulation buffer
    0, 0, 0, 0,                     // accum bits ignored
    32,                             // 32-bit z-buffer
    0,                              // no stencil buffer
    0,                              // no auxiliary buffer
    PFD_MAIN_PLANE,                 // main layer
    0,                              // reserved
    0, 0, 0                         // layer masks ignored
  };
  int pixelformat;

  if ( (pixelformat = ChoosePixelFormat(m_pDC->GetSafeHdc(), &pfd)) == 0 )
  {
    MessageBox("ChoosePixelFormat failed");
    return FALSE;
  }

  if (SetPixelFormat(m_pDC->GetSafeHdc(), pixelformat, &pfd) == FALSE)
  {
    MessageBox("SetPixelFormat failed");
    return FALSE;
  }

  return TRUE;
}

unsigned char CCubeView::ComponentFromIndex | ( | int | i,
 |  | UINT | nbits,
 |  | UINT | shift
 | ) |  |

Definition at line 310 of file cubeview.cpp.

{
  unsigned char val;

  val = (unsigned char) (i >> shift);
  switch (nbits)
  {

  case 1:
    val &= 0x1;
    return oneto8[val];
  case 2:
    val &= 0x3;
    return twoto8[val];
  case 3:
    val &= 0x7;
    return threeto8[val];

  default:
    return 0;
  }
}

void CCubeView::CreateRGBPalette ( void )

Definition at line 334 of file cubeview.cpp.

{
  PIXELFORMATDESCRIPTOR pfd;
  LOGPALETTE *pPal;
  int n, i;

  n = ::GetPixelFormat(m_pDC->GetSafeHdc());
  ::DescribePixelFormat(m_pDC->GetSafeHdc(), n, sizeof(pfd), &pfd);

  if (pfd.dwFlags & PFD_NEED_PALETTE)
  {
    n = 1 << pfd.cColorBits;
    pPal = (PLOGPALETTE) new char[sizeof(LOGPALETTE) + n * sizeof(PALETTEENTRY)];

    ASSERT(pPal != NULL);

    pPal->palVersion = 0x300;
    pPal->palNumEntries = n;
    for (i=0; i<n; i++)
    {
      pPal->palPalEntry[i].peRed =
          ComponentFromIndex(i, pfd.cRedBits, pfd.cRedShift);
      pPal->palPalEntry[i].peGreen =
          ComponentFromIndex(i, pfd.cGreenBits, pfd.cGreenShift);
      pPal->palPalEntry[i].peBlue =
          ComponentFromIndex(i, pfd.cBlueBits, pfd.cBlueShift);
      pPal->palPalEntry[i].peFlags = 0;
    }

    /* fix up the palette to include the default GDI palette */
    if ((pfd.cColorBits == 8)                           &&
      (pfd.cRedBits   == 3) && (pfd.cRedShift   == 0) &&
      (pfd.cGreenBits == 3) && (pfd.cGreenShift == 3) &&
      (pfd.cBlueBits  == 2) && (pfd.cBlueShift  == 6)
       )
    {
      for (i = 1 ; i <= 12 ; i++)
        pPal->palPalEntry[defaultOverride[i]] = defaultPalEntry[i];
    }

    m_cPalette.CreatePalette(pPal);
    delete [] pPal;

    m_pOldPalette = m_pDC->SelectPalette(&m_cPalette, FALSE);
    m_pDC->RealizePalette();
  }
}

void CCubeView::DrawScene ( void )

Definition at line 383 of file cubeview.cpp.

{
  static BOOL     bBusy = FALSE;
  static GLfloat  wAngleY = 10.0f;
  static GLfloat  wAngleX = 1.0f;
  static GLfloat  wAngleZ = 5.0f;

  if(bBusy)
    return;
  bBusy = TRUE;

  glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  glPushMatrix();

    glTranslatef(0.0f, 0.0f, -m_fRadius);
    glRotatef(wAngleX, 1.0f, 0.0f, 0.0f);
    glRotatef(wAngleY, 0.0f, 1.0f, 0.0f);
    glRotatef(wAngleZ, 0.0f, 0.0f, 1.0f);

    wAngleX += 1.0f;
    wAngleY += 10.0f;
    wAngleZ += 5.0f;

    glBegin(GL_QUAD_STRIP);
      glColor3f(1.0f, 0.0f, 1.0f);
      glVertex3f(-0.5f, 0.5f, 0.5f);

      glColor3f(1.0f, 0.0f, 0.0f);
      glVertex3f(-0.5f, -0.5f, 0.5f);

      glColor3f(1.0f, 1.0f, 1.0f);
      glVertex3f(0.5f, 0.5f, 0.5f);

      glColor3f(1.0f, 1.0f, 0.0f);
      glVertex3f(0.5f, -0.5f, 0.5f);

      glColor3f(0.0f, 1.0f, 1.0f);
      glVertex3f(0.5f, 0.5f, -0.5f);

      glColor3f(0.0f, 1.0f, 0.0f);
      glVertex3f(0.5f, -0.5f, -0.5f);

      glColor3f(0.0f, 0.0f, 1.0f);
      glVertex3f(-0.5f, 0.5f, -0.5f);

      glColor3f(0.0f, 0.0f, 0.0f);
      glVertex3f(-0.5f, -0.5f,  -0.5f);

      glColor3f(1.0f, 0.0f, 1.0f);
      glVertex3f(-0.5f, 0.5f, 0.5f);

      glColor3f(1.0f, 0.0f, 0.0f);
      glVertex3f(-0.5f, -0.5f, 0.5f);

    glEnd();

    glBegin(GL_QUADS);
      glColor3f(1.0f, 0.0f, 1.0f);
      glVertex3f(-0.5f, 0.5f, 0.5f);

      glColor3f(1.0f, 1.0f, 1.0f);
      glVertex3f(0.5f, 0.5f, 0.5f);

      glColor3f(0.0f, 1.0f, 1.0f);
      glVertex3f(0.5f, 0.5f, -0.5f);

      glColor3f(0.0f, 0.0f, 1.0f);
      glVertex3f(-0.5f, 0.5f, -0.5f);
    glEnd();

    glBegin(GL_QUADS);
      glColor3f(1.0f, 0.0f, 0.0f);
      glVertex3f(-0.5f, -0.5f, 0.5f);

      glColor3f(1.0f, 1.0f, 0.0f);
      glVertex3f(0.5f, -0.5f, 0.5f);

      glColor3f(0.0f, 1.0f, 0.0f);
      glVertex3f(0.5f, -0.5f, -0.5f);

      glColor3f(0.0f, 0.0f, 0.0f);
      glVertex3f(-0.5f, -0.5f,  -0.5f);
    glEnd();

  glPopMatrix();

  glFinish();
  SwapBuffers(wglGetCurrentDC());

  bBusy = FALSE;
}

CCubeDoc * CCubeView::GetDocument ( ) [inline]

Definition at line 70 of file cubeview.h.

   { return (CCubeDoc*)m_pDocument; }

void CCubeView::Init ( )

Definition at line 228 of file cubeview.cpp.

{
  PIXELFORMATDESCRIPTOR pfd;
  int         n;
  HGLRC       hrc;
  GLfloat     fMaxObjSize, fAspect;
  GLfloat     fNearPlane, fFarPlane;

  m_pDC = new CClientDC(this);

  ASSERT(m_pDC != NULL);

  if (!bSetupPixelFormat())
    return;

  n = ::GetPixelFormat(m_pDC->GetSafeHdc());
  ::DescribePixelFormat(m_pDC->GetSafeHdc(), n, sizeof(pfd), &pfd);

  CreateRGBPalette();

  hrc = wglCreateContext(m_pDC->GetSafeHdc());
  wglMakeCurrent(m_pDC->GetSafeHdc(), hrc);

  GetClientRect(&m_oldRect);
  glClearDepth(1.0f);
  glEnable(GL_DEPTH_TEST);

  if (m_oldRect.bottom)
    fAspect = (GLfloat)m_oldRect.right/m_oldRect.bottom;
  else    // don't divide by zero, not that we should ever run into that...
    fAspect = 1.0f;
  fNearPlane = 3.0f;
  fFarPlane = 7.0f;
  fMaxObjSize = 3.0f;
  m_fRadius = fNearPlane + fMaxObjSize / 2.0f;

  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(45.0f, fAspect, fNearPlane, fFarPlane);
  glMatrixMode(GL_MODELVIEW);
}

int CCubeView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 161 of file cubeview.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  Init(); // initialize OpenGL

  return 0;
}

void CCubeView::OnDestroy ( ) [protected]

Definition at line 171 of file cubeview.cpp.

{
  HGLRC   hrc;

  KillTimer(1);

  hrc = ::wglGetCurrentContext();

  ::wglMakeCurrent(NULL,  NULL);

  if (hrc)
    ::wglDeleteContext(hrc);

  if (m_pOldPalette)
    m_pDC->SelectPalette(m_pOldPalette, FALSE);

  if (m_pDC)
    delete m_pDC;

  CView::OnDestroy();
}

void CCubeView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 106 of file cubeview.cpp.

{
  CCubeDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  DrawScene();
}

BOOL CCubeView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 478 of file cubeview.cpp.

{
  return TRUE;
}

void CCubeView::OnFilePlay ( ) [protected]

Definition at line 137 of file cubeview.cpp.

{
  m_play = m_play ? FALSE : TRUE;
  if (m_play)
    SetTimer(1, 15, NULL);
  else
    KillTimer(1);
}

void CCubeView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 193 of file cubeview.cpp.

{
  CView::OnSize(nType, cx, cy);

  if(cy > 0)
  {
    glViewport(0, 0, cx, cy);

    if((m_oldRect.right > cx) || (m_oldRect.bottom > cy))
      RedrawWindow();

    m_oldRect.right = cx;
    m_oldRect.bottom = cy;

    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(45.0f, (GLdouble)cx/cy, 3.0f, 7.0f);
    glMatrixMode(GL_MODELVIEW);
  }
}

void CCubeView::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 214 of file cubeview.cpp.

{
  DrawScene();

  CView::OnTimer(nIDEvent);

  // Eat spurious WM_TIMER messages
  MSG msg;
  while(::PeekMessage(&msg, m_hWnd, WM_TIMER, WM_TIMER, PM_REMOVE));
}

void CCubeView::OnUpdateFilePlay ( CCmdUI * pCmdUI ) [protected]

Definition at line 146 of file cubeview.cpp.

{
  pCmdUI->SetCheck(m_play);
}

BOOL CCubeView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 151 of file cubeview.cpp.

{
  // An OpenGL window must be created with the following flags and must not
  // include CS_PARENTDC for the class style. Refer to SetPixelFormat
  // documentation in the "Comments" section for further information.
  cs.style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN;

  return CView::PreCreateWindow(cs);
}

Member Data Documentation

CPalette CCubeView::m_cPalette

Definition at line 22 of file cubeview.h.

float CCubeView::m_fRadius

Definition at line 25 of file cubeview.h.

CRect CCubeView::m_oldRect

Definition at line 24 of file cubeview.h.

CClientDC* CCubeView::m_pDC

Definition at line 26 of file cubeview.h.

BOOL CCubeView::m_play [protected]

Definition at line 53 of file cubeview.h.

CPalette* CCubeView::m_pOldPalette

Definition at line 23 of file cubeview.h.

The documentation for this class was generated from the following files:
  • advanced/cube/cubeview.h
  • advanced/cube/cubeview.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustListDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Attributes

CCustListDlg Class Reference

List of all members.

Public Types

enum | { IDD = IDD_CUSTOM_LIST }

Public Member Functions

CCustListDlg ()
DECLARE_MESSAGE_MAP ()
BOOL | OnInitDialog ()
virtual void | OnOK ()

Protected Attributes

CColorListBox m_colors

Detailed Description

Definition at line 111 of file custlist.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 117 of file custlist.cpp.

{ IDD = IDD_CUSTOM_LIST };

Constructor & Destructor Documentation

CCustListDlg::CCustListDlg ( ) [inline]

Definition at line 119 of file custlist.cpp.

    : CDialog(CCustListDlg::IDD)
    { }

Member Function Documentation

CCustListDlg::DECLARE_MESSAGE_MAP ( )
BOOL CCustListDlg::OnInitDialog ( )
void CCustListDlg::OnOK ( ) [virtual]

Definition at line 152 of file custlist.cpp.

{
  // get the final color
  int nIndex = m_colors.GetCurSel();
  if (nIndex == -1)
  {
    CString str;
    str.LoadString(IDS_PLEASE_SELECT_COLOR);
    MessageBox(str);
    m_colors.SetFocus();
    return;
  }
  DWORD color = (DWORD)m_colors.GetItemData(nIndex);

#ifdef _DEBUG
  // normally do something with it...
  TRACE1("final color RGB = 0x%06lX\n", color);
#endif

  EndDialog(IDOK);
}

Member Data Documentation

CColorListBox CCustListDlg::m_colors [protected]

Definition at line 114 of file custlist.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/custlist.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomDlgProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCustomDlgProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CCustomDlgProp (const CString &strName, const COleVariant &varValue)

Protected Member Functions

virtual BOOL | HasButton () const
virtual void | OnClickButton (CPoint point)

Detailed Description

Definition at line 188 of file CustomProperties.h.

Constructor & Destructor Documentation

CCustomDlgProp::CCustomDlgProp | ( | const CString & | strName,
 |  | const COleVariant & | varValue
 | ) |  |

Definition at line 686 of file CustomProperties.cpp.

                                                                                : CMFCPropertyGridProperty(strName, varValue)
{
}

Member Function Documentation

virtual BOOL CCustomDlgProp::HasButton ( ) const [inline, protected, virtual]

Definition at line 194 of file CustomProperties.h.

{ return TRUE; }

void CCustomDlgProp::OnClickButton ( CPoint point ) [protected, virtual]

Definition at line 690 of file CustomProperties.cpp.

{
  AfxMessageBox(_T("Show your dialog here..."));
  SetValue(_T("New value"));
}

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomEditListBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CCustomEditListBox Class Reference

#include "Page3.h"

List of all members.

Private Member Functions

virtual void OnBrowse ()

Detailed Description

Definition at line 12 of file Page3.h.

Member Function Documentation

virtual void CCustomEditListBox::OnBrowse ( ) [inline, private, virtual]

Definition at line 14 of file Page3.h.

  {
    int nSel = GetSelItem();

    MessageBox(_T("Browse item..."));

    if (nSel == GetCount()) // New item
    {
      nSel = AddItem(_T("New text"));
      SelectItem(nSel);
    }
    else
    {
      SetItemText(nSel, _T("Updated text"));
    }
  }

The documentation for this class was generated from the following file:
  • vc2008fp/NewControls/Page3.h
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomFileDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

CCustomFileDialog Class Reference

#include "CustomFileDialog.h"

List of all members.

Public Member Functions

CCustomFileDialog (BOOL bOpenFileDialog, BOOL bVistaStyle, BOOL bEventPopups, CString &strLog)
virtual | ~CCustomFileDialog ()

Protected Member Functions

virtual void | OnCancel ()
virtual void | OnFileNameChange ()
virtual BOOL | OnFileNameOK ()
virtual void | OnFolderChange ()
virtual BOOL | OnInitDialog ()
virtual void | OnInitDone ()
virtual void | OnLBSelChangedNotify (UINT nIDBox, UINT iCurSel, UINT nCode)
virtual void | OnOK ()
virtual void | OnSetFont (CFont *pFont)
virtual UINT | OnShareViolation (LPCTSTR lpszPathName)
virtual void | OnTypeChange ()

Private Member Functions

void | LogEvent (LPCWSTR eventMsg)

Private Attributes

BOOL | m_bEventPopups
CString & | m_strLog

Detailed Description

Definition at line 6 of file CustomFileDialog.h.

Constructor & Destructor Documentation

CCustomFileDialog::CCustomFileDialog | ( | BOOL | bOpenFileDialog,
 |  | BOOL | bVistaStyle,
 |  | BOOL | bEventPopups,
 |  | CString & | strLog
 | ) |  |

Definition at line 13 of file CustomFileDialog.cpp.

                                    :
  CFileDialog(bOpenFileDialog, NULL, NULL,
        OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, NULL, NULL, 0,
        bVistaStyle),
  m_bEventPopups(bEventPopups),
  m_strLog(strLog)
{
}

CCustomFileDialog::~CCustomFileDialog ( ) [virtual]

Definition at line 25 of file CustomFileDialog.cpp.

{ }

Member Function Documentation

void CCustomFileDialog::LogEvent ( LPCWSTR eventMsg ) [private]

Definition at line 27 of file CustomFileDialog.cpp.

{
  if (m_bEventPopups)
  {
    ::MessageBox(this->m_hWnd, eventMsg, _T("Event Triggered"), 0);
  }
  m_strLog += _T("Event: ");
  m_strLog += eventMsg;
  m_strLog += _T("\r\n");
}

void CCustomFileDialog::OnCancel ( ) [protected, virtual]

Definition at line 95 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnCancel"));
  CFileDialog::OnCancel();
}

void CCustomFileDialog::OnFileNameChange ( ) [protected, virtual]

Definition at line 41 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnFileNameChange"));
  CFileDialog::OnFileNameChange();
}

BOOL CCustomFileDialog::OnFileNameOK ( ) [protected, virtual]

Definition at line 47 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnFileNameOK"));
  return CFileDialog::OnFileNameOK();
}

void CCustomFileDialog::OnFolderChange ( ) [protected, virtual]

Definition at line 53 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnFolderChange"));
  CFileDialog::OnFolderChange();
}

BOOL CCustomFileDialog::OnInitDialog ( ) [protected, virtual]

Definition at line 84 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnInitDialog"));
  return CFileDialog::OnInitDialog();
}

void CCustomFileDialog::OnInitDone ( ) [protected, virtual]

Definition at line 59 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnInitDone"));
  CFileDialog::OnInitDone();
}

void CCustomFileDialog::OnLBSelChangedNotify | ( | UINT | nIDBox,
 |  | UINT | iCurSel,
 |  | UINT | nCode |
 | ) |  |  | [protected, virtual]

Definition at line 65 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnLBSelChangedNotify"));
  CFileDialog::OnLBSelChangedNotify(nIDBox, iCurSel, nCode);
}

void CCustomFileDialog::OnOK ( ) [protected, virtual]

Definition at line 89 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnOK"));
  CFileDialog::OnOK();
}

void CCustomFileDialog::OnSetFont ( CFont * pFont ) [protected, virtual]

Definition at line 101 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnSetFont"));
  CFileDialog::OnSetFont(pFont);
}

UINT CCustomFileDialog::OnShareViolation ( LPCTSTR lpszPathName ) [protected, virtual]

Definition at line 72 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnShareViolation"));
  return CFileDialog::OnShareViolation(lpszPathName);
}

void CCustomFileDialog::OnTypeChange ( ) [protected, virtual]

Definition at line 78 of file CustomFileDialog.cpp.

{
  LogEvent(_T("OnTypeChange"));
  CFileDialog::OnTypeChange();
}

Member Data Documentation

BOOL CCustomFileDialog::m_bEventPopups [private]

Definition at line 21 of file CustomFileDialog.h.

CString& CCustomFileDialog::m_strLog [private]

Definition at line 22 of file CustomFileDialog.h.

The documentation for this class was generated from the following files:
  • general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.h
  • general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomList Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CCustomList Class Reference

#include "ObjView.h"

List of all members.

Public Member Functions

CCustomList ()
CCustomList (CObjListView *pParent)
virtual | ~CCustomList ()
void | DrawItem (LPDRAWITEMSTRUCT ldis)
void | MeasureItem (LPMEASUREITEMSTRUCT lpm)

Public Attributes

CObjListView * m_pParent

Protected Member Functions

afx_msg void | OnSelchange ()

Detailed Description

Definition at line 37 of file ObjView.h.

Constructor & Destructor Documentation

CCustomList::CCustomList ( )

Definition at line 216 of file ObjView.cpp.

{
}

CCustomList::CCustomList ( CObjListView * pParent ) [inline]

Definition at line 42 of file ObjView.h.

:m_pParent(pParent){}

CCustomList::~CCustomList ( ) [virtual]

Definition at line 220 of file ObjView.cpp.

{
}

Member Function Documentation

void CCustomList::DrawItem ( LPDRAWITEMSTRUCT ldis )

Definition at line 288 of file ObjView.cpp.

{
  ENSURE(ldis != NULL);

  // drawing code for each item. We fill the entire rectangle
  // depending on whether or not we are drawing a selected item then
  // we draw the icon and the title held in the CItemIcons struct.
  COLORREF oldTextColor=0;
  COLORREF oldBkColor=0;
  CRect rc(ldis->rcItem);
  int cxIcon = GetSystemMetrics(SM_CXICON);
  int cyIcon = GetSystemMetrics(SM_CYICON);

  CDC dc;
  dc.Attach(ldis->hDC);

  // we stored a pointer to our CItemIcons struct in item data

  CItemIcons *pItem = (CItemIcons*) GetItemData(ldis->itemID);
  CFont *pOldFont = dc.SelectObject(&m_pParent->m_IconFont);
  CRect rcText;

  switch(ldis->itemAction)
  {
    case ODA_SELECT:
    case ODA_DRAWENTIRE:
      ASSERT(pItem->m_hIcon != NULL);
      // draw the background with system-wide color preference
      if (ldis->itemState & ODS_SELECTED)
      {
        dc.FillSolidRect(rc, ::GetSysColor(COLOR_HIGHLIGHT));
        oldTextColor = dc.SetTextColor(::GetSysColor(COLOR_WINDOW) );
        oldBkColor = dc.SetBkColor(::GetSysColor(COLOR_HIGHLIGHT) );
      }
      else
        dc.FillSolidRect(rc, ::GetSysColor(COLOR_WINDOW));

      // Draw the icon
      dc.DrawIcon((rc.Width() / 2) - (cxIcon / 2), rc.top + 5,
        pItem->m_hIcon);

      // calculate a rect to place the text centered below
      // the icon then draw the text
      rcText.SetRect(rc.left, rc.top + cyIcon + 4, rc.right, rc.bottom);
      dc.DrawText(pItem->m_Name, rcText, DT_CENTER | DT_TOP);
      if (ldis->itemState & ODS_SELECTED)
      {
        //we changed the text color in this case
        //so (being good GDI programmers) now we must change it back.
        dc.SetTextColor(oldTextColor);
        dc.SetBkColor(oldBkColor);
      }

      break;

    case ODA_FOCUS:
      break;
  }

  // restore the DC
  dc.SelectObject(pOldFont);
  dc.Detach();
}

void CCustomList::MeasureItem ( LPMEASUREITEMSTRUCT lpm )

Definition at line 282 of file ObjView.cpp.

{
  //specify how high each listbox item will be.
  lpm->itemHeight = GetSystemMetrics(SM_CYICONSPACING);
}

void CCustomList::OnSelchange ( ) [protected]

Definition at line 234 of file ObjView.cpp.

{
  // This function will be called when someone clicks on an item in
  // the listbox. Each item's item data holds a pointer to a CItemIcons
  // structure, which holds pointers to the COleDocObjectItem for the embedded
  // item, pointers to the item's icon's metafile struct and a CString that
  // holds the name of the item.  When someone picks a new item from the list,
  // we should get the item data to get at the CItemIcon struct, check to see
  // if the item clicked on is the same item that is currently activated,
  // and, if it isn't, deactivate the currently activated item and
  // activate the newly selected item.

  // Get a pointer to the view and document that is holding our objects
  CMainFrame *pMainFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
  ENSURE(pMainFrame != NULL);

  COleDocument *pDocument = (COleDocument*) pMainFrame->GetActiveDocument();
  ENSURE(pDocument != NULL);

  CView *pObjView = (CView*) pMainFrame->GetDocView();

  // get the item data
  int nItem = GetCurSel();
  CItemIcons* pdata = (CItemIcons*) GetItemData(nItem);
  if (DWORD_PTR(pdata) == LB_ERR)
    return;

  COleClientItem *pActiveItem = pDocument->GetInPlaceActiveItem(pObjView);

  // check to see if we're already active
  if (pActiveItem == pdata->m_pObject)
  {
    pActiveItem->GetInPlaceWindow()->SetFocus();
    pMainFrame->GetDocView()->m_pSelection = (CMFCBindCntrItem*) pActiveItem;
    return; // already active, no work to do
  }
  else if (pActiveItem != NULL)
    pActiveItem->Deactivate(); // deactivate the already active item

  // activate the newly selected item
  pActiveItem = pdata->m_pObject;
  pActiveItem->Activate(OLEIVERB_SHOW, pObjView);
  CWnd *pWndEdit = pActiveItem->GetInPlaceWindow();
  if (pWndEdit != NULL)
    pWndEdit->SetFocus();
  pMainFrame->GetDocView()->m_pSelection = (CMFCBindCntrItem*) pActiveItem;
}

Member Data Documentation

CObjListView* CCustomList::m_pParent

Definition at line 45 of file ObjView.h.

The documentation for this class was generated from the following files:
  • ole/MFCBind/ObjView.h
  • ole/MFCBind/ObjView.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomPagesApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CCustomPagesApp Class Reference

#include "CustomPages.h"

List of all members.

Public Member Functions

CCustomPagesApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file CustomPages.h.

Constructor & Destructor Documentation

CCustomPagesApp::CCustomPagesApp ( )

Definition at line 39 of file CustomPages.cpp.

                                 : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CCustomPagesApp::ExitInstance ( ) [virtual]

Definition at line 114 of file CustomPages.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CCustomPagesApp::InitInstance ( ) [virtual]

Definition at line 53 of file CustomPages.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(CCustomPagesDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CCustomPagesView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  LoadCustomState ();

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CCustomPagesApp::OnAppAbout ( )

Definition at line 175 of file CustomPages.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CCustomPagesApp::PreLoadState ( ) [virtual]

Definition at line 119 of file CustomPages.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/CustomPages/CustomPages.h
  • vc2008fp/CustomPages/CustomPages.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomPagesDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCustomPagesDoc Class Reference

#include "CustomPagesDoc.h"

List of all members.

Public Member Functions

virtual | ~CCustomPagesDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CCustomPagesDoc ()

Detailed Description

Definition at line 13 of file CustomPagesDoc.h.

Constructor & Destructor Documentation

CCustomPagesDoc::CCustomPagesDoc ( ) [protected]

Definition at line 33 of file CustomPagesDoc.cpp.

{
  // TODO: add one-time construction code here

}

CCustomPagesDoc::~CCustomPagesDoc ( ) [virtual]

Definition at line 39 of file CustomPagesDoc.cpp.

{
}

Member Function Documentation

BOOL CCustomPagesDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file CustomPagesDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CCustomPagesDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file CustomPagesDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/CustomPages/CustomPagesDoc.h
  • vc2008fp/CustomPages/CustomPagesDoc.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomPagesView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CCustomPagesView Class Reference

#include "CustomPagesView.h"

List of all members.

Public Member Functions

virtual | ~CCustomPagesView ()
CCustomPagesDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CCustomPagesView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file CustomPagesView.h.

Constructor & Destructor Documentation

CCustomPagesView::CCustomPagesView ( ) [protected]

Definition at line 49 of file CustomPagesView.cpp.

{
  // TODO: add construction code here

}

CCustomPagesView::~CCustomPagesView ( ) [virtual]

Definition at line 55 of file CustomPagesView.cpp.

{
}

Member Function Documentation

CCustomPagesDoc * CCustomPagesView::GetDocument ( ) [inline]

Definition at line 51 of file CustomPagesView.h.

   { return (CCustomPagesDoc*)m_pDocument; }

void CCustomPagesView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 126 of file CustomPagesView.cpp.

{
  // TODO: add extra initialization before printing
}

void CCustomPagesView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 160 of file CustomPagesView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CCustomPagesView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 70 of file CustomPagesView.cpp.

{
//  CCustomPagesDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);

}

void CCustomPagesView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 131 of file CustomPagesView.cpp.

{
  // TODO: add cleanup after printing
}

void CCustomPagesView::OnFilePrintPreview ( ) [protected]

Definition at line 115 of file CustomPagesView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CCustomPagesView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 120 of file CustomPagesView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CCustomPagesView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 59 of file CustomPagesView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/CustomPages/CustomPagesView.h
  • vc2008fp/CustomPages/CustomPagesView.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomSliderCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CCustomSliderCtrl Class Reference

#include "SliderButton.h"

List of all members.

Public Member Functions

CCustomSliderCtrl (CSliderButton &btnSlider)
virtual | ~CCustomSliderCtrl ()

Public Attributes

CSliderButton & m_btnSlider

Protected Member Functions

afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)

Detailed Description

Definition at line 18 of file SliderButton.h.

Constructor & Destructor Documentation

CCustomSliderCtrl::CCustomSliderCtrl ( CSliderButton & btnSlider )

Definition at line 302 of file SliderButton.cpp.

                                                             :
  m_btnSlider (btnSlider)
{
}

CCustomSliderCtrl::~CCustomSliderCtrl ( ) [virtual]

Definition at line 307 of file SliderButton.cpp.

{
}

Member Function Documentation

void CCustomSliderCtrl::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 333 of file SliderButton.cpp.

{
  int nPos = GetPos ();

  CSliderCtrl::OnKeyDown(nChar, nRepCnt, nFlags);

  if (GetPos () != nPos)
  {
    m_btnSlider.SetValue (GetPos (), TRUE);
  }
}

void CCustomSliderCtrl::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 345 of file SliderButton.cpp.

{
  CSliderCtrl::OnLButtonUp(nFlags, point);
  if (IsWindowVisible ())
  {
    m_btnSlider.SetValue (GetPos (), TRUE);
  }
}

void CCustomSliderCtrl::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 321 of file SliderButton.cpp.

{
  int nPos = GetPos ();

  CSliderCtrl::OnMouseMove(nFlags, point);

  if ((nFlags & MK_LBUTTON) && GetPos () != nPos)
  {
    m_btnSlider.SetValue (GetPos (), TRUE);
  }
}

Member Data Documentation

CSliderButton& CCustomSliderCtrl::m_btnSlider

Definition at line 26 of file SliderButton.h.

The documentation for this class was generated from the following files:
  • vc2008fp/Slider/SliderButton.h
  • vc2008fp/Slider/SliderButton.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CCustomToolTipCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CCustomToolTipCtrl Class Reference

#include "CustomToolTipCtrl.h"

List of all members.

Public Member Functions

CCustomToolTipCtrl ()
virtual | ~CCustomToolTipCtrl ()
virtual CSize | GetIconSize ()
virtual BOOL | OnDrawIcon (CDC *pDC, CRect rectImage)

Public Attributes

int | m_nCurrID

Protected Member Functions

afx_msg void | OnShow (NMHDR *pNMHDR, LRESULT *pResult)

Detailed Description

Definition at line 16 of file CustomToolTipCtrl.h.

Constructor & Destructor Documentation

CCustomToolTipCtrl::CCustomToolTipCtrl ( )

Definition at line 24 of file CustomToolTipCtrl.cpp.

{
  m_nCurrID = 0;
}

CCustomToolTipCtrl::~CCustomToolTipCtrl ( ) [virtual]

Definition at line 29 of file CustomToolTipCtrl.cpp.

{
}

Member Function Documentation

virtual CSize CCustomToolTipCtrl::GetIconSize ( ) [inline, virtual]

Definition at line 31 of file CustomToolTipCtrl.h.

  {
    return CSize (32, 32);
  }

BOOL CCustomToolTipCtrl::OnDrawIcon | ( | CDC * | pDC,
 |  | CRect | rectImage |
 | ) |  |  | [virtual]

Definition at line 62 of file CustomToolTipCtrl.cpp.

{
  UINT uiBmpResID = 0;

  switch (m_nCurrID)
  {
  case IDOK:
    uiBmpResID = IDB_OK;
    break;

  case IDCANCEL:
    uiBmpResID = IDB_CANCEL;
    break;
  }

  if (uiBmpResID == 0)
  {
    return FALSE;
  }

  CMFCToolBarImages image;
  image.Load (uiBmpResID);
  image.SetSingleImage ();
  image.DrawEx (pDC, rectImage, 0);

  return TRUE;
}

void CCustomToolTipCtrl::OnShow | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 41 of file CustomToolTipCtrl.cpp.

{
  m_nCurrID = CWnd::FromHandle ((HWND)pNMHDR->idFrom)->GetDlgCtrlID ();

  switch (m_nCurrID)
  {
  case IDOK:
    SetDescription (_T("OK Button description..."));
    break;

  case IDCANCEL:
    SetDescription (_T("Cancel Button description..."));
    break;

  default:
    SetDescription (_T (""));
  }

  CMFCToolTipCtrl::OnShow (pNMHDR, pResult);
}

Member Data Documentation

int CCustomToolTipCtrl::m_nCurrID

Definition at line 24 of file CustomToolTipCtrl.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DlgToolTips/CustomToolTipCtrl.h
  • vc2008fp/DlgToolTips/CustomToolTipCtrl.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDataObjectDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CDataObjectDlg Class Reference

#include "dataobj.h"

List of all members.

Public Types

enum | { IDD = IDD_IDATAOBJDLG }

Public Member Functions

CDataObjectDlg (CWnd *pParent=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 55 of file dataobj.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 63 of file dataobj.h.

{ IDD = IDD_IDATAOBJDLG };

Constructor & Destructor Documentation

CDataObjectDlg::CDataObjectDlg ( CWnd * pParent = NULL )

Definition at line 87 of file dataobj.cpp.

  : CDialog(CDataObjectDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CDataObjectDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CDataObjectDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 96 of file dataobj.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDataObjectDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/dataobj.h
  • ole/oleview/iviewers/dataobj.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDataObjectViewer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDataObjectViewer Class Reference

#include "dataobj.h"

Inherits CInterfaceViewer.

List of all members.

Public Member Functions

virtual HRESULT | OnView (HWND hwndParent, REFIID riid, LPUNKNOWN punk)

Protected Member Functions

CDataObjectViewer ()
virtual | ~CDataObjectViewer ()

Detailed Description

Definition at line 20 of file dataobj.h.

Constructor & Destructor Documentation

CDataObjectViewer::CDataObjectViewer ( ) [protected]

Definition at line 30 of file dataobj.cpp.

{
}

CDataObjectViewer::~CDataObjectViewer ( ) [protected, virtual]

Definition at line 34 of file dataobj.cpp.

{
}

Member Function Documentation

HRESULT CDataObjectViewer::OnView | ( | HWND | hwndParent,
 |  | REFIID | riid,
 |  | LPUNKNOWN | punk |
 | ) |  |  | [virtual]

Reimplemented from CInterfaceViewer.

Definition at line 49 of file dataobj.cpp.

{
  SCODE sc = NOERROR ;

  ASSERT(hwndParent);
  ENSURE(punk);

  if (riid != IID_IDataObject)
  {
    AfxMessageBox( _T("IDataObject interface viewer only supports IID_IDataObject") ) ;
    return E_INVALIDARG ;
  }

  IDataObject* pdataobj = NULL ;
  sc = punk->QueryInterface( riid, (void**)&pdataobj ) ;
  if (FAILED(sc))
  {
    AfxMessageBox( _T("Object does not support IDataObject") ) ;
    return E_UNEXPECTED ;
  }

  CIDataObjectDlg* pdlg ;
  pdlg = new CIDataObjectDlg( hwndParent, pdataobj, riid, _T("") ) ;

  if (pdlg)
  {
    pdlg->DoModal() ;
    delete pdlg ;
  }

  pdataobj->Release() ;

  return sc ;
}

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/dataobj.h
  • ole/oleview/iviewers/dataobj.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDateDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Attributes

CDateDialog Class Reference

#include "datedial.h"

Inherits CCSDialog, and CCSDialog.

List of all members.

Public Types

enum | { IDD = IDD_DATEDIALOG }
enum | { IDD = IDD_DATEDIALOG }

Public Member Functions

CDateDialog (CWnd *pParent=NULL)
CDateDialog (CWnd *pParent=NULL)

Static Public Member Functions

static BOOL CALLBACK | DateFmtEnumProc (LPTSTR lpszFormatString)
static BOOL CALLBACK | DateFmtEnumProc (LPTSTR lpszFormatString)
static BOOL CALLBACK | TimeFmtEnumProc (LPTSTR lpszFormatString)
static BOOL CALLBACK | TimeFmtEnumProc (LPTSTR lpszFormatString)

Public Attributes

CListBox | m_listBox
CString | m_strSel

Static Public Attributes

static LCID | m_id
static CListBox * | m_pListBox = NULL
static SYSTEMTIME | m_time

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()
afx_msg void | OnDblclkDatedialogList ()
afx_msg void | OnDblclkDatedialogList ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()

Static Protected Attributes

static const DWORD | m_nHelpIDs []

Detailed Description

Definition at line 15 of file datedial.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file datedial.h.

{ IDD = IDD_DATEDIALOG };

anonymous enum
Enumerator:
IDD

Definition at line 32 of file datedial.h.

{ IDD = IDD_DATEDIALOG };

Constructor & Destructor Documentation

CDateDialog::CDateDialog ( CWnd * pParent = NULL )

Definition at line 39 of file datedial.cpp.

  : CCSDialog(CDateDialog::IDD, pParent)
{
  //{{AFX_DATA_INIT(CDateDialog)
  m_strSel = _T("");
  //}}AFX_DATA_INIT
}

CDateDialog::CDateDialog ( CWnd * pParent = NULL )

Member Function Documentation

BOOL CALLBACK CDateDialog::DateFmtEnumProc ( LPTSTR lpszFormatString ) [static]

Definition at line 87 of file datedial.cpp.

{
  ENSURE(m_pListBox != NULL);
  TCHAR buf[256];
  VERIFY(GetDateFormat(m_id, 0, &m_time, lpszFormatString, buf, 256));
  // we can end up with same format because a format with leading
  // zeroes may be the same as one without when a number is big enough
  // e.g. 09/10/94 9/10/94 are different but 10/10/94 and 10/10/94 are
  // the same
  if (m_pListBox->FindStringExact(-1,buf) == CB_ERR)
    m_pListBox->AddString(buf);
  return TRUE;
}

static BOOL CALLBACK CDateDialog::DateFmtEnumProc ( LPTSTR lpszFormatString ) [static]
virtual void CDateDialog::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
void CDateDialog::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 48 of file datedial.cpp.

{
  CCSDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDateDialog)
  DDX_Control(pDX, IDC_DATEDIALOG_LIST, m_listBox);
  DDX_LBString(pDX, IDC_DATEDIALOG_LIST, m_strSel);
  //}}AFX_DATA_MAP
}

virtual const DWORD* CDateDialog::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 46 of file datedial.h.

{return m_nHelpIDs;}

virtual const DWORD* CDateDialog::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 48 of file datedial.h.

{return m_nHelpIDs;}

afx_msg void CDateDialog::OnDblclkDatedialogList ( ) [protected]
void CDateDialog::OnDblclkDatedialogList ( ) [protected]

Definition at line 115 of file datedial.cpp.

{
  OnOK();
}

virtual BOOL CDateDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

BOOL CDateDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

Definition at line 68 of file datedial.cpp.

{
  CCSDialog::OnInitDialog();

  m_pListBox = &m_listBox; // set static member
  GetLocalTime(&m_time);
  m_id = GetUserDefaultLCID();

  EnumDateFormats(DateFmtEnumProc, m_id, DATE_SHORTDATE);
  EnumDateFormats(DateFmtEnumProc, m_id, DATE_LONGDATE);
  EnumTimeFormats(TimeFmtEnumProc, m_id, 0);

  m_pListBox = NULL;
  m_listBox.SetCurSel(0);

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

static BOOL CALLBACK CDateDialog::TimeFmtEnumProc ( LPTSTR lpszFormatString ) [static]
BOOL CALLBACK CDateDialog::TimeFmtEnumProc ( LPTSTR lpszFormatString ) [static]

Definition at line 101 of file datedial.cpp.

{
  ENSURE(m_pListBox != NULL);
  TCHAR buf[256];
  VERIFY(GetTimeFormat(m_id, 0, &m_time, lpszFormatString, buf, 256));
  // we can end up with same format because a format with leading
  // zeroes may be the same as one without when a number is big enough
  // e.g. 09/10/94 9/10/94 are different but 10/10/94 and 10/10/94 are
  // the same
  if (m_pListBox->FindStringExact(-1,buf) == CB_ERR)
    m_pListBox->AddString(buf);
  return TRUE;
}

Member Data Documentation

static LCID CDateDialog::m_id [static]

Definition at line 23 of file datedial.h.

CListBox CDateDialog::m_listBox

Definition at line 31 of file datedial.h.

static const DWORD CDateDialog::m_nHelpIDs [static, protected]
Initial value:
{
  IDC_DATEDIALOG_LIST, IDH_WORDPAD_TIMEDATE,
  IDC_STATIC_HEADING, IDH_WORDPAD_TIMEDATE,
  IDOK, IDH_WORDPAD_TIMEDATE,
  IDCANCEL, IDH_WORDPAD_TIMEDATE,
  0 , 0
}

Definition at line 45 of file datedial.h.

static CListBox * CDateDialog::m_pListBox = NULL [static]

Definition at line 24 of file datedial.h.

CString CDateDialog::m_strSel

Definition at line 32 of file datedial.h.

static SYSTEMTIME CDateDialog::m_time [static]

Definition at line 22 of file datedial.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/datedial.h
  • vc2008fp/WordPad/datedial.h
  • ole/wordpad/datedial.cpp
  • vc2008fp/WordPad/datedial.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDateTimePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CDateTimePage Class Reference

#include "DateTime.h"

List of all members.

Public Types

enum | { IDD = IDD_DATETIME }

Public Member Functions

CDateTimePage ()
~CDateTimePage ()
void | OnDTNotify (NMHDR *pHdr, LRESULT *pRes)
void | SetCheck (UINT idBtn)

Public Attributes

BOOL | m_bAppCanParse
BOOL | m_bShowNone
BOOL | m_bUpDown
CDateTimeCtrl | m_DateTime
CListBox | m_lbNotifyList
UINT m_nPrevStyle

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnCkappcanparse ()
afx_msg void | OnCklongdateformat ()
afx_msg void | OnCkshortdateformat ()
afx_msg void | OnCkshownone ()
afx_msg void | OnCktimeformat ()
afx_msg void | OnCkupdown ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 21 of file DateTime.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 37 of file DateTime.h.

{ IDD = IDD_DATETIME };

Constructor & Destructor Documentation

CDateTimePage::CDateTimePage ( )

Definition at line 27 of file DateTime.cpp.

                             : CPropertyPage(CDateTimePage::IDD)
{
  //{{AFX_DATA_INIT(CDateTimePage)
  m_bAppCanParse = FALSE;
  m_bShowNone = FALSE;
  m_bUpDown = FALSE;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
}

CDateTimePage::~CDateTimePage ( )

Definition at line 37 of file DateTime.cpp.

{
}

Member Function Documentation

void CDateTimePage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 41 of file DateTime.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDateTimePage)
  DDX_Check(pDX, IDC_CKAPPCANPARSE, m_bAppCanParse);
  DDX_Check(pDX, IDC_CKSHOWNONE, m_bShowNone);
  DDX_Check(pDX, IDC_CKUPDOWN, m_bUpDown);
  //}}AFX_DATA_MAP
  DDX_Control(pDX,IDC_LBNOTIFY,m_lbNotifyList);
}

void CDateTimePage::OnCkappcanparse ( ) [protected]

Definition at line 152 of file DateTime.cpp.

{
  UpdateData(TRUE);
  if(m_bAppCanParse)
  {
    CRect rc;
    m_DateTime.GetWindowRect(rc);
    long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
    lStyle |= DTS_APPCANPARSE;
    m_DateTime.DestroyWindow();
    ScreenToClient(rc);
    m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
  }
  else
  {
    CRect rc;
    m_DateTime.GetWindowRect(rc);
    long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
    lStyle &= ~DTS_APPCANPARSE;
    m_DateTime.DestroyWindow();
    ScreenToClient(rc);
    m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
  }

}

void CDateTimePage::OnCklongdateformat ( ) [protected]

Definition at line 187 of file DateTime.cpp.

{
  SetCheck(IDC_CKLONGDATEFORMAT);

  //remove previous format style
  m_DateTime.ModifyStyle(m_nPrevStyle,0);
  //set this style
  m_DateTime.ModifyStyle(0,DTS_LONGDATEFORMAT,SWP_NOSIZE);
  m_nPrevStyle=DTS_LONGDATEFORMAT;
}

void CDateTimePage::OnCkshortdateformat ( ) [protected]

Definition at line 178 of file DateTime.cpp.

{
  SetCheck(IDC_CKSHORTDATEFORMAT);
  //remove previous format style
  m_DateTime.ModifyStyle(m_nPrevStyle,0);
  //set this style
  m_DateTime.ModifyStyle(0,DTS_SHORTDATEFORMAT,SWP_NOSIZE);
  m_nPrevStyle=DTS_SHORTDATEFORMAT;
}

void CDateTimePage::OnCkshownone ( ) [protected]

Definition at line 123 of file DateTime.cpp.

{
  UpdateData(TRUE);
  if(m_bShowNone)
  {
    CRect rc;
    m_DateTime.GetWindowRect(rc);
    long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
    lStyle |= DTS_SHOWNONE;
    m_DateTime.DestroyWindow();
    ScreenToClient(rc);
    m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);

  }
  else
  {
    CRect rc;
    m_DateTime.GetWindowRect(rc);
    long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
    lStyle &= ~DTS_SHOWNONE;
    m_DateTime.DestroyWindow();
    ScreenToClient(rc);
    m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
  }

}

void CDateTimePage::OnCktimeformat ( ) [protected]

Definition at line 197 of file DateTime.cpp.

{
  SetCheck(IDC_CKTIMEFORMAT);

  //remove previous format style
  m_DateTime.ModifyStyle(m_nPrevStyle,0);
  //set this style
  m_DateTime.ModifyStyle(0,DTS_TIMEFORMAT,SWP_NOSIZE);
  m_nPrevStyle=DTS_TIMEFORMAT;
}

void CDateTimePage::OnCkupdown ( ) [protected]

Definition at line 92 of file DateTime.cpp.

{
  UpdateData(TRUE);

  if(m_bUpDown)
  {
    CRect rc;
    m_DateTime.GetWindowRect(rc);
    long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
    lStyle |= DTS_UPDOWN;
    m_DateTime.DestroyWindow();
    ScreenToClient(rc);
    m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
  }
  else
  {
    CRect rc;
    m_DateTime.GetWindowRect(rc);
    long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
    lStyle &= ~DTS_UPDOWN;
    m_DateTime.DestroyWindow();
    ScreenToClient(rc);
    m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
  }

}

void CDateTimePage::OnDTNotify | ( | NMHDR * | pHdr,
 |  | LRESULT * | pRes
 | ) |  |

Definition at line 224 of file DateTime.cpp.

{
  switch( pHdr->code)
  {
  case DTN_CLOSEUP:
    m_lbNotifyList.AddString(_T("DTN_CLOSEUP"));
    break;
  case DTN_DATETIMECHANGE:
    m_lbNotifyList.AddString(_T("DTN_DATETIMECHANGE"));
    break;
  case DTN_DROPDOWN:
    m_lbNotifyList.AddString(_T("DTN_DROPDOWN"));
    break;
  case DTN_FORMAT:
    m_lbNotifyList.AddString(_T("DTN_FORMAT"));
    break;
  case DTN_FORMATQUERY:
    m_lbNotifyList.AddString(_T("DTN_FORMATQUERY"));
    break;
  case DTN_USERSTRING:
    m_lbNotifyList.AddString(_T("DTN_USERSTRING"));
    break;
  case DTN_WMKEYDOWN:
    m_lbNotifyList.AddString(_T("DTN_WMKEYDOWN"));
    break;
  }

}

BOOL CDateTimePage::OnInitDialog ( ) [protected, virtual]

Definition at line 74 of file DateTime.cpp.

{
  CPropertyPage::OnInitDialog();

  CWnd *pWnd = GetDlgItem(IDC_DTFRAME);
  CRect rc;
  if(!pWnd) return TRUE;
  pWnd->GetWindowRect(rc);
  pWnd->DestroyWindow(); //pWnd was just a placeholder;
  ScreenToClient(rc);
  m_DateTime.Create(WS_CHILD|WS_VISIBLE|DTS_SHORTDATEFORMAT,rc,this,IDC_DATETIME);
  m_nPrevStyle=DTS_SHORTDATEFORMAT;
  SetCheck(IDC_CKSHORTDATEFORMAT);

  return TRUE;
}

void CDateTimePage::SetCheck ( UINT idBtn )

Definition at line 207 of file DateTime.cpp.

{
  static UINT buttons []={IDC_CKTIMEFORMAT,IDC_CKLONGDATEFORMAT,IDC_CKSHORTDATEFORMAT};
  CButton *pBtn=NULL;
  for(int i=0;i<3;i++)
  {
    pBtn = (CButton*)GetDlgItem(buttons[i]);
    if(!pBtn) continue;

    if(buttons[i]==idBtn)
      pBtn->SetCheck(1);
    else
      pBtn->SetCheck(0);
  }

}

Member Data Documentation

BOOL CDateTimePage::m_bAppCanParse

Definition at line 38 of file DateTime.h.

BOOL CDateTimePage::m_bShowNone

Definition at line 39 of file DateTime.h.

BOOL CDateTimePage::m_bUpDown

Definition at line 40 of file DateTime.h.

CDateTimeCtrl CDateTimePage::m_DateTime

Definition at line 31 of file DateTime.h.

CListBox CDateTimePage::m_lbNotifyList

Definition at line 28 of file DateTime.h.

UINT CDateTimePage::m_nPrevStyle

Definition at line 29 of file DateTime.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/DateTime.h
  • general/CmnCtrl1/DateTime.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDBVListApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDBVListApp Class Reference

#include "DBVList.h"

List of all members.

Public Member Functions

CDBVListApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 30 of file DBVList.h.

Constructor & Destructor Documentation

CDBVListApp::CDBVListApp ( )

Definition at line 38 of file DBVList.cpp.

{
}

Member Function Documentation

BOOL CDBVListApp::InitInstance ( ) [virtual]

Definition at line 50 of file DBVList.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization

  // Change the registry key under which our settings are stored.
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)

  // Register document templates

  CSingleDocTemplate* pDocTemplate;
  pDocTemplate = new CSingleDocTemplate(
    IDR_MAINFRAME,
    RUNTIME_CLASS(CDBVListDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CDBVListView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CDBVListApp::OnAppAbout ( )

Definition at line 131 of file DBVList.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/DBVList/DBVList.h
  • general/DBVList/DBVList.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDBVListDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CDBVListDoc Class Reference

#include "DBVListDoc.h"

List of all members.

Public Member Functions

virtual | ~CDBVListDoc ()
virtual BOOL | OnNewDocument ()

Public Attributes

CDBVListSet m_dBVListSet

Protected Member Functions

CDBVListDoc ()

Detailed Description

Definition at line 20 of file DBVListDoc.h.

Constructor & Destructor Documentation

CDBVListDoc::CDBVListDoc ( ) [protected]

Definition at line 37 of file DBVListDoc.cpp.

{
}

CDBVListDoc::~CDBVListDoc ( ) [virtual]

Definition at line 41 of file DBVListDoc.cpp.

{
}

Member Function Documentation

BOOL CDBVListDoc::OnNewDocument ( ) [virtual]

Definition at line 45 of file DBVListDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  return TRUE;
}

Member Data Documentation

CDBVListSet CDBVListDoc::m_dBVListSet

Definition at line 28 of file DBVListDoc.h.

The documentation for this class was generated from the following files:
  • general/DBVList/DBVListDoc.h
  • general/DBVList/DBVListDoc.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDBVListSet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CDBVListSet Class Reference

#include "DBVListSet.h"

List of all members.

Public Member Functions

CDBVListSet (CDaoDatabase *pDatabase=NULL)
virtual void | DoFieldExchange (CDaoFieldExchange *pFX)
virtual CString | GetDefaultDBName ()
virtual CString | GetDefaultSQL ()
void | SetFilter (CString strCurQuery)
void | SetSort (LPCTSTR pszSortField)

Public Attributes

CString | m_Department
CString | m_Division
CString | m_Email
CString | m_Location
CString | m_Name
CString | m_Phone
CString | m_Title

Detailed Description

Definition at line 19 of file DBVListSet.h.

Constructor & Destructor Documentation

CDBVListSet::CDBVListSet ( CDaoDatabase * pDatabase = NULL )

Definition at line 27 of file DBVListSet.cpp.

  : CDaoRecordset(pdb)
{
  //{{AFX_FIELD_INIT(CDBVListSet)
  m_Email = _T("");
  m_Name = _T("");
  m_Phone = _T("");
  m_Location = _T("");
  m_Title = _T("");
  m_Department = _T("");
  m_Division = _T("");
  m_nFields = 7;
  //}}AFX_FIELD_INIT
  m_nDefaultType = dbOpenDynaset;
}

Member Function Documentation

void CDBVListSet::DoFieldExchange ( CDaoFieldExchange * pFX ) [virtual]

Definition at line 54 of file DBVListSet.cpp.

{
  //{{AFX_FIELD_MAP(CDBVListSet)
  pFX->SetFieldType(CDaoFieldExchange::outputColumn);
  DFX_Text(pFX, _T("[Email]"), m_Email);
  DFX_Text(pFX, _T("[Name]"), m_Name);
  DFX_Text(pFX, _T("[Phone]"), m_Phone);
  DFX_Text(pFX, _T("[Location]"), m_Location);
  DFX_Text(pFX, _T("[Title]"), m_Title);
  DFX_Text(pFX, _T("[Department]"), m_Department);
  DFX_Text(pFX, _T("[Division]"), m_Division);
  //}}AFX_FIELD_MAP
}

CString CDBVListSet::GetDefaultDBName ( ) [virtual]

Definition at line 43 of file DBVListSet.cpp.

{
  return _T("employee.mdb");
}

CString CDBVListSet::GetDefaultSQL ( ) [virtual]

Definition at line 49 of file DBVListSet.cpp.

{
  return _T("[Employee8]");
}

void CDBVListSet::SetFilter ( CString strCurQuery )

Definition at line 68 of file DBVListSet.cpp.

{
  // convenience function to set the SQL filter for the query

  if (strCurQuery == m_strFilter)
    return;

  CWaitCursor wait;

  m_strFilter.Format(_T("[Division] = '%s'"), (LPCTSTR)strCurQuery);
  if (!IsOpen())
    Open();
  Requery();

  // update record counts
  while (!IsEOF())
    MoveNext();
}

void CDBVListSet::SetSort ( LPCTSTR pszSortField )

Definition at line 88 of file DBVListSet.cpp.

{
  // convenience function to set the SQL sort for the query

  m_strSort = pszSortField;
  if (IsOpen())
  {
    CWaitCursor wait;
    Requery();
  }
}

Member Data Documentation

CString CDBVListSet::m_Department

Definition at line 33 of file DBVListSet.h.

CString CDBVListSet::m_Division

Definition at line 34 of file DBVListSet.h.

CString CDBVListSet::m_Email

Definition at line 28 of file DBVListSet.h.

CString CDBVListSet::m_Location

Definition at line 31 of file DBVListSet.h.

CString CDBVListSet::m_Name

Definition at line 29 of file DBVListSet.h.

CString CDBVListSet::m_Phone

Definition at line 30 of file DBVListSet.h.

CString CDBVListSet::m_Title

Definition at line 32 of file DBVListSet.h.

The documentation for this class was generated from the following files:
  • general/DBVList/DBVListSet.h
  • general/DBVList/DBVListSet.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDBVListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CDBVListView Class Reference

#include "DBVListView.h"

List of all members.

Public Types

enum | { IDD = IDD_DBVLIST_FORM }

Public Member Functions

virtual | ~CDBVListView ()
CDBVListDoc * GetDocument ()
virtual CDaoRecordset * | OnGetRecordset ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

CDBVListSet * m_pSet
CString | m_strDiv

Protected Member Functions

CDBVListView ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnFetch ()
virtual void | OnInitialUpdate ()

Detailed Description

Definition at line 21 of file DBVListView.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 29 of file DBVListView.h.

{ IDD = IDD_DBVLIST_FORM };

Constructor & Destructor Documentation

CDBVListView::CDBVListView ( ) [protected]

Definition at line 41 of file DBVListView.cpp.

  : CFormView(CDBVListView::IDD)
{
  //{{AFX_DATA_INIT(CDBVListView)
  m_pSet = NULL;
  m_strDiv = _T("");
  //}}AFX_DATA_INIT
}

CDBVListView::~CDBVListView ( ) [virtual]

Definition at line 50 of file DBVListView.cpp.

{
}

Member Function Documentation

void CDBVListView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 54 of file DBVListView.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDBVListView)
  DDX_CBString(pDX, IDC_DIV, m_strDiv);
  //}}AFX_DATA_MAP
}

CDBVListDoc * CDBVListView::GetDocument ( ) [inline]

Definition at line 71 of file DBVListView.h.

   { return (CDBVListDoc*)m_pDocument; }

void CDBVListView::OnFetch ( ) [protected]

Definition at line 105 of file DBVListView.cpp.

{
  CMainFrame* pFrame=static_cast<CMainFrame*>(AfxGetMainWnd());
  CEmpView* pView=static_cast<CEmpView*>(pFrame->m_wndSplitter.GetPane(1,0));

  // set the filter for viewing the database to the currently selected division
  UpdateData(TRUE);
  pView->UpdateFilter(m_strDiv);
}

CDaoRecordset * CDBVListView::OnGetRecordset ( ) [virtual]

Definition at line 96 of file DBVListView.cpp.

{
  return m_pSet;
}

void CDBVListView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 67 of file DBVListView.cpp.

{
  m_pSet = &GetDocument()->m_dBVListSet;
  CFormView::OnInitialUpdate();
}

BOOL CDBVListView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 62 of file DBVListView.cpp.

{
  return CFormView::PreCreateWindow(cs);
}

Member Data Documentation

CDBVListSet* CDBVListView::m_pSet

Definition at line 30 of file DBVListView.h.

CString CDBVListView::m_strDiv

Definition at line 31 of file DBVListView.h.

The documentation for this class was generated from the following files:
  • general/DBVList/DBVListView.h
  • general/DBVList/DBVListView.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDebugLog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes | Private Member Functions

CDebugLog Class Reference

#include "Log.H"

Inherits CLog.

List of all members.

Public Member Functions

CDebugLog ()
~CDebugLog ()
CLog & | operator<< (LPCTSTR pszString)

Protected Attributes

BOOL | m_tStartOfLine

Private Member Functions

DECLARE_DYNAMIC (CDebugLog)

Detailed Description

Definition at line 38 of file Log.H.

Constructor & Destructor Documentation

CDebugLog::CDebugLog ( )

Definition at line 82 of file Log.Cpp.

                     :
   m_tStartOfLine( TRUE )
{
}

CDebugLog::~CDebugLog ( )

Definition at line 87 of file Log.Cpp.

{
}

Member Function Documentation

CDebugLog::DECLARE_DYNAMIC ( CDebugLog ) [private]
CLog & CDebugLog::operator<< ( LPCTSTR pszString ) [virtual]

Reimplemented from CLog.

Definition at line 91 of file Log.Cpp.

{
   CString strSpan;
   CString strString( pszString );

   while( strString.GetLength() > 0 )
   {
    if( m_tStartOfLine )
    {
     OutputDebugString( _T( "TstCon Log: " ) );
     m_tStartOfLine = FALSE;
    }
    strSpan = strString.SpanExcluding( _T( "\n" ) );
    OutputDebugString( strSpan );
    if( strString.GetLength() == strSpan.GetLength() )
    {
     strString.Empty();
    }
    else
    {
     ASSERT( strString[strSpan.GetLength()] == _T( '\n' ) );
     OutputDebugString( _T( "\n" ) );
     m_tStartOfLine = TRUE;
     strString = strString.Mid( strSpan.GetLength()+1 );
    }
   }

   return( *this );
}

Member Data Documentation

BOOL CDebugLog::m_tStartOfLine [protected]

Definition at line 49 of file Log.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/Log.H
  • ole/TstCon/Log.Cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDemoOptionsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CDemoOptionsPage Class Reference

#include "OptionsPage.h"

List of all members.

Public Types

enum | { IDD = IDD_POPULAR_PAGE }

Public Member Functions

CDemoOptionsPage ()
~CDemoOptionsPage ()
virtual void | OnOK ()

Public Attributes

BOOL | m_bShowDevTab
BOOL | m_bShowFloaty
BOOL | m_bShowKeyTips
int | m_nColorScheme
int | m_nTooltipStyle
CDlgBanner m_wndBanner
CComboBox | m_wndColorScheme

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnSize (UINT nType, int cx, int cy)

Detailed Description

Definition at line 19 of file OptionsPage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file OptionsPage.h.

{ IDD = IDD_POPULAR_PAGE };

Constructor & Destructor Documentation

CDemoOptionsPage::CDemoOptionsPage ( )

Definition at line 151 of file OptionsPage.cpp.

                                   : CMFCPropertyPage(CDemoOptionsPage::IDD)
{
  //{{AFX_DATA_INIT(CDemoOptionsPage)
  m_nColorScheme = theApp.m_nAppLook - ID_VIEW_APPLOOK_2003;
  m_nTooltipStyle = -1;
  m_bShowDevTab = theApp.m_bShowDevTab;
  m_bShowFloaty = theApp.m_bShowFloaty;
  m_bShowKeyTips = theApp.m_bShowKeyTips;
  //}}AFX_DATA_INIT

  if (!theApp.m_bShowToolTips)
  {
    m_nTooltipStyle = 2;
  }
  else
  {
    m_nTooltipStyle = theApp.m_bShowToolTipDescr ? 0 : 1;
  }
}

CDemoOptionsPage::~CDemoOptionsPage ( )

Definition at line 171 of file OptionsPage.cpp.

{
}

Member Function Documentation

void CDemoOptionsPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 175 of file OptionsPage.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDemoOptionsPage)
  DDX_Control(pDX, IDC_BANER, m_wndBanner);
  DDX_Control(pDX, IDC_COLOR_SCHEME, m_wndColorScheme);
  DDX_CBIndex(pDX, IDC_COLOR_SCHEME, m_nColorScheme);
  DDX_CBIndex(pDX, IDC_SCREENTIP_STYLE, m_nTooltipStyle);
  DDX_Check(pDX, IDC_SHOW_DEV_TAB, m_bShowDevTab);
  DDX_Check(pDX, IDC_SHOW_FLOATY, m_bShowFloaty);
  DDX_Check(pDX, IDC_SHOW_KEY_TIPS, m_bShowKeyTips);
  //}}AFX_DATA_MAP
}

BOOL CDemoOptionsPage::OnInitDialog ( ) [protected, virtual]

Definition at line 228 of file OptionsPage.cpp.

{
  CMFCPropertyPage::OnInitDialog();

  if (((CMainFrame*) GetTopLevelFrame())->IsPrintPreview())
  {
    GetDlgItem(IDC_SHOW_DEV_TAB)->EnableWindow(FALSE);
  }

  return TRUE;  // return TRUE unless you set the focus to a control
}

void CDemoOptionsPage::OnOK ( ) [virtual]

Definition at line 198 of file OptionsPage.cpp.

{
  UpdateData();

  theApp.m_bShowFloaty = m_bShowFloaty;
  theApp.m_nAppLook = m_nColorScheme + ID_VIEW_APPLOOK_2003;
  theApp.m_bShowDevTab = m_bShowDevTab;
  theApp.m_bShowKeyTips = m_bShowKeyTips;

  switch (m_nTooltipStyle)
  {
  case 0:
    theApp.m_bShowToolTips = TRUE;
    theApp.m_bShowToolTipDescr = TRUE;
    break;

  case 1:
    theApp.m_bShowToolTips = TRUE;
    theApp.m_bShowToolTipDescr = FALSE;
    break;

  case 2:
    theApp.m_bShowToolTips = FALSE;
    theApp.m_bShowToolTipDescr = FALSE;
    break;
  }

  CMFCPropertyPage::OnOK();
}

void CDemoOptionsPage::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 240 of file OptionsPage.cpp.

{
  CMFCPropertyPage::OnSize(nType, cx, cy);

  if (m_wndBanner.GetSafeHwnd() == NULL)
  {
    return;
  }

  CRect rectBanner;
  m_wndBanner.GetWindowRect(rectBanner);

  CRect rectParent;
  GetParent()->GetWindowRect(rectParent);

  m_wndBanner.SetWindowPos(NULL, -1, -1, rectParent.right - rectBanner.left - 10, rectBanner.Height(), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
}

Member Data Documentation

BOOL CDemoOptionsPage::m_bShowDevTab

Definition at line 35 of file OptionsPage.h.

BOOL CDemoOptionsPage::m_bShowFloaty

Definition at line 36 of file OptionsPage.h.

BOOL CDemoOptionsPage::m_bShowKeyTips

Definition at line 37 of file OptionsPage.h.

int CDemoOptionsPage::m_nColorScheme

Definition at line 33 of file OptionsPage.h.

int CDemoOptionsPage::m_nTooltipStyle

Definition at line 34 of file OptionsPage.h.

CDlgBanner CDemoOptionsPage::m_wndBanner

Definition at line 31 of file OptionsPage.h.

CComboBox CDemoOptionsPage::m_wndColorScheme

Definition at line 32 of file OptionsPage.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/OptionsPage.h
  • vc2008fp/MSOffice2007Demo/OptionsPage.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDemoOptionsPropSheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CDemoOptionsPropSheet Class Reference

#include "OptionsPage.h"

List of all members.

Public Member Functions

CDemoOptionsPropSheet (CWnd *pWndParent, UINT nSelectedPage=0)
virtual BOOL | OnInitDialog ()

Protected Member Functions

virtual void | OnDrawPageHeader (CDC *pDC, int nPage, CRect rectHeader)

Protected Attributes

CMFCToolBarImages | m_Icons
CMFCControlRenderer | m_Pat [4]

Detailed Description

Definition at line 57 of file OptionsPage.h.

Constructor & Destructor Documentation

CDemoOptionsPropSheet::CDemoOptionsPropSheet | ( | CWnd * | pWndParent,
 |  | UINT | nSelectedPage = 0
 | ) |  |

Definition at line 23 of file OptionsPage.cpp.

                                                                                :
  CMFCPropertySheet(_T("Options"), pWndParent, nSelectedPage)
{
  m_Icons.SetImageSize(CSize(32, 32));
  m_Icons.Load(IDB_OPTIONS);

  CMFCControlRendererInfo params(_T(""), CLR_DEFAULT, CRect(0, 0, 350, 60), CRect(83, 58, 266, 1), CRect(0, 0, 0, 0), CRect(0, 0, 0, 0), FALSE);

  params.m_uiBmpResID = IDB_HEADERPAT_1;
  m_Pat[0].Create(params);
  params.m_uiBmpResID = IDB_HEADERPAT_2;
  m_Pat[1].Create(params);
  params.m_uiBmpResID = IDB_HEADERPAT_3;
  m_Pat[2].Create(params);
  params.m_uiBmpResID = IDB_HEADERPAT_4;
  m_Pat[3].Create(params);
}

Member Function Documentation

void CDemoOptionsPropSheet::OnDrawPageHeader | ( | CDC * | pDC,
 |  | int | nPage,
 |  | CRect | rectHeader |
 | ) |  |  | [protected, virtual]

Definition at line 64 of file OptionsPage.cpp.

{
  CSize sizeIcon = m_Icons.GetImageSize();
  CDrawingManager dm(*pDC);

  COLORREF clrFill = afxGlobalData.clrBarFace;
  CMFCControlRenderer* pRenderer = NULL;

  switch (theApp.m_nAppLook)
  {
  case ID_VIEW_APPLOOK_2007_1:
    pRenderer = &m_Pat[1];
    break;
  case ID_VIEW_APPLOOK_2007_2:
    pRenderer = &m_Pat[2];
    break;
  case ID_VIEW_APPLOOK_2007_3:
    pRenderer = &m_Pat[0];
    break;
  case ID_VIEW_APPLOOK_2007_4:
    pRenderer = &m_Pat[3];
    break;
  }

  if (pRenderer != NULL)
  {
    pRenderer->Draw(pDC, rectHeader);
  }
  else
  {
    dm.FillGradient(rectHeader, pDC->GetPixel(rectHeader.left, rectHeader.bottom), clrFill);
  }

  rectHeader.bottom -= 10;

  CRect rectIcon = rectHeader;
  rectIcon.left += 20;
  rectIcon.right = rectIcon.left + sizeIcon.cx;

  m_Icons.DrawEx(pDC, rectIcon, nPage, CMFCToolBarImages::ImageAlignHorzLeft, CMFCToolBarImages::ImageAlignVertCenter);

  CString strText;

  switch (nPage)
  {
  case 0:
    strText = _T("Change the most popular options");
    break;

  case 1:
    strText = _T("Customize the Quick Access Toolbar and keyboard shortcuts");
    break;

  case 2:
    strText = _T("Contact Microsoft, find online resources and obtain additional information regarding our products and services");
    break;
  }

  CRect rectText = rectHeader;
  rectText.left = rectIcon.right + 10;
  rectText.right -= 20;

  CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontBold);
  pDC->SetBkMode(TRANSPARENT);
  pDC->SetTextColor(afxGlobalData.clrBarText);

  UINT uiFlags = DT_SINGLELINE | DT_VCENTER;

  CRect rectTextCalc = rectText;
  pDC->DrawText(strText, rectTextCalc, uiFlags | DT_CALCRECT);

  if (rectTextCalc.right > rectText.right)
  {
    rectText.DeflateRect(0, 10);
    uiFlags = DT_WORDBREAK;
  }

  pDC->DrawText(strText, rectText, uiFlags);

  pDC->SelectObject(pOldFont);
}

BOOL CDemoOptionsPropSheet::OnInitDialog ( ) [virtual]

Definition at line 41 of file OptionsPage.cpp.

{
  BOOL bRes = CMFCPropertySheet::OnInitDialog();

  // Ensure that the Options dialog is fully visible on screen
  CRect rectDialog;
  GetWindowRect(&rectDialog);

  int cxScreen = GetSystemMetrics(SM_CXSCREEN);
  int cyScreen = GetSystemMetrics(SM_CYMAXIMIZED) - (GetSystemMetrics(SM_CYSCREEN) - GetSystemMetrics(SM_CYMAXIMIZED));

  if ((rectDialog.left < 0) || (rectDialog.top < 0))
  {
    SetWindowPos(NULL, rectDialog.left < 0 ? 0 : rectDialog.left, rectDialog.top < 0 ? 0 : rectDialog.top, 0, 0, SWP_NOSIZE);
  }
  else if ((rectDialog.right > cxScreen) || (rectDialog.bottom > cyScreen))
  {
    SetWindowPos(NULL, rectDialog.right > cxScreen ? cxScreen - rectDialog.Width() : rectDialog.left, rectDialog.bottom > cyScreen ? cyScreen - rectDialog.Height() : rectDialog.top, 0, 0, SWP_NOSIZE);
  }

  return bRes;
}

Member Data Documentation

CMFCToolBarImages CDemoOptionsPropSheet::m_Icons [protected]

Definition at line 68 of file OptionsPage.h.

CMFCControlRenderer CDemoOptionsPropSheet::m_Pat[4] [protected]

Definition at line 69 of file OptionsPage.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/OptionsPage.h
  • vc2008fp/MSOffice2007Demo/OptionsPage.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDerEditDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Attributes

CDerEditDlg Class Reference

List of all members.

Public Types

enum | { IDD = IDD_DERIVED_EDIT }

Public Member Functions

CDerEditDlg ()
BOOL | OnInitDialog ()
virtual void | OnOK ()
void | OnSetFont (CFont *pFont)

Protected Attributes

CParsedEdit m_edit1
CParsedEdit m_edit2
CParsedEdit m_edit3
CParsedEdit m_edit4
CFont * | m_pFont
CStatic | m_static1
CStatic | m_static2
CStatic | m_static3
CStatic | m_static4

Detailed Description

Definition at line 19 of file dertest.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file dertest.cpp.

:
  //{{AFX_DATA(CDerEditDlg)

Constructor & Destructor Documentation

CDerEditDlg::CDerEditDlg ( ) [inline]

Definition at line 26 of file dertest.cpp.

      :
  //{{AFX_DATA(CDerEditDlg)
    enum { IDD = IDD_DERIVED_EDIT };

Member Function Documentation

BOOL CDerEditDlg::OnInitDialog ( )

Definition at line 50 of file dertest.cpp.

{
  // This is an example of the _incorrect_ way to create a dialog
  // The following code show you what you should _not_ do:
  //    1) do not use hard coded numbers for coordinates and sizes
  //     (these will break when the font sizes changes and are
  //     hard to edit and maintain).
  //    2) do not put strings in code, they should be in resources.
  //    3) as you can see below the programming steps required
  //     to create controls, pass the correct creation parameters,
  //     and set the appropriate font, is complicated and error prone.
  //    4) localization of the controls would require changes to the
  //     sources for the captions, font, coordinates, and sizes.

  const int yStart = 8;
  const int height = 30;

  CPoint whereLabel(10, yStart);
  CSize sizeLabel(80, 24);

  CPoint whereEdit(90, yStart);
  CSize sizeEdit(140, 24);

  m_static1.Create(_T("Letters:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
    CRect(whereLabel, sizeLabel), this, (UINT)-1);
  m_static1.SetFont(m_pFont);
  whereLabel.y += height;
  m_edit1.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
    PES_LETTERS,
    CRect(whereEdit, sizeEdit), this, IDC_EDIT1);
  m_edit1.SetFont(m_pFont);
  whereEdit.y += height;

  m_static2.Create(_T("Numbers:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
    CRect(whereLabel, sizeLabel), this, (UINT)-1);
  m_static2.SetFont(m_pFont);
  whereLabel.y += height;
  m_edit2.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
    PES_NUMBERS,
    CRect(whereEdit, sizeEdit), this, IDC_EDIT2);
  m_edit2.SetFont(m_pFont);
  whereEdit.y += height;

  m_static3.Create(_T("Either:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
    CRect(whereLabel, sizeLabel), this, (UINT)-1);
  m_static3.SetFont(m_pFont);
  whereLabel.y += height;
  m_edit3.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
    PES_LETTERS | PES_NUMBERS,
    CRect(whereEdit, sizeEdit), this, IDC_EDIT3);
  m_edit3.SetFont(m_pFont);
  whereEdit.y += height;

  m_static4.Create(_T("Anything:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
    CRect(whereLabel, sizeLabel), this, (UINT)-1);
  m_static4.SetFont(m_pFont);
  whereLabel.y += height;
  m_edit4.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
    PES_ALL,
    CRect(whereEdit, sizeEdit), this, IDC_EDIT4);
  m_edit4.SetFont(m_pFont);
  whereEdit.y += height;

  // change the dialog height so everything fits
  int yBottom = whereEdit.y + height * 2; // extra space
  CRect rect;
  GetWindowRect(rect);
  VERIFY(SetWindowPos(NULL, -1, -1, rect.Width(), yBottom,
    SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOACTIVATE));

  // set focus to first one
  m_edit1.SetFocus();
  return FALSE;   // focus set
}

void CDerEditDlg::OnOK ( ) [virtual]

Definition at line 128 of file dertest.cpp.

{
#ifdef _DEBUG
  // dump results, normally you would do something with these
  CString s;
  m_edit1.GetWindowText(s);
  TRACE(_T("edit1 = '%s'\n"), s);
  m_edit2.GetWindowText(s);
  TRACE(_T("edit2 = '%s'\n"), s);
  m_edit3.GetWindowText(s);
  TRACE(_T("edit3 = '%s'\n"), s);
  m_edit4.GetWindowText(s);
  TRACE(_T("edit4 = '%s'\n"), s);
#endif

  EndDialog(IDOK);
}

void CDerEditDlg::OnSetFont ( CFont * pFont ) [inline]

Definition at line 30 of file dertest.cpp.

    : CDialog(CDerEditDlg::IDD)

Member Data Documentation

CParsedEdit CDerEditDlg::m_edit1 [protected]

Definition at line 20 of file dertest.cpp.

CParsedEdit CDerEditDlg::m_edit2 [protected]

Definition at line 20 of file dertest.cpp.

CParsedEdit CDerEditDlg::m_edit3 [protected]

Definition at line 20 of file dertest.cpp.

CParsedEdit CDerEditDlg::m_edit4 [protected]

Definition at line 20 of file dertest.cpp.

CFont* CDerEditDlg::m_pFont [protected]

Definition at line 18 of file dertest.cpp.

CStatic CDerEditDlg::m_static1 [protected]

Definition at line 21 of file dertest.cpp.

CStatic CDerEditDlg::m_static2 [protected]

Definition at line 21 of file dertest.cpp.

CStatic CDerEditDlg::m_static3 [protected]

Definition at line 21 of file dertest.cpp.

CStatic CDerEditDlg::m_static4 [protected]

Definition at line 21 of file dertest.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/dertest.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDesktopAlertDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDesktopAlertDemoApp Class Reference

#include "DesktopAlertDemo.h"

List of all members.

Public Member Functions

CDesktopAlertDemoApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 24 of file DesktopAlertDemo.h.

Constructor & Destructor Documentation

CDesktopAlertDemoApp::CDesktopAlertDemoApp ( )

Definition at line 31 of file DesktopAlertDemo.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDesktopAlertDemoApp::InitInstance ( ) [virtual]

Definition at line 45 of file DesktopAlertDemo.cpp.

{
  AfxEnableControlContainer();

  CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
  InitContextMenuManager();

  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
  LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  SetRegistryBase (_T("Settings"));

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  CDesktopAlertDemoDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int) dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/DesktopAlertDemo/DesktopAlertDemo.h
  • vc2008fp/DesktopAlertDemo/DesktopAlertDemo.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDesktopAlertDemoDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CDesktopAlertDemoDlg Class Reference

#include "DesktopAlertDemoDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_ALERT_DIALOG }

Public Member Functions

CDesktopAlertDemoDlg (CWnd *pParent=NULL)

Public Attributes

BOOL | m_bAutoClose
BOOL | m_bSmallCaption
int | m_nAnimation
int | m_nAnimationSpeed
int | m_nAutoCloseTime
int | m_nIcon
int | m_nPopupSource
int | m_nTransparency
int | m_nVisualMngr
CString | m_strAnimSpeed
CString | m_strAutoClose
CString | m_strLink
CString | m_strText
CString | m_strTransparency
CSliderCtrl | m_wndANimationSpeed
CSliderCtrl | m_wndAutoCloseTime
CIconComboBox m_wndIcons
CStatic | m_wndLabel1
CStatic | m_wndLabel2
CStatic | m_wndLabel3
CEdit | m_wndLink
CEdit | m_wndText
CSliderCtrl | m_wndTransparency

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
void | EnableControls (BOOL bEnable=TRUE)
void | EnableSourceControls ()
afx_msg void | OnAutoClose ()
afx_msg LRESULT | OnClosePopup (WPARAM, LPARAM)
afx_msg void | OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg void | OnPopupSource ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSelchangeAnimation ()
afx_msg void | OnSelchangeVisualMngr ()
afx_msg void | OnShow ()
afx_msg void | OnSmallCaption ()

Protected Attributes

HICON | m_hIcon
CMFCToolBarImages | m_Icons
CMFCToolBarImages | m_IconsSmall
CMenu | m_menuPopup
CPoint | m_ptPopup

Detailed Description

Definition at line 18 of file DesktopAlertDemoDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file DesktopAlertDemoDlg.h.

{ IDD = IDD_ALERT_DIALOG };

Constructor & Destructor Documentation

CDesktopAlertDemoDlg::CDesktopAlertDemoDlg ( CWnd * pParent = NULL )

Definition at line 27 of file DesktopAlertDemoDlg.cpp.

  : CDialogEx(CDesktopAlertDemoDlg::IDD, pParent),
  m_wndIcons (m_IconsSmall)
{
  m_nVisualMngr = 2;
  m_nAnimation = 3;
  m_nAnimationSpeed = 30;
  m_strAnimSpeed = _T("");
  m_nTransparency = 200;
  m_strTransparency = _T("");
  m_bSmallCaption = TRUE;
  m_nPopupSource = 0;
  m_nIcon = 2;
  m_strLink = _T("Click here to open");
  m_strText = _T("Type your message text here");
  m_nAutoCloseTime = 0;
  m_strAutoClose = _T("");
  m_bAutoClose = FALSE;

  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  m_ptPopup = CPoint (-1, -1);
}

Member Function Documentation

void CDesktopAlertDemoDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 51 of file DesktopAlertDemoDlg.cpp.

{
  CDialogEx::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_AUTOCLOSE_TIME, m_wndAutoCloseTime);
  DDX_Control(pDX, IDC_TEXT, m_wndText);
  DDX_Control(pDX, IDC_LINK, m_wndLink);
  DDX_Control(pDX, IDC_URL_LABEL, m_wndLabel3);
  DDX_Control(pDX, IDC_TEXT_LABEL, m_wndLabel2);
  DDX_Control(pDX, IDC_ICON_LABEL, m_wndLabel1);
  DDX_Control(pDX, IDC_ICONS, m_wndIcons);
  DDX_Control(pDX, IDC_TRANSP, m_wndTransparency);
  DDX_Control(pDX, IDC_ANIM_SPEED, m_wndANimationSpeed);
  DDX_CBIndex(pDX, IDC_VISUAL_MNGR, m_nVisualMngr);
  DDX_CBIndex(pDX, IDC_ANIMATION, m_nAnimation);
  DDX_Slider(pDX, IDC_ANIM_SPEED, m_nAnimationSpeed);
  DDX_Text(pDX, IDC_ANIM_SPEED_VAL, m_strAnimSpeed);
  DDX_Slider(pDX, IDC_TRANSP, m_nTransparency);
  DDX_Text(pDX, IDC_TRANSP_VAL, m_strTransparency);
  DDX_Check(pDX, IDC_SMALL_CAPTION, m_bSmallCaption);
  DDX_Radio(pDX, IDC_POPUP_SOURCE, m_nPopupSource);
  DDX_CBIndex(pDX, IDC_ICONS, m_nIcon);
  DDX_Text(pDX, IDC_LINK, m_strLink);
  DDX_Text(pDX, IDC_TEXT, m_strText);
  DDX_Slider(pDX, IDC_AUTOCLOSE_TIME, m_nAutoCloseTime);
  DDX_Text(pDX, IDC_AUTOCLOSE_VAL, m_strAutoClose);
  DDX_Check(pDX, IDC_AUTO_CLOSE, m_bAutoClose);
}

void CDesktopAlertDemoDlg::EnableControls ( BOOL bEnable = TRUE ) [protected]

Definition at line 268 of file DesktopAlertDemoDlg.cpp.

{
  CWnd* pWndChild = GetWindow (GW_CHILD);

  while (pWndChild != NULL)
  {
    ASSERT_VALID (pWndChild);
    pWndChild->EnableWindow (bEnable);
    pWndChild = pWndChild->GetNextWindow ();
  }

  if (bEnable)
  {
    EnableSourceControls ();
  }
}

void CDesktopAlertDemoDlg::EnableSourceControls ( ) [protected]

Definition at line 395 of file DesktopAlertDemoDlg.cpp.

{
  BOOL bEnable = m_nPopupSource != 0;

  m_wndText.EnableWindow (bEnable);
  m_wndLink.EnableWindow (bEnable);
  m_wndLabel3.EnableWindow (bEnable);
  m_wndLabel2.EnableWindow (bEnable);
  m_wndLabel1.EnableWindow (bEnable);
  m_wndIcons.EnableWindow (bEnable);
}

void CDesktopAlertDemoDlg::OnAutoClose ( ) [protected]

Definition at line 407 of file DesktopAlertDemoDlg.cpp.

{
  UpdateData ();

  m_wndAutoCloseTime.EnableWindow (m_bAutoClose);
  theApp.WriteInt (_T("AutoClose"), m_bAutoClose ? m_nAutoCloseTime : 0);
}

LRESULT CDesktopAlertDemoDlg::OnClosePopup | ( | WPARAM | ,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 257 of file DesktopAlertDemoDlg.cpp.

{
  CMFCDesktopAlertWnd* pPopup = (CMFCDesktopAlertWnd*) lp;
  ASSERT_VALID (pPopup);

  m_ptPopup = pPopup->GetLastPos ();

  EnableControls ();
  return 0;
}

void CDesktopAlertDemoDlg::OnHScroll | ( | UINT | nSBCode,
 |  | UINT | nPos,
 |  | CScrollBar * | pScrollBar |
 | ) |  |  | [protected]

Definition at line 363 of file DesktopAlertDemoDlg.cpp.

{
  CDialogEx::OnHScroll(nSBCode, nPos, pScrollBar);

  UpdateData ();

  theApp.WriteInt (_T("AnimationSpeed"), m_nAnimationSpeed);
  m_strAnimSpeed.Format (_T("%d"), m_nAnimationSpeed);

  theApp.WriteInt (_T("Transparency"), m_nTransparency);
  m_strTransparency.Format (_T("%d"), m_nTransparency);

  theApp.WriteInt (_T("AutoClose"), m_bAutoClose ? m_nAutoCloseTime : 0);
  m_strAutoClose.Format (_T("%d"), m_nAutoCloseTime);

  UpdateData (FALSE);
}

BOOL CDesktopAlertDemoDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 96 of file DesktopAlertDemoDlg.cpp.

{
  CDialogEx::OnInitDialog();

  CMFCToolBar::AddToolBarForImageCollection (IDR_TOOLBAR1, IDB_MENUIMAGES);

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  m_wndANimationSpeed.SetRange (1, 100);
  m_wndTransparency.SetRange (10, 255);
  m_wndAutoCloseTime.SetRange (1, 5);

  m_nVisualMngr = theApp.GetInt (_T("VisualManager"), 2);
  m_nAnimation = theApp.GetInt (_T("AnimationType"), 3);
  m_nAnimationSpeed = theApp.GetInt (_T("AnimationSpeed"), 30);
  m_nTransparency = theApp.GetInt (_T("Transparency"), 200);
  m_bSmallCaption = theApp.GetInt (_T("SmallCaption"), TRUE);
  m_nPopupSource = theApp.GetInt (_T("PopupSource"), 0);

  m_strAnimSpeed.Format (_T("%d"), m_nAnimationSpeed);
  m_strTransparency.Format (_T("%d"), m_nTransparency);

  m_nAutoCloseTime = theApp.GetInt (_T("AutoClose"), 3);
  m_bAutoClose = m_nAutoCloseTime > 0;

  if (m_nAutoCloseTime == 0)
  {
    m_nAutoCloseTime = 3;
  }

  m_strAutoClose.Format (_T("%d"), m_nAutoCloseTime);

  m_wndAutoCloseTime.EnableWindow (m_bAutoClose);

  m_Icons.SetImageSize (CSize (32, 32));
  m_Icons.Load (IDB_ICONS);

  m_IconsSmall.SetImageSize (CSize (16, 16));
  m_IconsSmall.Load (IDB_ICONS_SMALL);

  for (int i = 0; i <= m_Icons.GetCount (); i++)
  {
    CString strText;

    if (i == 0)
    {
      strText = _T("No icon");
    }
    else
    {
      strText.Format (_T("Icon %d"), i);
    }

    m_wndIcons.AddString (strText);
  }

  UpdateData (FALSE);

  OnSelchangeVisualMngr();
  EnableSourceControls ();

  m_menuPopup.LoadMenu (IDR_POPUP);

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CDesktopAlertDemoDlg::OnPaint ( ) [protected]

Definition at line 169 of file DesktopAlertDemoDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialogEx::OnPaint();
  }
}

void CDesktopAlertDemoDlg::OnPopupSource ( ) [protected]

Definition at line 387 of file DesktopAlertDemoDlg.cpp.

{
  UpdateData ();
  theApp.WriteInt (_T("PopupSource"), m_nPopupSource);

  EnableSourceControls ();
}

HCURSOR CDesktopAlertDemoDlg::OnQueryDragIcon ( ) [protected]

Definition at line 196 of file DesktopAlertDemoDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CDesktopAlertDemoDlg::OnSelchangeAnimation ( ) [protected]

Definition at line 357 of file DesktopAlertDemoDlg.cpp.

{
  UpdateData ();
  theApp.WriteInt (_T("AnimationType"), m_nAnimation);
}

void CDesktopAlertDemoDlg::OnSelchangeVisualMngr ( ) [protected]

Definition at line 285 of file DesktopAlertDemoDlg.cpp.

{
  int nPrevVisualMngr = m_nVisualMngr;

  UpdateData ();

  switch (m_nVisualMngr)
  {
  case 0:
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
    break;

  case 1:
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
    break;

  case 2:
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
    break;

  case 3:
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
    break;

  case 4:
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
    break;

  case 5:
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMSNVisualManager));
    break;

  case 6:
    CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
    break;

  case 7:
    CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
    break;

  case 8:
    CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
    break;

  case 9:
    CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
    CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
    break;
  }

  if (nPrevVisualMngr == 5 && !m_bSmallCaption)
  {
    m_bSmallCaption = TRUE;

    UpdateData (FALSE);
    OnSmallCaption();
  }

  if (m_nVisualMngr == 5 && m_bSmallCaption)
  {
    m_bSmallCaption = FALSE;

    UpdateData (FALSE);
    OnSmallCaption();
  }

  theApp.WriteInt (_T("VisualManager"), m_nVisualMngr);
}

void CDesktopAlertDemoDlg::OnShow ( ) [protected]

Definition at line 201 of file DesktopAlertDemoDlg.cpp.

{
  UpdateData ();

  CMFCDesktopAlertWnd* pPopup = new CMFCDesktopAlertWnd;

  pPopup->SetAnimationType ((CMFCPopupMenu::ANIMATION_TYPE) m_nAnimation);
  pPopup->SetAnimationSpeed (m_nAnimationSpeed);
  pPopup->SetTransparency ((BYTE)m_nTransparency);
  pPopup->SetSmallCaption (m_bSmallCaption);
  pPopup->SetAutoCloseTime (m_bAutoClose ? m_nAutoCloseTime * 1000 : 0);

  if (m_nPopupSource == 0)
  {
    if (m_nVisualMngr == 5) // MSN-style
    {
      pPopup->Create (this, IDD_DIALOG2, NULL,
        m_ptPopup, RUNTIME_CLASS (CMSNDlg));
    }
    else
    {
      pPopup->Create (this, IDD_DIALOG1,
        m_menuPopup.GetSubMenu (0)->GetSafeHmenu (),
        m_ptPopup, RUNTIME_CLASS (CMyPopupDlg));
    }
  }
  else
  {
    // Create indirect:
    CMFCDesktopAlertWndInfo params;

    if (m_nIcon > 0)
    {
      params.m_hIcon = m_Icons.ExtractIcon (m_nIcon - 1);
    }
    if(m_strText.IsEmpty() && m_strLink.IsEmpty())
    {
      m_strText = _T(" ");
    }
    params.m_strText = m_strText;
    params.m_strURL = m_strLink;
    params.m_nURLCmdID = 101;

    pPopup->Create (this, params, NULL, m_ptPopup);
  }

  HICON hIcon = (HICON) ::LoadImage (::AfxGetResourceHandle (),
    MAKEINTRESOURCE (IDR_MAINFRAME),
        IMAGE_ICON, ::GetSystemMetrics (SM_CXSMICON), ::GetSystemMetrics (SM_CYSMICON), 0);

  pPopup->SetIcon (hIcon, FALSE);
  pPopup->SetWindowText (_T("Message"));

  EnableControls (FALSE);
}

void CDesktopAlertDemoDlg::OnSmallCaption ( ) [protected]

Definition at line 381 of file DesktopAlertDemoDlg.cpp.

{
  UpdateData ();
  theApp.WriteInt (_T("SmallCaption"), m_bSmallCaption);
}

Member Data Documentation

BOOL CDesktopAlertDemoDlg::m_bAutoClose

Definition at line 48 of file DesktopAlertDemoDlg.h.

BOOL CDesktopAlertDemoDlg::m_bSmallCaption

Definition at line 41 of file DesktopAlertDemoDlg.h.

HICON CDesktopAlertDemoDlg::m_hIcon [protected]

Definition at line 56 of file DesktopAlertDemoDlg.h.

CMFCToolBarImages CDesktopAlertDemoDlg::m_Icons [protected]

Definition at line 59 of file DesktopAlertDemoDlg.h.

CMFCToolBarImages CDesktopAlertDemoDlg::m_IconsSmall [protected]

Definition at line 60 of file DesktopAlertDemoDlg.h.

CMenu CDesktopAlertDemoDlg::m_menuPopup [protected]

Definition at line 57 of file DesktopAlertDemoDlg.h.

int CDesktopAlertDemoDlg::m_nAnimation

Definition at line 36 of file DesktopAlertDemoDlg.h.

int CDesktopAlertDemoDlg::m_nAnimationSpeed

Definition at line 37 of file DesktopAlertDemoDlg.h.

int CDesktopAlertDemoDlg::m_nAutoCloseTime

Definition at line 46 of file DesktopAlertDemoDlg.h.

int CDesktopAlertDemoDlg::m_nIcon

Definition at line 43 of file DesktopAlertDemoDlg.h.

int CDesktopAlertDemoDlg::m_nPopupSource

Definition at line 42 of file DesktopAlertDemoDlg.h.

int CDesktopAlertDemoDlg::m_nTransparency

Definition at line 39 of file DesktopAlertDemoDlg.h.

int CDesktopAlertDemoDlg::m_nVisualMngr

Definition at line 35 of file DesktopAlertDemoDlg.h.

CPoint CDesktopAlertDemoDlg::m_ptPopup [protected]

Definition at line 58 of file DesktopAlertDemoDlg.h.

CString CDesktopAlertDemoDlg::m_strAnimSpeed

Definition at line 38 of file DesktopAlertDemoDlg.h.

CString CDesktopAlertDemoDlg::m_strAutoClose

Definition at line 47 of file DesktopAlertDemoDlg.h.

CString CDesktopAlertDemoDlg::m_strLink

Definition at line 44 of file DesktopAlertDemoDlg.h.

CString CDesktopAlertDemoDlg::m_strText

Definition at line 45 of file DesktopAlertDemoDlg.h.

CString CDesktopAlertDemoDlg::m_strTransparency

Definition at line 40 of file DesktopAlertDemoDlg.h.

CSliderCtrl CDesktopAlertDemoDlg::m_wndANimationSpeed

Definition at line 34 of file DesktopAlertDemoDlg.h.

CSliderCtrl CDesktopAlertDemoDlg::m_wndAutoCloseTime

Definition at line 26 of file DesktopAlertDemoDlg.h.

CIconComboBox CDesktopAlertDemoDlg::m_wndIcons

Definition at line 32 of file DesktopAlertDemoDlg.h.

CStatic CDesktopAlertDemoDlg::m_wndLabel1

Definition at line 31 of file DesktopAlertDemoDlg.h.

CStatic CDesktopAlertDemoDlg::m_wndLabel2

Definition at line 30 of file DesktopAlertDemoDlg.h.

CStatic CDesktopAlertDemoDlg::m_wndLabel3

Definition at line 29 of file DesktopAlertDemoDlg.h.

CEdit CDesktopAlertDemoDlg::m_wndLink

Definition at line 28 of file DesktopAlertDemoDlg.h.

CEdit CDesktopAlertDemoDlg::m_wndText

Definition at line 27 of file DesktopAlertDemoDlg.h.

CSliderCtrl CDesktopAlertDemoDlg::m_wndTransparency

Definition at line 33 of file DesktopAlertDemoDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.h
  • vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDHtmlExploreApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDHtmlExploreApp Class Reference

#include "DHtmlExplore.h"

List of all members.

Public Member Functions

CDHtmlExploreApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 24 of file DHtmlExplore.h.

Constructor & Destructor Documentation

CDHtmlExploreApp::CDHtmlExploreApp ( )

Definition at line 35 of file DHtmlExplore.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDHtmlExploreApp::InitInstance ( ) [virtual]

Definition at line 49 of file DHtmlExplore.cpp.

{
  AfxEnableControlContainer();

  CDHtmlExploreDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int)dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • internet/DHtmlExplore/DHtmlExplore.h
  • internet/DHtmlExplore/DHtmlExplore.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDHtmlExploreDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CDHtmlExploreDlg Class Reference

#include "DHtmlExploreDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_DHTMLEXPLORE_DIALOG }

Public Member Functions

CDHtmlExploreDlg (CWnd *pParent=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
HRESULT | OnBrowse (IHTMLElement *phtmlElement)
HRESULT | OnClickFile (IHTMLElement *phtmlElement)
HRESULT | OnClickFolder (IHTMLElement *phtmlElement)
afx_msg void | OnContextBrowse ()
afx_msg void | OnContextExit ()
afx_msg void | OnContextProperties ()
void | OnDocumentComplete (LPDISPATCH pDisp, LPCTSTR szUrl)
virtual BOOL | OnInitDialog ()
HRESULT | OnMouseOutElement (IHTMLElement *phtmlElement)
HRESULT | OnMouseOverElement (IHTMLElement *phtmlElement)
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)
void | RefreshDir ()
HRESULT STDMETHODCALLTYPE | ShowContextMenu (DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)

Protected Attributes

HICON | m_hIcon
CComPtr< IHTMLElement > | m_spCurrElement
CString | m_strCtxFileName
CString | m_strCurrDir

Detailed Description

Definition at line 16 of file DHtmlExploreDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file DHtmlExploreDlg.h.

{ IDD = IDD_DHTMLEXPLORE_DIALOG };

Constructor & Destructor Documentation

CDHtmlExploreDlg::CDHtmlExploreDlg ( CWnd * pParent = NULL )

Definition at line 70 of file DHtmlExploreDlg.cpp.

  : CDHtmlDialog(CDHtmlExploreDlg::IDD, 0, pParent)
{
  //{{AFX_DATA_INIT(CDHtmlExploreDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CDHtmlExploreDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 80 of file DHtmlExploreDlg.cpp.

{
  CDHtmlDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDHtmlExploreDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
  DDX_DHtml_ElementInnerText(pDX, _T("currDir"), m_strCurrDir);
}

HRESULT CDHtmlExploreDlg::OnBrowse ( IHTMLElement * phtmlElement ) [protected]

Definition at line 261 of file DHtmlExploreDlg.cpp.

{
  BROWSEINFO bi;
  TCHAR szDisplayName[MAX_PATH];
  memset(&bi, 0x00, sizeof(bi));
  bi.hwndOwner = m_hWnd;
  bi.pszDisplayName = szDisplayName;
  bi.ulFlags = BIF_RETURNONLYFSDIRS;
  LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
  if (pidl)
  {
    SHGetPathFromIDList(pidl, szDisplayName);
    SetCurrentDirectory(szDisplayName);
    RefreshDir();

    // free the pidl
    CComPtr<IMalloc> spSHMalloc;
    if(FAILED(SHGetMalloc(&spSHMalloc)))
    {
      return S_FALSE;
    }
    if (spSHMalloc != NULL)
      spSHMalloc->Free(pidl);
  }

  return S_OK;
}

HRESULT CDHtmlExploreDlg::OnClickFile ( IHTMLElement * phtmlElement ) [protected]

Definition at line 338 of file DHtmlExploreDlg.cpp.

{
  CComBSTR bstr;
  phtmlElement->get_innerText(&bstr);
  if (bstr)
  {
    CString strFullPath;
    strFullPath = m_strCurrDir + _T("\\") + CString(bstr);
    ShellExecute(NULL, NULL, strFullPath, NULL, NULL, SW_SHOWNORMAL);
  }
  return S_OK;
}

HRESULT CDHtmlExploreDlg::OnClickFolder ( IHTMLElement * phtmlElement ) [protected]

Definition at line 324 of file DHtmlExploreDlg.cpp.

{
  CComBSTR bstr;
  phtmlElement->get_innerText(&bstr);
  if (bstr)
  {
    CString strNewDir;
    strNewDir = m_strCurrDir + _T("\\") + CString(bstr);
    SetCurrentDirectory(strNewDir);
    RefreshDir();
  }
  return S_OK;
}

void CDHtmlExploreDlg::OnContextBrowse ( ) [protected]

Definition at line 372 of file DHtmlExploreDlg.cpp.

{
  // TODO: Add your command handler code here
  OnBrowse(NULL);
}

void CDHtmlExploreDlg::OnContextExit ( ) [protected]

Definition at line 378 of file DHtmlExploreDlg.cpp.

{
  // TODO: Add your command handler code here
  EndDialog(IDOK);
}

void CDHtmlExploreDlg::OnContextProperties ( ) [protected]

Definition at line 384 of file DHtmlExploreDlg.cpp.

{
  // TODO: Add your command handler code here
  ASSERT(!m_strCtxFileName.IsEmpty());
  CPropertiesDlg dlg;
  dlg.m_strFileName = m_strCurrDir + _T("\\") + m_strCtxFileName;
  dlg.DoModal();
}

void CDHtmlExploreDlg::OnDocumentComplete | ( | LPDISPATCH | pDisp,
 |  | LPCTSTR | szUrl |
 | ) |  |  | [protected]

Definition at line 200 of file DHtmlExploreDlg.cpp.

{
  CDHtmlDialog::OnDocumentComplete(pDisp, szUrl);
  RefreshDir();
}

BOOL CDHtmlExploreDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 116 of file DHtmlExploreDlg.cpp.

{
  SetHostFlags(DOCHOSTUIFLAG_FLAT_SCROLLBAR);

  CDHtmlDialog::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  if (pSysMenu != NULL)
  {
    CString strAboutMenu;
    strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // TODO: Add extra initialization here
  LoadFromResource(IDR_EXPLORE);

  return TRUE;  // return TRUE  unless you set the focus to a control
}

HRESULT CDHtmlExploreDlg::OnMouseOutElement ( IHTMLElement * phtmlElement ) [protected]

Definition at line 307 of file DHtmlExploreDlg.cpp.

{
  IHTMLStyle *phtmlStyle;
  phtmlElement->get_style(&phtmlStyle);
  if (phtmlStyle)
  {
    VARIANT varColor;
    varColor.vt = VT_I4;
    varColor.lVal = 0x000000;
    phtmlStyle->put_textDecorationUnderline(VARIANT_FALSE);
    phtmlStyle->put_color(varColor);
    phtmlStyle->Release();
  }
  m_spCurrElement = NULL;
  return S_OK;
}

HRESULT CDHtmlExploreDlg::OnMouseOverElement ( IHTMLElement * phtmlElement ) [protected]

Definition at line 289 of file DHtmlExploreDlg.cpp.

{
  IHTMLStyle *phtmlStyle;
  phtmlElement->get_style(&phtmlStyle);
  if (phtmlStyle)
  {
    VARIANT varColor;
    varColor.vt = VT_I4;
    varColor.lVal = 0xff0000;
    phtmlStyle->put_textDecorationUnderline(VARIANT_TRUE);
    phtmlStyle->put_color(varColor);
    phtmlStyle->put_cursor(L"hand");
    phtmlStyle->Release();
  }
  m_spCurrElement = phtmlElement;
  return S_OK;
}

void CDHtmlExploreDlg::OnPaint ( ) [protected]

Definition at line 168 of file DHtmlExploreDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDHtmlDialog::OnPaint();
  }
}

HCURSOR CDHtmlExploreDlg::OnQueryDragIcon ( ) [protected]

Definition at line 195 of file DHtmlExploreDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CDHtmlExploreDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 151 of file DHtmlExploreDlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDHtmlDialog::OnSysCommand(nID, lParam);
  }
}

void CDHtmlExploreDlg::RefreshDir ( ) [protected]

Definition at line 206 of file DHtmlExploreDlg.cpp.

{
  CTempBuffer<TCHAR, MAX_PATH> strBuffer(MAX_PATH);
  strBuffer[0] = _T('\0');
  DWORD length = GetCurrentDirectory(MAX_PATH, strBuffer);

  if (length > MAX_PATH)
  {
    // We need to reallocate the string => MAX_PATH wasn't space enough.
    strBuffer.Reallocate(length);
    strBuffer[0] = _T('\0');
    GetCurrentDirectory(length, strBuffer);
  }

  m_strCurrDir = strBuffer;
  UpdateData(FALSE);

  CString strTable;
  strTable = _T("<TABLE border=1 cols=4 width=100%>\n")
    _T("<THEAD><TR><TD width=20>&nbsp;</TD><TD>File Name</TD><TD>Size</TD><TD>Modified</TD></TR></THEAD>");

  // recreate the filelist table
  CComPtr<IHTMLElement> spfileList;
  GetElementInterface(_T("fileList"), IID_IHTMLElement, (void **) &spfileList);

  if (spfileList == NULL)
    return;

  CString strFilter = m_strCurrDir + _T("\\*.*");
  WIN32_FIND_DATA finddata;
  HANDLE hFind = FindFirstFile(strFilter, &finddata);
  if (hFind==INVALID_HANDLE_VALUE)
    return;
  CWaitCursor cur;
  CString str, strDate;

  do
  {

    CTime t(finddata.ftLastWriteTime);
    strDate = t.Format(_T("%A, %B %d, %Y"));

    str.Format(_T("<TR><TD width=20><IMG src=%s.gif></TD><TD><SPAN class=%s>%s</SPAN></TD><TD>%lu</TD><TD>%s</TD></TR>"),
      ((finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _T("folder") : _T("file")),
      ((finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _T("folder") : _T("file")),
      finddata.cFileName, finddata.nFileSizeLow, (LPCTSTR) strDate);
    strTable += str;
  } while (FindNextFile(hFind, &finddata));
  strTable += _T("</TABLE>");
  FindClose(hFind);
  CComBSTR bstrTable = strTable;
  spfileList->put_innerHTML(bstrTable);
}

HRESULT STDMETHODCALLTYPE CDHtmlExploreDlg::ShowContextMenu | ( | DWORD | dwID,
 |  | POINT * | ppt,
 |  | IUnknown * | pcmdtReserved,
 |  | IDispatch * | pdispReserved |
 | ) |  |  | [protected]

Definition at line 351 of file DHtmlExploreDlg.cpp.

{
  CMenu ctxMenu;

  m_strCtxFileName.Empty();
  if (m_spCurrElement != NULL)
  {

    CComBSTR bstrFileName;
    m_spCurrElement->get_innerText(&bstrFileName);
    if (bstrFileName)
      m_strCtxFileName = bstrFileName;
  }
  ctxMenu.LoadMenu(IDR_CONTEXT_MENU);

  ctxMenu.GetSubMenu(0)->EnableMenuItem(ID_CONTEXT_PROPERTIES, MF_BYCOMMAND |
    ((m_spCurrElement==NULL) ? MF_GRAYED : MF_ENABLED));
  ctxMenu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN, ppt->x, ppt->y, this, NULL);
  return S_OK;
}

Member Data Documentation

HICON CDHtmlExploreDlg::m_hIcon [protected]

Definition at line 50 of file DHtmlExploreDlg.h.

CComPtr<IHTMLElement> CDHtmlExploreDlg::m_spCurrElement [protected]

Definition at line 45 of file DHtmlExploreDlg.h.

CString CDHtmlExploreDlg::m_strCtxFileName [protected]

Definition at line 46 of file DHtmlExploreDlg.h.

CString CDHtmlExploreDlg::m_strCurrDir [protected]

Definition at line 35 of file DHtmlExploreDlg.h.

The documentation for this class was generated from the following files:
  • internet/DHtmlExplore/DHtmlExploreDlg.h
  • internet/DHtmlExplore/DHtmlExploreDlg.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDialogItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes

CDialogItem Class Reference

#include "itemtemp.h"

List of all members.

Public Types

enum | controltype { BUTTON = 0x0080, EDITCONTROL, STATICTEXT }

Public Member Functions

CDialogItem (enum controltype cType)
CDialogItem ()
void | Initialize (enum controltype cType, UINT nID, CRect *prect=NULL, LPCTSTR pszCaption=NULL)

Public Attributes

controltype m_controltype
DLGITEMTEMPLATE | m_dlgItemTemplate
CString | m_strCaption

Detailed Description

Definition at line 28 of file itemtemp.h.

Member Enumeration Documentation

enum CDialogItem::controltype
Enumerator:
BUTTON
EDITCONTROL
STATICTEXT

Definition at line 35 of file itemtemp.h.

{BUTTON = 0x0080, EDITCONTROL, STATICTEXT};

Constructor & Destructor Documentation

CDialogItem::CDialogItem ( enum controltype cType )

Definition at line 167 of file itemtemp.cpp.

{
  m_controltype = ctrlType;
}

CDialogItem::CDialogItem ( ) [inline]

Definition at line 41 of file itemtemp.h.

{};  // default constructor, not to be called directly

Member Function Documentation

void CDialogItem::Initialize | ( | enum controltype | cType,
 |  | UINT | nID,
 |  | CRect * | prect = NULL,
 |  | LPCTSTR | pszCaption = NULL
 | ) |  |

Definition at line 173 of file itemtemp.cpp.

{
  // first fill in the type, location and size of the control
  m_controltype = ctrltype;
  if (prect != NULL)
  {
    // disable warning on conversion from long to short
#pragma warning(disable : 4244)
    m_dlgItemTemplate.x = prect->left;
    m_dlgItemTemplate.y = prect->top;
    m_dlgItemTemplate.cx = prect->Width();
    m_dlgItemTemplate.cy = prect->Height();
#pragma warning(default : 4244)
  }
  else
  {
    m_dlgItemTemplate.x = 0;
    m_dlgItemTemplate.y = 0;
    m_dlgItemTemplate.cx = 10;  // some useless default
    m_dlgItemTemplate.cy = 10;
  }
#pragma warning(disable : 4244)
  m_dlgItemTemplate.dwExtendedStyle = 0;
  m_dlgItemTemplate.id = nID;
#pragma warning(default : 4244)

  // the styles below are hard coded.  In a real life application you might want to use variables to
  // define the sytle.
  switch(m_controltype)
  {
  case BUTTON:
    m_dlgItemTemplate.style = WS_CAPTION | WS_VISIBLE | WS_CHILD | WS_TABSTOP | BS_PUSHBUTTON;
    break;
  case EDITCONTROL:
    m_dlgItemTemplate.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | ES_LEFT;
    break;
  case STATICTEXT:
    m_dlgItemTemplate.style = WS_CHILD | WS_VISIBLE | SS_LEFT;
    break;
  default:
    ASSERT(FALSE);  // should never get here, anyway.
  }

  m_strCaption = (lpszCaption != NULL)? lpszCaption : _T("");
}

Member Data Documentation

controltype CDialogItem::m_controltype

Definition at line 36 of file itemtemp.h.

DLGITEMTEMPLATE CDialogItem::m_dlgItemTemplate

Definition at line 33 of file itemtemp.h.

CString CDialogItem::m_strCaption

Definition at line 37 of file itemtemp.h.

The documentation for this class was generated from the following files:
  • general/dlgtempl/itemtemp.h
  • general/dlgtempl/itemtemp.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDibDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CDibDoc Class Reference

#include "dibdoc.h"

List of all members.

Public Member Functions

CPalette * | GetDocPalette () const
CSize | GetDocSize () const
HDIB | GetHDIB () const
void | InitDIBData ()
void | ReplaceHDIB (HDIB hDIB)

Protected Member Functions

CDibDoc ()
virtual | ~CDibDoc ()
virtual BOOL | OnNewDocument ()
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual BOOL | OnSaveDocument (LPCTSTR lpszPathName)

Protected Attributes

HDIB | m_hDIB
CPalette * | m_palDIB
CSize | m_sizeDoc

Detailed Description

Definition at line 14 of file dibdoc.h.

Constructor & Destructor Documentation

CDibDoc::CDibDoc ( ) [protected]

Definition at line 36 of file dibdoc.cpp.

{
  m_hDIB = NULL;
  m_palDIB = NULL;
  m_sizeDoc = CSize(1,1);     // dummy value to make CScrollView happy
}

CDibDoc::~CDibDoc ( ) [protected, virtual]

Definition at line 43 of file dibdoc.cpp.

{
  if (m_hDIB != NULL)
  {
    ::GlobalFree((HGLOBAL) m_hDIB);
  }
  if (m_palDIB != NULL)
  {
    delete m_palDIB;
  }
}

Member Function Documentation

CPalette* CDibDoc::GetDocPalette ( ) const [inline]

Definition at line 24 of file dibdoc.h.

    { return m_palDIB; }

CSize CDibDoc::GetDocSize ( ) const [inline]

Definition at line 26 of file dibdoc.h.

    { return m_sizeDoc; }

HDIB CDibDoc::GetHDIB ( ) const [inline]

Definition at line 22 of file dibdoc.h.

    { return m_hDIB; }

void CDibDoc::InitDIBData ( )

Definition at line 62 of file dibdoc.cpp.

{
  if (m_palDIB != NULL)
  {
    delete m_palDIB;
    m_palDIB = NULL;
  }
  if (m_hDIB == NULL)
  {
    return;
  }
  // Set up document size
  LPSTR lpDIB = (LPSTR) ::GlobalLock((HGLOBAL) m_hDIB);
  if (::DIBWidth(lpDIB) > INT_MAX ||::DIBHeight(lpDIB) > INT_MAX)
  {
    ::GlobalUnlock((HGLOBAL) m_hDIB);
    ::GlobalFree((HGLOBAL) m_hDIB);
    m_hDIB = NULL;
    CString strMsg;
    strMsg.LoadString(IDS_DIB_TOO_BIG);
    MessageBox(NULL, strMsg, NULL, MB_ICONINFORMATION | MB_OK);
    return;
  }
  m_sizeDoc = CSize((int) ::DIBWidth(lpDIB), (int) ::DIBHeight(lpDIB));
  ::GlobalUnlock((HGLOBAL) m_hDIB);
  // Create copy of palette
  m_palDIB = new CPalette;
  if (m_palDIB == NULL)
  {
    // we must be really low on memory
    ::GlobalFree((HGLOBAL) m_hDIB);
    m_hDIB = NULL;
    return;
  }
  if (::CreateDIBPalette(m_hDIB, m_palDIB) == NULL)
  {
    // DIB may not have a palette
    delete m_palDIB;
    m_palDIB = NULL;
    return;
  }
}

BOOL CDibDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 55 of file dibdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;
  return TRUE;
}

BOOL CDibDoc::OnOpenDocument ( LPCTSTR lpszPathName ) [protected, virtual]

Definition at line 106 of file dibdoc.cpp.

{
  CFile file;
  CFileException fe;
  if (!file.Open(lpszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
  {
    ReportSaveLoadException(lpszPathName, &fe,
      FALSE, AFX_IDP_FAILED_TO_OPEN_DOC);
    return FALSE;
  }

  DeleteContents();
  BeginWaitCursor();

  // replace calls to Serialize with ReadDIBFile function
  TRY
  {
    m_hDIB = ::ReadDIBFile(file);
  }
  CATCH (CFileException, eLoad)
  {
    file.Abort(); // will not throw an exception
    EndWaitCursor();
    ReportSaveLoadException(lpszPathName, eLoad,
      FALSE, AFX_IDP_FAILED_TO_OPEN_DOC);
    m_hDIB = NULL;
    return FALSE;
  }
  END_CATCH

  InitDIBData();
  EndWaitCursor();

  if (m_hDIB == NULL)
  {
    // may not be DIB format
    CString strMsg;
    strMsg.LoadString(IDS_CANNOT_LOAD_DIB);
    MessageBox(NULL, strMsg, NULL, MB_ICONINFORMATION | MB_OK);
    return FALSE;
  }
  SetPathName(lpszPathName);
  SetModifiedFlag(FALSE);     // start off with unmodified
  return TRUE;
}

BOOL CDibDoc::OnSaveDocument ( LPCTSTR lpszPathName ) [protected, virtual]

Definition at line 153 of file dibdoc.cpp.

{
  CFile file;
  CFileException fe;

  if (!file.Open(lpszPathName, CFile::modeCreate |
    CFile::modeReadWrite | CFile::shareExclusive, &fe))
  {
    ReportSaveLoadException(lpszPathName, &fe,
      TRUE, AFX_IDP_INVALID_FILENAME);
    return FALSE;
  }

  // replace calls to Serialize with SaveDIB function
  BOOL bSuccess = FALSE;
  TRY
  {
    BeginWaitCursor();
    bSuccess = ::SaveDIB(m_hDIB, file);
    file.Close();
  }
  CATCH (CException, eSave)
  {
    file.Abort(); // will not throw an exception
    EndWaitCursor();
    ReportSaveLoadException(lpszPathName, eSave,
      TRUE, AFX_IDP_FAILED_TO_SAVE_DOC);
    return FALSE;
  }
  END_CATCH

  EndWaitCursor();
  SetModifiedFlag(FALSE);     // back to unmodified

  if (!bSuccess)
  {
    // may be other-style DIB (load supported but not save)
    //  or other problem in SaveDIB
    CString strMsg;
    strMsg.LoadString(IDS_CANNOT_SAVE_DIB);
    MessageBox(NULL, strMsg, NULL, MB_ICONINFORMATION | MB_OK);
  }

  return bSuccess;
}

void CDibDoc::ReplaceHDIB ( HDIB hDIB )

Definition at line 199 of file dibdoc.cpp.

{
  if (m_hDIB != NULL)
  {
    ::GlobalFree((HGLOBAL) m_hDIB);
  }
  m_hDIB = hDIB;
}

Member Data Documentation

HDIB CDibDoc::m_hDIB [protected]

Definition at line 42 of file dibdoc.h.

CPalette* CDibDoc::m_palDIB [protected]

Definition at line 43 of file dibdoc.h.

CSize CDibDoc::m_sizeDoc [protected]

Definition at line 44 of file dibdoc.h.

The documentation for this class was generated from the following files:
  • general/diblook/dibdoc.h
  • general/diblook/dibdoc.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDibLookApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDibLookApp Class Reference

#include "diblook.h"

List of all members.

Public Member Functions

CDibLookApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 25 of file diblook.h.

Constructor & Destructor Documentation

CDibLookApp::CDibLookApp ( )

Definition at line 42 of file diblook.cpp.

{
}

Member Function Documentation

BOOL CDibLookApp::InitInstance ( ) [virtual]

Definition at line 54 of file diblook.cpp.

{
  // Standard initialization
  //  (if you are not using these features and wish to reduce the size
  // of your final executable, you should remove the following initialization

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register document templates which serve as connection between
  //  documents and views.  Views are contained in the specified view

  AddDocTemplate(new CMultiDocTemplate(IDR_DIBTYPE,
      RUNTIME_CLASS(CDibDoc),
      RUNTIME_CLASS(CMDIChildWnd),        // standard MDI child frame
      RUNTIME_CLASS(CDibView)));

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
    delete pMainFrame;
    return FALSE;
  }
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();
  m_pMainWnd = pMainFrame;

  // enable file manager drag/drop and DDE Execute open
  m_pMainWnd->DragAcceptFiles();

  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  return TRUE;
}

void CDibLookApp::OnAppAbout ( )

Definition at line 137 of file diblook.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/diblook/diblook.h
  • general/diblook/diblook.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDibView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDibView Class Reference

#include "dibview.h"

List of all members.

Public Member Functions

virtual | ~CDibView ()
CDibDoc * GetDocument ()
virtual void | OnActivateView (BOOL bActivate, CView *pActivateView, CView *pDeactiveView)
virtual void | OnDraw (CDC *pDC)
virtual void | OnInitialUpdate ()

Protected Member Functions

CDibView ()
afx_msg LRESULT | OnDoRealize (WPARAM wParam, LPARAM lParam)
afx_msg void | OnEditCopy ()
afx_msg void | OnEditPaste ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnUpdateEditCopy (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditPaste (CCmdUI *pCmdUI)

Detailed Description

Definition at line 12 of file dibview.h.

Constructor & Destructor Documentation

CDibView::CDibView ( ) [protected]

Definition at line 47 of file dibview.cpp.

{
}

CDibView::~CDibView ( ) [virtual]

Definition at line 51 of file dibview.cpp.

{
}

Member Function Documentation

CDibDoc* CDibView::GetDocument ( ) [inline]

Definition at line 20 of file dibview.h.

    {
      ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDibDoc)));
      return (CDibDoc*) m_pDocument;
    }

void CDibView::OnActivateView | ( | BOOL | bActivate,
 |  | CView * | pActivateView,
 |  | CView * | pDeactiveView |
 | ) |  |  | [virtual]

Definition at line 163 of file dibview.cpp.

{
  CScrollView::OnActivateView(bActivate, pActivateView, pDeactiveView);

  if (bActivate)
  {
    ASSERT(pActivateView == this);
    OnDoRealize((WPARAM)m_hWnd, 0);   // same as SendMessage(WM_DOREALIZE);
  }
}

LRESULT CDibView::OnDoRealize | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 119 of file dibview.cpp.

{
  ASSERT(wParam != NULL);
  CDibDoc* pDoc = GetDocument();
  if (pDoc->GetHDIB() == NULL)
    return 0L;  // must be a new document

  CPalette* pPal = pDoc->GetDocPalette();
  if (pPal != NULL)
  {
    CMainFrame* pAppFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
    ASSERT_KINDOF(CMainFrame, pAppFrame);

    CClientDC appDC(pAppFrame);
    // All views but one should be a background palette.
    // wParam contains a handle to the active view, so the SelectPalette
    // bForceBackground flag is FALSE only if wParam == m_hWnd (this view)
    CPalette* oldPalette = appDC.SelectPalette(pPal, ((HWND)wParam) != m_hWnd);

    if (oldPalette != NULL)
    {
      UINT nColorsChanged = appDC.RealizePalette();
      if (nColorsChanged > 0)
        pDoc->UpdateAllViews(NULL);
      appDC.SelectPalette(oldPalette, TRUE);
    }
    else
    {
      TRACE0("\tSelectPalette failed in CDibView::OnPaletteChanged\n");
    }
  }

  return 0L;
}

void CDibView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 58 of file dibview.cpp.

{
  CDibDoc* pDoc = GetDocument();

  HDIB hDIB = pDoc->GetHDIB();
  if (hDIB != NULL)
  {
    LPSTR lpDIB = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
    int cxDIB = (int) ::DIBWidth(lpDIB);         // Size of DIB - x
    int cyDIB = (int) ::DIBHeight(lpDIB);        // Size of DIB - y
    ::GlobalUnlock((HGLOBAL) hDIB);
    CRect rcDIB;
    rcDIB.top = rcDIB.left = 0;
    rcDIB.right = cxDIB;
    rcDIB.bottom = cyDIB;
    CRect rcDest;
    if (pDC->IsPrinting())   // printer DC
    {
      // get size of printer page (in pixels)
      int cxPage = pDC->GetDeviceCaps(HORZRES);
      // int cyPage = pDC->GetDeviceCaps(VERTRES);
      // get printer pixels per inch
      int cxInch = pDC->GetDeviceCaps(LOGPIXELSX);
      int cyInch = pDC->GetDeviceCaps(LOGPIXELSY);

      //
      // Best Fit case -- create a rectangle which preserves
      // the DIB's aspect ratio, and fills the page horizontally.
      //
      // The formula in the "->bottom" field below calculates the Y
      // position of the printed bitmap, based on the size of the
      // bitmap, the width of the page, and the relative size of
      // a printed pixel (cyInch / cxInch).
      //
      rcDest.top = rcDest.left = 0;
      rcDest.bottom = (int)(((double)cyDIB * cxPage * cyInch)
          / ((double)cxDIB * cxInch));
      rcDest.right = cxPage;
    }
    else   // not printer DC
    {
      rcDest = rcDIB;
    }
        ::PaintDIB(pDC->m_hDC, &rcDest, pDoc->GetHDIB(),
      &rcDIB, pDoc->GetDocPalette());
  }
}

void CDibView::OnEditCopy ( ) [protected]

Definition at line 175 of file dibview.cpp.

{
  CDibDoc* pDoc = GetDocument();
  // Clean clipboard of contents, and copy the DIB.

  if (OpenClipboard())
  {
    BeginWaitCursor();
    EmptyClipboard();
    SetClipboardData (CF_DIB, CopyHandle((HANDLE) pDoc->GetHDIB()) );
    CloseClipboard();
    EndWaitCursor();
  }
}

void CDibView::OnEditPaste ( ) [protected]

Definition at line 198 of file dibview.cpp.

{
  HDIB hNewDIB = NULL;

  if (OpenClipboard())
  {
    BeginWaitCursor();

    hNewDIB = (HDIB) CopyHandle(::GetClipboardData(CF_DIB));

    CloseClipboard();

    if (hNewDIB != NULL)
    {
      CDibDoc* pDoc = GetDocument();
      pDoc->ReplaceHDIB(hNewDIB); // and free the old DIB
      pDoc->InitDIBData();    // set up new size & palette
      pDoc->SetModifiedFlag(TRUE);

      SetScrollSizes(MM_TEXT, pDoc->GetDocSize());
      OnDoRealize((WPARAM)m_hWnd,0);  // realize the new palette
      pDoc->UpdateAllViews(NULL);
    }
    EndWaitCursor();
  }
}

void CDibView::OnInitialUpdate ( ) [virtual]

Definition at line 154 of file dibview.cpp.

{
  CScrollView::OnInitialUpdate();
  ASSERT(GetDocument() != NULL);

  SetScrollSizes(MM_TEXT, GetDocument()->GetDocSize());
}

BOOL CDibView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 109 of file dibview.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CDibView::OnUpdateEditCopy ( CCmdUI * pCmdUI ) [protected]

Definition at line 192 of file dibview.cpp.

{
  pCmdUI->Enable(GetDocument()->GetHDIB() != NULL);
}

void CDibView::OnUpdateEditPaste ( CCmdUI * pCmdUI ) [protected]

Definition at line 226 of file dibview.cpp.

{
  pCmdUI->Enable(::IsClipboardFormatAvailable(CF_DIB));
}

The documentation for this class was generated from the following files:
  • general/diblook/dibview.h
  • general/diblook/dibview.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDinnerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CDinnerPage Class Reference

#include "DinnerPg.h"

List of all members.

Public Types

enum | { IDD = IDD_DINNER }

Public Member Functions

CDinnerPage ()
~CDinnerPage ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 15 of file DinnerPg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file DinnerPg.h.

{ IDD = IDD_DINNER };

Constructor & Destructor Documentation

CDinnerPage::CDinnerPage ( )

Definition at line 27 of file DinnerPg.cpp.

                         : CPropertyPage(CDinnerPage::IDD)
{
  //{{AFX_DATA_INIT(CDinnerPage)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

CDinnerPage::~CDinnerPage ( )

Definition at line 34 of file DinnerPg.cpp.

{
}

Member Function Documentation

void CDinnerPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 38 of file DinnerPg.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDinnerPage)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

BOOL CDinnerPage::OnInitDialog ( ) [protected, virtual]

Definition at line 55 of file DinnerPg.cpp.

{
  CPropertyPage::OnInitDialog();

  // TODO: Add extra initialization here

  CButton* pBevButton;
  pBevButton = (CButton*) GetDlgItem(IDC_COFFEE1);
  pBevButton->SetCheck(1);

  CButton* pFoodButton;
  pFoodButton = (CButton*) GetDlgItem(IDC_ROMANTIC);
  pFoodButton->SetCheck(1);

  CButton* pCompButton;
  pCompButton = (CButton*) GetDlgItem(IDC_NEIGHBOR);
  pCompButton->SetCheck(1);

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

The documentation for this class was generated from the following files:
  • general/snapvw/DinnerPg.h
  • general/snapvw/DinnerPg.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDispatchDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CDispatchDlg Class Reference

#include "dispatch.h"

List of all members.

Public Types

enum | { IDD = IDD_DISPATCH }

Public Member Functions

CDispatchDlg (CWnd *pParent=NULL)

Public Attributes

CButton | m_btnViewTypeInfo
IDispatch * | m_pdisp
UINT m_uiTypeInfoCount

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnViewTypeInfo ()

Detailed Description

Definition at line 53 of file dispatch.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 61 of file dispatch.h.

{ IDD = IDD_DISPATCH };

Constructor & Destructor Documentation

CDispatchDlg::CDispatchDlg ( CWnd * pParent = NULL )

Definition at line 83 of file dispatch.cpp.

  : CDialog(CDispatchDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CDispatchDlg)
  m_uiTypeInfoCount = 0;
  //}}AFX_DATA_INIT
  m_pdisp = NULL ;
}

Member Function Documentation

void CDispatchDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 93 of file dispatch.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDispatchDlg)
  DDX_Control(pDX, IDC_VIEWTYPEINFO, m_btnViewTypeInfo);
  DDX_Text(pDX, IDC_TYPEINFOCOUNT, m_uiTypeInfoCount);
  //}}AFX_DATA_MAP

  m_btnViewTypeInfo.EnableWindow(m_uiTypeInfoCount != 0) ;
}

BOOL CDispatchDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 127 of file dispatch.cpp.

{
  ENSURE(m_pdisp);

  HRESULT hr ;
  hr = m_pdisp->GetTypeInfoCount( &m_uiTypeInfoCount ) ;
  if (FAILED(hr))
  {
    m_uiTypeInfoCount = 0 ;
    ErrorMessage( "IDispatch::GetTypeInfoCount failed.", hr ) ;
  }

  CDialog::OnInitDialog();

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

void CDispatchDlg::OnViewTypeInfo ( ) [protected]

Definition at line 115 of file dispatch.cpp.

{
  // TODO:
  // if (m_uiTypeInfoCount > 0) // should never be > 1
  //    Call IDispatch::GetTypeInfo
  //    Pop up ITypeInfo Viewer in the resulting ITypeInfo*
  //    (note that there is currently no ITypeInfo viewer, but
  //     the ITypeLib viewer could easily be modified/extended
  //     to browse a specific ITypeInfo).

}

Member Data Documentation

CButton CDispatchDlg::m_btnViewTypeInfo

Definition at line 62 of file dispatch.h.

IDispatch* CDispatchDlg::m_pdisp

Definition at line 66 of file dispatch.h.

UINT CDispatchDlg::m_uiTypeInfoCount

Definition at line 63 of file dispatch.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/dispatch.h
  • ole/oleview/iviewers/dispatch.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDispatchViewer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDispatchViewer Class Reference

#include "dispatch.h"

Inherits CInterfaceViewer.

List of all members.

Public Member Functions

virtual HRESULT | OnView (HWND hwndParent, REFIID riid, LPUNKNOWN punk)

Protected Member Functions

CDispatchViewer ()
virtual | ~CDispatchViewer ()

Detailed Description

Definition at line 16 of file dispatch.h.

Constructor & Destructor Documentation

CDispatchViewer::CDispatchViewer ( ) [protected]

Definition at line 30 of file dispatch.cpp.

{
}

CDispatchViewer::~CDispatchViewer ( ) [protected, virtual]

Definition at line 34 of file dispatch.cpp.

{
}

Member Function Documentation

HRESULT CDispatchViewer::OnView | ( | HWND | hwndParent,
 |  | REFIID | riid,
 |  | LPUNKNOWN | punk |
 | ) |  |  | [virtual]

Reimplemented from CInterfaceViewer.

Definition at line 51 of file dispatch.cpp.

{
  SCODE sc = NOERROR ;

  ASSERT(hwndParent);
  ENSURE(punk);

  if (riid != IID_IDispatch)
  {
    AfxMessageBox( _T("IDispatch interface viewer only supports IID_IDispatch") ) ;
    return E_INVALIDARG ;
  }

  CDispatchDlg dlg(CWnd::FromHandle(hwndParent)) ;

  sc = punk->QueryInterface( riid, (void**)&dlg.m_pdisp ) ;
  if (FAILED(sc))
  {
    ErrorMessage( "Object does not support IDispatch.", sc ) ;
    return E_UNEXPECTED ;
  }

  dlg.DoModal() ;

  dlg.m_pdisp->Release() ;

  return sc ;
}

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/dispatch.h
  • ole/oleview/iviewers/dispatch.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDisplayIC Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDisplayIC Class Reference

#include "stdafx.h"

List of all members.

Public Member Functions

CDisplayIC ()
CDisplayIC ()

Detailed Description

Definition at line 32 of file stdafx.h.

Constructor & Destructor Documentation

CDisplayIC::CDisplayIC ( ) [inline]

Definition at line 35 of file stdafx.h.

{ CreateIC(_T("DISPLAY"), NULL, NULL, NULL); }

CDisplayIC::CDisplayIC ( ) [inline]

Definition at line 37 of file stdafx.h.

{ CreateIC(_T("DISPLAY"), NULL, NULL, NULL); }

The documentation for this class was generated from the following files:
  • ole/wordpad/stdafx.h
  • vc2008fp/WordPad/stdafx.h
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDisplayThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDisplayThread Class Reference

#include "threads.h"

Inherits CExampleThread.

List of all members.

Public Member Functions

virtual | ~CDisplayThread ()
virtual BOOL | InitInstance ()
virtual int | Run ()

Protected Member Functions

CDisplayThread ()

Detailed Description

Definition at line 72 of file threads.h.

Constructor & Destructor Documentation

CDisplayThread::CDisplayThread ( ) [protected]

Definition at line 134 of file threads.cpp.

{
}

CDisplayThread::~CDisplayThread ( ) [virtual]

Definition at line 138 of file threads.cpp.

{
}

Member Function Documentation

BOOL CDisplayThread::InitInstance ( ) [virtual]

Definition at line 142 of file threads.cpp.

{
  // TODO:  perform and per-thread initialization here
  return TRUE;
}

int CDisplayThread::Run ( ) [virtual]

Definition at line 148 of file threads.cpp.

{
  BOOL fSyncChecked;
  CString strBuffer;

  ASSERT(m_pOwner != NULL);
  if (m_pOwner == NULL)
    return -1;

  CSingleLock sLock(&(m_pOwner->m_mutex));

  while (!m_bDone)
  {
    // Determine whether the user wants the threads
    // to be synchronized.

    fSyncChecked = m_pOwner->IsDlgButtonChecked(IDC_SYNCHRONIZE);

    if (fSyncChecked)
      sLock.Lock();

    // Construct a string with the string form of the number.

    strBuffer = _T("Dspy: ");
    strBuffer += m_pOwner->m_strNumber;

    if (fSyncChecked)
      sLock.Unlock();

    // Add the string form of the number to the list box.
    m_pOwner->AddToListBox(strBuffer);
  }

  m_pOwner->PostMessage(WM_CLOSE, 0, 0L);
  return 0;
}

The documentation for this class was generated from the following files:
  • advanced/mutexes/threads.h
  • advanced/mutexes/threads.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDlgBanner Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDlgBanner Class Reference

#include "DlgBanner.h"

List of all members.

Public Member Functions

CDlgBanner ()
virtual | ~CDlgBanner ()

Protected Member Functions

afx_msg void | OnPaint ()

Detailed Description

Definition at line 17 of file DlgBanner.h.

Constructor & Destructor Documentation

CDlgBanner::CDlgBanner ( )

Definition at line 25 of file DlgBanner.cpp.

{
}

CDlgBanner::~CDlgBanner ( ) [virtual]

Definition at line 29 of file DlgBanner.cpp.

{
}

Member Function Documentation

void CDlgBanner::OnPaint ( ) [protected]

Definition at line 42 of file DlgBanner.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rect;
  GetClientRect(rect);

  CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontBold);
  ASSERT(pOldFont != NULL);

  dc.SetTextColor(CMFCVisualManager::GetInstance()->OnDrawMenuLabel(&dc, rect));
  dc.SetBkMode(TRANSPARENT);

  rect.DeflateRect(5, 0);

  CString strText;
  GetWindowText(strText);

  dc.DrawText(strText, rect, DT_LEFT | DT_SINGLELINE | DT_VCENTER);

  dc.SelectObject(pOldFont);
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/DlgBanner.h
  • vc2008fp/MSOffice2007Demo/DlgBanner.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDlgStatusBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDlgStatusBar Class Reference

#include "Dlgbars.h"

List of all members.

Public Member Functions

CDlgStatusBar ()
virtual | ~CDlgStatusBar ()

Protected Member Functions

afx_msg LRESULT | OnIdleUpdateCmdUI (WPARAM wParam, LPARAM)

Detailed Description

Definition at line 59 of file Dlgbars.h.

Constructor & Destructor Documentation

CDlgStatusBar::CDlgStatusBar ( )

Definition at line 83 of file Dlgbars.cpp.

{
}

CDlgStatusBar::~CDlgStatusBar ( ) [virtual]

Definition at line 87 of file Dlgbars.cpp.

{
}

Member Function Documentation

LRESULT CDlgStatusBar::OnIdleUpdateCmdUI | ( | WPARAM | wParam,
 |  | LPARAM |  |
 | ) |  |  | [protected]

Definition at line 105 of file Dlgbars.cpp.

{
  if (IsWindowVisible())
  {
    CFrameWnd *pParent = (CFrameWnd *)GetParent();
    if (pParent)
      OnUpdateCmdUI(pParent, (BOOL)wParam);
  }
  return 0L;
}

The documentation for this class was generated from the following files:
  • general/dlgcbr32/Dlgbars.h
  • general/dlgcbr32/Dlgbars.cpp
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDlgtempApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDlgtempApp Class Reference

#include "dlgtemp.h"

List of all members.

Public Member Functions

CDlgtempApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 24 of file dlgtemp.h.

Constructor & Destructor Documentation

CDlgtempApp::CDlgtempApp ( )

Definition at line 37 of file dlgtemp.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDlgtempApp::InitInstance ( ) [virtual]

Definition at line 51 of file dlgtemp.cpp.

{
  CDlgtempDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int)dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/dlgtempl/dlgtemp.h
  • general/dlgtempl/dlgtemp.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDlgtempDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CDlgtempDlg Class Reference

#include "setupdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_DLGTEMP_DIALOG }

Public Member Functions

CDlgtempDlg (CWnd *pParent=NULL)

Public Attributes

int | m_nActiveItem
UINT m_nHeight
int | m_nItem
UINT m_nWidth
CString | m_strCaption
CString | m_strSelectedItem
UINT m_x
UINT m_y

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
void | InfoToDialogHelper (int nItem, LPCTSTR lpszSelectedItem)
afx_msg void | OnButtonInformation ()
afx_msg void | OnDemoIt ()
afx_msg void | OnEditControlInformation ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg void | OnStaticTextInformation ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

CMyDialogTemplate m_dlgTemplate
HICON | m_hIcon

Detailed Description

Definition at line 20 of file setupdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file setupdlg.h.

{ IDD = IDD_DLGTEMP_DIALOG };

Constructor & Destructor Documentation

CDlgtempDlg::CDlgtempDlg ( CWnd * pParent = NULL )

Definition at line 71 of file setupdlg.cpp.

  : CDialog(CDlgtempDlg::IDD, pParent)
{
  m_nActiveItem = -1;

  //{{AFX_DATA_INIT(CDlgtempDlg)
  m_strCaption = _T("");
  m_x = 0;
  m_y = 0;
  m_nWidth = 0;
  m_nHeight = 0;
  m_nItem = -1;
  m_strSelectedItem = _T("");
  //}}AFX_DATA_INIT
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CDlgtempDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 89 of file setupdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDlgtempDlg)
  DDX_Text(pDX, IDC_CAPTION, m_strCaption);
  DDX_Text(pDX, IDC_XPOS, m_x);
  DDV_MinMaxUInt(pDX, m_x, 0, 300);
  DDX_Text(pDX, IDC_YPOS, m_y);
  DDV_MinMaxUInt(pDX, m_y, 0, 200);
  DDX_Text(pDX, IDC_WIDTH, m_nWidth);
  DDX_Text(pDX, IDC_HEIGHT, m_nHeight);
  DDX_Radio(pDX, IDC_BUTTON, m_nItem);
  DDX_Text(pDX, IDC_SELECTEDITEM, m_strSelectedItem);
  //}}AFX_DATA_MAP
}

void CDlgtempDlg::InfoToDialogHelper | ( | int | nItem,
 |  | LPCTSTR | lpszSelectedItem |
 | ) |  |  | [protected]

Definition at line 214 of file setupdlg.cpp.

{
  // first bring data from edit field and store in proper item
  if (m_nActiveItem != -1)
  {
    UpdateData(TRUE/*bSaveAndValidate*/);
#pragma warning(disable : 4244)
    m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.x = m_x;
    m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.y = m_y;
    m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.cx = m_nWidth;
    m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.cy = m_nHeight;
    m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_strCaption = m_strCaption;
#pragma warning(default : 4244)

  }

  // now bring data from item and send to edit fields
  if (m_nActiveItem != nItem)
  {
    ENSURE(nItem >= 0 && nItem < 3);
    m_x = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.x;
    m_y = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.y;
    m_nWidth = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.cx;
    m_nHeight = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.cy;
    m_strCaption = m_dlgTemplate.m_rgDlgItem[nItem].m_strCaption;
    ASSERT(lpszSelection != NULL);
    m_strSelectedItem = lpszSelection;
    m_nItem = nItem;
    m_nActiveItem = nItem;
    UpdateData(FALSE/*bSaveAndValidate*/);
  }

  CWnd*   pwnd = GetDlgItem(IDC_CAPTION);
  pwnd->EnableWindow(nItem != IEDITCONTROL);
}

void CDlgtempDlg::OnButtonInformation ( ) [protected]

Definition at line 197 of file setupdlg.cpp.

{
  // take the information about the button and send it to the edit
  // controls in the dialog.
  InfoToDialogHelper(IBUTTON, _T("BUTTON"));
}

void CDlgtempDlg::OnDemoIt ( ) [protected]

Definition at line 191 of file setupdlg.cpp.

{
  InfoToDialogHelper(m_nActiveItem, NULL);
  m_dlgTemplate.DemoIt();
}

void CDlgtempDlg::OnEditControlInformation ( ) [protected]

Definition at line 209 of file setupdlg.cpp.

{
  InfoToDialogHelper(IEDITCONTROL, _T("EDIT CONTROL"));
}

BOOL CDlgtempDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 119 of file setupdlg.cpp.

{
  CDialog::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  CString strAboutMenu;
  strAboutMenu.LoadString(IDS_ABOUTBOX);
  if (!strAboutMenu.IsEmpty())
  {
    pSysMenu->AppendMenu(MF_SEPARATOR);
    pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);         // Set big icon
  SetIcon(m_hIcon, FALSE);        // Set small icon

  m_nItem = 0;        // select the BUTTON option
  OnButtonInformation();  // fill the edit fields with corresponding values

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CDlgtempDlg::OnPaint ( ) [protected]

Definition at line 166 of file setupdlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

void CDlgtempDlg::OnStaticTextInformation ( ) [protected]

Definition at line 204 of file setupdlg.cpp.

{
  InfoToDialogHelper(ISTATICTEXT, _T("STATIC TEXT"));
}

void CDlgtempDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 149 of file setupdlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDialog::OnSysCommand(nID, lParam);
  }
}

Member Data Documentation

CMyDialogTemplate CDlgtempDlg::m_dlgTemplate [protected]

Definition at line 46 of file setupdlg.h.

HICON CDlgtempDlg::m_hIcon [protected]

Definition at line 49 of file setupdlg.h.

int CDlgtempDlg::m_nActiveItem

Definition at line 38 of file setupdlg.h.

UINT CDlgtempDlg::m_nHeight

Definition at line 33 of file setupdlg.h.

int CDlgtempDlg::m_nItem

Definition at line 34 of file setupdlg.h.

UINT CDlgtempDlg::m_nWidth

Definition at line 32 of file setupdlg.h.

CString CDlgtempDlg::m_strCaption

Definition at line 29 of file setupdlg.h.

CString CDlgtempDlg::m_strSelectedItem

Definition at line 35 of file setupdlg.h.

UINT CDlgtempDlg::m_x

Definition at line 30 of file setupdlg.h.

UINT CDlgtempDlg::m_y

Definition at line 31 of file setupdlg.h.

The documentation for this class was generated from the following files:
  • general/dlgtempl/setupdlg.h
  • general/dlgtempl/setupdlg.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDlgToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDlgToolBar Class Reference

#include "Dlgbars.h"

List of all members.

Public Member Functions

CDlgToolBar ()
virtual | ~CDlgToolBar ()

Protected Member Functions

afx_msg LRESULT | OnIdleUpdateCmdUI (WPARAM wParam, LPARAM)

Detailed Description

Definition at line 41 of file Dlgbars.h.

Constructor & Destructor Documentation

CDlgToolBar::CDlgToolBar ( )

Definition at line 38 of file Dlgbars.cpp.

{
}

CDlgToolBar::~CDlgToolBar ( ) [virtual]

Definition at line 42 of file Dlgbars.cpp.

{
}

Member Function Documentation

LRESULT CDlgToolBar::OnIdleUpdateCmdUI | ( | WPARAM | wParam,
 |  | LPARAM |  |
 | ) |  |  | [protected]

Definition at line 60 of file Dlgbars.cpp.

{
  if (IsWindowVisible())
  {
    CFrameWnd *pParent = (CFrameWnd *)GetParent();
    if (pParent)
      OnUpdateCmdUI(pParent, (BOOL)wParam);
  }
  return 0L;
}

The documentation for this class was generated from the following files:
  • general/dlgcbr32/Dlgbars.h
  • general/dlgcbr32/Dlgbars.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDlgToolTipsApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDlgToolTipsApp Class Reference

#include "DlgToolTips.h"

List of all members.

Public Member Functions

CDlgToolTipsApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 24 of file DlgToolTips.h.

Constructor & Destructor Documentation

CDlgToolTipsApp::CDlgToolTipsApp ( )

Definition at line 31 of file DlgToolTips.cpp.

                                 : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDlgToolTipsApp::InitInstance ( ) [virtual]

Definition at line 45 of file DlgToolTips.cpp.

{
  AfxEnableControlContainer();

  CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  CDlgToolTipsDlg dlg;
  m_pMainWnd = &dlg;

  dlg.DoModal();

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/DlgToolTips/DlgToolTips.h
  • vc2008fp/DlgToolTips/DlgToolTips.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDlgToolTipsDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CDlgToolTipsDlg Class Reference

#include "DlgToolTipsDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_DLGTOOLTIPS_DIALOG }

Public Member Functions

CDlgToolTipsDlg (CWnd *pParent=NULL)
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

HICON | m_hIcon
CCustomToolTipCtrl m_ToolTip

Detailed Description

Definition at line 18 of file DlgToolTipsDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file DlgToolTipsDlg.h.

{ IDD = IDD_DLGTOOLTIPS_DIALOG };

Constructor & Destructor Documentation

CDlgToolTipsDlg::CDlgToolTipsDlg ( CWnd * pParent = NULL )

Definition at line 24 of file DlgToolTipsDlg.cpp.

  : CDialogEx(CDlgToolTipsDlg::IDD, pParent)
{
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CDlgToolTipsDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 31 of file DlgToolTipsDlg.cpp.

{
  CDialogEx::DoDataExchange(pDX);
}

BOOL CDlgToolTipsDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 45 of file DlgToolTipsDlg.cpp.

{
  CDialogEx::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  if (pSysMenu != NULL)
  {
    BOOL bValidString;
    CString strAboutMenu;
    bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // Create the ToolTip control.
  m_ToolTip.Create(this);
  m_ToolTip.Activate(TRUE);

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  m_ToolTip.SetParams (&params);

  // TODO: Use one of the following forms to add controls:
  m_ToolTip.AddTool (GetDlgItem(IDOK), _T("This is the OK button!"));
  m_ToolTip.AddTool (GetDlgItem(IDCANCEL), _T("This is the Cancel button!"));

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CDlgToolTipsDlg::OnPaint ( ) [protected]

Definition at line 105 of file DlgToolTipsDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialogEx::OnPaint();
  }
}

HCURSOR CDlgToolTipsDlg::OnQueryDragIcon ( ) [protected]

Definition at line 132 of file DlgToolTipsDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CDlgToolTipsDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 89 of file DlgToolTipsDlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {

  }
  else
  {
    CDialogEx::OnSysCommand(nID, lParam);
  }
}

BOOL CDlgToolTipsDlg::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 137 of file DlgToolTipsDlg.cpp.

{
    switch (pMsg->message)
  {
  case WM_KEYDOWN:
  case WM_SYSKEYDOWN:
  case WM_LBUTTONDOWN:
  case WM_RBUTTONDOWN:
  case WM_MBUTTONDOWN:
  case WM_LBUTTONUP:
  case WM_RBUTTONUP:
  case WM_MBUTTONUP:
  case WM_MOUSEMOVE:
    m_ToolTip.RelayEvent(pMsg);
    break;
  }

  return CDialogEx::PreTranslateMessage(pMsg);
}

Member Data Documentation

HICON CDlgToolTipsDlg::m_hIcon [protected]

Definition at line 34 of file DlgToolTipsDlg.h.

CCustomToolTipCtrl CDlgToolTipsDlg::m_ToolTip [protected]

Definition at line 43 of file DlgToolTipsDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DlgToolTips/DlgToolTipsDlg.h
  • vc2008fp/DlgToolTips/DlgToolTipsDlg.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDllScreenCapApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDllScreenCapApp Class Reference

#include "DllScreenCap.h"

List of all members.

Public Member Functions

CDllScreenCapApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 24 of file DllScreenCap.h.

Constructor & Destructor Documentation

CDllScreenCapApp::CDllScreenCapApp ( )

Definition at line 55 of file DllScreenCap.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDllScreenCapApp::InitInstance ( ) [virtual]

Definition at line 69 of file DllScreenCap.cpp.

{
  CWinApp::InitInstance();

  return TRUE;
}

The documentation for this class was generated from the following files:
  • advanced/DllScreenCap/DllScreenCap/DllScreenCap.h
  • advanced/DllScreenCap/DllScreenCap/DllScreenCap.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDockApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDockApp Class Reference

#include "docktool.h"

List of all members.

Public Member Functions

CDockApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 24 of file docktool.h.

Constructor & Destructor Documentation

CDockApp::CDockApp ( )

Definition at line 41 of file docktool.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDockApp::InitInstance ( ) [virtual]

Definition at line 55 of file docktool.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // 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(CDockDoc),
    RUNTIME_CLASS(CMainFrame),          // standard MDI child frame
    RUNTIME_CLASS(CDockView));
  AddDocTemplate(pDocTemplate);

  // create a new (empty) document
  OnFileNew();

  return TRUE;
}

void CDockApp::OnAppAbout ( )

Definition at line 123 of file docktool.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/docktool/docktool.h
  • general/docktool/docktool.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDockDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDockDoc Class Reference

#include "dockdoc.h"

List of all members.

Public Member Functions

virtual | ~CDockDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CDockDoc ()

Detailed Description

Definition at line 12 of file dockdoc.h.

Constructor & Destructor Documentation

CDockDoc::CDockDoc ( ) [protected]

Definition at line 37 of file dockdoc.cpp.

{
  // TODO: add one-time construction code here

}

CDockDoc::~CDockDoc ( ) [virtual]

Definition at line 43 of file dockdoc.cpp.

{
}

Member Function Documentation

BOOL CDockDoc::OnNewDocument ( ) [virtual]

Definition at line 47 of file dockdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CDockDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 61 of file dockdoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • general/docktool/dockdoc.h
  • general/docktool/dockdoc.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDockView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDockView Class Reference

#include "dockvw.h"

List of all members.

Public Member Functions

virtual | ~CDockView ()
CDockDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)

Protected Member Functions

CDockView ()

Detailed Description

Definition at line 12 of file dockvw.h.

Constructor & Destructor Documentation

CDockView::CDockView ( ) [protected]

Definition at line 38 of file dockvw.cpp.

{
  // TODO: add construction code here

}

CDockView::~CDockView ( ) [virtual]

Definition at line 44 of file dockvw.cpp.

{
}

Member Function Documentation

CDockDoc * CDockView::GetDocument ( ) [inline]

Definition at line 53 of file dockvw.h.

   { return (CDockDoc*)m_pDocument; }

void CDockView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 51 of file dockvw.cpp.

{
  CDockDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
  pDC;    // unused right now

  // TODO: add draw code for native data here
}

The documentation for this class was generated from the following files:
  • general/docktool/dockvw.h
  • general/docktool/dockvw.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDocOptions Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CDocOptions Class Reference

#include "options.h"

List of all members.

Public Member Functions

CDocOptions (int nDefWrap)
CDocOptions (int nDefWrap)
CDockState & | GetDockState (BOOL bPrimary)
CDockState & | GetDockState (BOOL bPrimary)
void | LoadDockState (CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
void | LoadDockState (CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
void | LoadOptions (LPCTSTR lpsz)
void | LoadOptions (LPCTSTR lpsz)
void | SaveDockState (CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
void | SaveDockState (CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
void | SaveOptions (LPCTSTR lpsz)
void | SaveOptions (LPCTSTR lpsz)

Public Attributes

CDockState | m_ds1
CDockState | m_ds2
int | m_nDefWrap
int | m_nWordWrap

Detailed Description

Definition at line 30 of file options.h.

Constructor & Destructor Documentation

CDocOptions::CDocOptions ( int nDefWrap ) [inline]

Definition at line 33 of file options.h.

{m_nDefWrap = nDefWrap;}

CDocOptions::CDocOptions ( int nDefWrap ) [inline]

Definition at line 35 of file options.h.

{m_nDefWrap = nDefWrap;}

Member Function Documentation

CDockState& CDocOptions::GetDockState ( BOOL bPrimary ) [inline]

Definition at line 44 of file options.h.

{return (bPrimary) ? m_ds1 : m_ds2;}

CDockState& CDocOptions::GetDockState ( BOOL bPrimary ) [inline]

Definition at line 46 of file options.h.

{return (bPrimary) ? m_ds1 : m_ds2;}

void CDocOptions::LoadDockState | ( | CDockState & | ds,
 |  | LPCTSTR | lpszProfileName,
 |  | LPCTSTR | lpszLayout
 | ) |  |
void CDocOptions::LoadDockState | ( | CDockState & | ds,
 |  | LPCTSTR | lpszProfileName,
 |  | LPCTSTR | lpszLayout
 | ) |  |

Definition at line 46 of file options.cpp.

{
  BYTE* p;
  UINT nLen = 0;
  if (theApp.GetProfileBinary(lpszProfileName, lpszLayout, &p, &nLen))
  {
    ASSERT(nLen < 4096);
    CMemFile file;
    file.Write(p, nLen);
    file.SeekToBegin();
    CArchive ar(&file, CArchive::load);
    ds.Serialize(ar);
    ar.Close();
    delete p;
  }
}

void CDocOptions::LoadOptions ( LPCTSTR lpsz )

Definition at line 63 of file options.cpp.

{
  LoadDockState(m_ds1, lpszProfileName, szLayout1);
  LoadDockState(m_ds2, lpszProfileName, szLayout2);
  m_nWordWrap = theApp.GetProfileInt(lpszProfileName, szWrap, m_nDefWrap);
}

void CDocOptions::LoadOptions ( LPCTSTR lpsz )
void CDocOptions::SaveDockState | ( | CDockState & | ds,
 |  | LPCTSTR | lpszProfileName,
 |  | LPCTSTR | lpszLayout
 | ) |  |
void CDocOptions::SaveDockState | ( | CDockState & | ds,
 |  | LPCTSTR | lpszProfileName,
 |  | LPCTSTR | lpszLayout
 | ) |  |

Definition at line 24 of file options.cpp.

{
  CMemFile file;
  CArchive ar(&file, CArchive::store);
  ds.Serialize(ar);
  ar.Close();
  int nSize = (int)file.GetLength();
  ASSERT(nSize < 4096);
  BYTE* p = new BYTE[nSize];
  file.SeekToBegin();
  file.Read(p, nSize);
  theApp.WriteProfileBinary(lpszProfileName, lpszLayout, p, nSize);
  delete [] p;
}

void CDocOptions::SaveOptions ( LPCTSTR lpsz )
void CDocOptions::SaveOptions ( LPCTSTR lpsz )

Definition at line 39 of file options.cpp.

{
  SaveDockState(m_ds1, lpszProfileName, szLayout1);
  SaveDockState(m_ds2, lpszProfileName, szLayout2);
  theApp.WriteProfileInt(lpszProfileName, szWrap, m_nWordWrap);
}

Member Data Documentation

CDockState CDocOptions::m_ds1

Definition at line 34 of file options.h.

CDockState CDocOptions::m_ds2

Definition at line 35 of file options.h.

int CDocOptions::m_nDefWrap

Definition at line 37 of file options.h.

int CDocOptions::m_nWordWrap

Definition at line 36 of file options.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/options.h
  • vc2008fp/WordPad/options.h
  • ole/wordpad/options.cpp
  • vc2008fp/WordPad/options.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDocOptPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions

CDocOptPage Class Reference

#include "docopt.h"

Inherits CCSPropertyPage, and CCSPropertyPage.

Inherited by CEmbeddedOptPage, and CEmbeddedOptPage.

List of all members.

Public Types

enum | { IDD = IDD_OPTIONS_WRAP }
enum | { IDD = IDD_OPTIONS_WRAP }

Public Member Functions

CDocOptPage ()
CDocOptPage (UINT nIDCaption)
CDocOptPage ()
CDocOptPage (UINT nIDCaption)
~CDocOptPage ()
~CDocOptPage ()
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()

Public Attributes

BOOL | m_bFormatBar
BOOL | m_bRulerBar
BOOL | m_bStatusBar
BOOL | m_bToolBar
int | m_nWordWrap

Static Public Attributes

static const DWORD | m_nHelpIDs []

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file docopt.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file docopt.h.

{ IDD = IDD_OPTIONS_WRAP };

anonymous enum
Enumerator:
IDD

Definition at line 27 of file docopt.h.

{ IDD = IDD_OPTIONS_WRAP };

Constructor & Destructor Documentation

CDocOptPage::CDocOptPage ( )

Definition at line 39 of file docopt.cpp.

                         : CCSPropertyPage(CDocOptPage::IDD)
{
  //{{AFX_DATA_INIT(CDocOptPage)
  m_nWordWrap = -1;
  m_bFormatBar = FALSE;
  m_bRulerBar = FALSE;
  m_bStatusBar = FALSE;
  m_bToolBar = FALSE;
  //}}AFX_DATA_INIT
}

CDocOptPage::CDocOptPage ( UINT nIDCaption )

Definition at line 50 of file docopt.cpp.

                                        :
  CCSPropertyPage(CDocOptPage::IDD, nIDCaption)
{
  m_nWordWrap = -1;
  m_bFormatBar = FALSE;
  m_bRulerBar = FALSE;
  m_bStatusBar = FALSE;
  m_bToolBar = FALSE;
}

CDocOptPage::~CDocOptPage ( )

Definition at line 60 of file docopt.cpp.

{
}

CDocOptPage::CDocOptPage ( )
CDocOptPage::CDocOptPage ( UINT nIDCaption )
CDocOptPage::~CDocOptPage ( )

Member Function Documentation

void CDocOptPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 64 of file docopt.cpp.

{
  CCSPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDocOptPage)
  DDX_Radio(pDX, IDC_WRAP_NONE, m_nWordWrap);
  DDX_Check(pDX, IDC_CHECK_FORMATBAR, m_bFormatBar);
  DDX_Check(pDX, IDC_CHECK_RULERBAR, m_bRulerBar);
  DDX_Check(pDX, IDC_CHECK_STATUSBAR, m_bStatusBar);
  DDX_Check(pDX, IDC_CHECK_TOOLBAR, m_bToolBar);
  //}}AFX_DATA_MAP
}

virtual void CDocOptPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual const DWORD* CDocOptPage::GetHelpIDs ( ) [inline, virtual]

Implements CCSPropertyPage.

Definition at line 38 of file docopt.h.

{return m_nHelpIDs;}

virtual const DWORD* CDocOptPage::GetHelpIDs ( ) [inline, virtual]

Implements CCSPropertyPage.

Definition at line 36 of file docopt.h.

{return m_nHelpIDs;}

Member Data Documentation

BOOL CDocOptPage::m_bFormatBar

Definition at line 27 of file docopt.h.

BOOL CDocOptPage::m_bRulerBar

Definition at line 28 of file docopt.h.

BOOL CDocOptPage::m_bStatusBar

Definition at line 29 of file docopt.h.

BOOL CDocOptPage::m_bToolBar

Definition at line 30 of file docopt.h.

static const DWORD CDocOptPage::m_nHelpIDs [static]
Initial value:
{
  IDC_BOX, IDH_COMM_GROUPBOX,
  IDC_WRAP_NONE, IDH_WORDPAD_WRAP_NO,
  IDC_WRAP_WINDOW, IDH_WORDPAD_WRAP_WINDOW,
  IDC_WRAP_RULER, IDH_WORDPAD_WRAP_RULER,
  IDC_BOXT, IDH_COMM_GROUPBOX,
  IDC_CHECK_TOOLBAR, IDH_WORDPAD_CHECK_TOOLBAR,
  IDC_CHECK_FORMATBAR, IDH_WORDPAD_CHECK_FORMATBAR,
  IDC_CHECK_STATUSBAR, IDH_WORDPAD_CHECK_STATUSBAR,
  IDC_CHECK_RULERBAR, IDH_WORDPAD_CHECK_RULERBAR,
  0, 0
}

Definition at line 35 of file docopt.h.

int CDocOptPage::m_nWordWrap

Definition at line 26 of file docopt.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/docopt.h
  • vc2008fp/WordPad/docopt.h
  • ole/wordpad/docopt.cpp
  • vc2008fp/WordPad/docopt.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CDrawApp Class Reference

#include "drawcli.h"

List of all members.

Public Member Functions

CDrawApp ()
CDrawApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
virtual BOOL | InitInstance ()

Public Attributes

COleTemplateServer | m_server

Protected Member Functions

afx_msg void | OnAppAbout ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 24 of file drawcli.h.

Constructor & Destructor Documentation

CDrawApp::CDrawApp ( )

Definition at line 45 of file drawcli.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

CDrawApp::CDrawApp ( )

Member Function Documentation

int CDrawApp::ExitInstance ( ) [virtual]

Definition at line 163 of file DrawClient.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CDrawApp::InitInstance ( ) [virtual]

Definition at line 59 of file drawcli.cpp.

{
    SetRegistryKey(_T("YourCompany"));
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_DRAWCLTYPE,
    RUNTIME_CLASS(CDrawDoc),
    RUNTIME_CLASS(CSplitFrame),
    RUNTIME_CLASS(CDrawView));
  pDocTemplate->SetContainerInfo(IDR_DRAWCLTYPE_CNTR_IP);
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;

  if(!pMainFrame)
    return FALSE;

  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // Enable DDE Execute open
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // Enable drag/drop open
  m_pMainWnd->DragAcceptFiles();

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

virtual BOOL CDrawApp::InitInstance ( ) [virtual]
void CDrawApp::OnAppAbout ( ) [protected]

Definition at line 170 of file drawcli.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

afx_msg void CDrawApp::OnAppAbout ( ) [protected]

Member Data Documentation

COleTemplateServer CDrawApp::m_server

Definition at line 33 of file DrawClient.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawcli.h
  • vc2008fp/DrawClient/DrawClient.h
  • ole/drawcli/drawcli.cpp
  • vc2008fp/DrawClient/DrawClient.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawClientHandlersApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDrawClientHandlersApp Class Reference

List of all members.

Public Member Functions

virtual int | ExitInstance ()
virtual BOOL | InitInstance ()

Detailed Description

Definition at line 10 of file dllmain.cpp.

Member Function Documentation

int CDrawClientHandlersApp::ExitInstance ( ) [virtual]

Definition at line 31 of file dllmain.cpp.

{
  return CWinApp::ExitInstance();
}

BOOL CDrawClientHandlersApp::InitInstance ( ) [virtual]

Definition at line 26 of file dllmain.cpp.

{
  return CWinApp::InitInstance();
}

The documentation for this class was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/dllmain.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawClientHandlersModule Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawClientHandlersModule Class Reference

#include "dllmain.h"

Detailed Description

Definition at line 3 of file dllmain.h.

The documentation for this class was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/dllmain.h
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawCliLiveIconsHandler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDrawCliLiveIconsHandler Class Reference

#include "DrawCliLiveIconsHandler.h"

List of all members.

Public Member Functions

CDrawCliLiveIconsHandler ()
HRESULT | FinalConstruct ()
void | FinalRelease ()

Protected Member Functions

virtual HRESULT | GetBitmap (UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE *pdwAlpha)

Detailed Description

Definition at line 21 of file DrawCliLiveIconsHandler.h.

Constructor & Destructor Documentation

CDrawCliLiveIconsHandler::CDrawCliLiveIconsHandler ( ) [inline]

Definition at line 27 of file DrawCliLiveIconsHandler.h.

  {
  }

Member Function Documentation

HRESULT CDrawCliLiveIconsHandler::FinalConstruct ( ) [inline]

Definition at line 44 of file DrawCliLiveIconsHandler.h.

  {
    return S_OK;
  }

void CDrawCliLiveIconsHandler::FinalRelease ( ) [inline]

Definition at line 49 of file DrawCliLiveIconsHandler.h.

  {
    CThumbnailProviderImpl::FinalRelease ();
  }

virtual HRESULT CDrawCliLiveIconsHandler::GetBitmap | ( | UINT | cx,
 |  | HBITMAP * | phbmp,
 |  | WTS_ALPHATYPE * | pdwAlpha |
 | ) |  |  | [inline, protected, virtual]

Definition at line 57 of file DrawCliLiveIconsHandler.h.

  {
    CDrawDoc* pDocument = DYNAMIC_DOWNCAST (CDrawDoc, (CObject*) m_pDocument->GetContainer ());

    HDC hdc = ::GetDC(NULL);
    CDC* pDC = CDC::FromHandle(hdc);
    CDC dc;
    CDC* pDrawDC = pDC;
    CBitmap* pOldBitmap = NULL;
    CBitmap bitmap;

    pDocument->FixUpObjectPositions();
    CRect rectDocBounds = pDocument->m_rectDocumentBounds;

    if (dc.CreateCompatibleDC(pDC))
    {
      if (bitmap.CreateCompatibleBitmap(pDC, rectDocBounds.Width(), rectDocBounds.Height()))
      {
        pDrawDC = &dc;
        pOldBitmap = dc.SelectObject(&bitmap);
      }
    }
    else
    {
      ::ReleaseDC(NULL, hdc);
      return E_FAIL;
    }

    dc.SelectObject(&bitmap);
    pDocument->Draw(pDrawDC);

    if (pDrawDC != pDC)
    {
      dc.SelectObject(pOldBitmap);
    }

    ::ReleaseDC (NULL, hdc);
    *phbmp = (HBITMAP)bitmap.Detach ();

    return S_OK;
  }

The documentation for this class was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/DrawCliLiveIconsHandler.h
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawCliSearchHandler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDrawCliSearchHandler Class Reference

#include "DrawCliSearchHandler.h"

List of all members.

Public Member Functions

CDrawCliSearchHandler ()
HRESULT | FinalConstruct ()
void | FinalRelease ()
IFACEMETHODIMP | GetClassID (CLSID *pClassID)

Detailed Description

Definition at line 21 of file DrawCliSearchHandler.h.

Constructor & Destructor Documentation

CDrawCliSearchHandler::CDrawCliSearchHandler ( ) [inline]

Definition at line 27 of file DrawCliSearchHandler.h.

  {
  }

Member Function Documentation

HRESULT CDrawCliSearchHandler::FinalConstruct ( ) [inline]

Definition at line 45 of file DrawCliSearchHandler.h.

  {
    return S_OK;
  }

void CDrawCliSearchHandler::FinalRelease ( ) [inline]

Definition at line 50 of file DrawCliSearchHandler.h.

  {
    CSearchFilterImpl::FinalRelease ();
  }

IFACEMETHODIMP CDrawCliSearchHandler::GetClassID ( CLSID * pClassID ) [inline]

Definition at line 57 of file DrawCliSearchHandler.h.

  {
    *pClassID = CLSID_DrawCliSearchHandler;
    return S_OK;
  };

The documentation for this class was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/DrawCliSearchHandler.h
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CDrawDoc Class Reference

#include "drawdoc.h"

List of all members.

Public Member Functions

virtual | ~CDrawDoc ()
virtual | ~CDrawDoc ()
void | Add (CDrawObj *pObj)
void | Add (CDrawObj *pObj)
BOOL | CanDeactivateInplace () const
void | ComputePageSize ()
void | ComputePageSize ()
void | Draw (CDC *pDC, CDrawView *pView)
void | Draw (CDC *pDC)
void | Draw (CDC *pDC, CDrawView *pView)
void | FixUpObjectPositions ()
int | GetMapMode () const
int | GetMapMode () const
CDrawObjList * GetObjects ()
CDrawObjList * GetObjects ()
COLORREF | GetPaperColor () const
COLORREF | GetPaperColor () const
const CSize & | GetSize () const
const CSize & | GetSize () const
CDrawObj * | ObjectAt (const CPoint &point)
CDrawObj * | ObjectAt (const CPoint &point)
void | Remove (CDrawObj *pObj)
void | Remove (CDrawObj *pObj)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)
void | SetPreviewColor (COLORREF clr)

Public Attributes

CSummInfo * m_pSummInfo
CRect | m_rectDocumentBounds

Protected Member Functions

CDrawDoc ()
CDrawDoc ()
virtual BOOL | CanCloseFrame (CFrameWnd *pFrame)
afx_msg void | OnFileSummaryInfo ()
afx_msg void | OnFileSummaryInfo ()
virtual BOOL | OnNewDocument ()
virtual BOOL | OnNewDocument ()
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual BOOL | OnSaveDocument (LPCTSTR lpszPathName)
virtual BOOL | OnSaveDocument (LPCTSTR lpszPathName)
virtual void | OnUnloadHandler ()
afx_msg void | OnViewPaperColor ()
afx_msg void | OnViewPaperColor ()

Protected Attributes

BOOL | m_bCanDeactivateInplace
int | m_nMapMode
CDrawObjList m_objects
COLORREF | m_paperColor
COLORREF | m_paperColorLast
CSize | m_size

Detailed Description

Definition at line 17 of file drawdoc.h.

Constructor & Destructor Documentation

CDrawDoc::CDrawDoc ( ) [protected]

Definition at line 51 of file drawdoc.cpp.

{
  EnableCompoundFile();

  m_nMapMode = MM_ANISOTROPIC;
  m_paperColor = RGB(255, 255, 255);
  m_pSummInfo = NULL;
  ComputePageSize();
}

CDrawDoc::~CDrawDoc ( ) [virtual]

Definition at line 61 of file drawdoc.cpp.

{
  POSITION pos = m_objects.GetHeadPosition();
  while (pos != NULL)
    delete m_objects.GetNext(pos);
  delete m_pSummInfo;
}

CDrawDoc::CDrawDoc ( ) [protected]
virtual CDrawDoc::~CDrawDoc ( ) [virtual]

Member Function Documentation

void CDrawDoc::Add ( CDrawObj * pObj )

Definition at line 149 of file drawdoc.cpp.

{
  m_objects.AddTail(pObj);
  pObj->m_pDocument = this;
  SetModifiedFlag();
}

void CDrawDoc::Add ( CDrawObj * pObj )
BOOL CDrawDoc::CanCloseFrame ( CFrameWnd * pFrame ) [protected, virtual]

Definition at line 343 of file drawdoc.cpp.

{
  m_bCanDeactivateInplace = FALSE;

  BOOL bRes = COleDocument::CanCloseFrame(pFrame);

  m_bCanDeactivateInplace = TRUE;

  return bRes;
}

BOOL CDrawDoc::CanDeactivateInplace ( ) const [inline]

Definition at line 32 of file drawdoc.h.

  {
    return m_bCanDeactivateInplace;
  }

void CDrawDoc::ComputePageSize ( )
void CDrawDoc::ComputePageSize ( )

Definition at line 186 of file drawdoc.cpp.

{
  CSize new_size(850, 1100);  // 8.5" x 11" default

  CPrintDialog dlg(FALSE);
  if (AfxGetApp()->GetPrinterDeviceDefaults(&dlg.m_pd))
  {
    // GetPrinterDC returns a HDC so attach it
    CDC dc;
    HDC hDC= dlg.CreatePrinterDC();
    ASSERT(hDC != NULL);
    dc.Attach(hDC);

    // Get the size of the page in loenglish
    new_size.cx = MulDiv(dc.GetDeviceCaps(HORZSIZE), 1000, 254);
    new_size.cy = MulDiv(dc.GetDeviceCaps(VERTSIZE), 1000, 254);
  }

  // if size changed then iterate over views and reset
  if (new_size != m_size)
  {
    m_size = new_size;
    POSITION pos = GetFirstViewPosition();
    while (pos != NULL)
      ((CDrawView*)GetNextView(pos))->SetPageSize(m_size);
  }
}

void CDrawDoc::Draw | ( | CDC * | pDC,
 |  | CDrawView * | pView
 | ) |  |
void CDrawDoc::Draw | ( | CDC * | pDC,
 |  | CDrawView * | pView
 | ) |  |

Definition at line 137 of file drawdoc.cpp.

{
  POSITION pos = m_objects.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_objects.GetNext(pos);
    pObj->Draw(pDC);
    if (pView->m_bActive && !pDC->IsPrinting() && pView->IsSelected(pObj))
      pObj->DrawTracker(pDC, CDrawObj::selected);
  }
}

void CDrawDoc::Draw ( CDC * pDC )

Definition at line 175 of file drawdoc.cpp.

{
  CSize szPage = m_rectDocumentBounds.Size ();
  pDC->FillSolidRect(CRect (CPoint (0, 0), szPage), m_paperColor);

  pDC->SetMapMode(MM_ANISOTROPIC);
  pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX),
  pDC->GetDeviceCaps(LOGPIXELSY));

  pDC->SetWindowExt(100, -100);
  pDC->OffsetWindowOrg(-szPage.cx / 2, szPage.cy / 2);

  Draw (pDC, NULL);

  pDC->SetViewportOrg(0, 0);
  pDC->SetWindowOrg(0,0);
  pDC->SetMapMode(MM_TEXT);
}

void CDrawDoc::FixUpObjectPositions ( )

Definition at line 354 of file drawdoc.cpp.

{
  CPoint ptLeftTop(0, 0);
  CPoint ptRightBottom(0, 0);

  // find bounding rectangle of all objects
  for (POSITION pos = m_objects.GetHeadPosition(); pos != NULL;)
  {
    CDrawObj* pObj = m_objects.GetNext(pos);
    CRect rectPos = pObj->m_position;
    rectPos.NormalizeRect();
    ptLeftTop.x = min(rectPos.left, ptLeftTop.x);
    ptLeftTop.y = min(rectPos.top, ptLeftTop.y);
    ptRightBottom.x = max(rectPos.right, ptRightBottom.x);
    ptRightBottom.y = max(rectPos.bottom, ptRightBottom.y);
  }

  m_rectDocumentBounds.SetRect(ptLeftTop, ptRightBottom);

  // make some borders
  m_rectDocumentBounds.InflateRect(4, 4);

  // center all objects within bounding rectangle
  for (POSITION pos = m_objects.GetHeadPosition(); pos != NULL;)
  {
    CDrawObj* pObj = m_objects.GetNext(pos);
    pObj->MoveTo(CPoint (-ptLeftTop.x - m_rectDocumentBounds.Width() / 2, -ptLeftTop.y - m_rectDocumentBounds.Height() / 2));
  }
}

int CDrawDoc::GetMapMode ( ) const [inline]

Definition at line 28 of file drawdoc.h.

{ return m_nMapMode; }

int CDrawDoc::GetMapMode ( ) const [inline]

Definition at line 28 of file drawdoc.h.

{ return m_nMapMode; }

CDrawObjList* CDrawDoc::GetObjects ( ) [inline]

Definition at line 25 of file drawdoc.h.

{ return &m_objects; }

CDrawObjList* CDrawDoc::GetObjects ( ) [inline]

Definition at line 25 of file drawdoc.h.

{ return &m_objects; }

COLORREF CDrawDoc::GetPaperColor ( ) const [inline]

Definition at line 29 of file drawdoc.h.

{ return m_paperColor; }

COLORREF CDrawDoc::GetPaperColor ( ) const [inline]

Definition at line 29 of file drawdoc.h.

{ return m_paperColor; }

const CSize& CDrawDoc::GetSize ( ) const [inline]

Definition at line 26 of file drawdoc.h.

{ return m_size; }

const CSize& CDrawDoc::GetSize ( void ) const [inline]

Definition at line 26 of file drawdoc.h.

{ return m_size; }

CDrawObj* CDrawDoc::ObjectAt ( const CPoint & point )
CDrawObj * CDrawDoc::ObjectAt ( const CPoint & point )

Definition at line 172 of file drawdoc.cpp.

{
  CRect rect(point, CSize(1, 1));
  POSITION pos = m_objects.GetTailPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_objects.GetPrev(pos);
    if (pObj->Intersects(rect))
      return pObj;
  }

  return NULL;
}

afx_msg void CDrawDoc::OnFileSummaryInfo ( ) [protected]
void CDrawDoc::OnFileSummaryInfo ( ) [protected]

Definition at line 243 of file drawdoc.cpp.

{
  ASSERT_VALID(this);

  CPropertySheet sheet( _T("Document Properties") );
  CSummPage summ;
  CStatPage stat;
  sheet.AddPage( &summ );
  sheet.AddPage( &stat );

  summ.m_strAppname = m_pSummInfo->GetAppname();
  summ.m_strTitle   = m_pSummInfo->GetTitle();
  summ.m_strSubj    = m_pSummInfo->GetSubject();
  summ.m_strAuthor  = m_pSummInfo->GetAuthor();
  summ.m_strKeywd   = m_pSummInfo->GetKeywords();
  summ.m_strCmt     = m_pSummInfo->GetComments();
  summ.m_strTempl   = m_pSummInfo->GetTemplate();

  stat.m_strSavedBy    = m_pSummInfo->GetLastAuthor();
  stat.m_strRevNum     = m_pSummInfo->GetRevNum();
  stat.m_strEditTime   = m_pSummInfo->GetEditTime();
  stat.m_strLastPrint  = m_pSummInfo->GetLastPrintDate();
  stat.m_strCreateDate = m_pSummInfo->GetCreateDate();
  stat.m_strLastSave   = m_pSummInfo->GetLastSaveDate();
  stat.m_strNumPages   = m_pSummInfo->GetNumPages();
  stat.m_strNumWords   = m_pSummInfo->GetNumWords();
  stat.m_strNumChars   = m_pSummInfo->GetNumChars();
  stat.m_strSecurity   = m_pSummInfo->GetSecurity();

  if (sheet.DoModal() != IDOK)
    return;

  m_pSummInfo->SetAuthor(summ.m_strAuthor);
  m_pSummInfo->SetKeywords(summ.m_strKeywd);
  m_pSummInfo->SetSubject(summ.m_strSubj);
  m_pSummInfo->SetComments(summ.m_strCmt);
  m_pSummInfo->SetTemplate(summ.m_strTempl);
  m_pSummInfo->SetTitle(summ.m_strTitle);

  SetModifiedFlag();
}

BOOL CDrawDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 69 of file drawdoc.cpp.

{
  if (!COleDocument::OnNewDocument())
    return FALSE;

  // reinitialization code
  // (SDI documents will reuse this document)
  if(m_pSummInfo != NULL)
    delete m_pSummInfo;
  m_pSummInfo = new CSummInfo;
  // Title, Subject, Author, Keywords default to empty string
  // Comments, Template, SavedBy default to empty string
  // LastSave, LastPrint, EditTime, RevNum default to 0
  m_pSummInfo->StartEditTimeCount();
  m_pSummInfo->RecordCreateDate();
  m_pSummInfo->SetNumPages(1);
  // NumWords, NumChars default to 0
  m_pSummInfo->SetAppname( _T("DrawCli") );
  // Security defaults to 0
  return TRUE;
}

virtual BOOL CDrawDoc::OnNewDocument ( ) [protected, virtual]
virtual BOOL CDrawDoc::OnOpenDocument ( LPCTSTR lpszPathName ) [protected, virtual]
BOOL CDrawDoc::OnOpenDocument ( LPCTSTR lpszPathName ) [protected, virtual]

Definition at line 91 of file drawdoc.cpp.

{
  if( m_pSummInfo != NULL)
    delete m_pSummInfo;
  m_pSummInfo = new CSummInfo;
  m_pSummInfo->StartEditTimeCount();
  return COleDocument::OnOpenDocument(lpszPathName);
}

virtual BOOL CDrawDoc::OnSaveDocument ( LPCTSTR lpszPathName ) [protected, virtual]
BOOL CDrawDoc::OnSaveDocument ( LPCTSTR lpszPathName ) [protected, virtual]

Definition at line 100 of file drawdoc.cpp.

{
  m_pSummInfo->RecordSaveDate();
  m_pSummInfo->IncrRevNum();
  m_pSummInfo->SetLastAuthor(m_pSummInfo->GetAuthor());
  m_pSummInfo->AddCountToEditTime();
  m_pSummInfo->StartEditTimeCount();
  return COleDocument::OnSaveDocument(lpszPathName);
}

void CDrawDoc::OnUnloadHandler ( ) [protected, virtual]

Definition at line 82 of file drawdoc.cpp.

{
  POSITION pos = m_objects.GetHeadPosition();
  while (pos != NULL)
    delete m_objects.GetNext(pos);

  m_objects.RemoveAll();
  delete m_pSummInfo;
  m_pSummInfo = NULL;
}

afx_msg void CDrawDoc::OnViewPaperColor ( ) [protected]
void CDrawDoc::OnViewPaperColor ( ) [protected]

Definition at line 214 of file drawdoc.cpp.

{
  CColorDialog dlg;
  if (dlg.DoModal() != IDOK)
    return;

  m_paperColor = dlg.GetColor();
  SetModifiedFlag();
  UpdateAllViews(NULL);
}

void CDrawDoc::Remove ( CDrawObj * pObj )

Definition at line 156 of file drawdoc.cpp.

{
  // Find and remove from document
  POSITION pos = m_objects.Find(pObj);
  if (pos != NULL)
    m_objects.RemoveAt(pos);
  // set document modified flag
  SetModifiedFlag();

  // call remove for each view so that the view can remove from m_selection
  pos = GetFirstViewPosition();
  while (pos != NULL)
    ((CDrawView*)GetNextView(pos))->Remove(pObj);
}

void CDrawDoc::Remove ( CDrawObj * pObj )
void CDrawDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 113 of file drawdoc.cpp.

{
  if (ar.IsStoring())
  {
    ar << m_paperColor;
    m_objects.Serialize(ar);
    m_pSummInfo->WriteToStorage(m_lpRootStg);
  }
  else
  {
    ar >> m_paperColor;
    m_objects.Serialize(ar);
    m_pSummInfo->ReadFromStorage(m_lpRootStg);
  }

  // By calling the base class COleDocument, we enable serialization
  //  of the container document's COleClientItem objects automatically.
  COleDocument::Serialize(ar);
}

virtual void CDrawDoc::Serialize ( CArchive & ar ) [virtual]
void CDrawDoc::SetPreviewColor ( COLORREF clr )

Definition at line 337 of file drawdoc.cpp.

{
  m_paperColor = clr == -1 ? m_paperColorLast : clr;
  UpdateAllViews(NULL);
}

Member Data Documentation

BOOL CDrawDoc::m_bCanDeactivateInplace [protected]

Definition at line 83 of file drawdoc.h.

int CDrawDoc::m_nMapMode [protected]

Definition at line 55 of file drawdoc.h.

CDrawObjList CDrawDoc::m_objects [protected]

Definition at line 53 of file drawdoc.h.

COLORREF CDrawDoc::m_paperColor [protected]

Definition at line 56 of file drawdoc.h.

COLORREF CDrawDoc::m_paperColorLast [protected]

Definition at line 89 of file drawdoc.h.

CSummInfo * CDrawDoc::m_pSummInfo

Definition at line 30 of file drawdoc.h.

CRect CDrawDoc::m_rectDocumentBounds

Definition at line 44 of file drawdoc.h.

CSize CDrawDoc::m_size [protected]

Definition at line 54 of file drawdoc.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawdoc.h
  • vc2008fp/DrawClient/drawdoc.h
  • ole/drawcli/drawdoc.cpp
  • vc2008fp/DrawClient/drawdoc.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CDrawItem Class Reference

#include "cntritem.h"

List of all members.

Public Member Functions

CDrawItem (CDrawDoc *pContainer=NULL, CDrawOleObj *pDrawObj=NULL)
CDrawItem (CDrawDoc *pContainer=NULL, CDrawOleObj *pDrawObj=NULL)
~CDrawItem ()
~CDrawItem ()
CDrawView * GetActiveView ()
CDrawView * GetActiveView ()
CDrawDoc * GetDocument ()
CDrawDoc * GetDocument ()
virtual void | OnGetItemPosition (CRect &rPosition)
virtual void | OnGetItemPosition (CRect &rPosition)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)
BOOL | UpdateExtent ()
BOOL | UpdateExtent ()

Public Attributes

CDrawOleObj * m_pDrawObj

Protected Member Functions

virtual void | OnActivate ()
virtual void | OnActivate ()
virtual void | OnChange (OLE_NOTIFICATION wNotification, DWORD dwParam)
virtual void | OnChange (OLE_NOTIFICATION wNotification, DWORD dwParam)
virtual BOOL | OnChangeItemPosition (const CRect &rectPos)
virtual BOOL | OnChangeItemPosition (const CRect &rectPos)
virtual void | OnDeactivateUI (BOOL bUndoable)
virtual void | OnDeactivateUI (BOOL bUndoable)
virtual BOOL | OnShowControlBars (CFrameWnd *pFrameWnd, BOOL bShow)

Detailed Description

Definition at line 15 of file cntritem.h.

Constructor & Destructor Documentation

CDrawItem::CDrawItem | ( | CDrawDoc * | pContainer = NULL,
 |  | CDrawOleObj * | pDrawObj = NULL
 | ) |  |

Definition at line 30 of file cntritem.cpp.

  : COleClientItem(pContainer)
{
  m_pDrawObj = pDrawObj;
}

CDrawItem::~CDrawItem ( )

Definition at line 36 of file cntritem.cpp.

{
  if (m_pDrawObj != NULL)
    m_pDrawObj->m_pClientItem = NULL;
}

CDrawItem::CDrawItem | ( | CDrawDoc * | pContainer = NULL,
 |  | CDrawOleObj * | pDrawObj = NULL
 | ) |  |
CDrawItem::~CDrawItem ( )

Member Function Documentation

CDrawView* CDrawItem::GetActiveView ( ) [inline]

Definition at line 31 of file cntritem.h.

    { return (CDrawView*)COleClientItem::GetActiveView(); }

CDrawView* CDrawItem::GetActiveView ( ) [inline]

Definition at line 30 of file cntritem.h.

{ return(CDrawView*)COleClientItem::GetActiveView(); }

CDrawDoc* CDrawItem::GetDocument ( ) [inline]

Definition at line 29 of file cntritem.h.

    { return (CDrawDoc*)COleClientItem::GetDocument(); }

CDrawDoc* CDrawItem::GetDocument ( ) [inline]

Definition at line 29 of file cntritem.h.

{ return(CDrawDoc*)COleClientItem::GetDocument(); }

void CDrawItem::OnActivate ( ) [protected, virtual]

Definition at line 152 of file cntritem.cpp.

{
  // allow only one inplace active item per frame
  CView* pView = GetActiveView();
  ASSERT_VALID(pView);
  COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
  if (pItem != NULL && pItem != this)
    pItem->Close();

  COleClientItem::OnActivate();
}

virtual void CDrawItem::OnActivate ( ) [protected, virtual]
void CDrawItem::OnChange | ( | OLE_NOTIFICATION | wNotification,
 |  | DWORD | dwParam |
 | ) |  |  | [protected, virtual]

Definition at line 42 of file cntritem.cpp.

{
  ASSERT_VALID(this);

  COleClientItem::OnChange(nCode, dwParam);

  switch(nCode)
  {
  case OLE_CHANGED_STATE:
  case OLE_CHANGED_ASPECT:
    m_pDrawObj->Invalidate();
    break;
  case OLE_CHANGED:
    UpdateExtent(); // extent may have changed
    m_pDrawObj->Invalidate();
    break;
  }
}

virtual void CDrawItem::OnChange | ( | OLE_NOTIFICATION | wNotification,
 |  | DWORD | dwParam |
 | ) |  |  | [protected, virtual]
BOOL CDrawItem::OnChangeItemPosition ( const CRect & rectPos ) [protected, virtual]

Definition at line 61 of file cntritem.cpp.

{
  ASSERT_VALID(this);

  CDrawView* pView = GetActiveView();
  ASSERT_VALID(pView);
  CRect rect = rectPos;
  pView->ClientToDoc(rect);

  if (rect != m_pDrawObj->m_position)
  {
    // invalidate old rectangle
    m_pDrawObj->Invalidate();

    // update to new rectangle
    m_pDrawObj->m_position = rect;
    GetExtent(&m_pDrawObj->m_extent);

    // and invalidate new rectangle
    m_pDrawObj->Invalidate();

    // mark document as dirty
    GetDocument()->SetModifiedFlag();
  }
  return COleClientItem::OnChangeItemPosition(rectPos);
}

virtual BOOL CDrawItem::OnChangeItemPosition ( const CRect & rectPos ) [protected, virtual]
virtual void CDrawItem::OnDeactivateUI ( BOOL bUndoable ) [protected, virtual]
void CDrawItem::OnDeactivateUI ( BOOL bUndoable ) [protected, virtual]

Definition at line 164 of file cntritem.cpp.

{
  COleClientItem::OnDeactivateUI(bUndoable);

  // hide the object if it is not an outside-in object
  DWORD dwMisc = 0;
  m_lpObject->GetMiscStatus(GetDrawAspect(), &dwMisc);
  if (dwMisc & OLEMISC_INSIDEOUT)
    DoVerb(OLEIVERB_HIDE, NULL);
}

void CDrawItem::OnGetItemPosition ( CRect & rPosition ) [virtual]

Definition at line 88 of file cntritem.cpp.

{
  ASSERT_VALID(this);

  // update to extent of item if m_position is not initialized
  if (m_pDrawObj->m_position.IsRectEmpty())
    UpdateExtent();

  // copy m_position, which is in document coordinates
  CDrawView* pView = GetActiveView();
  ASSERT_VALID(pView);
  rPosition = m_pDrawObj->m_position;
  pView->DocToClient(rPosition);
}

virtual void CDrawItem::OnGetItemPosition ( CRect & rPosition ) [virtual]
BOOL CDrawItem::OnShowControlBars | ( | CFrameWnd * | pFrameWnd,
 |  | BOOL | bShow |
 | ) |  |  | [protected, virtual]

Definition at line 181 of file cntritem.cpp.

{
#ifndef SHARED_HANDLERS
  CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, pFrameWnd);

  if (pMainFrame != NULL)
  {
    ASSERT_VALID(pMainFrame);
    BOOL bResult = pMainFrame->OnShowPanes(bShow);
    pMainFrame->RecalcLayout();
    return bResult;
  }
#endif
  return FALSE;
}

void CDrawItem::Serialize ( CArchive & ar ) [virtual]

Definition at line 103 of file cntritem.cpp.

{
  ASSERT_VALID(this);

  // Call base class first to read in COleClientItem data.
  // Note: this sets up the m_pDocument pointer returned from
  //  CDrawItem::GetDocument, therefore it is a good idea
  //  to call the base class Serialize first.
  COleClientItem::Serialize(ar);

  // now store/retrieve data specific to CDrawItem
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

virtual void CDrawItem::Serialize ( CArchive & ar ) [virtual]
BOOL CDrawItem::UpdateExtent ( )

Definition at line 124 of file cntritem.cpp.

{
  CSize size;
  if (!GetExtent(&size) || size == m_pDrawObj->m_extent)
    return FALSE;       // blank

  // if new object (i.e. m_extent is empty) setup position
  if (m_pDrawObj->m_extent == CSize(0, 0))
  {
    m_pDrawObj->m_position.right =
      m_pDrawObj->m_position.left + MulDiv(size.cx, 10, 254);
    m_pDrawObj->m_position.bottom =
      m_pDrawObj->m_position.top - MulDiv(size.cy, 10, 254);
  }
  // else data changed so scale up rect as well
  else if (!IsInPlaceActive() && size != m_pDrawObj->m_extent)
  {
    m_pDrawObj->m_position.right = m_pDrawObj->m_position.left +
      MulDiv(m_pDrawObj->m_position.Width(), size.cx, m_pDrawObj->m_extent.cx);
    m_pDrawObj->m_position.bottom = m_pDrawObj->m_position.top +
      MulDiv(m_pDrawObj->m_position.Height(), size.cy, m_pDrawObj->m_extent.cy);
  }

  m_pDrawObj->m_extent = size;
  m_pDrawObj->Invalidate();   // redraw to the new size/position
  return TRUE;
}

BOOL CDrawItem::UpdateExtent ( )

Member Data Documentation

CDrawOleObj * CDrawItem::m_pDrawObj

Definition at line 34 of file cntritem.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/cntritem.h
  • vc2008fp/DrawClient/cntritem.h
  • ole/drawcli/cntritem.cpp
  • vc2008fp/DrawClient/cntritem.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawObj Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CDrawObj Class Reference

#include "drawobj.h"

Inherited by CDrawObjFriend, CDrawOleObj, CDrawOleObj, CDrawPoly, CDrawPoly, CDrawRect, and CDrawRect.

List of all members.

Public Types

enum TrackerState {
normal, selected, active, normal,
selected, active
}
enum TrackerState {
normal, selected, active, normal,
selected, active
}

Public Member Functions

CDrawObj (const CRect &position)
CDrawObj (const CRect &position)
virtual | ~CDrawObj ()
virtual | ~CDrawObj ()
virtual BOOL | CanChangeFillColor () const
virtual BOOL | CanChangeLineColor () const
virtual BOOL | CanChangeLineWeight () const
virtual CDrawObj * | Clone (CDrawDoc *pDoc=NULL)
virtual CDrawObj * | Clone (CDrawDoc *pDoc=NULL)
virtual void | Draw (CDC *pDC)
virtual void | Draw (CDC *pDC)
virtual void | DrawTracker (CDC *pDC, TrackerState state)
virtual void | DrawTracker (CDC *pDC, TrackerState state)
void | EnableFill (BOOL bEnable, BOOL bPreview=FALSE)
void | EnableLine (BOOL bEnable, BOOL bPreview=FALSE)
COLORREF | GetFillColor () const
virtual CPoint | GetHandle (int nHandle)
virtual CPoint | GetHandle (int nHandle)
virtual int | GetHandleCount ()
virtual int | GetHandleCount ()
virtual HCURSOR | GetHandleCursor (int nHandle)
virtual HCURSOR | GetHandleCursor (int nHandle)
CRect | GetHandleRect (int nHandleID, CDrawView *pView)
CRect | GetHandleRect (int nHandleID, CDrawView *pView)
COLORREF | GetLineColor () const
int | GetLineWeight () const
virtual int | HitTest (CPoint point, CDrawView *pView, BOOL bSelected)
virtual int | HitTest (CPoint point, CDrawView *pView, BOOL bSelected)
virtual BOOL | Intersects (const CRect &rect)
virtual BOOL | Intersects (const CRect &rect)
void | Invalidate ()
void | Invalidate ()
BOOL | IsEnableFill () const
BOOL | IsEnableLine () const
virtual void | MoveHandleTo (int nHandle, CPoint point, CDrawView *pView=NULL)
virtual void | MoveHandleTo (int nHandle, CPoint point, CDrawView *pView=NULL)
virtual void | MoveTo (const CRect &positon, CDrawView *pView=NULL)
virtual void | MoveTo (const CPoint &position)
virtual void | MoveTo (const CRect &positon, CDrawView *pView=NULL)
virtual void | OnEditProperties ()
virtual void | OnEditProperties ()
virtual void | OnOpen (CDrawView *pView)
virtual void | OnOpen (CDrawView *pView)
virtual void | Remove ()
virtual void | Remove ()
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)
virtual void | SetFillColor (COLORREF color, BOOL bPreview=FALSE)
virtual void | SetFillColor (COLORREF color)
virtual void | SetLineColor (COLORREF color, BOOL bPreview=FALSE)
virtual void | SetLineColor (COLORREF color)
void | SetLineWeight (int nWidth, BOOL bPreview=FALSE)

Public Attributes

CDrawDoc * m_pDocument
CRect | m_position

Protected Member Functions

CDrawObj ()
CDrawObj ()
DECLARE_SERIAL (CDrawObj)
DECLARE_SERIAL (CDrawObj)

Protected Attributes

BOOL | m_bBrush
BOOL | m_bPen
LOGBRUSH | m_logbrush
LOGPEN | m_logpen

Detailed Description

Definition at line 22 of file drawobj.h.

Member Enumeration Documentation

enum CDrawObj::TrackerState
Enumerator:
normal
selected
active
normal
selected
active

Definition at line 45 of file drawobj.h.

{ normal, selected, active };

enum CDrawObj::TrackerState
Enumerator:
normal
selected
active
normal
selected
active

Definition at line 50 of file drawobj.h.

{ normal, selected, active };

Constructor & Destructor Documentation

CDrawObj::CDrawObj ( ) [protected]

Definition at line 25 of file drawobj.cpp.

{
}

CDrawObj::CDrawObj ( const CRect & position )

Definition at line 33 of file drawobj.cpp.

{
  m_position = position;
  m_pDocument = NULL;

  m_bPen = TRUE;
  m_logpen.lopnStyle = PS_INSIDEFRAME;
  m_logpen.lopnWidth.x = 1;
  m_logpen.lopnWidth.y = 1;
  m_logpen.lopnColor = RGB(0, 0, 0);

  m_bBrush = TRUE;
  m_logbrush.lbStyle = BS_SOLID;
  m_logbrush.lbColor = RGB(192, 192, 192);
  m_logbrush.lbHatch = HS_HORIZONTAL;
}

CDrawObj::~CDrawObj ( ) [virtual]

Definition at line 29 of file drawobj.cpp.

{
}

CDrawObj::CDrawObj ( ) [protected]
CDrawObj::CDrawObj ( const CRect & position )
virtual CDrawObj::~CDrawObj ( ) [virtual]

Member Function Documentation

virtual BOOL CDrawObj::CanChangeFillColor ( ) const [inline, virtual]

Reimplemented in CDrawRect, and CDrawOleObj.

Definition at line 93 of file drawobj.h.

  {
    return TRUE;
  }

virtual BOOL CDrawObj::CanChangeLineColor ( ) const [inline, virtual]

Reimplemented in CDrawOleObj.

Definition at line 98 of file drawobj.h.

  {
    return TRUE;
  }

virtual BOOL CDrawObj::CanChangeLineWeight ( ) const [inline, virtual]

Reimplemented in CDrawOleObj.

Definition at line 103 of file drawobj.h.

  {
    return TRUE;
  }

CDrawObj * CDrawObj::Clone ( CDrawDoc * pDoc = NULL ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawOleObj, CDrawRect, CDrawPoly, and CDrawOleObj.

Definition at line 349 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CDrawObj* pClone = new CDrawObj(m_position);
  pClone->m_bPen = m_bPen;
  pClone->m_logpen = m_logpen;
  pClone->m_bBrush = m_bBrush;
  pClone->m_logbrush = m_logbrush;
  ASSERT_VALID(pClone);

  if (pDoc != NULL)
    pDoc->Add(pClone);

  return pClone;
}

virtual CDrawObj* CDrawObj::Clone ( CDrawDoc * pDoc = NULL ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawOleObj, CDrawRect, CDrawPoly, and CDrawOleObj.

CDrawObj::DECLARE_SERIAL ( CDrawObj ) [protected]
CDrawObj::DECLARE_SERIAL ( CDrawObj ) [protected]
void CDrawObj::Draw ( CDC * pDC ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawOleObj, CDrawRect, CDrawPoly, and CDrawOleObj.

Definition at line 82 of file drawobj.cpp.

{
}

virtual void CDrawObj::Draw ( CDC * pDC ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawOleObj, CDrawRect, CDrawPoly, and CDrawOleObj.

void CDrawObj::DrawTracker | ( | CDC * | pDC,
 |  | TrackerState | state |
 | ) |  |  | [virtual]

Definition at line 86 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  switch (state)
  {
  case normal:
    break;

  case selected:
  case active:
    {
      int nHandleCount = GetHandleCount();
      for (int nHandle = 1; nHandle <= nHandleCount; nHandle += 1)
      {
        CPoint handle = GetHandle(nHandle);
        pDC->PatBlt(handle.x - 3, handle.y - 3, 7, 7, DSTINVERT);
      }
    }
    break;
  }
}

virtual void CDrawObj::DrawTracker | ( | CDC * | pDC,
 |  | TrackerState | state |
 | ) |  |  | [virtual]
void CDrawObj::EnableFill | ( | BOOL | bEnable,
 |  | BOOL | bPreview = FALSE
 | ) |  |

Definition at line 472 of file drawobj.cpp.

{
  m_bBrush = bEnable;
  if (!bPreview)
  {
    m_pDocument->SetModifiedFlag();
  }
}

void CDrawObj::EnableLine | ( | BOOL | bEnable,
 |  | BOOL | bPreview = FALSE
 | ) |  |

Definition at line 481 of file drawobj.cpp.

{
  m_bPen = bEnable;
  if (!bPreview)
  {
    m_pDocument->SetModifiedFlag();
  }
}

COLORREF CDrawObj::GetFillColor ( ) const [inline]

Definition at line 74 of file drawobj.h.

  {
    return m_logbrush.lbColor;
  }

virtual CPoint CDrawObj::GetHandle ( int nHandle ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

CPoint CDrawObj::GetHandle ( int nHandle ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

Definition at line 182 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  int x, y, xCenter, yCenter;

  // this gets the center regardless of left/right and top/bottom ordering
  xCenter = m_position.left + m_position.Width() / 2;
  yCenter = m_position.top + m_position.Height() / 2;

  switch (nHandle)
  {
  default:
    ASSERT(FALSE);

  case 1:
    x = m_position.left;
    y = m_position.top;
    break;

  case 2:
    x = xCenter;
    y = m_position.top;
    break;

  case 3:
    x = m_position.right;
    y = m_position.top;
    break;

  case 4:
    x = m_position.right;
    y = yCenter;
    break;

  case 5:
    x = m_position.right;
    y = m_position.bottom;
    break;

  case 6:
    x = xCenter;
    y = m_position.bottom;
    break;

  case 7:
    x = m_position.left;
    y = m_position.bottom;
    break;

  case 8:
    x = m_position.left;
    y = yCenter;
    break;
  }

  return CPoint(x, y);
}

int CDrawObj::GetHandleCount ( ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

Definition at line 175 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  return 8;
}

virtual int CDrawObj::GetHandleCount ( ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

HCURSOR CDrawObj::GetHandleCursor ( int nHandle ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

Definition at line 258 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  LPCTSTR id;
  switch (nHandle)
  {
  default:
    ASSERT(FALSE);

  case 1:
  case 5:
    id = IDC_SIZENWSE;
    break;

  case 2:
  case 6:
    id = IDC_SIZENS;
    break;

  case 3:
  case 7:
    id = IDC_SIZENESW;
    break;

  case 4:
  case 8:
    id = IDC_SIZEWE;
    break;
  }

  return AfxGetApp()->LoadStandardCursor(id);
}

virtual HCURSOR CDrawObj::GetHandleCursor ( int nHandle ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

CRect CDrawObj::GetHandleRect | ( | int | nHandleID,
 |  | CDrawView * | pView
 | ) |  |

Definition at line 241 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  ENSURE(pView != NULL);

  CRect rect;
  // get the center of the handle in logical coords
  CPoint point = GetHandle(nHandleID);
  // convert to client/device coords
  pView->DocToClient(point);
  // return CRect of handle in device coords
  rect.SetRect(point.x-3, point.y-3, point.x+3, point.y+3);
  pView->ClientToDoc(rect);

  return rect;
}

CRect CDrawObj::GetHandleRect | ( | int | nHandleID,
 |  | CDrawView * | pView
 | ) |  |
COLORREF CDrawObj::GetLineColor ( ) const [inline]

Definition at line 62 of file drawobj.h.

  {
    return m_logpen.lopnColor;
  }

int CDrawObj::GetLineWeight ( ) const [inline]

Definition at line 67 of file drawobj.h.

  {
    return m_logpen.lopnWidth.x;
  }

int CDrawObj::HitTest | ( | CPoint | point,
 |  | CDrawView * | pView,
 |  | BOOL | bSelected |
 | ) |  |  | [virtual]

Definition at line 137 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  ASSERT(pView != NULL);

  if (bSelected)
  {
    int nHandleCount = GetHandleCount();
    for (int nHandle = 1; nHandle <= nHandleCount; nHandle += 1)
    {
      // GetHandleRect returns in logical coords
      CRect rc = GetHandleRect(nHandle,pView);
      if (point.x >= rc.left && point.x < rc.right &&
        point.y <= rc.top && point.y > rc.bottom)
        return nHandle;
    }
  }
  else
  {
    if (point.x >= m_position.left && point.x < m_position.right &&
      point.y <= m_position.top && point.y > m_position.bottom)
      return 1;
  }
  return 0;
}

virtual int CDrawObj::HitTest | ( | CPoint | point,
 |  | CDrawView * | pView,
 |  | BOOL | bSelected |
 | ) |  |  | [virtual]
virtual BOOL CDrawObj::Intersects ( const CRect & rect ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

BOOL CDrawObj::Intersects ( const CRect & rect ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

Definition at line 164 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CRect fixed = m_position;
  fixed.NormalizeRect();
  CRect rectT = rect;
  rectT.NormalizeRect();
  return !(rectT & fixed).IsRectEmpty();
}

void CDrawObj::Invalidate ( )

Definition at line 343 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  m_pDocument->UpdateAllViews(NULL, HINT_UPDATE_DRAWOBJ, this);
}

void CDrawObj::Invalidate ( )
BOOL CDrawObj::IsEnableFill ( ) const [inline]

Definition at line 79 of file drawobj.h.

  {
    return m_bBrush;
  }

BOOL CDrawObj::IsEnableLine ( ) const [inline]

Definition at line 86 of file drawobj.h.

  {
    return m_bPen;
  }

virtual void CDrawObj::MoveHandleTo | ( | int | nHandle,
 |  | CPoint | point,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

void CDrawObj::MoveHandleTo | ( | int | nHandle,
 |  | CPoint | point,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawRect, and CDrawPoly.

Definition at line 293 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CRect position = m_position;
  switch (nHandle)
  {
  default:
    ASSERT(FALSE);

  case 1:
    position.left = point.x;
    position.top = point.y;
    break;

  case 2:
    position.top = point.y;
    break;

  case 3:
    position.right = point.x;
    position.top = point.y;
    break;

  case 4:
    position.right = point.x;
    break;

  case 5:
    position.right = point.x;
    position.bottom = point.y;
    break;

  case 6:
    position.bottom = point.y;
    break;

  case 7:
    position.left = point.x;
    position.bottom = point.y;
    break;

  case 8:
    position.left = point.x;
    break;
  }

  MoveTo(position, pView);
}

void CDrawObj::MoveTo | ( | const CRect & | positon,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented in CDrawPoly, CDrawOleObj, CDrawPoly, and CDrawOleObj.

Definition at line 110 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  if (position == m_position)
    return;

  if (pView == NULL)
  {
    Invalidate();
    m_position = position;
    Invalidate();
  }
  else
  {
    pView->InvalObj(this);
    m_position = position;
    pView->InvalObj(this);
  }
  m_pDocument->SetModifiedFlag();
}

void CDrawObj::MoveTo ( const CPoint & position ) [virtual]

Reimplemented in CDrawPoly.

Definition at line 94 of file drawobj.cpp.

{
  m_position.OffsetRect (position);
}

virtual void CDrawObj::MoveTo | ( | const CRect & | positon,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented in CDrawPoly, CDrawOleObj, CDrawPoly, and CDrawOleObj.

virtual void CDrawObj::OnEditProperties ( ) [virtual]

Reimplemented in CDrawOleObj, and CDrawOleObj.

void CDrawObj::OnEditProperties ( ) [virtual]

Reimplemented in CDrawOleObj, and CDrawOleObj.

Definition at line 366 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CPropertySheet sheet( _T("Shape Properties") );
  CRectDlg dlg;
  dlg.m_bNoFill = !m_bBrush;
  dlg.m_penSize = m_bPen ? m_logpen.lopnWidth.x : 0;
  sheet.AddPage( &dlg );

  if (sheet.DoModal() != IDOK)
    return;

  m_bBrush = !dlg.m_bNoFill;
  m_bPen = dlg.m_penSize > 0;
  if (m_bPen)
  {
    m_logpen.lopnWidth.x = dlg.m_penSize;
    m_logpen.lopnWidth.y = dlg.m_penSize;
  }

  Invalidate();
  m_pDocument->SetModifiedFlag();
}

void CDrawObj::OnOpen ( CDrawView * pView ) [virtual]

Reimplemented in CDrawOleObj, and CDrawOleObj.

Definition at line 391 of file drawobj.cpp.

{
  OnEditProperties();
}

virtual void CDrawObj::OnOpen ( CDrawView * pView ) [virtual]

Reimplemented in CDrawOleObj, and CDrawOleObj.

virtual void CDrawObj::Remove ( ) [virtual]

Reimplemented in CDrawOleObj, and CDrawOleObj.

void CDrawObj::Remove ( ) [virtual]

Reimplemented in CDrawOleObj, and CDrawOleObj.

Definition at line 77 of file drawobj.cpp.

{
  delete this;
}

void CDrawObj::Serialize ( CArchive & ar ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawOleObj, CDrawRect, CDrawPoly, and CDrawOleObj.

Definition at line 50 of file drawobj.cpp.

{
  CObject::Serialize(ar);
  if (ar.IsStoring())
  {
    ar << m_position;
    ar << (WORD)m_bPen;
    ar.Write(&m_logpen, sizeof(LOGPEN));
    ar << (WORD)m_bBrush;
    ar.Write(&m_logbrush, sizeof(LOGBRUSH));
  }
  else
  {
    // get the document back pointer from the archive
    m_pDocument = (CDrawDoc*)ar.m_pDocument;
    ASSERT_VALID(m_pDocument);
    ASSERT_KINDOF(CDrawDoc, m_pDocument);

    WORD wTemp;
    ar >> m_position;
    ar >> wTemp; m_bPen = (BOOL)wTemp;
    ar.Read(&m_logpen,sizeof(LOGPEN));
    ar >> wTemp; m_bBrush = (BOOL)wTemp;
    ar.Read(&m_logbrush, sizeof(LOGBRUSH));
  }
}

virtual void CDrawObj::Serialize ( CArchive & ar ) [virtual]

Reimplemented in CDrawRect, CDrawPoly, CDrawOleObj, CDrawRect, CDrawPoly, and CDrawOleObj.

void CDrawObj::SetFillColor | ( | COLORREF | color,
 |  | BOOL | bPreview = FALSE |
 | ) |  |  | [virtual]

Definition at line 435 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  m_logbrush.lbColor = color;

  Invalidate();

  if (!bPreview)
  {
    m_pDocument->SetModifiedFlag();
  }
}

void CDrawObj::SetFillColor ( COLORREF color ) [virtual]

Definition at line 405 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  m_logbrush.lbColor = color;
  Invalidate();
  m_pDocument->SetModifiedFlag();
}

void CDrawObj::SetLineColor ( COLORREF color ) [virtual]

Definition at line 396 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  m_logpen.lopnColor = color;
  Invalidate();
  m_pDocument->SetModifiedFlag();
}

void CDrawObj::SetLineColor | ( | COLORREF | color,
 |  | BOOL | bPreview = FALSE |
 | ) |  |  | [virtual]

Definition at line 421 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  m_logpen.lopnColor = color;

  Invalidate();

  if (!bPreview)
  {
    m_pDocument->SetModifiedFlag();
  }
}

void CDrawObj::SetLineWeight | ( | int | nWidth,
 |  | BOOL | bPreview = FALSE
 | ) |  |

Definition at line 449 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  if (m_bPen)
  {
    m_bPen = nWidth > 0;
  }

  if (m_bPen)
  {
    m_logpen.lopnWidth.x = nWidth;
    m_logpen.lopnWidth.y = nWidth;
  }

  Invalidate();

  if (!bPreview)
  {
    m_pDocument->SetModifiedFlag();
  }
}

Member Data Documentation

BOOL CDrawObj::m_bBrush [protected]

Definition at line 69 of file drawobj.h.

BOOL CDrawObj::m_bPen [protected]

Definition at line 67 of file drawobj.h.

LOGBRUSH CDrawObj::m_logbrush [protected]

Definition at line 70 of file drawobj.h.

LOGPEN CDrawObj::m_logpen [protected]

Definition at line 68 of file drawobj.h.

CDrawDoc * CDrawObj::m_pDocument

Definition at line 34 of file drawobj.h.

CRect CDrawObj::m_position

Definition at line 33 of file drawobj.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawobj.h
  • vc2008fp/DrawClient/drawobj.h
  • ole/drawcli/drawobj.cpp
  • vc2008fp/DrawClient/drawobj.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawObjFriend Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Friends

CDrawObjFriend Class Reference

Inherits CDrawObj.

List of all members.

Friends

struct CDrawView::XPreviewStateItem

Detailed Description

Definition at line 1673 of file drawvw.cpp.

Friends And Related Function Documentation

friend struct CDrawView::XPreviewStateItem [friend]

Definition at line 1675 of file drawvw.cpp.

The documentation for this class was generated from the following file:
  • vc2008fp/DrawClient/drawvw.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawOleObj Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions

CDrawOleObj Class Reference

#include "drawobj.h"

Inherits CDrawObj, and CDrawObj.

List of all members.

Public Member Functions

CDrawOleObj (const CRect &position)
CDrawOleObj (const CRect &position)
virtual | ~CDrawOleObj ()
virtual | ~CDrawOleObj ()
virtual BOOL | CanChangeFillColor () const
virtual BOOL | CanChangeLineColor () const
virtual BOOL | CanChangeLineWeight () const
virtual CDrawObj * | Clone (CDrawDoc *pDoc)
virtual CDrawObj * | Clone (CDrawDoc *pDoc)
virtual void | Draw (CDC *pDC)
virtual void | Draw (CDC *pDC)
virtual void | MoveTo (const CRect &positon, CDrawView *pView=NULL)
virtual void | MoveTo (const CRect &positon, CDrawView *pView=NULL)
virtual void | OnEditProperties ()
virtual void | OnEditProperties ()
virtual void | OnOpen (CDrawView *pView)
virtual void | OnOpen (CDrawView *pView)
virtual void | Remove ()
virtual void | Remove ()
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)

Public Attributes

CSize | m_extent
CDrawItem * m_pClientItem

Static Public Attributes

static BOOL | c_bShowItems = TRUE

Protected Member Functions

CDrawOleObj ()
CDrawOleObj ()
DECLARE_SERIAL (CDrawOleObj)
DECLARE_SERIAL (CDrawOleObj)

Detailed Description

Definition at line 148 of file drawobj.h.

Constructor & Destructor Documentation

CDrawOleObj::CDrawOleObj ( ) [protected]

Definition at line 950 of file drawobj.cpp.

                         : m_extent(0,0)
{
  m_pClientItem = NULL;
}

CDrawOleObj::CDrawOleObj ( const CRect & position )

Definition at line 955 of file drawobj.cpp.

  : CDrawObj(position), m_extent(0, 0)
{
  m_pClientItem = NULL;
}

CDrawOleObj::~CDrawOleObj ( ) [virtual]

Definition at line 961 of file drawobj.cpp.

{
  if (m_pClientItem != NULL)
  {
    m_pClientItem->Release();
    m_pClientItem = NULL;
  }
}

CDrawOleObj::CDrawOleObj ( ) [protected]
CDrawOleObj::CDrawOleObj ( const CRect & position )
virtual CDrawOleObj::~CDrawOleObj ( ) [virtual]

Member Function Documentation

virtual BOOL CDrawOleObj::CanChangeFillColor ( ) const [inline, virtual]

Reimplemented from CDrawObj.

Definition at line 230 of file drawobj.h.

  {
    return FALSE;
  }

virtual BOOL CDrawOleObj::CanChangeLineColor ( ) const [inline, virtual]

Reimplemented from CDrawObj.

Definition at line 234 of file drawobj.h.

  {
    return FALSE;
  }

virtual BOOL CDrawOleObj::CanChangeLineWeight ( ) const [inline, virtual]

Reimplemented from CDrawObj.

Definition at line 238 of file drawobj.h.

  {
    return FALSE;
  }

CDrawObj * CDrawOleObj::Clone ( CDrawDoc * pDoc ) [virtual]

Reimplemented from CDrawObj.

Definition at line 999 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  AfxGetApp()->BeginWaitCursor();

  CDrawOleObj* pClone = NULL;
  CDrawItem* pItem = NULL;
  TRY
  {
    // perform a "deep copy" -- need to copy CDrawOleObj and the CDrawItem
    //  that it points to.
    pClone = new CDrawOleObj(m_position);
#pragma warning(suppress:6014)
    pItem = new CDrawItem(m_pDocument, pClone);
    if (!pItem->CreateCloneFrom(m_pClientItem))
    {
      AfxThrowMemoryException();
    }

    pClone->m_pClientItem = pItem;
    pClone->m_bPen = m_bPen;
    pClone->m_logpen = m_logpen;
    pClone->m_bBrush = m_bBrush;
    pClone->m_logbrush = m_logbrush;
    ASSERT_VALID(pClone);

    if (pDoc != NULL)
      pDoc->Add(pClone);
  }
  CATCH_ALL(e)
  {
    if(pItem)
      pItem->Delete();

    if(pClone)
    {
      pClone->m_pClientItem = NULL;
      pClone->Remove();
    }
    AfxGetApp()->EndWaitCursor();

    THROW_LAST();
  }
  END_CATCH_ALL

  AfxGetApp()->EndWaitCursor();
  return pClone;
}

virtual CDrawObj* CDrawOleObj::Clone ( CDrawDoc * pDoc ) [virtual]

Reimplemented from CDrawObj.

CDrawOleObj::DECLARE_SERIAL ( CDrawOleObj ) [protected]
CDrawOleObj::DECLARE_SERIAL ( CDrawOleObj ) [protected]
virtual void CDrawOleObj::Draw ( CDC * pDC ) [virtual]

Reimplemented from CDrawObj.

void CDrawOleObj::Draw ( CDC * pDC ) [virtual]

Reimplemented from CDrawObj.

Definition at line 1049 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CDrawItem* pItem = m_pClientItem;
  if (pItem != NULL)
  {
    // draw the OLE item itself
    pItem->Draw(pDC, m_position);

    // don't draw tracker in print preview or on printer
    if (!pDC->IsPrinting())
    {
      // use a CRectTracker to draw the standard effects
      CRectTracker tracker;
      tracker.m_rect = m_position;
      pDC->LPtoDP(tracker.m_rect);

      if (c_bShowItems)
      {
        // put correct border depending on item type
        if (pItem->GetType() == OT_LINK)
          tracker.m_nStyle |= CRectTracker::dottedLine;
        else
          tracker.m_nStyle |= CRectTracker::solidLine;
      }

      // put hatching over the item if it is currently open
      if (pItem->GetItemState() == COleClientItem::openState ||
        pItem->GetItemState() == COleClientItem::activeUIState)
      {
        tracker.m_nStyle |= CRectTracker::hatchInside;
      }
      tracker.Draw(pDC);
    }
  }
}

void CDrawOleObj::MoveTo | ( | const CRect & | positon,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

Definition at line 1105 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  if (position == m_position)
    return;

  // call base class to update position
  CDrawObj::MoveTo(position, pView);

  // update position of in-place editing session on position change
  if (m_pClientItem->IsInPlaceActive())
    m_pClientItem->SetItemRects();
}

virtual void CDrawOleObj::MoveTo | ( | const CRect & | positon,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

virtual void CDrawOleObj::OnEditProperties ( ) [virtual]

Reimplemented from CDrawObj.

void CDrawOleObj::OnEditProperties ( ) [virtual]

Reimplemented from CDrawObj.

Definition at line 1096 of file drawobj.cpp.

{
  // using COlePropertiesDialog directly means no scaling
  COlePropertiesDialog dlg(m_pClientItem, 100, 100, NULL);

  dlg.DoModal();
}

virtual void CDrawOleObj::OnOpen ( CDrawView * pView ) [virtual]

Reimplemented from CDrawObj.

void CDrawOleObj::OnOpen ( CDrawView * pView ) [virtual]

Reimplemented from CDrawObj.

Definition at line 1087 of file drawobj.cpp.

{
  AfxGetApp()->BeginWaitCursor();
  m_pClientItem->DoVerb(
    GetKeyState(VK_CONTROL) < 0 ? OLEIVERB_OPEN : OLEIVERB_PRIMARY,
    pView);
  AfxGetApp()->EndWaitCursor();
}

virtual void CDrawOleObj::Remove ( ) [virtual]

Reimplemented from CDrawObj.

void CDrawOleObj::Remove ( ) [virtual]

Reimplemented from CDrawObj.

Definition at line 970 of file drawobj.cpp.

{
  if (m_pClientItem != NULL)
  {
    m_pClientItem->Delete();
    m_pClientItem = NULL;
  }
  CDrawObj::Remove();
}

void CDrawOleObj::Serialize ( CArchive & ar ) [virtual]

Reimplemented from CDrawObj.

Definition at line 980 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CDrawObj::Serialize(ar);

  if (ar.IsStoring())
  {
    ar << m_extent;
    ar << m_pClientItem;
  }
  else
  {
    ar >> m_extent;
    ar >> m_pClientItem;
    m_pClientItem->m_pDrawObj = this;
  }
}

virtual void CDrawOleObj::Serialize ( CArchive & ar ) [virtual]

Reimplemented from CDrawObj.

Member Data Documentation

static BOOL CDrawOleObj::c_bShowItems = TRUE [static]

Definition at line 168 of file drawobj.h.

CSize CDrawOleObj::m_extent

Definition at line 171 of file drawobj.h.

CDrawItem * CDrawOleObj::m_pClientItem

Definition at line 170 of file drawobj.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawobj.h
  • vc2008fp/DrawClient/drawobj.h
  • ole/drawcli/drawobj.cpp
  • vc2008fp/DrawClient/drawobj.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawPoly Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

CDrawPoly Class Reference

#include "drawobj.h"

Inherits CDrawObj, and CDrawObj.

List of all members.

Public Member Functions

CDrawPoly (const CRect &position)
CDrawPoly (const CRect &position)
virtual | ~CDrawPoly ()
virtual | ~CDrawPoly ()
void | AddPoint (const CPoint &point, CDrawView *pView=NULL)
void | AddPoint (const CPoint &point, CDrawView *pView=NULL)
virtual CDrawObj * | Clone (CDrawDoc *pDoc)
virtual CDrawObj * | Clone (CDrawDoc *pDoc)
virtual void | Draw (CDC *pDC)
virtual void | Draw (CDC *pDC)
virtual CPoint | GetHandle (int nHandle)
virtual CPoint | GetHandle (int nHandle)
virtual int | GetHandleCount ()
virtual int | GetHandleCount ()
virtual HCURSOR | GetHandleCursor (int nHandle)
virtual HCURSOR | GetHandleCursor (int nHandle)
virtual BOOL | Intersects (const CRect &rect)
virtual BOOL | Intersects (const CRect &rect)
virtual void | MoveHandleTo (int nHandle, CPoint point, CDrawView *pView=NULL)
virtual void | MoveHandleTo (int nHandle, CPoint point, CDrawView *pView=NULL)
virtual void | MoveTo (const CRect &position, CDrawView *pView=NULL)
virtual void | MoveTo (const CPoint &position)
virtual void | MoveTo (const CRect &position, CDrawView *pView=NULL)
BOOL | RecalcBounds (CDrawView *pView=NULL)
BOOL | RecalcBounds (CDrawView *pView=NULL)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CDrawPoly ()
CDrawPoly ()
DECLARE_SERIAL (CDrawPoly)
DECLARE_SERIAL (CDrawPoly)

Protected Attributes

int | m_nAllocPoints
int | m_nPoints
CDrawPoly * m_pDrawObj
CPoint * | m_points

Friends

class | CPolyTool

Detailed Description

Definition at line 111 of file drawobj.h.

Constructor & Destructor Documentation

CDrawPoly::CDrawPoly ( ) [protected]

Definition at line 705 of file drawobj.cpp.

{
  m_points = NULL;
  m_nPoints = 0;
  m_nAllocPoints = 0;
}

CDrawPoly::CDrawPoly ( const CRect & position )

Definition at line 712 of file drawobj.cpp.

  : CDrawObj(position)
{
  m_points = NULL;
  m_nPoints = 0;
  m_nAllocPoints = 0;
  m_bPen = TRUE;
  m_bBrush = FALSE;
}

CDrawPoly::~CDrawPoly ( ) [virtual]

Definition at line 722 of file drawobj.cpp.

{
  if (m_points != NULL)
    delete[] m_points;
}

CDrawPoly::CDrawPoly ( ) [protected]
CDrawPoly::CDrawPoly ( const CRect & position )
virtual CDrawPoly::~CDrawPoly ( ) [virtual]

Member Function Documentation

void CDrawPoly::AddPoint | ( | const CPoint & | point,
 |  | CDrawView * | pView = NULL
 | ) |  |

Definition at line 877 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  if (m_nPoints == m_nAllocPoints)
  {
    CPoint* newPoints = new CPoint[m_nAllocPoints + 10];
    if (m_points != NULL)
    {
      memcpy_s(newPoints, sizeof(CPoint) * (m_nAllocPoints + 10), m_points, sizeof(CPoint) * m_nAllocPoints);
      delete[] m_points;
    }
    m_points = newPoints;
    m_nAllocPoints += 10;
  }

  if (m_nPoints == 0 || m_points[m_nPoints - 1] != point)
  {
    m_points[m_nPoints++] = point;
    if (!RecalcBounds(pView))
    {
      if (pView == NULL)
        Invalidate();
      else
        pView->InvalObj(this);
    }
    m_pDocument->SetModifiedFlag();
  }
}

void CDrawPoly::AddPoint | ( | const CPoint & | point,
 |  | CDrawView * | pView = NULL
 | ) |  |
virtual CDrawObj* CDrawPoly::Clone ( CDrawDoc * pDoc ) [virtual]

Reimplemented from CDrawObj.

CDrawObj * CDrawPoly::Clone ( CDrawDoc * pDoc ) [virtual]

Reimplemented from CDrawObj.

Definition at line 852 of file drawobj.cpp.

{
  ASSERT_VALID(this);

#pragma warning(suppress:6211)
  CDrawPoly* pClone = new CDrawPoly(m_position);
  pClone->m_bPen = m_bPen;
  pClone->m_logpen = m_logpen;
  pClone->m_bBrush = m_bBrush;
  pClone->m_logbrush = m_logbrush;
  pClone->m_points = new CPoint[m_nAllocPoints];

  memcpy_s(pClone->m_points, sizeof(CPoint) * m_nAllocPoints, m_points, sizeof(CPoint) * m_nPoints);
  pClone->m_nAllocPoints = m_nAllocPoints;
  pClone->m_nPoints = m_nPoints;
  ASSERT_VALID(pClone);

  if (pDoc != NULL)
    pDoc->Add(pClone);

  ASSERT_VALID(pClone);
  return pClone;
}

CDrawPoly::DECLARE_SERIAL ( CDrawPoly ) [protected]
CDrawPoly::DECLARE_SERIAL ( CDrawPoly ) [protected]
virtual void CDrawPoly::Draw ( CDC * pDC ) [virtual]

Reimplemented from CDrawObj.

void CDrawPoly::Draw ( CDC * pDC ) [virtual]

Reimplemented from CDrawObj.

Definition at line 750 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CBrush brush;
  if (!brush.CreateBrushIndirect(&m_logbrush))
    return;
  CPen pen;
  if (!pen.CreatePenIndirect(&m_logpen))
    return;

  CBrush* pOldBrush;
  CPen* pOldPen;

  if (m_bBrush)
    pOldBrush = pDC->SelectObject(&brush);
  else
    pOldBrush = (CBrush*)pDC->SelectStockObject(NULL_BRUSH);

  if (m_bPen)
    pOldPen = pDC->SelectObject(&pen);
  else
    pOldPen = (CPen*)pDC->SelectStockObject(NULL_PEN);

  pDC->Polygon(m_points, m_nPoints);

  pDC->SelectObject(pOldBrush);
  pDC->SelectObject(pOldPen);
}

CPoint CDrawPoly::GetHandle ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

Definition at line 812 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  ASSERT(nHandle >= 1 && nHandle <= m_nPoints);
  return m_points[nHandle - 1];
}

virtual CPoint CDrawPoly::GetHandle ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

virtual int CDrawPoly::GetHandleCount ( ) [virtual]

Reimplemented from CDrawObj.

int CDrawPoly::GetHandleCount ( ) [virtual]

Reimplemented from CDrawObj.

Definition at line 807 of file drawobj.cpp.

{
  return m_nPoints;
}

HCURSOR CDrawPoly::GetHandleCursor ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

Definition at line 820 of file drawobj.cpp.

{
  return AfxGetApp()->LoadStandardCursor(IDC_ARROW);
}

virtual HCURSOR CDrawPoly::GetHandleCursor ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

BOOL CDrawPoly::Intersects ( const CRect & rect ) [virtual]

Reimplemented from CDrawObj.

Definition at line 844 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  CRgn rgn;
  rgn.CreatePolygonRgn(m_points, m_nPoints, ALTERNATE);
  return rgn.RectInRegion(rect);
}

virtual BOOL CDrawPoly::Intersects ( const CRect & rect ) [virtual]

Reimplemented from CDrawObj.

void CDrawPoly::MoveHandleTo | ( | int | nHandle,
 |  | CPoint | point,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

Definition at line 826 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  ASSERT(nHandle >= 1 && nHandle <= m_nPoints);
  if (m_points[nHandle - 1] == point)
    return;

  m_points[nHandle - 1] = point;
  RecalcBounds(pView);

  if (pView == NULL)
    Invalidate();
  else
    pView->InvalObj(this);
  m_pDocument->SetModifiedFlag();
}

virtual void CDrawPoly::MoveHandleTo | ( | int | nHandle,
 |  | CPoint | point,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

virtual void CDrawPoly::MoveTo | ( | const CRect & | position,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

void CDrawPoly::MoveTo ( const CPoint & position ) [virtual]

Reimplemented from CDrawObj.

Definition at line 883 of file drawobj.cpp.

{
  CDrawObj::MoveTo (position);
  for (int i = 0; i < m_nPoints; i += 1)
  {
    m_points[i].x += position.x;
    m_points[i].y += position.y;
  }
}

void CDrawPoly::MoveTo | ( | const CRect & | position,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

Definition at line 781 of file drawobj.cpp.

{
  ASSERT_VALID(this);
  if (position == m_position)
    return;

  if (pView == NULL)
    Invalidate();
  else
    pView->InvalObj(this);

  for (int i = 0; i < m_nPoints; i += 1)
  {
    m_points[i].x += position.left - m_position.left;
    m_points[i].y += position.top - m_position.top;
  }

  m_position = position;

  if (pView == NULL)
    Invalidate();
  else
    pView->InvalObj(this);
  m_pDocument->SetModifiedFlag();
}

BOOL CDrawPoly::RecalcBounds ( CDrawView * pView = NULL )
BOOL CDrawPoly::RecalcBounds ( CDrawView * pView = NULL )

Definition at line 906 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  if (m_nPoints == 0)
    return FALSE;

  CRect bounds(m_points[0], CSize(0, 0));
  for (int i = 1; i < m_nPoints; ++i)
  {
    if (m_points[i].x < bounds.left)
      bounds.left = m_points[i].x;
    if (m_points[i].x > bounds.right)
      bounds.right = m_points[i].x;
    if (m_points[i].y < bounds.top)
      bounds.top = m_points[i].y;
    if (m_points[i].y > bounds.bottom)
      bounds.bottom = m_points[i].y;
  }

  if (bounds == m_position)
    return FALSE;

  if (pView == NULL)
    Invalidate();
  else
    pView->InvalObj(this);

  m_position = bounds;

  if (pView == NULL)
    Invalidate();
  else
    pView->InvalObj(this);

  return TRUE;
}

virtual void CDrawPoly::Serialize ( CArchive & ar ) [virtual]

Reimplemented from CDrawObj.

void CDrawPoly::Serialize ( CArchive & ar ) [virtual]

Reimplemented from CDrawObj.

Definition at line 728 of file drawobj.cpp.

{
  int i;
  CDrawObj::Serialize( ar );
  if( ar.IsStoring() )
  {
    ar << (WORD) m_nPoints;
    ar << (WORD) m_nAllocPoints;
    for (i = 0;i< m_nPoints; i++)
      ar << m_points[i];
  }
  else
  {
    WORD wTemp;
    ar >> wTemp; m_nPoints = wTemp;
    ar >> wTemp; m_nAllocPoints = wTemp;
    m_points = new CPoint[m_nAllocPoints];
    for (i = 0;i < m_nPoints; i++)
      ar >> m_points[i];
  }
}

Friends And Related Function Documentation

CPolyTool [friend]

Definition at line 143 of file drawobj.h.

Member Data Documentation

int CDrawPoly::m_nAllocPoints [protected]

Definition at line 139 of file drawobj.h.

int CDrawPoly::m_nPoints [protected]

Definition at line 138 of file drawobj.h.

CDrawPoly * CDrawPoly::m_pDrawObj [protected]

Definition at line 141 of file drawobj.h.

CPoint * CDrawPoly::m_points [protected]

Definition at line 140 of file drawobj.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawobj.h
  • vc2008fp/DrawClient/drawobj.h
  • ole/drawcli/drawobj.cpp
  • vc2008fp/DrawClient/drawobj.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawRect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends

CDrawRect Class Reference

#include "drawobj.h"

Inherits CDrawObj, and CDrawObj.

List of all members.

Public Types

enum Shape {
rectangle, roundRectangle, ellipse, line,
rectangle, roundRectangle, ellipse, line
}

Public Member Functions

CDrawRect (const CRect &position)
CDrawRect (const CRect &position)
virtual BOOL | CanChangeFillColor () const
virtual CDrawObj * | Clone (CDrawDoc *pDoc)
virtual CDrawObj * | Clone (CDrawDoc *pDoc)
virtual void | Draw (CDC *pDC)
virtual void | Draw (CDC *pDC)
virtual CPoint | GetHandle (int nHandle)
virtual CPoint | GetHandle (int nHandle)
virtual int | GetHandleCount ()
virtual int | GetHandleCount ()
virtual HCURSOR | GetHandleCursor (int nHandle)
virtual HCURSOR | GetHandleCursor (int nHandle)
Shape | GetShape () const
virtual BOOL | Intersects (const CRect &rect)
virtual BOOL | Intersects (const CRect &rect)
virtual void | MoveHandleTo (int nHandle, CPoint point, CDrawView *pView=NULL)
virtual void | MoveHandleTo (int nHandle, CPoint point, CDrawView *pView=NULL)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)

Protected Types

enum Shape {
rectangle, roundRectangle, ellipse, line,
rectangle, roundRectangle, ellipse, line
}

Protected Member Functions

CDrawRect ()
CDrawRect ()
DECLARE_SERIAL (CDrawRect)
DECLARE_SERIAL (CDrawRect)

Protected Attributes

Shape m_nShape
CPoint | m_roundness

Friends

class | CRectTool

Detailed Description

Definition at line 79 of file drawobj.h.

Member Enumeration Documentation

enum CDrawRect::Shape [protected]
Enumerator:
rectangle
roundRectangle
ellipse
line
rectangle
roundRectangle
ellipse
line

Definition at line 100 of file drawobj.h.

{ rectangle, roundRectangle, ellipse, line };

enum CDrawRect::Shape
Enumerator:
rectangle
roundRectangle
ellipse
line
rectangle
roundRectangle
ellipse
line

Definition at line 155 of file drawobj.h.

{ rectangle, roundRectangle, ellipse, line };

Constructor & Destructor Documentation

CDrawRect::CDrawRect ( ) [protected]

Definition at line 427 of file drawobj.cpp.

{
}

CDrawRect::CDrawRect ( const CRect & position )

Definition at line 431 of file drawobj.cpp.

  : CDrawObj(position)
{
  ASSERT_VALID(this);

  m_nShape = rectangle;
  m_roundness.x = 16;
  m_roundness.y = 16;
}

CDrawRect::CDrawRect ( ) [protected]
CDrawRect::CDrawRect ( const CRect & position )

Member Function Documentation

virtual BOOL CDrawRect::CanChangeFillColor ( ) const [inline, virtual]

Reimplemented from CDrawObj.

Definition at line 150 of file drawobj.h.

  {
    return m_nShape != line;
  }

CDrawObj * CDrawRect::Clone ( CDrawDoc * pDoc ) [virtual]

Reimplemented from CDrawObj.

Definition at line 680 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CDrawRect* pClone = new CDrawRect(m_position);
  pClone->m_bPen = m_bPen;
  pClone->m_logpen = m_logpen;
  pClone->m_bBrush = m_bBrush;
  pClone->m_logbrush = m_logbrush;
  pClone->m_nShape = m_nShape;
  pClone->m_roundness = m_roundness;
  ASSERT_VALID(pClone);

  if (pDoc != NULL)
    pDoc->Add(pClone);

  ASSERT_VALID(pClone);
  return pClone;
}

virtual CDrawObj* CDrawRect::Clone ( CDrawDoc * pDoc ) [virtual]

Reimplemented from CDrawObj.

CDrawRect::DECLARE_SERIAL ( CDrawRect ) [protected]
CDrawRect::DECLARE_SERIAL ( CDrawRect ) [protected]
void CDrawRect::Draw ( CDC * pDC ) [virtual]

Reimplemented from CDrawObj.

Definition at line 459 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CBrush brush;
  if (!brush.CreateBrushIndirect(&m_logbrush))
    return;
  CPen pen;
  if (!pen.CreatePenIndirect(&m_logpen))
    return;

  CBrush* pOldBrush;
  CPen* pOldPen;

  if (m_bBrush)
    pOldBrush = pDC->SelectObject(&brush);
  else
    pOldBrush = (CBrush*)pDC->SelectStockObject(NULL_BRUSH);

  if (m_bPen)
    pOldPen = pDC->SelectObject(&pen);
  else
    pOldPen = (CPen*)pDC->SelectStockObject(NULL_PEN);

  CRect rect = m_position;
  switch (m_nShape)
  {
  case rectangle:
    pDC->Rectangle(rect);
    break;

  case roundRectangle:
    pDC->RoundRect(rect, m_roundness);
    break;

  case ellipse:
    pDC->Ellipse(rect);
    break;

  case line:
    if (rect.top > rect.bottom)
    {
      rect.top -= m_logpen.lopnWidth.y / 2;
      rect.bottom += (m_logpen.lopnWidth.y + 1) / 2;
    }
    else
    {
      rect.top += (m_logpen.lopnWidth.y + 1) / 2;
      rect.bottom -= m_logpen.lopnWidth.y / 2;
    }

    if (rect.left > rect.right)
    {
      rect.left -= m_logpen.lopnWidth.x / 2;
      rect.right += (m_logpen.lopnWidth.x + 1) / 2;
    }
    else
    {
      rect.left += (m_logpen.lopnWidth.x + 1) / 2;
      rect.right -= m_logpen.lopnWidth.x / 2;
    }

    pDC->MoveTo(rect.TopLeft());
    pDC->LineTo(rect.BottomRight());
    break;
  }

  pDC->SelectObject(pOldBrush);
  pDC->SelectObject(pOldPen);
}

virtual void CDrawRect::Draw ( CDC * pDC ) [virtual]

Reimplemented from CDrawObj.

CPoint CDrawRect::GetHandle ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

Definition at line 540 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  if (m_nShape == line && nHandle == 2)
    nHandle = 5;
  else if (m_nShape == roundRectangle && nHandle == 9)
  {
    CRect rect = m_position;
    rect.NormalizeRect();
    CPoint point = rect.BottomRight();
    point.x -= m_roundness.x / 2;
    point.y -= m_roundness.y / 2;
    return point;
  }

  return CDrawObj::GetHandle(nHandle);
}

virtual CPoint CDrawRect::GetHandle ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

int CDrawRect::GetHandleCount ( ) [virtual]

Reimplemented from CDrawObj.

Definition at line 531 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  return m_nShape == line ? 2 :
    CDrawObj::GetHandleCount() + (m_nShape == roundRectangle);
}

virtual int CDrawRect::GetHandleCount ( ) [virtual]

Reimplemented from CDrawObj.

HCURSOR CDrawRect::GetHandleCursor ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

Definition at line 559 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  if (m_nShape == line && nHandle == 2)
    nHandle = 5;
  else if (m_nShape == roundRectangle && nHandle == 9)
    return AfxGetApp()->LoadStandardCursor(IDC_SIZEALL);
  return CDrawObj::GetHandleCursor(nHandle);
}

virtual HCURSOR CDrawRect::GetHandleCursor ( int nHandle ) [virtual]

Reimplemented from CDrawObj.

Shape CDrawRect::GetShape ( ) const [inline]

Definition at line 156 of file drawobj.h.

  {
    return m_nShape;
  }

virtual BOOL CDrawRect::Intersects ( const CRect & rect ) [virtual]

Reimplemented from CDrawObj.

BOOL CDrawRect::Intersects ( const CRect & rect ) [virtual]

Reimplemented from CDrawObj.

Definition at line 603 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CRect rectT = rect;
  rectT.NormalizeRect();

  CRect fixed = m_position;
  fixed.NormalizeRect();
  if ((rectT & fixed).IsRectEmpty())
    return FALSE;

  CRgn rgn;
  switch (m_nShape)
  {
  case rectangle:
    return TRUE;

  case roundRectangle:
    rgn.CreateRoundRectRgn(fixed.left, fixed.top, fixed.right, fixed.bottom,
      m_roundness.x, m_roundness.y);
    break;

  case ellipse:
    rgn.CreateEllipticRgnIndirect(fixed);
    break;

  case line:
    {
      int x = (m_logpen.lopnWidth.x + 5) / 2;
      int y = (m_logpen.lopnWidth.y + 5) / 2;
      POINT points[4];
      points[0].x = fixed.left;
      points[0].y = fixed.top;
      points[1].x = fixed.left;
      points[1].y = fixed.top;
      points[2].x = fixed.right;
      points[2].y = fixed.bottom;
      points[3].x = fixed.right;
      points[3].y = fixed.bottom;

      if (fixed.left < fixed.right)
      {
        points[0].x -= x;
        points[1].x += x;
        points[2].x += x;
        points[3].x -= x;
      }
      else
      {
        points[0].x += x;
        points[1].x -= x;
        points[2].x -= x;
        points[3].x += x;
      }

      if (fixed.top < fixed.bottom)
      {
        points[0].y -= y;
        points[1].y += y;
        points[2].y += y;
        points[3].y -= y;
      }
      else
      {
        points[0].y += y;
        points[1].y -= y;
        points[2].y -= y;
        points[3].y += y;
      }
      rgn.CreatePolygonRgn(points, 4, ALTERNATE);
    }
    break;
  }
  return rgn.RectInRegion(fixed);
}

void CDrawRect::MoveHandleTo | ( | int | nHandle,
 |  | CPoint | point,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

Definition at line 571 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  if (m_nShape == line && nHandle == 2)
    nHandle = 5;
  else if (m_nShape == roundRectangle && nHandle == 9)
  {
    CRect rect = m_position;
    rect.NormalizeRect();
    if (point.x > rect.right - 1)
      point.x = rect.right - 1;
    else if (point.x < rect.left + rect.Width() / 2)
      point.x = rect.left + rect.Width() / 2;
    if (point.y > rect.bottom - 1)
      point.y = rect.bottom - 1;
    else if (point.y < rect.top + rect.Height() / 2)
      point.y = rect.top + rect.Height() / 2;
    m_roundness.x = 2 * (rect.right - point.x);
    m_roundness.y = 2 * (rect.bottom - point.y);
    m_pDocument->SetModifiedFlag();
    if (pView == NULL)
      Invalidate();
    else
      pView->InvalObj(this);
    return;
  }

  CDrawObj::MoveHandleTo(nHandle, point, pView);
}

virtual void CDrawRect::MoveHandleTo | ( | int | nHandle,
 |  | CPoint | point,
 |  | CDrawView * | pView = NULL |
 | ) |  |  | [virtual]

Reimplemented from CDrawObj.

void CDrawRect::Serialize ( CArchive & ar ) [virtual]

Reimplemented from CDrawObj.

Definition at line 441 of file drawobj.cpp.

{
  ASSERT_VALID(this);

  CDrawObj::Serialize(ar);
  if (ar.IsStoring())
  {
    ar << (WORD) m_nShape;
    ar << m_roundness;
  }
  else
  {
    WORD wTemp;
    ar >> wTemp; m_nShape = (Shape)wTemp;
    ar >> m_roundness;
  }
}

virtual void CDrawRect::Serialize ( CArchive & ar ) [virtual]

Reimplemented from CDrawObj.

Friends And Related Function Documentation

CRectTool [friend]

Definition at line 104 of file drawobj.h.

Member Data Documentation

Shape CDrawRect::m_nShape [protected]

Definition at line 101 of file drawobj.h.

CPoint CDrawRect::m_roundness [protected]

Definition at line 102 of file drawobj.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawobj.h
  • vc2008fp/DrawClient/drawobj.h
  • ole/drawcli/drawobj.cpp
  • vc2008fp/DrawClient/drawobj.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawTool Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

CDrawTool Class Reference

#include "drawtool.h"

Inherited by CPolyTool, CPolyTool, CRectTool, CRectTool, CSelectTool, and CSelectTool.

List of all members.

Public Member Functions

CDrawTool (DrawShape nDrawShape)
CDrawTool (DrawShape nDrawShape)
virtual void | OnCancel ()
virtual void | OnCancel ()
virtual void | OnEditProperties (CDrawView *pView)
virtual void | OnEditProperties (CDrawView *pView)
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)

Static Public Member Functions

static CDrawTool * | FindTool (DrawShape drawShape)
static CDrawTool * | FindTool (DrawShape drawShape)

Public Attributes

DrawShape m_drawShape

Static Public Attributes

static CPoint | c_down
static DrawShape | c_drawShape = selection
static CPoint | c_last
static UINT | c_nDownFlags
static CPtrList | c_tools

Detailed Description

Definition at line 30 of file drawtool.h.

Constructor & Destructor Documentation

CDrawTool::CDrawTool ( DrawShape nDrawShape )

Definition at line 37 of file drawtool.cpp.

{
  m_drawShape = drawShape;
  c_tools.AddTail(this);
}

CDrawTool::CDrawTool ( DrawShape nDrawShape )

Member Function Documentation

CDrawTool * CDrawTool::FindTool ( DrawShape drawShape ) [static]

Definition at line 43 of file drawtool.cpp.

{
  POSITION pos = c_tools.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawTool* pTool = (CDrawTool*)c_tools.GetNext(pos);
    if (pTool->m_drawShape == drawShape)
      return pTool;
  }

  return NULL;
}

static CDrawTool* CDrawTool::FindTool ( DrawShape drawShape ) [static]
virtual void CDrawTool::OnCancel ( ) [virtual]

Reimplemented in CPolyTool, and CPolyTool.

void CDrawTool::OnCancel ( ) [virtual]

Reimplemented in CPolyTool, and CPolyTool.

Definition at line 94 of file drawtool.cpp.

{
  c_drawShape = selection;
}

void CDrawTool::OnEditProperties ( CDrawView * pView ) [virtual]

Reimplemented in CSelectTool, and CSelectTool.

Definition at line 90 of file drawtool.cpp.

{
}

virtual void CDrawTool::OnEditProperties ( CDrawView * pView ) [virtual]

Reimplemented in CSelectTool, and CSelectTool.

void CDrawTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

Definition at line 72 of file drawtool.cpp.

{
}

virtual void CDrawTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

virtual void CDrawTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

void CDrawTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

Definition at line 56 of file drawtool.cpp.

{
  // deactivate any in-place active item on this view!
  COleClientItem* pActiveItem = pView->GetDocument()->GetInPlaceActiveItem(pView);
  if (pActiveItem != NULL)
  {
    pActiveItem->Close();
    ASSERT(pView->GetDocument()->GetInPlaceActiveItem(pView) == NULL);
  }

  pView->SetCapture();
  c_nDownFlags = nFlags;
  c_down = point;
  c_last = point;
}

void CDrawTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

Definition at line 76 of file drawtool.cpp.

{
  ReleaseCapture();

  if (point == c_down)
    c_drawShape = selection;
}

virtual void CDrawTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

void CDrawTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

Definition at line 84 of file drawtool.cpp.

{
  c_last = point;
  SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
}

virtual void CDrawTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented in CSelectTool, CRectTool, CPolyTool, CSelectTool, CRectTool, and CPolyTool.

Member Data Documentation

static CPoint CDrawTool::c_down [static]

Definition at line 49 of file drawtool.h.

static DrawShape CDrawTool::c_drawShape = selection [static]

Definition at line 52 of file drawtool.h.

static CPoint CDrawTool::c_last [static]

Definition at line 51 of file drawtool.h.

static UINT CDrawTool::c_nDownFlags [static]

Definition at line 50 of file drawtool.h.

static CPtrList CDrawTool::c_tools [static]

Definition at line 48 of file drawtool.h.

DrawShape CDrawTool::m_drawShape

Definition at line 45 of file drawtool.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawtool.h
  • vc2008fp/DrawClient/drawtool.h
  • ole/drawcli/drawtool.cpp
  • vc2008fp/DrawClient/drawtool.cpp
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends

CDrawView Class Reference

#include "drawvw.h"

List of all members.

Classes

struct | XPreviewStateItem

Public Member Functions

virtual | ~CDrawView ()
virtual | ~CDrawView ()
void | ClientToDoc (CPoint &point)
void | ClientToDoc (CPoint &point)
void | ClientToDoc (CRect &rect)
void | ClientToDoc (CRect &rect)
void | CloneSelection ()
void | CloneSelection ()
void | Deselect (CDrawObj *pObj)
void | Deselect (CDrawObj *pObj)
void | DocToClient (CRect &rect)
void | DocToClient (CPoint &point)
void | DocToClient (CPoint &point)
void | DocToClient (CRect &rect)
void | DrawGrid (CDC *pDC)
void | DrawGrid (CDC *pDC)
CDrawDoc * GetDocument ()
CDrawDoc * GetDocument ()
CRect | GetInitialPosition ()
CRect | GetInitialPosition ()
void | InvalObj (CDrawObj *pObj)
void | InvalObj (CDrawObj *pObj)
virtual BOOL | IsSelected (const CObject *pDocItem) const
virtual BOOL | IsSelected (const CObject *pDocItem) const
virtual void | OnActivateView (BOOL bActivate, CView *pActiveView, CView *pDeactiveView)
virtual void | OnActivateView (BOOL bActivate, CView *pActiveView, CView *pDeactiveView)
virtual DROPEFFECT | OnDragEnter (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual DROPEFFECT | OnDragEnter (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual void | OnDragLeave ()
virtual void | OnDragLeave ()
virtual DROPEFFECT | OnDragOver (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual DROPEFFECT | OnDragOver (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual void | OnDraw (CDC *pDC)
virtual void | OnDraw (CDC *pDC)
virtual BOOL | OnDrop (COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point)
virtual BOOL | OnDrop (COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point)
virtual void | OnPrepareDC (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnPrepareDC (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
virtual BOOL | OnScrollBy (CSize sizeScroll, BOOL bDoScroll)
virtual BOOL | OnScrollBy (CSize sizeScroll, BOOL bDoScroll)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
void | PasteEmbedded (COleDataObject &dataObject, CPoint point)
void | PasteEmbedded (COleDataObject &dataObject, CPoint point)
void | PasteNative (COleDataObject &dataObject)
void | PasteNative (COleDataObject &dataObject)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
void | PreviewFillColor (COLORREF color)
void | PreviewLineColor (COLORREF color)
void | PreviewLineWeight (int nWeight)
void | PreviewStyle (COLORREF clrFill, COLORREF clrLine)
void | Remove (CDrawObj *pObj)
void | Remove (CDrawObj *pObj)
void | ResetPreviewState ()
void | RestorePreviewState (BOOL bReset=TRUE)
void | Select (CDrawObj *pObj, BOOL bAdd=FALSE)
void | Select (CDrawObj *pObj, BOOL bAdd=FALSE)
void | SelectWithinRect (CRect rect, BOOL bAdd=FALSE)
void | SelectWithinRect (CRect rect, BOOL bAdd=FALSE)
void | SetPageSize (CSize size)
void | SetPageSize (CSize size)
void | StorePreviewState ()
void | UpdateActiveItem ()
void | UpdateActiveItem ()

Public Attributes

BOOL | m_bActive
BOOL | m_bGrid
COLORREF | m_gridColor
CDrawObjList m_selection

Static Public Attributes

static CLIPFORMAT | m_cfDraw
static CLIPFORMAT | m_cfObjectDescriptor = NULL

Protected Types

typedef CArray
< XPreviewStateItem
*, XPreviewStateItem * > 		XPreviewState

Protected Member Functions

CDrawView ()
CDrawView ()
BOOL | GetObjectInfo (COleDataObject *pDataObject, CSize *pSize, CSize *pOffset)
BOOL | GetObjectInfo (COleDataObject *pDataObject, CSize *pSize, CSize *pOffset)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnCancelEdit ()
afx_msg void | OnCancelEdit ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnDestroy ()
afx_msg void | OnDrawEllipse ()
afx_msg void | OnDrawEllipse ()
afx_msg void | OnDrawLine ()
afx_msg void | OnDrawLine ()
afx_msg void | OnDrawPolygon ()
afx_msg void | OnDrawPolygon ()
afx_msg void | OnDrawRect ()
afx_msg void | OnDrawRect ()
afx_msg void | OnDrawRoundRect ()
afx_msg void | OnDrawRoundRect ()
afx_msg void | OnDrawSelect ()
afx_msg void | OnDrawSelect ()
afx_msg void | OnEditClear ()
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnEditCut ()
afx_msg void | OnEditPaste ()
afx_msg void | OnEditPaste ()
afx_msg void | OnEditProperties ()
afx_msg void | OnEditSelectAll ()
afx_msg void | OnEditSelectAll ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrintPreview ()
virtual void | OnInitialUpdate ()
virtual void | OnInitialUpdate ()
afx_msg void | OnInsertObject ()
afx_msg void | OnInsertObject ()
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnObjectFillColor ()
afx_msg void | OnObjectFillColor ()
afx_msg void | OnObjectLineColor ()
afx_msg void | OnObjectLineColor ()
afx_msg void | OnObjectLineWeight (UINT nID)
afx_msg void | OnObjectMoveBack ()
afx_msg void | OnObjectMoveBack ()
afx_msg void | OnObjectMoveForward ()
afx_msg void | OnObjectMoveForward ()
afx_msg void | OnObjectMoveToBack ()
afx_msg void | OnObjectMoveToBack ()
afx_msg void | OnObjectMoveToFront ()
afx_msg void | OnObjectMoveToFront ()
afx_msg void | OnObjectNoFill ()
afx_msg void | OnObjectNoLine ()
afx_msg void | OnObjectProperties ()
afx_msg void | OnObjectStyles ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnUpdateAnySelect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAnySelect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawEllipse (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawEllipse (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawLine (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawLine (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawPolygon (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawPolygon (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawRect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawRect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawRoundRect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawRoundRect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawSelect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawSelect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditCopy (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditCopy (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditCut (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditCut (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditPaste (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditPaste (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditProperties (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditSelectAll (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditSelectAll (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectFillColor (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectLineColor (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectLineWeight (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectNoFill (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectNoLine (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectProperties (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectStyles (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSelection (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSingleSelect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSingleSelect (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewGrid (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewGrid (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewShowObjects (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewShowObjects (CCmdUI *pCmdUI)
afx_msg void | OnViewGrid ()
afx_msg void | OnViewGrid ()
afx_msg void | OnViewShowObjects ()
afx_msg void | OnViewShowObjects ()

Protected Attributes

BOOL | m_bDragDataAcceptable
CSize | m_dragOffset
CPoint | m_dragPoint
CSize | m_dragSize
COleDropTarget | m_dropTarget
DROPEFFECT | m_prevDropEffect
XPreviewState m_PreviewState

Private Member Functions

COLORREF | GetColorFromColorButton (int nButtonID)

Friends

class | CDrawObjFriend

Detailed Description

Definition at line 22 of file drawvw.h.

Member Typedef Documentation

typedef CArray<XPreviewStateItem*, XPreviewStateItem*> CDrawView::XPreviewState [protected]

Definition at line 90 of file drawvw.h.

Constructor & Destructor Documentation

CDrawView::CDrawView ( ) [protected]

Definition at line 103 of file drawvw.cpp.

{
  m_bGrid = TRUE;
  m_gridColor = RGB(0, 0, 128);
  m_bActive = FALSE;
// new
  if( m_cfObjectDescriptor == NULL )
    m_cfObjectDescriptor = (CLIPFORMAT)::RegisterClipboardFormat(_T("Object Descriptor") );
  m_prevDropEffect = DROPEFFECT_NONE;
// end new
}

CDrawView::~CDrawView ( ) [virtual]

Definition at line 115 of file drawvw.cpp.

{
}

CDrawView::CDrawView ( ) [protected]
virtual CDrawView::~CDrawView ( ) [virtual]

Member Function Documentation

void CDrawView::ClientToDoc ( CPoint & point )

Definition at line 610 of file drawvw.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc, NULL);
  dc.DPtoLP(&point);
}

void CDrawView::ClientToDoc ( CPoint & point )
void CDrawView::ClientToDoc ( CRect & rect )
void CDrawView::ClientToDoc ( CRect & rect )

Definition at line 617 of file drawvw.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc, NULL);
  dc.DPtoLP(rect);
  ASSERT(rect.left <= rect.right);
  ASSERT(rect.bottom <= rect.top);
}

void CDrawView::CloneSelection ( )

Definition at line 684 of file drawvw.cpp.

{
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    pObj->Clone(pObj->m_pDocument);
      // copies object and adds it to the document
  }
}

void CDrawView::CloneSelection ( )
void CDrawView::Deselect ( CDrawObj * pObj )

Definition at line 674 of file drawvw.cpp.

{
  POSITION pos = m_selection.Find(pObj);
  if (pos != NULL)
  {
    InvalObj(pObj);
    m_selection.RemoveAt(pos);
  }
}

void CDrawView::Deselect ( CDrawObj * pObj )
void CDrawView::DocToClient ( CRect & rect )
void CDrawView::DocToClient ( CPoint & point )
void CDrawView::DocToClient ( CPoint & point )

Definition at line 626 of file drawvw.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc, NULL);
  dc.LPtoDP(&point);
}

void CDrawView::DocToClient ( CRect & rect )

Definition at line 633 of file drawvw.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc, NULL);
  dc.LPtoDP(rect);
  rect.NormalizeRect();
}

void CDrawView::DrawGrid ( CDC * pDC )

Definition at line 400 of file drawvw.cpp.

{
  CDrawDoc* pDoc = GetDocument();

  COLORREF oldBkColor = pDC->SetBkColor(pDoc->GetPaperColor());

  CRect rect;
  rect.left = -pDoc->GetSize().cx / 2;
  rect.top = -pDoc->GetSize().cy / 2;
  rect.right = rect.left + pDoc->GetSize().cx;
  rect.bottom = rect.top + pDoc->GetSize().cy;

  // Center lines
  CPen penDash;
  penDash.CreatePen(PS_DASH, 1, m_gridColor);
  CPen* pOldPen = pDC->SelectObject(&penDash);

  pDC->MoveTo(0, rect.top);
  pDC->LineTo(0, rect.bottom);
  pDC->MoveTo(rect.left, 0);
  pDC->LineTo(rect.right, 0);

  // Major unit lines
  CPen penDot;
  penDot.CreatePen(PS_DOT, 1, m_gridColor);
  pDC->SelectObject(&penDot);

  for (int x = rect.left / 100 * 100; x < rect.right; x += 100)
  {
    if (x != 0)
    {
      pDC->MoveTo(x, rect.top);
      pDC->LineTo(x, rect.bottom);
    }
  }

  for (int y = rect.top / 100 * 100; y < rect.bottom; y += 100)
  {
    if (y != 0)
    {
      pDC->MoveTo(rect.left, y);
      pDC->LineTo(rect.right, y);
    }
  }

  // Outlines
  CPen penSolid;
  penSolid.CreatePen(PS_SOLID, 1, m_gridColor);
  pDC->SelectObject(&penSolid);
  pDC->MoveTo(rect.left, rect.top);
  pDC->LineTo(rect.right, rect.top);
  pDC->LineTo(rect.right, rect.bottom);
  pDC->LineTo(rect.left, rect.bottom);
  pDC->LineTo(rect.left, rect.top);

  pDC->SelectObject(pOldPen);
  pDC->SetBkColor(oldBkColor);
}

void CDrawView::DrawGrid ( CDC * pDC )
COLORREF CDrawView::GetColorFromColorButton ( int nButtonID ) [private]
CDrawDoc* CDrawView::GetDocument ( ) [inline]

Definition at line 31 of file drawvw.h.

  { return(CDrawDoc*)m_pDocument; }

CDrawDoc* CDrawView::GetDocument ( ) [inline]

Definition at line 30 of file drawvw.h.

    { return (CDrawDoc*)m_pDocument; }

CRect CDrawView::GetInitialPosition ( )
CRect CDrawView::GetInitialPosition ( )

Definition at line 603 of file drawvw.cpp.

{
  CRect rect(10, 10, 10, 10);
  ClientToDoc(rect);
  return rect;
}

BOOL CDrawView::GetObjectInfo | ( | COleDataObject * | pDataObject,
 |  | CSize * | pSize,
 |  | CSize * | pOffset |
 | ) |  |  | [protected]

Definition at line 1140 of file drawvw.cpp.

{
  ENSURE(pSize != NULL);

  // get object descriptor data
  HGLOBAL hObjDesc = pDataObject->GetGlobalData(m_cfObjectDescriptor);
  if (hObjDesc == NULL)
  {
    if (pOffset != NULL)
      *pOffset = CSize(0, 0); // fill in defaults instead
    *pSize = CSize(0, 0);
    return FALSE;
  }
  ASSERT(hObjDesc != NULL);

  // otherwise, got CF_OBJECTDESCRIPTOR ok.  Lock it down and extract size.
  LPOBJECTDESCRIPTOR pObjDesc = (LPOBJECTDESCRIPTOR)GlobalLock(hObjDesc);
  ENSURE(pObjDesc != NULL);
  pSize->cx = (int)pObjDesc->sizel.cx;
  pSize->cy = (int)pObjDesc->sizel.cy;
  if (pOffset != NULL)
  {
    pOffset->cx = (int)pObjDesc->pointl.x;
    pOffset->cy = (int)pObjDesc->pointl.y;
  }
  GlobalUnlock(hObjDesc);
  GlobalFree(hObjDesc);

  // successfully retrieved pSize & pOffset info
  return TRUE;
}

BOOL CDrawView::GetObjectInfo | ( | COleDataObject * | pDataObject,
 |  | CSize * | pSize,
 |  | CSize * | pOffset |
 | ) |  |  | [protected]
void CDrawView::InvalObj ( CDrawObj * pObj )
void CDrawView::InvalObj ( CDrawObj * pObj )

Definition at line 146 of file drawvw.cpp.

{
  CRect rect = pObj->m_position;
  DocToClient(rect);
  if (m_bActive && IsSelected(pObj))
  {
    rect.left -= 4;
    rect.top -= 5;
    rect.right += 5;
    rect.bottom += 4;
  }
  rect.InflateRect(1, 1); // handles CDrawOleObj objects

  InvalidateRect(rect, FALSE);
}

BOOL CDrawView::IsSelected ( const CObject * pDocItem ) const [virtual]

Definition at line 503 of file drawvw.cpp.

{
  CDrawObj* pDrawObj = (CDrawObj*)pDocItem;
  if (pDocItem->IsKindOf(RUNTIME_CLASS(CDrawItem)))
    pDrawObj = ((CDrawItem*)pDocItem)->m_pDrawObj;
  return m_selection.Find(pDrawObj) != NULL;
}

virtual BOOL CDrawView::IsSelected ( const CObject * pDocItem ) const [virtual]
void CDrawView::OnActivateView | ( | BOOL | bActivate,
 |  | CView * | pActiveView,
 |  | CView * | pDeactiveView |
 | ) |  |  | [virtual]

Definition at line 127 of file drawvw.cpp.

{
  CView::OnActivateView(bActivate, pActiveView, pDeactiveView);

  // invalidate selections when active status changes
  if (m_bActive != bActivate)
  {
    if (bActivate)  // if becoming active update as if active
      m_bActive = bActivate;
    if (!m_selection.IsEmpty())
      OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
    m_bActive = bActivate;
  }
}

virtual void CDrawView::OnActivateView | ( | BOOL | bActivate,
 |  | CView * | pActiveView,
 |  | CView * | pDeactiveView |
 | ) |  |  | [virtual]
void CDrawView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 486 of file drawvw.cpp.

{
  CScrollView::OnBeginPrinting(pDC,pInfo);

  // check page size -- user could have gone into print setup
  // from print dialog and changed paper or orientation
  GetDocument()->ComputePageSize();
}

virtual void CDrawView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]
void CDrawView::OnCancelEdit ( ) [protected]

Definition at line 562 of file drawvw.cpp.

{
  // deactivate any in-place active item on this view!
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL)
  {
    // if we found one, deactivate it
    pActiveItem->Close();
  }
  ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);

  // escape also brings us back into select mode
  ReleaseCapture();

  CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
  if (pTool != NULL)
  {
    pTool->OnCancel();
  }

  CDrawTool::c_drawShape = selection;
}

afx_msg void CDrawView::OnCancelEdit ( ) [protected]
void CDrawView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 1281 of file drawvw.cpp.

{
  // make sure window is active
  GetParentFrame()->ActivateFrame();

  CPoint local = point;
  ScreenToClient(&local);
  ClientToDoc(local);

  CDrawObj* pObj;
  pObj = GetDocument()->ObjectAt(local);
  if(pObj != NULL)
  {
    if(!IsSelected(pObj))
      Select( pObj, FALSE );          // reselect item if appropriate
    UpdateWindow();

    CMenu menu;
    if (menu.LoadMenu(ID_POPUP_MENU))
    {
      CMenu* pPopup = menu.GetSubMenu(0);
      ENSURE(pPopup != NULL);

      pPopup->TrackPopupMenu(TPM_RIGHTBUTTON | TPM_LEFTALIGN,
                   point.x, point.y,
                   AfxGetMainWnd()); // route commands through main window
    }
  }
}

afx_msg void CDrawView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]
int CDrawView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 1128 of file drawvw.cpp.

{
  if (CScrollView::OnCreate(lpCreateStruct) == -1)
    return -1;

  // register drop target
  if( m_dropTarget.Register( this ) )
    return 0;
  else
    return -1;
}

afx_msg int CDrawView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
void CDrawView::OnDestroy ( void ) [protected]

Definition at line 748 of file drawvw.cpp.

{
  CScrollView::OnDestroy();

  // deactivate the inplace active item on this view
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
  {
    pActiveItem->Deactivate();
    ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
  }
}

afx_msg void CDrawView::OnDestroy ( ) [protected]
DROPEFFECT CDrawView::OnDragEnter | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 1173 of file drawvw.cpp.

{
  ASSERT(m_prevDropEffect == DROPEFFECT_NONE);
  m_bDragDataAcceptable = FALSE;
  if (!COleClientItem::CanCreateFromData(pDataObject))
    return DROPEFFECT_NONE;

  m_bDragDataAcceptable = TRUE;
  GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
  CClientDC dc(NULL);
  dc.HIMETRICtoDP(&m_dragSize);
  dc.HIMETRICtoDP(&m_dragOffset);

  return OnDragOver(pDataObject, grfKeyState, point);
}

virtual DROPEFFECT CDrawView::OnDragEnter | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]
void CDrawView::OnDragLeave ( ) [virtual]

Definition at line 1270 of file drawvw.cpp.

{
  CClientDC dc(this);
  if (m_prevDropEffect != DROPEFFECT_NONE)
  {
    dc.DrawFocusRect(CRect(m_dragPoint,m_dragSize)); // erase previous focus rect
    m_prevDropEffect = DROPEFFECT_NONE;
  }
}

virtual void CDrawView::OnDragLeave ( ) [virtual]
DROPEFFECT CDrawView::OnDragOver | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 1190 of file drawvw.cpp.

{
  if(m_bDragDataAcceptable == FALSE)
    return DROPEFFECT_NONE;

  point -= m_dragOffset;  // adjust target rect by original cursor offset

  // check for point outside logical area -- i.e. in hatched region
  // GetTotalSize() returns the size passed to SetScrollSizes
  CRect rectScroll(CPoint(0, 0), GetTotalSize());

  CRect rectItem(point,m_dragSize);
  rectItem.OffsetRect(GetDeviceScrollPosition());

  DROPEFFECT de = DROPEFFECT_NONE;
  CRect rectTemp;
  if (rectTemp.IntersectRect(rectScroll, rectItem))
  {
    // check for force link
    if ((grfKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
      de = DROPEFFECT_NONE; // DRAWCLI isn't a linking container
    // check for force copy
    else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
      de = DROPEFFECT_COPY;
    // check for force move
    else if ((grfKeyState & MK_ALT) == MK_ALT)
      de = DROPEFFECT_MOVE;
    // default -- recommended action is move
    else
      de = DROPEFFECT_MOVE;
  }

  if (point == m_dragPoint)
    return de;

  // otherwise, cursor has moved -- need to update the drag feedback
  CClientDC dc(this);
  if (m_prevDropEffect != DROPEFFECT_NONE)
  {
    // erase previous focus rect
    dc.DrawFocusRect(CRect(m_dragPoint, m_dragSize));
  }
  m_prevDropEffect = de;
  if (m_prevDropEffect != DROPEFFECT_NONE)
  {
    m_dragPoint = point;
    dc.DrawFocusRect(CRect(point, m_dragSize));
  }
  return de;
}

virtual DROPEFFECT CDrawView::OnDragOver | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]
void CDrawView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 255 of file drawvw.cpp.

{
  CDrawDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CDC dc;
  CDC* pDrawDC = pDC;
  CBitmap bitmap;
  CBitmap* pOldBitmap = 0;

  // only paint the rect that needs repainting
  CRect client;
  pDC->GetClipBox(client);
  CRect rect = client;
  DocToClient(rect);

  if (!pDC->IsPrinting())
  {
    // draw to offscreen bitmap for fast looking repaints
    if (dc.CreateCompatibleDC(pDC))
    {
      if (bitmap.CreateCompatibleBitmap(pDC, rect.Width(), rect.Height()))
      {
        OnPrepareDC(&dc, NULL);
        pDrawDC = &dc;

        // offset origin more because bitmap is just piece of the whole drawing
        dc.OffsetViewportOrg(-rect.left, -rect.top);
        pOldBitmap = dc.SelectObject(&bitmap);
        dc.SetBrushOrg(rect.left % 8, rect.top % 8);

        // might as well clip to the same rectangle
        dc.IntersectClipRect(client);
      }
    }
  }

  // paint background
  CBrush brush;
  if (!brush.CreateSolidBrush(pDoc->GetPaperColor()))
    return;

  brush.UnrealizeObject();
  pDrawDC->FillRect(client, &brush);

  if (!pDC->IsPrinting() && m_bGrid)
    DrawGrid(pDrawDC);

  pDoc->Draw(pDrawDC, this);

  if (pDrawDC != pDC)
  {
    pDC->SetViewportOrg(0, 0);
    pDC->SetWindowOrg(0,0);
    pDC->SetMapMode(MM_TEXT);
    dc.SetViewportOrg(0, 0);
    dc.SetWindowOrg(0,0);
    dc.SetMapMode(MM_TEXT);
    pDC->BitBlt(rect.left, rect.top, rect.Width(), rect.Height(),
      &dc, 0, 0, SRCCOPY);
    dc.SelectObject(pOldBitmap);
  }
}

virtual void CDrawView::OnDraw ( CDC * pDC ) [virtual]
afx_msg void CDrawView::OnDrawEllipse ( ) [protected]
void CDrawView::OnDrawEllipse ( ) [protected]

Definition at line 781 of file drawvw.cpp.

{
  CDrawTool::c_drawShape = ellipse;
}

afx_msg void CDrawView::OnDrawLine ( ) [protected]
void CDrawView::OnDrawLine ( ) [protected]

Definition at line 776 of file drawvw.cpp.

{
  CDrawTool::c_drawShape = line;
}

afx_msg void CDrawView::OnDrawPolygon ( ) [protected]
void CDrawView::OnDrawPolygon ( ) [protected]

Definition at line 786 of file drawvw.cpp.

{
  CDrawTool::c_drawShape = poly;
}

afx_msg void CDrawView::OnDrawRect ( ) [protected]
void CDrawView::OnDrawRect ( ) [protected]

Definition at line 771 of file drawvw.cpp.

{
  CDrawTool::c_drawShape = rect;
}

afx_msg void CDrawView::OnDrawRoundRect ( ) [protected]
void CDrawView::OnDrawRoundRect ( ) [protected]

Definition at line 766 of file drawvw.cpp.

{
  CDrawTool::c_drawShape = roundRect;
}

afx_msg void CDrawView::OnDrawSelect ( ) [protected]
void CDrawView::OnDrawSelect ( ) [protected]

Definition at line 761 of file drawvw.cpp.

{
  CDrawTool::c_drawShape = selection;
}

BOOL CDrawView::OnDrop | ( | COleDataObject * | pDataObject,
 |  | DROPEFFECT | dropEffect,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 1242 of file drawvw.cpp.

{
  ASSERT_VALID(this);

  // clean up focus rect
  OnDragLeave();

  // offset point as appropriate for dragging
  GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
  CClientDC dc(NULL);
  dc.HIMETRICtoDP(&m_dragSize);
  dc.HIMETRICtoDP(&m_dragOffset);
  point -= m_dragOffset;

  // invalidate current selection since it will be deselected
  OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
  m_selection.RemoveAll();
  if (m_bDragDataAcceptable)
    PasteEmbedded(*pDataObject, point);

  // update the document and views
  GetDocument()->SetModifiedFlag();
  GetDocument()->UpdateAllViews(NULL, 0, NULL);      // including this view

  return TRUE;
}

virtual BOOL CDrawView::OnDrop | ( | COleDataObject * | pDataObject,
 |  | DROPEFFECT | dropEffect,
 |  | CPoint | point |
 | ) |  |  | [virtual]
afx_msg void CDrawView::OnEditClear ( ) [protected]
void CDrawView::OnEditClear ( ) [protected]

Definition at line 834 of file drawvw.cpp.

{
  // update all the views before the selection goes away
  GetDocument()->UpdateAllViews(NULL, HINT_DELETE_SELECTION, &m_selection);
  OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);

  // now remove the selection from the document
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    GetDocument()->Remove(pObj);
    pObj->Remove();
  }
  //Cleanup Tool members such as CPolyTool::m_pDrawObj, that should be NULL at this point.
  CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
  if (pTool != NULL)
  {
    pTool->OnCancel();
  }
  m_selection.RemoveAll();
}

void CDrawView::OnEditCopy ( ) [protected]

Definition at line 980 of file drawvw.cpp.

{
  ASSERT_VALID(this);
  ASSERT(m_cfDraw != NULL);

  // Create a shared file and associate a CArchive with it
  CSharedFile file;
  CArchive ar(&file, CArchive::store);

  // Serialize selected objects to the archive
  m_selection.Serialize(ar);
  ar.Close();

  COleDataSource* pDataSource = NULL;
  TRY
  {
    pDataSource = new COleDataSource;
    // put on local format instead of or in addation to
    pDataSource->CacheGlobalData(m_cfDraw, file.Detach());

    // if only one item and it is a COleClientItem then also
    // paste in that format
    CDrawObj* pDrawObj = m_selection.GetHead();
    if (m_selection.GetCount() == 1 &&
      pDrawObj->IsKindOf(RUNTIME_CLASS(CDrawOleObj)))
    {
      CDrawOleObj* pDrawOle = (CDrawOleObj*)pDrawObj;
      pDrawOle->m_pClientItem->GetClipboardData(pDataSource, FALSE);
    }

    pDataSource->SetClipboard();
    delete pDataSource;

  }
  CATCH_ALL(e)
  {
    delete pDataSource;
    THROW_LAST();
  }
  END_CATCH_ALL
}

afx_msg void CDrawView::OnEditCopy ( ) [protected]
void CDrawView::OnEditCut ( ) [protected]

Definition at line 1027 of file drawvw.cpp.

{
  OnEditCopy();
  OnEditClear();
}

afx_msg void CDrawView::OnEditCut ( ) [protected]
void CDrawView::OnEditPaste ( ) [protected]

Definition at line 1038 of file drawvw.cpp.

{
  COleDataObject dataObject;
  dataObject.AttachClipboard();

  // invalidate current selection since it will be deselected
  OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
  m_selection.RemoveAll();
  if (dataObject.IsDataAvailable(m_cfDraw))
  {
    PasteNative(dataObject);

    // now add all items in m_selection to document
    POSITION pos = m_selection.GetHeadPosition();
    while (pos != NULL)
      GetDocument()->Add(m_selection.GetNext(pos));
  }
  else
    PasteEmbedded(dataObject, GetInitialPosition().TopLeft() );

  GetDocument()->SetModifiedFlag();

  // invalidate new pasted stuff
  GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_SELECTION, &m_selection);
}

afx_msg void CDrawView::OnEditPaste ( ) [protected]
void CDrawView::OnEditProperties ( ) [protected]

Definition at line 1093 of file drawvw.cpp.

{
  if (m_selection.GetCount() == 1 && CDrawTool::c_drawShape == selection)
  {
    CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
    ASSERT(pTool != NULL);
    pTool->OnEditProperties(this);
  }
}

afx_msg void CDrawView::OnEditSelectAll ( ) [protected]
void CDrawView::OnEditSelectAll ( ) [protected]

Definition at line 821 of file drawvw.cpp.

{
  CDrawObjList* pObList = GetDocument()->GetObjects();
  POSITION pos = pObList->GetHeadPosition();
  while (pos != NULL)
    Select(pObList->GetNext(pos), TRUE);
}

void CDrawView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 495 of file drawvw.cpp.

{
  // TODO: add cleanup after printing
}

virtual void CDrawView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]
afx_msg BOOL CDrawView::OnEraseBkgnd ( CDC * pDC ) [protected]
BOOL CDrawView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 885 of file drawvw.cpp.

{
  return TRUE;
}

void CDrawView::OnFilePrint ( ) [protected]

Definition at line 1076 of file drawvw.cpp.

{
  CScrollView::OnFilePrint();
  GetDocument()->ComputePageSize();
}

afx_msg void CDrawView::OnFilePrint ( ) [protected]
void CDrawView::OnFilePrintPreview ( ) [protected]

Definition at line 1662 of file drawvw.cpp.

{
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL && pActiveItem->GetItemState() == COleClientItem::activeUIState)
  {
    pActiveItem->Deactivate();
  }

  AFXPrintPreview(this);
}

virtual void CDrawView::OnInitialUpdate ( ) [protected, virtual]
void CDrawView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 459 of file drawvw.cpp.

{
  CSize size = GetDocument()->GetSize();
  CClientDC dc(NULL);
  size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
  size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
  SetScrollSizes(MM_TEXT, size);
}

void CDrawView::OnInsertObject ( ) [protected]

Definition at line 511 of file drawvw.cpp.

{
  // Invoke the standard Insert Object dialog box to obtain information
  //  for new CDrawItem object.
  COleInsertDialog dlg;
  if (dlg.DoModal() != IDOK)
    return;

  BeginWaitCursor();

  // First create the C++ object
  CDrawOleObj* pObj = new CDrawOleObj(GetInitialPosition());
  ASSERT_VALID(pObj);
  CDrawItem* pItem = new CDrawItem(GetDocument(), pObj);
  ASSERT_VALID(pItem);
  pObj->m_pClientItem = pItem;

  // Now create the OLE object/item
  TRY
  {
    if (!dlg.CreateItem(pObj->m_pClientItem))
      AfxThrowMemoryException();

    // add the object to the document
    GetDocument()->Add(pObj);

    // try to get initial presentation data
    pItem->UpdateLink();
    pItem->UpdateExtent();

    // if insert new object -- initially show the object
    if (dlg.GetSelectionType() == COleInsertDialog::createNewItem)
      pItem->DoVerb(OLEIVERB_SHOW, this);
  }
  CATCH_ALL(e)
  {
    // clean up item
    pItem->Delete();
    pObj->m_pClientItem = NULL;
    GetDocument()->Remove(pObj);
    pObj->Remove();

    AfxMessageBox(IDP_FAILED_TO_CREATE);
  }
  END_CATCH_ALL

  EndWaitCursor();
}

afx_msg void CDrawView::OnInsertObject ( ) [protected]
afx_msg void CDrawView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
void CDrawView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 739 of file drawvw.cpp.

{
  if (!m_bActive)
    return;
  CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
  if (pTool != NULL)
    pTool->OnLButtonDblClk(this, nFlags, point);
}

void CDrawView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 710 of file drawvw.cpp.

{
  if (!m_bActive)
    return;
  CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
  if (pTool != NULL)
  {
    pTool->OnLButtonDown(this, nFlags, point);
  }
}

afx_msg void CDrawView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
void CDrawView::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 721 of file drawvw.cpp.

{
  if (!m_bActive)
    return;
  CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
  if (pTool != NULL)
    pTool->OnLButtonUp(this, nFlags, point);
}

afx_msg void CDrawView::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
afx_msg void CDrawView::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
void CDrawView::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 730 of file drawvw.cpp.

{
  if (!m_bActive)
    return;
  CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
  if (pTool != NULL)
    pTool->OnMouseMove(this, nFlags, point);
}

afx_msg void CDrawView::OnObjectFillColor ( ) [protected]
void CDrawView::OnObjectFillColor ( ) [protected]

Definition at line 890 of file drawvw.cpp.

{
  CColorDialog dlg;
  if (dlg.DoModal() != IDOK)
    return;

  COLORREF color = dlg.GetColor();

  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    pObj->SetFillColor(color);
  }
}

afx_msg void CDrawView::OnObjectLineColor ( ) [protected]
void CDrawView::OnObjectLineColor ( ) [protected]

Definition at line 906 of file drawvw.cpp.

{
  CColorDialog dlg;
  if (dlg.DoModal() != IDOK)
    return;

  COLORREF color = dlg.GetColor();

  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    pObj->SetLineColor(color);
  }
}

void CDrawView::OnObjectLineWeight ( UINT nID ) [protected]

Definition at line 1112 of file drawvw.cpp.

{
  int weight = -1;
  if (nID == ID_OBJECT_LINEWEIGHT)
  {
    weight = ((CMainFrame*)AfxGetMainWnd())->GetWeightFromLineWeight(ID_OBJECT_LINEWEIGHT);
  }
  else if (nID == ID_OBJECT_LINEWEIGHT_MORE)
  {
    CLineWeightDlg dlg(AfxGetMainWnd());

    if (m_selection.GetCount() == 1)
    {
      dlg.m_penSize = m_selection.GetHead()->IsEnableLine() ? m_selection.GetHead()->GetLineWeight() : 0;
    }

    if (dlg.DoModal() == IDOK)
    {
      weight = dlg.m_penSize;
    }
  }

  if (weight == -1)
  {
    return;
  }

  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    if (pObj->CanChangeLineWeight())
    {
      pObj->EnableLine(weight > 0);
      pObj->SetLineWeight(weight);
    }
  }

  ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);

  Invalidate();

  ResetPreviewState();
}

void CDrawView::OnObjectMoveBack ( ) [protected]

Definition at line 922 of file drawvw.cpp.

{
  CDrawDoc* pDoc = GetDocument();
  CDrawObj* pObj = m_selection.GetHead();
  CDrawObjList* pObjects = pDoc->GetObjects();
  POSITION pos = pObjects->Find(pObj);
  ASSERT(pos != NULL);
  if (pos != pObjects->GetHeadPosition())
  {
    POSITION posPrev = pos;
    pObjects->GetPrev(posPrev);
    pObjects->RemoveAt(pos);
    pObjects->InsertBefore(posPrev, pObj);
    InvalObj(pObj);
  }
}

afx_msg void CDrawView::OnObjectMoveBack ( ) [protected]
void CDrawView::OnObjectMoveForward ( ) [protected]

Definition at line 939 of file drawvw.cpp.

{
  CDrawDoc* pDoc = GetDocument();
  CDrawObj* pObj = m_selection.GetHead();
  CDrawObjList* pObjects = pDoc->GetObjects();
  POSITION pos = pObjects->Find(pObj);
  ASSERT(pos != NULL);
  if (pos != pObjects->GetTailPosition())
  {
    POSITION posNext = pos;
    pObjects->GetNext(posNext);
    pObjects->RemoveAt(pos);
    pObjects->InsertAfter(posNext, pObj);
    InvalObj(pObj);
  }
}

afx_msg void CDrawView::OnObjectMoveForward ( ) [protected]
void CDrawView::OnObjectMoveToBack ( ) [protected]

Definition at line 956 of file drawvw.cpp.

{
  CDrawDoc* pDoc = GetDocument();
  CDrawObj* pObj = m_selection.GetHead();
  CDrawObjList* pObjects = pDoc->GetObjects();
  POSITION pos = pObjects->Find(pObj);
  ASSERT(pos != NULL);
  pObjects->RemoveAt(pos);
  pObjects->AddHead(pObj);
  InvalObj(pObj);
}

afx_msg void CDrawView::OnObjectMoveToBack ( ) [protected]
void CDrawView::OnObjectMoveToFront ( ) [protected]

Definition at line 968 of file drawvw.cpp.

{
  CDrawDoc* pDoc = GetDocument();
  CDrawObj* pObj = m_selection.GetHead();
  CDrawObjList* pObjects = pDoc->GetObjects();
  POSITION pos = pObjects->Find(pObj);
  ASSERT(pos != NULL);
  pObjects->RemoveAt(pos);
  pObjects->AddTail(pObj);
  InvalObj(pObj);
}

afx_msg void CDrawView::OnObjectMoveToFront ( ) [protected]
void CDrawView::OnObjectNoFill ( ) [protected]

Definition at line 997 of file drawvw.cpp.

{
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    if (pObj->CanChangeFillColor())
    {
      pObj->EnableFill(FALSE);
    }
  }

  ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);

  Invalidate();
}

void CDrawView::OnObjectNoLine ( ) [protected]

Definition at line 1080 of file drawvw.cpp.

{
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    if (pObj->CanChangeLineColor())
    {
      pObj->EnableLine(FALSE);
    }
  }

  ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);

  Invalidate();

  ResetPreviewState();
}

void CDrawView::OnObjectProperties ( ) [protected]

Definition at line 1183 of file drawvw.cpp.

{
  CDrawObj* pObj = m_selection.GetHead();
  if (pObj != NULL)
  {
    pObj->OnEditProperties();
  }
}

void CDrawView::OnObjectStyles ( ) [protected]

Definition at line 1203 of file drawvw.cpp.

{
  CMainFrame::XStyle style;

  if (!((CMainFrame*)AfxGetMainWnd())->GetStyleFromStyles(style))
  {
    return;
  }

  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);

    if (pObj->CanChangeFillColor())
    {
      pObj->EnableFill(style.clrFill != (COLORREF)-1);
      if (style.clrFill != (COLORREF)-1)
      {
        pObj->SetFillColor(style.clrFill, TRUE);
      }
    }
    if (pObj->CanChangeLineColor())
    {
      pObj->EnableLine(style.clrLine != (COLORREF)-1);
      if (style.clrLine != (COLORREF)-1)
      {
        pObj->SetLineColor(style.clrLine, TRUE);
      }
    }
  }

  ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);

  Invalidate();

  ResetPreviewState();
}

void CDrawView::OnPrepareDC | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [virtual]

Definition at line 217 of file drawvw.cpp.

{
  CScrollView::OnPrepareDC(pDC, pInfo);

  // mapping mode is MM_ANISOTROPIC
  // these extents setup a mode similar to MM_LOENGLISH
  // MM_LOENGLISH is in .01 physical inches
  // these extents provide .01 logical inches

  pDC->SetMapMode(MM_ANISOTROPIC);
  pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX),
    pDC->GetDeviceCaps(LOGPIXELSY));
  pDC->SetWindowExt(100, -100);

  // set the origin of the coordinate system to the center of the page
  CPoint ptOrg;
  ptOrg.x = GetDocument()->GetSize().cx / 2;
  ptOrg.y = GetDocument()->GetSize().cy / 2;

  // ptOrg is in logical coordinates
  pDC->OffsetWindowOrg(-ptOrg.x,ptOrg.y);
}

virtual void CDrawView::OnPrepareDC | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [virtual]
BOOL CDrawView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 480 of file drawvw.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

virtual BOOL CDrawView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]
void CDrawView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [virtual]

Definition at line 1311 of file drawvw.cpp.

{
  if (pInfo->m_bPreview == FALSE)
    ((CDrawDoc*)GetDocument())->m_pSummInfo->RecordPrintDate();
  OnDraw(pDC);
}

virtual void CDrawView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [virtual]
BOOL CDrawView::OnScrollBy | ( | CSize | sizeScroll,
 |  | BOOL | bDoScroll |
 | ) |  |  | [virtual]

Definition at line 240 of file drawvw.cpp.

{
  // do the scroll
  if (!CScrollView::OnScrollBy(sizeScroll, bDoScroll))
    return FALSE;

  // update the position of any in-place active item
  if (bDoScroll)
  {
    UpdateActiveItem();
    UpdateWindow();
  }
  return TRUE;
}

virtual BOOL CDrawView::OnScrollBy | ( | CSize | sizeScroll,
 |  | BOOL | bDoScroll |
 | ) |  |  | [virtual]
void CDrawView::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 585 of file drawvw.cpp.

{
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL &&
    pActiveItem->GetItemState() == COleClientItem::activeUIState)
  {
    // need to set focus to this item if it is in the same view
    CWnd* pWnd = pActiveItem->GetInPlaceWindow();
    if (pWnd != NULL)
    {
      pWnd->SetFocus();
      return;
    }
  }

  CScrollView::OnSetFocus(pOldWnd);
}

afx_msg void CDrawView::OnSetFocus ( CWnd * pOldWnd ) [protected]
afx_msg void CDrawView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
void CDrawView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 867 of file drawvw.cpp.

{
  CScrollView::OnSize(nType, cx, cy);
  UpdateActiveItem();
}

void CDrawView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [virtual]

Definition at line 162 of file drawvw.cpp.

{
  switch (lHint)
  {
  case HINT_UPDATE_WINDOW:    // redraw entire window
    Invalidate(FALSE);
    break;

  case HINT_UPDATE_DRAWOBJ:   // a single object has changed
    InvalObj((CDrawObj*)pHint);
    break;

  case HINT_UPDATE_SELECTION: // an entire selection has changed
    {
      CDrawObjList* pList = pHint != NULL ?
        (CDrawObjList*)pHint : &m_selection;
      POSITION pos = pList->GetHeadPosition();
      while (pos != NULL)
        InvalObj(pList->GetNext(pos));
    }
    break;

  case HINT_DELETE_SELECTION: // an entire selection has been removed
    if (pHint != &m_selection)
    {
      CDrawObjList* pList = (CDrawObjList*)pHint;
      POSITION pos = pList->GetHeadPosition();
      while (pos != NULL)
      {
        CDrawObj* pObj = pList->GetNext(pos);
        InvalObj(pObj);
        Remove(pObj);   // remove it from this view's selection
      }
    }
    break;

  case HINT_UPDATE_OLE_ITEMS:
    {
      CDrawDoc* pDoc = GetDocument();
      POSITION pos = pDoc->GetObjects()->GetHeadPosition();
      while (pos != NULL)
      {
        CDrawObj* pObj = pDoc->GetObjects()->GetNext(pos);
        if (pObj->IsKindOf(RUNTIME_CLASS(CDrawOleObj)))
          InvalObj(pObj);
      }
    }
    break;

  default:
    ASSERT(FALSE);
    break;
  }
}

virtual void CDrawView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [virtual]
void CDrawView::OnUpdateAnySelect ( CCmdUI * pCmdUI ) [protected]

Definition at line 857 of file drawvw.cpp.

{
  pCmdUI->Enable(!m_selection.IsEmpty());
}

afx_msg void CDrawView::OnUpdateAnySelect ( CCmdUI * pCmdUI ) [protected]
afx_msg void CDrawView::OnUpdateDrawEllipse ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateDrawEllipse ( CCmdUI * pCmdUI ) [protected]

Definition at line 791 of file drawvw.cpp.

{
  pCmdUI->SetRadio(CDrawTool::c_drawShape == ellipse);
}

afx_msg void CDrawView::OnUpdateDrawLine ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateDrawLine ( CCmdUI * pCmdUI ) [protected]

Definition at line 796 of file drawvw.cpp.

{
  pCmdUI->SetRadio(CDrawTool::c_drawShape == line);
}

afx_msg void CDrawView::OnUpdateDrawPolygon ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateDrawPolygon ( CCmdUI * pCmdUI ) [protected]

Definition at line 862 of file drawvw.cpp.

{
  pCmdUI->SetRadio(CDrawTool::c_drawShape == poly);
}

afx_msg void CDrawView::OnUpdateDrawRect ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateDrawRect ( CCmdUI * pCmdUI ) [protected]

Definition at line 801 of file drawvw.cpp.

{
  pCmdUI->SetRadio(CDrawTool::c_drawShape == rect);
}

afx_msg void CDrawView::OnUpdateDrawRoundRect ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateDrawRoundRect ( CCmdUI * pCmdUI ) [protected]

Definition at line 806 of file drawvw.cpp.

{
  pCmdUI->SetRadio(CDrawTool::c_drawShape == roundRect);
}

afx_msg void CDrawView::OnUpdateDrawSelect ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateDrawSelect ( CCmdUI * pCmdUI ) [protected]

Definition at line 811 of file drawvw.cpp.

{
  pCmdUI->SetRadio(CDrawTool::c_drawShape == selection);
}

void CDrawView::OnUpdateEditCopy ( CCmdUI * pCmdUI ) [protected]

Definition at line 1022 of file drawvw.cpp.

{
  pCmdUI->Enable(!m_selection.IsEmpty());
}

afx_msg void CDrawView::OnUpdateEditCopy ( CCmdUI * pCmdUI ) [protected]
afx_msg void CDrawView::OnUpdateEditCut ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateEditCut ( CCmdUI * pCmdUI ) [protected]

Definition at line 1033 of file drawvw.cpp.

{
  pCmdUI->Enable(!m_selection.IsEmpty());
}

afx_msg void CDrawView::OnUpdateEditPaste ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateEditPaste ( CCmdUI * pCmdUI ) [protected]

Definition at line 1064 of file drawvw.cpp.

{
  // determine if private or standard OLE formats are on the clipboard
  COleDataObject dataObject;
  BOOL bEnable = dataObject.AttachClipboard() &&
    (dataObject.IsDataAvailable(m_cfDraw) ||
     COleClientItem::CanCreateFromData(&dataObject));

  // enable command based on availability
  pCmdUI->Enable(bEnable);
}

void CDrawView::OnUpdateEditProperties ( CCmdUI * pCmdUI ) [protected]

Definition at line 1103 of file drawvw.cpp.

{
  pCmdUI->Enable(m_selection.GetCount() == 1 &&
           CDrawTool::c_drawShape == selection);
}

afx_msg void CDrawView::OnUpdateEditSelectAll ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateEditSelectAll ( CCmdUI * pCmdUI ) [protected]

Definition at line 829 of file drawvw.cpp.

{
  pCmdUI->Enable(GetDocument()->GetObjects()->GetCount() != 0);
}

void CDrawView::OnUpdateObjectFillColor ( CCmdUI * pCmdUI ) [protected]

Definition at line 985 of file drawvw.cpp.

{
  if (m_selection.GetCount() == 1)
  {
    pCmdUI->Enable(m_selection.GetHead()->CanChangeFillColor());
  }
  else
  {
    OnUpdateSelection(pCmdUI);
  }
}

void CDrawView::OnUpdateObjectLineColor ( CCmdUI * pCmdUI ) [protected]

Definition at line 1068 of file drawvw.cpp.

{
  if (m_selection.GetCount() == 1)
  {
    pCmdUI->Enable(m_selection.GetHead()->CanChangeLineColor());
  }
  else
  {
    OnUpdateSelection(pCmdUI);
  }
}

void CDrawView::OnUpdateObjectLineWeight ( CCmdUI * pCmdUI ) [protected]

Definition at line 1171 of file drawvw.cpp.

{
  if (m_selection.GetCount() == 1)
  {
    pCmdUI->Enable(m_selection.GetHead()->CanChangeLineWeight());
  }
  else
  {
    OnUpdateSelection(pCmdUI);
  }
}

void CDrawView::OnUpdateObjectNoFill ( CCmdUI * pCmdUI ) [protected]

Definition at line 1014 of file drawvw.cpp.

{
  if (m_selection.GetCount() == 1)
  {
    pCmdUI->Enable(m_selection.GetHead()->CanChangeFillColor());
    pCmdUI->SetCheck(!m_selection.GetHead()->IsEnableFill());
  }
  else
  {
    OnUpdateSelection(pCmdUI);
  }
}

void CDrawView::OnUpdateObjectNoLine ( CCmdUI * pCmdUI ) [protected]

Definition at line 1099 of file drawvw.cpp.

{
  if (m_selection.GetCount() == 1)
  {
    pCmdUI->Enable(m_selection.GetHead()->CanChangeLineColor());
    pCmdUI->SetCheck(!m_selection.GetHead()->IsEnableLine());
  }
  else
  {
    OnUpdateSelection(pCmdUI);
  }
}

void CDrawView::OnUpdateObjectProperties ( CCmdUI * pCmdUI ) [protected]

Definition at line 1192 of file drawvw.cpp.

{
  BOOL bEnable = m_selection.GetCount() == 1;
  if (bEnable)
  {
    bEnable = DYNAMIC_DOWNCAST(CDrawOleObj, m_selection.GetHead()) == NULL;
  }

  pCmdUI->Enable(bEnable);
}

void CDrawView::OnUpdateObjectStyles ( CCmdUI * pCmdUI ) [protected]

Definition at line 1268 of file drawvw.cpp.

{
  if (m_selection.GetCount() == 1)
  {
    pCmdUI->Enable(m_selection.GetHead()->CanChangeFillColor());
  }
  else
  {
    OnUpdateSelection(pCmdUI);
  }
}

void CDrawView::OnUpdateSelection ( CCmdUI * pCmdUI ) [protected]

Definition at line 938 of file drawvw.cpp.

{
  pCmdUI->Enable(!m_selection.IsEmpty());
}

afx_msg void CDrawView::OnUpdateSingleSelect ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateSingleSelect ( CCmdUI * pCmdUI ) [protected]

Definition at line 816 of file drawvw.cpp.

{
  pCmdUI->Enable(m_selection.GetCount() == 1);
}

void CDrawView::OnUpdateViewGrid ( CCmdUI * pCmdUI ) [protected]

Definition at line 879 of file drawvw.cpp.

{
  pCmdUI->SetCheck(m_bGrid);

}

afx_msg void CDrawView::OnUpdateViewGrid ( CCmdUI * pCmdUI ) [protected]
void CDrawView::OnUpdateViewShowObjects ( CCmdUI * pCmdUI ) [protected]

Definition at line 1088 of file drawvw.cpp.

{
  pCmdUI->SetCheck(CDrawOleObj::c_bShowItems);
}

afx_msg void CDrawView::OnUpdateViewShowObjects ( CCmdUI * pCmdUI ) [protected]
afx_msg void CDrawView::OnViewGrid ( ) [protected]
void CDrawView::OnViewGrid ( ) [protected]

Definition at line 873 of file drawvw.cpp.

{
  m_bGrid = !m_bGrid;
  Invalidate(FALSE);
}

void CDrawView::OnViewShowObjects ( ) [protected]

Definition at line 1082 of file drawvw.cpp.

{
  CDrawOleObj::c_bShowItems = !CDrawOleObj::c_bShowItems;
  GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_OLE_ITEMS, NULL);
}

afx_msg void CDrawView::OnViewShowObjects ( ) [protected]
void CDrawView::PasteEmbedded | ( | COleDataObject & | dataObject,
 |  | CPoint | point
 | ) |  |

Definition at line 354 of file drawvw.cpp.

{
  BeginWaitCursor();

  // paste embedded
  CDrawOleObj* pObj = new CDrawOleObj(GetInitialPosition());
  ASSERT_VALID(pObj);

#pragma warning(suppress:6014)
  CDrawItem* pItem = new CDrawItem(GetDocument(), pObj);
  ASSERT_VALID(pItem);
  pObj->m_pClientItem = pItem;

  TRY
  {
    if (!pItem->CreateFromData(&dataObject) &&
      !pItem->CreateStaticFromData(&dataObject))
    {
      AfxThrowMemoryException();      // any exception will do
    }

    // add the object to the document
    GetDocument()->Add(pObj);
    m_selection.AddTail(pObj);
    ClientToDoc( point );
    pObj->MoveTo( CRect( point, pObj->m_extent ), this );

    // try to get initial presentation data
    pItem->UpdateLink();
    pItem->UpdateExtent();
  }
  CATCH_ALL(e)
  {
    // clean up item
    pItem->Delete();
    pObj->m_pClientItem = NULL;
    GetDocument()->Remove(pObj);
    pObj->Remove();

    AfxMessageBox(IDP_FAILED_TO_CREATE);
  }
  END_CATCH_ALL

  EndWaitCursor();
}

void CDrawView::PasteEmbedded | ( | COleDataObject & | dataObject,
 |  | CPoint | point
 | ) |  |
void CDrawView::PasteNative ( COleDataObject & dataObject )

Definition at line 326 of file drawvw.cpp.

{
  // get file refering to clipboard data
  CFile* pFile = dataObject.GetFileData(m_cfDraw);
  if (pFile == NULL)
    return;

  // connect the file to the archive
  CArchive ar(pFile, CArchive::load);
  TRY
  {
    ar.m_pDocument = GetDocument(); // set back-pointer in archive

    // read the selection
    m_selection.Serialize(ar);
  }
  CATCH_ALL(e)
  {
    ar.Close();
    delete pFile;
    THROW_LAST();
  }
  END_CATCH_ALL

  ar.Close();
  delete pFile;
}

void CDrawView::PasteNative ( COleDataObject & dataObject )
virtual BOOL CDrawView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
BOOL CDrawView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 119 of file drawvw.cpp.

{
  ASSERT(cs.style & WS_CHILD);
  if (cs.lpszClass == NULL)
    cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS);
  return TRUE;
}

void CDrawView::PreviewFillColor ( COLORREF color )

Definition at line 970 of file drawvw.cpp.

{
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);

    if (pObj->CanChangeFillColor())
    {
      pObj->EnableFill(TRUE);
      pObj->SetFillColor(color, TRUE /* Preview */);
    }
  }
}

void CDrawView::PreviewLineColor ( COLORREF color )

Definition at line 1054 of file drawvw.cpp.

{
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    if (pObj->CanChangeLineColor())
    {
      pObj->EnableLine(TRUE);
      pObj->SetLineColor(color, TRUE /* Preview */);
    }
  }
}

void CDrawView::PreviewLineWeight ( int nWeight )

Definition at line 1157 of file drawvw.cpp.

{
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    if (pObj->CanChangeLineWeight())
    {
      pObj->EnableLine(weight > 0);
      pObj->SetLineWeight(weight);
    }
  }
}

void CDrawView::PreviewStyle | ( | COLORREF | clrFill,
 |  | COLORREF | clrLine
 | ) |  |

Definition at line 1242 of file drawvw.cpp.

{
  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);

    if (pObj->CanChangeFillColor())
    {
      pObj->EnableFill(clrFill != (COLORREF)-1);
      if (clrFill != (COLORREF)-1)
      {
        pObj->SetFillColor(clrFill);
      }
    }
    if (pObj->CanChangeLineColor())
    {
      pObj->EnableLine(clrLine != (COLORREF)-1);
      if (clrLine != (COLORREF)-1)
      {
        pObj->SetLineColor(clrLine);
      }
    }
  }
}

void CDrawView::Remove ( CDrawObj * pObj )
void CDrawView::Remove ( CDrawObj * pObj )

Definition at line 319 of file drawvw.cpp.

{
  POSITION pos = m_selection.Find(pObj);
  if (pos != NULL)
    m_selection.RemoveAt(pos);
}

void CDrawView::ResetPreviewState ( )

Definition at line 1745 of file drawvw.cpp.

{
  if (m_PreviewState.GetSize() == 0)
  {
    return;
  }

  for (int i = 0; i < m_PreviewState.GetSize(); i++)
  {
    delete m_PreviewState[i];
  }

  m_PreviewState.RemoveAll();
}

void CDrawView::RestorePreviewState ( BOOL bReset = TRUE )

Definition at line 1716 of file drawvw.cpp.

{
  if (m_PreviewState.GetSize() == 0)
  {
    return;
  }

  int index = 0;

  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    if (pObj != NULL)
    {
      m_PreviewState[index]->Restore(*pObj);
    }

    index++;
  }

  if (bReset)
  {
    ResetPreviewState();
  }

  Invalidate();
}

void CDrawView::Select | ( | CDrawObj * | pObj,
 |  | BOOL | bAdd = FALSE
 | ) |  |
void CDrawView::Select | ( | CDrawObj * | pObj,
 |  | BOOL | bAdd = FALSE
 | ) |  |

Definition at line 641 of file drawvw.cpp.

{
  if (!bAdd)
  {
    OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
    m_selection.RemoveAll();
  }

  if (pObj == NULL || IsSelected(pObj))
    return;

  m_selection.AddTail(pObj);
  InvalObj(pObj);
}

void CDrawView::SelectWithinRect | ( | CRect | rect,
 |  | BOOL | bAdd = FALSE
 | ) |  |
void CDrawView::SelectWithinRect | ( | CRect | rect,
 |  | BOOL | bAdd = FALSE
 | ) |  |

Definition at line 657 of file drawvw.cpp.

{
  if (!bAdd)
    Select(NULL);

  ClientToDoc(rect);

  CDrawObjList* pObList = GetDocument()->GetObjects();
  POSITION posObj = pObList->GetHeadPosition();
  while (posObj != NULL)
  {
    CDrawObj* pObj = pObList->GetNext(posObj);
    if (pObj->Intersects(rect))
      Select(pObj, TRUE);
  }
}

void CDrawView::SetPageSize ( CSize size )

Definition at line 468 of file drawvw.cpp.

{
  CClientDC dc(NULL);
  size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
  size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
  SetScrollSizes(MM_TEXT, size);
  GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_WINDOW, NULL);
}

void CDrawView::SetPageSize ( CSize size )
void CDrawView::StorePreviewState ( )

Definition at line 1698 of file drawvw.cpp.

{
  if (m_PreviewState.GetSize() > 0)
  {
    return;
  }

  POSITION pos = m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = m_selection.GetNext(pos);
    if (pObj != NULL)
    {
      m_PreviewState.Add(new XPreviewStateItem(*pObj));
    }
  }
}

void CDrawView::UpdateActiveItem ( )
void CDrawView::UpdateActiveItem ( )

Definition at line 695 of file drawvw.cpp.

{
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL &&
    pActiveItem->GetItemState() == COleClientItem::activeUIState)
  {
    // this will update the item rectangles by calling
    //  OnGetPosRect & OnGetClipRect.
    pActiveItem->SetItemRects();
  }
}

Friends And Related Function Documentation

friend class CDrawObjFriend [friend]

Definition at line 23 of file drawvw.h.

Member Data Documentation

BOOL CDrawView::m_bActive

Definition at line 97 of file drawvw.h.

BOOL CDrawView::m_bDragDataAcceptable [protected]

Definition at line 59 of file drawvw.h.

BOOL CDrawView::m_bGrid

Definition at line 95 of file drawvw.h.

static CLIPFORMAT CDrawView::m_cfDraw [static]
Initial value:
 (CLIPFORMAT)
  ::RegisterClipboardFormat(_T("MFC Draw Sample"))

Definition at line 92 of file drawvw.h.

static CLIPFORMAT CDrawView::m_cfObjectDescriptor = NULL [static]

Definition at line 89 of file drawvw.h.

CSize CDrawView::m_dragOffset [protected]

Definition at line 57 of file drawvw.h.

CPoint CDrawView::m_dragPoint [protected]

Definition at line 55 of file drawvw.h.

CSize CDrawView::m_dragSize [protected]

Definition at line 56 of file drawvw.h.

COleDropTarget CDrawView::m_dropTarget [protected]

Definition at line 54 of file drawvw.h.

COLORREF CDrawView::m_gridColor

Definition at line 96 of file drawvw.h.

DROPEFFECT CDrawView::m_prevDropEffect [protected]

Definition at line 58 of file drawvw.h.

XPreviewState CDrawView::m_PreviewState [protected]

Definition at line 92 of file drawvw.h.

CDrawObjList CDrawView::m_selection

Definition at line 94 of file drawvw.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawvw.h
  • vc2008fp/DrawClient/drawvw.h
  • ole/drawcli/drawvw.cpp
  • vc2008fp/DrawClient/drawvw.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDrawView::XPreviewStateItem Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CDrawView
  • CDrawView::XPreviewStateItem
Public Member Functions | Public Attributes

CDrawView::XPreviewStateItem Struct Reference

#include "drawvw.h"

List of all members.

Public Member Functions

XPreviewStateItem (const CDrawObj &rObj)
void | Restore (CDrawObj &rObj) const
void | Store (const CDrawObj &rObj)

Public Attributes

BOOL | m_bBrush
BOOL | m_bPen
LOGBRUSH | m_logbrush
LOGPEN | m_logpen

Detailed Description

Definition at line 75 of file drawvw.h.

Constructor & Destructor Documentation

CDrawView::XPreviewStateItem::XPreviewStateItem ( const CDrawObj & rObj ) [inline]

Definition at line 82 of file drawvw.h.

    {
      Store(rObj);
    }

Member Function Documentation

void CDrawView::XPreviewStateItem::Restore ( CDrawObj & rObj ) const

Definition at line 1688 of file drawvw.cpp.

{
  CDrawObjFriend* pMyObj = (CDrawObjFriend*)(&rObj);

  pMyObj->m_bPen   = m_bPen;
  memcpy(&pMyObj->m_logpen, &m_logpen, sizeof(LOGPEN));
  pMyObj->m_bBrush = m_bBrush;
  memcpy(&pMyObj->m_logbrush, &m_logbrush, sizeof(LOGBRUSH));
}

void CDrawView::XPreviewStateItem::Store ( const CDrawObj & rObj )

Definition at line 1678 of file drawvw.cpp.

{
  const CDrawObjFriend* pMyObj = (CDrawObjFriend*)(&rObj);

  m_bPen   = pMyObj->m_bPen;
  memcpy(&m_logpen, &pMyObj->m_logpen, sizeof(LOGPEN));
  m_bBrush = pMyObj->m_bBrush;
  memcpy(&m_logbrush, &pMyObj->m_logbrush, sizeof(LOGBRUSH));
}

Member Data Documentation

BOOL CDrawView::XPreviewStateItem::m_bBrush

Definition at line 79 of file drawvw.h.

BOOL CDrawView::XPreviewStateItem::m_bPen

Definition at line 77 of file drawvw.h.

LOGBRUSH CDrawView::XPreviewStateItem::m_logbrush

Definition at line 80 of file drawvw.h.

LOGPEN CDrawView::XPreviewStateItem::m_logpen

Definition at line 78 of file drawvw.h.

The documentation for this struct was generated from the following files:
  • vc2008fp/DrawClient/drawvw.h
  • vc2008fp/DrawClient/drawvw.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDriveApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDriveApp Class Reference

#include "ipdrive.h"

List of all members.

Public Member Functions

CDriveApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 23 of file ipdrive.h.

Constructor & Destructor Documentation

CDriveApp::CDriveApp ( )

Definition at line 41 of file ipdrive.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDriveApp::InitInstance ( ) [virtual]

Definition at line 55 of file ipdrive.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // 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(CDriverDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CDriverView));
  AddDocTemplate(pDocTemplate);

  // create a new (empty) document
  OnFileNew();

  if (m_lpCmdLine[0] != '\0')
  {
    // TODO: add command line processing here
  }

  return TRUE;
}

void CDriveApp::OnAppAbout ( )

Definition at line 135 of file ipdrive.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • ole/ipdrive/ipdrive.h
  • ole/ipdrive/ipdrive.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDriverDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CDriverDlg Class Reference

#include "calcdriv.h"

List of all members.

Public Types

enum | { IDD = IDD_CALCDRIV }

Public Member Functions

CDriverDlg (CWnd *pParent=NULL)
virtual | ~CDriverDlg ()

Public Attributes

CRemoteCalcDlg m_calc
CEdit | m_editExpression
CStatic | m_stcAccum
CStatic | m_stcOperand
CStatic | m_stcOperator

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnGo ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnRefresh ()
afx_msg void | OnSingleStep ()

Detailed Description

Definition at line 45 of file calcdriv.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 53 of file calcdriv.h.

{ IDD = IDD_CALCDRIV };

Constructor & Destructor Documentation

CDriverDlg::CDriverDlg ( CWnd * pParent = NULL )

Definition at line 73 of file calcdriv.cpp.

  : CDialog(CDriverDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CDriverDlg)
  //}}AFX_DATA_INIT
}

CDriverDlg::~CDriverDlg ( ) [virtual]

Definition at line 80 of file calcdriv.cpp.

{
  TRY
  {
    // shut down the calculator
    //  (since calculator shows its user-interface, it would stay active
    //  if we didn't shut it down with a call to its Quit method)
    m_calc.Close();
  }
  END_TRY
}

Member Function Documentation

void CDriverDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 92 of file calcdriv.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDriverDlg)
  DDX_Control(pDX, IDD_LAST_OPERATOR, m_stcOperator);
  DDX_Control(pDX, IDD_LAST_OPERAND, m_stcOperand);
  DDX_Control(pDX, IDC_LAST_ACCUM, m_stcAccum);
  DDX_Control(pDX, IDC_EXPRESSION, m_editExpression);
  //}}AFX_DATA_MAP
}

void CDriverDlg::OnGo ( ) [protected]

Definition at line 115 of file calcdriv.cpp.

{
  // get current expression from the edit control
  CString strExpression;
  m_editExpression.GetWindowText(strExpression);
  LPCTSTR psz = strExpression;

  // send all characters in the edit control from start to end
  int nLen = strExpression.GetLength();
  int nStart, nEnd;
  m_editExpression.GetSel(nStart, nEnd);
  if (nStart == nLen)
    nStart = 0;
  psz += nStart;
  while (*psz != '\0')
  {
    TCHAR szTemp[2];
    szTemp[0] = *psz;
    szTemp[1] = '\0';
    m_calc.Button(szTemp);
    ++psz;
  }
  m_editExpression.SetSel(nLen, nLen);

  OnRefresh();    // refresh after all button commands sent
  m_calc.Evaluate();
  m_calc.Display();
}

BOOL CDriverDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 197 of file calcdriv.cpp.

{
  CDialog::OnInitDialog();

  // create the calculator object that we'll drive through OLE automation
  COleException e;
  CLSID clsid;
  if (CLSIDFromProgID(OLESTR("mfccalc.calculator"), &clsid) != NOERROR)
  {
    AfxMessageBox(IDP_UNABLE_TO_CREATE);
    EndDialog(IDABORT);
    return FALSE;
  }

  // try to get the active calculator before creating a new one
  LPUNKNOWN lpUnk;
  LPDISPATCH lpDispatch;
  if (GetActiveObject(clsid, NULL, &lpUnk) == NOERROR)
  {
    HRESULT hr = lpUnk->QueryInterface(IID_IDispatch,
      (LPVOID*)&lpDispatch);
    lpUnk->Release();
    if (hr == NOERROR)
      m_calc.AttachDispatch(lpDispatch, TRUE);
  }

  // if not dispatch ptr attached yet, need to create one
  if (m_calc.m_lpDispatch == NULL &&
    !m_calc.CreateDispatch(clsid, &e))
  {
    AfxMessageBox(IDP_UNABLE_TO_CREATE);
    EndDialog(IDABORT);
    return FALSE;
  }

  // attempt to make it visible
  m_calc.SetVisible(TRUE);
  if (!m_calc.GetVisible())
  {
    AfxMessageBox(IDP_UNABLE_TO_SHOW);
    EndDialog(IDABORT);
    return FALSE;
  }

  // refresh display to contents of the automation calculator
  OnRefresh();

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CDriverDlg::OnRefresh ( ) [protected]

Definition at line 178 of file calcdriv.cpp.

{
  TCHAR buf[64];
  long lResult = m_calc.GetOperand();
  _stprintf_s(buf, 64, _T("%ld"), lResult);
  m_stcOperand.SetWindowText(buf);

  long lAccum = m_calc.GetAccum();
  _stprintf_s(buf, 64, _T("%ld"), lAccum);
  m_stcAccum.SetWindowText(buf);

  short nOp = m_calc.GetOperation();
  static TCHAR operators[5] = { '?', '+', '-', '*', '/'};
  if (nOp < 0 || nOp > 4)
    nOp = 0;
  _stprintf_s(buf, 64, _T("%c"), operators[nOp]);
  m_stcOperator.SetWindowText(buf);
}

void CDriverDlg::OnSingleStep ( ) [protected]

Definition at line 144 of file calcdriv.cpp.

{
  // get current expression from the edit control
  CString strExpression;
  m_editExpression.GetWindowText(strExpression);
  LPCTSTR psz = strExpression;

  // send first character in selection, then move selection to next
  int nStart, nEnd;
  m_editExpression.GetSel(nStart, nEnd);
  psz += nStart;
  if (*psz != '\0')
  {
    TCHAR szTemp[2];
    szTemp[0] = *psz;
    szTemp[1] = '\0';
    m_calc.Button(szTemp);

    OnRefresh();        // refresh after each step

    // move to next character for next single-step
    m_editExpression.SetSel(nStart+1,
      min(strExpression.GetLength(), nStart+2));
  }
  else
  {
    m_calc.Evaluate();
    m_calc.Display();
    // stepping from end will start at beginning next time
    m_editExpression.SetSel(0, min(strExpression.GetLength(), 1));
  }
  OnRefresh();    // refresh after all button commands sent
}

Member Data Documentation

CRemoteCalcDlg CDriverDlg::m_calc

Definition at line 61 of file calcdriv.h.

CEdit CDriverDlg::m_editExpression

Definition at line 57 of file calcdriv.h.

CStatic CDriverDlg::m_stcAccum

Definition at line 56 of file calcdriv.h.

CStatic CDriverDlg::m_stcOperand

Definition at line 55 of file calcdriv.h.

CStatic CDriverDlg::m_stcOperator

Definition at line 54 of file calcdriv.h.

The documentation for this class was generated from the following files:
  • ole/calcdriv/calcdriv.h
  • ole/calcdriv/calcdriv.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDriverDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CDriverDoc Class Reference

#include "ipdridoc.h"

List of all members.

Public Member Functions

virtual | ~CDriverDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Public Attributes

CVariantMap m_map

Protected Member Functions

CDriverDoc ()

Detailed Description

Definition at line 14 of file ipdridoc.h.

Constructor & Destructor Documentation

CDriverDoc::CDriverDoc ( ) [protected]

Definition at line 37 of file ipdridoc.cpp.

{
  if (!m_map.CreateDispatch(_T("mfc.inproc.varmap")))
  {
    AfxMessageBox(IDP_UNABLE_TO_CREATE_INPROC);
    AfxThrowUserException();
  }
}

CDriverDoc::~CDriverDoc ( ) [virtual]

Definition at line 46 of file ipdridoc.cpp.

{
}

Member Function Documentation

BOOL CDriverDoc::OnNewDocument ( ) [virtual]

Definition at line 50 of file ipdridoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CDriverDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 64 of file ipdridoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

Member Data Documentation

CVariantMap CDriverDoc::m_map

Definition at line 22 of file ipdridoc.h.

The documentation for this class was generated from the following files:
  • ole/ipdrive/ipdridoc.h
  • ole/ipdrive/ipdridoc.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDriverView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CDriverView Class Reference

#include "ipdrivw.h"

List of all members.

Public Types

enum | { IDD = IDD_IPDRIVE_FORM }

Public Member Functions

virtual | ~CDriverView ()
CDriverDoc * GetDocument ()
virtual void | OnInitialUpdate ()

Public Attributes

CComboBox | m_ctrlType
CEdit | m_ctrlValue
CComboBox | m_toType
CEdit | m_toValue

Protected Member Functions

CDriverView ()
virtual void | DoDataExchange (CDataExchange *pDX)
VARIANT | GetFromVariant ()
VARIANT | GetToVariant ()
afx_msg void | OnAdd ()
afx_msg void | OnButton1 ()
afx_msg void | OnButton2 ()
afx_msg void | OnLookup ()
afx_msg void | OnRemove ()
void | UpdateCurrentCount ()
void | UpdateCurrentVariant (VARIANT &va)
void | UpdateToNothing ()

Protected Attributes

BOOL | m_bInitialized
CString | m_strCurrentCount
CString | m_strLastType
CString | m_strLastValue

Detailed Description

Definition at line 12 of file ipdrivw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 20 of file ipdrivw.h.

{ IDD = IDD_IPDRIVE_FORM };

Constructor & Destructor Documentation

CDriverView::CDriverView ( ) [protected]

Definition at line 41 of file ipdrivw.cpp.

  : CFormView(CDriverView::IDD)
{
  //{{AFX_DATA_INIT(CDriverView)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT

  m_bInitialized = FALSE;
}

CDriverView::~CDriverView ( ) [virtual]

Definition at line 51 of file ipdrivw.cpp.

{
}

Member Function Documentation

void CDriverView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 55 of file ipdrivw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDriverView)
  DDX_Control(pDX, IDC_EDIT2, m_toValue);
  DDX_Control(pDX, IDC_COMBO3, m_toType);
  DDX_Control(pDX, IDC_EDIT1, m_ctrlValue);
  DDX_Control(pDX, IDC_COMBO2, m_ctrlType);
  //}}AFX_DATA_MAP
}

CDriverDoc * CDriverView::GetDocument ( ) [inline]

Definition at line 78 of file ipdrivw.h.

   { return (CDriverDoc*)m_pDocument; }

VARIANT CDriverView::GetFromVariant ( ) [protected]

Definition at line 133 of file ipdrivw.cpp.

{
  CString strValue;
  m_ctrlValue.GetWindowText(strValue);

  // we can just throw it in as a string, then coerce to chosen type
  VARIANT va;
  VariantInit(&va);
  va.vt = VT_BSTR;
  va.bstrVal = strValue.AllocSysString();
#pragma warning(disable : 4244)
  VARTYPE vt = max(0, m_ctrlType.GetCurSel());
#pragma warning(default : 4244)
  VARIANT vaTemp;
  VariantInit(&vaTemp);
  if (FAILED(VariantChangeType(&vaTemp, &va, 0, vt)))
  {
    AfxMessageBox(IDP_INCOMPATIBLE_TYPE_VALUE);
    AfxThrowUserException();
  }
  VariantClear(&va);
  return vaTemp;
}

VARIANT CDriverView::GetToVariant ( ) [protected]

Definition at line 157 of file ipdrivw.cpp.

{
  CString strValue;
  m_toValue.GetWindowText(strValue);

  // we can just throw it in as a string, then coerce to chosen type
  VARIANT va;
  VariantInit(&va);
  va.vt = VT_BSTR;
  va.bstrVal = strValue.AllocSysString();

#pragma warning(disable : 4244)
  VARTYPE vt = max(0, m_toType.GetCurSel());
#pragma warning(default : 4244)
  VARIANT vaTemp;
  VariantInit(&vaTemp);
  if (FAILED(VariantChangeType(&vaTemp, &va, 0, vt)))
  {
    AfxMessageBox(IDP_INCOMPATIBLE_TYPE_VALUE);
    AfxThrowUserException();
  }
  VariantClear(&va);
  return vaTemp;
}

void CDriverView::OnAdd ( ) [protected]

Definition at line 223 of file ipdrivw.cpp.

{
  CDriverDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  VARIANT vaFrom = GetFromVariant();
  VARIANT vaTo = GetToVariant();
  pDoc->m_map.SetAt(vaFrom, vaTo);
  VariantClear(&vaFrom);
  VariantClear(&vaTo);

  OnLookup();
  UpdateCurrentCount();
}

void CDriverView::OnButton1 ( ) [protected]

Definition at line 238 of file ipdrivw.cpp.

{
  CDriverDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  long nCount = 0;
  DWORD dwThen = GetTickCount();

  if (GetKeyState(VK_CONTROL) >= 0)
  {
    while (GetTickCount() - dwThen < 5000)
    {
      pDoc->m_map.SetStr1(_T("Hello, World"));
      ++nCount;
    }
  }
  else
  {
    while (GetTickCount() - dwThen < 5000)
    {
      pDoc->m_map.SetI1(1);
      ++nCount;
    }
  }
  CString str, strFormat;
  strFormat.LoadString(IDP_TIMING_RESULT);
#if (_MFC_VER > 0x300)
  str.Format(strFormat, nCount);
#else
  wsprintf(str.GetBuffer(256), strFormat, nCount);
  str.ReleaseBuffer();
#endif
  AfxMessageBox(str);
}

void CDriverView::OnButton2 ( ) [protected]

Definition at line 273 of file ipdrivw.cpp.

{
  CDriverDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  long nCount = 0;
  DWORD dwThen = GetTickCount();

  if (GetKeyState(VK_CONTROL) >= 0)
  {
    while (GetTickCount() - dwThen < 5000)
    {
      pDoc->m_map.SetStr2(_T("Hello, World"));
      ++nCount;
    }
  }
  else
  {
    while (GetTickCount() - dwThen < 5000)
    {
      pDoc->m_map.SetI2(1);
      ++nCount;
    }
  }
  CString str, strFormat;
  strFormat.LoadString(IDP_TIMING_RESULT);
#if (_MFC_VER > 0x300)
  str.Format(strFormat, nCount);
#else
  wsprintf(str.GetBuffer(256), strFormat, nCount);
  str.ReleaseBuffer();
#endif
  AfxMessageBox(str);
}

void CDriverView::OnInitialUpdate ( ) [virtual]

Definition at line 89 of file ipdrivw.cpp.

{
  GetParentFrame()->RecalcLayout();
  ResizeParentToFit(FALSE);

  CFormView::OnInitialUpdate();

  if (!m_bInitialized)
  {
    m_bInitialized = TRUE;
    GetDlgItem(IDC_CURRENT_COUNT)->GetWindowText(m_strCurrentCount);
  }

  // initialize the form
  m_ctrlType.SetCurSel(0);
  UpdateToNothing();
}

void CDriverView::OnLookup ( ) [protected]

Definition at line 197 of file ipdrivw.cpp.

{
  CDriverDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  VARIANT vaFrom = GetFromVariant();
  VARIANT vaTo = pDoc->m_map.GetItem(vaFrom);
  UpdateCurrentVariant(vaTo);

  VariantClear(&vaTo);
  VariantClear(&vaFrom);
}

void CDriverView::OnRemove ( ) [protected]

Definition at line 210 of file ipdrivw.cpp.

{
  CDriverDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  VARIANT vaFrom = GetFromVariant();
  pDoc->m_map.RemoveKey(vaFrom);
  VariantClear(&vaFrom);

  UpdateToNothing();
  UpdateCurrentCount();
}

void CDriverView::UpdateCurrentCount ( ) [protected]

Definition at line 117 of file ipdrivw.cpp.

{
  CDriverDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CString str;
#if (_MFC_VER > 0x300)
  str.Format(m_strCurrentCount, pDoc->m_map.GetCount());
#else
  wsprintf(str.GetBuffer(256), m_strCurrentCount,
    pDoc->m_map.GetCount());
  str.ReleaseBuffer();
#endif
  SetDlgItemText(IDC_CURRENT_COUNT, str);
}

void CDriverView::UpdateCurrentVariant ( VARIANT & va ) [protected]

Definition at line 182 of file ipdrivw.cpp.

{
  m_toType.SetCurSel(va.vt);

  VARIANT vaTemp;
  VariantInit(&vaTemp);
  CString str;
  if (FAILED(VariantChangeType(&vaTemp, &va, 0, VT_BSTR)))
    str.LoadString(IDS_UNKNOWN);
  else
    str = vaTemp.bstrVal;
  m_toValue.SetWindowText(str);
  VariantClear(&vaTemp);
}

void CDriverView::UpdateToNothing ( ) [protected]

Definition at line 107 of file ipdrivw.cpp.

{
  UpdateCurrentCount();
  m_toType.SetCurSel(-1);

  CString str;
  str.LoadString(IDS_NOTHING);
  m_toValue.SetWindowText(str);
}

Member Data Documentation

BOOL CDriverView::m_bInitialized [protected]

Definition at line 56 of file ipdrivw.h.

CComboBox CDriverView::m_ctrlType

Definition at line 24 of file ipdrivw.h.

CEdit CDriverView::m_ctrlValue

Definition at line 23 of file ipdrivw.h.

CString CDriverView::m_strCurrentCount [protected]

Definition at line 53 of file ipdrivw.h.

CString CDriverView::m_strLastType [protected]

Definition at line 54 of file ipdrivw.h.

CString CDriverView::m_strLastValue [protected]

Definition at line 55 of file ipdrivw.h.

CComboBox CDriverView::m_toType

Definition at line 22 of file ipdrivw.h.

CEdit CDriverView::m_toValue

Definition at line 21 of file ipdrivw.h.

The documentation for this class was generated from the following files:
  • ole/ipdrive/ipdrivw.h
  • ole/ipdrive/ipdrivw.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDropTargetView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CDropTargetView Class Reference

#include "view.h"

List of all members.

Public Member Functions

CDropTargetView ()
COle2ViewDoc * GetDocument ()

Public Attributes

CListBox | m_lb

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Detailed Description

Definition at line 16 of file view.h.

Constructor & Destructor Documentation

CDropTargetView::CDropTargetView ( )

Definition at line 43 of file view.cpp.

{
}

Member Function Documentation

COle2ViewDoc * CDropTargetView::GetDocument ( ) [inline]

Definition at line 49 of file view.h.

   { return (COle2ViewDoc*) m_pDocument; }

int CDropTargetView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 47 of file view.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;
#if _MFC_VER > 0x0210
  m_dropTarget.Register( this ) ;
#endif
  return 0;
}

Member Data Documentation

CListBox CDropTargetView::m_lb

Definition at line 25 of file view.h.

The documentation for this class was generated from the following files:
  • ole/oleview/view.h
  • ole/oleview/view.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDummyDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDummyDoc Class Reference

#include "testdll1.h"

Detailed Description

Definition at line 66 of file testdll1.h.

The documentation for this class was generated from the following file:
  • advanced/dllhusk/testdll1.h
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDWordArrayView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CDWordArrayView Class Reference

#include "dwarryvw.h"

List of all members.

Public Types

enum | { IDD = IDD_DWORD_ARRAY }

Public Member Functions

CDWordArrayView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
DWORD | m_dw

Protected Member Functions

virtual | ~CDWordArrayView ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAdd ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
afx_msg void | OnUpdateButton ()

Detailed Description

Definition at line 19 of file dwarryvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 36 of file dwarryvw.h.

{ IDD = IDD_DWORD_ARRAY };

Constructor & Destructor Documentation

CDWordArrayView::CDWordArrayView ( )

Definition at line 27 of file dwarryvw.cpp.

  : CFormView(CDWordArrayView::IDD)
{
  //{{AFX_DATA_INIT(CDWordArrayView)
  m_dw = 0;
  //}}AFX_DATA_INIT
}

CDWordArrayView::~CDWordArrayView ( ) [protected, virtual]

Definition at line 35 of file dwarryvw.cpp.

{
}

Member Function Documentation

void CDWordArrayView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 57 of file dwarryvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CDWordArrayView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_DWORD, m_dw);
  //}}AFX_DATA_MAP
}

CCollectDoc * CDWordArrayView::GetDocument ( ) [inline]

Definition at line 68 of file dwarryvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CDWordArrayView::OnAdd ( ) [protected]

Definition at line 103 of file dwarryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add new DWORD to the CDWordArray
  int nIndex = (int)GetDocument()->m_dwArray.Add(m_dw);

  // Add new DWORD to the listbox.
  CString str;
  str.Format(_T("%d"),m_dw);
  int nSel = m_ctlList.AddString(str);

  // The index of the new DWORD in the array should be the
  // same as the index of the new DWORD in the listbox.
  ASSERT(nIndex == nSel);
}

void CDWordArrayView::OnInitialUpdate ( )

Definition at line 39 of file dwarryvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the DWORDs from the document's CDWordArray
  // to the listbox.
  m_ctlList.ResetContent();
  CDWordArray& dwArray = GetDocument()->m_dwArray;
  for (int nIndex = 0; nIndex < dwArray.GetSize(); nIndex++)
  {
    DWORD dw = dwArray[nIndex];
    CString str;
    str.Format(_T("%d"),dw);
    int nSel = 0;
    nSel = m_ctlList.AddString(str);
  }
}

void CDWordArrayView::OnRemove ( ) [protected]

Definition at line 144 of file dwarryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_DWORD_TO_REMOVE);
    return;
  }

  // Remove the DWORD from the CDWordArray.
  GetDocument()->m_dwArray.RemoveAt(nSel);

  // Remove the DWORD from the listbox.
  m_ctlList.DeleteString(nSel);
}

void CDWordArrayView::OnRemoveAll ( ) [protected]

Definition at line 163 of file dwarryvw.cpp.

{
  // Remove all of the DWORDs from the CDWordArray.
  GetDocument()->m_dwArray.RemoveAll();

  // Remove all of the DWORDs from the listbox.
  m_ctlList.ResetContent();
}

void CDWordArrayView::OnSelChangeList ( ) [protected]

Definition at line 172 of file dwarryvw.cpp.

{
  // Update the edit control to reflect the new selection
  // in the listbox.
  m_dw = GetDocument()->m_dwArray[m_ctlList.GetCurSel()];
  UpdateData(FALSE);
}

void CDWordArrayView::OnUpdateButton ( ) [protected]

Definition at line 121 of file dwarryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_DWORD_TO_UPDATE);
    return;
  }

  // Replace the DWORD in the CDWordArray.
  GetDocument()->m_dwArray[nSel] = m_dw;

  // Update the old DWORD in the listbox by removing
  // the old entry and adding a new entry.
  m_ctlList.DeleteString(nSel);
  CString str;
  str.Format(_T("%d"),m_dw);
  m_ctlList.InsertString(nSel, str);
}

Member Data Documentation

CListBox CDWordArrayView::m_ctlList

Definition at line 37 of file dwarryvw.h.

DWORD CDWordArrayView::m_dw

Definition at line 38 of file dwarryvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/dwarryvw.h
  • advanced/collect/dwarryvw.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynaMDIChildWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDynaMDIChildWnd Class Reference

#include "mdichild.h"

List of all members.

Public Member Functions

void | RefreshColorMenu ()

Protected Member Functions

CDynaMDIChildWnd ()
virtual | ~CDynaMDIChildWnd ()
afx_msg void | OnMDIActivate (BOOL bActivate, CWnd *pActivateWnd, CWnd *pDeactivateWnd)

Detailed Description

Definition at line 26 of file mdichild.h.

Constructor & Destructor Documentation

CDynaMDIChildWnd::CDynaMDIChildWnd ( ) [protected]

Definition at line 36 of file mdichild.cpp.

{
}

CDynaMDIChildWnd::~CDynaMDIChildWnd ( ) [protected, virtual]

Definition at line 40 of file mdichild.cpp.

{
}

Member Function Documentation

void CDynaMDIChildWnd::OnMDIActivate | ( | BOOL | bActivate,
 |  | CWnd * | pActivateWnd,
 |  | CWnd * | pDeactivateWnd |
 | ) |  |  | [protected]

Definition at line 80 of file mdichild.cpp.

{
  // call the base class to let standard processing switch to
  // the top-level menu associated with this window
  CMDIChildWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd);

  // do our modifications, if we are being activated
  if (bActivate)
    RefreshColorMenu();
}

void CDynaMDIChildWnd::RefreshColorMenu ( )

Definition at line 111 of file mdichild.cpp.

{
  // Get the active document
  CDynaMenuDoc* pDoc = (CDynaMenuDoc*)GetActiveDocument();
  ASSERT_KINDOF(CDynaMenuDoc, pDoc);

  // Locate the color submenu
  CMenu* pColorMenu = NULL;
  CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
  int iPos;
  for (iPos = pTopMenu->GetMenuItemCount()-1; iPos >= 0; iPos--)
  {
    CMenu* pMenu = pTopMenu->GetSubMenu(iPos);
    if (pMenu && pMenu->GetMenuItemID(0) == ID_COLOR_OPTIONS)
    {
      pColorMenu = pMenu;
      break;
    }
  }
  ENSURE(pColorMenu != NULL);

  // Update the color submenu to reflect the text colors available to
  // the active document

  // First, delete all items but ID_COLOR_OPTIONS at position 0
  for (iPos = pColorMenu->GetMenuItemCount()-1; iPos > 0; iPos--)
    pColorMenu->DeleteMenu(iPos, MF_BYPOSITION);

  // Then, add a separator and an item for each available text color
  BOOL bNeedSeparator = TRUE;
  for (int i = 0; i < NUM_TEXTCOLOR; i++)
  {
    if (pDoc->m_abAllowColor[i] == TRUE)
    {
      if (bNeedSeparator)
      {
        pColorMenu->AppendMenu(MF_SEPARATOR);
        bNeedSeparator = FALSE;
      }
      CString strColor;
      strColor.LoadString(pDoc->m_aColorDef[i].m_nString);
      pColorMenu->AppendMenu(MF_STRING,
        pDoc->m_aColorDef[i].m_nID, strColor);
    }
  }
}

The documentation for this class was generated from the following files:
  • general/dynamenu/mdichild.h
  • general/dynamenu/mdichild.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynaMenuApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDynaMenuApp Class Reference

#include "dynamenu.h"

List of all members.

Public Member Functions

CDynaMenuApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 31 of file dynamenu.h.

Constructor & Destructor Documentation

CDynaMenuApp::CDynaMenuApp ( )

Definition at line 53 of file dynamenu.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CDynaMenuApp::InitInstance ( ) [virtual]

Definition at line 88 of file dynamenu.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_DYMENUTYPE,
    RUNTIME_CLASS(CDynaMenuDoc),
    RUNTIME_CLASS(CDynaMDIChildWnd),        // our private MDI child class!!
    RUNTIME_CLASS(CDynaMenuView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME)){
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // enable file manager drag/drop and DDE Execute open
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  m_pMainWnd->DragAcceptFiles();
  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CDynaMenuApp::OnAppAbout ( )

Definition at line 178 of file dynamenu.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/dynamenu/dynamenu.h
  • general/dynamenu/dynamenu.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynaMenuDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions

CDynaMenuDoc Class Reference

#include "dmdoc.h"

List of all members.

Public Member Functions

virtual | ~CDynaMenuDoc ()
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual void | Serialize (CArchive &ar)

Static Public Member Functions

static BOOL | GetMessageString (UINT nID, CString &strMessage)

Public Attributes

BOOL | m_abAllowColor [NUM_TEXTCOLOR]
int | m_iColor

Static Public Attributes

static DynaMenuDef | m_aColorDef [NUM_TEXTCOLOR]

Protected Member Functions

CDynaMenuDoc ()
void | DoSelectColor (int iColor)
void | DoUpdateSelectColor (int iColor, CCmdUI *pExtra)
afx_msg void | OnColorOptions ()
virtual BOOL | OnNewDocument ()

Detailed Description

Definition at line 47 of file dmdoc.h.

Constructor & Destructor Documentation

CDynaMenuDoc::CDynaMenuDoc ( ) [protected]

Definition at line 66 of file dmdoc.cpp.

{
  // Initialize document data.  Start out by allowing all possible
  // text colors and default to using the first one.
  m_iColor = 0;
  for (int i = 0; i < NUM_TEXTCOLOR; i++)
     m_abAllowColor[i] = TRUE;
}

CDynaMenuDoc::~CDynaMenuDoc ( ) [virtual]

Definition at line 75 of file dmdoc.cpp.

{
}

Member Function Documentation

void CDynaMenuDoc::DoSelectColor ( int iColor ) [protected]

Definition at line 209 of file dmdoc.cpp.

{
  ENSURE(iColor >= 0 && iColor < NUM_TEXTCOLOR);
  ASSERT(m_abAllowColor[iColor] == TRUE);

  m_iColor = iColor;
  UpdateAllViews(NULL);
}

void CDynaMenuDoc::DoUpdateSelectColor | ( | int | iColor,
 |  | CCmdUI * | pExtra |
 | ) |  |  | [protected]

Definition at line 239 of file dmdoc.cpp.

{
  ENSURE(iColor >= 0 && iColor < NUM_TEXTCOLOR);
  ASSERT(m_abAllowColor[iColor] == TRUE);

  pCmdUI->SetCheck(m_iColor == iColor);
  pCmdUI->Enable(TRUE);
}

BOOL CDynaMenuDoc::GetMessageString | ( | UINT | nID,
 |  | CString & | strMessage |
 | ) |  |  | [static]

Definition at line 267 of file dmdoc.cpp.

{
  for (int i = 0; i < NUM_TEXTCOLOR; i++)
  {
    if (m_aColorDef[i].m_nID == nID)
    {
      CString strColor;
      strColor.LoadString(m_aColorDef[i].m_nString);
      AfxFormatString1(strMessage, IDS_COLORHELPFMT, strColor);
      return TRUE;
    }
  }
  return FALSE;
}

BOOL CDynaMenuDoc::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [virtual]

Definition at line 156 of file dmdoc.cpp.

{
  // If pHandlerInfo is NULL, then handle the message
  if (pHandlerInfo == NULL)
  {
    // Filter the commands sent to a text color menu option
    for (int i = NUM_TEXTCOLOR-1; i >= 0; i--)
    {
      if (nID == m_aColorDef[i].m_nID)
      {
        if (nCode == CN_COMMAND)
        {
          // Handle WM_COMMAND message
          DoSelectColor(i);
        }
        else if (nCode == CN_UPDATE_COMMAND_UI)
        {
          // Update UI element state
          DoUpdateSelectColor(i, (CCmdUI*)pExtra);
        }
        return TRUE;
      }
    }
  }

  // If we didn't process the command, call the base class
  // version of OnCmdMsg so the message-map can handle the message
  return CDocument::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}

void CDynaMenuDoc::OnColorOptions ( ) [protected]

Definition at line 304 of file dmdoc.cpp.

{
  CColorOptDlg dlg(this);
  if (dlg.DoModal())
  {
    // find the MDI frame window associated with this document
    POSITION pos = GetFirstViewPosition();
    CView* pview = GetNextView(pos);
    ENSURE(pview != NULL);

    CDynaMDIChildWnd* pwnd = (CDynaMDIChildWnd*)pview->GetParentFrame();
    ASSERT_KINDOF(CDynaMDIChildWnd, pwnd);

    // force an update of the Color submenu
    pwnd->RefreshColorMenu();
  }
}

BOOL CDynaMenuDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 79 of file dmdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CDynaMenuDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 93 of file dmdoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

Member Data Documentation

BOOL CDynaMenuDoc::m_abAllowColor[NUM_TEXTCOLOR]

Definition at line 56 of file dmdoc.h.

DynaMenuDef CDynaMenuDoc::m_aColorDef [static]
Initial value:
{
  { IDS_BLACK,    ID_COLOR1, RGB(0,   0, 0) },
  { IDS_RED,      ID_COLOR2, RGB(128, 0, 0) },
  { IDS_PURPLE,   ID_COLOR3, RGB(128, 0, 128) },
  { IDS_BLUE,     ID_COLOR4, RGB(0, 0, 128) },
}

Definition at line 60 of file dmdoc.h.

int CDynaMenuDoc::m_iColor

Definition at line 55 of file dmdoc.h.

The documentation for this class was generated from the following files:
  • general/dynamenu/dmdoc.h
  • general/dynamenu/dmdoc.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynaMenuView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDynaMenuView Class Reference

#include "dmview.h"

List of all members.

Public Member Functions

virtual | ~CDynaMenuView ()
CDynaMenuDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)

Protected Member Functions

CDynaMenuView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 22 of file dmview.h.

Constructor & Destructor Documentation

CDynaMenuView::CDynaMenuView ( ) [protected]

Definition at line 49 of file dmview.cpp.

{
  // TODO: add construction code here
}

CDynaMenuView::~CDynaMenuView ( ) [virtual]

Definition at line 54 of file dmview.cpp.

{
}

Member Function Documentation

CDynaMenuDoc * CDynaMenuView::GetDocument ( ) [inline]

Definition at line 61 of file dmview.h.

   { return (CDynaMenuDoc*)m_pDocument; }

void CDynaMenuView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 111 of file dmview.cpp.

{
  // TODO: add extra initialization before printing
}

void CDynaMenuView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 82 of file dmview.cpp.

{
  CDynaMenuDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  // set color to use for text
  int iColor   = pDoc->m_iColor;
  COLORREF crf = CDynaMenuDoc::m_aColorDef[iColor].m_crf;

  pDC->SetTextColor(crf);
  pDC->SetBkMode(TRANSPARENT);

  // output a string to the center of the client area
  CRect rc;
  GetClientRect(rc);
  pDC->DrawText(_T("This text is displayed in the current color."), -1,
          rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);

}

void CDynaMenuView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 116 of file dmview.cpp.

{
  // TODO: add cleanup after printing
}

BOOL CDynaMenuView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 105 of file dmview.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

The documentation for this class was generated from the following files:
  • general/dynamenu/dmview.h
  • general/dynamenu/dmview.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynamicHelpViewBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CDynamicHelpViewBar Class Reference

#include "DynamicHelpView.h"

List of all members.

Public Member Functions

CDynamicHelpViewBar ()
virtual | ~CDynamicHelpViewBar ()
void | AdjustLayout ()
void | OnChangeVisualStyle ()

Protected Member Functions

void | FillHelp ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDhelp1 ()
afx_msg void | OnDhelp2 ()
afx_msg void | OnDhelp3 ()
virtual void | OnEraseWorkArea (CDC *pDC, CRect rectWorkArea)
afx_msg void | OnPaint ()
afx_msg void | OnSelectTree (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnUpdateDhelp1 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDhelp2 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDhelp3 (CCmdUI *pCmdUI)

Protected Attributes

CImageList | m_DynamicHelpImages
CTreeCtrl | m_wndArticles
CHelpToolBar m_wndToolBar

Detailed Description

Definition at line 26 of file DynamicHelpView.h.

Constructor & Destructor Documentation

CDynamicHelpViewBar::CDynamicHelpViewBar ( )

Definition at line 26 of file DynamicHelpView.cpp.

{
}

CDynamicHelpViewBar::~CDynamicHelpViewBar ( ) [virtual]

Definition at line 30 of file DynamicHelpView.cpp.

{
}

Member Function Documentation

void CDynamicHelpViewBar::AdjustLayout ( )

Definition at line 119 of file DynamicHelpView.cpp.

{
  if (GetSafeHwnd() == NULL)
  {
    return;
  }

  CRect rectClient;
  GetClientRect(rectClient);

  int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;

  m_wndToolBar.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
  m_wndArticles.SetWindowPos(NULL, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
}

void CDynamicHelpViewBar::FillHelp ( ) [protected]

Definition at line 104 of file DynamicHelpView.cpp.

{
  HTREEITEM hTreeItem = m_wndArticles.InsertItem(_T("Samples"), 0, 2, TVI_ROOT);
  m_wndArticles.SetItemData(hTreeItem, (DWORD) 1);

  hTreeItem = m_wndArticles.InsertItem(_T("Visual Studio Sample"), 5, 5, hTreeItem);
  m_wndArticles.SetItemData(hTreeItem, (DWORD) 2);

  hTreeItem = m_wndArticles.InsertItem(_T("Getting Started"), 1, 3, TVI_ROOT);
  m_wndArticles.SetItemData(hTreeItem, (DWORD) 1);

  hTreeItem = m_wndArticles.InsertItem(_T("Customizing Dynamic Help"), 5, 5, hTreeItem);
  m_wndArticles.SetItemData(hTreeItem, (DWORD) 2);
}

void CDynamicHelpViewBar::OnChangeVisualStyle ( )

Definition at line 183 of file DynamicHelpView.cpp.

{
  m_wndToolBar.CleanUpLockedImages();
  m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_HELPTOOLBAR_24 : IDR_DYNAMIC_HELP, 0, 0, TRUE /* Locked */);

  m_DynamicHelpImages.DeleteImageList();

  UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_DYNAMICHELP24 : IDB_DYNAMICHELP;

  CBitmap bmp;
  if (!bmp.LoadBitmap(uiBmpId))
  {
    TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
    ASSERT(FALSE);
    return;
  }

  BITMAP bmpObj;
  bmp.GetBitmap(&bmpObj);

  UINT nFlags = ILC_MASK;

  nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;

  m_DynamicHelpImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
  m_DynamicHelpImages.Add(&bmp, RGB(255, 255, 255));

  m_wndArticles.SetImageList(&m_DynamicHelpImages, TVSIL_NORMAL);
}

int CDynamicHelpViewBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 51 of file DynamicHelpView.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  SetWindowText(_T("Articles"));

  CRect rectDummy(0, 0, 0, 0);
  m_wndArticles.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |TVS_TRACKSELECT | TVS_NOTOOLTIPS | TVS_SINGLEEXPAND, rectDummy, this, idTree);

  m_DynamicHelpImages.Create(IDB_DYNAMICHELP, 16, 0, RGB(255, 0, 0));
  m_wndArticles.SetImageList(&m_DynamicHelpImages, TVSIL_NORMAL);

  m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_DYNAMIC_HELP);
  m_wndToolBar.LoadToolBar(IDR_DYNAMIC_HELP, 0, 0, TRUE /* Is locked */);

  OnChangeVisualStyle();

  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
  m_wndToolBar.SetOwner(this);

  // All commands will be routed via this control , not via the parent frame:
  m_wndToolBar.SetRouteCommandsViaFrame(FALSE);

  FillHelp();
  AdjustLayout();
  return 0;
}

void CDynamicHelpViewBar::OnDhelp1 ( ) [protected]

Definition at line 135 of file DynamicHelpView.cpp.

{
  // TODO: Add your command handler code here
}

void CDynamicHelpViewBar::OnDhelp2 ( ) [protected]

Definition at line 145 of file DynamicHelpView.cpp.

{
  // TODO: Add your command handler code here
}

void CDynamicHelpViewBar::OnDhelp3 ( ) [protected]

Definition at line 155 of file DynamicHelpView.cpp.

{
  // TODO: Add your command handler code here
}

void CDynamicHelpViewBar::OnEraseWorkArea | ( | CDC * | pDC,
 |  | CRect | rectWorkArea |
 | ) |  |  | [protected, virtual]

Definition at line 87 of file DynamicHelpView.cpp.

{
  // Do nothing, favorites tree covers the whole working area
}

void CDynamicHelpViewBar::OnPaint ( ) [protected]

Definition at line 165 of file DynamicHelpView.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndArticles.GetWindowRect(rectTree);
  ScreenToClient(rectTree);

  rectTree.InflateRect(1, 1);
  dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
}

void CDynamicHelpViewBar::OnSelectTree | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 92 of file DynamicHelpView.cpp.

{
  // NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;

  HTREEITEM hTreeItem = m_wndArticles.GetSelectedItem();
  if (hTreeItem != NULL)
  {
  }

  *pResult = 0;
}

void CDynamicHelpViewBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 177 of file DynamicHelpView.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);
  m_wndArticles.SetFocus();
}

void CDynamicHelpViewBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 81 of file DynamicHelpView.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);
  AdjustLayout();
}

void CDynamicHelpViewBar::OnUpdateDhelp1 ( CCmdUI * pCmdUI ) [protected]

Definition at line 140 of file DynamicHelpView.cpp.

{
  // TODO: Add your command update UI handler code here
}

void CDynamicHelpViewBar::OnUpdateDhelp2 ( CCmdUI * pCmdUI ) [protected]

Definition at line 150 of file DynamicHelpView.cpp.

{
  // TODO: Add your command update UI handler code here
}

void CDynamicHelpViewBar::OnUpdateDhelp3 ( CCmdUI * pCmdUI ) [protected]

Definition at line 160 of file DynamicHelpView.cpp.

{
  // TODO: Add your command update UI handler code here
}

Member Data Documentation

CImageList CDynamicHelpViewBar::m_DynamicHelpImages [protected]

Definition at line 38 of file DynamicHelpView.h.

CTreeCtrl CDynamicHelpViewBar::m_wndArticles [protected]

Definition at line 37 of file DynamicHelpView.h.

CHelpToolBar CDynamicHelpViewBar::m_wndToolBar [protected]

Definition at line 36 of file DynamicHelpView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/DynamicHelpView.h
  • vc2008fp/VisualStudioDemo/DynamicHelpView.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynamicMenuApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CDynamicMenuApp Class Reference

#include "DynamicMenu.h"

List of all members.

Public Member Functions

CDynamicMenuApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file DynamicMenu.h.

Constructor & Destructor Documentation

CDynamicMenuApp::CDynamicMenuApp ( )

Definition at line 39 of file DynamicMenu.cpp.

                                 : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CDynamicMenuApp::ExitInstance ( ) [virtual]

Definition at line 114 of file DynamicMenu.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CDynamicMenuApp::InitInstance ( ) [virtual]

Definition at line 53 of file DynamicMenu.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(CDynamicMenuDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CDynamicMenuView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  LoadCustomState ();

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CDynamicMenuApp::OnAppAbout ( )

Definition at line 175 of file DynamicMenu.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CDynamicMenuApp::PreLoadState ( ) [virtual]

Definition at line 119 of file DynamicMenu.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/DynamicMenu/DynamicMenu.h
  • vc2008fp/DynamicMenu/DynamicMenu.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynamicMenuDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDynamicMenuDoc Class Reference

#include "DynamicMenuDoc.h"

List of all members.

Public Member Functions

virtual | ~CDynamicMenuDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CDynamicMenuDoc ()

Detailed Description

Definition at line 13 of file DynamicMenuDoc.h.

Constructor & Destructor Documentation

CDynamicMenuDoc::CDynamicMenuDoc ( ) [protected]

Definition at line 33 of file DynamicMenuDoc.cpp.

{
  // TODO: add one-time construction code here

}

CDynamicMenuDoc::~CDynamicMenuDoc ( ) [virtual]

Definition at line 39 of file DynamicMenuDoc.cpp.

{
}

Member Function Documentation

BOOL CDynamicMenuDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file DynamicMenuDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CDynamicMenuDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file DynamicMenuDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/DynamicMenu/DynamicMenuDoc.h
  • vc2008fp/DynamicMenu/DynamicMenuDoc.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CDynamicMenuView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CDynamicMenuView Class Reference

#include "DynamicMenuView.h"

List of all members.

Public Member Functions

virtual | ~CDynamicMenuView ()
CDynamicMenuDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CDynamicMenuView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file DynamicMenuView.h.

Constructor & Destructor Documentation

CDynamicMenuView::CDynamicMenuView ( ) [protected]

Definition at line 50 of file DynamicMenuView.cpp.

{
  // TODO: add construction code here

}

CDynamicMenuView::~CDynamicMenuView ( ) [virtual]

Definition at line 56 of file DynamicMenuView.cpp.

{
}

Member Function Documentation

CDynamicMenuDoc * CDynamicMenuView::GetDocument ( ) [inline]

Definition at line 51 of file DynamicMenuView.h.

   { return (CDynamicMenuDoc*)m_pDocument; }

void CDynamicMenuView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 127 of file DynamicMenuView.cpp.

{
  // TODO: add extra initialization before printing
}

void CDynamicMenuView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 161 of file DynamicMenuView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CDynamicMenuView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 71 of file DynamicMenuView.cpp.

{
//  CDynamicMenuDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);

}

void CDynamicMenuView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 132 of file DynamicMenuView.cpp.

{
  // TODO: add cleanup after printing
}

void CDynamicMenuView::OnFilePrintPreview ( ) [protected]

Definition at line 116 of file DynamicMenuView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CDynamicMenuView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 121 of file DynamicMenuView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CDynamicMenuView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 60 of file DynamicMenuView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/DynamicMenu/DynamicMenuView.h
  • vc2008fp/DynamicMenu/DynamicMenuView.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEditBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CEditBar Class Reference

#include "editbar.h"

List of all members.

Public Member Functions

CEditBar ()
virtual | ~CEditBar ()
virtual CSize | CalcDynamicLayout (int nLength, DWORD dwMode)
BOOL | Init (CWnd *pParentWnd, BOOL bColor, BOOL bToolTips)
BOOL | SetColor (BOOL bColor)
BOOL | SetHorizontal ()
BOOL | SetVertical ()

Public Attributes

BOOL | m_bColor
BOOL | m_bVertical
CSearchBox m_SearchBox

Detailed Description

Definition at line 17 of file editbar.h.

Constructor & Destructor Documentation

CEditBar::CEditBar ( )

Definition at line 51 of file editbar.cpp.

{
  m_bColor = TRUE;
}

CEditBar::~CEditBar ( ) [virtual]

Definition at line 56 of file editbar.cpp.

{
}

Member Function Documentation

CSize CEditBar::CalcDynamicLayout | ( | int | nLength,
 |  | DWORD | dwMode |
 | ) |  |  | [virtual]

Definition at line 148 of file editbar.cpp.

{
  // if we're committing set the buttons appropriately
  if (dwMode & LM_COMMIT)
  {
    if (dwMode & LM_VERTDOCK)
    {
      if (!m_bVertical)
        SetVertical();
    }
    else
    {
      if (m_bVertical)
        SetHorizontal();
    }

    return CToolBar::CalcDynamicLayout(nLength, dwMode);
  }
  else
  {
    BOOL bOld = m_bVertical;
    BOOL bSwitch = (dwMode & LM_HORZ) ? bOld : !bOld;

    if (bSwitch)
    {
      if (bOld)
        SetHorizontal();
      else
        SetVertical();
    }

    CSize sizeResult = CToolBar::CalcDynamicLayout(nLength, dwMode);

    if (bSwitch)
    {
      if (bOld)
        SetHorizontal();
      else
        SetVertical();
    }

    return sizeResult;
  }
}

BOOL CEditBar::Init | ( | CWnd * | pParentWnd,
 |  | BOOL | bColor,
 |  | BOOL | bToolTips
 | ) |  |

Definition at line 60 of file editbar.cpp.

{
  m_bColor = bColor;
  m_bVertical = FALSE;

  // start out with no borders
  DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_SIZE_DYNAMIC;
  if (bToolTips)
    dwStyle |= (CBRS_TOOLTIPS | CBRS_FLYBY);
  if (!Create(pParentWnd, dwStyle, IDW_EDIT_BAR))
  {
    return FALSE;
  }

  if (!SetColor(m_bColor))
    return FALSE;

  if(!SetButtons(EditButtons, sizeof(EditButtons)/sizeof(UINT)))
    return FALSE;

  CRect rect(-COMBOBOX_WIDTH, -COMBOBOX_HEIGHT, 0, 0);
  // The ID of the ComboBox is important for two reasons.  One, so you
  // can receive notifications from the control.  And also for ToolTips.
  // During HitTesting if the ToolBar sees that the mouse is one a child
  // control, the toolbar will lookup the controls ID and search for a
  // string in the string table with the same ID to use for ToolTips
  // and StatusBar info.
  if (!m_SearchBox.Create(WS_CHILD | CBS_DROPDOWN |
    CBS_AUTOHSCROLL | WS_VSCROLL | CBS_HASSTRINGS, rect, this,
    IDC_EDITBAR_SEARCHBOX))
  {
    return FALSE;
  }

  HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
  if (hFont == NULL)
    hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);

  m_SearchBox.SendMessage(WM_SETFONT, (WPARAM)hFont);

  if(!SetHorizontal())
    return FALSE;

  return TRUE;
}

BOOL CEditBar::SetColor ( BOOL bColor )

Definition at line 138 of file editbar.cpp.

{
  m_bColor=bColor;

  if (m_bColor)
    return LoadBitmap(IDR_COLOR_EDITBAR);
  else
    return LoadBitmap(IDR_MONO_EDITBAR);
}

BOOL CEditBar::SetHorizontal ( )

Definition at line 106 of file editbar.cpp.

{
  m_bVertical = FALSE;

  SetBarStyle((GetBarStyle() & ~CBRS_ALIGN_ANY) | CBRS_ALIGN_TOP);

  SetButtonInfo(COMBOBOX_INDEX, IDC_EDITBAR_SEARCHBOX, TBBS_SEPARATOR, COMBOBOX_WIDTH);

  if (m_SearchBox.m_hWnd != NULL)
  {
    CRect rect;
    GetItemRect(COMBOBOX_INDEX, rect);

    m_SearchBox.SetWindowPos(NULL, rect.left, rect.top, 0, 0, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOCOPYBITS);
    m_SearchBox.ShowWindow(SW_SHOW);
  }

  return TRUE;
}

BOOL CEditBar::SetVertical ( )

Definition at line 126 of file editbar.cpp.

{
  m_bVertical = TRUE;

  SetButtonInfo(COMBOBOX_INDEX, ID_EDIT_FIND, TBBS_BUTTON, COMBOBOX_BITMAP);

  if (m_SearchBox.m_hWnd != NULL)
    m_SearchBox.ShowWindow(SW_HIDE);

  return TRUE;
}

Member Data Documentation

BOOL CEditBar::m_bColor

Definition at line 21 of file editbar.h.

BOOL CEditBar::m_bVertical

Definition at line 43 of file editbar.h.

CSearchBox CEditBar::m_SearchBox

Definition at line 22 of file editbar.h.

The documentation for this class was generated from the following files:
  • general/docktool/editbar.h
  • general/docktool/editbar.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEditToolbar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CEditToolbar Class Reference

#include "EditToolbar.h"

List of all members.

Public Member Functions

CEditToolbar ()
virtual | ~CEditToolbar ()

Public Attributes

CFont | m_font
CComboBox | m_fontNameCombo
CComboBox | m_fontSizeCombo

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Detailed Description

Definition at line 22 of file EditToolbar.h.

Constructor & Destructor Documentation

CEditToolbar::CEditToolbar ( )

Definition at line 25 of file EditToolbar.cpp.

{
}

CEditToolbar::~CEditToolbar ( ) [virtual]

Definition at line 29 of file EditToolbar.cpp.

{
}

Member Function Documentation

int CEditToolbar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 44 of file EditToolbar.cpp.

{
  if (CToolBar::OnCreate(lpCreateStruct) == -1)
    return -1;

  return 0;
}

Member Data Documentation

CFont CEditToolbar::m_font

Definition at line 29 of file EditToolbar.h.

CComboBox CEditToolbar::m_fontNameCombo

Definition at line 27 of file EditToolbar.h.

CComboBox CEditToolbar::m_fontSizeCombo

Definition at line 28 of file EditToolbar.h.

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/EditToolbar.h
  • internet/HTMLEdit/EditToolbar.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEmbeddedItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CEmbeddedItem Class Reference

#include "paditem.h"

Inherited by CPadLinkItem.

List of all members.

Public Member Functions

CEmbeddedItem (CPadDoc *pContainerDoc)
CEmbeddedItem (CWordPadDoc *pContainerDoc, int nBeg=0, int nEnd=-1)
CEmbeddedItem (CWordPadDoc *pContainerDoc, int nBeg=0, int nEnd=-1)
CPadDoc * | GetDocument () const
CWordPadDoc * | GetDocument () const
CWordPadDoc * | GetDocument () const
CWordPadView * | GetView () const
CPadView * | GetView () const
CWordPadView * | GetView () const
virtual BOOL | OnDraw (CDC *pDC, CSize &rSize)
virtual BOOL | OnDraw (CDC *pDC, CSize &rSize)
virtual BOOL | OnDraw (CDC *pDC, CSize &rSize)
BOOL | OnDrawEx (CDC *pDC, CSize &rSize, BOOL bOutput)
BOOL | OnDrawEx (CDC *pDC, CSize &rSize, BOOL bOutput)
virtual BOOL | OnGetExtent (DVASPECT dwDrawAspect, CSize &rSize)
virtual BOOL | OnGetExtent (DVASPECT dwDrawAspect, CSize &rSize)
virtual BOOL | OnGetExtent (DVASPECT dwDrawAspect, CSize &rSize)

Public Attributes

LPDATAOBJECT | m_lpRichDataObj
UINT m_nBeg
int | m_nBeg
int | m_nEnd
UINT m_nEnd

Protected Member Functions

virtual BOOL | OnRenderFileData (LPFORMATETC lpFormatEtc, CFile *pFile)
void | SaveToFile (CFile *pFile)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)

Detailed Description

Definition at line 19 of file paditem.h.

Constructor & Destructor Documentation

CEmbeddedItem::CEmbeddedItem ( CPadDoc * pContainerDoc )

Definition at line 19 of file paditem.cpp.

  : COleServerItem(pContainerDoc, TRUE)
{
  m_nBeg = 0;
  m_nEnd = UINT_MAX;

  // support CF_TEXT format
  GetDataSource()->DelayRenderFileData(CF_TEXT);
}

CEmbeddedItem::CEmbeddedItem | ( | CWordPadDoc * | pContainerDoc,
 |  | int | nBeg = 0,
 |  | int | nEnd = -1
 | ) |  |

Definition at line 23 of file srvritem.cpp.

  : COleServerItem(pContainerDoc, TRUE)
{
  ASSERT(pContainerDoc != NULL);
  ASSERT_VALID(pContainerDoc);
  m_nBeg = nBeg;
  m_nEnd = nEnd;
}

CEmbeddedItem::CEmbeddedItem | ( | CWordPadDoc * | pContainerDoc,
 |  | int | nBeg = 0,
 |  | int | nEnd = -1
 | ) |  |

Member Function Documentation

CPadDoc* CEmbeddedItem::GetDocument ( ) const [inline]

Definition at line 29 of file paditem.h.

    { return (CPadDoc*) COleServerItem::GetDocument(); }

CWordPadDoc* CEmbeddedItem::GetDocument ( ) const [inline]

Definition at line 30 of file srvritem.h.

    { return (CWordPadDoc*) COleServerItem::GetDocument(); }

CWordPadDoc* CEmbeddedItem::GetDocument ( ) const [inline]

Definition at line 29 of file srvritem.h.

    { return (CWordPadDoc*) COleServerItem::GetDocument(); }

CWordPadView * CEmbeddedItem::GetView ( ) const

Definition at line 52 of file paditem.cpp.

{
  CDocument* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
  POSITION pos = pDoc->GetFirstViewPosition();
  if (pos == NULL)
    return NULL;

  CPadView* pView = (CPadView*)pDoc->GetNextView(pos);
  ASSERT_VALID(pView);
  ASSERT_KINDOF(CPadView, pView);
  return pView;
}

CWordPadView* CEmbeddedItem::GetView ( ) const
CWordPadView* CEmbeddedItem::GetView ( ) const
virtual BOOL CEmbeddedItem::OnDraw | ( | CDC * | pDC,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]
virtual BOOL CEmbeddedItem::OnDraw | ( | CDC * | pDC,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]
BOOL CEmbeddedItem::OnDraw | ( | CDC * | pDC,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]

Definition at line 128 of file paditem.cpp.

{
  // get view attached to the item
  CPadView* pView = GetView();

  // In some situations, OLE1 servers will ask for the presentation data
  //  during shutdown, even though it is not necessary (since the picture
  //  has not changed).  This will happen when closing a frame window
  //  for example.  By this time all the views are gone and there is no
  //  way to produce the metafile data, since the actual text is
  //  stored by the edit control (the view).  In this case, we simply
  //  fail the call.
  if (pView == NULL)
    return FALSE;

  // edit controls have a border around them
  CRect rectClient;
  CRect margin;

  { // Calculate correct ClientRect
    pView->GetClientRect(&rectClient);
    rectClient.InflateRect(-1,-1);

    if (pView->GetStyle() & WS_HSCROLL)
      rectClient.bottom++;
    if (pView->GetStyle() & WS_VSCROLL)
      rectClient.right++;
  }

  { // Calculate margins
    CRect rectEdit;
    pView->GetEditCtrl().GetRect(&rectEdit);

    if (rectEdit.IsRectEmpty())
      rectEdit.SetRect(4,4,4,4);

    int HorzMargin = rectEdit.left - rectClient.left;
    int VertMargin = rectEdit.top - rectClient.top;

    margin.SetRect(HorzMargin,VertMargin,HorzMargin,VertMargin);

    if (pView->GetStyle() & WS_HSCROLL)
      margin.bottom++;
    if (pView->GetStyle() & WS_VSCROLL)
      margin.right++;
  }

  // get the font from the CEditView
  CFont* pFont = pView->GetFont();
  CFont* pOldFont = NULL;
  if (pFont != NULL)
    pOldFont = pDC->SelectObject(pFont);

  // get formatting rectangle
  CRect rect(rectClient);
  rect.left += margin.left;
  rect.top += margin.top;
  rect.right -= margin.right;
  rect.bottom = INT_MAX;

  pDC->SetBkMode(TRANSPARENT);

  // first just determine the correct extents of the text
  pDC->SaveDC();
  pDC->IntersectClipRect(0, 0, 0, 0); // no drawing with NULL clipping
  if (pView->PrintInsideRect(pDC, rect, m_nBeg, m_nEnd) == 0)
  {
    TEXTMETRIC tm;
    pDC->GetTextMetrics(&tm);
    rect.bottom = rect.top + tm.tmHeight + tm.tmExternalLeading;
  }
  pDC->RestoreDC(-1);

  // then, really output the text
  pDC->SetWindowOrg(rect.left-margin.left,rect.top-margin.top);
  pDC->SetWindowExt(margin.left + rect.Width() + margin.right,
    margin.top + rect.Height() + margin.bottom);
  pView->PrintInsideRect(pDC, rect, m_nBeg, m_nEnd);

  // adjust for border (rect.left is already adjusted)
  rect.left -= margin.left;
  rect.top -= margin.top;
  rect.right += margin.right;
  rect.bottom += margin.bottom;

  // select previous font
  if (pOldFont != NULL)
    pDC->SelectObject(pOldFont);

  // return HIMETRIC size
  rSize = rect.Size();
  pDC->LPtoHIMETRIC(&rSize);
  return TRUE;
}

BOOL CEmbeddedItem::OnDrawEx | ( | CDC * | pDC,
 |  | CSize & | rSize,
 |  | BOOL | bOutput
 | ) |  |
BOOL CEmbeddedItem::OnDrawEx | ( | CDC * | pDC,
 |  | CSize & | rSize,
 |  | BOOL | bOutput
 | ) |  |

Definition at line 84 of file srvritem.cpp.

{
  CDisplayIC dc;
  CWordPadView* pView = GetView();
  if (pView == NULL)
    return FALSE;
  ASSERT_VALID(pView);

  int nWrap = pView->m_nWordWrap;

  CRect rect;//rect in twips
  rect.left = rect.top = 0;
  rect.bottom = 32767; // bottomless

  rect.right = 32767;
  if (nWrap == 0) // no word wrap
    rect.right = 32767;
  else if (nWrap == 1) // wrap to window
  {
    CRect rectClient;
    pView->GetClientRect(&rectClient);
    rect.right = rectClient.right - HORZ_TEXTOFFSET;
    rect.right = MulDiv(rect.right, 1440, dc.GetDeviceCaps(LOGPIXELSX));
  }
  else if (nWrap == 2) // wrap to ruler
    rect.right = pView->GetPrintWidth();

  // first just determine the correct extents of the text
  pDC->SetBkMode(TRANSPARENT);

  if (pView->PrintInsideRect(pDC, rect, m_nBeg, m_nEnd, FALSE) == 0)
  {
    // default to 12pts high and 4" wide if no text
    rect.bottom = rect.top+12*20+1; // 12 pts high
    rect.right = rect.left+ 4*1440;
  }
  rect.bottom+=3*(1440/dc.GetDeviceCaps(LOGPIXELSX)); // three pixels

  // then, really output the text
  CRect rectOut = rect; // don't pass rect because it will get clobbered
  if (bOutput)
    pView->PrintInsideRect(pDC, rectOut, m_nBeg, m_nEnd, TRUE);
  ASSERT(rectOut.right == rect.right);

  // adjust for border (rect.left is already adjusted)
  if (pView->GetStyle() & WS_HSCROLL)
    ++rect.bottom;  // account for border on scroll bar!

  // return HIMETRIC size
  rSize = rect.Size();
  rSize.cx = MulDiv(rSize.cx, 2540, 1440); // convert twips to HIMETRIC
  rSize.cy = MulDiv(rSize.cy, 2540, 1440); // convert twips to HIMETRIC
  return TRUE;
}

BOOL CEmbeddedItem::OnGetExtent | ( | DVASPECT | dwDrawAspect,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]

Definition at line 117 of file paditem.cpp.

{
  if (dwDrawAspect != DVASPECT_CONTENT)
    return COleServerItem::OnGetExtent(dwDrawAspect, rSize);

  // no drawing will happen if cliprect is NULL
  CClientDC dc(NULL);
  dc.IntersectClipRect(0, 0, 0, 0);
  return OnDraw(&dc, rSize);
}

virtual BOOL CEmbeddedItem::OnGetExtent | ( | DVASPECT | dwDrawAspect,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]
virtual BOOL CEmbeddedItem::OnGetExtent | ( | DVASPECT | dwDrawAspect,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]
BOOL CEmbeddedItem::OnRenderFileData | ( | LPFORMATETC | lpFormatEtc,
 |  | CFile * | pFile |
 | ) |  |  | [protected, virtual]

Definition at line 29 of file paditem.cpp.

{
  ENSURE(lpFormatEtc != NULL);
  if (lpFormatEtc->cfFormat != CF_TEXT)
    return COleServerItem::OnRenderFileData(lpFormatEtc, pFile);

  BOOL bResult = FALSE;
  TRY
  {
    // save contents of this item to the file
    SaveToFile(pFile);

    // CF_TEXT has NUL termination
    char chZero = '\0';
    pFile->Write(&chZero, sizeof(char));

    bResult = TRUE; // success
  }
  END_TRY

  return bResult;
}

void CEmbeddedItem::SaveToFile ( CFile * pFile ) [protected]

Definition at line 66 of file paditem.cpp.

{
  CPadView* pView = GetView();
  LPCTSTR lpszText = NULL;

  TRY
  {
    // get access to the edit buffer
    lpszText = pView->LockBuffer();

    // get range (make sure inside of text length)
    UINT nEnd = pView->GetWindowTextLength();
    UINT nBeg = min(m_nBeg, nEnd);
    nEnd = min(m_nEnd, nEnd);
#ifdef _UNICODE
    // copy to temp buffer, convert, then write to file
    int nLen = WideCharToMultiByte(CP_ACP, 0, lpszText+nBeg, nEnd-nBeg,
      NULL, 0, NULL, NULL);
    char* pszTemp = new char[nLen];
    WideCharToMultiByte(CP_ACP, 0, lpszText+nBeg, nEnd-nBeg,
      pszTemp, nLen, NULL, NULL);
    pFile->Write(pszTemp, nLen);
    delete[] pszTemp;
#else
    // write it out to the file
    pFile->Write(lpszText+nBeg, (nEnd-nBeg) * sizeof(char));
#endif
  }
  END_TRY

  // release access to edit buffer
  if (lpszText != NULL)
    pView->UnlockBuffer();
}

virtual void CEmbeddedItem::Serialize ( CArchive & ar ) [protected, virtual]
virtual void CEmbeddedItem::Serialize ( CArchive & ar ) [protected, virtual]
void CEmbeddedItem::Serialize ( CArchive & ar ) [protected, virtual]

Definition at line 101 of file paditem.cpp.

{
  if (ar.IsStoring())
  {
    // save just the portion this item refers to
    ar.Flush();
    CFile* pFile = ar.GetFile();
    SaveToFile(pFile);
  }
  else
  {
    // otherwise, read in the entire file
    GetDocument()->Serialize(ar);
  }
}

Member Data Documentation

LPDATAOBJECT CEmbeddedItem::m_lpRichDataObj

Definition at line 29 of file srvritem.h.

int CEmbeddedItem::m_nBeg

Definition at line 28 of file paditem.h.

int CEmbeddedItem::m_nBeg

Definition at line 27 of file srvritem.h.

int CEmbeddedItem::m_nEnd

Definition at line 28 of file srvritem.h.

int CEmbeddedItem::m_nEnd

Definition at line 28 of file paditem.h.

The documentation for this class was generated from the following files:
  • ole/superpad/paditem.h
  • ole/wordpad/srvritem.h
  • vc2008fp/WordPad/srvritem.h
  • ole/superpad/paditem.cpp
  • ole/wordpad/srvritem.cpp
  • vc2008fp/WordPad/srvritem.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEmbeddedOptPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CEmbeddedOptPage Class Reference

#include "docopt.h"

Inherits CDocOptPage, and CDocOptPage.

List of all members.

Public Member Functions

CEmbeddedOptPage ()
CEmbeddedOptPage ()
BOOL | OnInitDialog ()
BOOL | OnInitDialog ()

Detailed Description

Definition at line 53 of file docopt.h.

Constructor & Destructor Documentation

CEmbeddedOptPage::CEmbeddedOptPage ( )

Definition at line 90 of file docopt.cpp.

                                   : CDocOptPage(IDS_EMBEDDED_OPTIONS)
{
}

CEmbeddedOptPage::CEmbeddedOptPage ( )

Member Function Documentation

BOOL CEmbeddedOptPage::OnInitDialog ( )

Definition at line 94 of file docopt.cpp.

{
  BOOL b = CDocOptPage::OnInitDialog();
  GetDlgItem(IDC_CHECK_STATUSBAR)->ShowWindow(SW_HIDE);
  return b;
}

BOOL CEmbeddedOptPage::OnInitDialog ( )
The documentation for this class was generated from the following files:
  • ole/wordpad/docopt.h
  • vc2008fp/WordPad/docopt.h
  • ole/wordpad/docopt.cpp
  • vc2008fp/WordPad/docopt.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEmpView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CEmpView Class Reference

#include "EmpView.h"

List of all members.

Public Member Functions

CDBVListDoc * GetDocument ()
virtual BOOL | OnChildNotify (UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
virtual void | OnInitialUpdate ()
void | UpdateFilter (CString strCurQuery)

Protected Member Functions

CEmpView ()
virtual | ~CEmpView ()
int | FindItem (int iStart, LVFINDINFO *plvfi)
void | GetDispInfo (LVITEM *pItem)
afx_msg void | OnColumnClick (UINT id, NMHDR *pNotifyStruct, LRESULT *pResult)
void | PrepareCache (int iFrom, int iTo)

Detailed Description

Definition at line 22 of file EmpView.h.

Constructor & Destructor Documentation

CEmpView::CEmpView ( ) [protected]

Definition at line 30 of file EmpView.cpp.

{
  m_dwDefaultStyle |= ( LVS_REPORT | LVS_OWNERDATA );
}

CEmpView::~CEmpView ( ) [protected, virtual]

Definition at line 35 of file EmpView.cpp.

{
}

Member Function Documentation

int CEmpView::FindItem | ( | int | iStart,
 |  | LVFINDINFO * | plvfi |
 | ) |  |  | [protected]

Definition at line 114 of file EmpView.cpp.

{
  return -1;
}

void CEmpView::GetDispInfo ( LVITEM * pItem ) [protected]

Definition at line 75 of file EmpView.cpp.

{
  CDBVListSet* pSet = &GetDocument()->m_dBVListSet;

  // called when the listview needs to display data
  if(pItem->mask & LVIF_TEXT)
  {
    // first, move to the appropriate row in the database
    pSet->MoveFirst();
    pSet->Move(pItem->iItem);

    if(!pSet->IsEOF())
    {
      // then display the appropriate column
      switch(pItem->iSubItem)
      {
      case 0:
        _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Email);
        break;
      case 1:
        _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Name);
        break;
      case 2:
        _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Phone);
        break;
      case 3:
        _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Location);
        break;
      case 4:
        _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Title);
        break;
      case 5:
        _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Department);
        break;
      }
    }
  }
}

CDBVListDoc * CEmpView::GetDocument ( ) [inline]

Definition at line 67 of file EmpView.h.

   { return (CDBVListDoc*)m_pDocument; }

BOOL CEmpView::OnChildNotify | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [virtual]

Definition at line 208 of file EmpView.cpp.

{
  if(message == WM_NOTIFY)
  {
    NMHDR* phdr = (NMHDR*)lParam;

    // these 3 notifications are only sent by virtual listviews
    switch(phdr->code)
    {
    case LVN_GETDISPINFO:
      {
        NMLVDISPINFO* pLvdi;

        pLvdi = (NMLVDISPINFO*)lParam;
        GetDispInfo(&pLvdi->item);
      }
      if(pResult != NULL)
      {
        *pResult = 0;
      }
      break;
    case LVN_ODCACHEHINT:
      {
        NMLVCACHEHINT* pHint = (NMLVCACHEHINT*)lParam;

        PrepareCache(pHint->iFrom, pHint->iTo);
      }
      if(pResult != NULL)
      {
        *pResult = 0;
      }
      break;
    case LVN_ODFINDITEM:
      {
        NMLVFINDITEM* pFindItem = (NMLVFINDITEM*)lParam;
        int i = FindItem(pFindItem->iStart, &pFindItem->lvfi);
        if(pResult != NULL)
        {
          *pResult = i;
        }
      }
      break;
    default:
      return CListView::OnChildNotify(message, wParam, lParam, pResult);
    }
  }
  else
    return CListView::OnChildNotify(message, wParam, lParam, pResult);

  return TRUE;
}

void CEmpView::OnColumnClick | ( | UINT | id,
 |  | NMHDR * | pNotifyStruct,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 175 of file EmpView.cpp.

{
  // when a column is clicked on, sort by that column

  CDBVListSet* pSet = &GetDocument()->m_dBVListSet;

  switch(reinterpret_cast<NMLISTVIEW*>(pNotifyStruct)->iSubItem)
  {
  case 0:
    pSet->SetSort(_T("[Email]"));
    break;
  case 1:
    pSet->SetSort(_T("[Name]"));
    break;
  case 2:
    pSet->SetSort(_T("[Phone]"));
    break;
  case 3:
    pSet->SetSort(_T("[Location]"));
    break;
  case 4:
    pSet->SetSort(_T("[Title]"));
    break;
  case 5:
    pSet->SetSort(_T("[Department]"));
    break;
  case 6:
    pSet->SetSort(_T("[Division]"));
    break;
  }
  Invalidate();
}

void CEmpView::OnInitialUpdate ( ) [virtual]

Definition at line 139 of file EmpView.cpp.

{
  //initialise columns in the listview

  CListView::OnInitialUpdate();

  LV_COLUMN lvc;

  lvc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH;

  lvc.iSubItem = 0;
  lvc.pszText = _T("Email");
  lvc.cx = 75;
  GetListCtrl().InsertColumn(0,&lvc);
  lvc.iSubItem = 1;
  lvc.pszText = _T("Name (First, Last)");
  lvc.cx = 125;
  GetListCtrl().InsertColumn(1,&lvc);
  lvc.iSubItem = 2;
  lvc.pszText = _T("Phone");
  lvc.cx = 75;
  GetListCtrl().InsertColumn(2,&lvc);
  lvc.iSubItem = 3;
  lvc.pszText = _T("Location");
  lvc.cx = 75;
  GetListCtrl().InsertColumn(3,&lvc);
  lvc.iSubItem = 4;
  lvc.pszText = _T("Title");
  lvc.cx = 150;
  GetListCtrl().InsertColumn(4,&lvc);
  lvc.iSubItem = 5;
  lvc.pszText = _T("Dept");
  lvc.cx = 150;
  GetListCtrl().InsertColumn(5,&lvc);
}

void CEmpView::PrepareCache | ( | int | iFrom,
 |  | int | iTo |
 | ) |  |  | [protected]

Definition at line 71 of file EmpView.cpp.

{
}

void CEmpView::UpdateFilter ( CString strCurQuery )

Definition at line 119 of file EmpView.cpp.

{
  // convenience function to set the SQL filter for the query

  CDBVListSet* pSet = &GetDocument()->m_dBVListSet;

  pSet->SetFilter(strCurQuery);

  // set the item count to the new record count
  int nRecordCount = 0;
  if (pSet->IsOpen())
  {
    nRecordCount=pSet->GetRecordCount();
  }
  GetListCtrl().SetItemCountEx(nRecordCount);

  // Invalidate the listview so it will redraw itself
  Invalidate();
}

The documentation for this class was generated from the following files:
  • general/DBVList/EmpView.h
  • general/DBVList/EmpView.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEndWizardDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CEndWizardDialog Class Reference

#include "CTaskDialogDemoDlg.h"

List of all members.

Public Member Functions

CEndWizardDialog ()
void | SetDialog (CTaskDialog *prev)

Private Attributes

CTaskDialog * | m_prev

Detailed Description

Definition at line 127 of file CTaskDialogDemoDlg.h.

Constructor & Destructor Documentation

CEndWizardDialog::CEndWizardDialog ( ) [inline]

Definition at line 132 of file CTaskDialogDemoDlg.h.

                       : CTaskDialog(_T("There is nothing more to see!"),
      _T("This is the end!"), _T("Third window!"), TDCBF_OK_BUTTON,
      TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_ALLOW_DIALOG_CANCELLATION)
    {
      SetMainIcon(TD_WARNING_ICON);
    }

Member Function Documentation

void CEndWizardDialog::SetDialog ( CTaskDialog * prev ) [inline]

Definition at line 139 of file CTaskDialogDemoDlg.h.

{ m_prev = prev; }

Member Data Documentation

CTaskDialog* CEndWizardDialog::m_prev [private]

Definition at line 130 of file CTaskDialogDemoDlg.h.

The documentation for this class was generated from the following file:
  • general/CTaskDialog/CTaskDialogDemoDlg.h
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEnterDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CEnterDlg Class Reference

#include "enterdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_CHANGEDATA }

Public Member Functions

CEnterDlg (CWnd *pParent=NULL)

Public Attributes

CString | m_strInput

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file enterdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file enterdlg.h.

{ IDD = IDD_CHANGEDATA };

Constructor & Destructor Documentation

CEnterDlg::CEnterDlg ( CWnd * pParent = NULL )

Definition at line 26 of file enterdlg.cpp.

  : CDialog(CEnterDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CEnterDlg)
  m_strInput = "";
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CEnterDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file enterdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CEnterDlg)
  DDX_Text(pDX, IDC_EDIT1, m_strInput);
  //}}AFX_DATA_MAP
}

Member Data Documentation

CString CEnterDlg::m_strInput

Definition at line 25 of file enterdlg.h.

The documentation for this class was generated from the following files:
  • general/viewex/enterdlg.h
  • general/viewex/enterdlg.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEntryInfoDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CEntryInfoDlg Class Reference

#include "EnterInfoDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_ENTRYINFO_DLG, IDH = IDR_HTML_ENTRYINFO_DLG }

Public Member Functions

CEntryInfoDlg (CWnd *pParent=NULL)
virtual | ~CEntryInfoDlg ()
BOOL | CheckStartEndTime ()
BOOL | CheckValidDescription ()
BOOL | CheckValidTitle ()
void | GetHourMinute (CString szTime, CString &szHour, CString &szMinute, int &iHour)
HRESULT | OnButtonCancel (IHTMLElement *pElement)
HRESULT | OnButtonClear (IHTMLElement *pElement)
HRESULT | OnButtonDelete (IHTMLElement *pElement)
HRESULT | OnButtonModify (IHTMLElement *pElement)
HRESULT | OnButtonSave (IHTMLElement *pElement)
void | OnDocumentComplete (LPDISPATCH pDisp, LPCTSTR szUrl)
HRESULT | OnMouseOutButtons (IHTMLElement *pElement)
HRESULT | OnMouseOverButtons (IHTMLElement *pElement)
const CEntryInfoDlg & | operator= (const CEntryInfoDlg &InfoDlg)
void | ResetVariables ()
void | SetDefaultSettings ()

Public Attributes

BOOL | m_fCancelSchedule
BOOL | m_fClearSchedule
BOOL | m_fDeleteSchedule
BOOL | m_fModifySchedule
BOOL | m_fUpdateScheduleDisplay
BOOL | m_fVisibleButtons
BOOL | m_fVisibleDefaultButtons
int | m_iEndHour
int | m_iStartHour
CString | m_szDescription
CString | m_szEndTime
CString | m_szEndTimeHour
CString | m_szEndTimeMinute
CString | m_szStartTime
CString | m_szStartTimeHour
CString | m_szStartTimeMinute
CString | m_szTitle

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 20 of file EnterInfoDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD
IDH

Definition at line 65 of file EnterInfoDlg.h.

{ IDD = IDD_ENTRYINFO_DLG, IDH = IDR_HTML_ENTRYINFO_DLG };

Constructor & Destructor Documentation

CEntryInfoDlg::CEntryInfoDlg ( CWnd * pParent = NULL )

Definition at line 27 of file EnterInfoDlg.cpp.

  : CDHtmlDialog(CEntryInfoDlg::IDD, CEntryInfoDlg::IDH, pParent)
{
  SetDefaultSettings();
}

CEntryInfoDlg::~CEntryInfoDlg ( ) [virtual]

Definition at line 33 of file EnterInfoDlg.cpp.

{
}

Member Function Documentation

BOOL CEntryInfoDlg::CheckStartEndTime ( )

Definition at line 300 of file EnterInfoDlg.cpp.

{
  BOOL fRetval = true;

  ResetVariables();

  //Get the hour and minutes for the start time
  GetHourMinute(m_szStartTime, m_szStartTimeHour, m_szStartTimeMinute, m_iStartHour);

  //Get the hour and minutes for the end time
  GetHourMinute(m_szEndTime, m_szEndTimeHour, m_szEndTimeMinute, m_iEndHour);

  CTime startTime(2000, 8, 27, m_iStartHour, atoi(m_szStartTimeMinute), 0);
  CTime endTime(2000, 8, 27, m_iEndHour, atoi(m_szEndTimeMinute), 0);

  if (startTime >= endTime)
  {
    AfxMessageBox(IDS_INVALIDTIME);
    fRetval = false;
  }

  return fRetval;
}

BOOL CEntryInfoDlg::CheckValidDescription ( )

Definition at line 383 of file EnterInfoDlg.cpp.

{
  BOOL fRetval = true;

  if (m_szDescription.GetLength() > 200)
    fRetval = false;

  return fRetval;
}

BOOL CEntryInfoDlg::CheckValidTitle ( )

Definition at line 355 of file EnterInfoDlg.cpp.

{
  BOOL fRetval;
  CComPtr<IHTMLControlElement> pTitleControlElement;
  HRESULT result;

  if (m_szTitle.IsEmpty())
  {
    AfxMessageBox(IDS_ENTERTITLE);

    result = GetElementInterface(_T("Title"), &pTitleControlElement);

    ASSERT(pTitleControlElement);

    result = pTitleControlElement->focus();

    fRetval = false;
  }
  else
    fRetval = true;

  return fRetval;
}

void CEntryInfoDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 37 of file EnterInfoDlg.cpp.

{
  CDHtmlDialog::DoDataExchange(pDX);
  DDX_DHtml_SelectString (pDX, _T("ListStartTime"), m_szStartTime);
  DDX_DHtml_SelectString (pDX, _T("ListEndTime"), m_szEndTime);
  DDX_DHtml_ElementValue (pDX, _T("Title"), m_szTitle);
  DDX_DHtml_ElementValue (pDX, _T("Description"), m_szDescription);
  DDV_MaxChars(pDX, m_szTitle, 30);
  DDV_MaxChars(pDX, m_szDescription, 200);
}

void CEntryInfoDlg::GetHourMinute | ( | CString | szTime,
 |  | CString & | szHour,
 |  | CString & | szMinute,
 |  | int & | iHour
 | ) |  |

Definition at line 411 of file EnterInfoDlg.cpp.

{
  CString szAmpm;
  int iTime;

  //Retrieving the hour
  //eg. 8, if the selected start time is 8:00am or 8:30am
  for (iTime =0; szTime.GetAt(iTime) != ':';iTime++)
    szHour += szTime.GetAt(iTime);

  //Retrieving the minute
  //eg. 00 or 30, if the selected start time minute is 8:00am or 8:30am
  iTime++; //To exclude ':'
  for (iTime; szTime.GetAt(iTime) != ' ';iTime++)
    szMinute += szTime.GetAt(iTime);

  //Retrieving whether am or pm
  szAmpm = szTime.Right(2);

  iHour = atoi(szHour);

  if (iHour != 12 && !strcmp(szAmpm, _T("pm")))
    iHour += 12;
}

HRESULT CEntryInfoDlg::OnButtonCancel ( IHTMLElement * pElement )

Definition at line 100 of file EnterInfoDlg.cpp.

{
  m_fCancelSchedule = true;
  OnCancel();
  return S_OK;
}

HRESULT CEntryInfoDlg::OnButtonClear ( IHTMLElement * pElement )

Definition at line 110 of file EnterInfoDlg.cpp.

{
  m_fClearSchedule = true;
  m_szTitle.Empty();
  m_szDescription.Empty();
  UpdateData (false);
  return S_OK;
}

HRESULT CEntryInfoDlg::OnButtonDelete ( IHTMLElement * pElement )

Definition at line 146 of file EnterInfoDlg.cpp.

{
  m_fDeleteSchedule = true;
  OnCancel();
  return S_OK;
}

HRESULT CEntryInfoDlg::OnButtonModify ( IHTMLElement * pElement )

Definition at line 124 of file EnterInfoDlg.cpp.

{
  UpdateData(true);

  if (CheckValidTitle() && CheckValidDescription() && CheckStartEndTime())
  {
    ASSERT(m_szTitle);
    ASSERT(m_szDescription.GetLength() <= 200);

    m_fModifySchedule = true;
    OnOK();
  }
  else
    m_fModifySchedule = false;

  return S_OK;
}

HRESULT CEntryInfoDlg::OnButtonSave ( IHTMLElement * pElement )

Definition at line 78 of file EnterInfoDlg.cpp.

{
  UpdateData(true);

  if (CheckValidTitle() && CheckValidDescription() && CheckStartEndTime())
  {
    ASSERT(m_szTitle);
    ASSERT(m_szDescription.GetLength() <= 200);

    m_fUpdateScheduleDisplay = true;
    OnOK();
  }
  else
    m_fUpdateScheduleDisplay = false;

  return S_OK;
}

void CEntryInfoDlg::OnDocumentComplete | ( | LPDISPATCH | pDisp,
 |  | LPCTSTR | szUrl
 | ) |  |

Definition at line 158 of file EnterInfoDlg.cpp.

{
  CDHtmlDialog::OnDocumentComplete(pDisp, szUrl);

  CComPtr<IHTMLElement> pModifyElement;
  CComPtr<IHTMLElement> pDeleteElement;
  CComPtr<IHTMLElement> pSaveElement;
  CComPtr<IHTMLElement> pClearElement;
  CComPtr<IHTMLElement> pCancelElement;
  CComPtr<IHTMLStyle> pModifyStyle;
  CComPtr<IHTMLStyle> pDeleteStyle;
  CComPtr<IHTMLStyle> pSaveStyle;
  CComPtr<IHTMLStyle> pClearStyle;
  CComPtr<IHTMLStyle> pCancelStyle;

  HRESULT result;
  CComBSTR bstr;
  CComBSTR Defaultbstr;
  CString szStr;
  CString szDefaultstr;
  COleVariant varColor;

  if (!m_fVisibleButtons)
    szStr = _T("hidden");
  else
    szStr = _T("visible");

  if (!m_fVisibleDefaultButtons)
    szDefaultstr = _T("hidden");
  else
    szDefaultstr = _T("visible");

  result = GetElement(_T("BModify"), &pModifyElement);
  result = GetElement(_T("BDelete"), &pDeleteElement);
  result = GetElement(_T("BSave"), &pSaveElement);
  result = GetElement(_T("BClear"), &pClearElement);
  result = GetElement(_T("BCancel"), &pCancelElement);

  ASSERT(pModifyElement);
  ASSERT(pDeleteElement);
  ASSERT(pSaveElement);
  ASSERT(pClearElement);
  ASSERT(pCancelElement);

  pModifyElement->get_style(&pModifyStyle);
  pDeleteElement->get_style(&pDeleteStyle);
  pSaveElement->get_style(&pSaveStyle);
  pClearElement->get_style(&pClearStyle);
  pCancelElement->get_style(&pCancelStyle);

  ASSERT(pModifyStyle);
  ASSERT(pDeleteStyle);
  ASSERT(pSaveStyle);
  ASSERT(pClearStyle);
  ASSERT(pCancelStyle);

  bstr = szStr.AllocSysString();
  Defaultbstr = szDefaultstr.AllocSysString();

  if (pModifyStyle && pDeleteStyle && pSaveStyle && pClearStyle && pCancelStyle)
  {
    pModifyStyle->put_visibility(bstr);
    pDeleteStyle->put_visibility(bstr);
    pSaveStyle->put_visibility(Defaultbstr);
    pClearStyle->put_visibility(Defaultbstr);
    varColor = YELLOW;
    pModifyStyle->put_color(varColor);
    pDeleteStyle->put_color(varColor);
    pSaveStyle->put_color(varColor);
    pClearStyle->put_color(varColor);
    pCancelStyle->put_color(varColor);
    varColor = BLACK;
    pModifyStyle->put_backgroundColor(varColor);
    pDeleteStyle->put_backgroundColor(varColor);
    pSaveStyle->put_backgroundColor(varColor);
    pClearStyle->put_backgroundColor(varColor);
    pCancelStyle->put_backgroundColor(varColor);
  }
}

BOOL CEntryInfoDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 48 of file EnterInfoDlg.cpp.

{
  CDHtmlDialog::OnInitDialog();

  m_szEndTime = _T("6:00 pm");
  return TRUE;  // return TRUE  unless you set the focus to a control
}

HRESULT CEntryInfoDlg::OnMouseOutButtons ( IHTMLElement * pElement )

Definition at line 264 of file EnterInfoDlg.cpp.

{
  CComPtr<IHTMLStyle> phtmlStyle;
  COleVariant varColor;

  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = YELLOW;
    phtmlStyle->put_color(varColor);
  }
  return NULL;
}

HRESULT CEntryInfoDlg::OnMouseOverButtons ( IHTMLElement * pElement )

Definition at line 242 of file EnterInfoDlg.cpp.

{
  CComPtr<IHTMLStyle> phtmlStyle;
  COleVariant varColor;

  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = AQUA;
    phtmlStyle->put_color(varColor);
    phtmlStyle->put_cursor(L"hand");
  }
  return NULL;
}

const CEntryInfoDlg & CEntryInfoDlg::operator= ( const CEntryInfoDlg & InfoDlg )

Definition at line 327 of file EnterInfoDlg.cpp.

{
  if (this != &InfoDlg)
  {
    m_fUpdateScheduleDisplay = InfoDlg.m_fUpdateScheduleDisplay;
    m_fDeleteSchedule = InfoDlg.m_fDeleteSchedule;
    m_fModifySchedule = InfoDlg.m_fModifySchedule;
    m_fClearSchedule = InfoDlg.m_fClearSchedule;
    m_fVisibleButtons = InfoDlg.m_fVisibleButtons;
    m_fVisibleDefaultButtons = InfoDlg.m_fVisibleDefaultButtons;
    m_szStartTime = InfoDlg.m_szStartTime;
    m_szEndTime = InfoDlg.m_szEndTime;
    m_szTitle = InfoDlg.m_szTitle;
    m_szDescription = InfoDlg.m_szDescription;
    m_szStartTimeHour = InfoDlg.m_szStartTimeHour;
    m_szStartTimeMinute = InfoDlg.m_szStartTimeMinute;
    m_szEndTimeHour = InfoDlg.m_szEndTimeHour;
    m_szEndTimeMinute = InfoDlg.m_szEndTimeMinute;
    m_iStartHour = InfoDlg.m_iStartHour;
    m_iEndHour = InfoDlg.m_iEndHour;
  }
  return *this;
}

void CEntryInfoDlg::ResetVariables ( )

Definition at line 396 of file EnterInfoDlg.cpp.

{
  m_szStartTimeHour.Empty();
  m_szStartTimeMinute.Empty();
  m_szEndTimeHour.Empty();
  m_szEndTimeMinute.Empty();
}

void CEntryInfoDlg::SetDefaultSettings ( )

Definition at line 284 of file EnterInfoDlg.cpp.

{
  m_fVisibleButtons = false;
  m_fVisibleDefaultButtons = true;
  m_fUpdateScheduleDisplay = false;
  m_fDeleteSchedule = false;
  m_fModifySchedule = false;
  m_fClearSchedule = false;
  m_fCancelSchedule = false;
  m_iStartHour = 0;
  m_iEndHour = 0;
}

Member Data Documentation

BOOL CEntryInfoDlg::m_fCancelSchedule

Definition at line 41 of file EnterInfoDlg.h.

BOOL CEntryInfoDlg::m_fClearSchedule

Definition at line 40 of file EnterInfoDlg.h.

BOOL CEntryInfoDlg::m_fDeleteSchedule

Definition at line 38 of file EnterInfoDlg.h.

BOOL CEntryInfoDlg::m_fModifySchedule

Definition at line 39 of file EnterInfoDlg.h.

BOOL CEntryInfoDlg::m_fUpdateScheduleDisplay

Definition at line 37 of file EnterInfoDlg.h.

BOOL CEntryInfoDlg::m_fVisibleButtons

Definition at line 42 of file EnterInfoDlg.h.

BOOL CEntryInfoDlg::m_fVisibleDefaultButtons

Definition at line 43 of file EnterInfoDlg.h.

int CEntryInfoDlg::m_iEndHour

Definition at line 53 of file EnterInfoDlg.h.

int CEntryInfoDlg::m_iStartHour

Definition at line 52 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szDescription

Definition at line 47 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szEndTime

Definition at line 45 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szEndTimeHour

Definition at line 50 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szEndTimeMinute

Definition at line 51 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szStartTime

Definition at line 44 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szStartTimeHour

Definition at line 48 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szStartTimeMinute

Definition at line 49 of file EnterInfoDlg.h.

CString CEntryInfoDlg::m_szTitle

Definition at line 46 of file EnterInfoDlg.h.

The documentation for this class was generated from the following files:
  • internet/Scheduler/EnterInfoDlg.h
  • internet/Scheduler/EnterInfoDlg.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEnumVariant Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CEnumVariant Class Reference

#include "enumvar.h"

List of all members.

Public Member Functions

CEnumVariant ()
STDMETHOD() | Clone (IEnumVARIANT **ppenum)
STDMETHOD() | Next (ULONG celt, VARIANT *rgvar, ULONG *pceltFetched)
virtual void | OnFinalRelease ()
STDMETHOD() | Reset ()
void | SetContents (VARIANT *pContents, int nCount, int nIndex=0)
STDMETHOD() | Skip (ULONG celt)

Public Attributes

int | m_nCount
int | m_nIndex
VARIANT * | m_pContents

Protected Member Functions

virtual | ~CEnumVariant ()

Protected Attributes

CEnumVariant * m_pClonedFrom

Detailed Description

Definition at line 15 of file enumvar.h.

Constructor & Destructor Documentation

CEnumVariant::CEnumVariant ( )

Definition at line 26 of file enumvar.cpp.

{
  m_nIndex = 0;
  m_nCount = 0;
  m_pContents = NULL;

  m_pClonedFrom = NULL;

  // To keep the application running as long as an OLE automation
  //  object is active, the constructor calls AfxOleLockApp.

  AfxOleLockApp();
}

CEnumVariant::~CEnumVariant ( ) [protected, virtual]

Definition at line 40 of file enumvar.cpp.

{
  if (m_pClonedFrom != NULL)
  {
    m_pClonedFrom->ExternalRelease();
  }
  else
  {
    for (int i = 0; i < m_nCount; ++i)
      VariantClear(&m_pContents[i]);
    delete[] m_pContents;
  }

  // To terminate the application when all objects created with
  //  with OLE automation, the destructor calls AfxOleUnlockApp.

  AfxOleUnlockApp();
}

Member Function Documentation

STDMETHOD() CEnumVariant::Clone ( IEnumVARIANT ** ppenum )
STDMETHOD() CEnumVariant::Next | ( | ULONG | celt,
 |  | VARIANT * | rgvar,
 |  | ULONG * | pceltFetched
 | ) |  |
void CEnumVariant::OnFinalRelease ( ) [virtual]

Definition at line 59 of file enumvar.cpp.

{
  // When the last reference for an automation object is released
  //  OnFinalRelease is called.  This implementation deletes the
  //  object.  Add additional cleanup required for your object before
  //  deleting it from memory.

  delete this;
}

STDMETHOD() CEnumVariant::Reset ( )
void CEnumVariant::SetContents | ( | VARIANT * | pContents,
 |  | int | nCount,
 |  | int | nIndex = 0
 | ) |  |

Definition at line 69 of file enumvar.cpp.

{
  ASSERT(nIndex < nCount);
  ASSERT(nCount == 0 || pContents != NULL);
  ASSERT(pContents == NULL ||
    AfxIsValidAddress(pContents, sizeof(VARIANT)*nCount, FALSE));

  m_nCount = nCount;
  m_pContents = pContents;
  m_nIndex = nIndex;
}

STDMETHOD() CEnumVariant::Skip ( ULONG celt )

Member Data Documentation

int CEnumVariant::m_nCount

Definition at line 24 of file enumvar.h.

int CEnumVariant::m_nIndex

Definition at line 23 of file enumvar.h.

CEnumVariant* CEnumVariant::m_pClonedFrom [protected]

Definition at line 41 of file enumvar.h.

VARIANT* CEnumVariant::m_pContents

Definition at line 25 of file enumvar.h.

The documentation for this class was generated from the following files:
  • ole/inproc/enumvar.h
  • ole/inproc/enumvar.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CEventLoggingPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CEventLoggingPage Class Reference

#include "EvLogPg.H"

List of all members.

Public Types

enum | { IDD = IDD_CONTROLLOGGING_EVENTS }

Public Member Functions

CEventLoggingPage ()
~CEventLoggingPage ()

Public Attributes

CStringArray | m_astrEventNames
CUIntArray | m_atLogFlags
CCheckListBox | m_lbEvents

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 22 of file EvLogPg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 33 of file EvLogPg.H.

{ IDD = IDD_CONTROLLOGGING_EVENTS };

Constructor & Destructor Documentation

CEventLoggingPage::CEventLoggingPage ( )

Definition at line 25 of file EvLogPg.Cpp.

                                     :
   CPropertyPage( CEventLoggingPage::IDD )
{
   m_psp.dwFlags &= ~PSP_HASHELP;

  //{{AFX_DATA_INIT(CEventLoggingPage)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

CEventLoggingPage::~CEventLoggingPage ( )

Definition at line 35 of file EvLogPg.Cpp.

{
}

Member Function Documentation

void CEventLoggingPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 39 of file EvLogPg.Cpp.

{
   int iEvent;
   int iItem;

  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CEventLoggingPage)
  DDX_Control(pDX, IDC_EVENTS, m_lbEvents);
  //}}AFX_DATA_MAP

   if( m_lbEvents.GetCount() > 0 )
   {
    for( iEvent = 0; iEvent < m_astrEventNames.GetSize(); iEvent++ )
    {
     iItem = m_lbEvents.FindStringExact( -1, m_astrEventNames[iEvent] );
     ASSERT( iItem != LB_ERR );
     if( pDX->m_bSaveAndValidate )
     {
      m_atLogFlags[iEvent] = m_lbEvents.GetCheck( iItem );
     }
     else
     {

      m_lbEvents.SetCheck( iItem, m_atLogFlags[iEvent] != FALSE );
     }
    }
   }
}

void CEventLoggingPage::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 109 of file EvLogPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CEventLoggingPage::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 101 of file EvLogPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CEventLoggingPage::OnInitDialog ( ) [protected, virtual]

Definition at line 79 of file EvLogPg.Cpp.

{
   int iEvent;

  CPropertyPage::OnInitDialog();

   for( iEvent = 0; iEvent < m_astrEventNames.GetSize(); iEvent++ )
   {
    m_lbEvents.AddString( m_astrEventNames[iEvent] );
   }

   UpdateData( FALSE );

  return( TRUE );
}

Member Data Documentation

CStringArray CEventLoggingPage::m_astrEventNames

Definition at line 37 of file EvLogPg.H.

CUIntArray CEventLoggingPage::m_atLogFlags

Definition at line 38 of file EvLogPg.H.

CCheckListBox CEventLoggingPage::m_lbEvents

Definition at line 34 of file EvLogPg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/EvLogPg.H
  • ole/TstCon/EvLogPg.Cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CExampleThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CExampleThread Class Reference

#include "threads.h"

Inherited by CCounterThread, and CDisplayThread.

List of all members.

Public Member Functions

void | SetOwner (CMutexesDlg *pOwner)

Public Attributes

BOOL | m_bDone
CMutexesDlg * m_pOwner

Protected Member Functions

CExampleThread ()

Detailed Description

Definition at line 19 of file threads.h.

Constructor & Destructor Documentation

CExampleThread::CExampleThread ( ) [protected]

Definition at line 29 of file threads.cpp.

{
  m_bDone = FALSE;
  m_pOwner = NULL;
  m_bAutoDelete = FALSE;
}

Member Function Documentation

void CExampleThread::SetOwner ( CMutexesDlg * pOwner ) [inline]

Definition at line 28 of file threads.h.

{ m_pOwner = pOwner; };

Member Data Documentation

BOOL CExampleThread::m_bDone

Definition at line 27 of file threads.h.

CMutexesDlg* CExampleThread::m_pOwner

Definition at line 26 of file threads.h.

The documentation for this class was generated from the following files:
  • advanced/mutexes/threads.h
  • advanced/mutexes/threads.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CExcepInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CExcepInfo Class Reference

#include "ExcepInf.H"

List of all members.

Public Member Functions

CExcepInfo ()
~CExcepInfo ()
void Clear ()

Detailed Description

Definition at line 10 of file ExcepInf.H.

Constructor & Destructor Documentation

CExcepInfo::CExcepInfo ( )

Definition at line 19 of file ExcepInf.Cpp.

{
   memset( this, 0, sizeof( *this ) );
}

CExcepInfo::~CExcepInfo ( )

Definition at line 24 of file ExcepInf.Cpp.

{
   Clear();
}

Member Function Documentation

void CExcepInfo::Clear ( )

Definition at line 29 of file ExcepInf.Cpp.

{
   if( bstrSource != NULL )
   {
    ::SysFreeString( bstrSource );
   }
   if( bstrDescription != NULL )
   {
    ::SysFreeString( bstrDescription );
   }
   if( bstrHelpFile != NULL )
   {
    ::SysFreeString( bstrHelpFile );
   }

   memset( this, 0, sizeof( *this ) );
}

The documentation for this class was generated from the following files:
  • ole/TstCon/ExcepInf.H
  • ole/TstCon/ExcepInf.Cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CExplorerApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CExplorerApp Class Reference

#include "Explorer.h"

List of all members.

Public Member Functions

CExplorerApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file Explorer.h.

Constructor & Destructor Documentation

CExplorerApp::CExplorerApp ( )

Definition at line 39 of file Explorer.cpp.

                           : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CExplorerApp::ExitInstance ( ) [virtual]

Definition at line 119 of file Explorer.cpp.

{
  CoUninitialize ();
  return CWinAppEx::ExitInstance();
}

BOOL CExplorerApp::InitInstance ( ) [virtual]

Definition at line 53 of file Explorer.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  CoInitialize (NULL);

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();
  InitShellManager();

  // Enable user-defined tools. If you want allow more than 10 tools,
  // add tools entry to resources (ID_USER_TOOL11, ID_USER_TOOL12,...)
  EnableUserTools (ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10);

  // 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(CExplorerDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CExplorerView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CExplorerApp::OnAppAbout ( )

Definition at line 178 of file Explorer.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CExplorerApp::PreLoadState ( ) [virtual]

Definition at line 125 of file Explorer.cpp.

{
  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/Explorer/Explorer.h
  • vc2008fp/Explorer/Explorer.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CExplorerBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CExplorerBar Class Reference

#include "ExplorerBar.h"

List of all members.

Public Member Functions

CExplorerBar ()
virtual | ~CExplorerBar ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnSelectTree (NMHDR *pNMHDR, LRESULT *pResult)

Protected Attributes

CTreeCtrl | m_wndFavorites

Detailed Description

Definition at line 19 of file ExplorerBar.h.

Constructor & Destructor Documentation

CExplorerBar::CExplorerBar ( )

Definition at line 28 of file ExplorerBar.cpp.

{
}

CExplorerBar::~CExplorerBar ( ) [virtual]

Definition at line 32 of file ExplorerBar.cpp.

{
}

Member Function Documentation

int CExplorerBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 46 of file ExplorerBar.cpp.

{
  if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
    return -1;

  SetWindowText (_T("Explorer Bar"));
  EnableOffsetCustomControls (FALSE);

  // ----------------------
  // Create favorites list:
  // ----------------------
  CRect rectDummy (0, 0, 0, 0);
  const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_SINGLEEXPAND | TVS_TRACKSELECT;

  if(!m_wndFavorites.Create (dwTreeStyle, rectDummy,
    this, idTree))
  {
    TRACE0("Failed to create the Favorites window\n");
    return FALSE;      // fail to create
  }

  theApp.m_Favorites.FillTree (m_wndFavorites);

  // -----------
  // Add groups:
  // -----------
  int nGroup1 = AddGroup (_T("Favorites"), FALSE, TRUE);
  AddWindow (nGroup1, m_wndFavorites.GetSafeHwnd (), 200);

  int nGroup2 = AddGroup (_T("Links"));

  AddTask (nGroup2, _T("MSDN Home"), -1, ID_LINK_MSDN);
  AddTask (nGroup2, _T("Microsoft Home"), -1, ID_LINK_MICROSOFT);
  AddTask (nGroup2, _T("Visual C++ Developer Center"), -1, ID_LINK_VISUALCPP);

  return 0;
}

void CExplorerBar::OnSelectTree | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 84 of file ExplorerBar.cpp.

{
  HTREEITEM hTreeItem = m_wndFavorites.GetSelectedItem ();
  if (hTreeItem != NULL)
  {
    CFavorit* pFavorit = (CFavorit*) m_wndFavorites.GetItemData (hTreeItem);
    ASSERT_VALID (pFavorit);

    if (!pFavorit->GetURL ().IsEmpty ())
    {
      CIEDemoView* pView =
        (CIEDemoView*)((CFrameWnd*) AfxGetMainWnd ())->GetActiveView ();
      ASSERT_VALID (pView);

      pView->Navigate2 (pFavorit->GetURL ());
    }
  }

  *pResult = 0;
}

Member Data Documentation

CTreeCtrl CExplorerBar::m_wndFavorites [protected]

Definition at line 27 of file ExplorerBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/ExplorerBar.h
  • vc2008fp/IEDemo/ExplorerBar.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CExplorerDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CExplorerDoc Class Reference

#include "ExplorerDoc.h"

List of all members.

Public Member Functions

virtual | ~CExplorerDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CExplorerDoc ()
afx_msg void | OnCommandHistory ()
afx_msg void | OnGoBack ()
afx_msg void | OnGoForward ()

Detailed Description

Definition at line 13 of file ExplorerDoc.h.

Constructor & Destructor Documentation

CExplorerDoc::CExplorerDoc ( ) [protected]

Definition at line 36 of file ExplorerDoc.cpp.

{
  // TODO: add one-time construction code here

}

CExplorerDoc::~CExplorerDoc ( ) [virtual]

Definition at line 42 of file ExplorerDoc.cpp.

{
}

Member Function Documentation

void CExplorerDoc::OnCommandHistory ( ) [protected]

Definition at line 92 of file ExplorerDoc.cpp.

{
  // TODO: Add your command handler code here

}

void CExplorerDoc::OnGoBack ( ) [protected]

Definition at line 98 of file ExplorerDoc.cpp.

{
  // TODO: Add your command handler code here

}

void CExplorerDoc::OnGoForward ( ) [protected]

Definition at line 104 of file ExplorerDoc.cpp.

{
  // TODO: Add your command handler code here

}

BOOL CExplorerDoc::OnNewDocument ( ) [virtual]

Definition at line 46 of file ExplorerDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CExplorerDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 62 of file ExplorerDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/Explorer/ExplorerDoc.h
  • vc2008fp/Explorer/ExplorerDoc.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CExplorerView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CExplorerView Class Reference

#include "ExplorerView.h"

List of all members.

Public Member Functions

virtual | ~CExplorerView ()
CExplorerDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

CMFCShellListCtrl | m_wndList

Protected Member Functions

CExplorerView ()
virtual void | OnActivateView (BOOL bActivate, CView *pActivateView, CView *pDeactiveView)
afx_msg LRESULT | OnChangeFolder (WPARAM, LPARAM)
afx_msg void | OnCopyTo ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFolderUp ()
virtual void | OnInitialUpdate ()
afx_msg void | OnMoveTo ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnUpdateFolderUp (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewDetails (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewLargeicon (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewList (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewSmallicon (CCmdUI *pCmdUI)
afx_msg void | OnViewDetails ()
afx_msg void | OnViewLargeicon ()
afx_msg void | OnViewList ()
afx_msg void | OnViewRefresh ()
afx_msg void | OnViewSmallicon ()

Detailed Description

Definition at line 13 of file ExplorerView.h.

Constructor & Destructor Documentation

CExplorerView::CExplorerView ( ) [protected]

Definition at line 53 of file ExplorerView.cpp.

{
}

CExplorerView::~CExplorerView ( ) [virtual]

Definition at line 57 of file ExplorerView.cpp.

{
}

Member Function Documentation

CExplorerDoc * CExplorerView::GetDocument ( ) [inline]

Definition at line 67 of file ExplorerView.h.

   { return (CExplorerDoc*)m_pDocument; }

void CExplorerView::OnActivateView | ( | BOOL | bActivate,
 |  | CView * | pActivateView,
 |  | CView * | pDeactiveView |
 | ) |  |  | [protected, virtual]

Definition at line 123 of file ExplorerView.cpp.

{
  if (bActivate && AfxGetMainWnd () != NULL)
  {
    ((CMainFrame*) AfxGetMainWnd ())->GetFolders ().SetRelatedList (&m_wndList);
  }

  CView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}

LRESULT CExplorerView::OnChangeFolder | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]

Definition at line 184 of file ExplorerView.cpp.

{
  CString strPath;
  if (!m_wndList.GetCurrentFolder (strPath) &&
    !m_wndList.GetCurrentFolderName (strPath))
  {
    strPath = _T("????");
  }

  if (AfxGetMainWnd () != NULL)
  {
    ((CMainFrame*) AfxGetMainWnd ())->SetCurrFolder (strPath);
  }

  return 0;
}

void CExplorerView::OnCopyTo ( ) [protected]

Definition at line 212 of file ExplorerView.cpp.

{
  CString strPath;
  if (m_wndList.GetCurrentFolder (strPath) &&
    theApp.GetShellManager ()->BrowseForFolder (strPath,
      this, strPath, _T("Copy the selected item(s) to the folder:")))
  {
    MessageBox (CString (_T("The selected path is: ")) + strPath);
  }
}

int CExplorerView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 106 of file ExplorerView.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy (0, 0, 0, 0);
  m_wndList.Create (WS_CHILD | WS_VISIBLE | LVS_REPORT, rectDummy, this, 1);

  return 0;
}

void CExplorerView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 72 of file ExplorerView.cpp.

{
}

BOOL CExplorerView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 173 of file ExplorerView.cpp.

{
  return TRUE;
}

void CExplorerView::OnFolderUp ( ) [protected]

Definition at line 201 of file ExplorerView.cpp.

{
  m_wndList.DisplayParentFolder ();
  ((CMainFrame*) AfxGetMainWnd ())->GetFolders ().SetFocus();
}

void CExplorerView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 76 of file ExplorerView.cpp.

{
  CView::OnInitialUpdate();
  OnChangeFolder (0, 0);  // To update mainframe's address bar
}

void CExplorerView::OnMoveTo ( ) [protected]

Definition at line 223 of file ExplorerView.cpp.

{
  CString strPath;
  if (m_wndList.GetCurrentFolder (strPath) &&
    theApp.GetShellManager ()->BrowseForFolder (strPath,
      this, strPath, _T("Move the selected item(s) to the folder:")))
  {
    MessageBox (CString (_T("The selected path is: ")) + strPath);
  }
}

void CExplorerView::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 178 of file ExplorerView.cpp.

{
  CView::OnSetFocus(pOldWnd);
  m_wndList.SetFocus ();
}

void CExplorerView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 117 of file ExplorerView.cpp.

{
  CView::OnSize(nType, cx, cy);
  m_wndList.SetWindowPos (NULL, -1, -1, cx, cy, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
}

void CExplorerView::OnUpdateFolderUp ( CCmdUI * pCmdUI ) [protected]

Definition at line 207 of file ExplorerView.cpp.

{
  pCmdUI->Enable (!m_wndList.IsDesktop ());
}

void CExplorerView::OnUpdateViewDetails ( CCmdUI * pCmdUI ) [protected]

Definition at line 148 of file ExplorerView.cpp.

{
  pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_REPORT);
}

void CExplorerView::OnUpdateViewLargeicon ( CCmdUI * pCmdUI ) [protected]

Definition at line 138 of file ExplorerView.cpp.

{
  pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_ICON);
}

void CExplorerView::OnUpdateViewList ( CCmdUI * pCmdUI ) [protected]

Definition at line 158 of file ExplorerView.cpp.

{
  pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_LIST);
}

void CExplorerView::OnUpdateViewSmallicon ( CCmdUI * pCmdUI ) [protected]

Definition at line 168 of file ExplorerView.cpp.

{
  pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_SMALLICON);
}

void CExplorerView::OnViewDetails ( ) [protected]

Definition at line 143 of file ExplorerView.cpp.

{
  m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_REPORT);
}

void CExplorerView::OnViewLargeicon ( ) [protected]

Definition at line 133 of file ExplorerView.cpp.

{
  m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_ICON);
}

void CExplorerView::OnViewList ( ) [protected]

Definition at line 153 of file ExplorerView.cpp.

{
  m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_LIST);
}

void CExplorerView::OnViewRefresh ( ) [protected]

Definition at line 234 of file ExplorerView.cpp.

{
  m_wndList.Refresh ();
}

void CExplorerView::OnViewSmallicon ( ) [protected]

Definition at line 163 of file ExplorerView.cpp.

{
  m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_SMALLICON);
}

BOOL CExplorerView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 61 of file ExplorerView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs
  cs.style &= ~WS_BORDER;
  return CView::PreCreateWindow(cs);
}

Member Data Documentation

CMFCShellListCtrl CExplorerView::m_wndList

Definition at line 22 of file ExplorerView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/Explorer/ExplorerView.h
  • vc2008fp/Explorer/ExplorerView.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CExtendedControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

CExtendedControl Class Reference

#include "ExtCtl.H"

List of all members.

Public Member Functions

CExtendedControl ()
~CExtendedControl ()
STDMETHOD() | get_Name (BSTR *pbstrName)
STDMETHOD() | get_PositionX (long *px)
STDMETHOD() | get_PositionY (long *py)
STDMETHOD() | get_SizeX (long *px)
STDMETHOD() | get_SizeY (long *py)
STDMETHOD() | GetIDsOfNames (REFIID iid, LPOLESTR *ppszNames, UINT nNames, LCID lcid, DISPID *pDispIDs)
STDMETHOD() | GetTypeInfo (UINT iTypeInfo, LCID lcid, ITypeInfo **ppTypeInfo)
STDMETHOD() | GetTypeInfoCount (UINT *pnInfoCount)
HRESULT | Init (REFCLSID clsidControl, CTestContainer98Item *pItem)
STDMETHOD() | Invoke (DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError)
STDMETHOD() | put_Name (BSTR bstrName)
STDMETHOD() | put_PositionX (long x)
STDMETHOD() | put_PositionY (long y)
STDMETHOD() | put_SizeX (long x)
STDMETHOD() | put_SizeY (long y)
STDMETHOD() | QueryInterface (REFIID iid, void **ppInterface)
STDMETHOD() | raw_Activate ()
STDMETHOD() | raw_Deactivate ()
STDMETHOD() | raw_UIActivate ()
STDMETHOD() | raw_UIDeactivate ()
STDMETHOD_ (ULONG, Release)()
STDMETHOD_ (ULONG, AddRef)()

Static Public Member Functions

static HRESULT | CreateInstance (REFCLSID clsidControl, CTestContainer98Item *pItem, IUnknown *pOuterUnknown, REFIID iid, void **ppInterface)

Protected Member Functions

HRESULT | InternalInvoke (DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError)

Protected Attributes

_bstr_t | m_bstrName
ULONG | m_nRefCount
IUnknown * | m_pControl
IDispatchPtr | m_pInnerDispatch
CTestContainer98Item * m_pItem
CPoint | m_ptPosition
ITypeInfoPtr | m_pTypeInfo
CTestContainer98View * m_pView
CSize | m_size
VARIANT_BOOL | m_tVisible

Detailed Description

Definition at line 23 of file ExtCtl.H.

Constructor & Destructor Documentation

CExtendedControl::CExtendedControl ( )

Definition at line 23 of file ExtCtl.Cpp.

                                   :
   m_nRefCount( 0 ),
   m_pControl( NULL ),
   m_tVisible( TRUE )
{
}

CExtendedControl::~CExtendedControl ( )

Definition at line 30 of file ExtCtl.Cpp.

{
   if( m_pInnerDispatch != NULL )
   {
    AddRef();  // Undo the artificial Release
    m_pInnerDispatch.Release();
   }

   if( m_pControl != NULL )
   {
    m_pControl->Release();
    m_pControl = NULL;
   }
}

Member Function Documentation

HRESULT CExtendedControl::CreateInstance | ( | REFCLSID | clsidControl,
 |  | CTestContainer98Item * | pItem,
 |  | IUnknown * | pOuterUnknown,
 |  | REFIID | iid,
 |  | void ** | ppInterface |
 | ) |  |  | [static]

Definition at line 97 of file ExtCtl.Cpp.

{
   CExtendedControl* pObject;
   HRESULT hResult;

   (void)pOuterUnknown;

   ENSURE( pOuterUnknown == NULL );
   ENSURE( ppInterface != NULL );
   *ppInterface = NULL;

#pragma warning(push)
#pragma warning(disable: 6014)
   /* prefast noise VSW 489981 */
   pObject = new CExtendedControl;

   pObject->m_nRefCount++;  // Protect ourselves while we create the aggregate

   hResult = pObject->Init( clsidControl, pItem );
   if( FAILED( hResult ) )
   {
    delete pObject;
    return( hResult );
   }

   hResult = pObject->QueryInterface( iid, ppInterface );
   if( FAILED( hResult ) )
   {
    delete pObject;
    return( hResult );
   }

   pObject->m_nRefCount--;  // Undo the extra refcount we added to protect ourself
   ASSERT( pObject->m_nRefCount > 0 );

   return( S_OK );
#pragma warning(pop)
}

STDMETHODIMP CExtendedControl::get_Name ( BSTR * pbstrName )

Definition at line 260 of file ExtCtl.Cpp.

{
   ENSURE( pbstrName != NULL );

   *pbstrName = m_bstrName.copy();
   if( *pbstrName == NULL )
   {
    return( E_OUTOFMEMORY );
   }

   return( S_OK );
}

STDMETHODIMP CExtendedControl::get_PositionX ( long * px )

Definition at line 280 of file ExtCtl.Cpp.

{
   if( px == NULL )
   {
    return( E_POINTER );
   }

   *px = m_ptPosition.x;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::get_PositionY ( long * py )

Definition at line 299 of file ExtCtl.Cpp.

{
   if( py == NULL )
   {
    return( E_POINTER );
   }

   *py = m_ptPosition.y;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::get_SizeX ( long * px )

Definition at line 318 of file ExtCtl.Cpp.

{
   if( px == NULL )
   {
    return( E_POINTER );
   }

   *px = m_size.cx;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::get_SizeY ( long * py )

Definition at line 337 of file ExtCtl.Cpp.

{
   if( py == NULL )
   {
    return( E_POINTER );
   }

   *py = m_size.cy;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::GetIDsOfNames | ( | REFIID | iid,
 |  | LPOLESTR * | ppszNames,
 |  | UINT | nNames,
 |  | LCID | lcid,
 |  | DISPID * | pDispIDs
 | ) |  |

Definition at line 197 of file ExtCtl.Cpp.

{
   HRESULT hResult;

   hResult = m_pTypeInfo->GetIDsOfNames( ppszNames, nNames, pDispIDs );
   if( FAILED( hResult ) )
   {
    hResult = m_pInnerDispatch->GetIDsOfNames( iid, ppszNames, nNames, lcid,
     pDispIDs );
   }

   return( hResult );
}

STDMETHODIMP CExtendedControl::GetTypeInfo | ( | UINT | iTypeInfo,
 |  | LCID | lcid,
 |  | ITypeInfo ** | ppTypeInfo
 | ) |  |

Definition at line 212 of file ExtCtl.Cpp.

{
   return( m_pInnerDispatch->GetTypeInfo( iTypeInfo, lcid, ppTypeInfo ) );
}

STDMETHODIMP CExtendedControl::GetTypeInfoCount ( UINT * pnInfoCount )

Definition at line 218 of file ExtCtl.Cpp.

{
   return( m_pInnerDispatch->GetTypeInfoCount( pnInfoCount ) );
}

HRESULT CExtendedControl::Init | ( | REFCLSID | clsidControl,
 |  | CTestContainer98Item * | pItem
 | ) |  |

Definition at line 45 of file ExtCtl.Cpp.

{
   HRESULT hResult;
   ITypeLibPtr pTypeLib;
   LPOLESTR pszModuleO;
   TCHAR szModule[MAX_PATH];
   CString strTLBPath;

   ASSERT( m_pItem != NULL );
   ASSERT( m_pControl == NULL );

   hResult = CoCreateInstance( clsidControl, (IUnknown*)this,
    CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, IID_IUnknown, (void**)&m_pControl );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   m_pInnerDispatch = m_pControl;
   if( m_pInnerDispatch == NULL )
   {
    return( E_NOINTERFACE );
   }
   Release();  // Artificially release because we QI'd the aggregate.

   GetModuleFileName( NULL, szModule, MAX_PATH );
   strTLBPath = szModule;
   strTLBPath += _T( "\\2" );  // Load the second TLB from the executable

   pszModuleO = strTLBPath.AllocSysString();
   hResult = LoadTypeLib( pszModuleO, &pTypeLib );
   if( FAILED( hResult ) )
   {
    TCTrace( TRACELEVEL_NORMAL,
     "Failed to load typelib for extended control\n" );
    return( hResult );
   }

   hResult = pTypeLib->GetTypeInfoOfGuid( __uuidof( ITCExtendedControl ),
    &m_pTypeInfo );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   m_pItem = pItem;
   m_pView = m_pItem->GetDocument()->GetView();

   return( S_OK );
}

HRESULT CExtendedControl::InternalInvoke | ( | DISPID | dispidMember,
 |  | REFIID | iid,
 |  | LCID | lcid,
 |  | WORD | wFlags,
 |  | DISPPARAMS * | pdpParams,
 |  | VARIANT * | pvarResult,
 |  | EXCEPINFO * | pExceptionInfo,
 |  | UINT * | piArgError |
 | ) |  |  | [protected]

Definition at line 223 of file ExtCtl.Cpp.

{
   (void)iid;
   (void)lcid;

   return( m_pTypeInfo->Invoke( this, dispidMember, wFlags, pdpParams,
    pvarResult, pExceptionInfo, piArgError ) );
}

STDMETHODIMP CExtendedControl::Invoke | ( | DISPID | dispidMember,
 |  | REFIID | iid,
 |  | LCID | lcid,
 |  | WORD | wFlags,
 |  | DISPPARAMS * | pdpParams,
 |  | VARIANT * | pvarResult,
 |  | EXCEPINFO * | pExceptionInfo,
 |  | UINT * | piArgError
 | ) |  |

Definition at line 234 of file ExtCtl.Cpp.

{
   HRESULT hResult;

   if( pdpParams == NULL )
   {
    return( E_INVALIDARG );
   }

   hResult = DISP_E_MEMBERNOTFOUND;
   if( iid == IID_NULL )
   {
    hResult = InternalInvoke( dispidMember, iid, lcid, wFlags, pdpParams,
     pvarResult, pExceptionInfo, piArgError );
   }
   if( hResult == DISP_E_MEMBERNOTFOUND )
   {
    hResult = m_pInnerDispatch->Invoke( dispidMember, iid, lcid, wFlags,
     pdpParams, pvarResult, pExceptionInfo, piArgError );
   }

   return( hResult );
}

STDMETHODIMP CExtendedControl::put_Name ( BSTR bstrName )

Definition at line 273 of file ExtCtl.Cpp.

{
   m_bstrName = bstrName;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::put_PositionX ( long x )

Definition at line 292 of file ExtCtl.Cpp.

{
   m_ptPosition.x = x;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::put_PositionY ( long y )

Definition at line 311 of file ExtCtl.Cpp.

{
   m_ptPosition.y = y;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::put_SizeX ( long x )

Definition at line 330 of file ExtCtl.Cpp.

{
   m_size.cx = x;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::put_SizeY ( long y )

Definition at line 349 of file ExtCtl.Cpp.

{
   m_size.cy = y;

   return( S_OK );
}

STDMETHODIMP CExtendedControl::QueryInterface | ( | REFIID | iid,
 |  | void ** | ppInterface
 | ) |  |

Definition at line 158 of file ExtCtl.Cpp.

{
   HRESULT hResult;

   ENSURE( ppInterface != NULL );
   *ppInterface = NULL;

   if( iid == IID_IUnknown || iid == IID_IDispatch )
   {
    *ppInterface = (IDispatch*)this;
    AddRef();
   }
   else if( iid == __uuidof( ITCExtendedControl ) )
   {
    *ppInterface = (ITCExtendedControl*)this;
    AddRef();
   }
   else
   {
    ASSERT( m_pControl != NULL );
    if (m_pControl == NULL)
    {
     hResult = E_UNEXPECTED;
    }
    else
    {
     hResult = m_pControl->QueryInterface( iid, ppInterface );
    }

    if( FAILED( hResult ) )
    {
     return( hResult );
    }
   }

   return( S_OK );
}

STDMETHODIMP CExtendedControl::raw_Activate ( )

Definition at line 356 of file ExtCtl.Cpp.

{
   if( !m_pItem->IsInPlaceActive() )
   {
    m_pItem->Activate( OLEIVERB_SHOW, m_pView );
   }

   return( S_OK );
}

STDMETHODIMP CExtendedControl::raw_Deactivate ( )

Definition at line 366 of file ExtCtl.Cpp.

{
   if( m_pItem->IsInPlaceActive() )
   {
    m_pItem->Deactivate();
   }

   return( S_OK );
}

STDMETHODIMP CExtendedControl::raw_UIActivate ( )

Definition at line 376 of file ExtCtl.Cpp.

{
   if( !m_pItem->IsUIActive() )
   {
    m_pItem->DoVerb( OLEIVERB_UIACTIVATE, m_pView );
   }

   return( S_OK );
}

STDMETHODIMP CExtendedControl::raw_UIDeactivate ( )

Definition at line 386 of file ExtCtl.Cpp.

{
   if( m_pItem->IsUIActive() )
   {
    m_pItem->DeactivateUI();
   }

   return( S_OK );
}

CExtendedControl::STDMETHOD_ | ( | ULONG | ,
 |  | AddRef |
 | ) |  |
CExtendedControl::STDMETHOD_ | ( | ULONG | ,
 |  | Release |
 | ) |  |

Member Data Documentation

_bstr_t CExtendedControl::m_bstrName [protected]

Definition at line 80 of file ExtCtl.H.

ULONG CExtendedControl::m_nRefCount [protected]

Definition at line 73 of file ExtCtl.H.

IUnknown* CExtendedControl::m_pControl [protected]

Definition at line 74 of file ExtCtl.H.

IDispatchPtr CExtendedControl::m_pInnerDispatch [protected]

Definition at line 75 of file ExtCtl.H.

CTestContainer98Item* CExtendedControl::m_pItem [protected]

Definition at line 77 of file ExtCtl.H.

CPoint CExtendedControl::m_ptPosition [protected]

Definition at line 81 of file ExtCtl.H.

ITypeInfoPtr CExtendedControl::m_pTypeInfo [protected]

Definition at line 76 of file ExtCtl.H.

CTestContainer98View* CExtendedControl::m_pView [protected]

Definition at line 78 of file ExtCtl.H.

CSize CExtendedControl::m_size [protected]

Definition at line 82 of file ExtCtl.H.

VARIANT_BOOL CExtendedControl::m_tVisible [protected]

Definition at line 79 of file ExtCtl.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/ExtCtl.H
  • ole/TstCon/ExtCtl.Cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFavorit Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

CFavorit Class Reference

#include "FavoritesManager.h"

List of all members.

Public Member Functions

CFavorit (LPCTSTR lpszName, int iIcon, LPCTSTR lpszURL, UINT uiCommand=0)
virtual | ~CFavorit ()
const CFavorit * | FindByID (UINT uiCommandID) const
UINT | GetCommand () const
int | GetIcon () const
const CString & | GetName () const
const CObList & | GetSubItems () const
const CString & | GetURL () const

Protected Member Functions

CFavorit ()
BOOL | Build (CString strPath)
void | CleanUp ()
BOOL | CreateMenu (CMenu &menu)
void | FillTree (CTreeCtrl &wndTree, HTREEITEM htreeItemParent)

Protected Attributes

int | m_iIcon
CObList | m_lstSubItems
CString | m_strName
CString | m_strURL
UINT m_uiCommand

Static Protected Attributes

static CMap< UINT, UINT, int, int > | m_IDIcons
static int | m_iFolderIcon = -1
static int | m_iInternetShortcutIcon = -1
static UINT | m_uiNextCommand = FIRST_FAVORITE_COMMAND
static CMap< CString, LPCTSTR,
int, int > 		m_URLIcons

Friends

class | CFavoritesManager

Detailed Description

Definition at line 16 of file FavoritesManager.h.

Constructor & Destructor Documentation

CFavorit::CFavorit | ( | LPCTSTR | lpszName,
 |  | int | iIcon,
 |  | LPCTSTR | lpszURL,
 |  | UINT | uiCommand = 0
 | ) |  |

Definition at line 28 of file FavoritesManager.cpp.

{
  m_strName = lpszName;
  m_iIcon = iIcon;

  if (lpszURL != NULL)
  {
    m_strURL = lpszURL;
  }

  m_uiCommand = uiCommand;

  if (uiCommand != 0)
  {
    m_IDIcons.SetAt (uiCommand, iIcon);
  }
}

CFavorit::~CFavorit ( ) [virtual]

Definition at line 52 of file FavoritesManager.cpp.

{
  CleanUp ();
}

CFavorit::CFavorit ( ) [protected]

Definition at line 46 of file FavoritesManager.cpp.

{
  m_uiCommand = 0;
  m_iIcon = -1;
}

Member Function Documentation

BOOL CFavorit::Build ( CString strPath ) [protected]

Definition at line 90 of file FavoritesManager.cpp.

{
  // make sure there's a trailing backslash
  if (strPath.GetLength () == 0 ||
    strPath [strPath.GetLength () - 1] != _T('\\'))
  {
    strPath += _T('\\');
  }

  // Prepare file mask:
  CString strFileMask = strPath;
  strFileMask += _T("*.*");

  // Start find all files in specific directory:
  WIN32_FIND_DATA fd;
  HANDLE hFile = FindFirstFile (strFileMask, &fd);
  if (hFile == INVALID_HANDLE_VALUE)
  {
    return FALSE;
  }

  do
  {
    CString strName = fd.cFileName;
    if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
    {
      if (strName != _T(".") && strName != _T(".."))
      {
        CFavorit* pSubFavorit = new CFavorit (strName, m_iFolderIcon, NULL);
        ASSERT_VALID (pSubFavorit);

        pSubFavorit->Build (strPath + strName);

        // Add to end of folders:
        BOOL bAdded = FALSE;
        for (POSITION pos = m_lstSubItems.GetTailPosition (); pos != NULL;)
        {
          POSITION posSave = pos;

          CFavorit* pListFavorit = (CFavorit*) m_lstSubItems.GetPrev (pos);
          ASSERT_VALID (pListFavorit);

          if (pListFavorit->m_uiCommand == 0)
          {
            m_lstSubItems.InsertAfter (posSave, pSubFavorit);
            bAdded = TRUE;
            break;
          }
        }

        if (!bAdded)
        {
          m_lstSubItems.AddTail (pSubFavorit);
        }
      }
    }
    else if (strName.Right (4).CompareNoCase (_T(".url")) == 0)
    {
      CString strFilePath = strPath + strName;

      // an .URL file is formatted just like an .INI file, so we can
      // use GetPrivateProfileString() to get the information we want
      TCHAR szURL [INTERNET_MAX_PATH_LENGTH + 1];
      ::GetPrivateProfileString (_T("InternetShortcut"), _T("URL"),
            _T(""), szURL, INTERNET_MAX_PATH_LENGTH,
            strFilePath);

      // Obtain URL icon:
      TCHAR ext[_MAX_EXT];
      _tsplitpath_s (szURL, NULL, 0, NULL, 0, NULL, 0, ext, _MAX_EXT);

      int iIcon = 0;
      if (!m_URLIcons.Lookup (ext, iIcon))
      {
        // Retrieve icon file
        SHFILEINFO sfi;
        if (::SHGetFileInfo (strFilePath, 0, &sfi, sizeof(SHFILEINFO),
          SHGFI_SMALLICON | SHGFI_SYSICONINDEX) &&
          sfi.iIcon >= 0)
        {
          m_URLIcons.SetAt (ext, sfi.iIcon);
          iIcon = sfi.iIcon;

          if (m_iInternetShortcutIcon == -1)
          {
            m_iInternetShortcutIcon = sfi.iIcon;
          }
        }
      }

      strName = strName.Left (strName.GetLength () - 4);

      m_lstSubItems.AddTail (new CFavorit (
        strName, iIcon, szURL, m_uiNextCommand ++));
    }
  }
  while (FindNextFile (hFile, &fd));
  FindClose (hFile);

  return TRUE;
}

void CFavorit::CleanUp ( ) [protected]

Definition at line 57 of file FavoritesManager.cpp.

{
  m_uiCommand = 0;
  m_iIcon = -1;

  while (!m_lstSubItems.IsEmpty ())
  {
    delete m_lstSubItems.RemoveHead ();
  }
}

BOOL CFavorit::CreateMenu ( CMenu & menu ) [protected]

Definition at line 192 of file FavoritesManager.cpp.

{
  ASSERT (menu.GetSafeHmenu () == NULL);
  ASSERT (m_uiCommand == 0);

  if (!menu.CreatePopupMenu ())
  {
    ASSERT (FALSE);
    return FALSE;
  }

  for (POSITION pos = m_lstSubItems.GetHeadPosition (); pos != NULL;)
  {
    CFavorit* pFavorit = (CFavorit*) m_lstSubItems.GetNext (pos);
    ASSERT_VALID (pFavorit);

    if (pFavorit->m_uiCommand != 0)
    {
      menu.InsertMenu ((UINT)-1, MF_BYPOSITION | MF_STRING, pFavorit->m_uiCommand,
        pFavorit->m_strName);
    }
    else
    {
      CMenu subMenu;
      if (pFavorit->CreateMenu (subMenu))
      {
        menu.InsertMenu ((UINT) -1, MF_BYPOSITION | MF_POPUP | MF_STRING,
          (UINT_PTR) subMenu.Detach (), pFavorit->m_strName);
      }
    }
  }

  return TRUE;
}

void CFavorit::FillTree | ( | CTreeCtrl & | wndTree,
 |  | HTREEITEM | htreeItemParent |
 | ) |  |  | [protected]

Definition at line 227 of file FavoritesManager.cpp.

{
  for (POSITION pos = m_lstSubItems.GetHeadPosition (); pos != NULL;)
  {
    CFavorit* pFavorit = (CFavorit*) m_lstSubItems.GetNext (pos);
    ASSERT_VALID (pFavorit);

    HTREEITEM hTreeItem = wndTree.InsertItem (pFavorit->m_strName,
      pFavorit->m_iIcon, pFavorit->m_iIcon, htreeItemParent);
    wndTree.SetItemData (hTreeItem, (DWORD_PTR) pFavorit);

    pFavorit->FillTree (wndTree, hTreeItem);
  }
}

const CFavorit * CFavorit::FindByID ( UINT uiCommandID ) const

Definition at line 68 of file FavoritesManager.cpp.

{
  if (m_uiCommand == uiCommandID)
  {
    return this;
  }

  for (POSITION pos = m_lstSubItems.GetHeadPosition (); pos != NULL;)
  {
    CFavorit* pFavorit = (CFavorit*) m_lstSubItems.GetNext (pos);
    ASSERT_VALID (pFavorit);

    const CFavorit* pFavoritFound = pFavorit->FindByID (uiCommandID);
    if (pFavoritFound != NULL)
    {
      return pFavoritFound;
    }
  }

  return NULL;
}

UINT CFavorit::GetCommand ( ) const [inline]

Definition at line 55 of file FavoritesManager.h.

  {
    return m_uiCommand;
  }

int CFavorit::GetIcon ( ) const [inline]

Definition at line 50 of file FavoritesManager.h.

  {
    return m_iIcon;
  }

const CString& CFavorit::GetName ( ) const [inline]

Definition at line 40 of file FavoritesManager.h.

  {
    return m_strName;
  }

const CObList& CFavorit::GetSubItems ( ) const [inline]

Definition at line 60 of file FavoritesManager.h.

  {
    return m_lstSubItems;
  }

const CString& CFavorit::GetURL ( ) const [inline]

Definition at line 45 of file FavoritesManager.h.

  {
    return m_strURL;
  }

Friends And Related Function Documentation

friend class CFavoritesManager [friend]

Definition at line 18 of file FavoritesManager.h.

Member Data Documentation

CMap< UINT, UINT, int, int > CFavorit::m_IDIcons [static, protected]

Definition at line 74 of file FavoritesManager.h.

int CFavorit::m_iFolderIcon = -1 [static, protected]

Definition at line 76 of file FavoritesManager.h.

int CFavorit::m_iIcon [protected]

Definition at line 69 of file FavoritesManager.h.

int CFavorit::m_iInternetShortcutIcon = -1 [static, protected]

Definition at line 77 of file FavoritesManager.h.

CObList CFavorit::m_lstSubItems [protected]

Definition at line 71 of file FavoritesManager.h.

CString CFavorit::m_strName [protected]

Definition at line 66 of file FavoritesManager.h.

CString CFavorit::m_strURL [protected]

Definition at line 67 of file FavoritesManager.h.

UINT CFavorit::m_uiCommand [protected]

Definition at line 68 of file FavoritesManager.h.

UINT CFavorit::m_uiNextCommand = FIRST_FAVORITE_COMMAND [static, protected]

Definition at line 75 of file FavoritesManager.h.

CMap< CString, LPCTSTR, int, int > CFavorit::m_URLIcons [static, protected]

Definition at line 73 of file FavoritesManager.h.

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/FavoritesManager.h
  • vc2008fp/IEDemo/FavoritesManager.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFavoritesManager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CFavoritesManager Class Reference

#include "FavoritesManager.h"

List of all members.

Public Member Functions

CFavoritesManager ()
virtual | ~CFavoritesManager ()
BOOL | CreateMenu (CMenu &menu)
void | FillTree (CTreeCtrl &wndTree)
int | GetFolderIcon () const
int | GetIDIcon (UINT uiCommandID) const
int | GetInternetShortcutIcon () const
HIMAGELIST | GetSysImages () const
CSize | GetSysImageSize () const
CString | GetURLofID (UINT uiCommandID) const
BOOL | Load ()

Protected Attributes

HIMAGELIST | m_himSystem
CFavorit m_Root
CSize | m_SysImageSize

Detailed Description

Definition at line 81 of file FavoritesManager.h.

Constructor & Destructor Documentation

CFavoritesManager::CFavoritesManager ( )

Definition at line 246 of file FavoritesManager.cpp.

{
  m_himSystem = NULL;
  m_SysImageSize = CSize (0, 0);
}

CFavoritesManager::~CFavoritesManager ( ) [virtual]

Definition at line 252 of file FavoritesManager.cpp.

{
}

Member Function Documentation

BOOL CFavoritesManager::CreateMenu ( CMenu & menu )

Definition at line 299 of file FavoritesManager.cpp.

{
  return m_Root.CreateMenu (menu);
}

void CFavoritesManager::FillTree ( CTreeCtrl & wndTree )

Definition at line 304 of file FavoritesManager.cpp.

{
  ASSERT (wndTree.GetSafeHwnd () != NULL);

  wndTree.DeleteAllItems ();
  wndTree.SetImageList (CImageList::FromHandle (m_himSystem), TVSIL_NORMAL);
  m_Root.FillTree (wndTree, NULL);
}

int CFavoritesManager::GetFolderIcon ( ) const [inline]

Definition at line 106 of file FavoritesManager.h.

  {
    return CFavorit::m_iFolderIcon;
  }

int CFavoritesManager::GetIDIcon ( UINT uiCommandID ) const

Definition at line 313 of file FavoritesManager.cpp.

{
  int iIcon = -1;
  CFavorit::m_IDIcons.Lookup (uiCommandID, iIcon);

  return iIcon;
}

int CFavoritesManager::GetInternetShortcutIcon ( ) const [inline]

Definition at line 111 of file FavoritesManager.h.

  {
    return CFavorit::m_iInternetShortcutIcon;
  }

HIMAGELIST CFavoritesManager::GetSysImages ( ) const [inline]

Definition at line 96 of file FavoritesManager.h.

  {
    return m_himSystem;
  }

CSize CFavoritesManager::GetSysImageSize ( ) const [inline]

Definition at line 101 of file FavoritesManager.h.

  {
    return m_SysImageSize;
  }

CString CFavoritesManager::GetURLofID ( UINT uiCommandID ) const

Definition at line 321 of file FavoritesManager.cpp.

{
  if (uiCommandID == 0)
  {
    ASSERT (FALSE);
    return _T("");
  }

  const CFavorit* pFavorit = m_Root.FindByID (uiCommandID);
  if (pFavorit == NULL)
  {
    ASSERT (FALSE);
    return _T("");
  }

  return pFavorit->m_strURL;
}

BOOL CFavoritesManager::Load ( )

Definition at line 256 of file FavoritesManager.cpp.

{
  HKEY  hKey;

  // find out from the registry where the favorites are located.
  if(RegOpenKey (HKEY_CURRENT_USER,
    _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"),
    &hKey) != ERROR_SUCCESS)
  {
    TRACE0("Favorites folder not found\n");
    return FALSE;
  }

  TCHAR sz [MAX_PATH];
  DWORD dwSize = sizeof(sz);

  RegQueryValueEx(hKey, _T("Favorites"), NULL, NULL, (LPBYTE)sz, &dwSize);

  TCHAR szPath [MAX_PATH];
  ExpandEnvironmentStrings(sz, szPath, MAX_PATH);

  RegCloseKey(hKey);

  SHFILEINFO sfi;
  m_himSystem = (HIMAGELIST)SHGetFileInfo( szPath,
                                       0,
                                       &sfi,
                                       sizeof(SHFILEINFO),
                                       SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
  if (m_himSystem != NULL)
  {
    int cx, cy;

    ::ImageList_GetIconSize (m_himSystem, &cx, &cy);
    m_SysImageSize = CSize (cx, cy);

    CFavorit::m_iFolderIcon = sfi.iIcon;
  }

  m_Root.Build (szPath);
  return TRUE;
}

Member Data Documentation

HIMAGELIST CFavoritesManager::m_himSystem [protected]

Definition at line 123 of file FavoritesManager.h.

CFavorit CFavoritesManager::m_Root [protected]

Definition at line 121 of file FavoritesManager.h.

CSize CFavoritesManager::m_SysImageSize [protected]

Definition at line 124 of file FavoritesManager.h.

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/FavoritesManager.h
  • vc2008fp/IEDemo/FavoritesManager.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFeaturesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CFeaturesPage Class Reference

#include "FeatPg.H"

List of all members.

Public Types

enum | { IDD = IDD_CONTAINEROPTIONS_FEATURES }

Public Member Functions

CFeaturesPage ()
~CFeaturesPage ()

Public Attributes

BOOL | m_tAllowWindowless
BOOL | m_tHonorIgnoreActivateWhenVisible
BOOL | m_tTwoPassDrawing
BOOL | m_tUseIPointerInactive
BOOL | m_tUseQuickActivation

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)

Detailed Description

Definition at line 22 of file FeatPg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 33 of file FeatPg.H.

{ IDD = IDD_CONTAINEROPTIONS_FEATURES };

Constructor & Destructor Documentation

CFeaturesPage::CFeaturesPage ( )

Definition at line 25 of file FeatPg.Cpp.

                             : CPropertyPage(CFeaturesPage::IDD)
{
   m_psp.dwFlags &= ~PSP_HASHELP;

  //{{AFX_DATA_INIT(CFeaturesPage)
  m_tAllowWindowless = FALSE;
  m_tTwoPassDrawing = FALSE;
  m_tHonorIgnoreActivateWhenVisible = FALSE;
  m_tUseIPointerInactive = FALSE;
  m_tUseQuickActivation = FALSE;
  //}}AFX_DATA_INIT
}

CFeaturesPage::~CFeaturesPage ( )

Definition at line 38 of file FeatPg.Cpp.

{
}

Member Function Documentation

void CFeaturesPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 42 of file FeatPg.Cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CFeaturesPage)
  DDX_Check(pDX, IDC_ALLOWWINDOWLESS, m_tAllowWindowless);
  DDX_Check(pDX, IDC_TWOPASSDRAWING, m_tTwoPassDrawing);
  DDX_Check(pDX, IDC_IGNOREACTIVATEWHENVISIBLE, m_tHonorIgnoreActivateWhenVisible);
  DDX_Check(pDX, IDC_USEIPOINTERINACTIVE, m_tUseIPointerInactive);
  DDX_Check(pDX, IDC_USEQUICKACTIVATION, m_tUseQuickActivation);
  //}}AFX_DATA_MAP
}

void CFeaturesPage::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 83 of file FeatPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CFeaturesPage::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 75 of file FeatPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

Member Data Documentation

BOOL CFeaturesPage::m_tAllowWindowless

Definition at line 34 of file FeatPg.H.

BOOL CFeaturesPage::m_tHonorIgnoreActivateWhenVisible

Definition at line 36 of file FeatPg.H.

BOOL CFeaturesPage::m_tTwoPassDrawing

Definition at line 35 of file FeatPg.H.

BOOL CFeaturesPage::m_tUseIPointerInactive

Definition at line 37 of file FeatPg.H.

BOOL CFeaturesPage::m_tUseQuickActivation

Definition at line 38 of file FeatPg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/FeatPg.H
  • ole/TstCon/FeatPg.Cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFigCommand Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CFigCommand Class Reference

#include "spiroDoc.h"

List of all members.

Public Member Functions

CFigCommand ()
virtual void | Serialize (CArchive &ar)

Public Attributes

union {
COLORREF m_co
int m_nPenWidth
};
double | m_dAnchorData
double | m_dWheelData
CPoint | m_point
CPoint | m_ptWheelPos
TRACE_COMMAND m_type

Detailed Description

Definition at line 32 of file spiroDoc.h.

Constructor & Destructor Documentation

CFigCommand::CFigCommand ( ) [inline]

Definition at line 50 of file spiroDoc.h.

                : m_point(0, 0) , m_ptWheelPos(0, 0)
  {
    m_type = EMPTY_COMMAND;
    m_dWheelData = 0.0;
    m_dAnchorData = 0.0;
  }

Member Function Documentation

void CFigCommand::Serialize ( CArchive & ar ) [virtual]

Definition at line 26 of file spiroDoc.cpp.

{
  if (ar.IsStoring())
  {
    ar << m_type;
    ar << m_point.x;
    ar << m_point.y;
    ar << m_ptWheelPos.x;
    ar << m_ptWheelPos.y;
    ar << m_nPenWidth;
  }
  else
  {
    DWORD dw;

    ar >> dw; m_type = (TRACE_COMMAND)dw;
    ar >> m_point.x;
    ar >> m_point.y;
    ar >> m_ptWheelPos.x;
    ar >> m_ptWheelPos.y;
    ar >> m_nPenWidth;
  }
}

Member Data Documentation

union { ... }
COLORREF CFigCommand::m_co

Definition at line 40 of file spiroDoc.h.

double CFigCommand::m_dAnchorData

Definition at line 46 of file spiroDoc.h.

double CFigCommand::m_dWheelData

Definition at line 45 of file spiroDoc.h.

int CFigCommand::m_nPenWidth

Definition at line 39 of file spiroDoc.h.

CPoint CFigCommand::m_point

Definition at line 43 of file spiroDoc.h.

CPoint CFigCommand::m_ptWheelPos

Definition at line 44 of file spiroDoc.h.

TRACE_COMMAND CFigCommand::m_type

Definition at line 35 of file spiroDoc.h.

The documentation for this class was generated from the following files:
  • general/spiro/spiroDoc.h
  • general/spiro/spiroDoc.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFigure Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CFigure Class Reference

#include "spiroDoc.h"

List of all members.

Public Member Functions

CFigure ()
CFigure (CFigure *pFigure)
~CFigure ()
void | AddCommand (TRACE_COMMAND com, int nWidth)
void | AddCommand (TRACE_COMMAND com, COLORREF co)
void | AddCommand (TRACE_COMMAND com, CPoint point, CPoint ptWheelPos, double dWheelData, double dAnchorData)
void | Clean ()
void | Draw (CDC *pDC, long nZoomNumer, long nZoomDenom, CRgn *prgnWheel, CSpiroRect *prectClip) const
void | GetBoundingRect (CRect *lpRect) const
bool | MoveFigure (CPoint ptCorner, CSpiroDoc *pDoc)
void | Serialize (CArchive &ar)

Public Attributes

CArray< CFigCommand,
CFigCommand & > 		m_arrCommands
long | m_nTotalDrawn
long | m_nTotalTraces
long | m_nTracesPerColor
long | m_nTracesThisColor
CSpiroRect m_rectBound

Detailed Description

Definition at line 60 of file spiroDoc.h.

Constructor & Destructor Documentation

CFigure::CFigure ( )

Definition at line 50 of file spiroDoc.cpp.

                 : m_rectBound(9000, 0, 0, 9000)
{
  m_nTotalTraces = 0;
  m_nTotalDrawn = 0;
  m_arrCommands.SetSize(0, 2000);
  m_nTracesPerColor = 0;
  m_nTracesThisColor = 0;
}

CFigure::CFigure ( CFigure * pFigure )

Definition at line 59 of file spiroDoc.cpp.

{
  ENSURE(pFig != NULL);
  m_nTotalTraces = pFig->m_nTotalTraces;
  m_nTotalDrawn = pFig->m_nTotalDrawn;
  m_nTracesPerColor = pFig->m_nTracesPerColor;
  m_nTracesThisColor = pFig->m_nTracesThisColor;
  m_rectBound = pFig->m_rectBound;
  INT_PTR nSize = pFig->m_arrCommands.GetSize();
  m_arrCommands.SetSize(nSize);
  CFigCommand figCommand;

  for (int i = 0; i < nSize; i++)
  {
    figCommand = pFig->m_arrCommands.GetAt(i);
    m_arrCommands.SetAt(i, figCommand);
  }
}

CFigure::~CFigure ( )

Definition at line 78 of file spiroDoc.cpp.

{
  m_arrCommands.RemoveAll();
}

Member Function Documentation

void CFigure::AddCommand | ( | TRACE_COMMAND | com,
 |  | int | nWidth
 | ) |  |

Definition at line 83 of file spiroDoc.cpp.

{
  ENSURE(com == SET_PEN_WIDTH);
  ENSURE(nWidth > 0);
  CFigCommand figcom;
  figcom.m_type = com;
  figcom.m_nPenWidth = nWidth;
  m_arrCommands.SetAtGrow(m_nTotalTraces, figcom);
  ASSERT(m_arrCommands.GetUpperBound() == m_nTotalTraces);
  m_nTotalTraces++;
}

void CFigure::AddCommand | ( | TRACE_COMMAND | com,
 |  | COLORREF | co
 | ) |  |

Definition at line 95 of file spiroDoc.cpp.

{
  ASSERT(com == CHANGE_COLOR);
  CFigCommand figcom;
  figcom.m_type = com;
  figcom.m_co = co;
  m_arrCommands.SetAtGrow(m_nTotalTraces, figcom);
  ASSERT(m_arrCommands.GetUpperBound() == m_nTotalTraces);
  m_nTotalTraces++;
}

void CFigure::AddCommand | ( | TRACE_COMMAND | com,
 |  | CPoint | point,
 |  | CPoint | ptWheelPos,
 |  | double | dWheelData,
 |  | double | dAnchorData
 | ) |  |

Definition at line 107 of file spiroDoc.cpp.

{
  ASSERT(com == MOVE_TO || com == LINE_TO);
  CFigCommand figcom;
  figcom.m_type = com;
  figcom.m_point = point;
  figcom.m_ptWheelPos = ptWheelPos;
  figcom.m_dWheelData = dWheelData;
  figcom.m_dAnchorData = dAnchorData;
  m_arrCommands.SetAtGrow(m_nTotalTraces, figcom);
  ASSERT(m_arrCommands.GetUpperBound() == m_nTotalTraces);
  m_nTotalTraces++;

  // finally check if the new point grows the bounding rectangle
  m_rectBound.left = min(point.x - 2, m_rectBound.left);
  m_rectBound.right = max(point.x + 2, m_rectBound.right);
  m_rectBound.top = max(point.y + 2, m_rectBound.top);
  m_rectBound.bottom = min(point.y - 2, m_rectBound.bottom);
}

void CFigure::Clean ( )

Definition at line 128 of file spiroDoc.cpp.

{
  m_rectBound = CRect(1200, 0, 0, 18000);
  m_nTotalTraces = 0;
  m_arrCommands.RemoveAll();
  m_arrCommands.SetSize(0, 2000);
}

void CFigure::Draw | ( | CDC * | pDC,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom,
 |  | CRgn * | prgnWheel,
 |  | CSpiroRect * | prectClip |
 | ) |  |  | const

Definition at line 138 of file spiroDoc.cpp.

{
  ENSURE(pDC != NULL);
  ENSURE(pDC->GetMapMode() == MM_SPIRO);

  if (m_nTotalDrawn == 0)
    return;

  int     nPenWidth = -1;
  COLORREF  coPen = 0;

  bool  bPrinting = pDC->IsPrinting() != 0;

  // Check if the figure is totally off the clip rectangle and return if this is the case
  if (!bPrinting)
  {
    CSpiroRect rectFig(m_rectBound);
    rectFig.Scale(nZoomNumer, nZoomDenom);  // scale the figure to compare against scaled clip rectangle
    if (!rectFig.IntersectRect(prectClip))
      return;
  }

  CPen* pPenNew = NULL;
  CPen* pPenOld = NULL;

  int nFirst = 0;
  int nLast = m_nTotalDrawn;

  ENSURE(g_pView != NULL && g_pView->IsKindOf(RUNTIME_CLASS(CSpiroView)));

  long  cyExtent = g_pView->GetDocument()->m_sizeExtent.cy;

  ENSURE(cyExtent > 0);

  pPenNew = new CPen(PS_SOLID, g_pView->m_nCurrentPenWidth, g_pView->m_coCurrentPen);
  pPenOld = pDC->SelectObject(pPenNew);

  bool bLastTrace = nLast == m_arrCommands.GetUpperBound();
  CPoint* prgPoint = new CPoint[m_nTotalDrawn];

  CPoint    ptLast(-5000, -5000);
  CPoint    ptTest;

  int   nTotalPoints = 0;
  CFigCommand figCommand;
  for (int i = nFirst; i <= m_nTotalDrawn; i++)
  {
    figCommand = m_arrCommands.GetAt(i);
    switch (figCommand.m_type)
    {
    case SET_PEN_WIDTH:
    case CHANGE_COLOR:
      if (nTotalPoints != 0)  // flush the accumulated lines
      {
        ENSURE(nTotalPoints > 1);
        pDC->Polyline(prgPoint, nTotalPoints);
        nTotalPoints = 0;
      }

      if (figCommand.m_type == SET_PEN_WIDTH)
        nPenWidth = figCommand.m_nPenWidth;
      else
        coPen = figCommand.m_co;

      ENSURE(pPenNew != NULL);
      ENSURE(pPenOld != NULL);
      VERIFY(pDC->SelectObject(pPenOld) == pPenNew);
      VERIFY(pPenNew->DeleteObject());
      pPenNew->CreatePen(PS_SOLID, nPenWidth,  coPen);

      pDC->SelectObject(pPenNew);

      break;

    case MOVE_TO:
      if (bPrinting)
        pDC->MoveTo(figCommand.m_point.x, figCommand.m_point.y);
      else
      {
        // flush the GDI line drawing command if there is any
        if (nTotalPoints != 0)  // 1 point is just a MoveTo.  Don't use it.
        {
          ENSURE(nTotalPoints > 1);
          pDC->Polyline(prgPoint, nTotalPoints);
          nTotalPoints = 0;
        }

        ptLast.x = figCommand.m_point.x * nZoomNumer / nZoomDenom;
        ptLast.y = figCommand.m_point.y * nZoomNumer / nZoomDenom;
      }
      break;

    case LINE_TO:
      if (bPrinting)
      {
        prgPoint[nTotalPoints].x = figCommand.m_point.x;
        prgPoint[nTotalPoints++].y = figCommand.m_point.y;
      }
      else
      {
        ptTest.x = figCommand.m_point.x * nZoomNumer / nZoomDenom;
        ptTest.y = figCommand.m_point.y * nZoomNumer / nZoomDenom;

        if (prectClip->LineInRect(ptLast, ptTest))  // line is visible and not under wheel
          //      && (prgnWheel == NULL ||
          //        !prgnWheel->PtInRegion(ptLast) || !prgnWheel->PtInRegion(ptTest)))
        {
          ENSURE(ptLast.x != -5000 && ptLast.y != 5000);  // there should be a MOVE_TO before
          if (nTotalPoints == 0)  // need to insert ptLast
            prgPoint[nTotalPoints++] = ptLast;

          prgPoint[nTotalPoints++] = ptTest;
        }
        else   // if not visible, add point and flush
        {
          if (nTotalPoints != 0)
          {
            ENSURE(nTotalPoints > 1);
            pDC->Polyline(prgPoint, nTotalPoints);
            nTotalPoints = 0;
          }
        }

        ptLast = ptTest;
      }
    }
  }

  if (bLastTrace)   // connect to the first point to close the picture
  {
    INT_PTR nLastItem = m_arrCommands.GetUpperBound();
    int nPasses = 0;

    for (int i = 0; i <= nLastItem && nPasses < 2; i++)
    {
      figCommand = m_arrCommands.GetAt(i);
      if (figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO)
      {
        if (bPrinting)
        {
          prgPoint[nTotalPoints].x = figCommand.m_point.x;
          prgPoint[nTotalPoints++].y = figCommand.m_point.y;
        }
        else
        {
          if (nTotalPoints == 0)
            prgPoint[nTotalPoints++] = ptLast;

          prgPoint[nTotalPoints].x = figCommand.m_point.x * nZoomNumer / nZoomDenom;
          prgPoint[nTotalPoints++].y = figCommand.m_point.y * nZoomNumer / nZoomDenom;
        }

        // draws 2 segments at the end to avoid leaving the last pixel undrawn
        nPasses++;
      }
    }

    if (this == g_pView->GetDocument()->m_pFigureCurrent)
      g_pView->m_bDrawingDone = true;
  }

  if (nTotalPoints != 0)  // flush the accumulated lines
  {
    ENSURE(nTotalPoints >= 1);
    pDC->Polyline(prgPoint, nTotalPoints);
    nTotalPoints = 0;
  }

  ENSURE(pPenOld != NULL)   ;
  pDC->SelectObject(pPenOld);
  delete pPenNew;

  CSpiroDoc* pDoc = g_pView->GetDocument();
  ENSURE(pDoc != NULL);
  delete[] prgPoint;
}

void CFigure::GetBoundingRect ( CRect * lpRect ) const

Definition at line 316 of file spiroDoc.cpp.

{
  ENSURE(pRect != NULL);
  *pRect = m_rectBound;
}

bool CFigure::MoveFigure | ( | CPoint | ptCorner,
 |  | CSpiroDoc * | pDoc
 | ) |  |

Definition at line 360 of file spiroDoc.cpp.

{
  pDoc->SetModifiedFlag();

  // does the user want to remove the picture from the drawing?
  if (ptCorner.x > pDoc->m_sizeExtent.cx || ptCorner.y < 0)
  {
    delete this;
    return false;  // figure was deleted
  }

  CSize sizeOffset(ptCorner.x - m_rectBound.left + 2, ptCorner.y - m_rectBound.top + 2);
  m_rectBound.OffsetRect(sizeOffset);  //LO_ENGLISH METRICS USED

  CFigCommand figCommand;
  INT_PTR iLast = m_arrCommands.GetUpperBound();
  for (int i = 0; i <= iLast; i++)
  {
    figCommand = m_arrCommands.GetAt(i);
    if (figCommand.m_type != LINE_TO && figCommand.m_type != MOVE_TO)
      continue;

    figCommand.m_point.Offset(sizeOffset);
    m_arrCommands.SetAt(i, figCommand);
  }

  iLast = pDoc->m_arrPFigures.GetUpperBound() + 1;
  pDoc->m_arrPFigures.SetAtGrow(iLast, this);
  return true;
}

void CFigure::Serialize ( CArchive & ar )

Definition at line 322 of file spiroDoc.cpp.

{
  DWORD     dw;
  CFigCommand   figCommand;

  if (ar.IsStoring())
  {
    dw = m_nTotalDrawn; ar << dw;
    dw = m_nTotalTraces; ar << dw;
    dw = m_rectBound.left; ar << dw;
    dw = m_rectBound.right; ar << dw;
    dw = m_rectBound.top; ar << dw;
    dw = m_rectBound.bottom; ar << dw;
    dw = (DWORD)(m_arrCommands.GetUpperBound() + 1);
    ar << dw;
    for (int i = 0; i < (int)dw; i++)
    {
      figCommand = m_arrCommands.GetAt(i);
      figCommand.Serialize(ar);
    }
  }
  else
  {
    ar >> dw; m_nTotalDrawn = dw;
    ar >> dw; m_nTotalTraces = dw;
    ar >> dw; m_rectBound.left = dw;
    ar >> dw; m_rectBound.right = dw;
    ar >> dw; m_rectBound.top = dw;
    ar >> dw; m_rectBound.bottom = dw;
    ar >> dw;
    for (int i = 0; i < (int)dw; i++)
    {
      figCommand.Serialize(ar);
      m_arrCommands.SetAtGrow(i, figCommand);
    }
  }
}

Member Data Documentation

CArray<CFigCommand, CFigCommand&> CFigure::m_arrCommands

Definition at line 68 of file spiroDoc.h.

long CFigure::m_nTotalDrawn

Definition at line 66 of file spiroDoc.h.

long CFigure::m_nTotalTraces

Definition at line 65 of file spiroDoc.h.

long CFigure::m_nTracesPerColor

Definition at line 70 of file spiroDoc.h.

long CFigure::m_nTracesThisColor

Definition at line 71 of file spiroDoc.h.

CSpiroRect CFigure::m_rectBound

Definition at line 64 of file spiroDoc.h.

The documentation for this class was generated from the following files:
  • general/spiro/spiroDoc.h
  • general/spiro/spiroDoc.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFileDlgWatcherApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CFileDlgWatcherApp Class Reference

#include "FileDlgWatcher.h"

List of all members.

Public Member Functions

CFileDlgWatcherApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 17 of file FileDlgWatcher.h.

Constructor & Destructor Documentation

CFileDlgWatcherApp::CFileDlgWatcherApp ( )

Definition at line 22 of file FileDlgWatcher.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CFileDlgWatcherApp::InitInstance ( ) [virtual]

Definition at line 36 of file FileDlgWatcher.cpp.

{
  // InitCommonControlsEx() is required on Windows XP if an application
  // manifest specifies use of ComCtl32.dll version 6 or later to enable
  // visual styles.  Otherwise, any window creation will fail.
  INITCOMMONCONTROLSEX InitCtrls;
  InitCtrls.dwSize = sizeof(InitCtrls);
  // Set this to include all the common control classes you want to use
  // in your application.
  InitCtrls.dwICC = ICC_WIN95_CLASSES;
  InitCommonControlsEx(&InitCtrls);

  CWinApp::InitInstance();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  CFileDlgWatcherDlg dlg;
  m_pMainWnd = &dlg;
  INT_PTR nResponse = dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.h
  • general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFileDlgWatcherDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

CFileDlgWatcherDlg Class Reference

#include "FileDlgWatcherDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_FILEDLGWATCHER_DIALOG }

Public Member Functions

CFileDlgWatcherDlg (CWnd *pParent=NULL)
afx_msg void | OnBnClickedClearLog ()
afx_msg void | OnBnClickedCreateDlg ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()

Protected Attributes

HICON | m_hIcon

Private Member Functions

void | CreateLogEpilogue ()
void | CreateLogPrologue ()

Private Attributes

BOOL | m_bEventPopups
BOOL | m_bOpenFileDialog
BOOL | m_bVistaStyle
CString | m_strLog

Detailed Description

Definition at line 8 of file FileDlgWatcherDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 15 of file FileDlgWatcherDlg.h.

{ IDD = IDD_FILEDLGWATCHER_DIALOG };

Constructor & Destructor Documentation

CFileDlgWatcherDlg::CFileDlgWatcherDlg ( CWnd * pParent = NULL )

Definition at line 16 of file FileDlgWatcherDlg.cpp.

  : CDialog(CFileDlgWatcherDlg::IDD, pParent),
    m_bOpenFileDialog(TRUE),
    m_bVistaStyle(FALSE),
    m_bEventPopups(FALSE),
    m_strLog()
{
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CFileDlgWatcherDlg::CreateLogEpilogue ( ) [private]

Definition at line 136 of file FileDlgWatcherDlg.cpp.

{
  m_strLog += _T("\r\n");
}

void CFileDlgWatcherDlg::CreateLogPrologue ( ) [private]

Definition at line 113 of file FileDlgWatcherDlg.cpp.

{
  if (m_bOpenFileDialog)
  {
    m_strLog += _T("Open ");
  }
  else
  {
    m_strLog += _T("Save ");
  }
  m_strLog += _T("file dialog (");
  if (m_bVistaStyle)
  {
    m_strLog += _T("Vista ");
  }
  else
  {
    m_strLog += _T("XP ");
  }
  m_strLog += _T("style)\r\n");
  m_strLog += _T("-----\r\n");
}

void CFileDlgWatcherDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 26 of file FileDlgWatcherDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  DDX_Check(pDX, IDC_OPEN_FILE_DLG, m_bOpenFileDialog);
  DDX_Check(pDX, IDC_VISTA_STYLE, m_bVistaStyle);
  DDX_Check(pDX, IDC_EVENT_POPUPS, m_bEventPopups);
  DDX_Text(pDX, IDC_LOG, m_strLog);
}

void CFileDlgWatcherDlg::OnBnClickedClearLog ( )

Definition at line 107 of file FileDlgWatcherDlg.cpp.

{
  m_strLog.Empty();
  UpdateData(FALSE);
}

void CFileDlgWatcherDlg::OnBnClickedCreateDlg ( )

Definition at line 96 of file FileDlgWatcherDlg.cpp.

{
  UpdateData(TRUE);   // to get current data from check boxes
  CreateLogPrologue();
  CCustomFileDialog cfd (m_bOpenFileDialog, m_bVistaStyle, m_bEventPopups,
               m_strLog);
  cfd.DoModal();
  CreateLogEpilogue();
  UpdateData(FALSE);    // to get new data from text log
}

BOOL CFileDlgWatcherDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 46 of file FileDlgWatcherDlg.cpp.

{
  CDialog::OnInitDialog();

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CFileDlgWatcherDlg::OnPaint ( ) [protected]

Definition at line 64 of file FileDlgWatcherDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CFileDlgWatcherDlg::OnQueryDragIcon ( ) [protected]

Definition at line 91 of file FileDlgWatcherDlg.cpp.

{
  return static_cast<HCURSOR>(m_hIcon);
}

Member Data Documentation

BOOL CFileDlgWatcherDlg::m_bEventPopups [private]

Definition at line 41 of file FileDlgWatcherDlg.h.

BOOL CFileDlgWatcherDlg::m_bOpenFileDialog [private]

Definition at line 39 of file FileDlgWatcherDlg.h.

BOOL CFileDlgWatcherDlg::m_bVistaStyle [private]

Definition at line 40 of file FileDlgWatcherDlg.h.

HICON CFileDlgWatcherDlg::m_hIcon [protected]

Definition at line 23 of file FileDlgWatcherDlg.h.

CString CFileDlgWatcherDlg::m_strLog [private]

Definition at line 42 of file FileDlgWatcherDlg.h.

The documentation for this class was generated from the following files:
  • general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.h
  • general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFileLog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes | Private Member Functions

CFileLog Class Reference

#include "Log.H"

Inherits CLog.

List of all members.

Public Member Functions

CFileLog ()
~CFileLog ()
BOOL | Create (LPCTSTR pszFileName)
CString | GetFileName () const
CLog & | operator<< (LPCTSTR pszString)

Protected Attributes

CStdioFile | m_file

Private Member Functions

DECLARE_DYNAMIC (CFileLog)

Detailed Description

Definition at line 52 of file Log.H.

Constructor & Destructor Documentation

CFileLog::CFileLog ( )

Definition at line 124 of file Log.Cpp.

{
}

CFileLog::~CFileLog ( )

Definition at line 128 of file Log.Cpp.

{
}

Member Function Documentation

BOOL CFileLog::Create ( LPCTSTR pszFileName )

Definition at line 139 of file Log.Cpp.

{
   BOOL tSuccess;

   tSuccess = m_file.Open( pszFileName, CFile::modeCreate|CFile::modeWrite|
    CFile::shareExclusive|CFile::typeText );
   if( !tSuccess )
   {
    return( FALSE );
   }

   return( TRUE );
}

CFileLog::DECLARE_DYNAMIC ( CFileLog ) [private]
CString CFileLog::GetFileName ( ) const

Definition at line 153 of file Log.Cpp.

{
   return( m_file.GetFileName() );
}

CLog & CFileLog::operator<< ( LPCTSTR pszString ) [virtual]

Reimplemented from CLog.

Definition at line 132 of file Log.Cpp.

{
   m_file.WriteString( pszString );

   return( *this );
}

Member Data Documentation

CStdioFile CFileLog::m_file [protected]

Definition at line 68 of file Log.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/Log.H
  • ole/TstCon/Log.Cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFileNewDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Attributes

CFileNewDialog Class Reference

#include "filenewd.h"

Inherits CCSDialog, and CCSDialog.

List of all members.

Public Types

enum | { IDD = IDD_FILENEWDIALOG }
enum | { IDD = IDD_FILENEWDIALOG }

Public Member Functions

CFileNewDialog (CWnd *pParent=NULL)
CFileNewDialog (CWnd *pParent=NULL)

Public Attributes

CListBox | m_listbox
int | m_nSel

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()
afx_msg void | OnDblclkDatedialogList ()
afx_msg void | OnDblclkDatedialogList ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()

Static Protected Attributes

static const DWORD | m_nHelpIDs []

Detailed Description

Definition at line 15 of file filenewd.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file filenewd.h.

{ IDD = IDD_FILENEWDIALOG };

anonymous enum
Enumerator:
IDD

Definition at line 25 of file filenewd.h.

{ IDD = IDD_FILENEWDIALOG };

Constructor & Destructor Documentation

CFileNewDialog::CFileNewDialog ( CWnd * pParent = NULL )

Definition at line 31 of file filenewd.cpp.

  : CCSDialog(CFileNewDialog::IDD, pParent)
{
  //{{AFX_DATA_INIT(CFileNewDialog)
  m_nSel = -1;
  //}}AFX_DATA_INIT
}

CFileNewDialog::CFileNewDialog ( CWnd * pParent = NULL )

Member Function Documentation

void CFileNewDialog::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 40 of file filenewd.cpp.

{
  CCSDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CFileNewDialog)
  DDX_Control(pDX, IDC_DATEDIALOG_LIST, m_listbox);
  DDX_LBIndex(pDX, IDC_DATEDIALOG_LIST, m_nSel);
  //}}AFX_DATA_MAP
}

virtual void CFileNewDialog::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual const DWORD* CFileNewDialog::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 39 of file filenewd.h.

{return m_nHelpIDs;}

virtual const DWORD* CFileNewDialog::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 41 of file filenewd.h.

{return m_nHelpIDs;}

afx_msg void CFileNewDialog::OnDblclkDatedialogList ( ) [protected]
void CFileNewDialog::OnDblclkDatedialogList ( ) [protected]

Definition at line 77 of file filenewd.cpp.

{
  OnOK();
}

BOOL CFileNewDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

Definition at line 60 of file filenewd.cpp.

{
  CCSDialog::OnInitDialog();

  CString str;
  VERIFY(str.LoadString(IDS_WORD6_DOCUMENT));
  m_listbox.AddString(str);
  VERIFY(str.LoadString(IDS_RTF_DOCUMENT));
  m_listbox.AddString(str);
  VERIFY(str.LoadString(IDS_TEXT_DOCUMENT));
  m_listbox.AddString(str);
  m_listbox.SetCurSel(0);

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

virtual BOOL CFileNewDialog::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

Member Data Documentation

CListBox CFileNewDialog::m_listbox

Definition at line 24 of file filenewd.h.

static const DWORD CFileNewDialog::m_nHelpIDs [static, protected]
Initial value:
{
  IDC_DATEDIALOG_LIST, IDH_WORDPAD_FILENEW_DOC,
  0, 0
}

Definition at line 38 of file filenewd.h.

int CFileNewDialog::m_nSel

Definition at line 25 of file filenewd.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/filenewd.h
  • vc2008fp/WordPad/filenewd.h
  • ole/wordpad/filenewd.cpp
  • vc2008fp/WordPad/filenewd.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFileViewBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CFileViewBar Class Reference

#include "FileViewBar.h"

List of all members.

Public Member Functions

CFileViewBar ()
virtual | ~CFileViewBar ()
void | AdjustLayout ()
void | OnChangeVisualStyle ()

Protected Member Functions

void | FillFileView ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDummyCompile ()
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnPaint ()
afx_msg void | OnProperties ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSolutionOpen ()
afx_msg void | OnSolutionOpenWith ()

Protected Attributes

CImageList | m_FileViewImages
CClassTreeWnd m_wndFileView
CFileViewToolBar m_wndToolBar

Detailed Description

Definition at line 24 of file FileViewBar.h.

Constructor & Destructor Documentation

CFileViewBar::CFileViewBar ( )

Definition at line 24 of file FileViewBar.cpp.

{
}

CFileViewBar::~CFileViewBar ( ) [virtual]

Definition at line 28 of file FileViewBar.cpp.

{
}

Member Function Documentation

void CFileViewBar::AdjustLayout ( )

Definition at line 162 of file FileViewBar.cpp.

{
  if (GetSafeHwnd() == NULL)
  {
    return;
  }

  CRect rectClient;
  GetClientRect(rectClient);

  int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;

  m_wndToolBar.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
  m_wndFileView.SetWindowPos(NULL, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
}

void CFileViewBar::FillFileView ( ) [protected]

Definition at line 98 of file FileViewBar.cpp.

{
  HTREEITEM hRoot = m_wndFileView.InsertItem(_T("Hello files"), 0, 0);
  m_wndFileView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);

  HTREEITEM hSrc = m_wndFileView.InsertItem(_T("Source Files"), 0, 0, hRoot);

  m_wndFileView.InsertItem(_T("Hello.cpp"), 1, 1, hSrc);
  m_wndFileView.InsertItem(_T("Hello.rc"), 1, 1, hSrc);
  m_wndFileView.InsertItem(_T("HelloDoc.cpp"), 1, 1, hSrc);
  m_wndFileView.InsertItem(_T("HelloView.cpp"), 1, 1, hSrc);
  m_wndFileView.InsertItem(_T("MainFrm.cpp"), 1, 1, hSrc);
  m_wndFileView.InsertItem(_T("StdAfx.cpp"), 1, 1, hSrc);

  HTREEITEM hInc = m_wndFileView.InsertItem(_T("Header Files"), 0, 0, hRoot);

  m_wndFileView.InsertItem(_T("Hello.h"), 2, 2, hInc);
  m_wndFileView.InsertItem(_T("HelloDoc.h"), 2, 2, hInc);
  m_wndFileView.InsertItem(_T("HelloView.h"), 2, 2, hInc);
  m_wndFileView.InsertItem(_T("resource.h"), 2, 2, hInc);
  m_wndFileView.InsertItem(_T("MainFrm.h"), 2, 2, hInc);
  m_wndFileView.InsertItem(_T("StdAfx.h"), 2, 2, hInc);

  HTREEITEM hRes = m_wndFileView.InsertItem(_T("Resource Files"), 0, 0, hRoot);

  m_wndFileView.InsertItem(_T("Hello.ico"), 2, 2, hRes);
  m_wndFileView.InsertItem(_T("Hello.rc2"), 2, 2, hRes);
  m_wndFileView.InsertItem(_T("HelloDoc.ico"), 2, 2, hRes);
  m_wndFileView.InsertItem(_T("Toolbar.bmp"), 2, 2, hRes);

  m_wndFileView.Expand(hRoot, TVE_EXPAND);
  m_wndFileView.Expand(hSrc, TVE_EXPAND);
  m_wndFileView.Expand(hInc, TVE_EXPAND);
}

void CFileViewBar::OnChangeVisualStyle ( )

Definition at line 233 of file FileViewBar.cpp.

{
  m_wndToolBar.CleanUpLockedImages();
  m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_SOLUTION_EXPLORER_24 : IDR_SOLUTION_EXPLORER, 0, 0, TRUE /* Locked */);

  m_FileViewImages.DeleteImageList();

  UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_FILE_VIEW24 : IDB_FILE_VIEW;

  CBitmap bmp;
  if (!bmp.LoadBitmap(uiBmpId))
  {
    TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
    ASSERT(FALSE);
    return;
  }

  BITMAP bmpObj;
  bmp.GetBitmap(&bmpObj);

  UINT nFlags = ILC_MASK;

  nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;

  m_FileViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
  m_FileViewImages.Add(&bmp, RGB(255, 0, 255));

  m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL);
}

void CFileViewBar::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 133 of file FileViewBar.cpp.

{
  CTreeCtrl* pWndTree = (CTreeCtrl*) &m_wndFileView;
  ASSERT_VALID(pWndTree);

  if (pWnd != pWndTree)
  {
    CDockablePane::OnContextMenu(pWnd, point);
    return;
  }

  if (point != CPoint(-1, -1))
  {
    // Select clicked item:
    CPoint ptTree = point;
    pWndTree->ScreenToClient(&ptTree);

    UINT flags = 0;
    HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
    if (hTreeItem != NULL)
    {
      pWndTree->SelectItem(hTreeItem);
    }
  }

  pWndTree->SetFocus();
  theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_SOLUTION, point.x, point.y, this, TRUE);
}

int CFileViewBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 50 of file FileViewBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy;
  rectDummy.SetRectEmpty();

  // Create view:
  const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;

  if (!m_wndFileView.Create(dwViewStyle, rectDummy, this, 4))
  {
    TRACE0("Failed to create solution explorer\n");
    return -1;      // fail to create
  }

  // Load view images:
  m_FileViewImages.Create(IDB_FILE_VIEW, 16, 0, RGB(255, 0, 255));
  m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL);

  m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_SOLUTION_EXPLORER);
  m_wndToolBar.LoadToolBar(IDR_SOLUTION_EXPLORER, 0, 0, TRUE /* Is locked */);

  OnChangeVisualStyle();

  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);

  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));

  m_wndToolBar.SetOwner(this);

  // All commands will be routed via this control , not via the parent frame:
  m_wndToolBar.SetRouteCommandsViaFrame(FALSE);

  // Fill view context(dummy code, don't seek here something magic :-)):
  FillFileView();
  AdjustLayout();

  return 0;
}

void CFileViewBar::OnDummyCompile ( ) [protected]

Definition at line 194 of file FileViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CFileViewBar::OnEditClear ( ) [protected]

Definition at line 209 of file FileViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CFileViewBar::OnEditCopy ( ) [protected]

Definition at line 204 of file FileViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CFileViewBar::OnEditCut ( ) [protected]

Definition at line 199 of file FileViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CFileViewBar::OnPaint ( ) [protected]

Definition at line 214 of file FileViewBar.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndFileView.GetWindowRect(rectTree);
  ScreenToClient(rectTree);

  rectTree.InflateRect(1, 1);
  dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
}

void CFileViewBar::OnProperties ( ) [protected]

Definition at line 178 of file FileViewBar.cpp.

{
  AfxMessageBox(_T("Properties..."));

}

void CFileViewBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 226 of file FileViewBar.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);

  m_wndFileView.SetFocus();
}

void CFileViewBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 92 of file FileViewBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);
  AdjustLayout();
}

void CFileViewBar::OnSolutionOpen ( ) [protected]

Definition at line 184 of file FileViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CFileViewBar::OnSolutionOpenWith ( ) [protected]

Definition at line 189 of file FileViewBar.cpp.

{
  // TODO: Add your command handler code here
}

Member Data Documentation

CImageList CFileViewBar::m_FileViewImages [protected]

Definition at line 37 of file FileViewBar.h.

CClassTreeWnd CFileViewBar::m_wndFileView [protected]

Definition at line 36 of file FileViewBar.h.

CFileViewToolBar CFileViewBar::m_wndToolBar [protected]

Definition at line 38 of file FileViewBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/FileViewBar.h
  • vc2008fp/VisualStudioDemo/FileViewBar.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFileViewToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CFileViewToolBar Class Reference

#include "FileViewBar.h"

List of all members.

Private Member Functions

virtual BOOL | AllowShowOnList () const
virtual void | OnUpdateCmdUI (CFrameWnd *, BOOL bDisableIfNoHndler)

Detailed Description

Definition at line 14 of file FileViewBar.h.

Member Function Documentation

virtual BOOL CFileViewToolBar::AllowShowOnList ( ) const [inline, private, virtual]

Definition at line 21 of file FileViewBar.h.

{ return FALSE; }

virtual void CFileViewToolBar::OnUpdateCmdUI | ( | CFrameWnd * | ,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [inline, private, virtual]

Definition at line 16 of file FileViewBar.h.

  {
    CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
  }

The documentation for this class was generated from the following file:
  • vc2008fp/VisualStudioDemo/FileViewBar.h
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFindComboButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes

CFindComboButton Class Reference

#include "FindComboBox.h"

List of all members.

Public Member Functions

CFindComboButton ()

Static Public Member Functions

static BOOL | HasFocus ()

Protected Member Functions

virtual BOOL | NotifyCommand (int iNotifyCode)

Static Protected Attributes

static BOOL | m_bHasFocus = FALSE

Detailed Description

Definition at line 12 of file FindComboBox.h.

Constructor & Destructor Documentation

CFindComboButton::CFindComboButton ( ) [inline]

Definition at line 18 of file FindComboBox.h.

                     : CMFCToolBarComboBoxButton(ID_EDIT_FIND_COMBO, GetCmdMgr()->GetCmdImage(ID_EDIT_FIND), CBS_DROPDOWN)
  {
  }

Member Function Documentation

static BOOL CFindComboButton::HasFocus ( ) [inline, static]

Definition at line 24 of file FindComboBox.h.

  {
    return m_bHasFocus;
  }

BOOL CFindComboButton::NotifyCommand ( int iNotifyCode ) [protected, virtual]

Definition at line 27 of file FindComboBox.cpp.

{
  BOOL bRes = CMFCToolBarComboBoxButton::NotifyCommand(iNotifyCode);

  switch (iNotifyCode)
  {
  case CBN_KILLFOCUS:
    m_bHasFocus = FALSE;
    bRes = TRUE;
    break;

  case CBN_SETFOCUS:
    m_bHasFocus = TRUE;
    bRes = TRUE;
    break;
  }

  return bRes;
}

Member Data Documentation

BOOL CFindComboButton::m_bHasFocus = FALSE [static, protected]

Definition at line 30 of file FindComboBox.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/FindComboBox.h
  • vc2008fp/VisualStudioDemo/FindComboBox.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFindDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CFindDlg Class Reference

#include "finddlg.h"

List of all members.

Public Types

enum | { IDD = IDD_FIND }

Public Member Functions

CFindDlg (CWnd *pParent=NULL)

Public Attributes

BOOL | m_bMatchCase
int | m_nDirection
CString | m_szText

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnEditFindNext ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 16 of file finddlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file finddlg.h.

{ IDD = IDD_FIND };

Constructor & Destructor Documentation

CFindDlg::CFindDlg ( CWnd * pParent = NULL )

Definition at line 31 of file finddlg.cpp.

  : CDialog(CFindDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CFindDlg)
  m_bMatchCase = FALSE;
  m_szText = _T("");
  m_nDirection = 1; // down by default
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CFindDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 42 of file finddlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CFindDlg)
  DDX_Check(pDX, IDC_CHECK1, m_bMatchCase);
  DDX_CBString(pDX, IDC_COMBO1, m_szText);
  DDX_Radio(pDX, IDC_RADIO1, m_nDirection);
  //}}AFX_DATA_MAP
}

void CFindDlg::OnEditFindNext ( ) [protected]

Definition at line 63 of file finddlg.cpp.

{
  // 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 ( ) [protected, virtual]

Definition at line 82 of file finddlg.cpp.

{
  CDialog::OnInitDialog();

  CWnd* pWnd = GetDlgItem(IDC_COMBO1);
  GetApplicationView()->m_searchHistory.FillCombobox();

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

Member Data Documentation

BOOL CFindDlg::m_bMatchCase

Definition at line 25 of file finddlg.h.

int CFindDlg::m_nDirection

Definition at line 27 of file finddlg.h.

CString CFindDlg::m_szText

Definition at line 26 of file finddlg.h.

The documentation for this class was generated from the following files:
  • general/npp/finddlg.h
  • general/npp/finddlg.cpp
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFolderBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CFolderBar Class Reference

#include "FolderBar.h"

List of all members.

Public Member Functions

CFolderBar ()
virtual | ~CFolderBar ()
afx_msg void | OnDestroy ()

Public Attributes

CMFCShellTreeCtrl | m_wndShellTree

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg LRESULT | OnNotifyRecycleBin (WPARAM wParam, LPARAM lParam)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

ULONG | m_ulRecycleBin

Detailed Description

Definition at line 16 of file FolderBar.h.

Constructor & Destructor Documentation

CFolderBar::CFolderBar ( )

Definition at line 31 of file FolderBar.cpp.

{
  m_ulRecycleBin = 0;
}

CFolderBar::~CFolderBar ( ) [virtual]

Definition at line 36 of file FolderBar.cpp.

{
}

Member Function Documentation

int CFolderBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 54 of file FolderBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy (0, 0, 0, 0);
  const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
                TVS_LINESATROOT | TVS_HASBUTTONS;

  m_wndShellTree.Create(dwViewStyle, rectDummy, this, idTree);

  LPITEMIDLIST ppidl;
  if (SHGetSpecialFolderLocation(GetSafeHwnd(),CSIDL_BITBUCKET, &ppidl) != NOERROR)
  {
    return 0;
  }

  SHChangeNotifyEntry scnIDL;
  scnIDL.pidl = ppidl;
  scnIDL.fRecursive = TRUE;

  m_ulRecycleBin = SHChangeNotifyRegister(m_hWnd, SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS, SHCNE_ALLEVENTS,  UWM_NOTIFY_RECYCLE_BIN, 1, &scnIDL);
  return 0;
}

void CFolderBar::OnDestroy ( void )

Definition at line 124 of file FolderBar.cpp.

{
  CDockablePane::OnDestroy();

  if (m_ulRecycleBin != 0)
  {
    SHChangeNotifyDeregister(m_ulRecycleBin);
  }
}

BOOL CFolderBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 94 of file FolderBar.cpp.

{
  return TRUE;
}

LRESULT CFolderBar::OnNotifyRecycleBin | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 98 of file FolderBar.cpp.

{
  UNREFERENCED_PARAMETER(wParam);
  if (lParam == SHCNE_UPDATEIMAGE)
  {
    m_wndShellTree.Refresh();
  }

  if (lParam == SHCNE_FREESPACE)
  {
    LPITEMIDLIST ppidl;
    if (SHGetSpecialFolderLocation(GetSafeHwnd(), CSIDL_BITBUCKET, &ppidl) != NOERROR)
    {
      return TRUE;
    }

    m_wndShellTree.SelectPath(ppidl);

    CMFCShellListCtrl* pList = m_wndShellTree.GetRelatedList();
    ASSERT_VALID(pList);

    pList->Refresh();
  }

  return TRUE;
}

void CFolderBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 88 of file FolderBar.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);
  m_wndShellTree.SetFocus ();
}

void CFolderBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 79 of file FolderBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);

  m_wndShellTree.SetWindowPos (NULL, 0, 0,
    cx, cy,
    SWP_NOACTIVATE | SWP_NOZORDER);
}

Member Data Documentation

ULONG CFolderBar::m_ulRecycleBin [protected]

Definition at line 36 of file FolderBar.h.

CMFCShellTreeCtrl CFolderBar::m_wndShellTree

Definition at line 24 of file FolderBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/Explorer/FolderBar.h
  • vc2008fp/Explorer/FolderBar.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFolderListBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CFolderListBar Class Reference

#include "FolderListBar.h"

List of all members.

Public Member Functions

CFolderListBar (const CObList &lstWorkspaces, CImageList &images)
virtual | ~CFolderListBar ()
virtual BOOL | CanAcceptPane (const CBasePane *) const
virtual BOOL | DoesAllowDynInsertBefore () const
BOOL | SelectWorkspace (CWorkspaceObj *pWS)

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual void | OnEraseWorkArea (CDC *pDC, CRect rectWorkArea)
afx_msg void | OnSelectTree (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

BOOL | m_bNotifyFrame
CFoldersTree m_wndFolders

Detailed Description

Definition at line 19 of file FolderListBar.h.

Constructor & Destructor Documentation

CFolderListBar::CFolderListBar | ( | const CObList & | lstWorkspaces,
 |  | CImageList & | images
 | ) |  |

Definition at line 27 of file FolderListBar.cpp.

                                                                               : m_wndFolders(lstWorkspaces, images)
{
  // m_nSize = 200; // Initial width
  m_bNotifyFrame = TRUE;
}

CFolderListBar::~CFolderListBar ( ) [virtual]

Definition at line 33 of file FolderListBar.cpp.

{
}

Member Function Documentation

virtual BOOL CFolderListBar::CanAcceptPane ( const CBasePane * ) const [inline, virtual]

Definition at line 33 of file FolderListBar.h.

  {
    return FALSE;
  }

virtual BOOL CFolderListBar::DoesAllowDynInsertBefore ( ) const [inline, virtual]

Definition at line 37 of file FolderListBar.h.

  {
    return FALSE;
  }

int CFolderListBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 46 of file FolderListBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy(0, 0, 0, 0);
  m_wndFolders.Create(0, rectDummy, this, idTree);

  return 0;
}

void CFolderListBar::OnEraseWorkArea | ( | CDC * | pDC,
 |  | CRect | rectWorkArea |
 | ) |  |  | [protected, virtual]

Definition at line 66 of file FolderListBar.cpp.

{
  ASSERT_VALID(pDC);
  pDC->FillSolidRect(rectWorkArea, GetSysColor(COLOR_WINDOW));
}

void CFolderListBar::OnSelectTree | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 72 of file FolderListBar.cpp.

{
  HTREEITEM hTreeItem = m_wndFolders.GetSelectedItem();
  if (hTreeItem != NULL)
  {
    CWorkspaceObj* pWS = (CWorkspaceObj*) m_wndFolders.GetItemData(hTreeItem);
    ASSERT_VALID(pWS);

    CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetParentFrame());
    if (pMainFrame != NULL && m_bNotifyFrame)
    {
      pMainFrame->SetWorkSpace(pWS);
    }
  }

  *pResult = 0;
}

void CFolderListBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 57 of file FolderListBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);
  if (CanAdjustLayout())
  {
    m_wndFolders.SetWindowPos(NULL, 0, 0, cx , cy , SWP_NOACTIVATE | SWP_NOZORDER);
  }
}

BOOL CFolderListBar::SelectWorkspace ( CWorkspaceObj * pWS )

Definition at line 90 of file FolderListBar.cpp.

{
  ASSERT_VALID(pWS);

  m_bNotifyFrame = FALSE;
  m_wndFolders.SelectWorkspace(pWS);
  m_bNotifyFrame = TRUE;

  return TRUE;
}

Member Data Documentation

BOOL CFolderListBar::m_bNotifyFrame [protected]

Definition at line 28 of file FolderListBar.h.

CFoldersTree CFolderListBar::m_wndFolders [protected]

Definition at line 27 of file FolderListBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/FolderListBar.h
  • vc2008fp/OutlookDemo/FolderListBar.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFolderListPopupWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

CFolderListPopupWnd Class Reference

#include "FolderListPopupWnd.h"

List of all members.

Public Member Functions

CFolderListPopupWnd (const CObList &lstWorkspaces, CImageList &images, CWorkspaceObj *pSelWorkSpace)
virtual | ~CFolderListPopupWnd ()
void | CloseMe (BOOL bKeep=FALSE)
virtual BOOL | Create (const RECT &rect)
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

afx_msg void | OnActivate (UINT nState, CWnd *pWndOther, BOOL bMinimized)
afx_msg void | OnActivateApp (BOOL bActive, DWORD dwThreadID)
afx_msg void | OnCancelMode ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnKeepVisible ()
afx_msg void | OnNcDestroy ()
afx_msg void | OnPaint ()
afx_msg void | OnSelectTree (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

BOOL | m_bNotify
CMFCButton | m_btnPin
CWorkspaceObj * m_pSelWorkSpace
CRect | m_rectCaption
CString | m_strCaption
CFoldersTree m_wndFolders

Static Protected Attributes

static CString | m_strClassName

Detailed Description

Definition at line 19 of file FolderListPopupWnd.h.

Constructor & Destructor Documentation

CFolderListPopupWnd::CFolderListPopupWnd | ( | const CObList & | lstWorkspaces,
 |  | CImageList & | images,
 |  | CWorkspaceObj * | pSelWorkSpace
 | ) |  |

Definition at line 30 of file FolderListPopupWnd.cpp.

                                                                                : m_wndFolders(lstWorkspaces, images), m_pSelWorkSpace(pSelWorkSpace), m_bNotify(FALSE)
{
}

CFolderListPopupWnd::~CFolderListPopupWnd ( ) [virtual]

Definition at line 34 of file FolderListPopupWnd.cpp.

{
}

Member Function Documentation

void CFolderListPopupWnd::CloseMe ( BOOL bKeep = FALSE )

Definition at line 201 of file FolderListPopupWnd.cpp.

{
  CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetParentFrame());
  if (pMainFrame != NULL)
  {
    pMainFrame->OnCloseFoldersPopup(bKeep);
  }

  PostMessage(WM_CLOSE);
}

BOOL CFolderListPopupWnd::Create ( const RECT & rect ) [virtual]

Definition at line 54 of file FolderListPopupWnd.cpp.

{
  if (m_strClassName.IsEmpty())
  {
    m_strClassName = ::AfxRegisterWndClass(CS_SAVEBITS, ::LoadCursor(NULL, IDC_ARROW),
      (HBRUSH)(COLOR_BTNFACE + 1), NULL);
  }

  return CWnd::CreateEx(WS_EX_TOPMOST | WS_EX_DLGMODALFRAME, m_strClassName, _T(""), WS_POPUP | WS_VISIBLE | WS_BORDER, rect, AfxGetMainWnd(), NULL);
}

void CFolderListPopupWnd::OnActivate | ( | UINT | nState,
 |  | CWnd * | pWndOther,
 |  | BOOL | bMinimized |
 | ) |  |  | [protected]

Definition at line 172 of file FolderListPopupWnd.cpp.

{
  CWnd::OnActivate(nState, pWndOther, bMinimized);

  if (nState == WA_INACTIVE)
  {
    CloseMe();
  }
}

void CFolderListPopupWnd::OnActivateApp | ( | BOOL | bActive,
 |  | DWORD | dwThreadID |
 | ) |  |  | [protected]

Definition at line 162 of file FolderListPopupWnd.cpp.

{
  CWnd::OnActivateApp(bActive, dwThreadID);

  if (!bActive)
  {
    CloseMe();
  }
}

void CFolderListPopupWnd::OnCancelMode ( ) [protected]

Definition at line 150 of file FolderListPopupWnd.cpp.

{
  CWnd::OnCancelMode();
  CloseMe();
}

int CFolderListPopupWnd::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 120 of file FolderListPopupWnd.cpp.

{
  if (CWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rect;
  rect.SetRectEmpty();

  // Create folders tree:
  m_wndFolders.Create(0, rect, this, idFoldersTree);

  m_wndFolders.SelectWorkspace(m_pSelWorkSpace);

  m_wndFolders.SetFocus();

  // Create "Pin" button:
  m_btnPin.Create(_T(""), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rect, this, idPinBtn);
  m_btnPin.m_bDrawFocus = FALSE;
  m_btnPin.m_nFlatStyle = CMFCButton::BUTTONSTYLE_FLAT;
  m_btnPin.SetImage(IDB_PIN);
  m_btnPin.SizeToContent();

  BOOL bValidString;
  bValidString = m_strCaption.LoadString(IDS_FOLDER_POPUP_CAPTION);

  m_bNotify = TRUE;

  return 0;
}

BOOL CFolderListPopupWnd::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 99 of file FolderListPopupWnd.cpp.

{
  return TRUE;
}

void CFolderListPopupWnd::OnKeepVisible ( ) [protected]

Definition at line 212 of file FolderListPopupWnd.cpp.

{
  CloseMe(TRUE);
}

void CFolderListPopupWnd::OnNcDestroy ( ) [protected]

Definition at line 156 of file FolderListPopupWnd.cpp.

{
  CWnd::OnNcDestroy();
  delete this;
}

void CFolderListPopupWnd::OnPaint ( ) [protected]

Definition at line 78 of file FolderListPopupWnd.cpp.

{
  CPaintDC dc(this); // device context for painting

  dc.FillRect(m_rectCaption, &afxGlobalData.brBarFace);

  int nOldBkMode = dc.SetBkMode(TRANSPARENT);
  COLORREF clrOldText = dc.SetTextColor(afxGlobalData.clrBarText);
  CFont* pOldFont = (CFont*) dc.SelectObject(&afxGlobalData.fontRegular);

  CRect rectText = m_rectCaption;
  rectText.left += 2 * nHorzMargin;
  rectText.right -= 2 * nHorzMargin + rectText.Height();

  dc.DrawText(m_strCaption, rectText, DT_END_ELLIPSIS | DT_SINGLELINE | DT_VCENTER);

  dc.SelectObject(pOldFont);
  dc.SetTextColor(clrOldText);
  dc.SetBkMode(nOldBkMode);
}

void CFolderListPopupWnd::OnSelectTree | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 182 of file FolderListPopupWnd.cpp.

{
  HTREEITEM hTreeItem = m_wndFolders.GetSelectedItem();
  if (m_bNotify && hTreeItem != NULL)
  {
    CWorkspaceObj* pWS = (CWorkspaceObj*) m_wndFolders.GetItemData(hTreeItem);

    CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetParentFrame());
    if (pMainFrame != NULL)
    {
      pMainFrame->SetWorkSpace(pWS);
    }

    CloseMe();
  }

  *pResult = 0;
}

void CFolderListPopupWnd::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 65 of file FolderListPopupWnd.cpp.

{
  CWnd::OnSize(nType, cx, cy);

  CRect rectBtn;
  m_btnPin.GetClientRect(rectBtn);

  m_rectCaption = CRect(0, 0, cx, rectBtn.Height() + 2);

  m_btnPin.SetWindowPos(NULL, cx - rectBtn.Width() - nHorzMargin, (m_rectCaption.Height() - rectBtn.Height()) / 2, -1, -1, SWP_NOSIZE | SWP_NOZORDER);
  m_wndFolders.MoveWindow(0, m_rectCaption.bottom, cx, cy - m_rectCaption.Height());
}

BOOL CFolderListPopupWnd::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 104 of file FolderListPopupWnd.cpp.

{
  switch (pMsg->message)
  {
  case WM_KEYDOWN:
    if (pMsg->wParam == VK_ESCAPE)
    {
      CloseMe();
      return TRUE;
    }
    break;
  }

  return CWnd::PreTranslateMessage(pMsg);
}

Member Data Documentation

BOOL CFolderListPopupWnd::m_bNotify [protected]

Definition at line 36 of file FolderListPopupWnd.h.

CMFCButton CFolderListPopupWnd::m_btnPin [protected]

Definition at line 31 of file FolderListPopupWnd.h.

CWorkspaceObj* CFolderListPopupWnd::m_pSelWorkSpace [protected]

Definition at line 29 of file FolderListPopupWnd.h.

CRect CFolderListPopupWnd::m_rectCaption [protected]

Definition at line 33 of file FolderListPopupWnd.h.

CString CFolderListPopupWnd::m_strCaption [protected]

Definition at line 34 of file FolderListPopupWnd.h.

CString CFolderListPopupWnd::m_strClassName [static, protected]

Definition at line 27 of file FolderListPopupWnd.h.

CFoldersTree CFolderListPopupWnd::m_wndFolders [protected]

Definition at line 28 of file FolderListPopupWnd.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/FolderListPopupWnd.h
  • vc2008fp/OutlookDemo/FolderListPopupWnd.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFoldersTree Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CFoldersTree Class Reference

#include "FoldersTree.h"

List of all members.

Public Member Functions

CFoldersTree (const CObList &lstWorkspaces, CImageList &images)
virtual | ~CFoldersTree ()
BOOL | SelectWorkspace (CWorkspaceObj *pWS)

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Attributes

CImageList & | m_images
CMap< CWorkspaceObj
*, CWorkspaceObj *, HTREEITEM,
HTREEITEM > 		m_Items
const CObList & | m_lstWorkspaces
CTreeCtrl | m_wndFolders

Detailed Description

Definition at line 17 of file FoldersTree.h.

Constructor & Destructor Documentation

CFoldersTree::CFoldersTree | ( | const CObList & | lstWorkspaces,
 |  | CImageList & | images
 | ) |  |

Definition at line 24 of file FoldersTree.cpp.

                                                                           : m_lstWorkspaces(lstWorkspaces), m_images(images)
{
}

CFoldersTree::~CFoldersTree ( ) [virtual]

Definition at line 28 of file FoldersTree.cpp.

{
}

Member Function Documentation

int CFoldersTree::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 45 of file FoldersTree.cpp.

{
  if (CTreeCtrl::OnCreate(lpCreateStruct) == -1)
    return -1;

  SetImageList(&m_images, TVSIL_NORMAL);

  // Fill folders tree:
  HTREEITEM htreeRoot = NULL;

  for (POSITION pos = m_lstWorkspaces.GetHeadPosition(); pos != NULL;)
  {
    CWorkspaceObj* pWS = (CWorkspaceObj*) m_lstWorkspaces.GetNext(pos);
    ASSERT_VALID(pWS);

    HTREEITEM hItem = InsertItem(pWS->m_strName, pWS->m_iIconIndex, pWS->m_iIconIndex);
    SetItemData(hItem, (DWORD_PTR) pWS);

    m_Items.SetAt(pWS, hItem);

    if (htreeRoot == NULL)
    {
      htreeRoot = hItem;
    }
  }

  if (htreeRoot)
  {
    Expand(htreeRoot, TVE_EXPAND);
  }

  return 0;
}

BOOL CFoldersTree::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 39 of file FoldersTree.cpp.

{
  cs.style |= WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | TVS_HASLINES | TVS_HASBUTTONS | TVS_DISABLEDRAGDROP | TVS_LINESATROOT | TVS_SHOWSELALWAYS;
  return CTreeCtrl::PreCreateWindow(cs);
}

BOOL CFoldersTree::SelectWorkspace ( CWorkspaceObj * pWS )

Definition at line 79 of file FoldersTree.cpp.

{
  ASSERT_VALID(pWS);

  HTREEITEM hItem;
  if (!m_Items.Lookup(pWS, hItem))
  {
    ASSERT(FALSE);
    return FALSE;
  }

  SelectItem(hItem);
  EnsureVisible(hItem);
  return TRUE;
}

Member Data Documentation

CImageList& CFoldersTree::m_images [protected]

Definition at line 27 of file FoldersTree.h.

CMap<CWorkspaceObj*, CWorkspaceObj*, HTREEITEM, HTREEITEM> CFoldersTree::m_Items [protected]

Definition at line 29 of file FoldersTree.h.

const CObList& CFoldersTree::m_lstWorkspaces [protected]

Definition at line 26 of file FoldersTree.h.

CTreeCtrl CFoldersTree::m_wndFolders [protected]

Definition at line 25 of file FoldersTree.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/FoldersTree.h
  • vc2008fp/OutlookDemo/FoldersTree.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFontComboBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

CFontComboBox Class Reference

#include "formatba.h"

Inherits CLocalComboBox.

List of all members.

Public Member Functions

CFontComboBox ()
void | AddFont (ENUMLOGFONT *pelf, DWORD dwType, LPCTSTR lpszScript=NULL)
virtual int | CompareItem (LPCOMPAREITEMSTRUCT lpCIS)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDIS)
void | EmptyContents ()
void | EnumFontFamiliesEx (CDC &dc, BYTE nCharSet=DEFAULT_CHARSET)
void | MatchFont (LPCTSTR lpszName, BYTE nCharSet)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMIS)
afx_msg void | OnDestroy ()

Static Public Member Functions

static BOOL CALLBACK AFX_EXPORT | EnumFamPrinterCallBack (ENUMLOGFONT *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis)
static BOOL CALLBACK AFX_EXPORT | EnumFamPrinterCallBackEx (ENUMLOGFONTEX *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis)
static BOOL CALLBACK AFX_EXPORT | EnumFamScreenCallBack (ENUMLOGFONT *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis)
static BOOL CALLBACK AFX_EXPORT | EnumFamScreenCallBackEx (ENUMLOGFONTEX *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis)

Public Attributes

CBitmap | m_bmFontType

Detailed Description

Definition at line 68 of file formatba.h.

Constructor & Destructor Documentation

CFontComboBox::CFontComboBox ( )

Definition at line 317 of file formatba.cpp.

{
  VERIFY(m_bmFontType.LoadBitmap(IDB_FONTTYPE));
}

Member Function Documentation

void CFontComboBox::AddFont | ( | ENUMLOGFONT * | pelf,
 |  | DWORD | dwType,
 |  | LPCTSTR | lpszScript = NULL
 | ) |  |

Definition at line 422 of file formatba.cpp.

{
  LOGFONT& lf = pelf->elfLogFont;
  if (lf.lfCharSet == MAC_CHARSET) // don't put in MAC fonts, commdlg doesn't either
    return;
  // Don't display vertical font for FE platform
  if ((GetSystemMetrics(SM_DBCSENABLED)) && (lf.lfFaceName[0] == '@'))
    return;
  // don't put in non-printer raster fonts
  CFontDesc* pDesc = new CFontDesc(lf.lfFaceName, lpszScript,
    lf.lfCharSet, lf.lfPitchAndFamily, dwType);
  m_arrayFontDesc.Add(pDesc);
}

int CFontComboBox::CompareItem ( LPCOMPAREITEMSTRUCT lpCIS ) [virtual]

Definition at line 538 of file formatba.cpp.

{
  ASSERT(lpCIS->CtlType == ODT_COMBOBOX);
  int id1 = (int)(WORD)lpCIS->itemID1;
  int id2 = (int)(WORD)lpCIS->itemID2;
  CString str1,str2;
  if (id1 == -1)
    return -1;
  if (id2 == -1)
    return 1;
  GetLBText(id1, str1);
  GetLBText(id2, str2);
  return str1.Collate(str2);
}

void CFontComboBox::DrawItem ( LPDRAWITEMSTRUCT lpDIS ) [virtual]

Definition at line 482 of file formatba.cpp.

{
  ASSERT(lpDIS->CtlType == ODT_COMBOBOX);
  int id = (int)(WORD)lpDIS->itemID;

  CDC *pDC = CDC::FromHandle(lpDIS->hDC);
  CRect rc(lpDIS->rcItem);
  if (lpDIS->itemState & ODS_FOCUS)
    pDC->DrawFocusRect(rc);
  int nIndexDC = pDC->SaveDC();

  CBrush brushFill;
  if (lpDIS->itemState & ODS_SELECTED)
  {
    brushFill.CreateSolidBrush(::GetSysColor(COLOR_HIGHLIGHT));
    pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));
  }
  else
    brushFill.CreateSolidBrush(pDC->GetBkColor());
  pDC->SetBkMode(TRANSPARENT);
  pDC->FillRect(rc, &brushFill);

  CFontDesc* pDesc= (CFontDesc*)lpDIS->itemData;
  ENSURE(pDesc != NULL);
  DWORD dwData = pDesc->m_dwFlags;
  if (dwData & (TT_FONT|DEVICE_FONT)) // truetype or device flag set by SetItemData
  {
    CDC dc;
    dc.CreateCompatibleDC(pDC);
    CBitmap* pBitmap = dc.SelectObject(&m_bmFontType);
    if (dwData & TT_FONT)
      pDC->BitBlt(rc.left, rc.top, BMW, BMH, &dc, BMW, 0, SRCAND);
    else // DEVICE_FONT
      pDC->BitBlt(rc.left, rc.top, BMW, BMH, &dc, 0, 0, SRCAND);
    dc.SelectObject(pBitmap);
  }

  rc.left += BMW + 6;
  CString strText;
  GetLBText(id, strText);
  pDC->TextOut(rc.left,rc.top,strText,strText.GetLength());

  pDC->RestoreDC(nIndexDC);
}

void CFontComboBox::EmptyContents ( )

Definition at line 329 of file formatba.cpp.

{
  // destroy all the CFontDesc's
  int nCount = GetCount();
  for (int i=0;i<nCount;i++)
    delete (CFontDesc*)GetItemData(i);
}

BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamPrinterCallBack | ( | ENUMLOGFONT * | pelf,
 |  | NEWTEXTMETRICEX * | ,
 |  | int | FontType,
 |  | LPVOID | pThis |
 | ) |  |  | [static]

Definition at line 447 of file formatba.cpp.

{
  DWORD dwData = PRINTER_FONT;
  if (FontType & TRUETYPE_FONTTYPE)
    dwData |= TT_FONT;
  else if (FontType & DEVICE_FONTTYPE)
    dwData |= DEVICE_FONT;
  ((CFontComboBox *)pThis)->AddFont(pelf, dwData);
  return 1;
}

BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamPrinterCallBackEx | ( | ENUMLOGFONTEX * | pelf,
 |  | NEWTEXTMETRICEX * | ,
 |  | int | FontType,
 |  | LPVOID | pThis |
 | ) |  |  | [static]

Definition at line 470 of file formatba.cpp.

{
  DWORD dwData = PRINTER_FONT;
  if (FontType & TRUETYPE_FONTTYPE)
    dwData |= TT_FONT;
  else if (FontType & DEVICE_FONTTYPE)
    dwData |= DEVICE_FONT;
  ((CFontComboBox *)pThis)->AddFont((ENUMLOGFONT*)pelf, dwData, CString(pelf->elfScript));
  return 1;
}

BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamScreenCallBack | ( | ENUMLOGFONT * | pelf,
 |  | NEWTEXTMETRICEX * | ,
 |  | int | FontType,
 |  | LPVOID | pThis |
 | ) |  |  | [static]

Definition at line 436 of file formatba.cpp.

{
  // don't put in non-printer raster fonts
  if (FontType & RASTER_FONTTYPE)
    return 1;
  DWORD dwData = (FontType & TRUETYPE_FONTTYPE) ? TT_FONT : 0;
  ((CFontComboBox *)pThis)->AddFont(pelf, dwData);
  return 1;
}

BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamScreenCallBackEx | ( | ENUMLOGFONTEX * | pelf,
 |  | NEWTEXTMETRICEX * | ,
 |  | int | FontType,
 |  | LPVOID | pThis |
 | ) |  |  | [static]

Definition at line 459 of file formatba.cpp.

{
  // don't put in non-printer raster fonts
  if (FontType & RASTER_FONTTYPE)
    return 1;
  DWORD dwData = (FontType & TRUETYPE_FONTTYPE) ? TT_FONT : 0;
  ((CFontComboBox *)pThis)->AddFont((ENUMLOGFONT*)pelf, dwData, CString(pelf->elfScript));
  return 1;
}

void CFontComboBox::EnumFontFamiliesEx | ( | CDC & | dc,
 |  | BYTE | nCharSet = DEFAULT_CHARSET
 | ) |  |

Definition at line 337 of file formatba.cpp.

{
  CMapStringToPtr map;
  CString str;
  GetTheText(str);

  EmptyContents();
  ResetContent();
  LOGFONT lf;
  memset(&lf, 0, sizeof(LOGFONT));
  lf.lfCharSet = nCharSet;

  if (dc.m_hDC != NULL)
  {
    if (theApp.m_bWin4)
    {
            ::EnumFontFamiliesEx(dc.m_hDC, &lf,
        (FONTENUMPROC) EnumFamPrinterCallBackEx, (LPARAM) this, NULL);
    }
    else
    {
      ::EnumFontFamilies(dc.m_hDC, NULL,
        (FONTENUMPROC) EnumFamPrinterCallBack, (LPARAM) this);
    }
  }
  else
  {
    HDC hDC = theApp.m_dcScreen.m_hDC;
    ASSERT(hDC != NULL);
    if (theApp.m_bWin4)
    {
            ::EnumFontFamiliesEx(hDC, &lf,
        (FONTENUMPROC) EnumFamScreenCallBackEx, (LPARAM) this, NULL);
    }
    else
    {
      ::EnumFontFamilies(hDC, NULL,
        (FONTENUMPROC) EnumFamScreenCallBack, (LPARAM) this);
    }
  }
  // now walk through the fonts and remove (charset) from fonts with only one

  INT_PTR nCount = m_arrayFontDesc.GetSize();
  // walk through fonts adding names to string map
  // first time add value 0, after that add value 1
  INT_PTR i;
  for (i = 0; i<nCount;i++)
  {
    CFontDesc* pDesc = (CFontDesc*)m_arrayFontDesc[i];
    void* pv = NULL;
    if (map.Lookup(pDesc->m_strName, pv)) // found it
    {
      if (pv == NULL) // only one entry so far
      {
        map.RemoveKey(pDesc->m_strName);
        map.SetAt(pDesc->m_strName, (void*)1);
      }
    }
    else // not found
      map.SetAt(pDesc->m_strName, (void*)0);
  }

  for (i = 0; i<nCount;i++)
  {
    CFontDesc* pDesc = (CFontDesc*)m_arrayFontDesc[i];
    CString myStr = pDesc->m_strName;
    void* pv = NULL;
    VERIFY(map.Lookup(myStr, pv));
    if (pv != NULL && !pDesc->m_strScript.IsEmpty())
    {
      myStr += " (";
      myStr += pDesc->m_strScript;
      myStr += ")";
    }

    int nIndex = AddString(myStr);
    ASSERT(nIndex >=0);
    if (nIndex >=0) //no error
      SetItemData(nIndex, (DWORD_PTR)pDesc);
  }

  SetTheText(str);
  m_arrayFontDesc.RemoveAll();
}

void CFontComboBox::MatchFont | ( | LPCTSTR | lpszName,
 |  | BYTE | nCharSet
 | ) |  |

Definition at line 554 of file formatba.cpp.

{
  int nFirstIndex = FindString(-1, lpszName);
  if (nFirstIndex != CB_ERR)
  {
    int nIndex = nFirstIndex;
    do
    {
      CFontDesc* pDesc = (CFontDesc*)GetItemData(nIndex);
      ENSURE(pDesc != NULL);
      // check the actual font name to avoid matching Courier western
      // to Courier New western
      if ((nCharSet == DEFAULT_CHARSET || pDesc->m_nCharSet == nCharSet) &&
        lstrcmp(lpszName, pDesc->m_strName)==0)
      {
        //got a match
        if (GetCurSel() != nIndex)
          SetCurSel(nIndex);
        return;
      }
      nIndex = FindString(nIndex, lpszName);
    } while (nIndex != nFirstIndex);
    // loop until found or back to first item again
  }
  //enter font name
  SetTheText(lpszName, TRUE);
}

void CFontComboBox::MeasureItem ( LPMEASUREITEMSTRUCT lpMIS ) [virtual]

Definition at line 527 of file formatba.cpp.

{
  ASSERT(lpMIS->CtlType == ODT_COMBOBOX);
  ASSERT(m_nFontHeight > 0);
  CRect rc;

  GetWindowRect(&rc);
  lpMIS->itemWidth = rc.Width();
  lpMIS->itemHeight = max(BMH, m_nFontHeight);
}

void CFontComboBox::OnDestroy ( void )

Definition at line 322 of file formatba.cpp.

{
  // destroy all the CFontDesc's
  EmptyContents();
  CLocalComboBox::OnDestroy();
}

Member Data Documentation

CBitmap CFontComboBox::m_bmFontType

Definition at line 74 of file formatba.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/formatba.h
  • ole/wordpad/formatba.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFontDesc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CFontDesc Class Reference

List of all members.

Public Member Functions

CFontDesc (LPCTSTR lpszName, LPCTSTR lpszScript, BYTE nCharSet, BYTE nPitchAndFamily, DWORD dwFlags)

Public Attributes

DWORD | m_dwFlags
BYTE | m_nCharSet
BYTE | m_nPitchAndFamily
CString | m_strName
CString | m_strScript

Detailed Description

Definition at line 37 of file formatba.cpp.

Constructor & Destructor Documentation

CFontDesc::CFontDesc | ( | LPCTSTR | lpszName,
 |  | LPCTSTR | lpszScript,
 |  | BYTE | nCharSet,
 |  | BYTE | nPitchAndFamily,
 |  | DWORD | dwFlags
 | ) |  |

Definition at line 49 of file formatba.cpp.

{
  m_strName = lpszName;
  m_strScript = lpszScript;
  m_nCharSet = nCharSet;
  m_nPitchAndFamily = nPitchAndFamily;
  m_dwFlags = dwFlags;
}

Member Data Documentation

DWORD CFontDesc::m_dwFlags

Definition at line 46 of file formatba.cpp.

BYTE CFontDesc::m_nCharSet

Definition at line 44 of file formatba.cpp.

BYTE CFontDesc::m_nPitchAndFamily

Definition at line 45 of file formatba.cpp.

CString CFontDesc::m_strName

Definition at line 42 of file formatba.cpp.

CString CFontDesc::m_strScript

Definition at line 43 of file formatba.cpp.

The documentation for this class was generated from the following file:
  • ole/wordpad/formatba.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFormatBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CFormatBar Class Reference

#include "formatba.h"

List of all members.

Public Member Functions

CFormatBar ()
CFormatBar ()
CMFCToolBarMenuButton * | CreateBorderTypeButton ()
CMFCColorMenuButton * | CreateColorButton ()
CMFCToolBarFontComboBox * | CreateFontComboButton ()
void | NotifyOwner (UINT nCode)
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
void | PositionCombos ()
void | SyncToView ()

Public Attributes

CFontComboBox m_comboFontName
CSizeComboBox m_comboFontSize
CDC | m_dcPrinter
CSize | m_szBaseUnits

Protected Member Functions

afx_msg void | OnComboCloseUp ()
afx_msg void | OnComboSetFocus ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnFontNameKillFocus ()
afx_msg void | OnFontSizeDropDown ()
afx_msg void | OnFontSizeKillFocus ()
afx_msg LONG_PTR | OnPrinterChanged (UINT_PTR, LONG_PTR)
virtual void | OnReset ()
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
void | SetCharFormat (CCharFormat &cf)

Protected Attributes

int | m_nNumColours
CPalette | m_palColorPicker

Detailed Description

Definition at line 126 of file formatba.h.

Constructor & Destructor Documentation

CFormatBar::CFormatBar ( )

Definition at line 88 of file formatba.cpp.

{
  CFont fnt;
  fnt.Attach(GetStockObject(theApp.m_nDefFont));
  m_szBaseUnits = GetBaseUnits(&fnt);
  CLocalComboBox::m_nFontHeight = m_szBaseUnits.cy;
}

CFormatBar::CFormatBar ( )

Member Function Documentation

CMFCToolBarMenuButton * CFormatBar::CreateBorderTypeButton ( )

Definition at line 285 of file formatba.cpp.

{
  CMenu menu;
  VERIFY(menu.LoadMenu (IDR_BORDER_PALETTE));

  CMFCToolBarMenuButton* pBorderType = NULL;
  CMenu* pPopup = menu.GetSubMenu(0);
  ASSERT(pPopup != NULL);
  if (pPopup != NULL)
  {
    pBorderType = new CMFCToolBarMenuButton (ID_BORDER_1, pPopup->GetSafeHmenu (), GetCmdMgr ()->GetCmdImage  (ID_BORDER_1, FALSE), _T("Borders"));
    pBorderType->SetMenuPaletteMode (TRUE, 2 /* Rows number */);
    pBorderType->SetTearOff (ID_BORDER_TEAROFF);
  }

  return pBorderType;
}

CMFCColorMenuButton * CFormatBar::CreateColorButton ( )

Definition at line 236 of file formatba.cpp.

{
  if (m_palColorPicker.GetSafeHandle () == NULL)
  {
    m_nNumColours = sizeof (crColours)/sizeof(ColourTableEntry);
    ASSERT(m_nNumColours <= MAX_COLOURS);
    if (m_nNumColours > MAX_COLOURS)
      m_nNumColours = MAX_COLOURS;

    // Create the palette
    struct
    {
      LOGPALETTE    LogPalette;
      PALETTEENTRY  PalEntry[MAX_COLOURS];
    }pal;

    LOGPALETTE* pLogPalette = (LOGPALETTE*) &pal;
    pLogPalette->palVersion    = 0x300;
    pLogPalette->palNumEntries = (WORD) m_nNumColours;

    for (int i = 0; i < m_nNumColours; i++)
    {
      pLogPalette->palPalEntry[i].peRed   = GetRValue(crColours[i].crColour);
      pLogPalette->palPalEntry[i].peGreen = GetGValue(crColours[i].crColour);
      pLogPalette->palPalEntry[i].peBlue  = GetBValue(crColours[i].crColour);
      pLogPalette->palPalEntry[i].peFlags = 0;
    }

    m_palColorPicker.CreatePalette (pLogPalette);
  }

  CMFCColorMenuButton* pColorButton = new
    CMFCColorMenuButton (ID_CHAR_COLOR, _T("Text Color..."), &m_palColorPicker);

  pColorButton->EnableAutomaticButton (_T("Automatic"), RGB (0, 0, 0));
  pColorButton->EnableOtherButton (_T("More Colors..."));
  pColorButton->EnableDocumentColors (_T("Document's Colors"));
  pColorButton->SetColumnsNumber (8);
  pColorButton->EnableTearOff (ID_COLOR_TEAROFF, 5, 2);

  // Initialize color names:
  for (int i = 0; i < m_nNumColours; i++)
  {
    CMFCColorMenuButton::SetColorName (crColours[i].crColour, crColours[i].szName);
  }

  return pColorButton;
}

CMFCToolBarFontComboBox * CFormatBar::CreateFontComboButton ( )

Definition at line 169 of file formatba.cpp.

{
  return new CMFCToolBarFontComboBox (IDC_FONTNAME,
    GetCmdMgr ()->GetCmdImage  (IDC_FONTNAME, FALSE),
    TRUETYPE_FONTTYPE | DEVICE_FONTTYPE,
    DEFAULT_CHARSET,
    WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWN |
    CBS_AUTOHSCROLL | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED,
    (3*LF_FACESIZE*m_szBaseUnits.cx)/2);
}

void CFormatBar::NotifyOwner ( UINT nCode )

Definition at line 786 of file formatba.cpp.

{
  NMHDR nm;
  nm.hwndFrom = m_hWnd;
  nm.idFrom = GetDlgCtrlID();
  nm.code = nCode;
  GetOwner()->SendMessage(WM_NOTIFY, nm.idFrom, (LPARAM)&nm);
}

void CFormatBar::OnComboCloseUp ( ) [protected]

Definition at line 160 of file formatba.cpp.

{
  NotifyOwner(NM_RETURN);
}

void CFormatBar::OnComboSetFocus ( ) [protected]

Definition at line 165 of file formatba.cpp.

{
  NotifyOwner(NM_SETFOCUS);
}

int CFormatBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 243 of file formatba.cpp.

{
  if (CToolBar::OnCreate(lpCreateStruct) == -1)
    return -1;

  theApp.m_listPrinterNotify.AddTail(m_hWnd);

  CRect rect(0,0, (3*LF_FACESIZE*m_szBaseUnits.cx)/2, 200);
  if (!m_comboFontName.Create(WS_TABSTOP|WS_VISIBLE|WS_TABSTOP|
    WS_VSCROLL|CBS_DROPDOWN|CBS_SORT|CBS_AUTOHSCROLL|CBS_HASSTRINGS|
    CBS_OWNERDRAWFIXED, rect, this, IDC_FONTNAME))
  {
    TRACE0("Failed to create fontname combo-box\n");
    return -1;
  }
  m_comboFontName.LimitText(LF_FACESIZE);

  rect.SetRect(0, 0, 10*m_szBaseUnits.cx, 200);
  if (!m_comboFontSize.Create(WS_TABSTOP|WS_VISIBLE|WS_TABSTOP|
    WS_VSCROLL|CBS_DROPDOWN, rect, this, IDC_FONTSIZE))
  {
    TRACE0("Failed to create fontsize combo-box\n");
    return -1;
  }

  m_comboFontSize.LimitText(4);
  m_comboFontName.EnumFontFamiliesEx(m_dcPrinter);

  return 0;
}

void CFormatBar::OnDestroy ( void ) [protected]

Definition at line 274 of file formatba.cpp.

{
  CToolBar::OnDestroy();
  POSITION pos = theApp.m_listPrinterNotify.Find(m_hWnd);
  ASSERT(pos != NULL);
  theApp.m_listPrinterNotify.RemoveAt(pos);
}

void CFormatBar::OnFontNameKillFocus ( ) [protected]

Definition at line 170 of file formatba.cpp.

{
  USES_CONVERSION;
  // get the current font from the view and update
  NotifyOwner(NM_KILLFOCUS);

  CCharFormat cf;
  cf.szFaceName[0] = NULL;

  // this will retrieve the font entered in the edit control
  // it tries to match the font to something already present in the combo box
  // this effectively ignores case of a font the user enters
  // if a user enters arial, this will cause it to become Arial
  CString str;
  m_comboFontName.GetTheText(str);    // returns "arial"
  m_comboFontName.SetTheText(str);                    // selects "Arial"
  m_comboFontName.GetTheText(str);    // returns "Arial"

  // if font name box is not empty
  if (str[0] != NULL)
  {
    cf.dwMask = CFM_FACE | CFM_CHARSET;
    int nIndex = m_comboFontName.FindStringExact(-1, str);
    if (nIndex != CB_ERR)
    {
      CFontDesc* pDesc = (CFontDesc*)m_comboFontName.GetItemData(nIndex);
      ENSURE(pDesc != NULL);
      ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);
      _tcsncpy_s(cf.szFaceName, LF_FACESIZE, pDesc->m_strName, _TRUNCATE);
      cf.bCharSet = pDesc->m_nCharSet;
      cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;
    }
    else // unknown font
    {
      ASSERT(str.GetLength() < LF_FACESIZE);
      _tcsncpy_s(cf.szFaceName, LF_FACESIZE, str, _TRUNCATE);
      cf.bCharSet = DEFAULT_CHARSET;
      cf.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
    }
    SetCharFormat(cf);
  }
}

void CFormatBar::OnFontSizeDropDown ( ) [protected]

Definition at line 126 of file formatba.cpp.

{
  CString str;
  m_comboFontName.GetTheText(str);
  LPCTSTR lpszName = NULL;
  BOOL bPrinterFont = FALSE;
  int nIndex = m_comboFontName.FindStringExact(-1, str);
  if (nIndex != CB_ERR)
  {
    CFontDesc* pDesc = (CFontDesc*)m_comboFontName.GetItemData(nIndex);
    ENSURE(pDesc != NULL);
    bPrinterFont = pDesc->m_dwFlags & PRINTER_FONT;
    lpszName = pDesc->m_strName;
  }

  int nSize = m_comboFontSize.GetTwipSize();
  if (nSize == -2) // error
  {
    AfxMessageBox(IDS_INVALID_NUMBER, MB_OK|MB_ICONINFORMATION);
    nSize = m_comboFontSize.m_nTwipsLast;
  }
  else if ((nSize >= 0 && nSize < 20) || nSize > 32760)
  {
    AfxMessageBox(IDS_INVALID_FONTSIZE, MB_OK|MB_ICONINFORMATION);
    nSize = m_comboFontSize.m_nTwipsLast;
  }

  if (bPrinterFont)
    m_comboFontSize.EnumFontSizes(m_dcPrinter, lpszName);
  else
    m_comboFontSize.EnumFontSizes(theApp.m_dcScreen, lpszName);
  m_comboFontSize.SetTwipSize(nSize);
}

void CFormatBar::OnFontSizeKillFocus ( ) [protected]

Definition at line 213 of file formatba.cpp.

{
  NotifyOwner(NM_KILLFOCUS);
  int nSize = m_comboFontSize.GetTwipSize();
  if (nSize == -2)
  {
    AfxMessageBox(IDS_INVALID_NUMBER, MB_OK|MB_ICONINFORMATION);
    nSize = m_comboFontSize.m_nTwipsLast;
  }
  else if ((nSize >= 0 && nSize < 20) || nSize > 32760)
  {
    AfxMessageBox(IDS_INVALID_FONTSIZE, MB_OK|MB_ICONINFORMATION);
    nSize = m_comboFontSize.m_nTwipsLast;
  }
  else if (nSize > 0)
  {
    CCharFormat cf;
    cf.dwMask = CFM_SIZE;
    cf.yHeight = nSize;
    SetCharFormat(cf);
  }
}

LONG_PTR CFormatBar::OnPrinterChanged | ( | UINT_PTR | ,
 |  | LONG_PTR |  |
 | ) |  |  | [protected]

Definition at line 236 of file formatba.cpp.

{
  theApp.CreatePrinterDC(m_dcPrinter);
  m_comboFontName.EnumFontFamiliesEx(m_dcPrinter);
  return 0;
}

void CFormatBar::OnReset ( ) [protected, virtual]

Definition at line 61 of file formatba.cpp.

{
  // Insert font name combo:
  CMFCToolBarFontComboBox* pFontButton = CreateFontComboButton ();
  ASSERT_VALID (pFontButton);

  int iIndex = CommandToIndex (IDC_FONTNAME);
  RemoveButton (iIndex);

  if (iIndex > GetCount ())
  {
    iIndex = GetCount ();
  }

  InsertButton (*pFontButton, iIndex);
  delete pFontButton;

  // Insert font size combo:
  CMFCToolBarFontSizeComboBox comboButtonFontSize (IDC_FONTSIZE,
    GetCmdMgr ()->GetCmdImage  (IDC_FONTSIZE, FALSE),
    WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWN,
    10*m_szBaseUnits.cx + 10);

  iIndex = CommandToIndex (IDC_FONTSIZE);
  RemoveButton (iIndex);

  if (iIndex > GetCount ())
  {
    iIndex = GetCount ();
  }

  InsertButton (comboButtonFontSize, iIndex);

  // Insert the color menu button:
  CMFCColorMenuButton* pColorButton = CreateColorButton ();
  ReplaceButton (ID_CHAR_COLOR, *pColorButton);
  delete pColorButton;

  // Insert border type button:
  CMFCToolBarMenuButton* pBorderTypeButton = CreateBorderTypeButton ();
  ReplaceButton (ID_BORDER_1, *pBorderTypeButton);
  delete pBorderTypeButton;
}

void CFormatBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [protected, virtual]

Definition at line 96 of file formatba.cpp.

{
  CToolBar::OnUpdateCmdUI(pTarget, bDisableIfNoHndler);
  // don't update combo boxes if either one has the focus
  if (!m_comboFontName.HasFocus() && !m_comboFontSize.HasFocus())
    SyncToView();
}

virtual void CFormatBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [virtual]
void CFormatBar::PositionCombos ( )

Definition at line 282 of file formatba.cpp.

{
  CRect rect;
  // make font name box same size as font size box
  // this is necessary since font name box is owner draw
  m_comboFontName.SetItemHeight(-1, m_comboFontSize.GetItemHeight(-1));

  m_comboFontName.GetWindowRect(&rect);
  int nHeight = rect.Height();

  m_comboFontName.GetWindowRect(&rect);
  SetButtonInfo(0, IDC_FONTNAME, TBBS_SEPARATOR, rect.Width());
  GetItemRect(0, &rect); // FontName ComboBox
  m_comboFontName.SetWindowPos(NULL, rect.left,
    ((rect.Height() - nHeight) / 2) + rect.top, 0, 0,
    SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE);

  m_comboFontSize.GetWindowRect(&rect);
  SetButtonInfo(2, IDC_FONTSIZE, TBBS_SEPARATOR, rect.Width());
  GetItemRect(2, &rect); // FontSize ComboBox
  m_comboFontSize.SetWindowPos(NULL, rect.left,
    ((rect.Height() - nHeight) / 2) + rect.top, 0, 0,
    SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE);
}

void CFormatBar::SetCharFormat ( CCharFormat & cf ) [protected]

Definition at line 795 of file formatba.cpp.

{
  CHARHDR fnm;
  fnm.hwndFrom = m_hWnd;
  fnm.idFrom = GetDlgCtrlID();
  fnm.code = FN_SETFORMAT;
  fnm.cf = cf;
  VERIFY(GetOwner()->SendMessage(WM_NOTIFY, fnm.idFrom, (LPARAM)&fnm));
}

void CFormatBar::SyncToView ( )

Definition at line 104 of file formatba.cpp.

{
  USES_CONVERSION;
  // get the current font from the view and update
  CHARHDR fh;
  CHARFORMAT& cf = fh.cf;
  fh.hwndFrom = m_hWnd;
  fh.idFrom = GetDlgCtrlID();
  fh.code = FN_GETFORMAT;
  VERIFY(GetOwner()->SendMessage(WM_NOTIFY, fh.idFrom, (LPARAM)&fh));

  // the selection must be same font and charset to display correctly
  if ((cf.dwMask & (CFM_FACE|CFM_CHARSET)) == (CFM_FACE|CFM_CHARSET))
    m_comboFontName.MatchFont(cf.szFaceName, cf.bCharSet);
  else
    m_comboFontName.SetTheText(_T(""));

  // SetTwipSize only updates if different
  // -1 means selection is not a single point size
  m_comboFontSize.SetTwipSize( (cf.dwMask & CFM_SIZE) ? cf.yHeight : -1);
}

Member Data Documentation

CFontComboBox CFormatBar::m_comboFontName

Definition at line 141 of file formatba.h.

CSizeComboBox CFormatBar::m_comboFontSize

Definition at line 142 of file formatba.h.

CDC CFormatBar::m_dcPrinter

Definition at line 139 of file formatba.h.

int CFormatBar::m_nNumColours [protected]

Definition at line 41 of file formatba.h.

CPalette CFormatBar::m_palColorPicker [protected]

Definition at line 40 of file formatba.h.

CSize CFormatBar::m_szBaseUnits

Definition at line 140 of file formatba.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/formatba.h
  • vc2008fp/WordPad/formatba.h
  • ole/wordpad/formatba.cpp
  • vc2008fp/WordPad/formatba.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFormatMenu Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CFormatMenu Class Reference

#include "HTMLEdView.h"

List of all members.

Public Member Functions

void | ClearStringArray ()
CStringArray & | GetStringArray ()

Private Attributes

CStringArray | m_sa

Detailed Description

Definition at line 24 of file HTMLEdView.h.

Member Function Documentation

void CFormatMenu::ClearStringArray ( ) [inline]

Definition at line 27 of file HTMLEdView.h.

  {
    m_sa.RemoveAll();
  }

CStringArray& CFormatMenu::GetStringArray ( ) [inline]

Definition at line 31 of file HTMLEdView.h.

{ return m_sa; }

Member Data Documentation

CStringArray CFormatMenu::m_sa [private]

Definition at line 33 of file HTMLEdView.h.

The documentation for this class was generated from the following file:
  • internet/HTMLEdit/HTMLEdView.h
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFormatParaDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Attributes

CFormatParaDlg Class Reference

#include "formatpa.h"

Inherits CCSDialog, and CCSDialog.

List of all members.

Public Types

enum | { IDD = IDD_FORMAT_PARA }
enum | { IDD = IDD_FORMAT_PARA }

Public Member Functions

CFormatParaDlg (PARAFORMAT2 &pf, CWnd *pParent=NULL)
CFormatParaDlg (WPD_PARAFORMAT &pf, CWnd *pParent=NULL)

Public Attributes

BOOL | m_bPageBreak
int | m_nAfter
int | m_nAlignment
int | m_nBefore
int | m_nFirst
int | m_nLeft
int | m_nRight
int | m_nWordWrap
WPD_PARAFORMAT | m_pf
PARAFORMAT2 | m_pf

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()
afx_msg void | OnDeltaposSpinAfter (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnDeltaposSpinBefore (NMHDR *pNMHDR, LRESULT *pResult)
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
virtual void | OnOK ()
virtual void | OnOK ()

Static Protected Attributes

static const DWORD | m_nHelpIDs []

Detailed Description

Definition at line 15 of file formatpa.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file formatpa.h.

{ IDD = IDD_FORMAT_PARA };

anonymous enum
Enumerator:
IDD

Definition at line 29 of file formatpa.h.

{ IDD = IDD_FORMAT_PARA };

Constructor & Destructor Documentation

CFormatParaDlg::CFormatParaDlg | ( | PARAFORMAT2 & | pf,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 47 of file formatpa.cpp.

  : CCSDialog(CFormatParaDlg::IDD, pParent)
{
  m_pf = pf;
  if (m_pf.dwMask & PFM_ALIGNMENT)
  {
    if (m_pf.wAlignment & PFA_LEFT && m_pf.wAlignment & PFA_RIGHT)
      m_nAlignment = 2;
    else
      m_nAlignment = (m_pf.wAlignment & PFA_LEFT) ? 0 : 1;
  }
  else
    m_nAlignment = -1;

  m_nAfter = m_pf.dySpaceAfter;
  m_nBefore = m_pf.dySpaceBefore;

  //{{AFX_DATA_INIT(CFormatParaDlg)
  m_nFirst = 0;
  m_nLeft = 0;
  m_nRight = 0;
  m_bPageBreak = FALSE;
  //}}AFX_DATA_INIT
}

CFormatParaDlg::CFormatParaDlg | ( | WPD_PARAFORMAT & | pf,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 39 of file formatpa.cpp.

  : CCSDialog(CFormatParaDlg::IDD, pParent)
{
  m_pf = pf;
  if (m_pf.dwMask & PFM_ALIGNMENT)
  {
    if (m_pf.wAlignment & PFA_LEFT && m_pf.wAlignment & PFA_RIGHT)
      m_nAlignment = 2;
    else
      m_nAlignment = (m_pf.wAlignment & PFA_LEFT) ? 0 : 1;
  }
  else
    m_nAlignment = -1;
  //{{AFX_DATA_INIT(CFormatParaDlg)
  m_nFirst = 0;
  m_nLeft = 0;
  m_nRight = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CFormatParaDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 72 of file formatpa.cpp.

{
  CCSDialog::DoDataExchange(pDX);

  // semi-custom formatting for "pt" in the value for
  // before- and after-paragraph spacing

  CString strBefore;
  CString strAfter;

  if (pDX->m_bSaveAndValidate)
  {
    GetDlgItemText(IDC_EDIT_BEFORE, strBefore);
    m_nBefore = _ttoi(strBefore);

    GetDlgItemText(IDC_EDIT_AFTER, strAfter);
    m_nAfter = _ttoi(strAfter);
  }

  strBefore = FormatAsPoints(m_nBefore);
  strAfter = FormatAsPoints(m_nAfter);

  DDX_Text(pDX, IDC_EDIT_AFTER, strAfter);
  DDX_Text(pDX, IDC_EDIT_BEFORE, strBefore);

  //{{AFX_DATA_MAP(CFormatParaDlg)
  DDX_CBIndex(pDX, IDC_COMBO_ALIGNMENT, m_nAlignment);
  DDX_Twips(pDX, IDC_EDIT_FIRST_LINE, m_nFirst);
  DDV_MinMaxTwips(pDX, m_nFirst, -31680, 31680);
  DDX_Twips(pDX, IDC_EDIT_LEFT, m_nLeft);
  DDV_MinMaxTwips(pDX, m_nLeft, -31680, 31680);
  DDX_Twips(pDX, IDC_EDIT_RIGHT, m_nRight);
  DDV_MinMaxTwips(pDX, m_nRight, -31680, 31680);
  DDX_Check(pDX, IDC_CHECK_PAGEBREAK, m_bPageBreak);
  //}}AFX_DATA_MAP
}

virtual void CFormatParaDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual const DWORD* CFormatParaDlg::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 40 of file formatpa.h.

{return m_nHelpIDs;}

virtual const DWORD* CFormatParaDlg::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 39 of file formatpa.h.

{return m_nHelpIDs;}

void CFormatParaDlg::OnDeltaposSpinAfter | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 201 of file formatpa.cpp.

{
  NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
  m_nAfter = pNMUpDown->iPos;
  *pResult = 0;
  UpdateData(FALSE);
}

void CFormatParaDlg::OnDeltaposSpinBefore | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 193 of file formatpa.cpp.

{
  NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
  m_nBefore = pNMUpDown->iPos;
  *pResult = 0;
  UpdateData(FALSE);
}

virtual BOOL CFormatParaDlg::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

BOOL CFormatParaDlg::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

Definition at line 153 of file formatpa.cpp.

{
  CComboBox* pBox = (CComboBox*)GetDlgItem(IDC_COMBO_ALIGNMENT);
  CString str;
  str.LoadString(IDS_LEFT);
  pBox->AddString(str);
  str.LoadString(IDS_RIGHT);
  pBox->AddString(str);
  str.LoadString(IDS_CENTER);
  pBox->AddString(str);

  if (m_nWordWrap == 0)
  {
    GetDlgItem(IDC_COMBO_ALIGNMENT)->EnableWindow(FALSE);
    GetDlgItem(IDC_TEXT_ALIGNMENT)->EnableWindow(FALSE);
  }

  m_bPageBreak = (m_pf.dwMask & PFM_PAGEBREAKBEFORE) &&
           (m_pf.wEffects & PFE_PAGEBREAKBEFORE);

  m_nRight = (m_pf.dwMask & PFM_RIGHTINDENT) ? m_pf.dxRightIndent : DDXM_BLANK;
  if (m_pf.dwMask & PFM_OFFSET)
  {
    m_nFirst = -m_pf.dxOffset;
    m_nLeft = (m_pf.dwMask & PFM_STARTINDENT) ?
      m_pf.dxStartIndent + m_pf.dxOffset : DDXM_BLANK;
  }
  else
    m_nLeft = m_nFirst = DDXM_BLANK;

  if (m_pf.dwMask & PFM_SPACEBEFORE)
    m_nBefore = m_pf.dySpaceBefore / 20;
  if (m_pf.dwMask & PFM_SPACEAFTER)
    m_nAfter = m_pf.dySpaceAfter / 20;

  CCSDialog::OnInitDialog();
  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

void CFormatParaDlg::OnOK ( ) [protected, virtual]

Definition at line 120 of file formatpa.cpp.

{
  CCSDialog::OnOK();
  m_pf.dwMask = 0;
  if (m_nAlignment >= 0)
  {
    ASSERT(m_nAlignment < 3);
    m_pf.dwMask |= PFM_ALIGNMENT;
    m_pf.wAlignment = (WORD)((m_nAlignment == 0) ? PFA_LEFT :
      (m_nAlignment == 1) ? PFA_RIGHT : PFA_CENTER);
  }
  if (m_nRight != DDXM_BLANK)
    m_pf.dwMask |= PFM_RIGHTINDENT;
  if (m_nLeft != DDXM_BLANK && m_nFirst != DDXM_BLANK)
    m_pf.dwMask |= PFM_STARTINDENT;
  if (m_nFirst != DDXM_BLANK)
    m_pf.dwMask |= PFM_OFFSET;

  if (m_bPageBreak)
  {
    m_pf.dwMask |= PFM_PAGEBREAKBEFORE;
    m_pf.wEffects |= PFE_PAGEBREAKBEFORE;
  }

  m_pf.dxRightIndent = m_nRight;
  m_pf.dxOffset = -m_nFirst;
  m_pf.dxStartIndent = m_nLeft + m_nFirst;

  m_pf.dwMask |= PFM_SPACEAFTER | PFM_SPACEBEFORE;
  m_pf.dySpaceBefore = m_nBefore * 20;
  m_pf.dySpaceAfter = m_nAfter * 20;
}

virtual void CFormatParaDlg::OnOK ( ) [protected, virtual]

Member Data Documentation

BOOL CFormatParaDlg::m_bPageBreak

Definition at line 32 of file formatpa.h.

int CFormatParaDlg::m_nAfter

Definition at line 33 of file formatpa.h.

int CFormatParaDlg::m_nAlignment

Definition at line 28 of file formatpa.h.

int CFormatParaDlg::m_nBefore

Definition at line 34 of file formatpa.h.

int CFormatParaDlg::m_nFirst

Definition at line 29 of file formatpa.h.

static const DWORD CFormatParaDlg::m_nHelpIDs [static, protected]
Initial value:
{
  IDC_EDIT_LEFT, IDH_WORDPAD_INDENT_LEFT,
  IDC_EDIT_RIGHT, IDH_WORDPAD_INDENT_RIGHT,
  IDC_EDIT_FIRST_LINE, IDH_WORDPAD_INDENT_FIRST,
  IDC_BOX, IDH_COMM_GROUPBOX,
  IDC_COMBO_ALIGNMENT, IDH_WORDPAD_ALIGN,
  IDC_TEXT_ALIGNMENT, IDH_WORDPAD_ALIGN,
  IDC_EDIT_BEFORE, IDH_WORDPAD_SPACE_BEFORE,
  IDC_EDIT_AFTER, IDH_WORDPAD_SPACE_AFTER,
  IDC_CHECK_PAGEBREAK, IDH_WORDPAD_PAGEBREAK,
  0, 0
}

Definition at line 39 of file formatpa.h.

int CFormatParaDlg::m_nLeft

Definition at line 30 of file formatpa.h.

int CFormatParaDlg::m_nRight

Definition at line 31 of file formatpa.h.

int CFormatParaDlg::m_nWordWrap

Definition at line 23 of file formatpa.h.

WPD_PARAFORMAT CFormatParaDlg::m_pf

Definition at line 22 of file formatpa.h.

PARAFORMAT2 CFormatParaDlg::m_pf

Definition at line 20 of file formatpa.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/formatpa.h
  • vc2008fp/WordPad/formatpa.h
  • ole/wordpad/formatpa.cpp
  • vc2008fp/WordPad/formatpa.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CFormatTabDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Attributes

CFormatTabDlg Class Reference

#include "formatta.h"

Inherits CCSDialog, and CCSDialog.

List of all members.

Public Types

enum | { IDD = IDD_FORMAT_TAB }
enum | { IDD = IDD_FORMAT_TAB }

Public Member Functions

CFormatTabDlg (PARAFORMAT2 &pf, CWnd *pParent=NULL)
CFormatTabDlg (WPD_PARAFORMAT &pf, CWnd *pParent=NULL)
~CFormatTabDlg ()
~CFormatTabDlg ()

Public Attributes

CButton | m_buttonClear
CButton | m_buttonClearAll
CButton | m_buttonSet
CComboBox | m_comboBox
int | m_nCount
WPD_PARAFORMAT | m_pf
PARAFORMAT2 | m_pf
LONG * | m_tabarray

Protected Member Functions

BOOL | AddTabToArray (LONG lTab)
BOOL | AddTabToArray (LONG lTab)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()
afx_msg void | OnClickedClear ()
afx_msg void | OnClickedClear ()
afx_msg void | OnClickedClearAll ()
afx_msg void | OnClickedClearAll ()
afx_msg void | OnClickedSet ()
afx_msg void | OnClickedSet ()
afx_msg void | OnEditChange ()
afx_msg void | OnEditChange ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
virtual void | OnOK ()
virtual void | OnOK ()
afx_msg void | OnSelchange ()
afx_msg void | OnSelchange ()
BOOL | RemoveTabFromArray (LONG lTab)
BOOL | RemoveTabFromArray (LONG lTab)
void | RemoveTabFromArrayByIndex (int nIndex)
void | RemoveTabFromArrayByIndex (int nIndex)
BOOL | Set ()
BOOL | Set ()
void | SetEditFocus ()
void | SetEditFocus ()
void | UpdateButton (CButton &button, BOOL b)
void | UpdateButton (CButton &button, BOOL b)
void | UpdateButtons ()
void | UpdateButtons ()
void | UpdateListBox ()
void | UpdateListBox ()

Static Protected Attributes

static const DWORD | m_nHelpIDs []

Detailed Description

Definition at line 15 of file formatta.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file formatta.h.

{ IDD = IDD_FORMAT_TAB };

anonymous enum
Enumerator:
IDD

Definition at line 29 of file formatta.h.

{ IDD = IDD_FORMAT_TAB };

Constructor & Destructor Documentation

CFormatTabDlg::CFormatTabDlg | ( | PARAFORMAT2 & | pf,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 36 of file formatta.cpp.

  : CCSDialog(CFormatTabDlg::IDD, pParent)
{
  m_pf = pf;
  m_tabarray = new LONG[MAX_TAB_STOPS];
  m_nCount = 0;
  if (m_pf.dwMask & PFM_TABSTOPS)
  {
    m_nCount = m_pf.cTabCount;
    ASSERT(m_pf.cTabCount <= MAX_TAB_STOPS);
    for (int i=0;i<m_pf.cTabCount;i++)
      m_tabarray[i] = m_pf.rgxTabs[i];
  }

  //{{AFX_DATA_INIT(CFormatTabDlg)
  //}}AFX_DATA_INIT
}

CFormatTabDlg::~CFormatTabDlg ( )

Definition at line 54 of file formatta.cpp.

{
  delete [] m_tabarray;
}

CFormatTabDlg::CFormatTabDlg | ( | WPD_PARAFORMAT & | pf,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 38 of file formatta.cpp.

  : CCSDialog(CFormatTabDlg::IDD, pParent)
{
  m_pf = pf;
  m_tabarray = new LONG[MAX_TAB_STOPS];
  m_nCount = 0;
  if (m_pf.dwMask & PFM_TABSTOPS)
  {
    m_nCount = m_pf.cTabCount;
    ASSERT(m_pf.cTabCount <= MAX_TAB_STOPS);
    for (int i=0;i<m_pf.cTabCount;i++)
      m_tabarray[i] = m_pf.rgxTabs[i];
  }

  //{{AFX_DATA_INIT(CFormatTabDlg)
  //}}AFX_DATA_INIT
}

CFormatTabDlg::~CFormatTabDlg ( )

Member Function Documentation

BOOL CFormatTabDlg::AddTabToArray ( LONG lTab ) [protected]

Definition at line 174 of file formatta.cpp.

{
  int i;
  BOOL bInsert = FALSE;
  LONG lTemp;
  for (i=0;i<m_nCount;i++)
  {
    if (!bInsert && lTab < m_tabarray[i])
      bInsert = TRUE;
    else if (lTab == m_tabarray[i]) // we don't want repeats
      return FALSE;
    if (bInsert)
    {
      lTemp = m_tabarray[i];
      m_tabarray[i] = lTab;
      lTab = lTemp;
    }
  }
  m_tabarray[m_nCount++] = lTab;
  return TRUE;
}

BOOL CFormatTabDlg::AddTabToArray ( LONG lTab ) [protected]
void CFormatTabDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 59 of file formatta.cpp.

{
  CCSDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CFormatTabDlg)
  DDX_Control(pDX, IDC_BUTTON_CLEARALL, m_buttonClearAll);
  DDX_Control(pDX, IDC_BUTTON_SET, m_buttonSet);
  DDX_Control(pDX, IDC_BUTTON_CLEAR, m_buttonClear);
  DDX_Control(pDX, IDC_COMBO1, m_comboBox);
  //}}AFX_DATA_MAP
  if (!pDX->m_bSaveAndValidate)
    UpdateListBox();
}

virtual void CFormatTabDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual const DWORD* CFormatTabDlg::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 39 of file formatta.h.

{return m_nHelpIDs;}

virtual const DWORD* CFormatTabDlg::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSDialog.

Definition at line 37 of file formatta.h.

{return m_nHelpIDs;}

void CFormatTabDlg::OnClickedClear ( ) [protected]

Definition at line 86 of file formatta.cpp.

{
  int nTab;
  int nSel = m_comboBox.GetCurSel();
  if (nSel == CB_ERR)
  {
    CDataExchange dx(this, TRUE);
    DDX_Twips(&dx, IDC_COMBO1, nTab);
    DDV_MinMaxTwips(&dx, nTab, 0, 31680);
    if (nTab != DDXM_BLANK)
    {
        if (RemoveTabFromArray(nTab))
          UpdateListBox();
    }
  }
  else
  {
    ASSERT(nSel < m_nCount);
    RemoveTabFromArrayByIndex(nSel);
    UpdateListBox();
  }
  UpdateButtons();
  SetEditFocus();
}

afx_msg void CFormatTabDlg::OnClickedClear ( ) [protected]
void CFormatTabDlg::OnClickedClearAll ( ) [protected]

Definition at line 111 of file formatta.cpp.

{
  m_nCount = 0;
  m_comboBox.ResetContent();
  UpdateButtons();
  SetEditFocus();
}

afx_msg void CFormatTabDlg::OnClickedClearAll ( ) [protected]
afx_msg void CFormatTabDlg::OnClickedSet ( ) [protected]
void CFormatTabDlg::OnClickedSet ( ) [protected]

Definition at line 119 of file formatta.cpp.

{
  Set();
  UpdateButtons();
  SetEditFocus();
}

afx_msg void CFormatTabDlg::OnEditChange ( ) [protected]
void CFormatTabDlg::OnEditChange ( ) [protected]

Definition at line 223 of file formatta.cpp.

{
  UpdateButtons();
}

virtual BOOL CFormatTabDlg::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

BOOL CFormatTabDlg::OnInitDialog ( ) [protected, virtual]

Reimplemented from CCSDialog.

Definition at line 247 of file formatta.cpp.

{
  CCSDialog::OnInitDialog();
  UpdateButtons();
  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

void CFormatTabDlg::OnOK ( ) [protected, virtual]

Definition at line 209 of file formatta.cpp.

{
  if (m_buttonSet.IsWindowEnabled())
  {
    if (!Set())
      return;
  }
  CCSDialog::OnOK();
  m_pf.cTabCount = (SHORT) m_nCount;
  for (int i=0;i<m_nCount;i++)
    m_pf.rgxTabs[i] = m_tabarray[i];
  m_pf.dwMask = PFM_TABSTOPS;
}

virtual void CFormatTabDlg::OnOK ( ) [protected, virtual]
void CFormatTabDlg::OnSelchange ( ) [protected]

Definition at line 255 of file formatta.cpp.

{
  UpdateButton(m_buttonClearAll, m_nCount > 0);
  // force these since if the edit control is empty and
  // an item in the box is clicked on, the edit control will
  // not be filled in first
  UpdateButton(m_buttonSet, TRUE);
  UpdateButton(m_buttonClear, TRUE);
  WORD wID = LOWORD(GetDefID());
  if (wID != IDC_BUTTON_SET)
    SetDefID(IDC_BUTTON_SET);
}

afx_msg void CFormatTabDlg::OnSelchange ( ) [protected]
BOOL CFormatTabDlg::RemoveTabFromArray ( LONG lTab ) [protected]
BOOL CFormatTabDlg::RemoveTabFromArray ( LONG lTab ) [protected]

Definition at line 153 of file formatta.cpp.

{
  int i;
  for (i=0;i<m_nCount;i++)
  {
    if (m_tabarray[i] == lTab)
    {
      RemoveTabFromArrayByIndex(i);
      return TRUE;
    }
  }
  return FALSE;
}

void CFormatTabDlg::RemoveTabFromArrayByIndex ( int nIndex ) [protected]
void CFormatTabDlg::RemoveTabFromArrayByIndex ( int nIndex ) [protected]

Definition at line 167 of file formatta.cpp.

{
  memmove_s(&m_tabarray[nIndex], sizeof(LONG), &m_tabarray[nIndex+1],
    (m_nCount-nIndex-1)*sizeof(LONG));
  m_nCount--;
}

BOOL CFormatTabDlg::Set ( ) [protected]
BOOL CFormatTabDlg::Set ( ) [protected]

Definition at line 126 of file formatta.cpp.

{
  int nTab;
  CDataExchange dx(this, TRUE);
  DDX_Twips(&dx, IDC_COMBO1, nTab);
  DDV_MinMaxTwips(&dx, nTab, 0, 31680);
  if (nTab != DDXM_BLANK)
  {
    if (m_nCount == MAX_TAB_STOPS)
    {
      AfxMessageBox(IDS_NOMORETABS);
      m_comboBox.Clear();
      return FALSE;
    }
    if (AddTabToArray(nTab))
      UpdateListBox();
    return TRUE;
  }
  return FALSE;
}

void CFormatTabDlg::SetEditFocus ( ) [protected]

Definition at line 147 of file formatta.cpp.

{
  m_comboBox.SetFocus();
  m_comboBox.SetEditSel(0,-1);
}

void CFormatTabDlg::SetEditFocus ( ) [protected]
void CFormatTabDlg::UpdateButton | ( | CButton & | button,
 |  | BOOL | b |
 | ) |  |  | [protected]
void CFormatTabDlg::UpdateButton | ( | CButton & | button,
 |  | BOOL | b |
 | ) |  |  | [protected]

Definition at line 228 of file formatta.cpp.

{
  if (b != button.IsWindowEnabled())
    button.EnableWindow(b);
}

void CFormatTabDlg::UpdateButtons ( ) [protected]
void CFormatTabDlg::UpdateButtons ( ) [protected]

Definition at line 234 of file formatta.cpp.

{
  UpdateButton(m_buttonClearAll, m_nCount > 0);
  BOOL bHasText = (m_comboBox.GetWindowTextLength() > 0);
  UpdateButton(m_buttonSet, bHasText);
  UpdateButton(m_buttonClear, bHasText);
  WORD wID = LOWORD(GetDefID());
  if (bHasText && wID != IDC_BUTTON_SET)
    SetDefID(IDC_BUTTON_SET);
  else if (!bHasText && wID != IDOK)
    SetDefID(IDOK);
}

void CFormatTabDlg::UpdateListBox ( ) [protected]
void CFormatTabDlg::UpdateListBox ( ) [protected]

Definition at line 196 of file formatta.cpp.

{
  int i;
  TCHAR szT[64];
  ASSERT(m_nCount >= 0);
  m_comboBox.ResetContent();
  for (i=0;i<m_nCount;i++)
  {
    theApp.PrintTwips(szT, 64, m_tabarray[i], 2);
    m_comboBox.AddString(szT);
  }
}

Member Data Documentation

CButton CFormatTabDlg::m_buttonClear

Definition at line 30 of file formatta.h.

CButton CFormatTabDlg::m_buttonClearAll

Definition at line 28 of file formatta.h.

CButton CFormatTabDlg::m_buttonSet

Definition at line 29 of file formatta.h.

CComboBox CFormatTabDlg::m_comboBox

Definition at line 31 of file formatta.h.

int CFormatTabDlg::m_nCount

Definition at line 23 of file formatta.h.

static const DWORD CFormatTabDlg::m_nHelpIDs [static, protected]
Initial value:
{
  IDC_BUTTON_SET, IDH_WORDPAD_TABSET,
  IDC_BUTTON_CLEAR, IDH_WORDPAD_TABCLEAR,
  IDC_BUTTON_CLEARALL, IDH_WORDPAD_TAB_CLEARALL,
  IDC_COMBO1, IDH_WORDPAD_TABSTOPS,
  IDC_BOX, IDH_COMM_GROUPBOX,
  0, 0
}

Definition at line 36 of file formatta.h.

PARAFORMAT2 CFormatTabDlg::m_pf

Definition at line 21 of file formatta.h.

WPD_PARAFORMAT CFormatTabDlg::m_pf

Definition at line 23 of file formatta.h.

LONG * CFormatTabDlg::m_tabarray

Definition at line 22 of file formatta.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/formatta.h
  • vc2008fp/WordPad/formatta.h
  • ole/wordpad/formatta.cpp
  • vc2008fp/WordPad/formatta.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CGDIThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions

CGDIThread Class Reference

#include "threads.h"

Inherited by CBallThread, CLineThread, and CRectThread.

List of all members.

Public Member Functions

CGDIThread (CWnd *pWnd, HDC hDC)
virtual | ~CGDIThread ()
virtual void | Delete ()
void | KillThread ()
virtual void | SingleStep ()=0
void | UpdateBorder ()

Public Attributes

CDC | m_dc
HDC | m_hDC
HANDLE | m_hEventDead
HANDLE | m_hEventKill
CRect | m_rectBorder

Static Public Attributes

static CRITICAL_SECTION | m_csGDILock
static HANDLE | m_hAnotherDead = CreateEvent(NULL, FALSE, FALSE, NULL)

Protected Member Functions

virtual BOOL | InitInstance ()

Detailed Description

Definition at line 18 of file threads.h.

Constructor & Destructor Documentation

CGDIThread::CGDIThread | ( | CWnd * | pWnd,
 |  | HDC | hDC
 | ) |  |

Definition at line 39 of file threads.cpp.

{
  m_bAutoDelete = FALSE;
  m_pMainWnd = pWnd;
  m_pMainWnd->GetClientRect(&m_rectBorder);
  m_hDC = hDC;

  // kill event starts out in the signaled state
  m_hEventKill = CreateEvent(NULL, TRUE, FALSE, NULL);
  m_hEventDead = CreateEvent(NULL, TRUE, FALSE, NULL);
}

CGDIThread::~CGDIThread ( ) [virtual]

Definition at line 84 of file threads.cpp.

{
  CloseHandle(m_hEventKill);
  CloseHandle(m_hEventDead);
}

Member Function Documentation

void CGDIThread::Delete ( ) [virtual]

Definition at line 74 of file threads.cpp.

{
  // calling the base here won't do anything but it is a good habit
  CWinThread::Delete();

  // acknowledge receipt of kill notification
  VERIFY(SetEvent(m_hEventDead));
  VERIFY(SetEvent(m_hAnotherDead));
}

BOOL CGDIThread::InitInstance ( ) [protected, virtual]

Reimplemented in CBallThread, CRectThread, and CLineThread.

Definition at line 58 of file threads.cpp.

{
  // thread setup
  m_dc.Attach(m_hDC);

  // loop but check for kill notification
  while (WaitForSingleObject(m_hEventKill, 0) == WAIT_TIMEOUT)
    SingleStep();

  // thread cleanup
  m_dc.Detach();

  // avoid entering standard message loop by returning FALSE
  return FALSE;
}

void CGDIThread::KillThread ( )

Definition at line 90 of file threads.cpp.

{
  // Note: this function is called in the context of other threads,
  //  not the thread itself.

  // reset the m_hEventKill which signals the thread to shutdown
  VERIFY(SetEvent(m_hEventKill));

  // allow thread to run at higher priority during kill process
  SetThreadPriority(THREAD_PRIORITY_ABOVE_NORMAL);
  WaitForSingleObject(m_hEventDead, INFINITE);
  WaitForSingleObject(m_hThread, INFINITE);

  // now delete CWinThread object since no longer necessary
  delete this;
}

virtual void CGDIThread::SingleStep ( ) [pure virtual]

Implemented in CBallThread, CRectThread, and CLineThread.

void CGDIThread::UpdateBorder ( )

Definition at line 107 of file threads.cpp.

{
  // Since another thread can access this variable, we block them when we write
  // it. In this case, it is overkill since the other thread would just animate
  // in the wrong direction while reading intermediate values and finally adjust
  // itself when the new value is valid.  It is a good idea to avoid such
  // anomalies, however.

  EnterCriticalSection(&CGDIThread::m_csGDILock);
  {
    m_pMainWnd->GetClientRect(&m_rectBorder);
  }
  LeaveCriticalSection(&CGDIThread::m_csGDILock);
}

Member Data Documentation

CRITICAL_SECTION CGDIThread::m_csGDILock [static]

Definition at line 33 of file threads.h.

CDC CGDIThread::m_dc

Definition at line 28 of file threads.h.

HANDLE CGDIThread::m_hAnotherDead = CreateEvent(NULL, FALSE, FALSE, NULL) [static]

Definition at line 31 of file threads.h.

HDC CGDIThread::m_hDC

Definition at line 27 of file threads.h.

HANDLE CGDIThread::m_hEventDead

Definition at line 30 of file threads.h.

HANDLE CGDIThread::m_hEventKill

Definition at line 29 of file threads.h.

CRect CGDIThread::m_rectBorder

Definition at line 26 of file threads.h.

The documentation for this class was generated from the following files:
  • advanced/mtgdi/threads.h
  • advanced/mtgdi/threads.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CGetURL Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CGetURL Class Reference

#include "GetURL.h"

List of all members.

Public Types

enum | { IDD = IDD_URLDIALOG }

Public Member Functions

CGetURL (CWnd *pParent=NULL)

Public Attributes

CString | m_URL

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
void | OnCloseup ()
void | OnDocumentComplete (LPDISPATCH pDisp, LPVARIANT pURL)
void | OnGo ()
virtual BOOL | OnInitDialog ()
virtual void | OnOK ()
void | OnSearch ()

Protected Attributes

CAddressCombo m_AddrCombo
CComQIPtr< IWebBrowser2 > | m_spBrowser
CString | m_szCurAddr

Detailed Description

Definition at line 22 of file GetURL.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file GetURL.h.

{ IDD = IDD_URLDIALOG };

Constructor & Destructor Documentation

CGetURL::CGetURL ( CWnd * pParent = NULL )

Definition at line 26 of file GetURL.cpp.

  : CDialog(CGetURL::IDD, pParent)
{
  //{{AFX_DATA_INIT(CGetURL)
  m_URL = _T("");
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CGetURL::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 35 of file GetURL.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CGetURL)

  //}}AFX_DATA_MAP
  if(::IsWindow(m_AddrCombo.m_hWnd))
    DDX_Text(pDX, IDC_ADDRCOMBO, m_URL);
}

void CGetURL::OnCloseup ( ) [protected]

Definition at line 110 of file GetURL.cpp.

{
  int nSel = m_AddrCombo.GetCurSel();
  if(CB_ERR != nSel)
  {
    m_AddrCombo.GetLBText(nSel,m_szCurAddr);
    if(m_spBrowser)
      m_spBrowser->Navigate(m_szCurAddr.AllocSysString(),NULL,NULL,NULL,NULL);

  }
}

void CGetURL::OnDocumentComplete | ( | LPDISPATCH | pDisp,
 |  | LPVARIANT | pURL |
 | ) |  |  | [protected]

Definition at line 59 of file GetURL.cpp.

{
  CString szURL(COLE2T(pURL->pvarVal->bstrVal));
  if(::IsWindow(m_AddrCombo.m_hWnd))
  {
    m_AddrCombo.SetWindowText(szURL);
    m_szCurAddr = szURL;
  }

}

void CGetURL::OnGo ( ) [protected]

Definition at line 122 of file GetURL.cpp.

{
  m_AddrCombo.GetWindowText(m_szCurAddr);
  if(m_spBrowser)
    m_spBrowser->Navigate(m_szCurAddr.AllocSysString(),NULL,NULL,NULL,NULL);

}

BOOL CGetURL::OnInitDialog ( ) [protected, virtual]

Definition at line 79 of file GetURL.cpp.

{
  CDialog::OnInitDialog();
  IUnknown *pUnk;

  CWnd *pWnd = GetDlgItem(IDC_EXPLORER);
  pUnk = NULL;
  if(pWnd)
    m_spBrowser = pWnd->GetControlUnknown();

  pWnd = NULL;
  CRect rcItem;
  pWnd = GetDlgItem(IDC_PHSTATIC);
  if(pWnd)
  {
    pWnd->GetClientRect(rcItem);
    pWnd->ClientToScreen(rcItem);
    pWnd->DestroyWindow();
    ScreenToClient(rcItem);
    rcItem.bottom += 150;
    if(m_AddrCombo.Create(WS_VSCROLL|WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_AUTOHSCROLL,rcItem,this,IDC_ADDRCOMBO))
    {
      m_AddrCombo.SetCurSel(0);
      m_AddrCombo.GetWindowText(m_szCurAddr);
      if(m_spBrowser && m_szCurAddr.GetLength())
        m_spBrowser->Navigate(m_szCurAddr.AllocSysString(),NULL,NULL,NULL,NULL);
    }
  }
  return TRUE;
}

void CGetURL::OnOK ( ) [protected, virtual]

Definition at line 69 of file GetURL.cpp.

{
  UpdateData();
  CDialog::OnOK();
}

void CGetURL::OnSearch ( ) [protected]

Definition at line 74 of file GetURL.cpp.

{
  if(m_spBrowser)
    m_spBrowser->Navigate(L"http://www.yahoo.com",NULL,NULL,NULL,NULL);
}

Member Data Documentation

CAddressCombo CGetURL::m_AddrCombo [protected]

Definition at line 48 of file GetURL.h.

CComQIPtr<IWebBrowser2> CGetURL::m_spBrowser [protected]

Definition at line 47 of file GetURL.h.

CString CGetURL::m_szCurAddr [protected]

Definition at line 46 of file GetURL.h.

CString CGetURL::m_URL

Definition at line 27 of file GetURL.h.

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/GetURL.h
  • internet/HTMLEdit/GetURL.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CGotoDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CGotoDlg Class Reference

#include "gotodlg.h"

List of all members.

Public Types

enum | { IDD = IDD_GOTO }

Public Member Functions

CGotoDlg (CWnd *pParent=NULL)

Public Attributes

int | m_nLineNum

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnCancel ()

Detailed Description

Definition at line 15 of file gotodlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file gotodlg.h.

{ IDD = IDD_GOTO };

Constructor & Destructor Documentation

CGotoDlg::CGotoDlg ( CWnd * pParent = NULL )

Definition at line 26 of file gotodlg.cpp.

  : CDialog(CGotoDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CGotoDlg)
  m_nLineNum = 1;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CGotoDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 35 of file gotodlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CGotoDlg)
  DDX_Text(pDX, IDC_GOTO_LINE, m_nLineNum);
  //}}AFX_DATA_MAP
}

void CGotoDlg::OnCancel ( ) [protected, virtual]

Definition at line 49 of file gotodlg.cpp.

{
  // TODO: Add extra cleanup here

  CDialog::OnCancel();
}

Member Data Documentation

int CGotoDlg::m_nLineNum

Definition at line 24 of file gotodlg.h.

The documentation for this class was generated from the following files:
  • general/npp/gotodlg.h
  • general/npp/gotodlg.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CGuidGenApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CGuidGenApp Class Reference

#include "guidgen.h"

List of all members.

Public Member Functions

CGuidGenApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()

Detailed Description

Definition at line 23 of file guidgen.h.

Constructor & Destructor Documentation

CGuidGenApp::CGuidGenApp ( )

Definition at line 106 of file guidgen.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CGuidGenApp::ExitInstance ( ) [virtual]

Definition at line 165 of file guidgen.cpp.

{
  ::CoUninitialize();

  return CWinApp::ExitInstance();
}

BOOL CGuidGenApp::InitInstance ( ) [virtual]

Definition at line 120 of file guidgen.cpp.

{
  // Turn on the "termination on heap corruption" flag.
  (void)HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);

  SetRegistryKey(_T("Microsoft\\MFC 3.0 Samples"));

  if (::CoInitialize(NULL) != S_OK)
  {
    AfxMessageBox(IDP_ERR_INIT_OLE);
    return FALSE;
  }

  // Load the localized resource DLL for current locale
  HINSTANCE hInstRes = LoadLocalizedResourceDLL(szLocalizedUIDll);
  AfxSetResourceHandle(hInstRes);

  // process command line arguments
  CWnd* pParentWnd = NULL;
  for (LPCTSTR lpsz = m_lpCmdLine; *lpsz != 0; ++lpsz)
  {
    if (*lpsz != '-' && *lpsz != '/')
      continue;

    switch (lpsz[1])
    {
    // "/A" or "/a" allows the window to be parented to the IDE window
    // add GUIDGEN /A to your tools menu for easy access!
    case 'a':
    case 'A':
      pParentWnd = CWnd::GetForegroundWindow();
      break;
    }
  }

  CGuidGenDlg dlg(pParentWnd);
  m_pMainWnd = &dlg;
  // ignore return value
  dlg.DoModal();

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • utility/guidgen/guidgen.h
  • utility/guidgen/guidgen.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CGuidGenDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CGuidGenDlg Class Reference

#include "guidgdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_GUIDGEN_DIALOG }

Public Member Functions

CGuidGenDlg (CWnd *pParent=NULL)

Public Attributes

int | m_nGuidType

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
void | GetFormattedGuid (CString &rString)
afx_msg void | OnChangedSel (UINT nID)
virtual BOOL | OnInitDialog ()
afx_msg void | OnNewguid ()
virtual void | OnOK ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

GUID | m_guid
HICON | m_hIcon

Detailed Description

Definition at line 15 of file guidgdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file guidgdlg.h.

{ IDD = IDD_GUIDGEN_DIALOG };

Constructor & Destructor Documentation

CGuidGenDlg::CGuidGenDlg ( CWnd * pParent = NULL )

Definition at line 76 of file guidgdlg.cpp.

  : CDialog(CGuidGenDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CGuidGenDlg)
  m_nGuidType = -1;
  //}}AFX_DATA_INIT
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CGuidGenDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 86 of file guidgdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CGuidGenDlg)
  DDX_Radio(pDX, IDC_RADIO1, m_nGuidType);
  //}}AFX_DATA_MAP
}

void CGuidGenDlg::GetFormattedGuid ( CString & rString ) [protected]

Definition at line 245 of file guidgdlg.cpp.

{
  // load appropriate formatting string
  CString strFormat;
  ENSURE(strFormat.LoadString(IDS_FORMATS+m_nGuidType));

  // then format into destination
  rString.Format(strFormat,
    // first copy...
    m_guid.Data1, m_guid.Data2, m_guid.Data3,
    m_guid.Data4[0], m_guid.Data4[1], m_guid.Data4[2], m_guid.Data4[3],
    m_guid.Data4[4], m_guid.Data4[5], m_guid.Data4[6], m_guid.Data4[7],
    // second copy...
    m_guid.Data1, m_guid.Data2, m_guid.Data3,
    m_guid.Data4[0], m_guid.Data4[1], m_guid.Data4[2], m_guid.Data4[3],
    m_guid.Data4[4], m_guid.Data4[5], m_guid.Data4[6], m_guid.Data4[7]);
}

void CGuidGenDlg::OnChangedSel ( UINT nID ) [protected]

Definition at line 199 of file guidgdlg.cpp.

{
  // update m_nGuidType
  UpdateData(TRUE);
  ASSERT(m_nGuidType >= 0 && m_nGuidType <= 5);

  // update the result text
  CString strResult;
  GetFormattedGuid(strResult);
  SetDlgItemText(IDC_RESULTS, strResult);
}

BOOL CGuidGenDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 110 of file guidgdlg.cpp.

{
  // start with guid type selected last time
  m_nGuidType = AfxGetApp()->GetProfileInt(szOptions, szGuidType, 0);

  // create random GUID
  m_guid = GUID_NULL;
  ::CoCreateGuid(&m_guid);
  if (m_guid == GUID_NULL)
  {
    AfxMessageBox(IDP_ERR_CREATE_GUID);
    EndDialog(IDABORT);
  }

  CDialog::OnInitDialog();
  OnChangedSel(IDC_RADIO1+m_nGuidType);

  if (GetParent() != NULL)
    CenterWindow();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  CString strAboutMenu;
  ENSURE(strAboutMenu.LoadString(IDS_ABOUTBOX));
  if (!strAboutMenu.IsEmpty())
  {
    pSysMenu->AppendMenu(MF_SEPARATOR);
    pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  }

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CGuidGenDlg::OnNewguid ( ) [protected]

Definition at line 263 of file guidgdlg.cpp.

{
  // create random GUID using UuidCreate so that we
  // can check for more error codes
  m_guid = GUID_NULL;
  HRESULT hr = ::UuidCreate(&m_guid);

  // Errors
  if (HRESULT_CODE(hr) != RPC_S_OK)
  {
    AfxMessageBox(IDP_ERR_NOT_OK);
    return;
  }

  if (m_guid == GUID_NULL)
  {
    AfxMessageBox(IDP_ERR_CREATE_GUID);
    return;
  }

  // Warnings
  if (HRESULT_CODE(hr) == RPC_S_UUID_NO_ADDRESS)
    AfxMessageBox(IDP_ERR_NO_ADDRESS);

  if (HRESULT_CODE(hr) == RPC_S_UUID_LOCAL_ONLY)
    AfxMessageBox(IDP_ERR_LOCAL_ONLY);

  // update dialog to match m_guid
  OnChangedSel(IDC_RADIO1+m_nGuidType);
}

void CGuidGenDlg::OnOK ( ) [protected, virtual]

Definition at line 211 of file guidgdlg.cpp.

{
  UpdateData(TRUE);

  // save current type selected
  AfxGetApp()->WriteProfileInt(szOptions, szGuidType, m_nGuidType);

  // copy the string to the clipboard
  if (!OpenClipboard())
  {
    AfxMessageBox(IDP_ERR_OPEN_CLIP);
    return;
  }

  CString strResult;
  GetFormattedGuid(strResult);
  int nTextLen = (strResult.GetLength()+1)*sizeof(TCHAR);
  HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, nTextLen);
  if (hGlobal != NULL)
  {
    LPVOID lpText = GlobalLock(hGlobal);
    memcpy_s(lpText, nTextLen, strResult, nTextLen);

    EmptyClipboard();
    GlobalUnlock(hGlobal);
#ifdef _UNICODE
    SetClipboardData(CF_UNICODETEXT, hGlobal);
#else
    SetClipboardData(CF_TEXT, hGlobal);
#endif
  }
  CloseClipboard();
}

void CGuidGenDlg::OnPaint ( ) [protected]

Definition at line 167 of file guidgdlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CGuidGenDlg::OnQueryDragIcon ( ) [protected]

Definition at line 194 of file guidgdlg.cpp.

{
  return (HCURSOR)m_hIcon;
}

void CGuidGenDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 150 of file guidgdlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDialog::OnSysCommand(nID, lParam);
  }
}

Member Data Documentation

GUID CGuidGenDlg::m_guid [protected]

Definition at line 37 of file guidgdlg.h.

HICON CGuidGenDlg::m_hIcon [protected]

Definition at line 35 of file guidgdlg.h.

int CGuidGenDlg::m_nGuidType

Definition at line 24 of file guidgdlg.h.

The documentation for this class was generated from the following files:
  • utility/guidgen/guidgdlg.h
  • utility/guidgen/guidgdlg.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHandleSize Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CHandleSize Class Reference

#include "dialogs.h"

List of all members.

Public Types

enum | { IDD = IDD_HANDLE_SIZE }

Public Member Functions

CHandleSize (CWnd *pParent=NULL)

Public Attributes

int | m_nHandleSize

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file dialogs.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file dialogs.h.

{ IDD = IDD_HANDLE_SIZE };

Constructor & Destructor Documentation

CHandleSize::CHandleSize ( CWnd * pParent = NULL )

Definition at line 26 of file dialogs.cpp.

  : CDialog(CHandleSize::IDD, pParent)
{
  //{{AFX_DATA_INIT(CHandleSize)
  m_nHandleSize = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CHandleSize::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file dialogs.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CHandleSize)
  DDX_Text(pDX, IDC_EDIT1, m_nHandleSize);
  //}}AFX_DATA_MAP
}

Member Data Documentation

int CHandleSize::m_nHandleSize

Definition at line 25 of file dialogs.h.

The documentation for this class was generated from the following files:
  • general/tracker/dialogs.h
  • general/tracker/dialogs.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHARHDR Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CHARHDR Struct Reference

#include "formatba.h"

List of all members.

Public Member Functions

CHARHDR ()

Public Attributes

CHARFORMAT2 cf

Detailed Description

Definition at line 26 of file formatba.h.

Constructor & Destructor Documentation

CHARHDR::CHARHDR ( ) [inline]

Definition at line 29 of file formatba.h.

{cf.cbSize = sizeof(CHARFORMAT2);}

Member Data Documentation

CHARFORMAT2 CHARHDR::cf

Definition at line 28 of file formatba.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/formatba.h
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHelloApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CHelloApp Class Reference

List of all members.

Public Member Functions

virtual BOOL InitInstance ()

Detailed Description

Definition at line 46 of file helloapp.cpp.

Member Function Documentation

virtual BOOL CHelloApp::InitInstance ( ) [inline, virtual]

Definition at line 49 of file helloapp.cpp.

  {
    m_pMainWnd = new CHelloWindow();
    m_pMainWnd->ShowWindow(m_nCmdShow);
    m_pMainWnd->UpdateWindow();
    return TRUE;
  }

The documentation for this class was generated from the following file:
  • general/helloapp/helloapp.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHelloDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CHelloDoc Class Reference

#include "HelloDoc.h"

List of all members.

Public Member Functions

virtual | ~CHelloDoc ()
void | ClearAllColors ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)
void | SetCustomStrColor (COLORREF clr)
void | SetStrColor (COLORREF clr)

Public Attributes

BOOL | m_bBlack
BOOL | m_bBlue
BOOL | m_bCustom
BOOL | m_bGreen
BOOL | m_bRed
BOOL | m_bWhite
COLORREF | m_clrText
CString | m_str

Protected Member Functions

CHelloDoc ()

Detailed Description

Definition at line 15 of file HelloDoc.h.

Constructor & Destructor Documentation

CHelloDoc::CHelloDoc ( ) [protected]

Definition at line 37 of file HelloDoc.cpp.

{
}

CHelloDoc::~CHelloDoc ( ) [virtual]

Definition at line 41 of file HelloDoc.cpp.

{
}

Member Function Documentation

void CHelloDoc::ClearAllColors ( )

Definition at line 110 of file HelloDoc.cpp.

{
  m_bBlack = m_bBlue = m_bRed = 0;
  m_bWhite = m_bGreen = 0;
}

BOOL CHelloDoc::OnNewDocument ( ) [virtual]

Definition at line 45 of file HelloDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

// initialization of document's data

  m_clrText = RGB(0, 0, 255);
  m_str = _T("Hello, world!");

// initialization of button states for each color

  m_bBlue = 1;
  m_bBlack = 0;
  m_bGreen = 0;
  m_bRed = 0;
  m_bWhite = 0;
  m_bCustom = 0;

  return TRUE;
}

void CHelloDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 70 of file HelloDoc.cpp.

{
  if (ar.IsStoring())
  {
  }
  else
  {
  }
}

void CHelloDoc::SetCustomStrColor ( COLORREF clr )

Definition at line 104 of file HelloDoc.cpp.

{
  m_clrText = clr;
  UpdateAllViews(NULL);
}

void CHelloDoc::SetStrColor ( COLORREF clr )

Definition at line 98 of file HelloDoc.cpp.

{
  m_clrText = clr;
  UpdateAllViews(NULL);
}

Member Data Documentation

BOOL CHelloDoc::m_bBlack

Definition at line 28 of file HelloDoc.h.

BOOL CHelloDoc::m_bBlue

Definition at line 30 of file HelloDoc.h.

BOOL CHelloDoc::m_bCustom

Definition at line 33 of file HelloDoc.h.

BOOL CHelloDoc::m_bGreen

Definition at line 31 of file HelloDoc.h.

BOOL CHelloDoc::m_bRed

Definition at line 29 of file HelloDoc.h.

BOOL CHelloDoc::m_bWhite

Definition at line 32 of file HelloDoc.h.

COLORREF CHelloDoc::m_clrText

Definition at line 24 of file HelloDoc.h.

CString CHelloDoc::m_str

Definition at line 25 of file HelloDoc.h.

The documentation for this class was generated from the following files:
  • general/mdidocvw/HelloDoc.h
  • general/mdidocvw/HelloDoc.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHelloFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CHelloFrame Class Reference

#include "HelloFrm.h"

List of all members.

Public Member Functions

CHelloFrame ()
virtual | ~CHelloFrame ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Detailed Description

Definition at line 15 of file HelloFrm.h.

Constructor & Destructor Documentation

CHelloFrame::CHelloFrame ( )

Definition at line 39 of file HelloFrm.cpp.

{
}

CHelloFrame::~CHelloFrame ( ) [virtual]

Definition at line 43 of file HelloFrm.cpp.

{
}

Member Function Documentation

BOOL CHelloFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 47 of file HelloFrm.cpp.

{
  return CMDIChildWnd::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • general/mdidocvw/HelloFrm.h
  • general/mdidocvw/HelloFrm.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHelloView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CHelloView Class Reference

#include "testdll1.h"

List of all members.

Public Member Functions

CHelloView ()
virtual | ~CHelloView ()
CHelloDoc * GetDocument ()
void | MixColors ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CHelloView ()
afx_msg void | OnColor ()
afx_msg void | OnColor ()
afx_msg void | OnCustom ()
afx_msg void | OnCustomColor ()
virtual void | OnDraw (CDC *pDC)
afx_msg void | OnUpdateBlack (CCmdUI *pCmdUI)
afx_msg void | OnUpdateBlue (CCmdUI *pCmdUI)
afx_msg void | OnUpdateColor (CCmdUI *pCmdUI)
afx_msg void | OnUpdateCustom (CCmdUI *pCmdUI)
afx_msg void | OnUpdateGreen (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRed (CCmdUI *pCmdUI)
afx_msg void | OnUpdateWhite (CCmdUI *pCmdUI)

Protected Attributes

COLORREF | m_clrText
UINT m_nIDColor

Detailed Description

Definition at line 41 of file testdll1.h.

Constructor & Destructor Documentation

CHelloView::CHelloView ( )

Definition at line 111 of file testdll1.cpp.

{
  m_nIDColor = IDM_BLACK;
  m_clrText = RGB(0, 0, 0);
}

CHelloView::CHelloView ( ) [protected]
CHelloView::~CHelloView ( ) [virtual]

Definition at line 54 of file HelloVw.cpp.

{
}

Member Function Documentation

CHelloDoc * CHelloView::GetDocument ( ) [inline]

Definition at line 64 of file HelloVw.h.

   { return (CHelloDoc*)m_pDocument; }

void CHelloView::MixColors ( )

Definition at line 147 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  COLORREF tmpClr;
  int r, g, b;
  BOOL bSetColor;

  // Determine which colors are currently chosen.

  bSetColor = pDoc->m_bRed || pDoc->m_bGreen || pDoc->m_bBlue
    || pDoc->m_bWhite || pDoc->m_bBlack;

  // If the current color is custom, ignore mix request.

  if(!bSetColor && pDoc->m_bCustom)
    return;

  // Set color value to black and then add the necessary colors.

  r = g = b = 0;

  if(pDoc->m_bRed)
   r = 255;
  if(pDoc->m_bGreen)
   g = 255;
  if(pDoc->m_bBlue)
   b = 255;
  tmpClr = RGB(r, g, b);

// NOTE: Because a simple algorithm is used to mix colors
// if the current selection contains black or white, the
// result will be black or white; respectively. This is due
// to the additive method for mixing the colors.

  if(pDoc->m_bBlack)
   tmpClr = RGB(0, 0, 0);

  if(pDoc->m_bWhite)
   tmpClr = RGB(255, 255, 255);

  // Once the color has been determined, update document
  // data, and force repaint of all views.

  if(!bSetColor)
    pDoc->m_bBlack = TRUE;
  pDoc->m_clrText = tmpClr;
  pDoc->m_bCustom = FALSE;
  pDoc->UpdateAllViews(NULL);
}

void CHelloView::OnColor ( ) [protected]

Definition at line 147 of file testdll1.cpp.

{
  m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
  m_clrText = colorArray[m_nIDColor - IDM_BLACK];

  // Force the client area text to be repainted in the new color
  Invalidate();
}

afx_msg void CHelloView::OnColor ( ) [protected]
void CHelloView::OnCustom ( ) [protected]

Definition at line 199 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CColorDialog dlgColor(pDoc->m_clrText);
  if (dlgColor.DoModal() == IDOK)
  {
    pDoc->m_clrText = dlgColor.GetColor();
    pDoc->ClearAllColors();
    pDoc->m_bCustom = TRUE;
    pDoc->UpdateAllViews(NULL);
  }
}

void CHelloView::OnCustomColor ( ) [protected]

Definition at line 156 of file testdll1.cpp.

{
  CColorDialog dlgColor(m_clrText);
  if (dlgColor.DoModal() == IDOK)
  {
    m_clrText = dlgColor.GetColor();
    m_nIDColor = IDM_CUSTOM;
    Invalidate();
  }
}

void CHelloView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 118 of file testdll1.cpp.

{
  CRect rect;

  pDC->SetTextColor(m_clrText);
  pDC->SetBkColor(::GetSysColor(COLOR_WINDOW));
  GetClientRect(rect);
  pDC->DrawText(_T("Hello, World!"), -1, rect,
    DT_SINGLELINE | DT_CENTER | DT_VCENTER);
}

virtual void CHelloView::OnDraw ( CDC * pDC ) [virtual]
void CHelloView::OnUpdateBlack ( CCmdUI * pCmdUI ) [protected]

Definition at line 139 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bBlack);
}

void CHelloView::OnUpdateBlue ( CCmdUI * pCmdUI ) [protected]

Definition at line 107 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bBlue);
}

void CHelloView::OnUpdateColor ( CCmdUI * pCmdUI ) [protected]

Definition at line 132 of file testdll1.cpp.

{
  pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
}

void CHelloView::OnUpdateCustom ( CCmdUI * pCmdUI ) [protected]

Definition at line 214 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bCustom);
}

void CHelloView::OnUpdateGreen ( CCmdUI * pCmdUI ) [protected]

Definition at line 115 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bGreen);
}

void CHelloView::OnUpdateRed ( CCmdUI * pCmdUI ) [protected]

Definition at line 123 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bRed);
}

void CHelloView::OnUpdateWhite ( CCmdUI * pCmdUI ) [protected]

Definition at line 131 of file HelloVw.cpp.

{
  CHelloDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->SetCheck(pDoc->m_bWhite);
}

BOOL CHelloView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 58 of file HelloVw.cpp.

{
  return CView::PreCreateWindow(cs);
}

Member Data Documentation

COLORREF CHelloView::m_clrText [protected]

Definition at line 50 of file testdll1.h.

UINT CHelloView::m_nIDColor [protected]

Definition at line 49 of file testdll1.h.

The documentation for this class was generated from the following files:
  • advanced/dllhusk/testdll1.h
  • general/mdidocvw/HelloVw.h
  • advanced/dllhusk/testdll1.cpp
  • general/mdidocvw/HelloVw.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHelloWindow Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CHelloWindow Class Reference

List of all members.

Public Member Functions

CHelloWindow ()

Detailed Description

Definition at line 36 of file helloapp.cpp.

Constructor & Destructor Documentation

CHelloWindow::CHelloWindow ( ) [inline]

Definition at line 39 of file helloapp.cpp.

    { Create(NULL, _T("Hello World!"), WS_OVERLAPPEDWINDOW, rectDefault); }

The documentation for this class was generated from the following file:
  • general/helloapp/helloapp.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHelloWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

CHelloWnd Class Reference

#include "hello.h"

List of all members.

Public Member Functions

CHelloWnd ()
CHelloWnd ()
BOOL | Create (LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL)
BOOL | Create (LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL)

Protected Member Functions

afx_msg void | OnColor ()
afx_msg void | OnColor ()
afx_msg void | OnCustomColor ()
afx_msg void | OnCustomColor ()
afx_msg void | OnPaint ()
afx_msg void | OnPaint ()
afx_msg void | OnUpdateColor (CCmdUI *pCmdUI)
afx_msg void | OnUpdateColor (CCmdUI *pCmdUI)

Protected Attributes

COLORREF | m_clrText
UINT m_nIDColor

Static Protected Attributes

static CMenu NEAR | menu

Detailed Description

Definition at line 20 of file hello.h.

Constructor & Destructor Documentation

CHelloWnd::CHelloWnd ( )

Definition at line 64 of file hello.cpp.

{
  m_nIDColor = IDM_BLACK;
  m_clrText = RGB(0, 0, 0);
}

CHelloWnd::CHelloWnd ( )

Member Function Documentation

BOOL CHelloWnd::Create | ( | LPCTSTR | szTitle,
 |  | LONG | style = 0,
 |  | const RECT & | rect = rectDefault,
 |  | CMDIFrameWnd * | pParent = NULL
 | ) |  |

Definition at line 43 of file hello.cpp.

{
  // Setup the shared menu
  if (menu.m_hMenu == NULL)
    menu.LoadMenu(IDR_HELLO);
  m_hMenuShared = menu.m_hMenu;

  // Register a custom WndClass and create a window.
  // This must be done because CHelloWnd has a custom icon.

  LPCTSTR lpszHelloClass =
      AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
      LoadCursor(NULL, IDC_ARROW),
      (HBRUSH) (COLOR_WINDOW+1),
      LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_HELLO)));

  return CMDIChildWnd::Create(lpszHelloClass, szTitle, style, rect, parent);
}

BOOL CHelloWnd::Create | ( | LPCTSTR | szTitle,
 |  | LONG | style = 0,
 |  | const RECT & | rect = rectDefault,
 |  | CMDIFrameWnd * | pParent = NULL
 | ) |  |
afx_msg void CHelloWnd::OnColor ( ) [protected]
void CHelloWnd::OnColor ( ) [protected]

Definition at line 93 of file hello.cpp.

{
  m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
  m_clrText = colorArray[m_nIDColor - IDM_BLACK];

  // Force the client area text to be repainted in the new color
  Invalidate();
}

afx_msg void CHelloWnd::OnCustomColor ( ) [protected]
void CHelloWnd::OnCustomColor ( ) [protected]

Definition at line 102 of file hello.cpp.

{
  CColorDialog dlgColor(m_clrText);
  if (dlgColor.DoModal() == IDOK)
  {
    m_clrText = dlgColor.GetColor();
    m_nIDColor = IDM_CUSTOM;
    Invalidate();
  }
}

afx_msg void CHelloWnd::OnPaint ( ) [protected]
void CHelloWnd::OnPaint ( ) [protected]

Definition at line 73 of file hello.cpp.

{
  CPaintDC dc(this);
  CRect rect;

  dc.SetTextColor(m_clrText);
  dc.SetBkColor(::GetSysColor(COLOR_WINDOW));
  GetClientRect(rect);
  dc.DrawText(_T("Hello, World!"), -1, rect,
    DT_SINGLELINE | DT_CENTER | DT_VCENTER);
}

afx_msg void CHelloWnd::OnUpdateColor ( CCmdUI * pCmdUI ) [protected]
void CHelloWnd::OnUpdateColor ( CCmdUI * pCmdUI ) [protected]

Definition at line 88 of file hello.cpp.

{
  pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
}

Member Data Documentation

COLORREF CHelloWnd::m_clrText [protected]

Definition at line 36 of file hello.h.

UINT CHelloWnd::m_nIDColor [protected]

Definition at line 35 of file hello.h.

static CMenu NEAR CHelloWnd::menu [static, protected]

Definition at line 33 of file hello.h.

The documentation for this class was generated from the following files:
  • advanced/mtmdi/hello.h
  • general/mdi/hello.h
  • advanced/mtmdi/hello.cpp
  • general/mdi/hello.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHelpToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CHelpToolBar Class Reference

#include "DynamicHelpView.h"

List of all members.

Public Member Functions

virtual BOOL | AllowShowOnList () const
virtual void | OnUpdateCmdUI (CFrameWnd *, BOOL bDisableIfNoHndler)

Detailed Description

Definition at line 12 of file DynamicHelpView.h.

Member Function Documentation

virtual BOOL CHelpToolBar::AllowShowOnList ( ) const [inline, virtual]

Definition at line 20 of file DynamicHelpView.h.

{ return FALSE; }

virtual void CHelpToolBar::OnUpdateCmdUI | ( | CFrameWnd * | ,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [inline, virtual]

Definition at line 15 of file DynamicHelpView.h.

  {
    CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
  }

The documentation for this class was generated from the following file:
  • vc2008fp/VisualStudioDemo/DynamicHelpView.h
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHierSvrDocTemplate Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CHierSvrDocTemplate Class Reference

#include "hiersvr.h"

List of all members.

Public Member Functions

CHierSvrDocTemplate ()
CDocTemplate::Confidence MatchDocType (LPCTSTR lpszPathName, CDocument *&rpDocMatch)

Detailed Description

Definition at line 43 of file hiersvr.h.

Constructor & Destructor Documentation

CHierSvrDocTemplate::CHierSvrDocTemplate ( )

Definition at line 59 of file hiersvr.cpp.

: CMultiDocTemplate(IDR_HIERSVRTYPE,
  RUNTIME_CLASS(CServerDoc),
  RUNTIME_CLASS(CMDIChildWnd), // standard MDI child frame
  RUNTIME_CLASS(CServerView))
{
}

Member Function Documentation

CDocTemplate::Confidence CHierSvrDocTemplate::MatchDocType | ( | LPCTSTR | lpszPathName,
 |  | CDocument *& | rpDocMatch
 | ) |  |

Definition at line 67 of file hiersvr.cpp.

{
  CDocTemplate::Confidence ret;

  ret = CMultiDocTemplate::MatchDocType(lpszPathName, rpDocMatch);

  if (ret == CDocTemplate::yesAttemptForeign)
    ret = CDocTemplate::noAttempt;

  return ret;
}

The documentation for this class was generated from the following files:
  • ole/hiersvr/hiersvr.h
  • ole/hiersvr/hiersvr.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHistoryList Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CHistoryList Class Reference

#include "history.h"

List of all members.

Public Member Functions

BOOL | AddString (CString &s1)
void | FillCombobox ()

Protected Member Functions

void | SwapStrings (CWnd *pWnd, CString &s1)

Detailed Description

Definition at line 13 of file history.h.

Member Function Documentation

BOOL CHistoryList::AddString ( CString & s1 )

Definition at line 34 of file history.cpp.

{
  CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
  CWnd* pWnd = &pFrame->m_wndToolBar.m_toolBarCombo;
  ASSERT_VALID(pWnd);

  if (!s1.GetLength())
    return FALSE;

  POSITION pos = Find(s1);
  INT_PTR 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::FillCombobox ( )

Definition at line 22 of file history.cpp.

{
  CNotepadView* 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)));
}

void CHistoryList::SwapStrings | ( | CWnd * | pWnd,
 |  | CString & | s1 |
 | ) |  |  | [protected]

Definition at line 66 of file history.cpp.

{
  // swap internal list items
  POSITION pos = GetHeadPosition();
  ASSERT(pos != NULL);

  CString s2;
  INT_PTR 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)));
}

The documentation for this class was generated from the following files:
  • general/npp/history.h
  • general/npp/history.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHistoryObj Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CHistoryObj Class Reference

#include "HistoryObj.h"

List of all members.

Public Member Functions

CHistoryObj (const CString &strTitle, const CString &strURL, const UINT uiCommand)
virtual | ~CHistoryObj ()
UINT | GetCommand () const
LPCTSTR | GetTitle () const
LPCTSTR | GetURL () const

Protected Attributes

const CString | m_strTitle
const CString | m_strURL
const UINT | m_uiCommand

Detailed Description

Definition at line 13 of file HistoryObj.h.

Constructor & Destructor Documentation

CHistoryObj::CHistoryObj | ( | const CString & | strTitle,
 |  | const CString & | strURL,
 |  | const UINT | uiCommand
 | ) |  |

Definition at line 25 of file HistoryObj.cpp.

                                  :
  m_strTitle (strTitle),
  m_strURL (strURL),
  m_uiCommand (uiCommand)
{
}

CHistoryObj::~CHistoryObj ( ) [virtual]

Definition at line 33 of file HistoryObj.cpp.

{
}

Member Function Documentation

UINT CHistoryObj::GetCommand ( ) const [inline]

Definition at line 29 of file HistoryObj.h.

  {
    return m_uiCommand;
  }

LPCTSTR CHistoryObj::GetTitle ( ) const [inline]

Definition at line 19 of file HistoryObj.h.

  {
    return m_strTitle;
  }

LPCTSTR CHistoryObj::GetURL ( ) const [inline]

Definition at line 24 of file HistoryObj.h.

  {
    return m_strURL;
  }

Member Data Documentation

const CString CHistoryObj::m_strTitle [protected]

Definition at line 35 of file HistoryObj.h.

const CString CHistoryObj::m_strURL [protected]

Definition at line 36 of file HistoryObj.h.

const UINT CHistoryObj::m_uiCommand [protected]

Definition at line 37 of file HistoryObj.h.

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/HistoryObj.h
  • vc2008fp/IEDemo/HistoryObj.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHTMLEdDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes

CHTMLEdDoc Class Reference

#include "HTMLEdDoc.h"

List of all members.

Public Member Functions

virtual | ~CHTMLEdDoc ()
BOOL | IsModified ()
void | OnCloseDocument ()
BOOL | OnNewDocument ()
BOOL | OnOpenDocument (LPCTSTR lpszFileName)
BOOL | OnSaveDocument (LPCTSTR lpszFileName)
BOOL | SaveMyDocument ()

Public Attributes

BOOL | m_bCallCloseDocument
BOOL | m_bCallNewDocument
BOOL | m_bDoSaveOnDocCom

Protected Member Functions

CHTMLEdDoc ()
afx_msg void | OnFileOpenurl ()

Private Attributes

CString | m_sSaveFileName

Detailed Description

Definition at line 23 of file HTMLEdDoc.h.

Constructor & Destructor Documentation

CHTMLEdDoc::CHTMLEdDoc ( ) [protected]

Definition at line 41 of file HTMLEdDoc.cpp.

{
  m_bDoSaveOnDocCom = FALSE;
  m_bCallNewDocument = FALSE;
  m_bCallCloseDocument = FALSE;
}

CHTMLEdDoc::~CHTMLEdDoc ( ) [virtual]

Definition at line 48 of file HTMLEdDoc.cpp.

{
}

Member Function Documentation

BOOL CHTMLEdDoc::IsModified ( )

Definition at line 144 of file HTMLEdDoc.cpp.

{
  //Whether in Source or Web view, whenever we edit, CDocument::SetModified get's called.
  return CDocument::IsModified();
}

void CHTMLEdDoc::OnCloseDocument ( )

Definition at line 101 of file HTMLEdDoc.cpp.

{
  //If the old document needs to be saved, and is waiting for a OnDocumentComplete,
  //OnCloseDocument waits for it to gets done
  if(m_bDoSaveOnDocCom)
  {
    m_bCallCloseDocument = TRUE;
    return;
  }

  CDocument::OnCloseDocument();
}

void CHTMLEdDoc::OnFileOpenurl ( ) [protected]

Definition at line 137 of file HTMLEdDoc.cpp.

{
  CGetURL dlg;
  if(IDOK==dlg.DoModal())
    OpenURL(dlg.m_URL);
}

BOOL CHTMLEdDoc::OnNewDocument ( )

Definition at line 73 of file HTMLEdDoc.cpp.

{
  //If the old document needs to be saved, and is waiting for a OnDocumentComplete,
  //OnNewDocument waits for it to gets done
  if(m_bDoSaveOnDocCom)
  {
    m_bCallNewDocument = TRUE;
    return FALSE;
  }

  BOOL bRet = CHtmlEditDoc::OnNewDocument();
  if (bRet)
  {
    // have to clear the source view too!
    CMainFrame *pFrm = (CMainFrame*)AfxGetMainWnd();
    if (pFrm)
    {
      CSourceView *pView = (CSourceView*)pFrm->GetSourceView();
      if (pView)
      {
        pView->NewDocument();
        pFrm->SwapView(ID_VIEW_WEB);
      }
    }
  }
  return bRet;
}

BOOL CHTMLEdDoc::OnOpenDocument ( LPCTSTR lpszFileName )

Definition at line 116 of file HTMLEdDoc.cpp.

{
  BOOL bRet = CHtmlEditDoc::OnOpenDocument(lpszFileName);
  if (bRet)
  {
    // have to clear the source view too!
    CMainFrame *pFrm = (CMainFrame*)AfxGetMainWnd();
    if (pFrm)
    {
      CSourceView *pView = (CSourceView*)pFrm->GetSourceView();
      if (pView)
      {
        pView->NewDocument();
        pFrm->SwapView(ID_VIEW_WEB);
      }
    }
  }

  return bRet;
}

BOOL CHTMLEdDoc::OnSaveDocument ( LPCTSTR lpszFileName )

Definition at line 152 of file HTMLEdDoc.cpp.

{
  CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();
  ASSERT_VALID(pFrame);

  if(pFrame->GetCurrentView()==ID_VIEW_SOURCE)
  {
    //UpdateView is asynchronous, so we wait for the CHTMLEdView::OnDocumentComplete event
    //to occur which indicates that the view has been updated, before saving the document
    CHTMLEdView* pWebView = (CHTMLEdView*)pFrame->GetWebView();
    ASSERT_VALID(pWebView);
    pWebView->UpdateView();
    m_sSaveFileName = lpszFileName;
    m_bDoSaveOnDocCom = TRUE;
  }
  else
  {
    //For web view, the document already contains the changes, so we directly save it
    m_sSaveFileName = lpszFileName;
    return SaveMyDocument();
  }
  return TRUE;
}

BOOL CHTMLEdDoc::SaveMyDocument ( )

Definition at line 176 of file HTMLEdDoc.cpp.

{
  return CHtmlEditDoc::OnSaveDocument(m_sSaveFileName);
}

Member Data Documentation

BOOL CHTMLEdDoc::m_bCallCloseDocument

Definition at line 35 of file HTMLEdDoc.h.

BOOL CHTMLEdDoc::m_bCallNewDocument

Definition at line 34 of file HTMLEdDoc.h.

BOOL CHTMLEdDoc::m_bDoSaveOnDocCom

Definition at line 33 of file HTMLEdDoc.h.

CString CHTMLEdDoc::m_sSaveFileName [private]

Definition at line 31 of file HTMLEdDoc.h.

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/HTMLEdDoc.h
  • internet/HTMLEdit/HTMLEdDoc.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHTMLEditApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CHTMLEditApp Class Reference

#include "htmledit.h"

List of all members.

Public Member Functions

CHTMLEditApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 30 of file htmledit.h.

Constructor & Destructor Documentation

CHTMLEditApp::CHTMLEditApp ( )

Definition at line 44 of file htmledit.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CHTMLEditApp::InitInstance ( ) [virtual]

Definition at line 58 of file htmledit.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // 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(CHTMLEdDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CHTMLEdView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileOpen)
  {
    cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;
  }

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CHTMLEditApp::OnAppAbout ( )

Definition at line 153 of file htmledit.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/htmledit.h
  • internet/HTMLEdit/htmledit.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHTMLEdView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CHTMLEdView Class Reference

#include "HTMLEdView.h"

List of all members.

Public Member Functions

virtual | ~CHTMLEdView ()
CHTMLEdDoc * GetDocument ()
void | OnContextMenuAction (long itemIndex)
void | OnDisplayChanged ()
void | OnDocumentComplete ()
virtual void | OnInitialUpdate ()
virtual HRESULT | OnShowContextMenu (DWORD dwID, LPPOINT ppt, LPUNKNOWN pcmdtReserved, LPDISPATCH pdispReserved)
void | OnUpdateBlockFmt (CCmdUI *pCmdUI)
void | OnUpdateColor (CCmdUI *pCmdUI)
virtual HRESULT | OnUpdateUI ()
void | UpdateView ()

Public Attributes

CFormatMenu * m_pFmtMenu

Protected Member Functions

CHTMLEdView ()
DECLARE_DHTMLEDITING_CMDMAP (CHTMLEdView)
virtual void | OnActivateView (BOOL bActivate, CView *pActivateView, CView *pDeactiveView)
void | OnEditBarNotify (NMHDR *pNMHDR, LRESULT *pResult)
void | OnFormatPopup (UINT)
void | OnUpdateToolbarButtons (CCmdUI *pCmdUI)
void | PopBlockFmtMenu ()
void | PopColorMenu ()
void | SetAbsPos (UINT)
void | SetStaticPos (UINT)
void | UpdateFontCombos ()

Protected Attributes

bool | m_bUserMode
CMenu * | m_pClrMenu
CString | m_prevFormat

Detailed Description

Definition at line 36 of file HTMLEdView.h.

Constructor & Destructor Documentation

CHTMLEdView::CHTMLEdView ( ) [protected]

Definition at line 89 of file HTMLEdView.cpp.

                        :m_bUserMode(true),
  m_pClrMenu(NULL),
  m_pFmtMenu(NULL)
{
}

CHTMLEdView::~CHTMLEdView ( ) [virtual]

Definition at line 95 of file HTMLEdView.cpp.

{
  if(m_pFmtMenu) delete m_pFmtMenu;
  if(m_pClrMenu) delete m_pClrMenu;
}

Member Function Documentation

CHTMLEdView::DECLARE_DHTMLEDITING_CMDMAP ( CHTMLEdView ) [protected]
CHTMLEdDoc * CHTMLEdView::GetDocument ( ) [inline]

Definition at line 99 of file HTMLEdView.h.

   { return (CHTMLEdDoc*)m_pDocument; }

void CHTMLEdView::OnActivateView | ( | BOOL | bActivate,
 |  | CView * | pActivateView,
 |  | CView * | pDeactiveView |
 | ) |  |  | [protected, virtual]

Definition at line 397 of file HTMLEdView.cpp.

{

  if(bActivate && pActivateView==this && pDeactiveView != this)
  {
    //we're being activated get the HTML from the WebView
    UpdateView();
  }

  CHtmlEditView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}

void CHTMLEdView::OnContextMenuAction ( long itemIndex )

Definition at line 199 of file HTMLEdView.cpp.

{
  switch(itemIndex)
  {
  case 0:
    CHtmlEditView::Cut();
    break;
  case 1:
    CHtmlEditView::Copy();
    break;
  case 2:
    CHtmlEditView::Paste();
    break;
  case 4:
    CHtmlEditView::SelectAll();
    break;
  }
}

void CHTMLEdView::OnDisplayChanged ( )
void CHTMLEdView::OnDocumentComplete ( )

Definition at line 128 of file HTMLEdView.cpp.

{
  CStringArray sa;
  GetBlockFormatNames(sa);
  //When in Source View, calling UpdateView to update the web view, causes
  //OnDocumentComplete to be fired. We check if the document is waiting for
  //this event to save itself
  if(((CHTMLEdDoc*)m_pDocument)->m_bDoSaveOnDocCom)
  {
    ((CHTMLEdDoc*)m_pDocument)->m_bDoSaveOnDocCom = FALSE;
    ((CHTMLEdDoc*)m_pDocument)->SaveMyDocument();

    //Since OnDocumentComplete is asynchronous, we have postponed OnNewDocument
    //till OnDocumentComplete is done, so that the old document gets saved before
    //the new one is loaded
    if(((CHTMLEdDoc*)m_pDocument)->m_bCallNewDocument)
    {
      ((CHTMLEdDoc*)m_pDocument)->m_bCallNewDocument = FALSE;
      ((CHTMLEdDoc*)m_pDocument)->OnNewDocument();
    }

    //Same logic as above for OnNewDocument
    if(((CHTMLEdDoc*)m_pDocument)->m_bCallCloseDocument)
    {
      ((CHTMLEdDoc*)m_pDocument)->m_bCallCloseDocument = FALSE;
      ((CHTMLEdDoc*)m_pDocument)->OnCloseDocument();
    }
  }
}

void CHTMLEdView::OnEditBarNotify | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 276 of file HTMLEdView.cpp.

{

  TBNOTIFY* pTBNotify = (TBNOTIFY*) pNMHDR;

  switch(pTBNotify->iItem)
  {
  case ID_BUTTON_BLOCKFMT:
    PopBlockFmtMenu();
    break;

  case ID_BUTTON_COLOR:
    PopColorMenu();
    break;

  default:
    break;
  }
}

void CHTMLEdView::OnFormatPopup ( UINT nCommandID ) [protected]

Definition at line 346 of file HTMLEdView.cpp.

{
  //format popup menu was hit
  //calculate the index into the format menu's string array
  int nIndex = nCommandID-FORMATBASE;
  CStringArray &sa = m_pFmtMenu->GetStringArray();
  SetBlockFormat(sa[nIndex]);
}

void CHTMLEdView::OnInitialUpdate ( ) [virtual]

Definition at line 218 of file HTMLEdView.cpp.

{
  CString strCmdLine(AfxGetApp()->m_lpCmdLine);
  CHTMLEdDoc * pDoc = NULL;
  if(strCmdLine != _T(""))
  {
    pDoc =(CHTMLEdDoc * )GetDocument();
    ENSURE(pDoc);
    pDoc->OnOpenDocument((LPCTSTR)strCmdLine);
  }
  CHtmlEditView::OnInitialUpdate();
}

HRESULT CHTMLEdView::OnShowContextMenu | ( | DWORD | dwID,
 |  | LPPOINT | ppt,
 |  | LPUNKNOWN | pcmdtReserved,
 |  | LPDISPATCH | pdispReserved |
 | ) |  |  | [virtual]

Definition at line 169 of file HTMLEdView.cpp.

{
  CMenu *pMenuMain = AfxGetMainWnd()->GetMenu();
  CMenu *pPopup = pMenuMain->GetSubMenu(1);

  // enable/disable items based on the status of the command
  UINT nCount = pPopup->GetMenuItemCount();
  for (UINT i = 0; i<nCount; i++)
  {
    int nID = (int)pPopup->GetMenuItemID(i);
    if (nID != 0 && nID != -1)
    {
      BOOL bHasFunc;
      UINT uiElemType;
      UINT dhtmlCmdID = GetDHtmlCommandMapping(nID, bHasFunc, uiElemType);
      long nStatus = QueryStatus(dhtmlCmdID);
      if (!(nStatus & OLECMDF_ENABLED))
      {
        pPopup->EnableMenuItem(nID, MF_DISABLED|MF_GRAYED);
      }
      else
        pPopup->EnableMenuItem(nID, MF_ENABLED);
    }
  }
  pPopup->TrackPopupMenu(TPM_LEFTALIGN, ppt->x, ppt->y, this);
  return S_OK;
}

void CHTMLEdView::OnUpdateBlockFmt ( CCmdUI * pCmdUI )

Definition at line 68 of file HTMLEdView.cpp.

{
  pCmdUI->Enable(QueryStatus(IDM_BLOCKFMT) & OLECMDF_ENABLED);
}

void CHTMLEdView::OnUpdateColor ( CCmdUI * pCmdUI )

Definition at line 73 of file HTMLEdView.cpp.

{
  if (QueryStatus(IDM_FORECOLOR) & OLECMDF_ENABLED)
    pCmdUI->Enable();
}

void CHTMLEdView::OnUpdateToolbarButtons ( CCmdUI * pCmdUI ) [protected]
HRESULT CHTMLEdView::OnUpdateUI ( ) [virtual]

Definition at line 157 of file HTMLEdView.cpp.

{
  long id = GetDlgCtrlID();
  if(id==AFX_IDW_PANE_LAST) //we change the ID if we hide this window
    return S_OK;
  if(S_OK == GetIsDirty())
    GetDocument()->SetModifiedFlag();
  UpdateFontCombos();
  AfxGetMainWnd()->PostMessage(WM_KICKIDLE);
  return S_OK;
}

void CHTMLEdView::PopBlockFmtMenu ( ) [protected]

Definition at line 296 of file HTMLEdView.cpp.

{
  //re-create the popup menu every time through here
  //in case block formats change.
  if(!m_pFmtMenu)
  {
    m_pFmtMenu = new CFormatMenu;
    if(m_pFmtMenu)
    {
      if(!m_pFmtMenu->CreatePopupMenu())
        return;
    }
    else
      return;

  }
  else
  {
    m_pFmtMenu->DestroyMenu();
    if(!m_pFmtMenu->CreatePopupMenu())
      return;
  }

  m_pFmtMenu->ClearStringArray();
  CStringArray &ar = m_pFmtMenu->GetStringArray();
  CString curFmt;

  if(!SUCCEEDED(GetBlockFormatNames(ar)) || !SUCCEEDED(GetBlockFormat(curFmt)) )
    return;
  int nFlags;
  int arSz = (int)ar.GetSize();
  for(int i = 0; i < arSz; i++)
  {
    nFlags = MF_STRING|MF_ENABLED;
    if(ar[i] == curFmt)
      nFlags |= MF_CHECKED;
    m_pFmtMenu->AppendMenu(nFlags,FORMATBASE+i,ar[i]);
  }

  //get the rect for menu
  CMainFrame *pFrame = (CMainFrame*)GetParentFrame();
  ASSERT_VALID(pFrame);
  CRect rc;
  pFrame->m_wndEditBar.GetItemRect(2,rc);
  pFrame->m_wndEditBar.ClientToScreen(rc);

  m_pFmtMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,
                rc.left+3,rc.bottom,this);

}

void CHTMLEdView::PopColorMenu ( ) [protected]

Definition at line 370 of file HTMLEdView.cpp.

{
  //get the rect for menu
  CMainFrame *pFrame = (CMainFrame*)GetParentFrame();
  ASSERT_VALID(pFrame);
  CRect *prc = new CRect;
  if(!prc) return;

  pFrame->m_wndEditBar.GetItemRect(6,prc);
  pFrame->m_wndEditBar.ClientToScreen(prc);

  CColorDialog dlg;
  dlg.m_cc.Flags |= CC_ENABLEHOOK;
  dlg.m_cc.lpfnHook = CdlgHook;
  dlg.m_cc.lCustData = (LONG_PTR)prc;

  if(dlg.DoModal()==IDOK)
  {
    CString szColor;
    COLORREF cr = dlg.GetColor();

    //change the COLORREF into an RGB.
    szColor.Format(_T("%.2x%.2x%.2x"),GetRValue(cr),GetGValue(cr),GetBValue(cr));
    SetForeColor(szColor);
  }
}

void CHTMLEdView::SetAbsPos ( UINT ) [protected]

Definition at line 79 of file HTMLEdView.cpp.

{
  SetAbsolutePosition(true);
}

void CHTMLEdView::SetStaticPos ( UINT ) [protected]

Definition at line 84 of file HTMLEdView.cpp.

{
  SetAbsolutePosition(false);
}

void CHTMLEdView::UpdateFontCombos ( ) [protected]

Definition at line 231 of file HTMLEdView.cpp.

{
  CString szResult,szCurFmt;
  int nSel;
  short nCurSize;

  CMainFrame *pFrame = (CMainFrame*)GetParentFrame();
  ASSERT_VALID(pFrame);

  //Set font face
  CComboBox *pCombo = (CComboBox*)pFrame->GetFontNameCombo();
  ASSERT_VALID(pCombo);
  pCombo->GetWindowText(szCurFmt);
  GetFontFace(szResult);
  //only update the combo it isn't in the dropped state
  //and the font name has changed
  if(!pCombo->GetDroppedState() && szCurFmt!=szResult)
  {

    nSel = pCombo->FindString(0,szResult);
    if(nSel != CB_ERR)
      pCombo->SetCurSel(nSel);
  }

  //Set font size
  pCombo = (CComboBox*)pFrame->GetFontSizeCombo();
  ASSERT_VALID(pCombo);
  short nSize = 0;
  nCurSize = 0;

  GetFontSize(nSize);
  //only update the size combo if it is not in the
  //dropped down state.
  if(!pCombo->GetDroppedState())
  {
    szResult.Empty();
    _itot_s(nSize,szResult.GetBuffer(5), 5, 10);
    nSel = pCombo->FindString(0,(LPCTSTR) szResult);
    szResult.ReleaseBuffer();
    if(nSel != CB_ERR)
      pCombo->SetCurSel(nSel);
  }
}

void CHTMLEdView::UpdateView ( )

Definition at line 409 of file HTMLEdView.cpp.

{
  CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();
  ASSERT_VALID(pFrame);

  CSourceView* pSrcView = (CSourceView*)pFrame->GetSourceView();
  ASSERT_VALID(pSrcView);
  CString szHTML;
  pSrcView->GetWindowText(szHTML);
  if(szHTML.GetLength() > 0)
    SetDocumentHTML(szHTML);
}

Member Data Documentation

bool CHTMLEdView::m_bUserMode [protected]

Definition at line 43 of file HTMLEdView.h.

CMenu* CHTMLEdView::m_pClrMenu [protected]

Definition at line 86 of file HTMLEdView.h.

CFormatMenu* CHTMLEdView::m_pFmtMenu

Definition at line 63 of file HTMLEdView.h.

CString CHTMLEdView::m_prevFormat [protected]

Definition at line 87 of file HTMLEdView.h.

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/HTMLEdView.h
  • internet/HTMLEdit/HTMLEdView.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHueLeader Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CHueLeader Class Reference

#include "Swarm.h"

Inherits CLeader.

List of all members.

Public Member Functions

CHueLeader ()
virtual COLORREF | GetInitialLlamaColor ()
virtual COLORREF | GetLlamaColor (COLORREF oldColor)
virtual void | Tick ()

Private Attributes

COLORREF | m_ColorTable [256]
int | m_nColorCounter

Detailed Description

Definition at line 116 of file Swarm.h.

Constructor & Destructor Documentation

CHueLeader::CHueLeader ( )

Definition at line 292 of file Swarm.cpp.

{
  BYTE hue = (BYTE)Random(256);
    for (int i = 0; i <= 127; i++) {
    int j = min(i+32, 127);
        m_ColorTable[i] = HSB(hue, 255, (BYTE)j*2);
    }
    for (int i = 128; i <= 255; i++) {
    int j = max(i-32, 128);
        m_ColorTable[i] = HSB(hue, 255, (BYTE)(511-j*2));
    }
  m_nColorCounter = Random(256);
}

Member Function Documentation

COLORREF CHueLeader::GetInitialLlamaColor ( ) [virtual]

Implements CLeader.

Definition at line 318 of file Swarm.cpp.

{
  return(m_ColorTable[m_nColorCounter]);
}

COLORREF CHueLeader::GetLlamaColor ( COLORREF oldColor ) [virtual]

Implements CLeader.

Definition at line 313 of file Swarm.cpp.

{
  return(m_ColorTable[m_nColorCounter]);
}

void CHueLeader::Tick ( ) [virtual]

Reimplemented from CLeader.

Definition at line 306 of file Swarm.cpp.

{
  if (++m_nColorCounter > 255)
    m_nColorCounter = 0;
  __super::Tick();
}

Member Data Documentation

COLORREF CHueLeader::m_ColorTable[256] [private]

Definition at line 124 of file Swarm.h.

int CHueLeader::m_nColorCounter [private]

Definition at line 125 of file Swarm.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/Swarm.h
  • general/MMXSwarm/Swarm.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CHuskApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CHuskApp Class Reference

#include "dllhusk.h"

List of all members.

Public Member Functions

CHuskApp ()
BOOL | CreateListOutput ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
afx_msg void | OnDumpClasses ()
afx_msg void | OnDumpDLLs ()
afx_msg void | OnDumpDocTemplates ()
afx_msg void | OnDumpObjects ()

Public Attributes

CListOutputFrame * m_pListOut

Detailed Description

Definition at line 25 of file dllhusk.h.

Constructor & Destructor Documentation

CHuskApp::CHuskApp ( )

Definition at line 45 of file dllhusk.cpp.

{
  m_pListOut = NULL;
}

Member Function Documentation

BOOL CHuskApp::CreateListOutput ( )

Definition at line 110 of file dllhusk.cpp.

{
  m_pListOut = new CListOutputFrame;
      // all objects are allocated on the application's heap,
      //  even CListOutputFrame which is defined in another DLL

  CRect rectOriginal(250, 0, 600, 300);
      // hard-coded initial position

  if (!m_pListOut->Create(_T("List Output"),
      WS_OVERLAPPEDWINDOW | WS_CHILD | WS_VISIBLE,
      rectOriginal, (CMDIFrameWnd*)m_pMainWnd))
  {
    AfxMessageBox(_T("Failed to create ListOutput Window"));
    m_pListOut = NULL;  // just in case (Create will delete the C++ object)
    return FALSE;
  }

  m_pListOut->SetBackpointer(&m_pListOut);
  return TRUE;
}

BOOL CHuskApp::InitInstance ( ) [virtual]

Definition at line 58 of file dllhusk.cpp.

{
  // Standard initialization

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME)){
    delete pMainFrame; //clean up
    return FALSE;
  }

  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();
  m_pMainWnd = pMainFrame;

  // Initialize DLLs - will add doc templates and make other class
  //   implementations available to this application
  InitTestDLL1();
  InitTestDLL2();

  CreateListOutput();

  if (m_lpCmdLine[0] == '\0')
  {
    if (m_pListOut != NULL)
      m_pListOut->AddString(_T("Attempting to create a new document"));
    // create a new (empty) document
    OnFileNew();
  }
  else
  {
    if (m_pListOut != NULL)
      m_pListOut->AddString(_T("Attempting to open an existing document"));
    // open an existing document
    OpenDocumentFile(m_lpCmdLine);
  }

#ifdef _DEBUG
  if (m_pListOut != NULL)
  {
    m_pListOut->AddString(_T(""));
    m_pListOut->AddString(_T("Click the Right-Mouse-Button over"));
    m_pListOut->AddString(_T(" the main TitleBar for diagnostic menu"));
    m_pListOut->AddString(_T(""));
  }
#endif
  return TRUE;
}

void CHuskApp::OnAppAbout ( )

Definition at line 135 of file dllhusk.cpp.

{
  if (m_pListOut != NULL)
    m_pListOut->AddString(_T("CHuskApp::OnAppAbout called"));
  CDialog(IDD_ABOUTBOX).DoModal();
}

void CHuskApp::OnDumpClasses ( )

Definition at line 164 of file dllhusk.cpp.

{
#ifdef _DEBUG
  if (m_pListOut == NULL && !CreateListOutput())
    return; // no output window
  m_pListOut->AddString(_T("Dump of all classes:"));
  AfxDoForAllClasses(DumpClassProc, m_pListOut);
  m_pListOut->AddString(_T(""));
#endif
}

void CHuskApp::OnDumpDLLs ( )

Definition at line 209 of file dllhusk.cpp.

{
#ifdef _DEBUG
  if (m_pListOut == NULL && !CreateListOutput())
    return; // no output window
  m_pListOut->AddString(_T("Dump of DLLs in resource search order"));
  AFX_MODULE_STATE* pState = AfxGetModuleState();
  CDynLinkLibrary* pDLL = NULL;
  for (pDLL = pState->m_libraryList; pDLL != NULL;
    pDLL = pDLL->m_pNextDLL)
  {
    // get module name
    TCHAR szName[255];
    DWORD dwRet = 0;
    dwRet = ::GetModuleFileName(pDLL->m_hModule, szName, sizeof(szName));
    TCHAR szT[256];

    // count classes
    int nClasses = 0;
    for (CRuntimeClass* pClass = pDLL->m_classList;
      pClass != NULL; pClass = pClass->m_pNextClass)
      nClasses++;

    // count factories
    int nFactories = 0;
  #ifndef _AFX_NO_OLE_SUPPORT
    for (COleObjectFactory* pFactory = pDLL->m_factoryList;
      pFactory != NULL; pFactory = pFactory->m_pNextFactory)
      nFactories++;
  #endif

    _stprintf_s(szT, 256, _T("    Module %s has %d classes and %d factories"),
      szName, nClasses, nFactories);
    m_pListOut->AddString(szT);
  }
  m_pListOut->AddString(_T(""));
#endif
}

void CHuskApp::OnDumpDocTemplates ( )

Definition at line 175 of file dllhusk.cpp.

{
#ifdef _DEBUG
  if (m_pListOut == NULL && !CreateListOutput())
    return; // no output window
  m_pListOut->AddString(_T("Dump of all Doc Templates:"));
  POSITION pos = GetFirstDocTemplatePosition();
  while (pos != NULL)
  {
    CDocTemplate* pTemplate = GetNextDocTemplate(pos);
    CString str;
    TCHAR szT[128];
    if (pTemplate->GetDocString(str, CDocTemplate::fileNewName))
      _stprintf_s(szT, 128, _T("    Template for %s documents"), (LPCTSTR)str);
    else
      _stprintf_s(szT, 128, _T("    Unknown DocTemplate at $%08lX"),
        (LONG_PTR)(void*)pTemplate);
    m_pListOut->AddString(szT);
  }
  m_pListOut->AddString(_T(""));
#endif
}

void CHuskApp::OnDumpObjects ( )

Definition at line 198 of file dllhusk.cpp.

{
#ifdef _DEBUG
  if (m_pListOut == NULL && !CreateListOutput())
    return; // no output window
  m_pListOut->AddString(_T("Dump of all heap Objects"));
  AfxDoForAllObjects(DumpObjectProc, m_pListOut);
  m_pListOut->AddString(_T(""));
#endif
}

Member Data Documentation

CListOutputFrame* CHuskApp::m_pListOut

Definition at line 31 of file dllhusk.h.

The documentation for this class was generated from the following files:
  • advanced/dllhusk/dllhusk.h
  • advanced/dllhusk/dllhusk.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIconCombo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CIconCombo Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CIconCombo (CMFCToolBarImages &imageListIcons, CStringList &lstIconNames)
virtual | ~CIconCombo ()

Protected Member Functions

afx_msg void | OnDrawItem (int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)

Protected Attributes

CMFCToolBarImages & | m_imageListIcons
CStringList & | m_lstIconNames

Detailed Description

Definition at line 125 of file CustomProperties.h.

Constructor & Destructor Documentation

CIconCombo::CIconCombo | ( | CMFCToolBarImages & | imageListIcons,
 |  | CStringList & | lstIconNames
 | ) |  |

Definition at line 435 of file CustomProperties.cpp.

                                                                                :
  m_imageListIcons(imageListIcons), m_lstIconNames(lstIconNames)
{
}

CIconCombo::~CIconCombo ( ) [virtual]

Definition at line 440 of file CustomProperties.cpp.

{
}

Member Function Documentation

void CIconCombo::OnDrawItem | ( | int | nIDCtl,
 |  | LPDRAWITEMSTRUCT | lpDrawItemStruct |
 | ) |  |  | [protected]

Definition at line 454 of file CustomProperties.cpp.

{
  CDC* pDC = CDC::FromHandle(lpDIS->hDC);
  ASSERT_VALID(pDC);

  CRect rect = lpDIS->rcItem;
  int nIcon = lpDIS->itemID;

  HBRUSH brBackground;
  COLORREF clText;

  if (lpDIS->itemState & ODS_SELECTED)
  {
    brBackground = GetSysColorBrush(COLOR_HIGHLIGHT);
    clText = afxGlobalData.clrTextHilite;
  }
  else
  {
    brBackground = GetSysColorBrush(COLOR_WINDOW);
    clText = afxGlobalData.clrWindowText;
  }

  if (lpDIS->itemAction &(ODA_DRAWENTIRE | ODA_SELECT))
  {
    ::FillRect(lpDIS->hDC, &rect, brBackground);
  }

  if (nIcon < 0)
  {
    return;
  }

  CAfxDrawState ds;
  m_imageListIcons.PrepareDrawImage(ds);
  m_imageListIcons.Draw(pDC, rect.left + nIconMargin, rect.top + nIconMargin, nIcon);
  m_imageListIcons.EndDrawImage(ds);

  if (!m_lstIconNames.IsEmpty())
  {
    CString str = m_lstIconNames.GetAt(m_lstIconNames.FindIndex(nIcon));
    CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontRegular);

    pDC->SetBkMode(TRANSPARENT);
    pDC->SetTextColor(clText);

    CRect rectText = rect;
    rectText.left += m_imageListIcons.GetImageSize().cx + 2 * nIconMargin;

    pDC->DrawText(str, rectText, DT_SINGLELINE | DT_VCENTER);

    pDC->SelectObject(pOldFont);
  }
}

void CIconCombo::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct |
 | ) |  |  | [protected]

Definition at line 508 of file CustomProperties.cpp.

{
  int nTextWidth = 0;
  int nTextHeight = 0;

  if (!m_lstIconNames.IsEmpty())
  {
    nTextHeight = afxGlobalData.GetTextHeight();

    CClientDC dc(this);
    CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);

    for (POSITION pos = m_lstIconNames.GetHeadPosition(); pos != NULL;)
    {
      CString str = m_lstIconNames.GetNext(pos);

      nTextWidth = max(nTextWidth, dc.GetTextExtent(str).cx + nIconMargin);
    }

    dc.SelectObject(pOldFont);
  }

  lpMeasureItemStruct->itemWidth = m_imageListIcons.GetImageSize().cx + nTextWidth + 2 * nIconMargin;
  lpMeasureItemStruct->itemHeight = max(nTextHeight, m_imageListIcons.GetImageSize().cy + 2 * nIconMargin);
}

Member Data Documentation

CMFCToolBarImages& CIconCombo::m_imageListIcons [protected]

Definition at line 133 of file CustomProperties.h.

CStringList& CIconCombo::m_lstIconNames [protected]

Definition at line 134 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIconComboBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CIconComboBox Class Reference

#include "IconComboBox.h"

List of all members.

Public Member Functions

CIconComboBox (CMFCToolBarImages &Icons)
virtual | ~CIconComboBox ()
virtual int | CompareItem (LPCOMPAREITEMSTRUCT lpCompareItemStruct)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMeasureItemStruct)

Protected Attributes

CMFCToolBarImages & | m_Icons

Detailed Description

Definition at line 16 of file IconComboBox.h.

Constructor & Destructor Documentation

CIconComboBox::CIconComboBox ( CMFCToolBarImages & Icons )

Definition at line 24 of file IconComboBox.cpp.

                                                     :
  m_Icons (Icons)
{
}

CIconComboBox::~CIconComboBox ( ) [virtual]

Definition at line 29 of file IconComboBox.cpp.

{
}

Member Function Documentation

int CIconComboBox::CompareItem ( LPCOMPAREITEMSTRUCT lpCompareItemStruct ) [virtual]

Definition at line 40 of file IconComboBox.cpp.

{
  // TODO: Add your code to determine the sorting order of the specified items
  // return -1 = item 1 sorts before item 2
  // return 0 = item 1 and item 2 sort the same
  // return 1 = item 1 sorts after item 2

  return 0;
}

void CIconComboBox::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Definition at line 50 of file IconComboBox.cpp.

{
  CDC* pDC= CDC::FromHandle (lpDIS->hDC);
  ASSERT_VALID (pDC);

  HBRUSH    brBackground;
  COLORREF  clText;

  if (lpDIS->itemState & ODS_SELECTED)
  {
    brBackground = GetSysColorBrush (COLOR_HIGHLIGHT);
    clText = afxGlobalData.clrTextHilite;
  }
  else
  {
    brBackground = GetSysColorBrush (COLOR_WINDOW);
    clText = afxGlobalData.clrWindowText;
  }

  CRect rectItem = lpDIS->rcItem;
  ::FillRect (lpDIS->hDC, &rectItem, brBackground);

  int nIndex = lpDIS->itemID;

  if (nIndex > 0)
  {
    CAfxDrawState ds;
    m_Icons.SetTransparentColor (afxGlobalData.clrBarFace);
    m_Icons.PrepareDrawImage (ds);
    m_Icons.Draw (pDC, rectItem.left + 1, rectItem.top + 1, nIndex - 1);
    m_Icons.EndDrawImage (ds);
  }

  CString strText;
  GetLBText (nIndex, strText);

  CRect rectText = rectItem;
  rectText.left += 20;

  CFont* pOldFont = pDC->SelectObject (&afxGlobalData.fontRegular);

  pDC->SetBkMode (TRANSPARENT);
  pDC->SetTextColor (clText);

  pDC->DrawText (strText, rectText, DT_SINGLELINE | DT_VCENTER);

  pDC->SelectObject (pOldFont);
}

void CIconComboBox::MeasureItem ( LPMEASUREITEMSTRUCT lpMeasureItemStruct ) [virtual]

Definition at line 99 of file IconComboBox.cpp.

{
  lpMIS->itemHeight = 18;
  lpMIS->itemWidth = 18;
}

Member Data Documentation

CMFCToolBarImages& CIconComboBox::m_Icons [protected]

Definition at line 24 of file IconComboBox.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DesktopAlertDemo/IconComboBox.h
  • vc2008fp/DesktopAlertDemo/IconComboBox.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIconListProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CIconListProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CIconListProp (const CString &strName, const CImageList &imageListIcons, int nSelectedIcon, CStringList *plstIconNames=NULL, LPCTSTR lpszDescr=NULL, DWORD dwData=0)

Protected Member Functions

virtual CComboBox * | CreateCombo (CWnd *pWndParent, CRect rect)
virtual CWnd * | CreateInPlaceEdit (CRect rectEdit, BOOL &bDefaultFormat)
virtual void | OnDrawValue (CDC *pDC, CRect rect)

Protected Attributes

CMFCToolBarImages | m_imageListIcons
CStringList | m_lstIconNames

Detailed Description

Definition at line 108 of file CustomProperties.h.

Constructor & Destructor Documentation

CIconListProp::CIconListProp | ( | const CString & | strName,
 |  | const CImageList & | imageListIcons,
 |  | int | nSelectedIcon,
 |  | CStringList * | plstIconNames = NULL,
 |  | LPCTSTR | lpszDescr = NULL,
 |  | DWORD | dwData = 0
 | ) |  |

Definition at line 338 of file CustomProperties.cpp.

                                                                                :
  CMFCPropertyGridProperty(strName, (long) nSelectedIcon, lpszDescr, dwData)
{
  m_imageListIcons.CreateFromImageList(imageListIcons);
  m_imageListIcons.SetTransparentColor(::GetSysColor(COLOR_3DFACE));

  if (plstIconNames != NULL)
  {
    m_lstIconNames.AddTail(plstIconNames);
    ASSERT(m_lstIconNames.GetCount() == m_imageListIcons.GetCount());
  }

  for (int i = 0; i < m_imageListIcons.GetCount(); i++)
  {
    CString strItem;
    strItem.Format(_T("%d"), i);

    AddOption(strItem);
  }

  AllowEdit(FALSE);
}

Member Function Documentation

CComboBox * CIconListProp::CreateCombo | ( | CWnd * | pWndParent,
 |  | CRect | rect |
 | ) |  |  | [protected, virtual]

Definition at line 361 of file CustomProperties.cpp.

{
  rect.bottom = rect.top + 400;

  CIconCombo* pWndCombo = new CIconCombo(m_imageListIcons, m_lstIconNames);
  if (!pWndCombo->Create(WS_CHILD | CBS_NOINTEGRALHEIGHT | CBS_DROPDOWNLIST | WS_VSCROLL | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS, rect, pWndParent, AFX_PROPLIST_ID_INPLACE))
  {
    delete pWndCombo;
    return NULL;
  }

  return pWndCombo;
}

CWnd * CIconListProp::CreateInPlaceEdit | ( | CRect | rectEdit,
 |  | BOOL & | bDefaultFormat |
 | ) |  |  | [protected, virtual]

Definition at line 421 of file CustomProperties.cpp.

{
  CWnd* pWnd = CMFCPropertyGridProperty::CreateInPlaceEdit(rectEdit, bDefaultFormat);
  if (pWnd != NULL)
  {
    pWnd->ShowWindow(SW_HIDE);
  }

  return pWnd;
}

void CIconListProp::OnDrawValue | ( | CDC * | pDC,
 |  | CRect | rect |
 | ) |  |  | [protected, virtual]

Definition at line 375 of file CustomProperties.cpp.

{
  ASSERT_VALID(m_pWndList);
  ASSERT_VALID(pDC);

  CString strVal = (LPCTSTR)(_bstr_t) m_varValue;
  if (strVal.IsEmpty() || m_imageListIcons.GetCount() == 0)
  {
    return;
  }

  int nIndex = _ttoi(strVal);

  if (nIndex < 0)
  {
    return;
  }

  COLORREF clrTextOld = pDC->GetTextColor();

  CFont* pOldFont = pDC->SelectObject(IsModified() && m_pWndList->IsMarkModifiedProperties() ? &m_pWndList->GetBoldFont() : m_pWndList->GetFont());

  CRect rectImage = rect;
  rectImage.right = rectImage.left + rectImage.Height();
  rectImage.DeflateRect(1, 1);

  CAfxDrawState ds;
  m_imageListIcons.PrepareDrawImage(ds, rectImage.Size());
  m_imageListIcons.Draw(pDC, rectImage.left, rectImage.top, nIndex);
  m_imageListIcons.EndDrawImage(ds);

  if (!m_lstIconNames.IsEmpty())
  {
    CString str = m_lstIconNames.GetAt(m_lstIconNames.FindIndex(nIndex));

    rect.left = rectImage.right + 2 * nIconMargin;

    pDC->DrawText(str, rect, DT_SINGLELINE | DT_VCENTER);
  }

  pDC->SetTextColor(clrTextOld);
  pDC->SelectObject(pOldFont);

  m_bValueIsTruncated = FALSE;
}

Member Data Documentation

CMFCToolBarImages CIconListProp::m_imageListIcons [protected]

Definition at line 118 of file CustomProperties.h.

CStringList CIconListProp::m_lstIconNames [protected]

Definition at line 119 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIDataObjectDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

CIDataObjectDlg Class Reference

#include "idataobj.h"

List of all members.

Public Member Functions

CIDataObjectDlg (HWND hwnd, LPDATAOBJECT lpDO, REFIID riid, LPTSTR lpszName)
~CIDataObjectDlg ()
int | DoModal (void)

Public Attributes

DWORD | m_advf
HWND | m_btnDoGetData
HWND | m_btnSetupAdvise
UINT m_cchOutput
HWND | m_chkDump
HWND | m_chkPrimeFirst
HWND | m_chkUpdateDisplay
UINT m_cLinesOutput
DWORD | m_cOnDataChanges
DWORD | m_dwConn
DWORD | m_dwTime
HWND | m_edtAdvise
BOOL | m_fDoOnGetDataPosted
FORMATETC | m_fetc
BOOL | m_fUpdateDisplay
HWND | m_hDlg
HWND | m_hWndParent
HWND | m_lbFmtEtc
HWND | m_lbGetData
LPDATAOBJECT | m_lpDO
LPTSTR | m_lpszName
METAFILEPICT | m_MetaFile
CImpIAdviseSink FAR * | m_pSink
TCHAR | m_szOutput [CCHOUTPUTMAX]

Protected Member Functions

int | AddItem (UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType, int cColumns, LPCOLUMNSTRUCT rgCol)
int | AddItem (UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType)
int | AddItem (UINT nLevel, LPTSTR sz, LPVOID lpData)
BOOL | DoIDataObject (UINT nLevel, LPDATAOBJECT pI)
BOOL | DoIEnumFormatEtc (UINT nLevel, LPENUMFORMATETC pI)
HRESULT | GotData (LPFORMATETC lpfetc, LPSTGMEDIUM lpstm)
void | OnDblClkFormatEtc ()
void | OnDestroy ()
void | OnDoGetData ()
void | OnDrawItem (int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
BOOL | OnInitDialog ()
void | OnKillAdvise ()
void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
void | OnOutputBufferHasData ()
void | OnSelChangeFormatEtc ()
void | OnSetupAdvise ()
void | OnSize (UINT nType, int cx, int cy)
BOOL | WriteToOutput (LPTSTR lpsz)

Friends

class | CImpIAdviseSink
BOOL CALLBACK | fnIDataObjectDlg (HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)

Detailed Description

Definition at line 45 of file idataobj.h.

Constructor & Destructor Documentation

CIDataObjectDlg::CIDataObjectDlg | ( | HWND | hwnd,
 |  | LPDATAOBJECT | lpDO,
 |  | REFIID | riid,
 |  | LPTSTR | lpszName
 | ) |  |

Definition at line 50 of file idataobj.cpp.

{
  m_lbFmtEtc = NULL ;
  m_edtAdvise = NULL ;
  m_MetaFile.hMF = NULL ;

  m_hWndParent = hwnd ;
  m_lpDO = lpDO ;
  m_lpszName = lpszName ;

  m_pSink = NULL ;
  m_dwConn = 0 ;
  m_advf = ADVF_PRIMEFIRST ;

  m_fetc.cfFormat = CF_TEXT ;
  m_fetc.dwAspect = DVASPECT_CONTENT ;
  m_fetc.ptd = NULL ;
  m_fetc.tymed = TYMED_HGLOBAL ;
  m_fetc.lindex = - 1 ;

  m_fDoOnGetDataPosted = FALSE ;

  m_cchOutput = 0 ;
  m_cLinesOutput = 0 ;
}

CIDataObjectDlg::~CIDataObjectDlg ( )

Definition at line 76 of file idataobj.cpp.

{
  if (m_MetaFile.hMF != NULL)
    DeleteMetaFile( m_MetaFile.hMF ) ;
}

Member Function Documentation

int CIDataObjectDlg::AddItem | ( | UINT | nLevel,
 |  | LPTSTR | sz,
 |  | LPVOID | lpData,
 |  | UINT | uiType,
 |  | int | cColumns,
 |  | LPCOLUMNSTRUCT | rgCol |
 | ) |  |  | [protected]

Definition at line 903 of file idataobj.cpp.

{
  int i ;
  LPITEMDATA      lpID ;

  i = ListBox_AddString( m_lbFmtEtc,  sz ) ;
  lpID = new ITEMDATA ;
  lpID->uiType = uiType ;
  lpID->cColumns = cColumns ;
  lpID->rgCol = rgCol ;
  lpID->nLevel = nLevel ;
  lpID->lpData = lpData ;
  ListBox_SetItemData( m_lbFmtEtc, i, (DWORD_PTR)lpID ) ;
  return i ;
}

int CIDataObjectDlg::AddItem | ( | UINT | nLevel,
 |  | LPTSTR | sz,
 |  | LPVOID | lpData,
 |  | UINT | uiType |
 | ) |  |  | [protected]

Definition at line 919 of file idataobj.cpp.

{
  return AddItem( nLevel, sz, lpData, uiType, 0, NULL ) ;
}

int CIDataObjectDlg::AddItem | ( | UINT | nLevel,
 |  | LPTSTR | sz,
 |  | LPVOID | lpData |
 | ) |  |  | [protected]

Definition at line 924 of file idataobj.cpp.

{
  return AddItem( nLevel, sz, lpData, I_NORMAL, 0, NULL ) ;
}

BOOL CIDataObjectDlg::DoIDataObject | ( | UINT | nLevel,
 |  | LPDATAOBJECT | pI |
 | ) |  |  | [protected]

Definition at line 631 of file idataobj.cpp.

{
  LPENUMFORMATETC pEFE = NULL ;
  HRESULT     hr1 ;

  hr1 = pIDataObject->EnumFormatEtc( DATADIR_GET, &pEFE ) ;
  if (SUCCEEDED( hr1 ))
  {
    if (pEFE == NULL)
    {
      AfxMessageBox(_T("IDataObject::EnumFormatEtc returned success, but returned IEnumFORMATETC pointer is NULL.")) ;
      AddItem( nLevel, _T( "<<DATA_DIRGET failed>>" ), NULL, I_LABEL ) ;
      return FALSE ;
    }

    DoIEnumFormatEtc( nLevel, pEFE ) ;
    pEFE->Release() ;
  }
  else
    AddItem( nLevel, _T( "<<DATA_DIRGET failed>>" ), NULL, I_LABEL ) ;

  if (SUCCEEDED(hr1))
  {
    ListBox_SetCurSel( m_lbFmtEtc, 0 ) ;
    OnSelChangeFormatEtc() ;
  }
  return TRUE ;
}

BOOL CIDataObjectDlg::DoIEnumFormatEtc | ( | UINT | nLevel,
 |  | LPENUMFORMATETC | pI |
 | ) |  |  | [protected]

Definition at line 664 of file idataobj.cpp.

{
  LPCOLUMNSTRUCT  rgCol = new COLUMNSTRUCT[5] ;
  UINT    cxChar ;
  HDC     hdc  = GetDC( NULL) ;

  // We use the "ColumnTextOut" code in util.c to create nice
  // columns in our list box.
  //
  HFONT hFont = (HFONT)SelectObject( hdc, g_hFontBold ) ;
  cxChar = GetTextMetricsCorrectly( hdc, NULL ) ;
  rgCol[0].nLeft = 0 ;
  rgCol[0].nRight = cxChar * lstrlen( _T( "CF_METAFILEPICT_" ) ) ;
  rgCol[0].uiFlags = DT_LEFT ;

  rgCol[1].nLeft = rgCol[0].nRight + cxChar ;
  rgCol[1].nRight = rgCol[1].nLeft + cxChar * lstrlen( _T( "0000:0000_" ) ) ;
  rgCol[1].uiFlags = DT_LEFT ;

  rgCol[2].nLeft = rgCol[1].nRight + cxChar ;
  rgCol[2].nRight = rgCol[2].nLeft + cxChar * lstrlen( _T( "THUMBNAIL_" ) ) ;
  rgCol[2].uiFlags = DT_LEFT ;

  rgCol[3].nLeft = rgCol[2].nRight + cxChar ;
  rgCol[3].nRight = rgCol[3].nLeft + cxChar * lstrlen( _T( "0000:0000_" ) ) ;
  rgCol[3].uiFlags = DT_LEFT ;

  rgCol[4].nLeft = rgCol[3].nRight + cxChar ;
  rgCol[4].nRight = rgCol[4].nLeft + cxChar * lstrlen( _T( "_HGLOBAL_" ) ) ;
  rgCol[4].uiFlags = DT_LEFT ;

  (HFONT)SelectObject( hdc, hFont ) ;
  ReleaseDC( NULL, hdc ) ;

  AddItem( nLevel, _T( "cfFormat\tptd\tdwAspect\tlindex\ttymed" ), NULL, I_COLUMNHEAD, 5, rgCol ) ;
  LPFORMATETC     pfetc ;
  FORMATETC       fetc ;
  TCHAR           sz[512] ;
  ULONG           ulFE ; // number returned

  while (pIFormatEtc->Next( 1, &fetc, &ulFE ) == S_OK)
  {
    // now insert into list
    pfetc = new FORMATETC ;
    *pfetc = fetc ;
    _tcscpy_s( sz, 512, MyGetClipboardFormatName( (UINT)fetc.cfFormat ) ) ;
    _tcscat_s( sz, 512, _T("\t") ) ;

    TCHAR szTemp[32] ;
    _stprintf_s( szTemp, 32, _T( "%04lX:%04lX\t" ), (DWORD)HIWORD( (DWORD_PTR)fetc.ptd ), (DWORD)LOWORD( (DWORD_PTR)fetc.ptd ) ) ;
    _tcscat_s( sz, 512, szTemp ) ;

    switch( fetc.dwAspect )
    {
      case DVASPECT_CONTENT: _tcscat_s( sz, 512, _T( "CONTENT\t" ) ) ; break ;
      case DVASPECT_THUMBNAIL: _tcscat_s( sz, 512, _T( "THUMBNAIL\t" ) ) ; break ;
      case DVASPECT_ICON: _tcscat_s( sz, 512, _T( "ICON\t" ) ) ; break ;
      case DVASPECT_DOCPRINT: _tcscat_s( sz, 512, _T( "DOCPRINT\t" ) ) ; break ;
      default:
        _stprintf_s( szTemp, 32, _T( "%08lX\t" ), (DWORD)fetc.dwAspect ) ;
        _tcscat_s( sz, 512, szTemp ) ;
      break ;
    }

    _stprintf_s( szTemp, 32, _T( "%04lX:%04lX\t" ), (DWORD)HIWORD( fetc.lindex ), (DWORD)LOWORD( fetc.lindex ) ) ;
    _tcscat_s( sz, 512, szTemp ) ;

    switch( fetc.tymed )
    {
      case TYMED_HGLOBAL: _tcscat_s( sz, 512, _T( "HGLOBAL\t" ) ) ; break ;
      case TYMED_FILE: _tcscat_s( sz, 512, _T( "FILE\t" ) ) ; break ;
      case TYMED_ISTREAM: _tcscat_s( sz, 512, _T( "ISTREAM\t" ) ) ; break ;
      case TYMED_ISTORAGE: _tcscat_s( sz, 512, _T( "ISTORAGE\t" ) ) ; break ;
      case TYMED_GDI: _tcscat_s( sz, 512, _T( "GDI\t" ) ) ; break ;
      case TYMED_MFPICT: _tcscat_s( sz, 512, _T( "MFPICT\t" ) ) ; break ;
      case TYMED_NULL: _tcscat_s( sz, 512, _T( "NULL\t" ) ) ; break ;
      default:
        _stprintf_s( szTemp, 32, _T( "%08lX\t" ), (DWORD)fetc.tymed ) ;
        _tcscat_s( sz, 512, szTemp ) ;
      break ;
    }

    AddItem( nLevel, sz,
         pfetc, I_COLUMNENTRY, 5, rgCol ) ;
  }

  return TRUE ;
}

int CIDataObjectDlg::DoModal ( void )

Definition at line 82 of file idataobj.cpp.

{
  if (-1 == DialogBoxParam( GetModuleHandle(_T("IVIEWERS.DLL")), MAKEINTRESOURCE( IDD_IDATAOBJDLG ), m_hWndParent, (DLGPROC)fnIDataObjectDlg, (LONG_PTR)this ))
  {
    DWORD dw = GetLastError() ;
    ErrorMessage( "Could not open dialog box", dw ) ;
    return -1 ;
  }
  else
    return 0 ;
}

HRESULT CIDataObjectDlg::GotData | ( | LPFORMATETC | lpfetc,
 |  | LPSTGMEDIUM | lpstm |
 | ) |  |  | [protected]

Definition at line 482 of file idataobj.cpp.

{
  HRESULT hr = NOERROR ;
  BOOL    fHandled = FALSE ;

  if ((lpfetc->cfFormat == CF_TEXT  || lpfetc->cfFormat == CF_UNICODETEXT)
      && lpstm->tymed & TYMED_HGLOBAL)
  {
    LPTSTR lpsz = (LPTSTR)GlobalLock( lpstm->hGlobal ) ;
    if (lpsz == NULL)
    {
      ListBox_AddString( m_lbGetData, _T( "hGlobal returned by GetData is NULL!" ) ) ;
      ReleaseStgMedium( lpstm );
      return ResultFromScode( E_FAIL ) ;
    }

    if (m_fUpdateDisplay == TRUE)
    {
    #ifndef _UNICODE
      if (lpfetc->cfFormat == CF_UNICODETEXT)
      {
        UINT n = (UINT)wcslen( (LPWSTR)lpsz ) ;
        TCHAR* sztemp = new TCHAR[n+1] ;
        wcstombs_s( NULL,sztemp, n,(LPWSTR)lpsz, n ) ;
        WriteToOutput( sztemp ) ;
        delete [] sztemp ;
      }
      else
        WriteToOutput( lpsz ) ;
    #else
      if (lpfetc->cfFormat == CF_TEXT)
      {
        UINT n = _mbstrlen( (LPCSTR)lpsz ) ;
        TCHAR* sztemp = new TCHAR[n+1] ;
        mbstowcs( sztemp, (LPSTR)lpsz, n ) ;
        WriteToOutput( sztemp ) ;
        delete [] sztemp ;
      }
      else
        WriteToOutput( lpsz ) ;
    #endif
    }

    GlobalUnlock( lpstm->hGlobal ) ;

    fHandled = TRUE ;
  }

  if (lpfetc->cfFormat == CF_METAFILEPICT && lpstm->tymed & TYMED_MFPICT)
  {
    LPMETAFILEPICT pMF = (LPMETAFILEPICT)GlobalLock(lpstm->hGlobal) ;
    if (pMF)
    {
      if (m_MetaFile.hMF)
      {
        DeleteMetaFile( m_MetaFile.hMF ) ;
        m_MetaFile.hMF = NULL ;
      }

      if (m_fUpdateDisplay)
      {
        m_MetaFile = *pMF ;
        m_MetaFile.hMF = CopyMetaFile( pMF->hMF, NULL ) ;
        InvalidateRect( m_edtAdvise, NULL, FALSE ) ;
      }
    }
    fHandled = TRUE ;
  }

  m_cOnDataChanges++ ;

  ReleaseStgMedium( lpstm );

  if (fHandled == FALSE)
  {
    ListBox_AddString( m_lbGetData, _T( "The IDataObject viewer does not know how to decode this FORMATETC" ) ) ;
  }

  return  hr;
}

void CIDataObjectDlg::OnDblClkFormatEtc ( ) [protected]

Definition at line 399 of file idataobj.cpp.

{
}

void CIDataObjectDlg::OnDestroy ( void ) [protected]

Definition at line 270 of file idataobj.cpp.

{
  OnKillAdvise() ;

  if (g_pfnEdit != NULL && m_edtAdvise && IsWindow(m_edtAdvise))
  {
    SubclassWindow(m_edtAdvise, g_pfnEdit) ;
    g_pfnEdit = NULL ;
  }

  int c = ListBox_GetCount( m_lbFmtEtc ) ;
  for (int i = 0 ; i < c ; i++)
  {
    LPITEMDATA lpID = (LPITEMDATA)ListBox_GetItemData( m_lbFmtEtc, i ) ;
    if (lpID)
    {
      if (lpID->uiType == I_COLUMNHEAD)
        delete lpID->rgCol ;

      if (lpID->lpData != NULL)
        delete (LPFORMATETC)lpID->lpData ;
      delete lpID ;
    }
  }

  if (g_hFont)
    DeleteObject( g_hFont );

  if (g_hFontBold)
    DeleteObject (g_hFontBold) ;
}

void CIDataObjectDlg::OnDoGetData ( ) [protected]

Definition at line 433 of file idataobj.cpp.

{
  HRESULT     hr ;
  STGMEDIUM   stm ;
  TCHAR       szBuf[256] ;

  if (m_lpDO == NULL)
  {
    ListBox_AddString( m_lbGetData, _T( "IDataObject viewer internal error: m_lpDO == NULL" ) ) ;
    return ;
  }

  _stprintf_s( szBuf, 256, _T( "Calling GetData for %s" ), (LPCTSTR)MyGetClipboardFormatName( m_fetc.cfFormat ) ) ;
  ListBox_AddString( m_lbGetData, szBuf ) ;

  hr = m_lpDO->QueryGetData( &m_fetc ) ;
  if (FAILED( hr ))
  {
    _stprintf_s( szBuf, 256, _T( "QueryGetData() failed:  %s" ),
          (LPTSTR)HRtoString( hr ) ) ;
    ListBox_AddString( m_lbGetData, szBuf ) ;
    return ;
  }

  stm.tymed = m_fetc.tymed ;
  hr = m_lpDO->GetData( &m_fetc, &stm ) ;
  if (FAILED( hr ))
  {
    _stprintf_s( szBuf, 256, _T( "GetData() failed:  %s" ),
          (LPTSTR)HRtoString( hr ) ) ;
    ListBox_AddString( m_lbGetData, szBuf ) ;
    return ;
  }

  if (FAILED( hr = GotData( &m_fetc, &stm ) ))
  {
    _stprintf_s( szBuf, 256, _T( "IDataDlg::GotData() failed:  %s" ),
          (LPTSTR)HRtoString( hr ) ) ;
    ListBox_AddString( m_lbGetData, szBuf ) ;
    return ;
  }

  // If we're warm linked, then don't let the queue overfill.  Allow only one
  // message at a time.  This is similar to the way Excel handles it's DDE Links.
  //
  m_fDoOnGetDataPosted = FALSE ;
}

void CIDataObjectDlg::OnDrawItem | ( | int | nIDCtl,
 |  | LPDRAWITEMSTRUCT | lpDrawItemStruct |
 | ) |  |  | [protected]

Definition at line 317 of file idataobj.cpp.

{
  if (lpDIS->itemID == LB_ERR)
    return ;

  LPITEMDATA      lpID ;
  COLORREF        rgbBack ;
  RECT            rcFocus ;
  BOOL            fSelected ;
  int             x, y, cy ;
  TCHAR           szItem[128] ;
  HFONT           hFont = 0;

  lpID = (LPITEMDATA)lpDIS->itemData ;
  rcFocus = lpDIS->rcItem ;
  ListBox_GetText( m_lbFmtEtc, lpDIS->itemID, szItem ) ;

  if (fSelected = (lpDIS->itemState & ODS_SELECTED) ? TRUE : FALSE)
  {
    SetTextColor( lpDIS->hDC, GetSysColor( COLOR_HIGHLIGHTTEXT ) ) ;
    SetBkColor( lpDIS->hDC, rgbBack = GetSysColor( COLOR_HIGHLIGHT ) ) ;
  }
  else
  {
    SetTextColor( lpDIS->hDC, GetSysColor( COLOR_WINDOWTEXT ) ) ;
    SetBkColor( lpDIS->hDC, rgbBack = GetSysColor( COLOR_WINDOW ) ) ;
  }

  // if we are loosing focus, remove the focus rect before
  // drawing.
  //
  if ((lpDIS->itemAction) & (ODA_FOCUS))
    if (!((lpDIS->itemState) & (ODS_FOCUS)))
      DrawFocusRect( lpDIS->hDC, &rcFocus ) ;

  y = lpDIS->rcItem.top ;
  x = lpDIS->rcItem.left ;

  int cxChar = GetTextMetricsCorrectly( lpDIS->hDC, NULL ) ;

  if (lpID && (lpID->uiType == I_COLUMNHEAD || lpID->uiType == I_LABEL))
    hFont = (HFONT)SelectObject( lpDIS->hDC, g_hFontBold ) ;

  cy = (rcFocus.bottom - rcFocus.top - g_cyFont) / 2 ;

  ExtTextOut( lpDIS->hDC, x+2, y + cy, ETO_OPAQUE, &lpDIS->rcItem, NULL, 0, NULL ) ;
  if (lpID)
    ColumnTextOut( lpDIS->hDC, x + 2 + ((cxChar*3) * lpID->nLevel), y + cy, szItem, lpID->cColumns, lpID->rgCol ) ;

  if (lpID && lpID->uiType == I_COLUMNHEAD )
  {
    COLORREF    rgb ;
    RECT        rc = rcFocus ;
    rgb = SetBkColor( lpDIS->hDC, GetTextColor( lpDIS->hDC ) ) ;
    rc.top = rc.bottom - 1 ;
    rc.left = x + 2 + ((cxChar*3) * lpID->nLevel) ;
    ExtTextOut( lpDIS->hDC, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL ) ;
    SetBkColor( lpDIS->hDC, rgb ) ;
  }

  if (lpID && (lpID->uiType == I_COLUMNHEAD || lpID->uiType == I_LABEL) && hFont)
    (HFONT)SelectObject( lpDIS->hDC, hFont ) ;

  // if we are gaining focus draw the focus rect after drawing
  // the text.
  if ((lpDIS->itemAction) & (ODA_FOCUS))
    if ((lpDIS->itemState) & (ODS_FOCUS))
       DrawFocusRect( lpDIS->hDC, &rcFocus ) ;

  if (fSelected)
  {
    SetTextColor( lpDIS->hDC, GetSysColor( COLOR_WINDOWTEXT ) ) ;
    SetBkColor( lpDIS->hDC, GetSysColor( COLOR_WINDOW ) ) ;
  }

}

BOOL CIDataObjectDlg::OnInitDialog ( ) [protected]

Definition at line 214 of file idataobj.cpp.

{
  m_btnDoGetData = GetDlgItem( m_hDlg, IDC_DOGETDATA ) ;
  m_btnSetupAdvise = GetDlgItem( m_hDlg, IDC_SETUPADVISE ) ;

  m_lbGetData = GetDlgItem( m_hDlg, IDC_GETDATA ) ;
  m_lbFmtEtc = GetDlgItem( m_hDlg, IDC_FORMATETC ) ;

  m_edtAdvise = GetDlgItem( m_hDlg, IDC_ADVISEDATA ) ;

  // Sublcass the edit so we can override it's WM_PAINT and
  // draw a metafile if we want to...
  if (g_pfnEdit == NULL)
    g_pfnEdit = SubclassWindow( m_edtAdvise, fnEditSubclass) ;

  m_chkUpdateDisplay = GetDlgItem( m_hDlg, IDC_UPDATEDISPLAY );
  m_fUpdateDisplay = TRUE ;
  Button_SetCheck( m_chkUpdateDisplay, m_fUpdateDisplay ) ;

  m_chkPrimeFirst = GetDlgItem( m_hDlg, IDC_PRIMEFIRST );
  Button_SetCheck( m_chkPrimeFirst, m_advf == ADVF_PRIMEFIRST ) ;

  //m_chkDump = GetDlgItem( m_hDlg, IDC_DUMPTOFILE ) ;
  //EnableWindow( m_chkDump, FALSE ) ;

  TEXTMETRIC  tm ;
  HDC hdc = GetDC(NULL);
  g_hFont = CreateFont( -8, 0, 0, 0, 0, 0,
        0, 0, ANSI_CHARSET, 0, 0, 0,
        FF_SWISS, _T("MS Sans Serif") ) ;
  g_hFontBold = CreateFont( -8, 0, 0, 0, 0, FW_BOLD,
        0, 0, ANSI_CHARSET, 0, 0, 0,
        FF_SWISS, _T("MS Sans Serif") ) ;
  HFONT hFont = (HFONT)SelectObject( hdc, g_hFont ) ;
  GetTextMetrics( hdc, &tm ) ;
  SelectObject( hdc, hFont ) ;
  ReleaseDC( NULL, hdc ) ;
  g_cyFont = tm.tmHeight + tm.tmExternalLeading ;

  SetWindowFont( m_lbFmtEtc, g_hFont, TRUE ) ;
  SetWindowFont( m_lbGetData, g_hFont, TRUE ) ;
  SetWindowFont( m_edtAdvise, g_hFont, TRUE ) ;

  DoIDataObject( 0, (LPDATAOBJECT)m_lpDO ) ;

  DlgCenter( m_hDlg, m_hWndParent, FALSE ) ;
  RECT rc ;
  GetWindowRect( m_hDlg, &rc ) ;
  SetWindowPos( m_hDlg, NULL, rc.left, rc.top, rc.right - rc.left + 1,
          rc.bottom - rc.top +1, SWP_NOMOVE|SWP_NOZORDER | SWP_NOACTIVATE ) ;

  //SetWindowText( m_hDlg, m_lpszName ) ;

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CIDataObjectDlg::OnKillAdvise ( ) [protected]

Definition at line 596 of file idataobj.cpp.

{
  if (m_dwConn != 0)
  {
    TCHAR szBuf[128] ;
    DWORD dwTime = max( 1000, GetTickCount() - m_dwTime ) ;    // avoid div by zero

    m_lpDO->DUnadvise( m_dwConn ) ;
    m_dwConn = 0 ;
    _stprintf_s( szBuf, 128, _T( "  Advise Killed after %lu milliseconds, and %lu OnDataChanges;" ), dwTime, m_cOnDataChanges ) ;
    ListBox_AddString( m_lbGetData, szBuf ) ;
    _stprintf_s( szBuf, 128, _T( "  That's %lu.%lu OnDataChange calls per second." ),
            m_cOnDataChanges / (dwTime / 1000L),
            m_cOnDataChanges % (dwTime / 1000L) ) ;
    ListBox_AddString( m_lbGetData, szBuf ) ;
  }

  if (m_pSink != NULL)
  {
    m_pSink->Release() ;
    m_pSink = NULL ;
  }

  SetWindowText( m_btnSetupAdvise, _T( "&DAdvise" ) ) ;
}

void CIDataObjectDlg::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct |
 | ) |  |  | [protected]

Definition at line 394 of file idataobj.cpp.

{
  lpMeasureItemStruct->itemHeight = g_cyFont ;
}

void CIDataObjectDlg::OnOutputBufferHasData ( ) [protected]

Definition at line 865 of file idataobj.cpp.

{
  if (m_szOutput != NULL && m_cchOutput != 0)
  {
    int cLines = Edit_GetLineCount(m_edtAdvise) + m_cLinesOutput ;

    if (cLines > CLINESMAX)
    {
      SetWindowRedraw( m_edtAdvise, FALSE ) ;
      // If the total # of lines is greater than our arbitrary max lines
      // remove some from the top.
      //
      Edit_SetSel( m_edtAdvise, 0, Edit_LineIndex( m_edtAdvise, cLines - CLINESMAX));
      Edit_ReplaceSel( m_edtAdvise, _T(""));
    }

    // Put current output buffer at the end of the edit control
    //
    Edit_SetSel( m_edtAdvise, (UINT)-1, (UINT)-1 )  ;   // select the end
    Edit_ReplaceSel( m_edtAdvise, m_szOutput ) ;
    Edit_SetSel( m_edtAdvise, (UINT)-1, (UINT)-1 )  ;   // select the end

    if (cLines > CLINESMAX)
      SetWindowRedraw( m_edtAdvise, TRUE ) ;

    // Reset the output buffer
    m_cLinesOutput = 0 ;
    m_cchOutput = 0 ;
  }
}

void CIDataObjectDlg::OnSelChangeFormatEtc ( ) [protected]

Definition at line 403 of file idataobj.cpp.

{

  if (m_MetaFile.hMF != NULL)
  {
    DeleteMetaFile( m_MetaFile.hMF ) ;
    m_MetaFile.hMF = NULL ;
  }
  InvalidateRect( m_edtAdvise, NULL, TRUE ) ;
  SetWindowText( m_edtAdvise, _T("") ) ;

  int i = ListBox_GetCurSel( m_lbFmtEtc ) ;
  if (i != LB_ERR)
  {
    LPITEMDATA lpid = (LPITEMDATA)ListBox_GetItemData( m_lbFmtEtc, i ) ;
    if (lpid && lpid->lpData)
    {
      m_fetc = *(LPFORMATETC)lpid->lpData ;
      return ;
    }
  }

  m_fetc.cfFormat = CF_TEXT ;
  m_fetc.dwAspect = DVASPECT_CONTENT ;
  m_fetc.ptd = NULL ;
  m_fetc.tymed = TYMED_HGLOBAL ;
  m_fetc.lindex = - 1 ;
}

void CIDataObjectDlg::OnSetupAdvise ( ) [protected]

Definition at line 563 of file idataobj.cpp.

{
  TCHAR szBuf[128] ;
  OnKillAdvise() ;

  m_pSink = new CImpIAdviseSink( this ) ;

  if (m_pSink == NULL)
  {
    ListBox_AddString( m_lbGetData, _T( "CImpIAdviseSink constructor failed" ) ) ;
    return ;
  }

  SetWindowText( m_btnSetupAdvise, _T( "&Kill Advise" ) ) ;

  _stprintf_s( szBuf, 128, _T( "Advise started with a cfFormat of %s" ),
        (LPCTSTR)MyGetClipboardFormatName( m_fetc.cfFormat ) ) ;
  ListBox_AddString( m_lbGetData, szBuf ) ;

  m_dwTime = GetTickCount() ;
  m_cOnDataChanges = 0 ;

  HRESULT hr = m_lpDO->DAdvise( &m_fetc, m_advf, m_pSink, &m_dwConn ) ;
  if (FAILED( hr ))
  {
    _stprintf_s( szBuf, 128, _T( "DAdvise() failed:  %s" ), (LPTSTR)HRtoString( hr ) ) ;
    ListBox_AddString( m_lbGetData, szBuf ) ;
    SetWindowText( m_btnSetupAdvise, _T( "&DAdvise" ) ) ;
    return ;
  }

}

void CIDataObjectDlg::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 302 of file idataobj.cpp.

{
  if (m_edtAdvise && !IsWindow( m_edtAdvise ) )
    return ;

  RECT    rc ;
  RECT    rcWnd ;
  GetClientRect( m_hDlg, &rcWnd ) ;
  GetWindowRect( m_edtAdvise, &rc ) ;
  MapWindowPoints( NULL, m_hDlg, (POINT *)&rc, 2 ) ;
  SetWindowPos( m_edtAdvise, NULL, -1, rc.top, cx+2, cy - rc.top + 1,
        SWP_NOZORDER | SWP_NOACTIVATE ) ;
}

BOOL CIDataObjectDlg::WriteToOutput ( LPTSTR lpsz ) [protected]

Definition at line 786 of file idataobj.cpp.

{
  UINT cch;
  int cLines;

  cch = DBStrCpy(NULL, lpsz, &cLines);

  if (cch > (CCHOUTPUTMAX - m_cchOutput))
  {
    MessageBeep(0);
    return FALSE;
  }

  DBStrCpy(&m_szOutput[m_cchOutput], lpsz, NULL);

  m_cchOutput += cch;
  m_cLinesOutput += cLines;

  // If buffer was originally empty, wake up the main loop.
  //
  if (m_cchOutput == cch)
    PostMessage( m_hDlg, WM_OUTPUTBUFFERHASDATA, 0, 0L);

  return TRUE;
}

Friends And Related Function Documentation

friend class CImpIAdviseSink [friend]

Definition at line 48 of file idataobj.h.

BOOL CALLBACK fnIDataObjectDlg | ( | HWND | hDlg,
 |  | UINT | uiMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [friend]

Definition at line 95 of file idataobj.cpp.

{
  CIDataObjectDlg * pIDOD =(CIDataObjectDlg *)GetWindowLongPtr( hDlg, DWLP_USER ) ;

  switch (uiMsg)
  {
    case WM_INITDIALOG:
      pIDOD=(CIDataObjectDlg *)lParam ;
      if (pIDOD==NULL)
      {
        EndDialog( hDlg, 0 ) ;
        return TRUE ;
      }
      SetWindowLongPtr( hDlg, DWLP_USER, (LONG_PTR)pIDOD ) ;
      pIDOD->m_hDlg = hDlg ;
      return pIDOD->OnInitDialog() ;
    break ;

    case WM_DESTROY:
      if (pIDOD)
        pIDOD->OnDestroy() ;
    break ;

    case WM_SIZE:
      if (pIDOD)
        pIDOD->OnSize( (UINT)wParam, LOWORD( lParam ), HIWORD( lParam ) ) ;
    break ;

    case WM_COMMAND:
    {
      WORD wNotifyCode = HIWORD(wParam);
      WORD wID = LOWORD(wParam);

      switch (wID)
      {
        case IDCANCEL:
          EndDialog( hDlg, IDCANCEL ) ;
        break ;

        case IDC_DOGETDATA:
          pIDOD->OnDoGetData() ;
        break ;

        case IDC_SETUPADVISE:
          if (pIDOD->m_dwConn != 0)
            pIDOD->OnKillAdvise() ;
          else
            pIDOD->OnSetupAdvise() ;
        break ;

        case IDC_CLEAROUTPUT:
          if (pIDOD)
          {
            pIDOD->m_cchOutput = 0 ;
            pIDOD->m_cLinesOutput = 0 ;
            if (pIDOD->m_MetaFile.hMF != NULL)
            {
              DeleteMetaFile( pIDOD->m_MetaFile.hMF ) ;
              pIDOD->m_MetaFile.hMF = NULL ;
            }
            SetWindowText( pIDOD->m_edtAdvise, _T("") ) ;
            InvalidateRect( pIDOD->m_edtAdvise, NULL, TRUE ) ;
            UpdateWindow( pIDOD->m_edtAdvise ) ;
          }
        break ;

        case IDC_FORMATETC:
          if (wNotifyCode == LBN_SELCHANGE)
            pIDOD->OnSelChangeFormatEtc() ;
        break ;

        case IDC_UPDATEDISPLAY:
          pIDOD->m_fUpdateDisplay = Button_GetCheck( pIDOD->m_chkUpdateDisplay ) ;
        break ;

        case IDC_PRIMEFIRST:
          if (Button_GetCheck( pIDOD->m_chkPrimeFirst ))
            pIDOD->m_advf = ADVF_PRIMEFIRST ;
          else
            pIDOD->m_advf = ADVF_NODATA ;
        break ;

        case IDC_ADVISEDATA:
          if (wNotifyCode == EN_ERRSPACE)
          {
            #ifdef _DEBUG
            OutputDebugString(_T("Output Edit Control reports EN_ERRSPACE\r\n")) ;
            #endif
          }
        break ;
      }
    }
    break ;

    case WM_DRAWITEM:
      if (pIDOD)
        pIDOD->OnDrawItem( (int)wParam, (LPDRAWITEMSTRUCT)lParam ) ;
    break ;

    case WM_MEASUREITEM:
      if (pIDOD)
        pIDOD->OnMeasureItem( (int)wParam, (LPMEASUREITEMSTRUCT)lParam ) ;
    break ;

    case WM_OUTPUTBUFFERHASDATA:
      if (pIDOD)
        pIDOD->OnOutputBufferHasData() ;
    break ;

    default:
       return FALSE ;
  }
  return TRUE ;
}

Member Data Documentation

DWORD CIDataObjectDlg::m_advf

Definition at line 61 of file idataobj.h.

HWND CIDataObjectDlg::m_btnDoGetData

Definition at line 67 of file idataobj.h.

HWND CIDataObjectDlg::m_btnSetupAdvise

Definition at line 68 of file idataobj.h.

UINT CIDataObjectDlg::m_cchOutput

Definition at line 74 of file idataobj.h.

HWND CIDataObjectDlg::m_chkDump

Definition at line 83 of file idataobj.h.

HWND CIDataObjectDlg::m_chkPrimeFirst

Definition at line 79 of file idataobj.h.

HWND CIDataObjectDlg::m_chkUpdateDisplay

Definition at line 77 of file idataobj.h.

UINT CIDataObjectDlg::m_cLinesOutput

Definition at line 75 of file idataobj.h.

DWORD CIDataObjectDlg::m_cOnDataChanges

Definition at line 86 of file idataobj.h.

DWORD CIDataObjectDlg::m_dwConn

Definition at line 89 of file idataobj.h.

DWORD CIDataObjectDlg::m_dwTime

Definition at line 85 of file idataobj.h.

HWND CIDataObjectDlg::m_edtAdvise

Definition at line 70 of file idataobj.h.

BOOL CIDataObjectDlg::m_fDoOnGetDataPosted

Definition at line 62 of file idataobj.h.

FORMATETC CIDataObjectDlg::m_fetc

Definition at line 60 of file idataobj.h.

BOOL CIDataObjectDlg::m_fUpdateDisplay

Definition at line 78 of file idataobj.h.

HWND CIDataObjectDlg::m_hDlg

Definition at line 65 of file idataobj.h.

HWND CIDataObjectDlg::m_hWndParent

Definition at line 64 of file idataobj.h.

HWND CIDataObjectDlg::m_lbFmtEtc

Definition at line 81 of file idataobj.h.

HWND CIDataObjectDlg::m_lbGetData

Definition at line 69 of file idataobj.h.

LPDATAOBJECT CIDataObjectDlg::m_lpDO

Definition at line 57 of file idataobj.h.

LPTSTR CIDataObjectDlg::m_lpszName

Definition at line 58 of file idataobj.h.

METAFILEPICT CIDataObjectDlg::m_MetaFile

Definition at line 72 of file idataobj.h.

CImpIAdviseSink FAR* CIDataObjectDlg::m_pSink

Definition at line 88 of file idataobj.h.

TCHAR CIDataObjectDlg::m_szOutput[CCHOUTPUTMAX]

Definition at line 71 of file idataobj.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/idataobj.h
  • ole/oleview/iviewers/idataobj.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIEDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CIEDemoApp Class Reference

#include "IEDemo.h"

List of all members.

Public Member Functions

CIEDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Public Attributes

CFavoritesManager m_Favorites

Detailed Description

Definition at line 24 of file IEDemo.h.

Constructor & Destructor Documentation

CIEDemoApp::CIEDemoApp ( )

Definition at line 37 of file IEDemo.cpp.

                       :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CIEDemoApp::ExitInstance ( ) [virtual]

Definition at line 122 of file IEDemo.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CIEDemoApp::InitInstance ( ) [virtual]

Definition at line 52 of file IEDemo.cpp.

{
  // InitCommonControlsEx() is required on Windows XP if an application
  // manifest specifies use of ComCtl32.dll version 6 or later to enable
  // visual styles.  Otherwise, any window creation will fail.
  INITCOMMONCONTROLSEX InitCtrls;
  InitCtrls.dwSize = sizeof(InitCtrls);
  // Set this to include all the common control classes you want to use
  // in your application.
  InitCtrls.dwICC = ICC_WIN95_CLASSES;
  InitCommonControlsEx(&InitCtrls);

  CWinApp::InitInstance();

  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }
  AfxEnableControlContainer();
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
  LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitKeyboardManager();

  // Initialize favorites:
  m_Favorites.Load ();

  // 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(CIEDemoDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CIEDemoView));
  if (!pDocTemplate)
    return FALSE;
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();
  // call DragAcceptFiles only if there's a suffix
  //  In an SDI app, this should occur after ProcessShellCommand
  return TRUE;
}

void CIEDemoApp::OnAppAbout ( )

Definition at line 174 of file IEDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CIEDemoApp::PreLoadState ( ) [virtual]

Definition at line 183 of file IEDemo.cpp.

{
}

Member Data Documentation

CFavoritesManager CIEDemoApp::m_Favorites

Definition at line 32 of file IEDemo.h.

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/IEDemo.h
  • vc2008fp/IEDemo/IEDemo.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIEDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CIEDemoDoc Class Reference

#include "IEDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CIEDemoDoc ()
CHistoryObj * | AddURLToHistory (const CString &strTitle, const CString &strURL)
void | GetBackList (_T_HistotyList &lst) const
void | GetFrwdList (_T_HistotyList &lst) const
CHistoryObj * | Go (UINT uiCmd)
CHistoryObj * GoBack ()
CHistoryObj * GoForward ()
BOOL | IsBackAvailable () const
BOOL | IsFrwdAvailable ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Public Attributes

CArray< CHistoryObj
*, CHistoryObj * > 		m_arHistory
int | m_iHistoryOffset

Protected Member Functions

CIEDemoDoc ()

Detailed Description

Definition at line 20 of file IEDemoDoc.h.

Constructor & Destructor Documentation

CIEDemoDoc::CIEDemoDoc ( ) [protected]

Definition at line 37 of file IEDemoDoc.cpp.

{
  m_iHistoryOffset = 0;
  m_arHistory.SetSize (0, 1);
}

CIEDemoDoc::~CIEDemoDoc ( ) [virtual]

Definition at line 43 of file IEDemoDoc.cpp.

{
  for (int i = 0; i < m_arHistory.GetSize (); i ++)
  {
    ASSERT (m_arHistory [i] != NULL);
    delete m_arHistory [i];
  }
}

Member Function Documentation

CHistoryObj * CIEDemoDoc::AddURLToHistory | ( | const CString & | strTitle,
 |  | const CString & | strURL
 | ) |  |

Definition at line 98 of file IEDemoDoc.cpp.

{
  ASSERT (m_arHistory.GetSize () <= HISTORY_LEN);

  for (int i = 0; i < m_arHistory.GetSize (); i ++)
  {
    CHistoryObj* pObj = m_arHistory [i];
    ASSERT (pObj != NULL);

    if (pObj && pObj->GetTitle () == strTitle && pObj->GetURL () == strURL)
    {
      return pObj;
    }
  }

  if (m_arHistory.GetSize () == HISTORY_LEN)
  {
    delete m_arHistory [0];
    m_arHistory.RemoveAt (0);
  }

  CHistoryObj* pObj = new CHistoryObj (strTitle, strURL,
    FIRST_HISTORY_COMMAND + (UINT)m_arHistory.GetSize ());
  m_arHistory.InsertAt (0, pObj);

  m_iHistoryOffset = 0;
  return pObj;
}

void CIEDemoDoc::GetBackList ( _T_HistotyList & lst ) const

Definition at line 127 of file IEDemoDoc.cpp.

{
  lst.RemoveAll ();
  for (int i = m_iHistoryOffset + 1; i < m_arHistory.GetSize () ; i ++)
  {
    lst.AddTail (m_arHistory [i]);
  }
}

void CIEDemoDoc::GetFrwdList ( _T_HistotyList & lst ) const

Definition at line 136 of file IEDemoDoc.cpp.

{
  lst.RemoveAll ();
  for (int i = m_iHistoryOffset - 1; i >= 0; i --)
  {
    ASSERT (i < m_arHistory.GetSize ());
    lst.AddTail (m_arHistory [i]);
  }
}

CHistoryObj * CIEDemoDoc::Go ( UINT uiCmd )

Definition at line 146 of file IEDemoDoc.cpp.

{
  for (int i = 0; i < m_arHistory.GetSize (); i ++)
  {
    CHistoryObj* pObj = m_arHistory [i];
    ASSERT (pObj != NULL);

    if (pObj && pObj->GetCommand () == uiCmd)
    {
      m_arHistory.RemoveAt (i);
      m_arHistory.Add (pObj);

      m_iHistoryOffset = 0;
      return pObj;
    }
  }

  return NULL;
}

CHistoryObj* CIEDemoDoc::GoBack ( ) [inline]

Definition at line 46 of file IEDemoDoc.h.

  {
    if (m_iHistoryOffset >= m_arHistory.GetSize ())
    {
      ASSERT (FALSE);
      return NULL;
    }

    return m_arHistory [++ m_iHistoryOffset];
  }

CHistoryObj* CIEDemoDoc::GoForward ( ) [inline]

Definition at line 57 of file IEDemoDoc.h.

  {
    if (m_iHistoryOffset < 1)
    {
      ASSERT (FALSE);
      return NULL;
    }

    return m_arHistory [--m_iHistoryOffset];
  }

BOOL CIEDemoDoc::IsBackAvailable ( ) const [inline]

Definition at line 36 of file IEDemoDoc.h.

  {
    return m_iHistoryOffset < m_arHistory.GetSize () - 1;
  }

BOOL CIEDemoDoc::IsFrwdAvailable ( ) [inline]

Definition at line 41 of file IEDemoDoc.h.

  {
    return m_iHistoryOffset > 0;
  }

BOOL CIEDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 52 of file IEDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CIEDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 68 of file IEDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

Member Data Documentation

CArray<CHistoryObj*, CHistoryObj*> CIEDemoDoc::m_arHistory

Definition at line 28 of file IEDemoDoc.h.

int CIEDemoDoc::m_iHistoryOffset

Definition at line 29 of file IEDemoDoc.h.

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/IEDemoDoc.h
  • vc2008fp/IEDemo/IEDemoDoc.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIEDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CIEDemoView Class Reference

#include "IEDemoView.h"

List of all members.

Public Member Functions

virtual | ~CIEDemoView ()
CIEDemoDoc * GetDocument ()
virtual void | OnBeforeNavigate2 (LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray &baPostedData, LPCTSTR lpszHeaders, BOOL *pbCancel)
virtual void | OnDocumentComplete (LPCTSTR lpszURL)
virtual void | OnDraw (CDC *pDC)
virtual void | OnInitialUpdate ()
virtual void | OnProgressChange (long nProgress, long nProgressMax)
virtual void | OnTitleChange (LPCTSTR lpszText)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CIEDemoView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnDestroy ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFileOpen ()
afx_msg void | OnGoBack ()
afx_msg void | OnGoForward ()
afx_msg void | OnGoSearchTheWeb ()
afx_msg void | OnGoStartPage ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnUpdateGoBack (CCmdUI *pCmdUI)
afx_msg void | OnUpdateGoForward (CCmdUI *pCmdUI)
afx_msg void | OnViewFontsLarge ()
afx_msg void | OnViewFontsLargest ()
afx_msg void | OnViewFontsMedium ()
afx_msg void | OnViewFontsSmall ()
afx_msg void | OnViewFontsSmallest ()
afx_msg void | OnViewRefresh ()
afx_msg void | OnViewStop ()

Detailed Description

Definition at line 13 of file IEDemoView.h.

Constructor & Destructor Documentation

CIEDemoView::CIEDemoView ( ) [protected]

Definition at line 57 of file IEDemoView.cpp.

{
  // TODO: add construction code here

}

CIEDemoView::~CIEDemoView ( ) [virtual]

Definition at line 63 of file IEDemoView.cpp.

{
}

Member Function Documentation

CIEDemoDoc * CIEDemoView::GetDocument ( ) [inline]

Definition at line 76 of file IEDemoView.h.

   { return (CIEDemoDoc*)m_pDocument; }

void CIEDemoView::OnBeforeNavigate2 | ( | LPCTSTR | lpszURL,
 |  | DWORD | nFlags,
 |  | LPCTSTR | lpszTargetFrameName,
 |  | CByteArray & | baPostedData,
 |  | LPCTSTR | lpszHeaders,
 |  | BOOL * | pbCancel |
 | ) |  |  | [virtual]

Definition at line 266 of file IEDemoView.cpp.

{
  // start the animation so that is plays while the new page is being loaded
  ((CMainFrame*)GetParentFrame())->StartAnimation();
}

void CIEDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 94 of file IEDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

void CIEDemoView::OnDestroy ( void ) [protected]

Definition at line 284 of file IEDemoView.cpp.

{
  CHtmlView::OnDestroy();
  CView::OnDestroy();   // Fixes CHtmlView bug
}

void CIEDemoView::OnDocumentComplete ( LPCTSTR lpszURL ) [virtual]

Definition at line 245 of file IEDemoView.cpp.

{
  // make sure the main frame has the new URL.  This call also stops the animation
  ((CMainFrame*)GetParentFrame())->SetAddress(lpszURL);

  CIEDemoDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pDoc->AddURLToHistory (GetLocationName (), lpszURL);
  ((CMainFrame*)GetParentFrame())->SetProgress (0, -1);

  CHtmlView::OnDocumentComplete(lpszURL);
}

void CIEDemoView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 78 of file IEDemoView.cpp.

{
//  CIEDemoDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);
  // TODO: add draw code for native data here
}

void CIEDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 99 of file IEDemoView.cpp.

{
  // TODO: add cleanup after printing
}

void CIEDemoView::OnFileOpen ( ) [protected]

Definition at line 217 of file IEDemoView.cpp.

{
  BOOL bValidString;
  CString str;
  bValidString = str.LoadString(IDS_FILETYPES);

  CFileDialog fileDlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, str);

  if(fileDlg.DoModal() == IDOK)
    Navigate2(fileDlg.GetPathName(), 0, NULL);
}

void CIEDemoView::OnGoBack ( ) [protected]

Definition at line 128 of file IEDemoView.cpp.

{
  CIEDemoDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CHistoryObj* pHistoryObj = pDoc->GoBack ();
  if (pHistoryObj != NULL)
  {
    Navigate2 (pHistoryObj->GetURL (), 0, NULL);
  }
}

void CIEDemoView::OnGoForward ( ) [protected]

Definition at line 140 of file IEDemoView.cpp.

{
//  GoForward();
  CIEDemoDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CHistoryObj* pHistoryObj = pDoc->GoForward ();
  if (pHistoryObj != NULL)
  {
    Navigate2 (pHistoryObj->GetURL (), 0, NULL);
  }
}

void CIEDemoView::OnGoSearchTheWeb ( ) [protected]

Definition at line 153 of file IEDemoView.cpp.

{
  GoSearch();
}

void CIEDemoView::OnGoStartPage ( ) [protected]

Definition at line 158 of file IEDemoView.cpp.

{
  GoHome();
}

void CIEDemoView::OnInitialUpdate ( ) [virtual]

Definition at line 272 of file IEDemoView.cpp.

{
  GoHome();
}

BOOL CIEDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 88 of file IEDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CIEDemoView::OnProgressChange | ( | long | nProgress,
 |  | long | nProgressMax |
 | ) |  |  | [virtual]

Definition at line 277 of file IEDemoView.cpp.

{
  ((CMainFrame*)GetParentFrame())->SetProgress(nProgress, nProgressMax);

  CHtmlView::OnProgressChange(nProgress, nProgressMax);
}

void CIEDemoView::OnTitleChange ( LPCTSTR lpszText ) [virtual]

Definition at line 259 of file IEDemoView.cpp.

{
  // this will change the main frame's title bar
  if (m_pDocument != NULL)
    m_pDocument->SetTitle(lpszText);
}

void CIEDemoView::OnUpdateGoBack ( CCmdUI * pCmdUI ) [protected]

Definition at line 237 of file IEDemoView.cpp.

{
  CIEDemoDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->Enable (pDoc->IsBackAvailable ());
}

void CIEDemoView::OnUpdateGoForward ( CCmdUI * pCmdUI ) [protected]

Definition at line 229 of file IEDemoView.cpp.

{
  CIEDemoDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pCmdUI->Enable (pDoc->IsFrwdAvailable ());
}

void CIEDemoView::OnViewFontsLarge ( ) [protected]

Definition at line 183 of file IEDemoView.cpp.

{
  COleVariant vaZoomFactor(3l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CIEDemoView::OnViewFontsLargest ( ) [protected]

Definition at line 175 of file IEDemoView.cpp.

{
  COleVariant vaZoomFactor(4l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CIEDemoView::OnViewFontsMedium ( ) [protected]

Definition at line 191 of file IEDemoView.cpp.

{
  COleVariant vaZoomFactor(2l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CIEDemoView::OnViewFontsSmall ( ) [protected]

Definition at line 199 of file IEDemoView.cpp.

{
  COleVariant vaZoomFactor(1l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CIEDemoView::OnViewFontsSmallest ( ) [protected]

Definition at line 207 of file IEDemoView.cpp.

{
  COleVariant vaZoomFactor(0l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CIEDemoView::OnViewRefresh ( ) [protected]

Definition at line 168 of file IEDemoView.cpp.

{
  Refresh();
}

void CIEDemoView::OnViewStop ( ) [protected]

Definition at line 163 of file IEDemoView.cpp.

{
  Stop();
}

BOOL CIEDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 67 of file IEDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CHtmlView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/IEDemoView.h
  • vc2008fp/IEDemo/IEDemoView.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CImageApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CImageApp Class Reference

#include "image.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 21 of file image.h.

Member Function Documentation

int CImageApp::ExitInstance ( )

Definition at line 43 of file image.cpp.

{
  return COleControlModule::ExitInstance();
}

BOOL CImageApp::InitInstance ( )

Definition at line 33 of file image.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();
  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/IMAGE/image.h
  • controls/IMAGE/image.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CImageCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CImageCtrl Class Reference

#include "ImageCtl.h"

List of all members.

Public Types

enum | { dispidAutoSize = 1L, dispidImagePath = 2L }

Public Member Functions

CImageCtrl ()
void | AutoSize ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual DWORD | GetControlFlags ()
void | InformDlStatus (CBitmapProperty::DLState dlState)
void | InformSize ()
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual void | OnResetState ()

Public Attributes

CBitmapProperty m_bitprop

Protected Member Functions

~CImageCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CImageCtrl) DECLARE_OLETYPELIB(CImageCtrl) DECLARE_PROPPAGEIDS(CImageCtrl) DECLARE_OLECTLTYPE(CImageCtrl) BOOL m_bAutoSize
afx_msg BSTR | GetImagePath ()
afx_msg void | OnAutoSizeChanged ()
afx_msg void | SetImagePath (LPCTSTR lpszNewValue)

Detailed Description

Definition at line 15 of file ImageCtl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidAutoSize
dispidImagePath

Definition at line 73 of file ImageCtl.h.

       {
  //{{AFX_DISP_ID(CImageCtrl)
  dispidAutoSize = 1L,
  dispidImagePath = 2L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CImageCtrl::CImageCtrl ( )

Definition at line 132 of file ImageCtl.cpp.

                       : m_bitprop(this), m_bAutoSize(TRUE)
{
  InitializeIIDs(&IID_DImage, &IID_DImageEvents);

  m_lReadyState = READYSTATE_UNINITIALIZED;
}

CImageCtrl::~CImageCtrl ( ) [protected]

Definition at line 144 of file ImageCtl.cpp.

{
}

Member Function Documentation

void CImageCtrl::AboutBox ( ) [protected]

Definition at line 235 of file ImageCtl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_IMAGE);
  dlgAbout.DoModal();
}

void CImageCtrl::AutoSize ( )

Definition at line 251 of file ImageCtl.cpp.

{
  ASSERT(m_bAutoSize);

  SetControlSize(m_bitprop.m_BitmapSize.cx, m_bitprop.m_BitmapSize.cy);
}

CImageCtrl::DECLARE_OLECREATE_EX ( CImageCtrl ) [protected]
void CImageCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 190 of file ImageCtl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  if (pPX->IsLoading())
    InternalSetReadyState(READYSTATE_LOADING);

  PX_DataPath(pPX, _T("ImagePath"), m_bitprop);
  PX_Bool(pPX, _T("AutoSize"), m_bAutoSize, TRUE);
}

DWORD CImageCtrl::GetControlFlags ( ) [virtual]

Definition at line 209 of file ImageCtl.cpp.

{
  DWORD dwFlags = COleControl::GetControlFlags();

  // The control can activate without creating a window.
  dwFlags |= windowlessActivate;

  // The control can optimize its OnDraw method, by not restoring
  // the original GDI objects in the device context.
  dwFlags |= canOptimizeDraw;
  return dwFlags;
}

BSTR CImageCtrl::GetImagePath ( ) [protected]

Definition at line 273 of file ImageCtl.cpp.

{
  return m_bitprop.GetPath().AllocSysString();
}

void CImageCtrl::InformDlStatus ( CBitmapProperty::DLState dlState )

Definition at line 244 of file ImageCtl.cpp.

{
  InvalidateControl(NULL);
  if (dlState == CBitmapProperty::dlDone)
    InternalSetReadyState(READYSTATE_COMPLETE);
}

void CImageCtrl::InformSize ( )

Definition at line 266 of file ImageCtl.cpp.

{
  if (m_bAutoSize)
    AutoSize();
  InternalSetReadyState(READYSTATE_INTERACTIVE);
}

void CImageCtrl::OnAutoSizeChanged ( ) [protected]

Definition at line 258 of file ImageCtl.cpp.

{
  if (m_bAutoSize)
    AutoSize();

  SetModifiedFlag();
}

void CImageCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 152 of file ImageCtl.cpp.

{
  if (m_bitprop.m_Bitmap.m_hObject != NULL)
  {
    CWindowDC screenDC(NULL);
    CDC dc;
    dc.CreateCompatibleDC(&screenDC);
    CBitmap* pBitmap = dc.SelectObject(&m_bitprop.m_Bitmap);

    int cx(min(rcBounds.Width(), m_bitprop.m_BitmapSize.cx));
    int cy(min(rcBounds.Height(), m_bitprop.m_BitmapSize.cy));

    pDC->BitBlt(rcBounds.left, rcBounds.top, cx, cy, &dc, 0, 0, SRCCOPY);
    if (cx < rcBounds.Width())
      pDC->PatBlt(cx, rcBounds.top, rcBounds.Width() - cx, rcBounds.Height(), BLACKNESS);
    if (cy < rcBounds.Height())
      pDC->PatBlt(rcBounds.left, cy, rcBounds.Width(), rcBounds.Height() - cy, BLACKNESS);

    if (!IsOptimizedDraw())
    {
      // The container does not support optimized drawing.
      // So, we'll have to clean up what we did to the DC

      dc.SelectObject(pBitmap);
    }
  }
  else
  {
    pDC->PatBlt(rcBounds.left, rcBounds.top,
          rcBounds.Width(), rcBounds.Height(), BLACKNESS);
  }

}

void CImageCtrl::OnResetState ( ) [virtual]

Definition at line 225 of file ImageCtl.cpp.

{
  m_bitprop.ResetData();
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange
}

void CImageCtrl::SetImagePath ( LPCTSTR lpszNewValue ) [protected]

Definition at line 278 of file ImageCtl.cpp.

{
  Load(lpszNewValue, m_bitprop);
  InvalidateControl(NULL);
  SetModifiedFlag();
}

Member Data Documentation

CBitmapProperty CImageCtrl::m_bitprop

Definition at line 27 of file ImageCtl.h.

The documentation for this class was generated from the following files:
  • controls/IMAGE/ImageCtl.h
  • controls/IMAGE/ImageCtl.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CImagePropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CImagePropPage Class Reference

#include "ImagePpg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_IMAGE }

Public Member Functions

CImagePropPage ()

Public Attributes

BOOL | m_bAutoSize
CString | m_strImagePath

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file ImagePpg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file ImagePpg.h.

{ IDD = IDD_PROPPAGE_IMAGE };

Constructor & Destructor Documentation

CImagePropPage::CImagePropPage ( )

Definition at line 61 of file ImagePpg.cpp.

                               :
  COlePropertyPage(IDD, IDS_IMAGE_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CImagePropPage)
  m_strImagePath = _T("");
  m_bAutoSize = FALSE;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CImagePropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 74 of file ImagePpg.cpp.

{
  //{{AFX_DATA_MAP(CImagePropPage)
  DDP_Text(pDX, IDC_IMAGEPATH, m_strImagePath, _T("ImagePath") );
  DDX_Text(pDX, IDC_IMAGEPATH, m_strImagePath);
  DDP_Check(pDX, IDC_AUTOSIZE, m_bAutoSize, _T("AutoSize") );
  DDX_Check(pDX, IDC_AUTOSIZE, m_bAutoSize);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

BOOL CImagePropPage::m_bAutoSize

Definition at line 28 of file ImagePpg.h.

CString CImagePropPage::m_strImagePath

Definition at line 27 of file ImagePpg.h.

The documentation for this class was generated from the following files:
  • controls/IMAGE/ImagePpg.h
  • controls/IMAGE/ImagePpg.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CImpIAdviseSink Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Attributes

CImpIAdviseSink Class Reference

#include "iadvsink.h"

List of all members.

Public Member Functions

CImpIAdviseSink (CIDataObjectDlg FAR *)
~CImpIAdviseSink (void)
STDMETHODIMP | QueryInterface (REFIID, LPVOID FAR *)
STDMETHODIMP_ (void) OnRename(LPMONIKER)
STDMETHODIMP_ (void) OnViewChange(DWORD
STDMETHODIMP_ (void) OnDataChange(LPFORMATETC
STDMETHODIMP_ (ULONG) Release(void)
STDMETHODIMP_ (ULONG) AddRef(void)
STDMETHODIMP_ (void) OnSave(void)
STDMETHODIMP_ (void) OnClose(void)

Public Attributes

LONG
LPSTGMEDIUM

Protected Attributes

ULONG | m_cRef
CIDataObjectDlg FAR * | m_pIDOD

Detailed Description

Definition at line 20 of file iadvsink.h.

Constructor & Destructor Documentation

CImpIAdviseSink::CImpIAdviseSink ( CIDataObjectDlg FAR * lpIDOD )

Definition at line 38 of file iadvsink.cpp.

  {
  m_cRef=0;
  m_pIDOD=lpIDOD;
  return;
  }

CImpIAdviseSink::~CImpIAdviseSink ( void )

Definition at line 45 of file iadvsink.cpp.

  {
  m_pIDOD->m_pSink = NULL; // make sure the container knows I've been deleted. SteveBl
  return;
  }

Member Function Documentation

STDMETHODIMP CImpIAdviseSink::QueryInterface | ( | REFIID | riid,
 |  | LPVOID FAR * | ppv
 | ) |  |

Definition at line 63 of file iadvsink.cpp.

  {
  *ppv=NULL;

  //Any interface on this object is the object pointer.
  if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IAdviseSink))
    *ppv=(LPVOID)this;

  /*
   * If we actually assign an interface to ppv we need to AddRef it
   * since we're returning a new pointer.
   */
  if (NULL!=*ppv)
    {
    ((LPUNKNOWN)*ppv)->AddRef();
    return NOERROR;
    }

  return ResultFromScode(E_NOINTERFACE);
  }

CImpIAdviseSink::STDMETHODIMP_ ( void )
CImpIAdviseSink::STDMETHODIMP_ ( void )
CImpIAdviseSink::STDMETHODIMP_ ( void )
CImpIAdviseSink::STDMETHODIMP_ ( void )
CImpIAdviseSink::STDMETHODIMP_ ( void )
CImpIAdviseSink::STDMETHODIMP_ ( ULONG )
CImpIAdviseSink::STDMETHODIMP_ ( ULONG )

Member Data Documentation

CImpIAdviseSink::LONG

Definition at line 36 of file iadvsink.h.

CImpIAdviseSink::LPSTGMEDIUM

Definition at line 35 of file iadvsink.h.

ULONG CImpIAdviseSink::m_cRef [protected]

Definition at line 23 of file iadvsink.h.

CIDataObjectDlg FAR* CImpIAdviseSink::m_pIDOD [protected]

Definition at line 24 of file iadvsink.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/iadvsink.h
  • ole/oleview/iviewers/iadvsink.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInfoBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CInfoBar Class Reference

#include "infobar.h"

List of all members.

Public Member Functions

CInfoBar ()
virtual | ~CInfoBar ()

Protected Member Functions

afx_msg void | OnPaint ()

Detailed Description

Definition at line 16 of file infobar.h.

Constructor & Destructor Documentation

CInfoBar::CInfoBar ( )

Definition at line 24 of file InfoBar.cpp.

{
}

CInfoBar::~CInfoBar ( ) [virtual]

Definition at line 28 of file InfoBar.cpp.

{
}

Member Function Documentation

void CInfoBar::OnPaint ( ) [protected]

Definition at line 43 of file InfoBar.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectClient;
  GetClientRect (rectClient);

  dc.FillSolidRect (rectClient, ::GetSysColor (COLOR_3DHILIGHT));
  dc.Draw3dRect (rectClient, ::GetSysColor (COLOR_3DSHADOW),
    ::GetSysColor (COLOR_3DLIGHT));

  dc.SetBkMode (TRANSPARENT);
  dc.SetTextColor (::GetSysColor (COLOR_BTNTEXT));
  CFont* pOldFont = (CFont*) dc.SelectStockObject (DEFAULT_GUI_FONT);

  CString str = _T("Information...");
  dc.TextOut (10, 10, str);

  dc.SelectObject (pOldFont);
}

The documentation for this class was generated from the following files:
  • vc2008fp/RollupPane/infobar.h
  • vc2008fp/RollupPane/InfoBar.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInfoDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Private Attributes

CInfoDlg Class Reference

#include "InfoDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_INFODLG }

Public Member Functions

CInfoDlg (CImage &image)
virtual BOOL | OnInitDialog ()

Private Attributes

CImage * | m_pImage

Detailed Description

Definition at line 20 of file InfoDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file InfoDlg.h.

{ IDD = IDD_INFODLG };

Constructor & Destructor Documentation

CInfoDlg::CInfoDlg ( CImage & image )

Definition at line 17 of file InfoDlg.cpp.

                                : CDialog(CInfoDlg::IDD)
{
  m_pImage = &image;
}

Member Function Documentation

BOOL CInfoDlg::OnInitDialog ( ) [virtual]

Definition at line 23 of file InfoDlg.cpp.

{
  CDialog::OnInitDialog();

  CStatic* pInfo;
  char buffer[12];

  // display original size
  int width, height;
  pInfo = (CStatic*) GetDlgItem(IDC_IMAGESIZE);
  width = m_pImage->GetWidth();
  height = m_pImage->GetHeight();
  sprintf_s(buffer, 12, "%i x %i",m_pImage->GetWidth(),m_pImage->GetHeight());
  pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);

  // display bit depth
  pInfo = (CStatic*) GetDlgItem(IDC_BITDEPTH);
  sprintf_s(buffer, 12, "%i-bit",m_pImage->GetBPP());
  pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);

  // display DIB section info
  pInfo = (CStatic*) GetDlgItem(IDC_DIBSECTION);
  if (m_pImage->IsDIBSection()) {
    sprintf_s(buffer, 12, "Yes");
  } else {
    sprintf_s(buffer, 12, "No");
  }
  pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);

  // display indexed info
  pInfo = (CStatic*) GetDlgItem(IDC_INDEXED);
  if (m_pImage->IsIndexed()) {
    sprintf_s(buffer, 12, "Yes");
  } else {
    sprintf_s(buffer, 12, "No");
  }
  pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);

  // display pitch
  pInfo = (CStatic*) GetDlgItem(IDC_PITCH);
  sprintf_s(buffer, 12, "%i bytes",m_pImage->GetPitch());
  pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);

  return TRUE;

}

Member Data Documentation

CImage* CInfoDlg::m_pImage [private]

Definition at line 32 of file InfoDlg.h.

The documentation for this class was generated from the following files:
  • general/SimpleImage/InfoDlg.h
  • general/SimpleImage/InfoDlg.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInPlaceFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CInPlaceFrame Class Reference

#include "ipframe.h"

List of all members.

Public Member Functions

CInPlaceFrame ()
CInPlaceFrame ()
CInPlaceFrame ()
CInPlaceFrame ()
CInPlaceFrame ()
virtual | ~CInPlaceFrame ()
virtual | ~CInPlaceFrame ()
virtual | ~CInPlaceFrame ()
virtual void | CalcWindowRect (LPRECT lpClientRect, UINT nAdjustType=adjustBorder)
virtual void | CalcWindowRect (LPRECT lpClientRect, UINT nAdjustType=adjustBorder)
virtual BOOL | OnCreateControlBars (CFrameWnd *pWndFrame, CFrameWnd *pWndDoc)
virtual BOOL | OnCreateControlBars (CFrameWnd *pWndFrame, CFrameWnd *pWndDoc)
BOOL | OnCreateControlBars (CWnd *pWndFrame, CWnd *pWndDoc)
virtual BOOL | OnCreateControlBars (CFrameWnd *pWndFrame, CFrameWnd *pWndDoc)
virtual BOOL | OnCreateControlBars (CFrameWnd *pWndFrame, CFrameWnd *pWndDoc)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual void | RecalcLayout (BOOL bNotify=TRUE)
virtual void | RecalcLayout (BOOL bNotify=TRUE)
virtual void | RepositionFrame (LPCRECT lpPosRect, LPCRECT lpClipRect)
virtual void | RepositionFrame (LPCRECT lpPosRect, LPCRECT lpClipRect)

Public Attributes

CFormatBar m_wndFormatBar
CMFCToolBar | m_wndMenuBar
CWordPadResizeBar m_wndResizeBar
CRulerBar m_wndRulerBar
CMFCToolBar | m_wndToolBar

Protected Member Functions

BOOL | CreateFormatBar (CWnd *pWndFrame)
BOOL | CreateFormatBar (CWnd *pWndFrame)
BOOL | CreateMenuBar ()
BOOL | CreateRulerBar (CWnd *pWndFrame)
BOOL | CreateRulerBar (CWnd *pWndFrame)
BOOL | CreateToolBar (CWnd *pWndFrame)
BOOL | CreateToolBar (CWnd *pWndFrame)
afx_msg LRESULT | OnBarState (WPARAM wParam, LPARAM lParam)
afx_msg LONG_PTR | OnBarState (UINT_PTR wParam, LONG_PTR lParam)
afx_msg void | OnCharColor ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnDestroy ()
afx_msg void | OnHelpFinder ()
afx_msg void | OnHelpFinder ()
afx_msg void | OnPenToggle ()
afx_msg void | OnPenToggle ()
LRESULT | OnResizeChild (WPARAM wParam, LPARAM lParam)
LRESULT | OnResizeChild (WPARAM wParam, LPARAM lParam)
afx_msg void | OnUpdateContextHelp (CCmdUI *pCmdUI)

Protected Attributes

COleDropTarget | m_dropTarget
COleResizeBar | m_wndResizeBar
CToolBar | m_wndToolBar

Detailed Description

Definition at line 12 of file ipframe.h.

Constructor & Destructor Documentation

CInPlaceFrame::CInPlaceFrame ( )

Definition at line 41 of file ipframe.cpp.

{
}

CInPlaceFrame::~CInPlaceFrame ( ) [virtual]

Definition at line 45 of file ipframe.cpp.

{
}

CInPlaceFrame::CInPlaceFrame ( )
virtual CInPlaceFrame::~CInPlaceFrame ( ) [virtual]
CInPlaceFrame::CInPlaceFrame ( )
virtual CInPlaceFrame::~CInPlaceFrame ( ) [virtual]
CInPlaceFrame::CInPlaceFrame ( )
CInPlaceFrame::CInPlaceFrame ( )

Member Function Documentation

void CInPlaceFrame::CalcWindowRect | ( | LPRECT | lpClientRect,
 |  | UINT | nAdjustType = adjustBorder |
 | ) |  |  | [virtual]

Definition at line 282 of file ipframe.cpp.

{
  COleIPFrameWnd::CalcWindowRect(lpClientRect, nAdjustType);
}

virtual void CInPlaceFrame::CalcWindowRect | ( | LPRECT | lpClientRect,
 |  | UINT | nAdjustType = adjustBorder |
 | ) |  |  | [virtual]
BOOL CInPlaceFrame::CreateFormatBar ( CWnd * pWndFrame ) [protected]

Definition at line 177 of file ipframe.cpp.

{
  ASSERT(m_wndFormatBar.m_hWnd == NULL);
  m_wndFormatBar.m_hWndOwner = m_hWnd;
  UINT nID = theApp.m_bLargeIcons ? IDB_FORMATBAR_BIG : IDB_FORMATBAR;
  if (!m_wndFormatBar.Create(pWndFrame, WS_CHILD|WS_VISIBLE|CBRS_TOP|
    CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC, ID_VIEW_FORMATBAR) ||
    !m_wndFormatBar.LoadBitmap(nID) ||
    !m_wndFormatBar.SetButtons(format,
      sizeof(format)/sizeof(UINT)))
  {
    TRACE0("Failed to create FormatBar\n");
    return FALSE;      // fail to create
  }

  if (theApp.m_bLargeIcons)
    m_wndFormatBar.SetSizes(CSize(31,30), CSize(24,24));
  else
    m_wndFormatBar.SetSizes(CSize(23,22), CSize(16,16));
  CString str;
  str.LoadString(IDS_TITLE_FORMATBAR);
  m_wndFormatBar.SetWindowText(str);
  m_wndFormatBar.PositionCombos();
  return TRUE;
}

BOOL CInPlaceFrame::CreateFormatBar ( CWnd * pWndFrame ) [protected]
BOOL CInPlaceFrame::CreateMenuBar ( ) [protected]

Definition at line 163 of file ipframe.cpp.

{
  //----------------------------------------------
  // Create menu bar (replaces the standard menu):
  //----------------------------------------------
  if (!m_wndMenuBar.Create (this, WS_CHILD | WS_VISIBLE | CBRS_TOP, uiMenuBarId))
  {
    TRACE0("Failed to create menubar\n");
    return FALSE;
  }

  m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() |
    CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC | CBRS_GRIPPER | CBRS_BORDER_3D);

  CString str;
  BOOL bValidString;
  bValidString = str.LoadString(IDS_TITLE_MENUBAR);
  ASSERT(bValidString);

  m_wndMenuBar.SetWindowText(str);
  return TRUE;
}

BOOL CInPlaceFrame::CreateRulerBar ( CWnd * pWndFrame ) [protected]

Definition at line 203 of file ipframe.cpp.

{
  if (!m_wndRulerBar.Create(pWndFrame,
    WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP|CBRS_HIDE_INPLACE, ID_VIEW_RULER))
  {
    TRACE0("Failed to create ruler\n");
    return FALSE;      // fail to create
  }
  return TRUE;
}

BOOL CInPlaceFrame::CreateRulerBar ( CWnd * pWndFrame ) [protected]
BOOL CInPlaceFrame::CreateToolBar ( CWnd * pWndFrame ) [protected]
BOOL CInPlaceFrame::CreateToolBar ( CWnd * pWndFrame ) [protected]

Definition at line 150 of file ipframe.cpp.

{
  // Create toolbar on client's frame window
  ASSERT(m_wndToolBar.m_hWnd == NULL);
  int nPen = GetSystemMetrics(SM_PENWINDOWS) ? NUM_PEN_TOGGLE :
    NUM_PEN_ITEMS;
  UINT nID = theApp.m_bLargeIcons ?
    IDR_SRVR_INPLACE_BIG : IDR_SRVR_INPLACE;
  if (!m_wndToolBar.Create(pWndFrame, WS_CHILD|WS_VISIBLE|CBRS_TOP|
      CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC)||
    !m_wndToolBar.LoadBitmap(nID) ||
    !m_wndToolBar.SetButtons(toolButtons,
      sizeof(toolButtons)/sizeof(UINT) - nPen))
  {
    TRACE0("Failed to create toolbar\n");
    return FALSE;      // fail to create
  }
  if (theApp.m_bLargeIcons)
    m_wndToolBar.SetSizes(CSize(31,30), CSize(24,24));
  else
    m_wndToolBar.SetSizes(CSize(23,22), CSize(16,16));
  CString str;
  str.LoadString(IDS_TITLE_TOOLBAR);
  m_wndToolBar.SetWindowText(str);
  return TRUE;
}

LONG_PTR CInPlaceFrame::OnBarState | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 329 of file ipframe.cpp.

{
  if (lParam == -1)
    return 0L;
  if (wParam == 0)
  {
    GetDockState(theApp.GetDockState(RD_EMBEDDED));
    ENSURE(m_pMainFrame != NULL);
    m_pMainFrame->GetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
  }
  else
  {
    SetDockState(theApp.GetDockState(RD_EMBEDDED));
    m_pMainFrame->SetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
  }
  return 0L;
}

LRESULT CInPlaceFrame::OnBarState | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 366 of file ipframe.cpp.

{
  if (lParam == -1)
    return 0L;
  if (wParam == 0)
  {
    GetDockState(theApp.GetDockState(RD_EMBEDDED));
    ASSERT(m_pMainFrame != NULL);
    if (m_pMainFrame != NULL)
    {
      m_pMainFrame->GetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
    }
  }
  else
  {
    SetDockState(theApp.GetDockState(RD_EMBEDDED));
    m_pMainFrame->SetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
  }
  return 0L;
}

void CInPlaceFrame::OnCharColor ( ) [protected]

Definition at line 352 of file ipframe.cpp.

{
  CColorMenu colorMenu;
  CRect rc;
  int index = m_wndFormatBar.CommandToIndex(ID_CHAR_COLOR);
  m_wndFormatBar.GetItemRect(index, &rc);
  m_wndFormatBar.ClientToScreen(rc);
  colorMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,rc.left,rc.bottom, this);
}

afx_msg int CInPlaceFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int CInPlaceFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 49 of file ipframe.cpp.

{
  if (COleIPFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  // CResizeBar implements in-place resizing.
  if (!m_wndResizeBar.Create(this))
  {
    TRACE0("Failed to create resize bar\n");
    return -1;      // fail to create
  }

  // By default, it is a good idea to register a drop-target that does
  //  nothing with your frame window.  This prevents drops from
  //  "falling through" to a container that supports drag-drop.
  m_dropTarget.Register(this);

  return 0;
}

afx_msg int CInPlaceFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CInPlaceFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CInPlaceFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
virtual BOOL CInPlaceFrame::OnCreateControlBars | ( | CFrameWnd * | pWndFrame,
 |  | CFrameWnd * | pWndDoc |
 | ) |  |  | [virtual]
virtual BOOL CInPlaceFrame::OnCreateControlBars | ( | CFrameWnd * | pWndFrame,
 |  | CFrameWnd * | pWndDoc |
 | ) |  |  | [virtual]
BOOL CInPlaceFrame::OnCreateControlBars | ( | CFrameWnd * | pWndFrame,
 |  | CFrameWnd * | pWndDoc |
 | ) |  |  | [virtual]

Definition at line 74 of file ipframe.cpp.

{
  // Set owner to this window, so messages are delivered to correct app
  m_wndToolBar.SetOwner(this);

  // Create toolbar on client's frame window
  if (!m_wndToolBar.Create(pWndFrame) ||
    !m_wndToolBar.LoadToolBar(IDR_SCRIBBTYPE_SRVR_IP))
  {
    TRACE0("Failed to create toolbar\n");
    return FALSE;
  }

  // TODO: Remove this if you don't want tool tips
  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.EnableDocking(CBRS_ALIGN_ANY);
  pWndFrame->EnableDocking(CBRS_ALIGN_ANY);
  pWndFrame->DockControlBar(&m_wndToolBar);

  return TRUE;
}

virtual BOOL CInPlaceFrame::OnCreateControlBars | ( | CFrameWnd * | pWndFrame,
 |  | CFrameWnd * | pWndDoc |
 | ) |  |  | [virtual]
BOOL CInPlaceFrame::OnCreateControlBars | ( | CWnd * | pWndFrame,
 |  | CWnd * | pWndDoc
 | ) |  |

Definition at line 73 of file ipframe.cpp.

{
  // create toolbar on client's frame window
  if (!m_wndToolBar.Create(pWndFrame) ||
    !m_wndToolBar.LoadBitmap(IDR_TEXTTYPE_INPLACE) ||
    !m_wndToolBar.SetButtons(buttons,
      sizeof(buttons)/sizeof(UINT)))
  {
    TRACE0("Failed to create toolbar\n");
    return FALSE;
  }

  // set owner to this window, so messages are delivered to correct app
  m_wndToolBar.SetOwner(this);
  return TRUE;
}

afx_msg void CInPlaceFrame::OnDestroy ( ) [protected]
void CInPlaceFrame::OnDestroy ( void ) [protected]

Definition at line 235 of file ipframe.cpp.

{
  m_wndToolBar.DestroyWindow();
  m_wndFormatBar.DestroyWindow();
  COleIPFrameWnd::OnDestroy();
}

void CInPlaceFrame::OnHelpFinder ( ) [protected]

Definition at line 347 of file ipframe.cpp.

{
  theApp.WinHelp(0, HELP_FINDER);
}

afx_msg void CInPlaceFrame::OnHelpFinder ( ) [protected]
afx_msg void CInPlaceFrame::OnPenToggle ( ) [protected]
void CInPlaceFrame::OnPenToggle ( ) [protected]

Definition at line 362 of file ipframe.cpp.

{
  static int nPen = 0;
  m_wndToolBar.SetButtons(toolButtons, sizeof(toolButtons)/sizeof(UINT) - nPen);
  nPen = (nPen == 0) ? NUM_PEN_TOGGLE : 0;
  m_wndToolBar.Invalidate();
  m_wndToolBar.GetParentFrame()->RecalcLayout();
}

LRESULT CInPlaceFrame::OnResizeChild | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 287 of file ipframe.cpp.

{
  // notify the container that the rectangle has changed!
  CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
  if (pDoc == NULL)
    return 0;

  ASSERT(pDoc->IsKindOf(RUNTIME_CLASS(CWordPadDoc)));

  // get new rect and parent
  CRect rectNew;
  rectNew.CopyRect((LPCRECT)lParam);
  CWnd* pParentWnd = GetParent();
  ASSERT_VALID(pParentWnd);

  // convert rectNew relative to pParentWnd
  ClientToScreen(&rectNew);
  pParentWnd->ScreenToClient(&rectNew);

  if (m_wndRulerBar.GetStyle()&WS_VISIBLE)
  {
    CRect rect;
    m_wndRulerBar.GetWindowRect(&rect);
    rectNew.top += rect.Height();
  }
  rectNew.left += HORZ_TEXTOFFSET;
  rectNew.top += VERT_TEXTOFFSET;

  // adjust the new rectangle for the current control bars
  CWnd* pLeftOver = GetDlgItem(AFX_IDW_PANE_FIRST);
  ENSURE(pLeftOver != NULL);
  CRect rectCur = m_rectPos;
  pLeftOver->CalcWindowRect(&rectCur, CWnd::adjustOutside);
  rectNew.left += m_rectPos.left - rectCur.left;
  rectNew.top += m_rectPos.top - rectCur.top;
  rectNew.right -= rectCur.right - m_rectPos.right;
  rectNew.bottom -= rectCur.bottom - m_rectPos.bottom;
  OnRequestPositionChange(rectNew);

  return 0;
}

LRESULT CInPlaceFrame::OnResizeChild | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]
void CInPlaceFrame::OnUpdateContextHelp ( CCmdUI * pCmdUI ) [protected]

Definition at line 123 of file ipframe.cpp.

{
  pCmdUI->SetCheck(!!m_bHelpMode);
}

BOOL CInPlaceFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 101 of file ipframe.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return COleIPFrameWnd::PreCreateWindow(cs);
}

void CInPlaceFrame::RecalcLayout ( BOOL bNotify = TRUE ) [virtual]

Definition at line 255 of file ipframe.cpp.

{
  if (m_wndResizeBar.m_hWnd != NULL)
    m_wndResizeBar.BringWindowToTop();
  COleIPFrameWnd::RecalcLayout(bNotify);
  CWnd* pWnd = GetActiveView();
  if (pWnd != NULL)
    pWnd->BringWindowToTop();
  if (m_wndRulerBar.m_hWnd != NULL)
    m_wndRulerBar.BringWindowToTop();

  // at least 12 pt region plus ruler if it exists
  CDisplayIC dc;
  CSize size;
  size.cy = MulDiv(12, dc.GetDeviceCaps(LOGPIXELSY), 72)+1;
  size.cx = dc.GetDeviceCaps(LOGPIXELSX)/4; // 1/4"
  size.cx += HORZ_TEXTOFFSET; //adjust for offset
  size.cy += VERT_TEXTOFFSET;
  if (m_wndRulerBar.m_hWnd != NULL && m_wndRulerBar.IsVisible())
  {
    CRect rect;
    m_wndRulerBar.GetWindowRect(&rect);
    size.cy += rect.Height();
  }
  m_wndResizeBar.SetMinSize(size);
}

virtual void CInPlaceFrame::RecalcLayout ( BOOL bNotify = TRUE ) [virtual]
void CInPlaceFrame::RepositionFrame | ( | LPCRECT | lpPosRect,
 |  | LPCRECT | lpClipRect |
 | ) |  |  | [virtual]

Definition at line 242 of file ipframe.cpp.

{
  CRect rectNew = lpPosRect;
  rectNew.left -= HORZ_TEXTOFFSET;
  rectNew.top -= VERT_TEXTOFFSET;
  m_wndResizeBar.BringWindowToTop();
  COleIPFrameWnd::RepositionFrame(&rectNew, lpClipRect);
  CWnd* pWnd = GetActiveView();
  if (pWnd != NULL)
    pWnd->BringWindowToTop();
  m_wndRulerBar.BringWindowToTop();
}

virtual void CInPlaceFrame::RepositionFrame | ( | LPCRECT | lpPosRect,
 |  | LPCRECT | lpClipRect |
 | ) |  |  | [virtual]

Member Data Documentation

COleDropTarget CInPlaceFrame::m_dropTarget [protected]

Definition at line 43 of file ipframe.h.

CFormatBar CInPlaceFrame::m_wndFormatBar

Definition at line 30 of file ipframe.h.

CMFCToolBar CInPlaceFrame::m_wndMenuBar

Definition at line 28 of file ipframe.h.

CWordPadResizeBar CInPlaceFrame::m_wndResizeBar

Definition at line 32 of file ipframe.h.

CWordPadResizeBar CInPlaceFrame::m_wndResizeBar [protected]

Definition at line 42 of file ipframe.h.

CRulerBar CInPlaceFrame::m_wndRulerBar

Definition at line 31 of file ipframe.h.

CMFCToolBar CInPlaceFrame::m_wndToolBar

Definition at line 29 of file ipframe.h.

CToolBar CInPlaceFrame::m_wndToolBar [protected]

Definition at line 41 of file ipframe.h.

The documentation for this class was generated from the following files:
  • general/Scribble/ipframe.h
  • ole/hiersvr/ipframe.h
  • ole/superpad/ipframe.h
  • ole/wordpad/ipframe.h
  • vc2008fp/WordPad/ipframe.h
  • general/Scribble/ipframe.cpp
  • ole/hiersvr/ipframe.cpp
  • ole/superpad/ipframe.cpp
  • ole/wordpad/ipframe.cpp
  • vc2008fp/WordPad/ipframe.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInProcApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CInProcApp Class Reference

#include "inproc.h"

List of all members.

Public Member Functions

CInProcApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 23 of file inproc.h.

Constructor & Destructor Documentation

CInProcApp::CInProcApp ( )

Definition at line 33 of file inproc.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CInProcApp::InitInstance ( ) [virtual]

Definition at line 47 of file inproc.cpp.

{
#ifndef _USRDLL
  if (!RunEmbedded() && !RunAutomated())
  {
    COleObjectFactory::UpdateRegistryAll();
    AfxMessageBox(IDP_CANT_RUN_STANDALONE);
    return FALSE;
  }

  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }
#endif

  // Register all OLE server (factories) as running.  This enables the
  //  OLE libraries to create objects from other applications.
  COleObjectFactory::RegisterAll();

  return TRUE;
}

afx_msg void CInProcApp::OnAppAbout ( )
The documentation for this class was generated from the following files:
  • ole/inproc/inproc.h
  • ole/inproc/inproc.cpp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInputView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CInputView Class Reference

#include "inputvw.h"

List of all members.

Public Types

enum | { IDD = IDD_INPUTFORM }

Public Member Functions

CMainDoc * GetDocument ()

Public Attributes

int | m_iColor
CString | m_strData

Protected Member Functions

CInputView ()
virtual | ~CInputView ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDataChange ()
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)

Detailed Description

Definition at line 15 of file inputvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file inputvw.h.

{ IDD = IDD_INPUTFORM };

Constructor & Destructor Documentation

CInputView::CInputView ( ) [protected]

Definition at line 25 of file inputvw.cpp.

  : CFormView(CInputView::IDD)
{
  //{{AFX_DATA_INIT(CInputView)
  m_strData = "";
  m_iColor = -1;
  //}}AFX_DATA_INIT
}

CInputView::~CInputView ( ) [protected, virtual]

Definition at line 34 of file inputvw.cpp.

{
}

Member Function Documentation

void CInputView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 57 of file inputvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CInputView)
  DDX_Text(pDX, IDC_EDIT1, m_strData);
  DDX_Radio(pDX, IDC_RADIO1, m_iColor);
  //}}AFX_DATA_MAP
}

CMainDoc* CInputView::GetDocument ( ) [inline]

Definition at line 31 of file inputvw.h.

      {
        ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
        return (CMainDoc*) m_pDocument;
      }

void CInputView::OnDataChange ( ) [protected]

Definition at line 78 of file inputvw.cpp.

{
  if (!UpdateData())
    return;

  CMainDoc* pDoc = GetDocument();
  COLORREF color = RGB(255 * (m_iColor == 0),
            255 * (m_iColor == 1),
            255 * (m_iColor == 2));

  BOOL bUpdate = FALSE;
  if (m_strData != pDoc->m_strData)
  {
    pDoc->m_strData = m_strData;
    bUpdate = TRUE;
  }
  if (color != pDoc->m_colorData)
  {
    pDoc->m_colorData = color;
    bUpdate = TRUE;
  }
  if (bUpdate)
  {
    // if the document stored data then we would call SetModifiedFlag here
    pDoc->UpdateAllViews(this);
  }
}

void CInputView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 38 of file inputvw.cpp.

{
  CMainDoc* pDoc = GetDocument();
  m_strData = pDoc->m_strData;

  if (pDoc->m_colorData == RGB(255, 0, 0))
    m_iColor = 0;
  else if (pDoc->m_colorData == RGB(0, 255, 0))
    m_iColor = 1;
  else if (pDoc->m_colorData == RGB(0, 0, 255))
    m_iColor = 2;
  else
    m_iColor = -1;

TRACE2("OnUpdate: m_iColor = %d ($%lx)\n", m_iColor, pDoc->m_colorData);

  UpdateData(FALSE);  // set the data into the controls
}

Member Data Documentation

int CInputView::m_iColor

Definition at line 26 of file inputvw.h.

CString CInputView::m_strData

Definition at line 25 of file inputvw.h.

The documentation for this class was generated from the following files:
  • general/viewex/inputvw.h
  • general/viewex/inputvw.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInsertControlDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CInsertControlDlg Class Reference

#include "InsCtlDg.H"

List of all members.

Public Types

enum | { IDD = IDD_INSERTCONTROL }

Public Member Functions

CInsertControlDlg (CWnd *pParent=NULL)

Public Attributes

CButton | m_butIgnoreRequiredCategories
CButton | m_butOK
CButton | m_butRequiredCategories
CLSID | m_clsid
CListBox | m_lbControls
CStatic | m_staticServerPath

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnControlsDblClk ()
afx_msg void | OnControlsSelChange ()
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
afx_msg void | OnIgnoreRequiredCategories ()
afx_msg void | OnImplementedCategories ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnRequiredCategories ()
void | RefreshControlList ()

Protected Attributes

CArray< CATID, CATID & > | m_aImplementedCategories
CArray< CATID, CATID & > | m_aRequiredCategories
CList< CLSID, CLSID & > | m_lControls
ICatInformationPtr | m_pCatInfo

Detailed Description

Definition at line 22 of file InsCtlDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file InsCtlDg.H.

{ IDD = IDD_INSERTCONTROL };

Constructor & Destructor Documentation

CInsertControlDlg::CInsertControlDlg ( CWnd * pParent = NULL )

Definition at line 24 of file InsCtlDg.Cpp.

                                                    :
   CDialog( CInsertControlDlg::IDD, pParent ),
   m_clsid( CLSID_NULL )
{
  //{{AFX_DATA_INIT(CInsertControlDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CInsertControlDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file InsCtlDg.Cpp.

{
   int iItem;
   POSITION posControl;

  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CInsertControlDlg)
  DDX_Control(pDX, IDC_SERVERPATH, m_staticServerPath);
  DDX_Control(pDX, IDC_REQUIREDCATEGORIES, m_butRequiredCategories);
  DDX_Control(pDX, IDC_IGNOREREQUIREDCATEGORIES, m_butIgnoreRequiredCategories);
  DDX_Control(pDX, IDOK, m_butOK);
  DDX_Control(pDX, IDC_CONTROLS, m_lbControls);
  //}}AFX_DATA_MAP

   if( pDX->m_bSaveAndValidate )
   {
    iItem = m_lbControls.GetCurSel();
    if( iItem == LB_ERR )
    {
     m_clsid = CLSID_NULL;
    }
    else
    {
     posControl = POSITION( m_lbControls.GetItemDataPtr( iItem ) );
     ASSERT( posControl != NULL );
     m_clsid = m_lControls.GetAt( posControl );
    }
   }
}

void CInsertControlDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 459 of file InsCtlDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

void CInsertControlDlg::OnControlsDblClk ( ) [protected]

Definition at line 349 of file InsCtlDg.Cpp.

{
   OnOK();
}

void CInsertControlDlg::OnControlsSelChange ( ) [protected]

Definition at line 385 of file InsCtlDg.Cpp.

{
   int iItem;
   POSITION posControl;
   CString strServerPath;
   CLSID clsid;
   CDC dc;
   CFont* pFont;
   LPTSTR pszServerPath;
   CRect rect;
   CFont* pOldFont;

   iItem = m_lbControls.GetCurSel();
   if( iItem != LB_ERR )
   {
    m_butOK.EnableWindow( TRUE );
    posControl = POSITION( m_lbControls.GetItemDataPtr( iItem ) );
    clsid = m_lControls.GetAt( posControl );
    GetClassServerPath( clsid, strServerPath );

    dc.CreateCompatibleDC( NULL );

    pFont = m_staticServerPath.GetFont();
    pOldFont = dc.SelectObject( pFont );

    // Workaround for SHLWAPI bug (in weird cases, PathCompactPath actually
    // expands the pathname)
    pszServerPath = strServerPath.GetBuffer( MAX_PATH+2 );
    m_staticServerPath.GetWindowRect( &rect );
    PathCompactPath( dc, pszServerPath, rect.Width() );
    strServerPath.ReleaseBuffer();

    dc.SelectObject( pOldFont );

    m_staticServerPath.SetWindowText( strServerPath );
   }
   else
   {
    m_butOK.EnableWindow( FALSE );
    m_staticServerPath.SetWindowText( NULL );
   }
}

BOOL CInsertControlDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 451 of file InsCtlDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

void CInsertControlDlg::OnIgnoreRequiredCategories ( ) [protected]

Definition at line 428 of file InsCtlDg.Cpp.

{
   RefreshControlList();

   if( m_butIgnoreRequiredCategories.GetCheck() )
   {
    m_butRequiredCategories.EnableWindow( FALSE );
   }
   else
   {
    m_butRequiredCategories.EnableWindow( TRUE );
   }
}

void CInsertControlDlg::OnImplementedCategories ( ) [protected]

Definition at line 317 of file InsCtlDg.Cpp.

{
   CComponentCategoriesDlg dlg( IDS_IMPLEMENTEDCATEGORIES );
   int nResult;
   int iCategory;
   POSITION posCategory;
   CATID catid;

   for( iCategory = 0; iCategory < m_aImplementedCategories.GetSize();
    iCategory++ )
   {
    dlg.m_lSelectedCategories.AddTail( m_aImplementedCategories[
     iCategory] );
   }

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   m_aImplementedCategories.RemoveAll();
   posCategory = dlg.m_lSelectedCategories.GetHeadPosition();
   while( posCategory != NULL )
   {
    catid = dlg.m_lSelectedCategories.GetNext( posCategory );
    m_aImplementedCategories.Add( catid );
   }

   RefreshControlList();
}

BOOL CInsertControlDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 80 of file InsCtlDg.Cpp.

{
   HRESULT hResult;
   CATID catid;

   hResult = m_pCatInfo.CreateInstance( CLSID_StdComponentCategoriesMgr, NULL,
    CLSCTX_INPROC_SERVER );
   if( FAILED( hResult ) )
   {
    TRACE( "Failed to create category manager\n" );
    EndDialog( IDCANCEL );
    return( TRUE );
   }

  CDialog::OnInitDialog();

   catid = CATID_Control;
   m_aImplementedCategories.Add( catid );

   m_butIgnoreRequiredCategories.SetCheck( 0 );

   m_lbControls.ModifyStyle( 0, WS_HSCROLL );

   RefreshControlList();

   m_lbControls.SetFocus();

  return( FALSE );
}

void CInsertControlDlg::OnRequiredCategories ( ) [protected]

Definition at line 354 of file InsCtlDg.Cpp.

{
   CComponentCategoriesDlg dlg( IDS_REQUIREDCATEGORIES );
   int nResult;
   int iCategory;
   POSITION posCategory;
   CATID catid;

   for( iCategory = 0; iCategory < m_aRequiredCategories.GetSize();
    iCategory++ )
   {
    dlg.m_lSelectedCategories.AddTail( m_aRequiredCategories[iCategory] );
   }

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   m_aRequiredCategories.RemoveAll();
   posCategory = dlg.m_lSelectedCategories.GetHeadPosition();
   while( posCategory != NULL )
   {
    catid = dlg.m_lSelectedCategories.GetNext( posCategory );
    m_aRequiredCategories.Add( catid );
   }

   RefreshControlList();
}

void CInsertControlDlg::RefreshControlList ( ) [protected]

Definition at line 189 of file InsCtlDg.Cpp.

{
   BOOL tDone;
   HRESULT hResult;
   IEnumGUIDPtr pEnum;
   ULONG nImplementedCategories;
   CATID* pcatidImpl;
   ULONG nRequiredCategories;
   CATID* pcatidReq;
   CLSID clsid;
   LPOLESTR pszName;
   CString strName;
   ULONG iCategory;
   int iItem;
   POSITION posControl;
   CString strServerPath;
   CString strString;

   m_lbControls.ResetContent();
   m_lControls.RemoveAll();

   nImplementedCategories = (ULONG)m_aImplementedCategories.GetSize();
   if( nImplementedCategories == 0 )
   {
    nImplementedCategories = ULONG( -1 );
    pcatidImpl = NULL;
   }
   else
   {
    pcatidImpl = (CATID*)_malloca( nImplementedCategories*sizeof( CATID ) );
    for( iCategory = 0; iCategory < nImplementedCategories; iCategory++ )
    {
     pcatidImpl[iCategory] = m_aImplementedCategories[iCategory];
    }
   }

   if( m_butIgnoreRequiredCategories.GetCheck() )
   {
    nRequiredCategories = ULONG( -1 );
    pcatidReq = NULL;
   }
   else
   {
    nRequiredCategories = (ULONG)m_aRequiredCategories.GetSize();
    if( nRequiredCategories == 0 )
    {
     pcatidReq = NULL;
    }
    else
    {
     pcatidReq = (CATID*)_malloca( nRequiredCategories*sizeof( CATID ) );
     for( iCategory = 0; iCategory < nRequiredCategories; iCategory++ )
     {
      pcatidReq[iCategory] = m_aRequiredCategories[iCategory];
     }
    }
   }

   hResult = m_pCatInfo->EnumClassesOfCategories( nImplementedCategories,
    pcatidImpl, nRequiredCategories, pcatidReq, &pEnum );

   _freea(pcatidImpl);
   _freea(pcatidReq);

   if( FAILED( hResult ) )
   {
    return;
   }

   tDone = FALSE;

   int nExtent = 0;
   TEXTMETRIC tm;
   ::ZeroMemory(&tm, sizeof(TEXTMETRIC));
   CFont *pFont = NULL;
   CFont *pOldFont = NULL;
   CDC *pDC = m_lbControls.GetDC();
   ASSERT(pDC);
   if (pDC)
   {
     pFont = m_lbControls.GetFont();
     ASSERT(pFont);
       if (pFont)
     {
       pOldFont = pDC->SelectObject(pFont);
       VERIFY(pDC->GetTextMetrics(&tm));
     }
   }

   while( !tDone )
   {
    hResult = pEnum->Next( 1, &clsid, NULL );
    if( hResult == S_OK )
    {
     pszName = NULL;
     hResult = OleRegGetUserType( clsid, USERCLASSTYPE_FULL, &pszName );
     if( SUCCEEDED( hResult ) )
     {
      strName = pszName;
      CoTaskMemFree( pszName );
      pszName = NULL;
      if (pDC && pFont)
      {
        CSize sz = pDC->GetTextExtent(strName);
        if (sz.cx > nExtent)
          nExtent = sz.cx;
      }
      iItem = m_lbControls.AddString( strName );
      posControl = m_lControls.AddTail( clsid );
      m_lbControls.SetItemDataPtr( iItem, posControl );
     }
    }
    else
    {
     tDone = TRUE;
    }
   }
   if (pDC && pFont)
   {
     pDC->SelectObject(pOldFont);
     m_lbControls.SetHorizontalExtent(nExtent + tm.tmAveCharWidth);
   }

   OnControlsSelChange();
}

Member Data Documentation

CArray< CATID, CATID& > CInsertControlDlg::m_aImplementedCategories [protected]

Definition at line 52 of file InsCtlDg.H.

CArray< CATID, CATID& > CInsertControlDlg::m_aRequiredCategories [protected]

Definition at line 53 of file InsCtlDg.H.

CButton CInsertControlDlg::m_butIgnoreRequiredCategories

Definition at line 33 of file InsCtlDg.H.

CButton CInsertControlDlg::m_butOK

Definition at line 34 of file InsCtlDg.H.

CButton CInsertControlDlg::m_butRequiredCategories

Definition at line 32 of file InsCtlDg.H.

CLSID CInsertControlDlg::m_clsid

Definition at line 38 of file InsCtlDg.H.

CListBox CInsertControlDlg::m_lbControls

Definition at line 35 of file InsCtlDg.H.

CList< CLSID, CLSID& > CInsertControlDlg::m_lControls [protected]

Definition at line 54 of file InsCtlDg.H.

ICatInformationPtr CInsertControlDlg::m_pCatInfo [protected]

Definition at line 51 of file InsCtlDg.H.

CStatic CInsertControlDlg::m_staticServerPath

Definition at line 31 of file InsCtlDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/InsCtlDg.H
  • ole/TstCon/InsCtlDg.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInsertTableDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CInsertTableDlg Class Reference

#include "InsertTbl.h"

List of all members.

Public Types

enum | { IDD = IDD_INSERT_TABLE }

Public Member Functions

CInsertTableDlg (CWnd *pParent=NULL)

Public Attributes

CString | m_Caption
CString | m_CellAttribs
UINT m_NumCols
UINT m_NumRows
CString | m_TableAttribs

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 22 of file InsertTbl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file InsertTbl.h.

{ IDD = IDD_INSERT_TABLE };

Constructor & Destructor Documentation

CInsertTableDlg::CInsertTableDlg ( CWnd * pParent = NULL )

Definition at line 26 of file InsertTbl.cpp.

  : CDialog(CInsertTableDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CInsertTableDlg)
  m_Caption = _T("");
  m_CellAttribs = _T("");
  m_NumCols = 1;
  m_NumRows = 1;
  m_TableAttribs = _T("border=1 cellPadding=1 cellSpacing=1 width=75%");
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CInsertTableDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 39 of file InsertTbl.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CInsertTableDlg)
  DDX_Text(pDX, IDC_EDIT_CAPTION, m_Caption);
  DDX_Text(pDX, IDC_EDIT_CELLATTRIBS, m_CellAttribs);
  DDX_Text(pDX, IDC_EDIT_NUMCOLS, m_NumCols);
  DDV_MinMaxUInt(pDX, m_NumCols, 0, 50000);
  DDX_Text(pDX, IDC_EDIT_NUMROWS, m_NumRows);
  DDV_MinMaxUInt(pDX, m_NumRows, 1, 50000);
  DDX_Text(pDX, IDC_EDIT_TABLEATTRIBS, m_TableAttribs);
  //}}AFX_DATA_MAP
}

Member Data Documentation

CString CInsertTableDlg::m_Caption

Definition at line 31 of file InsertTbl.h.

CString CInsertTableDlg::m_CellAttribs

Definition at line 32 of file InsertTbl.h.

UINT CInsertTableDlg::m_NumCols

Definition at line 33 of file InsertTbl.h.

UINT CInsertTableDlg::m_NumRows

Definition at line 34 of file InsertTbl.h.

CString CInsertTableDlg::m_TableAttribs

Definition at line 35 of file InsertTbl.h.

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/InsertTbl.h
  • internet/HTMLEdit/InsertTbl.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInterfaceInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CInterfaceInfo Class Reference

#include "MethInfo.H"

List of all members.

Public Member Functions

CInterfaceInfo ()
~CInterfaceInfo ()
CMethodInfo * | FindMethod (DISPID dispid) const
CMethodInfo * | FindPropertyGet (DISPID dispid) const
IID | GetIID () const
CMethodInfo * | GetMethod (int iMethod) const
int | GetNumMethods () const
HRESULT | Init (ITypeInfo *pTypeInfo)

Public Attributes

CTypedPtrArray< CPtrArray,
CMethodInfo * > 		m_apMethodInfo
IID | m_iid

Detailed Description

Definition at line 70 of file MethInfo.H.

Constructor & Destructor Documentation

CInterfaceInfo::CInterfaceInfo ( )

Definition at line 328 of file MethInfo.Cpp.

                               :
   m_iid( IID_NULL )
{
}

CInterfaceInfo::~CInterfaceInfo ( )

Definition at line 333 of file MethInfo.Cpp.

{
   int iMethod;

   for( iMethod = 0; iMethod < m_apMethodInfo.GetSize(); iMethod++ )
   {
    delete m_apMethodInfo[iMethod];
   }
}

Member Function Documentation

CMethodInfo * CInterfaceInfo::FindMethod ( DISPID dispid ) const

Definition at line 343 of file MethInfo.Cpp.

{
   int iMethod;

   for( iMethod = 0; iMethod < m_apMethodInfo.GetSize(); iMethod++ )
   {
    if( m_apMethodInfo[iMethod]->GetID() == dispid )
    {
     return( m_apMethodInfo[iMethod] );
    }
   }

   return( NULL );
}

CMethodInfo * CInterfaceInfo::FindPropertyGet ( DISPID dispid ) const

Definition at line 358 of file MethInfo.Cpp.

{
   int iMethod;
   CMethodInfo* pMethodInfo;

   for( iMethod = 0; iMethod < m_apMethodInfo.GetSize(); iMethod++ )
   {
    pMethodInfo = m_apMethodInfo[iMethod];
    if( (pMethodInfo->GetID() == dispid) && (pMethodInfo->GetInvokeKind() ==
     INVOKE_PROPERTYGET) )
    {
     return( pMethodInfo );
    }
   }

   return( NULL );
}

IID CInterfaceInfo::GetIID ( ) const

Definition at line 376 of file MethInfo.Cpp.

{
   return( m_iid );
}

CMethodInfo * CInterfaceInfo::GetMethod ( int iMethod ) const

Definition at line 381 of file MethInfo.Cpp.

{
   return( m_apMethodInfo[iMethod] );
}

int CInterfaceInfo::GetNumMethods ( ) const

Definition at line 386 of file MethInfo.Cpp.

{
   return( (int)m_apMethodInfo.GetSize() );
}

HRESULT CInterfaceInfo::Init ( ITypeInfo * pTypeInfo )

Definition at line 391 of file MethInfo.Cpp.

{
   HRESULT hResult;
   CSmartTypeAttr pTypeAttr( pTypeInfo );
   CSmartFuncDesc pFuncDesc( pTypeInfo );
   CSmartVarDesc pVarDesc( pTypeInfo );
   int iVar;
   int iMethod;
   int iDestMethod;
   BOOL tFound;

   ASSERT( pTypeInfo != NULL );

   hResult = pTypeInfo->GetTypeAttr( &pTypeAttr );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   m_iid = pTypeAttr->guid;

   // Allocate enough space for the maximum number of methods that we could
   // possibly have, plus room for two methods for each property in case the
   // type info doesn't specify properties as put and set methods.
   m_apMethodInfo.SetSize( pTypeAttr->cFuncs+(2*pTypeAttr->cVars) );

   iDestMethod = 0;
   for( iMethod = 0; iMethod < pTypeAttr->cFuncs; iMethod++ )
   {
    hResult = pTypeInfo->GetFuncDesc( iMethod, &pFuncDesc );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }

    // Only add the function to our list if it is at least at nesting level
    // 2 (i.e. defined in an interface derived from IDispatch).
    if( !(pFuncDesc->wFuncFlags&FUNCFLAG_FRESTRICTED) &&
     (pFuncDesc->funckind == FUNC_DISPATCH) )
    {
     m_apMethodInfo[iDestMethod] = new CMethodInfo;
     if( m_apMethodInfo[iDestMethod] == NULL )
     {
      return( E_OUTOFMEMORY );
     }
     hResult = m_apMethodInfo[iDestMethod]->Init( pTypeInfo, pFuncDesc );
     if( FAILED( hResult ) )
     {
      return( hResult );
     }
     iDestMethod++;
    }
    pFuncDesc.Release();
   }

   for( iVar = 0; iVar < pTypeAttr->cVars; iVar++ )
   {
    hResult = pTypeInfo->GetVarDesc( iVar, &pVarDesc );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }

    if( (pVarDesc->varkind == VAR_DISPATCH) && !(pVarDesc->wVarFlags&
     VARFLAG_FRESTRICTED) )
    {
     tFound = FALSE;
     for( iMethod = 0; iMethod < iDestMethod; iMethod++ )
     {
      if( (m_apMethodInfo[iMethod]->GetID() == pVarDesc->memid) &&
         (m_apMethodInfo[iMethod]->GetInvokeKind() ==
         INVOKE_PROPERTYGET) )
      {
         tFound = TRUE;
      }
     }

     if( !tFound )
     {
      // We haven't already added this one as a method, so do it now.

      m_apMethodInfo[iDestMethod] = new CMethodInfo;
      if( m_apMethodInfo[iDestMethod] == NULL )
      {
         return( E_OUTOFMEMORY );
      }
      hResult = m_apMethodInfo[iDestMethod]->InitPropertyGet( pTypeInfo,
         pVarDesc );
      if( FAILED( hResult ) )
      {
         return( hResult );
      }
      iDestMethod++;
     }

     if( !(pVarDesc->wVarFlags&VARFLAG_FREADONLY) )
     {
      tFound = FALSE;
      for( iMethod = 0; iMethod < iDestMethod; iMethod++ )
      {
         if( (m_apMethodInfo[iMethod]->GetID() == pVarDesc->memid) &&
          (m_apMethodInfo[iMethod]->GetInvokeKind() ==
          INVOKE_PROPERTYPUT) )
         {
          tFound = TRUE;
         }
      }

      if( !tFound )
      {
         // We haven't already added this one as a method, so do it now.

         m_apMethodInfo[iDestMethod] = new CMethodInfo;
         if( m_apMethodInfo[iDestMethod] == NULL )
         {
          return( E_OUTOFMEMORY );
         }
         hResult = m_apMethodInfo[iDestMethod]->InitPropertyPut(
          pTypeInfo, pVarDesc );
         if( FAILED( hResult ) )
         {
          return( hResult );
         }
         iDestMethod++;
      }
     }
    }

    pVarDesc.Release();
   }

   // Trim the array down to the actual size.
   m_apMethodInfo.SetSize( iDestMethod );

   return( S_OK );
}

Member Data Documentation

CTypedPtrArray< CPtrArray, CMethodInfo* > CInterfaceInfo::m_apMethodInfo

Definition at line 84 of file MethInfo.H.

IID CInterfaceInfo::m_iid

Definition at line 85 of file MethInfo.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/MethInfo.H
  • ole/TstCon/MethInfo.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInterfacesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CInterfacesPage Class Reference

#include "IFacesPg.H"

List of all members.

Public Types

enum | { IDD = IDD_CONTAINEROPTIONS_INTERFACES }

Public Member Functions

CInterfacesPage ()
~CInterfacesPage ()

Public Attributes

BOOL | m_tIAdviseSinkEx
BOOL | m_tIOleInPlaceSiteEx
BOOL | m_tIOleInPlaceSiteWindowless

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)

Detailed Description

Definition at line 22 of file IFacesPg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 33 of file IFacesPg.H.

{ IDD = IDD_CONTAINEROPTIONS_INTERFACES };

Constructor & Destructor Documentation

CInterfacesPage::CInterfacesPage ( )

Definition at line 25 of file IFacesPg.Cpp.

                                 : CPropertyPage(CInterfacesPage::IDD)
{
   m_psp.dwFlags &= ~PSP_HASHELP;

  //{{AFX_DATA_INIT(CInterfacesPage)
  m_tIOleInPlaceSiteWindowless = FALSE;
  m_tIOleInPlaceSiteEx = FALSE;
  m_tIAdviseSinkEx = FALSE;
  //}}AFX_DATA_INIT
}

CInterfacesPage::~CInterfacesPage ( )

Definition at line 36 of file IFacesPg.Cpp.

{
}

Member Function Documentation

void CInterfacesPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 40 of file IFacesPg.Cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CInterfacesPage)
  DDX_Check(pDX, IDC_IOLEINPLACESITEWINDOWLESS, m_tIOleInPlaceSiteWindowless);
  DDX_Check(pDX, IDC_IOLEINPLACESITEEX, m_tIOleInPlaceSiteEx);
  DDX_Check(pDX, IDC_IADVISESINKEX, m_tIAdviseSinkEx);
  //}}AFX_DATA_MAP
}

void CInterfacesPage::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 78 of file IFacesPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CInterfacesPage::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 70 of file IFacesPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

Member Data Documentation

BOOL CInterfacesPage::m_tIAdviseSinkEx

Definition at line 36 of file IFacesPg.H.

BOOL CInterfacesPage::m_tIOleInPlaceSiteEx

Definition at line 35 of file IFacesPg.H.

BOOL CInterfacesPage::m_tIOleInPlaceSiteWindowless

Definition at line 34 of file IFacesPg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/IFacesPg.H
  • ole/TstCon/IFacesPg.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CInterfaceViewer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CInterfaceViewer Class Reference

#include "iviewer.h"

Inherited by CDataObjectViewer, CDispatchViewer, and CTypeLibViewer.

List of all members.

Public Member Functions

CInterfaceViewer ()
virtual | ~CInterfaceViewer ()
virtual HRESULT | OnView (HWND hwndParent, REFIID riid, LPUNKNOWN punk)
STDMETHOD() | View (HWND hwndParent, REFIID riid, LPUNKNOWN punk)

Detailed Description

Definition at line 18 of file iviewer.h.

Constructor & Destructor Documentation

CInterfaceViewer::CInterfaceViewer ( )

Definition at line 35 of file iviewer.cpp.

{
  AfxOleLockApp() ;
}

CInterfaceViewer::~CInterfaceViewer ( ) [virtual]

Definition at line 40 of file iviewer.cpp.

{
  AfxOleUnlockApp() ;
}

Member Function Documentation

HRESULT CInterfaceViewer::OnView | ( | HWND | hwndParent,
 |  | REFIID | riid,
 |  | LPUNKNOWN | punk |
 | ) |  |  | [virtual]

Reimplemented in CDataObjectViewer, CDispatchViewer, and CTypeLibViewer.

Definition at line 45 of file iviewer.cpp.

{
  AfxMessageBox(_T("Implement interface viewer UI here.") ) ;
  return NOERROR ;
}

STDMETHOD() CInterfaceViewer::View | ( | HWND | hwndParent,
 |  | REFIID | riid,
 |  | LPUNKNOWN | punk
 | ) |  |
The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/iviewer.h
  • ole/oleview/iviewers/iviewer.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIntListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CIntListView Class Reference

#include "intlstvw.h"

List of all members.

Public Types

enum | { IDD = IDD_INT_LIST }

Public Member Functions

CIntListView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
int | m_int

Protected Member Functions

virtual | ~CIntListView ()
void | AddIntToListBox (int n, int nSel=-1)
virtual void | DoDataExchange (CDataExchange *pDX)
BOOL | FindInt (int &nSel, POSITION &pos)
afx_msg void | OnAdd ()
afx_msg void | OnInsertBefore ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
afx_msg void | OnUpdateButton ()

Detailed Description

Definition at line 19 of file intlstvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 36 of file intlstvw.h.

{ IDD = IDD_INT_LIST };

Constructor & Destructor Documentation

CIntListView::CIntListView ( )

Definition at line 27 of file intlstvw.cpp.

  : CFormView(CIntListView::IDD)
{
  //{{AFX_DATA_INIT(CIntListView)
  m_int = 0;
  //}}AFX_DATA_INIT
}

CIntListView::~CIntListView ( ) [protected, virtual]

Definition at line 35 of file intlstvw.cpp.

{
}

Member Function Documentation

void CIntListView::AddIntToListBox | ( | int | n,
 |  | int | nSel = -1 |
 | ) |  |  | [protected]

Definition at line 122 of file intlstvw.cpp.

{
  // Add new integer to the listbox.
  CString str;
  str.Format(_T("%i"),n);
  if (nSel == -1)
    nSel = m_ctlList.AddString(str);
  else
    m_ctlList.InsertString(nSel, str);

  // Save the integer as the listbox entry's "data item".
  m_ctlList.SetItemData(nSel, (DWORD)n);
}

void CIntListView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 56 of file intlstvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CIntListView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_ELEMENT, m_int);
  //}}AFX_DATA_MAP
}

BOOL CIntListView::FindInt | ( | int & | nSel,
 |  | POSITION & | pos |
 | ) |  |  | [protected]

Definition at line 102 of file intlstvw.cpp.

{
  nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_INTEGER);
    return FALSE;
  }

  int nValue = (int)m_ctlList.GetItemData(nSel);

  // Find the integer in the integer list.
  pos = GetDocument()->m_intList.Find(nValue);

  // If the integer is in the listbox, it must also be in the integer list
  ASSERT(pos != NULL);

  return TRUE;
}

CCollectDoc * CIntListView::GetDocument ( ) [inline]

Definition at line 79 of file intlstvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CIntListView::OnAdd ( ) [protected]

Definition at line 140 of file intlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add new integer to the CList<int,int>
  GetDocument()->m_intList.AddTail(m_int);

  AddIntToListBox(m_int);
}

void CIntListView::OnInitialUpdate ( )

Definition at line 39 of file intlstvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the integers from the document's CList<int,int>
  // to the listbox.
  m_ctlList.ResetContent();
  CList<int,int>& intList = GetDocument()->m_intList;
  POSITION pos = intList.GetHeadPosition();
  while (pos != NULL)
  {
    int n = intList.GetNext(pos);
    AddIntToListBox(n);
  }
}

void CIntListView::OnInsertBefore ( ) [protected]

Definition at line 151 of file intlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel;
  POSITION pos;
  // Find the integer in both the CList<int,int> and the listbox.
  if (FindInt(nSel, pos) != TRUE)
    return;

  // Insert in front of the integer found in the CList<int,int>
  POSITION posTemp = 0;
  posTemp = GetDocument()->m_intList.InsertBefore(pos, m_int);

  // Insert new integer in the listbox
  AddIntToListBox(m_int, nSel);
}

void CIntListView::OnRemove ( ) [protected]

Definition at line 191 of file intlstvw.cpp.

{
  int nSel;
  POSITION pos;
  // Find the string in both the CList<int,int> and in the listbox.
  if (FindInt(nSel, pos) != TRUE)
    return;

  // Remove the integer from the CList<int,int>.
  GetDocument()->m_intList.RemoveAt(pos);

  // Remove the integer from the listbox.
  m_ctlList.DeleteString(nSel);
}

void CIntListView::OnRemoveAll ( ) [protected]

Definition at line 207 of file intlstvw.cpp.

{
  // Remove all of the integers from the CList<int,int>.
  GetDocument()->m_intList.RemoveAll();

  // Remove all of the integers from the listbox.
  m_ctlList.ResetContent();
}

void CIntListView::OnSelChangeList ( ) [protected]

Definition at line 216 of file intlstvw.cpp.

{
  // Update the edit control to reflect the new selection
  // in the listbox.
  m_int = (int)m_ctlList.GetItemData(m_ctlList.GetCurSel());
  UpdateData(FALSE);
}

void CIntListView::OnUpdateButton ( ) [protected]

Definition at line 171 of file intlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel;
  POSITION pos;
  // Find the integer in both the CList<int,int> and the listbox.
  if (FindInt(nSel, pos) != TRUE)
    return;

  // Replace the integer in the CList<int,int>.
  GetDocument()->m_intList.SetAt(pos, m_int);

  // Update the old integer in the listbox by removing
  // the old entry and adding a new entry.
  m_ctlList.DeleteString(nSel);
  AddIntToListBox(m_int, nSel);
}

Member Data Documentation

CListBox CIntListView::m_ctlList

Definition at line 37 of file intlstvw.h.

int CIntListView::m_int

Definition at line 38 of file intlstvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/intlstvw.h
  • advanced/collect/intlstvw.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CircLib::_DCirc Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CircLib
  • CircLib::_DCirc
Public Member Functions | Properties

CircLib::_DCirc Interface Reference

List of all members.

Public Member Functions

void | AboutBox ()

Properties

CircleShape | id
FlashColor | id
ForeColor | id (bindable)
Caption | id (bindable)

Detailed Description

Definition at line 29 of file circ.odl.

Member Function Documentation

void CircLib::_DCirc::AboutBox ( )

Property Documentation

CircleShape CircLib::_DCirc::id
FlashColor CircLib::_DCirc::id
ForeColor CircLib::_DCirc::id( bindable)
Caption CircLib::_DCirc::id( bindable)
The documentation for this interface was generated from the following file:
  • controls/circ/circ.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CircLib::_DCircEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CircLib
  • CircLib::_DCircEvents
Public Member Functions

CircLib::_DCircEvents Interface Reference

List of all members.

Public Member Functions

void | ClickIn (OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
void | ClickOut ()

Detailed Description

Definition at line 58 of file circ.odl.

Member Function Documentation

void CircLib::_DCircEvents::ClickIn | ( | OLE_XPOS_PIXELS | x,
 |  | OLE_YPOS_PIXELS | y
 | ) |  |
void CircLib::_DCircEvents::ClickOut ( )
The documentation for this interface was generated from the following file:
  • controls/circ/circ.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CircLib::Circ Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CircLib
  • CircLib::Circ

CircLib::Circ Class Reference

Detailed Description

Definition at line 76 of file circ.odl.

The documentation for this class was generated from the following file:
  • controls/circ/circ.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CItemData Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CItemData Class Reference

#include "xlistctl.h"

List of all members.

Public Member Functions

CItemData (const TCHAR *pstrText, LPFONTDISP lpFontDisp, LPPICTUREDISP lpPicDisp)
~CItemData ()
OLE_COLOR * | GetBackColor ()
CFontHolder * | GetFont ()
OLE_COLOR * | GetForeColor ()
CPictureHolder * | GetPicture ()
void | GetText (LPTSTR buffer, short szBuffer)
void | SetBackColor (OLE_COLOR *newValue)
void | SetFont (LPFONTDISP newValue)
void | SetForeColor (OLE_COLOR *newValue)
void | SetPicture (LPPICTUREDISP newValue)
void | SetText (const TCHAR *newValue)

Protected Attributes

OLE_COLOR * | pBack
CFontHolder * | pFontHolder
OLE_COLOR * | pFore
CPictureHolder * | pPicHolder
CString * | pText

Detailed Description

Definition at line 17 of file xlistctl.h.

Constructor & Destructor Documentation

CItemData::CItemData | ( | const TCHAR * | pstrText,
 |  | LPFONTDISP | lpFontDisp,
 |  | LPPICTUREDISP | lpPicDisp
 | ) |  |

Definition at line 47 of file xlistctl.cpp.

{
  pBack = NULL;
  pFore = NULL;

  // Init text
  if (pstrText)
    pText = new CString(pstrText);
  else
    pText = NULL;

  // Init picture holder
  if (lpPicDisp)
  {
     pPicHolder = new CPictureHolder;
     pPicHolder->SetPictureDispatch(lpPicDisp);
  }
  else pPicHolder = NULL;

  // Init font holder
  if (lpFontDisp)
  {
     pFontHolder = new CFontHolder(NULL);
     pFontHolder->InitializeFont(NULL, lpFontDisp);
  }
  else pFontHolder = NULL;
}

CItemData::~CItemData ( )

Definition at line 79 of file xlistctl.cpp.

{
  if (pBack) delete pBack;
  if (pFore) delete pFore;
  if (pText) delete pText;
  if (pFontHolder) delete pFontHolder;
  if (pPicHolder) delete pPicHolder;
}

Member Function Documentation

OLE_COLOR * CItemData::GetBackColor ( )

Definition at line 91 of file xlistctl.cpp.

{
  return pBack;
}

CFontHolder * CItemData::GetFont ( )

Definition at line 190 of file xlistctl.cpp.

{
  return pFontHolder;
}

OLE_COLOR * CItemData::GetForeColor ( )

Definition at line 122 of file xlistctl.cpp.

{
  return pFore;
}

CPictureHolder * CItemData::GetPicture ( )

Definition at line 221 of file xlistctl.cpp.

{
  return pPicHolder;
}

void CItemData::GetText | ( | LPTSTR | buffer,
 |  | short | szBuffer
 | ) |  |

Definition at line 153 of file xlistctl.cpp.

{
  if (pText)
  {
    _tcscpy_s(buffer, szBuffer, pText->GetBuffer(szBuffer));
    pText->ReleaseBuffer();
  }
  else
    _tcscpy_s(buffer, szBuffer, _T(""));
}

void CItemData::SetBackColor ( OLE_COLOR * newValue )

Definition at line 100 of file xlistctl.cpp.

{
  if (pNewBack)
  {
    if (!pBack)
    {
      pBack = new OLE_COLOR;
    }
    *pBack = *pNewBack;
  }
  else
    if (pBack)
    {
      delete pBack;
      pBack = NULL;
    }
}

void CItemData::SetFont ( LPFONTDISP newValue )

Definition at line 199 of file xlistctl.cpp.

{
   if (pNewFontDisp)
   {
    if (!pFontHolder)
    {
      pFontHolder = new CFontHolder(NULL);
    }
    pFontHolder->InitializeFont(NULL, pNewFontDisp);
  }
  else
    if (pFontHolder)
    {
      delete pFontHolder;
      pFontHolder = NULL;
    }
}

void CItemData::SetForeColor ( OLE_COLOR * newValue )

Definition at line 131 of file xlistctl.cpp.

{
  if (pNewFore)
  {
    if (!pFore)
    {
      pFore = new OLE_COLOR;
    }
    *pFore = *pNewFore;
  }
  else
    if (pFore)
    {
      delete pFore;
      pFore = NULL;
    }
}

void CItemData::SetPicture ( LPPICTUREDISP newValue )

Definition at line 230 of file xlistctl.cpp.

{
  if (pNewPicDisp)
  {
    if (!pPicHolder)
    {
      pPicHolder = new CPictureHolder;
    }
     pPicHolder->SetPictureDispatch(pNewPicDisp);
  }
  else
    if (pPicHolder)
    {
      delete pPicHolder;
      pPicHolder = NULL;
    }
}

void CItemData::SetText ( const TCHAR * newValue )

Definition at line 168 of file xlistctl.cpp.

{
  if (_tcslen(pstrText) > 0)
  {
    if (!pText)
    {
      pText = new CString(pstrText);
    }
    else *pText = pstrText;
  }
  else
    if (pText)
    {
      delete pText;
      pText = NULL;
    }
}

Member Data Documentation

OLE_COLOR* CItemData::pBack [protected]

Definition at line 40 of file xlistctl.h.

CFontHolder* CItemData::pFontHolder [protected]

Definition at line 43 of file xlistctl.h.

OLE_COLOR* CItemData::pFore [protected]

Definition at line 41 of file xlistctl.h.

CPictureHolder* CItemData::pPicHolder [protected]

Definition at line 44 of file xlistctl.h.

CString* CItemData::pText [protected]

Definition at line 42 of file xlistctl.h.

The documentation for this class was generated from the following files:
  • controls/xlist/xlistctl.h
  • controls/xlist/xlistctl.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CItemIcons Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CItemIcons Struct Reference

#include "ObjView.h"

List of all members.

Public Member Functions

CItemIcons ()
~CItemIcons ()

Public Attributes

HICON | m_hIcon
CString | m_Name
COleClientItem * | m_pObject

Detailed Description

Definition at line 24 of file ObjView.h.

Constructor & Destructor Documentation

CItemIcons::CItemIcons ( ) [inline]

Definition at line 26 of file ObjView.h.

{}

CItemIcons::~CItemIcons ( ) [inline]

Definition at line 27 of file ObjView.h.

{}

Member Data Documentation

HICON CItemIcons::m_hIcon

Definition at line 29 of file ObjView.h.

CString CItemIcons::m_Name

Definition at line 28 of file ObjView.h.

COleClientItem* CItemIcons::m_pObject

Definition at line 30 of file ObjView.h.

The documentation for this struct was generated from the following file:
  • ole/MFCBind/ObjView.h
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CIViewersApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CIViewersApp Class Reference

List of all members.

Public Member Functions

CIViewersApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 29 of file iviewers.cpp.

Constructor & Destructor Documentation

CIViewersApp::CIViewersApp ( )

Definition at line 64 of file iviewers.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CIViewersApp::ExitInstance ( ) [virtual]

Definition at line 149 of file iviewers.cpp.

{
  return CWinApp::ExitInstance();
}

BOOL CIViewersApp::InitInstance ( ) [virtual]

Definition at line 78 of file iviewers.cpp.

{
  SetRegistryKey( IDS_REGISTRYKEY );
#if (!defined(_USRDLL) && !defined(_AFXDLL))
//  COleObjectFactory::UpdateRegistryAll();

  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  m_pMainWnd = (CFrameWnd*)new CTypeLibWnd ;
  ASSERT(m_pMainWnd) ;

  if (m_lpCmdLine && *m_lpCmdLine)
  {
    HRESULT hr = LoadTypeLib( m_lpCmdLine, &((CTypeLibWnd*)m_pMainWnd)->m_ptlb ) ;
    if (FAILED(hr))
    {
      CString str ;
      str.Format( _T("LoadTypeLib(%s) failed"), m_lpCmdLine ) ;
      ErrorMessage( str, hr ) ;
      return FALSE ;
    }
  }
  else
  {
    static TCHAR szFilter[] = _T("TypeLib Files (*.tlb;*.olb;*.dll;*.ocx;*.exe)|*.tlb;*.olb;*.dll;*.ocx;*.exe|AllFiles(*.*)|*.*|") ;

    CFileDialog dlg( TRUE, _T("*.tlb"), NULL,
            OFN_FILEMUSTEXIST | OFN_HIDEREADONLY |
            OFN_PATHMUSTEXIST
            , szFilter, NULL )  ;

    if (IDOK != dlg.DoModal())
      return FALSE ;

    HRESULT hr = LoadTypeLib( dlg.GetPathName(), &((CTypeLibWnd*)m_pMainWnd)->m_ptlb ) ;
    if (FAILED(hr))
    {
      CString str ;
      str.Format( _T("LoadTypeLib(%s) failed"), dlg.GetPathName() ) ;
      ErrorMessage( str, hr ) ;
      return FALSE ;
    }

  }

  if (((CTypeLibWnd*)m_pMainWnd)->LoadFrame(IDR_TYPELIBWND, WS_OVERLAPPEDWINDOW, NULL, NULL) == FALSE)
  {
    TRACE(_T("LoadFrame failed\n") );
    if (((CTypeLibWnd*)m_pMainWnd)->m_ptlb)
      ((CTypeLibWnd*)m_pMainWnd)->m_ptlb->Release() ;
    return FALSE ;
  }
  ASSERT(m_pMainWnd) ;

  ((CTypeLibWnd*)m_pMainWnd)->RestorePosition() ;
  ((CTypeLibWnd*)m_pMainWnd)->UpdateWindow() ;

#endif

  // Register all OLE server (factories) as running.  This enables the
  //  OLE libraries to create objects from other applications.
  COleObjectFactory::RegisterAll();

  return TRUE;
}

afx_msg void CIViewersApp::OnAppAbout ( )
The documentation for this class was generated from the following file:
  • ole/oleview/iviewers/iviewers.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CKey Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CKey Class Reference

#include "key.h"

List of all members.

Public Member Functions

CKey ()
CKey ()
~CKey ()
~CKey ()
void | Close ()
void | Close ()
BOOL | Create (HKEY hKey, LPCTSTR lpszKeyName)
BOOL | Create (HKEY hKey, LPCTSTR lpszKeyName)
BOOL | GetStringValue (CString &str, LPCTSTR lpszValueName=NULL)
BOOL | GetStringValue (CString &str, LPCTSTR lpszValueName=NULL)
BOOL | Open (HKEY hKey, LPCTSTR lpszKeyName)
BOOL | Open (HKEY hKey, LPCTSTR lpszKeyName)
BOOL | SetStringValue (LPCTSTR lpszValue, LPCTSTR lpszValueName=NULL)
BOOL | SetStringValue (LPCTSTR lpszValue, LPCTSTR lpszValueName=NULL)

Public Attributes

HKEY | m_hKey

Detailed Description

Definition at line 15 of file key.h.

Constructor & Destructor Documentation

CKey::CKey ( ) [inline]

Definition at line 18 of file key.h.

{m_hKey = NULL;}

CKey::~CKey ( ) [inline]

Definition at line 19 of file key.h.

{Close();}

CKey::CKey ( ) [inline]

Definition at line 20 of file key.h.

{m_hKey = NULL;}

CKey::~CKey ( ) [inline]

Definition at line 21 of file key.h.

{Close();}

Member Function Documentation

void CKey::Close ( )

Definition at line 24 of file key.cpp.

{
  if (m_hKey != NULL)
  {
    LONG lRes = RegCloseKey(m_hKey);
    ASSERT(lRes == ERROR_SUCCESS);
    m_hKey = NULL;
  }
}

void CKey::Close ( )
BOOL CKey::Create | ( | HKEY | hKey,
 |  | LPCTSTR | lpszKeyName
 | ) |  |
BOOL CKey::Create | ( | HKEY | hKey,
 |  | LPCTSTR | lpszKeyName
 | ) |  |

Definition at line 34 of file key.cpp.

{
  ASSERT(hKey != NULL);
  return (RegCreateKey(hKey, lpszKeyName, &m_hKey) == ERROR_SUCCESS);
}

BOOL CKey::GetStringValue | ( | CString & | str,
 |  | LPCTSTR | lpszValueName = NULL
 | ) |  |
BOOL CKey::GetStringValue | ( | CString & | str,
 |  | LPCTSTR | lpszValueName = NULL
 | ) |  |

Definition at line 53 of file key.cpp.

{
  ASSERT(m_hKey != NULL);
  str.Empty();
  DWORD dw = 0;
  DWORD dwType = 0;
  LONG lRes = RegQueryValueEx(m_hKey, (LPTSTR)lpszValueName, NULL, &dwType,
    NULL, &dw);
  if (lRes == ERROR_SUCCESS)
  {
    ASSERT(dwType == REG_SZ);
    LPTSTR lpsz = str.GetBufferSetLength(dw);
    lRes = RegQueryValueEx(m_hKey, (LPTSTR)lpszValueName, NULL, &dwType, (BYTE*)lpsz, &dw);
    ASSERT(lRes == ERROR_SUCCESS);
    str.ReleaseBuffer();
    return TRUE;
  }
  return FALSE;
}

BOOL CKey::Open | ( | HKEY | hKey,
 |  | LPCTSTR | lpszKeyName
 | ) |  |
BOOL CKey::Open | ( | HKEY | hKey,
 |  | LPCTSTR | lpszKeyName
 | ) |  |

Definition at line 40 of file key.cpp.

{
  ASSERT(hKey != NULL);
  return (RegOpenKey(hKey, lpszKeyName, &m_hKey) == ERROR_SUCCESS);
}

BOOL CKey::SetStringValue | ( | LPCTSTR | lpszValue,
 |  | LPCTSTR | lpszValueName = NULL
 | ) |  |
BOOL CKey::SetStringValue | ( | LPCTSTR | lpszValue,
 |  | LPCTSTR | lpszValueName = NULL
 | ) |  |

Definition at line 46 of file key.cpp.

{
  ASSERT(m_hKey != NULL);
  return (RegSetValueEx(m_hKey, lpszValueName, NULL, REG_SZ,
    (BYTE * const)lpszValue, (lstrlen(lpszValue)+1)*sizeof(TCHAR)) == ERROR_SUCCESS);
}

Member Data Documentation

HKEY CKey::m_hKey

Definition at line 23 of file key.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/key.h
  • vc2008fp/WordPad/key.h
  • ole/wordpad/key.cpp
  • vc2008fp/WordPad/key.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLeader Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes

CLeader Class Reference

#include "Swarm.h"

Inherits CRoamer.

Inherited by CBrightLeader, and CHueLeader.

List of all members.

Public Member Functions

CLeader ()
virtual COLORREF | GetInitialLlamaColor ()=0
int | GetLlamaAcc () const
virtual COLORREF | GetLlamaColor (COLORREF oldColor)=0
int | GetLlamaVel () const
void | Import (const CLeader *pRHS)
virtual void | SetSwarm (CSwarm *pSwarm)
virtual void | Tick ()

Static Protected Member Functions

static COLORREF | HSB (BYTE H, BYTE S, BYTE B)

Protected Attributes

int | m_nLlamaAcc
int | m_nLlamaVel
int | m_nMyAcc
int | m_nMyVel

Private Attributes

CSwarm * m_pSwarm

Detailed Description

Definition at line 77 of file Swarm.h.

Constructor & Destructor Documentation

CLeader::CLeader ( )

Definition at line 178 of file Swarm.cpp.

{
  m_nMyAcc = 5;
  m_nMyVel = 10;
  m_nLlamaAcc = 5; // this is scaled back 1/2 when used
  m_nLlamaVel = 12;
}

Member Function Documentation

virtual COLORREF CLeader::GetInitialLlamaColor ( ) [pure virtual]

Implemented in CBrightLeader, and CHueLeader.

int CLeader::GetLlamaAcc ( ) const [inline]

Definition at line 87 of file Swarm.h.

{ return(m_nLlamaAcc); }

virtual COLORREF CLeader::GetLlamaColor ( COLORREF oldColor ) [pure virtual]

Implemented in CBrightLeader, and CHueLeader.

int CLeader::GetLlamaVel ( ) const [inline]

Definition at line 88 of file Swarm.h.

{ return(m_nLlamaVel); }

COLORREF CLeader::HSB | ( | BYTE | H,
 |  | BYTE | S,
 |  | BYTE | B |
 | ) |  |  | [static, protected]

Definition at line 231 of file Swarm.cpp.

{
    unsigned char p, q, t;

    int i = (int) H * 6 / 256;
    float s = ((float) S) / (float) 255.0;
    float f = ((float) (H * 6 - i * 256)) / (float) 255.0;
    p = (BYTE) (B * (1.0 - s));
    q = (BYTE) (B * (1.0 - (s * f)));
    t = (BYTE) (B * (1.0 - (s * (1.0 - f))));
    switch (i) {
    case 0:
        return RGB(B, t, p);
    case 1:
        return RGB(q, B, p);
    case 2:
        return RGB(p, B, t);
    case 3:
        return RGB(p, q, B);
    case 4:
        return RGB(t, p, B);
    case 5:
        return RGB(B, p, q);
    }

    // should never reach here
    ASSERT(FALSE);
    return RGB(255, 255, 255);
}

void CLeader::Import ( const CLeader * pRHS )

Definition at line 195 of file Swarm.cpp.

{
  m_pSwarm = pRHS->m_pSwarm;
  p1 = pRHS->p1;
  p2 = pRHS->p2;
  dx = pRHS->dx;
  dy = pRHS->dy;
}

void CLeader::SetSwarm ( CSwarm * pSwarm ) [virtual]

Definition at line 186 of file Swarm.cpp.

{
  m_pSwarm = pSwarm;
  int nBorder = m_pSwarm->GetBorder();
  p1.x = p2.x = nBorder + Random(max(1, (m_pSwarm->GetWidth() - 2*nBorder)));
    p1.y = p2.y = nBorder + Random(max(1, (m_pSwarm->GetHeight() - 2*nBorder)));
    dx = dy = 0;
}

void CLeader::Tick ( ) [virtual]

Reimplemented in CBrightLeader, and CHueLeader.

Definition at line 204 of file Swarm.cpp.

{
    p2 = p1;

    // accelerate the leader
    dx += DeltaRandom(m_nMyAcc);
    dy += DeltaRandom(m_nMyAcc);

    // Speed Limit Checks
    dx = max(min(dx, m_nMyVel), -m_nMyVel);
    dy = max(min(dy, m_nMyVel), -m_nMyVel);

    // Move
    p1.x += dx;
    p1.y += dy;

    // Bounce Checks
  int nBorder = m_pSwarm->GetBorder();
  int nHeight = m_pSwarm->GetHeight();
  int nWidth = m_pSwarm->GetWidth();
    Bounce(p1.x, nBorder, nWidth-nBorder-1, dx);
    Bounce(p1.y, nBorder, nHeight-nBorder-1, dy);

  // Draw
  m_pSwarm->GetSurface()->Line(p1, p2, RGB(255,255,255));
}

Member Data Documentation

int CLeader::m_nLlamaAcc [protected]

Definition at line 95 of file Swarm.h.

int CLeader::m_nLlamaVel [protected]

Definition at line 96 of file Swarm.h.

int CLeader::m_nMyAcc [protected]

Definition at line 93 of file Swarm.h.

int CLeader::m_nMyVel [protected]

Definition at line 94 of file Swarm.h.

CSwarm* CLeader::m_pSwarm [private]

Definition at line 99 of file Swarm.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/Swarm.h
  • general/MMXSwarm/Swarm.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLicensedApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CLicensedApp Class Reference

#include "licensed.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 21 of file licensed.h.

Member Function Documentation

int CLicensedApp::ExitInstance ( )

Definition at line 48 of file licensed.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CLicensedApp::InitInstance ( )

Definition at line 32 of file licensed.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/licensed/licensed.h
  • controls/licensed/licensed.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLicensedCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CLicensedCtrl Class Reference

#include "licenctl.h"

List of all members.

Public Types

enum

Public Member Functions

CLicensedCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual void | OnResetState ()

Protected Member Functions

~CLicensedCtrl ()
BEGIN_OLEFACTORY (CLicensedCtrl) virtual BOOL VerifyUserLicense()
DECLARE_OLETYPELIB (CLicensedCtrl) DECLARE_PROPPAGEIDS(CLicensedCtrl) DECLARE_OLECTLTYPE(CLicensedCtrl) afx_msg void AboutBox()
virtual BOOL | GetLicenseKey (DWORD, BSTR FAR *)

Detailed Description

Definition at line 15 of file licenctl.h.

Member Enumeration Documentation

anonymous enum

Definition at line 67 of file licenctl.h.

       {
  //{{AFX_DISP_ID(CLicensedCtrl)
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CLicensedCtrl::CLicensedCtrl ( )

Definition at line 171 of file licenctl.cpp.

{
  InitializeIIDs(&IID_DLicensed, &IID_DLicensedEvents);
}

CLicensedCtrl::~CLicensedCtrl ( ) [protected]

Definition at line 180 of file licenctl.cpp.

{
}

Member Function Documentation

CLicensedCtrl::BEGIN_OLEFACTORY ( CLicensedCtrl ) [protected]
CLicensedCtrl::DECLARE_OLETYPELIB ( CLicensedCtrl ) [protected]
void CLicensedCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 212 of file licenctl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  if (pPX->IsLoading())
  {
    CFontHolder& stockFont = InternalGetFont();
    stockFont.InitializeFont();
  }
}

virtual BOOL CLicensedCtrl::GetLicenseKey | ( | DWORD | ,
 |  | BSTR FAR * |  |
 | ) |  |  | [protected, virtual]
void CLicensedCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 188 of file licenctl.cpp.

{
  TEXTMETRIC tm;
  CString line1("Licensed");
  CString line2("Control");

  // Draw caption

  CFont* pOldFont = SelectStockFont(pdc);
  GetStockTextMetrics(&tm);

  pdc->SetTextAlign(TA_CENTER | TA_TOP);
  pdc->ExtTextOut((rcBounds.left + rcBounds.right) / 2, rcBounds.top, ETO_CLIPPED | ETO_OPAQUE, rcBounds, line1,
    line1.GetLength(), NULL);
  pdc->ExtTextOut((rcBounds.left + rcBounds.right) / 2, rcBounds.top + tm.tmHeight, ETO_CLIPPED, rcBounds,
    line2, line2.GetLength(), NULL);
  pdc->SelectObject(pOldFont);
}

void CLicensedCtrl::OnResetState ( ) [virtual]

Definition at line 228 of file licenctl.cpp.

{
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange
}

The documentation for this class was generated from the following files:
  • controls/licensed/licenctl.h
  • controls/licensed/licenctl.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLicensedPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CLicensedPropPage Class Reference

#include "licenppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_LICENSED }

Public Member Functions

CLicensedPropPage ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file licenppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file licenppg.h.

{ IDD = IDD_PROPPAGE_LICENSED };

Constructor & Destructor Documentation

CLicensedPropPage::CLicensedPropPage ( )

Definition at line 58 of file licenppg.cpp.

                                     :
  COlePropertyPage(IDD, IDS_LICENSED_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CLicensedPropPage)
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CLicensedPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 69 of file licenppg.cpp.

{
  //{{AFX_DATA_MAP(CLicensedPropPage)
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

The documentation for this class was generated from the following files:
  • controls/licensed/licenppg.h
  • controls/licensed/licenppg.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLineFile Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CLineFile Class Reference

List of all members.

Public Member Functions

BOOL | ReadLine (CString &stringLine)
void | SafeOpen (const CString &string, UINT nStyleFlags)
void | WriteLine (const CString &stringLine)

Detailed Description

Definition at line 78 of file makehm.cpp.

Member Function Documentation

BOOL CLineFile::ReadLine ( CString & stringLine )

Definition at line 86 of file makehm.cpp.

{
  UINT nMax = 512;
  for (;;)
  {
    ULONGLONG pos = GetPosition();
    if (!ReadString(str.GetBuffer(nMax), nMax))
      return FALSE;
    str.ReleaseBuffer();
    if (str.GetLength() < (int)nMax-1)
      return TRUE;
    nMax += 128;
    Seek(pos, CFile::begin);
  }
}

void CLineFile::SafeOpen | ( | const CString & | string,
 |  | UINT | nStyleFlags
 | ) |  |

Definition at line 108 of file makehm.cpp.

{
  BOOL fSuccess = Open(name, nStyleFlags);
  if (!fSuccess)
    UsageErr(_T("unable to open file \"%s\""), name);
}

void CLineFile::WriteLine ( const CString & stringLine )

Definition at line 102 of file makehm.cpp.

{
  ASSERT(str[str.GetLength()-1] == _T('\n'));
  WriteString(str);
}

The documentation for this class was generated from the following file:
  • utility/makehm/makehm.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLineStyleMenuItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CLineStyleMenuItem Class Reference

#include "LineStyleMenuItem.h"

List of all members.

Public Member Functions

CLineStyleMenuItem (int nWidth=1, UINT uiCmdID=0, LPCTSTR lpszText=NULL, BOOL bIsChecked=FALSE)
virtual | ~CLineStyleMenuItem ()

Protected Member Functions

virtual void | CopyFrom (const CMFCToolBarButton &src)
virtual SIZE | OnCalculateSize (CDC *pDC, const CSize &sizeDefault, BOOL bHorz)
virtual void | OnDraw (CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE)

Protected Attributes

int | m_nWidth

Detailed Description

Definition at line 13 of file LineStyleMenuItem.h.

Constructor & Destructor Documentation

CLineStyleMenuItem::CLineStyleMenuItem | ( | int | nWidth = 1,
 |  | UINT | uiCmdID = 0,
 |  | LPCTSTR | lpszText = NULL,
 |  | BOOL | bIsChecked = FALSE
 | ) |  |

Definition at line 28 of file LineStyleMenuItem.cpp.

                                      :
  CMFCToolBarMenuButton (uiCmdID, NULL /* HMENU */, -1 /*iImage*/, lpszText)
{
  m_nWidth = nWidth;

  if (bIsChecked)
  {
    m_nStyle |= TBBS_CHECKED;
  }
}

CLineStyleMenuItem::~CLineStyleMenuItem ( ) [virtual]

Definition at line 40 of file LineStyleMenuItem.cpp.

{
}

Member Function Documentation

void CLineStyleMenuItem::CopyFrom ( const CMFCToolBarButton & src ) [protected, virtual]

Definition at line 92 of file LineStyleMenuItem.cpp.

{
  CMFCToolBarButton::CopyFrom (s);

  const CLineStyleMenuItem& src = (const CLineStyleMenuItem&) s;
  m_nWidth = src.m_nWidth;
}

SIZE CLineStyleMenuItem::OnCalculateSize | ( | CDC * | pDC,
 |  | const CSize & | sizeDefault,
 |  | BOOL | bHorz |
 | ) |  |  | [protected, virtual]

Definition at line 100 of file LineStyleMenuItem.cpp.

{
  TEXTMETRIC tm;
  pDC->GetTextMetrics (&tm);

  return CSize (
    afxGlobalData.GetTextWidth () * 4 + 50, // Text + line
    max (m_nWidth, tm.tmHeight) + 4);
}

void CLineStyleMenuItem::OnDraw | ( | CDC * | pDC,
 |  | const CRect & | rect,
 |  | CMFCToolBarImages * | pImages,
 |  | BOOL | bHorz = TRUE,
 |  | BOOL | bCustomizeMode = FALSE,
 |  | BOOL | bHighlight = FALSE,
 |  | BOOL | bDrawBorder = TRUE,
 |  | BOOL | bGrayDisabledButtons = TRUE |
 | ) |  |  | [protected, virtual]

Definition at line 44 of file LineStyleMenuItem.cpp.

{
  ASSERT_VALID (pDC);

  CRect rectItem = rect;
  rectItem.DeflateRect (1, 1);

  //--------------------
  // Fill item interior:
  //--------------------
  FillInterior (pDC, rectItem, bHighlight);

  //-----------------
  // Draw text label:
  //-----------------
  CRect rectText = rectItem;
  rectText.DeflateRect (nHorzMargin, 0);
  rectText.right = rectText.left + afxGlobalData.GetTextWidth () * 4;

  pDC->DrawText (m_strText, rectText, DT_SINGLELINE | DT_VCENTER);

  //-----------
  // Draw line:
  //-----------
  CRect rectLine = rectItem;
  rectLine.left = rectText.right;
  rectLine.DeflateRect (nHorzMargin, 0);

  rectLine.top = (rect.top + rect.bottom - m_nWidth) / 2;
  rectLine.bottom = rectLine.top + m_nWidth;

  pDC->FillSolidRect (rectLine, GetSysColor (COLOR_WINDOWTEXT));

  //-------------
  // Draw border:
  //-------------
  if (m_nStyle & TBBS_CHECKED)
  {
    pDC->Draw3dRect (rectItem, GetSysColor (COLOR_3DSHADOW), GetSysColor (COLOR_3DHILIGHT));
  }
  else if (bHighlight)
  {
    pDC->Draw3dRect (rectItem, GetSysColor (COLOR_3DHILIGHT), GetSysColor (COLOR_3DSHADOW));
  }
}

Member Data Documentation

int CLineStyleMenuItem::m_nWidth [protected]

Definition at line 32 of file LineStyleMenuItem.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OwnerDrawMenu/LineStyleMenuItem.h
  • vc2008fp/OwnerDrawMenu/LineStyleMenuItem.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLineThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CLineThread Class Reference

#include "threads.h"

Inherits CGDIThread.

List of all members.

Public Member Functions

CLineThread (CWnd *pWnd, HDC hDC, CPoint ptPos1, CPoint ptVel1, CPoint ptVel2, CSize Size, COLORREF color)
virtual BOOL | InitInstance ()
virtual void | SingleStep ()

Public Attributes

HPEN | m_hPen
CPen | m_pen
CPoint | m_ptPosition1
CPoint | m_ptPosition2
CPoint | m_ptVelocity1
CPoint | m_ptVelocity2

Protected Member Functions

virtual | ~CLineThread ()

Detailed Description

Definition at line 143 of file threads.h.

Constructor & Destructor Documentation

CLineThread::CLineThread | ( | CWnd * | pWnd,
 |  | HDC | hDC,
 |  | CPoint | ptPos1,
 |  | CPoint | ptVel1,
 |  | CPoint | ptVel2,
 |  | CSize | Size,
 |  | COLORREF | color
 | ) |  |

Definition at line 276 of file threads.cpp.

                                             : CGDIThread(pWnd, hDC)
{
  m_ptPosition1 = ptPos1;
  m_ptPosition2 = ptPos1 + Size;
  m_ptVelocity1 = ptVel1;
  m_ptVelocity2 = ptVel2;

  CPen pen(PS_SOLID, 1, color);
  m_hPen = (HPEN)pen.Detach();
}

virtual CLineThread::~CLineThread ( ) [inline, protected, virtual]

Definition at line 171 of file threads.h.

{};

Member Function Documentation

BOOL CLineThread::InitInstance ( ) [virtual]

Reimplemented from CGDIThread.

Definition at line 288 of file threads.cpp.

{
  m_pen.Attach(m_hPen);

  return CGDIThread::InitInstance();
}

void CLineThread::SingleStep ( ) [virtual]

Implements CGDIThread.

Definition at line 295 of file threads.cpp.

{
  m_ptPosition1.Offset(m_ptVelocity1);
  m_ptPosition2.Offset(m_ptVelocity2);

  if (m_ptPosition1.y<m_rectBorder.top)
    m_ptVelocity1.y = (m_ptVelocity1.y>0) ? m_ptVelocity1.y : -m_ptVelocity1.y;
  else if (m_ptPosition1.y>m_rectBorder.bottom)
    m_ptVelocity1.y = (m_ptVelocity1.y>0) ? -m_ptVelocity1.y : m_ptVelocity1.y;

  if (m_ptPosition2.y<m_rectBorder.top)
    m_ptVelocity2.y = (m_ptVelocity2.y>0) ? m_ptVelocity2.y : -m_ptVelocity2.y;
  else if (m_ptPosition2.y>m_rectBorder.bottom)
    m_ptVelocity2.y = (m_ptVelocity2.y>0) ? -m_ptVelocity2.y : m_ptVelocity2.y;

  if (m_ptPosition1.x<m_rectBorder.left)
    m_ptVelocity1.x = (m_ptVelocity1.x>0) ? m_ptVelocity1.x : -m_ptVelocity1.x;
  else if (m_ptPosition1.x>m_rectBorder.right)
    m_ptVelocity1.x = (m_ptVelocity1.x>0) ? -m_ptVelocity1.x : m_ptVelocity1.x;

  if (m_ptPosition2.x<m_rectBorder.left)
    m_ptVelocity2.x = (m_ptVelocity2.x>0) ? m_ptVelocity2.x : -m_ptVelocity2.x;
  else if (m_ptPosition2.x>m_rectBorder.right)
    m_ptVelocity2.x = (m_ptVelocity2.x>0) ? -m_ptVelocity2.x : m_ptVelocity2.x;

  // Since all threads share the same HDC it is necessary
  // to block all other threads while we render in the HDC
  EnterCriticalSection(&CGDIThread::m_csGDILock);
  {
    CPen* oldpen;

    oldpen = m_dc.SelectObject(&m_pen);
    m_dc.MoveTo(m_ptPosition1);
    m_dc.LineTo(m_ptPosition2);
    m_dc.SelectObject(oldpen);
    // Win32 optimizes GDI calls by collecting them in a batch
    // and then thunking the whole batch at once on a per
    // thread basis.  Since we share an HDC with multiple
    // threads, we must flush the batch before yielding to
    // other threads that will adjust the HDC.  To see what
    // I mean, comment out the GdiFlush() function call and
    // watch the results.
    GdiFlush();
  }
  LeaveCriticalSection(&CGDIThread::m_csGDILock);
}

Member Data Documentation

HPEN CLineThread::m_hPen

Definition at line 156 of file threads.h.

CPen CLineThread::m_pen

Definition at line 157 of file threads.h.

CPoint CLineThread::m_ptPosition1

Definition at line 152 of file threads.h.

CPoint CLineThread::m_ptPosition2

Definition at line 153 of file threads.h.

CPoint CLineThread::m_ptVelocity1

Definition at line 154 of file threads.h.

CPoint CLineThread::m_ptVelocity2

Definition at line 155 of file threads.h.

The documentation for this class was generated from the following files:
  • advanced/mtgdi/threads.h
  • advanced/mtgdi/threads.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLineWeightDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CLineWeightDlg Class Reference

#include "LineWeightDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_LINEWEIGHT }

Public Member Functions

CLineWeightDlg (CWnd *pParent=NULL)

Public Attributes

UINT m_penSize
CSpinButtonCtrl | m_SpinCtrl

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 14 of file LineWeightDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 22 of file LineWeightDlg.h.

{ IDD = IDD_LINEWEIGHT };

Constructor & Destructor Documentation

CLineWeightDlg::CLineWeightDlg ( CWnd * pParent = NULL )

Definition at line 22 of file LineWeightDlg.cpp.

                                                      :
  CDialog(CLineWeightDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CLineWeightDlg)
  m_penSize = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CLineWeightDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 30 of file LineWeightDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CLineWeightDlg)
  DDX_Control(pDX, IDC_SPIN1, m_SpinCtrl);
  DDX_Text(pDX, IDC_WEIGHT, m_penSize);
  DDV_MinMaxUInt(pDX, m_penSize, 0, 100);
  //}}AFX_DATA_MAP
}

BOOL CLineWeightDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 40 of file LineWeightDlg.cpp.

{
  CDialog::OnInitDialog();

  m_SpinCtrl.SetRange(0, 100);
  m_SpinCtrl.SetBase(10);
  m_SpinCtrl.SetPos(max(m_penSize, 0));
  return TRUE;
}

Member Data Documentation

UINT CLineWeightDlg::m_penSize

Definition at line 24 of file LineWeightDlg.h.

CSpinButtonCtrl CLineWeightDlg::m_SpinCtrl

Definition at line 23 of file LineWeightDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DrawClient/LineWeightDlg.h
  • vc2008fp/DrawClient/LineWeightDlg.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLinkButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CLinkButton Class Reference

#include "LinkButton.h"

List of all members.

Public Member Functions

CLinkButton ()
CLinkButton (LPCTSTR lpszLabel, LPCTSTR lpszURL)
virtual | ~CLinkButton ()
LPCTSTR | GetURL () const

Protected Member Functions

virtual void | CopyFrom (const CMFCToolBarButton &src)
void | Initialize ()
virtual BOOL | IsEditable () const
virtual void | Serialize (CArchive &ar)

Protected Attributes

CString | m_strURL

Detailed Description

Definition at line 13 of file LinkButton.h.

Constructor & Destructor Documentation

CLinkButton::CLinkButton ( )

Definition at line 27 of file LinkButton.cpp.

{
  Initialize ();
}

CLinkButton::CLinkButton | ( | LPCTSTR | lpszLabel,
 |  | LPCTSTR | lpszURL
 | ) |  |

Definition at line 32 of file LinkButton.cpp.

{
  m_strURL = lpszURL;
  m_strText = lpszLabel;

  Initialize ();
}

CLinkButton::~CLinkButton ( ) [virtual]

Definition at line 40 of file LinkButton.cpp.

{

}

Member Function Documentation

void CLinkButton::CopyFrom ( const CMFCToolBarButton & src ) [protected, virtual]

Definition at line 52 of file LinkButton.cpp.

{
  CMFCToolBarButton::CopyFrom (src);

  const CLinkButton& srcLinkButton = (const CLinkButton&) src;
  m_strURL = srcLinkButton.m_strURL;
}

LPCTSTR CLinkButton::GetURL ( ) const [inline]

Definition at line 23 of file LinkButton.h.

  {
    return m_strURL;
  }

void CLinkButton::Initialize ( ) [protected]

Definition at line 45 of file LinkButton.cpp.

{
  m_nID = ID_LINK_1;
  SetImage (GetCmdMgr ()->GetCmdImage (ID_LINK_1));
  m_bImage = m_bText = TRUE;
}

virtual BOOL CLinkButton::IsEditable ( ) const [inline, protected, virtual]

Definition at line 35 of file LinkButton.h.

  {
    return FALSE;
  }

void CLinkButton::Serialize ( CArchive & ar ) [protected, virtual]

Definition at line 60 of file LinkButton.cpp.

{
  CMFCToolBarButton::Serialize (ar);

  if (ar.IsLoading ())
  {
    ar >> m_strURL;
  }
  else
  {
    ar << m_strURL;
  }
}

Member Data Documentation

CString CLinkButton::m_strURL [protected]

Definition at line 33 of file LinkButton.h.

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/LinkButton.h
  • vc2008fp/IEDemo/LinkButton.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLinksBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CLinksBar Class Reference

#include "LinksBar.h"

List of all members.

Public Member Functions

CLinksBar ()
virtual | ~CLinksBar ()
virtual BOOL | AllowChangeTextLabels () const
virtual BOOL | CanBeRestored () const
virtual BOOL | OnSendCommand (const CMFCToolBarButton *pButton)
virtual BOOL | RestoreOriginalstate ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Detailed Description

Definition at line 16 of file LinksBar.h.

Constructor & Destructor Documentation

CLinksBar::CLinksBar ( )

Definition at line 29 of file LinksBar.cpp.

{
}

CLinksBar::~CLinksBar ( ) [virtual]

Definition at line 33 of file LinksBar.cpp.

{
}

Member Function Documentation

virtual BOOL CLinksBar::AllowChangeTextLabels ( ) const [inline, virtual]

Definition at line 42 of file LinksBar.h.

  {
    return FALSE;
  }

virtual BOOL CLinksBar::CanBeRestored ( ) const [inline, virtual]

Definition at line 36 of file LinksBar.h.

  {
    return TRUE;
  }

int CLinksBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 48 of file LinksBar.cpp.

{
  if (CMFCToolBar::OnCreate(lpCreateStruct) == -1)
    return -1;

  RestoreOriginalstate ();
  return 0;
}

BOOL CLinksBar::OnSendCommand ( const CMFCToolBarButton * pButton ) [virtual]

Definition at line 57 of file LinksBar.cpp.

{
  CLinkButton* pLinkButton = DYNAMIC_DOWNCAST (CLinkButton, pButton);
  if (pLinkButton == NULL)
  {
    // Defauult processing
    return FALSE;
  }

  CString strURL = pLinkButton->GetURL ();

  ((CIEDemoView*)GetParentFrame ()->GetActiveView())->Navigate2 (strURL, 0, NULL);
  return TRUE;
}

BOOL CLinksBar::RestoreOriginalstate ( ) [virtual]

Definition at line 72 of file LinksBar.cpp.

{
  RemoveAllButtons ();

  InsertButton (CLinkButton (_T("MSDN Home"), _T("http://www.msdn.com")));
  InsertButton (CLinkButton (_T("Microsoft Home"), _T("http://www.microsoft.com")));
  InsertButton (CLinkButton (_T("Visual C++ Developer Center"), _T("http://msdn2.microsoft.com/visualc/")));

  EnableCustomizeButton (TRUE, -1, _T(""));

  AdjustLayout ();
  Invalidate ();

  return TRUE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/IEDemo/LinksBar.h
  • vc2008fp/IEDemo/LinksBar.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CListDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CListDlg Class Reference

#include "listdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_LISTDIALOG }
enum | { IDD = IDD_LISTDIALOG }

Public Member Functions

CListDlg (UINT idStrDlgTitle, UINT idStrListTitle, const CStringList &listItems, int nDefSel=0)
CListDlg (UINT idStrDlgTitle, UINT idStrListTitle, const CStringList &listItems, int nDefSel=0)

Public Attributes

const CStringList & | m_listItems
int | m_nSelection
CString | m_strDlgTitle
CString | m_strListTitle

Protected Member Functions

BOOL | OnInitDialog ()
BOOL | OnInitDialog ()
afx_msg void | OnOK ()
afx_msg void | OnOK ()

Detailed Description

Definition at line 10 of file listdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 14 of file listdlg.h.

{ IDD = IDD_LISTDIALOG };

anonymous enum
Enumerator:
IDD

Definition at line 16 of file listdlg.h.

{ IDD = IDD_LISTDIALOG };

Constructor & Destructor Documentation

CListDlg::CListDlg | ( | UINT | idStrDlgTitle,
 |  | UINT | idStrListTitle,
 |  | const CStringList & | listItems,
 |  | int | nDefSel = 0
 | ) |  |

Definition at line 27 of file listdlg.cpp.

                                             : CDialog(CListDlg::IDD),
  m_listItems(listItems)
{
  VERIFY(m_strDlgTitle.LoadString(idStrDlgTitle));
  VERIFY(m_strListTitle.LoadString(idStrListTitle));
  m_nSelection = nDefSel;
}

CListDlg::CListDlg | ( | UINT | idStrDlgTitle,
 |  | UINT | idStrListTitle,
 |  | const CStringList & | listItems,
 |  | int | nDefSel = 0
 | ) |  |

Member Function Documentation

BOOL CListDlg::OnInitDialog ( ) [protected]

Definition at line 36 of file listdlg.cpp.

{
  SetWindowText(m_strDlgTitle);
// fix this
  SetDlgItemText(IDC_STATIC_HEADING, m_strListTitle);
  CListBox* pListBox = (CListBox*)GetDlgItem(IDC_LISTDIALOG_LIST);
  ENSURE(pListBox != NULL);
  // fill with document templates in list

  POSITION pos = m_listItems.GetHeadPosition();
  while (pos != NULL)
  {
     if ( pListBox->AddString(m_listItems.GetNext(pos)) == -1)
      return FALSE;
  }
  pListBox->SetCurSel(m_nSelection);

  return CDialog::OnInitDialog();
}

BOOL CListDlg::OnInitDialog ( ) [protected]
afx_msg void CListDlg::OnOK ( ) [protected]
void CListDlg::OnOK ( ) [protected]

Definition at line 56 of file listdlg.cpp.

{
  CListBox* pListBox = (CListBox*)GetDlgItem(IDC_LISTDIALOG_LIST);
  ENSURE(pListBox != NULL);
  m_nSelection = pListBox->GetCurSel();
  CDialog::OnOK();
}

Member Data Documentation

const CStringList & CListDlg::m_listItems

Definition at line 19 of file listdlg.h.

int CListDlg::m_nSelection

Definition at line 20 of file listdlg.h.

CString CListDlg::m_strDlgTitle

Definition at line 18 of file listdlg.h.

CString CListDlg::m_strListTitle

Definition at line 18 of file listdlg.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/listdlg.h
  • vc2008fp/WordPad/listdlg.h
  • ole/wordpad/listdlg.cpp
  • vc2008fp/WordPad/listdlg.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CListHdrApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CListHdrApp Class Reference

#include "ListHdr.h"

List of all members.

Public Member Functions

CListHdrApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 29 of file ListHdr.h.

Constructor & Destructor Documentation

CListHdrApp::CListHdrApp ( )

Definition at line 34 of file ListHdr.cpp.

{
}

Member Function Documentation

BOOL CListHdrApp::InitInstance ( ) [virtual]

Definition at line 46 of file ListHdr.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization
  CListHdrDlg dlg;
  m_pMainWnd = &dlg;

  // Bring up modal dialog
  dlg.DoModal();

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/ListHdr/ListHdr.h
  • general/ListHdr/ListHdr.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CListHdrDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CListHdrDlg Class Reference

#include "LHdrDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_LISTHDR_DIALOG }

Public Member Functions

CListHdrDlg (CWnd *pParent=NULL)
~CListHdrDlg ()

Public Attributes

BOOL | m_bAutoArrange
BOOL | m_bEditLabels
BOOL | m_bHoverSelect
BOOL | m_bNoColHdr
BOOL | m_bNoLabelWrap
BOOL | m_bNoSortHdr
BOOL | m_bSingleSel
BOOL | m_bWorkAreas
CMyListCtrl m_listctrl
CString | m_strAlignMode
CString | m_strSortMode
CString | m_strViewMode

Protected Member Functions

void | ChangeListCtrlStyle (DWORD dwStyle, BOOL bSetBits)
virtual void | DoDataExchange (CDataExchange *pDX)
void | FillListCtrl ()
void | ModifyHeaderItems ()
afx_msg void | OnAbout ()
afx_msg void | OnAutoArrange ()
afx_msg void | OnChangeAlign ()
afx_msg void | OnChangeSort ()
afx_msg void | OnChangeView ()
afx_msg void | OnEditLabels ()
afx_msg void | OnHover ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnMyHotCur ()
afx_msg void | OnNoColHdr ()
afx_msg void | OnNoLabelWrap ()
afx_msg void | OnNoSortHdr ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSingleSel ()
afx_msg void | OnStdHotCur ()
afx_msg void | OnWorkAreas ()
void | RenewListCtrl (DWORD dwStyle, BOOL bSetBits)

Protected Attributes

BOOL | m_bHotCursor
HICON | m_hIcon
HCURSOR | m_hMyHotCursor
HCURSOR | m_hStdHotCursor
CImageList * | m_pImageHdrSmall
CImageList * | m_pImageList
CImageList * | m_pImageListSmall

Detailed Description

Definition at line 23 of file LHdrDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 32 of file LHdrDlg.h.

{ IDD = IDD_LISTHDR_DIALOG };

Constructor & Destructor Documentation

CListHdrDlg::CListHdrDlg ( CWnd * pParent = NULL )

Definition at line 70 of file LHdrDlg.cpp.

  : CDialog(CListHdrDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CListHdrDlg)
  m_bNoLabelWrap = FALSE;
  m_bAutoArrange = FALSE;
  m_bSingleSel = FALSE;
  m_bEditLabels = FALSE;
  m_bNoColHdr = FALSE;
  m_bNoSortHdr = FALSE;
  m_strViewMode = _T("REPORT");
  m_strAlignMode = _T("ALIGNTOP");
  m_strSortMode = _T("None");
  m_bHoverSelect = FALSE;
  m_bWorkAreas = FALSE;
  //}}AFX_DATA_INIT
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

  m_bHotCursor= TRUE;
  m_pImageHdrSmall = NULL;
  m_pImageList = NULL;
  m_pImageListSmall = NULL;
}

CListHdrDlg::~CListHdrDlg ( )

Definition at line 94 of file LHdrDlg.cpp.

{
  if( m_pImageHdrSmall != NULL)
    delete m_pImageHdrSmall;
  if( m_pImageList != NULL)
    delete m_pImageList;
  if( m_pImageListSmall != NULL)
    delete m_pImageListSmall;
}

Member Function Documentation

void CListHdrDlg::ChangeListCtrlStyle | ( | DWORD | dwStyle,
 |  | BOOL | bSetBits |
 | ) |  |  | [protected]

Definition at line 345 of file LHdrDlg.cpp.

{
  CRect   rect;

  m_listctrl.GetWindowRect(&rect);
  ScreenToClient(&rect);
  ASSERT(dwStyle != 0);  // watch out for LVS_foo DEFINITIONS which are 0.
  if (bSetBits)
    m_listctrl.ModifyStyle(0, dwStyle);
  else
    m_listctrl.ModifyStyle(dwStyle, 0);

  InvalidateRect(rect);
  UpdateData(FALSE);  // send information back to the dialog
}

void CListHdrDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 104 of file LHdrDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CListHdrDlg)
  DDX_Control(pDX, IDC_LISTVIEW1, m_listctrl);
  DDX_Check(pDX, IDC_NOLABELWRAP, m_bNoLabelWrap);
  DDX_Check(pDX, IDC_AUTOARRANGE, m_bAutoArrange);
  DDX_Check(pDX, IDC_SINGLESEL, m_bSingleSel);
  DDX_Check(pDX, IDC_EDITLABELS, m_bEditLabels);
  DDX_Check(pDX, IDC_NOCOLUMNHEADER, m_bNoColHdr);
  DDX_Check(pDX, IDC_NOSORTHEADER, m_bNoSortHdr);
  DDX_CBString(pDX, IDC_VIEWMODE, m_strViewMode);
  DDX_CBString(pDX, IDC_ALIGN, m_strAlignMode);
  DDX_CBString(pDX, IDC_SORT, m_strSortMode);
  DDX_Check(pDX, IDC_HOVER, m_bHoverSelect);
  DDX_Check(pDX, IDC_WORKAREAS, m_bWorkAreas);
  //}}AFX_DATA_MAP
}

void CListHdrDlg::FillListCtrl ( ) [protected]

Definition at line 229 of file LHdrDlg.cpp.

{
  CRect           rect;
  int             iIcon, iItem, iSubItem, iActualItem;
  LV_ITEM         lvitem;
  CString         strItem1= _T("ITEM");
  CString         strItem2= _T("SUB_ITEM");
  CString         strIconDesc[4], strIconShortDesc[4];
  LPTSTR          pStrTemp1, pStrTemp2;
  CListHdrApp     *pApp;

  iIcon = iItem = iSubItem = iActualItem = 0;

  strIconDesc[0]= _T("Blue Ellipse, Yellow Triangle, Red Rectangle");
  strIconDesc[1]= _T("Yellow Ellipse, Red Triangle, Blue Rectangle");
  strIconDesc[2]= _T("Red Ellipse, Blue Triangle, Yellow Rectangle");
  strIconDesc[3]= _T("Red Ellipse, Yellow Triangle, Blue Rectangle");
  strIconShortDesc[0]= _T("BE, YT, RR (Title)");
  strIconShortDesc[1]= _T("YE, RT, BR (Title)");
  strIconShortDesc[2]= _T("RE, BT, YR (Title)");
  strIconShortDesc[3]= _T("RE, YT, BR (Title)");

  pApp = (CListHdrApp *)AfxGetApp();
  m_listctrl.SetImageList(m_pImageList, LVSIL_NORMAL);
  m_listctrl.SetImageList(m_pImageListSmall, LVSIL_SMALL);

  // insert two columns (REPORT mode) and modify the new header items
  m_listctrl.GetWindowRect(&rect);
  m_listctrl.InsertColumn(0, strItem1, LVCFMT_LEFT,
    rect.Width() * 1/3, 0);
  m_listctrl.InsertColumn(1, strItem2, LVCFMT_LEFT,
    rect.Width() * 2/3, 1);
  ModifyHeaderItems();

  for (iItem = 0; iItem < 20; iItem++)  // insert the items and subitems into the list view.
    for (iSubItem = 0; iSubItem < 2; iSubItem++)
    {
      if (iSubItem == 0) {
        iIcon = rand() % 4;  // choose the icon and legend for the entry
      }

      lvitem.mask = LVIF_TEXT | (iSubItem == 0? LVIF_IMAGE : 0);
      lvitem.iItem = (iSubItem == 0)? iItem : iActualItem;
      lvitem.iSubItem = iSubItem;

      // calculate the main and sub-item strings for the current item
      pStrTemp1= strIconShortDesc[iIcon].GetBuffer(strIconShortDesc[iIcon].GetLength());
      pStrTemp2= strIconDesc[iIcon].GetBuffer(strIconDesc[iIcon].GetLength());
      lvitem.pszText = iSubItem == 0? pStrTemp1 : pStrTemp2;

      lvitem.iImage = iIcon;
      if (iSubItem == 0)
        iActualItem = m_listctrl.InsertItem(&lvitem); // insert new item
      else
        m_listctrl.SetItem(&lvitem); // modify existing item (the sub-item text)
    }
}

void CListHdrDlg::ModifyHeaderItems ( ) [protected]

Definition at line 288 of file LHdrDlg.cpp.

{
  HD_ITEM curItem;

  // retrieve embedded header control
  CHeaderCtrl* pHdrCtrl= NULL;
  pHdrCtrl= m_listctrl.GetHeaderCtrl();

  pHdrCtrl->SetImageList(m_pImageHdrSmall);
  // add bmaps to each header item
  memset(&curItem, 0, sizeof(curItem));
  pHdrCtrl->GetItem(0, &curItem);
  curItem.mask= HDI_IMAGE | HDI_FORMAT;
  curItem.iImage= 0;
  curItem.fmt= HDF_LEFT | HDF_IMAGE | HDF_STRING;
  pHdrCtrl->SetItem(0, &curItem);

  pHdrCtrl->GetItem(1, &curItem);
  curItem.mask= HDI_IMAGE | HDI_FORMAT;
  curItem.iImage= 1;
  curItem.fmt= HDF_LEFT | HDF_IMAGE | HDF_STRING;
  pHdrCtrl->SetItem(1, &curItem);
}

void CListHdrDlg::OnAbout ( ) [protected]

Definition at line 557 of file LHdrDlg.cpp.

{
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
}

void CListHdrDlg::OnAutoArrange ( ) [protected]

Definition at line 361 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);  // get the information from the dialog
  ChangeListCtrlStyle(LVS_AUTOARRANGE, m_bAutoArrange);
}

void CListHdrDlg::OnChangeAlign ( ) [protected]

Definition at line 439 of file LHdrDlg.cpp.

{
  // this function takes into consideration that LVS_ALIGNTOP is defined as zero.
  UpdateData(TRUE);
  ASSERT(m_strAlignMode == _T("ALIGNTOP") || m_strAlignMode == _T("ALIGNLEFT"));
  RenewListCtrl(LVS_ALIGNLEFT, (m_strAlignMode == _T("ALIGNLEFT")));
}

void CListHdrDlg::OnChangeSort ( ) [protected]

Definition at line 474 of file LHdrDlg.cpp.

{
  long    lStyle;

  UpdateData(TRUE);
  lStyle = GetWindowLong(m_listctrl.m_hWnd, GWL_STYLE);
  lStyle &= ~(LVS_SORTASCENDING | LVS_SORTDESCENDING);
  SetWindowLong(m_listctrl.m_hWnd, GWL_STYLE, lStyle);  // set style without sorting
  if (m_strSortMode == _T("None"))
    RenewListCtrl(LVS_SORTASCENDING | LVS_SORTDESCENDING, FALSE);
  else if (m_strSortMode == _T("ASCENDING"))
    RenewListCtrl(LVS_SORTASCENDING, TRUE);
  else
  {
    ASSERT(m_strSortMode == _T("DESCENDING"));
    RenewListCtrl(LVS_SORTDESCENDING, TRUE);
  }
}

void CListHdrDlg::OnChangeView ( ) [protected]

Definition at line 397 of file LHdrDlg.cpp.

{

  long        lStyle, lStyleOld;
  BOOL        bReport, bIconic;

  // retrieve view mode selection
  UpdateData(TRUE);
  if (m_strViewMode == _T("ICON"))
    lStyle = LVS_ICON;
  else if (m_strViewMode == _T("SMALL ICON"))
    lStyle = LVS_SMALLICON;
  else if (m_strViewMode == _T("REPORT"))
    lStyle = LVS_REPORT;
  else
  {
    ASSERT(m_strViewMode == _T("LIST"));
    lStyle = LVS_LIST;
  }

  // update interdependent styles, depending on view mode choice
  bReport = lStyle == LVS_REPORT;
  bIconic = lStyle == LVS_ICON || lStyle == LVS_SMALLICON;
  GetDlgItem(IDC_NOSORTHEADER)->EnableWindow(bReport);
  GetDlgItem(IDC_NOCOLUMNHEADER)->EnableWindow(bReport);
  GetDlgItem(IDC_WORKAREAS)->EnableWindow(bIconic);
  GetDlgItem(IDC_ALIGN)->EnableWindow(bIconic);
  GetDlgItem(IDC_AUTOARRANGE)->EnableWindow(bIconic);

  lStyleOld = GetWindowLong(m_listctrl.m_hWnd, GWL_STYLE);
  lStyleOld &= ~(LVS_TYPEMASK);  // turn off all the style (view mode) bits
  lStyleOld |= lStyle;        // Set the new style for the control
  SetWindowLong(m_listctrl.m_hWnd, GWL_STYLE, lStyleOld);

  //In order to change the alignment, the control must be re-created.
  //However, changing the view mode of a list control does not force a re-creation.
  //Therefore, if the list view is in iconic mode, the control must be re-created
  //to carry over the current alignment mode.
  if(bIconic) //need to keep alignment also
    RenewListCtrl(0, 0);
}

void CListHdrDlg::OnEditLabels ( ) [protected]

Definition at line 367 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);
  ChangeListCtrlStyle(LVS_EDITLABELS, m_bEditLabels);
}

void CListHdrDlg::OnHover ( ) [protected]

Definition at line 447 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);

  if(m_bHoverSelect) // "hover selection" is enabled
  {
  // LVS_EX_ONECLICKACTIVATE (or LVS_EX_TWOCLICKACTIVATE must also be
  // set before  "hover selection" is enabled
    m_listctrl.SetExtendedStyle(LVS_EX_TRACKSELECT |
      LVS_EX_ONECLICKACTIVATE);
    GetDlgItem(IDC_STDHOTCUR)->EnableWindow(m_bHoverSelect);
    GetDlgItem(IDC_MYHOTCUR)->EnableWindow(m_bHoverSelect);
  }
  else // "hover selection" is disabled
  {
    m_listctrl.SetExtendedStyle(0);
    GetDlgItem(IDC_STDHOTCUR)->EnableWindow(m_bHoverSelect);
    GetDlgItem(IDC_MYHOTCUR)->EnableWindow(m_bHoverSelect);
  }
}

BOOL CListHdrDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 147 of file LHdrDlg.cpp.

{
  CListHdrApp     *pApp;
  CRect           rect;

  CDialog::OnInitDialog();  // let the base class do the default work
  UpdateData(TRUE);  // bring the information from the dialog.
  pApp = (CListHdrApp *)AfxGetApp();
  srand((unsigned) time(NULL));  // start the random number generator

  // create image list for header items
  m_pImageHdrSmall = new CImageList();
  ASSERT(m_pImageHdrSmall != NULL);    // serious allocation failure checking
  m_pImageHdrSmall->Create(16, 16, ILC_MASK, 2, 2);
  m_pImageHdrSmall->Add(pApp->LoadIcon(IDI_HDRICON1));
  m_pImageHdrSmall->Add(pApp->LoadIcon(IDI_HDRICON2));

  // fill in image lists
  m_pImageList = new CImageList();
  m_pImageListSmall = new CImageList();
  ASSERT(m_pImageList != NULL && m_pImageListSmall != NULL);    // serious allocation failure checking
  m_pImageList->Create(32, 32, TRUE,  4, 4);
  m_pImageListSmall->Create(16, 16, TRUE, 4, 4);
  m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST1));
  m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST2));
  m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST3));
  m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST4));
  m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST1));
  m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST2));
  m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST3));
  m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST4));

  // initialize the standard and custom hot cursors
  m_hMyHotCursor= pApp->LoadCursor(IDC_SPYGLASS);
  m_hStdHotCursor= m_listctrl.GetHotCursor();

  FillListCtrl();

  // Enable/disable inter-dependent list control styles
  ((CButton*)GetDlgItem(IDC_STDHOTCUR))->SetCheck(m_bHotCursor);
  GetDlgItem(IDC_STDHOTCUR)->EnableWindow(m_bHoverSelect);
  GetDlgItem(IDC_MYHOTCUR)->EnableWindow(m_bHoverSelect);
  GetDlgItem(IDC_WORKAREAS)->EnableWindow(FALSE);
  GetDlgItem(IDC_ALIGN)->EnableWindow(FALSE);  // default is  report mode Does not support this
  GetDlgItem(IDC_AUTOARRANGE)->EnableWindow(FALSE);

  return FALSE;  // there is no change in any control focus stuff here.
}

void CListHdrDlg::OnMyHotCur ( ) [protected]

Definition at line 468 of file LHdrDlg.cpp.

{
  m_listctrl.SetHotCursor(m_hMyHotCursor);
  m_bHotCursor= FALSE;
}

void CListHdrDlg::OnNoColHdr ( ) [protected]

Definition at line 373 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);
  RenewListCtrl(LVS_NOCOLUMNHEADER, m_bNoColHdr);
}

void CListHdrDlg::OnNoLabelWrap ( ) [protected]

Definition at line 391 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);
  RenewListCtrl(LVS_NOLABELWRAP, m_bNoLabelWrap);
}

void CListHdrDlg::OnNoSortHdr ( ) [protected]

Definition at line 379 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);
  RenewListCtrl(LVS_NOSORTHEADER, m_bNoSortHdr);
}

void CListHdrDlg::OnPaint ( ) [protected]

Definition at line 199 of file LHdrDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CListHdrDlg::OnQueryDragIcon ( ) [protected]

Definition at line 224 of file LHdrDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CListHdrDlg::OnSingleSel ( ) [protected]

Definition at line 385 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);
  ChangeListCtrlStyle(LVS_SINGLESEL, m_bSingleSel);
}

void CListHdrDlg::OnStdHotCur ( ) [protected]

Definition at line 551 of file LHdrDlg.cpp.

{
  m_listctrl.SetHotCursor(m_hStdHotCursor);
  m_bHotCursor= TRUE;
}

void CListHdrDlg::OnWorkAreas ( ) [protected]

Definition at line 493 of file LHdrDlg.cpp.

{
  UpdateData(TRUE);

  if(m_bWorkAreas)
  {
    CRect curRect;
    CSize size;

    size= m_listctrl.ApproximateViewRect();
    size.cx+= 100;
    size.cy+= 100;

/*      Work area layout
    _____________________
    |          |         |
    |          |         |
    |   0      |    1    |
    |          |         |
    |--------------------|
    |          |         |
    |   2      |    3    |
    |          |         |
    |__________|_________|*/

    CRect rcWorkAreas[4];

    rcWorkAreas[0].SetRect(0, 0, (size.cx / 2) - 5, (size.cy / 2) - 5);
    rcWorkAreas[1].SetRect((size.cx / 2) + 5, 0, size.cx, (size.cy / 2) - 5);
    rcWorkAreas[2].SetRect(0, (size.cy / 2) + 5, (size.cx / 2) - 5, size.cy);
    rcWorkAreas[3].SetRect((size.cx / 2) + 5, (size.cy / 2) + 5, size.cx, size.cy);

    //set work areas
    m_listctrl.SetWorkAreas(4, rcWorkAreas);

    // set insertion points for each work area
    CPoint  rgptWork[4];
    int i;
    for (i = 0; i < 4; i++)
    {
      rgptWork[i].x = rcWorkAreas[i].left + 10;
      rgptWork[i].y = rcWorkAreas[i].top + 10;
    }
    // now move all the items to the different quadrants
    for (i = 0; i < 20; i++)
      m_listctrl.SetItemPosition(i, rgptWork[i % 4]);
  }
  else    //delete all work areas and re-organize items
  {
    m_listctrl.SetWorkAreas(0, NULL);

    CPoint pt(0, 0);
    for (int i = 0; i < 20; i++)
      m_listctrl.SetItemPosition(i, pt);  // move all the items to the origin
  }
  m_listctrl.Arrange(LVA_DEFAULT); // force the control to re-arrange the shuffled items
}

void CListHdrDlg::RenewListCtrl | ( | DWORD | dwStyle,
 |  | BOOL | bSetBits |
 | ) |  |  | [protected]

Definition at line 315 of file LHdrDlg.cpp.

{
  DWORD   dwStyleOld, dwExtStyles;
  CRect   rect;

  dwStyleOld = GetWindowLong(m_listctrl.m_hWnd, GWL_STYLE);
  if (bSetBits)
    dwStyleOld |= dwStyle;   // turn on bits specified by caller.
  else
    dwStyleOld &= ~dwStyle;  // turn off bits specified by caller.

  m_listctrl.GetWindowRect(&rect);
  ScreenToClient(&rect);
  dwExtStyles= m_listctrl.GetExtendedStyle(); //save extended styles
  m_listctrl.DestroyWindow();
  m_listctrl.Create(dwStyleOld, rect, this, IDC_LISTVIEW1);
  m_listctrl.ModifyStyleEx(0,WS_EX_CLIENTEDGE); // renew the 3D border of the control
  m_listctrl.SetExtendedStyle(dwExtStyles);

  FillListCtrl(); // repopulate with a new item group

  // work areas are not carried over with the new control
  m_listctrl.SetWorkAreas(0, NULL);
  m_bWorkAreas= FALSE;
  UpdateData(FALSE);  // update the dialog

}

Member Data Documentation

BOOL CListHdrDlg::m_bAutoArrange

Definition at line 36 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bEditLabels

Definition at line 38 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bHotCursor [protected]

Definition at line 63 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bHoverSelect

Definition at line 44 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bNoColHdr

Definition at line 39 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bNoLabelWrap

Definition at line 35 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bNoSortHdr

Definition at line 40 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bSingleSel

Definition at line 37 of file LHdrDlg.h.

BOOL CListHdrDlg::m_bWorkAreas

Definition at line 45 of file LHdrDlg.h.

HICON CListHdrDlg::m_hIcon [protected]

Definition at line 66 of file LHdrDlg.h.

HCURSOR CListHdrDlg::m_hMyHotCursor [protected]

Definition at line 65 of file LHdrDlg.h.

HCURSOR CListHdrDlg::m_hStdHotCursor [protected]

Definition at line 64 of file LHdrDlg.h.

CMyListCtrl CListHdrDlg::m_listctrl

Definition at line 34 of file LHdrDlg.h.

CImageList* CListHdrDlg::m_pImageHdrSmall [protected]

Definition at line 56 of file LHdrDlg.h.

CImageList* CListHdrDlg::m_pImageList [protected]

Definition at line 57 of file LHdrDlg.h.

CImageList* CListHdrDlg::m_pImageListSmall [protected]

Definition at line 58 of file LHdrDlg.h.

CString CListHdrDlg::m_strAlignMode

Definition at line 42 of file LHdrDlg.h.

CString CListHdrDlg::m_strSortMode

Definition at line 43 of file LHdrDlg.h.

CString CListHdrDlg::m_strViewMode

Definition at line 41 of file LHdrDlg.h.

The documentation for this class was generated from the following files:
  • general/ListHdr/LHdrDlg.h
  • general/ListHdr/LHdrDlg.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CListOutputFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CListOutputFrame Class Reference

#include "testdll2.h"

List of all members.

Public Member Functions

CListOutputFrame ()
~CListOutputFrame ()
void | AddString (LPCTSTR lpszItem)
void | Clear ()
BOOL | Create (LPCTSTR lpszWindowName, DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_OVERLAPPEDWINDOW, const RECT &rect=rectDefault, CMDIFrameWnd *pParentWnd=NULL)
void | SetBackpointer (CListOutputFrame **ppThis)

Protected Member Functions

HGLOBAL | GetTextData ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()

Protected Attributes

CDialogBar | m_dlgBar
CListBox | m_listBox
CMenu | m_menu
CListOutputFrame ** m_ppThis

Detailed Description

Definition at line 30 of file testdll2.h.

Constructor & Destructor Documentation

CListOutputFrame::CListOutputFrame ( )

Definition at line 75 of file testdll2.cpp.

{
  m_ppThis = NULL;        // backpointer
  // do nothing now (two-phase create)
}

CListOutputFrame::~CListOutputFrame ( )

Definition at line 81 of file testdll2.cpp.

{
  // clear backpointer
  if (m_ppThis != NULL)
  {
    ASSERT(*m_ppThis == this);
    *m_ppThis = NULL;
  }
}

Member Function Documentation

void CListOutputFrame::AddString ( LPCTSTR lpszItem )

Definition at line 149 of file testdll2.cpp.

{
  ASSERT(m_listBox.m_hWnd != NULL);       // must be created
  int nIndex;
  if ((nIndex = m_listBox.AddString(lpszItem)) < 0)
    AfxThrowMemoryException();
  m_listBox.SetCurSel(nIndex);    // make last line visible
}

void CListOutputFrame::Clear ( )

Definition at line 143 of file testdll2.cpp.

{
  ASSERT(m_listBox.m_hWnd != NULL);       // must be created
  m_listBox.ResetContent();
}

BOOL CListOutputFrame::Create | ( | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW,
 |  | const RECT & | rect = rectDefault,
 |  | CMDIFrameWnd * | pParentWnd = NULL
 | ) |  |

Definition at line 91 of file testdll2.cpp.

{
  // we want to load a specific menu from this DLL
  HINSTANCE hInstOld = AfxGetResourceHandle();
  AfxSetResourceHandle(extensionDLL.hModule);
  if (!m_menu.LoadMenu(IDR_LISTOUTPUT))
  {
    // restore the old resource chain and return error
    AfxSetResourceHandle(hInstOld);
    return FALSE;
  }
  AfxSetResourceHandle(hInstOld); // restore the old resource chain

  // when the list output frame window is active, use this menu
  m_hMenuShared = m_menu.m_hMenu;

  // create the CMDIChildWnd, listbox created in OnCreate
  return CMDIChildWnd::Create(NULL, lpszWindowName,
    dwStyle, rect, pParentWnd);
}

HGLOBAL CListOutputFrame::GetTextData ( ) [protected]

Definition at line 203 of file testdll2.cpp.

{
  // first find out how much space we need
  int nLines = m_listBox.GetCount();
  long cbTotal = 0;
  int i;
  for (i = 0; i < nLines; i++)
    cbTotal += m_listBox.GetTextLen(i) + 2;     // CR/LF for each line
  cbTotal += 1;   // for end '\0'

  // allocate a (shared) global memory block for the data
  HGLOBAL hData = ::GlobalAlloc(GMEM_DDESHARE, cbTotal*sizeof(TCHAR));
  if (hData == NULL)
    return NULL;        // NULL for memory failure

  // now copy the strings, terminate each with CR/LF
  LPTSTR lpOut = (LPTSTR)::GlobalLock(hData);
  ENSURE(lpOut != NULL);
  for (i = 0; i < nLines; i++)
  {
    m_listBox.GetText(i, lpOut);
    lpOut += lstrlen(lpOut)*sizeof(TCHAR);   // skip new string
    *lpOut++ = 0xD; // CR
    *lpOut++ = 0xA; // LF
  }
  *lpOut = '\0';
  ASSERT(lpOut + 1 == (LPCTSTR)GlobalLock(hData) + cbTotal);

  return hData;
}

int CListOutputFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 114 of file testdll2.cpp.

{
  if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  // create dialog bar at top of the frame window (it is a toolbar)
  if (!m_dlgBar.Create(this, IDD_DIALOGBAR1, WS_CHILD|CBRS_TOP,
      AFX_IDW_TOOLBAR))
  {
    TRACE(_T("Failed to create toolbar for CListOutputFrame\n"));
    return -1;
  }

  // create listbox as main pane (will fill rest of frame window)
  if (!m_listBox.Create(WS_CHILD | WS_VISIBLE|
    LBS_NOTIFY | LBS_NOINTEGRALHEIGHT |
    WS_VSCROLL | LBS_DISABLENOSCROLL | WS_BORDER,
    CRect(0,0,0,0), this, AFX_IDW_PANE_FIRST))
  {
    TRACE(_T("Failed to create listbox for CListOutputFrame\n"));
    return -1;
  }
  m_listBox.SetFont(m_dlgBar.GetFont());
  ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_DRAWFRAME);
  m_listBox.ModifyStyle(0, WS_EX_CLIENTEDGE, SWP_DRAWFRAME);

  return 0; // creation ok
}

void CListOutputFrame::OnEditClear ( ) [protected]

Definition at line 161 of file testdll2.cpp.

{
  Clear();
}

void CListOutputFrame::OnEditCopy ( ) [protected]

Definition at line 172 of file testdll2.cpp.

{
  if (!OpenClipboard())
  {
    AfxMessageBox(_T("Failed to open clipboard"));
    return;
  }
  if (!::EmptyClipboard())
  {
    AfxMessageBox(_T("Failed to empty clipboard"));
    ::CloseClipboard();
    return;
  }

  // copy the current listbox contents to the clipboard as text
  HGLOBAL hTextData = GetTextData();
  if (hTextData == NULL ||
#ifndef _UNICODE
    ::SetClipboardData(CF_TEXT, hTextData) == NULL)
#else
    ::SetClipboardData(CF_UNICODETEXT, hTextData) == NULL)
#endif
  {
    AfxMessageBox(_T("Failed to set clipboard data"));
    ::CloseClipboard();
    return;
  }
  if (!::CloseClipboard())
    AfxMessageBox(_T("Failed to close clipboard"));
}

void CListOutputFrame::OnEditCut ( ) [protected]

Definition at line 166 of file testdll2.cpp.

{
  OnEditCopy();
  Clear();
}

void CListOutputFrame::SetBackpointer ( CListOutputFrame ** ppThis ) [inline]

Definition at line 70 of file testdll2.h.

  { m_ppThis = ppThis; }

Member Data Documentation

CDialogBar CListOutputFrame::m_dlgBar [protected]

Definition at line 55 of file testdll2.h.

CListBox CListOutputFrame::m_listBox [protected]

Definition at line 56 of file testdll2.h.

CMenu CListOutputFrame::m_menu [protected]

Definition at line 54 of file testdll2.h.

CListOutputFrame** CListOutputFrame::m_ppThis [protected]

Definition at line 57 of file testdll2.h.

The documentation for this class was generated from the following files:
  • advanced/dllhusk/testdll2.h
  • advanced/dllhusk/testdll2.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CListViewEx Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes

CListViewEx Class Reference

#include "listvwex.h"

Inherited by CRowListView.

List of all members.

Public Member Functions

CListViewEx ()
virtual | ~CListViewEx ()
BOOL | GetFullRowSel ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
BOOL | SetFullRowSel (BOOL bFillRowSel)

Public Attributes

BOOL | m_bClientWidthSel

Protected Member Functions

virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
afx_msg void | OnKillFocus (CWnd *pNewWnd)
afx_msg void | OnPaint ()
afx_msg LRESULT | OnSetBkColor (WPARAM wParam, LPARAM lParam)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg LRESULT | OnSetImageList (WPARAM wParam, LPARAM lParam)
afx_msg LRESULT | OnSetTextBkColor (WPARAM wParam, LPARAM lParam)
afx_msg LRESULT | OnSetTextColor (WPARAM wParam, LPARAM lParam)
afx_msg void | OnSize (UINT nType, int cx, int cy)
void | RepaintSelectedItems ()

Static Protected Member Functions

static LPCTSTR | MakeShortString (CDC *pDC, LPCTSTR lpszLong, int nColumnLen, int nOffset)

Protected Attributes

BOOL | m_bFullRowSel
COLORREF | m_clrBkgnd
COLORREF | m_clrText
COLORREF | m_clrTextBk
int | m_cxClient
int | m_cxStateImageOffset

Detailed Description

Definition at line 15 of file listvwex.h.

Constructor & Destructor Documentation

CListViewEx::CListViewEx ( )

Definition at line 42 of file listvwex.cpp.

{
  m_bFullRowSel = FALSE;
  m_bClientWidthSel = TRUE;

  m_cxClient = 0;
  m_cxStateImageOffset = 0;

  m_clrText = ::GetSysColor(COLOR_WINDOWTEXT);
  m_clrTextBk = ::GetSysColor(COLOR_WINDOW);
  m_clrBkgnd = ::GetSysColor(COLOR_WINDOW);
}

CListViewEx::~CListViewEx ( ) [virtual]

Definition at line 55 of file listvwex.cpp.

{
}

Member Function Documentation

void CListViewEx::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [protected, virtual]

Definition at line 105 of file listvwex.cpp.

{
  CListCtrl& ListCtrl=GetListCtrl();
  CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
  CRect rcItem(lpDrawItemStruct->rcItem);
  UINT uiFlags = ILD_TRANSPARENT;
  CImageList* pImageList;
  int nItem = lpDrawItemStruct->itemID;
  BOOL bFocus = (GetFocus() == this);
  COLORREF clrTextSave = 0;
  COLORREF clrBkSave = 0;
  COLORREF clrImage = m_clrBkgnd;
  static _TCHAR szBuff[MAX_PATH];
  LPCTSTR pszText;

// get item data

  LV_ITEM lvi;
  lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
  lvi.iItem = nItem;
  lvi.iSubItem = 0;
  lvi.pszText = szBuff;
  lvi.cchTextMax = sizeof(szBuff);
  lvi.stateMask = 0xFFFF;     // get all state flags
  ListCtrl.GetItem(&lvi);

  BOOL bSelected = (bFocus || (GetStyle() & LVS_SHOWSELALWAYS)) && lvi.state & LVIS_SELECTED;
  bSelected = bSelected || (lvi.state & LVIS_DROPHILITED);

// set colors if item is selected

  CRect rcAllLabels;
  ListCtrl.GetItemRect(nItem, rcAllLabels, LVIR_BOUNDS);

  CRect rcLabel;
  ListCtrl.GetItemRect(nItem, rcLabel, LVIR_LABEL);

  rcAllLabels.left = rcLabel.left;
  if (m_bClientWidthSel && rcAllLabels.right<m_cxClient)
    rcAllLabels.right = m_cxClient;

  if (bSelected)
  {
    clrTextSave = pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));
    clrBkSave = pDC->SetBkColor(::GetSysColor(COLOR_HIGHLIGHT));

    CBrush cbr(::GetSysColor(COLOR_HIGHLIGHT));
    pDC->FillRect(rcAllLabels, &cbr);
  }
  else
  {
    CBrush cbr(m_clrTextBk);
    pDC->FillRect(rcAllLabels, &cbr);
  }

// set color and mask for the icon

  if (lvi.state & LVIS_CUT)
  {
    clrImage = m_clrBkgnd;
    uiFlags |= ILD_BLEND50;
  }
  else if (bSelected)
  {
    clrImage = ::GetSysColor(COLOR_HIGHLIGHT);
    uiFlags |= ILD_BLEND50;
  }

// draw state icon

  UINT nStateImageMask = lvi.state & LVIS_STATEIMAGEMASK;
  if (nStateImageMask)
  {
    int nImage = (nStateImageMask>>12) - 1;
    pImageList = ListCtrl.GetImageList(LVSIL_STATE);
    if (pImageList)
    {
      pImageList->Draw(pDC, nImage,
        CPoint(rcItem.left, rcItem.top), ILD_TRANSPARENT);
    }
  }

// draw normal and overlay icon

  CRect rcIcon;
  ListCtrl.GetItemRect(nItem, rcIcon, LVIR_ICON);

  pImageList = ListCtrl.GetImageList(LVSIL_SMALL);
  if (pImageList)
  {
    UINT nOvlImageMask=lvi.state & LVIS_OVERLAYMASK;
    if (rcItem.left<rcItem.right-1)
    {
      ImageList_DrawEx(pImageList->m_hImageList, lvi.iImage,
          pDC->m_hDC,rcIcon.left,rcIcon.top, 16, 16,
          m_clrBkgnd, clrImage, uiFlags | nOvlImageMask);
    }
  }

// draw item label

  ListCtrl.GetItemRect(nItem, rcItem, LVIR_LABEL);
  rcItem.right -= m_cxStateImageOffset;

  pszText = MakeShortString(pDC, szBuff,
        rcItem.right-rcItem.left, 2*OFFSET_FIRST);

  rcLabel = rcItem;
  rcLabel.left += OFFSET_FIRST;
  rcLabel.right -= OFFSET_FIRST;

  pDC->DrawText(pszText,-1,rcLabel,DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER);

// draw labels for extra columns

  LV_COLUMN lvc;
  lvc.mask = LVCF_FMT | LVCF_WIDTH;

  for(int nColumn = 1; ListCtrl.GetColumn(nColumn, &lvc); nColumn++)
  {
    rcItem.left = rcItem.right;
    rcItem.right += lvc.cx;

    int nRetLen = ListCtrl.GetItemText(nItem, nColumn,
            szBuff, sizeof(szBuff));
    if (nRetLen == 0)
      continue;

    pszText = MakeShortString(pDC, szBuff,
      rcItem.right - rcItem.left, 2*OFFSET_OTHER);

    UINT nJustify = DT_LEFT;

    if(pszText == szBuff)
    {
      switch(lvc.fmt & LVCFMT_JUSTIFYMASK)
      {
      case LVCFMT_RIGHT:
        nJustify = DT_RIGHT;
        break;
      case LVCFMT_CENTER:
        nJustify = DT_CENTER;
        break;
      default:
        break;
      }
    }

    rcLabel = rcItem;
    rcLabel.left += OFFSET_OTHER;
    rcLabel.right -= OFFSET_OTHER;

    pDC->DrawText(pszText, -1, rcLabel,
      nJustify | DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER);
  }

// draw focus rectangle if item has focus

  if (lvi.state & LVIS_FOCUSED && bFocus)
    pDC->DrawFocusRect(rcAllLabels);

// set original colors if item was selected

  if (bSelected)
  {
    pDC->SetTextColor(clrTextSave);
    pDC->SetBkColor(clrBkSave);
  }
}

BOOL CListViewEx::GetFullRowSel ( )

Definition at line 93 of file listvwex.cpp.

{
  return(m_bFullRowSel);
}

LPCTSTR CListViewEx::MakeShortString | ( | CDC * | pDC,
 |  | LPCTSTR | lpszLong,
 |  | int | nColumnLen,
 |  | int | nOffset |
 | ) |  |  | [static, protected]

Definition at line 275 of file listvwex.cpp.

{
  static const _TCHAR szThreeDots[] = _T("...");

  int nStringLen = lstrlen(lpszLong);

  if(nStringLen == 0 ||
    (pDC->GetTextExtent(lpszLong, nStringLen).cx + nOffset) <= nColumnLen)
  {
    return(lpszLong);
  }

  static _TCHAR szShort[MAX_PATH];

  _tcsncpy_s(szShort,MAX_PATH,lpszLong,_TRUNCATE);
  int nAddLen = pDC->GetTextExtent(szThreeDots,sizeof(szThreeDots)).cx;

  for(int i = nStringLen-1; i > 0; i--)
  {
    szShort[i] = 0;
    if((pDC->GetTextExtent(szShort, i).cx + nOffset + nAddLen)
      <= nColumnLen)
    {
      break;
    }
  }

  _tcscat_s(szShort, MAX_PATH, szThreeDots);
  return(szShort);
}

void CListViewEx::OnKillFocus ( CWnd * pNewWnd ) [protected]

Definition at line 454 of file listvwex.cpp.

{
  CListView::OnKillFocus(pNewWnd);

  // check if we are losing focus to label edit box
  if(pNewWnd != NULL && pNewWnd->GetParent() == this)
    return;

  // repaint items that should change appearance
  if(m_bFullRowSel && (GetStyle() & LVS_TYPEMASK) == LVS_REPORT)
    RepaintSelectedItems();
}

void CListViewEx::OnPaint ( ) [protected]

Definition at line 410 of file listvwex.cpp.

{
  // in full row select mode, we need to extend the clipping region
  // so we can paint a selection all the way to the right
  if (m_bClientWidthSel &&
    (GetStyle() & LVS_TYPEMASK) == LVS_REPORT &&
    GetFullRowSel())
  {
    CRect rcAllLabels;
    GetListCtrl().GetItemRect(0, rcAllLabels, LVIR_BOUNDS);

    if(rcAllLabels.right < m_cxClient)
    {
      // need to call BeginPaint (in CPaintDC c-tor)
      // to get correct clipping rect
      CPaintDC dc(this);

      CRect rcClip;
      dc.GetClipBox(rcClip);

      rcClip.left = min(rcAllLabels.right-1, rcClip.left);
      rcClip.right = m_cxClient;

      InvalidateRect(rcClip, FALSE);
      // EndPaint will be called in CPaintDC d-tor
    }
  }

  CListView::OnPaint();
}

LRESULT CListViewEx::OnSetBkColor | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 398 of file listvwex.cpp.

{
  m_clrBkgnd = (COLORREF)lParam;
  return(Default());
}

void CListViewEx::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 441 of file listvwex.cpp.

{
  CListView::OnSetFocus(pOldWnd);

  // check if we are getting focus from label edit box
  if(pOldWnd!=NULL && pOldWnd->GetParent()==this)
    return;

  // repaint items that should change appearance
  if(m_bFullRowSel && (GetStyle() & LVS_TYPEMASK)==LVS_REPORT)
    RepaintSelectedItems();
}

LRESULT CListViewEx::OnSetImageList | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 364 of file listvwex.cpp.

{
  // if we're running Windows 4, there's no need to offset the
  // item text location

  OSVERSIONINFO info;
  info.dwOSVersionInfoSize = sizeof(info);
  VERIFY(::GetVersionEx(&info));

  if( (int) wParam == LVSIL_STATE && info.dwMajorVersion < 4)
  {
    int cx, cy;

    if(::ImageList_GetIconSize((HIMAGELIST)lParam, &cx, &cy))
      m_cxStateImageOffset = cx;
    else
      m_cxStateImageOffset = 0;
  }

  return(Default());
}

LRESULT CListViewEx::OnSetTextBkColor | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 392 of file listvwex.cpp.

{
  m_clrTextBk = (COLORREF)lParam;
  return(Default());
}

LRESULT CListViewEx::OnSetTextColor | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 386 of file listvwex.cpp.

{
  m_clrText = (COLORREF)lParam;
  return(Default());
}

void CListViewEx::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 404 of file listvwex.cpp.

{
  m_cxClient = cx;
  CListView::OnSize(nType, cx, cy);
}

BOOL CListViewEx::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Reimplemented in CRowListView.

Definition at line 59 of file listvwex.cpp.

{
  // default is report view and full row selection
  cs.style &= ~LVS_TYPEMASK;
  cs.style |= LVS_REPORT | LVS_OWNERDRAWFIXED;
  m_bFullRowSel = TRUE;

  return(CListView::PreCreateWindow(cs));
}

void CListViewEx::RepaintSelectedItems ( ) [protected]

Definition at line 306 of file listvwex.cpp.

{
  CListCtrl& ListCtrl = GetListCtrl();
  CRect rcItem, rcLabel;

// invalidate focused item so it can repaint properly

  int nItem = ListCtrl.GetNextItem(-1, LVNI_FOCUSED);

  if(nItem != -1)
  {
    ListCtrl.GetItemRect(nItem, rcItem, LVIR_BOUNDS);
    ListCtrl.GetItemRect(nItem, rcLabel, LVIR_LABEL);
    rcItem.left = rcLabel.left;

    InvalidateRect(rcItem, FALSE);
  }

// if selected items should not be preserved, invalidate them

  if(!(GetStyle() & LVS_SHOWSELALWAYS))
  {
    for(nItem = ListCtrl.GetNextItem(-1, LVNI_SELECTED);
      nItem != -1; nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED))
    {
      ListCtrl.GetItemRect(nItem, rcItem, LVIR_BOUNDS);
      ListCtrl.GetItemRect(nItem, rcLabel, LVIR_LABEL);
      rcItem.left = rcLabel.left;

      InvalidateRect(rcItem, FALSE);
    }
  }

// update changes

  UpdateWindow();
}

BOOL CListViewEx::SetFullRowSel ( BOOL bFillRowSel )

Definition at line 69 of file listvwex.cpp.

{
  // no painting during change
  LockWindowUpdate();

  m_bFullRowSel = bFullRowSel;

  BOOL bRet;

  if (m_bFullRowSel)
    bRet = ModifyStyle(0L, LVS_OWNERDRAWFIXED);
  else
    bRet = ModifyStyle(LVS_OWNERDRAWFIXED, 0L);

  // repaint window if we are not changing view type
  if (bRet && (GetStyle() & LVS_TYPEMASK) == LVS_REPORT)
    Invalidate();

  // repaint changes
  UnlockWindowUpdate();

  return(bRet);
}

Member Data Documentation

BOOL CListViewEx::m_bClientWidthSel

Definition at line 31 of file listvwex.h.

BOOL CListViewEx::m_bFullRowSel [protected]

Definition at line 25 of file listvwex.h.

COLORREF CListViewEx::m_clrBkgnd [protected]

Definition at line 65 of file listvwex.h.

COLORREF CListViewEx::m_clrText [protected]

Definition at line 63 of file listvwex.h.

COLORREF CListViewEx::m_clrTextBk [protected]

Definition at line 64 of file listvwex.h.

int CListViewEx::m_cxClient [protected]

Definition at line 56 of file listvwex.h.

int CListViewEx::m_cxStateImageOffset [protected]

Definition at line 59 of file listvwex.h.

The documentation for this class was generated from the following files:
  • general/rowlist/listvwex.h
  • general/rowlist/listvwex.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLlama Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CLlama Class Reference

#include "Swarm.h"

Inherits CRoamer.

List of all members.

Public Member Functions

void | Init (CSwarm *pSwarm)
void | Kick ()
void | Tick (CSwarm *pSwarm, const CLeaderArray &Leaders)

Private Attributes

COLORREF | m_color
size_t | m_idxLeader

Detailed Description

Definition at line 65 of file Swarm.h.

Member Function Documentation

void CLlama::Init ( CSwarm * pSwarm )

Definition at line 113 of file Swarm.cpp.

{
  p1.x = p2.x = Random(max(1, (pSwarm->GetWidth())));
    p1.y = p2.y = Random(max(1, (pSwarm->GetHeight())));
    dx = dy = 0;
  m_idxLeader = (size_t)-1;
}

void CLlama::Kick ( )

Definition at line 121 of file Swarm.cpp.

{
  dx += DeltaRandom(3);
  dy += DeltaRandom(3);
}

void CLlama::Tick | ( | CSwarm * | pSwarm,
 |  | const CLeaderArray & | Leaders
 | ) |  |

Definition at line 127 of file Swarm.cpp.

{
  CPoint ptClosestDelta;
    int nClosestDist = INT_MAX;
  size_t nLeaders = leaders.GetCount();
  size_t idxClosest = 0;

    p2 = p1;
    for (size_t i = 0; i < nLeaders; i++) {
        CPoint leader(leaders[i]->p2); // pos of leader
        int nDist;
    CPoint ptRel(leader.x - p2.x, leader.y - p2.y);
        nDist = max(1, ABS(ptRel.x) + ABS(ptRel.y)); // approximation
        if (nDist < nClosestDist) {
      nClosestDist = nDist;
      idxClosest = i;
      ptClosestDelta = ptRel;
        }
    }

  CLeader *pClosest = leaders[idxClosest];
  // Did we switch leaders?
  if (idxClosest != m_idxLeader) {
    m_idxLeader = idxClosest;
    m_color = pClosest->GetInitialLlamaColor();
  }

    // Accelerate
  int acc = pClosest->GetLlamaAcc();
    dx += (ptClosestDelta.x * acc) / (nClosestDist*2);
    dy += (ptClosestDelta.y * acc) / (nClosestDist*2);

    // Speed Limit Checks
  int vel = pClosest->GetLlamaVel();
    dx = max(min(dx, vel), -vel);
    dy = max(min(dy, vel), -vel);

    // Move and bound check
    p1.x += dx;
    p1.y += dy;

    Bounce(p1.x, 0, pSwarm->GetWidth(), dx);
    Bounce(p1.y, 0, pSwarm->GetHeight(), dy);
    m_color = pClosest->GetLlamaColor(m_color);

  // Draw
  pSwarm->GetSurface()->Line(p1, p2, m_color);
}

Member Data Documentation

COLORREF CLlama::m_color [private]

Definition at line 73 of file Swarm.h.

size_t CLlama::m_idxLeader [private]

Definition at line 74 of file Swarm.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/Swarm.h
  • general/MMXSwarm/Swarm.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLocalComboBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes

CLocalComboBox Class Reference

#include "formatba.h"

Inherited by CFontComboBox, and CSizeComboBox.

List of all members.

Public Member Functions

void | GetTheText (CString &str)
BOOL | HasFocus ()
BOOL | LimitText (int nMaxChars)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
void | SetTheText (LPCTSTR lpszText, BOOL bMatchExact=FALSE)

Public Attributes

CPtrArray | m_arrayFontDesc
int | m_nLimitText

Static Public Attributes

static int | m_nFontHeight = 0

Detailed Description

Definition at line 38 of file formatba.h.

Member Function Documentation

void CLocalComboBox::GetTheText ( CString & str )

Definition at line 722 of file formatba.cpp.

{
  int nIndex = GetCurSel();
  if (nIndex == CB_ERR)
    GetWindowText(str);
  else
    GetLBText(nIndex, str);
}

BOOL CLocalComboBox::HasFocus ( ) [inline]

Definition at line 46 of file formatba.h.

  {
    HWND hWnd = ::GetFocus();
    return (hWnd == m_hWnd || ::IsChild(m_hWnd, hWnd));
  }

BOOL CLocalComboBox::LimitText ( int nMaxChars )

Definition at line 740 of file formatba.cpp.

{
  BOOL b = CComboBox::LimitText(nMaxChars);
  if (b)
    m_nLimitText = nMaxChars;
  return b;
}

int CLocalComboBox::OnCreate ( LPCREATESTRUCT lpCreateStruct )

Definition at line 748 of file formatba.cpp.

{
  if (CComboBox::OnCreate(lpCreateStruct) == -1)
    return -1;
  SendMessage(WM_SETFONT, (WPARAM)GetStockObject(theApp.m_nDefFont));
  return 0;
}

BOOL CLocalComboBox::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 756 of file formatba.cpp.

{
  if (pMsg->message == WM_KEYDOWN)
  {
    CFormatBar* pBar = (CFormatBar*)GetParent();
    switch (pMsg->wParam)
    {
    case VK_ESCAPE:
      pBar->SyncToView();
      pBar->NotifyOwner(NM_RETURN);
      return TRUE;
    case VK_RETURN:
      pBar->NotifyOwner(NM_RETURN);
      return TRUE;
    case VK_TAB:
      pBar->GetNextDlgTabItem(this)->SetFocus();
      return TRUE;
    case VK_UP:
    case VK_DOWN:
      if ((GetKeyState(VK_MENU) >= 0) && (GetKeyState(VK_CONTROL) >=0) &&
        !GetDroppedState())
      {
        ShowDropDown();
        return TRUE;
      }
    }
  }
  return CComboBox::PreTranslateMessage(pMsg);
}

void CLocalComboBox::SetTheText | ( | LPCTSTR | lpszText,
 |  | BOOL | bMatchExact = FALSE
 | ) |  |

Definition at line 731 of file formatba.cpp.

{
  int idx = (bMatchExact) ? FindStringExact(-1,lpszText) :
    FindString(-1, lpszText);
  SetCurSel( (idx==CB_ERR) ? -1 : idx);
  if (idx == CB_ERR)
    SetWindowText(lpszText);
}

Member Data Documentation

CPtrArray CLocalComboBox::m_arrayFontDesc

Definition at line 43 of file formatba.h.

int CLocalComboBox::m_nFontHeight = 0 [static]

Definition at line 44 of file formatba.h.

int CLocalComboBox::m_nLimitText

Definition at line 45 of file formatba.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/formatba.h
  • ole/wordpad/formatba.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLocalizeApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CLocalizeApp Class Reference

#include "localize.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 21 of file localize.h.

Member Function Documentation

int CLocalizeApp::ExitInstance ( )

Definition at line 48 of file localize.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CLocalizeApp::InitInstance ( )

Definition at line 32 of file localize.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/localize/localize.h
  • controls/localize/localize.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLocalizeCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CLocalizeCtrl Class Reference

#include "localctl.h"

List of all members.

Public Types

enum | { dispidInvert = 1L }

Public Member Functions

CLocalizeCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnAmbientPropertyChange (DISPID dispid)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual void | OnResetState ()

Protected Member Functions

~CLocalizeCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CLocalizeCtrl) DECLARE_OLETYPELIB(CLocalizeCtrl) DECLARE_PROPPAGEIDS(CLocalizeCtrl) DECLARE_OLECTLTYPE(CLocalizeCtrl) afx_msg void OnLButtonDown(UINT nFlags
void | FireClick ()
virtual HINSTANCE | GetResourceHandle (LCID lcid)
virtual void | LoadCaption ()
afx_msg void | OnCancelMode ()
afx_msg void | OnInvertChanged ()
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)

Protected Attributes

BOOL | m_invert
BOOL | m_inverted
CPoint | point

Detailed Description

Definition at line 15 of file localctl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidInvert

Definition at line 72 of file localctl.h.

       {
  //{{AFX_DISP_ID(CLocalizeCtrl)
  dispidInvert = 1L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CLocalizeCtrl::CLocalizeCtrl ( )

Definition at line 138 of file localctl.cpp.

{
  InitializeIIDs(&IID_DLocalize, &IID_DLocalizeEvents);

  // Initialize inverted flag
  m_inverted = FALSE;
}

CLocalizeCtrl::~CLocalizeCtrl ( ) [protected]

Definition at line 150 of file localctl.cpp.

{
}

Member Function Documentation

void CLocalizeCtrl::AboutBox ( ) [protected]

Definition at line 210 of file localctl.cpp.

{
  BOOL bError = FALSE;

  // Load resource module
  HINSTANCE hResHandle = GetResourceHandle(AmbientLocaleID());

  if (!hResHandle)
    bError = TRUE;

  if (!bError)
  {
    // Load dialog resource from resource module
    HINSTANCE hResPrev = AfxGetResourceHandle();
    AfxSetResourceHandle(hResHandle);

    // Execute dialog
    CDialog dlgAbout(IDD_ABOUTBOX_LOCALIZE);
    dlgAbout.DoModal();

    AfxSetResourceHandle(hResPrev);
    FreeLibrary(hResHandle);
  }
  else
  {
    // Execute dialog, using resource in control module
    CDialog dlgAbout(IDD_ABOUTBOX_LOCALIZE);
    dlgAbout.DoModal();
  }
}

CLocalizeCtrl::DECLARE_OLECREATE_EX ( CLocalizeCtrl ) [protected]
void CLocalizeCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 181 of file localctl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  PX_Bool(pPX, _T("Invert"), m_invert, TRUE);

  if (pPX->IsLoading())
  {
    CFontHolder& stockFont = InternalGetFont();
    stockFont.InitializeFont();
  }
}

void CLocalizeCtrl::FireClick ( ) [inline, protected]

Definition at line 65 of file localctl.h.

    {FireEvent(DISPID_CLICK,EVENT_PARAM(VTS_NONE));}

HINSTANCE CLocalizeCtrl::GetResourceHandle ( LCID lcid ) [protected, virtual]

Definition at line 380 of file localctl.cpp.

{
  LPCTSTR lpszResModule = NULL;
  HINSTANCE hResHandle = NULL;

  // Use lcid to determine module that contains resources
  LANGID langID = LANGIDFROMLCID(lcid);
  unsigned short priLangID = (unsigned short) PRIMARYLANGID(langID);
  switch (priLangID)
  {
    case LANG_ENGLISH:
      break;
    case LANG_FRENCH:
      #ifdef _WIN32
        lpszResModule = (LPCTSTR)_T("lresfr32.dll");
      #else
        lpszResModule = (LPCTSTR)_T("locresfr.dll");
      #endif
      break;
    case LANG_GERMAN:
      #ifdef _WIN32
        lpszResModule = (LPCTSTR)_T("lresde32.dll");
      #else
        lpszResModule = (LPCTSTR)_T("locresde.dll");
      #endif
      break;
    case 0:
    default:
       break;
  }

  // Load resource module
  if (lpszResModule != NULL)
    hResHandle = LoadLibrary(lpszResModule);

#ifndef _WIN32
  if (hResHandle <= HINSTANCE_ERROR)
    hResHandle = NULL;
#endif

  return hResHandle;
}

void CLocalizeCtrl::LoadCaption ( ) [protected, virtual]

Definition at line 347 of file localctl.cpp.

{
  CString caption;
  BOOL bError = FALSE;

  // Get the handle of the resource module
  HINSTANCE hResHandle = GetResourceHandle(AmbientLocaleID());

  if (!hResHandle)
    bError = TRUE;

  if (!bError)
  {
    // Load caption from resource module
    HINSTANCE hResPrev = AfxGetResourceHandle();
    AfxSetResourceHandle(hResHandle);
    caption.LoadString(IDS_CAPTION);
    AfxSetResourceHandle(hResPrev);
    FreeLibrary(hResHandle);
  }
  else
    // Load caption from control module resource
    caption.LoadString(IDS_CAPTION);

  // Set caption property
  SetText(caption);
}

void CLocalizeCtrl::OnAmbientPropertyChange ( DISPID dispid ) [virtual]

Definition at line 332 of file localctl.cpp.

{
  if (dispid == DISPID_AMBIENT_LOCALEID)
  {
    LoadCaption();

    InvalidateControl();
  }
}

void CLocalizeCtrl::OnCancelMode ( ) [protected]

Definition at line 311 of file localctl.cpp.

{
  // If inverted flag is set
  if (m_inverted)
  {
    // Invalidate to redraw (without inversion)
    InvalidateControl();

    // Reset inverted flag
    m_inverted = FALSE;
  }

  // Default processing will release the mouse, if captured
  COleControl::OnCancelMode();
}

void CLocalizeCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 158 of file localctl.cpp.

{
  CFont *pOldFont;
  TEXTMETRIC tm;

  // Load localized caption as Caption property
  const CString& strCaption = InternalGetText();

  // Draw caption
  pOldFont = SelectStockFont(pdc);
  pdc->SetTextAlign(TA_CENTER | TA_TOP);
  GetStockTextMetrics(&tm);

  pdc->ExtTextOut((rcBounds.left + rcBounds.right) / 2, (rcBounds.top + rcBounds.bottom - tm.tmHeight) / 2,
    ETO_CLIPPED | ETO_OPAQUE, rcBounds, strCaption, strCaption.GetLength(), NULL);
  pdc->SelectObject(pOldFont);
}

void CLocalizeCtrl::OnInvertChanged ( ) [protected]

Definition at line 245 of file localctl.cpp.

{
  SetModifiedFlag();
}

void CLocalizeCtrl::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 285 of file localctl.cpp.

{
  // If inverted flag is set
  if (m_inverted)
  {
    // Release the mouse
    ReleaseCapture();

    // Invalidate to redraw (without inversion)
    InvalidateControl();

    // Reset inverted flag
    m_inverted = FALSE;
  }

  COleControl::OnLButtonUp(nFlags, point);

  // Fire click event
  FireClick();
}

void CLocalizeCtrl::OnResetState ( ) [virtual]

Definition at line 199 of file localctl.cpp.

{
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange

  LoadCaption();
}

Member Data Documentation

BOOL CLocalizeCtrl::m_invert [protected]

Definition at line 56 of file localctl.h.

BOOL CLocalizeCtrl::m_inverted [protected]

Definition at line 79 of file localctl.h.

CPoint CLocalizeCtrl::point [protected]

Definition at line 48 of file localctl.h.

The documentation for this class was generated from the following files:
  • controls/localize/localctl.h
  • controls/localize/localctl.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLocalizePropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CLocalizePropPage Class Reference

#include "localppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_LOCALIZE }

Public Member Functions

CLocalizePropPage ()

Public Attributes

BOOL | m_Invert

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual HINSTANCE | GetResourceHandle (LCID lcid)
virtual void | OnFinalRelease ()
virtual void | OnSetPageSite ()

Protected Attributes

HINSTANCE | hResHandle

Detailed Description

Definition at line 15 of file localppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file localppg.h.

{ IDD = IDD_PROPPAGE_LOCALIZE };

Constructor & Destructor Documentation

CLocalizePropPage::CLocalizePropPage ( )

Definition at line 66 of file localppg.cpp.

                                     :
  COlePropertyPage(IDD, IDS_LOCALIZE_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CLocalizePropPage)
  m_Invert = FALSE;
  //}}AFX_DATA_INIT

  hResHandle = NULL;
}

Member Function Documentation

void CLocalizePropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 80 of file localppg.cpp.

{
  //{{AFX_DATA_MAP(CLocalizePropPage)
  DDP_Check(pDX, IDC_CHECK1, m_Invert, _T("Invert") );
  DDX_Check(pDX, IDC_CHECK1, m_Invert);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

HINSTANCE CLocalizePropPage::GetResourceHandle ( LCID lcid ) [protected, virtual]

Definition at line 148 of file localppg.cpp.

{
  LPCTSTR lpszResModule = NULL;
  HINSTANCE hResHandle = NULL;

  // Use lcid to determine module that contains resources
  LANGID langID = LANGIDFROMLCID(lcid);
  unsigned short priLangID = (unsigned short) PRIMARYLANGID(langID);
  switch (priLangID)
  {
    case LANG_ENGLISH:
      break;
    case LANG_FRENCH:
      #ifdef _WIN32
        lpszResModule = (LPCTSTR)_T("lresfr32.dll");
      #else
        lpszResModule = (LPCTSTR)_T("locresfr.dll");
      #endif
      break;
    case LANG_GERMAN:
      #ifdef _WIN32
        lpszResModule = (LPCTSTR)_T("lresde32.dll");
      #else
        lpszResModule = (LPCTSTR)_T("locresde.dll");
      #endif
      break;
    case 0:
    default:
       break;
  }

  // Load resource module
  if (lpszResModule != NULL)
    hResHandle = LoadLibrary(lpszResModule);

  return hResHandle;
}

void CLocalizePropPage::OnFinalRelease ( ) [protected, virtual]

Definition at line 132 of file localppg.cpp.

{
  if (hResHandle != NULL)
  {
    FreeLibrary(hResHandle);
    hResHandle = NULL;
  }

  COlePropertyPage::OnFinalRelease();
}

void CLocalizePropPage::OnSetPageSite ( ) [protected, virtual]

Definition at line 94 of file localppg.cpp.

{
  BOOL bError = FALSE;
  LCID lcid = 0;

  LPPROPERTYPAGESITE pSite = GetPageSite();
  if (pSite != NULL)
    pSite->GetLocaleID(&lcid);

  // Get the handle of the resource module
  hResHandle = GetResourceHandle(lcid);

  #ifdef _WIN32
    if (!hResHandle)
    bError = TRUE;
  #else
    if (hResHandle <= HINSTANCE_ERROR)
    bError = TRUE;
  #endif

  if (!bError)
  {
    // Use resources from resource module
    HINSTANCE hResPrev = AfxGetResourceHandle();
    AfxSetResourceHandle(hResHandle);
    COlePropertyPage::OnSetPageSite();
    AfxSetResourceHandle(hResPrev);
  }
  else
    // Use resources from control module
    COlePropertyPage::OnSetPageSite();
}

Member Data Documentation

HINSTANCE CLocalizePropPage::hResHandle [protected]

Definition at line 46 of file localppg.h.

BOOL CLocalizePropPage::m_Invert

Definition at line 27 of file localppg.h.

The documentation for this class was generated from the following files:
  • controls/localize/localppg.h
  • controls/localize/localppg.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

CLog Class Reference

#include "Log.H"

Inherited by CDebugLog, CFileLog, CNullLog, and COutputWindowLog.

List of all members.

Public Member Functions

CLog ()
~CLog ()
CLog & | operator<< (int n)
CLog & | operator<< (COleVariant &var)
virtual CLog & | operator<< (LPCTSTR pszString)

Private Member Functions

DECLARE_DYNAMIC (CLog)

Detailed Description

Definition at line 12 of file Log.H.

Constructor & Destructor Documentation

CLog::CLog ( )

Definition at line 22 of file Log.Cpp.

{
}

CLog::~CLog ( )

Definition at line 26 of file Log.Cpp.

{
}

Member Function Documentation

CLog::DECLARE_DYNAMIC ( CLog ) [private]
virtual CLog& CLog::operator<< ( LPCTSTR pszString ) [virtual]

Reimplemented in CNullLog, CDebugLog, CFileLog, and COutputWindowLog.

CLog & CLog::operator<< ( int n )

Definition at line 52 of file Log.Cpp.

{
   CString str;

   str.Format( _T( "%d" ), n );

   (*this)<<str;

   return( *this );
}

CLog & CLog::operator<< ( COleVariant & var )

Definition at line 30 of file Log.Cpp.

{
   COleVariant varString;
   CString str;

   try
   {
    varString.ChangeType( VT_BSTR, var );
    str = varString.bstrVal;
   }
   catch( CException* pException )
   {
    str = _T( "??????" );

   pException->Delete();
   }

   (*this)<<str;

   return( *this );
}

The documentation for this class was generated from the following files:
  • ole/TstCon/Log.H
  • ole/TstCon/Log.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLoggingDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CLoggingDlg Class Reference

#include "LogDg.H"

List of all members.

Public Types

enum | { IDD = IDD_LOGGING }

Public Member Functions

CLoggingDlg (CWnd *pParent=NULL)

Public Attributes

CButton | m_butFileNameBrowse
CEdit | m_eboxFileName
int | m_iLogType
CString | m_strFileName

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnFileNameBrowse ()
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()
afx_msg void | OnLogToDebug ()
afx_msg void | OnLogToFile ()
afx_msg void | OnLogToNull ()
afx_msg void | OnLogToOutput ()

Detailed Description

Definition at line 22 of file LogDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file LogDg.H.

{ IDD = IDD_LOGGING };

Constructor & Destructor Documentation

CLoggingDlg::CLoggingDlg ( CWnd * pParent = NULL )

Definition at line 24 of file LogDg.Cpp.

  : CDialog(CLoggingDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CLoggingDlg)
  m_strFileName = _T("");
  m_iLogType = -1;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CLoggingDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file LogDg.Cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CLoggingDlg)
  DDX_Control(pDX, IDC_FILENAME_BROWSE, m_butFileNameBrowse);
  DDX_Control(pDX, IDC_FILENAME, m_eboxFileName);
  DDX_Text(pDX, IDC_FILENAME, m_strFileName);
  DDX_Radio(pDX, IDC_LOGTONULL, m_iLogType);
  //}}AFX_DATA_MAP
}

void CLoggingDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 132 of file LogDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

void CLoggingDlg::OnFileNameBrowse ( ) [protected]

Definition at line 84 of file LogDg.Cpp.

{
   int nResult;

   CFileDialog dlg( FALSE, _T( "Log" ) );

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   m_strFileName = dlg.GetPathName();
   m_eboxFileName.SetWindowText( m_strFileName );
}

BOOL CLoggingDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 124 of file LogDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CLoggingDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 61 of file LogDg.Cpp.

{
  CDialog::OnInitDialog();

   m_eboxFileName.EnableWindow( m_iLogType == 3 );
   m_butFileNameBrowse.EnableWindow( m_iLogType == 3 );

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

void CLoggingDlg::OnLogToDebug ( ) [protected]

Definition at line 72 of file LogDg.Cpp.

{
   m_eboxFileName.EnableWindow( FALSE );
   m_butFileNameBrowse.EnableWindow( FALSE );
}

void CLoggingDlg::OnLogToFile ( ) [protected]

Definition at line 78 of file LogDg.Cpp.

{
   m_eboxFileName.EnableWindow( TRUE );
   m_butFileNameBrowse.EnableWindow( TRUE );
}

void CLoggingDlg::OnLogToNull ( ) [protected]

Definition at line 100 of file LogDg.Cpp.

{
   m_eboxFileName.EnableWindow( FALSE );
   m_butFileNameBrowse.EnableWindow( FALSE );
}

void CLoggingDlg::OnLogToOutput ( ) [protected]

Definition at line 106 of file LogDg.Cpp.

{
   m_eboxFileName.EnableWindow( FALSE );
   m_butFileNameBrowse.EnableWindow( FALSE );
}

Member Data Documentation

CButton CLoggingDlg::m_butFileNameBrowse

Definition at line 31 of file LogDg.H.

CEdit CLoggingDlg::m_eboxFileName

Definition at line 32 of file LogDg.H.

int CLoggingDlg::m_iLogType

Definition at line 34 of file LogDg.H.

CString CLoggingDlg::m_strFileName

Definition at line 33 of file LogDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/LogDg.H
  • ole/TstCon/LogDg.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CLunchPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CLunchPage Class Reference

#include "LunchPg.h"

List of all members.

Public Types

enum | { IDD = IDD_LUNCH }

Public Member Functions

CLunchPage ()
~CLunchPage ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 15 of file LunchPg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file LunchPg.h.

{ IDD = IDD_LUNCH };

Constructor & Destructor Documentation

CLunchPage::CLunchPage ( )

Definition at line 27 of file LunchPg.cpp.

                       : CPropertyPage(CLunchPage::IDD)
{
  //{{AFX_DATA_INIT(CLunchPage)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

CLunchPage::~CLunchPage ( )

Definition at line 34 of file LunchPg.cpp.

{
}

Member Function Documentation

void CLunchPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 38 of file LunchPg.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CLunchPage)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

BOOL CLunchPage::OnInitDialog ( ) [protected, virtual]

Definition at line 55 of file LunchPg.cpp.

{
  CPropertyPage::OnInitDialog();

  CButton* pBevButton;
  pBevButton = (CButton*) GetDlgItem(IDC_SODA);
  pBevButton->SetCheck(1);

  CButton* pFoodButton;
  pFoodButton = (CButton*) GetDlgItem(IDC_GREASY);
  pFoodButton->SetCheck(1);

  CButton* pMagButton;
  pMagButton = (CButton*) GetDlgItem(IDC_TABLOID);
  pMagButton->SetCheck(1);

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

The documentation for this class was generated from the following files:
  • general/snapvw/LunchPg.h
  • general/snapvw/LunchPg.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMacroComboBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMacroComboBox Class Reference

#include "MacroCB.H"

List of all members.

Public Member Functions

CMacroComboBox ()
virtual | ~CMacroComboBox ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

void | AddMRUEntry (LPCTSTR pszMacroName)

Detailed Description

Definition at line 24 of file MacroCB.H.

Constructor & Destructor Documentation

CMacroComboBox::CMacroComboBox ( )

Definition at line 25 of file MacroCB.Cpp.

{
}

CMacroComboBox::~CMacroComboBox ( ) [virtual]

Definition at line 29 of file MacroCB.Cpp.

{
}

Member Function Documentation

void CMacroComboBox::AddMRUEntry ( LPCTSTR pszMacroName ) [protected]

Definition at line 33 of file MacroCB.Cpp.

{
   int iString;

   iString = FindStringExact( -1, pszMacroName );
   if( iString != CB_ERR )
   {
    DeleteString( iString );
   }

   ASSERT( GetCount() <= MACROCOMBOBOX_MRUSIZE );
   if( GetCount() == MACROCOMBOBOX_MRUSIZE )
   {
    DeleteString( MACROCOMBOBOX_MRUSIZE-1 );
   }

   InsertString( 0, pszMacroName );
}

BOOL CMacroComboBox::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 60 of file MacroCB.Cpp.

{
   CString strMacroName;

   if( pMsg->message == WM_KEYDOWN )
   {
    if( pMsg->wParam == VK_RETURN )
    {
     if( (pMsg->lParam&0x04000000) == 0 )
     {
      if( GetWindowTextLength() > 0 )
      {
         GetWindowText( strMacroName );
         AddMRUEntry( strMacroName );

         SetCurSel( 0 );
         GetOwner()->SendMessage( WM_COMMAND, MAKELONG( ID_RUNMACRO, 0 ),
          LPARAM( m_hWnd ) );
      }
     }

     return( TRUE );
    }
   }

  return( CComboBox::PreTranslateMessage( pMsg ) );
}

The documentation for this class was generated from the following files:
  • ole/TstCon/MacroCB.H
  • ole/TstCon/MacroCB.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMacroDialogBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CMacroDialogBar Class Reference

#include "MacroDB.H"

List of all members.

Public Member Functions

BOOL | Create (CWnd *pParent, UINT nStyle, UINT nID)

Protected Member Functions

CSize | CalcFixedLayout (BOOL tStretch, BOOL tHorz)

Protected Attributes

CMacroComboBox m_cboxMacroName

Detailed Description

Definition at line 10 of file MacroDB.H.

Member Function Documentation

CSize CMacroDialogBar::CalcFixedLayout | ( | BOOL | tStretch,
 |  | BOOL | tHorz |
 | ) |  |  | [protected]

Definition at line 25 of file MacroDB.Cpp.

{
   CSize size;

   size = CDialogBar::CalcFixedLayout( tStretch, tHorz );

   size.cy = 23;

   return( size );
}

BOOL CMacroDialogBar::Create | ( | CWnd * | pParent,
 |  | UINT | nStyle,
 |  | UINT | nID
 | ) |  |

Definition at line 36 of file MacroDB.Cpp.

{
   HWND hControl;

   if( !CDialogBar::Create( pParent, IDD_MACROBAR, nStyle, nID ) )
   {
    return( FALSE );
   }

   hControl = NULL;
   GetDlgItem( IDC_MACRO, &hControl );
   ASSERT( hControl != NULL );

   if( !m_cboxMacroName.SubclassWindow( hControl ) )
   {
    ASSERT( FALSE );
   }

   return( TRUE );
}

Member Data Documentation

CMacroComboBox CMacroDialogBar::m_cboxMacroName [protected]

Definition at line 22 of file MacroDB.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/MacroDB.H
  • ole/TstCon/MacroDB.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMacroDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CMacroDlg Class Reference

#include "MacroDg.H"

List of all members.

Public Types

enum | { IDD = IDD_MACRO }

Public Member Functions

CMacroDlg (CWnd *pParent=NULL)

Public Attributes

CButton | m_butRun
CListBox | m_lbMacros
CScript * m_pScript
CScriptManager * m_pScriptManager
CString | m_strMacroName

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()
afx_msg void | OnOpenFile ()
void | UpdateMacroList ()

Detailed Description

Definition at line 25 of file MacroDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 34 of file MacroDg.H.

{ IDD = IDD_MACRO };

Constructor & Destructor Documentation

CMacroDlg::CMacroDlg ( CWnd * pParent = NULL )

Definition at line 23 of file MacroDg.Cpp.

                                    :
   CDialog( CMacroDlg::IDD, pParent ),
   m_pScriptManager( NULL ),
   m_pScript( NULL )
{
  //{{AFX_DATA_INIT(CMacroDlg)
  m_strMacroName = _T("");
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CMacroDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file MacroDg.Cpp.

{
   int iItem;

  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMacroDlg)
  DDX_Control(pDX, IDOK, m_butRun);
  DDX_Control(pDX, IDC_MACROS, m_lbMacros);
  DDX_LBString(pDX, IDC_MACROS, m_strMacroName);
  //}}AFX_DATA_MAP

   if( pDX->m_bSaveAndValidate )
   {
    iItem = m_lbMacros.GetCurSel();
    if( iItem == LB_ERR )
    {
     m_pScript = NULL;
    }
    else
    {
     m_pScript = (CScript*)m_lbMacros.GetItemDataPtr( iItem );
     ASSERT( m_pScript != NULL );
    }
   }
}

void CMacroDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 166 of file MacroDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CMacroDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 158 of file MacroDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CMacroDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 72 of file MacroDg.Cpp.

{
  CDialog::OnInitDialog();

   UpdateMacroList();

  return( TRUE );
}

void CMacroDlg::OnOpenFile ( ) [protected]

Definition at line 81 of file MacroDg.Cpp.

{
   int nResult;
   HRESULT hResult;

   CString strFilter;
   LOAD_STRING_FROM_RESOURCE(strFilter, IDS_SCRIPT_FILES);
   CFileDialog dlg( TRUE, _T( "dsm" ), NULL, OFN_HIDEREADONLY|
    OFN_OVERWRITEPROMPT, strFilter );

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   hResult = m_pScriptManager->LoadScript( dlg.GetPathName(),
    dlg.GetFileTitle() );
   if( FAILED( hResult ) )
   {
    CString strErrorMessage;
    _com_error error( hResult );

    AfxFormatString2( strErrorMessage, IDS_ERRORLOADINGSCRIPT,
     dlg.GetFileTitle(), error.ErrorMessage() );
    AfxMessageBox( strErrorMessage );
    return;
   }

   UpdateMacroList();
}

void CMacroDlg::UpdateMacroList ( ) [protected]

Definition at line 113 of file MacroDg.Cpp.

{
   POSITION posMacro;
   POSITION posScript;
   CScript* pScript;
   CString strMacroName;
   int iItem;

   m_lbMacros.ResetContent();

   posScript = m_pScriptManager->GetFirstScriptPosition();
   while( posScript != NULL )
   {
    pScript = m_pScriptManager->GetNextScript( posScript );
    ENSURE( pScript != NULL );

    posMacro = pScript->GetFirstMacroPosition();
    while( posMacro != NULL )
    {
     strMacroName = pScript->GetNextMacroName( posMacro );
     iItem = m_lbMacros.AddString( strMacroName );
     m_lbMacros.SetItemDataPtr( iItem, pScript );
    }
   }

   if( m_lbMacros.GetCount() == 0 )
   {
    m_lbMacros.SetCurSel( -1 );
    m_butRun.EnableWindow( FALSE );
   }
   else
   {
    m_lbMacros.SetCurSel( 0 );
    m_butRun.EnableWindow( TRUE );
   }
}

Member Data Documentation

CButton CMacroDlg::m_butRun

Definition at line 35 of file MacroDg.H.

CListBox CMacroDlg::m_lbMacros

Definition at line 36 of file MacroDg.H.

CScript* CMacroDlg::m_pScript

Definition at line 41 of file MacroDg.H.

CScriptManager* CMacroDlg::m_pScriptManager

Definition at line 40 of file MacroDg.H.

CString CMacroDlg::m_strMacroName

Definition at line 37 of file MacroDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/MacroDg.H
  • ole/TstCon/MacroDg.Cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMailBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CMailBar Class Reference

#include "MailBar.h"

List of all members.

Public Types

enum | { IDD = IDD_MAILBAR }

Public Member Functions

CMailBar ()

Protected Member Functions

void | AdjustWidth (int cx, UINT uiCtrlID)
virtual BOOL | AllowShowOnPaneMenu () const
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg HBRUSH | OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Detailed Description

Definition at line 15 of file MailBar.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 22 of file MailBar.h.

{ IDD = IDD_MAILBAR };

Constructor & Destructor Documentation

CMailBar::CMailBar ( )

Definition at line 23 of file MailBar.cpp.

{
}

Member Function Documentation

void CMailBar::AdjustWidth | ( | int | cx,
 |  | UINT | uiCtrlID |
 | ) |  |  | [protected]

Definition at line 41 of file MailBar.cpp.

{
  const int nMargin = 10;

  CWnd* pWnd = GetDlgItem(uiCtrlID);
  if (pWnd == NULL)
  {
    return;
  }

  CRect rect;
  pWnd->GetWindowRect(rect);
  ScreenToClient(rect);

  rect.right = cx - nMargin;

  pWnd->SetWindowPos(NULL, -1, -1, rect.Width(), rect.Height(), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
}

virtual BOOL CMailBar::AllowShowOnPaneMenu ( ) const [inline, protected, virtual]

Definition at line 28 of file MailBar.h.

  {
    return FALSE;
  }

void CMailBar::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 27 of file MailBar.cpp.

{
  CPaneDialog::DoDataExchange(pDX);
}

HBRUSH CMailBar::OnCtlColor | ( | CDC * | pDC,
 |  | CWnd * | pWnd,
 |  | UINT | nCtlColor |
 | ) |  |  | [protected]

Definition at line 80 of file MailBar.cpp.

{
#define MAX_CLASS_NAME 255
#define STATIC_CLASS _T("Static")
#define BUTTON_CLASS _T("Button")

  if (nCtlColor == CTLCOLOR_STATIC || nCtlColor == CTLCOLOR_BTN)
  {
    TCHAR lpszClassName [MAX_CLASS_NAME + 1];

    ::GetClassName(pWnd->GetSafeHwnd(), lpszClassName, MAX_CLASS_NAME);
    CString strClass = lpszClassName;

    if (strClass == STATIC_CLASS || strClass == BUTTON_CLASS)
    {
      pDC->SetBkMode(TRANSPARENT);
      return(HBRUSH) ::GetStockObject(HOLLOW_BRUSH);
    }
  }

  return CPaneDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}

BOOL CMailBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 70 of file MailBar.cpp.

{
  CRect rectClient;
  GetClientRect(rectClient);

  CMFCVisualManager::GetInstance()->OnFillBarBackground(pDC, this, rectClient, rectClient);

  return TRUE;
}

void CMailBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 60 of file MailBar.cpp.

{
  CPaneDialog::OnSize(nType, cx, cy);

  AdjustWidth(cx, IDC_MAIL_TO_NAME);
  AdjustWidth(cx, IDC_MAIL_CC_NAME);
  AdjustWidth(cx, IDC_MAIL_SUBJECT_NAME);

}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/MailBar.h
  • vc2008fp/OutlookDemo/MailBar.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMailFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

CMailFrame Class Reference

#include "MailFrame.h"

List of all members.

Public Member Functions

CMailFrame ()
virtual | ~CMailFrame ()
virtual BOOL | LoadFrame (UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL)

Static Public Member Functions

static void | OnChangeLook ()

Protected Member Functions

afx_msg void | OnActivate (UINT nState, CWnd *pWndOther, BOOL bMinimized)
afx_msg void | OnClose ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnEnable (BOOL bEnable)
afx_msg void | OnMailClose ()
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg void | OnViewCustomize ()

Protected Attributes

CWnd * | m_pMainWnd
CMailBar m_wndMailBar
CMFCMenuBar | m_wndMenuBar
CMFCStatusBar | m_wndStatusBar
CMFCToolBar | m_wndToolBar

Static Protected Attributes

static CObList | m_lstMailFrames

Detailed Description

Definition at line 17 of file MailFrame.h.

Constructor & Destructor Documentation

CMailFrame::CMailFrame ( )

Definition at line 35 of file MailFrame.cpp.

{
  m_wndMenuBar.m_bClearHashOnClose = TRUE;
}

CMailFrame::~CMailFrame ( ) [virtual]

Definition at line 40 of file MailFrame.cpp.

{
}

Member Function Documentation

BOOL CMailFrame::LoadFrame | ( | UINT | nIDResource,
 |  | DWORD | dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE,
 |  | CWnd * | pParentWnd = NULL,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]

Definition at line 174 of file MailFrame.cpp.

{
  BOOL bRes = CFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext);
  if (bRes)
  {
    InitialUpdateFrame(pContext->m_pCurrentDoc, TRUE);
  }

  theApp.SetActiveFrame(COutlookDemoApp::MailFrame);
  return bRes;
}

void CMailFrame::OnActivate | ( | UINT | nState,
 |  | CWnd * | pWndOther,
 |  | BOOL | bMinimized |
 | ) |  |  | [protected]

Definition at line 143 of file MailFrame.cpp.

{
  CFrameWndEx::OnActivate(nState, pWndOther, bMinimized);

  if (nState != WA_INACTIVE)
  {
    theApp.SetActiveFrame(COutlookDemoApp::MailFrame);
    theApp.m_pMainWnd = this;
  }
}

void CMailFrame::OnChangeLook ( ) [static]

Definition at line 191 of file MailFrame.cpp.

{
  BOOL bIsLook2003 = CMFCVisualManager::GetInstance()->IsKindOf(RUNTIME_CLASS(CMFCVisualManagerOffice2003));

  CWindowDC dc(NULL);
  int nBitsPerPixel = dc.GetDeviceCaps(BITSPIXEL);

  BOOL bIsHiColor = bIsLook2003 && nBitsPerPixel > 16;

  for (POSITION pos = m_lstMailFrames.GetHeadPosition(); pos != NULL;)
  {
    CMailFrame* pFrame = (CMailFrame*) m_lstMailFrames.GetNext(pos);
    ASSERT_VALID(pFrame);

    pFrame->m_wndToolBar.LoadBitmap(bIsHiColor ? IDB_MAIL_HC : IDR_MAILFRAME);
    pFrame->RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
  }
}

void CMailFrame::OnClose ( ) [protected]

Definition at line 161 of file MailFrame.cpp.

{
  theApp.m_pMainWnd = m_pMainWnd;

  POSITION pos = m_lstMailFrames.Find(this);
  if (pos != NULL)
  {
    m_lstMailFrames.RemoveAt(pos);
  }

  CFrameWndEx::OnClose();
}

int CMailFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 57 of file MailFrame.cpp.

{
  m_lstMailFrames.AddTail(this);

  m_pMainWnd = theApp.m_pMainWnd;

  if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
    return -1;

  BOOL bIsLook2003 = CMFCVisualManager::GetInstance()->IsKindOf(RUNTIME_CLASS(CMFCVisualManagerOffice2003));

  CWindowDC dc(NULL);
  int nBitsPerPixel = dc.GetDeviceCaps(BITSPIXEL);

  BOOL bHiColorToolbarIcons = bIsLook2003 && nBitsPerPixel > 16;

  // Create menu bar:
  if (!m_wndMenuBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, ID_MAIL_MENU))
  {
    TRACE0("Failed to create menubar\n");
    return -1;      // fail to create
  }

  m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);

  // Create main toolbar:
  if (!m_wndToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP
    | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, ID_VIEW_MAIL_TOOLBAR) || !m_wndToolBar.LoadToolBar(IDR_MAILFRAME, 0, 0, FALSE, 0, 0, bHiColorToolbarIcons ? IDB_MAIL_HC : 0))
  {
    TRACE0("Failed to create toolbar\n");
    return -1;      // fail to create
  }

  BOOL bValidString;
  CString strMainToolbarTitle;
  bValidString = strMainToolbarTitle.LoadString(IDS_MAIN_TOOLBAR);
  m_wndToolBar.SetWindowText(strMainToolbarTitle);

  // Create status bar:
  if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
  {
    TRACE0("Failed to create status bar\n");
    return -1;      // fail to create
  }

  m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
  m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);

  EnableDocking(CBRS_ALIGN_ANY);

  DockPane(&m_wndMenuBar);
  DockPane(&m_wndToolBar);

  // Create mail bar:
  if (!m_wndMailBar.Create(_T(""), this, FALSE, MAKEINTRESOURCE(IDD_MAILBAR), WS_VISIBLE | WS_CHILD | CBRS_TOP, ID_MAIL_BAR, AFX_CBRS_REGULAR_TABS, 0))
  {
    TRACE0("Failed to create mail bar\n");
    return -1;      // fail to create
  }

  DockPane(&m_wndMailBar);

  CRect rect;
  m_wndMailBar.GetWindowRect(rect);
  m_wndMailBar.SetMinSize(rect.Size());

  // Enable customization button fore all toolbars:
  m_wndToolBar.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, IDS_CUSTOMIZE);

  // Enable conttol bar context menu(list of bars + customize command):
  EnablePaneMenu( TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."), ID_VIEW_TOOLBARS);
  return 0;
}

void CMailFrame::OnEnable ( BOOL bEnable ) [protected]

Definition at line 210 of file MailFrame.cpp.

{
  CWnd* pWnd = GetNextWindow();
  while (pWnd != NULL)
  {
    if (pWnd->IsKindOf(RUNTIME_CLASS(CFrameWndEx)))
    {
      pWnd->EnableWindow(bEnable);
    }
    pWnd = pWnd->GetNextWindow();
  }
}

void CMailFrame::OnMailClose ( ) [protected]

Definition at line 186 of file MailFrame.cpp.

{
  SendMessage(WM_CLOSE);
}

LRESULT CMailFrame::OnToolbarReset | ( | WPARAM | wp,
 |  | LPARAM |  |
 | ) |  |  | [protected]

Definition at line 131 of file MailFrame.cpp.

{
  UINT uiToolBarId = (UINT) wp;
  if (uiToolBarId == IDR_MAILFRAME)
  {
    m_wndToolBar.SetToolBarBtnText(m_wndToolBar.CommandToIndex(ID_MAIL_SEND));
    m_wndToolBar.SetToolBarBtnText(m_wndToolBar.CommandToIndex(ID_MAIL_OPTIONS));
  }

  return 0;
}

void CMailFrame::OnViewCustomize ( ) [protected]

Definition at line 154 of file MailFrame.cpp.

{
  // Create a customize toolbars dialog:
  CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog(this, TRUE /* Automatic menus scaning */);
  pDlgCust->Create();
}

Member Data Documentation

CObList CMailFrame::m_lstMailFrames [static, protected]

Definition at line 33 of file MailFrame.h.

CWnd* CMailFrame::m_pMainWnd [protected]

Definition at line 31 of file MailFrame.h.

CMailBar CMailFrame::m_wndMailBar [protected]

Definition at line 29 of file MailFrame.h.

CMFCMenuBar CMailFrame::m_wndMenuBar [protected]

Definition at line 27 of file MailFrame.h.

CMFCStatusBar CMailFrame::m_wndStatusBar [protected]

Definition at line 30 of file MailFrame.h.

CMFCToolBar CMailFrame::m_wndToolBar [protected]

Definition at line 28 of file MailFrame.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/MailFrame.h
  • vc2008fp/OutlookDemo/MailFrame.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMailView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CMailView Class Reference

#include "MailView.h"

List of all members.

Public Member Functions

virtual void | OnInitialUpdate ()

Public Attributes

int | m_nPriority

Protected Member Functions

CMailView ()
virtual | ~CMailView ()
afx_msg void | OnMailAttachment ()
afx_msg void | OnMailCc ()
afx_msg void | OnMailCheckNames ()
afx_msg void | OnMailCopyToFolder ()
afx_msg void | OnMailDelete ()
afx_msg void | OnMailFlag ()
afx_msg void | OnMailFontsize ()
afx_msg void | OnMailHightPriority ()
afx_msg void | OnMailItem ()
afx_msg void | OnMailLowPriority ()
afx_msg void | OnMailMoveToFolder ()
afx_msg void | OnMailOptions ()
afx_msg void | OnMailProperties ()
afx_msg void | OnMailSave ()
afx_msg void | OnMailSaveAttachments ()
afx_msg void | OnMailSaveStationery ()
afx_msg void | OnMailSend ()
afx_msg void | OnMailSignature ()
afx_msg void | OnMailSpell ()
afx_msg void | OnMailTo ()
afx_msg void | OnUpdateMailHightPriority (CCmdUI *pCmdUI)
afx_msg void | OnUpdateMailLowPriority (CCmdUI *pCmdUI)

Detailed Description

Definition at line 15 of file MailView.h.

Constructor & Destructor Documentation

CMailView::CMailView ( ) [protected]

Definition at line 25 of file MailView.cpp.

{
  m_nPriority = 1;
}

CMailView::~CMailView ( ) [protected, virtual]

Definition at line 30 of file MailView.cpp.

{
}

Member Function Documentation

void CMailView::OnInitialUpdate ( ) [virtual]

Definition at line 185 of file MailView.cpp.

{
  CEditView::OnInitialUpdate();
  GetEditCtrl().ModifyStyle(0, WS_BORDER);
}

void CMailView::OnMailAttachment ( ) [protected]

Definition at line 85 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailCc ( ) [protected]

Definition at line 81 of file MailView.cpp.

{
}

void CMailView::OnMailCheckNames ( ) [protected]

Definition at line 90 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailCopyToFolder ( ) [protected]

Definition at line 95 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailDelete ( ) [protected]

Definition at line 100 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailFlag ( ) [protected]

Definition at line 105 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailFontsize ( ) [protected]

Definition at line 110 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailHightPriority ( ) [protected]

Definition at line 115 of file MailView.cpp.

{
  m_nPriority = m_nPriority == 2 ? 1 : 2;
}

void CMailView::OnMailItem ( ) [protected]

Definition at line 125 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailLowPriority ( ) [protected]

Definition at line 130 of file MailView.cpp.

{
  m_nPriority = m_nPriority == 0 ? 1 : 0;
}

void CMailView::OnMailMoveToFolder ( ) [protected]

Definition at line 140 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailOptions ( ) [protected]

Definition at line 145 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailProperties ( ) [protected]

Definition at line 150 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailSave ( ) [protected]

Definition at line 155 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailSaveAttachments ( ) [protected]

Definition at line 160 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailSaveStationery ( ) [protected]

Definition at line 165 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailSend ( ) [protected]

Definition at line 170 of file MailView.cpp.

{
  GetParentFrame()->SendMessage(WM_CLOSE);
}

void CMailView::OnMailSignature ( ) [protected]

Definition at line 175 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailSpell ( ) [protected]

Definition at line 180 of file MailView.cpp.

{
  // TODO: Add your command handler code here
}

void CMailView::OnMailTo ( ) [protected]

Definition at line 77 of file MailView.cpp.

{
}

void CMailView::OnUpdateMailHightPriority ( CCmdUI * pCmdUI ) [protected]

Definition at line 120 of file MailView.cpp.

{
  pCmdUI->SetCheck(m_nPriority == 2);
}

void CMailView::OnUpdateMailLowPriority ( CCmdUI * pCmdUI ) [protected]

Definition at line 135 of file MailView.cpp.

{
  pCmdUI->SetCheck(m_nPriority == 0);
}

Member Data Documentation

int CMailView::m_nPriority

Definition at line 23 of file MailView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/MailView.h
  • vc2008fp/OutlookDemo/MailView.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMainDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CMainDlg Class Reference

#include "modeldlg.h"

List of all members.

Public Types

enum | { IDD = IDD_MAIN_DIALOG }

Public Member Functions

CMainDlg (CWnd *pParent=NULL)
void | BoxDone ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
virtual void | OnOK ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

HICON | m_hIcon
CAdderDialog * m_pModeless

Detailed Description

Definition at line 16 of file modeldlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file modeldlg.h.

{ IDD = IDD_MAIN_DIALOG };

Constructor & Destructor Documentation

CMainDlg::CMainDlg ( CWnd * pParent = NULL )

Definition at line 66 of file modeldlg.cpp.

  : CDialog(CMainDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CMainDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  m_pModeless = NULL;
}

Member Function Documentation

void CMainDlg::BoxDone ( )

Definition at line 185 of file modeldlg.cpp.

{
  // this function is called by the modeless dialog as it terminates
  // just reset our pushbutton to be enabled again.
  // I _don't_ delete the MFC CDialog object because the dialog's own
  // code will do that.

  m_pModeless = NULL;
  // don't delete m_pModeless; !
  GetDlgItem(IDOK)->EnableWindow();
}

void CMainDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 77 of file modeldlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMainDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

BOOL CMainDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 96 of file modeldlg.cpp.

{
  CDialog::OnInitDialog(  );

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  CString strAboutMenu;
  strAboutMenu.LoadString(IDS_ABOUTBOX);
  if (!strAboutMenu.IsEmpty())
  {
    pSysMenu->AppendMenu(MF_SEPARATOR);
    pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  }

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CMainDlg::OnOK ( ) [protected, virtual]

Definition at line 169 of file modeldlg.cpp.

{
  // if our modeless child isn't already up, create it and display it
  // otherwise, just set focus to it

  if (m_pModeless == NULL)
  {
    m_pModeless = new CAdderDialog(this);
    if (m_pModeless->Create() == TRUE)
      GetDlgItem(IDOK)->EnableWindow(FALSE);
  }
  else
    m_pModeless->SetActiveWindow();
}

void CMainDlg::OnPaint ( ) [protected]

Definition at line 137 of file modeldlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CMainDlg::OnQueryDragIcon ( ) [protected]

Definition at line 164 of file modeldlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CMainDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 120 of file modeldlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDialog::OnSysCommand(nID, lParam);
  }
}

Member Data Documentation

HICON CMainDlg::m_hIcon [protected]

Definition at line 38 of file modeldlg.h.

CAdderDialog* CMainDlg::m_pModeless [protected]

Definition at line 39 of file modeldlg.h.

The documentation for this class was generated from the following files:
  • general/modeless/modeldlg.h
  • general/modeless/modeldlg.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMainDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions

CMainDoc Class Reference

#include "maindoc.h"

List of all members.

Public Member Functions

virtual | ~CMainDoc ()
virtual | ~CMainDoc ()
void | AdjustItemPosition (CRectItem *pItem)
CRectItem * CreateItem ()
void | DeleteItem (CRectItem *pItem)
CSize & | GetDocumentSize ()
virtual void | OnShowViews (BOOL bVisible)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)

Public Attributes

BOOL | m_bNeedUpdate
COLORREF | m_colorData
CSize | m_sizeDoc
CString | m_strData

Static Public Attributes

static CLIPFORMAT | m_cfPrivate = NULL

Protected Member Functions

CMainDoc ()
CMainDoc ()
afx_msg void | OnChangeData ()
afx_msg void | OnEditClearAll ()
virtual BOOL | OnNewDocument ()
afx_msg void | OnUpdateEditClearAll (CCmdUI *pCmdUI)

Detailed Description

Definition at line 12 of file maindoc.h.

Constructor & Destructor Documentation

CMainDoc::CMainDoc ( ) [protected]

Definition at line 36 of file maindoc.cpp.

{
}

CMainDoc::~CMainDoc ( ) [virtual]

Definition at line 40 of file maindoc.cpp.

{
}

CMainDoc::CMainDoc ( ) [protected]
virtual CMainDoc::~CMainDoc ( ) [virtual]

Member Function Documentation

void CMainDoc::AdjustItemPosition ( CRectItem * pItem )

Definition at line 158 of file maindoc.cpp.

{
  POSITION pos = GetStartPosition();
  while (pos != NULL)
  {
    CRectItem* pRectItem = (CRectItem*)GetNextItem(pos);
    ASSERT_KINDOF(CRectItem, pItem);
    if (pRectItem != pItem && pRectItem->GetRect() == pItem->GetRect())
    {
      pItem->m_ptPos.x += 10;
      pItem->m_ptPos.y -= 10;
      pos = GetStartPosition();
    }
  }
}

CRectItem * CMainDoc::CreateItem ( )

Definition at line 84 of file maindoc.cpp.

{
  return new CRectItem(this); // does 'AddItem' automatically
}

void CMainDoc::DeleteItem ( CRectItem * pItem )

Definition at line 90 of file maindoc.cpp.

{
  ASSERT(pItem->GetDocument() == this);

  SetModifiedFlag();
  UpdateAllViews(NULL, 1, pItem); // pItem will be deleted
  pItem->Delete();    // does a 'RemoveItem' & 'delete this' automatically
}

CSize & CMainDoc::GetDocumentSize ( )

Definition at line 63 of file maindoc.cpp.

{
  return m_sizeDoc;
}

void CMainDoc::OnChangeData ( ) [protected]

Definition at line 64 of file maindoc.cpp.

{
  CEnterDlg dlg;
  dlg.m_strInput = m_strData;
  if (dlg.DoModal() != IDOK)
    return;
  m_strData = dlg.m_strInput;
  // if this document stored data then we would call SetModifiedFlag here
  UpdateAllViews(NULL);   // general update
}

void CMainDoc::OnEditClearAll ( ) [protected]

Definition at line 135 of file maindoc.cpp.

{
  // delete all items in the document (also removes sub-storages)
  POSITION pos = GetStartPosition();
  while (pos != NULL)
  {
    CRectItem* pItem = (CRectItem*)GetNextItem(pos);
    ASSERT_KINDOF(CRectItem, pItem);
    pItem->Delete();
  }

  // everything is gone now!
  SetModifiedFlag();
  UpdateAllViews(NULL);
}

BOOL CMainDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 44 of file maindoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;
  m_strData = "Sample Data String";
  m_colorData = RGB(0, 0, 0);
  return TRUE;
}

void CMainDoc::OnShowViews ( BOOL bVisible ) [virtual]

Definition at line 68 of file maindoc.cpp.

{
  COleLinkingDoc::OnShowViews(bVisible);

  if (bVisible && m_bNeedUpdate)
  {
    // update embedded links in this document before showing the window
    COleUpdateDialog dlg(this);
    dlg.DoModal();
    m_bNeedUpdate = FALSE;
  }
}

void CMainDoc::OnUpdateEditClearAll ( CCmdUI * pCmdUI ) [protected]

Definition at line 152 of file maindoc.cpp.

{
  // Enable ClearAll if there is anything to clear
  pCmdUI->Enable(GetStartPosition() != NULL);
}

virtual void CMainDoc::Serialize ( CArchive & ar ) [virtual]
void CMainDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 56 of file maindoc.cpp.

{
  ASSERT(FALSE);      // this example program does not store data
}

Member Data Documentation

BOOL CMainDoc::m_bNeedUpdate

Definition at line 26 of file maindoc.h.

CLIPFORMAT CMainDoc::m_cfPrivate = NULL [static]

Definition at line 23 of file maindoc.h.

COLORREF CMainDoc::m_colorData

Definition at line 22 of file maindoc.h.

CSize CMainDoc::m_sizeDoc

Definition at line 24 of file maindoc.h.

CString CMainDoc::m_strData

Definition at line 21 of file maindoc.h.

The documentation for this class was generated from the following files:
  • general/viewex/maindoc.h
  • ole/oclient/maindoc.h
  • general/viewex/maindoc.cpp
  • ole/oclient/maindoc.cpp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMainFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends

CMainFrame Class Reference

#include "mainfrm.h"

List of all members.

Classes

struct | XStyle

Public Member Functions

CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
virtual | ~CMainFrame ()
void | ActivateByTab ()
virtual void | ActivateFrame (int nCmdShow=-1)
virtual void | ActivateFrame (int nCmdShow=-1)
void | ActivateRibbonContextCategory (UINT uiCategoryID)
void | ActivateRibbonContextCategory (UINT uiCategoryID)
virtual void | AdjustClientArea ()
virtual void | AdjustDockingLayout (HDWP hdwp=NULL)
int | BuildFavoritesMenu (LPCTSTR pszPath, int nStartPos, CMenu *pMenu)
CMDIChildWndEx * | CreateDocumentWindow (LPCTSTR lpcszDocName)
BOOL | CreateEditBar ()
BOOL | CreatePaletteBar ()
BOOL | CreateStatusBar ()
BOOL | CreateStyleBar ()
BOOL | CreateToolBar ()
virtual BOOL | DestroyWindow ()
virtual BOOL | DestroyWindow ()
void | DockControlBarLeftOf (CToolBar *Bar, CToolBar *LeftOf)
COLORREF | GetColorFromColorButton (int nButtonID)
DWORD | GetCurrentView ()
CMFCBindView * GetDocView ()
CMFCShellTreeCtrl & | GetFolders ()
CComboBox * | GetFontNameCombo ()
CComboBox * | GetFontSizeCombo ()
HICON | GetIcon (int nDocType)
HICON | GetIcon (int nDocType)
CObjListView * GetObjListView ()
CMFCRibbonBar * | GetRibbonBar ()
CMFCRibbonBar * | GetRibbonBar ()
CView * | GetSourceView ()
CMFCStatusBar & | GetStatusBar ()
BOOL | GetStyleFromStyles (XStyle &style)
virtual BOOL | GetToolbarButtonToolTipText (CMFCToolBarButton *pButton, CString &strTTText)
CMFCToolBarImages * | GetTooltipImage (UINT uiID)
CChildView * GetView ()
CView * | GetWebView ()
int | GetWeightFromLineWeight (int nButtonID)
void | HideModelessPropSheet ()
void | InitialShowWindow (UINT nCmdShow)
void | InitViews ()
BOOL | IsFavoritesMenu (const CMFCToolBarMenuButton *pMenuButton)
BOOL | IsOutlookBar2003 () const
BOOL | IsPrintPreviewMode ()
virtual BOOL | LoadFrame (UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL)
virtual BOOL | LoadFrame (UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL)
virtual BOOL | LoadFrame (UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL)
virtual BOOL | LoadFrame (UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL)
virtual BOOL | LoadFrame (UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL)
void | OnBlockFmtDropdown (NMHDR *pNotifyStruct, LRESULT *result)
void | OnChangeLayout (CWnd *pWnd=NULL, BOOL bNoLoopOverPopup=FALSE)
void | OnChangeLook ()
void | OnChangeLook (BOOL bOutlookBar2003)
void | OnChangeLook (BOOL bOneNoteTabs, BOOL bMDITabColors, BOOL bIsVSDotNetLook, BOOL bDockTabColors, BOOL bMDITabsVS2005Look, BOOL bActiveTabCloseButton)
void | OnCloseFoldersPopup (BOOL bKeep)
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL | OnDrawMenuImage (CDC *pDC, const CMFCToolBarMenuButton *pMenuButton, const CRect &rectImage)
void | OnExample (UINT nCmdID)
void | OnFileConfigureScreenCapture (void)
void | OnFileScreencapture (void)
virtual BOOL | OnMenuButtonToolHitTest (CMFCToolBarButton *pButton, TOOLINFO *pTI)
virtual BOOL | OnMenuButtonToolHitTest (CMFCToolBarButton *pButton, TOOLINFO *pTI)
afx_msg void | OnMiniFramePropertySheet ()
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
void | OnUpdateExampleUI (CCmdUI *pCmdUI)
afx_msg void | OnUpdateMiniFramePropertySheet (CCmdUI *pCmdUI)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual void | RecalcLayout (BOOL bNotify=TRUE)
BOOL | SelectPalette (BOOL bBackground)
void | SetAddress (LPCTSTR lpszUrl)
void | SetAddress (LPCTSTR lpszUrl)
void | SetContainerSize (UINT nSize)
void | SetCurrFolder (LPCTSTR lpszPath)
void | SetDlgBarHeightInPixels (UINT nHeight)
void | SetDlgBarSizeInContainer (UINT nSize)
void | SetDlgBarWidthInPixels (UINT nWidth)
void | SetProgress (long nCurr, long nTotal)
void | SetRibbonContextCategory (UINT uiCategoryID)
void | SetRibbonContextCategory (UINT uiCategoryID)
void | SetWorkSpace (CWorkspaceObj *pWorkSpace)
void | StartAnimation ()
void | StartAnimation ()
void | SwapView (int nCmdId)
void | SwapView ()
void | UpdateContextTab (CDrawView *pCurrView)
void | UpdateContextTabFromObject (CDrawObjList &list)
void | UpdateMDITabs (BOOL bResetMDIChild)
void | UpdateMRUFilesList ()
void | UpdateMRUFilesList ()
void | UpdateUI (CDrawView *pCurrView)

Static Public Member Functions

static CMFCToolBarComboBoxButton * | GetFindCombo ()

Public Attributes

CStringArray | m_astrFavoriteURLs
BOOL | m_bColor
BOOL | m_bInsert
BOOL | m_bToolTips
HICON | m_hIconDoc
HICON | m_hIconText
HICON | m_hIconWrite
CMenu | m_menuFavotites
UINT m_nCurrentExample
CPalette | m_palette
CRegistryView * m_pObjectView
CObjTreeView * m_pObjTreeView
CShapePropSheetFrame * m_pShapePropFrame
CEditToolbar m_wndEditBar
CFormatBar m_wndFormatBar
CMacroDialogBar m_wndMacroBar
CRulerBar m_wndRulerBar
CSplitterWnd | m_wndSplitter
CTCSplitter m_wndSplitter
CComboToolBar m_wndToolBar
CToolBar | m_wndToolBarSpiro

Protected Member Functions

CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
CMainFrame ()
void | Add_Category1 ()
void | Add_Category2 ()
void | Add_Category3 ()
void | Add_Category4 ()
void | Add_Category5 ()
void | Add_Category6 ()
void | Add_MainPanel ()
void | Add_QAT ()
void | AddContextTab_Chart ()
void | AddContextTab_Picture ()
void | AddContextTab_Table ()
void | AddMainCategory ()
CMFCRibbonPanel * | AddPanelArrange (CMFCRibbonCategory *pCategory, UINT imageP, UINT imageS, UINT imageL)
void | AddTab_Developer ()
void | AddTab_Home ()
void | AddTab_Insert ()
void | AddTab_Mailings ()
void | AddTab_PageLayout ()
void | AddTab_References ()
void | AddTab_Review ()
void | AddTab_View ()
void | AddWorkSpace (const CString &strName, const int iIconIndex, const UINT uiCmd, CMFCOutlookBarPane &pane, const UINT uiNewCmdID, CImageList &images)
void | AdjustColorsMenu (CMFCPopupMenu *pMenuPopup, UINT uiId)
void | AdjustObjectSubmenu (CMFCPopupMenu *pMenuPopup)
BOOL | CreateCaptionBar ()
BOOL | CreateComboBox ()
BOOL | CreateDockingBars ()
void | CreateDocumentColors ()
void | CreateDocumentColors ()
void | CreateDocumentColors ()
virtual CMDIChildWndEx * | CreateDocumentWindow (LPCTSTR lpcszDocName, CObject *pObj)
virtual CMDIChildWndEx * | CreateDocumentWindow (LPCTSTR lpcszDocName, CObject *)
virtual CMDIChildWndEx * | CreateDocumentWindow (LPCTSTR lpcszDocName, CObject *)
virtual CMDIChildWndEx * | CreateDocumentWindow (LPCTSTR lpcszDocName, CObject *)
void | CreateFontsList ()
BOOL | CreateFormatBar ()
BOOL | CreateFormatBar ()
BOOL | CreateMenuBar ()
BOOL | CreateMessageBar ()
BOOL | CreateOutlookBar (CMFCOutlookBar &bar, UINT uiID, CMFCOutlookBarPane &pane1, CMFCOutlookBarPane &pane2, CShellTreeCtrl &tree, CCalendarBar &calendar, int nInitialWidth)
BOOL | CreateRibbonBar ()
BOOL | CreateRibbonBar ()
BOOL | CreateRulerBar ()
BOOL | CreateRulerBar ()
BOOL | CreateShortcutsBar ()
BOOL | CreateStatusBar ()
BOOL | CreateStatusBar ()
BOOL | CreateStatusBar ()
void | CreateStyleList ()
BOOL | CreateTaskPane ()
BOOL | CreateTaskPane ()
void | CreateThemeList ()
BOOL | CreateToolBar ()
BOOL | CreateToolBar ()
afx_msg void | DoNothing ()
int | FindFocusedOutlookWnd (CMFCOutlookBarTabCtrl **ppOutlookWnd)
CMFCOutlookBarTabCtrl * | FindOutlookParent (CWnd *pWnd)
virtual void | GetMessageString (UINT nID, CString &rMessage) const
int | GetSliderPos (UINT nID)
void | InitBulletPalette (CMFCRibbonGallery *pPalette)
void | InitMultilevelPalette (CMFCRibbonGallery *pPalette)
void | InitNumberingPalette (CMFCRibbonGallery *pPalette)
void | InitPositionPalette (CMFCRibbonGallery *pPalette)
void | InitRibbon ()
afx_msg void | OnActivate (UINT nState, CWnd *pWndOther, BOOL bMinimized)
afx_msg void | OnActivate (UINT nState, CWnd *pWndOther, BOOL bMinimized)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAppLook (UINT id)
afx_msg void | OnAskQuestion ()
afx_msg LONG_PTR | OnBarState (UINT_PTR wParam, LONG_PTR lParam)
afx_msg LRESULT | OnBarState (WPARAM wParam, LPARAM lParam)
afx_msg void | OnBounce ()
afx_msg void | OnBounce ()
afx_msg void | OnCategorie (UINT nID)
afx_msg LRESULT | OnChangeRibbonCategory (WPARAM, LPARAM)
afx_msg void | OnChangeStyle (UINT nID)
afx_msg void | OnCharColor ()
afx_msg void | OnClose ()
afx_msg void | OnClose ()
afx_msg void | OnClose ()
afx_msg void | OnClose ()
afx_msg void | OnClose ()
afx_msg void | OnClose ()
afx_msg void | OnClose ()
virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam)
virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
afx_msg void | OnDate ()
afx_msg void | OnDestroy ()
afx_msg void | OnDestroy ()
afx_msg void | OnDevModeChange (LPTSTR lpDeviceName)
afx_msg void | OnDevModeChange (LPTSTR lpDeviceName)
virtual BOOL | OnDrawMenuImage (CDC *pDC, const CMFCToolBarMenuButton *pMenuButton, const CRect &rectImage)
afx_msg void | OnDropDown (NMHDR *pNotifyStruct, LRESULT *pResult)
afx_msg void | OnDropFiles (HDROP hDropInfo)
afx_msg void | OnDropFiles (HDROP hDropInfo)
afx_msg void | OnDummy (UINT id)
afx_msg void | OnDummy ()
afx_msg void | OnDummy ()
afx_msg void | OnDummy (UINT id)
afx_msg void | OnDynamicItem1 ()
afx_msg void | OnDynamicItem2 ()
afx_msg void | OnEditFindCombo ()
afx_msg void | OnEditMyItem1 ()
afx_msg void | OnEditMyItem2 ()
afx_msg void | OnEnable (BOOL bEnable)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFavorite (UINT nID)
afx_msg void | OnFavorite (UINT nID)
afx_msg void | OnFileBind ()
afx_msg void | OnFileCloseSolution ()
afx_msg void | OnFileNewBlankSolution ()
afx_msg void | OnFileNewProject ()
afx_msg void | OnFileOpenSolution ()
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnFileRunREGEDIT ()
afx_msg void | OnFileSaveAll ()
afx_msg void | OnFileViewTypeLib ()
afx_msg void | OnFontChange ()
afx_msg void | OnFontChange ()
afx_msg void | OnFontNameChange ()
afx_msg void | OnFontSizeChange ()
afx_msg void | OnFourColumns ()
afx_msg LRESULT | OnGetDocumentColors (WPARAM, LPARAM)
afx_msg void | OnGetMinMaxInfo (MINMAXINFO FAR *lpMMI)
afx_msg void | OnGetMinMaxInfo (MINMAXINFO FAR *lpMMI)
afx_msg LRESULT | OnGetTabToolTip (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnGetTabToolTip (WPARAM wp, LPARAM lp)
afx_msg void | OnHello ()
afx_msg void | OnHello ()
afx_msg LRESULT | OnHelpCustomizeToolbars (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnHelpCustomizeToolbars (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnHelpCustomizeToolbars (WPARAM wp, LPARAM lp)
afx_msg void | OnHelpFinder ()
afx_msg void | OnHelpFinder ()
afx_msg void | OnHelpKeyboardmap ()
afx_msg void | OnHelpMicrosoft ()
afx_msg void | OnHelpWeb ()
afx_msg LRESULT | OnHighlightRibbonListItem (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnHighlightRibbonListItem (WPARAM wp, LPARAM lp)
afx_msg void | OnHistory (UINT nID)
afx_msg void | OnLink ()
void | OnLink (UINT nID)
afx_msg void | OnLink1 ()
afx_msg void | OnLinkMicrosoft ()
afx_msg void | OnLinkMSDN ()
afx_msg void | OnLinks (UINT nID)
afx_msg void | OnLinkVisualCPP ()
afx_msg void | OnLoadDebugConf ()
afx_msg void | OnLoadRegularConf ()
afx_msg void | OnMdiCancel ()
afx_msg void | OnMdiCancel ()
afx_msg void | OnMdiCancel ()
afx_msg void | OnMdiMoveToNextGroup ()
afx_msg void | OnMdiMoveToNextGroup ()
afx_msg void | OnMdiMoveToNextGroup ()
afx_msg void | OnMdiMoveToPrevGroup ()
afx_msg void | OnMdiMoveToPrevGroup ()
afx_msg void | OnMdiMoveToPrevGroup ()
afx_msg void | OnMdiNewHorzTabGroup ()
afx_msg void | OnMdiNewHorzTabGroup ()
afx_msg void | OnMdiNewHorzTabGroup ()
afx_msg void | OnMdiNewVertGroup ()
afx_msg void | OnMdiNewVertGroup ()
afx_msg void | OnMdiNewVertGroup ()
afx_msg void | OnMdiTabbed ()
afx_msg void | OnMdiTabbedDocument ()
afx_msg void | OnMenuSelection ()
afx_msg void | OnMove (int x, int y)
afx_msg void | OnMove (int x, int y)
afx_msg void | OnNcRButtonDown (UINT nHitTest, CPoint point)
afx_msg void | OnNewAddress ()
afx_msg void | OnNewAddress ()
afx_msg void | OnNewAddress ()
afx_msg void | OnNewAddressEnter ()
afx_msg void | OnNewAddressEnter ()
afx_msg void | OnNewAddressEnter ()
afx_msg void | OnObjectDelete ()
afx_msg void | OnObjectVerify ()
afx_msg void | OnOleInsertNew ()
afx_msg LONG_PTR | OnOpenMsg (UINT_PTR wParam, LONG_PTR lParam)
afx_msg LRESULT | OnOpenMsg (WPARAM wParam, LPARAM lParam)
afx_msg void | OnOutlookAddPage ()
afx_msg void | OnOutlookAnimation ()
afx_msg void | OnOutlookBarShortcut (UINT id)
afx_msg void | OnOutlookDeletePage ()
afx_msg void | OnOutlookRenamePage ()
afx_msg void | OnOutlookShowTextLabels ()
afx_msg void | OnPaint ()
afx_msg void | OnPalette (UINT nID)
afx_msg void | OnPalette2column ()
afx_msg void | OnPalette3column ()
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnPenToggle ()
afx_msg LRESULT | OnPostRecalcLayout (WPARAM wp, LPARAM lp)
afx_msg BOOL | OnQueryNewPalette ()
afx_msg BOOL | OnQueryNewPalette ()
afx_msg BOOL | OnQueryNewPalette ()
afx_msg BOOL | OnQueryNewPalette ()
afx_msg BOOL | OnQueryNewPalette ()
LRESULT | OnRecalcInProgress (WPARAM wParam, LPARAM lParam)
afx_msg void | OnRefresh ()
afx_msg LRESULT | OnResetMenu (WPARAM, LPARAM)
afx_msg void | OnResetPage ()
afx_msg void | OnRibbonBtn7 ()
afx_msg void | OnRibbonBtn8 ()
afx_msg void | OnRibbonBtn9 ()
afx_msg LRESULT | OnRibbonCustomize (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnRibbonCustomize (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnRibbonCustomize (WPARAM wp, LPARAM lp)
afx_msg void | OnRibbonObtn10 ()
afx_msg void | OnRibbonObtn2 ()
afx_msg void | OnRibbonObtn3 ()
afx_msg void | OnRibbonObtn4 ()
afx_msg void | OnRibbonObtn8 ()
afx_msg void | OnSaveDebugConf ()
afx_msg void | OnSaveRegularConf ()
afx_msg void | OnSelChangePalette ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg LRESULT | OnSetMessageString (WPARAM wParam, LPARAM lParam)
afx_msg void | OnSettingChange (UINT uFlags, LPCTSTR lpszSection)
afx_msg void | OnSettingChange (UINT uFlags, LPCTSTR lpszSection)
afx_msg void | OnSettingChange (UINT uFlags, LPCTSTR lpszSection)
virtual BOOL | OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop)
virtual BOOL | OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop)
virtual BOOL | OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop)
virtual BOOL | OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
virtual BOOL | OnShowPopupMenu (CMFCPopupMenu *pMenuPopup)
afx_msg LRESULT | OnShowRibbonItemMenu (WPARAM wp, LPARAM lp)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSizing (UINT fwSide, LPRECT pRect)
afx_msg void | OnSizing (UINT fwSide, LPRECT pRect)
afx_msg void | OnSlider ()
afx_msg void | OnSpell ()
afx_msg LRESULT | OnStartCustomize (WPARAM wp, LPARAM lp)
afx_msg void | OnSysColorChange ()
afx_msg void | OnSysColorChange ()
afx_msg void | OnSysColorChange ()
afx_msg void | OnSysColorChange ()
afx_msg void | OnTask ()
virtual BOOL | OnTearOffMenu (CMFCPopupMenu *pMenuPopup, CPane *pBar)
afx_msg void | OnThreeColumns ()
afx_msg void | OnTime ()
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnToggleInsert ()
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarContextMenu (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarCreateNew (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarCreateNew (WPARAM, LPARAM)
LRESULT | OnToolbarCreateNew (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg LRESULT | OnToolbarReset (WPARAM, LPARAM)
afx_msg void | OnToolsConnectToDatabase ()
afx_msg void | OnToolsDebugProcesses ()
afx_msg void | OnToolsOptions ()
afx_msg void | OnToolsOptions ()
afx_msg void | OnToolsOptions ()
afx_msg void | OnToolsOptions ()
afx_msg void | OnToolsToolbar ()
void | OnToolsViewUserToolbar (UINT id)
void | OnToolsViewUserToolbar (UINT id)
afx_msg void | OnTwoColumns ()
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAppLook (CCmdUI *pCmdUI)
afx_msg void | OnUpdateBackward1 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateBackward2 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateBarMenu (CCmdUI *pCmdUI)
afx_msg void | OnUpdateCategorie (CCmdUI *pCmdUI)
afx_msg void | OnUpdateClock (CCmdUI *pCmdUI)
afx_msg void | OnUpdateCustomize (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFilePrintPreview (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFilePrintPreview (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFontName (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFontSize (CCmdUI *pCmdUI)
afx_msg void | OnUpdateForward1 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateForward2 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFourColumns (CCmdUI *pCmdUI)
afx_msg void | OnUpdateGoAddressEdit (CCmdUI *pCmdUI)
afx_msg void | OnUpdateIndicatorSendReceive (CCmdUI *pCmdUI)
afx_msg void | OnUpdateInsert (CCmdUI *pCmdUI)
afx_msg void | OnUpdateLineNumber (CCmdUI *pCmdUI)
afx_msg void | OnUpdateLinks (CCmdUI *pCmdUI)
afx_msg void | OnUpdateMdiTabbed (CCmdUI *pCmdUI)
afx_msg void | OnUpdateMdiTabbedDocument (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectDelete (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectVerify (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOutlookAddPage (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOutlookAnimation (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOutlookBarShortcut (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOutlookDeletePage (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOutlookRenamePage (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOutlookShowTextLabels (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePalette (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePalette2column (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePalette3column (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePaletteMenu (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePane (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePercentDone (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRefresh (CCmdUI *pCmdUI)
afx_msg void | OnUpdateResetPage (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRibbonBtn7 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRibbonBtn8 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRibbonBtn9 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRibbonObtn10 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRibbonObtn8 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateStyle (CCmdUI *pCmdUI)
afx_msg void | OnUpdateThreeColumns (CCmdUI *pCmdUI)
void | OnUpdateToolsViewUserToolbar (CCmdUI *pCmdUI)
void | OnUpdateToolsViewUserToolbar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTwoColumns (CCmdUI *pCmdUI)
afx_msg void | OnUpdateUseInProcHandler (CCmdUI *pCmdUI)
afx_msg void | OnUpdateUseInProcServer (CCmdUI *pCmdUI)
afx_msg void | OnUpdateUseLocalServer (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewAddressBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewCaptionBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewCaptionbar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewClass (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewDialogBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewDlgbartop (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewDynamichelp (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewEditingtoolbar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewExplorerbar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewFile (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewFolderList (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewFolders (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewInfobar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewLinksBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewMacroBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewMessageBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewOutlookBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewOutlookbar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewOutput (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewOutput (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewOutput (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewProperties (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewRefresh (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewResource (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewRtl (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewSource (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewStatusBar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewTaskpane (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewTextlabels (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewThemeToolbar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewThemeToolbar (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewToolsPalette (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWatch (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWeb (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWorkspace (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWorkspace (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWorkspace (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWorkspace (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWorkspace (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewWorkspace2 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateWindowManager (CCmdUI *pCmdUI)
afx_msg void | OnUpdateWriteClipboard (CCmdUI *pCmdUI)
afx_msg void | OnUseInProcHandler ()
afx_msg void | OnUseInProcServer ()
afx_msg void | OnUseLocalServer ()
afx_msg void | OnViewAddressBar ()
afx_msg BOOL | OnViewBar (UINT nID)
afx_msg void | OnViewCaptionBar ()
afx_msg void | OnViewCaptionbar ()
afx_msg void | OnViewClass ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewCustomize ()
afx_msg void | OnViewDialogBar ()
afx_msg void | OnViewDlgbarTop ()
afx_msg void | OnViewDynamichelp ()
afx_msg void | OnViewEditingtoolbar ()
afx_msg void | OnViewExplorerbar ()
afx_msg void | OnViewFile ()
afx_msg void | OnViewFolderList ()
afx_msg void | OnViewFolders ()
afx_msg void | OnViewFoldersPopup ()
afx_msg void | OnViewFullScreen ()
afx_msg void | OnViewFullScreen ()
afx_msg void | OnViewInfobar ()
afx_msg void | OnViewLinksBar ()
afx_msg void | OnViewLong ()
afx_msg void | OnViewMacroBar ()
afx_msg void | OnViewMessageBar ()
afx_msg void | OnViewMyComputer ()
afx_msg void | OnViewOutlookbar ()
afx_msg void | OnViewOutlookBar ()
afx_msg void | OnViewOutput ()
afx_msg void | OnViewOutput ()
afx_msg void | OnViewOutput ()
afx_msg void | OnViewPalette ()
afx_msg void | OnViewProperties ()
afx_msg void | OnViewRefresh ()
afx_msg void | OnViewRefresh ()
afx_msg void | OnViewResource ()
afx_msg void | OnViewRtl ()
afx_msg void | OnViewShort ()
afx_msg void | OnViewSource ()
afx_msg void | OnViewStatusBar ()
afx_msg void | OnViewTaskpane ()
afx_msg void | OnViewTextlabels ()
afx_msg void | OnViewThemeToolbar ()
afx_msg void | OnViewThemeToolbar ()
afx_msg void | OnViewToolsPalette ()
afx_msg void | OnViewWatch ()
afx_msg void | OnViewWeb ()
afx_msg void | OnViewWorkspace ()
afx_msg void | OnViewWorkspace ()
afx_msg void | OnViewWorkSpace (UINT ud)
afx_msg void | OnViewWorkspace ()
afx_msg void | OnViewWorkspace ()
afx_msg void | OnViewWorkspace ()
afx_msg void | OnViewWorkspace2 ()
afx_msg void | OnWindowManager ()
afx_msg void | OnWindowManager ()
afx_msg void | OnWindowManager ()
afx_msg void | OnWindowManager ()
afx_msg void | OnWindowManager ()
afx_msg void | OnWindowManager ()
afx_msg void | OnWindowManager ()
afx_msg void | OnWindowTileHorz ()
afx_msg void | OnWriteClipboard ()
afx_msg void | OnZoom ()
afx_msg void | OnZoomSlider ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
BOOL | RestorePosition (int nCmdShow)
BOOL | SavePosition ()
void | SetBasicCommands ()
void | SetDockingBarsIcons (BOOL bHiColorIcons)
void | SetKeys ()
void | SetProgressPos (int nPos, UINT nID)
void | SetSliderPos (int nPos, UINT nID)
void | SetupOffice2007Button ()
void | SetupOffice2007Button ()
void | ShowOptions (int nPage)
void | ShowOptions (int nPage)
void | ShowOptions (int nPage)
void | ShowProgress (BOOL bShow=TRUE)

Static Protected Member Functions

static void CALLBACK EXPORT | UpdateTime (HWND hWnd, UINT nMsg, UINT_PTR nIDEvent, DWORD dwTime)

Protected Attributes

CStringArray | m_arColorThemes
CRibbonListFontButton::XItems m_arFonts
CStringArray | m_arStyles
CStringArray | m_arStyleSets
CStringArray | m_arThemes
BOOL | m_bCheckBox1
BOOL | m_bCheckBox2
BOOL | m_bCheckBox3
BOOL | m_bDialogTop
BOOL | m_bInfiniteProgressMode
BOOL | m_bIsFullScreen
BOOL | m_bIsHighColor
BOOL | m_bMainToolbarMenu
CBitmap | m_bmpCaption
CBitmap | m_bmpStatus
BOOL | m_bOutlookBar2003
HICON | m_hIcon
CImageList | m_ImagesSmall
CImageList | m_imlStatusAnimation
CList< COLORREF, COLORREF > | m_lstAdditionalColors
CList< COLORREF, COLORREF > | m_lstMainColors
CList< COLORREF, COLORREF > | m_lstStandardColors
CObList | m_lstWorkspaces
CMFCRibbonApplicationButton | m_MainButton
CBitmap | m_MemBitmap
UINT m_nCurView
UINT m_nPaletteCol
int | m_nPercentDone
int | m_nProgressValue
int | m_nProgressValue1
int | m_nProgressValue2
CMFCToolBarImages | m_PanelImages
CMFCControlRenderer | m_Pat [4]
CMFCOutlookBarPane * | m_pCurrOutlookPage
CMFCOutlookBarTabCtrl * | m_pCurrOutlookWnd
CWorkspaceObj * m_pCurrWorkSpace
CSourceView * m_pSrcView
CView * | m_pViews [NUMVIEWS]
CRect | m_rectFill
CRect | m_rectSizing
CMap< UINT, UINT,
CMFCToolBarImages
*, CMFCToolBarImages * > 		m_TooltipImages
UINT m_uiHilightedPage
CMFCToolBarImages | m_UserImages
CAddressBox m_wndAddress
CComboBoxEx | m_wndAddress
CAnimateCtrl | m_wndAnimate
CMyOutlookBar m_wndBarOutlook
CMyOutlookBar m_wndBarOutlook2003
CToolBar | m_wndBrowseBar
CCalendarBar m_wndCalendar
CCalendarBar m_wndCalendar2003
CMFCCaptionBar | m_wndCaption
CMFCCaptionBar | m_wndCaptionBar
CClassViewBar m_wndClassView
CToolBar | m_wndDebugBar
CDialogBar | m_wndDlgBar
CPaneDialog | m_wndDlgBar
CDynamicHelpViewBar m_wndDynamicHelpView
CEditBar m_wndEditBar
CExplorerBar m_wndExplorerBar
CFileViewBar m_wndFileView
CFolderListBar m_wndFolderList
CFolderBar m_wndFoldersBar
CInfoBar m_wndInfoBar
CLinksBar m_wndLinksBar
CToolBar | m_wndMainBar
CMyMenuBar m_wndMenuBar
CMFCMenuBar | m_wndMenuBar
CMFCCaptionBar | m_wndMessageBar
CMFCOutlookBarPane | m_wndOutlookPane1
CMFCOutlookBarPane | m_wndOutlookPane12003
CMFCOutlookBarPane | m_wndOutlookPane2
CMFCOutlookBarPane | m_wndOutlookPane22003
COutputBar m_wndOutput
COutputViewBar m_wndOutputView
CToolsPalette m_wndPalette
CPaletteBar m_wndPaletteBar
CPropertiesViewBar m_wndPropertiesBar
CReBar | m_wndReBar
CMFCReBar | m_wndReBar
CToolBar | m_wndResourceBar
CResourceViewBar m_wndResourceView
CMFCRibbonBar | m_wndRibbonBar
CMFCOutlookBar | m_wndShortcutsBar
CMFCOutlookBarPane | m_wndShortcutsPane1
CToolBar | m_wndSizeToolBar
CSplitterWndEx | m_wndSplitter
CStatusBar | m_wndStatusBar
CMFCStatusBar | m_wndStatusBar
CMFCRibbonStatusBar | m_wndStatusBar
CStyleBar m_wndStyleBar
CTaskPane m_wndTaskPane
CToolBar | m_wndToolBar
CMFCToolBar | m_wndToolBar
CMFCToolBar | m_wndToolBarAdvanced
CMFCToolBar | m_wndToolbarBuild
CMFCToolBar | m_wndToolbarEdit
CMFCDropDownToolBar | m_wndToolbarResource
CMFCToolBar | m_wndToolBarTheme
CMFCToolBar | m_wndToolBarWeb
CShellTreeCtrl m_wndTree
CShellTreeCtrl m_wndTree2003
CChildView m_wndView
CWatchBar m_wndWatchBar
CWorkspaceBar m_wndWorkSpace
CWorkspaceBar2 m_wndWorkSpace2
WINDOWPLACEMENT | m_wpPrev

Private Member Functions

void | AddContextTab_Format ()
void | AdjustObjectSubmenu (CMFCPopupMenu *pMenuPopup)
BOOL | CreateRibbonBar ()
BOOL | CreateStatusBar ()
BOOL | FindInternalDivider (CDockablePane *pBar, CPaneContainer *&pContainer, CPaneDivider *&pDivider, BOOL &bLeftSlider, BOOL &bAloneInContainer)
CMSMLinksBar * | GetLinksBar (UINT nID)
void | InitHomeCategory ()
void | InitMainButton ()
void | InitTabButtons ()
void | InitViewCategory ()
BOOL | IsEditViewActive ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
void | SetupMemoryBitmapSize (const CSize &sz)
void | UpdateStatusBarCountPane (int nID, CString strText, int nCount)

Private Attributes

CaptureData m_CapData
DWORD | m_dwCurrentView
UINT m_nAppLook
UINT m_nCategorie
CHTMLEdView * m_pWebView
CStatusBar | m_StatusBar
CToolBar | m_ToolBar
CMSMCaptionBar m_wndCaptionBar
CMSMCategoryBar m_wndCategoryBar
CMSMLinksBar | m_wndLinksBars [8]
CMSMMenuBar m_wndMenuBar
CMSMTasksPane m_wndTaskPane
CMSMToolBar m_wndToolBar

Friends

class | COle2ViewApp
class | CTasksPaneView

Detailed Description

Definition at line 12 of file mainfrm.h.

Constructor & Destructor Documentation

CMainFrame::CMainFrame ( ) [protected]

Definition at line 76 of file mainfrm.cpp.

{
  m_nCurrentExample = ID_STRINGLIST;
}

CMainFrame::~CMainFrame ( ) [virtual]

Definition at line 81 of file mainfrm.cpp.

{
}

CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( ) [protected]
virtual CMainFrame::~CMainFrame ( ) [virtual]
CMainFrame::CMainFrame ( )
virtual CMainFrame::~CMainFrame ( ) [virtual]

Member Function Documentation

void CMainFrame::ActivateByTab ( )

Definition at line 394 of file MainFrm.cpp.

{
  enum eActiveWindow { eAdressBar = 0, eFolderBar = 1, eExplorerView = 2 };
  int  nActiveWindow = eAdressBar;

  CWnd *pWnd = GetFocus();
  if (pWnd != NULL)
  {
    ASSERT_VALID(pWnd);

    if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCShellListCtrl)))
    {
      nActiveWindow = eExplorerView;
    }
    if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCShellTreeCtrl)))
    {
      nActiveWindow = eFolderBar;
    }
  }
  switch (nActiveWindow)
  {
  case eAdressBar:
    if (m_wndFoldersBar.IsVisible())
    {
      m_wndFoldersBar.SetFocus();
    }
    else
    {
      SetFocus();
    }
    break;
  case eFolderBar:
    SetFocus();
    break;
  case eExplorerView:
    m_wndAddress.SetFocus();
    break;
  default:
    break;
  }
}

void CMainFrame::ActivateFrame ( int nCmdShow = -1 ) [virtual]

Definition at line 337 of file mainfrm.cpp.

{
  CFrameWnd::ActivateFrame(nCmdShow);
  // make sure and display the toolbar, ruler, etc while loading a document.
  OnIdleUpdateCmdUI();
  UpdateWindow();
}

virtual void CMainFrame::ActivateFrame ( int nCmdShow = -1 ) [virtual]
void CMainFrame::ActivateRibbonContextCategory ( UINT uiCategoryID )
void CMainFrame::ActivateRibbonContextCategory ( UINT uiCategoryID )

Definition at line 1101 of file mainfrm.cpp.

{
  if (m_wndRibbonBar.GetHideFlags() == 0)
  {
    m_wndRibbonBar.ActivateContextCategory(uiCategoryID);
  }
}

void CMainFrame::Add_Category1 ( ) [protected]

Definition at line 481 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Buttons"), IDB_RIBBON_CATEGORY1_SMALL, IDB_RIBBON_CATEGORY1_LARGE);

  CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Large Buttons"));

  std::auto_ptr<CMFCRibbonButton> apBtn1(new CMFCRibbonButton(ID_RIBBON_BTN_1, _T("Button"), 0, 0));
  apBtn1->SetAlwaysLargeImage();
  pPanel1->Add(apBtn1.release());

  std::auto_ptr<CMFCRibbonButton> apBtn2(new CMFCRibbonButton(ID_RIBBON_BTN_2, _T("Menu Button"), 1, 1));
  apBtn2->SetMenu(IDR_RIBBON_MENU_1);
  apBtn2->SetAlwaysLargeImage();
  pPanel1->Add(apBtn2.release());

  std::auto_ptr<CMFCRibbonButton> apBtn3(new CMFCRibbonButton(ID_RIBBON_BTN_3, _T("Split Button"), 2, 2));
  apBtn3->SetMenu(IDR_RIBBON_MENU_1, TRUE);
  apBtn3->SetAlwaysLargeImage();
  apBtn3->RemoveSubItem(0);
  apBtn3->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MBTN_1, _T("Item 1"), 2), 0);
  pPanel1->Add(apBtn3.release());

  CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Small"));

  std::auto_ptr<CMFCRibbonButton> apBtn4(new CMFCRibbonButton(ID_RIBBON_BTN_4, _T("Button"), 3));
  pPanel2->Add(apBtn4.release());

  std::auto_ptr<CMFCRibbonButton> apBtn5(new CMFCRibbonButton(ID_RIBBON_BTN_5, _T("Menu Button"), 4));
  apBtn5->SetMenu(IDR_RIBBON_MENU_1);
  pPanel2->Add(apBtn5.release());

  std::auto_ptr<CMFCRibbonButton> apBtn6(new CMFCRibbonButton(ID_RIBBON_BTN_6, _T("Split Button"), 5));
  apBtn6->SetMenu(IDR_RIBBON_MENU_1, TRUE);
  apBtn6->SetAlwaysLargeImage();
  apBtn6->RemoveSubItem(1);
  apBtn6->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MBTN_2, _T("Item 2"), 5), 1);
  pPanel2->Add(apBtn6.release());

  CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Check Boxes"));

  pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_7, _T("Check Box 1")));
  pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_8, _T("Check Box 2")));
  pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_9, _T("Check Box 3")));

  pPanel1->SetData(ID_RIBBON_SOURCE_CODE_1_1);
  pPanel2->SetData(ID_RIBBON_SOURCE_CODE_1_2);
  pPanel3->SetData(ID_RIBBON_SOURCE_CODE_1_3);
}

void CMainFrame::Add_Category2 ( ) [protected]

Definition at line 530 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Palette Buttons"), IDB_RIBBON_CATEGORY2_SMALL, IDB_RIBBON_CATEGORY2_LARGE);

  CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Standard"));

  pPanel1->Add(new CMFCRibbonGallery(ID_RIBBON_PBTN_1, _T("Embedded"), 0, 0, IDB_RIBBON_PALETTE_1, 64));

  std::auto_ptr<CMFCRibbonGallery> apBtn2(new CMFCRibbonGallery(ID_RIBBON_PBTN_2, _T("Button"), 1, 1, IDB_RIBBON_PALETTE_1, 64));
  apBtn2->SetButtonMode();
  apBtn2->SetAlwaysLargeImage();
  pPanel1->Add(apBtn2.release());

  CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Extended"));

  std::auto_ptr<CMFCRibbonGallery> apBtn3(new CMFCRibbonGallery(ID_RIBBON_PBTN_3, _T("Resize Vertical"), 2, 2, IDB_RIBBON_PALETTE_1, 64));
  apBtn3->SetButtonMode();
  apBtn3->SetIconsInRow(2);
  apBtn3->EnableMenuResize(TRUE, TRUE);
  pPanel2->Add(apBtn3.release());

  std::auto_ptr<CMFCRibbonGallery> apBtn4(new CMFCRibbonGallery(ID_RIBBON_PBTN_4, _T("Resize Both"), 3, 3, IDB_RIBBON_PALETTE_1, 64));
  apBtn4->SetButtonMode();
  apBtn4->SetIconsInRow(4);
  apBtn4->EnableMenuResize(TRUE);
  pPanel2->Add(apBtn4.release());

  std::auto_ptr<CMFCRibbonGallery> apBtn5(new CMFCRibbonGallery(ID_RIBBON_PBTN_5, _T("Groups && Subitems"), 4, 4));
  apBtn5->AddGroup(_T("Group 1"), IDB_RIBBON_PALETTE_1, 64);
  apBtn5->AddGroup(_T("Group 2"), IDB_RIBBON_PALETTE_2, 64);
  apBtn5->SetButtonMode();
  apBtn5->SetIconsInRow(4);
  apBtn5->EnableMenuResize(TRUE);
  apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_1, _T("Item 1")));
  apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_2, _T("Item 2")));
  apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_3, _T("Item 3")));
  pPanel2->Add(apBtn5.release());

  pPanel1->SetData(ID_RIBBON_SOURCE_CODE_2_1);
  pPanel2->SetData(ID_RIBBON_SOURCE_CODE_2_2);
}

void CMainFrame::Add_Category3 ( ) [protected]

Definition at line 572 of file MainFrm.cpp.

{
  CreateDocumentColors();

  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Color Buttons"), IDB_RIBBON_CATEGORY3_SMALL, IDB_RIBBON_CATEGORY3_LARGE);

  CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Large"));

  CMFCRibbonColorButton* pBtn1 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_1, _T("Simple"), TRUE, 0, 0);
  pBtn1->SetAlwaysLargeImage();
  pBtn1->SetDefaultCommand(FALSE);
  pPanel1->Add(pBtn1);

  CMFCRibbonColorButton* pBtn2 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_2, _T("Simple with Options"), TRUE, 1, 1);
  pBtn2->SetAlwaysLargeImage();
  pBtn2->SetDefaultCommand(FALSE);
  pBtn2->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  pBtn2->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pPanel1->Add(pBtn2);

  CMFCRibbonColorButton* pBtn3 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_3, _T("Custom"), TRUE, 2, 2);
  pBtn3->SetAlwaysLargeImage();
  pBtn3->SetDefaultCommand(FALSE);
  pBtn3->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  pBtn3->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pBtn3->SetColumns(10);
  pBtn3->SetColorBoxSize(CSize(17, 17));
  pBtn3->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pBtn3->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
  pBtn3->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  pPanel1->Add(pBtn3);

  CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Small"));

  CMFCRibbonColorButton* pBtn4 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_4, _T("Simple"), TRUE, 3, -1);
  pBtn4->SetDefaultCommand(FALSE);
  pPanel2->Add(pBtn4);

  CMFCRibbonColorButton* pBtn5 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_5, _T("Simple with Options"), TRUE, 4, -1);
  pBtn5->SetDefaultCommand(FALSE);
  pBtn5->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  pBtn5->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pPanel2->Add(pBtn5);

  CMFCRibbonColorButton* pBtn6 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_6, _T("Custom"), TRUE, 5, -1);
  pBtn6->SetDefaultCommand(FALSE);
  pBtn6->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  pBtn6->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pBtn6->SetColumns(10);
  pBtn6->SetColorBoxSize(CSize(17, 17));
  pBtn6->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pBtn6->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
  pBtn6->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  pPanel2->Add(pBtn6);

  CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Small with Indicator"));

  CMFCRibbonColorButton* pBtn7 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_7, _T("Simple"), 6);
  pBtn7->SetColor(RGB(255, 0, 0));
  pPanel3->Add(pBtn7);

  CMFCRibbonColorButton* pBtn8 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_8, _T("Simple with Options"), 7);
  pBtn8->SetColor(RGB(0, 0, 255));
  pBtn8->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  pBtn8->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pPanel3->Add(pBtn8);

  CMFCRibbonColorButton* pBtn9 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_9, _T("Custom"), 8);
  pBtn9->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  pBtn9->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pBtn9->SetColumns(10);
  pBtn9->SetColorBoxSize(CSize(17, 17));
  pBtn9->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pBtn9->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
  pBtn9->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  pPanel3->Add(pBtn9);

  CMFCRibbonPanel* pPanel4 = pCategory->AddPanel(_T("Embedded"));

  CMFCRibbonColorButton* pBtn10 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_10, _T("Embedded"), TRUE, 1, 1);
  pBtn10->EnableOtherButton(_T("&More Colors..."), _T("More Shading Colors"));
  pBtn10->SetColor(RGB(240, 240, 240));
  pBtn10->SetColumns(10);
  pBtn10->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pBtn10->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
  pBtn10->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  pBtn10->SetColorBoxSize(CSize(17, 17));
  pBtn10->SetButtonMode(FALSE);
  pBtn10->EnableAutomaticButton(_T("&No Color"), (COLORREF)-1, TRUE, NULL, FALSE /* Bottom */);
  pPanel4->Add(pBtn10);

  pPanel1->SetData(ID_RIBBON_SOURCE_CODE_3_1);
  pPanel2->SetData(ID_RIBBON_SOURCE_CODE_3_2);
  pPanel3->SetData(ID_RIBBON_SOURCE_CODE_3_3);
  pPanel4->SetData(ID_RIBBON_SOURCE_CODE_3_4);
}

void CMainFrame::Add_Category4 ( ) [protected]

Definition at line 669 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Groups"), IDB_RIBBON_CATEGORY4_SMALL, 0);

  CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("From Toolbar"));

  pPanel1->AddToolBar(IDR_TOOLBAR);

  CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Manual"));

  std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup1(new CMFCRibbonButtonsGroup);

  apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_1, _T(""), 0));
  apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_2, _T(""), 1));

  CMFCRibbonEdit* pEdit = new CMFCRibbonEdit(ID_RIBBON_GBTN_3, 65);
  pEdit->SetEditText(_T("Edit"));
  apButtonsGroup1->AddButton(pEdit);

  apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_4, _T(""), 2));
  apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_5, _T(""), 3));

  pPanel2->Add(apButtonsGroup1.release());

  std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup2(new CMFCRibbonButtonsGroup);
  apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_6, _T(""), 4));
  apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_7, _T(""), 5));
  apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_8, _T(""), 6));
  apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_9, _T(""), 7));

  pPanel2->Add(apButtonsGroup2.release());

  std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup3(new CMFCRibbonButtonsGroup);

  CMFCRibbonButton* pBtn10 = new CMFCRibbonButton(ID_RIBBON_GBTN_10, _T(""), 8);
  pBtn10->SetMenu(IDR_RIBBON_MENU_1);
  apButtonsGroup3->AddButton(pBtn10);

  CMFCRibbonButton* pBtn11 = new CMFCRibbonButton(ID_RIBBON_GBTN_11, _T(""), 9);
  pBtn11->SetMenu(IDR_RIBBON_MENU_1, TRUE);
  apButtonsGroup3->AddButton(pBtn11);

  pPanel2->Add(apButtonsGroup3.release());

  pPanel1->SetData(ID_RIBBON_SOURCE_CODE_4_1);
  pPanel2->SetData(ID_RIBBON_SOURCE_CODE_4_2);
}

void CMainFrame::Add_Category5 ( ) [protected]

Definition at line 717 of file MainFrm.cpp.

{
  int i = 0;

  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Edit and Combo"), IDB_RIBBON_CATEGORY5_SMALL, 0);

  CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Standard"));

  CMFCRibbonEdit* pBtn1 = new CMFCRibbonEdit(ID_RIBBON_EBTN_1, 90);
  pBtn1->SetEditText(_T("Edit"));
  pPanel1->Add(pBtn1);

  CMFCRibbonEdit* pBtn2 = new CMFCRibbonEdit(ID_RIBBON_EBTN_2, 90);
  pBtn2->EnableSpinButtons(0, 99);
  pBtn2->SetEditText(_T("0"));
  pPanel1->Add(pBtn2);

  CMFCRibbonComboBox* pBtn3 = new CMFCRibbonComboBox(ID_RIBBON_EBTN_3, TRUE, 74);
  pBtn3->AddItem(_T("Combo Box"));
  for (i = 0; i < 20; i++)
  {
    CString str;
    str.Format(_T("Item %d"), i + 1);
    pBtn3->AddItem(str);
  }
  pBtn3->SelectItem(0);
  pPanel1->Add(pBtn3);

  CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("With Icons and Labels"));

  CMFCRibbonEdit* pBtn4 = new CMFCRibbonEdit(ID_RIBBON_EBTN_4, 90, _T("Label:"), 0);
  pBtn4->SetEditText(_T("Edit"));
  pPanel2->Add(pBtn4);

  CMFCRibbonEdit* pBtn5 = new CMFCRibbonEdit(ID_RIBBON_EBTN_5, 90, _T("Label:"), 1);
  pBtn5->EnableSpinButtons(0, 99);
  pBtn5->SetEditText(_T("0"));
  pPanel2->Add(pBtn5);

  CMFCRibbonComboBox* pBtn6 = new CMFCRibbonComboBox(ID_RIBBON_EBTN_6, TRUE, 74, _T("Label:"), 2);
  pBtn6->AddItem(_T("Combo Box"));
  for (i = 0; i < 20; i++)
  {
    CString str;
    str.Format(_T("Item %d"), i + 1);
    pBtn6->AddItem(str);
  }
  pBtn6->SelectItem(0);
  pPanel2->Add(pBtn6);

  CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Font"));

  CMFCRibbonFontComboBox::m_bDrawUsingFont = TRUE;
  CMFCRibbonFontComboBox* pBtn7 = new CMFCRibbonFontComboBox(ID_RIBBON_EBTN_7);
  pBtn7->SelectItem(_T("Arial"));
  pPanel3->Add(pBtn7);

  pPanel1->SetData(ID_RIBBON_SOURCE_CODE_5_1);
  pPanel2->SetData(ID_RIBBON_SOURCE_CODE_5_2);
  pPanel3->SetData(ID_RIBBON_SOURCE_CODE_5_3);
}

void CMainFrame::Add_Category6 ( ) [protected]

Definition at line 779 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Other"), IDB_RIBBON_CATEGORY6_SMALL, IDB_RIBBON_CATEGORY6_LARGE);

  CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Undo"));

  CMFCRibbonUndoButton* pBtn1 = new CMFCRibbonUndoButton(ID_RIBBON_OBTN_1, _T("Undo"), 0, 0);
  for (int i = 0; i < 20; i++)
  {
    CString str;
    str.Format(_T("Action %d"), i + 1);
    pBtn1->AddUndoAction(str);
  }
  pPanel1->Add(pBtn1);

  CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Label"));

  pPanel2->Add(new CMFCRibbonLabel(_T("Label 1")));
  pPanel2->Add(new CMFCRibbonLabel(_T("Label 2")));
  pPanel2->Add(new CMFCRibbonLabel(_T("Label 3")));

  pPanel2->Add(new CMFCRibbonSeparator());

  pPanel2->Add(new CMFCRibbonLabel(_T("This is a multi-line label"), TRUE));

  CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Hyperlink"));

  pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_2, _T("Send e-mail"), _T("mailto:info@microsoft.com")));
  pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_3, _T("Visit site"), _T("http://www.microsoft.com")));
  pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_4, _T("Launch Notepad"), _T("notepad")));

  CMFCRibbonPanel* pPanel4 = pCategory->AddPanel(_T("Sliders"));
  pPanel4->SetCenterColumnVert();

  pPanel4->Add(new CMFCRibbonLabel(_T("Simple Slider:")));
  pPanel4->Add(new CMFCRibbonSlider(ID_RIBBON_OBTN_5, 70 /* Slider width */));

  pPanel4->Add(new CMFCRibbonSeparator());

  pPanel4->Add(new CMFCRibbonLabel(_T("Slider with Buttons:")));
  CMFCRibbonSlider* pBtn6 = new CMFCRibbonSlider(ID_RIBBON_OBTN_6, 70 /* Slider width */);
  pBtn6->SetZoomButtons();
  pBtn6->SetRange(0, 100);
  pBtn6->SetPos(50);
  pPanel4->Add(pBtn6);

  CMFCRibbonPanel* pPanel5 = pCategory->AddPanel(_T("Progress Bars"));
  pPanel5->SetCenterColumnVert();

  pPanel5->Add(new CMFCRibbonLabel(_T("Simple Progress:")));
  pPanel5->Add(new CMFCRibbonProgressBar(ID_RIBBON_OBTN_7, 100 /* Bar width */));
  pPanel5->Add(new CMFCRibbonButton(ID_RIBBON_OBTN_8, _T("Show Progress 1")));

  pPanel5->Add(new CMFCRibbonSeparator());

  pPanel5->Add(new CMFCRibbonLabel(_T("Infinite Progress:")));
  CMFCRibbonProgressBar* pBtn9 = new CMFCRibbonProgressBar(ID_RIBBON_OBTN_9, 100 /* Bar width */);
  pBtn9->SetInfiniteMode();
  pPanel5->Add(pBtn9);

  pPanel5->Add(new CMFCRibbonButton(ID_RIBBON_OBTN_10, _T("Show Progress 2")));

  pPanel1->SetData(ID_RIBBON_SOURCE_CODE_6_1);
  pPanel2->SetData(ID_RIBBON_SOURCE_CODE_6_2);
  pPanel3->SetData(ID_RIBBON_SOURCE_CODE_6_3);
  pPanel4->SetData(ID_RIBBON_SOURCE_CODE_6_4);
  pPanel5->SetData(ID_RIBBON_SOURCE_CODE_6_5);
}

void CMainFrame::Add_MainPanel ( ) [protected]

Definition at line 435 of file MainFrm.cpp.

{
  m_MainButton.SetImage (IDB_RIBBON_MAIN);
  m_MainButton.SetToolTipText (_T("File"));
  m_MainButton.SetText (_T("\nf"));

  m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));

  CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory (_T("File"), IDB_RIBBON_FILE_SMALL, IDB_RIBBON_FILE_LARGE);

  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_NEW, _T("&New"), 0, 0));
  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_OPEN, _T("&Open..."), 1, 1));

  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE, _T("&Save"), 2, 2));

  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));

  std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton (ID_FILE_PRINT, _T("&Print"), 4, 4));

  apBtnPrint->AddSubItem (new CMFCRibbonLabel (_T("Preview and print the document")));
  apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT, _T("&Print"), 4, 4, TRUE));
  apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 6, 6, TRUE));
  apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 7, 7, TRUE));

  apBtnPrint->SetKeys (_T("p"), _T("w"));

  pMainPanel->Add (apBtnPrint.release());

  pMainPanel->AddRecentFilesList (_T("Recent Documents"));

  pMainPanel->AddToBottom (new CMFCRibbonMainPanelButton (ID_TOOLS_OPTIONS, _T("Opt&ions"), 8));
  pMainPanel->AddToBottom (new CMFCRibbonMainPanelButton (ID_APP_EXIT, _T("E&xit"), 9));
}

void CMainFrame::Add_QAT ( ) [protected]

Definition at line 469 of file MainFrm.cpp.

{
  CMFCRibbonQuickAccessToolBarDefaultState qatState;
  qatState.AddCommand (ID_FILE_NEW);
  qatState.AddCommand (ID_FILE_OPEN, FALSE);
  qatState.AddCommand (ID_FILE_SAVE, FALSE);
  qatState.AddCommand (ID_FILE_SAVE_AS);
  qatState.AddCommand (ID_FILE_PRINT_DIRECT);
  qatState.AddCommand (ID_FILE_PRINT_PREVIEW, FALSE);
  m_wndRibbonBar.SetQuickAccessDefaultState (qatState);
}

void CMainFrame::AddContextTab_Chart ( ) [protected]

Definition at line 1934 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Design"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_DESIGN, IDB_CHART_DESIGNLARGE);
  pCategory->SetKeys(_T("jc"));

  CMFCRibbonPanel* pPanelDesign_Type = pCategory->AddPanel(_T("Type"), m_PanelImages.ExtractIcon(20));

  pPanelDesign_Type->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Change Chart Type\nc"), -1, 0));
  pPanelDesign_Type->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_SAVETEMPLATE, _T("Save Template\nt"), -1, 1));

  CMFCRibbonPanel* pPanelDesign_Data = pCategory->AddPanel(_T("Data"), m_PanelImages.ExtractIcon(20));

  pPanelDesign_Data->Add(new CMFCRibbonButton(ID_CHART_DESIGN_DATA_SWITCH, _T("Switch Row/Column\nw"), -1, 2));
  pPanelDesign_Data->Add(new CMFCRibbonButton(ID_CHART_DESIGN_DATA_EDIT, _T("Edit Data Source\ne"), -1, 3));
  pPanelDesign_Data->Add(new CMFCRibbonButton(ID_CHART_DESIGN_DATA_SHOW, _T("Show Data\nd"), -1, 4));

  CMFCRibbonCategory* pCategory2 = m_wndRibbonBar.AddContextCategory(_T("Layout"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_LAYOUT, IDB_CHART_LAYOUTLARGE);
  pCategory2->SetKeys(_T("ja"));

  CMFCRibbonPanel* pPanelLayout_Shapes = pCategory2->AddPanel(_T("Shapes"), m_PanelImages.ExtractIcon(20));

  pPanelLayout_Shapes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_SHAPES_PICTURE, _T("Picture\np"), 0, 0));
  pPanelLayout_Shapes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_SHAPES_SHAPES, _T("Shapes\nsh"), 1, 1));
  pPanelLayout_Shapes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_SHAPES_TEXTBOX, _T("Draw Text Box\nx"), 2, 2));

  CMFCRibbonPanel* pPanelLayout_Labels = pCategory2->AddPanel(_T("Labels"), m_PanelImages.ExtractIcon(20));

  pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_TITLE, _T("Chart Title\nt"), -1, 3));
  pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_AXIS, _T("Axis Titles\ni"), -1, 4));
  pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_LEGEND, _T("Legend\nl"), 3, 5));
  pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_DATALABELS, _T("Data Labels\nb"), 4, 6));
  pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_DATATABLE, _T("Data Table\nd"), 5, 7));

  CMFCRibbonPanel* pPanelLayout_Axes = pCategory2->AddPanel(_T("Axes"), m_PanelImages.ExtractIcon(20));

  pPanelLayout_Axes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_AXES_AXES, _T("Axes\na"), -1, 8));
  pPanelLayout_Axes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_AXES_GRIDLINES, _T("Gridlines\ng"), -1, 9));
  pPanelLayout_Axes->SetKeys(_T("zx"));

  CMFCRibbonCategory* pCategory3 = m_wndRibbonBar.AddContextCategory(_T("Format"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_FORMAT, IDB_CHART_FORMATLARGE);
  pCategory3->SetKeys(_T("jo"));

  CMFCRibbonPanel* pPanelFormat_Sel = pCategory3->AddPanel(_T("Current Selection"), m_PanelImages.ExtractIcon(20));

  pPanelFormat_Sel->Add(new CMFCRibbonButton(ID_CHART_FORMAT_CURSEL_FORMAT, _T("Format Selection\nm"), 0, -1));
  pPanelFormat_Sel->Add(new CMFCRibbonButton(ID_CHART_FORMAT_CURSEL_RESET, _T("Reset to Match Style\nv"), 1, -1));

  CMFCRibbonPanel* pPanelFormat_Shape = pCategory3->AddPanel(_T("Shape Styles"), m_PanelImages.ExtractIcon(20));

  pPanelFormat_Shape->Add(new CMFCRibbonButton(ID_CHART_FORMAT_SHAPES_FILL, _T("Shape Fill\nsf"), 2, -1));
  pPanelFormat_Shape->Add(new CMFCRibbonButton(ID_CHART_FORMAT_SHAPES_OUTLINE, _T("Shape Outline\nso"), 3, -1));
  pPanelFormat_Shape->Add(new CMFCRibbonButton(ID_CHART_FORMAT_SHAPES_EFFECTS, _T("Shape Effects\nse"), 4, -1));
  pPanelFormat_Shape->SetKeys(_T("zy"));

  AddPanelArrange(pCategory3, 19, 5, 0);
}

void CMainFrame::AddContextTab_Format ( ) [private]

Definition at line 508 of file mainfrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Format"), _T("Drawing tools"), ID_FORMAT_CONTEXT_TAB, AFX_CategoryColor_Orange, IDB_RIBBON_FORMATSMALL, IDB_RIBBON_FORMATLARGE);
  pCategory->SetKeys(_T("jd"));

  // Create "Styles" panel
  CMFCRibbonPanel* pPanelStyles = pCategory->AddPanel(_T("Styles\nzs"), m_PanelImages.ExtractIcon(8));

  CMFCRibbonGallery* pBtnStyles = new CMFCRibbonGallery(ID_OBJECT_STYLES, _T("Styles\nk"), 0, 0, IDB_STYLES, 40);
  pBtnStyles->SetIconsInRow(7);
  pBtnStyles->EnableMenuResize(TRUE, TRUE);
  pPanelStyles->Add(pBtnStyles);

  std::auto_ptr<CMFCRibbonColorButton> apBtnFillColor(new CMFCRibbonColorButton(ID_OBJECT_FILLCOLOR, _T("Fill Color\nsf"), FALSE, 1, -1));
  apBtnFillColor->SetDefaultCommand(FALSE);
  apBtnFillColor->EnableAutomaticButton(_T("&Automatic"), RGB(128, 128, 128));
  apBtnFillColor->EnableOtherButton(_T("&More Fill Colors..."), _T("More Fill Colors"));
  apBtnFillColor->SetColumns(10);
  apBtnFillColor->SetColorBoxSize(CSize(17, 17));
  apBtnFillColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  apBtnFillColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
  apBtnFillColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  apBtnFillColor->AddSubItem(new CMFCRibbonButton(ID_OBJECT_NOFILL, _T("&No Fill\nn"), 2));
  apBtnFillColor->SetColor((COLORREF)-1);
  pPanelStyles->Add(apBtnFillColor.release());

  std::auto_ptr<CMFCRibbonColorButton> apBtnLineColor(new CMFCRibbonColorButton(ID_OBJECT_LINECOLOR, _T("Line Color\nso"), FALSE, 3, -1));
  apBtnLineColor->SetDefaultCommand(FALSE);
  apBtnLineColor->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  apBtnLineColor->EnableOtherButton(_T("&More Line Colors..."), _T("More Line Colors"));
  apBtnLineColor->SetColumns(10);
  apBtnLineColor->SetColorBoxSize(CSize(17, 17));
  apBtnLineColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  apBtnLineColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
  apBtnLineColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  apBtnLineColor->AddSubItem(new CMFCRibbonButton(ID_OBJECT_NOLINE, _T("&No Line\nn"), 2));
  apBtnLineColor->SetColor((COLORREF)-1);
  pPanelStyles->Add(apBtnLineColor.release());

  CStringArray sa;
  sa.Add(_T("1 pt"));
  sa.Add(_T("2 pt"));
  sa.Add(_T("3 pt"));
  sa.Add(_T("4 pt"));
  sa.Add(_T("5 pt"));
  sa.Add(_T("6 pt"));
  sa.Add(_T("7 pt"));

  std::auto_ptr<CRibbonListButton> apBtnLineWeight(new CRibbonListButton(ID_OBJECT_LINEWEIGHT, _T("Line Weight\nsw"), 4, -1, IDB_LINEWEIGHT, 96, sa));
  apBtnLineWeight->AddSubItem(new CMFCRibbonButton(ID_OBJECT_LINEWEIGHT_MORE, _T("More &Lines..."), 5, -1));
  apBtnLineWeight->EnableMenuResize(TRUE, TRUE); // Vertical only
  pPanelStyles->Add(apBtnLineWeight.release());

#ifdef ENABLE_RIBBON_LAUNCH_BUTTON
  pPanelStyles->EnableLaunchButton(ID_OBJECT_PROPERTIES, 6, _T("fa"));
#endif // ENABLE_RIBBON_LAUNCH_BUTTON

  // Create "Arrange" panel
  CMFCRibbonPanel* pPanelArrange = pCategory->AddPanel(_T("Arrange\nzj"), m_PanelImages.ExtractIcon(3));

  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOFRONT, _T("Move to Front\nmf"), 7, 1));
  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEFORWARD, _T("Move Forward\nmw"), 9, 3));
  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEBACK, _T("Move Backward\nmd"), 10, 4));
  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOBACK, _T("Move to Back\nmb"), 8, 2));
}

void CMainFrame::AddContextTab_Picture ( ) [protected]

Definition at line 1916 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Format"), _T("Picture tools"), IDB_PICTURE, AFX_CategoryColor_Red, IDB_PICTURE_FORMAT, IDB_PICTURE_FORMATLARGE);

  pCategory->SetKeys(_T("jp"));

  CMFCRibbonPanel* pPanelTools = pCategory->AddPanel(_T("Picture Tools"), m_PanelImages.ExtractIcon(20));

  pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_BRIGHTNESS, _T("Brightness\nb"), 0, -1));
  pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_CONTRAST, _T("Contrast\nn"), 1, -1));
  pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_RECOLOR, _T("Recolor\ne"), 2, -1));
  pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_COMPRESS, _T("Compress Pictures\nm"), 3, -1));
  pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_CHANGE, _T("Change Picture\ng"), 4, -1));
  pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_RESET, _T("Reset Picture\no"), 5, -1));

  AddPanelArrange(pCategory, 19, 6, 0);
}

void CMainFrame::AddContextTab_Table ( ) [protected]

Definition at line 1991 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Design"), _T("Table tools"), IDB_TABLE, AFX_CategoryColor_Yellow, IDB_INSERT, IDB_INSERTLARGE);
  pCategory->SetKeys(_T("jt"));

  CMFCRibbonPanel* pPanelTableStyleOptions = pCategory->AddPanel(_T("Table Style Options"), m_PanelImages.ExtractIcon(20));
  pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_HEADERROW, _T("Header Row\nhr")));
  pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_TOTALROW, _T("Total Row\ntr")));
  pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_BANDEDROWS, _T("Banded Rows\nbr")));
  pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_FIRSTCOLUMN, _T("First Column\nfc")));
  pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_LASTCOLUMN, _T("Last Column\nlc")));
  pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_BANDEDCOLUMNS, _T("Banded Columns\nbc")));

  pCategory->AddPanel(_T("Table Styles"), m_PanelImages.ExtractIcon(20));
  pCategory->AddPanel(_T("Draw Borders"), m_PanelImages.ExtractIcon(20));

  CMFCRibbonCategory* pCategory2 = m_wndRibbonBar.AddContextCategory(_T("Layout"), _T("Table tools"), IDB_TABLE, AFX_CategoryColor_Yellow, IDB_INSERT, IDB_INSERTLARGE);
  pCategory2->SetKeys(_T("jl"));

  pCategory2->AddPanel(_T("Table"), m_PanelImages.ExtractIcon(20));
  pCategory2->AddPanel(_T("Rows & Columns"), m_PanelImages.ExtractIcon(20));
  pCategory2->AddPanel(_T("Merge"), m_PanelImages.ExtractIcon(20));
  pCategory2->AddPanel(_T("Cell Size"), m_PanelImages.ExtractIcon(20));
  pCategory2->AddPanel(_T("Alignment"), m_PanelImages.ExtractIcon(20));
  pCategory2->AddPanel(_T("Data"), m_PanelImages.ExtractIcon(20));
}

void CMainFrame::AddMainCategory ( ) [protected]

Definition at line 415 of file MainFrm.cpp.

{
  m_MainButton.SetImage(IDB_MAIN);
  m_MainButton.SetToolTipText(_T("Main Button"));
  m_MainButton.SetDescription(_T("Click here to see everything you can do with your document, including saving, printing or sharing it with others"));
  m_MainButton.SetID(ID_MAIN_BUTTON);

  m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize(45, 45));

  CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(_T("Main Menu"), IDB_FILESMALL, IDB_FILELARGE);

  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_NEW, _T("&New"), 0, 0));
  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_OPEN, _T("&Open"), 1, 1));

  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE, _T("&Save"), 2, 2));

  std::auto_ptr<CMFCRibbonButton> apBtnSaveAs(new CMFCRibbonButton(ID_FILE_SAVE_AS, _T("Save &As"), 3, 3));
  apBtnSaveAs->AddSubItem(new CMFCRibbonLabel(_T("Save a copy of the document")));
  apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_DOCUMENT, _T("&Word Document"), 9, 9, TRUE));
  apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_TEMPLATE, _T("Word &Template"), 10, 10, TRUE));
  apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_DOCUMENT_OLD, _T("Word &97-2003 Document"), 11, 11, TRUE));
  apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_ADDINS, _T("&Find add-ins for other file formats"), 12, 12, TRUE));
  apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_OTHER, _T("&Other Formats"), 3, 3, TRUE));
  pMainPanel->Add(apBtnSaveAs.release());

  pMainPanel->Add(new CMFCRibbonSeparator(TRUE));

  std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton(ID_FILE_PRINT, _T("&Print"), 4, 4));
  apBtnPrint->AddSubItem(new CMFCRibbonLabel(_T("Preview and print the document")));
  apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT, _T("&Print"), 4, 4, TRUE));
  apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 13, 13, TRUE));
  apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 14, 14, TRUE));
  pMainPanel->Add(apBtnPrint.release());

  std::auto_ptr<CMFCRibbonButton> apBtnPrepare(new CMFCRibbonButton(ID_FILE_PREPARE, _T("Pr&epare"), 5, 5));
  apBtnPrepare->AddSubItem(new CMFCRibbonLabel(_T("Prepare the document for distribution")));
  apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_PROPERTIES, _T("&Properties"), 15, 15, TRUE));
  apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_INSPECT, _T("&Inspect Document"), 16, 16, TRUE));
  apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_ENCRYPT, _T("&Encrypt Document"), 17, 17, TRUE));
  apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_ADD_SIGNATURE, _T("Add a Digital &Signature"), 18, 18, TRUE));
  apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_MARK_AS_FINAL, _T("Mark as &Final"), 19, 19, TRUE));
  apBtnPrepare->SetDefaultCommand(FALSE);
  pMainPanel->Add(apBtnPrepare.release());

  std::auto_ptr<CMFCRibbonButton> apBtnSend(new CMFCRibbonButton(ID_FILE_SEND, _T("Sen&d"), 6, 6));
  apBtnSend->AddSubItem(new CMFCRibbonLabel(_T("Send a copy of the document to other people")));
  apBtnSend->AddSubItem(new CMFCRibbonButton(ID_FILE_SEND_EMAIL, _T("&E-mail"), 21, 21, TRUE));
  apBtnSend->AddSubItem(new CMFCRibbonButton(ID_FILE_SEND_FAX, _T("Internet Fa&x"), 22, 22, TRUE));
  apBtnSend->SetDefaultCommand(FALSE);
  pMainPanel->Add(apBtnSend.release());

  std::auto_ptr<CMFCRibbonButton> apBtnPublish(new CMFCRibbonButton(ID_FILE_PUBLISH, _T("P&ublish"), 7, 7));
  apBtnPublish->AddSubItem(new CMFCRibbonLabel(_T("Distribute the document to other people")));
  apBtnPublish->AddSubItem(new CMFCRibbonButton(ID_FILE_PUBLISH_BLOG, _T("&Blog"), 23, 23, TRUE));
  apBtnPublish->AddSubItem(new CMFCRibbonButton(ID_FILE_PUBLISH_DOCMANAGE_SERVER, _T("&Document Management Server"), 24, 24, TRUE));
  apBtnPublish->AddSubItem(new CMFCRibbonButton(ID_FILE_PUBLISH_CREATE_DOCWORKSPACE, _T("&Create Document Workspace"), 25, 25, TRUE));
  apBtnPublish->SetDefaultCommand(FALSE);
  pMainPanel->Add(apBtnPublish.release());

  pMainPanel->AddRecentFilesList(_T("Recent Documents"));

  pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_TOOLS_OPTIONS, _T("Opt&ions"), 26));
  pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, _T("E&xit"), 27));
}

CMFCRibbonPanel * CMainFrame::AddPanelArrange | ( | CMFCRibbonCategory * | pCategory,
 |  | UINT | imageP,
 |  | UINT | imageS,
 |  | UINT | imageL |
 | ) |  |  | [protected]

Definition at line 1885 of file MainFrm.cpp.

{
  ASSERT_VALID(pCategory);

  CMFCRibbonPanel* pPanelPL_Arrange = pCategory->AddPanel(_T("Arrange\nza"), m_PanelImages.ExtractIcon(imageP));

  CMFCRibbonGallery* pPositionBtn = new CMFCRibbonGallery(ID_PAGELAYOUT_ARRANGE_POSITION, _T("Position\npo"), -1, imageL);
  InitPositionPalette(pPositionBtn);
  pPositionBtn->EnableMenuResize();
  pPositionBtn->SetButtonMode();
  pPanelPL_Arrange->Add(pPositionBtn);

  CMFCRibbonButton* pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_BRINGTOFRONT, _T("Bring to Front\naf"), imageS, imageL > 0 ? imageL + 1 : -1);
  pBtn->SetMenu(IDR_PAGELAYOUT_BRINGTOFRONT, TRUE);
  pPanelPL_Arrange->Add(pBtn);

  pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_SENDTOBACK, _T("Send to Back\nab"), imageS + 2, imageL > 0 ? imageL + 2 : -1);
  pBtn->SetMenu(IDR_PAGELAYOUT_SENDTOBACK, TRUE);
  pPanelPL_Arrange->Add(pBtn);

  pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING, _T("Text Wrapping\ntw"), imageS + 4, imageL > 0 ? imageL + 3 : -1);
  pBtn->SetMenu(IDR_PAGELAYOUT_TEXTWRAPPING, FALSE);
  pPanelPL_Arrange->Add(pBtn);

  pPanelPL_Arrange->Add(new CMFCRibbonButton(ID_PAGELAYOUT_ARRANGE_ALIGN, _T("Align\naa"), imageS + 1, imageL > 0 ? imageL + 4 : -1));
  pPanelPL_Arrange->Add(new CMFCRibbonButton(ID_PAGELAYOUT_ARRANGE_GROUP, _T("Group\nag"), imageS + 3, imageL > 0 ? imageL + 5 : -1));
  pPanelPL_Arrange->Add(new CMFCRibbonButton(ID_PAGELAYOUT_ARRANGE_ROTATE, _T("Rotate\nay"), imageS + 5, imageL > 0 ? imageL + 6 : -1));

  return pPanelPL_Arrange;
}

void CMainFrame::AddTab_Developer ( ) [protected]

Definition at line 1348 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Developer\nl"), 0, 0);

  pCategory->SetData(idTabDeveloper);
}

void CMainFrame::AddTab_Home ( ) [protected]

Definition at line 480 of file MainFrm.cpp.

{
  // Create a new category(tab):
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Home\nh"), IDB_WRITE, IDB_WRITELARGE);

  // Create "Clipboard" panel:
  CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel(_T("Clipboard"), m_PanelImages.ExtractIcon(1));
  pPanelClipboard->SetKeys(_T("zc"));

  CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, _T("Paste"), 0, 0);
  pBtnPaste->SetMenu(IDR_WRITE_PASTE_MENU, TRUE);
  pPanelClipboard->Add(pBtnPaste);

  pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, _T("Cut"), 1));
  pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, _T("Copy"), 2));
  pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPYFORMAT, _T("Format Painter"), 3));

#ifdef ENABLE_RIBBON_LAUNCH_BUTTON
  // Add the launch button at the bottom of the panel:
  pPanelClipboard->EnableLaunchButton(ID_WRITE_CLIPBOARD, 0);
#endif // ENABLE_RIBBON_LAUNCH_BUTTON

  // Create "Font" panel:
  CMFCRibbonPanel* pPanelFont = pCategory->AddPanel(_T("Font"), m_PanelImages.ExtractIcon(2));
  pPanelFont->SetKeys(_T("zf"));

  // Create a new group with 2 elements: font name and font size:
  std::auto_ptr<CMFCRibbonButtonsGroup> apFontGroup(new CMFCRibbonButtonsGroup);

  CMFCRibbonFontComboBox::m_bDrawUsingFont = TRUE;

  CMFCRibbonFontComboBox* pFontCombo = new CMFCRibbonFontComboBox(ID_FONT_FONT);
  pFontCombo->SetWidth(55, TRUE); // Width in "floaty" mode
  pFontCombo->SelectItem(10);
  apFontGroup->AddButton(pFontCombo);

  CMFCRibbonComboBox* pFontSizeCombo = new CMFCRibbonComboBox(ID_FONT_FONTSIZE, FALSE, 39);
  pFontSizeCombo->AddItem(_T("8"));
  pFontSizeCombo->AddItem(_T("9"));
  pFontSizeCombo->AddItem(_T("10"));
  pFontSizeCombo->AddItem(_T("11"));
  pFontSizeCombo->AddItem(_T("12"));
  pFontSizeCombo->AddItem(_T("14"));
  pFontSizeCombo->AddItem(_T("16"));
  pFontSizeCombo->AddItem(_T("18"));
  pFontSizeCombo->AddItem(_T("20"));
  pFontSizeCombo->AddItem(_T("22"));
  pFontSizeCombo->AddItem(_T("24"));
  pFontSizeCombo->AddItem(_T("26"));
  pFontSizeCombo->AddItem(_T("28"));
  pFontSizeCombo->AddItem(_T("36"));
  pFontSizeCombo->AddItem(_T("48"));
  pFontSizeCombo->AddItem(_T("72"));
  pFontSizeCombo->SetWidth(20, TRUE); // Width in "floaty" mode
  pFontSizeCombo->SelectItem(3);
  apFontGroup->AddButton(pFontSizeCombo);

  pPanelFont->Add(apFontGroup.release());

  // Add toolbar(all toolbar buttons will be automatically
  // converted to ribbon elements:
  pPanelFont->AddToolBar(IDR_FONT);

  // Add menu to ID_FONT_UNDERLINE element:
  pPanelFont->SetElementMenu(ID_FONT_UNDERLINE, IDR_DUMMY_MENU, TRUE);

  // Add menu to ID_FONT_CHANGECASE element:
  pPanelFont->SetElementMenu(ID_FONT_CHANGECASE, IDR_WRITE_FONTCASE_MENU);

  // Replace ID_FONT_COLOR and ID_FONT_TEXTHIGHLIGHT elements
  // by color pickers:
  CMFCRibbonColorButton* pFontColorBtn = new CMFCRibbonColorButton();
  pFontColorBtn->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
  pFontColorBtn->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pFontColorBtn->SetColumns(10);
  pFontColorBtn->SetColor(RGB(255, 0, 0));
  pFontColorBtn->SetColorBoxSize(CSize(17, 17));

  pFontColorBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pFontColorBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE /* Contiguous Columns*/);
  pFontColorBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);

  pPanelFont->ReplaceByID(ID_FONT_COLOR, pFontColorBtn);

  CMFCRibbonColorButton* pFontColorHighlightBtn = new CMFCRibbonColorButton();
  pFontColorHighlightBtn->SetColor(RGB(255, 255, 255));
  pFontColorHighlightBtn->EnableAutomaticButton(_T("&No Color"), RGB(240, 240, 240), TRUE, NULL, FALSE /* Bottom */, TRUE /* Draw border */);

  pPanelFont->ReplaceByID(ID_FONT_TEXTHIGHLIGHT, pFontColorHighlightBtn);

  pFontColorHighlightBtn->SetColorBoxSize(CSize(26, 26));
  pFontColorHighlightBtn->AddSubItem(new CMFCRibbonButton(ID_STOP_HIGHLIGHTING, _T("&Stop Highlighting")));

#ifdef ENABLE_RIBBON_LAUNCH_BUTTON
  // Add the launch button at the bottom of the panel:
  pPanelFont->EnableLaunchButton(ID_WRITE_FONT);
#endif // ENABLE_RIBBON_LAUNCH_BUTTON

  // Create "Paragraph" panel:
  CMFCRibbonPanel* pPanelParagraph = pCategory->AddPanel(_T("Paragraph"), m_PanelImages.ExtractIcon(3));
  pPanelParagraph->SetKeys(_T("zp"));

  pPanelParagraph->AddToolBar(IDR_PARAGRAPH);

  // Attach palette to "Bullets" button:
  CMFCRibbonGallery* pPaletteBullet = new CMFCRibbonGallery(ID_PARA_BULLETS, _T(""), -1, -1);

  pPanelParagraph->ReplaceByID(ID_PARA_BULLETS, pPaletteBullet);
  InitBulletPalette(pPaletteBullet);
  pPaletteBullet->EnableMenuResize();

  // Attach palette to "Numbering" button:
  CMFCRibbonGallery* pPaletteNum = new CMFCRibbonGallery(ID_PARA_NUMBERING, _T(""), -1, -1);

  pPanelParagraph->ReplaceByID(ID_PARA_NUMBERING, pPaletteNum);
  InitNumberingPalette(pPaletteNum);
  pPaletteNum->EnableMenuResize();

  // Attach palette to "Multilevel" button:
  CMFCRibbonGallery* pPaletteMulti = new CMFCRibbonGallery(ID_PARA_MULTILEVEL, _T(""), -1, -1);

  pPanelParagraph->ReplaceByID(ID_PARA_MULTILEVEL, pPaletteMulti);
  InitMultilevelPalette(pPaletteMulti);
  pPaletteMulti->EnableMenuResize();
  pPaletteMulti->SetDefaultCommand(FALSE);

  pPanelParagraph->SetElementMenu(ID_PARA_LINESPACING, IDR_PARA_LINESPACING_MENU);

  CMFCRibbonColorButton* pParaColorBtn = new CMFCRibbonColorButton();
  pParaColorBtn->EnableOtherButton(_T("&More Colors..."), _T("More Shading Colors"));
  pParaColorBtn->SetColor(RGB(255, 255, 255));

  pParaColorBtn->SetColumns(10);
  pParaColorBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pParaColorBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE /* Contiguous Columns*/);
  pParaColorBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  pParaColorBtn->SetColorBoxSize(CSize(17, 17));
  pParaColorBtn->EnableAutomaticButton(_T("&No Color"), RGB(240, 240, 240), TRUE, NULL, FALSE /* Bottom */, TRUE);

  pPanelParagraph->ReplaceByID(ID_PARA_SHADING, pParaColorBtn);

#ifdef ENABLE_RIBBON_LAUNCH_BUTTON
  pPanelParagraph->EnableLaunchButton(ID_WRITE_PARAGRAPH);
#endif // ENABLE_RIBBON_LAUNCH_BUTTON

  // Add menu to ID_PARA_BORDER element:
  pPanelParagraph->SetElementMenu(ID_PARA_BORDER, IDR_WRITE_BORDERS_MENU, TRUE);

  // Create "Styles" panel:
  CMFCRibbonPanel* pPanelStyle = pCategory->AddPanel(_T("Styles"), m_PanelImages.ExtractIcon(4));
  pPanelStyle->SetKeys(_T("zs"));

  std::auto_ptr<CMFCRibbonGallery> apStyleBtn(new CMFCRibbonGallery(ID_WRITE_QUICKSTYLES, _T("Quick Styles"), 9, 1, IDB_STYLES, 64));
  apStyleBtn->AddSubItem(new CMFCRibbonButton(ID_WRITE_SAVESTYLE, _T("Save Selection as a New &Quick Style..."), -1, -1));
  apStyleBtn->AddSubItem(new CMFCRibbonButton(ID_WRITE_CLEARFORMATTING, _T("&Clear Formatting"), 8, -1));
  apStyleBtn->AddSubItem(new CMFCRibbonButton(ID_WRITE_APPLYSTYLES, _T("&Apply Styles"), 9, -1));
  for (int i = 0; i < m_arStyles.GetSize(); i++)
  {
    apStyleBtn->SetItemToolTip(i, m_arStyles [i]);
  }

  apStyleBtn->EnableMenuResize();
  pPanelStyle->Add(apStyleBtn.release());

  std::auto_ptr<CMFCRibbonButton> apStyleChangeBtn(new CMFCRibbonButton(ID_WRITE_CHANGESTYLES, _T("Change Styles"), 9, 2));

  std::auto_ptr<CRibbonListButton> apStyleSetPalette(new CRibbonListButton(ID_STYLECHANGE_STYLESET, _T("St&yle Set"), 32, -1));
  apStyleSetPalette->AddGroup(_T(""), 0, 0, m_arStyleSets);
  apStyleSetPalette->AddSubItem(new CMFCRibbonButton(0, _T("&Reset to Quick Styles from Template")));
  apStyleSetPalette->EnableMenuResize(TRUE, TRUE); // Vertical only
  apStyleSetPalette->EnableMenuSideBar();

  apStyleChangeBtn->AddSubItem(apStyleSetPalette.release());

  std::auto_ptr<CRibbonListButton> apColorsPalette(new CRibbonListButton(ID_STYLECHANGE_COLORS, _T("&Colors"), 33, -1));
  apColorsPalette->AddGroup(_T("Built-In"), IDB_THEME_COLORS, 103, m_arColorThemes);
  apColorsPalette->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS, _T("&Create New Theme Colors...")));
  apColorsPalette->EnableMenuResize(TRUE, TRUE); // Vertical only

  apStyleChangeBtn->AddSubItem(apColorsPalette.release());

  std::auto_ptr<CRibbonListFontButton> apFontsPalette(new CRibbonListFontButton(ID_STYLECHANGE_FONTS, _T("&Fonts"), 34, -1));
  apFontsPalette->AddGroup(_T("Built-In"), IDB_THEME_FONTS, 43, m_arFonts);
  apFontsPalette->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS, _T("&Create New Theme Fonts...")));
  apFontsPalette->EnableMenuResize(TRUE, TRUE); // Vertical only

  apStyleChangeBtn->AddSubItem(apFontsPalette.release());

  apStyleChangeBtn->SetAlwaysLargeImage();
  apStyleChangeBtn->SetDefaultCommand(FALSE);

  pPanelStyle->Add(apStyleChangeBtn.release());

#ifdef ENABLE_RIBBON_LAUNCH_BUTTON
  pPanelStyle->EnableLaunchButton(ID_WRITE_STYLE);
#endif // ENABLE_RIBBON_LAUNCH_BUTTON

  // Create "Editing" panel:
  CMFCRibbonPanel* pPanelEdit = pCategory->AddPanel(_T("Editing"), m_PanelImages.ExtractIcon(5));
  pPanelEdit->SetKeys(_T("zn"));

  CMFCRibbonButton* pFindBtn = new CMFCRibbonButton(ID_EDIT_FIND, _T("Find"), 4);
  pFindBtn->SetMenu(IDR_WRITE_FIND_MENU);
  pFindBtn->SetDefaultCommand(ID_EDIT_FIND);
  pPanelEdit->Add(pFindBtn);

  pPanelEdit->Add(new CMFCRibbonButton(ID_EDIT_REPLACE, _T("Replace"), 5));

  CMFCRibbonButton* pFindSelectBtn = new CMFCRibbonButton(ID_WRITE_SELECT, _T("Select"), 7);
  pFindSelectBtn->SetMenu(IDR_WRITE_SELECT_MENU);
  pPanelEdit->Add(pFindSelectBtn);

  // Add some hidden elements:
  pCategory->AddHidden(new CMFCRibbonUndoButton(ID_EDIT_UNDO, _T("Undo"), 10));

  pCategory->AddHidden(new CMFCRibbonUndoButton(ID_EDIT_FIND, _T("Find"), 4));
  pCategory->AddHidden(new CMFCRibbonUndoButton(ID_EDIT_GOTO, _T("Go To"), 6));

  pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_PASTE_SPECIAL, _T("Paste Special"), 11));
  pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_PASTE_HYPERLINK, _T("Paste as Hyperlink"), 12));

  pCategory->AddHidden(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("Change List Level"), 13));

  pCategory->AddHidden(new CMFCRibbonButton(ID_PARA_LINESPACINGBEFORE, _T("Add Space Before Paragraph"), 14));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PARA_LINESPACINGAFTER, _T("Remove Space After Paragraph"), 15));

  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_BOTTOMBORDER, _T("&Bottom Border"), 16));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_TOPBORDER, _T("To&p Border"), 17));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_LEFTBORDER, _T("&Left Border"), 18));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_RIGHTBORDER, _T("&Right Border"), 19));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_NOBORDER, _T("&No Border"), 20));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_ALLBORDERS, _T("&All Borders"), 21));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_OUTSIDEBORDERS, _T("Out&side Borders"), 22));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_INSIDEBORDERS, _T("&Inside Borders"), 23));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_INSIDEHORIZONTALBORDER, _T("Inside &Horizontal Border"), 24));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_INSIDEVERTICALBORDER, _T("Inside &Vertical Border"), 25));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_DIAGONALDOWNBORDER, _T("Diagonal Do&wn Border"), 26));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_DIAGONALUPBORDER, _T("Diagonal &Up Border"), 27));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_HORIZONTALLINE, _T("Hori&zontal Line"), 28));
  pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_DRAWTABLE, _T("&Draw Table"), 29));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_VIEWGRIDLINES, _T("View &Gridlines"), 30));
  pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_BORDERSANDSHADING, _T("B&orders and Shading..."), 31));

  pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, _T("Select All"), 35));
  pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_SELECTOBJECTS, _T("Select Objects"), 7));

  // Pane collapsing fine tuning:
  CArray<int, int> arCollapseOrder;

  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelClipboard));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelEdit));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelFont));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelFont));

  pCategory->SetCollapseOrder(arCollapseOrder);
}

void CMainFrame::AddTab_Insert ( ) [protected]

Definition at line 744 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Insert\nn"), IDB_INSERT, IDB_INSERTLARGE);

  CMFCRibbonPanel* pPanelPages = pCategory->AddPanel(_T("Pages"), m_PanelImages.ExtractIcon(6));

  pPanelPages->SetKeys(_T("zp"));

  CMFCRibbonButton* pInsertCoverPageBtn = new CMFCRibbonButton(ID_INSERT_COVERPAGE, _T("Cover Page"), 0, 0);
  pInsertCoverPageBtn->SetMenu(IDR_INSERT_COVERPAGE_MENU);
  pPanelPages->Add(pInsertCoverPageBtn);

  pPanelPages->Add(new CMFCRibbonButton(ID_INSERT_BLACKPAGE, _T("Blank Page"), 1, 1));
  pPanelPages->Add(new CMFCRibbonButton(ID_INSERT_PAGEBREAK, _T("Page Break"), 2, 2));

  CMFCRibbonPanel* pPanelInsertTable = pCategory->AddPanel(_T("Tables"), m_PanelImages.ExtractIcon(7));
  pPanelInsertTable->SetKeys(_T("zt"));

  CRibbonTableButton* pTableMenuBtn = new CRibbonTableButton(ID_INSERT_TABLE, _T("Table"), 3, 3);
  pTableMenuBtn->SetMenu(IDR_INSERT_TABLE_MENU);
  pTableMenuBtn->SetPaletteID(ID_FROM_PALETTE_TABLE);
  pTableMenuBtn->SetButtonMode();
  pPanelInsertTable->Add(pTableMenuBtn);

  CMFCRibbonPanel* pPanelIllustrations = pCategory->AddPanel(_T("Illustrations"), m_PanelImages.ExtractIcon(8));
  pPanelIllustrations->SetKeys(_T("zi"));

  CMFCRibbonButton* pInsertPictureBtn = new CMFCRibbonButton(ID_INSERT_PICTURE, _T("Picture"), 4, 4);
  pPanelIllustrations->Add(pInsertPictureBtn);
  pPanelIllustrations->Add(new CMFCRibbonButton(ID_INSERT_CLIPART, _T("Clip Art"), 5, 5));

  std::auto_ptr<CMFCRibbonGallery> apInsertShapesBtn(new CMFCRibbonGallery(ID_INSERT_SHAPES, _T("Shapes"), 6, 6));
  apInsertShapesBtn->SetButtonMode();
  apInsertShapesBtn->SetIconsInRow(12);

  apInsertShapesBtn->AddGroup(_T("Recently Used Shapes"), IDB_SHAPE1, 20);
  apInsertShapesBtn->AddGroup(_T("Lines"), IDB_SHAPE2, 20);
  apInsertShapesBtn->AddGroup(_T("Basic Shapes"), IDB_SHAPE3, 20);
  apInsertShapesBtn->AddGroup(_T("Block Arrows"), IDB_SHAPE4, 20);
  apInsertShapesBtn->AddGroup(_T("Flowchart"), IDB_SHAPE5, 20);
  apInsertShapesBtn->AddGroup(_T("Callouts"), IDB_SHAPE6, 20);
  apInsertShapesBtn->AddGroup(_T("Stars and Banners"), IDB_SHAPE7, 20);

  apInsertShapesBtn->AddSubItem(new CMFCRibbonButton(ID_INSERT_SHAPESNEW, _T("&New Drawing Canvas"), 29, -1));

  pPanelIllustrations->Add(apInsertShapesBtn.release());
  pPanelIllustrations->Add(new CMFCRibbonButton(ID_INSERT_SMARTART, _T("SmartArt"), 7, 7));
  pPanelIllustrations->Add(new CMFCRibbonButton(ID_INSERT_CHART, _T("Chart"), 8, 8));

  CMFCRibbonPanel* pPanelLinks = pCategory->AddPanel(_T("Links"), m_PanelImages.ExtractIcon(9));
  pPanelLinks->SetKeys(_T("zl"));

  pPanelLinks->Add(new CMFCRibbonButton(ID_INSERT_HYPERLINK, _T("Hyperlink"), 9, 9));
  pPanelLinks->Add(new CMFCRibbonButton(ID_INSERT_BOOKMARK, _T("Bookmark"), 10, 10));
  pPanelLinks->Add(new CMFCRibbonButton(ID_INSERT_REFERENCE, _T("Cross-reference"), 11, 11));

  CMFCRibbonPanel* pPanelHeaderFooter = pCategory->AddPanel(_T("Header & Footer"), m_PanelImages.ExtractIcon(10));
  pPanelHeaderFooter->SetKeys(_T("zh"));

  CMFCRibbonButton* pInsertHeaderBtn = new CMFCRibbonButton(ID_INSERT_HEADER, _T("Header"), 12, 12);
  pInsertHeaderBtn->SetMenu(IDR_INSERT_HEADER_MENU);
  pPanelHeaderFooter->Add(pInsertHeaderBtn);

  CMFCRibbonButton* pInsertFooterBtn = new CMFCRibbonButton(ID_INSERT_FOOTER, _T("Footer"), 13, 13);
  pInsertFooterBtn->SetMenu(IDR_INSERT_FOOTER_MENU);
  pPanelHeaderFooter->Add(pInsertFooterBtn);

  CMFCRibbonButton* pInsertPageNumbersBtn = new CMFCRibbonButton(ID_INSERT_PAGENUMBER, _T("Page Number"), 14, 14);
  pInsertPageNumbersBtn->SetMenu(IDR_INSERT_PAGENUMBERS_MENU);
  pPanelHeaderFooter->Add(pInsertPageNumbersBtn);

  CMFCRibbonPanel* pPanelText = pCategory->AddPanel(_T("Text"), m_PanelImages.ExtractIcon(11));
  pPanelText->SetKeys(_T("zt"));

  CMFCRibbonButton* pTextBoxBtn = new CMFCRibbonButton(ID_INSERT_TEXTBOX, _T("Text Box"), 15, 15);
  pTextBoxBtn->SetMenu(IDR_INSERT_TEXTBOX_MENU);
  pPanelText->Add(pTextBoxBtn);

  pPanelText->Add(new CMFCRibbonButton(ID_INSERT_QUICKPARTS, _T("Quick Parts"), 16, 16));
  pPanelText->Add(new CMFCRibbonButton(ID_INSERT_WORDART, _T("WordArt"), 17, 17));
  pPanelText->Add(new CMFCRibbonButton(ID_INSERT_DROPCAP, _T("Drop Cap"), 18, 18));
  pPanelText->Add(new CMFCRibbonButton(ID_INSERT_SIGNATURELINE, _T("Signature Line"), 19));
  pPanelText->Add(new CMFCRibbonButton(ID_INSERT_DATETIME, _T("Date && Time"), 20));
  pPanelText->Add(new CMFCRibbonButton(ID_INSERT_OBJECT, _T("Object"), 21));

  pPanelText->SetElementMenu(ID_INSERT_QUICKPARTS, IDR_DUMMY_MENU);
  pPanelText->SetElementMenu(ID_INSERT_WORDART, IDR_DUMMY_MENU);
  pPanelText->SetElementMenu(ID_INSERT_DROPCAP, IDR_DUMMY_MENU);
  pPanelText->SetElementMenu(ID_INSERT_SIGNATURELINE, IDR_DUMMY_MENU, TRUE);
  pPanelText->SetElementMenu(ID_INSERT_OBJECT, IDR_DUMMY_MENU, TRUE);

  CMFCRibbonPanel* pPanelSymbols = pCategory->AddPanel(_T("Symbols"), m_PanelImages.ExtractIcon(12));
  pPanelSymbols->SetKeys(_T("zs"));

  pPanelSymbols->Add(new CMFCRibbonButton(ID_INSERT_EQUATION, _T("Equation"), 22, 19));
  pPanelSymbols->Add(new CMFCRibbonButton(ID_INSERT_SYMBOL, _T("Symbol"), 23, 20));

  // pPanelSymbols->SetElementMenu(ID_INSERT_EQUATION, IDR_DUMMY_MENU, TRUE);
  pPanelSymbols->SetElementMenu(ID_INSERT_SYMBOL, IDR_DUMMY_MENU);

  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVECURRENTCOVERPAGE, _T("Remove Current Cover Page"), 24));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVETOCOVERPAGEGALLERY, _T("Save Selection to Cover Page Gallery"), 25));

  pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_TABLE, _T("Insert Table"), 3));
  pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_DRAWTABLE, _T("Draw Table"), 26));
  pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_CONVERTTOTABLE, _T("Convert to Table"), 27));
  pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_EXCELSPREADSHEET, _T("Excel Spreadsheet"), 28));
  pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_QUICKTABLES, _T("Quick Tables"), 3));

  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_EDITHEADER, _T("Edit Header"), 12));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVEHEADER, _T("Remove Header"), 30));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVESELECTIONTOHEADERGALLERY, _T("Save Selection to Header Gallery"), 31));

  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_EDITFOOTER, _T("Edit Footer"), 13));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVEFOOTER, _T("Remove Footer"), 32));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVESELECTIONTOFOOTERGALLERY, _T("Save Selection to Footer Gallery"), 33));

  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_TOPOFPAGE, _T("Top of Page"), 34));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_BOTTOMOFPAGE, _T("Bottom of Page"), 35));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_PAGEMARGINS, _T("Page Margins"), 36));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_CURRENTPOSITION, _T("Current Position"), 14));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_FORMATPAGENUMBERS, _T("Format Page Numbers"), 37));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVEPAGENUMBERS, _T("Remove Page Numbers"), 38));

  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_DRAWTEXTBOX, _T("Draw Text Box"), 15));
  pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVESELECTIONTOTEXTBOXGALLERY, _T("Save Selection to Text Box Gallery"), 39));

  // Pane collapsing fine tuning:
  CArray<int, int> arCollapseOrder;

  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelLinks));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelSymbols));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPages));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelText));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelHeaderFooter));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelIllustrations));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelText));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelLinks));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPages));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelSymbols));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelIllustrations));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelText)); // Setting -1 to the next index
  arCollapseOrder.Add(-1); // means force panel collapse
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelHeaderFooter));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelIllustrations));

  pCategory->SetCollapseOrder(arCollapseOrder);
}

void CMainFrame::AddTab_Mailings ( ) [protected]

Definition at line 1118 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Mailings\nm"), IDB_MAILINGS, IDB_MAILINGSLARGE);

  CMFCRibbonPanel* pPanelCreate = pCategory->AddPanel(_T("Create\nzc"), m_PanelImages.ExtractIcon(24));

  pPanelCreate->Add(new CMFCRibbonButton(ID_MAILINGS_CREATE, _T("Envelopes\ne"), 0, 0));
  pPanelCreate->Add(new CMFCRibbonButton(ID_MAILINGS_CREATELABELS, _T("Labels\nl"), 1, 1));

  CMFCRibbonPanel* pPanelStartMerge = pCategory->AddPanel(_T("Start Mail Merge\nzs"), m_PanelImages.ExtractIcon(25));

  CMFCRibbonButton* pMailMergeMenuBtn = new CMFCRibbonButton(ID_MAILINGS_STARTMAILMERGE, _T("Start Mail Merge\ns"), 2, 2);
  pMailMergeMenuBtn->SetMenu(IDR_MAIL_MERGE_MENU);
  pPanelStartMerge->Add(pMailMergeMenuBtn);

  CMFCRibbonButton* pSelectRecipientMenuBtn = new CMFCRibbonButton(ID_MAILINGS_SELECTRECIPIENTS, _T("Select Recipients\nr"), 3, 3);
  pSelectRecipientMenuBtn->SetMenu(IDR_MAIL_RECIPIENTS_MENU);
  pPanelStartMerge->Add(pSelectRecipientMenuBtn);

  pPanelStartMerge->Add(new CMFCRibbonButton(ID_MAILINGS_EDITRECIPIENTLIST, _T("Edit Recipient List\nd"), 4, 4));

  CMFCRibbonPanel* pPanelWriteFields = pCategory->AddPanel(_T("Write & Insert Fields\nzw"), m_PanelImages.ExtractIcon(26));

  pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_HIGHLIGHT, _T("Highlight Merge Fields\nh"), 5, 5));
  pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_ADDRESSBLOCK, _T("Address Block\na"), 6, 6));
  pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_GREETINGLINE, _T("Greeting Line\ng"), 7, 7));
  pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_INSERTMERGEDFIELD, _T("Insert Merge Field\ni"), 8, 8));
  pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_RULES, _T("Rules\nu"), 9));
  pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_MATCHFIELDS, _T("Match Fields\nt"), 10));
  pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_UPDATELABELS, _T("Update Labels\nb"), 11));

  pPanelWriteFields->SetElementMenu(ID_MAILINGS_INSERTMERGEDFIELD, IDR_DUMMY_MENU, TRUE);

  CMFCRibbonPanel* pPanelReview = pCategory->AddPanel(_T("Preview Results\nzp"), m_PanelImages.ExtractIcon(27));

  pPanelReview->Add(new CMFCRibbonButton(ID_MAILINGS_VIEWMERGEDDATA, _T("Preview Results\np"), 12, 9));
  pPanelReview->AddSeparator();

  std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsListRecords(new CMFCRibbonButtonsGroup);

  apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_FIRSTRECORD, _T("\nq"), 16));
  apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_PREVIOUSRECORD, _T("\nm"), 17));

  CMFCRibbonEdit* pEdit = new CMFCRibbonEdit(ID_MAILINGS_GOTORECORD, 40);
  pEdit->SetKeys(_T("w"));
  apButtonsListRecords->AddButton(pEdit);

  apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_NEXTRECORD, _T("\nx"), 18));
  apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_LASTRECORD, _T("\nv"), 19));

  pPanelReview->Add(apButtonsListRecords.release());

  pPanelReview->Add(new CMFCRibbonButton(ID_MAILINGS_FINDRECIPIENT, _T("Find Recipient\nj"), 13));
  pPanelReview->Add(new CMFCRibbonButton(ID_MAILINGS_AUTOCHECHERRORS, _T("Auto Check for Errors\nk"), 14));

  CMFCRibbonPanel* pPanelFinish = pCategory->AddPanel(_T("Finish\nzf"), m_PanelImages.ExtractIcon(28));
  pPanelFinish->Add(new CMFCRibbonButton(ID_MAILINGS_FINISH, _T("Finish && Merge\nf"), 15, 10));

  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_TYPENEWLIST, _T("Type New List..."), 27));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_USEEXISTINGLIST, _T("Use Existing List..."), 28));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_SELECTFROMCONTACTS, _T("Select from Contacts..."), 29));

  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_LETTERS, _T("Letters"), 20));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_EMAILMESSAGES, _T("E-mail Messages"), 21));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_ENVELOPES, _T("Envelops..."), 22));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_LABELS, _T("Labels..."), 23));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_DIRECTORY, _T("Directory"), 24));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_NORMALDOCUMENT, _T("Normal Document"), 25));
  pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_STEPBYSTEPMAILMERGEWIZARD, _T("Step by Step Mail Merge Wizard..."), 26));
}

void CMainFrame::AddTab_PageLayout ( ) [protected]

Definition at line 893 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Page Layout\np"), IDB_PAGELAYOUT, IDB_PAGELAYOUTLARGE);

  CMFCRibbonPanel* pPanelThemes = pCategory->AddPanel(_T("Themes\nzt"), m_PanelImages.ExtractIcon(13));

  std::auto_ptr<CRibbonListButton> apListBtn1(new CRibbonListButton(ID_PAGELAYOUT_THEMES, _T("Themes\nth"), 23, 0, FALSE));
  apListBtn1->AddGroup(_T("Built-In"), IDB_THEME_THEMES, 64, m_arThemes);
  apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_RESETFROMTEMPLATE, _T("&Reset to Theme from Template")));
  apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_MORETHEMES, _T("More Themes on Microsoft &Office Online...")));
  apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_BROWSEFORTHEMES, _T("&Browse for Themes..."), 24));
  apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_SAVECURRENTTHEME, _T("&Save Current Theme..."), 25));
  apListBtn1->SetIconsInRow(4);
  apListBtn1->EnableMenuResize();
  pPanelThemes->Add(apListBtn1.release());

  std::auto_ptr<CRibbonListButton> apListBtn2(new CRibbonListButton(ID_PAGELAYOUT_COLORS, _T("Colors\ntc"), 0, -1));
  apListBtn2->AddGroup(_T("Built-In"), IDB_THEME_COLORS, 103, m_arColorThemes);
  apListBtn2->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS, _T("&Create New Theme Colors...")));
  apListBtn2->EnableMenuResize(TRUE, TRUE); // Vertical only
  pPanelThemes->Add(apListBtn2.release());

  std::auto_ptr<CRibbonListFontButton> apFontsBtn(new CRibbonListFontButton(ID_PAGELAYOUT_FONTS, _T("Fonts\ntf"), 1, -1));
  apFontsBtn->AddGroup(_T("Built-In"), IDB_THEME_FONTS, 43, m_arFonts);
  apFontsBtn->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS, _T("&Create New Theme Fonts...")));
  apFontsBtn->EnableMenuResize(TRUE, TRUE); // Vertical only
  pPanelThemes->Add(apFontsBtn.release());

  std::auto_ptr<CRibbonListButton> apListBtn3(new CRibbonListButton(ID_PAGELAYOUT_EFFECTS, _T("Effects\nte"), 2, -1, FALSE));
  apListBtn3->AddGroup(_T("Built-In"), IDB_THEME_EFFECTS, 64, m_arThemes);
  apListBtn3->SetIconsInRow(4);
  apListBtn3->EnableMenuResize();
  pPanelThemes->Add(apListBtn3.release());

  CMFCRibbonPanel* pPanelPageSetup = pCategory->AddPanel(_T("Page Setup\nzs"), m_PanelImages.ExtractIcon(14));

  CMFCRibbonButton* pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_MARGINS, _T("Margins\nm"), 3, 1);
  pBtn->SetMenu(IDR_PAGELAYOUT_MARGINS);
  pPanelPageSetup->Add(pBtn);

  pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_ORIENTATION, _T("Orientation\no"), 4, 2);
  pBtn->SetMenu(IDR_PAGELAYOUT_ORIENTATION);
  pPanelPageSetup->Add(pBtn);

  pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_SIZE, _T("Size\nsz"), 5, 3));
  pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_SIZE, IDR_DUMMY_MENU);

  pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_COLUMNS, _T("Columns\nj"), 6, 4);
  pBtn->SetMenu(IDR_PAGELAYOUT_COLUMNS);
  pPanelPageSetup->Add(pBtn);

  pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_BREAKS, _T("Breaks\nb"), 7, -1));
  pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_LINENUMBERS, _T("Line Numbers\nln"), 8, -1));
  pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_HYPHENATION, _T("Hyphenation\nh"), 9, -1));

  pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_BREAKS, IDR_DUMMY_MENU);
  pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_LINENUMBERS, IDR_DUMMY_MENU);
  pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_HYPHENATION, IDR_DUMMY_MENU);

#ifdef ENABLE_RIBBON_LAUNCH_BUTTON
  pPanelPageSetup->EnableLaunchButton(ID_PARA_PAGESETUP, -1, _T("sp"));
#endif // ENABLE_RIBBON_LAUNCH_BUTTON

  CMFCRibbonPanel* pPanelPageBackground = pCategory->AddPanel(_T("Page Background\nzb"), m_PanelImages.ExtractIcon(15));

  pPanelPageBackground->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK, _T("Watermark\npw"), 10, 5));

  CMFCRibbonColorButton* pPageBackBtn = new CMFCRibbonColorButton(ID_PAGELAYOUT_PAGEBACKGROUND_PAGECOLOR, _T("Page Color\npc"), TRUE, 11, 6);

  pPageBackBtn->EnableOtherButton(_T("&More Colors..."), _T("More Shading Colors"));
  pPageBackBtn->SetColor(RGB(240, 240, 240));
  pPageBackBtn->SetDefaultCommand(FALSE);
  pPageBackBtn->SetColumns(10);
  pPageBackBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pPageBackBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE /* Contiguous Columns*/);
  pPageBackBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
  pPageBackBtn->SetColorBoxSize(CSize(17, 17));
  pPageBackBtn->EnableAutomaticButton(_T("&No Color"), RGB(255, 255, 255), TRUE, NULL, FALSE /* Bottom */);

  pPanelPageBackground->Add(pPageBackBtn);

  pPanelPageBackground->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS, _T("Page Borders\npb"), 12, 7));
  pPanelPageBackground->SetElementMenu(ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK, IDR_DUMMY_MENU);

  CMFCRibbonPanel* pPanelParagraph = pCategory->AddPanel(_T("Paragraph\nzg"), m_PanelImages.ExtractIcon(16));

  pPanelParagraph->Add(new CMFCRibbonLabel(_T("Indent")));

  CMFCRibbonNumEdit* pEditIndentLeft = new CMFCRibbonNumEdit(ID_PAGELAYOUT_INDENT_LEFT, 72, _T("Left:\nil"), 13);
  pEditIndentLeft->EnableSpinButtons(0, 1000);
  pEditIndentLeft->SetEditText(_T("0"));
  pPanelParagraph->Add(pEditIndentLeft);

  CMFCRibbonNumEdit* pEditIndentRight = new CMFCRibbonNumEdit(ID_PAGELAYOUT_INDENT_RIGHT, 72, _T("Right:\nir"), 14);
  pEditIndentRight->EnableSpinButtons(0, 1000);
  pEditIndentRight->SetEditText(_T("0"));
  pPanelParagraph->Add(pEditIndentRight);

  pPanelParagraph->AddSeparator();

  pPanelParagraph->Add(new CMFCRibbonLabel(_T("Spacing")));

  CMFCRibbonNumEdit* pEditSpaceBefore = new CMFCRibbonNumEdit(ID_PAGELAYOUT_SPACE_BEFORE, 72, _T("Before:\nsb"), 15);
  pEditSpaceBefore->EnableSpinButtons(0, 100);
  pEditSpaceBefore->SetEditText(_T("0"));
  pPanelParagraph->Add(pEditSpaceBefore);

  CMFCRibbonNumEdit* pEditSpaceAfter = new CMFCRibbonNumEdit(ID_PAGELAYOUT_SPACE_AFTER, 72, _T("After:\nsa"), 16);
  pEditSpaceAfter->EnableSpinButtons(0, 100);
  pEditSpaceAfter->SetEditText(_T("0"));
  pPanelParagraph->Add(pEditSpaceAfter);

  pPanelParagraph->SetJustifyColumns();

  CMFCRibbonPanel* pPanelArrange = AddPanelArrange(pCategory, 17, 17, 8);

  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_COLUMNS_MORECOLUMNS, _T("More Columns"), 6));

  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_BRINGFORWARD, _T("Bring Forward"), 26));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_BRINGINFRONTOFTEXT, _T("Bring in Front of Text"), 27));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_SENDBACKWARD, _T("Send Backward"), 28));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_SENDBEHINDTEXT, _T("Send Behind Text"), 29));

  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_INLINEWITHTEXT, _T("In Line With Text"), 30));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_SQUARE, _T("Square"), 31));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_TIGHT, _T("Tight"), 32));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_BEHINDTEXT, _T("Behind Text"), 33));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_INFRONTOFTEXT, _T("In Front of Text"), 34));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_TOPANDBOTTOM, _T("Top and Bottom"), 35));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_THROUGH, _T("Through"), 36));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_EDITWRAPPOINTS, _T("Edit Wrap Points"), 37));
  pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_MORELAYOUTOPTIONS, _T("More Layout Options"), 38));

  // Pane collapsing fine tuning:
  CArray<int, int> arCollapseOrder;

  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelArrange));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelThemes));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageBackground));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageSetup));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelArrange));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageSetup));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelArrange)); // Setting -1 to the next index
  arCollapseOrder.Add(-1); // means force panel collapse
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelThemes));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageBackground));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageSetup));
  arCollapseOrder.Add(-1);

  pCategory->SetCollapseOrder(arCollapseOrder);
}

void CMainFrame::AddTab_References ( ) [protected]

Definition at line 1047 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("References\ns"), IDB_REFERENCES, IDB_REFERENCESLARGE);

  CMFCRibbonPanel* pPanelRef_TC = pCategory->AddPanel(_T("Table of Contents\nzc"), m_PanelImages.ExtractIcon(18));

  CMFCRibbonButton* pBtn = new CMFCRibbonButton(ID_TABLE_OF_CONTENTS, _T("Table of Contents\nt"), 12, 0);
  pBtn->SetMenu(IDR_DUMMY_MENU);
  pPanelRef_TC->Add(pBtn);

  pBtn = new CMFCRibbonButton(ID_REFERENCES_ADDTEXT, _T("Add Text\na"), 0, -1);
  pBtn->SetMenu(IDR_REFERENCES_ADDTEXT);
  pPanelRef_TC->Add(pBtn);

  pPanelRef_TC->Add(new CMFCRibbonButton(ID_REFERENCES_TC_UPDATETABLE, _T("Update Table\nu"), 1, -1));

  CMFCRibbonPanel* pPanelRef_Footnotes = pCategory->AddPanel(_T("Footnotes\nzf"), m_PanelImages.ExtractIcon(19));

  pPanelRef_Footnotes->Add(new CMFCRibbonButton(ID_REFERENCES_FOOTNOTES_INSERTFOOTNOTE, _T("Insert Footnote\nf"), 13, 1));
  pPanelRef_Footnotes->Add(new CMFCRibbonButton(ID_REFERENCES_FOOTNOTES_INSERTENDNOTE, _T("Insert Endnote\ne"), 2, -1));

  pBtn = new CMFCRibbonButton(ID_REFERENCES_FOOTNOTE_NEXT, _T("Next Footnote\no"), 3, -1);
  pBtn->SetMenu(IDR_REFERENCES_NEXTFOOTNOTE, TRUE);
  pPanelRef_Footnotes->Add(pBtn);

  pPanelRef_Footnotes->Add(new CMFCRibbonButton(ID_REFERENCES_FOOTNOTES_SHOWNOTES, _T("Show Notes\nh"), 4, -1));

  CMFCRibbonPanel* pPanelRef_CB = pCategory->AddPanel(_T("Citations & Bibliography\nzb"), m_PanelImages.ExtractIcon(20));

  pBtn = new CMFCRibbonButton(ID_INSERT_CITATION, _T("Insert Citation\nc"), 14, 2);
  pBtn->SetMenu(IDR_REFERENCES_INSERTCITATION);
  pPanelRef_CB->Add(pBtn);

  pPanelRef_CB->Add(new CMFCRibbonButton(ID_REFERENCES_CB_MANAGESOURCES, _T("Manage Sources\nm"), 5, -1));

  // Add "Style" combo:
  CMFCRibbonComboBox* pStyleCombo = new CMFCRibbonComboBox(ID_REFERENCES_STYLE, TRUE, 45, _T("Style: \nl"), 6);

  pStyleCombo->AddItem(_T("APA"));
  pStyleCombo->AddItem(_T("Style 1"));
  pStyleCombo->AddItem(_T("Style 2"));
  pStyleCombo->AddItem(_T("Style 3"));
  pStyleCombo->AddItem(_T("Style 4"));
  pStyleCombo->SelectItem(0);
  pStyleCombo->EnableDropDownListResize(FALSE);

  pPanelRef_CB->Add(pStyleCombo);

  pPanelRef_CB->Add(new CMFCRibbonButton(ID_REFERENCES_CB_INSERTBIBLIOGRAPHY, _T("Bibliography\nb"), 7, -1));
  pPanelRef_CB->SetElementMenu(ID_REFERENCES_CB_INSERTBIBLIOGRAPHY, IDR_DUMMY_MENU);

  CMFCRibbonPanel* pPanelRef_Captions = pCategory->AddPanel(_T("Captions\nzp"), m_PanelImages.ExtractIcon(21));

  pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_INSERTCAPTION, _T("Insert Caption\np"), 15, 3));
  pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_INSERTTOF, _T("Insert Table of Figures\ng"), 8, -1));
  pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_UPDATETABLE, _T("Update Table\nv"), 1, -1));
  pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_CROSSREFERENCE, _T("Cross-reference\nrf"), 9, -1));

  CMFCRibbonPanel* pPanelRef_Index = pCategory->AddPanel(_T("Index\nzi"), m_PanelImages.ExtractIcon(22));

  pPanelRef_Index->Add(new CMFCRibbonButton(ID_REFERENCES_INDEX_MARKENTRY, _T("Mark Entry\nn"), 16, 4));
  pPanelRef_Index->Add(new CMFCRibbonButton(ID_REFERENCES_INDEX_INSERTINDEX, _T("Insert Index\nx"), 10, -1));
  pPanelRef_Index->Add(new CMFCRibbonButton(ID_REFERENCES_INDEX_UPDATEINDEX, _T("Update Index\nd"), 1, -1));

  CMFCRibbonPanel* pPanelRef_TA = pCategory->AddPanel(_T("Table of Authorities\nza"), m_PanelImages.ExtractIcon(23));

  pPanelRef_TA->Add(new CMFCRibbonButton(ID_REFERENCES_TA_MARKCITATION, _T("Mark Citation\ni"), 17, 5));
  pPanelRef_TA->Add(new CMFCRibbonButton(ID_REFERENCES_TA_INSERTTOA, _T("Insert Table of Authorities\nrt"), 11, -1));
  pPanelRef_TA->Add(new CMFCRibbonButton(ID_REFERENCES_TA_UPDATETABLE, _T("Update Table\nru"), 1, -1));
}

void CMainFrame::AddTab_Review ( ) [protected]

Definition at line 1189 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Review\nr"), IDB_REVIEW, IDB_REVIEWLARGE);

  CMFCRibbonPanel* pPanelProofing = pCategory->AddPanel(_T("Proofing\nzp"), m_PanelImages.ExtractIcon(29));

  pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_SPELLINGGRAMMAR, _T("Spelling && Grammar\ns"), 0, 0));
  pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_RESEARCH, _T("Research\nr"), 1, 1));
  pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_THESAURUS, _T("Thesaurus\ne"), 2, 2));
  pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_TRANSLATE, _T("Translate\nl"), 3, 3));
  pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP, _T("Translation ScreenTip\npt"), 4, -1));
  pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_SETLANGUAGE, _T("Set Language\nu"), 5, -1));
  pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_WORDCOUNT, _T("Word Count\nw"), 6, -1));

  pPanelProofing->SetElementMenu(ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP, IDR_DUMMY_MENU);

  CMFCRibbonPanel* pPanelComments = pCategory->AddPanel(_T("Comments\nzc"), m_PanelImages.ExtractIcon(30));

  pPanelComments->Add(new CMFCRibbonButton(ID_REVIEW_COMMENTS_NEWCOMMENT, _T("New Comment\nc"), 7, 4));

  CMFCRibbonButton* pDeleteBtn = new CMFCRibbonButton(ID_REVIEW_COMMENTS_DELETE, _T("Delete\nd"), 8, 5);
  pDeleteBtn->SetMenu(IDR_REVIEW_COMMENTS_DELETE, TRUE);
  pPanelComments->Add(pDeleteBtn);

  pPanelComments->Add(new CMFCRibbonButton(ID_REVIEW_COMMENTS_PREVIOUS, _T("Previous\nzv"), 9, 6));
  pPanelComments->Add(new CMFCRibbonButton(ID_REVIEW_COMMENTS_NEXT, _T("Next\nzn"), 10, 7));

  CMFCRibbonPanel* pPanelTracking = pCategory->AddPanel(_T("Tracking\nzt"), m_PanelImages.ExtractIcon(31));

  CMFCRibbonButton* pTCButton = new CMFCRibbonButton(ID_REVIEW_TRACKING_TRACKCHANGES, _T("Track Changes\ng"), 11, 8);
  pTCButton->SetMenu(IDR_REVIEW_TRACKING_TRACKCHANGES, TRUE);
  pTCButton->SetAlwaysLargeImage();
  pPanelTracking->Add(pTCButton);

  CMFCRibbonButton* pBalloonsBtn = new CMFCRibbonButton(ID_REVIEW_TRACKING_BALLOONS, _T("Balloons\ntb"), 12, 9);
  pBalloonsBtn->SetMenu(IDR_REVIEW_TRACKING_BALLOONS);
  pBalloonsBtn->SetAlwaysLargeImage();
  pPanelTracking->Add(pBalloonsBtn);

  CMFCRibbonComboBox* pDisplayCombo = new CMFCRibbonComboBox(ID_REVIEW_TRACKING_DISPLAYFORREVIEW, FALSE, 149, NULL, 13);
  pDisplayCombo->EnableDropDownListResize(FALSE);
  pDisplayCombo->AddItem(_T("Final Showing Markup"));
  pDisplayCombo->AddItem(_T("Final"));
  pDisplayCombo->AddItem(_T("Original Showing Markup"));
  pDisplayCombo->AddItem(_T("Original"));
  pDisplayCombo->SelectItem(0);
  pDisplayCombo->SetKeys(_T("td"));
  pPanelTracking->Add(pDisplayCombo);

  CMFCRibbonButton* pShowBtn = new CMFCRibbonButton(ID_REVIEW_TRACKING_SHOW_MARKUP, _T("Show Markup\ntm"), 14, -1);
  pShowBtn->SetMenu(IDR_REVIEW_TRACKING_SHOW);
  pPanelTracking->Add(pShowBtn);

  CMFCRibbonButton* pPaneBtn = new CMFCRibbonButton(ID_REVIEW_TRACKING_REVIEWINGPANE, _T("Reviewing Pane\ntp"), 15, -1);
  pPaneBtn->SetMenu(IDR_REVIEW_TRACKING_REVIEWINGPANE, TRUE);
  pPanelTracking->Add(pPaneBtn);

  CMFCRibbonPanel* pPanelChanges = pCategory->AddPanel(_T("Changes\nzh"), m_PanelImages.ExtractIcon(32));

  pPanelChanges->SetCenterColumnVert();

  CMFCRibbonButton* pAcceptBtn = new CMFCRibbonButton(ID_REVIEW_CHANGES_ACCEPT, _T("Accept\na"), 16, 10);
  pAcceptBtn->SetMenu(IDR_REVIEW_CHANGES_ACCEPT, TRUE);
  pPanelChanges->Add(pAcceptBtn);

  CMFCRibbonButton* pRejectBtn = new CMFCRibbonButton(ID_REVIEW_CHANGES_REJECT, _T("Reject\nj"), 17, 11);
  pRejectBtn->SetMenu(IDR_REVIEW_CHANGES_REJECT, TRUE);
  pPanelChanges->Add(pRejectBtn);

  pPanelChanges->Add(new CMFCRibbonButton(ID_REVIEW_CHANGES_PREVIOUS, _T("Previous\nf"), 18, -1));
  pPanelChanges->Add(new CMFCRibbonButton(ID_REVIEW_CHANGES_NEXT, _T("Next\nh"), 19, -1));

  CMFCRibbonPanel* pPanelCompare = pCategory->AddPanel(_T("Compare\nzm"), m_PanelImages.ExtractIcon(33));

  CMFCRibbonButton* pCompareBtn = new CMFCRibbonButton(ID_REVIEW_COMPARE_COMPARE, _T("Compare\nm"), 20, 12);
  pCompareBtn->SetMenu(IDR_REVIEW_COMPARE_COMPARE_COMPARE);
  pPanelCompare->Add(pCompareBtn);

  CMFCRibbonButton* pShowSrcBtn = new CMFCRibbonButton(ID_REVIEW_COMPARE_SHOWSOURCE, _T("Show Source Documents\no"), 21, 13);
  pShowSrcBtn->SetMenu(IDR_REVIEW_COMPARE_SHOWSOURCE);
  pPanelCompare->Add(pShowSrcBtn);

  CMFCRibbonPanel* pPanelProtect = pCategory->AddPanel(_T("Protect\nzr"), m_PanelImages.ExtractIcon(34));

  pPanelProtect->Add(new CMFCRibbonButton(ID_REVIEW_PROTECT, _T("Protect Document\npr"), 22, 14));

  pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_TRACKING_REVIEWINGPANE_VERTICAL, _T("Reviewing Pane Vertical\nrv"), 15));
  pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_TRACKING_REVIEWINGPANE_HORIZONTAL, _T("Reviewing Pane Horizontal\nrh"), 23));
  pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_CHANGES_ACCEPT_CHANGE, _T("Accept Change\nac"), 16));
  pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_CHANGES_REJECT_CHANGE, _T("Reject Change\nrc"), 17));

  pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_COMPARE_COMPARE_COMPARE, _T("Compare\ncp"), 24));
  pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_COMPARE_COMPARE_COMBINE, _T("Combine\ncb"), 25));
}

void CMainFrame::AddTab_View ( ) [protected]

Definition at line 1284 of file MainFrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("View\nw"), IDB_VIEW, IDB_VIEWLARGE);

  CMFCRibbonPanel* pPanelDocViews = pCategory->AddPanel(_T("Document Views\nzv"), m_PanelImages.ExtractIcon(35));

  pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_PRINTLAYOUT, _T("Print Layout\np"), 7, 0));
  pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_FULLSCREEN, _T("Full Screen Reading\nf"), 4, 1));
  pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_WEBLAYOUT, _T("Web Layout\nl"), 12, 2));
  pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_OUTLINE, _T("Outline\nu"), 6, 3));
  pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_DRAFT, _T("Draft\ne"), 3, 4));

  CMFCRibbonPanel* pPanelShowHide = pCategory->AddPanel(_T("Show/Hide\nzs"), m_PanelImages.ExtractIcon(36));

  pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_RULER, _T("Ruler\nr")));
  pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_GRIDLINES, _T("Gridlines\ng")));
  pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_MESSAGEBAR, _T("Message Bar\nd")));
  pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_DOCUMENTMAP, _T("Document Map\nvm")));
  pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_TRUMBNAILS, _T("Thumbnails\nh")));

  CMFCRibbonPanel* pPanelZoom = pCategory->AddPanel(_T("Zoom\nzz"), m_PanelImages.ExtractIcon(37));

  pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM, _T("Zoom\nq"), 13, 5));
  pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_100, _T("100%\nj"), 2, 10));
  pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_ONE_PAGE, _T("One Page\n1"), 14));
  pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_TWO_PAGES, _T("Two Pages\n2"), 15));
  pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_PAGE_WIDTH, _T("Page Width\ni"), 16));

  CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel(_T("Window\nzw"), m_PanelImages.ExtractIcon(38));

  pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_NEWWINDOW, _T("New Window\nn"), 5, 6));
  pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_ARRANGEALL, _T("Arrange All\na"), 0, 7));
  pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_SPLIT, _T("Split\ns"), 9, 8));
  pPanelWindow->AddSeparator();
  pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_COMPARE, _T("View Side by Side\nb"), 11));
  pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_SYNCSCROLLING, _T("Synchronous Scrolling\nvs"), 10));
  pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_RESETWINDOW, _T("Reset Window Position\nt"), 8));
  pPanelWindow->AddSeparator();

  CMFCRibbonButton* pWindowsBtn = new CMFCRibbonButton(ID_VIEW_SWITCHWINDOW, _T("Switch Windows\nw"), 1, 9);
  pWindowsBtn->SetAlwaysLargeImage();
  pWindowsBtn->SetMenu(IDR_DUMMY_MENU);
  pPanelWindow->Add(pWindowsBtn);

  CMFCRibbonPanel* pPanelMacros = pCategory->AddPanel(_T("Macros\nzm"), m_PanelImages.ExtractIcon(39));
  pPanelMacros->Add(new CMFCRibbonButton(ID_VIEW_MACROS, _T("Macros\nm"), -1, 11));

  // Pane collapsing fine tuning:
  CArray<int, int> arCollapseOrder;

  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelWindow));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelDocViews));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelWindow));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelZoom));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelShowHide));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelZoom));
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelWindow));
  arCollapseOrder.Add(-1); // Force PanelWindow collapse
  arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelDocViews));
  arCollapseOrder.Add(-1); // Force PanelDocViews collapse

  pCategory->SetCollapseOrder(arCollapseOrder);
}

void CMainFrame::AddWorkSpace | ( | const CString & | strName,
 |  | const int | iIconIndex,
 |  | const UINT | uiCmd,
 |  | CMFCOutlookBarPane & | pane,
 |  | const UINT | uiNewCmdID,
 |  | CImageList & | images |
 | ) |  |  | [protected]

Definition at line 404 of file MainFrm.cpp.

{
  pane.AddButton(images.ExtractIcon(iIconIndex), strName, uiCmd);

  BOOL bIsAlreadyExist = FALSE;
  for (POSITION pos = m_lstWorkspaces.GetHeadPosition(); pos != NULL;)
  {
    CWorkspaceObj* pWS = (CWorkspaceObj*) m_lstWorkspaces.GetNext(pos);
    ASSERT_VALID(pWS);

    if (pWS->m_uiCmd == uiCmd)
    {
      bIsAlreadyExist = TRUE;
      break;
    }
  }

  if (!bIsAlreadyExist)
  {
    m_lstWorkspaces.AddTail(new CWorkspaceObj(strName, uiCmd, iIconIndex, uiNewCmdID));
  }
}

void CMainFrame::AdjustClientArea ( ) [virtual]

Definition at line 1413 of file MainFrm.cpp.

{
  if (m_pPrintPreviewFrame != NULL)
  {
    CFrameWndEx::AdjustClientArea();
    return;
  }

  CWnd* pChildWnd = GetDlgItem(AFX_IDW_PANE_FIRST);
  if (pChildWnd != NULL)
  {
    CRect rectClientAreaBounds = m_dockManager.GetClientAreaBounds();

    rectClientAreaBounds.left += m_rectBorder.left;
    rectClientAreaBounds.top  += m_rectBorder.top;
    rectClientAreaBounds.right -= m_rectBorder.right;
    rectClientAreaBounds.bottom -= m_rectBorder.bottom;

    if (rectClientAreaBounds.Width() > 100 && rectClientAreaBounds.Height() > 100)
    {
      m_rectFill = rectClientAreaBounds;
      rectClientAreaBounds.DeflateRect(40, 20, 40, 20);
    }
    else
    {
      m_rectFill.SetRectEmpty();
    }

    pChildWnd->CalcWindowRect(rectClientAreaBounds);

    if (!pChildWnd->IsKindOf(RUNTIME_CLASS(CSplitterWnd)))
    {
      pChildWnd->ModifyStyle(0, WS_CLIPCHILDREN | WS_CLIPSIBLINGS);

      if (!m_rectFill.IsRectEmpty())
      {
        pChildWnd->ModifyStyleEx(WS_EX_CLIENTEDGE, 0);
        pChildWnd->ModifyStyle(0, WS_BORDER);
      }
    }
    else
    {
      pChildWnd->ModifyStyle(0, WS_CLIPSIBLINGS);
    }

    pChildWnd->SetWindowPos(&wndBottom, rectClientAreaBounds.left, rectClientAreaBounds.top, rectClientAreaBounds.Width(), rectClientAreaBounds.Height(), SWP_NOACTIVATE);
  }

  if (!m_rectFill.IsRectEmpty())
  {
    RedrawWindow(m_rectFill);
  }
}

void CMainFrame::AdjustColorsMenu | ( | CMFCPopupMenu * | pMenuPopup,
 |  | UINT | uiId |
 | ) |  |  | [protected]

Definition at line 598 of file mainfrm.cpp.

{
  CMFCPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar ();
  ASSERT (pMenuBar != NULL);
  if (pMenuBar == NULL)
  {
    return;
  }

  int iIndex = pMenuBar->CommandToIndex (uiID);
  if (iIndex < 0)
  {
    return;
  }

  if (DYNAMIC_DOWNCAST (CMFCColorMenuButton, pMenuBar->GetButton (iIndex)) != NULL)
  {
    return;
  }

  CMFCColorMenuButton* pColorButton = m_wndFormatBar.CreateColorButton ();
  pMenuBar->ReplaceButton (ID_CHAR_COLOR, *pColorButton, TRUE);
  delete pColorButton;
}

void CMainFrame::AdjustDockingLayout ( HDWP hdwp = NULL ) [virtual]

Definition at line 623 of file MainFrm.cpp.

{
  CFrameWnd::AdjustDockingLayout(hdwp);
  if (m_wndFolderList.GetSafeHwnd() != NULL)
  {
    m_wndCaption.EnableButton(!(m_wndFolderList.GetStyle() & WS_VISIBLE));
  }
}

void CMainFrame::AdjustObjectSubmenu ( CMFCPopupMenu * pMenuPopup ) [protected]
void CMainFrame::AdjustObjectSubmenu ( CMFCPopupMenu * pMenuPopup ) [private]

Definition at line 574 of file mainfrm.cpp.

{
  ASSERT(pMenuPopup != NULL);

  if (pMenuPopup == NULL || pMenuPopup->GetParentPopupMenu() != NULL)
  {
    return;
  }

  CMFCPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar();
  ASSERT(pMenuBar != NULL);
  if (!pMenuBar)
  {
    return;
  }

  int iIndex = pMenuBar->CommandToIndex(ID_OLE_VERB_FIRST);
  if (iIndex < 0)
  {
    return;
  }

  CFrameWnd* pFrame = GetActiveFrame();

  if (pFrame == NULL)
  {
    return;
  }

  CDrawDoc* pDoc = (CDrawDoc*)pFrame->GetActiveDocument();
  ASSERT_VALID(pDoc);

  // check for single selection
  COleClientItem* pItem = pDoc->GetPrimarySelectedItem(pFrame->GetActiveView());
  if (pItem == NULL || pItem->GetType() == OT_STATIC)
  {
    // no selection, or is 'static' item
    return;
  }

  // only include Convert... if there is a handler for ID_OLE_EDIT_CONVERT
  UINT nConvertID = ID_OLE_EDIT_CONVERT;
  AFX_CMDHANDLERINFO info;
  if (!pDoc->OnCmdMsg(ID_OLE_EDIT_CONVERT, CN_COMMAND, NULL, &info))
    nConvertID = 0;

  HMENU hMenu = pMenuBar->ExportToMenu();
  ASSERT(hMenu != NULL);
  if (hMenu == NULL)
  {
    return;
  }

  // update the menu
  AfxOleSetEditMenu(pItem, CMenu::FromHandle(hMenu), iIndex, ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, nConvertID);

  pMenuBar->ImportFromMenu(hMenu);
  ::DestroyMenu(hMenu);
}

int CMainFrame::BuildFavoritesMenu | ( | LPCTSTR | pszPath,
 |  | int | nStartPos,
 |  | CMenu * | pMenu
 | ) |  |

Definition at line 237 of file MainFrm.cpp.

{
  CString         strPath(pszPath);
  CString         strPath2;
  CString         str;
  WIN32_FIND_DATA wfd;
  HANDLE          h;
  int             nPos = 0;
  int             nEndPos = 0;
  int             nNewEndPos = 0;
  int             nLastDir = 0;
  TCHAR           buf[INTERNET_MAX_PATH_LENGTH];
  CStringArray    astrFavorites;
  CStringArray    astrDirs;
  CMenu*          pSubMenu;

  // make sure there's a trailing backslash
  if(strPath[strPath.GetLength() - 1] != _T('\\'))
    strPath += _T('\\');
  strPath2 = strPath;
  strPath += "*.*";

  // now scan the directory, first for .URL files and then for subdirectories
  // that may also contain .URL files
  h = FindFirstFile(strPath, &wfd);
  if(h != INVALID_HANDLE_VALUE)
  {
    nEndPos = nStartPos;
    do
    {
      if((wfd.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM))==0)
      {
        str = wfd.cFileName;
        if(str.Right(4) == _T(".url"))
        {
          // an .URL file is formatted just like an .INI file, so we can
          // use GetPrivateProfileString() to get the information we want
          DWORD dwSize;
          dwSize = ::GetPrivateProfileString(_T("InternetShortcut"), _T("URL"),
                     _T(""), buf, INTERNET_MAX_PATH_LENGTH,
                     strPath2 + str);
          if (dwSize < INTERNET_MAX_PATH_LENGTH &&
              buf[dwSize] == '\0')
          {
            str = str.Left(str.GetLength() - 4);

            // scan through the array and perform an insertion sort
            // to make sure the menu ends up in alphabetic order
            for(nPos = nStartPos ; nPos < nEndPos ; ++nPos)
            {
              if(str.CompareNoCase(astrFavorites[nPos]) < 0)
                break;
            }
            astrFavorites.InsertAt(nPos, str);
            m_astrFavoriteURLs.InsertAt(nPos, buf);
            ++nEndPos;
          }
        }
      }
    } while(FindNextFile(h, &wfd));
    FindClose(h);
    // Now add these items to the menu
    for(nPos = nStartPos ; nPos < nEndPos ; ++nPos)
    {
      pMenu->AppendMenu(MF_STRING | MF_ENABLED, 0xe00 + nPos, astrFavorites[nPos]);
    }

    // now that we've got all the .URL files, check the subdirectories for more
    nLastDir = 0;
    h = FindFirstFile(strPath, &wfd);
    ASSERT(h != INVALID_HANDLE_VALUE);
    do
    {
      if(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
      {
        // ignore the current and parent directory entries
        if(lstrcmp(wfd.cFileName, _T(".")) == 0 || lstrcmp(wfd.cFileName, _T("..")) == 0)
          continue;

        for(nPos = 0 ; nPos < nLastDir ; ++nPos)
        {
          if(astrDirs[nPos].CompareNoCase(wfd.cFileName) > 0)
            break;
        }
        pSubMenu = new CMenu;
        pSubMenu->CreatePopupMenu();

        // call this function recursively.
        nNewEndPos = BuildFavoritesMenu(strPath2 + wfd.cFileName, nEndPos, pSubMenu);
        if(nNewEndPos != nEndPos)
        {
          // only intert a submenu if there are in fact .URL files in the subdirectory
          nEndPos = nNewEndPos;
          pMenu->InsertMenu(nPos, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)pSubMenu->m_hMenu, wfd.cFileName);
          pSubMenu->Detach();
          astrDirs.InsertAt(nPos, wfd.cFileName);
          ++nLastDir;
        }
        delete pSubMenu;
      }
    } while(FindNextFile(h, &wfd));
    FindClose(h);
  }
  return nEndPos;
}

BOOL CMainFrame::CreateCaptionBar ( ) [protected]

Definition at line 530 of file MainFrm.cpp.

{
  if (!m_wndCaption.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, this, ID_VIEW_CAPTIONBAR, -1))
  {
    TRACE0("Failed to create caption bar\n");
    return FALSE;
  }

  m_wndCaption.SetFlatBorder();
  m_wndCaption.SetFont(&afxGlobalData.fontBold);

  return TRUE;
}

int CMainFrame::CreateComboBox ( ) [protected]

Definition at line 128 of file mainfrm.cpp.

{
  CRect rect, comboRect;
  m_wndToolBar.SetButtonInfo(8, IDW_COMBO, TBBS_SEPARATOR, COMBO_WIDTH);
  m_wndToolBar.GetItemRect(8, &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;
}

BOOL CMainFrame::CreateDockingBars ( ) [protected]

Definition at line 485 of file MainFrm.cpp.

{
  // Crate class view:
  if (!m_wndClassView.Create(_T("Class View"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_CLASS, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
  {
    TRACE0("Failed to create Class View bar\n");
    return FALSE;      // fail to create
  }

  // Create resource view:
  if (!m_wndResourceView.Create(_T("Resource View"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_RESOURCE, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
  {
    TRACE0("Failed to create Resource View bar\n");
    return FALSE;      // fail to create
  }

  // Create file view:
  if (!m_wndFileView.Create(_T("Solution Explorer"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_FILE, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT| CBRS_FLOAT_MULTI))
  {
    TRACE0("Failed to create Solution Explorer bar\n");
    return FALSE;      // fail to create
  }

  //////////////////////////////////New Output////////////////////////////////////////
  if (!m_wndOutputView.Create(_T("Output"), this, CRect(0, 0, 100, 100), TRUE, ID_VIEW_OUTPUT, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
  {
    TRACE0("Failed to create output bar\n");
    return FALSE;      // fail to create
  }

  if (!m_wndDynamicHelpView.Create(_T("Dynamic Help"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_DYNAMICHELP, WS_CHILD | WS_VISIBLE | CBRS_RIGHT | CBRS_FLOAT_MULTI))
  {
    TRACE0("Failed to create Dynamic Help Bar\n");
    return FALSE; // fail to create
  }

  // Create watch bar:
  if (!m_wndWatchBar.Create(_T("Watch"), this, CRect(0, 0, 100, 100), TRUE, ID_VIEW_WATCH, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
  {
    TRACE0("Failed to create watch bar\n");
    return FALSE;      // fail to create
  }

  if (!m_wndPropertiesBar.Create(_T("Properties"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_PROPERTIES, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT | CBRS_FLOAT_MULTI))
  {
    TRACE0("Failed to create Properties Bar\n");
    return FALSE; // fail to create
  }

  SetDockingBarsIcons(FALSE);

  return TRUE;
}

void CMainFrame::CreateDocumentColors ( ) [protected]
void CMainFrame::CreateDocumentColors ( ) [protected]
void CMainFrame::CreateDocumentColors ( ) [protected]

Definition at line 792 of file mainfrm.cpp.

{
  typedef struct
  {
    COLORREF color;
    TCHAR* szName;
  }
  ColorTableEntry;

  int i = 0;
  int nNumColours = 0;

  static ColorTableEntry colorsMain [] =
  {
    { RGB(255, 255, 255), _T("White, Background 1") },
    { RGB(0, 0, 0), _T("Black, Text 1") },
    { RGB(238, 236, 225), _T("Tan, Background 2") },
    { RGB(31, 73, 125), _T("Dark Blue, Text 2") },
    { RGB(79, 129, 189), _T("Blue, Accent 1") },
    { RGB(192, 80, 77), _T("Red, Accent 2") },
    { RGB(155, 187, 89), _T("Olive Green, Accent 3") },
    { RGB(128, 100, 162), _T("Purple, Accent 4") },
    { RGB(75, 172, 198), _T("Aqua, Accent 5") },
    { RGB(245, 150, 70), _T("Orange, Accent 6") }
  };

  static ColorTableEntry colorsAdditional [] =
  {
    { RGB(242, 242, 242), _T("White, Background 1, Darker 5%") },
    { RGB(127, 127, 127), _T("Black, Text 1, Lighter 50%") },
    { RGB(214, 212, 202), _T("Tan, Background 2, Darker 10%") },
    { RGB(210, 218, 229), _T("Dark Blue, Text 2, Lighter 80%") },
    { RGB(217, 228, 240), _T("Blue, Accent 1, Lighter 80%") },
    { RGB(244, 219, 218), _T("Red, Accent 2, Lighter 80%") },
    { RGB(234, 241, 221), _T("Olive Green, Accent 3, Lighter 80%")},
    { RGB(229, 223, 235), _T("Purple, Accent 4, Lighter 80%") },
    { RGB(216, 237, 242), _T("Aqua, Accent 5, Lighter 80%") },
    { RGB(255, 234, 218), _T("Orange, Accent 6, Lighter 80%") },
    { RGB(215, 215, 215), _T("White, Background 1, Darker 15%") },
    { RGB(89, 89, 89), _T("Black, Text 1, Lighter 35%") },
    { RGB(177, 176, 167), _T("Tan, Background 2, Darker 25%") },
    { RGB(161, 180, 201), _T("Dark Blue, Text 2, Lighter 60%") },
    { RGB(179, 202, 226), _T("Blue, Accent 1, Lighter 60%") },
    { RGB(233, 184, 182), _T("Red, Accent 2, Lighter 60%") },
    { RGB(213, 226, 188), _T("Olive Green, Accent 3, Lighter 60%")},
    { RGB(203, 191, 215), _T("Purple, Accent 4, Lighter 60%") },
    { RGB(176, 220, 231), _T("Aqua, Accent 5, Lighter 60%") },
    { RGB(255, 212, 181), _T("Orange, Accent 6, Lighter 60%") },
    { RGB(190, 190, 190), _T("White, Background 1, Darker 25%") },
    { RGB(65, 65, 65), _T("Black, Text 1, Lighter 25%") },
    { RGB(118, 117, 112), _T("Tan, Background 2, Darker 35%") },
    { RGB(115, 143, 175), _T("Dark Blue, Text 2, Lighter 40%") },
    { RGB(143, 177, 213), _T("Blue, Accent 1, Lighter 40%") },
    { RGB(222, 149, 147), _T("Red, Accent 2, Lighter 40%") },
    { RGB(192, 213, 155), _T("Olive Green, Accent 3, Lighter 40%")},
    { RGB(177, 160, 197), _T("Purple, Accent 4, Lighter 40%") },
    { RGB(137, 203, 218), _T("Aqua, Accent 5, Lighter 40%") },
    { RGB(255, 191, 145), _T("Orange, Accent 6, Lighter 40%") },
    { RGB(163, 163, 163), _T("White, Background 1, Darker 35%") },
    { RGB(42, 42, 42), _T("Black, Text 1, Lighter 15%") },
    { RGB(61, 61, 59), _T("Tan, Background 2, Darker 50%") },
    { RGB(20, 57, 92), _T("Dark Blue, Text 2, Darker 25%") },
    { RGB(54, 96, 139), _T("Blue, Accent 1, Darker 25%") },
    { RGB(149, 63, 60), _T("Red, Accent 2, Darker 25%") },
    { RGB(114, 139, 71), _T("Olive Green, Accent 3, Darker 25%") },
    { RGB(97, 76, 119), _T("Purple, Accent 4, Darker 25%") },
    { RGB(41, 128, 146), _T("Aqua, Accent 5, Darker 25%") },
    { RGB(190, 112, 59), _T("Orange, Accent 6, Darker 25%") },
    { RGB(126, 126, 126), _T("White, Background 1, Darker 50%") },
    { RGB(20, 20, 20), _T("Black, Text 1, Lighter 5%") },
    { RGB(29, 29, 28), _T("Tan, Background 2, Darker 90%") },
    { RGB(17, 40, 64), _T("Dark Blue, Text 2, Darker 50%") },
    { RGB(38, 66, 94), _T("Blue, Accent 1, Darker 50%") },
    { RGB(100, 44, 43), _T("Red, Accent 2, Darker 50%") },
    { RGB(77, 93, 49), _T("Olive Green, Accent 3, Darker 50%") },
    { RGB(67, 53, 81), _T("Purple, Accent 4, Darker 50%") },
    { RGB(31, 86, 99), _T("Aqua, Accent 5, Darker 50%") },
    { RGB(126, 77, 42), _T("Orange, Accent 6, Darker 50%") },
  };

  static ColorTableEntry colorsStandard [] =
  {
    { RGB(200, 15, 18), _T("Dark Red") },
    { RGB(255, 20, 24), _T("Red") },
    { RGB(255, 191, 40), _T("Orange") },
    { RGB(255, 255, 49), _T("Yellow") },
    { RGB(138, 207, 87), _T("Light Green") },
    { RGB(0, 175, 84), _T("Green") },
    { RGB(0, 174, 238), _T("Light Blue") },
    { RGB(0, 111, 189), _T("Blue") },
    { RGB(0, 36, 95), _T("Black") },
    { RGB(114, 50, 157), _T("Purple") },
  };

  m_lstMainColors.RemoveAll();
  nNumColours = sizeof(colorsMain) / sizeof(ColorTableEntry);

  for (i = 0; i < nNumColours; i++)
  {
    m_lstMainColors.AddTail(colorsMain [i].color);
    CMFCRibbonColorButton::SetColorName(colorsMain [i].color, colorsMain [i].szName);
  };

  m_lstAdditionalColors.RemoveAll();
  nNumColours = sizeof(colorsAdditional) / sizeof(ColorTableEntry);

  for (i = 0; i < nNumColours; i++)
  {
    m_lstAdditionalColors.AddTail(colorsAdditional [i].color);
    CMFCRibbonColorButton::SetColorName(colorsAdditional [i].color, colorsAdditional [i].szName);
  };

  m_lstStandardColors.RemoveAll();
  nNumColours = sizeof(colorsStandard) / sizeof(ColorTableEntry);

  for (i = 0; i < nNumColours; i++)
  {
    m_lstStandardColors.AddTail(colorsStandard [i].color);
    CMFCRibbonColorButton::SetColorName(colorsStandard [i].color, colorsStandard [i].szName);
  };
}

virtual CMDIChildWndEx* CMainFrame::CreateDocumentWindow | ( | LPCTSTR | lpcszDocName,
 |  | CObject * |  |
 | ) |  |  | [protected, virtual]
virtual CMDIChildWndEx* CMainFrame::CreateDocumentWindow | ( | LPCTSTR | lpcszDocName,
 |  | CObject * |  |
 | ) |  |  | [protected, virtual]
CMDIChildWndEx * CMainFrame::CreateDocumentWindow ( LPCTSTR lpcszDocName )

Definition at line 624 of file MainFrm.cpp.

{
  if (lpcszDocName != NULL && lpcszDocName [0] != '\0')
  {
    CDocument* pDoc = AfxGetApp()->OpenDocumentFile (lpcszDocName);

    if (pDoc != NULL)
    {
      POSITION pos = pDoc->GetFirstViewPosition();

      if (pos != NULL)
      {
        CView* pView = pDoc->GetNextView (pos);
        return DYNAMIC_DOWNCAST (CMDIChildWndEx, pView->GetParent ());
      }
    }
  }
  return NULL;
}

CMDIChildWndEx * CMainFrame::CreateDocumentWindow | ( | LPCTSTR | lpcszDocName,
 |  | CObject * |  |
 | ) |  |  | [protected, virtual]

Definition at line 321 of file MainFrm.cpp.

{
  if (lpcszDocName != NULL && lpcszDocName [0] != '\0')
  {
    CDocument* pDoc = AfxGetApp()->OpenDocumentFile (lpcszDocName);

    if (pDoc != NULL)
    {
      POSITION pos = pDoc->GetFirstViewPosition();

      if (pos != NULL)
      {
        CView* pView = pDoc->GetNextView (pos);
        if (pView == NULL)
        {
          return NULL;
        }

        return DYNAMIC_DOWNCAST (CMDIChildWndEx, pView->GetParent ());
      }
    }
  }

  return NULL;
}

virtual CMDIChildWndEx* CMainFrame::CreateDocumentWindow | ( | LPCTSTR | lpcszDocName,
 |  | CObject * | pObj |
 | ) |  |  | [protected, virtual]
BOOL CMainFrame::CreateEditBar ( )

Definition at line 153 of file MainFrm.cpp.

{

  CRect rect;
  const int nDropHeight = 200;

static int nFontSizes[] =
  {1, 2, 3, 4, 5, 6, 7};

  if (!m_wndEditBar.Create(this) ||
    !m_wndEditBar.LoadToolBar(ID_TOOLBAR_EDITING))
  {
    TRACE0("Failed to create stylebar\n");
    return FALSE;       // fail to create
  }

  CToolBarCtrl& tbCtrl = m_wndEditBar.GetToolBarCtrl();
  tbCtrl.ModifyStyle(0, TBSTYLE_FLAT);

  m_wndEditBar.SetBarStyle(m_wndEditBar.GetBarStyle() |
    CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);

  // Create the font name combo box
  m_wndEditBar.SetButtonInfo(0, ID_FMTBAR_FONTNAME, TBBS_SEPARATOR, 150);

  // Design guide advises 12 pixel gap between combos and buttons
  m_wndEditBar.GetItemRect(0, &rect);
  rect.top = 3;
  rect.bottom = rect.top + nDropHeight;
  if (!m_wndEditBar.m_fontNameCombo.Create(
      CBS_DROPDOWN|WS_VSCROLL|CBS_SORT |WS_VISIBLE|WS_TABSTOP,
      rect, &m_wndEditBar, ID_FMTBAR_FONTNAME))
  {
    TRACE0("Failed to create combo-box\n");
    return FALSE;
  }

  //  Fill the combo box
  ::EnumFontFamilies(GetDC()->m_hDC, (LPTSTR) NULL, (FONTENUMPROC)NEnumFontNameProc, (LPARAM)&(m_wndEditBar.m_fontNameCombo));

  // Create the fontsize combo box
  m_wndEditBar.SetButtonInfo(1, ID_FMTBAR_FONTSIZE, TBBS_SEPARATOR, 50);

  m_wndEditBar.GetItemRect(1, &rect);
  rect.top = 3;
  rect.bottom = rect.top + nDropHeight;
  rect.left += 5;
  if (!m_wndEditBar.m_fontSizeCombo.Create(
      CBS_DROPDOWNLIST|WS_VISIBLE|WS_TABSTOP,
      rect, &m_wndEditBar, ID_FMTBAR_FONTSIZE))
  {
    TRACE0("Failed to create combo-box\n");
    return FALSE;
  }

  CString str;
  for (int i = 0; i < sizeof(nFontSizes)/sizeof(int); i++)
  {
    str.Format(_T("%d"), nFontSizes[i]);
    m_wndEditBar.m_fontSizeCombo.AddString(str);
  }

  // set dropdown style on tag format button and font color button
  m_wndEditBar.SetButtonStyle(3, TBSTYLE_DROPDOWN);
  m_wndEditBar.SetButtonStyle(8, TBSTYLE_DROPDOWN);

  m_wndEditBar.m_font.Attach(GetStockObject(DEFAULT_GUI_FONT));
  m_wndEditBar.m_fontNameCombo.SetFont(&m_wndEditBar.m_font);
  m_wndEditBar.m_fontSizeCombo.SetFont(&m_wndEditBar.m_font);

  m_wndEditBar.m_fontNameCombo.SetCurSel(-1);
  m_wndEditBar.m_fontSizeCombo.SetCurSel(-1);

  return TRUE;

}

void CMainFrame::CreateFontsList ( ) [protected]

Definition at line 1823 of file MainFrm.cpp.

{
  m_arFonts.RemoveAll();

  {
    CRibbonListFontButton::XItem item;

    item.m_Caption = _T("Office Classic");
    _tcscpy_s(item.m_Font[0].lfFaceName, _countof(item.m_Font[0].lfFaceName), _T("Arial"));
    _tcscpy_s(item.m_Font[1].lfFaceName, _countof(item.m_Font[1].lfFaceName), _T("Times New Roman"));

    m_arFonts.Add(item);
  }

  {
    CRibbonListFontButton::XItem item;

    item.m_Caption = _T("Office Classic 2");
    _tcscpy_s(item.m_Font[0].lfFaceName, _countof(item.m_Font[0].lfFaceName), _T("Arial"));
    _tcscpy_s(item.m_Font[1].lfFaceName, _countof(item.m_Font[1].lfFaceName), _T("Arial"));

    m_arFonts.Add(item);
  }

  {
    CRibbonListFontButton::XItem item;

    item.m_Caption = _T("Aspect");
    _tcscpy_s(item.m_Font[0].lfFaceName, _countof(item.m_Font[0].lfFaceName), _T("Verdana"));
    _tcscpy_s(item.m_Font[1].lfFaceName, _countof(item.m_Font[1].lfFaceName), _T("Verdana"));

    m_arFonts.Add(item);
  }
}

BOOL CMainFrame::CreateFormatBar ( ) [protected]

Definition at line 233 of file mainfrm.cpp.

{
  UINT nID = theApp.m_bLargeIcons ? IDB_FORMATBAR_BIG : IDB_FORMATBAR;
  if (!m_wndFormatBar.Create(this,
    WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC,
    ID_VIEW_FORMATBAR) ||
    !m_wndFormatBar.LoadBitmap(nID) ||
    !m_wndFormatBar.SetButtons(format, sizeof(format)/sizeof(UINT)))
  {
    TRACE0("Failed to create FormatBar\n");
    return FALSE;      // fail to create
  }

  if (theApp.m_bLargeIcons)
    m_wndFormatBar.SetSizes(CSize(31,30), CSize(24,24));
  else
    m_wndFormatBar.SetSizes(CSize(23,22), CSize(16,16));
  CString str;
  str.LoadString(IDS_TITLE_FORMATBAR);
  m_wndFormatBar.SetWindowText(str);
  m_wndFormatBar.PositionCombos();
  return TRUE;
}

BOOL CMainFrame::CreateFormatBar ( ) [protected]
BOOL CMainFrame::CreateMenuBar ( ) [protected]

Definition at line 233 of file mainfrm.cpp.

{
  //----------------------------------------------
  // Create menu bar (replaces the standard menu):
  //----------------------------------------------
  if (!m_wndMenuBar.Create (this/*, WS_CHILD | WS_VISIBLE | CBRS_TOP, uiMenuBarId*/))
  {
    TRACE0("Failed to create menubar\n");
    return FALSE;
  }

  m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() |
    CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC | CBRS_GRIPPER | CBRS_BORDER_3D);

  m_wndMenuBar.EnableHelpCombobox (ID_HELP_FIND, _T("Type a question for help"));

  CString str;
  BOOL bValidString;
  bValidString = str.LoadString(IDS_TITLE_MENUBAR);
  ASSERT(bValidString);
  m_wndMenuBar.SetWindowText(str);
  return TRUE;
}

BOOL CMainFrame::CreateMessageBar ( ) [protected]

Definition at line 2075 of file MainFrm.cpp.

{
  if (!m_wndMessageBar.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, this, ID_VIEW_MESSAGEBAR, -1, TRUE))
  {
    TRACE0("Failed to create caption bar\n");
    return FALSE;
  }

  m_wndMessageBar.SetButton(_T("Options..."), ID_TOOLS_OPTIONS, CMFCCaptionBar::ALIGN_LEFT, FALSE);
  m_wndMessageBar.SetButtonToolTip(_T("Click here to see more options"));

  m_wndMessageBar.SetText(_T("Welcome to the MFC MSOffice2007 demonstration!"), CMFCCaptionBar::ALIGN_LEFT);

  m_wndMessageBar.SetBitmap(IDB_INFO, RGB(255, 255, 255), FALSE, CMFCCaptionBar::ALIGN_LEFT);
  m_wndMessageBar.SetImageToolTip(_T("Important"), _T("Please take a look at MSOffice2007Demo source code to learn how to create advanced user interface in minutes."));

  return TRUE;
}

BOOL CMainFrame::CreateOutlookBar | ( | CMFCOutlookBar & | bar,
 |  | UINT | uiID,
 |  | CMFCOutlookBarPane & | pane1,
 |  | CMFCOutlookBarPane & | pane2,
 |  | CShellTreeCtrl & | tree,
 |  | CCalendarBar & | calendar,
 |  | int | nInitialWidth |
 | ) |  |  | [protected]

Definition at line 427 of file MainFrm.cpp.

{
  CWindowDC dc(NULL);
  const BOOL bIsHiColor = dc.GetDeviceCaps(BITSPIXEL) > 16;

  if (!bar.Create(_T("Shortcuts"), this, CRect(0, 0, nInitialWidth, 32000), uiID, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
  {
    return FALSE; // fail to create
  }

  CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)bar.GetUnderlyingWindow();

  if (pOutlookBar == NULL)
  {
    ASSERT(FALSE);
    return FALSE;
  }

  pOutlookBar->EnableInPlaceEdit(TRUE);

  static UINT uiPageID = 1;

  DWORD dwPaneStyle = AFX_DEFAULT_TOOLBAR_STYLE | CBRS_FLOAT_MULTI;

  // can float, can autohide, can resize, CAN NOT CLOSE
  DWORD dwStyle = AFX_CBRS_FLOAT | AFX_CBRS_AUTOHIDE | AFX_CBRS_RESIZE;

  pane1.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
  pane1.SetOwner(this);
  pane1.EnableTextLabels();
  pane1.EnableDocking(CBRS_ALIGN_ANY);

  pane2.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
  pane2.SetOwner(this);
  pane2.EnableTextLabels();
  pane2.EnableDocking(CBRS_ALIGN_ANY);

  CImageList images;
  CBitmap bmp;
  if (!bmp.LoadBitmap(bIsHiColor ? IDB_OUTLOOK_LARGE_HC : IDB_OUTLOOK_LARGE))
  {
    return FALSE;
  }

  BITMAP bm;
  bmp.GetBitmap(&bm);

  UINT nFlags = ILC_MASK;

  if (bIsHiColor)
  {
    nFlags |= ILC_COLOR24;
  }
  else
  {
    nFlags |= ILC_COLOR;
  }

  images.Create(32, bm.bmHeight, nFlags, 0, 0);
  images.Add(&bmp, RGB(255, 0, 255));

  AddWorkSpace(_T("Home"), 0, ID_VIEW_GOTO_HOME, pane1, ID_NEW_MAIL, images);
  AddWorkSpace(_T("Calendar"), 1, ID_VIEW_GOTO_CALENDAR, pane1, ID_NEW_APPOINTMENT, images);
  AddWorkSpace(_T("Drafts"), 2, ID_VIEW_GOTO_DRAFTS, pane1, ID_NEW_MAIL, images);
  AddWorkSpace(_T("Inbox"), 3, ID_VIEW_GOTO_INBOX, pane1, ID_NEW_MAIL, images);
  AddWorkSpace(_T("Journal"), 4, ID_VIEW_GOTO_JOURNAL, pane1, ID_NEW_JOURNAL_ENTRY, images);
  AddWorkSpace(_T("Notes"), 5, ID_VIEW_GOTO_NOTES, pane1, ID_NEW_NOTE, images);
  AddWorkSpace(_T("Outbox"), 6, ID_VIEW_GOTO_OUTBOX, pane1, ID_NEW_MAIL, images);
  AddWorkSpace(_T("Sent Items"), 7, ID_VIEW_GOTO_SENTITEMS, pane1, ID_NEW_MAIL, images);
  AddWorkSpace(_T("Tasks"), 8, ID_VIEW_GOTO_TASKS, pane1, ID_NEW_TASK, images);

  pOutlookBar->AddControl(&pane1, _T("General"), 0, TRUE, dwStyle);
  pane1.EnableDocking(CBRS_ALIGN_ANY);
  pane1.SetDefaultState();

  AddWorkSpace(_T("My Computer"), 9, ID_VIEW_MY_COMPUTER, pane2, ID_NEW_SHORTCUT, images);
  AddWorkSpace(_T("Personal"), 10, ID_VIEW_GOTO_PERSONAL, pane2, ID_NEW_SHORTCUT, images);
  AddWorkSpace(_T("Favorites"), 10, ID_VIEW_GOTO_FAVORITES, pane2, ID_NEW_SHORTCUT, images);

  pOutlookBar->AddControl(&pane2, _T("Other Shortcuts"), 1, TRUE, dwStyle);
  pane2.EnableDocking(CBRS_ALIGN_ANY);
  pane2.SetDefaultState();

  CRect rectDummy(0, 0, 0, 0);
  const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;

  int nShift = (uiID == ID_VIEW_OUTLOOKBAR) ? 0 : 2; // we are going to create the same controls for two Outlook bars (regular and 2003), so we need this to prevent controls with the same ID

  tree.Create(dwTreeStyle, rectDummy, &bar, 1200 + nShift);
  pOutlookBar->AddControl(&tree, _T("Folders"), 2, TRUE, dwStyle);

  calendar.Create(rectDummy, &bar, 1201 + nShift);
  pOutlookBar->AddControl(&calendar, _T("Calendar"), 3, TRUE, dwStyle);

  bar.SetPaneStyle(bar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
  bar.FillDefaultTabsOrderArray();

  BOOL bAnimation = theApp.GetInt(_T("OutlookAnimation"), TRUE);
  CMFCOutlookBarTabCtrl::EnableAnimation(bAnimation);

  return TRUE;
}

BOOL CMainFrame::CreatePaletteBar ( )

Definition at line 156 of file mainfrm.cpp.

{
  if (!m_wndPaletteBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_FIXED |
    CBRS_TOP | CBRS_TOOLTIPS, ID_PALETTEBAR) ||
    !m_wndPaletteBar.LoadBitmap(IDB_PALETTE) ||
    !m_wndPaletteBar.SetButtons(palette,
      sizeof(palette)/sizeof(UINT)))
  {
    TRACE0("Failed to create toolbar\n");
    return FALSE;       // fail to create
  }

  m_wndPaletteBar.SetWindowText(_T("Palette"));
  m_wndPaletteBar.EnableDocking(0);

  // Create the Palette.  We are using hardcoded numbers for ease here
  // normally the location would be read in from an ini file.
  CPoint pt(GetSystemMetrics(SM_CXSCREEN) - 100,
    GetSystemMetrics(SM_CYSCREEN) / 3);

  m_wndPaletteBar.SetColumns(3);
  FloatControlBar(&m_wndPaletteBar, pt);

  return TRUE;
}

BOOL CMainFrame::CreateRibbonBar ( ) [protected]
BOOL CMainFrame::CreateRibbonBar ( ) [protected]
BOOL CMainFrame::CreateRibbonBar ( ) [private]

Definition at line 303 of file mainfrm.cpp.

{
  if (!m_wndRibbonBar.Create(this))
  {
    return FALSE;
  }

  // Load panel images:
  m_PanelImages.SetImageSize(CSize(16, 16));
  m_PanelImages.Load(IDB_RIBBON_ICONS);

  // Init main button:
  InitMainButton();

  InitHomeCategory();
  InitViewCategory();
  InitTabButtons();

  AddContextTab_Format();

  // Init QAT state
  // Add quick access toolbar commands:
  CMFCRibbonQuickAccessToolBarDefaultState qatState;

  qatState.AddCommand(ID_FILE_NEW, FALSE);
  qatState.AddCommand(ID_FILE_OPEN, FALSE);
  qatState.AddCommand(ID_FILE_SAVE);
  qatState.AddCommand(ID_FILE_PRINT_DIRECT);
  qatState.AddCommand(ID_FILE_PRINT_PREVIEW, FALSE);
  qatState.AddCommand(ID_EDIT_UNDO);

  // Set the state
  m_wndRibbonBar.SetQuickAccessDefaultState(qatState);

  return TRUE;
}

BOOL CMainFrame::CreateRulerBar ( ) [protected]
BOOL CMainFrame::CreateRulerBar ( ) [protected]

Definition at line 257 of file mainfrm.cpp.

{
  if (!m_wndRulerBar.Create(this,
    WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_HIDE_INPLACE, ID_VIEW_RULER))
  {
    TRACE0("Failed to create ruler\n");
    return FALSE;      // fail to create
  }
  return TRUE;
}

BOOL CMainFrame::CreateShortcutsBar ( ) [protected]

Definition at line 357 of file MainFrm.cpp.

{
  CMFCOutlookBarTabCtrl::EnableAnimation ();

  const int nInitialWidth = 150;
  const CString strCaption = _T("Shortcuts");

  if (!m_wndShortcutsBar.Create (strCaption, this,
    CRect (0, 0, nInitialWidth, nInitialWidth),
    ID_VIEW_OUTLOOKBAR, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
  {
    TRACE0("Failed to create outlook bar\n");
    return FALSE;      // fail to create
  }

  CMFCOutlookBarTabCtrl* pShortcutsBarContainer = DYNAMIC_DOWNCAST (CMFCOutlookBarTabCtrl, m_wndShortcutsBar.GetUnderlyingWindow ());
  if (pShortcutsBarContainer == NULL)
  {
    TRACE0("Cannot get outlook bar container\n");
    return FALSE;
  }

  CImageList images;
  images.Create (IDB_SHORTCUTS, 32, 0, RGB (255, 0, 255));

  // Create first page:
  m_wndShortcutsPane1.Create (&m_wndShortcutsBar, AFX_DEFAULT_TOOLBAR_STYLE, ID_SHORTCUTS_PANE_1);
  m_wndShortcutsPane1.SetOwner (this);
  m_wndShortcutsPane1.EnableTextLabels ();
  m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);

  m_wndShortcutsPane1.AddButton (images.ExtractIcon (0), _T("View 1"), ID_SHORTCUT_1);
  m_wndShortcutsPane1.AddButton (images.ExtractIcon (1), _T("View 2"), ID_SHORTCUT_2);
  m_wndShortcutsPane1.AddButton (images.ExtractIcon (2), _T("View 3"), ID_SHORTCUT_3);
  m_wndShortcutsPane1.AddButton (images.ExtractIcon (3), _T("View 4"), ID_SHORTCUT_4);

  pShortcutsBarContainer->AddTab (&m_wndShortcutsPane1, _T("Views"), (UINT)-1, FALSE);

  return TRUE;
}

BOOL CMainFrame::CreateStatusBar ( ) [protected]
BOOL CMainFrame::CreateStatusBar ( ) [protected]
BOOL CMainFrame::CreateStatusBar ( )

Definition at line 250 of file mainfrm.cpp.

{
  if (!m_wndStatusBar.Create(this) ||
    !m_wndStatusBar.SetIndicators(indicators,
      sizeof(indicators)/sizeof(UINT)))
  {
    TRACE0("Failed to create status bar\n");
    return FALSE;       // fail to create
  }

  UINT nID, nStyle;
  int cxWidth;

  m_wndStatusBar.GetPaneInfo( 0, nID, nStyle, cxWidth);
  m_wndStatusBar.SetPaneInfo( 0, nID, SBPS_STRETCH|SBPS_NORMAL, cxWidth);
  return TRUE;
}

BOOL CMainFrame::CreateStatusBar ( ) [protected]
BOOL CMainFrame::CreateStatusBar ( ) [private]
BOOL CMainFrame::CreateStyleBar ( )

Definition at line 182 of file mainfrm.cpp.

{
  const int nDropHeight = 100;

  if (!m_wndStyleBar.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|
      CBRS_TOOLTIPS|CBRS_FLYBY, IDW_STYLES) ||
    !m_wndStyleBar.LoadBitmap(IDB_STYLES) ||
    !m_wndStyleBar.SetButtons(styles, sizeof(styles)/sizeof(UINT)))
  {
    TRACE0("Failed to create stylebar\n");
    return FALSE;       // fail to create
  }

  // Create the combo box
  m_wndStyleBar.SetButtonInfo(0, IDW_COMBO, TBBS_SEPARATOR, 100);

  // Design guide advises 12 pixel gap between combos and buttons
  m_wndStyleBar.SetButtonInfo(1, ID_SEPARATOR, TBBS_SEPARATOR, 12);
  CRect rect;
  m_wndStyleBar.GetItemRect(0, &rect);
  rect.top = 3;
  rect.bottom = rect.top + nDropHeight;
  if (!m_wndStyleBar.m_comboBox.Create(
      CBS_DROPDOWNLIST|WS_VISIBLE|WS_TABSTOP,
      rect, &m_wndStyleBar, IDW_COMBO))
  {
    TRACE0("Failed to create combo-box\n");
    return FALSE;
  }

  //  Fill the combo box
  CString szStyle;
  if (szStyle.LoadString(IDS_LEFT))
    m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);
  if (szStyle.LoadString(IDS_CENTERED))
    m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);
  if (szStyle.LoadString(IDS_RIGHT))
    m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);
  if (szStyle.LoadString(IDS_JUSTIFIED))
    m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);

  //  Create a font for the combobox
  LOGFONT logFont;
  memset(&logFont, 0, sizeof(logFont));

  if (!::GetSystemMetrics(SM_DBCSENABLED))
  {
    // Since design guide says toolbars are fixed height so is the font.
    logFont.lfHeight = -12;
    logFont.lfWeight = FW_BOLD;
    logFont.lfPitchAndFamily = VARIABLE_PITCH | FF_SWISS;
    CString strDefaultFont;
    strDefaultFont.LoadString(IDS_DEFAULT_FONT);
    _tcscpy_s(logFont.lfFaceName, LF_FACESIZE, strDefaultFont);
    if (!m_wndStyleBar.m_font.CreateFontIndirect(&logFont))
      TRACE0("Could Not create font for combo\n");
    else
      m_wndStyleBar.m_comboBox.SetFont(&m_wndStyleBar.m_font);
  }
  else
  {
    m_wndStyleBar.m_font.Attach(::GetStockObject(SYSTEM_FONT));
    m_wndStyleBar.m_comboBox.SetFont(&m_wndStyleBar.m_font);
  }

  return TRUE;
}

void CMainFrame::CreateStyleList ( ) [protected]

Definition at line 1759 of file MainFrm.cpp.

{
  m_arStyles.RemoveAll();
  m_arStyleSets.RemoveAll();

  m_arStyles.Add( _T("¶ Normal"));
  m_arStyles.Add( _T("¶ No Spacing"));
  m_arStyles.Add( _T("Heading 1"));
  m_arStyles.Add( _T("Heading 2"));
  m_arStyles.Add( _T("Heading 3"));
  m_arStyles.Add( _T("Title"));
  m_arStyles.Add( _T("Subtitle"));
  m_arStyles.Add( _T("Subtle Emphasis"));
  m_arStyles.Add( _T("Emphasis"));
  m_arStyles.Add( _T("Intense Emphasis"));
  m_arStyles.Add( _T("Strong"));
  m_arStyles.Add( _T("Quote"));
  m_arStyles.Add( _T("Intense Quote"));
  m_arStyles.Add( _T("Subtle Reference"));
  m_arStyles.Add( _T("Intense Reference"));
  m_arStyles.Add( _T("Book Title"));
  m_arStyles.Add( _T("¶ List Paragraph"));
  m_arStyles.Add( _T("¶ Caption"));

  m_arStyleSets.Add(_T("Default(Black and White)"));
  m_arStyleSets.Add(_T("Elegant"));
  m_arStyleSets.Add(_T("Fancy"));
  m_arStyleSets.Add(_T("Formal"));
  m_arStyleSets.Add(_T("Manuscript"));
  m_arStyleSets.Add(_T("Modern"));
  m_arStyleSets.Add(_T("Simple"));
  m_arStyleSets.Add(_T("Traditional"));
};

BOOL CMainFrame::CreateTaskPane ( ) [protected]

Definition at line 295 of file MainFrm.cpp.

{
  CRect rectDummy(0, 0, 200, 400);
  if (!m_wndTaskPane.Create(_T("Tasks Pane"), this, rectDummy, TRUE, ID_VIEW_TASKPANE,
    WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT | AFX_CBRS_CLOSE | AFX_CBRS_FLOAT))
  {
    TRACE0("Failed to create task pane\n");
    return FALSE;      // fail to create
  }

  return TRUE;
}

BOOL CMainFrame::CreateTaskPane ( ) [protected]
void CMainFrame::CreateThemeList ( ) [protected]

Definition at line 1793 of file MainFrm.cpp.

{
  m_arThemes.RemoveAll();
  m_arColorThemes.RemoveAll();

  m_arThemes.Add(_T("Office"));
  m_arThemes.Add(_T("Apex"));
  m_arThemes.Add(_T("Aspect"));
  m_arThemes.Add(_T("Civic"));
  m_arThemes.Add(_T("Concource"));
  m_arThemes.Add(_T("Equite"));
  m_arThemes.Add(_T("Flow"));
  m_arThemes.Add(_T("Foundry"));
  m_arThemes.Add(_T("Median"));
  m_arThemes.Add(_T("Metro"));
  m_arThemes.Add(_T("Module"));
  m_arThemes.Add(_T("Opulent"));
  m_arThemes.Add(_T("Oriel"));
  m_arThemes.Add(_T("Origin"));
  m_arThemes.Add(_T("Paper"));
  m_arThemes.Add(_T("Solstice"));
  m_arThemes.Add(_T("Technic"));
  m_arThemes.Add(_T("Trek"));
  m_arThemes.Add(_T("Urban"));
  m_arThemes.Add(_T("Verve"));

  m_arColorThemes.Copy(m_arThemes);
  m_arColorThemes.InsertAt(1, _T("Grayscale"));
}

BOOL CMainFrame::CreateToolBar ( ) [protected]
BOOL CMainFrame::CreateToolBar ( ) [protected]
BOOL CMainFrame::CreateToolBar ( )

Definition at line 142 of file mainfrm.cpp.

{
  if (!m_wndToolBar.Create(this,
      CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|WS_VISIBLE) ||
    !m_wndToolBar.LoadBitmap(IDR_MAINFRAME))
  {
    TRACE0("Failed to create toolbar\n");
    return FALSE;       // fail to create
  }

  OnViewShort();
  return TRUE;
}

virtual BOOL CMainFrame::DestroyWindow ( ) [virtual]
BOOL CMainFrame::DestroyWindow ( ) [virtual]

Definition at line 89 of file mainfrm.cpp.

{
  ::EnumChildWindows(m_hWnd, SendPrepareToClose, 0);

  return CMDIFrameWnd::DestroyWindow();
}

void CMainFrame::DockControlBarLeftOf | ( | CToolBar * | Bar,
 |  | CToolBar * | LeftOf
 | ) |  |

Definition at line 341 of file mainfrm.cpp.

{
  CRect rect;
  DWORD dw;
  UINT n;

  // get MFC to adjust the dimensions of all docked ToolBars
  // so that GetWindowRect will be accurate
  RecalcLayout();
  LeftOf->GetWindowRect(&rect);
  rect.OffsetRect(1,0);
  dw=LeftOf->GetBarStyle();
  n = 0;
  n = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n;
  n = (dw&CBRS_ALIGN_BOTTOM && n==0) ? AFX_IDW_DOCKBAR_BOTTOM : n;
  n = (dw&CBRS_ALIGN_LEFT && n==0) ? AFX_IDW_DOCKBAR_LEFT : n;
  n = (dw&CBRS_ALIGN_RIGHT && n==0) ? AFX_IDW_DOCKBAR_RIGHT : n;

  // When we take the default parameters on rect, DockControlBar will dock
  // each Toolbar on a seperate line.  By calculating a rectangle, we in effect
  // are simulating a Toolbar being dragged to that location and docked.
  DockControlBar(Bar,n,&rect);
}

void CMainFrame::DoNothing ( ) [protected]

Definition at line 397 of file MainFrm.cpp.

{
  // this is here only so that the toolbar buttons for the dropdown menus
  // will have a callback, and thus will not be disabled.
}

int CMainFrame::FindFocusedOutlookWnd ( CMFCOutlookBarTabCtrl ** ppOutlookWnd ) [protected]

Definition at line 849 of file MainFrm.cpp.

{
  ASSERT(ppOutlookWnd != NULL);

  if (!ppOutlookWnd)
  {
    return -1;
  }

  *ppOutlookWnd = NULL;
  // find the outlook from the current point
  CPoint pt;
  GetCursorPos(&pt);

  CWnd* pWndPoint = m_dockManager.PaneFromPoint(pt, 0);
  *ppOutlookWnd = FindOutlookParent(pWndPoint);

  CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;

  // find focused outlook
  if (*ppOutlookWnd != NULL)
  {
    CWnd* pWnd = GetFocus();

    if (pWnd == &bar)
    {
      *ppOutlookWnd = (CMFCOutlookBarTabCtrl*) bar.GetUnderlyingWindow();
    }
    else if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
    {
      *ppOutlookWnd = (CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pWnd)->GetUnderlyingWindow();
    }
    else
    {
      CWnd* pParent = pWnd->GetParent();
      while (pParent != NULL)
      {
        if (pParent->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
        {
          *ppOutlookWnd = (CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pParent)->GetUnderlyingWindow();
          break;
        }
        pParent = pParent->GetParent();
      }
    }
  }

  if (*ppOutlookWnd != NULL)
  {
    return(*ppOutlookWnd)->GetActiveTab();
  }

  return -1;
}

BOOL CMainFrame::FindInternalDivider | ( | CDockablePane * | pBar,
 |  | CPaneContainer *& | pContainer,
 |  | CPaneDivider *& | pDivider,
 |  | BOOL & | bLeftSlider,
 |  | BOOL & | bAloneInContainer |
 | ) |  |  | [private]

Definition at line 300 of file MainFrm.cpp.

{
  pContainer = NULL;
  pDivider = NULL;
  bLeftBar = FALSE;
  bAloneInContainer = FALSE;

  CPaneDivider* pDefaultPaneDivider = pBar->GetDefaultPaneDivider ();
  CMultiPaneFrameWnd* pParentMiniFrame =
    DYNAMIC_DOWNCAST (CMultiPaneFrameWnd, pBar->GetParentMiniFrame ()) ;

  CPaneContainer* pStartContainer = NULL;

  if (pParentMiniFrame != NULL)
  {
    CPaneContainerManager& manager = pParentMiniFrame->GetPaneContainerManager ();
    pStartContainer = manager.FindPaneContainer (pBar, bLeftBar);
  }
  else if (pDefaultPaneDivider != NULL)
  {
    pStartContainer = pDefaultPaneDivider->FindPaneContainer (pBar, bLeftBar);
  }
  else
  {
    return FALSE;
  }

  if (pStartContainer != NULL)
  {
    pContainer = pStartContainer;

    while (pContainer != NULL)
    {
      if (!pContainer->IsRightPartEmpty (TRUE) &&
        !pContainer->IsLeftPartEmpty (TRUE))
      {
        break;
      }
      pContainer = pContainer->GetParentPaneContainer ();
    }

    if (pContainer == NULL)
    {
      bAloneInContainer = TRUE;
      return FALSE;
    }
    else
    {
      pDivider = (CPaneDivider*) pContainer->GetPaneDivider ();

      bLeftBar = (pContainer->IsLeftPane (pBar) ||
            pContainer->GetLeftPaneContainer () != NULL &&
            ((CPaneContainer*)pContainer->GetLeftPaneContainer ())->
            FindSubPaneContainer (pBar, CPaneContainer::BC_FIND_BY_LEFT_BAR) != NULL);
      return TRUE;
    }
  }
  return FALSE;
}

CMFCOutlookBarTabCtrl * CMainFrame::FindOutlookParent ( CWnd * pWnd ) [protected]

Definition at line 904 of file MainFrm.cpp.

{
  if (pWnd == NULL)
  {
    return NULL;
  }

  if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
  {
    return(CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pWnd)->GetUnderlyingWindow();
  }

  CWnd* pParent = pWnd->GetParent();
  while (pParent != NULL)
  {
    if (pParent->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
    {
      return(CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pParent)->GetUnderlyingWindow();

    }
    pParent = pParent->GetParent();
  }
  return NULL;
}

COLORREF CMainFrame::GetColorFromColorButton ( int nButtonID )

Definition at line 914 of file mainfrm.cpp.

{
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;

  m_wndRibbonBar.GetElementsByID(nButtonID, arButtons);

  if (arButtons.GetSize() == 0)
  {
    return(COLORREF) -1;
  }

  CMFCRibbonColorButton* pColorButton = (CMFCRibbonColorButton*)arButtons.GetAt(0);

  COLORREF clr = pColorButton->GetColor();
  if (clr == (COLORREF)-1)
  {
    clr = pColorButton->GetAutomaticColor();
  }

  return clr;
}

DWORD CMainFrame::GetCurrentView ( )

Definition at line 418 of file MainFrm.cpp.

{
  return m_dwCurrentView;
}

CMFCBindView * CMainFrame::GetDocView ( )

Definition at line 169 of file MainFrm.cpp.

{
  // returns the view that the ole items are embedded in
  return (CMFCBindView*) m_wndSplitter.GetPane(0, 1);
}

CMFCToolBarComboBoxButton * CMainFrame::GetFindCombo ( ) [static]

Definition at line 610 of file MainFrm.cpp.

{
  CMFCToolBarComboBoxButton* pFindCombo = NULL;

  CObList listButtons;
  if (CMFCToolBar::GetCommandButtons(ID_EDIT_FIND_COMBO, listButtons) > 0)
  {
    for (POSITION posCombo = listButtons.GetHeadPosition();
      pFindCombo == NULL && posCombo != NULL;)
    {
      CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));

      if (pCombo != NULL && pCombo->GetEditCtrl()->GetSafeHwnd() == ::GetFocus())
      {
        pFindCombo = pCombo;
      }
    }
  }

  return pFindCombo;
}

CMFCShellTreeCtrl & CMainFrame::GetFolders ( )

Definition at line 345 of file MainFrm.cpp.

{
  return m_wndFoldersBar.m_wndShellTree;
}

CComboBox * CMainFrame::GetFontNameCombo ( )

Definition at line 230 of file MainFrm.cpp.

{
  return &m_wndEditBar.m_fontNameCombo;
}

CComboBox * CMainFrame::GetFontSizeCombo ( )

Definition at line 234 of file MainFrm.cpp.

{
  return &m_wndEditBar.m_fontSizeCombo;
}

HICON CMainFrame::GetIcon ( int nDocType )
HICON CMainFrame::GetIcon ( int nDocType )

Definition at line 283 of file mainfrm.cpp.

{
  switch (nDocType)
  {
    case RD_WINWORD6:
    case RD_WORDPAD:
    case RD_EMBEDDED:
    case RD_RICHTEXT:
      return m_hIconDoc;
    case RD_TEXT:
    case RD_OEMTEXT:
      return m_hIconText;
    case RD_WRITE:
      return m_hIconWrite;
  }
  return m_hIconDoc;
}

CMSMLinksBar * CMainFrame::GetLinksBar ( UINT nID ) [private]

Definition at line 366 of file MainFrm.cpp.

{
  CMSMLinksBar* pBar = NULL;

  if(ID_LINKS_HOME_1 <= nID && nID <= ID_LINKS_HOME_2)
  {
    pBar = &m_wndLinksBars [0];
  }
  else if(ID_LINKS_BANKING_1 <= nID && nID <= ID_LINKS_BANKING_5)
  {
    pBar = &m_wndLinksBars [1];
  }
  else if(ID_LINKS_BILLS_1 <= nID && nID <= ID_LINKS_BILLS_5)
  {
    pBar = &m_wndLinksBars [2];
  }
  else if(ID_LINKS_REPORTS_1 <= nID && nID <= ID_LINKS_REPORTS_3)
  {
    pBar = &m_wndLinksBars [3];
  }
  else if(ID_LINKS_BUDGET_1 <= nID && nID <= ID_LINKS_BUDGET_2)
  {
    pBar = &m_wndLinksBars [4];
  }
  else if(ID_LINKS_INVESTING_1 <= nID && nID <= ID_LINKS_INVESTING_7)
  {
    pBar = &m_wndLinksBars [5];
  }
  else if(ID_LINKS_PLANNING_1 <= nID && nID <= ID_LINKS_PLANNING_6)
  {
    pBar = &m_wndLinksBars [6];
  }
  else if(ID_LINKS_TAXES_1 <= nID && nID <= ID_LINKS_TAXES_5)
  {
    pBar = &m_wndLinksBars [7];
  }
  else
  {
    ASSERT (FALSE);
  }

  return pBar;
}

void CMainFrame::GetMessageString | ( | UINT | nID,
 |  | CString & | rMessage |
 | ) |  |  | const [protected, virtual]

Definition at line 126 of file mainfrm.cpp.

{
  CString strMessage;
  if (CDynaMenuDoc::GetMessageString(nID, rMessage))
    return; // the document has provided the message string for the dynamic command i.d.

  CFrameWnd::GetMessageString(nID, rMessage);
}

CObjListView * CMainFrame::GetObjListView ( )

Definition at line 163 of file MainFrm.cpp.

{
  // returns the view that contains the current list of objects
  return (CObjListView*) m_wndSplitter.GetPane(0, 0);
}

CMFCRibbonBar* CMainFrame::GetRibbonBar ( ) [inline]

Definition at line 25 of file MainFrm.h.

  {
    return &m_wndRibbonBar;
  }

CMFCRibbonBar* CMainFrame::GetRibbonBar ( ) [inline]

Definition at line 32 of file mainfrm.h.

{return &m_wndRibbonBar;}

int CMainFrame::GetSliderPos ( UINT nID ) [protected]

Definition at line 957 of file MainFrm.cpp.

{
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar2;
  m_wndRibbonBar.GetElementsByID (ID_RIBBON_OBTN_5, ar);
  m_wndRibbonBar.GetElementsByID (ID_RIBBON_OBTN_6, ar2);

  ar.Append (ar2);

  int nPos1 = -1;
  int nPos2 = -1;

  for (int k = 0; k < 2; k++)
  {
    for (int i = 0; i < ar.GetSize (); i++)
    {
      CMFCRibbonSlider* pSlider = DYNAMIC_DOWNCAST (CMFCRibbonSlider, ar[i]);
      if (pSlider != NULL)
      {
        if (k == 0)
        {
          if (pSlider->GetID () != nID)
          {
            nPos2 = pSlider->GetPos ();
            nPos1 = nPos2;
            break;
          }
        }
        else
        {
          if (pSlider->GetID () == nID)
          {
            if (pSlider->GetPos () != nPos2)
            {
              nPos1 = pSlider->GetPos ();
            }
          }
        }
      }
    }
  }

  return nPos1;
}

CView * CMainFrame::GetSourceView ( )

Definition at line 413 of file MainFrm.cpp.

{
  return DYNAMIC_DOWNCAST(CView,m_pSrcView);
}

CMFCStatusBar& CMainFrame::GetStatusBar ( ) [inline]

Definition at line 33 of file MainFrm.h.

  {
    return m_wndStatusBar;
  }

BOOL CMainFrame::GetStyleFromStyles ( XStyle & style )

Definition at line 957 of file mainfrm.cpp.

{
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;

  m_wndRibbonBar.GetElementsByID(ID_OBJECT_STYLES, arButtons);

  if (arButtons.GetSize() == 0)
  {
    return FALSE;
  }

  BOOL bRes = FALSE;

  CMFCRibbonGallery* pBtn = DYNAMIC_DOWNCAST(CMFCRibbonGallery, arButtons.GetAt(0));
  if (pBtn != NULL && pBtn->GetSelectedItem() != -1)
  {
    style = c_Styles[pBtn->GetSelectedItem()];
    bRes = TRUE;
  }

  return bRes;
}

BOOL CMainFrame::GetToolbarButtonToolTipText | ( | CMFCToolBarButton * | pButton,
 |  | CString & | strTTText |
 | ) |  |  | [virtual]

Definition at line 710 of file MainFrm.cpp.

{
  CLinkButton* pLinkBtn = NULL;

  ASSERT_VALID (pButton);

  if (pButton->m_nID == ID_LINK_1 &&
    (pLinkBtn = DYNAMIC_DOWNCAST (CLinkButton, pButton)) != NULL)
  {
    strTTText = pLinkBtn->GetURL ();
    return TRUE;
  }

  return FALSE; // Default tooltip text
}

CMFCToolBarImages * CMainFrame::GetTooltipImage ( UINT uiID )

Definition at line 1366 of file MainFrm.cpp.

{
  if (!theApp.m_bShowToolTipDescr)
  {
    return NULL;
  }

  UINT uiResID = 0;

  switch (uiID)
  {
  case ID_MAIN_BUTTON:
    uiResID = IDB_TOOLTIP_MAIN;
    break;

  case ID_WRITE_CLIPBOARD:
    uiResID = IDB_TOOLTIP_CLIPBOARD;
    break;

  case ID_WRITE_FONT:
    uiResID = IDB_TOOLTIP_FONTDLG;
    break;

  case ID_WRITE_PARAGRAPH:
    uiResID = IDB_TOOLTIP_PARAGRAPH;
    break;
  }

  if (uiResID == 0)
  {
    return NULL;
  }

  CMFCToolBarImages* pBmp = NULL;

  if (!m_TooltipImages.Lookup(uiID, pBmp))
  {
    pBmp = new CMFCToolBarImages;
    pBmp->Load(uiResID);
    pBmp->SetSingleImage();

    m_TooltipImages.SetAt(uiID, pBmp);
  }

  return pBmp;
}

CChildView* CMainFrame::GetView ( ) [inline]

Definition at line 27 of file MainFrm.h.

  { return(&m_wndView); }

CView * CMainFrame::GetWebView ( )

Definition at line 408 of file MainFrm.cpp.

{
  return DYNAMIC_DOWNCAST(CView,m_pWebView);
}

int CMainFrame::GetWeightFromLineWeight ( int nButtonID )

Definition at line 936 of file mainfrm.cpp.

{
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;

  m_wndRibbonBar.GetElementsByID(nButtonID, arButtons);

  if (arButtons.GetSize() == 0)
  {
    return -1;
  }

  int weight = -1;
  CMFCRibbonGallery* pBtn = DYNAMIC_DOWNCAST(CMFCRibbonGallery, arButtons.GetAt(0));
  if (pBtn != NULL && pBtn->GetSelectedItem() != -1)
  {
    weight = pBtn->GetSelectedItem() + 1;
  }

  return weight;
}

void CMainFrame::HideModelessPropSheet ( )

Definition at line 167 of file mainfrm.cpp.

{
  if (m_pShapePropFrame != NULL)
    m_pShapePropFrame->ShowWindow(SW_HIDE);
}

void CMainFrame::InitBulletPalette ( CMFCRibbonGallery * pPalette ) [protected]

Definition at line 2251 of file MainFrm.cpp.

{
  ASSERT_VALID(pPalette);

  pPalette->SetPaletteID(ID_FROM_PALETTE_BULLET);

  pPalette->AddGroup(_T("Bullets"), IDB_BULLETS, 40);

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("&Change List Level")));

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWBULLET, _T("&Define New Bullet...")));

  pPalette->SetIconsInRow(6);
}

void CMainFrame::InitHomeCategory ( ) [private]

Definition at line 410 of file mainfrm.cpp.

{
  CreateDocumentColors();

  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Home"), IDB_RIBBON_HOMESMALL, IDB_RIBBON_HOMELARGE);

  // Create "Clipboard" panel:
  CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel(_T("Clipboard\nzc"), m_PanelImages.ExtractIcon(0));

  CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, _T("Paste\nv"), 0, 0);
  pPanelClipboard->Add(pBtnPaste);

  pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, _T("Cut\nx"), 1));
  pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, _T("Copy\nc"), 2));
  pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CLEAR, _T("Delete\nt"), 3));

  // Create "Operations" panel
  CMFCRibbonPanel* pPanelOperations = pCategory->AddPanel(_T("Operations\nzo"), m_PanelImages.ExtractIcon(1));

  CMFCRibbonColorButton* pBtnPaperColor = new CMFCRibbonColorButton(ID_VIEW_PAPERCOLOR, _T("Paper Color\ng"), TRUE, 13, 1);
  pBtnPaperColor->SetAlwaysLargeImage();
  pBtnPaperColor->SetDefaultCommand(FALSE);
  pBtnPaperColor->EnableAutomaticButton(_T("&Automatic"), RGB(255, 255, 255));
  pBtnPaperColor->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
  pBtnPaperColor->SetColumns(10);
  pBtnPaperColor->SetColorBoxSize(CSize(17, 17));
  pBtnPaperColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
  pBtnPaperColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
  pBtnPaperColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);

  pPanelOperations->Add(pBtnPaperColor);

  pPanelOperations->Add(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, _T("Select All\na"), 4));
  pPanelOperations->Add(new CMFCRibbonButton(ID_OLE_INSERT_NEW, _T("New Object...\no"), 5));
  pPanelOperations->Add(new CMFCRibbonButton(ID_OLE_EDIT_LINKS, _T("Links...\ni"), 6));

  // Create "Draw" panel
  CMFCRibbonPanel* pPanelDraw = pCategory->AddPanel(_T("Draw\nzd"), m_PanelImages.ExtractIcon(2));

  pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_SELECT, _T("Select\ns"), 7));
  pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_LINE, _T("Line\nl"), 8));
  pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_RECT, _T("Rectangle\nr"), 9));
  pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_ROUNDRECT, _T("Round Rectangle\nn"), 10));
  pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_ELLIPSE, _T("Ellipse\ne"), 11));
  pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_POLYGON, _T("Polygon\ny"), 12));

  // Create "Arrange" panel
  CMFCRibbonPanel* pPanelArrange = pCategory->AddPanel(_T("Arrange\nzj"), m_PanelImages.ExtractIcon(3));

  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOFRONT, _T("Move to Front\nmf"), 15, 3));
  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEFORWARD, _T("Move Forward\nmw"), 17, 5));
  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEBACK, _T("Move Backward\nmd"), 18, 6));
  pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOBACK, _T("Move to Back\nmb"), 16, 4));

  // Add not-in-ribbon commands
  CMFCRibbonButton* pUndo = new CMFCRibbonButton(ID_EDIT_UNDO, _T("Undo"), 20);
  pCategory->AddHidden(pUndo);
}

void CMainFrame::InitialShowWindow ( UINT nCmdShow )

Definition at line 103 of file mainfrm.cpp.

{
  WINDOWPLACEMENT wp;
  if (!ReadWindowPlacement(&wp))
  {
    ShowWindow(nCmdShow);
    return;
  }
  if (nCmdShow != SW_SHOWNORMAL)
    wp.showCmd = nCmdShow;
  SetWindowPlacement(&wp);
  ShowWindow(wp.showCmd);
}

void CMainFrame::InitMainButton ( ) [private]

Definition at line 374 of file mainfrm.cpp.

{
  m_MainButton.SetImage(IDB_RIBBON_MAIN);
  m_MainButton.SetToolTipText(_T("File"));
  m_MainButton.SetText(_T("\nf"));

  m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize(45, 45));

  CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(_T("File"), IDB_RIBBON_FILESMALL, IDB_RIBBON_FILELARGE);
  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_NEW, _T("&New"), 0, 0));
  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_OPEN, _T("&Open..."), 1, 1));

  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE, _T("&Save"), 2, 2));
  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));

  std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton(ID_FILE_PRINT, _T("&Print"), 4, 4));

  apBtnPrint->AddSubItem(new CMFCRibbonLabel(_T("Preview and print the document")));
  apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 7, 7, TRUE));
  apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 6, 6, TRUE));

  apBtnPrint->SetKeys(_T("p"), _T("w"));
  pMainPanel->Add(apBtnPrint.release());

  pMainPanel->AddSeparator();
  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SEND_MAIL, _T("Sen&d..."), 8, 8));
  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SUMMARYINFO, _T("Summary &Info..."), 9, 9));

  pMainPanel->AddSeparator();
  pMainPanel->Add(new CMFCRibbonButton(ID_FILE_CLOSE, _T("&Close"), 5, 5));

  pMainPanel->AddRecentFilesList(_T("Recent Documents"));
  pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_TOOLS_OPTIONS, _T("Opt&ions"), 10));
  pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, _T("E&xit"), 11));
}

void CMainFrame::InitMultilevelPalette ( CMFCRibbonGallery * pPalette ) [protected]

Definition at line 2281 of file MainFrm.cpp.

{
  ASSERT_VALID(pPalette);

  pPalette->SetPaletteID(ID_FROM_PALETTE_MULTILEVEL);

  pPalette->AddGroup(_T("List Library"), IDB_MULTI, 76);

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("&Change List Level")));

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWMULTILEVELLIST, _T("&Define New Multilevel List")));

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWLISTSTYLE, _T("Define New List &Style...")));

  pPalette->SetIconsInRow(3);
}

void CMainFrame::InitNumberingPalette ( CMFCRibbonGallery * pPalette ) [protected]

Definition at line 2266 of file MainFrm.cpp.

{
  ASSERT_VALID(pPalette);

  pPalette->SetPaletteID(ID_FROM_PALETTE_NUMBER);

  pPalette->AddGroup(_T("Numbering Library"), IDB_NUM, 76);

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("&Change List Level")));

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWNUMBERFORMAT, _T("&Define New Number Format...")));

  pPalette->SetIconsInRow(3);
}

void CMainFrame::InitPositionPalette ( CMFCRibbonGallery * pPalette ) [protected]

Definition at line 2298 of file MainFrm.cpp.

{
  ASSERT_VALID(pPalette);

  pPalette->SetPaletteID(ID_FROM_PALETTE_POSITION);

  pPalette->AddGroup(_T("In Line with"), IDB_POSITION_1, 37);
  pPalette->AddGroup(_T("With Text Wrapping"), IDB_POSITION_2, 37);

  pPalette->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_MORELAYOUTOPTIONS, _T("&More &Layout Options")));

  pPalette->SetIconsInRow(3);
}

void CMainFrame::InitRibbon ( ) [protected]

Definition at line 322 of file MainFrm.cpp.

{
  //-------------------
  // Load panel images:
  //-------------------
  m_PanelImages.SetImageSize (CSize (16, 16));
  m_PanelImages.Load (IDB_BUTTONS);

  //------------------
  // Init main button:
  //------------------
  m_MainButton.SetImage (IDB_MAIN);
  m_MainButton.SetText (_T("\nf"));
  m_MainButton.SetToolTipText (_T("File"));

  m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));

  m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));

  CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory (
    _T("File"), IDB_FILESMALL, IDB_FILELARGE);

  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_NEW, _T("&New"), 0, 0));
  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_OPEN, _T("&Open..."), 1, 1));

  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE, _T("&Save"), 2, 2));

  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));

  std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton (ID_FILE_PRINT, _T("Print"), 6, 6));
  apBtnPrint->SetKeys (_T("p"), _T("w"));

  apBtnPrint->AddSubItem (new CMFCRibbonLabel (_T("Preview and print the document")));
  apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 7, 7, TRUE));
  apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 8, 8, TRUE));

  pMainPanel->Add (apBtnPrint.release());

  pMainPanel->Add (new CMFCRibbonSeparator (TRUE));
  pMainPanel->Add (new CMFCRibbonButton (ID_FILE_CLOSE, _T("&Close"), 9, 9));

  pMainPanel->AddRecentFilesList (_T("Recent Documents"));

  pMainPanel->AddToBottom (new CMFCRibbonMainPanelButton (ID_APP_EXIT, _T("E&xit"), 15));

  //--------------------------------------------
  // Add "Home" category with "Clipboard" panel:
  //--------------------------------------------
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory (
    _T("&Home"),
    IDB_WRITE,
    IDB_WRITELARGE);

  //--------------------------
  // Create "Clipboard" panel:
  //--------------------------
  CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel (
    _T("Clipboard\nd"),
    m_PanelImages.ExtractIcon (27));

  CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton (ID_EDIT_PASTE, _T("Paste\nv"), 0, 0);
  pBtnPaste->SetMenu (IDR_PASTE_MENU, TRUE);
  pPanelClipboard->Add (pBtnPaste);

  pPanelClipboard->Add (new CMFCRibbonButton (ID_EDIT_CUT, _T("Cut\nx"), 1));
  pPanelClipboard->Add (new CMFCRibbonButton (ID_EDIT_COPY, _T("Copy\nc"), 2));
  pPanelClipboard->Add (new CMFCRibbonButton (0, _T("Paint\np"), 3));

  //-----------------------
  // Create "Window" panel:
  //-----------------------
  CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel (
    _T("Window\nw"),
    m_PanelImages.ExtractIcon (7));

  pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_WORKSPACE, _T("View 1\n1")));
  pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_WORKSPACE2, _T("View 2\n2")));
  pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_OUTPUT, _T("Output\no")));
  pPanelWindow->Add (new CMFCRibbonSeparator);

  CMFCRibbonButton* pBtnWindows = new CMFCRibbonButton (0, _T("Windows\ni"), -1, 1);
  pBtnWindows->SetMenu (IDR_WINDOWS_MENU, TRUE);
  pPanelWindow->Add (pBtnWindows);

  //-----------------------------------
  // Add quick access toolbar commands:
  //-----------------------------------
  CList<UINT, UINT> lstQATCmds;

  lstQATCmds.AddTail (ID_FILE_SAVE);
  lstQATCmds.AddTail (ID_FILE_PRINT_DIRECT);

  m_wndRibbonBar.SetQuickAccessCommands (lstQATCmds);

  m_wndRibbonBar.AddToTabs (new CMFCRibbonButton (ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon (0)));
}

void CMainFrame::InitTabButtons ( ) [private]

Definition at line 495 of file mainfrm.cpp.

{
  // Add "Style" button to the right of tabs:
  CMFCRibbonButton* pStyleButton = new CMFCRibbonButton((UINT) -1, _T("Style\ns"));
  pStyleButton->SetMenu(IDR_THEME_MENU, TRUE /* Right align */);

  m_wndRibbonBar.AddToTabs(pStyleButton);

  // Add "About" button to the right of tabs:
  m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon(6)));

}

void CMainFrame::InitViewCategory ( ) [private]

Definition at line 469 of file mainfrm.cpp.

{
  CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&View"), IDB_RIBBON_VIEWSMALL, IDB_RIBBON_VIEWLARGE);

  // Create "Show/Hide" panel:
  CMFCRibbonPanel* pPanelShow = pCategory->AddPanel(_T("Show/Hide\nzs"), m_PanelImages.ExtractIcon(4));

  pPanelShow->Add(new CMFCRibbonCheckBox(ID_VIEW_GRID, _T("Grid Lines\ng")));
  pPanelShow->Add(new CMFCRibbonCheckBox(ID_VIEW_SHOWOBJECTS, _T("Show Objects\ns")));

  // Create "Window" panel:
  CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel(_T("Window\nzw"), m_PanelImages.ExtractIcon(5));

  pPanelWindow->Add(new CMFCRibbonButton(ID_WINDOW_NEW, _T("New Window\nn"), 0, 0));

  CMFCRibbonButton* pBtnWindows = new CMFCRibbonButton(ID_WINDOWS_MENU, _T("Switch Windows\ns"), 1, 1);
  pBtnWindows->SetMenu(IDR_WINDOWS_MENU, TRUE);
  pBtnWindows->SetDefaultCommand(FALSE);
  pPanelWindow->Add(pBtnWindows);

#ifdef ENABLE_RIBBON_LAUNCH_BUTTON
  // Add the launch button at the bottom of the panel:
  pPanelWindow->EnableLaunchButton(ID_WINDOW_MANAGER, 1, _T("W"));
#endif // ENABLE_RIBBON_LAUNCH_BUTTON
}

void CMainFrame::InitViews ( )

Definition at line 486 of file MainFrm.cpp.

{
    m_nCurView = 0;        // Save index of the currently active view class
    CView* pActiveView = GetActiveView();

    m_pViews[0] = pActiveView;
    m_pViews[1] = (CView*) new CView1;
    m_pViews[2] = (CView*) new CView2;
    m_pViews[3] = (CView*) new CView3;

    CDocument* pCurrentDoc = GetActiveDocument();

    // Initialize a CCreateContext to point to the active document.
    // With this context, the new view is added to the document
    // when the view is created in CView::OnCreate().
    CCreateContext newContext;
    newContext.m_pNewViewClass = NULL;
    newContext.m_pNewDocTemplate = NULL;
    newContext.m_pLastView = NULL;
    newContext.m_pCurrentFrame = NULL;
    newContext.m_pCurrentDoc = pCurrentDoc;

    CRect rect(0, 0, 0, 0); // gets resized later

  for (int nView = 1; nView < NUMVIEWS; nView++)
    {
        // Create the new view. In this example, the view persists for
        // the life of the application. The application automatically
        // deletes the view when the application is closed.
        m_pViews[nView]->Create(NULL, NULL,
        (AFX_WS_DEFAULT_VIEW & ~WS_VISIBLE),
      // views are created with the style of AFX_WS_DEFAULT_VIEW
      // In MFC 4.0, this is (WS_BORDER | WS_VISIBLE | WS_CHILD)
                    rect, this,
        AFX_IDW_PANE_FIRST + nView, &newContext);

    // When a document template creates a view, the WM_INITIALUPDATE
    // message is sent automatically. However, this code must
    // explicitly send the message, as follows.
    m_pViews [nView]->OnInitialUpdate();
    }
}

BOOL CMainFrame::IsEditViewActive ( ) [private]
BOOL CMainFrame::IsFavoritesMenu ( const CMFCToolBarMenuButton * pMenuButton )

Definition at line 554 of file MainFrm.cpp.

{
  if (pMenuButton == NULL || pMenuButton->m_nID != (UINT) -1)
  {
    return FALSE;
  }

  ASSERT_VALID (pMenuButton);
  const CObList& lstCommands = pMenuButton->GetCommands ();

  for (POSITION pos = lstCommands.GetHeadPosition (); pos != NULL;)
  {
    CMFCToolBarButton* pCmd = (CMFCToolBarButton*) lstCommands.GetNext (pos);
    ASSERT_VALID (pCmd);

    if ((pCmd->m_nID >= FIRST_FAVORITE_COMMAND &&
      pCmd->m_nID <= LAST_FAVORITE_COMMAND) ||
      IsFavoritesMenu (DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pCmd)))
    {
      return TRUE;
    }
  }

  return FALSE;
}

BOOL CMainFrame::IsOutlookBar2003 ( ) const [inline]

Definition at line 59 of file MainFrm.h.

  {
    return m_bOutlookBar2003;
  }

BOOL CMainFrame::IsPrintPreviewMode ( )

Definition at line 419 of file MainFrm.cpp.

{
  return GetDockingManager()->IsPrintPreviewValid();
}

virtual BOOL CMainFrame::LoadFrame | ( | UINT | nIDResource,
 |  | DWORD | dwDefaultStyle = WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE,
 |  | CWnd * | pParentWnd = NULL,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]
BOOL CMainFrame::LoadFrame | ( | UINT | nIDResource,
 |  | DWORD | dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE,
 |  | CWnd * | pParentWnd = NULL,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]

Definition at line 99 of file mainfrm.cpp.

{
  // Turn off auto update of title bar
  dwDefaultStyle &= ~((DWORD)FWS_ADDTOTITLE) ;
  BOOL f = CFrameWnd::LoadFrame(nIDResource, dwDefaultStyle,
        pParentWnd, pContext);

  return f ;
}

virtual BOOL CMainFrame::LoadFrame | ( | UINT | nIDResource,
 |  | DWORD | dwDefaultStyle = WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE,
 |  | CWnd * | pParentWnd = NULL,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]
virtual BOOL CMainFrame::LoadFrame | ( | UINT | nIDResource,
 |  | DWORD | dwDefaultStyle = WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE,
 |  | CWnd * | pParentWnd = NULL,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]
virtual BOOL CMainFrame::LoadFrame | ( | UINT | nIDResource,
 |  | DWORD | dwDefaultStyle = WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE,
 |  | CWnd * | pParentWnd = NULL,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]
void CMainFrame::OnActivate | ( | UINT | nState,
 |  | CWnd * | pWndOther,
 |  | BOOL | bMinimized |
 | ) |  |  | [protected]

Definition at line 260 of file MainFrm.cpp.

{
  CFrameWnd::OnActivate(nState, pWndOther, bMinimized);

  if (m_wndCaptionBar.GetSafeHwnd () != NULL)
  {
    m_wndCaptionBar.SetParentActive (nState != WA_INACTIVE);
  }
}

afx_msg void CMainFrame::OnActivate | ( | UINT | nState,
 |  | CWnd * | pWndOther,
 |  | BOOL | bMinimized |
 | ) |  |  | [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
void CMainFrame::OnAppLook ( UINT id ) [protected]

Definition at line 135 of file mainfrm.cpp.

{
  CDockingManager::SetDockingMode(DT_SMART);

  m_nAppLook = id;

  CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;

  switch (m_nAppLook)
  {
  case ID_VIEW_APPLOOK_2007:
  case ID_VIEW_APPLOOK_2007_1:
  case ID_VIEW_APPLOOK_2007_2:
  case ID_VIEW_APPLOOK_2007_3:
    // enable Office 2007 look:
    switch (m_nAppLook)
    {
    case ID_VIEW_APPLOOK_2007:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_LunaBlue);
      break;

    case ID_VIEW_APPLOOK_2007_1:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
      break;

    case ID_VIEW_APPLOOK_2007_2:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);
      break;

    case ID_VIEW_APPLOOK_2007_3:
      CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);
      break;
    }

    CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));
    m_wndRibbonBar.SetWindows7Look(FALSE);
    break;

  case ID_VIEW_APPLOOK_SCENIC:
    CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7));
    m_wndRibbonBar.SetWindows7Look(TRUE);
    break;
  }

  CMDITabInfo mdiTabParams;

  mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_VS2005;
  mdiTabParams.m_bAutoColor = TRUE;
  mdiTabParams.m_bDocumentMenu = TRUE;
  mdiTabParams.m_bActiveTabCloseButton = TRUE;

  EnableMDITabbedGroups(TRUE, mdiTabParams);

  CDockingManager* pDockManager = GetDockingManager();
  if (pDockManager != NULL)
  {
    ASSERT_VALID(pDockManager);
    pDockManager->AdjustPaneFrames();
  }

  CTabbedPane::ResetTabs();

  RecalcLayout();
  RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);

  theApp.WriteInt(_T("ApplicationLook"), m_nAppLook);
}

afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
afx_msg void CMainFrame::OnAppLook ( UINT id ) [protected]
void CMainFrame::OnAskQuestion ( ) [protected]

Definition at line 797 of file mainfrm.cpp.

{
  CMFCToolBarComboBoxButton* pHelpCombo = m_wndMenuBar.GetHelpCombobox ();
  if (pHelpCombo == NULL)
  {
    return;
  }

  CString strQuestion = pHelpCombo->GetText ();
  strQuestion.TrimLeft ();
  strQuestion.TrimRight ();

  if (strQuestion.IsEmpty ())
  {
    return;
  }

  pHelpCombo->AddItem (strQuestion);

  CString str;
  str.Format (_T("The question is: %s"), (LPCTSTR)strQuestion);

  MessageBox (str);

  SetFocus ();
}

LRESULT CMainFrame::OnBarState | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 412 of file mainfrm.cpp.

{
  if (lParam == -1)
    return 0L;
  ASSERT(lParam != RD_EMBEDDED);
  if (wParam != 0)
  {
    if (IsTextType((int) lParam))
    {
      // in text mode hide the ruler and format bar so that it is the default
      CBasePane* pBar = GetPane(ID_VIEW_FORMATBAR);
      if (pBar != NULL)
        pBar->ShowPane(FALSE, FALSE, FALSE);
      pBar = GetPane(ID_VIEW_RULER);
      if (pBar != NULL)
        pBar->ShowPane(FALSE, FALSE, FALSE);
    }
    HICON hIcon = GetIcon((int)lParam);
    SendMessage(WM_SETICON, TRUE, (LPARAM)hIcon);

  }
  return 0L;
}

LONG_PTR CMainFrame::OnBarState | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 353 of file mainfrm.cpp.

{
  if (lParam == -1)
    return 0L;
  ASSERT(lParam != RD_EMBEDDED);
  if (wParam == 0)
  {
    CDockState& ds = theApp.GetDockState(lParam);
    ds.Clear(); // empty out the dock state
    GetDockState(ds);
  }
  else
  {
    if (IsTextType(lParam))
    {
      // in text mode hide the ruler and format bar so that it is the default
      CControlBar* pBar = GetControlBar(ID_VIEW_FORMATBAR);
      if (pBar != NULL)
        pBar->ShowWindow(SW_HIDE);
      pBar = GetControlBar(ID_VIEW_RULER);
      if (pBar != NULL)
        pBar->ShowWindow(SW_HIDE);
    }
    HICON hIcon = GetIcon((int)lParam);
    SendMessage(WM_SETICON, TRUE, (LPARAM)hIcon);
    SetDockState(theApp.GetDockState(lParam));
  }
  return 0L;
}

void CMainFrame::OnBlockFmtDropdown | ( | NMHDR * | pNotifyStruct,
 |  | LRESULT * | result
 | ) |  |

Definition at line 49 of file MainFrm.cpp.

{

}

afx_msg void CMainFrame::OnBounce ( ) [protected]
void CMainFrame::OnBounce ( ) [protected]

Definition at line 51 of file mainfrm.cpp.

{
#pragma warning(push)
#pragma warning(disable:6014)
  CBounceMDIChildWnd *pBounceMDIChildWnd = new CBounceMDIChildWnd;
#pragma warning(pop)
  if (!pBounceMDIChildWnd->Create( _T("Bounce"),
    WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW, rectDefault, this))
    return;
}

void CMainFrame::OnCategorie ( UINT nID ) [protected]

Definition at line 348 of file MainFrm.cpp.

{
  if (m_nCategorie != -1)
  {
    ShowPane (&m_wndLinksBars[m_nCategorie], FALSE, TRUE, FALSE);
  }

  m_nCategorie = nID - ID_CATEGORIE_1;

  ShowPane (&m_wndLinksBars[m_nCategorie], TRUE, FALSE, FALSE);
}

void CMainFrame::OnChangeLayout | ( | CWnd * | pWnd = NULL,
 |  | BOOL | bNoLoopOverPopup = FALSE
 | ) |  |

Definition at line 2428 of file MainFrm.cpp.

{
  BOOL bTopLevel = FALSE;

  if (pWnd == NULL)
  {
    pWnd = this;
    bTopLevel = TRUE;
  }

  if (pWnd->IsKindOf(RUNTIME_CLASS(CRichEditView)) || pWnd->IsKindOf(RUNTIME_CLASS(CRichEditCtrl)))
  {
    return;
  }

  if (theApp.m_bIsRTL)
  {
    pWnd->ModifyStyleEx(0, WS_EX_LAYOUTRTL);
  }
  else
  {
    pWnd->ModifyStyleEx(WS_EX_LAYOUTRTL, 0);
  }

  CWnd* pWndChild = pWnd->GetWindow(GW_CHILD);
  while (pWndChild != NULL)
  {
    OnChangeLayout(pWndChild, TRUE);
    pWndChild = pWndChild->GetNextWindow();
  }

  if (!bNoLoopOverPopup)
  {
    CWnd* pWndPopup = pWnd->GetWindow(GW_HWNDFIRST);
    while (pWndPopup != NULL)
    {
      if (pWndPopup->IsKindOf(RUNTIME_CLASS(CPaneFrameWnd)))
      {
        OnChangeLayout(pWndPopup, TRUE);
        pWndPopup->RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
      }
      pWndPopup = pWndPopup->GetNextWindow();
    }
  }

  if (bTopLevel)
  {
    CMFCToolBarImages::EnableRTL(theApp.m_bIsRTL);

    CMFCToolBar::GetImages()->Mirror();
    CMenuImages::CleanUp();

    OnAppLook(theApp.m_nAppLook);
  }
}

void CMainFrame::OnChangeLook | ( | BOOL | bOneNoteTabs,
 |  | BOOL | bMDITabColors,
 |  | BOOL | bIsVSDotNetLook,
 |  | BOOL | bDockTabColors,
 |  | BOOL | bMDITabsVS2005Look,
 |  | BOOL | bActiveTabCloseButton
 | ) |  |

Definition at line 639 of file MainFrm.cpp.

{
  CMDITabInfo mdiTabParams;
  mdiTabParams.m_bTabCustomTooltips = TRUE;

  if (bMDITabsVS2005Look)
  {
    mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_VS2005;
    mdiTabParams.m_bDocumentMenu = TRUE;
  }
  else if (bOneNoteTabs)
  {
    mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_ONENOTE;
    mdiTabParams.m_bAutoColor = bMDITabColors;
  }

  if (bActiveTabCloseButton)
  {
    mdiTabParams.m_bTabCloseButton = FALSE;
    mdiTabParams.m_bActiveTabCloseButton = TRUE;
  }

  EnableMDITabbedGroups(TRUE, mdiTabParams);

  m_wndPropertiesBar.SetVSDotNetLook(bIsVSDotNetLook);

  m_wndPropertiesBar.OnChangeVisualStyle();
  m_wndDynamicHelpView.OnChangeVisualStyle();
  m_wndClassView.OnChangeVisualStyle();
  m_wndFileView.OnChangeVisualStyle();
  m_wndResourceView.OnChangeVisualStyle();

  CTabbedPane::EnableTabAutoColor(bDockTabColors);

  // Reload toolbar images:
  CMFCToolBar::ResetAllImages();

  m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_TOOLBAR24 : IDR_MAINFRAME);
  m_wndToolbarBuild.LoadBitmap(theApp.m_bHiColorIcons ? IDB_BUILD24 : IDR_BUILD);
  m_wndToolbarEdit.LoadBitmap(theApp.m_bHiColorIcons ? IDB_EDIT24 : IDR_EDIT);

  CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES, theApp.m_bHiColorIcons ? IDB_MENUIMAGES24 : 0);

  CDockingManager* pDockManager = GetDockingManager();
  ASSERT_VALID(pDockManager);

  SetDockingBarsIcons(theApp.m_bHiColorIcons);

  pDockManager->AdjustPaneFrames();

  RecalcLayout();
  RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
}

void CMainFrame::OnChangeLook ( )

Definition at line 752 of file mainfrm.cpp.

{
  BOOL bIsLook2003 = CMFCVisualManager::GetInstance ()->IsKindOf (
    RUNTIME_CLASS (CMFCVisualManagerOffice2003));

  m_wndRulerBar.CreateGDIObjects ();
  m_wndRulerBar.RedrawWindow ();

  CWindowDC dc (NULL);
  int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);

  m_wndTaskPane.UpdateIcons ();
  m_wndTaskPane.EnableNavigationToolbar (bIsLook2003,
    theApp.m_bHiColorIcons && nBitsPerPixel > 16 ? IDB_TASKSPANE_TOOLBAR : 0, CSize (16, 16));
  m_wndTaskPane.RecalcLayout (FALSE);

  //-----------------------
  // Reload toolbar images:
  //-----------------------
  CMFCToolBar::ResetAllImages ();

  m_wndToolBar.LoadBitmap (
    theApp.m_bHiColorIcons && nBitsPerPixel > 16 ? IDB_MAINFRAME_HC : IDR_MAINFRAME);

  m_wndFormatBar.LoadBitmap (IDR_FORMATBAR);

  CMFCToolBar::AddToolBarForImageCollection (IDR_TOOLBAR_IMAGES,
    theApp.m_bHiColorIcons && nBitsPerPixel > 16 ? IDR_TOOLBAR_IMAGES_HC : 0);

  CMFCToolBar::AddToolBarForImageCollection (IDR_BORDER_TYPE, IDR_BORDER_TYPE);

  RecalcLayout ();
  RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
}

void CMainFrame::OnChangeLook ( BOOL bOutlookBar2003 )

Definition at line 940 of file MainFrm.cpp.

{
  BOOL bIsLook2003 = CMFCVisualManager::GetInstance()->IsKindOf(RUNTIME_CLASS(CMFCVisualManagerOffice2003));

  CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;

  m_bOutlookBar2003 = bOutlookBar2003;

  if ((bar.GetStyle() & WS_VISIBLE) != 0)
  {
    if (m_bOutlookBar2003)
    {
      ShowPane(&m_wndBarOutlook2003, TRUE, FALSE, TRUE);
      ShowPane(&m_wndBarOutlook, FALSE, FALSE, TRUE);
    }
    else
    {
      ShowPane(&m_wndBarOutlook, TRUE, FALSE, TRUE);
      ShowPane(&m_wndBarOutlook2003, FALSE, FALSE, TRUE);
    }
  }

  // Reload toolbar images:
  CWindowDC dc(NULL);
  int nBitsPerPixel = dc.GetDeviceCaps(BITSPIXEL);

  BOOL bIsHiColor = bIsLook2003 && nBitsPerPixel > 16;

  CMFCToolBar::ResetAllImages();

  CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES, bIsHiColor ? IDB_MENU_IMAGE_HC : 0);

  m_wndToolBar.LoadBitmap(bIsHiColor ? IDB_TOOLBAR_HC : IDR_MAINFRAME);
  m_wndToolBarAdvanced.LoadBitmap(bIsHiColor ? IDB_ADVANCED_HC : IDR_ADVANCED);
  m_wndToolBarWeb.LoadBitmap(bIsHiColor ? IDB_WEB_HC : IDR_WEB);

  CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)m_wndBarOutlook2003.GetUnderlyingWindow();

  if (pOutlookBar != NULL)
  {
    pOutlookBar->SetImageList(bIsHiColor ? IDB_PAGES_HC : IDB_PAGES, 24);
    pOutlookBar->SetToolbarImageList(bIsHiColor ? IDB_PAGES_SMALL_HC : IDB_PAGES_SMALL, 16);

    m_wndBarOutlook2003.RecalcLayout();
  }

  RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);

  CMailFrame::OnChangeLook();
}

LRESULT CMainFrame::OnChangeRibbonCategory | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]

Definition at line 1113 of file MainFrm.cpp.

{
  if (!m_wndOutput.IsAutoHideMode ())
  {
    m_wndOutput.SetRedraw (FALSE);
  }

  m_wndOutput.ClearTabs ();

  CMFCRibbonCategory* pCategory = m_wndRibbonBar.GetActiveCategory ();
  if (pCategory != NULL)
  {
    ASSERT_VALID (pCategory);

    for (int i = 0; i < pCategory->GetPanelCount (); i++)
    {
      CMFCRibbonPanel* pPanel = pCategory->GetPanel (i);
      ASSERT_VALID (pPanel);

      m_wndOutput.AddTab (pPanel->GetName (), (UINT)pPanel->GetData ());
    }
  }

  if (!m_wndOutput.IsAutoHideMode ())
  {
    m_wndOutput.SetRedraw ();
    m_wndOutput.RedrawWindow (NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
  }

  return 0;
}

void CMainFrame::OnChangeStyle ( UINT nID ) [protected]

Definition at line 379 of file mainfrm.cpp.

{
  m_wndStyleBar.m_comboBox.SetCurSel((int)(nID-ID_STYLE_BASE));
}

void CMainFrame::OnCharColor ( ) [protected]

Definition at line 422 of file mainfrm.cpp.

{
  CColorMenu colorMenu;
  CRect rc;
  int index = m_wndFormatBar.CommandToIndex(ID_CHAR_COLOR);
  m_wndFormatBar.GetItemRect(index, &rc);
  m_wndFormatBar.ClientToScreen(rc);
  colorMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,rc.left,rc.bottom, this);
}

afx_msg void CMainFrame::OnClose ( ) [protected]
afx_msg void CMainFrame::OnClose ( ) [protected]
afx_msg void CMainFrame::OnClose ( ) [protected]
afx_msg void CMainFrame::OnClose ( ) [protected]
afx_msg void CMainFrame::OnClose ( ) [protected]
void CMainFrame::OnClose ( ) [protected]

Definition at line 468 of file mainfrm.cpp.

{
  // SaveBarState saves everything but the number of Columns in the Palette
  // we need to do that ourseleves.
  SaveBarState(_T("General"));
  AfxGetApp()->WriteProfileInt(
    _T("General"),_T("Columns"),m_wndPaletteBar.GetColumns());
  AfxGetApp()->WriteProfileInt(
    _T("General"),_T("Color"),(m_bColor!=0));
  AfxGetApp()->WriteProfileInt(
    _T("General"),_T("ToolTips"),(m_bToolTips!=0));

  WINDOWPLACEMENT wp;
  wp.length = sizeof wp;
  if (GetWindowPlacement(&wp))
  {
    wp.flags = 0;
    if (IsZoomed())
      wp.flags |= WPF_RESTORETOMAXIMIZED;
    // and write it to the .INI file
    WriteWindowPlacement(&wp);
  }
  CFrameWnd::OnClose();
}

afx_msg void CMainFrame::OnClose ( ) [protected]
void CMainFrame::OnCloseFoldersPopup ( BOOL bKeep )

Definition at line 602 of file MainFrm.cpp.

{
  if (bKeep)
  {
    m_wndCaption.EnableButton(FALSE);
    ShowPane(&m_wndFolderList, TRUE, FALSE, TRUE);
  }

  m_wndCaption.SetButtonPressed(FALSE);
}

BOOL CMainFrame::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [virtual]

Definition at line 126 of file MainFrm.cpp.

{
  // let the view have first crack at the command
  if (m_wndView.OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
    return TRUE;

  // otherwise, do default handling
  return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}

virtual BOOL CMainFrame::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [virtual]
virtual BOOL CMainFrame::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [virtual]
virtual BOOL CMainFrame::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [virtual]
BOOL CMainFrame::OnCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected, virtual]

Definition at line 438 of file MainFrm.cpp.

{
  // If control located on toolbar has focus, we should
  // redirect clipboard commands to this control:
  if (CFindComboButton::HasFocus() && HIWORD(wParam) == 1) // Command from accelerator
  {
    UINT uiCmd = LOWORD(wParam);
    switch (uiCmd)
    {
    case ID_EDIT_PASTE:
      ::SendMessage(::GetFocus(), WM_PASTE, 0, 0);
      return TRUE;

    case ID_EDIT_COPY:
      ::SendMessage(::GetFocus(), WM_COPY, 0, 0);
      return TRUE;

    case ID_EDIT_CUT:
      ::SendMessage(::GetFocus(), WM_CUT, 0, 0);
      return TRUE;
    }
  }

  return CMDIFrameWndEx::OnCommand(wParam, lParam);
}

virtual BOOL CMainFrame::OnCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected, virtual]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [private]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 85 of file mainfrm.cpp.

{
  if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  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
  }

  m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
  EnableDocking(CBRS_ALIGN_ANY);
  DockControlBar(&m_wndToolBar);

  if (!m_wndStatusBar.Create(this) ||
    !m_wndStatusBar.SetIndicators(indicators,
      sizeof(indicators)/sizeof(UINT)))
  {
    TRACE0("Failed to create status bar\n");
    return -1;      // fail to create
  }

  return 0;
}

afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct )
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
virtual BOOL CMainFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [protected, virtual]
virtual BOOL CMainFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [virtual]
virtual BOOL CMainFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [protected, virtual]
BOOL CMainFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [virtual]

Definition at line 87 of file MainFrm.cpp.

{
    if (!m_wndSplitter.CreateStatic(this,2,1))
    {
      TRACE0("Failed to create split bar ");
      return FALSE;    // failed to create
    }
    if(!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CDBVListView),CSize(10,200),pContext))
    {
      TRACE0("Failed to create CDBVListView ");
      return FALSE;    // failed to create
    }
    if(!m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CEmpView),CSize(10,100),pContext))
    {
      TRACE0("Failed to create CEmpView ");
      return FALSE;    // failed to create
    }

    return TRUE;
}

virtual BOOL CMainFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [protected, virtual]
virtual BOOL CMainFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [protected, virtual]
void CMainFrame::OnDate ( ) [protected]

Definition at line 269 of file MainFrm.cpp.

{
  MessageBox (_T("Change date..."));
}

void CMainFrame::OnDestroy ( void ) [protected]

Definition at line 154 of file mainfrm.cpp.

{
  SavePosition() ;
  CFrameWnd::OnDestroy();
}

afx_msg void CMainFrame::OnDestroy ( ) [protected]
afx_msg void CMainFrame::OnDevModeChange ( LPTSTR lpDeviceName ) [protected]
void CMainFrame::OnDevModeChange ( LPTSTR lpDeviceName ) [protected]

Definition at line 325 of file mainfrm.cpp.

{
  theApp.NotifyPrinterChanged();
  CFrameWnd::OnDevModeChange(lpDeviceName); //sends message to descendants
}

BOOL CMainFrame::OnDrawMenuImage | ( | CDC * | pDC,
 |  | const CMFCToolBarMenuButton * | pMenuButton,
 |  | const CRect & | rectImage |
 | ) |  |  | [protected, virtual]

Definition at line 275 of file MainFrm.cpp.

{
  ASSERT_VALID (pDC);
  ASSERT_VALID (pMenuButton);

  if (pMenuButton->m_nID == ID_DYNAMIC_ITEM_2)
  {
    CBrush br (RGB (0, 0, 255));

    CRect rect = rectImage;
    rect.DeflateRect (2, 2);

    pDC->FillRect (rect, &br);
    return TRUE;
  }

  return FALSE;
}

virtual BOOL CMainFrame::OnDrawMenuImage | ( | CDC * | pDC,
 |  | const CMFCToolBarMenuButton * | pMenuButton,
 |  | const CRect & | rectImage |
 | ) |  |  | [virtual]
void CMainFrame::OnDropDown | ( | NMHDR * | pNotifyStruct,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 403 of file MainFrm.cpp.

{
  // this function handles the dropdown menus from the toolbar
  NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct;
  CRect rect;

  // translate the current toolbar item rectangle into screen coordinates
  // so that we'll know where to pop up the menu
  m_wndToolBar.GetToolBarCtrl().GetRect(pNMToolBar->iItem, &rect);
  rect.top = rect.bottom;
  ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft());
  if(pNMToolBar->iItem == ID_FONT_DROPDOWN)
  {
    CMenu menu;
    CMenu* pPopup;

    // the font popup is stored in a resource
    menu.LoadMenu(IDR_FONT_POPUP);
    pPopup = menu.GetSubMenu(0);
    pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, rect.top + 1, AfxGetMainWnd());
  }
  else if(pNMToolBar->iItem == ID_FAVORITES_DROPDOWN)
  {
    CMenu* pPopup;

    // for the favorties popup, just steal the menu from the main window
    pPopup = GetMenu()->GetSubMenu(3);
    pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, rect.top + 1, AfxGetMainWnd());
  }
  *pResult = TBDDRET_DEFAULT;
}

afx_msg void CMainFrame::OnDropFiles ( HDROP hDropInfo ) [protected]
void CMainFrame::OnDropFiles ( HDROP hDropInfo ) [protected]

Definition at line 414 of file mainfrm.cpp.

{
  TCHAR szFileName[_MAX_PATH];
  ::DragQueryFile(hDropInfo, 0, szFileName, _MAX_PATH);
  ::DragFinish(hDropInfo);
  theApp.OpenDocumentFile(szFileName);
}

afx_msg void CMainFrame::OnDummy ( ) [protected]
afx_msg void CMainFrame::OnDummy ( UINT id ) [protected]
void CMainFrame::OnDummy ( UINT id ) [protected]

Definition at line 2636 of file MainFrm.cpp.

{
}

void CMainFrame::OnDummy ( ) [protected]

Definition at line 980 of file mainfrm.cpp.

{
}

void CMainFrame::OnDynamicItem1 ( ) [protected]

Definition at line 265 of file MainFrm.cpp.

{
  AfxMessageBox (_T ("DynamicItem 1 is selected"));
}

void CMainFrame::OnDynamicItem2 ( ) [protected]

Definition at line 270 of file MainFrm.cpp.

{
  AfxMessageBox (_T ("DynamicItem 2 is selected"));
}

void CMainFrame::OnEditFindCombo ( ) [protected]

Definition at line 202 of file mainfrm.cpp.

{
  m_wndToolBar.m_toolBarCombo.SetFocus();
}

void CMainFrame::OnEditMyItem1 ( ) [protected]

Definition at line 255 of file MainFrm.cpp.

{
  AfxMessageBox (_T ("MyItem 1 is selected"));
}

void CMainFrame::OnEditMyItem2 ( ) [protected]

Definition at line 260 of file MainFrm.cpp.

{
  AfxMessageBox (_T ("MyItem 2 is selected"));
}

void CMainFrame::OnEnable ( BOOL bEnable ) [protected]

Definition at line 1000 of file MainFrm.cpp.

{
  CWnd* pWnd = GetNextWindow();
  while (pWnd != NULL)
  {
    if (pWnd->IsKindOf(RUNTIME_CLASS(CFrameWndEx)))
    {
      pWnd->EnableWindow(bEnable);
    }
    pWnd = pWnd->GetNextWindow();
  }
}

BOOL CMainFrame::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 1596 of file MainFrm.cpp.

{
  return TRUE;
}

void CMainFrame::OnExample ( UINT nCmdID )

Definition at line 133 of file mainfrm.cpp.

{
  if (nCmdID == m_nCurrentExample)
    return;  // already selected

  // Set the child window ID of the active view to AFX_IDW_PANE_FIRST.
  // This is necessary so that CFrameWnd::RecalcLayout will allocate
  // this "first pane" to that portion of the frame window's client
  // area not allocated to control bars.  Set the child ID of
  // the previously active view to some other ID; we will use the
  // command ID as the child ID.
  CView* pOldActiveView = GetActiveView();
    ::SetWindowLong(pOldActiveView->m_hWnd, GWL_ID, m_nCurrentExample);

  CRuntimeClass* pNewViewClass;
  switch (nCmdID)
  {
    case ID_STRINGLIST:
      pNewViewClass = RUNTIME_CLASS(CStringListView);
      break;
    case ID_TYPEDLIST:
      pNewViewClass = RUNTIME_CLASS(CTypedPtrListView);
      break;
    case ID_INTLIST:
      pNewViewClass = RUNTIME_CLASS(CIntListView);
      break;
    case ID_DWORDARRAY:
      pNewViewClass = RUNTIME_CLASS(CDWordArrayView);
      break;
    case ID_TYPEDPTRARRAY:
      pNewViewClass = RUNTIME_CLASS(CTypedPtrArrayView);
      break;
    case ID_POINTARRAY:
      pNewViewClass = RUNTIME_CLASS(CPointArrayView);
      break;
    case ID_MAPSTRINGTOSTRING:
      pNewViewClass = RUNTIME_CLASS(CMapStringToStringView);
      break;
    case ID_TYPEDPTRMAP:
      pNewViewClass = RUNTIME_CLASS(CTypedPtrMapView);
      break;
    case ID_MAPDWORDTOMYSTRUCT:
      pNewViewClass = RUNTIME_CLASS(CMapDWordToMyStructView);
      break;
    default:
      ASSERT(0);
      return;
  }

  // create the new view
  CCreateContext context;
  context.m_pNewViewClass = pNewViewClass;
  context.m_pCurrentDoc = GetActiveDocument();
  CView* pNewView = STATIC_DOWNCAST(CView, CreateView(&context));
  if (pNewView != NULL)
  {
    // the new view is there, but invisible and not active...
    pNewView->ShowWindow(SW_SHOW);
    pNewView->OnInitialUpdate();
    SetActiveView(pNewView);
    RecalcLayout();
    m_nCurrentExample = nCmdID;

    // finally destroy the old view...
    pOldActiveView->DestroyWindow();
  }
}

void CMainFrame::OnFavorite ( UINT nID ) [protected]

Definition at line 344 of file MainFrm.cpp.

{
  ((CMfcieView*)GetActiveView())->Navigate2(m_astrFavoriteURLs[nID-0xe00], 0, NULL);
}

afx_msg void CMainFrame::OnFavorite ( UINT nID ) [protected]
void CMainFrame::OnFileBind ( ) [protected]

Definition at line 556 of file mainfrm.cpp.

{
  m_pObjTreeView->OnFileBind() ;
}

void CMainFrame::OnFileCloseSolution ( ) [protected]

Definition at line 580 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here
}

void CMainFrame::OnFileConfigureScreenCapture ( void )

Definition at line 136 of file MainFrm.cpp.

{
  ConfigureCapture(GetSafeHwnd(), &m_CapData);
}

void CMainFrame::OnFileNewBlankSolution ( ) [protected]

Definition at line 570 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here
}

void CMainFrame::OnFileNewProject ( ) [protected]

Definition at line 565 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here
}

void CMainFrame::OnFileOpenSolution ( ) [protected]

Definition at line 575 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here
}

afx_msg void CMainFrame::OnFilePrint ( ) [protected]
void CMainFrame::OnFilePrint ( ) [protected]

Definition at line 2640 of file MainFrm.cpp.

{
  if (IsPrintPreview())
  {
    PostMessage(WM_COMMAND, AFX_ID_PREVIEW_PRINT);
  }
}

afx_msg void CMainFrame::OnFilePrintPreview ( ) [protected]
void CMainFrame::OnFilePrintPreview ( ) [protected]

Definition at line 2648 of file MainFrm.cpp.

{
  if (IsPrintPreview())
  {
    PostMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
  }
}

void CMainFrame::OnFileRunREGEDIT ( ) [protected]

Definition at line 351 of file mainfrm.cpp.

{
  STARTUPINFO si;
  PROCESS_INFORMATION pi;
  ZeroMemory( &si, sizeof(si) );
  si.cb = sizeof(si);
  ZeroMemory( &pi, sizeof(pi) );

  BOOL bFoundRegedit = FALSE;
  TCHAR szSysDirStr[ _MAX_PATH ];
  TCHAR szRegeditPath[ _MAX_PATH + _MAX_FNAME + 1];
  GetSystemDirectory(szSysDirStr, _MAX_PATH); //Get system path

  //Search for regedit executable on system path
  memset (szRegeditPath, 0, sizeof (szRegeditPath));
  bFoundRegedit = SearchPath(szSysDirStr, _T("REGEDT32.EXE"), NULL, _MAX_PATH + _MAX_FNAME, szRegeditPath, NULL);
  if (!bFoundRegedit)
    bFoundRegedit = SearchPath(szSysDirStr, _T("REGEDIT.EXE"), NULL, _MAX_PATH + _MAX_FNAME, szRegeditPath, NULL);

  if (bFoundRegedit) {
    #pragma warning(suppress: 6054) // unexpected prefast warning
    CreateProcess( szRegeditPath, //path to regedit exe
      NULL, // pointer to command line string
      NULL, // Process handle not inheritable.
      NULL, // Thread handle not inheritable.
      FALSE,  // Set handle inheritance to FALSE.
      0,    // No creation flags.
      NULL, // Use parent's environment block.
      NULL, // Use parent's starting directory.
      &si,  // Pointer to STARTUPINFO structure.
      &pi   // Pointer to PROCESS_INFORMATION structure.
    );

    CloseHandle( pi.hProcess );
    CloseHandle( pi.hThread );
  }
}

void CMainFrame::OnFileSaveAll ( ) [protected]

Definition at line 585 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here
}

void CMainFrame::OnFileScreencapture ( void )

Definition at line 141 of file MainFrm.cpp.

{
  CaptureScreen(&m_CapData);
  if (m_CapData.szCaptureFilename[0] != '\0') {
    // In a real application that had interest in the
    // actual image and not just a screen capture
    // we would want to pass the Bitmap/CImage back
    // and forth directly, but for screen capture
    // sample purposes, this works fine.
    CString strPathName(m_CapData.szCapturePath);
    if (strPathName.Right(1) != "\\")
      strPathName += '\\';
    strPathName += m_CapData.szCaptureFilename;
    m_wndView.SetImage(strPathName);
  }
}

void CMainFrame::OnFileViewTypeLib ( ) [protected]

Definition at line 428 of file mainfrm.cpp.

{
  static TCHAR szFilter[] = _T("TypeLib Files (*.tlb;*.olb;*.dll;*.ocx;*.exe)|*.tlb;*.olb;*.dll;*.ocx;*.exe|AllFiles(*.*)|*.*|") ;

  CFileDialog dlg(TRUE, _T("*.tlb"), NULL,
          OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST,
          szFilter, this);
  if (IDOK != dlg.DoModal())
    return ;

  // Call LoadTypeLib
  LPTYPELIB lpTypeLib;
  HRESULT hr = ::LoadTypeLib(CT2COLE(dlg.GetPathName()), &lpTypeLib);
  if (FAILED(hr))
  {
    CString szErrorMsg;
    szErrorMsg.Format(_T("LoadTypeLib( %s ) failed."),(LPCTSTR)dlg.GetPathName());
    ErrorMessage( szErrorMsg, hr );
    return ;
  }
  // call the interface wiewer
  ENSURE(lpTypeLib != NULL);
  ViewInterface( GetSafeHwnd(), IID_ITypeLib, (IUnknown*)lpTypeLib);
  VERIFY(0 == lpTypeLib->Release()) ;
}

afx_msg void CMainFrame::OnFontChange ( ) [protected]
void CMainFrame::OnFontChange ( ) [protected]

Definition at line 320 of file mainfrm.cpp.

{
  m_wndFormatBar.SendMessage(CWordPadApp::m_nPrinterChangedMsg);
}

void CMainFrame::OnFontNameChange ( ) [protected]

Definition at line 238 of file MainFrm.cpp.

{
  CString szText;
  m_wndEditBar.m_fontNameCombo.GetLBText(
    m_wndEditBar.m_fontNameCombo.GetCurSel(),szText);

  CHTMLEdView *pView = (CHTMLEdView*)GetActiveView();
  ASSERT_VALID(pView);
  pView->SetFontFace(szText);

}

void CMainFrame::OnFontSizeChange ( ) [protected]

Definition at line 250 of file MainFrm.cpp.

{
  CString szText;
  m_wndEditBar.m_fontSizeCombo.GetLBText(
    m_wndEditBar.m_fontSizeCombo.GetCurSel(),szText);

  CHTMLEdView *pView = (CHTMLEdView*)GetActiveView();
  ASSERT_VALID(pView);

  pView->SetFontSize((short)_ttoi(szText));
}

void CMainFrame::OnFourColumns ( ) [protected]

Definition at line 254 of file MainFrm.cpp.

{
  m_wndPalette.SetColumns (4);
}

LRESULT CMainFrame::OnGetDocumentColors | ( | WPARAM | ,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 697 of file mainfrm.cpp.

{
  CList<COLORREF,COLORREF>* pLstDocColors =
    (CList<COLORREF,COLORREF>*) lp;
  ASSERT_VALID (pLstDocColors);

  CWordPadView* pView = DYNAMIC_DOWNCAST (CWordPadView, GetActiveView());
  if (pView != NULL)
  {
    pView->GetDocumentColors (*pLstDocColors);
  }

  return 0;
}

void CMainFrame::OnGetMinMaxInfo ( MINMAXINFO FAR * lpMMI ) [protected]

Definition at line 457 of file MainFrm.cpp.

{
  CFrameWnd::OnGetMinMaxInfo(lpMMI);

  if(m_wndCategoryBar.GetSafeHwnd () != NULL)
  {
    CRect rtRect (CPoint (0, 0), m_wndCategoryBar.CalcSize (FALSE));

    rtRect.bottom = 200;

    CalcWindowRect (rtRect, CWnd::adjustBorder);

    lpMMI->ptMinTrackSize.x = rtRect.Width ();
    lpMMI->ptMinTrackSize.y = rtRect.Height ();
  }
}

afx_msg void CMainFrame::OnGetMinMaxInfo ( MINMAXINFO FAR * lpMMI ) [protected]
LRESULT CMainFrame::OnGetTabToolTip | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 675 of file MainFrm.cpp.

{
  CMFCTabToolTipInfo* pInfo = (CMFCTabToolTipInfo*) lp;
  ASSERT (pInfo != NULL);

  if (pInfo)
  {
    ASSERT_VALID (pInfo->m_pTabWnd);
    if (!pInfo->m_pTabWnd->IsMDITab ())
    {
      return 0;
    }
    pInfo->m_strText.Format (_T("Tab #%d Custom Tooltip"), pInfo->m_nTabIndex + 1);
  }

  return 0;
}

afx_msg LRESULT CMainFrame::OnGetTabToolTip | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]
afx_msg void CMainFrame::OnHello ( ) [protected]
void CMainFrame::OnHello ( ) [protected]

Definition at line 62 of file mainfrm.cpp.

{
#pragma warning(push)
#pragma warning(disable:6014)
  CHelloWnd *pHelloWnd = new CHelloWnd;
#pragma warning(pop)

  if (!pHelloWnd->Create(_T("Hello"),
    WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW,
    rectDefault, this))
    return;

  // the default PostNcDestroy handler will delete this object when destroyed
}

LRESULT CMainFrame::OnHelpCustomizeToolbars | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 420 of file MainFrm.cpp.

{
// int iPageNum = (int) wp;

//  CToolbarCustomize* pDlg = (CToolbarCustomize*) lp;
//  ASSERT_VALID (pDlg);

  // TODO: show help about page number iPageNum

  return 0;
}

afx_msg LRESULT CMainFrame::OnHelpCustomizeToolbars | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnHelpCustomizeToolbars | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]
afx_msg void CMainFrame::OnHelpFinder ( ) [protected]
void CMainFrame::OnHelpFinder ( ) [protected]

Definition at line 409 of file mainfrm.cpp.

{
  theApp.WinHelp(0, HELP_FINDER);
}

void CMainFrame::OnHelpKeyboardmap ( ) [protected]

Definition at line 464 of file MainFrm.cpp.

{
  CMFCKeyMapDialog dlg(this, TRUE /* Enable Print */);
  dlg.DoModal();
}

void CMainFrame::OnHelpMicrosoft ( ) [protected]

Definition at line 474 of file MainFrm.cpp.

{
  ::ShellExecute (NULL, NULL, _T("http://msdn2.microsoft.com/en-us/visualc/default.aspx"), NULL, NULL, NULL);
}

void CMainFrame::OnHelpWeb ( ) [protected]

Definition at line 693 of file MainFrm.cpp.

{
  ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
}

afx_msg LRESULT CMainFrame::OnHighlightRibbonListItem | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]
LRESULT CMainFrame::OnHighlightRibbonListItem | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 984 of file mainfrm.cpp.

{
  int nIndex = (int) wp;

  CMFCRibbonBaseElement* pElem = (CMFCRibbonBaseElement*) lp;
  ASSERT_VALID(pElem);

  const UINT uiCommand = pElem->GetID();

  CFrameWnd* pFrame = GetActiveFrame();
  if (pFrame == NULL)
  {
    return 0;
  }

  CDrawDoc* pDoc = (CDrawDoc*)pFrame->GetActiveDocument();
  if (pDoc == NULL)
  {
    return 0;
  }

  ASSERT_VALID(pDoc);

  CDrawView* pView = DYNAMIC_DOWNCAST(CDrawView, pFrame->GetActiveView());
  if (pView == NULL)
  {
    return 0;
  }

  if (uiCommand != ID_VIEW_PAPERCOLOR)
  {
    if (nIndex != -1)
    {
      pView->StorePreviewState();
    }
    else
    {
      pView->RestorePreviewState();
    }
  }

  switch (uiCommand)
  {
  case ID_VIEW_PAPERCOLOR:
  case ID_OBJECT_FILLCOLOR:
  case ID_OBJECT_LINECOLOR:
    {
      COLORREF color = ((CMFCRibbonColorButton*) pElem)->GetHighlightedColor();

      if (uiCommand == ID_VIEW_PAPERCOLOR)
      {
        pDoc->SetPreviewColor(color);
      }
      else if (nIndex != -1)
      {
        if (uiCommand == ID_OBJECT_FILLCOLOR)
        {
          pView->PreviewFillColor(color);
        }
        else
        {
          pView->PreviewLineColor(color);
        }
      }

      CMFCPopupMenu::UpdateAllShadows();
    }
    break;

  case ID_OBJECT_LINEWEIGHT:
    if (nIndex != -1)
    {
      pView->PreviewLineWeight(nIndex + 1);
      CMFCPopupMenu::UpdateAllShadows();
    }
    break;

  case ID_OBJECT_STYLES:
    if (nIndex != -1)
    {
      pView->PreviewStyle(c_Styles[nIndex].clrFill, c_Styles[nIndex].clrLine);
      CMFCPopupMenu::UpdateAllShadows();
    }
    break;
  }

  return 0;
}

void CMainFrame::OnHistory ( UINT nID ) [protected]

Definition at line 586 of file MainFrm.cpp.

{
  CIEDemoView* pView = ((CIEDemoView*)GetActiveView());
  ASSERT_VALID (pView);

  CIEDemoDoc* pDoc = pView->GetDocument();
  ASSERT_VALID(pDoc);

  CHistoryObj* pObj = pDoc->Go (nID);
  ASSERT (pObj != NULL);

  if (pObj)
  {
    pView->Navigate2 (pObj->GetURL (), 0, NULL);
  }
}

void CMainFrame::OnLink ( UINT nID ) [protected]

Definition at line 939 of file MainFrm.cpp.

{
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
  m_wndRibbonBar.GetElementsByID (nID, ar);

  if (ar.GetSize () >= 1)
  {
    CMFCRibbonLinkCtrl* pLink = DYNAMIC_DOWNCAST (CMFCRibbonLinkCtrl, ar[0]);
    if (pLink != NULL)
    {
      if (!pLink->OpenLink ())
      {
        AfxMessageBox (_T("Link clicked."));
      }
    }
  }
}

void CMainFrame::OnLink ( ) [protected]

Definition at line 2484 of file MainFrm.cpp.

{
  CMFCRibbonLinkCtrl* pLink = (CMFCRibbonLinkCtrl*) m_wndStatusBar.FindByID(ID_STATUSBAR_LINK);

  if (pLink != NULL)
  {
    pLink->OpenLink();
  }
}

void CMainFrame::OnLink1 ( ) [protected]

Definition at line 648 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here

}

void CMainFrame::OnLinkMicrosoft ( ) [protected]

Definition at line 765 of file MainFrm.cpp.

{
  ((CIEDemoView*)GetActiveView())->Navigate2 (_T("http://www.microsoft.com"), 0, NULL);
}

void CMainFrame::OnLinkMSDN ( ) [protected]

Definition at line 760 of file MainFrm.cpp.

{
  ((CIEDemoView*)GetActiveView())->Navigate2 (_T("http://www.msdn.com"), 0, NULL);
}

void CMainFrame::OnLinks ( UINT nID ) [protected]

Definition at line 410 of file MainFrm.cpp.

{
  CMSMLinksBar* pBar = GetLinksBar (nID);

  if (pBar != NULL)
  {
    pBar->SetCurrentCommand (nID);
  }
}

void CMainFrame::OnLinkVisualCPP ( ) [protected]

Definition at line 770 of file MainFrm.cpp.

{
  ((CIEDemoView*)GetActiveView())->Navigate2 (_T("http://msdn2.microsoft.com/visualc/"), 0, NULL);
}

void CMainFrame::OnLoadDebugConf ( ) [protected]

Definition at line 308 of file MainFrm.cpp.

{
  CRect rectOld;
  GetWindowRect (rectOld);
  theApp.m_bLoadUserToolbars = FALSE;
  SetRedraw (FALSE);
  theApp.LoadState (this, _T ("Debug"));
  SetRedraw (TRUE);
  RedrawWindow (NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
                RDW_ERASE | RDW_ALLCHILDREN);
  GetDesktopWindow ()->RedrawWindow (rectOld, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
                RDW_ERASE | RDW_ALLCHILDREN);
}

void CMainFrame::OnLoadRegularConf ( ) [protected]

Definition at line 327 of file MainFrm.cpp.

{
  CRect rectOld;
  GetWindowRect (rectOld);
  theApp.m_bLoadUserToolbars = FALSE;
  SetRedraw (FALSE);
  theApp.LoadState (this, _T ("Regular")) ;
  SetRedraw (TRUE);
  RedrawWindow (NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
                RDW_ERASE | RDW_ALLCHILDREN);
  GetDesktopWindow ()->RedrawWindow (rectOld, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
                RDW_ERASE | RDW_ALLCHILDREN);
}

afx_msg void CMainFrame::OnMdiCancel ( ) [protected]
afx_msg void CMainFrame::OnMdiCancel ( ) [protected]
void CMainFrame::OnMdiCancel ( ) [protected]

Definition at line 284 of file mainfrm.cpp.

{
  // TODO: Add your command handler code here

}

afx_msg void CMainFrame::OnMdiMoveToNextGroup ( ) [protected]
afx_msg void CMainFrame::OnMdiMoveToNextGroup ( ) [protected]
void CMainFrame::OnMdiMoveToNextGroup ( ) [protected]

Definition at line 264 of file mainfrm.cpp.

{
  MDITabMoveToNextGroup();
}

afx_msg void CMainFrame::OnMdiMoveToPrevGroup ( ) [protected]
afx_msg void CMainFrame::OnMdiMoveToPrevGroup ( ) [protected]
void CMainFrame::OnMdiMoveToPrevGroup ( ) [protected]

Definition at line 269 of file mainfrm.cpp.

{
  MDITabMoveToNextGroup(FALSE);
}

afx_msg void CMainFrame::OnMdiNewHorzTabGroup ( ) [protected]
afx_msg void CMainFrame::OnMdiNewHorzTabGroup ( ) [protected]
void CMainFrame::OnMdiNewHorzTabGroup ( ) [protected]

Definition at line 274 of file mainfrm.cpp.

{
  MDITabNewGroup(FALSE);
}

afx_msg void CMainFrame::OnMdiNewVertGroup ( ) [protected]
afx_msg void CMainFrame::OnMdiNewVertGroup ( ) [protected]
void CMainFrame::OnMdiNewVertGroup ( ) [protected]

Definition at line 279 of file mainfrm.cpp.

{
  MDITabNewGroup();
}

void CMainFrame::OnMdiTabbed ( ) [protected]

Definition at line 722 of file MainFrm.cpp.

{
  CMDIChildWndEx* pMDIChild = DYNAMIC_DOWNCAST(CMDIChildWndEx, MDIGetActive ());
  if (pMDIChild == NULL)
  {
    ASSERT (FALSE);
    return;
  }

  TabbedDocumentToControlBar (pMDIChild);
}

void CMainFrame::OnMdiTabbedDocument ( ) [protected]

Definition at line 871 of file MainFrm.cpp.

{
  CMDIChildWndEx* pMDIChild = DYNAMIC_DOWNCAST(CMDIChildWndEx, MDIGetActive());
  if (pMDIChild == NULL)
  {
    ASSERT(FALSE);
    return;
  }

  TabbedDocumentToControlBar(pMDIChild);
}

BOOL CMainFrame::OnMenuButtonToolHitTest | ( | CMFCToolBarButton * | pButton,
 |  | TOOLINFO * | pTI |
 | ) |  |  | [virtual]

Definition at line 674 of file MainFrm.cpp.

{
  ASSERT_VALID (pButton);

  if (pButton->m_nID < FIRST_FAVORITE_COMMAND ||
    pButton->m_nID > LAST_FAVORITE_COMMAND)
  {
    return FALSE;
  }

  ASSERT (pTI != NULL);

  if (pTI)
  {
    CString strText = theApp.m_Favorites.GetURLofID (pButton->m_nID);
    pTI->lpszText = (LPTSTR) ::calloc ((strText.GetLength () + 1), sizeof (TCHAR));
    if (pTI->lpszText)
    {
      lstrcpy (pTI->lpszText, strText);
    }
  }

  return TRUE;
}

virtual BOOL CMainFrame::OnMenuButtonToolHitTest | ( | CMFCToolBarButton * | pButton,
 |  | TOOLINFO * | pTI |
 | ) |  |  | [virtual]
void CMainFrame::OnMenuSelection ( ) [protected]

Definition at line 462 of file mainfrm.cpp.

{
  // This sample doesn't do anything with button presses but a command handler
  // needs to be present for MFC to enable the buttons
}

void CMainFrame::OnMiniFramePropertySheet ( )

Definition at line 126 of file mainfrm.cpp.

{
  // If mini frame does not already exist, create a new one.
  // Otherwise, unhide it

  if (m_pShapePropFrame == NULL)
  {
    m_pShapePropFrame = new CShapePropSheetFrame;
    CRect rect(0, 0, 0, 0);
    CString strTitle;
    strTitle.LoadString(IDS_OBJECT_PROPERTIES);
    if (!m_pShapePropFrame->Create(NULL, strTitle,
      WS_POPUP | WS_CAPTION | WS_SYSMENU, rect, this))
    {
      m_pShapePropFrame = NULL;
      return;
    }
    m_pShapePropFrame->CenterWindow();
  }

  // Before unhiding the modeless property sheet, update its
  // settings to reflect the currently selected shape.
  CShapesView* pView =
    STATIC_DOWNCAST(CShapesView, MDIGetActive()->GetActiveView());
  ASSERT_VALID(pView);
  if (pView->m_pShapeSelected != NULL)
  {
     m_pShapePropFrame->m_pModelessShapePropSheet->
       SetSheetPropsFromShape(pView->m_pShapeSelected);
  }

  if (m_pShapePropFrame != NULL && !m_pShapePropFrame->IsWindowVisible())
    m_pShapePropFrame->ShowWindow(SW_SHOW);
}

void CMainFrame::OnMove | ( | int | x,
 |  | int | y |
 | ) |  |  | [protected]

Definition at line 383 of file mainfrm.cpp.

{
  CFrameWnd::OnMove(x, y);
  WINDOWPLACEMENT wp;
  wp.length = sizeof(wp);
  GetWindowPlacement(&wp);
  theApp.m_rectInitialFrame = wp.rcNormalPosition;
  CView* pView = GetActiveView();
  if (pView != NULL)
    pView->SendMessage(WM_MOVE);
}

afx_msg void CMainFrame::OnMove | ( | int | x,
 |  | int | y |
 | ) |  |  | [protected]
void CMainFrame::OnNcRButtonDown | ( | UINT | nHitTest,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 117 of file mainfrm.cpp.

{
  &point; // not used in retail build
#ifdef _DEBUG
  // for debugging we support a right-mouse activated debug menu
  CMenu menubar;
  if (menubar.LoadMenu(IDR_POPUPMENUS))
  {
    // debug menu is the first popup
    CMenu* pPopup = menubar.GetSubMenu(0);
    ENSURE(pPopup != NULL);

    // route commands through this main frame
    pPopup->TrackPopupMenu(TPM_RIGHTBUTTON, point.x, point.y, this);
  }
#endif
}

void CMainFrame::OnNewAddress ( ) [protected]

Definition at line 368 of file MainFrm.cpp.

{
  // gets called when an item in the Address combo box is selected
  // just navigate to the newly selected location.
  CString str;

  m_wndAddress.GetLBText(m_wndAddress.GetCurSel(), str);
  ((CMfcieView*)GetActiveView())->Navigate2(str, 0, NULL);
}

afx_msg void CMainFrame::OnNewAddress ( ) [protected]
afx_msg void CMainFrame::OnNewAddress ( ) [protected]
void CMainFrame::OnNewAddressEnter ( ) [protected]

Definition at line 378 of file MainFrm.cpp.

{
  // gets called when an item is entered manually into the edit box portion
  // of the Address combo box.
  // navigate to the newly selected location and also add this address to the
  // list of addresses in the combo box.
  CString str;

  m_wndAddress.GetEditCtrl()->GetWindowText(str);
  ((CMfcieView*)GetActiveView())->Navigate2(str, 0, NULL);

  COMBOBOXEXITEM item;

  item.mask = CBEIF_TEXT;
  item.iItem = -1;
  item.pszText = (LPTSTR)(LPCTSTR)str;
  m_wndAddress.InsertItem(&item);
}

afx_msg void CMainFrame::OnNewAddressEnter ( ) [protected]
afx_msg void CMainFrame::OnNewAddressEnter ( ) [protected]
void CMainFrame::OnObjectDelete ( ) [protected]

Definition at line 407 of file mainfrm.cpp.

{
  m_pObjTreeView->OnObjectDelete() ;
}

void CMainFrame::OnObjectVerify ( ) [protected]

Definition at line 417 of file mainfrm.cpp.

{
  m_pObjTreeView->OnObjectVerify() ;

}

afx_msg void CMainFrame::OnOleInsertNew ( ) [protected]
LONG_PTR CMainFrame::OnOpenMsg | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam |
 | ) |  |  | [protected]

Definition at line 395 of file mainfrm.cpp.

{
  TCHAR szAtomName[256];
  szAtomName[0] = NULL;
  GlobalGetAtomName((ATOM)lParam, szAtomName, 256);
  CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
  if (szAtomName[0] != NULL && pDoc != NULL)
  {
    if (lstrcmpi(szAtomName, pDoc->GetPathName()) == 0)
      return TRUE;
  }
  return FALSE;
}

LRESULT CMainFrame::OnOpenMsg | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 448 of file mainfrm.cpp.

{
  TCHAR szAtomName[256];
  szAtomName[0] = NULL;
  GlobalGetAtomName((ATOM)lParam, szAtomName, 256);
  CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
  if (szAtomName[0] != NULL && pDoc != NULL)
  {
    if (lstrcmpi(szAtomName, pDoc->GetPathName()) == 0)
      return TRUE;
  }
  return FALSE;
}

void CMainFrame::OnOutlookAddPage ( ) [protected]

Definition at line 742 of file MainFrm.cpp.

{
  CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)m_wndBarOutlook.GetUnderlyingWindow();
  if (pOutlookBar == NULL)
  {
    return;
  }

  CMFCOutlookBarPane* pPane = m_wndBarOutlook.CreateCustomPage(_T("New Page"), TRUE, CBRS_ALIGN_ANY);

  if (pPane != NULL)
  {
    OnOutlookRenamePage();
  }
}

void CMainFrame::OnOutlookAnimation ( ) [protected]

Definition at line 763 of file MainFrm.cpp.

{
  CMFCOutlookBarTabCtrl::EnableAnimation(!CMFCOutlookBarTabCtrl::IsAnimation());
}

void CMainFrame::OnOutlookBarShortcut ( UINT id ) [protected]

Definition at line 294 of file MainFrm.cpp.

{
  const int nIndex = id - ID_SHORTCUT_1;

  ASSERT( nIndex >=0 && nIndex < NUMVIEWS );
  if ( nIndex < 0 || nIndex >= NUMVIEWS )
    return;

  if (!m_pViews)
    return;

  CView* pNewView = m_pViews[nIndex];
  if (!pNewView)
    return;

  CView* pActiveView =GetActiveView();

  if ( !pActiveView )    // No currently active view
    return;

  if ( pNewView == pActiveView )    // Already there
    return;

  m_nCurView = nIndex;    // Store the new current view's index

  // exchange view window ID's so RecalcLayout() works
  UINT temp = ::GetWindowLong(pActiveView->m_hWnd, GWL_ID);
  ::SetWindowLong(pActiveView->m_hWnd, GWL_ID,
    ::GetWindowLong(pNewView->m_hWnd, GWL_ID));
  ::SetWindowLong(pNewView->m_hWnd, GWL_ID, temp);

  // Display and update the new current view - hide the old one
  pActiveView->ShowWindow(SW_HIDE);
  pNewView->ShowWindow(SW_SHOW);
  SetActiveView(pNewView);
  RecalcLayout();
  pNewView->Invalidate();

  CString strCaption;
  strCaption.Format (_T("View %d"), nIndex + 1);

  m_wndCaptionBar.SetText (strCaption);
  m_wndCaptionBar.RedrawWindow ();
}

void CMainFrame::OnOutlookDeletePage ( ) [protected]

Definition at line 789 of file MainFrm.cpp.

{
  if (m_pCurrOutlookWnd == NULL)
  {
    return;
  }

  UINT uiPage = m_pCurrOutlookWnd->GetActiveTab();

  CString strPageName = _T("");
  m_pCurrOutlookWnd->GetTabLabel(uiPage,strPageName);

  CString strMessage;
  strMessage.Format(_T("Remove page '%s'?"), (LPCTSTR)strPageName);

  if (AfxMessageBox(strMessage, MB_YESNO) == IDYES)
  {
    m_wndBarOutlook.RemoveCustomPage(uiPage, m_pCurrOutlookWnd);
  }
}

void CMainFrame::OnOutlookRenamePage ( ) [protected]

Definition at line 810 of file MainFrm.cpp.

{
  if (m_pCurrOutlookWnd != NULL)
  {
    if (!m_pCurrOutlookWnd->IsInPlaceEdit())
    {
      m_pCurrOutlookWnd->EnableInPlaceEdit(TRUE);
    }
    m_pCurrOutlookWnd->StartRenameTab(m_pCurrOutlookWnd->GetActiveTab());
  }
}

void CMainFrame::OnOutlookShowTextLabels ( ) [protected]

Definition at line 822 of file MainFrm.cpp.

{
  m_wndOutlookPane1.EnableTextLabels(!m_wndOutlookPane1.AreTextLabels());
  m_wndOutlookPane12003.EnableTextLabels(!m_wndOutlookPane12003.AreTextLabels());
}

void CMainFrame::OnPaint ( ) [protected]

Definition at line 1467 of file MainFrm.cpp.

{
  if (m_rectFill.IsRectEmpty())
  {
    Default();
    return;
  }

  CPaintDC dc(this); // device context for painting

  CRect rectChild;
  rectChild.SetRectEmpty();

  CWnd* pChildWnd = GetDlgItem(AFX_IDW_PANE_FIRST);
  if (pChildWnd != NULL)
  {
    pChildWnd->GetWindowRect(rectChild);
    ScreenToClient(rectChild);
  }

  CRect rectScreen;

  MONITORINFO mi;
  mi.cbSize = sizeof(MONITORINFO);
  if (GetMonitorInfo(MonitorFromPoint(CPoint(0, 0), MONITOR_DEFAULTTONEAREST), &mi))
  {
    rectScreen = mi.rcWork;
  }
  else
  {
    ::SystemParametersInfo(SPI_GETWORKAREA, 0, &rectScreen, 0);
  }

  if (m_MemBitmap.GetSafeHandle() != NULL)
  {
    BITMAP bmp;
    m_MemBitmap.GetBitmap(&bmp);

    if (bmp.bmWidth != rectScreen.Width() || bmp.bmHeight != rectScreen.Height())
    {
      m_MemBitmap.DeleteObject();
    }
  }

  if (m_MemBitmap.GetSafeHandle() == NULL)
  {
    CDC dcMem;
    dcMem.CreateCompatibleDC(&dc);

    m_MemBitmap.CreateCompatibleBitmap(&dc, rectScreen.Width(), rectScreen.Height());

    CBitmap* pBmpOld = dcMem.SelectObject(&m_MemBitmap);

    CDrawingManager dm(dcMem);

    rectScreen.OffsetRect(-rectScreen.TopLeft());

    switch (theApp.m_nAppLook)
    {
    case ID_VIEW_APPLOOK_2003:
      ::FillRect(dcMem.GetSafeHdc(), rectScreen, ::GetSysColorBrush(COLOR_APPWORKSPACE));
      break;

    case ID_VIEW_APPLOOK_WIN7:
      dm.FillGradient(rectScreen, RGB (197, 207, 223), RGB (219, 228, 241), TRUE);
      break;

    case ID_VIEW_APPLOOK_2007_3:
      dm.FillGradient(rectScreen, RGB(114, 125, 152), RGB(178, 185, 202), TRUE);
      break;

    default:
      {
        const BOOL bLuna     = theApp.m_nAppLook == ID_VIEW_APPLOOK_2007_1;
        const BOOL bObsidian = theApp.m_nAppLook == ID_VIEW_APPLOOK_2007_2;

        CMFCControlRenderer& pat = bLuna ? m_Pat[1] : bObsidian ? m_Pat[2] : m_Pat[3];

        COLORREF clrF = bLuna ? RGB(136, 170, 214) : bObsidian ? RGB( 71,  71,  71) : RGB(164, 170, 186);
        COLORREF clrM = bLuna ? RGB( 86, 125, 176) : bObsidian ? RGB( 56,  56,  56) : RGB(156, 160, 167);
        COLORREF clrL = bLuna ? RGB(101, 145, 205) : bObsidian ? RGB( 11,  11,  11) : RGB(204, 207, 216);

        const CSize szPat = pat.GetParams().m_rectImage.Size();

        CRect rectPat = rectScreen;

        rectPat.bottom = rectPat.top + szPat.cy;

        CRect rectGradient = rectScreen;
        rectGradient.top += szPat.cy;

        if (rectGradient.Height() < 50 ||
          (rectGradient.Height() - 120) < 50)
        {
          rectGradient.bottom = rectGradient.top + 50;
        }
        else
        {
          rectGradient.bottom -= 120;
        }

        dm.FillGradient(rectGradient, clrM, clrF, TRUE);

        if (rectGradient.bottom < rectScreen.bottom)
        {
          rectGradient.top    = rectGradient.bottom;
          rectGradient.bottom = rectScreen.bottom;

          dm.FillGradient(rectGradient, clrL, clrM, TRUE);
        }

        pat.Draw(&dcMem, rectPat, 0);
      }
    }

    dcMem.SelectObject(pBmpOld);
  }

  CRect rectFill = m_rectFill;

  if (!m_rectSizing.IsRectEmpty())
  {
    dc.FillRect(m_rectSizing, &afxGlobalData.brBarFace);
    rectFill.right += m_rectSizing.Width();
  }

  dc.DrawState(rectFill.TopLeft(), rectFill.Size(), &m_MemBitmap, DSS_NORMAL);
}

void CMainFrame::OnPalette ( UINT nID ) [protected]

Definition at line 407 of file mainfrm.cpp.

{
  CComboBox* pCBox = (CComboBox*)m_wndDlgBar.GetDlgItem(IDC_PALETTE);
  pCBox->SetCurSel((int)(nID - ID_PALETTE_BASE));
  OnSelChangePalette();
}

void CMainFrame::OnPalette2column ( ) [protected]

Definition at line 427 of file mainfrm.cpp.

{
  m_nPaletteCol = 2;
  m_wndPaletteBar.SetColumns(m_nPaletteCol);
}

void CMainFrame::OnPalette3column ( ) [protected]

Definition at line 433 of file mainfrm.cpp.

{
  m_nPaletteCol = 3;
  m_wndPaletteBar.SetColumns(m_nPaletteCol);
}

afx_msg void CMainFrame::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]
afx_msg void CMainFrame::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]
void CMainFrame::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]

Definition at line 107 of file mainfrm.cpp.

{
  CFrameWnd::OnPaletteChanged(pFocusWnd);

  if(pFocusWnd != this)
    OnQueryNewPalette();
}

afx_msg void CMainFrame::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]
afx_msg void CMainFrame::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]
void CMainFrame::OnPenToggle ( ) [protected]

Definition at line 432 of file mainfrm.cpp.

{
  static int nPen = 0;
  m_wndToolBar.SetButtons(toolbar, sizeof(toolbar)/sizeof(UINT) - nPen);
  nPen = (nPen == 0) ? NUM_PEN_TOGGLE : 0;
  m_wndToolBar.Invalidate();
  m_wndToolBar.GetParentFrame()->RecalcLayout();
}

LRESULT CMainFrame::OnPostRecalcLayout | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 603 of file MainFrm.cpp.

{
  RecalcLayout ();
  RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);

    return 0;
}

afx_msg BOOL CMainFrame::OnQueryNewPalette ( ) [protected]
afx_msg BOOL CMainFrame::OnQueryNewPalette ( ) [protected]
afx_msg BOOL CMainFrame::OnQueryNewPalette ( ) [protected]
BOOL CMainFrame::OnQueryNewPalette ( ) [protected]

Definition at line 115 of file mainfrm.cpp.

{
  int        i;
  CPalette    *pOldPal;
  CCubeView   *pView = (CCubeView *)GetActiveView();
  CClientDC   dc(pView);

  pOldPal = dc.SelectPalette(&pView->m_cPalette, FALSE);
  i = dc.RealizePalette();
  dc.SelectPalette(pOldPal, FALSE);

  if(i > 0)
    InvalidateRect(NULL);

  return CFrameWnd::OnQueryNewPalette();
}

afx_msg BOOL CMainFrame::OnQueryNewPalette ( ) [protected]
LRESULT CMainFrame::OnRecalcInProgress | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 130 of file mainfrm.cpp.

{
  m_nPercentDone = (int)wParam;
  CString strPercentDone;
  strPercentDone.Format("%i%c", m_nPercentDone, '%');
  m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_PERCENT_DONE), strPercentDone);
  m_wndStatusBar.UpdateWindow();
  return 0;
}

void CMainFrame::OnRefresh ( ) [protected]

Definition at line 2178 of file MainFrm.cpp.

{
  m_bInfiniteProgressMode = FALSE;
  ShowProgress();
}

LRESULT CMainFrame::OnResetMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]

Definition at line 296 of file MainFrm.cpp.

{
  m_wndMenuBar.AddSubMenu ();
  return 0;
}

void CMainFrame::OnResetPage ( ) [protected]

Definition at line 768 of file MainFrm.cpp.

{
  if (m_pCurrOutlookPage == NULL)
  {
    ASSERT(FALSE);
    return;
  }

  ASSERT_VALID(m_pCurrOutlookPage);

  if (AfxMessageBox(IDP_REST_OUTLOOK_PAGE, MB_YESNO) == IDYES)
  {
    m_pCurrOutlookPage->RestoreOriginalstate();
  }
}

void CMainFrame::OnRibbonBtn7 ( ) [protected]

Definition at line 909 of file MainFrm.cpp.

{
  m_bCheckBox1 = !m_bCheckBox1;
}

void CMainFrame::OnRibbonBtn8 ( ) [protected]

Definition at line 919 of file MainFrm.cpp.

{
  m_bCheckBox2 = !m_bCheckBox2;
}

void CMainFrame::OnRibbonBtn9 ( ) [protected]

Definition at line 929 of file MainFrm.cpp.

{
  m_bCheckBox3 = !m_bCheckBox3;
}

afx_msg LRESULT CMainFrame::OnRibbonCustomize | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnRibbonCustomize | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]
LRESULT CMainFrame::OnRibbonCustomize | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 213 of file mainfrm.cpp.

{
  ShowOptions(0);
  return 1;
}

void CMainFrame::OnRibbonObtn10 ( ) [protected]

Definition at line 1064 of file MainFrm.cpp.

{
  m_nProgressValue2 = 0;
  SetTimer (IdShowProgress2Timer, 10, NULL);
}

void CMainFrame::OnRibbonObtn2 ( ) [protected]

Definition at line 1038 of file MainFrm.cpp.

{
  OnLink (ID_RIBBON_OBTN_2);
}

void CMainFrame::OnRibbonObtn3 ( ) [protected]

Definition at line 1043 of file MainFrm.cpp.

{
  OnLink (ID_RIBBON_OBTN_3);
}

void CMainFrame::OnRibbonObtn4 ( ) [protected]

Definition at line 1048 of file MainFrm.cpp.

{
  OnLink (ID_RIBBON_OBTN_4);
}

void CMainFrame::OnRibbonObtn8 ( ) [protected]

Definition at line 1053 of file MainFrm.cpp.

{
  m_nProgressValue1 = 0;
  SetTimer (IdShowProgress1Timer, 10, NULL);
}

void CMainFrame::OnSaveDebugConf ( ) [protected]

Definition at line 303 of file MainFrm.cpp.

{
  theApp.SaveState (this, _T ("Debug"));
}

void CMainFrame::OnSaveRegularConf ( ) [protected]

Definition at line 322 of file MainFrm.cpp.

{
  theApp.SaveState (this, _T ("Regular")) ;
}

void CMainFrame::OnSelChangePalette ( ) [protected]

Definition at line 414 of file mainfrm.cpp.

{
  CString strText;
  CString strItem;
  CComboBox* pCBox = (CComboBox*)m_wndDlgBar.GetDlgItem(IDC_PALETTE);
  int nIndex = pCBox->GetCurSel();
  if (nIndex == CB_ERR)
    return;
  pCBox->GetLBText(nIndex, strItem);
  AfxFormatString1(strText, IDS_SELECTED_PROMPT, (LPCTSTR)strItem);
  SetMessageText(strText);
}

afx_msg void CMainFrame::OnSetFocus ( CWnd * pOldWnd ) [protected]
afx_msg void CMainFrame::OnSetFocus ( CWnd * pOldWnd ) [protected]
void CMainFrame::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 120 of file MainFrm.cpp.

{
  // forward focus to the view window
  m_wndView.SetFocus();
}

afx_msg LRESULT CMainFrame::OnSetMessageString | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]
void CMainFrame::OnSettingChange | ( | UINT | uFlags,
 |  | LPCTSTR | lpszSection |
 | ) |  |  | [protected]

Definition at line 479 of file MainFrm.cpp.

{
  CFrameWnd::OnSettingChange(uFlags, lpszSection);

  if (m_wndCaptionBar.GetSafeHwnd () != NULL &&
    afxGlobalData.fontRegular.GetSafeHandle () != NULL)
  {
    LOGFONT lf;
    ZeroMemory (&lf, sizeof (LOGFONT));
    afxGlobalData.fontRegular.GetLogFont (&lf);

    m_wndCaptionBar.SetCaptionFont (lf);
  }

  CRect rt;
  GetClientRect (rt);

  SetupMemoryBitmapSize (rt.Size ());
}

afx_msg void CMainFrame::OnSettingChange | ( | UINT | uFlags,
 |  | LPCTSTR | lpszSection |
 | ) |  |  | [protected]
afx_msg void CMainFrame::OnSettingChange | ( | UINT | uFlags,
 |  | LPCTSTR | lpszSection |
 | ) |  |  | [protected]
virtual BOOL CMainFrame::OnShowMDITabContextMenu | ( | CPoint | point,
 |  | DWORD | dwAllowedItems,
 |  | BOOL | bDrop |
 | ) |  |  | [protected, virtual]
virtual BOOL CMainFrame::OnShowMDITabContextMenu | ( | CPoint | point,
 |  | DWORD | dwAllowedItems,
 |  | BOOL | bDrop |
 | ) |  |  | [protected, virtual]
virtual BOOL CMainFrame::OnShowMDITabContextMenu | ( | CPoint | point,
 |  | DWORD | dwAllowedItems,
 |  | BOOL | bDrop |
 | ) |  |  | [protected, virtual]
BOOL CMainFrame::OnShowMDITabContextMenu | ( | CPoint | point,
 |  | DWORD | dwAllowedItems,
 |  | BOOL | bDrop |
 | ) |  |  | [protected, virtual]

Definition at line 224 of file mainfrm.cpp.

{
  CMenu menu;
  VERIFY(menu.LoadMenu(bDrop ? IDR_POPUP_DROP_MDITABS : IDR_POPUP_MDITABS));

  CMenu* pPopup = menu.GetSubMenu(0);
  ASSERT(pPopup != NULL);

  if (!pPopup)
  {
    return FALSE;
  }

  if ((dwAllowedItems & AFX_MDI_CREATE_HORZ_GROUP) == 0)
  {
    pPopup->DeleteMenu(ID_MDI_NEW_HORZ_TAB_GROUP, MF_BYCOMMAND);
  }

  if ((dwAllowedItems & AFX_MDI_CREATE_VERT_GROUP) == 0)
  {
    pPopup->DeleteMenu(ID_MDI_NEW_VERT_GROUP, MF_BYCOMMAND);
  }

  if ((dwAllowedItems & AFX_MDI_CAN_MOVE_NEXT) == 0)
  {
    pPopup->DeleteMenu(ID_MDI_MOVE_TO_NEXT_GROUP, MF_BYCOMMAND);
  }

  if ((dwAllowedItems & AFX_MDI_CAN_MOVE_PREV) == 0)
  {
    pPopup->DeleteMenu(ID_MDI_MOVE_TO_PREV_GROUP, MF_BYCOMMAND);
  }

  CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
  pPopupMenu->SetAutoDestroy(FALSE);
  pPopupMenu->Create(this, point.x, point.y, pPopup->GetSafeHmenu());

  return TRUE;
}

virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [virtual]
BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]

Definition at line 185 of file MainFrm.cpp.

{
  //---------------------------------------------------------
  // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
  //---------------------------------------------------------
  CFrameWnd::OnShowPopupMenu (pMenuPopup);

  if (pMenuPopup != NULL &&
    pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
  {
    if (CMFCToolBar::IsCustomizeMode ())
    {
      //----------------------------------------------------
      // Don't show toolbars list in the cuztomization mode!
      //----------------------------------------------------
      return FALSE;
    }

    pMenuPopup->RemoveAllItems ();

    CMenu menu;
    VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));

    CMenu* pPopup = menu.GetSubMenu(0);
    ASSERT(pPopup != NULL);

    if (pPopup)
    {
      pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
    }
  }

  return TRUE;
}

virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
virtual BOOL CMainFrame::OnShowPopupMenu ( CMFCPopupMenu * pMenuPopup ) [protected, virtual]
LRESULT CMainFrame::OnShowRibbonItemMenu | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 2564 of file MainFrm.cpp.

{
  CMFCRibbonBaseElement* pElem = (CMFCRibbonBaseElement*) lp;
  ASSERT_VALID(pElem);

  switch (pElem->GetID())
  {
  case ID_EDIT_UNDO:
    // Fill Undo items list:
    {
      CMFCRibbonUndoButton* pUndo = DYNAMIC_DOWNCAST(CMFCRibbonUndoButton, pElem);
      ASSERT_VALID(pUndo);

      pUndo->CleanUpUndoList();

      pUndo->AddUndoAction(_T("Undo Item 1"));
      pUndo->AddUndoAction(_T("Undo Item 2"));
      pUndo->AddUndoAction(_T("Undo Item 3"));
      pUndo->AddUndoAction(_T("Undo Item 4"));
      pUndo->AddUndoAction(_T("Undo Item 5"));
    }
    break;

  case ID_PARA_BULLETS:
    // Rebuild "Recently used bullets" group:
    {
      CMFCRibbonGallery* pPaletteButton = DYNAMIC_DOWNCAST(CMFCRibbonGallery, pElem);
      ASSERT_VALID(pPaletteButton);

      pPaletteButton->Clear();

      // Load all bullets:
      CMFCToolBarImages imagesAll;
      imagesAll.SetImageSize(CSize(40, 40));
      imagesAll.Load(IDB_BULLETS);

      // Create "Recently used bullets" group:
      CMFCToolBarImages imagesRU;
      imagesRU.SetImageSize(imagesAll.GetImageSize());

      imagesRU.AddIcon(imagesAll.ExtractIcon(1));
      imagesRU.AddIcon(imagesAll.ExtractIcon(7));

      pPaletteButton->AddGroup(_T("Recently Used Bullets"), imagesRU);

      // Add all bullets group:
      pPaletteButton->AddGroup(_T("Bullets"), imagesAll);
    }
    break;

  case ID_FONT_COLOR:
  case ID_PARA_SHADING:
    // Set document text colors:
    {
      CMFCRibbonColorButton* pColorBtn = DYNAMIC_DOWNCAST(CMFCRibbonColorButton, pElem);
      ASSERT_VALID(pColorBtn);

      CList<COLORREF,COLORREF> lstColors;

      lstColors.AddTail(RGB(108, 154, 233));
      lstColors.AddTail(RGB(18, 159, 126));
      lstColors.AddTail(RGB(223, 149, 1));
      lstColors.AddTail(RGB(192, 255, 0));

      pColorBtn->SetDocumentColors(_T("Recent Colors"), lstColors);
    }
    break;
  }

  return 0;
}

void CMainFrame::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 345 of file mainfrm.cpp.

{
  CFrameWnd::OnSize(nType, cx, cy);
  theApp.m_bMaximized = (nType == SIZE_MAXIMIZED);
  if (nType == SIZE_RESTORED)
    GetWindowRect(theApp.m_rectInitialFrame);
}

afx_msg void CMainFrame::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
afx_msg void CMainFrame::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
afx_msg void CMainFrame::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
afx_msg void CMainFrame::OnSizing | ( | UINT | fwSide,
 |  | LPRECT | pRect |
 | ) |  |  | [protected]
void CMainFrame::OnSizing | ( | UINT | fwSide,
 |  | LPRECT | pRect |
 | ) |  |  | [protected]

Definition at line 170 of file MainFrm.cpp.

{
  CFrameWnd::OnSizing(fwSide, pRect);

  // These shouldbe computed based on the
  // client window size - not the frame size.
  CRect rect(pRect);
    CRect viewRect;
    CRect frameRect;

  m_wndView.GetClientRect(viewRect);
    GetWindowRect(frameRect);
    int cx = frameRect.Width() - viewRect.Width();
    int cy = frameRect.Height() - viewRect.Height();
  const int kMinWidth = 96 + cx;
  const int kMinHeight = 64 + cy;

  if (rect.Width() < kMinWidth) {
    switch(fwSide) {
    case WMSZ_BOTTOMRIGHT:
    case WMSZ_RIGHT:
    case WMSZ_TOPRIGHT:
      pRect->right = rect.left + kMinWidth;
      break;
    default:
      pRect->left = rect.right - kMinWidth;
      break;
    }
  }
  if (rect.Height() < kMinHeight) {
    switch(fwSide) {
    case WMSZ_BOTTOM:
    case WMSZ_BOTTOMLEFT:
    case WMSZ_BOTTOMRIGHT:
      pRect->bottom = rect.top + kMinHeight;
      break;
    default:
      pRect->top = rect.bottom - kMinHeight;
      break;
    }
  }
}

void CMainFrame::OnSlider ( ) [protected]

Definition at line 241 of file MainFrm.cpp.

{
  if (GetAsyncKeyState (VK_LBUTTON) == 0)
  {
    CString str;
    str.Format (_T("Moved to: %d"), CSliderButton::GetPos (ID_SLIDER));

    AfxMessageBox (str);
  }
}

void CMainFrame::OnSpell ( ) [protected]

Definition at line 2189 of file MainFrm.cpp.

{
  CMFCRibbonStatusBarPane* pPane = DYNAMIC_DOWNCAST(CMFCRibbonStatusBarPane, m_wndStatusBar.FindElement(ID_STATUSBAR_SPELL));

  if (pPane == NULL)
  {
    return;
  }

  if (pPane->IsAnimation())
  {
    pPane->StopAnimation();
  }
  else
  {
    pPane->StartAnimation( 500 /* 1/2 sec, Frame delay */, 10000 /* 10 sec, animation duration */);
  }
}

LRESULT CMainFrame::OnStartCustomize | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 636 of file mainfrm.cpp.

{
  CWordPadView* pView = DYNAMIC_DOWNCAST (CWordPadView, GetActiveView());
  if (pView == NULL)
  {
    return 0;
  }

  pView->GetRichEditCtrl().SetSel (-1, 0);
  return 0;
}

void CMainFrame::OnSysColorChange ( ) [protected]

Definition at line 400 of file mainfrm.cpp.

{
//    Ctl3dColorChange() ;
  theApp.LoadBitmaps( TRUE ) ;
  CFrameWnd::OnSysColorChange();
}

afx_msg void CMainFrame::OnSysColorChange ( ) [protected]
afx_msg void CMainFrame::OnSysColorChange ( ) [protected]
afx_msg void CMainFrame::OnSysColorChange ( ) [protected]
void CMainFrame::OnTask ( ) [protected]

Definition at line 308 of file MainFrm.cpp.

{
  MessageBox (_T("TODO: Task"));
}

BOOL CMainFrame::OnTearOffMenu | ( | CMFCPopupMenu * | pMenuPopup,
 |  | CPane * | pBar |
 | ) |  |  | [protected, virtual]

Definition at line 712 of file mainfrm.cpp.

{
  CMFCColorBar* pColorBar = DYNAMIC_DOWNCAST (CMFCColorBar, pBar);
  if (pColorBar != NULL)
  {
    CWordPadView* pView = DYNAMIC_DOWNCAST (CWordPadView, GetActiveView());
    if (pView != NULL)
    {
      CList<COLORREF,COLORREF> lstDocColors;
      pView->GetDocumentColors (lstDocColors);

      pColorBar->SetDocumentColors (_T("Document's Colors"), lstDocColors);
    }
  }

  return TRUE;
}

void CMainFrame::OnThreeColumns ( ) [protected]

Definition at line 244 of file MainFrm.cpp.

{
  m_wndPalette.SetColumns (3);
}

void CMainFrame::OnTime ( ) [protected]

Definition at line 274 of file MainFrm.cpp.

{
  MessageBox (_T("Change time...."));
}

afx_msg void CMainFrame::OnTimer ( UINT_PTR nIDEvent ) [protected]
void CMainFrame::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 2094 of file MainFrm.cpp.

{
  if (nIDEvent == IdStartProgressTimer)
  {
    ShowProgress();
    KillTimer(IdStartProgressTimer);
  }

  if (nIDEvent == IdShowProgressTimer)
  {
    m_nProgressValue++;

    if (m_nProgressValue > 100)
    {
      ShowProgress(FALSE);
    }
    else
    {
      CMFCRibbonProgressBar* pProgress = DYNAMIC_DOWNCAST(CMFCRibbonProgressBar, m_wndStatusBar.FindElement(ID_STATUSBAR_PROGRESS));
      ASSERT_VALID(pProgress);

      pProgress->SetPos(m_nProgressValue, TRUE);
    }
  }
}

void CMainFrame::OnToggleInsert ( ) [protected]

Definition at line 395 of file mainfrm.cpp.

{
  m_bInsert = !m_bInsert;
}

afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 153 of file MainFrm.cpp.

{
  CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));

  CMenu menu;
  VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));

  CMenu* pPopup = menu.GetSubMenu(0);
  ASSERT(pPopup != NULL);

  if (pPopup)
  {
    CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
    pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
  }

  return 0;
}

afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarContextMenu | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarCreateNew | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
LRESULT CMainFrame::OnToolbarCreateNew | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 726 of file MainFrm.cpp.

{
  LRESULT lres = CFrameWndEx::OnToolbarCreateNew(wp,lp);
  if (lres == 0)
  {
    return 0;
  }

  CMFCToolBar* pUserToolbar = (CMFCToolBar*) lres;
  ASSERT_VALID(pUserToolbar);

  pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
  pUserToolbar->AdjustLayout();
  return lres;
}

LRESULT CMainFrame::OnToolbarCreateNew | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | wp,
 |  | LPARAM |  |
 | ) |  |  | [protected]

Definition at line 172 of file MainFrm.cpp.

{
  // TODO: reset toolbar with id = (UINT) wp to its initial state:
  //
  // UINT uiToolBarId = (UINT) wp;
  // if (uiToolBarId == IDR_MAINFRAME)
  // {
  //    do something with m_wndToolBar
  // }

  return 0;
}

afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
afx_msg LRESULT CMainFrame::OnToolbarReset | ( | WPARAM | ,
 |  | LPARAM |  |
 | ) |  |  | [protected]
void CMainFrame::OnToolsConnectToDatabase ( ) [protected]

Definition at line 595 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here
}

void CMainFrame::OnToolsDebugProcesses ( ) [protected]

Definition at line 600 of file MainFrm.cpp.

{
  // TODO: Add your command handler code here
}

afx_msg void CMainFrame::OnToolsOptions ( ) [protected]
afx_msg void CMainFrame::OnToolsOptions ( ) [protected]
afx_msg void CMainFrame::OnToolsOptions ( ) [protected]
void CMainFrame::OnToolsOptions ( ) [protected]

Definition at line 219 of file mainfrm.cpp.

{
  ShowOptions(0);
}

void CMainFrame::OnToolsToolbar ( ) [protected]

Definition at line 384 of file mainfrm.cpp.

{
  CToolDlg ToolDlg;
  UINT nColumns = m_wndPaletteBar.GetColumns();
  nColumns = (nColumns < 4) ? nColumns - 2: 3;

  // If the style says the ToolBar is visible then it is visible.
  ToolDlg.m_bMain = ((m_wndMainBar.GetStyle() & WS_VISIBLE) != 0);
  ToolDlg.m_bResource = ((m_wndResourceBar.GetStyle() & WS_VISIBLE) != 0);
  ToolDlg.m_bDebug = ((m_wndDebugBar.GetStyle() & WS_VISIBLE) != 0);
  ToolDlg.m_bEdit = ((m_wndEditBar.GetStyle() & WS_VISIBLE) != 0);
  ToolDlg.m_bBrowse = ((m_wndBrowseBar.GetStyle() & WS_VISIBLE) != 0);
  ToolDlg.m_bPalette = ((m_wndPaletteBar.GetStyle() & WS_VISIBLE) != 0);

  ToolDlg.m_nColumns = nColumns;

  ToolDlg.m_nColor = (m_bColor) ? 0 : 1;
  ToolDlg.m_nToolTips = (m_bToolTips) ? 0 : 1;

  if (IDOK == ToolDlg.DoModal())
  {
    ShowControlBar(&m_wndMainBar, ToolDlg.m_bMain, FALSE);
    ShowControlBar(&m_wndResourceBar, ToolDlg.m_bResource, FALSE);
    ShowControlBar(&m_wndDebugBar, ToolDlg.m_bDebug, FALSE);
    ShowControlBar(&m_wndEditBar, ToolDlg.m_bEdit, FALSE);
    ShowControlBar(&m_wndBrowseBar, ToolDlg.m_bBrowse, FALSE);
    ShowControlBar(&m_wndPaletteBar, ToolDlg.m_bPalette, FALSE);
    m_bToolTips = (ToolDlg.m_nToolTips==0);
    if (m_bToolTips)
    {
      m_wndMainBar.SetBarStyle(m_wndMainBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
      m_wndResourceBar.SetBarStyle(m_wndResourceBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
      m_wndDebugBar.SetBarStyle(m_wndDebugBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
      m_wndEditBar.SetBarStyle(m_wndEditBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
      m_wndBrowseBar.SetBarStyle(m_wndBrowseBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
      m_wndPaletteBar.SetBarStyle(m_wndPaletteBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
    }
    else
    {
      m_wndMainBar.SetBarStyle(m_wndMainBar.GetBarStyle() & ~(CBRS_TOOLTIPS | CBRS_FLYBY));
      m_wndResourceBar.SetBarStyle(m_wndResourceBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
      m_wndDebugBar.SetBarStyle(m_wndDebugBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
      m_wndEditBar.SetBarStyle(m_wndEditBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
      m_wndBrowseBar.SetBarStyle(m_wndBrowseBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
      m_wndPaletteBar.SetBarStyle(m_wndPaletteBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
    }
    nColumns = (ToolDlg.m_nColumns < 3) ? ToolDlg.m_nColumns + 2 : 6;
    m_wndPaletteBar.SetColumns(nColumns);

    m_bColor = (ToolDlg.m_nColor==0);

    if (m_bColor)
    {
      m_wndMainBar.LoadBitmap(IDR_COLOR_MAINBAR);
      m_wndResourceBar.LoadBitmap(IDR_COLOR_RESOURCEBAR);
      m_wndDebugBar.LoadBitmap(IDR_COLOR_DEBUGBAR);
      m_wndBrowseBar.LoadBitmap(IDR_COLOR_BROWSEBAR);
      m_wndPaletteBar.LoadBitmap(IDR_COLOR_PALETTEBAR);
    }
    else
    {
      m_wndMainBar.LoadBitmap(IDR_MONO_MAINBAR);
      m_wndResourceBar.LoadBitmap(IDR_MONO_RESOURCEBAR);
      m_wndDebugBar.LoadBitmap(IDR_MONO_DEBUGBAR);
      m_wndBrowseBar.LoadBitmap(IDR_MONO_BROWSEBAR);
      m_wndPaletteBar.LoadBitmap(IDR_MONO_PALETTEBAR);
    }
    m_wndEditBar.SetColor(m_bColor);

    m_wndMainBar.Invalidate();
    m_wndResourceBar.Invalidate();
    m_wndDebugBar.Invalidate();
    m_wndBrowseBar.Invalidate();
    m_wndPaletteBar.Invalidate();
    m_wndEditBar.Invalidate();
  }
}

void CMainFrame::OnToolsViewUserToolbar ( UINT id ) [protected]
void CMainFrame::OnToolsViewUserToolbar ( UINT id ) [protected]
void CMainFrame::OnTwoColumns ( ) [protected]

Definition at line 234 of file MainFrm.cpp.

{
  m_wndPalette.SetColumns (2);
}

afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]

Definition at line 203 of file mainfrm.cpp.

{
  pCmdUI->SetRadio(m_nAppLook == pCmdUI->m_nID);
}

afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateAppLook ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateBackward1 ( CCmdUI * pCmdUI ) [protected]

Definition at line 432 of file MainFrm.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMainFrame::OnUpdateBackward2 ( CCmdUI * pCmdUI ) [protected]

Definition at line 437 of file MainFrm.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMainFrame::OnUpdateBarMenu ( CCmdUI * pCmdUI ) [protected]

Definition at line 354 of file mainfrm.cpp.

{
  CWnd* pBar;
  if ((pBar = GetDlgItem(pCmdUI->m_nID)) == NULL)
  {
    pCmdUI->ContinueRouting();
    return; // not for us
  }
  pCmdUI->SetCheck((pBar->IsWindowVisible()) != 0);
}

void CMainFrame::OnUpdateCategorie ( CCmdUI * pCmdUI ) [protected]

Definition at line 360 of file MainFrm.cpp.

{
  pCmdUI->Enable (TRUE);
  pCmdUI->SetCheck (pCmdUI->m_nID == (m_nCategorie + ID_CATEGORIE_1));
}

void CMainFrame::OnUpdateClock ( CCmdUI * pCmdUI ) [protected]

Definition at line 197 of file mainfrm.cpp.

{
  pCmdUI->Enable(TRUE);
}

void CMainFrame::OnUpdateCustomize ( CCmdUI * pCmdUI ) [protected]

Definition at line 452 of file MainFrm.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMainFrame::OnUpdateExampleUI ( CCmdUI * pCmdUI )

Definition at line 201 of file mainfrm.cpp.

{
  pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrentExample);
}

afx_msg void CMainFrame::OnUpdateFilePrintPreview ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateFilePrintPreview ( CCmdUI * pCmdUI ) [protected]

Definition at line 2656 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(IsPrintPreview());
}

void CMainFrame::OnUpdateFontName ( CCmdUI * pCmdUI ) [protected]

Definition at line 443 of file MainFrm.cpp.

{
  CComboBox *pCombo = (CComboBox*)GetFontNameCombo();
  ASSERT_VALID(pCombo);

  //If Source View, don't display the font name combobox
  if(m_dwCurrentView == ID_VIEW_SOURCE)
  {
    pCombo->EnableWindow(FALSE);
    return;
  }
  else
  {
    if(m_pWebView->QueryStatus(IDM_BLOCKFMT) & OLECMDF_ENABLED)
      pCombo->EnableWindow();
    else
      pCombo->EnableWindow(FALSE);
  }
}

void CMainFrame::OnUpdateFontSize ( CCmdUI * pCmdUI ) [protected]

Definition at line 423 of file MainFrm.cpp.

{
  CComboBox *pCombo = (CComboBox*)GetFontSizeCombo();
  ASSERT_VALID(pCombo);

  //If Source View, don't display the font size combobox
  if(m_dwCurrentView == ID_VIEW_SOURCE)
  {
    pCombo->EnableWindow(FALSE);
    return;
  }
  else
  {
    if(m_pWebView->QueryStatus(IDM_BLOCKFMT) & OLECMDF_ENABLED)
      pCombo->EnableWindow();
    else
      pCombo->EnableWindow(FALSE);
  }
}

void CMainFrame::OnUpdateForward1 ( CCmdUI * pCmdUI ) [protected]

Definition at line 442 of file MainFrm.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMainFrame::OnUpdateForward2 ( CCmdUI * pCmdUI ) [protected]

Definition at line 447 of file MainFrm.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMainFrame::OnUpdateFourColumns ( CCmdUI * pCmdUI ) [protected]

Definition at line 259 of file MainFrm.cpp.

{
  pCmdUI->SetRadio (m_wndPalette.GetColumns () == 4);
}

void CMainFrame::OnUpdateGoAddressEdit ( CCmdUI * pCmdUI ) [protected]

Definition at line 343 of file MainFrm.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMainFrame::OnUpdateIndicatorSendReceive ( CCmdUI * pCmdUI ) [protected]

Definition at line 935 of file MainFrm.cpp.

{
  pCmdUI->Enable();
}

void CMainFrame::OnUpdateInsert ( CCmdUI * pCmdUI ) [protected]

Definition at line 390 of file mainfrm.cpp.

{
  pCmdUI->Enable(!m_bInsert);
}

void CMainFrame::OnUpdateLineNumber ( CCmdUI * pCmdUI ) [protected]

Definition at line 192 of file mainfrm.cpp.

{
  pCmdUI->Enable(TRUE);
}

void CMainFrame::OnUpdateLinks ( CCmdUI * pCmdUI ) [protected]

Definition at line 420 of file MainFrm.cpp.

{
  CMSMLinksBar* pBar = GetLinksBar (pCmdUI->m_nID);

  if (pBar != NULL)
  {
    pCmdUI->SetCheck (pCmdUI->m_nID == pBar->GetCurrentCommand ());
  }

  pCmdUI->Enable (TRUE);
}

void CMainFrame::OnUpdateMdiTabbed ( CCmdUI * pCmdUI ) [protected]

Definition at line 734 of file MainFrm.cpp.

{
  pCmdUI->SetCheck ();
}

void CMainFrame::OnUpdateMdiTabbedDocument ( CCmdUI * pCmdUI ) [protected]

Definition at line 883 of file MainFrm.cpp.

{
  pCmdUI->SetCheck();
}

void CMainFrame::OnUpdateMiniFramePropertySheet ( CCmdUI * pCmdUI )

Definition at line 161 of file mainfrm.cpp.

{
  pCmdUI->Enable(m_pShapePropFrame == NULL
    || !m_pShapePropFrame->IsWindowVisible());
}

void CMainFrame::OnUpdateObjectDelete ( CCmdUI * pCmdUI ) [protected]

Definition at line 412 of file mainfrm.cpp.

{
  pCmdUI->Enable( m_pObjTreeView->IsValidSel() ) ;
}

void CMainFrame::OnUpdateObjectVerify ( CCmdUI * pCmdUI ) [protected]

Definition at line 423 of file mainfrm.cpp.

{
  pCmdUI->Enable( m_pObjTreeView->IsValidSel() ) ;
}

void CMainFrame::OnUpdateOutlookAddPage ( CCmdUI * pCmdUI ) [protected]

Definition at line 758 of file MainFrm.cpp.

{
  pCmdUI->Enable(!m_bOutlookBar2003);
}

void CMainFrame::OnUpdateOutlookAnimation ( CCmdUI * pCmdUI ) [protected]

Definition at line 839 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(CMFCOutlookBarTabCtrl::IsAnimation());
}

void CMainFrame::OnUpdateOutlookBarShortcut ( CCmdUI * pCmdUI ) [protected]

Definition at line 339 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (pCmdUI->m_nID == ID_SHORTCUT_1 + m_nCurView);
}

void CMainFrame::OnUpdateOutlookDeletePage ( CCmdUI * pCmdUI ) [protected]

Definition at line 834 of file MainFrm.cpp.

{
  pCmdUI->Enable(!m_bOutlookBar2003 && m_uiHilightedPage != (UINT)-1);
}

void CMainFrame::OnUpdateOutlookRenamePage ( CCmdUI * pCmdUI ) [protected]

Definition at line 828 of file MainFrm.cpp.

{
  BOOL bEnable = (m_pCurrOutlookWnd != NULL) && ((UINT)m_uiHilightedPage != -1);
  pCmdUI->Enable(bEnable);
}

void CMainFrame::OnUpdateOutlookShowTextLabels ( CCmdUI * pCmdUI ) [protected]

Definition at line 844 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndOutlookPane1.AreTextLabels());
}

void CMainFrame::OnUpdatePalette ( CCmdUI * pCmdUI ) [protected]

Definition at line 400 of file mainfrm.cpp.

{
  CComboBox* pCBox = (CComboBox*)m_wndDlgBar.GetDlgItem(IDC_PALETTE);
  UINT nIndex = pCBox->GetCurSel();
  pCmdUI->SetCheck((UINT)(ID_PALETTE_BASE + nIndex) == pCmdUI->m_nID);
}

void CMainFrame::OnUpdatePalette2column ( CCmdUI * pCmdUI ) [protected]

Definition at line 439 of file mainfrm.cpp.

{
  pCmdUI->SetCheck(m_nPaletteCol == 2);
}

void CMainFrame::OnUpdatePalette3column ( CCmdUI * pCmdUI ) [protected]

Definition at line 444 of file mainfrm.cpp.

{
  pCmdUI->SetCheck(m_nPaletteCol == 3);
}

void CMainFrame::OnUpdatePaletteMenu ( CCmdUI * pCmdUI ) [protected]

Definition at line 373 of file mainfrm.cpp.

{
  BOOL bVisible = ((m_wndPaletteBar.IsWindowVisible()) != 0);
  pCmdUI->SetCheck(bVisible);
}

void CMainFrame::OnUpdatePane ( CCmdUI * pCmdUI ) [protected]

Definition at line 463 of file MainFrm.cpp.

{
  pCmdUI->Enable ();
}

void CMainFrame::OnUpdatePercentDone ( CCmdUI * pCmdUI ) [protected]

Definition at line 123 of file mainfrm.cpp.

{
  // It is necessary to enable the percent-done status bar pane, so that
  // the text will be displayed.
  pCmdUI->Enable();
}

void CMainFrame::OnUpdateRefresh ( CCmdUI * pCmdUI ) [protected]

Definition at line 2184 of file MainFrm.cpp.

{
  pCmdUI->Enable(m_nProgressValue < 0);
}

void CMainFrame::OnUpdateResetPage ( CCmdUI * pCmdUI ) [protected]

Definition at line 784 of file MainFrm.cpp.

{
  pCmdUI->Enable(!m_bOutlookBar2003 && m_pCurrOutlookPage != NULL && m_pCurrOutlookPage->CanBeRestored());
}

void CMainFrame::OnUpdateRibbonBtn7 ( CCmdUI * pCmdUI ) [protected]

Definition at line 914 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_bCheckBox1);
}

void CMainFrame::OnUpdateRibbonBtn8 ( CCmdUI * pCmdUI ) [protected]

Definition at line 924 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_bCheckBox2);
}

void CMainFrame::OnUpdateRibbonBtn9 ( CCmdUI * pCmdUI ) [protected]

Definition at line 934 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_bCheckBox3);
}

void CMainFrame::OnUpdateRibbonObtn10 ( CCmdUI * pCmdUI ) [protected]

Definition at line 1070 of file MainFrm.cpp.

{
  pCmdUI->Enable (m_nProgressValue2 == -1);
}

void CMainFrame::OnUpdateRibbonObtn8 ( CCmdUI * pCmdUI ) [protected]

Definition at line 1059 of file MainFrm.cpp.

{
  pCmdUI->Enable (m_nProgressValue1 == -1);
}

void CMainFrame::OnUpdateStyle ( CCmdUI * pCmdUI ) [protected]

Definition at line 384 of file mainfrm.cpp.

{
  UINT nIndex = m_wndStyleBar.m_comboBox.GetCurSel();
  pCmdUI->SetCheck((UINT)(ID_STYLE_BASE+nIndex) == pCmdUI->m_nID);
}

void CMainFrame::OnUpdateThreeColumns ( CCmdUI * pCmdUI ) [protected]

Definition at line 249 of file MainFrm.cpp.

{
  pCmdUI->SetRadio (m_wndPalette.GetColumns () == 3);
}

void CMainFrame::OnUpdateToolsViewUserToolbar ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateToolsViewUserToolbar ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateTwoColumns ( CCmdUI * pCmdUI ) [protected]

Definition at line 239 of file MainFrm.cpp.

{
  pCmdUI->SetRadio (m_wndPalette.GetColumns () == 2);
}

void CMainFrame::OnUpdateUseInProcHandler ( CCmdUI * pCmdUI ) [protected]

Definition at line 541 of file mainfrm.cpp.

{
  m_pObjTreeView->OnUpdateUseInProcHandler( pCmdUI ) ;
}

void CMainFrame::OnUpdateUseInProcServer ( CCmdUI * pCmdUI ) [protected]

Definition at line 531 of file mainfrm.cpp.

{
  m_pObjTreeView->OnUpdateUseInProcServer( pCmdUI );
}

void CMainFrame::OnUpdateUseLocalServer ( CCmdUI * pCmdUI ) [protected]

Definition at line 551 of file mainfrm.cpp.

{
  m_pObjTreeView->OnUpdateUseLocalServer( pCmdUI ) ;
}

void CMainFrame::OnUpdateViewAddressBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 659 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndAddress.IsWindowVisible ());
}

void CMainFrame::OnUpdateViewCaptionBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 352 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndCaptionBar.IsVisible ());
}

void CMainFrame::OnUpdateViewCaptionbar ( CCmdUI * pCmdUI ) [protected]

Definition at line 1018 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndCaption.GetStyle() & WS_VISIBLE);
}

void CMainFrame::OnUpdateViewClass ( CCmdUI * pCmdUI ) [protected]

Definition at line 806 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndClassView.IsVisible());
}

void CMainFrame::OnUpdateViewDialogBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 295 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndDlgBar.IsVisible ());
}

void CMainFrame::OnUpdateViewDlgbartop ( CCmdUI * pCmdUI ) [protected]

Definition at line 338 of file mainfrm.cpp.

{
  pCmdUI->SetCheck(m_bDialogTop);
}

void CMainFrame::OnUpdateViewDynamichelp ( CCmdUI * pCmdUI ) [protected]

Definition at line 866 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndDynamicHelpView.IsVisible());
}

void CMainFrame::OnUpdateViewEditingtoolbar ( CCmdUI * pCmdUI ) [protected]

Definition at line 272 of file MainFrm.cpp.

{
  CControlBar *pBar = DYNAMIC_DOWNCAST(CControlBar,&m_wndEditBar);
  if (pBar != NULL)
  {
    pCmdUI->SetCheck((pBar->GetStyle() & WS_VISIBLE) != 0);
    return;
  }

}

void CMainFrame::OnUpdateViewExplorerbar ( CCmdUI * pCmdUI ) [protected]

Definition at line 741 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndExplorerBar.IsWindowVisible ());
}

void CMainFrame::OnUpdateViewFile ( CCmdUI * pCmdUI ) [protected]

Definition at line 816 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndFileView.IsVisible());
}

void CMainFrame::OnUpdateViewFolderList ( CCmdUI * pCmdUI ) [protected]

Definition at line 1029 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndFolderList.GetStyle() & WS_VISIBLE);
}

void CMainFrame::OnUpdateViewFolders ( CCmdUI * pCmdUI ) [protected]

Definition at line 340 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndFoldersBar.GetStyle () & WS_VISIBLE);
}

void CMainFrame::OnUpdateViewInfobar ( CCmdUI * pCmdUI ) [protected]

Definition at line 332 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndInfoBar.IsVisible ());
}

void CMainFrame::OnUpdateViewLinksBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 669 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndLinksBar.IsWindowVisible ());
}

void CMainFrame::OnUpdateViewMacroBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 194 of file MainFrm.Cpp.

{
   CControlBar* pControlBar;

   pControlBar = GetControlBar( IDC_MACROBAR );
   if( pControlBar != NULL )
   {
    pCmdUI->SetCheck( (pControlBar->GetStyle()&WS_VISIBLE) != 0 );
   }
}

void CMainFrame::OnUpdateViewMessageBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 2559 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndMessageBar.IsVisible());
}

void CMainFrame::OnUpdateViewOutlookbar ( CCmdUI * pCmdUI ) [protected]

Definition at line 1041 of file MainFrm.cpp.

{
  CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;
  pCmdUI->SetCheck(bar.GetStyle() & WS_VISIBLE);
}

void CMainFrame::OnUpdateViewOutlookBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 289 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndShortcutsBar.IsVisible ());
}

void CMainFrame::OnUpdateViewOutput ( CCmdUI * pCmdUI ) [protected]

Definition at line 316 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndOutput.IsVisible ());
  pCmdUI->Enable (!IsPrintPreviewMode ());
}

afx_msg void CMainFrame::OnUpdateViewOutput ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateViewOutput ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateViewProperties ( CCmdUI * pCmdUI ) [protected]

Definition at line 836 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndPropertiesBar.IsVisible());
}

void CMainFrame::OnUpdateViewRefresh ( CCmdUI * pCmdUI ) [protected]

Definition at line 396 of file mainfrm.cpp.

{
}

void CMainFrame::OnUpdateViewResource ( CCmdUI * pCmdUI ) [protected]

Definition at line 826 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndResourceView.IsVisible());
}

void CMainFrame::OnUpdateViewRtl ( CCmdUI * pCmdUI ) [protected]

Definition at line 2423 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(theApp.m_bIsRTL);
}

void CMainFrame::OnUpdateViewSource ( CCmdUI * pCmdUI ) [protected]

Definition at line 402 of file MainFrm.cpp.

{
  pCmdUI->SetRadio(m_dwCurrentView==ID_VIEW_SOURCE);

}

void CMainFrame::OnUpdateViewStatusBar ( CCmdUI * pCmdUI ) [protected]

Definition at line 184 of file mainfrm.cpp.

{
  CWnd* pStatusBar;
  if (pStatusBar = GetDescendantWindow(AFX_IDW_STATUS_BAR))
    pCmdUI->SetCheck((pStatusBar->GetStyle() & WS_VISIBLE));
}

void CMainFrame::OnUpdateViewTaskpane ( CCmdUI * pCmdUI ) [protected]

Definition at line 290 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndTaskPane.IsVisible ());
}

void CMainFrame::OnUpdateViewTextlabels ( CCmdUI * pCmdUI ) [protected]

Definition at line 704 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_bMainToolbarMenu && m_wndToolBar.AreTextLabels ());
  pCmdUI->Enable (m_bMainToolbarMenu);
}

void CMainFrame::OnUpdateViewThemeToolbar ( CCmdUI * pCmdUI ) [protected]

Definition at line 619 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndToolBarTheme.IsVisible ());
}

afx_msg void CMainFrame::OnUpdateViewThemeToolbar ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateViewToolsPalette ( CCmdUI * pCmdUI ) [protected]

Definition at line 229 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndPalette.GetStyle () & WS_VISIBLE);
}

void CMainFrame::OnUpdateViewWatch ( CCmdUI * pCmdUI ) [protected]

Definition at line 856 of file MainFrm.cpp.

{
  pCmdUI->SetCheck(m_wndWatchBar.IsVisible());
}

void CMainFrame::OnUpdateViewWeb ( CCmdUI * pCmdUI ) [protected]

Definition at line 396 of file MainFrm.cpp.

{
  pCmdUI->SetRadio(m_dwCurrentView==ID_VIEW_WEB);

}

afx_msg void CMainFrame::OnUpdateViewWorkspace ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateViewWorkspace ( CCmdUI * pCmdUI ) [protected]
afx_msg void CMainFrame::OnUpdateViewWorkspace ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateViewWorkspace ( CCmdUI * pCmdUI ) [protected]

Definition at line 348 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndWorkSpace.IsVisible ());
}

afx_msg void CMainFrame::OnUpdateViewWorkspace ( CCmdUI * pCmdUI ) [protected]
void CMainFrame::OnUpdateViewWorkspace2 ( CCmdUI * pCmdUI ) [protected]

Definition at line 302 of file MainFrm.cpp.

{
  pCmdUI->SetCheck (m_wndWorkSpace2.IsVisible ());
  pCmdUI->Enable (!IsPrintPreviewMode ());
}

void CMainFrame::OnUpdateWindowManager ( CCmdUI * pCmdUI ) [protected]

Definition at line 183 of file MainFrm.cpp.

{
  pCmdUI->Enable (!IsPrintPreviewMode ());
}

void CMainFrame::OnUpdateWriteClipboard ( CCmdUI * pCmdUI ) [protected]

Definition at line 2412 of file MainFrm.cpp.

{
  pCmdUI->Enable(m_pPrintPreviewFrame == NULL);
}

void CMainFrame::OnUseInProcHandler ( ) [protected]

Definition at line 536 of file mainfrm.cpp.

{
   m_pObjTreeView->OnUseInProcHandler();
}

void CMainFrame::OnUseInProcServer ( ) [protected]

Definition at line 526 of file mainfrm.cpp.

{
  m_pObjTreeView->OnUseInProcServer();
}

void CMainFrame::OnUseLocalServer ( ) [protected]

Definition at line 546 of file mainfrm.cpp.

{
  m_pObjTreeView->OnUseLocalServer() ;
}

void CMainFrame::OnViewAddressBar ( ) [protected]

Definition at line 654 of file MainFrm.cpp.

{
  m_wndReBar.GetReBarCtrl().ShowBand (3, !m_wndAddress.IsWindowVisible ());
}

BOOL CMainFrame::OnViewBar ( UINT nID ) [protected]

Definition at line 343 of file mainfrm.cpp.

{
  CWnd* pBar;
  if ((pBar = GetDlgItem(nID)) == NULL)
    return FALSE;   // not for us
  // toggle visible state
  pBar->ShowWindow((pBar->IsWindowVisible()) == 0);
  RecalcLayout();
  return TRUE;
}

void CMainFrame::OnViewCaptionbar ( ) [protected]

Definition at line 1013 of file MainFrm.cpp.

{
  ShowPane(&m_wndCaption, !(m_wndCaption.GetStyle() & WS_VISIBLE), FALSE, TRUE);
}

void CMainFrame::OnViewCaptionBar ( ) [protected]

Definition at line 344 of file MainFrm.cpp.

{
  ShowPane (&m_wndCaptionBar,
          !(m_wndCaptionBar.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

void CMainFrame::OnViewClass ( ) [protected]

Definition at line 801 of file MainFrm.cpp.

{
  m_wndClassView.ShowPane(!m_wndClassView.IsVisible(), FALSE, TRUE);
}

afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
void CMainFrame::OnViewCustomize ( ) [protected]

Definition at line 137 of file MainFrm.cpp.

{
  CList <CRuntimeClass*, CRuntimeClass*> lstCustomPages;
  lstCustomPages.AddTail (RUNTIME_CLASS (CMyCustomizationPage));
  //------------------------------------
  // Create a customize toolbars dialog:
  //------------------------------------
  CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
    TRUE /* Automatic menus scaning */,
    AFX_CUSTOMIZE_MENU_SHADOWS | AFX_CUSTOMIZE_TEXT_LABELS |
    AFX_CUSTOMIZE_MENU_ANIMATIONS, // default parameters
    &lstCustomPages); // pointer to the list of runtime classes of the custom property pages

  pDlgCust->Create ();
}

afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
afx_msg void CMainFrame::OnViewCustomize ( ) [protected]
void CMainFrame::OnViewDialogBar ( ) [protected]

Definition at line 287 of file MainFrm.cpp.

{
  ShowPane (&m_wndDlgBar,
          !(m_wndDlgBar.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

void CMainFrame::OnViewDlgbarTop ( ) [protected]

Definition at line 327 of file mainfrm.cpp.

{
  if (m_bDialogTop)
    m_wndDlgBar.SetWindowPos(&m_wndStatusBar, 0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);
  else
    m_wndDlgBar.SetWindowPos(&wndTop, 0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);

  RecalcLayout();
  m_bDialogTop = !m_bDialogTop;
}

void CMainFrame::OnViewDynamichelp ( ) [protected]

Definition at line 861 of file MainFrm.cpp.

{
  m_wndDynamicHelpView.ShowPane(!m_wndDynamicHelpView.IsVisible(), FALSE, TRUE);
}

void CMainFrame::OnViewEditingtoolbar ( ) [protected]

Definition at line 262 of file MainFrm.cpp.

{
  CControlBar *pBar = DYNAMIC_DOWNCAST(CControlBar,&m_wndEditBar);
  if(pBar)
  {
    ShowControlBar(pBar, (pBar->GetStyle() & WS_VISIBLE) == 0, FALSE);
  }

}

void CMainFrame::OnViewExplorerbar ( ) [protected]

Definition at line 736 of file MainFrm.cpp.

{
  ShowPane (&m_wndExplorerBar, (m_wndExplorerBar.GetStyle () & WS_VISIBLE) == 0, FALSE, TRUE);
}

void CMainFrame::OnViewFile ( ) [protected]

Definition at line 811 of file MainFrm.cpp.

{
  m_wndFileView.ShowPane(!m_wndFileView.IsVisible(), FALSE, TRUE);
}

void CMainFrame::OnViewFolderList ( ) [protected]

Definition at line 1023 of file MainFrm.cpp.

{
  ShowPane(&m_wndFolderList, !(m_wndFolderList.GetStyle() & WS_VISIBLE), FALSE, TRUE);
  RecalcLayout();
}

void CMainFrame::OnViewFolders ( ) [protected]

Definition at line 332 of file MainFrm.cpp.

{
  ShowPane (&m_wndFoldersBar,
          !(m_wndFoldersBar.GetStyle () & WS_VISIBLE),
          FALSE,TRUE);
  RecalcLayout ();
}

void CMainFrame::OnViewFoldersPopup ( ) [protected]

Definition at line 579 of file MainFrm.cpp.

{
  // First, calulate popup window rectangle.
  // Top left corner need to be under the caption's button:
  CRect rectButton = m_wndCaption.GetButtonRect();
  m_wndCaption.ClientToScreen(&rectButton);

  // Width will be same as folder bar's width:
  CRect rectFolderBar;
  m_wndFolderList.GetWindowRect(&rectFolderBar);

  // Bottom will be near the main frame bottom:
  CRect rectStatusBar;
  m_wndStatusBar.GetWindowRect(rectStatusBar);

  CRect rectPopup(rectButton.left, rectButton.bottom, rectButton.left + rectFolderBar.Width(), rectStatusBar.bottom - 1);

  CFolderListPopupWnd* pFoldersPopup = new CFolderListPopupWnd(m_lstWorkspaces, m_ImagesSmall, m_pCurrWorkSpace);
  pFoldersPopup->Create(rectPopup);

  m_wndCaption.SetButtonPressed();
}

void CMainFrame::OnViewFullScreen ( ) [protected]

Definition at line 605 of file MainFrm.cpp.

{
  ShowFullScreen();
}

afx_msg void CMainFrame::OnViewFullScreen ( ) [protected]
void CMainFrame::OnViewInfobar ( ) [protected]

Definition at line 321 of file MainFrm.cpp.

{
  BOOL bAutoHideMode = m_wndInfoBar.IsAutoHideMode ();
  BOOL bTabbed = m_wndInfoBar.IsTabbed ();

  ShowPane (&m_wndInfoBar,
          !m_wndInfoBar.IsVisible (),
          FALSE, bAutoHideMode || !bTabbed);
  RecalcLayout ();
}

void CMainFrame::OnViewLinksBar ( ) [protected]

Definition at line 664 of file MainFrm.cpp.

{
  ShowPane (&m_wndLinksBar, (m_wndLinksBar.GetStyle () & WS_VISIBLE) == 0, FALSE, TRUE);
}

void CMainFrame::OnViewLong ( ) [protected]

Definition at line 304 of file mainfrm.cpp.

{
  // Set the toolbar to show all commmands
  m_wndToolBar.SetButtons(NULL, 13);
  m_wndToolBar.SetButtonInfo(0, ID_VIEW_SHORT,TBBS_BUTTON, 9);
  m_wndToolBar.SetButtonInfo(1, ID_SEPARATOR,TBBS_SEPARATOR, 6);
  m_wndToolBar.SetButtonInfo(2, ID_FILE_OPEN,TBBS_BUTTON, 1);
  m_wndToolBar.SetButtonInfo(3, ID_FILE_NEW,TBBS_BUTTON, 0);
  m_wndToolBar.SetButtonInfo(4, ID_FILE_SAVE,TBBS_BUTTON, 2);
  m_wndToolBar.SetButtonInfo(5, ID_SEPARATOR,TBBS_SEPARATOR, 6);
  m_wndToolBar.SetButtonInfo(6, ID_APP_ABOUT,TBBS_BUTTON, 7);
  m_wndToolBar.SetButtonInfo(7, ID_SEPARATOR,TBBS_SEPARATOR, 6);
  m_wndToolBar.SetButtonInfo(8, ID_EDIT_CUT,TBBS_BUTTON, 3);
  m_wndToolBar.SetButtonInfo(9, ID_EDIT_COPY,TBBS_BUTTON, 4);
  m_wndToolBar.SetButtonInfo(10, ID_EDIT_PASTE,TBBS_BUTTON, 5);
  m_wndToolBar.SetButtonInfo(11, ID_FILE_PRINT,TBBS_BUTTON, 6);
  m_wndToolBar.SetButtonInfo(12, ID_CONTEXT_HELP,TBBS_BUTTON, 8);

  // invalidate then call update handlers before painting
  m_wndToolBar.Invalidate();
  AfxGetApp()->OnIdle(-1);
}

void CMainFrame::OnViewMacroBar ( ) [protected]

Definition at line 182 of file MainFrm.Cpp.

{
   CControlBar* pControlBar;

   pControlBar = GetControlBar( IDC_MACROBAR );
   if( pControlBar != NULL )
   {
    ShowControlBar( pControlBar, (pControlBar->GetStyle()&WS_VISIBLE) == 0,
     FALSE );
   }
}

void CMainFrame::OnViewMessageBar ( ) [protected]

Definition at line 2553 of file MainFrm.cpp.

{
  ShowPane(&m_wndMessageBar, !(m_wndMessageBar.IsVisible()), FALSE, TRUE);
  RecalcLayout();
}

void CMainFrame::OnViewMyComputer ( ) [protected]

Definition at line 558 of file MainFrm.cpp.

{
  OnViewWorkSpace(ID_VIEW_MY_COMPUTER);
}

void CMainFrame::OnViewOutlookBar ( ) [protected]

Definition at line 281 of file MainFrm.cpp.

{
  ShowPane (&m_wndShortcutsBar,
          !(m_wndShortcutsBar.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

void CMainFrame::OnViewOutlookbar ( ) [protected]

Definition at line 1034 of file MainFrm.cpp.

{
  CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;

  ShowPane(&bar, !(bar.GetStyle() & WS_VISIBLE), FALSE, TRUE);
}

void CMainFrame::OnViewOutput ( ) [protected]

Definition at line 308 of file MainFrm.cpp.

{
  ShowPane (&m_wndOutput,
          !(m_wndOutput.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

afx_msg void CMainFrame::OnViewOutput ( ) [protected]
afx_msg void CMainFrame::OnViewOutput ( ) [protected]
void CMainFrame::OnViewPalette ( ) [protected]

Definition at line 365 of file mainfrm.cpp.

{
  BOOL bVisible = ((m_wndPaletteBar.IsWindowVisible()) != 0);

  ShowControlBar(&m_wndPaletteBar, !bVisible, FALSE);
  RecalcLayout();
}

void CMainFrame::OnViewProperties ( ) [protected]

Definition at line 831 of file MainFrm.cpp.

{
  m_wndPropertiesBar.ShowPane(!m_wndPropertiesBar.IsVisible(), FALSE, TRUE);
}

afx_msg void CMainFrame::OnViewRefresh ( ) [protected]
void CMainFrame::OnViewRefresh ( ) [protected]

Definition at line 390 of file mainfrm.cpp.

{
  COle2ViewDoc*   pDoc = (COle2ViewDoc*)GetActiveDocument() ;
  pDoc->UpdateAllViews( NULL, UPD_NORELOAD ) ;
}

void CMainFrame::OnViewResource ( ) [protected]

Definition at line 821 of file MainFrm.cpp.

{
  m_wndResourceView.ShowPane(!m_wndResourceView.IsVisible(), FALSE, TRUE);
}

void CMainFrame::OnViewRtl ( ) [protected]

Definition at line 2417 of file MainFrm.cpp.

{
  theApp.m_bIsRTL = !theApp.m_bIsRTL;
  OnChangeLayout();
}

void CMainFrame::OnViewShort ( ) [protected]

Definition at line 287 of file mainfrm.cpp.

{
  // Set the toolbar to show only partial commmand list
  m_wndToolBar.SetButtons(NULL, 7);
  m_wndToolBar.SetButtonInfo(0, ID_VIEW_LONG,TBBS_BUTTON, 10);
  m_wndToolBar.SetButtonInfo(1, ID_SEPARATOR,TBBS_SEPARATOR, 6);
  m_wndToolBar.SetButtonInfo(2, ID_FILE_OPEN,TBBS_BUTTON, 1);
  m_wndToolBar.SetButtonInfo(3, ID_FILE_NEW,TBBS_BUTTON, 0);
  m_wndToolBar.SetButtonInfo(4, ID_FILE_SAVE,TBBS_BUTTON, 2);
  m_wndToolBar.SetButtonInfo(5, ID_SEPARATOR,TBBS_SEPARATOR, 6);
  m_wndToolBar.SetButtonInfo(6, ID_APP_ABOUT,TBBS_BUTTON, 7);

  // invalidate the call update handlers before painting
  m_wndToolBar.Invalidate();
  AfxGetApp()->OnIdle(-1);
}

void CMainFrame::OnViewSource ( ) [protected]

Definition at line 386 of file MainFrm.cpp.

{
  SwapView();
}

void CMainFrame::OnViewStatusBar ( ) [protected]

Definition at line 172 of file mainfrm.cpp.

{
  CWnd* pStatusBar;
  if (pStatusBar = GetDescendantWindow(AFX_IDW_STATUS_BAR))
  {
    pStatusBar->ShowWindow(!(pStatusBar->GetStyle() & WS_VISIBLE));
    RecalcLayout();
  }
}

void CMainFrame::OnViewTaskpane ( ) [protected]

Definition at line 282 of file MainFrm.cpp.

{
  ShowPane (&m_wndTaskPane,
          !(m_wndTaskPane.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

void CMainFrame::OnViewTextlabels ( ) [protected]

Definition at line 699 of file MainFrm.cpp.

{
  m_wndToolBar.EnableTextLabels (!m_wndToolBar.AreTextLabels ());
}

afx_msg void CMainFrame::OnViewThemeToolbar ( ) [protected]
void CMainFrame::OnViewThemeToolbar ( ) [protected]

Definition at line 611 of file MainFrm.cpp.

{
  ShowPane (&m_wndToolBarTheme,
          !(m_wndToolBarTheme.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

void CMainFrame::OnViewToolsPalette ( ) [protected]

Definition at line 222 of file MainFrm.cpp.

{
  ShowPane (&m_wndPalette,
          !(m_wndPalette.GetStyle () & WS_VISIBLE),
          FALSE, TRUE);
}

void CMainFrame::OnViewWatch ( ) [protected]

Definition at line 851 of file MainFrm.cpp.

{
  m_wndWatchBar.ShowPane(!m_wndWatchBar.IsVisible(), FALSE, TRUE);
}

void CMainFrame::OnViewWeb ( ) [protected]

Definition at line 391 of file MainFrm.cpp.

{
  SwapView();
}

afx_msg void CMainFrame::OnViewWorkspace ( ) [protected]
afx_msg void CMainFrame::OnViewWorkspace ( ) [protected]
afx_msg void CMainFrame::OnViewWorkspace ( ) [protected]
void CMainFrame::OnViewWorkSpace ( UINT ud ) [protected]

Definition at line 544 of file MainFrm.cpp.

{
  for (POSITION pos = m_lstWorkspaces.GetHeadPosition(); pos != NULL;)
  {
    CWorkspaceObj* pWS = (CWorkspaceObj*) m_lstWorkspaces.GetNext(pos);
    ASSERT_VALID(pWS);

    if (pWS->m_uiCmd == id)
    {
      SetWorkSpace(pWS);
    }
  }
}

void CMainFrame::OnViewWorkspace ( ) [protected]

Definition at line 340 of file MainFrm.cpp.

{
  ShowPane (&m_wndWorkSpace,
          !(m_wndWorkSpace.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

afx_msg void CMainFrame::OnViewWorkspace ( ) [protected]
void CMainFrame::OnViewWorkspace2 ( ) [protected]

Definition at line 294 of file MainFrm.cpp.

{
  ShowPane (&m_wndWorkSpace2,
          !(m_wndWorkSpace2.IsVisible ()),
          FALSE, TRUE);
  RecalcLayout ();
}

void CMainFrame::OnWindowManager ( ) [protected]

Definition at line 208 of file mainfrm.cpp.

{
  ShowWindowsDialog();
}

afx_msg void CMainFrame::OnWindowManager ( ) [protected]
afx_msg void CMainFrame::OnWindowManager ( ) [protected]
afx_msg void CMainFrame::OnWindowManager ( ) [protected]
afx_msg void CMainFrame::OnWindowManager ( ) [protected]
afx_msg void CMainFrame::OnWindowManager ( ) [protected]
afx_msg void CMainFrame::OnWindowManager ( ) [protected]
void CMainFrame::OnWindowTileHorz ( ) [protected]

Definition at line 127 of file frame.cpp.

{
  if (GetKeyState(VK_SHIFT) < 0)
    OnMDIWindowCmd(ID_WINDOW_TILE_VERT);
  else
    OnMDIWindowCmd(ID_WINDOW_TILE_HORZ);
}

void CMainFrame::OnWriteClipboard ( ) [protected]

Definition at line 2407 of file MainFrm.cpp.

{
  m_wndTaskPane.ShowPane(!m_wndTaskPane.IsVisible(), FALSE, TRUE);
}

void CMainFrame::OnZoom ( ) [protected]

Definition at line 2173 of file MainFrm.cpp.

{
  MessageBox(_T("Zoom dialog box..."));
}

void CMainFrame::OnZoomSlider ( ) [protected]

Definition at line 2156 of file MainFrm.cpp.

{
  CMFCRibbonSlider* pSlider = DYNAMIC_DOWNCAST(CMFCRibbonSlider, m_wndStatusBar.FindElement(ID_STATUSBAR_ZOOM_SLIDER));
  ASSERT_VALID(pSlider);

  int nPos = pSlider->GetPos();

  CMFCRibbonStatusBarPane* pZoom = DYNAMIC_DOWNCAST(CMFCRibbonStatusBarPane, m_wndStatusBar.FindElement(ID_STATUSBAR_ZOOM));
  ASSERT_VALID(pZoom);

  CString strZoom;
  strZoom.Format(_T("%d%%"), nPos);

  pZoom->SetText(strZoom);
  pZoom->Redraw();
}

virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
virtual BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]
BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 134 of file mainfrm.cpp.

{
  // remove this flag to remove " - Untitled" from the frame's caption

  cs.style &= ~ FWS_ADDTOTITLE;

  return CFrameWnd::PreCreateWindow(cs);
}

BOOL CMainFrame::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 493 of file mainfrm.cpp.

{
  if (pMsg->message == WM_RBUTTONDOWN)
  {
    CWnd* pWnd = CWnd::FromHandlePermanent(pMsg->hwnd);
    CControlBar* pBar = DYNAMIC_DOWNCAST(CControlBar, pWnd);

    if (pBar != NULL)
     {
      CMenu Menu;
      CPoint pt;

      pt.x = LOWORD(pMsg->lParam);
      pt.y = HIWORD(pMsg->lParam);
      pBar->ClientToScreen(&pt);

      if (Menu.LoadMenu(IDR_TOOLBAR))
      {
        CMenu* pSubMenu = Menu.GetSubMenu(0);

        if (pSubMenu!=NULL)
        {
          pSubMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,pt.x,pt.y,this);
        }
      }
    }
  }
  return CFrameWnd::PreTranslateMessage(pMsg);
}

virtual BOOL CMainFrame::PreTranslateMessage ( MSG * pMsg ) [virtual]
void CMainFrame::RecalcLayout ( BOOL bNotify = TRUE ) [virtual]

Definition at line 613 of file MainFrm.cpp.

{
  CFrameWnd::RecalcLayout(bNotify);

  if (m_wndFolderList.GetSafeHwnd() != NULL)
  {
    m_wndCaption.EnableButton(!(m_wndFolderList.GetStyle() & WS_VISIBLE));
  }
}

BOOL CMainFrame::RestorePosition ( int nCmdShow ) [protected]

Definition at line 248 of file mainfrm.cpp.

{
  CString sz ;
  CString szSection ;
  CString szKey ;
  BOOL fToolBar = TRUE ;
  BOOL fStatusBar = TRUE ;
  int  nWidth ;

  #pragma warning(suppress: 6031)
  szSection.LoadString( IDS_INI_CONFIG ) ;
  ASSERT(szSection != "");
  #pragma warning(suppress: 6031)
  szKey.LoadString( IDS_INI_WNDPOS ) ;
  ASSERT(szKey != "");

  WINDOWPLACEMENT wp;
  int     nConv;

  wp.length = sizeof( WINDOWPLACEMENT );
  wp.flags = 0 ;

  TRY
  {
    sz = theApp.GetProfileString(szSection, szKey, _T("") ) ;
    if (sz.IsEmpty())
      AfxThrowMemoryException();

    LPTSTR   lp = (LPTSTR)sz.GetBuffer( 255 );

    wp.showCmd = (WORD)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMinPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMinPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMaxPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMaxPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.left = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.top = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.right = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.bottom = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    nWidth = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    fToolBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    fStatusBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    // Always strip off minimize.
    //
    if (wp.showCmd == SW_SHOWMINIMIZED)
      wp.showCmd = SW_SHOWNORMAL ;

    if (nCmdShow != SW_SHOWNORMAL)
      wp.showCmd = nCmdShow ;

    m_wndSplitter.SetColumnInfo( 0, nWidth, 0 ) ;
  }
  CATCH(CException, pException)
  {
    fToolBar = TRUE ;
    fStatusBar = TRUE ;
    ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
    ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
    ShowWindow( SW_SHOWNORMAL );
    return FALSE ;
  }
  END_CATCH
  ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
  ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
  return (BOOL)SetWindowPlacement( &wp ) ;
}

BOOL CMainFrame::SavePosition ( ) [protected]

Definition at line 212 of file mainfrm.cpp.

{
  CString szSection ;
  CString szKey ;

  #pragma warning(suppress: 6031)
  szSection.LoadString( IDS_INI_CONFIG ) ;
  ASSERT(szSection != "");
  #pragma warning(suppress: 6031)
  szKey.LoadString( IDS_INI_WNDPOS ) ;
  ASSERT(szKey != "");

  WINDOWPLACEMENT wp;
  CString szValue ;

  wp.length = sizeof( WINDOWPLACEMENT );
  GetWindowPlacement( &wp );

  int nWidth, n ;
  m_wndSplitter.GetColumnInfo( 0, nWidth, n ) ;

  LPTSTR p = szValue.GetBuffer( 255 ) ;
  _stprintf_s( p, 255, _T("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d"),
    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,
    nWidth,
    (m_wndToolBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE,
    (m_wndStatusBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE);

  szValue.ReleaseBuffer() ;
  theApp.WriteProfileString( szSection, szKey, szValue );
  return TRUE ;
}

BOOL CMainFrame::SelectPalette ( BOOL bBackground )

Definition at line 152 of file frame.cpp.

{
  if (m_palette.m_hObject == NULL)
    return FALSE;

  CDC* pDC = GetDC();
  CPalette* pOldPal = pDC->SelectPalette(&m_palette, bBackground);
  UINT nPalChg = pDC->RealizePalette();
  pDC->SelectPalette(pOldPal, TRUE); // background
  ReleaseDC(pDC);

  if (nPalChg > 0)
    InvalidateRect(NULL, TRUE);

  return TRUE;
}

void CMainFrame::SetAddress ( LPCTSTR lpszUrl )
void CMainFrame::SetAddress ( LPCTSTR lpszUrl )

Definition at line 349 of file MainFrm.cpp.

{
  // This is called when the browser has completely loaded the new location,
  // so make sure the text in the address bar is up to date and stop the
  // animation.
  m_wndAddress.SetWindowText(lpszUrl);
  m_wndAnimate.Stop();
  m_wndAnimate.Seek(0);
}

void CMainFrame::SetBasicCommands ( ) [protected]

Definition at line 644 of file MainFrm.cpp.

{
  CList<UINT, UINT> lstBasicCommands;

  lstBasicCommands.AddTail(ID_VIEW_TOOLBARS);
  lstBasicCommands.AddTail(ID_FILE_NEW);
  lstBasicCommands.AddTail(ID_FILE_OPEN);
  lstBasicCommands.AddTail(ID_FILE_SAVE);
  lstBasicCommands.AddTail(ID_FILE_PRINT);
  lstBasicCommands.AddTail(ID_APP_EXIT);
  lstBasicCommands.AddTail(ID_EDIT_CUT);
  lstBasicCommands.AddTail(ID_EDIT_PASTE);
  lstBasicCommands.AddTail(ID_EDIT_UNDO);
  lstBasicCommands.AddTail(ID_APP_ABOUT);
  lstBasicCommands.AddTail(ID_VIEW_TOOLBAR);
  lstBasicCommands.AddTail(ID_VIEW_CUSTOMIZE);
  lstBasicCommands.AddTail(ID_VIEW_APP_LOOK);
  lstBasicCommands.AddTail(ID_NEW_MAIL);
  lstBasicCommands.AddTail(ID_NEW_FAX);
  lstBasicCommands.AddTail(ID_NEW_POST_FOLDER);
  lstBasicCommands.AddTail(ID_NEW_APPOINTMENT);
  lstBasicCommands.AddTail(ID_NEW_MEETING);
  lstBasicCommands.AddTail(ID_NEW_CONTRACT);
  lstBasicCommands.AddTail(ID_NEW_DISTRIBUTION_LIST);
  lstBasicCommands.AddTail(ID_NEW_TASK);
  lstBasicCommands.AddTail(ID_NEW_NOTE);
  lstBasicCommands.AddTail(ID_DUMMY);
  lstBasicCommands.AddTail(ID_VIEW_FOLDER_LIST);
  lstBasicCommands.AddTail(ID_MAIL_SEND);
  lstBasicCommands.AddTail(ID_MAIL_SAVE);
  lstBasicCommands.AddTail(ID_FILE_SAVE_AS);
  lstBasicCommands.AddTail(ID_MAIL_SAVE_ATTACHMENTS);
  lstBasicCommands.AddTail(ID_MAIL_SAVE_STATIONERY);
  lstBasicCommands.AddTail(ID_MAIL_DELETE);
  lstBasicCommands.AddTail(ID_MAIL_MOVE_TO_FOLDER);
  lstBasicCommands.AddTail(ID_FILE_PRINT_PREVIEW);
  lstBasicCommands.AddTail(ID_FILE_CLOSE);
  lstBasicCommands.AddTail(ID_MAIL_ATTACHMENT);
  lstBasicCommands.AddTail(ID_MAIL_ITEM);
  lstBasicCommands.AddTail(ID_MAIL_SIGNATURE);
  lstBasicCommands.AddTail(ID_MAIL_SPELL);
  lstBasicCommands.AddTail(ID_MAIL_CLOSE);
  lstBasicCommands.AddTail(ID_ADDRESS_BOOK);
  lstBasicCommands.AddTail(ID_VIEW_GOTO_HOME);
  lstBasicCommands.AddTail(ID_VIEW_GOTO_CALENDAR);
  lstBasicCommands.AddTail(ID_VIEW_GOTO_TASKS);
  lstBasicCommands.AddTail(ID_VIEW_GOTO_FAVORITES);

  CMFCToolBar::SetBasicCommands(lstBasicCommands);
}

void CMainFrame::SetContainerSize ( UINT nSize )

Definition at line 526 of file MainFrm.cpp.

{
  CPaneDivider* pDefaultPaneDivider = m_wndDlgBar.GetDefaultPaneDivider ();
  if (pDefaultPaneDivider == NULL)
  {
    AfxMessageBox (_T ("The DialogBar is not docked."));
    return;
  }

  BOOL bLeftBar = FALSE;
  CPaneContainer* pContainer = pDefaultPaneDivider->FindPaneContainer (&m_wndDlgBar, bLeftBar);

  while (pContainer->GetParentPaneContainer () != NULL)
  {
    pContainer = pContainer->GetParentPaneContainer ();
  }

  CRect rectContainer;
  pContainer->GetWindowRect (rectContainer, FALSE);

  DWORD dwDividerStyle = pDefaultPaneDivider->GetCurrentAlignment ();
  CPoint ptOffset (0, 0);
  switch (dwDividerStyle)
  {
  case CBRS_ALIGN_TOP:
    ptOffset.y = nSize - rectContainer.Height ();
    break;
  case CBRS_ALIGN_BOTTOM:
    ptOffset.y = rectContainer.Height () - nSize;
    break;
  case CBRS_ALIGN_LEFT:
    ptOffset.x = nSize - rectContainer.Width ();
    break;
  case CBRS_ALIGN_RIGHT:
    ptOffset.x = rectContainer.Width () - nSize;
    break;
  }
  pDefaultPaneDivider->Move (ptOffset);
}

void CMainFrame::SetCurrFolder ( LPCTSTR lpszPath )

Definition at line 350 of file MainFrm.cpp.

{
  ASSERT (lpszPath != NULL);
  m_wndAddress.GetEditCtrl()->SetWindowText (lpszPath);
}

void CMainFrame::SetDlgBarHeightInPixels ( UINT nHeight )

Definition at line 411 of file MainFrm.cpp.

{
  BOOL bLeftBar = FALSE;
  BOOL bAloneInContainer = FALSE;
  CPaneContainer* pContainer = NULL;
  CPaneDivider* pDivider = NULL;

  BOOL bResult = FindInternalDivider (&m_wndDlgBar, pContainer, pDivider, bLeftBar, bAloneInContainer);

  if (bAloneInContainer)
  {
    MessageBox (_T ("DialogBar is docked alone in container."));
    return;
  }
  if (!bResult || pContainer == NULL || pDivider == NULL)
  {
    AfxMessageBox (_T ("The DialogBar is not docked."));
    return;
  }

  if (!pDivider->IsHorizontal ())
  {
    MessageBox (_T ("Internal pane divider is vertical, can change width only."));
    return;
  }

  CPaneContainer* pRootContainer = m_wndDlgBar.GetDefaultPaneDivider ()->FindPaneContainer (&m_wndDlgBar, bLeftBar);

  while (pRootContainer->GetParentPaneContainer () != NULL)
  {
    pRootContainer = pRootContainer->GetParentPaneContainer ();
  }

  CRect rectContainer;
  pRootContainer->GetWindowRect (rectContainer, FALSE);

  if ((UINT)rectContainer.Height () - 4 < nHeight)
  {
    CString strFormat = _T ("Required height exceeds allowed height in the current container.\nAllowed height is %u pixels.");
    CString strMessage;
    strMessage.Format (strFormat, rectContainer.Height () - 4);
    MessageBox (strMessage);
    return;
  }

  CRect rectDlgBar;
  m_wndDlgBar.GetWindowRect (rectDlgBar);

  CPoint ptOffset (0, 0);
  ptOffset.y = rectDlgBar.Height () - nHeight;
  if (bLeftBar)
  {
    ptOffset.y = -ptOffset.y;
  }
  pDivider->Move (ptOffset);
}

void CMainFrame::SetDlgBarSizeInContainer ( UINT nSize )

Definition at line 364 of file MainFrm.cpp.

{
  BOOL bLeftBar = FALSE;
  BOOL bAloneInContainer = FALSE;
  CPaneContainer* pContainer = NULL;
  CPaneDivider* pDivider = NULL;

  BOOL bResult = FindInternalDivider (&m_wndDlgBar, pContainer, pDivider, bLeftBar, bAloneInContainer);

  if (bAloneInContainer)
  {
    MessageBox (_T ("DialogBar is docked alone in container."));
    return;
  }
  if (!bResult || pContainer == NULL || pDivider == NULL)
  {
    AfxMessageBox (_T ("The DialogBar is not docked."));
    return;
  }

  CRect rectContainer;
  pContainer->GetWindowRect (rectContainer, FALSE);

  CRect rectDlgBar;
  m_wndDlgBar.GetWindowRect (rectDlgBar);

  CPoint ptOffset (0, 0);
  if (pDivider->IsHorizontal ())
  {
    ptOffset.y = rectDlgBar.Height () - rectContainer.Height () * nSize / 100;
    if (bLeftBar)
    {
      ptOffset.y = -ptOffset.y;
    }
  }
  else
  {
    ptOffset.x = rectDlgBar.Width () - rectContainer.Width () * nSize / 100;
    if (bLeftBar)
    {
      ptOffset.x = -ptOffset.x;
    }
  }

  pDivider->Move (ptOffset);
}

void CMainFrame::SetDlgBarWidthInPixels ( UINT nWidth )

Definition at line 469 of file MainFrm.cpp.

{

  BOOL bLeftBar = FALSE;
  BOOL bAloneInContainer = FALSE;
  CPaneContainer* pContainer = NULL;
  CPaneDivider* pDivider = NULL;

  BOOL bResult = FindInternalDivider (&m_wndDlgBar, pContainer, pDivider, bLeftBar, bAloneInContainer);

  if (bAloneInContainer)
  {
    MessageBox (_T ("DialogBar is docked alone in container."));
    return;
  }
  if (!bResult || pContainer == NULL || pDivider == NULL)
  {
    AfxMessageBox (_T ("The DialogBar is not docked."));
    return;
  }

  if (pDivider->IsHorizontal ())
  {
    MessageBox (_T ("Internal pane divider is horizontal, can change height only."));
    return;
  }

  CPaneContainer* pRootContainer = m_wndDlgBar.GetDefaultPaneDivider ()->FindPaneContainer (&m_wndDlgBar, bLeftBar);

  while (pRootContainer->GetParentPaneContainer () != NULL)
  {
    pRootContainer = pRootContainer->GetParentPaneContainer ();
  }

  CRect rectContainer;
  pRootContainer->GetWindowRect (rectContainer, FALSE);

  if ((UINT) rectContainer.Width () - 4 < nWidth)
  {
    CString strFormat = _T ("Required width exceeds allowed width in the current container.\nAllowed width is %u pixels.");
    CString strMessage;
    strMessage.Format (strFormat, rectContainer.Width () - 4);
    MessageBox (strMessage);
    return;
  }

  CRect rectDlgBar;
  m_wndDlgBar.GetWindowRect (rectDlgBar);

  CPoint ptOffset (0, 0);
  ptOffset.x = rectDlgBar.Width () - nWidth;
  if (bLeftBar)
  {
    ptOffset.x = -ptOffset.x;
  }
  pDivider->Move (ptOffset);
}

void CMainFrame::SetDockingBarsIcons ( BOOL bHiColorIcons ) [protected]

Definition at line 539 of file MainFrm.cpp.

{
  HICON hClassViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_CLASS_VIEW_HC : IDI_CLASS_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
  m_wndClassView.SetIcon(hClassViewIcon, FALSE);

  HICON hResViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_RES_VIEW_HC : IDI_RES_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
  m_wndResourceView.SetIcon(hResViewIcon, FALSE);

  HICON hFileViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_FILE_VIEW_HC : IDI_FILE_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
  m_wndFileView.SetIcon(hFileViewIcon, FALSE);

  HICON hOutputBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_OUTPUT_BAR_HC : IDI_OUTPUT_BAR), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
  m_wndOutputView.SetIcon(hOutputBarIcon, FALSE);

  HICON hDynamicHelpIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_DYNAMICHELP_VIEW_HC : IDI_DYNAMICHELP_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
  m_wndDynamicHelpView.SetIcon(hDynamicHelpIcon, FALSE);

  HICON hWatchBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_WATCH_BAR_HC : IDI_WATCH_BAR), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
  m_wndWatchBar.SetIcon(hWatchBarIcon, FALSE);

  HICON hPropertiesBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_PROP_BAR_HC : IDI_PROPERTIES_BAR), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
  m_wndPropertiesBar.SetIcon(hPropertiesBarIcon, FALSE);

  UpdateMDITabbedBarsIcons();
}

void CMainFrame::SetKeys ( ) [protected]

Definition at line 237 of file MainFrm.cpp.

{
  m_MainButton.SetKeys(_T("f"));

  for (int i = 0; keys [i].uiCmd != 0; i++)
  {
    CString str = keys [i].lpszKey;

    int nAmpIndex = str.Find(_T('&'));

    if (nAmpIndex >= 0)
    {
      CString str1 = str.Left(nAmpIndex);
      CString str2 = str.Mid(nAmpIndex + 1);

      m_wndRibbonBar.SetElementKeys(keys [i].uiCmd, str1, str2);
    }
    else
    {
      m_wndRibbonBar.SetElementKeys(keys [i].uiCmd, str);
    }
  }
}

void CMainFrame::SetProgress | ( | long | nCurr,
 |  | long | nTotal
 | ) |  |

Definition at line 746 of file MainFrm.cpp.

{
  m_wndStatusBar.EnablePaneProgressBar (nStatusProgress, nTotal);

  if (nTotal >= 0)
  {
    m_wndStatusBar.SetPaneProgress (nStatusProgress, min (nTotal, max (0, nCurr)));
  }
  else
  {
    m_wndStatusBar.RedrawWindow ();
  }
}

void CMainFrame::SetProgressPos | ( | int | nPos,
 |  | UINT | nID |
 | ) |  |  | [protected]

Definition at line 1020 of file MainFrm.cpp.

{
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
  m_wndRibbonBar.GetElementsByID (nID, ar);

  for (int i = 0; i < ar.GetSize (); i++)
  {
    CMFCRibbonProgressBar* pProgress = DYNAMIC_DOWNCAST (CMFCRibbonProgressBar, ar[i]);
    if (pProgress != NULL)
    {
      if (pProgress->GetPos () != nPos)
      {
        pProgress->SetPos (nPos);
      }
    }
  }
}

void CMainFrame::SetRibbonContextCategory ( UINT uiCategoryID )
void CMainFrame::SetRibbonContextCategory ( UINT uiCategoryID )

Definition at line 1073 of file mainfrm.cpp.

{
  if (uiCategoryID != 0)
  {
    CMFCRibbonCategory* pActivaTab = m_wndRibbonBar.GetActiveCategory();
    if (pActivaTab != NULL && pActivaTab->GetContextID() == uiCategoryID)
    {
      return;
    }
  }

  BOOL bRecalc = m_wndRibbonBar.HideAllContextCategories();

  if (uiCategoryID != 0)
  {
    m_wndRibbonBar.ShowContextCategories(uiCategoryID);
    bRecalc = TRUE;
  }

  if (bRecalc)
  {
    m_wndRibbonBar.RecalcLayout();
    m_wndRibbonBar.RedrawWindow();

    SendMessage(WM_NCPAINT, 0, 0);
  }
}

void CMainFrame::SetSliderPos | ( | int | nPos,
 |  | UINT | nID |
 | ) |  |  | [protected]

Definition at line 1002 of file MainFrm.cpp.

{
  CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
  m_wndRibbonBar.GetElementsByID (nID, ar);

  for (int i = 0; i < ar.GetSize (); i++)
  {
    CMFCRibbonSlider* pSlider = DYNAMIC_DOWNCAST (CMFCRibbonSlider, ar[i]);
    if (pSlider != NULL)
    {
      if (pSlider->GetPos () != nPos)
      {
        pSlider->SetPos (nPos);
      }
    }
  }
}

void CMainFrame::SetupMemoryBitmapSize ( const CSize & sz ) [private]

Definition at line 499 of file MainFrm.cpp.

{
  CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
    CMFCVisualManager::GetInstance ());

  if (pManager != NULL)
  {
    CRect rtRes (0, 0, sz.cx, 0);

    CRect rt;

    CPane* bars[4] =
      {&m_wndCaptionBar, &m_wndMenuBar, &m_wndToolBar, &m_wndCategoryBar};

    for (long i = 0; i < 4; i++)
    {
      CPane* pBar = bars [i];

      if (pBar != NULL && pBar->GetSafeHwnd () != NULL)
      {
        pBar->GetWindowRect (rt);
        rtRes.bottom += rt.Height ();
      }
    }

    CDC* pDC = GetDC ();

    pManager->SetupMemoryBitmapSize (pDC, rtRes.Size ());

    ReleaseDC (pDC);
  }
}

void CMainFrame::SetupOffice2007Button ( ) [protected]

Definition at line 693 of file MainFrm.cpp.

{
  CMFCToolBarButton* pOffice2007 = NULL;
  int nIndex = -1;

  for (UINT uiCmd = ID_VIEW_APPLOOK_2007_1; uiCmd <= ID_VIEW_APPLOOK_2007_4; uiCmd++)
  {
    nIndex = m_wndToolBarTheme.CommandToIndex (uiCmd);

    CMFCToolBarButton* pButton = m_wndToolBarTheme.GetButton (nIndex);
    if (pButton != NULL)
    {
      pOffice2007 = pButton;
      break;
    }
  }

  if (pOffice2007 == NULL)
  {
    return;
  }

  ASSERT_VALID (pOffice2007);

  pOffice2007->m_nID = m_nAppLook;
  m_wndToolBarTheme.SetToolBarBtnText (nIndex, NULL, TRUE, FALSE);
  m_wndToolBarTheme.AdjustSizeImmediate ();
}

void CMainFrame::SetupOffice2007Button ( ) [protected]
void CMainFrame::SetWorkSpace ( CWorkspaceObj * pWorkSpace )

Definition at line 563 of file MainFrm.cpp.

{
  ASSERT_VALID(pWorkSpace);

  m_pCurrWorkSpace = pWorkSpace;

  m_wndCaption.SetIcon(m_ImagesSmall.ExtractIcon(m_pCurrWorkSpace->m_iIconIndex));
  m_wndCaption.SetButton(m_pCurrWorkSpace->m_strName, ID_SHOW_FOLDERS_POPUP);

  m_wndCaption.Invalidate();
  m_wndCaption.UpdateWindow();

  m_wndFolderList.SelectWorkspace(pWorkSpace);

}

void CMainFrame::ShowOptions ( int nPage ) [protected]
void CMainFrame::ShowOptions ( int nPage ) [protected]
void CMainFrame::ShowOptions ( int nPage ) [protected]

Definition at line 634 of file mainfrm.cpp.

{
  // Create "Customize" page:
  std::auto_ptr<CMFCRibbonCustomizePropertyPage> apPageCustomize(new CMFCRibbonCustomizePropertyPage(&m_wndRibbonBar));

  // Add "popular" items:
  CList<UINT, UINT> lstPopular;

  lstPopular.AddTail(ID_FILE_NEW);
  lstPopular.AddTail(ID_FILE_OPEN);
  lstPopular.AddTail(ID_FILE_SAVE);
  lstPopular.AddTail(ID_FILE_PRINT_PREVIEW);
  lstPopular.AddTail(ID_FILE_PRINT_DIRECT);
  lstPopular.AddTail(ID_EDIT_UNDO);

  apPageCustomize->AddCustomCategory(_T("Popular Commands"), lstPopular);

  // Add hidden commands:
  CList<UINT,UINT> lstHidden;
  m_wndRibbonBar.GetItemIDsList(lstHidden, TRUE);
  apPageCustomize->AddCustomCategory(_T("Commands not in the Ribbon"), lstHidden);

  // Add all commands:
  CList<UINT,UINT> lstAll;
  m_wndRibbonBar.GetItemIDsList(lstAll);
  apPageCustomize->AddCustomCategory(_T("All Commands"), lstAll);

  // Create property sheet:
  std::tr1::shared_ptr<CMFCPropertySheet> spPropSheet(new CMFCPropertySheet(_T("Options"), this, nPage));
  spPropSheet->m_psh.dwFlags |= PSH_NOAPPLYNOW;
  spPropSheet->SetLook(CMFCPropertySheet::PropSheetLook_List, 124 /* List width */);
  spPropSheet->AddPage(apPageCustomize.release());
  spPropSheet->DoModal();
}

void CMainFrame::ShowProgress ( BOOL bShow = TRUE ) [protected]

Definition at line 2120 of file MainFrm.cpp.

{
  if (bShow)
  {
    int cxFree = m_wndStatusBar.GetSpace();
    if (cxFree < 20)
    {
      // Not enough space for progress bar
      return;
    }

    int cxProgress = min(cxFree, 150);

    CMFCRibbonProgressBar* pProgressBar = new CMFCRibbonProgressBar(ID_STATUSBAR_PROGRESS, cxProgress);

    pProgressBar->SetInfiniteMode(m_bInfiniteProgressMode);

    m_wndStatusBar.AddDynamicElement(pProgressBar);

    m_nProgressValue = 0;

    SetTimer(IdShowProgressTimer, 10, NULL);
  }
  else
  {
    KillTimer(IdShowProgressTimer);
    m_wndStatusBar.RemoveElement(ID_STATUSBAR_PROGRESS);
    m_nProgressValue = -1;
  }

  m_wndStatusBar.RecalcLayout();
  m_wndStatusBar.RedrawWindow();

  CMFCPopupMenu::UpdateAllShadows();
}

void CMainFrame::StartAnimation ( )

Definition at line 359 of file MainFrm.cpp.

{
  // Start the animation.  This is called when the browser begins to
  // navigate to a new location
#pragma warning(disable : 4245)
  m_wndAnimate.Play(0, -1, -1);
#pragma warning(default : 4245)
}

void CMainFrame::StartAnimation ( )
void CMainFrame::SwapView ( int nCmdId )

Definition at line 320 of file MainFrm.cpp.

{
  CDocument *pDoc;

  pDoc = GetActiveDocument();
  if(nCmdID == ID_VIEW_SOURCE)
  {
    //swap the view IDs
    m_pWebView->SetDlgCtrlID(AFX_IDW_PANE_LAST);
    m_pSrcView->SetDlgCtrlID(AFX_IDW_PANE_FIRST);

    // show/hide the right view
    m_pWebView->ShowWindow(SW_HIDE);
    m_pSrcView->ShowWindow(SW_SHOW);

    //update the document
    //pDoc->AddView(m_pSrcView);
    //pDoc->RemoveView(m_pWebView);

    //re-layout everything
    SetActiveView(m_pSrcView);
    RecalcLayout();

    m_dwCurrentView = ID_VIEW_SOURCE;

    m_wndStatusBar.SetPaneText(1, _T("SRC VIEW"), TRUE);

    return;
  }
  else if(nCmdID == ID_VIEW_WEB)
  {
    //swap the view IDs
    m_pWebView->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
    m_pSrcView->SetDlgCtrlID(AFX_IDW_PANE_LAST);

    // show/hide the right view
    m_pWebView->ShowWindow(SW_SHOW);
    m_pSrcView->ShowWindow(SW_HIDE);

    //update the document
    //pDoc->AddView(m_pWebView);
    //pDoc->RemoveView(m_pSrcView);

    //re-layout everything
    SetActiveView(m_pWebView);
    RecalcLayout();

    m_dwCurrentView = ID_VIEW_WEB;
    m_wndStatusBar.SetPaneText(1, _T("WEB VIEW"), TRUE);
    return;
  }

}

void CMainFrame::SwapView ( )

Definition at line 373 of file MainFrm.cpp.

{
  //if we are already showing the right view, bail, nothing to do.
  DWORD nCmdID = LOWORD(GetCurrentMessage()->wParam);
  if((nCmdID == ID_VIEW_SOURCE) && (m_dwCurrentView == ID_VIEW_SOURCE))
    return;
  if((nCmdID == ID_VIEW_WEB) && (m_dwCurrentView == ID_VIEW_WEB))
    return;

  SwapView(nCmdID);
}

void CMainFrame::UpdateContextTab ( CDrawView * pCurrView )

Definition at line 680 of file mainfrm.cpp.

{
  bool bEnable = pCurrView->m_selection.GetCount() > 0;

  SetRibbonContextCategory(bEnable ? ID_FORMAT_CONTEXT_TAB : 0);

  if (bEnable)
  {
    UpdateContextTabFromObject(pCurrView->m_selection);
  }
}

void CMainFrame::UpdateContextTabFromObject ( CDrawObjList & list )

Definition at line 713 of file mainfrm.cpp.

{
  int count = (int) list.GetCount();
  if (count == 0)
  {
    return;
  }

  COLORREF clrFill = (COLORREF)-1;
  COLORREF clrLine = (COLORREF)-1;
  int nLineWeight  = -1;
  if (count == 1)
  {
    CDrawObj* pObj = list.GetHead();
    if (pObj->CanChangeFillColor() && pObj->IsEnableFill())
    {
      clrFill = pObj->GetFillColor();
    }
    if (pObj->CanChangeLineColor() && pObj->IsEnableLine())
    {
      clrLine = pObj->GetLineColor();
    }
    if (pObj->CanChangeLineWeight() && pObj->IsEnableLine())
    {
      nLineWeight = pObj->GetLineWeight() - 1;
    }
  }

  {
    CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
    m_wndRibbonBar.GetElementsByID(ID_OBJECT_FILLCOLOR, arButtons);

    if (arButtons.GetSize() > 0)
    {
      for (int i = 0; i < arButtons.GetSize(); i++)
      {
        CMFCRibbonColorButton* pButton = DYNAMIC_DOWNCAST
          (CMFCRibbonColorButton, arButtons[i]
        );
        pButton->SetColor(clrFill);
      }
    }
  }

  {
    CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
    m_wndRibbonBar.GetElementsByID(ID_OBJECT_LINECOLOR, arButtons);

    if (arButtons.GetSize() > 0)
    {
      for (int i = 0; i < arButtons.GetSize(); i++)
      {
        CMFCRibbonColorButton* pButton = DYNAMIC_DOWNCAST
          (CMFCRibbonColorButton, arButtons[i]
        );
        pButton->SetColor(clrLine);
      }
    }
  }

  {
    CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
    m_wndRibbonBar.GetElementsByID(ID_OBJECT_LINEWEIGHT, arButtons);

    if (arButtons.GetSize() > 0)
    {
      for (int i = 0; i < arButtons.GetSize(); i++)
      {
        CRibbonListButton* pButton = DYNAMIC_DOWNCAST
          (CRibbonListButton, arButtons[i]
        );
        pButton->SelectItem(nLineWeight);
      }
    }
  }

  m_wndRibbonBar.RedrawWindow();
}

void CMainFrame::UpdateMDITabs ( BOOL bResetMDIChild )

Definition at line 468 of file MainFrm.cpp.

{
  CMDITabInfo params;
  HWND hwndActive = NULL;

  switch (theApp.m_Options.m_nMDITabsType)
  {
  case CMDITabOptions::None:
    {
      BOOL bCascadeMDIChild = FALSE;

      if (IsMDITabbedGroup ())
      {
        EnableMDITabbedGroups (FALSE, params);
        bCascadeMDIChild = TRUE;
      }
      else if (AreMDITabs ())
      {
        EnableMDITabs (FALSE);
        bCascadeMDIChild = TRUE;
      }

      if (bCascadeMDIChild)
      {
        hwndActive = (HWND) m_wndClientArea.SendMessage (WM_MDIGETACTIVE);
        m_wndClientArea.SendMessage (WM_MDICASCADE);
        ::BringWindowToTop (hwndActive);
      }
    }
    break;

  case CMDITabOptions::MDITabsStandard:
    hwndActive = (HWND) m_wndClientArea.SendMessage (WM_MDIGETACTIVE);
    m_wndClientArea.PostMessage (WM_MDIMAXIMIZE, LPARAM(hwndActive), 0L);
    ::BringWindowToTop (hwndActive);

    EnableMDITabs (TRUE,theApp.m_Options.m_bMDITabsIcons, theApp.m_Options.m_bTabsOnTop ? CMFCTabCtrl::LOCATION_TOP : CMFCTabCtrl::LOCATION_BOTTOM, TRUE, theApp.m_Options.m_nTabsStyle);

    GetMDITabs().EnableAutoColor (theApp.m_Options.m_bTabsAutoColor);
    GetMDITabs().EnableTabDocumentsMenu (theApp.m_Options.m_bMDITabsDocMenu);
    GetMDITabs().EnableTabSwap (theApp.m_Options.m_bDragMDITabs);
    GetMDITabs().SetTabBorderSize (theApp.m_Options.m_nMDITabsBorderSize);
    GetMDITabs().SetFlatFrame (theApp.m_Options.m_bFlatFrame);
    GetMDITabs().EnableCustomToolTips (theApp.m_Options.m_bCustomTooltips);
    GetMDITabs().EnableCustomToolTips (theApp.m_Options.m_bCustomTooltips);
    GetMDITabs().EnableActiveTabCloseButton (theApp.m_Options.m_bActiveTabCloseButton);
    break;

  case CMDITabOptions::MDITabbedGroups:
    hwndActive = (HWND) m_wndClientArea.SendMessage (WM_MDIGETACTIVE);
    m_wndClientArea.PostMessage (WM_MDIMAXIMIZE, LPARAM(hwndActive), 0L);
    ::BringWindowToTop (hwndActive);

    params.m_tabLocation = theApp.m_Options.m_bTabsOnTop ? CMFCTabCtrl::LOCATION_TOP : CMFCTabCtrl::LOCATION_BOTTOM;
    params.m_style = theApp.m_Options.m_nTabsStyle;
    params.m_bTabCloseButton = !theApp.m_Options.m_bActiveTabCloseButton;
    params.m_bActiveTabCloseButton = theApp.m_Options.m_bActiveTabCloseButton;
    params.m_bAutoColor = theApp.m_Options.m_bTabsAutoColor;
    params.m_bDocumentMenu = theApp.m_Options.m_bMDITabsDocMenu;
    params.m_bEnableTabSwap = theApp.m_Options.m_bDragMDITabs;
    params.m_nTabBorderSize = theApp.m_Options.m_nMDITabsBorderSize;
    params.m_bTabIcons = theApp.m_Options.m_bMDITabsIcons;
    params.m_bFlatFrame = theApp.m_Options.m_bFlatFrame;
    params.m_bTabCustomTooltips = theApp.m_Options.m_bCustomTooltips;

    EnableMDITabbedGroups (TRUE, params);
    break;
  }

  // Some "Windows..." commands are non-relevant when all MDI child windows are always maximized:
  CList<UINT, UINT> lstCommands;

  if (theApp.m_Options.IsMDITabsDisabled())
  {
    lstCommands.AddTail (ID_WINDOW_CASCADE);
    lstCommands.AddTail (ID_WINDOW_TILE_HORZ);
    lstCommands.AddTail (ID_WINDOW_ARRANGE);
  }

  CMFCToolBar::SetNonPermittedCommands (lstCommands);

  if (bResetMDIChild)
  {
    // Adjust MDI child windows:
    BOOL bMaximize = !theApp.m_Options.IsMDITabsDisabled();

    HWND hwndT = ::GetWindow(m_hWndMDIClient, GW_CHILD);
    while (hwndT != NULL)
    {
      CMDIChildWndEx* pFrame = DYNAMIC_DOWNCAST(CMDIChildWndEx, CWnd::FromHandle(hwndT));
      if (pFrame != NULL)
      {
        ASSERT_VALID (pFrame);
        if (bMaximize)
        {
          pFrame->ModifyStyle(WS_SYSMENU, 0);
        }
        else
        {
          pFrame->ModifyStyle(0, WS_SYSMENU);
          pFrame->ShowWindow(SW_RESTORE);

          // Force a resize to happen on all the "restored" MDI child windows
          CRect rectFrame;
          pFrame->GetWindowRect(rectFrame);
          pFrame->SetWindowPos(NULL, -1, -1, rectFrame.Width() + 1, rectFrame.Height(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
          pFrame->SetWindowPos(NULL, -1, -1, rectFrame.Width(), rectFrame.Height(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);

          pFrame->SendMessage(AFX_WM_CHANGEVISUALMANAGER);
        }
      }

      hwndT = ::GetWindow(hwndT, GW_HWNDNEXT);
    }
    if (bMaximize)
    {
      m_wndMenuBar.SetMaximizeMode (FALSE);
    }
  }

  if (m_wndWorkSpace.IsAutoHideMode ())
  {
    m_wndWorkSpace.BringWindowToTop ();
    CPaneDivider* pSlider = m_wndWorkSpace.GetDefaultPaneDivider ();
    if (pSlider != NULL)
    {
      pSlider->BringWindowToTop ();
    }
  }

  CMDIFrameWndEx::m_bDisableSetRedraw = theApp.m_Options.m_bDisableMDIChildRedraw;

    PostMessage(UM_RECALCLAYOUT);
}

void CMainFrame::UpdateMRUFilesList ( ) [inline]

Definition at line 33 of file MainFrm.h.

  {
    m_wndTaskPane.UpdateMRUFilesList ();
  }

void CMainFrame::UpdateMRUFilesList ( ) [inline]

Definition at line 30 of file MainFrm.h.

  {
    m_wndTaskPane.UpdateMRUFilesList ();
  }

void CMainFrame::UpdateStatusBarCountPane | ( | int | nID,
 |  | CString | strText,
 |  | int | nCount |
 | ) |  |  | [private]

Definition at line 692 of file mainfrm.cpp.

{
  CMFCRibbonBaseElement* pPane = m_wndStatusBar.FindByID(nID);
  if (pPane != NULL)
  {
    if (nCount == 0)
    {
      strText += _T(": None");
    }
    else
    {
      CString strFormatted;
      strFormatted.Format(_T(": %d"), nCount);

      strText += strFormatted;
    }
    pPane->SetText(strText);
  }

}

void CALLBACK EXPORT CMainFrame::UpdateTime | ( | HWND | hWnd,
 |  | UINT | nMsg,
 |  | UINT_PTR | nIDEvent,
 |  | DWORD | dwTime |
 | ) |  |  | [static, protected]

Definition at line 213 of file mainfrm.cpp.

{
  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::UpdateUI ( CDrawView * pCurrView )

Definition at line 669 of file mainfrm.cpp.

{
  // Update Status Bar
  CDrawDoc* pCurrDoc = pCurrView->GetDocument();
  UpdateStatusBarCountPane(ID_STATUSBAR_PANE_OBJECTCOUNT, _T("Object Count"), (int) pCurrDoc->GetObjects()->GetCount());
  UpdateStatusBarCountPane(ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT, _T("Selected Count"), (int) pCurrView->m_selection.GetCount());

  m_wndStatusBar.Invalidate();
  m_wndStatusBar.UpdateWindow();
}

Friends And Related Function Documentation

friend class COle2ViewApp [friend]

Definition at line 31 of file mainfrm.h.

friend class CTasksPaneView [friend]

Definition at line 19 of file MainFrm.h.

Member Data Documentation

CStringArray CMainFrame::m_arColorThemes [protected]

Definition at line 155 of file MainFrm.h.

CRibbonListFontButton::XItems CMainFrame::m_arFonts [protected]

Definition at line 157 of file MainFrm.h.

CStringArray CMainFrame::m_arStyles [protected]

Definition at line 153 of file MainFrm.h.

CStringArray CMainFrame::m_arStyleSets [protected]

Definition at line 156 of file MainFrm.h.

CStringArray CMainFrame::m_arThemes [protected]

Definition at line 154 of file MainFrm.h.

CStringArray CMainFrame::m_astrFavoriteURLs

Definition at line 29 of file MainFrm.h.

BOOL CMainFrame::m_bCheckBox1 [protected]

Definition at line 70 of file MainFrm.h.

BOOL CMainFrame::m_bCheckBox2 [protected]

Definition at line 71 of file MainFrm.h.

BOOL CMainFrame::m_bCheckBox3 [protected]

Definition at line 72 of file MainFrm.h.

BOOL CMainFrame::m_bColor

Definition at line 23 of file mainfrm.h.

BOOL CMainFrame::m_bDialogTop [protected]

Definition at line 64 of file mainfrm.h.

BOOL CMainFrame::m_bInfiniteProgressMode [protected]

Definition at line 145 of file MainFrm.h.

BOOL CMainFrame::m_bInsert

Definition at line 38 of file mainfrm.h.

BOOL CMainFrame::m_bIsFullScreen [protected]

Definition at line 50 of file MainFrm.h.

BOOL CMainFrame::m_bIsHighColor [protected]

Definition at line 75 of file MainFrm.h.

BOOL CMainFrame::m_bMainToolbarMenu [protected]

Definition at line 74 of file MainFrm.h.

CBitmap CMainFrame::m_bmpCaption [protected]

Definition at line 39 of file MainFrm.h.

CBitmap CMainFrame::m_bmpStatus [protected]

Definition at line 29 of file MainFrm.h.

BOOL CMainFrame::m_bOutlookBar2003 [protected]

Definition at line 128 of file MainFrm.h.

BOOL CMainFrame::m_bToolTips

Definition at line 24 of file mainfrm.h.

CaptureData CMainFrame::m_CapData [private]

Definition at line 57 of file MainFrm.h.

DWORD CMainFrame::m_dwCurrentView [private]

Definition at line 89 of file MainFrm.h.

HICON CMainFrame::m_hIcon [protected]

Definition at line 42 of file mainfrm.h.

HICON CMainFrame::m_hIconDoc

Definition at line 23 of file mainfrm.h.

HICON CMainFrame::m_hIconText

Definition at line 24 of file mainfrm.h.

HICON CMainFrame::m_hIconWrite

Definition at line 25 of file mainfrm.h.

CImageList CMainFrame::m_ImagesSmall [protected]

Definition at line 123 of file MainFrm.h.

CImageList CMainFrame::m_imlStatusAnimation [protected]

Definition at line 30 of file MainFrm.h.

CList< COLORREF, COLORREF > CMainFrame::m_lstAdditionalColors [protected]

Definition at line 66 of file mainfrm.h.

CList< COLORREF, COLORREF > CMainFrame::m_lstMainColors [protected]

Definition at line 65 of file mainfrm.h.

CList< COLORREF, COLORREF > CMainFrame::m_lstStandardColors [protected]

Definition at line 67 of file mainfrm.h.

CObList CMainFrame::m_lstWorkspaces [protected]

Definition at line 125 of file MainFrm.h.

CMFCRibbonApplicationButton CMainFrame::m_MainButton [protected]

Definition at line 59 of file mainfrm.h.

CBitmap CMainFrame::m_MemBitmap [protected]

Definition at line 141 of file MainFrm.h.

CMenu CMainFrame::m_menuFavotites

Definition at line 26 of file MainFrm.h.

UINT CMainFrame::m_nAppLook [private]

Definition at line 109 of file mainfrm.h.

UINT CMainFrame::m_nCategorie [private]

Definition at line 93 of file MainFrm.h.

UINT CMainFrame::m_nCurrentExample

Definition at line 20 of file mainfrm.h.

UINT CMainFrame::m_nCurView [protected]

Definition at line 66 of file MainFrm.h.

UINT CMainFrame::m_nPaletteCol [protected]

Definition at line 63 of file mainfrm.h.

int CMainFrame::m_nPercentDone [protected]

Definition at line 20 of file mainfrm.h.

int CMainFrame::m_nProgressValue [protected]

Definition at line 144 of file MainFrm.h.

int CMainFrame::m_nProgressValue1 [protected]

Definition at line 74 of file MainFrm.h.

int CMainFrame::m_nProgressValue2 [protected]

Definition at line 75 of file MainFrm.h.

CPalette CMainFrame::m_palette

Definition at line 20 of file frame.h.

CMFCToolBarImages CMainFrame::m_PanelImages [protected]

Definition at line 62 of file mainfrm.h.

CMFCControlRenderer CMainFrame::m_Pat[4] [protected]

Definition at line 138 of file MainFrm.h.

CMFCOutlookBarPane* CMainFrame::m_pCurrOutlookPage [protected]

Definition at line 175 of file MainFrm.h.

CMFCOutlookBarTabCtrl* CMainFrame::m_pCurrOutlookWnd [protected]

Definition at line 173 of file MainFrm.h.

CWorkspaceObj* CMainFrame::m_pCurrWorkSpace [protected]

Definition at line 126 of file MainFrm.h.

CRegistryView* CMainFrame::m_pObjectView

Definition at line 56 of file mainfrm.h.

CObjTreeView* CMainFrame::m_pObjTreeView

Definition at line 55 of file mainfrm.h.

CShapePropSheetFrame* CMainFrame::m_pShapePropFrame

Definition at line 23 of file mainfrm.h.

CSourceView* CMainFrame::m_pSrcView [protected]

Definition at line 69 of file MainFrm.h.

CView* CMainFrame::m_pViews[NUMVIEWS] [protected]

Definition at line 64 of file MainFrm.h.

CHTMLEdView* CMainFrame::m_pWebView [private]

Definition at line 88 of file MainFrm.h.

CRect CMainFrame::m_rectFill [protected]

Definition at line 140 of file MainFrm.h.

CRect CMainFrame::m_rectSizing [protected]

Definition at line 142 of file MainFrm.h.

CStatusBar CMainFrame::m_StatusBar [private]

Definition at line 28 of file multipad.h.

CToolBar CMainFrame::m_ToolBar [private]

Definition at line 29 of file multipad.h.

CMap<UINT,UINT,CMFCToolBarImages*,CMFCToolBarImages*> CMainFrame::m_TooltipImages [protected]

Definition at line 88 of file MainFrm.h.

UINT CMainFrame::m_uiHilightedPage [protected]

Definition at line 114 of file MainFrm.h.

CMFCToolBarImages CMainFrame::m_UserImages [protected]

Definition at line 122 of file MainFrm.h.

CComboBoxEx CMainFrame::m_wndAddress [protected]

Definition at line 58 of file MainFrm.h.

CAddressBox CMainFrame::m_wndAddress [protected]

Definition at line 64 of file MainFrm.h.

CAnimateCtrl CMainFrame::m_wndAnimate [protected]

Definition at line 59 of file MainFrm.h.

CMyOutlookBar CMainFrame::m_wndBarOutlook [protected]

Definition at line 99 of file MainFrm.h.

CMyOutlookBar CMainFrame::m_wndBarOutlook2003 [protected]

Definition at line 100 of file MainFrm.h.

CToolBar CMainFrame::m_wndBrowseBar [protected]

Definition at line 52 of file mainfrm.h.

CCalendarBar CMainFrame::m_wndCalendar [protected]

Definition at line 106 of file MainFrm.h.

CCalendarBar CMainFrame::m_wndCalendar2003 [protected]

Definition at line 112 of file MainFrm.h.

CMFCCaptionBar CMainFrame::m_wndCaption [protected]

Definition at line 116 of file MainFrm.h.

CMSMCaptionBar CMainFrame::m_wndCaptionBar [private]

Definition at line 81 of file MainFrm.h.

CMFCCaptionBar CMainFrame::m_wndCaptionBar [protected]

Definition at line 38 of file MainFrm.h.

CMSMCategoryBar CMainFrame::m_wndCategoryBar [private]

Definition at line 84 of file MainFrm.h.

CClassViewBar CMainFrame::m_wndClassView [protected]

Definition at line 59 of file MainFrm.h.

CToolBar CMainFrame::m_wndDebugBar [protected]

Definition at line 50 of file mainfrm.h.

CPaneDialog CMainFrame::m_wndDlgBar [protected]

Definition at line 49 of file MainFrm.h.

CDialogBar CMainFrame::m_wndDlgBar [protected]

Definition at line 62 of file mainfrm.h.

CDynamicHelpViewBar CMainFrame::m_wndDynamicHelpView [protected]

Definition at line 63 of file MainFrm.h.

CEditBar CMainFrame::m_wndEditBar [protected]

Definition at line 51 of file mainfrm.h.

CEditToolbar CMainFrame::m_wndEditBar

Definition at line 56 of file MainFrm.h.

CExplorerBar CMainFrame::m_wndExplorerBar [protected]

Definition at line 72 of file MainFrm.h.

CFileViewBar CMainFrame::m_wndFileView [protected]

Definition at line 61 of file MainFrm.h.

CFolderListBar CMainFrame::m_wndFolderList [protected]

Definition at line 118 of file MainFrm.h.

CFolderBar CMainFrame::m_wndFoldersBar [protected]

Definition at line 63 of file MainFrm.h.

CFormatBar CMainFrame::m_wndFormatBar

Definition at line 51 of file mainfrm.h.

CInfoBar CMainFrame::m_wndInfoBar [protected]

Definition at line 48 of file MainFrm.h.

CLinksBar CMainFrame::m_wndLinksBar [protected]

Definition at line 68 of file MainFrm.h.

CMSMLinksBar CMainFrame::m_wndLinksBars[8] [private]

Definition at line 85 of file MainFrm.h.

CMacroDialogBar CMainFrame::m_wndMacroBar

Definition at line 27 of file MainFrm.H.

CToolBar CMainFrame::m_wndMainBar [protected]

Definition at line 48 of file mainfrm.h.

CMSMMenuBar CMainFrame::m_wndMenuBar [private]

Definition at line 82 of file MainFrm.h.

CMyMenuBar CMainFrame::m_wndMenuBar [protected]

Definition at line 47 of file MainFrm.h.

CMFCMenuBar CMainFrame::m_wndMenuBar [protected]

Definition at line 40 of file MainFrm.h.

CMFCCaptionBar CMainFrame::m_wndMessageBar [protected]

Definition at line 84 of file MainFrm.h.

CMFCOutlookBarPane CMainFrame::m_wndOutlookPane1 [protected]

Definition at line 103 of file MainFrm.h.

CMFCOutlookBarPane CMainFrame::m_wndOutlookPane12003 [protected]

Definition at line 109 of file MainFrm.h.

CMFCOutlookBarPane CMainFrame::m_wndOutlookPane2 [protected]

Definition at line 104 of file MainFrm.h.

CMFCOutlookBarPane CMainFrame::m_wndOutlookPane22003 [protected]

Definition at line 110 of file MainFrm.h.

COutputBar CMainFrame::m_wndOutput [protected]

Definition at line 63 of file MainFrm.h.

COutputViewBar CMainFrame::m_wndOutputView [protected]

Definition at line 64 of file MainFrm.h.

CToolsPalette CMainFrame::m_wndPalette [protected]

Definition at line 43 of file MainFrm.h.

CPaletteBar CMainFrame::m_wndPaletteBar [protected]

Definition at line 61 of file mainfrm.h.

CPropertiesViewBar CMainFrame::m_wndPropertiesBar [protected]

Definition at line 65 of file MainFrm.h.

CMFCReBar CMainFrame::m_wndReBar [protected]

Definition at line 54 of file MainFrm.h.

CMFCReBar CMainFrame::m_wndReBar [protected]

Definition at line 62 of file MainFrm.h.

CToolBar CMainFrame::m_wndResourceBar [protected]

Definition at line 49 of file mainfrm.h.

CResourceViewBar CMainFrame::m_wndResourceView [protected]

Definition at line 60 of file MainFrm.h.

CMFCRibbonBar CMainFrame::m_wndRibbonBar [protected]

Definition at line 58 of file mainfrm.h.

CRulerBar CMainFrame::m_wndRulerBar

Definition at line 52 of file mainfrm.h.

CMFCOutlookBar CMainFrame::m_wndShortcutsBar [protected]

Definition at line 36 of file MainFrm.h.

CMFCOutlookBarPane CMainFrame::m_wndShortcutsPane1 [protected]

Definition at line 37 of file MainFrm.h.

CToolBar CMainFrame::m_wndSizeToolBar [protected]

Definition at line 49 of file MainFrm.h.

CSplitterWndEx CMainFrame::m_wndSplitter [protected]

Definition at line 120 of file MainFrm.h.

CTCSplitter CMainFrame::m_wndSplitter

Definition at line 28 of file MainFrm.H.

CSplitterWnd CMainFrame::m_wndSplitter

Definition at line 27 of file MainFrm.h.

CMFCStatusBar CMainFrame::m_wndStatusBar [protected]

Definition at line 41 of file MainFrm.h.

CMFCStatusBar CMainFrame::m_wndStatusBar [protected]

Definition at line 41 of file mainfrm.h.

CMFCRibbonStatusBar CMainFrame::m_wndStatusBar [protected]

Definition at line 57 of file mainfrm.h.

CStyleBar CMainFrame::m_wndStyleBar [protected]

Definition at line 60 of file mainfrm.h.

CTaskPane CMainFrame::m_wndTaskPane [private]

Definition at line 86 of file MainFrm.h.

CTaskPane CMainFrame::m_wndTaskPane [protected]

Definition at line 82 of file MainFrm.h.

CMFCToolBar CMainFrame::m_wndToolBar [protected]

Definition at line 42 of file MainFrm.h.

CComboToolBar CMainFrame::m_wndToolBar

Definition at line 21 of file mainfrm.h.

CMFCToolBar CMainFrame::m_wndToolBar [protected]

Definition at line 42 of file mainfrm.h.

CMSMToolBar CMainFrame::m_wndToolBar [private]

Definition at line 83 of file MainFrm.h.

CMFCToolBar CMainFrame::m_wndToolBarAdvanced [protected]

Definition at line 96 of file MainFrm.h.

CMFCToolBar CMainFrame::m_wndToolbarBuild [protected]

Definition at line 55 of file MainFrm.h.

CMFCToolBar CMainFrame::m_wndToolbarEdit [protected]

Definition at line 56 of file MainFrm.h.

CMFCDropDownToolBar CMainFrame::m_wndToolbarResource [protected]

Definition at line 57 of file MainFrm.h.

CToolBar CMainFrame::m_wndToolBarSpiro

Definition at line 50 of file MainFrm.h.

CMFCToolBar CMainFrame::m_wndToolBarTheme [protected]

Definition at line 46 of file MainFrm.h.

CMFCToolBar CMainFrame::m_wndToolBarWeb [protected]

Definition at line 97 of file MainFrm.h.

CShellTreeCtrl CMainFrame::m_wndTree [protected]

Definition at line 105 of file MainFrm.h.

CShellTreeCtrl CMainFrame::m_wndTree2003 [protected]

Definition at line 111 of file MainFrm.h.

CChildView CMainFrame::m_wndView [protected]

Definition at line 46 of file MainFrm.h.

CWatchBar CMainFrame::m_wndWatchBar [protected]

Definition at line 67 of file MainFrm.h.

CWorkspaceBar CMainFrame::m_wndWorkSpace [protected]

Definition at line 47 of file MainFrm.h.

CWorkspaceBar2 CMainFrame::m_wndWorkSpace2 [protected]

Definition at line 50 of file MainFrm.h.

WINDOWPLACEMENT CMainFrame::m_wpPrev [protected]

Definition at line 51 of file MainFrm.h.

The documentation for this class was generated from the following files:
  • advanced/collect/mainfrm.h
  • advanced/cube/mainfrm.h
  • advanced/dllhusk/mainfrm.h
  • advanced/DllScreenCap/ScreenCap/MainFrm.h
  • advanced/mtrecalc/mainfrm.h
  • controls/contain/mainfrm.h
  • general/ctrlbars/mainfrm.h
  • general/DBVList/MainFrm.h
  • general/diblook/mainfrm.h
  • general/docktool/mainfrm.h
  • general/dynamenu/mainfrm.h
  • general/mdidocvw/mainfrm.h
  • general/MMXSwarm/MainFrm.h
  • general/multipad/multipad.h
  • general/npp/mainfrm.h
  • general/propdlg/mainfrm.h
  • general/rowlist/mainfrm.h
  • general/Scribble/mainfrm.h
  • general/SimpleImage/MainFrm.h
  • general/snapvw/mainfrm.h
  • general/spiro/MainFrm.h
  • general/tracker/mainfrm.h
  • internet/HTMLEdit/MainFrm.h
  • internet/MFCIE/MainFrm.h
  • ole/acdual/mainfrm.h
  • ole/autoclik/mainfrm.h
  • ole/drawcli/mainfrm.h
  • ole/hiersvr/mainfrm.h
  • ole/ipdrive/mainfrm.h
  • ole/MFCBind/MainFrm.h
  • ole/oclient/frame.h
  • ole/oleview/mainfrm.h
  • ole/superpad/mainfrm.h
  • ole/TstCon/MainFrm.H
  • ole/wordpad/mainfrm.h
  • vc2008fp/CustomPages/MainFrm.h
  • vc2008fp/DrawClient/mainfrm.h
  • vc2008fp/DynamicMenu/MainFrm.h
  • vc2008fp/Explorer/MainFrm.h
  • vc2008fp/IEDemo/MainFrm.h
  • vc2008fp/MDITabsDemo/MainFrm.h
  • vc2008fp/MenuSubSet/MainFrm.h
  • vc2008fp/MSMoneyDemo/MainFrm.h
  • vc2008fp/MSOffice2007Demo/MainFrm.h
  • vc2008fp/OutlookDemo/MainFrm.h
  • vc2008fp/OutlookMultiViews/MainFrm.h
  • vc2008fp/OwnerDrawMenu/MainFrm.h
  • vc2008fp/PaletteDemo/MainFrm.h
  • vc2008fp/RebarTest/MainFrm.h
  • vc2008fp/RibbonGadgets/MainFrm.h
  • vc2008fp/RibbonMDI/MainFrm.h
  • vc2008fp/RollupPane/MainFrm.h
  • vc2008fp/SetPaneSize/MainFrm.h
  • vc2008fp/Slider/MainFrm.h
  • vc2008fp/StateCollection/MainFrm.h
  • vc2008fp/StatusBarDemo/MainFrm.h
  • vc2008fp/TabbedView/MainFrm.h
  • vc2008fp/TabControl/MainFrm.h
  • vc2008fp/TasksPane/MainFrm.h
  • vc2008fp/ToolbarDateTimePicker/MainFrm.h
  • vc2008fp/ToolTipDemo/MainFrm.h
  • vc2008fp/VisualStudioDemo/MainFrm.h
  • vc2008fp/WordPad/MainFrm.h
  • vc2008fp/WorkSpaceToolBar/MainFrm.h
  • advanced/mtgdi/mainfrm.h
  • advanced/mtmdi/mainfrm.h
  • general/mdi/mainfrm.h
  • advanced/collect/mainfrm.cpp
  • advanced/cube/mainfrm.cpp
  • advanced/dllhusk/mainfrm.cpp
  • advanced/DllScreenCap/ScreenCap/MainFrm.cpp
  • advanced/mtgdi/mainfrm.cpp
  • advanced/mtmdi/mainfrm.cpp
  • advanced/mtrecalc/mainfrm.cpp
  • controls/contain/mainfrm.cpp
  • general/ctrlbars/mainfrm.cpp
  • general/DBVList/MainFrm.cpp
  • general/diblook/mainfrm.cpp
  • general/docktool/mainfrm.cpp
  • general/dynamenu/mainfrm.cpp
  • general/mdi/mainfrm.cpp
  • general/mdidocvw/mainfrm.cpp
  • general/MMXSwarm/MainFrm.cpp
  • general/multipad/multipad.cpp
  • general/npp/mainfrm.cpp
  • general/propdlg/mainfrm.cpp
  • general/rowlist/mainfrm.cpp
  • general/Scribble/mainfrm.cpp
  • general/SimpleImage/MainFrm.cpp
  • general/snapvw/mainfrm.cpp
  • general/spiro/MainFrm.cpp
  • general/tracker/mainfrm.cpp
  • internet/HTMLEdit/MainFrm.cpp
  • internet/MFCIE/MainFrm.cpp
  • ole/acdual/mainfrm.cpp
  • ole/autoclik/mainfrm.cpp
  • ole/drawcli/mainfrm.cpp
  • ole/hiersvr/mainfrm.cpp
  • ole/ipdrive/mainfrm.cpp
  • ole/MFCBind/MainFrm.cpp
  • ole/oclient/frame.cpp
  • ole/oleview/mainfrm.cpp
  • ole/superpad/mainfrm.cpp
  • ole/TstCon/MainFrm.Cpp
  • ole/wordpad/mainfrm.cpp
  • vc2008fp/CustomPages/MainFrm.cpp
  • vc2008fp/DrawClient/mainfrm.cpp
  • vc2008fp/DynamicMenu/MainFrm.cpp
  • vc2008fp/Explorer/MainFrm.cpp
  • vc2008fp/IEDemo/MainFrm.cpp
  • vc2008fp/MDITabsDemo/MainFrm.cpp
  • vc2008fp/MenuSubSet/MainFrm.cpp
  • vc2008fp/MSMoneyDemo/MainFrm.cpp
  • vc2008fp/MSOffice2007Demo/MainFrm.cpp
  • vc2008fp/OutlookDemo/MainFrm.cpp
  • vc2008fp/OutlookMultiViews/MainFrm.cpp
  • vc2008fp/OwnerDrawMenu/MainFrm.cpp
  • vc2008fp/PaletteDemo/MainFrm.cpp
  • vc2008fp/RebarTest/MainFrm.cpp
  • vc2008fp/RibbonGadgets/MainFrm.cpp
  • vc2008fp/RibbonMDI/MainFrm.cpp
  • vc2008fp/RollupPane/MainFrm.cpp
  • vc2008fp/SetPaneSize/MainFrm.cpp
  • vc2008fp/Slider/MainFrm.cpp
  • vc2008fp/StateCollection/MainFrm.cpp
  • vc2008fp/StatusBarDemo/MainFrm.cpp
  • vc2008fp/TabbedView/MainFrm.cpp
  • vc2008fp/TabControl/MainFrm.cpp
  • vc2008fp/TasksPane/MainFrm.cpp
  • vc2008fp/ToolbarDateTimePicker/MainFrm.cpp
  • vc2008fp/ToolTipDemo/MainFrm.cpp
  • vc2008fp/VisualStudioDemo/MainFrm.cpp
  • vc2008fp/WordPad/mainfrm.cpp
  • vc2008fp/WorkSpaceToolBar/MainFrm.cpp
Generated on Sat Nov 23 2024 17:01:00 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMainFrame::XStyle Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CMainFrame
  • CMainFrame::XStyle
Public Attributes

CMainFrame::XStyle Struct Reference

#include "mainfrm.h"

List of all members.

Public Attributes

COLORREF | clrFill
COLORREF | clrLine

Detailed Description

Definition at line 21 of file mainfrm.h.

Member Data Documentation

COLORREF CMainFrame::XStyle::clrFill

Definition at line 23 of file mainfrm.h.

COLORREF CMainFrame::XStyle::clrLine

Definition at line 24 of file mainfrm.h.

The documentation for this struct was generated from the following file:
  • vc2008fp/DrawClient/mainfrm.h
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMainView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

CMainView Class Reference

#include "mainview.h"

List of all members.

Public Member Functions

virtual | ~CMainView ()
void | ClientToDoc (CSize &sz)
void | ClientToDoc (CRect &rc)
void | ClientToDoc (CPoint &pt)
void | DocToClient (CPoint &pt)
void | DocToClient (CSize &sz)
void | DocToClient (CRect &rc)
CRectItem * | DoPasteItem (BOOL bLink, COleDataObject *pDataObject, CPoint *pPoint, CLIPFORMAT cfFormat=0)
CMainDoc * GetDocument ()
CRectItem * | GetSelection () const
virtual DROPEFFECT | OnDragEnter (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual void | OnDragLeave ()
virtual DROPEFFECT | OnDragOver (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual void | OnDraw (CDC *pDC)
virtual BOOL | OnDrop (COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point)
virtual void | OnInitialUpdate ()
virtual void | OnPrepareDC (CDC *pDC, CPrintInfo *pInfo=NULL)
virtual BOOL | OnScrollBy (CSize sizeScroll, BOOL bDoScroll=TRUE)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
void | SetSelection (CRectItem *pNewSel, BOOL bSafeSelect=FALSE)
void | UpdateActiveItem ()

Protected Member Functions

CMainView ()
BOOL | DoCopySelection ()
void | DoPasteNative (COleDataObject *pDataObject, CPoint *pPoint, CRectItem *pItem)
void | DoPasteStandard (BOOL bLink, COleDataObject *pDataObject, CPoint *pPoint, CRectItem *pItem, CLIPFORMAT cfFormat=0)
CRectItem * | GetHitItem (CPoint point)
BOOL | GetObjectInfo (COleDataObject *pDataObject, CSize *pSize, CSize *pOffset)
void | InvalidateItem (CRectItem *pItem)
virtual BOOL | IsSelected (const CObject *pDocItem) const
afx_msg void | OnCancelInplace ()
afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnEditClear ()
afx_msg void | OnEditClone ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnInsertObject ()
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnObjectDisplayAsIcon ()
afx_msg void | OnObjectDisplayContent ()
afx_msg void | OnObjectResetsize ()
afx_msg void | OnOleChangeSource ()
afx_msg void | OnOleEditProperties ()
afx_msg void | OnPaste ()
afx_msg void | OnPasteLink ()
afx_msg void | OnPasteSpecial ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnUpdateEditClone (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditMenu (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditPaste (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectDisplayAsIcon (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectDisplayContent (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOleChangeSource (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOleEditProperties (CCmdUI *pCmdUI)
void | SetupTracker (CRectTracker *pTracker, CRectItem *pItem, CRect *pTrueRect=NULL)

Protected Attributes

BOOL | m_bInDrag
CSize | m_dragOffset
CPoint | m_dragPoint
CSize | m_dragSize
COleDropTarget | m_dropTarget
DROPEFFECT | m_prevDropEffect
CRectItem * m_pSelection

Static Protected Attributes

static CBrush NEAR | m_brHatch
static CLIPFORMAT | m_cfObjectDescriptor = NULL

Detailed Description

Definition at line 15 of file mainview.h.

Constructor & Destructor Documentation

CMainView::CMainView ( ) [protected]

Definition at line 78 of file mainview.cpp.

{
  if (m_brHatch.m_hObject == NULL)
    m_brHatch.CreateHatchBrush(HS_DIAGCROSS, RGB(0,0,0));
  if (m_cfObjectDescriptor == NULL)
    m_cfObjectDescriptor =
      (CLIPFORMAT)::RegisterClipboardFormat(_T("Object Descriptor"));

  m_pSelection = NULL;
  m_prevDropEffect = DROPEFFECT_NONE;
  m_bInDrag = FALSE;
}

CMainView::~CMainView ( ) [virtual]

Definition at line 91 of file mainview.cpp.

{
}

Member Function Documentation

void CMainView::ClientToDoc ( CRect & rc )

Definition at line 673 of file mainview.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc);
  dc.DPtoLP(&rect); // convert device rect to logical rect
}

void CMainView::ClientToDoc ( CSize & sz )

Definition at line 689 of file mainview.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc);
  dc.DPtoLP(&size); // convert device rect to logical rect
  size.cx = abs(size.cx);
  size.cy = abs(size.cy);
}

void CMainView::ClientToDoc ( CPoint & pt )

Definition at line 705 of file mainview.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc);
  dc.DPtoLP(&point); // convert device point to logical point
}

BOOL CMainView::DoCopySelection ( ) [protected]
void CMainView::DocToClient ( CPoint & pt )

Definition at line 698 of file mainview.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc);
  dc.LPtoDP(&point); // convert logical point to device point
}

void CMainView::DocToClient ( CSize & sz )

Definition at line 680 of file mainview.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc);
  dc.LPtoDP(&size); // convert logical size to device size
  size.cx = abs(size.cx);
  size.cy = abs(size.cy);
}

void CMainView::DocToClient ( CRect & rc )

Definition at line 665 of file mainview.cpp.

{
  CClientDC dc(this);
  OnPrepareDC(&dc);
  dc.LPtoDP(&rect); // convert logical rect to device rect
  rect.NormalizeRect();
}

CRectItem * CMainView::DoPasteItem | ( | BOOL | bLink,
 |  | COleDataObject * | pDataObject,
 |  | CPoint * | pPoint,
 |  | CLIPFORMAT | cfFormat = 0
 | ) |  |

Definition at line 511 of file mainview.cpp.

{
  BeginWaitCursor();

  CRectItem* pItem = GetDocument()->CreateItem();
  ASSERT_VALID(pItem);
  BOOL bAllowAdjust = (pPoint == NULL) ? TRUE : FALSE;

  // use clipboard data if not doing drag/drop
  COleDataObject clipboardData;
  if (pDataObject == NULL)
  {
    clipboardData.AttachClipboard();
    pDataObject = &clipboardData;
  }

  TRY
  {
    if (cfFormat == CMainDoc::m_cfPrivate)
    {
      // if format specified (i.e. PasteSpecial) then use that one
      DoPasteNative(pDataObject, pPoint, pItem);
    }
    else if (!bLink && cfFormat == 0 &&
      pDataObject->IsDataAvailable(CMainDoc::m_cfPrivate))
    {
      // if we're not pasting a link, cfFormat was unspecified,
      // and private format is available use it
      DoPasteNative(pDataObject, pPoint, pItem);
    }
    // otherwise perform a standard paste
    else if (bAllowAdjust)
    {
      CPoint ptDef(10, -10);
      DoPasteStandard(bLink, pDataObject, &ptDef, pItem, cfFormat);
    }
    else
    {
      DoPasteStandard(bLink, pDataObject, pPoint, pItem, cfFormat);
    }

    if (bAllowAdjust)
    {
      // allow document to adjust position of item so that it doesn't
      // lay directly over an item of the same size
      // this only occurs if the drop point is not specified
      GetDocument()->AdjustItemPosition(pItem);
    }
  }
  CATCH_ALL(e)
  {
    // general cleanup
    TRACE0("failed to embed/link an OLE object\n");
    pItem->Delete();
    pItem = NULL;
  }
  END_CATCH_ALL

  // set the selection with bSafeSelect = TRUE
  SetSelection(pItem, TRUE);

  // update the document and views
  GetDocument()->SetModifiedFlag();
  GetDocument()->UpdateAllViews(NULL, 0, pItem);      // including this view

  EndWaitCursor();

  return pItem;
}

void CMainView::DoPasteNative | ( | COleDataObject * | pDataObject,
 |  | CPoint * | pPoint,
 |  | CRectItem * | pItem |
 | ) |  |  | [protected]

Definition at line 396 of file mainview.cpp.

{
  // get file refering to clipboard data
  CFile* pFile = pDataObject->GetFileData(CMainDoc::m_cfPrivate);
  if (pFile == NULL)
    {
    // if the file failed to open, throw an exception
    // to force cleanup in DoPasteItem.  the exact
    // type of exception thrown here is unimportant...

    AfxThrowFileException(CFileException::genericException);
    }

  CArchive ar(pFile, CArchive::load);
  TRY
  {
    // connect the file to an archive and read the data
    ar.m_pDocument = GetDocument(); // for COleClientItem serialize
    pItem->Serialize(ar);
  }
  CATCH_ALL(e)
  {
    ar.Close();
    delete pFile;
    THROW_LAST();
  }
  END_CATCH_ALL

  ar.Close();
  delete pFile;

  // adjust position to that specified by point
  if (pPoint != NULL)
    pItem->m_ptPos = *pPoint;
}

void CMainView::DoPasteStandard | ( | BOOL | bLink,
 |  | COleDataObject * | pDataObject,
 |  | CPoint * | pPoint,
 |  | CRectItem * | pItem,
 |  | CLIPFORMAT | cfFormat = 0 |
 | ) |  |  | [protected]

Definition at line 433 of file mainview.cpp.

{
  if (bLink)      // paste link
  {
    if (!pItem->CreateLinkFromData(pDataObject))
      AfxThrowMemoryException();  // any exception will do
  }
  // paste embedded
  else if (!pItem->CreateFromData(pDataObject) &&
    !pItem->CreateStaticFromData(pDataObject, OLERENDER_DRAW, cfFormat))
  {
    AfxThrowMemoryException();      // any exception will do
  }

  // copy the current iconic representation
  FORMATETC fmtetc;
  fmtetc.cfFormat = CF_METAFILEPICT;
  fmtetc.dwAspect = DVASPECT_ICON;
  fmtetc.ptd = NULL;
  fmtetc.tymed = TYMED_MFPICT;
  fmtetc.lindex = 1;
  HGLOBAL hObj = pDataObject->GetGlobalData(CF_METAFILEPICT, &fmtetc);
  if (hObj != NULL)
  {
    pItem->SetIconicMetafile(hObj);
    // the following code is an easy way to free a metafile pict
    STGMEDIUM stgMed;
    memset(&stgMed, 0, sizeof(stgMed));
    stgMed.tymed = TYMED_MFPICT;
    stgMed.hGlobal = hObj;
    ReleaseStgMedium(&stgMed);
  }

  // set the current drawing aspect
  hObj = pDataObject->GetGlobalData(m_cfObjectDescriptor);
  if (hObj != NULL)
  {
    ASSERT(hObj != NULL);
    // got CF_OBJECTDESCRIPTOR ok.  Lock it down and extract size.
    LPOBJECTDESCRIPTOR pObjDesc = (LPOBJECTDESCRIPTOR)GlobalLock(hObj);
    ENSURE(pObjDesc != NULL);
    pItem->SetDrawAspect((DVASPECT)pObjDesc->dwDrawAspect);
    GlobalUnlock(hObj);
    GlobalFree(hObj);
  }

  // set top-left based on point of drop
  if (pPoint != NULL)
    pItem->m_ptPos = *pPoint;

  // get size from drag/drop operation
  CSize size;
  if (GetObjectInfo(pDataObject, &size, NULL) && size.cx != 0 && size.cy != 0)
  {
    // use size obtained from object instead of default
    size.cx = MulDiv(size.cx, 10, 254);
    size.cy = -MulDiv(size.cy, 10, 254);
    pItem->SetSize(size);
    CSize sizeExtent;
    pItem->GetCachedExtent(&sizeExtent);
    pItem->SetBaseSize(sizeExtent);
  }
  else
  {
    // no extent from CF_OBJECTDESCRIPTOR, use extent from object
    pItem->UpdateExtent();
  }
}

CMainDoc* CMainView::GetDocument ( ) [inline]

Definition at line 23 of file mainview.h.

  {
    ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
    return (CMainDoc*) m_pDocument;
  }

CRectItem * CMainView::GetHitItem ( CPoint point ) [protected]

Definition at line 641 of file mainview.cpp.

{
  CMainDoc* pDoc = GetDocument();
  CRectItem* pItemHit = NULL;

  // Find the item hit by the mouse
  POSITION pos = pDoc->GetStartPosition();
  while (pos != NULL)
  {
    CRectItem* pItem = DYNAMIC_DOWNCAST(CRectItem, pDoc->GetNextItem(pos));
    if (pItem != NULL)
    {
      CRectTracker tracker;
      SetupTracker(&tracker, pItem);
      if (tracker.HitTest(point) >= 0)
      {
        pItemHit = pItem;
        // items later in the list are drawn on top - so keep looking
      }
    }
  }
  return pItemHit;
}

BOOL CMainView::GetObjectInfo | ( | COleDataObject * | pDataObject,
 |  | CSize * | pSize,
 |  | CSize * | pOffset |
 | ) |  |  | [protected]

Definition at line 890 of file mainview.cpp.

{
  ENSURE(pSize != NULL);

  // get object descriptor data
  HGLOBAL hObjDesc = pDataObject->GetGlobalData(m_cfObjectDescriptor);
  if (hObjDesc == NULL)
  {
    if (pOffset != NULL)
      *pOffset = CSize(0, 0); // fill in defaults instead
    *pSize = CSize(0, 0);
    return FALSE;
  }
  ASSERT(hObjDesc != NULL);

  // otherwise, got CF_OBJECTDESCRIPTOR ok.  Lock it down and extract size.
  LPOBJECTDESCRIPTOR pObjDesc = (LPOBJECTDESCRIPTOR)GlobalLock(hObjDesc);
  ENSURE(pObjDesc != NULL);
  pSize->cx = (int)pObjDesc->sizel.cx;
  pSize->cy = (int)pObjDesc->sizel.cy;
  if (pOffset != NULL)
  {
    pOffset->cx = (int)pObjDesc->pointl.x;
    pOffset->cy = (int)pObjDesc->pointl.y;
  }
  GlobalUnlock(hObjDesc);
  GlobalFree(hObjDesc);

  // successfully retrieved pSize & pOffset info
  return TRUE;
}

CRectItem* CMainView::GetSelection ( ) const [inline]

Definition at line 29 of file mainview.h.

    { return m_pSelection; } // Just the top-most window

void CMainView::InvalidateItem ( CRectItem * pItem ) [protected]

Definition at line 248 of file mainview.cpp.

{
  if (m_nMapMode != 0)
  {
    CRectTracker tracker;
    CRect rect;
    SetupTracker(&tracker, pItem, &rect);
    InvalidateRect(&rect);
  }
}

BOOL CMainView::IsSelected ( const CObject * pDocItem ) const [protected, virtual]

Definition at line 296 of file mainview.cpp.

{
  return (pDocItem == m_pSelection);
}

void CMainView::OnCancelInplace ( ) [protected]

Definition at line 1186 of file mainview.cpp.

{
  // deactivate the inplace active item on this frame/view
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL)
    pActiveItem->Deactivate();
  ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
}

void CMainView::OnChar | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 803 of file mainview.cpp.

{
  MessageBeep(0);     // to test for proper focus transfer

  CScrollView::OnChar(nChar, nRepCnt, nFlags);
}

int CMainView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 838 of file mainview.cpp.

{
  if (CScrollView::OnCreate(lpCreateStruct) == -1)
    return -1;

  // register drop target
  m_dropTarget.Register(this);

  return 0;
}

void CMainView::OnDestroy ( void ) [protected]

Definition at line 1195 of file mainview.cpp.

{
  CScrollView::OnDestroy();

  // deactivate the inplace active item on this view
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
  {
    pActiveItem->Deactivate();
    ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
  }
}

DROPEFFECT CMainView::OnDragEnter | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 923 of file mainview.cpp.

{
  ASSERT(m_prevDropEffect == DROPEFFECT_NONE);

  GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
  CClientDC dc(NULL);
  dc.HIMETRICtoDP(&m_dragSize);
  dc.HIMETRICtoDP(&m_dragOffset);

  return OnDragOver(pDataObject, grfKeyState, point);
}

void CMainView::OnDragLeave ( ) [virtual]

Definition at line 990 of file mainview.cpp.

{
  CClientDC dc(this);
  if (m_prevDropEffect != DROPEFFECT_NONE)
  {
    dc.DrawFocusRect(CRect(m_dragPoint,m_dragSize)); // erase previous focus rect
    m_prevDropEffect = DROPEFFECT_NONE;
  }
}

DROPEFFECT CMainView::OnDragOver | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 936 of file mainview.cpp.

{
  point -= m_dragOffset;  // adjust target rect by original cursor offset

  // check for point outside logical area -- i.e. in hatched region
  // GetTotalSize() returns the size passed to SetScrollSizes
  CRect rectScroll(CPoint(0, 0), GetTotalSize());

  CRect rectItem(point,m_dragSize);
  if (rectItem.IsRectEmpty())
  {
    // some apps might have a null size in the object descriptor...
    rectItem.InflateRect(1,1);
  }
  rectItem.OffsetRect(GetDeviceScrollPosition());

  DROPEFFECT de = DROPEFFECT_NONE;
  CRect rectTemp;
  if (rectTemp.IntersectRect(rectScroll, rectItem))
  {
    // check for force link
    if ((grfKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
      de = DROPEFFECT_LINK;
    // check for force copy
    else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
      de = DROPEFFECT_COPY;
    // check for force move
    else if ((grfKeyState & MK_ALT) == MK_ALT)
      de = DROPEFFECT_MOVE;
    // default -- recommended action is move
    else
      de = DROPEFFECT_MOVE;
  }

  if (point == m_dragPoint)
    return de;

  // otherwise, cursor has moved -- need to update the drag feedback
  CClientDC dc(this);
  if (m_prevDropEffect != DROPEFFECT_NONE)
  {
    // erase previous focus rect
    dc.DrawFocusRect(CRect(m_dragPoint, m_dragSize));
  }
  m_prevDropEffect = de;
  if (m_prevDropEffect != DROPEFFECT_NONE)
  {
    m_dragPoint = point;
    dc.DrawFocusRect(CRect(point, m_dragSize));
  }
  return de;
}

void CMainView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 161 of file mainview.cpp.

{
  CMainDoc* pDoc = GetDocument();

  ASSERT_VALID(pDC);

  if (!pDC->IsPrinting())
  {
    m_brHatch.UnrealizeObject();
    CPoint point(0, 0);
    pDC->LPtoDP(&point);
    pDC->SetBrushOrg(point.x % 8, point.y % 8);

    CRect rcClip;
    GetClientRect(&rcClip);
    ClientToDoc(rcClip);
    CSize docSize = pDoc->GetDocumentSize();
    if (rcClip.right > docSize.cx)
    {
      CRect rcFill(rcClip);
      rcFill.left = max(rcFill.left,docSize.cx);
      pDC->FillRect(rcFill,&m_brHatch);
    }
    if (rcClip.bottom < -docSize.cy)
    {
      CRect rcFill(rcClip);
      rcFill.top = min(rcFill.top, -docSize.cy);
      pDC->FillRect(rcFill,&m_brHatch);
    }
  }

  // Draw all the CRectItems
  POSITION pos = pDoc->GetStartPosition();
  while (pos != NULL)
  {
    CRectItem* pItem = DYNAMIC_DOWNCAST(CRectItem, pDoc->GetNextItem(pos));
    if (pItem != NULL)
    {
      pItem->Draw(pDC, pItem->GetRect());

      if (!pDC->IsPrinting())
      {
        // draw the tracker
        CRectTracker tracker;
        CRect rectTrue;
        SetupTracker(&tracker, pItem, &rectTrue);
        ClientToDoc(rectTrue);
        if (pDC->RectVisible(&rectTrue))
          tracker.Draw(pDC);
      }
    }
  }
}

BOOL CMainView::OnDrop | ( | COleDataObject * | pDataObject,
 |  | DROPEFFECT | dropEffect,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 849 of file mainview.cpp.

{
  ASSERT_VALID(this);

  // clean up focus rect
  OnDragLeave();

  // offset point as appropriate for dragging
  GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
  CClientDC dc(NULL);
  dc.HIMETRICtoDP(&m_dragSize);
  dc.HIMETRICtoDP(&m_dragOffset);
  point -= m_dragOffset;

  // if move within the view
  ClientToDoc(point);
  if ((dropEffect & DROPEFFECT_MOVE) && m_bInDrag)
  {
    ASSERT(m_pSelection != NULL);
    m_bInDrag = FALSE; // signal drag code that a move happened
    // set top-left based on point of drop
    CRect rect = m_pSelection->GetRect();
    if (rect.TopLeft() != point) // if moved
    {
      CRect cr(point,rect.Size());
      m_pSelection->Move(cr);
      GetDocument()->SetModifiedFlag();
    }
  }
  // check and paste link
  else if ((dropEffect & DROPEFFECT_LINK) && DoPasteItem(TRUE, pDataObject, &point))
    return TRUE;

  // paste embedding/static
  else if (DoPasteItem(FALSE, pDataObject, &point))
    return TRUE;

  return FALSE;
}

void CMainView::OnEditClear ( ) [protected]

Definition at line 378 of file mainview.cpp.

{
  if (m_pSelection != NULL)
    GetDocument()->DeleteItem(m_pSelection);
}

void CMainView::OnEditClone ( ) [protected]

Definition at line 1073 of file mainview.cpp.

{
  if (m_pSelection == NULL)
    return;

  BeginWaitCursor();

  CRectItem* pItem = NULL;
  TRY
  {
    // create item from dialog results
    pItem = GetDocument()->CreateItem();
    if (!pItem->CreateCloneFrom(m_pSelection))
      AfxThrowMemoryException();  // any exception will do

    // offset it so we can see the clone easier
    CRect rect(20, 20, 0, 0);
    ClientToDoc(rect);
    pItem->m_ptPos.x += rect.left;
    pItem->m_ptPos.y += rect.top;
    ASSERT_VALID(pItem);
  }
  CATCH_ALL(e)
  {
    // cleanup item, if allocated
    if (pItem != NULL)
      GetDocument()->DeleteItem(pItem);

    AfxMessageBox(IDP_FAILED_TO_CREATE);
  }
  END_CATCH_ALL

  EndWaitCursor();
}

void CMainView::OnEditCopy ( ) [protected]

Definition at line 364 of file mainview.cpp.

{
  ENSURE(m_pSelection != NULL);
  TRY
  {
    m_pSelection->CopyToClipboard(TRUE);
  }
  CATCH_ALL(e)
  {
    AfxMessageBox(IDP_CLIPBOARD_COPY_FAILED);
  }
  END_CATCH_ALL
}

void CMainView::OnEditCut ( ) [protected]

Definition at line 349 of file mainview.cpp.

{
  ENSURE(m_pSelection != NULL);
  TRY
  {
    m_pSelection->CopyToClipboard(TRUE);
    OnEditClear();
  }
  CATCH_ALL(e)
  {
    AfxMessageBox(IDP_CLIPBOARD_CUT_FAILED);
  }
  END_CATCH_ALL
}

void CMainView::OnInitialUpdate ( ) [virtual]

Definition at line 95 of file mainview.cpp.

{
  CScrollView::OnInitialUpdate();

  // We can't pass MM_ANISOTROPIC to SetScrollSizes so we have to convert to MM_TEXT
  CSize size = GetDocument()->GetDocumentSize();
  CClientDC dc(NULL);
  size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
  size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
  SetScrollSizes(MM_TEXT, size);
}

void CMainView::OnInsertObject ( ) [protected]

Definition at line 585 of file mainview.cpp.

{
  COleInsertDialog dlg;
  if (dlg.DoModal() != IDOK)
    return;

  BeginWaitCursor();

  CRectItem* pItem = NULL;
  TRY
  {
    // create item from dialog results
    pItem = GetDocument()->CreateItem();
    if (!dlg.CreateItem(pItem))
      AfxThrowMemoryException();  // any exception will do

    // try to get initial presentation data
    pItem->UpdateLink();
    pItem->UpdateExtent();

    // if insert new object -- initially show the object
    if (dlg.GetSelectionType() == COleInsertDialog::createNewItem)
      pItem->DoVerb(OLEIVERB_SHOW, this);

    SetSelection(pItem);
  }
  CATCH_ALL(e)
  {
    // cleanup item, if allocated
    if (pItem != NULL)
      GetDocument()->DeleteItem(pItem);

    AfxMessageBox(IDP_FAILED_TO_CREATE);
  }
  END_CATCH_ALL

  EndWaitCursor();
}

void CMainView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 624 of file mainview.cpp.

{
  // Double click will activate the main verb
  if (m_pSelection != NULL)
  {
    BeginWaitCursor();
    LONG iVerb = OLEIVERB_PRIMARY;
    if (GetKeyState(VK_CONTROL) < 0)
      iVerb = OLEIVERB_OPEN;
    m_pSelection->DoVerb(iVerb, this);
    EndWaitCursor();
  }
}

void CMainView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 712 of file mainview.cpp.

{
  CRectItem* pItemHit = GetHitItem(point);
  SetSelection(pItemHit);
  if (pItemHit == NULL)
    return;

  CRect rectLimit;
  GetClientRect(rectLimit);

  CRectTracker tracker;
  SetupTracker(&tracker, pItemHit);

  UpdateWindow(); // update before entering the tracker
  if (tracker.HitTest(point) == CRectTracker::hitMiddle) // moving, not sizing
  {
    // determine mouse position offset from the item itself
    CRect rect = pItemHit->GetRect();
    DocToClient(rect);
    CPoint ptOffset(point.x - rect.left, point.y - rect.top);

    // determine sensitivity rectangle (determines when drag starts)
    CRect rectDrag(rect.left, rect.top, rect.left+1, rect.top+1);

    // execute the drag/drop operation
    m_bInDrag = TRUE;
    ClientToScreen(&rect);  // must be in screen co-ordinates
    ClientToScreen(&rectDrag);
    DROPEFFECT dropEffect = pItemHit->DoDragDrop(rect, ptOffset,
      TRUE, DROPEFFECT_COPY|DROPEFFECT_MOVE, &rectDrag);
    if (m_bInDrag == FALSE) // move in same window
      return;
    m_bInDrag = FALSE;

    if (dropEffect == DROPEFFECT_MOVE)
    {
      // the item was moved (essentially a copy w/delete)
      pItemHit->Invalidate();
      if (m_pSelection == pItemHit)
        m_pSelection = NULL;
      GetDocument()->DeleteItem(pItemHit);
    }
  }
  else if (tracker.Track(this, point))
  {
    ClientToDoc(tracker.m_rect);
    pItemHit->Move(tracker.m_rect);
    GetDocument()->SetModifiedFlag();
  }
}

void CMainView::OnObjectDisplayAsIcon ( ) [protected]

Definition at line 1026 of file mainview.cpp.

{
  if (m_pSelection == NULL)
    return;
  ASSERT_VALID(m_pSelection);
  m_pSelection->Invalidate();
  m_pSelection->SetDrawAspect(DVASPECT_ICON);
  m_pSelection->UpdateExtent();
  m_pSelection->Invalidate();
}

void CMainView::OnObjectDisplayContent ( ) [protected]

Definition at line 1003 of file mainview.cpp.

{
  if (m_pSelection == NULL)
    return;
  ASSERT_VALID(m_pSelection);
  m_pSelection->Invalidate();
  m_pSelection->SetDrawAspect(DVASPECT_CONTENT);
  m_pSelection->UpdateExtent();
  m_pSelection->Invalidate();
}

void CMainView::OnObjectResetsize ( ) [protected]

Definition at line 1180 of file mainview.cpp.

{
  ENSURE(m_pSelection != NULL);
  m_pSelection->ResetSize();
}

void CMainView::OnOleChangeSource ( ) [protected]

Definition at line 1263 of file mainview.cpp.

{
  ASSERT(m_pSelection != NULL && m_pSelection->GetType() == OT_LINK);

  COleChangeSourceDialog dlg(m_pSelection);
  dlg.DoModal();
}

void CMainView::OnOleEditProperties ( ) [protected]

Definition at line 1250 of file mainview.cpp.

{
  ASSERT(m_pSelection != NULL);

  COlePropertiesEx dlg(m_pSelection);
  dlg.DoModal();
}

void CMainView::OnPaste ( ) [protected]

Definition at line 384 of file mainview.cpp.

{
  if (DoPasteItem(FALSE, NULL, NULL) == NULL)
    AfxMessageBox(IDP_GET_FROM_CLIPBOARD_FAILED);
}

void CMainView::OnPasteLink ( ) [protected]

Definition at line 390 of file mainview.cpp.

{
  if (DoPasteItem(TRUE, NULL, NULL) == NULL)
    AfxMessageBox(IDP_GET_FROM_CLIPBOARD_FAILED);
}

void CMainView::OnPasteSpecial ( ) [protected]

Definition at line 1108 of file mainview.cpp.

{
  COlePasteSpecialDialog dlg;
  dlg.AddFormat(CMainDoc::m_cfPrivate, TYMED_HGLOBAL,
    IDS_PRIVATE_CF_DESCR, FALSE, FALSE);
  dlg.AddStandardFormats();
  if (dlg.DoModal() != IDOK)
    return;

  CRectItem* pItem = NULL;
  TRY
  {
    // Get the clipboard format of the selected
    CLIPFORMAT cf = dlg.m_ps.arrPasteEntries[dlg.m_ps.nSelectedIndex].fmtetc.cfFormat;
    if (cf == CMainDoc::m_cfPrivate)
    {
      BOOL bLink = dlg.GetSelectionType() ==
        COlePasteSpecialDialog::pasteLink;
      COleDataObject dataObject;
      dataObject.Attach(dlg.m_ps.lpSrcDataObj, FALSE);
      pItem = DoPasteItem(bLink, &dataObject, NULL, cf);

      // try to get initial presentation data
      pItem->UpdateLink();
    }
    else
    {
      pItem = GetDocument()->CreateItem();
      if (!dlg.CreateItem(pItem))
      {
        TRACE0("Warning: paste special failed to create item.\n");
        AfxThrowMemoryException();
      }

      // try to get initial presentation data
      pItem->UpdateLink();

      // try to get initial extent
      pItem->UpdateExtent();

      // allow document to offset item to avoid direct superimposition
      GetDocument()->AdjustItemPosition(pItem);

      // set the selection with bSafeSelect = TRUE
      SetSelection(pItem, TRUE);
      GetDocument()->SetModifiedFlag();
      GetDocument()->UpdateAllViews(NULL, 0, pItem);
    }
  }
  CATCH_ALL(e)
  {
    // cleanup item, if allocated
    if (pItem != NULL)
      GetDocument()->DeleteItem(pItem);
    AfxMessageBox(IDP_FAILED_TO_CREATE);
    return;
  }
  END_CATCH_ALL
}

void CMainView::OnPrepareDC | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo = NULL |
 | ) |  |  | [virtual]

Definition at line 110 of file mainview.cpp.

{
  CScrollView::OnPrepareDC(pDC, pInfo);
  // set up a reasonable default context
  pDC->SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
  pDC->SetBkColor(::GetSysColor(COLOR_WINDOW));

  // LOENGLISH units are based on physical inches
  // We want logical inches so we have to do it differently
  pDC->SetMapMode(MM_ANISOTROPIC);
  pDC->SetViewportExt(
    pDC->GetDeviceCaps(LOGPIXELSX), pDC->GetDeviceCaps(LOGPIXELSY));
  pDC->SetWindowExt(100,-100);
}

BOOL CMainView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 287 of file mainview.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CMainView::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 779 of file mainview.cpp.

{
  // make sure window is active
  GetParentFrame()->ActivateFrame();

  SetSelection(GetHitItem(point));    // reselect item if appropriate
  UpdateWindow();

  if (m_pSelection != NULL)
  {
    CMenu bar;
    if (bar.LoadMenu(ID_OBJECT_POPUP_MENU))
    {
      CMenu& popup = *bar.GetSubMenu(0);
      ASSERT(popup.m_hMenu != NULL);

      ClientToScreen(&point);
      popup.TrackPopupMenu(TPM_RIGHTBUTTON,
        point.x, point.y,
        AfxGetMainWnd()); // route commands through main window
    }
  }
}

BOOL CMainView::OnScrollBy | ( | CSize | sizeScroll,
 |  | BOOL | bDoScroll = TRUE |
 | ) |  |  | [virtual]

Definition at line 259 of file mainview.cpp.

{
  // remove drag/drop feedback before scrolling
  if (bDoScroll && m_prevDropEffect != DROPEFFECT_NONE)
  {
    CClientDC dc(this);
    dc.DrawFocusRect(CRect(m_dragPoint, m_dragSize));
      // erase previous focus rect
    m_prevDropEffect = DROPEFFECT_NONE;
  }

  // do the scroll
  if (!CScrollView::OnScrollBy(sizeScroll, bDoScroll))
    return FALSE;

  // update the position of any in-place active item
  if (bDoScroll)
  {
    UpdateActiveItem();
    UpdateWindow();
  }

  return TRUE;
}

BOOL CMainView::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 763 of file mainview.cpp.

{
  if (pWnd == this && m_pSelection != NULL)
  {
    // give the tracker for the selection a chance
    CRectTracker tracker;
    SetupTracker(&tracker, m_pSelection);
    if (tracker.SetCursor(this, nHitTest))
      return TRUE;
  }
  return CScrollView::OnSetCursor(pWnd, nHitTest, message);
}

void CMainView::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 810 of file mainview.cpp.

{
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL &&
    pActiveItem->GetItemState() == COleClientItem::activeUIState)
  {
    // need to set focus to this item if it is in the same view
    CWnd* pWnd = pActiveItem->GetInPlaceWindow();
    if (pWnd != NULL)
    {
      pWnd->SetFocus();
      return;
    }
  }

  CScrollView::OnSetFocus(pOldWnd);
}

void CMainView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 828 of file mainview.cpp.

{
  CScrollView::OnSize(nType, cx, cy);

  UpdateActiveItem();
}

void CMainView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [virtual]

Definition at line 216 of file mainview.cpp.

{
  if (pHint == NULL && lHint == 0)
  {
    // some sort of clear all
    m_pSelection = NULL;
  }

  if (pHint != NULL && pHint->IsKindOf(RUNTIME_CLASS(CRectItem)))
  {
    // just invalidate the one item
    InvalidateItem((CRectItem*)pHint);

    // clear selection if pointing to deleted item
    if (lHint == 1 && pHint == m_pSelection)
    {
      // specific case of pHint being deleted
      m_pSelection = NULL;
    }
  }
  else if (lHint != 0)
  {
    // invalidate arbitrary rectangle
    InvalidateRect((CRect*)lHint);
  }
  else
  {
    // complete update
    CScrollView::OnUpdate(pSender, lHint, pHint);
  }
}

void CMainView::OnUpdateEditClone ( CCmdUI * pCmdUI ) [protected]

Definition at line 1068 of file mainview.cpp.

{
  pCmdUI->Enable(m_pSelection != NULL);
}

void CMainView::OnUpdateEditMenu ( CCmdUI * pCmdUI ) [protected]

Definition at line 341 of file mainview.cpp.

{
  // most Edit menu commands are enabled only if we have a selection
  //  and there are no in-place activations for this view
  pCmdUI->Enable(m_pSelection != NULL &&
    GetDocument()->GetInPlaceActiveItem(this) == NULL);
}

void CMainView::OnUpdateEditPaste ( CCmdUI * pCmdUI ) [protected]

Definition at line 1168 of file mainview.cpp.

{
  // determine if private or standard OLE formats are on the clipboard
  COleDataObject dataObj;
  BOOL bEnable = dataObj.AttachClipboard() &&
    (dataObj.IsDataAvailable(CMainDoc::m_cfPrivate) ||
     COleClientItem::CanCreateFromData(&dataObj));

  // enable command based on availability
  pCmdUI->Enable(bEnable);
}

void CMainView::OnUpdateObjectDisplayAsIcon ( CCmdUI * pCmdUI ) [protected]

Definition at line 1037 of file mainview.cpp.

{
  if (m_pSelection == NULL)
  {
    pCmdUI->Enable(FALSE);
    return;
  }
  ASSERT_VALID(m_pSelection);
  pCmdUI->SetCheck(m_pSelection->GetDrawAspect() == DVASPECT_ICON);
  pCmdUI->Enable(TRUE);
}

void CMainView::OnUpdateObjectDisplayContent ( CCmdUI * pCmdUI ) [protected]

Definition at line 1014 of file mainview.cpp.

{
  if (m_pSelection == NULL)
  {
    pCmdUI->Enable(FALSE);
    return;
  }
  ASSERT_VALID(m_pSelection);
  pCmdUI->SetCheck(m_pSelection->GetDrawAspect() == DVASPECT_CONTENT);
  pCmdUI->Enable(TRUE);
}

void CMainView::OnUpdateOleChangeSource ( CCmdUI * pCmdUI ) [protected]

Definition at line 1258 of file mainview.cpp.

{
  pCmdUI->Enable(m_pSelection != NULL && m_pSelection->GetType() == OT_LINK);
}

void CMainView::OnUpdateOleEditProperties ( CCmdUI * pCmdUI ) [protected]

Definition at line 1208 of file mainview.cpp.

{
  pCmdUI->Enable(m_pSelection != NULL);
}

void CMainView::SetSelection | ( | CRectItem * | pNewSel,
 |  | BOOL | bSafeSelect = FALSE
 | ) |  |

Definition at line 301 of file mainview.cpp.

{
  if (pNewSel != NULL && pNewSel == m_pSelection)
    return;

  // deactivate any in-place active item on this view!
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL && pNewSel != pActiveItem)
  {
    if (bSafeSelect)
      return;
    // if we found one, deactivate it
    pActiveItem->Close();
    ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
  }
  if (m_pSelection != NULL) // invalidate the old item
    InvalidateItem(m_pSelection);
  if ((m_pSelection = pNewSel) != NULL) // invalidate the new item
    InvalidateItem(m_pSelection);
}

void CMainView::SetupTracker | ( | CRectTracker * | pTracker,
 |  | CRectItem * | pItem,
 |  | CRect * | pTrueRect = NULL |
 | ) |  |  | [protected]

Definition at line 125 of file mainview.cpp.

{
  ENSURE(pTracker != NULL);
  ENSURE(pItem != NULL);

  pTracker->m_rect = pItem->GetRect();
  DocToClient(pTracker->m_rect);

  // set minimum size for our OLE items
  pTracker->m_sizeMin.cx = 8;
  pTracker->m_sizeMin.cy = 8;

  pTracker->m_nStyle = 0;

  // setup resize handles if item is selected
  if (pItem == m_pSelection)
    pTracker->m_nStyle |= CRectTracker::resizeInside;

  // put correct border depending on item type
  if (pItem->GetType() == OT_LINK)
    pTracker->m_nStyle |= CRectTracker::dottedLine;
  else
    pTracker->m_nStyle |= CRectTracker::solidLine;

  // put hatching over the item if it is currently open
  if (pItem->GetItemState() == COleClientItem::openState ||
    pItem->GetItemState() == COleClientItem::activeUIState)
  {
    pTracker->m_nStyle |= CRectTracker::hatchInside;
  }

  if (pTrueRect != NULL)
    pTracker->GetTrueRect(pTrueRect);
}

void CMainView::UpdateActiveItem ( )

Definition at line 1049 of file mainview.cpp.

{
  // when there is an active item visible, sizing the window may cause
  //  more/less of the in-place object to become visible.
  //  (ie. the clipping rectangle changes with the size of the window)
  // a container supporting scrolling would also have to do this
  //  when scrolling the contents of the window.

  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL &&
    pActiveItem->GetItemState() == COleClientItem::activeUIState &&
    pActiveItem->GetActiveView() == this)
  {
    // this will update the item rectangles by calling
    //  OnGetPosRect & OnGetClipRect.
    pActiveItem->SetItemRects();
  }
}

Member Data Documentation

BOOL CMainView::m_bInDrag [protected]

Definition at line 50 of file mainview.h.

CBrush NEAR CMainView::m_brHatch [static, protected]

Definition at line 58 of file mainview.h.

CLIPFORMAT CMainView::m_cfObjectDescriptor = NULL [static, protected]

Definition at line 57 of file mainview.h.

CSize CMainView::m_dragOffset [protected]

Definition at line 55 of file mainview.h.

CPoint CMainView::m_dragPoint [protected]

Definition at line 53 of file mainview.h.

CSize CMainView::m_dragSize [protected]

Definition at line 54 of file mainview.h.

COleDropTarget CMainView::m_dropTarget [protected]

Definition at line 52 of file mainview.h.

DROPEFFECT CMainView::m_prevDropEffect [protected]

Definition at line 56 of file mainview.h.

CRectItem* CMainView::m_pSelection [protected]

Definition at line 51 of file mainview.h.

The documentation for this class was generated from the following files:
  • ole/oclient/mainview.h
  • ole/oclient/mainview.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMainWindow Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMainWindow Class Reference

#include "hello.h"

List of all members.

Public Member Functions

CMainWindow ()
afx_msg void | OnAbout ()
afx_msg void | OnPaint ()

Detailed Description

Definition at line 24 of file hello.h.

Constructor & Destructor Documentation

CMainWindow::CMainWindow ( )

Definition at line 33 of file hello.cpp.

{
  LoadFrame(IDR_MAINFRAME);
}

Member Function Documentation

void CMainWindow::OnAbout ( )

Definition at line 67 of file hello.cpp.

{
  CDialog about(IDD_ABOUTBOX);
  about.DoModal();
}

void CMainWindow::OnPaint ( )

Definition at line 45 of file hello.cpp.

{
  CRect rect;
  GetClientRect(rect);

  CPaintDC dc(this);
  dc.SetTextAlign(TA_BASELINE | TA_CENTER);
  dc.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
  dc.SetBkMode(TRANSPARENT);
  CString s;
  s.LoadString(IDS_HELLO);
  dc.TextOut((rect.right / 2), (rect.bottom / 2), s);
}

The documentation for this class was generated from the following files:
  • general/hello/hello.h
  • general/hello/hello.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMapDWordToMyStructView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions

CMapDWordToMyStructView Class Reference

#include "mapdwvw.h"

List of all members.

Public Types

enum | { IDD = IDD_MAP_DWORD_TO_MYSTRUCT }

Public Member Functions

CMapDWordToMyStructView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
DWORD | m_dwKey
float | m_float
int | m_int
CString | m_str

Protected Member Functions

virtual | ~CMapDWordToMyStructView ()
void | AddMapEntryToListBox (DWORD dwKey, CMyStruct *pMyStruct)
CMyStruct * ConstructMyStructFromView ()
virtual void | DoDataExchange (CDataExchange *pDX)
int | FindKeyInListBox (DWORD dwKey)
afx_msg void | OnAddOrUpdate ()
afx_msg void | OnFind ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
void | UpdateViewFromMyStruct (CMyStruct *pMyStruct)

Static Protected Member Functions

static CString | FormatListBoxEntry (DWORD dwKey, CMyStruct *pMyStruct)

Detailed Description

Definition at line 19 of file mapdwvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file mapdwvw.h.

{ IDD = IDD_MAP_DWORD_TO_MYSTRUCT };

Constructor & Destructor Documentation

CMapDWordToMyStructView::CMapDWordToMyStructView ( )

Definition at line 27 of file mapdwvw.cpp.

  : CFormView(CMapDWordToMyStructView::IDD)
{
  //{{AFX_DATA_INIT(CMapDWordToMyStructView)
  m_int = 0;
  m_float = 0.0f;
  m_str = "";
  m_dwKey = 0;
  //}}AFX_DATA_INIT
}

CMapDWordToMyStructView::~CMapDWordToMyStructView ( ) [protected, virtual]

Definition at line 38 of file mapdwvw.cpp.

{
}

Member Function Documentation

void CMapDWordToMyStructView::AddMapEntryToListBox | ( | DWORD | dwKey,
 |  | CMyStruct * | pMyStruct |
 | ) |  |  | [protected]

Definition at line 128 of file mapdwvw.cpp.

{
  CString strListBoxEntry = FormatListBoxEntry(dwKey, pMyStruct);
  int nSel = m_ctlList.AddString(strListBoxEntry);
  m_ctlList.SetItemData(nSel, dwKey);
}

CMyStruct * CMapDWordToMyStructView::ConstructMyStructFromView ( ) [protected]

Definition at line 135 of file mapdwvw.cpp.

{
  CMyStruct* pMyStruct = new CMyStruct;
  pMyStruct->m_int = m_int;
  pMyStruct->m_float = m_float;
  pMyStruct->m_str = m_str;
  return pMyStruct;
}

void CMapDWordToMyStructView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 59 of file mapdwvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMapDWordToMyStructView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_INT, m_int);
  DDX_Text(pDX, IDC_FLOAT, m_float);
  DDX_Text(pDX, IDC_STRING, m_str);
  DDX_Text(pDX, IDC_KEY, m_dwKey);
  //}}AFX_DATA_MAP
}

int CMapDWordToMyStructView::FindKeyInListBox ( DWORD dwKey ) [protected]

Definition at line 118 of file mapdwvw.cpp.

{
  for (int nSel = 0; nSel < m_ctlList.GetCount(); nSel++)
  {
    if (m_ctlList.GetItemData(nSel) == dwKey)
      return nSel;
  }
  return LB_ERR;
}

CString CMapDWordToMyStructView::FormatListBoxEntry | ( | DWORD | dwKey,
 |  | CMyStruct * | pMyStruct |
 | ) |  |  | [static, protected]

Definition at line 107 of file mapdwvw.cpp.

{
  CString strListBoxEntry;
  strListBoxEntry.Format(_T("%d"),dwKey);
  strListBoxEntry += _T(" >> ");
  CString strMyStruct;
  pMyStruct->FormatMyStruct(strMyStruct);
  strListBoxEntry += strMyStruct;
  return strListBoxEntry;
}

CCollectDoc * CMapDWordToMyStructView::GetDocument ( ) [inline]

Definition at line 78 of file mapdwvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CMapDWordToMyStructView::OnAddOrUpdate ( ) [protected]

Definition at line 156 of file mapdwvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add or replace entry in the listbox
  int nSel = FindKeyInListBox(m_dwKey);
  if (nSel != LB_ERR)
    m_ctlList.DeleteString(nSel);
  CMyStruct* pMyStruct = ConstructMyStructFromView();
  AddMapEntryToListBox(m_dwKey, pMyStruct);

  // Add or update association in the CMap
  CMyStruct* pTemp;
  if( GetDocument()->m_mapDWordToMyStruct.Lookup( m_dwKey, pTemp ) )
    delete pTemp; // delete old value
  GetDocument()->m_mapDWordToMyStruct[m_dwKey] = pMyStruct;
}

void CMapDWordToMyStructView::OnFind ( ) [protected]

Definition at line 175 of file mapdwvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  CMyStruct* pMyStruct;
  if (GetDocument()->m_mapDWordToMyStruct.Lookup(m_dwKey, pMyStruct) != TRUE)
  {
    AfxMessageBox(IDS_KEY_NOT_FOUND);
    return;
  }

  UpdateViewFromMyStruct(pMyStruct);
}

void CMapDWordToMyStructView::OnInitialUpdate ( )

Definition at line 42 of file mapdwvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the assocations from the document's CMap to the listbox.
  DWORD dwKey;
  CMyStruct* pMyStruct;
  m_ctlList.ResetContent();
  CMapDWordToMyStruct& map = GetDocument()->m_mapDWordToMyStruct;
  POSITION pos = map.GetStartPosition();
  while (pos != NULL)
  {
    map.GetNextAssoc(pos, dwKey, pMyStruct);
    AddMapEntryToListBox(dwKey, pMyStruct);
  }
}

void CMapDWordToMyStructView::OnRemove ( ) [protected]

Definition at line 190 of file mapdwvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  CMyStruct* pMyStruct;
  CMapDWordToMyStruct& map = GetDocument()->m_mapDWordToMyStruct;
  if (map.Lookup(m_dwKey, pMyStruct) != TRUE)
  {
    AfxMessageBox(IDS_KEY_NOT_FOUND);
    return;
  }

  if (m_int != pMyStruct->m_int
    || m_float != pMyStruct->m_float
    || m_str != pMyStruct->m_str)
  {
    UpdateViewFromMyStruct(pMyStruct);
    AfxMessageBox(IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN);
    return;
  }

  // Remove assocation from the listbox
  int nSel = FindKeyInListBox(m_dwKey);
  ASSERT(nSel != LB_ERR);
  m_ctlList.DeleteString(nSel);

  // Remove the association from the CMap
  map.RemoveKey(m_dwKey);

  // Delete CMyStruct
  delete pMyStruct;
}

void CMapDWordToMyStructView::OnRemoveAll ( ) [protected]

Definition at line 224 of file mapdwvw.cpp.

{
  CCollectDoc* pDoc = GetDocument();
  POSITION pos = GetDocument()->m_mapDWordToMyStruct.GetStartPosition();
  while (pos != NULL)
  {
    DWORD dwKey;
    CMyStruct* pMyStruct;
    pDoc->m_mapDWordToMyStruct.GetNextAssoc(pos, dwKey, pMyStruct);
    delete pMyStruct;
  }
  pDoc->m_mapDWordToMyStruct.RemoveAll();
  m_ctlList.ResetContent();
}

void CMapDWordToMyStructView::OnSelChangeList ( ) [protected]

Definition at line 239 of file mapdwvw.cpp.

{
  // Update the "key" field to reflect the new selection in the listbox.
  m_dwKey = (DWORD)m_ctlList.GetItemData(m_ctlList.GetCurSel());
  UpdateData(FALSE);

  // Now that the key field has been updated to reflect the listbox selection,
  // find the string in the map as though the user had hit the Find button.
  OnFind();
}

void CMapDWordToMyStructView::UpdateViewFromMyStruct ( CMyStruct * pMyStruct ) [protected]

Definition at line 144 of file mapdwvw.cpp.

{
  m_int = pMyStruct->m_int;
  m_float = pMyStruct->m_float;
  m_str = pMyStruct->m_str;
  UpdateData(FALSE);  // update the value found in the map lookup
}

Member Data Documentation

CListBox CMapDWordToMyStructView::m_ctlList

Definition at line 29 of file mapdwvw.h.

DWORD CMapDWordToMyStructView::m_dwKey

Definition at line 33 of file mapdwvw.h.

float CMapDWordToMyStructView::m_float

Definition at line 31 of file mapdwvw.h.

int CMapDWordToMyStructView::m_int

Definition at line 30 of file mapdwvw.h.

CString CMapDWordToMyStructView::m_str

Definition at line 32 of file mapdwvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/mapdwvw.h
  • advanced/collect/mapdwvw.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMapInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

CMapInfo Struct Reference

List of all members.

Public Attributes

DWORD | dwAddTo
TCHAR * | pszPrefixFrom
TCHAR * | pszPrefixTo

Detailed Description

Definition at line 191 of file makehm.cpp.

Member Data Documentation

DWORD CMapInfo::dwAddTo

Definition at line 195 of file makehm.cpp.

TCHAR* CMapInfo::pszPrefixFrom

Definition at line 193 of file makehm.cpp.

TCHAR* CMapInfo::pszPrefixTo

Definition at line 194 of file makehm.cpp.

The documentation for this struct was generated from the following file:
  • utility/makehm/makehm.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMapStringToStringView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CMapStringToStringView Class Reference

#include "mapssvw.h"

List of all members.

Public Types

enum | { IDD = IDD_MAP_STRING_TO_STRING }

Public Member Functions

CMapStringToStringView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
CString | m_strKey
CString | m_strValue

Protected Member Functions

virtual | ~CMapStringToStringView ()
void | AddMapEntryToListBox (CString &strKey, CString &strValue)
virtual void | DoDataExchange (CDataExchange *pDX)
int | FindKeyInListBox (CString &strKey)
afx_msg void | OnAddOrUpdate ()
afx_msg void | OnFind ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()

Detailed Description

Definition at line 19 of file mapssvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file mapssvw.h.

{ IDD = IDD_MAP_STRING_TO_STRING };

Constructor & Destructor Documentation

CMapStringToStringView::CMapStringToStringView ( )

Definition at line 27 of file mapssvw.cpp.

  : CFormView(CMapStringToStringView::IDD)
{
  //{{AFX_DATA_INIT(CMapStringToStringView)
  m_strKey = "";
  m_strValue = "";
  //}}AFX_DATA_INIT
}

CMapStringToStringView::~CMapStringToStringView ( ) [protected, virtual]

Definition at line 36 of file mapssvw.cpp.

{
}

Member Function Documentation

void CMapStringToStringView::AddMapEntryToListBox | ( | CString & | strKey,
 |  | CString & | strValue |
 | ) |  |  | [protected]

Definition at line 114 of file mapssvw.cpp.

{
  CString str = strKey;
  str += _T(" >> ");
  str += strValue;
  m_ctlList.AddString(str);
}

void CMapStringToStringView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 57 of file mapssvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMapStringToStringView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_KEY, m_strKey);
  DDX_Text(pDX, IDC_VALUE, m_strValue);
  //}}AFX_DATA_MAP
}

int CMapStringToStringView::FindKeyInListBox ( CString & strKey ) [protected]

Definition at line 103 of file mapssvw.cpp.

{
  CString strValue;
  if (GetDocument()->m_mapStringToString.Lookup(strKey, strValue) != TRUE)
    return LB_ERR;
  CString strListBoxEntry = strKey;
  strListBoxEntry += _T(" >> ");
  strListBoxEntry += strValue;
  return m_ctlList.FindString(-1, strListBoxEntry);
}

CCollectDoc * CMapStringToStringView::GetDocument ( ) [inline]

Definition at line 72 of file mapssvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CMapStringToStringView::OnAddOrUpdate ( ) [protected]

Definition at line 125 of file mapssvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add or replace entry in the listbox
  int nSel = FindKeyInListBox(m_strKey);
  if (nSel != LB_ERR)
    m_ctlList.DeleteString(nSel);
  AddMapEntryToListBox(m_strKey, m_strValue);

  // Add or update association in the CMapStringToString
  GetDocument()->m_mapStringToString[m_strKey] = m_strValue;
}

void CMapStringToStringView::OnFind ( ) [protected]

Definition at line 140 of file mapssvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  CString strValue;
  if (GetDocument()->m_mapStringToString.Lookup(m_strKey, strValue) != TRUE)
  {
    AfxMessageBox(IDS_KEY_NOT_FOUND);
    return;
  }

  m_strValue = strValue;
  UpdateData(FALSE);  // update the value found in the map lookup
}

void CMapStringToStringView::OnInitialUpdate ( )

Definition at line 40 of file mapssvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the assocations from the document's CMapStringToString
  // to the listbox.
  CString strKey, strValue;
  m_ctlList.ResetContent();
  CMapStringToString& map = GetDocument()->m_mapStringToString;
  POSITION pos = map.GetStartPosition();
  while (pos != NULL)
  {
    map.GetNextAssoc(pos, strKey, strValue);
    AddMapEntryToListBox(strKey, strValue);
  }
}

void CMapStringToStringView::OnRemove ( ) [protected]

Definition at line 156 of file mapssvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  CString strValue;
  CMapStringToString& map = GetDocument()->m_mapStringToString;
  if (map.Lookup(m_strKey, strValue) != TRUE)
  {
    AfxMessageBox(IDS_KEY_NOT_FOUND);
    return;
  }

  if (strValue != m_strValue)
  {
    m_strValue = strValue;
    UpdateData(FALSE);
    AfxMessageBox(IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN);
    return;
  }

  // Remove assocation from the listbox
  int nSel = FindKeyInListBox(m_strKey);
  ASSERT(nSel != LB_ERR);
  m_ctlList.DeleteString(nSel);

  // Remove the association from the CMapStringToString
  map.RemoveKey(m_strKey);
}

void CMapStringToStringView::OnRemoveAll ( ) [protected]

Definition at line 186 of file mapssvw.cpp.

{
  GetDocument()->m_mapStringToString.RemoveAll();
  m_ctlList.ResetContent();
}

void CMapStringToStringView::OnSelChangeList ( ) [protected]

Definition at line 192 of file mapssvw.cpp.

{
  // Update the "key" field to reflect the new selection in the listbox.
  CString str;
  m_ctlList.GetText(m_ctlList.GetCurSel(), str);
  m_strKey.Empty();
  LPCTSTR lpsz = str;
  while (*lpsz != ' ' || *(lpsz+1) != '>' || *(lpsz+2) != '>')
  {
    m_strKey += *lpsz;
    lpsz++;
  }
  UpdateData(FALSE);

  // Now that the key field has been updated to reflect the listbox selection,
  // find the string in the map as though the user had hit the Find button.
  OnFind();
}

Member Data Documentation

CListBox CMapStringToStringView::m_ctlList

Definition at line 29 of file mapssvw.h.

CString CMapStringToStringView::m_strKey

Definition at line 30 of file mapssvw.h.

CString CMapStringToStringView::m_strValue

Definition at line 31 of file mapssvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/mapssvw.h
  • advanced/collect/mapssvw.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMargueeTaskDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMargueeTaskDialog Class Reference

#include "CTaskDialogDemoDlg.h"

List of all members.

Public Member Functions

CMargueeTaskDialog ()

Detailed Description

Definition at line 84 of file CTaskDialogDemoDlg.h.

Constructor & Destructor Documentation

CMargueeTaskDialog::CMargueeTaskDialog ( ) [inline]

Definition at line 86 of file CTaskDialogDemoDlg.h.

                       : CTaskDialog(_T("A CTaskDialog presents information in a clear and consistent way."),
    _T("How much do you like CTaskDialog?"), _T("Sample Marquee"), TDCBF_YES_BUTTON | TDCBF_NO_BUTTON,
    TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_CALLBACK_TIMER | TDF_SHOW_PROGRESS_BAR  | TDF_SHOW_MARQUEE_PROGRESS_BAR)
  {
    SetExpansionArea(_T("How long do I have to wait?"), _T("Get some additional information."), _T("I don't need this information!"));
    SetVerificationCheckboxText(_T("Don't show this dialog again!"));
    SetVerificationCheckbox(true);
    SetProgressBarMarquee( TRUE , 2);
  }

The documentation for this class was generated from the following file:
  • general/CTaskDialog/CTaskDialogDemoDlg.h
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMdiApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMdiApp Class Reference

#include "mdi.h"

List of all members.

Public Member Functions

CMdiApp ()
CMdiApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 23 of file mdi.h.

Constructor & Destructor Documentation

CMdiApp::CMdiApp ( )

Definition at line 37 of file mdi.cpp.

{
}

CMdiApp::CMdiApp ( )

Member Function Documentation

int CMdiApp::ExitInstance ( ) [virtual]

Definition at line 76 of file mdi.cpp.

{
  CloseHandle(CBounceThread::m_hEventBounceThreadKilled);

  return CWinApp::ExitInstance();
}

BOOL CMdiApp::InitInstance ( ) [virtual]

Definition at line 49 of file mdi.cpp.

{
  // Win32 multi-threading APIs are not available on non-NT versions
  // of Windows less than Windows version 4.0.
  if ((::GetVersion() & 0x80000000) && (BYTE(::GetVersion()) < 4))
  {
    AfxMessageBox(IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4);
    return FALSE;
  }

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    delete pMainFrame;
    return FALSE;
  }
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();
  m_pMainWnd = pMainFrame;

  CBounceThread::m_hEventBounceThreadKilled
    = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset

  return TRUE;
}

virtual BOOL CMdiApp::InitInstance ( ) [virtual]
void CMdiApp::OnAppAbout ( )

Definition at line 86 of file mdi.cpp.

{
  CDialog(IDD_ABOUTBOX).DoModal();
}

afx_msg void CMdiApp::OnAppAbout ( )
The documentation for this class was generated from the following files:
  • advanced/mtmdi/mdi.h
  • general/mdi/mdi.h
  • advanced/mtmdi/mdi.cpp
  • general/mdi/mdi.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMDIApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMDIApp Class Reference

#include "mdi.h"

List of all members.

Public Member Functions

CMDIApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
afx_msg void | OnNewBounce ()
afx_msg void | OnNewHello ()

Detailed Description

Definition at line 25 of file mdi.h.

Constructor & Destructor Documentation

CMDIApp::CMDIApp ( )

Definition at line 49 of file mdi.cpp.

{
}

Member Function Documentation

BOOL CMDIApp::InitInstance ( ) [virtual]

Definition at line 61 of file mdi.cpp.

{
  // Register the application's document templates.  Document templates
  // serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_HELLOTYPE,
    RUNTIME_CLASS(CHelloDoc),
    RUNTIME_CLASS(CHelloFrame), // custom MDI child frame
    RUNTIME_CLASS(CHelloView));
  AddDocTemplate(pDocTemplate);

// Add Bounce template to list

  CMultiDocTemplate* pBounceTemplate;
  pBounceTemplate = new CMultiDocTemplate(
    IDR_BOUNCETYPE,
    RUNTIME_CLASS(CBounceDoc),
    RUNTIME_CLASS(CBounceFrame), // custom MDI child frame
    RUNTIME_CLASS(CBounceView));
  AddDocTemplate(pBounceTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CMDIApp::OnAppAbout ( )

Definition at line 144 of file mdi.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CMDIApp::OnNewBounce ( )

Definition at line 195 of file mdi.cpp.

{
// Searches template list for a document type
// containing the "Bounce" string

  POSITION curTemplatePos = GetFirstDocTemplatePosition();

  while(curTemplatePos != NULL)
  {
    CDocTemplate* curTemplate =
      GetNextDocTemplate(curTemplatePos);
    CString str;
    curTemplate->GetDocString(str, CDocTemplate::docName);
    if(str == _T("Bounce"))
    {
      curTemplate->OpenDocumentFile(NULL);
      return;
    }
  }
  AfxMessageBox(IDS_NOBOUNCETEMPLATE);
}

void CMDIApp::OnNewHello ( )

Definition at line 172 of file mdi.cpp.

{

// Searches template list for a document type
// containing the "Hello" string

  POSITION curTemplatePos = GetFirstDocTemplatePosition();

  while(curTemplatePos != NULL)
  {
    CDocTemplate* curTemplate =
      GetNextDocTemplate(curTemplatePos);
    CString str;
    curTemplate->GetDocString(str, CDocTemplate::docName);
    if(str == _T("Hello"))
    {
      curTemplate->OpenDocumentFile(NULL);
      return;
    }
  }
  AfxMessageBox(IDS_NOHELLOTEMPLATE);
}

The documentation for this class was generated from the following files:
  • general/mdidocvw/mdi.h
  • general/mdidocvw/mdi.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMDITabOptions Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes

CMDITabOptions Class Reference

#include "MDITabsDemo.h"

List of all members.

Public Types

enum | MDITabsType { None, MDITabsStandard, MDITabbedGroups }

Public Member Functions

CMDITabOptions ()
BOOL | IsMDITabsDisabled () const
void | Load ()
void | Save ()

Public Attributes

BOOL | m_bActiveTabCloseButton
BOOL | m_bCustomTooltips
BOOL | m_bDisableMDIChildRedraw
BOOL | m_bDragMDITabs
BOOL | m_bFlatFrame
BOOL | m_bMDITabsContextMenu
BOOL | m_bMDITabsDocMenu
BOOL | m_bMDITabsIcons
BOOL | m_bTabsAutoColor
BOOL | m_bTabsOnTop
int | m_nMDITabsBorderSize
MDITabsType m_nMDITabsType
CMFCTabCtrl::Style | m_nTabsStyle

Detailed Description

Definition at line 19 of file MDITabsDemo.h.

Member Enumeration Documentation

enum CMDITabOptions::MDITabsType
Enumerator:
None
MDITabsStandard
MDITabbedGroups

Definition at line 24 of file MDITabsDemo.h.

  {
    None,
    MDITabsStandard,
    MDITabbedGroups
  };

Constructor & Destructor Documentation

CMDITabOptions::CMDITabOptions ( )

Definition at line 25 of file MDITabsDemo.cpp.

{
  m_nMDITabsType = CMDITabOptions::MDITabsStandard;
  m_bTabsOnTop = TRUE;
  m_bActiveTabCloseButton = FALSE;
  m_nTabsStyle = CMFCTabCtrl::STYLE_3D_ONENOTE;
  m_bTabsAutoColor = FALSE;
  m_bMDITabsIcons = TRUE;
  m_bMDITabsDocMenu = FALSE;
  m_bDragMDITabs = TRUE;
  m_bMDITabsContextMenu = TRUE;
  m_nMDITabsBorderSize = 2;
  m_bDisableMDIChildRedraw = TRUE;
  m_bFlatFrame = TRUE;
  m_bCustomTooltips = FALSE;
}

Member Function Documentation

BOOL CMDITabOptions::IsMDITabsDisabled ( ) const [inline]

Definition at line 49 of file MDITabsDemo.h.

{return m_nMDITabsType == CMDITabOptions::None;}

void CMDITabOptions::Load ( )

Definition at line 42 of file MDITabsDemo.cpp.

{
  m_nMDITabsType =  (MDITabsType) theApp.GetInt (_T("ShowMDITabs"), TRUE);
  m_bTabsOnTop = theApp.GetInt (_T("TabsOnTop"), TRUE);
  m_bActiveTabCloseButton = theApp.GetInt (_T("ActiveTabCloseButton"), FALSE);
  m_nTabsStyle = (CMFCTabCtrl::Style) theApp.GetInt (_T("TabsStyle"), CMFCTabCtrl::STYLE_3D_ONENOTE);
  m_bTabsAutoColor = theApp.GetInt (_T("TabsAutoColor"), FALSE);
  m_bMDITabsIcons = theApp.GetInt (_T("MDITabsIcons"), TRUE);
  m_bMDITabsDocMenu = theApp.GetInt (_T("MDITabsDocMenu"), FALSE);
  m_bDragMDITabs = theApp.GetInt (_T("DragMDITabs"), TRUE);
  m_bMDITabsContextMenu = theApp.GetInt (_T("MDITabsContextMenu"), TRUE);
  m_nMDITabsBorderSize = theApp.GetInt (_T("MDITabsBorderSize"), TRUE);
  m_bDisableMDIChildRedraw = theApp.GetInt (_T("DisableMDIChildRedraw"), TRUE);
  m_bFlatFrame = theApp.GetInt (_T("FlatFrame"), TRUE);
  m_bCustomTooltips = theApp.GetInt (_T("CustomTooltips"), FALSE);
}

void CMDITabOptions::Save ( )

Definition at line 59 of file MDITabsDemo.cpp.

{
  theApp.WriteInt (_T("ShowMDITabs"), m_nMDITabsType);
  theApp.WriteInt (_T("TabsOnTop"), m_bTabsOnTop);
  theApp.WriteInt (_T("ActiveTabCloseButton"), m_bActiveTabCloseButton);
  theApp.WriteInt (_T("TabsStyle"), m_nTabsStyle);
  theApp.WriteInt (_T("TabsAutoColor"), m_bTabsAutoColor);
  theApp.WriteInt (_T("MDITabsIcons"), m_bMDITabsIcons);
  theApp.WriteInt (_T("MDITabsDocMenu"), m_bMDITabsDocMenu);
  theApp.WriteInt (_T("DragMDITabs"), m_bDragMDITabs);
  theApp.WriteInt (_T("MDITabsContextMenu"), m_bMDITabsContextMenu);
  theApp.WriteInt (_T("MDITabsBorderSize"), m_nMDITabsBorderSize);
  theApp.WriteInt (_T("DisableMDIChildRedraw"), m_bDisableMDIChildRedraw);
  theApp.WriteInt (_T("FlatFrame"), m_bFlatFrame);
  theApp.WriteInt (_T("CustomTooltips"), m_bCustomTooltips);
}

Member Data Documentation

BOOL CMDITabOptions::m_bActiveTabCloseButton

Definition at line 34 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bCustomTooltips

Definition at line 44 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bDisableMDIChildRedraw

Definition at line 42 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bDragMDITabs

Definition at line 39 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bFlatFrame

Definition at line 43 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bMDITabsContextMenu

Definition at line 40 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bMDITabsDocMenu

Definition at line 38 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bMDITabsIcons

Definition at line 37 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bTabsAutoColor

Definition at line 36 of file MDITabsDemo.h.

BOOL CMDITabOptions::m_bTabsOnTop

Definition at line 33 of file MDITabsDemo.h.

int CMDITabOptions::m_nMDITabsBorderSize

Definition at line 41 of file MDITabsDemo.h.

MDITabsType CMDITabOptions::m_nMDITabsType

Definition at line 32 of file MDITabsDemo.h.

CMFCTabCtrl::Style CMDITabOptions::m_nTabsStyle

Definition at line 35 of file MDITabsDemo.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MDITabsDemo/MDITabsDemo.h
  • vc2008fp/MDITabsDemo/MDITabsDemo.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMDITabsDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMDITabsDemoApp Class Reference

#include "MDITabsDemo.h"

List of all members.

Public Member Functions

CMDITabsDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()
void | UpdateMDITabs (BOOL bResetMDIChild)

Public Attributes

CMDITabOptions m_Options

Detailed Description

Definition at line 57 of file MDITabsDemo.h.

Constructor & Destructor Documentation

CMDITabsDemoApp::CMDITabsDemoApp ( )

Definition at line 91 of file MDITabsDemo.cpp.

                                 :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CMDITabsDemoApp::ExitInstance ( ) [virtual]

Definition at line 189 of file MDITabsDemo.cpp.

{
  m_Options.Save ();
  return CWinAppEx::ExitInstance();
}

BOOL CMDITabsDemoApp::InitInstance ( ) [virtual]

Definition at line 106 of file MDITabsDemo.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
  LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  SetRegistryBase (_T("Settings"));

  m_Options.Load ();

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();
  InitTooltipManager ();

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  GetTooltipManager ()->SetTooltipParams (
    AFX_TOOLTIP_TYPE_ALL,
    RUNTIME_CLASS (CMFCToolTipCtrl),
    &params);

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_MDITABTYPE,
    RUNTIME_CLASS(CMDITabsDemoDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CMDITabsDemoView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  OnFileNew ();
  OnFileNew ();
  OnFileNew ();

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  if (afxGlobalData.m_nBitsPerPixel < 16)
  {
    AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
  }

  return TRUE;
}

void CMDITabsDemoApp::OnAppAbout ( )

Definition at line 254 of file MDITabsDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CMDITabsDemoApp::PreLoadState ( ) [virtual]

Definition at line 195 of file MDITabsDemo.cpp.

{
  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

void CMDITabsDemoApp::UpdateMDITabs ( BOOL bResetMDIChild )

Definition at line 202 of file MDITabsDemo.cpp.

{
  ((CMainFrame*) AfxGetMainWnd ())->UpdateMDITabs (bResetMDIChild);
}

Member Data Documentation

CMDITabOptions CMDITabsDemoApp::m_Options

Definition at line 66 of file MDITabsDemo.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MDITabsDemo/MDITabsDemo.h
  • vc2008fp/MDITabsDemo/MDITabsDemo.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMDITabsDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMDITabsDemoDoc Class Reference

#include "MDITabsDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CMDITabsDemoDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CMDITabsDemoDoc ()

Detailed Description

Definition at line 13 of file MDITabsDemoDoc.h.

Constructor & Destructor Documentation

CMDITabsDemoDoc::CMDITabsDemoDoc ( ) [protected]

Definition at line 33 of file MDITabsDemoDoc.cpp.

{
  // TODO: add one-time construction code here

}

CMDITabsDemoDoc::~CMDITabsDemoDoc ( ) [virtual]

Definition at line 39 of file MDITabsDemoDoc.cpp.

{
}

Member Function Documentation

BOOL CMDITabsDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file MDITabsDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CMDITabsDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file MDITabsDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/MDITabsDemo/MDITabsDemoDoc.h
  • vc2008fp/MDITabsDemo/MDITabsDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMDITabsDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMDITabsDemoView Class Reference

#include "MDITabsDemoView.h"

List of all members.

Public Member Functions

virtual | ~CMDITabsDemoView ()
CMDITabsDemoDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CMDITabsDemoView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file MDITabsDemoView.h.

Constructor & Destructor Documentation

CMDITabsDemoView::CMDITabsDemoView ( ) [protected]

Definition at line 39 of file MDITabsDemoView.cpp.

{
  // TODO: add construction code here

}

CMDITabsDemoView::~CMDITabsDemoView ( ) [virtual]

Definition at line 45 of file MDITabsDemoView.cpp.

{
}

Member Function Documentation

CMDITabsDemoDoc * CMDITabsDemoView::GetDocument ( ) [inline]

Definition at line 51 of file MDITabsDemoView.h.

   { return (CMDITabsDemoDoc*)m_pDocument; }

void CMDITabsDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 94 of file MDITabsDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

void CMDITabsDemoView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 128 of file MDITabsDemoView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CMDITabsDemoView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 60 of file MDITabsDemoView.cpp.

{
  CMDITabsDemoDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  if (pDC->IsPrinting ())
  {
    return;
  }

  CString strTitle = pDoc->GetTitle ();

  CFont* pOldFont = pDC->SelectObject (&afxGlobalData.fontRegular);
  pDC->SetBkMode (TRANSPARENT);

  pDC->TextOut (10, 10, strTitle);

  pDC->SelectObject (pOldFont);
}

void CMDITabsDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 99 of file MDITabsDemoView.cpp.

{
  // TODO: add cleanup after printing
}

void CMDITabsDemoView::OnFilePrintPreview ( ) [protected]

Definition at line 83 of file MDITabsDemoView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CMDITabsDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 88 of file MDITabsDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CMDITabsDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 49 of file MDITabsDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/MDITabsDemo/MDITabsDemoView.h
  • vc2008fp/MDITabsDemo/MDITabsDemoView.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMenuSubSetApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMenuSubSetApp Class Reference

#include "MenuSubSet.h"

List of all members.

Public Member Functions

CMenuSubSetApp ()
BOOL | ChooseConfig (BOOL bIsStartup=FALSE)
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()
virtual BOOL | SaveAllModified ()

Public Attributes

int | m_nCurrConfig

Detailed Description

Definition at line 24 of file MenuSubSet.h.

Constructor & Destructor Documentation

CMenuSubSetApp::CMenuSubSetApp ( )

Definition at line 42 of file MenuSubSet.cpp.

                               :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  m_nCurrConfig = 0;
}

Member Function Documentation

BOOL CMenuSubSetApp::ChooseConfig ( BOOL bIsStartup = FALSE )

Definition at line 239 of file MenuSubSet.cpp.

{
  CConfigDlg dlgConfig (bIsStartup);

  dlgConfig.m_nConfig = m_nCurrConfig;

  if (dlgConfig.DoModal () != IDOK)
  {
    return FALSE;
  }

  BOOL bResetToolbars = m_nCurrConfig != dlgConfig.m_nConfig;

  m_nCurrConfig = dlgConfig.m_nConfig;

  // These commands will be removed from all menus/toolbars/keyboard shortcuts:
  CList<UINT, UINT> lstNonPermittedCommands;

  switch (dlgConfig.m_nConfig)
  {
  case 0:
    // All commands will be visible
    break;

  case 1:
    // Remove demo commands:
    lstNonPermittedCommands.AddTail (ID_DEMO_DEMO1);
    lstNonPermittedCommands.AddTail (ID_DEMO_DEMO2);
    break;

  case 2:
    // Remove demo/save commands:
    lstNonPermittedCommands.AddTail (ID_DEMO_DEMO1);
    lstNonPermittedCommands.AddTail (ID_DEMO_DEMO2);
    lstNonPermittedCommands.AddTail (ID_FILE_SAVE);
    lstNonPermittedCommands.AddTail (ID_FILE_SAVE_AS);
    break;
  }

  CMFCToolBar::SetNonPermittedCommands (lstNonPermittedCommands);

  WriteInt (_T("Configuration"), m_nCurrConfig);
  return bResetToolbars;
}

int CMenuSubSetApp::ExitInstance ( ) [virtual]

Definition at line 203 of file MenuSubSet.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CMenuSubSetApp::InitInstance ( ) [virtual]

Definition at line 56 of file MenuSubSet.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  m_nCurrConfig = GetInt (_T("Configuration"), 0);

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // TODO: Remove this if you don't want extended tooltips:
  InitTooltipManager();

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  theApp.GetTooltipManager ()->SetTooltipParams (
    AFX_TOOLTIP_TYPE_ALL,
    RUNTIME_CLASS (CMFCToolTipCtrl),
    &params);

// -EXAMPLE-

  // Choose application configuration:
  BOOL bResetToolbars = ChooseConfig (TRUE);

// --

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_MENUSUTYPE,
    RUNTIME_CLASS(CMenuSubSetDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CMenuSubSetView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

// -EXAMPLE-

  if (bResetToolbars)
  {
    CMFCToolBar::ResetAll ();
  }

// --

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CMenuSubSetApp::OnAppAbout ( )

Definition at line 194 of file MenuSubSet.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CMenuSubSetApp::PreLoadState ( ) [virtual]

Definition at line 208 of file MenuSubSet.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

BOOL CMenuSubSetApp::SaveAllModified ( ) [virtual]

Definition at line 220 of file MenuSubSet.cpp.

{
  if (!CWinApp::SaveAllModified ())
  {
    return FALSE;
  }

  CMDIFrameWndEx* pMainFrame =
    DYNAMIC_DOWNCAST (CMDIFrameWndEx, m_pMainWnd);
  if (pMainFrame != NULL)
  {
    pMainFrame->SaveMDIState (GetRegSectionPath ());
  }

  return TRUE;
}

Member Data Documentation

int CMenuSubSetApp::m_nCurrConfig

Definition at line 45 of file MenuSubSet.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MenuSubSet/MenuSubSet.h
  • vc2008fp/MenuSubSet/MenuSubSet.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMenuSubSetDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMenuSubSetDoc Class Reference

#include "MenuSubSetDoc.h"

List of all members.

Public Member Functions

virtual | ~CMenuSubSetDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CMenuSubSetDoc ()

Detailed Description

Definition at line 13 of file MenuSubSetDoc.h.

Constructor & Destructor Documentation

CMenuSubSetDoc::CMenuSubSetDoc ( ) [protected]

Definition at line 33 of file MenuSubSetDoc.cpp.

{
  // TODO: add one-time construction code here

}

CMenuSubSetDoc::~CMenuSubSetDoc ( ) [virtual]

Definition at line 39 of file MenuSubSetDoc.cpp.

{
}

Member Function Documentation

BOOL CMenuSubSetDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file MenuSubSetDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CMenuSubSetDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file MenuSubSetDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/MenuSubSet/MenuSubSetDoc.h
  • vc2008fp/MenuSubSet/MenuSubSetDoc.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMenuSubSetView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CMenuSubSetView Class Reference

#include "MenuSubSetView.h"

List of all members.

Public Types

enum | { IDD = IDD_MENUSUBSET_FORM }

Public Member Functions

virtual | ~CMenuSubSetView ()
CMenuSubSetDoc * GetDocument ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CMenuSubSetView ()
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
afx_msg void | OnDemoDemo1 ()
afx_msg void | OnDemoDemo2 ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual void | OnInitialUpdate ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file MenuSubSetView.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 20 of file MenuSubSetView.h.

{ IDD = IDD_MENUSUBSET_FORM };

Constructor & Destructor Documentation

CMenuSubSetView::CMenuSubSetView ( ) [protected]

Definition at line 41 of file MenuSubSetView.cpp.

  : CFormView(CMenuSubSetView::IDD)
{
  // TODO: add construction code here

}

CMenuSubSetView::~CMenuSubSetView ( ) [virtual]

Definition at line 48 of file MenuSubSetView.cpp.

{
}

Member Function Documentation

void CMenuSubSetView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 52 of file MenuSubSetView.cpp.

{
  CFormView::DoDataExchange(pDX);
}

CMenuSubSetDoc * CMenuSubSetView::GetDocument ( ) [inline]

Definition at line 58 of file MenuSubSetView.h.

   { return (CMenuSubSetDoc*)m_pDocument; }

void CMenuSubSetView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 93 of file MenuSubSetView.cpp.

{
  // TODO: add extra initialization before printing
}

void CMenuSubSetView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 132 of file MenuSubSetView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CMenuSubSetView::OnDemoDemo1 ( ) [protected]

Definition at line 137 of file MenuSubSetView.cpp.

{
  MessageBox (_T("Demo 1"));
}

void CMenuSubSetView::OnDemoDemo2 ( ) [protected]

Definition at line 142 of file MenuSubSetView.cpp.

{
  MessageBox (_T("Demo 2"));
}

void CMenuSubSetView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 98 of file MenuSubSetView.cpp.

{
  // TODO: add cleanup after printing
}

void CMenuSubSetView::OnFilePrintPreview ( ) [protected]

Definition at line 82 of file MenuSubSetView.cpp.

{
  AFXPrintPreview (this);
}

void CMenuSubSetView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 65 of file MenuSubSetView.cpp.

{
  // There is only one view ever, so it only needs to do the initial
  // update once--otherwise the application is  resized needlessly.
  static BOOL bUpdatedOnce = FALSE;
  if (bUpdatedOnce)
    return;
  bUpdatedOnce = TRUE;

  CFormView::OnInitialUpdate();
  ResizeParentToFit();

}

BOOL CMenuSubSetView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 87 of file MenuSubSetView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CMenuSubSetView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 103 of file MenuSubSetView.cpp.

{
  // TODO: add customized printing code here
}

BOOL CMenuSubSetView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 57 of file MenuSubSetView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CFormView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/MenuSubSet/MenuSubSetView.h
  • vc2008fp/MenuSubSet/MenuSubSetView.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMetaFileWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CMetaFileWnd Class Reference

#include "MFileWnd.H"

List of all members.

Public Member Functions

CMetaFileWnd ()
virtual | ~CMetaFileWnd ()
void | SetObject (IUnknown *pObject)

Protected Member Functions

afx_msg void | OnPaint ()

Protected Attributes

HMETAFILE | m_hMetaFile
IOleObjectPtr | m_pOleObject
IViewObjectPtr | m_pViewObject
CSize | m_size

Detailed Description

Definition at line 22 of file MFileWnd.H.

Constructor & Destructor Documentation

CMetaFileWnd::CMetaFileWnd ( )

Definition at line 23 of file MFileWnd.Cpp.

                           :
   m_hMetaFile( NULL )
{
}

CMetaFileWnd::~CMetaFileWnd ( ) [virtual]

Definition at line 28 of file MFileWnd.Cpp.

{
   if( m_hMetaFile != NULL )
   {
    DeleteMetaFile( m_hMetaFile );
   }
}

Member Function Documentation

void CMetaFileWnd::OnPaint ( ) [protected]

Definition at line 128 of file MFileWnd.Cpp.

{
   CRect rect;
  CPaintDC dc( this ); // device context for painting

   if( m_hMetaFile != NULL )
   {
    GetClientRect( &rect );
    dc.SetMapMode( MM_ANISOTROPIC );
    dc.SetWindowOrg( 0, 0 );
    dc.SetWindowExt( m_size );
    dc.SetViewportOrg( 0, 0 );
    dc.SetViewportExt( rect.right, rect.bottom );
    dc.PlayMetaFile( m_hMetaFile );
   }
}

void CMetaFileWnd::SetObject ( IUnknown * pObject )

Definition at line 77 of file MFileWnd.Cpp.

{
   SIZE size;
   RECTL rect;
   BOOL tSuccess;
   CMetaFileDC dc;
   HDC hAttribDC;

   _ASSERTE( pObject != NULL );

   m_pOleObject = pObject;
   m_pViewObject = pObject;

   m_pOleObject->GetExtent( DVASPECT_CONTENT, &size );

   tSuccess = dc.Create();
   if( !tSuccess )
   {
    return;
   }

   hAttribDC = ::OleStdCreateDC( NULL );
   dc.SetAttribDC( hAttribDC );

   m_size.cx = size.cx;
   m_size.cy = size.cy;
   dc.HIMETRICtoDP( &m_size );

   rect.left = 0;
   rect.top = 0;
   rect.right = m_size.cx;
   rect.bottom = m_size.cy;

   m_pViewObject->Draw( DVASPECT_CONTENT, -1, NULL, NULL, hAttribDC, dc.m_hDC,
    &rect, &rect, NULL, 0 );

   dc.SetAttribDC( NULL );
   DeleteDC( hAttribDC );

   m_hMetaFile = dc.Close();
   if( m_hMetaFile == NULL )
   {
    return;
   }

   InvalidateRect( NULL );
}

Member Data Documentation

HMETAFILE CMetaFileWnd::m_hMetaFile [protected]

Definition at line 45 of file MFileWnd.H.

IOleObjectPtr CMetaFileWnd::m_pOleObject [protected]

Definition at line 46 of file MFileWnd.H.

IViewObjectPtr CMetaFileWnd::m_pViewObject [protected]

Definition at line 47 of file MFileWnd.H.

CSize CMetaFileWnd::m_size [protected]

Definition at line 48 of file MFileWnd.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/MFileWnd.H
  • ole/TstCon/MFileWnd.Cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMethodDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CMethodDlg Class Reference

#include "MethodDg.H"

List of all members.

Public Types

enum | { IDD = IDD_METHOD }

Public Member Functions

CMethodDlg (CWnd *pParent, IDispatch *pDispatch, CInterfaceInfo *pInterfaceInfo)
~CMethodDlg ()

Public Attributes

CComboBox | m_cboxMethodName
CComboBox | m_cboxParamType
CComboBox | m_cboxParamValue
CDateTimeCtrl | m_date
CEdit | m_editExceptionDesc
CEdit | m_editExceptionSource
CEdit | m_editParamValue
CEdit | m_editReturnValue
CListCtrl | m_listParams
CStatic | m_staticParameterValue

Protected Member Functions

void | DisplayExceptionInfo ()
void | DisplayParamValueInList (int iParam)
void | DisplayParamValues (int iType)
virtual void | DoDataExchange (CDataExchange *pDX)
COleVariant * | GetParam (int iParam)
afx_msg void | OnChooseColor ()
afx_msg void | OnChooseFont ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnExceptionHelp ()
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()
afx_msg void | OnInvoke ()
afx_msg void | OnMethodNameSelChange ()
afx_msg void | OnParamsItemChanged (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnParamTypeSelChange ()
afx_msg void | OnParamValueChange ()
afx_msg void | OnParamValueSetFocus ()
afx_msg void | OnSetValue ()

Protected Attributes

CTypedPtrArray< CPtrArray,
COleVariant * > 		m_apParams
CExcepInfo m_excepInfo
int | m_iCurrentParam
IDispatchPtr | m_pDispatch
CInterfaceInfo * m_pInterfaceInfo
int * | m_piParamTypes
CMethodInfo * m_pMethodInfo
CMethodParamInfo * m_pParamInfo
COleVariant * | m_pvarCurrentParam
COleVariant * | m_pvarParams
BOOL | m_tException
COleVariant | m_varResult

Detailed Description

Definition at line 22 of file MethodDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 32 of file MethodDg.H.

{ IDD = IDD_METHOD };

Constructor & Destructor Documentation

CMethodDlg::CMethodDlg | ( | CWnd * | pParent,
 |  | IDispatch * | pDispatch,
 |  | CInterfaceInfo * | pInterfaceInfo
 | ) |  |

Definition at line 24 of file MethodDg.Cpp.

                                    :
   CDialog( CMethodDlg::IDD, pParent ),
   m_pDispatch( pDispatch ),
   m_pInterfaceInfo( pInterfaceInfo ),
   m_pMethodInfo( NULL ),
   m_pvarParams( NULL ),
   m_piParamTypes( NULL ),
   m_pvarCurrentParam( NULL ),
   m_tException( FALSE )
{
   _ASSERTE( m_pDispatch != NULL );
   _ASSERTE( m_pInterfaceInfo != NULL );

   //{{AFX_DATA_INIT(CMethodDlg)
   //}}AFX_DATA_INIT
}

CMethodDlg::~CMethodDlg ( )

Definition at line 42 of file MethodDg.Cpp.

{
   delete[] m_pvarParams;
   delete[] m_piParamTypes;
}

Member Function Documentation

void CMethodDlg::DisplayExceptionInfo ( ) [protected]

Definition at line 425 of file MethodDg.Cpp.

{

   CString strSource;
   CString strDesc;

   if( m_tException )
   {
    if( m_excepInfo.bstrSource != NULL )
    {
     m_editExceptionSource.SetWindowText( COLE2CT(
       m_excepInfo.bstrSource ) );
    }
    else
    {
    LOAD_STRING_FROM_RESOURCE( strSource, IDS_UNSPECIFIEDSOURCE );
     m_editExceptionSource.SetWindowText( strSource );
    }

    if( m_excepInfo.bstrDescription != NULL )
    {
     m_editExceptionDesc.SetWindowText( COLE2CT(
      m_excepInfo.bstrDescription ) );
    }
    else
    {
    LOAD_STRING_FROM_RESOURCE( strDesc, IDS_UNSPECIFIEDEXCEPTION );
     m_editExceptionDesc.SetWindowText( strDesc );
    }

    if( m_excepInfo.bstrHelpFile != NULL )
    {
     GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( TRUE );
    }
    else
    {
     GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( FALSE );
    }
   }
   else
   {
    m_editExceptionSource.SetWindowText( _T( "" ) );
    m_editExceptionDesc.SetWindowText( _T( "" ) );
    GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( FALSE );
   }
}

void CMethodDlg::DisplayParamValueInList ( int iParam ) [protected]

Definition at line 374 of file MethodDg.Cpp.

{
   COleVariant varDisplay;
   CString strTemp;
   CString strValue;
   COleVariant* pvarParam;

   pvarParam = GetParam( iParam );
   if( m_piParamTypes[iParam] == VTI_COLOR )
   {
    ASSERT( pvarParam->vt == VT_I4 );
    strValue.Format( "%#8.8x", pvarParam->lVal );
    m_listParams.SetItemText( iParam, 1, strValue );
   }
   else if( m_piParamTypes[iParam] == VTI_DATE )
   {
      m_date.SetTime( COleDateTime( *pvarParam ) );
   }
  else if( m_piParamTypes[iParam] == VTI_BOOL )
  {
    m_cboxParamValue.SetCurSel( pvarParam->boolVal ? 1 : 0 );
  }
   else
   {
    TRY
    {
     varDisplay.ChangeType( VT_BSTR, pvarParam );
     strValue = varDisplay.bstrVal;
     m_listParams.SetItemText( iParam, 1, strValue );
     m_editParamValue.SetWindowText( strValue );
    }
    CATCH( COleException, e )
    {
     TRACE( "ChangeType failed\n" );
     LOAD_STRING_FROM_RESOURCE( strValue, IDS_UNABLETOREPRESENT );
     m_listParams.SetItemText( iParam, 1, strValue );
     m_editParamValue.SetWindowText( _T( "" ) );
    }
    END_CATCH
   }

   m_listParams.SetItemText( iParam, 2, VTToString( pvarParam->vt ) );
//   m_cboxParamType.SetCurSel( m_piParamTypes[iParam] );
}

void CMethodDlg::DisplayParamValues ( int iType ) [protected]

Definition at line 472 of file MethodDg.Cpp.

{
   CString strValue;

   m_cboxParamValue.ResetContent();
   switch( iType )
   {
   case VTI_BOOL:
      LOAD_STRING_FROM_RESOURCE( strValue, IDS_FALSE );
      m_cboxParamValue.AddString( strValue );
      LOAD_STRING_FROM_RESOURCE( strValue, IDS_TRUE );
      m_cboxParamValue.AddString( strValue );
      break;

   default:
      ASSERT( FALSE );
      break;
   }
}

void CMethodDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 48 of file MethodDg.Cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMethodDlg)
  DDX_Control(pDX, IDC_PARAMVALUECOMBO, m_cboxParamValue);
  DDX_Control(pDX, IDC_DATE, m_date);
  DDX_Control(pDX, IDC_STATIC_PARAMETERVALUE, m_staticParameterValue);
  DDX_Control(pDX, IDC_EXCEPTIONDESC, m_editExceptionDesc);
  DDX_Control(pDX, IDC_EXCEPTIONSOURCE, m_editExceptionSource);
  DDX_Control(pDX, IDC_RETURNVALUE, m_editReturnValue);
  DDX_Control(pDX, IDC_PARAMVALUE, m_editParamValue);
  DDX_Control(pDX, IDC_PARAMS, m_listParams);
  DDX_Control(pDX, IDC_PARAMTYPE, m_cboxParamType);
  DDX_Control(pDX, IDC_METHODNAME, m_cboxMethodName);
  //}}AFX_DATA_MAP
}

COleVariant * CMethodDlg::GetParam ( int iParam ) [protected]

Definition at line 419 of file MethodDg.Cpp.

{
   // Dispatch parameters are in reverse order.
   return( &m_pvarParams[(m_pMethodInfo->GetNumParams()-1)-iParam] );
}

void CMethodDlg::OnChooseColor ( ) [protected]

Definition at line 618 of file MethodDg.Cpp.

{
   CColorDialog dlg;
   int nResult;

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   *m_pvarCurrentParam = long( dlg.GetColor() );
   m_piParamTypes[m_iCurrentParam] = VTI_COLOR;
   DisplayParamValueInList( m_iCurrentParam );
}

void CMethodDlg::OnChooseFont ( ) [protected]

Definition at line 634 of file MethodDg.Cpp.

{

   CFontDialog dlg;
   int nResult;
   IFontDispPtr pFont;
   FONTDESC desc;
   HRESULT hResult;

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   memset( &desc, 0, sizeof( desc ) );
   desc.cbSizeofstruct = sizeof( desc );
   CT2OLE tName(dlg.m_cf.lpLogFont->lfFaceName );
   desc.lpstrName = tName;
   desc.cySize = COleCurrency( dlg.m_cf.iPointSize/10, 1000*
    (dlg.m_cf.iPointSize%10) );
   desc.sWeight = short( dlg.m_cf.lpLogFont->lfWeight );
   desc.sCharset = dlg.m_cf.lpLogFont->lfCharSet;
   desc.fItalic = dlg.m_cf.lpLogFont->lfItalic;
   desc.fUnderline = dlg.m_cf.lpLogFont->lfUnderline;
   desc.fStrikethrough = dlg.m_cf.lpLogFont->lfStrikeOut;

   hResult = OleCreateFontIndirect( &desc, IID_IFontDisp, (void**)&pFont );
   if( FAILED( hResult ) )
   {
    TRACE( "OleCreateFontIndirect() failed\n" );
   }

   m_pvarCurrentParam->Clear();
   m_pvarCurrentParam->vt = VT_DISPATCH;
   m_pvarCurrentParam->pdispVal = pFont;
   m_pvarCurrentParam->pdispVal->AddRef();

   m_piParamTypes[m_iCurrentParam] = VTI_FONT;
   DisplayParamValueInList( m_iCurrentParam );
}

void CMethodDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 704 of file MethodDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

void CMethodDlg::OnExceptionHelp ( ) [protected]

Definition at line 492 of file MethodDg.Cpp.

{

   ASSERT( m_excepInfo.bstrHelpFile != NULL );

   ::HtmlHelp( AfxGetMainWnd()->GetSafeHwnd(), COLE2CT(
    m_excepInfo.bstrHelpFile ), HH_HELP_CONTEXT, m_excepInfo.dwHelpContext );
}

BOOL CMethodDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 696 of file MethodDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CMethodDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 86 of file MethodDg.Cpp.

{
   int iMethod;
   int iType;
   int iItem;
   CMethodInfo* pMethodInfo;
   CString strMethodName;
   CString strColumnName;

   CDialog::OnInitDialog();

   // Populate the method name combo box with the names of all of the methods
   // on this interface.
   for( iMethod = 0; iMethod < m_pInterfaceInfo->GetNumMethods(); iMethod++ )
   {
    pMethodInfo = m_pInterfaceInfo->GetMethod( iMethod );

    // Add on a description of the method type (propget, propput, etc.).
    strMethodName = pMethodInfo->GetName();
    strMethodName += _T( " (" );
    strMethodName += InvokeKindToString( pMethodInfo->GetInvokeKind() );
    strMethodName += _T( ")" );

    m_cboxMethodName.AddString( strMethodName );
   }

   // Add the appropriate columns to the parameter list control.
   LOAD_STRING_FROM_RESOURCE( strColumnName, IDS_PARAMETER );
   m_listParams.InsertColumn( 0, strColumnName, LVCFMT_LEFT, 125 );
   LOAD_STRING_FROM_RESOURCE( strColumnName, IDS_VALUE );
   m_listParams.InsertColumn( 1, strColumnName, LVCFMT_LEFT, 150 );
   LOAD_STRING_FROM_RESOURCE( strColumnName, IDS_TYPE );
   m_listParams.InsertColumn( 2, strColumnName, LVCFMT_LEFT, 100 );

   m_listParams.SetColumnWidth( 2, LVSCW_AUTOSIZE_USEHEADER );

   // Add all available VARTYPEs to the parameter type combo box.
   for( iType = 0; iType < NUM_VARTYPES; iType++ )
   {
    iItem = m_cboxParamType.AddString( VTIToString( iType ) );
    m_cboxParamType.SetItemData( iItem, iType );
   }

   m_cboxMethodName.SetCurSel( 0 );
   OnMethodNameSelChange();

   return( TRUE );
}

void CMethodDlg::OnInvoke ( ) [protected]

Definition at line 298 of file MethodDg.Cpp.

{
   DISPPARAMS dpParams;
   HRESULT hResult;
   UINT iArgErr;
   DISPID dispidArg;
   CString strReturnValue;

   if(m_pvarCurrentParam != NULL)
   {
    OnSetValue();
   }

   dpParams.rgvarg = m_pvarParams;
   dpParams.cArgs = m_pMethodInfo->GetNumParams();

   if( m_pMethodInfo->GetInvokeKind() == DISPATCH_PROPERTYPUT )
   {
    dispidArg = DISPID_PROPERTYPUT;
    dpParams.rgdispidNamedArgs = &dispidArg;
    dpParams.cNamedArgs = 1;
   }
   else
   {
    dpParams.rgdispidNamedArgs = NULL;
    dpParams.cNamedArgs = 0;
   }

   m_varResult.Clear();
   m_excepInfo.Clear();
   m_tException = FALSE;

   TRY
   {
    hResult = m_pDispatch->Invoke( m_pMethodInfo->GetID(), IID_NULL,
     GetUserDefaultLCID(), WORD( m_pMethodInfo->GetInvokeKind() ),
     &dpParams, &m_varResult, &m_excepInfo, &iArgErr );
    if( FAILED( hResult ) )
    {

     TRACE( "Invoke() failed\n" );
     if( hResult == DISP_E_EXCEPTION )
     {
      m_tException = TRUE;
     }
     AfxThrowOleException( hResult );
    }
    strReturnValue = VariantToString( m_varResult );
    strReturnValue += _T( " (" );
    strReturnValue += VTToString( m_varResult.vt );
    strReturnValue += _T( ")" );
    m_editReturnValue.SetWindowText( strReturnValue );
   }
   CATCH( COleException, e )
   {
   }
   END_CATCH

   DisplayExceptionInfo();
}

void CMethodDlg::OnMethodNameSelChange ( ) [protected]

Definition at line 135 of file MethodDg.Cpp.

{
   int iMethod;
   int iParam;
   CMethodParamInfo* pParamInfo = 0;
   COleVariant* pvarParam = 0;

   iMethod = m_cboxMethodName.GetCurSel();
   ASSERT( iMethod != CB_ERR );
   m_pMethodInfo = m_pInterfaceInfo->GetMethod( iMethod );

   // Clean up from the old method.
   m_varResult.Clear();
   m_editReturnValue.SetWindowText( _T( "" ) );
   m_editParamValue.SetWindowText( _T( "" ) );
   m_listParams.DeleteAllItems();
   delete[] (COleVariant*)m_pvarParams;
   m_pvarParams = NULL;
   m_pvarCurrentParam = NULL;
   delete[] m_piParamTypes;
   m_piParamTypes = NULL;
   m_excepInfo.Clear();
   m_editExceptionSource.SetWindowText( _T( "" ) );
   m_editExceptionDesc.SetWindowText( _T( "" ) );
   GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( FALSE );

   // Allocate the parameters for the new method.
   if( m_pMethodInfo->GetNumParams() > 0 )
   {
    m_pvarParams = new COleVariant[m_pMethodInfo->GetNumParams()];
    m_piParamTypes = new int[m_pMethodInfo->GetNumParams()];
   }

   // Fill in the info for each parameter.
   for( iParam = 0; iParam < m_pMethodInfo->GetNumParams(); iParam++ )
   {
    pParamInfo = m_pMethodInfo->GetParam( iParam );
    m_listParams.InsertItem( iParam, pParamInfo->GetName() );
    m_listParams.SetItemText( iParam, 0, pParamInfo->GetName() );
    TRY
    {
     pvarParam = GetParam( iParam );
     pvarParam->ChangeType( pParamInfo->GetType() );
    }
    CATCH( COleException, e )
    {
     TRACE( "Warning: ChangeType failed during initialization.\n" );
    }
    END_CATCH
    m_piParamTypes[iParam] = VTToVTI( pvarParam->vt );

    DisplayParamValueInList( iParam );
   }

   if( m_pMethodInfo->GetNumParams() > 0 )
   {
    // Enable the parameter entry controls.
    m_cboxParamType.EnableWindow( TRUE );

    // Select the first parameter.
    m_listParams.SetItemState( 0, LVIS_SELECTED, LVIS_SELECTED );

    // Let the user start editing the first parameter's value.
    if( m_editParamValue.IsWindowEnabled() )
    {
     m_editParamValue.SetSel( 0, -1 );
    }
   }
   else
   {
    // OnParamsItemChanged isn't going to update the parameter type combo
    // box, so do it here.
    m_cboxParamType.SetCurSel( -1 );
    OnParamTypeSelChange();

    // Disable the parameter entry controls.
    m_cboxParamType.EnableWindow( FALSE );

    // Set the Invoke button to be the default.
    SetDefID( IDC_INVOKE );
   }
}

void CMethodDlg::OnParamsItemChanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 218 of file MethodDg.Cpp.

{
   NM_LISTVIEW* pNMListView;

   pNMListView = (NM_LISTVIEW*)pNMHDR;
   *pResult = 0;

   if( pNMListView->uChanged&LVIF_STATE )
   {
    if( pNMListView->uNewState&LVIS_SELECTED )
    {
     // Display the info for the new parameter
     m_iCurrentParam = pNMListView->iItem;
     m_pParamInfo = m_pMethodInfo->GetParam( m_iCurrentParam );
     m_pvarCurrentParam = GetParam( m_iCurrentParam );
//         m_cboxParamType.SetCurSel( m_piParamTypes[m_iCurrentParam] );
     m_cboxParamType.SelectString( -1, VTIToString( m_piParamTypes[
      m_iCurrentParam] ) );
     OnParamTypeSelChange();
//         DisplayParamValue( m_iCurrentParam );
    }
   }
}

void CMethodDlg::OnParamTypeSelChange ( ) [protected]

Definition at line 501 of file MethodDg.Cpp.

{
   int iType;
   int iItem;

   iItem = m_cboxParamType.GetCurSel();
   if( iItem == CB_ERR )
   {
    iType = -1;
   }
   else
   {
    iType = (int)m_cboxParamType.GetItemData( iItem );
   }

   switch( iType )
   {
   case -1:
    // No type was selected
    GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
    GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
    GetDlgItem( IDC_SETVALUE )->EnableWindow( FALSE );
    GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_NORMAL );
     m_date.EnableWindow( FALSE );
     m_date.ShowWindow( SW_HIDE );
    m_cboxParamValue.EnableWindow( FALSE );
    m_cboxParamValue.ShowWindow( SW_HIDE );
    m_staticParameterValue.ShowWindow( SW_NORMAL );
    m_editParamValue.EnableWindow( FALSE );
    m_editParamValue.ShowWindow( SW_NORMAL );
    break;

   case VTI_COLOR:
    GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
    GetDlgItem( IDC_SETVALUE )->EnableWindow( FALSE );
    GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_HIDE );
     m_date.EnableWindow( FALSE );
     m_date.ShowWindow( SW_HIDE );
    m_cboxParamValue.EnableWindow( FALSE );
    m_cboxParamValue.ShowWindow( SW_HIDE );
    m_staticParameterValue.ShowWindow( SW_HIDE );
    m_editParamValue.EnableWindow( FALSE );
    m_editParamValue.ShowWindow( SW_HIDE );
    GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_NORMAL );
    GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( TRUE );
    break;

   case VTI_FONT:
    GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
    GetDlgItem( IDC_SETVALUE )->EnableWindow( FALSE );
    GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_HIDE );
     m_date.EnableWindow( FALSE );
     m_date.ShowWindow( SW_HIDE );
    m_cboxParamValue.EnableWindow( FALSE );
    m_cboxParamValue.ShowWindow( SW_HIDE );
    m_staticParameterValue.ShowWindow( SW_HIDE );
    m_editParamValue.EnableWindow( FALSE );
    m_editParamValue.ShowWindow( SW_HIDE );
    GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_NORMAL );
    GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( TRUE );
    break;

   case VTI_BOOL:
    GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
     GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
     GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
    m_staticParameterValue.ShowWindow( SW_SHOW );
    m_editParamValue.EnableWindow( FALSE );
    m_editParamValue.ShowWindow( SW_HIDE );
    GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_SHOW );
    GetDlgItem( IDC_SETVALUE )->EnableWindow( TRUE );
     m_date.ShowWindow( SW_HIDE );
     m_date.EnableWindow( FALSE );
    m_cboxParamValue.EnableWindow( TRUE );
    m_cboxParamValue.ShowWindow( SW_NORMAL );
    DisplayParamValues( iType );
      break;

   case VTI_DATE:
    GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
     GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
     GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
    m_cboxParamValue.EnableWindow( FALSE );
    m_cboxParamValue.ShowWindow( SW_HIDE );
    m_staticParameterValue.ShowWindow( SW_SHOW );
    m_editParamValue.EnableWindow( FALSE );
    m_editParamValue.ShowWindow( SW_HIDE );
    GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_SHOW );
    GetDlgItem( IDC_SETVALUE )->EnableWindow( TRUE );
     m_date.ShowWindow( SW_NORMAL );
     m_date.EnableWindow( TRUE );
      break;

   default:
    GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
    GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
    GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
     m_date.EnableWindow( FALSE );
     m_date.ShowWindow( SW_HIDE );
    m_cboxParamValue.EnableWindow( FALSE );
    m_cboxParamValue.ShowWindow( SW_HIDE );
    m_staticParameterValue.ShowWindow( SW_NORMAL );
    m_editParamValue.ShowWindow( SW_SHOWNORMAL );
    m_editParamValue.EnableWindow( TRUE );
    GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_NORMAL );
    GetDlgItem( IDC_SETVALUE )->EnableWindow( TRUE );
    break;
   }
}

void CMethodDlg::OnParamValueChange ( ) [protected]

Definition at line 367 of file MethodDg.Cpp.

{
   // The user is typing in the ParamValue edit box, so set the default button
   // to SetValue.
   SetDefID( IDC_SETVALUE );
}

void CMethodDlg::OnParamValueSetFocus ( ) [protected]

Definition at line 359 of file MethodDg.Cpp.

{
   // The ParamValue edit box just got the keyboard focus.  The user should be
   // able to set the value to the contents of the edit box just by hitting
   // ENTER.
   SetDefID( IDC_SETVALUE );
}

void CMethodDlg::OnSetValue ( ) [protected]

Definition at line 242 of file MethodDg.Cpp.

{
   int iType;
   int iItem;
   CString strEditText;
   CString strValue;
   COleDateTime date;

   iItem = m_cboxParamType.GetCurSel();
   ASSERT( iItem != CB_ERR );
   iType = (int)m_cboxParamType.GetItemData( iItem );
   if( iType == VTI_DATE )
   {
      m_date.GetTime( date );
      *m_pvarCurrentParam = COleVariant( date );
   }
  else if( iType == VTI_BOOL )
  {
    *m_pvarCurrentParam = COleVariant( VARIANT_BOOL(
      (m_cboxParamValue.GetCurSel() == 1) ? ~VARIANT_FALSE :
      VARIANT_FALSE ), VT_BOOL );
  }
   else
   {
      m_editParamValue.GetWindowText( strEditText );
      if (!strEditText.IsEmpty())
     *m_pvarCurrentParam = strEditText;
   }

   TRY
   {
   m_pvarCurrentParam->ChangeType( VTIToVT( iType ) );
    DisplayParamValueInList( m_iCurrentParam );
    m_piParamTypes[m_iCurrentParam] = iType;
    if( m_iCurrentParam == (m_pMethodInfo->GetNumParams()-1) )
    {
     // We just set the last parameter, so set the Invoke button to be the
     // default button.
     SetDefID( IDC_INVOKE );
    }
    else
    {
     // Move on to the next parameter.
     m_listParams.SetItemState( m_iCurrentParam+1, LVIS_SELECTED,
      LVIS_SELECTED );
     SetDefID( IDC_SETVALUE );
     m_editParamValue.SetSel( 0, -1 );
    }
   }
   CATCH( COleException, e )
   {
    TRACE( "ChangeType() failed.\n" );
   }
   END_CATCH
}

Member Data Documentation

CTypedPtrArray< CPtrArray, COleVariant* > CMethodDlg::m_apParams [protected]

Definition at line 65 of file MethodDg.H.

CComboBox CMethodDlg::m_cboxMethodName

Definition at line 42 of file MethodDg.H.

CComboBox CMethodDlg::m_cboxParamType

Definition at line 41 of file MethodDg.H.

CComboBox CMethodDlg::m_cboxParamValue

Definition at line 33 of file MethodDg.H.

CDateTimeCtrl CMethodDlg::m_date

Definition at line 34 of file MethodDg.H.

CEdit CMethodDlg::m_editExceptionDesc

Definition at line 36 of file MethodDg.H.

CEdit CMethodDlg::m_editExceptionSource

Definition at line 37 of file MethodDg.H.

CEdit CMethodDlg::m_editParamValue

Definition at line 39 of file MethodDg.H.

CEdit CMethodDlg::m_editReturnValue

Definition at line 38 of file MethodDg.H.

CExcepInfo CMethodDlg::m_excepInfo [protected]

Definition at line 71 of file MethodDg.H.

int CMethodDlg::m_iCurrentParam [protected]

Definition at line 69 of file MethodDg.H.

CListCtrl CMethodDlg::m_listParams

Definition at line 40 of file MethodDg.H.

IDispatchPtr CMethodDlg::m_pDispatch [protected]

Definition at line 61 of file MethodDg.H.

CInterfaceInfo* CMethodDlg::m_pInterfaceInfo [protected]

Definition at line 62 of file MethodDg.H.

int* CMethodDlg::m_piParamTypes [protected]

Definition at line 66 of file MethodDg.H.

CMethodInfo* CMethodDlg::m_pMethodInfo [protected]

Definition at line 63 of file MethodDg.H.

CMethodParamInfo* CMethodDlg::m_pParamInfo [protected]

Definition at line 64 of file MethodDg.H.

COleVariant* CMethodDlg::m_pvarCurrentParam [protected]

Definition at line 68 of file MethodDg.H.

COleVariant* CMethodDlg::m_pvarParams [protected]

Definition at line 67 of file MethodDg.H.

CStatic CMethodDlg::m_staticParameterValue

Definition at line 35 of file MethodDg.H.

BOOL CMethodDlg::m_tException [protected]

Definition at line 72 of file MethodDg.H.

COleVariant CMethodDlg::m_varResult [protected]

Definition at line 70 of file MethodDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/MethodDg.H
  • ole/TstCon/MethodDg.Cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMethodInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Friends

CMethodInfo Class Reference

#include "MethInfo.H"

List of all members.

Public Member Functions

CMethodInfo ()
~CMethodInfo ()
void | EnableEditRequestLogging (BOOL tEnable)
void | EnableLogging (BOOL tEnable)
DISPID | GetID () const
INVOKEKIND | GetInvokeKind () const
CString | GetName () const
int | GetNumParams () const
CMethodParamInfo * | GetParam (int iParam) const
int | GetRequestEditResponse () const
HRESULT | Init (ITypeInfo *pTypeInfo, const FUNCDESC *pFuncDesc)
HRESULT | InitPropertyGet (ITypeInfo *pTypeInfo, const VARDESC *pVarDesc)
HRESULT | InitPropertyPut (ITypeInfo *pTypeInfo, const VARDESC *pVarDesc)
BOOL | IsBindable () const
BOOL | IsLogged () const
BOOL | LogEditRequests () const
void | LogEvent (CLog &log, DISPPARAMS *pdpParams)
BOOL | RequestsEdit () const
void | SetRequestEditResponse (int eResponse)

Public Attributes

CTypedPtrArray< CPtrArray,
CMethodParamInfo * > 		m_apParamInfo
DISPID | m_dispid
int | m_eRequestEditResponse
INVOKEKIND | m_invkind
CString | m_strName
BOOL | m_tBindable
BOOL | m_tLog
BOOL | m_tLogEditRequests
BOOL | m_tRequestEdit

Friends

CLog & | operator<< (CLog &log, CMethodInfo *pMethodInfo)

Detailed Description

Definition at line 30 of file MethInfo.H.

Constructor & Destructor Documentation

CMethodInfo::CMethodInfo ( )

Definition at line 47 of file MethInfo.Cpp.

                         :
   m_tLog( TRUE ),
   m_tLogEditRequests( TRUE ),
   m_eRequestEditResponse( REQUESTEDIT_ALWAYS )
{
}

CMethodInfo::~CMethodInfo ( )

Definition at line 54 of file MethInfo.Cpp.

{
   int iParam;

   for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
   {
    delete m_apParamInfo[iParam];
   }
}

Member Function Documentation

void CMethodInfo::EnableEditRequestLogging ( BOOL tEnable )

Definition at line 64 of file MethInfo.Cpp.

{
   m_tLogEditRequests = tEnable;
}

void CMethodInfo::EnableLogging ( BOOL tEnable )

Definition at line 69 of file MethInfo.Cpp.

{
   m_tLog = tEnable;
}

DISPID CMethodInfo::GetID ( void ) const

Definition at line 74 of file MethInfo.Cpp.

{
   return( m_dispid );
}

INVOKEKIND CMethodInfo::GetInvokeKind ( ) const

Definition at line 79 of file MethInfo.Cpp.

{
   return( m_invkind );
}

CString CMethodInfo::GetName ( ) const

Definition at line 84 of file MethInfo.Cpp.

{
   return( m_strName );
}

int CMethodInfo::GetNumParams ( ) const

Definition at line 89 of file MethInfo.Cpp.

{
   return( (int)m_apParamInfo.GetSize() );
}

CMethodParamInfo * CMethodInfo::GetParam ( int iParam ) const

Definition at line 94 of file MethInfo.Cpp.

{
   return( m_apParamInfo[iParam] );
}

int CMethodInfo::GetRequestEditResponse ( ) const

Definition at line 99 of file MethInfo.Cpp.

{
   return( m_eRequestEditResponse );
}

HRESULT CMethodInfo::Init | ( | ITypeInfo * | pTypeInfo,
 |  | const FUNCDESC * | pFuncDesc
 | ) |  |

Definition at line 104 of file MethInfo.Cpp.

{

   USES_CONVERSION_EX;
   HRESULT hResult;
   UINT nNames;
   int iParam;
   UINT iName;
   LPCOLESTR pszParamName;
   CString strPropertyValue;

   ENSURE( pTypeInfo != NULL );
   ENSURE( pFuncDesc != NULL );

   m_dispid = pFuncDesc->memid;
   m_invkind = pFuncDesc->invkind;
   m_tBindable = pFuncDesc->wFuncFlags&FUNCFLAG_FBINDABLE;
   m_tRequestEdit = pFuncDesc->wFuncFlags&FUNCFLAG_FREQUESTEDIT;

   m_apParamInfo.SetSize( pFuncDesc->cParams );
   for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
   {
    m_apParamInfo[iParam] = new CMethodParamInfo;
    if( m_apParamInfo[iParam] == NULL )
    {
     return( E_OUTOFMEMORY );
    }
   }

   ::ATL::CAutoStackPtr<BSTR> pbstrNames((BSTR*)_malloca( (pFuncDesc->cParams+1)*sizeof( BSTR ) ));
   for( iName = 0; iName < UINT( pFuncDesc->cParams+1 ); iName++ )
   {
    pbstrNames[iName] = NULL;
   }

   hResult = pTypeInfo->GetNames( m_dispid, pbstrNames, pFuncDesc->cParams+1,
    &nNames );
    if( FAILED( hResult ) )
   {
  return( hResult );
   }
   ASSERT( nNames > 0 );

   m_strName = pbstrNames[0];
   TRACE( "  Method: %s ", LPCTSTR( m_strName ) );
   switch( m_invkind )
   {
   case INVOKE_FUNC:
    ASSERT( nNames == UINT( pFuncDesc->cParams+1 ) );
    break;

   case INVOKE_PROPERTYGET:
    ASSERT( nNames == UINT( pFuncDesc->cParams+1 ) );
    break;

   case INVOKE_PROPERTYPUT:
    ASSERT( nNames == UINT( pFuncDesc->cParams ) );
    break;

   case INVOKE_PROPERTYPUTREF:
    ASSERT( nNames == UINT( pFuncDesc->cParams ) );
    break;

   default:
    ASSERT( FALSE );
    break;
   }
   for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
   {
    if( pbstrNames[iParam+1] == NULL )
    {
     // This must be the right-hand side of a property put or putref.
     LOAD_STRING_FROM_RESOURCE( strPropertyValue, IDS_PROPERTYVALUE );
     pszParamName = T2OLE_EX_DEF( LPCTSTR( strPropertyValue ) );
    }
    else
    {
     pszParamName = pbstrNames[iParam+1];
    }
    m_apParamInfo[iParam]->Init( pszParamName,
     &pFuncDesc->lprgelemdescParam[iParam] );
   }

   for( iName = 0; iName < UINT( pFuncDesc->cParams+1 ); iName++ )
   {
    if( pbstrNames[iName] != NULL )
    {
     ::SysFreeString( pbstrNames[iName] );
    }
   }
   return( S_OK );
}

HRESULT CMethodInfo::InitPropertyGet | ( | ITypeInfo * | pTypeInfo,
 |  | const VARDESC * | pVarDesc
 | ) |  |

Definition at line 197 of file MethInfo.Cpp.

{
   HRESULT hResult;
   BSTR bstrName;
   UINT nNames;

   ENSURE( pTypeInfo != NULL );
   ENSURE( pVarDesc != NULL );

   m_dispid = pVarDesc->memid;
   m_invkind = INVOKE_PROPERTYGET;
   m_tBindable = pVarDesc->wVarFlags&VARFLAG_FBINDABLE;
   m_tRequestEdit = pVarDesc->wVarFlags&FUNCFLAG_FREQUESTEDIT;

   bstrName = NULL;
   hResult = pTypeInfo->GetNames( m_dispid, &bstrName, 1, &nNames );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }
   ASSERT( nNames == 1 );

   m_strName = bstrName;
   SysFreeString( bstrName );

   return( S_OK );
}

HRESULT CMethodInfo::InitPropertyPut | ( | ITypeInfo * | pTypeInfo,
 |  | const VARDESC * | pVarDesc
 | ) |  |

Definition at line 226 of file MethInfo.Cpp.

{

   CString strPropertyValue;
   HRESULT hResult;
   BSTR bstrName;
   UINT nNames;

   ENSURE( pTypeInfo != NULL );
   ENSURE( pVarDesc != NULL );

   m_dispid = pVarDesc->memid;
   m_invkind = INVOKE_PROPERTYPUT;
   m_tBindable = pVarDesc->wVarFlags&VARFLAG_FBINDABLE;
   m_tRequestEdit = pVarDesc->wVarFlags&FUNCFLAG_FREQUESTEDIT;

   bstrName = NULL;
   hResult = pTypeInfo->GetNames( m_dispid, &bstrName, 1, &nNames );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }
   ASSERT( nNames == 1 );

   m_strName = bstrName;
   SysFreeString( bstrName );

   m_apParamInfo.SetSize( 1 );
   m_apParamInfo[0] = new CMethodParamInfo;
   if( m_apParamInfo[0] == NULL )
   {
    return( E_OUTOFMEMORY );
   }

   LOAD_STRING_FROM_RESOURCE( strPropertyValue, IDS_PROPERTYVALUE );

   m_apParamInfo[0]->Init( CT2COLE( LPCTSTR( strPropertyValue ) ),
    &pVarDesc->elemdescVar );

   return( S_OK );
}

BOOL CMethodInfo::IsBindable ( ) const

Definition at line 269 of file MethInfo.Cpp.

{
   return( m_tBindable );
}

BOOL CMethodInfo::IsLogged ( ) const

Definition at line 274 of file MethInfo.Cpp.

{
   return( m_tLog );
}

BOOL CMethodInfo::LogEditRequests ( ) const

Definition at line 279 of file MethInfo.Cpp.

{
   return( m_tLogEditRequests );
}

void CMethodInfo::LogEvent | ( | CLog & | log,
 |  | DISPPARAMS * | pdpParams
 | ) |  |

Definition at line 284 of file MethInfo.Cpp.

{
   int iParam;
   CMethodParamInfo* pParamInfo;
   COleVariant varParamValue;

   log<<m_strName<<_T( " " );

   if( pdpParams->cArgs != UINT( m_apParamInfo.GetSize() ) )
   {
    log<<_T( "(Wrong number of arguments)\n" );
   }
   else
   {
    for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
    {
     pParamInfo = m_apParamInfo[iParam];
     log<<_T( "{" )<<pParamInfo->GetName()<<_T( "=" );
     try
     {
       varParamValue = pdpParams->rgvarg[pdpParams->cArgs-iParam-1];
     log<<varParamValue;
     }
     catch( COleException* pException )
     {
      pException->Delete();
     }
     log<<_T( "}" );
    }
    log<<_T( "\n" );
   }
}

BOOL CMethodInfo::RequestsEdit ( ) const

Definition at line 317 of file MethInfo.Cpp.

{
   return( m_tRequestEdit );
}

void CMethodInfo::SetRequestEditResponse ( int eResponse )

Definition at line 322 of file MethInfo.Cpp.

{
   m_eRequestEditResponse = eResponse;
}

Friends And Related Function Documentation

CLog& operator<< | ( | CLog & | log,
 |  | CMethodInfo * | pMethodInfo |
 | ) |  |  | [friend]

Member Data Documentation

CTypedPtrArray< CPtrArray, CMethodParamInfo* > CMethodInfo::m_apParamInfo

Definition at line 60 of file MethInfo.H.

DISPID CMethodInfo::m_dispid

Definition at line 58 of file MethInfo.H.

int CMethodInfo::m_eRequestEditResponse

Definition at line 65 of file MethInfo.H.

INVOKEKIND CMethodInfo::m_invkind

Definition at line 59 of file MethInfo.H.

CString CMethodInfo::m_strName

Definition at line 57 of file MethInfo.H.

BOOL CMethodInfo::m_tBindable

Definition at line 62 of file MethInfo.H.

BOOL CMethodInfo::m_tLog

Definition at line 61 of file MethInfo.H.

BOOL CMethodInfo::m_tLogEditRequests

Definition at line 64 of file MethInfo.H.

BOOL CMethodInfo::m_tRequestEdit

Definition at line 63 of file MethInfo.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/MethInfo.H
  • ole/TstCon/MethInfo.Cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMethodParamInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMethodParamInfo Class Reference

#include "MethInfo.H"

List of all members.

Public Member Functions

CMethodParamInfo ()
~CMethodParamInfo ()
CString | GetName () const
VARTYPE | GetType () const
HRESULT | Init (LPCOLESTR pszName, const ELEMDESC *pElemDesc)

Public Attributes

CString | m_strName
VARTYPE | m_vt

Detailed Description

Definition at line 10 of file MethInfo.H.

Constructor & Destructor Documentation

CMethodParamInfo::CMethodParamInfo ( )

Definition at line 19 of file MethInfo.Cpp.

                                   :
   m_vt( VT_EMPTY )
{
}

CMethodParamInfo::~CMethodParamInfo ( )

Definition at line 24 of file MethInfo.Cpp.

{
}

Member Function Documentation

CString CMethodParamInfo::GetName ( ) const

Definition at line 28 of file MethInfo.Cpp.

{
   return( m_strName );
}

VARTYPE CMethodParamInfo::GetType ( void ) const

Definition at line 33 of file MethInfo.Cpp.

{
   return( m_vt );
}

HRESULT CMethodParamInfo::Init | ( | LPCOLESTR | pszName,
 |  | const ELEMDESC * | pElemDesc
 | ) |  |

Definition at line 38 of file MethInfo.Cpp.

{
   m_strName = pszName;
   m_vt = pElemDesc->tdesc.vt;

   return( S_OK );
}

Member Data Documentation

CString CMethodParamInfo::m_strName

Definition at line 21 of file MethInfo.H.

VARTYPE CMethodParamInfo::m_vt

Definition at line 22 of file MethInfo.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/MethInfo.H
  • ole/TstCon/MethInfo.Cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMFCBindApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMFCBindApp Class Reference

#include "MFCBind.h"

List of all members.

Public Member Functions

CMFCBindApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 29 of file MFCBind.h.

Constructor & Destructor Documentation

CMFCBindApp::CMFCBindApp ( )

Definition at line 44 of file MFCBind.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CMFCBindApp::InitInstance ( ) [virtual]

Definition at line 58 of file MFCBind.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Change the registry key under which our settings are stored.
  // You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // 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(CMFCBindDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CMFCBindView));
  pDocTemplate->SetContainerInfo(IDR_CNTR_INPLACE);
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CMFCBindApp::OnAppAbout ( )

Definition at line 148 of file MFCBind.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • ole/MFCBind/MFCBind.h
  • ole/MFCBind/MFCBind.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMFCBindCntrItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Attributes | Protected Member Functions

CMFCBindCntrItem Class Reference

#include "CntrItem.h"

List of all members.

Public Member Functions

CMFCBindCntrItem (CMFCBindDoc *pContainer=NULL)
~CMFCBindCntrItem ()
BOOL | FinishCreate (SCODE sc)
CMFCBindView * GetActiveView ()
CMFCBindDoc * GetDocument ()
void | LoadFromMoniker (LPUNKNOWN pUnk, OLECHAR *swzName)
virtual void | OnActivate ()
virtual void | OnChange (OLE_NOTIFICATION wNotification, DWORD dwParam)
void | ProcessNewObject ()
virtual void | Serialize (CArchive &ar)

Static Public Attributes

static int | m_nDocID = 1

Protected Member Functions

virtual BOOL | OnChangeItemPosition (const CRect &rectPos)
virtual void | OnDeactivateUI (BOOL bUndoable)
virtual void | OnGetItemPosition (CRect &rPosition)

Detailed Description

Definition at line 22 of file CntrItem.h.

Constructor & Destructor Documentation

CMFCBindCntrItem::CMFCBindCntrItem ( CMFCBindDoc * pContainer = NULL )

Definition at line 35 of file CntrItem.cpp.

  : COleDocObjectItem(pContainer)
{
}

CMFCBindCntrItem::~CMFCBindCntrItem ( )

Definition at line 40 of file CntrItem.cpp.

{
  // TODO: add cleanup code here

}

Member Function Documentation

BOOL CMFCBindCntrItem::FinishCreate ( SCODE sc )

Definition at line 158 of file CntrItem.cpp.

{
  // FinishCreate is an undocumented virtual function that we
  // override here to do some extra processing after the object
  // has been created.

  if (FAILED(sc))
  {
    AfxMessageBox(_T("OleCreate failed to create this item!"));
    return FALSE;
  }

  BOOL bRet = COleDocObjectItem::FinishCreate(sc);
  if (bRet)
    ProcessNewObject();
  return bRet;

}

CMFCBindView* CMFCBindCntrItem::GetActiveView ( ) [inline]

Definition at line 38 of file CntrItem.h.

    { return (CMFCBindView*)COleDocObjectItem::GetActiveView(); }

CMFCBindDoc* CMFCBindCntrItem::GetDocument ( ) [inline]

Definition at line 36 of file CntrItem.h.

    { return (CMFCBindDoc*)COleDocObjectItem::GetDocument(); }

void CMFCBindCntrItem::LoadFromMoniker | ( | LPUNKNOWN | pUnk,
 |  | OLECHAR * | swzName
 | ) |  |

Definition at line 177 of file CntrItem.cpp.

{
  HRESULT hr;
  // Ask the system for a URL Moniker
  IMoniker* pIMoniker;
  hr = CreateURLMoniker(NULL, (LPWSTR)szwName, &pIMoniker);
  if ( SUCCEEDED(hr) )
  {
    // Get the IPersistMoniker interface
    IPersistMoniker* pPMk;
    hr = pUnk->QueryInterface(
                IID_IPersistMoniker,
                (void **)&pPMk);
    if ( SUCCEEDED(hr) )
    {
        // note: do not register our BSC when calling IPM::Load directly
      IBindCtx *pBCtx;
      hr = CreateBindCtx(0, &pBCtx);
      if ( SUCCEEDED(hr) )
      {
        // Call Load on the IPersistMoniker
        hr = pPMk->Load(FALSE, pIMoniker, pBCtx, STGM_READ);
          pBCtx->Release();
      }
      pPMk->Release();
    }
    pIMoniker->Release( );
  }
}

void CMFCBindCntrItem::OnActivate ( ) [virtual]

Definition at line 69 of file CntrItem.cpp.

{
   CFrameWnd* pFrame = DYNAMIC_DOWNCAST(CFrameWnd, AfxGetApp()->m_pMainWnd);
   ENSURE(pFrame != NULL);

   CWnd* pView = pFrame->GetActiveView();
   ENSURE(pView != NULL);

   COleDocObjectItem* pItem =
    (COleDocObjectItem*) GetDocument()->GetInPlaceActiveItem(pView);

   // if this isn't the item being activated, deactivate it.
   if (pItem != NULL && pItem != this)
    pItem->Deactivate();

   COleDocObjectItem::OnActivate();
}

void CMFCBindCntrItem::OnChange | ( | OLE_NOTIFICATION | wNotification,
 |  | DWORD | dwParam |
 | ) |  |  | [virtual]

Definition at line 46 of file CntrItem.cpp.

{
  ASSERT_VALID(this);

  COleDocObjectItem::OnChange(nCode, dwParam);
  GetDocument()->UpdateAllViews(NULL);
}

BOOL CMFCBindCntrItem::OnChangeItemPosition ( const CRect & rectPos ) [protected, virtual]

Definition at line 54 of file CntrItem.cpp.

{
  ASSERT_VALID(this);

  if (!COleDocObjectItem::OnChangeItemPosition(rectPos))
    return FALSE;
  return TRUE;
}

void CMFCBindCntrItem::OnDeactivateUI ( BOOL bUndoable ) [protected, virtual]

Definition at line 87 of file CntrItem.cpp.

{
  COleDocObjectItem::OnDeactivateUI(bUndoable);
}

void CMFCBindCntrItem::OnGetItemPosition ( CRect & rPosition ) [protected, virtual]

Definition at line 63 of file CntrItem.cpp.

{
  ASSERT_VALID(this);
  m_pView->GetClientRect(rPosition);
}

void CMFCBindCntrItem::ProcessNewObject ( )

Definition at line 131 of file CntrItem.cpp.

{
  // This function get's an HICON for the server from the registry by
  // using our GetObjectIconFromRegistry function.  We also generate a
  // name and tell the object list view to add this information to
  // the list box.

  if (!m_lpObject)
    return; //no object, something must've gone wrong

  CString strName;
  strName.Format(_T("Section %d "), m_nDocID);
  m_nDocID++;

  HICON hIcon = GetIconFromRegistry();
  if (hIcon != NULL)
  {
    CMainFrame* pFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetApp()->m_pMainWnd);
    ENSURE(pFrame != NULL);
    CObjListView *pListView = pFrame->GetObjListView();
    if (pListView == NULL)
      return;

    pListView->AddItem((COleDocObjectItem*) this, strName, hIcon);
  }
}

void CMFCBindCntrItem::Serialize ( CArchive & ar ) [virtual]

Definition at line 92 of file CntrItem.cpp.

{
  ASSERT_VALID(this);

  // Call base class first to read in COleDocObjectItem data.
  // Since this sets up the m_pDocument pointer returned from
  //  CMFCBindCntrItem::GetDocument, it is a good idea to call
  //  the base class Serialize first.
  COleDocObjectItem::Serialize(ar);

  // now store/retrieve data specific to CMFCBindCntrItem
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

Member Data Documentation

int CMFCBindCntrItem::m_nDocID = 1 [static]

Definition at line 58 of file CntrItem.h.

The documentation for this class was generated from the following files:
  • ole/MFCBind/CntrItem.h
  • ole/MFCBind/CntrItem.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMFCBindDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMFCBindDoc Class Reference

#include "BindDoc.h"

List of all members.

Public Member Functions

virtual | ~CMFCBindDoc ()
virtual void | OnCloseDocument ()
virtual BOOL | OnNewDocument ()
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CMFCBindDoc ()
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrintAll ()
afx_msg void | OnOleInsertNew ()
afx_msg void | OnSectionRemove ()
afx_msg void | OnUpdateSectionRemove (CCmdUI *pCmdUI)

Detailed Description

Definition at line 20 of file BindDoc.h.

Constructor & Destructor Documentation

CMFCBindDoc::CMFCBindDoc ( ) [protected]

Definition at line 53 of file BindDoc.cpp.

{
  // Use OLE compound files
  EnableCompoundFile();
}

CMFCBindDoc::~CMFCBindDoc ( ) [virtual]

Definition at line 59 of file BindDoc.cpp.

{
}

Member Function Documentation

void CMFCBindDoc::OnCloseDocument ( ) [virtual]

Definition at line 292 of file BindDoc.cpp.

{
  CMainFrame *pFrame = NULL;
  CObjListView* pView = NULL;
  pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
  ENSURE(pFrame != NULL);

  pView = pFrame->GetObjListView();
  ENSURE(pView != NULL);

  if(pView)
    pView->RemoveAllItems();

  COleDocument::OnCloseDocument();
}

void CMFCBindDoc::OnFilePrint ( ) [protected]

Definition at line 226 of file BindDoc.cpp.

{
  CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
  ENSURE(pFrame != NULL);

  CMFCBindView *pView = pFrame->GetDocView();
  ENSURE(pView != NULL);

  CPrintInfo pi;
  pView->DoPreparePrinting(&pi);
  if( COleDocObjectItem::OnPreparePrinting(pView,&pi) )
  {
    COleDocObjectItem::OnPrint(pView,&pi);
  }
}

void CMFCBindDoc::OnFilePrintAll ( ) [protected]

Definition at line 242 of file BindDoc.cpp.

{
  CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
  ENSURE(pFrame != NULL);

  CMFCBindView *pView = pFrame->GetDocView();
  ENSURE(pView != NULL);

  CPrintInfo pi;
  pView->DoPreparePrinting(&pi);
  if( COleDocObjectItem::OnPreparePrinting(pView,&pi,TRUE) )
  {
    COleDocObjectItem::OnPrint(pView,&pi,TRUE);
  }

}

BOOL CMFCBindDoc::OnNewDocument ( ) [virtual]

Definition at line 63 of file BindDoc.cpp.

{
  if (!COleDocument::OnNewDocument())
    return FALSE;
  CMainFrame *pFrame = NULL;
  CObjListView* pView = NULL;
  pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
  if(!pFrame)
    return TRUE;

  pView = pFrame->GetObjListView();
  ASSERT(pView != NULL);

  if(pView)
    pView->RemoveAllItems();
  CMFCBindCntrItem::m_nDocID=1;

  return TRUE;
}

void CMFCBindDoc::OnOleInsertNew ( ) [protected]

Definition at line 122 of file BindDoc.cpp.

{
  // Invoke the standard Insert Object dialog box to obtain information
  //  for new CMFCBindCntrItem object.
  COleInsertDialog dlg;
  if (dlg.DoModal(COleInsertDialog::DocObjectsOnly) != IDOK)
    return;

  CMainFrame* pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
  ENSURE(pFrame != NULL);

  CMFCBindView* pViewObjCont = (CMFCBindView*) pFrame->GetDocView();
  ENSURE(pViewObjCont != NULL);

  pViewObjCont->BeginWaitCursor();

  CMFCBindCntrItem* pItem = NULL;
  TRY
  {
    // Create new item connected to this document.
    pItem = new CMFCBindCntrItem(this);
    ASSERT_VALID(pItem);

    //have the dialog create the item
    if (!dlg.CreateItem(pItem))
    {
      delete pItem;
      return;
    }
    ASSERT_VALID(pItem);

    // make sure we deactivate any active items first.
    COleClientItem* pActiveItem = GetInPlaceActiveItem(pViewObjCont);
    if (pActiveItem != NULL)
      pActiveItem->Deactivate();

    // If item created from class list (not from file) then launch
    //  the server to edit the item.
    pItem->Activate(OLEIVERB_SHOW, pViewObjCont);
    ASSERT_VALID(pItem);

    // As an arbitrary user interface design, this sets the selection
    //  to the last item inserted.

    // TODO: reimplement selection as appropriate for your application

    // set selection to last inserted item
    pViewObjCont->m_pSelection = (CMFCBindCntrItem*) pItem;
    UpdateAllViews(NULL);
  }
  CATCH(CException, e)
  {
    if (pItem != NULL)
    {
      ASSERT_VALID(pItem);
      pItem->Delete();

      pFrame->GetObjListView()->RemoveItem(pItem);
    }
    AfxMessageBox(IDP_FAILED_TO_CREATE);
  }
  END_CATCH

  pViewObjCont->EndWaitCursor();
}

BOOL CMFCBindDoc::OnOpenDocument ( LPCTSTR lpszPathName ) [virtual]

Definition at line 260 of file BindDoc.cpp.

{
  //Make sure all items are removed from the object list view.
  CMainFrame *pFrame = NULL;
  CObjListView *pObjView=NULL;
  pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
  if(pFrame)
    pObjView = pFrame->GetObjListView();
  if(pObjView)
    pObjView->RemoveAllItems();

  //Open the new document
  if (!COleDocument::OnOpenDocument(lpszPathName))
    return FALSE;

  POSITION pos = GetStartPosition();
  //activate and set focus to the first item.
  COleClientItem *pActiveItem = GetNextClientItem(pos);
  if(pActiveItem)
  {
    ENSURE(pFrame);
    pActiveItem->Activate(OLEIVERB_SHOW,pFrame->GetDocView());
    pActiveItem->GetInPlaceWindow()->SetFocus();
    CMFCBindView *pView = pFrame->GetDocView();
    pView->m_pSelection = (CMFCBindCntrItem*)pActiveItem;
    pFrame->GetObjListView()->m_listbox.SetCurSel(0);
  }
  CMFCBindCntrItem::m_nDocID=1;

  return TRUE;
}

void CMFCBindDoc::OnSectionRemove ( ) [protected]

Definition at line 188 of file BindDoc.cpp.

{
  // This is the menu handler for the Remove menu item.  We get
  // the currently selected item, close it, remove it from the document's
  // list of items and remove it's icon from the list box.

  CMainFrame *pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
  ENSURE(pFrame != NULL);

  CView *pViewObjCont = (CView*) pFrame->GetDocView();
  ENSURE(pViewObjCont != NULL);

  COleClientItem* pItem = GetPrimarySelectedItem(pViewObjCont);

  if (pItem != NULL)
  {
    // remove the item from the list box.
    pItem->Delete();
    pFrame->GetObjListView()->RemoveItem(pItem);
  }
}

void CMFCBindDoc::OnUpdateSectionRemove ( CCmdUI * pCmdUI ) [protected]

Definition at line 210 of file BindDoc.cpp.

{
  // we'll only enable the Remove menu item if there is a selected object
  CMainFrame *pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
  ENSURE(pFrame != NULL);

  CView *pObjCont = (CView*) pFrame->GetDocView();

  if (pObjCont != NULL)
    pCmdUI->Enable(); //we have an object selected
  else
    pCmdUI->Enable(FALSE);

}

void CMFCBindDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 88 of file BindDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }

  // Calling the base class COleDocument enables serialization
  //  of the container document's COleClientItem objects.
  COleDocument::Serialize(ar);
}

The documentation for this class was generated from the following files:
  • ole/MFCBind/BindDoc.h
  • ole/MFCBind/BindDoc.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMFCBindView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CMFCBindView Class Reference

#include "BindView.h"

List of all members.

Public Member Functions

virtual | ~CMFCBindView ()
CMFCBindDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
void | OnInitialUpdate ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

CMFCBindCntrItem * m_pSelection

Protected Member Functions

CMFCBindView ()
virtual BOOL | IsSelected (const CObject *pDocItem) const
afx_msg void | OnCancelEditCntr ()
afx_msg void | OnDestroy ()
afx_msg void | OnInsertObject ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Detailed Description

Definition at line 22 of file BindView.h.

Constructor & Destructor Documentation

CMFCBindView::CMFCBindView ( ) [protected]

Definition at line 45 of file BindView.cpp.

{
  m_pSelection = NULL;
  // TODO: add construction code here

}

CMFCBindView::~CMFCBindView ( ) [virtual]

Definition at line 52 of file BindView.cpp.

{
}

Member Function Documentation

CMFCBindDoc * CMFCBindView::GetDocument ( ) [inline]

Definition at line 78 of file BindView.h.

   { return (CMFCBindDoc*)m_pDocument; }

BOOL CMFCBindView::IsSelected ( const CObject * pDocItem ) const [protected, virtual]

Definition at line 102 of file BindView.cpp.

{
  // The implementation below is adequate if your selection consists of
  //  only CMFCBindCntrItem objects.  To handle different selection
  //  mechanisms, the implementation here should be replaced.

  // TODO: implement this function that tests for a selected OLE client item

  return pDocItem == m_pSelection;
}

void CMFCBindView::OnCancelEditCntr ( ) [protected]

Definition at line 116 of file BindView.cpp.

{
  // Close any in-place active item on this view.
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL)
  {
    pActiveItem->Close();
  }
  ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
}

void CMFCBindView::OnDestroy ( void ) [protected]

Definition at line 85 of file BindView.cpp.

{
  // Deactivate the item on destruction; this is important
  // when a splitter view is being used.
   CView::OnDestroy();
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
    pActiveItem->Deactivate();
    ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
}

void CMFCBindView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 67 of file BindView.cpp.

{
  CMFCBindDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  // DocObjects don't require any drawing
}

void CMFCBindView::OnInitialUpdate ( )

Definition at line 75 of file BindView.cpp.

{
  CView::OnInitialUpdate();

  // TODO: remove this code when final selection model code is written
  m_pSelection = NULL;    // initialize selection

}

afx_msg void CMFCBindView::OnInsertObject ( ) [protected]
void CMFCBindView::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 129 of file BindView.cpp.

{
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL &&
    pActiveItem->GetItemState() == COleClientItem::activeUIState)
  {
    // need to set focus to this item if it is in the same view
    CWnd* pWnd = pActiveItem->GetInPlaceWindow();
    if (pWnd != NULL)
    {
      pWnd->SetFocus();   // don't call the base class
      return;
    }
  }

  CView::OnSetFocus(pOldWnd);
}

void CMFCBindView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 147 of file BindView.cpp.

{
  CView::OnSize(nType, cx, cy);
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL)
    pActiveItem->SetItemRects();
}

BOOL CMFCBindView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 56 of file BindView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

Member Data Documentation

CMFCBindCntrItem* CMFCBindView::m_pSelection

Definition at line 38 of file BindView.h.

The documentation for this class was generated from the following files:
  • ole/MFCBind/BindView.h
  • ole/MFCBind/BindView.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMfcieApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMfcieApp Class Reference

#include "mfcie.h"

List of all members.

Public Member Functions

CMfcieApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 31 of file mfcie.h.

Constructor & Destructor Documentation

CMfcieApp::CMfcieApp ( )

Definition at line 40 of file mfcie.cpp.

{
}

Member Function Documentation

BOOL CMfcieApp::InitInstance ( ) [virtual]

Definition at line 52 of file mfcie.cpp.

{
  if (!AfxSocketInit())
  {
    AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Change the registry key under which our settings are stored.
  // You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)

  // 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(CMfcieDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CMfcieView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileOpen)
  {
    cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;
  }

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CMfcieApp::OnAppAbout ( )

Definition at line 147 of file mfcie.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • internet/MFCIE/mfcie.h
  • internet/MFCIE/mfcie.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMfcieDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMfcieDoc Class Reference

#include "mfcieDoc.h"

List of all members.

Public Member Functions

virtual | ~CMfcieDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CMfcieDoc ()

Detailed Description

Definition at line 22 of file mfcieDoc.h.

Constructor & Destructor Documentation

CMfcieDoc::CMfcieDoc ( ) [protected]

Definition at line 39 of file mfcieDoc.cpp.

{
}

CMfcieDoc::~CMfcieDoc ( ) [virtual]

Definition at line 43 of file mfcieDoc.cpp.

{
}

Member Function Documentation

BOOL CMfcieDoc::OnNewDocument ( ) [virtual]

Definition at line 47 of file mfcieDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CMfcieDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 63 of file mfcieDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • internet/MFCIE/mfcieDoc.h
  • internet/MFCIE/mfcieDoc.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMfcieView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMfcieView Class Reference

#include "mfcieVw.h"

List of all members.

Public Member Functions

virtual | ~CMfcieView ()
CMfcieDoc * GetDocument ()
void | OnBeforeNavigate2 (LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray &baPostedData, LPCTSTR lpszHeaders, BOOL *pbCancel)
void | OnDocumentComplete (LPCTSTR lpszUrl)
virtual void | OnDraw (CDC *pDC)
virtual void | OnInitialUpdate ()
void | OnTitleChange (LPCTSTR lpszText)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CMfcieView ()
afx_msg void | OnFileOpen ()
afx_msg void | OnGoBack ()
afx_msg void | OnGoForward ()
afx_msg void | OnGoSearchTheWeb ()
afx_msg void | OnGoStartPage ()
afx_msg void | OnHelpMicrosoftOnTheWebBestOfTheWeb ()
afx_msg void | OnHelpMicrosoftOnTheWebFreeStuff ()
afx_msg void | OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions ()
afx_msg void | OnHelpMicrosoftOnTheWebGetFasterInternetAccess ()
afx_msg void | OnHelpMicrosoftOnTheWebInternetStartPage ()
afx_msg void | OnHelpMicrosoftOnTheWebMicrosoftHomePage ()
afx_msg void | OnHelpMicrosoftOnTheWebSearchTheWeb ()
afx_msg void | OnHelpMicrosoftOnTheWebSendFeedback ()
afx_msg void | OnHelpOnlineSupport ()
afx_msg void | OnHelpWebTutorial ()
afx_msg void | OnViewFontsLarge ()
afx_msg void | OnViewFontsLargest ()
afx_msg void | OnViewFontsMedium ()
afx_msg void | OnViewFontsSmall ()
afx_msg void | OnViewFontsSmallest ()
afx_msg void | OnViewRefresh ()
afx_msg void | OnViewStop ()

Detailed Description

Definition at line 21 of file mfcieVw.h.

Constructor & Destructor Documentation

CMfcieView::CMfcieView ( ) [protected]

Definition at line 61 of file mfcieVw.cpp.

{
}

CMfcieView::~CMfcieView ( ) [virtual]

Definition at line 65 of file mfcieVw.cpp.

{
}

Member Function Documentation

CMfcieDoc * CMfcieView::GetDocument ( ) [inline]

Definition at line 88 of file mfcieVw.h.

   { return (CMfcieDoc*)m_pDocument; }

void CMfcieView::OnBeforeNavigate2 | ( | LPCTSTR | lpszURL,
 |  | DWORD | nFlags,
 |  | LPCTSTR | lpszTargetFrameName,
 |  | CByteArray & | baPostedData,
 |  | LPCTSTR | lpszHeaders,
 |  | BOOL * | pbCancel
 | ) |  |

Definition at line 136 of file mfcieVw.cpp.

{
  // start the animation so that is plays while the new page is being loaded
  ((CMainFrame*)GetParentFrame())->StartAnimation();
}

void CMfcieView::OnDocumentComplete ( LPCTSTR lpszUrl )

Definition at line 115 of file mfcieVw.cpp.

{
  // make sure the main frame has the new URL.  This call also stops the animation
  ((CMainFrame*)GetParentFrame())->SetAddress(lpszUrl);
}

void CMfcieView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 78 of file mfcieVw.cpp.

{
  CMfcieDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
}

void CMfcieView::OnFileOpen ( ) [protected]

Definition at line 300 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_FILETYPES);

  CFileDialog fileDlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, str);

  if(fileDlg.DoModal() == IDOK)
    Navigate2(fileDlg.GetPathName(), 0, NULL);
}

void CMfcieView::OnGoBack ( ) [protected]

Definition at line 145 of file mfcieVw.cpp.

{
  GoBack();
}

void CMfcieView::OnGoForward ( ) [protected]

Definition at line 150 of file mfcieVw.cpp.

{
  GoForward();
}

void CMfcieView::OnGoSearchTheWeb ( ) [protected]

Definition at line 155 of file mfcieVw.cpp.

{
  GoSearch();
}

void CMfcieView::OnGoStartPage ( ) [protected]

Definition at line 160 of file mfcieVw.cpp.

{
  GoHome();
}

void CMfcieView::OnHelpMicrosoftOnTheWebBestOfTheWeb ( ) [protected]

Definition at line 192 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_BEST_OF_THE_WEB);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpMicrosoftOnTheWebFreeStuff ( ) [protected]

Definition at line 200 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_FREE_STUFF);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions ( ) [protected]

Definition at line 208 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_FREQUENTLY_ASKED_QUESTIONS);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpMicrosoftOnTheWebGetFasterInternetAccess ( ) [protected]

Definition at line 216 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_GET_FASTER_INTERNET_ACCESS);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpMicrosoftOnTheWebInternetStartPage ( ) [protected]

Definition at line 248 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_INTERNET_START_PAGE);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpMicrosoftOnTheWebMicrosoftHomePage ( ) [protected]

Definition at line 224 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_MICROSOFT_HOME_PAGE);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpMicrosoftOnTheWebSearchTheWeb ( ) [protected]

Definition at line 232 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_SEARCH_THE_WEB);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpMicrosoftOnTheWebSendFeedback ( ) [protected]

Definition at line 240 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_SEND_FEEDBACK);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpOnlineSupport ( ) [protected]

Definition at line 184 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_ONLINE_SUPPORT);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnHelpWebTutorial ( ) [protected]

Definition at line 176 of file mfcieVw.cpp.

{
  CString str;

  str.LoadString(IDS_WEB_TUTORIAL);
  Navigate2(str, 0, NULL);
}

void CMfcieView::OnInitialUpdate ( ) [virtual]

Definition at line 121 of file mfcieVw.cpp.

{
  // Go to the home page initially
  CHtmlView::OnInitialUpdate();
  CString strCmdLine(AfxGetApp()->m_lpCmdLine);
  if(strCmdLine == _T(""))
  {
    GoHome();
  }
  else
  {
    Navigate(strCmdLine);
  }
}

void CMfcieView::OnTitleChange ( LPCTSTR lpszText )

Definition at line 108 of file mfcieVw.cpp.

{
  // this will change the main frame's title bar
  if (m_pDocument != NULL)
    m_pDocument->SetTitle(lpszText);
}

void CMfcieView::OnViewFontsLarge ( ) [protected]

Definition at line 266 of file mfcieVw.cpp.

{
  COleVariant vaZoomFactor(3l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CMfcieView::OnViewFontsLargest ( ) [protected]

Definition at line 258 of file mfcieVw.cpp.

{
  COleVariant vaZoomFactor(4l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CMfcieView::OnViewFontsMedium ( ) [protected]

Definition at line 274 of file mfcieVw.cpp.

{
  COleVariant vaZoomFactor(2l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CMfcieView::OnViewFontsSmall ( ) [protected]

Definition at line 282 of file mfcieVw.cpp.

{
  COleVariant vaZoomFactor(1l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CMfcieView::OnViewFontsSmallest ( ) [protected]

Definition at line 290 of file mfcieVw.cpp.

{
  COleVariant vaZoomFactor(0l);

  ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
       &vaZoomFactor, NULL);
}

void CMfcieView::OnViewRefresh ( ) [protected]

Definition at line 170 of file mfcieVw.cpp.

{
  Refresh();
}

void CMfcieView::OnViewStop ( ) [protected]

Definition at line 165 of file mfcieVw.cpp.

{
  Stop();
}

BOOL CMfcieView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 69 of file mfcieVw.cpp.

{
  cs.lpszClass = AfxRegisterWndClass(0);
  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • internet/MFCIE/mfcieVw.h
  • internet/MFCIE/mfcieVw.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMFCRibbonNumEdit Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMFCRibbonNumEdit Class Reference

List of all members.

Public Member Functions

CMFCRibbonNumEdit (UINT uiID, int nWidth, LPCTSTR lpszLabel, int nImage=-1)
virtual | ~CMFCRibbonNumEdit ()
virtual CMFCRibbonRichEditCtrl * | CreateEdit (CWnd *pWndParent, DWORD dwEditStyle)

Detailed Description

Definition at line 116 of file MainFrm.cpp.

Constructor & Destructor Documentation

CMFCRibbonNumEdit::CMFCRibbonNumEdit | ( | UINT | uiID,
 |  | int | nWidth,
 |  | LPCTSTR | lpszLabel,
 |  | int | nImage = -1 |
 | ) |  |  | [inline]

Definition at line 119 of file MainFrm.cpp.

    : CMFCRibbonEdit(uiID, nWidth, lpszLabel, nImage)
  {
  }

virtual CMFCRibbonNumEdit::~CMFCRibbonNumEdit ( ) [inline, virtual]

Definition at line 124 of file MainFrm.cpp.

{}

Member Function Documentation

virtual CMFCRibbonRichEditCtrl* CMFCRibbonNumEdit::CreateEdit | ( | CWnd * | pWndParent,
 |  | DWORD | dwEditStyle |
 | ) |  |  | [inline, virtual]

Definition at line 126 of file MainFrm.cpp.

  {
    ASSERT_VALID(this);
    ASSERT_VALID(pWndParent);

    CMFCRibbonNumEditCtrl* pWndEdit = new CMFCRibbonNumEditCtrl(*this);

    if (!pWndEdit->Create(dwEditStyle, CRect(0, 0, 0, 0), pWndParent, m_nID))
    {
      delete pWndEdit;
      return NULL;
    }

    if (m_bHasSpinButtons)
    {
      CreateSpinButton(pWndEdit, pWndParent);
    }

    return pWndEdit;
  }

The documentation for this class was generated from the following file:
  • vc2008fp/MSOffice2007Demo/MainFrm.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMFCRibbonNumEditCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CMFCRibbonNumEditCtrl Class Reference

List of all members.

Public Member Functions

CMFCRibbonNumEditCtrl (CMFCRibbonEdit &edit)
virtual void | OnKillFocus (CWnd *pNewWnd)

Protected Attributes

int | m_nValidNum

Detailed Description

Definition at line 77 of file MainFrm.cpp.

Constructor & Destructor Documentation

CMFCRibbonNumEditCtrl::CMFCRibbonNumEditCtrl ( CMFCRibbonEdit & edit ) [inline]

Definition at line 85 of file MainFrm.cpp.

                                                                   : CMFCRibbonRichEditCtrl(edit)
  {
    m_nValidNum = 0;
  }

Member Function Documentation

virtual void CMFCRibbonNumEditCtrl::OnKillFocus ( CWnd * pNewWnd ) [inline, virtual]

Definition at line 90 of file MainFrm.cpp.

  {
    CMFCRibbonRichEditCtrl::OnKillFocus(pNewWnd);
    int nTempVal = _ttoi(m_strOldText);
    if (nTempVal != 0)
    {
      m_nValidNum = nTempVal;
    }
    else
    {
      m_strOldText.Empty();
      m_nValidNum = 0;
    }

    CString strText;
    strText.Format(_T("%d"), m_nValidNum);
    m_edit.SetEditText(strText);
  }

Member Data Documentation

int CMFCRibbonNumEditCtrl::m_nValidNum [protected]

Definition at line 80 of file MainFrm.cpp.

The documentation for this class was generated from the following file:
  • vc2008fp/MSOffice2007Demo/MainFrm.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMinSize Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CMinSize Class Reference

#include "dialogs.h"

List of all members.

Public Types

enum | { IDD = IDD_MIN_SIZE }

Public Member Functions

CMinSize (CWnd *pParent=NULL)

Public Attributes

int | m_nMinX
int | m_nMinY

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 41 of file dialogs.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 49 of file dialogs.h.

{ IDD = IDD_MIN_SIZE };

Constructor & Destructor Documentation

CMinSize::CMinSize ( CWnd * pParent = NULL )

Definition at line 55 of file dialogs.cpp.

  : CDialog(CMinSize::IDD, pParent)
{
  //{{AFX_DATA_INIT(CMinSize)
  m_nMinX = 0;
  m_nMinY = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CMinSize::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 64 of file dialogs.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMinSize)
  DDX_Text(pDX, IDC_EDIT1, m_nMinX);
  DDX_Text(pDX, IDC_EDIT2, m_nMinY);
  //}}AFX_DATA_MAP
}

Member Data Documentation

int CMinSize::m_nMinX

Definition at line 50 of file dialogs.h.

int CMinSize::m_nMinY

Definition at line 51 of file dialogs.h.

The documentation for this class was generated from the following files:
  • general/tracker/dialogs.h
  • general/tracker/dialogs.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMMXSurface16Intrinsic Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CMMXSurface16Intrinsic Class Reference

#include "MMXSurface.h"

Inherits CSurface.

List of all members.

Public Member Functions

virtual void | AdjustWidth (int *pWidth)
virtual void | BlurBits ()

Protected Member Functions

virtual void | OnCreated ()

Private Attributes

int | m_qwpl
int | m_width

Detailed Description

Definition at line 39 of file MMXSurface.h.

Member Function Documentation

void CMMXSurface16Intrinsic::AdjustWidth ( int * pWidth ) [virtual]

Reimplemented from CSurface.

Definition at line 20 of file MMXSurface16.cpp.

{
  ASSERT(pWidth != NULL);
  ASSERT(m_kDeltaX <= 3);
  // to avoid special casing the end of the loop,
  // our visible pixel width needs to be a multiple of 4

  *pWidth = (*pWidth+3-m_kDeltaX)& ~0x3;
}

void CMMXSurface16Intrinsic::BlurBits ( ) [virtual]

Reimplemented from CSurface.

Definition at line 45 of file MMXSurface16.cpp.

{
    int height = GetVisibleHeight();
    ULONGLONG *pCur  = (ULONGLONG *)GetPixelAddress(0,0);

  CMMX cUpBase, cDownBase, cCurBase, cLeftBase, cRightBase;
  CMMX cUp, cDown, cCur, cLeft, cRight;
  CMMX cDest;
  CMMX cMask(0x001f001f001f001fu); // colorspace mask - 5 bits per color

  do {
    int width = m_width;
    do {
      // Load pixels and do the mmx unpack
      // Note: pwCur is used to do non-aligned
      // data reads - which is not normally recommended.
      // on X86, it is faster than loading aligned and
      // shift-oring.
      WORD *pwCur = (WORD *)pCur;
      cLeftBase = *(ULONGLONG*)(pwCur-1);
      cCurBase = pCur[0];
      cRightBase = *(ULONGLONG*)(pwCur+1);
      cUpBase = pCur[-m_qwpl];
      cDownBase = pCur[+m_qwpl];

      cLeft = cLeftBase & cMask;
      cCur = cCurBase & cMask;
      cRight = cRightBase & cMask;
      cUp = cUpBase & cMask;
      cDown = cDownBase & cMask;

      // Actual math. Don't step on current, or right.
      // Sum the 4 around and double the middle
      // Do current pixel in this line
      cDest = ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
      cMask <<= 5;

      cLeft = cLeftBase & cMask;
      cCur = cCurBase & cMask;
      cRight = cRightBase & cMask;
      cUp = cUpBase & cMask;
      cDown = cDownBase & cMask;

      // Actual math for next color space
      cDest |= cMask & ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
      cMask <<= 5;

      cLeft = (cLeftBase & cMask) >> 3;
      cCur = (cCurBase & cMask) >> 3;
      cRight = (cRightBase & cMask) >> 3;
      cUp = (cUpBase & cMask) >> 3;
      cDown = (cDownBase & cMask) >> 3;

      // Actual math for next color space
      cDest |= cMask & (cDown+cUp+cLeft+cRight+(cCur<<2));
      *pCur++ = cDest;
      cMask >>= 10;
    } while (--width > 0);
  } while (--height > 0);
}

void CMMXSurface16Intrinsic::OnCreated ( ) [protected, virtual]

Reimplemented from CSurface.

Definition at line 30 of file MMXSurface16.cpp.

{
  ASSERT(GetBitDepth() == 16);
  ASSERT((GetPitch() & 0x7) == 0);
  ASSERT(GetVisibleWidth() && GetVisibleHeight());

  int width = GetVisibleWidth();
    m_qwpl  = GetPitch()/8; // qwords Per Line
    m_width = (width+3)/4; // 4 pixels at a time
}

Member Data Documentation

int CMMXSurface16Intrinsic::m_qwpl [private]

Definition at line 47 of file MMXSurface.h.

int CMMXSurface16Intrinsic::m_width [private]

Definition at line 48 of file MMXSurface.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/MMXSurface.h
  • general/MMXSwarm/MMXSurface16.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMMXSurface24Intrinsic Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CMMXSurface24Intrinsic Class Reference

#include "MMXSurface.h"

Inherits CSurface.

List of all members.

Public Member Functions

virtual void | BlurBits ()

Protected Member Functions

virtual void | OnCreated ()

Private Attributes

int | m_delta
int | m_dwpl
int | m_width

Detailed Description

Definition at line 27 of file MMXSurface.h.

Member Function Documentation

void CMMXSurface24Intrinsic::BlurBits ( ) [virtual]

Reimplemented from CSurface.

Definition at line 32 of file MMXSurface24.cpp.

{
    int height = GetVisibleHeight();
    DWORD *pCur  = (DWORD*)GetPixelAddress(0,0);

  CMMX cFader;
  CMMX cRight;
  CMMX cLeft;
  CMMX cUp, cDown, cCur;

  cFader.UnpackBytesLo( 0x01010101 );
  cLeft.Clear();

  do {
    int width = m_width;
    do {
      BYTE *bpCur = (BYTE *)pCur;
      // Load pixels and do the mmx unpack
      cCur.UnpackBytesLo( pCur[0] );
      // treating non-aligned data as dwords isn't generally a good idea
      cRight.UnpackBytesLo( *(DWORD *)(bpCur+3) );
      cUp.UnpackBytesLo( pCur[-m_dwpl] );
      cDown.UnpackBytesLo( pCur[m_dwpl] );

      // Sum the 4 around and double the middle
      // Do current pixel in this line
      cUp = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;

#if defined(TRIPPY)
      cUp += cFader; // increase the fade to white
#elif defined (FAST_FADE)
          cUp -= cFader; // increase the fade to black
#endif
      // Reset the left before we write anything out.
      // treating non-aligned data as dwords isn't generally a good idea
      cLeft.UnpackBytesLo( *(DWORD *)(bpCur+1) );
      *pCur++ = cUp.PackBytes();
    } while (--width > 0);
    pCur += m_delta;
  } while (--height > 0);
}

void CMMXSurface24Intrinsic::OnCreated ( ) [protected, virtual]

Reimplemented from CSurface.

Definition at line 19 of file MMXSurface24.cpp.

{
  ASSERT(GetBitDepth() == 24);
  ASSERT(GetVisibleWidth() && GetVisibleHeight());
  ASSERT(sizeof(RGBTRIPLE) == 3);
  ASSERT((GetPitch() & 0x3) == 0);

  int width = GetVisibleWidth();
    m_dwpl = GetPitch()/4; // DWORDs Per Line
    m_width = (width+1)*3/4; // round up
    m_delta = int((GetPixelAddress(0,1) - GetPixelAddress(width,0)) / 4);
}

Member Data Documentation

int CMMXSurface24Intrinsic::m_delta [private]

Definition at line 36 of file MMXSurface.h.

int CMMXSurface24Intrinsic::m_dwpl [private]

Definition at line 34 of file MMXSurface.h.

int CMMXSurface24Intrinsic::m_width [private]

Definition at line 35 of file MMXSurface.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/MMXSurface.h
  • general/MMXSwarm/MMXSurface24.cpp
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMMXSurface32Intrinsic Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CMMXSurface32Intrinsic Class Reference

#include "MMXSurface.h"

Inherits CSurface.

List of all members.

Public Member Functions

virtual void | AdjustWidth (int *pWidth)
virtual void | BlurBits ()

Protected Member Functions

virtual void | OnCreated ()

Private Attributes

int | m_dwpl
int | m_width

Detailed Description

Definition at line 15 of file MMXSurface.h.

Member Function Documentation

void CMMXSurface32Intrinsic::AdjustWidth ( int * pWidth ) [virtual]

Reimplemented from CSurface.

Definition at line 20 of file MMXSurface32.cpp.

{
  ASSERT(pWidth != NULL);
  ASSERT(m_kDeltaX == 1);
  // increment if odd.  If we are even, we stop
  // dead on correctly, reading the single black buffer
  // column. If we are odd, we need an extra column so
  // we don't need to special case the tail of the loop.

  // Because we know there is always a DeltaX black stripe
  // at least 1 pixel wide, we can subtract instead of adding.
  // this allows us to get rid of adding a delta per horizontal
  // loop. while in theory this could cause the left side to bleed
  // to the right, in reality this won't happen.
  if (*pWidth & 0x01)
    *pWidth -= 1;
}

void CMMXSurface32Intrinsic::BlurBits ( ) [virtual]

Reimplemented from CSurface.

Definition at line 49 of file MMXSurface32.cpp.

{
    int height = GetVisibleHeight();
    DWORD *pCur  = (DWORD *)GetPixelAddress(0,0);

  CMMX cFader;
  CMMX cRight, cRightRight;
  CMMX cDownRight;
  CMMX cLeft;
  CMMX cUpRight;
  CMMX cUp, cDown, cCur;

  cFader.UnpackBytesLo( 0x01010101 );
  cLeft.Clear();
  cCur.UnpackBytesLo( *pCur );

  do {
    int width = m_width;
    do {
      // Load pixels and do the mmx unpack
      cRight.UnpackBytesLo( pCur[1] );
      cRightRight.UnpackBytesLo( pCur[2] );
      cUp.UnpackBytesLo( pCur[-m_dwpl] );
      cUpRight.UnpackBytesLo( pCur[-m_dwpl+1] );
      cDown.UnpackBytesLo( pCur[m_dwpl] );
      cDownRight.UnpackBytesLo( pCur[m_dwpl+1] );

      // Actual math. Don't step on current, or right.
      // Sum the 4 around and double the middle

      // Do current pixel in this line
      cUp = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;

      // Do next pixel
      cDown = (cDownRight+cUpRight+cCur+cRightRight+(cRight<<2))>>3;

#if defined(TRIPPY)
      cUp += cFader; // increase the fade to white
      cDown += cFader; // increase the fade to white
#elif defined (FAST_FADE)
          cUp -= cFader; // increase the fade to black
          cDown -= cFader; // increase the fade to black
#endif
      cLeft = cRight;     // Slide left!
      cCur = cRightRight;

      *(ULONGLONG *)pCur = cUp.PackBytes(cDown);
      pCur += 2;
    } while (--width > 0);
  } while (--height > 0);
}

void CMMXSurface32Intrinsic::OnCreated ( ) [protected, virtual]

Reimplemented from CSurface.

Definition at line 38 of file MMXSurface32.cpp.

{
  ASSERT(GetBitDepth() == 32);
  ASSERT((GetPitch() & 0x7) == 0);
  ASSERT(GetVisibleWidth() && GetVisibleHeight());

  int width = GetVisibleWidth();
    m_dwpl = GetPitch()/4; // dwords Per Line
    m_width = (width+1)/2; // 2 pixels at a time
}

Member Data Documentation

int CMMXSurface32Intrinsic::m_dwpl [private]

Definition at line 23 of file MMXSurface.h.

int CMMXSurface32Intrinsic::m_width [private]

Definition at line 24 of file MMXSurface.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/MMXSurface.h
  • general/MMXSwarm/MMXSurface32.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMMXSwarmApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CMMXSwarmApp Class Reference

#include "MMXSwarm.h"

List of all members.

Public Member Functions

CMMXSwarmApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual BOOL | OnIdle (LONG lCount)

Private Attributes

CChildView * m_pView

Detailed Description

Definition at line 27 of file MMXSwarm.h.

Constructor & Destructor Documentation

CMMXSwarmApp::CMMXSwarmApp ( )

Definition at line 32 of file MMXSwarm.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CMMXSwarmApp::InitInstance ( ) [virtual]

Definition at line 46 of file MMXSwarm.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  // To create the main window, this code creates a new frame window
  // object and then sets it as the application's main window object

  CMainFrame* pFrame = new CMainFrame;

  m_pMainWnd = pFrame;
  m_pView = pFrame->GetView();

  // create and load the frame with its resources

  pFrame->LoadFrame(IDR_MAINFRAME,
    WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
    NULL);

  // The one and only window has been initialized, so show and update it
  pFrame->ShowWindow(SW_SHOW);
  pFrame->UpdateWindow();
  SeedRandom();

  // call DragAcceptFiles only if there's a suffix
  //  In an SDI app, this should occur after ProcessShellCommand

  return TRUE;
}

void CMMXSwarmApp::OnAppAbout ( )

Definition at line 117 of file MMXSwarm.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

BOOL CMMXSwarmApp::OnIdle ( LONG lCount ) [virtual]

Definition at line 126 of file MMXSwarm.cpp.

{
  // Add your specialized code here and/or call the base class
  BOOL bRet = CWinApp::OnIdle(lCount);
  return(m_pView->OnIdle(lCount) || bRet);
}

Member Data Documentation

CChildView* CMMXSwarmApp::m_pView [private]

Definition at line 43 of file MMXSwarm.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/MMXSwarm.h
  • general/MMXSwarm/MMXSwarm.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMMXUnsigned16Saturated Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMMXUnsigned16Saturated Class Reference

#include "MMXWrapper.h"

List of all members.

Public Member Functions

CMMXUnsigned16Saturated ()
CMMXUnsigned16Saturated (DWORD dw)
CMMXUnsigned16Saturated (ULONGLONG qw)
CMMXUnsigned16Saturated (__m64 m64)
CMMXUnsigned16Saturated & | AndNot (const CMMXUnsigned16Saturated &m)
void | Clear ()
operator __m64 () const
operator ULONGLONG () const
CMMXUnsigned16Saturated & | operator&= (const CMMXUnsigned16Saturated &m)
CMMXUnsigned16Saturated & | operator+= (const CMMXUnsigned16Saturated &m)
CMMXUnsigned16Saturated & | operator-= (const CMMXUnsigned16Saturated &m)
CMMXUnsigned16Saturated & | operator<<= (int nBits)
CMMXUnsigned16Saturated & | operator= (ULONGLONG qw)
CMMXUnsigned16Saturated & | operator= (DWORD dw)
CMMXUnsigned16Saturated & | operator= (const CMMXUnsigned16Saturated &m)
CMMXUnsigned16Saturated & | operator>>= (int nBits)
CMMXUnsigned16Saturated & | operator|= (const CMMXUnsigned16Saturated &m)
DWORD | PackBytes () const
ULONGLONG | PackBytes (const CMMXUnsigned16Saturated &mUpper) const
void | UnpackBytes (CMMXUnsigned16Saturated &mmLeft)
void | UnpackBytesHi (DWORD dw)
void | UnpackBytesLo (DWORD dw)

Public Attributes

__m64 | m_m64

Detailed Description

Definition at line 15 of file MMXWrapper.h.

Constructor & Destructor Documentation

CMMXUnsigned16Saturated::CMMXUnsigned16Saturated ( ) [inline]

Definition at line 18 of file MMXWrapper.h.

  {
  }

CMMXUnsigned16Saturated::CMMXUnsigned16Saturated ( DWORD dw ) [inline]

Definition at line 21 of file MMXWrapper.h.

  {
    m_m64 = _m_from_int( dw );
  }

CMMXUnsigned16Saturated::CMMXUnsigned16Saturated ( __m64 m64 ) [inline]

Definition at line 25 of file MMXWrapper.h.

  {
    m_m64 = m64;
  }

CMMXUnsigned16Saturated::CMMXUnsigned16Saturated ( ULONGLONG qw ) [inline]

Definition at line 29 of file MMXWrapper.h.

  {
    m_m64.m64_u64 = qw;
  }

Member Function Documentation

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::AndNot ( const CMMXUnsigned16Saturated & m ) [inline]

Definition at line 99 of file MMXWrapper.h.

  {
    m_m64 = _mm_andnot_si64(m, m_m64);
    return(*this);
  }

void CMMXUnsigned16Saturated::Clear ( ) [inline]

Definition at line 60 of file MMXWrapper.h.

  {
    m_m64 = _mm_setzero_si64();
  }

CMMXUnsigned16Saturated::operator __m64 ( ) const [inline]

Definition at line 50 of file MMXWrapper.h.

  {
    return( m_m64 );
  }

CMMXUnsigned16Saturated::operator ULONGLONG ( ) const [inline]

Definition at line 55 of file MMXWrapper.h.

  {
    return( m_m64.m64_u64 );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator&= ( const CMMXUnsigned16Saturated & m ) [inline]

Definition at line 87 of file MMXWrapper.h.

  {
    m_m64 = _mm_and_si64(m_m64, m);
    return(*this);
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator+= ( const CMMXUnsigned16Saturated & m ) [inline]

Definition at line 65 of file MMXWrapper.h.

  {
    m_m64 = _mm_adds_pu16( m_m64, m );
    return( *this );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator-= ( const CMMXUnsigned16Saturated & m ) [inline]

Definition at line 70 of file MMXWrapper.h.

  {
    m_m64 = _mm_subs_pu16( m_m64, m );
    return( *this );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator<<= ( int nBits ) [inline]

Definition at line 81 of file MMXWrapper.h.

  {
    m_m64 = _mm_slli_pi16( m_m64, nBits );
    return( *this );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator= ( const CMMXUnsigned16Saturated & m ) [inline]

Definition at line 39 of file MMXWrapper.h.

  {
    m_m64 = m.m_m64;
    return( *this );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator= ( DWORD dw ) [inline]

Definition at line 34 of file MMXWrapper.h.

  {
    m_m64 = _m_from_int( dw );
    return( *this );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator= ( ULONGLONG qw ) [inline]

Definition at line 44 of file MMXWrapper.h.

  {
    m_m64.m64_u64 = qw;
    return( *this );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator>>= ( int nBits ) [inline]

Definition at line 75 of file MMXWrapper.h.

  {
    m_m64 = _mm_srli_pi16( m_m64, nBits );
    return( *this );
  }

CMMXUnsigned16Saturated& CMMXUnsigned16Saturated::operator|= ( const CMMXUnsigned16Saturated & m ) [inline]

Definition at line 93 of file MMXWrapper.h.

  {
    m_m64 = _mm_or_si64(m_m64, m);
    return(*this);
  }

ULONGLONG CMMXUnsigned16Saturated::PackBytes ( const CMMXUnsigned16Saturated & mUpper ) const [inline]

Definition at line 110 of file MMXWrapper.h.

  {
    return( _mm_packs_pu16( m_m64, mUpper ).m64_u64 );
  }

DWORD CMMXUnsigned16Saturated::PackBytes ( ) const [inline]

Definition at line 105 of file MMXWrapper.h.

  {
    return( _m_to_int( _mm_packs_pu16( m_m64, _mm_setzero_si64() ) ) );
  }

void CMMXUnsigned16Saturated::UnpackBytes ( CMMXUnsigned16Saturated & mmLeft ) [inline]

Definition at line 124 of file MMXWrapper.h.

  {
    mmLeft = _mm_unpackhi_pi8( m_m64, _mm_setzero_si64() );
    m_m64 = _mm_unpacklo_pi8( m_m64, _mm_setzero_si64() );
  }

void CMMXUnsigned16Saturated::UnpackBytesHi ( DWORD dw ) [inline]

Definition at line 119 of file MMXWrapper.h.

  {
    m_m64 = _mm_unpacklo_pi8( _mm_setzero_si64(), _m_from_int( dw ) );
  }

void CMMXUnsigned16Saturated::UnpackBytesLo ( DWORD dw ) [inline]

Definition at line 115 of file MMXWrapper.h.

  {
    m_m64 = _mm_unpacklo_pi8( _m_from_int( dw ), _mm_setzero_si64() );
  }

Member Data Documentation

__m64 CMMXUnsigned16Saturated::m_m64

Definition at line 131 of file MMXWrapper.h.

The documentation for this class was generated from the following file:
  • general/MMXSwarm/MMXWrapper.h
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CModalShapePropSheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CModalShapePropSheet Class Reference

#include "propsht.h"

List of all members.

Public Member Functions

CModalShapePropSheet (CWnd *pWndParent=NULL)
virtual BOOL | OnInitDialog ()
void | SetShapePropsFromSheet (CShape *pShape)
void | SetSheetPropsFromShape (CShape *pShape)
void | UpdateShapePreview ()

Public Attributes

CColorPage m_colorPage
CStylePage m_stylePage
CShapePreviewWnd m_wndPreview

Protected Member Functions

afx_msg void | OnApplyNow ()

Detailed Description

Definition at line 12 of file propsht.h.

Constructor & Destructor Documentation

CModalShapePropSheet::CModalShapePropSheet ( CWnd * pWndParent = NULL )

Definition at line 29 of file propsht.cpp.

  : CPropertySheet(AFX_IDS_APP_TITLE, pWndParent)
{
  AddPage(&m_stylePage);
  AddPage(&m_colorPage);
}

Member Function Documentation

void CModalShapePropSheet::OnApplyNow ( ) [protected]

Definition at line 86 of file propsht.cpp.

{
  Default();

  CFrameWnd* pFrameWnd = STATIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
  CView* pView = pFrameWnd->GetActiveFrame()->GetActiveView();
  pView->SendMessage(WM_USER_CHANGE_OBJECT_PROPERTIES, 0, 0);
  m_stylePage.SetModified(FALSE);
  m_colorPage.SetModified(FALSE);
  SendMessage(PSM_CANCELTOCLOSE);
}

BOOL CModalShapePropSheet::OnInitDialog ( ) [virtual]

Definition at line 36 of file propsht.cpp.

{
  BOOL bResult = CPropertySheet::OnInitDialog();

  // add the preview window to the property sheet.
  CRect rectWnd;
  GetWindowRect(rectWnd);
  SetWindowPos(NULL, 0, 0,
    rectWnd.Width() + 100,
    rectWnd.Height(),
    SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
  CRect rectPreview(rectWnd.Width() + 25, 25,
    rectWnd.Width()+75, 75);
  m_wndPreview.Create(NULL, NULL, WS_CHILD|WS_VISIBLE,
    rectPreview, this, 0x1000);

  CenterWindow();
  return bResult;
}

void CModalShapePropSheet::SetShapePropsFromSheet ( CShape * pShape )

Definition at line 71 of file propsht.cpp.

{
  pShape->m_shapecolor = m_colorPage.m_nColor;
  pShape->m_shapestyle = (SHAPE_STYLE)m_stylePage.m_nShapeStyle;

  m_colorPage.SetModified(FALSE);
  m_stylePage.SetModified(FALSE);
}

void CModalShapePropSheet::SetSheetPropsFromShape ( CShape * pShape )

Definition at line 56 of file propsht.cpp.

{
  m_stylePage.m_nShapeStyle = pShape->m_shapestyle;
  m_stylePage.SetModified(FALSE);

  m_colorPage.m_nColor = pShape->m_shapecolor;
  m_colorPage.SetModified(FALSE);

  // Reflect the new shape properties in the controls of the
  // currently active property page.
  GetActivePage()->UpdateData(FALSE);

  UpdateShapePreview();
}

void CModalShapePropSheet::UpdateShapePreview ( )

Definition at line 80 of file propsht.cpp.

{
  m_wndPreview.Invalidate();
  m_wndPreview.UpdateWindow();
}

Member Data Documentation

CColorPage CModalShapePropSheet::m_colorPage

Definition at line 20 of file propsht.h.

CStylePage CModalShapePropSheet::m_stylePage

Definition at line 19 of file propsht.h.

CShapePreviewWnd CModalShapePropSheet::m_wndPreview

Definition at line 21 of file propsht.h.

The documentation for this class was generated from the following files:
  • general/propdlg/propsht.h
  • general/propdlg/propsht.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CModelessApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CModelessApp Class Reference

#include "modeless.h"

List of all members.

Public Member Functions

CModelessApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 24 of file modeless.h.

Constructor & Destructor Documentation

CModelessApp::CModelessApp ( )

Definition at line 37 of file modeless.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CModelessApp::InitInstance ( ) [virtual]

Definition at line 51 of file modeless.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  CMainDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int)dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/modeless/modeless.h
  • general/modeless/modeless.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CModelessDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CModelessDialog Class Reference

#include "Modeless.h"

Inherited by CModelessMain.

List of all members.

Public Member Functions

CModelessDialog ()
virtual | ~CModelessDialog ()
virtual void | OnCancel ()
virtual void | OnOK ()
virtual void | PostNcDestroy ()

Detailed Description

Definition at line 37 of file Modeless.h.

Constructor & Destructor Documentation

CModelessDialog::CModelessDialog ( )

Definition at line 55 of file Modeless.cpp.

{
}

CModelessDialog::~CModelessDialog ( ) [virtual]

Definition at line 59 of file Modeless.cpp.

{
}

Member Function Documentation

void CModelessDialog::OnCancel ( ) [virtual]

Definition at line 73 of file Modeless.cpp.

{
  DestroyWindow();
}

void CModelessDialog::OnOK ( ) [virtual]

Definition at line 84 of file Modeless.cpp.

{
  if (!UpdateData(TRUE))
  {
    TRACE0("UpdateData failed -- modeless dialog terminate\n");
    return;
  }
  DestroyWindow();
}

void CModelessDialog::PostNcDestroy ( ) [virtual]

Definition at line 63 of file Modeless.cpp.

{
  delete this;
}

The documentation for this class was generated from the following files:
  • general/dlgcbr32/Modeless.h
  • general/dlgcbr32/Modeless.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CModelessMain Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CModelessMain Class Reference

#include "Mdlsmain.h"

Inherits CModelessDialog.

Inherited by CWndListDlg.

List of all members.

Public Member Functions

CModelessMain ()
virtual | ~CModelessMain ()
BOOL | Create (LPCTSTR lpszTemplateName, const UINT FAR *lpaIDStatus, int cIDStatus, const UINT FAR *lpaIDToolbar, int cIDToolbar, UINT nIDBitmap)
BOOL | Create (UINT nIDTemplate, const UINT FAR *lpaIDStatus, int cIDStatus, const UINT FAR *lpaIDToolbar, int cIDToolbar, UINT nIDBitmap)
CStatusBar * | GetStatusBar ()
CToolBar * | GetToolBar ()
virtual BOOL | OnInitDialog ()

Protected Member Functions

afx_msg void | OnClose ()
afx_msg void | OnEnterIdle (UINT nWhy, CWnd *pWho)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnInitMenuPopup (CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu)
afx_msg void | OnMenuSelect (UINT nItemID, UINT nFlags, HMENU hSysMenu)
afx_msg void | OnPaint ()
afx_msg LRESULT | OnPopMessageString (WPARAM wParam, LPARAM lParam)
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg LRESULT | OnSetMessageString (WPARAM wParam, LPARAM lParam=0L)
afx_msg void | OnStatusBarCheck ()
afx_msg void | OnToolBarCheck ()
afx_msg BOOL | OnToolTipText (UINT, NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnUpdateKeyIndicator (CCmdUI *pCmdUI)
afx_msg void | OnUpdateStatusBarMenu (CCmdUI *pCmdUI)
afx_msg void | OnUpdateToolBarMenu (CCmdUI *pCmdUI)

Protected Attributes

int | m_cIDStatusBar
int | m_cIDToolBar
HICON | m_hIcon
const UINT FAR * | m_lpaIDStatusBar
const UINT FAR * | m_lpaIDToolBar
UINT m_nIDBitmap
UINT m_nIDLastMessage
UINT m_nIDTracking
CDlgStatusBar m_statusBar
CDlgToolBar m_toolBar

Detailed Description

Definition at line 56 of file Mdlsmain.h.

Constructor & Destructor Documentation

CModelessMain::CModelessMain ( )

Definition at line 58 of file Mdlsmain.cpp.

{
  m_hIcon = NULL;

  m_nIDTracking     = 0;
  m_nIDLastMessage  = 0;

  m_lpaIDStatusBar  = NULL;
  m_cIDStatusBar    = 0;

  m_lpaIDToolBar    = NULL;
  m_cIDToolBar      = 0;
  m_nIDBitmap       = 0;
}

CModelessMain::~CModelessMain ( ) [virtual]

Definition at line 73 of file Mdlsmain.cpp.

{
}

Member Function Documentation

BOOL CModelessMain::Create | ( | LPCTSTR | lpszTemplateName,
 |  | const UINT FAR * | lpaIDStatus,
 |  | int | cIDStatus,
 |  | const UINT FAR * | lpaIDToolbar,
 |  | int | cIDToolbar,
 |  | UINT | nIDBitmap
 | ) |  |

Definition at line 101 of file Mdlsmain.cpp.

{
  ASSERT(lpszTemplateName != NULL);

  m_hIcon = AfxGetApp()->LoadIcon(lpszTemplateName);

  m_lpaIDStatusBar = lpaIDStatus;
  m_cIDStatusBar   = cIDStatus;

  m_lpaIDToolBar   = lpaIDToolbar;
  m_cIDToolBar     = cIDToolbar;
  m_nIDBitmap      = nIDBitmap;

  return CModelessDialog::Create(lpszTemplateName);
}

BOOL CModelessMain::Create | ( | UINT | nIDTemplate,
 |  | const UINT FAR * | lpaIDStatus,
 |  | int | cIDStatus,
 |  | const UINT FAR * | lpaIDToolbar,
 |  | int | cIDToolbar,
 |  | UINT | nIDBitmap
 | ) |  |

Definition at line 84 of file Mdlsmain.cpp.

{
  m_hIcon = AfxGetApp()->LoadIcon(nIDTemplate);

  m_lpaIDStatusBar = lpaIDStatus;
  m_cIDStatusBar   = cIDStatus;

  m_lpaIDToolBar   = lpaIDToolbar;
  m_cIDToolBar     = cIDToolbar;
  m_nIDBitmap      = nIDBitmap;

  return CModelessDialog::Create(nIDTemplate);
}

CStatusBar* CModelessMain::GetStatusBar ( ) [inline]

Definition at line 77 of file Mdlsmain.h.

{ return &m_statusBar; }

CToolBar* CModelessMain::GetToolBar ( ) [inline]

Definition at line 78 of file Mdlsmain.h.

{ return &m_toolBar; }

void CModelessMain::OnClose ( ) [protected]

Reimplemented in CWndListDlg.

Definition at line 127 of file Mdlsmain.cpp.

{
  CModelessDialog::OnClose();
  PostQuitMessage(0);
}

void CModelessMain::OnEnterIdle | ( | UINT | nWhy,
 |  | CWnd * | pWho |
 | ) |  |  | [protected]

Definition at line 308 of file Mdlsmain.cpp.

{
  if (nWhy != MSGF_MENU || m_nIDTracking == m_nIDLastMessage)
    return;

  OnSetMessageString(m_nIDTracking);
  ASSERT(m_nIDTracking == m_nIDLastMessage);
}

BOOL CModelessMain::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 239 of file Mdlsmain.cpp.

{
  if (IsIconic() && m_hIcon)
    return TRUE;
  else
    return CModelessDialog::OnEraseBkgnd(pDC);
}

BOOL CModelessMain::OnInitDialog ( ) [virtual]

Reimplemented in CWndListDlg.

Definition at line 140 of file Mdlsmain.cpp.

{
  CModelessDialog::OnInitDialog();

  // Create status bar at the bottom of the dialog window
  if (m_statusBar.Create(this))
  {
    m_statusBar.SetIndicators(m_lpaIDStatusBar, m_cIDStatusBar);
    OnSetMessageString(AFX_IDS_IDLEMESSAGE);

    // Make a sunken or recessed border around the first pane
    m_statusBar.SetPaneInfo(0, m_statusBar.GetItemID(0),
      SBPS_STRETCH, NULL );
  }

  // Create toolbar at the top of the dialog window
  if (m_toolBar.Create(this))
  {
    m_toolBar.LoadBitmap(m_nIDBitmap);
    m_toolBar.SetButtons(m_lpaIDToolBar, m_cIDToolBar);
  }

  m_toolBar.SetBarStyle(m_toolBar.GetBarStyle() |
    CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);

  // We need to resize the dialog to make room for control bars.
  // First, figure out how big the control bars are.
  CRect rcClientStart;
  CRect rcClientNow;
  GetClientRect(rcClientStart);
  RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,
           0, reposQuery, rcClientNow);

  // Now move all the controls so they are in the same relative
  // position within the remaining client area as they would be
  // with no control bars.
  CPoint ptOffset(rcClientNow.left - rcClientStart.left,
          rcClientNow.top - rcClientStart.top);

  CRect  rcChild;
  CWnd* pwndChild = GetWindow(GW_CHILD);
  while (pwndChild)
  {
    pwndChild->GetWindowRect(rcChild);
    ScreenToClient(rcChild);
    rcChild.OffsetRect(ptOffset);
    pwndChild->MoveWindow(rcChild, FALSE);
    pwndChild = pwndChild->GetNextWindow();
  }

  // Adjust the dialog window dimensions
  CRect rcWindow;
  GetWindowRect(rcWindow);
  rcWindow.right += rcClientStart.Width() - rcClientNow.Width();
  rcWindow.bottom += rcClientStart.Height() - rcClientNow.Height();
  MoveWindow(rcWindow, FALSE);

  // And position the control bars
  RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);         // Set big icon
  SetIcon(m_hIcon, FALSE);        // Set small icon

  // Finally, center the dialog on the screen
  CenterWindow();
  return TRUE;
}

void CModelessMain::OnInitMenuPopup | ( | CMenu * | pPopupMenu,
 |  | UINT | nIndex,
 |  | BOOL | bSysMenu |
 | ) |  |  | [protected]

Definition at line 259 of file Mdlsmain.cpp.

{
  if (!bSysMenu)
  {
    ENSURE(pPopupMenu != NULL);

    // check the enabled state of various menu items
    CCmdUI state;
    state.m_pMenu = pPopupMenu;
    ASSERT(state.m_pOther == NULL);

    state.m_nIndexMax = pPopupMenu->GetMenuItemCount();
    for (state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax;
       state.m_nIndex++)
    {
      state.m_nID = pPopupMenu->GetMenuItemID(state.m_nIndex);
      if (state.m_nID == 0)
        continue; // menu separator or invalid cmd - ignore it

      ASSERT(state.m_pOther == NULL);
      ASSERT(state.m_pMenu != NULL);
      if (state.m_nID == (UINT)-1)
      {
        // possibly a popup menu, route to first item of that popup
        state.m_pSubMenu = pPopupMenu->GetSubMenu(state.m_nIndex);
        if (state.m_pSubMenu == NULL ||
          (state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
          state.m_nID == (UINT)-1)
        {
          continue; // first item of popup can't be routed to
        }
        state.DoUpdate(this, FALSE);  // popups are never auto disabled
      }
      else
      {
        // normal menu item
        // Auto enable/disable if command is _not_ a system command
        state.m_pSubMenu = NULL;
        state.DoUpdate(this, state.m_nID < 0xF000);
      }
    }
  }
}

void CModelessMain::OnMenuSelect | ( | UINT | nItemID,
 |  | UINT | nFlags,
 |  | HMENU | hSysMenu |
 | ) |  |  | [protected]

Definition at line 325 of file Mdlsmain.cpp.

{
  // set the tracking state
  if (nFlags == 0xFFFF)
  {
    // cancel menu operation (go back to idle now)
    m_nIDTracking = AFX_IDS_IDLEMESSAGE;
    OnSetMessageString(m_nIDTracking);  // set string now
    ASSERT(m_nIDTracking == m_nIDLastMessage);
  }
  else if (nItemID == 0 ||
       nFlags & (MF_SEPARATOR|MF_POPUP|MF_MENUBREAK|MF_MENUBARBREAK))
  {
    // nothing should be displayed
    m_nIDTracking = 0;
  }
  else if (nItemID >= 0xF000 && nItemID < 0xF1F0)
  {
    // special string table entries for system commands
    m_nIDTracking = ID_COMMAND_FROM_SC(nItemID);
    ASSERT(m_nIDTracking >= AFX_IDS_SCFIRST &&
         m_nIDTracking < AFX_IDS_SCFIRST + 31);
  }
  else
  {
    // track on idle
    m_nIDTracking = nItemID;
  }
}

void CModelessMain::OnPaint ( ) [protected]

Definition at line 220 of file Mdlsmain.cpp.

{
  CPaintDC dc(this);
  if (IsIconic() && m_hIcon)
  {
    // Erase the icon background when placed over other app window
    DefWindowProc(WM_ICONERASEBKGND, (WORD)dc.m_hDC, 0L);

    // Center the icon
    CRect rc;
    GetClientRect(&rc);
    rc.left = (rc.right - ::GetSystemMetrics(SM_CXICON))/2;
    rc.top  = (rc.bottom - ::GetSystemMetrics(SM_CYICON))/2;

    // Draw the icon
    dc.DrawIcon(rc.left, rc.top, m_hIcon);
  }
}

LRESULT CModelessMain::OnPopMessageString | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 468 of file Mdlsmain.cpp.

{
  if (m_nFlags & WF_NOPOPMSG)
    return 0;

  return SendMessage(WM_SETMESSAGESTRING, wParam, lParam);
}

HCURSOR CModelessMain::OnQueryDragIcon ( ) [protected]

Definition at line 247 of file Mdlsmain.cpp.

{
  return (HCURSOR)m_hIcon;
}

LRESULT CModelessMain::OnSetMessageString | ( | WPARAM | wParam,
 |  | LPARAM | lParam = 0L |
 | ) |  |  | [protected]

Definition at line 362 of file Mdlsmain.cpp.

{
  UINT    nIDMsg = (UINT)wParam;
  CString strMsg;

  if (nIDMsg)
  {
    if (strMsg.LoadString(nIDMsg) != 0)
    {
      CString strStatusText;
      AfxExtractSubString(strStatusText, strMsg, 0, '\n');
      m_statusBar.SetWindowText(strStatusText);
    }
    else
      TRACE1("Warning: no message line prompt for ID %x%04X\n", nIDMsg);
  }

  UINT nIDLast     = m_nIDLastMessage;
  m_nIDLastMessage = nIDMsg;
  m_nIDTracking    = nIDMsg;
  return nIDLast;

}

void CModelessMain::OnStatusBarCheck ( ) [protected]

Definition at line 391 of file Mdlsmain.cpp.

{
  m_statusBar.ShowWindow(m_statusBar.IsWindowVisible() ? SW_HIDE : SW_SHOWNA);
}

void CModelessMain::OnToolBarCheck ( ) [protected]

Definition at line 412 of file Mdlsmain.cpp.

{
  m_toolBar.ShowWindow(m_toolBar.IsWindowVisible() ? SW_HIDE : SW_SHOWNA);
}

BOOL CModelessMain::OnToolTipText | ( | UINT | ,
 |  | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 481 of file Mdlsmain.cpp.

{
  ASSERT(pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW);

  // allow top level routing frame to handle the message
  if (GetRoutingFrame() != NULL)
    return FALSE;

  // need to handle both ANSI and UNICODE versions of the message
  TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
  TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
  TCHAR szFullText[256];
  CString strTipText;
  UINT_PTR nID = (UINT_PTR)pNMHDR->idFrom;
  if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) ||
    pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
  {
    // idFrom is actually the HWND of the tool
    nID = ((UINT_PTR)(WORD)::GetDlgCtrlID((HWND)nID));
  }

  if (nID != 0) // will be zero on a separator
  {
    AfxLoadString((UINT)nID, szFullText);
      // this is the command id, not the button index
    AfxExtractSubString(strTipText, szFullText, 1, '\n');
  }
#ifndef _UNICODE
  if (pNMHDR->code == TTN_NEEDTEXTA)
    _tcsncpy_s(pTTTA->szText, (sizeof(pTTTA->szText)/sizeof(pTTTA->szText[0])),
      strTipText, _TRUNCATE);
  else
  {
    int n = MultiByteToWideChar(CP_ACP, 0, strTipText, -1, pTTTW->szText,
      sizeof(pTTTW->szText)/sizeof(pTTTW->szText[0]));
    if (n > 0)
      pTTTW->szText[n-1] = 0;
  }
#else
  if (pNMHDR->code == TTN_NEEDTEXTA)
  {
    int n = WideCharToMultiByte(CP_ACP, 0, strTipText, -1,
      pTTTA->szText, sizeof(pTTTA->szText)/sizeof(pTTTA->szText[0]),
      NULL, NULL);
    if (n > 0)
      pTTTA->szText[n-1] = 0;
  }
  else
    _tcsncpy_s(pTTTW->szText, (sizeof(pTTTW->szText)/sizeof(pTTTW->szText[0])),
      strTipText, _TRUNCATE);
#endif
  *pResult = 0;

  // bring the tooltip window above other popup windows
  ::SetWindowPos(pNMHDR->hwndFrom, HWND_TOP, 0, 0, 0, 0,
    SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE);

  return TRUE;    // message was handled
}

void CModelessMain::OnUpdateKeyIndicator ( CCmdUI * pCmdUI ) [protected]

Definition at line 433 of file Mdlsmain.cpp.

{
  UINT nVK;

  switch (pCmdUI->m_nID)
  {
  case ID_INDICATOR_CAPS:
    nVK = VK_CAPITAL;
    break;

  case ID_INDICATOR_NUM:
    nVK = VK_NUMLOCK;
    break;

  case ID_INDICATOR_SCRL:
    nVK = VK_SCROLL;
    break;

  default:
    TRACE1("Warning: OnUpdateKeyIndicator - unknown indicator 0x%04X\n",
      pCmdUI->m_nID);
    pCmdUI->ContinueRouting();
    return; // not for us
  }

  pCmdUI->Enable(::GetKeyState(nVK) & 1);
    // enable static text based on toggled key state
  ASSERT(pCmdUI->m_bEnableChanged);
}

void CModelessMain::OnUpdateStatusBarMenu ( CCmdUI * pCmdUI ) [protected]

Definition at line 401 of file Mdlsmain.cpp.

{
  ASSERT(pCmdUI->m_nID == ID_VIEW_STATUS_BAR);
  pCmdUI->SetCheck(m_statusBar.IsWindowVisible());
}

void CModelessMain::OnUpdateToolBarMenu ( CCmdUI * pCmdUI ) [protected]

Definition at line 422 of file Mdlsmain.cpp.

{
  ASSERT(pCmdUI->m_nID == ID_VIEW_TOOLBAR);
  pCmdUI->SetCheck(m_toolBar.IsWindowVisible());
}

Member Data Documentation

int CModelessMain::m_cIDStatusBar [protected]

Definition at line 94 of file Mdlsmain.h.

int CModelessMain::m_cIDToolBar [protected]

Definition at line 98 of file Mdlsmain.h.

HICON CModelessMain::m_hIcon [protected]

Definition at line 88 of file Mdlsmain.h.

const UINT FAR* CModelessMain::m_lpaIDStatusBar [protected]

Definition at line 93 of file Mdlsmain.h.

const UINT FAR* CModelessMain::m_lpaIDToolBar [protected]

Definition at line 97 of file Mdlsmain.h.

UINT CModelessMain::m_nIDBitmap [protected]

Definition at line 99 of file Mdlsmain.h.

UINT CModelessMain::m_nIDLastMessage [protected]

Definition at line 91 of file Mdlsmain.h.

UINT CModelessMain::m_nIDTracking [protected]

Definition at line 90 of file Mdlsmain.h.

CDlgStatusBar CModelessMain::m_statusBar [protected]

Definition at line 95 of file Mdlsmain.h.

CDlgToolBar CModelessMain::m_toolBar [protected]

Definition at line 100 of file Mdlsmain.h.

The documentation for this class was generated from the following files:
  • general/dlgcbr32/Mdlsmain.h
  • general/dlgcbr32/Mdlsmain.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CModelessShapePropSheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CModelessShapePropSheet Class Reference

#include "propsht2.h"

List of all members.

Public Member Functions

CModelessShapePropSheet (CWnd *pWndParent)
virtual void | PostNcDestroy ()
void | SetShapePropsFromSheet (CShape *pShape)
void | SetSheetPropsFromShape (CShape *pShape)

Public Attributes

CColorPage m_colorPage
CStylePage m_stylePage

Detailed Description

Definition at line 14 of file propsht2.h.

Constructor & Destructor Documentation

CModelessShapePropSheet::CModelessShapePropSheet ( CWnd * pWndParent )

Definition at line 27 of file propsht2.cpp.

  : CPropertySheet(AFX_IDS_APP_TITLE, pWndParent)
{
  AddPage(&m_stylePage);
  AddPage(&m_colorPage);
}

Member Function Documentation

void CModelessShapePropSheet::PostNcDestroy ( ) [virtual]

Definition at line 34 of file propsht2.cpp.

{
  CPropertySheet::PostNcDestroy();
  delete this;
}

void CModelessShapePropSheet::SetShapePropsFromSheet ( CShape * pShape )

Definition at line 53 of file propsht2.cpp.

{
  pShape->m_shapecolor = m_colorPage.m_nColor;
  pShape->m_shapestyle = (SHAPE_STYLE)m_stylePage.m_nShapeStyle;

  m_colorPage.SetModified(FALSE);
  m_stylePage.SetModified(FALSE);
}

void CModelessShapePropSheet::SetSheetPropsFromShape ( CShape * pShape )

Definition at line 40 of file propsht2.cpp.

{
  m_stylePage.m_nShapeStyle = pShape->m_shapestyle;
  m_stylePage.SetModified(FALSE);

  m_colorPage.m_nColor = pShape->m_shapecolor;
  m_colorPage.SetModified(FALSE);

  // Reflect the new shape properties in the controls of the
  // currently active property page.
  GetActivePage()->UpdateData(FALSE);
}

Member Data Documentation

CColorPage CModelessShapePropSheet::m_colorPage

Definition at line 22 of file propsht2.h.

CStylePage CModelessShapePropSheet::m_stylePage

Definition at line 21 of file propsht2.h.

The documentation for this class was generated from the following files:
  • general/propdlg/propsht2.h
  • general/propdlg/propsht2.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMonthCalPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CMonthCalPage Class Reference

#include "MonthCal.h"

List of all members.

Public Types

enum | { IDD = IDD_MONTHCAL }

Public Member Functions

CMonthCalPage ()
~CMonthCalPage ()
void | GetDayState (NMHDR *pHdr, LRESULT *pRes)
void | HandleSelChange (NMHDR *pHdr, LRESULT *pRes)
void | HandleSelect (NMHDR *pHdr, LRESULT *pRes)

Public Attributes

BOOL | m_bDayState
BOOL | m_bMultiSelect
BOOL | m_bNoToday
BOOL | m_bNoTodayCircle
BOOL | m_bWeekNumbers
CEdit | m_edMaxSel
CMonthCalCtrl | m_MonthCal
UINT m_nMaxSelCount
CListBox | m_NotifyList
CString | m_pszRange
CString | m_pszSelection

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnChangeEdselrange ()
afx_msg void | OnCkdaystate ()
afx_msg void | OnCknotoday ()
afx_msg void | OnCknotodaycircle ()
afx_msg void | OnCkweeknumbers ()
afx_msg void | OnCmultiselect ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 24 of file MonthCal.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 38 of file MonthCal.h.

{ IDD = IDD_MONTHCAL };

Constructor & Destructor Documentation

CMonthCalPage::CMonthCalPage ( )

Definition at line 28 of file MonthCal.cpp.

                             : CPropertyPage(CMonthCalPage::IDD)
{
  //{{AFX_DATA_INIT(CMonthCalPage)
  m_nMaxSelCount = 0;
  m_pszRange = _T("");
  m_pszSelection = _T("");
  m_bDayState = FALSE;
  m_bNoToday = FALSE;
  m_bNoTodayCircle = FALSE;
  m_bWeekNumbers = FALSE;
  m_bMultiSelect = FALSE;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
}

CMonthCalPage::~CMonthCalPage ( )

Definition at line 43 of file MonthCal.cpp.

{
}

Member Function Documentation

void CMonthCalPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 47 of file MonthCal.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMonthCalPage)
  DDX_Control(pDX, IDC_EDSELRANGE, m_edMaxSel);
  DDX_Control(pDX, IDC_NOTIFYLIST, m_NotifyList);
  DDX_Text(pDX, IDC_EDSELRANGE, m_nMaxSelCount);
  DDX_Text(pDX, IDC_STRRANGE, m_pszRange);
  DDX_Text(pDX, IDC_STRSELECTION, m_pszSelection);
  DDX_Check(pDX, IDC_CKDAYSTATE, m_bDayState);
  DDX_Check(pDX, IDC_CKNOTODAY, m_bNoToday);
  DDX_Check(pDX, IDC_CKNOTODAYCIRCLE, m_bNoTodayCircle);
  DDX_Check(pDX, IDC_CKWEEKNUMBERS, m_bWeekNumbers);
  DDX_Check(pDX, IDC_CMULTISELECT, m_bMultiSelect);
  //}}AFX_DATA_MAP
}

void CMonthCalPage::GetDayState | ( | NMHDR * | pHdr,
 |  | LRESULT * | pRes
 | ) |  |

Definition at line 206 of file MonthCal.cpp.

{
  NMDAYSTATE *pds = (NMDAYSTATE*)pHdr;
  m_NotifyList.AddString(_T("MCN_GETDAYSTATE"));
  //this function just bolds the first four days of every visible
  //month.
  for(int i=0;i<pds->cDayState;i++)
    pds->prgDayState[i]=0xf;

}

void CMonthCalPage::HandleSelChange | ( | NMHDR * | pHdr,
 |  | LRESULT * | pRes
 | ) |  |

Definition at line 229 of file MonthCal.cpp.

{

  m_NotifyList.AddString(_T("MCN_SELCHANGE"));
  if(! (m_MonthCal.GetStyle() & MCS_MULTISELECT))
    return;
  CTime ctmin,ctmax;
  m_MonthCal.GetSelRange(ctmin,ctmax);
  m_pszRange.Format(_T("%02d/%02d/%2d to %02d/%02d/%2d"), ctmin.GetMonth(),ctmin.GetDay(),ctmin.GetYear(),
                ctmax.GetMonth(),ctmax.GetDay(),ctmax.GetYear());
  UpdateData(FALSE);
}

void CMonthCalPage::HandleSelect | ( | NMHDR * | pHdr,
 |  | LRESULT * | pRes
 | ) |  |

Definition at line 217 of file MonthCal.cpp.

{
  m_NotifyList.AddString(_T("MCN_SELECT"));
  if((m_MonthCal.GetStyle() & MCS_MULTISELECT))
    return;
  CTime ct;
  m_MonthCal.GetCurSel(ct);
  m_pszSelection.Format(_T("%02d/%02d/%2d"),ct.GetMonth(),ct.GetDay(),ct.GetYear());
  UpdateData(FALSE);

}

void CMonthCalPage::OnChangeEdselrange ( ) [protected]

Definition at line 243 of file MonthCal.cpp.

{
  UpdateData(TRUE);
  m_MonthCal.SetMaxSelCount(m_nMaxSelCount);
}

void CMonthCalPage::OnCkdaystate ( ) [protected]

Definition at line 177 of file MonthCal.cpp.

{
  UpdateData(TRUE);
  if(m_bDayState)
  {
    long lStyle; CRect rc;
    lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
    lStyle |= MCS_DAYSTATE;
    m_MonthCal.GetClientRect(rc);
    m_MonthCal.DestroyWindow();
    m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
    UpdateData(FALSE);

  }
  else
  {
    //remove style
    long lStyle; CRect rc;
    lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
    lStyle &= ~MCS_DAYSTATE;
    m_MonthCal.GetClientRect(rc);
    m_MonthCal.DestroyWindow();
    m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
    m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
    UpdateData(FALSE);
  }
}

void CMonthCalPage::OnCknotoday ( ) [protected]

Definition at line 97 of file MonthCal.cpp.

{
  UpdateData(TRUE);

  if(m_bNoToday)
  {
    //add style
    m_MonthCal.ModifyStyle(0,MCS_NOTODAY,SWP_NOSIZE);
  }
  else
  {
    //remove style
    m_MonthCal.ModifyStyle(MCS_NOTODAY,0,SWP_NOSIZE);
  }
  m_MonthCal.SizeMinReq();
}

void CMonthCalPage::OnCknotodaycircle ( ) [protected]

Definition at line 113 of file MonthCal.cpp.

{
  UpdateData(TRUE);
  if(m_bNoTodayCircle)
  {
    //add style
    m_MonthCal.ModifyStyle(0,MCS_NOTODAYCIRCLE,SWP_NOSIZE);
  }
  else
  {
    //remove style
    m_MonthCal.ModifyStyle(MCS_NOTODAYCIRCLE,SWP_NOSIZE);
  }

}

void CMonthCalPage::OnCkweeknumbers ( ) [protected]

Definition at line 128 of file MonthCal.cpp.

{
  UpdateData(TRUE);
  if(m_bWeekNumbers)
  {
    //add style
    m_MonthCal.ModifyStyle(0,MCS_WEEKNUMBERS,SWP_NOSIZE);
  }
  else
  {
    //remove style
    m_MonthCal.ModifyStyle(MCS_WEEKNUMBERS,SWP_NOSIZE);
  }
  m_MonthCal.SizeMinReq();

}

void CMonthCalPage::OnCmultiselect ( ) [protected]

Definition at line 145 of file MonthCal.cpp.

{
  UpdateData(TRUE);
  if(m_bMultiSelect)
  {
    long lStyle; CRect rc;
    lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
    lStyle |= MCS_MULTISELECT;
    m_MonthCal.GetClientRect(rc);
    m_MonthCal.DestroyWindow();
    m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
    m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
    UpdateData(FALSE);
    m_edMaxSel.EnableWindow(TRUE);

  }
  else
  {
    //remove style
    long lStyle; CRect rc;
    lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
    lStyle &= ~MCS_MULTISELECT;
    m_MonthCal.GetClientRect(rc);
    m_MonthCal.DestroyWindow();
    m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
    m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
    UpdateData(FALSE);
    m_edMaxSel.EnableWindow(FALSE);
  }

}

BOOL CMonthCalPage::OnInitDialog ( ) [protected, virtual]

Definition at line 82 of file MonthCal.cpp.

{
  CPropertyPage::OnInitDialog();

  CWnd *pFrame = GetDlgItem(IDC_MCFRAME);
  CRect rcWnd;
  pFrame->GetClientRect(rcWnd);
  pFrame->DestroyWindow(); //pFrame was just a placeholder anyway.
  m_MonthCal.Create(WS_CHILD|WS_VISIBLE,CPoint(rcWnd.left,rcWnd.top),this,IDC_MONTHCAL);
  m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
  UpdateData(FALSE);

  return TRUE;
}

Member Data Documentation

BOOL CMonthCalPage::m_bDayState

Definition at line 44 of file MonthCal.h.

BOOL CMonthCalPage::m_bMultiSelect

Definition at line 48 of file MonthCal.h.

BOOL CMonthCalPage::m_bNoToday

Definition at line 45 of file MonthCal.h.

BOOL CMonthCalPage::m_bNoTodayCircle

Definition at line 46 of file MonthCal.h.

BOOL CMonthCalPage::m_bWeekNumbers

Definition at line 47 of file MonthCal.h.

CEdit CMonthCalPage::m_edMaxSel

Definition at line 39 of file MonthCal.h.

CMonthCalCtrl CMonthCalPage::m_MonthCal

Definition at line 35 of file MonthCal.h.

UINT CMonthCalPage::m_nMaxSelCount

Definition at line 41 of file MonthCal.h.

CListBox CMonthCalPage::m_NotifyList

Definition at line 40 of file MonthCal.h.

CString CMonthCalPage::m_pszRange

Definition at line 42 of file MonthCal.h.

CString CMonthCalPage::m_pszSelection

Definition at line 43 of file MonthCal.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/MonthCal.h
  • general/CmnCtrl1/MonthCal.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMCaptionBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CMSMCaptionBar Class Reference

#include "MSMCaptionBar.h"

List of all members.

Public Member Functions

CMSMCaptionBar ()
virtual | ~CMSMCaptionBar ()
virtual CSize | CalcFixedLayout (BOOL, BOOL)
virtual BOOL | Create (CWnd *pParentWnd, UINT nID=uiCaprionBarID)
virtual BOOL | CreateEx (CWnd *pParentWnd, UINT nID=uiCaprionBarID)
HFONT | GetCaptionFont () const
int | GetCaptionHeight () const
virtual COLORREF | GetCaptionTextColor () const
BOOL | IsParentActive () const
BOOL | IsParentMaximize () const
void | SetCaptionFont (const LOGFONT &lf)
void | SetCaptionHeight (int nHeight)
virtual void | SetIcon (HICON hIcon)
void | SetParentActive (BOOL bParentActive=true)
void | SetParentMaximize (BOOL bParentMaximize=true)

Public Attributes

BOOL | m_bParentActive
BOOL | m_bParentMaximize
CMSMCaptionBarButton m_BtnClose
CMSMCaptionBarButton m_BtnMaximize
CMSMCaptionBarButton m_BtnMinimize
CFont | m_CaptionFont
int | m_CaptionHeight
HICON | m_hIcon
CString | m_strCaption
int | m_SystemHeight
CSize | m_szIcon

Protected Member Functions

virtual void | DoPaint (CDC *pDCPaint)
virtual UINT | HitTest (const CPoint &pt) const
virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg LRESULT | OnSetText (WPARAM, LPARAM lParam)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual void | ShowSysMenu (const CPoint &point)

Detailed Description

Definition at line 22 of file MSMCaptionBar.h.

Constructor & Destructor Documentation

CMSMCaptionBar::CMSMCaptionBar ( )

Definition at line 28 of file MSMCaptionBar.cpp.

  : CPane   ()
  , m_hIcon           (NULL)
  , m_szIcon          (0, 0)
  , m_bParentActive   (false)
  , m_bParentMaximize (false)
{
}

CMSMCaptionBar::~CMSMCaptionBar ( ) [virtual]

Definition at line 37 of file MSMCaptionBar.cpp.

{
}

Member Function Documentation

CSize CMSMCaptionBar::CalcFixedLayout | ( | BOOL | ,
 |  | BOOL |  |
 | ) |  |  | [virtual]

Definition at line 177 of file MSMCaptionBar.cpp.

{
  ASSERT_VALID(this);

  // recalculate based on font height + icon height + borders
  TEXTMETRIC tm;
  {
    CClientDC dcScreen(NULL);
    HFONT hFont = GetCaptionFont ();

    HGDIOBJ hOldFont = dcScreen.SelectObject(hFont);
    VERIFY(dcScreen.GetTextMetrics(&tm));
    dcScreen.SelectObject(hOldFont);
  }

  int nHeight = max ( max (tm.tmHeight, m_szIcon.cy), GetCaptionHeight ());

  return CSize (32767, nHeight);// + CY_BORDER * 4 - rectSize.Height());
}

BOOL CMSMCaptionBar::Create | ( | CWnd * | pParentWnd,
 |  | UINT | nID = uiCaprionBarID |
 | ) |  |  | [virtual]

Definition at line 53 of file MSMCaptionBar.cpp.

{
  return CreateEx(pParentWnd, nID);
}

BOOL CMSMCaptionBar::CreateEx | ( | CWnd * | pParentWnd,
 |  | UINT | nID = uiCaprionBarID |
 | ) |  |  | [virtual]

Definition at line 58 of file MSMCaptionBar.cpp.

{
    ASSERT_VALID(pParentWnd);   // must have a parent

  DWORD dwStyle = WS_VISIBLE | WS_CHILD | CBRS_TOP;

  // save the style
  SetPaneAlignment (dwStyle & CBRS_ALL);

  // create the HWND
  CRect rect(0, 0, 0, 0);

  LPCTSTR lpszClass = AfxRegisterWndClass(CS_DBLCLKS, ::LoadCursor(NULL, IDC_ARROW),
    (HBRUSH)(COLOR_BTNFACE+1), NULL);

  m_dwControlBarStyle = 0; // can't float, resize, close, slide

  BOOL bSystemSmall = (pParentWnd->GetExStyle() & WS_EX_TOOLWINDOW) != 0;

  if (!CWnd::Create(lpszClass, NULL, dwStyle | WS_CLIPSIBLINGS, rect, pParentWnd, nID))
  {
    return FALSE;
  }

  if (pParentWnd->IsKindOf (RUNTIME_CLASS (CFrameWndEx)))
  {
    ((CFrameWndEx*) pParentWnd)->AddPane (this);
  }
  else
  {
    ASSERT (FALSE);
    return FALSE;
  }

  HINSTANCE hInstance = AfxFindResourceHandle (MAKEINTRESOURCE (nID), RT_GROUP_ICON);

  if (hInstance != NULL)
  {
    CSize szIcon (::GetSystemMetrics (SM_CXSMICON), ::GetSystemMetrics (SM_CYSMICON));

    HICON hIcon = (HICON)::LoadImage (hInstance, MAKEINTRESOURCE (nID), IMAGE_ICON,
      szIcon.cx, szIcon.cy, LR_DEFAULTCOLOR);

    if (hIcon != NULL)
    {
      SetIcon (hIcon);
    }
  }

  CString strCaption;

  pParentWnd->GetWindowText (strCaption);

  if (strCaption.IsEmpty ())
  {
    BOOL bValidString;
    bValidString = strCaption.LoadString (nID);
  }

  if (!strCaption.IsEmpty ())
  {
    SetWindowText (strCaption);
  }

  NONCLIENTMETRICS ncm;
  ZeroMemory (&ncm, sizeof (NONCLIENTMETRICS));
  ncm.cbSize = sizeof (NONCLIENTMETRICS);

  SystemParametersInfo (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);

  m_SystemHeight  = ::GetSystemMetrics (bSystemSmall ? SM_CYSMCAPTION : SM_CYCAPTION);
  m_CaptionHeight = m_SystemHeight;

  SetCaptionFont (bSystemSmall ? ncm.lfSmCaptionFont : ncm.lfCaptionFont);

  CRect rt (0, 0, bSystemSmall ? ncm.iSmCaptionWidth : ncm.iCaptionWidth,
                bSystemSmall ? ncm.iSmCaptionHeight : ncm.iCaptionHeight);

  CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
    CMFCVisualManager::GetInstance ());

  if (pManager != NULL)
  {
    if (pManager->LoadMSMCaptionButtonsIcons (_T("IDB_MSM_CAPTION_BTNS")))
    {
      rt.right  = pManager->GetMSMCaptionButtonsSize ().cx;
      rt.bottom = pManager->GetMSMCaptionButtonsSize ().cx;
    };

    m_CaptionHeight = rt.bottom + 2;
  }

  m_BtnClose.Create (_T(""), BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
                   rt, this, SC_CLOSE);
  m_BtnClose.SetTooltip (_T("Close"));

  m_BtnMaximize.Create (_T(""), BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
                   rt, this, SC_MAXIMIZE);
  m_BtnMaximize.SetTooltip (_T("Maximize"));

  m_BtnMinimize.Create (_T(""), BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
                   rt, this, SC_MINIMIZE);
  m_BtnMinimize.SetTooltip (_T("Minimize"));

  return TRUE;
}

void CMSMCaptionBar::DoPaint ( CDC * pDCPaint ) [protected, virtual]

Definition at line 269 of file MSMCaptionBar.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(pDCPaint);

  CRect rectClip;
  pDCPaint->GetClipBox (rectClip);

  CRect rect;
  GetClientRect(rect);

  CMemDC memDC (*pDCPaint, this);
  CDC* pDC = &memDC.GetDC ();

  CMFCVisualManager::GetInstance ()->OnFillBarBackground (pDC, this,
    rect, rectClip);

  HGDIOBJ  hOldFont    = pDC->SelectObject (GetCaptionFont());

  int      nOldMode    = pDC->SetBkMode    (TRANSPARENT);
  COLORREF crTextColor = pDC->SetTextColor (GetCaptionTextColor());
  COLORREF crBkColor   = pDC->SetBkColor   (afxGlobalData.clrBtnFace);

  if (m_hIcon != NULL && m_szIcon != CSize (0, 0))
  {
    CRect rectIcon (0, 0, m_SystemHeight, rect.Height ());

    int x = max (0, (rectIcon.Width ()  - m_szIcon.cx) / 2);
    int y = max (0, (rectIcon.Height () - m_szIcon.cy) / 2);

    ::DrawIconEx (pDC->GetSafeHdc (), x, y, m_hIcon, m_szIcon.cx, m_szIcon.cy,
            0, NULL, DI_NORMAL);

    rect.left  += m_SystemHeight;

    CRect rt;
    m_BtnMinimize.GetWindowRect (rt);
    ScreenToClient (rt);

    rect.right = rt.left - 1;
  }

  if (!m_strCaption.IsEmpty ())
  {
    pDC->DrawText (m_strCaption, rect, DT_END_ELLIPSIS | DT_SINGLELINE | DT_VCENTER);
  }

  pDC->SetTextColor (crTextColor);
  pDC->SetBkColor   (crBkColor);
  pDC->SetBkMode    (nOldMode);

  pDC->SelectObject (hOldFont);
}

HFONT CMSMCaptionBar::GetCaptionFont ( ) const [inline]

Definition at line 107 of file MSMCaptionBar.h.

{
  return (HFONT)m_CaptionFont.GetSafeHandle ();
}

int CMSMCaptionBar::GetCaptionHeight ( ) const [inline]

Definition at line 100 of file MSMCaptionBar.h.

{
  return m_CaptionHeight;
}

COLORREF CMSMCaptionBar::GetCaptionTextColor ( ) const [virtual]

Definition at line 264 of file MSMCaptionBar.cpp.

{
  return IsParentActive () ? afxGlobalData.clrCaptionText : afxGlobalData.clrInactiveCaptionText;
}

UINT CMSMCaptionBar::HitTest ( const CPoint & pt ) const [protected, virtual]

Definition at line 464 of file MSMCaptionBar.cpp.

{
  UINT uiHit = HTNOWHERE;

  CPoint ptHit  (pt);
  ScreenToClient (&ptHit);

  CRect rtClient;
  GetClientRect (rtClient);

  if (rtClient.PtInRect (ptHit))
  {
    uiHit = HTCAPTION;

    CRect rt (0, 0, m_SystemHeight, GetCaptionHeight ());

    if (m_hIcon != NULL && m_szIcon != CSize (0, 0))
    {
      if (rt.PtInRect (ptHit))
      {
        uiHit = HTSYSMENU;
      }
    }

    if (uiHit == HTCAPTION)
    {
      const CWnd* pCapture = GetCapture ();

      const CMSMCaptionBarButton* pBtns[3] =
        {
          &m_BtnClose, &m_BtnMaximize, &m_BtnMinimize
        };

      for (long i = 0; i < 3; i++)
      {
        const CMSMCaptionBarButton* pBtn = pBtns[i];

        if (pBtn != NULL && pBtn->GetSafeHwnd () != NULL &&
          pBtn->IsWindowVisible ())
        {
          pBtn->GetWindowRect (rt);
          if (rt.PtInRect (pt) || pCapture == pBtn)
          {
            switch (pBtn->GetSysCommand ())
            {
            case SC_CLOSE:
              uiHit = HTCLOSE;
              break;
            case SC_MINIMIZE:
              uiHit = HTMINBUTTON; // or HTREDUCE
              break;
            case SC_RESTORE:
            case SC_MAXIMIZE:
              uiHit = HTMAXBUTTON; // or HTZOOM
              break;
            case SC_CONTEXTHELP:
              uiHit = HTHELP;
              break;
            default:
              ASSERT (FALSE);
            }
            break;
          }
        }
      }
    }
  }

  return uiHit;
}

BOOL CMSMCaptionBar::IsParentActive ( ) const [inline]

Definition at line 114 of file MSMCaptionBar.h.

{
  return m_bParentActive;
}

BOOL CMSMCaptionBar::IsParentMaximize ( ) const [inline]

Definition at line 121 of file MSMCaptionBar.h.

{
  return m_bParentMaximize;
}

BOOL CMSMCaptionBar::OnCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected, virtual]

Definition at line 582 of file MSMCaptionBar.cpp.

{
  UINT nID = LOWORD (wParam);

  if (SC_SIZE <= nID && nID <= SC_CONTEXTHELP)
  {
    OnSysCommand (nID, 0);
    return TRUE;
  }

  return CPane::OnCommand(wParam, lParam);
}

void CMSMCaptionBar::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 572 of file MSMCaptionBar.cpp.

{
  UINT uiHit = HitTest (point);

  if (uiHit == HTCAPTION || uiHit == HTSYSMENU)
  {
    ShowSysMenu (point);
  }
}

LRESULT CMSMCaptionBar::OnSetText | ( | WPARAM | ,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 333 of file MSMCaptionBar.cpp.

{
  TRY
  {
    m_strCaption.Empty();
    if (lParam != NULL)
    {
      m_strCaption = (LPCTSTR)lParam;
    }

    Invalidate ();
  }
  CATCH_ALL(e)
  {
    // Note: DELETE_EXCEPTION(e) not required
    return FALSE;
  }
  END_CATCH_ALL

  return TRUE;
}

void CMSMCaptionBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 355 of file MSMCaptionBar.cpp.

{
  CPane::OnSize(nType, cx, cy);

  if (m_BtnClose.GetSafeHwnd () != NULL && m_BtnMaximize.GetSafeHwnd () != NULL &&
    m_BtnMinimize.GetSafeHwnd () != NULL)
  {
    int nHeight = cy;

    DWORD dwFlag = SWP_NOOWNERZORDER | SWP_NOZORDER;

    CRect rt;
    m_BtnClose.GetWindowRect (rt);
    rt.OffsetRect (-rt.TopLeft ());

    CSize szBtnSize (0, 0);

    CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
      CMFCVisualManager::GetInstance ());

    if (pManager != NULL)
    {
      szBtnSize = pManager->GetMSMCaptionButtonsSize ();
    }

    if (szBtnSize == CSize (0, 0))
    {
      szBtnSize = rt.Size ();
    }

    if (szBtnSize.cy > nHeight)
    {
      rt.right   = szBtnSize.cy;
      rt.bottom  = szBtnSize.cy;
      rt.DeflateRect (1, 1);
    }
    else
    {
      rt.right   = szBtnSize.cx;
      rt.top     = (nHeight - szBtnSize.cy) / 2;
      rt.bottom  = rt.top + szBtnSize.cy;
    }

    rt.OffsetRect (cx - rt.Width (), 0);
    m_BtnClose.SetWindowPos(&wndTop, rt.left, rt.top, rt.Width(), rt.Height(), dwFlag);

    rt.OffsetRect(-rt.Width()-1, 0);
    m_BtnMaximize.SetWindowPos(&wndTop, rt.left, rt.top, rt.Width(), rt.Height(), dwFlag);

    rt.OffsetRect(-rt.Width()-1, 0);
    m_BtnMinimize.SetWindowPos(&wndTop, rt.left, rt.top, rt.Width(), rt.Height(), dwFlag);
  }
}

void CMSMCaptionBar::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 595 of file MSMCaptionBar.cpp.

{
  CWnd* pParentWnd = GetParent ();

  if (pParentWnd != NULL)
  {
    pParentWnd->PostMessage (WM_SYSCOMMAND, nID, lParam);
  }
}

BOOL CMSMCaptionBar::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 41 of file MSMCaptionBar.cpp.

{
  // in Win4, status bars do not have a border at all, since it is
  //  provided by the client area.
  if ((m_dwStyle & (CBRS_ALIGN_ANY | CBRS_BORDER_ANY)) == CBRS_TOP)
  {
    m_dwStyle &= ~(CBRS_BORDER_ANY | CBRS_BORDER_3D);
  }

  return CPane::PreCreateWindow(cs);
}

BOOL CMSMCaptionBar::PreTranslateMessage ( MSG * pMsg ) [protected, virtual]

Definition at line 409 of file MSMCaptionBar.cpp.

{
  if (!CPane::PreTranslateMessage (pMsg))
  {
    return FALSE;
  }

  CWnd* pParentWnd = GetParent ();

  if (pParentWnd != NULL)
  {
    CPoint pt;
    ::GetCursorPos (&pt);

    UINT uiHit = HitTest (pt);

    if (uiHit == HTCAPTION || uiHit == HTSYSMENU)
    {
      UINT   message = 0;
      WPARAM wParam  = uiHit;
      LPARAM lParam  = MAKELPARAM (pt.x, pt.y);

      switch (pMsg->message)
      {
      case WM_LBUTTONDOWN:
        message = WM_NCLBUTTONDOWN;
        break;
      case WM_LBUTTONUP:
        message = WM_NCLBUTTONUP;
        break;
      case WM_LBUTTONDBLCLK:
        message = WM_NCLBUTTONDBLCLK;
        break;
      }

      if (message != 0)
      {
        if (message == WM_NCLBUTTONDOWN && uiHit == HTSYSMENU)
        {
          CRect rt;
          GetWindowRect (rt);

          ShowSysMenu (CPoint (rt.left, rt.bottom));
        }
        else
        {
          pParentWnd->SendMessage (message, wParam, lParam);
        }
      }
    }
  }

  return TRUE;
}

void CMSMCaptionBar::SetCaptionFont ( const LOGFONT & lf )

Definition at line 197 of file MSMCaptionBar.cpp.

{
  if (m_CaptionFont.GetSafeHandle () != NULL)
  {
    m_CaptionFont.DeleteObject ();
  }

  m_CaptionFont.CreateFontIndirect (&lf);
}

void CMSMCaptionBar::SetCaptionHeight ( int nHeight )

Definition at line 167 of file MSMCaptionBar.cpp.

{
  if (m_CaptionHeight != nHeight)
  {
    m_CaptionHeight = nHeight;

    RecalcLayout ();
  }
}

void CMSMCaptionBar::SetIcon ( HICON hIcon ) [virtual]

Definition at line 207 of file MSMCaptionBar.cpp.

{
  m_szIcon = CSize (0, 0);

  if (m_hIcon != NULL)
  {
    ::DestroyIcon(m_hIcon);
  }

  m_hIcon = hIcon;

  if (m_hIcon != NULL)
  {
    ICONINFO ii;
    ZeroMemory (&ii, sizeof (ICONINFO));

    ::GetIconInfo (m_hIcon, &ii);

    if (ii.hbmColor != NULL)
    {
      BITMAP bm;
      ZeroMemory (&bm, sizeof (BITMAP));

      if (::GetObject (ii.hbmColor, sizeof (BITMAP), &bm) != 0)
      {
        m_szIcon.cx = bm.bmWidth;
        m_szIcon.cy = bm.bmHeight;
      }
    }
  }
}

void CMSMCaptionBar::SetParentActive ( BOOL bParentActive = true )

Definition at line 239 of file MSMCaptionBar.cpp.

{
  if (m_bParentActive != bParentActive)
  {
    m_bParentActive = bParentActive;
    Invalidate ();
  }
}

void CMSMCaptionBar::SetParentMaximize ( BOOL bParentMaximize = true )

Definition at line 248 of file MSMCaptionBar.cpp.

{
  if (m_BtnMaximize.GetSafeHwnd () != NULL)
  {
    m_BtnMaximize.SetSysCommand (bParentMaximize ? SC_RESTORE : SC_MAXIMIZE);
    m_BtnMaximize.SetTooltip (bParentMaximize ? _T("Restore down") : _T("Maximize"));
  }

  if (m_bParentMaximize != bParentMaximize)
  {
    m_bParentMaximize = bParentMaximize;

    Invalidate ();
  }
}

void CMSMCaptionBar::ShowSysMenu ( const CPoint & point ) [protected, virtual]

Definition at line 535 of file MSMCaptionBar.cpp.

{
  CWnd* pParentWnd = GetParent ();

  if (pParentWnd != NULL)
  {
    CMenu* pMenu = pParentWnd->GetSystemMenu (FALSE);

    if (pMenu == NULL || pMenu->GetSafeHmenu () == NULL)
    {
      return;
    }

    pMenu->SetDefaultItem (SC_CLOSE);

    if (m_bParentMaximize)
    {
      pMenu->EnableMenuItem (SC_SIZE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
      pMenu->EnableMenuItem (SC_MOVE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
      pMenu->EnableMenuItem (SC_MAXIMIZE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);

      pMenu->EnableMenuItem (SC_RESTORE, MF_BYCOMMAND | MF_ENABLED);
    }
    else
    {
      pMenu->EnableMenuItem (SC_RESTORE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);

      pMenu->EnableMenuItem (SC_SIZE, MF_BYCOMMAND | MF_ENABLED);
      pMenu->EnableMenuItem (SC_MOVE, MF_BYCOMMAND | MF_ENABLED);
      pMenu->EnableMenuItem (SC_MAXIMIZE, MF_BYCOMMAND | MF_ENABLED);
    }

    ((CWinAppEx*)AfxGetApp ())->GetContextMenuManager ()->ShowPopupMenu
      (pMenu->GetSafeHmenu(), point.x, point.y, this, TRUE, TRUE, FALSE);
  }
}

Member Data Documentation

BOOL CMSMCaptionBar::m_bParentActive

Definition at line 86 of file MSMCaptionBar.h.

BOOL CMSMCaptionBar::m_bParentMaximize

Definition at line 87 of file MSMCaptionBar.h.

CMSMCaptionBarButton CMSMCaptionBar::m_BtnClose

Definition at line 95 of file MSMCaptionBar.h.

CMSMCaptionBarButton CMSMCaptionBar::m_BtnMaximize

Definition at line 94 of file MSMCaptionBar.h.

CMSMCaptionBarButton CMSMCaptionBar::m_BtnMinimize

Definition at line 93 of file MSMCaptionBar.h.

CFont CMSMCaptionBar::m_CaptionFont

Definition at line 91 of file MSMCaptionBar.h.

int CMSMCaptionBar::m_CaptionHeight

Definition at line 90 of file MSMCaptionBar.h.

HICON CMSMCaptionBar::m_hIcon

Definition at line 83 of file MSMCaptionBar.h.

CString CMSMCaptionBar::m_strCaption

Definition at line 81 of file MSMCaptionBar.h.

int CMSMCaptionBar::m_SystemHeight

Definition at line 89 of file MSMCaptionBar.h.

CSize CMSMCaptionBar::m_szIcon

Definition at line 84 of file MSMCaptionBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMCaptionBar.h
  • vc2008fp/MSMoneyDemo/MSMCaptionBar.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMCaptionBarButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions

CMSMCaptionBarButton Class Reference

#include "MSMCaptionBarButton.h"

List of all members.

Public Member Functions

CMSMCaptionBarButton ()
virtual | ~CMSMCaptionBarButton ()
UINT | GetSysCommand () const
void | SetSysCommand (UINT uiSysCommand)

Protected Member Functions

virtual void | OnDraw (CDC *pDC, const CRect &rect, UINT uiState)

Private Member Functions

DECLARE_DYNCREATE (CMSMCaptionBarButton)

Detailed Description

Definition at line 18 of file MSMCaptionBarButton.h.

Constructor & Destructor Documentation

CMSMCaptionBarButton::CMSMCaptionBarButton ( )

Definition at line 29 of file MSMCaptionBarButton.cpp.

{
  m_bDrawFocus = FALSE;
}

CMSMCaptionBarButton::~CMSMCaptionBarButton ( ) [virtual]

Definition at line 34 of file MSMCaptionBarButton.cpp.

{
}

Member Function Documentation

CMSMCaptionBarButton::DECLARE_DYNCREATE ( CMSMCaptionBarButton ) [private]
UINT CMSMCaptionBarButton::GetSysCommand ( ) const

Definition at line 70 of file MSMCaptionBarButton.cpp.

{
    HWND hWnd = GetSafeHwnd();

    ASSERT(hWnd != NULL);

    if (hWnd != NULL)
    {
        return ::GetWindowLong (hWnd, GWL_ID);
    }

    return 0;
}

void CMSMCaptionBarButton::OnDraw | ( | CDC * | pDC,
 |  | const CRect & | rect,
 |  | UINT | uiState |
 | ) |  |  | [protected, virtual]

Definition at line 38 of file MSMCaptionBarButton.cpp.

{
  CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
    CMFCVisualManager::GetInstance ());

  long nID = GetSysCommand ();

  if (pManager == NULL || nID == 0)
  {
    ASSERT (FALSE);
  }
  else
  {
    CRect rt;
    GetClientRect(rt);

    CMFCVisualManager::AFX_BUTTON_STATE state =
      CMFCVisualManager::ButtonsIsRegular;

    if (m_bPushed)
    {
      state = CMFCVisualManager::ButtonsIsPressed;
    }
    else if (m_bHighlighted)
    {
      state = CMFCVisualManager::ButtonsIsHighlighted;
    }

    pManager->MSMDrawCaptionButton (pDC, rt, state, nID);
  }
}

void CMSMCaptionBarButton::SetSysCommand ( UINT uiSysCommand )

Definition at line 84 of file MSMCaptionBarButton.cpp.

{
  HWND hWnd = GetSafeHwnd();

  ASSERT(hWnd != NULL);

  if (GetSysCommand () != uiSysCommand && hWnd != NULL)
  {
    ::SetWindowLong (hWnd, GWL_ID, uiSysCommand);
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMCaptionBarButton.h
  • vc2008fp/MSMoneyDemo/MSMCaptionBarButton.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMCategoryBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSMCategoryBar Class Reference

#include "MSMCategoryBar.h"

Inherits CMSMToolBar.

List of all members.

Public Member Functions

CMSMCategoryBar ()
virtual | ~CMSMCategoryBar ()
virtual int | GetRowHeight () const
virtual BOOL | RestoreOriginalstate ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Detailed Description

Definition at line 20 of file MSMCategoryBar.h.

Constructor & Destructor Documentation

CMSMCategoryBar::CMSMCategoryBar ( )

Definition at line 31 of file MSMCategoryBar.cpp.

{
}

CMSMCategoryBar::~CMSMCategoryBar ( ) [virtual]

Definition at line 35 of file MSMCategoryBar.cpp.

{
}

Member Function Documentation

virtual int CMSMCategoryBar::GetRowHeight ( ) const [inline, virtual]

Definition at line 39 of file MSMCategoryBar.h.

        {
          return 1;
        }

int CMSMCategoryBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Reimplemented from CMSMToolBar.

Definition at line 46 of file MSMCategoryBar.cpp.

{
  if (CMSMToolBar::OnCreate (lpCreateStruct) == -1)
    return -1;

  RestoreOriginalstate ();

  return 0;
}

BOOL CMSMCategoryBar::RestoreOriginalstate ( ) [virtual]

Definition at line 56 of file MSMCategoryBar.cpp.

{
  RemoveAllButtons ();

  InsertButton (CMSMCategoryBarButton (_T("Home")     , ID_CATEGORIE_1));
  InsertButton (CMSMCategoryBarButton (_T("Banking")  , ID_CATEGORIE_2));
  InsertButton (CMSMCategoryBarButton (_T("Bills")    , ID_CATEGORIE_3));
  InsertButton (CMSMCategoryBarButton (_T("Reports")  , ID_CATEGORIE_4));
  InsertButton (CMSMCategoryBarButton (_T("Budget")   , ID_CATEGORIE_5));
  InsertButton (CMSMCategoryBarButton (_T("Investing"), ID_CATEGORIE_6));
  InsertButton (CMSMCategoryBarButton (_T("Planning") , ID_CATEGORIE_7));
  InsertButton (CMSMCategoryBarButton (_T("Taxes")    , ID_CATEGORIE_8));

//  EnableCustomizeButton (TRUE, -1, _T(""));

  AdjustLayout ();
  Invalidate ();

  return TRUE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMCategoryBar.h
  • vc2008fp/MSMoneyDemo/MSMCategoryBar.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMCategoryBarButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSMCategoryBarButton Class Reference

#include "MSMCategoryBarButton.h"

List of all members.

Public Member Functions

CMSMCategoryBarButton ()
CMSMCategoryBarButton (LPCTSTR lpszLabel, UINT nID)
virtual | ~CMSMCategoryBarButton ()
virtual void | OnDraw (CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE)

Protected Member Functions

void | Initialize ()
virtual BOOL | IsEditable () const
virtual SIZE | OnCalculateSize (CDC *pDC, const CSize &sizeDefault, BOOL bHorz)

Detailed Description

Definition at line 12 of file MSMCategoryBarButton.h.

Constructor & Destructor Documentation

CMSMCategoryBarButton::CMSMCategoryBarButton ( )

Definition at line 34 of file MSMCategoryBarButton.cpp.

{
  Initialize ();
}

CMSMCategoryBarButton::CMSMCategoryBarButton | ( | LPCTSTR | lpszLabel,
 |  | UINT | nID
 | ) |  |

Definition at line 40 of file MSMCategoryBarButton.cpp.

{
  m_strText = lpszLabel;
  m_nID     = nID;

  Initialize ();
}

CMSMCategoryBarButton::~CMSMCategoryBarButton ( ) [virtual]

Definition at line 48 of file MSMCategoryBarButton.cpp.

{

}

Member Function Documentation

void CMSMCategoryBarButton::Initialize ( ) [protected]

Definition at line 53 of file MSMCategoryBarButton.cpp.

{
  m_bText = TRUE;
}

virtual BOOL CMSMCategoryBarButton::IsEditable ( ) const [inline, protected, virtual]

Definition at line 31 of file MSMCategoryBarButton.h.

         {
           return FALSE;
         }

SIZE CMSMCategoryBarButton::OnCalculateSize | ( | CDC * | pDC,
 |  | const CSize & | sizeDefault,
 |  | BOOL | bHorz |
 | ) |  |  | [protected, virtual]

Definition at line 136 of file MSMCategoryBarButton.cpp.

{
  ASSERT_VALID (pDC);

  CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
    CMFCVisualManager::GetInstance ());

  if (pManager == NULL)
  {
    return CMFCToolBarButton::OnCalculateSize (pDC, sizeDefault, bHorz);
  }

  if(!IsVisible())
  {
    return CSize(0,0);
  }

  CSize size = sizeDefault;

  if ((m_nStyle & TBBS_SEPARATOR) == 0)
  {
    if (!IsDrawImage () || GetImage () < 0)
    {
      CSize sizeExtra = m_bExtraSize ?
        CMFCVisualManager::GetInstance ()->GetButtonExtraBorder () : CSize (0, 0);

      if (bHorz)
      {
        size.cx = sizeExtra.cx;
      }
      else
      {
        size.cy = sizeExtra.cy;
      }
    }

    m_sizeText = CSize (0, 0);

    if (!m_strText.IsEmpty () && IsDrawText ())
    {
      CFont* pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));

      CRect rectText (0, 0,
        sizeDefault.cx * 3, sizeDefault.cy);

      UINT uiTextFormat = DT_CENTER | DT_CALCRECT;
      if (m_bWrapText)
      {
        uiTextFormat |= DT_WORDBREAK;
      }

      pDC->DrawText ( m_strText, rectText, uiTextFormat);
      m_sizeText = rectText.Size ();
      m_sizeText.cx += 2 * nTextMargin;

      size.cx = max (size.cx, m_sizeText.cx) + 6 * nTextMargin;
      size.cy = m_sizeText.cy + 11;

      pDC->SelectObject (pOldFont);
    }
  }

  return size;
}

void CMSMCategoryBarButton::OnDraw | ( | CDC * | pDC,
 |  | const CRect & | rect,
 |  | CMFCToolBarImages * | pImages,
 |  | BOOL | bHorz = TRUE,
 |  | BOOL | bCustomizeMode = FALSE,
 |  | BOOL | bHighlight = FALSE,
 |  | BOOL | bDrawBorder = TRUE,
 |  | BOOL | bGrayDisabledButtons = TRUE |
 | ) |  |  | [virtual]

Definition at line 58 of file MSMCategoryBarButton.cpp.

{
  ASSERT_VALID (pDC);
  ASSERT_VALID (this);

  m_bHorz = bHorz;

  //----------------------
  // Fill button interior:
  //----------------------
  FillInterior (pDC, rect, bHighlight);

  BOOL bHot = bHighlight;
  CSize sizeImage = (pImages == NULL) ? CSize (0, 0) : pImages->GetImageSize (TRUE);

  CRect rectInternal = rect;

  CFont* pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));

  //--------------------
  // Draw button's text:
  //--------------------
  CMFCVisualManager::AFX_BUTTON_STATE state = CMFCVisualManager::ButtonsIsRegular;

  if (bHighlight)
  {
    state = CMFCVisualManager::ButtonsIsHighlighted;
  }
  else if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
  {
    //-----------------------
    // Pressed in or checked:
    //-----------------------
    state = CMFCVisualManager::ButtonsIsPressed;
  }

  COLORREF clrText = CMFCVisualManager::GetInstance ()->GetToolbarButtonTextColor (
    this, state);

  pDC->SetTextColor (clrText);
  CString strText = m_strText;
  CRect rectText = rectInternal;
  UINT uiTextFormat = 0;

  rectText.top += 7;
  uiTextFormat = DT_SINGLELINE;

  if (bHorz)
  {
    pDC->DrawText (strText, &rectText, uiTextFormat | DT_CENTER);
  }

  pDC->SelectObject (pOldFont);

  //--------------------
  // Draw button border:
  //--------------------
  if (!bCustomizeMode && HaveHotBorder () && bDrawBorder)
  {
    if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
    {
      //-----------------------
      // Pressed in or checked:
      //-----------------------
      CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
        this, rect, CMFCVisualManager::ButtonsIsPressed);
    }
    else if (bHot && !(m_nStyle & TBBS_DISABLED) &&
      !(m_nStyle & (TBBS_CHECKED | TBBS_INDETERMINATE)))
    {
      CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
        this, rect, CMFCVisualManager::ButtonsIsHighlighted);
    }
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMCategoryBarButton.h
  • vc2008fp/MSMoneyDemo/MSMCategoryBarButton.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSMDialog Class Reference

#include "MSMDialog.h"

List of all members.

Public Member Functions

CMSMDialog ()
CMSMDialog (LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL)
CMSMDialog (UINT nIDTemplate, CWnd *pParentWnd=NULL)

Protected Member Functions

void CommonConstruct ()

Detailed Description

Definition at line 18 of file MSMDialog.h.

Constructor & Destructor Documentation

CMSMDialog::CMSMDialog ( )

Definition at line 28 of file MSMDialog.cpp.

  : CDialogEx ()
{
  CommonConstruct ();
}

CMSMDialog::CMSMDialog | ( | UINT | nIDTemplate,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |

Definition at line 34 of file MSMDialog.cpp.

  : CDialogEx (nIDTemplate, pParentWnd)
{
  CommonConstruct ();
}

CMSMDialog::CMSMDialog | ( | LPCTSTR | lpszTemplateName,
 |  | CWnd * | pParentWnd = NULL
 | ) |  |

Definition at line 40 of file MSMDialog.cpp.

  : CDialogEx (lpszTemplateName, pParentWnd)
{
  CommonConstruct ();
}

Member Function Documentation

void CMSMDialog::CommonConstruct ( ) [protected]

Definition at line 46 of file MSMDialog.cpp.

{
  SetBackgroundColor (RGB (239, 247, 253));
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMDialog.h
  • vc2008fp/MSMoneyDemo/MSMDialog.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMLinksBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CMSMLinksBar Class Reference

#include "MSMLinksBar.h"

Inherits CMSMToolBar.

List of all members.

Public Member Functions

CMSMLinksBar ()
virtual | ~CMSMLinksBar ()
UINT | GetCurrentCommand () const
virtual int | GetRowHeight () const
void | SetCurrentCommand (UINT nCommand)

Private Attributes

UINT m_CurrentCommand

Detailed Description

Definition at line 20 of file MSMLinksBar.h.

Constructor & Destructor Documentation

CMSMLinksBar::CMSMLinksBar ( )

Definition at line 31 of file MSMLinksBar.cpp.

{
  m_CurrentCommand = 0;
}

CMSMLinksBar::~CMSMLinksBar ( ) [virtual]

Definition at line 36 of file MSMLinksBar.cpp.

{
}

Member Function Documentation

UINT CMSMLinksBar::GetCurrentCommand ( ) const [inline]

Definition at line 47 of file MSMLinksBar.h.

     {
      return m_CurrentCommand;
     }

virtual int CMSMLinksBar::GetRowHeight ( ) const [inline, virtual]

Definition at line 37 of file MSMLinksBar.h.

        {
          return 1;
        }

void CMSMLinksBar::SetCurrentCommand ( UINT nCommand ) [inline]

Definition at line 42 of file MSMLinksBar.h.

     {
      m_CurrentCommand = nCommand;
     }

Member Data Documentation

UINT CMSMLinksBar::m_CurrentCommand [private]

Definition at line 56 of file MSMLinksBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMLinksBar.h
  • vc2008fp/MSMoneyDemo/MSMLinksBar.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMLinksBarButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSMLinksBarButton Class Reference

#include "MSMLinksBarButton.h"

List of all members.

Public Member Functions

CMSMLinksBarButton ()
CMSMLinksBarButton (LPCTSTR lpszLabel, UINT nID)
virtual | ~CMSMLinksBarButton ()
virtual void | OnDraw (CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE)

Protected Member Functions

void | Initialize ()
virtual BOOL | IsEditable () const
virtual SIZE | OnCalculateSize (CDC *pDC, const CSize &sizeDefault, BOOL bHorz)

Detailed Description

Definition at line 12 of file MSMLinksBarButton.h.

Constructor & Destructor Documentation

CMSMLinksBarButton::CMSMLinksBarButton ( )

Definition at line 32 of file MSMLinksBarButton.cpp.

{
  Initialize ();
}

CMSMLinksBarButton::CMSMLinksBarButton | ( | LPCTSTR | lpszLabel,
 |  | UINT | nID
 | ) |  |

Definition at line 38 of file MSMLinksBarButton.cpp.

{
  m_strText = lpszLabel;
  m_nID     = nID;

  Initialize ();
}

CMSMLinksBarButton::~CMSMLinksBarButton ( ) [virtual]

Definition at line 46 of file MSMLinksBarButton.cpp.

{

}

Member Function Documentation

void CMSMLinksBarButton::Initialize ( ) [protected]

Definition at line 51 of file MSMLinksBarButton.cpp.

{
  m_bText = TRUE;
}

virtual BOOL CMSMLinksBarButton::IsEditable ( ) const [inline, protected, virtual]

Definition at line 31 of file MSMLinksBarButton.h.

         {
           return FALSE;
         }

SIZE CMSMLinksBarButton::OnCalculateSize | ( | CDC * | pDC,
 |  | const CSize & | sizeDefault,
 |  | BOOL | bHorz |
 | ) |  |  | [protected, virtual]

Definition at line 158 of file MSMLinksBarButton.cpp.

{
  ASSERT_VALID (pDC);

  CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
    CMFCVisualManager::GetInstance ());

  if (pManager == NULL)
  {
    return CMFCToolBarButton::OnCalculateSize (pDC, sizeDefault, bHorz);
  }

  if(!IsVisible())
  {
    return CSize(0,0);
  }

  CSize size = sizeDefault;

  if ((m_nStyle & TBBS_SEPARATOR) == 0)
  {
    if (!IsDrawImage () || GetImage () < 0)
    {
      CSize sizeExtra = m_bExtraSize ?
        CMFCVisualManager::GetInstance ()->GetButtonExtraBorder () : CSize (0, 0);

      if (bHorz)
      {
        size.cx = sizeExtra.cx;
      }
      else
      {
        size.cy = sizeExtra.cy;
      }
    }

    m_sizeText = CSize (0, 0);

    if (!m_strText.IsEmpty () && IsDrawText ())
    {
      CFont* pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));

      CRect rectText (0, 0,
        sizeDefault.cx * 3, sizeDefault.cy);

      UINT uiTextFormat = DT_CENTER | DT_CALCRECT;
      if (m_bWrapText)
      {
        uiTextFormat |= DT_WORDBREAK;
      }

      pDC->DrawText ( m_strText, rectText, uiTextFormat);
      m_sizeText = rectText.Size ();
      m_sizeText.cx += 2 * nTextMargin;

      size.cx = max (size.cx, m_sizeText.cx);
      size.cy = m_sizeText.cy + 4 * nTextMargin;

      pDC->SelectObject (pOldFont);
    }
  }

  return size;
}

void CMSMLinksBarButton::OnDraw | ( | CDC * | pDC,
 |  | const CRect & | rect,
 |  | CMFCToolBarImages * | pImages,
 |  | BOOL | bHorz = TRUE,
 |  | BOOL | bCustomizeMode = FALSE,
 |  | BOOL | bHighlight = FALSE,
 |  | BOOL | bDrawBorder = TRUE,
 |  | BOOL | bGrayDisabledButtons = TRUE |
 | ) |  |  | [virtual]

Definition at line 56 of file MSMLinksBarButton.cpp.

{
  ASSERT_VALID (pDC);
  ASSERT_VALID (this);

  m_bHorz = bHorz;

  //----------------------
  // Fill button interior:
  //----------------------
  BOOL bChecked = (m_nStyle & TBBS_CHECKED) != 0;

  if (bChecked)
  {
    m_nStyle &= ~TBBS_CHECKED;
  }

  FillInterior (pDC, rect, bHighlight);

  if (bChecked)
  {
    m_nStyle |= TBBS_CHECKED;
  }

  BOOL bHot = bHighlight;
  CSize sizeImage = (pImages == NULL) ? CSize (0, 0) : pImages->GetImageSize (TRUE);

  CRect rectInternal = rect;

  //--------------------
  // Draw button's text:
  //--------------------
  CMFCVisualManager::AFX_BUTTON_STATE state = CMFCVisualManager::ButtonsIsRegular;

  CFont* pOldFont = NULL;

  if (bHighlight)
  {
    state = CMFCVisualManager::ButtonsIsHighlighted;
  }
  else if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
  {
    //-----------------------
    // Pressed in or checked:
    //-----------------------
    state = CMFCVisualManager::ButtonsIsPressed;
  }

  if (m_nStyle & TBBS_CHECKED)
  {
    pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));
  }
  else
  {
    pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontRegular));
  }

  COLORREF clrText = CMFCVisualManager::GetInstance ()->GetToolbarButtonTextColor (
    this, state);

  pDC->SetTextColor (clrText);
  CString strText = m_strText;
  CRect rectText = rectInternal;
  UINT uiTextFormat = 0;

  uiTextFormat = DT_SINGLELINE;

  if (bHorz)
  {
    pDC->DrawText (strText, &rectText, uiTextFormat | DT_VCENTER | DT_CENTER | DT_END_ELLIPSIS);
  }

  pDC->SelectObject (pOldFont);

  //--------------------
  // Draw button border:
  //--------------------
  if (!bCustomizeMode && HaveHotBorder () && bDrawBorder)
  {
    if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
    {
      //-----------------------
      // Pressed in or checked:
      //-----------------------
      if ((m_nStyle & TBBS_PRESSED) || bHighlight)
      {
        CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
          this, rect, CMFCVisualManager::ButtonsIsPressed);
      }
    }
    else if (bHot && !(m_nStyle & TBBS_DISABLED) &&
      !(m_nStyle & (TBBS_CHECKED | TBBS_INDETERMINATE)))
    {
      CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
        this, rect, CMFCVisualManager::ButtonsIsHighlighted);
    }
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMLinksBarButton.h
  • vc2008fp/MSMoneyDemo/MSMLinksBarButton.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMMenuBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSMMenuBar Class Reference

#include "MSMMenuBar.h"

List of all members.

Public Member Functions

CMSMMenuBar ()
virtual | ~CMSMMenuBar ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Detailed Description

Definition at line 18 of file MSMMenuBar.h.

Constructor & Destructor Documentation

CMSMMenuBar::CMSMMenuBar ( )

Definition at line 29 of file MSMMenuBar.cpp.

{
}

CMSMMenuBar::~CMSMMenuBar ( ) [virtual]

Definition at line 33 of file MSMMenuBar.cpp.

{
}

Member Function Documentation

int CMSMMenuBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 44 of file MSMMenuBar.cpp.

{
  if (CMFCMenuBar::OnCreate (lpCreateStruct) == -1)
    return -1;

  SetPaneStyle((GetPaneStyle () &
    ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT))
    | CBRS_SIZE_DYNAMIC);
  SetBorders ();

  return 0;
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMMenuBar.h
  • vc2008fp/MSMoneyDemo/MSMMenuBar.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMoneyDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMSMoneyDemoApp Class Reference

#include "MSMoneyDemo.h"

List of all members.

Public Member Functions

CMSMoneyDemoApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 26 of file MSMoneyDemo.h.

Constructor & Destructor Documentation

CMSMoneyDemoApp::CMSMoneyDemoApp ( )

Definition at line 41 of file MSMoneyDemo.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CMSMoneyDemoApp::InitInstance ( ) [virtual]

Definition at line 55 of file MSMoneyDemo.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Examples"));

  LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present

  // Initialize favorites:

  // 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(CMSMoneyDemoDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CMSMoneyDemoView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CMSMoneyDemoApp::OnAppAbout ( )

Definition at line 108 of file MSMoneyDemo.cpp.

{
  // ShowAboutDlg (AFX_IDS_APP_TITLE);
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMoneyDemo.h
  • vc2008fp/MSMoneyDemo/MSMoneyDemo.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMoneyDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSMoneyDemoDoc Class Reference

#include "MSMoneyDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CMSMoneyDemoDoc ()
BOOL | IsBackAvailable () const
BOOL | IsFrwdAvailable ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CMSMoneyDemoDoc ()
afx_msg void | OnGoAddress ()
afx_msg void | OnGoBack ()
afx_msg void | OnGoForward ()
afx_msg void | OnUpdateGoAddress (CCmdUI *pCmdUI)
afx_msg void | OnUpdateGoBack (CCmdUI *pCmdUI)
afx_msg void | OnUpdateGoForward (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewRefresh (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewStop (CCmdUI *pCmdUI)
afx_msg void | OnViewRefresh ()
afx_msg void | OnViewStop ()

Detailed Description

Definition at line 18 of file MSMoneyDemoDoc.h.

Constructor & Destructor Documentation

CMSMoneyDemoDoc::CMSMoneyDemoDoc ( ) [protected]

Definition at line 45 of file MSMoneyDemoDoc.cpp.

{
}

CMSMoneyDemoDoc::~CMSMoneyDemoDoc ( ) [virtual]

Definition at line 49 of file MSMoneyDemoDoc.cpp.

{
}

Member Function Documentation

BOOL CMSMoneyDemoDoc::IsBackAvailable ( ) const [inline]

Definition at line 28 of file MSMoneyDemoDoc.h.

  {
    return TRUE;
  }

BOOL CMSMoneyDemoDoc::IsFrwdAvailable ( ) [inline]

Definition at line 33 of file MSMoneyDemoDoc.h.

  {
    return TRUE;
  }

void CMSMoneyDemoDoc::OnGoAddress ( ) [protected]

Definition at line 117 of file MSMoneyDemoDoc.cpp.

{
}

void CMSMoneyDemoDoc::OnGoBack ( ) [protected]

Definition at line 99 of file MSMoneyDemoDoc.cpp.

{
}

void CMSMoneyDemoDoc::OnGoForward ( ) [protected]

Definition at line 108 of file MSMoneyDemoDoc.cpp.

{
}

BOOL CMSMoneyDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 53 of file MSMoneyDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CMSMoneyDemoDoc::OnUpdateGoAddress ( CCmdUI * pCmdUI ) [protected]

Definition at line 121 of file MSMoneyDemoDoc.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMSMoneyDemoDoc::OnUpdateGoBack ( CCmdUI * pCmdUI ) [protected]

Definition at line 103 of file MSMoneyDemoDoc.cpp.

{
  pCmdUI->Enable (IsBackAvailable ());
}

void CMSMoneyDemoDoc::OnUpdateGoForward ( CCmdUI * pCmdUI ) [protected]

Definition at line 112 of file MSMoneyDemoDoc.cpp.

{
  pCmdUI->Enable (IsFrwdAvailable ());
}

void CMSMoneyDemoDoc::OnUpdateViewRefresh ( CCmdUI * pCmdUI ) [protected]

Definition at line 139 of file MSMoneyDemoDoc.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMSMoneyDemoDoc::OnUpdateViewStop ( CCmdUI * pCmdUI ) [protected]

Definition at line 130 of file MSMoneyDemoDoc.cpp.

{
  pCmdUI->Enable (TRUE);
}

void CMSMoneyDemoDoc::OnViewRefresh ( ) [protected]

Definition at line 135 of file MSMoneyDemoDoc.cpp.

{
}

void CMSMoneyDemoDoc::OnViewStop ( ) [protected]

Definition at line 126 of file MSMoneyDemoDoc.cpp.

{
}

void CMSMoneyDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 69 of file MSMoneyDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.h
  • vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMoneyDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CMSMoneyDemoView Class Reference

#include "MSMoneyDemoView.h"

List of all members.

Public Member Functions

virtual | ~CMSMoneyDemoView ()
CMSMoneyDemoDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CMSMoneyDemoView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Protected Attributes

CBitmap | m_Image
CSize | m_sizeImage

Detailed Description

Definition at line 16 of file MSMoneyDemoView.h.

Constructor & Destructor Documentation

CMSMoneyDemoView::CMSMoneyDemoView ( ) [protected]

Definition at line 46 of file MSMoneyDemoView.cpp.

{
  // TODO: add construction code here

}

CMSMoneyDemoView::~CMSMoneyDemoView ( ) [virtual]

Definition at line 52 of file MSMoneyDemoView.cpp.

{
  m_sizeImage = CSize (0, 0);
}

Member Function Documentation

CMSMoneyDemoDoc * CMSMoneyDemoView::GetDocument ( ) [inline]

Definition at line 58 of file MSMoneyDemoView.h.

{
  return (CMSMoneyDemoDoc*)m_pDocument;
}

void CMSMoneyDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 90 of file MSMoneyDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

int CMSMoneyDemoView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 130 of file MSMoneyDemoView.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  m_Image.LoadBitmap (IDB_MSM_VIEW_BKGND);

  BITMAP bitmap;
  m_Image.GetBitmap (&bitmap);

  m_sizeImage = CSize (bitmap.bmWidth, bitmap.bmHeight);
  return 0;
}

void CMSMoneyDemoView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 68 of file MSMoneyDemoView.cpp.

{
  CMemDC memDC (*pDCView, this);
  CDC* pDC = &memDC.GetDC ();

  CRect rectClient;
  GetClientRect (rectClient);

  pDC->FillSolidRect (rectClient, RGB (255, 255, 255));

  pDC->DrawState (CPoint (20, 20), m_sizeImage, &m_Image, DSS_NORMAL);
}

void CMSMoneyDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 95 of file MSMoneyDemoView.cpp.

{
  // TODO: add cleanup after printing
}

BOOL CMSMoneyDemoView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 125 of file MSMoneyDemoView.cpp.

{
  return TRUE;
}

BOOL CMSMoneyDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 84 of file MSMoneyDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CMSMoneyDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 57 of file MSMoneyDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs
  cs.style &= ~WS_BORDER;
  return CView::PreCreateWindow(cs);
}

Member Data Documentation

CBitmap CMSMoneyDemoView::m_Image [protected]

Definition at line 27 of file MSMoneyDemoView.h.

CSize CMSMoneyDemoView::m_sizeImage [protected]

Definition at line 28 of file MSMoneyDemoView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMoneyDemoView.h
  • vc2008fp/MSMoneyDemo/MSMoneyDemoView.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMTasksPane Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSMTasksPane Class Reference

#include "MSMTasksPane.h"

List of all members.

Public Member Functions

CMSMTasksPane ()
virtual | ~CMSMTasksPane ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Detailed Description

Definition at line 18 of file MSMTasksPane.h.

Constructor & Destructor Documentation

CMSMTasksPane::CMSMTasksPane ( )

Definition at line 28 of file MSMTasksPane.cpp.

{
  m_bWrapTasks = TRUE;
  m_bWrapLabels = TRUE;
}

CMSMTasksPane::~CMSMTasksPane ( ) [virtual]

Definition at line 34 of file MSMTasksPane.cpp.

{
}

Member Function Documentation

int CMSMTasksPane::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 47 of file MSMTasksPane.cpp.

{
  if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
    return -1;

  int nGroup = AddGroup (_T(""));

  COleDateTime now = COleDateTime::GetCurrentTime ();
  CString strDate = now.Format (_T("%B %d, %Y"));

  AddLabel (nGroup, strDate, -1, TRUE);

  AddLabel (nGroup, _T(" "));
  AddLabel (nGroup, _T(" "));

  AddLabel (nGroup, _T("Common tasks"), -1, TRUE);
  AddSeparator (nGroup);

  AddTask (nGroup, _T("Learn more about new MFC cool and fresh features"), -1, ID_HELP_MICROSOFT);

  return 0;
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMTasksPane.h
  • vc2008fp/MSMoneyDemo/MSMTasksPane.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Static Protected Attributes

CMSMToolBar Class Reference

#include "MSMToolBar.h"

Inherited by CMSMCategoryBar, and CMSMLinksBar.

List of all members.

Public Member Functions

CMSMToolBar ()
virtual | ~CMSMToolBar ()
virtual BOOL | LoadToolBar (UINT uiResID, UINT uiColdResID=0, UINT uiMenuResID=0, BOOL bLocked=FALSE, UINT uiDisabledResID=0, UINT uiMenuDisabledResID=0, UINT uiHotResID=0, UINT uiPressedResID=0)

Protected Member Functions

virtual BOOL | DrawButton (CDC *pDC, CMFCToolBarButton *pButton, CMFCToolBarImages *pImages, BOOL bHighlighted, BOOL bDrawDisabledImages)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnSysColorChange ()

Static Protected Attributes

static CMFCToolBarImages | m_PressedImages

Detailed Description

Definition at line 18 of file MSMToolBar.h.

Constructor & Destructor Documentation

CMSMToolBar::CMSMToolBar ( )

Definition at line 31 of file MSMToolBar.cpp.

{
}

CMSMToolBar::~CMSMToolBar ( ) [virtual]

Definition at line 36 of file MSMToolBar.cpp.

{
}

Member Function Documentation

BOOL CMSMToolBar::DrawButton | ( | CDC * | pDC,
 |  | CMFCToolBarButton * | pButton,
 |  | CMFCToolBarImages * | pImages,
 |  | BOOL | bHighlighted,
 |  | BOOL | bDrawDisabledImages |
 | ) |  |  | [protected, virtual]

Definition at line 89 of file MSMToolBar.cpp.

{
  ASSERT_VALID (pDC);
  ASSERT_VALID (pButton);

  CMFCToolBarImages* pNewImages = pImages;

  CAfxDrawState ds;

  if (!m_bMenuMode && (pButton->m_nStyle & (TBBS_PRESSED)) &&
    m_PressedImages.GetCount () > 0)
  {
    pNewImages = &m_PressedImages;

    pNewImages->SetTransparentColor (afxGlobalData.clrBtnFace);

    pNewImages->PrepareDrawImage (ds, GetImageSize (), FALSE);
  }

  if (!CMFCToolBar::DrawButton (pDC, pButton, pNewImages, bHighlighted,
      bDrawDisabledImages))
  {
    return FALSE;
  }

  if (pNewImages != pImages)
  {
    pNewImages->EndDrawImage (ds);
  }

  return TRUE;
}

BOOL CMSMToolBar::LoadToolBar | ( | UINT | uiResID,
 |  | UINT | uiColdResID = 0,
 |  | UINT | uiMenuResID = 0,
 |  | BOOL | bLocked = FALSE,
 |  | UINT | uiDisabledResID = 0,
 |  | UINT | uiMenuDisabledResID = 0,
 |  | UINT | uiHotResID = 0,
 |  | UINT | uiPressedResID = 0 |
 | ) |  |  | [virtual]

Definition at line 40 of file MSMToolBar.cpp.

{
  if (!CMFCToolBar::LoadToolBar (uiResID, uiColdResID, uiMenuResID, bLocked,
    uiDisabledResID, uiMenuDisabledResID, uiHotResID))
  {
    return FALSE;
  }

  if (uiPressedResID != 0)
  {
    m_PressedImages.SetImageSize (m_sizeImage);

    if (!m_PressedImages.Load (uiPressedResID, AfxGetResourceHandle (), TRUE))
    {
      return FALSE;
    }

    ASSERT (m_Images.GetCount () == m_PressedImages.GetCount ());
  }

  return TRUE;
}

int CMSMToolBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Reimplemented in CMSMCategoryBar.

Definition at line 74 of file MSMToolBar.cpp.

{
  if (CMFCToolBar::OnCreate(lpCreateStruct) == -1)
    return -1;

  SetPaneStyle((GetPaneStyle () &
    ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT))
    | CBRS_SIZE_DYNAMIC);
  SetBorders ();

  SetGrayDisabledButtons (FALSE);

  return 0;
}

void CMSMToolBar::OnSysColorChange ( ) [protected]

Definition at line 125 of file MSMToolBar.cpp.

{
  CMFCToolBar::OnSysColorChange ();

  m_PressedImages.OnSysColorChange ();
}

Member Data Documentation

CMFCToolBarImages CMSMToolBar::m_PressedImages [static, protected]

Definition at line 54 of file MSMToolBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMToolBar.h
  • vc2008fp/MSMoneyDemo/MSMToolBar.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSMVisualManager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CMSMVisualManager Class Reference

#include "MSMVisualManager.h"

List of all members.

Public Member Functions

CMSMVisualManager ()
virtual | ~CMSMVisualManager ()
const CSize & | GetMSMCaptionButtonsSize () const
BOOL | LoadMSMCaptionButtonsIcons (LPCTSTR lpszID)
virtual void | MSMDrawCaptionButton (CDC *pDC, CRect rect, AFX_BUTTON_STATE state, UINT id)
void | SetupMemoryBitmapSize (CDC *pDC, const CSize &size)

Protected Member Functions

virtual COLORREF | GetToolbarButtonTextColor (CMFCToolBarButton *pButton, CMFCVisualManager::AFX_BUTTON_STATE state)
virtual void | OnDrawButtonBorder (CDC *pDC, CMFCToolBarButton *pButton, CRect rect, AFX_BUTTON_STATE state)
virtual void | OnDrawComboBorder (CDC *pDC, CRect rect, BOOL bDisabled, BOOL bIsDropped, BOOL bIsHighlighted, CMFCToolBarComboBoxButton *pButton)
virtual void | OnDrawComboDropButton (CDC *pDC, CRect rect, BOOL bDisabled, BOOL bIsDropped, BOOL bIsHighlighted, CMFCToolBarComboBoxButton *pButton)
virtual void | OnDrawMenuBorder (CDC *pDC, CMFCPopupMenu *pMenu, CRect rect)
virtual void | OnDrawSeparator (CDC *pDC, CBasePane *pBar, CRect rect, BOOL bHorz)
virtual void | OnDrawTask (CDC *pDC, CMFCTasksPaneTask *pTask, CImageList *pIcons, BOOL bIsHighlighted=FALSE, BOOL bIsSelected=FALSE)
virtual void | OnDrawTasksGroupAreaBorder (CDC *, CRect, BOOL=FALSE, BOOL=FALSE)
virtual void | OnFillBarBackground (CDC *pDC, CBasePane *pBar, CRect rectClient, CRect rectClip, BOOL bNCArea=FALSE)
virtual void | OnFillHighlightedArea (CDC *pDC, CRect rect, CBrush *pBrush, CMFCToolBarButton *pButton)
virtual void | OnFillTasksGroupInterior (CDC *, CRect, BOOL=FALSE)
virtual void | OnFillTasksPaneBackground (CDC *pDC, CRect rectWorkArea)
virtual void | OnHighlightMenuItem (CDC *pDC, CMFCToolBarMenuButton *pButton, CRect rect, COLORREF &clrText)
virtual void | OnUpdateSystemColors ()

Private Attributes

CBrush | m_brLinksBarBack
CBrush | m_brLinksBarButtonHighlighted
CBrush | m_brMenuBarButtonHighlighted
CImageList | m_CaptionButtonIconst
CSize | m_CaptionButtonSize
COLORREF | m_clrCategorieBarButtonBorder
COLORREF | m_clrCategorieBarButtonBorderM
COLORREF | m_clrCategorieBarButtonF
COLORREF | m_clrCategorieBarButtonL
COLORREF | m_clrCategorieBarButtonLine
COLORREF | m_clrCategorieBarButtonTextHighlighted
COLORREF | m_clrCategorieBarButtonTextPressed
COLORREF | m_clrCategorieBarButtonTextRegular
COLORREF | m_clrComboBoxBorder
COLORREF | m_clrComboBoxBtnHighlightedBorder
COLORREF | m_clrComboBoxBtnHighlightedF
COLORREF | m_clrComboBoxBtnHighlightedL
COLORREF | m_clrComboBoxBtnPressedBorder
COLORREF | m_clrComboBoxBtnPressedF
COLORREF | m_clrComboBoxBtnPressedL
COLORREF | m_clrComboBoxBtnRegularBorder
COLORREF | m_clrComboBoxBtnRegularF
COLORREF | m_clrComboBoxBtnRegularL
COLORREF | m_clrLinksBarButtonBorderHighlighted
COLORREF | m_clrMenuBarButtonBorderHighlighted
COLORREF | m_clrMenuBarButtonTextHighlighted
COLORREF | m_clrMenuBarButtonTextPressed
COLORREF | m_clrMenuBarButtonTextRegular
COLORREF | m_clrToolBarButtonTextHighlighted
COLORREF | m_clrToolBarButtonTextPressed
COLORREF | m_clrToolBarButtonTextRegular
COLORREF | m_clrToolBarSeparatorF
COLORREF | m_clrToolBarSeparatorM
COLORREF | m_clrToolBarSeparatorS
CBitmap | m_MemoryBitmap
CDC | m_MemoryDC
BOOL | m_MemoryFilled
CSize | m_MemorySize
CBitmap | m_MSMFrameBitmap
CBitmap | m_MSMViewBitmap

Detailed Description

Definition at line 15 of file MSMVisualManager.h.

Constructor & Destructor Documentation

CMSMVisualManager::CMSMVisualManager ( )

Definition at line 110 of file MSMVisualManager.cpp.

{
  //SetOfficeStyleMenus (TRUE);
  SetMenuShadowDepth  (0);

  m_MemoryFilled = false;
  m_MemorySize   = CSize (0, 0);

  m_CaptionButtonSize = CSize (0, 0);

  m_brMenuBarButtonHighlighted.CreateSolidBrush (RGB ( 57, 134, 206));
  m_clrMenuBarButtonBorderHighlighted = RGB ( 57, 134, 206);

  m_clrMenuBarButtonTextRegular       = RGB (255, 255, 255);
  m_clrMenuBarButtonTextPressed       = RGB (255, 255, 255);
  m_clrMenuBarButtonTextHighlighted   = RGB (255, 255, 255);

  m_clrToolBarButtonTextRegular       = RGB (255, 255, 255);
  m_clrToolBarButtonTextPressed       = RGB (255, 223, 127);
  m_clrToolBarButtonTextHighlighted   = RGB (255, 223, 127);

  m_clrCategorieBarButtonTextRegular  = RGB (232, 243, 253);
  m_clrCategorieBarButtonTextPressed  = RGB (255, 223, 127);
  m_clrCategorieBarButtonTextHighlighted
                    = RGB (255, 223, 127);

  m_clrToolBarSeparatorS              = RGB (119, 162, 211);
  m_clrToolBarSeparatorM              = RGB (255, 255, 255);
  m_clrToolBarSeparatorF              = RGB ( 85, 136, 198);

  m_clrComboBoxBorder         = RGB ( 78, 122, 171);

  m_clrComboBoxBtnRegularF      = RGB (208, 220, 252);
  m_clrComboBoxBtnRegularL      = RGB (182, 205, 251);
  m_clrComboBoxBtnRegularBorder   = RGB (177, 197, 245);
  m_clrComboBoxBtnHighlightedF    = RGB (226, 244, 254);
  m_clrComboBoxBtnHighlightedL    = RGB (203, 219, 252);
  m_clrComboBoxBtnHighlightedBorder = RGB (140, 165, 225);
  m_clrComboBoxBtnPressedF      = RGB (122, 153, 242);
  m_clrComboBoxBtnPressedL      = RGB (159, 178, 235);
  m_clrComboBoxBtnPressedBorder   = RGB (181, 198, 242);

  m_clrCategorieBarButtonBorder       = RGB ( 53,  94, 159);
  m_clrCategorieBarButtonBorderM      = RGB (191, 209, 231);
  m_clrCategorieBarButtonLine         = RGB (123, 165, 210);
  m_clrCategorieBarButtonF            = RGB ( 77, 127, 193);
  m_clrCategorieBarButtonL            = RGB ( 40,  74, 144);

  m_brLinksBarBack.CreateSolidBrush (RGB ( 49,  85, 153));

  m_brLinksBarButtonHighlighted.CreateSolidBrush (RGB ( 38,  69, 135));
  m_clrLinksBarButtonBorderHighlighted
                    = RGB ( 38,  69, 135);
}

CMSMVisualManager::~CMSMVisualManager ( ) [virtual]

Definition at line 246 of file MSMVisualManager.cpp.

{
}

Member Function Documentation

const CSize & CMSMVisualManager::GetMSMCaptionButtonsSize ( ) const [inline]

Definition at line 130 of file MSMVisualManager.h.

{
  return m_CaptionButtonSize;
}

COLORREF CMSMVisualManager::GetToolbarButtonTextColor | ( | CMFCToolBarButton * | pButton,
 |  | CMFCVisualManager::AFX_BUTTON_STATE | state |
 | ) |  |  | [protected, virtual]

Definition at line 508 of file MSMVisualManager.cpp.

{
  COLORREF clr = COLORREF (-1);

  CMFCToolBarMenuButton* pMenuButton =
    DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);

  BOOL bIsMenuButton = pMenuButton != NULL;

  BOOL bIsPopupMenu = bIsMenuButton &&
    pMenuButton->GetParentWnd () != NULL &&
    pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));

  if (bIsMenuButton && !bIsPopupMenu)
  {
    switch (state)
    {
    case ButtonsIsRegular:
      clr = m_clrMenuBarButtonTextRegular;
      break;
    case ButtonsIsPressed:
      clr = m_clrMenuBarButtonTextPressed;
      break;
    case ButtonsIsHighlighted:
      clr = m_clrMenuBarButtonTextHighlighted;
      break;
    }
  }
  else
  {
    if (pButton->IsKindOf (RUNTIME_CLASS (CMSMCategoryBarButton)))
    {
      switch (state)
      {
      case ButtonsIsRegular:
        clr = m_clrCategorieBarButtonTextRegular;
        break;
      case ButtonsIsPressed:
        clr = m_clrCategorieBarButtonTextPressed;
        break;
      case ButtonsIsHighlighted:
        clr = m_clrCategorieBarButtonTextHighlighted;
        break;
      }
    }
    else
    {
      switch (state)
      {
      case ButtonsIsRegular:
        clr = m_clrToolBarButtonTextRegular;
        break;
      case ButtonsIsPressed:
        clr = m_clrToolBarButtonTextPressed;
        break;
      case ButtonsIsHighlighted:
        clr = m_clrToolBarButtonTextHighlighted;
        break;
      }
    }
  }

  if (clr == COLORREF (-1))
  {
    clr = CMFCVisualManagerOffice2003::GetToolbarButtonTextColor (pButton, state);
  }

  return clr;
}

BOOL CMSMVisualManager::LoadMSMCaptionButtonsIcons ( LPCTSTR lpszID )

Definition at line 165 of file MSMVisualManager.cpp.

{
  CBitmap bmp;

  m_CaptionButtonSize = CSize (0, 0);

  if (bmp.LoadBitmap (lpszID))
  {
    BITMAP bm;
    ZeroMemory (&bm, sizeof (BITMAP));

    bmp.GetBitmap (&bm);

    if (m_CaptionButtonIconst.GetSafeHandle() != NULL &&
      m_CaptionButtonIconst.GetImageCount () > 0)
    {
      m_CaptionButtonIconst.DeleteImageList ();
    }

    UINT nFlags = ILC_MASK;

    switch (bm.bmBitsPixel)
    {
    case 4 :
      nFlags |= ILC_COLOR4;
      break;
    case 8 :
      nFlags |= ILC_COLOR8;
      break;
    case 16:
      nFlags |= ILC_COLOR16;
      break;
    case 24:
      nFlags |= ILC_COLOR24;
      break;
    case 32:
      nFlags |= ILC_COLOR32;
      break;
    default:
      ASSERT (FALSE);
    }

    m_CaptionButtonSize.cx = bm.bmWidth / 12;
    m_CaptionButtonSize.cy = bm.bmHeight;

    m_CaptionButtonIconst.Create (m_CaptionButtonSize.cx,
      m_CaptionButtonSize.cy, nFlags, 0, 3);
    m_CaptionButtonIconst.Add (&bmp, RGB (255, 0, 255));

    return true;
  }

  return false;
}

void CMSMVisualManager::MSMDrawCaptionButton | ( | CDC * | pDC,
 |  | CRect | rect,
 |  | AFX_BUTTON_STATE | state,
 |  | UINT | id |
 | ) |  |  | [virtual]

Definition at line 394 of file MSMVisualManager.cpp.

{
  int nState = CBS_NORMAL;

  int nPart = 0;

  if (m_CaptionButtonIconst.GetSafeHandle () != NULL &&
    m_CaptionButtonIconst.GetImageCount () >= 12)
  {
    long index = 0;

    switch (id)
    {
    case SC_CLOSE:
      index = 9;
      break;
    case SC_MINIMIZE:
      index = 0;
      break;
    case SC_MAXIMIZE:
      index = 3;
      break;
    case SC_RESTORE:
      index = 6;
      break;
    default:
      ASSERT (FALSE);
    }

    switch (state)
    {
    case ButtonsIsHighlighted:
      index += 1;
      break;
    case ButtonsIsPressed:
      index += 2;
      break;
    }

    m_CaptionButtonIconst.Draw (pDC, index, rect.TopLeft (), ILD_NORMAL);

    return;
  }

  if (m_pfDrawThemeBackground == NULL || m_hThemeWindow == NULL)
  {
    switch (state)
    {
    case ButtonsIsRegular:
    case ButtonsIsHighlighted:
      nState = 0;
      break;
    case ButtonsIsPressed:
      nState = DFCS_PUSHED;
      break;
    }

    switch (id)
    {
    case SC_CLOSE:
      nPart = DFCS_CAPTIONCLOSE;
      break;
    case SC_MINIMIZE:
      nPart = DFCS_CAPTIONMIN;
      break;
    case SC_MAXIMIZE:
      nPart = DFCS_CAPTIONMAX;
      break;
    case SC_RESTORE:
      nPart = DFCS_CAPTIONRESTORE;
      break;
    default:
      ASSERT (FALSE);
    }

    pDC->DrawFrameControl (rect, DFC_CAPTION, nPart | nState);
    return;
  }

  switch (state)
  {
  case ButtonsIsRegular:
    nState = CBS_NORMAL;
    break;
  case ButtonsIsPressed:
    nState = CBS_PUSHED;
    break;
  case ButtonsIsHighlighted:
    nState = CBS_HOT;
    break;
  }

  switch (id)
  {
  case SC_CLOSE:
    nPart = WP_CLOSEBUTTON;
    break;
  case SC_MINIMIZE:
    nPart = WP_MINBUTTON;
    break;
  case SC_MAXIMIZE:
    nPart = WP_MAXBUTTON;
    break;
  case SC_RESTORE:
    nPart = WP_RESTOREBUTTON;
    break;
  default:
    ASSERT (FALSE);
  }

  (*m_pfDrawThemeBackground) (m_hThemeWindow, pDC->GetSafeHdc(), nPart,
    nState, &rect, 0);
}

void CMSMVisualManager::OnDrawButtonBorder | ( | CDC * | pDC,
 |  | CMFCToolBarButton * | pButton,
 |  | CRect | rect,
 |  | AFX_BUTTON_STATE | state |
 | ) |  |  | [protected, virtual]

Definition at line 675 of file MSMVisualManager.cpp.

{
  ASSERT_VALID (pDC);
  ASSERT_VALID (pButton);

  if (state != ButtonsIsPressed && state != ButtonsIsHighlighted)
  {
    ASSERT ((pButton->m_nStyle & TBBS_CHECKED) == 0);
    return;
  }

  CMFCToolBarMenuButton* pMenuButton =
    DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);

  BOOL bIsMenuButton = pMenuButton != NULL;

  BOOL bIsPopupMenu = bIsMenuButton &&
    pMenuButton->GetParentWnd () != NULL &&
    pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));

  bIsMenuButton = bIsMenuButton &&
    pMenuButton->GetParentWnd () != NULL &&
    pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCMenuBar));

  if (bIsMenuButton || bIsPopupMenu)
  {
    COLORREF clrBorder = m_clrMenuItemBorder;

    switch (state)
    {
    case ButtonsIsPressed:
    case ButtonsIsHighlighted:
      clrBorder = bIsPopupMenu
        ? m_clrMenuItemBorder
        : m_clrMenuBarButtonBorderHighlighted;
      break;
    }

    if (!bIsPopupMenu || state != ButtonsIsHighlighted)
    {
      rect.right--;
      rect.bottom--;
    }

    if (bIsMenuButton && !bIsPopupMenu &&
      pMenuButton->IsDroppedDown ())
    {
      CMFCPopupMenu* pPopupMenu= pMenuButton->GetPopupMenu ();
      if (pPopupMenu != NULL &&
        (pPopupMenu->IsWindowVisible () || pPopupMenu->IsShown()))
      {
        ExtendMenuButton (pMenuButton, rect);

        BOOL bRTL = pPopupMenu->GetExStyle() & WS_EX_LAYOUTRTL;

        if (m_bShdowDroppedDownMenuButton && !bRTL &&
          CMFCMenuBar::IsMenuShadows () &&
          !CMFCToolBar::IsCustomizeMode () &&
          afxGlobalData.m_nBitsPerPixel > 8 &&
          !afxGlobalData.m_bIsBlackHighContrast &&
          !pPopupMenu->IsRightAlign ())
        {
          CDrawingManager dm (*pDC);

          dm.DrawShadow (rect, m_nMenuShadowDepth, 100, 75, NULL, NULL,
            m_clrMenuShadowBase);
        }
      }
    }

    if (state == ButtonsIsPressed || state == ButtonsIsHighlighted)
    {
      if (bIsPopupMenu && (pButton->m_nStyle & TBBS_CHECKED))
      {
        rect.bottom ++;
      }

      pDC->Draw3dRect (rect, clrBorder, clrBorder);
    }
  }
  else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMCategoryBarButton)))
  {
    if ((pButton->m_nStyle & TBBS_CHECKED) != 0)
    {
      _DrawReflectedGradient (pDC, m_clrCategorieBarButtonBorder,
        m_clrCategorieBarButtonBorderM, m_clrCategorieBarButtonBorder,
        CRect (rect.left, rect.top, rect.right, rect.top + 1), false);

      CDrawingManager dm(*pDC);

      dm.FillGradient (CRect (rect.left, rect.top, rect.left + 1, rect.bottom),
        m_clrCategorieBarButtonL, m_clrCategorieBarButtonBorder, TRUE);

      dm.FillGradient (CRect (rect.right - 1, rect.top, rect.right, rect.bottom),
        m_clrCategorieBarButtonL, m_clrCategorieBarButtonBorder, TRUE);

      {
        CPen pen (PS_SOLID, 0, m_clrCategorieBarButtonLine);

        CPen* pOldPen = pDC->SelectObject (&pen);

        pDC->MoveTo (rect.left + 1, rect.top + 1);
        pDC->LineTo (rect.right - 1, rect.top + 1);

        pDC->SelectObject (pOldPen);
      }

      {
        CPen pen (PS_SOLID, 0, m_clrCategorieBarButtonL);

        CPen* pOldPen = pDC->SelectObject (&pen);

        pDC->MoveTo (rect.left + 1, rect.bottom - 1);
        pDC->LineTo (rect.right - 1, rect.bottom - 1);

        pDC->SelectObject (pOldPen);
      }
    }
  }
  else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMLinksBarButton)))
  {
    if (state == ButtonsIsPressed || state == ButtonsIsHighlighted)
    {
      pDC->Draw3dRect (rect, m_clrLinksBarButtonBorderHighlighted, m_clrLinksBarButtonBorderHighlighted);
    }
  }
  else
  {
    if (pMenuButton != NULL &&
      pMenuButton->GetParentWnd () != NULL &&
      pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMSMToolBar)))
    {
      CRect rt (rect);

      CDrawingManager dm (*pDC);

      rt.bottom = rt.top + 1;
      dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));

      rt.bottom = rect.bottom;
      rt.top    = rt.bottom - 1;
      dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));

      rt.top    = rect.top    + 1;
      rt.bottom = rect.bottom - 1;
      rt.right  = rt.left + 1;
      dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));

      rt.right  = rect.right;
      rt.left   = rt.right - 1;
      dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));
    }
    else
    {
      // TODO: paint toolbar buttons
      //CMFCVisualManagerOffice2003::OnDrawButtonBorder (pDC, pButton, rect, state);
    }
  }
}

void CMSMVisualManager::OnDrawComboBorder | ( | CDC * | pDC,
 |  | CRect | rect,
 |  | BOOL | bDisabled,
 |  | BOOL | bIsDropped,
 |  | BOOL | bIsHighlighted,
 |  | CMFCToolBarComboBoxButton * | pButton |
 | ) |  |  | [protected, virtual]

Definition at line 942 of file MSMVisualManager.cpp.

{
  if (afxGlobalData.m_nBitsPerPixel <= 8 || afxGlobalData.m_bIsBlackHighContrast)
  {
    CMFCVisualManagerOffice2003::OnDrawComboBorder (pDC, rect,
                        bDisabled,
                        bIsDropped,
                        bIsHighlighted,
                        pButton);
    return;
  }

  rect.DeflateRect (1, 1);

  COLORREF colorBorder = bDisabled ? afxGlobalData.clrBtnShadow : m_clrComboBoxBorder;
  pDC->Draw3dRect (&rect, colorBorder, colorBorder);
}

void CMSMVisualManager::OnDrawComboDropButton | ( | CDC * | pDC,
 |  | CRect | rect,
 |  | BOOL | bDisabled,
 |  | BOOL | bIsDropped,
 |  | BOOL | bIsHighlighted,
 |  | CMFCToolBarComboBoxButton * | pButton |
 | ) |  |  | [protected, virtual]

Definition at line 964 of file MSMVisualManager.cpp.

{
  if (afxGlobalData.m_nBitsPerPixel <= 8 || afxGlobalData.m_bIsBlackHighContrast)
  {
    CMFCVisualManagerOfficeXP::OnDrawComboDropButton (pDC, rect,
                        bDisabled, bIsDropped,
                        bIsHighlighted, pButton);
    return;
  }

  ASSERT_VALID(pDC);
  ASSERT_VALID (this);

  CPoint pointTriangle (
    rect.left + (rect.Width () - CMenuImages::Size ().cx) / 2 + 1,
    rect.top + (rect.Height () - CMenuImages::Size ().cy) / 2 + 1);

  if (!bDisabled)
  {
    COLORREF clr1 = m_clrComboBoxBtnRegularF;
    COLORREF clr2 = m_clrComboBoxBtnRegularL;
    COLORREF clrB = m_clrComboBoxBtnRegularBorder;

    if (bIsHighlighted)
    {
      clr1 = m_clrComboBoxBtnHighlightedF;
      clr2 = m_clrComboBoxBtnHighlightedL;
      clrB = m_clrComboBoxBtnHighlightedBorder;
    }
    else if (bIsDropped)
    {
      clr1 = m_clrComboBoxBtnPressedF;
      clr2 = m_clrComboBoxBtnPressedL;
      clrB = m_clrComboBoxBtnPressedBorder;
    }

    CDrawingManager dm (*pDC);
    dm.FillGradient (rect, clr2, clr1, TRUE);

    pDC->Draw3dRect (rect, clrB, clrB);
  }

  CMenuImages::Draw (pDC, CMenuImages::IdArrowDown, pointTriangle,
    bDisabled ? CMenuImages::ImageGray : (bIsDropped && bIsHighlighted) ?
      CMenuImages::ImageWhite : CMenuImages::ImageBlack);
}

void CMSMVisualManager::OnDrawMenuBorder | ( | CDC * | pDC,
 |  | CMFCPopupMenu * | pMenu,
 |  | CRect | rect |
 | ) |  |  | [protected, virtual]

Definition at line 661 of file MSMVisualManager.cpp.

{
  ASSERT_VALID (pDC);

  pDC->Draw3dRect (rect, m_clrMenuBorder, m_clrMenuBorder);

  rect.DeflateRect (1, 1);
  pDC->Draw3dRect (rect, m_clrMenuLight, m_clrMenuLight);

  CRect rectLeft (1, 1, 2, rect.bottom - 1);
  pDC->FillRect (rectLeft, &m_brBarBkgnd);

}

void CMSMVisualManager::OnDrawSeparator | ( | CDC * | pDC,
 |  | CBasePane * | pBar,
 |  | CRect | rect,
 |  | BOOL | bHorz |
 | ) |  |  | [protected, virtual]

Definition at line 857 of file MSMVisualManager.cpp.

{
  ASSERT_VALID (pDC);
  ASSERT_VALID (pBar);

  if (pBar->IsDialogControl () ||
    pBar->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar)) ||
    pBar->IsKindOf (RUNTIME_CLASS (CMFCColorBar)))
  {
    CMFCVisualManagerOffice2003::OnDrawSeparator (pDC, pBar, rect, bHorz);
    return;
  }

  CRect rectSeparator = rect;

  int x1, x2;
  int y1, y2;

  if (bHorz)
  {
    x1 = x2 = (rect.left + rect.right) / 2;
    y1 = rect.top;
    y2 = rect.bottom - 1;
  }
  else
  {
    y1 = y2 = (rect.top + rect.bottom) / 2;
    x1 = rect.left;
    x2 = rect.right;

    if (pBar->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar)) &&
      !pBar->IsKindOf (RUNTIME_CLASS (CMFCColorBar)))
    {

      x1 = rect.left + CMFCToolBar::GetMenuImageSize ().cx +
            GetMenuImageMargin () + 1;

      CRect rectBar;
      pBar->GetClientRect (rectBar);

      if (rectBar.right - x2 < 50) // Last item in row
      {
        x2 = rectBar.right;
      }

      if (((CMFCPopupMenuBar*) pBar)->m_bDisableSideBarInXPMode)
      {
        x1 = 0;
      }

      //---------------------------------
      //  Maybe Quick Customize separator
      //---------------------------------
      if (pBar->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar)))
      {
        CWnd* pWnd = pBar->GetParent();
        if (pWnd != NULL && pWnd->IsKindOf (RUNTIME_CLASS (CMFCPopupMenu)))
        {
          CMFCPopupMenu* pMenu = (CMFCPopupMenu*)pWnd;
          if (pMenu->IsCustomizePane())
          {
            x1 = rect.left + 2*CMFCToolBar::GetMenuImageSize ().cx +
                3*GetMenuImageMargin () + 2;
          }
        }
      }
    }
  }

  if (x1 == x2)
  {
    x2++;
  }

  if (y1 == y2)
  {
    y2++;
  }

  _DrawReflectedGradient (pDC, m_clrToolBarSeparatorS,
    m_clrToolBarSeparatorM, m_clrToolBarSeparatorF, CRect (x1, y1, x2, y2), !!bHorz);
}

void CMSMVisualManager::OnDrawTask | ( | CDC * | pDC,
 |  | CMFCTasksPaneTask * | pTask,
 |  | CImageList * | pIcons,
 |  | BOOL | bIsHighlighted = FALSE,
 |  | BOOL | bIsSelected = FALSE |
 | ) |  |  | [protected, virtual]

Definition at line 1029 of file MSMVisualManager.cpp.

{
  if (pTask != NULL)
  {
    pTask->m_clrText = pTask->m_clrTextHot = RGB (16, 37, 127);
  }

  CMFCVisualManagerOffice2003::OnDrawTask(pDC, pTask, pIcons, bIsHighlighted, bIsSelected);
}

virtual void CMSMVisualManager::OnDrawTasksGroupAreaBorder | ( | CDC * | ,
 |  | CRect | ,
 |  | BOOL | = FALSE,
 |  | BOOL | = FALSE |
 | ) |  |  | [inline, protected, virtual]

Definition at line 70 of file MSMVisualManager.h.

{}

void CMSMVisualManager::OnFillBarBackground | ( | CDC * | pDC,
 |  | CBasePane * | pBar,
 |  | CRect | rectClient,
 |  | CRect | rectClip,
 |  | BOOL | bNCArea = FALSE |
 | ) |  |  | [protected, virtual]

Definition at line 292 of file MSMVisualManager.cpp.

{
  if (m_MSMFrameBitmap.GetSafeHandle () == NULL)
  {
    m_MSMFrameBitmap.LoadBitmap (_T("IDB_MSM_FRAME_BKGND"));

    if (!m_MemoryFilled)
    {
      m_MemoryFilled =
        _StretchBitmap (&m_MemoryDC, CRect (CPoint (0, 0), m_MemorySize), m_MSMFrameBitmap);
    }
  }

  ASSERT_VALID (pDC);
  ASSERT_VALID (pBar);

  if (rectClip.IsRectEmpty ())
  {
    rectClip = rectClient;
  }

  CRuntimeClass* pBarClass = pBar->GetRuntimeClass ();

  if (pBarClass == NULL || pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMFCPopupMenuBar)))
  {
    pDC->FillRect (rectClip, &m_brMenuLight);

    return;
  }

  BOOL bDefault = true;

  if (pBarClass != NULL &&
    (pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMCaptionBar)) ||
     pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMMenuBar)) ||
     pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMToolBar))
    ))
  {
    if (pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMLinksBar)))
    {
      pDC->FillRect (rectClip, &m_brLinksBarBack);
      return;
    }

    if (!pBar->IsFloating ())
    {
      CRect rt (rectClient);

      CWnd* pWnd = pBar->GetTopLevelFrame ();
      if (pWnd != NULL)
      {
        CRect rtW;
        pBar->GetWindowRect (rtW);
        pWnd->ScreenToClient (rtW);

        rt.OffsetRect (rtW.TopLeft ());
      }

      int nOldStretchBltMode = pDC->SetStretchBltMode (COLORONCOLOR);

      pDC->BitBlt(rectClient.left, rectClient.top,
            rectClient.Width (), rectClient.Height (),
            &m_MemoryDC,
            rt.left, rt.top,
            SRCCOPY);

      pDC->SetStretchBltMode (nOldStretchBltMode);

      bDefault = false;

      if (pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMCategoryBar)))
      {
        CDrawingManager dm (*pDC);

        CRect rect (rectClient);
        rect.top += 3;

        rect.bottom = rect.top + 1;
        dm.HighlightRect (rect, 15, (COLORREF)-1, 0, RGB (255, 255, 255));

        rect.top++;
        rect.bottom++;
        dm.HighlightRect (rect, 40, (COLORREF)-1, 0, RGB (255, 255, 255));

        rect.top++;
        rect.bottom = rectClient.bottom - 1;
        dm.HighlightRect (rect, 30, (COLORREF)-1, 0, RGB (255, 255, 255));

        rect.top = rect.bottom;
        rect.bottom++;
        dm.HighlightRect (rect, 10, (COLORREF)-1, 0, RGB (255, 255, 255));
      }
    }
  }

  if (bDefault)
  {
    CMFCVisualManagerOffice2003::OnFillBarBackground (pDC, pBar, rectClient, rectClip);
  }
}

void CMSMVisualManager::OnFillHighlightedArea | ( | CDC * | pDC,
 |  | CRect | rect,
 |  | CBrush * | pBrush,
 |  | CMFCToolBarButton * | pButton |
 | ) |  |  | [protected, virtual]

Definition at line 579 of file MSMVisualManager.cpp.

{
  if (pButton == NULL)
  {
    CMFCVisualManagerOffice2003::OnFillHighlightedArea (pDC, rect,
                        pBrush, pButton);
    return;
  }

  ASSERT_VALID (pDC);
  ASSERT_VALID (pBrush);

  CMFCToolBarMenuButton* pMenuButton =
    DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);

  BOOL bIsMenuButton = pMenuButton != NULL;

  BOOL bIsPopupMenu = bIsMenuButton &&
    pMenuButton->GetParentWnd () != NULL &&
    pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));

  CBrush* pBr = pBrush;

  bIsMenuButton = bIsMenuButton &&
    pMenuButton->GetParentWnd () != NULL &&
    pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCMenuBar));

  BOOL bDefault = true;

  if (bIsMenuButton || bIsPopupMenu)
  {
    if (!bIsPopupMenu)
    {
      pBr = &m_brMenuBarButtonHighlighted;
    }
  }
  else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMLinksBarButton)))
  {
    pBr = &m_brLinksBarButtonHighlighted;
    rect.InflateRect (0, 0, 1, 1);
  }
  else
  {
    bDefault = false;
  }

  if (bDefault)
  {
    CMFCVisualManagerOfficeXP::OnFillHighlightedArea (pDC, rect, pBr, pButton);
    return;
  }
  else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMCategoryBarButton)))
  {
    if ((pButton->m_nStyle & TBBS_CHECKED) != 0)
    {
      CDrawingManager dm(*pDC);

      dm.FillGradient (rect,
        m_clrCategorieBarButtonL, m_clrCategorieBarButtonF, TRUE);
    }
  }
  else
  {
    if (pMenuButton != NULL &&
      pMenuButton->GetParentWnd () != NULL &&
      pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMSMToolBar)))
    {
      rect.InflateRect (0, 0, 1, 1);

      CDrawingManager dm (*pDC);

      dm.HighlightRect (rect, 10, (COLORREF)-1, 0, RGB (255, 255, 255));
    }
    else // other buttons
    {
      // TODO: paint toolbar buttons
      //CMFCVisualManagerOffice2003::OnFillHighlightedArea (pDC, rect, pBr, pButton);
    }
  }
}

virtual void CMSMVisualManager::OnFillTasksGroupInterior | ( | CDC * | ,
 |  | CRect | ,
 |  | BOOL | = FALSE |
 | ) |  |  | [inline, protected, virtual]

Definition at line 69 of file MSMVisualManager.h.

{}

void CMSMVisualManager::OnFillTasksPaneBackground | ( | CDC * | pDC,
 |  | CRect | rectWorkArea |
 | ) |  |  | [protected, virtual]

Definition at line 1015 of file MSMVisualManager.cpp.

{
  CDrawingManager dm (*pDC);
  dm.FillGradient (rectWorkArea, RGB (203, 228, 252), RGB (226, 242, 254), FALSE);

  CPen penLeft (PS_SOLID, 1, RGB (188, 218, 247));
  CPen* pOldPen = pDC->SelectObject (&penLeft);

  pDC->MoveTo (rectWorkArea.right - 1, rectWorkArea.top);
  pDC->LineTo (rectWorkArea.right - 1, rectWorkArea.bottom);

  pDC->SelectObject (pOldPen);
}

void CMSMVisualManager::OnHighlightMenuItem | ( | CDC * | pDC,
 |  | CMFCToolBarMenuButton * | pButton,
 |  | CRect | rect,
 |  | COLORREF & | clrText |
 | ) |  |  | [protected, virtual]

Definition at line 837 of file MSMVisualManager.cpp.

{
  CMFCToolBarMenuButton* pMenuButton =
    DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);

  BOOL bIsMenuButton = pMenuButton != NULL;

  BOOL bIsPopupMenu = bIsMenuButton &&
    pMenuButton->GetParentWnd () != NULL &&
    pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));

  if (bIsPopupMenu && rect.Width() > pButton->Rect ().Width () / 2)
  {
    rect.right--;
  }

  CMFCVisualManagerOfficeXP::OnHighlightMenuItem (pDC, pButton, rect, clrText);
}

void CMSMVisualManager::OnUpdateSystemColors ( ) [protected, virtual]

Definition at line 220 of file MSMVisualManager.cpp.

{

  CMFCVisualManagerOffice2003::OnUpdateSystemColors();

  m_clrMenuLight            = RGB (210, 232, 253);
  m_brMenuLight.DeleteObject ();
  m_brMenuLight.CreateSolidBrush (m_clrMenuLight);

  m_clrHighlight            = RGB (152, 192, 235);
  m_brHighlight.DeleteObject ();
  m_brHighlight.CreateSolidBrush (m_clrHighlight);

  m_clrHighlightDn          = RGB (152, 192, 235);
  m_brHighlightDn.DeleteObject ();
  m_brHighlightDn.CreateSolidBrush (m_clrHighlightDn);

  m_clrHighlightChecked       = RGB (152, 192, 235);
  m_brHighlightChecked.DeleteObject ();
  m_brHighlightChecked.CreateSolidBrush (m_clrHighlightChecked);

  m_clrMenuItemBorder         = RGB (152, 192, 235);

  m_clrMenuBorder           = RGB (128, 128, 128);
}

void CMSMVisualManager::SetupMemoryBitmapSize | ( | CDC * | pDC,
 |  | const CSize & | size
 | ) |  |

Definition at line 250 of file MSMVisualManager.cpp.

{
  if (pDC == NULL && size == CSize (0, 0))
  {
    return;
  }

  if (m_MemoryDC.GetSafeHdc () != NULL)
  {
    if (pDC && pDC->GetDeviceCaps (BITSPIXEL) != m_MemoryDC.GetDeviceCaps (BITSPIXEL))
    {
      m_MemoryBitmap.DeleteObject ();
      m_MemoryDC.DeleteDC ();
    }
  }

  if (m_MemoryDC.GetSafeHdc () == NULL)
  {
    m_MemoryDC.CreateCompatibleDC (pDC);
  }

  if (m_MemorySize != size || m_MemoryBitmap.GetSafeHandle () == NULL)
  {
    m_MemorySize = size;

    if (m_MemoryBitmap.GetSafeHandle () != NULL)
    {
      m_MemoryBitmap.DeleteObject ();
    }

    m_MemoryBitmap.CreateCompatibleBitmap (pDC, m_MemorySize.cx, m_MemorySize.cy);
    m_MemoryDC.SelectObject (m_MemoryBitmap);

    m_MemoryFilled = false;
  }

  if (m_MSMFrameBitmap.GetSafeHandle () != NULL)
  {
    m_MemoryFilled = _StretchBitmap (&m_MemoryDC, CRect (CPoint (0, 0), m_MemorySize), m_MSMFrameBitmap);
  }
}

Member Data Documentation

CBrush CMSMVisualManager::m_brLinksBarBack [private]

Definition at line 122 of file MSMVisualManager.h.

CBrush CMSMVisualManager::m_brLinksBarButtonHighlighted [private]

Definition at line 123 of file MSMVisualManager.h.

CBrush CMSMVisualManager::m_brMenuBarButtonHighlighted [private]

Definition at line 85 of file MSMVisualManager.h.

CImageList CMSMVisualManager::m_CaptionButtonIconst [private]

Definition at line 79 of file MSMVisualManager.h.

CSize CMSMVisualManager::m_CaptionButtonSize [private]

Definition at line 80 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonBorder [private]

Definition at line 116 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonBorderM [private]

Definition at line 117 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonF [private]

Definition at line 119 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonL [private]

Definition at line 120 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonLine [private]

Definition at line 118 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonTextHighlighted [private]

Definition at line 98 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonTextPressed [private]

Definition at line 97 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrCategorieBarButtonTextRegular [private]

Definition at line 96 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBorder [private]

Definition at line 104 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnHighlightedBorder [private]

Definition at line 111 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnHighlightedF [private]

Definition at line 109 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnHighlightedL [private]

Definition at line 110 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnPressedBorder [private]

Definition at line 114 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnPressedF [private]

Definition at line 112 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnPressedL [private]

Definition at line 113 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnRegularBorder [private]

Definition at line 108 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnRegularF [private]

Definition at line 106 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrComboBoxBtnRegularL [private]

Definition at line 107 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrLinksBarButtonBorderHighlighted [private]

Definition at line 124 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrMenuBarButtonBorderHighlighted [private]

Definition at line 86 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrMenuBarButtonTextHighlighted [private]

Definition at line 90 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrMenuBarButtonTextPressed [private]

Definition at line 89 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrMenuBarButtonTextRegular [private]

Definition at line 88 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrToolBarButtonTextHighlighted [private]

Definition at line 94 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrToolBarButtonTextPressed [private]

Definition at line 93 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrToolBarButtonTextRegular [private]

Definition at line 92 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrToolBarSeparatorF [private]

Definition at line 102 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrToolBarSeparatorM [private]

Definition at line 101 of file MSMVisualManager.h.

COLORREF CMSMVisualManager::m_clrToolBarSeparatorS [private]

Definition at line 100 of file MSMVisualManager.h.

CBitmap CMSMVisualManager::m_MemoryBitmap [private]

Definition at line 76 of file MSMVisualManager.h.

CDC CMSMVisualManager::m_MemoryDC [private]

Definition at line 75 of file MSMVisualManager.h.

BOOL CMSMVisualManager::m_MemoryFilled [private]

Definition at line 77 of file MSMVisualManager.h.

CSize CMSMVisualManager::m_MemorySize [private]

Definition at line 74 of file MSMVisualManager.h.

CBitmap CMSMVisualManager::m_MSMFrameBitmap [private]

Definition at line 82 of file MSMVisualManager.h.

CBitmap CMSMVisualManager::m_MSMViewBitmap [private]

Definition at line 83 of file MSMVisualManager.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSMoneyDemo/MSMVisualManager.h
  • vc2008fp/MSMoneyDemo/MSMVisualManager.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSNDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CMSNDlg Class Reference

#include "MSNDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_DIALOG2 }

Public Member Functions

CMSNDlg ()

Public Attributes

CMFCLinkCtrl | m_btnRL
CMFCLinkCtrl | m_Options

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnButton1 ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | OnInitDialog ()
afx_msg void | OnOptions ()

Protected Attributes

CMFCToolBarImages | m_imgLogo

Detailed Description

Definition at line 16 of file MSNDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file MSNDlg.h.

{ IDD = IDD_DIALOG2 };

Constructor & Destructor Documentation

CMSNDlg::CMSNDlg ( )

Definition at line 26 of file MSNDlg.cpp.

{
}

Member Function Documentation

void CMSNDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 31 of file MSNDlg.cpp.

{
  CMFCDesktopAlertDialog::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_OPTIONS, m_Options);
  DDX_Control(pDX, IDC_BUTTON1, m_btnRL);
}

void CMSNDlg::OnButton1 ( ) [protected]

Definition at line 87 of file MSNDlg.cpp.

{
  ::ShellExecute (NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
}

void CMSNDlg::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 47 of file MSNDlg.cpp.

{
  CMFCDesktopAlertDialog::OnDraw (pDC);

  CRect rectClient;
  GetClientRect (rectClient);

  CSize sizeLogo = m_imgLogo.GetImageSize ();

  CAfxDrawState ds;
  m_imgLogo.PrepareDrawImage (ds);

  m_imgLogo.Draw (pDC,
    rectClient.right - sizeLogo.cx - 5,
    rectClient.bottom - sizeLogo.cy - 5,
    0);

  m_imgLogo.EndDrawImage (ds);
}

BOOL CMSNDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 68 of file MSNDlg.cpp.

{
  CMFCDesktopAlertDialog::OnInitDialog();

  m_Options.m_bAlwaysUnderlineText = FALSE;
  m_Options.m_bDefaultClickProcess = FALSE;

  m_btnRL.m_bMultilineText = TRUE;
  m_btnRL.m_bAlwaysUnderlineText = FALSE;
  m_btnRL.m_bDefaultClickProcess = TRUE;

  m_imgLogo.Load (IDB_LOGO);
  m_imgLogo.SetTransparentColor (RGB (236, 0, 140));
  m_imgLogo.SetSingleImage ();

  return TRUE;  // return TRUE unless you set the focus to a control
                // EXCEPTION: OCX Property Pages should return FALSE
}

void CMSNDlg::OnOptions ( ) [protected]

Definition at line 92 of file MSNDlg.cpp.

{
  // TODO: Add your control notification handler code here

}

Member Data Documentation

CMFCLinkCtrl CMSNDlg::m_btnRL

Definition at line 27 of file MSNDlg.h.

CMFCToolBarImages CMSNDlg::m_imgLogo [protected]

Definition at line 44 of file MSNDlg.h.

CMFCLinkCtrl CMSNDlg::m_Options

Definition at line 26 of file MSNDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DesktopAlertDemo/MSNDlg.h
  • vc2008fp/DesktopAlertDemo/MSNDlg.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSNVisualManager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMSNVisualManager Class Reference

#include "MSNVisualManager.h"

List of all members.

Public Member Functions

CMSNVisualManager ()
virtual | ~CMSNVisualManager ()
virtual void | OnDrawPopupWindowBorder (CDC *pDC, CRect rect)
virtual COLORREF | OnDrawPopupWindowCaption (CDC *pDC, CRect rectCaption, CMFCDesktopAlertWnd *pPopupWnd)
virtual void | OnFillPopupWindowBackground (CDC *pDC, CRect rect)

Detailed Description

Definition at line 13 of file MSNVisualManager.h.

Constructor & Destructor Documentation

CMSNVisualManager::CMSNVisualManager ( )

Definition at line 30 of file MSNVisualManager.cpp.

{
}

CMSNVisualManager::~CMSNVisualManager ( ) [virtual]

Definition at line 34 of file MSNVisualManager.cpp.

{
}

Member Function Documentation

void CMSNVisualManager::OnDrawPopupWindowBorder | ( | CDC * | pDC,
 |  | CRect | rect |
 | ) |  |  | [virtual]

Definition at line 76 of file MSNVisualManager.cpp.

{
  if (afxGlobalData.IsHighContrastMode () || afxGlobalData.m_nBitsPerPixel <= 8)
  {
    CMFCVisualManagerWindows::OnDrawPopupWindowBorder (pDC, rect);
    return;
  }

  ASSERT_VALID (pDC);

  pDC->Draw3dRect (rect, RGB (166, 180, 207), RGB (68, 87, 145));
  rect.DeflateRect (1, 1);
  pDC->Draw3dRect (rect, RGB (255, 255, 255), RGB (209, 221, 245));
}

COLORREF CMSNVisualManager::OnDrawPopupWindowCaption | ( | CDC * | pDC,
 |  | CRect | rectCaption,
 |  | CMFCDesktopAlertWnd * | pPopupWnd |
 | ) |  |  | [virtual]

Definition at line 91 of file MSNVisualManager.cpp.

{
  if (afxGlobalData.IsHighContrastMode () || afxGlobalData.m_nBitsPerPixel <= 8)
  {
    return CMFCVisualManagerWindows::OnDrawPopupWindowCaption (pDC, rectCaption, pPopupWnd);
  }

  ASSERT_VALID (pDC);

  CDrawingManager dm (*pDC);

  CRect rectFill = rectCaption;
  rectFill.bottom = rectFill.CenterPoint ().y;

  dm.FillGradient (rectFill, clrFillLight, clrFillDark, TRUE);

  rectFill = rectCaption;
  rectFill.top = rectFill.CenterPoint ().y;

  dm.FillGradient (rectFill, clrFillDark, clrFillLight, TRUE);

  return RGB (37, 50, 118);
}

void CMSNVisualManager::OnFillPopupWindowBackground | ( | CDC * | pDC,
 |  | CRect | rect |
 | ) |  |  | [virtual]

Definition at line 38 of file MSNVisualManager.cpp.

{
  if (afxGlobalData.IsHighContrastMode () || afxGlobalData.m_nBitsPerPixel <= 8)
  {
    CMFCVisualManagerWindows::OnFillPopupWindowBackground (pDC, rect);
    return;
  }

  ASSERT_VALID (pDC);

  CDrawingManager dm (*pDC);

  int nStep = 0;
  int nPartHeight = 30;

  for (int y = rect.top; y < rect.bottom; y += nPartHeight)
  {
    CRect rectFill = rect;

    rectFill.top = y;
    rectFill.bottom = y + nPartHeight;

    if ((nStep % 2) != 0)
    {
      dm.FillGradient (rectFill, clrFillDark, clrFillLight, TRUE);
    }
    else
    {
      dm.FillGradient (rectFill, clrFillLight, clrFillDark, TRUE);
    }

    nStep++;
  }

  rect.DeflateRect (1, 1);
  pDC->Draw3dRect (rect, RGB (116, 141, 181), RGB (185, 200, 241));
}

The documentation for this class was generated from the following files:
  • vc2008fp/DesktopAlertDemo/MSNVisualManager.h
  • vc2008fp/DesktopAlertDemo/MSNVisualManager.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSOffice2007DemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMSOffice2007DemoApp Class Reference

#include "MSOffice2007Demo.h"

List of all members.

Public Member Functions

CMSOffice2007DemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
afx_msg void | OnFileNew ()
afx_msg void | OnFileOpen ()
afx_msg BOOL | OnOpenRecentFile (UINT nID)

Public Attributes

BOOL | m_bIsRTL
BOOL | m_bShowDevTab
BOOL | m_bShowFloaty
BOOL | m_bShowKeyTips
BOOL | m_bShowToolTipDescr
BOOL | m_bShowToolTips
UINT m_nAppLook

Detailed Description

Definition at line 25 of file MSOffice2007Demo.h.

Constructor & Destructor Documentation

CMSOffice2007DemoApp::CMSOffice2007DemoApp ( )

Definition at line 44 of file MSOffice2007Demo.cpp.

{
  m_bShowFloaty = TRUE;
  m_bShowDevTab = FALSE;
  m_nAppLook = ID_VIEW_APPLOOK_2007_1;
  m_bShowToolTips = TRUE;
  m_bShowKeyTips = TRUE;
  m_bShowToolTipDescr = TRUE;

  // support Restart Manager
  m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;
}

Member Function Documentation

int CMSOffice2007DemoApp::ExitInstance ( ) [virtual]

Definition at line 220 of file MSOffice2007Demo.cpp.

{
  // Save options:
  WriteInt(_T("ShowFloaty"), m_bShowFloaty);
  WriteInt(_T("ShowDevTab"), m_bShowDevTab);
  WriteInt(_T("ApplicationLook"), m_nAppLook);
  WriteInt(_T("ShowToolTips"), m_bShowToolTips);
  WriteInt(_T("ShowKeyTips"), m_bShowKeyTips);
  WriteInt(_T("bShowToolTipDescr"), m_bShowToolTipDescr);
  WriteInt(_T("IsRTL"), m_bIsRTL);

  return CWinAppEx::ExitInstance();
}

BOOL CMSOffice2007DemoApp::InitInstance ( ) [virtual]

Definition at line 65 of file MSOffice2007Demo.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();
  CWinApp::InitInstance();

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options(including MRU)

  SetRegistryBase(_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();
  InitTooltipManager();

  // Load options:
  m_bShowFloaty = GetInt(_T("ShowFloaty"), TRUE);
  m_bShowDevTab = GetInt(_T("ShowDevTab"), FALSE);
  m_nAppLook = GetInt(_T("ApplicationLook"), ID_VIEW_APPLOOK_2007_1);
  m_bShowToolTips = GetInt(_T("ShowToolTips"), TRUE);
  m_bShowKeyTips = GetInt(_T("ShowKeyTips"), TRUE);
  m_bShowToolTipDescr = GetInt(_T("bShowToolTipDescr"), TRUE);
  m_bIsRTL = GetInt(_T("IsRTL"), FALSE);

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  theApp.GetTooltipManager()->SetTooltipParams(0xFFFF, RUNTIME_CLASS(CRibbonTooltipCtrl), &params);

  // 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(CMSOffice2007DemoDoc), RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CMSOffice2007DemoView));
  pDocTemplate->SetContainerInfo(IDR_CNTR_INPLACE);
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  GetContextMenuManager()->AddMenu(_T("Context menu"), IDR_CONTEXT_MENU);

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);

  CRect rect;
  m_pMainWnd->GetWindowRect(rect);

  m_pMainWnd->SetWindowPos(NULL, -1, -1, rect.Width(), rect.Height(), SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CMSOffice2007DemoApp::OnAppAbout ( )

Definition at line 184 of file MSOffice2007Demo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CMSOffice2007DemoApp::OnFileNew ( )

Definition at line 190 of file MSOffice2007Demo.cpp.

{
  if (m_pMainWnd && ((CMainFrame *)m_pMainWnd)->IsPrintPreview())
  {
    m_pMainWnd->SendMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
  }
  CWinAppEx::OnFileNew();
}

void CMSOffice2007DemoApp::OnFileOpen ( )

Definition at line 199 of file MSOffice2007Demo.cpp.

{
  if (m_pMainWnd && ((CMainFrame *)m_pMainWnd)->IsPrintPreview())
  {
    m_pMainWnd->SendMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
  }
  CWinAppEx::OnFileOpen();
}

BOOL CMSOffice2007DemoApp::OnOpenRecentFile ( UINT nID )

Definition at line 208 of file MSOffice2007Demo.cpp.

{
  if (m_pMainWnd && ((CMainFrame *)m_pMainWnd)->IsPrintPreview())
  {
    m_pMainWnd->SendMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
  }
  return CWinAppEx::OnOpenRecentFile(nID);
}

Member Data Documentation

BOOL CMSOffice2007DemoApp::m_bIsRTL

Definition at line 36 of file MSOffice2007Demo.h.

BOOL CMSOffice2007DemoApp::m_bShowDevTab

Definition at line 32 of file MSOffice2007Demo.h.

BOOL CMSOffice2007DemoApp::m_bShowFloaty

Definition at line 30 of file MSOffice2007Demo.h.

BOOL CMSOffice2007DemoApp::m_bShowKeyTips

Definition at line 35 of file MSOffice2007Demo.h.

BOOL CMSOffice2007DemoApp::m_bShowToolTipDescr

Definition at line 34 of file MSOffice2007Demo.h.

BOOL CMSOffice2007DemoApp::m_bShowToolTips

Definition at line 33 of file MSOffice2007Demo.h.

UINT CMSOffice2007DemoApp::m_nAppLook

Definition at line 31 of file MSOffice2007Demo.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/MSOffice2007Demo.h
  • vc2008fp/MSOffice2007Demo/MSOffice2007Demo.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSOffice2007DemoCntrItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CMSOffice2007DemoCntrItem Class Reference

#include "CntrItem.h"

List of all members.

Public Member Functions

CMSOffice2007DemoCntrItem (REOBJECT *preo=NULL, CMSOffice2007DemoDoc *pContainer=NULL)
~CMSOffice2007DemoCntrItem ()
CMSOffice2007DemoView * GetActiveView ()
CMSOffice2007DemoDoc * GetDocument ()

Public Attributes

UINT m_uiCategoryID

Protected Member Functions

virtual BOOL OnShowPanes (CFrameWnd *pFrameWnd, BOOL bShow)

Detailed Description

Definition at line 17 of file CntrItem.h.

Constructor & Destructor Documentation

CMSOffice2007DemoCntrItem::CMSOffice2007DemoCntrItem | ( | REOBJECT * | preo = NULL,
 |  | CMSOffice2007DemoDoc * | pContainer = NULL
 | ) |  |

Definition at line 30 of file CntrItem.cpp.

                                                                                :
  CRichEditCntrItem(preo, pContainer)
{
  m_uiCategoryID = 0;
}

CMSOffice2007DemoCntrItem::~CMSOffice2007DemoCntrItem ( )

Definition at line 36 of file CntrItem.cpp.

{
  // TODO: add cleanup code here
}

Member Function Documentation

CMSOffice2007DemoView* CMSOffice2007DemoCntrItem::GetActiveView ( ) [inline]

Definition at line 32 of file CntrItem.h.

{ return(CMSOffice2007DemoView*)CRichEditCntrItem::GetActiveView(); }

CMSOffice2007DemoDoc* CMSOffice2007DemoCntrItem::GetDocument ( ) [inline]

Definition at line 31 of file CntrItem.h.

{ return(CMSOffice2007DemoDoc*)CRichEditCntrItem::GetDocument(); }

BOOL CMSOffice2007DemoCntrItem::OnShowPanes | ( | CFrameWnd * | pFrameWnd,
 |  | BOOL | bShow |
 | ) |  |  | [protected, virtual]

Definition at line 41 of file CntrItem.cpp.

{
  CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, pFrameWnd);
  if (pMainFrame != NULL)
  {
    return pMainFrame->OnShowPanes(bShow);
  }
  else // Maybe, SDI frame...
  {
    CFrameWndEx* pFrame = DYNAMIC_DOWNCAST(CFrameWndEx, pFrameWnd);
    if (pFrame != NULL)
    {
      return pFrame->OnShowPanes(bShow);
    }
  }

  return FALSE;
}

Member Data Documentation

UINT CMSOffice2007DemoCntrItem::m_uiCategoryID

Definition at line 45 of file CntrItem.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/CntrItem.h
  • vc2008fp/MSOffice2007Demo/CntrItem.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSOffice2007DemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CMSOffice2007DemoDoc Class Reference

#include "MSOffice2007DemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CMSOffice2007DemoDoc ()
virtual CRichEditCntrItem * | CreateClientItem (REOBJECT *preo) const
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)
virtual void | SetPathName (LPCTSTR lpszPathName, BOOL bAddToMRU=TRUE)

Protected Member Functions

CMSOffice2007DemoDoc ()
afx_msg void | OnClose ()

Detailed Description

Definition at line 14 of file MSOffice2007DemoDoc.h.

Constructor & Destructor Documentation

CMSOffice2007DemoDoc::CMSOffice2007DemoDoc ( ) [protected]

Definition at line 43 of file MSOffice2007DemoDoc.cpp.

{
}

CMSOffice2007DemoDoc::~CMSOffice2007DemoDoc ( ) [virtual]

Definition at line 47 of file MSOffice2007DemoDoc.cpp.

{
}

Member Function Documentation

CRichEditCntrItem * CMSOffice2007DemoDoc::CreateClientItem ( REOBJECT * preo ) const [virtual]

Definition at line 64 of file MSOffice2007DemoDoc.cpp.

{
  // cast away constness of this
  return new CMSOffice2007DemoCntrItem(preo, (CMSOffice2007DemoDoc*) this);
}

void CMSOffice2007DemoDoc::OnClose ( ) [protected]

Definition at line 105 of file MSOffice2007DemoDoc.cpp.

{
}

BOOL CMSOffice2007DemoDoc::OnNewDocument ( ) [virtual]

Definition at line 51 of file MSOffice2007DemoDoc.cpp.

{
  if (!CRichEditDoc::OnNewDocument())
    return FALSE;

  return TRUE;
}

void CMSOffice2007DemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 73 of file MSOffice2007DemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }

  // Calling the base class CRichEditDoc enables serialization
  //  of the container document's COleClientItem objects.
  // TODO: set CRichEditDoc::m_bRTF = FALSE if you are serializing as text
  CRichEditDoc::Serialize(ar);
}

void CMSOffice2007DemoDoc::SetPathName | ( | LPCTSTR | lpszPathName,
 |  | BOOL | bAddToMRU = TRUE |
 | ) |  |  | [virtual]

Definition at line 59 of file MSOffice2007DemoDoc.cpp.

{
  CRichEditDoc::SetPathName(lpszPathName, bAddToMRU);
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.h
  • vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMSOffice2007DemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes

CMSOffice2007DemoView Class Reference

#include "MSOffice2007DemoView.h"

List of all members.

Public Member Functions

virtual | ~CMSOffice2007DemoView ()
CMSOffice2007DemoDoc * GetDocument ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Static Public Attributes

static BOOL | m_bForceReloadBmps = FALSE

Protected Member Functions

CMSOffice2007DemoView ()
void | GetDefaultFont (CCharFormat &cf)
void | InitFloaty (CMFCRibbonMiniToolBar *pFloaty)
BOOL | InsertBitmap (UINT uiBmpResID)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnCharStrikeThrough ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnDestroy ()
afx_msg void | OnEditChange ()
afx_msg void | OnEditUndo ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnFontColor ()
afx_msg void | OnFontDialog ()
afx_msg void | OnFontname ()
afx_msg void | OnFontsize ()
afx_msg void | OnIndentLeft ()
afx_msg void | OnIndentRight ()
virtual void | OnInitialUpdate ()
afx_msg void | OnInsertBulletFromPalette ()
afx_msg void | OnInsertChart ()
afx_msg void | OnInsertMultilevelFromPalette ()
afx_msg void | OnInsertNumberFromPalette ()
afx_msg void | OnInsertPicture ()
afx_msg void | OnInsertShape ()
afx_msg void | OnInsertTable ()
afx_msg void | OnInsertTableGallery ()
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnPagelayoutIndentLeft ()
afx_msg void | OnPagelayoutIndentRight ()
afx_msg void | OnPageLayoutTheme ()
afx_msg void | OnPagesetupDialog ()
afx_msg void | OnParagraphDialog ()
virtual void | OnPrepareDC (CDC *pDC, CPrintInfo *pInfo)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnQuickStyle ()
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnSelChange (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnSpaceAfter ()
afx_msg void | OnSpaceBefore ()
afx_msg void | OnStyleDialog ()
afx_msg void | OnUpdateCharStrikeThrough (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditFind (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditReplace (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePrintLayout (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewDocMap (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewGridLines (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewProps (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewRuler (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewThumb (CCmdUI *pCmdUI)
afx_msg void | OnViewDocMap ()
afx_msg void | OnViewGridLines ()
afx_msg void | OnViewProps ()
afx_msg void | OnViewRuler ()
BOOL | ShowContextMenu (CPoint pt)
virtual void | SyncFont ()

Protected Attributes

BOOL | m_bIsEndOfPrint
BOOL | m_bViewDocMap
BOOL | m_bViewGridLines
BOOL | m_bViewProps
BOOL | m_bViewRuler
BOOL | m_bViewThumb
CPoint | m_ptMouseDown

Detailed Description

Definition at line 17 of file MSOffice2007DemoView.h.

Constructor & Destructor Documentation

CMSOffice2007DemoView::CMSOffice2007DemoView ( ) [protected]

Definition at line 167 of file MSOffice2007DemoView.cpp.

{
  m_bIsEndOfPrint = FALSE;
  m_bViewRuler = TRUE;
  m_bViewGridLines = TRUE;
  m_bViewProps = FALSE;
  m_bViewDocMap = FALSE;
  m_bViewThumb = FALSE;

  m_ptMouseDown = CPoint(-1, -1);
}

CMSOffice2007DemoView::~CMSOffice2007DemoView ( ) [virtual]

Definition at line 179 of file MSOffice2007DemoView.cpp.

{
}

Member Function Documentation

void CMSOffice2007DemoView::GetDefaultFont ( CCharFormat & cf ) [protected]

Definition at line 654 of file MSOffice2007DemoView.cpp.

{
  USES_CONVERSION;

  CString strDefFont = _T("Tahoma");

  ASSERT(cf.cbSize == sizeof(WPD_CHARFORMAT));
  cf.dwMask = CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT|CFM_SIZE| CFM_COLOR|CFM_OFFSET|CFM_PROTECTED;
  cf.dwEffects = CFE_AUTOCOLOR;
  cf.yHeight = 200; //10pt
  cf.yOffset = 0;
  cf.crTextColor = RGB(0, 0, 0);
  cf.bCharSet = 0;
  cf.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
  ASSERT(strDefFont.GetLength() < LF_FACESIZE);
#if _MSC_VER >= 1300
  lstrcpyn(cf.szFaceName, strDefFont, LF_FACESIZE);
#else
  lstrcpynA(cf.szFaceName, T2A((LPTSTR)(LPCTSTR) strDefFont), LF_FACESIZE);
#endif
  cf.dwMask |= CFM_FACE;
}

CMSOffice2007DemoDoc * CMSOffice2007DemoView::GetDocument ( ) [inline]

Definition at line 117 of file MSOffice2007DemoView.h.

{ return(CMSOffice2007DemoDoc*)m_pDocument; }

void CMSOffice2007DemoView::InitFloaty ( CMFCRibbonMiniToolBar * pFloaty ) [protected]

Definition at line 746 of file MSOffice2007DemoView.cpp.

{
  ASSERT_VALID(pFloaty);

  CList<UINT, UINT> lstCmds;

  lstCmds.AddTail(ID_FONT_FONT);
  lstCmds.AddTail(ID_FONT_FONTSIZE);
  lstCmds.AddTail(ID_FONT_GROWFONT);
  lstCmds.AddTail(ID_FONT_SHRINK);
  lstCmds.AddTail(ID_WRITE_CHANGESTYLES);
  lstCmds.AddTail(ID_EDIT_COPYFORMAT);
  lstCmds.AddTail(ID_FONT_BOLD);
  lstCmds.AddTail(ID_FONT_ITALIC);
  lstCmds.AddTail(ID_PARA_CENTER);
  lstCmds.AddTail(ID_FONT_TEXTHIGHLIGHT);
  lstCmds.AddTail(ID_FONT_COLOR);
  lstCmds.AddTail(ID_PARA_DECREASEINDENT);
  lstCmds.AddTail(ID_PARA_INCREASEINDENT);
  lstCmds.AddTail(ID_PARA_BULLETS);

  pFloaty->SetCommands(((CMainFrame*) GetTopLevelFrame())->GetRibbonBar(), lstCmds);
}

BOOL CMSOffice2007DemoView::InsertBitmap ( UINT uiBmpResID ) [protected]

Definition at line 503 of file MSOffice2007DemoView.cpp.

{
  CWaitCursor wait;

  CBitmap bmp;
  if (!bmp.LoadBitmap(uiBmpResID))
  {
    return FALSE;
  }

  std::auto_ptr<COleDataSource> apDataSrc(new COleDataSource);
  std::auto_ptr<COleDataObject> apData(new COleDataObject);

  TRY
  {
    STGMEDIUM stgm;
    stgm.hGlobal = bmp.GetSafeHandle();
    stgm.tymed = TYMED_GDI;
    stgm.pUnkForRelease = NULL;

    apDataSrc->CacheData(CF_BITMAP, &stgm);

    LPDATAOBJECT lpdata;

    if (FAILED(apDataSrc->m_xDataObject.QueryInterface(IID_IDataObject,
      (LPVOID FAR*) &lpdata)))
    {
      AfxThrowUserException();
    }

    apData->Attach(lpdata);
    lpdata->Release();

    CMSOffice2007DemoDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);

    std::auto_ptr<CMSOffice2007DemoCntrItem> apItem(new CMSOffice2007DemoCntrItem(NULL, pDoc));
    ASSERT_VALID(apItem.get());

    if (!apItem->CreateStaticFromData(apData.release()))
    {
      AfxThrowUserException();
    }

    apItem->m_uiCategoryID = uiBmpResID;
    InsertItem(apItem.release());

    pDoc->UpdateAllViews(this);
  }
  CATCH(CException, e)
  {
    return FALSE;
  }
  END_CATCH

  CMainFrame* pMainFrame = ((CMainFrame*) GetTopLevelFrame());
  ASSERT_VALID(pMainFrame);

  pMainFrame->ActivateRibbonContextCategory(uiBmpResID);

  return TRUE;
}

void CMSOffice2007DemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 465 of file MSOffice2007DemoView.cpp.

{
  m_bIsEndOfPrint = FALSE;

  CRichEditView::OnBeginPrinting(pDC, pInfo);
}

void CMSOffice2007DemoView::OnCharStrikeThrough ( ) [protected]

Definition at line 770 of file MSOffice2007DemoView.cpp.

{
  OnCharEffect(CFM_STRIKEOUT, CFE_STRIKEOUT);
}

void CMSOffice2007DemoView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 458 of file MSOffice2007DemoView.cpp.

{
  if (!ShowContextMenu(point))
  {
    Default();
  }
}

void CMSOffice2007DemoView::OnDestroy ( void ) [protected]

Definition at line 227 of file MSOffice2007DemoView.cpp.

{
  // Deactivate the item on destruction; this is important
  // when a splitter view is being used.
  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
  if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
  {
    pActiveItem->Deactivate();
    ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
  }

  CRichEditView::OnDestroy();
}

void CMSOffice2007DemoView::OnEditChange ( ) [protected]

Definition at line 265 of file MSOffice2007DemoView.cpp.

{
}

void CMSOffice2007DemoView::OnEditUndo ( ) [protected]

Definition at line 780 of file MSOffice2007DemoView.cpp.

{
  CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
  ASSERT_VALID(pRibbon);

  CMFCRibbonUndoButton* pUndoBtn = DYNAMIC_DOWNCAST(CMFCRibbonUndoButton, pRibbon->FindByID(ID_EDIT_UNDO));

  if (pUndoBtn != NULL && pUndoBtn->GetActionNumber() > 0)
  {
    CString str;
    str.Format(_T("Demo: undo %d action(s)"), pUndoBtn->GetActionNumber());

    MessageBox(str);
    return;
  }

  CRichEditView::OnEditUndo();
}

void CMSOffice2007DemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 472 of file MSOffice2007DemoView.cpp.

{
  m_bIsEndOfPrint = TRUE;

  CRichEditView::OnEndPrinting(pDC, pInfo);
}

void CMSOffice2007DemoView::OnFilePrintPreview ( ) [protected]

Definition at line 205 of file MSOffice2007DemoView.cpp.

{
  AFXPrintPreview(this);
}

void CMSOffice2007DemoView::OnFontColor ( ) [protected]

Definition at line 269 of file MSOffice2007DemoView.cpp.

{
  CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
  ASSERT_VALID(pRibbon);

  CMFCRibbonColorButton* pFontColorBtn = DYNAMIC_DOWNCAST(CMFCRibbonColorButton, pRibbon->FindByID(ID_FONT_COLOR));

  if (pFontColorBtn != NULL)
  {
    COLORREF color = pFontColorBtn->GetColor();
    CRichEditView::OnColorPick(color == -1 ? ::GetSysColor(COLOR_WINDOWTEXT) : color);
  }
}

void CMSOffice2007DemoView::OnFontDialog ( ) [protected]

Definition at line 395 of file MSOffice2007DemoView.cpp.

{
  CRichEditView::OnFormatFont();

  SyncFont();
}

void CMSOffice2007DemoView::OnFontname ( ) [protected]

Definition at line 283 of file MSOffice2007DemoView.cpp.

{
  USES_CONVERSION;

  CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
  ASSERT_VALID(pRibbon);

  CMFCRibbonFontComboBox* pFontCombo = DYNAMIC_DOWNCAST(CMFCRibbonFontComboBox, pRibbon->FindByID(ID_FONT_FONT));
  if (pFontCombo == NULL)
  {
    return;
  }

  CString strWarning;
  CString strFontName = pFontCombo->GetEditText();
  if (pFontCombo->FindItem(strFontName) == -1)
  {
    // Restore current name:
    pFontCombo->SetEditText (GetCharFormatSelection ().szFaceName);
    strWarning.Format(CString((LPCTSTR)ID_FONT_NOT_FOUND), strFontName);
    AfxMessageBox(strWarning, MB_OK | MB_ICONWARNING);
    return;
  }

  CCharFormat cf;
  cf.szFaceName[0] = NULL;
  cf.dwMask = CFM_FACE | CFM_CHARSET;

  const CMFCFontInfo* pDesc = pFontCombo->GetFontDesc();
  ASSERT_VALID(pDesc);
  ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);

#if _MSC_VER >= 1300
  lstrcpyn(cf.szFaceName, pDesc->m_strName, LF_FACESIZE);
#else
  lstrcpynA(cf.szFaceName, T2A((LPTSTR)(LPCTSTR) pDesc->m_strName), LF_FACESIZE);
#endif

  cf.bCharSet = pDesc->m_nCharSet;
  cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;

  SetCharFormat(cf);
}

void CMSOffice2007DemoView::OnFontsize ( ) [protected]

Definition at line 327 of file MSOffice2007DemoView.cpp.

{
  CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
  ASSERT_VALID(pRibbon);

  CMFCRibbonComboBox* pSizeCombo = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_FONT_FONTSIZE));
  if (pSizeCombo == NULL)
  {
    return;
  }

  int nSize = GetTwipSize(pSizeCombo->GetEditText());

  if (nSize == -2 || (nSize >= 0 && nSize < 20) || nSize > 32760)
  {
    // Restore current size:
    pSizeCombo->SetEditText (TwipsToPointString (GetCharFormatSelection ().yHeight));

    MessageBox (_T("The number must be between 1 and 1638."));
    return;
  }

  if (nSize > 0)
  {
    CCharFormat cf;
    cf.dwMask = CFM_SIZE;
    cf.yHeight = nSize;

    SetCharFormat(cf);
  }
}

void CMSOffice2007DemoView::OnIndentLeft ( ) [protected]

Definition at line 597 of file MSOffice2007DemoView.cpp.

{
}

void CMSOffice2007DemoView::OnIndentRight ( ) [protected]

Definition at line 601 of file MSOffice2007DemoView.cpp.

{
}

void CMSOffice2007DemoView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 188 of file MSOffice2007DemoView.cpp.

{
  CRichEditView::OnInitialUpdate();

  // Set the printing margins(720 twips = 1/2 inch).
  SetMargins(CRect(720, 720, 720, 720));

  CCharFormat cf;
  GetDefaultFont(cf);

  SetCharFormat(cf);
  SyncFont();
}

void CMSOffice2007DemoView::OnInsertBulletFromPalette ( ) [protected]

Definition at line 722 of file MSOffice2007DemoView.cpp.

{
  CString str;
  str.Format(_T("Insert Bullet from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_FROM_PALETTE_BULLET));

  MessageBox(str);
}

void CMSOffice2007DemoView::OnInsertChart ( ) [protected]

Definition at line 487 of file MSOffice2007DemoView.cpp.

{
  WPD_CHARFORMAT cf = GetCharFormatSelection();
  InsertBitmap(IDB_CHART);
  SetCharFormat (cf);
  SyncFont ();
}

void CMSOffice2007DemoView::OnInsertMultilevelFromPalette ( ) [protected]

Definition at line 738 of file MSOffice2007DemoView.cpp.

{
  CString str;
  str.Format(_T("Insert Multilevel List from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_FROM_PALETTE_MULTILEVEL));

  MessageBox(str);
}

void CMSOffice2007DemoView::OnInsertNumberFromPalette ( ) [protected]

Definition at line 730 of file MSOffice2007DemoView.cpp.

{
  CString str;
  str.Format(_T("Insert Number from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_FROM_PALETTE_NUMBER));

  MessageBox(str);
}

void CMSOffice2007DemoView::OnInsertPicture ( ) [protected]

Definition at line 479 of file MSOffice2007DemoView.cpp.

{
  WPD_CHARFORMAT cf = GetCharFormatSelection();
  InsertBitmap(IDB_PICTURE);
  SetCharFormat (cf);
  SyncFont ();
}

void CMSOffice2007DemoView::OnInsertShape ( ) [protected]

Definition at line 815 of file MSOffice2007DemoView.cpp.

{
  CString str;
  str.Format(_T("Insert Shape from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_INSERT_SHAPES));

  MessageBox(str);
}

void CMSOffice2007DemoView::OnInsertTable ( ) [protected]

Definition at line 495 of file MSOffice2007DemoView.cpp.

{
  WPD_CHARFORMAT cf = GetCharFormatSelection();
  InsertBitmap(IDB_TABLE);
  SetCharFormat (cf);
  SyncFont ();
}

void CMSOffice2007DemoView::OnInsertTableGallery ( ) [protected]

Definition at line 799 of file MSOffice2007DemoView.cpp.

{
  if (CRibbonTableButton::GetRows() > 0 && CRibbonTableButton::GetColumns() > 0)
  {
    CString str;
    str.Format(_T("Demo: insert %dx%d table"), CRibbonTableButton::GetColumns(), CRibbonTableButton::GetRows());

    MessageBox(str);

    WPD_CHARFORMAT cf = GetCharFormatSelection();
    InsertBitmap(IDB_TABLE);
    SetCharFormat (cf);
    SyncFont ();
  }
}

void CMSOffice2007DemoView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 359 of file MSOffice2007DemoView.cpp.

{
  m_ptMouseDown = point;

  CRichEditView::OnLButtonUp(nFlags, point);
}

void CMSOffice2007DemoView::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 366 of file MSOffice2007DemoView.cpp.

{
  CRichEditView::OnLButtonUp(nFlags, point);

  if (m_ptMouseDown == CPoint (-1, -1))
  {
    return;
  }

  m_ptMouseDown = CPoint (-1, -1);

  if (GetSelectedItem() != NULL || CMFCPopupMenu::GetActiveMenu() != NULL || GetRichEditCtrl().GetSelText().IsEmpty())
  {
    return;
  }

  if (!theApp.m_bShowFloaty)
  {
    return;
  }

  CMFCRibbonMiniToolBar* pFloaty = new CMFCRibbonMiniToolBar;

  InitFloaty(pFloaty);

  ClientToScreen(&point);
  pFloaty->Show(point.x, point.y);
}

void CMSOffice2007DemoView::OnPagelayoutIndentLeft ( ) [protected]

Definition at line 841 of file MSOffice2007DemoView.cpp.

{
  CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
  ASSERT_VALID(pRibbon);

  CMFCRibbonEdit* pEdit = DYNAMIC_DOWNCAST(CMFCRibbonEdit, pRibbon->FindByID(ID_PAGELAYOUT_INDENT_LEFT));

  WPD_PARAFORMAT pf;
  pf.cbSize = sizeof(PARAFORMAT);
  pf.dwMask = PFM_STARTINDENT;
  pf.dxStartIndent = _ttol(pEdit->GetEditText()) * 10;

  SetParaFormat(pf);
}

void CMSOffice2007DemoView::OnPagelayoutIndentRight ( ) [protected]

Definition at line 856 of file MSOffice2007DemoView.cpp.

{
  CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
  ASSERT_VALID(pRibbon);

  CMFCRibbonEdit* pEdit = DYNAMIC_DOWNCAST(CMFCRibbonEdit, pRibbon->FindByID(ID_PAGELAYOUT_INDENT_RIGHT));

  WPD_PARAFORMAT pf;
  pf.cbSize = sizeof(PARAFORMAT);
  pf.dwMask = PFM_RIGHTINDENT;
  pf.dxRightIndent = _ttol(pEdit->GetEditText()) * 10;

  SetParaFormat(pf);
}

void CMSOffice2007DemoView::OnPageLayoutTheme ( ) [protected]

Definition at line 871 of file MSOffice2007DemoView.cpp.

{
  CString str;
  str.Format(_T("Change Theme: %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_PAGELAYOUT_THEMES));

  MessageBox(str);
}

void CMSOffice2007DemoView::OnPagesetupDialog ( ) [protected]

Definition at line 412 of file MSOffice2007DemoView.cpp.

{
  AfxMessageBox(_T("Show your page setup dialog here."));
}

void CMSOffice2007DemoView::OnParagraphDialog ( ) [protected]

Definition at line 402 of file MSOffice2007DemoView.cpp.

{
  AfxMessageBox(_T("Show your Paragraph dialog here."));
}

void CMSOffice2007DemoView::OnPrepareDC | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 216 of file MSOffice2007DemoView.cpp.

{
  if (m_bIsEndOfPrint)
  {
    pInfo->m_bContinuePrinting = FALSE;
    return;
  }

  CRichEditView::OnPrepareDC(pDC, pInfo);
}

BOOL CMSOffice2007DemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 210 of file MSOffice2007DemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CMSOffice2007DemoView::OnQuickStyle ( ) [protected]

Definition at line 823 of file MSOffice2007DemoView.cpp.

{
  CString str;
  str.Format(_T("Change Style %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_WRITE_QUICKSTYLES));

  MessageBox(str);
}

void CMSOffice2007DemoView::OnRButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 439 of file MSOffice2007DemoView.cpp.

{
  long nStartChar, nEndChar;
  GetRichEditCtrl().GetSel(nStartChar, nEndChar);
  if (nEndChar - nStartChar <= 1)
  {
    SendMessage(WM_LBUTTONDOWN, nFlags, MAKELPARAM(point.x, point.y));
    ReleaseCapture ();
  }

  CPoint ptScreen = point;
  ClientToScreen(&ptScreen);

  if (!ShowContextMenu(ptScreen))
  {
    Default();
  }
}

void CMSOffice2007DemoView::OnSelChange | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 566 of file MSOffice2007DemoView.cpp.

{
  CRichEditView::OnSelChange(pNMHDR, pResult);

  if (GetFocus ()->GetSafeHwnd () != GetSafeHwnd())
  {
    return;
  }

  CMainFrame* pMainFrame = ((CMainFrame*) GetTopLevelFrame());
  ASSERT_VALID(pMainFrame);

  UINT uiCategoryID = 0;

  CMSOffice2007DemoCntrItem* pItem = (CMSOffice2007DemoCntrItem*) GetSelectedItem();

  if (pItem != NULL)
  {
    uiCategoryID = pItem->m_uiCategoryID;
  }

  pMainFrame->SetRibbonContextCategory(uiCategoryID);

  SyncFont();
}

void CMSOffice2007DemoView::OnSpaceAfter ( ) [protected]

Definition at line 605 of file MSOffice2007DemoView.cpp.

{
}

void CMSOffice2007DemoView::OnSpaceBefore ( ) [protected]

Definition at line 609 of file MSOffice2007DemoView.cpp.

{
}

void CMSOffice2007DemoView::OnStyleDialog ( ) [protected]

Definition at line 407 of file MSOffice2007DemoView.cpp.

{
  AfxMessageBox(_T("Show your Style dialog here."));
}

void CMSOffice2007DemoView::OnUpdateCharStrikeThrough ( CCmdUI * pCmdUI ) [protected]

Definition at line 775 of file MSOffice2007DemoView.cpp.

{
  OnUpdateCharEffect(pCmdUI, CFM_STRIKEOUT, CFE_STRIKEOUT);
}

void CMSOffice2007DemoView::OnUpdateEditFind ( CCmdUI * pCmdUI ) [protected]

Definition at line 831 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->Enable(TRUE);
}

void CMSOffice2007DemoView::OnUpdateEditReplace ( CCmdUI * pCmdUI ) [protected]

Definition at line 836 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->Enable(TRUE);
}

void CMSOffice2007DemoView::OnUpdatePrintLayout ( CCmdUI * pCmdUI ) [protected]

Definition at line 592 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->SetCheck();
}

void CMSOffice2007DemoView::OnUpdateViewDocMap ( CCmdUI * pCmdUI ) [protected]

Definition at line 712 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->SetCheck(m_bViewDocMap);
}

void CMSOffice2007DemoView::OnUpdateViewGridLines ( CCmdUI * pCmdUI ) [protected]

Definition at line 702 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->SetCheck(m_bViewGridLines);
}

void CMSOffice2007DemoView::OnUpdateViewProps ( CCmdUI * pCmdUI ) [protected]

Definition at line 707 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->SetCheck(m_bViewProps);
}

void CMSOffice2007DemoView::OnUpdateViewRuler ( CCmdUI * pCmdUI ) [protected]

Definition at line 697 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->SetCheck(m_bViewRuler);
}

void CMSOffice2007DemoView::OnUpdateViewThumb ( CCmdUI * pCmdUI ) [protected]

Definition at line 717 of file MSOffice2007DemoView.cpp.

{
  pCmdUI->Enable(FALSE);
}

void CMSOffice2007DemoView::OnViewDocMap ( ) [protected]

Definition at line 692 of file MSOffice2007DemoView.cpp.

{
  m_bViewDocMap = !m_bViewDocMap;
}

void CMSOffice2007DemoView::OnViewGridLines ( ) [protected]

Definition at line 682 of file MSOffice2007DemoView.cpp.

{
  m_bViewGridLines = !m_bViewGridLines;
}

void CMSOffice2007DemoView::OnViewProps ( ) [protected]

Definition at line 687 of file MSOffice2007DemoView.cpp.

{
  m_bViewProps = !m_bViewProps;
}

void CMSOffice2007DemoView::OnViewRuler ( ) [protected]

Definition at line 677 of file MSOffice2007DemoView.cpp.

{
  m_bViewRuler = !m_bViewRuler;
}

BOOL CMSOffice2007DemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 183 of file MSOffice2007DemoView.cpp.

{
  return CRichEditView::PreCreateWindow(cs);
}

BOOL CMSOffice2007DemoView::ShowContextMenu ( CPoint pt ) [protected]

Definition at line 417 of file MSOffice2007DemoView.cpp.

{
  if (DYNAMIC_DOWNCAST(CFrameWndEx, GetParentFrame()) == NULL)
  {
    // Maybe, server mode, show the regular menu!
    return FALSE;
  }

  CRichEditCntrItem* pItem = GetSelectedItem();
  if (pItem == NULL || !pItem->IsInPlaceActive())
  {
    CMFCRibbonMiniToolBar* pFloaty = new CMFCRibbonMiniToolBar;

    InitFloaty(pFloaty);

    pFloaty->ShowWithContextMenu(point.x, point.y, IDR_CONTEXT_MENU, this);
    return TRUE;
  }

  return FALSE;
}

void CMSOffice2007DemoView::SyncFont ( ) [protected, virtual]

Definition at line 613 of file MSOffice2007DemoView.cpp.

{
  USES_CONVERSION;

  CString strFontName;

  // get the current font from the view and update
  WPD_CHARFORMAT cf = GetCharFormatSelection();

  CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
  ASSERT_VALID(pRibbon);

  CMFCRibbonFontComboBox* pFontCombo = DYNAMIC_DOWNCAST(CMFCRibbonFontComboBox, pRibbon->FindByID(ID_FONT_FONT));

  if (pFontCombo != NULL && !pFontCombo->HasFocus())
  {
    if ((cf.dwMask &(CFM_FACE|CFM_CHARSET)) == (CFM_FACE|CFM_CHARSET))
    {
#if _MSC_VER >= 1300
      strFontName = cf.szFaceName;
#else
      strFontName = A2T(cf.szFaceName);
#endif
      pFontCombo->SetFont(strFontName, DEFAULT_CHARSET, TRUE);
    }
    else
    {
      pFontCombo->SetText(_T(""));
    }
  }

  CMFCRibbonComboBox* pFontSizeCombo = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_FONT_FONTSIZE));
  if (pFontSizeCombo != NULL)
  {
    pFontSizeCombo->SetEditText(TwipsToPointString(cf.yHeight));
  }

  SetFocus();
}

Member Data Documentation

BOOL CMSOffice2007DemoView::m_bForceReloadBmps = FALSE [static]

Definition at line 26 of file MSOffice2007DemoView.h.

BOOL CMSOffice2007DemoView::m_bIsEndOfPrint [protected]

Definition at line 107 of file MSOffice2007DemoView.h.

BOOL CMSOffice2007DemoView::m_bViewDocMap [protected]

Definition at line 111 of file MSOffice2007DemoView.h.

BOOL CMSOffice2007DemoView::m_bViewGridLines [protected]

Definition at line 109 of file MSOffice2007DemoView.h.

BOOL CMSOffice2007DemoView::m_bViewProps [protected]

Definition at line 110 of file MSOffice2007DemoView.h.

BOOL CMSOffice2007DemoView::m_bViewRuler [protected]

Definition at line 108 of file MSOffice2007DemoView.h.

BOOL CMSOffice2007DemoView::m_bViewThumb [protected]

Definition at line 112 of file MSOffice2007DemoView.h.

CPoint CMSOffice2007DemoView::m_ptMouseDown [protected]

Definition at line 113 of file MSOffice2007DemoView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.h
  • vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMultiPadApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CMultiPadApp Class Reference

#include "multipad.h"

List of all members.

Private Member Functions

BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 16 of file multipad.h.

Member Function Documentation

BOOL CMultiPadApp::InitInstance ( ) [private]
void CMultiPadApp::OnAppAbout ( ) [private]

Definition at line 56 of file multipad.cpp.

{
  CDialog(IDD_ABOUTBOX).DoModal();
}

The documentation for this class was generated from the following files:
  • general/multipad/multipad.h
  • general/multipad/multipad.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMutexesApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CMutexesApp Class Reference

#include "mutexes.h"

List of all members.

Public Member Functions

CMutexesApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 28 of file mutexes.h.

Constructor & Destructor Documentation

CMutexesApp::CMutexesApp ( )

Definition at line 40 of file mutexes.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CMutexesApp::InitInstance ( ) [virtual]

Definition at line 54 of file mutexes.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  CMutexesDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int)dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • advanced/mutexes/mutexes.h
  • advanced/mutexes/mutexes.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMutexesDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CMutexesDlg Class Reference

#include "mutexdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_MUTEXES_DIALOG }

Public Member Functions

CMutexesDlg (CWnd *pParent=NULL)
~CMutexesDlg ()
void | AddToListBox (LPCTSTR szBuffer)
void | OnPriorityChange (UINT nID)

Public Attributes

CMutex | m_mutex
CCounterThread * m_pCounterThread
CDisplayThread * m_pDisplayThread
CString | m_strNumber

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnClose ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg void | OnPause ()
afx_msg void | OnPriorityChangeCntr ()
afx_msg void | OnPriorityChangeDisp ()
afx_msg void | OnPriorityClassChange ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 23 of file mutexdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 31 of file mutexdlg.h.

{ IDD = IDD_MUTEXES_DIALOG };

Constructor & Destructor Documentation

CMutexesDlg::CMutexesDlg ( CWnd * pParent = NULL )

Definition at line 71 of file mutexdlg.cpp.

  : CDialog(CMutexesDlg::IDD, pParent),
   m_mutex(FALSE, NULL)
{
  //{{AFX_DATA_INIT(CMutexesDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

  m_pCounterThread = NULL;
  m_pDisplayThread = NULL;
  //Preallocate and lock large buffer to avoid MT problems:
  //CString is used without locking and reallocs by CounterThread, when
  //DisplayThread tries to access the freed buffer.
  m_strNumber.Preallocate(MAX_DIGITS);
  m_strNumber.LockBuffer();
  m_strNumber="0";

}

CMutexesDlg::~CMutexesDlg ( )

Definition at line 91 of file mutexdlg.cpp.

{
  m_strNumber.UnlockBuffer();
}

Member Function Documentation

void CMutexesDlg::AddToListBox ( LPCTSTR szBuffer )

Definition at line 255 of file mutexdlg.cpp.

{
  CListBox* pBox = (CListBox*) GetDlgItem(IDC_DATABOX);
  ASSERT(pBox != NULL);

  if (pBox != NULL)
  {
    int x = pBox->AddString(szBuffer);
    pBox->SetCurSel(x);

    if (pBox->GetCount() > 100)
      pBox->DeleteString(0);
  }
}

void CMutexesDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 95 of file mutexdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CMutexesDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

void CMutexesDlg::OnClose ( ) [protected]

Definition at line 270 of file mutexdlg.cpp.

{
  int nCount = 0;
  DWORD   dwStatus;

  CButton* pCheck = (CButton*) GetDlgItem(IDC_PAUSE);
  BOOL bPaused = ((pCheck->GetState() & 0x003) != 0);

  if (bPaused == TRUE)
  {
    pCheck->SetCheck(0);
    m_pCounterThread->ResumeThread();
    m_pDisplayThread->ResumeThread();
  }

  if (m_pCounterThread != NULL)
  {
    VERIFY(::GetExitCodeThread(m_pCounterThread->m_hThread, &dwStatus));
    if (dwStatus == STILL_ACTIVE)
    {
      nCount++;
      m_pCounterThread->m_bDone = TRUE;
    }
    else
    {
      delete m_pCounterThread;
      m_pCounterThread = NULL;
    }
  }

  if (m_pDisplayThread != NULL)
  {
    VERIFY(::GetExitCodeThread(m_pDisplayThread->m_hThread, &dwStatus));
    if (dwStatus == STILL_ACTIVE)
    {
      nCount++;
      m_pDisplayThread->m_bDone = TRUE;
    }
    else
    {
      delete m_pDisplayThread;
      m_pDisplayThread = NULL;
    }
  }

  if (nCount == 0)
    CDialog::OnClose();
  else
    PostMessage(WM_CLOSE, 0, 0);
}

BOOL CMutexesDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 120 of file mutexdlg.cpp.

{
  CDialog::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  CString strAboutMenu;
  strAboutMenu.LoadString(IDS_ABOUTBOX);
  if (!strAboutMenu.IsEmpty())
  {
    pSysMenu->AppendMenu(MF_SEPARATOR);
    pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  }

  // Fill the Process Priority Class combo box and select
  // Normal.

  CComboBox* pBox;
  pBox = (CComboBox*) GetDlgItem(IDC_PRIORITYCLASS);

  ASSERT(pBox != NULL);
  if (pBox != NULL)
  {
    pBox->AddString(_T("Idle"));
    pBox->AddString(_T("Normal"));
    pBox->AddString(_T("High"));
    pBox->AddString(_T("Realtime"));
    pBox->SetCurSel(1); // Normal
  }

  // Fill the Display Thread Priority
  // combo box and select Normal.

  pBox = (CComboBox*) GetDlgItem(IDC_DSPYTHRDPRIORITY);
  ASSERT(pBox != NULL);
  if (pBox != NULL)
  {
    pBox->AddString(_T("Idle"));
    pBox->AddString(_T("Lowest"));
    pBox->AddString(_T("Below normal"));
    pBox->AddString(_T("Normal"));
    pBox->AddString(_T("Above normal"));
    pBox->AddString(_T("Highest"));
    pBox->AddString(_T("Timecritical"));
    pBox->SetCurSel(3);  // Normal
  }

  // Fill the Counter Thread Priority
  // combo box and select Normal.

  pBox = (CComboBox*) GetDlgItem(IDC_CNTRTHRDPRIORITY);
  ASSERT(pBox != NULL);
  if (pBox != NULL)
  {
    pBox->AddString(_T("Idle"));
    pBox->AddString(_T("Lowest"));
    pBox->AddString(_T("Below normal"));
    pBox->AddString(_T("Normal"));
    pBox->AddString(_T("Above normal"));
    pBox->AddString(_T("Highest"));
    pBox->AddString(_T("Timecritical"));
    pBox->SetCurSel(3);  // Normal
  }

  // initialize the threads and let them start running!

  m_pDisplayThread = (CDisplayThread*)
    AfxBeginThread(RUNTIME_CLASS(CDisplayThread), THREAD_PRIORITY_NORMAL,
      0, CREATE_SUSPENDED);
  m_pDisplayThread->SetOwner(this);
  m_pDisplayThread->ResumeThread();

  m_pCounterThread = (CCounterThread*)
    AfxBeginThread(RUNTIME_CLASS(CCounterThread), THREAD_PRIORITY_NORMAL,
      0, CREATE_SUSPENDED);
  m_pCounterThread->SetOwner(this);
  m_pCounterThread->ResumeThread();

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CMutexesDlg::OnPaint ( ) [protected]

Definition at line 223 of file mutexdlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

void CMutexesDlg::OnPause ( ) [protected]

Definition at line 406 of file mutexdlg.cpp.

{
  CButton* pCheck = (CButton*) GetDlgItem(IDC_PAUSE);
  BOOL bPaused = ((pCheck->GetState() & 0x003) != 0);

  if (bPaused)
  {
    m_pCounterThread->SuspendThread();
    m_pDisplayThread->SuspendThread();
  }
  else
  {
    m_pCounterThread->ResumeThread();
    m_pDisplayThread->ResumeThread();
  }
}

void CMutexesDlg::OnPriorityChange ( UINT nID )

Definition at line 360 of file mutexdlg.cpp.

{
  ASSERT(nID == IDC_CNTRTHRDPRIORITY || nID == IDC_DSPYTHRDPRIORITY);

  DWORD dw;
  CComboBox* pBox = (CComboBox*) GetDlgItem(nID);
  int nCurSel = pBox->GetCurSel();

  switch (nCurSel)
  {
  case 0:
    dw = (DWORD) THREAD_PRIORITY_IDLE;
    break;

  case 1:
    dw = (DWORD) THREAD_PRIORITY_LOWEST;
    break;

  case 2:
    dw = (DWORD) THREAD_PRIORITY_BELOW_NORMAL;
    break;

  case 3:
  default:
    dw = (DWORD) THREAD_PRIORITY_NORMAL;
    break;

  case 4:
    dw = (DWORD) THREAD_PRIORITY_ABOVE_NORMAL;
    break;

  case 5:
    dw = (DWORD) THREAD_PRIORITY_HIGHEST;
    break;

  case 6:
    dw = (DWORD) THREAD_PRIORITY_TIME_CRITICAL;
    break;
  }

  if (nID == IDC_CNTRTHRDPRIORITY)
    m_pCounterThread->SetThreadPriority(dw);
  else
    m_pDisplayThread->SetThreadPriority(dw);
}

void CMutexesDlg::OnPriorityChangeCntr ( ) [protected]

Definition at line 355 of file mutexdlg.cpp.

{
  OnPriorityChange(IDC_CNTRTHRDPRIORITY);
}

void CMutexesDlg::OnPriorityChangeDisp ( ) [protected]

Definition at line 350 of file mutexdlg.cpp.

{
  OnPriorityChange(IDC_DSPYTHRDPRIORITY);
}

void CMutexesDlg::OnPriorityClassChange ( ) [protected]

Definition at line 321 of file mutexdlg.cpp.

{
  DWORD dw;
  CComboBox* pBox = (CComboBox*) GetDlgItem(IDC_PRIORITYCLASS);
  int nCurSel = pBox->GetCurSel();

  switch (nCurSel)
  {
  case 0:
    dw = IDLE_PRIORITY_CLASS;
    break;

  case 1:
  default:
    dw = NORMAL_PRIORITY_CLASS;
    break;

  case 2:
    dw = HIGH_PRIORITY_CLASS;
    break;

  case 3:
    dw = REALTIME_PRIORITY_CLASS;
    break;
  }

  SetPriorityClass(GetCurrentProcess(), dw);
}

HCURSOR CMutexesDlg::OnQueryDragIcon ( ) [protected]

Definition at line 250 of file mutexdlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CMutexesDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 206 of file mutexdlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDialog::OnSysCommand(nID, lParam);
  }
}

Member Data Documentation

HICON CMutexesDlg::m_hIcon [protected]

Definition at line 55 of file mutexdlg.h.

CMutex CMutexesDlg::m_mutex

Definition at line 44 of file mutexdlg.h.

CCounterThread* CMutexesDlg::m_pCounterThread

Definition at line 46 of file mutexdlg.h.

CDisplayThread* CMutexesDlg::m_pDisplayThread

Definition at line 47 of file mutexdlg.h.

CString CMutexesDlg::m_strNumber

Definition at line 42 of file mutexdlg.h.

The documentation for this class was generated from the following files:
  • advanced/mutexes/mutexdlg.h
  • advanced/mutexes/mutexdlg.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyBrowseEdit Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CMyBrowseEdit Class Reference

#include "Page3.h"

List of all members.

Private Member Functions

virtual void OnBrowse ()

Detailed Description

Definition at line 32 of file Page3.h.

Member Function Documentation

virtual void CMyBrowseEdit::OnBrowse ( ) [inline, private, virtual]

Definition at line 34 of file Page3.h.

  {
    MessageBox(_T("Browse item..."));
    SetWindowText(_T("New value!"));
  }

The documentation for this class was generated from the following file:
  • vc2008fp/NewControls/Page3.h
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyCustomizationPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CMyCustomizationPage Class Reference

#include "MyCustomizationPage.h"

List of all members.

Public Types

enum | { IDD = IDD_CUST_PAGE_DLG }

Public Member Functions

CMyCustomizationPage (CWnd *pParent=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file MyCustomizationPage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file MyCustomizationPage.h.

{ IDD = IDD_CUST_PAGE_DLG };

Constructor & Destructor Documentation

CMyCustomizationPage::CMyCustomizationPage ( CWnd * pParent = NULL )

Definition at line 27 of file MyCustomizationPage.cpp.

  : CPropertyPage(CMyCustomizationPage::IDD)
{
}

Member Function Documentation

void CMyCustomizationPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 33 of file MyCustomizationPage.cpp.

{
  CDialog::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/CustomPages/MyCustomizationPage.h
  • vc2008fp/CustomPages/MyCustomizationPage.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyDialogTemplate Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMyDialogTemplate Class Reference

#include "itemtemp.h"

List of all members.

Public Member Functions

CMyDialogTemplate ()
void | DemoIt ()

Public Attributes

DLGTEMPLATE | m_dlgTempl
CDialogItem | m_rgDlgItem [3]

Detailed Description

Definition at line 46 of file itemtemp.h.

Constructor & Destructor Documentation

CMyDialogTemplate::CMyDialogTemplate ( )

Definition at line 25 of file itemtemp.cpp.

{
  // initialize the 3 dialog items

  CRect   rect(10, 10, 80, 35);  // Set default postions for the buttons
  m_rgDlgItem[IBUTTON].Initialize(CDialogItem::BUTTON, IDC_MYBUTTON, &rect, _T("Dummy Button"));
  SETRECT(rect, 100, 10, 250, 35);
  m_rgDlgItem[ISTATICTEXT].Initialize(CDialogItem::STATICTEXT, IDC_MYSTATICTEXT, &rect, _T("Static Text of your choice here."));
  SETRECT(rect, 70, 50, 250, 135);
  m_rgDlgItem[IEDITCONTROL].Initialize(CDialogItem::EDITCONTROL, IDC_MYEDITCONTROL, &rect,
    _T("This is a multiline edit control.  CMyDialogItem::DemoIt holds the essential code of this sample."));

  // now initialize the DLGTEMPLATE structure
  m_dlgTempl.cx = 280;  // 4 horizontal units are the width of one character
  m_dlgTempl.cy = 160;  // 8 vertical units are the height of one character
  m_dlgTempl.style = WS_CAPTION | WS_VISIBLE | WS_DLGFRAME | WS_POPUP | DS_MODALFRAME | DS_SETFONT;
  m_dlgTempl.dwExtendedStyle = 0;
  m_dlgTempl.x = 0;
  m_dlgTempl.y = 0;
  m_dlgTempl.cdit = 3;  // 3 dialog items in the dialog
}

Member Function Documentation

void CMyDialogTemplate::DemoIt ( )

Definition at line 47 of file itemtemp.cpp.

{
  // The first step is to allocate memory to define the dialog.  The information to be
  // stored in the allocated buffer is the following:
  //
  // 1.  DLGTEMPLATE structure
  // 2.    0x0000 (Word) indicating the dialog has no menu
  // 3.    0x0000 (Word) Let windows assign default class to the dialog
  // 4.    (Caption)  Null terminated unicode string
  // 5.    0x000B  (size of the font to be used)
  // 6.    "Arial"  (name of the typeface to be used)
  // 7.  DLGITEMTEMPLATE structure for the button  (HAS TO BE DWORD ALIGNED)
  // 8.    0x0080  to indicate the control is a button
  // 9.    (Title). Unicode null terminated string with the caption
  // 10.    0x0000   0 extra bytes of data for this control
  // 11.  DLGITEMTEMPLATE structure for the Static Text  (HAS TO BE DWORD ALIGNED)
  // 12.    0x0081 to indicate the control is static text
  // 13.   (Title). Unicode null terminated string with the text
  // 14     0x0000.  0 extra bytes of data for this control
  // 15. DLGITEMTEMPLATE structure for the Edit Control (HAS TO BE DWORD ALIGNED)
  // 16.   0x0082 to indicate an Edit control
  // 17.   (Text) - Null terminated unicode string to appear in the edit control
  // 18.   0x0000. 0 extra bytes of data for this control

  WCHAR szBoxCaption[] = L"Dialog Template Sample -  PRESS <ESC> TO CLOSE THIS DIALOG";
  WCHAR szFontName[] = L"ARIAL";

  // will first convert the control captions to UNICODE
  int     i;

  TRY  // catch memory exceptions and don't worry about allocation failures
  {
    // The following expressions have unnecessary parenthesis trying to make the
    // comments more clear.
    int nBufferSize =  sizeof(DLGTEMPLATE) + (2 * sizeof(WORD))/*menu and class*/ + sizeof(szBoxCaption);
    nBufferSize += sizeof(WORD) + sizeof(szFontName); /* font information*/

    nBufferSize = (nBufferSize + 3) & ~3;  // adjust size to make first control DWORD aligned

    for (i = 0; i < TOTALITEMS; i++)
    {
      int nItemLength = sizeof(DLGITEMTEMPLATE) + 3 * sizeof(WORD);
      nItemLength += (m_rgDlgItem[i].m_strCaption.GetLength() + 1) * sizeof(WCHAR);

      if (i != TOTALITEMS -1 )   // the last control does not need extra bytes
        nItemLength = (nItemLength + 3) & ~3;  // take into account gap so next control is DWORD aligned

      nBufferSize += nItemLength;
    }

    HLOCAL hLocal = LocalAlloc(LHND, nBufferSize);
    if (hLocal == NULL)
      AfxThrowMemoryException();

    BYTE*   pBuffer = (BYTE*)LocalLock(hLocal);
    if (pBuffer == NULL)
    {
      LocalFree(hLocal);
      AfxThrowMemoryException();
    }

    BYTE*   pdest = pBuffer;
    BYTE* pdestEnd = pdest + nBufferSize;
    // transfer DLGTEMPLATE structure to the buffer
    memcpy_s(pdest, pdestEnd - pdest, &m_dlgTempl, sizeof(DLGTEMPLATE));
    pdest += sizeof(DLGTEMPLATE);
    *(WORD*)pdest = 0; // no menu
    *(WORD*)(pdest + sizeof(WORD)) = 0;  // use default window class
    pdest += 2 * sizeof(WORD);
    memcpy_s(pdest, pdestEnd - pdest, szBoxCaption, sizeof(szBoxCaption));
    pdest += sizeof(szBoxCaption);
    *(WORD*)pdest = 11;  // font size
    pdest += sizeof(WORD);
    memcpy_s(pdest, pdestEnd - pdest, szFontName, sizeof(szFontName));
    pdest += sizeof(szFontName);

    // will now transfer the information for each one of the item templates
    for (i = 0; i < TOTALITEMS; i++)
    {
      pdest = (BYTE*)(((DWORD_PTR)pdest + 3) & ~3);  // make the pointer DWORD aligned
      memcpy_s(pdest, pdestEnd - pdest, (void *)&m_rgDlgItem[i].m_dlgItemTemplate, sizeof(DLGITEMTEMPLATE));
      pdest += sizeof(DLGITEMTEMPLATE);
      *(WORD*)pdest = 0xFFFF;  // indicating atom value
      pdest += sizeof(WORD);
      *(WORD*)pdest = (WORD)m_rgDlgItem[i].m_controltype;    // atom value for the control
      pdest += sizeof(WORD);

      // transfer the caption even when it is an empty string
      WCHAR*  pchCaption;
      int     nChars, nActualChars;

      nChars = m_rgDlgItem[i].m_strCaption.GetLength() + 1;
      pchCaption = new WCHAR[nChars];
      nActualChars = MultiByteToWideChar(CP_ACP, 0, m_rgDlgItem[i].m_strCaption, -1, pchCaption, nChars);
      ASSERT(nActualChars > 0);
      memcpy_s(pdest, pdestEnd - pdest, pchCaption, nActualChars * sizeof(WCHAR));
      pdest += nActualChars * sizeof(WCHAR);
      delete [] pchCaption;

      *(WORD*)pdest = 0;  // How many bytes in data for control
      pdest += sizeof(WORD);
    }
    ASSERT(pdest - pBuffer == nBufferSize); // just make sure we did not overrun the heap

    CDialog dlg;
    dlg.InitModalIndirect((DLGTEMPLATE*)pBuffer);
    dlg.DoModal();  // tadaaa!  this is the line everyone's been waiting for!!!

    LocalUnlock(hLocal);
    LocalFree(hLocal);
  }
  CATCH(CMemoryException, e)
  {
    MessageBox(NULL, _T("Memory allocation for dialog template failed.  Demo aborted!"),
      _T("Allocation Failure"), MB_ICONEXCLAMATION | MB_OK);
  }
  END_CATCH
}

Member Data Documentation

DLGTEMPLATE CMyDialogTemplate::m_dlgTempl

Definition at line 50 of file itemtemp.h.

CDialogItem CMyDialogTemplate::m_rgDlgItem[3]

Definition at line 51 of file itemtemp.h.

The documentation for this class was generated from the following files:
  • general/dlgtempl/itemtemp.h
  • general/dlgtempl/itemtemp.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyListBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions

CMyListBox Class Reference

#include "oleview.h"

List of all members.

Protected Member Functions

afx_msg LRESULT OnCommandHelp (WPARAM, LPARAM lParam)

Detailed Description

Definition at line 39 of file oleview.h.

Member Function Documentation

afx_msg LRESULT CMyListBox::OnCommandHelp | ( | WPARAM | ,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]
The documentation for this class was generated from the following file:
  • ole/oleview/oleview.h
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyListCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions

CMyListCtrl Class Reference

#include "mlistctl.h"

List of all members.

Public Member Functions

CMyListCtrl ()
virtual | ~CMyListCtrl ()
void | OnButtonUp (CPoint point)

Public Attributes

BOOL | m_bColor
BOOL | m_bDragging
BOOL | m_bModifyFont
int | m_iItemDrag
int | m_iItemDrop
DWORD | m_oldDNDStyle
CImageList * | m_pimageListDrag
CPoint | m_ptHotSpot
CPoint | m_ptOrigin
CSize | m_sizeDelta

Protected Member Functions

afx_msg void | OnBeginDrag (LPNMHDR pnmhdr, LRESULT *pResult)
afx_msg void | OnEndLabelEdit (LPNMHDR pnmhdr, LRESULT *pResult)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point)

Private Member Functions

virtual int | OnCompareItems (LPARAM lParam1, LPARAM lParam2, int iColumn)
virtual COLORREF | OnGetCellBkColor (int nRow, int nColum)
virtual HFONT | OnGetCellFont (int nRow, int nColum, DWORD dwData=0)
virtual COLORREF | OnGetCellTextColor (int nRow, int nColum)

Detailed Description

Definition at line 19 of file mlistctl.h.

Constructor & Destructor Documentation

CMyListCtrl::CMyListCtrl ( )

Definition at line 27 of file mlistctl.cpp.

{
  m_bDragging = FALSE;
  m_pimageListDrag = NULL;
  m_oldDNDStyle = NULL;
}

CMyListCtrl::~CMyListCtrl ( ) [virtual]

Definition at line 34 of file mlistctl.cpp.

{
}

Member Function Documentation

void CMyListCtrl::OnBeginDrag | ( | LPNMHDR | pnmhdr,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 52 of file mlistctl.cpp.

{
  CPoint          ptItem, ptAction, ptImage;
  NM_LISTVIEW     *pnmListView = (NM_LISTVIEW *)pnmhdr;

  m_oldDNDStyle = GetExtendedStyle();
  if (m_oldDNDStyle != 0) SetExtendedStyle(0);  // styles model original icon DND behavior

  ASSERT(!m_bDragging);
  m_bDragging = TRUE;
  m_iItemDrag = pnmListView->iItem;
  ptAction = pnmListView->ptAction;
  GetItemPosition(m_iItemDrag, &ptItem);  // ptItem is relative to (0,0) and not the view origin
  GetOrigin(&m_ptOrigin);

  ASSERT(m_pimageListDrag == NULL);
  m_pimageListDrag = CreateDragImage(m_iItemDrag, &ptImage);
  m_sizeDelta = ptAction - ptImage;   // difference between cursor pos and image pos
  m_ptHotSpot = ptAction - ptItem + m_ptOrigin;  // calculate hotspot for the cursor
  m_pimageListDrag->DragShowNolock(TRUE);  // lock updates and show drag image
  m_pimageListDrag->SetDragCursorImage(0, CPoint(0, 0));// define the hot spot for the new cursor image
  m_pimageListDrag->BeginDrag(0, CPoint(0, 0));

  ptAction -= m_sizeDelta;
  m_pimageListDrag->DragEnter(this, ptAction);
  m_pimageListDrag->DragMove(ptAction);  // move image to overlap original icon
  m_iItemDrop = -1;// no drop target
  SetCapture();
}

void CMyListCtrl::OnButtonUp ( CPoint point )

Definition at line 129 of file mlistctl.cpp.

{
  if (m_bDragging)  // end of the drag operation
  {
    long        lStyle;
    CString     cstr;

    lStyle = GetWindowLong(m_hWnd, GWL_STYLE) & LVS_TYPEMASK;
    if (m_oldDNDStyle != 0) SetExtendedStyle(m_oldDNDStyle);

    m_bDragging = FALSE;
    ASSERT(m_pimageListDrag != NULL);
    m_pimageListDrag->DragLeave(this);

    SetItemState(m_iItemDrop, 0, LVIS_DROPHILITED); // remove the drophighlighted from last highlighted target

    m_pimageListDrag->EndDrag();
    delete m_pimageListDrag;
    m_pimageListDrag = NULL;

    // The drop target's sub-item text is replaced by the dragged item's
    // main text
    if (lStyle == LVS_REPORT && m_iItemDrop != m_iItemDrag)
    {
      cstr = GetItemText(m_iItemDrag, 0);
      SetItemText(m_iItemDrop, 1, cstr);
    }

    //the character string "**" is added to the end of the drop target's main text
    if (lStyle == LVS_LIST && m_iItemDrop != m_iItemDrag)
    {
      cstr = GetItemText(m_iItemDrop, 0);
      cstr += _T("**");
      SetItemText(m_iItemDrop, 0, cstr);
    }

      // move the icon
    if (lStyle == LVS_ICON || lStyle == LVS_SMALLICON)
    {
      point -= m_ptHotSpot;  // the icon should be drawn exactly where the image is
      point += m_ptOrigin;
      SetItemPosition(m_iItemDrag, point);  // just move the dragged item
    }

    ::ReleaseCapture();
  }
}

int CMyListCtrl::OnCompareItems | ( | LPARAM | lParam1,
 |  | LPARAM | lParam2,
 |  | int | iColumn |
 | ) |  |  | [private, virtual]

Definition at line 321 of file Page5.cpp.

{
  CString strItem1 = GetItemText((int)(lParam1 < lParam2 ? lParam1 : lParam2), iColumn);
  CString strItem2 = GetItemText((int)(lParam1 < lParam2 ? lParam2 : lParam1), iColumn);

  if (iColumn == 0)
  {
    int nItem1 = _ttoi(strItem1);
    int nItem2 = _ttoi(strItem2);
    return(nItem1 < nItem2 ? -1 : 1);
  }
  else
  {
    int iSort = _tcsicmp(strItem1, strItem2);
    return(iSort);
  }
}

void CMyListCtrl::OnEndLabelEdit | ( | LPNMHDR | pnmhdr,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 189 of file mlistctl.cpp.

{
  LV_DISPINFO  *plvDispInfo = (LV_DISPINFO *)pnmhdr;
  LV_ITEM      *plvItem = &plvDispInfo->item;

  if (plvItem->pszText != NULL)
    SetItemText(plvItem->iItem, plvItem->iSubItem, plvItem->pszText);
}

COLORREF CMyListCtrl::OnGetCellBkColor | ( | int | nRow,
 |  | int | nColum |
 | ) |  |  | [private, virtual]

Definition at line 291 of file Page5.cpp.

{
  if (!m_bColor)
  {
    return CMFCListCtrl::OnGetCellBkColor(nRow, nColum);
  }

  if (m_bMarkSortedColumn && nColum == m_iSortedColumn)
  {
    return(nRow % 2) == 0 ? RGB(233, 221, 229) : RGB(176, 218, 234);
  }

  return(nRow % 2) == 0 ? RGB(253, 241, 249) : RGB(196, 238, 254);
}

HFONT CMyListCtrl::OnGetCellFont | ( | int | nRow,
 |  | int | nColum,
 |  | DWORD | dwData = 0 |
 | ) |  |  | [private, virtual]

Definition at line 306 of file Page5.cpp.

{
  if (!m_bModifyFont)
  {
    return NULL;
  }

  if (nColum == 2 &&(nRow >= 4 && nRow <= 8))
  {
    return afxGlobalData.fontDefaultGUIBold;
  }

  return NULL;
}

COLORREF CMyListCtrl::OnGetCellTextColor | ( | int | nRow,
 |  | int | nColum |
 | ) |  |  | [private, virtual]

Definition at line 281 of file Page5.cpp.

{
  if (!m_bColor)
  {
    return CMFCListCtrl::OnGetCellTextColor(nRow, nColum);
  }

  return(nRow % 2) == 0 ? RGB(128, 37, 0) : RGB(0, 0, 0);
}

void CMyListCtrl::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 177 of file mlistctl.cpp.

{
  OnButtonUp(point);
  CListCtrl::OnLButtonUp(nFlags, point);
}

void CMyListCtrl::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 82 of file mlistctl.cpp.

{
  long        lStyle;
  int         iItem;
  LV_ITEM     lvitem;

  lStyle = GetWindowLong(m_hWnd, GWL_STYLE);
  lStyle &= LVS_TYPEMASK;  // drag will do different things in list and report mode

  if (m_bDragging)
  {
    ASSERT(m_pimageListDrag != NULL);
    m_pimageListDrag->DragMove(point - m_sizeDelta);  // move the image
    if ((iItem = HitTest(point)) != -1)
    {
      lvitem.mask = LVIF_STATE;
      lvitem.stateMask = LVIS_DROPHILITED;  // highlight the drop target
      if (m_iItemDrop != -1)  // remove the drophighlighted from previous item
      {
        m_pimageListDrag->DragLeave(this);
        lvitem.iItem = m_iItemDrop;
        lvitem.iSubItem = 0;
        lvitem.state = 0; // sets drophighlighted to FALSE

        SetItem(&lvitem);
      }

      m_iItemDrop = iItem;
      m_pimageListDrag->DragLeave(this); // unlock the window and hide drag image

      if (lStyle == LVS_REPORT || lStyle == LVS_LIST)
      {
        lvitem.iItem = iItem;
        lvitem.iSubItem = 0;
        lvitem.state = LVIS_DROPHILITED;  // sets the drophighlighted

        SetItem(&lvitem);
        UpdateWindow();
      }
      point -= m_sizeDelta;
      m_pimageListDrag->DragEnter(this, point);  // lock updates and show drag image
    }
  }
  CListCtrl::OnMouseMove(nFlags, point);
}

void CMyListCtrl::OnRButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 183 of file mlistctl.cpp.

{
  OnButtonUp(point);
  CListCtrl::OnRButtonUp(nFlags, point);
}

Member Data Documentation

BOOL CMyListCtrl::m_bColor

Definition at line 21 of file Page5.h.

BOOL CMyListCtrl::m_bDragging

Definition at line 28 of file mlistctl.h.

BOOL CMyListCtrl::m_bModifyFont

Definition at line 22 of file Page5.h.

int CMyListCtrl::m_iItemDrag

Definition at line 29 of file mlistctl.h.

int CMyListCtrl::m_iItemDrop

Definition at line 30 of file mlistctl.h.

DWORD CMyListCtrl::m_oldDNDStyle

Definition at line 34 of file mlistctl.h.

CImageList* CMyListCtrl::m_pimageListDrag

Definition at line 35 of file mlistctl.h.

CPoint CMyListCtrl::m_ptHotSpot

Definition at line 31 of file mlistctl.h.

CPoint CMyListCtrl::m_ptOrigin

Definition at line 32 of file mlistctl.h.

CSize CMyListCtrl::m_sizeDelta

Definition at line 33 of file mlistctl.h.

The documentation for this class was generated from the following files:
  • general/ListHdr/mlistctl.h
  • vc2008fp/NewControls/Page5.h
  • general/ListHdr/mlistctl.cpp
  • vc2008fp/NewControls/Page5.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyMenuBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions

CMyMenuBar Class Reference

#include "MyMenuBar.h"

List of all members.

Public Member Functions

CMyMenuBar ()
virtual | ~CMyMenuBar ()
void | AddSubMenu ()

Protected Member Functions

virtual BOOL | RestoreOriginalstate ()

Private Member Functions

virtual void | CreateFromMenu (HMENU hMenu, BOOL bDefaultMenu=FALSE, BOOL bForceUpdate=FALSE)

Detailed Description

Definition at line 13 of file MyMenuBar.h.

Constructor & Destructor Documentation

CMyMenuBar::CMyMenuBar ( )

Definition at line 25 of file MyMenuBar.cpp.

{

}

CMyMenuBar::~CMyMenuBar ( ) [virtual]

Definition at line 30 of file MyMenuBar.cpp.

{

}

Member Function Documentation

void CMyMenuBar::AddSubMenu ( )

Definition at line 46 of file MyMenuBar.cpp.

{
  CMenu menu;
  menu.LoadMenu (IDR_DYNAMIC_MENU);

  InsertButton (CMFCToolBarMenuButton (0, menu, -1, _T ("&DynamicMenu")));

  AdjustLayout();
  AdjustSizeImmediate ();
}

void CMyMenuBar::CreateFromMenu | ( | HMENU | hMenu,
 |  | BOOL | bDefaultMenu = FALSE,
 |  | BOOL | bForceUpdate = FALSE |
 | ) |  |  | [private, virtual]

Definition at line 59 of file MainFrm.cpp.

{
  CMFCMenuBar::CreateFromMenu (hMenu, bDefaultMenu, bForceUpdate);

  int nIndex = 0;
  BOOL bAdjustLayout = FALSE;

  for (POSITION pos = m_Buttons.GetHeadPosition (); pos != NULL;)
  {
    CMFCToolBarButton* pButton = (CMFCToolBarButton*) m_Buttons.GetNext (pos);
    ASSERT_VALID (pButton);

    if (IsMenuButtonEmpty (pButton))
    {
      RemoveButton (nIndex);
      bAdjustLayout = TRUE;
    }
    else
    {
      nIndex++;
    }
  }

  if (bAdjustLayout)
  {
    AdjustLayout ();
  }
}

BOOL CMyMenuBar::RestoreOriginalstate ( ) [protected, virtual]

Definition at line 35 of file MyMenuBar.cpp.

{
  if (!CMFCMenuBar::RestoreOriginalstate ())
  {
    return FALSE;
  }

  AddSubMenu ();
  return TRUE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/DynamicMenu/MyMenuBar.h
  • vc2008fp/MenuSubSet/MainFrm.h
  • vc2008fp/DynamicMenu/MyMenuBar.cpp
  • vc2008fp/MenuSubSet/MainFrm.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyObject Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMyObject Class Reference

#include "colledoc.h"

List of all members.

Public Member Functions

CMyObject ()
virtual | ~CMyObject ()
void | FormatMyObject (CString &str)
virtual void | Serialize (CArchive &ar)

Public Attributes

float | m_float
int | m_int
CString | m_str

Detailed Description

Definition at line 37 of file colledoc.h.

Constructor & Destructor Documentation

CMyObject::CMyObject ( )

Definition at line 73 of file colledoc.cpp.

{
}

CMyObject::~CMyObject ( ) [virtual]

Definition at line 77 of file colledoc.cpp.

{
}

Member Function Documentation

void CMyObject::FormatMyObject ( CString & str )

Definition at line 81 of file colledoc.cpp.

{
  str.Format(_T("{%i, %.4f, %s}"), m_int, m_float, (LPCTSTR)m_str);
}

void CMyObject::Serialize ( CArchive & ar ) [virtual]

Definition at line 86 of file colledoc.cpp.

{
  WORD w;
  if (ar.IsStoring())
  {
    w = (WORD)m_int;
    ar << w;
    ar << m_float;
    ar << m_str;
  }
  else
  {
    ar >> w;
    m_int = w;
    ar >> m_float;
    ar >> m_str;
  }
}

Member Data Documentation

float CMyObject::m_float

Definition at line 46 of file colledoc.h.

int CMyObject::m_int

Definition at line 45 of file colledoc.h.

CString CMyObject::m_str

Definition at line 47 of file colledoc.h.

The documentation for this class was generated from the following files:
  • advanced/collect/colledoc.h
  • advanced/collect/colledoc.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyOutlookBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CMyOutlookBar Class Reference

#include "MainFrm.h"

List of all members.

Private Member Functions

virtual BOOL | AllowShowOnPaneMenu () const
virtual void | GetPaneName (CString &strName) const
virtual BOOL | OnShowControlBarMenu (CPoint point)

Detailed Description

Definition at line 19 of file MainFrm.h.

Member Function Documentation

BOOL CMyOutlookBar::AllowShowOnPaneMenu ( ) const [private, virtual]

Definition at line 25 of file MainFrm.cpp.

{
  return m_bMode2003 == ((CMainFrame*)GetParent())->IsOutlookBar2003();
}

virtual void CMyOutlookBar::GetPaneName ( CString & strName ) const [inline, private, virtual]

Definition at line 22 of file MainFrm.h.

  {
    strName = _T("Outlook Bar");
  }

virtual BOOL CMyOutlookBar::OnShowControlBarMenu ( CPoint point ) [inline, private, virtual]

Definition at line 26 of file MainFrm.h.

  {
    return TRUE;
  }

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/MainFrm.h
  • vc2008fp/OutlookDemo/MainFrm.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyPopupDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CMyPopupDlg Class Reference

#include "MyAlertDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_DIALOG1 }

Public Member Functions

CMyPopupDlg ()

Public Attributes

CMFCDesktopAlertWndButton | m_btnDelete
CMFCDesktopAlertWndButton | m_btnFlag
CMFCLinkCtrl | m_btnRL
CStatic | m_wndFrom

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnButton1 ()
afx_msg void | OnDelete ()
afx_msg void | OnFlag ()
virtual BOOL | OnInitDialog ()

Protected Attributes

CFont | m_fontBold

Detailed Description

Definition at line 16 of file MyAlertDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file MyAlertDlg.h.

{ IDD = IDD_DIALOG1 };

Constructor & Destructor Documentation

CMyPopupDlg::CMyPopupDlg ( )

Definition at line 26 of file MyAlertDlg.cpp.

{
}

Member Function Documentation

void CMyPopupDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 31 of file MyAlertDlg.cpp.

{
  CMFCDesktopAlertDialog::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_FROM, m_wndFrom);
  DDX_Control(pDX, IDC_FLAG, m_btnFlag);
  DDX_Control(pDX, IDC_DELETE, m_btnDelete);
  DDX_Control(pDX, IDC_BUTTON1, m_btnRL);
}

void CMyPopupDlg::OnButton1 ( ) [protected]

Definition at line 82 of file MyAlertDlg.cpp.

{
  GetParent ()->PostMessage (WM_CLOSE);
}

void CMyPopupDlg::OnDelete ( ) [protected]

Definition at line 72 of file MyAlertDlg.cpp.

{
  GetParent ()->PostMessage (WM_CLOSE);
}

void CMyPopupDlg::OnFlag ( ) [protected]

Definition at line 77 of file MyAlertDlg.cpp.

{
  GetParent ()->PostMessage (WM_CLOSE);
}

BOOL CMyPopupDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 50 of file MyAlertDlg.cpp.

{
  CMFCDesktopAlertDialog::OnInitDialog();

  LOGFONT lf;
  m_wndFrom.GetFont ()->GetLogFont (&lf);

  lf.lfWeight = FW_BOLD;
  m_fontBold.CreateFontIndirect (&lf);

  m_wndFrom.SetFont (&m_fontBold);
  m_btnFlag.SetImage (IDB_FLAG);
  m_btnDelete.SetImage (IDB_DELETE);

  m_btnRL.m_bMultilineText = TRUE;
  m_btnRL.m_bAlwaysUnderlineText = FALSE;
  m_btnRL.m_bDefaultClickProcess = TRUE;

  return TRUE;  // return TRUE unless you set the focus to a control
                // EXCEPTION: OCX Property Pages should return FALSE
}

Member Data Documentation

CMFCDesktopAlertWndButton CMyPopupDlg::m_btnDelete

Definition at line 28 of file MyAlertDlg.h.

CMFCDesktopAlertWndButton CMyPopupDlg::m_btnFlag

Definition at line 27 of file MyAlertDlg.h.

CMFCLinkCtrl CMyPopupDlg::m_btnRL

Definition at line 29 of file MyAlertDlg.h.

CFont CMyPopupDlg::m_fontBold [protected]

Definition at line 46 of file MyAlertDlg.h.

CStatic CMyPopupDlg::m_wndFrom

Definition at line 26 of file MyAlertDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DesktopAlertDemo/MyAlertDlg.h
  • vc2008fp/DesktopAlertDemo/MyAlertDlg.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyPropertyPage1 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CMyPropertyPage1 Class Reference

#include "MyPropertyPage1.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE1 }

Public Member Functions

CMyPropertyPage1 ()
~CMyPropertyPage1 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 6 of file MyPropertyPage1.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 16 of file MyPropertyPage1.h.

{ IDD = IDD_PROPPAGE1 };

Constructor & Destructor Documentation

CMyPropertyPage1::CMyPropertyPage1 ( )

Definition at line 19 of file MyPropertyPage1.cpp.

                                   : CMFCPropertyPage(CMyPropertyPage1::IDD)
{
}

CMyPropertyPage1::~CMyPropertyPage1 ( )

Definition at line 23 of file MyPropertyPage1.cpp.

{
}

Member Function Documentation

void CMyPropertyPage1::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 27 of file MyPropertyPage1.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/PropSheetDemo/MyPropertyPage1.h
  • vc2008fp/PropSheetDemo/MyPropertyPage1.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyPropertyPage2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CMyPropertyPage2 Class Reference

#include "MyPropertyPage1.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE2 }

Public Member Functions

CMyPropertyPage2 ()
~CMyPropertyPage2 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 31 of file MyPropertyPage1.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 41 of file MyPropertyPage1.h.

{ IDD = IDD_PROPPAGE2 };

Constructor & Destructor Documentation

CMyPropertyPage2::CMyPropertyPage2 ( )

Definition at line 40 of file MyPropertyPage1.cpp.

                                   : CMFCPropertyPage(CMyPropertyPage2::IDD)
{
}

CMyPropertyPage2::~CMyPropertyPage2 ( )

Definition at line 44 of file MyPropertyPage1.cpp.

{
}

Member Function Documentation

void CMyPropertyPage2::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 48 of file MyPropertyPage1.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/PropSheetDemo/MyPropertyPage1.h
  • vc2008fp/PropSheetDemo/MyPropertyPage1.cpp
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyPropertyPage3 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CMyPropertyPage3 Class Reference

#include "MyPropertyPage1.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE3 }

Public Member Functions

CMyPropertyPage3 ()
~CMyPropertyPage3 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 56 of file MyPropertyPage1.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 66 of file MyPropertyPage1.h.

{ IDD = IDD_PROPPAGE3 };

Constructor & Destructor Documentation

CMyPropertyPage3::CMyPropertyPage3 ( )

Definition at line 61 of file MyPropertyPage1.cpp.

                                   : CMFCPropertyPage(CMyPropertyPage3::IDD)
{
}

CMyPropertyPage3::~CMyPropertyPage3 ( )

Definition at line 65 of file MyPropertyPage1.cpp.

{
}

Member Function Documentation

void CMyPropertyPage3::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 69 of file MyPropertyPage1.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/PropSheetDemo/MyPropertyPage1.h
  • vc2008fp/PropSheetDemo/MyPropertyPage1.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyPropertyPage4 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CMyPropertyPage4 Class Reference

#include "MyPropertyPage1.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE4 }

Public Member Functions

CMyPropertyPage4 ()
~CMyPropertyPage4 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 81 of file MyPropertyPage1.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 91 of file MyPropertyPage1.h.

{ IDD = IDD_PROPPAGE4 };

Constructor & Destructor Documentation

CMyPropertyPage4::CMyPropertyPage4 ( )

Definition at line 82 of file MyPropertyPage1.cpp.

                                   : CMFCPropertyPage(CMyPropertyPage4::IDD)
{
}

CMyPropertyPage4::~CMyPropertyPage4 ( )

Definition at line 86 of file MyPropertyPage1.cpp.

{
}

Member Function Documentation

void CMyPropertyPage4::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 90 of file MyPropertyPage1.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/PropSheetDemo/MyPropertyPage1.h
  • vc2008fp/PropSheetDemo/MyPropertyPage1.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyPropertySheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMyPropertySheet Class Reference

#include "MyPropertySheet.h"

List of all members.

Public Member Functions

CMyPropertySheet (CMFCPropertySheet::PropSheetLook look, UINT uiIconsResID=0, int cxIcon=0)
virtual | ~CMyPropertySheet ()
virtual void | OnDrawPageHeader (CDC *pDC, int nPage, CRect rectHeader)

Public Attributes

CMyPropertyPage1 m_Page1
CMyPropertyPage2 m_Page2
CMyPropertyPage3 m_Page3
CMyPropertyPage4 m_Page4

Detailed Description

Definition at line 8 of file MyPropertySheet.h.

Constructor & Destructor Documentation

CMyPropertySheet::CMyPropertySheet | ( | CMFCPropertySheet::PropSheetLook | look,
 |  | UINT | uiIconsResID = 0,
 |  | int | cxIcon = 0
 | ) |  |

Definition at line 15 of file MyPropertySheet.cpp.

   : CMFCPropertySheet(IDS_PROPSHT_CAPTION, NULL)
{
  SetLook (look);

  if (uiIconsResID != 0)
  {
    SetIconsList (uiIconsResID, cxIcon);
  }

  if (look == PropSheetLook_Tree)
  {
    CMFCPropertySheetCategoryInfo* pCategory1 = AddTreeCategory (
      _T("Category 1"), 0, 1);
    AddPageToTree (pCategory1, &m_Page1, -1, 2);
    AddPageToTree (pCategory1, &m_Page2, -1, 2);

    CMFCPropertySheetCategoryInfo* pCategory2 = AddTreeCategory (
      _T("Category 2"), 0, 1);

    AddPageToTree (pCategory2, &m_Page3, -1, 2);
    AddPageToTree (pCategory2, &m_Page4, -1, 2);
  }
  else
  {
    AddPage(&m_Page1);
    AddPage(&m_Page2);
    AddPage(&m_Page3);
    AddPage(&m_Page4);
  }
}

CMyPropertySheet::~CMyPropertySheet ( ) [virtual]

Definition at line 48 of file MyPropertySheet.cpp.

{
}

Member Function Documentation

void CMyPropertySheet::OnDrawPageHeader | ( | CDC * | pDC,
 |  | int | nPage,
 |  | CRect | rectHeader |
 | ) |  |  | [virtual]

Definition at line 61 of file MyPropertySheet.cpp.

{
  rectHeader.top += 2;
  rectHeader.right -= 2;
  rectHeader.bottom -= 2;

  pDC->FillRect (rectHeader, &afxGlobalData.brBtnFace);
  pDC->Draw3dRect (rectHeader, afxGlobalData.clrBtnShadow, afxGlobalData.clrBtnShadow);

  CDrawingManager dm (*pDC);
  dm.DrawShadow (rectHeader, 2);

  CString strText;
  strText.Format (_T("Page %d description..."), nPage + 1);

  CRect rectText = rectHeader;
  rectText.DeflateRect (10, 0);

  CFont* pOldFont = pDC->SelectObject (&afxGlobalData.fontBold);
  pDC->SetBkMode (TRANSPARENT);
  pDC->SetTextColor (afxGlobalData.clrBtnText);

  pDC->DrawText (strText, rectText, DT_SINGLELINE | DT_VCENTER);

  pDC->SelectObject (pOldFont);
}

Member Data Documentation

CMyPropertyPage1 CMyPropertySheet::m_Page1

Definition at line 19 of file MyPropertySheet.h.

CMyPropertyPage2 CMyPropertySheet::m_Page2

Definition at line 20 of file MyPropertySheet.h.

CMyPropertyPage3 CMyPropertySheet::m_Page3

Definition at line 21 of file MyPropertySheet.h.

CMyPropertyPage4 CMyPropertySheet::m_Page4

Definition at line 22 of file MyPropertySheet.h.

The documentation for this class was generated from the following files:
  • vc2008fp/PropSheetDemo/MyPropertySheet.h
  • vc2008fp/PropSheetDemo/MyPropertySheet.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyScheduler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMyScheduler Class Reference

#include "MyScheduler.h"

List of all members.

Public Member Functions

CMyScheduler ()
virtual | ~CMyScheduler ()
const CMyScheduler & | operator= (const CMyScheduler &scheduler)
virtual void | Serialize (CArchive &ar)

Public Attributes

int | m_iDay
int | m_iEndHour
int | m_iEndMinutes
int | m_iId
int | m_iMonth
int | m_iStartHour
int | m_iStartMinutes
int | m_iYear
CString | m_szDescription
CString | m_szTitle

Detailed Description

Definition at line 18 of file MyScheduler.h.

Constructor & Destructor Documentation

CMyScheduler::CMyScheduler ( )

Definition at line 27 of file MyScheduler.cpp.

{
  m_iMonth = 0;
  m_iDay = 0;
  m_iYear = 0;
  m_iStartHour = 0;
  m_iEndHour = 0;
  m_iStartMinutes = 0;
  m_iEndMinutes = 0;
  m_szTitle = _T("");
  m_szDescription = _T("");
  m_iId = 0;
}

CMyScheduler::~CMyScheduler ( ) [virtual]

Definition at line 41 of file MyScheduler.cpp.

{
}

Member Function Documentation

const CMyScheduler & CMyScheduler::operator= ( const CMyScheduler & scheduler )

Definition at line 71 of file MyScheduler.cpp.

{
  if (this != &scheduler)
  {
    m_iMonth = scheduler.m_iMonth;
    m_iDay = scheduler.m_iDay;
    m_iYear = scheduler.m_iYear;
    m_iStartHour = scheduler.m_iStartHour;
    m_iEndHour = scheduler.m_iEndHour;
    m_iStartMinutes = scheduler.m_iStartMinutes;
    m_iEndMinutes = scheduler.m_iEndMinutes;
    m_szTitle = scheduler.m_szTitle;
    m_szDescription = scheduler.m_szDescription;
    m_iId = scheduler.m_iId;
  }
  return *this;
}

void CMyScheduler::Serialize ( CArchive & ar ) [virtual]

Definition at line 53 of file MyScheduler.cpp.

{
  CObject::Serialize( ar );

  if ( ar.IsStoring() )
   {
    ar << m_szTitle << m_iMonth << m_iDay << m_iYear << m_iStartHour << m_iStartMinutes << m_iEndHour << m_iEndMinutes << m_szDescription << m_iId;
   }
   else
   {
    ar >> m_szTitle >> m_iMonth >> m_iDay >> m_iYear >> m_iStartHour >> m_iStartMinutes >> m_iEndHour >> m_iEndMinutes >> m_szDescription >> m_iId;
   }
}

Member Data Documentation

int CMyScheduler::m_iDay

Definition at line 27 of file MyScheduler.h.

int CMyScheduler::m_iEndHour

Definition at line 31 of file MyScheduler.h.

int CMyScheduler::m_iEndMinutes

Definition at line 32 of file MyScheduler.h.

int CMyScheduler::m_iId

Definition at line 33 of file MyScheduler.h.

int CMyScheduler::m_iMonth

Definition at line 26 of file MyScheduler.h.

int CMyScheduler::m_iStartHour

Definition at line 29 of file MyScheduler.h.

int CMyScheduler::m_iStartMinutes

Definition at line 30 of file MyScheduler.h.

int CMyScheduler::m_iYear

Definition at line 28 of file MyScheduler.h.

CString CMyScheduler::m_szDescription

Definition at line 35 of file MyScheduler.h.

CString CMyScheduler::m_szTitle

Definition at line 34 of file MyScheduler.h.

The documentation for this class was generated from the following files:
  • internet/Scheduler/MyScheduler.h
  • internet/Scheduler/MyScheduler.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyStruct Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CMyStruct Class Reference

#include "colledoc.h"

List of all members.

Public Member Functions

void | FormatMyStruct (CString &str)

Public Attributes

float | m_float
int | m_int
CString | m_str

Detailed Description

Definition at line 12 of file colledoc.h.

Member Function Documentation

void CMyStruct::FormatMyStruct ( CString & str )

Definition at line 26 of file colledoc.cpp.

{
  str.Format(_T("{%i, %.4f, %s}"), m_int, m_float, (LPCTSTR)m_str);
}

Member Data Documentation

float CMyStruct::m_float

Definition at line 17 of file colledoc.h.

int CMyStruct::m_int

Definition at line 16 of file colledoc.h.

CString CMyStruct::m_str

Definition at line 18 of file colledoc.h.

The documentation for this class was generated from the following files:
  • advanced/collect/colledoc.h
  • advanced/collect/colledoc.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyToolTipCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CMyToolTipCtrl Class Reference

#include "MyToolTipCtrl.h"

List of all members.

Public Member Functions

CMyToolTipCtrl ()
virtual | ~CMyToolTipCtrl ()
virtual CSize | GetIconSize ()
virtual BOOL | OnDrawIcon (CDC *pDC, CRect rectImage)
virtual void | OnDrawSeparator (CDC *pDC, int x1, int x2, int y)
virtual void | OnFillBackground (CDC *pDC, CRect rect, COLORREF &clrText, COLORREF &clrLine)
virtual void | SetDescription (const CString strDesrciption)

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 16 of file MyToolTipCtrl.h.

Constructor & Destructor Documentation

CMyToolTipCtrl::CMyToolTipCtrl ( )

Definition at line 26 of file MyToolTipCtrl.cpp.

{
  m_hIcon = (HICON) ::LoadImage (
      AfxGetResourceHandle (),
      MAKEINTRESOURCE (IDI_ICON1),
      IMAGE_ICON,
      afxGlobalData.m_sizeSmallIcon.cx,
      afxGlobalData.m_sizeSmallIcon.cy,
      LR_SHARED);
}

CMyToolTipCtrl::~CMyToolTipCtrl ( ) [virtual]

Definition at line 37 of file MyToolTipCtrl.cpp.

{
}

Member Function Documentation

CSize CMyToolTipCtrl::GetIconSize ( ) [virtual]

Definition at line 60 of file MyToolTipCtrl.cpp.

{
  if (m_pHotButton == NULL)
  {
    return CSize (0, 0);
  }

  ASSERT_VALID (m_pHotButton);

  if (m_pHotButton->m_nID == 0 ||
    m_pHotButton->m_nID == (UINT)-1)
  {
    return CSize (0, 0);
  }

  return afxGlobalData.m_sizeSmallIcon;
}

int CMyToolTipCtrl::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 49 of file MyToolTipCtrl.cpp.

{
  if (CMFCToolTipCtrl::OnCreate(lpCreateStruct) == -1)
    return -1;

  // Override default parameters:
  m_Params.m_bRoundedCorners = TRUE;

  return 0;
}

BOOL CMyToolTipCtrl::OnDrawIcon | ( | CDC * | pDC,
 |  | CRect | rectImage |
 | ) |  |  | [virtual]

Definition at line 113 of file MyToolTipCtrl.cpp.

{
  if (m_pHotButton == NULL)
  {
    return FALSE;
  }

  ASSERT_VALID (m_pHotButton);

  if (m_pHotButton->m_nID == 0 ||
    m_pHotButton->m_nID == (UINT)-1)
  {
    return FALSE;
  }

  ASSERT_VALID (pDC);

  ::DrawIconEx (pDC->GetSafeHdc (),
    rectImage.left, rectImage.top, m_hIcon,
    0, 0, 0, NULL, DI_NORMAL);

  return TRUE;
}

void CMyToolTipCtrl::OnDrawSeparator | ( | CDC * | pDC,
 |  | int | x1,
 |  | int | x2,
 |  | int | y |
 | ) |  |  | [virtual]

Definition at line 137 of file MyToolTipCtrl.cpp.

{
  ASSERT_VALID (pDC);

  CDrawingManager dm (*pDC);
  CRect rect (x1, y, x2, y + 1);

  dm.FillGradient (rect,
    RGB (255, 201, 109), RGB (255, 247, 225), FALSE);
}

void CMyToolTipCtrl::OnFillBackground | ( | CDC * | pDC,
 |  | CRect | rect,
 |  | COLORREF & | clrText,
 |  | COLORREF & | clrLine |
 | ) |  |  | [virtual]

Definition at line 100 of file MyToolTipCtrl.cpp.

{
  ASSERT_VALID (pDC);

  CDrawingManager dm (*pDC);

  dm.FillGradient2 (rect,
    RGB (104, 165, 225), RGB (37, 92, 222), 45);

  clrLine = RGB (113, 166, 246);
  clrText = RGB (255, 255, 255);
}

void CMyToolTipCtrl::SetDescription ( const CString strDesrciption ) [virtual]

Definition at line 78 of file MyToolTipCtrl.cpp.

{
  CMFCToolTipCtrl::SetDescription (strDesrciption);

  if (m_pHotButton == NULL)
  {
    return;
  }

  ASSERT_VALID (m_pHotButton);

  if (m_pHotButton->m_nID == 0 ||
    m_pHotButton->m_nID == (UINT)-1)
  {
    return;
  }

  m_strDescription.Format (
    _T("This is a custom description text for toolbar/menu button with ID = %d.."),
    m_pHotButton->m_nID);
}

Member Data Documentation

HICON CMyToolTipCtrl::m_hIcon [protected]

Definition at line 47 of file MyToolTipCtrl.h.

The documentation for this class was generated from the following files:
  • vc2008fp/ToolTipDemo/MyToolTipCtrl.h
  • vc2008fp/ToolTipDemo/MyToolTipCtrl.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CMyTreeCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CMyTreeCtrl Class Reference

#include "mtreectl.h"

List of all members.

Public Member Functions

CMyTreeCtrl ()
virtual | ~CMyTreeCtrl ()
BOOL | IsChildNodeOf (HTREEITEM hitemChild, HTREEITEM hitemSuspectedParent)
void | OnButtonUp (void)
void | SetNewStyle (long lStyleMask, BOOL bSetBits)
BOOL | TransferItem (HTREEITEM hitem, HTREEITEM hNewParent)

Public Attributes

BOOL | m_bDragging
HTREEITEM | m_hitemDrag
HTREEITEM | m_hitemDrop
CImageList * | m_pimagelist

Protected Member Functions

afx_msg void | OnBeginDrag (LPNMHDR pnmhdr, LRESULT *pLResult)
void | OnButtonUp (CPoint point)
afx_msg void | OnDestroy ()
afx_msg void | OnEndLabelEdit (LPNMHDR pnmhdr, LRESULT *pLResult)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point)

Detailed Description

Definition at line 19 of file mtreectl.h.

Constructor & Destructor Documentation

CMyTreeCtrl::CMyTreeCtrl ( )

Definition at line 27 of file mtreectl.cpp.

{
  m_bDragging = FALSE;
  m_pimagelist = NULL;
}

CMyTreeCtrl::~CMyTreeCtrl ( ) [virtual]

Definition at line 33 of file mtreectl.cpp.

{
}

Member Function Documentation

BOOL CMyTreeCtrl::IsChildNodeOf | ( | HTREEITEM | hitemChild,
 |  | HTREEITEM | hitemSuspectedParent
 | ) |  |

Definition at line 109 of file mtreectl.cpp.

{
  do
  {
    if (hitemChild == hitemSuspectedParent)
      break;
  }
  while ((hitemChild = GetParentItem(hitemChild)) != NULL);

  return (hitemChild != NULL);
}

void CMyTreeCtrl::OnBeginDrag | ( | LPNMHDR | pnmhdr,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 184 of file mtreectl.cpp.

{
  CPoint      ptAction;
  UINT        nFlags;

  GetCursorPos(&ptAction);
  ScreenToClient(&ptAction);
  ((CTreeCtrlPage *)GetParent())->ShowNotification(pnmhdr, pLResult);
  ASSERT(!m_bDragging);
  m_bDragging = TRUE;
  m_hitemDrag = HitTest(ptAction, &nFlags);
  m_hitemDrop = NULL;

  ASSERT(m_pimagelist == NULL);
  m_pimagelist = CreateDragImage(m_hitemDrag);  // get the image list for dragging
  m_pimagelist->DragShowNolock(TRUE);
  m_pimagelist->SetDragCursorImage(0, CPoint(0, 0));
  m_pimagelist->BeginDrag(0, CPoint(0,0));
  m_pimagelist->DragMove(ptAction);
  m_pimagelist->DragEnter(this, ptAction);
  SetCapture();
}

void CMyTreeCtrl::OnButtonUp ( void )

Definition at line 147 of file mtreectl.cpp.

{
  if (m_bDragging)
  {
    ASSERT(m_pimagelist != NULL);
    m_pimagelist->DragLeave(this);
    m_pimagelist->EndDrag();
    delete m_pimagelist;
    m_pimagelist = NULL;

    if (m_hitemDrag != m_hitemDrop && !IsChildNodeOf(m_hitemDrop, m_hitemDrag) &&
                              GetParentItem(m_hitemDrag) != m_hitemDrop)
    {
      TransferItem(m_hitemDrag, m_hitemDrop);
      DeleteItem(m_hitemDrag);
    }
    else
      MessageBeep(0);

    ReleaseCapture();
    m_bDragging = FALSE;
    SelectDropTarget(NULL);
  }
}

void CMyTreeCtrl::OnButtonUp ( CPoint point ) [protected]
void CMyTreeCtrl::OnDestroy ( ) [protected]

Definition at line 52 of file mtreectl.cpp.

{
  CImageList  *pimagelist;

  pimagelist = GetImageList(TVSIL_NORMAL);
  pimagelist->DeleteImageList();
  delete pimagelist;
}

void CMyTreeCtrl::OnEndLabelEdit | ( | LPNMHDR | pnmhdr,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 74 of file mtreectl.cpp.

{
  TV_DISPINFO     *ptvinfo;

  ((CTreeCtrlPage *)GetParent())->ShowNotification(pnmhdr, pLResult);
  ptvinfo = (TV_DISPINFO *)pnmhdr;
  if (ptvinfo->item.pszText != NULL)
  {
    ptvinfo->item.mask = TVIF_TEXT;
    SetItem(&ptvinfo->item);
  }
  *pLResult = TRUE;
}

void CMyTreeCtrl::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 172 of file mtreectl.cpp.

{
  OnButtonUp();
  CTreeCtrl::OnLButtonUp(nFlags, point);
}

void CMyTreeCtrl::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 88 of file mtreectl.cpp.

{
  HTREEITEM           hitem;
  UINT                flags;

  if (m_bDragging)
  {
    ASSERT(m_pimagelist != NULL);
    m_pimagelist->DragMove(point);
    if ((hitem = HitTest(point, &flags)) != NULL)
    {
      m_pimagelist->DragLeave(this);
      SelectDropTarget(hitem);
      m_hitemDrop = hitem;
      m_pimagelist->DragEnter(this, point);
    }
  }

  CTreeCtrl::OnMouseMove(nFlags, point);
}

void CMyTreeCtrl::OnRButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 178 of file mtreectl.cpp.

{
  OnButtonUp();
  CTreeCtrl::OnRButtonUp(nFlags, point);
}

void CMyTreeCtrl::SetNewStyle | ( | long | lStyleMask,
 |  | BOOL | bSetBits
 | ) |  |

Definition at line 61 of file mtreectl.cpp.

{
  long        lStyleOld;

  lStyleOld = GetWindowLong(m_hWnd, GWL_STYLE);
  lStyleOld &= ~lStyleMask;
  if (bSetBits)
    lStyleOld |= lStyleMask;

  SetWindowLong(m_hWnd, GWL_STYLE, lStyleOld);
  SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
}

BOOL CMyTreeCtrl::TransferItem | ( | HTREEITEM | hitem,
 |  | HTREEITEM | hNewParent
 | ) |  |

Definition at line 122 of file mtreectl.cpp.

{
  TV_INSERTSTRUCT     tvstruct;
  TCHAR               sztBuffer[50];
  HTREEITEM           hNewItem, hFirstChild;

    // avoid an infinite recursion situation
  tvstruct.item.hItem = hitemDrag;
  tvstruct.item.cchTextMax = 49;
  tvstruct.item.pszText = sztBuffer;
  tvstruct.item.mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
  GetItem(&tvstruct.item);  // get information of the dragged element
  tvstruct.hParent = hitemDrop;
  tvstruct.hInsertAfter = TVI_SORT;
  tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
  hNewItem = InsertItem(&tvstruct);

  while ((hFirstChild = GetChildItem(hitemDrag)) != NULL)
  {
    TransferItem(hFirstChild, hNewItem);  // recursively transfer all the items
    DeleteItem(hFirstChild);        // delete the first child and all its children
  }
  return TRUE;
}

Member Data Documentation

BOOL CMyTreeCtrl::m_bDragging

Definition at line 27 of file mtreectl.h.

HTREEITEM CMyTreeCtrl::m_hitemDrag

Definition at line 28 of file mtreectl.h.

HTREEITEM CMyTreeCtrl::m_hitemDrop

Definition at line 29 of file mtreectl.h.

CImageList* CMyTreeCtrl::m_pimagelist

Definition at line 30 of file mtreectl.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/mtreectl.h
  • general/CmnCtrl1/mtreectl.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNetAddressCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Private Attributes

CNetAddressCtrlPage Class Reference

#include "NetAddressCtrlPage.h"

List of all members.

Public Types

enum | { IDD = IDD_NETWORK_ADDRESS_CONTROL }

Public Member Functions

CNetAddressCtrlPage ()
virtual | ~CNetAddressCtrlPage ()
afx_msg void | OnBnClickedButtonValidate ()
afx_msg void | OnEnChangeNetaddress ()
virtual BOOL | OnInitDialog ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Private Attributes

CListBox | m_listbox
CNetAddressCtrl | m_netaddrctrl

Detailed Description

Definition at line 6 of file NetAddressCtrlPage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 15 of file NetAddressCtrlPage.h.

{ IDD = IDD_NETWORK_ADDRESS_CONTROL };

Constructor & Destructor Documentation

CNetAddressCtrlPage::CNetAddressCtrlPage ( )

Definition at line 46 of file NetAddressCtrlPage.cpp.

: CPropertyPage(CNetAddressCtrlPage::IDD)
{
}

CNetAddressCtrlPage::~CNetAddressCtrlPage ( ) [virtual]

Definition at line 51 of file NetAddressCtrlPage.cpp.

{
}

Member Function Documentation

void CNetAddressCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 55 of file NetAddressCtrlPage.cpp.

{
    CPropertyPage::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_NETADDRESS, m_netaddrctrl);
    DDX_Control(pDX, IDC_LIST_NETSTRINGS, m_listbox);
}

void CNetAddressCtrlPage::OnBnClickedButtonValidate ( )

Definition at line 69 of file NetAddressCtrlPage.cpp.

{
    // Get selected Address Types
    int nCount = m_listbox.GetSelCount();
    int *selectedItems = new int[nCount];
    m_listbox.GetSelItems(nCount, selectedItems);

    // Prepare the mask
    DWORD dwAddrMask = 0;
    for (int i = 0; i < nCount; i++)
        dwAddrMask |= netStrings[selectedItems[i]].dwNetString;

    delete[] selectedItems;

    NET_ADDRESS_INFO nfo;
    NC_ADDRESS addr;
    addr.pAddrInfo = &nfo;

    // Validate
    m_netaddrctrl.SetAllowType(dwAddrMask);
    HRESULT hr = m_netaddrctrl.GetAddress(&addr);

    if (hr == S_OK)
        ::MessageBox(m_hWnd, _T("Succeeded!"), _T("Validation"), 0);
    else
        m_netaddrctrl.DisplayErrorTip();
}

void CNetAddressCtrlPage::OnEnChangeNetaddress ( )

Definition at line 111 of file NetAddressCtrlPage.cpp.

{
    CString text;
    int len = m_netaddrctrl.LineLength(0);
    m_netaddrctrl.GetLine(0, text.GetBuffer(len), len);
    text.ReleaseBuffer(len);

    // Display the cue if the input is empty
    if (text.GetLength() == 0)
        m_netaddrctrl.SetCueBanner(szCue, TRUE);
}

BOOL CNetAddressCtrlPage::OnInitDialog ( ) [virtual]

Definition at line 97 of file NetAddressCtrlPage.cpp.

{
    CPropertyPage::OnInitDialog();

    // Display the cue
    m_netaddrctrl.SetCueBanner(szCue, TRUE);

    // Fill in all the NET_STRINGs
    for (int i = 0; i < _countof(netStrings); i++)
        m_listbox.AddString(netStrings[i].lpszDisplay);

    return TRUE;
}

Member Data Documentation

CListBox CNetAddressCtrlPage::m_listbox [private]

Definition at line 29 of file NetAddressCtrlPage.h.

CNetAddressCtrl CNetAddressCtrlPage::m_netaddrctrl [private]

Definition at line 28 of file NetAddressCtrlPage.h.

The documentation for this class was generated from the following files:
  • controls/cmnctrl/NetAddressCtrlPage.h
  • controls/cmnctrl/NetAddressCtrlPage.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNetAddrVerifierApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CNetAddrVerifierApp Class Reference

#include "NetAddrVerifier.h"

List of all members.

Public Member Functions

CNetAddrVerifierApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnVerifyIPv4 ()

Detailed Description

Definition at line 17 of file NetAddrVerifier.h.

Constructor & Destructor Documentation

CNetAddrVerifierApp::CNetAddrVerifierApp ( )

Definition at line 22 of file NetAddrVerifier.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CNetAddrVerifierApp::InitInstance ( ) [virtual]

Definition at line 36 of file NetAddrVerifier.cpp.

{
  // InitCommonControlsEx() is required on Windows XP if an application
  // manifest specifies use of ComCtl32.dll version 6 or later to enable
  // visual styles.  Otherwise, any window creation will fail.
  INITCOMMONCONTROLSEX InitCtrls;
  InitCtrls.dwSize = sizeof(InitCtrls);
  // Set this to include all the common control classes you want to use
  // in your application.
  InitCtrls.dwICC = ICC_WIN95_CLASSES;
  InitCommonControlsEx(&InitCtrls);

  CWinApp::InitInstance();

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  CNetAddrVerifierDlg dlg;
  m_pMainWnd = &dlg;
  INT_PTR nResponse = dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

afx_msg void CNetAddrVerifierApp::OnVerifyIPv4 ( )
The documentation for this class was generated from the following files:
  • controls/netaddr/NetAddrVerifier.h
  • controls/netaddr/NetAddrVerifier.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNetAddrVerifierDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CNetAddrVerifierDlg Class Reference

#include "NetAddrVerifierDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_NETADDRVERIFIER_DIALOG }
enum AddressKind {
NoKind, AllKinds, IPv4, IPv6,
Named
}

Public Member Functions

CNetAddrVerifierDlg (CWnd *pParent=NULL)
~CNetAddrVerifierDlg ()
DWORD | ConstructAddrMask (AddressKind kind)
void | Enum ()
std::wstring | Ipv4AddrToString (IN_ADDR &addr)
std::wstring | Ipv6AddrToString (IN6_ADDR &addr)
afx_msg void | OnBnClickedButton1 ()
afx_msg void | OnVerifyAll ()
afx_msg void | OnVerifyIPv4 ()
afx_msg void | OnVerifyIPv6 ()
afx_msg void | OnVerifyNamed ()
AddressKind Revalidate ()
BOOL | Verify (AddressKind kind)

Public Attributes

BOOL | m_fVista
CListCtrl | m_listCtrl
CButton * | m_pButton
CEdit * | m_pEdit
CNetAddressCtrl * | m_pNetAddr
CSplitButton * | m_pValidateBtn
CString | m_strParsedAddr

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 10 of file NetAddrVerifierDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 33 of file NetAddrVerifierDlg.h.

{ IDD = IDD_NETADDRVERIFIER_DIALOG };

enum CNetAddrVerifierDlg::AddressKind
Enumerator:
NoKind
AllKinds
IPv4
IPv6
Named

Definition at line 17 of file NetAddrVerifierDlg.h.

  {
    NoKind,
    AllKinds,
    IPv4,
    IPv6,
    Named
  };

Constructor & Destructor Documentation

CNetAddrVerifierDlg::CNetAddrVerifierDlg ( CWnd * pParent = NULL )

Definition at line 16 of file NetAddrVerifierDlg.cpp.

  : CDialog(CNetAddrVerifierDlg::IDD, pParent),
  m_pValidateBtn(NULL), m_pNetAddr(NULL), m_pEdit(NULL), m_pButton(NULL)
{
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  OSVERSIONINFO vi;
  ZeroMemory(&vi, sizeof(OSVERSIONINFO));
  vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  ::GetVersionEx(&vi);

  // check if we are running under Vista
  if (vi.dwMajorVersion >= 6)
  {
    m_fVista = TRUE;
  }
  else
  {
    m_fVista = FALSE;
  }
}

CNetAddrVerifierDlg::~CNetAddrVerifierDlg ( )

Definition at line 37 of file NetAddrVerifierDlg.cpp.

{
  delete m_pNetAddr;
  delete m_pValidateBtn;
  delete m_pEdit;
  delete m_pButton;
}

Member Function Documentation

DWORD CNetAddrVerifierDlg::ConstructAddrMask ( AddressKind kind )

Definition at line 157 of file NetAddrVerifierDlg.cpp.

{
  DWORD dwAddrMask = 0;
  switch(kind) {
    case AllKinds:
      dwAddrMask |= NET_STRING_ANY_ADDRESS;
      dwAddrMask |= NET_STRING_ANY_SERVICE;
      dwAddrMask |= NET_STRING_IP_NETWORK;
      break;

    case IPv4:
      dwAddrMask |= NET_STRING_IPV4_ADDRESS;
      dwAddrMask |= NET_STRING_IPV4_SERVICE;
      dwAddrMask |= NET_STRING_IPV4_NETWORK;
      break;

    case IPv6:
      dwAddrMask |= NET_STRING_IPV6_ADDRESS;
      dwAddrMask |= NET_STRING_IPV6_SERVICE;
      dwAddrMask |= NET_STRING_IPV6_NETWORK;
      break;

    case Named:
      dwAddrMask |= NET_STRING_NAMED_ADDRESS;
      dwAddrMask |= NET_STRING_NAMED_SERVICE;
      break;
  }
  return dwAddrMask;
}

void CNetAddrVerifierDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 45 of file NetAddrVerifierDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_LIST1, m_listCtrl);
}

void CNetAddrVerifierDlg::Enum ( )

Definition at line 279 of file NetAddrVerifierDlg.cpp.

{
  m_listCtrl.DeleteAllItems();
  PSHARE_INFO_0 BufPtr, p;
  NET_API_STATUS res;
  DWORD er=0, tr=0, resume=0, i;
  do // begin do
  {
    res = NetShareEnum(m_strParsedAddr.GetBuffer(), 0, (LPBYTE *) &BufPtr, -1, &er, &tr, &resume);
    // If the call succeeds,
    if(res == ERROR_SUCCESS || res == ERROR_MORE_DATA)
    {
      p = BufPtr;
      // Loop through the entries;
      //  print retrieved data.
      for(i=1;i<=er;i++)
      {
        CString str(p->shi0_netname);
        m_listCtrl.InsertItem(0, str);
        p++;
      }
      // Free the allocated buffer.
      NetApiBufferFree(BufPtr);
    }
    else
    {
      AfxMessageBox(_T("Cannot connect to server"), MB_OK | MB_ICONEXCLAMATION);
    }
  }
  while (res==ERROR_MORE_DATA);// Continue to call NetShareEnum while there are more entries
}

std::wstring CNetAddrVerifierDlg::Ipv4AddrToString ( IN_ADDR & addr )

Definition at line 187 of file NetAddrVerifierDlg.cpp.

{
  std::wstringstream msg;
  msg <<  addr.S_un.S_un_b.s_b1 << "." <<
      addr.S_un.S_un_b.s_b2 << "." <<
      addr.S_un.S_un_b.s_b3 << "." <<
      addr.S_un.S_un_b.s_b4;
  return msg.str();
}

std::wstring CNetAddrVerifierDlg::Ipv6AddrToString ( IN6_ADDR & addr )

Definition at line 197 of file NetAddrVerifierDlg.cpp.

{
  // need to print out the address by bytes (in hex) for the correct order
  std::wstringstream msg;
  msg.flags(std::ios::hex);
  msg.fill('0');
  msg << std::setw(2) << addr.u.Byte[0];
  msg << std::setw(2) << addr.u.Byte[1];
  for (int i = 1; i < 8; i++)
  {
    msg << "::" << std::setw(2) << addr.u.Byte[i * 2];
    msg << std::setw(2) << addr.u.Byte[i * 2 + 1];
  }
  return msg.str();
}

void CNetAddrVerifierDlg::OnBnClickedButton1 ( )

Definition at line 319 of file NetAddrVerifierDlg.cpp.

{
  // Enum Share
  if (Verify(AllKinds) == TRUE)
    Enum();
}

BOOL CNetAddrVerifierDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 67 of file NetAddrVerifierDlg.cpp.

{
  CDialog::OnInitDialog();

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // Create controls dynamically according to OS version
  DWORD dwStyle = WS_TABSTOP | WS_VISIBLE;
  DWORD dwExStyle = WS_EX_CLIENTEDGE;
  if (m_fVista)
  {
    // If we are running under Vista, create a CNetAddressCtrl and CSplitButton control
    m_pNetAddr = new CNetAddressCtrl();
    m_pValidateBtn = new CSplitButton();
    DWORD dwStyle = WS_TABSTOP | WS_VISIBLE;
    DWORD dwExStyle = WS_EX_CLIENTEDGE;
    BOOL nRet = m_pNetAddr->CreateEx(dwExStyle,
      dwStyle | WS_BORDER,
      CRect(10,10,250,40),
      this,
      IDC_ADDRESS);
    m_pNetAddr->SetFont(GetFont());
    m_pNetAddr->SetCueBanner(_T("Input address then validate"));
    nRet = m_pValidateBtn->Create(_T("Validate"),
      dwStyle,
      CRect(10, 50, 160, 90),
      this,
      IDC_VERIFY_BUTTON);
    // Attach submenu to CSplitButton
    m_pValidateBtn->SetDropDownMenu(IDR_MENU1, 0);
    m_pValidateBtn->SetFont(GetFont());
  }
  else
  {
    // If we are running under XP, create a CEdit and CButton control
    m_pEdit = new CEdit();
    m_pEdit->Create(dwStyle | WS_BORDER,
      CRect(10, 10, 250, 40),
      this,
      IDC_ADDRESS);
    m_pEdit->SetFont(GetFont());
    m_pEdit->SetCueBanner(_T("Input address then validate"));
    m_pButton = new CButton();
    m_pButton->Create(_T("Validate"),
      dwStyle | BS_TEXT | BS_PUSHBUTTON,
      CRect(10, 50, 160, 90),
      this,
      IDC_VERIFY_BUTTON);
    m_pButton->SetFont(GetFont());
  }
  // Initialize the list control
  CRect rect;
  m_listCtrl.GetClientRect(rect);
  m_listCtrl.InsertColumn(0, _T("Shares"), 0, rect.Width());

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CNetAddrVerifierDlg::OnPaint ( ) [protected]

Definition at line 132 of file NetAddrVerifierDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CNetAddrVerifierDlg::OnQueryDragIcon ( ) [protected]

Definition at line 313 of file NetAddrVerifierDlg.cpp.

{
  return static_cast<HCURSOR>(m_hIcon);
}

void CNetAddrVerifierDlg::OnVerifyAll ( )

Definition at line 326 of file NetAddrVerifierDlg.cpp.

{
  Verify(AllKinds);
}

void CNetAddrVerifierDlg::OnVerifyIPv4 ( )

Definition at line 331 of file NetAddrVerifierDlg.cpp.

{
  // Verify IPv4 Address
  Verify(IPv4);
}

void CNetAddrVerifierDlg::OnVerifyIPv6 ( )

Definition at line 337 of file NetAddrVerifierDlg.cpp.

{
  // Verify IPv6 Address
  Verify(IPv6);
}

void CNetAddrVerifierDlg::OnVerifyNamed ( )

Definition at line 343 of file NetAddrVerifierDlg.cpp.

{
  // Verify DNS Address
  Verify(Named);
}

AddressKind CNetAddrVerifierDlg::Revalidate ( )
BOOL CNetAddrVerifierDlg::Verify ( AddressKind kind )

Definition at line 213 of file NetAddrVerifierDlg.cpp.

{
  // Update member variables with dialog data
  UpdateData(TRUE);
  if (m_fVista == TRUE)
  {
    // Create the structs necessary to store the address
    NET_ADDRESS_INFO nfo;
    NC_ADDRESS addr;
    addr.pAddrInfo = &nfo;

    // Construct and set the proper mask from the user's settings
    m_pNetAddr->SetAllowType(ConstructAddrMask(kind));

    // Verify the address entered in the form
    HRESULT res = m_pNetAddr->GetAddress(&addr);

    // If the verification failed, show the error tooltip
    if (res != S_OK)
    {
      m_strParsedAddr = "";
      m_pNetAddr->DisplayErrorTip();
    }
    else
    {
      std::wstringstream msg;
      switch(addr.pAddrInfo->Format)
      {
        case NET_ADDRESS_DNS_NAME:
          msg << addr.pAddrInfo->NamedAddress.Address;
          break;
        case NET_ADDRESS_IPV4:
          msg << Ipv4AddrToString(
            addr.pAddrInfo->Ipv4Address.sin_addr);
          break;
        case NET_ADDRESS_IPV6:
          msg << Ipv6AddrToString(
            addr.pAddrInfo->Ipv6Address.sin6_addr);
          break;
      }
      m_strParsedAddr = msg.str().c_str();
      m_pNetAddr->ShowBalloonTip(_T("Verification succeeded!"), m_strParsedAddr);
      return TRUE;
    }
  }
  else // Running on XP
  {
    CString str;
    // Get string from EDIT contrl
    GetDlgItemTextW(IDC_ADDRESS, str.GetBufferSetLength(256), 256);
    str.ReleaseBuffer();
    if (!str.IsEmpty()) // Validate Address
    {
      this->m_strParsedAddr = str;
      m_pEdit->ShowBalloonTip(_T("Verification succeeded!"), m_strParsedAddr);
      return TRUE;
    }
    else
    {
      // Show a similar balloon tip as NetAddressControl
      m_pEdit->ShowBalloonTip(_T(""), _T("The network address entered is invalid"));
    }
  }
  return FALSE;
}

Member Data Documentation

BOOL CNetAddrVerifierDlg::m_fVista

Definition at line 49 of file NetAddrVerifierDlg.h.

HICON CNetAddrVerifierDlg::m_hIcon [protected]

Definition at line 41 of file NetAddrVerifierDlg.h.

CListCtrl CNetAddrVerifierDlg::m_listCtrl

Definition at line 59 of file NetAddrVerifierDlg.h.

CButton* CNetAddrVerifierDlg::m_pButton

Definition at line 67 of file NetAddrVerifierDlg.h.

CEdit* CNetAddrVerifierDlg::m_pEdit

Definition at line 66 of file NetAddrVerifierDlg.h.

CNetAddressCtrl* CNetAddrVerifierDlg::m_pNetAddr

Definition at line 62 of file NetAddrVerifierDlg.h.

CSplitButton* CNetAddrVerifierDlg::m_pValidateBtn

Definition at line 63 of file NetAddrVerifierDlg.h.

CString CNetAddrVerifierDlg::m_strParsedAddr

Definition at line 50 of file NetAddrVerifierDlg.h.

The documentation for this class was generated from the following files:
  • controls/netaddr/NetAddrVerifierDlg.h
  • controls/netaddr/NetAddrVerifierDlg.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNewAmbientPropertyDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CNewAmbientPropertyDlg Class Reference

#include "NewAPDg.H"

List of all members.

Public Types

enum | { IDD = IDD_NEWAMBIENTPROPERTY }

Public Member Functions

CNewAmbientPropertyDlg (CWnd *pParent=NULL)

Public Attributes

int | m_dispid
CEdit | m_editName
CString | m_strName

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 22 of file NewAPDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file NewAPDg.H.

{ IDD = IDD_NEWAMBIENTPROPERTY };

Constructor & Destructor Documentation

CNewAmbientPropertyDlg::CNewAmbientPropertyDlg ( CWnd * pParent = NULL )

Definition at line 24 of file NewAPDg.Cpp.

                                                              :
   CDialog( CNewAmbientPropertyDlg::IDD, pParent )
{
  //{{AFX_DATA_INIT(CNewAmbientPropertyDlg)
  m_dispid = 0;
  m_strName = _T("");
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CNewAmbientPropertyDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file NewAPDg.Cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CNewAmbientPropertyDlg)
  DDX_Control(pDX, IDC_PROPNAME_NEW, m_editName);
  DDX_Text(pDX, IDC_DISPID_NEW, m_dispid);
  DDX_Text(pDX, IDC_PROPNAME_NEW, m_strName);
  //}}AFX_DATA_MAP
}

void CNewAmbientPropertyDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 81 of file NewAPDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CNewAmbientPropertyDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 73 of file NewAPDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CNewAmbientPropertyDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 55 of file NewAPDg.Cpp.

{
  CDialog::OnInitDialog();

   m_editName.SetFocus();
   m_editName.SetSel( 0, -1 );

  return( FALSE );
}

Member Data Documentation

int CNewAmbientPropertyDlg::m_dispid

Definition at line 32 of file NewAPDg.H.

CEdit CNewAmbientPropertyDlg::m_editName

Definition at line 31 of file NewAPDg.H.

CString CNewAmbientPropertyDlg::m_strName

Definition at line 33 of file NewAPDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/NewAPDg.H
  • ole/TstCon/NewAPDg.Cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNewControlsApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CNewControlsApp Class Reference

#include "NewControls.h"

List of all members.

Public Member Functions

CNewControlsApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 23 of file NewControls.h.

Constructor & Destructor Documentation

CNewControlsApp::CNewControlsApp ( )

Definition at line 50 of file NewControls.cpp.

{
}

Member Function Documentation

BOOL CNewControlsApp::InitInstance ( ) [virtual]

Definition at line 62 of file NewControls.cpp.

{
  AfxEnableControlContainer();
  AfxOleInit();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
  SetRegistryBase(_T("Settings"));

  InitCommonControls();
  InitContextMenuManager();
  InitShellManager();

  CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
  CMFCButton::EnableWindowsTheming();

  NewControlsPropSheet *pPropSheet = new NewControlsPropSheet;
  m_pMainWnd = pPropSheet;
  pPropSheet->DoModal();

  delete pPropSheet;

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/NewControls.h
  • vc2008fp/NewControls/NewControls.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNextWizardDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CNextWizardDialog Class Reference

#include "CTaskDialogDemoDlg.h"

List of all members.

Public Member Functions

CNextWizardDialog ()
void | SetDialog (CTaskDialog *next, CTaskDialog *prev)

Protected Member Functions

HRESULT | OnCommandControlClick (int iButtonId)

Private Attributes

CTaskDialog * | m_next
CTaskDialog * | m_prev

Detailed Description

Definition at line 97 of file CTaskDialogDemoDlg.h.

Constructor & Destructor Documentation

CNextWizardDialog::CNextWizardDialog ( ) [inline]

Definition at line 103 of file CTaskDialogDemoDlg.h.

                        : CTaskDialog(_T("Just in the middle"),
      _T("Where am I?"), _T("Second window!"), TDCBF_YES_BUTTON | TDCBF_NO_BUTTON,
      TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_ALLOW_DIALOG_CANCELLATION)
    {
      SetMainIcon(TD_INFORMATION_ICON);
      AddCommandControl(101 ,_T("Is there something more?\nIt's a mistery."));
    }

Member Function Documentation

HRESULT CNextWizardDialog::OnCommandControlClick ( int iButtonId ) [inline, protected]

Definition at line 113 of file CTaskDialogDemoDlg.h.

                                                 {
      if (iButtonId == 100) {
        NavigateTo(*m_prev);
        return S_FALSE;
      }
      else if (iButtonId == 101) {
        NavigateTo(*m_next);
        return S_FALSE;
      }

      return S_OK;
    }

void CNextWizardDialog::SetDialog | ( | CTaskDialog * | next,
 |  | CTaskDialog * | prev |
 | ) |  |  | [inline]

Definition at line 111 of file CTaskDialogDemoDlg.h.

{ m_next = next; m_prev = prev; }

Member Data Documentation

CTaskDialog* CNextWizardDialog::m_next [private]

Definition at line 100 of file CTaskDialogDemoDlg.h.

CTaskDialog* CNextWizardDialog::m_prev [private]

Definition at line 101 of file CTaskDialogDemoDlg.h.

The documentation for this class was generated from the following file:
  • general/CTaskDialog/CTaskDialogDemoDlg.h
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNotepadApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CNotepadApp Class Reference

#include "np.h"

List of all members.

Public Member Functions

CNotepadApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual BOOL | OnIdle (LONG lCount)

Detailed Description

Definition at line 30 of file np.h.

Constructor & Destructor Documentation

CNotepadApp::CNotepadApp ( )

Definition at line 43 of file np.cpp.

{
}

Member Function Documentation

BOOL CNotepadApp::InitInstance ( ) [virtual]

Definition at line 55 of file np.cpp.

{
  _tsetlocale(LC_ALL, _T(""));

  // Standard initialization

  LoadStdProfileSettings(8);  // Load standard INI file options (including MRU)

  // Register document templates

  CSingleDocTemplate* pDocTemplate;
  pDocTemplate = new CSingleDocTemplate(
    IDR_MAINFRAME,
    RUNTIME_CLASS(CNotepadDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CNotepadView));
  AddDocTemplate(pDocTemplate);

  // open file specified on command line
  if (m_lpCmdLine[0] == 0)
    OnFileNew();
  else
    OpenDocumentFile(m_lpCmdLine);

  return TRUE;
}

void CNotepadApp::OnAppAbout ( )

Definition at line 124 of file np.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

BOOL CNotepadApp::OnIdle ( LONG lCount ) [virtual]

Definition at line 133 of file np.cpp.

{
  CMainFrame* pFrame = (CMainFrame*) AfxGetMainWnd();
  CStatusBar* pStatusBar = (CStatusBar*) pFrame->GetDescendantWindow(AFX_IDW_STATUS_BAR);

  if(pStatusBar)
  {
    CEdit &edit = ((CEditView*)pFrame->GetActiveView())->GetEditCtrl();
    CString s1;
    UINT i = edit.LineFromChar();
    s1.Format(_T("Ln %u"), ++i);
    pStatusBar->SetPaneText(pStatusBar->CommandToIndex(ID_INDICATOR_LINE), s1);
  }

  return CWinApp::OnIdle(lCount);
}

The documentation for this class was generated from the following files:
  • general/npp/np.h
  • general/npp/np.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNotepadDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CNotepadDoc Class Reference

#include "npdoc.h"

List of all members.

Public Member Functions

virtual | ~CNotepadDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CNotepadDoc ()

Detailed Description

Definition at line 13 of file npdoc.h.

Constructor & Destructor Documentation

CNotepadDoc::CNotepadDoc ( ) [protected]

Definition at line 38 of file npdoc.cpp.

{
}

CNotepadDoc::~CNotepadDoc ( ) [virtual]

Definition at line 42 of file npdoc.cpp.

{
}

Member Function Documentation

BOOL CNotepadDoc::OnNewDocument ( ) [virtual]

Definition at line 46 of file npdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  ((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);

  return TRUE;
}

void CNotepadDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file npdoc.cpp.

{
  ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
}

The documentation for this class was generated from the following files:
  • general/npp/npdoc.h
  • general/npp/npdoc.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNotepadView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CNotepadView Class Reference

#include "npview.h"

List of all members.

Public Member Functions

virtual | ~CNotepadView ()
virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
CNotepadDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
void | OnViewFindNext (CString &s1)

Public Attributes

CFindDlg * m_pFindDialog
CGotoDlg * m_pGotoDialog
CHistoryList m_searchHistory

Protected Member Functions

CNotepadView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnEditCopy ()
afx_msg void | OnEditFind ()
afx_msg void | OnEditGoto ()
afx_msg void | OnEditPaste ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnUpdateEditFind (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditGoto (CCmdUI *pCmdUI)
afx_msg void | OnViewFindNext ()

Detailed Description

Definition at line 18 of file npview.h.

Constructor & Destructor Documentation

CNotepadView::CNotepadView ( ) [protected]

Definition at line 52 of file npview.cpp.

{
  m_pFindDialog = new CFindDlg;
  m_pGotoDialog = new CGotoDlg;
}

CNotepadView::~CNotepadView ( ) [virtual]

Definition at line 58 of file npview.cpp.

{
  delete  m_pGotoDialog;
  delete  m_pFindDialog;
}

Member Function Documentation

BOOL CNotepadView::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]

Definition at line 206 of file npview.cpp.

{
  // change the view's font to SYSTEM_FIXED_FONT
  CFont *font = CFont::FromHandle((HFONT)::GetStockObject(SYSTEM_FIXED_FONT));
  BOOL bResult = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
  SetFont(font);

  return bResult;
}

CNotepadDoc * CNotepadView::GetDocument ( ) [inline]

Definition at line 79 of file npview.h.

   { return (CNotepadDoc*)m_pDocument; }

void CNotepadView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 82 of file npview.cpp.

{
  CEditView::OnBeginPrinting(pDC, pInfo);
}

void CNotepadView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 67 of file npview.cpp.

{
  CNotepadDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
}

void CNotepadView::OnEditCopy ( ) [protected]

Definition at line 238 of file npview.cpp.

{
  CWnd* pComboWnd;
  CWnd* pFocusWnd;
  CComboBox& comboBox = ((CMainFrame*)AfxGetMainWnd())->m_wndToolBar.m_toolBarCombo;

  // Note: this is the handler for the accelerator (CTRL+C).  Since the accelerator goes to the
  // frame, find who has the focus to determine where to copy from.

  pFocusWnd = GetFocus();
  pComboWnd = comboBox.GetDlgItem(1001);

  ENSURE(pFocusWnd);
  ENSURE(pComboWnd);

  // if the focus is in the combobox edit control, do the copy from the control
  if(pFocusWnd->m_hWnd == pComboWnd->m_hWnd)
    comboBox.Copy();
  else
    GetEditCtrl().Copy();
}

void CNotepadView::OnEditFind ( ) [protected]

Definition at line 157 of file npview.cpp.

{
  CString s1, s2;
  CComboBox& comboBox = ((CMainFrame*)AfxGetMainWnd())->m_wndToolBar.m_toolBarCombo;

  // add user selected text from CEditView to the buffer
  GetSelectedText(s1);
  s2 = m_pFindDialog->m_szText; // save old string if user cancels

  if(s1.GetLength())
    m_pFindDialog->m_szText = s1;

  if(m_pFindDialog->DoModal() != IDOK)
  {
    m_pFindDialog->m_szText = s2; // restore old string.  user selected cancel
    return;
  }

  ASSERT(m_pFindDialog->m_szText.GetLength());

  // add it to the combo control on the toolbar
  comboBox.SetWindowText(m_pFindDialog->m_szText);
  m_searchHistory.AddString(m_pFindDialog->m_szText);

  if(m_pFindDialog->m_szText.GetLength())
    OnFindNext(m_pFindDialog->m_szText, m_pFindDialog->m_nDirection, m_pFindDialog->m_bMatchCase);
}

void CNotepadView::OnEditGoto ( ) [protected]

Definition at line 117 of file npview.cpp.

{
  if(m_pGotoDialog->DoModal() != IDOK)
    return;

  if(m_pGotoDialog->m_nLineNum < 1)
  {
    CString s1;
    s1.LoadString(NPERROR_INVALID_LINENUM);
    AfxMessageBox(s1);
    return;
  }

  CEdit &edit = GetEditCtrl();
  int i = edit.LineFromChar();            // this is the current line the cursor is on
  int nLine = m_pGotoDialog->m_nLineNum;  // line number to go to

  if(nLine > (edit.GetLineCount()))
  {
    CString s1;

    s1.LoadString(NPERROR_NUM_TOO_BIG);
    AfxMessageBox(s1);
    return;
  }

  // move window and caret
  --nLine;                    // edit control is zero based
  edit.LineScroll(nLine-i);   // new line number - the current line

  int idx;
  idx = edit.LineIndex(nLine);
  edit.SetSel(idx, idx);
}

void CNotepadView::OnEditPaste ( ) [protected]

Definition at line 216 of file npview.cpp.

{
  CWnd* pComboWnd;
  CWnd* pFocusWnd;
  CComboBox& comboBox = ((CMainFrame*)AfxGetMainWnd())->m_wndToolBar.m_toolBarCombo;

  // Note: this is the handler for the accelerator (CTRL+V).  Since the accelerator goes to the
  // frame, find who has the focus to determine where to paste to.

  pFocusWnd = GetFocus();
  pComboWnd = comboBox.GetDlgItem(1001);

  ENSURE(pFocusWnd);
  ENSURE(pComboWnd);

  // if the focus is in the combobox edit control, do the paste in the control
  if(pFocusWnd->m_hWnd == pComboWnd->m_hWnd)
    comboBox.Paste();
  else
    GetEditCtrl().Paste();
}

void CNotepadView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 87 of file npview.cpp.

{
  CEditView::OnEndPrinting(pDC, pInfo);
}

BOOL CNotepadView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 76 of file npview.cpp.

{
  // default CEditView preparation
  return CEditView::OnPreparePrinting(pInfo);
}

void CNotepadView::OnUpdateEditFind ( CCmdUI * pCmdUI ) [protected]

Definition at line 185 of file npview.cpp.

{
  pCmdUI->Enable(GetWindowTextLength());
}

void CNotepadView::OnUpdateEditGoto ( CCmdUI * pCmdUI ) [protected]

Definition at line 152 of file npview.cpp.

{
  pCmdUI->Enable(GetWindowTextLength());
}

void CNotepadView::OnViewFindNext ( ) [protected]

Definition at line 195 of file npview.cpp.

{
  CString s1;

  // if the user presses F3, see if there is a search pattern. if not, ask for one
  if (m_pFindDialog->m_szText.GetLength())
    OnFindNext(m_pFindDialog->m_szText, m_pFindDialog->m_nDirection, m_pFindDialog->m_bMatchCase);
  else
    PostMessage(WM_COMMAND, ID_EDIT_FIND);
}

void CNotepadView::OnViewFindNext ( CString & s1 )

Definition at line 190 of file npview.cpp.

{
  OnFindNext(s1, m_pFindDialog->m_nDirection, m_pFindDialog->m_bMatchCase);
}

Member Data Documentation

CFindDlg* CNotepadView::m_pFindDialog

Definition at line 45 of file npview.h.

CGotoDlg* CNotepadView::m_pGotoDialog

Definition at line 46 of file npview.h.

CHistoryList CNotepadView::m_searchHistory

Definition at line 47 of file npview.h.

The documentation for this class was generated from the following files:
  • general/npp/npview.h
  • general/npp/npview.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNotifyShowCase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes

CNotifyShowCase Class Reference

#include "notifwdw.h"

List of all members.

Public Member Functions

CNotifyShowCase ()
CNotifyShowCase ()
virtual | ~CNotifyShowCase ()
virtual | ~CNotifyShowCase ()
void | AddLine (LPCTSTR lpsz)
void | AddLine (LPCTSTR lpsz)
void | SetBufferSize (int nLines)
void | SetBufferSize (int nLines)
void | ShowNotification (UINT nCode)
void | ShowNotification (UINT nCode)

Public Attributes

int | m_totalLines

Static Public Attributes

static notifDescrip | m_rgNotifDescrip [NOTIFCOUNT]

Detailed Description

Definition at line 28 of file notifwdw.h.

Constructor & Destructor Documentation

CNotifyShowCase::CNotifyShowCase ( )

Definition at line 26 of file notifwdw.cpp.

{
  m_totalLines = 200;  // use this default
}

CNotifyShowCase::~CNotifyShowCase ( ) [virtual]

Definition at line 31 of file notifwdw.cpp.

{
}

CNotifyShowCase::CNotifyShowCase ( )
virtual CNotifyShowCase::~CNotifyShowCase ( ) [virtual]

Member Function Documentation

void CNotifyShowCase::AddLine ( LPCTSTR lpsz )

Definition at line 73 of file notifwdw.cpp.

{
  TCHAR   szt[50];
  int     nLastChar;
  int     cLines;

  if (GetLineCount() >= m_totalLines)
  {
    SetSel(0, LineLength(0), TRUE/*bNoScroll*/);  // select the first line
    Clear();  // and remove it
  }

  nLastChar = LineIndex((cLines = GetLineCount() - 1)) + LineLength(cLines);
  _stprintf_s(szt, 50, _T("%s\x0D\x0A"), lpsz);
  SetSel(nLastChar, nLastChar, TRUE/*bNoScroll*/);
  ReplaceSel(szt);
}

void CNotifyShowCase::AddLine ( LPCTSTR lpsz )
void CNotifyShowCase::SetBufferSize ( int nLines ) [inline]

Definition at line 50 of file notifwdw.h.

{ m_totalLines = nLines;};

void CNotifyShowCase::SetBufferSize ( int nLines ) [inline]

Definition at line 50 of file notifwdw.h.

{ m_totalLines = nLines;};

void CNotifyShowCase::ShowNotification ( UINT nCode )

Definition at line 91 of file notifwdw.cpp.

{
  int i;

  for (i = 0; i < NOTIFCOUNT; i++)    // linear search for few items is OK
    if (m_rgNotifDescrip[i].nCode == nCode)
      break;

  if (i == NOTIFCOUNT)
  {
    TCHAR szt[30];

    _stprintf_s(szt, 30, _T("UNKNOWN CODE (%d)"), nCode);
    AddLine(szt);
  }
  else
    AddLine(m_rgNotifDescrip[i]. sztCodeName);
}

void CNotifyShowCase::ShowNotification ( UINT nCode )

Member Data Documentation

static notifDescrip CNotifyShowCase::m_rgNotifDescrip [static]
Initial value:
{

  {LVN_ITEMCHANGING, _T("LVN_ITEMCHANGING")},
  {LVN_ITEMCHANGED, _T("LVN_ITEMCHANGED")},
  {LVN_INSERTITEM, _T("LVN_INSERTITEM")},
  {LVN_DELETEITEM, _T("LVN_DELETEITEM")},
  {LVN_DELETEALLITEMS, _T("LVN_DELETEALLITEMS")},
  {LVN_BEGINLABELEDIT, _T("LVN_BEGINLABELEDIT")},
  {LVN_ENDLABELEDIT, _T("LVN_ENDLABELEDIT")},
  {LVN_BEGINDRAG, _T("LVN_BEGINDRAG")},
  {LVN_BEGINRDRAG, _T("LVN_BEGINRDRAG")},
  {LVN_COLUMNCLICK, _T("LVN_COLUMNCLICK")},
  {LVN_GETDISPINFO, _T("LVN_GETDISPINFO")},
  {LVN_SETDISPINFO, _T("LVN_SETDISPINFO")},

  {TVN_ITEMEXPANDING, _T("TVN_ITEMEXPANDING")},
  {TVN_BEGINLABELEDIT, _T("TVN_BEGINLABELEDIT")},
  {TVN_ENDLABELEDIT, _T("TVN_ENDLABELEDIT")},
  {TVN_SELCHANGING, _T("TVN_SELCHANGING")},
  {TVN_SELCHANGED, _T("TVN_SELCHANGED")},
  {TVN_GETDISPINFO, _T("TVN_GETDISPINFO")},
  {TVN_SETDISPINFO, _T("TVN_SETDISPINFO")},
  {TVN_BEGINDRAG, _T("TVN_BEGINDRAG")},
  {TVN_KEYDOWN, _T("TVN_KEYDOWN")},
  {TVN_DELETEITEM, _T("TVN_DELETEITEM")},
  {TVN_ITEMEXPANDED, _T("TVN_ITEMEXPANDED")},
}

Definition at line 33 of file notifwdw.h.

int CNotifyShowCase::m_totalLines

Definition at line 37 of file notifwdw.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/notifwdw.h
  • general/CmnCtrl2/notifwdw.h
  • general/CmnCtrl1/notifwdw.cpp
  • general/CmnCtrl2/notifwdw.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CNullLog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

CNullLog Class Reference

#include "Log.H"

Inherits CLog.

List of all members.

Public Member Functions

CNullLog ()
~CNullLog ()
CLog & operator<< (LPCTSTR pszString)

Private Member Functions

DECLARE_DYNAMIC (CNullLog)

Detailed Description

Definition at line 26 of file Log.H.

Constructor & Destructor Documentation

CNullLog::CNullLog ( )

Definition at line 66 of file Log.Cpp.

{
}

CNullLog::~CNullLog ( )

Definition at line 70 of file Log.Cpp.

{
}

Member Function Documentation

CNullLog::DECLARE_DYNAMIC ( CNullLog ) [private]
CLog & CNullLog::operator<< ( LPCTSTR pszString ) [virtual]

Reimplemented from CLog.

Definition at line 74 of file Log.Cpp.

{
   return( *this );
}

The documentation for this class was generated from the following files:
  • ole/TstCon/Log.H
  • ole/TstCon/Log.Cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CObjectData Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes

CObjectData Class Reference

#include "obj_vw.h"

List of all members.

Public Types

enum {
typeUnknown, typeObject, typeTypeLib, typeInterface,
typeStaticInterface
}

Public Member Functions

CObjectData ()
virtual | ~CObjectData ()
HRESULT | CreateInstance (DWORD clsctx)
BOOL | Release ()

Public Attributes

CLSID | m_clsid
DWORD | m_nType
IClassFactory * | m_pcf
IUnknown * | m_punk
TCHAR | m_szProgID [40]
UINT m_uiBitmap
WORD | m_wMajorVer
WORD | m_wMinorVer

Detailed Description

Definition at line 23 of file obj_vw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
typeUnknown
typeObject
typeTypeLib
typeInterface
typeStaticInterface

Definition at line 42 of file obj_vw.h.

       {
    typeUnknown,
    typeObject,
    typeTypeLib,
    typeInterface,
    typeStaticInterface
  };

Constructor & Destructor Documentation

CObjectData::CObjectData ( )

Definition at line 31 of file obj_vw.cpp.

{
  m_nType = typeUnknown ;
  m_pcf = NULL ;
  m_punk = NULL ;
  m_uiBitmap = NULL ;

}

CObjectData::~CObjectData ( ) [virtual]

Definition at line 40 of file obj_vw.cpp.

{
}

Member Function Documentation

HRESULT CObjectData::CreateInstance ( DWORD clsctx )

Definition at line 60 of file obj_vw.cpp.

{
  Release() ;

  HRESULT hr = NOERROR ;
  CString strError ;
  IUnknown* punk = NULL ;
  TRY
  {
    hr = CoGetClassObject( m_clsid, clsctx, NULL, IID_IUnknown, (void**)&punk ) ;
    if (FAILED(hr))
    {
      strError = "CoGetClassObject failed." ;
      AfxThrowOleException(hr) ;
    }
    ENSURE(punk) ;

    hr = punk->QueryInterface( IID_IClassFactory, (void**)&m_pcf ) ;
    if (FAILED(hr))
    {
      strError = "QueryInterface on class factory for IClassFactory failed." ;
      AfxThrowOleException(hr) ;
    }
    ASSERT(m_pcf) ;

    punk->Release() ;
    punk = NULL ;

    hr = m_pcf->CreateInstance( NULL, IID_IUnknown, (void**)&m_punk ) ;
    if (FAILED(hr))
    {
      strError = "IClassFactory::CreateInstance failed." ;
      AfxThrowOleException(hr) ;
    }

    m_pcf->Release() ;
    m_pcf = NULL ;
  }
  CATCH(COleException, pException)
  {
    if (punk)
      punk->Release() ;
    Release() ;

    ErrorMessage( strError, hr ) ;
  }
  END_CATCH ;

  return hr ;
}

BOOL CObjectData::Release ( )

Definition at line 44 of file obj_vw.cpp.

{
  if (m_pcf)
    m_pcf->Release() ;

  if (m_punk)
    m_punk->Release() ;

  m_pcf = NULL ;
  m_punk = NULL ;

  CoFreeUnusedLibraries();

  return TRUE ;
}

Member Data Documentation

CLSID CObjectData::m_clsid

Definition at line 35 of file obj_vw.h.

DWORD CObjectData::m_nType

Definition at line 33 of file obj_vw.h.

IClassFactory* CObjectData::m_pcf

Definition at line 39 of file obj_vw.h.

IUnknown* CObjectData::m_punk

Definition at line 40 of file obj_vw.h.

TCHAR CObjectData::m_szProgID[40]

Definition at line 36 of file obj_vw.h.

UINT CObjectData::m_uiBitmap

Definition at line 38 of file obj_vw.h.

WORD CObjectData::m_wMajorVer

Definition at line 37 of file obj_vw.h.

WORD CObjectData::m_wMinorVer

Definition at line 37 of file obj_vw.h.

The documentation for this class was generated from the following files:
  • ole/oleview/obj_vw.h
  • ole/oleview/obj_vw.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CObjListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes | Protected Member Functions | Protected Attributes

CObjListView Class Reference

#include "ObjView.h"

List of all members.

Public Attributes

BOOL | m_bFont
CFont | m_IconFont

Protected Member Functions

CObjListView ()
virtual | ~CObjListView ()
BOOL | AddItem (COleClientItem *pObject, CString &name, HICON hIcon)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
virtual void | OnDraw (CDC *pDC)
afx_msg void | OnSize (UINT nType, int cx, int cy)
void | RemoveAllItems ()
BOOL | RemoveItem (COleClientItem *pItem)

Protected Attributes

CCustomList m_listbox

Detailed Description

Definition at line 72 of file ObjView.h.

Constructor & Destructor Documentation

CObjListView::CObjListView ( ) [protected]

Definition at line 33 of file ObjView.cpp.

  : m_listbox(this), m_bFont(FALSE)
{
}

CObjListView::~CObjListView ( ) [protected, virtual]

Definition at line 39 of file ObjView.cpp.

{
  // if we used a stock font, don't delete it
  if (!m_bFont)
    m_IconFont.Detach();
}

Member Function Documentation

BOOL CObjListView::AddItem | ( | COleClientItem * | pObject,
 |  | CString & | name,
 |  | HICON | hIcon |
 | ) |  |  | [protected]

Definition at line 110 of file ObjView.cpp.

{
  // Creates a CItemIcons data structure to hold item data and
  // adds the item to the list box.

  #pragma warning (suppress: 6014)
  CItemIcons *pitem = new CItemIcons;
  pitem->m_Name = name;
  pitem->m_hIcon = hIcon;
  pitem->m_pObject = pObject;

  int itemID = m_listbox.AddString(name);
  if (itemID != LB_ERR)
    m_listbox.SetItemData(itemID, (DWORD_PTR) pitem);
  m_listbox.SetCurSel(itemID);
  return TRUE;
}

int CObjListView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 80 of file ObjView.cpp.

{
  // Creates the view and creates the listbox that takes up
  // the view's client area.
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  // create a font to draw icon text with.
  LOGFONT lf;
  m_bFont = SystemParametersInfo(SPI_GETICONTITLELOGFONT,
    sizeof(lf), &lf, FALSE);

  if (m_bFont)
    m_bFont = m_IconFont.CreateFontIndirect(&lf);
  if (!m_bFont)
    m_IconFont.Attach(GetStockObject(ANSI_VAR_FONT));

  // create the listbox to fill our client area.
  CRect rc;
  GetClientRect(&rc);
  if (!m_listbox.Create(WS_CHILD | WS_VISIBLE | WS_VSCROLL | LBS_NOTIFY |
      LBS_HASSTRINGS | LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT,
        rc, this, ID_LISTBOX))
  {
    return -1;
  }

  return 0;
}

void CObjListView::OnDestroy ( void ) [protected]

Definition at line 184 of file ObjView.cpp.

{
  // When we destroy the view, we need to make sure we loop
  // through all the items in the listbox and delete the CItemIcon structs
  // associated with each item in the listbox.

  CView::OnDestroy();

  // We can safely assume that all child windows still exist
  // so, we can go through each item in the list box and delete
  // the CItemIcons objects stored in item data.

  int nItem;
  for (nItem = 0; nItem < m_listbox.GetCount(); nItem++)
  {
    CItemIcons *pitem = (CItemIcons*) m_listbox.GetItemData(nItem);
    if (DWORD_PTR(pitem) != LB_ERR)
      delete pitem;
  }
}

void CObjListView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 58 of file ObjView.cpp.

{
}

void CObjListView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 205 of file ObjView.cpp.

{
  // re-sizes the listbox in the client area when the view gets resized.
  CView::OnSize(nType, cx, cy);
  m_listbox.SetWindowPos(this, 0, 0, cx, cy, SWP_NOMOVE | SWP_NOZORDER);

}

void CObjListView::RemoveAllItems ( ) [protected]

Definition at line 167 of file ObjView.cpp.

{
  //Clears the listbox.  This also has the efect of deleting all of the CItemIcons from
  //the listbox.

  CItemIcons *pItem=0;
  int nItems = m_listbox.GetCount();
  for(int i=0;i<nItems;i++)
  {
    pItem = (CItemIcons*)m_listbox.GetItemData(i);
    if (pItem)
      delete pItem;
  }
  m_listbox.ResetContent();

}

BOOL CObjListView::RemoveItem ( COleClientItem * pItem ) [protected]

Definition at line 129 of file ObjView.cpp.

{
  // Removes an item from the list box and sets focus to the previous
  // item in the list, if there is one.
  CItemIcons *pitem = NULL;
  CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;

  // We'll have to walk our list control and find the item to remove;
  int nItem;
  for (nItem = 0; nItem < m_listbox.GetCount(); nItem++)
  {
    pitem = (CItemIcons*) m_listbox.GetItemData(nItem);
    if (pitem && pitem->m_pObject == pRemove)
    {
      m_listbox.DeleteString(nItem);//delete item from listbox
      delete pitem; //free up the item
    }
  }

  if (m_listbox.GetCount() == 0) //no items left
    return TRUE;

  // set the previous item in the listbox as the current item

  pitem = (CItemIcons*) m_listbox.GetItemData( m_listbox.GetCount() - 1);
  if (pitem != NULL)
  {
    ENSURE(pitem->m_pObject != NULL);
    pitem->m_pObject->Activate(OLEIVERB_SHOW, pFrame->GetDocView());
    pitem->m_pObject->GetInPlaceWindow()->SetFocus();

    pFrame->GetDocView()->m_pSelection = (CMFCBindCntrItem*) pitem->m_pObject;
  }

  m_listbox.SetCurSel(m_listbox.GetCount() - 1);
  return TRUE;
}

Member Data Documentation

BOOL CObjListView::m_bFont

Definition at line 88 of file ObjView.h.

CFont CObjListView::m_IconFont

Definition at line 87 of file ObjView.h.

CCustomList CObjListView::m_listbox [protected]

Definition at line 80 of file ObjView.h.

The documentation for this class was generated from the following files:
  • ole/MFCBind/ObjView.h
  • ole/MFCBind/ObjView.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CObjTreeView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

CObjTreeView Class Reference

#include "obj_vw.h"

List of all members.

Public Member Functions

virtual | ~CObjTreeView ()
void | CallInterfaceViewer (CObjectData *pObjectData, HTREEITEM hItem)
void | DeleteTreeContents ()
void | DeleteTreeItems (HTREEITEM htree)
void | ExpandClassification (NM_TREEVIEW *pNMTreeView)
void | ExpandInterfaces (NM_TREEVIEW *pNMTreeView)
void | ExpandObject (NM_TREEVIEW *pNMTreeView)
void | ExpandTypeLibs (NM_TREEVIEW *pNMTreeView)
COle2ViewDoc * GetDocument ()
BOOL | IsValidSel ()
virtual void | OnDraw (CDC *pdc)
virtual void | OnInitialUpdate ()
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

HTREEITEM | m_hControls
HTREEITEM | m_hInsertable
HTREEITEM | m_hInterfaces
HTREEITEM | m_hInternal
HTREEITEM | m_hObjects
HTREEITEM | m_hOLE1
HTREEITEM | m_hTypeLibs
HTREEITEM | m_hUnclassified

Protected Member Functions

CObjTreeView ()
afx_msg LRESULT | OnCommandHelp (WPARAM, LPARAM lParam)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnFileBind ()
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnObjectDelete ()
afx_msg void | OnObjectVerify ()
afx_msg void | OnTreeDeleteItem (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeItemExpanded (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeItemExpanding (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeReturn (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeSelchanged (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnUpdateUseInProcHandler (CCmdUI *pCmdUI)
afx_msg void | OnUpdateUseInProcServer (CCmdUI *pCmdUI)
afx_msg void | OnUpdateUseLocalServer (CCmdUI *pCmdUI)
afx_msg void | OnUseInProcHandler ()
afx_msg void | OnUseInProcServer ()
afx_msg void | OnUseLocalServer ()

Friends

class | CMainFrame

Detailed Description

Definition at line 53 of file obj_vw.h.

Constructor & Destructor Documentation

CObjTreeView::CObjTreeView ( ) [protected]

Definition at line 135 of file obj_vw.cpp.

{
  m_hObjects = NULL ;
  m_hTypeLibs= NULL ;
  m_hInterfaces = NULL ;

  m_hInsertable = NULL ;
  m_hControls= NULL ;
  m_hInternal= NULL ;
#ifdef SHOW_CONTAINERS
  m_hContainers= NULL ;
#endif
  m_hOLE1= NULL ;
  m_hUnclassified= NULL ;
}

CObjTreeView::~CObjTreeView ( ) [virtual]

Definition at line 151 of file obj_vw.cpp.

{
}

Member Function Documentation

void CObjTreeView::CallInterfaceViewer | ( | CObjectData * | pObjectData,
 |  | HTREEITEM | hItem
 | ) |  |

Definition at line 1009 of file obj_vw.cpp.

{
  if (pObjectData != NULL)
  {
    ASSERT_KINDOF(CObjectData,pObjectData);

    switch(pObjectData->m_nType)
    {
    case CObjectData::typeInterface:
    {
      CObjectData* podParent = NULL ;
      TV_ITEM tviParent ;
      tviParent.hItem = GetTreeCtrl().GetParentItem(hItem);
      ASSERT(tviParent.hItem) ;
      tviParent.mask = TVIF_PARAM ;
      GetTreeCtrl().GetItem( &tviParent ) ;
      if (tviParent.lParam)
      {
        podParent = (CObjectData*)tviParent.lParam ;

        ASSERT(podParent->m_punk) ;
        if (podParent->m_punk)
          ViewInterface( theApp.m_pMainWnd->GetSafeHwnd(), pObjectData->m_clsid, podParent->m_punk ) ;
      }
    }
    break ;

    case CObjectData::typeTypeLib:
    {
      ITypeLib* pTypeLib ;
      LCID      lcid = GetUserDefaultLCID() ;
      HRESULT hr = ::LoadRegTypeLib( pObjectData->m_clsid, pObjectData->m_wMajorVer,
                 pObjectData->m_wMinorVer, lcid, &pTypeLib ) ;
      if (FAILED(hr))
      {
        TCHAR szTemp[256] ;
        LPOLESTR lpStr;
        StringFromCLSID(pObjectData->m_clsid, &lpStr);
        _stprintf_s(szTemp, 256, _T("LoadRegTypeLib(%s, %u, %u, %lu, ...) failed."),
            (LPSTR)COLE2CT(lpStr), pObjectData->m_wMajorVer, pObjectData->m_wMinorVer,
            lcid);
        CoTaskMemFree(lpStr);
        ErrorMessage( szTemp, hr ) ;
      }
      else
      {
        ViewInterface( theApp.m_pMainWnd->GetSafeHwnd(), IID_ITypeLib, pTypeLib ) ;
        #ifdef _DEBUG
        ASSERT( 0 == pTypeLib->Release() ) ;
        #else
        pTypeLib->Release() ;
        #endif
      }
    }
    break ;
    }
  }
}

void CObjTreeView::DeleteTreeContents ( )

Definition at line 334 of file obj_vw.cpp.

{
  // Delete current contents
  //
  if ((int)GetTreeCtrl().GetCount() > 0)
  {
    DeleteTreeItems( m_hInsertable ) ;
    DeleteTreeItems( m_hControls ) ;
    DeleteTreeItems( m_hInternal ) ;
#ifdef SHOW_CONTAINERS
    DeleteTreeItems( m_hContainers ) ;
#endif
    DeleteTreeItems( m_hOLE1 ) ;
    DeleteTreeItems( m_hUnclassified ) ;

    DeleteTreeItems( m_hTypeLibs ) ;
    DeleteTreeItems( m_hInterfaces ) ;
  }
}

void CObjTreeView::DeleteTreeItems ( HTREEITEM htree )

Definition at line 321 of file obj_vw.cpp.

{
  HTREEITEM       hItem, hItemNext ;

  hItem = GetTreeCtrl().GetChildItem( htree ) ;
  while( hItem )
  {
    hItemNext = GetTreeCtrl().GetNextSiblingItem( hItem ) ;
    GetTreeCtrl().DeleteItem( hItem ) ;
    hItem = hItemNext ;
  }
}

void CObjTreeView::ExpandClassification ( NM_TREEVIEW * pNMTreeView )

Definition at line 550 of file obj_vw.cpp.

{
  HKEY    hkCLSID ;

  if (RegOpenKey( HKEY_CLASSES_ROOT, _T("CLSID"), &hkCLSID) == ERROR_SUCCESS)
  {
    CObjectData* lpOD ;
    LONG     cb ;
    TCHAR    szBuf[_MAX_PATH + 1] ;
    TCHAR    szName[64] ;
    TCHAR    szCLSID[64] ;
    DWORD   dwIndex ;

    for ( dwIndex = 0 ;
        RegEnumKey( hkCLSID, dwIndex, szCLSID, sizeof(szCLSID)) == ERROR_SUCCESS ;
        ++dwIndex )
    {
      lpOD = NULL ;
      cb = sizeof(szName);
      if (RegQueryValue( hkCLSID, (LPTSTR)szCLSID, szName, &cb) == ERROR_SUCCESS)
      {
        lpOD = new CObjectData ;
        lpOD->m_nType = CObjectData::typeObject ;
        ASSERT(lpOD) ;
        ::CLSIDFromString( CT2OLE(szCLSID), &lpOD->m_clsid);
        lpOD->m_szProgID[0] = '\0' ;

        // Assume it's an object
        lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT) ;

        // Now find out more about it.
        //
        // #1 Look in CLSID\{clsid} for the \Control key
        // #2 Assume it is an 'non-embeddable' OLE 2.0 object
        // #3 If <progid>\NotInsertable exists we're done
        // #4 if !#2 then if <progid>\Insertable it's an insertable OLE 2.0 object
        //    and we're done
        // #5 if !#3 see if it's an OLE 1.0 object by checking Ole1Class
        //
        HKEY    hkClass, hkTemp ;

        if (RegOpenKey( hkCLSID, szCLSID, &hkClass ) == ERROR_SUCCESS)
        {
          BOOL    fHasServer32 = HasServer32( hkClass ) ;

          if (fHasServer32)
            lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT32) ;
          else
            lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT) ;

          // First determine if it is a system component
          //
          cb = sizeof(szBuf) ;
          LONG cb2 = sizeof(szBuf) ;
          if (RegQueryValue( hkClass, (LPTSTR)_T("InprocServer32"), szBuf, &cb ) == ERROR_SUCCESS)
          {
             // RegQueryValue may not return a null terminated string.
             szBuf[_MAX_PATH] = '\0';
             if ((0 == _stricmp( szBuf, _T("ole32.dll") )) ||
              (0 == _stricmp( szBuf, _T("oleprx32.dll") )) ||
              (0 == _stricmp( szBuf, _T("ole2pr32.dll") )) ||
              (0 == _stricmp( szBuf, _T("olecnv32.dll") )) ||
              (0 == _stricmp( szBuf, _T("oleaut32.dll") )))
            {
              lpOD->m_uiBitmap = BMINDEX(IDB_QUESTION32) ;
            }
          } // Query InprocServer
          else if (RegQueryValue( hkClass, (LPTSTR)_T("InprocServer"), szBuf, &cb2 ) == ERROR_SUCCESS)
          {
            if ((0 == _stricmp( szBuf, _T("ole2prox.dll") )) ||
              (0 == _stricmp( szBuf, _T("ole2.dll") )) ||
              (0 == _stricmp( szBuf, _T("ole2disp.dll") )))
            {
              lpOD->m_uiBitmap = BMINDEX(IDB_QUESTION) ;
            }
          }

          // If it has "Ole1Class" then it's an OLE 1.0 object
          //
          _stprintf_s( szBuf, _MAX_PATH, _T("CLSID\\%s\\Ole1Class"), (LPTSTR)szCLSID) ;
          if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkTemp ) == ERROR_SUCCESS)
          {
            // Is it 32 bit or 16 bit?
            if (fHasServer32)
              lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE1032) ;   // that succeeded.  This means we're insertable
            else
              lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE10) ;   // that succeeded.  This means we're insertable
            RegCloseKey( hkTemp ) ;
            goto lblInsertInList ;
          }
                    // We now recognize the "Control" key which indicates it's
          // an OLE Custom Control.
          //
          _stprintf_s( szBuf, _MAX_PATH, _T("CLSID\\%s\\Control"), (LPTSTR)szCLSID) ;
          if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkTemp ) == ERROR_SUCCESS)
          {
            // Is it 32 bit or 16 bit?
            if (fHasServer32)
              lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_CONTROL32) ;
            else
              lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_CONTROL) ;
            RegCloseKey( hkTemp ) ;
            goto lblInsertInList ;
          }

          // If it's not a control, but it's insertable it must be a CD object
          //
          _stprintf_s( szBuf, _MAX_PATH, _T("CLSID\\%s\\Insertable"), (LPTSTR)szCLSID) ;
          if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkTemp ) == ERROR_SUCCESS)
          {
            // Is it 32 bit or 16 bit?
            if (fHasServer32)
              lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE32) ;   // that succeeded.  This means we're insertable
            else
              lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE) ;   // that succeeded.  This means we're insertable
            RegCloseKey( hkTemp ) ;
            goto lblInsertInList ;
          }

          cb = sizeof(lpOD->m_szProgID) ;
          if (RegQueryValue( hkClass, (LPTSTR)_T("ProgID"), lpOD->m_szProgID, &cb) == ERROR_SUCCESS)
          {
            HKEY    hkInsertable ;

            // Is it an OLE 1.0 object?
            //
            cb = 64 ;
            if (RegQueryValue( hkClass, (LPTSTR)"Ole1Class", szBuf, &cb ) == ERROR_SUCCESS)
            {
              if (fHasServer32)
                lpOD->m_uiBitmap = BMINDEX( IDB_OBJECT_INSERTABLE1032 ) ;
              else
                lpOD->m_uiBitmap = BMINDEX( IDB_OBJECT_INSERTABLE10 ) ;
              goto lblInsertInList ;
            }

            // Does the object force "NotInsertable"?
            //
            _stprintf_s( szBuf, _MAX_PATH, _T("%s\\NotInsertable"), (LPTSTR)lpOD->m_szProgID ) ;
            if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkInsertable ) == ERROR_SUCCESS)
            {
              if (fHasServer32)
                lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT32) ;
              else
                lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT) ;

              RegCloseKey( hkInsertable ) ;
              goto lblInsertInList ;
            }

            // Is it insertable?
            //
            _stprintf_s( szBuf, _MAX_PATH, _T("%s\\Insertable"), (LPTSTR)lpOD->m_szProgID ) ;
            if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkInsertable ) == ERROR_SUCCESS)
            {
              if (fHasServer32)
                lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE32) ;   // that succeeded.  This means we're insertable
              else
                lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE) ;   // that succeeded.  This means we're insertable
              RegCloseKey( hkInsertable ) ;
              goto lblInsertInList ;
            }

#ifdef SHOW_CONTAINERS
            // Try HKEY_CLASSES_ROOT\szProgID\shell\open to see if it's
            // a container.
            //
            wsprintf( szBuf, _T("%s\\shell\\open"), (LPTSTR)lpOD->m_szProgID ) ;
            if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkInsertable ) == ERROR_SUCCESS)
            {
              if (fHasServer32)
                lpOD->m_uiBitmap = BMINDEX(IDB_CONTAINER32) ;
              else
                lpOD->m_uiBitmap = BMINDEX(IDB_CONTAINER) ;
              RegCloseKey( hkInsertable ) ;
              goto lblInsertInList ;
            }
#endif
          }
          RegCloseKey( hkClass ) ;

        }  // if RegOpenKey( ... &hkClass )

lblInsertInList:
        HTREEITEM htree = NULL ;
        switch( lpOD->m_uiBitmap )
        {
          case BMINDEX(IDB_QUESTION):
          case BMINDEX(IDB_QUESTION32):
            htree = m_hInternal ;
          break ;

          case BMINDEX(IDB_OBJECT_INSERTABLE10):
          case BMINDEX(IDB_OBJECT_INSERTABLE1032):
            htree = m_hOLE1 ;
          break ;

          case BMINDEX(IDB_OBJECT_INSERTABLE):
          case BMINDEX(IDB_OBJECT_INSERTABLE32):
            htree = m_hInsertable ;
          break ;

#ifdef SHOW_CONTAINERS
          case BMINDEX(IDB_CONTAINER):
          case BMINDEX(IDB_CONTAINER32):
            htree = m_hContainers ;
          break ;
#endif

          case BMINDEX(IDB_OBJECT_CONTROL):
          case BMINDEX(IDB_OBJECT_CONTROL32):
            htree = m_hControls ;
          break ;

          case BMINDEX(IDB_OBJECT):
          case BMINDEX(IDB_OBJECT32):
          default:
            htree = m_hUnclassified ;
          break ;

        }

        if (htree && htree == pnmtv->itemNew.hItem)
        {
          RegOpenKey( hkCLSID, szCLSID, &hkClass ) ;
          cb = sizeof(szBuf) ;
          if (RegQueryValue( hkClass, (LPTSTR)"ToolboxBitmap32", szBuf, &cb ) == ERROR_SUCCESS ||
            RegQueryValue( hkClass, (LPTSTR)"ToolboxBitmap", szBuf, &cb ) == ERROR_SUCCESS)
          {
            TCHAR * nextTok;
            TCHAR * pszBitmapModule = _tcstok_s(szBuf, _T(","), &nextTok);
            TCHAR * pszBitmapId = _tcstok_s(NULL, _T(","), &nextTok);
            HINSTANCE hinstBitmap;
            int nBitmapId;
            if ((pszBitmapModule != NULL) && (pszBitmapId != NULL))
            {
              LPTSTR p ;
              if (*pszBitmapModule == '"')
              {
                _tcscpy_s( pszBitmapModule, _MAX_PATH - (pszBitmapModule - szBuf), pszBitmapModule+1 ) ;
                p = strrchr( pszBitmapModule, '"' ) ;
                if (p) *p = '\0' ;
              }
              nBitmapId = _ttoi(pszBitmapId);
              hinstBitmap = LoadLibraryEx(pszBitmapModule, NULL, LOAD_LIBRARY_AS_DATAFILE);
              if (hinstBitmap && (nBitmapId > 0))
              {
                HBITMAP hbmGlyph = ::LoadBitmap(hinstBitmap, MAKEINTRESOURCE(nBitmapId));
                if (hbmGlyph)
                {
                  lpOD->m_uiBitmap = theApp.m_images.Add( CBitmap::FromHandle(hbmGlyph), RGBLTGRAY ) ;
                  ::DeleteObject(hbmGlyph) ;
                }
                FreeLibrary( hinstBitmap ) ;
              }
            }
          }
          RegCloseKey( hkClass ) ;
          ASSERT(lpOD) ;

          TV_INSERTSTRUCT tvis ;
          tvis.hParent = htree ;
          tvis.hInsertAfter = TVI_SORT ;
          tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE |TVIF_CHILDREN ;
          tvis.item.cChildren = 1 ;
          tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
          tvis.item.pszText = szName ;
          tvis.item.iImage = tvis.item.iSelectedImage = lpOD->m_uiBitmap ;
          GetTreeCtrl().InsertItem( &tvis ) ;
        }
        else
          delete lpOD ;
      }
    }
    RegCloseKey( hkCLSID ) ;
  }
}

void CObjTreeView::ExpandInterfaces ( NM_TREEVIEW * pNMTreeView )

Definition at line 947 of file obj_vw.cpp.

{
  if (pnmtv->itemNew.hItem == m_hInterfaces)
  {
    TV_INSERTSTRUCT tvis ;
    tvis.hParent = pnmtv->itemNew.hItem  ;
    tvis.hInsertAfter = TVI_SORT ;
    tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
    tvis.item.iImage = tvis.item.iSelectedImage = BMINDEX(IDB_INTERFACE) ;

    HKEY hk ;
    TCHAR szTypeLibID[80] ;
    TCHAR szValue[256] ;
    if (RegOpenKey( HKEY_CLASSES_ROOT, _T("Interface"), &hk) == ERROR_SUCCESS)
    {
      for ( DWORD dwIndex = 0 ;
          RegEnumKey( hk, dwIndex, szTypeLibID, sizeof(szTypeLibID)) == ERROR_SUCCESS ;
          ++dwIndex )
      {
        LONG cb = sizeof(szValue);
        if (RegQueryValue( hk, (LPTSTR)szTypeLibID, szValue, &cb) == ERROR_SUCCESS)
        {
          CObjectData* lpOD = new CObjectData ;
          lpOD->m_nType = CObjectData::typeStaticInterface ;
          ::CLSIDFromString(CT2OLE(szTypeLibID), &lpOD->m_clsid );
          lpOD->m_szProgID[0] = '\0' ;
          lpOD->m_uiBitmap = BMINDEX(IDB_INTERFACE) ;
          lpOD->m_wMajorVer =  lpOD->m_wMajorVer  = 0 ;

          tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
          tvis.item.pszText = szValue ;
          GetTreeCtrl().InsertItem( &tvis ) ;
        }
      }
      RegCloseKey( hk ) ;
    }
    return ;
  }
}

void CObjTreeView::ExpandObject ( NM_TREEVIEW * pNMTreeView )

Definition at line 893 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;
  TV_INSERTSTRUCT tvis ;
  CObjectData* pod = (CObjectData*)pnmtv->itemNew.lParam ;

  if (pod->m_nType == CObjectData::typeObject)
  {
    HRESULT hr = pod->CreateInstance( pDoc->m_dwClsCtx ) ;
    if (FAILED(hr))
      return ;

    tvis.hParent = pnmtv->itemNew.hItem  ;
    tvis.hInsertAfter = TVI_SORT ;
    tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
    tvis.item.iImage = tvis.item.iSelectedImage = BMINDEX(IDB_INTERFACE) ;

    HKEY hk ;
    TCHAR szIID[80] ;
    IID  iid ;
    IUnknown* pfoo = NULL ;
    TCHAR szValue[256] ;
    if (RegOpenKey( HKEY_CLASSES_ROOT, _T("Interface"), &hk) == ERROR_SUCCESS)
    {
      for ( DWORD dwIndex = 0 ;
          RegEnumKey( hk, dwIndex, szIID, sizeof(szIID)) == ERROR_SUCCESS ;
          ++dwIndex )
      {
        LONG cb = sizeof(szValue);
        if (RegQueryValue( hk, (LPTSTR)szIID, szValue, &cb) == ERROR_SUCCESS)
        {
          ::CLSIDFromString(CT2OLE(szIID), &iid ) ;
          if (SUCCEEDED(pod->m_punk->QueryInterface( iid, (void**)&pfoo )))
          {
            pfoo->Release() ;
            pfoo = NULL ;

            CObjectData* lpOD = new CObjectData ;
            lpOD->m_nType = CObjectData::typeInterface ;
            lpOD->m_clsid = iid ;
            lpOD->m_szProgID[0] = '\0' ;
            lpOD->m_uiBitmap = BMINDEX(IDB_INTERFACE) ;
            lpOD->m_wMajorVer =  lpOD->m_wMajorVer  = 0 ;
            tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
            tvis.item.pszText = szValue ;
            GetTreeCtrl().InsertItem( &tvis ) ;
          }
        }
      }
      RegCloseKey( hk ) ;
    }
  }
}

void CObjTreeView::ExpandTypeLibs ( NM_TREEVIEW * pNMTreeView )

Definition at line 830 of file obj_vw.cpp.

{
  HKEY    hkTypeLib ;
  if (RegOpenKey( HKEY_CLASSES_ROOT, _T("TypeLib"), &hkTypeLib) == ERROR_SUCCESS)
  {
    LONG    cb ;
    TCHAR    szVer[65] ;
    TCHAR    szName[64] ;
    TCHAR    szGUID[64] ;
    TCHAR    szBuf[256] ;
    DWORD   dwIndex, dwIndex2 ;
    HKEY    hkGUID ;

    // Enum \TypeInfo
    for ( dwIndex = 0 ;
        RegEnumKey( hkTypeLib, dwIndex, szGUID, sizeof(szGUID)) == ERROR_SUCCESS ;
        ++dwIndex )
    {
      // Gotta open \TypeInfo\szGUID
      if (RegOpenKey( hkTypeLib, szGUID, &hkGUID ) == ERROR_SUCCESS)
      {
        // Enum all at this level (major.minor = name)
        for (dwIndex2 = 0 ;
          RegEnumKey( hkGUID, dwIndex2, szVer, sizeof(szVer)) == ERROR_SUCCESS ;
          ++dwIndex2 )
        {
          cb = sizeof(szName);
          if (RegQueryValue( hkGUID, (LPTSTR)szVer, szName, &cb) == ERROR_SUCCESS)
          {
            // RegQueryValue may not return a null terminated string
            szVer[64] = '\0';
            _stprintf_s( szBuf, 256, _T("%s (Ver %s)"), (LPTSTR)szName, (LPTSTR)szVer ) ;

            CObjectData* lpOD = new CObjectData ;
            lpOD->m_nType = CObjectData::typeTypeLib ;
            ::CLSIDFromString(CT2OLE(szGUID), &lpOD->m_clsid);
            lpOD->m_szProgID[0] = '\0' ;

            lpOD->m_uiBitmap = BMINDEX(IDB_AUTOMATION) ;
            lpOD->m_wMajorVer = (WORD)atoi( szVer ) ;
            PTSTR p = strrchr( szVer, '.' ) ;
            if (p)
              lpOD->m_wMinorVer = (WORD)atoi( p+1 ) ;
            else
              lpOD->m_wMinorVer = 0 ;

            TV_INSERTSTRUCT tvis ;
            tvis.hParent = m_hTypeLibs ;
            tvis.hInsertAfter = TVI_SORT ;
            tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
            tvis.item.iImage = tvis.item.iSelectedImage = lpOD->m_uiBitmap ;
            tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
            tvis.item.pszText = szBuf ;
            GetTreeCtrl().InsertItem( &tvis ) ;
          }
        }
        RegCloseKey( hkGUID ) ;
      }
    }
    RegCloseKey( hkTypeLib ) ;
  }
}

COle2ViewDoc * CObjTreeView::GetDocument ( ) [inline]

Definition at line 129 of file obj_vw.h.

   { return (COle2ViewDoc*) m_pDocument; }

BOOL CObjTreeView::IsValidSel ( )

Definition at line 1102 of file obj_vw.cpp.

{
  return (GetTreeCtrl().GetSelectedItem() != NULL) ;
}

LRESULT CObjTreeView::OnCommandHelp | ( | WPARAM | ,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 155 of file obj_vw.cpp.

{
  theApp.WinHelp( lParam, HELP_CONTEXT ) ;
  return TRUE ;
}

int CObjTreeView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 172 of file obj_vw.cpp.

{
  if (CTreeView::OnCreate(lpCreateStruct) == -1)
    return -1;
#ifdef _MARCOC_OLD
  RECT rect ;
  rect.top = lpCreateStruct->y ;
  rect.left = lpCreateStruct->x ;
  rect.bottom = lpCreateStruct->cy ;
  rect.right = lpCreateStruct->cx ;

  if (!GetTreeCtrl().Create( WS_CHILD | WS_VISIBLE |
                WS_BORDER |
                TVS_LINESATROOT |
                TVS_HASLINES |
//                                TVS_SHOWSELALWAYS |
                TVS_HASBUTTONS |
                TVS_DISABLEDRAGDROP,
                rect, this, ID_TREEVIEW ))
  {
    TRACE( _T("Tree control failed to create!") ) ;
    return -1 ;
  }
#endif
  return 0;
}

void CObjTreeView::OnDestroy ( void ) [protected]

Definition at line 262 of file obj_vw.cpp.

{
  DeleteTreeContents() ;
  CTreeView::OnDestroy();
}

void CObjTreeView::OnDraw ( CDC * pdc ) [virtual]

Definition at line 354 of file obj_vw.cpp.

{
}

void CObjTreeView::OnFileBind ( ) [protected]

Definition at line 1175 of file obj_vw.cpp.

{
}

void CObjTreeView::OnInitialUpdate ( ) [virtual]

Definition at line 199 of file obj_vw.cpp.

{
  GetTreeCtrl().SetImageList( &theApp.m_images, TVSIL_NORMAL ) ;

  TV_INSERTSTRUCT tvis ;
  tvis.hParent = TVI_ROOT ;
  tvis.hInsertAfter = TVI_LAST ;
  tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
  tvis.item.lParam = 0 ;
  tvis.item.cChildren = 1 ;

  tvis.item.pszText = "Objects" ;
  tvis.item.iImage = BMINDEX(IDB_OBJECTFOLDER) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_OBJECTFOLDER) ;
  m_hObjects = GetTreeCtrl().InsertItem( &tvis ) ;

  tvis.hParent = m_hObjects ;
  tvis.item.pszText = "OLE Document Objects" ;
  tvis.item.iImage = BMINDEX(IDB_OBJECT_INSERTABLE) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT_INSERTABLE) ;
  m_hInsertable = GetTreeCtrl().InsertItem( &tvis ) ;

  tvis.item.pszText = "OLE Controls" ;
  tvis.item.iImage = BMINDEX(IDB_OBJECT_CONTROL) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT_CONTROL) ;
  m_hControls = GetTreeCtrl().InsertItem( &tvis ) ;

  tvis.item.pszText = "Unclassified Objects" ;
  tvis.item.iImage = BMINDEX(IDB_OBJECT) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT) ;
  m_hUnclassified = GetTreeCtrl().InsertItem( &tvis ) ;

#ifdef SHOW_CONTAINERS
  tvis.item.pszText = "Containers" ;
  tvis.item.iImage = BMINDEX(IDB_CONTAINER) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_CONTAINER) ;
  m_hContainers = GetTreeCtrl().InsertItem( &tvis ) ;
#endif

  tvis.item.pszText = "OLE 1.0 Objects" ;
  tvis.item.iImage = BMINDEX(IDB_OBJECT_INSERTABLE10) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT_INSERTABLE10) ;
  m_hOLE1 = GetTreeCtrl().InsertItem( &tvis ) ;

  tvis.item.pszText = "Internal OLE Objects" ;
  tvis.item.iImage = BMINDEX(IDB_QUESTION) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_QUESTION) ;
  m_hInternal = GetTreeCtrl().InsertItem( &tvis ) ;

  GetTreeCtrl().Expand( m_hObjects, TVE_EXPAND ) ;

  tvis.hParent = TVI_ROOT ;
  tvis.item.pszText = "Type Libraries" ;
  tvis.item.iImage = BMINDEX(IDB_TYPELIBFOLDER) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_TYPELIBFOLDER) ;
  m_hTypeLibs = GetTreeCtrl().InsertItem( &tvis ) ;

  tvis.item.pszText = "Interfaces" ;
  tvis.item.iImage = BMINDEX(IDB_IFACEFOLDER) ;
  tvis.item.iSelectedImage = BMINDEX(IDB_IFACEFOLDER) ;
  m_hInterfaces = GetTreeCtrl().InsertItem( &tvis ) ;
}

void CObjTreeView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 269 of file obj_vw.cpp.

{
  UINT hitflags ;
  HTREEITEM hitem ;

  hitem = GetTreeCtrl().HitTest( point, &hitflags ) ;
  if (hitflags & (TVHT_ONITEM | TVHT_ONITEMBUTTON))
  {
    NM_TREEVIEW nm ;
    nm.itemNew.mask = TVIF_PARAM  ;
    nm.itemNew.hItem = hitem ;
    if (GetTreeCtrl().GetItem( &nm.itemNew ))
    {
      CObjectData* pObjectData = (CObjectData*)nm.itemNew.lParam;
      CallInterfaceViewer(pObjectData, nm.itemNew.hItem);
    }
  }
  CTreeView::OnLButtonDblClk(nFlags, point);
}

void CObjTreeView::OnObjectDelete ( ) [protected]

Definition at line 1090 of file obj_vw.cpp.

{
  AfxMessageBox("Not implemented yet" ) ;

}

void CObjTreeView::OnObjectVerify ( ) [protected]

Definition at line 1096 of file obj_vw.cpp.

{
  AfxMessageBox("Not implemented yet" ) ;

}

void CObjTreeView::OnTreeDeleteItem | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 1077 of file obj_vw.cpp.

{
  NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;

  if (pnmtv->itemOld.lParam)
  {
    CObjectData* pod = (CObjectData*)pnmtv->itemOld.lParam ;
    ASSERT(pod->IsKindOf(RUNTIME_CLASS(CObjectData)));
    delete (CObjectData*)pnmtv->itemOld.lParam ;
    pnmtv->itemOld.lParam = NULL ;
  }
}

void CObjTreeView::OnTreeItemExpanded | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 987 of file obj_vw.cpp.

{
  *pResult = 0;
  NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
  if ( pnmtv->itemNew.lParam != NULL &&
     pnmtv->action == TVE_COLLAPSE)
  {
//        TV_INSERTSTRUCT tvis ;
    CObjectData* pod = (CObjectData*)pnmtv->itemNew.lParam ;

    switch(pod->m_nType)
    {
    case CObjectData::typeObject:
    {
      pod->Release() ;
      GetTreeCtrl().Expand( pnmtv->itemNew.hItem, TVE_COLLAPSERESET ) ;
    }
    break ;
    }
  }
 }

void CObjTreeView::OnTreeItemExpanding | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 524 of file obj_vw.cpp.

{
  *pResult = 0;
  NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
  if (pnmtv->action == TVE_EXPAND && pnmtv->itemNew.hItem != m_hObjects)
  {
    if (pnmtv->itemNew.state & TVIS_EXPANDEDONCE)
      return ;

    BeginWaitCursor() ;
    GetTreeCtrl().SetRedraw( FALSE ) ;

    if (pnmtv->itemNew.hItem == m_hInterfaces)
      ExpandInterfaces( pnmtv ) ;
    else if (pnmtv->itemNew.hItem == m_hTypeLibs)
      ExpandTypeLibs( pnmtv ) ;
    else if (pnmtv->itemNew.lParam != NULL)
      ExpandObject( pnmtv ) ;
    else
      ExpandClassification( pnmtv ) ;

    GetTreeCtrl().SetRedraw( TRUE ) ;
    EndWaitCursor() ;
  }
}

void CObjTreeView::OnTreeReturn | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 1068 of file obj_vw.cpp.

{
  *pResult = (LRESULT)TRUE ;
  HTREEITEM hTreeItemSel = GetTreeCtrl().GetSelectedItem() ;

  if (hTreeItemSel)
    GetTreeCtrl().Expand( hTreeItemSel, TVE_TOGGLE ) ;
}

void CObjTreeView::OnTreeSelchanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 483 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;
  NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
  CObjectData*    lpOD ;

  lpOD = (CObjectData*)pnmtv->itemNew.lParam ;

  // special case typelibs because there may be multiple entries (versions)
  // for a given TYPELIBID
  //
  if (lpOD && (!IsEqualCLSID( lpOD->m_clsid, pDoc->m_clsidCur ) || pDoc->m_fTypeLib))
  {
    pDoc->m_fTypeLib = (lpOD->m_uiBitmap == BMINDEX(IDB_AUTOMATION)) ;
    pDoc->m_fInterface = (lpOD->m_uiBitmap == BMINDEX(IDB_INTERFACE)) ;
    pDoc->m_clsidCur = lpOD->m_clsid ;

    TV_ITEM tvi ;
    tvi.hItem = pnmtv->itemNew.hItem ;
    tvi.mask = TVIF_TEXT ;
    tvi.cchTextMax = 256 ;
    tvi.pszText = new TCHAR[256] ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      pDoc->m_szObjectCur = tvi.pszText ;
    }
    else
      pDoc->m_szObjectCur = "ERROR" ;
    delete tvi.pszText ;
  }
  else
  {
    pDoc->m_fTypeLib = FALSE ;
    pDoc->m_fInterface = FALSE ;
    pDoc->m_clsidCur =  GUID_NULL;
    pDoc->m_szObjectCur = "" ;
  }
  pDoc->UpdateAllViews( this, UPD_NOOBJECTVIEW ) ;
  *pResult = 0;
}

void CObjTreeView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [virtual]

Definition at line 358 of file obj_vw.cpp.

{
  pSender; pHint ;
  if (lHint & UPD_NOOBJECTVIEW)
    return ;

  BeginWaitCursor() ;
  GetTreeCtrl().SetRedraw( FALSE ) ;
  GetTreeCtrl().SelectItem( NULL ) ;

  if ((int)GetTreeCtrl().GetCount() > 0)
  {
    BOOL fExpanded = FALSE ;
    TV_ITEM tvi ;
    tvi.mask = TVIF_STATE ;

    tvi.hItem = m_hInsertable ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      fExpanded = (tvi.state & TVIS_EXPANDED) ;
      GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
      DeleteTreeItems( tvi.hItem ) ;
      tvi.state &= ~TVIS_EXPANDEDONCE ;
      GetTreeCtrl().SetItem( &tvi ) ;
      if (fExpanded)
        GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
    }

    tvi.hItem = m_hControls ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      fExpanded = (tvi.state & TVIS_EXPANDED) ;
      GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
      DeleteTreeItems( tvi.hItem ) ;
      tvi.state &= ~TVIS_EXPANDEDONCE ;
      GetTreeCtrl().SetItem( &tvi ) ;
      if (fExpanded)
        GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
    }

    tvi.hItem = m_hInternal ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      fExpanded = (tvi.state & TVIS_EXPANDED) ;
      GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
      DeleteTreeItems( tvi.hItem ) ;
      tvi.state &= ~TVIS_EXPANDEDONCE ;
      GetTreeCtrl().SetItem( &tvi ) ;
      if (fExpanded)
        GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
    }

    tvi.hItem = m_hOLE1 ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      fExpanded = (tvi.state & TVIS_EXPANDED) ;
      GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
      DeleteTreeItems( tvi.hItem ) ;
      tvi.state &= ~TVIS_EXPANDEDONCE ;
      GetTreeCtrl().SetItem( &tvi ) ;
      if (fExpanded)
        GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
    }

    tvi.hItem = m_hUnclassified ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      fExpanded = (tvi.state & TVIS_EXPANDED) ;
      GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
      DeleteTreeItems( tvi.hItem ) ;
      tvi.state &= ~TVIS_EXPANDEDONCE ;
      GetTreeCtrl().SetItem( &tvi ) ;
      if (fExpanded)
        GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
    }

    tvi.hItem = m_hTypeLibs ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      fExpanded = (tvi.state & TVIS_EXPANDED) ;
      GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
      DeleteTreeItems( tvi.hItem ) ;
      tvi.state &= ~TVIS_EXPANDEDONCE ;
      GetTreeCtrl().SetItem( &tvi ) ;
      if (fExpanded)
        GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
    }

    tvi.hItem = m_hInterfaces ;
    if (GetTreeCtrl().GetItem( &tvi ))
    {
      fExpanded = (tvi.state & TVIS_EXPANDED) ;
      GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
      DeleteTreeItems( tvi.hItem ) ;
      tvi.state &= ~TVIS_EXPANDEDONCE ;
      GetTreeCtrl().SetItem( &tvi ) ;
      if (fExpanded)
        GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
    }
  }

  GetTreeCtrl().SetRedraw( TRUE ) ;
  EndWaitCursor() ;
}

void CObjTreeView::OnUpdateUseInProcHandler ( CCmdUI * pCmdUI ) [protected]

Definition at line 1148 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;
  pCmdUI->SetCheck( pDoc->m_dwClsCtx & CLSCTX_INPROC_HANDLER ? TRUE : FALSE ) ;
}

void CObjTreeView::OnUpdateUseInProcServer ( CCmdUI * pCmdUI ) [protected]

Definition at line 1130 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;
  pCmdUI->SetCheck( pDoc->m_dwClsCtx & CLSCTX_INPROC_SERVER ? TRUE : FALSE  ) ;
}

void CObjTreeView::OnUpdateUseLocalServer ( CCmdUI * pCmdUI ) [protected]

Definition at line 1168 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;
  pCmdUI->SetCheck( pDoc->m_dwClsCtx & CLSCTX_LOCAL_SERVER ? TRUE : FALSE ) ;
}

void CObjTreeView::OnUseInProcHandler ( ) [protected]

Definition at line 1136 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;
  if (pDoc->m_dwClsCtx & CLSCTX_INPROC_HANDLER)
    pDoc->m_dwClsCtx &= ~CLSCTX_INPROC_HANDLER ;
  else
    pDoc->m_dwClsCtx |= CLSCTX_INPROC_HANDLER ;
  if (pDoc->m_dwClsCtx == NULL)
    pDoc->m_dwClsCtx = CLSCTX_INPROC_HANDLER ;
//    OnUpdate( this, NULL, NULL ) ;
}

void CObjTreeView::OnUseInProcServer ( ) [protected]

Definition at line 1117 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;

  if (pDoc->m_dwClsCtx & CLSCTX_INPROC_SERVER)
    pDoc->m_dwClsCtx &= ~CLSCTX_INPROC_SERVER ;
  else
    pDoc->m_dwClsCtx |= CLSCTX_INPROC_SERVER ;
  if (pDoc->m_dwClsCtx == NULL)
    pDoc->m_dwClsCtx = CLSCTX_INPROC_SERVER ;
//    OnUpdate( this, NULL, NULL ) ;
}

void CObjTreeView::OnUseLocalServer ( ) [protected]

Definition at line 1154 of file obj_vw.cpp.

{
  COle2ViewDoc*   pDoc = GetDocument() ;
  if (pDoc->m_dwClsCtx & CLSCTX_LOCAL_SERVER)
    pDoc->m_dwClsCtx &= ~CLSCTX_LOCAL_SERVER ;
  else
    pDoc->m_dwClsCtx |= CLSCTX_LOCAL_SERVER ;

  if (pDoc->m_dwClsCtx == NULL)
    pDoc->m_dwClsCtx = CLSCTX_LOCAL_SERVER ;

//    OnUpdate( this, NULL, NULL ) ;
}

BOOL CObjTreeView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 161 of file obj_vw.cpp.

{
  if (!CTreeView::PreCreateWindow(cs))
    return FALSE;

  cs.style = WS_CHILD | WS_VISIBLE | WS_BORDER | TVS_LINESATROOT |
    TVS_HASLINES | TVS_HASBUTTONS | TVS_DISABLEDRAGDROP;
  return TRUE;
}

Friends And Related Function Documentation

friend class CMainFrame [friend]

Definition at line 125 of file obj_vw.h.

Member Data Documentation

HTREEITEM CObjTreeView::m_hControls

Definition at line 68 of file obj_vw.h.

HTREEITEM CObjTreeView::m_hInsertable

Definition at line 67 of file obj_vw.h.

HTREEITEM CObjTreeView::m_hInterfaces

Definition at line 65 of file obj_vw.h.

HTREEITEM CObjTreeView::m_hInternal

Definition at line 69 of file obj_vw.h.

HTREEITEM CObjTreeView::m_hObjects

Definition at line 63 of file obj_vw.h.

HTREEITEM CObjTreeView::m_hOLE1

Definition at line 73 of file obj_vw.h.

HTREEITEM CObjTreeView::m_hTypeLibs

Definition at line 64 of file obj_vw.h.

HTREEITEM CObjTreeView::m_hUnclassified

Definition at line 74 of file obj_vw.h.

The documentation for this class was generated from the following files:
  • ole/oleview/obj_vw.h
  • ole/oleview/obj_vw.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COEMFile Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

COEMFile Class Reference

#include "multconv.h"

Inherits CTrackFile, and CTrackFile.

List of all members.

Public Member Functions

COEMFile (CFrameWnd *pWnd)
COEMFile (CFrameWnd *pWnd)
virtual UINT | Read (void FAR *lpBuf, UINT nCount)
virtual UINT | Read (void FAR *lpBuf, UINT nCount)
virtual void | Write (const void FAR *lpBuf, UINT nCount)
virtual void | Write (const void FAR *lpBuf, UINT nCount)

Detailed Description

Definition at line 51 of file multconv.h.

Constructor & Destructor Documentation

COEMFile::COEMFile ( CFrameWnd * pWnd )

Definition at line 85 of file multconv.cpp.

                                  : CTrackFile(pWnd)
{
}

COEMFile::COEMFile ( CFrameWnd * pWnd )

Member Function Documentation

UINT COEMFile::Read | ( | void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented from CTrackFile.

Definition at line 89 of file multconv.cpp.

{
  UINT n = CTrackFile::Read(lpBuf, nCount);
  OemToCharBuffA((const char*)lpBuf, (char*)lpBuf, n);
  return n;
}

virtual UINT COEMFile::Read | ( | void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented from CTrackFile.

virtual void COEMFile::Write | ( | const void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented from CTrackFile.

void COEMFile::Write | ( | const void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented from CTrackFile.

Definition at line 96 of file multconv.cpp.

{
  CharToOemBuffA((const char*)lpBuf, (char*)lpBuf, nCount);
  CTrackFile::Write(lpBuf, nCount);
}

The documentation for this class was generated from the following files:
  • ole/wordpad/multconv.h
  • vc2008fp/WordPad/multconv.h
  • ole/wordpad/multconv.cpp
  • vc2008fp/WordPad/multconv.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COIPF Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

COIPF Class Reference

List of all members.

Public Member Functions

CFrameWnd * | GetDocFrame ()
CFrameWnd * | GetDocFrame ()
CFrameWnd * | GetMainFrame ()
CFrameWnd * | GetMainFrame ()

Detailed Description

Definition at line 344 of file wordpdoc.cpp.

Member Function Documentation

CFrameWnd* COIPF::GetDocFrame ( ) [inline]

Definition at line 348 of file wordpdoc.cpp.

{ return m_pDocFrame;}

CFrameWnd* COIPF::GetDocFrame ( ) [inline]

Definition at line 353 of file wordpdoc.cpp.

{ return m_pDocFrame;}

CFrameWnd* COIPF::GetMainFrame ( ) [inline]

Definition at line 352 of file wordpdoc.cpp.

{ return m_pMainFrame;}

CFrameWnd* COIPF::GetMainFrame ( ) [inline]

Definition at line 347 of file wordpdoc.cpp.

{ return m_pMainFrame;}

The documentation for this class was generated from the following files:
  • ole/wordpad/wordpdoc.cpp
  • vc2008fp/WordPad/wordpdoc.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COle2ViewApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

COle2ViewApp Class Reference

#include "oleview.h"

List of all members.

Public Member Functions

COle2ViewApp ()
virtual int | ExitInstance ()
void | FreeBitmaps ()
virtual BOOL | InitInstance ()
void | LoadBitmaps (BOOL fFree)
afx_msg void | OnAppAbout ()

Public Attributes

UINT m_cyFont
CImageList | m_images
CFont * | m_pFont
CFont * | m_pFontBold
CString | m_szStatusText

Detailed Description

Definition at line 61 of file oleview.h.

Constructor & Destructor Documentation

COle2ViewApp::COle2ViewApp ( )

Definition at line 44 of file oleview.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int COle2ViewApp::ExitInstance ( ) [virtual]

Definition at line 174 of file oleview.cpp.

{
  if (m_pFont)
    delete m_pFont ;

  if (m_pFontBold)
    delete m_pFontBold ;

//    FreeBitmaps() ;

  return CWinApp::ExitInstance() ;
}

void COle2ViewApp::FreeBitmaps ( )

Definition at line 223 of file oleview.cpp.

{
#if 0
  for (int i = IDB_FIRST ; i <= IDB_LAST ; i++)
  {
    FreeABitmap( m_rgbmNorm[BMINDEX(i)]) ;
    FreeABitmap( m_rgbmHigh[BMINDEX(i)]) ;
  }
#else
  m_images.DeleteImageList() ;
#endif
}

BOOL COle2ViewApp::InitInstance ( ) [virtual]

Definition at line 58 of file oleview.cpp.

{
  if (!AfxOleInit()) //OleInitialize(NULL)))
  {
    AfxMessageBox( _T("OleInitialize failed.  Could not initialized OLE 2; Ole2View cannot run.") ) ;
    return FALSE;
  }

  SetRegistryKey( IDS_REGISTRYKEY );

  m_pFont = ReallyCreateFont( NULL, _T("MS Sans Serif"), _T("Regular"), 8, 0 ) ;
  m_pFontBold = ReallyCreateFont( NULL, _T("MS Sans Serif"), _T("Bold"), 8, 0 ) ;

  LoadBitmaps( FALSE ) ;

  TEXTMETRIC  tm ;
  CDC dc ;
  HDC hdc = GetDC( NULL ) ;
  dc.Attach( hdc ) ;

  m_pFont = dc.SelectObject( m_pFont ) ;
  dc.GetTextMetrics( &tm ) ;
  m_pFont = dc.SelectObject( m_pFont ) ;
  dc.Detach();
  ReleaseDC( NULL, hdc ) ;

  m_cyFont = tm.tmHeight + tm.tmExternalLeading ;

  // AutoRegister iviewers if not already registered
  //
//    char szBuf[80] ; LONG cb = sizeof(szBuf) ;
//    if (RegQueryValue(HKEY_CLASSES_ROOT, "Ole2View.ITypeLib.1", szBuf, &cb) != ERROR_SUCCESS)
//    {
    CString str ;
    CString str2 ;
    HINSTANCE hinst = LoadLibrary( "iviewers.dll" ) ;
    if (hinst > (HINSTANCE)HINSTANCE_ERROR)
    {
      // Get DllRegisterServer function
      HRESULT (FAR STDAPICALLTYPE * lpDllEntryPoint)(void);
      (FARPROC&)lpDllEntryPoint = GetProcAddress(hinst, "DllRegisterServer");
      #pragma warning(suppress: 6001) //unexpected uninitialized memory prefast warning
      ENSURE(lpDllEntryPoint);
      if (lpDllEntryPoint)
      {
        HRESULT hr ;
        if (FAILED(hr = (*lpDllEntryPoint)()))
        {
          #pragma warning(suppress: 6031)
          str.LoadString( IDS_AUTOREGFAILED ) ;
          ASSERT(str != "");
          #pragma warning(suppress: 6031)
          str2.LoadString( IDS_IVIEWERSNOTFOUND2 ) ;
          ASSERT(str2 != "");
          str += str2 ;
          AfxMessageBox( str ) ;
        }
      }
      else
      {
        #pragma warning(suppress: 6031)
        str.LoadString( IDS_IVIEWERSNOTFOUND3 ) ;
        ASSERT(str != "");
        #pragma warning(suppress: 6031)
        str2.LoadString( IDS_IVIEWERSNOTFOUND2 ) ;
        ASSERT(str2 != "");
        str += str2 ;
        AfxMessageBox( str ) ;
      }

      FreeLibrary( hinst ) ;
    }
    else
    {

      #pragma warning(suppress: 6031)
      str.LoadString( IDS_IVIEWERSNOTFOUND1 ) ;
      ASSERT(str != "");
      #pragma warning(suppress: 6031)
      str2.LoadString( IDS_IVIEWERSNOTFOUND2 ) ;
      ASSERT(str2 != "");
      str += str2 ;
      #pragma warning(suppress: 6031)
      str2.LoadString( IDS_IVIEWERSNOTFOUND4 ) ;
      ASSERT(str2 != "");
      str += str2 ;
      AfxMessageBox( str ) ;
    }
//    }

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.
  AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME,
      RUNTIME_CLASS(COle2ViewDoc),
      RUNTIME_CLASS(CMainFrame),     // main SDI frame window
      RUNTIME_CLASS(CObjTreeView)));

  int nCmdShow = m_nCmdShow ;
  m_nCmdShow = SW_HIDE ;
  OnFileNew() ;
  ((CMainFrame*)GetMainWnd())->RestorePosition(nCmdShow) ;

  // TODO: If there's something on the command line, try to
  // figure out if it's a
  //  - CLSID or a ProgID: CoCreateInstance the thing
  //  - A filename: Bind to the file, via a FileMoniker
  // Then enum the interfaces as normal.
  //
  if (m_lpCmdLine != NULL && *m_lpCmdLine != '\0')
  {
    AfxMessageBox( IDS_BADCOMMANDLINE ) ;
  }

  return TRUE;
}

void COle2ViewApp::LoadBitmaps ( BOOL fFree )

Definition at line 188 of file oleview.cpp.

{
#if 0
  COLORREF    rgbNorm, rgbHigh ;

  rgbNorm  = GetSysColor( COLOR_WINDOW ) ;
  rgbHigh = GetSysColor( COLOR_HIGHLIGHT ) ;

  if (fFree)
    FreeBitmaps() ;

  for (int i = IDB_FIRST ; i <= IDB_LAST ; i++)
  {
    m_rgbmNorm[BMINDEX(i)] = bmLoadAndTranslate( i, rgbNorm ) ;
    m_rgbmHigh[BMINDEX(i)] = bmLoadAndTranslate( i, rgbHigh ) ;
  }
#else
  if (fFree)
    m_images.DeleteImageList() ;

  if (0 == m_images.Create( IDB_IMAGELIST, 16, 100, RGBLTGREEN ))
  {
    AfxMessageBox("Could not load bitmaps" ) ;
  }
#endif
}

void COle2ViewApp::OnAppAbout ( )

Definition at line 293 of file oleview.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

Member Data Documentation

UINT COle2ViewApp::m_cyFont

Definition at line 68 of file oleview.h.

CImageList COle2ViewApp::m_images

Definition at line 70 of file oleview.h.

CFont* COle2ViewApp::m_pFont

Definition at line 66 of file oleview.h.

CFont* COle2ViewApp::m_pFontBold

Definition at line 67 of file oleview.h.

CString COle2ViewApp::m_szStatusText

Definition at line 72 of file oleview.h.

The documentation for this class was generated from the following files:
  • ole/oleview/oleview.h
  • ole/oleview/oleview.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COle2ViewDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

COle2ViewDoc Class Reference

#include "doc.h"

List of all members.

Public Member Functions

virtual | ~COle2ViewDoc ()

Public Attributes

CLSID | m_clsidCur
DWORD | m_dwClsCtx
BOOL | m_fInterface
BOOL | m_fTypeLib
CString | m_szObjectCur

Protected Member Functions

COle2ViewDoc ()
virtual void | OnCloseDocument ()
virtual BOOL | OnNewDocument ()

Friends

class | CMainFrame
class | CObjTreeView
class | CRegistryView

Detailed Description

Definition at line 18 of file doc.h.

Constructor & Destructor Documentation

COle2ViewDoc::COle2ViewDoc ( ) [protected]

Definition at line 38 of file doc.cpp.

{
  m_clsidCur = GUID_NULL ;
  m_szObjectCur = "" ;
  m_fTypeLib = FALSE ;

  CString szSection ;
  CString szKey ;
  #pragma warning(suppress: 6031)
  szSection.LoadString( IDS_INI_CONFIG ) ;
  ASSERT(szSection != "");

  #pragma warning(suppress: 6031)
  szKey.LoadString( IDS_INI_CLSCTX ) ;
  ASSERT(szKey != "");
  m_dwClsCtx = (DWORD)theApp.GetProfileInt( szSection, szKey, CLSCTX_LOCAL_SERVER | CLSCTX_INPROC_SERVER ) ;

}

COle2ViewDoc::~COle2ViewDoc ( ) [virtual]

Definition at line 57 of file doc.cpp.

{

  CString szSection ;
  CString szKey ;
  #pragma warning(suppress: 6031)
  szSection.LoadString( IDS_INI_CONFIG ) ;
  ASSERT(szSection != "");

  #pragma warning(suppress: 6031)
  szKey.LoadString( IDS_INI_CLSCTX ) ;
  ASSERT(szKey != "");
  theApp.WriteProfileInt( szSection, szKey, (WORD)m_dwClsCtx ) ;

}

Member Function Documentation

void COle2ViewDoc::OnCloseDocument ( ) [protected, virtual]

Definition at line 80 of file doc.cpp.

{
  CDocument::OnCloseDocument();
}

BOOL COle2ViewDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 73 of file doc.cpp.

{
//    if (!CDocument::OnNewDocument())
//        return FALSE;
  return TRUE;
}

Friends And Related Function Documentation

friend class CMainFrame [friend]

Definition at line 22 of file doc.h.

friend class CObjTreeView [friend]

Definition at line 20 of file doc.h.

friend class CRegistryView [friend]

Definition at line 21 of file doc.h.

Member Data Documentation

CLSID COle2ViewDoc::m_clsidCur

Definition at line 30 of file doc.h.

DWORD COle2ViewDoc::m_dwClsCtx

Definition at line 34 of file doc.h.

BOOL COle2ViewDoc::m_fInterface

Definition at line 32 of file doc.h.

BOOL COle2ViewDoc::m_fTypeLib

Definition at line 31 of file doc.h.

CString COle2ViewDoc::m_szObjectCur

Definition at line 29 of file doc.h.

The documentation for this class was generated from the following files:
  • ole/oleview/doc.h
  • ole/oleview/doc.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COleClientApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

COleClientApp Class Reference

#include "oclient.h"

List of all members.

Public Member Functions

COleClientApp ()
virtual BOOL | InitInstance ()

Protected Member Functions

afx_msg void | OnAppAbout ()

Protected Attributes

COleTemplateServer | m_server

Detailed Description

Definition at line 22 of file oclient.h.

Constructor & Destructor Documentation

COleClientApp::COleClientApp ( )

Definition at line 59 of file oclient.cpp.

{
    EnableHtmlHelp();
}

Member Function Documentation

BOOL COleClientApp::InitInstance ( ) [virtual]

Definition at line 67 of file oclient.cpp.

{
#if defined(_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
  // turn on extra memory tracking
  afxMemDF |= checkAlwaysMemDF;
#endif

  // Initialize OLE 2.0 libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_AFXOLEINIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register document templates
  CMultiDocTemplate* pDocTemplate = new CMultiDocTemplate(IDR_OCLIENTTYPE,
      RUNTIME_CLASS(CMainDoc),
      RUNTIME_CLASS(CSplitFrame),
      RUNTIME_CLASS(CMainView));
  pDocTemplate->SetContainerInfo(IDR_OCLIENTTYPE_CNTR_IP);
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // enable file manager drag/drop and DDE Execute open
  m_pMainWnd->DragAcceptFiles();

  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // connect the COleTemplate server to the document template
  m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
  COleTemplateServer::RegisterAll();
    // Note: MDI applications register all class objects regardless of
    //  the /Embedding on the command line.

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  if (RunEmbedded())
  {
    // application was run with /Embedding flag.  Instead of showing
    //  the window, the application waits to receive OLE requests.
    return TRUE;
  }
  // always update system registry when run non-embedded
  m_server.UpdateRegistry(OAT_CONTAINER);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void COleClientApp::OnAppAbout ( ) [protected]

Definition at line 139 of file oclient.cpp.

{
  CDialog(IDD_ABOUTBOX).DoModal();
}

Member Data Documentation

COleTemplateServer COleClientApp::m_server [protected]

Definition at line 32 of file oclient.h.

The documentation for this class was generated from the following files:
  • ole/oclient/oclient.h
  • ole/oclient/oclient.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COlePropertiesEx Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

COlePropertiesEx Class Reference

List of all members.

Public Member Functions

COlePropertiesEx (COleClientItem *pItem, UINT nScaleMin=10, UINT nScaleMax=500, CWnd *pParentWnd=NULL)
virtual BOOL OnApplyScale (COleClientItem *pItem, int nCurrentScale, BOOL bRelativeToOrig)

Detailed Description

Definition at line 1214 of file mainview.cpp.

Constructor & Destructor Documentation

COlePropertiesEx::COlePropertiesEx | ( | COleClientItem * | pItem,
 |  | UINT | nScaleMin = 10,
 |  | UINT | nScaleMax = 500,
 |  | CWnd * | pParentWnd = NULL |
 | ) |  |  | [inline]

Definition at line 1217 of file mainview.cpp.

    : COlePropertiesDialog(pItem, nScaleMin, nScaleMax, pParentWnd)
    { }

Member Function Documentation

BOOL COlePropertiesEx::OnApplyScale | ( | COleClientItem * | pItem,
 |  | int | nCurrentScale,
 |  | BOOL | bRelativeToOrig |
 | ) |  |  | [virtual]

Definition at line 1226 of file mainview.cpp.

{
  if (nCurrentScale != -1)
  {
    ASSERT_VALID(pItem);
    CRectItem* pRectItem = (CRectItem*)pItem;
    ASSERT_KINDOF(CRectItem, pRectItem);

    // reset to original size if necessary
    if (bRelativeToOrig)
      pRectItem->ResetSize();

    // update extent to reflect scaling factor
    pRectItem->Invalidate();
    CSize size = pRectItem->GetSize();
    size.cx = MulDiv(size.cx, nCurrentScale, 100);
    size.cy = MulDiv(size.cy, nCurrentScale, 100);
    pRectItem->SetSize(size);
    pRectItem->Invalidate();
  }
  return TRUE;
}

The documentation for this class was generated from the following file:
  • ole/oclient/mainview.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ColourTableEntry Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

ColourTableEntry Struct Reference

List of all members.

Public Attributes

COLORREF | crColour
TCHAR * | szName

Detailed Description

Definition at line 181 of file formatba.cpp.

Member Data Documentation

COLORREF ColourTableEntry::crColour

Definition at line 182 of file formatba.cpp.

TCHAR* ColourTableEntry::szName

Definition at line 183 of file formatba.cpp.

The documentation for this struct was generated from the following file:
  • vc2008fp/WordPad/formatba.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COnCmdMsg Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

COnCmdMsg Struct Reference

#include "bounce.h"

List of all members.

Public Attributes

int | m_nCode
int | m_nID
void * | m_pExtra
AFX_CMDHANDLERINFO * | m_pHandlerInfo

Detailed Description

Definition at line 21 of file bounce.h.

Member Data Documentation

int COnCmdMsg::m_nCode

Definition at line 24 of file bounce.h.

int COnCmdMsg::m_nID

Definition at line 23 of file bounce.h.

void* COnCmdMsg::m_pExtra

Definition at line 25 of file bounce.h.

AFX_CMDHANDLERINFO* COnCmdMsg::m_pHandlerInfo

Definition at line 26 of file bounce.h.

The documentation for this struct was generated from the following file:
  • advanced/mtmdi/bounce.h
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionsDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

COptionsDlg Class Reference

#include "OptionsDlg.h"

List of all members.

Public Member Functions

COptionsDlg (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
virtual ~COptionsDlg ()

Public Attributes

COptionsPage1 m_Page11
COptionsPage12 m_Page12
COptionsPage21 m_Page21
COptionsPage22 m_Page22
COptionsPage31 m_Page31
COptionsPage32 m_Page32

Detailed Description

Definition at line 17 of file OptionsDlg.h.

Constructor & Destructor Documentation

COptionsDlg::COptionsDlg | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 24 of file OptionsDlg.cpp.

:CMFCPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
  SetLook(CMFCPropertySheet::PropSheetLook_Tree, 150 /* Tree control width */);
  SetIconsList(IDB_OPTIONSIMAGES, 16 /* Image width */);

  CMFCPropertySheetCategoryInfo* pCat1 = AddTreeCategory(_T("Environment"), 0, 1);

  AddPageToTree(pCat1, &m_Page11, -1, 2);
  AddPageToTree(pCat1, &m_Page12, -1, 2);

  CMFCPropertySheetCategoryInfo* pCat2 = AddTreeCategory(_T("Source Control"), 0, 1);

  AddPageToTree(pCat2, &m_Page21, -1, 2);
  AddPageToTree(pCat2, &m_Page22, -1, 2);

  CMFCPropertySheetCategoryInfo* pCat3 = AddTreeCategory(_T("Text Editor"), 0, 1);

  AddPageToTree(pCat3, &m_Page31, -1, 2);
  AddPageToTree(pCat3, &m_Page32, -1, 2);
}

COptionsDlg::~COptionsDlg ( ) [virtual]

Definition at line 46 of file OptionsDlg.cpp.

{
}

Member Data Documentation

COptionsPage1 COptionsDlg::m_Page11

Definition at line 27 of file OptionsDlg.h.

COptionsPage12 COptionsDlg::m_Page12

Definition at line 28 of file OptionsDlg.h.

COptionsPage21 COptionsDlg::m_Page21

Definition at line 29 of file OptionsDlg.h.

COptionsPage22 COptionsDlg::m_Page22

Definition at line 30 of file OptionsDlg.h.

COptionsPage31 COptionsDlg::m_Page31

Definition at line 31 of file OptionsDlg.h.

COptionsPage32 COptionsDlg::m_Page32

Definition at line 32 of file OptionsDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OptionsDlg.h
  • vc2008fp/VisualStudioDemo/OptionsDlg.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionSheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

COptionSheet Class Reference

#include "optionsh.h"

Inherits CCSPropertySheet, and CCSPropertySheet.

List of all members.

Public Member Functions

COptionSheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
COptionSheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
INT_PTR | DoModal ()
INT_PTR | DoModal ()
void | SetPageButtons (CDocOptPage &page, CDockState &ds)
void | SetPageButtons (CDocOptPage &page, CDockState &ds)
void | SetState (CDocOptPage &page, CDockState &ds)
void | SetState (CDocOptPage &page, CDockState &ds)

Public Attributes

CEmbeddedOptPage pageEmbedded
CDocOptPage pageRTF
CDocOptPage pageText
CDocOptPage pageWord
CDocOptPage pageWrite
CUnitsPage units

Detailed Description

Definition at line 15 of file optionsh.h.

Constructor & Destructor Documentation

COptionSheet::COptionSheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 26 of file optionsh.cpp.

  : CCSPropertySheet(nIDCaption, pParentWnd, iSelectPage),
  pageText(IDS_TEXT_OPTIONS), pageRTF(IDS_RTF_OPTIONS),
  pageWord(IDS_WORD6_OPTIONS), pageWrite(IDS_WRITE_OPTIONS),
  pageEmbedded()
{
  units.m_nUnits = theApp.GetUnits();
  units.m_bWordSel = theApp.m_bWordSel;
  pageText.m_nWordWrap = theApp.GetDocOptions(RD_TEXT).m_nWordWrap;
  pageRTF.m_nWordWrap = theApp.GetDocOptions(RD_RICHTEXT).m_nWordWrap;
  pageWord.m_nWordWrap = theApp.GetDocOptions(RD_WINWORD6).m_nWordWrap;
  pageWrite.m_nWordWrap = theApp.GetDocOptions(RD_WRITE).m_nWordWrap;
  pageEmbedded.m_nWordWrap = theApp.GetDocOptions(RD_EMBEDDED).m_nWordWrap;
  SetPageButtons(pageText, theApp.GetDockState(RD_TEXT));
  SetPageButtons(pageRTF, theApp.GetDockState(RD_RICHTEXT));
  SetPageButtons(pageWord, theApp.GetDockState(RD_WINWORD6));
  SetPageButtons(pageWrite, theApp.GetDockState(RD_WRITE));
  SetPageButtons(pageEmbedded, theApp.GetDockState(RD_EMBEDDED));
  SetPageButtons(pageEmbedded, theApp.GetDockState(RD_EMBEDDED, FALSE));
  AddPage(&units);
  AddPage(&pageText);
  AddPage(&pageRTF);
  AddPage(&pageWord);
  AddPage(&pageWrite);
  AddPage(&pageEmbedded);
}

COptionSheet::COptionSheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Member Function Documentation

INT_PTR COptionSheet::DoModal ( void )

Definition at line 119 of file optionsh.cpp.

{
  INT_PTR nRes = CCSPropertySheet::DoModal();
  if (nRes == IDOK)
  {
    SetState(pageText, theApp.GetDockState(RD_TEXT));
    SetState(pageRTF, theApp.GetDockState(RD_RICHTEXT));
    SetState(pageWord, theApp.GetDockState(RD_WINWORD6));
    SetState(pageWrite, theApp.GetDockState(RD_WRITE));
    SetState(pageEmbedded, theApp.GetDockState(RD_EMBEDDED));
    SetState(pageEmbedded, theApp.GetDockState(RD_EMBEDDED, FALSE));
    theApp.SetUnits(units.m_nUnits);
    theApp.m_bWordSel = units.m_bWordSel;
    theApp.GetDocOptions(RD_TEXT).m_nWordWrap = pageText.m_nWordWrap;
    theApp.GetDocOptions(RD_RICHTEXT).m_nWordWrap = pageRTF.m_nWordWrap;
    theApp.GetDocOptions(RD_WINWORD6).m_nWordWrap = pageWord.m_nWordWrap;
    theApp.GetDocOptions(RD_WRITE).m_nWordWrap = pageWrite.m_nWordWrap;
    theApp.GetDocOptions(RD_EMBEDDED).m_nWordWrap = pageEmbedded.m_nWordWrap;
  }
  return nRes;
}

INT_PTR COptionSheet::DoModal ( )
void COptionSheet::SetPageButtons | ( | CDocOptPage & | page,
 |  | CDockState & | ds
 | ) |  |
void COptionSheet::SetPageButtons | ( | CDocOptPage & | page,
 |  | CDockState & | ds
 | ) |  |

Definition at line 53 of file optionsh.cpp.

{
  if (ds.m_arrBarInfo.GetSize() == 0)
  {
    page.m_bFormatBar = page.m_bRulerBar = TRUE;
    page.m_bToolBar = page.m_bStatusBar = TRUE;
  }
  else
  {
    for (int i = 0;i < ds.m_arrBarInfo.GetSize(); i++)
    {
      CControlBarInfo* pInfo = (CControlBarInfo*)ds.m_arrBarInfo[i];
      ENSURE(pInfo != NULL);
      switch (pInfo->m_nBarID)
      {
        case ID_VIEW_FORMATBAR:
          page.m_bFormatBar = page.m_bFormatBar || pInfo->m_bVisible;
          break;
        case ID_VIEW_RULER:
          page.m_bRulerBar = page.m_bRulerBar || pInfo->m_bVisible;
          break;
        case ID_VIEW_TOOLBAR:
          page.m_bToolBar = page.m_bToolBar || pInfo->m_bVisible;
          break;
        case ID_VIEW_STATUS_BAR:
          page.m_bStatusBar = page.m_bStatusBar || pInfo->m_bVisible;
          break;
      }
    }
  }
}

void COptionSheet::SetState | ( | CDocOptPage & | page,
 |  | CDockState & | ds
 | ) |  |

Definition at line 85 of file optionsh.cpp.

{
  for (int i = 0;i < ds.m_arrBarInfo.GetSize(); i++)
  {
    CControlBarInfo* pInfo = (CControlBarInfo*)ds.m_arrBarInfo[i];
    ENSURE(pInfo != NULL);
    switch (pInfo->m_nBarID)
    {
      case ID_VIEW_FORMATBAR:
        pInfo->m_bVisible = page.m_bFormatBar;
        break;
      case ID_VIEW_RULER:
        pInfo->m_bVisible = page.m_bRulerBar;
        break;
      case ID_VIEW_TOOLBAR:
        pInfo->m_bVisible = page.m_bToolBar;
        break;
      case ID_VIEW_STATUS_BAR:
        pInfo->m_bVisible = page.m_bStatusBar;
        break;
    }
  }
}

void COptionSheet::SetState | ( | CDocOptPage & | page,
 |  | CDockState & | ds
 | ) |  |

Member Data Documentation

CEmbeddedOptPage COptionSheet::pageEmbedded

Definition at line 28 of file optionsh.h.

CDocOptPage COptionSheet::pageRTF

Definition at line 25 of file optionsh.h.

CDocOptPage COptionSheet::pageText

Definition at line 24 of file optionsh.h.

CDocOptPage COptionSheet::pageWord

Definition at line 26 of file optionsh.h.

CDocOptPage COptionSheet::pageWrite

Definition at line 27 of file optionsh.h.

CUnitsPage COptionSheet::units

Definition at line 23 of file optionsh.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/optionsh.h
  • vc2008fp/WordPad/optionsh.h
  • ole/wordpad/optionsh.cpp
  • vc2008fp/WordPad/optionsh.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionsPage1 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

COptionsPage1 Class Reference

#include "OptionsPages.h"

List of all members.

Public Types

enum | { IDD = IDD_OPTIONSPAGE1 }

Public Member Functions

COptionsPage1 ()
~COptionsPage1 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 17 of file OptionsPages.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file OptionsPages.h.

{ IDD = IDD_OPTIONSPAGE1 };

Constructor & Destructor Documentation

COptionsPage1::COptionsPage1 ( )

Definition at line 24 of file OptionsPages.cpp.

                             : CMFCPropertyPage(COptionsPage1::IDD)
{
}

COptionsPage1::~COptionsPage1 ( )

Definition at line 28 of file OptionsPages.cpp.

{
}

Member Function Documentation

void COptionsPage1::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 32 of file OptionsPages.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OptionsPages.h
  • vc2008fp/VisualStudioDemo/OptionsPages.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionsPage12 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

COptionsPage12 Class Reference

#include "OptionsPages.h"

List of all members.

Public Types

enum | { IDD = IDD_OPTIONSPAGE2 }

Public Member Functions

COptionsPage12 ()
~COptionsPage12 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 40 of file OptionsPages.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 49 of file OptionsPages.h.

{ IDD = IDD_OPTIONSPAGE2 };

Constructor & Destructor Documentation

COptionsPage12::COptionsPage12 ( )

Definition at line 45 of file OptionsPages.cpp.

                               : CMFCPropertyPage(COptionsPage12::IDD)
{
}

COptionsPage12::~COptionsPage12 ( )

Definition at line 49 of file OptionsPages.cpp.

{
}

Member Function Documentation

void COptionsPage12::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 53 of file OptionsPages.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OptionsPages.h
  • vc2008fp/VisualStudioDemo/OptionsPages.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionsPage21 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

COptionsPage21 Class Reference

#include "OptionsPages.h"

List of all members.

Public Types

enum | { IDD = IDD_OPTIONSPAGE3 }

Public Member Functions

COptionsPage21 ()
~COptionsPage21 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 63 of file OptionsPages.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 72 of file OptionsPages.h.

{ IDD = IDD_OPTIONSPAGE3 };

Constructor & Destructor Documentation

COptionsPage21::COptionsPage21 ( )

Definition at line 66 of file OptionsPages.cpp.

                               : CMFCPropertyPage(COptionsPage21::IDD)
{
}

COptionsPage21::~COptionsPage21 ( )

Definition at line 70 of file OptionsPages.cpp.

{
}

Member Function Documentation

void COptionsPage21::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 74 of file OptionsPages.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OptionsPages.h
  • vc2008fp/VisualStudioDemo/OptionsPages.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionsPage22 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

COptionsPage22 Class Reference

#include "OptionsPages.h"

List of all members.

Public Types

enum | { IDD = IDD_OPTIONSPAGE4 }

Public Member Functions

COptionsPage22 ()
~COptionsPage22 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 86 of file OptionsPages.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 95 of file OptionsPages.h.

{ IDD = IDD_OPTIONSPAGE4 };

Constructor & Destructor Documentation

COptionsPage22::COptionsPage22 ( )

Definition at line 87 of file OptionsPages.cpp.

                               : CMFCPropertyPage(COptionsPage22::IDD)
{
}

COptionsPage22::~COptionsPage22 ( )

Definition at line 91 of file OptionsPages.cpp.

{
}

Member Function Documentation

void COptionsPage22::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 95 of file OptionsPages.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OptionsPages.h
  • vc2008fp/VisualStudioDemo/OptionsPages.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionsPage31 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

COptionsPage31 Class Reference

#include "OptionsPages.h"

List of all members.

Public Types

enum | { IDD = IDD_OPTIONSPAGE5 }

Public Member Functions

COptionsPage31 ()
~COptionsPage31 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 109 of file OptionsPages.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 118 of file OptionsPages.h.

{ IDD = IDD_OPTIONSPAGE5 };

Constructor & Destructor Documentation

COptionsPage31::COptionsPage31 ( )

Definition at line 108 of file OptionsPages.cpp.

                               : CMFCPropertyPage(COptionsPage31::IDD)
{
}

COptionsPage31::~COptionsPage31 ( )

Definition at line 112 of file OptionsPages.cpp.

{
}

Member Function Documentation

void COptionsPage31::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 116 of file OptionsPages.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OptionsPages.h
  • vc2008fp/VisualStudioDemo/OptionsPages.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COptionsPage32 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

COptionsPage32 Class Reference

#include "OptionsPages.h"

List of all members.

Public Types

enum | { IDD = IDD_OPTIONSPAGE6 }

Public Member Functions

COptionsPage32 ()
~COptionsPage32 ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 132 of file OptionsPages.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 141 of file OptionsPages.h.

{ IDD = IDD_OPTIONSPAGE6 };

Constructor & Destructor Documentation

COptionsPage32::COptionsPage32 ( )

Definition at line 129 of file OptionsPages.cpp.

                               : CMFCPropertyPage(COptionsPage32::IDD)
{
}

COptionsPage32::~COptionsPage32 ( )

Definition at line 133 of file OptionsPages.cpp.

{
}

Member Function Documentation

void COptionsPage32::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 137 of file OptionsPages.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OptionsPages.h
  • vc2008fp/VisualStudioDemo/OptionsPages.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutlookDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions

COutlookDemoApp Class Reference

#include "OutlookDemo.h"

List of all members.

Public Types

enum | OUTLOOK_FRAME { MainFrame, MailFrame }

Public Member Functions

COutlookDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
afx_msg void | OnViewAppLook ()
virtual void | PreLoadState ()
void | SetActiveFrame (OUTLOOK_FRAME frame)

Detailed Description

Definition at line 23 of file OutlookDemo.h.

Member Enumeration Documentation

enum COutlookDemoApp::OUTLOOK_FRAME
Enumerator:
MainFrame
MailFrame

Definition at line 30 of file OutlookDemo.h.

  {
    MainFrame, MailFrame
  };

Constructor & Destructor Documentation

COutlookDemoApp::COutlookDemoApp ( )

Definition at line 41 of file OutlookDemo.cpp.

{
  m_bLoadSaveFrameBarsOnly = TRUE;
}

Member Function Documentation

int COutlookDemoApp::ExitInstance ( ) [virtual]

Definition at line 132 of file OutlookDemo.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL COutlookDemoApp::InitInstance ( ) [virtual]

Definition at line 54 of file OutlookDemo.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options(including MRU)

  SetActiveFrame(MainFrame);

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();
  InitShellManager();

  InitTooltipManager();

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  theApp.GetTooltipManager()->SetTooltipParams(0xFFFF, RUNTIME_CLASS(CMFCToolTipCtrl), &params);

  // Enable user-defined tools. If you want allow more than 10 tools, // add tools entry to resources(ID_USER_TOOL11, ID_USER_TOOL12,...)
  EnableUserTools(ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10);

  // 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(COutlookDemoDoc), RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(COutlookDemoView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  LoadCustomState();

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  if (afxGlobalData.m_nBitsPerPixel < 16)
  {
    AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
  }

  // Set application general look:
  CAppLookDlg dlg(TRUE);
  dlg.DoModal();

  return TRUE;
}

void COutlookDemoApp::OnAppAbout ( )

Definition at line 223 of file OutlookDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void COutlookDemoApp::OnViewAppLook ( )

Definition at line 232 of file OutlookDemo.cpp.

{
  CAppLookDlg dlg(FALSE);
  dlg.DoModal();
}

void COutlookDemoApp::PreLoadState ( ) [virtual]

Definition at line 137 of file OutlookDemo.cpp.

{

  GetContextMenuManager()->AddMenu(_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

void COutlookDemoApp::SetActiveFrame ( OUTLOOK_FRAME frame )

Definition at line 145 of file OutlookDemo.cpp.

{
  CString strOldRegPath = GetRegSectionPath();

  // Save user tools:
  if (GetUserToolsManager() != NULL)
  {
    GetUserToolsManager()->SaveState(GetRegSectionPath());
  }

  switch (frame)
  {
  case MainFrame:
    SetRegistryBase(_T("Main Frame Settings"));
    break;

  case MailFrame:
    SetRegistryBase(_T("Mail Settings"));
    break;

  default:
    ASSERT(FALSE);
  }

  // Load user tools:
  if (GetUserToolsManager() != NULL)
  {
    GetUserToolsManager()->LoadState(strOldRegPath);
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/OutlookDemo.h
  • vc2008fp/OutlookDemo/OutlookDemo.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutlookDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

COutlookDemoDoc Class Reference

#include "OutlookDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~COutlookDemoDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

COutlookDemoDoc ()
afx_msg void | OnAddressBook ()
afx_msg void | OnFindContact ()
afx_msg void | OnNewAppointment ()
afx_msg void | OnNewContract ()
afx_msg void | OnNewDistributionList ()
afx_msg void | OnNewFax ()
afx_msg void | OnNewFolder ()
afx_msg void | OnNewJournalEntry ()
afx_msg void | OnNewMail ()
afx_msg void | OnNewMeeting ()
afx_msg void | OnNewNote ()
afx_msg void | OnNewPostFolder ()
afx_msg void | OnNewShortcut ()
afx_msg void | OnNewTask ()
afx_msg void | OnNewTaskRequest ()
afx_msg void | OnRulesWizard ()
afx_msg void | OnSendReceive ()
afx_msg void | OnViewBack ()
afx_msg void | OnViewUp ()
afx_msg void | OnWebAddress ()
afx_msg void | OnWebBack ()
afx_msg void | OnWebFind ()
afx_msg void | OnWebRefresh ()
afx_msg void | OnWebStart ()

Detailed Description

Definition at line 12 of file OutlookDemoDoc.h.

Constructor & Destructor Documentation

COutlookDemoDoc::COutlookDemoDoc ( ) [protected]

Definition at line 58 of file OutlookDemoDoc.cpp.

{
  // TODO: add one-time construction code here

}

COutlookDemoDoc::~COutlookDemoDoc ( ) [virtual]

Definition at line 64 of file OutlookDemoDoc.cpp.

{
}

Member Function Documentation

void COutlookDemoDoc::OnAddressBook ( ) [protected]

Definition at line 190 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnFindContact ( ) [protected]

Definition at line 196 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewAppointment ( ) [protected]

Definition at line 112 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewContract ( ) [protected]

Definition at line 118 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewDistributionList ( ) [protected]

Definition at line 124 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

BOOL COutlookDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 68 of file OutlookDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  //(SDI documents will reuse this document)

  return TRUE;
}

void COutlookDemoDoc::OnNewFax ( ) [protected]

Definition at line 130 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewFolder ( ) [protected]

Definition at line 136 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewJournalEntry ( ) [protected]

Definition at line 142 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewMail ( ) [protected]

Definition at line 250 of file OutlookDemoDoc.cpp.

{
  theApp.SaveState();

  CMailFrame* pMailFrame = new CMailFrame;

  CCreateContext context;

  context.m_pCurrentDoc = this;
  context.m_pCurrentFrame = NULL;
  context.m_pNewDocTemplate = NULL;
  context.m_pLastView = NULL;
  context.m_pNewViewClass = RUNTIME_CLASS(CMailView);

  pMailFrame->LoadFrame(IDR_MAILFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, &context);

  pMailFrame->ShowWindow(SW_SHOW);
}

void COutlookDemoDoc::OnNewMeeting ( ) [protected]

Definition at line 148 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewNote ( ) [protected]

Definition at line 154 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewPostFolder ( ) [protected]

Definition at line 160 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewShortcut ( ) [protected]

Definition at line 166 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewTask ( ) [protected]

Definition at line 172 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnNewTaskRequest ( ) [protected]

Definition at line 178 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnRulesWizard ( ) [protected]

Definition at line 244 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnSendReceive ( ) [protected]

Definition at line 184 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnViewBack ( ) [protected]

Definition at line 238 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnViewUp ( ) [protected]

Definition at line 232 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnWebAddress ( ) [protected]

Definition at line 202 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnWebBack ( ) [protected]

Definition at line 208 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnWebFind ( ) [protected]

Definition at line 214 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnWebRefresh ( ) [protected]

Definition at line 220 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::OnWebStart ( ) [protected]

Definition at line 226 of file OutlookDemoDoc.cpp.

{
  // TODO: Add your command handler code here

}

void COutlookDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 82 of file OutlookDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/OutlookDemoDoc.h
  • vc2008fp/OutlookDemo/OutlookDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutlookDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

COutlookDemoView Class Reference

#include "OutlookDemoView.h"

List of all members.

Public Member Functions

virtual | ~COutlookDemoView ()
COutlookDemoDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

COutlookDemoView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual void | OnInitialUpdate ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnUpdateViewPreviewPane (CCmdUI *pCmdUI)
afx_msg void | OnViewPreviewPane ()

Protected Attributes

CImageList | m_ImagesHeader
CImageList | m_ImagesList

Detailed Description

Definition at line 12 of file OutlookDemoView.h.

Constructor & Destructor Documentation

COutlookDemoView::COutlookDemoView ( ) [protected]

Definition at line 41 of file OutlookDemoView.cpp.

{
  // TODO: add construction code here
}

COutlookDemoView::~COutlookDemoView ( ) [virtual]

Definition at line 46 of file OutlookDemoView.cpp.

{
}

Member Function Documentation

COutlookDemoDoc * COutlookDemoView::GetDocument ( ) [inline]

Definition at line 56 of file OutlookDemoView.h.

{ return(COutlookDemoDoc*)m_pDocument; }

void COutlookDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 88 of file OutlookDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

void COutlookDemoView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 122 of file OutlookDemoView.cpp.

{
  theApp.ShowPopupMenu(IDR_CONTEXT_MENU, point, this);
}

int COutlookDemoView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 139 of file OutlookDemoView.cpp.

{
  if (CListView::OnCreate(lpCreateStruct) == -1)
    return -1;

  const int nImageWidth = 12;

  m_ImagesHeader.Create(IDB_HEADER_IMAGES, nImageWidth, 0, RGB(255, 0, 255));

  CBitmap bmp;
  if (bmp.LoadBitmap(IDB_LIST_IMAGES))
  {
    m_ImagesList.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 0);
    m_ImagesList.Add(&bmp, RGB(255, 0, 255));
  }

  CListCtrl& wndList = GetListCtrl();
  wndList.SetExtendedStyle(LVS_EX_FULLROWSELECT);

  wndList.SetImageList(&m_ImagesList, LVSIL_SMALL);

  wndList.InsertColumn(0, _T("From"), LVCFMT_LEFT, 100);
  wndList.InsertColumn(1, _T("Subject"), LVCFMT_LEFT, 200);

  CHeaderCtrl* pHeaderCtrl = (CHeaderCtrl*) wndList.GetDlgItem(0);
  ASSERT_VALID(pHeaderCtrl);

  pHeaderCtrl->SetImageList(&m_ImagesHeader);

  LVCOLUMN lvColumn;
  memset(&lvColumn, 0, sizeof(LVCOLUMN));
  lvColumn.mask = LVCF_IMAGE | LVCF_WIDTH;
  lvColumn.fmt = LVCFMT_COL_HAS_IMAGES;
  lvColumn.cx = nImageWidth * 2 + 4;

  lvColumn.iImage = 0;
  wndList.InsertColumn(2, &lvColumn);

  lvColumn.iImage = 1;
  wndList.InsertColumn(3, &lvColumn);

  lvColumn.iImage = 2;
  wndList.InsertColumn(4, &lvColumn);

  static int nColumsOrder [] = { 2, 3, 4, 0, 1 };
  wndList.SetColumnOrderArray(sizeof(nColumsOrder) / sizeof(int), nColumsOrder);

  return 0;
}

void COutlookDemoView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 59 of file OutlookDemoView.cpp.

{
}

void COutlookDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 93 of file OutlookDemoView.cpp.

{
  // TODO: add cleanup after printing
}

void COutlookDemoView::OnFilePrintPreview ( ) [protected]

Definition at line 77 of file OutlookDemoView.cpp.

{
  AFXPrintPreview(this);
}

void COutlookDemoView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 63 of file OutlookDemoView.cpp.

{
  CListView::OnInitialUpdate();

  CListCtrl& wndList = GetListCtrl();
  wndList.DeleteAllItems();

  wndList.InsertItem(0, _T("Microsoft"), 1);
  wndList.SetItemText(0, 1, _T("Welcome to MFC!"));
}

BOOL COutlookDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 82 of file OutlookDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void COutlookDemoView::OnUpdateViewPreviewPane ( CCmdUI * pCmdUI ) [protected]

Definition at line 133 of file OutlookDemoView.cpp.

{
  // TODO: Add your command update UI handler code here

}

void COutlookDemoView::OnViewPreviewPane ( ) [protected]

Definition at line 127 of file OutlookDemoView.cpp.

{
  // TODO: Add your command handler code here

}

BOOL COutlookDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 50 of file OutlookDemoView.cpp.

{
  cs.style |= LVS_REPORT;
  return CListView::PreCreateWindow(cs);
}

Member Data Documentation

CImageList COutlookDemoView::m_ImagesHeader [protected]

Definition at line 23 of file OutlookDemoView.h.

CImageList COutlookDemoView::m_ImagesList [protected]

Definition at line 24 of file OutlookDemoView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/OutlookDemoView.h
  • vc2008fp/OutlookDemo/OutlookDemoView.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutlookMultiViewsApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

COutlookMultiViewsApp Class Reference

#include "OutlookMultiViews.h"

List of all members.

Public Member Functions

COutlookMultiViewsApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 14 of file OutlookMultiViews.h.

Constructor & Destructor Documentation

COutlookMultiViewsApp::COutlookMultiViewsApp ( )

Definition at line 29 of file OutlookMultiViews.cpp.

                                             : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int COutlookMultiViewsApp::ExitInstance ( ) [virtual]

Definition at line 157 of file OutlookMultiViews.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL COutlookMultiViewsApp::InitInstance ( ) [virtual]

Definition at line 43 of file OutlookMultiViews.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(COutlookMultiViewsDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(COutlookMultiViewsView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  ((CMainFrame*)m_pMainWnd)->InitViews ();

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void COutlookMultiViewsApp::OnAppAbout ( )

Definition at line 148 of file OutlookMultiViews.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void COutlookMultiViewsApp::PreLoadState ( ) [virtual]

Definition at line 162 of file OutlookMultiViews.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookMultiViews/OutlookMultiViews.h
  • vc2008fp/OutlookMultiViews/OutlookMultiViews.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutlookMultiViewsDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

COutlookMultiViewsDoc Class Reference

#include "OutlookMultiViewsDoc.h"

List of all members.

Public Member Functions

virtual | ~COutlookMultiViewsDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

COutlookMultiViewsDoc ()

Detailed Description

Definition at line 3 of file OutlookMultiViewsDoc.h.

Constructor & Destructor Documentation

COutlookMultiViewsDoc::COutlookMultiViewsDoc ( ) [protected]

Definition at line 23 of file OutlookMultiViewsDoc.cpp.

{
  // TODO: add one-time construction code here

}

COutlookMultiViewsDoc::~COutlookMultiViewsDoc ( ) [virtual]

Definition at line 29 of file OutlookMultiViewsDoc.cpp.

{
}

Member Function Documentation

BOOL COutlookMultiViewsDoc::OnNewDocument ( ) [virtual]

Definition at line 33 of file OutlookMultiViewsDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void COutlookMultiViewsDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 49 of file OutlookMultiViewsDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.h
  • vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutlookMultiViewsView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

COutlookMultiViewsView Class Reference

#include "OutlookMultiViewsView.h"

List of all members.

Public Member Functions

virtual | ~COutlookMultiViewsView ()
COutlookMultiViewsDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

COutlookMultiViewsView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 3 of file OutlookMultiViewsView.h.

Constructor & Destructor Documentation

COutlookMultiViewsView::COutlookMultiViewsView ( ) [protected]

Definition at line 32 of file OutlookMultiViewsView.cpp.

{
  // TODO: add construction code here

}

COutlookMultiViewsView::~COutlookMultiViewsView ( ) [virtual]

Definition at line 38 of file OutlookMultiViewsView.cpp.

{
}

Member Function Documentation

COutlookMultiViewsDoc * COutlookMultiViewsView::GetDocument ( ) [inline]

Definition at line 41 of file OutlookMultiViewsView.h.

   { return (COutlookMultiViewsDoc*)m_pDocument; }

void COutlookMultiViewsView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 102 of file OutlookMultiViewsView.cpp.

{
  // TODO: add extra initialization before printing
}

void COutlookMultiViewsView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 136 of file OutlookMultiViewsView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void COutlookMultiViewsView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 53 of file OutlookMultiViewsView.cpp.

{
//  COutlookMultiViewsDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  CDrawingManager dm (*pDC);

  dm.FillGradient2 (rectFrame, RGB (246, 241, 178), RGB (234, 223, 67), 35);

  pDC->Draw3dRect (rectFrame, RGB (168, 158, 18), RGB (168, 158, 18));

  pDC->SetBkMode (TRANSPARENT);
  pDC->SetTextColor (0);
  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
  pDC->SelectObject (pFontOld);
}

void COutlookMultiViewsView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 107 of file OutlookMultiViewsView.cpp.

{
  // TODO: add cleanup after printing
}

void COutlookMultiViewsView::OnFilePrintPreview ( ) [protected]

Definition at line 91 of file OutlookMultiViewsView.cpp.

{
  AFXPrintPreview (this);
}

BOOL COutlookMultiViewsView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 96 of file OutlookMultiViewsView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL COutlookMultiViewsView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 42 of file OutlookMultiViewsView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookMultiViews/OutlookMultiViewsView.h
  • vc2008fp/OutlookMultiViews/OutlookMultiViewsView.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutputBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

COutputBar Class Reference

#include "OutputBar.h"

List of all members.

Public Member Functions

COutputBar ()
COutputBar ()
COutputBar ()
COutputBar ()
virtual | ~COutputBar ()
virtual | ~COutputBar ()
virtual | ~COutputBar ()
virtual | ~COutputBar ()
void | AddTab (LPCTSTR lpszName, UINT nID)
void | ClearTabs ()
void | SetFlatTabs (BOOL bFlat=TRUE, BOOL bRepaint=TRUE)

Protected Member Functions

void | AdjusrHorzScroll (CListBox &wndListBox)
void | FillBuildWindow ()
void | FillDebugWindow ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnEditCopy ()
afx_msg void | OnFilePrint ()
afx_msg void | OnFileSaveAs ()
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

CFont | m_Font
CListCtrl | m_wndList1
CListCtrl | m_wndList2
CListCtrl | m_wndList3
COutputList1 m_wndOutputBuild
COutputList1 m_wndOutputDebug
COutputList1 m_wndOutputFind1
COutputList1 m_wndOutputFind2
COutputList1 m_wndOutputSQL
CMFCTabCtrl | m_wndTabs
COutputToolBar m_wndToolBar

Detailed Description

Definition at line 28 of file OutputBar.h.

Constructor & Destructor Documentation

COutputBar::COutputBar ( )

Definition at line 29 of file OutputBar.cpp.

{
}

COutputBar::~COutputBar ( ) [virtual]

Definition at line 33 of file OutputBar.cpp.

{
}

COutputBar::COutputBar ( )
virtual COutputBar::~COutputBar ( ) [virtual]
COutputBar::COutputBar ( )
virtual COutputBar::~COutputBar ( ) [virtual]
COutputBar::COutputBar ( )
virtual COutputBar::~COutputBar ( ) [virtual]

Member Function Documentation

void COutputBar::AddTab | ( | LPCTSTR | lpszName,
 |  | UINT | nID
 | ) |  |

Definition at line 125 of file OutputBar.cpp.

{
  std::auto_ptr<CEdit> apWndEdit(new CEdit ());

  apWndEdit->Create (WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
    ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL,
    CRect (0, 0, 0, 0), &m_wndTabs, 1);
  apWndEdit->SetReadOnly ();
  apWndEdit->SetFont (m_Font.GetSafeHandle () == NULL ? &afxGlobalData.fontRegular : &m_Font);

  if (nID != 0)
  {
    LPCTSTR lpszResourceName = MAKEINTRESOURCE (nID);
    ASSERT(lpszResourceName != NULL);

    HINSTANCE hInst = AfxFindResourceHandle (lpszResourceName, _T("CODE"));
    HRSRC hRsrc = ::FindResource (hInst, lpszResourceName, _T("CODE"));

    if (hRsrc == NULL)
    {
      ASSERT(FALSE);
    }
    else
    {
      DWORD dwSize = SizeofResource (hInst, hRsrc);
      HGLOBAL hGlobal = NULL;
      if (dwSize != NULL)
      {
        hGlobal = LoadResource (hInst, hRsrc);
      }

      if (hGlobal == NULL)
      {
        ASSERT(FALSE);
      }
      else
      {
        TCHAR* lpszText = new TCHAR[dwSize + 1];
        LPCSTR lpszResourceText = (LPCSTR)LockResource(hGlobal);
#ifdef UNICODE
        MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, lpszResourceText, dwSize, lpszText, dwSize);
#else
        memcpy (lpszText, lpszResourceText, dwSize);
#endif
        lpszText[dwSize] = 0;

        if (lpszText == NULL)
        {
          ASSERT(FALSE);
        }
        else
        {
          apWndEdit->SetWindowText(lpszText);
          delete[] lpszText;
        }

        UnlockResource(hGlobal);
        FreeResource(hGlobal);
      }
    }
  }

  m_wndTabs.AddTab (apWndEdit.release(), lpszName, (UINT)-1, FALSE);
}

void COutputBar::AdjusrHorzScroll ( CListBox & wndListBox ) [protected]

Definition at line 109 of file OutputBar.cpp.

{
  CClientDC dc(this);
  CFont* pOldFont = dc.SelectObject(&m_Font);

  int cxExtentMax = 0;

  for (int i = 0; i < wndListBox.GetCount(); i ++)
  {
    CString strItem;
    wndListBox.GetText(i, strItem);

    cxExtentMax = max(cxExtentMax, dc.GetTextExtent(strItem).cx);
  }

  wndListBox.SetHorizontalExtent(cxExtentMax);
  dc.SelectObject(pOldFont);
}

void COutputBar::ClearTabs ( )

Definition at line 113 of file OutputBar.cpp.

{
  for (int i = 0; i < m_wndTabs.GetTabsNum (); i++)
  {
    CWnd* pWnd = m_wndTabs.GetTabWnd (i);
    pWnd->DestroyWindow ();
    delete pWnd;
  }

  m_wndTabs.RemoveAllTabs ();
}

void COutputBar::FillBuildWindow ( ) [protected]

Definition at line 128 of file OutputBar.cpp.

{
  m_wndOutputBuild.AddString(_T("--------------------Configuration: Hello - Win32 Debug--------------------"));
  m_wndOutputBuild.AddString(_T("Compiling..."));
  m_wndOutputBuild.AddString(_T("Hello.cpp..."));
  m_wndOutputBuild.AddString(_T("Linking..."));
  m_wndOutputBuild.AddString(_T(""));
  m_wndOutputBuild.AddString(_T("Hello.exe - 0 error(s), 0 warning(s)"));

}

void COutputBar::FillDebugWindow ( ) [protected]

Definition at line 139 of file OutputBar.cpp.

{
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\ntdll.dll', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\winmm.dll', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\USER32.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\KERNEL32.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\GDI32.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\ADVAPI32.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\RPCRT4.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded symbols for 'C:\\WINNT\\System32\\MFC42D.DLL'"));
  m_wndOutputDebug.AddString(_T("Loaded symbols for 'C:\\WINNT\\System32\\MSVCRTD.DLL'"));
  m_wndOutputDebug.AddString(_T("Loaded symbols for 'C:\\WINNT\\System32\\MFCO42D.DLL'"));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\MMDRV.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\sndblst.dll', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\COMCTL32.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("CONTROLBAR.DLL Initializing!"));
  m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\OLE32.DLL', no matching symbolic information found."));
  m_wndOutputDebug.AddString(_T("The thread 0x142 has exited with code 0(0x0)."));
  m_wndOutputDebug.AddString(_T("CONTROLBAR.DLL Terminating!"));
  m_wndOutputDebug.AddString(_T("The thread 0x15C has exited with code 0(0x0)."));
  m_wndOutputDebug.AddString(_T("The program 'Hello.exe' has exited with code 0(0x0)."));
}

afx_msg int COutputBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int COutputBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int COutputBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int COutputBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 51 of file OutputBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  // Create tabs window:
  if (!m_wndTabs.Create (CMFCTabCtrl::STYLE_FLAT, CRect (0, 0, 0, 0), this, 1))
  {
    TRACE0("Failed to create output tab window\n");
    return -1;      // fail to create
  }

  // Create toolbar:
  m_wndTabs.SetFlatFrame (FALSE, FALSE);
  m_wndTabs.AutoDestroyWindow (FALSE);

  m_wndToolBar.Create (this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_CODE);
  m_wndToolBar.LoadToolBar (IDR_CODE, 0, 0, TRUE /* Is locked */);

  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
    CBRS_TOOLTIPS | CBRS_FLYBY);

  m_wndToolBar.SetPaneStyle (
    m_wndToolBar.GetPaneStyle () &
      ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));

  m_wndToolBar.SetOwner (this);

  // All commands will be routed via this control , not via the parent frame:
  m_wndToolBar.SetRouteCommandsViaFrame (FALSE);

  m_Font.CreateFont
    (
      -12, 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET,
      OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
      DEFAULT_PITCH, _T("Courier")
    );

  return 0;
}

void COutputBar::OnDestroy ( void ) [protected]

Definition at line 190 of file OutputBar.cpp.

{
  ClearTabs ();
  CDockablePane::OnDestroy();
}

void COutputBar::OnEditCopy ( ) [protected]

Definition at line 196 of file OutputBar.cpp.

{
  CEdit* pWndEdit = (CEdit*) m_wndTabs.GetActiveWnd ();
  ASSERT_VALID (pWndEdit);

  pWndEdit->Copy ();
}

void COutputBar::OnFilePrint ( ) [protected]

Definition at line 316 of file OutputBar.cpp.

{
  CEdit* pWndEdit = (CEdit*) m_wndTabs.GetActiveWnd ();
  ASSERT_VALID (pWndEdit);

  CString strText;
  pWndEdit->GetWindowText (strText);
  if (strText.IsEmpty ())
  {
    return;
  }

    CDC dc;
    CPrintDialog printDlg(FALSE);

    if (printDlg.DoModal() == IDCANCEL)
  {
        return;
  }

    dc.Attach(printDlg.GetPrinterDC());
    dc.m_bPrinting = TRUE;

    DOCINFO di;
    ::ZeroMemory (&di, sizeof (DOCINFO));
    di.cbSize = sizeof (DOCINFO);
    di.lpszDocName = _T("code");

    BOOL bPrintingOK = dc.StartDoc(&di);

  if (bPrintingOK)
  {
    CFont* pFont = pWndEdit->GetFont ();
    ASSERT_VALID (pFont);

    LOGFONT lf;
    pFont->GetLogFont (&lf);
    lf.lfHeight = -::MulDiv (abs(lf.lfHeight), dc.GetDeviceCaps(LOGPIXELSY), 72);

    CFont font;
    if (font.CreateFontIndirect (&lf))
    {
      CFont* pOldFont = (CFont*)dc.SelectObject (&font);

      CRect rect (0, 0,dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
      dc.DrawText (strText, rect, DT_WORDBREAK | DT_EXPANDTABS | DT_NOPREFIX);

      if (pOldFont != NULL)
      {
        dc.SelectObject (pOldFont);
      }

      dc.EndDoc();
    }
    else
    {
      bPrintingOK = FALSE;
    }
  }

  if (!bPrintingOK)
  {
    dc.AbortDoc();
  }

    dc.DeleteDC();
}

void COutputBar::OnFileSaveAs ( ) [protected]

Definition at line 271 of file OutputBar.cpp.

{
  CEdit* pWndEdit = (CEdit*) m_wndTabs.GetActiveWnd ();
  ASSERT_VALID (pWndEdit);

  CString strText;
  pWndEdit->GetWindowText (strText);
  if (strText.IsEmpty ())
  {
    return;
  }

  CFileDialog dlgFile(FALSE, _T("txt"), _T("Code.txt"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("Text Documents (*.txt)|*.txt||"));
  if (dlgFile.DoModal() != IDOK)
  {
    return;
  }

  CString strPathName (dlgFile.GetPathName ());

  CFileException fe;
  CFile file;
  if (file.Open(strPathName, CFile::modeCreate |
          CFile::modeWrite | CFile::shareExclusive, &fe))
  {
    TRY
    {
      CWaitCursor wait;
      file.Write((LPCTSTR)strText, strText.GetLength () * sizeof(TCHAR));
      file.Close ();
    }
    CATCH_ALL(e)
    {
      file.Abort ();
      ErrorReport (strPathName, e);
      do { e->Delete(); } while (0);
    }
    END_CATCH_ALL
  }
  else
  {
    ErrorReport (strPathName, &fe);
  }
}

afx_msg void COutputBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
afx_msg void COutputBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
afx_msg void COutputBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
void COutputBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 92 of file OutputBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);

  CRect rectClient,rectCombo;
  GetClientRect (rectClient);

  int cyTlb = m_wndToolBar.CalcFixedLayout (FALSE, TRUE).cy;

  m_wndToolBar.SetWindowPos (NULL,
                 rectClient.left,
                 rectClient.top,
                 rectClient.Width (),
                 cyTlb,
                 SWP_NOACTIVATE | SWP_NOZORDER);

  m_wndTabs.SetWindowPos (NULL, rectClient.left, rectClient.top + cyTlb,
    rectClient.Width (), rectClient.Height () - cyTlb,
    SWP_NOACTIVATE | SWP_NOZORDER);
}

void COutputBar::SetFlatTabs | ( | BOOL | bFlat = TRUE,
 |  | BOOL | bRepaint = TRUE |
 | ) |  |  | [inline]

Definition at line 58 of file OutputBar.h.

  {
    m_wndTabs.SetFlatFrame(bFlat, bRepaint);
  }

Member Data Documentation

CFont COutputBar::m_Font [protected]

Definition at line 38 of file OutputBar.h.

CListCtrl COutputBar::m_wndList1 [protected]

Definition at line 23 of file OutputBar.h.

CListCtrl COutputBar::m_wndList2 [protected]

Definition at line 24 of file OutputBar.h.

CListCtrl COutputBar::m_wndList3 [protected]

Definition at line 25 of file OutputBar.h.

COutputList1 COutputBar::m_wndOutputBuild [protected]

Definition at line 50 of file OutputBar.h.

COutputList1 COutputBar::m_wndOutputDebug [protected]

Definition at line 51 of file OutputBar.h.

COutputList1 COutputBar::m_wndOutputFind1 [protected]

Definition at line 52 of file OutputBar.h.

COutputList1 COutputBar::m_wndOutputFind2 [protected]

Definition at line 53 of file OutputBar.h.

COutputList1 COutputBar::m_wndOutputSQL [protected]

Definition at line 54 of file OutputBar.h.

CMFCTabCtrl COutputBar::m_wndTabs [protected]

Definition at line 36 of file OutputBar.h.

COutputToolBar COutputBar::m_wndToolBar [protected]

Definition at line 37 of file OutputBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonGadgets/OutputBar.h
  • vc2008fp/RibbonMDI/OutputBar.h
  • vc2008fp/StateCollection/OutputBar.h
  • vc2008fp/VisualStudioDemo/OutputBar.h
  • vc2008fp/RibbonGadgets/OutputBar.cpp
  • vc2008fp/RibbonMDI/OutputBar.cpp
  • vc2008fp/StateCollection/OutputBar.cpp
  • vc2008fp/VisualStudioDemo/OutputBar.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutputList Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

COutputList Class Reference

#include "OutputView.h"

List of all members.

Public Member Functions

COutputList ()
virtual | ~COutputList ()

Protected Member Functions

afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnOutputGotoError ()
afx_msg void | OnViewOutput ()

Detailed Description

Definition at line 15 of file OutputView.h.

Constructor & Destructor Documentation

COutputList::COutputList ( )

Definition at line 102 of file OutputView.cpp.

{
}

COutputList::~COutputList ( ) [virtual]

Definition at line 106 of file OutputView.cpp.

{
}

Member Function Documentation

void COutputList::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 121 of file OutputView.cpp.

{
  CMenu menu;
  menu.LoadMenu(IDR_POPUP_OUTPUT);

  CMenu* pSumMenu = menu.GetSubMenu(0);

  if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
  {
    CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;

    if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
      return;

    ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
    UpdateDialogControls(this, FALSE);
  }

  SetFocus();
}

void COutputList::OnEditClear ( ) [protected]

Definition at line 147 of file OutputView.cpp.

{
  MessageBox(_T("Clear output"));
}

void COutputList::OnEditCopy ( ) [protected]

Definition at line 142 of file OutputView.cpp.

{
  MessageBox(_T("Copy output"));
}

void COutputList::OnOutputGotoError ( ) [protected]

Definition at line 152 of file OutputView.cpp.

{
  // TODO: Add your command handler code here
}

void COutputList::OnViewOutput ( ) [protected]

Definition at line 157 of file OutputView.cpp.

{
  CDockablePane* pParentBar = DYNAMIC_DOWNCAST(CDockablePane, GetOwner());
  CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, GetTopLevelFrame());

  if (pMainFrame != NULL && pParentBar != NULL)
  {
    pMainFrame->SetFocus();
    pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE);
    pMainFrame->RecalcLayout();

  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OutputView.h
  • vc2008fp/VisualStudioDemo/OutputView.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutputList1 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

COutputList1 Class Reference

#include "OutputBar.h"

List of all members.

Public Member Functions

COutputList1 ()
virtual | ~COutputList1 ()

Protected Member Functions

afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnOutputGotoError ()
afx_msg void | OnViewOutput ()
afx_msg void | OnWindowPosChanging (WINDOWPOS FAR *lpwndpos)

Detailed Description

Definition at line 15 of file OutputBar.h.

Constructor & Destructor Documentation

COutputList1::COutputList1 ( )

Definition at line 164 of file OutputBar.cpp.

{
}

COutputList1::~COutputList1 ( ) [virtual]

Definition at line 168 of file OutputBar.cpp.

{
}

Member Function Documentation

void COutputList1::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 193 of file OutputBar.cpp.

{
  CMenu menu;
  menu.LoadMenu(IDR_POPUP_OUTPUT);

  CMenu* pSumMenu = menu.GetSubMenu(0);

  if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
  {
    CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;

    if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
      return;

    ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
    UpdateDialogControls(this, FALSE);
  }
}

void COutputList1::OnEditClear ( ) [protected]

Definition at line 217 of file OutputBar.cpp.

{
  MessageBox(_T("Clear output"));
}

void COutputList1::OnEditCopy ( ) [protected]

Definition at line 212 of file OutputBar.cpp.

{
  MessageBox(_T("Copy output"));
}

void COutputList1::OnOutputGotoError ( ) [protected]

Definition at line 222 of file OutputBar.cpp.

{
  // TODO: Add your command handler code here
}

void COutputList1::OnViewOutput ( ) [protected]

Definition at line 227 of file OutputBar.cpp.

{
  CBasePane* pParentBar = DYNAMIC_DOWNCAST(CBasePane, GetOwner());
  CFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CFrameWndEx, GetTopLevelFrame());

  if (pMainFrame != NULL && pParentBar != NULL)
  {
    pMainFrame->SetFocus();
    pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE);
  }
}

void COutputList1::OnWindowPosChanging ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 184 of file OutputBar.cpp.

{
  CListBox::OnWindowPosChanging(lpwndpos);

  // Hide horizontal scrollbar:
  ShowScrollBar(SB_HORZ, FALSE);
  ModifyStyle(WS_HSCROLL, 0, SWP_DRAWFRAME);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OutputBar.h
  • vc2008fp/VisualStudioDemo/OutputBar.cpp
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutputToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

COutputToolBar Class Reference

#include "OutputBar.h"

List of all members.

Public Member Functions

virtual BOOL | AllowShowOnList () const
virtual void | OnUpdateCmdUI (CFrameWnd *, BOOL bDisableIfNoHndler)

Detailed Description

Definition at line 14 of file OutputBar.h.

Member Function Documentation

virtual BOOL COutputToolBar::AllowShowOnList ( ) const [inline, virtual]

Definition at line 22 of file OutputBar.h.

{ return FALSE; }

virtual void COutputToolBar::OnUpdateCmdUI | ( | CFrameWnd * | ,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [inline, virtual]

Definition at line 17 of file OutputBar.h.

  {
    CMFCToolBar::OnUpdateCmdUI ((CFrameWnd*) GetOwner (), bDisableIfNoHndler);
  }

The documentation for this class was generated from the following file:
  • vc2008fp/RibbonGadgets/OutputBar.h
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutputViewBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

COutputViewBar Class Reference

#include "OutputView.h"

List of all members.

Public Member Functions

COutputViewBar ()
virtual | ~COutputViewBar ()
void | UpdateFonts ()

Protected Member Functions

void | AdjusrHorzScroll (CListBox &wndListBox)
void | FillBuildWindow ()
void | FillDebugWindow ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnPaint ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

COutputList m_wndOutput

Detailed Description

Definition at line 35 of file OutputView.h.

Constructor & Destructor Documentation

COutputViewBar::COutputViewBar ( )

Definition at line 24 of file OutputView.cpp.

{
}

COutputViewBar::~COutputViewBar ( ) [virtual]

Definition at line 28 of file OutputView.cpp.

{
}

Member Function Documentation

void COutputViewBar::AdjusrHorzScroll ( CListBox & wndListBox ) [protected]

Definition at line 74 of file OutputView.cpp.

{
  CClientDC dc(this);
  CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);

  int cxExtentMax = 0;

  for (int i = 0; i < wndListBox.GetCount(); i ++)
  {
    CString strItem;
    wndListBox.GetText(i, strItem);

    cxExtentMax = max(cxExtentMax, dc.GetTextExtent(strItem).cx);
  }

  wndListBox.SetHorizontalExtent(cxExtentMax);
  dc.SelectObject(pOldFont);
}

void COutputViewBar::FillBuildWindow ( ) [protected]
void COutputViewBar::FillDebugWindow ( ) [protected]

Definition at line 93 of file OutputView.cpp.

{
  m_wndOutput.AddString(_T("The program has started successfully."));
  m_wndOutput.AddString(_T("Enjoy using it!"));
}

int COutputViewBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 39 of file OutputView.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectClient(0, 0, lpCreateStruct->cx, lpCreateStruct->cy);

  // Create output pane:
  const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;

  if (!m_wndOutput.Create(dwStyle, rectClient, this, 1))
  {
    TRACE0("Failed to create output window\n");
    return -1;      // fail to create
  }

  UpdateFonts();

  // Fill view context(dummy code, don't seek here something magic :-)):
  FillDebugWindow();
  return 0;
}

void COutputViewBar::OnPaint ( ) [protected]

Definition at line 171 of file OutputView.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndOutput.GetWindowRect(rectTree);
  ScreenToClient(rectTree);

  rectTree.InflateRect(1, 1);
  dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
}

void COutputViewBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 183 of file OutputView.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);
  m_wndOutput.SetFocus();
}

void COutputViewBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 62 of file OutputView.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);

  CRect rc;
  GetClientRect(rc);

  m_wndOutput.SetWindowPos(NULL, rc.left + 1, rc.top + 1, rc.Width() - 2, rc.Height() - 2, SWP_NOACTIVATE | SWP_NOZORDER );

  AdjusrHorzScroll(m_wndOutput);
}

void COutputViewBar::UpdateFonts ( )

Definition at line 189 of file OutputView.cpp.

{
  m_wndOutput.SetFont(&afxGlobalData.fontRegular);
}

Member Data Documentation

COutputList COutputViewBar::m_wndOutput [protected]

Definition at line 45 of file OutputView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/OutputView.h
  • vc2008fp/VisualStudioDemo/OutputView.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutputWindowLog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes | Private Member Functions

COutputWindowLog Class Reference

#include "Log.H"

Inherits CLog.

List of all members.

Public Member Functions

COutputWindowLog (CEdit *pEditBox)
~COutputWindowLog ()
CLog & | operator<< (LPCTSTR pszString)

Protected Attributes

CEdit * | m_pEditBox

Private Member Functions

DECLARE_DYNAMIC (COutputWindowLog)

Detailed Description

Definition at line 71 of file Log.H.

Constructor & Destructor Documentation

COutputWindowLog::COutputWindowLog ( CEdit * pEditBox )

Definition at line 161 of file Log.Cpp.

                                                    :
   m_pEditBox( pEditBox )
{
   ASSERT( m_pEditBox != NULL );
}

COutputWindowLog::~COutputWindowLog ( )

Definition at line 167 of file Log.Cpp.

{
}

Member Function Documentation

COutputWindowLog::DECLARE_DYNAMIC ( COutputWindowLog ) [private]
CLog & COutputWindowLog::operator<< ( LPCTSTR pszString ) [virtual]

Reimplemented from CLog.

Definition at line 171 of file Log.Cpp.

{
   int iLastChar;
   CString strSpan;
   CString strString( pszString );

   while( strString.GetLength() > 0 )
   {
    strSpan = strString.SpanExcluding( _T( "\n" ) );
    iLastChar = m_pEditBox->GetWindowTextLength();
    m_pEditBox->SetSel( iLastChar, iLastChar );
    m_pEditBox->ReplaceSel( strSpan );
    if( strString.GetLength() == strSpan.GetLength() )
    {
     strString.Empty();
    }
    else
    {
     ASSERT( strString[strSpan.GetLength()] == _T( '\n' ) );
     iLastChar = m_pEditBox->GetWindowTextLength();
     m_pEditBox->SetSel( iLastChar, iLastChar );
     m_pEditBox->ReplaceSel( _T( "\r\n" ) );
     strString = strString.Mid( strSpan.GetLength()+1 );
    }
   }

   return( *this );
}

Member Data Documentation

CEdit* COutputWindowLog::m_pEditBox [protected]

Definition at line 82 of file Log.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/Log.H
  • ole/TstCon/Log.Cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COutputWindowView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions | Protected Attributes

COutputWindowView Class Reference

#include "OutWndVw.H"

List of all members.

Protected Member Functions

COutputWindowView ()
virtual | ~COutputWindowView ()
afx_msg void | OnClear ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnCopy ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual void | OnDraw (CDC *pDC)

Protected Attributes

CFont | m_font

Detailed Description

Definition at line 22 of file OutWndVw.H.

Constructor & Destructor Documentation

COutputWindowView::COutputWindowView ( ) [protected]

Definition at line 25 of file OutWndVw.Cpp.

{
}

COutputWindowView::~COutputWindowView ( ) [protected, virtual]

Definition at line 29 of file OutWndVw.Cpp.

{
}

Member Function Documentation

void COutputWindowView::OnClear ( ) [protected]

Definition at line 107 of file OutWndVw.Cpp.

{
   DeleteContents();
}

void COutputWindowView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 83 of file OutWndVw.Cpp.

{
   CMenu menu;
   CMenu* pPopupMenu;
   int iStart;
   int iEnd;

   if( pWnd->m_hWnd != m_hWnd )
   {
    return;
   }

   menu.LoadMenu( IDR_OUTPUTLOGEDIT_CONTEXT );
   pPopupMenu = menu.GetSubMenu( 0 );
   GetEditCtrl().GetSel( iStart, iEnd );
   if( iEnd == iStart )
   {
    pPopupMenu->EnableMenuItem( ID_OUTPUTLOGEDIT_COPY, MF_GRAYED );
   }
   pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y,
    this, NULL );
   menu.DestroyMenu();
}

void COutputWindowView::OnCopy ( ) [protected]

Definition at line 112 of file OutWndVw.Cpp.

{
   GetEditCtrl().Copy();
}

int COutputWindowView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 68 of file OutWndVw.Cpp.

{
  if( CEditView::OnCreate( pCreateStruct ) == -1 )
   {
    return( -1 );
   }

   m_font.CreatePointFont( 100, _T( "Courier" ) );
   SetFont( &m_font );

   SendMessage( EM_SETREADONLY, TRUE, 0 );

  return( 0 );
}

void COutputWindowView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 46 of file OutWndVw.Cpp.

{
}

Member Data Documentation

CFont COutputWindowView::m_font [protected]

Definition at line 50 of file OutWndVw.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/OutWndVw.H
  • ole/TstCon/OutWndVw.Cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COwnerDrawDescrProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

COwnerDrawDescrProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

COwnerDrawDescrProp (const CString &strName, const COleVariant &varValue)

Protected Member Functions

virtual void OnDrawDescription (CDC *pDC, CRect rect)

Detailed Description

Definition at line 165 of file CustomProperties.h.

Constructor & Destructor Documentation

COwnerDrawDescrProp::COwnerDrawDescrProp | ( | const CString & | strName,
 |  | const COleVariant & | varValue
 | ) |  |

Definition at line 614 of file CustomProperties.cpp.

                                                                                : CMFCPropertyGridProperty(strName, varValue)
{
}

Member Function Documentation

void COwnerDrawDescrProp::OnDrawDescription | ( | CDC * | pDC,
 |  | CRect | rect |
 | ) |  |  | [protected, virtual]

Definition at line 618 of file CustomProperties.cpp.

{
  CDrawingManager dm(*pDC);
  dm.FillGradient2(rect, RGB(102, 200, 238), RGB(0, 129, 185), 45);

  CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontBold);

  CString strText = _T("Custom Text");

  pDC->SetTextColor(RGB(0, 65, 117));
  pDC->DrawText(strText, rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);

  rect.OffsetRect(-2, -2);

  pDC->SetTextColor(RGB(155, 251, 255));
  pDC->DrawText(strText, rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);

  pDC->SelectObject(pOldFont);
}

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COwnerDrawMenuApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

COwnerDrawMenuApp Class Reference

#include "OwnerDrawMenu.h"

List of all members.

Public Member Functions

COwnerDrawMenuApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file OwnerDrawMenu.h.

Constructor & Destructor Documentation

COwnerDrawMenuApp::COwnerDrawMenuApp ( )

Definition at line 39 of file OwnerDrawMenu.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int COwnerDrawMenuApp::ExitInstance ( ) [virtual]

Definition at line 167 of file OwnerDrawMenu.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL COwnerDrawMenuApp::InitInstance ( ) [virtual]

Definition at line 53 of file OwnerDrawMenu.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(COwnerDrawMenuDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(COwnerDrawMenuView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  LoadCustomState ();

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void COwnerDrawMenuApp::OnAppAbout ( )

Definition at line 158 of file OwnerDrawMenu.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void COwnerDrawMenuApp::PreLoadState ( ) [virtual]

Definition at line 172 of file OwnerDrawMenu.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/OwnerDrawMenu/OwnerDrawMenu.h
  • vc2008fp/OwnerDrawMenu/OwnerDrawMenu.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COwnerDrawMenuDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

COwnerDrawMenuDoc Class Reference

#include "OwnerDrawMenuDoc.h"

List of all members.

Public Member Functions

virtual | ~COwnerDrawMenuDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

COwnerDrawMenuDoc ()

Detailed Description

Definition at line 13 of file OwnerDrawMenuDoc.h.

Constructor & Destructor Documentation

COwnerDrawMenuDoc::COwnerDrawMenuDoc ( ) [protected]

Definition at line 33 of file OwnerDrawMenuDoc.cpp.

{
  // TODO: add one-time construction code here

}

COwnerDrawMenuDoc::~COwnerDrawMenuDoc ( ) [virtual]

Definition at line 39 of file OwnerDrawMenuDoc.cpp.

{
}

Member Function Documentation

BOOL COwnerDrawMenuDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file OwnerDrawMenuDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void COwnerDrawMenuDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file OwnerDrawMenuDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.h
  • vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: COwnerDrawMenuView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

COwnerDrawMenuView Class Reference

#include "OwnerDrawMenuView.h"

List of all members.

Public Member Functions

virtual | ~COwnerDrawMenuView ()
COwnerDrawMenuDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

COwnerDrawMenuView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnLineStyle (UINT uiCmd)
afx_msg void | OnMoreLines ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnUpdateLineStyle (CCmdUI *pCmdUI)

Protected Attributes

UINT m_uiLineStyleCmd

Detailed Description

Definition at line 13 of file OwnerDrawMenuView.h.

Constructor & Destructor Documentation

COwnerDrawMenuView::COwnerDrawMenuView ( ) [protected]

Definition at line 48 of file OwnerDrawMenuView.cpp.

{
  m_uiLineStyleCmd = ID_LINE_STYLE_3;
}

COwnerDrawMenuView::~COwnerDrawMenuView ( ) [virtual]

Definition at line 53 of file OwnerDrawMenuView.cpp.

{
}

Member Function Documentation

COwnerDrawMenuDoc * COwnerDrawMenuView::GetDocument ( ) [inline]

Definition at line 57 of file OwnerDrawMenuView.h.

   { return (COwnerDrawMenuDoc*)m_pDocument; }

void COwnerDrawMenuView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 123 of file OwnerDrawMenuView.cpp.

{
  // TODO: add extra initialization before printing
}

void COwnerDrawMenuView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 157 of file OwnerDrawMenuView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void COwnerDrawMenuView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 68 of file OwnerDrawMenuView.cpp.

{
//  COwnerDrawMenuDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);
}

void COwnerDrawMenuView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 128 of file OwnerDrawMenuView.cpp.

{
  // TODO: add cleanup after printing
}

void COwnerDrawMenuView::OnFilePrintPreview ( ) [protected]

Definition at line 112 of file OwnerDrawMenuView.cpp.

{
  AFXPrintPreview (this);
}

void COwnerDrawMenuView::OnLineStyle ( UINT uiCmd ) [protected]

Definition at line 162 of file OwnerDrawMenuView.cpp.

{
  m_uiLineStyleCmd = uiCmd;

  CString str;
  str.Format (_T("Line style: %d"), uiCmd - ID_LINE_STYLE_1 + 1);

  MessageBox (str);
}

void COwnerDrawMenuView::OnMoreLines ( ) [protected]

Definition at line 177 of file OwnerDrawMenuView.cpp.

{
  MessageBox (_T("More line styles...."));
}

BOOL COwnerDrawMenuView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 117 of file OwnerDrawMenuView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void COwnerDrawMenuView::OnUpdateLineStyle ( CCmdUI * pCmdUI ) [protected]

Definition at line 172 of file OwnerDrawMenuView.cpp.

{
  pCmdUI->SetCheck (m_uiLineStyleCmd == pCmdUI->m_nID);
}

BOOL COwnerDrawMenuView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 57 of file OwnerDrawMenuView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

Member Data Documentation

UINT COwnerDrawMenuView::m_uiLineStyleCmd [protected]

Definition at line 24 of file OwnerDrawMenuView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.h
  • vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPadDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions | Friends

CPadDoc Class Reference

#include "multipad.h"

List of all members.

Public Member Functions

CPadDoc ()
virtual COleServerItem * | OnGetEmbeddedItem ()
virtual COleServerItem * | OnGetLinkedItem (LPCTSTR lpszItemName)
void | SetSelection (int nBeg, int nEnd)

Protected Member Functions

virtual | ~CPadDoc ()
virtual void | DeleteContents ()
afx_msg void | OnCancelInplace ()
afx_msg void | OnViewUpdatenow ()
virtual void | Serialize (CArchive &ar)

Private Member Functions

void | Serialize (CArchive &ar)

Friends

class | CEmbeddedItem

Detailed Description

Definition at line 36 of file multipad.h.

Constructor & Destructor Documentation

CPadDoc::CPadDoc ( )

Definition at line 39 of file paddoc.cpp.

{
}

CPadDoc::~CPadDoc ( ) [protected, virtual]

Definition at line 43 of file paddoc.cpp.

{
}

Member Function Documentation

void CPadDoc::DeleteContents ( ) [protected, virtual]

Definition at line 47 of file paddoc.cpp.

{
  COleServerDoc::DeleteContents();
  if (m_viewList.IsEmpty())
    return;
  CEditView* pView = (CEditView*)m_viewList.GetHead();
  ASSERT_KINDOF(CEditView, pView);
  pView->DeleteContents();
}

void CPadDoc::OnCancelInplace ( ) [protected]

Definition at line 92 of file paddoc.cpp.

{
  if (IsInPlaceActive())
    OnDeactivateUI(FALSE);
}

COleServerItem * CPadDoc::OnGetEmbeddedItem ( ) [virtual]

Definition at line 64 of file paddoc.cpp.

{
  CEmbeddedItem* pItem = new CEmbeddedItem(this);
  ASSERT_VALID(pItem);
  return pItem;
}

COleServerItem * CPadDoc::OnGetLinkedItem ( LPCTSTR lpszItemName ) [virtual]

Definition at line 71 of file paddoc.cpp.

{
  CPadLinkItem *pItem =
    (CPadLinkItem*)COleServerDoc::OnGetLinkedItem(lpszItemName);
  if (pItem == NULL)
    pItem = new CPadLinkItem(this, lpszItemName);

  ASSERT_VALID(pItem);
  return pItem;
}

void CPadDoc::OnViewUpdatenow ( ) [protected]

Definition at line 84 of file paddoc.cpp.

{
  UpdateAllItems(NULL);
}

void CPadDoc::Serialize ( CArchive & ar ) [private]

Definition at line 97 of file multipad.cpp.

{
  ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
}

virtual void CPadDoc::Serialize ( CArchive & ar ) [protected, virtual]
void CPadDoc::SetSelection | ( | int | nBeg,
 |  | int | nEnd
 | ) |  |

Definition at line 98 of file paddoc.cpp.

{
  CEditView* pView = (CEditView*)m_viewList.GetHead();
  ASSERT_KINDOF(CEditView, pView);
  pView->GetEditCtrl().SetSel(nBeg, nEnd);
}

Friends And Related Function Documentation

friend class CEmbeddedItem [friend]

Definition at line 46 of file paddoc.h.

The documentation for this class was generated from the following files:
  • general/multipad/multipad.h
  • ole/superpad/paddoc.h
  • general/multipad/multipad.cpp
  • ole/superpad/paddoc.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPadFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Protected Member Functions | Static Protected Attributes

CPadFrame Class Reference

#include "padframe.h"

List of all members.

Static Public Member Functions

static void | Initialize ()
static void | Terminate ()

Protected Member Functions

void | ActivateFrame (int nCmdShow)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Static Protected Attributes

static int | m_nDefCmdShow = SW_SHOWMAXIMIZED
static int | m_nDefCmdShowOld = SW_SHOWMAXIMIZED

Detailed Description

Definition at line 17 of file padframe.h.

Member Function Documentation

void CPadFrame::ActivateFrame ( int nCmdShow ) [protected]

Definition at line 32 of file padframe.cpp.

{
  if (nCmdShow == -1)
    nCmdShow = m_nDefCmdShow;   // use our default
  CMDIChildWnd::ActivateFrame(nCmdShow);
}

void CPadFrame::Initialize ( ) [static]

Definition at line 39 of file padframe.cpp.

{
  m_nDefCmdShow = AfxGetApp()->GetProfileInt(szSec, szShowCmd, m_nDefCmdShow);
  m_nDefCmdShowOld = m_nDefCmdShow;
}

void CPadFrame::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 63 of file padframe.cpp.

{
  CMDIChildWnd::OnSize(nType, cx, cy);
  if (!IsWindowVisible())
    return;

  switch (nType)
  {
  case SIZE_MAXIMIZED:
    m_nDefCmdShow = SW_SHOWMAXIMIZED;
    break;
  case SIZE_RESTORED:
    m_nDefCmdShow = SW_SHOWNORMAL;
    break;
  }
}

void CPadFrame::Terminate ( ) [static]

Definition at line 45 of file padframe.cpp.

{
  if (m_nDefCmdShow != m_nDefCmdShowOld)
  {
    AfxGetApp()->WriteProfileInt(szSec, szShowCmd, m_nDefCmdShow);
    m_nDefCmdShowOld = m_nDefCmdShow;
  }
}

Member Data Documentation

int CPadFrame::m_nDefCmdShow = SW_SHOWMAXIMIZED [static, protected]

Definition at line 40 of file padframe.h.

int CPadFrame::m_nDefCmdShowOld = SW_SHOWMAXIMIZED [static, protected]

Definition at line 41 of file padframe.h.

The documentation for this class was generated from the following files:
  • ole/superpad/padframe.h
  • ole/superpad/padframe.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPadLinkItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CPadLinkItem Class Reference

#include "linkitem.h"

Inherits CEmbeddedItem.

List of all members.

Public Member Functions

CPadLinkItem (CPadDoc *pContainerDoc, LPCTSTR pszItemName)
CPadLinkItem (CPadDoc *pContainerDoc, int nFrom, int nTo)

Protected Member Functions

virtual void OnShow ()

Detailed Description

Definition at line 19 of file linkitem.h.

Constructor & Destructor Documentation

CPadLinkItem::CPadLinkItem | ( | CPadDoc * | pContainerDoc,
 |  | LPCTSTR | pszItemName
 | ) |  |

Definition at line 20 of file linkitem.cpp.

  : CEmbeddedItem(pContainerDoc)
{
  CString strItemName(pszItemName);
  SetItemName(strItemName);
  VERIFY( _stscanf_s(strItemName, _T("%d %d"), &m_nBeg, &m_nEnd) == 2 );
}

CPadLinkItem::CPadLinkItem | ( | CPadDoc * | pContainerDoc,
 |  | int | nFrom,
 |  | int | nTo
 | ) |  |

Definition at line 28 of file linkitem.cpp.

  : CEmbeddedItem(pContainerDoc)
{
  m_nBeg = nFrom;
  m_nEnd = nTo;
  TCHAR buf[30];
  _stprintf_s(buf, 30, _T("%d %d"), m_nBeg, m_nEnd);
  SetItemName(buf);
}

Member Function Documentation

void CPadLinkItem::OnShow ( ) [protected, virtual]

Definition at line 38 of file linkitem.cpp.

{
  CPadDoc* pDoc = (CPadDoc*)GetDocument();
  ENSURE(pDoc != NULL);
  ENSURE_VALID(pDoc);
  ASSERT_KINDOF(CPadDoc, pDoc);
  pDoc->SetSelection(m_nBeg, m_nEnd);

  CEmbeddedItem::OnShow();
}

The documentation for this class was generated from the following files:
  • ole/superpad/linkitem.h
  • ole/superpad/linkitem.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPadView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions

CPadView Class Reference

#include "padview.h"

List of all members.

Public Member Functions

CPadDoc * GetDocument ()
BOOL | IsUpdatePending ()
BOOL | IsWordWrap () const
LPCTSTR | LockBuffer () const
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnScrollTo (CDC *pDC, CPrintInfo *pInfo, POINT point)
BOOL | SetWordWrap (BOOL bWordWrap)
void | UnlockBuffer () const

Static Public Member Functions

static void | Initialize ()
static void | Terminate ()

Protected Member Functions

afx_msg void | OnChooseFont ()
afx_msg void | OnChoosePrintFont ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnEditChange ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnMirrorDisplayFont ()
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnSetTabStops ()
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnUpdateChoosePrintFont (CCmdUI *pCmdUI)
afx_msg void | OnUpdateMirrorDisplayFont (CCmdUI *pCmdUI)
afx_msg void | OnUpdateWordWrap (CCmdUI *pCmdUI)
afx_msg void | OnWordWrap ()

Protected Attributes

CFont | m_font
CFont | m_fontPrint
UINT m_nPreviewPage
CTime | m_timeFooter
CTime | m_timeHeader
UINT_PTR | m_uTimerID

Static Protected Attributes

static BOOL | m_bDefWordWrap
static BOOL | m_bDefWordWrapOld
static LOGFONT NEAR | m_lfDefFont
static LOGFONT NEAR | m_lfDefFontOld
static LOGFONT NEAR | m_lfDefPrintFont
static LOGFONT NEAR | m_lfDefPrintFontOld
static UINT | m_nDefTabStops
static UINT | m_nDefTabStopsOld

Private Member Functions

CPadView ()
BOOL | PreCreateWindow (CREATESTRUCT &cs)

Detailed Description

Definition at line 19 of file padview.h.

Constructor & Destructor Documentation

CPadView::CPadView ( ) [private]

Definition at line 148 of file padview.cpp.

{
  m_nTabStops = m_nDefTabStops;
  m_uTimerID = 0;
}

Member Function Documentation

CPadDoc* CPadView::GetDocument ( ) [inline]

Definition at line 33 of file padview.h.

    { return (CPadDoc*)m_pDocument; }

void CPadView::Initialize ( ) [static]

Definition at line 121 of file padview.cpp.

{
  CWinApp* pApp = AfxGetApp();
  m_bDefWordWrap = pApp->GetProfileInt(szSettings, szWordWrap, 0);
  m_bDefWordWrapOld = m_bDefWordWrap;
  m_nDefTabStops = pApp->GetProfileInt(szSettings, szTabStops, 8*4);
  m_nDefTabStopsOld = m_nDefTabStops;
  GetProfileFont(szFont, &m_lfDefFont);
  m_lfDefFontOld = m_lfDefFont;
  GetProfileFont(szPrintFont, &m_lfDefPrintFont);
  m_lfDefPrintFontOld = m_lfDefPrintFont;
}

BOOL CPadView::IsUpdatePending ( ) [inline]

Definition at line 55 of file padview.h.

{return (m_uTimerID != NULL);}

BOOL CPadView::IsWordWrap ( ) const

Definition at line 185 of file padview.cpp.

{
  return (GetStyle() & ES_AUTOHSCROLL) == 0;
}

LPCTSTR CPadView::LockBuffer ( ) const [inline]

Definition at line 48 of file padview.h.

    { return CEditView::LockBuffer(); }

void CPadView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [virtual]

Definition at line 278 of file padview.cpp.

{
  CEditView::OnBeginPrinting(pDC, pInfo);

  LPCTSTR pszFileName = GetDocument()->GetPathName();
  BOOL bForceSysTime = _tcschr(pszFileName, '.') == NULL;
  CTime timeSys = CTime::GetCurrentTime();
  CFileStatus status;
  CFile::GetStatus(pszFileName, status);

  if (dlgPageSetup.m_iHeaderTime != 0 || bForceSysTime)
    m_timeHeader = timeSys;
  else
    m_timeHeader = status.m_mtime;

  if (dlgPageSetup.m_iFooterTime != 0 || bForceSysTime)
    m_timeFooter = timeSys;
  else
    m_timeFooter = status.m_mtime;

  if (!pInfo->m_bPreview)
    return;

  CWaitCursor wait;
  pInfo->m_nCurPage = 0xFFFF;
  OnPrepareDC(pDC, pInfo);

  UINT nIndex = LOWORD(GetEditCtrl().GetSel());
  UINT nCurPage = 1;
  while (nCurPage < (UINT)m_aPageStart.GetSize())
  {
    if (nIndex < m_aPageStart[nCurPage])
      break;
    nCurPage++;
  }
  pInfo->m_nCurPage = nCurPage;
  pInfo->SetMaxPage((UINT)m_aPageStart.GetSize());
  m_nPreviewPage = nCurPage;
}

void CPadView::OnChooseFont ( ) [protected]

Definition at line 382 of file padview.cpp.

{
   // get current font description
   CFont* pFont = GetFont();
   LOGFONT lf;
   if (pFont != NULL)
     pFont->GetObject(sizeof(LOGFONT), &lf);
   else
     ::GetObject(GetStockObject(SYSTEM_FONT), sizeof(LOGFONT), &lf);

  CFontDialog dlg(&lf, CF_SCREENFONTS|CF_INITTOLOGFONTSTRUCT);
  if (dlg.DoModal() == IDOK)
  {
    // switch to new font.
    m_font.DeleteObject();
    if (m_font.CreateFontIndirect(&lf))
    {
      CWaitCursor wait;
      SetFont(&m_font);
      m_lfDefFont = lf;

      if (GetPrinterFont() == NULL)
      {
        // notify container that content has changed
        GetDocument()->UpdateAllItems(NULL);
      }
    }
  }
}

void CPadView::OnChoosePrintFont ( ) [protected]

Definition at line 421 of file padview.cpp.

{
  CWaitCursor wait;
  CFont* pFont = GetPrinterFont();
  LOGFONT lf;
  LPLOGFONT plf = NULL;
  if (pFont != NULL)
  {
    pFont->GetObject(sizeof(LOGFONT), &lf);
    plf = &lf;
  }

  // magic to get printer dialog that would be used if we were printing!
  CPrintDialog dlgPrint(FALSE);
  if (!AfxGetApp()->GetPrinterDeviceDefaults(&dlgPrint.m_pd))
  {
    AfxMessageBox(IDP_ERR_GET_DEVICE_DEFAULTS);
    return;
  }
  wait.Restore();
  HDC hdcPrint = dlgPrint.CreatePrinterDC();
  if (hdcPrint == NULL)
  {
    AfxMessageBox(IDP_ERR_GET_PRINTER_DC);
    return;
  }

  CDC dcScreen;
  dcScreen.Attach(::GetDC(NULL));
  CDC dcPrint;
  dcPrint.Attach(hdcPrint);

  if (plf != NULL)
  {
    // need to map initial logfont to screen metrics.
    ::ScaleLogFont(plf, dcPrint, dcScreen);
  }

  // now bring up the dialog since we know the printer DC
  CFontDialog dlg(plf, CF_PRINTERFONTS, &dcPrint);
  if (dlg.DoModal() == IDOK)
  {
    // map the resulting logfont back to printer metrics.
    lf = dlg.m_lf;
    ::ScaleLogFont(&lf, dcScreen, dcPrint);

    SetPrinterFont(NULL);
    m_fontPrint.DeleteObject();
    if (m_fontPrint.CreateFontIndirect(&lf))
    {
      SetPrinterFont(&m_fontPrint);
      m_lfDefPrintFont = lf;

      // notify container that content has changed
      GetDocument()->UpdateAllItems(NULL);
    }
  }
  //NOTE: destructor will call dcPrint.DeleteDC

  ::ReleaseDC(NULL, dcScreen.Detach());
}

int CPadView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 165 of file padview.cpp.

{
  if (CEditView::OnCreate(lpcs) != 0)
    return -1;
  if (m_lfDefFont.lfHeight != 0)
  {
    m_font.CreateFontIndirect(&m_lfDefFont);
    SetFont(&m_font);
  }
  if (m_lfDefPrintFont.lfHeight != 0)
  {
    m_fontPrint.CreateFontIndirect(&m_lfDefPrintFont);
    SetPrinterFont(&m_fontPrint);
  }
  return 0;
}

void CPadView::OnEditChange ( ) [protected]

Definition at line 572 of file padview.cpp.

{
  CEditView::OnEditChange();

  if (m_uTimerID != 0) // if outstanding timer kill it
    KillTimer(m_uTimerID);
  m_uTimerID = (UINT)SetTimer(1, 200, NULL); //set a timer for 200 milliseconds
  if (m_uTimerID == 0) // no timer available so force update now
    GetDocument()->UpdateAllItems(NULL);
}

void CPadView::OnEditCopy ( ) [protected]

Definition at line 583 of file padview.cpp.

{
  CWaitCursor wait;

  // get the current selection
  UINT nFrom = 0;
  UINT nTo =0;

  GetEditCtrl().GetSel((int&)nFrom, (int&)nTo);

  // what gets copied depends on partial vs. full selection
  if ((nFrom == 0 && nTo == (UINT)GetWindowTextLength()))
  {
    // copy entire document to the clipboard
    GetDocument()->GetEmbeddedItem()->CopyToClipboard(TRUE);
  }
  else
  {
    // copy linked item to clipboard
    CPadLinkItem item(GetDocument(), nFrom, nTo);
    item.CopyToClipboard(TRUE);
  }
}

void CPadView::OnEditCut ( ) [protected]

Definition at line 607 of file padview.cpp.

{
  OnEditCopy();
  CEditView::OnEditCut();
}

void CPadView::OnMirrorDisplayFont ( ) [protected]

Definition at line 483 of file padview.cpp.

{
  if (GetPrinterFont() != NULL)
  {
    SetPrinterFont(NULL);
    m_lfDefPrintFont.lfHeight = 0;

    // notify container that content changed
    GetDocument()->UpdateAllItems(NULL);
  }
}

void CPadView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [virtual]

Definition at line 318 of file padview.cpp.

{
  // get string to show as "filename" in header/footer
  LPCTSTR pszFileName = GetDocument()->GetPathName();
  if (pszFileName[0] == 0)
    pszFileName = GetDocument()->GetTitle();

  // go thru global CPageSetupDlg to format the header and footer
  CString strHeader;
  dlgPageSetup.FormatHeader(strHeader, m_timeHeader, pszFileName,
    pInfo->m_nCurPage);
  CString strFooter;
  dlgPageSetup.FormatFooter(strFooter, m_timeFooter, pszFileName,
    pInfo->m_nCurPage);

  TEXTMETRIC tm;
  pDC->GetTextMetrics(&tm);
  int cyChar = tm.tmHeight;
  CRect rectPage = pInfo->m_rectDraw;

  // draw and exclude space for header
  if (!strHeader.IsEmpty())
  {
    pDC->TextOut(rectPage.left, rectPage.top, strHeader);
    rectPage.top += cyChar + cyChar / 4;
    pDC->MoveTo(rectPage.left, rectPage.top);
    pDC->LineTo(rectPage.right, rectPage.top);
    rectPage.top += cyChar / 4;
  }

  // allow space for footer
  pInfo->m_rectDraw = rectPage;
  if (!strFooter.IsEmpty())
    pInfo->m_rectDraw.bottom -= cyChar + cyChar/4 + cyChar/4;

  // draw body text
  CEditView::OnPrint(pDC, pInfo);

  // draw footer
  if (!strFooter.IsEmpty())
  {
    rectPage.bottom -= cyChar;
    pDC->TextOut(rectPage.left, rectPage.bottom, strFooter);
    rectPage.bottom -= cyChar / 4;
    pDC->MoveTo(rectPage.left, rectPage.bottom);
    pDC->LineTo(rectPage.right, rectPage.bottom);
    rectPage.bottom -= cyChar / 4;
  }
}

void CPadView::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 541 of file padview.cpp.

{
  GetParentFrame()->BringWindowToTop();
}

void CPadView::OnScrollTo | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo,
 |  | POINT | point |
 | ) |  |  | [virtual]

Definition at line 368 of file padview.cpp.

{
  UINT nPage = pInfo->m_nCurPage;
  ASSERT(nPage < (UINT)m_aPageStart.GetSize());
  if (nPage != m_nPreviewPage)
  {
    UINT nIndex = m_aPageStart[nPage];
    GetEditCtrl().SetSel((int)nIndex, (int)nIndex);
  }
}

void CPadView::OnSetTabStops ( ) [protected]

Definition at line 508 of file padview.cpp.

{
  CSetTabStops dlg;
  dlg.m_nTabStops = m_nTabStops/4;
  if (dlg.DoModal() == IDOK)
  {
    CWaitCursor wait;
    SetTabStops(dlg.m_nTabStops*4);
    m_nDefTabStops = m_nTabStops;

    // notify container that content changed
    GetDocument()->UpdateAllItems(NULL);
  }
}

void CPadView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 546 of file padview.cpp.

{
  CWaitCursor wait;
  CEditView::OnSize(nType, cx, cy);

  CFrameWnd* pFrameWnd = GetParentFrame();
  ASSERT_VALID(pFrameWnd);

  if ((pFrameWnd->GetStyle() & WS_VISIBLE) &&
    pFrameWnd->IsKindOf(RUNTIME_CLASS(COleIPFrameWnd)))
  {
    // update the cx part of the extent to the width of the control
    COleServerItem* pItem = GetDocument()->GetEmbeddedItem();

    // only update if it has actually changed
    if ((int)pItem->m_sizeExtent.cx != cx)
    {
      pItem->m_sizeExtent.cx = cx;
      OnEditChange();
    }
  }
}

void CPadView::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 613 of file padview.cpp.

{
  if (m_uTimerID != nIDEvent) // not our timer
  {
    CEditView::OnTimer(nIDEvent);
    return;
  }

  KillTimer(m_uTimerID); // kill one-shot timer
  m_uTimerID = 0;
  GetDocument()->UpdateAllItems(NULL);
}

void CPadView::OnUpdateChoosePrintFont ( CCmdUI * pCmdUI ) [protected]

Definition at line 495 of file padview.cpp.

{
  pCmdUI->SetCheck(GetPrinterFont() != NULL);
}

void CPadView::OnUpdateMirrorDisplayFont ( CCmdUI * pCmdUI ) [protected]

Definition at line 500 of file padview.cpp.

{
  pCmdUI->SetCheck(GetPrinterFont() == NULL);
}

void CPadView::OnUpdateWordWrap ( CCmdUI * pCmdUI ) [protected]

Definition at line 526 of file padview.cpp.

{
  pCmdUI->SetCheck(IsWordWrap());
}

void CPadView::OnWordWrap ( ) [protected]

Definition at line 531 of file padview.cpp.

{
  CWaitCursor wait;
  SetWordWrap(!IsWordWrap());
  m_bDefWordWrap = IsWordWrap();
}

BOOL CPadView::PreCreateWindow ( CREATESTRUCT & cs ) [private]

Definition at line 154 of file padview.cpp.

{
  if (!CEditView::PreCreateWindow(cs))
    return FALSE;

  if (m_bDefWordWrap)
    cs.style &= ~(WS_HSCROLL|ES_AUTOHSCROLL);

  return TRUE;
}

BOOL CPadView::SetWordWrap ( BOOL bWordWrap )

Definition at line 190 of file padview.cpp.

{
  bWordWrap = !!bWordWrap;    // make sure ==TRUE || ==FALSE
  if (IsWordWrap() == bWordWrap)
    return FALSE;

  // preserve original control's state.
  CFont* pFont = GetFont();
  int nLen = GetBufferLength();
  TCHAR* pSaveText = new TCHAR[GetBufferLength()+1];
  GetWindowText(pSaveText, nLen+1);

  // create new edit control with appropriate style and size.
  DWORD dwStyle = dwStyleDefault & ~(ES_AUTOHSCROLL|WS_HSCROLL|WS_VISIBLE);
  if (!bWordWrap)
    dwStyle |= ES_AUTOHSCROLL|WS_HSCROLL;

  CWnd* pParent = GetParent();
  CRect rect;
  GetWindowRect(rect);
  pParent->ScreenToClient(rect);
  CWnd* pFocus = GetFocus();

  UINT_PTR nID = GetDlgCtrlID();

  HWND hWnd = ::CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), NULL, dwStyle,
    rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
    pParent->m_hWnd, (HMENU)nID, AfxGetInstanceHandle(), NULL);

  if (hWnd == NULL)
  {
    delete[] pSaveText;
    return FALSE;
  }

  // set the window text to nothing to make sure following set doesn't fail
  SetWindowText(NULL);

  // restore visual state
  ::SetWindowText(hWnd, pSaveText);
  delete[] pSaveText;
  if (pFont != NULL)
  {
    ASSERT(pFont->m_hObject != NULL);
    ::SendMessage(hWnd, WM_SETFONT, (WPARAM)pFont->m_hObject, 0);
  }

  // detach old window, attach new
  SetDlgCtrlID((UINT)nID+1);
  HWND hWndOld = Detach();
  ::SetWindowLongPtr(hWndOld, GWLP_WNDPROC, (LONG_PTR)*GetSuperWndProcAddr());
  ASSERT(m_hWnd == NULL);
  SubclassWindow(hWnd);
  ASSERT(m_hWnd == hWnd);
  GetParentFrame()->SendMessage(WM_RECALCPARENT);

  UINT nTabStops = m_nTabStops;
  GetEditCtrl().SetTabStops(nTabStops);

  GetClientRect(&rect);
  SetWindowPos(NULL, 0, 0, 0, 0,
    SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_SHOWWINDOW);
  SetWindowPos(NULL, 0, 0, 0, 0,
    SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_DRAWFRAME);
  SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
  UpdateWindow();

  // destroy old
  ::SetWindowPos(hWndOld, NULL, 0, 0, 0, 0,
    SWP_HIDEWINDOW|SWP_NOREDRAW|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|
    SWP_NOZORDER);
  ::DestroyWindow(hWndOld);

  // restore rest of state...
  GetEditCtrl().LimitText(nMaxSize);
  if (pFocus == this)
    SetFocus();

  // notify container that doc changed
  GetDocument()->UpdateAllItems(NULL);

  ASSERT_VALID(this);
  return TRUE;
}

void CPadView::Terminate ( ) [static]

Definition at line 134 of file padview.cpp.

{
  CWinApp* pApp = AfxGetApp();
  if (m_nDefTabStops != m_nDefTabStopsOld)
    pApp->WriteProfileInt(szSettings, szTabStops, m_nDefTabStops);
  if (m_bDefWordWrap != m_bDefWordWrapOld)
    pApp->WriteProfileInt(szSettings, szWordWrap, m_bDefWordWrap);
  WriteProfileFont(szFont, &m_lfDefFont, &m_lfDefFontOld);
  WriteProfileFont(szPrintFont, &m_lfDefPrintFont, &m_lfDefPrintFontOld);
}

void CPadView::UnlockBuffer ( ) const [inline]

Definition at line 50 of file padview.h.

    { CEditView::UnlockBuffer(); }

Member Data Documentation

BOOL CPadView::m_bDefWordWrap [static, protected]

Definition at line 75 of file padview.h.

BOOL CPadView::m_bDefWordWrapOld [static, protected]

Definition at line 76 of file padview.h.

CFont CPadView::m_font [protected]

Definition at line 67 of file padview.h.

CFont CPadView::m_fontPrint [protected]

Definition at line 71 of file padview.h.

LOGFONT NEAR CPadView::m_lfDefFont [static, protected]

Definition at line 65 of file padview.h.

LOGFONT NEAR CPadView::m_lfDefFontOld [static, protected]

Definition at line 66 of file padview.h.

LOGFONT NEAR CPadView::m_lfDefPrintFont [static, protected]

Definition at line 69 of file padview.h.

LOGFONT NEAR CPadView::m_lfDefPrintFontOld [static, protected]

Definition at line 70 of file padview.h.

UINT CPadView::m_nDefTabStops [static, protected]

Definition at line 73 of file padview.h.

UINT CPadView::m_nDefTabStopsOld [static, protected]

Definition at line 74 of file padview.h.

UINT CPadView::m_nPreviewPage [protected]

Definition at line 78 of file padview.h.

CTime CPadView::m_timeFooter [protected]

Definition at line 80 of file padview.h.

CTime CPadView::m_timeHeader [protected]

Definition at line 79 of file padview.h.

UINT_PTR CPadView::m_uTimerID [protected]

Definition at line 63 of file padview.h.

The documentation for this class was generated from the following files:
  • ole/superpad/padview.h
  • ole/superpad/padview.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPage1 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CPage1 Class Reference

#include "Page1.h"

List of all members.

Public Types

enum | { IDD = IDD_PAGE1 }

Public Member Functions

CPage1 ()
~CPage1 ()

Public Attributes

BOOL | m_bCheck
BOOL | m_bMenuDefaultClick
BOOL | m_bMenuStayPressed
BOOL | m_bRightArrow
CMFCButton | m_btnCheck
CMFCMenuButton | m_btnMenu
CMFCButton | m_btnMultiLine
CMFCButton | m_btnRadio1
CMFCButton | m_btnRadio2
CMFCButton | m_btnRadio3
CMFCButton | m_btnRadio4
CMFCButton | m_Button
BOOL | m_bXPButtons
int | m_iBorderStyle
int | m_iCursor
int | m_iFrameRate
int | m_iImage
int | m_nImageLocation
CString | m_strToolTip
CComboBox | m_wndBorder
CStatic | m_wndBorderLabel
CEdit | m_wndToolTip
CButton | m_wndXPButtons

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnButton ()
afx_msg void | OnButtonMenu ()
afx_msg void | OnDialogAbout ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnMenuDefaultClick ()
afx_msg void | OnPressedOnMenu ()
afx_msg void | OnResetButton ()
afx_msg void | OnRightArrow ()
afx_msg void | OnSetCursor ()
afx_msg void | OnSetTooltip ()
afx_msg void | OnUpdateItem2 (CCmdUI *pCmdUI)
afx_msg void | OnXpButtons ()

Protected Attributes

CMenu | m_menu

Detailed Description

Definition at line 15 of file Page1.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file Page1.h.

{ IDD = IDD_PAGE1 };

Constructor & Destructor Documentation

CPage1::CPage1 ( )

Definition at line 27 of file Page1.cpp.

               : CMFCPropertyPage(CPage1::IDD)
{
  m_bXPButtons = TRUE;
  m_bCheck = TRUE;
  m_strToolTip = _T("ToolTip");
  m_iImage = 2;
  m_iBorderStyle = 0;
  m_iCursor = 0;
  m_bMenuStayPressed = FALSE;
  m_bRightArrow = FALSE;
  m_nImageLocation = 0;
  m_bMenuDefaultClick = FALSE;
}

CPage1::~CPage1 ( )

Definition at line 41 of file Page1.cpp.

{
}

Member Function Documentation

void CPage1::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 45 of file Page1.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_BUTTON_MULTLINE, m_btnMultiLine);
  DDX_Control(pDX, IDC_BORDER, m_wndBorder);
  DDX_Control(pDX, IDC_BORDER_LABEL, m_wndBorderLabel);
  DDX_Control(pDX, IDC_CHECK_BUTTON, m_btnCheck);
  DDX_Control(pDX, IDC_XP_BUTTONS, m_wndXPButtons);
  DDX_Check(pDX, IDC_XP_BUTTONS, m_bXPButtons);
  DDX_Check(pDX, IDC_CHECK_BUTTON, m_bCheck);
  DDX_Control(pDX, IDC_BUTTON, m_Button);
  DDX_Text(pDX, IDC_TOOLTIP, m_strToolTip);
  DDX_Control(pDX, IDC_TOOLTIP, m_wndToolTip);
  DDX_CBIndex(pDX, IDC_IMAGE, m_iImage);
  DDX_CBIndex(pDX, IDC_BORDER, m_iBorderStyle);
  DDX_CBIndex(pDX, IDC_CURSOR, m_iCursor);
  DDX_Control(pDX, IDC_BUTTON_MENU, m_btnMenu);
  DDX_Check(pDX, IDC_PRESSED_ON_MENU, m_bMenuStayPressed);
  DDX_Check(pDX, IDC_RIGHT_ARROW, m_bRightArrow);
  DDX_CBIndex(pDX, IDC_IMAGE_LOCATION, m_nImageLocation);
  DDX_Check(pDX, IDC_MENU_DEFAULT_CLICK, m_bMenuDefaultClick);

  DDX_Control(pDX, IDC_RADIO1, m_btnRadio1);
  DDX_Control(pDX, IDC_RADIO2, m_btnRadio2);
  DDX_Control(pDX, IDC_RADIO3, m_btnRadio3);
  DDX_Control(pDX, IDC_RADIO4, m_btnRadio4);
}

void CPage1::OnButton ( ) [protected]

Definition at line 257 of file Page1.cpp.

{
  MessageBox(_T("Button Clicked!"));
}

void CPage1::OnButtonMenu ( ) [protected]

Definition at line 281 of file Page1.cpp.

{
  CString strItem;

  switch (m_btnMenu.m_nMenuResult)
  {
  case ID_ITEM_1:
    strItem = _T("Item 1");
    break;

  case ID_ITEM_2:
    strItem = _T("Item 2");
    break;

  case ID_ITEM_3:
    strItem = _T("Item 3");
    break;

  case ID_ITEM_4:
    strItem = _T("Item 4");
    break;

  default:
    if (!m_bMenuDefaultClick)
    {
      return;
    }

    strItem = _T("Default Menu Button Action");
    break;
  }

  MessageBox(strItem);
}

void CPage1::OnDialogAbout ( ) [protected]

Definition at line 316 of file Page1.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

BOOL CPage1::OnInitDialog ( ) [protected, virtual]

Definition at line 106 of file Page1.cpp.

{
  CMFCPropertyPage::OnInitDialog();

  if (!CMFCVisualManagerWindows::IsWinXPThemeAvailable())
  {
    m_bXPButtons = FALSE;
    m_wndXPButtons.EnableWindow(FALSE);
  }
  else
  {
    m_wndBorder.EnableWindow(FALSE);
    m_wndBorderLabel.EnableWindow(FALSE);
  }

  m_Button.m_bTransparent = TRUE;

  OnResetButton();
  OnSetCursor();
  OnSetTooltip();

  m_menu.LoadMenu(IDR_MENU1);
  m_btnMenu.m_hMenu = m_menu.GetSubMenu(0)->GetSafeHmenu();
  m_btnMenu.SizeToContent();
  m_btnMenu.m_bOSMenu = FALSE;

  m_wndToolTip.SetLimitText(MAX_TIP_TEXT_LENGTH);

  BOOL b32BitIcons = afxGlobalData.m_nBitsPerPixel >= 16;
  m_btnCheck.SetImage(b32BitIcons ? IDB_CHECKNO32 : IDB_CHECKNO);
  m_btnCheck.SetCheckedImage(b32BitIcons ? IDB_CHECK32 : IDB_CHECK);
  m_btnCheck.SizeToContent();
  m_btnCheck.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;

  m_btnRadio1.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
  m_btnRadio2.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
  m_btnRadio3.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
  m_btnRadio4.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;

  m_btnRadio1.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);
  m_btnRadio2.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);
  m_btnRadio3.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);
  m_btnRadio4.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);

  m_btnRadio1.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);
  m_btnRadio2.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);
  m_btnRadio3.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);
  m_btnRadio4.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);

  m_btnRadio1.SizeToContent();
  m_btnRadio2.SizeToContent();
  m_btnRadio3.SizeToContent();
  m_btnRadio4.SizeToContent();

  m_btnRadio1.SetCheck(TRUE);

  m_btnMultiLine.SizeToContent();

  CMFCToolBar::AddToolBarForImageCollection(IDR_TOOLBAR_MENU_IMAGES);

  UpdateData(FALSE);

  return TRUE;  // return TRUE unless you set the focus to a control
}

void CPage1::OnMenuDefaultClick ( ) [protected]

Definition at line 327 of file Page1.cpp.

{
  UpdateData();

  m_btnMenu.m_bDefaultClick = m_bMenuDefaultClick;
  m_btnMenu.RedrawWindow();
}

void CPage1::OnPressedOnMenu ( ) [protected]

Definition at line 268 of file Page1.cpp.

{
  UpdateData();
  m_btnMenu.m_bStayPressed = m_bMenuStayPressed;
}

void CPage1::OnResetButton ( ) [protected]

Definition at line 170 of file Page1.cpp.

{
  UpdateData();

  switch (m_iBorderStyle)
  {
  case 0:
    m_Button.m_nFlatStyle = CMFCButton::BUTTONSTYLE_FLAT;
    break;

  case 1:
    m_Button.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
    break;

  case 2:
    m_Button.m_nFlatStyle = CMFCButton::BUTTONSTYLE_3D;
  }

  if (m_iImage == 1) // Text only
  {
    m_Button.SetImage((HBITMAP) NULL);
  }
  else
  {
    BOOL b32BitIcons = afxGlobalData.m_nBitsPerPixel >= 16;

    if (b32BitIcons)
    {
      m_Button.SetImage(IDB_BTN1_32, IDB_BTN1_HOT_32);
    }
    else
    {
      m_Button.SetImage(IDB_BTN1, IDB_BTN1_HOT);
    }
  }

  if (m_iImage == 0)
  {
    m_Button.SetWindowText(_T(""));
  }
  else
  {
    m_Button.SetWindowText(_T("Button"));
  }

  switch (m_nImageLocation)
  {
  case 0:
    m_Button.m_bRightImage = FALSE;
    m_Button.m_bTopImage = FALSE;
    break;

  case 1:
    m_Button.m_bRightImage = TRUE;
    m_Button.m_bTopImage = FALSE;
    break;

  case 2:
    m_Button.m_bRightImage = FALSE;
    m_Button.m_bTopImage = TRUE;
    break;
  }

  m_Button.SizeToContent();
  m_Button.Invalidate();
}

void CPage1::OnRightArrow ( ) [protected]

Definition at line 274 of file Page1.cpp.

{
  UpdateData();
  m_btnMenu.m_bRightArrow = m_bRightArrow;
  m_btnMenu.Invalidate();
}

void CPage1::OnSetCursor ( ) [protected]

Definition at line 237 of file Page1.cpp.

{
  UpdateData();

  switch (m_iCursor)
  {
  case 0:
    m_Button.SetMouseCursor(NULL);
    break;

  case 1:
    m_Button.SetMouseCursorHand();
    break;

  case 2:
    m_Button.SetMouseCursor(AfxGetApp()->LoadCursor(IDC_CURSOR));
    break;
  }
}

void CPage1::OnSetTooltip ( ) [protected]

Definition at line 262 of file Page1.cpp.

{
  UpdateData();
  m_Button.SetTooltip(m_strToolTip);
}

void CPage1::OnUpdateItem2 ( CCmdUI * pCmdUI ) [protected]

Definition at line 322 of file Page1.cpp.

{
  pCmdUI->SetCheck();
}

void CPage1::OnXpButtons ( ) [protected]

Definition at line 94 of file Page1.cpp.

{
  UpdateData();

  CMFCButton::EnableWindowsTheming(m_bXPButtons);

  m_wndBorder.EnableWindow(!m_bXPButtons);
  m_wndBorderLabel.EnableWindow(!m_bXPButtons);

  RedrawWindow();
}

Member Data Documentation

BOOL CPage1::m_bCheck

Definition at line 32 of file Page1.h.

BOOL CPage1::m_bMenuDefaultClick

Definition at line 44 of file Page1.h.

BOOL CPage1::m_bMenuStayPressed

Definition at line 41 of file Page1.h.

BOOL CPage1::m_bRightArrow

Definition at line 42 of file Page1.h.

CMFCButton CPage1::m_btnCheck

Definition at line 29 of file Page1.h.

CMFCMenuButton CPage1::m_btnMenu

Definition at line 40 of file Page1.h.

CMFCButton CPage1::m_btnMultiLine

Definition at line 26 of file Page1.h.

CMFCButton CPage1::m_btnRadio1

Definition at line 46 of file Page1.h.

CMFCButton CPage1::m_btnRadio2

Definition at line 47 of file Page1.h.

CMFCButton CPage1::m_btnRadio3

Definition at line 48 of file Page1.h.

CMFCButton CPage1::m_btnRadio4

Definition at line 49 of file Page1.h.

CMFCButton CPage1::m_Button

Definition at line 33 of file Page1.h.

BOOL CPage1::m_bXPButtons

Definition at line 31 of file Page1.h.

int CPage1::m_iBorderStyle

Definition at line 38 of file Page1.h.

int CPage1::m_iCursor

Definition at line 39 of file Page1.h.

int CPage1::m_iFrameRate

Definition at line 36 of file Page1.h.

int CPage1::m_iImage

Definition at line 37 of file Page1.h.

CMenu CPage1::m_menu [protected]

Definition at line 73 of file Page1.h.

int CPage1::m_nImageLocation

Definition at line 43 of file Page1.h.

CString CPage1::m_strToolTip

Definition at line 34 of file Page1.h.

CComboBox CPage1::m_wndBorder

Definition at line 27 of file Page1.h.

CStatic CPage1::m_wndBorderLabel

Definition at line 28 of file Page1.h.

CEdit CPage1::m_wndToolTip

Definition at line 35 of file Page1.h.

CButton CPage1::m_wndXPButtons

Definition at line 30 of file Page1.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/Page1.h
  • vc2008fp/NewControls/Page1.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPage2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CPage2 Class Reference

#include "Page2.h"

List of all members.

Public Types

enum | { IDD = IDD_PAGE2 }

Public Member Functions

CPage2 ()
~CPage2 ()

Public Attributes

CMFCColorButton | m_ColorPicker
CString | m_strRGB
CString | m_strRGBColorBar
CString | m_strRGBColorBar2
CString | m_strRGBColorDialog
CString | m_strRGBColorPalette
CStatic | m_wndColorBarFrame
CStatic | m_wndColorBarFrame2
CMFCColorPickerCtrl | m_wndColorPalette
CMFCColorPickerCtrl | m_wndLum

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnColorBar ()
afx_msg void | OnColorBar2 ()
afx_msg void | OnColorDlg ()
afx_msg void | OnColorPalette ()
afx_msg void | OnColorPicker ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnLum ()

Protected Attributes

COLORREF | m_Color
CPalette | m_palColorPicker
CPalette | m_palSys
CMFCColorBar | m_wndColorBar
CMFCColorBar | m_wndColorBar2

Detailed Description

Definition at line 15 of file Page2.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file Page2.h.

{ IDD = IDD_PAGE2 };

Constructor & Destructor Documentation

CPage2::CPage2 ( )

Definition at line 25 of file Page2.cpp.

               : CMFCPropertyPage(CPage2::IDD)
{
  m_strRGB = _T("255, 0, 255");
  m_strRGBColorBar = _T("0, 0, 0");
  m_strRGBColorBar2 = _T("0, 0, 255");
  m_strRGBColorDialog = _T("255, 0, 255");
  m_strRGBColorPalette = _T("0, 255, 0");
  m_Color = RGB(255, 0, 255);
}

CPage2::~CPage2 ( )

Definition at line 35 of file Page2.cpp.

{
}

Member Function Documentation

void CPage2::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 39 of file Page2.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_LUM, m_wndLum);
  DDX_Control(pDX, IDC_COLOR_PALETTE, m_wndColorPalette);
  DDX_Control(pDX, IDC_COLORBAR2, m_wndColorBarFrame2);
  DDX_Control(pDX, IDC_COLORBAR, m_wndColorBarFrame);
  DDX_Control(pDX, IDC_COLOR_PICKER, m_ColorPicker);
  DDX_Text(pDX, IDC_RGB, m_strRGB);
  DDX_Text(pDX, IDC_RGB_COLOR_BAR, m_strRGBColorBar);
  DDX_Text(pDX, IDC_RGB_COLOR_BAR2, m_strRGBColorBar2);
  DDX_Text(pDX, IDC_RGB_DLG, m_strRGBColorDialog);
  DDX_Text(pDX, IDC_RGB_COLOR_PALETTE, m_strRGBColorPalette);
}

void CPage2::OnColorBar ( ) [protected]

Definition at line 181 of file Page2.cpp.

{
  COLORREF color = m_wndColorBar.GetColor();

  m_strRGBColorBar.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));

  UpdateData(FALSE);
}

void CPage2::OnColorBar2 ( ) [protected]

Definition at line 190 of file Page2.cpp.

{
  COLORREF color = m_wndColorBar2.GetColor();

  m_strRGBColorBar2.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));

  UpdateData(FALSE);
}

void CPage2::OnColorDlg ( ) [protected]

Definition at line 155 of file Page2.cpp.

{
  CMFCColorDialog dlg(m_Color, 0, this);
  if (dlg.DoModal() == IDOK)
  {
    m_Color = dlg.GetColor();

    m_strRGBColorDialog.Format(_T("%d,%d,%d"), GetRValue(m_Color), GetGValue(m_Color), GetBValue(m_Color));

    UpdateData(FALSE);
  }
}

void CPage2::OnColorPalette ( ) [protected]

Definition at line 199 of file Page2.cpp.

{
  COLORREF color = m_wndColorPalette.GetColor();

  m_strRGBColorPalette.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));

  m_wndLum.SetColor(color);
  UpdateData(FALSE);
}

void CPage2::OnColorPicker ( ) [protected]

Definition at line 168 of file Page2.cpp.

{
  COLORREF color = m_ColorPicker.GetColor();
  if (color == -1)
  {
    color = m_ColorPicker.GetAutomaticColor();
  }

  m_strRGB.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));

  UpdateData(FALSE);
}

BOOL CPage2::OnInitDialog ( ) [protected, virtual]

Definition at line 66 of file Page2.cpp.

{
  CMFCPropertyPage::OnInitDialog();

  // Create color picker:
  m_ColorPicker.EnableAutomaticButton(_T("Automatic"), RGB(255, 0, 255));
  m_ColorPicker.EnableOtherButton(_T("Other"));
  m_ColorPicker.SetColor((COLORREF)-1);
  m_ColorPicker.SetColumnsNumber(10);

  // Create regular color bar:
  CRect rectColorBar;
  m_wndColorBarFrame.GetClientRect(&rectColorBar);
  m_wndColorBarFrame.MapWindowPoints(this, &rectColorBar);

  m_wndColorBar.SetHorzMargin(0);
  m_wndColorBar.SetVertMargin(0);
  m_wndColorBar.EnableOtherButton(_T("Other..."));

  m_wndColorBar.CreateControl(this, rectColorBar, IDC_COLORBAR, 5 /* columns */);
  m_wndColorBar.SetColor(RGB(0, 0, 0));

  // Create regular color bar with the custom palette:
  m_wndColorBarFrame2.GetClientRect(&rectColorBar);
  m_wndColorBarFrame2.MapWindowPoints(this, &rectColorBar);

  // Create the palette
#define NUM_COLOURS 64
  struct
  {
    LOGPALETTE    LogPalette;
    PALETTEENTRY  PalEntry[NUM_COLOURS];
  }pal;

  LOGPALETTE* pLogPalette = (LOGPALETTE*) &pal;
  pLogPalette->palVersion    = 0x300;
  pLogPalette->palNumEntries = (WORD) NUM_COLOURS;

  COLORREF colorStart = RGB(0, 0, 255);
  COLORREF colorFinish = RGB(255, 255, 255);

  int nShift = 6;
  for (int i = 0; i < NUM_COLOURS; i++)
  {
    BYTE bR = (BYTE)((GetRValue(colorStart) *(NUM_COLOURS - i) + GetRValue(colorFinish) * i) >> nShift);
    BYTE bG = (BYTE)((GetGValue(colorStart) *(NUM_COLOURS - i) + GetGValue(colorFinish) * i) >> nShift);
    BYTE bB = (BYTE)((GetBValue(colorStart) *(NUM_COLOURS - i) + GetBValue(colorFinish) * i) >> nShift);

    pLogPalette->palPalEntry[i].peRed   = bR;
    pLogPalette->palPalEntry[i].peGreen = bG;
    pLogPalette->palPalEntry[i].peBlue  = bB;
    pLogPalette->palPalEntry[i].peFlags = 0;
  }

  m_palColorPicker.CreatePalette(pLogPalette);
  m_wndColorBar2.SetHorzMargin(0);
  m_wndColorBar2.SetVertMargin(0);

  m_wndColorBar2.CreateControl(this, rectColorBar, IDC_COLORBAR2, -1 /* columns */, &m_palColorPicker);
  m_wndColorBar2.SetColor(colorStart);

  // Create system palette:
  CClientDC dc(this);

  int nColors = 256; // Use 256 first entries
  UINT nSize = sizeof(LOGPALETTE) +(sizeof(PALETTEENTRY) * nColors);
  LOGPALETTE *pLP = (LOGPALETTE *) new BYTE[nSize];

  pLP->palVersion = 0x300;
  pLP->palNumEntries = (USHORT) nColors;

  ::GetSystemPaletteEntries(dc.GetSafeHdc(), 0, nColors, pLP->palPalEntry);

  m_palSys.CreatePalette(pLP);

  delete[] pLP;

  m_wndColorPalette.SetType(CMFCColorPickerCtrl::PICKER);
  m_wndColorPalette.SetPalette(&m_palSys);
  m_wndColorPalette.SetColor(RGB(0, 255, 0));

  m_wndLum.SetType(CMFCColorPickerCtrl::LUMINANCE);
  m_wndLum.SetPalette(&m_palSys);
  m_wndLum.SetColor(RGB(0, 255, 0));

  UpdateData(FALSE);
  return TRUE;  // return TRUE unless you set the focus to a control
  // EXCEPTION: OCX Property Pages should return FALSE
}

void CPage2::OnLum ( ) [protected]

Definition at line 209 of file Page2.cpp.

{
  COLORREF color = m_wndLum.GetColor();

  m_strRGBColorPalette.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));

  m_wndColorPalette.SetLuminance(m_wndLum.GetLuminance());
  UpdateData(FALSE);
}

Member Data Documentation

COLORREF CPage2::m_Color [protected]

Definition at line 54 of file Page2.h.

CMFCColorButton CPage2::m_ColorPicker

Definition at line 30 of file Page2.h.

CPalette CPage2::m_palColorPicker [protected]

Definition at line 58 of file Page2.h.

CPalette CPage2::m_palSys [protected]

Definition at line 59 of file Page2.h.

CString CPage2::m_strRGB

Definition at line 31 of file Page2.h.

CString CPage2::m_strRGBColorBar

Definition at line 32 of file Page2.h.

CString CPage2::m_strRGBColorBar2

Definition at line 33 of file Page2.h.

CString CPage2::m_strRGBColorDialog

Definition at line 34 of file Page2.h.

CString CPage2::m_strRGBColorPalette

Definition at line 35 of file Page2.h.

CMFCColorBar CPage2::m_wndColorBar [protected]

Definition at line 55 of file Page2.h.

CMFCColorBar CPage2::m_wndColorBar2 [protected]

Definition at line 56 of file Page2.h.

CStatic CPage2::m_wndColorBarFrame

Definition at line 29 of file Page2.h.

CStatic CPage2::m_wndColorBarFrame2

Definition at line 28 of file Page2.h.

CMFCColorPickerCtrl CPage2::m_wndColorPalette

Definition at line 27 of file Page2.h.

CMFCColorPickerCtrl CPage2::m_wndLum

Definition at line 26 of file Page2.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/Page2.h
  • vc2008fp/NewControls/Page2.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPage3 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CPage3 Class Reference

#include "Page3.h"

List of all members.

Public Types

enum | { IDD = IDD_PAGE3 }

Public Member Functions

CPage3 ()
~CPage3 ()

Public Attributes

BOOL | m_bDeviceFont
BOOL | m_bDrawUsingFont
BOOL | m_bRaster
CMFCButton | m_btnImageEdit
CMFCLinkCtrl | m_btnLink
BOOL | m_bTrueType
BYTE | m_nCurFontCharSet
CString | m_strCurFontName
CMyBrowseEdit m_wndCustomEdit
CCustomEditListBox m_wndEditListBox
CMFCEditBrowseCtrl | m_wndFileEdit
CMFCEditBrowseCtrl | m_wndFolderEdit
CMFCFontComboBox | m_wndFont
CStatic | m_wndImageArea

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDrawUsingFont ()
afx_msg void | OnEditImage ()
afx_msg void | OnFontType ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg void | OnSelchangeFont ()

Protected Attributes

CBitmap | m_bmpImage
CRect | m_rectImage

Detailed Description

Definition at line 44 of file Page3.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 54 of file Page3.h.

{ IDD = IDD_PAGE3 };

Constructor & Destructor Documentation

CPage3::CPage3 ( )

Definition at line 25 of file Page3.cpp.

               : CMFCPropertyPage(CPage3::IDD)
{
  m_bTrueType = TRUE;
  m_bRaster = TRUE;
  m_bDeviceFont = TRUE;
  m_bDrawUsingFont = FALSE;
}

CPage3::~CPage3 ( )

Definition at line 33 of file Page3.cpp.

{
}

Member Function Documentation

void CPage3::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 37 of file Page3.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_CUSTOM_EDIT, m_wndCustomEdit);
  DDX_Control(pDX, IDC_FOLDER_EDIT, m_wndFolderEdit);
  DDX_Control(pDX, IDC_FILE_EDIT, m_wndFileEdit);
  DDX_Control(pDX, IDC_FONT, m_wndFont);
  DDX_Control(pDX, IDC_IMAGE_AREA, m_wndImageArea);
  DDX_Control(pDX, IDC_EDIT_IMAGE, m_btnImageEdit);
  DDX_Control(pDX, IDC_BUTTON_URL, m_btnLink);
  DDX_Control(pDX, IDC_EDIT_LIST, m_wndEditListBox);
  DDX_Check(pDX, IDC_TRUETYPE, m_bTrueType);
  DDX_Check(pDX, IDC_RASTER, m_bRaster);
  DDX_Check(pDX, IDC_DEVICE, m_bDeviceFont);
  DDX_Check(pDX, IDC_DRAW_USING_FONT, m_bDrawUsingFont);
}

void CPage3::OnDrawUsingFont ( ) [protected]

Definition at line 174 of file Page3.cpp.

{
  UpdateData();
  CMFCFontComboBox::m_bDrawUsingFont = m_bDrawUsingFont;
  m_wndFont.RedrawWindow();
}

void CPage3::OnEditImage ( ) [protected]

Definition at line 125 of file Page3.cpp.

{
  HBITMAP hBmpCopy = (HBITMAP) ::CopyImage(m_bmpImage.GetSafeHandle(), IMAGE_BITMAP, 0, 0, 0);
  ASSERT(hBmpCopy != NULL);

  if (hBmpCopy)
  {
    CMFCImageEditorDialog dlg(CBitmap::FromHandle(hBmpCopy), this);
    if (dlg.DoModal() == IDOK)
    {
      m_bmpImage.DeleteObject();
      m_bmpImage.Attach(hBmpCopy);

      InvalidateRect(m_rectImage);
      UpdateWindow();
    }
    else
    {
      ::DeleteObject(hBmpCopy);
    }
  }
}

void CPage3::OnFontType ( ) [protected]

Definition at line 148 of file Page3.cpp.

{
  UpdateData();

  int nFontType = 0;

  if (m_bTrueType)
  {
    nFontType |= TRUETYPE_FONTTYPE;
  }

  if (m_bRaster)
  {
    nFontType |= RASTER_FONTTYPE;
  }

  if (m_bDeviceFont)
  {
    nFontType |= DEVICE_FONTTYPE;
  }

  CWaitCursor wait;
  m_wndFont.Setup(nFontType);
  m_wndFont.SelectFont((LPCTSTR)m_strCurFontName, m_nCurFontCharSet);
}

BOOL CPage3::OnInitDialog ( ) [protected, virtual]

Definition at line 67 of file Page3.cpp.

{
  CMFCPropertyPage::OnInitDialog();

  m_wndEditListBox.SetStandardButtons();
  m_wndEditListBox.EnableBrowseButton();

  m_wndEditListBox.AddItem(_T("Item 1"));
  m_wndEditListBox.AddItem(_T("Item 2"));
  m_wndEditListBox.AddItem(_T("Item 3"));

  m_btnLink.SetURL(_T("http://www.microsoft.com"));
  m_btnLink.SetTooltip(_T("Visit Microsoft site"));
  m_btnLink.SizeToContent();

  m_btnImageEdit.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
  m_btnImageEdit.SetImage(IDB_IMAGE);
  m_btnImageEdit.SizeToContent();
  m_btnImageEdit.SetTextHotColor(RGB(0, 0, 255));

  m_bmpImage.LoadBitmap(IDB_TEST_BITMAP);

  BITMAP bmp;
  m_bmpImage.GetBitmap(&bmp);

  m_wndImageArea.GetClientRect(m_rectImage);
  m_wndImageArea.MapWindowPoints(this, m_rectImage);

  m_rectImage.right = m_rectImage.left + bmp.bmWidth;
  m_rectImage.bottom = m_rectImage.top + bmp.bmHeight;

  m_wndFont.SelectFont(_T("Arial"));
  OnSelchangeFont();

  m_wndFolderEdit.EnableFolderBrowseButton();
  m_wndFileEdit.EnableFileBrowseButton();
  m_wndCustomEdit.EnableBrowseButton();

  UpdateData(FALSE);

  return TRUE;  // return TRUE unless you set the focus to a control
  // EXCEPTION: OCX Property Pages should return FALSE
}

void CPage3::OnPaint ( ) [protected]

Definition at line 111 of file Page3.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectFrame = m_rectImage;

  rectFrame.InflateRect(1, 1);
  dc.Draw3dRect(rectFrame, GetSysColor(COLOR_3DLIGHT), GetSysColor(COLOR_3DSHADOW));
  rectFrame.InflateRect(1, 1);
  dc.Draw3dRect(rectFrame, GetSysColor(COLOR_3DHILIGHT), GetSysColor(COLOR_3DDKSHADOW));

  dc.DrawState(m_rectImage.TopLeft(), m_rectImage.Size(), &m_bmpImage, 0);
}

void CPage3::OnSelchangeFont ( ) [protected]

Definition at line 181 of file Page3.cpp.

{
  CMFCFontInfo* pCurFontInfo = m_wndFont.GetSelFont();
  if (pCurFontInfo != NULL)
  {
    ASSERT_VALID(pCurFontInfo);

    m_strCurFontName = pCurFontInfo->m_strName;
    m_nCurFontCharSet = pCurFontInfo->m_nCharSet;
  }
}

Member Data Documentation

BOOL CPage3::m_bDeviceFont

Definition at line 65 of file Page3.h.

BOOL CPage3::m_bDrawUsingFont

Definition at line 66 of file Page3.h.

CBitmap CPage3::m_bmpImage [protected]

Definition at line 87 of file Page3.h.

BOOL CPage3::m_bRaster

Definition at line 64 of file Page3.h.

CMFCButton CPage3::m_btnImageEdit

Definition at line 60 of file Page3.h.

CMFCLinkCtrl CPage3::m_btnLink

Definition at line 61 of file Page3.h.

BOOL CPage3::m_bTrueType

Definition at line 63 of file Page3.h.

BYTE CPage3::m_nCurFontCharSet

Definition at line 67 of file Page3.h.

CRect CPage3::m_rectImage [protected]

Definition at line 86 of file Page3.h.

CString CPage3::m_strCurFontName

Definition at line 68 of file Page3.h.

CMyBrowseEdit CPage3::m_wndCustomEdit

Definition at line 55 of file Page3.h.

CCustomEditListBox CPage3::m_wndEditListBox

Definition at line 62 of file Page3.h.

CMFCEditBrowseCtrl CPage3::m_wndFileEdit

Definition at line 57 of file Page3.h.

CMFCEditBrowseCtrl CPage3::m_wndFolderEdit

Definition at line 56 of file Page3.h.

CMFCFontComboBox CPage3::m_wndFont

Definition at line 58 of file Page3.h.

CStatic CPage3::m_wndImageArea

Definition at line 59 of file Page3.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/Page3.h
  • vc2008fp/NewControls/Page3.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPage4 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPage4 Class Reference

#include "Page4.h"

List of all members.

Public Types

enum | { IDD = IDD_PAGE4 }

Public Member Functions

CPage4 ()
~CPage4 ()

Public Attributes

CString | m_strValue1
CString | m_strValue2
CString | m_strValue3
CString | m_strValue4
CString | m_strValue5
CMFCMaskedEdit | m_wndMaskEdit1
CMFCMaskedEdit | m_wndMaskEdit2
CMFCMaskedEdit | m_wndMaskEdit3
CMFCMaskedEdit | m_wndMaskEdit4
CMFCMaskedEdit | m_wndMaskEdit5

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnButtonGet ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 15 of file Page4.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file Page4.h.

{ IDD = IDD_PAGE4 };

Constructor & Destructor Documentation

CPage4::CPage4 ( )

Definition at line 25 of file Page4.cpp.

               : CMFCPropertyPage(CPage4::IDD)
{
  m_strValue1 = _T("");
  m_strValue2 = _T("");
  m_strValue3 = _T("");
  m_strValue4 = _T("");
  m_strValue5 = _T("");
}

CPage4::~CPage4 ( )

Definition at line 34 of file Page4.cpp.

{
}

Member Function Documentation

void CPage4::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 38 of file Page4.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_MASKEDIT5, m_wndMaskEdit5);
  DDX_Control(pDX, IDC_MASKEDIT4, m_wndMaskEdit4);
  DDX_Control(pDX, IDC_MASKEDIT3, m_wndMaskEdit3);
  DDX_Control(pDX, IDC_MASKEDIT2, m_wndMaskEdit2);
  DDX_Control(pDX, IDC_MASKEDIT1, m_wndMaskEdit1);
  DDX_Text(pDX, IDC_VALUE1, m_strValue1);
  DDX_Text(pDX, IDC_VALUE2, m_strValue2);
  DDX_Text(pDX, IDC_VALUE3, m_strValue3);
  DDX_Text(pDX, IDC_VALUE4, m_strValue4);
  DDX_Text(pDX, IDC_VALUE5, m_strValue5);
}

void CPage4::OnButtonGet ( ) [protected]

Definition at line 99 of file Page4.cpp.

{
  m_wndMaskEdit1.GetWindowText(m_strValue1);
  m_wndMaskEdit2.GetWindowText(m_strValue2);
  m_wndMaskEdit3.GetWindowText(m_strValue3);
  m_wndMaskEdit4.GetWindowText(m_strValue4);
  m_wndMaskEdit5.GetWindowText(m_strValue5);
  UpdateData(FALSE);
}

BOOL CPage4::OnInitDialog ( ) [protected, virtual]

Definition at line 60 of file Page4.cpp.

{
  CMFCPropertyPage::OnInitDialog();

  // Mask 1: phone number
  m_wndMaskEdit1.EnableMask(_T(" ddd  ddd dddd"), // The mask string
    _T("(___) ___-____"), // Literal, "_" char = character entry
    _T(' ')); // Default char
  m_wndMaskEdit1.SetValidChars(NULL); // Valid string characters
  m_wndMaskEdit1.SetWindowText(_T("(123) 123-1212"));

  // Mask 2: State, Zip Code
  m_wndMaskEdit2.EnableMask(_T("       cc       ddddd-dddd"), // The mask string
    _T("State: __, Zip: _____-____"), // Literal, "_" char = character entry
    _T(' ')); // Backspace replace char
  m_wndMaskEdit2.SetValidChars(NULL); // Valid string characters
  m_wndMaskEdit2.SetWindowText(_T("State: NY, Zip: 12345-6789"));
  // Mask 3: serial code
  m_wndMaskEdit3.EnableMask(_T("     AAAA AAAA AAAA AAAA"), // The mask string
    _T("S/N: ____-____-____-____"), // Literal, "_" char = character entry
    _T('_')); // Backspace replace char
  m_wndMaskEdit3.SetValidChars(NULL); // Valid string characters
  m_wndMaskEdit3.SetWindowText(_T("S/N: FPR5-5678-1234-8765"));

  // Mask 4: 0xFFFF
  m_wndMaskEdit4.EnableMask(_T("  AAAA"), // The mask string
    _T("0x____"), // Literal, "_" char = character entry
    _T('_')); // Backspace replace char
  m_wndMaskEdit4.SetValidChars(_T("1234567890ABCDEFabcdef")); // Valid string characters
  m_wndMaskEdit4.SetWindowText(_T("0x01AF"));

  // Mask 5: digits only
  m_wndMaskEdit5.DisableMask(); // Don't use the mask
  m_wndMaskEdit5.SetValidChars(_T("1234567890")); // Valid string characters
  m_wndMaskEdit5.SetWindowText(_T("1234567890"));

  return TRUE;  // return TRUE unless you set the focus to a control
}

Member Data Documentation

CString CPage4::m_strValue1

Definition at line 31 of file Page4.h.

CString CPage4::m_strValue2

Definition at line 32 of file Page4.h.

CString CPage4::m_strValue3

Definition at line 33 of file Page4.h.

CString CPage4::m_strValue4

Definition at line 34 of file Page4.h.

CString CPage4::m_strValue5

Definition at line 35 of file Page4.h.

CMFCMaskedEdit CPage4::m_wndMaskEdit1

Definition at line 30 of file Page4.h.

CMFCMaskedEdit CPage4::m_wndMaskEdit2

Definition at line 29 of file Page4.h.

CMFCMaskedEdit CPage4::m_wndMaskEdit3

Definition at line 28 of file Page4.h.

CMFCMaskedEdit CPage4::m_wndMaskEdit4

Definition at line 27 of file Page4.h.

CMFCMaskedEdit CPage4::m_wndMaskEdit5

Definition at line 26 of file Page4.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/Page4.h
  • vc2008fp/NewControls/Page4.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPage5 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends

CPage5 Class Reference

#include "Page5.h"

List of all members.

Public Types

enum | { IDD = IDD_PAGE5 }

Public Member Functions

CPage5 ()
~CPage5 ()

Public Attributes

BOOL | m_bColor
BOOL | m_bDescrArea
BOOL | m_bDotNetLook
BOOL | m_bHeader
BOOL | m_bHideFontProps
BOOL | m_bMarkChanged
BOOL | m_bMarkSortedColumn
BOOL | m_bModifyFont
BOOL | m_bPropListCategorized
BOOL | m_bPropListCustomColors
BOOL | m_bShowDragContext
CButton | m_btnExpandAll
CMyListCtrl m_wndList
CStatic | m_wndPropListLocation

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnColorRows ()
afx_msg void | OnDescriptionArea ()
afx_msg void | OnDotNetLook ()
afx_msg void | OnHeader ()
afx_msg void | OnHideFontProps ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnMarkChanged ()
afx_msg void | OnMarkSortedColumn ()
afx_msg void | OnModifyFont ()
afx_msg void | OnProplistCategorized ()
afx_msg void | OnProplistCategorized2 ()
afx_msg void | OnPropListCustomColors ()
afx_msg void | OnProplistExpandAll ()
afx_msg void | OnResetValues ()

Protected Attributes

CImageList | m_imageList
CMFCPropertyGridCtrl | m_wndPropList
CMFCPropertyGridProperty * | pGroupFont

Friends

class | CMyListCtrl

Detailed Description

Definition at line 28 of file Page5.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 40 of file Page5.h.

{ IDD = IDD_PAGE5 };

Constructor & Destructor Documentation

CPage5::CPage5 ( )

Definition at line 28 of file Page5.cpp.

               : CMFCPropertyPage(CPage5::IDD)
{
  m_bDescrArea = TRUE;
  m_bDotNetLook = TRUE;
  m_bHeader = TRUE;
  m_bMarkSortedColumn = TRUE;
  m_bColor = TRUE;
  m_bModifyFont = TRUE;
  m_bPropListCustomColors = FALSE;
  m_bPropListCategorized = TRUE;
  m_bShowDragContext = TRUE;
  m_bMarkChanged = TRUE;
  m_bHideFontProps = FALSE;

  m_wndList.m_bColor = TRUE;
  m_wndList.m_bModifyFont = TRUE;

  pGroupFont = NULL;
}

CPage5::~CPage5 ( )

Definition at line 48 of file Page5.cpp.

{
}

Member Function Documentation

void CPage5::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 52 of file Page5.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_PROPLIST_EXPAND_ALL, m_btnExpandAll);
  DDX_Control(pDX, IDC_PROPLIST_LOCATION, m_wndPropListLocation);
  DDX_Control(pDX, IDC_LIST1, m_wndList);
  DDX_Check(pDX, IDC_DESCRIPTION_AREA, m_bDescrArea);
  DDX_Check(pDX, IDC_DOT_NET_LOOK, m_bDotNetLook);
  DDX_Check(pDX, IDC_HEADER, m_bHeader);
  DDX_Check(pDX, IDC_MARK_SORTED_COLUMN, m_bMarkSortedColumn);
  DDX_Check(pDX, IDC_COLOR_ROWS, m_bColor);
  DDX_Check(pDX, IDC_MODIFY_FONT, m_bModifyFont);
  DDX_Check(pDX, IDC_CUSTOM_COLORS, m_bPropListCustomColors);
  DDX_Check(pDX, IDC_PROPLIST_CATEGORIZED, m_bPropListCategorized);
  DDX_Check(pDX, IDC_PROPLIST_CATEGORIZED2, m_bShowDragContext);
  DDX_Check(pDX, IDC_MARK_CHANGED, m_bMarkChanged);
  DDX_Check(pDX, IDC_HIDE_FONT_PROPS, m_bHideFontProps);
}

void CPage5::OnColorRows ( ) [protected]

Definition at line 339 of file Page5.cpp.

{
  UpdateData();
  m_wndList.m_bColor = m_bColor;
  m_wndList.RedrawWindow();
}

void CPage5::OnDescriptionArea ( ) [protected]

Definition at line 269 of file Page5.cpp.

{
  UpdateData();
  m_wndPropList.EnableDescriptionArea(m_bDescrArea);
}

void CPage5::OnDotNetLook ( ) [protected]

Definition at line 263 of file Page5.cpp.

{
  UpdateData();
  m_wndPropList.SetVSDotNetLook(m_bDotNetLook);
}

void CPage5::OnHeader ( ) [protected]

Definition at line 257 of file Page5.cpp.

{
  UpdateData();
  m_wndPropList.EnableHeaderCtrl(m_bHeader);
}

void CPage5::OnHideFontProps ( ) [protected]

Definition at line 413 of file Page5.cpp.

{
  UpdateData();

  ASSERT_VALID(pGroupFont);
  pGroupFont->Show(!m_bHideFontProps);
}

BOOL CPage5::OnInitDialog ( ) [protected, virtual]

Definition at line 93 of file Page5.cpp.

{
  CMFCPropertyPage::OnInitDialog();

  m_wndList.InsertColumn(0, _T("#"), LVCFMT_LEFT, 20);

  int nColumn;
  for (nColumn = 1; nColumn < nColumns; nColumn++)
  {
    m_wndList.InsertColumn(nColumn, CString((TCHAR)(_T('A') + nColumn - 1)), LVCFMT_LEFT, 60 + nColumn * 10);
  }

  for (int i = 0; i < nRows; i++)
  {
    CString str;
    str.Format(_T("%d"), i);
    m_wndList.InsertItem(i, str);
    m_wndList.SetItemData(i, i);

    for (nColumn = 1; nColumn < nColumns; nColumn++)
    {
      str.Format(_T("Item(%d, %d)"), nColumn - 1, nColumn == 1 ? 99 - i : i + 50);
      m_wndList.SetItemText(i, nColumn, str);
    }
  }

  m_wndList.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
  m_wndList.EnableMarkSortedColumn();

  CRect rectPropList;
  m_wndPropListLocation.GetClientRect(&rectPropList);
  m_wndPropListLocation.MapWindowPoints(this, &rectPropList);

  m_wndPropList.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, rectPropList, this, (UINT)-1);

  m_wndPropList.EnableHeaderCtrl();
  m_wndPropList.EnableDescriptionArea();
  m_wndPropList.SetVSDotNetLook(m_bDotNetLook);
  m_wndPropList.MarkModifiedProperties(m_bMarkChanged);

  m_wndPropList.SetAlphabeticMode(!m_bPropListCategorized);
  m_wndPropList.SetShowDragContext(m_bShowDragContext);

  std::auto_ptr<CMFCPropertyGridProperty> apGroup1(new CMFCPropertyGridProperty(_T("Appearance")));

  COleVariant var3DLook((short)VARIANT_FALSE, VT_BOOL);
  apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("3D Look"), var3DLook, _T("Specifies the dialog's font will be nonbold and controls will have a 3D border")));

  CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("Border"), _T("Dialog Frame"), _T("One of: None, Thin, Resizable, or Dialog Frame"));
  pProp->AddOption(_T("None"));
  pProp->AddOption(_T("Thin"));
  pProp->AddOption(_T("Resizable"));
  pProp->AddOption(_T("Dialog Frame"));
  pProp->AllowEdit(FALSE);

  apGroup1->AddSubItem(pProp);
  apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("Caption"), (COleVariant) _T("About NewControlsDemo"), _T("Specifies the text that will be displayed in the dialog's title bar")));

  m_wndPropList.AddProperty(apGroup1.release());

  std::auto_ptr<CMFCPropertyGridProperty> apSize(new CBoundedNumberPairProp(_T("Window Size"), 0, 300, 0, 200, 0, TRUE));

  pProp = new CBoundedNumberSubProp(_T("Height"), (COleVariant) 250l, 0, 300, _T("Specifies the dialog's height"));
  pProp->EnableSpinControl(TRUE, 0, 300);
  apSize->AddSubItem(pProp);

  pProp = new CBoundedNumberSubProp( _T("Width"), (COleVariant) 150l, 0, 200, _T("Specifies the dialog's width"));
  pProp->EnableSpinControl(TRUE, 0, 200);
  apSize->AddSubItem(pProp);

  m_wndPropList.AddProperty(apSize.release());

  pGroupFont = new CMFCPropertyGridProperty(_T("Font"));

  LOGFONT lf;
  CFont* font = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
  font->GetLogFont(&lf);
  lstrcpy(lf.lfFaceName, _T("Arial"));

  pGroupFont->AddSubItem(new CMFCPropertyGridFontProperty(_T("Font"), lf, CF_EFFECTS | CF_SCREENFONTS, _T("Specifies the default font for the dialog")));
  pGroupFont->AddSubItem(new CMFCPropertyGridProperty(_T("Use System Font"), (COleVariant)VARIANT_TRUE, _T("Specifies that the dialog uses MS Shell Dlg font")));

  m_wndPropList.AddProperty(pGroupFont);

  std::auto_ptr<CMFCPropertyGridProperty> apGroup3(new CMFCPropertyGridProperty(_T("Misc")));
  pProp = new CMFCPropertyGridProperty(_T("(Name)"), _T("IDD_ABOUT_BOX(dialog)"));
  pProp->Enable(FALSE);
  apGroup3->AddSubItem(pProp);

  CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("Window Color"), RGB(210, 192, 254), NULL, _T("Specifies the default dialog color"));
  pColorProp->EnableOtherButton(_T("Other..."));
  pColorProp->EnableAutomaticButton(_T("Default"), ::GetSysColor(COLOR_3DFACE));
  apGroup3->AddSubItem(pColorProp);

  static TCHAR BASED_CODE szFilter[] = _T("Icon Files(*.ico)|*.ico|All Files(*.*)|*.*||");
  apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Icon"), TRUE, _T(""), _T("ico"), 0, szFilter, _T("Specifies the dialog icon")));

  apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Folder"), _T("c:\\")));

  apGroup3->AddSubItem(new CMFCPropertyGridProperty(_T("Phone"), _T("(123) 123-12-12"), _T("Enter a phone number"), 0, _T(" ddd  ddd dd dd"), _T("(___) ___-__-__")));

  m_wndPropList.AddProperty(apGroup3.release());

  std::auto_ptr<CMFCPropertyGridProperty> apGroup4(new CMFCPropertyGridProperty(_T("Hierarchy")));

  CMFCPropertyGridProperty* pGroup41 = new CMFCPropertyGridProperty(_T("First sub-level"));
  apGroup4->AddSubItem(pGroup41);

  CMFCPropertyGridProperty* pGroup411 = new CMFCPropertyGridProperty(_T("Second sub-level"));
  pGroup41->AddSubItem(pGroup411);

  pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 1"), (COleVariant) _T("Value 1"), _T("This is a description")));
  pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 2"), (COleVariant) _T("Value 2"), _T("This is a description")));
  pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 3"), (COleVariant) _T("Value 3"), _T("This is a description")));

  apGroup4->Expand(FALSE);
  m_wndPropList.AddProperty(apGroup4.release());

  // Add custom properties:
  std::auto_ptr<CMFCPropertyGridProperty> apGroup5(new CMFCPropertyGridProperty(_T("Custom Properties")));

  apGroup5->AddSubItem(new CCheckBoxProp(_T("Check Box"), TRUE, _T("Check Box Property")));

  apGroup5->AddSubItem(new CPasswordProp(_T("Password"), _T("123456"), _T("Password Property")));

  apGroup5->AddSubItem(new CSliderProp(_T("Slider"), 0, _T("Slider Property")));

  CBitmap bmp;
  bmp.LoadBitmap(IDB_PROPICONS);

  m_imageList.Create(16, 16, ILC_MASK | ILC_COLOR24, 0, 0);
  m_imageList.Add(&bmp, RGB(192, 192, 192));

  CStringList lstIconNames;
  lstIconNames.AddTail(_T("Icon 1"));
  lstIconNames.AddTail(_T("Icon 2"));
  lstIconNames.AddTail(_T("Icon 3"));
  lstIconNames.AddTail(_T("Icon 4"));
  lstIconNames.AddTail(_T("Icon 5"));
  lstIconNames.AddTail(_T("Icon 6"));
  lstIconNames.AddTail(_T("Icon 7"));
  lstIconNames.AddTail(_T("Icon 8"));
  lstIconNames.AddTail(_T("Icon 9"));
  lstIconNames.AddTail(_T("Icon 10"));

  apGroup5->AddSubItem(new CIconListProp(_T("Icon List"), m_imageList, 0, &lstIconNames, _T("Icon List Property")));

  CComboBoxExProp* pComboEx = new CComboBoxExProp(_T("ComboBoxEx"), _T("Test"), _T("ComboBoxEx Property"), 0, &m_imageList);
  pComboEx->AddOption(_T("New"), 0, 0);
  pComboEx->AddOption(_T("Open"), 1, 1);
  pComboEx->AddOption(_T("Save"), 2, 0);

  apGroup5->AddSubItem(pComboEx);

  apGroup5->AddSubItem(new COwnerDrawDescrProp(_T("Owner-draw descr."), 0l));
  apGroup5->AddSubItem(new CTwoButtonsProp(_T("2 Buttons"), _T("text")));
  apGroup5->AddSubItem(new CCustomDlgProp(_T("Custom Dialog"), _T("value")));

  m_wndPropList.AddProperty(apGroup5.release());

  return TRUE;  // return TRUE unless you set the focus to a control
  // EXCEPTION: OCX Property Pages should return FALSE
}

void CPage5::OnMarkChanged ( ) [protected]

Definition at line 407 of file Page5.cpp.

{
  UpdateData();
  m_wndPropList.MarkModifiedProperties(m_bMarkChanged);
}

void CPage5::OnMarkSortedColumn ( ) [protected]

Definition at line 275 of file Page5.cpp.

{
  UpdateData();
  m_wndList.EnableMarkSortedColumn(m_bMarkSortedColumn);
}

void CPage5::OnModifyFont ( ) [protected]

Definition at line 346 of file Page5.cpp.

{
  UpdateData();
  m_wndList.m_bModifyFont = m_bModifyFont;
  m_wndList.RedrawWindow();
}

void CPage5::OnProplistCategorized ( ) [protected]

Definition at line 388 of file Page5.cpp.

{
  UpdateData();

  m_wndPropList.SetAlphabeticMode(!m_bPropListCategorized);
  m_btnExpandAll.EnableWindow(m_bPropListCategorized);
}

void CPage5::OnProplistCategorized2 ( ) [protected]

Definition at line 396 of file Page5.cpp.

{
  UpdateData();
  m_wndPropList.SetShowDragContext(m_bShowDragContext);
}

void CPage5::OnPropListCustomColors ( ) [protected]

Definition at line 353 of file Page5.cpp.

{
  UpdateData();

  if (m_bPropListCustomColors)
  {
    if (afxGlobalData.m_nBitsPerPixel >= 16)
    {
      m_wndPropList.SetCustomColors(RGB(228, 243, 254), RGB(46, 70, 165), RGB(200, 236, 209), RGB(33, 102, 49), RGB(255, 229, 216), RGB(128, 0, 0), RGB(159, 159, 255));
    }
    else
    {
      m_wndPropList.SetCustomColors(RGB(255, 255, 255), RGB(32, 64, 128), RGB(255, 255, 0), RGB(255, 255, 0), RGB(192, 192, 192), RGB(255, 255, 255), RGB(0, 0, 0));
    }
  }
  else
  {
    COLORREF c = (COLORREF)-1;
    m_wndPropList.SetCustomColors(c, c, c, c, c, c, c);
  }

  m_wndPropList.RedrawWindow();
}

void CPage5::OnProplistExpandAll ( ) [protected]

Definition at line 377 of file Page5.cpp.

{
  static BOOL bExpanded = FALSE;

  m_wndPropList.ExpandAll(!bExpanded);

  m_btnExpandAll.SetWindowText(bExpanded ? _T("Expand &All") : _T("Collapse &All"));

  bExpanded = !bExpanded;
}

void CPage5::OnResetValues ( ) [protected]

Definition at line 402 of file Page5.cpp.

{
  m_wndPropList.ResetOriginalValues();
}

Friends And Related Function Documentation

friend class CMyListCtrl [friend]

Definition at line 30 of file Page5.h.

Member Data Documentation

BOOL CPage5::m_bColor

Definition at line 48 of file Page5.h.

BOOL CPage5::m_bDescrArea

Definition at line 44 of file Page5.h.

BOOL CPage5::m_bDotNetLook

Definition at line 45 of file Page5.h.

BOOL CPage5::m_bHeader

Definition at line 46 of file Page5.h.

BOOL CPage5::m_bHideFontProps

Definition at line 54 of file Page5.h.

BOOL CPage5::m_bMarkChanged

Definition at line 53 of file Page5.h.

BOOL CPage5::m_bMarkSortedColumn

Definition at line 47 of file Page5.h.

BOOL CPage5::m_bModifyFont

Definition at line 49 of file Page5.h.

BOOL CPage5::m_bPropListCategorized

Definition at line 51 of file Page5.h.

BOOL CPage5::m_bPropListCustomColors

Definition at line 50 of file Page5.h.

BOOL CPage5::m_bShowDragContext

Definition at line 52 of file Page5.h.

CButton CPage5::m_btnExpandAll

Definition at line 41 of file Page5.h.

CImageList CPage5::m_imageList [protected]

Definition at line 81 of file Page5.h.

CMyListCtrl CPage5::m_wndList

Definition at line 43 of file Page5.h.

CMFCPropertyGridCtrl CPage5::m_wndPropList [protected]

Definition at line 80 of file Page5.h.

CStatic CPage5::m_wndPropListLocation

Definition at line 42 of file Page5.h.

CMFCPropertyGridProperty* CPage5::pGroupFont [protected]

Definition at line 83 of file Page5.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/Page5.h
  • vc2008fp/NewControls/Page5.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPage6 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CPage6 Class Reference

#include "Page6.h"

List of all members.

Public Types

enum | { IDD = IDD_PAGE6 }

Public Member Functions

CPage6 ()
~CPage6 ()
afx_msg void | OnDestroy ()

Public Attributes

CString | m_strSelectedFolder
CMFCShellTreeCtrl | m_wbdShellTree
CMFCShellListCtrl | m_wndShellList

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg LRESULT | OnChangeSystemIcon (WPARAM wParam, LPARAM lParam)
virtual BOOL | OnInitDialog ()
afx_msg void | OnSelectFolder ()

Protected Attributes

ULONG | m_ulChangeIconNotifyID

Detailed Description

Definition at line 15 of file Page6.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file Page6.h.

{ IDD = IDD_PAGE6 };

Constructor & Destructor Documentation

CPage6::CPage6 ( )

Definition at line 30 of file Page6.cpp.

               : CMFCPropertyPage(CPage6::IDD)
{
  m_strSelectedFolder = _T("c:\\");
  m_ulChangeIconNotifyID = 0;
}

CPage6::~CPage6 ( )

Definition at line 36 of file Page6.cpp.

{
}

Member Function Documentation

void CPage6::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 40 of file Page6.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_LIST1, m_wndShellList);
  DDX_Control(pDX, IDC_TREE1, m_wbdShellTree);
  DDX_Text(pDX, IDC_SELECTED_FOLDER, m_strSelectedFolder);
}

LRESULT CPage6::OnChangeSystemIcon | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 87 of file Page6.cpp.

{
  UNREFERENCED_PARAMETER(wParam);
  if ((lParam == SHCNE_CREATE) || (lParam == SHCNE_DELETE))
  {
    if (m_wndShellList.IsDesktop())
    {
      int nSortColumn = m_wndShellList.GetHeaderCtrl().GetSortColumn();
      int nSortState = m_wndShellList.GetHeaderCtrl().GetColumnState(nSortColumn);
      m_wndShellList.Refresh();
      m_wbdShellTree.Refresh();
      m_wndShellList.Sort(nSortColumn, nSortState == 1 ? TRUE : FALSE);
    }
  }
  return TRUE;
}

void CPage6::OnDestroy ( void )

Definition at line 104 of file Page6.cpp.

{
  if (m_ulChangeIconNotifyID != 0)
  {
    SHChangeNotifyDeregister(m_ulChangeIconNotifyID);
  }
  CMFCPropertyPage::OnDestroy();
}

BOOL CPage6::OnInitDialog ( ) [protected, virtual]

Definition at line 65 of file Page6.cpp.

{
  CMFCPropertyPage::OnInitDialog();

  m_wbdShellTree.Expand(m_wbdShellTree.GetRootItem(), TVE_EXPAND);
  m_wbdShellTree.SetRelatedList(&m_wndShellList);

  LPITEMIDLIST ppidl;
  if (SHGetSpecialFolderLocation(GetSafeHwnd(),CSIDL_BITBUCKET, &ppidl) != NOERROR)
  {
    return 0;
  }

  SHChangeNotifyEntry scnIDL;
  scnIDL.pidl = ppidl;
  scnIDL.fRecursive = TRUE;

  m_ulChangeIconNotifyID = SHChangeNotifyRegister(m_hWnd, SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS, SHCNE_ALLEVENTS,  UWM_CHANGE_SYSTEM_ICON, 1, &scnIDL);

  return TRUE;  // return TRUE unless you set the focus to a control
}

void CPage6::OnSelectFolder ( ) [protected]

Definition at line 57 of file Page6.cpp.

{
  if (theApp.GetShellManager()->BrowseForFolder(m_strSelectedFolder, this, m_strSelectedFolder))
  {
    UpdateData(FALSE);
  }
}

Member Data Documentation

CString CPage6::m_strSelectedFolder

Definition at line 28 of file Page6.h.

ULONG CPage6::m_ulChangeIconNotifyID [protected]

Definition at line 33 of file Page6.h.

CMFCShellTreeCtrl CPage6::m_wbdShellTree

Definition at line 27 of file Page6.h.

CMFCShellListCtrl CPage6::m_wndShellList

Definition at line 26 of file Page6.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/Page6.h
  • vc2008fp/NewControls/Page6.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPagerCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Private Attributes

CPagerCtrlPage Class Reference

#include "PagerCtrlPage.h"

List of all members.

Public Types

enum | { IDD = IDD_PAGER_CONTROL }

Public Member Functions

CPagerCtrlPage ()
virtual | ~CPagerCtrlPage ()
afx_msg void | OnBnClickedSetButtonSize ()
afx_msg void | OnCalcSize (NMHDR *pNotifyStruct, LRESULT *result)
afx_msg void | OnCbnSelchangeBackColor ()
afx_msg void | OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
virtual BOOL | OnInitDialog ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Private Attributes

CComboBox | m_comboColor
int | m_nSize
CPagerCtrl | m_pagerctrl
CSliderCtrl | m_sliderBorderSize
CStatic | m_staticBorderSize
CToolBar | m_toolbar

Detailed Description

Definition at line 5 of file PagerCtrlPage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 14 of file PagerCtrlPage.h.

{ IDD = IDD_PAGER_CONTROL };

Constructor & Destructor Documentation

CPagerCtrlPage::CPagerCtrlPage ( )

Definition at line 24 of file PagerCtrlPage.cpp.

  : CPropertyPage(CPagerCtrlPage::IDD)
{
}

CPagerCtrlPage::~CPagerCtrlPage ( ) [virtual]

Definition at line 29 of file PagerCtrlPage.cpp.

{
}

Member Function Documentation

void CPagerCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 33 of file PagerCtrlPage.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  DDX_Text(pDX, IDC_BUTTON_SIZE, m_nSize);
  DDX_Control(pDX, IDC_SLIDER_BORDER, m_sliderBorderSize);
  DDX_Control(pDX, IDC_STATIC_BORDERSIZE, m_staticBorderSize);
  DDX_Control(pDX, IDC_BACK_COLOR, m_comboColor);
}

void CPagerCtrlPage::OnBnClickedSetButtonSize ( )

Definition at line 95 of file PagerCtrlPage.cpp.

{
  UpdateData(TRUE);
  m_pagerctrl.SetButtonSize(m_nSize);
}

void CPagerCtrlPage::OnCalcSize | ( | NMHDR * | pNotifyStruct,
 |  | LRESULT * | result
 | ) |  |

Definition at line 101 of file PagerCtrlPage.cpp.

{
  LPNMPGCALCSIZE pNMPGCALCSIZE = (LPNMPGCALCSIZE)pNotifyStruct;

  if (pNMPGCALCSIZE->dwFlag == PGF_CALCWIDTH)
  {
    SIZE size;
    m_toolbar.SendMessage(TB_GETMAXSIZE, 0, (LPARAM)&size);
    pNMPGCALCSIZE->iWidth = size.cx;
  }
}

void CPagerCtrlPage::OnCbnSelchangeBackColor ( )

Definition at line 90 of file PagerCtrlPage.cpp.

{
  m_pagerctrl.SetBkColor(colors[m_comboColor.GetCurSel()].color);
}

void CPagerCtrlPage::OnHScroll | ( | UINT | nSBCode,
 |  | UINT | nPos,
 |  | CScrollBar * | pScrollBar
 | ) |  |

Definition at line 113 of file PagerCtrlPage.cpp.

{
  int nBorderSize = m_sliderBorderSize.GetPos();
  CString strSize;
  strSize.Format(_T("%d"), nBorderSize);
  m_staticBorderSize.SetWindowText(strSize);

  m_pagerctrl.SetBorder(nBorderSize);
}

BOOL CPagerCtrlPage::OnInitDialog ( ) [virtual]

Definition at line 42 of file PagerCtrlPage.cpp.

{
  CPropertyPage::OnInitDialog();

  // Init the pager control and the embedded toolbar control
  CRect clientRect;
  this->GetClientRect(&clientRect);
  BOOL nRet;
  nRet = m_pagerctrl.Create(WS_VISIBLE | WS_CHILD | PGS_HORZ,
          CRect(32, 32, clientRect.right - 32, 102),
          this,
          IDC_PAGER_CTRL);

  m_toolbar.CreateEx(&m_pagerctrl);
  m_toolbar.LoadToolBar(IDR_TOOLBAR1);

  m_pagerctrl.SetChild(m_toolbar.m_hWnd);

  // Init the controls that display/set the border size
  m_sliderBorderSize.SetRange(0, 32);
  int nBorderSize = m_pagerctrl.GetBorder();
  m_sliderBorderSize.SetPos(nBorderSize);

  CString strSize;
  strSize.Format(_T("%d"), nBorderSize);
  m_staticBorderSize.SetWindowText(strSize);

  // Init the controls that display/set the button size
  m_pagerctrl.SetButtonSize(32);
  m_nSize = m_pagerctrl.GetButtonSize();

  // Init the control that display/set the color
  for (int i = 0; i < _countof(colors); i++)
    m_comboColor.AddString(colors[i].lpszDisplay);
  m_comboColor.SetCurSel(0);
  m_pagerctrl.SetBkColor(colors[0].color);

  UpdateData(FALSE);
  return TRUE;
}

Member Data Documentation

CComboBox CPagerCtrlPage::m_comboColor [private]

Definition at line 33 of file PagerCtrlPage.h.

int CPagerCtrlPage::m_nSize [private]

Definition at line 36 of file PagerCtrlPage.h.

CPagerCtrl CPagerCtrlPage::m_pagerctrl [private]

Definition at line 31 of file PagerCtrlPage.h.

CSliderCtrl CPagerCtrlPage::m_sliderBorderSize [private]

Definition at line 34 of file PagerCtrlPage.h.

CStatic CPagerCtrlPage::m_staticBorderSize [private]

Definition at line 35 of file PagerCtrlPage.h.

CToolBar CPagerCtrlPage::m_toolbar [private]

Definition at line 32 of file PagerCtrlPage.h.

The documentation for this class was generated from the following files:
  • controls/cmnctrl/PagerCtrlPage.h
  • controls/cmnctrl/PagerCtrlPage.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPageSetupDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions

CPageSetupDlg Class Reference

#include "pageset.h"

Inherits CCSDialog, and CCSDialog.

List of all members.

Public Types

enum | { IDD = IDD_PAGE_SETUP }
enum | { IDD = IDD_PAGE_SETUP }
enum | { IDD = IDD_PAGE_SETUP }

Public Member Functions

CPageSetupDlg (CWnd *pParent=NULL)
CPageSetupDlg (CWnd *pParent=NULL)
CPageSetupDlg (CWnd *pParent=NULL)
void | FormatFooter (CString &strFooter, CTime &time, LPCTSTR pszFileName, UINT nPage)
void | FormatHeader (CString &strHeader, CTime &time, LPCTSTR pszFileName, UINT nPage)
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()
void | Initialize ()
void | Terminate ()

Public Attributes

int | m_iFooterTime
int | m_iFooterTimeOld
int | m_iHeaderTime
int | m_iHeaderTimeOld
int | m_nBottomMargin
int | m_nLeftMargin
int | m_nRightMargin
int | m_nTopMargin
CString | m_strFooter
CString | m_strFooterOld
CString | m_strHeader
CString | m_strHeaderOld

Static Public Attributes

static const DWORD | m_nHelpIDs []

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)

Static Protected Member Functions

static void | FormatFilePage (CString &strFormat, LPCTSTR pszFileName, UINT nPage)

Detailed Description

Definition at line 19 of file pageset.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file pageset.h.

{ IDD = IDD_PAGE_SETUP };

anonymous enum
Enumerator:
IDD

Definition at line 23 of file pageset.h.

{ IDD = IDD_PAGE_SETUP_DIALOG };

anonymous enum
Enumerator:
IDD

Definition at line 25 of file pageset.h.

{ IDD = IDD_PAGE_SETUP_DIALOG };

Constructor & Destructor Documentation

CPageSetupDlg::CPageSetupDlg ( CWnd * pParent = NULL )

Definition at line 26 of file pageset.cpp.

  : CDialog(CPageSetupDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CPageSetupDlg)
  m_iFooterTime = -1;
  m_iHeaderTime = -1;
  //}}AFX_DATA_INIT
}

CPageSetupDlg::CPageSetupDlg ( CWnd * pParent = NULL )
CPageSetupDlg::CPageSetupDlg ( CWnd * pParent = NULL )

Member Function Documentation

void CPageSetupDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 35 of file pageset.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CPageSetupDlg)
  DDX_Text(pDX, IDC_FOOTER, m_strFooter);
  DDX_Text(pDX, IDC_HEADER, m_strHeader);
  DDX_Radio(pDX, IDC_FOOTER_FILE, m_iFooterTime);
  DDX_Radio(pDX, IDC_HEADER_FILE, m_iHeaderTime);
  //}}AFX_DATA_MAP
}

virtual void CPageSetupDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual void CPageSetupDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
void CPageSetupDlg::FormatFilePage | ( | CString & | strFormat,
 |  | LPCTSTR | pszFileName,
 |  | UINT | nPage |
 | ) |  |  | [static, protected]

Definition at line 65 of file pageset.cpp.

{
  TCHAR sz[32];
  _stprintf_s(sz, 32, _T("%d"), nPage);
  ::Replace(strFormat, _T("&p"), sz);
  if (pszFileName == NULL)
  {
    pszFileName = sz;
    sz[0] = 0;
  }
  ::Replace(strFormat, _T("&f"), pszFileName);
}

void CPageSetupDlg::FormatFooter | ( | CString & | strFooter,
 |  | CTime & | time,
 |  | LPCTSTR | pszFileName,
 |  | UINT | nPage
 | ) |  |

Definition at line 94 of file pageset.cpp.

{
  CString strFormat = m_strFooter;
  FormatFilePage(strFormat, pszFileName, nPage);
#ifdef _UNICODE
  int nLen = strFormat.GetLength();
  char *pszFormat = (char*)_alloca(nLen+1);
  wcstombs(pszFormat, strFormat, nLen+1);
  strFooter = time.Format(pszFormat);
#else
  strFooter = time.Format(strFormat);
#endif
}

void CPageSetupDlg::FormatHeader | ( | CString & | strHeader,
 |  | CTime & | time,
 |  | LPCTSTR | pszFileName,
 |  | UINT | nPage
 | ) |  |

Definition at line 79 of file pageset.cpp.

{
  CString strFormat = m_strHeader;
  FormatFilePage(strFormat, pszFileName, nPage);
#ifdef _UNICODE
  int nLen = strFormat.GetLength();
  char *pszFormat = (char*)_alloca(nLen+1);
  wcstombs(pszFormat, strFormat, nLen+1);
  strHeader = time.Format(pszFormat);
#else
  strHeader = time.Format(strFormat);
#endif
}

virtual const DWORD* CPageSetupDlg::GetHelpIDs ( ) [inline, virtual]

Implements CCSDialog.

Definition at line 34 of file pageset.h.

{return m_nHelpIDs;}

virtual const DWORD* CPageSetupDlg::GetHelpIDs ( ) [inline, virtual]

Implements CCSDialog.

Definition at line 32 of file pageset.h.

{return m_nHelpIDs;}

void CPageSetupDlg::Initialize ( )

Definition at line 116 of file pageset.cpp.

{
  m_strHeader = AfxGetApp()->GetProfileString(szPageSetup, szHeader,
    _T("File: &f"));
  m_strFooter = AfxGetApp()->GetProfileString(szPageSetup, szFooter,
    _T("Page: &p"));
  m_iHeaderTime = AfxGetApp()->GetProfileInt(szPageSetup, szHeaderTime, 0);
  m_iFooterTime = AfxGetApp()->GetProfileInt(szPageSetup, szFooterTime, 0);
  m_strHeaderOld = m_strHeader;
  m_strFooterOld = m_strFooter;
  m_iHeaderTimeOld = m_iHeaderTime;
  m_iFooterTimeOld = m_iFooterTime;
}

void CPageSetupDlg::Terminate ( )

Definition at line 130 of file pageset.cpp.

{
  if (m_strHeader != m_strHeaderOld)
    AfxGetApp()->WriteProfileString(szPageSetup, szHeader, m_strHeader);
  if (m_strFooter != m_strFooterOld)
    AfxGetApp()->WriteProfileString(szPageSetup, szFooter, m_strFooter);
  if (m_iHeaderTime != m_iHeaderTimeOld)
    AfxGetApp()->WriteProfileInt(szPageSetup, szHeaderTime, m_iHeaderTime);
  if (m_iFooterTime != m_iFooterTimeOld)
    AfxGetApp()->WriteProfileInt(szPageSetup, szFooterTime, m_iFooterTime);
}

Member Data Documentation

int CPageSetupDlg::m_iFooterTime

Definition at line 33 of file pageset.h.

int CPageSetupDlg::m_iFooterTimeOld

Definition at line 39 of file pageset.h.

int CPageSetupDlg::m_iHeaderTime

Definition at line 34 of file pageset.h.

int CPageSetupDlg::m_iHeaderTimeOld

Definition at line 40 of file pageset.h.

int CPageSetupDlg::m_nBottomMargin

Definition at line 27 of file pageset.h.

static const DWORD CPageSetupDlg::m_nHelpIDs [static]
Initial value:
{
  IDC_EDIT_TM, IDH_WORDPAD_TOPMARGIN,
  IDC_EDIT_BM, IDH_WORDPAD_BOTTOMMARGIN,
  IDC_EDIT_LM, IDH_WORDPAD_LEFTMARGIN,
  IDC_EDIT_RM, IDH_WORDPAD_RIGHTMARGIN,
  IDC_BOX, IDH_COMM_GROUPBOX,
  0, 0
}

Definition at line 31 of file pageset.h.

int CPageSetupDlg::m_nLeftMargin

Definition at line 26 of file pageset.h.

int CPageSetupDlg::m_nRightMargin

Definition at line 25 of file pageset.h.

int CPageSetupDlg::m_nTopMargin

Definition at line 24 of file pageset.h.

CString CPageSetupDlg::m_strFooter

Definition at line 31 of file pageset.h.

CString CPageSetupDlg::m_strFooterOld

Definition at line 37 of file pageset.h.

CString CPageSetupDlg::m_strHeader

Definition at line 32 of file pageset.h.

CString CPageSetupDlg::m_strHeaderOld

Definition at line 38 of file pageset.h.

The documentation for this class was generated from the following files:
  • ole/superpad/pageset.h
  • ole/wordpad/pageset.h
  • vc2008fp/WordPad/pageset.h
  • ole/superpad/pageset.cpp
  • ole/wordpad/pageset.cpp
  • vc2008fp/WordPad/pageset.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPalApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CPalApp Class Reference

#include "pal.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 21 of file pal.h.

Member Function Documentation

int CPalApp::ExitInstance ( )

Definition at line 48 of file pal.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CPalApp::InitInstance ( )

Definition at line 32 of file pal.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/pal/pal.h
  • controls/pal/pal.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPalCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPalCtrl Class Reference

#include "palctl.h"

List of all members.

Public Types

enum | { dispidLength = 1L, dispidHandle = 2L, dispidPicture = 3L, dispidEntry = 4L }

Public Member Functions

CPalCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
BOOL | OnMapPropertyToPage (DISPID dispid, LPCLSID lpclsid, BOOL *pbPageOptional)
virtual void | OnResetState ()
virtual void | Serialize (CArchive &ar)

Public Attributes

CPalette * | m_iPalette

Protected Member Functions

~CPalCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CPalCtrl) DECLARE_OLETYPELIB(CPalCtrl) DECLARE_PROPPAGEIDS(CPalCtrl) DECLARE_OLECTLTYPE(CPalCtrl) afx_msg BOOL OnEraseBkgnd(CDC *pDC)
afx_msg OLE_COLOR | GetEntry (short nIndex)
afx_msg short | GetLength ()
afx_msg LPPICTUREDISP | GetPicture ()
afx_msg void | SetEntry (short nIndex, OLE_COLOR newValue)
afx_msg void | SetLength (short nNewValue)
afx_msg void | SetPicture (LPPICTUREDISP newValue)

Detailed Description

Definition at line 21 of file palctl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidLength
dispidHandle
dispidPicture
dispidEntry

Definition at line 81 of file palctl.h.

       {
  //{{AFX_DISP_ID(CPalCtrl)
  dispidLength = 1L,
  dispidHandle = 2L,
  dispidPicture = 3L,
  dispidEntry = 4L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CPalCtrl::CPalCtrl ( )

Definition at line 138 of file palctl.cpp.

{
  InitializeIIDs(&IID_DPal, &IID_DPalEvents);

  m_iPalette = NULL;
}

CPalCtrl::~CPalCtrl ( ) [protected]

Definition at line 149 of file palctl.cpp.

{
  if (m_iPalette) delete m_iPalette;
}

Member Function Documentation

void CPalCtrl::AboutBox ( ) [protected]

Definition at line 297 of file palctl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_PAL);
  dlgAbout.DoModal();
}

CPalCtrl::DECLARE_OLECREATE_EX ( CPalCtrl ) [protected]
void CPalCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 224 of file palctl.cpp.

{
  short nLength;

  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  // Get Length if not loading
  if (!pPX->IsLoading())
    nLength = GetLength();

  // Transfer property value to/from local variable
  PX_Short(pPX, _T("Length"), nLength, 20);

  // Set Length if loading
  if (pPX->IsLoading())
    SetLength(nLength);
}

OLE_COLOR CPalCtrl::GetEntry ( short nIndex ) [protected]

Definition at line 451 of file palctl.cpp.

{
  PALETTEENTRY palentry;
  CPalette *pPalette;
  CPalette tempPalette;

  if (m_iPalette)
    pPalette = m_iPalette;
  else
  {
    // Use stock palette if control palette is NULL
    tempPalette.CreateStockObject(DEFAULT_PALETTE);
    pPalette = &tempPalette;
  }

  // Get palette entry
  if (!pPalette->GetPaletteEntries(nIndex, 1, &palentry))
    ThrowError(CTL_E_INVALIDPROPERTYARRAYINDEX, AFX_IDP_E_INVALIDPROPERTYARRAYINDEX);

  return (OLE_COLOR)RGB(palentry.peRed, palentry.peGreen, palentry.peBlue);
}

short CPalCtrl::GetLength ( ) [protected]

Definition at line 307 of file palctl.cpp.

{
  short nLength;
  CPalette *pPalette;
  CPalette tempPalette;

  if (m_iPalette)
    pPalette = m_iPalette;
  else
  {
    // Use stock palette if control palette is NULL
    tempPalette.CreateStockObject(DEFAULT_PALETTE);
    pPalette = &tempPalette;
  }

  // Get number of entries
  pPalette->GetObject(sizeof(nLength), LPVOID(&nLength));

  return nLength;
}

LPPICTUREDISP CPalCtrl::GetPicture ( ) [protected]

Definition at line 363 of file palctl.cpp.

{
  HDC       hdcScr;
  HBITMAP   hbmp;
  HPALETTE  hpal;
  CPictureHolder picHolder;

  // Create a picture using a 1x1 bitmap and a copy of our current
  // palette

  // Create 1x1 bitmap
  hdcScr = ::GetDC(NULL);
  hbmp = CreateBitmap(1, 1,
        (BYTE)GetDeviceCaps(hdcScr, PLANES),
        (BYTE)GetDeviceCaps(hdcScr, BITSPIXEL),
        NULL);
  ::ReleaseDC(NULL, hdcScr);
  if (!hbmp)
    ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);

  if (m_iPalette)
  {
    // Make a copy of the palette we're using
    hpal = CopyPalette((HPALETTE)m_iPalette->m_hObject);
    if (!hpal)
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
  }
  else
    hpal = NULL;

  // Create picture using bitmap and palette
  picHolder.CreateFromBitmap(hbmp, hpal, TRUE);

  return picHolder.GetPictureDispatch();
}

void CPalCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 158 of file palctl.cpp.

{
  CPalette *oldPalette;
  CPalette *pPalette;
  CPalette tempPalette;
  CBrush *oldBrush;
  CBrush *brush;
  int    i;
  int    height;
  int    stripeWidth;
  short  palNumEntries = 0;

  if (m_iPalette)
    pPalette = m_iPalette;
  else
  {
    // Use stock palette if control palette is NULL
    tempPalette.CreateStockObject(DEFAULT_PALETTE);
    pPalette = &tempPalette;
  }

  // Select and realize palette
  oldPalette = pdc->SelectPalette(pPalette, TRUE);
  pdc->RealizePalette();

  // Get number of palettes entries
  pPalette->GetObject(sizeof(palNumEntries), (LPVOID)&palNumEntries);

  height = rcBounds.Height();

  // Calculate width of stripes
  stripeWidth = rcBounds.Width();
  stripeWidth = stripeWidth / (int)palNumEntries;
  ++stripeWidth;

  pdc->IntersectClipRect(rcBounds);

  // Draw each stripe
  for (i = 0; i < palNumEntries; i++)
  {
    brush = new CBrush;
    // A palette-relative brush is used for drawing.
    if (brush->CreateSolidBrush(PALETTEINDEX(i)) == TRUE)
    {
      // Setup brush
      oldBrush = pdc->SelectObject(brush);
      brush->UnrealizeObject();

      // Draw stripe
      pdc->PatBlt(rcBounds.left + i*stripeWidth, rcBounds.top,
        stripeWidth, height, PATCOPY);
      pdc->SelectObject(oldBrush);
    }
    delete brush;
  }

  // Back to old palette
  pdc->SelectPalette(oldPalette, TRUE);
  pdc->RealizePalette();
}

BOOL CPalCtrl::OnMapPropertyToPage | ( | DISPID | dispid,
 |  | LPCLSID | lpclsid,
 |  | BOOL * | pbPageOptional
 | ) |  |

Definition at line 514 of file palctl.cpp.

{
  switch(dispid)
  {
    case dispidPicture:
      *lpclsid = CLSID_CPicturePropPage;
      return TRUE;
  }
  return COleControl::OnMapPropertyToPage(dispid, lpclsid, pbPageOptional);
}

void CPalCtrl::OnResetState ( ) [virtual]

Definition at line 283 of file palctl.cpp.

{
  if (m_iPalette) delete m_iPalette;
  m_iPalette = NULL;

  COleControl::OnResetState();  // Resets defaults found in DoPropExchange

  SetModifiedFlag(TRUE);
}

void CPalCtrl::Serialize ( CArchive & ar ) [virtual]

Definition at line 247 of file palctl.cpp.

{
  short nLength;
  long lEntry;
  short i;

  COleControl::Serialize(ar);

  nLength = GetLength();

  if (ar.IsLoading())
  {
    // Load each entry
    for (i = 0; i < nLength; i++)
    {
      // Load entry
      ar >> lEntry;
      SetEntry(i, lEntry);
    }
  }
  else
  {
    // Store each entry
    for (i = 0; i < nLength; i++)
    {
      // Store entry
      lEntry = GetEntry(i);
       ar << lEntry;
    }
  }
}

void CPalCtrl::SetEntry | ( | short | nIndex,
 |  | OLE_COLOR | newValue |
 | ) |  |  | [protected]

Definition at line 477 of file palctl.cpp.

{
  COLORREF colorref;
  PALETTEENTRY    palentry;
  HPALETTE hpal;

  if (!m_iPalette)
  {
    // If control palette is NULL, set it to copy of stock palette
    hpal = CopyPalette((HPALETTE)GetStockObject(DEFAULT_PALETTE));
    if (!hpal)
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    else
    {
      m_iPalette = new CPalette();
      m_iPalette->Attach(hpal);
    }
  }

  // Build an entry and set it in the palette
  colorref = TranslateColor(newValue);
  palentry.peRed   = GetRValue(colorref);
  palentry.peGreen = GetGValue(colorref);
  palentry.peBlue  = GetBValue(colorref);
  palentry.peFlags = 0;

  if (!m_iPalette->SetPaletteEntries(nIndex, 1, &palentry))
    ThrowError(CTL_E_INVALIDPROPERTYARRAYINDEX, AFX_IDP_E_INVALIDPROPERTYARRAYINDEX);

  SetModifiedFlag(TRUE);
  InvalidateControl();
}

void CPalCtrl::SetLength ( short nNewValue ) [protected]

Definition at line 333 of file palctl.cpp.

{
  HPALETTE hpal;

  if (!m_iPalette)
  {
    // If control palette is NULL, set it to copy of stock palette
    hpal = CopyPalette((HPALETTE)GetStockObject(DEFAULT_PALETTE));
    if (!hpal)
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    else
    {
      m_iPalette = new CPalette();
      m_iPalette->Attach(hpal);
    }
  }

  // Resize palette
  if (!m_iPalette->ResizePalette(nNewValue))
    ThrowError(PAL_E_CANTRESIZEPALETTE, IDS_EXCEP_CANTRESIZEPALETTE);

  SetModifiedFlag(TRUE);
  InvalidateControl();
}

void CPalCtrl::SetPicture ( LPPICTUREDISP newValue ) [protected]

Definition at line 404 of file palctl.cpp.

{
  COleDispatchDriver driver;
  HPALETTE hpal1, hpal2;

  if (newValue)
  {
    // Obtain hPal property from picture
    driver.AttachDispatch(newValue, FALSE);
    driver.GetProperty(DISPID_PICT_HPAL, VT_HANDLE, (void*)&hpal1);
    if (hpal1)
    {
      // If palette object exists, free its HPAL
      if (m_iPalette)
        m_iPalette->Detach();
      // Else instantiate a new palette object
      else m_iPalette = new CPalette;

      // Copy the palette from the picture
      hpal2 = CopyPalette(hpal1);
      if (!hpal2)
        ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);

      // Attach new HPAL
      m_iPalette->Attach(hpal2);

      SetModifiedFlag(TRUE);
      InvalidateControl();
      return;
    }
  }

  // If new hPal not obtained, delete palette object so stock palette will
  // be used.
  if (m_iPalette)
  {
    delete m_iPalette;
    m_iPalette = NULL;
  }
  SetModifiedFlag(TRUE);
  InvalidateControl();
}

Member Data Documentation

CPalette* CPalCtrl::m_iPalette

Definition at line 91 of file palctl.h.

The documentation for this class was generated from the following files:
  • controls/pal/palctl.h
  • controls/pal/palctl.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPaletteBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

CPaletteBar Class Reference

#include "toolbar2.h"

List of all members.

Public Member Functions

CPaletteBar ()
CPaletteBar ()
CPaletteBar ()
virtual | ~CPaletteBar ()
virtual | ~CPaletteBar ()
virtual | ~CPaletteBar ()
virtual BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
UINT GetColumns ()
UINT GetColumns ()
virtual BOOL | OnChildNotify (UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
void | SetColumns (UINT nColumns)
void | SetColumns (UINT nColumns)

Protected Member Functions

BOOL | BeginAdjust (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | BeginDrag (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | CustomizeHelp (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | EndAdjust (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | EndDrag (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | GetButtonInfo (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
CString | NeedText (UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult)
afx_msg void | OnNeedTextA (UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult)
afx_msg void | OnNeedTextW (UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult)
BOOL | QueryDelete (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | QueryInsert (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | Reset (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | ToolBarChange (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)

Protected Attributes

UINT m_nColumns

Private Attributes

int | m_nButtonCount
TBBUTTON * | m_pTBButtons

Detailed Description

Definition at line 18 of file toolbar2.h.

Constructor & Destructor Documentation

CPaletteBar::CPaletteBar ( )

Definition at line 27 of file toolbar2.cpp.

                         : m_pTBButtons(NULL)
{

}

CPaletteBar::~CPaletteBar ( ) [virtual]

Definition at line 32 of file toolbar2.cpp.

{
  delete []m_pTBButtons;
}

CPaletteBar::CPaletteBar ( )
virtual CPaletteBar::~CPaletteBar ( ) [virtual]
CPaletteBar::CPaletteBar ( )
virtual CPaletteBar::~CPaletteBar ( ) [virtual]

Member Function Documentation

BOOL CPaletteBar::BeginAdjust | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 141 of file toolbar2.cpp.

{
  TRACE(_T("TBN_BEGINADJUST\n"));

  // the customize dialog box is about to be displayed

  // save toolbar state before customization using the dialog
  // Use this information to restore the state if reset button is pressed
  SaveState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Palette Tool Bar"));

  return TRUE;
}

BOOL CPaletteBar::BeginDrag | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 154 of file toolbar2.cpp.

{
  TRACE(_T("TBN_BEGINDRAG\n"));

  // we are not implementing custon drag and drop
  * pLResult = FALSE;
  return FALSE;
}

BOOL CPaletteBar::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID |
 | ) |  |  | [virtual]

Definition at line 45 of file toolbar2.cpp.

{
  BOOL bRet = CToolBarCtrl::Create(dwStyle, rect, pParentWnd, nID);

  m_nButtonCount = ID_ELLIPSE - ID_ERASE + 1;

  VERIFY(AddBitmap(m_nButtonCount,IDR_PALETTEBAR) != -1);

  m_pTBButtons = new TBBUTTON[m_nButtonCount];

  int nIndex;
  for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
  {
    CString string;
    string.LoadString(nIndex + ID_ERASE);

    // Add second '\0'
    int nStringLength = string.GetLength() + 1;
    TCHAR* pString = string.GetBufferSetLength(nStringLength);
    pString[nStringLength] = 0;

    VERIFY((m_pTBButtons[nIndex].iString = AddStrings(pString)) != -1);

    string.ReleaseBuffer();

    m_pTBButtons[nIndex].fsState = TBSTATE_ENABLED;
    m_pTBButtons[nIndex].fsStyle = TBSTYLE_CHECKGROUP;
    m_pTBButtons[nIndex].dwData = 0;
    m_pTBButtons[nIndex].iBitmap = nIndex;
    m_pTBButtons[nIndex].idCommand = nIndex + ID_ERASE;

  }

  for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
  {
    VERIFY(AddButtons(1,&m_pTBButtons[nIndex]));
  }

  return bRet;
}

BOOL CPaletteBar::CustomizeHelp | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 163 of file toolbar2.cpp.

{
  TRACE(_T("TBN_CUSTHELP\n"));

  // Sample displays a message box but a valid help topic
  // can be displayed for the customize dialog for this toolbar
  AfxMessageBox(_T("Help not implemented!"));

  return TRUE;
}

BOOL CPaletteBar::EndAdjust | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 174 of file toolbar2.cpp.

{
  TRACE(_T("TBN_ENDADJUST\n"));

  // the customize dialog box has been closed

  return TRUE;
}

BOOL CPaletteBar::EndDrag | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 183 of file toolbar2.cpp.

{
  TRACE(_T("TBN_ENDDRAG\n"));

  // Code to handle custom drag and drop. This message indicates that
  // the item is being dropped
  * pLResult = FALSE;
  return TRUE;
}

BOOL CPaletteBar::GetButtonInfo | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 193 of file toolbar2.cpp.

{
  // This notification message has to be handled correctly if
  // all operations in the custom dialogbox has to function correctly
  // We have to supply information for the button specified by pTBN->tbButton
  //
  // This notification is sent in the following cases
  //
  // After TBN_BEGINADJUST the control sends these notifications until
  // * pLResult is TRUE. We have to supply valid values when this value is
  // set to TRUE. Here the control is collecting information for all
  // the buttons that have to be displayed in the dialog box
  //
  // The control sends this notification to get information about
  // a button if the user is trying to add it to the toolbar or
  // rearranging the buttons on the toolbar from within the dialog

  TRACE(_T("TBN_GETBUTTONINFO\n"));

  TBNOTIFY *pTBN = (TBNOTIFY *) lParam;

  if (pTBN->iItem >= m_nButtonCount || pTBN->iItem < 0)
  {
    * pLResult = FALSE;
  }
  else
  {
    CString buffer;
    buffer.LoadString(pTBN->iItem + ID_ERASE);

    // set the string for the button
    // truncate the string if its length is greater than the buffer
    // supplied by the toolbar
    _tcsncpy_s(pTBN->pszText, pTBN->cchText, buffer, _TRUNCATE);
    pTBN->pszText[pTBN->cchText - 1] = '\0';

    // set the button info
    pTBN->tbButton = m_pTBButtons[pTBN->iItem];

    // valid values are structure
    *pLResult = TRUE;
  }

  return TRUE;
}

UINT CPaletteBar::GetColumns ( ) [inline]

Definition at line 18 of file palette.h.

{ return m_nColumns; };

UINT CPaletteBar::GetColumns ( ) [inline]

Definition at line 18 of file palette.h.

{ return m_nColumns; };

CString CPaletteBar::NeedText | ( | UINT | nID,
 |  | NMHDR * | pNotifyStruct,
 |  | LRESULT * | lResult |
 | ) |  |  | [protected]

Definition at line 282 of file toolbar2.cpp.

{
  LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct ;
  ASSERT(nID == lpTTT->hdr.idFrom);

  CString toolTipText;
  toolTipText.LoadString(nID);

  // szText length is 80
  int nLength = (toolTipText.GetLength() > 79) ? 79 : toolTipText.GetLength();

  toolTipText = toolTipText.Left(nLength);

  return toolTipText;
}

BOOL CPaletteBar::OnChildNotify | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [virtual]

Definition at line 99 of file toolbar2.cpp.

{
  if (message == WM_NOTIFY)
  {
    NMHDR *pNMHDR = (NMHDR *) lParam;
    switch (pNMHDR->code)
    {
    case TBN_BEGINADJUST :
      return BeginAdjust(wParam,  lParam,  pLResult);

    case TBN_BEGINDRAG:
      return BeginDrag(wParam,  lParam,  pLResult);

    case TBN_CUSTHELP:
      return CustomizeHelp(wParam,  lParam,  pLResult);

    case TBN_ENDADJUST:
      return EndAdjust(wParam,  lParam,  pLResult);

    case TBN_ENDDRAG:
      return EndDrag(wParam,  lParam,  pLResult);

    case TBN_GETBUTTONINFO:
      return GetButtonInfo(wParam,  lParam,  pLResult);

    case TBN_QUERYDELETE:
      return QueryDelete(wParam,  lParam,  pLResult);

    case TBN_QUERYINSERT:
      return QueryInsert(wParam,  lParam,  pLResult);

    case TBN_RESET:
      return Reset(wParam, lParam,  pLResult);

    case TBN_TOOLBARCHANGE:
      return ToolBarChange(wParam, lParam, pLResult);
    }
  }

  return CToolBarCtrl::OnChildNotify(message, wParam, lParam, pLResult);
}

void CPaletteBar::OnNeedTextA | ( | UINT | nID,
 |  | NMHDR * | pNotifyStruct,
 |  | LRESULT * | lResult |
 | ) |  |  | [protected]

Definition at line 315 of file toolbar2.cpp.

{
  if (pNotifyStruct->idFrom >= ID_ERASE && pNotifyStruct->idFrom <= ID_ELLIPSE)
  {
    CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
    LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct;
    _tcscpy_s(lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText);
  }
}

void CPaletteBar::OnNeedTextW | ( | UINT | nID,
 |  | NMHDR * | pNotifyStruct,
 |  | LRESULT * | lResult |
 | ) |  |  | [protected]

Definition at line 299 of file toolbar2.cpp.

{
  size_t numchars;

  if (pNotifyStruct->idFrom >= ID_ERASE && pNotifyStruct->idFrom <= ID_ELLIPSE)
  {
    CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
    LPTOOLTIPTEXTW lpTTT = (LPTOOLTIPTEXTW)pNotifyStruct;
#ifdef _UNICODE
    _tcsncpy_s(lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText, toolTipText.GetLength());
#else
    mbstowcs_s(&numchars, lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText, toolTipText.GetLength());
#endif
  }
}

BOOL CPaletteBar::QueryDelete | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 239 of file toolbar2.cpp.

{
  TRACE(_T("TBN_QUERYDELETE\n"));

  // in this sample any button can be deleted
  // if a particular button cannot be deleted set *pResult to FALSE for that item
  *pLResult = TRUE;
  return TRUE;
}

BOOL CPaletteBar::QueryInsert | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 249 of file toolbar2.cpp.

{
  TRACE(_T("TBN_QUERYINSERT\n"));

  // in this sample buttons can be inserted at any location on the
  // toolbar
  *pLResult = TRUE;
  return TRUE;
}

BOOL CPaletteBar::Reset | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 259 of file toolbar2.cpp.

{
  TRACE(_T("TBN_RESET\n"));

  // User has pressed the reset button
  // restore the state of the toolbar to the state it was before customization
  RestoreState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Palette Tool Bar"));

  *pLResult = TRUE;
  return TRUE;
}

void CPaletteBar::SetColumns ( UINT nColumns )

Definition at line 65 of file palette.cpp.

{
  m_nColumns = nColumns;
  int nCount = GetToolBarCtrl().GetButtonCount();

  for (int i = 0; i < nCount; i++)
  {
    UINT nStyle = GetButtonStyle(i);
    BOOL bWrap = (((i + 1) % nColumns) == 0);
    if (bWrap)
      nStyle |= TBBS_WRAPPED;
    else
      nStyle &= ~TBBS_WRAPPED;
    SetButtonStyle(i, nStyle);
  }

  Invalidate();
  GetParentFrame()->RecalcLayout();
}

void CPaletteBar::SetColumns ( UINT nColumns )
BOOL CPaletteBar::ToolBarChange | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 271 of file toolbar2.cpp.

{
  TRACE(_T("TBN_TOOLBARCHANGE\n"));

  // the toolbar has changed
  return TRUE;
}

Member Data Documentation

int CPaletteBar::m_nButtonCount [private]

Definition at line 21 of file toolbar2.h.

UINT CPaletteBar::m_nColumns [protected]

Definition at line 35 of file palette.h.

TBBUTTON* CPaletteBar::m_pTBButtons [private]

Definition at line 22 of file toolbar2.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/toolbar2.h
  • general/ctrlbars/palette.h
  • general/docktool/palette.h
  • general/CmnCtrl1/toolbar2.cpp
  • general/ctrlbars/palette.cpp
  • general/docktool/palette.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPaletteDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CPaletteDemoApp Class Reference

#include "PaletteDemo.h"

List of all members.

Public Member Functions

CPaletteDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 24 of file PaletteDemo.h.

Constructor & Destructor Documentation

CPaletteDemoApp::CPaletteDemoApp ( )

Definition at line 39 of file PaletteDemo.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CPaletteDemoApp::ExitInstance ( ) [virtual]

Definition at line 157 of file PaletteDemo.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CPaletteDemoApp::InitInstance ( ) [virtual]

Definition at line 53 of file PaletteDemo.cpp.

{
  AfxEnableControlContainer();

  AfxOleInit ();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  // 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(CPaletteDemoDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CPaletteDemoView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CPaletteDemoApp::OnAppAbout ( )

Definition at line 148 of file PaletteDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • vc2008fp/PaletteDemo/PaletteDemo.h
  • vc2008fp/PaletteDemo/PaletteDemo.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPaletteDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CPaletteDemoDoc Class Reference

#include "PaletteDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CPaletteDemoDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Public Attributes

UINT m_uiCurrTool

Protected Member Functions

CPaletteDemoDoc ()
afx_msg void | OnPaletteTool (UINT uiCmd)
afx_msg void | OnUpdatePaletteTool (CCmdUI *pCmdUI)

Detailed Description

Definition at line 13 of file PaletteDemoDoc.h.

Constructor & Destructor Documentation

CPaletteDemoDoc::CPaletteDemoDoc ( ) [protected]

Definition at line 35 of file PaletteDemoDoc.cpp.

{
  m_uiCurrTool = ID_PAL_CURSOR;
}

CPaletteDemoDoc::~CPaletteDemoDoc ( ) [virtual]

Definition at line 40 of file PaletteDemoDoc.cpp.

{
}

Member Function Documentation

BOOL CPaletteDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 44 of file PaletteDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CPaletteDemoDoc::OnPaletteTool ( UINT uiCmd ) [protected]

Definition at line 90 of file PaletteDemoDoc.cpp.

{
  m_uiCurrTool = uiCmd;
}

void CPaletteDemoDoc::OnUpdatePaletteTool ( CCmdUI * pCmdUI ) [protected]

Definition at line 95 of file PaletteDemoDoc.cpp.

{
  pCmdUI->SetCheck (m_uiCurrTool == pCmdUI->m_nID);
}

void CPaletteDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 60 of file PaletteDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

Member Data Documentation

UINT CPaletteDemoDoc::m_uiCurrTool

Definition at line 21 of file PaletteDemoDoc.h.

The documentation for this class was generated from the following files:
  • vc2008fp/PaletteDemo/PaletteDemoDoc.h
  • vc2008fp/PaletteDemo/PaletteDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPaletteDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CPaletteDemoView Class Reference

#include "PaletteDemoView.h"

List of all members.

Public Member Functions

virtual | ~CPaletteDemoView ()
CPaletteDemoDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CPaletteDemoView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file PaletteDemoView.h.

Constructor & Destructor Documentation

CPaletteDemoView::CPaletteDemoView ( ) [protected]

Definition at line 43 of file PaletteDemoView.cpp.

{
  // TODO: add construction code here

}

CPaletteDemoView::~CPaletteDemoView ( ) [virtual]

Definition at line 49 of file PaletteDemoView.cpp.

{
}

Member Function Documentation

CPaletteDemoDoc * CPaletteDemoView::GetDocument ( ) [inline]

Definition at line 50 of file PaletteDemoView.h.

   { return (CPaletteDemoDoc*)m_pDocument; }

void CPaletteDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 119 of file PaletteDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

void CPaletteDemoView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 64 of file PaletteDemoView.cpp.

{
//  CPaletteDemoDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);
}

void CPaletteDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 124 of file PaletteDemoView.cpp.

{
  // TODO: add cleanup after printing
}

void CPaletteDemoView::OnFilePrintPreview ( ) [protected]

Definition at line 108 of file PaletteDemoView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CPaletteDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 113 of file PaletteDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CPaletteDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 53 of file PaletteDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/PaletteDemo/PaletteDemoView.h
  • vc2008fp/PaletteDemo/PaletteDemoView.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPalPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPalPropPage Class Reference

#include "palppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_PAL }

Public Member Functions

CPalPropPage ()

Public Attributes

int | m_Length

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file palppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file palppg.h.

{ IDD = IDD_PROPPAGE_PAL };

Constructor & Destructor Documentation

CPalPropPage::CPalPropPage ( )

Definition at line 59 of file palppg.cpp.

                           :
  COlePropertyPage(IDD, IDS_PAL_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CPalPropPage)
  m_Length = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CPalPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 71 of file palppg.cpp.

{
  //{{AFX_DATA_MAP(CPalPropPage)
  DDP_Text(pDX, IDC_LENGTHEDIT, m_Length, _T("Length"));
  DDX_Text(pDX, IDC_LENGTHEDIT, m_Length);
  DDV_MinMaxInt(pDX, m_Length, 1, 255);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

int CPalPropPage::m_Length

Definition at line 28 of file palppg.h.

The documentation for this class was generated from the following files:
  • controls/pal/palppg.h
  • controls/pal/palppg.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CParaFormat Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CParaFormat Struct Reference

#include "stdafx.h"

List of all members.

Public Member Functions

CParaFormat ()
CParaFormat ()
BOOL | operator== (WPD_PARAFORMAT &pf)
BOOL | operator== (PARAFORMAT2 &pf)

Detailed Description

Definition at line 44 of file stdafx.h.

Constructor & Destructor Documentation

CParaFormat::CParaFormat ( ) [inline]

Definition at line 46 of file stdafx.h.

{cbSize = sizeof(_paraformat);}

CParaFormat::CParaFormat ( ) [inline]

Definition at line 51 of file stdafx.h.

{cbSize = sizeof(WPD_PARAFORMAT);}

Member Function Documentation

BOOL CParaFormat::operator== ( PARAFORMAT2 & pf )

Definition at line 48 of file wordpvw.cpp.

{
  if(
    dwMask != pf.dwMask
    || wNumbering != pf.wNumbering
    || wEffects != pf.wEffects
    || dxStartIndent != pf.dxStartIndent
    || dxRightIndent != pf.dxRightIndent
    || dxOffset != pf.dxOffset
    || cTabCount != pf.cTabCount
    || dySpaceBefore != pf.dySpaceBefore
    || dySpaceAfter != pf.dySpaceAfter
    || dyLineSpacing != pf.dyLineSpacing
    || sStyle != pf.sStyle
    || bLineSpacingRule != pf.bLineSpacingRule
    || bOutlineLevel != pf.bOutlineLevel
    || wShadingWeight != pf.wShadingWeight
    || wShadingStyle != pf.wShadingStyle
    || wNumberingStart != pf.wNumberingStart
    || wNumberingStyle != pf.wNumberingStyle
    || wNumberingTab != pf.wNumberingTab
    || wBorderSpace != pf.wBorderSpace
    || wBorderWidth != pf.wBorderWidth
    || wBorders != pf.wBorders
    )
  {
    return FALSE;
  }
  for (int i=0;i<pf.cTabCount;i++)
  {
    if (rgxTabs[i] != pf.rgxTabs[i])
      return FALSE;
  }
  return TRUE;
}

BOOL CParaFormat::operator== ( WPD_PARAFORMAT & pf )

Definition at line 49 of file wordpvw.cpp.

{
  if(
    dwMask != pf.dwMask
    || wNumbering != pf.wNumbering
#if _MSC_VER < 1500
    || wReserved != pf.wReserved
#endif
    || dxStartIndent != pf.dxStartIndent
    || dxRightIndent != pf.dxRightIndent
    || dxOffset != pf.dxOffset
    || cTabCount != pf.cTabCount
    )
  {
    return FALSE;
  }
  for (int i=0;i<pf.cTabCount;i++)
  {
    if (rgxTabs[i] != pf.rgxTabs[i])
      return FALSE;
  }
  return TRUE;
}

The documentation for this struct was generated from the following files:
  • ole/wordpad/stdafx.h
  • vc2008fp/WordPad/stdafx.h
  • ole/wordpad/wordpvw.cpp
  • vc2008fp/WordPad/wordpvw.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CParsedEdit Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

CParsedEdit Class Reference

#include "paredit.h"

Inherited by CParsedEditExported.

List of all members.

Public Member Functions

CParsedEdit ()
BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
virtual void | OnBadInput ()
BOOL | SubclassEdit (UINT nID, CWnd *pParent, WORD wParseStyle)

Static Public Member Functions

static BOOL | RegisterControlClass ()

Protected Member Functions

afx_msg void | OnChar (UINT, UINT, UINT)
afx_msg void | OnVScroll (UINT, UINT, CScrollBar *)

Protected Attributes

WORD | m_wParseStyle

Detailed Description

Definition at line 18 of file paredit.h.

Constructor & Destructor Documentation

CParsedEdit::CParsedEdit ( )

Definition at line 20 of file paredit.cpp.

{
  m_wParseStyle = 0;
}

Member Function Documentation

BOOL CParsedEdit::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) |  |
void CParsedEdit::OnBadInput ( ) [virtual]

Definition at line 120 of file paredit.cpp.

{
  if (GetParent()->SendMessage(WM_COMMAND,
    MAKELONG(GetDlgCtrlID(), PEN_ILLEGALCHAR), (LPARAM)m_hWnd) != -1)
  {
    MessageBeep((UINT)-1);
  }
}

void CParsedEdit::OnChar | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 56 of file paredit.cpp.

{
  WORD type;

  if (nChar < 0x20)
    type = PES_ALL;                         // always allow control chars
  else if (IsCharAlphaNumeric((TCHAR)nChar) && !IsCharAlpha((TCHAR)nChar))
    type = PES_NUMBERS;
  else if (IsCharAlpha((TCHAR)nChar))
    type = PES_LETTERS;
  else
    type = PES_OTHERCHARS;

  if (m_wParseStyle & type)
  {
    CEdit::OnChar(nChar, nRepCnt, nFlags);  // permitted
  }
  else
  {
    // illegal character - inform parent
    OnBadInput();
  }
}

void CParsedEdit::OnVScroll | ( | UINT | nSBCode,
 |  | UINT | ,
 |  | CScrollBar * |  |
 | ) |  |  | [protected]

Definition at line 83 of file paredit.cpp.

{
  int nDelta = 0;
  if (nSBCode == SB_LINEDOWN)
    nDelta = -1;
  else if (nSBCode == SB_LINEUP)
    nDelta = +1;
  else
    return; // nothing special

  // set the focus to this edit item and select it all
  SetFocus();

  //Get the number in the control.
  BOOL bOk;
  int nOld = GetParent()->GetDlgItemInt(GetDlgCtrlID(), &bOk);
  if (bOk)
  {
    // The MuScrl32 control also supports range checking
    // for this example, we just prevent overflow
    int nNew = nOld + nDelta;
    if (nNew >= 0 && nNew <= 32767)
      GetParent()->SetDlgItemInt(GetDlgCtrlID(), nNew);
    else
      bOk = FALSE;
  }

  if (!bOk)
    OnBadInput();
  SetSel(0, -1);
}

BOOL CParsedEdit::RegisterControlClass ( ) [static]

Reimplemented in CParsedEditExported.

Definition at line 100 of file paredit2.cpp.

{
  WNDCLASS wcls;

  // check to see if class already registered
  static const TCHAR szClass[] = _T("paredit");
  if (::GetClassInfo(AfxGetInstanceHandle(), szClass, &wcls))
  {
    // name already registered - ok if it was us
    return (wcls.lpfnWndProc == (WNDPROC)CParsedEditExported::WndProcHook);
  }

  // Use standard "edit" control as a template.
  VERIFY(::GetClassInfo(NULL, _T("edit"), &wcls));
  CParsedEditExported::lpfnSuperEdit = wcls.lpfnWndProc;

  // set new values
  wcls.lpfnWndProc = CParsedEditExported::WndProcHook;
  wcls.hInstance = AfxGetInstanceHandle();
  wcls.lpszClassName = szClass;
  return (RegisterClass(&wcls) != 0);
}

BOOL CParsedEdit::SubclassEdit | ( | UINT | nID,
 |  | CWnd * | pParent,
 |  | WORD | wParseStyle
 | ) |  |

Definition at line 47 of file paredit.cpp.

{
  m_wParseStyle = wParseStyle;
  return SubclassDlgItem(nID, pParent);
}

Member Data Documentation

WORD CParsedEdit::m_wParseStyle [protected]

Definition at line 24 of file paredit.h.

The documentation for this class was generated from the following files:
  • general/ctrltest/paredit.h
  • general/ctrltest/paredit.cpp
  • general/ctrltest/paredit2.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CParsedEditExported Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | Friends

CParsedEditExported Class Reference

Inherits CParsedEdit.

List of all members.

Public Member Functions

CParsedEditExported ()
BOOL | RegisterControlClass ()

Protected Member Functions

DECLARE_MESSAGE_MAP ()
afx_msg int | OnNcCreate (LPCREATESTRUCT lpCreateStruct)
virtual void | PostNcDestroy ()

Static Protected Member Functions

static LRESULT CALLBACK EXPORT | WndProcHook (HWND, UINT, WPARAM, LPARAM)

Static Protected Attributes

static WNDPROC | lpfnSuperEdit = NULL

Friends

class | CParsedEdit

Detailed Description

Definition at line 27 of file paredit2.cpp.

Constructor & Destructor Documentation

CParsedEditExported::CParsedEditExported ( ) [inline]

Definition at line 30 of file paredit2.cpp.

{ };

Member Function Documentation

CParsedEditExported::DECLARE_MESSAGE_MAP ( ) [protected]
int CParsedEditExported::OnNcCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 76 of file paredit2.cpp.

{
  // special create hook
  // example of stripping the sub-style bits from the style specified
  //   in the dialog template to use for some other reason
  m_wParseStyle = LOWORD(lpCreateStruct->style);
  DWORD dwEditStyle = MAKELONG(ES_LEFT, HIWORD(lpCreateStruct->style));

  ::SetWindowLong(m_hWnd, GWL_STYLE, dwEditStyle);
  lpCreateStruct->style = dwEditStyle;
  return CParsedEdit::OnNcCreate(lpCreateStruct);
}

void CParsedEditExported::PostNcDestroy ( ) [protected, virtual]

Definition at line 89 of file paredit2.cpp.

{
  // needed to clean up the C++ CWnd object
  delete this;
}

BOOL CParsedEditExported::RegisterControlClass ( )

Reimplemented from CParsedEdit.

LRESULT CALLBACK EXPORT CParsedEditExported::WndProcHook | ( | HWND | hWnd,
 |  | UINT | msg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [static, protected]

Definition at line 52 of file paredit2.cpp.

{
  // create new item and attach it
  #pragma warning(push)
  #pragma warning(disable:6014) //disable PREFast warning about leaked memory
  CParsedEditExported* pEdit = new CParsedEditExported();
  #pragma warning(pop)

  pEdit->Attach(hWnd);

  // set up wndproc to AFX one, and call it
  pEdit->m_pfnSuper = CParsedEditExported::lpfnSuperEdit;
  ::SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)AfxWndProc);

  // then call it for this first message
  return ::CallWindowProc(AfxWndProc, hWnd, msg, wParam, lParam);
}

Friends And Related Function Documentation

friend class CParsedEdit [friend]

Definition at line 40 of file paredit2.cpp.

Member Data Documentation

WNDPROC CParsedEditExported::lpfnSuperEdit = NULL [static, protected]

Definition at line 38 of file paredit2.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/paredit2.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPasswordProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CPasswordProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CPasswordProp (const CString &strName, const CString &strPassword, LPCTSTR lpszDescr=NULL, DWORD dwData=0)

Protected Member Functions

virtual CWnd * | CreateInPlaceEdit (CRect rectEdit, BOOL &bDefaultFormat)
virtual CString | FormatProperty ()

Detailed Description

Definition at line 33 of file CustomProperties.h.

Constructor & Destructor Documentation

CPasswordProp::CPasswordProp | ( | const CString & | strName,
 |  | const CString & | strPassword,
 |  | LPCTSTR | lpszDescr = NULL,
 |  | DWORD | dwData = 0
 | ) |  |

Definition at line 88 of file CustomProperties.cpp.

: CMFCPropertyGridProperty(strName, (LPCTSTR) strPassword, lpszDescr, dwData)
{
}

Member Function Documentation

CWnd * CPasswordProp::CreateInPlaceEdit | ( | CRect | rectEdit,
 |  | BOOL & | bDefaultFormat |
 | ) |  |  | [protected, virtual]

Definition at line 93 of file CustomProperties.cpp.

{
  CEdit* pWndEdit = new CEdit;

  DWORD dwStyle = WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL | ES_PASSWORD;

  if (!m_bEnabled || !m_bAllowEdit)
  {
    dwStyle |= ES_READONLY;
  }

  pWndEdit->Create(dwStyle, rectEdit, m_pWndList, AFX_PROPLIST_ID_INPLACE);
  pWndEdit->SetPasswordChar(cPassword);

  bDefaultFormat = TRUE;
  return pWndEdit;
}

CString CPasswordProp::FormatProperty ( ) [protected, virtual]

Definition at line 111 of file CustomProperties.cpp.

{
  CString strVal = (LPCTSTR)(_bstr_t)m_varValue;

  for (int i = 0; i < strVal.GetLength(); i++)
  {
    strVal.SetAt(i, cPassword);
  }

  return strVal;
}

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPenWidthsDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPenWidthsDlg Class Reference

#include "PenDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_PEN_WIDTHS }

Public Member Functions

CPenWidthsDlg (CWnd *pParent=NULL)

Public Attributes

int | m_nThickWidth
int | m_nThinWidth

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDefaultPenWidths ()

Detailed Description

Definition at line 15 of file PenDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file PenDlg.h.

{ IDD = IDD_PEN_WIDTHS };

Constructor & Destructor Documentation

CPenWidthsDlg::CPenWidthsDlg ( CWnd * pParent = NULL )

Definition at line 25 of file pendlg.cpp.

  : CDialog(CPenWidthsDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CPenWidthsDlg)
  m_nThinWidth = 0;
  m_nThickWidth = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CPenWidthsDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 35 of file pendlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CPenWidthsDlg)
  DDX_Text(pDX, IDC_THIN_PEN_WIDTH, m_nThinWidth);
  DDV_MinMaxInt(pDX, m_nThinWidth, 1, 20);
  DDX_Text(pDX, IDC_THICK_PEN_WIDTH, m_nThickWidth);
  DDV_MinMaxInt(pDX, m_nThickWidth, 1, 20);
  //}}AFX_DATA_MAP
}

void CPenWidthsDlg::OnDefaultPenWidths ( ) [protected]

Definition at line 56 of file pendlg.cpp.

{
  m_nThinWidth = 2;
  m_nThickWidth = 5;
  UpdateData(FALSE);  // causes DoDataExchange()
    // bSave=FALSE means don't save from screen,
    // rather, write to screen
}

Member Data Documentation

int CPenWidthsDlg::m_nThickWidth

Definition at line 25 of file PenDlg.h.

int CPenWidthsDlg::m_nThinWidth

Definition at line 24 of file PenDlg.h.

The documentation for this class was generated from the following files:
  • general/Scribble/PenDlg.h
  • general/Scribble/pendlg.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPointArrayView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPointArrayView Class Reference

#include "ptarryvw.h"

List of all members.

Public Types

enum | { IDD = IDD_POINT_ARRAY }

Public Member Functions

CPointArrayView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
int | m_x
int | m_y

Protected Member Functions

virtual | ~CPointArrayView ()
void | AddPointToListBox (CPoint pt, int nSel=-1)
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAdd ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
afx_msg void | OnUpdateButton ()

Detailed Description

Definition at line 19 of file ptarryvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 36 of file ptarryvw.h.

{ IDD = IDD_POINT_ARRAY };

Constructor & Destructor Documentation

CPointArrayView::CPointArrayView ( )

Definition at line 28 of file ptarryvw.cpp.

  : CFormView(CPointArrayView::IDD)
{
  //{{AFX_DATA_INIT(CPointArrayView)
  m_x = 0;
  m_y = 0;
  //}}AFX_DATA_INIT
}

CPointArrayView::~CPointArrayView ( ) [protected, virtual]

Definition at line 37 of file ptarryvw.cpp.

{
}

Member Function Documentation

void CPointArrayView::AddPointToListBox | ( | CPoint | pt,
 |  | int | nSel = -1 |
 | ) |  |  | [protected]

Definition at line 104 of file ptarryvw.cpp.

{
  // Add new point to the listbox.
  CString str;
  str.Format(_T("(%i,%i)"), pt.x, pt.y);
  if (nSel == -1)
    nSel = m_ctlList.AddString(str);
  else
    m_ctlList.InsertString(nSel, str);
}

void CPointArrayView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 57 of file ptarryvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CPointArrayView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_X, m_x);
  DDX_Text(pDX, IDC_Y, m_y);
  //}}AFX_DATA_MAP
}

CCollectDoc * CPointArrayView::GetDocument ( ) [inline]

Definition at line 73 of file ptarryvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CPointArrayView::OnAdd ( ) [protected]

Definition at line 119 of file ptarryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add new point to the CList<int,int>
  CPoint pt(m_x, m_y);
  GetDocument()->m_ptArray.Add(pt);

  AddPointToListBox(pt);
}

void CPointArrayView::OnInitialUpdate ( )

Definition at line 41 of file ptarryvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the points from the document's CArray of CPoints
  // to the listbox.
  m_ctlList.ResetContent();
  CArray<CPoint,CPoint>&ptArray = GetDocument()->m_ptArray;
  for (int nIndex = 0; nIndex < ptArray.GetSize(); nIndex++)
  {
    CPoint pt = ptArray[nIndex];
    AddPointToListBox(pt);
  }
}

void CPointArrayView::OnRemove ( ) [protected]

Definition at line 153 of file ptarryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_POINT_TO_BE_REMOVED);
    return;
  }

  // Remove the point from the CArray of CPoints..
  GetDocument()->m_ptArray.RemoveAt(nSel);

  // Remove the point from the listbox.
  m_ctlList.DeleteString(nSel);
}

void CPointArrayView::OnRemoveAll ( ) [protected]

Definition at line 172 of file ptarryvw.cpp.

{
  // Remove all of the points from the CArray of CPoints.
  GetDocument()->m_ptArray.RemoveAll();

  // Remove all of the points from the listbox.
  m_ctlList.ResetContent();
}

void CPointArrayView::OnSelChangeList ( ) [protected]

Definition at line 181 of file ptarryvw.cpp.

{
  // Update the edit control to reflect the new selection
  // in the listbox.
  CPoint pt = GetDocument()->m_ptArray[m_ctlList.GetCurSel()];
  m_x = pt.x;
  m_y = pt.y;
  UpdateData(FALSE);
}

void CPointArrayView::OnUpdateButton ( ) [protected]

Definition at line 131 of file ptarryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_POINT_TO_BE_UPDATED);
    return;
  }

  // Replace the point in the CArray of CPoints.
  CPoint pt(m_x, m_y);
  GetDocument()->m_ptArray[nSel] = pt;

  // Update the old point in the listbox by removing
  // the old entry and adding a new entry.
  m_ctlList.DeleteString(nSel);
  AddPointToListBox(pt, nSel);
}

Member Data Documentation

CListBox CPointArrayView::m_ctlList

Definition at line 37 of file ptarryvw.h.

int CPointArrayView::m_x

Definition at line 38 of file ptarryvw.h.

int CPointArrayView::m_y

Definition at line 39 of file ptarryvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/ptarryvw.h
  • advanced/collect/ptarryvw.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPolyTool Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CPolyTool Class Reference

#include "drawtool.h"

Inherits CDrawTool, and CDrawTool.

List of all members.

Public Member Functions

CPolyTool ()
CPolyTool ()
virtual void | OnCancel ()
virtual void | OnCancel ()
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)

Private Attributes

CDrawPoly * m_pDrawObj

Detailed Description

Definition at line 82 of file drawtool.h.

Constructor & Destructor Documentation

CPolyTool::CPolyTool ( )

Definition at line 367 of file drawtool.cpp.

  : CDrawTool(poly)
{
  m_pDrawObj = NULL;
}

CPolyTool::CPolyTool ( )

Member Function Documentation

void CPolyTool::OnCancel ( ) [virtual]

Reimplemented from CDrawTool.

Definition at line 459 of file drawtool.cpp.

{
  CDrawTool::OnCancel();

  m_pDrawObj = NULL;
}

virtual void CPolyTool::OnCancel ( ) [virtual]

Reimplemented from CDrawTool.

void CPolyTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 439 of file drawtool.cpp.

{
  ReleaseCapture();

  int nPoints = m_pDrawObj->m_nPoints;
  if (nPoints > 2 &&
    (m_pDrawObj->m_points[nPoints - 1] == m_pDrawObj->m_points[nPoints - 2] ||
    m_pDrawObj->m_points[nPoints - 1].x - 1 == m_pDrawObj->m_points[nPoints - 2].x &&
    m_pDrawObj->m_points[nPoints - 1].y == m_pDrawObj->m_points[nPoints - 2].y))

  {
    // Remove the last point if it's the same as the next to last...
    m_pDrawObj->m_nPoints -= 1;
    pView->InvalObj(m_pDrawObj);
  }

  m_pDrawObj = NULL;
  c_drawShape = selection;
}

virtual void CPolyTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

void CPolyTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 373 of file drawtool.cpp.

{
  CDrawTool::OnLButtonDown(pView, nFlags, point);

  CPoint local = point;
  pView->ClientToDoc(local);

  if (m_pDrawObj == NULL)
  {
    pView->SetCapture();

    m_pDrawObj = new CDrawPoly(CRect(local, CSize(0, 0)));
    pView->GetDocument()->Add(m_pDrawObj);
    pView->Select(m_pDrawObj);
    m_pDrawObj->AddPoint(local, pView);
  }
  else if (local == m_pDrawObj->m_points[0])
  {
    // Stop when the first point is repeated...
    ReleaseCapture();
    m_pDrawObj->m_nPoints -= 1;
    if (m_pDrawObj->m_nPoints < 2)
    {
      m_pDrawObj->Remove();
    }
    else
    {
      pView->InvalObj(m_pDrawObj);
    }
    m_pDrawObj = NULL;
    c_drawShape = selection;
    return;
  }

  local.x += 1; // adjacent points can't be the same!
  m_pDrawObj->AddPoint(local, pView);

  selectMode = size;
  nDragHandle = m_pDrawObj->GetHandleCount();
  lastPoint = local;
}

virtual void CPolyTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

virtual void CPolyTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

void CPolyTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 415 of file drawtool.cpp.

{
  // Don't release capture yet!
}

void CPolyTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 420 of file drawtool.cpp.

{
  if (m_pDrawObj != NULL && (nFlags & MK_LBUTTON) != 0)
  {
    CPoint local = point;
    pView->ClientToDoc(local);
    m_pDrawObj->AddPoint(local);
    nDragHandle = m_pDrawObj->GetHandleCount();
    lastPoint = local;
    c_last = point;
    SetCursor(AfxGetApp()->LoadCursor(IDC_PENCIL));
  }
  else
  {
    SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));
    selectTool.OnMouseMove(pView, nFlags, point);
  }
}

virtual void CPolyTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Member Data Documentation

CDrawPoly * CPolyTool::m_pDrawObj [private]

Definition at line 95 of file drawtool.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawtool.h
  • vc2008fp/DrawClient/drawtool.h
  • ole/drawcli/drawtool.cpp
  • vc2008fp/DrawClient/drawtool.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPreviewPane Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions

CPreviewPane Class Reference

#include "PreviewPane.h"

List of all members.

Protected Member Functions

CPreviewPane ()
virtual | ~CPreviewPane ()
virtual void | OnDraw (CDC *pDC)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Detailed Description

Definition at line 15 of file PreviewPane.h.

Constructor & Destructor Documentation

CPreviewPane::CPreviewPane ( ) [protected]

Definition at line 28 of file PreviewPane.cpp.

{
}

CPreviewPane::~CPreviewPane ( ) [protected, virtual]

Definition at line 32 of file PreviewPane.cpp.

{
}

Member Function Documentation

void CPreviewPane::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 43 of file PreviewPane.cpp.

{
  CRect rectClient;
  GetClientRect(rectClient);

  CRect rectCaption = rectClient;
  rectCaption.bottom = rectCaption.top + afxGlobalData.GetTextHeight() + 4;

  CRect rectMessage = rectClient;
  rectMessage.top = rectCaption.bottom;

  pDC->FillRect(rectCaption, &afxGlobalData.brBarFace);
  pDC->FillRect(rectMessage, &afxGlobalData.brWindow);

  int nOldBkMode = pDC->SetBkMode(TRANSPARENT);
  COLORREF clrOldText = pDC->SetTextColor(afxGlobalData.clrBarText);
  CFont* pOldFont = (CFont*) pDC->SelectStockObject(DEFAULT_GUI_FONT);

  CRect rectText = rectCaption;
  rectText.left += 2 * nHorzMargin;
  rectText.right -= 2 * nHorzMargin + rectText.Height();

  CString strCaption = _T("Preview area...");
  pDC->DrawText(strCaption, rectText, DT_END_ELLIPSIS | DT_SINGLELINE | DT_VCENTER);

  pDC->SetTextColor(afxGlobalData.clrWindowText);

  rectText = rectMessage;
  rectText.DeflateRect(nHorzMargin, nVertMargin);

  CString strText = _T("Message body");
  pDC->DrawText(strText, rectText, DT_WORDBREAK | DT_END_ELLIPSIS);

  pDC->SelectObject(pOldFont);
  pDC->SetTextColor(clrOldText);
  pDC->SetBkMode(nOldBkMode);
}

BOOL CPreviewPane::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 99 of file PreviewPane.cpp.

{
  return TRUE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/PreviewPane.h
  • vc2008fp/OutlookDemo/PreviewPane.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CProgCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CProgCtrlPage Class Reference

#include "progctrl.h"

List of all members.

Public Types

enum | { IDD = IDD_PROGCTRL }

Public Member Functions

CProgCtrlPage ()
~CProgCtrlPage ()

Public Attributes

BOOL | m_bSmooth
BOOL | m_bVertical
int | m_iDelta
CProgressCtrl | m_Progress
UINT m_uiPos
UINT m_uiRangeFrom
UINT m_uiRangeTo
UINT m_uiStep

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnFrom ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnProgressSetdelta ()
afx_msg void | OnProgressStepit ()
afx_msg void | OnSetpos ()
afx_msg void | OnStep ()
afx_msg void | OnStyleChange ()
afx_msg void | OnTo ()

Detailed Description

Definition at line 18 of file progctrl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 29 of file progctrl.h.

{ IDD = IDD_PROGCTRL };

Constructor & Destructor Documentation

CProgCtrlPage::CProgCtrlPage ( )

Definition at line 31 of file progctrl.cpp.

                             : CPropertyPage(CProgCtrlPage::IDD)
{
  //{{AFX_DATA_INIT(CProgCtrlPage)
  m_iDelta = 0;
  m_uiStep = 10;
  m_uiRangeFrom = 0;
  m_uiPos = 0;
  m_uiRangeTo = 175;
  m_bVertical = FALSE;
  m_bSmooth = FALSE;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button

}

CProgCtrlPage::~CProgCtrlPage ( )

Definition at line 46 of file progctrl.cpp.

{
}

Member Function Documentation

void CProgCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 50 of file progctrl.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CProgCtrlPage)
  DDX_Text(pDX, IDC_PROGRESS_DELTA, m_iDelta);
  DDX_Text(pDX, IDC_PROGRESS_STEP, m_uiStep);
  DDV_MinMaxUInt(pDX, m_uiStep, 0, 65535);
  DDX_Text(pDX, IDC_PROGRESS_FROM, m_uiRangeFrom);
  DDV_MinMaxUInt(pDX, m_uiRangeFrom, 0, 65535);
  DDX_Text(pDX, IDC_PROGRESS_POS, m_uiPos);
  DDV_MinMaxUInt(pDX, m_uiPos, 0, 65535);
  DDX_Text(pDX, IDC_PROGRESS_TO, m_uiRangeTo);
  DDV_MinMaxUInt(pDX, m_uiRangeTo, 0, 65535);
  DDX_Check(pDX, IDC_VERTICAL, m_bVertical);
  DDX_Check(pDX, IDC_SMOOTH, m_bSmooth);
  //}}AFX_DATA_MAP
}

void CProgCtrlPage::OnFrom ( ) [protected]

Definition at line 119 of file progctrl.cpp.

{
  UpdateData();
  m_Progress.SetRange( static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo) );
}

BOOL CProgCtrlPage::OnInitDialog ( ) [protected, virtual]

Definition at line 68 of file progctrl.cpp.

{
  CPropertyPage::OnInitDialog();

  // Initially create progress control in horizontal position
  CWnd* pWnd =
    GetDlgItem( IDC_PROG_HORZPOS );
  CRect rect;
  pWnd->GetWindowRect( &rect );
  ScreenToClient( &rect );

  // Initialise controls
  m_Progress.Create( WS_VISIBLE | WS_CHILD, rect, this, IDC_PROGRESS );
  m_Progress.SetRange( static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo) );

  return TRUE;
}

void CProgCtrlPage::OnProgressSetdelta ( ) [protected]

Definition at line 113 of file progctrl.cpp.

{
  UpdateData();
  m_Progress.OffsetPos( m_iDelta );
}

void CProgCtrlPage::OnProgressStepit ( ) [protected]

Definition at line 102 of file progctrl.cpp.

{
  m_Progress.StepIt();
}

void CProgCtrlPage::OnSetpos ( ) [protected]

Definition at line 107 of file progctrl.cpp.

{
  UpdateData();
  m_Progress.SetPos( m_uiPos );
}

void CProgCtrlPage::OnStep ( ) [protected]

Definition at line 131 of file progctrl.cpp.

{
  UpdateData();
  m_Progress.SetStep( m_uiStep );
}

void CProgCtrlPage::OnStyleChange ( ) [protected]

Definition at line 137 of file progctrl.cpp.

{
  UpdateData();

  m_Progress.DestroyWindow();

  // Determine orientation
  CWnd* pWnd =
    GetDlgItem( (0==m_bVertical)?IDC_PROG_HORZPOS:IDC_PROG_VERTPOS );
  CRect rect;
  pWnd->GetWindowRect( &rect );
  ScreenToClient( &rect );

  DWORD dwStyle= 0;
  if( m_bSmooth)
    dwStyle= PBS_SMOOTH;
  if(0 == m_bVertical)
    m_Progress.Create( WS_VISIBLE | WS_CHILD |
      dwStyle, rect, this, IDC_PROGRESS );
  else
    m_Progress.Create( WS_VISIBLE | WS_CHILD |
      PBS_VERTICAL | dwStyle, rect, this, IDC_PROGRESS );
  m_Progress.SetRange(static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo));
}

void CProgCtrlPage::OnTo ( ) [protected]

Definition at line 125 of file progctrl.cpp.

{
  UpdateData();
  m_Progress.SetRange( static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo) );
}

Member Data Documentation

BOOL CProgCtrlPage::m_bSmooth

Definition at line 36 of file progctrl.h.

BOOL CProgCtrlPage::m_bVertical

Definition at line 35 of file progctrl.h.

int CProgCtrlPage::m_iDelta

Definition at line 30 of file progctrl.h.

CProgressCtrl CProgCtrlPage::m_Progress

Definition at line 38 of file progctrl.h.

UINT CProgCtrlPage::m_uiPos

Definition at line 33 of file progctrl.h.

UINT CProgCtrlPage::m_uiRangeFrom

Definition at line 32 of file progctrl.h.

UINT CProgCtrlPage::m_uiRangeTo

Definition at line 34 of file progctrl.h.

UINT CProgCtrlPage::m_uiStep

Definition at line 31 of file progctrl.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl2/progctrl.h
  • general/CmnCtrl2/progctrl.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CProgressBarTaskDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CProgressBarTaskDialog Class Reference

#include "CTaskDialogDemoDlg.h"

List of all members.

Public Member Functions

CProgressBarTaskDialog ()

Protected Member Functions

virtual HRESULT OnTimer (long)

Detailed Description

Definition at line 47 of file CTaskDialogDemoDlg.h.

Constructor & Destructor Documentation

CProgressBarTaskDialog::CProgressBarTaskDialog ( ) [inline]

Definition at line 49 of file CTaskDialogDemoDlg.h.

                           : CTaskDialog(_T("A CTaskDialog presents information in a clear and consistent way."),
      _T("How much do you like CTaskDialog?"),
      _T("Sample Progress Bar"),
    TDCBF_YES_BUTTON | TDCBF_NO_BUTTON ,
    TDF_ENABLE_HYPERLINKS  | TDF_USE_COMMAND_LINKS | TDF_CALLBACK_TIMER | TDF_SHOW_PROGRESS_BAR, _T(""))
  {
      SetProgressBarRange(0, 300);
  }

Member Function Documentation

virtual HRESULT CProgressBarTaskDialog::OnTimer ( long ) [inline, protected, virtual]

Definition at line 58 of file CTaskDialogDemoDlg.h.

                                           {
    static int iCounter = 0;

    if( iCounter == 260) {
      SetProgressBarState(PBST_NORMAL);
    }

    if (iCounter > 80 && iCounter < 120) {
      SetProgressBarState(PBST_ERROR);
    }
    else if (iCounter > 190 && iCounter < 220) {
      SetProgressBarState(PBST_PAUSED);
    }
    else {
      SetProgressBarPosition(iCounter);
    }

    if (iCounter >= 300) {
      iCounter = 0;
    }
    else iCounter+=5;

    return S_OK;
  }

The documentation for this class was generated from the following file:
  • general/CTaskDialog/CTaskDialogDemoDlg.h
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropDlgApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CPropDlgApp Class Reference

#include "propdlg.h"

List of all members.

Public Member Functions

CPropDlgApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 25 of file propdlg.h.

Constructor & Destructor Documentation

CPropDlgApp::CPropDlgApp ( )

Definition at line 48 of file propdlg.cpp.

{
}

Member Function Documentation

BOOL CPropDlgApp::InitInstance ( ) [virtual]

Definition at line 60 of file propdlg.cpp.

{
  // It is very important to have consistent gray dialogs in this
  //  application.  If CTL3D32.DLL cannot be loaded, then non-3d
  //  gray dialogs are used instead.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register document templates

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_SHAPESTYPE,
    RUNTIME_CLASS(CShapesDoc),
    RUNTIME_CLASS(CMDIChildWnd),          // standard MDI child frame
    RUNTIME_CLASS(CShapesView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    // free the memory
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // enable file manager drag/drop and DDE Execute open
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  m_pMainWnd->DragAcceptFiles();
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CPropDlgApp::OnAppAbout ( )

Definition at line 149 of file propdlg.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/propdlg/propdlg.h
  • general/propdlg/propdlg.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertiesDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPropertiesDlg Class Reference

#include "PropertiesDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPERTIES }

Public Member Functions

CPropertiesDlg (CWnd *pParent=NULL)

Public Attributes

DWORD | m_dwFileAttributes
int | m_nArchive
int | m_nHidden
int | m_nReadOnly
int | m_nSystem
CString | m_strAccessTime
CString | m_strCreationTime
CString | m_strFileName
CString | m_strFileSize
CString | m_strModificationTime
CString | m_strType

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 22 of file PropertiesDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 41 of file PropertiesDlg.h.

{ IDD = IDD_PROPERTIES };

Constructor & Destructor Documentation

CPropertiesDlg::CPropertiesDlg ( CWnd * pParent = NULL )

Definition at line 25 of file PropertiesDlg.cpp.

  : CDHtmlDialog(CPropertiesDlg::IDD, 0, pParent)
{
  //{{AFX_DATA_INIT(CPropertiesDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
  m_dwFileAttributes = 0;
  m_nReadOnly = 0;
  m_nArchive = 0;
  m_nHidden = 0;
  m_nSystem = 0;
}

Member Function Documentation

void CPropertiesDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 39 of file PropertiesDlg.cpp.

{
  CDHtmlDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CPropertiesDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
  DDX_DHtml_ElementInnerText(pDX, _T("filename"), m_strFileName);
  DDX_DHtml_ElementInnerText(pDX, _T("filetype"), m_strType);
  DDX_DHtml_ElementInnerText(pDX, _T("filesize"), m_strFileSize);
  DDX_DHtml_ElementInnerText(pDX, _T("createtime"), m_strCreationTime);
  DDX_DHtml_ElementInnerText(pDX, _T("modifiedtime"), m_strModificationTime);
  DDX_DHtml_ElementInnerText(pDX, _T("accessedtime"), m_strAccessTime);
  DDX_DHtml_CheckBox(pDX, _T("readonly"), m_nReadOnly);
  DDX_DHtml_CheckBox(pDX, _T("archive"), m_nArchive);
  DDX_DHtml_CheckBox(pDX, _T("hidden"), m_nHidden);
  DDX_DHtml_CheckBox(pDX, _T("system"), m_nSystem);
}

BOOL CPropertiesDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 66 of file PropertiesDlg.cpp.

{
  SetHostFlags(DOCHOSTUIFLAG_FLAT_SCROLLBAR);

  CDHtmlDialog::OnInitDialog();

  // get the properties of the file
  WIN32_FIND_DATA finddata;
  HANDLE hFind = FindFirstFile(m_strFileName, &finddata);
  FindClose(hFind);

  if (hFind == INVALID_HANDLE_VALUE)
    // File was not found.
    return TRUE;

  // copy the file data to internal members
  m_strType = finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ?
    _T("Directory") : _T("File");
  m_strFileSize.Format(_T("%lu"), finddata.nFileSizeLow);
  m_strCreationTime = CTime(finddata.ftCreationTime).Format(_T("%A, %B %d, %Y"));
  m_strModificationTime = CTime(finddata.ftLastWriteTime).Format(_T("%A, %B %d, %Y"));
  m_strAccessTime = CTime(finddata.ftLastAccessTime).Format(_T("%A, %B %d, %Y"));
  m_dwFileAttributes = finddata.dwFileAttributes;

  m_nReadOnly = (m_dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? BST_CHECKED : BST_UNCHECKED;
  m_nHidden = (m_dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ? BST_CHECKED : BST_UNCHECKED;
  m_nArchive = (m_dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ? BST_CHECKED : BST_UNCHECKED;
  m_nSystem = (m_dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) ? BST_CHECKED : BST_UNCHECKED;

  LoadFromResource(IDR_PROPERTIES);

  return TRUE;  // return TRUE unless you set the focus to a control
                // EXCEPTION: OCX Property Pages should return FALSE
}

Member Data Documentation

DWORD CPropertiesDlg::m_dwFileAttributes

Definition at line 35 of file PropertiesDlg.h.

int CPropertiesDlg::m_nArchive

Definition at line 37 of file PropertiesDlg.h.

int CPropertiesDlg::m_nHidden

Definition at line 38 of file PropertiesDlg.h.

int CPropertiesDlg::m_nReadOnly

Definition at line 36 of file PropertiesDlg.h.

int CPropertiesDlg::m_nSystem

Definition at line 39 of file PropertiesDlg.h.

CString CPropertiesDlg::m_strAccessTime

Definition at line 34 of file PropertiesDlg.h.

CString CPropertiesDlg::m_strCreationTime

Definition at line 32 of file PropertiesDlg.h.

CString CPropertiesDlg::m_strFileName

Definition at line 29 of file PropertiesDlg.h.

CString CPropertiesDlg::m_strFileSize

Definition at line 31 of file PropertiesDlg.h.

CString CPropertiesDlg::m_strModificationTime

Definition at line 33 of file PropertiesDlg.h.

CString CPropertiesDlg::m_strType

Definition at line 30 of file PropertiesDlg.h.

The documentation for this class was generated from the following files:
  • internet/DHtmlExplore/PropertiesDlg.h
  • internet/DHtmlExplore/PropertiesDlg.cpp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertiesToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CPropertiesToolBar Class Reference

#include "PropertiesViewBar.h"

List of all members.

Public Member Functions

virtual BOOL | AllowShowOnList () const
virtual BOOL | AllowShowOnList () const
virtual void | OnUpdateCmdUI (CFrameWnd *, BOOL bDisableIfNoHndler)
virtual void | OnUpdateCmdUI (CFrameWnd *, BOOL bDisableIfNoHndler)

Detailed Description

Definition at line 14 of file PropertiesViewBar.h.

Member Function Documentation

virtual BOOL CPropertiesToolBar::AllowShowOnList ( ) const [inline, virtual]

Definition at line 22 of file PropertiesViewBar.h.

{ return FALSE; }

virtual BOOL CPropertiesToolBar::AllowShowOnList ( ) const [inline, virtual]

Definition at line 20 of file PropertiesViewBar.h.

{ return FALSE; }

virtual void CPropertiesToolBar::OnUpdateCmdUI | ( | CFrameWnd * | ,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [inline, virtual]

Definition at line 15 of file PropertiesViewBar.h.

  {
    CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
  }

virtual void CPropertiesToolBar::OnUpdateCmdUI | ( | CFrameWnd * | ,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [inline, virtual]

Definition at line 17 of file PropertiesViewBar.h.

  {
    CMFCToolBar::OnUpdateCmdUI ((CFrameWnd*) GetOwner (), bDisableIfNoHndler);
  }

The documentation for this class was generated from the following files:
  • vc2008fp/DrawClient/PropertiesViewBar.h
  • vc2008fp/VisualStudioDemo/PropertiesViewBar.h
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertiesViewBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CPropertiesViewBar Class Reference

#include "PropertiesViewBar.h"

List of all members.

Public Member Functions

CPropertiesViewBar (void)
CPropertiesViewBar ()
virtual | ~CPropertiesViewBar ()
virtual | ~CPropertiesViewBar ()
void | AdjustLayout ()
void | AdjustLayout ()
CMFCPropertyGridCtrl * | GetPropList ()
void | OnChangeVisualStyle ()
void | SetVSDotNetLook (BOOL bSet)
void | SetVSDotNetLook (BOOL bSet)

Protected Member Functions

void | InitPropList ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnExpand ()
afx_msg void | OnProperies1 ()
afx_msg void | OnProperies2 ()
afx_msg void | OnPropListAlphabetMode ()
afx_msg void | OnPropListTreeMode ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSettingChange (UINT uFlags, LPCTSTR lpszSection)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSortingprop ()
afx_msg void | OnUpdateExpand (CCmdUI *pCmdUI)
afx_msg void | OnUpdateProperies1 (CCmdUI *pCmdUI)
afx_msg void | OnUpdateProperies2 (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePropListAlphabetMode (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePropListTreeMode (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSortingprop (CCmdUI *pCmdUI)
void | SetPropListFont ()

Protected Attributes

CFont | m_fntPropList
CComboBox | m_wndObjectCombo
CMFCPropertyGridCtrl | m_wndPropList
CPropertiesToolBar m_wndToolBar

Detailed Description

Definition at line 25 of file PropertiesViewBar.h.

Constructor & Destructor Documentation

CPropertiesViewBar::CPropertiesViewBar ( void )

Definition at line 23 of file PropertiesViewBar.cpp.

{
}

CPropertiesViewBar::~CPropertiesViewBar ( void ) [virtual]

Definition at line 27 of file PropertiesViewBar.cpp.

{
}

CPropertiesViewBar::CPropertiesViewBar ( )
virtual CPropertiesViewBar::~CPropertiesViewBar ( ) [virtual]

Member Function Documentation

void CPropertiesViewBar::AdjustLayout ( )

Definition at line 41 of file PropertiesViewBar.cpp.

{
  if (GetSafeHwnd () == NULL)
  {
    return;
  }

  CRect rectClient;
  GetClientRect (rectClient);

  int cyTlb = m_wndToolBar.CalcFixedLayout (FALSE, TRUE).cy;

  m_wndToolBar.SetWindowPos (NULL,
                 rectClient.left,
                 rectClient.top,
                 rectClient.Width (),
                 cyTlb,
                 SWP_NOACTIVATE | SWP_NOZORDER);

  m_wndPropList.SetWindowPos (NULL,
                  rectClient.left,
                  rectClient.top + cyTlb,
                  rectClient.Width (),
                  rectClient.Height () - cyTlb,
                  SWP_NOACTIVATE | SWP_NOZORDER);
}

void CPropertiesViewBar::AdjustLayout ( )
CMFCPropertyGridCtrl* CPropertiesViewBar::GetPropList ( ) [inline]

Definition at line 40 of file PropertiesViewBar.h.

{return &m_wndPropList;}

void CPropertiesViewBar::InitPropList ( ) [protected]

Definition at line 163 of file PropertiesViewBar.cpp.

{
  SetPropListFont();

  m_wndPropList.EnableHeaderCtrl(FALSE);
  m_wndPropList.EnableDescriptionArea();
  m_wndPropList.SetVSDotNetLook();
  m_wndPropList.MarkModifiedProperties();

  std::auto_ptr<CMFCPropertyGridProperty> apGroup1(new CMFCPropertyGridProperty(_T("Appearance")));

  apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("3D Look"), (_variant_t) false, _T("Specifies the dialog's font will be nonbold and controls will have a 3D border")));

  CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("Border"), _T("Dialog Frame"), _T("One of: None, Thin, Resizable, or Dialog Frame"));
  pProp->AddOption(_T("None"));
  pProp->AddOption(_T("Thin"));
  pProp->AddOption(_T("Resizable"));
  pProp->AddOption(_T("Dialog Frame"));
  pProp->AllowEdit(FALSE);

  apGroup1->AddSubItem(pProp);
  apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("Caption"), (_variant_t) _T("About"), _T("Specifies the text that will be displayed in the dialog's title bar")));

  m_wndPropList.AddProperty(apGroup1.release());

  std::auto_ptr<CMFCPropertyGridProperty> apSize(new CMFCPropertyGridProperty(_T("Window Size"), 0, TRUE));

  pProp = new CMFCPropertyGridProperty(_T("Height"), (_variant_t) 250l, _T("Specifies the dialog's height"));
  pProp->EnableSpinControl(TRUE, 0, 1000);
  apSize->AddSubItem(pProp);

  pProp = new CMFCPropertyGridProperty( _T("Width"), (_variant_t) 150l, _T("Specifies the dialog's width"));
  pProp->EnableSpinControl(TRUE, 1, 500);
  apSize->AddSubItem(pProp);

  m_wndPropList.AddProperty(apSize.release());

  std::auto_ptr<CMFCPropertyGridProperty> apGroup2(new CMFCPropertyGridProperty(_T("Font")));

  LOGFONT lf;
  CFont* font = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
  font->GetLogFont(&lf);

  lstrcpy(lf.lfFaceName, _T("Arial"));

  apGroup2->AddSubItem(new CMFCPropertyGridFontProperty(_T("Font"), lf, CF_EFFECTS | CF_SCREENFONTS, _T("Specifies the default font for the dialog")));
  apGroup2->AddSubItem(new CMFCPropertyGridProperty(_T("Use System Font"), (_variant_t) true, _T("Specifies that the dialog uses MS Shell Dlg font")));

  m_wndPropList.AddProperty(apGroup2.release());

  std::auto_ptr<CMFCPropertyGridProperty> apGroup3(new CMFCPropertyGridProperty(_T("Misc")));
  pProp = new CMFCPropertyGridProperty(_T("(Name)"), _T("IDD_ABOUT_BOX(dialog)"));
  pProp->Enable(FALSE);
  apGroup3->AddSubItem(pProp);

  CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("Window Color"), RGB(210, 192, 254), NULL, _T("Specifies the default dialog color"));
  pColorProp->EnableOtherButton(_T("Other..."));
  pColorProp->EnableAutomaticButton(_T("Default"), ::GetSysColor(COLOR_3DFACE));
  apGroup3->AddSubItem(pColorProp);

  static TCHAR BASED_CODE szFilter[] = _T("Icon Files(*.ico)|*.ico|All Files(*.*)|*.*||");
  apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Icon"), TRUE, _T(""), _T("ico"), 0, szFilter, _T("Specifies the dialog icon")));

  apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Folder"), _T("c:\\")));

  m_wndPropList.AddProperty(apGroup3.release());

  std::auto_ptr<CMFCPropertyGridProperty> apGroup4(new CMFCPropertyGridProperty(_T("Hierarchy")));

  CMFCPropertyGridProperty* pGroup41 = new CMFCPropertyGridProperty(_T("First sub-level"));
  apGroup4->AddSubItem(pGroup41);

  CMFCPropertyGridProperty* pGroup411 = new CMFCPropertyGridProperty(_T("Second sub-level"));
  pGroup41->AddSubItem(pGroup411);

  pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 1"), (_variant_t) _T("Value 1"), _T("This is a description")));
  pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 2"), (_variant_t) _T("Value 2"), _T("This is a description")));
  pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 3"), (_variant_t) _T("Value 3"), _T("This is a description")));

  apGroup4->Expand(FALSE);
  m_wndPropList.AddProperty(apGroup4.release());
}

void CPropertiesViewBar::OnChangeVisualStyle ( )

Definition at line 282 of file PropertiesViewBar.cpp.

{
  m_wndToolBar.CleanUpLockedImages();
  m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_PROP24 : IDR_PROPERTIES, 0, 0, TRUE /* Locked */);
}

int CPropertiesViewBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 68 of file PropertiesViewBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy;
  rectDummy.SetRectEmpty ();

  if (!m_wndPropList.Create (WS_VISIBLE | WS_CHILD, rectDummy, this, 2))
  {
    TRACE0("Failed to create Properies Grid \n");
    return -1;      // fail to create
  }

  m_wndToolBar.Create (this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_PROPERTIES);
  m_wndToolBar.LoadToolBar (IDR_PROPERTIES, 0, 0, TRUE /* Is locked */);

  m_wndPropList.SetVSDotNetLook (TRUE);
  m_wndPropList.SetGroupNameFullWidth (TRUE);
  m_wndPropList.EnableDescriptionArea (TRUE);

  m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
    CBRS_TOOLTIPS | CBRS_FLYBY);

  m_wndToolBar.SetPaneStyle (
    m_wndToolBar.GetPaneStyle () &
      ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));

  m_wndToolBar.SetOwner (this);

  // All commands will be routed via this control , not via the parent frame:
  m_wndToolBar.SetRouteCommandsViaFrame (FALSE);

  AdjustLayout ();
  return 0;
}

afx_msg int CPropertiesViewBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
void CPropertiesViewBar::OnExpand ( ) [protected]

Definition at line 133 of file PropertiesViewBar.cpp.

{
  m_wndPropList.SetAlphabeticMode(FALSE);
}

void CPropertiesViewBar::OnProperies1 ( ) [protected]

Definition at line 143 of file PropertiesViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CPropertiesViewBar::OnProperies2 ( ) [protected]

Definition at line 153 of file PropertiesViewBar.cpp.

{
  // TODO: Add your command handler code here
}

void CPropertiesViewBar::OnPropListAlphabetMode ( ) [protected]

Definition at line 120 of file PropertiesViewBar.cpp.

{
  m_wndPropList.SetAlphabeticMode (TRUE);
}

void CPropertiesViewBar::OnPropListTreeMode ( ) [protected]

Definition at line 116 of file PropertiesViewBar.cpp.

{
  m_wndPropList.SetAlphabeticMode (FALSE);
}

afx_msg void CPropertiesViewBar::OnSetFocus ( CWnd * pOldWnd ) [protected]
void CPropertiesViewBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 111 of file PropertiesViewBar.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);
  m_wndPropList.SetFocus ();
}

void CPropertiesViewBar::OnSettingChange | ( | UINT | uFlags,
 |  | LPCTSTR | lpszSection |
 | ) |  |  | [protected]

Definition at line 254 of file PropertiesViewBar.cpp.

{
  CDockablePane::OnSettingChange(uFlags, lpszSection);
  SetPropListFont();
}

void CPropertiesViewBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 105 of file PropertiesViewBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);
  AdjustLayout ();
}

afx_msg void CPropertiesViewBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
void CPropertiesViewBar::OnSortingprop ( ) [protected]

Definition at line 123 of file PropertiesViewBar.cpp.

{
  m_wndPropList.SetAlphabeticMode();
}

void CPropertiesViewBar::OnUpdateExpand ( CCmdUI * pCmdUI ) [protected]

Definition at line 138 of file PropertiesViewBar.cpp.

{
  pCmdUI->SetCheck(!m_wndPropList.IsAlphabeticMode());
}

void CPropertiesViewBar::OnUpdateProperies1 ( CCmdUI * pCmdUI ) [protected]

Definition at line 148 of file PropertiesViewBar.cpp.

{
  // TODO: Add your command update UI handler code here
}

void CPropertiesViewBar::OnUpdateProperies2 ( CCmdUI * pCmdUI ) [protected]

Definition at line 158 of file PropertiesViewBar.cpp.

{
  // TODO: Add your command update UI handler code here
}

void CPropertiesViewBar::OnUpdatePropListAlphabetMode ( CCmdUI * pCmdUI ) [protected]

Definition at line 128 of file PropertiesViewBar.cpp.

{
  pCmdUI->SetCheck (m_wndPropList.IsAlphabeticMode ());
}

void CPropertiesViewBar::OnUpdatePropListTreeMode ( CCmdUI * pCmdUI ) [protected]

Definition at line 124 of file PropertiesViewBar.cpp.

{
  pCmdUI->SetCheck (!m_wndPropList.IsAlphabeticMode ());
}

void CPropertiesViewBar::OnUpdateSortingprop ( CCmdUI * pCmdUI ) [protected]

Definition at line 128 of file PropertiesViewBar.cpp.

{
  pCmdUI->SetCheck(m_wndPropList.IsAlphabeticMode());
}

void CPropertiesViewBar::SetPropListFont ( ) [protected]

Definition at line 260 of file PropertiesViewBar.cpp.

{
  ::DeleteObject (m_fntPropList.Detach ());

  LOGFONT lf;
  afxGlobalData.fontRegular.GetLogFont (&lf);

  NONCLIENTMETRICS info;
  info.cbSize = sizeof(info);

  afxGlobalData.GetNonClientMetrics (info);

  lf.lfHeight = info.lfMenuFont.lfHeight;
  lf.lfWeight = info.lfMenuFont.lfWeight;
  lf.lfItalic = info.lfMenuFont.lfItalic;

  m_fntPropList.CreateFontIndirect (&lf);

  m_wndPropList.SetFont(&m_fntPropList);
  m_wndObjectCombo.SetFont(&m_fntPropList);
}

void CPropertiesViewBar::SetVSDotNetLook ( BOOL bSet ) [inline]

Definition at line 34 of file PropertiesViewBar.h.

  {
    m_wndPropList.SetVSDotNetLook (bSet);
    m_wndPropList.SetGroupNameFullWidth (bSet);
  }

void CPropertiesViewBar::SetVSDotNetLook ( BOOL bSet ) [inline]

Definition at line 33 of file PropertiesViewBar.h.

  {
    m_wndPropList.SetVSDotNetLook(bSet);
    m_wndPropList.SetGroupNameFullWidth(bSet);
  }

Member Data Documentation

CFont CPropertiesViewBar::m_fntPropList [protected]

Definition at line 45 of file PropertiesViewBar.h.

CComboBox CPropertiesViewBar::m_wndObjectCombo [protected]

Definition at line 42 of file PropertiesViewBar.h.

CMFCPropertyGridCtrl CPropertiesViewBar::m_wndPropList [protected]

Definition at line 44 of file PropertiesViewBar.h.

CPropertiesToolBar CPropertiesViewBar::m_wndToolBar [protected]

Definition at line 43 of file PropertiesViewBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DrawClient/PropertiesViewBar.h
  • vc2008fp/VisualStudioDemo/PropertiesViewBar.h
  • vc2008fp/DrawClient/PropertiesViewBar.cpp
  • vc2008fp/VisualStudioDemo/PropertiesViewBar.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CProperty Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes | Friends

CProperty Class Reference

#include "propset.h"

List of all members.

Public Member Functions

CProperty (void)
CProperty (DWORD dwID, const LPVOID pValue, DWORD dwType)
CProperty (void)
CProperty (DWORD dwID, const LPVOID pValue, DWORD dwType)
~CProperty ()
~CProperty ()
LPVOID | Get (void)
LPVOID | Get (DWORD *pcb)
LPVOID | Get (void)
LPVOID | Get (DWORD *pcb)
DWORD | GetID (void)
DWORD | GetID (void)
LPVOID | GetRawValue (void)
LPVOID | GetRawValue (void)
DWORD | GetType (void)
DWORD | GetType (void)
BOOL | ReadFromStream (IStream *pIStream)
BOOL | ReadFromStream (IStream *pIStream)
BOOL | Set (const LPVOID pValue, DWORD dwType)
BOOL | Set (const LPVOID pValue)
BOOL | Set (DWORD dwID, const LPVOID pValue, DWORD dwType)
BOOL | Set (DWORD dwID, const LPVOID pValue, DWORD dwType)
BOOL | Set (const LPVOID pValue)
BOOL | Set (const LPVOID pValue, DWORD dwType)
void | SetID (DWORD dwPropID)
void | SetID (DWORD dwPropID)
void | SetType (DWORD dwType)
void | SetType (DWORD dwType)
BOOL | WriteToStream (IStream *pIStream)
BOOL | WriteToStream (IStream *pIStream)

Private Member Functions

LPVOID | AllocValue (ULONG cb)
LPVOID | AllocValue (ULONG cb)
void | FreeValue ()
void | FreeValue ()

Private Attributes

DWORD | m_dwPropID
DWORD | m_dwType
LPVOID m_pValue

Friends

class | CPropertySection
class | CPropertySet

Detailed Description

Definition at line 46 of file propset.h.

Constructor & Destructor Documentation

CProperty::CProperty ( void )

Definition at line 150 of file propset.cpp.

{
  m_dwPropID = 0;

  m_dwType = VT_EMPTY;
  m_pValue = NULL;       // must init to NULL
}

CProperty::CProperty | ( | DWORD | dwID,
 |  | const LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |

Definition at line 158 of file propset.cpp.

{
  m_dwPropID = dwID;
  m_dwType = dwType;
  m_pValue = NULL;       // must init to NULL
  Set( dwID, pValue, dwType );
}

CProperty::~CProperty ( )

Definition at line 166 of file propset.cpp.

{
  FreeValue();
}

CProperty::CProperty ( void )
CProperty::CProperty | ( | DWORD | dwID,
 |  | const LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |
CProperty::~CProperty ( )

Member Function Documentation

LPVOID CProperty::AllocValue ( ULONG cb ) [private]

Definition at line 747 of file propset.cpp.

{
  return m_pValue = malloc((int)cb);
}

LPVOID CProperty::AllocValue ( ULONG cb ) [private]
void CProperty::FreeValue ( ) [private]

Definition at line 753 of file propset.cpp.

{
  if (m_pValue != NULL)
  {
    free(m_pValue);
    m_pValue = NULL;
  }
}

void CProperty::FreeValue ( ) [private]
LPVOID CProperty::Get ( void )

Definition at line 350 of file propset.cpp.

{   return Get( (DWORD*)NULL );   }

LPVOID CProperty::Get ( DWORD * pcb )
LPVOID CProperty::Get ( void )
LPVOID CProperty::Get ( DWORD * pcb )

Definition at line 353 of file propset.cpp.

{
  DWORD   cb = 0;
  LPBYTE  p = NULL;

  p = (LPBYTE)m_pValue;

  // m_pValue points to a Property "Value" which may
  // have size information included...
  switch( m_dwType )
  {
    case VT_EMPTY:          // nothing
      cb = 0;
    break;

    case VT_I2:             // 2 byte signed int
    case VT_BOOL:           // True=-1, False=0
      cb = 2;
    break;

    case VT_I4:             // 4 byte signed int
    case VT_R4:             // 4 byte real
      cb = 4;
    break;

    case VT_R8:             // 8 byte real
    case VT_CY:             // currency
    case VT_DATE:           // date
    case VT_I8:             // signed 64-bit int
    case VT_FILETIME:       // FILETIME
      cb = 8;
    break;

#ifndef _UNICODE
    case VT_BSTR:           // binary string
    case VT_STREAM:         // Name of the stream follows
    case VT_STORAGE:        // Name of the storage follows
    case VT_STREAMED_OBJECT:// Stream contains an object
    case VT_STORED_OBJECT:  // Storage contains an object
    case VT_STREAMED_PROPSET:// Stream contains a propset
    case VT_STORED_PROPSET: // Storage contains a propset
#endif // UNICODE
    case VT_LPSTR:          // null terminated string
    case VT_CF:             // Clipboard format
      // Read the DWORD that gives us the size, making
      // sure we increment cbValue.
      cb = *(LPDWORD)p;
      p += sizeof( DWORD );
    break;

    case VT_BLOB:           // Length prefixed bytes
    case VT_BLOB_OBJECT:    // Blob contains an object
    case VT_BLOB_PROPSET:   // Blob contains a propset
      // Read the DWORD that gives us the size.
      cb = *(LPDWORD)p;
    break;

#ifdef _UNICODE
    case VT_BSTR:           // binary string
    case VT_STREAM:         // Name of the stream follows
    case VT_STORAGE:        // Name of the storage follows
    case VT_STREAMED_OBJECT:// Stream contains an object
    case VT_STORED_OBJECT:  // Storage contains an object
    case VT_STREAMED_PROPSET:// Stream contains a propset
    case VT_STORED_PROPSET: // Storage contains a propset
#endif // _UNICODE
    case VT_LPWSTR:         // UNICODE string
      cb = *(LPDWORD)p * sizeof(WCHAR);
      p += sizeof( DWORD );
    break;

    case VT_CLSID:          // A Class ID
      cb = sizeof(CLSID);
    break;

    case VT_VARIANT:        // VARIANT*
    break;

    default:
      return NULL;
  }
  if (pcb != NULL)
    *pcb = cb;

  return p;
}

DWORD CProperty::GetID ( void )

Definition at line 446 of file propset.cpp.

{   return m_dwPropID;   }

DWORD CProperty::GetID ( void )
LPVOID CProperty::GetRawValue ( void )

Definition at line 452 of file propset.cpp.

{   return m_pValue; }

LPVOID CProperty::GetRawValue ( void )
DWORD CProperty::GetType ( void )
DWORD CProperty::GetType ( void )

Definition at line 440 of file propset.cpp.

{   return m_dwType;  }

BOOL CProperty::ReadFromStream ( IStream * pIStream )
BOOL CProperty::ReadFromStream ( IStream * pIStream )

Definition at line 587 of file propset.cpp.

{
  ULONG           cb;
  ULONG           cbItem;
  ULONG           cbValue;
  DWORD           dwType;
  ULONG           nReps;
  ULONG           iReps;
  LPSTREAM        pIStrItem;
  LARGE_INTEGER   li;

  // All properties are made up of a type/value pair.
  // The obvious first thing to do is to get the type...
  pIStream->Read( (LPVOID)&m_dwType, sizeof(m_dwType), &cb );
  if (cb != sizeof(m_dwType))
    return FALSE;

  dwType = m_dwType;
  nReps = 1;
  cbValue = 0;
  if (m_dwType & VT_VECTOR)
  {
    // The next DWORD in the stream is a count of the
    // elements
    pIStream->Read( (LPVOID)&nReps, sizeof(nReps), &cb );
    if (cb != sizeof(nReps))
      return FALSE;
    cbValue += cb;
    dwType &= ~VT_VECTOR;
  }

  // Since a value can be made up of a vector (VT_VECTOR) of
  // items, we first seek through the value, picking out
  // each item, getting it's size.  We use a cloned
  // stream for this (pIStrItem).
  // We then use our pIStream to read the entire 'blob' into
  // the allocated buffer.
  //
  cbItem = 0;        // Size of the current item
  pIStream->Clone( &pIStrItem );
  ENSURE(pIStrItem != NULL);
  iReps = nReps;
  while (iReps--)
  {
    switch (dwType)
    {
      case VT_EMPTY:          // nothing
        cbItem = 0;
      break;

      case VT_I2:             // 2 byte signed int
      case VT_BOOL:           // True=-1, False=0
        cbItem = 2;
      break;

      case VT_I4:             // 4 byte signed int
      case VT_R4:             // 4 byte real
        cbItem = 4;
      break;

      case VT_R8:             // 8 byte real
      case VT_CY:             // currency
      case VT_DATE:           // date
      case VT_I8:             // signed 64-bit int
      case VT_FILETIME:       // FILETIME
        cbItem = 8;
      break;

      case VT_LPSTR:          // null terminated string
      case VT_BSTR:           // binary string
      case VT_STREAM:         // Name of the stream follows
      case VT_STORAGE:        // Name of the storage follows
      case VT_STREAMED_OBJECT:// Stream contains an object
      case VT_STORED_OBJECT:  // Storage contains an object
      case VT_STREAMED_PROPSET:// Stream contains a propset
      case VT_STORED_PROPSET: // Storage contains a propset
      case VT_BLOB:           // Length prefixed bytes
      case VT_BLOB_OBJECT:    // Blob contains an object
      case VT_BLOB_PROPSET:   // Blob contains a propset
      case VT_CF:             // Clipboard format
        // Read the DWORD that gives us the size, making
        // sure we increment cbValue.
        pIStream->Read( (LPVOID)&cbItem, sizeof(cbItem), &cb );
        if (cb != sizeof(cbItem))
          return FALSE;
        LISet32( li, -(LONG)cb );
        pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
        cbValue += cb;
      break;

      case VT_LPWSTR:         // UNICODE string
        pIStream->Read( (LPVOID)&cbItem, sizeof(cbItem), &cb );
        if (cb != sizeof(cbItem))
          return FALSE;
        LISet32( li, -(LONG)cb );
        pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
        cbValue += cb;
        cbItem *= sizeof(WCHAR);
      break;

      case VT_CLSID:          // A Class ID
        cbItem = sizeof(CLSID);
      break;

      case VT_VARIANT:        // VARIANT*
      break;

      default:
        pIStrItem->Release();
        return FALSE;
    }

    // Add 'cb' to cbItem before seeking...
    //
    // Seek to the next item
    LISet32( li, cbItem );
    pIStrItem->Seek( li, STREAM_SEEK_CUR, NULL);
    cbValue += cbItem;
  }

  pIStrItem->Release();

#ifdef _UNICODE
  LPBYTE pTmp;

  switch (dwType)
  {
    case VT_BSTR:           // binary string
    case VT_STREAM:         // Name of the stream follows
    case VT_STORAGE:        // Name of the storage follows
    case VT_STREAMED_OBJECT:// Stream contains an object
    case VT_STORED_OBJECT:  // Storage contains an object
    case VT_STREAMED_PROPSET:// Stream contains a propset
    case VT_STORED_PROPSET: // Storage contains a propset
      pTmp = (LPBYTE)malloc((int)cbValue);
      pIStream->Read( pTmp, cbValue, &cb );
      m_pValue = ConvertStringProp(pTmp, m_dwType, nReps, sizeof(WCHAR));
      free(pTmp);
    break;

    default:
#endif // _UNICODE
      // Allocate cbValue bytes
      if (NULL == AllocValue(cbValue))
        return FALSE;

      // Read the buffer from pIStream
      pIStream->Read( m_pValue, cbValue, &cb );
      if (cb != cbValue)
        return FALSE;
#ifdef _UNICODE
    break;
  }
#endif // _UNICODE

  // Done!
  return TRUE;
}

BOOL CProperty::Set ( const LPVOID pValue )
BOOL CProperty::Set | ( | const LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |

Definition at line 179 of file propset.cpp.

{
  m_dwType = dwType;
  return Set( pValue );
}

BOOL CProperty::Set | ( | const LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |
BOOL CProperty::Set ( const LPVOID pValue )

Definition at line 185 of file propset.cpp.

{
  ULONG           cb;
  ULONG           cbItem;
  ULONG           cbValue;
  ULONG           nReps;
  LPBYTE          pCur;
  LPVOID          pValue = pVal;
  DWORD           dwType = m_dwType;
  LPVOID          pValueOrig = NULL;

  if (m_pValue != NULL)
  {
    FreeValue();
  }

  if (pValue == NULL || m_dwType == 0)
    return TRUE;

  // Given pValue, determine how big it is
  // Then allocate a new buffer for m_pValue and copy...
  nReps = 1;
  cbValue = 0;
  pCur = (LPBYTE)pValue;
  if (m_dwType & VT_VECTOR)
  {
    // The next DWORD is a count of the elements
    nReps = *(LPDWORD)pValue;
    cb = sizeof( nReps );
    pCur += cb;
    cbValue += cb;
    dwType &= ~VT_VECTOR;
  }
  else
  {
    // If we get any of the string-like types,
    // and we are not a vector create a count-prefixed
    // buffer.
    switch (dwType )
    {
      case VT_LPSTR:          // null terminated string
        pValueOrig = pValue;
        pValue = CountPrefixedStringA( (LPSTR)pValueOrig );
        pCur = (LPBYTE)pValue;
      break;

      case VT_BSTR:           // binary string
      case VT_STREAM:         // Name of the stream follows
      case VT_STORAGE:        // Name of the storage follows
      case VT_STREAMED_OBJECT:// Stream contains an object
      case VT_STORED_OBJECT:  // Storage contains an object
        pValueOrig = pValue;
        pValue = CountPrefixedStringT( (LPTSTR)pValueOrig );
        pCur = (LPBYTE)pValue;
      break;

      case VT_LPWSTR:         // UNICODE string
        pValueOrig = pValue;
        pValue = CountPrefixedStringW( (LPWSTR)pValueOrig );
        pCur = (LPBYTE)pValue;
      break;
    }
  }

  // Since a value can be made up of a vector (VT_VECTOR) of
  // items, we first seek through the value, picking out
  // each item, getting it's size.
  //
  cbItem = 0;        // Size of the current item
  while (nReps--)
  {
    switch (dwType)
    {
      case VT_EMPTY:          // nothing
        cbItem = 0;
      break;

      case VT_I2:             // 2 byte signed int
      case VT_BOOL:           // True=-1, False=0
        cbItem = 2;
      break;

      case VT_I4:             // 4 byte signed int
      case VT_R4:             // 4 byte real
        cbItem = 4;
      break;

      case VT_R8:             // 8 byte real
      case VT_CY:             // currency
      case VT_DATE:           // date
      case VT_I8:             // signed 64-bit int
      case VT_FILETIME:       // FILETIME
        cbItem = 8;
      break;

      case VT_CLSID:          // A Class ID
        cbItem = sizeof(CLSID);
      break;

#ifndef _UNICODE
      case VT_BSTR:           // binary string
      case VT_STREAM:         // Name of the stream follows
      case VT_STORAGE:        // Name of the storage follows
      case VT_STREAMED_OBJECT:// Stream contains an object
      case VT_STORED_OBJECT:  // Storage contains an object
      case VT_STREAMED_PROPSET:// Stream contains a propset
      case VT_STORED_PROPSET: // Storage contains a propset
#endif // _UNICODE
      case VT_LPSTR:          // null terminated string
      case VT_BLOB_OBJECT:    // Blob contains an object
      case VT_BLOB_PROPSET:   // Blob contains a propset
      case VT_BLOB:           // Length prefixed bytes
      case VT_CF:             // Clipboard format
        // Get the DWORD that gives us the size, making
        // sure we increment cbValue.
        cbItem = *(LPDWORD)pCur;
        cb = sizeof(cbItem);
        pCur += cb;
        cbValue += cb;
      break;

#ifdef _UNICODE
      case VT_BSTR:           // binary string
      case VT_STREAM:         // Name of the stream follows
      case VT_STORAGE:        // Name of the storage follows
      case VT_STREAMED_OBJECT:// Stream contains an object
      case VT_STORED_OBJECT:  // Storage contains an object
      case VT_STREAMED_PROPSET:// Stream contains a propset
      case VT_STORED_PROPSET: // Storage contains a propset
#endif // _UNICODE
      case VT_LPWSTR:         // UNICODE string
        cbItem = *(LPDWORD)pCur * sizeof(WCHAR);
        cb = sizeof( cbItem );
        pCur += cb;
        cbValue += cb;
      break;
      case VT_VARIANT:        // VARIANT*
      break;

      default:
        if (pValueOrig)
          free( pValue );
        return FALSE;
    }

    // Add 'cb' to cbItem before seeking...
    //
    // Seek to the next item
    pCur += cbItem;
    cbValue += cbItem;
  }

  if (NULL == AllocValue(cbValue))
  {
    TRACE0("CProperty::AllocValue failed");
    return FALSE;
  }
  memcpy_s( m_pValue, (int)cbValue, pValue, (int)cbValue );

  if (pValueOrig)
    free( pValue );

  return TRUE;
}

BOOL CProperty::Set | ( | DWORD | dwID,
 |  | const LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |

Definition at line 171 of file propset.cpp.

{
  m_dwType = dwType;
  m_dwPropID = dwID;

  return Set( pValue );
}

BOOL CProperty::Set | ( | DWORD | dwID,
 |  | const LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |
void CProperty::SetID ( DWORD dwPropID )

Definition at line 449 of file propset.cpp.

{    m_dwPropID = dwPropID;   }

void CProperty::SetID ( DWORD dwPropID )
void CProperty::SetType ( DWORD dwType )

Definition at line 443 of file propset.cpp.

{   m_dwType = dwType; }

void CProperty::SetType ( DWORD dwType )
BOOL CProperty::WriteToStream ( IStream * pIStream )

Definition at line 455 of file propset.cpp.

{
  ULONG           cb = 0;
  ULONG           cbTotal; // Total size of the whole value
  DWORD           dwType = m_dwType;
  DWORD           nReps;
  LPBYTE          pValue;
  LPBYTE          pCur;
  BOOL            bSuccess = FALSE;
  BYTE            b = 0;

  nReps = 1;
  pValue = (LPBYTE)m_pValue;
  pCur = pValue;
  cbTotal = 0;
  if (m_dwType & VT_VECTOR)
  {
    // Value is a DWORD count of elements followed by
    // that many repititions of the value.
    //
    nReps = *(LPDWORD)pCur;
    cbTotal = sizeof(DWORD);
    pCur += cbTotal;
    dwType &= ~VT_VECTOR;
  }

#ifdef _UNICODE
  switch (dwType)
  {
    case VT_BSTR:           // binary string
    case VT_STREAM:         // Name of the stream follows
    case VT_STORAGE:        // Name of the storage follows
    case VT_STREAMED_OBJECT:// Stream contains an object
    case VT_STORED_OBJECT:  // Storage contains an object
    case VT_STREAMED_PROPSET:// Stream contains a propset
    case VT_STORED_PROPSET: // Storage contains a propset
      pValue = ConvertStringProp(pCur, m_dwType, nReps, sizeof(char));
      if (m_dwType & VT_VECTOR)
        pCur = pValue + sizeof(DWORD);
    break;
  }
#endif // _UNICODE

  // Figure out how big the data is.
  while (nReps--)
  {
    switch (dwType)
    {
      case VT_EMPTY:          // nothing
        cb = 0;
      break;

      case VT_I2:             // 2 byte signed int
      case VT_BOOL:           // True=-1, False=0
        cb = 2;
      break;

      case VT_I4:             // 4 byte signed int
      case VT_R4:             // 4 byte real
        cb = 4;
      break;

      case VT_R8:             // 8 byte real
      case VT_CY:             // currency
      case VT_DATE:           // date
      case VT_I8:             // signed 64-bit int
      case VT_FILETIME:       // FILETIME
        cb = 8;
      break;

      case VT_LPSTR:          // null terminated string
      case VT_BSTR:           // binary string
      case VT_STREAM:         // Name of the stream follows
      case VT_STORAGE:        // Name of the storage follows
      case VT_STREAMED_OBJECT:// Stream contains an object
      case VT_STORED_OBJECT:  // Storage contains an object
      case VT_STREAMED_PROPSET:// Stream contains a propset
      case VT_STORED_PROPSET: // Storage contains a propset
      case VT_BLOB:           // Length prefixed bytes
      case VT_BLOB_OBJECT:    // Blob contains an object
      case VT_BLOB_PROPSET:   // Blob contains a propset
      case VT_CF:             // Clipboard format
        cb = sizeof(DWORD) + *(LPDWORD)pCur;
      break;

      case VT_LPWSTR:         // UNICODE string
        cb = sizeof(DWORD) + (*(LPDWORD)pCur * sizeof(WCHAR));
      break;

      case VT_CLSID:          // A Class ID
        cb = sizeof(CLSID);
      break;

      case VT_VARIANT:        // VARIANT*
      break;

      default:
        return FALSE;
    }

    pCur += cb;
    cbTotal+= cb;
  }

  // Write the type
  pIStream->Write((LPVOID)&m_dwType, sizeof(m_dwType), &cb);
  if (cb != sizeof(m_dwType))
    goto Cleanup;

  // Write the value
  pIStream->Write((LPVOID)pValue, cbTotal, &cb);
  if (cb != cbTotal)
    goto Cleanup;

  // Make sure we are 32 bit aligned
  cbTotal = (((cbTotal + 3) >> 2) << 2) - cbTotal;
  while (cbTotal--)
  {
    pIStream->Write((LPVOID)&b, 1, &cb);
    if (cb != sizeof(BYTE))
      goto Cleanup;
  }

  bSuccess = TRUE;

Cleanup:
  if (pValue != m_pValue)
    free(pValue);

  return bSuccess;
}

BOOL CProperty::WriteToStream ( IStream * pIStream )

Friends And Related Function Documentation

CPropertySection [friend]

Definition at line 49 of file propset.h.

CPropertySet [friend]

Definition at line 48 of file propset.h.

Member Data Documentation

DWORD CProperty::m_dwPropID [private]

Definition at line 74 of file propset.h.

DWORD CProperty::m_dwType [private]

Definition at line 75 of file propset.h.

LPVOID CProperty::m_pValue [private]

Definition at line 76 of file propset.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/propset.h
  • vc2008fp/DrawClient/propset.h
  • ole/drawcli/propset.cpp
  • vc2008fp/DrawClient/propset.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertyBag Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CPropertyBag Class Reference

#include "PropBag.H"

List of all members.

Public Member Functions

CPropertyBag ()
~CPropertyBag ()
POSITION | GetFirstItemPosition () const
CPropertyBagItem * | GetNextItem (POSITION &posItem) const
STDMETHOD() | QueryInterface (REFIID iid, void **ppInterface)
STDMETHOD() | Read (LPCOLESTR pszPropName, VARIANT *pvarValue, IErrorLog *pErrorLog)
STDMETHOD_ (ULONG, AddRef)()
STDMETHOD_ (ULONG, Release)()
STDMETHOD() | Write (LPCOLESTR pszPropName, VARIANT *pvarValue)

Protected Attributes

CPropertyBagItemList m_lpItems
ULONG | m_nRefCount

Detailed Description

Definition at line 25 of file PropBag.H.

Constructor & Destructor Documentation

CPropertyBag::CPropertyBag ( )

Definition at line 28 of file PropBag.Cpp.

                           :
   m_nRefCount( 0 )
{
}

CPropertyBag::~CPropertyBag ( )

Definition at line 33 of file PropBag.Cpp.

{
   CPropertyBagItem* pItem;

   while( !m_lpItems.IsEmpty() )
   {
    pItem = m_lpItems.RemoveHead();
    delete pItem;
   }
}

Member Function Documentation

POSITION CPropertyBag::GetFirstItemPosition ( ) const

Definition at line 44 of file PropBag.Cpp.

{
   return( m_lpItems.GetHeadPosition() );
}

CPropertyBagItem * CPropertyBag::GetNextItem ( POSITION & posItem ) const

Definition at line 49 of file PropBag.Cpp.

{
   return( m_lpItems.GetNext( posItem ) );
}

STDMETHODIMP CPropertyBag::QueryInterface | ( | REFIID | iid,
 |  | void ** | ppInterface
 | ) |  |

Definition at line 76 of file PropBag.Cpp.

{
   ENSURE( ppInterface != NULL );
   *ppInterface = NULL;

   if( iid == IID_IUnknown )
   {
    *ppInterface = (IUnknown*)this;
   }
   else if( iid == IID_IPropertyBag )
   {
    *ppInterface = (IPropertyBag*)this;
   }

   if( *ppInterface != NULL )
   {
    AddRef();
    return( S_OK );
   }
   else
   {
    return( E_NOINTERFACE );
   }
}

STDMETHODIMP CPropertyBag::Read | ( | LPCOLESTR | pszPropName,
 |  | VARIANT * | pvarValue,
 |  | IErrorLog * | pErrorLog
 | ) |  |

Definition at line 101 of file PropBag.Cpp.

{
   POSITION posItem;
   CPropertyBagItem* pItem;
   HRESULT hResult;
   EXCEPINFO error;

   if( pszPropName == NULL )
   {
    return( E_POINTER );
   }
   if( pvarValue == NULL )
   {
    return( E_POINTER );
   }

   memset( &error, 0, sizeof( error ) );

   COLE2CT strPropName( pszPropName );

   posItem = m_lpItems.GetHeadPosition();
   while( posItem != NULL )
   {
    pItem = m_lpItems.GetNext( posItem );
    if( pItem->m_strName == strPropName )
    {
     // We found the property.
     if( pvarValue->vt == VT_EMPTY )
     {
      hResult = VariantCopy( pvarValue, &pItem->m_varValue );
      if( FAILED( hResult ) )
      {
         if( pErrorLog != NULL )
         {
          error.scode = hResult;
          pErrorLog->AddError( pszPropName, &error );
         }
         return( E_FAIL );
      }
     }
     else
     {
      hResult = VariantChangeType( pvarValue, &pItem->m_varValue, 0,
         pvarValue->vt );
      if( FAILED( hResult ) )
      {
         if( pErrorLog != NULL )
         {
          error.scode = hResult;
          pErrorLog->AddError( pszPropName, &error );
         }
         return( E_FAIL );
      }
     }
     return( S_OK );
    }
   }

   return( E_INVALIDARG );
}

CPropertyBag::STDMETHOD_ | ( | ULONG | ,
 |  | Release |
 | ) |  |
CPropertyBag::STDMETHOD_ | ( | ULONG | ,
 |  | AddRef |
 | ) |  |
STDMETHODIMP CPropertyBag::Write | ( | LPCOLESTR | pszPropName,
 |  | VARIANT * | pvarValue
 | ) |  |

Definition at line 163 of file PropBag.Cpp.

{

   CPropertyBagItem* pItem;

   if( (pszPropName == NULL) || (pvarValue == NULL) )
   {
    return( E_POINTER );
   }

   pItem = new CPropertyBagItem( pszPropName, pvarValue );
   if( pItem == NULL )
   {
    return( E_OUTOFMEMORY );
   }

   m_lpItems.AddTail( pItem );

   return( S_OK );
}

Member Data Documentation

CPropertyBagItemList CPropertyBag::m_lpItems [protected]

Definition at line 49 of file PropBag.H.

ULONG CPropertyBag::m_nRefCount [protected]

Definition at line 48 of file PropBag.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/PropBag.H
  • ole/TstCon/PropBag.Cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertyBagDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CPropertyBagDlg Class Reference

#include "PBagDg.H"

List of all members.

Public Types

enum | { IDD = IDD_PROPERTYBAG }

Public Member Functions

CPropertyBagDlg (CPropertyBag *pPropertyBag, CWnd *pParent=NULL)

Public Attributes

CListCtrl | m_lvProperties

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()

Protected Attributes

CPropertyBag * m_pPropertyBag

Detailed Description

Definition at line 22 of file PBagDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file PBagDg.H.

{ IDD = IDD_PROPERTYBAG };

Constructor & Destructor Documentation

CPropertyBagDlg::CPropertyBagDlg | ( | CPropertyBag * | pPropertyBag,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 36 of file PBagDg.Cpp.

                                                                            :
   CDialog( CPropertyBagDlg::IDD, pParent ),
   m_pPropertyBag( pPropertyBag )
{
   ASSERT( m_pPropertyBag != NULL );

  //{{AFX_DATA_INIT(CPropertyBagDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CPropertyBagDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 48 of file PBagDg.Cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CPropertyBagDlg)
  DDX_Control(pDX, IDC_PROPERTIES, m_lvProperties);
  //}}AFX_DATA_MAP
}

void CPropertyBagDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 135 of file PBagDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CPropertyBagDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 127 of file PBagDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CPropertyBagDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 67 of file PBagDg.Cpp.

{
   POSITION posItem;
   CPropertyBagItem* pItem;
   int iItem;
   int iLVItem;
   COleVariant varString;
   CString strColumnTitle;
   CString str;

   CDialog::OnInitDialog();

   // Add the appropriate columns to the parameter list control.
   LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_PROPERTY);
   m_lvProperties.InsertColumn( 0, strColumnTitle, LVCFMT_LEFT, 100 );
   LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_VALUE);
   m_lvProperties.InsertColumn( 1, strColumnTitle, LVCFMT_LEFT, 100 );
   LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_TYPE);
   m_lvProperties.InsertColumn( 2, strColumnTitle, LVCFMT_LEFT, 100 );

   iItem = 0;
   posItem = m_pPropertyBag->GetFirstItemPosition();
   while( posItem != NULL )
   {
    pItem = m_pPropertyBag->GetNextItem( posItem );
    iLVItem = m_lvProperties.InsertItem( iItem, pItem->m_strName );
    m_lvProperties.SetItemText( iLVItem, 0, pItem->m_strName );

    TRY
    {
     varString.ChangeType( VT_BSTR, pItem->m_varValue );
     str = varString.bstrVal;
    }
    CATCH( COleException, e )
    {
    LOAD_STRING_FROM_RESOURCE(str, IDS_UNABLETOREPRESENT);
    }
    END_CATCH

    m_lvProperties.SetItemText( iLVItem, 1, str );
    m_lvProperties.SetItemText( iLVItem, 2, VTToString(
     pItem->m_varValue.vt ) );

    iItem++;
   }

   AutoSetColumnWidth( m_lvProperties, 0 );
   AutoSetColumnWidth( m_lvProperties, 1 );
   AutoSetColumnWidth( m_lvProperties, 2 );

  return( TRUE );
}

Member Data Documentation

CListCtrl CPropertyBagDlg::m_lvProperties

Definition at line 31 of file PBagDg.H.

CPropertyBag* CPropertyBagDlg::m_pPropertyBag [protected]

Definition at line 44 of file PBagDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/PBagDg.H
  • ole/TstCon/PBagDg.Cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertyBagItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Private Member Functions

CPropertyBagItem Class Reference

#include "PropBag.H"

List of all members.

Public Member Functions

CPropertyBagItem (LPCOLESTR pszName, VARIANT *pvarValue)

Public Attributes

CString | m_strName
COleVariant | m_varValue

Private Member Functions

DECLARE_DYNAMIC (CPropertyBagItem)

Detailed Description

Definition at line 10 of file PropBag.H.

Constructor & Destructor Documentation

CPropertyBagItem::CPropertyBagItem | ( | LPCOLESTR | pszName,
 |  | VARIANT * | pvarValue
 | ) |  |

Definition at line 21 of file PropBag.Cpp.

{
   m_strName = pszName;
   m_varValue = pvarValue;
}

Member Function Documentation

CPropertyBagItem::DECLARE_DYNAMIC ( CPropertyBagItem ) [private]

Member Data Documentation

CString CPropertyBagItem::m_strName

Definition at line 19 of file PropBag.H.

COleVariant CPropertyBagItem::m_varValue

Definition at line 20 of file PropBag.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/PropBag.H
  • ole/TstCon/PropBag.Cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertyChangesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPropertyChangesPage Class Reference

#include "PChngPg.H"

List of all members.

Public Types

enum | { IDD = IDD_CONTROLLOGGING_PROPERTYCHANGES }

Public Member Functions

CPropertyChangesPage ()
~CPropertyChangesPage ()

Public Attributes

CStringArray | m_astrPropertyNames
CUIntArray | m_atLogFlags
CCheckListBox | m_lbProperties

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 22 of file PChngPg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 33 of file PChngPg.H.

{ IDD = IDD_CONTROLLOGGING_PROPERTYCHANGES };

Constructor & Destructor Documentation

CPropertyChangesPage::CPropertyChangesPage ( )

Definition at line 25 of file PChngPg.Cpp.

                                           :
   CPropertyPage( CPropertyChangesPage::IDD )
{
   m_psp.dwFlags &= ~PSP_HASHELP;

  //{{AFX_DATA_INIT(CPropertyChangesPage)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

CPropertyChangesPage::~CPropertyChangesPage ( )

Definition at line 35 of file PChngPg.Cpp.

{
}

Member Function Documentation

void CPropertyChangesPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 39 of file PChngPg.Cpp.

{
   int iProperty;
   int iItem;

  CPropertyPage::DoDataExchange( pDX );
  //{{AFX_DATA_MAP(CPropertyChangesPage)
  DDX_Control(pDX, IDC_PROPERTIES_CHANGES, m_lbProperties);
  //}}AFX_DATA_MAP

   if( m_lbProperties.GetCount() > 0 )
   {
    for( iProperty = 0; iProperty < m_astrPropertyNames.GetSize();
     iProperty++ )
    {
     iItem = m_lbProperties.FindStringExact( -1, m_astrPropertyNames[
      iProperty] );
     ASSERT( iItem != LB_ERR );
     if( pDX->m_bSaveAndValidate )
     {
      m_atLogFlags[iProperty] = m_lbProperties.GetCheck( iItem );
     }
     else
     {
      m_lbProperties.SetCheck( iItem, m_atLogFlags[iProperty] != FALSE );
     }
    }
   }
}

void CPropertyChangesPage::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 111 of file PChngPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CPropertyChangesPage::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 103 of file PChngPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CPropertyChangesPage::OnInitDialog ( ) [protected, virtual]

Definition at line 80 of file PChngPg.Cpp.

{
   int iProperty;

  CPropertyPage::OnInitDialog();

   for( iProperty = 0; iProperty < m_astrPropertyNames.GetSize(); iProperty++ )
   {
    m_lbProperties.AddString( m_astrPropertyNames[iProperty] );
   }

   UpdateData( FALSE );

  return( TRUE );
}

Member Data Documentation

CStringArray CPropertyChangesPage::m_astrPropertyNames

Definition at line 37 of file PChngPg.H.

CUIntArray CPropertyChangesPage::m_atLogFlags

Definition at line 38 of file PChngPg.H.

CCheckListBox CPropertyChangesPage::m_lbProperties

Definition at line 34 of file PChngPg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/PChngPg.H
  • ole/TstCon/PChngPg.Cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertyEditRequestsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPropertyEditRequestsPage Class Reference

#include "PEdReqPg.H"

List of all members.

Classes

class | CPropertyInfo

Public Types

enum | { IDD = IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS }

Public Member Functions

CPropertyEditRequestsPage ()

Public Attributes

CArray< CPropertyInfo,
CPropertyInfo & > 		m_aProperties
int | m_iAllowEdit
CCheckListBox | m_lbProperties

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
int | GetSelectionResponse ()
afx_msg void | OnAlways ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()
afx_msg void | OnNever ()
afx_msg void | OnPrompt ()
afx_msg void | OnPropertiesSelChange ()
afx_msg void | OnSelectAll ()
void | SetSelectionResponse (int iResponse)

Detailed Description

Definition at line 22 of file PEdReqPg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 46 of file PEdReqPg.H.

{ IDD = IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS };

Constructor & Destructor Documentation

CPropertyEditRequestsPage::CPropertyEditRequestsPage ( )

Definition at line 39 of file PEdReqPg.Cpp.

                                                     :
   CPropertyPage( CPropertyEditRequestsPage::IDD )
{
   m_psp.dwFlags &= ~PSP_HASHELP;

  //{{AFX_DATA_INIT(CPropertyEditRequestsPage)
  m_iAllowEdit = -1;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CPropertyEditRequestsPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 50 of file PEdReqPg.Cpp.

{
   int iProperty;
   int iItem;

  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CPropertyEditRequestsPage)
  DDX_Control(pDX, IDC_PROPERTIES_EDITREQUESTS, m_lbProperties);
  DDX_Radio(pDX, IDC_ALWAYS, m_iAllowEdit);
  //}}AFX_DATA_MAP

   if( m_lbProperties.GetCount() > 0 )
   {
    for( iItem = 0; iItem < m_lbProperties.GetCount(); iItem++ )
    {
     iProperty = (int)m_lbProperties.GetItemData( iItem );
     if( pDX->m_bSaveAndValidate )
     {
      m_aProperties[iProperty].m_tLogged = m_lbProperties.GetCheck(
         iItem );
     }
     else
     {
      m_lbProperties.SetCheck( iItem, m_aProperties[
         iProperty].m_tLogged != FALSE );
     }
    }
   }
}

int CPropertyEditRequestsPage::GetSelectionResponse ( ) [protected]

Definition at line 163 of file PEdReqPg.Cpp.

{
   int iProperty;
   int iSelectedItem;
   int* piSelectedItems;
   int iResponse;
   int nSelectedItems;
   int nItemsInBuffer;
   int iMultiResponse;

   nSelectedItems = m_lbProperties.GetSelCount();
   if( nSelectedItems == 0 )
   {
    iMultiResponse = -1;
   }
   else
   {
    if (nSelectedItems < 0 || nSelectedItems > (INT_MAX / sizeof(int)))
    {
    iMultiResponse = -1;
    }
    else
    {
    piSelectedItems = (int*)_malloca( nSelectedItems*sizeof( int ) );
    nItemsInBuffer = m_lbProperties.GetSelItems( nSelectedItems,
      piSelectedItems );
    ASSERT( nItemsInBuffer == nSelectedItems );
    iProperty = (int)m_lbProperties.GetItemData( piSelectedItems[0] );
    iMultiResponse = m_aProperties[iProperty].m_iResponse;
    for( iSelectedItem = 1; iSelectedItem < nSelectedItems; iSelectedItem++ )
    {
      iProperty = (int)m_lbProperties.GetItemData( piSelectedItems[
        iSelectedItem] );
      iResponse = m_aProperties[iProperty].m_iResponse;
      if( iResponse != iMultiResponse )
      {
        iMultiResponse = -1;
      }
    }
    _freea(piSelectedItems);
    }
   }

   return( iMultiResponse );
}

void CPropertyEditRequestsPage::OnAlways ( ) [protected]

Definition at line 234 of file PEdReqPg.Cpp.

{
   SetSelectionResponse( REQUESTEDIT_ALWAYS );
}

void CPropertyEditRequestsPage::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 278 of file PEdReqPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CPropertyEditRequestsPage::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 270 of file PEdReqPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CPropertyEditRequestsPage::OnInitDialog ( ) [protected, virtual]

Definition at line 96 of file PEdReqPg.Cpp.

{
   int iProperty;
   int iItem;

  CDialog::OnInitDialog();

   for( iProperty = 0; iProperty < m_aProperties.GetSize(); iProperty++ )
   {
    iItem = m_lbProperties.AddString( m_aProperties[iProperty].m_strName );
    m_lbProperties.SetItemData( iItem, iProperty );
   }

   UpdateData( FALSE );

   OnPropertiesSelChange();

  return( TRUE );
}

void CPropertyEditRequestsPage::OnNever ( ) [protected]

Definition at line 239 of file PEdReqPg.Cpp.

{
   SetSelectionResponse( REQUESTEDIT_NEVER );
}

void CPropertyEditRequestsPage::OnPrompt ( ) [protected]

Definition at line 244 of file PEdReqPg.Cpp.

{
   SetSelectionResponse( REQUESTEDIT_PROMPT );
}

void CPropertyEditRequestsPage::OnPropertiesSelChange ( ) [protected]

Definition at line 116 of file PEdReqPg.Cpp.

{
   int iResponse;
   CWnd* pAlways;
   CWnd* pNever;
   CWnd* pPrompt;

   pAlways = GetDlgItem( IDC_ALWAYS );
   pNever = GetDlgItem( IDC_NEVER );
   pPrompt = GetDlgItem( IDC_PROMPT );

   if( m_lbProperties.GetSelCount() == 0 )
   {
    // Nothing is selected, so disable the radio buttons.
    pAlways->EnableWindow( FALSE );
    pNever->EnableWindow( FALSE );
    pPrompt->EnableWindow( FALSE );
   }
   else
   {
    pAlways->EnableWindow( TRUE );
    pNever->EnableWindow( TRUE );
    pPrompt->EnableWindow( TRUE );
   }

   iResponse = GetSelectionResponse();

   pAlways->SendMessage( BM_SETCHECK, 0, 0 );
   pNever->SendMessage( BM_SETCHECK, 0, 0 );
   pPrompt->SendMessage( BM_SETCHECK, 0, 0 );

   switch( iResponse )
   {
   case REQUESTEDIT_ALWAYS:
    pAlways->SendMessage( BM_SETCHECK, 1, 0 );
    break;

   case REQUESTEDIT_NEVER:
    pNever->SendMessage( BM_SETCHECK, 1, 0 );
    break;

   case REQUESTEDIT_PROMPT:
    pPrompt->SendMessage( BM_SETCHECK, 1, 0 );
    break;
   }
}

void CPropertyEditRequestsPage::OnSelectAll ( ) [protected]

Definition at line 249 of file PEdReqPg.Cpp.

{
   int nItems;

   nItems = m_lbProperties.GetCount();
   m_lbProperties.SelItemRange( TRUE, 0, nItems-1 );

   OnPropertiesSelChange();
}

void CPropertyEditRequestsPage::SetSelectionResponse ( int iResponse ) [protected]

Definition at line 209 of file PEdReqPg.Cpp.

{
   int iSelectedItem;
   int* piSelectedItems;
   int nSelectedItems;
   int nItemsInBuffer;

   ASSERT( iResponse != -1 );

   nSelectedItems = m_lbProperties.GetSelCount();
   if ((nSelectedItems > 0) && (nSelectedItems < (INT_MAX / sizeof(int))))
   {
    piSelectedItems = (int*)_malloca( nSelectedItems*sizeof( int ) );
    nItemsInBuffer = m_lbProperties.GetSelItems( nSelectedItems,
     piSelectedItems );
    ASSERT( nItemsInBuffer == nSelectedItems );
    for( iSelectedItem = 0; iSelectedItem < nSelectedItems; iSelectedItem++ )
    {
     m_aProperties[piSelectedItems[iSelectedItem]].m_iResponse = iResponse;
    }
    _freea(piSelectedItems);
   }

}

Member Data Documentation

CArray< CPropertyInfo, CPropertyInfo& > CPropertyEditRequestsPage::m_aProperties

Definition at line 51 of file PEdReqPg.H.

int CPropertyEditRequestsPage::m_iAllowEdit

Definition at line 48 of file PEdReqPg.H.

CCheckListBox CPropertyEditRequestsPage::m_lbProperties

Definition at line 47 of file PEdReqPg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/PEdReqPg.H
  • ole/TstCon/PEdReqPg.Cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertyEditRequestsPage::CPropertyInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CPropertyEditRequestsPage
  • CPropertyEditRequestsPage::CPropertyInfo
Public Member Functions | Public Attributes

CPropertyEditRequestsPage::CPropertyInfo Class Reference

#include "PEdReqPg.H"

List of all members.

Public Member Functions

CPropertyInfo ()
CPropertyInfo (LPCTSTR pszName, BOOL tLogged, int iResponse)

Public Attributes

int | m_iResponse
CString | m_strName
BOOL | m_tLogged

Detailed Description

Definition at line 28 of file PEdReqPg.H.

Constructor & Destructor Documentation

CPropertyEditRequestsPage::CPropertyInfo::CPropertyInfo ( )

Definition at line 20 of file PEdReqPg.Cpp.

                                                      :
   m_tLogged( TRUE ),
   m_iResponse( REQUESTEDIT_ALWAYS )
{
}

CPropertyEditRequestsPage::CPropertyInfo::CPropertyInfo | ( | LPCTSTR | pszName,
 |  | BOOL | tLogged,
 |  | int | iResponse
 | ) |  |

Definition at line 26 of file PEdReqPg.Cpp.

                                 :
   m_strName( pszName ),
   m_tLogged( tLogged ),
   m_iResponse( iResponse )
{
}

Member Data Documentation

int CPropertyEditRequestsPage::CPropertyInfo::m_iResponse

Definition at line 37 of file PEdReqPg.H.

CString CPropertyEditRequestsPage::CPropertyInfo::m_strName

Definition at line 35 of file PEdReqPg.H.

BOOL CPropertyEditRequestsPage::CPropertyInfo::m_tLogged

Definition at line 36 of file PEdReqPg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/PEdReqPg.H
  • ole/TstCon/PEdReqPg.Cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertySection Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes | Friends

CPropertySection Class Reference

#include "propset.h"

List of all members.

Public Member Functions

CPropertySection (void)
CPropertySection (CLSID FormatID)
CPropertySection (void)
CPropertySection (CLSID FormatID)
~CPropertySection ()
~CPropertySection ()
void | AddProperty (CProperty *pProp)
void | AddProperty (CProperty *pProp)
LPVOID | Get (DWORD dwPropID)
LPVOID | Get (DWORD dwPropID)
LPVOID | Get (DWORD dwPropID, DWORD *pcb)
LPVOID | Get (DWORD dwPropID, DWORD *pcb)
DWORD | GetCount (void)
DWORD | GetCount (void)
CLSID | GetFormatID (void)
CLSID | GetFormatID (void)
BOOL | GetID (LPCTSTR pszName, DWORD *pdwPropID)
BOOL | GetID (LPCTSTR pszName, DWORD *pdwPropID)
CObList * | GetList (void)
CObList * | GetList (void)
CProperty * | GetProperty (DWORD dwPropID)
CProperty * | GetProperty (DWORD dwPropID)
LPCTSTR | GetSectionName (void)
LPCTSTR | GetSectionName (void)
DWORD | GetSize (void)
DWORD | GetSize (void)
BOOL | ReadFromStream (IStream *pIStream, LARGE_INTEGER liPropSet)
BOOL | ReadFromStream (IStream *pIStream, LARGE_INTEGER liPropSet)
BOOL | ReadNameDictFromStream (IStream *pIStream)
BOOL | ReadNameDictFromStream (IStream *pIStream)
void | Remove (DWORD dwPropID)
void | Remove (DWORD dwPropID)
void | RemoveAll ()
void | RemoveAll ()
BOOL | Set (DWORD dwPropID, LPVOID pValue, DWORD dwType)
BOOL | Set (DWORD dwPropID, LPVOID pValue)
BOOL | Set (DWORD dwPropID, LPVOID pValue, DWORD dwType)
BOOL | Set (DWORD dwPropID, LPVOID pValue)
void | SetFormatID (CLSID FormatID)
void | SetFormatID (CLSID FormatID)
BOOL | SetName (DWORD dwPropID, LPCTSTR pszName)
BOOL | SetName (DWORD dwPropID, LPCTSTR pszName)
BOOL | SetSectionName (LPCTSTR pszName)
BOOL | SetSectionName (LPCTSTR pszName)
BOOL | WriteNameDictToStream (IStream *pIStream)
BOOL | WriteNameDictToStream (IStream *pIStream)
BOOL | WriteToStream (IStream *pIStream)
BOOL | WriteToStream (IStream *pIStream)

Private Attributes

CLSID | m_FormatID
CMapStringToPtr | m_NameDict
CObList | m_PropList
SECTIONHEADER m_SH
CString | m_strSectionName

Friends

class | CProperty
class | CPropertySet

Detailed Description

Definition at line 89 of file propset.h.

Constructor & Destructor Documentation

CPropertySection::CPropertySection ( void )

Definition at line 765 of file propset.cpp.

{
  m_FormatID = GUID_NULL;
  m_SH.cbSection = 0;
  m_SH.cProperties = 0;
}

CPropertySection::CPropertySection ( CLSID FormatID )

Definition at line 772 of file propset.cpp.

{
  m_FormatID = FormatID;
  m_SH.cbSection = 0;
  m_SH.cProperties = 0;
}

CPropertySection::~CPropertySection ( void )

Definition at line 779 of file propset.cpp.

{
  RemoveAll();
  return;
}

CPropertySection::CPropertySection ( void )
CPropertySection::CPropertySection ( CLSID FormatID )
CPropertySection::~CPropertySection ( )

Member Function Documentation

void CPropertySection::AddProperty ( CProperty * pProp )

Definition at line 877 of file propset.cpp.

{
  m_PropList.AddTail( pProp );
  m_SH.cProperties++;
}

void CPropertySection::AddProperty ( CProperty * pProp )
LPVOID CPropertySection::Get | ( | DWORD | dwPropID,
 |  | DWORD * | pcb
 | ) |  |

Definition at line 822 of file propset.cpp.

{
  CProperty* pProp = GetProperty(dwPropID);
  if (pProp)
  {
    ASSERT_VALID(pProp);
    return pProp->Get(pcb);
  }
  else
    return NULL;
}

LPVOID CPropertySection::Get | ( | DWORD | dwPropID,
 |  | DWORD * | pcb
 | ) |  |
LPVOID CPropertySection::Get ( DWORD dwPropID )
LPVOID CPropertySection::Get ( DWORD dwPropID )

Definition at line 819 of file propset.cpp.

{   return Get( dwPropID, (DWORD*)NULL );  }

DWORD CPropertySection::GetCount ( void )
DWORD CPropertySection::GetCount ( void )

Definition at line 886 of file propset.cpp.

{   return (DWORD)m_PropList.GetCount();  }

CLSID CPropertySection::GetFormatID ( void )

Definition at line 785 of file propset.cpp.

{   return m_FormatID; }

CLSID CPropertySection::GetFormatID ( void )
BOOL CPropertySection::GetID | ( | LPCTSTR | pszName,
 |  | DWORD * | pdwPropID
 | ) |  |
BOOL CPropertySection::GetID | ( | LPCTSTR | pszName,
 |  | DWORD * | pdwPropID
 | ) |  |

Definition at line 1078 of file propset.cpp.

{
  CString strName(pszName);
  strName.MakeLower();        // Dictionary stores all names in lowercase

  void* pvID;
  if (m_NameDict.Lookup(strName, pvID))
  {
    *pdwPropID = (DWORD)pvID;
    return TRUE;
  }

  // Failed to find entry in dictionary
  return FALSE;
}

CObList* CPropertySection::GetList ( void )
CObList * CPropertySection::GetList ( void )

Definition at line 889 of file propset.cpp.

{   return &m_PropList;  }

CProperty * CPropertySection::GetProperty ( DWORD dwPropID )

Definition at line 862 of file propset.cpp.

{
  POSITION pos = m_PropList.GetHeadPosition();
  ASSERT_VALID(&m_PropList);
  CProperty* pProp;
  while (pos != NULL)
  {
    pProp= (CProperty*)m_PropList.GetNext( pos );
    ASSERT_VALID(pProp);
    if (pProp->m_dwPropID == dwPropID)
      return pProp;
  }
  return NULL;
}

CProperty* CPropertySection::GetProperty ( DWORD dwPropID )
LPCTSTR CPropertySection::GetSectionName ( void )

Definition at line 1260 of file propset.cpp.

{
  return (LPCTSTR)m_strSectionName;
}

LPCTSTR CPropertySection::GetSectionName ( void )
DWORD CPropertySection::GetSize ( void )
DWORD CPropertySection::GetSize ( void )

Definition at line 883 of file propset.cpp.

{   return m_SH.cbSection; }

BOOL CPropertySection::ReadFromStream | ( | IStream * | pIStream,
 |  | LARGE_INTEGER | liPropSet
 | ) |  |

Definition at line 1009 of file propset.cpp.

{
  ULONG               cb;
  PROPERTYIDOFFSET    pido;
  ULONG               cProperties;
  LPSTREAM            pIStrPIDO;
  ULARGE_INTEGER      ulSectionStart;
  LARGE_INTEGER       li;
  CProperty*          pProp;

  if (m_SH.cProperties || !m_PropList.IsEmpty())
    RemoveAll();

  // pIStream is pointing to the beginning of the section we
  // are to read.  First there is a DWORD that is the count
  // of bytes in this section, then there is a count
  // of properties, followed by a list of propertyID/offset pairs,
  // followed by type/value pairs.
  //
  LISet32( li, 0 );
  pIStream->Seek( li, STREAM_SEEK_CUR, &ulSectionStart );
  pIStream->Read( (LPVOID)&m_SH, sizeof(m_SH), &cb );
  if (cb != sizeof(m_SH))
    return FALSE;

  // Now we're pointing at the first of the PropID/Offset pairs
  // (PIDOs).   To get to each property we use a cloned stream
  // to stay back and point at the PIDOs (pIStrPIDO).  We seek
  // pIStream to each of the Type/Value pairs, creating CProperites
  // and so forth as we go...
  //
  pIStream->Clone( &pIStrPIDO );

  cProperties = m_SH.cProperties;
  while (cProperties--)
  {
    pIStrPIDO->Read( (LPVOID)&pido, sizeof( pido ), &cb );
    if (cb != sizeof(pido))
    {
      pIStrPIDO->Release();
      return FALSE;
    }

    // Do a seek from the beginning of the property set.
    LISet32( li, ulSectionStart.LowPart + pido.dwOffset );
    pIStream->Seek( liPropSet, STREAM_SEEK_SET, NULL );
    pIStream->Seek( li, STREAM_SEEK_CUR, NULL );

    // Now pIStream is at the type/value pair
    if (pido.propertyID != 0)
    {
      pProp = new CProperty( pido.propertyID, NULL, 0 );
      pProp->ReadFromStream( pIStream );
      ASSERT_VALID(pProp);
      m_PropList.AddTail( pProp );
      ASSERT_VALID(&m_PropList);
    }
    else
    {
      ReadNameDictFromStream( pIStream );
    }
  }

  pIStrPIDO->Release();

  return TRUE;
}

BOOL CPropertySection::ReadFromStream | ( | IStream * | pIStream,
 |  | LARGE_INTEGER | liPropSet
 | ) |  |
BOOL CPropertySection::ReadNameDictFromStream ( IStream * pIStream )

Definition at line 1134 of file propset.cpp.

{
  ULONG cb;
  ULONG cbRead = 0;

  // Read dictionary header (count).
  ULONG cProperties = 0;
  pIStream->Read((LPVOID)&cProperties, sizeof(cProperties), &cb);
  if (sizeof(cProperties) != cb)
  {
    TRACE0("Read of dictionary header failed.\n");
    return FALSE;
  }

  ULONG iProp;
  DICTENTRY entry;

  for (iProp = 0; iProp < cProperties; iProp++)
  {
    // Read entry header (dwPropID, cch).
    if (FAILED(pIStream->Read((LPVOID)&entry, sizeof(DICTENTRYHEADER),
      &cbRead)) ||
      (sizeof(DICTENTRYHEADER) != cbRead))
    {
      TRACE0("Read of dictionary entry failed.\n");
      return FALSE;
    }

    // Read entry data (name).

    cb = entry.hdr.cb;

    if (FAILED(pIStream->Read((LPVOID)entry.sz, cb, &cbRead)) ||
      (cbRead != cb))
    {
      TRACE0("Read of dictionary entry failed.\n");
      return FALSE;
    }

    LPTSTR pszName;

#ifdef _UNICODE
    // Persistent form is always ANSI/DBCS.  Convert to Unicode.
    WCHAR wszName[256];
    MultiByteToWideChar(CP_ACP, 0, entry.sz, -1, wszName, 256);
    pszName = wszName;
#else // _UNICODE
    pszName = entry.sz;
#endif // _UNICODE

    // Section's "name" appears first in list and has dwPropID == 0.
    if ((iProp == 0) && (entry.hdr.dwPropID == 0))
      m_strSectionName = pszName;             // Section name
    else
      SetName(entry.hdr.dwPropID, pszName);   // Some other property
  }

  return TRUE;
}

BOOL CPropertySection::ReadNameDictFromStream ( IStream * pIStream )
void CPropertySection::Remove ( DWORD dwPropID )

Definition at line 834 of file propset.cpp.

{
  POSITION pos = m_PropList.GetHeadPosition();
  CProperty*  pProp;
  while( pos != NULL )
  {
    POSITION posRemove = pos;
    pProp = (CProperty*)m_PropList.GetNext( pos );
    if (pProp->m_dwPropID == dwID)
    {
      m_PropList.RemoveAt( posRemove );
      delete pProp;
      m_SH.cProperties--;
      return;
    }
  }
}

void CPropertySection::Remove ( DWORD dwPropID )
void CPropertySection::RemoveAll ( )
void CPropertySection::RemoveAll ( )

Definition at line 852 of file propset.cpp.

{
  POSITION pos = m_PropList.GetHeadPosition();
  while( pos != NULL )
    delete (CProperty*)m_PropList.GetNext( pos );
  m_PropList.RemoveAll();
  m_SH.cProperties = 0;
}

BOOL CPropertySection::Set | ( | DWORD | dwPropID,
 |  | LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |
BOOL CPropertySection::Set | ( | DWORD | dwPropID,
 |  | LPVOID | pValue
 | ) |  |
BOOL CPropertySection::Set | ( | DWORD | dwPropID,
 |  | LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |

Definition at line 791 of file propset.cpp.

{
  CProperty* pProp = GetProperty( dwPropID );
  if (pProp == NULL)
  {
    if ((pProp = new CProperty( dwPropID, pValue, dwType )) != NULL)
      AddProperty( pProp );
    return (pProp != NULL);
  }

  pProp->Set( dwPropID, pValue, dwType );
  return TRUE;
}

BOOL CPropertySection::Set | ( | DWORD | dwPropID,
 |  | LPVOID | pValue
 | ) |  |

Definition at line 805 of file propset.cpp.

{
  // Since no dwType was specified, the property is assumed
  // to exist.   Fail if it does not.
  CProperty* pProp = GetProperty( dwPropID );
  if (pProp != NULL && pProp->m_dwType)
  {
    pProp->Set( dwPropID, pValue, pProp->m_dwType );
    return TRUE;
  }
  else
    return FALSE;
}

void CPropertySection::SetFormatID ( CLSID FormatID )

Definition at line 788 of file propset.cpp.

{   m_FormatID = FormatID; }

void CPropertySection::SetFormatID ( CLSID FormatID )
BOOL CPropertySection::SetName | ( | DWORD | dwPropID,
 |  | LPCTSTR | pszName
 | ) |  |
BOOL CPropertySection::SetName | ( | DWORD | dwPropID,
 |  | LPCTSTR | pszName
 | ) |  |

Definition at line 1094 of file propset.cpp.

{
  BOOL bSuccess = TRUE;
  CString strName(pszName);
  strName.MakeLower();        // Dictionary stores all names in lowercase

  TRY
  {
    void* pDummy;
    BOOL bNameExists = m_NameDict.Lookup(strName, pDummy);

    ASSERT(! bNameExists);  // Property names must be unique.

    if (bNameExists)
      bSuccess = FALSE;
    else
      m_NameDict.SetAt(strName, (void*)dwPropID);
  }
  CATCH (CException, e)
  {
    TRACE0("Failed to add entry to dictionary.\n");
    bSuccess = FALSE;
  }
  END_CATCH

  return bSuccess;
}

BOOL CPropertySection::SetSectionName ( LPCTSTR pszName )

Definition at line 1254 of file propset.cpp.

{
  m_strSectionName = pszName;
  return TRUE;
}

BOOL CPropertySection::SetSectionName ( LPCTSTR pszName )
BOOL CPropertySection::WriteNameDictToStream ( IStream * pIStream )

Definition at line 1221 of file propset.cpp.

{
  ULONG cb;

  // Write dictionary header (count).
  ULONG cProperties = (ULONG)(m_NameDict.GetCount() + 1);
  pIStream->Write((LPVOID)&cProperties, sizeof(cProperties), &cb);
  if (sizeof(cProperties) != cb)
  {
    TRACE0("Write of dictionary header failed.\n");
    return FALSE;
  }

  POSITION pos;
  CString strName;
  void* pvID;

  // Write out section's "name" with dwPropID == 0 first
  if (! WriteNameDictEntry(pIStream, 0, m_strSectionName))
    return FALSE;

  // Enumerate contents of dictionary and write out (dwPropID, cb, name).
  pos = m_NameDict.GetStartPosition();
  while (pos != NULL)
  {
    m_NameDict.GetNextAssoc( pos, strName, pvID );
    if (! WriteNameDictEntry(pIStream, (DWORD)pvID, strName))
      return FALSE;
  }

  return TRUE;
}

BOOL CPropertySection::WriteNameDictToStream ( IStream * pIStream )
BOOL CPropertySection::WriteToStream ( IStream * pIStream )

Definition at line 892 of file propset.cpp.

{
  // Create a dummy property entry for the name dictionary (ID == 0).
  Set(0, NULL, VT_EMPTY);

  ULONG           cb;
  ULARGE_INTEGER  ulSeekOld;
  ULARGE_INTEGER  ulSeek;
  LPSTREAM        pIStrPIDO;
  PROPERTYIDOFFSET  pido;
  LARGE_INTEGER   li;

  // The Section header contains the number of bytes in the
  // section.  Thus we need  to go back to where we should
  // write the count of bytes
  // after we write all the property sets..
  // We accomplish this by saving the seek pointer to where
  // the size should be written in ulSeekOld
  m_SH.cbSection = 0;
  m_SH.cProperties = (DWORD)m_PropList.GetCount();
  LISet32( li, 0 );
  pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeekOld);

  pIStream->Write((LPVOID)&m_SH, sizeof(m_SH), &cb);
  if (sizeof(m_SH) != cb)
  {
    TRACE0("Write of section header failed (1).\n");
    return FALSE;
  }

  if (m_PropList.IsEmpty())
  {
    TRACE0("Warning: Wrote empty property section.\n");
    return TRUE;
  }

  // After the section header is the list of property ID/Offset pairs
  // Since there is an ID/Offset pair for each property and we
  // need to write the ID/Offset pair as we write each property
  // we clone the stream and use the clone to access the
  // table of ID/offset pairs (PIDO)...
  //
  pIStream->Clone( &pIStrPIDO );

  // Now seek pIStream past the PIDO list
  //
  LISet32( li,  m_SH.cProperties * sizeof( PROPERTYIDOFFSET ) );
  pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek);

  // Now write each section to pIStream.
  CProperty* pProp = NULL;
  POSITION pos = m_PropList.GetHeadPosition();
  while( pos != NULL )
  {
    // Get next element (note cast)
    pProp = (CProperty*)m_PropList.GetNext( pos );

    if (pProp->m_dwPropID != 0)
    {
      // Write it
      if (!pProp->WriteToStream( pIStream ))
      {
        pIStrPIDO->Release();
        return FALSE;
      }
    }
    else
    {
      if (!WriteNameDictToStream( pIStream ))
      {
        pIStrPIDO->Release();
        return FALSE;
      }
    }

    // Using our cloned stream write the Format ID / Offset pair
    // The offset to this property is the current seek pointer
    // minus the pointer to the beginning of the section
    pido.dwOffset = ulSeek.LowPart - ulSeekOld.LowPart;
    pido.propertyID = pProp->m_dwPropID;
    pIStrPIDO->Write((LPVOID)&pido, sizeof(pido), &cb);
    if (sizeof(pido) != cb)
    {
      TRACE0("Write of 'pido' failed\n");
      pIStrPIDO->Release();
      return FALSE;
    }

    // Get the seek offset after the write
    LISet32( li, 0 );
    pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek );
  }

  pIStrPIDO->Release();

  // Now go back to ulSeekOld and write the section header.
  // Size of section is current seek point minus old seek point
  //
  m_SH.cbSection = ulSeek.LowPart - ulSeekOld.LowPart;

  // Seek to beginning of this section and write the section header.
  LISet32( li, ulSeekOld.LowPart );
  pIStream->Seek( li, STREAM_SEEK_SET, NULL );
  pIStream->Write((LPVOID)&m_SH, sizeof(m_SH), &cb);
  if (sizeof(m_SH) != cb)
  {
    TRACE0("Write of section header failed (2).\n");
    return FALSE;
  }

  // Now seek to end of of the now written section
  LISet32(li, ulSeek.LowPart);
  pIStream->Seek(li, STREAM_SEEK_SET, NULL);

  return TRUE;
}

BOOL CPropertySection::WriteToStream ( IStream * pIStream )

Friends And Related Function Documentation

CProperty [friend]

Definition at line 92 of file propset.h.

CPropertySet [friend]

Definition at line 91 of file propset.h.

Member Data Documentation

CLSID CPropertySection::m_FormatID [private]

Definition at line 131 of file propset.h.

CMapStringToPtr CPropertySection::m_NameDict [private]

Definition at line 136 of file propset.h.

CObList CPropertySection::m_PropList [private]

Definition at line 134 of file propset.h.

SECTIONHEADER CPropertySection::m_SH [private]

Definition at line 132 of file propset.h.

CString CPropertySection::m_strSectionName [private]

Definition at line 137 of file propset.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/propset.h
  • vc2008fp/DrawClient/propset.h
  • ole/drawcli/propset.cpp
  • vc2008fp/DrawClient/propset.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropertySet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes | Friends

CPropertySet Class Reference

#include "propset.h"

List of all members.

Public Member Functions

CPropertySet (void)
CPropertySet (CLSID clsID)
CPropertySet (void)
CPropertySet (CLSID clsID)
~CPropertySet ()
~CPropertySet ()
void | AddProperty (CLSID FormatID, CProperty *pProp)
void | AddProperty (CLSID FormatID, CProperty *pProp)
CPropertySection * | AddSection (CLSID FormatID)
void | AddSection (CPropertySection *psect)
CPropertySection * | AddSection (CLSID FormatID)
void | AddSection (CPropertySection *psect)
LPVOID | Get (CLSID FormatID, DWORD dwPropID)
LPVOID | Get (CLSID FormatID, DWORD dwPropID, DWORD *pcb)
LPVOID | Get (CLSID FormatID, DWORD dwPropID)
LPVOID | Get (CLSID FormatID, DWORD dwPropID, DWORD *pcb)
WORD | GetByteOrder (void)
WORD | GetByteOrder (void)
CLSID | GetClassID (void)
CLSID | GetClassID (void)
DWORD | GetCount (void)
DWORD | GetCount (void)
WORD | GetFormatVersion (void)
WORD | GetFormatVersion (void)
CObList * | GetList (void)
CObList * | GetList (void)
DWORD | GetOSVersion (void)
DWORD | GetOSVersion (void)
CProperty * | GetProperty (CLSID FormatID, DWORD dwPropID)
CProperty * | GetProperty (CLSID FormatID, DWORD dwPropID)
CPropertySection * | GetSection (CLSID FormatID)
CPropertySection * | GetSection (CLSID FormatID)
BOOL | ReadFromStream (IStream *pIStream)
BOOL | ReadFromStream (IStream *pIStream)
void | Remove (CLSID FormatID)
void | Remove (CLSID FormatID)
void | Remove (CLSID FormatID, DWORD dwPropID)
void | Remove (CLSID FormatID, DWORD dwPropID)
void | RemoveAll ()
void | RemoveAll ()
BOOL | Set (CLSID FormatID, DWORD dwPropID, LPVOID pValue)
BOOL | Set (CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType)
BOOL | Set (CLSID FormatID, DWORD dwPropID, LPVOID pValue)
BOOL | Set (CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType)
void | SetClassID (CLSID clsid)
void | SetClassID (CLSID clsid)
void | SetFormatVersion (WORD wFmtVersion)
void | SetFormatVersion (WORD wFmtVersion)
void | SetOSVersion (DWORD dwOSVer)
void | SetOSVersion (DWORD dwOSVer)
BOOL | WriteToStream (IStream *pIStream)
BOOL | WriteToStream (IStream *pIStream)

Private Attributes

PROPHEADER m_PH
CObList | m_SectionList

Friends

class | CProperty
class | CPropertySection

Detailed Description

Definition at line 147 of file propset.h.

Constructor & Destructor Documentation

CPropertySet::CPropertySet ( void )

Definition at line 1269 of file propset.cpp.

{
  m_PH.wByteOrder = 0xFFFE;
  m_PH.wFormat = 0;
  m_PH.dwOSVer = (DWORD)MAKELONG( LOWORD(GetVersion()), 2 );
  m_PH.clsID =  GUID_NULL;
  m_PH.cSections = 0;

}

CPropertySet::CPropertySet ( CLSID clsID )

Definition at line 1279 of file propset.cpp.

{
  m_PH.wByteOrder = 0xFFFE;
  m_PH.wFormat = 0;
  m_PH.dwOSVer = (DWORD)MAKELONG( LOWORD(GetVersion()), 2 );
  m_PH.clsID = clsID;
  m_PH.cSections = 0;
}

CPropertySet::~CPropertySet ( )

Definition at line 1288 of file propset.cpp.

{   RemoveAll();  }

CPropertySet::CPropertySet ( void )
CPropertySet::CPropertySet ( CLSID clsID )
CPropertySet::~CPropertySet ( )

Member Function Documentation

void CPropertySet::AddProperty | ( | CLSID | FormatID,
 |  | CProperty * | pProp
 | ) |  |

Definition at line 1403 of file propset.cpp.

{
  CPropertySection* pSect = GetSection( FormatID );
  if (pSect)
    pSect->AddProperty( pProp );
}

void CPropertySet::AddProperty | ( | CLSID | FormatID,
 |  | CProperty * | pProp
 | ) |  |
CPropertySection * CPropertySet::AddSection ( CLSID FormatID )

Definition at line 1376 of file propset.cpp.

{
  CPropertySection* pSect = GetSection( FormatID );
  if (pSect)
    return pSect;

  pSect = new CPropertySection( FormatID ) ;
  if (pSect)
    AddSection( pSect );
  return pSect;
}

CPropertySection* CPropertySet::AddSection ( CLSID FormatID )
void CPropertySet::AddSection ( CPropertySection * psect )
void CPropertySet::AddSection ( CPropertySection * psect )

Definition at line 1388 of file propset.cpp.

{
  m_SectionList.AddTail( pSect );
  m_PH.cSections++;
}

LPVOID CPropertySet::Get | ( | CLSID | FormatID,
 |  | DWORD | dwPropID
 | ) |  |

Definition at line 1323 of file propset.cpp.

{   return Get( FormatID, dwPropID, (DWORD*)NULL ); }

LPVOID CPropertySet::Get | ( | CLSID | FormatID,
 |  | DWORD | dwPropID,
 |  | DWORD * | pcb
 | ) |  |

Definition at line 1314 of file propset.cpp.

{
  CPropertySection* pSect = GetSection( FormatID );
  if (pSect)
    return pSect->Get( dwPropID, pcb );
  else
    return NULL;
}

LPVOID CPropertySet::Get | ( | CLSID | FormatID,
 |  | DWORD | dwPropID,
 |  | DWORD * | pcb
 | ) |  |
LPVOID CPropertySet::Get | ( | CLSID | FormatID,
 |  | DWORD | dwPropID
 | ) |  |
WORD CPropertySet::GetByteOrder ( void )
WORD CPropertySet::GetByteOrder ( void )

Definition at line 1410 of file propset.cpp.

{   return m_PH.wByteOrder;  }

CLSID CPropertySet::GetClassID ( void )

Definition at line 1425 of file propset.cpp.

{   return m_PH.clsID;  }

CLSID CPropertySet::GetClassID ( void )
DWORD CPropertySet::GetCount ( void )

Definition at line 1431 of file propset.cpp.

{   return (DWORD)m_SectionList.GetCount();  }

DWORD CPropertySet::GetCount ( void )
WORD CPropertySet::GetFormatVersion ( void )
WORD CPropertySet::GetFormatVersion ( void )

Definition at line 1413 of file propset.cpp.

{   return m_PH.wFormat;  }

CObList * CPropertySet::GetList ( void )

Definition at line 1434 of file propset.cpp.

{   return &m_SectionList;  }

CObList* CPropertySet::GetList ( void )
DWORD CPropertySet::GetOSVersion ( void )

Definition at line 1419 of file propset.cpp.

{   return m_PH.dwOSVer;  }

DWORD CPropertySet::GetOSVersion ( void )
CProperty * CPropertySet::GetProperty | ( | CLSID | FormatID,
 |  | DWORD | dwPropID
 | ) |  |

Definition at line 1394 of file propset.cpp.

{
  CPropertySection* pSect = GetSection( FormatID );
  if (pSect)
    return pSect->GetProperty( dwPropID );
  else
    return NULL;
}

CProperty* CPropertySet::GetProperty | ( | CLSID | FormatID,
 |  | DWORD | dwPropID
 | ) |  |
CPropertySection* CPropertySet::GetSection ( CLSID FormatID )
CPropertySection * CPropertySet::GetSection ( CLSID FormatID )

Definition at line 1363 of file propset.cpp.

{
  POSITION pos = m_SectionList.GetHeadPosition();
  CPropertySection* pSect;
  while (pos != NULL)
  {
    pSect = (CPropertySection*)m_SectionList.GetNext( pos );
    if (IsEqualCLSID( pSect->m_FormatID, FormatID ))
      return pSect;
  }
  return NULL;
}

BOOL CPropertySet::ReadFromStream ( IStream * pIStream )
BOOL CPropertySet::ReadFromStream ( IStream * pIStream )

Definition at line 1510 of file propset.cpp.

{
  ULONG               cb;
  FORMATIDOFFSET      fido;
  ULONG               cSections;
  LPSTREAM            pIStrFIDO;
  CPropertySection*   pSect;
  LARGE_INTEGER       li;
  LARGE_INTEGER       liPropSet;

  // Save the stream position at which the property set starts.
  LARGE_INTEGER liZero = {0,0};
  pIStream->Seek( liZero, STREAM_SEEK_CUR, (ULARGE_INTEGER*)&liPropSet );

  if (m_PH.cSections || !m_SectionList.IsEmpty())
     RemoveAll();

  // The stream starts like this:
  //  wByteOrder   wFmtVer   dwOSVer   clsID  cSections
  // Which is nice, because our PROPHEADER is the same!
  pIStream->Read( (LPVOID)&m_PH, sizeof( m_PH ), &cb );
  if (cb != sizeof(m_PH))
    return FALSE;

  // Now we're pointing at the first of the FormatID/Offset pairs
  // (FIDOs).   To get to each section we use a cloned stream
  // to stay back and point at the FIDOs (pIStrFIDO).  We seek
  // pIStream to each of the sections, creating CProperitySection
  // and so forth as we go...
  //
  pIStream->Clone( &pIStrFIDO );

  cSections = m_PH.cSections;
  while (cSections--)
  {
    pIStrFIDO->Read( (LPVOID)&fido, sizeof( fido ), &cb );
    if (cb != sizeof(fido))
    {
      pIStrFIDO->Release();
      return FALSE;
    }

    // Do a seek from the beginning of the property set.
    LISet32( li, fido.dwOffset );
    pIStream->Seek( liPropSet, STREAM_SEEK_SET, NULL );
    pIStream->Seek( li, STREAM_SEEK_CUR, NULL );

    // Now pIStream is at the type/value pair
    pSect = new CPropertySection;
    pSect->SetFormatID( fido.formatID );
    pSect->ReadFromStream( pIStream, liPropSet );
    m_SectionList.AddTail( pSect );
  }

  pIStrFIDO->Release();
  return TRUE;
}

void CPropertySet::Remove | ( | CLSID | FormatID,
 |  | DWORD | dwPropID
 | ) |  |

Definition at line 1326 of file propset.cpp.

{
  CPropertySection*  pSect = GetSection( FormatID );
  if (pSect)
    pSect->Remove( dwPropID );
}

void CPropertySet::Remove ( CLSID FormatID )

Definition at line 1333 of file propset.cpp.

{
  CPropertySection* pSect;
  POSITION posRemove = m_SectionList.GetHeadPosition();
  POSITION pos = posRemove;
  while( posRemove != NULL )
  {
    pSect = (CPropertySection*)m_SectionList.GetNext( pos );
    if (IsEqualCLSID( pSect->m_FormatID, FormatID ))
    {
      m_SectionList.RemoveAt( posRemove );
      delete pSect;
      m_PH.cSections--;
      return;
    }
    posRemove = pos;
  }
}

void CPropertySet::Remove | ( | CLSID | FormatID,
 |  | DWORD | dwPropID
 | ) |  |
void CPropertySet::Remove ( CLSID FormatID )
void CPropertySet::RemoveAll ( )

Definition at line 1352 of file propset.cpp.

{
  POSITION pos = m_SectionList.GetHeadPosition();
  while( pos != NULL )
  {
    delete (CPropertySection*)m_SectionList.GetNext( pos );
  }
  m_SectionList.RemoveAll();
  m_PH.cSections = 0;
}

void CPropertySet::RemoveAll ( )
BOOL CPropertySet::Set | ( | CLSID | FormatID,
 |  | DWORD | dwPropID,
 |  | LPVOID | pValue
 | ) |  |
BOOL CPropertySet::Set | ( | CLSID | FormatID,
 |  | DWORD | dwPropID,
 |  | LPVOID | pValue
 | ) |  |

Definition at line 1303 of file propset.cpp.

{
  // Since there is no dwType, we have to assume that the property
  // already exists.  If it doesn't, fail.
  CPropertySection* pSect = GetSection( FormatID );
  if (pSect != NULL)
    return pSect->Set( dwPropID, pValue );
  else
    return FALSE;
}

BOOL CPropertySet::Set | ( | CLSID | FormatID,
 |  | DWORD | dwPropID,
 |  | LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |
BOOL CPropertySet::Set | ( | CLSID | FormatID,
 |  | DWORD | dwPropID,
 |  | LPVOID | pValue,
 |  | DWORD | dwType
 | ) |  |

Definition at line 1291 of file propset.cpp.

{
  CPropertySection* pSect = GetSection( FormatID );
  if (pSect == NULL)
  {
    if ((pSect = new CPropertySection( FormatID )) != NULL)
      AddSection( pSect );
  }
  pSect->Set( dwPropID, pValue, dwType );
  return TRUE;
}

void CPropertySet::SetClassID ( CLSID clsid )

Definition at line 1428 of file propset.cpp.

{   m_PH.clsID = clsID;  }

void CPropertySet::SetClassID ( CLSID clsid )
void CPropertySet::SetFormatVersion ( WORD wFmtVersion )
void CPropertySet::SetFormatVersion ( WORD wFmtVersion )

Definition at line 1416 of file propset.cpp.

{   m_PH.wFormat = wFmtVersion;  }

void CPropertySet::SetOSVersion ( DWORD dwOSVer )
void CPropertySet::SetOSVersion ( DWORD dwOSVer )

Definition at line 1422 of file propset.cpp.

{   m_PH.dwOSVer = dwOSVer;  }

BOOL CPropertySet::WriteToStream ( IStream * pIStream )
BOOL CPropertySet::WriteToStream ( IStream * pIStream )

Definition at line 1438 of file propset.cpp.

{
  LPSTREAM        pIStrFIDO;
  FORMATIDOFFSET  fido;
  ULONG           cb;
  ULARGE_INTEGER  ulSeek;
  LARGE_INTEGER   li;

  // Write the Property List Header
  m_PH.cSections = (DWORD)m_SectionList.GetCount();
  pIStream->Write((LPVOID)&m_PH, sizeof(m_PH), &cb);
  if (sizeof(m_PH) != cb)
  {
    TRACE0("Write of Property Set Header failed.\n");
    return FALSE;
  }

  if (m_SectionList.IsEmpty())
  {
    TRACE0("Warning: Wrote empty property set.\n");
    return TRUE;
  }

  // After the header is the list of Format ID/Offset pairs
  // Since there is an ID/Offset pair for each section and we
  // need to write the ID/Offset pair as we write each section
  // we clone the stream and use the clone to access the
  // table of ID/offset pairs (FIDO)...
  //
  pIStream->Clone( &pIStrFIDO );

  // Now seek pIStream past the FIDO list
  //
  LISet32( li, m_PH.cSections * sizeof( FORMATIDOFFSET ) );
  pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek);

  // Write each section.
  CPropertySection*   pSect = NULL;
  POSITION            pos = m_SectionList.GetHeadPosition();
  while( pos != NULL )
  {
    // Get next element (note cast)
    pSect = (CPropertySection*)m_SectionList.GetNext( pos );

    // Write it
    if (!pSect->WriteToStream( pIStream ))
    {
      pIStrFIDO->Release();
      return FALSE;
    }

    // Using our cloned stream write the Format ID / Offset pair
    fido.formatID = pSect->m_FormatID;
    fido.dwOffset = ulSeek.LowPart;
    pIStrFIDO->Write((LPVOID)&fido, sizeof(fido), &cb);
    if (sizeof(fido) != cb)
    {
      TRACE0("Write of 'fido' failed.\n");
      pIStrFIDO->Release();
      return FALSE;
    }

    // Get the seek offset (for pIStream) after the write
    LISet32( li, 0 );
    pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek );
  }

  pIStrFIDO->Release();

  return TRUE;
}

Friends And Related Function Documentation

CProperty [friend]

Definition at line 150 of file propset.h.

CPropertySection [friend]

Definition at line 149 of file propset.h.

Member Data Documentation

PROPHEADER CPropertySet::m_PH [private]

Definition at line 188 of file propset.h.

CObList CPropertySet::m_SectionList [private]

Definition at line 189 of file propset.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/propset.h
  • vc2008fp/DrawClient/propset.h
  • ole/drawcli/propset.cpp
  • vc2008fp/DrawClient/propset.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropSheetDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CPropSheetDemoApp Class Reference

#include "PropSheetDemo.h"

List of all members.

Public Member Functions

CPropSheetDemoApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 14 of file PropSheetDemo.h.

Constructor & Destructor Documentation

CPropSheetDemoApp::CPropSheetDemoApp ( )

Definition at line 21 of file PropSheetDemo.cpp.

{
  CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
}

Member Function Documentation

BOOL CPropSheetDemoApp::InitInstance ( ) [virtual]

Definition at line 34 of file PropSheetDemo.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  CPropSheetDemoDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int) dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/PropSheetDemo/PropSheetDemo.h
  • vc2008fp/PropSheetDemo/PropSheetDemo.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropSheetDemoDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CPropSheetDemoDlg Class Reference

#include "PropSheetDemoDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPSHEETDEMO_DIALOG }

Public Member Functions

CPropSheetDemoDlg (CWnd *pParent=NULL)

Public Attributes

BOOL | m_bHeader

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg void | OnPropSheet1 ()
afx_msg void | OnPropSheet2 ()
afx_msg void | OnPropSheet3 ()
afx_msg void | OnPropSheet4 ()
afx_msg void | OnPropSheet5 ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 6 of file PropSheetDemoDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 13 of file PropSheetDemoDlg.h.

{ IDD = IDD_PROPSHEETDEMO_DIALOG };

Constructor & Destructor Documentation

CPropSheetDemoDlg::CPropSheetDemoDlg ( CWnd * pParent = NULL )

Definition at line 17 of file PropSheetDemoDlg.cpp.

  : CDialogEx(CPropSheetDemoDlg::IDD, pParent)
{
  m_bHeader = FALSE;

  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CPropSheetDemoDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 26 of file PropSheetDemoDlg.cpp.

{
  CDialogEx::DoDataExchange(pDX);
  DDX_Check(pDX, IDC_HEADER, m_bHeader);
}

BOOL CPropSheetDemoDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 46 of file PropSheetDemoDlg.cpp.

{
  CDialogEx::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  if (pSysMenu != NULL)
  {
    BOOL bValidString;
    CString strAboutMenu;
    bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CPropSheetDemoDlg::OnPaint ( ) [protected]

Definition at line 94 of file PropSheetDemoDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialogEx::OnPaint();
  }
}

void CPropSheetDemoDlg::OnPropSheet1 ( ) [protected]

Definition at line 126 of file PropSheetDemoDlg.cpp.

{
  UpdateData();

  CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_Tabs);

  pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
  pPropSheet->DoModal();

  delete pPropSheet;
}

void CPropSheetDemoDlg::OnPropSheet2 ( ) [protected]

Definition at line 138 of file PropSheetDemoDlg.cpp.

{
  UpdateData();

  CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_OutlookBar, IDB_ICONS_LARGE, 32);

  pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
  pPropSheet->DoModal();

  delete pPropSheet;
}

void CPropSheetDemoDlg::OnPropSheet3 ( ) [protected]

Definition at line 150 of file PropSheetDemoDlg.cpp.

{
  UpdateData();

  CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_Tree, IDB_TREE_ICONS, 16);

  pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
  pPropSheet->DoModal();

  delete pPropSheet;
}

void CPropSheetDemoDlg::OnPropSheet4 ( ) [protected]

Definition at line 162 of file PropSheetDemoDlg.cpp.

{
  UpdateData();

  CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_OneNoteTabs, IDB_ICONS_SMALL, 16);

  pPropSheet->GetTab().EnableAutoColor();
  pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
  pPropSheet->DoModal();

  delete pPropSheet;
}

void CPropSheetDemoDlg::OnPropSheet5 ( ) [protected]

Definition at line 175 of file PropSheetDemoDlg.cpp.

{
  UpdateData();

  CMyPropertySheet *pPropSheet  = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_List);

  pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
  pPropSheet->DoModal();

  delete pPropSheet;
}

HCURSOR CPropSheetDemoDlg::OnQueryDragIcon ( ) [protected]

Definition at line 121 of file PropSheetDemoDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CPropSheetDemoDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 79 of file PropSheetDemoDlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
  }
  else
  {
    CDialogEx::OnSysCommand(nID, lParam);
  }
}

Member Data Documentation

BOOL CPropSheetDemoDlg::m_bHeader

Definition at line 14 of file PropSheetDemoDlg.h.

HICON CPropSheetDemoDlg::m_hIcon [protected]

Definition at line 21 of file PropSheetDemoDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/PropSheetDemo/PropSheetDemoDlg.h
  • vc2008fp/PropSheetDemo/PropSheetDemoDlg.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPropSliderCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CPropSliderCtrl Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CPropSliderCtrl (CSliderProp *pProp, COLORREF clrBack)
virtual | ~CPropSliderCtrl ()

Protected Member Functions

afx_msg HBRUSH | CtlColor (CDC *pDC, UINT nCtlColor)
afx_msg void | HScroll (UINT nSBCode, UINT nPos)

Protected Attributes

CBrush | m_brBackground
COLORREF | m_clrBack
CSliderProp * m_pProp

Detailed Description

Definition at line 83 of file CustomProperties.h.

Constructor & Destructor Documentation

CPropSliderCtrl::CPropSliderCtrl | ( | CSliderProp * | pProp,
 |  | COLORREF | clrBack
 | ) |  |

Definition at line 126 of file CustomProperties.cpp.

{
  m_clrBack = clrBack;
  m_brBackground.CreateSolidBrush(m_clrBack);
  m_pProp = pProp;
}

CPropSliderCtrl::~CPropSliderCtrl ( ) [virtual]

Definition at line 133 of file CustomProperties.cpp.

{
}

Member Function Documentation

HBRUSH CPropSliderCtrl::CtlColor | ( | CDC * | pDC,
 |  | UINT | nCtlColor |
 | ) |  |  | [protected]

Definition at line 147 of file CustomProperties.cpp.

{
  pDC->SetBkColor(m_clrBack);
  return m_brBackground;
}

void CPropSliderCtrl::HScroll | ( | UINT | nSBCode,
 |  | UINT | nPos |
 | ) |  |  | [protected]

Definition at line 153 of file CustomProperties.cpp.

{
  ASSERT_VALID(m_pProp);

  m_pProp->OnUpdateValue();
  m_pProp->Redraw();
}

Member Data Documentation

CBrush CPropSliderCtrl::m_brBackground [protected]

Definition at line 91 of file CustomProperties.h.

COLORREF CPropSliderCtrl::m_clrBack [protected]

Definition at line 92 of file CustomProperties.h.

CSliderProp* CPropSliderCtrl::m_pProp [protected]

Definition at line 93 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPushApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CPushApp Class Reference

#include "push.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 22 of file push.h.

Member Function Documentation

int CPushApp::ExitInstance ( )

Definition at line 48 of file push.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CPushApp::InitInstance ( )

Definition at line 32 of file push.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/push/push.h
  • controls/push/push.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPushCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CPushCtrl Class Reference

#include "pushctl.h"

List of all members.

Public Types

enum | { eventidCustomClick = 1L }

Public Member Functions

CPushCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual void | OnResetState ()

Protected Member Functions

~CPushCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CPushCtrl) DECLARE_OLETYPELIB(CPushCtrl) DECLARE_PROPPAGEIDS(CPushCtrl) DECLARE_OLECTLTYPE(CPushCtrl) BOOL PreCreateWindow(CREATESTRUCT &cs)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
void | FireCustomClick (LPCTSTR lpstrCaption, short cchCaption)
BOOL | IsSubclassedControl ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
LRESULT | OnOcmCommand (WPARAM wParam, LPARAM lParam)
LRESULT | OnOcmDrawItem (WPARAM wParam, LPARAM lParam)

Detailed Description

Definition at line 16 of file pushctl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
eventidCustomClick

Definition at line 76 of file pushctl.h.

       {
  //{{AFX_DISP_ID(CPushCtrl)
  eventidCustomClick = 1L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CPushCtrl::CPushCtrl ( )

Definition at line 134 of file pushctl.cpp.

{
  InitializeIIDs(&IID_DPush, &IID_DPushEvents);

  SetInitialSize(28, 28);
}

CPushCtrl::~CPushCtrl ( ) [protected]

Definition at line 145 of file pushctl.cpp.

{
}

Member Function Documentation

void CPushCtrl::AboutBox ( ) [protected]

Definition at line 182 of file pushctl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_PUSH);
  dlgAbout.DoModal();
}

CPushCtrl::DECLARE_OLECREATE_EX ( CPushCtrl ) [protected]
void CPushCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 163 of file pushctl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);
}

void CPushCtrl::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [protected, virtual]

Definition at line 260 of file pushctl.cpp.

{
  CDC *pdc;
  int bmpId;
  CBitmap bitmap;
  BITMAP  bmp;
  CPictureHolder picHolder;
  CRect rcSrcBounds;

  CPen* pOldPen;
  RECT    rect;
  SHORT   inflate;

  pdc = CDC::FromHandle(lpDrawItemStruct->hDC);

  switch (lpDrawItemStruct->itemAction)
  {
    case ODA_DRAWENTIRE:
    case ODA_SELECT:
      // Load "up" or "down" bitmap depending on selection state
      bmpId = (lpDrawItemStruct->itemState & ODS_SELECTED) ? IDB_DOWNBITMAP
        : IDB_UPBITMAP;
      bitmap.LoadBitmap(bmpId);
      bitmap.GetObject(sizeof(BITMAP), &bmp);
      rcSrcBounds.right = bmp.bmWidth;
      rcSrcBounds.bottom = bmp.bmHeight;

      // Create picture and render
      picHolder.CreateFromBitmap((HBITMAP)bitmap.m_hObject, NULL, FALSE);
      picHolder.Render(pdc, lpDrawItemStruct->rcItem, rcSrcBounds);

      break;

    case ODA_FOCUS:
      // Just draw focus rect
      pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
      if (lpDrawItemStruct->itemState & ODS_FOCUS)
      {
        CopyRect((LPRECT)&rect, (LPRECT)&lpDrawItemStruct->rcItem);
        inflate = (SHORT)min(3,min(rect.right  - rect.left + 1,
          rect.bottom - rect.top  + 1) / 5);
        InflateRect(&rect, -inflate, -inflate);
        pdc->DrawFocusRect(&rect);
      }
      pdc->SelectObject(pOldPen);
      break;
  }
}

void CPushCtrl::FireCustomClick | ( | LPCTSTR | lpstrCaption,
 |  | short | cchCaption |
 | ) |  |  | [inline, protected]

Definition at line 69 of file pushctl.h.

    {FireEvent(eventidCustomClick,EVENT_PARAM(VTS_BSTR  VTS_I2), lpstrCaption, cchCaption);}

BOOL CPushCtrl::IsSubclassedControl ( ) [protected]

Definition at line 203 of file pushctl.cpp.

{
  return TRUE;
}

void CPushCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 153 of file pushctl.cpp.

{
  DoSuperclassPaint(pdc, rcBounds);
}

BOOL CPushCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 240 of file pushctl.cpp.

{
  return TRUE;
}

LRESULT CPushCtrl::OnOcmCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 212 of file pushctl.cpp.

{
#ifdef _WIN32
  lParam;
  WORD wNotifyCode = HIWORD(wParam);
#else
  wParam;
  WORD wNotifyCode = HIWORD(lParam);
#endif

  switch (wNotifyCode)
  {
  case BN_CLICKED:

    // Fire custom click event, sending caption
    CString strCaption = InternalGetText();
    FireCustomClick(strCaption, (short) strCaption.GetLength());

    break;
  }

  return 0;
}

LRESULT CPushCtrl::OnOcmDrawItem | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 249 of file pushctl.cpp.

{
  DrawItem((LPDRAWITEMSTRUCT)lParam);

  return 1;
}

void CPushCtrl::OnResetState ( ) [virtual]

Definition at line 173 of file pushctl.cpp.

{
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange
}

The documentation for this class was generated from the following files:
  • controls/push/pushctl.h
  • controls/push/pushctl.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CPushPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CPushPropPage Class Reference

#include "pushppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_PUSH }

Public Member Functions

CPushPropPage ()

Public Attributes

BOOL | m_Border
CString | m_Caption
BOOL | m_Enabled

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file pushppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file pushppg.h.

{ IDD = IDD_PROPPAGE_PUSH };

Constructor & Destructor Documentation

CPushPropPage::CPushPropPage ( )

Definition at line 59 of file pushppg.cpp.

                             :
  COlePropertyPage(IDD, IDS_PUSH_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CPushPropPage)
  m_Border = FALSE;
  m_Caption = _T("");
  m_Enabled = FALSE;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CPushPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 73 of file pushppg.cpp.

{
  //{{AFX_DATA_MAP(CPushPropPage)
  DDP_Check(pDX, IDC_BORDERCHECK, m_Border, _T("BorderStyle"));
  DDX_Check(pDX, IDC_BORDERCHECK, m_Border);
  DDP_Text(pDX, IDC_CAPTIONEDIT, m_Caption, _T("Caption"));
  DDX_Text(pDX, IDC_CAPTIONEDIT, m_Caption);
  DDP_Check(pDX, IDC_ENABLEDCHECK, m_Enabled, _T("Enabled"));
  DDX_Check(pDX, IDC_ENABLEDCHECK, m_Enabled);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

BOOL CPushPropPage::m_Border

Definition at line 28 of file pushppg.h.

CString CPushPropPage::m_Caption

Definition at line 29 of file pushppg.h.

BOOL CPushPropPage::m_Enabled

Definition at line 30 of file pushppg.h.

The documentation for this class was generated from the following files:
  • controls/push/pushppg.h
  • controls/push/pushppg.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRateDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

CRateDlg Class Reference

#include "Ratedlg.h"

List of all members.

Public Member Functions

CRateDlg (UINT iRate, CWnd *pParent=NULL)
UINT | GetRate () const

Protected Types

enum | { IDD = IDD_RATE }

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Protected Attributes

UINT m_iRate

Detailed Description

Definition at line 35 of file Ratedlg.h.

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
IDD

Definition at line 47 of file Ratedlg.h.

{ IDD = IDD_RATE };

Constructor & Destructor Documentation

CRateDlg::CRateDlg | ( | UINT | iRate,
 |  | CWnd * | pParent = NULL
 | ) |  |

Definition at line 44 of file Ratedlg.cpp.

  : CDialog(CRateDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CRateDlg)
  //}}AFX_DATA_INIT
  m_iRate = iRate;
}

Member Function Documentation

void CRateDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 52 of file Ratedlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CRateDlg)
  DDX_Text(pDX, IDC_INTERVAL, m_iRate);
  DDV_MinMaxUInt(pDX, m_iRate, 0, 3600);
  //}}AFX_DATA_MAP
}

UINT CRateDlg::GetRate ( ) const [inline]

Definition at line 42 of file Ratedlg.h.

{ return m_iRate; }

BOOL CRateDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 61 of file Ratedlg.cpp.

{
  CDialog::OnInitDialog();
  CenterWindow();
  return TRUE;
}

Member Data Documentation

UINT CRateDlg::m_iRate [protected]

Definition at line 48 of file Ratedlg.h.

The documentation for this class was generated from the following files:
  • general/dlgcbr32/Ratedlg.h
  • general/dlgcbr32/Ratedlg.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRebarTestApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRebarTestApp Class Reference

#include "RebarTest.h"

List of all members.

Public Member Functions

CRebarTestApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file RebarTest.h.

Constructor & Destructor Documentation

CRebarTestApp::CRebarTestApp ( )

Definition at line 38 of file RebarTest.cpp.

                             :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CRebarTestApp::ExitInstance ( ) [virtual]

Definition at line 150 of file RebarTest.cpp.

{

  return CWinAppEx::ExitInstance();
}

BOOL CRebarTestApp::InitInstance ( ) [virtual]

Definition at line 53 of file RebarTest.cpp.

{
  // InitCommonControlsEx() is required on Windows XP if an application
  // manifest specifies use of ComCtl32.dll version 6 or later to enable
  // visual styles.  Otherwise, any window creation will fail.
  INITCOMMONCONTROLSEX InitCtrls;
  InitCtrls.dwSize = sizeof(InitCtrls);
  // Set this to include all the common control classes you want to use
  // in your application.
  InitCtrls.dwICC = ICC_WIN95_CLASSES;
  InitCommonControlsEx(&InitCtrls);

  CWinApp::InitInstance();

  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }
  AfxEnableControlContainer();
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
  LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // TODO: Remove this if you don't want extended tooltips:
  InitTooltipManager();

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  theApp.GetTooltipManager ()->SetTooltipParams (
    AFX_TOOLTIP_TYPE_ALL,
    RUNTIME_CLASS (CMFCToolTipCtrl),
    &params);

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views
  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(IDR_RebarTestTYPE,
    RUNTIME_CLASS(CRebarTestDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CRebarTestView));
  if (!pDocTemplate)
    return FALSE;
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;
  // call DragAcceptFiles only if there's a suffix
  //  In an MDI app, this should occur immediately after setting m_pMainWnd

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
  {
    if (!pMainFrame->LoadMDIState (GetRegSectionPath ()))
    {
      if (!ProcessShellCommand(cmdInfo))
        return FALSE;
    }
  }
  else
  {
    // Dispatch commands specified on the command line
    if (!ProcessShellCommand(cmdInfo))
      return FALSE;
  }
  // The main window has been initialized, so show and update it
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CRebarTestApp::OnAppAbout ( )

Definition at line 188 of file RebarTest.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CRebarTestApp::PreLoadState ( ) [virtual]

Definition at line 198 of file RebarTest.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/RebarTest/RebarTest.h
  • vc2008fp/RebarTest/RebarTest.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRebarTestDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRebarTestDoc Class Reference

#include "RebarTestDoc.h"

List of all members.

Public Member Functions

virtual | ~CRebarTestDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CRebarTestDoc ()

Detailed Description

Definition at line 14 of file RebarTestDoc.h.

Constructor & Destructor Documentation

CRebarTestDoc::CRebarTestDoc ( ) [protected]

Definition at line 31 of file RebarTestDoc.cpp.

{
  // TODO: add one-time construction code here

}

CRebarTestDoc::~CRebarTestDoc ( ) [virtual]

Definition at line 37 of file RebarTestDoc.cpp.

{
}

Member Function Documentation

BOOL CRebarTestDoc::OnNewDocument ( ) [virtual]

Definition at line 41 of file RebarTestDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CRebarTestDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 57 of file RebarTestDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/RebarTest/RebarTestDoc.h
  • vc2008fp/RebarTest/RebarTestDoc.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRebarTestView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRebarTestView Class Reference

#include "RebarTestView.h"

List of all members.

Public Member Functions

virtual | ~CRebarTestView ()
CRebarTestDoc * | GetDocument () const
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CRebarTestView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 14 of file RebarTestView.h.

Constructor & Destructor Documentation

CRebarTestView::CRebarTestView ( ) [protected]

Definition at line 35 of file RebarTestView.cpp.

{
  // TODO: add construction code here

}

CRebarTestView::~CRebarTestView ( ) [virtual]

Definition at line 41 of file RebarTestView.cpp.

{
}

Member Function Documentation

CRebarTestDoc * CRebarTestView::GetDocument ( ) const [inline]

Definition at line 53 of file RebarTestView.h.

   { return reinterpret_cast<CRebarTestDoc*>(m_pDocument); }

void CRebarTestView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 78 of file RebarTestView.cpp.

{
  // TODO: add extra initialization before printing
}

void CRebarTestView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 55 of file RebarTestView.cpp.

{
  CRebarTestDoc* pDoc;
  pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  // TODO: add draw code for native data here
}

void CRebarTestView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 83 of file RebarTestView.cpp.

{
  // TODO: add cleanup after printing
}

void CRebarTestView::OnFilePrintPreview ( ) [protected]

Definition at line 67 of file RebarTestView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CRebarTestView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 72 of file RebarTestView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CRebarTestView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 45 of file RebarTestView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/RebarTest/RebarTestView.h
  • vc2008fp/RebarTest/RebarTestView.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRecalcApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRecalcApp Class Reference

#include "mtrecalc.h"

List of all members.

Public Member Functions

CRecalcApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 27 of file mtrecalc.h.

Constructor & Destructor Documentation

CRecalcApp::CRecalcApp ( )

Definition at line 41 of file mtrecalc.cpp.

{
}

Member Function Documentation

BOOL CRecalcApp::InitInstance ( ) [virtual]

Definition at line 53 of file mtrecalc.cpp.

{
  // WIN32 multi-threading APIs are not available on non-NT versions
  // of Windows less than Windows version 4.0.
  if ((::GetVersion() & 0x80000000) && (BYTE(::GetVersion()) < 4))
  {
    AfxMessageBox(IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4);
    return FALSE;
  }

  // Standard initialization

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register document templates

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_RECALCTYPE,
    RUNTIME_CLASS(CRecalcDoc),
    RUNTIME_CLASS(CMDIChildWnd),          // standard MDI child frame
    RUNTIME_CLASS(CRecalcView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // Enable DDE Execute open
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // Enable drag/drop open
  m_pMainWnd->DragAcceptFiles();
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CRecalcApp::OnAppAbout ( )

Definition at line 147 of file mtrecalc.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • advanced/mtrecalc/mtrecalc.h
  • advanced/mtrecalc/mtrecalc.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRecalcDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CRecalcDoc Class Reference

#include "recaldoc.h"

List of all members.

Public Member Functions

virtual | ~CRecalcDoc ()
virtual BOOL | OnSaveDocument (LPCTSTR lpszPathName)
void | RecalcDone ()
void | RecalcInSecondThread ()
void | RecalcInSingleThread ()
virtual void | Serialize (CArchive &ar)
void | UpdateInt1AndInt2 (int n1, int n2, BOOL bForceRecalc)

Public Attributes

BOOL | m_bRecalcInProgress
BOOL | m_bRecalcNeeded
HANDLE | m_hEventKillRecalcThread
HANDLE | m_hEventRecalcDone
HANDLE | m_hEventRecalcThreadKilled
HANDLE | m_hEventStartRecalc
UINT m_nCurrentDemoCommand
int | m_nInt1
int | m_nInt2
int | m_nRecalcSpeedSeconds
int | m_nSum
CWinThread * | m_pRecalcWorkerThread
CRecalcThreadInfo m_recalcThreadInfo

Protected Member Functions

CRecalcDoc ()
void | OnDemoThread (UINT nCmdID)
afx_msg void | OnKillWorkerThread ()
virtual BOOL | OnNewDocument ()
afx_msg void | OnRecalcSpeed ()
void | OnUpdateDemoThread (CCmdUI *pCmdUI)
afx_msg void | OnUpdateKillWorkerThread (CCmdUI *pCmdUI)

Detailed Description

Definition at line 12 of file recaldoc.h.

Constructor & Destructor Documentation

CRecalcDoc::CRecalcDoc ( ) [protected]

Definition at line 43 of file recaldoc.cpp.

{
  m_nInt1 = m_nInt2 = m_nSum = 0;
  m_bRecalcNeeded = m_bRecalcInProgress = FALSE;
  m_nRecalcSpeedSeconds = 5;

  m_nCurrentDemoCommand = ID_SINGLE_THREAD;

  m_hEventStartRecalc = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset
  m_hEventRecalcDone = CreateEvent(NULL, TRUE, TRUE, NULL); // manual reset, initially set
  m_hEventKillRecalcThread = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset
  m_hEventRecalcThreadKilled = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset

  m_recalcThreadInfo.m_hEventStartRecalc = m_hEventStartRecalc;
  m_recalcThreadInfo.m_hEventRecalcDone = m_hEventRecalcDone;
  m_recalcThreadInfo.m_hEventKillRecalcThread = m_hEventKillRecalcThread;
  m_recalcThreadInfo.m_hEventRecalcThreadKilled = m_hEventRecalcThreadKilled;

  m_pRecalcWorkerThread = NULL;
}

CRecalcDoc::~CRecalcDoc ( ) [virtual]

Definition at line 64 of file recaldoc.cpp.

{
  // In this application, the document owns the worker thread.
  // The document's destructor is responsible for killing the active worker
  // thread.

  // It's a good idea to wait for the worker thread to notify via a
  // "thread killed" event that it has killed itself. Otherwise, in the case
  // where the app is terminating, is possible (even if unlikely) that it
  // will detect a memory leak of the CWinThread object before the
  // CWinThread object has had a chance to auto-delete itself.

  DWORD dwExitCode;
  if (m_pRecalcWorkerThread != NULL &&
    GetExitCodeThread(m_pRecalcWorkerThread->m_hThread, &dwExitCode) &&
    dwExitCode == STILL_ACTIVE)
  {
    // Kill the worker thread by setting the "kill thread" event.
    // See comment in OnKillWorkerThread for explanation of the sequence
    // of the "kill thread" and "start recalc" events.
    SetEvent(m_hEventKillRecalcThread);
    SetEvent(m_hEventStartRecalc);
    WaitForSingleObject(m_hEventRecalcThreadKilled, INFINITE);
  }
}

Member Function Documentation

void CRecalcDoc::OnDemoThread ( UINT nCmdID ) [protected]

Definition at line 274 of file recaldoc.cpp.

{
  m_nCurrentDemoCommand = nCmdID;
}

void CRecalcDoc::OnKillWorkerThread ( ) [protected]

Definition at line 292 of file recaldoc.cpp.

{
  // The worker thread periodically checks for the "kill recalc" event
  // during its execution of a recalculation.  When the worker thread
  // is not currently recalculating, it is waiting for a "start recalc"
  // event.  Therefore, in order to kill the thread that might be waiting
  // for the "start recalc" event, it is necessary to first set the
  // "start recalc" event.
  SetEvent(m_hEventKillRecalcThread);
  SetEvent(m_hEventStartRecalc);

  WaitForSingleObject(m_hEventRecalcThreadKilled, INFINITE);

  m_pRecalcWorkerThread = NULL;
  m_bRecalcInProgress = FALSE; // but m_bRecalcNeeded is still TRUE
  UpdateAllViews(NULL, UPDATE_HINT_SUM);
}

BOOL CRecalcDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 94 of file recaldoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  return TRUE;
}

void CRecalcDoc::OnRecalcSpeed ( ) [protected]

Definition at line 284 of file recaldoc.cpp.

{
  CSpeedDlg dlg;
  dlg.m_nRecalcSpeedSeconds = m_nRecalcSpeedSeconds;
  if (dlg.DoModal() == IDOK)
    m_nRecalcSpeedSeconds = dlg.m_nRecalcSpeedSeconds;
}

BOOL CRecalcDoc::OnSaveDocument ( LPCTSTR lpszPathName ) [virtual]

Definition at line 102 of file recaldoc.cpp.

{
  if (m_bRecalcInProgress)
  {
    if (AfxMessageBox(IDS_CONTINUE_RECALC_BEFORE_SAVE, MB_YESNO) == IDYES)
    {
      BeginWaitCursor();
      WaitForSingleObject(m_hEventRecalcDone, INFINITE);
      RecalcDone();
      EndWaitCursor();
    }
    else
    {
      AfxMessageBox(IDS_FILE_NOT_SAVED);
      return FALSE;
    }
  }
  else if (m_bRecalcNeeded) // recalc needed but not in progress
  {
    if (AfxMessageBox(IDS_NEED_RECALC_BEFORE_SAVE, MB_YESNO) == IDYES)
    {
      BeginWaitCursor();

      // Update the document from data in the view and start recalculation.
      POSITION pos = GetFirstViewPosition();
      ASSERT(pos != NULL);
      CView* pView = GetNextView(pos);
      pView->SendMessage(WM_USER_RECALC_NOW, 0, 0);

      WaitForSingleObject(m_hEventRecalcDone, INFINITE);
      RecalcDone();
      EndWaitCursor();
    }
    else
    {
      AfxMessageBox(IDS_FILE_NOT_SAVED);
      return FALSE;
    }
  }
  return CDocument::OnSaveDocument(lpszPathName);
}

void CRecalcDoc::OnUpdateDemoThread ( CCmdUI * pCmdUI ) [protected]

Definition at line 279 of file recaldoc.cpp.

{
  pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrentDemoCommand);
}

void CRecalcDoc::OnUpdateKillWorkerThread ( CCmdUI * pCmdUI ) [protected]

Definition at line 310 of file recaldoc.cpp.

{
  pCmdUI->Enable(m_nCurrentDemoCommand == ID_WORKER_THREAD
      && m_pRecalcWorkerThread != NULL);
}

void CRecalcDoc::RecalcDone ( )

Definition at line 262 of file recaldoc.cpp.

{   // Called by the view when the worker thread sends a WM_USER_RECALC_DONE message.

  m_nSum = m_recalcThreadInfo.m_nSum;
  m_bRecalcNeeded = m_bRecalcInProgress = FALSE;
  UpdateAllViews(NULL, UPDATE_HINT_SUM);
}

void CRecalcDoc::RecalcInSecondThread ( )

Definition at line 227 of file recaldoc.cpp.

{
  if (m_pRecalcWorkerThread == NULL)
  {
    // Begin the worker thread.  It is ok to fill in the CThreadInfo
    // structure after the thread has started, because the thread
    // waits for the "start recalc" event before referring to the structure.
    m_pRecalcWorkerThread =
      AfxBeginThread(RecalcThreadProc, &m_recalcThreadInfo);
  }

  m_recalcThreadInfo.m_nInt1 = m_nInt1;
  m_recalcThreadInfo.m_nInt2 = m_nInt2;
  POSITION pos = GetFirstViewPosition();
  ASSERT(pos != NULL);
  CView* pView = GetNextView(pos);
  ENSURE(pView != NULL);
  m_recalcThreadInfo.m_hwndNotifyRecalcDone = pView->m_hWnd;
  m_recalcThreadInfo.m_hwndNotifyProgress = AfxGetMainWnd()->m_hWnd;
  m_recalcThreadInfo.m_nRecalcSpeedSeconds = m_nRecalcSpeedSeconds;

  // The events are initially set or reset in the CreateEvent call;
  // but they may be left in an improperly initialized state if
  // a worker thread has been previously started and then prematurely
  // killed.  Set/reset the events to the proper initial state.
  // Set the "start recalc" event last, since it is the event the
  // triggers the starting of the worker thread recalculation.
  SetEvent(m_hEventRecalcDone);
  ResetEvent(m_hEventKillRecalcThread);
  ResetEvent(m_hEventRecalcThreadKilled);
  SetEvent(m_hEventStartRecalc);
  // RecalcDone() will be called by the view when the thread sends a
  // WM_USER_RECALC_DONE message.
}

void CRecalcDoc::RecalcInSingleThread ( )

Definition at line 216 of file recaldoc.cpp.

{
  SlowAdd(m_nInt1, m_nInt2, m_nSum, NULL, m_nRecalcSpeedSeconds, AfxGetMainWnd()->m_hWnd);

  m_bRecalcNeeded = m_bRecalcInProgress = FALSE;

  // Update the "sum" field.
  UpdateAllViews(NULL, UPDATE_HINT_SUM);

}

void CRecalcDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 148 of file recaldoc.cpp.

{
  if (ar.IsStoring())
  {
    ar << (WORD)m_nInt1;
    ar << (WORD)m_nInt2;
    ar << (WORD)m_nSum;
  }
  else
  {
    WORD w;
    ar >> w;
    m_nInt1 = w;
    ar >> w;
    m_nInt2 = w;
    ar >> w;
    m_nSum = w;
  }
}

void CRecalcDoc::UpdateInt1AndInt2 | ( | int | n1,
 |  | int | n2,
 |  | BOOL | bForceRecalc
 | ) |  |

Definition at line 187 of file recaldoc.cpp.

{
  if (!bForceRecalc && m_nInt1 == n1 && m_nInt2 == n2)
    return;  // recalculation not needed

  SetModifiedFlag();
  m_nInt1 = n1;
  m_nInt2 = n2;

  m_bRecalcNeeded = m_bRecalcInProgress = TRUE;
  // Synchronize the int1 and int2 fields in the other views,
  // and show "recalculating..." in the sum field.
  UpdateAllViews(NULL);

  switch (m_nCurrentDemoCommand)
  {
    case ID_SINGLE_THREAD:
      RecalcInSingleThread();
      break;

    case ID_WORKER_THREAD:
      RecalcInSecondThread();
      break;
    default:
      ASSERT(FALSE);
  }
}

Member Data Documentation

BOOL CRecalcDoc::m_bRecalcInProgress

Definition at line 23 of file recaldoc.h.

BOOL CRecalcDoc::m_bRecalcNeeded

Definition at line 24 of file recaldoc.h.

HANDLE CRecalcDoc::m_hEventKillRecalcThread

Definition at line 32 of file recaldoc.h.

HANDLE CRecalcDoc::m_hEventRecalcDone

Definition at line 31 of file recaldoc.h.

HANDLE CRecalcDoc::m_hEventRecalcThreadKilled

Definition at line 33 of file recaldoc.h.

HANDLE CRecalcDoc::m_hEventStartRecalc

Definition at line 30 of file recaldoc.h.

UINT CRecalcDoc::m_nCurrentDemoCommand

Definition at line 27 of file recaldoc.h.

int CRecalcDoc::m_nInt1

Definition at line 20 of file recaldoc.h.

int CRecalcDoc::m_nInt2

Definition at line 21 of file recaldoc.h.

int CRecalcDoc::m_nRecalcSpeedSeconds

Definition at line 25 of file recaldoc.h.

int CRecalcDoc::m_nSum

Definition at line 22 of file recaldoc.h.

CWinThread* CRecalcDoc::m_pRecalcWorkerThread

Definition at line 28 of file recaldoc.h.

CRecalcThreadInfo CRecalcDoc::m_recalcThreadInfo

Definition at line 29 of file recaldoc.h.

The documentation for this class was generated from the following files:
  • advanced/mtrecalc/recaldoc.h
  • advanced/mtrecalc/recaldoc.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRecalcThreadInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

CRecalcThreadInfo Struct Reference

#include "calcthrd.h"

List of all members.

Public Attributes

HANDLE | m_hEventKillRecalcThread
HANDLE | m_hEventRecalcDone
HANDLE | m_hEventRecalcThreadKilled
HANDLE | m_hEventStartRecalc
HWND | m_hwndNotifyProgress
HWND | m_hwndNotifyRecalcDone
int | m_nInt1
int | m_nInt2
int | m_nRecalcSpeedSeconds
int | m_nSum

Detailed Description

Definition at line 13 of file calcthrd.h.

Member Data Documentation

HANDLE CRecalcThreadInfo::m_hEventKillRecalcThread

Definition at line 21 of file calcthrd.h.

HANDLE CRecalcThreadInfo::m_hEventRecalcDone

Definition at line 20 of file calcthrd.h.

HANDLE CRecalcThreadInfo::m_hEventRecalcThreadKilled

Definition at line 22 of file calcthrd.h.

HANDLE CRecalcThreadInfo::m_hEventStartRecalc

Definition at line 19 of file calcthrd.h.

HWND CRecalcThreadInfo::m_hwndNotifyProgress

Definition at line 24 of file calcthrd.h.

HWND CRecalcThreadInfo::m_hwndNotifyRecalcDone

Definition at line 18 of file calcthrd.h.

int CRecalcThreadInfo::m_nInt1

Definition at line 15 of file calcthrd.h.

int CRecalcThreadInfo::m_nInt2

Definition at line 16 of file calcthrd.h.

int CRecalcThreadInfo::m_nRecalcSpeedSeconds

Definition at line 23 of file calcthrd.h.

int CRecalcThreadInfo::m_nSum

Definition at line 17 of file calcthrd.h.

The documentation for this struct was generated from the following file:
  • advanced/mtrecalc/calcthrd.h
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRecalcView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CRecalcView Class Reference

#include "recalcvw.h"

List of all members.

Public Types

enum | { IDD = IDD_MTRECALC_FORM }

Public Member Functions

virtual | ~CRecalcView ()
CRecalcDoc * GetDocument ()

Public Attributes

CEdit | m_ctlSum
int | m_nInt1
int | m_nInt2

Protected Member Functions

CRecalcView ()
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnKillFocus ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *)
LRESULT | OnRecalcDone (WPARAM wParam, LPARAM lParam)
LRESULT | OnRecalcNowMsg (WPARAM wParam, LPARAM lParam)
afx_msg void | OnRecalculateNow ()
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)

Protected Attributes

BOOL | m_bFirstKillFocus

Detailed Description

Definition at line 14 of file recalcvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 22 of file recalcvw.h.

{ IDD = IDD_MTRECALC_FORM };

Constructor & Destructor Documentation

CRecalcView::CRecalcView ( ) [protected]

Definition at line 46 of file recalcvw.cpp.

  : CFormView(CRecalcView::IDD)
{
  //{{AFX_DATA_INIT(CRecalcView)
  m_nInt1 = 0;
  m_nInt2 = 0;
  //}}AFX_DATA_INIT

  m_bFirstKillFocus = FALSE;
}

CRecalcView::~CRecalcView ( ) [virtual]

Definition at line 57 of file recalcvw.cpp.

{
}

Member Function Documentation

void CRecalcView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 88 of file recalcvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CRecalcView)
  DDX_Control(pDX, IDC_SUM, m_ctlSum);
  DDX_Text(pDX, IDC_INT1, m_nInt1);
  DDX_Text(pDX, IDC_INT2, m_nInt2);
  //}}AFX_DATA_MAP
}

CRecalcDoc * CRecalcView::GetDocument ( ) [inline]

Definition at line 71 of file recalcvw.h.

   { return (CRecalcDoc*)m_pDocument; }

void CRecalcView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 107 of file recalcvw.cpp.

{
}

void CRecalcView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 111 of file recalcvw.cpp.

{
}

void CRecalcView::OnKillFocus ( ) [protected]

Definition at line 172 of file recalcvw.cpp.

{
  // See comment for OnRecalcNowMsg.

  // Only post the WM_USER_RECALC_NOW message if the view is not already
  // in the process of handling the first kill focus.  If UpdateData() fails
  // in the OnRecalcNowMsg handler, then the framework will call SetFocus()
  // to set the focus back on the control with the invalid value.  The SetFocus()
  // call will cause another WM_KILLFOCUS message to be sent.  If this OnKillFocus()
  // handler were to post yet another WM_USER_RECALC_NOW message, the program would
  // go into an infinite loop of attempting focus changes.

  if (!m_bFirstKillFocus)
  {
    PostMessage(WM_USER_RECALC_NOW, 0, 0);
    m_bFirstKillFocus = TRUE;
  }
}

BOOL CRecalcView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 101 of file recalcvw.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CRecalcView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * |  |
 | ) |  |  | [protected, virtual]

Definition at line 115 of file recalcvw.cpp.

{
}

LRESULT CRecalcView::OnRecalcDone | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 192 of file recalcvw.cpp.

{
  GetDocument()->RecalcDone();
  return 0;
}

LRESULT CRecalcView::OnRecalcNowMsg | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 150 of file recalcvw.cpp.

{
  // The WM_USER_RECALC_NOW message is posted by the view to itself whenever
  // the focus changes from one field to another.  The view cannot call
  // UpdateData() from the WM_KILLFOCUS handler because UpdateData() will
  // incorrectly try to call SetFocus() during the WM_KILLFOCUS if the
  // field exchange (DDX) or validation (DDV) fails.

  // The WM_USER_RECALC_NOW message is also posted by the document in other
  // circumstances (such as when the user is trying to save the document
  // before it has been recalculated).    In this case, the kill focus
  // problem is not an issue.

  BOOL bUpdateDataSuccess = UpdateData();
  m_bFirstKillFocus = FALSE;
  if (!bUpdateDataSuccess)
    return 0;

  GetDocument()->UpdateInt1AndInt2(m_nInt1, m_nInt2, FALSE);
  return 0;
}

void CRecalcView::OnRecalculateNow ( ) [protected]

Definition at line 142 of file recalcvw.cpp.

{
  if (!UpdateData())
    return;

  GetDocument()->UpdateInt1AndInt2(m_nInt1, m_nInt2, TRUE);
}

void CRecalcView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 61 of file recalcvw.cpp.

{
  CRecalcDoc* pDoc = GetDocument();
  if (lHint != UPDATE_HINT_SUM)
  {
    m_nInt1 = pDoc->m_nInt1;
    m_nInt2 = pDoc->m_nInt2;
    UpdateData(FALSE);
  }

  CString strSum;
  if (pDoc->m_bRecalcNeeded)
  {
    if (pDoc->m_bRecalcInProgress)
      strSum.LoadString(IDS_RECALCULATING);
    else
      strSum = _T("?");
  }
  else
  {
    strSum.Format(_T("%i"), pDoc->m_nSum);
  }
  m_ctlSum.SetWindowText(strSum);
  m_ctlSum.UpdateWindow();
}

Member Data Documentation

BOOL CRecalcView::m_bFirstKillFocus [protected]

Definition at line 32 of file recalcvw.h.

CEdit CRecalcView::m_ctlSum

Definition at line 23 of file recalcvw.h.

int CRecalcView::m_nInt1

Definition at line 24 of file recalcvw.h.

int CRecalcView::m_nInt2

Definition at line 25 of file recalcvw.h.

The documentation for this class was generated from the following files:
  • advanced/mtrecalc/recalcvw.h
  • advanced/mtrecalc/recalcvw.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRectDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CRectDlg Class Reference

#include "rectdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROP_RECT }
enum | { IDD = IDD_PROP_RECT }

Public Member Functions

CRectDlg (CWnd *pParent=NULL)
CRectDlg (CWnd *pParent=NULL)

Public Attributes

BOOL | m_bNoFill
UINT m_penSize
CSpinButtonCtrl | m_SpinCtrl

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 16 of file rectdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file rectdlg.h.

{ IDD = IDD_PROP_RECT };

anonymous enum
Enumerator:
IDD

Definition at line 23 of file rectdlg.h.

{ IDD = IDD_PROP_RECT };

Constructor & Destructor Documentation

CRectDlg::CRectDlg ( CWnd * pParent = NULL )

Definition at line 25 of file rectdlg.cpp.

  : CPropertyPage(CRectDlg::IDD)
{
  //{{AFX_DATA_INIT(CRectDlg)
  m_bNoFill = FALSE;
  m_penSize = 0;
  //}}AFX_DATA_INIT
}

CRectDlg::CRectDlg ( CWnd * pParent = NULL )

Member Function Documentation

void CRectDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file rectdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CRectDlg)
  DDX_Control(pDX, IDC_SPIN1, m_SpinCtrl);
  DDX_Check(pDX, IDC_NOFILL, m_bNoFill);
  DDX_Text(pDX, IDC_WEIGHT, m_penSize);
  DDV_MinMaxUInt(pDX, m_penSize, 0, 100);
  //}}AFX_DATA_MAP
}

virtual void CRectDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual BOOL CRectDlg::OnInitDialog ( ) [protected, virtual]
BOOL CRectDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 53 of file rectdlg.cpp.

{
  CDialog::OnInitDialog();

  m_SpinCtrl.SetRange(0, 100);
  m_SpinCtrl.SetBase(10);
  m_SpinCtrl.SetPos(1);
  return TRUE;
}

Member Data Documentation

BOOL CRectDlg::m_bNoFill

Definition at line 26 of file rectdlg.h.

UINT CRectDlg::m_penSize

Definition at line 27 of file rectdlg.h.

CSpinButtonCtrl CRectDlg::m_SpinCtrl

Definition at line 25 of file rectdlg.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/rectdlg.h
  • vc2008fp/DrawClient/rectdlg.h
  • ole/drawcli/rectdlg.cpp
  • vc2008fp/DrawClient/rectdlg.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRectItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions

CRectItem Class Reference

#include "rectitem.h"

List of all members.

Public Member Functions

CRectItem (COleDocument *pContainer)
~CRectItem ()
void | Dirty ()
CMainView * GetActiveView ()
CSize | GetBaseSize ()
CMainDoc * GetDocument ()
void | GetNativeClipboardData (COleDataSource *pDataSource)
CRect | GetRect ()
CSize | GetSize ()
void | Invalidate (CView *pNotThisView=NULL)
void | Move (CRect &rc)
virtual void | OnGetItemPosition (CRect &rPosition)
void | ResetSize ()
virtual void | Serialize (CArchive &ar)
void | SetBaseSize (CSize size)
void | SetRect (CRect &rect)
void | SetSize (CSize size)
BOOL | UpdateExtent ()

Public Attributes

CPoint | m_ptPos

Protected Member Functions

virtual void | OnActivate ()
virtual void | OnChange (OLE_NOTIFICATION wNotification, DWORD dwParam)
virtual BOOL | OnChangeItemPosition (const CRect &rectPos)
virtual void | OnDeactivateUI (BOOL bUndoable)
virtual COleDataSource * | OnGetClipboardData (BOOL bIncludeLink, LPPOINT lpOffset, LPSIZE lpSize)

Protected Attributes

CSize | m_sizeContent
CSize | m_sizeContentExtent
CSize | m_sizeIcon
CSize | m_sizeIconExtent

Private Member Functions

CRectItem ()

Detailed Description

Definition at line 16 of file rectitem.h.

Constructor & Destructor Documentation

CRectItem::CRectItem ( ) [private]

Definition at line 36 of file rectitem.cpp.

                     : m_ptPos(10, -10), m_sizeContent(0,0), m_sizeIcon(0,0),
  m_sizeContentExtent(0, 0), m_sizeIconExtent(0, 0)
{
}

CRectItem::CRectItem ( COleDocument * pContainer )

Definition at line 30 of file rectitem.cpp.

                                             : COleClientItem(pContainer) ,
  m_ptPos(10, -10), m_sizeContent(0,0), m_sizeIcon(0,0),
  m_sizeContentExtent(0, 0), m_sizeIconExtent(0, 0)
{
}

CRectItem::~CRectItem ( )

Definition at line 41 of file rectitem.cpp.

{
}

Member Function Documentation

void CRectItem::Dirty ( ) [inline]

Definition at line 41 of file rectitem.h.

    { GetDocument()->SetModifiedFlag(); }

CMainView* CRectItem::GetActiveView ( ) [inline]

Definition at line 37 of file rectitem.h.

    { return (CMainView*)COleClientItem::GetActiveView(); }

CSize CRectItem::GetBaseSize ( )

Definition at line 61 of file rectitem.cpp.

{
  DVASPECT dv = GetDrawAspect();
  if (dv == DVASPECT_ICON)
    return m_sizeIconExtent;
  else
    return m_sizeContentExtent;
}

CMainDoc* CRectItem::GetDocument ( ) [inline]

Definition at line 35 of file rectitem.h.

    { return (CMainDoc*)COleClientItem::GetDocument(); }

void CRectItem::GetNativeClipboardData ( COleDataSource * pDataSource )

Definition at line 293 of file rectitem.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(GetDocument());

  // Create a shared file and associate a CArchive with it
  CSharedFile file;
  CArchive ar(&file, CArchive::store);

  // Serialize selected objects to the archive
  Serialize(ar);
  ar.Close();
  pDataSource->CacheGlobalData(CMainDoc::m_cfPrivate, file.Detach());
}

CRect CRectItem::GetRect ( ) [inline]

Definition at line 31 of file rectitem.h.

    { return CRect(m_ptPos, GetSize()); }

CSize CRectItem::GetSize ( void )

Definition at line 52 of file rectitem.cpp.

{
  DVASPECT dv = GetDrawAspect();
  if (dv == DVASPECT_ICON)
    return m_sizeIcon;
  else
    return m_sizeContent;
}

void CRectItem::Invalidate ( CView * pNotThisView = NULL )

Definition at line 45 of file rectitem.cpp.

{
  GetDocument()->UpdateAllViews(pNotThisView, 0, this);
}

void CRectItem::Move ( CRect & rc )

Definition at line 221 of file rectitem.cpp.

{
  // invalidate old rect
  Invalidate();
  // invalidate new
  SetRect(rc);
  Invalidate();

  // update item rect when in-place active
  if (IsInPlaceActive())
    SetItemRects();
}

void CRectItem::OnActivate ( ) [protected, virtual]

Definition at line 165 of file rectitem.cpp.

{
  // allow only one inplace active item per frame
  CMainView* pView = GetActiveView();
  ASSERT_VALID(pView);
  COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
  if (pItem != NULL && pItem != this)
    pItem->Close();

  COleClientItem::OnActivate();

  // set selection to an item when it becomes active
  pView->SetSelection(this);
}

void CRectItem::OnChange | ( | OLE_NOTIFICATION | wNotification,
 |  | DWORD | dwParam |
 | ) |  |  | [protected, virtual]

Definition at line 191 of file rectitem.cpp.

{
  COleClientItem::OnChange(nCode, dwParam);
  switch(nCode)
  {
    case OLE_CHANGED:
      UpdateExtent();
      Invalidate();
      break;
    case OLE_CHANGED_ASPECT:
    case OLE_CHANGED_STATE:
      Invalidate();
      break;
  }
}

BOOL CRectItem::OnChangeItemPosition ( const CRect & rectPos ) [protected, virtual]

Definition at line 127 of file rectitem.cpp.

{
  CMainView* pView = GetActiveView();
  if (pView == NULL)
    return FALSE;
  ASSERT_VALID(pView);

  CRect rc = rectPos;
  pView->ClientToDoc(rc);

  if (rc != GetRect())
  {
    // The following lines were commented out because of a bug
    // in Microsoft Equation Editor 3.0.  The rc keeps growing
    // when activated/deactivated.
    // Uncomment them if necessary for other objects.

    /*
    // invalidate old item
    Invalidate();
    // update to new rectangle
    SetRect(rc);
    */

    GetDocument()->SetModifiedFlag();

    /*
    CSize sizeExtent;
    GetCachedExtent(&sizeExtent);
    SetBaseSize(sizeExtent);
    */

    // and invalidate new
    Invalidate();
  }
  return COleClientItem::OnChangeItemPosition(rectPos);
}

void CRectItem::OnDeactivateUI ( BOOL bUndoable ) [protected, virtual]

Definition at line 180 of file rectitem.cpp.

{
  COleClientItem::OnDeactivateUI(bUndoable);

  // hide the object if it is not an outside-in object
  DWORD dwMisc = 0;
  m_lpObject->GetMiscStatus(GetDrawAspect(), &dwMisc);
  if (dwMisc & OLEMISC_INSIDEOUT)
    DoVerb(OLEIVERB_HIDE, NULL);
}

COleDataSource * CRectItem::OnGetClipboardData | ( | BOOL | bIncludeLink,
 |  | LPPOINT | lpOffset,
 |  | LPSIZE | lpSize |
 | ) |  |  | [protected, virtual]

Definition at line 271 of file rectitem.cpp.

{
  ASSERT_VALID(this);

  COleDataSource* pDataSource = new COleDataSource;
  TRY
  {
    GetNativeClipboardData(pDataSource);
    GetClipboardData(pDataSource, bIncludeLink, lpOffset, lpSize);
  }
  CATCH_ALL(e)
  {
    delete pDataSource;
    THROW_LAST();
  }
  END_CATCH_ALL

  ASSERT_VALID(pDataSource);
  return pDataSource;
}

void CRectItem::OnGetItemPosition ( CRect & rPosition ) [virtual]

Definition at line 207 of file rectitem.cpp.

{
  ASSERT_VALID(this);

  if (GetSize() == CSize(0,0))
    UpdateExtent();

  // copy m_rect, which is in document coordinates
  rPosition = GetRect();
  CMainView* pView = GetActiveView();
  ASSERT_VALID(pView);
  pView->DocToClient(rPosition);
}

void CRectItem::ResetSize ( )

Definition at line 262 of file rectitem.cpp.

{
  ASSERT_VALID(this);
  Invalidate();
  SetBaseSize(CSize(0, 0));
  UpdateExtent();
}

void CRectItem::Serialize ( CArchive & ar ) [virtual]

Definition at line 234 of file rectitem.cpp.

{
  CRect rect;

  // IMPORTANT: when using "easy" serialize -- call base class FIRST!
  //  (not strictly necessary, but a good idea)
  COleClientItem::Serialize(ar);

  // now store/retrieve data specific to CRectItem
  if (ar.IsStoring())
  {
    WORD w = 0x5500;        // magic value
    ar << w << m_ptPos << m_sizeIcon << m_sizeIconExtent <<
      m_sizeContent << m_sizeContentExtent;
  }
  else
  {
    WORD w;
    ar >> w >> m_ptPos >> m_sizeIcon >> m_sizeIconExtent >>
      m_sizeContent >> m_sizeContentExtent;
    if (w != 0x5500)
    {
      TRACE0("Bad magic number in front of an item wnd\n");
      AfxThrowArchiveException(CArchiveException::genericException);
    }
  }
}

void CRectItem::SetBaseSize ( CSize size )

Definition at line 79 of file rectitem.cpp.

{
  DVASPECT dv = GetDrawAspect();
  if (dv == DVASPECT_ICON)
    m_sizeIconExtent = size;
  else
    m_sizeContentExtent = size;
}

void CRectItem::SetRect ( CRect & rect )

Definition at line 88 of file rectitem.cpp.

{
  m_ptPos = rect.TopLeft();
  SetSize(rect.Size());
}

void CRectItem::SetSize ( CSize size )

Definition at line 70 of file rectitem.cpp.

{
  DVASPECT dv = GetDrawAspect();
  if (dv == DVASPECT_ICON)
    m_sizeIcon = size;
  else
    m_sizeContent = size;
}

BOOL CRectItem::UpdateExtent ( )

Definition at line 94 of file rectitem.cpp.

{
  // get size in pixels
  CSize size;
  if (!GetCachedExtent(&size))
    return FALSE;       // blank
  Invalidate();   // invalidate the old size/position
  CSize sizeBase = GetBaseSize();
  if (size == sizeBase) // no change
    return FALSE;
  // if new object (i.e. m_extent is empty) setup position
  if (sizeBase == CSize(0,0))
  {
    // convert to document coords
    CSize sizeNew(MulDiv(size.cx, 10, 254), - MulDiv(size.cy, 10, 254));
    SetSize(sizeNew);
  }
  else
  {
    if (!IsInPlaceActive() && size != sizeBase)
    {
      // data changed and not inplace, so scale up rect as well
      CSize sizeCur = GetSize();
      sizeCur.cx = MulDiv(sizeCur.cx, size.cx, sizeBase.cx);
      sizeCur.cy = - MulDiv(-sizeCur.cy, size.cy, sizeBase.cy);
      SetSize(sizeCur);
    }
  }
  SetBaseSize(size);
  Invalidate();   // as well as the new size/position
  return TRUE;
}

Member Data Documentation

CPoint CRectItem::m_ptPos

Definition at line 26 of file rectitem.h.

CSize CRectItem::m_sizeContent [protected]

Definition at line 64 of file rectitem.h.

CSize CRectItem::m_sizeContentExtent [protected]

Definition at line 66 of file rectitem.h.

CSize CRectItem::m_sizeIcon [protected]

Definition at line 63 of file rectitem.h.

CSize CRectItem::m_sizeIconExtent [protected]

Definition at line 65 of file rectitem.h.

The documentation for this class was generated from the following files:
  • ole/oclient/rectitem.h
  • ole/oclient/rectitem.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRectThread Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CRectThread Class Reference

#include "threads.h"

Inherits CGDIThread.

List of all members.

Public Member Functions

CRectThread (CWnd *pWnd, HDC hDC, CPoint ptPos, CPoint ptVel, CSize Size, COLORREF color)
virtual BOOL | InitInstance ()
virtual void | SingleStep ()

Public Attributes

CBrush | m_brush
HBRUSH | m_hBrush
CPoint | m_ptVelocity
CRect | m_rectPosition

Protected Member Functions

virtual | ~CRectThread ()

Detailed Description

Definition at line 104 of file threads.h.

Constructor & Destructor Documentation

CRectThread::CRectThread | ( | CWnd * | pWnd,
 |  | HDC | hDC,
 |  | CPoint | ptPos,
 |  | CPoint | ptVel,
 |  | CSize | Size,
 |  | COLORREF | color
 | ) |  |

Definition at line 210 of file threads.cpp.

                              : CGDIThread(pWnd, hDC)
{
  m_rectPosition.SetRect(ptPos.x ,ptPos.y, ptPos.x+Size.cx, ptPos.y+Size.cy);
  m_ptVelocity = ptVel;

  CBrush brush(color);
  m_hBrush = (HBRUSH)brush.Detach();
}

virtual CRectThread::~CRectThread ( ) [inline, protected, virtual]

Definition at line 130 of file threads.h.

{};

Member Function Documentation

BOOL CRectThread::InitInstance ( ) [virtual]

Reimplemented from CGDIThread.

Definition at line 220 of file threads.cpp.

{
  m_brush.Attach(m_hBrush);

  return CGDIThread::InitInstance();
}

void CRectThread::SingleStep ( ) [virtual]

Implements CGDIThread.

Definition at line 227 of file threads.cpp.

{
  m_rectPosition.OffsetRect(m_ptVelocity);

  if (m_rectPosition.top<m_rectBorder.top)
    m_ptVelocity.y = (m_ptVelocity.y>0) ? m_ptVelocity.y : -m_ptVelocity.y;

  if (m_rectPosition.bottom>m_rectBorder.bottom)
    m_ptVelocity.y = (m_ptVelocity.y>0) ? -m_ptVelocity.y : m_ptVelocity.y;

  if (m_rectPosition.left<m_rectBorder.left)
    m_ptVelocity.x = (m_ptVelocity.x>0) ? m_ptVelocity.x : -m_ptVelocity.x;

  if (m_rectPosition.right>m_rectBorder.right)
    m_ptVelocity.x = (m_ptVelocity.x>0) ? -m_ptVelocity.x : m_ptVelocity.x;

  // Since all threads share the same HDC it is necessary
  // to block all other threads while we render in the HDC
  EnterCriticalSection(&CGDIThread::m_csGDILock);
  {
    CBrush* oldbrush;

    oldbrush = m_dc.SelectObject(&m_brush);
    m_dc.Rectangle(m_rectPosition);
    m_dc.SelectObject(oldbrush);

    // Win32 optimizes GDI calls by collecting them in a batch
    // and then thunking the whole batch at once on a per
    // thread basis.  Since we share an HDC with multiple
    // threads, we must flush the batch before yielding to
    // other threads that will adjust the HDC.  To see what
    // I mean, comment out the GdiFlush() function call and
    // watch the results.
    GdiFlush();
  }
  LeaveCriticalSection(&CGDIThread::m_csGDILock);
}

Member Data Documentation

CBrush CRectThread::m_brush

Definition at line 116 of file threads.h.

HBRUSH CRectThread::m_hBrush

Definition at line 115 of file threads.h.

CPoint CRectThread::m_ptVelocity

Definition at line 114 of file threads.h.

CRect CRectThread::m_rectPosition

Definition at line 113 of file threads.h.

The documentation for this class was generated from the following files:
  • advanced/mtgdi/threads.h
  • advanced/mtgdi/threads.cpp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRectTool Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRectTool Class Reference

#include "drawtool.h"

Inherits CDrawTool, and CDrawTool.

List of all members.

Public Member Functions

CRectTool (DrawShape drawShape)
CRectTool (DrawShape drawShape)
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)

Detailed Description

Definition at line 69 of file drawtool.h.

Constructor & Destructor Documentation

CRectTool::CRectTool ( DrawShape drawShape )

Definition at line 296 of file drawtool.cpp.

  : CDrawTool(drawShape)
{
}

CRectTool::CRectTool ( DrawShape drawShape )

Member Function Documentation

void CRectTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 338 of file drawtool.cpp.

{
  CDrawTool::OnLButtonDblClk(pView, nFlags, point);
}

virtual void CRectTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

void CRectTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 301 of file drawtool.cpp.

{
  CDrawTool::OnLButtonDown(pView, nFlags, point);

  CPoint local = point;
  pView->ClientToDoc(local);

  CDrawRect* pObj = new CDrawRect(CRect(local, CSize(0, 0)));
  switch (m_drawShape)
  {
  default:
    ASSERT(FALSE); // unsuported shape!

  case rect:
    pObj->m_nShape = CDrawRect::rectangle;
    break;

  case roundRect:
    pObj->m_nShape = CDrawRect::roundRectangle;
    break;

  case ellipse:
    pObj->m_nShape = CDrawRect::ellipse;
    break;

  case line:
    pObj->m_nShape = CDrawRect::line;
    break;
  }
  pView->GetDocument()->Add(pObj);
  pView->Select(pObj);

  selectMode = size;
  nDragHandle = 1;
  lastPoint = local;
}

virtual void CRectTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

virtual void CRectTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

void CRectTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 343 of file drawtool.cpp.

{
  if (point == c_down)
  {
    // Don't create empty objects...
    CDrawObj *pObj = pView->m_selection.GetTail();
    pView->GetDocument()->Remove(pObj);
    pObj->Remove();
    selectTool.OnLButtonDown(pView, nFlags, point); // try a select!
  }

  selectTool.OnLButtonUp(pView, nFlags, point);
}

void CRectTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 357 of file drawtool.cpp.

{
  SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));
  selectTool.OnMouseMove(pView, nFlags, point);
}

virtual void CRectTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawtool.h
  • vc2008fp/DrawClient/drawtool.h
  • ole/drawcli/drawtool.cpp
  • vc2008fp/DrawClient/drawtool.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRegEntry Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CRegEntry Class Reference

List of all members.

Public Member Functions

CRegEntry (const CString &rstrKey, const CString &rstrValue)
virtual | ~CRegEntry ()

Public Attributes

TCHAR * | m_pszText
CString | m_strKey
CString | m_strValue

Detailed Description

Definition at line 28 of file regview.cpp.

Constructor & Destructor Documentation

CRegEntry::CRegEntry | ( | const CString & | rstrKey,
 |  | const CString & | rstrValue
 | ) |  |

Definition at line 40 of file regview.cpp.

{
  m_strKey = rstrKey ;
  m_strValue = rstrValue ;
  m_pszText = NULL ;
}

CRegEntry::~CRegEntry ( ) [virtual]

Definition at line 47 of file regview.cpp.

{
  if (m_pszText != NULL)
    delete []m_pszText ;
  m_pszText = NULL ;
}

Member Data Documentation

TCHAR* CRegEntry::m_pszText

Definition at line 37 of file regview.cpp.

CString CRegEntry::m_strKey

Definition at line 35 of file regview.cpp.

CString CRegEntry::m_strValue

Definition at line 36 of file regview.cpp.

The documentation for this class was generated from the following file:
  • ole/oleview/regview.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRegisterControlsDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CRegisterControlsDlg Class Reference

#include "RegCtlDg.H"

List of all members.

Public Types

enum | { IDD = IDD_REGISTERCONTROLS }

Public Member Functions

CRegisterControlsDlg (CWnd *pParent=NULL)

Public Attributes

CButton | m_butReregister
CButton | m_butUnregister
CListCtrl | m_lvRegisteredControls

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()
afx_msg void | OnRegister ()
afx_msg void | OnRegisteredControlsItemChanged (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnReregister ()
afx_msg void | OnUnregister ()
void | RefreshRegisteredControls ()
void | UpdateButtons ()

Detailed Description

Definition at line 22 of file RegCtlDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file RegCtlDg.H.

{ IDD = IDD_REGISTERCONTROLS };

Constructor & Destructor Documentation

CRegisterControlsDlg::CRegisterControlsDlg ( CWnd * pParent = NULL )

Definition at line 24 of file RegCtlDg.Cpp.

                                                          :
   CDialog( CRegisterControlsDlg::IDD, pParent )
{
  //{{AFX_DATA_INIT(CRegisterControlsDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CRegisterControlsDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 33 of file RegCtlDg.Cpp.

{
  CDialog::DoDataExchange( pDX );

  //{{AFX_DATA_MAP(CRegisterControlsDlg)
  DDX_Control(pDX, IDC_REREGISTER, m_butReregister);
  DDX_Control(pDX, IDC_UNREGISTER, m_butUnregister);
  DDX_Control(pDX, IDC_REGISTEREDCONTROLS, m_lvRegisteredControls);
  //}}AFX_DATA_MAP
}

void CRegisterControlsDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 405 of file RegCtlDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CRegisterControlsDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 397 of file RegCtlDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CRegisterControlsDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 59 of file RegCtlDg.Cpp.

{
   CWaitCursor wait;

   CString strColumnTitle;

   CDialog::OnInitDialog();

   LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_PROGID);
   m_lvRegisteredControls.InsertColumn( 0, strColumnTitle, LVCFMT_LEFT, 200 );
   LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_PATH);
   m_lvRegisteredControls.InsertColumn( 1, strColumnTitle, LVCFMT_LEFT, 250 );

   RefreshRegisteredControls();

   return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

void CRegisterControlsDlg::OnRegister ( ) [protected]

Definition at line 359 of file RegCtlDg.Cpp.

{
   POSITION posPathName;
   CString strPathName;
   int nResult;

   CFileDialog dlg( TRUE, _T( "dll" ), NULL, OFN_HIDEREADONLY|
    OFN_FILEMUSTEXIST|OFN_ALLOWMULTISELECT, _T(
    "ActiveX Controls|*.dll;*.ocx;*.ax||" ) );

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   CWaitCursor wait;

   posPathName = dlg.GetStartPosition();
   while( posPathName != NULL )
   {
    strPathName = dlg.GetNextPathName( posPathName );
    RegisterServer( strPathName );
   }

   RefreshRegisteredControls();
}

void CRegisterControlsDlg::OnRegisteredControlsItemChanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 292 of file RegCtlDg.Cpp.

{
   (void)pNMHDR;

   UpdateButtons();

  *pResult = 0;
}

void CRegisterControlsDlg::OnReregister ( ) [protected]

Definition at line 337 of file RegCtlDg.Cpp.

{
   CWaitCursor wait;

   UINT nSelectedItems;
   int iItem;
   CString strPath;

   iItem = -1;
   nSelectedItems = m_lvRegisteredControls.GetSelectedCount();
   while( nSelectedItems > 0 )
   {
    iItem = m_lvRegisteredControls.GetNextItem( iItem, LVNI_SELECTED );
    ASSERT( iItem != -1 );
    strPath = m_lvRegisteredControls.GetItemText( iItem, 1 );
    RegisterServer( strPath );
    nSelectedItems--;
   }

   RefreshRegisteredControls();
}

void CRegisterControlsDlg::OnUnregister ( ) [protected]

Definition at line 211 of file RegCtlDg.Cpp.

{
   CWaitCursor wait;

   UINT nSelectedItems;
   int iItem;
   CString strPath;
   HINSTANCE hLibrary;
   PDLLUNREGISTERSERVER pDllUnregisterServer;
   HRESULT hResult;
   int nResult;

   iItem = -1;
   nSelectedItems = m_lvRegisteredControls.GetSelectedCount();
   while( nSelectedItems > 0 )
   {
    iItem = m_lvRegisteredControls.GetNextItem( iItem, LVNI_SELECTED );
    ASSERT( iItem != -1 );

    strPath = m_lvRegisteredControls.GetItemText( iItem, 1 );
    TCTrace( TRACELEVEL_NORMAL, "Unregistering %s\n", LPCTSTR( strPath ) );

    hResult = S_OK;

    hLibrary = LoadLibrary( strPath );
    if( hLibrary == NULL )
    {
     TCTrace( TRACELEVEL_NORMAL, "Failed to load library %s.\n", LPCTSTR(
      strPath ) );
     hResult = E_FAIL;
    }
    else
    {
     pDllUnregisterServer = PDLLUNREGISTERSERVER( GetProcAddress( hLibrary,
      _T( "DllUnregisterServer" ) ) );
     if( pDllUnregisterServer == NULL )
     {
      TCTrace( TRACELEVEL_NORMAL,
         "Failed to get address of DllUnregisterServer.\n" );
      hResult = E_FAIL;
     }
     else
     {
      hResult = pDllUnregisterServer();
      if( FAILED( hResult ) )
      {
         TCTrace( TRACELEVEL_NORMAL,
          "DllUnregisterServer failed hResult = 0x%x.\n", hResult );
      }
     }
     FreeLibrary( hLibrary );
    }

    if( FAILED( hResult ) )
    {
     nResult = AfxMessageBox( IDS_UNREGISTERSERVERFAILED, MB_YESNO );
     if( nResult == IDYES )
     {
     }
    }

    nSelectedItems--;
   }

   RefreshRegisteredControls();
}

void CRegisterControlsDlg::RefreshRegisteredControls ( ) [protected]

Definition at line 121 of file RegCtlDg.Cpp.

{
   HKEY hkCLSID;
   LONG lResult;
   DWORD iIndex;
   DWORD nSubkeyLength;
   FILETIME time;
   BOOL tStopEnumerating;
   DWORD dwType;
   DWORD nDataLength;
   TCHAR szProgID[80];
   TCHAR szInprocServer32[MAX_PATH];
   TCHAR szSubkey[MAX_PATH];
   HKEY hkSubkey;
   HKEY hkInprocServer32;
   HKEY hkProgID;
   int iItem;

   m_lvRegisteredControls.SetRedraw(FALSE);
   m_lvRegisteredControls.DeleteAllItems();

   lResult = RegOpenKeyEx( HKEY_CLASSES_ROOT, _T( "CLSID" ), 0, KEY_READ,
    &hkCLSID );
   if( lResult != ERROR_SUCCESS )
   {
    return;
   }

   iIndex = 0;
   tStopEnumerating = FALSE;
   while( !tStopEnumerating )
   {
    nSubkeyLength = sizeof( szSubkey )/sizeof( szSubkey[0] );
    lResult = RegEnumKeyEx( hkCLSID, iIndex, szSubkey, &nSubkeyLength, NULL,
     NULL, NULL, &time );
    if( lResult == ERROR_SUCCESS )
    {
     lResult = RegOpenKeyEx( hkCLSID, szSubkey, 0, KEY_READ, &hkSubkey );
     if( lResult == ERROR_SUCCESS )
     {
      if( IsAControl( hkSubkey ) )
      {
         lResult = RegOpenKeyEx( hkSubkey, _T( "InprocServer32" ), 0,
          KEY_READ, &hkInprocServer32 );
         if( lResult == ERROR_SUCCESS )
         {
          nDataLength = sizeof( szInprocServer32 );
          lResult = RegQueryValueEx( hkInprocServer32, NULL, NULL,
           &dwType, LPBYTE( szInprocServer32 ), &nDataLength );
          RegCloseKey( hkInprocServer32 );
          if( (lResult == ERROR_SUCCESS) && (dwType == REG_SZ) )
          {
           lResult = RegOpenKeyEx( hkSubkey, _T( "ProgID" ), 0,
            KEY_READ, &hkProgID );
           if( lResult == ERROR_SUCCESS )
           {
            nDataLength = sizeof( szProgID );
            lResult = RegQueryValueEx( hkProgID, NULL, NULL,
               &dwType, LPBYTE( szProgID ), &nDataLength );
            RegCloseKey( hkProgID );
            if( (lResult == ERROR_SUCCESS) && (dwType == REG_SZ) )
            {
               iItem = m_lvRegisteredControls.InsertItem( 0,
                szProgID );
               m_lvRegisteredControls.SetItemText( iItem, 0,
                szProgID );
               m_lvRegisteredControls.SetItemText( iItem, 1,
                szInprocServer32 );
            }
           }
          }
         }
      }
     }
    }
    else
    {
     tStopEnumerating = TRUE;
    }
    iIndex++;
   }

   m_lvRegisteredControls.SetRedraw(TRUE);
   m_lvRegisteredControls.Invalidate();
   UpdateButtons();
}

void CRegisterControlsDlg::UpdateButtons ( ) [protected]

Definition at line 278 of file RegCtlDg.Cpp.

{
   if( m_lvRegisteredControls.GetSelectedCount() > 0 )
   {
    m_butReregister.EnableWindow( TRUE );
    m_butUnregister.EnableWindow( TRUE );
   }
   else
   {
    m_butReregister.EnableWindow( FALSE );
    m_butUnregister.EnableWindow( FALSE );
   }
}

Member Data Documentation

CButton CRegisterControlsDlg::m_butReregister

Definition at line 31 of file RegCtlDg.H.

CButton CRegisterControlsDlg::m_butUnregister

Definition at line 32 of file RegCtlDg.H.

CListCtrl CRegisterControlsDlg::m_lvRegisteredControls

Definition at line 33 of file RegCtlDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/RegCtlDg.H
  • ole/TstCon/RegCtlDg.Cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRegistryView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CRegistryView Class Reference

#include "regview.h"

List of all members.

Public Types

enum | { IDD = IDD_REGVIEW }

Public Member Functions

COle2ViewDoc * GetDocument ()
virtual void | OnInitialUpdate ()

Public Attributes

CStatic | m_CLSID
CStatic | m_icon
CStatic | m_Name
CTreeCtrl | m_tree

Protected Member Functions

CRegistryView ()
virtual | ~CRegistryView ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDeleteItemTreeView (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnGetDispInfoTreeView (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnSetDispInfoTreeView (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnTreeViewItemExpanding (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnUnregister ()
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)

Detailed Description

Definition at line 23 of file regview.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 34 of file regview.h.

{ IDD = IDD_REGVIEW };

Constructor & Destructor Documentation

CRegistryView::CRegistryView ( ) [protected]

Definition at line 59 of file regview.cpp.

  : CFormView(CRegistryView::IDD)
{
  //{{AFX_DATA_INIT(CRegistryView)
  //}}AFX_DATA_INIT
}

CRegistryView::~CRegistryView ( ) [protected, virtual]

Definition at line 77 of file regview.cpp.

{
}

Member Function Documentation

void CRegistryView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 81 of file regview.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CRegistryView)
  DDX_Control(pDX, IDC_OBJECTNAME, m_Name);
  DDX_Control(pDX, IDC_OBJECTCLSID, m_CLSID);
  DDX_Control(pDX, IDC_OBJICON, m_icon);
  DDX_Control(pDX, IDC_TREEVIEW, m_tree);
  //}}AFX_DATA_MAP
}

COle2ViewDoc * CRegistryView::GetDocument ( ) [inline]

Definition at line 78 of file regview.h.

   { return (COle2ViewDoc*) m_pDocument; }

void CRegistryView::OnDeleteItemTreeView | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 594 of file regview.cpp.

{
  NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;

  if (pNMTreeView->itemOld.lParam)
  {
    delete (CRegEntry*)pNMTreeView->itemOld.lParam;
  }

  *pResult = 0;
}

void CRegistryView::OnGetDispInfoTreeView | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 557 of file regview.cpp.

{
/*
  TV_DISPINFO * pdispinfo = (TV_DISPINFO*)pNMHDR;
  CRegEntry* pentry = (CRegEntry*)pdispinfo->item.lParam ;
  if (pentry)
  {
    //if (pentry->m_pszText)
    //{
    //    delete []pentry->m_pszText ;
    //    pentry->m_pszText = NULL ;
    //}
    if (pdispinfo->item.mask & TVIF_TEXT)
    {
      if (pentry->m_pszText)
        pdispinfo->item.pszText = pentry->m_pszText ;
      else
      {
        pentry->m_pszText = new TCHAR[pentry->m_strKey.GetLength() + pentry->m_strKey.GetLength() + 4] ;
        wsprintf( pentry->m_pszText, _T("%s = %s"), (LPCTSTR)pentry->m_strKey, (LPCTSTR)pentry->m_strValue ) ;
        pdispinfo->item.pszText = pentry->m_pszText ;
        pdispinfo->item.mask = TVIF_TEXT ;
      }
    }
  }
*/
  *pResult = 0;
}

void CRegistryView::OnInitialUpdate ( ) [virtual]

Definition at line 144 of file regview.cpp.

{
  CFormView::OnInitialUpdate();

  CRect rc ;
  CRect rcClient ;
  GetWindowRect( &rcClient ) ;
  //GetParent()->ScreenToClient( &rcClient ) ;
  m_tree.GetWindowRect( &rc ) ;
  ScreenToClient( &rc ) ;

  m_tree.SetWindowPos( NULL, 4, rc.top, rcClient.Width() - 8,
             rcClient.Height() - rc.top - 4,
             SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOZORDER ) ;

  m_tree.SetFocus() ;

  m_tree.SetIndent( 0 ) ;

  SetScrollSizes( MM_TEXT, CSize(1,1) ) ;
}

void CRegistryView::OnSetDispInfoTreeView | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 586 of file regview.cpp.

{
  // TV_DISPINFO * pdispinfo = (TV_DISPINFO*)pNMHDR;
  // TODO: Add your control notification handler code here

  *pResult = 0;
}

void CRegistryView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 124 of file regview.cpp.

{
  CFormView::OnSize(nType, cx, cy);

  if (m_tree.GetSafeHwnd())
  {
    CRect rc ;
    m_tree.GetWindowRect( &rc ) ;
    ScreenToClient( &rc ) ;
    m_tree.SetWindowPos( NULL, 4, rc.top, cx-8, cy - rc.top - 4,
              SWP_NOACTIVATE|SWP_NOZORDER ) ;
  }
}

void CRegistryView::OnTreeViewItemExpanding | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 547 of file regview.cpp.

{
  NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;

  if (pNMTreeView->action == TVE_COLLAPSE)
    *pResult = 1 ; // prevent collapse
  else
    *pResult = 0 ;
}

void CRegistryView::OnUnregister ( ) [protected]

Definition at line 138 of file regview.cpp.

{
  // TODO: Add your control notification handler code here

}

void CRegistryView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 166 of file regview.cpp.

{
  if (lHint & UPD_NOINTERFACEVIEW || lHint & UPD_NOOBJECTVIEW)
    return ;

  COle2ViewDoc* pDoc = GetDocument() ;

  BeginWaitCursor() ;
  m_tree.SetRedraw(FALSE) ;
  m_tree.DeleteAllItems() ;
  if (IsEqualCLSID( pDoc->m_clsidCur, CLSID_NULL ))
  {
    m_Name.SetWindowText("") ;
    m_CLSID.SetWindowText("") ;
    m_icon.SetIcon( theApp.LoadIcon( IDR_MAINFRAME ) ) ;
    m_tree.SetRedraw(TRUE) ;
    EndWaitCursor() ;
    return ;
  }

  // Fill the listbox with useful info about the class
  //
  HICON   hicon = NULL ;
  HKEY    hk ;

  OLECHAR szOleCLSID[64];
  ::StringFromGUID2( pDoc->m_clsidCur, szOleCLSID,
    sizeof(szOleCLSID)/sizeof(OLECHAR) ) ;
  COLE2T lpszCLSID(szOleCLSID);
  m_CLSID.SetWindowText( lpszCLSID ) ;
  m_Name.SetWindowText( pDoc->m_szObjectCur ) ;

  TCHAR           szKey[MAX_VALLEN] ;
  TCHAR           szBuf[MAX_VALLEN] ;

  TV_INSERTSTRUCT tvis ;
  tvis.hParent = TVI_ROOT ;
  tvis.hInsertAfter = TVI_LAST ;
  tvis.item.mask = TVIF_TEXT | TVIF_PARAM ;

  if (pDoc->m_fTypeLib)
  {
    // HKEY_CLASSES_ROOT\TypeLib
    _stprintf_s( szBuf, MAX_VALLEN, _T("TypeLib\\%s"), lpszCLSID ) ;
    if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hk) == ERROR_SUCCESS)
    {
      LONG cb ;
      cb = sizeof(szBuf) ;
      RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)_T("TypeLib"), szBuf, &cb) ;
      tvis.hParent = TVI_ROOT ;
      _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("TypeLib"), (LPCTSTR)szBuf ) ;
      tvis.item.pszText = szKey ;
      #pragma warning(suppress: 6014) // unexpected prefast leaking memory warning
      tvis.item.lParam = (LPARAM)new CRegEntry( _T("TypeLib"), szBuf ) ;
      HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
      RegToListBox( &m_tree, (LPTSTR)lpszCLSID, hk, htree ) ;
      m_tree.Expand( htree, TVE_EXPAND ) ;
      m_icon.SetIcon( theApp.LoadIcon( IDI_AUTOMATION ) ) ;

      RegCloseKey( hk ) ;
    }
    else
      m_icon.SetIcon( theApp.LoadIcon( IDI_NOICON ) ) ;
  }
  else if (pDoc->m_fInterface)
  {
    // HKEY_CLASSES_ROOT\Interface
    _stprintf_s( szBuf, MAX_VALLEN, _T("Interface\\%s"), lpszCLSID ) ;
    if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hk) == ERROR_SUCCESS)
    {
      LONG cb = sizeof(szBuf) ;
      RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)_T("Interface"), szBuf, &cb) ;

      tvis.hParent = TVI_ROOT ;
      _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("Interface"), (LPCTSTR)szBuf ) ;
      tvis.item.pszText = szKey ;
      tvis.item.lParam = (LPARAM)new CRegEntry( _T("Interface"), szBuf ) ;
      HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
      RegToListBox( &m_tree, (LPTSTR) lpszCLSID, hk, htree ) ;
      m_tree.Expand( htree, TVE_EXPAND ) ;

      cb = sizeof(szBuf) ;
      if (RegQueryValue( hk, (LPTSTR)_T("BaseInterface"), szBuf, &cb) == ERROR_SUCCESS &&
        *szBuf != '\0')
      {
        HKEY hk2 ;
        if (RegOpenKey( HKEY_CLASSES_ROOT, CString("Interface\\") + szBuf, &hk2) == ERROR_SUCCESS)
        {
          RegToListBox( &m_tree, szBuf, hk2, htree ) ;
          RegCloseKey( hk2 ) ;
        }
      }

      cb = sizeof(szBuf) ;
      LONG cb2 = sizeof(szBuf) ;
      if (RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid32"), szBuf, &cb) == ERROR_SUCCESS ||
        RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid"), szBuf, &cb2) == ERROR_SUCCESS)
      {
        cb = sizeof(szBuf) ;
        *szBuf = '\0' ;
        RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"CLSID", szBuf, &cb) ;
        _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("CLSID"), (LPCTSTR)szBuf ) ;
        tvis.item.pszText = szKey ;
        tvis.item.lParam = (LPARAM)new CRegEntry( "CLSID", szBuf ) ;
        HTREEITEM htreeCLSID = m_tree.InsertItem( &tvis ) ;
        HKEY hk2 ;
        if (RegOpenKey( HKEY_CLASSES_ROOT, "CLSID", &hk2) == ERROR_SUCCESS)
        {
          cb = sizeof(szBuf) ;
          if (RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid32"), szBuf, &cb) == ERROR_SUCCESS)
          {
            HKEY hk3 ;
            if (RegOpenKey( hk2, szBuf, &hk3) == ERROR_SUCCESS)
              RegToListBox( &m_tree, szBuf, hk3, htreeCLSID ) ;
            RegCloseKey( hk3 ) ;
          }

          cb = sizeof(szKey) ;
          if (RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid"), szKey, &cb) == ERROR_SUCCESS)
          {
            if (lstrcmpi(szKey,szBuf) != 0)
            {
              HKEY hk3 ;
              if (RegOpenKey( hk2, szKey, &hk3) == ERROR_SUCCESS)
                RegToListBox( &m_tree, szKey, hk3, htreeCLSID ) ;
              RegCloseKey( hk3 ) ;
            }
          }

          RegCloseKey( hk2 ) ;
        }
        m_tree.Expand( htreeCLSID, TVE_EXPAND ) ;
      }

      cb = sizeof(szBuf) ;
      if (RegQueryValue( hk, (LPTSTR)_T("TypeLib"), szBuf, &cb) == ERROR_SUCCESS)
      {
        _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("TypeLib"), (LPCTSTR)szBuf ) ;
        tvis.item.pszText = szKey ;
        tvis.item.lParam = (LPARAM)new CRegEntry( "TypeLib", szBuf ) ;
        htree = m_tree.InsertItem( &tvis ) ;

        HKEY hk2 ;
        if (RegOpenKey( HKEY_CLASSES_ROOT, CString("TypeLib\\") + szBuf, &hk2) == ERROR_SUCCESS)
        {
          RegToListBox( &m_tree, szBuf, hk2, htree ) ;
          RegCloseKey( hk2 ) ;
        }
        m_tree.Expand( htree, TVE_EXPAND ) ;
      }

      RegCloseKey( hk ) ;

      m_icon.SetIcon( theApp.LoadIcon( IDI_INTERFACE ) ) ;
    }
    else
      m_icon.SetIcon( theApp.LoadIcon( IDI_NOICON ) ) ;
  }
  else
  {
    LONG cb = sizeof( szBuf );
    *szBuf = '\0' ;
    RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"CLSID", szBuf, &cb) ;
    _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("CLSID"), (LPCTSTR)szBuf ) ;
    tvis.item.pszText = szKey ;
    tvis.item.lParam = (LPARAM)new CRegEntry( "CLSID", szBuf) ;
    HTREEITEM htreeCLSID = m_tree.InsertItem( &tvis ) ;

    _stprintf_s(szKey, MAX_VALLEN, _T("CLSID\\%s"), lpszCLSID ) ;
    if (RegOpenKey( HKEY_CLASSES_ROOT, szKey, &hk) == ERROR_SUCCESS)
    {
      TCHAR    szValue[MAX_VALLEN] ;

      cb = sizeof( szBuf );
      if (RegQueryValue( hk, (LPTSTR)_T("DefaultIcon"), szValue, &cb) == ERROR_SUCCESS)
      {
        LPTSTR p ;
        int   nIndex = 0 ;

        p = PointerToNthField( szValue, 2, ',' ) ;
        if (p && *p)
        {
          *(p-1) = '\0' ;
          nIndex = (int)*p - (int)'0' ;
        }
        if (*szValue == '"')
        {
          _tcscpy_s( szValue, MAX_VALLEN, szValue+1 ) ;
          p = strrchr( szValue, '"' ) ;
          if (p) *p = '\0' ;
        }
        hicon = ExtractIcon( AfxGetInstanceHandle(), szValue, nIndex ) ;
      }

      if ((INT_PTR)hicon <= 1)
      {
        // try local server
        hicon = GetIconFromReg( hk, _T("LocalServer32") ) ;
        if ((INT_PTR)hicon <= 1)
          hicon = GetIconFromReg( hk, _T("LocalServer") ) ;
      }

      if ((INT_PTR)hicon <= 1)
      {
        // try inproc server
        hicon = GetIconFromReg( hk, _T("InprocServer32") ) ;
        if ((INT_PTR)hicon <= 1)
          hicon = GetIconFromReg( hk, _T("InprocServer") ) ;
      }

      if ((INT_PTR)hicon <= 1)
      {
        // try inproc handler
        hicon = GetIconFromReg( hk, _T("InprocHandler32") ) ;
        if ((INT_PTR)hicon <= 1)
          hicon = GetIconFromReg( hk, _T("InprocHandler") ) ;
      }

      // Now fill list box with all other stuff in the HKEY_CLASSES_ROOT\CLSID key
      //
      RegToListBox( &m_tree, (LPTSTR) lpszCLSID, hk, htreeCLSID ) ;
      m_tree.Expand( htreeCLSID, TVE_EXPAND ) ;

      HKEY hkNext ;

      // HKEY_CLASSES_ROOT\ProgID\ key
      cb = sizeof( szValue ) ;
      if (RegQueryValue( hk, (LPTSTR)_T("ProgID"), szValue, &cb) != ERROR_SUCCESS)
        *szValue = '\0' ;
      if (*szValue && (RegOpenKey( HKEY_CLASSES_ROOT, szValue, &hkNext) == ERROR_SUCCESS))
      {
        cb = sizeof(szKey) ;
        RegToListBox( &m_tree, szValue, hkNext, TVI_ROOT ) ;

        if ((INT_PTR)hicon <= 1)
        {
          szBuf[0] = '\0' ;
          cb = sizeof(szBuf) ;
          if (RegQueryValue( hkNext, (LPTSTR)_T("Protocol\\StdFileEditing\\Server"), szBuf, &cb ) == ERROR_SUCCESS)
          {
            LPTSTR p ;
            if (*szBuf == '"')
            {
              _tcscpy_s( szBuf, MAX_VALLEN, szBuf+1 ) ;
              p = strrchr( szBuf, '"' ) ;
              if (p) *p = '\0' ;
            }

            hicon = ExtractIcon( AfxGetInstanceHandle(), szBuf, 0 ) ;
          }

        }

        RegCloseKey( hkNext ) ;
      }

      _stprintf_s(szBuf, MAX_VALLEN, _T("FileType\\%s"), lpszCLSID ) ;
      if (lpszCLSID && (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkNext) == ERROR_SUCCESS))
      {
        tvis.hParent = TVI_ROOT ;
        *szBuf = '\0' ;
        cb = sizeof(szBuf) ;
        RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"FileType", szBuf, &cb) ;
        _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("FileType"), (LPCTSTR)szBuf ) ;
        tvis.item.pszText = szKey ;
        tvis.item.lParam = (LPARAM)new CRegEntry( "FileType", szBuf) ;
        HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
        RegToListBox( &m_tree, (LPTSTR) lpszCLSID, hkNext, htree ) ;
        m_tree.Expand( htree, TVE_EXPAND ) ;
        RegCloseKey( hkNext ) ;
      }

      // HKEY_CLASSES_ROOT\TypeLib
      cb = sizeof( szValue ) ;
      if (RegQueryValue( hk, (LPTSTR)_T("TypeLib"), szValue, &cb) == ERROR_SUCCESS)
      {
        _stprintf_s(szBuf, MAX_VALLEN, _T("TypeLib\\%s"), szValue ) ;
        if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkNext) == ERROR_SUCCESS)
        {
          tvis.hParent = TVI_ROOT ;
          *szBuf = '\0' ;
          cb = sizeof(szBuf) ;
          RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"TypeLib", szBuf, &cb) ;

          _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("TypeLib"), (LPCTSTR)szBuf ) ;
          tvis.item.pszText = szKey ;
          tvis.item.lParam = (LPARAM)new CRegEntry( "TypeLib", szBuf) ;
          HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
          RegToListBox( &m_tree, szValue, hkNext, htree ) ;
          m_tree.Expand( htree, TVE_EXPAND ) ;
          RegCloseKey( hkNext ) ;
        }
      }

      RegCloseKey( hk ) ;

      if ((INT_PTR)hicon > 1)
        m_icon.SetIcon( hicon ) ;
      else
        m_icon.SetIcon( theApp.LoadIcon( IDI_NOICON ) ) ;

      m_tree.EnsureVisible( htreeCLSID ) ;
    }
  }

  m_tree.SetRedraw(TRUE) ;
  EndWaitCursor() ;

}

Member Data Documentation

CStatic CRegistryView::m_CLSID

Definition at line 36 of file regview.h.

CStatic CRegistryView::m_icon

Definition at line 37 of file regview.h.

CStatic CRegistryView::m_Name

Definition at line 35 of file regview.h.

CTreeCtrl CRegistryView::m_tree

Definition at line 38 of file regview.h.

The documentation for this class was generated from the following files:
  • ole/oleview/regview.h
  • ole/oleview/regview.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRemoteCalcDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRemoteCalcDlg Class Reference

#include "calctype.h"

List of all members.

Public Member Functions

BOOL | Button (LPCTSTR szButton)
void | Clear ()
void | Close ()
void | Display ()
BOOL | Evaluate ()
long | GetAccum ()
long | GetOperand ()
short | GetOperation ()
BOOL | GetVisible ()
void | SetAccum (long)
void | SetOperand (long)
void | SetOperation (short)
void | SetVisible (BOOL)

Detailed Description

Definition at line 15 of file calctype.h.

Member Function Documentation

BOOL CRemoteCalcDlg::Button ( LPCTSTR szButton )

Definition at line 91 of file calctype.cpp.

{
  BOOL result;
  static BYTE BASED_CODE parms[] =
    VTS_BSTR;
  InvokeHelper(0x9, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
    szButton);
  return result;
}

void CRemoteCalcDlg::Clear ( )

Definition at line 76 of file calctype.cpp.

{
  InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CRemoteCalcDlg::Close ( )

Definition at line 86 of file calctype.cpp.

{
  InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CRemoteCalcDlg::Display ( )

Definition at line 81 of file calctype.cpp.

{
  InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

BOOL CRemoteCalcDlg::Evaluate ( )

Definition at line 69 of file calctype.cpp.

{
  BOOL result;
  InvokeHelper(0x5, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
  return result;
}

long CRemoteCalcDlg::GetAccum ( )

Definition at line 18 of file calctype.cpp.

{
  long result;
  GetProperty(0x1, VT_I4, (void*)&result);
  return result;
}

long CRemoteCalcDlg::GetOperand ( )

Definition at line 30 of file calctype.cpp.

{
  long result;
  GetProperty(0x2, VT_I4, (void*)&result);
  return result;
}

short CRemoteCalcDlg::GetOperation ( )

Definition at line 42 of file calctype.cpp.

{
  short result;
  GetProperty(0x3, VT_I2, (void*)&result);
  return result;
}

BOOL CRemoteCalcDlg::GetVisible ( )

Definition at line 54 of file calctype.cpp.

{
  BOOL result;
  GetProperty(0x4, VT_BOOL, (void*)&result);
  return result;
}

void CRemoteCalcDlg::SetAccum ( long propVal )

Definition at line 25 of file calctype.cpp.

{
  SetProperty(0x1, VT_I4, propVal);
}

void CRemoteCalcDlg::SetOperand ( long propVal )

Definition at line 37 of file calctype.cpp.

{
  SetProperty(0x2, VT_I4, propVal);
}

void CRemoteCalcDlg::SetOperation ( short propVal )

Definition at line 49 of file calctype.cpp.

{
  SetProperty(0x3, VT_I2, propVal);
}

void CRemoteCalcDlg::SetVisible ( BOOL propVal )

Definition at line 61 of file calctype.cpp.

{
  SetProperty(0x4, VT_BOOL, propVal);
}

The documentation for this class was generated from the following files:
  • ole/calcdriv/calctype.h
  • ole/calcdriv/calctype.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CResourcePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CResourcePage Class Reference

#include "ResourcePage.h"

List of all members.

Public Types

enum | { IDD = IDD_RES_PAGE }

Public Member Functions

CResourcePage ()
~CResourcePage ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContact ()
afx_msg void | OnHome ()
afx_msg void | OnProduct ()
afx_msg void | OnSupport ()

Detailed Description

Definition at line 17 of file ResourcePage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file ResourcePage.h.

{ IDD = IDD_RES_PAGE };

Constructor & Destructor Documentation

CResourcePage::CResourcePage ( )

Definition at line 27 of file ResourcePage.cpp.

                             : CMFCPropertyPage(CResourcePage::IDD)
{
}

CResourcePage::~CResourcePage ( )

Definition at line 31 of file ResourcePage.cpp.

{
}

Member Function Documentation

void CResourcePage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 35 of file ResourcePage.cpp.

{
  CMFCPropertyPage::DoDataExchange(pDX);
}

void CResourcePage::OnContact ( ) [protected]

Definition at line 57 of file ResourcePage.cpp.

{
  ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
}

void CResourcePage::OnHome ( ) [protected]

Definition at line 52 of file ResourcePage.cpp.

{
  ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
}

void CResourcePage::OnProduct ( ) [protected]

Definition at line 62 of file ResourcePage.cpp.

{
  ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
}

void CResourcePage::OnSupport ( ) [protected]

Definition at line 67 of file ResourcePage.cpp.

{
  ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
}

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/ResourcePage.h
  • vc2008fp/MSOffice2007Demo/ResourcePage.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CResourceViewBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CResourceViewBar Class Reference

#include "ResourceView.h"

List of all members.

Public Member Functions

CResourceViewBar ()
virtual | ~CResourceViewBar ()
void | OnChangeVisualStyle ()

Protected Member Functions

void | FillResourceView ()
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnEditPaste ()
afx_msg void | OnPaint ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

CImageList | m_ResourceViewImages
CClassTreeWnd m_wndResourceView

Detailed Description

Definition at line 14 of file ResourceView.h.

Constructor & Destructor Documentation

CResourceViewBar::CResourceViewBar ( )

Definition at line 24 of file ResourceView.cpp.

{
}

CResourceViewBar::~CResourceViewBar ( ) [virtual]

Definition at line 28 of file ResourceView.cpp.

{
}

Member Function Documentation

void CResourceViewBar::FillResourceView ( ) [protected]

Definition at line 85 of file ResourceView.cpp.

{
  HTREEITEM hRoot = m_wndResourceView.InsertItem(_T("Hello resources"), 0, 0);
  m_wndResourceView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);

  HTREEITEM hFolder = m_wndResourceView.InsertItem(_T("Accelerator"), 0, 0, hRoot);
  m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 1, 1, hFolder);

  m_wndResourceView.Expand(hRoot, TVE_EXPAND);

  hFolder = m_wndResourceView.InsertItem(_T("Dialog"), 0, 0, hRoot);
  m_wndResourceView.InsertItem(_T("IDD_ABOUTBOX"), 3, 3, hFolder);

  hFolder = m_wndResourceView.InsertItem(_T("Icon"), 0, 0, hRoot);
  m_wndResourceView.InsertItem(_T("IDR_HELLO"), 4, 4, hFolder);
  m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 4, 4, hFolder);

  m_wndResourceView.Expand(hFolder, TVE_EXPAND);

  hFolder = m_wndResourceView.InsertItem(_T("Menu"), 0, 0, hRoot);
  m_wndResourceView.InsertItem(_T("IDR_CONTEXT_MENU"), 5, 5, hFolder);
  m_wndResourceView.InsertItem(_T("IDR_HELLO"), 5, 5, hFolder);
  m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 5, 5, hFolder);
  m_wndResourceView.InsertItem(_T("IDR_POPUP_TOOLBAR"), 5, 5, hFolder);

  m_wndResourceView.Expand(hFolder, TVE_EXPAND);

  hFolder = m_wndResourceView.InsertItem(_T("String Table"), 0, 0, hRoot);
  m_wndResourceView.InsertItem(_T("String Table"), 6, 6, hFolder);

  hFolder = m_wndResourceView.InsertItem(_T("Toolbar"), 0, 0, hRoot);
  m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 7, 7, hFolder);

  hFolder = m_wndResourceView.InsertItem(_T("Version"), 0, 0, hRoot);
  m_wndResourceView.InsertItem(_T("VS_VERSION_INFO"), 8, 8, hFolder);
}

void CResourceViewBar::OnChangeVisualStyle ( )

Definition at line 193 of file ResourceView.cpp.

{
  m_ResourceViewImages.DeleteImageList();

  UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_RESOURCE_VIEW24 : IDB_RESOURCE_VIEW;

  CBitmap bmp;
  if (!bmp.LoadBitmap(uiBmpId))
  {
    TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
    ASSERT(FALSE);
    return;
  }

  BITMAP bmpObj;
  bmp.GetBitmap(&bmpObj);

  UINT nFlags = ILC_MASK;

  nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;

  m_ResourceViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
  m_ResourceViewImages.Add(&bmp, RGB(255, 0, 255));

  m_wndResourceView.SetImageList(&m_ResourceViewImages, TVSIL_NORMAL);
}

void CResourceViewBar::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 122 of file ResourceView.cpp.

{
  CTreeCtrl* pWndTree = (CTreeCtrl*) &m_wndResourceView;
  ASSERT_VALID(pWndTree);

  if (pWnd != pWndTree)
  {
    CDockablePane::OnContextMenu(pWnd, point);
    return;
  }

  if (point != CPoint(-1, -1))
  {
    // Select clicked item:
    CPoint ptTree = point;
    pWndTree->ScreenToClient(&ptTree);

    UINT flags = 0;
    HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
    if (hTreeItem != NULL)
    {
      pWndTree->SelectItem(hTreeItem);
    }
  }

  pWndTree->SetFocus();
  theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_RESOURCE, point.x, point.y, this, TRUE);
}

int CResourceViewBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 47 of file ResourceView.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy;
  rectDummy.SetRectEmpty();

  // Create view:
  const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;

  if (!m_wndResourceView.Create(dwViewStyle, rectDummy, this, 3))
  {
    TRACE0("Failed to create workspace view\n");
    return -1;      // fail to create
  }

  // Load view images:
  m_ResourceViewImages.Create(IDB_RESOURCE_VIEW, 16, 0, RGB(255, 0, 255));
  m_wndResourceView.SetImageList(&m_ResourceViewImages, TVSIL_NORMAL);

  // Fill view context(dummy code, don't seek here something magic :-)):
  FillResourceView();

  OnChangeVisualStyle();
  return 0;
}

void CResourceViewBar::OnEditClear ( ) [protected]

Definition at line 169 of file ResourceView.cpp.

{
  // TODO: Add your command handler code here

}

void CResourceViewBar::OnEditCopy ( ) [protected]

Definition at line 157 of file ResourceView.cpp.

{
  // TODO: Add your command handler code here

}

void CResourceViewBar::OnEditCut ( ) [protected]

Definition at line 151 of file ResourceView.cpp.

{
  // TODO: Add your command handler code here

}

void CResourceViewBar::OnEditPaste ( ) [protected]

Definition at line 163 of file ResourceView.cpp.

{
  // TODO: Add your command handler code here

}

void CResourceViewBar::OnPaint ( ) [protected]

Definition at line 175 of file ResourceView.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndResourceView.GetWindowRect(rectTree);
  ScreenToClient(rectTree);

  rectTree.InflateRect(1, 1);
  dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
}

void CResourceViewBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 187 of file ResourceView.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);
  m_wndResourceView.SetFocus();
}

void CResourceViewBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 75 of file ResourceView.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);

  if (CanAdjustLayout())
  {
    m_wndResourceView.SetWindowPos(NULL, 1, 1, cx - 2, cy - 2, SWP_NOACTIVATE | SWP_NOZORDER);
  }
}

Member Data Documentation

CImageList CResourceViewBar::m_ResourceViewImages [protected]

Definition at line 23 of file ResourceView.h.

CClassTreeWnd CResourceViewBar::m_wndResourceView [protected]

Definition at line 22 of file ResourceView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/ResourceView.h
  • vc2008fp/VisualStudioDemo/ResourceView.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonGadgetsApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRibbonGadgetsApp Class Reference

#include "RibbonGadgets.h"

List of all members.

Public Member Functions

CRibbonGadgetsApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 25 of file RibbonGadgets.h.

Constructor & Destructor Documentation

CRibbonGadgetsApp::CRibbonGadgetsApp ( )

Definition at line 40 of file RibbonGadgets.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CRibbonGadgetsApp::ExitInstance ( ) [virtual]

Definition at line 179 of file RibbonGadgets.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CRibbonGadgetsApp::InitInstance ( ) [virtual]

Definition at line 54 of file RibbonGadgets.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // TODO: Remove this if you don't want extended tooltips:
  InitTooltipManager();

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  theApp.GetTooltipManager ()->SetTooltipParams (
    AFX_TOOLTIP_TYPE_ALL,
    RUNTIME_CLASS(CMFCToolTipCtrl),
    &params);

  // 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(CRibbonGadgetsDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CRibbonGadgetsView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CRibbonGadgetsApp::OnAppAbout ( )

Definition at line 170 of file RibbonGadgets.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CRibbonGadgetsApp::PreLoadState ( ) [virtual]

Definition at line 184 of file RibbonGadgets.cpp.

{
  GetContextMenuManager()->AddMenu (_T("Edit menu"), IDR_EDIT_MENU);
}

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonGadgets/RibbonGadgets.h
  • vc2008fp/RibbonGadgets/RibbonGadgets.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonGadgetsDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CRibbonGadgetsDoc Class Reference

#include "RibbonGadgetsDoc.h"

List of all members.

Public Member Functions

virtual | ~CRibbonGadgetsDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CRibbonGadgetsDoc ()

Protected Attributes

BOOL | m_bStartup

Detailed Description

Definition at line 14 of file RibbonGadgetsDoc.h.

Constructor & Destructor Documentation

CRibbonGadgetsDoc::CRibbonGadgetsDoc ( ) [protected]

Definition at line 34 of file RibbonGadgetsDoc.cpp.

  : m_bStartup (TRUE)
{
  // TODO: add one-time construction code here

}

CRibbonGadgetsDoc::~CRibbonGadgetsDoc ( ) [virtual]

Definition at line 41 of file RibbonGadgetsDoc.cpp.

{
}

Member Function Documentation

BOOL CRibbonGadgetsDoc::OnNewDocument ( ) [virtual]

Definition at line 45 of file RibbonGadgetsDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  return TRUE;
}

void CRibbonGadgetsDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 56 of file RibbonGadgetsDoc.cpp.

{
  if (ar.IsStoring())
  {
  }
  else
  {
  }
}

Member Data Documentation

BOOL CRibbonGadgetsDoc::m_bStartup [protected]

Definition at line 43 of file RibbonGadgetsDoc.h.

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonGadgets/RibbonGadgetsDoc.h
  • vc2008fp/RibbonGadgets/RibbonGadgetsDoc.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonGadgetsView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRibbonGadgetsView Class Reference

#include "RibbonGadgetsView.h"

List of all members.

Public Member Functions

virtual | ~CRibbonGadgetsView ()
CRibbonGadgetsDoc * GetDocument ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CRibbonGadgetsView ()
virtual HMENU | GetContextMenu (WORD, LPOLEOBJECT, CHARRANGE *)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
virtual void | OnDraw (CDC *pDC)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 14 of file RibbonGadgetsView.h.

Constructor & Destructor Documentation

CRibbonGadgetsView::CRibbonGadgetsView ( ) [protected]

Definition at line 48 of file RibbonGadgetsView.cpp.

{

}

CRibbonGadgetsView::~CRibbonGadgetsView ( ) [virtual]

Definition at line 53 of file RibbonGadgetsView.cpp.

{
}

Member Function Documentation

HMENU CRibbonGadgetsView::GetContextMenu | ( | WORD | ,
 |  | LPOLEOBJECT | ,
 |  | CHARRANGE * |  |
 | ) |  |  | [protected, virtual]

Definition at line 118 of file RibbonGadgetsView.cpp.

{
  return NULL;
}

CRibbonGadgetsDoc * CRibbonGadgetsView::GetDocument ( ) [inline]

Definition at line 54 of file RibbonGadgetsView.h.

   { return (CRibbonGadgetsDoc*)m_pDocument; }

void CRibbonGadgetsView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 123 of file RibbonGadgetsView.cpp.

{
  theApp.ShowPopupMenu (IDR_EDIT_MENU, point, this);
}

int CRibbonGadgetsView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 110 of file RibbonGadgetsView.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  return 0;
}

void CRibbonGadgetsView::OnDestroy ( void ) [protected]

Definition at line 80 of file RibbonGadgetsView.cpp.

{
   CView::OnDestroy();
}

void CRibbonGadgetsView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 128 of file RibbonGadgetsView.cpp.

{
  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);
}

void CRibbonGadgetsView::OnFilePrintPreview ( ) [protected]

Definition at line 68 of file RibbonGadgetsView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CRibbonGadgetsView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 73 of file RibbonGadgetsView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CRibbonGadgetsView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 57 of file RibbonGadgetsView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonGadgets/RibbonGadgetsView.h
  • vc2008fp/RibbonGadgets/RibbonGadgetsView.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonListButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CRibbonListButton Class Reference

#include "RibbonListButton.h"

List of all members.

Public Member Functions

CRibbonListButton ()
CRibbonListButton (UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL bRightAlignedText=TRUE)
CRibbonListButton ()
CRibbonListButton (UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL bRightAlignedText=TRUE)
CRibbonListButton (UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels, BOOL bRightAlignedText=TRUE)
CRibbonListButton (UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels, BOOL bRightAlignedText=TRUE)
virtual | ~CRibbonListButton ()
virtual | ~CRibbonListButton ()
void | AddGroup (LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels)
void | AddGroup (LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels)
virtual void | Clear ()
virtual void | Clear ()
void | SetRightAlignedText (BOOL bSet=TRUE)
void | SetRightAlignedText (BOOL bSet=TRUE)

Protected Member Functions

virtual void | CopyFrom (const CMFCRibbonBaseElement &src)
virtual void | CopyFrom (const CMFCRibbonBaseElement &src)
virtual CSize | GetIconSize () const
virtual CSize | GetIconSize () const
virtual BOOL | IsItemMenuLook () const
virtual BOOL | IsItemMenuLook () const
virtual void | OnDrawPaletteIcon (CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText)
virtual void | OnDrawPaletteIcon (CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText)
virtual void | OnShowPopupMenu ()
virtual void | OnShowPopupMenu ()
void | RecalcTextSizes (CDC *pDC)
void | RecalcTextSizes (CDC *pDC)
void | UpdateToolTips ()

Protected Attributes

CStringArray | m_arLabels
BOOL | m_bRightAlignedText
CMFCToolBarImages | m_listImages
CSize | m_sizeMargins
CSize | m_sizeMaxText

Detailed Description

Definition at line 14 of file RibbonListButton.h.

Constructor & Destructor Documentation

CRibbonListButton::CRibbonListButton ( )

Definition at line 34 of file RibbonListButton.cpp.

{
  m_sizeMargins = CSize(2, 2);
}

CRibbonListButton::CRibbonListButton | ( | UINT | nID,
 |  | LPCTSTR | lpszText,
 |  | int | nSmallImageIndex,
 |  | int | nLargeImageIndex,
 |  | BOOL | bRightAlignedText = TRUE
 | ) |  |

Definition at line 39 of file RibbonListButton.cpp.

                                                                                : CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
{
  SetButtonMode(TRUE);
  SetRightAlignedText(bRightAlignedText);

  m_sizeMargins = CSize(2, 2);
  m_sizeMaxText = CSize(0, 0);
}

CRibbonListButton::CRibbonListButton | ( | UINT | nID,
 |  | LPCTSTR | lpszText,
 |  | int | nSmallImageIndex,
 |  | int | nLargeImageIndex,
 |  | UINT | uiImagesPaletteResID,
 |  | int | cxPaletteImage,
 |  | const CStringArray & | arLabels,
 |  | BOOL | bRightAlignedText = TRUE
 | ) |  |

Definition at line 48 of file RibbonListButton.cpp.

                                                                                : CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
{
  SetButtonMode(TRUE);
  SetRightAlignedText(bRightAlignedText);

  m_listImages.Load(uiImagesPaletteResID);

  BITMAP bmp;
  GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);

  m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
  m_imagesPalette.SetImageSize(m_listImages.GetImageSize());

  m_arLabels.Copy(arLabels);
  m_nIcons = (int) m_arLabels.GetSize();

  m_sizeMargins = CSize(2, 2);
  m_sizeMaxText = CSize(0, 0);
}

CRibbonListButton::~CRibbonListButton ( ) [virtual]

Definition at line 68 of file RibbonListButton.cpp.

{
}

CRibbonListButton::CRibbonListButton ( )
CRibbonListButton::CRibbonListButton | ( | UINT | nID,
 |  | LPCTSTR | lpszText,
 |  | int | nSmallImageIndex,
 |  | int | nLargeImageIndex,
 |  | BOOL | bRightAlignedText = TRUE
 | ) |  |
CRibbonListButton::CRibbonListButton | ( | UINT | nID,
 |  | LPCTSTR | lpszText,
 |  | int | nSmallImageIndex,
 |  | int | nLargeImageIndex,
 |  | UINT | uiImagesPaletteResID,
 |  | int | cxPaletteImage,
 |  | const CStringArray & | arLabels,
 |  | BOOL | bRightAlignedText = TRUE
 | ) |  |
virtual CRibbonListButton::~CRibbonListButton ( ) [virtual]

Member Function Documentation

void CRibbonListButton::AddGroup | ( | LPCTSTR | lpszGroupName,
 |  | UINT | uiImagesPaletteResID,
 |  | int | cxPaletteImage,
 |  | const CStringArray & | arLabels
 | ) |  |

Definition at line 85 of file RibbonListButton.cpp.

{
  CMFCRibbonGallery::AddGroup(lpszGroupName, (int) arLabels.GetSize());

  if (uiImagesPaletteResID != 0)
  {
    if (m_listImages.GetCount() == 0)
    {
      m_listImages.Load(uiImagesPaletteResID);

      BITMAP bmp;
      GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);

      m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);

      m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
    }
    else
    {
      ASSERT(cxPaletteImage == m_listImages.GetImageSize().cx);
      m_listImages.Load(uiImagesPaletteResID, NULL, TRUE);
    }
  }

  if (m_arLabels.GetSize() == 0)
  {
    m_arLabels.Copy(arLabels);
  }
  else
  {
    m_arLabels.Append(arLabels);
  }

  m_nIcons = (int) m_arLabels.GetSize();

  RemoveAll();
  m_sizeMaxText = CSize(0, 0);
}

void CRibbonListButton::AddGroup | ( | LPCTSTR | lpszGroupName,
 |  | UINT | uiImagesPaletteResID,
 |  | int | cxPaletteImage,
 |  | const CStringArray & | arLabels
 | ) |  |
void CRibbonListButton::Clear ( ) [virtual]

Definition at line 124 of file RibbonListButton.cpp.

{
  CMFCRibbonGallery::Clear();

  m_arLabels.RemoveAll();
  m_sizeMaxText = CSize(0, 0);
}

virtual void CRibbonListButton::Clear ( ) [virtual]
void CRibbonListButton::CopyFrom ( const CMFCRibbonBaseElement & src ) [protected, virtual]

Definition at line 292 of file RibbonListButton.cpp.

{
  ASSERT_VALID(this);

  CMFCRibbonGallery::CopyFrom(s);

  CRibbonListButton& src = (CRibbonListButton&) s;

  src.m_listImages.CopyTo(m_listImages);
  m_imagesPalette.SetImageSize(m_listImages.GetImageSize());

  m_arLabels.RemoveAll();
  m_arLabels.Copy(src.m_arLabels);

  m_sizeMargins = src.m_sizeMargins;
  m_bRightAlignedText = src.m_bRightAlignedText;
  m_sizeMaxText = src.m_sizeMaxText;
}

virtual void CRibbonListButton::CopyFrom ( const CMFCRibbonBaseElement & src ) [protected, virtual]
CSize CRibbonListButton::GetIconSize ( ) const [protected, virtual]

Definition at line 177 of file RibbonListButton.cpp.

{
  CSize size = CMFCRibbonGallery::GetIconSize();

  if (m_bRightAlignedText)
  {
    if (size.cx > 0)
    {
      size.cx += 2 *(m_sizeMargins.cx + nCheckMargin) - nImageMargin + nTextOffsetX + m_sizeMaxText.cx;
    }
    else
    {
      size.cx = m_sizeMaxText.cx + 2 *(m_sizeMargins.cy + nCheckMargin + nTextOffsetX);
    }

    if (size.cy > 0)
    {
      size.cy += 2 *(m_sizeMargins.cy - nImageMargin + nCheckMargin);
    }
    else
    {
      size.cy = m_sizeMaxText.cy + 2 * m_sizeMargins.cy;
    }
  }
  else
  {
    size.cy += nTextOffsetY + m_sizeMaxText.cy;
  }

  return size;
}

virtual CSize CRibbonListButton::GetIconSize ( ) const [protected, virtual]
virtual BOOL CRibbonListButton::IsItemMenuLook ( ) const [inline, protected, virtual]

Definition at line 37 of file RibbonListButton.h.

  {
    return m_bRightAlignedText;
  }

virtual BOOL CRibbonListButton::IsItemMenuLook ( ) const [inline, protected, virtual]

Definition at line 39 of file RibbonListButton.h.

  {
    return m_bRightAlignedText;
  }

void CRibbonListButton::OnDrawPaletteIcon | ( | CDC * | pDC,
 |  | CRect | rectIcon,
 |  | int | nIconIndex,
 |  | CMFCRibbonGalleryIcon * | pIcon,
 |  | COLORREF | clrText |
 | ) |  |  | [protected, virtual]

Definition at line 209 of file RibbonListButton.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(pDC);
  ASSERT_VALID(pIcon);
  ASSERT(nIconIndex >= 0);
  ASSERT(nIconIndex < m_nIcons);

  BOOL bChecked     = pIcon->IsChecked();
  BOOL bHighlighted = pIcon->IsHighlighted();

  CRect rectText(0, 0, 0, 0);

  if (m_bRightAlignedText)
  {
    if (!m_bSmallIcons)
    {
      rectIcon.DeflateRect(nCheckMargin, nCheckMargin, nImageMargin, nCheckMargin);
    }

    CRect rect(rectIcon);
    rect.right  = rect.left + m_listImages.GetImageSize().cx + m_sizeMargins.cx * 2;

    if (bChecked)
    {
      CMFCVisualManager::GetInstance()->OnDrawRibbonMenuCheckFrame(pDC, this, rect);
    }

    if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
    {
      m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertCenter);
    }
    else if (bChecked)
    {
      CMFCToolBarMenuButton dummy;
      CMFCVisualManager::GetInstance()->OnDrawMenuCheck(pDC, &dummy, rect, bHighlighted, FALSE);
    }

    rectText = rect;
    rectText.left  = rectText.right + nTextOffsetX;
    rectText.right = rectIcon.right;
  }
  else
  {
    if (!m_bSmallIcons)
    {
      rectIcon.DeflateRect(nImageMargin, nImageMargin);
    }

    CRect rect(rectIcon);
    rect.bottom = rect.top + m_listImages.GetImageSize().cy;

    if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
    {
      m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertTop);
    }

    rectText = rect;
    rectText.top    = rectText.bottom + nTextOffsetY;
    rectText.bottom = rectIcon.bottom;
  }

  if (!rectText.IsRectEmpty())
  {
    COLORREF clrOld = (COLORREF)-1;
    if (clrText != (COLORREF)-1)
    {
      clrOld = pDC->SetTextColor(clrText);
    }

    CString strText = m_arLabels[nIconIndex];

    pDC->DrawText(strText, rectText, m_bRightAlignedText
      ? DT_VCENTER | DT_SINGLELINE | DT_LEFT
      : DT_TOP | DT_SINGLELINE | DT_CENTER | DT_END_ELLIPSIS);

    if (clrText != (COLORREF)-1)
    {
      pDC->SetTextColor(clrOld);
    }
  }
}

virtual void CRibbonListButton::OnDrawPaletteIcon | ( | CDC * | pDC,
 |  | CRect | rectIcon,
 |  | int | nIconIndex,
 |  | CMFCRibbonGalleryIcon * | pIcon,
 |  | COLORREF | clrText |
 | ) |  |  | [protected, virtual]
void CRibbonListButton::OnShowPopupMenu ( ) [protected, virtual]

Definition at line 132 of file RibbonListButton.cpp.

{
  ASSERT_VALID(this);

  CMFCRibbonBaseElement::OnShowPopupMenu();

  if (m_sizeMaxText == CSize(0, 0))
  {
    CMFCRibbonBar* pRibbonBar = GetTopLevelRibbonBar();
    ASSERT_VALID(pRibbonBar);

    CClientDC dc(pRibbonBar);

    CFont* pOldFont = dc.SelectObject(pRibbonBar->GetFont());
    ASSERT(pOldFont != NULL);

    int i = 0;

    for (i = 0; i < m_arLabels.GetSize(); i++)
    {
      CSize szText = dc.GetTextExtent(m_arLabels [i]);

      m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx);
      m_sizeMaxText.cy = max(m_sizeMaxText.cy, szText.cy);
    }

    const int cxImage = m_listImages.GetImageSize().cx;

    for (i = 0; i < m_arSubItems.GetSize(); i++)
    {
      CMFCRibbonBaseElement* pButton = m_arSubItems [i];
      ASSERT_VALID(pButton);

      CString strText = pButton->GetText();
      CSize szText = dc.GetTextExtent(strText);

      m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx - cxImage);
    }

    dc.SelectObject(pOldFont);
  }

  CMFCRibbonGallery::OnShowPopupMenu();
}

virtual void CRibbonListButton::OnShowPopupMenu ( ) [protected, virtual]
void CRibbonListButton::RecalcTextSizes ( CDC * pDC ) [protected]
void CRibbonListButton::RecalcTextSizes ( CDC * pDC ) [protected]
void CRibbonListButton::SetRightAlignedText ( BOOL bSet = TRUE )
void CRibbonListButton::SetRightAlignedText ( BOOL bSet = TRUE )

Definition at line 72 of file RibbonListButton.cpp.

{
  if (m_bRightAlignedText != bSet)
  {
    m_bRightAlignedText = bSet;

    if (m_bRightAlignedText)
    {
      SetIconsInRow(1);
    }
  }
}

void CRibbonListButton::UpdateToolTips ( ) [protected]

Definition at line 319 of file RibbonListButton.cpp.

{
  m_arToolTips.RemoveAll();

  for (int i = 0; i < m_arLabels.GetSize(); i++)
  {
    SetItemToolTip(i, m_arLabels[i]);
  }
}

Member Data Documentation

CStringArray CRibbonListButton::m_arLabels [protected]

Definition at line 48 of file RibbonListButton.h.

BOOL CRibbonListButton::m_bRightAlignedText [protected]

Definition at line 50 of file RibbonListButton.h.

CMFCToolBarImages CRibbonListButton::m_listImages [protected]

Definition at line 47 of file RibbonListButton.h.

CSize CRibbonListButton::m_sizeMargins [protected]

Definition at line 49 of file RibbonListButton.h.

CSize CRibbonListButton::m_sizeMaxText [protected]

Definition at line 51 of file RibbonListButton.h.

The documentation for this class was generated from the following files:
  • vc2008fp/DrawClient/RibbonListButton.h
  • vc2008fp/MSOffice2007Demo/RibbonListButton.h
  • vc2008fp/DrawClient/RibbonListButton.cpp
  • vc2008fp/MSOffice2007Demo/RibbonListButton.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonListFontButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CRibbonListFontButton Class Reference

#include "RibbonListButton.h"

List of all members.

Classes

struct | XItem

Public Types

typedef CArray< XItem, XItem & > | XItems

Public Member Functions

CRibbonListFontButton ()
CRibbonListFontButton (UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex)
CRibbonListFontButton (UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems &arItems)
virtual | ~CRibbonListFontButton ()
void | AddGroup (LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems &arItems)
virtual void | Clear ()

Protected Member Functions

virtual void | CopyFrom (const CMFCRibbonBaseElement &src)
virtual CSize | GetIconSize () const
virtual void | OnDrawPaletteIcon (CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText)
virtual void | OnShowPopupMenu ()
void | RecalcTextSizes (CDC *pDC)
void | UpdateToolTips ()

Protected Attributes

XItems m_arItems
CMFCToolBarImages | m_listImages
CSize | m_sizeMargins
CSize | m_sizeMaxText

Detailed Description

Definition at line 53 of file RibbonListButton.h.

Member Typedef Documentation

typedef CArray<XItem, XItem&> CRibbonListFontButton::XItems

Definition at line 99 of file RibbonListButton.h.

Constructor & Destructor Documentation

CRibbonListFontButton::CRibbonListFontButton ( )

Definition at line 331 of file RibbonListButton.cpp.

{
  m_sizeMargins = CSize(2, 2);
}

CRibbonListFontButton::CRibbonListFontButton | ( | UINT | nID,
 |  | LPCTSTR | lpszText,
 |  | int | nSmallImageIndex,
 |  | int | nLargeImageIndex
 | ) |  |

Definition at line 336 of file RibbonListButton.cpp.

                                                                                :
  CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
{
  SetButtonMode(TRUE);
  SetIconsInRow(1);

  m_sizeMargins = CSize(2, 2);
  m_sizeMaxText = CSize(0, 0);
}

CRibbonListFontButton::CRibbonListFontButton | ( | UINT | nID,
 |  | LPCTSTR | lpszText,
 |  | int | nSmallImageIndex,
 |  | int | nLargeImageIndex,
 |  | UINT | uiImagesPaletteResID,
 |  | int | cxPaletteImage,
 |  | const XItems & | arItems
 | ) |  |

Definition at line 346 of file RibbonListButton.cpp.

                                                                                :
  CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
{
  SetButtonMode(TRUE);
  SetIconsInRow(1);

  m_listImages.Load(uiImagesPaletteResID);

  BITMAP bmp;
  GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);

  m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
  m_imagesPalette.SetImageSize(m_listImages.GetImageSize());

  m_arItems.Copy(arItems);
  m_nIcons = (int) m_arItems.GetSize();

  m_sizeMargins = CSize(2, 2);
  m_sizeMaxText = CSize(0, 0);

  UpdateToolTips();
}

CRibbonListFontButton::~CRibbonListFontButton ( ) [virtual]

Definition at line 369 of file RibbonListButton.cpp.

{
}

Member Function Documentation

void CRibbonListFontButton::AddGroup | ( | LPCTSTR | lpszGroupName,
 |  | UINT | uiImagesPaletteResID,
 |  | int | cxPaletteImage,
 |  | const XItems & | arItems
 | ) |  |

Definition at line 373 of file RibbonListButton.cpp.

{
  CMFCRibbonGallery::AddGroup(lpszGroupName, (int) arItems.GetSize());
  for (int i = 0; i < arItems.GetSize(); i++)
  {
    CMFCRibbonGallery::SetItemToolTip(i, arItems[i].m_Caption);
  }

  if (m_listImages.GetCount() == 0)
  {
    m_listImages.Load(uiImagesPaletteResID);

    BITMAP bmp;
    GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);

    m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
    m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
  }
  else
  {
    ASSERT(cxPaletteImage == m_listImages.GetImageSize().cx);
    m_listImages.Load(uiImagesPaletteResID, NULL, TRUE);
  }

  if (m_arItems.GetSize() == 0)
  {
    m_arItems.Copy(arItems);
  }
  else
  {
    m_arItems.Append(arItems);
  }

  m_nIcons = (int) m_arItems.GetSize();

  RemoveAll();
  m_sizeMaxText = CSize(0, 0);

  UpdateToolTips();
}

void CRibbonListFontButton::Clear ( ) [virtual]

Definition at line 414 of file RibbonListButton.cpp.

{
  CMFCRibbonGallery::Clear();

  m_arItems.RemoveAll();
  m_sizeMaxText = CSize(0, 0);
}

void CRibbonListFontButton::CopyFrom ( const CMFCRibbonBaseElement & src ) [protected, virtual]

Definition at line 539 of file RibbonListButton.cpp.

{
  ASSERT_VALID(this);

  CMFCRibbonGallery::CopyFrom(s);

  CRibbonListFontButton& src = (CRibbonListFontButton&) s;

  src.m_listImages.CopyTo(m_listImages);
  m_imagesPalette.SetImageSize (m_listImages.GetImageSize ());

  m_arItems.RemoveAll();
  m_arItems.Copy(src.m_arItems);

  m_sizeMargins = src.m_sizeMargins;
  m_sizeMaxText = src.m_sizeMaxText;
}

CSize CRibbonListFontButton::GetIconSize ( ) const [protected, virtual]

Definition at line 466 of file RibbonListButton.cpp.

{
  CSize size = CMFCRibbonGallery::GetIconSize();

  size.cx += 2 *(m_sizeMargins.cx + nCheckMargin) - nImageMargin + nTextOffsetX + m_sizeMaxText.cx;
  size.cy += 2 *(m_sizeMargins.cy - nImageMargin + nCheckMargin);

  return size;
}

void CRibbonListFontButton::OnDrawPaletteIcon | ( | CDC * | pDC,
 |  | CRect | rectIcon,
 |  | int | nIconIndex,
 |  | CMFCRibbonGalleryIcon * | pIcon,
 |  | COLORREF | clrText |
 | ) |  |  | [protected, virtual]

Definition at line 476 of file RibbonListButton.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(pDC);
  ASSERT_VALID(pIcon);
  ASSERT(nIconIndex >= 0);
  ASSERT(nIconIndex < m_nIcons);

  CRect rectText(0, 0, 0, 0);

  if (!m_bSmallIcons)
  {
    rectIcon.DeflateRect(nCheckMargin, nCheckMargin, nImageMargin, nCheckMargin);
  }

  CRect rect(rectIcon);
  rect.right  = rect.left + m_listImages.GetImageSize().cx + m_sizeMargins.cx * 2;

  if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
  {
    m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertCenter);
  }

  rectText = rect;
  rectText.left  = rectText.right + nTextOffsetX;
  rectText.right = rectIcon.right;

  if (!rectText.IsRectEmpty())
  {
    COLORREF clrOld = (COLORREF)-1;
    if (clrText != (COLORREF)-1)
    {
      clrOld = pDC->SetTextColor(clrText);
    }

    rectText.OffsetRect(0, (rectText.Height() - m_arItems [nIconIndex].m_Height) / 2);

    CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontBold);

    int nHeight = pDC->DrawText(m_arItems [nIconIndex].m_Caption, rectText, DT_TOP | DT_SINGLELINE | DT_LEFT);
    rectText.OffsetRect(0, nHeight);

    for (int j = 0; j < 2; j++)
    {
      LOGFONT& lf = m_arItems [nIconIndex].m_Font[j];

      CFont font;
      font.CreateFontIndirect(&lf);
      pDC->SelectObject(&font);

      nHeight = pDC->DrawText(lf.lfFaceName, rectText, DT_TOP | DT_SINGLELINE | DT_LEFT);
      rectText.OffsetRect(0, nHeight);
    }

    pDC->SelectObject(pOldFont);

    if (clrText != (COLORREF)-1)
    {
      pDC->SetTextColor(clrOld);
    }
  }
}

void CRibbonListFontButton::OnShowPopupMenu ( ) [protected, virtual]

Definition at line 422 of file RibbonListButton.cpp.

{
  ASSERT_VALID(this);

  CMFCRibbonBaseElement::OnShowPopupMenu();

  if (m_sizeMaxText == CSize(0, 0))
  {
    CMFCRibbonBar* pRibbonBar = GetTopLevelRibbonBar();
    ASSERT_VALID(pRibbonBar);

    CClientDC dc(pRibbonBar);
    CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontBold);

    for (int i = 0; i < m_arItems.GetSize(); i++)
    {
      CSize szText = dc.GetTextExtent(m_arItems [i].m_Caption);

      for (int j = 0; j < 2; j++)
      {
        LOGFONT& lf = m_arItems [i].m_Font[j];

        CFont font;
        font.CreateFontIndirect(&lf);
        dc.SelectObject(&font);

        CSize szText2 = dc.GetTextExtent(lf.lfFaceName);

        szText.cx = max(szText.cx, szText2.cx);
        szText.cy += szText2.cy;
      }

      m_arItems [i].m_Height = szText.cy;

      m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx);
      m_sizeMaxText.cy = max(m_sizeMaxText.cy, szText.cy);
    }

    dc.SelectObject(pOldFont);
  }

  CMFCRibbonGallery::OnShowPopupMenu();
}

void CRibbonListFontButton::RecalcTextSizes ( CDC * pDC ) [protected]
void CRibbonListFontButton::UpdateToolTips ( ) [protected]

Definition at line 558 of file RibbonListButton.cpp.

{
  m_arToolTips.RemoveAll();

  for (int i = 0; i < m_arItems.GetSize(); i++)
  {
    SetItemToolTip(i, m_arItems [i].m_Caption);
  }
}

Member Data Documentation

XItems CRibbonListFontButton::m_arItems [protected]

Definition at line 123 of file RibbonListButton.h.

CMFCToolBarImages CRibbonListFontButton::m_listImages [protected]

Definition at line 122 of file RibbonListButton.h.

CSize CRibbonListFontButton::m_sizeMargins [protected]

Definition at line 124 of file RibbonListButton.h.

CSize CRibbonListFontButton::m_sizeMaxText [protected]

Definition at line 125 of file RibbonListButton.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/RibbonListButton.h
  • vc2008fp/MSOffice2007Demo/RibbonListButton.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonListFontButton::XItem Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CRibbonListFontButton
  • CRibbonListFontButton::XItem
Public Member Functions | Public Attributes

CRibbonListFontButton::XItem Struct Reference

#include "RibbonListButton.h"

List of all members.

Public Member Functions

XItem ()
XItem & | operator= (const XItem &rItem)

Public Attributes

CString | m_Caption
LOGFONT | m_Font [2]
int | m_Height

Detailed Description

Definition at line 58 of file RibbonListButton.h.

Constructor & Destructor Documentation

CRibbonListFontButton::XItem::XItem ( ) [inline]

Definition at line 64 of file RibbonListButton.h.

    {
      ZeroMemory(&m_Font[0], sizeof(LOGFONT));
      ZeroMemory(&m_Font[1], sizeof(LOGFONT));

      m_Font[0].lfHeight         = -14;
      m_Font[0].lfWeight         = FW_BOLD;
      m_Font[0].lfCharSet        = DEFAULT_CHARSET;
      m_Font[0].lfOutPrecision   = OUT_DEFAULT_PRECIS;
      m_Font[0].lfClipPrecision  = CLIP_DEFAULT_PRECIS;
      m_Font[0].lfQuality        = DEFAULT_QUALITY;
      m_Font[0].lfPitchAndFamily = DEFAULT_PITCH;

      m_Font[1].lfHeight         = -12;
      m_Font[1].lfWeight         = FW_NORMAL;
      m_Font[1].lfCharSet        = DEFAULT_CHARSET;
      m_Font[1].lfOutPrecision   = OUT_DEFAULT_PRECIS;
      m_Font[1].lfClipPrecision  = CLIP_DEFAULT_PRECIS;
      m_Font[1].lfQuality        = DEFAULT_QUALITY;
      m_Font[1].lfPitchAndFamily = DEFAULT_PITCH;

      m_Height = 0;
    }

Member Function Documentation

XItem& CRibbonListFontButton::XItem::operator= ( const XItem & rItem ) [inline]

Definition at line 88 of file RibbonListButton.h.

    {
      m_Caption = rItem.m_Caption;
      memcpy(&m_Font[0], &rItem.m_Font[0], sizeof(LOGFONT));
      memcpy(&m_Font[1], &rItem.m_Font[1], sizeof(LOGFONT));
      m_Height = rItem.m_Height;

      return *this;
    }

Member Data Documentation

CString CRibbonListFontButton::XItem::m_Caption

Definition at line 60 of file RibbonListButton.h.

LOGFONT CRibbonListFontButton::XItem::m_Font[2]

Definition at line 61 of file RibbonListButton.h.

int CRibbonListFontButton::XItem::m_Height

Definition at line 62 of file RibbonListButton.h.

The documentation for this struct was generated from the following file:
  • vc2008fp/MSOffice2007Demo/RibbonListButton.h
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonMDIDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRibbonMDIDemoApp Class Reference

#include "RibbonMDIDemo.h"

List of all members.

Public Member Functions

CRibbonMDIDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()
virtual BOOL | SaveAllModified ()

Detailed Description

Definition at line 25 of file RibbonMDIDemo.h.

Constructor & Destructor Documentation

CRibbonMDIDemoApp::CRibbonMDIDemoApp ( )

Definition at line 41 of file RibbonMDIDemo.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CRibbonMDIDemoApp::ExitInstance ( ) [virtual]

Definition at line 125 of file RibbonMDIDemo.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CRibbonMDIDemoApp::InitInstance ( ) [virtual]

Definition at line 55 of file RibbonMDIDemo.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();
  InitTooltipManager();

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  theApp.GetTooltipManager ()->SetTooltipParams (0xFFFF, RUNTIME_CLASS (CMFCToolTipCtrl), &params);

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_RIBBONTYPE,
    RUNTIME_CLASS(CRibbonMDIDemoDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CRibbonMDIDemoView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CRibbonMDIDemoApp::OnAppAbout ( )

Definition at line 187 of file RibbonMDIDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CRibbonMDIDemoApp::PreLoadState ( ) [virtual]

Definition at line 131 of file RibbonMDIDemo.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

BOOL CRibbonMDIDemoApp::SaveAllModified ( ) [virtual]

Definition at line 196 of file RibbonMDIDemo.cpp.

{
  if (!CWinAppEx::SaveAllModified ())
  {
    return FALSE;
  }

  CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST (CMDIFrameWndEx, m_pMainWnd);
  if (pMainFrame != NULL)
  {
    pMainFrame->SaveMDIState (GetRegSectionPath ());
  }

  return TRUE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonMDI/RibbonMDIDemo.h
  • vc2008fp/RibbonMDI/RibbonMDIDemo.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonMDIDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRibbonMDIDemoDoc Class Reference

#include "RibbonMDIDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CRibbonMDIDemoDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CRibbonMDIDemoDoc ()
afx_msg void | OnFileClose ()

Detailed Description

Definition at line 14 of file RibbonMDIDemoDoc.h.

Constructor & Destructor Documentation

CRibbonMDIDemoDoc::CRibbonMDIDemoDoc ( ) [protected]

Definition at line 36 of file RibbonMDIDemoDoc.cpp.

{
  // TODO: add one-time construction code here

}

CRibbonMDIDemoDoc::~CRibbonMDIDemoDoc ( ) [virtual]

Definition at line 42 of file RibbonMDIDemoDoc.cpp.

{
}

Member Function Documentation

void CRibbonMDIDemoDoc::OnFileClose ( ) [protected]

Definition at line 92 of file RibbonMDIDemoDoc.cpp.

{
  CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd ();

  if (pMainFrame != NULL && pMainFrame->IsPrintPreviewMode ())
  {
    return;
  }

  CDocument::OnFileClose();
}

BOOL CRibbonMDIDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 46 of file RibbonMDIDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CRibbonMDIDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 62 of file RibbonMDIDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonMDI/RibbonMDIDemoDoc.h
  • vc2008fp/RibbonMDI/RibbonMDIDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonMDIDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRibbonMDIDemoView Class Reference

#include "RibbonMDIDemoView.h"

List of all members.

Public Member Functions

virtual | ~CRibbonMDIDemoView ()
CRibbonMDIDemoDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CRibbonMDIDemoView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 14 of file RibbonMDIDemoView.h.

Constructor & Destructor Documentation

CRibbonMDIDemoView::CRibbonMDIDemoView ( ) [protected]

Definition at line 40 of file RibbonMDIDemoView.cpp.

{
  // TODO: add construction code here

}

CRibbonMDIDemoView::~CRibbonMDIDemoView ( ) [virtual]

Definition at line 46 of file RibbonMDIDemoView.cpp.

{
}

Member Function Documentation

CRibbonMDIDemoDoc * CRibbonMDIDemoView::GetDocument ( ) [inline]

Definition at line 52 of file RibbonMDIDemoView.h.

   { return (CRibbonMDIDemoDoc*)m_pDocument; }

void CRibbonMDIDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 82 of file RibbonMDIDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

void CRibbonMDIDemoView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 116 of file RibbonMDIDemoView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CRibbonMDIDemoView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 61 of file RibbonMDIDemoView.cpp.

{
//  CRibbonMDIDemoDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);
  // TODO: add draw code for native data here
}

void CRibbonMDIDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 87 of file RibbonMDIDemoView.cpp.

{
  // TODO: add cleanup after printing
}

void CRibbonMDIDemoView::OnFilePrintPreview ( ) [protected]

Definition at line 71 of file RibbonMDIDemoView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CRibbonMDIDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 76 of file RibbonMDIDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CRibbonMDIDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 50 of file RibbonMDIDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonMDI/RibbonMDIDemoView.h
  • vc2008fp/RibbonMDI/RibbonMDIDemoView.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonTableButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes

CRibbonTableButton Class Reference

#include "RibbonTableButton.h"

List of all members.

Public Member Functions

CRibbonTableButton ()
CRibbonTableButton (UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex)
virtual | ~CRibbonTableButton ()

Static Public Member Functions

static int | GetColumns ()
static int | GetRows ()

Protected Member Functions

virtual void | NotifyHighlightListItem (int nIndex)
virtual void | OnDrawPaletteIcon (CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText)
virtual void | OnShowPopupMenu ()

Static Protected Attributes

static int | m_nColumns = 0
static int | m_nRows = 0

Detailed Description

Definition at line 14 of file RibbonTableButton.h.

Constructor & Destructor Documentation

CRibbonTableButton::CRibbonTableButton ( ) [inline]

Definition at line 20 of file RibbonTableButton.h.

{}

CRibbonTableButton::CRibbonTableButton | ( | UINT | nID,
 |  | LPCTSTR | lpszText,
 |  | int | nSmallImageIndex,
 |  | int | nLargeImageIndex
 | ) |  |

Definition at line 36 of file RibbonTableButton.cpp.

                                                                                :
  CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(18, 18), 0, FALSE)
{
  AddGroup(lpszDefaultCaption, CELLS_X * CELLS_Y);
  SetIconsInRow(CELLS_X);
}

CRibbonTableButton::~CRibbonTableButton ( ) [virtual]

Definition at line 43 of file RibbonTableButton.cpp.

{
}

Member Function Documentation

static int CRibbonTableButton::GetColumns ( ) [inline, static]

Definition at line 28 of file RibbonTableButton.h.

{ return m_nColumns; }

static int CRibbonTableButton::GetRows ( ) [inline, static]

Definition at line 27 of file RibbonTableButton.h.

{ return m_nRows; }

void CRibbonTableButton::NotifyHighlightListItem ( int nIndex ) [protected, virtual]

Definition at line 69 of file RibbonTableButton.cpp.

{
  ASSERT_VALID(this);

  if (m_pPopupMenu != NULL)
  {
    if (nIndex < 0)
    {
      m_nRows = m_nColumns = 0;
    }
    else
    {
      m_nRows = nIndex / CELLS_X + 1;
      m_nColumns = (nIndex % CELLS_X) + 1;
    }

    CString strCaption = lpszDefaultCaption;
    if (m_nColumns > 0 && m_nRows > 0)
    {
      strCaption.Format(_T("%dx%d Table"), m_nColumns, m_nRows);
    }

    SetGroupName(0, strCaption);
    RedrawIcons();
  }

  CMFCRibbonGallery::NotifyHighlightListItem(nIndex);
}

void CRibbonTableButton::OnDrawPaletteIcon | ( | CDC * | pDC,
 |  | CRect | rectIcon,
 |  | int | nIconIndex,
 |  | CMFCRibbonGalleryIcon * | pIcon,
 |  | COLORREF | clrText |
 | ) |  |  | [protected, virtual]

Definition at line 47 of file RibbonTableButton.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(pDC);

  rectIcon.DeflateRect(2, 2);

  COLORREF color = afxGlobalData.clrWindowText;

  if (nIconIndex / CELLS_X + 1 <= m_nRows && (nIconIndex % CELLS_X) + 1 <= m_nColumns)
  {
    COLORREF clrInner = RGB(255, 226, 148);

    pDC->Draw3dRect(rectIcon, clrInner, clrInner);

    color = RGB(239, 72, 16);
    rectIcon.InflateRect(1, 1);
  }

  pDC->Draw3dRect(rectIcon, color, color);
}

void CRibbonTableButton::OnShowPopupMenu ( ) [protected, virtual]

Definition at line 98 of file RibbonTableButton.cpp.

{
  ASSERT_VALID(this);

  m_nRows = m_nColumns = 0;
  SetGroupName(0, lpszDefaultCaption);

  CMFCRibbonGallery::OnShowPopupMenu();
}

Member Data Documentation

int CRibbonTableButton::m_nColumns = 0 [static, protected]

Definition at line 32 of file RibbonTableButton.h.

int CRibbonTableButton::m_nRows = 0 [static, protected]

Definition at line 31 of file RibbonTableButton.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/RibbonTableButton.h
  • vc2008fp/MSOffice2007Demo/RibbonTableButton.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRibbonTooltipCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CRibbonTooltipCtrl Class Reference

#include "RibbonTooltipCtrl.h"

List of all members.

Public Member Functions

CRibbonTooltipCtrl ()
virtual | ~CRibbonTooltipCtrl ()
virtual CSize | GetIconSize ()
virtual BOOL | OnDrawIcon (CDC *pDC, CRect rectImage)

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnShow (NMHDR *pNMHDR, LRESULT *pResult)

Protected Attributes

UINT m_nID
CMFCRibbonPanelMenuBar * | m_pParentMenuBar
CMFCRibbonBar * | m_pParentRibbon

Detailed Description

Definition at line 17 of file RibbonTooltipCtrl.h.

Constructor & Destructor Documentation

CRibbonTooltipCtrl::CRibbonTooltipCtrl ( )

Definition at line 28 of file RibbonTooltipCtrl.cpp.

{
  m_pParentMenuBar = NULL;
  m_pParentRibbon = NULL;
}

CRibbonTooltipCtrl::~CRibbonTooltipCtrl ( ) [virtual]

Definition at line 34 of file RibbonTooltipCtrl.cpp.

{
}

Member Function Documentation

CSize CRibbonTooltipCtrl::GetIconSize ( ) [virtual]

Definition at line 98 of file RibbonTooltipCtrl.cpp.

{
  CMFCToolBarImages* pBmp = ((CMainFrame*) GetTopLevelFrame())->GetTooltipImage(m_nID);
  if (pBmp != NULL)
  {
    ASSERT_VALID(pBmp);
    return pBmp->GetImageSize();
  }

  return CSize(0, 0);
}

int CRibbonTooltipCtrl::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 87 of file RibbonTooltipCtrl.cpp.

{
  if (CMFCToolTipCtrl::OnCreate(lpCreateStruct) == -1)
    return -1;

  m_pParentRibbon = DYNAMIC_DOWNCAST(CMFCRibbonBar, CWnd::FromHandlePermanent(lpCreateStruct->hwndParent));
  m_pParentMenuBar = DYNAMIC_DOWNCAST(CMFCRibbonPanelMenuBar, CWnd::FromHandlePermanent(lpCreateStruct->hwndParent));

  return 0;
}

BOOL CRibbonTooltipCtrl::OnDrawIcon | ( | CDC * | pDC,
 |  | CRect | rectImage |
 | ) |  |  | [virtual]

Definition at line 110 of file RibbonTooltipCtrl.cpp.

{
  ASSERT_VALID(pDC);

  CMFCToolBarImages* pBmp = ((CMainFrame*) GetTopLevelFrame())->GetTooltipImage(m_nID);
  if (pBmp != NULL)
  {
    ASSERT_VALID(pBmp);

    pBmp->SetTransparentColor(afxGlobalData.clrBtnFace);
    pBmp->DrawEx(pDC, rectImage, 0);

    return TRUE;
  }

  return FALSE;
}

void CRibbonTooltipCtrl::OnShow | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 48 of file RibbonTooltipCtrl.cpp.

{
  m_nID = 0;

  CPoint point;
  ::GetCursorPos(&point);

  if (m_pParentRibbon != NULL)
  {
    ASSERT_VALID(m_pParentRibbon);

    m_pParentRibbon->ScreenToClient(&point);

    CMFCRibbonBaseElement* pHit = m_pParentRibbon->HitTest(point, TRUE);

    if (pHit != NULL)
    {
      ASSERT_VALID(pHit);
      m_nID = pHit->GetID();
    }
  }
  else if (m_pParentMenuBar != NULL)
  {
    ASSERT_VALID(m_pParentMenuBar);

    m_pParentMenuBar->ScreenToClient(&point);

    CMFCRibbonBaseElement* pHit = m_pParentMenuBar->HitTest(point);

    if (pHit != NULL)
    {
      ASSERT_VALID(pHit);
      m_nID = pHit->GetID();
    }
  }

  CMFCToolTipCtrl::OnShow(pNMHDR, pResult);
}

Member Data Documentation

UINT CRibbonTooltipCtrl::m_nID [protected]

Definition at line 29 of file RibbonTooltipCtrl.h.

CMFCRibbonPanelMenuBar* CRibbonTooltipCtrl::m_pParentMenuBar [protected]

Definition at line 27 of file RibbonTooltipCtrl.h.

CMFCRibbonBar* CRibbonTooltipCtrl::m_pParentRibbon [protected]

Definition at line 28 of file RibbonTooltipCtrl.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.h
  • vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRing Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes

CRing Class Reference

#include "piece.h"

Inherits CWheel.

List of all members.

Public Member Functions

CRing (long nRadiusIn, long nRadiusOut, COLORREF co, COLORREF coPattern=0)
virtual void | AdvanceTrace (CPoint &ptContact, double &dAngle, double &dAngleExtra, bool bMove=true)
virtual void | Draw (CDC *pDC, long nZoomNumer, long nZoomDenom) const
virtual void | GetContactPosition (CPoint point, long nZoomNumer, long nZoomDenom, CPoint &ptContact, double &dAngle)
virtual long | GetCycleError () const
virtual void | GetDevPieceRgn (CDC *pDC, CRgn *pRgn, long nZoomNumer, long nZoomDenom, bool bInflate) const
void | GetInnerRect (CSpiroRect *pRect, long nZoomNumer, long nZoomDenom) const
virtual void | GetLogPieceRgn (CRgn *pRgn, long nZoomNumer, long nZoomDenom) const
virtual double | GetPerimeter () const
virtual bool | ReverseWheelDirection () const
virtual void | SetAngleDelta (long nDistance, bool bReverse)

Public Attributes

bool | m_bWheelInside
long | m_nRadiusInt

Static Public Attributes

static COLORREF | m_rgco [TOTALRINGS]
static long | m_rgnRads [TOTALRINGS] = {250, 220, 180, 150}

Detailed Description

Definition at line 240 of file piece.h.

Constructor & Destructor Documentation

CRing::CRing | ( | long | nRadiusIn,
 |  | long | nRadiusOut,
 |  | COLORREF | co,
 |  | COLORREF | coPattern = 0
 | ) |  |

Definition at line 527 of file piece.cpp.

                                                                             :
    CWheel(nRadiusOut, co, coPattern)
{
  ASSERT(TOTALRINGS == elementsof(m_rgnRads));
  ASSERT(TOTALRINGS == elementsof(m_rgco));
  m_nRadiusInt = nRadiusIn;
  m_bWheelInside = false;
  m_angleCurrent = PI / 2.0;  // initial angle is always pi/2 for a ring
}

Member Function Documentation

__inline void CRing::AdvanceTrace | ( | CPoint & | ptContact,
 |  | double & | dAngle,
 |  | double & | dAngleExtra,
 |  | bool | bMove = true |
 | ) |  |  | [virtual]

Reimplemented from CWheel.

Definition at line 678 of file piece.cpp.

{
  ASSERT(!m_bIsWheel);  // rings do not work as wheels in this implementation
  ASSERT(m_angleDelta != 0);

  if (!m_bWheelInside)  // on the external use, behaves like a common wheel
  {
    CWheel::AdvanceTrace(ptContact, dAngle, dAngleExtra, bMove);
    return;
  }

  if (bMove)
  {
    m_angleCurrent += m_angleDelta + m_dAngleCorrection;
  }

  CVector vecAfter(m_nRadiusInt, m_angleCurrent);
  vecAfter += m_ptPos;
  ptContact = (CPoint)vecAfter;
  dAngle = m_angleCurrent + PI;
  dAngleExtra = m_angleDelta + m_dAngleCorrection;   // positive is fine since wheel spins in negative direction
}

void CRing::Draw | ( | CDC * | pDC,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [virtual]

Reimplemented from CWheel.

Definition at line 537 of file piece.cpp.

{
  ENSURE(pDC != NULL);
  ASSERT(pDC->GetMapMode() == MM_SPIRO);  // make sure the mapping mode is right
  ASSERT(m_nRadiusInt > 0 && m_nRadius > m_nRadiusInt);

  CSpiroRect  rectOut;
  GetBoundingRect(&rectOut, nZoomNumer, nZoomDenom);
  if (!pDC->RectVisible(&rectOut))
    return;

  CRgn  rgnRing;
  VERIFY(rgnRing.CreateEllipticRgn(rectOut.left, rectOut.top,
                  rectOut.right, rectOut.bottom));

  CSpiroRect    rectIn;
  GetInnerRect(&rectIn, nZoomNumer, nZoomDenom);
  CRgn  rgnInnerRing;
  VERIFY(rgnInnerRing.CreateEllipticRgn(rectIn.left, rectIn.top,
                    rectIn.right, rectIn.bottom));

  //define the region for the ring itself
  VERIFY(rgnRing.CombineRgn(&rgnRing, &rgnInnerRing, RGN_DIFF) != ERROR);

  CBrush  brush(m_co);  // get ready to draw the ring.
  pDC->FillRgn(&rgnRing, &brush);  // draw the ring

  double  dSpace = PI / 30.0;
  CVector vectWork;
  CPen  pen(PS_SOLID, 2, RGB(0, 0, 0));
  CPen* pPenOld(NULL);  // Initialize to avoid compiler warnings.

  for (int i = 0; i < 60; i++)
  {
    if (i % 5 == 0)
      pPenOld = pDC->SelectObject(&pen);

    vectWork = m_ptPos;
    vectWork += CVector(m_nRadiusInt, dSpace * (double)i + PI / 2.0);
    CPoint ptStart = (CPoint)vectWork;
    vectWork += CVector(m_nRadius - m_nRadiusInt, dSpace * (double)i + PI / 2.0);
    CPoint ptEnd = (CPoint)vectWork;
    pDC->MoveTo(ptStart.x * nZoomNumer / nZoomDenom, ptStart.y * nZoomNumer / nZoomDenom);
    pDC->LineTo(ptEnd.x * nZoomNumer / nZoomDenom, ptEnd.y * nZoomNumer / nZoomDenom);

    if (i % 5 == 0)
      pDC->SelectObject(pPenOld);
  }
}

void CRing::GetContactPosition | ( | CPoint | point,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom,
 |  | CPoint & | ptContact,
 |  | double & | dAngle |
 | ) |  |  | [virtual]

Reimplemented from CWheel.

Definition at line 639 of file piece.cpp.

{
  CSpiroRect  rect;
  GetInnerRect(&rect, nZoomNumer, nZoomDenom);
  ptContact.x = m_ptPos.x;
  CRgn  rgnInner;
  VERIFY(rgnInner.CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
  if (rgnInner.PtInRegion(point))  // anchor wheel inside the ring
  {
    ptContact.y = m_ptPos.y + m_nRadiusInt;
    dAngle = 3.0 * PI / 2.0;
    m_angleCurrent = PI / 2.0;  // GetContactPosition always resets the current angle
    m_bWheelInside = true;
    return;
  }

  ptContact.y = m_ptPos.y + m_nRadius;
  dAngle = PI / 2.0;
  m_angleCurrent = dAngle;
  m_bWheelInside = false;
}

long CRing::GetCycleError ( ) const [virtual]

Reimplemented from CWheel.

Definition at line 702 of file piece.cpp.

{
  // Calculate the error to be the distance in the circumference for a 6 degree
  // error, which is (PI / 30) * radius
  if (!m_bWheelInside)
    return CWheel::GetCycleError();

  return (long)(PI * (double)m_nRadiusInt / 30.0);
}

void CRing::GetDevPieceRgn | ( | CDC * | pDC,
 |  | CRgn * | pRgn,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom,
 |  | bool | bInflate |
 | ) |  |  | const [virtual]

Reimplemented from CWheel.

Definition at line 596 of file piece.cpp.

{
  ENSURE(pDC != NULL);
  ENSURE(pRgn != NULL);
  CSpiroRect  rect;
  GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
  pDC->LPtoDP(&rect);  // convert to client coordinates
  if (bInflate)
    rect.InflateRect(5, 5);

  VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));

  CSpiroRect rectInner;
  GetInnerRect(&rectInner, nZoomNumer, nZoomDenom);
  pDC->LPtoDP(&rectInner);
  if (bInflate)
    rectInner.DeflateRect(5, 5);  // cover for bug where region is not repainted properly

  CRgn  rgnInner;
  VERIFY(rgnInner.CreateEllipticRgn(rectInner.left, rectInner.top,
                rectInner.right, rectInner.bottom));

  VERIFY(pRgn->CombineRgn(pRgn, &rgnInner, RGN_DIFF) != ERROR);
}

void CRing::GetInnerRect | ( | CSpiroRect * | pRect,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const

Definition at line 587 of file piece.cpp.

{
  pRect->left = (m_ptPos.x - m_nRadiusInt) * nZoomNumer / nZoomDenom;
  pRect->right = (m_ptPos.x + m_nRadiusInt) * nZoomNumer / nZoomDenom;
  pRect->top = (m_ptPos.y + m_nRadiusInt) * nZoomNumer / nZoomDenom;
  pRect->bottom = (m_ptPos.y - m_nRadiusInt) * nZoomNumer / nZoomDenom;
}

void CRing::GetLogPieceRgn | ( | CRgn * | pRgn,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [virtual]

Reimplemented from CWheel.

Definition at line 623 of file piece.cpp.

{
  CSpiroRect  rect;
  GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
  ENSURE(pRgn != NULL);
  VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
  int nWidth = (m_nRadius - m_nRadiusInt) * nZoomNumer / nZoomDenom;
  rect.DeflateRect(nWidth, -nWidth);
  CRgn  rgnInner;
  VERIFY(rgnInner.CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
  VERIFY(pRgn->CombineRgn(pRgn, &rgnInner, RGN_DIFF) != ERROR);
}

__inline double CRing::GetPerimeter ( ) const [virtual]

Reimplemented from CWheel.

Definition at line 662 of file piece.cpp.

{
  return (m_bWheelInside? (double)m_nRadiusInt :
                (double)m_nRadius) * 2.0 * PI;
}

__inline bool CRing::ReverseWheelDirection ( ) const [virtual]

Reimplemented from CWheel.

Definition at line 712 of file piece.cpp.

{
  return m_bWheelInside;
}

__inline void CRing::SetAngleDelta | ( | long | nDistance,
 |  | bool | bReverse |
 | ) |  |  | [virtual]

Reimplemented from CWheel.

Definition at line 668 of file piece.cpp.

{
  ASSERT(nDistance > 0);
  ASSERT(m_nRadiusInt > 0 && m_nRadius > 0);
  m_angleDelta = (double)nDistance /
            (double)(m_bWheelInside? m_nRadiusInt : m_nRadius);

  ASSERT(m_angleDelta != 0);
}

Member Data Documentation

bool CRing::m_bWheelInside

Definition at line 248 of file piece.h.

long CRing::m_nRadiusInt

Definition at line 247 of file piece.h.

COLORREF CRing::m_rgco [static]
Initial value:

    {RGB(255, 0, 0),
    RGB(0, 0, 255),
    RGB(255, 255, 0),
    RGB(200, 200, 0)}

Reimplemented from CWheel.

Definition at line 245 of file piece.h.

long CRing::m_rgnRads = {250, 220, 180, 150} [static]

Reimplemented from CWheel.

Definition at line 244 of file piece.h.

The documentation for this class was generated from the following files:
  • general/spiro/piece.h
  • general/spiro/piece.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRoamer Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

CRoamer Struct Reference

#include "Swarm.h"

Inherited by CLeader, and CLlama.

List of all members.

Public Member Functions

virtual | ~CRoamer ()
void | Bounce (long &value, const int lower, const int upper, int &vel)

Static Public Member Functions

static int | DeltaRandom (int i)

Public Attributes

int | dx
int | dy
CPoint | p1
CPoint | p2

Detailed Description

Definition at line 55 of file Swarm.h.

Constructor & Destructor Documentation

virtual CRoamer::~CRoamer ( ) [inline, virtual]

Definition at line 57 of file Swarm.h.

{ } // Virtual destructors for derived classes

Member Function Documentation

void CRoamer::Bounce | ( | long & | value,
 |  | const int | lower,
 |  | const int | upper,
 |  | int & | vel |
 | ) |  |  | [inline]

Definition at line 129 of file Swarm.h.

{
    if (value < lower) {
        vel *= -1;
        value = lower;
    }
    else if (value >= upper) {
        vel *= -1;
        value = upper-1;
    }
}

static int CRoamer::DeltaRandom ( int i ) [inline, static]

Definition at line 59 of file Swarm.h.

{ return(Random(i) - i/2); }

Member Data Documentation

int CRoamer::dx

Definition at line 62 of file Swarm.h.

int CRoamer::dy

Definition at line 62 of file Swarm.h.

CPoint CRoamer::p1

Definition at line 60 of file Swarm.h.

CPoint CRoamer::p2

Definition at line 61 of file Swarm.h.

The documentation for this struct was generated from the following file:
  • general/MMXSwarm/Swarm.h
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRollupPaneApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRollupPaneApp Class Reference

#include "RollupPane.h"

List of all members.

Public Member Functions

CRollupPaneApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file RollupPane.h.

Constructor & Destructor Documentation

CRollupPaneApp::CRollupPaneApp ( )

Definition at line 37 of file RollupPane.cpp.

                               :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CRollupPaneApp::ExitInstance ( ) [virtual]

Definition at line 140 of file RollupPane.cpp.

{

  return CWinAppEx::ExitInstance();
}

BOOL CRollupPaneApp::InitInstance ( ) [virtual]

Definition at line 52 of file RollupPane.cpp.

{
  // InitCommonControlsEx() is required on Windows XP if an application
  // manifest specifies use of ComCtl32.dll version 6 or later to enable
  // visual styles.  Otherwise, any window creation will fail.
  INITCOMMONCONTROLSEX InitCtrls;
  InitCtrls.dwSize = sizeof(InitCtrls);
  // Set this to include all the common control classes you want to use
  // in your application.
  InitCtrls.dwICC = ICC_WIN95_CLASSES;
  InitCommonControlsEx(&InitCtrls);

  CWinApp::InitInstance();

  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }
  AfxEnableControlContainer();
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
  LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // TODO: Remove this if you don't want extended tooltips:
  InitTooltipManager();

  CMFCToolTipInfo params;
  params.m_bVislManagerTheme = TRUE;

  theApp.GetTooltipManager ()->SetTooltipParams (
    AFX_TOOLTIP_TYPE_ALL,
    RUNTIME_CLASS (CMFCToolTipCtrl),
    &params);

  // 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(CRollupPaneDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CRollupPaneView));
  if (!pDocTemplate)
    return FALSE;
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();
  // call DragAcceptFiles only if there's a suffix
  //  In an SDI app, this should occur after ProcessShellCommand

  if (afxGlobalData.m_nBitsPerPixel < 16)
  {
    AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
  }

  return TRUE;
}

void CRollupPaneApp::OnAppAbout ( )

Definition at line 204 of file RollupPane.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CRollupPaneApp::PreLoadState ( ) [virtual]

Definition at line 149 of file RollupPane.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/RollupPane/RollupPane.h
  • vc2008fp/RollupPane/RollupPane.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRollupPaneDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRollupPaneDoc Class Reference

#include "RollupPaneDoc.h"

List of all members.

Public Member Functions

virtual | ~CRollupPaneDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CRollupPaneDoc ()

Detailed Description

Definition at line 13 of file RollupPaneDoc.h.

Constructor & Destructor Documentation

CRollupPaneDoc::CRollupPaneDoc ( ) [protected]

Definition at line 31 of file RollupPaneDoc.cpp.

{
  // TODO: add one-time construction code here

}

CRollupPaneDoc::~CRollupPaneDoc ( ) [virtual]

Definition at line 37 of file RollupPaneDoc.cpp.

{
}

Member Function Documentation

BOOL CRollupPaneDoc::OnNewDocument ( ) [virtual]

Definition at line 41 of file RollupPaneDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CRollupPaneDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 57 of file RollupPaneDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/RollupPane/RollupPaneDoc.h
  • vc2008fp/RollupPane/RollupPaneDoc.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRollupPaneView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRollupPaneView Class Reference

#include "RollupPaneView.h"

List of all members.

Public Member Functions

virtual | ~CRollupPaneView ()
CRollupPaneDoc * | GetDocument () const
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CRollupPaneView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file RollupPaneView.h.

Constructor & Destructor Documentation

CRollupPaneView::CRollupPaneView ( ) [protected]

Definition at line 35 of file RollupPaneView.cpp.

{
  // TODO: add construction code here

}

CRollupPaneView::~CRollupPaneView ( ) [virtual]

Definition at line 41 of file RollupPaneView.cpp.

{
}

Member Function Documentation

CRollupPaneDoc * CRollupPaneView::GetDocument ( ) const [inline]

Definition at line 52 of file RollupPaneView.h.

   { return reinterpret_cast<CRollupPaneDoc*>(m_pDocument); }

void CRollupPaneView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 77 of file RollupPaneView.cpp.

{
  // TODO: add extra initialization before printing
}

void CRollupPaneView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 55 of file RollupPaneView.cpp.

{
//  CRollupPaneDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  // TODO: add draw code for native data here
}

void CRollupPaneView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 82 of file RollupPaneView.cpp.

{
  // TODO: add cleanup after printing
}

void CRollupPaneView::OnFilePrintPreview ( ) [protected]

Definition at line 66 of file RollupPaneView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CRollupPaneView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 71 of file RollupPaneView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CRollupPaneView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 45 of file RollupPaneView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/RollupPane/RollupPaneView.h
  • vc2008fp/RollupPane/RollupPaneView.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRowListApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CRowListApp Class Reference

#include "rowlist.h"

List of all members.

Public Member Functions

CRowListApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 23 of file rowlist.h.

Constructor & Destructor Documentation

CRowListApp::CRowListApp ( )

Definition at line 44 of file rowlist.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CRowListApp::InitInstance ( ) [virtual]

Definition at line 58 of file rowlist.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // 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(CRowListDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CRowListView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  return TRUE;
}

void CRowListApp::OnAppAbout ( )

Definition at line 136 of file rowlist.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/rowlist/rowlist.h
  • general/rowlist/rowlist.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRowListDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CRowListDoc Class Reference

#include "rlistdoc.h"

List of all members.

Public Member Functions

virtual | ~CRowListDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CRowListDoc ()

Detailed Description

Definition at line 12 of file rlistdoc.h.

Constructor & Destructor Documentation

CRowListDoc::CRowListDoc ( ) [protected]

Definition at line 38 of file rlistdoc.cpp.

{
  // TODO: add one-time construction code here

}

CRowListDoc::~CRowListDoc ( ) [virtual]

Definition at line 44 of file rlistdoc.cpp.

{
}

Member Function Documentation

BOOL CRowListDoc::OnNewDocument ( ) [virtual]

Definition at line 48 of file rlistdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CRowListDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 62 of file rlistdoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • general/rowlist/rlistdoc.h
  • general/rowlist/rlistdoc.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRowListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CRowListView Class Reference

#include "rlistvw.h"

Inherits CListViewEx.

List of all members.

Public Member Functions

virtual | ~CRowListView ()
CRowListDoc * GetDocument ()
DWORD | GetViewType ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
BOOL | SetViewType (DWORD dwViewType)

Protected Member Functions

CRowListView ()
void | CheckItem (int nNewCheckedItem)
virtual void | OnInitialUpdate ()
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnUpdateViewClientWidthSel (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewDetails (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewFullRowDetails (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewLargeIcons (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewList (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewSmallIcons (CCmdUI *pCmdUI)
afx_msg void | OnUpdateViewStateIcons (CCmdUI *pCmdUI)
afx_msg void | OnViewClientWidthSel ()
afx_msg void | OnViewDetails ()
afx_msg void | OnViewFullRowDetails ()
afx_msg void | OnViewLargeIcons ()
afx_msg void | OnViewList ()
afx_msg void | OnViewSmallIcons ()
afx_msg void | OnViewStateIcons ()

Protected Attributes

BOOL | m_bStateIcons
HICON | m_hLargeIcon
HICON | m_hSmallIcon
CImageList | m_LargeImageList
int | m_nCheckedItem
CImageList | m_SmallImageList
CImageList | m_StateImageList

Detailed Description

Definition at line 12 of file rlistvw.h.

Constructor & Destructor Documentation

CRowListView::CRowListView ( ) [protected]

Definition at line 55 of file rlistvw.cpp.

{
  m_bStateIcons = TRUE;
  m_nCheckedItem = -1;
  m_hSmallIcon = NULL;
  m_hLargeIcon = NULL;
}

CRowListView::~CRowListView ( ) [virtual]

Definition at line 63 of file rlistvw.cpp.

{
}

Member Function Documentation

void CRowListView::CheckItem ( int nNewCheckedItem ) [protected]

Definition at line 208 of file rlistvw.cpp.

{
  CListCtrl& ListCtrl = GetListCtrl();

// reset if there is checked item

  if (m_nCheckedItem != -1)
  {
    if (m_bStateIcons)
    {
      ListCtrl.SetItemState(m_nCheckedItem,
        INDEXTOSTATEIMAGEMASK(1), LVIS_STATEIMAGEMASK);
    }
    else
    {
      ListCtrl.SetItemState(m_nCheckedItem,
        INDEXTOSTATEIMAGEMASK(1),
        LVIS_STATEIMAGEMASK | LVIS_OVERLAYMASK);
    }

    ::DestroyIcon(m_hSmallIcon);
    ::DestroyIcon(m_hLargeIcon);
  }

// check new item and set its icon as the app icon

  CWnd* pMainWnd = AfxGetMainWnd();

  if (m_nCheckedItem == nNewCheckedItem)
  {
    m_nCheckedItem = -1;
    pMainWnd->SetIcon(NULL, FALSE);
    pMainWnd->SetIcon(NULL, TRUE);
  }
  else if ((m_nCheckedItem = nNewCheckedItem) != -1)
  {
    if (m_bStateIcons)
    {
      ListCtrl.SetItemState(m_nCheckedItem,
        INDEXTOSTATEIMAGEMASK(2), LVIS_STATEIMAGEMASK);
    }
    else
    {
      ListCtrl.SetItemState(m_nCheckedItem,
        INDEXTOSTATEIMAGEMASK(2) | INDEXTOOVERLAYMASK(1),
        LVIS_STATEIMAGEMASK | LVIS_OVERLAYMASK);
    }

    m_hSmallIcon =
      ListCtrl.GetImageList(LVSIL_SMALL)->ExtractIcon(nNewCheckedItem);
    pMainWnd->SetIcon(m_hSmallIcon,FALSE);
    m_hLargeIcon =
      ListCtrl.GetImageList(LVSIL_NORMAL)->ExtractIcon(nNewCheckedItem);
    pMainWnd->SetIcon(m_hLargeIcon,TRUE);
  }
}

CRowListDoc * CRowListView::GetDocument ( ) [inline]

Definition at line 88 of file rlistvw.h.

   { return (CRowListDoc*)m_pDocument; }

DWORD CRowListView::GetViewType ( )

Definition at line 203 of file rlistvw.cpp.

{
  return(GetStyle() & LVS_TYPEMASK);
}

void CRowListView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 111 of file rlistvw.cpp.

{
  CListViewEx::OnInitialUpdate();

  CListCtrl& ListCtrl = GetListCtrl();

// set image lists

  m_LargeImageList.Create(IDB_LARGEICONS, 32, 1, RGB(255, 255, 255));
  m_SmallImageList.Create(IDB_SMALLICONS, 16, 1, RGB(255, 255, 255));
  m_StateImageList.Create(IDB_STATEICONS, 16, 1, RGB(255, 0, 0));

  m_LargeImageList.SetOverlayImage(NUM_ITEMS, 1);
  m_SmallImageList.SetOverlayImage(NUM_ITEMS, 1);

  ListCtrl.SetImageList(&m_LargeImageList, LVSIL_NORMAL);
  ListCtrl.SetImageList(&m_SmallImageList, LVSIL_SMALL);
  ListCtrl.SetImageList(&m_StateImageList, LVSIL_STATE);

// insert columns

  int i, j;
  LV_COLUMN lvc;

  lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;

  for(i = 0; i<NUM_COLUMNS; i++)
  {
    lvc.iSubItem = i;
    lvc.pszText = _gszColumnLabel[i];
    lvc.cx = _gnColumnWidth[i];
    lvc.fmt = _gnColumnFmt[i];
    ListCtrl.InsertColumn(i,&lvc);
  }

// insert items

  LV_ITEM lvi;

  for(i = 0; i < NUM_ITEMS; i++)
  {
    lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
    lvi.iItem = i;
    lvi.iSubItem = 0;
    lvi.pszText = _gszItem[i][0];
    lvi.iImage = i;
    lvi.stateMask = LVIS_STATEIMAGEMASK;
    lvi.state = INDEXTOSTATEIMAGEMASK(1);

    ListCtrl.InsertItem(&lvi);
  }

// set item text for additional columns

  for(i = 0; i<NUM_ITEMS; i++)
  {
    for(j = 1; j<NUM_COLUMNS; j++)
    {
      ListCtrl.SetItemText(i,j,_gszItem[i][j]);
    }
  }
}

void CRowListView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 398 of file rlistvw.cpp.

{
  UINT uFlags = 0;
  int nHitItem = GetListCtrl().HitTest(point, &uFlags);

  if (uFlags & LVHT_ONITEM)
  {
    // double click works only if we don't have state icons,
    // or if we are in icon or small icon view
    if (!m_bStateIcons || GetViewType() == LVS_ICON ||
      GetViewType()==LVS_SMALLICON)
    {
      CheckItem(nHitItem);
    }
  }

  CListViewEx::OnLButtonDblClk(nFlags, point);
}

void CRowListView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 372 of file rlistvw.cpp.

{
  UINT uFlags = 0;
  int nHitItem = GetListCtrl().HitTest(point, &uFlags);

  // we need additional checking in owner-draw mode
  // because we only get LVHT_ONITEM
  BOOL bHit = FALSE;
  if (uFlags == LVHT_ONITEM && (GetStyle() & LVS_OWNERDRAWFIXED))
  {
    CRect rect;
    GetListCtrl().GetItemRect(nHitItem, rect, LVIR_ICON);

    // check if hit was on a state icon
    if (m_bStateIcons && point.x < rect.left)
      bHit = TRUE;
  }
  else if (uFlags & LVHT_ONITEMSTATEICON)
    bHit = TRUE;

  if (bHit)
    CheckItem(nHitItem);
  else
    CListViewEx::OnLButtonDown(nFlags, point);
}

void CRowListView::OnUpdateViewClientWidthSel ( CCmdUI * pCmdUI ) [protected]

Definition at line 366 of file rlistvw.cpp.

{
  pCmdUI->SetCheck(m_bClientWidthSel);
  pCmdUI->Enable((GetViewType() == LVS_REPORT) && GetFullRowSel());
}

void CRowListView::OnUpdateViewDetails ( CCmdUI * pCmdUI ) [protected]

Definition at line 321 of file rlistvw.cpp.

{
  pCmdUI->SetCheck((GetViewType() == LVS_REPORT) && !GetFullRowSel());
}

void CRowListView::OnUpdateViewFullRowDetails ( CCmdUI * pCmdUI ) [protected]

Definition at line 326 of file rlistvw.cpp.

{
  pCmdUI->SetCheck((GetViewType() == LVS_REPORT) && GetFullRowSel());
}

void CRowListView::OnUpdateViewLargeIcons ( CCmdUI * pCmdUI ) [protected]

Definition at line 311 of file rlistvw.cpp.

{
  pCmdUI->SetCheck(GetViewType() == LVS_ICON);
}

void CRowListView::OnUpdateViewList ( CCmdUI * pCmdUI ) [protected]

Definition at line 316 of file rlistvw.cpp.

{
  pCmdUI->SetCheck(GetViewType() == LVS_LIST);
}

void CRowListView::OnUpdateViewSmallIcons ( CCmdUI * pCmdUI ) [protected]

Definition at line 306 of file rlistvw.cpp.

{
  pCmdUI->SetCheck(GetViewType() == LVS_SMALLICON);
}

void CRowListView::OnUpdateViewStateIcons ( CCmdUI * pCmdUI ) [protected]

Definition at line 353 of file rlistvw.cpp.

{
  pCmdUI->SetCheck(m_bStateIcons);
}

void CRowListView::OnViewClientWidthSel ( ) [protected]

Definition at line 358 of file rlistvw.cpp.

{
  m_bClientWidthSel = !m_bClientWidthSel;

  Invalidate();
  UpdateWindow();
}

void CRowListView::OnViewDetails ( ) [protected]

Definition at line 286 of file rlistvw.cpp.

{
  if ((GetViewType() != LVS_REPORT) || GetFullRowSel())
  {
    SetFullRowSel(FALSE);
    if (GetViewType() != LVS_REPORT)
      SetViewType(LVS_REPORT);
  }
}

void CRowListView::OnViewFullRowDetails ( ) [protected]

Definition at line 296 of file rlistvw.cpp.

{
  if ((GetViewType() != LVS_REPORT) || !GetFullRowSel())
  {
    SetFullRowSel(TRUE);
    if (GetViewType() != LVS_REPORT)
      SetViewType(LVS_REPORT);
  }
}

void CRowListView::OnViewLargeIcons ( ) [protected]

Definition at line 274 of file rlistvw.cpp.

{
  if (GetViewType() != LVS_ICON)
    SetViewType(LVS_ICON);
}

void CRowListView::OnViewList ( ) [protected]

Definition at line 280 of file rlistvw.cpp.

{
  if (GetViewType() != LVS_LIST)
    SetViewType(LVS_LIST);
}

void CRowListView::OnViewSmallIcons ( ) [protected]

Definition at line 268 of file rlistvw.cpp.

{
  if (GetViewType() != LVS_SMALLICON)
    SetViewType(LVS_SMALLICON);
}

void CRowListView::OnViewStateIcons ( ) [protected]

Definition at line 331 of file rlistvw.cpp.

{
  m_bStateIcons =! m_bStateIcons;

  CListCtrl& ListCtrl = GetListCtrl();

  if (m_bStateIcons)
  {
    ListCtrl.SetImageList(&m_StateImageList, LVSIL_STATE);
    ListCtrl.SetItemState(m_nCheckedItem, 0, LVIS_OVERLAYMASK);
  }
  else
  {
    ListCtrl.SetImageList(NULL,LVSIL_STATE);
    if (m_nCheckedItem != -1)
    {
      ListCtrl.SetItemState(m_nCheckedItem,
        INDEXTOOVERLAYMASK(1), LVIS_OVERLAYMASK);
    }
  }
}

BOOL CRowListView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Reimplemented from CListViewEx.

Definition at line 67 of file rlistvw.cpp.

{
  cs.style |= LVS_SHOWSELALWAYS | LVS_REPORT;

  return CListViewEx::PreCreateWindow(cs);
}

BOOL CRowListView::SetViewType ( DWORD dwViewType )

Definition at line 198 of file rlistvw.cpp.

{
  return(ModifyStyle(LVS_TYPEMASK,dwViewType & LVS_TYPEMASK));
}

Member Data Documentation

BOOL CRowListView::m_bStateIcons [protected]

Definition at line 79 of file rlistvw.h.

HICON CRowListView::m_hLargeIcon [protected]

Definition at line 82 of file rlistvw.h.

HICON CRowListView::m_hSmallIcon [protected]

Definition at line 81 of file rlistvw.h.

CImageList CRowListView::m_LargeImageList [protected]

Definition at line 68 of file rlistvw.h.

int CRowListView::m_nCheckedItem [protected]

Definition at line 80 of file rlistvw.h.

CImageList CRowListView::m_SmallImageList [protected]

Definition at line 69 of file rlistvw.h.

CImageList CRowListView::m_StateImageList [protected]

Definition at line 70 of file rlistvw.h.

The documentation for this class was generated from the following files:
  • general/rowlist/rlistvw.h
  • general/rowlist/rlistvw.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRulerBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

CRulerBar Class Reference

#include "ruler.h"

List of all members.

Public Member Functions

CRulerBar (BOOL b3DExt=TRUE)
CRulerBar (BOOL b3DExt=TRUE)
~CRulerBar ()
~CRulerBar ()
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz)
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz)
void | ClientToRuler (CRect &rect)
void | ClientToRuler (CPoint &pt)
void | ClientToRuler (CPoint &pt)
void | ClientToRuler (CRect &rect)
virtual BOOL | Create (CWnd *pParentWnd, DWORD dwStyle, UINT nID)
virtual BOOL | Create (CWnd *pParentWnd, DWORD dwStyle, UINT nID)
void | CreateGDIObjects ()
virtual void | DoPaint (CDC *pDC)
virtual void | DoPaint (CDC *pDC)
CSize | GetBaseUnits ()
CSize | GetBaseUnits ()
int | PrintWidth ()
int | PrintWidth ()
void | RulerToClient (CPoint &pt)
void | RulerToClient (CRect &rect)
void | RulerToClient (CPoint &pt)
void | RulerToClient (CRect &rect)
int | XClientToRuler (int nC)
int | XClientToRuler (int nC)
int | XClientToTwips (int nC)
int | XClientToTwips (int nC)
int | XRulerToClient (int nR)
int | XRulerToClient (int nR)
int | XRulerToTwips (int nR)
int | XRulerToTwips (int nR)
int | XTwipsToClient (int nT)
int | XTwipsToClient (int nT)
int | XTwipsToRuler (int nT)
int | XTwipsToRuler (int nT)

Public Attributes

CBrush | brushBtnFace
CBrush | brushWindow
CFont | fnt
BOOL | m_bDeferInProgress
BOOL | m_bDraw3DExt
CRulerItem m_indent
CComboRulerItem m_leftmargin
int | m_logx
int | m_nLinePos
int | m_nScroll
int | m_nTabs
CRulerItem * m_pSelItem
CTabRulerItem | m_pTabItems [MAX_TAB_STOPS]
CRect | m_rectMargin
CRulerItem m_rightmargin
CSize | m_sizePaper
CRulerItem m_tabItem
CUnit m_unit
CPen | penBtnFace
CPen | penBtnHighLight
CPen | penBtnShadow
CPen | penBtnText
CPen | penFocusLine
CPen | penWindow
CPen | penWindowFrame
CPen | penWindowText

Protected Member Functions

void | CreateGDIObjects ()
void | DrawDiv (CDC &dc, int nInc, int nLargeDiv, int nLength)
void | DrawDiv (CDC &dc, int nInc, int nLargeDiv, int nLength)
void | DrawFace (CDC &dc)
void | DrawFace (CDC &dc)
void | DrawNumbers (CDC &dc, int nInc, int nTPU)
void | DrawNumbers (CDC &dc, int nInc, int nTPU)
void | DrawTabs (CDC &dc)
void | DrawTabs (CDC &dc)
void | DrawTickMarks (CDC &dC)
void | DrawTickMarks (CDC &dC)
void | FillInParaFormat (WPD_PARAFORMAT &pf)
void | FillInParaFormat (PARAFORMAT &pf)
CDocument * | GetDocument ()
CDocument * | GetDocument ()
CRulerItem * GetFreeTab ()
CRulerItem * GetFreeTab ()
CTabRulerItem * | GetHitTabPix (CPoint pt)
CTabRulerItem * | GetHitTabPix (CPoint pt)
CView * | GetView ()
CView * | GetView ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnShowWindow (BOOL bShow, UINT nStatus)
afx_msg void | OnShowWindow (BOOL bShow, UINT nStatus)
afx_msg LRESULT | OnSizeParent (WPARAM wParam, LPARAM lParam)
afx_msg LRESULT | OnSizeParent (WPARAM wParam, LPARAM lParam)
afx_msg void | OnSysColorChange ()
afx_msg void | OnSysColorChange ()
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnWindowPosChanging (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnWindowPosChanging (WINDOWPOS FAR *lpwndpos)
void | SetMarginBounds ()
void | SetMarginBounds ()
void | SortTabs ()
void | SortTabs ()
void | Update (CSize sizePaper, const CRect &rectMargins)
void | Update (CSize sizePaper, const CRect &rectMargins)
void | Update (const PARAFORMAT &pf)
void | Update (const WPD_PARAFORMAT &pf)

Friends

class | CRulerItem

Detailed Description

Definition at line 96 of file ruler.h.

Constructor & Destructor Documentation

CRulerBar::CRulerBar ( BOOL b3DExt = TRUE )

Definition at line 296 of file ruler.cpp.

                                :
  m_leftmargin(IDB_RULER_BLOCK, IDB_RULER_UP, m_indent),
  m_indent(IDB_RULER_DOWN),
  m_rightmargin(IDB_RULER_UP),
  m_tabItem(IDB_RULER_TAB)
{
  m_bDeferInProgress = FALSE;
  m_leftmargin.SetRuler(this);
  m_indent.SetRuler(this);
  m_rightmargin.SetRuler(this);

  // all of the tab stops share handles
  for (int i=0;i<MAX_TAB_STOPS;i++)
  {
    m_pTabItems[i].m_hbm = m_tabItem.m_hbm;
    m_pTabItems[i].m_hbmMask = m_tabItem.m_hbmMask;
    m_pTabItems[i].m_size = m_tabItem.m_size;
  }

  m_unit.m_nTPU = 0;
  m_nScroll = 0;

  LOGFONT lf;
  memcpy_s(&lf, sizeof(LOGFONT), &theApp.m_lf, sizeof(LOGFONT));
  lf.lfHeight = -8;
  lf.lfWidth = 0;
  VERIFY(fnt.CreateFontIndirect(&lf));

  m_nTabs = 0;
  m_leftmargin.SetVertPos(9);
  m_indent.SetVertPos(-1);
  m_rightmargin.SetVertPos(9);

  m_cxLeftBorder = 0;
  if (!theApp.m_bWin4)
    m_bDraw3DExt = FALSE;
  else
    m_bDraw3DExt = b3DExt;

  m_cyTopBorder = 4;
  m_cyBottomBorder = 6;

  m_pSelItem = NULL;

  m_logx = theApp.m_dcScreen.GetDeviceCaps(LOGPIXELSX);

  CreateGDIObjects();
}

CRulerBar::~CRulerBar ( )

Definition at line 345 of file ruler.cpp.

{
  // set handles to NULL to avoid deleting twice
  for (int i=0;i<MAX_TAB_STOPS;i++)
  {
    m_pTabItems[i].m_hbm = NULL;
    m_pTabItems[i].m_hbmMask = NULL;
  }
}

CRulerBar::CRulerBar ( BOOL b3DExt = TRUE )
CRulerBar::~CRulerBar ( )

Member Function Documentation

CSize CRulerBar::CalcFixedLayout | ( | BOOL | bStretch,
 |  | BOOL | bHorz |
 | ) |  |  | [virtual]

Definition at line 451 of file ruler.cpp.

{
  ASSERT(bHorz);
  CSize m_size = CControlBar::CalcFixedLayout(bStretch, bHorz);
  CRect rectSize;
  rectSize.SetRectEmpty();
  CalcInsideRect(rectSize, bHorz);       // will be negative size
  m_size.cy = RULERBARHEIGHT - rectSize.Height();
  return m_size;
}

virtual CSize CRulerBar::CalcFixedLayout | ( | BOOL | bStretch,
 |  | BOOL | bHorz |
 | ) |  |  | [virtual]
void CRulerBar::ClientToRuler ( CRect & rect ) [inline]

Definition at line 151 of file ruler.h.

{rect.OffsetRect(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}

void CRulerBar::ClientToRuler ( CPoint & pt ) [inline]

Definition at line 150 of file ruler.h.

{pt.Offset(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}

void CRulerBar::ClientToRuler ( CPoint & pt ) [inline]

Definition at line 149 of file ruler.h.

{pt.Offset(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}

void CRulerBar::ClientToRuler ( CRect & rect ) [inline]

Definition at line 150 of file ruler.h.

{rect.OffsetRect(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}

virtual BOOL CRulerBar::Create | ( | CWnd * | pParentWnd,
 |  | DWORD | dwStyle,
 |  | UINT | nID |
 | ) |  |  | [virtual]
BOOL CRulerBar::Create | ( | CWnd * | pParentWnd,
 |  | DWORD | dwStyle,
 |  | UINT | nID |
 | ) |  |  | [virtual]

Definition at line 421 of file ruler.cpp.

{
  ASSERT_VALID(pParentWnd);   // must have a parent

  dwStyle |= WS_CLIPSIBLINGS;
  // force WS_CLIPSIBLINGS (avoids SetWindowPos bugs)
  m_dwStyle = (dwStyle & CBRS_ALL);

  // create the HWND
  CRect rect;
  rect.SetRectEmpty();
  LPCTSTR lpszClass = AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW),
    (HBRUSH)(COLOR_BTNFACE+1), NULL);

  if (!CWnd::Create(lpszClass, NULL, dwStyle, rect, pParentWnd, nID))
    return FALSE;
  // NOTE: Parent must resize itself for control bar to be resized

  int i;
  int nMax = 100;
  for (i=0;i<MAX_TAB_STOPS;i++)
  {
    m_pTabItems[i].SetRuler(this);
    m_pTabItems[i].SetVertPos(8);
    m_pTabItems[i].SetHorzPosTwips(0);
    m_pTabItems[i].SetBounds(0, nMax);
  }
  return TRUE;
}

void CRulerBar::CreateGDIObjects ( ) [protected]

Definition at line 355 of file ruler.cpp.

{
  penFocusLine.DeleteObject();
  penBtnHighLight.DeleteObject();
  penBtnShadow.DeleteObject();
  penWindowFrame.DeleteObject();
  penBtnText.DeleteObject();
  penBtnFace.DeleteObject();
  penWindowText.DeleteObject();
  penWindow.DeleteObject();
  brushWindow.DeleteObject();
  brushBtnFace.DeleteObject();

  penFocusLine.CreatePen(PS_DOT, 1,GetSysColor(COLOR_WINDOWTEXT));
  penBtnHighLight.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHIGHLIGHT));
  penBtnShadow.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
  penWindowFrame.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWFRAME));
  penBtnText.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNTEXT));
  penBtnFace.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNFACE));
  penWindowText.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWTEXT));
  penWindow.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOW));
  brushWindow.CreateSolidBrush(GetSysColor(COLOR_WINDOW));
  brushBtnFace.CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
}

void CRulerBar::CreateGDIObjects ( )
virtual void CRulerBar::DoPaint ( CDC * pDC ) [virtual]
void CRulerBar::DoPaint ( CDC * pDC ) [virtual]

Definition at line 532 of file ruler.cpp.

{
  CControlBar::DoPaint(pDC); // CControlBar::DoPaint -- draws border
  if (m_unit.m_nTPU != 0)
  {
    pDC->SaveDC();
    // offset coordinate system
    CPoint pointOffset(0,0);
    RulerToClient(pointOffset);
    pDC->SetViewportOrg(pointOffset);

    DrawFace(*pDC);
    DrawTickMarks(*pDC);

    DrawTabs(*pDC);
    m_leftmargin.Draw(*pDC);
    m_indent.Draw(*pDC);
    m_rightmargin.Draw(*pDC);

    pDC->RestoreDC(-1);
  }
  // Do not call CControlBar::OnPaint() for painting messages
}

void CRulerBar::DrawDiv | ( | CDC & | dc,
 |  | int | nInc,
 |  | int | nLargeDiv,
 |  | int | nLength |
 | ) |  |  | [protected]

Definition at line 696 of file ruler.cpp.

{
  int nPageWidth = PrintWidth();
  int nPageEdge = nPageWidth + m_rectMargin.right;

  int nTwips, nPixel;

  for (nTwips = nInc; nTwips < nPageEdge; nTwips += nInc)
  {
    if (nTwips == nPageWidth || nTwips%nLargeDiv == 0)
      continue;
    nPixel = XTwipsToRuler(nTwips);
    dc.MoveTo(nPixel, HEIGHT/2 - nLength/2);
    dc.LineTo(nPixel, HEIGHT/2 - nLength/2 + nLength);
  }
}

void CRulerBar::DrawDiv | ( | CDC & | dc,
 |  | int | nInc,
 |  | int | nLargeDiv,
 |  | int | nLength |
 | ) |  |  | [protected]
void CRulerBar::DrawFace ( CDC & dc ) [protected]

Definition at line 577 of file ruler.cpp.

{
  int nPageWidth = XTwipsToRuler(PrintWidth());
  int nPageEdge = XTwipsToRuler(PrintWidth() + m_rectMargin.right);

  dc.SaveDC();

  dc.SelectObject(&penBtnShadow);
  dc.MoveTo(0,0);
  dc.LineTo(nPageEdge - 1, 0);
  dc.LineTo(nPageEdge - 1, HEIGHT - 2);
  dc.LineTo(nPageWidth - 1, HEIGHT - 2);
  dc.LineTo(nPageWidth - 1, 1);
  dc.LineTo(nPageWidth, 1);
  dc.LineTo(nPageWidth, HEIGHT -2);

  dc.SelectObject(&penBtnHighLight);
  dc.MoveTo(nPageWidth, HEIGHT - 1);
  dc.LineTo(nPageEdge, HEIGHT -1);
  dc.MoveTo(nPageWidth + 1, HEIGHT - 3);
  dc.LineTo(nPageWidth + 1, 1);
  dc.LineTo(nPageEdge - 1, 1);

  dc.SelectObject(&penWindow);
  dc.MoveTo(0, HEIGHT - 1);
  dc.LineTo(nPageWidth, HEIGHT -1);

  dc.SelectObject(&penBtnFace);
  dc.MoveTo(1, HEIGHT - 2);
  dc.LineTo(nPageWidth - 1, HEIGHT - 2);

  dc.SelectObject(&penWindowFrame);
  dc.MoveTo(0, HEIGHT - 2);
  dc.LineTo(0, 1);
  dc.LineTo(nPageWidth - 1, 1);

  dc.FillRect(CRect(1, 2, nPageWidth - 1, HEIGHT-2), &brushWindow);
  dc.FillRect(CRect(nPageWidth + 2, 2, nPageEdge - 1, HEIGHT-2), &brushBtnFace);

  CRect rcClient;
  GetClientRect(&rcClient);
  ClientToRuler(rcClient);
  rcClient.top = HEIGHT;
  rcClient.bottom = HEIGHT + 2;
  dc.FillRect(rcClient, &brushBtnFace);

  CRect rectFill(rcClient.left, HEIGHT+4, rcClient.right, HEIGHT+9);
  dc.FillRect(rectFill, &brushWindow);

  if (m_bDraw3DExt)  // draws the 3D extension into the view
  {
    dc.SelectObject(&penBtnShadow);
    dc.MoveTo(rcClient.left, HEIGHT+8);
    dc.LineTo(rcClient.left, HEIGHT+2);
    dc.LineTo(rcClient.right-1, HEIGHT+2);

    dc.SelectObject(&penWindowFrame);
    dc.MoveTo(rcClient.left+1, HEIGHT+8);
    dc.LineTo(rcClient.left+1, HEIGHT+3);
    dc.LineTo(rcClient.right-2, HEIGHT+3);

    dc.SelectObject(&penBtnHighLight);
    dc.MoveTo(rcClient.right-1, HEIGHT+2);
    dc.LineTo(rcClient.right-1, HEIGHT+8);

    dc.SelectObject(&penBtnFace);
    dc.MoveTo(rcClient.right-2, HEIGHT+3);
    dc.LineTo(rcClient.right-2, HEIGHT+8);
  }
  else
  {
    dc.SelectObject(&penBtnShadow);
    dc.MoveTo(rcClient.left, HEIGHT+2);
    dc.LineTo(rcClient.right, HEIGHT+2);

    dc.SelectObject(&penWindowFrame);
    dc.MoveTo(rcClient.left, HEIGHT+3);
    dc.LineTo(rcClient.right, HEIGHT+3);
  }

  dc.RestoreDC(-1);
}

void CRulerBar::DrawFace ( CDC & dc ) [protected]
void CRulerBar::DrawNumbers | ( | CDC & | dc,
 |  | int | nInc,
 |  | int | nTPU |
 | ) |  |  | [protected]

Definition at line 676 of file ruler.cpp.

{
  int nPageWidth = PrintWidth();
  int nPageEdge = nPageWidth + m_rectMargin.right;
  TCHAR buf[10];

  int nTwips, nPixel, nLen;

  for (nTwips = nInc; nTwips < nPageEdge; nTwips += nInc)
  {
    if (nTwips == nPageWidth)
      continue;
    nPixel = XTwipsToRuler(nTwips);
    _stprintf_s(buf, 10, _T("%d"), nTwips/nTPU);
    nLen = lstrlen(buf);
    CSize sz = dc.GetTextExtent(buf, nLen);
    dc.ExtTextOut(nPixel - sz.cx/2, HEIGHT/2 - sz.cy/2, 0, NULL, buf, nLen, NULL);
  }
}

void CRulerBar::DrawNumbers | ( | CDC & | dc,
 |  | int | nInc,
 |  | int | nTPU |
 | ) |  |  | [protected]
void CRulerBar::DrawTabs ( CDC & dc ) [protected]

Definition at line 556 of file ruler.cpp.

{
  int i;
  int nPos = 0;
  for (i=0;i<MAX_TAB_STOPS;i++)
  {
    if (m_pTabItems[i].GetHorzPosTwips() > nPos)
      nPos = (m_pTabItems[i].GetHorzPosTwips());
    m_pTabItems[i].Draw(dc);
  }
  int nPageWidth = PrintWidth();
  nPos = nPos - nPos%720 + 720;
  dc.SelectObject(&penBtnShadow);
  for ( ; nPos < nPageWidth; nPos += 720)
  {
    int nx = XTwipsToRuler(nPos);
    dc.MoveTo(nx, HEIGHT - 1);
    dc.LineTo(nx, HEIGHT + 1);
  }
}

void CRulerBar::DrawTabs ( CDC & dc ) [protected]
void CRulerBar::DrawTickMarks ( CDC & dC ) [protected]

Definition at line 660 of file ruler.cpp.

{
  dc.SaveDC();

  dc.SelectObject(&penWindowText);
  dc.SelectObject(&fnt);
  dc.SetTextColor(GetSysColor(COLOR_WINDOWTEXT));
  dc.SetBkMode(TRANSPARENT);

  DrawDiv(dc, m_unit.m_nSmallDiv, m_unit.m_nLargeDiv, 2);
  DrawDiv(dc, m_unit.m_nMediumDiv, m_unit.m_nLargeDiv, 5);
  DrawNumbers(dc, m_unit.m_nLargeDiv, m_unit.m_nTPU);

  dc.RestoreDC(-1);
}

void CRulerBar::DrawTickMarks ( CDC & dC ) [protected]
void CRulerBar::FillInParaFormat ( WPD_PARAFORMAT & pf ) [protected]

Definition at line 528 of file ruler.cpp.

{
  pf.dwMask = PFM_STARTINDENT | PFM_RIGHTINDENT | PFM_OFFSET | PFM_TABSTOPS;
  pf.dxStartIndent = m_indent.GetHorzPosTwips();
  pf.dxOffset = m_leftmargin.GetHorzPosTwips() - pf.dxStartIndent;
  pf.dxRightIndent = PrintWidth() - m_rightmargin.GetHorzPosTwips();
  pf.cTabCount = 0L;
  SortTabs();
  int i, nPos = 0;
  for (i=0;i<MAX_TAB_STOPS;i++)
  {
    // get rid of zeroes and multiples
    // i.e. if we have 0,0,0,1,2,3,4,4,5
    // we will get tabs at 1,2,3,4,5
    if (nPos != m_pTabItems[i].GetHorzPosTwips())
    {
      nPos = m_pTabItems[i].GetHorzPosTwips();
      pf.rgxTabs[pf.cTabCount++] = nPos;
    }
  }
}

void CRulerBar::FillInParaFormat ( PARAFORMAT & pf ) [protected]

Definition at line 492 of file ruler.cpp.

{
  pf.dwMask = PFM_STARTINDENT | PFM_RIGHTINDENT | PFM_OFFSET | PFM_TABSTOPS;
  pf.dxStartIndent = m_indent.GetHorzPosTwips();
  pf.dxOffset = m_leftmargin.GetHorzPosTwips() - pf.dxStartIndent;
  pf.dxRightIndent = PrintWidth() - m_rightmargin.GetHorzPosTwips();
  pf.cTabCount = 0L;
  SortTabs();
  int i, nPos = 0;
  for (i=0;i<MAX_TAB_STOPS;i++)
  {
    // get rid of zeroes and multiples
    // i.e. if we have 0,0,0,1,2,3,4,4,5
    // we will get tabs at 1,2,3,4,5
    if (nPos != m_pTabItems[i].GetHorzPosTwips())
    {
      nPos = m_pTabItems[i].GetHorzPosTwips();
      pf.rgxTabs[pf.cTabCount++] = nPos;
    }
  }
}

CSize CRulerBar::GetBaseUnits ( )

Definition at line 410 of file ruler.cpp.

{
  ASSERT(fnt.GetSafeHandle() != NULL);
  CFont* pFont = theApp.m_dcScreen.SelectObject(&fnt);
  TEXTMETRIC tm;
  VERIFY(theApp.m_dcScreen.GetTextMetrics(&tm) == TRUE);
  theApp.m_dcScreen.SelectObject(pFont);
//  return CSize(tm.tmAveCharWidth, tm.tmHeight+tm.tmDescent);
  return CSize(tm.tmAveCharWidth, tm.tmHeight);
}

CSize CRulerBar::GetBaseUnits ( )
CDocument* CRulerBar::GetDocument ( ) [inline, protected]

Definition at line 181 of file ruler.h.

{ return GetView()->GetDocument(); }

CDocument* CRulerBar::GetDocument ( ) [inline, protected]

Definition at line 181 of file ruler.h.

{ return GetView()->GetDocument(); }

CRulerItem* CRulerBar::GetFreeTab ( ) [protected]
CRulerItem * CRulerBar::GetFreeTab ( ) [protected]

Definition at line 753 of file ruler.cpp.

{
  int i;
  for (i=0;i<MAX_TAB_STOPS;i++)
  {
    if (m_pTabItems[i].GetHorzPosTwips() == 0)
      return &m_pTabItems[i];
  }
  return NULL;
}

CTabRulerItem* CRulerBar::GetHitTabPix ( CPoint pt ) [protected]
CTabRulerItem * CRulerBar::GetHitTabPix ( CPoint pt ) [protected]

Definition at line 764 of file ruler.cpp.

{
  int i;
  for (i=0;i<MAX_TAB_STOPS;i++)
  {
    if (m_pTabItems[i].HitTestPix(point))
      return &m_pTabItems[i];
  }
  return NULL;
}

CView* CRulerBar::GetView ( ) [inline, protected]

Definition at line 176 of file ruler.h.

  {
    ASSERT(GetParent() != NULL);
    return ((CFrameWnd*)GetParent())->GetActiveView();
  }

CView* CRulerBar::GetView ( ) [inline, protected]

Definition at line 176 of file ruler.h.

  {
    ASSERT(GetParent() != NULL);
    return ((CFrameWnd*)GetParent())->GetActiveView();
  }

int CRulerBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 894 of file ruler.cpp.

{
  if (CPane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CreateGDIObjects();
  return 0;
}

void CRulerBar::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 713 of file ruler.cpp.

{
  CPoint pt = point;
  ClientToRuler(pt);

  m_pSelItem = NULL;
  if (m_leftmargin.HitTestPix(pt))
    m_pSelItem = &m_leftmargin;
  else if (m_indent.HitTestPix(pt))
    m_pSelItem = &m_indent;
  else if (m_rightmargin.HitTestPix(pt))
    m_pSelItem = &m_rightmargin;
  else
    m_pSelItem = GetHitTabPix(pt);
  if (m_pSelItem == NULL)
    m_pSelItem = GetFreeTab();
  if (m_pSelItem == NULL)
    return;
  SetCapture();

  m_pSelItem->SetTrack(TRUE);
  SetMarginBounds();
  OnMouseMove(nFlags, point);
}

afx_msg void CRulerBar::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
void CRulerBar::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 775 of file ruler.cpp.

{
  if (::GetCapture() != m_hWnd)
    return;
  OnMouseMove(nFlags, point);
  m_pSelItem->SetTrack(FALSE);
  ReleaseCapture();
  CWordPadView* pView = (CWordPadView*)GetView();
  ENSURE(pView != NULL);
  PARAFORMAT2& pf = pView->GetParaFormatSelection();
  FillInParaFormat(pf);
  pView->SetParaFormat(pf);
  m_pSelItem = NULL;
}

afx_msg void CRulerBar::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
afx_msg void CRulerBar::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]
void CRulerBar::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 790 of file ruler.cpp.

{
  CControlBar::OnMouseMove(nFlags, point);
// use ::GetCapture to avoid creating temporaries
  if (::GetCapture() != m_hWnd)
    return;
  ASSERT(m_pSelItem != NULL);
  CRect rc(0,0, XTwipsToRuler(PrintWidth() + m_rectMargin.right), HEIGHT);
  RulerToClient(rc);
  BOOL bOnRuler = rc.PtInRect(point);

// snap to minimum movement
  point.x = XClientToTwips(point.x);
  point.x += m_unit.m_nMinMove/2;
  point.x -= point.x%m_unit.m_nMinMove;

  m_pSelItem->TrackHorzPosTwips(point.x, bOnRuler);
  UpdateWindow();
}

afx_msg void CRulerBar::OnShowWindow | ( | BOOL | bShow,
 |  | UINT | nStatus |
 | ) |  |  | [protected]
void CRulerBar::OnShowWindow | ( | BOOL | bShow,
 |  | UINT | nStatus |
 | ) |  |  | [protected]

Definition at line 830 of file ruler.cpp.

{
  CControlBar::OnShowWindow(bShow, nStatus);
  m_bDeferInProgress = FALSE;
}

afx_msg LRESULT CRulerBar::OnSizeParent | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]
LRESULT CRulerBar::OnSizeParent | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 842 of file ruler.cpp.

{
  BOOL bVis = GetStyle() & WS_VISIBLE;
  if ((bVis && (m_nStateFlags & delayHide)) ||
    (!bVis && (m_nStateFlags & delayShow)))
  {
    m_bDeferInProgress = TRUE;
  }
  return CControlBar::OnSizeParent(wParam, lParam);
}

afx_msg void CRulerBar::OnSysColorChange ( ) [protected]
void CRulerBar::OnSysColorChange ( ) [protected]

Definition at line 810 of file ruler.cpp.

{
  CControlBar::OnSysColorChange();
  CreateGDIObjects();
  Invalidate();
}

virtual void CRulerBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [protected, virtual]
void CRulerBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [protected, virtual]

Definition at line 380 of file ruler.cpp.

{
  ASSERT_VALID(this);
  //Get the page size and see if changed -- from document
  //get margins and tabs and see if changed -- from view
  if (m_pSelItem == NULL) // only update if not in middle of dragging
  {
    CWordPadView* pView = (CWordPadView*)GetView();
    ENSURE(pView != NULL);
    Update(pView->GetPaperSize(), pView->GetMargins());
    Update(pView->GetParaFormatSelection());
    CRect rect;
    pView->GetRichEditCtrl().GetRect(&rect);
    CPoint pt = rect.TopLeft();
    pView->ClientToScreen(&pt);
    ScreenToClient(&pt);
    if (m_cxLeftBorder != pt.x)
    {
      m_cxLeftBorder = pt.x;
      Invalidate();
    }
    int nScroll = pView->GetScrollPos(SB_HORZ);
    if (nScroll != m_nScroll)
    {
      m_nScroll = nScroll;
      Invalidate();
    }
  }
}

void CRulerBar::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 836 of file ruler.cpp.

{
  CControlBar::OnWindowPosChanged(lpwndpos);
  m_bDeferInProgress = FALSE;
}

afx_msg void CRulerBar::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]
void CRulerBar::OnWindowPosChanging ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 817 of file ruler.cpp.

{
  CControlBar::OnWindowPosChanging(lpwndpos);
  CRect rect;
  GetClientRect(rect);
  int minx = min(rect.Width(), lpwndpos->cx);
  int maxx = max(rect.Width(), lpwndpos->cx);
  rect.SetRect(minx-2, rect.bottom - 6, minx, rect.bottom);
  InvalidateRect(rect);
  rect.SetRect(maxx-2, rect.bottom - 6, maxx, rect.bottom);
  InvalidateRect(rect);
}

afx_msg void CRulerBar::OnWindowPosChanging ( WINDOWPOS FAR * lpwndpos ) [protected]
int CRulerBar::PrintWidth ( ) [inline]

Definition at line 127 of file ruler.h.

                   {return m_sizePaper.cx - m_rectMargin.left -
    m_rectMargin.right;}

int CRulerBar::PrintWidth ( ) [inline]

Definition at line 128 of file ruler.h.

                   {return m_sizePaper.cx - m_rectMargin.left -
    m_rectMargin.right;}

void CRulerBar::RulerToClient ( CRect & rect ) [inline]

Definition at line 153 of file ruler.h.

{rect.OffsetRect(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}

void CRulerBar::RulerToClient ( CPoint & pt ) [inline]

Definition at line 152 of file ruler.h.

{pt.Offset(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}

void CRulerBar::RulerToClient ( CRect & rect ) [inline]

Definition at line 152 of file ruler.h.

{rect.OffsetRect(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}

void CRulerBar::RulerToClient ( CPoint & pt ) [inline]

Definition at line 151 of file ruler.h.

{pt.Offset(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}

void CRulerBar::SetMarginBounds ( ) [protected]

Definition at line 738 of file ruler.cpp.

{
  m_leftmargin.SetBounds(0, m_rightmargin.GetHorzPosTwips());
  m_indent.SetBounds(0, m_rightmargin.GetHorzPosTwips());

  int nMin = (m_leftmargin.GetHorzPosTwips() > m_indent.GetHorzPosTwips()) ?
    m_leftmargin.GetHorzPosTwips() : m_indent.GetHorzPosTwips();
  int nMax = PrintWidth() + m_rectMargin.right;
  m_rightmargin.SetBounds(nMin, nMax);

  // tabs can go from zero to the right page edge
  for (int i=0;i<MAX_TAB_STOPS;i++)
    m_pTabItems[i].SetBounds(0, nMax);
}

void CRulerBar::SetMarginBounds ( ) [protected]
void CRulerBar::SortTabs ( ) [protected]
void CRulerBar::SortTabs ( ) [protected]

Definition at line 515 of file ruler.cpp.

{
  int i,j, nPos;
  for (i=0;i<MAX_TAB_STOPS - 1;i++)
  {
    for (j=i+1; j < MAX_TAB_STOPS;j++)
    {
      if (m_pTabItems[j].GetHorzPosTwips() < m_pTabItems[i].GetHorzPosTwips())
      {
        nPos = m_pTabItems[j].GetHorzPosTwips();
        m_pTabItems[j].SetHorzPosTwips(m_pTabItems[i].GetHorzPosTwips());
        m_pTabItems[i].SetHorzPosTwips(nPos);
      }
    }
  }
}

void CRulerBar::Update | ( | CSize | sizePaper,
 |  | const CRect & | rectMargins |
 | ) |  |  | [protected]
void CRulerBar::Update | ( | CSize | sizePaper,
 |  | const CRect & | rectMargins |
 | ) |  |  | [protected]

Definition at line 477 of file ruler.cpp.

{
  if ((sizePaper != m_sizePaper) || (rectMargins != m_rectMargin))
  {
    m_sizePaper = sizePaper;
    m_rectMargin = rectMargins;
    Invalidate();
  }
  if (m_unit.m_nTPU != theApp.GetTPU())
  {
    m_unit = theApp.GetUnit();
    Invalidate();
  }
}

void CRulerBar::Update ( const PARAFORMAT & pf ) [protected]

Definition at line 462 of file ruler.cpp.

{
  ASSERT(pf.cTabCount <= MAX_TAB_STOPS);

  m_leftmargin.SetHorzPosTwips((int)(pf.dxStartIndent + pf.dxOffset));
  m_indent.SetHorzPosTwips((int)pf.dxStartIndent);
  m_rightmargin.SetHorzPosTwips(PrintWidth() - (int) pf.dxRightIndent);

  int i = 0;
  for (i=0;i<pf.cTabCount;i++)
    m_pTabItems[i].SetHorzPosTwips((int)pf.rgxTabs[i]);
  for ( ;i<MAX_TAB_STOPS; i++)
    m_pTabItems[i].SetHorzPosTwips(0);
}

void CRulerBar::Update ( const WPD_PARAFORMAT & pf ) [protected]

Definition at line 498 of file ruler.cpp.

{
  ASSERT(pf.cTabCount <= MAX_TAB_STOPS);

  m_leftmargin.SetHorzPosTwips((int)(pf.dxStartIndent + pf.dxOffset));
  m_indent.SetHorzPosTwips((int)pf.dxStartIndent);
  m_rightmargin.SetHorzPosTwips(PrintWidth() - (int) pf.dxRightIndent);

  int i = 0;
  for (i=0;i<pf.cTabCount;i++)
    m_pTabItems[i].SetHorzPosTwips((int)pf.rgxTabs[i]);
  for ( ;i<MAX_TAB_STOPS; i++)
    m_pTabItems[i].SetHorzPosTwips(0);
}

int CRulerBar::XClientToRuler ( int nC ) [inline]

Definition at line 161 of file ruler.h.

{return nC - m_cxLeftBorder + m_nScroll;}

int CRulerBar::XClientToRuler ( int nC ) [inline]

Definition at line 162 of file ruler.h.

{return nC - m_cxLeftBorder + m_nScroll;}

int CRulerBar::XClientToTwips ( int nC ) [inline]

Definition at line 155 of file ruler.h.

{return MulDiv(nC - m_cxLeftBorder + m_nScroll, 1440, m_logx);}

int CRulerBar::XClientToTwips ( int nC ) [inline]

Definition at line 156 of file ruler.h.

{return MulDiv(nC - m_cxLeftBorder + m_nScroll, 1440, m_logx);}

int CRulerBar::XRulerToClient ( int nR ) [inline]

Definition at line 160 of file ruler.h.

{return nR + m_cxLeftBorder - m_nScroll;}

int CRulerBar::XRulerToClient ( int nR ) [inline]

Definition at line 161 of file ruler.h.

{return nR + m_cxLeftBorder - m_nScroll;}

int CRulerBar::XRulerToTwips ( int nR ) [inline]

Definition at line 158 of file ruler.h.

{return MulDiv(nR, 1440, m_logx);}

int CRulerBar::XRulerToTwips ( int nR ) [inline]

Definition at line 159 of file ruler.h.

{return MulDiv(nR, 1440, m_logx);}

int CRulerBar::XTwipsToClient ( int nT ) [inline]

Definition at line 155 of file ruler.h.

{return MulDiv(nT, m_logx, 1440) + m_cxLeftBorder - m_nScroll;}

int CRulerBar::XTwipsToClient ( int nT ) [inline]

Definition at line 154 of file ruler.h.

{return MulDiv(nT, m_logx, 1440) + m_cxLeftBorder - m_nScroll;}

int CRulerBar::XTwipsToRuler ( int nT ) [inline]

Definition at line 157 of file ruler.h.

{return MulDiv(nT, m_logx, 1440);}

int CRulerBar::XTwipsToRuler ( int nT ) [inline]

Definition at line 158 of file ruler.h.

{return MulDiv(nT, m_logx, 1440);}

Friends And Related Function Documentation

CRulerItem [friend]

Definition at line 198 of file ruler.h.

Member Data Documentation

CBrush CRulerBar::brushBtnFace

Definition at line 144 of file ruler.h.

CBrush CRulerBar::brushWindow

Definition at line 143 of file ruler.h.

CFont CRulerBar::fnt

Definition at line 119 of file ruler.h.

BOOL CRulerBar::m_bDeferInProgress

Definition at line 115 of file ruler.h.

BOOL CRulerBar::m_bDraw3DExt

Definition at line 116 of file ruler.h.

CRulerItem CRulerBar::m_indent

Definition at line 122 of file ruler.h.

CComboRulerItem CRulerBar::m_leftmargin

Definition at line 121 of file ruler.h.

int CRulerBar::m_logx

Definition at line 131 of file ruler.h.

int CRulerBar::m_nLinePos

Definition at line 132 of file ruler.h.

int CRulerBar::m_nScroll

Definition at line 133 of file ruler.h.

int CRulerBar::m_nTabs

Definition at line 130 of file ruler.h.

CRulerItem * CRulerBar::m_pSelItem

Definition at line 118 of file ruler.h.

CTabRulerItem CRulerBar::m_pTabItems

Definition at line 125 of file ruler.h.

CRect CRulerBar::m_rectMargin

Definition at line 127 of file ruler.h.

CRulerItem CRulerBar::m_rightmargin

Definition at line 123 of file ruler.h.

CSize CRulerBar::m_sizePaper

Definition at line 126 of file ruler.h.

CRulerItem CRulerBar::m_tabItem

Definition at line 124 of file ruler.h.

CUnit CRulerBar::m_unit

Definition at line 117 of file ruler.h.

CPen CRulerBar::penBtnFace

Definition at line 140 of file ruler.h.

CPen CRulerBar::penBtnHighLight

Definition at line 136 of file ruler.h.

CPen CRulerBar::penBtnShadow

Definition at line 137 of file ruler.h.

CPen CRulerBar::penBtnText

Definition at line 139 of file ruler.h.

CPen CRulerBar::penFocusLine

Definition at line 135 of file ruler.h.

CPen CRulerBar::penWindow

Definition at line 142 of file ruler.h.

CPen CRulerBar::penWindowFrame

Definition at line 138 of file ruler.h.

CPen CRulerBar::penWindowText

Definition at line 141 of file ruler.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/ruler.h
  • vc2008fp/WordPad/ruler.h
  • ole/wordpad/ruler.cpp
  • vc2008fp/WordPad/ruler.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CRulerItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Attributes

CRulerItem Class Reference

#include "ruler.h"

Inherited by CComboRulerItem, CComboRulerItem, CTabRulerItem, and CTabRulerItem.

List of all members.

Public Member Functions

CRulerItem (UINT nBitmapID=0)
CRulerItem (UINT nBitmapID=0)
~CRulerItem ()
~CRulerItem ()
virtual void | Draw (CDC &dc)
virtual void | Draw (CDC &dc)
void | DrawFocusLine ()
void | DrawFocusLine ()
CRect | GetHitRectPix ()
CRect | GetHitRectPix ()
int | GetHorzPosPix ()
int | GetHorzPosPix ()
int | GetHorzPosTwips ()
int | GetHorzPosTwips ()
int | GetMax ()
int | GetMax ()
int | GetMin ()
int | GetMin ()
int | GetVertPosPix ()
int | GetVertPosPix ()
virtual BOOL | HitTestPix (CPoint pt)
virtual BOOL | HitTestPix (CPoint pt)
void | Invalidate ()
void | Invalidate ()
BOOL | LoadMaskedBitmap (LPCTSTR lpszResourceName)
BOOL | LoadMaskedBitmap (LPCTSTR lpszResourceName)
virtual void | SetAlignment (int nAlign)
virtual void | SetAlignment (int nAlign)
virtual void | SetBounds (int nMin, int nMax)
virtual void | SetBounds (int nMin, int nMax)
virtual void | SetHorzPosTwips (int nXPos)
virtual void | SetHorzPosTwips (int nXPos)
virtual void | SetRuler (CRulerBar *pRuler)
virtual void | SetRuler (CRulerBar *pRuler)
void | SetTrack (BOOL b)
void | SetTrack (BOOL b)
virtual void | SetVertPos (int nYPos)
virtual void | SetVertPos (int nYPos)
virtual void | TrackHorzPosTwips (int nXPos, BOOL bOnRuler=TRUE)
virtual void | TrackHorzPosTwips (int nXPos, BOOL bOnRuler=TRUE)

Public Attributes

HBITMAP | m_hbm
HBITMAP | m_hbmMask
CSize | m_size

Protected Attributes

BOOL | m_bTrack
int | m_nAlignment
int | m_nMax
int | m_nMin
int | m_nXPosTwips
int | m_nYPosPix
CDC * | m_pDC
CRulerBar * m_pRuler
CRect | m_rcTrack

Detailed Description

Definition at line 23 of file ruler.h.

Constructor & Destructor Documentation

CRulerItem::CRulerItem ( UINT nBitmapID = 0 )

Definition at line 28 of file ruler.cpp.

{
  m_nAlignment = TA_CENTER;
  m_pDC = NULL;
  m_bTrack = FALSE;
  m_hbm = NULL;
  m_hbmMask = NULL;
  if (nBitmapID != 0)
  {
    m_hbmMask = ::LoadBitmap(
      AfxFindResourceHandle(MAKEINTRESOURCE(nBitmapID+1), RT_BITMAP),
      MAKEINTRESOURCE(nBitmapID+1));
    ASSERT(m_hbmMask != NULL);
    VERIFY(LoadMaskedBitmap(MAKEINTRESOURCE(nBitmapID)));
    BITMAP bm;
    ::GetObject(m_hbm, sizeof(BITMAP), &bm);
    m_size = CSize(bm.bmWidth, bm.bmHeight);
  }
}

CRulerItem::~CRulerItem ( )

Definition at line 48 of file ruler.cpp.

{
  if (m_hbm != NULL)
    ::DeleteObject(m_hbm);
  if (m_hbmMask != NULL)
    ::DeleteObject(m_hbmMask);
}

CRulerItem::CRulerItem ( UINT nBitmapID = 0 )
CRulerItem::~CRulerItem ( )

Member Function Documentation

void CRulerItem::Draw ( CDC & dc ) [virtual]

Reimplemented in CComboRulerItem, CTabRulerItem, CComboRulerItem, and CTabRulerItem.

Definition at line 153 of file ruler.cpp.

{
  CDC dcBitmap;
  dcBitmap.CreateCompatibleDC(&dc);
  CPoint pt(GetHorzPosPix(), GetVertPosPix());

  HGDIOBJ hbm = ::SelectObject(dcBitmap.m_hDC, m_hbmMask);

  // do mask part
  if (m_nAlignment == TA_CENTER)
    dc.BitBlt(pt.x - m_size.cx/2, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
  else if (m_nAlignment == TA_LEFT)
    dc.BitBlt(pt.x, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
  else // TA_RIGHT
    dc.BitBlt(pt.x - m_size.cx, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);

  // do image part
  ::SelectObject(dcBitmap.m_hDC, m_hbm);

  if (m_nAlignment == TA_CENTER)
    dc.BitBlt(pt.x - m_size.cx/2, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
  else if (m_nAlignment == TA_LEFT)
    dc.BitBlt(pt.x, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
  else // TA_RIGHT
    dc.BitBlt(pt.x - m_size.cx, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);

  ::SelectObject(dcBitmap.m_hDC, hbm);
}

virtual void CRulerItem::Draw ( CDC & dc ) [virtual]

Reimplemented in CComboRulerItem, CTabRulerItem, CComboRulerItem, and CTabRulerItem.

void CRulerItem::DrawFocusLine ( )
void CRulerItem::DrawFocusLine ( )

Definition at line 97 of file ruler.cpp.

{
  if (GetHorzPosTwips() != 0)
  {
    m_rcTrack.left = m_rcTrack.right = GetHorzPosPix();
    ASSERT(m_pDC != NULL);
    int nLeft = m_pRuler->XRulerToClient(m_rcTrack.left);
    m_pDC->MoveTo(nLeft, m_rcTrack.top);
    m_pDC->LineTo(nLeft, m_rcTrack.bottom);
  }
}

CRect CRulerItem::GetHitRectPix ( )
CRect CRulerItem::GetHitRectPix ( )

Definition at line 141 of file ruler.cpp.

{
  int nx = GetHorzPosPix();
  return CRect(
    CPoint(
      (m_nAlignment == TA_CENTER) ? (nx - m_size.cx/2) :
      (m_nAlignment == TA_LEFT) ? nx : nx - m_size.cx
      , m_nYPosPix
      ),
    m_size);
}

int CRulerItem::GetHorzPosPix ( )
int CRulerItem::GetHorzPosPix ( ) [inline]

Definition at line 201 of file ruler.h.

  { return m_pRuler->XTwipsToRuler(m_nXPosTwips); }

int CRulerItem::GetHorzPosTwips ( ) [inline]

Definition at line 40 of file ruler.h.

{ return m_nXPosTwips;}

int CRulerItem::GetHorzPosTwips ( ) [inline]

Definition at line 42 of file ruler.h.

{ return m_nXPosTwips;}

int CRulerItem::GetMax ( ) [inline]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 37 of file ruler.h.

{ return m_nMax;}

int CRulerItem::GetMax ( ) [inline]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 39 of file ruler.h.

{ return m_nMax;}

int CRulerItem::GetMin ( ) [inline]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 36 of file ruler.h.

{ return m_nMin;}

int CRulerItem::GetMin ( ) [inline]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 38 of file ruler.h.

{ return m_nMin;}

int CRulerItem::GetVertPosPix ( ) [inline]

Definition at line 39 of file ruler.h.

{ return m_nYPosPix;}

int CRulerItem::GetVertPosPix ( ) [inline]

Definition at line 41 of file ruler.h.

{ return m_nYPosPix;}

virtual BOOL CRulerItem::HitTestPix ( CPoint pt ) [inline, virtual]

Reimplemented in CComboRulerItem, CTabRulerItem, CComboRulerItem, and CTabRulerItem.

Definition at line 28 of file ruler.h.

{ return GetHitRectPix().PtInRect(pt); }

virtual BOOL CRulerItem::HitTestPix ( CPoint pt ) [inline, virtual]

Reimplemented in CComboRulerItem, CTabRulerItem, CComboRulerItem, and CTabRulerItem.

Definition at line 30 of file ruler.h.

{ return GetHitRectPix().PtInRect(pt); }

void CRulerItem::Invalidate ( )

Definition at line 133 of file ruler.cpp.

{
  CRect rc = GetHitRectPix();
  m_pRuler->RulerToClient(rc.TopLeft());
  m_pRuler->RulerToClient(rc.BottomRight());
  m_pRuler->InvalidateRect(rc);
}

void CRulerItem::Invalidate ( )
BOOL CRulerItem::LoadMaskedBitmap ( LPCTSTR lpszResourceName )
BOOL CRulerItem::LoadMaskedBitmap ( LPCTSTR lpszResourceName )

Definition at line 56 of file ruler.cpp.

{
  ASSERT(lpszResourceName != NULL);

  if (m_hbm != NULL)
    ::DeleteObject(m_hbm);

  HINSTANCE hInst = AfxFindResourceHandle(lpszResourceName, RT_BITMAP);
  HRSRC hRsrc = ::FindResource(hInst, lpszResourceName, RT_BITMAP);
  if (hRsrc == NULL)
    return FALSE;

  m_hbm = AfxLoadSysColorBitmap(hInst, hRsrc);
  return (m_hbm != NULL);
}

virtual void CRulerItem::SetAlignment ( int nAlign ) [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 33 of file ruler.h.

{m_nAlignment = nAlign;}

virtual void CRulerItem::SetAlignment ( int nAlign ) [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 35 of file ruler.h.

{m_nAlignment = nAlign;}

virtual void CRulerItem::SetBounds | ( | int | nMin,
 |  | int | nMax |
 | ) |  |  | [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 35 of file ruler.h.

{ m_nMin = nMin; m_nMax = nMax; }

virtual void CRulerItem::SetBounds | ( | int | nMin,
 |  | int | nMax |
 | ) |  |  | [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 37 of file ruler.h.

{ m_nMin = nMin; m_nMax = nMax; }

virtual void CRulerItem::SetHorzPosTwips ( int nXPos ) [virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

void CRulerItem::SetHorzPosTwips ( int nXPos ) [virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 72 of file ruler.cpp.

{
  if (GetHorzPosTwips() != nXPos)
  {
    if (m_bTrack)
      DrawFocusLine();
    Invalidate();
    m_nXPosTwips = nXPos;
    Invalidate();
    if (m_bTrack)
      DrawFocusLine();
  }
}

virtual void CRulerItem::SetRuler ( CRulerBar * pRuler ) [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 36 of file ruler.h.

{m_pRuler = pRuler;}

virtual void CRulerItem::SetRuler ( CRulerBar * pRuler ) [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 34 of file ruler.h.

{m_pRuler = pRuler;}

void CRulerItem::SetTrack ( BOOL b )

Definition at line 109 of file ruler.cpp.

{
  m_bTrack = b;

  if (m_pDC != NULL) // just in case we lost focus Capture somewhere
  {
    DrawFocusLine();
    m_pDC->RestoreDC(-1);
    delete m_pDC ;
    m_pDC = NULL;
  }
  if (m_bTrack)
  {
    CWordPadView* pView = (CWordPadView*)m_pRuler->GetView();
    ENSURE(pView != NULL);
    pView->GetClientRect(&m_rcTrack);
    m_pDC = new CWindowDC(pView);
    m_pDC->SaveDC();
    m_pDC->SelectObject(&m_pRuler->penFocusLine);
    m_pDC->SetROP2(R2_XORPEN);
    DrawFocusLine();
  }
}

void CRulerItem::SetTrack ( BOOL b )
virtual void CRulerItem::SetVertPos ( int nYPos ) [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 32 of file ruler.h.

{ m_nYPosPix = nYPos; }

virtual void CRulerItem::SetVertPos ( int nYPos ) [inline, virtual]

Reimplemented in CComboRulerItem, and CComboRulerItem.

Definition at line 34 of file ruler.h.

{ m_nYPosPix = nYPos; }

virtual void CRulerItem::TrackHorzPosTwips | ( | int | nXPos,
 |  | BOOL | bOnRuler = TRUE |
 | ) |  |  | [virtual]

Reimplemented in CComboRulerItem, CTabRulerItem, CComboRulerItem, and CTabRulerItem.

void CRulerItem::TrackHorzPosTwips | ( | int | nXPos,
 |  | BOOL | bOnRuler = TRUE |
 | ) |  |  | [virtual]

Reimplemented in CComboRulerItem, CTabRulerItem, CComboRulerItem, and CTabRulerItem.

Definition at line 86 of file ruler.cpp.

{
  int nMin = GetMin();
  int nMax = GetMax();
  if (nXPos < nMin)
    nXPos = nMin;
  if (nXPos > nMax)
    nXPos = nMax;
  SetHorzPosTwips(nXPos);
}

Member Data Documentation

BOOL CRulerItem::m_bTrack [protected]

Definition at line 57 of file ruler.h.

HBITMAP CRulerItem::m_hbm

Definition at line 46 of file ruler.h.

HBITMAP CRulerItem::m_hbmMask

Definition at line 47 of file ruler.h.

int CRulerItem::m_nAlignment [protected]

Definition at line 56 of file ruler.h.

int CRulerItem::m_nMax [protected]

Definition at line 61 of file ruler.h.

int CRulerItem::m_nMin [protected]

Definition at line 61 of file ruler.h.

int CRulerItem::m_nXPosTwips [protected]

Definition at line 55 of file ruler.h.

int CRulerItem::m_nYPosPix [protected]

Definition at line 54 of file ruler.h.

CDC * CRulerItem::m_pDC [protected]

Definition at line 60 of file ruler.h.

CRulerBar * CRulerItem::m_pRuler [protected]

Definition at line 58 of file ruler.h.

CRect CRulerItem::m_rcTrack [protected]

Definition at line 59 of file ruler.h.

CSize CRulerItem::m_size

Definition at line 48 of file ruler.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/ruler.h
  • vc2008fp/WordPad/ruler.h
  • ole/wordpad/ruler.cpp
  • vc2008fp/WordPad/ruler.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSchedulerApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSchedulerApp Class Reference

#include "Scheduler.h"

List of all members.

Public Member Functions

CSchedulerApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 38 of file Scheduler.h.

Constructor & Destructor Documentation

CSchedulerApp::CSchedulerApp ( )

Definition at line 31 of file Scheduler.cpp.

{
  EnableHtmlHelp();
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CSchedulerApp::InitInstance ( ) [virtual]

Definition at line 46 of file Scheduler.cpp.

{
  AfxEnableControlContainer();

  CSchedulerDlg dlg;
  m_pMainWnd = &dlg;

  int nResponse = (int)dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  dlg.ExitScheduler();
  return FALSE;
}

The documentation for this class was generated from the following files:
  • internet/Scheduler/Scheduler.h
  • internet/Scheduler/Scheduler.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSchedulerDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CSchedulerDlg Class Reference

#include "SchedulerDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_SCHEDULER_DIALOG, IDH = IDR_HTML_SCHEDULER_DIALOG }

Public Member Functions

CSchedulerDlg (CWnd *pParent=NULL)
CString | AdjustHour (int iHour)
BOOL | CheckDates ()
void | DateSchedules ()
void | ExitScheduler (void)
CString | GetStartTimeFormatted (CString szStartTime)
HRESULT | OnButtonClearAll (IHTMLElement *pElement)
void __stdcall | OnClickCalendar ()
HRESULT | OnClickNewElements (IHTMLElement *pElement)
HRESULT | OnClickTime (IHTMLElement *pElement)
HRESULT | OnClickTimeDesc (IHTMLElement *pElement)
void | OnDeleteScheduleDisplay (CMyScheduler &scheduler)
void | OnDocumentComplete (LPDISPATCH pDisp, LPCTSTR szUrl)
void | OnHelpAbout (void)
void | OnModifyScheduleDisplay (CMyScheduler &scheduler, const CEntryInfoDlg &InfoDlg)
HRESULT | OnMouseOutButtons (IHTMLElement *pElement)
HRESULT | OnMouseOutNewElements (IHTMLElement *pElement)
HRESULT | OnMouseOutTime (IHTMLElement *pElement)
HRESULT | OnMouseOverButtons (IHTMLElement *pElement)
HRESULT | OnMouseOverNewElements (IHTMLElement *pElement)
HRESULT | OnMouseOverTime (IHTMLElement *pElement)
HRESULT | OnMouseOverTimeDesc (IHTMLElement *pElement)
void | OnUpdateScheduleDisplay (const CEntryInfoDlg &InfoDlg)
void | OpenScheduler (void)
void | RemoveInfoFromTable ()
void | SetDefaultProperties ()
CString | SetTimeFormat (int iHour, int iMinutes)

Public Attributes

short | m_currDay
short | m_currMonth
short | m_currYear
COleVariant | m_day
int | m_iLastDivID
COleVariant | m_month
CArray< CMyScheduler > | m_scheduler_array
TCHAR | m_scheduler_filepath [MAX_PATH]
CString | m_szDivClass
COleVariant | m_year

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

HACCEL | m_hAccel
HICON | m_hIcon

Detailed Description

Definition at line 27 of file SchedulerDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD
IDH

Definition at line 34 of file SchedulerDlg.h.

{ IDD = IDD_SCHEDULER_DIALOG, IDH = IDR_HTML_SCHEDULER_DIALOG };

Constructor & Destructor Documentation

CSchedulerDlg::CSchedulerDlg ( CWnd * pParent = NULL )

Definition at line 73 of file SchedulerDlg.cpp.

  : CDHtmlDialog(CSchedulerDlg::IDD, CSchedulerDlg::IDH, pParent)
{
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

CString CSchedulerDlg::AdjustHour ( int iHour )

Definition at line 553 of file SchedulerDlg.cpp.

{
  ASSERT(iHour < 24);
  CString szRetval;
  szRetval.Format("%d", iHour < 13 ? iHour : iHour-12);
  return(szRetval);
}

BOOL CSchedulerDlg::CheckDates ( )

Definition at line 527 of file SchedulerDlg.cpp.

{
  BOOL fRetval = true;

  ASSERT(m_month.iVal);
  ASSERT(m_day.iVal);
  ASSERT(m_year.iVal);

  CTime currTime(m_currYear, m_currMonth, m_currDay, 0, 0, 0, 0);
  CTime enteredTime(m_year.iVal, m_month.iVal, m_day.iVal, 0, 0, 0, 0);

  if (!(m_month.iVal && m_day.iVal && m_year.iVal) || (currTime > enteredTime))
  {
    fRetval = false;
    SetDefaultProperties();
    AfxMessageBox (IDS_INVALIDDATE);
  }

  return fRetval;
}

void CSchedulerDlg::DateSchedules ( ) [inline]

Definition at line 590 of file SchedulerDlg.cpp.

{
  CComBSTR startTime;
  CComBSTR endTime;
  CComBSTR scheduleEntry;
  CComBSTR tempbstr;
  CMyScheduler scheduler;
  CString szTempstr;
  CString szInnerHtml;
  CString szHour;
  CString szDate;
  CString szElementId;
  CString szEid;
  CString szTempstring;
  CTime mytime;
  HRESULT result;
  COleVariant varColor;

  //If the dates entered are valid
  if(CheckDates())
  {
    if (m_scheduler_array.GetSize())
    {
      //Iterate through all the schedules stored in the scheduler
      for (int iallDates = 0; iallDates < m_scheduler_array.GetSize(); iallDates++)
      {
        scheduler = m_scheduler_array.GetAt(iallDates);

        //Change the valid dated schedules' background color
        if ((scheduler.m_iYear == m_year.iVal) && (scheduler.m_iMonth == m_month.iVal) && (scheduler.m_iDay == m_day.iVal))
        {
          CTime mytime( m_year.iVal, m_month.iVal, m_day.iVal, scheduler.m_iStartHour, scheduler.m_iStartMinutes, 0);
          szDate = mytime.Format( "%A, %B %d, %Y" );

          //To get the chosen Start and End Times
          //timeSpan contains the duration of the schedule
          //eg. 8:00 am - 9:00 am
          szElementId = SetTimeFormat(scheduler.m_iStartHour, scheduler.m_iStartMinutes);

          for (int j=0; szElementId.GetAt(j) != ' ';j++)
            szEid += szElementId.GetAt(j);

          CComPtr<IHTMLElement> pHTMLElement;

          //Format the new schedule information
          result = GetElement(szEid, &pHTMLElement);

          ASSERT(pHTMLElement);

          szElementId += _T(" - ");
          szElementId += SetTimeFormat(scheduler.m_iEndHour, scheduler.m_iEndMinutes);

          CComPtr<IHTMLStyle> phtmlStyle;

          //Change the text color of the schedule information
          if (pHTMLElement)
            pHTMLElement->get_style(&phtmlStyle);

          ASSERT(phtmlStyle);

          if (phtmlStyle)
          {
            varColor = BLUE;
            phtmlStyle->put_color(varColor);
          }

          szInnerHtml = scheduler.m_szTitle;
          szInnerHtml += _T(": ");
          szInnerHtml += szElementId;
          szInnerHtml += _T(" (");
          szInnerHtml += szDate;
          szInnerHtml += _T(")");
          szInnerHtml += _T("\n");

          szTempstr.Format(_T("<DIV class=%s title=%s id=%d>%s</DIV>"), m_szDivClass, "Modify/Delete",
            scheduler.m_iId, szInnerHtml);
          tempbstr = szTempstr.AllocSysString();

          scheduleEntry = GetElementHtml(szEid);

          //Display the duration of the schedule
          if (scheduleEntry)
            scheduleEntry += tempbstr;
          else
            scheduleEntry = tempbstr;

          SetElementHtml(szEid, scheduleEntry);
          szEid.Empty();
          scheduleEntry.Empty();
        }
      }
    }
  }
}

void CSchedulerDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 79 of file SchedulerDlg.cpp.

{
  CDHtmlDialog::DoDataExchange(pDX);
  DDX_DHtml_AxControl(pDX, _T("Calendar1"), DISPID_MONTH, m_month);
  DDX_DHtml_AxControl(pDX, _T("Calendar1"), DISPID_DAY, m_day);
  DDX_DHtml_AxControl(pDX, _T("Calendar1"), DISPID_YEAR, m_year);
}

void CSchedulerDlg::ExitScheduler ( void )

Definition at line 742 of file SchedulerDlg.cpp.

{
  // TODO: Add your command handler code here
  CFile schedulerFile;
  CMyScheduler scheduler;

  if (m_scheduler_array.GetSize())
  {
    TRY
    {
      if( !schedulerFile.Open(m_scheduler_filepath, CFile::modeCreate | CFile::modeWrite))
      {
        //SHOULD NEVER GET HERE
        AfxMessageBox (IDS_CANNOTOPENFILE);
      }
      else
      {
        CArchive ar(&schedulerFile, CArchive::store);
        m_scheduler_array.Serialize(ar);
        ar << m_iLastDivID;

        ar.Close();

        schedulerFile.Close();
      }
    }
    CATCH( CFileException, e )
    {
      #ifdef _DEBUG
        afxDump << "File " << m_scheduler_filepath << " cannot be created\n";
      #endif
    }
    END_CATCH
  }
  else
  {
    if (schedulerFile.Open(m_scheduler_filepath, CFile::modeRead))
    {
      schedulerFile.Close();
      TRY
      {
        CFile::Remove(m_scheduler_filepath);
      }
      CATCH( CFileException, e)
      {
        #ifdef _DEBUG
          afxDump << "File " << m_scheduler_filepath << " cannot be removed\n";
        #endif
      }
      END_CATCH
    }
  }
  PostQuitMessage(0);
}

CString CSchedulerDlg::GetStartTimeFormatted ( CString szStartTime )

Definition at line 850 of file SchedulerDlg.cpp.

{
  CString szHour;
  CString szAmpm;
  CString szRetval;
  int i, iHour;

  //Getting the start hour to be displayed on the EntryInfoDlg
  for(i=0; szStartTime.GetAt(i) != ':'; i++)
    szHour += szStartTime.GetAt(i);

  ASSERT(szHour);

  iHour = atoi(szHour);

  //Formatting the start hour according to the cell (row) id (HTML source)
  szAmpm.Format("%s", iHour == 12 ? _T(" pm") : iHour > 6 ? _T(" am") : _T(" pm"));

  szRetval = szStartTime;
  szRetval += szAmpm;

  return szRetval;
}

HRESULT CSchedulerDlg::OnButtonClearAll ( IHTMLElement * pElement )

Definition at line 498 of file SchedulerDlg.cpp.

{
  RemoveInfoFromTable();
  m_scheduler_array.RemoveAll();
  SetDefaultProperties();
  return S_OK;
}

void __stdcall CSchedulerDlg::OnClickCalendar ( )

Definition at line 838 of file SchedulerDlg.cpp.

{
  UpdateData(true);
  RemoveInfoFromTable();
  DateSchedules();
}

HRESULT CSchedulerDlg::OnClickNewElements ( IHTMLElement * pElement )

Definition at line 425 of file SchedulerDlg.cpp.

{
  BSTR getbstr = NULL;
  CEntryInfoDlg InfoDlg;
  CMyScheduler scheduler;
  CString szStr;
  CComPtr<IHTMLElement> phtmlElement;
  int iDivID, iScheduleInfo;

  pElement->get_parentElement(&phtmlElement);

  //Get a valid parent element
  ASSERT(phtmlElement);

  if (phtmlElement)
    phtmlElement->get_id(&getbstr);

  //Get a valid parent id
  ASSERT(getbstr);

  szStr = getbstr;
  InfoDlg.m_szStartTime = GetStartTimeFormatted(szStr);

  pElement->get_id(&getbstr);

  //Get a valid id for the new meeting
  ASSERT(getbstr);

  szStr = getbstr;
  iDivID = atoi(szStr);

  for (iScheduleInfo=0; iScheduleInfo < m_scheduler_array.GetSize(); iScheduleInfo++)
  {
    scheduler = m_scheduler_array.GetAt(iScheduleInfo);

    if (scheduler.m_iId == iDivID)
      break;
  }

  ASSERT(scheduler.m_iId==iDivID);

  InfoDlg.m_szTitle = scheduler.m_szTitle;
  InfoDlg.m_szDescription = scheduler.m_szDescription;

  InfoDlg.m_fVisibleButtons = true;
  InfoDlg.m_fVisibleDefaultButtons = false;
  InfoDlg.DoModal();

  if (InfoDlg.m_fDeleteSchedule) //If the schedule needs to be deleted
  {
    m_scheduler_array.RemoveAt(iScheduleInfo);
    OnDeleteScheduleDisplay(scheduler);
  }
  else if (InfoDlg.m_fModifySchedule) //If the schedule needs to be modified
  {
    RemoveInfoFromTable();
    OnModifyScheduleDisplay(m_scheduler_array.ElementAt(iScheduleInfo), InfoDlg);
    DateSchedules();
  }
  else //Cancel
    //DO NOTHING

  InfoDlg.SetDefaultSettings();

  return S_OK;
}

HRESULT CSchedulerDlg::OnClickTime ( IHTMLElement * pElement )

Definition at line 352 of file SchedulerDlg.cpp.

{
  CComBSTR getbstr;
  CEntryInfoDlg InfoDlg;

  UpdateData(true);

  if (CheckDates())
  {
    //Get the start time selected
    pElement->get_id(&getbstr);

    ASSERT(getbstr);

    InfoDlg.m_szStartTime = getbstr;
    InfoDlg.DoModal();

    //If valid schedule information was entered
    if (InfoDlg.m_fUpdateScheduleDisplay)
      OnUpdateScheduleDisplay(InfoDlg);
  }
  return S_OK;
}

HRESULT CSchedulerDlg::OnClickTimeDesc ( IHTMLElement * pElement )

Definition at line 388 of file SchedulerDlg.cpp.

{
  CComBSTR getbstr;
  CEntryInfoDlg InfoDlg;
  CString szStr;

  //Get the id of the row that was clicked
  pElement->get_id(&getbstr);

  ASSERT(getbstr);

  InfoDlg.m_fVisibleButtons = false;
  InfoDlg.m_fVisibleDefaultButtons = true;
  szStr = getbstr;
  InfoDlg.m_szStartTime = GetStartTimeFormatted(szStr);

  InfoDlg.DoModal();

  //If valid schedule information was entered
  if (InfoDlg.m_fUpdateScheduleDisplay)
    OnUpdateScheduleDisplay(InfoDlg);

  return S_OK;
}

void CSchedulerDlg::OnDeleteScheduleDisplay ( CMyScheduler & scheduler )

Definition at line 878 of file SchedulerDlg.cpp.

{
  CComBSTR getbstr;
  CString szStr;

  szStr.Format("%d", scheduler.m_iId);

  ASSERT(szStr);

  SetElementHtml(szStr, getbstr);
}

void CSchedulerDlg::OnDocumentComplete | ( | LPDISPATCH | pDisp,
 |  | LPCTSTR | szUrl
 | ) |  |

Definition at line 912 of file SchedulerDlg.cpp.

{
  IHTMLElement *pClearAllElement;
  IHTMLStyle *pClearAllStyle;
  VARIANT varColor;
  HRESULT result = GetElement(_T("BClearAll"), &pClearAllElement);

  if (SUCCEEDED(result)) {
    pClearAllElement->get_style(&pClearAllStyle);
    varColor.vt = VT_I4;
    varColor.lVal = 0xfffacd;
    pClearAllStyle->put_color(varColor);
    varColor.lVal = 0x00000;
    pClearAllStyle->put_backgroundColor(varColor);
    pClearAllStyle->Release();
    pClearAllElement->Release();
  }

  OpenScheduler();

  CDHtmlDialog::OnDocumentComplete(pDisp, szUrl);
}

void CSchedulerDlg::OnHelpAbout ( void )

Definition at line 800 of file SchedulerDlg.cpp.

{
  CAboutDlg dlg;
  dlg.DoModal();
}

BOOL CSchedulerDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 96 of file SchedulerDlg.cpp.

{
  CDHtmlDialog::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  if (pSysMenu != NULL)
  {
    CString strAboutMenu;
    strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // TODO: Add extra initialization here

  //Initializing the calendar to the current date

  CTime t = CTime::GetCurrentTime();
  m_currMonth = (short)t.GetMonth();
  m_currDay = (short)t.GetDay();
  m_currYear = (short)t.GetYear();

  SetDefaultProperties();

  m_szDivClass = _T("newElements");
  m_iLastDivID = 0;

  VERIFY(SHGetSpecialFolderPath(NULL, m_scheduler_filepath, CSIDL_PERSONAL, 0));

  //Saves the file to load/store in the 'My Documents' folder specific to the current user
  if(SHGetSpecialFolderPath(NULL, m_scheduler_filepath, CSIDL_PERSONAL, 0))
    PathAppend(m_scheduler_filepath, _T("Scheduler.sdr"));

  ASSERT(m_scheduler_filepath);

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CSchedulerDlg::OnModifyScheduleDisplay | ( | CMyScheduler & | scheduler,
 |  | const CEntryInfoDlg & | InfoDlg
 | ) |  |

Definition at line 895 of file SchedulerDlg.cpp.

{
  scheduler.m_iMonth = m_month.iVal;
  scheduler.m_iDay = m_day.iVal;
  scheduler.m_iYear = m_year.iVal;
  scheduler.m_szTitle = InfoDlg.m_szTitle;
  scheduler.m_szDescription = InfoDlg.m_szDescription;
  scheduler.m_iStartHour = InfoDlg.m_iStartHour;
  scheduler.m_iEndHour = InfoDlg.m_iEndHour;
  scheduler.m_iStartMinutes = atoi(InfoDlg.m_szStartTimeMinute);
  scheduler.m_iEndMinutes = atoi(InfoDlg.m_szEndTimeMinute);
}

HRESULT CSchedulerDlg::OnMouseOutButtons ( IHTMLElement * pElement )

Definition at line 266 of file SchedulerDlg.cpp.

{
  COleVariant varColor;
  CComPtr<IHTMLStyle> phtmlStyle;

  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = YELLOW;
    phtmlStyle->put_color(varColor);
  }
  return NULL;
}

HRESULT CSchedulerDlg::OnMouseOutNewElements ( IHTMLElement * pElement )

Definition at line 328 of file SchedulerDlg.cpp.

{
  COleVariant varColor;
  CComPtr<IHTMLStyle> phtmlStyle;

  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = BLUE;
    phtmlStyle->put_textDecorationUnderline(VARIANT_FALSE);
    phtmlStyle->put_color(varColor);
  }
  return NULL;
}

HRESULT CSchedulerDlg::OnMouseOutTime ( IHTMLElement * pElement )

Definition at line 224 of file SchedulerDlg.cpp.

{
  COleVariant varColor;
  CComPtr<IHTMLStyle> phtmlStyle;

  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = BLACK;
    phtmlStyle->put_textDecorationUnderline(VARIANT_FALSE);
    phtmlStyle->put_color(varColor);
  }
  return NULL;
}

HRESULT CSchedulerDlg::OnMouseOverButtons ( IHTMLElement * pElement )

Definition at line 245 of file SchedulerDlg.cpp.

{
  COleVariant varColor;
  CComPtr<IHTMLStyle> phtmlStyle;

  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = AQUA;
    phtmlStyle->put_color(varColor);
    phtmlStyle->put_cursor(L"hand");
  }
  return NULL;
}

HRESULT CSchedulerDlg::OnMouseOverNewElements ( IHTMLElement * pElement )

Definition at line 306 of file SchedulerDlg.cpp.

{
  COleVariant varColor;
  CComPtr<IHTMLStyle> phtmlStyle;

  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = RED;
    phtmlStyle->put_textDecorationUnderline(VARIANT_TRUE);
    phtmlStyle->put_color(varColor);
    phtmlStyle->put_cursor(L"hand");
  }
  return NULL;
}

HRESULT CSchedulerDlg::OnMouseOverTime ( IHTMLElement * pElement )

Definition at line 202 of file SchedulerDlg.cpp.

{
  COleVariant varColor;
  CComPtr<IHTMLStyle> phtmlStyle;
  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    varColor = RED;
    phtmlStyle->put_textDecorationUnderline(VARIANT_TRUE);
    phtmlStyle->put_color(varColor);
    phtmlStyle->put_cursor(L"hand");
  }
  return NULL;
}

HRESULT CSchedulerDlg::OnMouseOverTimeDesc ( IHTMLElement * pElement )

Definition at line 287 of file SchedulerDlg.cpp.

{
  CComPtr<IHTMLStyle> phtmlStyle;
  pElement->get_style(&phtmlStyle);

  ASSERT(phtmlStyle);

  if (phtmlStyle)
  {
    phtmlStyle->put_cursor(L"hand");
  }
  return NULL;
}

void CSchedulerDlg::OnPaint ( ) [protected]

Definition at line 166 of file SchedulerDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDHtmlDialog::OnPaint();
  }
}

HCURSOR CSchedulerDlg::OnQueryDragIcon ( ) [protected]

Definition at line 193 of file SchedulerDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CSchedulerDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 149 of file SchedulerDlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDHtmlDialog::OnSysCommand(nID, lParam);
  }
}

void CSchedulerDlg::OnUpdateScheduleDisplay ( const CEntryInfoDlg & InfoDlg )

Definition at line 811 of file SchedulerDlg.cpp.

{
  CMyScheduler schedulerEntry;

  schedulerEntry.m_iMonth = m_month.iVal;
  schedulerEntry.m_iDay = m_day.iVal;
  schedulerEntry.m_iYear = m_year.iVal;
  schedulerEntry.m_szTitle = InfoDlg.m_szTitle;
  schedulerEntry.m_szDescription = InfoDlg.m_szDescription;
  schedulerEntry.m_iStartHour = InfoDlg.m_iStartHour;
  schedulerEntry.m_iEndHour = InfoDlg.m_iEndHour;
  schedulerEntry.m_iStartMinutes = atoi(InfoDlg.m_szStartTimeMinute);
  schedulerEntry.m_iEndMinutes = atoi(InfoDlg.m_szEndTimeMinute);
  schedulerEntry.m_iId = m_iLastDivID++;

  m_scheduler_array.Add(schedulerEntry);

  RemoveInfoFromTable();

  DateSchedules();
}

void CSchedulerDlg::OpenScheduler ( void )

Definition at line 718 of file SchedulerDlg.cpp.

{
  // TODO: Add your command handler code here
  CFile schedulerFile;
  CMyScheduler scheduler;

  if( schedulerFile.Open(m_scheduler_filepath, CFile::modeRead) )
  {
    CArchive ar(&schedulerFile, CArchive::load);
    m_scheduler_array.Serialize(ar);
    ar >> m_iLastDivID;

    DateSchedules();

    ar.Close();
    schedulerFile.Close();
  }
}

void CSchedulerDlg::RemoveInfoFromTable ( )

Definition at line 691 of file SchedulerDlg.cpp.

{
  CComBSTR blankBstr;
  CMyScheduler schedulerEntry;
  CString szTime;

  for (int iallDates = 0; iallDates < m_scheduler_array.GetSize(); iallDates++)
  {
    schedulerEntry = m_scheduler_array.GetAt(iallDates);

    szTime = AdjustHour(schedulerEntry.m_iStartHour);
    szTime += _T(":");

    if (schedulerEntry.m_iStartMinutes)
      szTime += _T("30");
    else
      szTime += _T("00");

    SetElementText(szTime, blankBstr);
  }
}

void CSchedulerDlg::SetDefaultProperties ( )

Definition at line 511 of file SchedulerDlg.cpp.

{
  //Set the month, day and year values to the current date
  m_month = m_currMonth;
  m_day = m_currDay;
  m_year = m_currYear;

  UpdateData(false);
}

CString CSchedulerDlg::SetTimeFormat | ( | int | iHour,
 |  | int | iMinutes
 | ) |  |

Definition at line 565 of file SchedulerDlg.cpp.

{
  CString szTime_span;

  szTime_span = AdjustHour(iHour);

  if (iMinutes)
    szTime_span += _T(":30");
  else
    szTime_span += _T(":00");

  if (iHour >= 12)
    szTime_span += _T(" pm");
  else
    szTime_span += _T(" am");

  return szTime_span;
}

Member Data Documentation

short CSchedulerDlg::m_currDay

Definition at line 43 of file SchedulerDlg.h.

short CSchedulerDlg::m_currMonth

Definition at line 43 of file SchedulerDlg.h.

short CSchedulerDlg::m_currYear

Definition at line 43 of file SchedulerDlg.h.

COleVariant CSchedulerDlg::m_day

Definition at line 38 of file SchedulerDlg.h.

HACCEL CSchedulerDlg::m_hAccel [protected]

Definition at line 78 of file SchedulerDlg.h.

HICON CSchedulerDlg::m_hIcon [protected]

Definition at line 77 of file SchedulerDlg.h.

int CSchedulerDlg::m_iLastDivID

Definition at line 42 of file SchedulerDlg.h.

COleVariant CSchedulerDlg::m_month

Definition at line 37 of file SchedulerDlg.h.

CArray<CMyScheduler> CSchedulerDlg::m_scheduler_array

Definition at line 36 of file SchedulerDlg.h.

TCHAR CSchedulerDlg::m_scheduler_filepath[MAX_PATH]

Definition at line 41 of file SchedulerDlg.h.

CString CSchedulerDlg::m_szDivClass

Definition at line 40 of file SchedulerDlg.h.

COleVariant CSchedulerDlg::m_year

Definition at line 39 of file SchedulerDlg.h.

The documentation for this class was generated from the following files:
  • internet/Scheduler/SchedulerDlg.h
  • internet/Scheduler/SchedulerDlg.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CScreenCapApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CScreenCapApp Class Reference

#include "ScreenCap.h"

List of all members.

Public Member Functions

CScreenCapApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
BOOL | OnIdle (LONG lCount)
BOOL | PreTranslateMessage (MSG *pMsg)

Detailed Description

Definition at line 24 of file ScreenCap.h.

Constructor & Destructor Documentation

CScreenCapApp::CScreenCapApp ( )

Definition at line 32 of file ScreenCap.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CScreenCapApp::InitInstance ( ) [virtual]

Definition at line 45 of file ScreenCap.cpp.

{
  CWinApp::InitInstance();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  // To create the main window, this code creates a new frame window
  // object and then sets it as the application's main window object
  CMainFrame* pFrame = new CMainFrame;
  m_pMainWnd = pFrame;
  // create and load the frame with its resources
  pFrame->LoadFrame(IDR_MAINFRAME,
    WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
    NULL);
  // The one and only window has been initialized, so show and update it
  pFrame->ShowWindow(SW_SHOW);
  pFrame->UpdateWindow();
  // call DragAcceptFiles only if there's a suffix
  //  In an SDI app, this should occur after ProcessShellCommand
  return TRUE;
}

void CScreenCapApp::OnAppAbout ( )

Definition at line 109 of file ScreenCap.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

BOOL CScreenCapApp::OnIdle ( LONG lCount )

Definition at line 127 of file ScreenCap.cpp.

{
  if (CWinApp::OnIdle(lCount))
    return(TRUE);

  ProcessDllIdle();
  return(FALSE);
}

BOOL CScreenCapApp::PreTranslateMessage ( MSG * pMsg )

Definition at line 119 of file ScreenCap.cpp.

{
  if (CWinApp::PreTranslateMessage(pMsg))
    return(TRUE);

  return(FilterDllMsg(pMsg));
}

The documentation for this class was generated from the following files:
  • advanced/DllScreenCap/ScreenCap/ScreenCap.h
  • advanced/DllScreenCap/ScreenCap/ScreenCap.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CScribbleApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CScribbleApp Class Reference

#include "scribble.h"

List of all members.

Public Member Functions

CScribbleApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Public Attributes

COleTemplateServer | m_server

Detailed Description

Definition at line 23 of file scribble.h.

Constructor & Destructor Documentation

CScribbleApp::CScribbleApp ( )

Definition at line 46 of file scribble.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
  EnableHtmlHelp();
}

Member Function Documentation

BOOL CScribbleApp::InitInstance ( ) [virtual]

Definition at line 68 of file scribble.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_SCRIBBTYPE,
    RUNTIME_CLASS(CScribbleDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CScribbleView));

  pDocTemplate->SetServerInfo(
    IDR_SCRIBBTYPE_SRVR_EMB, IDR_SCRIBBTYPE_SRVR_IP,
    RUNTIME_CLASS(CInPlaceFrame));

  AddDocTemplate(pDocTemplate);
  // Connect the COleTemplateServer to the document template.
  //  The COleTemplateServer creates new documents on behalf
  //  of requesting OLE containers by using information
  //  specified in the document template.
  m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);

  // Register all OLE server factories as running.  This enables the
  //  OLE libraries to create objects from other applications.
  COleTemplateServer::RegisterAll();
    // Note: MDI applications register all server objects without regard
    //  to the /Embedding or /Automation on the command line.

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // Enable drag/drop open.  We don't call this in Win32, since a
  //  document file extension wasn't chosen while running AppWizard.
  m_pMainWnd->DragAcceptFiles();
  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Check to see if launched as OLE server
  if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
  {
    // Application was run with /Embedding or /Automation.  Don't show the
    //  main window in this case.
    return TRUE;
  }

  // When a server application is launched stand-alone, it is a good idea
  //  to update the system registry in case it has been damaged.
  m_server.UpdateRegistry(OAT_INPLACE_SERVER);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CScribbleApp::OnAppAbout ( )

Definition at line 200 of file scribble.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

Member Data Documentation

COleTemplateServer CScribbleApp::m_server

Definition at line 36 of file scribble.h.

The documentation for this class was generated from the following files:
  • general/Scribble/scribble.h
  • general/Scribble/scribble.cpp
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CScribbleDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CScribbleDoc Class Reference

#include "scribdoc.h"

List of all members.

Public Member Functions

virtual | ~CScribbleDoc ()
virtual void | DeleteContents ()
CPen * | GetCurrentPen ()
CSize | GetDocSize ()
CScribbleItem * GetEmbeddedItem ()
CStroke * NewStroke ()
virtual BOOL | OnNewDocument ()
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual void | Serialize (CArchive &ar)

Public Attributes

CTypedPtrList< CObList, CStroke * > | m_strokeList

Protected Member Functions

CScribbleDoc ()
void | InitDocument ()
afx_msg void | OnEditClearAll ()
afx_msg void | OnEditCopy ()
virtual COleServerItem * | OnGetEmbeddedItem ()
afx_msg void | OnPenThickOrThin ()
afx_msg void | OnPenWidths ()
void | OnSetItemRects (LPCRECT lpPosRect, LPCRECT lpClipRect)
afx_msg void | OnUpdateEditClearAll (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePenThickOrThin (CCmdUI *pCmdUI)
void | ReplacePen ()

Protected Attributes

BOOL | m_bThickPen
UINT m_nPenWidth
UINT m_nThickWidth
UINT m_nThinWidth
CPen | m_penCur
CSize | m_sizeDoc

Detailed Description

Definition at line 55 of file scribdoc.h.

Constructor & Destructor Documentation

CScribbleDoc::CScribbleDoc ( ) [protected]

Definition at line 47 of file scribdoc.cpp.

{
  // Use OLE compound files
  EnableCompoundFile();

  m_sizeDoc = CSize(200, 200);
}

CScribbleDoc::~CScribbleDoc ( ) [virtual]

Definition at line 55 of file scribdoc.cpp.

{
}

Member Function Documentation

void CScribbleDoc::DeleteContents ( ) [virtual]

Definition at line 109 of file scribdoc.cpp.

{
  while (!m_strokeList.IsEmpty())
  {
    delete m_strokeList.RemoveHead();
  }
  COleServerDoc::DeleteContents();
}

CPen* CScribbleDoc::GetCurrentPen ( ) [inline]

Definition at line 77 of file scribdoc.h.

{ return &m_penCur; }

CSize CScribbleDoc::GetDocSize ( ) [inline]

Definition at line 82 of file scribdoc.h.

{ return m_sizeDoc; }

CScribbleItem* CScribbleDoc::GetEmbeddedItem ( ) [inline]

Definition at line 83 of file scribdoc.h.

    { return (CScribbleItem*)COleServerDoc::GetEmbeddedItem(); }

void CScribbleDoc::InitDocument ( ) [protected]

Definition at line 118 of file scribdoc.cpp.

{
  m_bThickPen = FALSE;
  m_nThinWidth = 2;   // default thin pen is 2 pixels wide
  m_nThickWidth = 5;  // default thick pen is 5 pixels wide
  ReplacePen();       // initialize pen according to current width

  // default document size is 2 x 2 inches
  m_sizeDoc = CSize(200,200);
}

CStroke * CScribbleDoc::NewStroke ( )

Definition at line 129 of file scribdoc.cpp.

{
  CStroke* pStrokeItem = new CStroke(m_nPenWidth);
  m_strokeList.AddTail(pStrokeItem);
  SetModifiedFlag();  // Mark the document as having been modified, for
            // purposes of confirming File Close.
  return pStrokeItem;
}

void CScribbleDoc::OnEditClearAll ( ) [protected]

Definition at line 189 of file scribdoc.cpp.

{
  DeleteContents();
  SetModifiedFlag();  // Mark the document as having been modified, for
            // purposes of confirming File Close.
  UpdateAllViews(NULL);
}

void CScribbleDoc::OnEditCopy ( ) [protected]

Definition at line 301 of file scribdoc.cpp.

{
  CScribbleItem* pItem = GetEmbeddedItem();
  pItem->CopyToClipboard(TRUE);
}

COleServerItem * CScribbleDoc::OnGetEmbeddedItem ( ) [protected, virtual]

Definition at line 280 of file scribdoc.cpp.

{
  // OnGetEmbeddedItem is called by the framework to get the COleServerItem
  //  that is associated with the document.  It is only called when necessary.

  CScribbleItem* pItem = new CScribbleItem(this);
  ASSERT_VALID(pItem);
  return pItem;
}

BOOL CScribbleDoc::OnNewDocument ( ) [virtual]

Definition at line 59 of file scribdoc.cpp.

{
  if (!COleServerDoc::OnNewDocument())
    return FALSE;
  InitDocument();
  return TRUE;
}

BOOL CScribbleDoc::OnOpenDocument ( LPCTSTR lpszPathName ) [virtual]

Definition at line 101 of file scribdoc.cpp.

{
  if (!COleServerDoc::OnOpenDocument(lpszPathName))
    return FALSE;
  InitDocument();
  return TRUE;
}

void CScribbleDoc::OnPenThickOrThin ( ) [protected]

Definition at line 197 of file scribdoc.cpp.

{
  // Toggle the state of the pen between thin or thick.
  m_bThickPen = !m_bThickPen;

  // Change the current pen to reflect the new user-specified width.
  ReplacePen();
}

void CScribbleDoc::OnPenWidths ( ) [protected]

Definition at line 229 of file scribdoc.cpp.

{
  CPenWidthsDlg dlg;
  // Initialize dialog data
  dlg.m_nThinWidth = m_nThinWidth;
  dlg.m_nThickWidth = m_nThickWidth;

  // Invoke the dialog box
  if (dlg.DoModal() == IDOK)
  {
    // retrieve the dialog data
    m_nThinWidth = dlg.m_nThinWidth;
    m_nThickWidth = dlg.m_nThickWidth;

    // Update the pen that is used by views when drawing new strokes,
    // to reflect the new pen width definitions for "thick" and "thin".
    ReplacePen();
  }
}

void CScribbleDoc::OnSetItemRects | ( | LPCRECT | lpPosRect,
 |  | LPCRECT | lpClipRect |
 | ) |  |  | [protected]

Definition at line 290 of file scribdoc.cpp.

{
  // call base class to change the size of the window
  COleServerDoc::OnSetItemRects(lpPosRect, lpClipRect);

  // notify first view that scroll info should change
  POSITION pos = GetFirstViewPosition();
  CScribbleView* pView = (CScribbleView*)GetNextView(pos);
  pView->ResyncScrollSizes();
}

void CScribbleDoc::OnUpdateEditClearAll ( CCmdUI * pCmdUI ) [protected]

Definition at line 215 of file scribdoc.cpp.

{
  // Enable the command user interface object (menu item or tool bar
  // button) if the document is non-empty, i.e., has at least one stroke.
  pCmdUI->Enable(!m_strokeList.IsEmpty());
}

void CScribbleDoc::OnUpdatePenThickOrThin ( CCmdUI * pCmdUI ) [protected]

Definition at line 222 of file scribdoc.cpp.

{
  // Add check mark to Draw Thick Line menu item, if the current
  // pen width is "thick".
  pCmdUI->SetCheck(m_bThickPen);
}

void CScribbleDoc::ReplacePen ( ) [protected]

Definition at line 206 of file scribdoc.cpp.

{
  m_nPenWidth = m_bThickPen? m_nThickWidth : m_nThinWidth;

  // Change the current pen to reflect the new user-specified width.
  m_penCur.DeleteObject();
  m_penCur.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0)); // solid black
}

void CScribbleDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 70 of file scribdoc.cpp.

{
  if (ar.IsStoring())
  {
    ar << m_sizeDoc;
  }
  else
  {
    ar >> m_sizeDoc;
  }
  m_strokeList.Serialize(ar);
}

Member Data Documentation

BOOL CScribbleDoc::m_bThickPen [protected]

Definition at line 70 of file scribdoc.h.

UINT CScribbleDoc::m_nPenWidth [protected]

Definition at line 69 of file scribdoc.h.

UINT CScribbleDoc::m_nThickWidth [protected]

Definition at line 72 of file scribdoc.h.

UINT CScribbleDoc::m_nThinWidth [protected]

Definition at line 71 of file scribdoc.h.

CPen CScribbleDoc::m_penCur [protected]

Definition at line 73 of file scribdoc.h.

CSize CScribbleDoc::m_sizeDoc [protected]

Definition at line 80 of file scribdoc.h.

CTypedPtrList<CObList,CStroke*> CScribbleDoc::m_strokeList

Definition at line 76 of file scribdoc.h.

The documentation for this class was generated from the following files:
  • general/Scribble/scribdoc.h
  • general/Scribble/scribdoc.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CScribbleItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CScribbleItem Class Reference

#include "scribitm.h"

List of all members.

Public Member Functions

CScribbleItem (CScribbleDoc *pContainerDoc)
~CScribbleItem ()
CScribbleDoc * | GetDocument () const
virtual BOOL | OnDraw (CDC *pDC, CSize &rSize)
virtual BOOL | OnGetExtent (DVASPECT dwDrawAspect, CSize &rSize)

Protected Member Functions

virtual void | Serialize (CArchive &ar)

Detailed Description

Definition at line 12 of file scribitm.h.

Constructor & Destructor Documentation

CScribbleItem::CScribbleItem ( CScribbleDoc * pContainerDoc )

Definition at line 28 of file scribitm.cpp.

  : COleServerItem(pContainerDoc, TRUE)
{
  // TODO: add one-time construction code here
  //  (eg, adding additional clipboard formats to the item's data source)
}

CScribbleItem::~CScribbleItem ( )

Definition at line 35 of file scribitm.cpp.

{
  // TODO: add cleanup code here
}

Member Function Documentation

CScribbleDoc* CScribbleItem::GetDocument ( ) const [inline]

Definition at line 21 of file scribitm.h.

    { return (CScribbleDoc*)COleServerItem::GetDocument(); }

BOOL CScribbleItem::OnDraw | ( | CDC * | pDC,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]

Definition at line 88 of file scribitm.cpp.

{
  CScribbleDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  pDC->SetMapMode(MM_ANISOTROPIC);
  CSize sizeDoc = pDoc->GetDocSize();
  sizeDoc.cy = -sizeDoc.cy;
  pDC->SetWindowOrg(0,0);
  pDC->SetWindowExt(sizeDoc);

  CTypedPtrList<CObList,CStroke*>& strokeList = pDoc->m_strokeList;
  POSITION pos = strokeList.GetHeadPosition();
  while (pos != NULL)
  {
    strokeList.GetNext(pos)->DrawStroke(pDC);
  }

  return TRUE;
}

BOOL CScribbleItem::OnGetExtent | ( | DVASPECT | dwDrawAspect,
 |  | CSize & | rSize |
 | ) |  |  | [virtual]

Definition at line 57 of file scribitm.cpp.

{
  // Most applications, like this one, only handle drawing the content
  //  aspect of the item.  If you wish to support other aspects, such
  //  as DVASPECT_THUMBNAIL (by overriding OnDrawEx), then this
  //  implementation of OnGetExtent should be modified to handle the
  //  additional aspect(s).

  if (dwDrawAspect != DVASPECT_CONTENT)
    return COleServerItem::OnGetExtent(dwDrawAspect, rSize);

  // CScribbleItem::OnGetExtent is called to get the extent in
  //  HIMETRIC units of the entire item.  The default implementation
  //  here simply returns a hard-coded number of units.

  CScribbleDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  rSize = pDoc->GetDocSize();
  CClientDC dc(NULL);

        // use a mapping mode based on logical units
  //  (we can't use MM_LOENGLISH because MM_LOENGLISH uses physical inches)
  dc.SetMapMode(MM_ANISOTROPIC);
  dc.SetViewportExt(dc.GetDeviceCaps(LOGPIXELSX), dc.GetDeviceCaps(LOGPIXELSY));
  dc.SetWindowExt(100, -100);
  dc.LPtoHIMETRIC(&rSize);

  return TRUE;
}

void CScribbleItem::Serialize ( CArchive & ar ) [protected, virtual]

Definition at line 40 of file scribitm.cpp.

{
  // CScribbleItem::Serialize will be called by the framework if
  //  the item is copied to the clipboard.  This can happen automatically
  //  through the OLE callback OnGetClipboardData.  A good default for
  //  the embedded item is simply to delegate to the document's Serialize
  //  function.  If you support links, then you will want to serialize
  //  just a portion of the document.

  if (!IsLinkedItem())
  {
    CScribbleDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);
    pDoc->Serialize(ar);
  }
}

The documentation for this class was generated from the following files:
  • general/Scribble/scribitm.h
  • general/Scribble/scribitm.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CScribbleView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CScribbleView Class Reference

#include "scribvw.h"

List of all members.

Public Member Functions

virtual | ~CScribbleView ()
CScribbleDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual void | OnInitialUpdate ()
virtual void | OnPrepareDC (CDC *pDC, CPrintInfo *pInfo=NULL)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
void | PrintPageHeader (CDC *pDC, CPrintInfo *pInfo, CString &strHeader)
void | PrintTitlePage (CDC *pDC, CPrintInfo *pInfo)
void | ResyncScrollSizes ()

Protected Member Functions

CScribbleView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnCancelEditSrvr ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnSize (UINT nType, int cx, int cy)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)

Protected Attributes

CStroke * m_pStrokeCur
CPoint | m_ptPrev

Detailed Description

Definition at line 13 of file scribvw.h.

Constructor & Destructor Documentation

CScribbleView::CScribbleView ( ) [protected]

Definition at line 46 of file scribvw.cpp.

{
  SetScrollSizes(MM_TEXT, CSize(0, 0));
}

CScribbleView::~CScribbleView ( ) [virtual]

Definition at line 51 of file scribvw.cpp.

{
}

Member Function Documentation

CScribbleDoc * CScribbleView::GetDocument ( ) [inline]

Definition at line 72 of file scribvw.h.

   { return (CScribbleDoc*)m_pDocument; }

void CScribbleView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 114 of file scribvw.cpp.

{
  // TODO: add extra initialization before printing
}

void CScribbleView::OnCancelEditSrvr ( ) [protected]

Definition at line 348 of file scribvw.cpp.

{
  GetDocument()->OnDeactivateUI(FALSE);
}

void CScribbleView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 66 of file scribvw.cpp.

{
  CScribbleDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  // Get the invalidated rectangle of the view, or in the case
  // of printing, the clipping region of the printer dc.
  CRect rectClip;
  CRect rectStroke;
  pDC->GetClipBox(&rectClip);
  pDC->LPtoDP(&rectClip);
  rectClip.InflateRect(1, 1); // avoid rounding to nothing

  // Note: CScrollView::OnPaint() will have already adjusted the
  // viewport origin before calling OnDraw(), to reflect the
  // currently scrolled position.

  // The view delegates the drawing of individual strokes to
  // CStroke::DrawStroke().
  CTypedPtrList<CObList,CStroke*>& strokeList = pDoc->m_strokeList;
  POSITION pos = strokeList.GetHeadPosition();
  while (pos != NULL)
  {
    CStroke* pStroke = strokeList.GetNext(pos);
    rectStroke = pStroke->GetBoundingRect();
    pDC->LPtoDP(&rectStroke);
    rectStroke.InflateRect(1, 1); // avoid rounding to nothing
    if (!rectStroke.IntersectRect(&rectStroke, &rectClip))
      continue;
    pStroke->DrawStroke(pDC);
  }
}

void CScribbleView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 119 of file scribvw.cpp.

{
  // TODO: add cleanup after printing
}

void CScribbleView::OnInitialUpdate ( ) [virtual]

Definition at line 267 of file scribvw.cpp.

{
        ResyncScrollSizes();
  CScrollView::OnInitialUpdate();
}

void CScribbleView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 148 of file scribvw.cpp.

{
    // Pressing the mouse button in the view window starts a new stroke

  // CScrollView changes the viewport origin and mapping mode.
  // It's necessary to convert the point from device coordinates
  // to logical coordinates, such as are stored in the document.
  CClientDC dc(this);
  OnPrepareDC(&dc);
  dc.DPtoLP(&point);

  m_pStrokeCur = GetDocument()->NewStroke();
  // Add first point to the new stroke
  m_pStrokeCur->m_pointArray.Add(point);

  SetCapture();       // Capture the mouse until button up.
  m_ptPrev = point;   // Serves as the MoveTo() anchor point for the
            // LineTo() the next point, as the user drags the
            // mouse.

  return;
}

void CScribbleView::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 171 of file scribvw.cpp.

{
  // Mouse button up is interesting in the Scribble application
  // only if the user is currently drawing a new stroke by dragging
  // the captured mouse.

  if (GetCapture() != this)
    return; // If this window (view) didn't capture the mouse,
        // then the user isn't drawing in this window.

  CScribbleDoc* pDoc = GetDocument();

  CClientDC dc(this);

  // CScrollView changes the viewport origin and mapping mode.
  // It's necessary to convert the point from device coordinates
  // to logical coordinates, such as are stored in the document.
  OnPrepareDC(&dc);  // set up mapping mode and viewport origin
  dc.DPtoLP(&point);

  CPen* pOldPen = dc.SelectObject(pDoc->GetCurrentPen());
  dc.MoveTo(m_ptPrev);
  dc.LineTo(point);
  dc.SelectObject(pOldPen);
  m_pStrokeCur->m_pointArray.Add(point);

  // Tell the stroke item that we're done adding points to it.
  // This is so it can finish computing its bounding rectangle.
  m_pStrokeCur->FinishStroke();

  // Tell the other views that this stroke has been added
  // so that they can invalidate this stroke's area in their
  // client area.
  pDoc->UpdateAllViews(this, 0L, m_pStrokeCur);

  ReleaseCapture();   // Release the mouse capture established at
            // the beginning of the mouse drag.
  pDoc->NotifyChanged();
  return;
}

void CScribbleView::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 212 of file scribvw.cpp.

{
  // Mouse movement is interesting in the Scribble application
  // only if the user is currently drawing a new stroke by dragging
  // the captured mouse.

  if (GetCapture() != this)
    return; // If this window (view) didn't capture the mouse,
        // then the user isn't drawing in this window.

  CClientDC dc(this);
  // CScrollView changes the viewport origin and mapping mode.
  // It's necessary to convert the point from device coordinates
  // to logical coordinates, such as are stored in the document.
  OnPrepareDC(&dc);
  dc.DPtoLP(&point);

  m_pStrokeCur->m_pointArray.Add(point);

  // Draw a line from the previous detected point in the mouse
  // drag to the current point.
  CPen* pOldPen = dc.SelectObject(GetDocument()->GetCurrentPen());
  dc.MoveTo(m_ptPrev);
  dc.LineTo(point);
  dc.SelectObject(pOldPen);
  m_ptPrev = point;
  return;
}

void CScribbleView::OnPrepareDC | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo = NULL |
 | ) |  |  | [virtual]

Definition at line 353 of file scribvw.cpp.

{
  CScribbleDoc* pDoc = GetDocument();
  CScrollView::OnPrepareDC(pDC, pInfo);

  pDC->SetMapMode(MM_ANISOTROPIC);
  CSize sizeDoc = pDoc->GetDocSize();
  sizeDoc.cy = -sizeDoc.cy;
  pDC->SetWindowExt(sizeDoc);

  CSize sizeNum, sizeDenom;
  pDoc->GetZoomFactor(&sizeNum, &sizeDenom);

  int xLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSX);
  int yLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSY);

  long xExt = (long)sizeDoc.cx * xLogPixPerInch * sizeNum.cx;
  xExt /= 100 * (long)sizeDenom.cx;
  long yExt = (long)sizeDoc.cy * yLogPixPerInch * sizeNum.cy;
  yExt /= 100 * (long)sizeDenom.cy;
  pDC->SetViewportExt((int)xExt, (int)-yExt);
}

BOOL CScribbleView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 102 of file scribvw.cpp.

{
  pInfo->SetMaxPage(2);   // the document is two pages long:
              // the first page is the title page
              // the second is the drawing
  BOOL bRet = DoPreparePrinting(pInfo); // default preparation
  pInfo->m_nNumPreviewPages = 2;  // Preview 2 pages at a time
  // Set this value after calling DoPreparePrinting to override
  // value read from .INI file
  return bRet;
}

void CScribbleView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 282 of file scribvw.cpp.

{
  if (pInfo->m_nCurPage == 1)  // page no. 1 is the title page
  {
    PrintTitlePage(pDC, pInfo);
    return; // nothing else to print on page 1 but the page title
  }
  CString strHeader = GetDocument()->GetTitle();

  PrintPageHeader(pDC, pInfo, strHeader);
  // PrintPageHeader() subtracts out from the pInfo->m_rectDraw the
  // amount of the page used for the header.

  pDC->SetWindowOrg(pInfo->m_rectDraw.left,-pInfo->m_rectDraw.top);

  // Now print the rest of the page
  OnDraw(pDC);
}

void CScribbleView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 376 of file scribvw.cpp.

{
        ResyncScrollSizes();        // ensure that scroll info is up-to-date
  CScrollView::OnSize(nType, cx, cy);
}

void CScribbleView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 241 of file scribvw.cpp.

{
  // The document has informed this view that some data has changed.

  if (pHint != NULL)
  {
    if (pHint->IsKindOf(RUNTIME_CLASS(CStroke)))
    {
      // The hint is that a stroke as been added (or changed).
      // So, invalidate its rectangle.
      CStroke* pStroke = (CStroke*)pHint;
      CClientDC dc(this);
      OnPrepareDC(&dc);
      CRect rectInvalid = pStroke->GetBoundingRect();
      dc.LPtoDP(&rectInvalid);
      InvalidateRect(&rectInvalid);
      return;
    }
  }
  // We can't interpret the hint, so assume that anything might
  // have been updated.
  Invalidate(TRUE);
  return;
}

BOOL CScribbleView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 55 of file scribvw.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

void CScribbleView::PrintPageHeader | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo,
 |  | CString & | strHeader
 | ) |  |

Definition at line 325 of file scribvw.cpp.

{
  // Print a page header consisting of the name of
  // the document and a horizontal line
  pDC->SetTextAlign(TA_LEFT);
  pDC->TextOut(0,-25, strHeader);  // 1/4 inch down

  // Draw a line across the page, below the header
  TEXTMETRIC textMetric;
  pDC->GetTextMetrics(&textMetric);
  int y = -35 - textMetric.tmHeight;          // line 1/10th inch below text
  pDC->MoveTo(0, y);                          // from left margin
  pDC->LineTo(pInfo->m_rectDraw.right, y);    // to right margin

  // Subtract out from the drawing rectange the space used by the header.
  y -= 25;    // space 1/4 inch below (top of) line
  pInfo->m_rectDraw.top += y;
}

void CScribbleView::PrintTitlePage | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) |  |

Definition at line 301 of file scribvw.cpp.

{
  // Prepare a font size for displaying the file name
  LOGFONT logFont;
  memset(&logFont, 0, sizeof(LOGFONT));
  logFont.lfHeight = 75;  //  3/4th inch high in MM_LOENGLISH
              // (1/100th inch)
  CFont font;
  CFont* pOldFont = NULL;
  if (font.CreateFontIndirect(&logFont))
    pOldFont = pDC->SelectObject(&font);

  // Get the file name, to be displayed on title page
  CString strPageTitle = GetDocument()->GetTitle();

  // Display the file name 1 inch below top of the page,
  // centered horizontally
  pDC->SetTextAlign(TA_CENTER);
  pDC->TextOut(pInfo->m_rectDraw.right/2, -100, strPageTitle);

  if (pOldFont != NULL)
    pDC->SelectObject(pOldFont);
}

void CScribbleView::ResyncScrollSizes ( )

Definition at line 273 of file scribvw.cpp.

{
  CClientDC dc(NULL);
  OnPrepareDC(&dc);
  CSize sizeDoc = GetDocument()->GetDocSize();
  dc.LPtoDP(&sizeDoc);
  SetScrollSizes(MM_TEXT, sizeDoc);
}

Member Data Documentation

CStroke* CScribbleView::m_pStrokeCur [protected]

Definition at line 24 of file scribvw.h.

CPoint CScribbleView::m_ptPrev [protected]

Definition at line 25 of file scribvw.h.

The documentation for this class was generated from the following files:
  • general/Scribble/scribvw.h
  • general/Scribble/scribvw.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CScript Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CScript Class Reference

#include "Script.H"

List of all members.

Public Member Functions

CScript (CScriptManager *pManager)
~CScript ()
HRESULT | AddNamedItem (LPCTSTR pszItemName)
BOOL | FindMacro (LPCTSTR pszMacroName)
POSITION | GetFirstMacroPosition ()
CString | GetName ()
CString | GetNextMacroName (POSITION &posMacro)
HRESULT | LoadScript (LPCTSTR pszFileName, LPCTSTR pszScriptName)
HRESULT | RunMacro (LPCTSTR pszMacroName)
void | Unload ()

Protected Member Functions

STDMETHOD() | EnableModeless (BOOL tEnable)
STDMETHOD() | GetDocVersionString (BSTR *pbstrVersion)
STDMETHOD() | GetItemInfo (LPCOLESTR pszName, DWORD dwReturnMask, IUnknown **ppItem, ITypeInfo **ppTypeInfo)
STDMETHOD() | GetLCID (LCID *plcid)
STDMETHOD() | GetWindow (HWND *phWindow)
STDMETHOD() | OnEnterScript ()
STDMETHOD() | OnLeaveScript ()
STDMETHOD() | OnScriptError (IActiveScriptError *pError)
STDMETHOD() | OnScriptTerminate (const VARIANT *pvarResult, const EXCEPINFO *pExcepInfo)
STDMETHOD() | OnStateChange (SCRIPTSTATE eState)

Protected Attributes

CMap< CString, LPCTSTR, DISPID,
DISPID > 		m_mapMacros
IActiveScriptPtr | m_pActiveScript
IActiveScriptParsePtr | m_pActiveScriptParse
IDispatchPtr | m_pDispatch
CScriptManager * m_pManager
CString | m_strScriptName
CString | m_strScriptText

Detailed Description

Definition at line 24 of file Script.H.

Constructor & Destructor Documentation

CScript::CScript ( CScriptManager * pManager )

Definition at line 25 of file Script.Cpp.

                                           :
   m_pManager( pManager )
{
   ASSERT( m_pManager != NULL );
}

CScript::~CScript ( )

Definition at line 31 of file Script.Cpp.

{
   Unload();
}

Member Function Documentation

HRESULT CScript::AddNamedItem ( LPCTSTR pszItemName )

Definition at line 36 of file Script.Cpp.

{

   HRESULT hResult;

   CT2COLE pszItemNameO( pszItemName );

   hResult = m_pActiveScript->AddNamedItem( pszItemNameO,
    SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   return( S_OK );
}

STDMETHOD() CScript::EnableModeless ( BOOL tEnable ) [protected]
BOOL CScript::FindMacro ( LPCTSTR pszMacroName )

Definition at line 53 of file Script.Cpp.

{
   DISPID dispid;

   ASSERT( pszMacroName != NULL );

   return( m_mapMacros.Lookup( pszMacroName, dispid ) );
}

STDMETHOD() CScript::GetDocVersionString ( BSTR * pbstrVersion ) [protected]
POSITION CScript::GetFirstMacroPosition ( )

Definition at line 62 of file Script.Cpp.

{
   return( m_mapMacros.GetStartPosition() );
}

STDMETHOD() CScript::GetItemInfo | ( | LPCOLESTR | pszName,
 |  | DWORD | dwReturnMask,
 |  | IUnknown ** | ppItem,
 |  | ITypeInfo ** | ppTypeInfo |
 | ) |  |  | [protected]
STDMETHOD() CScript::GetLCID ( LCID * plcid ) [protected]
CString CScript::GetName ( )

Definition at line 67 of file Script.Cpp.

{
   return( m_strScriptName );
}

CString CScript::GetNextMacroName ( POSITION & posMacro )

Definition at line 72 of file Script.Cpp.

{
   CString strMacro;
   DISPID dispid;

   m_mapMacros.GetNextAssoc( posMacro, strMacro, dispid );

   return( strMacro );
}

STDMETHOD() CScript::GetWindow ( HWND * phWindow ) [protected]
HRESULT CScript::LoadScript | ( | LPCTSTR | pszFileName,
 |  | LPCTSTR | pszScriptName
 | ) |  |

Definition at line 82 of file Script.Cpp.

{
   ITypeInfoPtr pTypeInfo;
   HRESULT hResult;
   CLSID clsid;
   CFile file;
   ULONGLONG nFileSize;
   BSTR bstrScript;
   BOOL tSuccess;
   int iMethod;
   UINT nNames;
   BSTR bstrName;
   CString strName;
   CString strExtension;
   int iChar;

   ENSURE( pszFileName != NULL );
   ENSURE( pszScriptName != NULL );
   ENSURE( m_pActiveScript == NULL );

   iChar = lstrlen( pszFileName )-1;
   while( (iChar >= 0) && (pszFileName[iChar] != _T( '.' )) )
   {
    iChar--;
   }

   if( (iChar >= 0) && (_tcsicmp( &pszFileName[iChar], _T( ".js" ) ) == 0) )
   {
    hResult = CLSIDFromProgID( L"JScript", &clsid );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }
   }
   else
   {
    hResult = CLSIDFromProgID( L"VBScript", &clsid );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }
   }

   hResult = m_pActiveScript.CreateInstance( clsid, NULL,
    CLSCTX_INPROC_SERVER );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   m_pActiveScriptParse = m_pActiveScript;
   if( m_pActiveScriptParse == NULL )
   {
    return( E_NOINTERFACE );
   }

   hResult = m_pActiveScript->SetScriptSite( &m_xActiveScriptSite );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   hResult = m_pActiveScriptParse->InitNew();
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   CFileException error;
   tSuccess = file.Open( pszFileName, CFile::modeRead|CFile::shareDenyWrite,
    &error );
   if( !tSuccess )
   {
    return( HRESULT_FROM_WIN32( error.m_lOsError ) );
   }

   nFileSize = file.GetLength();
   if( nFileSize > INT_MAX )
   {
      return( E_OUTOFMEMORY );
   }

   nFileSize = file.Read( m_strScriptText.GetBuffer( ULONG( nFileSize ) ), ULONG( nFileSize ) );
   file.Close();
   m_strScriptText.ReleaseBuffer( ULONG( nFileSize ) );
   bstrScript = m_strScriptText.AllocSysString();

   hResult = m_pActiveScriptParse->ParseScriptText( bstrScript, NULL, NULL,
    NULL, DWORD( this ), 0, SCRIPTTEXT_ISVISIBLE, NULL, NULL );
   SysFreeString( bstrScript );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   hResult = m_pManager->AddNamedItems( m_pActiveScript );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   hResult = m_pActiveScript->SetScriptState( SCRIPTSTATE_CONNECTED );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   hResult = m_pActiveScript->GetScriptDispatch( NULL, &m_pDispatch );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   hResult = m_pDispatch->GetTypeInfo( 0, GetUserDefaultLCID(), &pTypeInfo );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   CSmartTypeAttr pTypeAttr( pTypeInfo );
   CSmartFuncDesc pFuncDesc( pTypeInfo );

   hResult = pTypeInfo->GetTypeAttr( &pTypeAttr );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   for( iMethod = 0; iMethod < pTypeAttr->cFuncs; iMethod++ )
   {
    hResult = pTypeInfo->GetFuncDesc( iMethod, &pFuncDesc );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }

    if( (pFuncDesc->funckind == FUNC_DISPATCH) && (pFuncDesc->invkind ==
     INVOKE_FUNC) && (pFuncDesc->cParams == 0) )
    {
     bstrName = NULL;
     hResult = pTypeInfo->GetNames( pFuncDesc->memid, &bstrName, 1,
      &nNames );
     if( FAILED( hResult ) )
     {
      return( hResult );
     }
     ASSERT( nNames == 1 );

     strName = bstrName;
     SysFreeString( bstrName );
     bstrName = NULL;

     // Macros can't contain underscores, since those denote event handlers
     if( strName.Find( _T( '_' ) ) == -1 )
     {
      m_mapMacros.SetAt( strName, pFuncDesc->memid );
     }
    }

    pFuncDesc.Release();
   }

   m_strScriptName = pszScriptName;

   return( S_OK );
}

STDMETHOD() CScript::OnEnterScript ( ) [protected]
STDMETHOD() CScript::OnLeaveScript ( ) [protected]
STDMETHOD() CScript::OnScriptError ( IActiveScriptError * pError ) [protected]
STDMETHOD() CScript::OnScriptTerminate | ( | const VARIANT * | pvarResult,
 |  | const EXCEPINFO * | pExcepInfo |
 | ) |  |  | [protected]
STDMETHOD() CScript::OnStateChange ( SCRIPTSTATE eState ) [protected]
HRESULT CScript::RunMacro ( LPCTSTR pszMacroName )

Definition at line 249 of file Script.Cpp.

{
   DISPID dispid;
   COleDispatchDriver driver;
   BOOL tFound;

   ASSERT( pszMacroName != NULL );

   tFound = m_mapMacros.Lookup( pszMacroName, dispid );
   if( !tFound )
   {
    return( DISP_E_MEMBERNOTFOUND );
   }

   driver.AttachDispatch( m_pDispatch, FALSE );
   try
   {
    driver.InvokeHelper( dispid, DISPATCH_METHOD, VT_EMPTY, NULL, VTS_NONE );
   }
   catch( COleDispatchException* pException )
   {
    CString strMessage;

    AfxFormatString1( strMessage, IDS_DISPATCHEXCEPTION,
     pException->m_strDescription );
    AfxMessageBox( strMessage );
    pException->Delete();
   }
   catch( COleException* pException )
   {
    pException->Delete();
   }

   return( S_OK );
}

void CScript::Unload ( )

Definition at line 285 of file Script.Cpp.

{
   if( m_pDispatch != NULL )
   {
    m_pDispatch.Release();
   }
   if( m_pActiveScript != NULL )
   {
    m_pActiveScript->SetScriptState( SCRIPTSTATE_DISCONNECTED );
    m_pActiveScript->Close();
    m_pActiveScript.Release();
   }
   if( m_pActiveScriptParse != NULL )
   {
    m_pActiveScriptParse.Release();
   }
}

Member Data Documentation

CMap< CString, LPCTSTR, DISPID, DISPID > CScript::m_mapMacros [protected]

Definition at line 58 of file Script.H.

IActiveScriptPtr CScript::m_pActiveScript [protected]

Definition at line 54 of file Script.H.

IActiveScriptParsePtr CScript::m_pActiveScriptParse [protected]

Definition at line 55 of file Script.H.

IDispatchPtr CScript::m_pDispatch [protected]

Definition at line 53 of file Script.H.

CScriptManager* CScript::m_pManager [protected]

Definition at line 52 of file Script.H.

CString CScript::m_strScriptName [protected]

Definition at line 57 of file Script.H.

CString CScript::m_strScriptText [protected]

Definition at line 56 of file Script.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/Script.H
  • ole/TstCon/Script.Cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CScriptManager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes | Private Member Functions

CScriptManager Class Reference

#include "ScrMngr.H"

List of all members.

Public Member Functions

CScriptManager (CTestContainer98Doc *pDoc)
~CScriptManager ()
HRESULT | AddNamedItem (LPCTSTR pszItemName, IDispatch *pDispatch)
HRESULT | AddNamedItems (IActiveScript *pScript)
CScript * | FindMacro (LPCTSTR pszMacroName)
POSITION | GetFirstScriptPosition () const
HRESULT | GetItemDispatch (LPCTSTR pszItemName, IUnknown **ppDispatch)
HRESULT | GetItemTypeInfo (LPCTSTR pszItemName, ITypeInfo **ppTypeInfo)
CScript * | GetNextScript (POSITION &posScript)
int | GetNumScripts () const
HRESULT | LoadScript (LPCTSTR pszFileName, LPCTSTR pszScriptName, CScript **ppScript=NULL)

Protected Attributes

CTypedPtrList< CObList, CScript * > | m_lpScripts
CTypedPtrMap< CMapStringToPtr,
CString, IDispatch * > 		m_mapNamedItems
CTestContainer98Doc * m_pDoc

Private Member Functions

DECLARE_DYNAMIC (CScriptManager)

Detailed Description

Definition at line 13 of file ScrMngr.H.

Constructor & Destructor Documentation

CScriptManager::CScriptManager ( CTestContainer98Doc * pDoc )

Definition at line 22 of file ScrMngr.Cpp.

                                                          :
   m_pDoc( pDoc )
{
   ASSERT( m_pDoc != NULL );
}

CScriptManager::~CScriptManager ( )

Definition at line 28 of file ScrMngr.Cpp.

{
   CScript* pScript;
   IDispatch* pDispatch;
   POSITION posNamedItem;
   CString strItemName;

   while( !m_lpScripts.IsEmpty() )
   {
    pScript = m_lpScripts.RemoveHead();
    delete pScript;
   }

   posNamedItem = m_mapNamedItems.GetStartPosition();
   while( posNamedItem != NULL )
   {
    m_mapNamedItems.GetNextAssoc( posNamedItem, strItemName, pDispatch );
    pDispatch->Release();
   }
}

Member Function Documentation

HRESULT CScriptManager::AddNamedItem | ( | LPCTSTR | pszItemName,
 |  | IDispatch * | pDispatch
 | ) |  |

Definition at line 49 of file ScrMngr.Cpp.

{

   POSITION posScript;
   CScript* pScript;
   HRESULT hResult;

   m_mapNamedItems.SetAt( pszItemName, pDispatch );
   pDispatch->AddRef();

   CT2COLE pszItemNameO( pszItemName );
   posScript = GetFirstScriptPosition();
   while( posScript != NULL )
   {
    pScript = GetNextScript( posScript );
    ENSURE( pScript != NULL );
    hResult = pScript->AddNamedItem( pszItemName );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }
   }

   return( S_OK );
}

HRESULT CScriptManager::AddNamedItems ( IActiveScript * pScript )

Definition at line 76 of file ScrMngr.Cpp.

{
   HRESULT hResult;
   POSITION posNamedItem;
   IDispatch* pDispatch;
   CString strItemName;
   BSTR bstrItemName;

   ENSURE( pScript != NULL );

   hResult = pScript->AddNamedItem( L"TCForm", SCRIPTITEM_ISVISIBLE|
    SCRIPTITEM_ISSOURCE );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   posNamedItem = m_mapNamedItems.GetStartPosition();
   while( posNamedItem != NULL )
   {
    m_mapNamedItems.GetNextAssoc( posNamedItem, strItemName, pDispatch );
    bstrItemName = strItemName.AllocSysString();
    hResult = pScript->AddNamedItem( bstrItemName, SCRIPTITEM_ISVISIBLE|
     SCRIPTITEM_ISSOURCE );
    SysFreeString( bstrItemName );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }
   }

   return( S_OK );
}

CScriptManager::DECLARE_DYNAMIC ( CScriptManager ) [private]
CScript * CScriptManager::FindMacro ( LPCTSTR pszMacroName )

Definition at line 110 of file ScrMngr.Cpp.

{
   POSITION posScript;
   CScript* pScript;

   ASSERT( pszMacroName != NULL );

   posScript = GetFirstScriptPosition();
   while( posScript != NULL )
   {
    pScript = GetNextScript( posScript );
    if( pScript->FindMacro( pszMacroName ) )
    {
     return( pScript );
    }
   }

   return( NULL );
}

POSITION CScriptManager::GetFirstScriptPosition ( ) const

Definition at line 130 of file ScrMngr.Cpp.

{
   return( m_lpScripts.GetHeadPosition() );
}

HRESULT CScriptManager::GetItemDispatch | ( | LPCTSTR | pszItemName,
 |  | IUnknown ** | ppDispatch
 | ) |  |

Definition at line 135 of file ScrMngr.Cpp.

{
   IDispatch* pDispatch;
   BOOL tFound;

   ENSURE( pszItemName != NULL );
   ENSURE( ppDispatch != NULL );

   *ppDispatch = NULL;

   if( strcmp( pszItemName, "TCForm" ) == 0 )
   {
    *ppDispatch = m_pDoc->GetIDispatch( TRUE );
    return( S_OK );
   }
   else
   {
    tFound = m_mapNamedItems.Lookup( pszItemName, pDispatch );
    if( tFound )
    {
     *ppDispatch = pDispatch;
     (*ppDispatch)->AddRef();
     return( S_OK );
    }
   }

   return( TYPE_E_ELEMENTNOTFOUND );
}

HRESULT CScriptManager::GetItemTypeInfo | ( | LPCTSTR | pszItemName,
 |  | ITypeInfo ** | ppTypeInfo
 | ) |  |

Definition at line 165 of file ScrMngr.Cpp.

{
   IProvideClassInfoPtr pProvideClassInfo;
   IDispatch* pDispatch;
   HRESULT hResult;
   BOOL tFound;

   ENSURE( pszItemName != NULL );
   ENSURE( ppTypeInfo != NULL );

   *ppTypeInfo = NULL;

   if( strcmp( pszItemName, "TCForm" ) == 0 )
   {
    hResult = m_pDoc->GetTypeInfoOfGuid( GetUserDefaultLCID(),
     __uuidof( Document ), ppTypeInfo );
    if( SUCCEEDED( hResult ) )
    {
     return( S_OK );
    }
   }
   else
   {
    tFound = m_mapNamedItems.Lookup( pszItemName, pDispatch );
    if( tFound )
    {
     pProvideClassInfo = pDispatch;
     if( pProvideClassInfo != NULL )
     {
      hResult = pProvideClassInfo->GetClassInfo( ppTypeInfo );
      if( SUCCEEDED( hResult ) )
      {
         return( S_OK );
      }
     }
    }
   }

   return( TYPE_E_ELEMENTNOTFOUND );
}

CScript * CScriptManager::GetNextScript ( POSITION & posScript )

Definition at line 207 of file ScrMngr.Cpp.

{
   return( m_lpScripts.GetNext( posScript ) );
}

int CScriptManager::GetNumScripts ( ) const

Definition at line 212 of file ScrMngr.Cpp.

{
   return( (int)m_lpScripts.GetCount() );
}

HRESULT CScriptManager::LoadScript | ( | LPCTSTR | pszFileName,
 |  | LPCTSTR | pszScriptName,
 |  | CScript ** | ppScript = NULL
 | ) |  |

Definition at line 217 of file ScrMngr.Cpp.

{
   CScript* pScript;
   HRESULT hResult;
   POSITION posScript;

   ASSERT( pszFileName != NULL );
   ASSERT( pszScriptName != NULL );

   if( ppScript != NULL )
   {
    *ppScript = NULL;
   }

   pScript = new CScript( this );
   if( pScript == NULL )
   {
    return( E_OUTOFMEMORY );
   }

   posScript = m_lpScripts.AddHead( pScript );

   hResult = pScript->LoadScript( pszFileName, pszScriptName );
   if( FAILED( hResult ) )
   {
    m_lpScripts.RemoveAt( posScript );
    delete pScript;
    return( hResult );
   }

   if( ppScript != NULL )
   {
    *ppScript = pScript;
   }

   return( S_OK );
}

Member Data Documentation

CTypedPtrList< CObList, CScript* > CScriptManager::m_lpScripts [protected]

Definition at line 35 of file ScrMngr.H.

CTypedPtrMap< CMapStringToPtr, CString, IDispatch* > CScriptManager::m_mapNamedItems [protected]

Definition at line 36 of file ScrMngr.H.

CTestContainer98Doc* CScriptManager::m_pDoc [protected]

Definition at line 34 of file ScrMngr.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/ScrMngr.H
  • ole/TstCon/ScrMngr.Cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSearchBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSearchBox Class Reference

#include "searchbx.h"

List of all members.

Public Member Functions

CSearchBox ()
virtual | ~CSearchBox ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Detailed Description

Definition at line 15 of file searchbx.h.

Constructor & Destructor Documentation

CSearchBox::CSearchBox ( )

Definition at line 24 of file searchbx.cpp.

{
}

CSearchBox::~CSearchBox ( ) [virtual]

Definition at line 28 of file searchbx.cpp.

{
}

Member Function Documentation

BOOL CSearchBox::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 41 of file searchbx.cpp.

{
  if ((pMsg->message != WM_KEYDOWN) || (pMsg->wParam != VK_RETURN))
    return CComboBox::PreTranslateMessage(pMsg);

  // when the enter key is hit in the ComboBox we want to add the string
  // to the top of the list and hilight it.  We also want to limit the
  // list to the last 15 entries.
  if ((pMsg->lParam & 0x40000000) == 0)   // Not a repeat.
  {
    CString strText;
    GetWindowText(strText);
    InsertString(0, strText);
    SetCurSel(0);
    if (GetCount() > 15)
      DeleteString(GetCount()-1);
  }
  return TRUE;
}

The documentation for this class was generated from the following files:
  • general/docktool/searchbx.h
  • general/docktool/searchbx.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSelectTool Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSelectTool Class Reference

#include "drawtool.h"

Inherits CDrawTool, and CDrawTool.

List of all members.

Public Member Functions

CSelectTool ()
CSelectTool ()
virtual void | OnEditProperties (CDrawView *pView)
virtual void | OnEditProperties (CDrawView *pView)
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDblClk (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonDown (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnLButtonUp (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)
virtual void | OnMouseMove (CDrawView *pView, UINT nFlags, const CPoint &point)

Detailed Description

Definition at line 55 of file drawtool.h.

Constructor & Destructor Documentation

CSelectTool::CSelectTool ( )

Definition at line 115 of file drawtool.cpp.

  : CDrawTool(selection)
{
}

CSelectTool::CSelectTool ( )

Member Function Documentation

void CSelectTool::OnEditProperties ( CDrawView * pView ) [virtual]

Reimplemented from CDrawTool.

Definition at line 194 of file drawtool.cpp.

{
  if (pView->m_selection.GetCount() == 1)
    pView->m_selection.GetHead()->OnEditProperties();
}

virtual void CSelectTool::OnEditProperties ( CDrawView * pView ) [virtual]

Reimplemented from CDrawTool.

void CSelectTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 173 of file drawtool.cpp.

{
  if ((nFlags & MK_SHIFT) != 0)
  {
    // Shift+DblClk deselects object...
    CPoint local = point;
    pView->ClientToDoc(local);
    CDrawObj* pObj = pView->GetDocument()->ObjectAt(local);
    if (pObj != NULL)
      pView->Deselect(pObj);
  }
  else
  {
    // "Normal" DblClk opens properties, or OLE server...
    if (pView->m_selection.GetCount() == 1)
      pView->m_selection.GetHead()->OnOpen(pView);
  }

  CDrawTool::OnLButtonDblClk(pView, nFlags, point);
}

virtual void CSelectTool::OnLButtonDblClk | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

void CSelectTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 120 of file drawtool.cpp.

{
  CPoint local = point;
  pView->ClientToDoc(local);

  CDrawObj* pObj;
  selectMode = none;

  // Check for resizing (only allowed on single selections)
  if (pView->m_selection.GetCount() == 1)
  {
    pObj = pView->m_selection.GetHead();
    nDragHandle = pObj->HitTest(local, pView, TRUE);
    if (nDragHandle != 0)
      selectMode = size;
  }

  // See if the click was on an object, select and start move if so
  if (selectMode == none)
  {
    pObj = pView->GetDocument()->ObjectAt(local);

    if (pObj != NULL)
    {
      selectMode = move;

      if (!pView->IsSelected(pObj))
        pView->Select(pObj, (nFlags & MK_SHIFT) != 0);

      // Ctrl+Click clones the selection...
      if ((nFlags & MK_CONTROL) != 0)
        pView->CloneSelection();
    }
  }

  // Click on background, start a net-selection
  if (selectMode == none)
  {
    if ((nFlags & MK_SHIFT) == 0)
      pView->Select(NULL);

    selectMode = netSelect;

    CClientDC dc(pView);
    CRect rect(point.x, point.y, point.x, point.y);
    rect.NormalizeRect();
    dc.DrawFocusRect(rect);
  }

  lastPoint = local;
  CDrawTool::OnLButtonDown(pView, nFlags, point);
}

virtual void CSelectTool::OnLButtonDown | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

virtual void CSelectTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

void CSelectTool::OnLButtonUp | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 200 of file drawtool.cpp.

{
  if (pView->GetCapture() == pView)
  {
    if (selectMode == netSelect)
    {
      CClientDC dc(pView);
      CRect rect(c_down.x, c_down.y, c_last.x, c_last.y);
      rect.NormalizeRect();
      dc.DrawFocusRect(rect);

      pView->SelectWithinRect(rect, TRUE);
    }
    else if (selectMode != none)
    {
      pView->GetDocument()->UpdateAllViews(pView);
    }
  }

  CDrawTool::OnLButtonUp(pView, nFlags, point);
}

void CSelectTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

Definition at line 222 of file drawtool.cpp.

{
  if (pView->GetCapture() != pView)
  {
    if (c_drawShape == selection && pView->m_selection.GetCount() == 1)
    {
      CDrawObj* pObj = pView->m_selection.GetHead();
      CPoint local = point;
      pView->ClientToDoc(local);
      int nHandle = pObj->HitTest(local, pView, TRUE);
      if (nHandle != 0)
      {
        SetCursor(pObj->GetHandleCursor(nHandle));
        return; // bypass CDrawTool
      }
    }
    if (c_drawShape == selection)
      CDrawTool::OnMouseMove(pView, nFlags, point);
    return;
  }

  if (selectMode == netSelect)
  {
    CClientDC dc(pView);
    CRect rect(c_down.x, c_down.y, c_last.x, c_last.y);
    rect.NormalizeRect();
    dc.DrawFocusRect(rect);
    rect.SetRect(c_down.x, c_down.y, point.x, point.y);
    rect.NormalizeRect();
    dc.DrawFocusRect(rect);

    CDrawTool::OnMouseMove(pView, nFlags, point);
    return;
  }

  CPoint local = point;
  pView->ClientToDoc(local);
  CPoint delta = (CPoint)(local - lastPoint);

  POSITION pos = pView->m_selection.GetHeadPosition();
  while (pos != NULL)
  {
    CDrawObj* pObj = pView->m_selection.GetNext(pos);
    CRect position = pObj->m_position;

    if (selectMode == move)
    {
      position += delta;
      pObj->MoveTo(position, pView);
    }
    else if (nDragHandle != 0)
    {
      pObj->MoveHandleTo(nDragHandle, local, pView);
    }
  }

  lastPoint = local;

  if (selectMode == size && c_drawShape == selection)
  {
    c_last = point;
    SetCursor(pView->m_selection.GetHead()->GetHandleCursor(nDragHandle));
    return; // bypass CDrawTool
  }

  c_last = point;

  if (c_drawShape == selection)
    CDrawTool::OnMouseMove(pView, nFlags, point);
}

virtual void CSelectTool::OnMouseMove | ( | CDrawView * | pView,
 |  | UINT | nFlags,
 |  | const CPoint & | point |
 | ) |  |  | [virtual]

Reimplemented from CDrawTool.

The documentation for this class was generated from the following files:
  • ole/drawcli/drawtool.h
  • vc2008fp/DrawClient/drawtool.h
  • ole/drawcli/drawtool.cpp
  • vc2008fp/DrawClient/drawtool.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CServerApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CServerApp Class Reference

#include "hiersvr.h"

List of all members.

Public Member Functions

CServerApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()

Protected Member Functions

afx_msg void | OnAppAbout ()

Protected Attributes

COleTemplateServer | m_server

Detailed Description

Definition at line 24 of file hiersvr.h.

Constructor & Destructor Documentation

CServerApp::CServerApp ( )

Definition at line 42 of file hiersvr.cpp.

{
    EnableHtmlHelp();
}

Member Function Documentation

int CServerApp::ExitInstance ( ) [virtual]

Definition at line 153 of file hiersvr.cpp.

{
  return CWinApp::ExitInstance();
}

BOOL CServerApp::InitInstance ( ) [virtual]

Definition at line 83 of file hiersvr.cpp.

{
#ifdef _DEBUG
  // turn on extra memory tracking
  afxMemDF |= checkAlwaysMemDF;
#endif

  // OLE 2.0 initialization
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_AFXOLEINIT_FAILED);
    return FALSE;
  }

  // Standard initialization
  LoadStdProfileSettings();

  // Register document templates
  CDocTemplate* pDocTemplate;
  pDocTemplate = new CHierSvrDocTemplate;
  pDocTemplate->SetServerInfo(
    IDR_HIERSVRTYPE_SRVR_EMB, IDR_HIERSVRTYPE_SRVR_IP,
    RUNTIME_CLASS(CInPlaceFrame), RUNTIME_CLASS(CServerView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // enable file manager drag/drop and DDE Execute open
  m_pMainWnd->DragAcceptFiles();
  EnableShellOpen();

  // connect the COleTemplate server to the document template
  m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
  COleTemplateServer::RegisterAll();
    // Note: MDI applications register all class objects regardless of
    //  the /Embedding on the command line.

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // try to launch as an OLE server
  if (cmdInfo.m_bRunEmbedded)
  {
    // application was run with /Embedding flag.  Instead of showing
    //  the window, the application waits to receive OLE requests.
    return TRUE;
  }

  m_server.UpdateRegistry();
  RegisterShellFileTypes(TRUE);
  COleObjectFactory::UpdateRegistryAll();

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CServerApp::OnAppAbout ( ) [protected]

Definition at line 198 of file hiersvr.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

Member Data Documentation

COleTemplateServer CServerApp::m_server [protected]

Definition at line 35 of file hiersvr.h.

The documentation for this class was generated from the following files:
  • ole/hiersvr/hiersvr.h
  • ole/hiersvr/hiersvr.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CServerDC Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CServerDC Class Reference

#include "svrview.h"

List of all members.

Public Member Functions

CServerDC (CServerView *pView)
~CServerDC ()

Private Attributes

CFont | font
CFont * | pOldFont

Detailed Description

Definition at line 128 of file svrview.h.

Constructor & Destructor Documentation

CServerDC::CServerDC ( CServerView * pView )

Definition at line 1019 of file svrview.cpp.

                                       : CClientDC(pView)
{
  pView->OnPrepareDC(this);
  pOldFont = pView->GetDocument()->SelectDocFont(this, font);
}

CServerDC::~CServerDC ( )

Definition at line 1025 of file svrview.cpp.

{
  if (pOldFont != NULL)
    SelectObject(pOldFont);
}

Member Data Documentation

CFont CServerDC::font [private]

Definition at line 130 of file svrview.h.

CFont* CServerDC::pOldFont [private]

Definition at line 131 of file svrview.h.

The documentation for this class was generated from the following files:
  • ole/hiersvr/svrview.h
  • ole/hiersvr/svrview.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CServerDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions

CServerDoc Class Reference

#include "svrdoc.h"

List of all members.

Public Member Functions

virtual | ~CServerDoc ()
void | CalcBounding (CDC *pDC, CServerNode *pItemStart, CPoint ptStart, CSize &sizeMax)
virtual void | DeleteContents ()
int | DrawTree (CDC *pDC, CPoint ptStart, CServerNode *pItemSel, CServerNode *pRoot=NULL)
virtual COleServerItem * | OnGetEmbeddedItem ()
virtual COleServerItem * | OnGetLinkedItem (LPCTSTR lpszItemName)
virtual void | OnSetItemRects (LPCRECT lpPosRect, LPCRECT lpClipRect)
CFont * | SelectDocFont (CDC *pDC, CFont &font)
virtual void | Serialize (CArchive &ar)
void | SerializeFontInfo (CArchive &ar)

Public Attributes

COLORREF | m_crText
LOGFONT | m_logfont
CServerNode * m_pRoot

Static Public Attributes

static CLIPFORMAT NEAR | m_cfPrivate = NULL

Protected Member Functions

CServerDoc ()
afx_msg void | OnCancelInplace ()
virtual BOOL | OnNewDocument ()
afx_msg void | OnOptionsFont ()

Detailed Description

Definition at line 16 of file svrdoc.h.

Constructor & Destructor Documentation

CServerDoc::CServerDoc ( ) [protected]

Definition at line 42 of file svrdoc.cpp.

{
  m_pRoot = CServerNode::CreateRootNode(this);

  // determine default font for document
  memset(&m_logfont, 0, sizeof m_logfont);
  m_logfont.lfHeight = -10;
  _tcscpy_s(m_logfont.lfFaceName, LF_FACESIZE, _T("Arial"));
  m_logfont.lfOutPrecision = OUT_TT_PRECIS;
  m_logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
  m_logfont.lfQuality = PROOF_QUALITY;
  m_logfont.lfPitchAndFamily = FF_SWISS | VARIABLE_PITCH;

  // use default window text color
  m_crText = COLOR_WINDOWTEXT+1;

  if (m_cfPrivate == NULL)
  {
    m_cfPrivate = (CLIPFORMAT)
      ::RegisterClipboardFormat(_T("MFC HierSvr Sample"));
  }
}

CServerDoc::~CServerDoc ( ) [virtual]

Definition at line 65 of file svrdoc.cpp.

{
  delete m_pRoot;     // delete kills child nodes
}

Member Function Documentation

void CServerDoc::CalcBounding | ( | CDC * | pDC,
 |  | CServerNode * | pItemStart,
 |  | CPoint | ptStart,
 |  | CSize & | sizeMax
 | ) |  |

Definition at line 163 of file svrdoc.cpp.

{
  ASSERT_VALID(pNodeStart);

  // select correct font for the document
  CFont font;
  CFont* pOldFont = SelectDocFont(pDC, font);

  // calculate the bounding rect
  pNodeStart->CalcBounding(pDC, ptStart, sizeMax);

  // restore state of the dc
  if (pOldFont != NULL)
    pDC->SelectObject(pOldFont);
}

void CServerDoc::DeleteContents ( ) [virtual]

Definition at line 70 of file svrdoc.cpp.

{
  COleServerDoc::DeleteContents();

  if (m_pRoot != NULL)
    m_pRoot->InitRootNode();
}

int CServerDoc::DrawTree | ( | CDC * | pDC,
 |  | CPoint | ptStart,
 |  | CServerNode * | pItemSel,
 |  | CServerNode * | pRoot = NULL
 | ) |  |

Definition at line 144 of file svrdoc.cpp.

{
  if (pRoot == NULL)
    pRoot = m_pRoot;
  // select correct font for the document
  CFont font;
  CFont* pOldFont = SelectDocFont(pDC, font);
  if (pOldFont == NULL)
    return -1;

  // draw the hierachy list
  int iResult = pRoot->DrawTree(pDC, ptStart, pNodeSel);

  // restore state of the dc
  pDC->SelectObject(pOldFont);
  return iResult;
}

void CServerDoc::OnCancelInplace ( ) [protected]

Definition at line 263 of file svrdoc.cpp.

{
  if (IsInPlaceActive())
    OnDeactivateUI(FALSE);
}

COleServerItem * CServerDoc::OnGetEmbeddedItem ( ) [virtual]

Definition at line 87 of file svrdoc.cpp.

{
  ASSERT_VALID(m_pRoot);

  // allocate embedded item first time requested
  if (m_pRoot->m_pServerItem == NULL)
    m_pRoot->m_pServerItem = new CServerItem(this, m_pRoot);

  // and return it
  ASSERT_VALID(m_pRoot->m_pServerItem);
  return m_pRoot->m_pServerItem;
}

COleServerItem * CServerDoc::OnGetLinkedItem ( LPCTSTR lpszItemName ) [virtual]

Definition at line 100 of file svrdoc.cpp.

{
  ASSERT_VALID(m_pRoot);

  // look in current list first
  COleServerItem* pItem = COleServerDoc::OnGetLinkedItem(lpszItemName);
  if (pItem != NULL)
    return pItem;

  // look in document itself for an item with that link name
  CString strItemName = lpszItemName;
  CServerNode* pNode = m_pRoot->FindNode(strItemName);
  if (pNode == NULL)
    return NULL;    // node does not exist

  ASSERT(pNode->m_pServerItem == NULL);   // should not be connected
  pItem = new CServerItem(this, pNode);
  ASSERT_VALID(pItem);

  // return new item that matches lpszItemName
  return pItem;
}

BOOL CServerDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 78 of file svrdoc.cpp.

{
  if (!COleServerDoc::OnNewDocument())
    return FALSE;

  // Note: m_pRoot is created in the constructor
  return (m_pRoot != NULL);
}

void CServerDoc::OnOptionsFont ( ) [protected]

Definition at line 242 of file svrdoc.cpp.

{
  CClientDC dc(NULL);
  LOGFONT lf = m_logfont;
  lf.lfHeight = -::MulDiv(-lf.lfHeight, dc.GetDeviceCaps(LOGPIXELSY), 72);
  CFontDialog dlg(&lf);
  dlg.m_cf.rgbColors = m_crText;
  if (dlg.DoModal() == IDOK)
  {
    lf.lfHeight = -::MulDiv(-lf.lfHeight, 72, dc.GetDeviceCaps(LOGPIXELSY));
    m_crText = dlg.GetColor();
    m_logfont = lf;
    SetModifiedFlag();
    UpdateAllItems(NULL);
    UpdateAllViews(NULL);
  }
}

void CServerDoc::OnSetItemRects | ( | LPCRECT | lpPosRect,
 |  | LPCRECT | lpClipRect |
 | ) |  |  | [virtual]

Definition at line 214 of file svrdoc.cpp.

{
  // get first view of document
  POSITION pos = GetFirstViewPosition();
  ASSERT(pos != NULL);
  CServerView* pView = (CServerView*)GetNextView(pos);
  ASSERT_KINDOF(CServerView, pView);
  ASSERT_VALID(pView);

  CSize sizeNum(lpPosRect->right - lpPosRect->left,
    lpPosRect->bottom - lpPosRect->top);
  // for denom -- get extent in device
  // create a view dc
  CServerDC dc(pView);
  // set zoom to 100%
  dc.SetViewportExt(CSize(1,1));
  dc.SetWindowExt(CSize(1,1));
  // get extents in device
  CSize sizeDenom = pView->CalcActualItemSize(m_pRoot, &dc);

  // notify first view of potential zoom factor change!
  pView->SetZoomFactor(sizeNum, sizeDenom);
  // resize the window
  COleServerDoc::OnSetItemRects(lpPosRect, lpClipRect);
  // set scrollbar state (if necessary)
  pView->SetScrollInfo();
}

CFont * CServerDoc::SelectDocFont | ( | CDC * | pDC,
 |  | CFont & | font
 | ) |  |

Definition at line 123 of file svrdoc.cpp.

{
  // convert points in m_logfont.lfHeight to logical
  LOGFONT logfont = m_logfont;
  logfont.lfHeight = -::MulDiv(-logfont.lfHeight,
    pDC->GetDeviceCaps(LOGPIXELSY), 72);

  // set the text color as appropriate
  COLORREF cr = m_crText;
  if (cr == COLOR_WINDOW+1)
    cr = GetSysColor(COLOR_WINDOW);
  pDC->SetTextColor(m_crText);

  // create the font object
  if (!font.CreateFontIndirect(&logfont))
    return NULL;

  // select the font
  return pDC->SelectObject(&font);
}

void CServerDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 184 of file svrdoc.cpp.

{
  ASSERT(m_pRoot != NULL);
  SerializeFontInfo(ar);
  m_pRoot->Serialize(ar);
}

void CServerDoc::SerializeFontInfo ( CArchive & ar )

Definition at line 191 of file svrdoc.cpp.

{
  if (ar.IsStoring())
  {
    ar.Write(&m_logfont, sizeof(m_logfont) - sizeof(m_logfont.lfFaceName));
    // lfFaceName is stored as CString so it is UNICODE/ANSI independent
    ar << CString(m_logfont.lfFaceName);
    ar << m_crText;
  }
  else
  {
    ar.Read(&m_logfont, sizeof(m_logfont) - sizeof(m_logfont.lfFaceName));
    // lfFaceName must be read as a CString
    CString strFaceName;
    ar >> strFaceName;
    _tcscpy_s(m_logfont.lfFaceName, LF_FACESIZE, strFaceName);
    ar >> m_crText;
  }
}

Member Data Documentation

CLIPFORMAT NEAR CServerDoc::m_cfPrivate = NULL [static]

Definition at line 29 of file svrdoc.h.

COLORREF CServerDoc::m_crText

Definition at line 25 of file svrdoc.h.

LOGFONT CServerDoc::m_logfont

Definition at line 24 of file svrdoc.h.

CServerNode* CServerDoc::m_pRoot

Definition at line 26 of file svrdoc.h.

The documentation for this class was generated from the following files:
  • ole/hiersvr/svrdoc.h
  • ole/hiersvr/svrdoc.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CServerItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

CServerItem Class Reference

#include "svritem.h"

List of all members.

Public Member Functions

CServerItem (CServerDoc *pDoc, CServerNode *pNode)
~CServerItem ()
CServerDoc * | GetDocument () const

Public Attributes

CServerNode * m_pServerNode

Protected Member Functions

void | GetNativeClipboardData (COleDataSource *pDataSource)
virtual BOOL | OnDraw (CDC *pDC, CSize &rSize)
virtual COleDataSource * | OnGetClipboardData (BOOL bIncludeLink, LPPOINT pptOffset, LPSIZE pSize)
virtual BOOL | OnGetExtent (DVASPECT dwDrawAspect, CSize &rSize)
virtual void | OnOpen ()
virtual BOOL | OnRenderFileData (LPFORMATETC lpFormatEtc, CFile *pFile)
virtual void | Serialize (CArchive &ar)

Friends

class | CServerNode

Detailed Description

Definition at line 103 of file svritem.h.

Constructor & Destructor Documentation

CServerItem::CServerItem | ( | CServerDoc * | pDoc,
 |  | CServerNode * | pNode
 | ) |  |

Definition at line 662 of file svritem.cpp.

  : COleServerItem(pServerDoc, TRUE)
{
  // need to attach this server item to the node in the document
  ASSERT_VALID(pServerNode);
  m_pServerNode = pServerNode;
  pServerNode->m_pServerItem = this;
  pServerNode->UpdateItemName();

  // support CF_TEXT format
  GetDataSource()->DelayRenderFileData(CF_TEXT);
}

CServerItem::~CServerItem ( )

Definition at line 675 of file svritem.cpp.

{
  if (m_pServerNode != NULL)
  {
    m_pServerNode->m_pServerItem = NULL;
    m_pServerNode->m_strLinkKey = GetItemName();
    m_pServerNode->UpdateItemName();
  }
}

Member Function Documentation

CServerDoc* CServerItem::GetDocument ( ) const [inline]

Definition at line 112 of file svritem.h.

    { return (CServerDoc*)COleServerItem::GetDocument(); }

void CServerItem::GetNativeClipboardData ( COleDataSource * pDataSource ) [protected]

Definition at line 818 of file svritem.cpp.

{
  ASSERT_VALID(this);
  ASSERT(CServerDoc::m_cfPrivate != NULL);

  // Create a shared file and associate a CArchive with it
  CSharedFile file;
  CArchive ar(&file,CArchive::store);

  // Serialize selected objects to the archive
  m_pServerNode->Serialize(ar);
  ar.Close();

  // put on local format instead of or in addation to
  pDataSource->CacheGlobalData(CServerDoc::m_cfPrivate,file.Detach());
}

BOOL CServerItem::OnDraw | ( | CDC * | pDC,
 |  | CSize & | rSize |
 | ) |  |  | [protected, virtual]

Definition at line 730 of file svritem.cpp.

{
  if (m_pServerNode != NULL)
  {
    // determine extent of this item in the document
    CServerDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);
    rSize = CSize(0, 0);
    CPoint ptStart(CX_MARGIN, CY_MARGIN);
    pDoc->CalcBounding(pDC, m_pServerNode, ptStart, rSize);
    rSize.cx += CX_MARGIN;

    // prepare to draw and remember the extent in himetric units
    pDC->SetWindowOrg(0, 0);
    pDC->SetWindowExt(rSize);
    pDC->SetViewportExt(rSize);  // Note: only affects the m_hAttribDC

    pDC->LPtoHIMETRIC(&rSize);   // convert pixels to HIMETRIC

    // CServerDoc::DrawTree selects and releases font automatically
    pDoc->DrawTree(pDC, ptStart, NULL, m_pServerNode);
  }
  return TRUE;
}

COleDataSource * CServerItem::OnGetClipboardData | ( | BOOL | bIncludeLink,
 |  | LPPOINT | pptOffset,
 |  | LPSIZE | pSize |
 | ) |  |  | [protected, virtual]

Definition at line 793 of file svritem.cpp.

{
  ASSERT_VALID(this);

  if (m_pServerNode == NULL)
    return NULL;

  COleDataSource* pDataSource = new COleDataSource;
  TRY
  {
    GetNativeClipboardData(pDataSource);
    GetClipboardData(pDataSource, bIncludeLink, pptOffset, pSize);
  }
  CATCH_ALL(e)
  {
    delete pDataSource;
    THROW_LAST();
  }
  END_CATCH_ALL

  ASSERT_VALID(pDataSource);
  return pDataSource;
}

BOOL CServerItem::OnGetExtent | ( | DVASPECT | dwDrawAspect,
 |  | CSize & | rSize |
 | ) |  |  | [protected, virtual]

Definition at line 709 of file svritem.cpp.

{
  if (dwDrawAspect != DVASPECT_CONTENT)
    return COleServerItem::OnGetExtent(dwDrawAspect, rSize);

  // determine extent based on screen dc
  rSize = CSize(0, 0);
  if (m_pServerNode != NULL)
  {
    CClientDC dc(NULL);
    dc.SetMapMode(MM_ANISOTROPIC);
    CServerDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);
    CPoint ptStart(CX_MARGIN, CY_MARGIN);
    pDoc->CalcBounding(&dc, m_pServerNode, ptStart, rSize);
    rSize.cx += CX_MARGIN;
    dc.LPtoHIMETRIC(&rSize); // convert pixels to HIMETRIC
  }
  return TRUE;
}

void CServerItem::OnOpen ( ) [protected, virtual]

Definition at line 688 of file svritem.cpp.

{
  if (IsLinkedItem() && m_pServerNode != NULL)
  {
    // for linked items, try to select this node in the document
    CServerDoc* pDoc = GetDocument();
    ASSERT(pDoc != NULL);
    POSITION pos = pDoc->GetFirstViewPosition();
    ASSERT(pos != NULL);
    CServerView* pView = (CServerView*)pDoc->GetNextView(pos);
    ASSERT_KINDOF(CServerView, pView);

    pView->SetSelection(m_pServerNode);
    pView->ScrollToItem(m_pServerNode, TRUE);
  }
  COleServerItem::OnOpen();
}

BOOL CServerItem::OnRenderFileData | ( | LPFORMATETC | lpFormatEtc,
 |  | CFile * | pFile |
 | ) |  |  | [protected, virtual]

Definition at line 770 of file svritem.cpp.

{
  ENSURE(lpFormatEtc != NULL);
  if (lpFormatEtc->cfFormat != CF_TEXT)
    return COleServerItem::OnRenderFileData(lpFormatEtc, pFile);

  BOOL bResult = FALSE;
  if (m_pServerNode != NULL)
  {
    TRY
    {
      // save as text
      CArchive ar(pFile, CArchive::store);
      m_pServerNode->SaveAsText(ar, 0);
      ar << (BYTE)'\0';   // terminate with NUL character
      bResult = TRUE;
    }
    END_TRY
  }
  return bResult;
}

void CServerItem::Serialize ( CArchive & ar ) [protected, virtual]

Definition at line 758 of file svritem.cpp.

{
  // serialize font info from document (so it looks like a document)
  CServerDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
  pDoc->SerializeFontInfo(ar);

  // serialize node info
  ASSERT_VALID(m_pServerNode);
  m_pServerNode->Serialize(ar);
}

Friends And Related Function Documentation

friend class CServerNode [friend]

Definition at line 135 of file svritem.h.

Member Data Documentation

CServerNode* CServerItem::m_pServerNode

Definition at line 110 of file svritem.h.

The documentation for this class was generated from the following files:
  • ole/hiersvr/svritem.h
  • ole/hiersvr/svritem.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CServerNode Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Friends

CServerNode Class Reference

#include "svritem.h"

List of all members.

Public Types

enum | EShape { shapeRect, shapeRound, shapeOval, shapeMax }

Public Member Functions

CServerNode (CServerDoc *pServerDoc=NULL)
~CServerNode ()
void | CalcBounding (CDC *pDC, CPoint &ptStart, CSize &sizeMax)
void | CalcNodeSize (CDC *pDC, CSize &sizeNode)
CServerNode * | CreateChildNode (LPCTSTR lpszDescription)
void | DeleteChildNodes ()
BOOL | Draw (CDC *pDC, CPoint pt, BOOL bSelected, CSize sizeNode)
int | DrawTree (CDC *pDC, CPoint ptStart, CServerNode *pItemSel)
BOOL | FindAndDelete (CServerNode *pItem)
CServerNode * | FindNode (LPCTSTR pszItemName)
CServerDoc * | GetDocument () const
const CString & | GetItemName ()
CServerNode * | GetNext (CServerNode *pItem, BOOL bInit=TRUE)
int | GetPopupMenuIndex ()
CServerNode * | GetPrev (CServerNode *pItem, BOOL bInit=TRUE)
BOOL | HasChildren () const
void | InitRootNode ()
BOOL | IsChild (const CServerNode *pPotentialChild) const
BOOL | PromptChangeNode ()
CServerNode * PromptNewChildNode ()
virtual void | Serialize (CArchive &ar)
void | UpdateItemName ()

Static Public Member Functions

static CServerNode * | CreateRootNode (CServerDoc *pDoc)

Public Attributes

BOOL | m_bHideChildren
CObList | m_listChild
CServerDoc * m_pDocument
CServerItem * m_pServerItem
enum CServerNode::EShape | m_shape
CString | m_strDescription
CString | m_strLinkKey

Protected Member Functions

void | SaveAsText (CArchive &ar, int nLevel)

Private Member Functions

DECLARE_SERIAL (CServerNode)

Friends

class | CServerItem

Detailed Description

Definition at line 26 of file svritem.h.

Member Enumeration Documentation

enum CServerNode::EShape
Enumerator:
shapeRect
shapeRound
shapeOval
shapeMax

Definition at line 48 of file svritem.h.

  {
    shapeRect,
    shapeRound,
    shapeOval,
    shapeMax
  } m_shape;      // shape to draw

Constructor & Destructor Documentation

CServerNode::CServerNode ( CServerDoc * pServerDoc = NULL )

Definition at line 90 of file svritem.cpp.

{
  m_shape = shapeRect;
  m_bHideChildren = FALSE;
  m_pDocument = pServerDoc;

  m_pServerItem = NULL;   // will get connected if need be
}

CServerNode::~CServerNode ( )

Definition at line 177 of file svritem.cpp.

{
  // if we are the root of a document, clear it
  if (GetDocument()->m_pRoot == this)
    GetDocument()->m_pRoot = NULL;

  // if we are attached to a server item, detach from it
  if (m_pServerItem != NULL)
  {
    CServerItem* pItem = m_pServerItem;
    m_pServerItem = NULL;
    delete pItem;
  }

  // delete all of the child nodes of this node
  DeleteChildNodes();
}

Member Function Documentation

void CServerNode::CalcBounding | ( | CDC * | pDC,
 |  | CPoint & | ptStart,
 |  | CSize & | sizeMax
 | ) |  |

Definition at line 225 of file svritem.cpp.

{
  ASSERT(sizeMax.cx >= 0 && sizeMax.cy >= 0);
  ASSERT(ptStart.x >= 0 && ptStart.y >= 0);

  CSize sizeNode;
  CalcNodeSize(pDC, sizeNode);

  ptStart.y += sizeNode.cy + CY_SEPARATOR;
  if (ptStart.y > sizeMax.cy)
    sizeMax.cy = ptStart.y;

  if (ptStart.x + sizeNode.cx > sizeMax.cx)
    sizeMax.cx = ptStart.x + sizeNode.cx;
  ptStart.x += CX_INDENT;
  // add in the kids
  if (!m_bHideChildren)
  {
    POSITION pos = m_listChild.GetHeadPosition();
    while (pos != NULL)
    {
      CServerNode* pNode = (CServerNode*)m_listChild.GetNext(pos);
      pNode->CalcBounding(pDC, ptStart, sizeMax);
    }
  }
  ptStart.x -= CX_INDENT;
}

void CServerNode::CalcNodeSize | ( | CDC * | pDC,
 |  | CSize & | sizeNode
 | ) |  |

Definition at line 217 of file svritem.cpp.

{
  ENSURE(pDC != NULL);
  sizeNode = pDC->GetTextExtent(m_strDescription, m_strDescription.GetLength());
  sizeNode += CSize(CX_INSET * 2, CY_INSET * 2);
}

CServerNode * CServerNode::CreateChildNode ( LPCTSTR lpszDescription )

Definition at line 480 of file svritem.cpp.

{
  CServerNode* pNew = NULL;
  TRY
  {
    pNew = new CServerNode(GetDocument());
    pNew->m_strDescription = lpszDescription;
      // both item name and description start out the same

    // add as the last child
    m_listChild.AddTail(pNew);
  }
  CATCH (CException, e)
  {
    delete pNew;
    pNew = NULL;
  }
  END_CATCH

  return pNew;
}

CServerNode * CServerNode::CreateRootNode ( CServerDoc * pDoc ) [static]

Definition at line 100 of file svritem.cpp.

{
  CServerNode* pRoot = NULL;
  TRY
  {
    pRoot = new CServerNode(pDoc);
    pRoot->InitRootNode();
  }
  CATCH(CException, e)
  {
    delete pRoot;
    pRoot = NULL;
  }
  END_CATCH

  return pRoot;
}

CServerNode::DECLARE_SERIAL ( CServerNode ) [private]
void CServerNode::DeleteChildNodes ( )

Definition at line 168 of file svritem.cpp.

{
  // delete child nodes
  POSITION pos = m_listChild.GetHeadPosition();
  while (pos != NULL)
    delete m_listChild.GetNext(pos);
  m_listChild.RemoveAll();
}

BOOL CServerNode::Draw | ( | CDC * | pDC,
 |  | CPoint | pt,
 |  | BOOL | bSelected,
 |  | CSize | sizeNode
 | ) |  |

Definition at line 256 of file svritem.cpp.

{
  CRect rect(pt, sizeNode);
  if (!pDC->RectVisible(&rect))
    return TRUE;

  // draw a the bounding shape
  BOOL bOK = TRUE;

  CPen* pOldPen = NULL;
  CPen penHilite;
  int nPenStyle = (m_bHideChildren) ? PS_DASH : PS_SOLID;
  COLORREF crPen = (bSelected) ? RGB(255,0,0) : RGB(0,0,0);
  if (penHilite.CreatePen(nPenStyle, 0, crPen))
    pOldPen = pDC->SelectObject(&penHilite);

  switch (m_shape)
  {
  case shapeRect:
    bOK = pDC->Rectangle(rect);
    break;
  case shapeRound:
    bOK = pDC->RoundRect(rect, CPoint(7, 7));
    break;
  case shapeOval: // really just a rounder rounded rect
    bOK = pDC->RoundRect(rect, CPoint(14, 14));
    break;
  default:
    TRACE1("Error: unknown shape %d\n", m_shape);
    bOK = FALSE;
    break;
  }
  if (pOldPen != NULL)
    pDC->SelectObject(pOldPen);

  if (!bOK)
    return FALSE;

  // inset a bit
  rect.InflateRect(-CX_INSET, -CY_INSET);

  if (!pDC->ExtTextOut(rect.left, rect.top, ETO_OPAQUE, rect,
    m_strDescription, m_strDescription.GetLength(), NULL))
    return FALSE;

  // all OK
  return TRUE;
}

int CServerNode::DrawTree | ( | CDC * | pDC,
 |  | CPoint | ptStart,
 |  | CServerNode * | pItemSel
 | ) |  |

Definition at line 305 of file svritem.cpp.

{
  ENSURE(pDC != NULL);
  ASSERT(ptStart.x >= 0 && ptStart.y >= 0);

  // root node starts here
  int cyDrawn = 0;
  CSize sizeNode;
  CalcNodeSize(pDC, sizeNode);
  Draw(pDC, ptStart, this == pNodeSel, sizeNode);
  cyDrawn += sizeNode.cy + CY_SEPARATOR;

  if (m_listChild.GetCount() == 0 || m_bHideChildren)
    return cyDrawn;     // nothing more to draw

  // indent for the kids
  CPoint ptKid(ptStart.x + CX_INDENT, ptStart.y + cyDrawn);

  // draw the kids
  int yMid = 0;
  POSITION pos = m_listChild.GetHeadPosition();
  while (pos != NULL)
  {
    CServerNode *pChild = (CServerNode*)m_listChild.GetNext(pos);

    // add the little line
    yMid = ptKid.y + (sizeNode.cy)/2;
    pDC->MoveTo(ptStart.x + CX_BACKDENT, yMid);
    pDC->LineTo(ptKid.x, yMid);

    // draw the child node
    int cyKid = pChild->DrawTree(pDC, ptKid, pNodeSel);
    if (cyKid == -1)
      return -1;      // error

    cyDrawn += cyKid;
    ptKid.y += cyKid;
  }
  ASSERT(ptKid.y == ptStart.y + cyDrawn);

  // draw the connecting line (down to last yMid)
  ENSURE(yMid != 0);
  int xLine = ptStart.x + CX_BACKDENT;
  pDC->MoveTo(xLine, ptStart.y + sizeNode.cy);
  pDC->LineTo(xLine, yMid);
  return cyDrawn;
}

BOOL CServerNode::FindAndDelete ( CServerNode * pItem )

Definition at line 128 of file svritem.cpp.

{
  POSITION pos = m_listChild.GetHeadPosition();
  while (pos != NULL)
  {
    POSITION posPrev = pos;
    CServerNode *pChild = (CServerNode*)m_listChild.GetNext(pos);
    if (pChild == pNode)
    {
      m_listChild.RemoveAt(posPrev);
      delete pNode;
      return TRUE;
    }
    if (pChild->FindAndDelete(pNode) == TRUE)
      return TRUE;
  }
  return FALSE;
}

CServerNode * CServerNode::FindNode ( LPCTSTR pszItemName )

Definition at line 147 of file svritem.cpp.

{
  // return this node if it matches!
  if (GetItemName() == pszItemName)
    return this;

  POSITION pos = m_listChild.GetHeadPosition();
  while (pos != NULL)
  {
    CServerNode* pChild = (CServerNode*)m_listChild.GetNext(pos);
    if (pChild->GetItemName() == pszItemName)
      return pChild;

    // recurse down the tree
    pChild = pChild->FindNode(pszItemName);
    if (pChild != NULL)
      return pChild;
  }
  return NULL;
}

CServerDoc* CServerNode::GetDocument ( ) const [inline]

Definition at line 56 of file svritem.h.

    { return (CServerDoc*)m_pDocument; }

const CString & CServerNode::GetItemName ( )

Definition at line 443 of file svritem.cpp.

{
  // use item name in server item if connected
  if (m_pServerItem != NULL)
    return m_pServerItem->GetItemName();

  // use description or link key depending on state of link key
  else if (m_strLinkKey.IsEmpty())
    return m_strDescription;
  else
    return m_strLinkKey;
}

CServerNode * CServerNode::GetNext | ( | CServerNode * | pItem,
 |  | BOOL | bInit = TRUE
 | ) |  |

Definition at line 519 of file svritem.cpp.

{
  static BOOL bFound;
  if (bInit)
    bFound = FALSE;

  if (pNode == this)
    bFound = TRUE;
  if (!m_bHideChildren)
  {
    POSITION pos = m_listChild.GetHeadPosition();
    while (pos != NULL)
    {
      CServerNode* pChild = (CServerNode*)m_listChild.GetNext(pos);
      if (bFound)
        return pChild;
      pChild = pChild->GetNext(pNode, FALSE);
      if (pChild != NULL)
        return pChild;
    }
  }
  // if reached top and last level return original
  if (bInit)
    return pNode;
  else
    return NULL;
}

int CServerNode::GetPopupMenuIndex ( ) [inline]

Definition at line 62 of file svritem.h.

    { return 0; }   // 0 for simple menu

CServerNode * CServerNode::GetPrev | ( | CServerNode * | pItem,
 |  | BOOL | bInit = TRUE
 | ) |  |

Definition at line 547 of file svritem.cpp.

{
  static CServerNode* pPrev;
  if (bInit)
    pPrev = this;

  if (pNode == this)
    return pPrev;

  pPrev = this;

  if (!m_bHideChildren)
  {
    POSITION pos = m_listChild.GetHeadPosition();
    while (pos != NULL)
    {
      CServerNode* pCur = (CServerNode*)m_listChild.GetNext(pos);
      CServerNode* pChild = pCur->GetPrev(pNode, FALSE);
      if (pChild != NULL)
        return pChild;
    }
  }
  if (bInit)
    return pPrev;
  else
    return NULL;
}

BOOL CServerNode::HasChildren ( ) const [inline]

Definition at line 58 of file svritem.h.

    { return m_listChild.GetCount() != 0; }

void CServerNode::InitRootNode ( )

Definition at line 119 of file svritem.cpp.

{
  DeleteChildNodes(); // initalized root node has no children

  m_strDescription = "Root node";
  m_strLinkKey = "%ROOT%";    // link name for root
  UpdateItemName();
}

BOOL CServerNode::IsChild ( const CServerNode * pPotentialChild ) const

Definition at line 195 of file svritem.cpp.

{
  if (pPotentialChild == this)
    return TRUE;
  POSITION pos = m_listChild.GetHeadPosition();
  while (pos != NULL)
  {
    CServerNode* pNode = (CServerNode*)m_listChild.GetNext(pos);
    if (pNode->IsChild(pPotentialChild))
      return TRUE;
  }
  return FALSE;
}

BOOL CServerNode::PromptChangeNode ( )

Definition at line 456 of file svritem.cpp.

{
  CChangeNameDlg dlg;
  dlg.m_strDescription = m_strDescription;
  dlg.m_strLinkKey = GetItemName();
  if (dlg.m_strLinkKey == dlg.m_strDescription)
    dlg.m_strLinkKey.Empty(); // leave empty for tracking link name
  dlg.m_shape = m_shape;

  if (dlg.DoModal() == IDOK)
  {
    m_strDescription = dlg.m_strDescription;
    m_strLinkKey = dlg.m_strLinkKey;
    UpdateItemName();   // syncronize names as appropriate
    m_shape = (EShape)dlg.m_shape;
    return TRUE;
  }
  return FALSE;
}

CServerNode * CServerNode::PromptNewChildNode ( )

Definition at line 502 of file svritem.cpp.

{
  CAddNodeDlg dlg;
  dlg.m_shape = (EShape)shapeRect;
  if (dlg.DoModal() != IDOK)
    return NULL;

  CServerNode* pNew = CreateChildNode(dlg.m_strDescription);
  if (pNew == NULL)
    AfxThrowMemoryException();
  pNew->m_shape = (EShape)dlg.m_shape;
  pNew->m_strLinkKey = dlg.m_strLinkKey;
  pNew->UpdateItemName();

  return pNew;
}

void CServerNode::SaveAsText | ( | CArchive & | ar,
 |  | int | nLevel |
 | ) |  |  | [protected]

Definition at line 389 of file svritem.cpp.

{
  ASSERT(ar.IsStoring());

  // indent node text
  char szTabs[MAX_LEVEL];
  int nTabs = min(nLevel, MAX_LEVEL);
  memset(szTabs, '\t', nTabs);
  ar.Write(szTabs, nTabs);

  // write node text itself
#ifdef _UNICODE
  int nLen = m_strDescription.GetLength();
  char* psz = (char*)_alloca(nLen+1);
  wcstombs(psz, m_strDescription, nLen+1);
  ar.Write(psz, nLen);
#else
  ar.Write(m_strDescription, m_strDescription.GetLength()*sizeof(TCHAR));
#endif

  // terminate line with CRLF
  static char BASED_CODE szCRLF[] = "\r\n";
  ar.Write(szCRLF, sizeof(szCRLF)-1);

  // write kids
  POSITION pos = m_listChild.GetHeadPosition();
  while (pos != NULL)
  {
    CServerNode* pNode = (CServerNode*)m_listChild.GetNext(pos);
    pNode->SaveAsText(ar, nLevel+1);
  }
}

void CServerNode::Serialize ( CArchive & ar ) [virtual]

Definition at line 354 of file svritem.cpp.

{
  CObject::Serialize(ar);
  if (ar.IsStoring())
  {
    ar << (WORD)m_shape;

    ASSERT(m_strLinkKey.IsEmpty() || m_strDescription != m_strLinkKey);
    if (m_pServerItem != NULL)
      ar << m_pServerItem->GetItemName();
    else
      ar << m_strLinkKey;
    ar << m_strDescription;
    ar << (WORD)m_bHideChildren;
  }
  else
  {
    // get back-pointer to document
    m_pDocument = (CServerDoc*)ar.m_pDocument;

    WORD wTemp;
    ar >> wTemp; m_shape = (EShape)wTemp;
    if (m_shape >= shapeMax)
      m_shape = shapeRect;
    ar >> m_strLinkKey >> m_strDescription;
    UpdateItemName();
    ar >> wTemp;
    m_bHideChildren = (BOOL)wTemp;
  }
  m_listChild.Serialize(ar);
}

void CServerNode::UpdateItemName ( )

Definition at line 422 of file svritem.cpp.

{
  // empty link key if same as description (it is redundant)
  if (m_strLinkKey == m_strDescription)
    m_strLinkKey.Empty();

  // update link name in item if attached
  if (m_pServerItem != NULL)
  {
    CString* pstr;
    if (m_strLinkKey.IsEmpty())
      pstr = &m_strDescription;
    else
      pstr = &m_strLinkKey;
    m_pServerItem->SetItemName(*pstr);

    // empty link key since it is redundant with the server item
    m_strLinkKey.Empty();
  }
}

Friends And Related Function Documentation

friend class CServerItem [friend]

Definition at line 96 of file svritem.h.

Member Data Documentation

BOOL CServerNode::m_bHideChildren

Definition at line 45 of file svritem.h.

CObList CServerNode::m_listChild

Definition at line 44 of file svritem.h.

CServerDoc* CServerNode::m_pDocument

Definition at line 46 of file svritem.h.

CServerItem* CServerNode::m_pServerItem

Definition at line 43 of file svritem.h.

enum CServerNode::EShape CServerNode::m_shape
CString CServerNode::m_strDescription

Definition at line 41 of file svritem.h.

CString CServerNode::m_strLinkKey

Definition at line 42 of file svritem.h.

The documentation for this class was generated from the following files:
  • ole/hiersvr/svritem.h
  • ole/hiersvr/svritem.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CServerView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

CServerView Class Reference

#include "svrview.h"

List of all members.

Public Member Functions

virtual | ~CServerView ()
CSize | CalcActualItemSize (CServerNode *pItem, CDC *pDC)
CSize | CalcActualViewSize (CDC *pDC)
CSize | CalcScaledItemSize (CServerNode *pItem)
CSize | CalcScaledViewSize ()
void | DoImportText (CArchive &ar)
BOOL | DoPasteItem (COleDataObject *pDataObject)
void | DoPasteNative (COleDataObject *pDataObject)
void | DoPasteText (COleDataObject *pDataObject)
CServerDoc * GetDocument ()
void | InvalidateItem (CServerNode *pItem, CDC *pDC)
void | InvalidateItem (CServerNode *pItem)
void | Locate (int cnt, BOOL bScrollUp)
virtual void | OnDraw (CDC *pDC)
virtual void | OnInitialUpdate ()
virtual void | OnPrepareDC (CDC *pDC, CPrintInfo *pInfo=NULL)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
void | ScrollToItem (CServerNode *pItem, BOOL bScrollUp)
void | SetScrollInfo ()
void | SetSelection (CServerNode *pNewSel)
void | SetSelection (CServerNode *pNewSel, CDC *pDC)
BOOL | SetZoomFactor (CSize zoomNum, CSize zoomDenom)
void | ToggleSelectedItem ()
void | UpdateServerView ()

Protected Member Functions

CServerView ()
void | DoBranch (CServerNode *pItem, BOOL bHide)
afx_msg void | OnAddNode ()
afx_msg void | OnChangeName ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual DROPEFFECT | OnDragEnter (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual void | OnDragLeave ()
virtual DROPEFFECT | OnDragOver (COleDataObject *pDataObject, DWORD grfKeyState, CPoint point)
virtual BOOL | OnDrop (COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point)
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnEditPaste ()
afx_msg void | OnImportText ()
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnTreeCollapsebranch ()
afx_msg void | OnTreeExpandall ()
afx_msg void | OnTreeExpandbranch ()
afx_msg void | OnTreeExpandonelevel ()
afx_msg void | OnUpdateEditPaste (CCmdUI *pCmdUI)
afx_msg void | OnUpdateHasSel (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTreeCollapsebranch (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTreeExpandall (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTreeExpandbranch (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTreeExpandonelevel (CCmdUI *pCmdUI)
afx_msg void | OnUpdateZoom (CCmdUI *pCmdUI)
afx_msg void | OnViewZoomCustom ()
afx_msg void | OnZoom (UINT nID)
void | SelectAtPoint (CPoint point, CPoint &pointHit)

Protected Attributes

COleDropTarget | m_dropTarget
DROPEFFECT | m_prevDropEffect
CServerNode * m_pSelectedNode
CPoint | m_ptStart
CSize | m_zoomDenom
CSize | m_zoomNum

Static Protected Attributes

static CServerNode *NEAR | m_pDragNode = NULL

Friends

class | CServerViewDC

Detailed Description

Definition at line 14 of file svrview.h.

Constructor & Destructor Documentation

CServerView::CServerView ( ) [protected]

Definition at line 88 of file svrview.cpp.

{
  m_pSelectedNode = NULL;
  m_ptStart = CPoint(CX_MARGIN, CY_MARGIN);   // upper left position

  // initialize zoom state (100% from size cache)
  m_zoomNum = CSize(100, 100);
  m_zoomDenom = CSize(100, 100);
  m_prevDropEffect = DROPEFFECT_NONE;
}

CServerView::~CServerView ( ) [virtual]

Definition at line 99 of file svrview.cpp.

{
}

Member Function Documentation

CSize CServerView::CalcActualItemSize | ( | CServerNode * | pItem,
 |  | CDC * | pDC
 | ) |  |

Definition at line 186 of file svrview.cpp.

{
  CSize sizeTotal(0, 0);
  CPoint ptStart = m_ptStart;
  pItem->CalcBounding(pDC, ptStart, sizeTotal);
  sizeTotal.cx += CX_MARGIN;
  // sizeTotal is the extent in logical coords
  // convert from logical to device
  CRect rc(CPoint(0,0),sizeTotal);
  pDC->LPtoDP(rc);
  return rc.Size();
}

CSize CServerView::CalcActualViewSize ( CDC * pDC )

Definition at line 181 of file svrview.cpp.

{
  return CalcActualItemSize(GetDocument()->m_pRoot, pDC);
}

CSize CServerView::CalcScaledItemSize ( CServerNode * pItem )

Definition at line 204 of file svrview.cpp.

{
  CServerDC dc(this);
  // set extent to 100%
  dc.SetViewportExt(CSize(1,1));
  dc.SetWindowExt(CSize(1,1));

  CSize sizeTotal(0, 0);
  CPoint ptStart = m_ptStart;
  pItem->CalcBounding(&dc, ptStart, sizeTotal);
  sizeTotal.cx += CX_MARGIN;
  // sizeTotal is the native extent in device coords
  sizeTotal.cx = MulDiv(sizeTotal.cx,m_zoomNum.cx,m_zoomDenom.cx);
  sizeTotal.cy = MulDiv(sizeTotal.cy,m_zoomNum.cy,m_zoomDenom.cy);
  return sizeTotal;
}

CSize CServerView::CalcScaledViewSize ( )

Definition at line 199 of file svrview.cpp.

{
  return CalcScaledItemSize(GetDocument()->m_pRoot);
}

void CServerView::DoBranch | ( | CServerNode * | pItem,
 |  | BOOL | bHide |
 | ) |  |  | [protected]

Definition at line 528 of file svrview.cpp.

{
  if (pItem->HasChildren())
  {
    pItem->m_bHideChildren = bHide;
    POSITION pos = pItem->m_listChild.GetHeadPosition();
    while (pos != NULL)
      DoBranch((CServerNode *)pItem->m_listChild.GetNext(pos),bHide);
  }
}

void CServerView::DoImportText ( CArchive & ar )

Definition at line 293 of file svrview.cpp.

{
  // read in lines appending items from this node
  char szNode[256];
#ifdef _UNICODE
  TCHAR szT[256];
#endif
  int nCurLevel = 0;
  CServerNode* parents[MAX_LEVEL];
  parents[0] = m_pSelectedNode;   // must have a parent at the current level
  CServerNode* pNewSel = NULL;

  while (ReadString(ar, szNode, sizeof(szNode)) != NULL)
  {
    int cch = (int)strlen(szNode);
    if (cch == 0)
      continue;
    if (szNode[cch-1] != '\n')
    {
      AfxMessageBox(
        _T("Text file contains too long a line - aborting read\n"));
      break;      // leaves items loaded so far
    }
    szNode[cch-1] = '\0';
    // check the indentation level
    char* pch = szNode;
    while (*pch == '\t')
      pch++;
    int nLevel = (int)((pch - szNode)+1);
    ENSURE(nLevel >= 1);        // levels are 1 based, 0 is the root

    if (*pch == '\0')
      continue;       // skip blank lines
    if (nLevel > nCurLevel + 1 || nLevel >= MAX_LEVEL)
    {
      AfxMessageBox(
        _T("Text file contains too many tabs = aborting read\n"));
      break;      // leaves items loaded so far
    }

#ifdef _UNICODE
    int n = MultiByteToWideChar(CP_ACP, 0, pch, -1,
      szT, sizeof(szT)/sizeof(szT[0]));
    if (n > 0)
      szT[n-1] = 0;
    parents[nLevel] = parents[nLevel-1]->CreateChildNode(szT);
#else
    parents[nLevel] = parents[nLevel-1]->CreateChildNode(pch);
#endif
    nCurLevel = nLevel;
    if (pNewSel == NULL)
      pNewSel = parents[nLevel];
  }
  if (nCurLevel == 0)
    return;     // nothing added

  SetSelection(pNewSel);
  UpdateServerView();
}

BOOL CServerView::DoPasteItem ( COleDataObject * pDataObject )

Definition at line 221 of file svrview.cpp.

{
  ENSURE(pDataObject != NULL);
  ASSERT_VALID(this);
  ENSURE(m_pSelectedNode != NULL);

  BeginWaitCursor();

  TRY
  {
    if (pDataObject->IsDataAvailable(CServerDoc::m_cfPrivate))
      DoPasteNative(pDataObject);
    else if (pDataObject->IsDataAvailable(CF_TEXT))
      DoPasteText(pDataObject);
    else
      AfxThrowNotSupportedException();
  }
  CATCH_ALL(e)
  {
    // general cleanup
    TRACE0("failed to embed/link an OLE object\n");
    EndWaitCursor();
    return FALSE;
  }
  END_CATCH_ALL

  EndWaitCursor();
  return TRUE;
}

void CServerView::DoPasteNative ( COleDataObject * pDataObject )

Definition at line 251 of file svrview.cpp.

{
  ASSERT(m_pSelectedNode != NULL);
  CServerNode* pItem = new CServerNode(GetDocument());
  ASSERT_VALID(pItem);

  // get file refering to clipboard data
  CFile *pFile = pDataObject->GetFileData(CServerDoc::m_cfPrivate);
  if (pFile == NULL)
  {
    delete pItem;
    return;
  }

  // connect the file to the archive and read the contents
  CArchive ar(pFile, CArchive::load);
  ar.m_pDocument = GetDocument(); // for COleClientItem serialize
  pItem->Serialize(ar);
  ar.Close();
  delete pFile;

  // add the item to selected node
  m_pSelectedNode->m_listChild.AddHead(pItem);
  SetSelection(pItem);
}

void CServerView::DoPasteText ( COleDataObject * pDataObject )

Definition at line 277 of file svrview.cpp.

{
  ASSERT(m_pSelectedNode != NULL);

  // get file refering to clipboard data
  CFile *pFile = pDataObject->GetFileData(CF_TEXT);
  if (pFile == NULL)
    return;

  // connect the file to the archive and read the contents
  CArchive ar(pFile, CArchive::load);
  DoImportText(ar);
  ar.Close();
  delete pFile;
}

CServerDoc* CServerView::GetDocument ( ) [inline]

Definition at line 22 of file svrview.h.

  {
    ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CServerDoc)));
    ASSERT_VALID(m_pDocument);
    return (CServerDoc*)m_pDocument;
  }

void CServerView::InvalidateItem | ( | CServerNode * | pItem,
 |  | CDC * | pDC
 | ) |  |

Definition at line 432 of file svrview.cpp.

{
  if (pItem != NULL)
  {
    CRect rect;
    CPoint ptStart = m_ptStart;
    if (FindItemRect(pDC, pItem, &rect, ptStart, GetDocument()->m_pRoot))
    {
      pDC->LPtoDP(rect);
      InvalidateRect(rect, FALSE);
    }
  }
}

void CServerView::InvalidateItem ( CServerNode * pItem )

Definition at line 446 of file svrview.cpp.

{
  CServerDC dc(this);
  InvalidateItem(pItem, &dc);
}

void CServerView::Locate | ( | int | cnt,
 |  | BOOL | bScrollUp
 | ) |  |

Definition at line 397 of file svrview.cpp.

{
  CServerNode* pRoot = GetDocument()->m_pRoot;
  CServerNode* pItem = pRoot;

  if (m_pSelectedNode == NULL)
    SetSelection(pRoot);

  if (nCount == 0) // goto top or bottom depending on direction
  {
    if (bScrollUp)
      pItem = pRoot;
    else
    {
      while (pItem->HasChildren())
        pItem = (CServerNode *)(pItem->m_listChild.GetTail());
    }
  }
  else if (bScrollUp)
  {
    pItem = m_pSelectedNode;
    while (nCount--)
      pItem = pRoot->GetPrev(pItem);
  }
  else // going down
  {
    pItem = m_pSelectedNode;
    while (nCount--)
      pItem = pRoot->GetNext(pItem);
  }
  ScrollToItem(pItem, bScrollUp);
  SetSelection(pItem);
  UpdateWindow();
}

void CServerView::OnAddNode ( ) [protected]

Definition at line 622 of file svrview.cpp.

{
  if (m_pSelectedNode == NULL)
    AfxThrowNotSupportedException();
  CServerNode* pNew;
  if ((pNew = m_pSelectedNode->PromptNewChildNode()) == NULL)
    return;

  SetSelection(pNew);
  UpdateServerView();
}

void CServerView::OnChangeName ( ) [protected]

Definition at line 612 of file svrview.cpp.

{
  if (m_pSelectedNode != NULL && m_pSelectedNode->PromptChangeNode())
  {
    GetDocument()->SetModifiedFlag();
    GetDocument()->UpdateAllItems(NULL);
    GetDocument()->UpdateAllViews(NULL);
  }
}

int CServerView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 899 of file svrview.cpp.

{
  if (CScrollView::OnCreate(lpCreateStruct) == -1)
    return -1;

  // register drop target
  m_dropTarget.Register(this);

  // setup scroll state so it is possible to calculate the extent
  SetScrollSizes(MM_TEXT, CSize(0, 0));

  return 0;
}

DROPEFFECT CServerView::OnDragEnter | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [protected, virtual]

Definition at line 552 of file svrview.cpp.

{
  ASSERT(m_prevDropEffect == DROPEFFECT_NONE);
  return OnDragOver(pDataObject, grfKeyState, point);
}

void CServerView::OnDragLeave ( ) [protected, virtual]

Definition at line 599 of file svrview.cpp.

{
  m_prevDropEffect = DROPEFFECT_NONE;
}

DROPEFFECT CServerView::OnDragOver | ( | COleDataObject * | pDataObject,
 |  | DWORD | grfKeyState,
 |  | CPoint | point |
 | ) |  |  | [protected, virtual]

Definition at line 559 of file svrview.cpp.

{
  DROPEFFECT dropEffect = DROPEFFECT_NONE;
  if (pDataObject->IsDataAvailable(CServerDoc::m_cfPrivate) ||
    pDataObject->IsDataAvailable(CF_TEXT))
  {
    CPoint pointHit;
    SelectAtPoint(point, pointHit);
    UpdateWindow();
    if (m_pSelectedNode != NULL)
    {
      // don't allow a node to drop on itself
      if (m_pDragNode == m_pSelectedNode)
        dropEffect = DROPEFFECT_NONE;
      // if drop target is a child of drag source
      // then don't drop
      else if (m_pDragNode != NULL && m_pDragNode->IsChild(m_pSelectedNode))
        dropEffect = DROPEFFECT_NONE;
      // check for force link
      else if ((grfKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
        dropEffect = DROPEFFECT_COPY;
      // check for force copy
      else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
        dropEffect = DROPEFFECT_COPY;
      // check for force move
      else if ((grfKeyState & MK_ALT) == MK_ALT)
        dropEffect = DROPEFFECT_MOVE;
      // if m_pDragNode == NULL then not dropping on self
      // so make default effect be copy
      // if dropping on self make default be move
      else
        dropEffect = (m_pDragNode == NULL) ? DROPEFFECT_COPY :
          DROPEFFECT_MOVE;
    }
  }
  m_prevDropEffect = dropEffect;
  return dropEffect;
}

void CServerView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 466 of file svrview.cpp.

{
  if (GetDocument()->DrawTree(pDC, m_ptStart, m_pSelectedNode) == -1)
    TRACE0("Error: CServerDoc::DrawTree failed!!\n");
}

BOOL CServerView::OnDrop | ( | COleDataObject * | pDataObject,
 |  | DROPEFFECT | dropEffect,
 |  | CPoint | point |
 | ) |  |  | [protected, virtual]

Definition at line 539 of file svrview.cpp.

{
  ASSERT_VALID(this);
  OnDragLeave();
  if (DoPasteItem(pDataObject))
  {
    UpdateServerView();
    return TRUE;
  }
  else
    return FALSE;
}

void CServerView::OnEditClear ( ) [protected]

Definition at line 913 of file svrview.cpp.

{
  CServerNode* pRoot = GetDocument()->m_pRoot;
  if (m_pSelectedNode == NULL)
    return;
  if (m_pSelectedNode == pRoot)
    pRoot->InitRootNode();
  else
  {
    CServerNode *pItem = pRoot->GetPrev(m_pSelectedNode);
    if (pRoot->FindAndDelete(m_pSelectedNode))
      m_pSelectedNode = pRoot->GetNext(pItem);
  }
  UpdateServerView();
}

void CServerView::OnEditCopy ( ) [protected]

Definition at line 634 of file svrview.cpp.

{
  ASSERT_VALID(this);
  if (m_pSelectedNode == NULL)
    return;

  // get a server item suitable to generate the clipboard data
       CServerItem* pItem = m_pSelectedNode->m_pServerItem;
       if (pItem == NULL)
          #pragma warning (suppress: 6014)
               pItem = new CServerItem(GetDocument(), m_pSelectedNode);
       ASSERT_VALID(pItem);
       pItem->CopyToClipboard(TRUE);
}

void CServerView::OnEditCut ( ) [protected]

Definition at line 860 of file svrview.cpp.

{
  ASSERT(m_pSelectedNode != NULL);
  CServerDoc* pDoc = GetDocument();
  OnEditCopy();
  if (m_pSelectedNode == pDoc->m_pRoot)
    pDoc->m_pRoot->InitRootNode();
  else if (pDoc->m_pRoot->FindAndDelete(m_pSelectedNode))
    m_pSelectedNode = NULL;
  UpdateServerView();
}

void CServerView::OnEditPaste ( ) [protected]

Definition at line 879 of file svrview.cpp.

{
  COleDataObject clipboardData;
  clipboardData.AttachClipboard();
  DoPasteItem(&clipboardData);
  UpdateServerView();
}

void CServerView::OnImportText ( ) [protected]

Definition at line 726 of file svrview.cpp.

{
  if (m_pSelectedNode == NULL)
    AfxThrowNotSupportedException();

  CFileDialog dlg(TRUE, _T("txt"), NULL,
    OFN_FILEMUSTEXIST | OFN_HIDEREADONLY,
    _T("Text Files (*.txt)|*.txt|All Files (*.*)|*.*||"));
  if (dlg.DoModal() != IDOK)
    return;                 // stay with old data file

  CFile file;
  if (!file.Open(dlg.GetPathName(), CFile::modeRead))
  {
    AfxMessageBox(_T("Failed to open text file"));
    return;
  }

  CArchive ar(&file,CArchive::load);
  DoImportText(ar);
  ar.Close();
  file.Close();
}

void CServerView::OnInitialUpdate ( ) [virtual]

Definition at line 496 of file svrview.cpp.

{
  // initialize zoom state (100% from size cache)
  m_zoomNum = CSize(100, 100);
  m_zoomDenom = CSize(100, 100);

  // call base class last (will call OnUpdate)
  CScrollView::OnInitialUpdate();
}

void CServerView::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 979 of file svrview.cpp.

{
  switch (nChar)
  {
    case VK_RETURN:
      ToggleSelectedItem();
      break;
    case VK_UP:
      Locate(1, TRUE);
      break;
    case VK_DOWN:
      Locate(1, FALSE);
      break;
    case VK_HOME:
      Locate(0, TRUE);
      break;
    case VK_END:
      Locate(0, FALSE);
      break;
    case VK_PRIOR:
      Locate(10, TRUE);
      break;
    case VK_NEXT:
      Locate(10, FALSE);
      break;
  }
}

void CServerView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 872 of file svrview.cpp.

{
  CPoint pointHit;
  SelectAtPoint(point, pointHit);
  ToggleSelectedItem();
}

void CServerView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 649 of file svrview.cpp.

{
  // m_pDragNode != NULL only when drag in progress
  ASSERT(m_pDragNode == NULL);
  CPoint pointHit;
  SelectAtPoint(point, pointHit);
  UpdateWindow();

  // maybe start drag drop operation on selection
  if (m_pSelectedNode != NULL)
  {
    // record current selection because a drop back in same view
    // will change the current selection
    m_pDragNode = m_pSelectedNode;

    // determine rectangle of object we'll be dragging
    CServerDC dc(this);
    CSize size = CalcActualItemSize(m_pSelectedNode, &dc);
    CRect rect(pointHit, size);

    // get a server item suitable to generate the clipboard data
      CServerItem* pItem = m_pSelectedNode->m_pServerItem;
      if (pItem == NULL)
               pItem = new CServerItem(GetDocument(), m_pSelectedNode);

      ASSERT_VALID(pItem);

    // rect must be in screen co-ordinates
    dc.LPtoDP(&rect);
    CPoint ptOffset = point - rect.TopLeft();
    ClientToScreen(&rect);

    // drag the object
    if (pItem->DoDragDrop(rect, ptOffset, TRUE,
      DROPEFFECT_COPY | DROPEFFECT_MOVE) == DROPEFFECT_MOVE)
    {
      // the object was moved, need to delete/move depending on dest
      CServerDoc* pDoc = GetDocument();
      if (m_pSelectedNode == m_pDragNode)
        SetSelection(pDoc->m_pRoot->GetPrev(m_pSelectedNode));
      if (m_pDragNode == pDoc->m_pRoot)
        pDoc->m_pRoot->InitRootNode();
      else
        pDoc->m_pRoot->FindAndDelete(m_pDragNode);

      // if drop was not back in same view clear selected node
      UpdateServerView();
    }
    m_pDragNode = NULL;
  }
}

void CServerView::OnPrepareDC | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo = NULL |
 | ) |  |  | [virtual]

Definition at line 506 of file svrview.cpp.

{
  CScrollView::OnPrepareDC(pDC, pInfo);

  pDC->SetMapMode(MM_ANISOTROPIC);
  pDC->SetViewportExt(m_zoomNum);
  pDC->SetWindowExt(m_zoomDenom);
}

void CServerView::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 701 of file svrview.cpp.

{
  // make sure window is active
  GetParentFrame()->ActivateFrame();

  CPoint pointHit;
  SelectAtPoint(point, pointHit); // select node first
  UpdateWindow();

  int iSub;
  if (m_pSelectedNode == NULL ||
    (iSub = m_pSelectedNode->GetPopupMenuIndex()) == -1)
     return;  // nothing if no selection or no popup

  CMenu popups;
  if (!popups.LoadMenu(IDR_POPUPS))
    AfxThrowResourceException();
  CMenu* pMenu = popups.GetSubMenu(iSub);
  ENSURE(pMenu != NULL);

  ClientToScreen(&point);
  pMenu->TrackPopupMenu(TPM_CENTERALIGN | TPM_RIGHTBUTTON,
    point.x, point.y, AfxGetMainWnd());
}

void CServerView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 1007 of file svrview.cpp.

{
  // update scroll bar size before handling the size message
  //  (this avoids multiple updates during in-place activation)
  SetScrollInfo();

  CScrollView::OnSize(nType, cx, cy);
}

void CServerView::OnTreeCollapsebranch ( ) [protected]

Definition at line 929 of file svrview.cpp.

{
  DoBranch(m_pSelectedNode,TRUE);
  UpdateServerView();
}

void CServerView::OnTreeExpandall ( ) [protected]

Definition at line 935 of file svrview.cpp.

{
  DoBranch(GetDocument()->m_pRoot,FALSE);
  UpdateServerView();
}

void CServerView::OnTreeExpandbranch ( ) [protected]

Definition at line 941 of file svrview.cpp.

{
  DoBranch(m_pSelectedNode,FALSE);
  UpdateServerView();
}

void CServerView::OnTreeExpandonelevel ( ) [protected]

Definition at line 947 of file svrview.cpp.

{
  if (m_pSelectedNode->HasChildren())
  {
    m_pSelectedNode->m_bHideChildren = FALSE;
    UpdateServerView();
  }
}

void CServerView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [virtual]

Definition at line 472 of file svrview.cpp.

{
  CScrollView::OnUpdate(pSender, lHint, pHint);
  CServerDoc* pDoc = GetDocument();
  CServerNode* pRoot = pDoc->m_pRoot;
  ASSERT(pRoot != NULL);

  if (m_pSelectedNode == NULL)
    m_pSelectedNode = pRoot;

  if (pDoc->IsInPlaceActive())
  {
    ASSERT_VALID(pDoc->m_pRoot);
    CRect rect;
    pDoc->GetItemPosition(rect);

    // adjust rect for new size of view
    rect.BottomRight() = rect.TopLeft() + CalcScaledViewSize();
    pDoc->RequestPositionChange(rect);
      // may resize the window before returning
  }
  SetScrollInfo();
}

void CServerView::OnUpdateEditPaste ( CCmdUI * pCmdUI ) [protected]

Definition at line 887 of file svrview.cpp.

{
  // determine if private or standard OLE formats are on the clipboard
  COleDataObject dataObj;
  BOOL bEnable = m_pSelectedNode != NULL &&
    dataObj.AttachClipboard() &&
    (dataObj.IsDataAvailable(CServerDoc::m_cfPrivate) ||
     dataObj.IsDataAvailable(CF_TEXT));
  // enable command based on availability
  pCmdUI->Enable(bEnable);
}

void CServerView::OnUpdateHasSel ( CCmdUI * pCmdUI ) [protected]

Definition at line 607 of file svrview.cpp.

{
  pCmdUI->Enable(m_pSelectedNode != NULL);
}

void CServerView::OnUpdateTreeCollapsebranch ( CCmdUI * pCmdUI ) [protected]

Definition at line 956 of file svrview.cpp.

{
  pCmdUI->Enable(m_pSelectedNode != NULL && m_pSelectedNode->HasChildren() &&
    !m_pSelectedNode->m_bHideChildren);
}

void CServerView::OnUpdateTreeExpandall ( CCmdUI * pCmdUI ) [protected]

Definition at line 968 of file svrview.cpp.

{
  pCmdUI->Enable(GetDocument()->m_pRoot != NULL &&
    GetDocument()->m_pRoot->HasChildren());
}

void CServerView::OnUpdateTreeExpandbranch ( CCmdUI * pCmdUI ) [protected]

Definition at line 974 of file svrview.cpp.

{
  pCmdUI->Enable(m_pSelectedNode != NULL && m_pSelectedNode->HasChildren());
}

void CServerView::OnUpdateTreeExpandonelevel ( CCmdUI * pCmdUI ) [protected]

Definition at line 962 of file svrview.cpp.

{
  pCmdUI->Enable(m_pSelectedNode != NULL && m_pSelectedNode->HasChildren() &&
    m_pSelectedNode->m_bHideChildren);
}

void CServerView::OnUpdateZoom ( CCmdUI * pCmdUI ) [protected]

Definition at line 819 of file svrview.cpp.

{
  UINT nID = pCmdUI->m_nID;

  if (m_zoomDenom.cx == 100 && m_zoomDenom.cy == 100 &&
    nID != ID_VIEW_ZOOMCUSTOM)
  {
    ASSERT(nID-ID_VIEW_ZOOM25 <
      sizeof(rgiZoomFactor)/sizeof(rgiZoomFactor[0]));
    int iZoomFactor = rgiZoomFactor[nID-ID_VIEW_ZOOM25];

    if (iZoomFactor == m_zoomNum.cx && iZoomFactor == m_zoomNum.cy)
    {
      pCmdUI->SetCheck(TRUE);
      return;
    }
  }

  // default to not checked
  pCmdUI->SetCheck(FALSE);
}

void CServerView::OnViewZoomCustom ( ) [protected]

Definition at line 841 of file svrview.cpp.

{
  // prepare dialog data
  CZoomDlg dlg;
  dlg.m_zoomX = m_zoomNum.cx;
  dlg.m_zoomY = m_zoomNum.cy;

  // launch dialog
  if (dlg.DoModal() == IDOK)
  {
    // set new zoom factors
    CSize zoomNum(dlg.m_zoomX, dlg.m_zoomY);
    SetZoomFactor(zoomNum, m_zoomDenom);
    SetScrollInfo();
  }
}

void CServerView::OnZoom ( UINT nID ) [protected]

Definition at line 797 of file svrview.cpp.

{
  ENSURE(nID >= ID_VIEW_ZOOM25 && nID <= ID_VIEW_ZOOM300);

  CSize zoomDenom;
  CSize zoomNum;

  // all of our zoom factors use denominator of 100
  zoomDenom.cx = 100;
  zoomDenom.cy = 100;

  // get zoom factor numerator and set it
  ASSERT(nID-ID_VIEW_ZOOM25 < sizeof(rgiZoomFactor)/sizeof(rgiZoomFactor[0]));
  int iZoomFactor = rgiZoomFactor[nID-ID_VIEW_ZOOM25];
  zoomNum.cx = iZoomFactor;
  zoomNum.cy = iZoomFactor;

  // change the zoom factor to new zoom factor
  SetZoomFactor(zoomNum, zoomDenom);
  SetScrollInfo();
}

void CServerView::ScrollToItem | ( | CServerNode * | pItem,
 |  | BOOL | bScrollUp
 | ) |  |

Definition at line 353 of file svrview.cpp.

{
  CServerDC dc(this);

  CRect rect;
  CPoint ptStart = m_ptStart;
  if (FindItemRect(&dc, pItem, &rect, ptStart, GetDocument()->m_pRoot))
  {
    CRect rc;
    dc.LPtoDP(rect);
    if (GetDocument()->IsInPlaceActive())
    {
      CRect rcPos,rcClip;
      GetDocument()->GetItemPosition(&rcPos);
      GetDocument()->GetItemClipRect(&rcClip);
      rc.IntersectRect(&rcPos,&rcClip);
      rc.OffsetRect(-rcPos.left,-rcPos.top);
      if (!rc.PtInRect(rect.TopLeft()) || !rc.PtInRect(rect.BottomRight()))
      {
        CSize size(0, 0);
        // scroll inplace site
        if (bScrollUp)
          size.cy = rect.top - rc.top;
        else
          size.cy = rect.bottom + rcPos.top - rcClip.bottom;
        GetDocument()->ScrollContainerBy(size);
      }
    }
    else
    {
      GetClientRect(rc);
      if (!rc.PtInRect(rect.TopLeft()) || !rc.PtInRect(rect.BottomRight()))
      {
        CPoint ptDevScroll = GetDeviceScrollPosition();
        if (bScrollUp)
          ScrollToPosition(CPoint(0,rect.top + ptDevScroll.y));
        else
          ScrollToPosition(
            CPoint(0,ptDevScroll.y + rect.bottom - rc.Height()));
      }
    }
  }
}

void CServerView::SelectAtPoint | ( | CPoint | point,
 |  | CPoint & | pointHit |
 | ) |  |  | [protected]

Definition at line 515 of file svrview.cpp.

{
  CServerDC dc(this);

  // change the selection as appropriate
  pointHit = m_ptStart;
  CServerNode* pSelection = HitDetect(&dc, point, pointHit,
    GetDocument()->m_pRoot);

  // now set the selection to new hit-tested node
  SetSelection(pSelection, &dc);
}

void CServerView::SetScrollInfo ( )

Definition at line 124 of file svrview.cpp.

{
  CServerNode* pRoot = GetDocument()->m_pRoot;
  ENSURE(pRoot != NULL);

  //BLOCK: determine new scrolling sizes
  CSize sizeLine;
  CSize sizePage;
  CSize sizeTotal;
  {
    CServerDC dc(this);

    pRoot->CalcNodeSize(&dc, sizeLine);
    sizeLine.cx = sizeDefault.cx;
    sizeLine.cy += CY_SEPARATOR;
    sizePage.cx = sizeDefault.cx;
    sizePage.cy = sizeLine.cy * 10;

    // set the scroll sizes dependent on the zoom factor
    dc.LPtoDP(&sizePage);
    dc.LPtoDP(&sizeLine);
    sizeTotal = CalcActualViewSize(&dc);
    // subtract out the right and bottom margins
    // these are not interesting and this way we avoid
    // some problems with nonlinear scaling of fonts
    CSize sizeMargin(CX_MARGIN, CY_MARGIN);
    CRect rect(CPoint(0, 0), sizeMargin);
    dc.LPtoDP(rect);
    sizeTotal -= rect.Size();
  }

  SetScrollSizes(MM_TEXT, sizeTotal, sizePage, sizeLine);
}

void CServerView::SetSelection | ( | CServerNode * | pNewSel,
 |  | CDC * | pDC
 | ) |  |

Definition at line 106 of file svrview.cpp.

{
  if (pNewSel == m_pSelectedNode)
    return;     // already set
  InvalidateItem(m_pSelectedNode, pDC);
  m_pSelectedNode = pNewSel;
  InvalidateItem(m_pSelectedNode, pDC);
}

void CServerView::SetSelection ( CServerNode * pNewSel )

Definition at line 115 of file svrview.cpp.

{
  CServerDC dc(this);
  SetSelection(pNewSel, &dc);
}

BOOL CServerView::SetZoomFactor | ( | CSize | zoomNum,
 |  | CSize | zoomDenom
 | ) |  |

Definition at line 158 of file svrview.cpp.

{
  if (zoomDenom != m_zoomDenom || zoomNum != m_zoomNum)
  {
    // sync to new zoom factor
    m_zoomNum = zoomNum;
    m_zoomDenom = zoomDenom;

    // resync to new sizes
    Invalidate();
    return TRUE;
  }
  return FALSE;
}

void CServerView::ToggleSelectedItem ( )

Definition at line 452 of file svrview.cpp.

{
  if (m_pSelectedNode != NULL && m_pSelectedNode->HasChildren())
  {
    if (m_pSelectedNode->m_bHideChildren)
      OnTreeExpandonelevel();
    else
      OnTreeCollapsebranch();
  }
}

void CServerView::UpdateServerView ( )

Definition at line 173 of file svrview.cpp.

{
  CServerDoc* pDoc = GetDocument();
  pDoc->SetModifiedFlag();
  pDoc->UpdateAllItems(NULL);
  pDoc->UpdateAllViews(NULL);
}

Friends And Related Function Documentation

friend class CServerViewDC [friend]

Definition at line 125 of file svrview.h.

Member Data Documentation

COleDropTarget CServerView::m_dropTarget [protected]

Definition at line 65 of file svrview.h.

CServerNode *NEAR CServerView::m_pDragNode = NULL [static, protected]

Definition at line 70 of file svrview.h.

DROPEFFECT CServerView::m_prevDropEffect [protected]

Definition at line 66 of file svrview.h.

CServerNode* CServerView::m_pSelectedNode [protected]

Definition at line 69 of file svrview.h.

CPoint CServerView::m_ptStart [protected]

Definition at line 73 of file svrview.h.

CSize CServerView::m_zoomDenom [protected]

Definition at line 77 of file svrview.h.

CSize CServerView::m_zoomNum [protected]

Definition at line 76 of file svrview.h.

The documentation for this class was generated from the following files:
  • ole/hiersvr/svrview.h
  • ole/hiersvr/svrview.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CServicesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CServicesPage Class Reference

#include "ServPg.H"

List of all members.

Public Types

enum | { IDD = IDD_CONTAINEROPTIONS_SERVICES }

Public Member Functions

CServicesPage ()
~CServicesPage ()

Public Attributes

BOOL | m_tSBindHost

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)

Detailed Description

Definition at line 22 of file ServPg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 33 of file ServPg.H.

{ IDD = IDD_CONTAINEROPTIONS_SERVICES };

Constructor & Destructor Documentation

CServicesPage::CServicesPage ( )

Definition at line 25 of file ServPg.Cpp.

                             : CPropertyPage(CServicesPage::IDD)
{
   m_psp.dwFlags &= ~PSP_HASHELP;

  //{{AFX_DATA_INIT(CServicesPage)
  m_tSBindHost = FALSE;
  //}}AFX_DATA_INIT
}

CServicesPage::~CServicesPage ( )

Definition at line 34 of file ServPg.Cpp.

{
}

Member Function Documentation

void CServicesPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 38 of file ServPg.Cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CServicesPage)
  DDX_Check(pDX, IDC_SBINDHOST, m_tSBindHost);
  //}}AFX_DATA_MAP
}

void CServicesPage::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 72 of file ServPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CServicesPage::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 64 of file ServPg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

Member Data Documentation

BOOL CServicesPage::m_tSBindHost

Definition at line 34 of file ServPg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/ServPg.H
  • ole/TstCon/ServPg.Cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSetPaneSizeApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSetPaneSizeApp Class Reference

#include "SetPaneSize.h"

List of all members.

Public Member Functions

CSetPaneSizeApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file SetPaneSize.h.

Constructor & Destructor Documentation

CSetPaneSizeApp::CSetPaneSizeApp ( )

Definition at line 39 of file SetPaneSize.cpp.

                                 :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CSetPaneSizeApp::ExitInstance ( ) [virtual]

Definition at line 113 of file SetPaneSize.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CSetPaneSizeApp::InitInstance ( ) [virtual]

Definition at line 54 of file SetPaneSize.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(CSetPaneSizeDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CSetPaneSizeView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CSetPaneSizeApp::OnAppAbout ( )

Definition at line 174 of file SetPaneSize.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CSetPaneSizeApp::PreLoadState ( ) [virtual]

Definition at line 118 of file SetPaneSize.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/SetPaneSize/SetPaneSize.h
  • vc2008fp/SetPaneSize/SetPaneSize.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSetPaneSizeDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CSetPaneSizeDoc Class Reference

#include "SetPaneSizeDoc.h"

List of all members.

Public Member Functions

virtual | ~CSetPaneSizeDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CSetPaneSizeDoc ()

Detailed Description

Definition at line 13 of file SetPaneSizeDoc.h.

Constructor & Destructor Documentation

CSetPaneSizeDoc::CSetPaneSizeDoc ( ) [protected]

Definition at line 33 of file SetPaneSizeDoc.cpp.

{
  // TODO: add one-time construction code here

}

CSetPaneSizeDoc::~CSetPaneSizeDoc ( ) [virtual]

Definition at line 39 of file SetPaneSizeDoc.cpp.

{
}

Member Function Documentation

BOOL CSetPaneSizeDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file SetPaneSizeDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CSetPaneSizeDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file SetPaneSizeDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/SetPaneSize/SetPaneSizeDoc.h
  • vc2008fp/SetPaneSize/SetPaneSizeDoc.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSetPaneSizeView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CSetPaneSizeView Class Reference

#include "SetPaneSizeView.h"

List of all members.

Public Types

enum | { IDD = IDD_SetPaneSize_FORM }

Public Member Functions

virtual | ~CSetPaneSizeView ()
CSetPaneSizeDoc * GetDocument ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

UINT m_nContainerSize
UINT m_nHeightInPixels
UINT m_nSizePercent
UINT m_nWidthInPixels

Protected Member Functions

CSetPaneSizeView ()
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnBtnSetHeightInPixels ()
afx_msg void | OnBtnSetWidthInPixels ()
afx_msg void | OnButtonSetContainerSize ()
afx_msg void | OnButtonSetDlgBarSize ()
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual void | OnInitialUpdate ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file SetPaneSizeView.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 20 of file SetPaneSizeView.h.

{ IDD = IDD_SetPaneSize_FORM };

Constructor & Destructor Documentation

CSetPaneSizeView::CSetPaneSizeView ( ) [protected]

Definition at line 44 of file SetPaneSizeView.cpp.

  : CFormView(CSetPaneSizeView::IDD)
{
  m_nSizePercent = 50;
  m_nContainerSize = 100;
  m_nHeightInPixels = 100;
  m_nWidthInPixels = 100;
}

CSetPaneSizeView::~CSetPaneSizeView ( ) [virtual]

Definition at line 53 of file SetPaneSizeView.cpp.

{
}

Member Function Documentation

void CSetPaneSizeView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 57 of file SetPaneSizeView.cpp.

{
  CFormView::DoDataExchange(pDX);
  DDX_Text(pDX, IDC_EDIT_SIZE, m_nSizePercent);
  DDV_MinMaxUInt(pDX, m_nSizePercent, 1, 99);
  DDX_Text(pDX, IDC_EDIT_WIDTH, m_nContainerSize);
  DDV_MinMaxUInt(pDX, m_nContainerSize, 1, 2056);
  DDX_Text(pDX, IDC_EDIT_HEIGHT_IN_PIXELS, m_nHeightInPixels);
  DDV_MinMaxUInt(pDX, m_nHeightInPixels, 1, 2056);
  DDX_Text(pDX, IDC_EDIT_WIDTH_IN_PIXELS, m_nWidthInPixels);
  DDV_MinMaxUInt(pDX, m_nWidthInPixels, 1, 2056);
}

CSetPaneSizeDoc * CSetPaneSizeView::GetDocument ( ) [inline]

Definition at line 64 of file SetPaneSizeView.h.

   { return (CSetPaneSizeDoc*)m_pDocument; }

void CSetPaneSizeView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 107 of file SetPaneSizeView.cpp.

{
  // TODO: add extra initialization before printing
}

void CSetPaneSizeView::OnBtnSetHeightInPixels ( ) [protected]

Definition at line 171 of file SetPaneSizeView.cpp.

{
  UpdateData ();
  CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
  if (pMainFrame != NULL)
  {
    pMainFrame->SetDlgBarHeightInPixels (m_nHeightInPixels);
  }
}

void CSetPaneSizeView::OnBtnSetWidthInPixels ( ) [protected]

Definition at line 181 of file SetPaneSizeView.cpp.

{
  UpdateData ();
  CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
  if (pMainFrame != NULL)
  {
    pMainFrame->SetDlgBarWidthInPixels (m_nWidthInPixels);
  }
}

void CSetPaneSizeView::OnButtonSetContainerSize ( ) [protected]

Definition at line 161 of file SetPaneSizeView.cpp.

{
  UpdateData ();
  CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
  if (pMainFrame != NULL)
  {
    pMainFrame->SetContainerSize (m_nContainerSize);
  }
}

void CSetPaneSizeView::OnButtonSetDlgBarSize ( ) [protected]

Definition at line 151 of file SetPaneSizeView.cpp.

{
  UpdateData ();
  CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
  if (pMainFrame != NULL)
  {
    pMainFrame->SetDlgBarSizeInContainer (m_nSizePercent);
  }
}

void CSetPaneSizeView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 146 of file SetPaneSizeView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CSetPaneSizeView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 112 of file SetPaneSizeView.cpp.

{
  // TODO: add cleanup after printing
}

void CSetPaneSizeView::OnFilePrintPreview ( ) [protected]

Definition at line 96 of file SetPaneSizeView.cpp.

{
  AFXPrintPreview (this);
}

void CSetPaneSizeView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 78 of file SetPaneSizeView.cpp.

{
  // There is only one view ever, so it only needs to do the initial
  // update once--otherwise the application is  resized needlessly.
  static BOOL bUpdatedOnce = FALSE;
  if (bUpdatedOnce)
    return;
  bUpdatedOnce = TRUE;

  CFormView::OnInitialUpdate();
  GetParentFrame()->RecalcLayout();
  ResizeParentToFit();

}

BOOL CSetPaneSizeView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 101 of file SetPaneSizeView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CSetPaneSizeView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 117 of file SetPaneSizeView.cpp.

{
  // TODO: add customized printing code here
}

BOOL CSetPaneSizeView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 70 of file SetPaneSizeView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CFormView::PreCreateWindow(cs);
}

Member Data Documentation

UINT CSetPaneSizeView::m_nContainerSize

Definition at line 22 of file SetPaneSizeView.h.

UINT CSetPaneSizeView::m_nHeightInPixels

Definition at line 23 of file SetPaneSizeView.h.

UINT CSetPaneSizeView::m_nSizePercent

Definition at line 21 of file SetPaneSizeView.h.

UINT CSetPaneSizeView::m_nWidthInPixels

Definition at line 24 of file SetPaneSizeView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/SetPaneSize/SetPaneSizeView.h
  • vc2008fp/SetPaneSize/SetPaneSizeView.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSetTabStops Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CSetTabStops Class Reference

#include "tabstop.h"

List of all members.

Public Types

enum | { IDD = IDD_SET_TABSTOPS }

Public Member Functions

CSetTabStops (CWnd *pParent=NULL)

Public Attributes

UINT m_nTabStops

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file tabstop.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file tabstop.h.

{ IDD = IDD_SET_TABSTOPS };

Constructor & Destructor Documentation

CSetTabStops::CSetTabStops ( CWnd * pParent = NULL )

Definition at line 26 of file tabstop.cpp.

  : CDialog(CSetTabStops::IDD, pParent)
{
  //{{AFX_DATA_INIT(CSetTabStops)
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CSetTabStops::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 33 of file tabstop.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CSetTabStops)
  DDX_Text(pDX, IDC_EDIT_TABS, m_nTabStops);
  DDV_MinMaxUInt(pDX, m_nTabStops, 1, 16);
  //}}AFX_DATA_MAP
}

Member Data Documentation

UINT CSetTabStops::m_nTabStops

Definition at line 26 of file tabstop.h.

The documentation for this class was generated from the following files:
  • ole/superpad/tabstop.h
  • ole/superpad/tabstop.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CShape Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CShape Class Reference

#include "shapeobj.h"

List of all members.

Public Member Functions

CShape ()
CShape (SHAPE_COLOR_ENUM colorenum, SHAPE_STYLE shapestyle, CRect &rect)
void | Draw (CDC *pDC, BOOL bSelected)
virtual void | Serialize (CArchive &ar)

Public Attributes

CRect | m_rect
SHAPE_COLOR m_shapecolor
SHAPE_STYLE m_shapestyle

Detailed Description

Definition at line 36 of file shapeobj.h.

Constructor & Destructor Documentation

CShape::CShape ( )

Definition at line 24 of file shapeobj.cpp.

{
  m_shapecolor = black;
  m_shapestyle = rectangle;
  m_rect = CRect(0,0,0,0);
}

CShape::CShape | ( | SHAPE_COLOR_ENUM | colorenum,
 |  | SHAPE_STYLE | shapestyle,
 |  | CRect & | rect
 | ) |  |

Definition at line 31 of file shapeobj.cpp.

  : m_shapestyle(shapestyle), m_rect(rect)
{
  m_shapecolor.e = colorenum;
}

Member Function Documentation

void CShape::Draw | ( | CDC * | pDC,
 |  | BOOL | bSelected
 | ) |  |

Definition at line 38 of file shapeobj.cpp.

{
  CPen* pPenOld = NULL;
  CPen penNew;
  if (bSelected)
  {
    penNew.CreatePen(PS_DOT, 1, RGB(0,0,0));
    pPenOld = pDC->SelectObject(&penNew);
  }

  CBrush brushNew((COLORREF)m_shapecolor);
  CBrush* pBrushOld = pDC->SelectObject(&brushNew);
  switch (m_shapestyle)
  {
    case rectangle:
      pDC->Rectangle(m_rect);
      break;
    case rounded_rectangle:
      pDC->RoundRect(m_rect,
        CPoint(m_rect.Width()/8, m_rect.Height()/8));
      break;
    case ellipse:
      pDC->Ellipse(m_rect);
      break;
  }

  pDC->SelectObject(pBrushOld);
  if (pPenOld != NULL)
    pDC->SelectObject(pPenOld);
}

void CShape::Serialize ( CArchive & ar ) [virtual]

Definition at line 69 of file shapeobj.cpp.

{
  if (ar.IsStoring())
  {
    ar << (WORD)m_shapecolor.e;
    ar << (WORD)m_shapestyle;
    ar << m_rect;
  }
  else
  {
    WORD n;
    ar >> n;
    m_shapecolor.e = (SHAPE_COLOR_ENUM)n;
    ar >> n;
    m_shapestyle = (SHAPE_STYLE)n;
    ar >> m_rect;
  }
}

Member Data Documentation

CRect CShape::m_rect

Definition at line 45 of file shapeobj.h.

SHAPE_COLOR CShape::m_shapecolor

Definition at line 43 of file shapeobj.h.

SHAPE_STYLE CShape::m_shapestyle

Definition at line 44 of file shapeobj.h.

The documentation for this class was generated from the following files:
  • general/propdlg/shapeobj.h
  • general/propdlg/shapeobj.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CShapePreviewWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions | Friends

CShapePreviewWnd Class Reference

#include "preview.h"

List of all members.

Private Member Functions

CShapePreviewWnd ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Friends

class | CModalShapePropSheet

Detailed Description

Definition at line 14 of file preview.h.

Constructor & Destructor Documentation

CShapePreviewWnd::CShapePreviewWnd ( ) [private]

Definition at line 27 of file preview.cpp.

{
}

Member Function Documentation

BOOL CShapePreviewWnd::OnEraseBkgnd ( CDC * pDC ) [private]

Definition at line 45 of file preview.cpp.

{
  // Use the same background color as that of the dialog
  //  (property sheet).

  CWnd* pParentWnd = GetParent();
  HBRUSH hBrush = (HBRUSH)pParentWnd->SendMessage(WM_CTLCOLORDLG,
    (WPARAM)pDC->m_hDC, (LPARAM)pParentWnd->m_hWnd);
  CRect rect;
  GetClientRect(rect);
  pDC->FillRect(&rect, CBrush::FromHandle(hBrush));
  return TRUE;
}

void CShapePreviewWnd::OnPaint ( ) [private]

Definition at line 31 of file preview.cpp.

{
  CPaintDC dc(this);
  CModalShapePropSheet* pShapePropSheet =
    STATIC_DOWNCAST(CModalShapePropSheet, GetParent());
  CRect rect;
  GetClientRect(rect);
  CShape shape(
    (SHAPE_COLOR_ENUM)pShapePropSheet->m_colorPage.m_nColor,
    (SHAPE_STYLE)pShapePropSheet->m_stylePage.m_nShapeStyle,
    rect);
  shape.Draw(&dc, FALSE);
}

Friends And Related Function Documentation

friend class CModalShapePropSheet [friend]

Definition at line 16 of file preview.h.

The documentation for this class was generated from the following files:
  • general/propdlg/preview.h
  • general/propdlg/preview.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CShapePropSheetFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CShapePropSheetFrame Class Reference

#include "minifrm.h"

List of all members.

Public Member Functions

CShapePropSheetFrame ()

Public Attributes

CModelessShapePropSheet * m_pModelessShapePropSheet

Protected Member Functions

afx_msg void | OnActivate (UINT nState, CWnd *pWndOther, BOOL bMinimized)
afx_msg void | OnClose ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnSetFocus (CWnd *pOldWnd)

Detailed Description

Definition at line 12 of file minifrm.h.

Constructor & Destructor Documentation

CShapePropSheetFrame::CShapePropSheetFrame ( )

Definition at line 29 of file minifrm.cpp.

{
  m_pModelessShapePropSheet = NULL;
}

Member Function Documentation

void CShapePropSheetFrame::OnActivate | ( | UINT | nState,
 |  | CWnd * | pWndOther,
 |  | BOOL | bMinimized |
 | ) |  |  | [protected]

Definition at line 81 of file minifrm.cpp.

{
  CMiniFrameWnd::OnActivate(nState, pWndOther, bMinimized);

  // Forward any WM_ACTIVATEs to the property sheet...
  // Like the dialog manager itself, it needs them to save/restore the focus.
  ASSERT_VALID(m_pModelessShapePropSheet);

  // Use GetCurrentMessage to get unmodified message data.
  const MSG* pMsg = GetCurrentMessage();
  ASSERT(pMsg->message == WM_ACTIVATE);
  m_pModelessShapePropSheet->SendMessage(pMsg->message, pMsg->wParam,
    pMsg->lParam);
}

void CShapePropSheetFrame::OnClose ( ) [protected]

Definition at line 67 of file minifrm.cpp.

{
  // Instead of closing the modeless property sheet, just hide it.
  CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
  pMainFrame->HideModelessPropSheet();
}

int CShapePropSheetFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 34 of file minifrm.cpp.

{
  if (CMiniFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  m_pModelessShapePropSheet = new CModelessShapePropSheet(this);
  if (!m_pModelessShapePropSheet->Create(this,
    WS_CHILD | WS_VISIBLE, 0))
  {
    delete m_pModelessShapePropSheet;
    m_pModelessShapePropSheet = NULL;
    return -1;
  }

  // Resize the mini frame so that it fits around the child property
  // sheet.
  CRect rectClient, rectWindow;
  m_pModelessShapePropSheet->GetWindowRect(rectClient);
  rectWindow = rectClient;

  // CMiniFrameWnd::CalcWindowRect adds the extra width and height
  // needed from the mini frame.
  CalcWindowRect(rectWindow);
  SetWindowPos(NULL, rectWindow.left, rectWindow.top,
    rectWindow.Width(), rectWindow.Height(),
    SWP_NOZORDER | SWP_NOACTIVATE);
  m_pModelessShapePropSheet->SetWindowPos(NULL, 0, 0,
    rectClient.Width(), rectClient.Height(),
    SWP_NOZORDER | SWP_NOACTIVATE);

  return 0;
}

void CShapePropSheetFrame::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 74 of file minifrm.cpp.

{
  // Forward focus to the embedded property sheet
  ASSERT_VALID(m_pModelessShapePropSheet);
  m_pModelessShapePropSheet->SetFocus();
}

Member Data Documentation

CModelessShapePropSheet* CShapePropSheetFrame::m_pModelessShapePropSheet

Definition at line 20 of file minifrm.h.

The documentation for this class was generated from the following files:
  • general/propdlg/minifrm.h
  • general/propdlg/minifrm.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CShapesDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CShapesDoc Class Reference

#include "shapedoc.h"

List of all members.

Public Member Functions

virtual | ~CShapesDoc ()
void | AddShape (CShape *pShapeNew)
CShape * | HitTest (CPoint pt)
virtual void | Serialize (CArchive &ar)

Public Attributes

CTypedPtrList< CObList, CShape * > | m_shapeList

Protected Member Functions

CShapesDoc ()
virtual BOOL | OnNewDocument ()

Detailed Description

Definition at line 14 of file shapedoc.h.

Constructor & Destructor Documentation

CShapesDoc::CShapesDoc ( ) [protected]

Definition at line 36 of file shapedoc.cpp.

{
}

CShapesDoc::~CShapesDoc ( ) [virtual]

Definition at line 40 of file shapedoc.cpp.

{
  POSITION pos = m_shapeList.GetHeadPosition();
  while (pos != NULL)
  {
    delete m_shapeList.GetNext(pos);
  }
}

Member Function Documentation

void CShapesDoc::AddShape ( CShape * pShapeNew )

Definition at line 68 of file shapedoc.cpp.

{
  m_shapeList.AddHead(pShapeNew);
  UpdateAllViews(NULL);
  SetModifiedFlag();
}

CShape * CShapesDoc::HitTest ( CPoint pt )

Definition at line 75 of file shapedoc.cpp.

{
  CShape* pShapeHit;
  POSITION pos = m_shapeList.GetHeadPosition();
  while (pos != NULL)
  {
    pShapeHit = m_shapeList.GetNext(pos);
    if (pShapeHit->m_rect.PtInRect(pt))
      return pShapeHit;
  }
  return NULL;
}

BOOL CShapesDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 49 of file shapedoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  CRect rect(20,20,120,120);

  CShape* pShapeNew = new CShape(
    black,
    rectangle,
    rect);
  AddShape(pShapeNew);

  return TRUE;
}

void CShapesDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 91 of file shapedoc.cpp.

{
  m_shapeList.Serialize(ar);
}

Member Data Documentation

CTypedPtrList<CObList, CShape*> CShapesDoc::m_shapeList

Definition at line 22 of file shapedoc.h.

The documentation for this class was generated from the following files:
  • general/propdlg/shapedoc.h
  • general/propdlg/shapedoc.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CShapesView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CShapesView Class Reference

#include "shapesvw.h"

List of all members.

Public Member Functions

virtual | ~CShapesView ()
CShapesDoc * GetDocument ()
CModelessShapePropSheet * GetModelessShapePropSheet ()
virtual void | OnDraw (CDC *pDC)

Public Attributes

CShape * m_pShapeSelected

Protected Member Functions

CShapesView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg LRESULT | OnChangeObjectProps (WPARAM wParam, LPARAM lParam)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnPropertySheetWithPreview ()
afx_msg void | OnSimplePropertySheet ()
afx_msg void | OnUpdatePropertySheetWithPreview (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSimplePropertySheet (CCmdUI *pCmdUI)

Protected Attributes

CModalShapePropSheet * m_pModalShapePropSheet

Detailed Description

Definition at line 12 of file shapesvw.h.

Constructor & Destructor Documentation

CShapesView::CShapesView ( ) [protected]

Definition at line 56 of file shapesvw.cpp.

{
  m_pShapeSelected = NULL;
  m_pModalShapePropSheet = NULL;
}

CShapesView::~CShapesView ( ) [virtual]

Definition at line 62 of file shapesvw.cpp.

{
}

Member Function Documentation

CShapesDoc * CShapesView::GetDocument ( ) [inline]

Definition at line 66 of file shapesvw.h.

   { return (CShapesDoc*)m_pDocument; }

CModelessShapePropSheet * CShapesView::GetModelessShapePropSheet ( )

Definition at line 70 of file shapesvw.cpp.

{
  CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
  if (pMainFrame->m_pShapePropFrame == NULL)
    return NULL;
  return pMainFrame->m_pShapePropFrame->m_pModelessShapePropSheet;
}

void CShapesView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 116 of file shapesvw.cpp.

{
}

LRESULT CShapesView::OnChangeObjectProps | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 296 of file shapesvw.cpp.

{
  // The user-defined WM_USER_CHANGE_OBJECT_PROPS message is sent
  // by the modal CModalShapePropSheet when the user chooses Apply Now,
  // or by the modeless CModelessShapePropSheet when the user
  // changes any setting in a property page.

  if (m_pShapeSelected == NULL)
    return 0;

  CModelessShapePropSheet* pModelessShapePropSheet
    = GetModelessShapePropSheet();
  if (pModelessShapePropSheet != NULL)
    pModelessShapePropSheet->SetShapePropsFromSheet(m_pShapeSelected);

  if (m_pModalShapePropSheet != NULL)
    m_pModalShapePropSheet->SetShapePropsFromSheet(m_pShapeSelected);

  GetDocument()->SetModifiedFlag();
  GetDocument()->UpdateAllViews(NULL);
  return 0;
}

void CShapesView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 81 of file shapesvw.cpp.

{
  CShapesDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CRect rectDirty, rectIntersect;
  pDC->GetClipBox(&rectDirty);
  if (rectDirty.IsRectNull())
    GetClientRect(&rectDirty);

  CShape* pShape;
  POSITION pos = pDoc->m_shapeList.GetTailPosition();
  // Draw all of the shapes, except the currently selected shape, from
  // back to front.
  while (pos != NULL)
  {
    pShape = pDoc->m_shapeList.GetPrev(pos);
    if (rectIntersect.IntersectRect(&pShape->m_rect, &rectDirty) != 0
      && pShape != m_pShapeSelected)
      pShape->Draw(pDC, FALSE);
  }
  // Draw the selected shape on top
  if (m_pShapeSelected != NULL)
    m_pShapeSelected->Draw(pDC, TRUE);
}

void CShapesView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 120 of file shapesvw.cpp.

{
}

void CShapesView::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 319 of file shapesvw.cpp.

{
  if (nChar == VK_ESCAPE)
  {
    CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
    pMainFrame->HideModelessPropSheet();
    return;
  }

  CView::OnKeyDown(nChar, nRepCnt, nFlags);
}

void CShapesView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 201 of file shapesvw.cpp.

{
  // Double-click anywhere brings up modeless property sheet.
  CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
  pMainFrame->OnMiniFramePropertySheet();
}

void CShapesView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 148 of file shapesvw.cpp.

{
  CShapesDoc* pDoc = GetDocument();
  CModelessShapePropSheet* pModelessShapePropSheet
    = GetModelessShapePropSheet();

  CClientDC dc(this);

  CShape* pShapeHit;
  pShapeHit = pDoc->HitTest(point);
  if (pShapeHit != NULL)
  {   // Select the object that was clicked.

    CRect rectInvalid;
    // Invalidate the previously selected object, so it will
    // be redrawn as unselected.
    if (m_pShapeSelected != NULL)
      InvalidateRect(&m_pShapeSelected->m_rect);
    m_pShapeSelected = pShapeHit;

    // Invalidate the newly selected object, so it will be
    // redrawn as selected.
    InvalidateRect(&m_pShapeSelected->m_rect);

    // If the modeless property is visible, update its
    // settings to reflect the newly selected shape.
    if (pModelessShapePropSheet != NULL
      && pModelessShapePropSheet->IsWindowVisible())
    {
       pModelessShapePropSheet->
         SetSheetPropsFromShape(m_pShapeSelected);
    }
  }
  else
  {   // Add a new shape

    CRect rect(point.x-50, point.y-50, point.x + 50, point.y + 50);
    CShape* pShapeNew = new CShape(
      black,
      rectangle,
      rect);
    pDoc->AddShape(pShapeNew);
    m_pShapeSelected = pShapeNew;
    // If the modeless property sheet exists, then apply its current
    // settings to the new shape.
    if (pModelessShapePropSheet != NULL)
    {
       pModelessShapePropSheet->
         SetShapePropsFromSheet(m_pShapeSelected);
    }
  }
}

BOOL CShapesView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 110 of file shapesvw.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CShapesView::OnPropertySheetWithPreview ( ) [protected]

Definition at line 240 of file shapesvw.cpp.

{
  if (m_pShapeSelected == NULL)
    return;

  // Save pointer to the modal property sheet so that when the
  // user choose Apply Now and the CModalShapePropSheet sends
  // the WM_USER_CHANGE_OBJECT_PROPERTIES message to the view,
  // the view can easily refer back to the property sheet
  // to get the current settings and apply them to the currently
  // selected object.
  m_pModalShapePropSheet = new CModalShapePropSheet;

  // Cannot use CModalShapePropSheet::SetSheetPropsFromShape here
  // because it was designed to be called from the handler of
  // the user-defined WM_USER_CHANGE_OBJECT_PROPS message when
  // the user chooses Apply Now.  The window for the modal
  // property sheet here has not been created yet.  Calling
  // SetSheetPropsFromShape would result in a failure in trying
  // to update the window.
  m_pModalShapePropSheet->m_stylePage.m_nShapeStyle
    = m_pShapeSelected->m_shapestyle;
  m_pModalShapePropSheet->m_colorPage.m_nColor = m_pShapeSelected->m_shapecolor;

  if (m_pModalShapePropSheet->DoModal() == IDOK)
  {
    m_pModalShapePropSheet->SetShapePropsFromSheet(m_pShapeSelected);
    GetDocument()->SetModifiedFlag();
    GetDocument()->UpdateAllViews(NULL);
  }
  delete m_pModalShapePropSheet;
  m_pModalShapePropSheet = NULL;
}

void CShapesView::OnSimplePropertySheet ( ) [protected]

Definition at line 209 of file shapesvw.cpp.

{
  if (m_pShapeSelected == NULL)
    return;

  CPropertySheet dlgPropertySheet(AFX_IDS_APP_TITLE);
  CStylePage stylePage;
  CColorPage colorPage;

  stylePage.m_nShapeStyle = m_pShapeSelected->m_shapestyle;
  colorPage.m_nColor = m_pShapeSelected->m_shapecolor;

  dlgPropertySheet.AddPage(&stylePage);
  dlgPropertySheet.AddPage(&colorPage);

  if (dlgPropertySheet.DoModal() == IDOK)
  {
    m_pShapeSelected->m_shapecolor = colorPage.m_nColor;
    m_pShapeSelected->m_shapestyle
      = (SHAPE_STYLE)stylePage.m_nShapeStyle;
    GetDocument()->SetModifiedFlag();
    GetDocument()->UpdateAllViews(NULL);
  }
}

void CShapesView::OnUpdatePropertySheetWithPreview ( CCmdUI * pCmdUI ) [protected]

Definition at line 274 of file shapesvw.cpp.

{
  BOOL bEnable = TRUE;
  if (m_pShapeSelected == NULL)
  {
    bEnable = FALSE;
  }
  else
  {
    CModelessShapePropSheet* pModelessShapePropSheet
      = GetModelessShapePropSheet();
    if (pModelessShapePropSheet != NULL
      && pModelessShapePropSheet->IsWindowVisible())
    {
      // Don't display modal property sheet if the modeless
      // property sheet is already displayed.
      bEnable = FALSE;
    }
  }
  pCmdUI->Enable(bEnable);
}

void CShapesView::OnUpdateSimplePropertySheet ( CCmdUI * pCmdUI ) [protected]

Definition at line 234 of file shapesvw.cpp.

{
  // Borrow logic from Property Sheet with Preview command.
  OnUpdatePropertySheetWithPreview(pCmdUI);
}

Member Data Documentation

CModalShapePropSheet* CShapesView::m_pModalShapePropSheet [protected]

Definition at line 23 of file shapesvw.h.

CShape* CShapesView::m_pShapeSelected

Definition at line 21 of file shapesvw.h.

The documentation for this class was generated from the following files:
  • general/propdlg/shapesvw.h
  • general/propdlg/shapesvw.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CShellTreeCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions

CShellTreeCtrl Class Reference

#include "MainFrm.h"

List of all members.

Private Member Functions

virtual BOOL OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult)

Detailed Description

Definition at line 32 of file MainFrm.h.

Member Function Documentation

virtual BOOL CShellTreeCtrl::OnNotify | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pResult |
 | ) |  |  | [inline, private, virtual]

Definition at line 34 of file MainFrm.h.

  {
    BOOL bRes = CMFCShellTreeCtrl::OnNotify(wParam, lParam, pResult);

    NMHDR* pNMHDR = (NMHDR*)lParam;
    ASSERT (pNMHDR != NULL);

    if (pNMHDR && pNMHDR->code == TTN_SHOW && GetToolTips () != NULL)
    {
      GetToolTips ()->SetWindowPos (&wndTop, -1, -1, -1, -1,
      SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE);
    }

    return bRes;
  }

The documentation for this class was generated from the following file:
  • vc2008fp/OutlookDemo/MainFrm.h
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSizeComboBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

CSizeComboBox Class Reference

#include "formatba.h"

Inherits CLocalComboBox.

List of all members.

Public Member Functions

CSizeComboBox ()
void | EnumFontSizes (CDC &dc, LPCTSTR pFontName)
int | GetTwipSize ()
void | InsertSize (int nSize)
void | SetTwipSize (int nSize)
void | TwipsToPointString (LPTSTR lpszBuf, int nTwips)

Static Public Member Functions

static BOOL FAR PASCAL | EnumSizeCallBack (LOGFONT FAR *lplf, LPNEWTEXTMETRIC lpntm, int FontType, LPVOID lpv)

Public Attributes

int | m_nLogVert
int | m_nTwipsLast

Detailed Description

Definition at line 106 of file formatba.h.

Constructor & Destructor Documentation

CSizeComboBox::CSizeComboBox ( )

Definition at line 585 of file formatba.cpp.

{
  m_nTwipsLast = 0;
}

Member Function Documentation

void CSizeComboBox::EnumFontSizes | ( | CDC & | dc,
 |  | LPCTSTR | pFontName
 | ) |  |

Definition at line 590 of file formatba.cpp.

{
  ResetContent();
  if (pFontName == NULL)
    return;
  if (pFontName[0] == NULL)
    return;

  ASSERT(dc.m_hDC != NULL);
  m_nLogVert = dc.GetDeviceCaps(LOGPIXELSY);

  ::EnumFontFamilies(dc.m_hDC, pFontName,
    (FONTENUMPROC) EnumSizeCallBack, (LPARAM) this);
}

BOOL CALLBACK AFX_EXPORT CSizeComboBox::EnumSizeCallBack | ( | LOGFONT FAR * | lplf,
 |  | LPNEWTEXTMETRIC | lpntm,
 |  | int | FontType,
 |  | LPVOID | lpv |
 | ) |  |  | [static]

Definition at line 657 of file formatba.cpp.

{
  CSizeComboBox* pThis = (CSizeComboBox*)lpv;
  ENSURE(pThis != NULL);
  TCHAR buf[10];
  if (
    (FontType & TRUETYPE_FONTTYPE) ||
    !( (FontType & TRUETYPE_FONTTYPE) || (FontType & RASTER_FONTTYPE) )
    ) // if truetype or vector font
  {
    // this occurs when there is a truetype and nontruetype version of a font
    if (pThis->GetCount() != 0)
      pThis->ResetContent();

    for (int i = 0; i < 16; i++)
    {
      _stprintf_s(buf, 10, _T("%d"), nFontSizes[i]);
      pThis->AddString(buf);
    }
    return FALSE; // don't call me again
  }
  // calc character height in pixels
  pThis->InsertSize(MulDiv(lpntm->tmHeight-lpntm->tmInternalLeading,
    1440, pThis->m_nLogVert));
  return TRUE; // call me again
}

int CSizeComboBox::GetTwipSize ( )

Definition at line 631 of file formatba.cpp.

{
  // return values
  // -2 -- error
  // -1 -- edit box empty
  // >=0 -- font size in twips
  CString str;
  GetTheText(str);
  LPCTSTR lpszText = str;

  while (*lpszText == ' ' || *lpszText == '\t')
    lpszText++;

  if (lpszText[0] == NULL)
    return -1; // no text in control

  double d = _tcstod(lpszText, (LPTSTR*)&lpszText);
  while (*lpszText == ' ' || *lpszText == '\t')
    lpszText++;

  if (*lpszText != NULL)
    return -2;   // not terminated properly

  return (d<0.) ? 0 : (int)(d*20.);
}

void CSizeComboBox::InsertSize ( int nSize )

Definition at line 685 of file formatba.cpp.

{
  ASSERT(nSize > 0);
  DWORD dwSize = (DWORD)nSize;
  TCHAR buf[10];
  TwipsToPointString(buf, nSize);
  if (FindStringExact(-1, buf) == CB_ERR)
  {
    int nIndex = -1;
    int nPos = 0;
    DWORD_PTR dw;
    while ((dw = GetItemData(nPos)) != CB_ERR)
    {
      if (dw > dwSize)
      {
        nIndex = nPos;
        break;
      }
      nPos++;
    }
    nIndex = InsertString(nIndex, buf);
    ASSERT(nIndex != CB_ERR);
    if (nIndex != CB_ERR)
      SetItemData(nIndex, dwSize);
  }
}

void CSizeComboBox::SetTwipSize ( int nSize )

Definition at line 620 of file formatba.cpp.

{
  if (nTwips != GetTwipSize())
  {
    TCHAR buf[10];
    TwipsToPointString(buf, nTwips);
    SetTheText(buf, TRUE);
  }
  m_nTwipsLast = nTwips;
}

void CSizeComboBox::TwipsToPointString | ( | LPTSTR | lpszBuf,
 |  | int | nTwips
 | ) |  |

Definition at line 605 of file formatba.cpp.

{
  ENSURE(lpszBuf != NULL);
  lpszBuf[0] = NULL;
  if (nTwips >= 0)
  {
    // round to nearest half point
    nTwips = (nTwips+5)/10;
    if ((nTwips%2) == 0)
      _stprintf_s(lpszBuf, 10, _T("%ld"), nTwips/2);
    else
      _stprintf_s(lpszBuf, 10, _T("%.1f"), (float)nTwips/2.F);
  }
}

Member Data Documentation

int CSizeComboBox::m_nLogVert

Definition at line 112 of file formatba.h.

int CSizeComboBox::m_nTwipsLast

Definition at line 113 of file formatba.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/formatba.h
  • ole/wordpad/formatba.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSliderApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSliderApp Class Reference

#include "Slider.h"

List of all members.

Public Member Functions

CSliderApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 24 of file Slider.h.

Constructor & Destructor Documentation

CSliderApp::CSliderApp ( )

Definition at line 39 of file Slider.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CSliderApp::ExitInstance ( ) [virtual]

Definition at line 109 of file Slider.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CSliderApp::InitInstance ( ) [virtual]

Definition at line 53 of file Slider.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  // 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(CSliderDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CSliderView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CSliderApp::OnAppAbout ( )

Definition at line 161 of file Slider.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • vc2008fp/Slider/Slider.h
  • vc2008fp/Slider/Slider.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSliderButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

CSliderButton Class Reference

#include "SliderButton.h"

List of all members.

Public Member Functions

CSliderButton ()
CSliderButton (UINT uiId, int iImage=-1, DWORD dwStyle=0, int iWidth=0)
virtual | ~CSliderButton ()
virtual BOOL | CanBeStretched () const
virtual void | CopyFrom (const CMFCToolBarButton &src)
virtual HWND | GetHwnd ()
virtual BOOL | HaveHotBorder () const
virtual SIZE | OnCalculateSize (CDC *pDC, const CSize &sizeDefault, BOOL bHorz)
virtual void | OnChangeParentWnd (CWnd *pWndParent)
virtual void | OnDraw (CDC *, const CRect &, CMFCToolBarImages *, BOOL=TRUE, BOOL=FALSE, BOOL=FALSE, BOOL=TRUE, BOOL=TRUE)
virtual void | OnMove ()
virtual void | OnShow (BOOL bShow)
virtual void | OnSize (int iSize)
virtual void | Serialize (CArchive &ar)
void | SetRange (int iMin, int iMax)
void | SetValue (int iValue, BOOL bNotify=TRUE)

Static Public Member Functions

static int | GetPos (UINT uiCmd)

Public Attributes

DWORD | m_dwStyle
int | m_iWidth
int | m_nMax
int | m_nMin
int | m_nValue
CCustomSliderCtrl m_wndSlider

Detailed Description

Definition at line 45 of file SliderButton.h.

Constructor & Destructor Documentation

CSliderButton::CSliderButton ( )

Definition at line 31 of file SliderButton.cpp.

                             :
  m_wndSlider (*this)
{
  m_dwStyle = WS_CHILD | WS_VISIBLE | TBS_HORZ | TBS_NOTICKS;
  m_iWidth = nDefaultWidth;
  m_nMin = 0;
  m_nMax = 0;
  m_nValue = 0;
}

CSliderButton::CSliderButton | ( | UINT | uiId,
 |  | int | iImage = -1,
 |  | DWORD | dwStyle = 0,
 |  | int | iWidth = 0
 | ) |  |

Definition at line 41 of file SliderButton.cpp.

                  :
  CMFCToolBarButton (uiId, iImage),
  m_wndSlider (*this)
{
  m_dwStyle = dwStyle | WS_CHILD | WS_VISIBLE | TBS_HORZ | TBS_NOTICKS;
  m_iWidth = (iWidth == 0) ? nDefaultWidth : iWidth;
  m_nMin = 0;
  m_nMax = 0;
  m_nValue = 0;
}

CSliderButton::~CSliderButton ( ) [virtual]

Definition at line 58 of file SliderButton.cpp.

{
  if (m_wndSlider.GetSafeHwnd () != NULL)
  {
    m_wndSlider.DestroyWindow ();
  }
}

Member Function Documentation

virtual BOOL CSliderButton::CanBeStretched ( ) const [inline, virtual]

Definition at line 76 of file SliderButton.h.

  {
    return TRUE;
  }

void CSliderButton::CopyFrom ( const CMFCToolBarButton & src ) [virtual]

Definition at line 187 of file SliderButton.cpp.

{
  CMFCToolBarButton::CopyFrom (s);

  const CSliderButton& src = (const CSliderButton&) s;

  m_dwStyle = src.m_dwStyle;
  m_iWidth = src.m_iWidth;
  m_nMin = src.m_nMin;
  m_nMax = src.m_nMax;
  m_nValue = src.m_nValue;
}

virtual HWND CSliderButton::GetHwnd ( ) [inline, virtual]

Definition at line 71 of file SliderButton.h.

  {
    return m_wndSlider.GetSafeHwnd ();
  }

int CSliderButton::GetPos ( UINT uiCmd ) [static]

Definition at line 264 of file SliderButton.cpp.

{
  CObList listButtons;
  if (CMFCToolBar::GetCommandButtons (uiCmd, listButtons) > 0)
  {
    for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
    {
      CSliderButton* pSlider = DYNAMIC_DOWNCAST (CSliderButton,
                        listButtons.GetNext (pos));
      if (pSlider != NULL && pSlider->GetHwnd () != NULL)
      {
        return pSlider->m_wndSlider.GetPos ();
      }
    }
  }

  return -1;
}

virtual BOOL CSliderButton::HaveHotBorder ( ) const [inline, virtual]

Definition at line 81 of file SliderButton.h.

  {
    return FALSE;
  }

SIZE CSliderButton::OnCalculateSize | ( | CDC * | pDC,
 |  | const CSize & | sizeDefault,
 |  | BOOL | bHorz |
 | ) |  |  | [virtual]

Definition at line 66 of file SliderButton.cpp.

{
  if (!IsVisible ())
  {
    if (m_wndSlider.GetSafeHwnd () != NULL)
    {
      m_wndSlider.ShowWindow (SW_HIDE);
    }

    return CSize (0,0);
  }

  if (bHorz)
  {
    if (m_wndSlider.GetSafeHwnd () != NULL && !IsHidden ())
    {
      m_wndSlider.ShowWindow (SW_SHOWNOACTIVATE);
      m_wndSlider.ModifyStyle (TBS_VERT, TBS_HORZ);
    }

    return CSize (m_iWidth, nDefaultHeight);
  }
  else
  {
    if (m_wndSlider.GetSafeHwnd () != NULL && !IsHidden ())
    {
      m_wndSlider.ShowWindow (SW_SHOWNOACTIVATE);
      m_wndSlider.ModifyStyle (TBS_HORZ, TBS_VERT);
    }

    return CSize (nDefaultHeight, m_iWidth);
  }
}

void CSliderButton::OnChangeParentWnd ( CWnd * pWndParent ) [virtual]

Definition at line 155 of file SliderButton.cpp.

{
  if (m_wndSlider.GetSafeHwnd () != NULL)
  {
    CWnd* pWndParentCurr = m_wndSlider.GetParent ();
    ASSERT (pWndParentCurr != NULL);

    if (pWndParent != NULL && pWndParentCurr != NULL &&
      pWndParentCurr->GetSafeHwnd () == pWndParent->GetSafeHwnd ())
    {
      return;
    }

    m_wndSlider.DestroyWindow ();
  }

  if (pWndParent == NULL || pWndParent->GetSafeHwnd () == NULL)
  {
    return;
  }

  if (!m_wndSlider.Create (m_dwStyle, m_rect, pWndParent, m_nID))
  {
    ASSERT (FALSE);
    return;
  }

  m_wndSlider.SetRange (m_nMin, m_nMax);
  m_wndSlider.SetPos (m_nValue);
  m_wndSlider.SetOwner (pWndParent->GetTopLevelFrame ());
}

virtual void CSliderButton::OnDraw | ( | CDC * | ,
 |  | const CRect & | ,
 |  | CMFCToolBarImages * | ,
 |  | BOOL | = TRUE,
 |  | BOOL | = FALSE,
 |  | BOOL | = FALSE,
 |  | BOOL | = TRUE,
 |  | BOOL | = TRUE |
 | ) |  |  | [inline, virtual]

Definition at line 86 of file SliderButton.h.

                                                  {}

void CSliderButton::OnMove ( ) [virtual]

Definition at line 130 of file SliderButton.cpp.

{
  if (m_wndSlider.GetSafeHwnd () != NULL &&
    (m_wndSlider.GetStyle () & WS_VISIBLE))
  {
    m_wndSlider.SetWindowPos (NULL,
      m_rect.left + 1, m_rect.top + 1, m_rect.Width () - 2, m_rect.Height () - 2,
      SWP_NOZORDER | SWP_NOACTIVATE);
  }
}

void CSliderButton::OnShow ( BOOL bShow ) [virtual]

Definition at line 283 of file SliderButton.cpp.

{
  if (m_wndSlider.GetSafeHwnd () != NULL)
  {
    if (bShow)
    {
      m_wndSlider.ShowWindow (SW_SHOWNOACTIVATE);
      OnMove ();
    }
    else
    {
      m_wndSlider.ShowWindow (SW_HIDE);
    }
  }
}

void CSliderButton::OnSize ( int iSize ) [virtual]

Definition at line 141 of file SliderButton.cpp.

{
  m_iWidth = iSize;
  m_rect.right = m_rect.left + m_iWidth;

  if (m_wndSlider.GetSafeHwnd () != NULL &&
    (m_wndSlider.GetStyle () & WS_VISIBLE))
  {
    m_wndSlider.SetWindowPos (NULL,
      m_rect.left + 1, m_rect.top + 1, m_rect.Width () - 2, m_rect.Height () - 2,
      SWP_NOZORDER | SWP_NOACTIVATE);
  }
}

void CSliderButton::Serialize ( CArchive & ar ) [virtual]

Definition at line 100 of file SliderButton.cpp.

{
  CMFCToolBarButton::Serialize (ar);

  if (ar.IsLoading ())
  {
    ar >> m_iWidth;
    ar >> m_dwStyle;

    int   nMin;
    int   nMax;
    int   nValue;

    ar >> nMin;
    ar >> nMax;
    ar >> nValue;

    SetRange (nMin, nMax);
    SetValue (nValue, FALSE);
  }
  else
  {
    ar << m_iWidth;
    ar << m_dwStyle;
    ar << m_nMin;
    ar << m_nMax;
    ar << m_nValue;
  }
}

void CSliderButton::SetRange | ( | int | iMin,
 |  | int | iMax
 | ) |  |

Definition at line 200 of file SliderButton.cpp.

{
  m_nMin = iMin;
  m_nMax = iMax;

  if (m_wndSlider.GetSafeHwnd () != NULL)
  {
    m_wndSlider.SetRange (iMin, iMax, TRUE);
  }

  CObList listButtons;
  if (CMFCToolBar::GetCommandButtons (m_nID, listButtons) > 0)
  {
    for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
    {
      CSliderButton* pSlider = DYNAMIC_DOWNCAST (CSliderButton,
                        listButtons.GetNext (pos));
      if (pSlider != NULL && pSlider != this)
      {
        pSlider->m_nMin = iMin;
        pSlider->m_nMax = iMax;

        if (pSlider->m_wndSlider.GetSafeHwnd () != NULL)
        {
          pSlider->m_wndSlider.SetRange (iMin, iMax, TRUE);
        }
      }
    }
  }
}

void CSliderButton::SetValue | ( | int | iValue,
 |  | BOOL | bNotify = TRUE
 | ) |  |

Definition at line 231 of file SliderButton.cpp.

{
  m_nValue = iValue;
  if (GetHwnd () != NULL)
  {
    m_wndSlider.SetPos (iValue);
  }

  CObList listButtons;
  if (CMFCToolBar::GetCommandButtons (m_nID, listButtons) > 0)
  {
    for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
    {
      CSliderButton* pSlider = DYNAMIC_DOWNCAST (CSliderButton,
                        listButtons.GetNext (pos));
      if (pSlider != NULL && pSlider != this)
      {
        pSlider->m_nValue = iValue;

        if (pSlider->GetHwnd () != NULL)
        {
          pSlider->m_wndSlider.SetPos (iValue);
        }
      }
    }
  }

  if (bNotify && m_wndSlider.GetSafeHwnd () != NULL)
  {
    m_wndSlider.GetOwner ()->SendMessage (WM_COMMAND, m_nID);
  }
}

Member Data Documentation

DWORD CSliderButton::m_dwStyle

Definition at line 95 of file SliderButton.h.

int CSliderButton::m_iWidth

Definition at line 94 of file SliderButton.h.

int CSliderButton::m_nMax

Definition at line 97 of file SliderButton.h.

int CSliderButton::m_nMin

Definition at line 96 of file SliderButton.h.

int CSliderButton::m_nValue

Definition at line 98 of file SliderButton.h.

CCustomSliderCtrl CSliderButton::m_wndSlider

Definition at line 93 of file SliderButton.h.

The documentation for this class was generated from the following files:
  • vc2008fp/Slider/SliderButton.h
  • vc2008fp/Slider/SliderButton.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSliderCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CSliderCtrlPage Class Reference

#include "slidctrl.h"

List of all members.

Public Types

enum | { IDD = IDD_SLIDERCTRL }

Public Member Functions

CSliderCtrlPage ()
~CSliderCtrlPage ()

Public Attributes

BOOL | m_bAutoticks
BOOL | m_bEnablesel
BOOL | m_bFixed
BOOL | m_bNothumb
BOOL | m_bNoticks
int | m_iOrientation
int | m_iTickpos
CStatic | m_Notifications
CSliderCtrl | m_Slider
UINT m_uiLine
UINT m_uiPage
UINT m_uiRangeFrom
UINT m_uiRangeTo
UINT m_uiSelRangeFrom
UINT m_uiSelRangeTo
UINT m_uiTickFreq

Protected Member Functions

void | ChangeCtrlStyle (long lStyle, BOOL bSetBit=TRUE)
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAutoticks ()
afx_msg void | OnEnablesel ()
afx_msg void | OnFixed ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnLine ()
afx_msg void | OnNothumb ()
afx_msg void | OnNoticks ()
afx_msg void | OnOrientation ()
afx_msg void | OnPage ()
afx_msg void | OnPoint ()
afx_msg void | OnRangefrom ()
afx_msg void | OnRangeto ()
afx_msg void | OnSelrangefrom ()
afx_msg void | OnSelrangeto ()
afx_msg void | OnTickfreq ()

Detailed Description

Definition at line 18 of file slidctrl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 29 of file slidctrl.h.

{ IDD = IDD_SLIDERCTRL };

Constructor & Destructor Documentation

CSliderCtrlPage::CSliderCtrlPage ( )

Definition at line 31 of file slidctrl.cpp.

                                 : CPropertyPage(CSliderCtrlPage::IDD)
{
  //{{AFX_DATA_INIT(CSliderCtrlPage)
  m_bAutoticks = TRUE;
  m_bEnablesel = FALSE;
  m_bFixed = FALSE;
  m_uiLine = 10;
  m_bNothumb = FALSE;
  m_bNoticks = FALSE;
  m_iOrientation = 0;
  m_uiPage = 50;
  m_iTickpos = 0;
  m_uiRangeFrom = 0;
  m_uiRangeTo = 100;
  m_uiSelRangeFrom = 20;
  m_uiSelRangeTo = 80;
  m_uiTickFreq = 20;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
}

CSliderCtrlPage::~CSliderCtrlPage ( )

Definition at line 52 of file slidctrl.cpp.

{
}

Member Function Documentation

void CSliderCtrlPage::ChangeCtrlStyle | ( | long | lStyle,
 |  | BOOL | bSetBit = TRUE |
 | ) |  |  | [protected]

Definition at line 107 of file slidctrl.cpp.

{
  long    lStyleOld;
  CRect   rect;

  lStyleOld = GetWindowLong( m_Slider.GetSafeHwnd(), GWL_STYLE );
  if ( bSetBit )
    lStyleOld |= lStyle;
  else
    lStyleOld &= ~lStyle;
  SetWindowLong( m_Slider.GetSafeHwnd(), GWL_STYLE, lStyleOld );
  m_Slider.GetWindowRect(&rect);
  m_Slider.InvalidateRect(&rect);
}

void CSliderCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 56 of file slidctrl.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CSliderCtrlPage)
  DDX_Control(pDX, IDC_NOTIFICATIONS, m_Notifications);
  DDX_Check(pDX, IDC_SLIDER_AUTOTICKS, m_bAutoticks);
  DDX_Check(pDX, IDC_SLIDER_ENABLESEL, m_bEnablesel);
  DDX_Check(pDX, IDC_SLIDER_FIXED, m_bFixed);
  DDX_Text(pDX, IDC_SLIDER_LINE, m_uiLine);
  DDV_MinMaxUInt(pDX, m_uiLine, 0, 65535);
  DDX_Check(pDX, IDC_SLIDER_NOTHUMB, m_bNothumb);
  DDX_Check(pDX, IDC_SLIDER_NOTICKS, m_bNoticks);
  DDX_CBIndex(pDX, IDC_SLIDER_ORIENTATION, m_iOrientation);
  DDX_Text(pDX, IDC_SLIDER_PAGE, m_uiPage);
  DDV_MinMaxUInt(pDX, m_uiPage, 0, 65535);
  DDX_CBIndex(pDX, IDC_SLIDER_POINT, m_iTickpos);
  DDX_Text(pDX, IDC_SLIDER_RANGEFROM, m_uiRangeFrom);
  DDV_MinMaxUInt(pDX, m_uiRangeFrom, 0, 65535);
  DDX_Text(pDX, IDC_SLIDER_RANGETO, m_uiRangeTo);
  DDV_MinMaxUInt(pDX, m_uiRangeTo, 0, 65535);
  DDX_Text(pDX, IDC_SLIDER_SELRANGEFROM, m_uiSelRangeFrom);
  DDV_MinMaxUInt(pDX, m_uiSelRangeFrom, 0, 65535);
  DDX_Text(pDX, IDC_SLIDER_SELRANGETO, m_uiSelRangeTo);
  DDV_MinMaxUInt(pDX, m_uiSelRangeTo, 0, 65535);
  DDX_Text(pDX, IDC_SLIDER_TICKFREQ, m_uiTickFreq);
  DDV_MinMaxUInt(pDX, m_uiTickFreq, 0, 65535);
  //}}AFX_DATA_MAP
}

void CSliderCtrlPage::OnAutoticks ( ) [protected]

Definition at line 145 of file slidctrl.cpp.

{
  UpdateData();

  // Shows tick marks according to increment/frequency when set (default frequency is 1)
  ChangeCtrlStyle( TBS_AUTOTICKS, m_bAutoticks );

  // Enable/disable edit controls
  GetDlgItem( IDC_SLIDER_TICKFREQ )->EnableWindow( m_bAutoticks );

  if ( m_bAutoticks )
    // Set tick marks with given frequency (1 = tick at every increment)
    m_Slider.SetTicFreq( m_uiTickFreq );    // Send TBM_SETTICFREQ - need TBS_AUTOTICKS
  else
    // Clear tick marks
    m_Slider.ClearTics( TRUE );
}

void CSliderCtrlPage::OnEnablesel ( ) [protected]

Definition at line 195 of file slidctrl.cpp.

{
  UpdateData();
  ChangeCtrlStyle( TBS_ENABLESELRANGE, m_bEnablesel );

  // Enable/disable edit controls
  GetDlgItem( IDC_SLIDER_SELRANGEFROM )->EnableWindow( m_bEnablesel );
  GetDlgItem( IDC_SLIDER_SELRANGETO )->EnableWindow( m_bEnablesel );

  if ( m_bEnablesel )
    // Set selection range
    m_Slider.SetSelection( m_uiSelRangeFrom, m_uiSelRangeTo );  // Send TBM_SETSEL
  else
    // Clear selection range
    m_Slider.ClearSel( TRUE );
}

void CSliderCtrlPage::OnFixed ( ) [protected]

Definition at line 187 of file slidctrl.cpp.

{
  UpdateData();

  // Fixes length of slider thumb when set (
  ChangeCtrlStyle( TBS_FIXEDLENGTH, m_bFixed );
}

BOOL CSliderCtrlPage::OnInitDialog ( ) [protected, virtual]

Definition at line 85 of file slidctrl.cpp.

{
  CPropertyPage::OnInitDialog();

  // Initially create slider control in horizontal position
  CWnd* pWnd =
    GetDlgItem( IDC_SLIDER_HORZPOS );
  CRect rect;
  pWnd->GetWindowRect( &rect );
  ScreenToClient( &rect );

  // Initialise controls
  m_Slider.Create( WS_VISIBLE|WS_CHILD|TBS_HORZ|TBS_BOTH|TBS_AUTOTICKS,
           rect, this, IDC_SLIDER );
  m_Slider.SetTicFreq( m_uiTickFreq );    // Send TBM_SETTICFREQ
  m_Slider.SetLineSize( m_uiLine );       // Send TBM_SETLINESIZE
  m_Slider.SetPageSize( m_uiPage );       // Send TBM_SETPAGESIZE
  m_Slider.SetRange( m_uiRangeFrom, m_uiRangeTo, TRUE );
                      // Send TBM_SETRANGE
  return TRUE;
}

void CSliderCtrlPage::OnLine ( ) [protected]

Definition at line 212 of file slidctrl.cpp.

{
  UpdateData();

  // Set line size (determines effect of arrow keys)
  m_Slider.SetLineSize( m_uiLine );       // Send TBM_SETLINESIZE
}

void CSliderCtrlPage::OnNothumb ( ) [protected]

Definition at line 179 of file slidctrl.cpp.

{
  UpdateData();

  // Removes thumb from slider control when set
  ChangeCtrlStyle( TBS_NOTHUMB, m_bNothumb );
}

void CSliderCtrlPage::OnNoticks ( ) [protected]

Definition at line 171 of file slidctrl.cpp.

{
  UpdateData();

  // Removes tick marks when set
  ChangeCtrlStyle( TBS_NOTICKS, m_bNoticks );
}

void CSliderCtrlPage::OnOrientation ( ) [protected]

Definition at line 244 of file slidctrl.cpp.

{
  UpdateData();

  // Obtain horz/vert place marker (static control)
  CWnd* pWnd =
    GetDlgItem( (0==m_iOrientation)?IDC_SLIDER_HORZPOS:IDC_SLIDER_VERTPOS );
  CRect rect;
  pWnd->GetWindowRect( &rect );
  ScreenToClient( &rect );

  // Set slider control style
  ChangeCtrlStyle( TBS_HORZ, (0 == m_iOrientation) );
  ChangeCtrlStyle( TBS_VERT, (1 == m_iOrientation) );

  // Move control to horz/vert position
  m_Slider.SetWindowPos( NULL,
               rect.left, rect.top,
               rect.Width(), rect.Height(),
               SWP_NOZORDER|SWP_SHOWWINDOW );
  Invalidate();
}

void CSliderCtrlPage::OnPage ( ) [protected]

Definition at line 220 of file slidctrl.cpp.

{
  UpdateData();

  // Set page size (determines effect of PageUp/PageDown keys)
  m_Slider.SetPageSize( m_uiPage );       // Send TBM_SETPAGESIZE
}

void CSliderCtrlPage::OnPoint ( ) [protected]

Definition at line 267 of file slidctrl.cpp.

{
  UpdateData();

  switch ( m_iTickpos )
  {
  case 0:
    ChangeCtrlStyle( TBS_BOTH );
    break;
  case 1:
    ChangeCtrlStyle( TBS_TOP );     // Same as TBS_LEFT
    ChangeCtrlStyle( TBS_BOTH, FALSE );
    ChangeCtrlStyle( TBS_BOTTOM, FALSE );
    break;
  case 2:
    ChangeCtrlStyle( TBS_BOTTOM );  // Same as TBS_RIGHT
    ChangeCtrlStyle( TBS_BOTH, FALSE );
    ChangeCtrlStyle( TBS_TOP, FALSE );
    break;
  default:
    break;
  }
}

void CSliderCtrlPage::OnRangefrom ( ) [protected]

Definition at line 228 of file slidctrl.cpp.

{
  UpdateData();

  // Set range of slider control
  m_Slider.SetRangeMin( m_uiRangeFrom, TRUE );    // Send TBM_SETRANGE
}

void CSliderCtrlPage::OnRangeto ( ) [protected]

Definition at line 236 of file slidctrl.cpp.

{
  UpdateData();

  // Set range of slider control
  m_Slider.SetRangeMax( m_uiRangeTo, TRUE );  // Send TBM_SETRANGE
}

void CSliderCtrlPage::OnSelrangefrom ( ) [protected]

Definition at line 291 of file slidctrl.cpp.

{
  UpdateData();
  m_Slider.ClearSel();
  m_Slider.SetSelection( m_uiSelRangeFrom, m_uiSelRangeTo );  // Send TBM_SETSEL
}

void CSliderCtrlPage::OnSelrangeto ( ) [protected]

Definition at line 298 of file slidctrl.cpp.

{
  UpdateData();
  m_Slider.ClearSel();
  m_Slider.SetSelection( m_uiSelRangeFrom, m_uiSelRangeTo );  // Send TBM_SETSEL
}

void CSliderCtrlPage::OnTickfreq ( ) [protected]

Definition at line 163 of file slidctrl.cpp.

{
  UpdateData();
  if ( m_bAutoticks )
    // Set tick marks at given frequency (1 = tick at every increment)
    m_Slider.SetTicFreq( m_uiTickFreq );    // Send TBM_SETTICFREQ - need TBS_AUTOTICKS
}

Member Data Documentation

BOOL CSliderCtrlPage::m_bAutoticks

Definition at line 31 of file slidctrl.h.

BOOL CSliderCtrlPage::m_bEnablesel

Definition at line 32 of file slidctrl.h.

BOOL CSliderCtrlPage::m_bFixed

Definition at line 33 of file slidctrl.h.

BOOL CSliderCtrlPage::m_bNothumb

Definition at line 35 of file slidctrl.h.

BOOL CSliderCtrlPage::m_bNoticks

Definition at line 36 of file slidctrl.h.

int CSliderCtrlPage::m_iOrientation

Definition at line 37 of file slidctrl.h.

int CSliderCtrlPage::m_iTickpos

Definition at line 39 of file slidctrl.h.

CStatic CSliderCtrlPage::m_Notifications

Definition at line 30 of file slidctrl.h.

CSliderCtrl CSliderCtrlPage::m_Slider

Definition at line 47 of file slidctrl.h.

UINT CSliderCtrlPage::m_uiLine

Definition at line 34 of file slidctrl.h.

UINT CSliderCtrlPage::m_uiPage

Definition at line 38 of file slidctrl.h.

UINT CSliderCtrlPage::m_uiRangeFrom

Definition at line 40 of file slidctrl.h.

UINT CSliderCtrlPage::m_uiRangeTo

Definition at line 41 of file slidctrl.h.

UINT CSliderCtrlPage::m_uiSelRangeFrom

Definition at line 42 of file slidctrl.h.

UINT CSliderCtrlPage::m_uiSelRangeTo

Definition at line 43 of file slidctrl.h.

UINT CSliderCtrlPage::m_uiTickFreq

Definition at line 44 of file slidctrl.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl2/slidctrl.h
  • general/CmnCtrl2/slidctrl.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSliderDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CSliderDoc Class Reference

#include "SliderDoc.h"

List of all members.

Public Member Functions

virtual | ~CSliderDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CSliderDoc ()

Detailed Description

Definition at line 13 of file SliderDoc.h.

Constructor & Destructor Documentation

CSliderDoc::CSliderDoc ( ) [protected]

Definition at line 33 of file SliderDoc.cpp.

{
  // TODO: add one-time construction code here

}

CSliderDoc::~CSliderDoc ( ) [virtual]

Definition at line 39 of file SliderDoc.cpp.

{
}

Member Function Documentation

BOOL CSliderDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file SliderDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CSliderDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file SliderDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/Slider/SliderDoc.h
  • vc2008fp/Slider/SliderDoc.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSliderProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CSliderProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CSliderProp (const CString &strName, long nValue, LPCTSTR lpszDescr=NULL, DWORD dwData=0)
virtual BOOL | OnUpdateValue ()

Protected Member Functions

virtual CWnd * | CreateInPlaceEdit (CRect rectEdit, BOOL &bDefaultFormat)
virtual BOOL | OnSetCursor () const

Detailed Description

Definition at line 43 of file CustomProperties.h.

Constructor & Destructor Documentation

CSliderProp::CSliderProp | ( | const CString & | strName,
 |  | long | nValue,
 |  | LPCTSTR | lpszDescr = NULL,
 |  | DWORD | dwData = 0
 | ) |  |

Definition at line 164 of file CustomProperties.cpp.

                                                                                :
  CMFCPropertyGridProperty(strName, nValue, lpszDescr, dwData)
{
}

Member Function Documentation

CWnd * CSliderProp::CreateInPlaceEdit | ( | CRect | rectEdit,
 |  | BOOL & | bDefaultFormat |
 | ) |  |  | [protected, virtual]

Definition at line 169 of file CustomProperties.cpp.

{
  CPropSliderCtrl* pWndSlider = new CPropSliderCtrl(this, m_pWndList->GetBkColor());

  rectEdit.left += rectEdit.Height() + 5;

  pWndSlider->Create(WS_VISIBLE | WS_CHILD, rectEdit, m_pWndList, AFX_PROPLIST_ID_INPLACE);
  pWndSlider->SetPos(m_varValue.lVal);

  bDefaultFormat = TRUE;
  return pWndSlider;
}

virtual BOOL CSliderProp::OnSetCursor ( ) const [inline, protected, virtual]

Definition at line 52 of file CustomProperties.h.

{ return FALSE; /* Use default */ }

BOOL CSliderProp::OnUpdateValue ( ) [virtual]

Definition at line 182 of file CustomProperties.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(m_pWndInPlace);
  ASSERT_VALID(m_pWndList);
  ASSERT(::IsWindow(m_pWndInPlace->GetSafeHwnd()));

  long lCurrValue = m_varValue.lVal;

  CSliderCtrl* pSlider = (CSliderCtrl*) m_pWndInPlace;

  m_varValue = (long) pSlider->GetPos();

  if (lCurrValue != m_varValue.lVal)
  {
    m_pWndList->OnPropertyChanged(this);
  }

  return TRUE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSliderView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CSliderView Class Reference

#include "SliderView.h"

List of all members.

Public Member Functions

virtual | ~CSliderView ()
CSliderDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CSliderView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file SliderView.h.

Constructor & Destructor Documentation

CSliderView::CSliderView ( ) [protected]

Definition at line 45 of file SliderView.cpp.

{
}

CSliderView::~CSliderView ( ) [virtual]

Definition at line 49 of file SliderView.cpp.

{
}

Member Function Documentation

CSliderDoc * CSliderView::GetDocument ( ) [inline]

Definition at line 50 of file SliderView.h.

   { return (CSliderDoc*)m_pDocument; }

void CSliderView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 119 of file SliderView.cpp.

{
  // TODO: add extra initialization before printing
}

void CSliderView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 64 of file SliderView.cpp.

{
//  CSliderDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);
}

void CSliderView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 124 of file SliderView.cpp.

{
  // TODO: add cleanup after printing
}

void CSliderView::OnFilePrintPreview ( ) [protected]

Definition at line 108 of file SliderView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CSliderView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 113 of file SliderView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CSliderView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 53 of file SliderView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/Slider/SliderView.h
  • vc2008fp/Slider/SliderView.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSmartFuncDesc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CSmartFuncDesc Class Reference

#include "TypeAttr.H"

List of all members.

Public Member Functions

CSmartFuncDesc (ITypeInfo *pTypeInfo)
~CSmartFuncDesc ()
operator const FUNCDESC * () const
FUNCDESC ** | operator& ()
FUNCDESC * | operator-> ()
void | Release ()

Protected Attributes

FUNCDESC * | m_pFuncDesc
ITypeInfoPtr | m_pTypeInfo

Detailed Description

Definition at line 48 of file TypeAttr.H.

Constructor & Destructor Documentation

CSmartFuncDesc::CSmartFuncDesc ( ITypeInfo * pTypeInfo )

Definition at line 94 of file TypeAttr.Cpp.

                                                     :
   m_pFuncDesc( NULL ),
   m_pTypeInfo( pTypeInfo )
{
}

CSmartFuncDesc::~CSmartFuncDesc ( )

Definition at line 100 of file TypeAttr.Cpp.

{
   Release();
}

Member Function Documentation

CSmartFuncDesc::operator const FUNCDESC * ( ) const

Definition at line 119 of file TypeAttr.Cpp.

{
   return( m_pFuncDesc );
}

FUNCDESC ** CSmartFuncDesc::operator& ( )

Definition at line 112 of file TypeAttr.Cpp.

{
   ASSERT( m_pFuncDesc == NULL );

   return( &m_pFuncDesc );
}

FUNCDESC * CSmartFuncDesc::operator-> ( )

Definition at line 105 of file TypeAttr.Cpp.

{
   ASSERT( m_pFuncDesc != NULL );

   return( m_pFuncDesc );
}

void CSmartFuncDesc::Release ( )

Definition at line 124 of file TypeAttr.Cpp.

{
   if( m_pFuncDesc != NULL )
   {
    ASSERT( m_pTypeInfo != NULL );
    m_pTypeInfo->ReleaseFuncDesc( m_pFuncDesc );
    m_pFuncDesc = NULL;
   }
}

Member Data Documentation

FUNCDESC* CSmartFuncDesc::m_pFuncDesc [protected]

Definition at line 64 of file TypeAttr.H.

ITypeInfoPtr CSmartFuncDesc::m_pTypeInfo [protected]

Definition at line 65 of file TypeAttr.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TypeAttr.H
  • ole/TstCon/TypeAttr.Cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSmartTypeAttr Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CSmartTypeAttr Class Reference

#include "TypeAttr.H"

List of all members.

Public Member Functions

CSmartTypeAttr (ITypeInfo *pTypeInfo)
~CSmartTypeAttr ()
TYPEATTR ** | operator& ()
TYPEATTR * | operator-> ()
void | Release ()

Protected Attributes

TYPEATTR * | m_pTypeAttr
ITypeInfoPtr | m_pTypeInfo

Detailed Description

Definition at line 10 of file TypeAttr.H.

Constructor & Destructor Documentation

CSmartTypeAttr::CSmartTypeAttr ( ITypeInfo * pTypeInfo )

Definition at line 19 of file TypeAttr.Cpp.

                                                     :
   m_pTypeAttr( NULL ),
   m_pTypeInfo( pTypeInfo )
{
}

CSmartTypeAttr::~CSmartTypeAttr ( )

Definition at line 25 of file TypeAttr.Cpp.

{
   Release();
}

Member Function Documentation

TYPEATTR ** CSmartTypeAttr::operator& ( )

Definition at line 37 of file TypeAttr.Cpp.

{
   ASSERT( m_pTypeAttr == NULL );

   return( &m_pTypeAttr );
}

TYPEATTR * CSmartTypeAttr::operator-> ( )

Definition at line 30 of file TypeAttr.Cpp.

{
   ASSERT( m_pTypeAttr != NULL );

   return( m_pTypeAttr );
}

void CSmartTypeAttr::Release ( )

Definition at line 44 of file TypeAttr.Cpp.

{
   if( m_pTypeAttr != NULL )
   {
    ASSERT( m_pTypeInfo != NULL );
    m_pTypeInfo->ReleaseTypeAttr( m_pTypeAttr );
    m_pTypeAttr = NULL;
   }
}

Member Data Documentation

TYPEATTR* CSmartTypeAttr::m_pTypeAttr [protected]

Definition at line 24 of file TypeAttr.H.

ITypeInfoPtr CSmartTypeAttr::m_pTypeInfo [protected]

Definition at line 25 of file TypeAttr.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TypeAttr.H
  • ole/TstCon/TypeAttr.Cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSmartVarDesc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CSmartVarDesc Class Reference

#include "TypeAttr.H"

List of all members.

Public Member Functions

CSmartVarDesc (ITypeInfo *pTypeInfo)
~CSmartVarDesc ()
operator const VARDESC * () const
VARDESC ** | operator& ()
VARDESC * | operator-> ()
void | Release ()

Protected Attributes

ITypeInfoPtr | m_pTypeInfo
VARDESC * | m_pVarDesc

Detailed Description

Definition at line 28 of file TypeAttr.H.

Constructor & Destructor Documentation

CSmartVarDesc::CSmartVarDesc ( ITypeInfo * pTypeInfo )

Definition at line 54 of file TypeAttr.Cpp.

                                                   :
   m_pVarDesc( NULL ),
   m_pTypeInfo( pTypeInfo )
{
}

CSmartVarDesc::~CSmartVarDesc ( )

Definition at line 60 of file TypeAttr.Cpp.

{
   Release();
}

Member Function Documentation

CSmartVarDesc::operator const VARDESC * ( ) const

Definition at line 79 of file TypeAttr.Cpp.

{
   return( m_pVarDesc );
}

VARDESC ** CSmartVarDesc::operator& ( )

Definition at line 72 of file TypeAttr.Cpp.

{
   ASSERT( m_pVarDesc == NULL );

   return( &m_pVarDesc );
}

VARDESC * CSmartVarDesc::operator-> ( )

Definition at line 65 of file TypeAttr.Cpp.

{
   ASSERT( m_pVarDesc != NULL );

   return( m_pVarDesc );
}

void CSmartVarDesc::Release ( )

Definition at line 84 of file TypeAttr.Cpp.

{
   if( m_pVarDesc != NULL )
   {
    ASSERT( m_pTypeInfo != NULL );
    m_pTypeInfo->ReleaseVarDesc( m_pVarDesc );
    m_pVarDesc = NULL;
   }
}

Member Data Documentation

ITypeInfoPtr CSmartVarDesc::m_pTypeInfo [protected]

Definition at line 45 of file TypeAttr.H.

VARDESC* CSmartVarDesc::m_pVarDesc [protected]

Definition at line 44 of file TypeAttr.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TypeAttr.H
  • ole/TstCon/TypeAttr.Cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSnapApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSnapApp Class Reference

#include "snapvw.h"

List of all members.

Public Member Functions

CSnapApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 23 of file snapvw.h.

Constructor & Destructor Documentation

CSnapApp::CSnapApp ( )

Definition at line 45 of file snapvw.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CSnapApp::InitInstance ( ) [virtual]

Definition at line 59 of file snapvw.cpp.

{
  // Register the application's document templates.  Document templates
  // serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_SNAPTYPE,
    RUNTIME_CLASS(CSnapDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CSnapView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    // free the memory
    delete pMainFrame;
    return FALSE;
  }
  m_pMainWnd = pMainFrame;

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CSnapApp::OnAppAbout ( )

Definition at line 144 of file snapvw.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/snapvw/snapvw.h
  • general/snapvw/snapvw.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSnapDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CSnapDoc Class Reference

#include "snapdoc.h"

List of all members.

Public Member Functions

virtual | ~CSnapDoc ()
virtual BOOL | OnNewDocument ()

Protected Member Functions

CSnapDoc ()

Detailed Description

Definition at line 14 of file snapdoc.h.

Constructor & Destructor Documentation

CSnapDoc::CSnapDoc ( ) [protected]

Definition at line 38 of file Snapdoc.cpp.

{
  // TODO: add one-time construction code here

}

CSnapDoc::~CSnapDoc ( ) [virtual]

Definition at line 44 of file Snapdoc.cpp.

{
}

Member Function Documentation

BOOL CSnapDoc::OnNewDocument ( ) [virtual]

Definition at line 48 of file Snapdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

The documentation for this class was generated from the following files:
  • general/snapvw/snapdoc.h
  • general/snapvw/Snapdoc.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSnapPropertySheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSnapPropertySheet Class Reference

#include "snapps.h"

List of all members.

Public Member Functions

CSnapPropertySheet ()
CSnapPropertySheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CSnapPropertySheet (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
virtual | ~CSnapPropertySheet ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Detailed Description

Definition at line 22 of file snapps.h.

Constructor & Destructor Documentation

CSnapPropertySheet::CSnapPropertySheet ( ) [inline]

Definition at line 28 of file snapps.h.

: CPropertySheet() { }

CSnapPropertySheet::CSnapPropertySheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 26 of file snapps.cpp.

  :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}

CSnapPropertySheet::CSnapPropertySheet | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |  |

Definition at line 31 of file snapps.cpp.

  :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
}

CSnapPropertySheet::~CSnapPropertySheet ( ) [virtual]

Definition at line 36 of file snapps.cpp.

{
}

Member Function Documentation

BOOL CSnapPropertySheet::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 50 of file snapps.cpp.

{
  // since CPropertySheet::PreTranslateMessage will eat frame window
  // accelerators, we call all frame windows' PreTranslateMessage first.
  CFrameWnd* pFrameWnd = GetParentFrame();   // start with first parent frame
  while (pFrameWnd != NULL)
  {
    // allow owner & frames to translate before IsDialogMessage does
    if (pFrameWnd->PreTranslateMessage(pMsg))
      return TRUE;

    // try parent frames until there are no parent frames
    pFrameWnd = pFrameWnd->GetParentFrame();
  }

  // otherwise, just let the sheet translate the message
  return CPropertySheet::PreTranslateMessage(pMsg);
}

The documentation for this class was generated from the following files:
  • general/snapvw/snapps.h
  • general/snapvw/snapps.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSnapView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CSnapView Class Reference

#include "snapview.h"

List of all members.

Public Member Functions

virtual | ~CSnapView ()
virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
CSnapDoc * GetDocument ()
virtual void | OnInitialUpdate ()

Protected Member Functions

CSnapView ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDraw (CDC *pDC)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

BOOL | m_bSizedBefore
CPropertyPage * | m_pPageBkfst
CPropertyPage * | m_pPageDinner
CPropertyPage * | m_pPageLunch
CPropertySheet * | m_pPropSheet

Detailed Description

Definition at line 14 of file snapview.h.

Constructor & Destructor Documentation

CSnapView::CSnapView ( ) [protected]

Definition at line 48 of file snapview.cpp.

                     : CFormView((LPCTSTR)NULL)
{
  //{{AFX_DATA_INIT(CSnapView)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
  // TODO: add construction code here

  m_bSizedBefore = FALSE;
  m_pPropSheet = NULL;
  m_pPageBkfst = NULL;
  m_pPageLunch = NULL;
  m_pPageDinner = NULL;

  m_hWndFocus = NULL;
}

CSnapView::~CSnapView ( ) [virtual]

Definition at line 64 of file snapview.cpp.

{
  // explicitly delete sheet and pages
  delete m_pPropSheet;
  delete m_pPageBkfst;
  delete m_pPageLunch;
  delete m_pPageDinner;
}

Member Function Documentation

BOOL CSnapView::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL |
 | ) |  |  | [virtual]

Definition at line 138 of file snapview.cpp.

{
  ENSURE(pParentWnd != NULL);
  ASSERT_KINDOF(CFrameWnd, pParentWnd);

  if (!CWnd::Create(lpszClassName, lpszWindowName, dwStyle | WS_CLIPCHILDREN,
    rect, pParentWnd, nID, pContext))
  {
    return FALSE;
  }

  // add your pages here!

  m_pPageBkfst = new CBkfstPage;
  m_pPageLunch = new CLunchPage;
  m_pPageDinner = new CDinnerPage;

  // create the window object

  m_pPropSheet = new CSnapPropertySheet;
  m_pPropSheet->AddPage(m_pPageBkfst);
  m_pPropSheet->AddPage(m_pPageLunch);
  m_pPropSheet->AddPage(m_pPageDinner);

  // create a modeless property page
  if (!m_pPropSheet->Create(this,
      DS_CONTEXTHELP | DS_SETFONT | WS_CHILD | WS_VISIBLE))
  {
    DestroyWindow();
    return FALSE;
  }

  m_pPropSheet->SetWindowPos(NULL, 0, 0, 0, 0,
      SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE);

  // we use the style from the template - but make sure that
  // the WS_BORDER bit is correct.
  // the WS_BORDER bit will be whatever is in dwRequestedStyle

  m_pPropSheet->ModifyStyle(WS_BORDER|WS_CAPTION,
    dwStyle & (WS_BORDER|WS_CAPTION));

  // Force the size requested.
  // Fake a call to OnSize()--it would have been called automatically
  // if this were using the base class implementation of Create().

  CFrameWnd* pParentFrame = GetParentFrame();
  CRect rectSize;
  m_pPropSheet->GetWindowRect(rectSize);
  pParentFrame->CalcWindowRect(rectSize);
  OnSize(SIZE_RESTORED, rectSize.Width(), rectSize.Height());

  return TRUE;
}

void CSnapView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 73 of file snapview.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CSnapView)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

CSnapDoc * CSnapView::GetDocument ( ) [inline]

Definition at line 75 of file snapview.h.

   { return (CSnapDoc*) m_pDocument; }

void CSnapView::OnDraw ( CDC * pDC ) [protected]

Definition at line 212 of file snapview.cpp.

{
  // we don't draw because the child window will do it all
}

BOOL CSnapView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 194 of file snapview.cpp.

{
  CBrush* pOldBrush;

  CBrush backBrush;
  backBrush.CreateSolidBrush(::GetSysColor(COLOR_3DLIGHT));
  backBrush.UnrealizeObject();

  CRect rectClient;
  GetClientRect(rectClient);

  pOldBrush = pDC->SelectObject(&backBrush);
  pDC->Rectangle(rectClient);

  pDC->SelectObject(pOldBrush);
  return TRUE;
}

void CSnapView::OnInitialUpdate ( ) [virtual]

Definition at line 217 of file snapview.cpp.

{
  CFormView::OnInitialUpdate();

  SetScaleToFitSize(CSize(1, 1));
}

void CSnapView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 109 of file snapview.cpp.

{
  if (nType != SIZE_MINIMIZED && cx != 0 && cy != 0 && m_pPropSheet != NULL)
  {
    if (m_bSizedBefore == FALSE)
    {
      m_bSizedBefore = TRUE;

      // get the size of the property sheet
      CRect rectSized;
      m_pPropSheet->GetWindowRect(rectSized);

      // calculate the size of the frame
      CFrameWnd* pFrame = GetParentFrame();
      if (pFrame != NULL)
      {
        pFrame->CalcWindowRect(rectSized);
        CWnd* pParent = pFrame->GetParent();

        if (pParent != NULL)
          pParent->ScreenToClient(rectSized);

        // resize and reposition the frame
        pFrame->MoveWindow(rectSized);
      }
    }
  }
}

Member Data Documentation

BOOL CSnapView::m_bSizedBefore [protected]

Definition at line 52 of file snapview.h.

CPropertyPage* CSnapView::m_pPageBkfst [protected]

Definition at line 59 of file snapview.h.

CPropertyPage* CSnapView::m_pPageDinner [protected]

Definition at line 61 of file snapview.h.

CPropertyPage* CSnapView::m_pPageLunch [protected]

Definition at line 60 of file snapview.h.

CPropertySheet* CSnapView::m_pPropSheet [protected]

Definition at line 55 of file snapview.h.

The documentation for this class was generated from the following files:
  • general/snapvw/snapview.h
  • general/snapvw/snapview.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSourceView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CSourceView Class Reference

#include "SourceView.h"

List of all members.

Public Member Functions

void | NewDocument ()
void | UpdateView ()

Protected Member Functions

CSourceView ()
virtual | ~CSourceView ()
virtual void | OnActivateView (BOOL bActivate, CView *pActivateView, CView *pDeactiveView)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual void | OnDraw (CDC *pDC)

Protected Attributes

CFont | m_font

Detailed Description

Definition at line 22 of file SourceView.h.

Constructor & Destructor Documentation

CSourceView::CSourceView ( ) [protected]

Definition at line 30 of file SourceView.cpp.

{
}

CSourceView::~CSourceView ( ) [protected, virtual]

Definition at line 34 of file SourceView.cpp.

{
}

Member Function Documentation

void CSourceView::NewDocument ( ) [inline]

Definition at line 31 of file SourceView.h.

  {
    this->DeleteContents();
  }

void CSourceView::OnActivateView | ( | BOOL | bActivate,
 |  | CView * | pActivateView,
 |  | CView * | pDeactiveView |
 | ) |  |  | [protected, virtual]

Definition at line 88 of file SourceView.cpp.

{
  if(bActivate && pActivateView==this && pDeactiveView != this)
  {
    //we're being activated get the HTML from the WebView
    UpdateView();
  }

  CEditView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}

int CSourceView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 70 of file SourceView.cpp.

{
  if (CEditView::OnCreate(lpCreateStruct) == -1)
    return -1;
  CEdit &edit = GetEditCtrl();

  //try for courier, if that fails, go for the ANSI fixed font
  if(!m_font.CreateFont(-MulDiv(10, GetDeviceCaps(edit.GetDC()->m_hDC, LOGPIXELSY), 72)
      ,0,0,0,FW_DONTCARE,0,0,0,ANSI_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS
      ,DEFAULT_QUALITY,DEFAULT_PITCH,_T("COURIER")))
  {
    m_font.CreateStockObject(ANSI_FIXED_FONT);
  }
  edit.SetFont(&m_font);

  return 0;
}

void CSourceView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 48 of file SourceView.cpp.

{
}

void CSourceView::UpdateView ( )

Definition at line 99 of file SourceView.cpp.

{
  CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();
  ASSERT_VALID(pFrame);

  CHTMLEdView* pWebView = (CHTMLEdView*)pFrame->GetWebView();
  ASSERT_VALID(pWebView);
  CString strHTML;
  pWebView->GetDocumentHTML(strHTML);
  SetWindowText(strHTML);
}

Member Data Documentation

CFont CSourceView::m_font [protected]

Definition at line 27 of file SourceView.h.

The documentation for this class was generated from the following files:
  • internet/HTMLEdit/SourceView.h
  • internet/HTMLEdit/SourceView.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpeakNApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSpeakNApp Class Reference

#include "speakn.h"

List of all members.

Public Member Functions

BOOL InitInstance ()

Detailed Description

Definition at line 78 of file speakn.h.

Member Function Documentation

BOOL CSpeakNApp::InitInstance ( )

Definition at line 282 of file speakn.cpp.

{
  BOOL bNoPen = TRUE;  // no pen-aware controls

  // Creates a simple dialog and do it
  CSpeakNDlg mainDlg(bNoPen);
  if (!mainDlg.LoadLesson(_T("SAMPLE1")))
    return FALSE;
  m_pMainWnd = &mainDlg;
  mainDlg.DoModal();

  // that's all, quit app
  ::PostQuitMessage(0);
  return TRUE;
}

The documentation for this class was generated from the following files:
  • advanced/speakn/speakn.h
  • advanced/speakn/speakn.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpeakNDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CSpeakNDlg Class Reference

#include "speakn.h"

List of all members.

Public Types

enum | { IDD = IDD_PENDIALOG }

Public Member Functions

CSpeakNDlg (BOOL bNoPen)
void | AdvanceLesson ()
BOOL | LoadLesson (LPCTSTR lpLessonName)

Public Attributes

CButton | m_buttonNext
LPCSTR | m_lpszNextQuestion
CString | m_targetRes
CString | m_targetWord

Protected Member Functions

void | DoDataExchange (CDataExchange *pDX)
CEdit & | InputEdit ()
virtual void | OnGiveUp ()
virtual BOOL | OnInitDialog ()
virtual void | OnOK ()
afx_msg void | OnReplaySound ()
afx_msg void | OnUpdateStatus ()
CStatic & | PromptText ()
void | SetAnswerText (LPCTSTR lpsz)
CStatic & | StatusFace ()

Protected Attributes

CFont | m_biggerFont
BOOL | m_bNoAnswerCheck
BOOL | m_bNoPen
CBitmapButton | m_pictureButton
CBitmapButton | m_replayButton

Detailed Description

Definition at line 18 of file speakn.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file speakn.h.

{ IDD = IDD_PENDIALOG };

Constructor & Destructor Documentation

CSpeakNDlg::CSpeakNDlg ( BOOL bNoPen )

Definition at line 51 of file speakn.cpp.

  : CDialog(bNoPen ? IDD_NOPENDIALOG : CSpeakNDlg::IDD)
{
  //{{AFX_DATA_INIT(CSpeakNDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT

  m_bNoPen = bNoPen;
  m_lpszNextQuestion = NULL;
  m_bNoAnswerCheck = FALSE;
}

Member Function Documentation

void CSpeakNDlg::AdvanceLesson ( )

Definition at line 173 of file speakn.cpp.

{
  if (*m_lpszNextQuestion == '\0')
  {
    // out of questions
    PlaySound(IDSOUND_GOODBYE);
    EndDialog(IDOK);
    return;
  }

// The lesson resource consists of several pairs of words (that the user guesses)
// and bitmap resource names.  The words and resource names are stored in the
// resource as ANSI text.  This text must be converted to UNICODE.

#ifdef _UNICODE
  TCHAR szT[20];
  int nLen;
  nLen = strlen(m_lpszNextQuestion);
  mbstowcs(szT, m_lpszNextQuestion, nLen);
  szT[nLen] = 0;
  m_targetWord = szT;
  m_lpszNextQuestion += nLen + 1;

  nLen = strlen(m_lpszNextQuestion);
  mbstowcs(szT, m_lpszNextQuestion, nLen);
  szT[nLen] = 0;
  m_targetRes = szT;
  m_lpszNextQuestion += nLen + 1;
#else
  m_targetWord = m_lpszNextQuestion;
  m_lpszNextQuestion += m_targetWord.GetLength() + 1;

  m_targetRes = m_lpszNextQuestion;
  m_lpszNextQuestion += m_targetRes.GetLength() + 1;
#endif

  m_targetWord.MakeUpper();
  m_targetRes.MakeUpper();

  PlaySound(IDSOUND_QUESTION);

  // draw the picture (bitmap with the same name as the target)
  if (!m_pictureButton.LoadBitmaps(m_targetRes))
  {
    AfxMessageBox(IDS_PICTURE_UNAVAILABLE);
    VERIFY(m_pictureButton.LoadBitmaps(_T("intro"), NULL, NULL));
      // go back to the initial bitmap
  }
  m_pictureButton.Invalidate(TRUE);

  SetAnswerText(_T(""));
  InputEdit().ShowWindow(TRUE);

  OnUpdateStatus();               // set appropriate face
  OnReplaySound();                // ask question

  if (*m_lpszNextQuestion == '\0')
  {
    CString strDone;
    strDone.LoadString(IDS_DONE);
    m_buttonNext.SetWindowText(strDone);
  }
}

void CSpeakNDlg::DoDataExchange ( CDataExchange * pDX ) [protected]

Definition at line 85 of file speakn.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CSpeakNDlg)
  DDX_Control(pDX, IDOK, m_buttonNext);
  //}}AFX_DATA_MAP
}

CEdit& CSpeakNDlg::InputEdit ( ) [inline, protected]

Definition at line 60 of file speakn.h.

          { return *(CEdit*)GetDlgItem(IDC_INPUT_EDIT); }

BOOL CSpeakNDlg::LoadLesson ( LPCTSTR lpLessonName )

Definition at line 72 of file speakn.cpp.

{
  // load lesson from resource
  HRSRC hRes; // resource handle to lesson data
  HGLOBAL hData;
  if ((hRes = ::FindResource(AfxGetResourceHandle(), lpLessonName,
    _T("lesson"))) == NULL ||
    (hData = ::LoadResource(AfxGetResourceHandle(), hRes)) == NULL)
    return FALSE;
  m_lpszNextQuestion = (LPCSTR)::LockResource(hData);
  return TRUE;
}

void CSpeakNDlg::OnGiveUp ( ) [protected, virtual]

Definition at line 151 of file speakn.cpp.

{
  PlaySound(IDSOUND_GIVEUP);
  SetAnswerText(m_targetWord);        // show answer
  OnReplaySound();
  AdvanceLesson();
}

BOOL CSpeakNDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 94 of file speakn.cpp.

{
  UpdateData(FALSE); // call DoDataExchange to initialize m_buttonNext
  m_buttonNext.EnableWindow(FALSE);

  ASSERT(m_targetWord.IsEmpty());     // not started yet

  // set the font of the prompt text to something bigger
  LOGFONT logfont;
  memset(&logfont, 0, sizeof(logfont));
  logfont.lfHeight = 40;
  logfont.lfWeight = FW_BOLD;
  CString szFont;
  szFont.LoadString(IDS_FONT_NAME);           // TrueType font
  _tcscpy_s(logfont.lfFaceName, LF_FACESIZE, szFont);
  VERIFY(m_biggerFont.CreateFontIndirect(&logfont));
  PromptText().SetFont(&m_biggerFont);
  InputEdit().SetFont(&m_biggerFont);

  // load the bitmaps for bitmap buttons
  VERIFY(m_replayButton.AutoLoad(IDC_REPLAY_SOUND, this));
  InputEdit().ShowWindow(FALSE);      // start with input disabled

  // load initial picture
  VERIFY(m_pictureButton.SubclassDlgItem(IDC_PICTURE, this));
  VERIFY(m_pictureButton.LoadBitmaps(_T("intro"), NULL, NULL));

  // Make the dialog visible, and update
  ShowWindow(TRUE);       // SHOW_OPENWINDOW
  UpdateWindow();

  PlaySound(IDSOUND_WELCOME);
  AdvanceLesson();
  return FALSE;       // focus already set
}

void CSpeakNDlg::OnOK ( ) [protected, virtual]

Definition at line 136 of file speakn.cpp.

{
  // check results
  CString result;
  InputEdit().GetWindowText(result);
  if (result != m_targetWord)
  {
    PlaySound(IDSOUND_INCORRECT);
    AfxMessageBox(IDS_TRY_AGAIN);
    return;
  }
  PlaySound(IDSOUND_CORRECT);
  AdvanceLesson();
}

void CSpeakNDlg::OnReplaySound ( ) [protected]

Definition at line 130 of file speakn.cpp.

{
  InputEdit().SetFocus();
  PlaySound(m_targetRes);
}

void CSpeakNDlg::OnUpdateStatus ( ) [protected]

Definition at line 240 of file speakn.cpp.

{
  CString result;
  InputEdit().GetWindowText(result);

  UINT nIDI = IDI_FACE_NEUTRAL;       // default
  if (result == m_targetWord)
  {
    m_buttonNext.EnableWindow();
    nIDI = IDI_FACE_HAPPIER;        // exact match
  }
  else
  {
    m_buttonNext.EnableWindow(FALSE);
    if (result.IsEmpty())
      nIDI = IDI_FACE_NEUTRAL;        // not started yet
    else
    {
      nIDI = (_tcsncmp(m_targetWord, result, _tcslen(result)) == 0?
        IDI_FACE_HAPPY : IDI_FACE_SAD);
    }
  }

  HICON hNew = ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(nIDI));
  ASSERT(hNew != NULL);
  ::DestroyIcon(StatusFace().SetIcon(hNew));
  UpdateWindow();                 // draw everything now

  if (m_bNoAnswerCheck)
    return;     // don't update

  if (nIDI == IDI_FACE_HAPPIER)
  {
    // exact match - automatic advance
    OnReplaySound();
    PlaySound(IDSOUND_CORRECT);
  }
}

CStatic& CSpeakNDlg::PromptText ( ) [inline, protected]

Definition at line 56 of file speakn.h.

          { return *(CStatic*)GetDlgItem(IDC_PROMPT_TEXT); }

void CSpeakNDlg::SetAnswerText ( LPCTSTR lpsz ) [protected]

Definition at line 159 of file speakn.cpp.

{
  // setting the window text for an edit control will cause EN_CHANGE
  //  control notifications, so we lock them out while setting the
  //  text programmatically
  ASSERT(!m_bNoAnswerCheck);
  m_bNoAnswerCheck = TRUE;
  InputEdit().SetWindowText(lpsz);
  m_bNoAnswerCheck = FALSE;
}

CStatic& CSpeakNDlg::StatusFace ( ) [inline, protected]

Definition at line 54 of file speakn.h.

          { return *(CStatic*)GetDlgItem(IDC_STATUS_FACE); }

Member Data Documentation

CFont CSpeakNDlg::m_biggerFont [protected]

Definition at line 49 of file speakn.h.

BOOL CSpeakNDlg::m_bNoAnswerCheck [protected]

Definition at line 46 of file speakn.h.

BOOL CSpeakNDlg::m_bNoPen [protected]

Definition at line 45 of file speakn.h.

CButton CSpeakNDlg::m_buttonNext

Definition at line 27 of file speakn.h.

LPCSTR CSpeakNDlg::m_lpszNextQuestion

Definition at line 39 of file speakn.h.

CBitmapButton CSpeakNDlg::m_pictureButton [protected]

Definition at line 50 of file speakn.h.

CBitmapButton CSpeakNDlg::m_replayButton [protected]

Definition at line 51 of file speakn.h.

CString CSpeakNDlg::m_targetRes

Definition at line 36 of file speakn.h.

CString CSpeakNDlg::m_targetWord

Definition at line 35 of file speakn.h.

The documentation for this class was generated from the following files:
  • advanced/speakn/speakn.h
  • advanced/speakn/speakn.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpeedDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CSpeedDlg Class Reference

#include "speeddlg.h"

List of all members.

Public Types

enum | { IDD = IDD_SPEED }

Public Member Functions

CSpeedDlg (CWnd *pParent=NULL)

Public Attributes

int | m_nRecalcSpeedSeconds

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file speeddlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file speeddlg.h.

{ IDD = IDD_SPEED };

Constructor & Destructor Documentation

CSpeedDlg::CSpeedDlg ( CWnd * pParent = NULL )

Definition at line 25 of file speeddlg.cpp.

  : CDialog(CSpeedDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CSpeedDlg)
  m_nRecalcSpeedSeconds = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CSpeedDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 33 of file speeddlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CSpeedDlg)
  DDX_Text(pDX, IDC_SPEED, m_nRecalcSpeedSeconds);
  DDV_MinMaxInt(pDX, m_nRecalcSpeedSeconds, 1, 20);
  //}}AFX_DATA_MAP
}

Member Data Documentation

int CSpeedDlg::m_nRecalcSpeedSeconds

Definition at line 24 of file speeddlg.h.

The documentation for this class was generated from the following files:
  • advanced/mtrecalc/speeddlg.h
  • advanced/mtrecalc/speeddlg.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpinCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CSpinCtrlPage Class Reference

#include "spinctrl.h"

List of all members.

Public Types

enum | { IDD = IDD_SPINCTRL }

Public Member Functions

CSpinCtrlPage ()
~CSpinCtrlPage ()

Public Attributes

BOOL | m_bArrowkeys
BOOL | m_bAutobuddy
BOOL | m_bNothousands
BOOL | m_bSetbuddyint
BOOL | m_bWrap
CRect | m_EditRect
int | m_iAlignment
int | m_iOrientation
CSpinButtonCtrl | m_Spin
UINT m_uiRangeFrom
UINT m_uiRangeTo

Protected Member Functions

void | CreateSpinCtrl ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAnyChange ()
virtual BOOL | OnApply ()
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 18 of file spinctrl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 29 of file spinctrl.h.

{ IDD = IDD_SPINCTRL };

Constructor & Destructor Documentation

CSpinCtrlPage::CSpinCtrlPage ( )

Definition at line 31 of file spinctrl.cpp.

                             : CPropertyPage(CSpinCtrlPage::IDD)
{
  //{{AFX_DATA_INIT(CSpinCtrlPage)
  m_iAlignment = 0;
  m_bArrowkeys = FALSE;
  m_bAutobuddy = FALSE;
  m_uiRangeFrom = 0;
  m_bNothousands = FALSE;
  m_iOrientation = 0;
  m_bSetbuddyint = FALSE;
  m_uiRangeTo = 100;
  m_bWrap = FALSE;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
}

CSpinCtrlPage::~CSpinCtrlPage ( )

Definition at line 47 of file spinctrl.cpp.

{
}

Member Function Documentation

void CSpinCtrlPage::CreateSpinCtrl ( ) [protected]

Definition at line 83 of file spinctrl.cpp.

{
DWORD dwStyles=0;

  // Build styles mask
  if ( 1 == m_iAlignment )
    dwStyles |= UDS_ALIGNLEFT;      // Control is placed to the left of buddy, if set
                    // (default = unattached)
  else if ( 2 == m_iAlignment )
    dwStyles |= UDS_ALIGNRIGHT;     // Control is placed to the right of buddy, if set
                    // (default = unattached)
  if ( m_bArrowkeys )
    dwStyles |= UDS_ARROWKEYS;      // Up/Down arrow keys inc/decrement, if set

  if ( m_bAutobuddy )
    dwStyles |= UDS_AUTOBUDDY;      // Previous (in Z-order) edit used as buddy, if set

  if ( m_bNothousands )
    dwStyles |= UDS_NOTHOUSANDS;    // No thousands seperator used, if set

  if ( 1 == m_iOrientation )
    dwStyles |= UDS_HORZ;           // Control is horizontal, if set (default = vert)

  if ( m_bSetbuddyint )
    dwStyles |= UDS_SETBUDDYINT;    // Control updates buddy edit with position, if set

  if ( m_bWrap )
    dwStyles |= UDS_WRAP;           // Position wraps when range exceeded, if set

  // Get edit control and change Z-order (created controls go at bottom of Z-order)
  CWnd* pEdit = GetDlgItem( IDC_SPIN_EDIT );
  pEdit->SetWindowPos( &wndBottom, m_EditRect.left, m_EditRect.top,
             m_EditRect.Width(), m_EditRect.Height(), SWP_SHOWWINDOW );

  // Create spin (up-down) control
  CWnd* pWnd = GetDlgItem( IDC_SPIN_POS );
  CRect rect;
  pWnd->GetWindowRect( &rect );
  ScreenToClient( &rect );

  m_Spin.Create( WS_VISIBLE|WS_CHILD|dwStyles, rect, this, IDC_SPIN );
  m_Spin.SetRange( (short)m_uiRangeFrom, (short)m_uiRangeTo );  // Sends UDM_SETRANGE

  // Prime edit control with initial value
  TCHAR buf[32];
  int pos = m_Spin.GetPos();                      // Sends UDM_GETPOS
  _stprintf_s( buf, 32, _T("%d"), pos );
  pWnd = m_Spin.GetBuddy();                       // Sends UDM_GETBUDDY
  if (pWnd != NULL && HIWORD(pos) != 1)           // Check for error in high word
    pWnd->SetWindowText( buf );
}

void CSpinCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 51 of file spinctrl.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CSpinCtrlPage)
  DDX_CBIndex(pDX, IDC_SPIN_ALIGNMENT, m_iAlignment);
  DDX_Check(pDX, IDC_SPIN_ARROWKEYS, m_bArrowkeys);
  DDX_Check(pDX, IDC_SPIN_AUTOBUDDY, m_bAutobuddy);
  DDX_Text(pDX, IDC_SPIN_FROM, m_uiRangeFrom);
  DDV_MinMaxUInt(pDX, m_uiRangeFrom, 0, 65535);
  DDX_Check(pDX, IDC_SPIN_NOTHOUSANDS, m_bNothousands);
  DDX_CBIndex(pDX, IDC_SPIN_ORIENTATION, m_iOrientation);
  DDX_Check(pDX, IDC_SPIN_SETBUDDYINT, m_bSetbuddyint);
  DDX_Text(pDX, IDC_SPIN_TO, m_uiRangeTo);
  DDV_MinMaxUInt(pDX, m_uiRangeTo, 0, 65535);
  DDX_Check(pDX, IDC_SPIN_WRAP, m_bWrap);
  //}}AFX_DATA_MAP
}

void CSpinCtrlPage::OnAnyChange ( ) [protected]

Definition at line 162 of file spinctrl.cpp.

{
  SetModified(TRUE);
}

BOOL CSpinCtrlPage::OnApply ( ) [protected, virtual]

Definition at line 153 of file spinctrl.cpp.

{
  UpdateData();
  m_Spin.DestroyWindow();

  CreateSpinCtrl();
  return TRUE;
}

BOOL CSpinCtrlPage::OnInitDialog ( ) [protected, virtual]

Definition at line 69 of file spinctrl.cpp.

{
  CPropertyPage::OnInitDialog();

  CWnd* pEdit = GetDlgItem( IDC_SPIN_EDIT );
  pEdit->GetWindowRect( &m_EditRect );
  ScreenToClient( &m_EditRect );

  CreateSpinCtrl();
  SetModified(TRUE);  // allow the APPLY button to become active

  return TRUE;
}

Member Data Documentation

BOOL CSpinCtrlPage::m_bArrowkeys

Definition at line 31 of file spinctrl.h.

BOOL CSpinCtrlPage::m_bAutobuddy

Definition at line 32 of file spinctrl.h.

BOOL CSpinCtrlPage::m_bNothousands

Definition at line 34 of file spinctrl.h.

BOOL CSpinCtrlPage::m_bSetbuddyint

Definition at line 36 of file spinctrl.h.

BOOL CSpinCtrlPage::m_bWrap

Definition at line 38 of file spinctrl.h.

CRect CSpinCtrlPage::m_EditRect

Definition at line 42 of file spinctrl.h.

int CSpinCtrlPage::m_iAlignment

Definition at line 30 of file spinctrl.h.

int CSpinCtrlPage::m_iOrientation

Definition at line 35 of file spinctrl.h.

CSpinButtonCtrl CSpinCtrlPage::m_Spin

Definition at line 41 of file spinctrl.h.

UINT CSpinCtrlPage::m_uiRangeFrom

Definition at line 33 of file spinctrl.h.

UINT CSpinCtrlPage::m_uiRangeTo

Definition at line 37 of file spinctrl.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl2/spinctrl.h
  • general/CmnCtrl2/spinctrl.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpindialApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSpindialApp Class Reference

#include "spindial.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 22 of file spindial.h.

Member Function Documentation

int CSpindialApp::ExitInstance ( )

Definition at line 49 of file spindial.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CSpindialApp::InitInstance ( )

Definition at line 33 of file spindial.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/spindial/spindial.h
  • controls/spindial/spindial.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpindialCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CSpindialCtrl Class Reference

#include "spinctl.h"

List of all members.

Public Types

enum | { dispidNeedlePosition = 1L, eventidSpinPositive = 1L }

Public Member Functions

CSpindialCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual void | OnResetState ()
virtual void | SpinNeedlePosition ()

Protected Member Functions

~CSpindialCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CSpindialCtrl) DECLARE_OLETYPELIB(CSpindialCtrl) DECLARE_PROPPAGEIDS(CSpindialCtrl) DECLARE_OLECTLTYPE(CSpindialCtrl) afx_msg void OnLButtonDown(UINT nFlags
void | FireSpinPositive ()
afx_msg short | GetNeedlePosition ()
afx_msg void | SetNeedlePosition (short nNewValue)

Protected Attributes

short | m_needlePosition
CPoint | point

Detailed Description

Definition at line 16 of file spinctl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidNeedlePosition
eventidSpinPositive

Definition at line 69 of file spinctl.h.

       {
  //{{AFX_DISP_ID(CSpindialCtrl)
  dispidNeedlePosition = 1L,
  eventidSpinPositive = 1L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CSpindialCtrl::CSpindialCtrl ( )

Definition at line 138 of file spinctl.cpp.

{
  InitializeIIDs(&IID_DSpindial, &IID_DSpindialEvents);
}

CSpindialCtrl::~CSpindialCtrl ( ) [protected]

Definition at line 147 of file spinctl.cpp.

{
}

Member Function Documentation

void CSpindialCtrl::AboutBox ( ) [protected]

Definition at line 234 of file spinctl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_SPINDIAL);
  dlgAbout.DoModal();
}

CSpindialCtrl::DECLARE_OLECREATE_EX ( CSpindialCtrl ) [protected]
void CSpindialCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 213 of file spinctl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  PX_Short(pPX, _T("NeedlePosition"), m_needlePosition, 0);
}

void CSpindialCtrl::FireSpinPositive ( ) [inline, protected]

Definition at line 62 of file spinctl.h.

    {FireEvent(eventidSpinPositive,EVENT_PARAM(VTS_NONE));}

short CSpindialCtrl::GetNeedlePosition ( ) [protected]

Definition at line 244 of file spinctl.cpp.

{
  return m_needlePosition;
}

void CSpindialCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 155 of file spinctl.cpp.

{
  LPRECT      lpr;
  OLE_COLOR   color;
  CBrush      br;
  POINT       centerPt;
  POINT       tickpos[MAX_POSITIONS];
  CPen* pOldPen;

  lpr = (LPRECT)(LPCRECT)rcBounds;

  // Paint background using the ambient background color
  color = AmbientBackColor();
  br.CreateSolidBrush(TranslateColor(color));
  pdc->FillRect(lpr, &br);

  // Draw the dial using a black pen
  pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
  pdc->Ellipse(lpr);

  // Determine coordinates of center point
  centerPt.x = lpr->left + ((lpr->right - lpr->left) / 2);
  centerPt.y = lpr->top + ((lpr->bottom - lpr->top) / 2);

  // Determine coordinates of intersections of tick marks and dial
  tickpos[0].x = centerPt.x;
  tickpos[0].y = lpr->top;
  tickpos[1].x = lpr->right;
  tickpos[1].y = centerPt.y;
  tickpos[2].x = centerPt.x;
  tickpos[2].y = lpr->bottom;
  tickpos[3].x = lpr->left;
  tickpos[3].y = centerPt.y;

  // Draw each tick mark
  pdc->MoveTo(tickpos[0]);
  pdc->LineTo(tickpos[0].x, tickpos[0].y+TICK_LEN);
  pdc->MoveTo(tickpos[1]);
  pdc->LineTo(tickpos[1].x-TICK_LEN, tickpos[1].y);
  pdc->MoveTo(tickpos[2]);
  pdc->LineTo(tickpos[2].x,tickpos[2].y-TICK_LEN);
  pdc->MoveTo(tickpos[3]);
  pdc->LineTo(tickpos[3].x+TICK_LEN, tickpos[3].y);

  // Draw pointer of dial
  pdc->MoveTo(centerPt);
  pdc->LineTo(tickpos[m_needlePosition]);

  pdc->SelectObject(pOldPen);

  return;
}

void CSpindialCtrl::OnResetState ( ) [virtual]

Definition at line 225 of file spinctl.cpp.

{
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange
}

void CSpindialCtrl::SetNeedlePosition ( short nNewValue ) [protected]

Definition at line 253 of file spinctl.cpp.

{
  // Constrain value to 0..3 range
  if ( (nNewValue > 3) || (nNewValue < 0) )
    m_needlePosition = 0;
  else
    m_needlePosition = nNewValue;

  SetModifiedFlag(TRUE);

  InvalidateControl();
}

void CSpindialCtrl::SpinNeedlePosition ( ) [virtual]

Definition at line 285 of file spinctl.cpp.

{
   short np = GetNeedlePosition();
   if (np == 3) np = 0;
     else np++;
   SetNeedlePosition(np);
}

Member Data Documentation

short CSpindialCtrl::m_needlePosition [protected]

Definition at line 79 of file spinctl.h.

CPoint CSpindialCtrl::point [protected]

Definition at line 47 of file spinctl.h.

The documentation for this class was generated from the following files:
  • controls/spindial/spinctl.h
  • controls/spindial/spinctl.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpindialPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CSpindialPropPage Class Reference

#include "spinppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_SPINDIAL }

Public Member Functions

CSpindialPropPage ()

Public Attributes

int | m_NeedlePosition

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file spinppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file spinppg.h.

{ IDD = IDD_PROPPAGE_SPINDIAL };

Constructor & Destructor Documentation

CSpindialPropPage::CSpindialPropPage ( )

Definition at line 59 of file spinppg.cpp.

                                     :
  COlePropertyPage(IDD, IDS_SPINDIAL_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CSpindialPropPage)
  m_NeedlePosition = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CSpindialPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 71 of file spinppg.cpp.

{
  //{{AFX_DATA_MAP(CSpindialPropPage)
  DDP_Text(pDX, IDC_POSITIONEDIT, m_NeedlePosition, _T("NeedlePosition"));
  DDX_Text(pDX, IDC_POSITIONEDIT, m_NeedlePosition);
  DDV_MinMaxInt(pDX, m_NeedlePosition, 0, 3);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

int CSpindialPropPage::m_NeedlePosition

Definition at line 28 of file spinppg.h.

The documentation for this class was generated from the following files:
  • controls/spindial/spinppg.h
  • controls/spindial/spinppg.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpinEditDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Attributes

CSpinEditDlg Class Reference

List of all members.

Public Types

enum | { IDD = IDD_SPIN_EDIT }

Public Member Functions

CSpinEditDlg ()
BOOL | OnInitDialog ()
virtual void | OnOK ()

Protected Attributes

CParsedEdit | edit [NUM_EDIT]

Detailed Description

Definition at line 26 of file spintest.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 32 of file spintest.cpp.

{ IDD = IDD_SPIN_EDIT };

Constructor & Destructor Documentation

CSpinEditDlg::CSpinEditDlg ( ) [inline]

Definition at line 34 of file spintest.cpp.

    : CDialog(CSpinEditDlg::IDD)
      { }

Member Function Documentation

BOOL CSpinEditDlg::OnInitDialog ( )

Definition at line 51 of file spintest.cpp.

{
  int value = 1;
  for (int i = 0; i < NUM_EDIT; i++)
  {
    // associate button with edit item
    CSpinButtonCtrl* pSpin = (CSpinButtonCtrl*)GetDlgItem(IDC_BUTTON_MAX - i);
    ENSURE(pSpin != NULL);

    // The default range for the spin button has the maximum set to zero (0)
    // and the minimum set to 100. Since the maximum value is less than the
    // minimum value, clicking the up arrow will decrease the position and
    // clicking the down arrow will increase it.
    // Call SetRange32 to set it from 0 to 100

    pSpin->SetRange32(0,100);
    pSpin->SetPos(value++);     // 1, 2, 3, 4
  }
  return TRUE;
}

void CSpinEditDlg::OnOK ( ) [virtual]

Definition at line 72 of file spintest.cpp.

{
  int values[NUM_EDIT];
  UINT nID = 0;
  BOOL bOk = TRUE;
  int i;
  for (i = 0; bOk && i < NUM_EDIT; i++)
  {
    nID = IDC_EDIT_MIN + i;
    values[i] = GetDlgItemInt(nID, &bOk);
  }

  if (!bOk)
  {
    // report illegal value
    CString str;
    str.LoadString(IDS_ILLEGAL_VALUE);
    MessageBox(str);
    CEdit& badEdit = *(CEdit*)GetDlgItem(nID);
    badEdit.SetSel(0, -1);
    badEdit.SetFocus();
    return;     // don't end dialog
  }

#ifdef _DEBUG
  // dump results, normally you would do something with these
  TRACE0("Final values:\n");
  for (i = 0; i < NUM_EDIT; i++)
    TRACE1("\t%d\n", values[i]);
#endif
  EndDialog(IDOK);
}

Member Data Documentation

CParsedEdit CSpinEditDlg::edit[NUM_EDIT] [protected]

Definition at line 29 of file spintest.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/spintest.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpiroApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CSpiroApp Class Reference

#include "spiro.h"

List of all members.

Public Member Functions

CSpiroApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
void | SetLandscape ()

Public Attributes

HCURSOR | m_cursorRing
HCURSOR | m_cursorWheel
CImageList | m_imageList

Detailed Description

Definition at line 30 of file spiro.h.

Constructor & Destructor Documentation

CSpiroApp::CSpiroApp ( )

Definition at line 42 of file spiro.cpp.

{
}

Member Function Documentation

BOOL CSpiroApp::InitInstance ( ) [virtual]

Definition at line 93 of file spiro.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  SetLandscape();

  // 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(CSpiroDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CSpiroView));
  AddDocTemplate(pDocTemplate);

  // Enable DDE Execute open
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  // Enable drag/drop open
  m_pMainWnd->DragAcceptFiles();

  m_cursorRing = LoadCursor(IDC_DROPRING);
  m_cursorWheel = LoadCursor(IDC_DROPWHEEL);

  m_imageList.Create(IDB_PENCIL, 48, 2, RGB(255, 255, 255));

  return TRUE;
}

void CSpiroApp::OnAppAbout ( )

Definition at line 193 of file spiro.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CSpiroApp::SetLandscape ( )

Definition at line 54 of file spiro.cpp.

{
    // Get default printer settings.
    PRINTDLG   pd;

    pd.lStructSize = (DWORD) sizeof(PRINTDLG);
    if (GetPrinterDeviceDefaults(&pd))
    {
        // Lock memory handle.
        DEVMODE FAR* pDevMode =
            (DEVMODE FAR*)::GlobalLock(m_hDevMode);
        LPDEVNAMES lpDevNames;
        LPTSTR lpszDriverName, lpszDeviceName, lpszPortName;
        HANDLE hPrinter;

        if (pDevMode)
        {
            // Change printer settings in here.
            pDevMode->dmOrientation = DMORIENT_LANDSCAPE;
           // Unlock memory handle.
         lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
       lpszDriverName = (LPTSTR )lpDevNames + lpDevNames->wDriverOffset;
      lpszDeviceName = (LPTSTR )lpDevNames + lpDevNames->wDeviceOffset;
      lpszPortName   = (LPTSTR )lpDevNames + lpDevNames->wOutputOffset;

      ::OpenPrinter(lpszDeviceName, &hPrinter, NULL);
      ::DocumentProperties(NULL,hPrinter,lpszDeviceName,pDevMode,
                           pDevMode, DM_IN_BUFFER|DM_OUT_BUFFER);

       // Sync the pDevMode.
       // See SDK help for DocumentProperties for more info.
       ::ClosePrinter(hPrinter);
         ::GlobalUnlock(m_hDevNames);
       ::GlobalUnlock(m_hDevMode);
    }
    }
}

Member Data Documentation

HCURSOR CSpiroApp::m_cursorRing

Definition at line 34 of file spiro.h.

HCURSOR CSpiroApp::m_cursorWheel

Definition at line 33 of file spiro.h.

CImageList CSpiroApp::m_imageList

Definition at line 35 of file spiro.h.

The documentation for this class was generated from the following files:
  • general/spiro/spiro.h
  • general/spiro/spiro.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpiroDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CSpiroDoc Class Reference

#include "spiroDoc.h"

List of all members.

Public Member Functions

virtual | ~CSpiroDoc ()
virtual void | DeleteContents ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)
void | TransferCurrentFigure ()

Public Attributes

CPtrArray | m_arrPFigures
bool | m_bThickPen
CFigure * m_pFigureCurrent
CSize | m_sizeExtent

Protected Member Functions

CSpiroDoc ()

Detailed Description

Definition at line 97 of file spiroDoc.h.

Constructor & Destructor Documentation

CSpiroDoc::CSpiroDoc ( ) [protected]

Definition at line 406 of file spiroDoc.cpp.

                     : m_sizeExtent(1100, 1700)
{
  m_bThickPen = false;
  m_pFigureCurrent = new CFigure();
}

CSpiroDoc::~CSpiroDoc ( ) [virtual]

Definition at line 412 of file spiroDoc.cpp.

{
  delete m_pFigureCurrent;
  INT_PTR nLast = m_arrPFigures.GetUpperBound();
  CFigure* pFig;

  for (int i = 0; i <= nLast; i++)
  {
    pFig = (CFigure*)m_arrPFigures.GetAt(i);
    ENSURE(pFig != NULL);
    delete pFig;
  }

  m_arrPFigures.RemoveAll();
}

Member Function Documentation

void CSpiroDoc::DeleteContents ( ) [virtual]

Definition at line 545 of file spiroDoc.cpp.

{
  INT_PTR nLast = m_arrPFigures.GetUpperBound();
  CFigure* pFig;

  POSITION pos = GetFirstViewPosition();
  CSpiroView* pView;

  if (pos != NULL)  // on shut down the view has been destroyed already
  {
    pView = (CSpiroView*)GetNextView(pos);
    ENSURE(pView != NULL && pView->IsKindOf(RUNTIME_CLASS(CSpiroView)));
    delete pView->m_pAnchor;
    delete pView->m_pWheel;
    pView->m_pAnchor = NULL;
    pView->m_pWheel = NULL;
  }

  for (int i = 0; i <= nLast; i++)
  {
    pFig = (CFigure*)m_arrPFigures.GetAt(i);
    delete pFig;
  }

  m_arrPFigures.RemoveAll();
  delete m_pFigureCurrent;
  m_pFigureCurrent = NULL;

  CDocument::DeleteContents();
}

BOOL CSpiroDoc::OnNewDocument ( ) [virtual]

Definition at line 428 of file spiroDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  m_bThickPen = false;
  if (m_pFigureCurrent == NULL)
    m_pFigureCurrent = new CFigure();
  else
    m_pFigureCurrent->Clean();

  return TRUE;
}

void CSpiroDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 447 of file spiroDoc.cpp.

{
  DWORD dw;

  if (ar.IsStoring())
  {
    dw = m_sizeExtent.cx;
    ar << dw; // store the extent
    dw = m_sizeExtent.cy;
    ar << dw;
    dw = (DWORD)(m_arrPFigures.GetUpperBound() + 1);
    ar << dw;  // number of fixed figures
    for (int i = 0; i < (int)dw; i++)
    {
      CFigure* pFig = (CFigure*)m_arrPFigures.GetAt(i);
      ENSURE(pFig != NULL);
      pFig->Serialize(ar);
    }

    m_pFigureCurrent->Serialize(ar);
  }
  else
  {
    ar >> dw;
    m_sizeExtent.cx = dw;
    ar >> dw;
    m_sizeExtent.cy = dw;
    ar >> dw;  // count of figures
    CFigure* pFig;

    for (int i = 0; i < (int)dw; i ++)
    {
      pFig = new CFigure();
      pFig->Serialize(ar);
      m_arrPFigures.SetAtGrow(i, pFig);
    }

    m_pFigureCurrent = new CFigure();
    m_pFigureCurrent->Serialize(ar);
  }
}

void CSpiroDoc::TransferCurrentFigure ( )

Definition at line 509 of file spiroDoc.cpp.

{
  ENSURE(m_pFigureCurrent != NULL);
  if (m_pFigureCurrent->m_nTotalDrawn == 0)  // the figure is empty
  {
    m_pFigureCurrent->Clean();
    return;
  }

  ENSURE(g_pView != NULL);
  // if there is an anchor, set the angle of the anchor
  if (g_pView->m_pAnchor != NULL)
  {
    CFigCommand figCommand;

    int i;
    for (i = m_pFigureCurrent->m_nTotalDrawn - 1; i >= 0; i--)
    {
      figCommand = m_pFigureCurrent->m_arrCommands.GetAt(i);
      if (figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO)
      {
        g_pView->m_pAnchor->SetFigData(figCommand.m_dAnchorData);
        break;
      }
    }

    ENSURE(i != -1);
  }

  INT_PTR nIndex = m_arrPFigures.GetUpperBound() + 1;
  ENSURE(m_pFigureCurrent != NULL);
  m_arrPFigures.SetAtGrow(nIndex, m_pFigureCurrent);
  m_pFigureCurrent = new CFigure();
  g_pView->m_bDrawingDone = false;
}

Member Data Documentation

CPtrArray CSpiroDoc::m_arrPFigures

Definition at line 107 of file spiroDoc.h.

bool CSpiroDoc::m_bThickPen

Definition at line 124 of file spiroDoc.h.

CFigure* CSpiroDoc::m_pFigureCurrent

Definition at line 106 of file spiroDoc.h.

CSize CSpiroDoc::m_sizeExtent

Definition at line 105 of file spiroDoc.h.

The documentation for this class was generated from the following files:
  • general/spiro/spiroDoc.h
  • general/spiro/spiroDoc.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpiroRect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CSpiroRect Class Reference

#include "piece.h"

List of all members.

Public Member Functions

CSpiroRect (int l=0, int t=0, int r=0, int b=0)
CSpiroRect (CRect rect)
bool | IntersectRect (CRect *prect) const
bool | LineInRect (CPoint pt1, CPoint pt2) const
void | Scale (long nNumer, long nDenom)

Detailed Description

Definition at line 20 of file piece.h.

Constructor & Destructor Documentation

CSpiroRect::CSpiroRect | ( | int | l = 0,
 |  | int | t = 0,
 |  | int | r = 0,
 |  | int | b = 0 |
 | ) |  |  | [inline]

Definition at line 23 of file piece.h.

  {
    SetRect(l, t, r, b);
  }

CSpiroRect::CSpiroRect ( CRect rect ) [inline]

Definition at line 28 of file piece.h.

  {
    SetRect(rect.left, rect.top, rect.right, rect.bottom);
  }

Member Function Documentation

bool CSpiroRect::IntersectRect ( CRect * prect ) const [inline]

Definition at line 49 of file piece.h.

  {
    // invert the top and bottom values and call the windows api
    CRect rect1(this);
    CRect rect2(prect);
    rect1.NormalizeRect();
    rect2.NormalizeRect();
    return rect1.IntersectRect(&rect1, &rect2) != 0;
  }

bool CSpiroRect::LineInRect | ( | CPoint | pt1,
 |  | CPoint | pt2 |
 | ) |  |  | const [inline]

Definition at line 40 of file piece.h.

  {
    return !((pt1.x < left && pt2.x < left) ||
      (pt1.x > right && pt2.x > right) ||
      (pt1.y < bottom && pt2.y < bottom) ||
      (pt1.y > top && pt2.y > top));
  }

void CSpiroRect::Scale | ( | long | nNumer,
 |  | long | nDenom |
 | ) |  |  | [inline]

Definition at line 33 of file piece.h.

  {
    // *= operator is not used to avoid precision errors
    SetRect(left * nNumer / nDenom, top * nNumer / nDenom,
            right * nNumer / nDenom, bottom * nNumer / nDenom);
  }

The documentation for this class was generated from the following file:
  • general/spiro/piece.h
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSpiroView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CSpiroView Class Reference

#include "spiroView.h"

List of all members.

Public Member Functions

virtual | ~CSpiroView ()
CSpiroDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual void | OnInitialUpdate ()
virtual void | OnPrepareDC (CDC *pDC, CPrintInfo *pInfo=NULL)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Static Public Member Functions

static void CALLBACK | TimerCallBack (HWND hWnd, UINT nMsg, UINT_PTR nIDEvent, DWORD dwTimer)

Public Attributes

bool | m_bDrawingActive
bool | m_bDrawingDone
bool | m_bDroppingAnchor
bool | m_bDroppingWheel
bool | m_bMovingPencil
bool | m_bStartDrag
COLORREF | m_coCurrentPen
double | m_dDataAnchorFirst
double | m_dDataWheelFirst
INT_PTR | m_IDTimer
int | m_iPieceDropped
int | m_nCurrentPenWidth
int | m_nTracesPerTick
long | m_nZoomDenom
long | m_nZoomNumer
CBasePiece * m_pAnchor
CBitmap * | m_pBitmap
CBitmap * | m_pbitmapOld
CDC * | m_pDCMem
CPoint | m_ptWheelPosFirst
CBasePiece * m_pWheel
CSize | m_sizeBitmap

Protected Member Functions

CSpiroView ()
void | CreateFigure ()
long | GetWheelDistanceForFigure () const
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnBlack ()
afx_msg void | OnBlue ()
afx_msg void | OnCallTimerTick ()
afx_msg void | OnDrawPattern ()
void | OnDropPiece (int *rgID, int nCount)
afx_msg void | OnDropRing ()
afx_msg void | OnDropWheel ()
afx_msg void | OnEndDrawing ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFast ()
afx_msg void | OnGreen ()
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnPauseDrawing ()
afx_msg void | OnPenWidth ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnPurple ()
afx_msg void | OnRed ()
void | OnRemovePiece (CBasePiece **ppPiece)
afx_msg void | OnRemoveRing ()
afx_msg void | OnRemoveWheel ()
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnSlow ()
afx_msg void | OnTraceWidth ()
afx_msg void | OnUpdateAnyRing (CCmdUI *pCmdUI)
afx_msg void | OnUpdateAnyWheel (CCmdUI *pCmdUI)
afx_msg void | OnUpdateColor (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDraw (CCmdUI *pCmdUI)
afx_msg void | OnUpdateDrawPattern (CCmdUI *pCmdUI)
afx_msg void | OnUpdateFast (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePause (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePauseDrawing (CCmdUI *pCmdUI)
afx_msg void | OnUpdatePenWidth (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRemoveRing (CCmdUI *pCmdUI)
afx_msg void | OnUpdateRemoveWheel (CCmdUI *pCmdUI)
afx_msg void | OnUpdateSlow (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTimerTick (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTraceWidth (CCmdUI *pCmdUI)
afx_msg void | OnUpdateZoomIn (CCmdUI *pCmdUI)
afx_msg void | OnUpdateZoomOut (CCmdUI *pCmdUI)
afx_msg void | OnYellow ()
afx_msg void | OnZoomIn ()
afx_msg void | OnZoomOut ()
void | PressButton (UINT id)
void | ZoomChange (int nChange)

Protected Attributes

CBitmap * | m_pBitmapDragFigure
CFigure * m_pFigureDrag
CImageList * | m_pILDragFigure
CPoint | m_ptHotSpotDragFigure

Detailed Description

Definition at line 23 of file spiroView.h.

Constructor & Destructor Documentation

CSpiroView::CSpiroView ( ) [protected]

Definition at line 106 of file spiroView.cpp.

                       : m_ptWheelPosFirst(0, 0), m_ptHotSpotDragFigure(0, 0)
{
  m_nZoomNumer = 1;
  m_IDTimer = 0;
  m_nZoomDenom = 1;
  m_pAnchor = NULL;
  m_pWheel = NULL;
  m_bDrawingActive = false;
  m_bStartDrag = false;
  m_bDrawingDone = false;
  m_bDroppingAnchor = false;
  m_bDroppingWheel = false;
  m_bMovingPencil = false;
  m_nCurrentPenWidth = 1;
  m_coCurrentPen = RGB(0, 0, 0);  //color of current pen
  m_nTracesPerTick = TRACES_PER_TICK_SLOW;
  m_dDataAnchorFirst = 0;
  m_dDataWheelFirst = 0;
  m_pDCMem = NULL;
  m_pBitmap = NULL;
  m_pBitmapDragFigure = NULL;
  m_pbitmapOld = NULL;
  m_pFigureDrag = NULL;
  m_pILDragFigure = NULL;
}

CSpiroView::~CSpiroView ( ) [virtual]

Definition at line 132 of file spiroView.cpp.

{
  delete m_pAnchor;
  delete m_pWheel;

  if (m_pDCMem != NULL)
  {
    ENSURE(m_pbitmapOld != NULL);
    m_pDCMem->SelectObject(m_pbitmapOld);
    delete m_pDCMem;
    delete m_pBitmap;
  }
  else
  {
    ASSERT(m_pbitmapOld == NULL);
    ASSERT(m_pBitmap == NULL);
  }
}

Member Function Documentation

void CSpiroView::CreateFigure ( ) [protected]

Definition at line 1040 of file spiroView.cpp.

{
  long    nTotalDistance;
  CSpiroDoc*  pDoc = GetDocument();
  ENSURE(pDoc != NULL);
  CFigure*  pFigure = pDoc->m_pFigureCurrent;

  ENSURE(pFigure != NULL);
  ENSURE(m_pWheel != NULL && m_pAnchor != NULL);

  m_ptWheelPosFirst = m_pWheel->m_ptPos;
  m_dDataWheelFirst = m_pWheel->GetFigData();
  double dAnchorDataStart = m_pAnchor->GetFigData();

  nTotalDistance = GetWheelDistanceForFigure();  // get the total wheel travel distance
  m_pWheel->SetAngleDelta(STEP_DISTANCE, m_pAnchor->ReverseWheelDirection());
  m_pAnchor->SetAngleDelta(STEP_DISTANCE, false/*dummy value*/);

  CPoint ptPen;
  m_pWheel->GetPenLocation(&ptPen);

  CPoint  ptContact;
  double  dAngle;
  double  dAngleExtra;

  pFigure->AddCommand(SET_PEN_WIDTH, m_nCurrentPenWidth);
  m_pWheel->m_icoCurrent = -1;
  ASSERT(m_pWheel->m_nColorCount > 0);
  m_coCurrentPen = m_pWheel->m_rgCo[0];
  pFigure->AddCommand(MOVE_TO, ptPen, m_pWheel->m_ptPos, m_pWheel->GetFigData(), m_pAnchor->GetFigData());

  long  nTraces = nTotalDistance / STEP_DISTANCE;

  ASSERT(m_pWheel->m_icoCurrent >= -1 && m_pWheel->m_icoCurrent <= m_pWheel->m_nColorCount);
  ASSERT(m_pWheel->m_nColorCount > 0);
  pFigure->m_nTracesPerColor = nTraces / m_pWheel->m_nColorCount;
  pFigure->m_nTracesThisColor = 0;  // force color change upon starting

  for (long i = 0; i < nTraces; i++)  // travel until very close to the end
  {
    m_pAnchor->AdvanceTrace(ptContact, dAngle, dAngleExtra); // returns point of contact
    m_pWheel->AdvanceTrace(ptContact, dAngle, dAngleExtra);
    m_pWheel->GetPenLocation(&ptPen);
    pFigure->AddCommand((i == 0? MOVE_TO : LINE_TO), ptPen,
              m_pWheel->m_ptPos, m_pWheel->GetFigData(),
              m_pAnchor->GetFigData());
  }

  m_pWheel->m_ptPos = m_ptWheelPosFirst;
  m_pWheel->SetFigData(m_dDataWheelFirst);
  m_pAnchor->SetFigData(dAnchorDataStart);
}

CSpiroDoc * CSpiroView::GetDocument ( ) [inline]

Definition at line 153 of file spiroView.h.

   { return (CSpiroDoc*)m_pDocument; }

long CSpiroView::GetWheelDistanceForFigure ( ) const [protected]

Definition at line 936 of file spiroView.cpp.

{
  ENSURE(m_pWheel != NULL && m_pAnchor != NULL);
  double  dPerimWheel = m_pWheel->GetPerimeter();
  double  dPerimAnchor = m_pAnchor->GetPerimeter();

  bool  bInverted(false); // Anchor and wheel swapped to have anchor > wheel.

  if (dPerimAnchor < dPerimWheel)
  {
    bInverted = true;
    double d = dPerimAnchor;
    dPerimAnchor = dPerimWheel;
    dPerimWheel = d;
  }

  double  dRemain = 0;
  long  rgCycleOrder[200];
  double  rgdCycleLimits[2][200];  // first and last mark in every cycle
  double  dCurrentPos = 0.0;
  int   nTurnsThisCycle;
  int   nTotalTurns = 0;
  int   i;
  long  nTolerance = m_pAnchor->GetCycleError();  // returns distance tolerance for one figure
  int   iCycle;

  for (iCycle = 0;iCycle < 200;iCycle++)
  {
    nTurnsThisCycle = (long)((dPerimAnchor + dRemain) / dPerimWheel);
    rgdCycleLimits[0][iCycle] = dCurrentPos + dPerimWheel;
    while (rgdCycleLimits[0][iCycle] - dPerimAnchor >= 0.0)
      rgdCycleLimits[0][iCycle] -= dPerimAnchor;

    rgdCycleLimits[1][iCycle] = dCurrentPos + nTurnsThisCycle * dPerimWheel;
    while (rgdCycleLimits[1][iCycle] - dPerimAnchor >= 0.0)
      rgdCycleLimits[1][iCycle] -= dPerimAnchor;

    ASSERT(rgdCycleLimits[1][iCycle] >= 0.0 && rgdCycleLimits[1][iCycle] < dPerimAnchor);

    rgCycleOrder[iCycle] = iCycle;  // rgCycleOrder says the order of the columns

    // sort the cycle order to find which columns go first
    for (i = 0; i < iCycle; i++)
    {
      // is new cycle being inserted at position i?
      if (rgdCycleLimits[0][rgCycleOrder[i]] > rgdCycleLimits[0][iCycle])
      {
        //yes.  Insert iCycle in this position in rgCycleOrder
        memmove_s((int*)rgCycleOrder + i + 1, (iCycle - i) * sizeof(int), (int*)rgCycleOrder + i, (iCycle - i) * sizeof(int));
        rgCycleOrder[i] = iCycle;
        break;
      }
    }

    double  dLastGap(0);  // Initialize to avoid compiler warnings.
    double  dThisGap;
    double  dLastPos;
    double  dThisPos;

    // check if the values are so close to the origin that the cycle is complete
    bool bFirstTurnCloses = rgdCycleLimits[0][iCycle] < (double)nTolerance;
    if (bFirstTurnCloses ||   // close to origin? check gaps
        dPerimAnchor - rgdCycleLimits[1][iCycle] < (double)nTolerance ||
        rgdCycleLimits[1][iCycle] < 0.000000001)
    {
      dLastPos = rgdCycleLimits[0][rgCycleOrder[0]];
      for (i = 1; i < iCycle; i++)
      {
        dThisGap = (dThisPos = rgdCycleLimits[0][rgCycleOrder[i]]) - dLastPos;
        if (i > 1 && abs((long)(dThisGap - dLastGap)) > nTolerance / 4)   // there are gaps to be filled in
          break;

        dLastGap = dThisGap;
        dLastPos = dThisPos;
      }

      if (i == iCycle)
      {
        nTotalTurns += bFirstTurnCloses? 1 : nTurnsThisCycle;
        break;
      }
    }

    nTotalTurns += nTurnsThisCycle;
    dCurrentPos = rgdCycleLimits[1][iCycle];
    dRemain = dPerimAnchor - dCurrentPos;
  }

  if (bInverted)   // adjust the number of turns
  {
    double d = (double)nTotalTurns * dPerimWheel / dPerimAnchor;
    nTotalTurns = (long)d;
    if (d - (double)nTotalTurns > 0.9)
      nTotalTurns++;

    dPerimWheel = dPerimAnchor;
  }

  ASSERT(nTotalTurns < 200 && nTotalTurns > 0);
  return (long)(nTotalTurns * dPerimWheel);
}

void CSpiroView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 311 of file spiroView.cpp.

{
  // TODO: add extra initialization before printing
}

void CSpiroView::OnBlack ( ) [protected]

Definition at line 1232 of file spiroView.cpp.

{
  PressButton(ID_BLACK);
}

void CSpiroView::OnBlue ( ) [protected]

Definition at line 1306 of file spiroView.cpp.

{
  PressButton(ID_BLUE);
}

void CSpiroView::OnCallTimerTick ( ) [protected]

Definition at line 1384 of file spiroView.cpp.

{
  bool bDrawingActiveMode = m_bDrawingActive;
  m_bDrawingActive = true;
  TimerCallBack(m_hWnd, WM_TIMER, 0, 0);
  m_bDrawingActive = bDrawingActiveMode;
}

void CSpiroView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 162 of file spiroView.cpp.

{
  ENSURE(pDC != NULL);

  CPaintDC* pDCPaint;
  int     nWidthClip(0);  // Initialize to avoid compiler warnings.
  int     nHeightClip(0);  // Initialize to avoid compiler warnings.
  CRect   rectClip;
  CSpiroRect  rectLogClip;

  if (!pDC->IsPrinting())
  {
    ASSERT(pDC->IsKindOf(RUNTIME_CLASS(CPaintDC)));
    pDCPaint = (CPaintDC*)pDC;
    rectClip = pDCPaint->m_ps.rcPaint;
    rectLogClip = rectClip;
    pDC->DPtoLP(&rectLogClip);   // this will be the clip rectangle which includes the zoom factor in it
    nWidthClip = rectLogClip.Width();
    nHeightClip = rectLogClip.Height();
    // Prepare a memory DC to draw on
    if (nWidthClip <= 0 || nHeightClip >= 0)  // the clipping region is empty
      return;  // nothing to draw in this case
  }

  g_pView = this;
  CSpiroDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  CDC* pDCUse = pDC;
  int nSavedDC(0);  // Initialized to avoid compiler warnings.

  CRgn* prgnWheel = NULL;

  if (!pDC->IsPrinting())
  {
    if (m_pDCMem == NULL)
    {
      m_pDCMem = new CDC();
      ASSERT(m_pDCMem != NULL);
      VERIFY(m_pDCMem->CreateCompatibleDC(pDC));
      m_pDCMem->SetMapMode(MM_SPIRO);
    }

    int cxClip = rectClip.Width();
    int cyClip = rectClip.Height();
    ASSERT(cxClip > 0 && cyClip >0);

    if (m_pBitmap == NULL)
      m_pBitmap = new CBitmap();

    if (cxClip > m_sizeBitmap.cx || cyClip > m_sizeBitmap.cy)
    {
      if (m_pbitmapOld != NULL)
      {
        m_pDCMem->SelectObject(m_pbitmapOld);
        m_pBitmap->DeleteObject();
      }

      VERIFY(m_pBitmap->CreateCompatibleBitmap(pDC, cxClip, cyClip));
      m_pbitmapOld  = m_pDCMem->SelectObject(m_pBitmap);
      m_sizeBitmap.cx = cxClip;
      m_sizeBitmap.cy = cyClip;
    }

    CPoint ptViewportOrg = pDC->GetViewportOrg();
    ptViewportOrg.x -= rectClip.left;
    ptViewportOrg.y -= rectClip.top;
    m_pDCMem->SetViewportOrg(ptViewportOrg);
    m_pDCMem->SetWindowOrg(pDC->GetWindowOrg());

    CSpiroRect  rectDoc(rectLogClip);
    CSpiroRect  rectOut(rectDoc);  // strip to the right of the doc (vertical strip)

    int cx = pDoc->m_sizeExtent.cx * m_nZoomNumer / m_nZoomDenom;
    CBrush  br(GetSysColor(COLOR_3DLIGHT));

    if (rectDoc.right > cx)  // paint vertical strip
    {
      rectOut.left = cx;
      rectDoc.right = cx;
      m_pDCMem->FillRect(&rectOut, &br);
    }

    if (rectDoc.bottom < 0)
    {
      rectOut.SetRect(rectDoc.left, 0, cx, rectDoc.bottom);
      m_pDCMem->FillRect(&rectOut, &br);
      rectDoc.bottom = 0;
    }

    CBrush brush(GetSysColor(COLOR_WINDOW));
    m_pDCMem->FillRect(&rectDoc, &brush);

    pDCUse = m_pDCMem;
    nSavedDC = pDCUse->SaveDC();
    pDCUse->IntersectClipRect(0, pDoc->m_sizeExtent.cy * m_nZoomNumer / m_nZoomDenom, cx, 0);

    if (m_pWheel != NULL)
    {
      prgnWheel = new CRgn();
      m_pWheel->GetLogPieceRgn(prgnWheel, m_nZoomNumer, m_nZoomDenom);
    }
  }

  // draw the current figure
  pDoc->m_pFigureCurrent->Draw(pDCUse, m_nZoomNumer, m_nZoomDenom
                        , prgnWheel, &rectLogClip);

  // draw all the other figures
  INT_PTR nLast = pDoc->m_arrPFigures.GetUpperBound();
  CFigure* pFig;
  for (int i = 0; i <= nLast; i++)
  {
    pFig = (CFigure*)pDoc->m_arrPFigures.GetAt(i);
    pFig->Draw(pDCUse, m_nZoomNumer, m_nZoomDenom, prgnWheel, &rectLogClip);
  }

  delete prgnWheel;

  if (!pDC->IsPrinting())
  {

    pDCUse->RestoreDC(nSavedDC);

    if (m_pAnchor != NULL)
      m_pAnchor->Draw(m_pDCMem, m_nZoomNumer, m_nZoomDenom);

    if (m_pWheel != NULL)
      m_pWheel->Draw(m_pDCMem, m_nZoomNumer, m_nZoomDenom);

    // now transfer the information in the memory DC to the device DC
    VERIFY(pDC->BitBlt(rectLogClip.left, rectLogClip.top, nWidthClip, nHeightClip,
                          pDCUse, rectLogClip.left, rectLogClip.top, SRCCOPY));

  }
}

void CSpiroView::OnDrawPattern ( ) [protected]

Definition at line 1193 of file spiroView.cpp.

{
  ASSERT(!m_bDrawingActive);
  g_pView = this;
  m_IDTimer = SetTimer(1, 100, TimerCallBack);
  ASSERT(m_IDTimer != 0);
  m_bDrawingActive = true;

  // enable the pause button
  ENSURE(m_pWheel != NULL);
  CMainFrame* pFrame = (CMainFrame *)AfxGetMainWnd();
  ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
  CToolBarCtrl& tb = pFrame->m_wndToolBar.GetToolBarCtrl();
  tb.SetState(ID_PAUSEDRAWING, TBSTATE_ENABLED);
  tb.SetState(ID_DRAWPATTERN, 0);
  CToolBarCtrl& tbctrl = pFrame->m_wndToolBarSpiro.GetToolBarCtrl();
  tbctrl.SetState(ID_REMOVERING, 0);
  tbctrl.SetState(ID_REMOVEWHEEL, 0);
}

void CSpiroView::OnDropPiece | ( | int * | rgID,
 |  | int | nCount |
 | ) |  |  | [protected]

Definition at line 730 of file spiroView.cpp.

{
#ifdef _DEBUG
  int nChosen = -1;
#endif

  CMainFrame*   pFrame = (CMainFrame*)AfxGetMainWnd();
  ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));

  int i;
  for (i = 0; i < nCount; i ++)
  {
    if (pFrame->m_wndToolBarSpiro.GetToolBarCtrl().IsButtonChecked(rgID[i]))
#ifdef _DEBUG
    {
      ASSERT(nChosen == -1);
      nChosen = i;
    }
#else  // !_DEBUG
      break;
#endif  // !_DEBUG
  }

#ifdef _DEBUG
  VERIFY((i = nChosen) != -1);
#endif

  m_iPieceDropped = i;
}

void CSpiroView::OnDropRing ( ) [protected]

Definition at line 760 of file spiroView.cpp.

{
  static const int rgID[] = {ID_HUGERING, ID_VERYLARGERING,
                ID_MEDIUMRING, ID_SMALLRING};

  OnDropPiece((int*)rgID, elementsof(rgID));
  m_bDroppingAnchor = true;
}

void CSpiroView::OnDropWheel ( ) [protected]

Definition at line 769 of file spiroView.cpp.

{
  static const int rgID[] = {ID_ENORMOUSWHEEL, ID_HUGEWHEEL, ID_VERYLARGEWHEEL,
                ID_LARGEWHEEL, ID_MEDIUMWHEEL,
                ID_SMALLWHEEL, ID_TINYWHEEL};

  OnDropPiece((int*)rgID, elementsof(rgID));
  m_bDroppingWheel = true;
}

void CSpiroView::OnEndDrawing ( ) [protected]

Definition at line 1213 of file spiroView.cpp.

{
  ASSERT(m_IDTimer != 0);
  ASSERT(!m_bDrawingActive);
  VERIFY(KillTimer(m_IDTimer));
  m_IDTimer = 0;
  ENSURE(m_pAnchor != NULL);
  m_pAnchor->SetFigData(m_dDataAnchorFirst);
  ENSURE(m_pWheel != NULL);
  m_pWheel->MovePiece(this, m_ptWheelPosFirst, m_dDataWheelFirst, m_nZoomNumer, m_nZoomDenom);
  m_pWheel->m_icoCurrent = -1;  // set the current color to nothing.
}

void CSpiroView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 316 of file spiroView.cpp.

{
  // TODO: add cleanup after printing
}

BOOL CSpiroView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 1227 of file spiroView.cpp.

{
  return TRUE;
}

void CSpiroView::OnFast ( ) [protected]

Definition at line 1379 of file spiroView.cpp.

{
  m_nTracesPerTick = TRACES_PER_TICK_FAST;
}

void CSpiroView::OnGreen ( ) [protected]

Definition at line 1311 of file spiroView.cpp.

{
  PressButton(ID_GREEN);
}

void CSpiroView::OnInitialUpdate ( ) [virtual]

Definition at line 345 of file spiroView.cpp.

{
  CScrollView::OnInitialUpdate();

  if (m_pAnchor != NULL)
  {
    delete m_pAnchor;
    m_pAnchor = NULL;
  }

  if (m_pWheel != NULL)
  {
    delete m_pWheel;
        m_pWheel = NULL;
  }

  m_bDrawingActive = false;
  m_bStartDrag = false;
  m_bDrawingDone = false;
  m_bDroppingAnchor = false;
  m_bDroppingWheel = false;
  m_bMovingPencil = false;
  m_dDataAnchorFirst = 0;
  m_dDataWheelFirst = 0;

  CSpiroDoc* pDoc = GetDocument();
  ENSURE(pDoc != NULL);
  SetScrollSizes(MM_SPIRO, pDoc->m_sizeExtent);
}

void CSpiroView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 438 of file spiroView.cpp.

{
  if (m_bDrawingActive)
    return;

  if (m_bDroppingAnchor || m_bDroppingWheel)
  {
    ASSERT(!m_bDrawingDone);
    CWheel* pWheelDrop = NULL;
    CRing*  pRingDrop = NULL;
    CSpiroDoc* pDoc = GetDocument();
    ENSURE(pDoc != NULL);

    //convert the client coordinates to logical coordinates
    CDC* pDC = GetDC();
    ENSURE(pDC != NULL);
    OnPrepareDC(pDC);

    // Convert client coordinates to Logical coordinates
    CPoint pointScaled(point);
    pDC->DPtoLP(&pointScaled);
    point.x = pointScaled.x * m_nZoomDenom / m_nZoomNumer;  // undo scaling effects
    point.y = pointScaled.y * m_nZoomDenom / m_nZoomNumer;

    CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
    ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));

    if (m_bDroppingAnchor)
    {
      ASSERT(m_iPieceDropped >= 0 && m_iPieceDropped < TOTALRINGS);
      pRingDrop = new CRing(CRing::m_rgnRads[m_iPieceDropped] - RINGWIDTH,
        CRing::m_rgnRads[m_iPieceDropped],
        CRing::m_rgco[m_iPieceDropped], RGB(0, 0, 0));

      ENSURE(pRingDrop != NULL);
      m_bDroppingAnchor = false;
      ENSURE(m_pAnchor == NULL);
      m_pAnchor = pRingDrop;
      m_pAnchor->SetPosition(point);
      m_dDataAnchorFirst = m_pAnchor->GetFigData();
    }
    else if (m_bDroppingWheel)
    {
      CBasePiece** ppPiece = (m_pAnchor == NULL? &m_pAnchor : &m_pWheel);
      ASSERT(m_iPieceDropped >= 0 && m_iPieceDropped < TOTALWHEELS);
      pWheelDrop = new CWheel(CWheel::m_rgnRads[m_iPieceDropped],
                CWheel::m_rgco[m_iPieceDropped],
                CWheel::m_rgcoPattern[m_iPieceDropped]);

      ENSURE(pWheelDrop != NULL);
      ENSURE(*ppPiece == NULL);
      *ppPiece = pWheelDrop;
      m_bDroppingWheel = false;
      (*ppPiece)->SetPosition(point);

      if (m_pWheel != NULL)
      {
        m_pWheel->SetWheelMode();

        // set the default pen location. pDC and zoom ration are dummies
        m_pWheel->SetPenLocation(this, pDC, CPoint(0, 0), 1, 1);

        ENSURE(m_pAnchor != NULL);

        CPoint ptContact;
        double dAngle;
        // Get contact position from the anchor and set wheel position
        // Decides if wheel is internal in case of being a ring
        m_pAnchor->GetContactPosition(pointScaled, m_nZoomNumer,
                    m_nZoomDenom, ptContact, dAngle);

        if (m_pWheel->GetPerimeter() >= m_pAnchor->GetPerimeter())
        {
          pointScaled.x = 0;
          pointScaled.y = 0;   // force the wheel out of the ring

          // get contact position again to make sure it's right
          m_pAnchor->GetContactPosition(pointScaled, m_nZoomNumer,
                      m_nZoomDenom, ptContact, dAngle);
        }

        m_pWheel->SetPosition(ptContact, dAngle);
        m_dDataWheelFirst = m_pWheel->GetFigData();
        m_ptWheelPosFirst = m_pWheel->m_ptPos;
        PressButton(0);  // get the color settings for the new wheel
        CreateFigure();
      }

      m_iPieceDropped += TOTALRINGS + 1;
#ifdef _DEBUG
      int nID = pFrame->m_wndToolBarSpiro.GetItemID(m_iPieceDropped);
      ASSERT(nID >= ID_ENORMOUSWHEEL && nID <= ID_TINYWHEEL);
#endif
    }

    // uncheck the button used to select the piece in the toolbar
    UINT nButtonID = pFrame->m_wndToolBarSpiro.GetItemID(m_iPieceDropped);
    pFrame->m_wndToolBarSpiro.GetToolBarCtrl().CheckButton(nButtonID, FALSE);

    // invalidate the region holding the ring
    CRgn  rgn;  // region occupied by the piece
    (m_pWheel != NULL? m_pWheel : m_pAnchor)->GetDevPieceRgn(pDC,
                  &rgn, m_nZoomNumer, m_nZoomDenom, false);

    InvalidateRgn(&rgn, FALSE);
    m_iPieceDropped = -1; // reset to keep control on values.
    ReleaseDC(pDC);
    return;
  }

  // check if the user wants to drag the pen position

  CDC* pDC = GetDC();
  ENSURE(pDC != NULL);
  OnPrepareDC(pDC);
  CPoint pointScaled(point);
  pDC->DPtoLP(&pointScaled);   // gets the logical coord point value with scale into account

  if (m_pWheel != NULL)
  {
    if (m_pWheel->HitTest(pDC, point, m_nZoomNumer, m_nZoomDenom) == HIT_PEN_LOCATION)  // start drag operation
    {
      MSG   msg;

      // if there is a WM_LBUTTONUP in the queue do not drag pencil location
      if (!::PeekMessage(&msg, m_hWnd, WM_LBUTTONUP, WM_LBUTTONUP, PM_NOREMOVE))
      {
        ClientToScreen(&point); // convert to screen coordinates
        CRect rectWindow;
        GetWindowRect(&rectWindow);
        point.x -= rectWindow.left;
        point.y -= rectWindow.top;  // point relative to windows corner

        CImageList& il = GetApp()->m_imageList;
        ::ShowCursor(FALSE);
        il.BeginDrag(0, CPoint(0, 47));
        il.DragEnter(this, point);
        m_bMovingPencil = true;
        SetCapture();
      }
    }
  }

  for (;;)
  {
    CRgn  rgn;
    MSG   msg;

    if (::PeekMessage(&msg, m_hWnd, WM_LBUTTONUP, WM_LBUTTONUP, PM_NOREMOVE))  // no drag is being requested
      break;

    if (m_pWheel != NULL)
    {
      m_pWheel->GetLogPieceRgn(&rgn, m_nZoomNumer, m_nZoomDenom);
      if (rgn.PtInRegion(pointScaled))  // clicked on wheel.  Don't do anything
        break;

      rgn.DeleteObject();
    }

    if (m_pAnchor != NULL)
    {
      m_pAnchor->GetLogPieceRgn(&rgn, m_nZoomNumer, m_nZoomDenom);
      if (rgn.PtInRegion(pointScaled))   // clicked on the anchor
        break;

      rgn.DeleteObject();
    }

    // find now if the user clicked on a Figure.  The current Figure cannot be dragged.  This is by design
    CSpiroDoc*  pDoc = GetDocument();
    INT_PTR   iPic;
    CFigure*  pFigure;
    CSpiroRect  rect;

    for (iPic = pDoc->m_arrPFigures.GetUpperBound(); iPic >= 0; iPic--)
    {
      pFigure = (CFigure*)pDoc->m_arrPFigures.GetAt(iPic);
      ENSURE(pFigure != NULL);
      pFigure->GetBoundingRect(&rect);
      rect.Scale(m_nZoomNumer, m_nZoomDenom);
      if (pointScaled.x < rect.left || pointScaled.x >= rect.right ||
          pointScaled.y > rect.top || pointScaled.y <= rect.bottom)
      {
        continue;
      }

      bool bCopy = (nFlags & MK_CONTROL) == MK_CONTROL;
      m_pFigureDrag = (bCopy? new CFigure(pFigure) : pFigure);

      if (!bCopy)
        pDoc->m_arrPFigures.RemoveAt(iPic);

      ENSURE(m_pILDragFigure == NULL);

      // First draw the Figure into a memery DC using an allocated bitmap
      CDC dcMem;
      ENSURE(pDC != NULL);

      VERIFY(dcMem.CreateCompatibleDC(pDC));
      dcMem.SetMapMode(MM_SPIRO);
      dcMem.SetViewportOrg(0, 0);
      dcMem.SetWindowOrg(rect.left, rect.top);

      CSpiroRect  rectBitmap(rect);
      dcMem.LPtoDP(&rectBitmap);
      ASSERT(rectBitmap.left == 0 && rectBitmap.top == 0);

      int     nWidth = rectBitmap.right;
      int     nHeight = rectBitmap.bottom;

      CBitmap*  pbmOld = NULL;

      ASSERT(m_pBitmapDragFigure == NULL);
      m_pBitmapDragFigure = new CBitmap();
      m_pBitmapDragFigure->CreateCompatibleBitmap(pDC, nWidth, nHeight);
      pbmOld = dcMem.SelectObject(m_pBitmapDragFigure);

    //  dcMem.PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), WHITENESS);
      CBrush  brush;
      brush.CreateStockObject(WHITE_BRUSH);
      dcMem.FillRect(&rect, &brush);
      m_pFigureDrag->Draw(&dcMem, m_nZoomNumer, m_nZoomDenom, NULL, &rect);
      dcMem.SelectObject(pbmOld);
      // Then create an imagelist and add the bitmap to it
      ASSERT(m_pILDragFigure == NULL);
      m_pILDragFigure = new CImageList();
      VERIFY(m_pILDragFigure->Create(nWidth, nHeight, ILC_COLOR | ILC_MASK, 1, 1));
      VERIFY(m_pILDragFigure->Add(m_pBitmapDragFigure, RGB(255, 255, 255)) == 0);

      m_bStartDrag = true;  // Enter the drag on first mouse move

      //calculate the hot spot for the figure
      m_ptHotSpotDragFigure.x = pointScaled.x - rect.left;
      m_ptHotSpotDragFigure.y = pointScaled.y - rect.bottom;
      pDC->SetWindowOrg(0, rect.top - rect.bottom);
      pDC->SetViewportOrg(0, 0);
      pDC->LPtoDP(&m_ptHotSpotDragFigure);
      m_pILDragFigure->BeginDrag(0, m_ptHotSpotDragFigure);
      SetCapture();
      break;
    }

    break;
  }

  ReleaseDC(pDC);
  CScrollView::OnLButtonDown(nFlags, point);
}

void CSpiroView::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 860 of file spiroView.cpp.

{
  if (m_bMovingPencil)
  {
    CImageList& il = GetApp()->m_imageList;
    il.DragLeave(this);
    il.EndDrag();
    ::ShowCursor(TRUE);

    ENSURE(m_pWheel != NULL);
    CDC* pDC = GetDC();
    ENSURE(pDC != NULL);
    OnPrepareDC(pDC);

    // undo the effect of the zoom factor on the point value
    pDC->DPtoLP(&point);
    point.x = point.x * m_nZoomDenom / m_nZoomNumer;
    point.y = point.y * m_nZoomDenom / m_nZoomNumer;
    if (m_pWheel->SetPenLocation(this, pDC, point, m_nZoomNumer, m_nZoomDenom))
    {
      GetDocument()->TransferCurrentFigure();
      CreateFigure();  // create figure for the new pen location
    }

    ReleaseDC(pDC);
    ReleaseCapture();
    m_bMovingPencil = false;
  }
  else if (m_pFigureDrag != NULL)
  {
    ENSURE(m_pILDragFigure != NULL);

    CPoint ptWindow(point);
    CDC* pDC = GetDC();
    ENSURE(pDC != NULL);

    // get new position for the figure being drawn and insert it into figure arrays

    CPoint  ptCorner(point.x - m_ptHotSpotDragFigure.x, point.y - m_ptHotSpotDragFigure.y);
    OnPrepareDC(pDC);
    pDC->DPtoLP(&ptCorner);   // convert corner of figure to logical coords

    ptCorner.x = ptCorner.x * m_nZoomDenom / m_nZoomNumer;  // undo effect of zooming
    ptCorner.y = ptCorner.y * m_nZoomDenom / m_nZoomNumer;

    if (m_pFigureDrag->MoveFigure(ptCorner, GetDocument()))   // move figure to new place
    {
      CSpiroRect  rect;
      m_pFigureDrag->GetBoundingRect(&rect);
      rect.Scale(m_nZoomNumer, m_nZoomDenom);
      pDC->LPtoDP(&rect);
      InvalidateRect(&rect);
      ReleaseDC(pDC);
    }

    m_pILDragFigure->DragLeave(this);
    m_pILDragFigure->EndDrag();
    UpdateWindow();
    delete m_pILDragFigure;
    delete m_pBitmapDragFigure;
    m_pBitmapDragFigure = NULL;
    m_pILDragFigure = NULL;

    ReleaseCapture();
    m_pFigureDrag = NULL;
  }

  CScrollView::OnLButtonUp(nFlags, point);
}

void CSpiroView::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 689 of file spiroView.cpp.

{
  if (m_bMovingPencil || m_pFigureDrag != NULL)  // the user is dragging the pencil location
  {
    CPoint ptWindow(point);
    ClientToScreen(&ptWindow);
    CRect rectWindow;
    GetWindowRect(&rectWindow);
    ptWindow.Offset(-rectWindow.left, -rectWindow.top);

    CImageList* pImList = m_bMovingPencil? &GetApp()->m_imageList : m_pILDragFigure;

    ENSURE(pImList != NULL);
    if (m_bStartDrag)
    {
      ENSURE(m_pFigureDrag != NULL);
      m_bStartDrag = false;
      CSpiroRect rect;
      m_pFigureDrag->GetBoundingRect(&rect);
      rect.Scale(m_nZoomNumer, m_nZoomDenom);
      CDC* pDC = GetDC();
      ENSURE(pDC != NULL);
      OnPrepareDC(pDC);
      pDC->LPtoDP(&rect);
      ReleaseDC(pDC);
      rect.InflateRect(4, 4);
      InvalidateRect(&rect);
      pImList->DragLeave(this);
      UpdateWindow();
      pImList->DragEnter(this, ptWindow);
    }
    else
      pImList->DragMove(ptWindow);

    return;
  }

  CScrollView::OnMouseMove(nFlags, point);
}

void CSpiroView::OnPauseDrawing ( ) [protected]

Definition at line 1341 of file spiroView.cpp.

{
  KillTimer(m_IDTimer);
  m_bDrawingActive = false;
}

void CSpiroView::OnPenWidth ( ) [protected]

Definition at line 408 of file spiroView.cpp.

{
  CSpiroDoc* pDoc = GetDocument();
  ENSURE(pDoc != NULL);

  pDoc->m_bThickPen = !pDoc->m_bThickPen; // toggle the width of the pen
}

void CSpiroView::OnPrepareDC | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo = NULL |
 | ) |  |  | [virtual]

Definition at line 375 of file spiroView.cpp.

{
  CScrollView::OnPrepareDC(pDC, pInfo);

  CSpiroDoc* pDoc = GetDocument();
  ENSURE(pDoc != NULL);

  if (!pDC->IsPrinting())
    pDC->SetWindowOrg(0, pDoc->m_sizeExtent.cy * m_nZoomNumer / m_nZoomDenom);
}

BOOL CSpiroView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 303 of file spiroView.cpp.

{
  BOOL bRet = DoPreparePrinting(pInfo);
  pInfo->m_nNumPreviewPages = 2;
  pInfo->SetMaxPage(2);   // will always print 2 pages
  return bRet;
}

void CSpiroView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 1347 of file spiroView.cpp.

{
  CSpiroDoc*  pDoc = GetDocument();
  ENSURE(pDC != NULL);

  CRect rect(pInfo->m_rectDraw);
  rect.NormalizeRect();
  long  cyDiff = max(0, GetDocument()->m_sizeExtent.cy / 2 - rect.Height());

  if (pInfo->m_nCurPage == 1)
    pDC->SetWindowOrg(0, pDoc->m_sizeExtent.cy - cyDiff);  // clip off the top if necessary
  else
    pDC->SetWindowOrg(0, pDoc->m_sizeExtent.cy / 2);  // never clip on the second page

  CScrollView::OnPrint(pDC, pInfo);
}

void CSpiroView::OnPurple ( ) [protected]

Definition at line 1316 of file spiroView.cpp.

{
  PressButton(ID_PURPLE);
}

void CSpiroView::OnRed ( ) [protected]

Definition at line 1321 of file spiroView.cpp.

{
  PressButton(ID_RED);
}

void CSpiroView::OnRemovePiece ( CBasePiece ** ppPiece ) [protected]

Definition at line 789 of file spiroView.cpp.

{
  ENSURE(ppPiece != NULL && *ppPiece != NULL);
  CRgn  rgnPiece;

  CDC*  pDC = GetDC();
  ENSURE(pDC != NULL);
  OnPrepareDC(pDC);

  (*ppPiece)->GetDevPieceRgn(pDC, &rgnPiece, m_nZoomNumer, m_nZoomDenom, true);

  InvalidateRgn(&rgnPiece);
  delete *ppPiece;
  *ppPiece = NULL;
  ReleaseDC(pDC);
  GetDocument()->TransferCurrentFigure();  // make the current figure permanent
  m_bDrawingDone = false;
}

void CSpiroView::OnRemoveRing ( ) [protected]

Definition at line 808 of file spiroView.cpp.

{
  ENSURE(m_pAnchor != NULL);
  OnRemovePiece(&m_pAnchor);
  if (m_pWheel != NULL)
    OnRemovePiece(&m_pWheel);
}

void CSpiroView::OnRemoveWheel ( ) [protected]

Definition at line 816 of file spiroView.cpp.

{
  OnRemovePiece(&m_pWheel);
}

BOOL CSpiroView::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 421 of file spiroView.cpp.

{
  if (m_bDroppingAnchor)
  {
    ::SetCursor(GetApp()->m_cursorRing);
    return TRUE;
  }

  if (m_bDroppingWheel)
  {
    ::SetCursor(GetApp()->m_cursorWheel);
    return TRUE;
  }

  return CScrollView::OnSetCursor(pWnd, nHitTest, message);
}

void CSpiroView::OnSlow ( ) [protected]

Definition at line 1369 of file spiroView.cpp.

{
  m_nTracesPerTick = TRACES_PER_TICK_SLOW;
}

void CSpiroView::OnTraceWidth ( ) [protected]

Definition at line 1398 of file spiroView.cpp.

{
  CMainFrame*   pFrame = (CMainFrame*)AfxGetMainWnd();
  ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
  CToolBarCtrl& tbctrl = pFrame->m_wndToolBar.GetToolBarCtrl();
  m_nCurrentPenWidth = tbctrl.IsButtonChecked(ID_TRACEWIDTH)? 2 : 1;
  CFigure* pFig = GetDocument()->m_pFigureCurrent;
  if (pFig != NULL)  // change the command that sets the pen width
  {
    INT_PTR iLim = pFig->m_arrCommands.GetSize();
    int i;
    CFigCommand figCommand;
    for (i = 0; i < iLim; i++)
    {
      figCommand = pFig->m_arrCommands.GetAt(i);
      if (figCommand.m_type != SET_PEN_WIDTH)
        continue;

      figCommand.m_nPenWidth = m_nCurrentPenWidth;
      pFig->m_arrCommands.SetAt(i, figCommand);
      break;
    }

    ASSERT(iLim == 0 || i < iLim);
  }
}

void CSpiroView::OnUpdateAnyRing ( CCmdUI * pCmdUI ) [protected]

Definition at line 386 of file spiroView.cpp.

{
  pCmdUI->Enable(m_pAnchor == NULL && !m_bDroppingAnchor && !m_bDroppingWheel);
}

void CSpiroView::OnUpdateAnyWheel ( CCmdUI * pCmdUI ) [protected]

Definition at line 391 of file spiroView.cpp.

{
  // The wheel can act as a ring or as a wheel
  pCmdUI->Enable((m_pAnchor == NULL || m_pWheel == NULL) &&
          !m_bDroppingAnchor && !m_bDroppingWheel);
}

void CSpiroView::OnUpdateColor ( CCmdUI * pCmdUI ) [protected]

Definition at line 1331 of file spiroView.cpp.

{
  pCmdUI->Enable(m_pWheel != NULL && !m_bDrawingActive);
}

void CSpiroView::OnUpdateDraw ( CCmdUI * pCmdUI ) [protected]

Definition at line 398 of file spiroView.cpp.

{
  pCmdUI->Enable(m_pAnchor != NULL && m_pWheel != NULL);
}

void CSpiroView::OnUpdateDrawPattern ( CCmdUI * pCmdUI ) [protected]

Definition at line 1093 of file spiroView.cpp.

{
  pCmdUI->Enable(!m_bDrawingDone && m_pAnchor != NULL && m_pWheel != NULL);
}

void CSpiroView::OnUpdateFast ( CCmdUI * pCmdUI ) [protected]

Definition at line 1374 of file spiroView.cpp.

{
  pCmdUI->Enable(m_nTracesPerTick != TRACES_PER_TICK_FAST);
}

void CSpiroView::OnUpdatePause ( CCmdUI * pCmdUI ) [protected]

Definition at line 403 of file spiroView.cpp.

{
  pCmdUI->Enable(m_bDrawingActive);
}

void CSpiroView::OnUpdatePauseDrawing ( CCmdUI * pCmdUI ) [protected]

Definition at line 1336 of file spiroView.cpp.

{
  pCmdUI->Enable(m_bDrawingActive);
}

void CSpiroView::OnUpdatePenWidth ( CCmdUI * pCmdUI ) [protected]

Definition at line 416 of file spiroView.cpp.

{
  pCmdUI->Enable(!m_bDrawingActive);
}

void CSpiroView::OnUpdateRemoveRing ( CCmdUI * pCmdUI ) [protected]

Definition at line 779 of file spiroView.cpp.

{
  pCmdUI->Enable(m_pAnchor != NULL && !m_bDroppingAnchor && !m_bDroppingWheel && !m_bDrawingActive);
}

void CSpiroView::OnUpdateRemoveWheel ( CCmdUI * pCmdUI ) [protected]

Definition at line 784 of file spiroView.cpp.

{
  pCmdUI->Enable(m_pWheel != NULL && !m_bDroppingAnchor && !m_bDroppingWheel && !m_bDrawingActive);
}

void CSpiroView::OnUpdateSlow ( CCmdUI * pCmdUI ) [protected]

Definition at line 1364 of file spiroView.cpp.

{
  pCmdUI->Enable(m_nTracesPerTick != TRACES_PER_TICK_SLOW);
}

void CSpiroView::OnUpdateTimerTick ( CCmdUI * pCmdUI ) [protected]

Definition at line 1392 of file spiroView.cpp.

{
  pCmdUI->Enable(!m_bDrawingActive && !m_bDrawingDone && m_pWheel != NULL && m_pAnchor != NULL);
}

void CSpiroView::OnUpdateTraceWidth ( CCmdUI * pCmdUI ) [protected]

Definition at line 1425 of file spiroView.cpp.

{
  CSpiroDoc* pDoc = GetDocument();
  ENSURE(pDoc != NULL && pDoc->IsKindOf(RUNTIME_CLASS(CSpiroDoc)));
  pCmdUI->Enable(pDoc->m_pFigureCurrent != NULL && pDoc->m_pFigureCurrent->m_nTotalDrawn == 0);
}

void CSpiroView::OnUpdateZoomIn ( CCmdUI * pCmdUI ) [protected]

Definition at line 821 of file spiroView.cpp.

{
  pCmdUI->Enable(m_nZoomNumer != 1 || m_nZoomDenom != 1);
}

void CSpiroView::OnUpdateZoomOut ( CCmdUI * pCmdUI ) [protected]

Definition at line 855 of file spiroView.cpp.

{
  pCmdUI->Enable(m_nZoomNumer != 1 || m_nZoomDenom != 4);
}

void CSpiroView::OnYellow ( ) [protected]

Definition at line 1326 of file spiroView.cpp.

{
  PressButton(ID_YELLOW);
}

void CSpiroView::OnZoomIn ( ) [protected]

Definition at line 826 of file spiroView.cpp.

{
  ZoomChange(1);
}

void CSpiroView::OnZoomOut ( ) [protected]

Definition at line 850 of file spiroView.cpp.

{
  ZoomChange(-1);
}

BOOL CSpiroView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 151 of file spiroView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CScrollView::PreCreateWindow(cs);
}

void CSpiroView::PressButton ( UINT id ) [protected]

Definition at line 1237 of file spiroView.cpp.

{
  UINT rgID[] = {ID_BLUE, ID_RED, ID_GREEN, ID_YELLOW, ID_PURPLE};
  COLORREF rgCo[] = {RGB(0, 0, 255), RGB(255, 0, 0),
            RGB(128, 128, 0), RGB(128, 64, 64), RGB(255, 0, 255)};

  CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
  ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
  CToolBarCtrl& tbctrl = pFrame->m_wndToolBar.GetToolBarCtrl();

  bool bCheck = tbctrl.IsButtonChecked(id) != 0;
  tbctrl.CheckButton(id, bCheck);

  int i;

  ENSURE(m_pWheel != NULL);     // otherwise the buttons should be disabled.
  m_pWheel->m_nColorCount = 0;

  // if pressed the black button, uncheck all the other colors
  if (bCheck && id == ID_BLACK)
  {
    for (i = 0; i < elementsof(rgID); i++)
      tbctrl.CheckButton(rgID[i], FALSE);

    m_coCurrentPen = RGB(0, 0, 0);
    m_pWheel->m_nColorCount = 1;
    m_pWheel->m_rgCo[0] = RGB(0, 0, 0);
  }
  else
  {
    // if all the buttons are unchecked, check the black
    // if any button is checked, uncheck the black
    for (i = 0; i < elementsof(rgID); i++)
    {
      if (tbctrl.IsButtonChecked(rgID[i]))
      {
        m_pWheel->m_rgCo[m_pWheel->m_nColorCount++] = rgCo[i];
        tbctrl.CheckButton(ID_BLACK, FALSE);  // inefficient, but not terribly awful
      }
    }

    if (m_pWheel->m_nColorCount == 0)
    {
      tbctrl.CheckButton(ID_BLACK, TRUE);
      m_pWheel->m_nColorCount = 1;
      m_pWheel->m_rgCo[0] = RGB(0, 0, 0);
    }
  }

  // set the color information for the current figure
  CFigure* pFigure = GetDocument()->m_pFigureCurrent;
  ENSURE(pFigure != NULL);
  long nTracesLeft = pFigure->m_nTotalTraces - pFigure->m_nTotalDrawn;
  ASSERT(m_pWheel->m_nColorCount != 0);
  pFigure->m_nTracesPerColor = nTracesLeft / m_pWheel->m_nColorCount;
  pFigure->m_nTracesThisColor = 0;  // force a color change upon starting
  m_pWheel->m_icoCurrent = -1;  // restart current color count

  // update pen color on the display
  CSpiroRect rectPen;
  m_pWheel->GetPenRect(&rectPen);
  rectPen.Scale(m_nZoomNumer, m_nZoomDenom);
  CDC* pDC = GetDC();
  OnPrepareDC(pDC);
  pDC->LPtoDP(&rectPen);
  InvalidateRect(&rectPen);
  ReleaseDC(pDC);
}

void CALLBACK CSpiroView::TimerCallBack | ( | HWND | hWnd,
 |  | UINT | nMsg,
 |  | UINT_PTR | nIDEvent,
 |  | DWORD | dwTimer |
 | ) |  |  | [static]

Definition at line 1098 of file spiroView.cpp.

{
  ENSURE(g_pView != NULL && g_pView->IsKindOf(RUNTIME_CLASS(CSpiroView)));
  if (!g_pView->m_bDrawingActive)  //waiting for the timer to be killed
    return;

  CSpiroDoc* pDoc = g_pView->GetDocument();
  CFigure* pFigure = pDoc->m_pFigureCurrent;
  ENSURE(pFigure != NULL);

  int nLast =   min(pFigure->m_nTotalDrawn + g_pView->m_nTracesPerTick,
          pFigure->m_arrCommands.GetUpperBound());

  if (nLast == -1)
    return;

  int nFirst = pFigure->m_nTotalDrawn + 1;
  CFigCommand figCommand;

  // Will now invalidate the rectangle that needs to be drawn

  CSpiroRect  rect(1200, 0, 0, 1800);

  // go to the last known point in the pattern and move the pen to that position
  int i;
  for (i = 1; nFirst - i >= 0; i++)
  {
    figCommand = pFigure->m_arrCommands.GetAt(nFirst - i);
    if (figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO)
    {
      rect.left = rect.right = figCommand.m_point.x;
      rect.top = rect.bottom = figCommand.m_point.y;
      break;
    }
  }

  for (; nFirst <= nLast; nFirst++)
  {
    figCommand = pDoc->m_pFigureCurrent->m_arrCommands.GetAt(nFirst);
    if (figCommand.m_type == SET_PEN_WIDTH || figCommand.m_type == CHANGE_COLOR)
      continue;  // this does not change the area to be invalidated.

    // do we need to change color according to the selection?
    if (pFigure->m_nTracesThisColor-- == 0 &&
        g_pView->m_pWheel->m_icoCurrent != g_pView->m_pWheel->m_nColorCount - 1)
    {
      figCommand.m_type = CHANGE_COLOR;
      ASSERT(g_pView->m_pWheel->m_icoCurrent >= -1);
      figCommand.m_co = g_pView->m_pWheel->m_rgCo[++g_pView->m_pWheel->m_icoCurrent];
      pFigure->m_arrCommands.InsertAt(nFirst, figCommand);
      nLast++;
      pFigure->m_nTracesThisColor = pFigure->m_nTracesPerColor;
      continue;
    }

    if (pFigure->m_nTracesThisColor == -1)
      pFigure->m_nTracesThisColor = pFigure->m_nTracesPerColor;

    ASSERT(figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO);
    if (figCommand.m_point.x < rect.left)
      rect.left = figCommand.m_point.x;
    if (figCommand.m_point.x + 2 > rect.right)
      rect.right = figCommand.m_point.x + 2;
    if (figCommand.m_point.y > rect.top)
      rect.top = figCommand.m_point.y;
    if (figCommand.m_point.y - 2 < rect.bottom)
      rect.bottom = figCommand.m_point.y - 2;
  }

  pFigure->m_nTotalDrawn = nLast;
  ASSERT(nFirst == nLast + 1);  // make sure the while executed
  // now set the new position for the wheel
  ENSURE(g_pView->m_pWheel != NULL);
  g_pView->m_pWheel->MovePiece(g_pView, figCommand.m_ptWheelPos, figCommand.m_dWheelData,
            g_pView->m_nZoomNumer, g_pView->m_nZoomDenom);

  rect.Scale(g_pView->m_nZoomNumer, g_pView->m_nZoomDenom);
  CDC* pDC = g_pView->GetDC();
  g_pView->OnPrepareDC(pDC);
  pDC->LPtoDP(&rect);
  if (rect.left < rect.right && rect.top < rect.bottom)
    g_pView->InvalidateRect(&rect);  // Redraw area covering new lines

  g_pView->ReleaseDC(pDC);

  if (nLast == pDoc->m_pFigureCurrent->m_arrCommands.GetUpperBound() &&
            g_pView->m_IDTimer != 0)
  {
    g_pView->PostMessage(WM_COMMAND, ID_END_DRAWING );  // kill the timer
    g_pView->m_bDrawingActive = false;
  }

  pDoc->SetModifiedFlag();
}

void CSpiroView::ZoomChange ( int nChange ) [protected]

Definition at line 831 of file spiroView.cpp.

{
  m_nZoomNumer = (m_nZoomNumer * 4 / m_nZoomDenom) + nChange;
  m_nZoomDenom = 4;
  if (m_nZoomDenom % m_nZoomNumer == 0)
  {
    m_nZoomDenom /= m_nZoomNumer;
    m_nZoomNumer = 1;
  }

  // change the extent of the document to match the new zoom
  CSpiroDoc* pDoc = GetDocument();
  ENSURE(pDoc != NULL);
  SetScrollSizes(MM_SPIRO, CSize(pDoc->m_sizeExtent.cx * m_nZoomNumer / m_nZoomDenom,
            pDoc->m_sizeExtent.cy * m_nZoomNumer / m_nZoomDenom));

  Invalidate();  // invalidate the window so it's drawn again
}

Member Data Documentation

bool CSpiroView::m_bDrawingActive

Definition at line 29 of file spiroView.h.

bool CSpiroView::m_bDrawingDone

Definition at line 31 of file spiroView.h.

bool CSpiroView::m_bDroppingAnchor

Definition at line 32 of file spiroView.h.

bool CSpiroView::m_bDroppingWheel

Definition at line 33 of file spiroView.h.

bool CSpiroView::m_bMovingPencil

Definition at line 35 of file spiroView.h.

bool CSpiroView::m_bStartDrag

Definition at line 30 of file spiroView.h.

COLORREF CSpiroView::m_coCurrentPen

Definition at line 36 of file spiroView.h.

double CSpiroView::m_dDataAnchorFirst

Definition at line 46 of file spiroView.h.

double CSpiroView::m_dDataWheelFirst

Definition at line 47 of file spiroView.h.

INT_PTR CSpiroView::m_IDTimer

Definition at line 39 of file spiroView.h.

int CSpiroView::m_iPieceDropped

Definition at line 34 of file spiroView.h.

int CSpiroView::m_nCurrentPenWidth

Definition at line 37 of file spiroView.h.

int CSpiroView::m_nTracesPerTick

Definition at line 38 of file spiroView.h.

long CSpiroView::m_nZoomDenom

Definition at line 28 of file spiroView.h.

long CSpiroView::m_nZoomNumer

Definition at line 27 of file spiroView.h.

CBasePiece* CSpiroView::m_pAnchor

Definition at line 50 of file spiroView.h.

CBitmap* CSpiroView::m_pBitmap

Definition at line 42 of file spiroView.h.

CBitmap* CSpiroView::m_pBitmapDragFigure [protected]

Definition at line 57 of file spiroView.h.

CBitmap* CSpiroView::m_pbitmapOld

Definition at line 43 of file spiroView.h.

CDC* CSpiroView::m_pDCMem

Definition at line 41 of file spiroView.h.

CFigure* CSpiroView::m_pFigureDrag [protected]

Definition at line 55 of file spiroView.h.

CImageList* CSpiroView::m_pILDragFigure [protected]

Definition at line 54 of file spiroView.h.

CPoint CSpiroView::m_ptHotSpotDragFigure [protected]

Definition at line 56 of file spiroView.h.

CPoint CSpiroView::m_ptWheelPosFirst

Definition at line 48 of file spiroView.h.

CBasePiece* CSpiroView::m_pWheel

Definition at line 51 of file spiroView.h.

CSize CSpiroView::m_sizeBitmap

Definition at line 44 of file spiroView.h.

The documentation for this class was generated from the following files:
  • general/spiro/spiroView.h
  • general/spiro/spiroView.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSplashWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CSplashWnd Class Reference

#include "aboutbox.h"

List of all members.

Public Types

enum | { IDD = IDD_SPLASH }
enum | { IDD = IDD_SPLASH }
enum | { IDD = IDD_SPLASH }

Public Member Functions

BOOL | Create (CWnd *pParent)
BOOL | Create (CWnd *pParent)
BOOL | Create (CWnd *pParent=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()
virtual BOOL | OnInitDialog ()

Protected Attributes

CFont | m_font
CBigIcon m_icon

Detailed Description

Definition at line 70 of file aboutbox.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 81 of file aboutbox.h.

{ IDD = IDD_SPLASH };

anonymous enum
Enumerator:
IDD

Definition at line 54 of file splash.h.

{ IDD = IDD_SPLASH };

anonymous enum
Enumerator:
IDD

Definition at line 49 of file splash.h.

{ IDD = IDD_SPLASH };

Member Function Documentation

BOOL CSplashWnd::Create ( CWnd * pParent )

Definition at line 105 of file aboutbox.cpp.

{
  //{{AFX_DATA_INIT(CSplashWnd)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT

  if (!CDialog::Create(CSplashWnd::IDD, pParent))
  {
    TRACE0("Warning: creation of CSplashWnd dialog failed\n");
    return FALSE;
  }

  return TRUE;
}

BOOL CSplashWnd::Create ( CWnd * pParent = NULL )
BOOL CSplashWnd::Create ( CWnd * pParent )
void CSplashWnd::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 97 of file aboutbox.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CSplashWnd)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

virtual BOOL CSplashWnd::OnInitDialog ( ) [protected, virtual]
BOOL CSplashWnd::OnInitDialog ( ) [protected, virtual]

Definition at line 120 of file aboutbox.cpp.

{
  CDialog::OnInitDialog();
  CenterWindow();

  // initialize the big icon control
  m_icon.SubclassDlgItem(IDC_BIGICON, this);
  m_icon.SizeToContent();

  return TRUE;  // return TRUE  unless you set the focus to a control
}

virtual BOOL CSplashWnd::OnInitDialog ( ) [protected, virtual]

Member Data Documentation

CFont CSplashWnd::m_font [protected]

Definition at line 90 of file aboutbox.h.

CBigIcon CSplashWnd::m_icon [protected]

Definition at line 89 of file aboutbox.h.

The documentation for this class was generated from the following files:
  • ole/superpad/aboutbox.h
  • ole/wordpad/splash.h
  • vc2008fp/WordPad/splash.h
  • ole/superpad/aboutbox.cpp
  • ole/wordpad/splash.cpp
  • vc2008fp/WordPad/splash.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSplitButtonCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Private Attributes

CSplitButtonCtrlPage Class Reference

#include "SplitButtonCtrlPage.h"

List of all members.

Public Types

enum | { IDD = IDD_SPLIT_BUTTON }

Public Member Functions

CSplitButtonCtrlPage ()
virtual | ~CSplitButtonCtrlPage ()
afx_msg void | OnBnClickedCheckState ()
afx_msg void | OnBnClickedSetMenu1 ()
afx_msg void | OnBnClickedSetMenu2 ()
afx_msg void | OnBnClickedSetSize ()
afx_msg void | OnBnClickedSplitButton ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnLbnSelchangeListStyle ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Private Attributes

CButton | m_checkState
CImageList | m_image
CListBox | m_listSplitStyle
CSplitButton | m_splitButton
UINT m_xSize
UINT m_ySize

Detailed Description

Definition at line 8 of file SplitButtonCtrlPage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 17 of file SplitButtonCtrlPage.h.

{ IDD = IDD_SPLIT_BUTTON };

Constructor & Destructor Documentation

CSplitButtonCtrlPage::CSplitButtonCtrlPage ( )

Definition at line 25 of file SplitButtonCtrlPage.cpp.

  : CPropertyPage(CSplitButtonCtrlPage::IDD)
{
}

CSplitButtonCtrlPage::~CSplitButtonCtrlPage ( ) [virtual]

Definition at line 30 of file SplitButtonCtrlPage.cpp.

{
}

Member Function Documentation

void CSplitButtonCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file SplitButtonCtrlPage.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_SPLIT_BUTTON, m_splitButton);
  DDX_Text(pDX, IDC_X_SIZE, m_xSize);
  DDX_Text(pDX, IDC_Y_SIZE, m_ySize);
  DDX_Control(pDX, IDC_LIST_STYLE, m_listSplitStyle);
  DDX_Control(pDX, IDC_CHECK_STATE, m_checkState);
}

void CSplitButtonCtrlPage::OnBnClickedCheckState ( )

Definition at line 147 of file SplitButtonCtrlPage.cpp.

{
  m_splitButton.SetDropDownState(m_checkState.GetCheck() == BST_CHECKED);
}

void CSplitButtonCtrlPage::OnBnClickedSetMenu1 ( )

Definition at line 79 of file SplitButtonCtrlPage.cpp.

{
  m_splitButton.SetDropDownMenu(IDR_SPLIT_DROPDOWN_MENU, 0);
  m_splitButton.SetWindowText(_T("using MENU 1"));
}

void CSplitButtonCtrlPage::OnBnClickedSetMenu2 ( )

Definition at line 85 of file SplitButtonCtrlPage.cpp.

{
  m_splitButton.SetDropDownMenu(IDR_SPLIT_DROPDOWN_MENU, 1);
  m_splitButton.SetWindowText(_T("using MENU 2"));
}

void CSplitButtonCtrlPage::OnBnClickedSetSize ( )

Definition at line 91 of file SplitButtonCtrlPage.cpp.

{
  UpdateData(TRUE);

  SIZE size;
  size.cx = m_xSize;
  size.cy = m_ySize;
  m_splitButton.SetSplitSize(&size);
  m_splitButton.RedrawWindow();

  m_splitButton.GetSplitSize(&size);
  m_xSize = size.cx;
  m_ySize = size.cy;

  UpdateData(FALSE);
}

void CSplitButtonCtrlPage::OnBnClickedSplitButton ( )

Definition at line 140 of file SplitButtonCtrlPage.cpp.

{
  CString text;
  m_splitButton.GetWindowText(text);
  ::MessageBox(m_hWnd, CString(_T("You are ")) + text, _T("Thank you"), 0);
}

BOOL CSplitButtonCtrlPage::OnInitDialog ( ) [virtual]

Definition at line 44 of file SplitButtonCtrlPage.cpp.

{
  CPropertyPage::OnInitDialog();

  // Init UI
  m_image.Create(IDB_BITMAP1, 16, 1, RGB(255, 255, 255));
  OnBnClickedSetMenu1();

  SIZE size;
  BOOL ret = m_splitButton.GetSplitSize(&size);
  m_xSize = size.cx;
  m_ySize = size.cy;
  UpdateData(FALSE);

  // Fill in all the Split Button styles
  for (int i = 0; i < _countof(styles); i++)
    m_listSplitStyle.AddString(styles[i].lpszDisplay);

  m_splitButton.SetSplitStyle(styles[1].nStyle);  // BCSS_STRETCH
  m_listSplitStyle.SetSel(1);

  return TRUE;
}

void CSplitButtonCtrlPage::OnLbnSelchangeListStyle ( )

Definition at line 108 of file SplitButtonCtrlPage.cpp.

{
  // Get selected styles
  int nCount = m_listSplitStyle.GetSelCount();
  int *selectedItems = new int[nCount];
  m_listSplitStyle.GetSelItems(nCount, selectedItems);

  UINT nStyle = 0;
  for (int i = 0; i < nCount; i++)
    nStyle |= styles[selectedItems[i]].nStyle;

  delete[] selectedItems;

  // Some UI adjustments
  if (nStyle & BCSS_NOSPLIT)
    m_splitButton.SetSplitImageList(NULL);
  else if (nStyle & BCSS_IMAGE)
    m_splitButton.SetSplitImageList(&m_image);
  else
    m_splitButton.SetSplitGlyph('6');     // The default glyph

  m_splitButton.SetSplitStyle(nStyle);
  m_splitButton.RedrawWindow();

  // The split size could be reset
  SIZE size;
  m_splitButton.GetSplitSize(&size);
  m_xSize = size.cx;
  m_ySize = size.cy;
  UpdateData(FALSE);
}

Member Data Documentation

CButton CSplitButtonCtrlPage::m_checkState [private]

Definition at line 37 of file SplitButtonCtrlPage.h.

CImageList CSplitButtonCtrlPage::m_image [private]

Definition at line 36 of file SplitButtonCtrlPage.h.

CListBox CSplitButtonCtrlPage::m_listSplitStyle [private]

Definition at line 35 of file SplitButtonCtrlPage.h.

CSplitButton CSplitButtonCtrlPage::m_splitButton [private]

Definition at line 34 of file SplitButtonCtrlPage.h.

UINT CSplitButtonCtrlPage::m_xSize [private]

Definition at line 38 of file SplitButtonCtrlPage.h.

UINT CSplitButtonCtrlPage::m_ySize [private]

Definition at line 39 of file SplitButtonCtrlPage.h.

The documentation for this class was generated from the following files:
  • controls/cmnctrl/SplitButtonCtrlPage.h
  • controls/cmnctrl/SplitButtonCtrlPage.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSplitFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CSplitFrame Class Reference

#include "splitfrm.h"

List of all members.

Public Member Functions

virtual | ~CSplitFrame ()
virtual | ~CSplitFrame ()
virtual | ~CSplitFrame ()
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnUpdateFilePrintPreview (CCmdUI *pCmdUI)

Protected Member Functions

CSplitFrame ()
CSplitFrame ()
CSplitFrame ()

Protected Attributes

CSplitterWnd | m_wndSplitter
CSplitterWndEx | m_wndSplitter

Detailed Description

Definition at line 20 of file splitfrm.h.

Constructor & Destructor Documentation

CSplitFrame::CSplitFrame ( ) [protected]

Definition at line 27 of file splitfrm.cpp.

{
}

CSplitFrame::~CSplitFrame ( ) [virtual]

Definition at line 31 of file splitfrm.cpp.

{
}

CSplitFrame::CSplitFrame ( ) [protected]
virtual CSplitFrame::~CSplitFrame ( ) [virtual]
CSplitFrame::CSplitFrame ( ) [protected]
virtual CSplitFrame::~CSplitFrame ( ) [virtual]

Member Function Documentation

BOOL CSplitFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [virtual]

Definition at line 35 of file splitfrm.cpp.

{
  return m_wndSplitter.Create(this,
    2, 2,       // TODO: adjust the number of rows, columns
    CSize(10, 10),  // TODO: adjust the minimum pane size
    pContext);
}

virtual BOOL CSplitFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [virtual]
virtual BOOL CSplitFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [virtual]
void CSplitFrame::OnFilePrint ( )

Definition at line 48 of file splitfrm.cpp.

{
  if (m_dockManager.IsPrintPreviewValid ())
  {
    PostMessage (WM_COMMAND, AFX_ID_PREVIEW_PRINT);
  }
}

void CSplitFrame::OnFilePrintPreview ( )

Definition at line 56 of file splitfrm.cpp.

{
  if (m_dockManager.IsPrintPreviewValid ())
  {
    PostMessage (WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
  }
}

void CSplitFrame::OnUpdateFilePrintPreview ( CCmdUI * pCmdUI )

Definition at line 64 of file splitfrm.cpp.

{
  pCmdUI->SetCheck (m_dockManager.IsPrintPreviewValid ());
}

Member Data Documentation

CSplitterWnd CSplitFrame::m_wndSplitter [protected]

Definition at line 28 of file splitfrm.h.

CSplitterWndEx CSplitFrame::m_wndSplitter [protected]

Definition at line 28 of file splitfrm.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/splitfrm.h
  • ole/oclient/splitfra.h
  • vc2008fp/DrawClient/splitfrm.h
  • ole/drawcli/splitfrm.cpp
  • ole/oclient/splitfra.cpp
  • vc2008fp/DrawClient/splitfrm.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSplitterFrame Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CSplitterFrame Class Reference

#include "splitter.h"

List of all members.

Public Member Functions

virtual | ~CSplitterFrame ()
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)

Protected Member Functions

CSplitterFrame ()

Protected Attributes

CSplitterWnd | m_wndSplitter

Detailed Description

Definition at line 15 of file splitter.h.

Constructor & Destructor Documentation

CSplitterFrame::CSplitterFrame ( ) [protected]

Definition at line 31 of file splitter.cpp.

{
}

CSplitterFrame::~CSplitterFrame ( ) [virtual]

Definition at line 35 of file splitter.cpp.

{
}

Member Function Documentation

BOOL CSplitterFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext |
 | ) |  |  | [virtual]

Definition at line 40 of file splitter.cpp.

{
  // create a splitter with 1 row, 2 columns
  if (!m_wndSplitter.CreateStatic(this, 1, 2))
  {
    TRACE0("Failed to CreateStaticSplitter\n");
    return FALSE;
  }

  // add the first splitter pane - the default view in column 0
  if (!m_wndSplitter.CreateView(0, 0,
    pContext->m_pNewViewClass, CSize(130, 50), pContext))
  {
    TRACE0("Failed to create first pane\n");
    return FALSE;
  }

  // add the second splitter pane - an input view in column 1
  if (!m_wndSplitter.CreateView(0, 1,
    RUNTIME_CLASS(CInputView), CSize(0, 0), pContext))
  {
    TRACE0("Failed to create second pane\n");
    return FALSE;
  }

  // activate the input view
  SetActiveView((CView*)m_wndSplitter.GetPane(0,1));

  return TRUE;
}

Member Data Documentation

CSplitterWnd CSplitterFrame::m_wndSplitter [protected]

Definition at line 23 of file splitter.h.

The documentation for this class was generated from the following files:
  • general/viewex/splitter.h
  • general/viewex/splitter.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSSE2Surface16Intrinsic Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CSSE2Surface16Intrinsic Class Reference

#include "SSE2Surface.h"

Inherits CSurface.

List of all members.

Public Member Functions

virtual void | AdjustWidth (int *pWidth)
virtual void | BlurBits ()

Protected Member Functions

virtual void | OnCreated ()

Private Attributes

int | m_qqwpl
int | m_width

Detailed Description

Definition at line 40 of file SSE2Surface.h.

Member Function Documentation

void CSSE2Surface16Intrinsic::AdjustWidth ( int * pWidth ) [virtual]

Reimplemented from CSurface.

Definition at line 20 of file SSE2Surface16.cpp.

{
  ASSERT(pWidth != NULL);
  ASSERT(m_kDeltaX <= 7);

  // need to align/round-up to 128-bits/16-bytes
  // so that each line starts on an aligned boundary.

  // Since a pixel is 2 bytes wide, this means rounding
  // the nearest 8 pixels.
  *pWidth = (*pWidth+7-m_kDeltaX)& ~0x7;
}

void CSSE2Surface16Intrinsic::BlurBits ( ) [virtual]

Reimplemented from CSurface.

Definition at line 48 of file SSE2Surface16.cpp.

{
    int height = GetVisibleHeight();
    __m128i *pCur  = (__m128i *)GetPixelAddress(0,0);

  CSSE2 cUpBase, cDownBase, cCurBase, cLeftBase, cRightBase;
  CSSE2 cUp, cDown, cCur, cLeft, cRight;
  CSSE2 cDest;
  CSSE2 cMask;
  cMask.Fill(0x001f001f001f001fu); // colorspace mask - 5 bits per color

  do {
    int width = m_width;
    do {
      // Load pixels and do the mmx unpack
      // Note: pwCur is used to do non-aligned
      // data reads - which is not normally recommended.
      // on X86, it is faster than loading aligned and
      // shift-oring.
      WORD *pwCur = (WORD *)pCur;
      cLeftBase.LoadU(pwCur-1);
      cCurBase.Load(pCur);
      cRightBase.LoadU(pwCur+1);
      cUpBase.Load(pCur-m_qqwpl);
      cDownBase.Load(pCur+m_qqwpl);

      cLeft = cLeftBase & cMask;
      cCur = cCurBase & cMask;
      cRight = cRightBase & cMask;
      cUp = cUpBase & cMask;
      cDown = cDownBase & cMask;

      // Actual math. Don't step on current, or right.
      // Sum the 4 around and double the middle
      // Do current pixel in this line
      cDest = ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
      cMask <<= 5;

      cLeft = cLeftBase & cMask;
      cCur = cCurBase & cMask;
      cRight = cRightBase & cMask;
      cUp = cUpBase & cMask;
      cDown = cDownBase & cMask;

      // Actual math for next color space
      cDest |= cMask & ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
      cMask <<= 5;

      cLeft = (cLeftBase & cMask) >> 3;
      cCur = (cCurBase & cMask) >> 3;
      cRight = (cRightBase & cMask) >> 3;
      cUp = (cUpBase & cMask) >> 3;
      cDown = (cDownBase & cMask) >> 3;

      // Actual math for next color space
      cDest |= cMask & (cDown+cUp+cLeft+cRight+(cCur<<2));
      cDest.Store(pCur++);
      cMask >>= 10;
    } while (--width > 0);
  } while (--height > 0);
}

void CSSE2Surface16Intrinsic::OnCreated ( ) [protected, virtual]

Reimplemented from CSurface.

Definition at line 33 of file SSE2Surface16.cpp.

{
  ASSERT(GetBitDepth() == 16);
  ASSERT((GetPitch() & 0xF) == 0);
  ASSERT(GetVisibleWidth() && GetVisibleHeight());

  int width = GetVisibleWidth();
    m_qqwpl  = GetPitch()/16; // qwords Per Line
    m_width = (width+7)/8; // 8 pixels at a time
}

Member Data Documentation

int CSSE2Surface16Intrinsic::m_qqwpl [private]

Definition at line 48 of file SSE2Surface.h.

int CSSE2Surface16Intrinsic::m_width [private]

Definition at line 49 of file SSE2Surface.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/SSE2Surface.h
  • general/MMXSwarm/SSE2Surface16.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSSE2Surface24Intrinsic Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CSSE2Surface24Intrinsic Class Reference

#include "SSE2Surface.h"

Inherits CSurface.

List of all members.

Public Member Functions

virtual void | AdjustWidth (int *pWidth)
virtual void | BlurBits ()

Protected Member Functions

virtual void | OnCreated ()

Private Attributes

int | m_delta
int | m_qwpl
int | m_width

Detailed Description

Definition at line 27 of file SSE2Surface.h.

Member Function Documentation

void CSSE2Surface24Intrinsic::AdjustWidth ( int * pWidth ) [virtual]

Reimplemented from CSurface.

Definition at line 20 of file SSE2Surface24.cpp.

{
  ASSERT(pWidth != NULL);
  ASSERT(m_kDeltaX <= 15);

  // need to align/round-up to 256-bits/32-bytes
  // since we process 32 bit chunks.

  // Also need to make sure the pitch is 16 byte aligned.
  // so that each line starts on an aligned boundary.

  // Since a pixel is 3 bytes wide, this unfortunately means
  // making it 48 byte aligned, or 48/3 pixels, or round up to
  // the nearest 16.
  *pWidth = (*pWidth+15-m_kDeltaX)& ~0xF;
}

void CSSE2Surface24Intrinsic::BlurBits ( ) [virtual]

Reimplemented from CSurface.

Definition at line 50 of file SSE2Surface24.cpp.

{
    int height = GetVisibleHeight();
    ULONGLONG *pCur  = (ULONGLONG*)GetPixelAddress(0,0);

  CSSE2 cFader;
  CSSE2 cRight, cLeft;
  CSSE2 cUp, cDown, cCur;
  CSSE2 cResult;

  cFader.UnpackBytesLo( 0x0101010101010101u );
  cLeft.Clear();

  do {
    int width = m_width;
    do {
      BYTE *bpCur = (BYTE *)pCur;
      // Load pixels and do the mmx unpack
      cCur.UnpackBytesLo( pCur[0] );
      // treating non-aligned data as dwords isn't generally a good idea
      cRight.UnpackBytesLo( *(ULONGLONG *)(bpCur+3) );
      cUp.UnpackBytesLo( pCur[-m_qwpl] );
      cDown.UnpackBytesLo( pCur[m_qwpl] );

      // Sum the 4 around and double the middle
      // Do current pixel in this line
      cResult = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;

      cLeft.UnpackBytesLo( *(ULONGLONG *)(bpCur+5) );
      pCur++;
      bpCur = (BYTE *)pCur;
      cCur.UnpackBytesLo( pCur[0] );
      cRight.UnpackBytesLo( *(ULONGLONG *)(bpCur+3) );
      cUp.UnpackBytesLo( pCur[-m_qwpl] );
      cDown.UnpackBytesLo( pCur[m_qwpl] );
      cCur = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;

#if defined(TRIPPY)
      cCur += cFader; // increase the fade to white
      cResult += cFader; // increase the fade to white
#elif defined (FAST_FADE)
      cCur -= cFader; // increase the fade to white
      cResult -= cFader; // increase the fade to white
#endif
      // Reset the left before we write anything out.
      // treating non-aligned data as dwords isn't generally a good idea
      cLeft.UnpackBytesLo( *(ULONGLONG *)(bpCur+5) );
      cResult.PackBytes(pCur-1, cCur);
      pCur++;
    } while (--width > 0);
    pCur += m_delta;
  } while (--height > 0);
}

void CSSE2Surface24Intrinsic::OnCreated ( ) [protected, virtual]

Reimplemented from CSurface.

Definition at line 37 of file SSE2Surface24.cpp.

{
  ASSERT(GetBitDepth() == 24);
  ASSERT((GetPitch() & 0xF) == 0);
  ASSERT(GetVisibleWidth() && GetVisibleHeight());
  ASSERT(sizeof(RGBTRIPLE) == 3);

  int width = GetVisibleWidth();
    m_qwpl  = GetPitch()/8; // qwords Per Line
    m_width = (width*3+15)/16;// (+7/8) // m_qwpl/2 without processing off-screen bits;
  m_delta = m_qwpl - m_width*2;
}

Member Data Documentation

int CSSE2Surface24Intrinsic::m_delta [private]

Definition at line 37 of file SSE2Surface.h.

int CSSE2Surface24Intrinsic::m_qwpl [private]

Definition at line 35 of file SSE2Surface.h.

int CSSE2Surface24Intrinsic::m_width [private]

Definition at line 36 of file SSE2Surface.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/SSE2Surface.h
  • general/MMXSwarm/SSE2Surface24.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSSE2Surface32Intrinsic Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CSSE2Surface32Intrinsic Class Reference

#include "SSE2Surface.h"

Inherits CSurface.

List of all members.

Public Member Functions

virtual void | AdjustWidth (int *pWidth)
virtual void | BlurBits ()

Protected Member Functions

virtual void | OnCreated ()

Private Attributes

int | m_qwpl
int | m_width

Detailed Description

Definition at line 15 of file SSE2Surface.h.

Member Function Documentation

void CSSE2Surface32Intrinsic::AdjustWidth ( int * pWidth ) [virtual]

Reimplemented from CSurface.

Definition at line 20 of file SSE2Surface32.cpp.

{
  ASSERT(pWidth != NULL);
  ASSERT(m_kDeltaX <= 3);

  *pWidth = (*pWidth + 3-m_kDeltaX) & ~3; // round up by 4
}

void CSSE2Surface32Intrinsic::BlurBits ( ) [virtual]

Reimplemented from CSurface.

Definition at line 40 of file SSE2Surface32.cpp.

{
    int height = GetVisibleHeight();
    ULONGLONG *pCur  = (ULONGLONG *)GetPixelAddress(0,0);
  ASSERT((DWORD_PTR(pCur) & 0xF) == 0);

  CSSE2 cFader;
  CSSE2 cRight, cLeft;
  CSSE2 cUp, cDown, cCur;
  CSSE2 cResult;

  cFader.UnpackBytesLo( 0x0101010101010101u );
  cLeft.Clear();

  do {
    int width = m_width;
    ASSERT((DWORD_PTR(pCur) & 0xF) == 0);
    do {
      RGBQUAD *pdwCur = (RGBQUAD*)pCur;
      ULONGLONG *pNext = (ULONGLONG*)(pdwCur+1);

      // Load pixels and do the mmx unpack
      cCur.UnpackBytesLo( *pCur );
      cRight.UnpackBytesLo( *pNext );
      cUp.UnpackBytesLo( pCur[-m_qwpl] );
      cDown.UnpackBytesLo( pCur[m_qwpl] );

      // Actual math. Don't step on current, or right.
      // Sum the 4 around and double the middle

      // Do current pixel in this line
      cResult = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;

      // Do next pixel
      cLeft = cRight;     // Slide left!
      cCur.UnpackBytesLo( pCur[1] );
      cRight.UnpackBytesLo( pNext[1] );
      cUp.UnpackBytesLo( pCur[-m_qwpl+1] );
      cDown.UnpackBytesLo( pCur[m_qwpl+1] );
      cCur = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;

#if defined(TRIPPY)
      cCur += cFader; // increase the fade to white
      cResult += cFader; // increase the fade to white
#elif defined (FAST_FADE)
          cCur -= cFader; // increase the fade to black
          cResult -= cFader; // increase the fade to black
#endif
      cLeft = cRight;     // Slide left!

      cResult.PackBytes(pCur, cCur);
      pCur += 2;
    } while (--width > 0);
  } while (--height > 0);
}

void CSSE2Surface32Intrinsic::OnCreated ( ) [protected, virtual]

Reimplemented from CSurface.

Definition at line 28 of file SSE2Surface32.cpp.

{
  ASSERT(GetBitDepth() == 32);
  ASSERT((GetPitch() & 0xF) == 0);
  ASSERT(GetVisibleWidth() && GetVisibleHeight());
  ASSERT(sizeof(RGBQUAD) == 4);

  int width = GetVisibleWidth();
    m_qwpl  = GetPitch()/8; // qwords Per Line
    m_width = (width+3)/4; // 4 pixels at a time
}

Member Data Documentation

int CSSE2Surface32Intrinsic::m_qwpl [private]

Definition at line 23 of file SSE2Surface.h.

int CSSE2Surface32Intrinsic::m_width [private]

Definition at line 24 of file SSE2Surface.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/SSE2Surface.h
  • general/MMXSwarm/SSE2Surface32.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSSE2Unsigned16Saturated Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CSSE2Unsigned16Saturated Class Reference

#include "SSE2Wrapper.h"

List of all members.

Public Member Functions

CSSE2Unsigned16Saturated ()
CSSE2Unsigned16Saturated (__m128i m128i)
CSSE2Unsigned16Saturated (ULONGLONG qw)
CSSE2Unsigned16Saturated & | AndNot (const CSSE2Unsigned16Saturated &m)
void | Clear ()
void | Fill (const ULONGLONG &qw)
void | Load (void *pAddr)
void | LoadU (void *pAddr)
operator __m128i () const
operator ULONGLONG () const
CSSE2Unsigned16Saturated & | operator&= (const CSSE2Unsigned16Saturated &m)
CSSE2Unsigned16Saturated & | operator+= (const CSSE2Unsigned16Saturated &m)
CSSE2Unsigned16Saturated & | operator-= (const CSSE2Unsigned16Saturated &m)
CSSE2Unsigned16Saturated & | operator<<= (int nBits)
CSSE2Unsigned16Saturated & | operator= (const CSSE2Unsigned16Saturated &m)
CSSE2Unsigned16Saturated & | operator= (const ULONGLONG &qw)
CSSE2Unsigned16Saturated & | operator>>= (int nBits)
CSSE2Unsigned16Saturated & | operator|= (const CSSE2Unsigned16Saturated &m)
ULONGLONG | PackBytes () const
void | PackBytes (void *pAddr, const CSSE2Unsigned16Saturated &mUpper) const
void | PackBytesU (void *pAddr, const CSSE2Unsigned16Saturated &mUpper) const
void | Store (void *pAddr)
void | StoreU (void *pAddr)
void | UnpackBytes (CSSE2Unsigned16Saturated &mmLeft)
void | UnpackBytesHi (ULONGLONG qw)
void | UnpackBytesLo (const ULONGLONG &qw)

Public Attributes

__m128i | m_m128i

Detailed Description

Definition at line 17 of file SSE2Wrapper.h.

Constructor & Destructor Documentation

CSSE2Unsigned16Saturated::CSSE2Unsigned16Saturated ( ) [inline]

Definition at line 20 of file SSE2Wrapper.h.

  {
  }

CSSE2Unsigned16Saturated::CSSE2Unsigned16Saturated ( __m128i m128i ) [inline]

Definition at line 23 of file SSE2Wrapper.h.

  {
    m_m128i = m128i;
  }

CSSE2Unsigned16Saturated::CSSE2Unsigned16Saturated ( ULONGLONG qw ) [inline]

Definition at line 27 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_loadl_epi64((__m128i*)&qw);
  }

Member Function Documentation

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::AndNot ( const CSSE2Unsigned16Saturated & m ) [inline]

Definition at line 100 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_andnot_si128(m, m_m128i);
    return(*this);
  }

void CSSE2Unsigned16Saturated::Clear ( ) [inline]

Definition at line 54 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_setzero_si128();
  }

void CSSE2Unsigned16Saturated::Fill ( const ULONGLONG & qw ) [inline]

Definition at line 59 of file SSE2Wrapper.h.

  {
    __m64 m;
    m.m64_u64 = qw;
    m_m128i = _mm_set1_epi64( m );
  }

void CSSE2Unsigned16Saturated::Load ( void * pAddr ) [inline]

Definition at line 125 of file SSE2Wrapper.h.

  {
    ASSERT((DWORD_PTR(pAddr)& 0xF) == 0);
    m_m128i = _mm_load_si128( (__m128i *)pAddr );
  }

void CSSE2Unsigned16Saturated::LoadU ( void * pAddr ) [inline]

Definition at line 132 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_loadu_si128( (__m128i *)pAddr );
  }

CSSE2Unsigned16Saturated::operator __m128i ( ) const [inline]

Definition at line 43 of file SSE2Wrapper.h.

  {
    return( m_m128i );
  }

CSSE2Unsigned16Saturated::operator ULONGLONG ( ) const [inline]

Definition at line 49 of file SSE2Wrapper.h.

  {
    return( *m_m128i.m128i_i64 );
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator&= ( const CSSE2Unsigned16Saturated & m ) [inline]

Definition at line 88 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_and_si128(m_m128i, m);
    return(*this);
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator+= ( const CSSE2Unsigned16Saturated & m ) [inline]

Definition at line 66 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_adds_epu16( m_m128i, m );
    return( *this );
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator-= ( const CSSE2Unsigned16Saturated & m ) [inline]

Definition at line 71 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_subs_epu16( m_m128i, m );
    return( *this );
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator<<= ( int nBits ) [inline]

Definition at line 82 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_slli_epi16( m_m128i, nBits );
    return( *this );
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator= ( const ULONGLONG & qw ) [inline]

Definition at line 37 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_loadl_epi64((__m128i*)&qw);
    return( *this );
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator= ( const CSSE2Unsigned16Saturated & m ) [inline]

Definition at line 32 of file SSE2Wrapper.h.

  {
    m_m128i = m.m_m128i;
    return( *this );
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator>>= ( int nBits ) [inline]

Definition at line 76 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_srli_epi16( m_m128i, nBits );
    return( *this );
  }

CSSE2Unsigned16Saturated& CSSE2Unsigned16Saturated::operator|= ( const CSSE2Unsigned16Saturated & m ) [inline]

Definition at line 94 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_or_si128(m_m128i, m);
    return(*this);
  }

void CSSE2Unsigned16Saturated::PackBytes | ( | void * | pAddr,
 |  | const CSSE2Unsigned16Saturated & | mUpper |
 | ) |  |  | const [inline]

Definition at line 138 of file SSE2Wrapper.h.

  {
    ASSERT((DWORD_PTR(pAddr)& 0xF) == 0);
    _mm_store_si128( (__m128i *)pAddr, _mm_packus_epi16( m_m128i, mUpper ) );
  }

ULONGLONG CSSE2Unsigned16Saturated::PackBytes ( ) const [inline]

Definition at line 106 of file SSE2Wrapper.h.

  {
    return( *_mm_packus_epi16(m_m128i, _mm_setzero_si128()).m128i_i64 );
  }

void CSSE2Unsigned16Saturated::PackBytesU | ( | void * | pAddr,
 |  | const CSSE2Unsigned16Saturated & | mUpper |
 | ) |  |  | const [inline]

Definition at line 145 of file SSE2Wrapper.h.

  {
    _mm_storeu_si128( (__m128i *)pAddr, _mm_packus_epi16( m_m128i, mUpper ) );
  }

void CSSE2Unsigned16Saturated::Store ( void * pAddr ) [inline]

Definition at line 112 of file SSE2Wrapper.h.

  {
    ASSERT((DWORD_PTR(pAddr)& 0xF) == 0);
    _mm_store_si128( (__m128i *)pAddr, m_m128i );
  }

void CSSE2Unsigned16Saturated::StoreU ( void * pAddr ) [inline]

Definition at line 119 of file SSE2Wrapper.h.

  {
    _mm_storeu_si128( (__m128i *)pAddr, m_m128i );
  }

void CSSE2Unsigned16Saturated::UnpackBytes ( CSSE2Unsigned16Saturated & mmLeft ) [inline]

Definition at line 160 of file SSE2Wrapper.h.

  {
    mmLeft = _mm_unpackhi_epi8( m_m128i, _mm_setzero_si128() );
    m_m128i = _mm_unpacklo_epi8( m_m128i, _mm_setzero_si128() );
  }

void CSSE2Unsigned16Saturated::UnpackBytesHi ( ULONGLONG qw ) [inline]

Definition at line 155 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_unpacklo_epi8( _mm_setzero_si128(), _mm_loadl_epi64((__m128i*)&qw) );
  }

void CSSE2Unsigned16Saturated::UnpackBytesLo ( const ULONGLONG & qw ) [inline]

Definition at line 151 of file SSE2Wrapper.h.

  {
    m_m128i = _mm_unpacklo_epi8( _mm_loadl_epi64((__m128i*)&qw), _mm_setzero_si128() );
  }

Member Data Documentation

__m128i CSSE2Unsigned16Saturated::m_m128i

Definition at line 167 of file SSE2Wrapper.h.

The documentation for this class was generated from the following file:
  • general/MMXSwarm/SSE2Wrapper.h
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStandardBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CStandardBar Class Reference

#include "toolbar1.h"

List of all members.

Public Member Functions

CStandardBar ()
virtual | ~CStandardBar ()
virtual BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
virtual BOOL | OnChildNotify (UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pLResult)

Protected Member Functions

BOOL | BeginAdjust (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | BeginDrag (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | CustomizeHelp (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | EndAdjust (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | EndDrag (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | GetButtonInfo (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
CString | NeedText (UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult)
afx_msg void | OnNeedTextA (UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult)
afx_msg void | OnNeedTextW (UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult)
BOOL | QueryDelete (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | QueryInsert (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | Reset (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)
BOOL | ToolBarChange (WPARAM wParam, LPARAM lParam, LRESULT *pLResult)

Private Attributes

int | m_nButtonCount
TBBUTTON * | m_pTBButtons

Detailed Description

Definition at line 18 of file toolbar1.h.

Constructor & Destructor Documentation

CStandardBar::CStandardBar ( )

Definition at line 27 of file toolbar1.cpp.

                           : m_pTBButtons(NULL)
{

}

CStandardBar::~CStandardBar ( ) [virtual]

Definition at line 32 of file toolbar1.cpp.

{
  delete []m_pTBButtons;
}

Member Function Documentation

BOOL CStandardBar::BeginAdjust | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 153 of file toolbar1.cpp.

{
  TRACE(_T("TBN_BEGINADJUST\n"));

  // the customize dialog box is about to be displayed

  // save toolbar state before customization using the dialog
  // Use this information to restore the state if reset button is pressed
  SaveState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Standard Tool Bar"));

  return TRUE;
}

BOOL CStandardBar::BeginDrag | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 166 of file toolbar1.cpp.

{
  TRACE(_T("TBN_BEGINDRAG\n"));

  // we are not implementing custon drag and drop
  * pLResult = FALSE;
  return FALSE;
}

BOOL CStandardBar::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID |
 | ) |  |  | [virtual]

Definition at line 46 of file toolbar1.cpp.

{
  BOOL bRet = CToolBarCtrl::Create(dwStyle, rect, pParentWnd, nID);

  m_nButtonCount = ID_CONTEXTHELP - ID_NEW + 1;

  VERIFY(AddBitmap(m_nButtonCount,IDR_STANDARDBAR) != -1);

  m_pTBButtons = new TBBUTTON[m_nButtonCount];

  int nIndex;
  for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
  {
    CString string;
    string.LoadString(nIndex + ID_NEW);

    // Add second '\0'
    int nStringLength = string.GetLength() + 1;
    TCHAR * pString = string.GetBufferSetLength(nStringLength);
    pString[nStringLength] = 0;

    VERIFY((m_pTBButtons[nIndex].iString = AddStrings(pString)) != -1);

    string.ReleaseBuffer();

    m_pTBButtons[nIndex].fsState = TBSTATE_ENABLED;
    m_pTBButtons[nIndex].fsStyle = TBSTYLE_BUTTON;
    m_pTBButtons[nIndex].dwData = 0;
    m_pTBButtons[nIndex].iBitmap = nIndex;
    m_pTBButtons[nIndex].idCommand = nIndex + ID_NEW;

  }

  TBBUTTON sepButton;
  sepButton.idCommand = 0;
  sepButton.fsStyle = TBSTYLE_SEP;
  sepButton.fsState = TBSTATE_ENABLED;
  sepButton.iString = 0;
  sepButton.iBitmap = 0;
  sepButton.dwData = 0;

  for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
  {
    VERIFY(AddButtons(1,&m_pTBButtons[nIndex]));
    if (!((nIndex +1) % 3))
    {
      VERIFY(AddButtons(1,&sepButton));
    }
  }

  return bRet;
}

BOOL CStandardBar::CustomizeHelp | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 175 of file toolbar1.cpp.

{
  TRACE(_T("TBN_CUSTHELP\n"));

  // Sample displays a message box but a valid help topic
  // can be displayed for the customize dialog for this toolbar
  AfxMessageBox(_T("Help not implemented!"));

  return TRUE;
}

BOOL CStandardBar::EndAdjust | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 186 of file toolbar1.cpp.

{
  TRACE(_T("TBN_ENDADJUST\n"));

  // the customize dialog box has been closed

  return TRUE;
}

BOOL CStandardBar::EndDrag | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 195 of file toolbar1.cpp.

{
  TRACE(_T("TBN_ENDDRAG\n"));

  // Code to handle custom drag and drop. This message indicates that
  // the item is being dropped
  * pLResult = FALSE;
  return TRUE;
}

BOOL CStandardBar::GetButtonInfo | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 205 of file toolbar1.cpp.

{
  // This notification message has to be handled correctly if
  // all operations in the custom dialogbox has to function correctly
  // We have to supply information for the button specified by pTBN->tbButton
  //
  // This notification is sent in the following cases
  //
  // After TBN_BEGINADJUST the control sends these notifications until
  // * pLResult is TRUE. We have to supply valid values when this value is
  // set to TRUE. Here the control is collecting information for all
  // the buttons that have to be displayed in the dialog box
  //
  // The control sends this notification to get information about
  // a button if the user is trying to add it to the toolbar or
  // rearranging the buttons on the toolbar from within the dialog

  TRACE(_T("TBN_GETBUTTONINFO\n"));

  TBNOTIFY *pTBN = (TBNOTIFY *) lParam;

  if (pTBN->iItem >= m_nButtonCount || pTBN->iItem < 0)
  {
    * pLResult = FALSE;
  }
  else
  {
    CString buffer;
    buffer.LoadString(pTBN->iItem + ID_NEW);

    // set the string for the button
    // truncate the string if its length is greater than the buffer
    // supplied by the toolbar
    _tcsncpy_s(pTBN->pszText, pTBN->cchText, buffer, _TRUNCATE);
    pTBN->pszText[pTBN->cchText - 1] = '\0';

    // set the button info
    pTBN->tbButton = m_pTBButtons[pTBN->iItem];

    // valid values are structure
    *pLResult = TRUE;
  }

  return TRUE;
}

CString CStandardBar::NeedText | ( | UINT | nID,
 |  | NMHDR * | pNotifyStruct,
 |  | LRESULT * | lResult |
 | ) |  |  | [protected]

Definition at line 294 of file toolbar1.cpp.

{
  LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct ;
  ASSERT(nID == lpTTT->hdr.idFrom);

  CString toolTipText;
  toolTipText.LoadString(nID);

  // szText length is 80
  int nLength = (toolTipText.GetLength() > 79) ? 79 : toolTipText.GetLength();

  toolTipText = toolTipText.Left(nLength);

  return toolTipText;
}

BOOL CStandardBar::OnChildNotify | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [virtual]

Definition at line 111 of file toolbar1.cpp.

{
  if (message == WM_NOTIFY)
  {
    NMHDR *pNMHDR = (NMHDR *) lParam;
    switch (pNMHDR->code)
    {
    case TBN_BEGINADJUST :
      return BeginAdjust(wParam,  lParam,  pLResult);

    case TBN_BEGINDRAG:
      return BeginDrag(wParam,  lParam,  pLResult);

    case TBN_CUSTHELP:
      return CustomizeHelp(wParam,  lParam,  pLResult);

    case TBN_ENDADJUST:
      return EndAdjust(wParam,  lParam,  pLResult);

    case TBN_ENDDRAG:
      return EndDrag(wParam,  lParam,  pLResult);

    case TBN_GETBUTTONINFO:
      return GetButtonInfo(wParam,  lParam,  pLResult);

    case TBN_QUERYDELETE:
      return QueryDelete(wParam,  lParam,  pLResult);

    case TBN_QUERYINSERT:
      return QueryInsert(wParam,  lParam,  pLResult);

    case TBN_RESET:
      return Reset(wParam, lParam,  pLResult);

    case TBN_TOOLBARCHANGE:
      return ToolBarChange(wParam, lParam, pLResult);
    }
  }

  return CToolBarCtrl::OnChildNotify(message, wParam, lParam, pLResult);
}

void CStandardBar::OnNeedTextA | ( | UINT | nID,
 |  | NMHDR * | pNotifyStruct,
 |  | LRESULT * | lResult |
 | ) |  |  | [protected]

Definition at line 327 of file toolbar1.cpp.

{
  if (pNotifyStruct->idFrom >= ID_NEW && pNotifyStruct->idFrom <= ID_CONTEXTHELP)
  {
    CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
    LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct;
    _tcscpy_s(lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText);
  }
}

void CStandardBar::OnNeedTextW | ( | UINT | nID,
 |  | NMHDR * | pNotifyStruct,
 |  | LRESULT * | lResult |
 | ) |  |  | [protected]

Definition at line 311 of file toolbar1.cpp.

{
  size_t numchars;

  if (pNotifyStruct->idFrom >= ID_NEW && pNotifyStruct->idFrom <= ID_CONTEXTHELP)
  {
    CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
    LPTOOLTIPTEXTW lpTTT = (LPTOOLTIPTEXTW)pNotifyStruct;
#ifndef _UNICODE
    mbstowcs_s(&numchars, lpTTT->szText, TTT_BUF_SIZE, (LPCSTR)toolTipText, toolTipText.GetLength());
#else
    _tcsncpy_s(lpTTT->szText, TTT_BUF_SIZE, toolTipText, toolTipText.GetLength());
#endif
  }
}

BOOL CStandardBar::QueryDelete | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 251 of file toolbar1.cpp.

{
  TRACE(_T("TBN_QUERYDELETE\n"));

  // in this sample any button can be deleted
  // if a particular button cannot be deleted set *pResult to FALSE for that item
  *pLResult = TRUE;
  return TRUE;
}

BOOL CStandardBar::QueryInsert | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 261 of file toolbar1.cpp.

{
  TRACE(_T("TBN_QUERYINSERT\n"));

  // in this sample buttons can be inserted at any location on the
  // toolbar
  *pLResult = TRUE;
  return TRUE;
}

BOOL CStandardBar::Reset | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 271 of file toolbar1.cpp.

{
  TRACE(_T("TBN_RESET\n"));

  // User has pressed the reset button
  // restore the state of the toolbar to the state it was before customization
  RestoreState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Standard Tool Bar"));

  *pLResult = TRUE;
  return TRUE;
}

BOOL CStandardBar::ToolBarChange | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pLResult |
 | ) |  |  | [protected]

Definition at line 283 of file toolbar1.cpp.

{
  TRACE(_T("TBN_TOOLBARCHANGE\n"));

  // the toolbar has changed
  return TRUE;
}

Member Data Documentation

int CStandardBar::m_nButtonCount [private]

Definition at line 21 of file toolbar1.h.

TBBUTTON* CStandardBar::m_pTBButtons [private]

Definition at line 22 of file toolbar1.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/toolbar1.h
  • general/CmnCtrl1/toolbar1.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStartView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CStartView Class Reference

#include "StartView.h"

List of all members.

Public Member Functions

virtual void | OnInitialUpdate ()

Public Attributes

CMFCToolBarImages | m_Image

Protected Member Functions

CStartView ()
virtual | ~CStartView ()
afx_msg void | OnDisableUpdate (CCmdUI *pCmdUI)
virtual void | OnDraw (CDC *pDC)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Detailed Description

Definition at line 15 of file StartView.h.

Constructor & Destructor Documentation

CStartView::CStartView ( ) [protected]

Definition at line 27 of file StartView.cpp.

{
}

CStartView::~CStartView ( ) [protected, virtual]

Definition at line 31 of file StartView.cpp.

{
}

Member Function Documentation

void CStartView::OnDisableUpdate ( CCmdUI * pCmdUI ) [protected]

Definition at line 94 of file StartView.cpp.

{
  pCmdUI->Enable(FALSE);
}

void CStartView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 77 of file StartView.cpp.

{
  ASSERT_VALID(pDC);

  CRect rectClient;
  GetClientRect(rectClient);

  pDC->FillSolidRect(rectClient, RGB(255, 255, 255));

  m_Image.DrawEx(pDC, rectClient, 0);
}

BOOL CStartView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 89 of file StartView.cpp.

{
  return TRUE;
}

void CStartView::OnInitialUpdate ( ) [virtual]

Definition at line 62 of file StartView.cpp.

{
  CDocument* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  if (m_Image.GetCount() == 0)
  {
    m_Image.Load(IDR_START);
    m_Image.SetSingleImage();
    m_Image.SetTransparentColor(RGB(255, 0, 255));
  }

  pDoc->SetTitle(_T("Start Page"));
}

Member Data Documentation

CMFCToolBarImages CStartView::m_Image

Definition at line 23 of file StartView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/StartView.h
  • vc2008fp/VisualStudioDemo/StartView.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStateCollectionApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CStateCollectionApp Class Reference

#include "StateCollection.h"

List of all members.

Public Member Functions

CStateCollectionApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file StateCollection.h.

Constructor & Destructor Documentation

CStateCollectionApp::CStateCollectionApp ( )

Definition at line 39 of file StateCollection.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CStateCollectionApp::ExitInstance ( ) [virtual]

Definition at line 119 of file StateCollection.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CStateCollectionApp::InitInstance ( ) [virtual]

Definition at line 53 of file StateCollection.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitMouseManager();
  InitContextMenuManager();
  InitKeyboardManager();

  // Enable user-defined tools. If you want allow more than 10 tools,
  // add tools entry to resources (ID_USER_TOOL11, ID_USER_TOOL12,...)
  EnableUserTools (ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10);

  // 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(CStateCollectionDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CStateCollectionView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  LoadCustomState ();

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CStateCollectionApp::OnAppAbout ( )

Definition at line 185 of file StateCollection.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CStateCollectionApp::PreLoadState ( ) [virtual]

Definition at line 124 of file StateCollection.cpp.

{

  GetMouseManager()->AddView (IDR_MAINFRAME, _T("My view"), IDR_MAINFRAME);

  // TODO: add another views and windows were mouse double click
  // customization is required

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/StateCollection/StateCollection.h
  • vc2008fp/StateCollection/StateCollection.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStateCollectionDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CStateCollectionDoc Class Reference

#include "StateCollectionDoc.h"

List of all members.

Public Member Functions

virtual | ~CStateCollectionDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CStateCollectionDoc ()

Detailed Description

Definition at line 13 of file StateCollectionDoc.h.

Constructor & Destructor Documentation

CStateCollectionDoc::CStateCollectionDoc ( ) [protected]

Definition at line 33 of file StateCollectionDoc.cpp.

{
  // TODO: add one-time construction code here

}

CStateCollectionDoc::~CStateCollectionDoc ( ) [virtual]

Definition at line 39 of file StateCollectionDoc.cpp.

{
}

Member Function Documentation

BOOL CStateCollectionDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file StateCollectionDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CStateCollectionDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file StateCollectionDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/StateCollection/StateCollectionDoc.h
  • vc2008fp/StateCollection/StateCollectionDoc.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStateCollectionView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CStateCollectionView Class Reference

#include "StateCollectionView.h"

List of all members.

Public Member Functions

virtual | ~CStateCollectionView ()
CStateCollectionDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CStateCollectionView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file StateCollectionView.h.

Constructor & Destructor Documentation

CStateCollectionView::CStateCollectionView ( ) [protected]

Definition at line 48 of file StateCollectionView.cpp.

{
  // TODO: add construction code here

}

CStateCollectionView::~CStateCollectionView ( ) [virtual]

Definition at line 54 of file StateCollectionView.cpp.

{
}

Member Function Documentation

CStateCollectionDoc * CStateCollectionView::GetDocument ( ) [inline]

Definition at line 52 of file StateCollectionView.h.

   { return (CStateCollectionDoc*)m_pDocument; }

void CStateCollectionView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 124 of file StateCollectionView.cpp.

{
  // TODO: add extra initialization before printing
}

void CStateCollectionView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 163 of file StateCollectionView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CStateCollectionView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 69 of file StateCollectionView.cpp.

{
//  CStateCollectionDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);
}

void CStateCollectionView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 129 of file StateCollectionView.cpp.

{
  // TODO: add cleanup after printing
}

void CStateCollectionView::OnFilePrintPreview ( ) [protected]

Definition at line 113 of file StateCollectionView.cpp.

{
  AFXPrintPreview (this);
}

void CStateCollectionView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 158 of file StateCollectionView.cpp.

{
  theApp.OnViewDoubleClick (this, IDR_MAINFRAME);
}

BOOL CStateCollectionView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 118 of file StateCollectionView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CStateCollectionView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 58 of file StateCollectionView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/StateCollection/StateCollectionView.h
  • vc2008fp/StateCollection/StateCollectionView.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStatPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CStatPage Class Reference

#include "statpage.h"

List of all members.

Public Types

enum | { IDD = IDD_STAT_PAGE }
enum | { IDD = IDD_STAT_PAGE }

Public Member Functions

CStatPage ()
CStatPage ()
~CStatPage ()
~CStatPage ()

Public Attributes

CString | m_strCreateDate
CString | m_strEditTime
CString | m_strLastPrint
CString | m_strLastSave
CString | m_strNumChars
CString | m_strNumPages
CString | m_strNumWords
CString | m_strRevNum
CString | m_strSavedBy
CString | m_strSecurity

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 14 of file statpage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file statpage.h.

{ IDD = IDD_STAT_PAGE };

anonymous enum
Enumerator:
IDD

Definition at line 26 of file statpage.h.

{ IDD = IDD_STAT_PAGE };

Constructor & Destructor Documentation

CStatPage::CStatPage ( )

Definition at line 25 of file statpage.cpp.

                     : CPropertyPage(CStatPage::IDD)
{
    //{{AFX_DATA_INIT(CStatPage)
  m_strCreateDate = _T("");
  m_strEditTime = _T("");
  m_strLastPrint = _T("");
  m_strLastSave = _T("");
  m_strNumChars = _T("");
  m_strNumPages = _T("");
  m_strNumWords = _T("");
  m_strRevNum = _T("");
  m_strSavedBy = _T("");
  m_strSecurity = _T("");
  //}}AFX_DATA_INIT
}

CStatPage::~CStatPage ( )

Definition at line 41 of file statpage.cpp.

{
}

CStatPage::CStatPage ( )
CStatPage::~CStatPage ( )

Member Function Documentation

void CStatPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 45 of file statpage.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CStatPage)
  DDX_Text(pDX, IDC_CREATEDATE, m_strCreateDate);
  DDX_Text(pDX, IDC_EDITTIME, m_strEditTime);
  DDX_Text(pDX, IDC_LASTPRINT, m_strLastPrint);
  DDX_Text(pDX, IDC_LASTSAVE, m_strLastSave);
  DDX_Text(pDX, IDC_NUMCHARS, m_strNumChars);
  DDX_Text(pDX, IDC_NUMPAGES, m_strNumPages);
  DDX_Text(pDX, IDC_NUMWORDS, m_strNumWords);
  DDX_Text(pDX, IDC_REVNUM, m_strRevNum);
  DDX_Text(pDX, IDC_SAVEDBY, m_strSavedBy);
  DDX_Text(pDX, IDC_SECURITY, m_strSecurity);
  //}}AFX_DATA_MAP
}

virtual void CStatPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Member Data Documentation

CString CStatPage::m_strCreateDate

Definition at line 30 of file statpage.h.

CString CStatPage::m_strEditTime

Definition at line 28 of file statpage.h.

CString CStatPage::m_strLastPrint

Definition at line 29 of file statpage.h.

CString CStatPage::m_strLastSave

Definition at line 31 of file statpage.h.

CString CStatPage::m_strNumChars

Definition at line 34 of file statpage.h.

CString CStatPage::m_strNumPages

Definition at line 32 of file statpage.h.

CString CStatPage::m_strNumWords

Definition at line 33 of file statpage.h.

CString CStatPage::m_strRevNum

Definition at line 27 of file statpage.h.

CString CStatPage::m_strSavedBy

Definition at line 26 of file statpage.h.

CString CStatPage::m_strSecurity

Definition at line 35 of file statpage.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/statpage.h
  • vc2008fp/DrawClient/statpage.h
  • ole/drawcli/statpage.cpp
  • vc2008fp/DrawClient/statpage.cpp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStatusBarDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CStatusBarDemoApp Class Reference

#include "StatusBarDemo.h"

List of all members.

Public Member Functions

CStatusBarDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file StatusBarDemo.h.

Constructor & Destructor Documentation

CStatusBarDemoApp::CStatusBarDemoApp ( )

Definition at line 39 of file StatusBarDemo.cpp.

                                     :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CStatusBarDemoApp::ExitInstance ( ) [virtual]

Definition at line 118 of file StatusBarDemo.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CStatusBarDemoApp::InitInstance ( ) [virtual]

Definition at line 54 of file StatusBarDemo.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(CStatusBarDemoDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CStatusBarDemoView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  if (afxGlobalData.m_nBitsPerPixel < 16)
  {
    AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
  }

  return TRUE;
}

void CStatusBarDemoApp::OnAppAbout ( )

Definition at line 179 of file StatusBarDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CStatusBarDemoApp::PreLoadState ( ) [virtual]

Definition at line 123 of file StatusBarDemo.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/StatusBarDemo/StatusBarDemo.h
  • vc2008fp/StatusBarDemo/StatusBarDemo.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStatusBarDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CStatusBarDemoDoc Class Reference

#include "StatusBarDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CStatusBarDemoDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CStatusBarDemoDoc ()

Detailed Description

Definition at line 13 of file StatusBarDemoDoc.h.

Constructor & Destructor Documentation

CStatusBarDemoDoc::CStatusBarDemoDoc ( ) [protected]

Definition at line 33 of file StatusBarDemoDoc.cpp.

{
  // TODO: add one-time construction code here

}

CStatusBarDemoDoc::~CStatusBarDemoDoc ( ) [virtual]

Definition at line 39 of file StatusBarDemoDoc.cpp.

{
}

Member Function Documentation

BOOL CStatusBarDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file StatusBarDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CStatusBarDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file StatusBarDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/StatusBarDemo/StatusBarDemoDoc.h
  • vc2008fp/StatusBarDemo/StatusBarDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStatusBarDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CStatusBarDemoView Class Reference

#include "StatusBarDemoView.h"

List of all members.

Public Types

enum | { IDD = IDD_STATUSBARDEMO_FORM }

Public Member Functions

virtual | ~CStatusBarDemoView ()
CStatusBarDemoDoc * GetDocument ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

int | m_nIcon
CMFCColorButton | m_wndBackColor
CButton | m_wndStartAnimation
CButton | m_wndStartProgress
CMFCColorButton | m_wndTextColor

Protected Member Functions

CStatusBarDemoView ()
virtual void | DoDataExchange (CDataExchange *pDX)
CMFCStatusBar & | GetStatusBar () const
afx_msg void | OnBackColor ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnIcon ()
afx_msg void | OnIndicatorLabel ()
virtual void | OnInitialUpdate ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnStartAnimation ()
afx_msg void | OnStartProgress ()
afx_msg void | OnTextColor ()
afx_msg void | OnTimer (UINT_PTR nIDEvent)

Protected Attributes

BOOL | m_bInAnimation
BOOL | m_bInProgress
CBitmap | m_bmpIcon1
CBitmap | m_bmpIcon2
CImageList | m_imlStatusAnimation
int | m_nProgressCurr

Detailed Description

Definition at line 15 of file StatusBarDemoView.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 22 of file StatusBarDemoView.h.

{ IDD = IDD_STATUSBARDEMO_FORM };

Constructor & Destructor Documentation

CStatusBarDemoView::CStatusBarDemoView ( ) [protected]

Definition at line 50 of file StatusBarDemoView.cpp.

  : CFormView(CStatusBarDemoView::IDD)
{
  m_nIcon = 0;

  m_nProgressCurr = 0;
  m_bInProgress = FALSE;
  m_bInAnimation = FALSE;
}

CStatusBarDemoView::~CStatusBarDemoView ( ) [virtual]

Definition at line 60 of file StatusBarDemoView.cpp.

{
}

Member Function Documentation

void CStatusBarDemoView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 64 of file StatusBarDemoView.cpp.

{
  CFormView::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_TEXT_COLOR, m_wndTextColor);
  DDX_Control(pDX, IDC_BACK_COLOR, m_wndBackColor);
  DDX_Control(pDX, IDC_START_ANIMATION, m_wndStartAnimation);
  DDX_Control(pDX, IDC_START_PROGRESS, m_wndStartProgress);
  DDX_Radio(pDX, IDC_ICON1, m_nIcon);
}

CStatusBarDemoDoc * CStatusBarDemoView::GetDocument ( ) [inline]

Definition at line 84 of file StatusBarDemoView.h.

   { return (CStatusBarDemoDoc*)m_pDocument; }

CMFCStatusBar& CStatusBarDemoView::GetStatusBar ( ) const [inline, protected]

Definition at line 68 of file StatusBarDemoView.h.

  {
    return ((CMainFrame*) AfxGetMainWnd ())->GetStatusBar ();
  }

void CStatusBarDemoView::OnBackColor ( ) [protected]

Definition at line 224 of file StatusBarDemoView.cpp.

{
  GetStatusBar ().SetPaneBackgroundColor (nStatusLabel, m_wndBackColor.GetColor ());
}

void CStatusBarDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 134 of file StatusBarDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

void CStatusBarDemoView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 173 of file StatusBarDemoView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CStatusBarDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 139 of file StatusBarDemoView.cpp.

{
  // TODO: add cleanup after printing
}

void CStatusBarDemoView::OnFilePrintPreview ( ) [protected]

Definition at line 123 of file StatusBarDemoView.cpp.

{
  AFXPrintPreview (this);
}

void CStatusBarDemoView::OnIcon ( ) [protected]

Definition at line 218 of file StatusBarDemoView.cpp.

{
  UpdateData ();
  GetStatusBar ().SetPaneIcon (nStatusIcon, m_nIcon == 0 ? m_bmpIcon1 : m_bmpIcon2);
}

void CStatusBarDemoView::OnIndicatorLabel ( ) [protected]

Definition at line 234 of file StatusBarDemoView.cpp.

{
  MessageBox (_T("Status bar pane double-click..."));
}

void CStatusBarDemoView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 82 of file StatusBarDemoView.cpp.

{
  // There is only one view ever, so it only needs to do the initial
  // update once--otherwise the application is  resized needlessly.
  static BOOL bUpdatedOnce = FALSE;
  if (bUpdatedOnce)
    return;
  bUpdatedOnce = TRUE;

  CFormView::OnInitialUpdate();

  m_wndTextColor.EnableAutomaticButton (_T("Default"), afxGlobalData.clrBtnText);
  m_wndTextColor.EnableOtherButton (_T("Other..."));
  m_wndTextColor.SetColor ((COLORREF)-1);

  m_wndBackColor.EnableAutomaticButton (_T("Default"), afxGlobalData.clrBtnFace);
  m_wndBackColor.EnableOtherButton (_T("Other..."));
  m_wndBackColor.SetColor ((COLORREF)-1);

  if (m_imlStatusAnimation.GetSafeHandle () == NULL)
  {
    m_imlStatusAnimation.Create (IDB_ANIMATION, 16, 0, RGB (255, 0, 255));
  }

  if (m_bmpIcon1.GetSafeHandle () == NULL)
  {
    m_bmpIcon1.LoadBitmap (IDB_ICON1);
  }

  if (m_bmpIcon2.GetSafeHandle () == NULL)
  {
    m_bmpIcon2.LoadBitmap (IDB_ICON2);
  }

  GetStatusBar ().SetPaneIcon (nStatusIcon, m_bmpIcon1);
  GetStatusBar ().SetTipText (nStatusIcon, _T("This is a tooltip"));
}

BOOL CStatusBarDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 128 of file StatusBarDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CStatusBarDemoView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 144 of file StatusBarDemoView.cpp.

{
  // TODO: add customized printing code here
}

void CStatusBarDemoView::OnStartAnimation ( ) [protected]

Definition at line 200 of file StatusBarDemoView.cpp.

{
  if (m_bInAnimation)
  {
    m_wndStartAnimation.SetWindowText (_T("Start Animation"));
    GetStatusBar ().SetPaneAnimation (nStatusAnimation, NULL);
    m_bInAnimation = FALSE;
    return;
  }

  GetStatusBar ().SetPaneAnimation (nStatusAnimation, m_imlStatusAnimation);
  GetStatusBar ().SetPaneText (nStatusAnimation, _T(""));
  GetStatusBar ().SetPaneWidth (nStatusAnimation, 16);

  m_wndStartAnimation.SetWindowText (_T("Stop Animation"));
  m_bInAnimation = TRUE;
}

void CStatusBarDemoView::OnStartProgress ( ) [protected]

Definition at line 178 of file StatusBarDemoView.cpp.

{
  if (m_bInProgress)
  {
    KillTimer (ID_PROGRESS_TIMER);
    m_wndStartProgress.SetWindowText (_T("Start Progress"));
    GetStatusBar ().EnablePaneProgressBar (nStatusProgress, -1);

    m_bInProgress = FALSE;

    return;
  }

  GetStatusBar ().EnablePaneProgressBar (nStatusProgress, PROGRESS_MAX);

  m_nProgressCurr = 0;
  m_bInProgress = TRUE;

  SetTimer (ID_PROGRESS_TIMER, 200, NULL);
  m_wndStartProgress.SetWindowText (_T("Stop Progress"));
}

void CStatusBarDemoView::OnTextColor ( ) [protected]

Definition at line 229 of file StatusBarDemoView.cpp.

{
  GetStatusBar ().SetPaneTextColor (nStatusLabel, m_wndTextColor.GetColor ());
}

void CStatusBarDemoView::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 239 of file StatusBarDemoView.cpp.

{
  if (nIDEvent == ID_PROGRESS_TIMER)
  {
    m_nProgressCurr += 5;

    if (m_nProgressCurr > PROGRESS_MAX)
    {
      m_nProgressCurr = 0;
    }

    GetStatusBar ().SetPaneProgress (nStatusProgress, m_nProgressCurr);
  }

  CFormView::OnTimer(nIDEvent);
}

BOOL CStatusBarDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 74 of file StatusBarDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CFormView::PreCreateWindow(cs);
}

Member Data Documentation

BOOL CStatusBarDemoView::m_bInAnimation [protected]

Definition at line 77 of file StatusBarDemoView.h.

BOOL CStatusBarDemoView::m_bInProgress [protected]

Definition at line 74 of file StatusBarDemoView.h.

CBitmap CStatusBarDemoView::m_bmpIcon1 [protected]

Definition at line 79 of file StatusBarDemoView.h.

CBitmap CStatusBarDemoView::m_bmpIcon2 [protected]

Definition at line 80 of file StatusBarDemoView.h.

CImageList CStatusBarDemoView::m_imlStatusAnimation [protected]

Definition at line 76 of file StatusBarDemoView.h.

int CStatusBarDemoView::m_nIcon

Definition at line 27 of file StatusBarDemoView.h.

int CStatusBarDemoView::m_nProgressCurr [protected]

Definition at line 73 of file StatusBarDemoView.h.

CMFCColorButton CStatusBarDemoView::m_wndBackColor

Definition at line 24 of file StatusBarDemoView.h.

CButton CStatusBarDemoView::m_wndStartAnimation

Definition at line 25 of file StatusBarDemoView.h.

CButton CStatusBarDemoView::m_wndStartProgress

Definition at line 26 of file StatusBarDemoView.h.

CMFCColorButton CStatusBarDemoView::m_wndTextColor

Definition at line 23 of file StatusBarDemoView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/StatusBarDemo/StatusBarDemoView.h
  • vc2008fp/StatusBarDemo/StatusBarDemoView.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStringCollect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CStringCollect Class Reference

#include "strcoll.h"

List of all members.

Public Member Functions

long | Add (LPCTSTR newValue)
void | CheckIndex (long nIndex)
long | Find (LPCTSTR findValue)
LPUNKNOWN | Get_NewEnum ()
long | GetCount ()
CString | GetItem (long nIndex)
virtual void | OnFinalRelease ()
long | Remove (const VARIANT &removeValue)
void | RemoveAll ()
void | SetCount (long)
void | SetItem (long nIndex, LPCTSTR lpszNewValue)

Public Attributes

CStringArray | m_strArray

Protected Member Functions

CStringCollect ()
virtual | ~CStringCollect ()
afx_msg long | Add (LPCTSTR newValue)
afx_msg long | Find (LPCTSTR findValue)
afx_msg long | GetCount ()
afx_msg BSTR | GetItem (long nIndex)
afx_msg LPUNKNOWN | GetNewEnum ()
afx_msg long | Remove (const VARIANT FAR &removeValue)
afx_msg void | RemoveAll ()
afx_msg void | SetItem (long nIndex, LPCTSTR lpszNewValue)

Detailed Description

Definition at line 15 of file strcoll.h.

Constructor & Destructor Documentation

CStringCollect::CStringCollect ( ) [protected]

Definition at line 27 of file strcoll.cpp.

{
  EnableAutomation();

  // To keep the application running as long as an OLE automation
  //  object is active, the constructor calls AfxOleLockApp.

  AfxOleLockApp();
}

CStringCollect::~CStringCollect ( ) [protected, virtual]

Definition at line 37 of file strcoll.cpp.

{
  // To terminate the application when all objects created with
  //  with OLE automation, the destructor calls AfxOleUnlockApp.

  AfxOleUnlockApp();
}

Member Function Documentation

long CStringCollect::Add ( LPCTSTR newValue ) [protected]

Definition at line 147 of file strcoll.cpp.

{
  m_strArray.Add(newValue);
  return (long)m_strArray.GetSize();
}

long CStringCollect::Add ( LPCTSTR newValue )
void CStringCollect::CheckIndex ( long nIndex )

Definition at line 93 of file strcoll.cpp.

{
  if (nIndex <= 0 || nIndex > m_strArray.GetSize())
    AfxThrowOleException(E_INVALIDARG);
}

long CStringCollect::Find ( LPCTSTR findValue )
long CStringCollect::Find ( LPCTSTR findValue ) [protected]

Definition at line 153 of file strcoll.cpp.

{
  int nCount = (int)m_strArray.GetSize();
  for (int i = 0; i < nCount; ++i)
  {
    if (m_strArray.ElementAt(i) == findValue)
      return i+1;
  }
  return -1;
}

LPUNKNOWN CStringCollect::Get_NewEnum ( )

Definition at line 197 of file ipremote.cpp.

{
  LPUNKNOWN result;
  InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
  return result;
}

long CStringCollect::GetCount ( )
long CStringCollect::GetCount ( void ) [protected]

Definition at line 130 of file strcoll.cpp.

{
  return (long)m_strArray.GetSize();
}

CString CStringCollect::GetItem ( long nIndex ) [protected]

Definition at line 135 of file strcoll.cpp.

{
  CheckIndex(nIndex);
  return m_strArray.ElementAt((int)nIndex-1).AllocSysString();
}

CString CStringCollect::GetItem ( long nIndex )
LPUNKNOWN CStringCollect::GetNewEnum ( ) [protected]

Definition at line 99 of file strcoll.cpp.

{
  #pragma warning (suppress: 6211)
  CEnumVariant* pEnum = new CEnumVariant;
  int nCount = (int)m_strArray.GetSize();
  #pragma warning (suppress: 6211)
  VARIANT* pContents = new VARIANT[nCount];
  int i;

  TRY
  {
    for (i = 0; i < nCount; ++i)
    {
      VariantInit(&pContents[i]);
      pContents[i].bstrVal = m_strArray.ElementAt(i).AllocSysString();
      pContents[i].vt = VT_BSTR;
    }
  }
  CATCH_ALL(e)
  {
    while (--i >= 0)
      VariantClear(&pContents[i]);
    delete [] pContents;
    THROW_LAST();
  }
  END_CATCH_ALL
  pEnum->SetContents(pContents, nCount);

  return pEnum->GetInterface(&IID_IUnknown);
}

void CStringCollect::OnFinalRelease ( ) [virtual]

Definition at line 45 of file strcoll.cpp.

{
  // When the last reference for an automation object is released
  //  OnFinalRelease is called.  This implementation deletes the
  //  object.  Add additional cleanup required for your object before
  //  deleting it from memory.

  delete this;
}

long CStringCollect::Remove ( const VARIANT & removeValue )

Definition at line 182 of file ipremote.cpp.

{
  long result;
  static BYTE BASED_CODE parms[] =
    VTS_VARIANT;
  InvokeHelper(0x4, DISPATCH_METHOD, VT_I4, (void*)&result, parms,
    &removeValue);
  return result;
}

long CStringCollect::Remove ( const VARIANT FAR & removeValue ) [protected]

Definition at line 164 of file strcoll.cpp.

{
  int nIndex = -1;

  VARIANT varTemp;
  VariantInit(&varTemp);
  const VARIANT* pvar = &removeValue;
  if (removeValue.vt != VT_BSTR)
  {
    if (VariantChangeType(&varTemp, (VARIANT*)&removeValue, 0, VT_I4) == NOERROR)
      pvar = &varTemp;
    else if (VariantChangeType(&varTemp, (VARIANT*)&removeValue, 0, VT_BSTR) == NOERROR)
      pvar = &varTemp;
    else
      AfxThrowOleException(DISP_E_TYPEMISMATCH);
  }
  if (pvar->vt == VT_BSTR)
    nIndex = (int)Find(CString(pvar->bstrVal));
  else if (pvar->vt == VT_I4)
    nIndex = (int)pvar->lVal;
  VariantClear(&varTemp);

  CheckIndex(nIndex);

  m_strArray.RemoveAt(nIndex);
  return (long)m_strArray.GetSize();
}

void CStringCollect::RemoveAll ( ) [protected]

Definition at line 192 of file strcoll.cpp.

{
  m_strArray.RemoveAll();
}

void CStringCollect::RemoveAll ( )
void CStringCollect::SetCount ( long propVal )

Definition at line 136 of file ipremote.cpp.

{
  SetProperty(0x1, VT_I4, propVal);
}

void CStringCollect::SetItem | ( | long | nIndex,
 |  | LPCTSTR | lpszNewValue |
 | ) |  |  | [protected]

Definition at line 141 of file strcoll.cpp.

{
  CheckIndex(nIndex);
  m_strArray.ElementAt((int)nIndex-1) = lpszNewValue;
}

void CStringCollect::SetItem | ( | long | nIndex,
 |  | LPCTSTR | lpszNewValue
 | ) |  |

Member Data Documentation

CStringArray CStringCollect::m_strArray

Definition at line 23 of file strcoll.h.

The documentation for this class was generated from the following files:
  • ole/inproc/strcoll.h
  • ole/ipdrive/ipremote.h
  • ole/inproc/strcoll.cpp
  • ole/ipdrive/ipremote.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStringListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CStringListView Class Reference

#include "strlstvw.h"

List of all members.

Public Types

enum | { IDD = IDD_STRING_LIST }

Public Member Functions

CStringListView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
CString | m_strElement

Protected Member Functions

virtual | ~CStringListView ()
virtual void | DoDataExchange (CDataExchange *pDX)
BOOL | FindString (int &nSel, POSITION &pos)
afx_msg void | OnAdd ()
afx_msg void | OnInsertBefore ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
afx_msg void | OnUpdateElement ()

Detailed Description

Definition at line 19 of file strlstvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 36 of file strlstvw.h.

{ IDD = IDD_STRING_LIST };

Constructor & Destructor Documentation

CStringListView::CStringListView ( )

Definition at line 27 of file strlstvw.cpp.

  : CFormView(CStringListView::IDD)
{
  //{{AFX_DATA_INIT(CStringListView)
  m_strElement = "";
  //}}AFX_DATA_INIT
}

CStringListView::~CStringListView ( ) [protected, virtual]

Definition at line 35 of file strlstvw.cpp.

{
}

Member Function Documentation

void CStringListView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 55 of file strlstvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CStringListView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_ELEMENT, m_strElement);
  //}}AFX_DATA_MAP
}

BOOL CStringListView::FindString | ( | int & | nSel,
 |  | POSITION & | pos |
 | ) |  |  | [protected]

Definition at line 101 of file strlstvw.cpp.

{
  nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_STRING_FIRST);
    return FALSE;
  }

  // The currently selected string in the listbox is the string
  // to be updated or removed .
  CString strOld;
  m_ctlList.GetText(nSel, strOld);

  // Find the string to be updated or replaced in the CStringList.
  CStringList& stringList = GetDocument()->m_stringList;
  pos = stringList.Find(strOld);

  // If the string is in the listbox, it should also be in the
  // CStringList.
  ASSERT(pos != NULL);

  return TRUE;
}

CCollectDoc * CStringListView::GetDocument ( ) [inline]

Definition at line 77 of file strlstvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CStringListView::OnAdd ( ) [protected]

Definition at line 129 of file strlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add new string to the CStringList
  GetDocument()->m_stringList.AddTail(m_strElement);

  // Add new string to the listbox.
  m_ctlList.AddString(m_strElement);
}

void CStringListView::OnInitialUpdate ( )

Definition at line 39 of file strlstvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the strings from the document's CStringList
  // to the listbox.
  m_ctlList.ResetContent();
  CStringList& stringList = GetDocument()->m_stringList;
  POSITION pos = stringList.GetHeadPosition();
  while (pos != NULL)
  {
    CString str = stringList.GetNext(pos);
    m_ctlList.AddString(str);
  }
}

void CStringListView::OnInsertBefore ( ) [protected]

Definition at line 141 of file strlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel;
  POSITION pos;
  // Find the string in both the CStringList and in the listbox.
  if (FindString(nSel, pos) != TRUE)
    return;

  // Insert in front of the string found in the CStringList
  GetDocument()->m_stringList.InsertBefore(pos, m_strElement);

  // Insert new string in the listbox
  m_ctlList.InsertString(nSel, m_strElement);
}

void CStringListView::OnRemove ( ) [protected]

Definition at line 179 of file strlstvw.cpp.

{
  int nSel;
  POSITION pos;
  // FInd the string in both the CStringList and in the listbox.
  if (FindString(nSel, pos) != TRUE)
    return;

  // Remove the string from the CStringList.
  GetDocument()->m_stringList.RemoveAt(pos);

  // Remove the string from the listbox.
  m_ctlList.DeleteString(nSel);
}

void CStringListView::OnRemoveAll ( ) [protected]

Definition at line 194 of file strlstvw.cpp.

{
  // Remove all of the strings from the CStringList.
  GetDocument()->m_stringList.RemoveAll();

  // Remove all of the strings from the listbox.
  m_ctlList.ResetContent();
}

void CStringListView::OnSelChangeList ( ) [protected]

Definition at line 204 of file strlstvw.cpp.

{
  // Update the edit control to reflect the new selection
  // in the listbox.
  m_ctlList.GetText(m_ctlList.GetCurSel(), m_strElement);
  UpdateData(FALSE);
}

void CStringListView::OnUpdateElement ( ) [protected]

Definition at line 159 of file strlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel;
  POSITION pos;
  // Find the string in both the CStringList and in the listbox.
  if (FindString(nSel, pos) != TRUE)
    return;

  // Replace the value of the string in the CStringList.
  GetDocument()->m_stringList.SetAt(pos, m_strElement);

  // Replace the value of the string in the listbox by
  // removing the old string and adding the new string.
  m_ctlList.DeleteString(nSel);
  m_ctlList.InsertString(nSel, m_strElement);
}

Member Data Documentation

CListBox CStringListView::m_ctlList

Definition at line 37 of file strlstvw.h.

CString CStringListView::m_strElement

Definition at line 38 of file strlstvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/strlstvw.h
  • advanced/collect/strlstvw.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStroke Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CStroke Class Reference

#include "scribdoc.h"

List of all members.

Public Member Functions

CStroke (UINT nPenWidth)
BOOL | DrawStroke (CDC *pDC)
void | FinishStroke ()
CRect & | GetBoundingRect ()
virtual void | Serialize (CArchive &ar)

Public Attributes

CArray< CPoint, CPoint > | m_pointArray
CRect | m_rectBounding

Protected Member Functions

CStroke ()

Protected Attributes

UINT m_nPenWidth

Detailed Description

Definition at line 23 of file scribdoc.h.

Constructor & Destructor Documentation

CStroke::CStroke ( UINT nPenWidth )

Definition at line 150 of file scribdoc.cpp.

{
  m_nPenWidth = nPenWidth;
  m_rectBounding.SetRectEmpty();
}

CStroke::CStroke ( ) [protected]

Definition at line 145 of file scribdoc.cpp.

{
  // This empty constructor should be used by serialization only
}

Member Function Documentation

BOOL CStroke::DrawStroke ( CDC * pDC )

Definition at line 174 of file scribdoc.cpp.

{
  CPen penStroke;
  if (!penStroke.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0)))
    return FALSE;
  CPen* pOldPen = pDC->SelectObject(&penStroke);
  pDC->MoveTo(m_pointArray[0]);
  for (int i=1; i < m_pointArray.GetSize(); i++)
  {
    pDC->LineTo(m_pointArray[i]);
  }

  pDC->SelectObject(pOldPen);
  return TRUE;
}

void CStroke::FinishStroke ( )

Definition at line 249 of file scribdoc.cpp.

{
  // Calculate the bounding rectangle.  It's needed for smart
  // repainting.

  if (m_pointArray.GetSize()==0)
  {
    m_rectBounding.SetRectEmpty();
    return;
  }
  CPoint pt = m_pointArray[0];
  m_rectBounding = CRect(pt.x, pt.y, pt.x, pt.y);

  for (int i=1; i < m_pointArray.GetSize(); i++)
  {
    // If the point lies outside of the accumulated bounding
    // rectangle, then inflate the bounding rect to include it.
    pt = m_pointArray[i];
    m_rectBounding.left     = min(m_rectBounding.left, pt.x);
    m_rectBounding.right    = max(m_rectBounding.right, pt.x);
    m_rectBounding.top      = max(m_rectBounding.top, pt.y);
    m_rectBounding.bottom   = min(m_rectBounding.bottom, pt.y);
  }

  // Add the pen width to the bounding rectangle.  This is necessary
  // to account for the width of the stroke when invalidating
  // the screen.
  m_rectBounding.InflateRect(CSize(m_nPenWidth, -(int)m_nPenWidth));
  return;
}

CRect& CStroke::GetBoundingRect ( ) [inline]

Definition at line 42 of file scribdoc.h.

{ return m_rectBounding; }

void CStroke::Serialize ( CArchive & ar ) [virtual]

Definition at line 156 of file scribdoc.cpp.

{
  if (ar.IsStoring())
  {
    ar << m_rectBounding;
    ar << (WORD)m_nPenWidth;
    m_pointArray.Serialize(ar);
  }
  else
  {
    ar >> m_rectBounding;
    WORD w;
    ar >> w;
    m_nPenWidth = w;
    m_pointArray.Serialize(ar);
  }
}

Member Data Documentation

UINT CStroke::m_nPenWidth [protected]

Definition at line 34 of file scribdoc.h.

CArray<CPoint,CPoint> CStroke::m_pointArray

Definition at line 36 of file scribdoc.h.

CRect CStroke::m_rectBounding

Definition at line 37 of file scribdoc.h.

The documentation for this class was generated from the following files:
  • general/Scribble/scribdoc.h
  • general/Scribble/scribdoc.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStyleBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

CStyleBar Class Reference

#include "mainfrm.h"

List of all members.

Public Attributes

CComboBox | m_comboBox
CFont | m_font

Detailed Description

Definition at line 23 of file mainfrm.h.

Member Data Documentation

CComboBox CStyleBar::m_comboBox

Definition at line 26 of file mainfrm.h.

CFont CStyleBar::m_font

Definition at line 27 of file mainfrm.h.

The documentation for this class was generated from the following file:
  • general/ctrlbars/mainfrm.h
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CStylePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CStylePage Class Reference

#include "stylepge.h"

List of all members.

Public Types

enum | { IDD = IDD_STYLE }

Public Member Functions

CStylePage ()

Public Attributes

int | m_nShapeStyle

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
void | OnStyleClicked (UINT nCmdID)

Detailed Description

Definition at line 15 of file stylepge.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file stylepge.h.

{ IDD = IDD_STYLE };

Constructor & Destructor Documentation

CStylePage::CStylePage ( )

Definition at line 30 of file stylepge.cpp.

                       : CPropertyPage(CStylePage::IDD)
{
  //{{AFX_DATA_INIT(CStylePage)
  //}}AFX_DATA_INIT
  m_nShapeStyle = rectangle;
}

Member Function Documentation

void CStylePage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 37 of file stylepge.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CStylePage)
  DDX_Radio(pDX, IDC_RECTANGLE, m_nShapeStyle);
  //}}AFX_DATA_MAP
}

void CStylePage::OnStyleClicked ( UINT nCmdID ) [protected]

Definition at line 45 of file stylepge.cpp.

{
  // The CStylePage property page is used for both the
  // CModalShapePropSheet and the CModelessShapePropSheet.
  // Both these versions of the property sheet share a common
  // feature that they immediately update a shape.  In the
  // case of CModalShapePropSheet, the shape is in the preview
  // window.  In the case of CModelessShapePropSheet, the shape
  // is the currently selected shape in the view.

  CPropertySheet* pSheet = STATIC_DOWNCAST(CPropertySheet, GetParent());

  CModalShapePropSheet* pModalSheet =
    DYNAMIC_DOWNCAST(CModalShapePropSheet, pSheet);
  if (pModalSheet != NULL)
  {
    UpdateData();
    pModalSheet->UpdateShapePreview();
    SetModified(); // enable Apply Now button
  }

  CModelessShapePropSheet* pModelessSheet =
    DYNAMIC_DOWNCAST(CModelessShapePropSheet, pSheet);
  if (pModelessSheet != NULL)
  {
    UpdateData();
    CFrameWnd* pFrameWnd = STATIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
    CView* pView = pFrameWnd->GetActiveFrame()->GetActiveView();
    pView->SendMessage(WM_USER_CHANGE_OBJECT_PROPERTIES, 0, 0);
  }
}

Member Data Documentation

int CStylePage::m_nShapeStyle

Definition at line 24 of file stylepge.h.

The documentation for this class was generated from the following files:
  • general/propdlg/stylepge.h
  • general/propdlg/stylepge.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSubEditDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Attributes

CSubEditDlg Class Reference

List of all members.

Public Types

enum | { IDD = IDD_SUB_EDIT }

Public Member Functions

CSubEditDlg ()
BOOL | OnInitDialog ()
virtual void | OnOK ()

Protected Attributes

CParsedEdit edit1
CParsedEdit edit2
CParsedEdit edit3
CParsedEdit edit4

Detailed Description

Definition at line 20 of file subtest.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file subtest.cpp.

{ IDD = IDD_SUB_EDIT };

Constructor & Destructor Documentation

CSubEditDlg::CSubEditDlg ( ) [inline]

Definition at line 28 of file subtest.cpp.

    : CDialog(CSubEditDlg::IDD)
      { }

Member Function Documentation

BOOL CSubEditDlg::OnInitDialog ( )

Definition at line 45 of file subtest.cpp.

{
  edit1.SubclassEdit(IDC_EDIT1, this, PES_LETTERS);
  edit2.SubclassEdit(IDC_EDIT2, this, PES_NUMBERS);
  edit3.SubclassEdit(IDC_EDIT3, this, PES_NUMBERS | PES_LETTERS);
  edit4.SubclassEdit(IDC_EDIT4, this, PES_ALL);
  return TRUE;
}

void CSubEditDlg::OnOK ( ) [virtual]

Definition at line 54 of file subtest.cpp.

{
#ifdef _DEBUG
  // dump results, normally you would do something with these
  CString s;
  edit1.GetWindowText(s);
  TRACE1("edit1 = '%s'\n", s);
  edit2.GetWindowText(s);
  TRACE1("edit2 = '%s'\n", s);
  edit3.GetWindowText(s);
  TRACE1("edit3 = '%s'\n", s);
  edit4.GetWindowText(s);
  TRACE1("edit4 = '%s'\n", s);
#endif

  EndDialog(IDOK);
}

Member Data Documentation

CParsedEdit CSubEditDlg::edit1 [protected]

Definition at line 23 of file subtest.cpp.

CParsedEdit CSubEditDlg::edit2 [protected]

Definition at line 23 of file subtest.cpp.

CParsedEdit CSubEditDlg::edit3 [protected]

Definition at line 23 of file subtest.cpp.

CParsedEdit CSubEditDlg::edit4 [protected]

Definition at line 23 of file subtest.cpp.

The documentation for this class was generated from the following file:
  • general/ctrltest/subtest.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSummInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CSummInfo Class Reference

#include "summinfo.h"

List of all members.

Public Member Functions

CSummInfo ()
CSummInfo ()
BOOL | AddCountToEditTime ()
BOOL | AddCountToEditTime ()
CString | GetAppname ()
CString | GetAppname ()
CString | GetAuthor ()
CString | GetAuthor ()
CString | GetComments ()
CString | GetComments ()
CString | GetCreateDate ()
CString | GetCreateDate ()
CString | GetEditTime ()
CString | GetEditTime ()
CString | GetKeywords ()
CString | GetKeywords ()
CString | GetLastAuthor ()
CString | GetLastAuthor ()
CString | GetLastPrintDate ()
CString | GetLastPrintDate ()
CString | GetLastSaveDate ()
CString | GetLastSaveDate ()
CString | GetNumChars ()
CString | GetNumChars ()
CString | GetNumPages ()
CString | GetNumPages ()
CString | GetNumWords ()
CString | GetNumWords ()
CString | GetRevNum ()
CString | GetRevNum ()
CString | GetSecurity ()
CString | GetSecurity ()
CString | GetSubject ()
CString | GetSubject ()
CString | GetTemplate ()
CString | GetTemplate ()
CString | GetTitle ()
CString | GetTitle ()
BOOL | IncrRevNum ()
BOOL | IncrRevNum ()
BOOL | ReadFromStorage (LPSTORAGE lpRootStg)
BOOL | ReadFromStorage (LPSTORAGE lpRootStg)
BOOL | RecordCreateDate ()
BOOL | RecordCreateDate ()
BOOL | RecordPrintDate ()
BOOL | RecordPrintDate ()
BOOL | RecordSaveDate ()
BOOL | RecordSaveDate ()
BOOL | SetAppname (LPCTSTR szAppname)
BOOL | SetAppname (LPCTSTR szAppname)
BOOL | SetAuthor (LPCTSTR szAuthor)
BOOL | SetAuthor (LPCTSTR szAuthor)
BOOL | SetComments (LPCTSTR szComments)
BOOL | SetComments (LPCTSTR szComments)
BOOL | SetKeywords (LPCTSTR szKeywords)
BOOL | SetKeywords (LPCTSTR szKeywords)
BOOL | SetLastAuthor (LPCTSTR szLastAuthor)
BOOL | SetLastAuthor (LPCTSTR szLastAuthor)
BOOL | SetNumChars (ULONG nChars)
BOOL | SetNumChars (ULONG nChars)
BOOL | SetNumPages (ULONG nPages)
BOOL | SetNumPages (ULONG nPages)
BOOL | SetNumWords (ULONG nWords)
BOOL | SetNumWords (ULONG nWords)
BOOL | SetSecurity (ULONG nLevel)
BOOL | SetSecurity (ULONG nLevel)
BOOL | SetSubject (LPCTSTR szSubject)
BOOL | SetSubject (LPCTSTR szSubject)
BOOL | SetTemplate (LPCTSTR szTemplate)
BOOL | SetTemplate (LPCTSTR szTemplate)
BOOL | SetTitle (LPCTSTR szTitle)
BOOL | SetTitle (LPCTSTR szTitle)
void | StartEditTimeCount ()
void | StartEditTimeCount ()
BOOL | WriteToStorage (LPSTORAGE lpRootStg)
BOOL | WriteToStorage (LPSTORAGE lpRootStg)

Protected Attributes

CPropertySet m_propSet
CPropertySection * m_pSection
__int64 | startEdit

Detailed Description

Definition at line 21 of file summinfo.h.

Constructor & Destructor Documentation

CSummInfo::CSummInfo ( )

Definition at line 48 of file summinfo.cpp.

{
  m_propSet.SetFormatVersion(0);
  DWORD dwOSVer;
  dwOSVer = (DWORD)MAKELONG(LOWORD(GetVersion()), 2);
  m_propSet.SetOSVersion(dwOSVer);
  m_propSet.SetClassID(FMTID_SummaryInformation);
  m_pSection = m_propSet.AddSection(FMTID_SummaryInformation);
  UINT cp = GetACP();
  m_pSection->Set(PID_CODEPAGE, (void*)&cp, VT_I2);
  SetTitle(_T(""));
  SetSubject(_T(""));
  SetAuthor(_T(""));
  SetKeywords(_T(""));
  SetComments(_T(""));
  SetTemplate(_T(""));
  SetLastAuthor(_T(""));
  m_pSection->Set(PIDSI_REVNUMBER, (void*)_T("0"), VT_LPSTR);
  FILETIME zeroTime = {0L, 0L};
  m_pSection->Set(PIDSI_EDITTIME, (void*)&zeroTime, VT_FILETIME);
  m_pSection->Set(PIDSI_LASTPRINTED, (void*)&zeroTime, VT_FILETIME);
  m_pSection->Set(PIDSI_LASTSAVE_DTM, (void*)&zeroTime, VT_FILETIME);
  m_pSection->Set(PIDSI_CREATE_DTM, (void*)&zeroTime, VT_FILETIME);
  SetNumPages(0);
  SetNumWords(0);
  SetNumChars(0);
  SetAppname(_T(""));
  SetSecurity(0);
}

CSummInfo::CSummInfo ( )

Member Function Documentation

BOOL CSummInfo::AddCountToEditTime ( )

Definition at line 176 of file summinfo.cpp.

{
  FILETIME now;
  CoFileTimeNow(&now);
  __int64 currTime = *(__int64*)&now;
  __int64 thisSession = currTime - startEdit;
  __int64 lastTotal = *(__int64*)m_pSection->Get(PIDSI_EDITTIME);
  __int64 newTotal = lastTotal + thisSession;
  return m_pSection->Set(PIDSI_EDITTIME, (void*)&newTotal, VT_FILETIME);
}

BOOL CSummInfo::AddCountToEditTime ( )
CString CSummInfo::GetAppname ( )

Definition at line 328 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_APPNAME));
}

CString CSummInfo::GetAppname ( )
CString CSummInfo::GetAuthor ( )

Definition at line 105 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_AUTHOR));
}

CString CSummInfo::GetAuthor ( )
CString CSummInfo::GetComments ( )

Definition at line 127 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_COMMENTS));
}

CString CSummInfo::GetComments ( )
CString CSummInfo::GetCreateDate ( )

Definition at line 232 of file summinfo.cpp.

{
  FILETIME* pCreateDate = (FILETIME*)m_pSection->Get(PIDSI_CREATE_DTM);
  if ((pCreateDate == NULL) ||
    ((pCreateDate->dwLowDateTime == 0L) &&
     (pCreateDate->dwHighDateTime == 0L)  ))
    return CString(_T(""));
  else
  {
    COleDateTime tempDate = *pCreateDate;
    return tempDate.Format();
  }
}

CString CSummInfo::GetCreateDate ( )
CString CSummInfo::GetEditTime ( )

Definition at line 187 of file summinfo.cpp.

{
  FILETIME now;
  CoFileTimeNow(&now);
  __int64 currTime = *(__int64*)&now;
  __int64 thisSession = currTime - startEdit;
  __int64 lastTotal = *(__int64*)m_pSection->Get(PIDSI_EDITTIME);
  __int64 newTotal = lastTotal + thisSession;
  ULONG editMinutes = (ULONG)(newTotal/600000000);

  TCHAR buff[20];
  _stprintf_s(buff, 20, _T("%lu min"), editMinutes);
  return CString(buff);
}

CString CSummInfo::GetEditTime ( )
CString CSummInfo::GetKeywords ( )
CString CSummInfo::GetKeywords ( )

Definition at line 116 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_KEYWORDS));
}

CString CSummInfo::GetLastAuthor ( )

Definition at line 149 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_LASTAUTHOR));
}

CString CSummInfo::GetLastAuthor ( )
CString CSummInfo::GetLastPrintDate ( )

Definition at line 210 of file summinfo.cpp.

{
  FILETIME* pPrintDate = (FILETIME*)m_pSection->Get(PIDSI_LASTPRINTED);
  if ((pPrintDate == NULL) ||
    ((pPrintDate->dwLowDateTime == 0L) &&
     (pPrintDate->dwHighDateTime == 0L)  ))
    return CString(_T(""));
  else
  {
    COleDateTime tempDate = *pPrintDate;
    return tempDate.Format();
  }
}

CString CSummInfo::GetLastPrintDate ( )
CString CSummInfo::GetLastSaveDate ( )

Definition at line 254 of file summinfo.cpp.

{
  FILETIME *pSaveDate = (FILETIME*)m_pSection->Get(PIDSI_LASTSAVE_DTM);
  if ((pSaveDate == NULL) ||
    ((pSaveDate->dwLowDateTime == 0L) &&
     (pSaveDate->dwHighDateTime == 0L)  ))
    return CString(_T(""));
  else
  {
    COleDateTime tempDate = *pSaveDate;
    return tempDate.Format();
  }
}

CString CSummInfo::GetLastSaveDate ( )
CString CSummInfo::GetNumChars ( )
CString CSummInfo::GetNumChars ( )

Definition at line 309 of file summinfo.cpp.

{
  TCHAR buff[20];
  ULONG* pNumChars = (ULONG*)m_pSection->Get(PIDSI_CHARCOUNT);
  if (pNumChars != NULL)
  {
    _stprintf_s(buff, 20,_T("%lu"), *pNumChars);
    return CString(buff);
  }
  else
    return CString(_T(""));
}

CString CSummInfo::GetNumPages ( )
CString CSummInfo::GetNumPages ( )

Definition at line 273 of file summinfo.cpp.

{
  TCHAR buff[20];
  ULONG* pNumPages = (ULONG*)m_pSection->Get(PIDSI_PAGECOUNT);
  if (pNumPages != NULL)
  {
    _stprintf_s(buff,20, _T("%lu"), *pNumPages);
    return CString(buff);
  }
  else
    return CString(_T(""));
}

CString CSummInfo::GetNumWords ( )
CString CSummInfo::GetNumWords ( )

Definition at line 291 of file summinfo.cpp.

{
  TCHAR buff[20];
  ULONG* pNumWords = (ULONG*)m_pSection->Get(PIDSI_WORDCOUNT);
  if (pNumWords != NULL)
  {
    _stprintf_s(buff, 20,_T("%lu"), *pNumWords);
    return CString(buff);
  }
  else
    return CString(_T(""));
}

CString CSummInfo::GetRevNum ( )

Definition at line 164 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_REVNUMBER));
}

CString CSummInfo::GetRevNum ( )
CString CSummInfo::GetSecurity ( )

Definition at line 338 of file summinfo.cpp.

{
  TCHAR buff[20];
  ULONG* pSecurity = (ULONG*)m_pSection->Get(PID_SECURITY);
  if (pSecurity != NULL)
  {
    _stprintf_s(buff, 20,_T("%lu"), *pSecurity);
    return CString(buff);
  }
  else
    return CString(_T(""));
}

CString CSummInfo::GetSecurity ( )
CString CSummInfo::GetSubject ( )
CString CSummInfo::GetSubject ( )

Definition at line 94 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_SUBJECT));
}

CString CSummInfo::GetTemplate ( )
CString CSummInfo::GetTemplate ( )

Definition at line 138 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_TEMPLATE));
}

CString CSummInfo::GetTitle ( )

Definition at line 83 of file summinfo.cpp.

{
  return CString((LPCSTR)m_pSection->Get(PIDSI_TITLE));
}

CString CSummInfo::GetTitle ( )
BOOL CSummInfo::IncrRevNum ( )
BOOL CSummInfo::IncrRevNum ( )

Definition at line 154 of file summinfo.cpp.

{
  ULONG count;
  _stscanf_s((LPCTSTR)GetRevNum(), _T("%lu"), &count);
  count++;
  TCHAR buff[20];
  _stprintf_s(buff, 20, _T("%lu"), count);
  return m_pSection->Set(PIDSI_REVNUMBER, (void*)buff, VT_LPSTR);
}

BOOL CSummInfo::ReadFromStorage ( LPSTORAGE lpRootStg )

Definition at line 378 of file summinfo.cpp.

{
  if (lpRootStg != NULL)
  {
    LPSTREAM lpStream = NULL;

    if (FAILED(lpRootStg->OpenStream(szSummInfo,
           NULL, STGM_SHARE_EXCLUSIVE|STGM_READ,
           0, &lpStream)))
    {
      TRACE(_T("OpenStream failed\n"));
      return FALSE;
    }
    else
    {
      if (!m_propSet.ReadFromStream(lpStream))
      {
        TRACE(_T("ReadFromStream failed\n"));
        return FALSE;
      }
      m_pSection = m_propSet.GetSection(FMTID_SummaryInformation);
      lpStream->Release();
      return TRUE;
    }
  }
  return FALSE;
}

BOOL CSummInfo::ReadFromStorage ( LPSTORAGE lpRootStg )
BOOL CSummInfo::RecordCreateDate ( )

Definition at line 224 of file summinfo.cpp.

{
  FILETIME createDate;
  CoFileTimeNow(&createDate);
  return m_pSection->Set(PIDSI_CREATE_DTM,
    (void*)&createDate, VT_FILETIME);
}

BOOL CSummInfo::RecordCreateDate ( )
BOOL CSummInfo::RecordPrintDate ( )

Definition at line 202 of file summinfo.cpp.

{
  FILETIME printDate;
  CoFileTimeNow(&printDate);
  return m_pSection->Set(PIDSI_LASTPRINTED,
    (void*)&printDate, VT_FILETIME);
}

BOOL CSummInfo::RecordPrintDate ( )
BOOL CSummInfo::RecordSaveDate ( )

Definition at line 246 of file summinfo.cpp.

{
  FILETIME saveDate;
  CoFileTimeNow(&saveDate);
  return m_pSection->Set(PIDSI_LASTSAVE_DTM,
    (void*)&saveDate, VT_FILETIME);
}

BOOL CSummInfo::RecordSaveDate ( )
BOOL CSummInfo::SetAppname ( LPCTSTR szAppname )

Definition at line 322 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_APPNAME,
    (void*)tcstocs(szAppname), VT_LPSTR);
}

BOOL CSummInfo::SetAppname ( LPCTSTR szAppname )
BOOL CSummInfo::SetAuthor ( LPCTSTR szAuthor )

Definition at line 99 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_AUTHOR,
    (void*)tcstocs(szAuthor), VT_LPSTR);
}

BOOL CSummInfo::SetAuthor ( LPCTSTR szAuthor )
BOOL CSummInfo::SetComments ( LPCTSTR szComments )
BOOL CSummInfo::SetComments ( LPCTSTR szComments )

Definition at line 121 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_COMMENTS,
    (void*)tcstocs(szComments), VT_LPSTR);
}

BOOL CSummInfo::SetKeywords ( LPCTSTR szKeywords )
BOOL CSummInfo::SetKeywords ( LPCTSTR szKeywords )

Definition at line 110 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_KEYWORDS,
    (void*)tcstocs(szKeywords), VT_LPSTR);
}

BOOL CSummInfo::SetLastAuthor ( LPCTSTR szLastAuthor )
BOOL CSummInfo::SetLastAuthor ( LPCTSTR szLastAuthor )

Definition at line 143 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_LASTAUTHOR,
    (void*)tcstocs(szLastAuthor), VT_LPSTR);
}

BOOL CSummInfo::SetNumChars ( ULONG nChars )
BOOL CSummInfo::SetNumChars ( ULONG nChars )

Definition at line 304 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_CHARCOUNT, (void*)&nChars, VT_I4);
}

BOOL CSummInfo::SetNumPages ( ULONG nPages )
BOOL CSummInfo::SetNumPages ( ULONG nPages )

Definition at line 268 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_PAGECOUNT, (void*)&nPages, VT_I4);
}

BOOL CSummInfo::SetNumWords ( ULONG nWords )
BOOL CSummInfo::SetNumWords ( ULONG nWords )

Definition at line 286 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_WORDCOUNT, (void*)&nWords, VT_I4);
}

BOOL CSummInfo::SetSecurity ( ULONG nLevel )
BOOL CSummInfo::SetSecurity ( ULONG nLevel )

Definition at line 333 of file summinfo.cpp.

{
  return m_pSection->Set(PID_SECURITY, (void*)&nLevel, VT_I4);
}

BOOL CSummInfo::SetSubject ( LPCTSTR szSubject )

Definition at line 88 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_SUBJECT,
    (void*)tcstocs(szSubject), VT_LPSTR);
}

BOOL CSummInfo::SetSubject ( LPCTSTR szSubject )
BOOL CSummInfo::SetTemplate ( LPCTSTR szTemplate )

Definition at line 132 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_TEMPLATE,
    (void*)tcstocs(szTemplate), VT_LPSTR);
}

BOOL CSummInfo::SetTemplate ( LPCTSTR szTemplate )
BOOL CSummInfo::SetTitle ( LPCTSTR szTitle )
BOOL CSummInfo::SetTitle ( LPCTSTR szTitle )

Definition at line 78 of file summinfo.cpp.

{
  return m_pSection->Set(PIDSI_TITLE, (void*)tcstocs(szTitle), VT_LPSTR);
}

void CSummInfo::StartEditTimeCount ( )
void CSummInfo::StartEditTimeCount ( )

Definition at line 169 of file summinfo.cpp.

{
  FILETIME now;
  CoFileTimeNow(&now);
  startEdit = *(__int64*)&now;
}

BOOL CSummInfo::WriteToStorage ( LPSTORAGE lpRootStg )

Definition at line 351 of file summinfo.cpp.

{
  if (lpRootStg != NULL)
  {
    LPSTREAM lpStream = NULL;
    if (FAILED(lpRootStg->CreateStream(szSummInfo,
           STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE,
           0, 0, &lpStream)))
    {
      TRACE(_T("CreateStream failed\n"));
      return FALSE;
    }
    else
    {
      if(!m_propSet.WriteToStream(lpStream))
      {
        TRACE(_T("WriteToStream failed\n"));
        return FALSE;
      }
      lpRootStg->Commit(STGC_DEFAULT);
      lpStream->Release();
      return TRUE;
    }
  }
  return FALSE;
}

BOOL CSummInfo::WriteToStorage ( LPSTORAGE lpRootStg )

Member Data Documentation

CPropertySet CSummInfo::m_propSet [protected]

Definition at line 63 of file summinfo.h.

CPropertySection * CSummInfo::m_pSection [protected]

Definition at line 64 of file summinfo.h.

__int64 CSummInfo::startEdit [protected]

Definition at line 65 of file summinfo.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/summinfo.h
  • vc2008fp/DrawClient/summinfo.h
  • ole/drawcli/summinfo.cpp
  • vc2008fp/DrawClient/summinfo.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSummPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CSummPage Class Reference

#include "summpage.h"

List of all members.

Public Types

enum | { IDD = IDD_SUMM_PAGE }
enum | { IDD = IDD_SUMM_PAGE }

Public Member Functions

CSummPage ()
CSummPage ()
~CSummPage ()
~CSummPage ()

Public Attributes

CString | m_strAppname
CString | m_strAuthor
CString | m_strCmt
CString | m_strKeywd
CString | m_strSubj
CString | m_strTempl
CString | m_strTitle

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 14 of file summpage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 25 of file summpage.h.

{ IDD = IDD_SUMM_PAGE };

anonymous enum
Enumerator:
IDD

Definition at line 23 of file summpage.h.

{ IDD = IDD_SUMM_PAGE };

Constructor & Destructor Documentation

CSummPage::CSummPage ( )

Definition at line 25 of file summpage.cpp.

                     : CPropertyPage(CSummPage::IDD)
{
    //{{AFX_DATA_INIT(CSummPage)
  m_strAuthor = _T("");
  m_strKeywd = _T("");
  m_strSubj = _T("");
  m_strCmt = _T("");
  m_strTempl = _T("");
  m_strTitle = _T("");
  m_strAppname = _T("");
  //}}AFX_DATA_INIT
}

CSummPage::~CSummPage ( )

Definition at line 38 of file summpage.cpp.

{
}

CSummPage::CSummPage ( )
CSummPage::~CSummPage ( )

Member Function Documentation

void CSummPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 42 of file summpage.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CSummPage)
  DDX_Text(pDX, IDC_AUTHOR, m_strAuthor);
  DDX_Text(pDX, IDC_KEYWORDS, m_strKeywd);
  DDX_Text(pDX, IDC_SUBJECT, m_strSubj);
  DDX_Text(pDX, IDC_COMMENTS, m_strCmt);
  DDX_Text(pDX, IDC_TEMPLATE, m_strTempl);
  DDX_Text(pDX, IDC_TITLE, m_strTitle);
  DDX_Text(pDX, IDC_APPNAME, m_strAppname);
  //}}AFX_DATA_MAP
}

virtual void CSummPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Member Data Documentation

CString CSummPage::m_strAppname

Definition at line 32 of file summpage.h.

CString CSummPage::m_strAuthor

Definition at line 26 of file summpage.h.

CString CSummPage::m_strCmt

Definition at line 29 of file summpage.h.

CString CSummPage::m_strKeywd

Definition at line 27 of file summpage.h.

CString CSummPage::m_strSubj

Definition at line 28 of file summpage.h.

CString CSummPage::m_strTempl

Definition at line 30 of file summpage.h.

CString CSummPage::m_strTitle

Definition at line 31 of file summpage.h.

The documentation for this class was generated from the following files:
  • ole/drawcli/summpage.h
  • vc2008fp/DrawClient/summpage.h
  • ole/drawcli/summpage.cpp
  • vc2008fp/DrawClient/summpage.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSurface Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes

CSurface Class Reference

#include "Surface.h"

Inherited by CMMXSurface16Intrinsic, CMMXSurface24Intrinsic, CMMXSurface32Intrinsic, CSSE2Surface16Intrinsic, CSSE2Surface24Intrinsic, and CSSE2Surface32Intrinsic.

List of all members.

Public Member Functions

CSurface ()
virtual | ~CSurface ()
void | BlitBits ()
virtual void | BlurBits ()
void | ClearBits ()
void | Create (CWnd *pWnd, int nBitDepth)
void | Destroy ()
int | GetBitDepth () const
int | GetByteDepth () const
CImage * | GetImage ()
int | GetPitch () const
BYTE * | GetPixelAddress (int x, int y) const
int | GetVisibleHeight () const
int | GetVisibleWidth () const
void | Import (const CImage &image)
bool | IsNull () const
void | Line (const CPoint &p1, const CPoint &p2, COLORREF c)
COLORREF | PointColor (int x, int y) const
void | PointColor (int x, int y, COLORREF c)
void | RandomBits ()
void | RandomLine (COLORREF c)
void | ShiftBits ()
void | StripeBits ()

Protected Member Functions

virtual void | AdjustWidth (int *)
virtual void | OnCreated ()

Static Protected Attributes

static const int | m_kDeltaX = 1
static const int | m_kDeltaY = 1

Private Attributes

HDC | m_hDestDC
CImage | m_image
int | m_nBitDepth
int | m_nByteDepth
CWnd * | m_pSrcWnd
int | m_wndHeight
int | m_wndWidth

Detailed Description

Definition at line 18 of file Surface.h.

Constructor & Destructor Documentation

CSurface::CSurface ( ) [inline]

Definition at line 21 of file Surface.h.

             :
    m_pSrcWnd(NULL), m_hDestDC(NULL),
    m_wndHeight(0), m_wndWidth(0), m_nBitDepth(0), m_nByteDepth(0)
  { }

virtual CSurface::~CSurface ( ) [inline, virtual]

Definition at line 26 of file Surface.h.

  { Destroy(); }

Member Function Documentation

virtual void CSurface::AdjustWidth ( int * ) [inline, protected, virtual]

Reimplemented in CMMXSurface32Intrinsic, CMMXSurface16Intrinsic, CSSE2Surface32Intrinsic, CSSE2Surface24Intrinsic, and CSSE2Surface16Intrinsic.

Definition at line 68 of file Surface.h.

{}

void CSurface::BlitBits ( )

Definition at line 197 of file Surface.cpp.

{
  ASSERT(m_wndHeight && m_wndWidth);
    BOOL bStat = m_image.BitBlt(m_hDestDC, 0, 0,
        m_wndWidth, m_wndHeight, 0, m_kDeltaY);

    ASSERT(bStat);
}

void CSurface::BlurBits ( ) [virtual]

Reimplemented in CMMXSurface32Intrinsic, CMMXSurface24Intrinsic, CMMXSurface16Intrinsic, CSSE2Surface32Intrinsic, CSSE2Surface24Intrinsic, and CSSE2Surface16Intrinsic.

Definition at line 107 of file Surface.cpp.

{
    COLORREF cLeft = 0, cCur = PointColor(0,0), cRight, cUp, cDown;
    BYTE r, g, b;
    for (int i = 0; i < m_wndHeight; i++) {
    cLeft = 0;
        for (int j = 0; j < m_wndWidth; j++) {
            cRight = PointColor(j+1, i);
            cUp = PointColor(j, i-1);
            cDown = PointColor(j, i+1);
            r = (BYTE)(((int)(GetRValue(cCur) << 2) + GetRValue(cLeft) + GetRValue(cRight) + GetRValue(cUp) + GetRValue(cDown)) >> 3);
            g = (BYTE)(((int)(GetGValue(cCur) << 2) + GetGValue(cLeft) + GetGValue(cRight) + GetGValue(cUp) + GetGValue(cDown)) >> 3);
            b = (BYTE)(((int)(GetBValue(cCur) << 2) + GetBValue(cLeft) + GetBValue(cRight) + GetBValue(cUp) + GetBValue(cDown)) >> 3);
            PointColor(j, i, RGB(b,g,r)); // RGBs are physically inverted
            cLeft = cCur;
            cCur = cRight;
        }
    }
}

void CSurface::ClearBits ( )

Definition at line 70 of file Surface.cpp.

{
    int size = m_image.GetPitch() * m_image.GetHeight();
  memset(m_image.GetBits(), 0x00, size);
}

void CSurface::Create | ( | CWnd * | pWnd,
 |  | int | nBitDepth
 | ) |  |

Definition at line 15 of file Surface.cpp.

{
  // no palettes
  ASSERT(nBitDepth == 24 || nBitDepth == 16 || nBitDepth == 32);

    CRect clientRect;
    pWnd->GetClientRect(clientRect);
  int height = clientRect.Height();
    int width = clientRect.Width();

  if (!height || !width)
    return;

    Destroy();

  m_nBitDepth = nBitDepth;
  m_nByteDepth = nBitDepth/8;
  m_wndHeight = height;
    m_wndWidth = width;
  m_hDestDC = ::GetDC(pWnd->GetSafeHwnd());
  m_pSrcWnd = pWnd;
    ASSERT(m_hDestDC);

  width = m_wndWidth + m_kDeltaX; // not *2 because we don't need it on the left side.
  // Allow derived classes a shot at updating if they need more alignment
  AdjustWidth(&width);

  // pass Negative Height to make it Top Down.
  VERIFY(m_image.Create(width, -(m_wndHeight + m_kDeltaY*2), m_nBitDepth, 0));
  ASSERT((DWORD_PTR(m_image.GetBits()) & 0xf) == 0); // make sure we are at least 128 bit aligned.(SSE2)
  ASSERT(m_image.GetPitch() > 0); // Verify top down DIB
  VERIFY(m_image.GetDC() != NULL); // Prefer the DC to exist for life of object
  OnCreated();
}

void CSurface::Destroy ( )

Definition at line 50 of file Surface.cpp.

{
  if (IsNull())
    return;

  m_image.ReleaseDC();
  m_image.Destroy();
  ::ReleaseDC(m_pSrcWnd->GetSafeHwnd(), m_hDestDC);
  m_wndHeight = 0;
  m_wndWidth = 0;
}

int CSurface::GetBitDepth ( ) const [inline]

Definition at line 58 of file Surface.h.

  { return(m_nBitDepth); }

int CSurface::GetByteDepth ( ) const [inline]

Definition at line 60 of file Surface.h.

  { return(m_nByteDepth); }

CImage* CSurface::GetImage ( ) [inline]

Definition at line 63 of file Surface.h.

  { return(&m_image); }

int CSurface::GetPitch ( ) const [inline]

Definition at line 56 of file Surface.h.

  { return(m_image.GetPitch()); }

BYTE* CSurface::GetPixelAddress | ( | int | x,
 |  | int | y |
 | ) |  |  | const [inline]

Definition at line 47 of file Surface.h.

  { return((BYTE*)m_image.GetPixelAddress(x, y+m_kDeltaY)); }

int CSurface::GetVisibleHeight ( ) const [inline]

Definition at line 54 of file Surface.h.

  { return(m_wndHeight); }

int CSurface::GetVisibleWidth ( ) const [inline]

Definition at line 52 of file Surface.h.

  { return(m_wndWidth); }

void CSurface::Import ( const CImage & image )

Definition at line 62 of file Surface.cpp.

{
  image.BitBlt(m_image.GetDC(), 0, m_kDeltaY,
    GetVisibleWidth(), GetVisibleHeight(), 0, 0);
  m_image.ReleaseDC();
  BlitBits();
}

bool CSurface::IsNull ( ) const [inline]

Definition at line 50 of file Surface.h.

  { return(m_image.IsNull()); }

void CSurface::Line | ( | const CPoint & | p1,
 |  | const CPoint & | p2,
 |  | COLORREF | c
 | ) |  |

Definition at line 128 of file Surface.cpp.

{
    int x1 = p1.x;
    int x2 = p2.x;
    int y1 = p1.y;
    int y2 = p2.y;

  int d, deltax, deltay, numpixels,
    dinc1, dinc2,
    xinc1, xinc2,
    yinc1, yinc2;

  // Calculate deltax and deltay for startup
  deltax = ABS(x2 - x1);
  deltay = ABS(y2 - y1);

  // Initialize all vars based on which is the independent variable
    if (deltax >= deltay) {
    // x is independent variable
    numpixels = deltax + 1;
    dinc1 = deltay << 1;
    dinc2 = (deltay - deltax) << 1;
    d = dinc1 - deltax;
    xinc1 = xinc2 = yinc2 = 1;
    yinc1 = 0;
    }
    else {
    // y is independent variable
    numpixels = deltay + 1;
    dinc1 = deltax <<  1;
    dinc2 = (deltax - deltay) << 1;
    d = dinc1 - deltay;
    xinc1 = 0;
    xinc2 = yinc1 = yinc2 = 1;
    }

  // Make sure x and y move in the right directions
    if (x1 > x2) {
    xinc1 = -xinc1;
    xinc2 = -xinc2;
    }
    if (y1 > y2) {
    yinc1 = -yinc1;
    yinc2 = -yinc2;
    }

  // Start drawing pixels at [x1, y1]
    for (int i = numpixels; i > 0; i--) {
        PointColor(x1, y1, c);
        if (d < 0) {
      d += dinc1;
      x1 += xinc1;
      y1 += yinc1;
        }
        else {
      d += dinc2;
      x1 += xinc2;
      y1 += yinc2;
        }
    }
}

virtual void CSurface::OnCreated ( ) [inline, protected, virtual]

Reimplemented in CMMXSurface32Intrinsic, CMMXSurface24Intrinsic, CMMXSurface16Intrinsic, CSSE2Surface32Intrinsic, CSSE2Surface24Intrinsic, and CSSE2Surface16Intrinsic.

Definition at line 69 of file Surface.h.

{}

COLORREF CSurface::PointColor | ( | int | x,
 |  | int | y |
 | ) |  |  | const [inline]

Definition at line 101 of file Surface.h.

{
  // m_image.GetPixel() calls ::GetPixel() which is too slow
  // since it has to work for all types of DCs.
  if (m_nBitDepth == 16) {
      COLORREF c = (COLORREF)*(WORD*)m_image.GetPixelAddress(x, y+m_kDeltaY);
      return((c&0x7c00) << 9 | (c&0x3e0) << 6 | (c&0x1f) << 3);
  }
  else {
    return(*(COLORREF*)(m_image.GetPixelAddress(x, y+m_kDeltaY)));
  }
}

void CSurface::PointColor | ( | int | x,
 |  | int | y,
 |  | COLORREF | c |
 | ) |  |  | [inline]

Definition at line 83 of file Surface.h.

{
  // m_image.SetPixel() call ::SetPixel() which is too slow
  // since it has to work with all DCs.

  BYTE *p = (BYTE*)m_image.GetPixelAddress(x, y+m_kDeltaY);
  if (m_nBitDepth == 16) {
    *(WORD *)p = (WORD)(((c&0xf80000) >> 19) | ((c&0xf800) >> 6) | ((c&0xf8) << 7));
  }
  else {
      *p++ = GetBValue(c);
      *p++ = GetGValue(c);
      *p = GetRValue(c);
  }
}

void CSurface::RandomBits ( )

Definition at line 88 of file Surface.cpp.

{
    for (int i = 0; i < m_wndHeight; i++) {
        for (int j = 0; j < m_wndWidth; j++) {
            PointColor(j, i, RGB(Random(), Random(), Random()));
        }
    }
}

void CSurface::RandomLine ( COLORREF c )

Definition at line 190 of file Surface.cpp.

{
    CPoint p1(Random(m_wndWidth), Random(m_wndHeight));
    CPoint p2(Random(m_wndWidth), Random(m_wndHeight));
    Line(p1, p2, c);
}

void CSurface::ShiftBits ( )

Definition at line 97 of file Surface.cpp.

{
  BYTE *pBits = (BYTE*)m_image.GetBits();
  int nPitch = GetPitch();
  for (int i = 0; i < m_wndHeight; i++) {
    memcpy_s(pBits, nPitch, pBits+nPitch, nPitch);
    pBits += nPitch;
  }
}

void CSurface::StripeBits ( )

Definition at line 76 of file Surface.cpp.

{
    int count = 0x880000;
    for (int i = 0; i < m_wndHeight; i++) {
        COLORREF color = count++; // RAND();
        for (int j = 0; j < m_wndWidth; j++) {
            PointColor(j, i, color);
        }
    }

}

Member Data Documentation

HDC CSurface::m_hDestDC [private]

Definition at line 75 of file Surface.h.

CImage CSurface::m_image [private]

Definition at line 76 of file Surface.h.

const int CSurface::m_kDeltaX = 1 [static, protected]

Definition at line 71 of file Surface.h.

const int CSurface::m_kDeltaY = 1 [static, protected]

Definition at line 72 of file Surface.h.

int CSurface::m_nBitDepth [private]

Definition at line 78 of file Surface.h.

int CSurface::m_nByteDepth [private]

Definition at line 77 of file Surface.h.

CWnd* CSurface::m_pSrcWnd [private]

Definition at line 74 of file Surface.h.

int CSurface::m_wndHeight [private]

Definition at line 80 of file Surface.h.

int CSurface::m_wndWidth [private]

Definition at line 79 of file Surface.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/Surface.h
  • general/MMXSwarm/Surface.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CSwarm Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

CSwarm Class Reference

#include "Swarm.h"

List of all members.

Public Member Functions

CSwarm ()
~CSwarm ()
int | GetAge () const
int | GetBorder () const
int | GetHeight () const
size_t | GetLeaderCount () const
size_t | GetLlamaCount () const
CSurface * | GetSurface () const
int | GetWidth () const
void | Initialize (CSurface *pSurface, int nLeaders, int nLlamas, const CSize &size)
void | Tick ()

Private Member Functions

void | Destroy ()
CLeader * GetLeader ()

Private Attributes

CLeaderArray m_LeaderArr
CLlamaArray m_LlamaArr
int | m_nAge
int | m_nBorder
int | m_nHeight
int | m_nWidth
CSurface * m_pSurf

Detailed Description

Definition at line 21 of file Swarm.h.

Constructor & Destructor Documentation

CSwarm::CSwarm ( )

Definition at line 19 of file Swarm.cpp.

               :
  m_pSurf(NULL)
{

}

CSwarm::~CSwarm ( )

Definition at line 25 of file Swarm.cpp.

{
  Destroy();
}

Member Function Documentation

void CSwarm::Destroy ( ) [private]

Definition at line 30 of file Swarm.cpp.

{
  for (size_t i = 0; i < m_LeaderArr.GetCount(); i++)
    delete m_LeaderArr[i];

  for (size_t i = 0; i < m_LlamaArr.GetCount(); i++)
    delete m_LlamaArr[i];

  m_LeaderArr.SetCount(0);
  m_LlamaArr.SetCount(0);
  m_pSurf = NULL;
}

int CSwarm::GetAge ( ) const [inline]

Definition at line 34 of file Swarm.h.

{ return(m_nAge); }

int CSwarm::GetBorder ( ) const [inline]

Definition at line 33 of file Swarm.h.

{ return(m_nBorder); }

int CSwarm::GetHeight ( ) const [inline]

Definition at line 31 of file Swarm.h.

{ return(m_nHeight); }

CLeader * CSwarm::GetLeader ( ) [private]

Definition at line 67 of file Swarm.cpp.

{
  CLeader *pLeader = NULL;
  switch (Random(2)) {
  case 0:
    pLeader = new CBrightLeader();
    break;
  case 1:
    pLeader = new CHueLeader();
    break;
  }
  ASSERT(pLeader != NULL);
  pLeader->SetSwarm(this);
  return(pLeader);
}

size_t CSwarm::GetLeaderCount ( ) const [inline]

Definition at line 37 of file Swarm.h.

{ return(m_LeaderArr.GetCount()); }

size_t CSwarm::GetLlamaCount ( ) const [inline]

Definition at line 36 of file Swarm.h.

{ return(m_LlamaArr.GetCount()); }

CSurface* CSwarm::GetSurface ( ) const [inline]

Definition at line 38 of file Swarm.h.

{ return(m_pSurf); }

int CSwarm::GetWidth ( ) const [inline]

Definition at line 32 of file Swarm.h.

{ return(m_nWidth); }

void CSwarm::Initialize | ( | CSurface * | pSurface,
 |  | int | nLeaders,
 |  | int | nLlamas,
 |  | const CSize & | size
 | ) |  |

Definition at line 42 of file Swarm.cpp.

{
  Destroy();
  m_nWidth = size.cx;
  m_nHeight = size.cy;

  if (!m_nHeight || !m_nWidth)
    return;

  m_pSurf = pSurf;
  m_nAge = 0;
  m_nBorder = (m_nWidth + m_nHeight) / 50;
  m_LeaderArr.SetCount(nLeaders);
  m_LlamaArr.SetCount(nLlamas);

  for (int i = 0; i < nLeaders; i++) {
    m_LeaderArr[i] = GetLeader();
  }

  for (int i = 0; i < nLlamas; i++) {
    m_LlamaArr[i] = new CLlama();
    m_LlamaArr[i]->Init(this);
  }
}

void CSwarm::Tick ( )

Definition at line 83 of file Swarm.cpp.

{
  size_t nLeaderCount = m_LeaderArr.GetCount();
  size_t nLlamaCount = m_LlamaArr.GetCount();
  m_nAge++;
  // Very occasionally change a swarm type
  if ((Random() & 0x7f) == 0x7f) {
    size_t nIdx = m_nAge % nLeaderCount;
    CLeader *pLeader = GetLeader();
    pLeader->Import(m_LeaderArr[nIdx]);
    delete m_LeaderArr[nIdx];
    m_LeaderArr[nIdx] = pLeader;
  }
  // Kick a few Llamas
  size_t nKickCount = nLeaderCount;
  for (size_t i = 0; i < nKickCount; i++) {
    m_LlamaArr[Random(int(nLlamaCount))]->Kick();
  }

  for (size_t i = 0; i < nLlamaCount; i++) {
    m_LlamaArr[i]->Tick(this, m_LeaderArr);
  }

  for (size_t i = 0; i < nLeaderCount; i++) {
    m_LeaderArr[i]->Tick();
  }
}

Member Data Documentation

CLeaderArray CSwarm::m_LeaderArr [private]

Definition at line 50 of file Swarm.h.

CLlamaArray CSwarm::m_LlamaArr [private]

Definition at line 51 of file Swarm.h.

int CSwarm::m_nAge [private]

Definition at line 49 of file Swarm.h.

int CSwarm::m_nBorder [private]

Definition at line 48 of file Swarm.h.

int CSwarm::m_nHeight [private]

Definition at line 46 of file Swarm.h.

int CSwarm::m_nWidth [private]

Definition at line 47 of file Swarm.h.

CSurface* CSwarm::m_pSurf [private]

Definition at line 52 of file Swarm.h.

The documentation for this class was generated from the following files:
  • general/MMXSwarm/Swarm.h
  • general/MMXSwarm/Swarm.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabbedViewApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTabbedViewApp Class Reference

#include "TabbedView.h"

List of all members.

Public Member Functions

CTabbedViewApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file TabbedView.h.

Constructor & Destructor Documentation

CTabbedViewApp::CTabbedViewApp ( )

Definition at line 40 of file TabbedView.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CTabbedViewApp::ExitInstance ( ) [virtual]

Definition at line 121 of file TabbedView.cpp.

{

  return CWinAppEx::ExitInstance();
}

BOOL CTabbedViewApp::InitInstance ( ) [virtual]

Definition at line 54 of file TabbedView.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_TABBEDTYPE,
    RUNTIME_CLASS(CTabbedViewDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CTabbedViewView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  LoadCustomState ();

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CTabbedViewApp::OnAppAbout ( )

Definition at line 184 of file TabbedView.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CTabbedViewApp::PreLoadState ( ) [virtual]

Definition at line 128 of file TabbedView.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/TabbedView/TabbedView.h
  • vc2008fp/TabbedView/TabbedView.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabbedViewDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CTabbedViewDoc Class Reference

#include "TabbedViewDoc.h"

List of all members.

Public Member Functions

virtual | ~CTabbedViewDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CTabbedViewDoc ()

Detailed Description

Definition at line 13 of file TabbedViewDoc.h.

Constructor & Destructor Documentation

CTabbedViewDoc::CTabbedViewDoc ( ) [protected]

Definition at line 33 of file TabbedViewDoc.cpp.

{
  // TODO: add one-time construction code here

}

CTabbedViewDoc::~CTabbedViewDoc ( ) [virtual]

Definition at line 39 of file TabbedViewDoc.cpp.

{
}

Member Function Documentation

BOOL CTabbedViewDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file TabbedViewDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CTabbedViewDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file TabbedViewDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/TabbedView/TabbedViewDoc.h
  • vc2008fp/TabbedView/TabbedViewDoc.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabbedViewView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CTabbedViewView Class Reference

#include "TabbedViewView.h"

List of all members.

Public Member Functions

virtual | ~CTabbedViewView ()
CTabbedViewDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CTabbedViewView ()
BOOL | IsScrollBar () const
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file TabbedViewView.h.

Constructor & Destructor Documentation

CTabbedViewView::CTabbedViewView ( ) [protected]

Definition at line 46 of file TabbedViewView.cpp.

{
}

CTabbedViewView::~CTabbedViewView ( ) [virtual]

Definition at line 50 of file TabbedViewView.cpp.

{
}

Member Function Documentation

CTabbedViewDoc * CTabbedViewView::GetDocument ( ) [inline]

Definition at line 58 of file TabbedViewView.h.

   { return (CTabbedViewDoc*)m_pDocument; }

BOOL CTabbedViewView::IsScrollBar ( ) const [inline, protected]

Definition at line 35 of file TabbedViewView.h.

  {
    return TRUE;
  }

void CTabbedViewView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 86 of file TabbedViewView.cpp.

{
  // TODO: add extra initialization before printing
}

void CTabbedViewView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 120 of file TabbedViewView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

int CTabbedViewView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 125 of file TabbedViewView.cpp.

{
  if (CTabView::OnCreate(lpCreateStruct) == -1)
    return -1;

  AddView (RUNTIME_CLASS (CView1), _T("Simple"), 100);
  AddView (RUNTIME_CLASS (CView2), _T("List"), 101);
  AddView (RUNTIME_CLASS (CView3), _T("Form"), 102);
  AddView (RUNTIME_CLASS (CView4), _T("ScrollView"), 102);

  return 0;
}

void CTabbedViewView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 65 of file TabbedViewView.cpp.

{
//  CTabbedViewDoc* pDoc = GetDocument();
//  ASSERT_VALID(pDoc);
  // TODO: add draw code for native data here
}

void CTabbedViewView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 91 of file TabbedViewView.cpp.

{
  // TODO: add cleanup after printing
}

BOOL CTabbedViewView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 138 of file TabbedViewView.cpp.

{
  return TRUE;
}

void CTabbedViewView::OnFilePrintPreview ( ) [protected]

Definition at line 75 of file TabbedViewView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CTabbedViewView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 80 of file TabbedViewView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CTabbedViewView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 54 of file TabbedViewView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CTabView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/TabbedView/TabbedViewView.h
  • vc2008fp/TabbedView/TabbedViewView.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabControlApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTabControlApp Class Reference

#include "TabControl.h"

List of all members.

Public Member Functions

CTabControlApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file TabControl.h.

Constructor & Destructor Documentation

CTabControlApp::CTabControlApp ( )

Definition at line 39 of file TabControl.cpp.

                               :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CTabControlApp::ExitInstance ( ) [virtual]

Definition at line 169 of file TabControl.cpp.

{

  return CWinAppEx::ExitInstance();
}

BOOL CTabControlApp::InitInstance ( ) [virtual]

Definition at line 54 of file TabControl.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
  LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(CTabControlDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CTabControlView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  if (afxGlobalData.m_nBitsPerPixel < 16)
  {
    AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
  }

  return TRUE;
}

void CTabControlApp::OnAppAbout ( )

Definition at line 160 of file TabControl.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CTabControlApp::PreLoadState ( ) [virtual]

Definition at line 176 of file TabControl.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/TabControl/TabControl.h
  • vc2008fp/TabControl/TabControl.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabControlDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CTabControlDoc Class Reference

#include "TabControlDoc.h"

List of all members.

Public Member Functions

virtual | ~CTabControlDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CTabControlDoc ()

Detailed Description

Definition at line 13 of file TabControlDoc.h.

Constructor & Destructor Documentation

CTabControlDoc::CTabControlDoc ( ) [protected]

Definition at line 33 of file TabControlDoc.cpp.

{
  // TODO: add one-time construction code here

}

CTabControlDoc::~CTabControlDoc ( ) [virtual]

Definition at line 39 of file TabControlDoc.cpp.

{
}

Member Function Documentation

BOOL CTabControlDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file TabControlDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CTabControlDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file TabControlDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/TabControl/TabControlDoc.h
  • vc2008fp/TabControl/TabControlDoc.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabControlView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CTabControlView Class Reference

#include "TabControlView.h"

List of all members.

Public Types

enum | { IDD = IDD_TABCONTROL_FORM }

Public Member Functions

virtual | ~CTabControlView ()
CTabControlDoc * GetDocument ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

BOOL | m_bTabIcons
BOOL | m_bTabsSwap
int | m_nColor
int | m_nTabLocation
int | m_nTabStyle
CListBox | m_wndNotifications
CButton | m_wndTabIcons
CStatic | m_wndTabLoc

Protected Member Functions

CTabControlView ()
void | AddNotification (LPCTSTR lpszText)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg LRESULT | OnChangeActiveTab (WPARAM wp, LPARAM lp)
afx_msg LRESULT | OnChangingActiveTab (WPARAM wp, LPARAM lp)
afx_msg void | OnColor ()
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual void | OnInitialUpdate ()
afx_msg void | OnLocation ()
afx_msg LRESULT | OnMoveTab (WPARAM wp, LPARAM lp)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnSelchangeTabStyle ()
afx_msg void | OnTabIcons ()
afx_msg void | OnTabSwap ()

Protected Attributes

CEdit | m_wnd1
CEdit | m_wnd2
CEdit | m_wnd3
CEdit | m_wnd4
CMFCTabCtrl | m_wndTab

Detailed Description

Definition at line 13 of file TabControlView.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 20 of file TabControlView.h.

{ IDD = IDD_TABCONTROL_FORM };

Constructor & Destructor Documentation

CTabControlView::CTabControlView ( ) [protected]

Definition at line 51 of file TabControlView.cpp.

  : CFormView(CTabControlView::IDD)
{
  m_nTabStyle = 0;
  m_nTabLocation = 0;
  m_nColor = 0;
  m_bTabIcons = TRUE;
  m_bTabsSwap = TRUE;
}

CTabControlView::~CTabControlView ( ) [virtual]

Definition at line 61 of file TabControlView.cpp.

{
}

Member Function Documentation

void CTabControlView::AddNotification ( LPCTSTR lpszText ) [protected]

Definition at line 323 of file TabControlView.cpp.

{
  if (m_wndNotifications.GetCount () > 100)
  {
    m_wndNotifications.DeleteString (0);
  }

  int nIndex = m_wndNotifications.AddString (lpszText);
  m_wndNotifications.SetCurSel (nIndex);
}

void CTabControlView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 65 of file TabControlView.cpp.

{
  CFormView::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_TAB_ICONS, m_wndTabIcons);
  DDX_Control(pDX, IDC_NOTIFICATIONS, m_wndNotifications);
  DDX_Control(pDX, IDC_TAB, m_wndTabLoc);
  DDX_CBIndex(pDX, IDC_TAB_STYLE, m_nTabStyle);
  DDX_Radio(pDX, IDC_LOCATION, m_nTabLocation);
  DDX_Radio(pDX, IDC_COLOR, m_nColor);
  DDX_Check(pDX, IDC_TAB_ICONS, m_bTabIcons);
  DDX_Check(pDX, IDC_TAB_SWAP, m_bTabsSwap);
}

CTabControlDoc * CTabControlView::GetDocument ( ) [inline]

Definition at line 83 of file TabControlView.h.

   { return (CTabControlDoc*)m_pDocument; }

void CTabControlView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 163 of file TabControlView.cpp.

{
  // TODO: add extra initialization before printing
}

LRESULT CTabControlView::OnChangeActiveTab | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 343 of file TabControlView.cpp.

{
  CString str;
  str.Format (_T("AFX_WM_CHANGE_ACTIVE_TAB: %d"), (int) wp);

  AddNotification (str);
  return 0;
}

LRESULT CTabControlView::OnChangingActiveTab | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 352 of file TabControlView.cpp.

{
  CString str;
  str.Format (_T("AFX_WM_CHANGING_ACTIVE_TAB: %d"), (int) wp);

  AddNotification (str);
  return 0;
}

void CTabControlView::OnColor ( ) [protected]

Definition at line 279 of file TabControlView.cpp.

{
  UpdateData ();

  CArray<COLORREF, COLORREF> arColors;

  switch (m_nColor)
  {
  case 0:
    m_wndTab.EnableAutoColor (FALSE);
    break;

  case 1:
    m_wndTab.EnableAutoColor (TRUE);
    break;

  case 2:
    arColors.Add (RGB (121, 210, 231));
    arColors.Add (RGB (190, 218, 153));
    arColors.Add (RGB (255, 170, 100));

    m_wndTab.EnableAutoColor (TRUE);
  }

  m_wndTab.SetAutoColors (arColors);

  theApp.WriteInt (_T("TabColor"), m_nColor);
}

void CTabControlView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 202 of file TabControlView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CTabControlView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 168 of file TabControlView.cpp.

{
  // TODO: add cleanup after printing
}

void CTabControlView::OnFilePrintPreview ( ) [protected]

Definition at line 152 of file TabControlView.cpp.

{
  AFXPrintPreview (this);
}

void CTabControlView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 86 of file TabControlView.cpp.

{
  // There is only one view ever, so it only needs to do the initial
  // update once--otherwise the application is  resized needlessly.
  static BOOL bUpdatedOnce = FALSE;
  if (bUpdatedOnce)
    return;
  bUpdatedOnce = TRUE;

  CFormView::OnInitialUpdate();
  GetParentFrame()->RecalcLayout();

  if (m_wndTab.GetSafeHwnd () != NULL)
  {
    return;
  }

  CRect rectTab;

  m_wndTabLoc.GetWindowRect (&rectTab);
  ScreenToClient (&rectTab);

  m_wndTab.Create (CMFCTabCtrl::STYLE_3D, rectTab, this, 1,
    CMFCTabCtrl::LOCATION_TOP);

  m_wndTab.SetImageList (IDB_ICONS, 16, RGB (255, 0, 255));

  m_wnd1.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 1);
  m_wnd1.SetFont (&afxGlobalData.fontRegular);
  m_wnd1.SetWindowText (_T("Edit 1"));

  m_wnd2.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 2);
  m_wnd2.SetFont (&afxGlobalData.fontRegular);
  m_wnd2.SetWindowText (_T("Edit 2"));

  m_wnd3.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 3);
  m_wnd3.SetFont (&afxGlobalData.fontRegular);
  m_wnd3.SetWindowText (_T("Edit 3"));

  m_wnd4.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 4);
  m_wnd4.SetFont (&afxGlobalData.fontRegular);
  m_wnd4.SetWindowText (_T("Edit 4"));

  m_wndTab.AddTab (&m_wnd1, _T("One"), 0, FALSE);
  m_wndTab.AddTab (&m_wnd2, _T("Two"), 1, FALSE);
  m_wndTab.AddTab (&m_wnd3, _T("Three"), 2, FALSE);
  m_wndTab.AddTab (&m_wnd4, _T("Four"), 3, FALSE);

  m_nTabStyle = theApp.GetInt (_T("TabStyle"), 0);
  m_nTabLocation = theApp.GetInt (_T("TabLocation"), 0);
  m_nColor = theApp.GetInt (_T("TabColor"), 0);
  m_bTabIcons = theApp.GetInt (_T("TabIcons"), TRUE);
  m_bTabsSwap = theApp.GetInt (_T("TabsSwap"), TRUE);

  UpdateData (FALSE);

  OnSelchangeTabStyle();
  OnLocation();
  OnColor();
  OnTabIcons ();
  OnTabSwap ();
}

void CTabControlView::OnLocation ( ) [protected]

Definition at line 256 of file TabControlView.cpp.

{
  UpdateData ();

  CMFCTabCtrl::Location location;

  switch (m_nTabLocation)
  {
  case 1:
    location = CMFCTabCtrl::LOCATION_BOTTOM;
    break;

  default:
    location = CMFCTabCtrl::LOCATION_TOP;
  }

  m_wndTab.SetLocation (location);
  m_wndTab.RecalcLayout ();
  m_wndTab.RedrawWindow ();

  theApp.WriteInt (_T("TabLocation"), m_nTabLocation);
}

LRESULT CTabControlView::OnMoveTab | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 334 of file TabControlView.cpp.

{
  CString str;
  str.Format (_T("AFX_WM_ON_MOVE_TAB: %d %d"), (int) wp, (int) lp);

  AddNotification (str);
  return 0;
}

BOOL CTabControlView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 157 of file TabControlView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CTabControlView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 173 of file TabControlView.cpp.

{
  // TODO: add customized printing code here
}

void CTabControlView::OnSelchangeTabStyle ( ) [protected]

Definition at line 207 of file TabControlView.cpp.

{
  UpdateData ();

  CMFCTabCtrl::Style style;
  int nTab = 0;

  m_wndTabIcons.EnableWindow ();

  for (nTab = 0; nTab < m_wndTab.GetTabsNum (); nTab++)
  {
    m_wndTab.SetTabIcon (nTab, m_bTabIcons ? nTab : (UINT)-1);
  }

  switch (m_nTabStyle)
  {
  case 1:
    style = CMFCTabCtrl::STYLE_FLAT;
    m_wndTabIcons.EnableWindow (FALSE);

    for (nTab = 0; nTab < m_wndTab.GetTabsNum (); nTab++)
    {
      m_wndTab.SetTabIcon (nTab, (UINT)-1);
    }

    break;

  case 2:
    style = CMFCTabCtrl::STYLE_3D_ONENOTE;
    break;

  case 3:
    style = CMFCTabCtrl::STYLE_3D_VS2005;
    break;

  case 4:
    style = CMFCTabCtrl::STYLE_3D_ROUNDED;
    break;
  default:
    style = CMFCTabCtrl::STYLE_3D;
  }

  m_wndTab.ModifyTabStyle (style);
  m_wndTab.RecalcLayout ();
  m_wndTab.RedrawWindow ();

  theApp.WriteInt (_T("TabStyle"), m_nTabStyle);
}

void CTabControlView::OnTabIcons ( ) [protected]

Definition at line 308 of file TabControlView.cpp.

{
  UpdateData ();

  for (int nTab = 0; nTab < m_wndTab.GetTabsNum (); nTab++)
  {
    m_wndTab.SetTabIcon (nTab, m_bTabIcons ? nTab : (UINT)-1);
  }

  m_wndTab.RecalcLayout ();
  m_wndTab.RedrawWindow ();

  theApp.WriteInt (_T("TabIcons"), m_bTabIcons);
}

void CTabControlView::OnTabSwap ( ) [protected]

Definition at line 361 of file TabControlView.cpp.

{
  UpdateData ();

  m_wndTab.EnableTabSwap (m_bTabsSwap);
  theApp.WriteInt (_T("TabsSwap"), m_bTabsSwap);
}

BOOL CTabControlView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 78 of file TabControlView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CFormView::PreCreateWindow(cs);
}

Member Data Documentation

BOOL CTabControlView::m_bTabIcons

Definition at line 27 of file TabControlView.h.

BOOL CTabControlView::m_bTabsSwap

Definition at line 28 of file TabControlView.h.

int CTabControlView::m_nColor

Definition at line 26 of file TabControlView.h.

int CTabControlView::m_nTabLocation

Definition at line 25 of file TabControlView.h.

int CTabControlView::m_nTabStyle

Definition at line 24 of file TabControlView.h.

CEdit CTabControlView::m_wnd1 [protected]

Definition at line 37 of file TabControlView.h.

CEdit CTabControlView::m_wnd2 [protected]

Definition at line 38 of file TabControlView.h.

CEdit CTabControlView::m_wnd3 [protected]

Definition at line 39 of file TabControlView.h.

CEdit CTabControlView::m_wnd4 [protected]

Definition at line 40 of file TabControlView.h.

CListBox CTabControlView::m_wndNotifications

Definition at line 22 of file TabControlView.h.

CMFCTabCtrl CTabControlView::m_wndTab [protected]

Definition at line 35 of file TabControlView.h.

CButton CTabControlView::m_wndTabIcons

Definition at line 21 of file TabControlView.h.

CStatic CTabControlView::m_wndTabLoc

Definition at line 23 of file TabControlView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/TabControl/TabControlView.h
  • vc2008fp/TabControl/TabControlView.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabOrderDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTabOrderDlg Class Reference

#include "TabOrdDg.H"

List of all members.

Public Types

enum | { IDD = IDD_TABORDER }

Public Member Functions

CTabOrderDlg (CWnd *pParent=NULL)

Public Attributes

CDragListBox | m_lboxTabOrder
CTypedPtrList< CObList,
CTestContainer98Item * > 		m_lpTabOrder

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 22 of file TabOrdDg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file TabOrdDg.H.

{ IDD = IDD_TABORDER };

Constructor & Destructor Documentation

CTabOrderDlg::CTabOrderDlg ( CWnd * pParent = NULL )

Definition at line 24 of file TabOrdDg.Cpp.

                                          :
   CDialog( CTabOrderDlg::IDD, pParent )
{
  //{{AFX_DATA_INIT(CTabOrderDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CTabOrderDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 32 of file TabOrdDg.Cpp.

{
   int nItems;
   int iItem;
   CTestContainer98Item* pItem;
   CString strItemName;
   POSITION posItem;

  CDialog::DoDataExchange( pDX );
  //{{AFX_DATA_MAP(CTabOrderDlg)
  DDX_Control(pDX, IDC_TABORDER, m_lboxTabOrder);
  //}}AFX_DATA_MAP

   if( pDX->m_bSaveAndValidate )
   {
    m_lpTabOrder.RemoveAll();
    nItems = m_lboxTabOrder.GetCount();
    for( iItem = 0; iItem < nItems; iItem++ )
    {
     pItem = (CTestContainer98Item*)m_lboxTabOrder.GetItemDataPtr( iItem );
     ASSERT( pItem != NULL );
     m_lpTabOrder.AddTail( pItem );
    }
   }
   else
   {
    m_lboxTabOrder.ResetContent();
    posItem = m_lpTabOrder.GetHeadPosition();
    while( posItem != NULL )
    {
     pItem = m_lpTabOrder.GetNext( posItem );
     ENSURE( pItem != NULL );
     strItemName = pItem->GetDisplayName();
     iItem = m_lboxTabOrder.AddString( strItemName );
     m_lboxTabOrder.SetItemDataPtr( iItem, pItem );
    }
   }
}

void CTabOrderDlg::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 104 of file TabOrdDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}

BOOL CTabOrderDlg::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

Definition at line 96 of file TabOrdDg.Cpp.

{
  CString strPath = AfxGetApp()->m_pszHelpFilePath;
  strPath += _T("::/popups.txt");

  return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}

BOOL CTabOrderDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 82 of file TabOrdDg.Cpp.

{
  CDialog::OnInitDialog();

   return( TRUE );
}

Member Data Documentation

CDragListBox CTabOrderDlg::m_lboxTabOrder

Definition at line 31 of file TabOrdDg.H.

CTypedPtrList< CObList, CTestContainer98Item* > CTabOrderDlg::m_lpTabOrder

Definition at line 34 of file TabOrdDg.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TabOrdDg.H
  • ole/TstCon/TabOrdDg.Cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTabRulerItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTabRulerItem Class Reference

#include "ruler.h"

Inherits CRulerItem, and CRulerItem.

List of all members.

Public Member Functions

CTabRulerItem ()
CTabRulerItem ()
virtual void | Draw (CDC &dc)
virtual void | Draw (CDC &dc)
virtual BOOL | HitTestPix (CPoint pt)
virtual BOOL | HitTestPix (CPoint pt)
virtual void | TrackHorzPosTwips (int nXPos, BOOL bOnRuler=TRUE)
virtual void | TrackHorzPosTwips (int nXPos, BOOL bOnRuler=TRUE)

Detailed Description

Definition at line 84 of file ruler.h.

Constructor & Destructor Documentation

CTabRulerItem::CTabRulerItem ( ) [inline]

Definition at line 87 of file ruler.h.

{ SetAlignment(TA_LEFT); }

CTabRulerItem::CTabRulerItem ( ) [inline]

Definition at line 89 of file ruler.h.

{ SetAlignment(TA_LEFT); }

Member Function Documentation

virtual void CTabRulerItem::Draw ( CDC & dc ) [inline, virtual]

Reimplemented from CRulerItem.

Definition at line 88 of file ruler.h.

{if (GetHorzPosTwips() != 0) CRulerItem::Draw(dc);}

virtual void CTabRulerItem::Draw ( CDC & dc ) [inline, virtual]

Reimplemented from CRulerItem.

Definition at line 90 of file ruler.h.

{if (GetHorzPosTwips() != 0) CRulerItem::Draw(dc);}

virtual BOOL CTabRulerItem::HitTestPix ( CPoint pt ) [inline, virtual]

Reimplemented from CRulerItem.

Definition at line 92 of file ruler.h.

{ return (GetHorzPosTwips() != 0) ? CRulerItem::HitTestPix(pt) : FALSE;}

virtual BOOL CTabRulerItem::HitTestPix ( CPoint pt ) [inline, virtual]

Reimplemented from CRulerItem.

Definition at line 90 of file ruler.h.

{ return (GetHorzPosTwips() != 0) ? CRulerItem::HitTestPix(pt) : FALSE;}

void CTabRulerItem::TrackHorzPosTwips | ( | int | nXPos,
 |  | BOOL | bOnRuler = TRUE |
 | ) |  |  | [virtual]

Reimplemented from CRulerItem.

Definition at line 273 of file ruler.cpp.

{
  if (bOnRuler)
    CRulerItem::TrackHorzPosTwips(nXPos, bOnRuler);
  else
    CRulerItem::TrackHorzPosTwips(0, bOnRuler);
}

virtual void CTabRulerItem::TrackHorzPosTwips | ( | int | nXPos,
 |  | BOOL | bOnRuler = TRUE |
 | ) |  |  | [virtual]

Reimplemented from CRulerItem.

The documentation for this class was generated from the following files:
  • ole/wordpad/ruler.h
  • vc2008fp/WordPad/ruler.h
  • ole/wordpad/ruler.cpp
  • vc2008fp/WordPad/ruler.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTaskDialogTestApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTaskDialogTestApp Class Reference

#include "CTaskDialogDemo.h"

List of all members.

Public Member Functions

CTaskDialogTestApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 17 of file CTaskDialogDemo.h.

Constructor & Destructor Documentation

CTaskDialogTestApp::CTaskDialogTestApp ( )

Definition at line 22 of file CTaskDialogDemo.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CTaskDialogTestApp::InitInstance ( ) [virtual]

Definition at line 36 of file CTaskDialogDemo.cpp.

{
  // InitCommonControlsEx() is required on Windows XP if an application
  // manifest specifies use of ComCtl32.dll version 6 or later to enable
  // visual styles.  Otherwise, any window creation will fail.
  INITCOMMONCONTROLSEX InitCtrls;
  InitCtrls.dwSize = sizeof(InitCtrls);
  // Set this to include all the common control classes you want to use
  // in your application.
  InitCtrls.dwICC = ICC_WIN95_CLASSES;
  InitCommonControlsEx(&InitCtrls);

  CWinApp::InitInstance();

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  // of your final executable, you should remove from the following
  // the specific initialization routines you do not need
  // Change the registry key under which our settings are stored
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization
  SetRegistryKey(_T("Local AppWizard-Generated Applications"));

  CTaskDialogTestDlg dlg;
  m_pMainWnd = &dlg;
  INT_PTR nResponse = dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/CTaskDialog/CTaskDialogDemo.h
  • general/CTaskDialog/CTaskDialogDemo.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTaskDialogTestDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CTaskDialogTestDlg Class Reference

#include "CTaskDialogDemoDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_TASKDIALOGTEST_DIALOG }

Public Member Functions

CTaskDialogTestDlg (CWnd *pParent=NULL)
afx_msg void | OnBnClickedButton1 ()
afx_msg void | OnBnClickedButton2 ()
afx_msg void | OnBnClickedButton3 ()
afx_msg void | OnBnClickedButton4 ()
afx_msg void | OnBnClickedButton5 ()
afx_msg void | OnBnClickedButton6 ()
afx_msg void | OnBnClickedButton7 ()
afx_msg void | OnBnClickedButton8 ()
afx_msg void | OnStnClickedRadioId ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
void | SetControls (INT_PTR nResult, int nRadioButtonId, BOOL bChecked)

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 9 of file CTaskDialogDemoDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 16 of file CTaskDialogDemoDlg.h.

{ IDD = IDD_TASKDIALOGTEST_DIALOG };

Constructor & Destructor Documentation

CTaskDialogTestDlg::CTaskDialogTestDlg ( CWnd * pParent = NULL )

Definition at line 14 of file CTaskDialogDemoDlg.cpp.

  : CDialog(CTaskDialogTestDlg::IDD, pParent)
{
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CTaskDialogTestDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 20 of file CTaskDialogDemoDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
}

void CTaskDialogTestDlg::OnBnClickedButton1 ( )

Definition at line 94 of file CTaskDialogDemoDlg.cpp.

{
  CTaskDialog dlg(_T("A CTaskDialog presents information in a clear and consistent way."),
      _T("How much do you like CTaskDialog?"), _T("Sample CTaskDialog"),
        TDCBF_YES_BUTTON | TDCBF_NO_BUTTON, TDF_ENABLE_HYPERLINKS | TDF_ALLOW_DIALOG_CANCELLATION, _T("I hope you like it very much!"));

  INT_PTR nResult = dlg.DoModal();

  SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
}

void CTaskDialogTestDlg::OnBnClickedButton2 ( )

Definition at line 105 of file CTaskDialogDemoDlg.cpp.

{
  CProgressBarTaskDialog dlg;
  INT_PTR nResult = dlg.DoModal();

  SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
}

void CTaskDialogTestDlg::OnBnClickedButton3 ( )

Definition at line 113 of file CTaskDialogDemoDlg.cpp.

{

  CTaskDialog dlg(_T("A CTaskDialog presents information in a clear and consistent way."),
      _T("How much do you like CTaskDialog?"), _T("Sample CTaskDialog"), 0,
      TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS , _T("I hope you like it!"));

  dlg.AddCommandControl( 10, _T("&Use it!\nIt's the best dialog you can have!"));
  dlg.AddCommandControl( 20, _T("&Maybe?\nDon't you want to try it?"));
  dlg.AddCommandControl( 25, _T("&No way!\nI'm not going to use it!"));

  dlg.AddRadioButton( 3, _T("Lots"));
  dlg.AddRadioButton( 7, _T("A little"));
  dlg.AddRadioButton( 4, _T("Not at all"));

    dlg.SetMainIcon(TD_SHIELD_ICON);
  dlg.SetFooterIcon(TD_INFORMATION_ICON);

  INT_PTR nResult = dlg.DoModal();

  SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
}

void CTaskDialogTestDlg::OnBnClickedButton4 ( )

Definition at line 152 of file CTaskDialogDemoDlg.cpp.

{
  CTaskDialog dlg(_T("A CTaskDialog presents information in a clear and consistent way and if you want to get more information go to <a href=\"http://microsoft.com\">http://microsoft.com</a>. Where can you get some useful information?"),
    _T("How much do you like CTaskDialog?"), _T("Loading from resources"),
    IDS_BUTTON, IDS_END_BUTTON , 0, TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS,
    _T("I hope you like it!"));

  dlg.SetFooterIcon(TD_INFORMATION_ICON);
  dlg.SetMainIcon(TD_INFORMATION_ICON);
  dlg.LoadRadioButtons(IDS_RADIO_START, IDS_RADIO_END);

  INT_PTR nResult = dlg.DoModal();

  SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
}

void CTaskDialogTestDlg::OnBnClickedButton5 ( )

Definition at line 168 of file CTaskDialogDemoDlg.cpp.

{
  CMargueeTaskDialog dlg;
  INT_PTR nResult = dlg.DoModal();

  SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
}

void CTaskDialogTestDlg::OnBnClickedButton6 ( )

Definition at line 142 of file CTaskDialogDemoDlg.cpp.

{
  CTaskDialog dlg(_T("Should we replace MessageBox by CTaskDialog?"), _T(""), _T("Usage as MessageBox"),
   TDCBF_YES_BUTTON, TDF_ENABLE_HYPERLINKS);

  INT_PTR nResult = dlg.DoModal();

  SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
}

void CTaskDialogTestDlg::OnBnClickedButton7 ( )

Definition at line 185 of file CTaskDialogDemoDlg.cpp.

{
  INT_PTR nResult = CTaskDialog::ShowDialog(
      _T("Don't spend to much time on code, write only one line and get your CTaskDialog!"),
      _T("Where do you like to go?"),
      _T("One line command"), IDS_RADIO_START, IDS_RADIO_START + 3, TDCBF_CANCEL_BUTTON);

  SetControls(nResult, 0, FALSE);
}

void CTaskDialogTestDlg::OnBnClickedButton8 ( )

Definition at line 176 of file CTaskDialogDemoDlg.cpp.

{
  CWizardDialog dlg;

  INT_PTR nResult = dlg.DoModal();

  SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
}

BOOL CTaskDialogTestDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 43 of file CTaskDialogDemoDlg.cpp.

{
  CDialog::OnInitDialog();

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CTaskDialogTestDlg::OnPaint ( ) [protected]

Definition at line 61 of file CTaskDialogDemoDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CTaskDialogTestDlg::OnQueryDragIcon ( ) [protected]

Definition at line 88 of file CTaskDialogDemoDlg.cpp.

{
  return static_cast<HCURSOR>(m_hIcon);
}

void CTaskDialogTestDlg::OnStnClickedRadioId ( )

Definition at line 137 of file CTaskDialogDemoDlg.cpp.

{
  // TODO: Add your control notification handler code here
}

void CTaskDialogTestDlg::SetControls | ( | INT_PTR | nResult,
 |  | int | nRadioButtonId,
 |  | BOOL | bChecked |
 | ) |  |  | [protected]

Definition at line 195 of file CTaskDialogDemoDlg.cpp.

{
  CString strTmp;
  strTmp.Format(_T("%d"), nResult);
  SetDlgItemText(IDC_NEW_BUTTON, strTmp);

  strTmp.Format(_T("%d"), nRadioButtonId);
  SetDlgItemText(IDC_RADIO_ID, strTmp);

  CheckDlgButton(IDC_CHECK, bChecked ? BST_CHECKED : BST_UNCHECKED);
}

Member Data Documentation

HICON CTaskDialogTestDlg::m_hIcon [protected]

Definition at line 24 of file CTaskDialogDemoDlg.h.

The documentation for this class was generated from the following files:
  • general/CTaskDialog/CTaskDialogDemoDlg.h
  • general/CTaskDialog/CTaskDialogDemoDlg.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTaskPane Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends

CTaskPane Class Reference

#include "TaskPane.h"

List of all members.

Public Member Functions

CTaskPane ()
CTaskPane ()
CTaskPane ()
virtual | ~CTaskPane ()
virtual | ~CTaskPane ()
virtual | ~CTaskPane ()
void | UpdateIcons ()
void | UpdateMRUFilesList ()
void | UpdateMRUFilesList ()
void | UpdateToolbar ()

Public Attributes

int | m_nUserColorGroup
int | m_nUserColorTask

Protected Member Functions

BOOL | CreateEditControl ()
BOOL | CreateTreeControl ()
BOOL | CreateTreeWindow ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Protected Attributes

CFont | m_Font
int | m_nDocumentsGroup
CEdit | m_wndEdit
CTreeCtrl | m_wndTree

Friends

class | CTasksPaneView

Detailed Description

Definition at line 14 of file TaskPane.h.

Constructor & Destructor Documentation

CTaskPane::CTaskPane ( )

Definition at line 34 of file TaskPane.cpp.

{
}

CTaskPane::~CTaskPane ( ) [virtual]

Definition at line 38 of file TaskPane.cpp.

{
}

CTaskPane::CTaskPane ( )
virtual CTaskPane::~CTaskPane ( ) [virtual]
CTaskPane::CTaskPane ( )
virtual CTaskPane::~CTaskPane ( ) [virtual]

Member Function Documentation

BOOL CTaskPane::CreateEditControl ( ) [protected]

Definition at line 151 of file TaskPane.cpp.

{
  CRect rectDummy (0, 0, 0, 0);
  DWORD dwEditStyle = WS_CHILD | WS_VISIBLE |
    ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE;

  m_Font.CreateStockObject (DEFAULT_GUI_FONT);

  if (!m_wndEdit.Create (dwEditStyle, rectDummy, this, (UINT)-1))
  {
    TRACE0("Failed to create the edit window\n");
    return FALSE;
  }

  m_wndEdit.ModifyStyleEx (0, WS_EX_CLIENTEDGE);

  m_wndEdit.SetFont (&m_Font);
  m_wndEdit.SetWindowText(
    _T("This is the standard multiline Edit Box.\r\nHere you can type your text."));

  return TRUE;
}

BOOL CTaskPane::CreateTreeControl ( ) [protected]

Definition at line 124 of file TaskPane.cpp.

{
  CRect rectDummy (0, 0, 0, 0);
  const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
                TVS_LINESATROOT | TVS_HASBUTTONS;

  if(!m_wndTree.Create (dwTreeStyle, rectDummy, this, (UINT)-1))
  {
    TRACE0("Failed to create the custom window\n");
    return FALSE;
  }

  m_wndTree.ModifyStyleEx (0, WS_EX_CLIENTEDGE);

  HTREEITEM hRoot = m_wndTree.InsertItem (_T("Folders"));

  m_wndTree.InsertItem (_T("Folder 1"), hRoot);
  m_wndTree.InsertItem (_T("Folder 2"), hRoot);
  m_wndTree.InsertItem (_T("Folder 3"), hRoot);
  m_wndTree.InsertItem (_T("Folder 4"), hRoot);

  m_wndTree.Expand (hRoot, TVE_EXPAND);

  m_wndTree.RedrawWindow ();
  return TRUE;
}

BOOL CTaskPane::CreateTreeWindow ( ) [protected]

Definition at line 134 of file TaskPane.cpp.

{
  CRect rectDummy (0, 0, 0, 0);
  const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;

  if (!m_wndTree.Create (dwTreeStyle, rectDummy, this, (UINT)-1))
  {
    TRACE0("Failed to create the custom window\n");
    return FALSE;      // fail to create
  }

  TCHAR szWinDir [MAX_PATH + 1];
  if (GetWindowsDirectory (szWinDir, MAX_PATH) != 0)
  {
    SHFILEINFO sfi;
    HIMAGELIST himSystem = (HIMAGELIST)SHGetFileInfo (szWinDir, 0, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
    int iIndex = sfi.iIcon;

    m_wndTree.SetImageList (CImageList::FromHandle (himSystem), TVSIL_NORMAL);

    HTREEITEM hRoot = m_wndTree.InsertItem (_T("Folders"), iIndex, iIndex);
    m_wndTree.InsertItem (_T("Folder 1"), iIndex, iIndex, hRoot);
    m_wndTree.InsertItem (_T("Folder 2"), iIndex, iIndex, hRoot);
    m_wndTree.InsertItem (_T("Folder 3"), iIndex, iIndex, hRoot);
    m_wndTree.InsertItem (_T("Folder 4"), iIndex, iIndex, hRoot);
    m_wndTree.Expand (hRoot, TVE_EXPAND);

    m_wndTree.RedrawWindow ();
  }

  return TRUE;
}

afx_msg int CTaskPane::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int CTaskPane::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 45 of file TaskPane.cpp.

{
  SetWindowText(_T("Clipboard"));

  if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
    return -1;

  // Create tasks pane windows.
  // TODO: create your own tasks panes here:

  return 0;
}

afx_msg int CTaskPane::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
void CTaskPane::UpdateIcons ( )

Definition at line 167 of file TaskPane.cpp.

{
  SetIconsList (theApp.m_bHiColorIcons ? IDB_TASKS_HC : IDB_TASKS, 16);
}

void CTaskPane::UpdateMRUFilesList ( )
void CTaskPane::UpdateMRUFilesList ( )

Definition at line 113 of file TaskPane.cpp.

{
  AddMRUFilesList (m_nDocumentsGroup);
  RedrawWindow ();
}

void CTaskPane::UpdateToolbar ( )

Definition at line 119 of file TaskPane.cpp.

{
  m_wndToolBar.RedrawWindow ();
}

Friends And Related Function Documentation

friend class CTasksPaneView [friend]

Definition at line 15 of file TaskPane.h.

Member Data Documentation

CFont CTaskPane::m_Font [protected]

Definition at line 28 of file TaskPane.h.

int CTaskPane::m_nDocumentsGroup [protected]

Definition at line 26 of file TaskPane.h.

int CTaskPane::m_nUserColorGroup

Definition at line 22 of file TaskPane.h.

int CTaskPane::m_nUserColorTask

Definition at line 23 of file TaskPane.h.

CEdit CTaskPane::m_wndEdit [protected]

Definition at line 30 of file TaskPane.h.

CTreeCtrl CTaskPane::m_wndTree [protected]

Definition at line 29 of file TaskPane.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MSOffice2007Demo/TaskPane.h
  • vc2008fp/TasksPane/TaskPane.h
  • vc2008fp/WordPad/TaskPane.h
  • vc2008fp/MSOffice2007Demo/TaskPane.cpp
  • vc2008fp/TasksPane/TaskPane.cpp
  • vc2008fp/WordPad/TaskPane.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTasksPaneApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTasksPaneApp Class Reference

#include "TasksPane.h"

List of all members.

Public Member Functions

CTasksPaneApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file TasksPane.h.

Constructor & Destructor Documentation

CTasksPaneApp::CTasksPaneApp ( )

Definition at line 39 of file TasksPane.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CTasksPaneApp::ExitInstance ( ) [virtual]

Definition at line 170 of file TasksPane.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CTasksPaneApp::InitInstance ( ) [virtual]

Definition at line 53 of file TasksPane.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(CTasksPaneDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CTasksPaneView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  if (afxGlobalData.m_nBitsPerPixel < 16)
  {
    AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
  }

  return TRUE;
}

void CTasksPaneApp::OnAppAbout ( )

Definition at line 161 of file TasksPane.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CTasksPaneApp::PreLoadState ( ) [virtual]

Definition at line 175 of file TasksPane.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/TasksPane/TasksPane.h
  • vc2008fp/TasksPane/TasksPane.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTasksPaneDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CTasksPaneDoc Class Reference

#include "TasksPaneDoc.h"

List of all members.

Public Member Functions

virtual | ~CTasksPaneDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)
virtual void | SetPathName (LPCTSTR lpszPathName, BOOL bAddToMRU=TRUE)

Protected Member Functions

CTasksPaneDoc ()

Detailed Description

Definition at line 13 of file TasksPaneDoc.h.

Constructor & Destructor Documentation

CTasksPaneDoc::CTasksPaneDoc ( ) [protected]

Definition at line 34 of file TasksPaneDoc.cpp.

{
  // TODO: add one-time construction code here

}

CTasksPaneDoc::~CTasksPaneDoc ( ) [virtual]

Definition at line 40 of file TasksPaneDoc.cpp.

{
}

Member Function Documentation

BOOL CTasksPaneDoc::OnNewDocument ( ) [virtual]

Definition at line 44 of file TasksPaneDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CTasksPaneDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 67 of file TasksPaneDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

void CTasksPaneDoc::SetPathName | ( | LPCTSTR | lpszPathName,
 |  | BOOL | bAddToMRU = TRUE |
 | ) |  |  | [virtual]

Definition at line 55 of file TasksPaneDoc.cpp.

{
  CDocument::SetPathName(lpszPathName, bAddToMRU);

  ((CMainFrame*) AfxGetMainWnd ())->UpdateMRUFilesList ();
}

The documentation for this class was generated from the following files:
  • vc2008fp/TasksPane/TasksPaneDoc.h
  • vc2008fp/TasksPane/TasksPaneDoc.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTasksPaneView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTasksPaneView Class Reference

#include "TasksPaneView.h"

List of all members.

Public Types

enum | { IDD = IDD_TASKSPANE_FORM }

Public Member Functions

virtual | ~CTasksPaneView ()
CTasksPaneDoc * GetDocument ()
CTaskPane * GetTasksPane ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

BOOL | m_bAnimation
BOOL | m_bCaptionIcon
BOOL | m_bCollapseGroups
BOOL | m_bCustomizeMargins
BOOL | m_bHicolorImages
BOOL | m_bMenuButtons
BOOL | m_bNavToolbar
BOOL | m_bScrollButtons
BOOL | m_bWrapLabels
BOOL | m_bWrapTasks
CSpinButtonCtrl | m_CaptionHeight
CMFCColorButton | m_ColorGroupText
CMFCColorButton | m_ColorGroupTextHot
CMFCColorButton | m_ColorTaskText
CMFCColorButton | m_ColorTaskTextHot
CSpinButtonCtrl | m_GroupSpacing
CSpinButtonCtrl | m_HMargin
CSpinButtonCtrl | m_IconOffset
int | m_nCaptionHeight
int | m_nGroupSpacing
int | m_nHMargin
int | m_nIconOffset
int | m_nTaskOffset
int | m_nTaskSpacing
int | m_nVisualManager
int | m_nVMargin
CSpinButtonCtrl | m_TaskOffset
CSpinButtonCtrl | m_TaskSpacing
CSpinButtonCtrl | m_VMargin

Protected Member Functions

CTasksPaneView ()
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAnimation ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnCaptionicon ()
afx_msg void | OnChangeMargins ()
afx_msg void | OnCollapsegroups ()
afx_msg void | OnColorGrouptext ()
afx_msg void | OnColorGrouptexthot ()
afx_msg void | OnColorTasktext ()
afx_msg void | OnColorTasktexthot ()
afx_msg void | OnContextMenu (CWnd *, CPoint point)
afx_msg void | OnDestroy ()
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnHicolorimages ()
afx_msg void | OnHistbuttons ()
virtual void | OnInitialUpdate ()
afx_msg void | OnMargins ()
afx_msg void | OnNavtoolbar ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnScrollbuttons ()
afx_msg void | OnVisualManager ()
afx_msg void | OnWraplabels ()
afx_msg void | OnWraptasks ()

Detailed Description

Definition at line 15 of file TasksPaneView.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 22 of file TasksPaneView.h.

{ IDD = IDD_TASKSPANE_FORM };

Constructor & Destructor Documentation

CTasksPaneView::CTasksPaneView ( ) [protected]

Definition at line 68 of file TasksPaneView.cpp.

  : CFormView(CTasksPaneView::IDD)
{
  m_nVisualManager = theApp.GetInt (_T("VisualManager"), 2);
  m_bWrapTasks = FALSE;
  m_bWrapLabels = TRUE;
  m_bNavToolbar = TRUE;
  m_bMenuButtons = FALSE;
  m_bHicolorImages = FALSE;
  m_bCollapseGroups = TRUE;
  m_bCustomizeMargins = FALSE;
  m_bScrollButtons = TRUE;
  m_bAnimation = TRUE;
  m_nCaptionHeight = 0;
  m_nGroupSpacing = 0;
  m_nHMargin = 0;
  m_nIconOffset = 0;
  m_nTaskOffset = 0;
  m_nTaskSpacing = 0;
  m_nVMargin = 0;
  m_bCaptionIcon = FALSE;
}

CTasksPaneView::~CTasksPaneView ( ) [virtual]

Definition at line 91 of file TasksPaneView.cpp.

{
}

Member Function Documentation

void CTasksPaneView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 95 of file TasksPaneView.cpp.

{
  CFormView::DoDataExchange(pDX);

  DDX_Control(pDX, IDC_COLOR_TASKTEXTHOT, m_ColorTaskTextHot);
  DDX_Control(pDX, IDC_COLOR_TASKTEXT, m_ColorTaskText);
  DDX_Control(pDX, IDC_COLOR_GROUPTEXTHOT, m_ColorGroupTextHot);
  DDX_Control(pDX, IDC_COLOR_GROUPTEXT, m_ColorGroupText);

  DDX_Control(pDX, IDC_SPIN3, m_VMargin);
  DDX_Control(pDX, IDC_SPIN4, m_HMargin);
  DDX_Control(pDX, IDC_SPIN5, m_GroupSpacing);
  DDX_Control(pDX, IDC_SPIN6, m_TaskSpacing);
  DDX_Control(pDX, IDC_SPIN7, m_CaptionHeight);
  DDX_Control(pDX, IDC_SPIN8, m_TaskOffset);
  DDX_Control(pDX, IDC_SPIN9, m_IconOffset);

  DDX_Radio(pDX, IDC_RADIO_WIN, m_nVisualManager);
  DDX_Check(pDX, IDC_CHECK_WRAPTASKS, m_bWrapTasks);
  DDX_Check(pDX, IDC_CHECK_WRAPLABELS, m_bWrapLabels);
  DDX_Check(pDX, IDC_CHECK_NAVTOOLBAR, m_bNavToolbar);
  DDX_Check(pDX, IDC_CHECK_HISTBUTTONS, m_bMenuButtons);
  DDX_Check(pDX, IDC_CHECK_HICOLORIMAGES, m_bHicolorImages);
  DDX_Check(pDX, IDC_CHECK_COLLAPSEGROUPS, m_bCollapseGroups);
  DDX_Check(pDX, IDC_CHECK_MARGINS, m_bCustomizeMargins);
  DDX_Check(pDX, IDC_CHECK_SCROLLBUTTONS, m_bScrollButtons);
  DDX_Check(pDX, IDC_CHECK_ANIMATION, m_bAnimation);
  DDX_Check(pDX, IDC_CHECK_CAPTIONICON, m_bCaptionIcon);

  DDX_Text(pDX, IDC_EDIT_VMARGIN, m_nVMargin);
  DDV_MinMaxInt(pDX, m_nVMargin, 0, 25);
  DDX_Text(pDX, IDC_EDIT_HMARGIN, m_nHMargin);
  DDV_MinMaxInt(pDX, m_nHMargin, 0, 25);
  DDX_Text(pDX, IDC_EDIT_GROUPSPACING, m_nGroupSpacing);
  DDV_MinMaxInt(pDX, m_nGroupSpacing, 0, 25);
  DDX_Text(pDX, IDC_EDIT_TASKSPACING, m_nTaskSpacing);
  DDV_MinMaxInt(pDX, m_nTaskSpacing, 0, 25);
  DDX_Text(pDX, IDC_EDIT_CAPTIONHEIGHT, m_nCaptionHeight);
  DDV_MinMaxInt(pDX, m_nCaptionHeight, 0, 30);
  DDX_Text(pDX, IDC_EDIT_TASKOFFSET, m_nTaskOffset);
  DDV_MinMaxInt(pDX, m_nTaskOffset, 0, 20);
  DDX_Text(pDX, IDC_EDIT_ICONOFFSET, m_nIconOffset);
  DDV_MinMaxInt(pDX, m_nIconOffset, 0, 25);
}

CTasksPaneDoc * CTasksPaneView::GetDocument ( ) [inline]

Definition at line 109 of file TasksPaneView.h.

   { return (CTasksPaneDoc*)m_pDocument; }

CTaskPane * CTasksPaneView::GetTasksPane ( )

Definition at line 261 of file TasksPaneView.cpp.

{
  CMainFrame* pMainFrm = ((CMainFrame*) AfxGetMainWnd ());
  ASSERT_VALID (pMainFrm);

  return &(pMainFrm->m_wndTaskPane);
}

void CTasksPaneView::OnAnimation ( ) [protected]

Definition at line 370 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->EnableAnimation (m_bAnimation);
}

void CTasksPaneView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 208 of file TasksPaneView.cpp.

{
  // TODO: add extra initialization before printing
}

void CTasksPaneView::OnCaptionicon ( ) [protected]

Definition at line 531 of file TasksPaneView.cpp.

{
  BOOL bOld = m_bCaptionIcon;

  UpdateData ();

  if (bOld == m_bCaptionIcon)
  {
    return;
  }

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  // --------------------------------------
  // Remove all groups from the first page:
  // --------------------------------------
  pTaskPane->RemoveAllGroups (0);

  // -----------------
  // Add groups again:
  // -----------------
  if (m_bCaptionIcon)
  {
    HICON hIcon = (HICON)LoadImage(AfxGetInstanceHandle (),
                           MAKEINTRESOURCE (IDI_NOTE),
                           IMAGE_ICON,
                           0,
                           0,
                           LR_SHARED);
    pTaskPane->m_nDocumentsGroup = pTaskPane->AddGroup (0, _T("Open a document"), FALSE, TRUE, hIcon);
  }
  else
  {
    pTaskPane->m_nDocumentsGroup = pTaskPane->AddGroup (0, _T("Open a document"), FALSE, TRUE);
  }

  // Add MRU list:
  pTaskPane->AddMRUFilesList (pTaskPane->m_nDocumentsGroup);
  pTaskPane->AddTask (pTaskPane->m_nDocumentsGroup, _T("More Documents..."), 0, ID_FILE_OPEN);

  int nPage1Gr2 = pTaskPane->AddGroup (0, _T("Custom group"));
  pTaskPane->m_nUserColorGroup = nPage1Gr2;

  pTaskPane->AddTask (nPage1Gr2, _T("Task 1"), 1, ID_TASK1);
  pTaskPane->m_nUserColorTask =
    pTaskPane->AddTask (nPage1Gr2, _T("Task 2"), 2, ID_TASK2);
  pTaskPane->AddTask (nPage1Gr2, _T("Task 3"), 3, ID_TASK3);
  pTaskPane->AddSeparator (nPage1Gr2);
  pTaskPane->AddTask (nPage1Gr2, _T("Task 4"), 4, ID_TASK4);
  pTaskPane->AddTask (nPage1Gr2, _T("Task 5"), 5, ID_TASK5);
  pTaskPane->AddTask (nPage1Gr2, _T("Long task's name to see words wrap feature"), 6, ID_TASK6);

  int nPage1Gr3 = pTaskPane->AddGroup (0, _T("Details"), TRUE);
  pTaskPane->AddLabel (nPage1Gr3, _T("The Label contains text, which can be displayed in several lines. \n\nText can include line breaking characters \'\\n\' and &underline markers \'&&\'"));

  // Set custom colors again:
  OnColorGrouptext();
  OnColorGrouptexthot();
  OnColorTasktext();
  OnColorTasktexthot();

  pTaskPane->RecalcLayout ();
}

void CTasksPaneView::OnChangeMargins ( ) [protected]

Definition at line 491 of file TasksPaneView.cpp.

{
  if (m_ColorTaskTextHot.GetSafeHwnd () == NULL)
  {
    return;
  }

  if (!UpdateData())
  {
    return;
  }

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  if (m_bCustomizeMargins)
  {
    pTaskPane->SetVertMargin (m_nVMargin);
    pTaskPane->SetHorzMargin (m_nHMargin);
    pTaskPane->SetGroupVertOffset (m_nGroupSpacing);
    pTaskPane->SetTasksIconVertOffset (m_nTaskSpacing);
    pTaskPane->SetGroupCaptionHeight (m_nCaptionHeight);
    pTaskPane->SetTasksHorzOffset (m_nTaskOffset);
    pTaskPane->SetTasksIconHorzOffset (m_nIconOffset);
  }
  else
  {
    // use visual manager's default values
    pTaskPane->SetVertMargin (-1);
    pTaskPane->SetHorzMargin (-1);
    pTaskPane->SetGroupVertOffset (-1);
    pTaskPane->SetTasksIconVertOffset (-1);
    pTaskPane->SetGroupCaptionHeight (-1);
    pTaskPane->SetTasksHorzOffset (-1);
    pTaskPane->SetTasksIconHorzOffset (-1);
  }

  pTaskPane->RecalcLayout ();
}

void CTasksPaneView::OnCollapsegroups ( ) [protected]

Definition at line 380 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->EnableGroupCollapse (m_bCollapseGroups);
  pTaskPane->RecalcLayout ();
}

void CTasksPaneView::OnColorGrouptext ( ) [protected]

Definition at line 391 of file TasksPaneView.cpp.

{
  UpdateData ();

  COLORREF clrTextHot = m_ColorGroupTextHot.GetColor ();  // (COLORREF)-1, if default
  COLORREF clrText = m_ColorGroupText.GetColor ();    // (COLORREF)-1, if default

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->SetGroupTextColor (pTaskPane->m_nUserColorGroup, clrText, clrTextHot);
}

void CTasksPaneView::OnColorGrouptexthot ( ) [protected]

Definition at line 404 of file TasksPaneView.cpp.

{
  UpdateData ();

  COLORREF clrTextHot = m_ColorGroupTextHot.GetColor ();  // (COLORREF)-1, if default
  COLORREF clrText = m_ColorGroupText.GetColor ();    // (COLORREF)-1, if default

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->SetGroupTextColor (pTaskPane->m_nUserColorGroup, clrText, clrTextHot);
}

void CTasksPaneView::OnColorTasktext ( ) [protected]

Definition at line 417 of file TasksPaneView.cpp.

{
  UpdateData ();

  COLORREF clrTextHot = m_ColorTaskTextHot.GetColor (); // (COLORREF)-1, if default
  COLORREF clrText = m_ColorTaskText.GetColor ();     // (COLORREF)-1, if default

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->SetTaskTextColor (pTaskPane->m_nUserColorGroup, pTaskPane->m_nUserColorTask, clrText, clrTextHot);
}

void CTasksPaneView::OnColorTasktexthot ( ) [protected]

Definition at line 430 of file TasksPaneView.cpp.

{
  UpdateData ();

  COLORREF clrTextHot = m_ColorTaskTextHot.GetColor (); // (COLORREF)-1, if default
  COLORREF clrText = m_ColorTaskText.GetColor ();     // (COLORREF)-1, if default

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->SetTaskTextColor (pTaskPane->m_nUserColorGroup, pTaskPane->m_nUserColorTask, clrText, clrTextHot);
}

void CTasksPaneView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 247 of file TasksPaneView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CTasksPaneView::OnDestroy ( void ) [protected]

Definition at line 252 of file TasksPaneView.cpp.

{
  UpdateData ();

  theApp.WriteInt (_T("VisualManager"), m_nVisualManager);

  CFormView::OnDestroy();
}

void CTasksPaneView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 213 of file TasksPaneView.cpp.

{
  // TODO: add cleanup after printing
}

void CTasksPaneView::OnFilePrintPreview ( ) [protected]

Definition at line 197 of file TasksPaneView.cpp.

{
  AFXPrintPreview (this);
}

void CTasksPaneView::OnHicolorimages ( ) [protected]

Definition at line 338 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  CWindowDC dc (NULL);
  int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);
  if (m_bHicolorImages && (nBitsPerPixel > 16))
  {
    pTaskPane->EnableNavigationToolbar (TRUE, IDB_TASKPANE_TOOLBAR, CSize (16, 16));
  }
  else
  {
    pTaskPane->EnableNavigationToolbar (TRUE);
  }

  pTaskPane->UpdateToolbar ();
}

void CTasksPaneView::OnHistbuttons ( ) [protected]

Definition at line 327 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->EnableHistoryMenuButtons (m_bMenuButtons);
  pTaskPane->RecalcLayout ();
}

void CTasksPaneView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 148 of file TasksPaneView.cpp.

{
  // There is only one view ever, so it only needs to do the initial
  // update once--otherwise the application is  resized needlessly.
  static BOOL bUpdatedOnce = FALSE;
  if (bUpdatedOnce)
    return;
  bUpdatedOnce = TRUE;

  CFormView::OnInitialUpdate();
  GetParentFrame()->RecalcLayout();
  ResizeParentToFit();

  // Create color pickers:
  m_ColorTaskTextHot.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
  m_ColorTaskTextHot.EnableOtherButton (_T("Other"));
  m_ColorTaskTextHot.SetColor ((COLORREF)-1);

  m_ColorTaskText.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
  m_ColorTaskText.EnableOtherButton (_T("Other"));
  m_ColorTaskText.SetColor ((COLORREF)-1);

  m_ColorGroupTextHot.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
  m_ColorGroupTextHot.EnableOtherButton (_T("Other"));
  m_ColorGroupTextHot.SetColor ((COLORREF)-1);

  m_ColorGroupText.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
  m_ColorGroupText.EnableOtherButton (_T("Other"));
  m_ColorGroupText.SetColor ((COLORREF)-1);

  OnMargins();
  GetDlgItem (IDC_CHECK_HISTBUTTONS)->EnableWindow (m_bNavToolbar);

  CWindowDC dc (NULL);
  int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);
  GetDlgItem (IDC_CHECK_HICOLORIMAGES)->EnableWindow (m_bNavToolbar && (nBitsPerPixel > 16));

  m_VMargin.SetRange(0, 25);
  m_HMargin.SetRange(0, 25);
  m_GroupSpacing.SetRange(0, 25);
  m_TaskSpacing.SetRange(0, 25);
  m_CaptionHeight.SetRange(0, 30);
  m_TaskOffset.SetRange(0, 20);
  m_IconOffset.SetRange(0, 25);
}

void CTasksPaneView::OnMargins ( ) [protected]

Definition at line 443 of file TasksPaneView.cpp.

{
  UpdateData ();

  GetDlgItem (IDC_EDIT_VMARGIN)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_EDIT_HMARGIN)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_EDIT_GROUPSPACING)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_EDIT_TASKSPACING)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_EDIT_CAPTIONHEIGHT)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_EDIT_TASKOFFSET)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_EDIT_ICONOFFSET)->EnableWindow (m_bCustomizeMargins);

  GetDlgItem (IDC_SPIN3)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_SPIN4)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_SPIN5)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_SPIN6)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_SPIN7)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_SPIN8)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_SPIN9)->EnableWindow (m_bCustomizeMargins);

  GetDlgItem (IDC_STATIC_MARGINS1)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_STATIC_MARGINS2)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_STATIC_MARGINS3)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_STATIC_MARGINS4)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_STATIC_MARGINS5)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_STATIC_MARGINS6)->EnableWindow (m_bCustomizeMargins);
  GetDlgItem (IDC_STATIC_MARGINS7)->EnableWindow (m_bCustomizeMargins);

  if (m_bCustomizeMargins)
  {
    // retrieve visual manager's default values
    m_nVMargin = CMFCVisualManager::GetInstance ()->GetTasksPaneVertMargin ();
    m_nHMargin = CMFCVisualManager::GetInstance ()->GetTasksPaneHorzMargin ();
    m_nGroupSpacing = CMFCVisualManager::GetInstance ()->GetTasksPaneGroupVertOffset ();
    m_nTaskSpacing = CMFCVisualManager::GetInstance ()->GetTasksPaneIconVertOffset ();
    m_nCaptionHeight = CMFCVisualManager::GetInstance ()->GetTasksPaneGroupCaptionHeight();
    m_nTaskOffset = CMFCVisualManager::GetInstance ()->GetTasksPaneTaskHorzOffset();
    m_nIconOffset = CMFCVisualManager::GetInstance ()->GetTasksPaneIconHorzOffset();

    UpdateData (FALSE);
  }
  else
  {
    // reset visual manager's default values
    OnChangeMargins ();
  }
}

void CTasksPaneView::OnNavtoolbar ( ) [protected]

Definition at line 303 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  CWindowDC dc (NULL);
  int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);
  if (m_bHicolorImages && (nBitsPerPixel > 16))
  {
    pTaskPane->EnableNavigationToolbar (m_bNavToolbar, IDB_TASKPANE_TOOLBAR, CSize (16, 16));
  }
  else
  {
    pTaskPane->EnableNavigationToolbar (m_bNavToolbar);
  }

  pTaskPane->RecalcLayout ();

  GetDlgItem (IDC_CHECK_HISTBUTTONS)->EnableWindow (m_bNavToolbar);
  GetDlgItem (IDC_CHECK_HICOLORIMAGES)->EnableWindow (m_bNavToolbar && (nBitsPerPixel > 16));
}

BOOL CTasksPaneView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 202 of file TasksPaneView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CTasksPaneView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 218 of file TasksPaneView.cpp.

{
  // TODO: add customized printing code here
}

void CTasksPaneView::OnScrollbuttons ( ) [protected]

Definition at line 359 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->EnableScrollButtons (m_bScrollButtons);
  pTaskPane->RecalcLayout ();
}

void CTasksPaneView::OnVisualManager ( ) [protected]

Definition at line 269 of file TasksPaneView.cpp.

{
  UpdateData ();

  OnChangeMargins ();

  CMainFrame* pMainFrm = ((CMainFrame*) AfxGetMainWnd ());
  ASSERT_VALID (pMainFrm);

  pMainFrm->OnAppLook (ID_VIEW_APPLOOK_2000 + m_nVisualManager);
}

void CTasksPaneView::OnWraplabels ( ) [protected]

Definition at line 292 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->EnableWrapLabels (m_bWrapLabels);
  pTaskPane->RecalcLayout ();
}

void CTasksPaneView::OnWraptasks ( ) [protected]

Definition at line 281 of file TasksPaneView.cpp.

{
  UpdateData ();

  CTaskPane* pTaskPane = GetTasksPane ();
  ASSERT_VALID (pTaskPane);

  pTaskPane->EnableWrapTasks (m_bWrapTasks);
  pTaskPane->RecalcLayout ();
}

BOOL CTasksPaneView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 140 of file TasksPaneView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CFormView::PreCreateWindow(cs);
}

Member Data Documentation

BOOL CTasksPaneView::m_bAnimation

Definition at line 46 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bCaptionIcon

Definition at line 47 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bCollapseGroups

Definition at line 43 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bCustomizeMargins

Definition at line 44 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bHicolorImages

Definition at line 42 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bMenuButtons

Definition at line 41 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bNavToolbar

Definition at line 40 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bScrollButtons

Definition at line 45 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bWrapLabels

Definition at line 39 of file TasksPaneView.h.

BOOL CTasksPaneView::m_bWrapTasks

Definition at line 38 of file TasksPaneView.h.

CSpinButtonCtrl CTasksPaneView::m_CaptionHeight

Definition at line 32 of file TasksPaneView.h.

CMFCColorButton CTasksPaneView::m_ColorGroupText

Definition at line 26 of file TasksPaneView.h.

CMFCColorButton CTasksPaneView::m_ColorGroupTextHot

Definition at line 25 of file TasksPaneView.h.

CMFCColorButton CTasksPaneView::m_ColorTaskText

Definition at line 24 of file TasksPaneView.h.

CMFCColorButton CTasksPaneView::m_ColorTaskTextHot

Definition at line 23 of file TasksPaneView.h.

CSpinButtonCtrl CTasksPaneView::m_GroupSpacing

Definition at line 30 of file TasksPaneView.h.

CSpinButtonCtrl CTasksPaneView::m_HMargin

Definition at line 29 of file TasksPaneView.h.

CSpinButtonCtrl CTasksPaneView::m_IconOffset

Definition at line 34 of file TasksPaneView.h.

int CTasksPaneView::m_nCaptionHeight

Definition at line 53 of file TasksPaneView.h.

int CTasksPaneView::m_nGroupSpacing

Definition at line 51 of file TasksPaneView.h.

int CTasksPaneView::m_nHMargin

Definition at line 50 of file TasksPaneView.h.

int CTasksPaneView::m_nIconOffset

Definition at line 55 of file TasksPaneView.h.

int CTasksPaneView::m_nTaskOffset

Definition at line 54 of file TasksPaneView.h.

int CTasksPaneView::m_nTaskSpacing

Definition at line 52 of file TasksPaneView.h.

int CTasksPaneView::m_nVisualManager

Definition at line 36 of file TasksPaneView.h.

int CTasksPaneView::m_nVMargin

Definition at line 49 of file TasksPaneView.h.

CSpinButtonCtrl CTasksPaneView::m_TaskOffset

Definition at line 33 of file TasksPaneView.h.

CSpinButtonCtrl CTasksPaneView::m_TaskSpacing

Definition at line 31 of file TasksPaneView.h.

CSpinButtonCtrl CTasksPaneView::m_VMargin

Definition at line 28 of file TasksPaneView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/TasksPane/TasksPaneView.h
  • vc2008fp/TasksPane/TasksPaneView.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTBComboBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions | Static Protected Member Functions | Protected Attributes

CTBComboBox Class Reference

#include "combobar.h"

List of all members.

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Static Protected Member Functions

static int CALLBACK | FontEnumProc (const LOGFONT *pLogFont, const TEXTMETRIC *pTextMetric, DWORD type, LPARAM pDestLogFont)

Protected Attributes

CFont | m_font

Detailed Description

Definition at line 15 of file combobar.h.

Member Function Documentation

int CALLBACK CTBComboBox::FontEnumProc | ( | const LOGFONT * | pLogFont,
 |  | const TEXTMETRIC * | pTextMetric,
 |  | DWORD | type,
 |  | LPARAM | pDestLogFont |
 | ) |  |  | [static, protected]

Definition at line 112 of file combobar.cpp.

{
  memcpy_s((BYTE*)pDestLogFont, sizeof(LOGFONT), pLogFont, sizeof(LOGFONT));
  return FALSE; // return the first font in the family(i.e. smallest).
}

int CTBComboBox::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 91 of file combobar.cpp.

{
  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;
}

Member Data Documentation

CFont CTBComboBox::m_font [protected]

Definition at line 19 of file combobar.h.

The documentation for this class was generated from the following files:
  • general/npp/combobar.h
  • general/npp/combobar.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTCBindHost Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Protected Attributes

CTCBindHost Class Reference

#include "BindHost.H"

List of all members.

Public Member Functions

CTCBindHost ()
~CTCBindHost ()
STDMETHOD() | CreateMoniker (LPOLESTR pszName, IBindCtx *pBindCtx, IMoniker **ppMoniker, DWORD dwReserved)
STDMETHOD() | MonikerBindToObject (IMoniker *pMoniker, IBindCtx *pBindCtx, IBindStatusCallback *pBSC, REFIID iid, void **ppObject)
STDMETHOD() | MonikerBindToStorage (IMoniker *pMoniker, IBindCtx *pBindCtx, IBindStatusCallback *pBSC, REFIID iid, void **ppObject)
STDMETHOD() | QueryInterface (REFIID iid, void **ppInterface)
STDMETHOD_ (ULONG, AddRef)()
STDMETHOD_ (ULONG, Release)()

Static Public Member Functions

static HRESULT | CreateInstance (REFIID iid, void **ppObject)

Protected Attributes

ULONG | m_nRefCount

Detailed Description

Definition at line 10 of file BindHost.H.

Constructor & Destructor Documentation

CTCBindHost::CTCBindHost ( )

Definition at line 19 of file BindHost.Cpp.

                         :
   m_nRefCount( 0 )
{
}

CTCBindHost::~CTCBindHost ( )

Definition at line 24 of file BindHost.Cpp.

{
}

Member Function Documentation

HRESULT CTCBindHost::CreateInstance | ( | REFIID | iid,
 |  | void ** | ppObject |
 | ) |  |  | [static]

Definition at line 28 of file BindHost.Cpp.

{
   CTCBindHost* pObject;
   HRESULT hResult;

   if( ppObject == NULL )
   {
    return( E_POINTER );
   }
   *ppObject = NULL;

#pragma warning(push)
#pragma warning(disable: 6014)
   /* prefast noise VSW 489981 */
   pObject = new CTCBindHost;

   hResult = pObject->QueryInterface( iid, ppObject );
   if( FAILED( hResult ) )
   {
    delete pObject;
    return( hResult );
   }

   ASSERT( *ppObject != NULL );

   return( S_OK );
#pragma warning(pop)
}

STDMETHODIMP CTCBindHost::CreateMoniker | ( | LPOLESTR | pszName,
 |  | IBindCtx * | pBindCtx,
 |  | IMoniker ** | ppMoniker,
 |  | DWORD | dwReserved
 | ) |  |

Definition at line 105 of file BindHost.Cpp.

{
   HRESULT hResult;

   (void)pBindCtx;
   (void)dwReserved;

   if( ppMoniker == NULL )
   {
    return( E_POINTER );
   }
   *ppMoniker = NULL;

   if( pszName == NULL )
   {
    return( E_INVALIDARG );
   }

   hResult = CreateURLMoniker( NULL, pszName, ppMoniker );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   ASSERT( *ppMoniker != NULL );

   return( S_OK );
}

STDMETHODIMP CTCBindHost::MonikerBindToObject | ( | IMoniker * | pMoniker,
 |  | IBindCtx * | pBindCtx,
 |  | IBindStatusCallback * | pBSC,
 |  | REFIID | iid,
 |  | void ** | ppObject
 | ) |  |

Definition at line 135 of file BindHost.Cpp.

{
   (void)pMoniker;
   (void)pBindCtx;
   (void)pBSC;
   (void)iid;

   if( ppObject == NULL )
   {
    return( E_POINTER );
   }
   *ppObject = NULL;

   return( E_NOTIMPL );
}

STDMETHODIMP CTCBindHost::MonikerBindToStorage | ( | IMoniker * | pMoniker,
 |  | IBindCtx * | pBindCtx,
 |  | IBindStatusCallback * | pBSC,
 |  | REFIID | iid,
 |  | void ** | ppObject
 | ) |  |

Definition at line 152 of file BindHost.Cpp.

{
   HRESULT hResult;
   IBindCtxPtr pNewBindCtx;

   TCTrace( TRACELEVEL_NORMAL, "IBindHost::MonikerBindToStorage\n" );

   if( ppObject == NULL )
   {
    return( E_POINTER );
   }
   *ppObject = NULL;

   if( pBindCtx != NULL )
   {
    pNewBindCtx = pBindCtx;
    if( pBSC )
    {
     hResult = RegisterBindStatusCallback( pBindCtx, pBSC, NULL, 0 );
     if( FAILED( hResult ) )
     {
      return( hResult );
     }
    }
   }
   else
   {
    if( pBSC )
    {
     hResult = CreateAsyncBindCtx( 0, pBSC, NULL, &pNewBindCtx );
     if( FAILED( hResult ) )
     {
      return( hResult );
     }
    }
    else
    {
     hResult = CreateBindCtx( 0, &pNewBindCtx );
     if( FAILED( hResult ) )
     {
      return( hResult );
     }
    }
   }
   ASSERT( pNewBindCtx != NULL );

   return( pMoniker->BindToStorage( pNewBindCtx, NULL, iid, ppObject ) );
}

STDMETHODIMP CTCBindHost::QueryInterface | ( | REFIID | iid,
 |  | void ** | ppInterface
 | ) |  |

Definition at line 82 of file BindHost.Cpp.

{
   if( ppInterface == NULL )
   {
    return( E_POINTER );
   }
   *ppInterface = NULL;

   if( IsEqualIID( iid, IID_IUnknown ) || IsEqualIID( iid, IID_IBindHost ) )
   {
    *ppInterface = (IBindHost*)this;
    AddRef();
    return( S_OK );
   }

   return( E_NOINTERFACE );
}

CTCBindHost::STDMETHOD_ | ( | ULONG | ,
 |  | Release |
 | ) |  |
CTCBindHost::STDMETHOD_ | ( | ULONG | ,
 |  | AddRef |
 | ) |  |

Member Data Documentation

ULONG CTCBindHost::m_nRefCount [protected]

Definition at line 31 of file BindHost.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/BindHost.H
  • ole/TstCon/BindHost.Cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTCCommandLineInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CTCCommandLineInfo Class Reference

#include "TstCon.H"

List of all members.

Public Member Functions

CTCCommandLineInfo (CTCOptions *pOptions)
void | ParseInterfaceFlag (LPCTSTR pszParam)
void | ParseOptionFlag (LPCTSTR pszParam)
void | ParseParam (LPCTSTR pszParam, BOOL tFlag, BOOL tLast)
void | ParseServiceFlag (LPCTSTR pszParam)

Protected Attributes

CTCOptions * m_pOptions
BOOL | m_tExpectingDSMFile
BOOL | m_tExpectingLogFileName
BOOL | m_tExpectingProgID

Detailed Description

Definition at line 54 of file TstCon.H.

Constructor & Destructor Documentation

CTCCommandLineInfo::CTCCommandLineInfo ( CTCOptions * pOptions )

Definition at line 36 of file TstCon.Cpp.

                                                             :
   m_pOptions( pOptions ),
   m_tExpectingLogFileName( FALSE ),
   m_tExpectingDSMFile(FALSE),
   m_tExpectingProgID( FALSE )
{
   ASSERT( m_pOptions != NULL );
}

Member Function Documentation

void CTCCommandLineInfo::ParseInterfaceFlag ( LPCTSTR pszParam )

Definition at line 128 of file TstCon.Cpp.

{
   ENSURE( pszParam != NULL );
   ASSERT( pszParam[0] == 'I' );

   if( strncmp( pszParam, _T( "IOleInPlaceSiteEx" ), strlen( _T(
    "IOleInPlaceSiteEx" ) ) ) == 0 )
   {
    switch( pszParam[strlen( _T( "IOleInPlaceSiteEx" ) )] )
    {
    case _T( '+' ):
     m_pOptions->m_tIOleInPlaceSiteEx = TRUE;
     break;

    case _T( '-' ):
     m_pOptions->m_tIOleInPlaceSiteEx = FALSE;
     break;

    default:
     TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
     break;
    }
   }
   else if( strncmp( pszParam, _T( "IOleInPlaceSiteWindowless" ), strlen( _T(
    "IOleInPlaceSiteWindowless" ) ) ) == 0 )
   {
    switch( pszParam[strlen( _T( "IOleInPlaceSiteWindowless" ) )] )
    {
    case _T( '+' ):
     m_pOptions->m_tIOleInPlaceSiteWindowless = TRUE;
     break;

    case _T( '-' ):
     m_pOptions->m_tIOleInPlaceSiteWindowless = FALSE;
     break;

    default:
     TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
     break;
    }
   }
   else if( strncmp( pszParam, _T( "IAdviseSinkEx" ), strlen( _T(
    "IAdviseSinkEx" ) ) ) == 0 )
   {
    switch( pszParam[strlen( _T( "IAdviseSinkEx" ) )] )
    {
    case _T( '+' ):
     m_pOptions->m_tIAdviseSinkEx = TRUE;
     break;

    case _T( '-' ):
     m_pOptions->m_tIAdviseSinkEx = FALSE;
     break;

    default:
     TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
     break;
    }
   }
   else
   {
    TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
   }
}

void CTCCommandLineInfo::ParseOptionFlag ( LPCTSTR pszParam )

Definition at line 193 of file TstCon.Cpp.

{
   BOOL* ptOption;

   ENSURE( pszParam != NULL );
   ASSERT( pszParam[0] == 'O' );

   ptOption = NULL;
   switch( pszParam[1] )
   {
   case _T( 'Q' ):
    ptOption = &m_pOptions->m_tQuickActivation;
    break;

   case _T( 'T' ):
    ptOption = &m_pOptions->m_tTwoPassDrawing;
    break;

   case _T( 'W' ):
    ptOption = &m_pOptions->m_tAllowWindowless;
    break;

   case _T( 'H' ):
    ptOption = &m_pOptions->m_tHonorIgnoreActivateWhenVisible;
    break;

   case _T( 'I' ):
    ptOption = &m_pOptions->m_tUseIPointerInactive;
    break;

   default:
    TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
    break;
   }

   if( ptOption != NULL )
   {
    if( pszParam[2] == _T( '+' ) )
    {
     *ptOption = TRUE;
    }
    else if( pszParam[2] == _T( '-' ) )
    {
     *ptOption = FALSE;
    }
    else
    {
     TCTrace( TRACELEVEL_NORMAL,
      "Command line option %s: expected + or -\n", pszParam );
    }
   }
}

void CTCCommandLineInfo::ParseParam | ( | LPCTSTR | pszParam,
 |  | BOOL | tFlag,
 |  | BOOL | tLast
 | ) |  |

Definition at line 246 of file TstCon.Cpp.

{
   BOOL tHandled;

   TRACE( "%s\n", pszParam );

   tHandled = FALSE;

   if( m_tExpectingLogFileName )
   {
    tHandled = TRUE;
    m_tExpectingLogFileName = FALSE;
    if( tFlag )
    {
     TCTrace( TRACELEVEL_NORMAL, "Bogus log filename\n" );
    }
    else
    {
     m_pOptions->m_strLogFileName = pszParam;
    }
   }
   else if(m_tExpectingDSMFile)
   {
    tHandled = TRUE;
    m_tExpectingDSMFile = FALSE;
    if( tFlag )
    {
     TCTrace( TRACELEVEL_NORMAL, "Bogus dsm filename\n" );
    }
    else
    {
     m_pOptions->m_strDSMFile = pszParam;
    }

   }
   else if( m_tExpectingProgID )
   {
    tHandled = TRUE;
    m_tExpectingProgID = FALSE;
    if( tFlag )
    {
     TCTrace( TRACELEVEL_NORMAL, "Bogus ProgID\n" );
    }
    else
    {
     m_pOptions->m_strProgID = pszParam;
    }
   }
   else
   {
    if( tFlag )
    {
     tHandled = TRUE;
     switch( pszParam[0] )
     {
     case _T( 'C' ):
      if( tLast )
      {
         TCTrace( TRACELEVEL_NORMAL,
          "No ProgID given for /C parameter\n" );
      }
      else
      {
         m_tExpectingProgID = TRUE;
      }
      break;
     case _T( 'D' ):
      if( tLast )
      {
         TCTrace( TRACELEVEL_NORMAL,
          "No filename given for /C parameter\n" );
      }
      else
      {
         m_tExpectingDSMFile = TRUE;
      }
      break;
     case _T( 'I' ):
      ParseInterfaceFlag( pszParam );
      break;

     case _T( 'S' ):
      ParseServiceFlag( pszParam );
      break;

     case _T( 'L' ):
      switch( pszParam[1] )
      {
      case _T( 'n' ):
         m_pOptions->m_iLogType = TCLOG_NULL;
         break;

      case _T( 'o' ):
         m_pOptions->m_iLogType = TCLOG_OUTPUTWINDOW;
         break;

      case _T( 'd' ):
         m_pOptions->m_iLogType = TCLOG_DEBUG;
         break;

      case _T( 'f' ):
         if( tLast )
         {
          TCTrace( 1, "No filename given for /Lf parameter\n" );
         }
         else
         {
          m_tExpectingLogFileName = TRUE;
         }
         break;

      default:
         TCTrace( 1, "Unrecognized command line parameter %s\n",
          pszParam );
         break;
      }
      break;

     case _T( 'O' ):
      ParseOptionFlag( pszParam );
      break;

     case _T( 'U' ):
      switch( pszParam[1] )
      {
      case _T( '-' ):
         m_pOptions->m_tUserMode = FALSE;
         break;

      case _T( '+' ):
         m_pOptions->m_tUserMode = TRUE;
         break;

      default:
         TCTrace( 1, "Unrecognized command line parameter %s\n",
          pszParam );
         break;
      }
      break;

     default:
      tHandled = FALSE;
      break;
     }
    }
   }

   if( !tHandled )
   {
    CCommandLineInfo::ParseParam( pszParam, tFlag, tLast );
   }
}

void CTCCommandLineInfo::ParseServiceFlag ( LPCTSTR pszParam )

Definition at line 88 of file TstCon.Cpp.

{
   BOOL* ptService;
   const TCHAR* pcFlag;

   ENSURE( pszParam != NULL );
   ASSERT( pszParam[0] == 'S' );

   ptService = NULL;
   pcFlag = NULL;
   if( strncmp( pszParam, _T( "SBindHost" ), strlen( _T( "SBindHost" ) ) ) ==
    0 )
   {
    ptService = &m_pOptions->m_tSBindHost;
    pcFlag = &pszParam[strlen( _T( "SBindHost" ) )];
   }

   if( ptService == NULL )
   {
    TCTrace( TRACELEVEL_NORMAL, "Unrecognized command line parameter %s\n",
     pszParam );
   }
   else
   {
    if( *pcFlag == _T( '+' ) )
    {
     *ptService = TRUE;
    }
    else if( *pcFlag == _T( '-' ) )
    {
     *ptService = FALSE;
    }
    else
    {
     TCTrace( TRACELEVEL_NORMAL,
      "Command line option %s: Expected + or -\n", pszParam );
    }
   }
}

Member Data Documentation

CTCOptions* CTCCommandLineInfo::m_pOptions [protected]

Definition at line 66 of file TstCon.H.

BOOL CTCCommandLineInfo::m_tExpectingDSMFile [protected]

Definition at line 69 of file TstCon.H.

BOOL CTCCommandLineInfo::m_tExpectingLogFileName [protected]

Definition at line 67 of file TstCon.H.

BOOL CTCCommandLineInfo::m_tExpectingProgID [protected]

Definition at line 68 of file TstCon.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TstCon.H
  • ole/TstCon/TstCon.Cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTCExtPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CTCExtPage Class Reference

#include "TCExtPg.H"

List of all members.

Public Types

enum | { IDD = IDD_TCEXTPAGE }

Public Member Functions

CTCExtPage ()
STDMETHOD() | Apply ()

Protected Member Functions

LRESULT | OnInitDialog (UINT nMessage, WPARAM wParam, LPARAM lParam, BOOL &bHandled)

Detailed Description

Definition at line 21 of file TCExtPg.H.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 35 of file TCExtPg.H.

{IDD = IDD_TCEXTPAGE};

Constructor & Destructor Documentation

CTCExtPage::CTCExtPage ( ) [inline]

Definition at line 28 of file TCExtPg.H.

  {
    m_dwTitleID = IDS_TITLETCExtPage;
    m_dwHelpFileID = IDS_HELPFILETCExtPage;
    m_dwDocStringID = IDS_DOCSTRINGTCExtPage;
  }

Member Function Documentation

STDMETHODIMP CTCExtPage::Apply ( )

Definition at line 37 of file TCExtPg.Cpp.

{
   UINT iObject;
   BSTR bstrName;

   bstrName = NULL;
   GetDlgItemText( IDC_NAME, bstrName );

  ATLTRACE( _T( "CTCExtPage::Apply\n" ) );
  for( iObject = 0; iObject < m_nObjects; iObject++ )
  {
    CComPtr< ITCExtendedControl > pControl;

    m_ppUnk[iObject]->QueryInterface( IID_ITCExtendedControl,
    (void**)&pControl );
    pControl->put_Name( bstrName );
    pControl.Release();
   }
   SysFreeString( bstrName );

  m_bDirty = FALSE;

  return( S_OK );
}

LRESULT CTCExtPage::OnInitDialog | ( | UINT | nMessage,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | BOOL & | bHandled |
 | ) |  |  | [protected]

Definition at line 17 of file TCExtPg.Cpp.

{

   BSTR bstrName;
   CComQIPtr< ITCExtendedControl, &IID_ITCExtendedControl > pControl;

   pControl = m_ppUnk[0];
   _ASSERTE( pControl != NULL );

   bstrName = NULL;
   pControl->get_Name( &bstrName );
   SetDlgItemText( IDC_NAME, COLE2CT( bstrName ) );
   SysFreeString( bstrName );

   bHandled = TRUE;

   return( FALSE );
}

The documentation for this class was generated from the following files:
  • ole/TstCon/TCProps/TCExtPg.H
  • ole/TstCon/TCProps/TCExtPg.Cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTCOptions Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CTCOptions Class Reference

#include "TstCon.H"

List of all members.

Public Member Functions

CTCOptions ()

Public Attributes

int | m_iLogType
CString | m_strDSMFile
CString | m_strLogFileName
CString | m_strProgID
BOOL | m_tAllowWindowless
BOOL | m_tHonorIgnoreActivateWhenVisible
BOOL | m_tIAdviseSinkEx
BOOL | m_tIOleInPlaceSiteEx
BOOL | m_tIOleInPlaceSiteWindowless
BOOL | m_tQuickActivation
BOOL | m_tSBindHost
BOOL | m_tTwoPassDrawing
BOOL | m_tUseIPointerInactive
BOOL | m_tUserMode

Detailed Description

Definition at line 32 of file TstCon.H.

Constructor & Destructor Documentation

CTCOptions::CTCOptions ( )

Definition at line 20 of file TstCon.Cpp.

                       :
   m_iLogType( TCLOG_OUTPUTWINDOW ),
   m_tUserMode( FALSE ),
   m_tAllowWindowless( TRUE ),
   m_tQuickActivation( TRUE ),
   m_tTwoPassDrawing( TRUE ),
   m_tUseIPointerInactive( TRUE ),
   m_tHonorIgnoreActivateWhenVisible( TRUE ),
   m_tIOleInPlaceSiteEx( TRUE ),
   m_tIOleInPlaceSiteWindowless( TRUE ),
   m_tIAdviseSinkEx( TRUE ),
   m_tSBindHost( TRUE )
{
  m_strDSMFile = _T("");
}

Member Data Documentation

int CTCOptions::m_iLogType

Definition at line 39 of file TstCon.H.

CString CTCOptions::m_strDSMFile

Definition at line 42 of file TstCon.H.

CString CTCOptions::m_strLogFileName

Definition at line 40 of file TstCon.H.

CString CTCOptions::m_strProgID

Definition at line 41 of file TstCon.H.

BOOL CTCOptions::m_tAllowWindowless

Definition at line 43 of file TstCon.H.

BOOL CTCOptions::m_tHonorIgnoreActivateWhenVisible

Definition at line 47 of file TstCon.H.

BOOL CTCOptions::m_tIAdviseSinkEx

Definition at line 50 of file TstCon.H.

BOOL CTCOptions::m_tIOleInPlaceSiteEx

Definition at line 48 of file TstCon.H.

BOOL CTCOptions::m_tIOleInPlaceSiteWindowless

Definition at line 49 of file TstCon.H.

BOOL CTCOptions::m_tQuickActivation

Definition at line 44 of file TstCon.H.

BOOL CTCOptions::m_tSBindHost

Definition at line 51 of file TstCon.H.

BOOL CTCOptions::m_tTwoPassDrawing

Definition at line 45 of file TstCon.H.

BOOL CTCOptions::m_tUseIPointerInactive

Definition at line 46 of file TstCon.H.

BOOL CTCOptions::m_tUserMode

Definition at line 38 of file TstCon.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TstCon.H
  • ole/TstCon/TstCon.Cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTCPropsModule Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTCPropsModule Class Reference

Detailed Description

Definition at line 17 of file TCProps.cpp.

The documentation for this class was generated from the following file:
  • ole/TstCon/TCProps/TCProps.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTCSplitter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTCSplitter Class Reference

#include "TCSplit.H"

List of all members.

Public Member Functions

CTCSplitter ()
virtual | ~CTCSplitter ()
afx_msg HBRUSH | OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor)

Detailed Description

Definition at line 26 of file TCSplit.H.

Constructor & Destructor Documentation

CTCSplitter::CTCSplitter ( )

Definition at line 25 of file TCSplit.Cpp.

{
}

CTCSplitter::~CTCSplitter ( ) [virtual]

Definition at line 29 of file TCSplit.Cpp.

{
}

Member Function Documentation

HBRUSH CTCSplitter::OnCtlColor | ( | CDC * | pDC,
 |  | CWnd * | pWnd,
 |  | UINT | nCtlColor
 | ) |  |

Definition at line 43 of file TCSplit.Cpp.

{
   if( nCtlColor == CTLCOLOR_STATIC )
   {
    return( GetSysColorBrush( COLOR_WINDOW ) );
   }

   return( CSplitterWnd::OnCtlColor( pDC, pWnd, nCtlColor ) );
}

The documentation for this class was generated from the following files:
  • ole/TstCon/TCSplit.H
  • ole/TstCon/TCSplit.Cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTestApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTestApp Class Reference

List of all members.

Public Member Functions

CTestApp ()
DECLARE_MESSAGE_MAP ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 56 of file ctrltest.cpp.

Constructor & Destructor Documentation

CTestApp::CTestApp ( )

Definition at line 68 of file ctrltest.cpp.

{
  // Place all significant initialization in InitInstance
}

Member Function Documentation

CTestApp::DECLARE_MESSAGE_MAP ( )
BOOL CTestApp::InitInstance ( ) [virtual]

Definition at line 82 of file ctrltest.cpp.

{
  CTestWindow* pMainWnd = new CTestWindow;
  if (!pMainWnd->Create(NULL, _T("Control Test App"),
    WS_OVERLAPPEDWINDOW, CFrameWnd::rectDefault, NULL,
    MAKEINTRESOURCE(AFX_IDI_STD_FRAME)/*menu*/))
  {
    delete pMainWnd;
    return FALSE;
  }

  pMainWnd->m_bAutoMenuEnable = FALSE;    // do manual menu enabling
  pMainWnd->SetupMenus();
  pMainWnd->ShowWindow(m_nCmdShow);
  m_pMainWnd = pMainWnd;      // store in CWinApp member
  return TRUE;
}

void CTestApp::OnAppAbout ( )

Definition at line 100 of file ctrltest.cpp.

{
  CDialog(_T("ABOUTBOX")).DoModal();
}

The documentation for this class was generated from the following file:
  • general/ctrltest/ctrltest.cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTestContainer98App Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CTestContainer98App Class Reference

#include "TstCon.H"

List of all members.

Public Member Functions

CTestContainer98App ()
virtual BOOL | InitInstance ()
void | LoadRegistrySettings ()
afx_msg void | OnAppAbout ()
afx_msg void | OnFileRegisterControls ()
afx_msg void | OnOptionsTraceLevelNone ()
afx_msg void | OnOptionsTraceLevelNormal ()
afx_msg void | OnOptionsTraceLevelVerbose ()
afx_msg void | OnUpdateOptionsTraceLevelNone (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOptionsTraceLevelNormal (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOptionsTraceLevelVerbose (CCmdUI *pCmdUI)
void | SaveRegistrySettings ()

Public Attributes

CTCOptions m_options
COleTemplateServer | m_server

Detailed Description

Definition at line 77 of file TstCon.H.

Constructor & Destructor Documentation

CTestContainer98App::CTestContainer98App ( )

Definition at line 421 of file TstCon.Cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
  EnableHtmlHelp();
}

Member Function Documentation

BOOL CTestContainer98App::InitInstance ( ) [virtual]

Definition at line 491 of file TstCon.Cpp.

{
  // Initialize OLE libraries
  if( !AfxOleInit() )
  {
    AfxMessageBox( IDP_OLE_INIT_FAILED );
    return( FALSE );
  }

  AfxEnableControlContainer();

  // Change the registry key under which our settings are stored.
  // You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey( _T( "Microsoft" ) );

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

   LoadRegistrySettings();

  // 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(
    CTestContainer98Doc ), RUNTIME_CLASS( CMainFrame ), RUNTIME_CLASS(
    CTestContainer98View ) );
  pDocTemplate->SetContainerInfo( IDR_TC98TYPE_CNTR_IP );
  AddDocTemplate( pDocTemplate );

  // Connect the COleTemplateServer to the document template.
  //  The COleTemplateServer creates new documents on behalf
  //  of requesting OLE containers by using information
  //  specified in the document template.
  m_server.ConnectTemplate( DOCTEMPLATE_CLSID, pDocTemplate, FALSE );
    // Note: SDI applications register server objects only if /Embedding
    //   or /Automation is present on the command line.

  COleTemplateServer::RegisterAll();

   // Parse command line for standard shell commands, DDE, file open
  CTCCommandLineInfo cmdInfo( &m_options );
  ParseCommandLine( cmdInfo );

  // Check to see if launched as OLE server
  if( cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated )
  {
    // Application was run with /Embedding or /Automation.  Don't show the
    //  main window in this case.
    return( TRUE );
  }

  // When a server application is launched stand-alone, it is a good idea
  //  to update the system registry in case it has been damaged.
  m_server.UpdateRegistry( OAT_DISPATCH_OBJECT );
  COleObjectFactory::UpdateRegistryAll();

  // Dispatch commands specified on the command line
  if( !ProcessShellCommand( cmdInfo ) )
   {
    return( FALSE );
   }

  // The main window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow( SW_SHOW );
  m_pMainWnd->UpdateWindow();

  return( TRUE );
}

void CTestContainer98App::LoadRegistrySettings ( )

Definition at line 445 of file TstCon.Cpp.

{
   m_options.m_tUserMode = GetProfileInt( SETTINGS_KEY, _T( "UserMode" ),
    FALSE );
   m_options.m_tAllowWindowless = GetProfileInt( SETTINGS_KEY, _T(
    "AllowWindowless" ), TRUE );
   m_options.m_tQuickActivation = GetProfileInt( SETTINGS_KEY, _T(
    "QuickActivation" ), TRUE );
   m_options.m_tTwoPassDrawing = GetProfileInt( SETTINGS_KEY, _T(
    "TwoPassDrawing" ), TRUE );
   m_options.m_tHonorIgnoreActivateWhenVisible = GetProfileInt( SETTINGS_KEY,
    _T( "HonorIgnoreActivateWhenVisible" ), TRUE );
   m_options.m_tUseIPointerInactive = GetProfileInt( SETTINGS_KEY, _T(
    "UseIPointerInactive" ), TRUE );
   m_options.m_tIOleInPlaceSiteEx = GetProfileInt( SETTINGS_KEY, _T(
    "IOleInPlaceSiteEx" ), TRUE );
   m_options.m_tIOleInPlaceSiteWindowless = GetProfileInt( SETTINGS_KEY, _T(
    "IOleInPlaceSiteWindowless" ), TRUE );
   m_options.m_tIAdviseSinkEx = GetProfileInt( SETTINGS_KEY, _T(
    "IAdviseSinkEx" ), TRUE );
   m_options.m_tSBindHost = GetProfileInt( SETTINGS_KEY, _T( "SBindHost" ),
    TRUE );
}

void CTestContainer98App::OnAppAbout ( )

Definition at line 608 of file TstCon.Cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CTestContainer98App::OnFileRegisterControls ( )

Definition at line 648 of file TstCon.Cpp.

{
   CRegisterControlsDlg dlg;

   dlg.DoModal();
}

void CTestContainer98App::OnOptionsTraceLevelNone ( )

Definition at line 618 of file TstCon.Cpp.

{
   SetTraceLevel( TRACELEVEL_NONE );
}

void CTestContainer98App::OnOptionsTraceLevelNormal ( )

Definition at line 623 of file TstCon.Cpp.

{
   SetTraceLevel( TRACELEVEL_NORMAL );
}

void CTestContainer98App::OnOptionsTraceLevelVerbose ( )

Definition at line 628 of file TstCon.Cpp.

{
   SetTraceLevel( TRACELEVEL_VERBOSE );
}

void CTestContainer98App::OnUpdateOptionsTraceLevelNone ( CCmdUI * pCmdUI )

Definition at line 633 of file TstCon.Cpp.

{
   pCmdUI->SetRadio( GetTraceLevel() == TRACELEVEL_NONE );
}

void CTestContainer98App::OnUpdateOptionsTraceLevelNormal ( CCmdUI * pCmdUI )

Definition at line 638 of file TstCon.Cpp.

{
   pCmdUI->SetRadio( GetTraceLevel() == TRACELEVEL_NORMAL );
}

void CTestContainer98App::OnUpdateOptionsTraceLevelVerbose ( CCmdUI * pCmdUI )

Definition at line 643 of file TstCon.Cpp.

{
   pCmdUI->SetRadio( GetTraceLevel() == TRACELEVEL_VERBOSE );
}

void CTestContainer98App::SaveRegistrySettings ( )

Definition at line 469 of file TstCon.Cpp.

{
   WriteProfileInt( SETTINGS_KEY, _T( "UserMode" ), m_options.m_tUserMode );
   WriteProfileInt( SETTINGS_KEY, _T( "AllowWindowless" ),
    m_options.m_tAllowWindowless );
   WriteProfileInt( SETTINGS_KEY, _T( "QuickActivation" ),
    m_options.m_tQuickActivation );
   WriteProfileInt( SETTINGS_KEY, _T( "TwoPassDrawing" ),
    m_options.m_tTwoPassDrawing );
   WriteProfileInt( SETTINGS_KEY, _T( "UseIPointerInactive" ),
    m_options.m_tUseIPointerInactive );
   WriteProfileInt( SETTINGS_KEY, _T( "HonorIgnoreActivateWhenVisible" ),
    m_options.m_tHonorIgnoreActivateWhenVisible );
   WriteProfileInt( SETTINGS_KEY, _T( "IOleInPlaceSiteEx" ),
    m_options.m_tIOleInPlaceSiteEx );
   WriteProfileInt( SETTINGS_KEY, _T( "IOleInPlaceSiteWindowless" ),
    m_options.m_tIOleInPlaceSiteWindowless );
   WriteProfileInt( SETTINGS_KEY, _T( "IAdviseSinkEx" ),
    m_options.m_tIAdviseSinkEx );
   WriteProfileInt( SETTINGS_KEY, _T( "SBindHost" ), m_options.m_tSBindHost );
}

Member Data Documentation

CTCOptions CTestContainer98App::m_options

Definition at line 93 of file TstCon.H.

COleTemplateServer CTestContainer98App::m_server

Definition at line 90 of file TstCon.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TstCon.H
  • ole/TstCon/TstCon.Cpp
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTestContainer98Doc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

CTestContainer98Doc Class Reference

#include "TCDoc.H"

List of all members.

Public Member Functions

virtual | ~CTestContainer98Doc ()
int | AddAmbientProperty (DISPID dispid, LPCTSTR pszName, const VARIANT &var, int vti)
CTestContainer98Item * | AddControl (REFCLSID clsid, LPCTSTR pszName, REFIID iidPersistanceMedium=IID_NULL, IUnknown *pPersistanceMedium=NULL)
virtual void | AddItem (CDocItem *pItem)
void | BringToFront (CDocItem *pItem)
virtual BOOL | CanCloseFrame (CFrameWnd *pFrame)
BOOL | CanWindowlessActivate () const
void | CreateUniqueItemName (CTestContainer98Item *pItem, LPCTSTR pszBaseName, CString &strUniqueName)
virtual void | DeleteContents ()
CAmbientProperty * | FindAmbientProperty (DISPID dispid)
CAmbientProperty * | FindAmbientProperty (LPCOLESTR pszName)
POSITION | FindItem (CDocItem *pItem) const
CAmbientProperty * | GetAmbientProperty (int iProp)
CLog * | GetLog () const
CTestContainer98Item * | GetNextTabItem (CTestContainer98Item *pItem) const
int | GetNumAmbientProperties () const
CEdit * | GetOutputEditControl ()
CDocItem * | GetPrevItem (POSITION &pos) const
POSITION | GetTailPosition () const
BOOL | GetUserMode () const
CTestContainer98View * | GetView () const
BOOL | HonorIgnoreActivateWhenVisible () const
virtual BOOL | OnNewDocument ()
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual BOOL | OnSaveDocument (LPCTSTR lpszPathName)
void | PreCloseFrame (CFrameWnd *pFrame)
virtual void | RemoveItem (CDocItem *pItem)
void | RunAutomationScript (LPCTSTR szScriptFile)
void | SendToBack (CDocItem *pItem)
virtual void | Serialize (CArchive &ar)
void | SetItemTabOrder (CTestContainer98Item *pItem, int iTabOrder)
void | SetUserMode (BOOL tUserMode)
BOOL | SupportsInterface (REFIID iid)
BOOL | SupportsService (REFGUID sid)
BOOL | UseIPointerInactive () const
BOOL | UseQuickActivation () const
BOOL | UseSlowDrawing () const
BOOL | UseTwoPassDrawing () const

Protected Member Functions

CTestContainer98Doc ()
void | BroadcastAmbientPropertyChange (DISPID dispid)
void | Cleanup ()
afx_msg LPDISPATCH | FindControl (LPCTSTR pszName)
void | FireOnNewControl (IDispatch *pControl)
BOOL | GetDispatchIID (IID *piid)
afx_msg LPDISPATCH | GetPrimarySelection ()
CScriptManager * | GetScriptManager (BOOL tCreate=TRUE)
HRESULT | InitDefaultAmbientProperties ()
BOOL | Initialize ()
HRESULT | InitScriptManager ()
afx_msg LPDISPATCH | InsertControl (LPCTSTR pszProgID, LPCTSTR pszName)
afx_msg void | Log (LPCTSTR pszMessage)
afx_msg void | OnContainerAmbientProperties ()
afx_msg void | OnContainerInfo ()
afx_msg void | OnContainerOptions ()
afx_msg void | OnContainerTabOrder ()
afx_msg void | OnEditDeleteAll ()
afx_msg void | OnOptionsFreezeEvents ()
afx_msg void | OnOptionsLogging ()
afx_msg void | OnOptionsSlowDrawing ()
afx_msg void | OnOptionsTwoPassDrawing ()
afx_msg void | OnRunMacro ()
afx_msg void | OnToolsMacros ()
afx_msg void | OnUpdateEditDeleteAll (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOptionsFreezeEvents (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOptionsSlowDrawing (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOptionsTwoPassDrawing (CCmdUI *pCmdUI)
virtual BOOL | SaveModified ()
afx_msg void | SetPrimarySelection (LPDISPATCH newValue)

Protected Attributes

CTypedPtrArray< CObArray,
CAmbientProperty * > 		m_apAmbientProperties
FONTDESC | m_descFont
CTypedPtrList< CObList,
CTestContainer98Item * > 		m_lpTabOrder
IActiveScriptPtr | m_pActiveScript
IActiveScriptParsePtr | m_pActiveScriptParse
CFontHolder * | m_pFontHolder
CLog * m_pLog
CScriptManager * m_pScriptManager
IStoragePtr | m_pStorage
IStreamPtr | m_pStream
CString | m_strDirectory
BOOL | m_tAllowWindowless
BOOL | m_tFreezeEvents
BOOL | m_tHonorIgnoreActivateWhenVisible
BOOL | m_tIAdviseSinkEx
BOOL | m_tIOleInPlaceSiteEx
BOOL | m_tIOleInPlaceSiteWindowless
BOOL | m_tSBindHost
BOOL | m_tSlowDrawing
BOOL | m_tTwoPassDrawing
BOOL | m_tUseIPointerInactive
BOOL | m_tUseQuickActivation
BOOL | m_tUserMode

Friends

class | CTestContainer98Item

Detailed Description

Definition at line 22 of file TCDoc.H.

Constructor & Destructor Documentation

CTestContainer98Doc::CTestContainer98Doc ( ) [protected]

Definition at line 77 of file TCDoc.Cpp.

                                         :
   m_pFontHolder( NULL ),
   m_tUserMode( FALSE ),
   m_tFreezeEvents( FALSE ),
   m_tAllowWindowless( TRUE ),
   m_tTwoPassDrawing( TRUE ),
   m_tSlowDrawing( FALSE ),
   m_tHonorIgnoreActivateWhenVisible( TRUE ),
   m_tUseIPointerInactive( TRUE ),
   m_tUseQuickActivation( TRUE ),
   m_tIOleInPlaceSiteWindowless( TRUE ),
   m_tIOleInPlaceSiteEx( TRUE ),
   m_tIAdviseSinkEx( TRUE ),
   m_tSBindHost( TRUE ),
   m_pLog( NULL ),
   m_pScriptManager( NULL )
{
   m_descFont.lpstrName = NULL;

  // Use OLE compound files
  EnableCompoundFile();

   EnableConnections();

  EnableAutomation();

  AfxOleLockApp();
}

CTestContainer98Doc::~CTestContainer98Doc ( ) [virtual]

Definition at line 106 of file TCDoc.Cpp.

{
   Cleanup();

  AfxOleUnlockApp();
}

Member Function Documentation

int CTestContainer98Doc::AddAmbientProperty | ( | DISPID | dispid,
 |  | LPCTSTR | pszName,
 |  | const VARIANT & | var,
 |  | int | vti
 | ) |  |

Definition at line 558 of file TCDoc.Cpp.

{
   CAmbientProperty* pProp;
   int iProp;

   pProp = new CAmbientProperty( dispid, pszName, var, vti );
   if( pProp == NULL )
   {
    AfxThrowMemoryException();
   }

   iProp = (int)m_apAmbientProperties.Add( pProp );

   return( iProp );
}

CTestContainer98Item * CTestContainer98Doc::AddControl | ( | REFCLSID | clsid,
 |  | LPCTSTR | pszName,
 |  | REFIID | iidPersistanceMedium = IID_NULL,
 |  | IUnknown * | pPersistanceMedium = NULL
 | ) |  |

Definition at line 1151 of file TCDoc.Cpp.

{
   CTestContainer98Item* pItem;

   pItem = NULL;
   try
   {
    pItem = new CTestContainer98Item( this );
    ASSERT_VALID( pItem );

    if( !pItem->CreateOrLoad( clsid, pszName, iidPersistanceMedium,
     pPersistanceMedium ) )
    {
     AfxThrowOleException( E_FAIL );
    }
    ASSERT_VALID( pItem );

    pItem->InvalidateItem();
   }
   catch( ... )
   {
    ENSURE( pItem != NULL );
    pItem->Delete();

    throw;
   }
   ASSERT( pItem != NULL );

   return( pItem );
}

void CTestContainer98Doc::AddItem ( CDocItem * pItem ) [virtual]

Definition at line 803 of file TCDoc.Cpp.

{
  COleDocument::AddItem( pItem );

   m_lpTabOrder.AddTail( (CTestContainer98Item*)pItem );
}

void CTestContainer98Doc::BringToFront ( CDocItem * pItem )

Definition at line 387 of file TCDoc.Cpp.

{
   POSITION posItem;

   ASSERT( pItem != NULL );

   posItem = m_docItemList.Find( pItem );
   ASSERT( posItem != NULL );

   m_docItemList.RemoveAt( posItem );
   m_docItemList.AddHead( pItem );
}

void CTestContainer98Doc::BroadcastAmbientPropertyChange ( DISPID dispid ) [protected]

Definition at line 721 of file TCDoc.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;

   TCTrace( TRACELEVEL_NORMAL,
    "Broadcasting ambient property change.  DISPID=%d\n", dispid );

   posItem = GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)GetNextItem( posItem );
    pItem->OnAmbientPropertyChange( dispid );
   }

   if( (dispid == DISPID_AMBIENT_USERMODE) || (dispid == DISPID_UNKNOWN) )
   {
    // Invalidate the view, since some objects need to be rendered
    // differently in design mode vs. user mode.
    UpdateAllViews( NULL );
   }
}

BOOL CTestContainer98Doc::CanCloseFrame ( CFrameWnd * pFrame ) [virtual]

Definition at line 793 of file TCDoc.Cpp.

{
   return( COleDocument::CanCloseFrame( pFrame ) );
}

BOOL CTestContainer98Doc::CanWindowlessActivate ( ) const

Definition at line 528 of file TCDoc.Cpp.

{
   return( m_tAllowWindowless );
}

void CTestContainer98Doc::Cleanup ( ) [protected]

Definition at line 113 of file TCDoc.Cpp.

{
   int iProp;

   if( m_pScriptManager != NULL )
   {
    delete m_pScriptManager;
    m_pScriptManager = NULL;
   }

   delete m_pLog;
   m_pLog = NULL;

   for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
   {
    delete m_apAmbientProperties[iProp];
   }
   m_apAmbientProperties.SetSize( 0 );

   delete m_pFontHolder;
   m_pFontHolder = NULL;

   delete[] m_descFont.lpstrName;
   m_descFont.lpstrName = NULL;
}

void CTestContainer98Doc::CreateUniqueItemName | ( | CTestContainer98Item * | pItem,
 |  | LPCTSTR | pszBaseName,
 |  | CString & | strUniqueName
 | ) |  |

Definition at line 139 of file TCDoc.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pSearchItem;
   ULONG nTag;
   BOOL tCollisionFound;

   ASSERT( pszBaseName != NULL );

   // Assume the name is already unique
   strUniqueName = pszBaseName;

   nTag = 1;
   do
   {
    tCollisionFound = FALSE;
    posItem = GetStartPosition();
    while( (posItem != NULL) && !tCollisionFound )
    {
     pSearchItem = (CTestContainer98Item*)GetNextItem( posItem );
     if( pSearchItem != pItem )
     {
      if( strUniqueName == pSearchItem->GetDisplayName() )
      {
         // This name is already in use.
         tCollisionFound = TRUE;
         strUniqueName.Format( "%s%u", pszBaseName, nTag );
         nTag++;
      }
     }
    }
   } while( tCollisionFound );
}

void CTestContainer98Doc::DeleteContents ( ) [virtual]

Definition at line 815 of file TCDoc.Cpp.

{
   Cleanup();

  COleDocument::DeleteContents();
}

CAmbientProperty * CTestContainer98Doc::FindAmbientProperty ( DISPID dispid )

Definition at line 575 of file TCDoc.Cpp.

{
   int iProp;

   for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
   {
    if( m_apAmbientProperties[iProp]->GetID() == dispid )
    {
     return( m_apAmbientProperties[iProp] );
    }
   }

   // We didn't find the property.
   return( NULL );
}

CAmbientProperty * CTestContainer98Doc::FindAmbientProperty ( LPCOLESTR pszName )

Definition at line 591 of file TCDoc.Cpp.

{

   int iProp;

   COLE2CT pszNameT( pszName );
   for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
   {
    if( m_apAmbientProperties[iProp]->GetName() == pszNameT )
    {
     return( m_apAmbientProperties[iProp] );
    }
   }

   // We didn't find the property.
   return( NULL );
}

LPDISPATCH CTestContainer98Doc::FindControl ( LPCTSTR pszName ) [protected]

Definition at line 1310 of file TCDoc.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;
   IDispatch* pDispatch;
   HRESULT hResult;

   posItem = GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)GetNextItem( posItem );
    if( pItem->GetDisplayName() == pszName )
    {
     hResult = pItem->m_lpObject->QueryInterface( IID_IDispatch,
      (void**)&pDispatch );
     if( FAILED( hResult ) )
     {
      return( NULL );
     }

     return( pDispatch );
    }
   }

  return( NULL );
}

POSITION CTestContainer98Doc::FindItem ( CDocItem * pItem ) const

Definition at line 619 of file TCDoc.Cpp.

{
   return( m_docItemList.Find( pItem ) );
}

void CTestContainer98Doc::FireOnNewControl ( IDispatch * pControl ) [protected]

Definition at line 1401 of file TCDoc.Cpp.

{
   int iSink;
   IDispatch* pSink;
   COleDispatchDriver driver;

   const CPtrArray* pConnections = m_xTC98CP.GetConnections();
   ENSURE( pConnections != NULL );

   for( iSink = 0; iSink < pConnections->GetSize(); iSink++ )
   {
    pSink = (IDispatch*)(pConnections->GetAt( iSink ));
    ASSERT( pSink != NULL );

    driver.AttachDispatch( pSink, FALSE );

    try
    {
     driver.InvokeHelper( 1, DISPATCH_METHOD, VT_EMPTY, NULL, LPBYTE(
      VTS_DISPATCH ), pControl );
    }
    catch( CException* pException )
    {
     pException->Delete();
    }
   }
}

CAmbientProperty * CTestContainer98Doc::GetAmbientProperty ( int iProp )

Definition at line 609 of file TCDoc.Cpp.

{
   return( m_apAmbientProperties[iProp] );
}

BOOL CTestContainer98Doc::GetDispatchIID ( IID * piid ) [protected]

Definition at line 1429 of file TCDoc.Cpp.

{
   ENSURE( piid != NULL );

   *piid = __uuidof( ITestContainer98 );

   return( TRUE );
}

CLog * CTestContainer98Doc::GetLog ( ) const

Definition at line 810 of file TCDoc.Cpp.

{
   return( m_pLog );
}

CTestContainer98Item * CTestContainer98Doc::GetNextTabItem ( CTestContainer98Item * pItem ) const

Definition at line 634 of file TCDoc.Cpp.

{
   POSITION posItem;

   if( pItem == NULL )
   {
    if( m_lpTabOrder.IsEmpty() )
    {
     return( NULL );
    }

    return( m_lpTabOrder.GetHead() );
   }

   posItem = m_lpTabOrder.Find( pItem );
   ASSERT( posItem != NULL );
   m_lpTabOrder.GetNext( posItem );
   if( posItem == NULL )
   {
    // Wrap around to the beginning of the list.
    return( m_lpTabOrder.GetHead() );
   }

   return( m_lpTabOrder.GetAt( posItem ) );
}

int CTestContainer98Doc::GetNumAmbientProperties ( ) const

Definition at line 614 of file TCDoc.Cpp.

{
   return( (int)m_apAmbientProperties.GetSize() );
}

CEdit * CTestContainer98Doc::GetOutputEditControl ( )

Definition at line 1107 of file TCDoc.Cpp.

{
   POSITION posView;
   CView* pView;

   posView = GetFirstViewPosition();
   ASSERT( posView != NULL );

   while( posView != NULL )
   {
    pView = GetNextView( posView );
    ENSURE( pView != NULL );
    if( pView->IsKindOf( RUNTIME_CLASS( CEditView ) ) )
    {
     return( &(STATIC_DOWNCAST( CEditView, pView )->GetEditCtrl()) );
    }
   }

   return( NULL );
}

CDocItem * CTestContainer98Doc::GetPrevItem ( POSITION & pos ) const

Definition at line 629 of file TCDoc.Cpp.

{
   return( (CDocItem*)m_docItemList.GetPrev( pos ) );
}

LPDISPATCH CTestContainer98Doc::GetPrimarySelection ( ) [protected]

Definition at line 1250 of file TCDoc.Cpp.

{
   IDispatch* pDispatch;
   POSITION posView;
   CTestContainer98View* pView;
   HRESULT hResult;

   posView = GetFirstViewPosition();
   ASSERT( posView != NULL );
   pView = (CTestContainer98View*)GetNextView( posView );
   ASSERT( posView == NULL );

   if( pView->m_pSelection == NULL )
   {
    return( NULL );
   }

   pDispatch = NULL;
   hResult = pView->m_pSelection->m_lpObject->QueryInterface( IID_IDispatch,
    (void**)&pDispatch );
   if( FAILED( hResult ) )
   {
    return( NULL );
   }

   return( pDispatch );
}

CScriptManager * CTestContainer98Doc::GetScriptManager ( BOOL tCreate = TRUE ) [protected]

Definition at line 1461 of file TCDoc.Cpp.

{
   HRESULT hResult;

   if( m_pScriptManager == NULL )
   {
    if( tCreate )
    {
     hResult = InitScriptManager();
     if( FAILED( hResult ) )
     {
      AfxMessageBox( IDS_NOSCRIPTING );
     }
     else
     {
      ASSERT( m_pScriptManager != NULL );
     }
    }
   }

   return( m_pScriptManager );
}

POSITION CTestContainer98Doc::GetTailPosition ( ) const

Definition at line 624 of file TCDoc.Cpp.

{
   return( m_docItemList.GetTailPosition() );
}

BOOL CTestContainer98Doc::GetUserMode ( ) const

Definition at line 687 of file TCDoc.Cpp.

{
   return( m_tUserMode );
}

CTestContainer98View * CTestContainer98Doc::GetView ( ) const

Definition at line 1128 of file TCDoc.Cpp.

{
   POSITION posView;
   CView* pView;

   posView = GetFirstViewPosition();
   ASSERT( posView != NULL );

   while( posView != NULL )
   {
    pView = GetNextView( posView );
    ENSURE( pView != NULL );
    if( pView->IsKindOf( RUNTIME_CLASS( CTestContainer98View ) ) )
    {
     return( STATIC_DOWNCAST( CTestContainer98View, pView ) );
    }
   }

   ASSERT( FALSE );

   return( NULL );
}

BOOL CTestContainer98Doc::HonorIgnoreActivateWhenVisible ( ) const

Definition at line 553 of file TCDoc.Cpp.

{
   return( m_tHonorIgnoreActivateWhenVisible );
}

HRESULT CTestContainer98Doc::InitDefaultAmbientProperties ( ) [protected]

Definition at line 413 of file TCDoc.Cpp.

{
   CString strName;
   LPCOLESTR pszFaceName;
   CAmbientProperty* pProp;
   VARIANT_BOOL tUserMode;

   if( m_tUserMode )
   {
    tUserMode = VAR_TRUE;
   }
   else
   {
    tUserMode = VAR_FALSE;
   }

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_USERMODE);
   pProp = new CAmbientProperty( DISPID_AMBIENT_USERMODE, strName, COleVariant(
    tUserMode, VT_BOOL ), VTI_BOOL, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_UIDEAD);
   pProp = new CAmbientProperty( DISPID_AMBIENT_UIDEAD, strName, COleVariant(
    VARIANT_FALSE, VT_BOOL ), VTI_BOOL, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SHOWHATCHING);
   pProp = new CAmbientProperty( DISPID_AMBIENT_SHOWHATCHING, strName,
    COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ), VTI_BOOL, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SHOWGRABHANDLES);
   pProp = new CAmbientProperty( DISPID_AMBIENT_SHOWGRABHANDLES, strName,
    COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ), VTI_BOOL, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_TEXTALIGN);
   pProp = new CAmbientProperty( DISPID_AMBIENT_TEXTALIGN, strName,
    COleVariant( short( 0 ), VT_I2 ), VTI_I2, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_BACKCOLOR);
   pProp = new CAmbientProperty( DISPID_AMBIENT_BACKCOLOR, strName,
    COleVariant( long( GetSysColor( COLOR_WINDOW ) ), VT_I4 ), VTI_COLOR,
    TRUE );
   m_apAmbientProperties.Add( pProp );

   delete m_pFontHolder;
   m_pFontHolder = new CFontHolder( NULL );
   if( m_pFontHolder == NULL )
   {
    AfxThrowMemoryException();
   }
   m_descFont.cbSizeofstruct = sizeof( m_descFont );
   pszFaceName = L"MS Sans Serif";
   delete[] m_descFont.lpstrName;
   size_t len = wcslen( pszFaceName )+1;
   m_descFont.lpstrName = new OLECHAR[len];
   if( m_descFont.lpstrName == NULL )
   {
    AfxThrowMemoryException();
   }
   ATL_CRT_ERRORCHECK(wcscpy_s(m_descFont.lpstrName, len, pszFaceName));
   m_descFont.cySize.Lo = 80000L;
   m_descFont.cySize.Hi = 0;
   m_descFont.sWeight = FW_BOLD;
   m_descFont.sCharset = 0;
   m_descFont.fItalic = FALSE;
   m_descFont.fUnderline = FALSE;
   m_descFont.fStrikethrough = FALSE;
   m_pFontHolder->InitializeFont( &m_descFont );

   COleVariant varFont;
   varFont.vt = VT_DISPATCH;
   varFont.pdispVal = m_pFontHolder->GetFontDispatch();

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_FONT);
   pProp = new CAmbientProperty( DISPID_AMBIENT_FONT, strName, varFont,
    VTI_FONT, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_FORECOLOR);
   pProp = new CAmbientProperty( DISPID_AMBIENT_FORECOLOR, strName,
    COleVariant( long( GetSysColor( COLOR_WINDOWTEXT ) ), VT_I4 ), VTI_COLOR,
    TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SCALEUNITS);
   pProp = new CAmbientProperty( DISPID_AMBIENT_SCALEUNITS, strName,
    COleVariant( _T( "" ), VT_BSTR ), VTI_BSTR, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_DISPLAYNAME);
   pProp = new CAmbientProperty( DISPID_AMBIENT_DISPLAYNAME, strName,
    COleVariant( _T( "" ), VT_BSTR ), VTI_BSTR, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_LOCALEID);
   pProp = new CAmbientProperty( DISPID_AMBIENT_LOCALEID, strName, COleVariant(
    long( GetUserDefaultLCID() ), VT_I4 ), VTI_I4, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_MESSAGEREFLECT);
   pProp = new CAmbientProperty( DISPID_AMBIENT_MESSAGEREFLECT, strName,
    COleVariant( VARIANT_FALSE, VT_BOOL ), VTI_BOOL, TRUE );
   m_apAmbientProperties.Add( pProp );

   LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SUPPORTSMNEMONICS);
   pProp = new CAmbientProperty( DISPID_AMBIENT_SUPPORTSMNEMONICS, strName,
    COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ), VTI_BOOL, TRUE );
   m_apAmbientProperties.Add( pProp );

   return( S_OK );
}

BOOL CTestContainer98Doc::Initialize ( ) [protected]

Definition at line 174 of file TCDoc.Cpp.

{

   CLSID clsid;
   HRESULT hResult;
   CMainFrame* pMainFrame;
   CTestContainer98App* pApp;
   CFileLog* pFileLog;
   BOOL tSuccess;

   pApp = (CTestContainer98App*)AfxGetApp();

   m_tUserMode = pApp->m_options.m_tUserMode;
   m_tFreezeEvents = FALSE;
   m_tAllowWindowless = pApp->m_options.m_tAllowWindowless;
   m_tTwoPassDrawing = pApp->m_options.m_tTwoPassDrawing;
   m_tSlowDrawing = FALSE;
   m_tHonorIgnoreActivateWhenVisible =
    pApp->m_options.m_tHonorIgnoreActivateWhenVisible;
   m_tUseIPointerInactive = pApp->m_options.m_tUseIPointerInactive;
   m_tUseQuickActivation = pApp->m_options.m_tQuickActivation;
   m_tIOleInPlaceSiteWindowless = pApp->m_options.m_tIOleInPlaceSiteWindowless;
   m_tIOleInPlaceSiteEx = pApp->m_options.m_tIOleInPlaceSiteEx;
   m_tIAdviseSinkEx = pApp->m_options.m_tIAdviseSinkEx;
   m_tSBindHost = pApp->m_options.m_tSBindHost;
   m_pLog = NULL;

   pMainFrame = DYNAMIC_DOWNCAST( CMainFrame, AfxGetMainWnd() );

   switch( pApp->m_options.m_iLogType )
   {
   case TCLOG_NULL:
    m_pLog = new CNullLog;
    break;

   case TCLOG_OUTPUTWINDOW:
    m_pLog = new COutputWindowLog( GetOutputEditControl() );
    break;

   case TCLOG_DEBUG:
    m_pLog = new CDebugLog;
    break;

   case TCLOG_FILE:
    pFileLog = new CFileLog;
    tSuccess = pFileLog->Create( pApp->m_options.m_strLogFileName );
    if( !tSuccess )
    {
     delete pFileLog;
    }
    m_pLog = pFileLog;
    break;

   default:
    ASSERT( FALSE );
    break;
   }
   if( m_pLog == NULL )
   {
    return( FALSE );
   }

   hResult = InitDefaultAmbientProperties();
   if( FAILED( hResult ) )
   {
    return( FALSE );
   }

   if( !pApp->m_options.m_strProgID.IsEmpty() )
   {
    try
    {
     hResult = CLSIDFromProgID( CT2COLE( pApp->m_options.m_strProgID ), &clsid );
     if( FAILED( hResult ) )
     {
      AfxThrowOleException( hResult );
     }
     AddControl( clsid, NULL );
    }
    catch( CException* pException )
    {
     pException->Delete();
     TCTrace( TRACELEVEL_NORMAL, "Failed to load control.\n" );
    }
    pApp->m_options.m_strProgID.Empty();
   }

  return( TRUE );
}

HRESULT CTestContainer98Doc::InitScriptManager ( ) [protected]

Definition at line 1366 of file TCDoc.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;
   IDispatchPtr pDispatch;

   m_pScriptManager = new CScriptManager( this );
   if( m_pScriptManager == NULL )
   {
    return( E_OUTOFMEMORY );
   }

   posItem = GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)GetNextItem( posItem );
    pDispatch = pItem->m_lpObject;
    if( pDispatch == NULL )
    {
     return( E_NOINTERFACE );
    }
    m_pScriptManager->AddNamedItem( pItem->GetDisplayName(), pDispatch );
   }

   return( S_OK );
}

LPDISPATCH CTestContainer98Doc::InsertControl | ( | LPCTSTR | pszProgID,
 |  | LPCTSTR | pszName |
 | ) |  |  | [protected]

Definition at line 1183 of file TCDoc.Cpp.

{

   CLSID clsid;
   HRESULT hResult;
   CTestContainer98Item* pItem;
   IDispatch* pDispatch;
   CScriptManager* pScriptManager;

   TRACE( "InsertControl: %s\n", pszProgID );

   hResult = CLSIDFromProgID( CT2COLE( pszProgID ), &clsid );
   if( FAILED( hResult ) )
   {
    TRACE( "CLSIDFromProgID failed\n" );
    return( NULL );
   }

   pItem = NULL;
   try
   {
    pItem = AddControl( clsid, pszName );
    ASSERT_VALID( pItem );

    pItem->InvalidateItem();
   }
   catch( COleException* pException )
   {
    ASSERT( pItem == NULL );

    hResult = pException->m_sc;
    pException->Delete();

    return( NULL );
   }
   catch( CException* pException )
   {
    ASSERT( pItem == NULL );

    pException->Delete();

    return( NULL );
   }
   ASSERT( pItem != NULL );

   pDispatch = NULL;
   hResult = pItem->m_lpObject->QueryInterface( IID_IDispatch,
    (void**)&pDispatch );
   if( FAILED( hResult ) )
   {
    pItem->Delete();
    return( NULL );
   }
   ASSERT( pDispatch != NULL );

   pScriptManager = GetScriptManager( FALSE );
   if( pScriptManager != NULL )
   {
    pScriptManager->AddNamedItem( pszName, pDispatch );
   }

   FireOnNewControl( pDispatch );

   return( pDispatch );
}

void CTestContainer98Doc::Log ( LPCTSTR pszMessage ) [protected]

Definition at line 1393 of file TCDoc.Cpp.

{
   CLog* pLog;

   pLog = GetLog();
   (*pLog)<<pszMessage;
}

void CTestContainer98Doc::OnContainerAmbientProperties ( ) [protected]

Definition at line 997 of file TCDoc.Cpp.

{
   DISPID dispidChanged;
   BOOL tChanged;
   CAmbientProperty* pProperty;

   CAmbientPropertiesDlg dlg( NULL, this );

   dlg.DoModal();

   // Check for changes.
   tChanged = dlg.GetChangedPropertyID( &dispidChanged );
   if( tChanged )
   {
    if( (dispidChanged == DISPID_AMBIENT_USERMODE) || (dispidChanged ==
     DISPID_UNKNOWN) )
    {
     // Update our cached version of the UserMode property.
     pProperty = FindAmbientProperty( DISPID_AMBIENT_USERMODE );
     ENSURE( pProperty != NULL );
     ENSURE( pProperty->GetValue().vt == VT_BOOL );
     m_tUserMode = pProperty->GetValue().bVal;
    }
    BroadcastAmbientPropertyChange( dispidChanged );
   }
}

void CTestContainer98Doc::OnContainerInfo ( ) [protected]

Definition at line 1024 of file TCDoc.Cpp.

{
   CContainerInfoDlg dlg( NULL, this );

   dlg.DoModal();
}

void CTestContainer98Doc::OnContainerOptions ( ) [protected]

Definition at line 951 of file TCDoc.Cpp.

{
   int nResult;
   CFeaturesPage pageFeatures;
   CInterfacesPage pageInterfaces;
   CServicesPage pageServices;
   CPropertySheet sheet( IDS_CONTAINEROPTIONS );

   pageFeatures.m_tAllowWindowless = m_tAllowWindowless;
   pageFeatures.m_tTwoPassDrawing = m_tTwoPassDrawing;
   pageFeatures.m_tHonorIgnoreActivateWhenVisible =
    m_tHonorIgnoreActivateWhenVisible;
   pageFeatures.m_tUseIPointerInactive = m_tUseIPointerInactive;
   pageFeatures.m_tUseQuickActivation = m_tUseQuickActivation;
   sheet.AddPage( &pageFeatures );

   pageInterfaces.m_tIOleInPlaceSiteEx = m_tIOleInPlaceSiteEx;
   pageInterfaces.m_tIOleInPlaceSiteWindowless = m_tIOleInPlaceSiteWindowless;
   pageInterfaces.m_tIAdviseSinkEx = m_tIAdviseSinkEx;
   sheet.AddPage( &pageInterfaces );

   pageServices.m_tSBindHost = m_tSBindHost;
   sheet.AddPage( &pageServices );

   sheet.m_psh.dwFlags &= ~PSH_HASHELP;
   sheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
   nResult = (int)sheet.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   m_tAllowWindowless = pageFeatures.m_tAllowWindowless;
   m_tTwoPassDrawing = pageFeatures.m_tTwoPassDrawing;
   m_tHonorIgnoreActivateWhenVisible =
    pageFeatures.m_tHonorIgnoreActivateWhenVisible;
   m_tUseIPointerInactive = pageFeatures.m_tUseIPointerInactive;
   m_tUseQuickActivation = pageFeatures.m_tUseQuickActivation;

   m_tIOleInPlaceSiteEx = pageInterfaces.m_tIOleInPlaceSiteEx;
   m_tIOleInPlaceSiteWindowless = pageInterfaces.m_tIOleInPlaceSiteWindowless;
   m_tIAdviseSinkEx = pageInterfaces.m_tIAdviseSinkEx;

   m_tSBindHost = pageServices.m_tSBindHost;
}

void CTestContainer98Doc::OnContainerTabOrder ( ) [protected]

Definition at line 1077 of file TCDoc.Cpp.

{
   POSITION posItem;
   CTabOrderDlg dlg;
   int nResult;
   CTestContainer98Item* pItem;

   posItem = m_lpTabOrder.GetHeadPosition();
   while( posItem != NULL )
   {
    pItem = m_lpTabOrder.GetNext( posItem );
    ASSERT( pItem != NULL );
    dlg.m_lpTabOrder.AddTail( pItem );
   }

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   m_lpTabOrder.RemoveAll();
   posItem = dlg.m_lpTabOrder.GetHeadPosition();
   while( posItem != NULL )
   {
    pItem = dlg.m_lpTabOrder.GetNext( posItem );
    m_lpTabOrder.AddTail( pItem );
   }
}

void CTestContainer98Doc::OnEditDeleteAll ( ) [protected]

Definition at line 1031 of file TCDoc.Cpp.

{
   CTestContainer98Item* pItem;
   POSITION posItem;
   POSITION posView;
   CTestContainer98View* pView;

   posView = GetFirstViewPosition();
   ASSERT( posView != NULL );
   pView = DYNAMIC_DOWNCAST( CTestContainer98View, GetNextView( posView ) );
   pView->ClearSelection();

   do
   {
    posItem = GetStartPosition();
    if( posItem != NULL )
    {
     pItem = (CTestContainer98Item*)GetNextItem( posItem );
     ENSURE( pItem != NULL );
     pItem->Delete();
    }
   } while( posItem != NULL );

   UpdateAllViews( NULL );
}

BOOL CTestContainer98Doc::OnNewDocument ( ) [virtual]

Definition at line 264 of file TCDoc.Cpp.

{
  if( !COleDocument::OnNewDocument() )
   {
    return( FALSE );
   }

   return( Initialize() );
}

BOOL CTestContainer98Doc::OnOpenDocument ( LPCTSTR lpszPathName ) [virtual]

Definition at line 1439 of file TCDoc.Cpp.

{
   int iChar;

   ENSURE( pszPathName != NULL );

   iChar = lstrlen( pszPathName )-1;
   while( (iChar >= 0) && (pszPathName[iChar] != _T( '\\' )) )
   {
    iChar--;
   }

   m_strDirectory = CString( pszPathName ).Left( iChar+1 );

  if( !COleDocument::OnOpenDocument( pszPathName ) )
   {
    return( FALSE );
   }

  return( TRUE );
}

void CTestContainer98Doc::OnOptionsFreezeEvents ( ) [protected]

Definition at line 822 of file TCDoc.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;

   m_tFreezeEvents = !m_tFreezeEvents;

   posItem = GetStartPosition();
   while( posItem != NULL )
   {
    // Set the item's FreezeEvents status.
    pItem = (CTestContainer98Item*)GetNextItem( posItem );
    pItem->FreezeEvents( m_tFreezeEvents );
   }
}

void CTestContainer98Doc::OnOptionsLogging ( ) [protected]

Definition at line 870 of file TCDoc.Cpp.

{
   CLoggingDlg dlg;
   CFileLog* pFileLog;
   int nResult;
   int iOldLogType;
   BOOL tSuccess;

   if( m_pLog->IsKindOf( RUNTIME_CLASS( CNullLog ) ) )
   {
    dlg.m_iLogType = TCLOG_NULL;
   }
   else if( m_pLog->IsKindOf( RUNTIME_CLASS( COutputWindowLog ) ) )
   {
    dlg.m_iLogType = TCLOG_OUTPUTWINDOW;
   }
   else if( m_pLog->IsKindOf( RUNTIME_CLASS( CDebugLog ) ) )
   {
    dlg.m_iLogType = TCLOG_DEBUG;
   }
   else if( m_pLog->IsKindOf( RUNTIME_CLASS( CFileLog ) ) )
   {
    pFileLog = DYNAMIC_DOWNCAST( CFileLog, m_pLog );
    dlg.m_iLogType = TCLOG_FILE;
    dlg.m_strFileName = pFileLog->GetFileName();
   }
   iOldLogType = dlg.m_iLogType;

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   switch( dlg.m_iLogType )
   {
   case TCLOG_NULL:
    if( iOldLogType != TCLOG_NULL )
    {
     delete m_pLog;
     m_pLog = new CNullLog;
    }
    break;

   case TCLOG_OUTPUTWINDOW:
    if( iOldLogType != TCLOG_OUTPUTWINDOW )
    {
     CMainFrame* pMainFrame;

     delete m_pLog;
     pMainFrame = STATIC_DOWNCAST( CMainFrame, AfxGetMainWnd() );
     m_pLog = new COutputWindowLog( GetOutputEditControl() );
    }
    break;

   case TCLOG_DEBUG:
    if( iOldLogType != TCLOG_DEBUG )
    {
     delete m_pLog;
     m_pLog = new CDebugLog;
    }
    break;

   case TCLOG_FILE:
    if( (iOldLogType != TCLOG_FILE) || ((iOldLogType == TCLOG_FILE) &&
     ((DYNAMIC_DOWNCAST( CFileLog, m_pLog ))->GetFileName() !=
     dlg.m_strFileName)) )
    {
     delete m_pLog;
     m_pLog = new CFileLog;
     pFileLog = DYNAMIC_DOWNCAST( CFileLog, m_pLog );
     tSuccess = pFileLog->Create( dlg.m_strFileName );
     if( !tSuccess )
     {
      TRACE( "Failed to create log file.\n" );
     }
    }
    break;
   }
}

void CTestContainer98Doc::OnOptionsSlowDrawing ( ) [protected]

Definition at line 850 of file TCDoc.Cpp.

{
   m_tSlowDrawing = !m_tSlowDrawing;
}

void CTestContainer98Doc::OnOptionsTwoPassDrawing ( ) [protected]

Definition at line 860 of file TCDoc.Cpp.

{
   m_tTwoPassDrawing = !m_tTwoPassDrawing;
}

void CTestContainer98Doc::OnRunMacro ( ) [protected]

Definition at line 1484 of file TCDoc.Cpp.

{
   CScript* pScript;
   CString strMacroName;
   CMainFrame* pMainFrame;
   CComboBox* pComboBox;
   HRESULT hResult;
   CScriptManager* pScriptManager;

   pScriptManager = GetScriptManager();
   if( pScriptManager == NULL )
   {
    return;
   }

   pMainFrame = STATIC_DOWNCAST( CMainFrame, AfxGetMainWnd() );
   pComboBox = STATIC_DOWNCAST( CComboBox,
    pMainFrame->m_wndMacroBar.GetDlgItem( IDC_MACRO ) );

   pComboBox->GetLBText( 0, strMacroName );
   TRACE( "Macro: %s\n", LPCTSTR( strMacroName ) );
   pScript = pScriptManager->FindMacro( strMacroName );
   if( pScript != NULL )
   {
    hResult = pScript->RunMacro( strMacroName );
    if( FAILED( hResult ) )
    {
    }
   }
}

BOOL CTestContainer98Doc::OnSaveDocument ( LPCTSTR lpszPathName ) [virtual]

Definition at line 798 of file TCDoc.Cpp.

{
   return( COleDocument::OnSaveDocument( pszPathName ) );
}

void CTestContainer98Doc::OnToolsMacros ( ) [protected]

Definition at line 1337 of file TCDoc.Cpp.

{
   CMacroDlg dlg;
   int nResult;
   HRESULT hResult;
   CScriptManager* pScriptManager;

   pScriptManager = GetScriptManager();
   if( pScriptManager == NULL )
   {
    return;
   }

   dlg.m_pScriptManager = m_pScriptManager;

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   hResult = dlg.m_pScript->RunMacro( dlg.m_strMacroName );
   if( FAILED( hResult ) )
   {
    TRACE( "Script failed\n" );
    return;
   }
}

void CTestContainer98Doc::OnUpdateEditDeleteAll ( CCmdUI * pCmdUI ) [protected]

Definition at line 1057 of file TCDoc.Cpp.

{
   POSITION posItem;

   posItem = GetStartPosition();
   pCmdUI->Enable( posItem != NULL );
}

void CTestContainer98Doc::OnUpdateOptionsFreezeEvents ( CCmdUI * pCmdUI ) [protected]

Definition at line 838 of file TCDoc.Cpp.

{
   if( m_tFreezeEvents )
   {
    pCmdUI->SetCheck( 1 );
   }
   else
   {
    pCmdUI->SetCheck( 0 );
   }
}

void CTestContainer98Doc::OnUpdateOptionsSlowDrawing ( CCmdUI * pCmdUI ) [protected]

Definition at line 855 of file TCDoc.Cpp.

{
   pCmdUI->SetCheck( m_tSlowDrawing == TRUE );
}

void CTestContainer98Doc::OnUpdateOptionsTwoPassDrawing ( CCmdUI * pCmdUI ) [protected]

Definition at line 865 of file TCDoc.Cpp.

{
   pCmdUI->SetCheck( m_tTwoPassDrawing == TRUE );
}

void CTestContainer98Doc::PreCloseFrame ( CFrameWnd * pFrame )

Definition at line 772 of file TCDoc.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;

   posItem = GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)GetNextItem( posItem );
    if( pItem != NULL )
    {
     if( pItem->IsInPlaceActive() )
     {
      pItem->Deactivate();
     }
    }
   }

   COleDocument::PreCloseFrame( pFrame );
}

void CTestContainer98Doc::RemoveItem ( CDocItem * pItem ) [virtual]

Definition at line 1065 of file TCDoc.Cpp.

{
   POSITION posItem;

   posItem = m_lpTabOrder.Find( DYNAMIC_DOWNCAST( CTestContainer98Item,
    pItem ) );
   ASSERT( posItem != NULL );
   m_lpTabOrder.RemoveAt( posItem );

  COleDocument::RemoveItem( pItem );
}

void CTestContainer98Doc::RunAutomationScript ( LPCTSTR szScriptFile )

Definition at line 1515 of file TCDoc.Cpp.

{
  TRY
  {
    CScript * pScript = NULL;
    HRESULT hr = S_OK;
    if(NULL == m_pScriptManager)
      InitScriptManager();

    hr = m_pScriptManager->LoadScript(szScriptFile, "RunTest");
    ASSERT(SUCCEEDED(hr));
    pScript = m_pScriptManager->FindMacro("RunTest");
    ENSURE(pScript);
    hr = pScript->RunMacro("RunTest");
    ASSERT(SUCCEEDED(hr));
  }
  CATCH(COleException, e)
  {
    char szErr[MAX_PATH];
    e->GetErrorMessage(szErr, MAX_PATH);
    AfxMessageBox(szErr);
  }
  END_CATCH

  AfxGetMainWnd()->PostMessage(WM_CLOSE);
}

BOOL CTestContainer98Doc::SaveModified ( ) [protected, virtual]

Definition at line 1542 of file TCDoc.Cpp.

{
  // TODO: Add your specialized code here and/or call the base class

  return TRUE;
}

void CTestContainer98Doc::SendToBack ( CDocItem * pItem )

Definition at line 400 of file TCDoc.Cpp.

{
   POSITION posItem;

   ASSERT( pItem != NULL );

   posItem = m_docItemList.Find( pItem );
   ASSERT( posItem != NULL );

   m_docItemList.RemoveAt( posItem );
   m_docItemList.AddTail( pItem );
}

void CTestContainer98Doc::Serialize ( CArchive & ar ) [virtual]

Definition at line 278 of file TCDoc.Cpp.

{
   POSITION posScript;
   CScript* pScript;
   int nScripts;
   int iScript;
   CString strScriptName;
   CString strScriptPath;
   CScriptManager* pScriptManager;
   CString strErrorMessage;
   HRESULT hResult;
   int iProp;
   CAmbientProperty* pUserMode;

   if( ar.IsLoading() )
   {
    Initialize();

    for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
    {
     delete m_apAmbientProperties[iProp];
    }
    m_apAmbientProperties.SetSize( 0 );

    m_apAmbientProperties.Serialize( ar );

    pUserMode = FindAmbientProperty( DISPID_AMBIENT_USERMODE );
    if( pUserMode != NULL )
    {
     if( pUserMode->GetValue().vt == VT_BOOL )
     {
      m_tUserMode = pUserMode->GetValue().boolVal;
     }
    }
   }
   else
   {
    m_apAmbientProperties.Serialize( ar );
   }

  // Calling the base class COleDocument enables serialization
  //  of the container document's COleClientItem objects.
  COleDocument::Serialize( ar );

   if( ar.IsStoring() )
   {
    pScriptManager = GetScriptManager( FALSE );
    if( pScriptManager != NULL )
    {
     ar<<pScriptManager->GetNumScripts();

     posScript = pScriptManager->GetFirstScriptPosition();
     while( posScript != NULL )
     {
      pScript = pScriptManager->GetNextScript( posScript );
      ar<<pScript->GetName();
     }
    }
    else
    {
     ar<<int( 0 );
    }
   }
   else
   {
    ar>>nScripts;
    if( nScripts > 0 )
    {
     pScriptManager = GetScriptManager();
     if( pScriptManager != NULL )
     {
      for( iScript = 0; iScript < nScripts; iScript++ )
      {
         ar>>strScriptName;
         strScriptPath = m_strDirectory+strScriptName+_T( ".dsm" );
         hResult = pScriptManager->LoadScript( strScriptPath,
          strScriptName );
         if( FAILED( hResult ) )
         {
          _com_error error( hResult );

          AfxFormatString2( strErrorMessage, IDS_ERRORLOADINGSCRIPT,
           strScriptName, error.ErrorMessage() );
          AfxMessageBox( strErrorMessage );
         }
      }
     }
    }
   }
}

void CTestContainer98Doc::SetItemTabOrder | ( | CTestContainer98Item * | pItem,
 |  | int | iTabOrder
 | ) |  |

Definition at line 661 of file TCDoc.Cpp.

{
   POSITION posItem;

   ASSERT( pItem != NULL );

   posItem = FindItem( pItem );
   ASSERT( posItem != NULL );

   posItem = m_lpTabOrder.Find( pItem );
   ASSERT( posItem != NULL );

   m_lpTabOrder.RemoveAt( posItem );
   posItem = m_lpTabOrder.FindIndex( iTabOrder );
   if( posItem == NULL )
   {
    // We went off the end of the list.
    m_lpTabOrder.AddTail( pItem );
   }
   else
   {
    m_lpTabOrder.InsertBefore( posItem, pItem );
   }
}

void CTestContainer98Doc::SetPrimarySelection ( LPDISPATCH newValue ) [protected]

Definition at line 1278 of file TCDoc.Cpp.

{
   IUnknownPtr punkItem;
   IUnknownPtr punkNewSelection;
   POSITION posItem;
   CTestContainer98Item* pItem;

   if( pNewSelection == NULL )
   {
    GetView()->ClearSelection();
   }
   else
   {
    punkNewSelection = pNewSelection;
    ASSERT( punkNewSelection != NULL );

    posItem = GetStartPosition();
    while( posItem != NULL )
    {
     pItem = (CTestContainer98Item*)GetNextItem( posItem );
     punkItem = pItem->m_lpObject;
     ASSERT( punkItem != NULL );

     if( punkItem == punkNewSelection )
     {
      GetView()->SetSelection( pItem );
      return;
     }
    }
   }
}

void CTestContainer98Doc::SetUserMode ( BOOL tUserMode )

Definition at line 692 of file TCDoc.Cpp.

{
   CAmbientProperty* pProp;

   if( (m_tUserMode && tUserMode) || (!m_tUserMode && !tUserMode) )
   {
    // No change
    return;
   }

   m_tUserMode = tUserMode;
   pProp = FindAmbientProperty( DISPID_AMBIENT_USERMODE );
   ENSURE( pProp != NULL );

   if( m_tUserMode )
   {
    pProp->SetValue( COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ) );
   }
   else
   {
    pProp->SetValue( COleVariant( VARIANT_FALSE, VT_BOOL ) );
   }

   if( pProp->IsEnabled() )
   {
    BroadcastAmbientPropertyChange( pProp->GetID() );
   }
}

BOOL CTestContainer98Doc::SupportsInterface ( REFIID iid )

Definition at line 744 of file TCDoc.Cpp.

{
   if( iid == IID_IOleInPlaceSiteEx )
   {
    return( m_tIOleInPlaceSiteEx || m_tIOleInPlaceSiteWindowless );
   }
   else if( iid == IID_IOleInPlaceSiteWindowless )
   {
    return( m_tIOleInPlaceSiteWindowless );
   }
   else if( iid == IID_IAdviseSinkEx )
   {
    return( m_tIAdviseSinkEx );
   }

   return( FALSE );
}

BOOL CTestContainer98Doc::SupportsService ( REFGUID sid )

Definition at line 762 of file TCDoc.Cpp.

{
   if( sid == SID_SBindHost )
   {
    return( m_tSBindHost );
   }

   return( FALSE );
}

BOOL CTestContainer98Doc::UseIPointerInactive ( ) const

Definition at line 533 of file TCDoc.Cpp.

{
   return( m_tUseIPointerInactive );
}

BOOL CTestContainer98Doc::UseQuickActivation ( ) const

Definition at line 538 of file TCDoc.Cpp.

{
   return( m_tUseQuickActivation );
}

BOOL CTestContainer98Doc::UseSlowDrawing ( ) const

Definition at line 543 of file TCDoc.Cpp.

{
   return( m_tSlowDrawing );
}

BOOL CTestContainer98Doc::UseTwoPassDrawing ( ) const

Definition at line 548 of file TCDoc.Cpp.

{
   return( m_tTwoPassDrawing );
}

Friends And Related Function Documentation

friend class CTestContainer98Item [friend]

Definition at line 164 of file TCDoc.H.

Member Data Documentation

CTypedPtrArray< CObArray, CAmbientProperty* > CTestContainer98Doc::m_apAmbientProperties [protected]

Definition at line 92 of file TCDoc.H.

FONTDESC CTestContainer98Doc::m_descFont [protected]

Definition at line 94 of file TCDoc.H.

CTypedPtrList< CObList, CTestContainer98Item* > CTestContainer98Doc::m_lpTabOrder [protected]

Definition at line 110 of file TCDoc.H.

IActiveScriptPtr CTestContainer98Doc::m_pActiveScript [protected]

Definition at line 111 of file TCDoc.H.

IActiveScriptParsePtr CTestContainer98Doc::m_pActiveScriptParse [protected]

Definition at line 112 of file TCDoc.H.

CFontHolder* CTestContainer98Doc::m_pFontHolder [protected]

Definition at line 93 of file TCDoc.H.

CLog* CTestContainer98Doc::m_pLog [protected]

Definition at line 109 of file TCDoc.H.

CScriptManager* CTestContainer98Doc::m_pScriptManager [protected]

Definition at line 113 of file TCDoc.H.

IStoragePtr CTestContainer98Doc::m_pStorage [protected]

Definition at line 108 of file TCDoc.H.

IStreamPtr CTestContainer98Doc::m_pStream [protected]

Definition at line 107 of file TCDoc.H.

CString CTestContainer98Doc::m_strDirectory [protected]

Definition at line 91 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tAllowWindowless [protected]

Definition at line 97 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tFreezeEvents [protected]

Definition at line 96 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tHonorIgnoreActivateWhenVisible [protected]

Definition at line 100 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tIAdviseSinkEx [protected]

Definition at line 105 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tIOleInPlaceSiteEx [protected]

Definition at line 104 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tIOleInPlaceSiteWindowless [protected]

Definition at line 103 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tSBindHost [protected]

Definition at line 106 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tSlowDrawing [protected]

Definition at line 99 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tTwoPassDrawing [protected]

Definition at line 98 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tUseIPointerInactive [protected]

Definition at line 101 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tUseQuickActivation [protected]

Definition at line 102 of file TCDoc.H.

BOOL CTestContainer98Doc::m_tUserMode [protected]

Definition at line 95 of file TCDoc.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TCDoc.H
  • ole/TstCon/TCDoc.Cpp
Generated on Sat Nov 23 2024 17:01:10 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTestContainer98Item Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CTestContainer98Item Class Reference

#include "TCItem.H"

List of all members.

Public Member Functions

CTestContainer98Item (CTestContainer98Doc *pContainer=NULL)
~CTestContainer98Item ()
BOOL | ActsLikeButton () const
void | CommitItem (BOOL bSuccess)
void | CopyToClipboard (CArchive &ar, IStorage *pStorage)
BOOL | Create (REFCLSID clsid, LPCTSTR pszName=NULL)
BOOL | CreateFromClipboard (CArchive &ar, IStorage *pStorage)
BOOL | CreateOrLoad (REFCLSID clsid, LPCTSTR pszName, REFIID iidPersistanceMedium, IUnknown *pPeristanceMedium)
void | DisplayAsDefault (BOOL tDefault)
BOOL | Draw (CDC *pDC, LPCRECT prectBounds, DVASPECT nDrawAspect=DVASPECT(-1))
BOOL | DrawBackToFront (CDC *pDC, LPCRECT prectBounds)
BOOL | DrawFrontToBack (CDC *pDC, LPCRECT prectBounds)
void | FreezeEvents (BOOL tFreeze)
DWORD | GetActivationPolicy () const
CTestContainer98View * GetActiveView ()
CString | GetDisplayName ()
CTestContainer98Doc * GetDocument ()
CInterfaceInfo * GetEventInfo ()
IUnknown * | GetInterfaceHook (const void *pv)
CInterfaceInfo * GetMethodInfo ()
BOOL | GetPropertyPageCLSIDs (CArray< CLSID, CLSID & > &aclsidPages)
BOOL | HasUIActiveState () const
DWORD | HitTest (CPoint point)
void | InvalidateItem ()
void | InvokeMethods ()
BOOL | IsInPlaceActive () const
BOOL | IsInsideOut () const
BOOL | IsInvisibleAtRuntime () const
BOOL | IsUIActive () const
BOOL | IsWindowless () const
void | Move (const CRect &rect)
virtual void | OnActivate ()
void | OnActivateUI ()
void | OnAmbientPropertyChange (DISPID dispid)
virtual void | OnChange (OLE_NOTIFICATION wNotification, DWORD dwParam)
void | OnDeactivate ()
void | OnDeactivate (BOOL tNoRedraw)
void | OnDeselect ()
virtual void | OnEvent (DISPID dispid, DISPPARAMS *pdpParams)
COleDataSource * | OnGetClipboardData (BOOL tIncludeLink, LPPOINT pptOffset, LPSIZE pSize)
DWORD | OnPointerInactiveMove (CPoint point, DWORD dwKeyState)
DWORD | OnPointerInactiveSetCursor (CPoint point, DWORD dwMouseMessage, BOOL *ptHandled)
void | OnSelect ()
BOOL | OnWindowlessDragEnter (COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect)
void | OnWindowlessDragLeave ()
void | OnWindowlessDragOver (DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect)
void | OnWindowlessDrop (COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect)
BOOL | OnWindowMessage (const MSG *pMessage)
void | Prepare ()
BOOL | QuickActivate ()
void | ReadItem (CArchive &ar)
HRESULT | SaveToPropertyBag (IPropertyBag *pPropertyBag)
HRESULT | SaveToStorage (IStorage *pStorage)
HRESULT | SaveToStream (IStream *pStream)
void | SetLoggingOptions ()
BOOL | ShouldActivateWhenVisible ()
BOOL | SupportsIPointerInactive () const
void | UpdateFromServerExtent ()
void | UpdateStatusBar ()
void | WriteItem (CArchive &ar)

Public Attributes

DISPID | m_dispidEvent
DISPPARAMS | m_dpLastParams
DWORD | m_dwAspectPass2
DWORD | m_dwEventCookie
DWORD | m_dwMiscStatus
DWORD | m_dwPropertyCookie
DWORD | m_dwViewStatus
CInterfaceInfo m_infoEvents
CInterfaceInfo m_infoMethods
IDispatchPtr | m_pCtlDispatch
IDropTargetPtr | m_pDropTarget
IConnectionPointPtr | m_pEventCP
ITCExtendedControlPtr | m_pExtendedControl
IOleControlPtr | m_pOleControl
IOleInPlaceObjectWindowlessPtr | m_pOleInPlaceObjectWindowless
IPointerInactivePtr | m_pPointerInactive
IConnectionPointPtr | m_pPropertyCP
IViewObjectExPtr | m_pViewObjectEx
CRect | m_rect
BOOL | m_tDisplayAsDefault
BOOL | m_tExtendedControl
BOOL | m_tWindowless

Protected Member Functions

STDMETHOD() | AdjustRect (LPRECT prect)
STDMETHOD() | CanInPlaceActivate ()
STDMETHOD() | CanWindowlessActivate ()
void | CleanupParams ()
STDMETHOD() | ContextSensitiveHelp (BOOL tEnterMode)
void | CopyParams (DISPPARAMS *pdpParams)
STDMETHOD() | DeactivateAndUndo ()
STDMETHOD() | DiscardUndoState ()
END_INTERFACE_PART (OleInPlaceSiteWindowless)
BOOL | FinishCreate (HRESULT hr)
IBindHost * | GetBindHost ()
STDMETHOD() | GetCapture ()
HRESULT | GetControlInfo ()
STDMETHOD() | GetDC (LPCRECT prect, DWORD dwFlags, HDC *phDC)
STDMETHOD() | GetExtendedControl (IDispatch **ppExtendedControl)
STDMETHOD() | GetFocus ()
STDMETHOD() | GetIDsOfNames (REFIID iid, LPOLESTR *ppszNames, UINT nNames, LCID lcid, DISPID *pDispIDs)
STDMETHOD() | GetIDsOfNames (REFIID iid, LPOLESTR *ppszNames, UINT nNames, LCID lcid, DISPID *pDispIDs)
STDMETHOD() | GetTypeInfo (UINT iTypeInfo, LCID lcid, ITypeInfo **ppTypeInfo)
STDMETHOD() | GetTypeInfo (UINT iTypeInfo, LCID lcid, ITypeInfo **ppTypeInfo)
STDMETHOD() | GetTypeInfoCount (UINT *pnInfoCount)
STDMETHOD() | GetTypeInfoCount (UINT *pnInfoCount)
STDMETHOD() | GetWindow (HWND *phWnd)
STDMETHOD() | GetWindowContext (IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT prectPos, LPRECT prectClip, LPOLEINPLACEFRAMEINFO pFrameInfo)
HRESULT | InitControlInfo ()
STDMETHOD() | InvalidateRect (LPCRECT prect, BOOL tErase)
STDMETHOD() | InvalidateRgn (HRGN hRgn, BOOL tErase)
STDMETHOD() | Invoke (DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError)
STDMETHOD() | Invoke (DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError)
STDMETHOD() | LockInPlaceActive (BOOL tLock)
STDMETHOD() | OnChanged (DISPID dispid)
virtual BOOL | OnChangeItemPosition (const CRect &rectPos)
STDMETHOD() | OnControlInfoChanged ()
virtual void | OnDeactivateUI (BOOL bUndoable)
STDMETHOD() | OnDefWindowMessage (UINT nMessage, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
STDMETHOD() | OnFocus (BOOL tGotFocus)
void | OnFocus (BOOL tGotFocus)
virtual void | OnGetClipRect (CRect &rPosition)
virtual void | OnGetItemPosition (CRect &rPosition)
STDMETHOD() | OnInPlaceActivate ()
STDMETHOD() | OnInPlaceActivateEx (BOOL *ptNoRedraw, DWORD dwFlags)
STDMETHOD() | OnInPlaceDeactivate ()
STDMETHOD() | OnInPlaceDeactivateEx (BOOL tNoRedraw)
STDMETHOD() | OnPosRectChange (LPCRECT prectPos)
STDMETHOD() | OnRequestEdit (DISPID dispid)
STDMETHOD() | OnUIActivate ()
STDMETHOD() | OnUIDeactivate (BOOL tUndoable)
STDMETHOD() | QueryService (REFGUID guidService, REFIID iid, void **ppService)
void | Release (OLECLOSE dwCloseOption=OLECLOSE_NOSAVE)
STDMETHOD() | ReleaseDC (HDC hDC)
STDMETHOD() | RequestUIActivate ()
STDMETHOD() | Scroll (SIZE sizeExtent)
STDMETHOD() | ScrollRect (int dx, int dy, LPCRECT prectScroll, LPCRECT prectClip)
virtual void | Serialize (CArchive &ar)
STDMETHOD() | SetCapture (BOOL tCapture)
STDMETHOD() | SetFocus (BOOL tFocus)
STDMETHOD() | ShowPropertyFrame ()
STDMETHOD_ (void, OnViewChange)(DWORD dwAspect
STDMETHOD_ (void, OnDataChange)(FORMATETC *pFormatEtc
STDMETHOD_ (void, OnSave)()
STDMETHOD_ (void, OnViewStatusChange)(DWORD dwViewStatus)
STDMETHOD_ (void, OnRename)(IMoniker *pMoniker)
STDMETHOD_ (void, OnClose)()
STDMETHOD() | TransformCoords (POINTL *pptHiMetric, POINTF *pptContainer, DWORD dwFlags)
STDMETHOD() | TranslateAccelerator (LPMSG pMessage, DWORD dwModifiers)

Protected Attributes

LONG | lindex
CONTROLINFO | m_infoControl
IBindHostPtr | m_pBindHost
CDC * | m_pDC
CString | m_strDisplayName
BOOL | m_tInsideOut
CRectTracker | m_tracker
STGMEDIUM * | pStgMedium

Detailed Description

Definition at line 31 of file TCItem.H.

Constructor & Destructor Documentation

CTestContainer98Item::CTestContainer98Item ( CTestContainer98Doc * pContainer = NULL )

Definition at line 25 of file TCItem.Cpp.

                                                                            :
   COleClientItem( pContainer ),
   m_rect( 10, 10, 210, 210 ),
   m_dwEventCookie( 0 ),
   m_dwPropertyCookie( 0 ),
   m_tInsideOut( FALSE ),
   m_pDC( NULL ),
   m_tWindowless( FALSE ),
   m_tExtendedControl( FALSE ),
   m_tDisplayAsDefault( FALSE ),
   m_dwAspectPass2( DVASPECT_CONTENT )
{
   m_dpLastParams.cArgs = 0;
   m_dpLastParams.cNamedArgs = 0;
   m_dpLastParams.rgvarg = NULL;
   m_dpLastParams.rgdispidNamedArgs = NULL;

   m_tracker.m_nHandleSize = MARGIN_PIXELS+1;
   m_tracker.m_sizeMin.cx = 8;  // +MARGIN_PIXELS
   m_tracker.m_sizeMin.cy = 8;  // +MARGIN_PIXELS
   m_tracker.m_nStyle = CRectTracker::solidLine;
}

CTestContainer98Item::~CTestContainer98Item ( )

Definition at line 48 of file TCItem.Cpp.

{
   ASSERT( m_pDC == NULL );

   CleanupParams();
}

Member Function Documentation

BOOL CTestContainer98Item::ActsLikeButton ( ) const

Definition at line 981 of file TCItem.Cpp.

{
   return( m_dwMiscStatus&OLEMISC_ACTSLIKEBUTTON );
}

STDMETHOD() CTestContainer98Item::AdjustRect ( LPRECT prect ) [protected]
STDMETHOD() CTestContainer98Item::CanInPlaceActivate ( ) [protected]
STDMETHOD() CTestContainer98Item::CanWindowlessActivate ( ) [protected]
void CTestContainer98Item::CleanupParams ( ) [protected]

Definition at line 315 of file TCItem.Cpp.

{
   UINT iArg;
   DISPPARAMS* pdpParams;

   ASSERT_VALID( this );

   pdpParams = &m_dpLastParams;
   if( pdpParams->rgvarg != NULL )
   {
    for( iArg = 0; iArg < pdpParams->cArgs; iArg++ )
    {
     VariantClear( &pdpParams->rgvarg[iArg] );
    }

    delete[] (COleVariant*)pdpParams->rgvarg;
    pdpParams->rgvarg = NULL;
   }

   if( pdpParams->rgdispidNamedArgs != NULL )
   {
    delete[] pdpParams->rgdispidNamedArgs;
    pdpParams->rgdispidNamedArgs = NULL;
   }
}

void CTestContainer98Item::CommitItem ( BOOL bSuccess )

Definition at line 1314 of file TCItem.Cpp.

{
   IPersistStoragePtr pPersistStorage;

   if( !m_bNeedCommit )
   {
    return;
   }

   if( (m_lpNewStorage != NULL) && !bSuccess )
   {
    m_lpNewStorage->Release();
    m_lpNewStorage = NULL;
   }

   pPersistStorage = m_lpObject;
   // If the object doesn't support IPersistStorage, then we used
   // IPersistStreamInit in a stream inside the storage.
   if( pPersistStorage != NULL )
   {
    VERIFY( pPersistStorage->SaveCompleted( m_lpNewStorage ) == S_OK );
   }

   if( m_lpNewStorage != NULL )
   {
    m_lpStorage->Release();
    m_lpStorage = m_lpNewStorage;
    m_lpNewStorage = NULL;
   }

   m_bNeedCommit = FALSE;
}

STDMETHOD() CTestContainer98Item::ContextSensitiveHelp ( BOOL tEnterMode ) [protected]
void CTestContainer98Item::CopyParams ( DISPPARAMS * pdpParams ) [protected]

Definition at line 341 of file TCItem.Cpp.

{
   UINT iArg;

   if( pdpParams == NULL )
   {
    return;  // Can't copy bogus params.
   }

   if( m_dpLastParams.cArgs > 0 )
   {
    CleanupParams();
   }

   // Change state information about incoming.
   m_dpLastParams.cArgs = pdpParams->cArgs;
   if( pdpParams->cArgs == 0 )
   {
    m_dpLastParams.rgvarg = NULL;
   }
   else
   {
    m_dpLastParams.rgvarg = new COleVariant[pdpParams->cArgs];
   }

   m_dpLastParams.cNamedArgs = pdpParams->cNamedArgs;
   if( pdpParams->cNamedArgs == 0 )
   {
    m_dpLastParams.rgdispidNamedArgs = NULL;
   }
   else
   {
    m_dpLastParams.rgdispidNamedArgs = new DISPID[m_dpLastParams.cNamedArgs];
    for( iArg = 0; iArg < m_dpLastParams.cNamedArgs; iArg++ )
    {
     m_dpLastParams.rgdispidNamedArgs[iArg] =
      pdpParams->rgdispidNamedArgs[iArg];
    }
   }

   for( iArg = 0; iArg < m_dpLastParams.cArgs; iArg++ )
   {
    HRESULT hr = VariantCopy( &m_dpLastParams.rgvarg[iArg], &pdpParams->rgvarg[iArg] );
    if(FAILED(hr)) return; //not safe to continue
   }
}

void CTestContainer98Item::CopyToClipboard | ( | CArchive & | ar,
 |  | IStorage * | pStorage
 | ) |  |

Definition at line 1620 of file TCItem.Cpp.

{
   IPersistStoragePtr pPersistStorage;
   CLSID clsid;
   HRESULT hResult;

   ASSERT_VALID( this );
   ASSERT( ar.IsStoring() );

   ar<<GetDisplayName();
   ar<<m_rect;

   pPersistStorage = m_lpObject;
   if( pPersistStorage == NULL )
   {
    AfxThrowOleException( E_NOINTERFACE );
   }

   pPersistStorage->GetClassID( &clsid );
   hResult = WriteClassStg( pStorage, clsid );
   if( FAILED( hResult ) )
   {
    AfxThrowOleException( hResult );
   }

   hResult = pPersistStorage->Save( pStorage, FALSE );
   if( FAILED( hResult ) )
   {
    AfxThrowOleException( hResult );
   }

   hResult = pPersistStorage->SaveCompleted( NULL );
   if( FAILED( hResult ) )
   {
    AfxThrowOleException( hResult );
   }
}

BOOL CTestContainer98Item::Create | ( | REFCLSID | clsid,
 |  | LPCTSTR | pszName = NULL
 | ) |  |

Definition at line 310 of file TCItem.Cpp.

{
   return( CreateOrLoad( clsid, pszName, IID_NULL, NULL ) );
}

BOOL CTestContainer98Item::CreateFromClipboard | ( | CArchive & | ar,
 |  | IStorage * | pStorage
 | ) |  |

Definition at line 106 of file TCItem.Cpp.

{
   HRESULT hResult;
   CString strName;
   CLSID clsid;

   ASSERT( !ar.IsStoring() );
   ASSERT( pStorage != NULL );

   ar>>strName;
   ar>>m_rect;

   hResult = ReadClassStg( pStorage, &clsid );
   if( FAILED( hResult ) )
   {
    return( FALSE );
   }

   return( CreateOrLoad( clsid, strName, IID_IStorage, pStorage ) );
}

BOOL CTestContainer98Item::CreateOrLoad | ( | REFCLSID | clsid,
 |  | LPCTSTR | pszName,
 |  | REFIID | iidPersistanceMedium,
 |  | IUnknown * | pPeristanceMedium
 | ) |  |

Definition at line 128 of file TCItem.Cpp.

{
   HRESULT hResult;
   BOOL tSuccess;
   BOOL tQuickActivated;
   IPersistStreamInitPtr pPersistStreamInit;
   IPersistStreamPtr pPersistStream;
   IPersistStoragePtr pPersistStorage;
   IStreamPtr pStream;
   IStoragePtr pStorage;

   ASSERT( m_lpObject == NULL );
   ASSERT( m_pDocument != NULL );

   m_dwItemNumber = GetNewItemNumber();
   GetItemStorage();
   ASSERT( m_lpStorage != NULL );

   m_tExtendedControl = TRUE;
   hResult = CExtendedControl::CreateInstance( clsid, this, NULL,
    IID_IOleObject, (void**)&m_lpObject );
   if( FAILED( hResult ) )
   {
    m_tExtendedControl = FALSE;
    // The control may not like being aggregated on, so just try to create it
    // directly and punt the extended control stuff.
    hResult = CoCreateInstance( clsid, NULL, CLSCTX_INPROC_SERVER|
    CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER, IID_IOleObject,
     (void**)&m_lpObject );
    if( SUCCEEDED( hResult ) )
    {
     TCControlTrace( TRACELEVEL_NORMAL, this,
      "Could not aggregate on the control, so it won't support extended properties.\n" );
    }
   }
   if( SUCCEEDED( hResult ) )
   {
    CString strUserType;

    if( pszName == NULL )
    {
     GetUserType( USERCLASSTYPE_SHORT, strUserType );
     GetDocument()->CreateUniqueItemName( this, strUserType,
      m_strDisplayName );
    }
    else
    {
     GetDocument()->CreateUniqueItemName( this, pszName,
      m_strDisplayName );
    }
   }

   if( m_tExtendedControl )
   {
    CString strName;

    strName = GetDisplayName();
    m_pExtendedControl = m_lpObject;
    ASSERT( m_pExtendedControl != NULL );
    m_pExtendedControl->Name = _bstr_t( strName );
   }

   if( SUCCEEDED( hResult ) )
   {
    hResult = InitControlInfo();
   }

   tQuickActivated = FALSE;
   if( SUCCEEDED( hResult ) )
   {
    tQuickActivated = QuickActivate();

    if( !tQuickActivated )
    {
     m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &m_dwMiscStatus );
     if( m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST )
     {
      hResult = m_lpObject->SetClientSite( GetClientSite() );
      if( FAILED( hResult ) )
      {
         TCControlTrace( TRACELEVEL_NORMAL, this,
          "SetClientSite failed.\n" );
      }
     }
    }
   }

   // Initialize or load the object's state.
   if( SUCCEEDED( hResult ) )
   {
    if( iidPersistanceMedium == IID_NULL )
    {
     pPersistStreamInit = m_lpObject;
     if( pPersistStreamInit != NULL )
     {
      hResult = pPersistStreamInit->InitNew();
      if( hResult == E_NOTIMPL )
      {
         // Not implementing InitNew is OK.
         hResult = S_OK;
      }
     }
     else
     {
      pPersistStorage = m_lpObject;
      if( pPersistStorage != NULL )
      {
         hResult = pPersistStorage->InitNew( m_lpStorage );
      }
      else
      {
      // Assume the control doesn't care about persistance.
         hResult = S_OK;
      }
     }
    }
    else if( iidPersistanceMedium == IID_IStream )
    {
     pStream = pPersistanceMedium;
     ASSERT( pStream != NULL );

     pPersistStreamInit = m_lpObject;
     if( pPersistStreamInit != NULL )
     {
      hResult = pPersistStreamInit->Load( pStream );
     }
     else
     {
      pPersistStream = m_lpObject;
      if( pPersistStream != NULL )
      {
         hResult = pPersistStream->Load( pStream );
      }
      else
      {
         hResult = E_NOINTERFACE;
      }
     }
    }
    else if( iidPersistanceMedium == IID_IStorage )
    {
     pStorage = pPersistanceMedium;
     ASSERT( pStorage != NULL );

     pPersistStorage = m_lpObject;
     if( pPersistStorage != NULL )
     {
      hResult = pStorage->CopyTo( 0, NULL, NULL, m_lpStorage );
      if( SUCCEEDED( hResult ) )
      {
         hResult = pPersistStorage->Load( m_lpStorage );
      }
     }
     else
     {
      hResult = E_NOINTERFACE;
     }
    }
   }

   if( SUCCEEDED( hResult ) )
   {
    if( !tQuickActivated )
    {
     if( !(m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST) )
     {
      hResult = m_lpObject->SetClientSite( GetClientSite() );
      if( FAILED( hResult ) )
      {
         TCControlTrace( TRACELEVEL_NORMAL, this,
          "SetClientSite failed.\n" );
      }
     }
    }
   }

   tSuccess = FinishCreate( hResult );

   return( tSuccess );
}

STDMETHOD() CTestContainer98Item::DeactivateAndUndo ( ) [protected]
STDMETHOD() CTestContainer98Item::DiscardUndoState ( ) [protected]
void CTestContainer98Item::DisplayAsDefault ( BOOL tDefault )

Definition at line 2586 of file TCItem.Cpp.

{
   BOOL tOldDisplayAsDefault;

   ASSERT( ActsLikeButton() );

   tOldDisplayAsDefault = m_tDisplayAsDefault;
   m_tDisplayAsDefault = tDefault;

   if( (tOldDisplayAsDefault && !m_tDisplayAsDefault) ||
    (!tOldDisplayAsDefault && m_tDisplayAsDefault) )
   {
    // The default setting changed.
    m_pOleControl->OnAmbientPropertyChange(
     DISPID_AMBIENT_DISPLAYASDEFAULT );
   }
}

BOOL CTestContainer98Item::Draw | ( | CDC * | pDC,
 |  | LPCRECT | prectBounds,
 |  | DVASPECT | nDrawAspect = DVASPECT( -1 )
 | ) |  |

Definition at line 3105 of file TCItem.Cpp.

{
   RECTL rclBounds;
   RECTL* prclBounds;
   CRect rectClip;
   CSize size;

   if( (m_lpObject == NULL) || (m_lpViewObject == NULL) )
   {
    return( FALSE );
   }

   if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
   {
    // We are invisible.
    return( FALSE );
   }

   // use current draw aspect if aspect is -1 (default)
   if( nDrawAspect == -1 )
   {
    nDrawAspect = m_nDrawAspect;
   }

   // convert RECT lpBounds to RECTL rclBounds
   rclBounds.left = prectBounds->left;
   rclBounds.top = prectBounds->top;
   rclBounds.right = prectBounds->right;
   rclBounds.bottom = prectBounds->bottom;

   if( m_tWindowless )
   {
    prclBounds = NULL;
   }
   else
   {
    prclBounds = &rclBounds;
   }

   m_lpViewObject->Draw( DVASPECT_CONTENT, -1, NULL, NULL, NULL, pDC->m_hDC,
    prclBounds, NULL, NULL, 0 );

   return( TRUE );
}

BOOL CTestContainer98Item::DrawBackToFront | ( | CDC * | pDC,
 |  | LPCRECT | prectBounds
 | ) |  |

Definition at line 3043 of file TCItem.Cpp.

{
   RECTL rclBounds;
   RECTL* prclBounds;
   DWORD dwViewStatus;

   if( (m_lpObject == NULL) || (m_lpViewObject == NULL) )
   {
    return( FALSE );
   }

   if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
   {
    // We are invisible.
    return( FALSE );
   }

   if( IsInPlaceActive() && !m_tWindowless )
   {
    return( FALSE );
   }

   // convert RECT lpBounds to RECTL rclBounds
   rclBounds.left = prectBounds->left;
   rclBounds.top = prectBounds->top;
   rclBounds.right = prectBounds->right;
   rclBounds.bottom = prectBounds->bottom;

   if( m_tWindowless )
   {
    prclBounds = NULL;
   }
   else
   {
    prclBounds = &rclBounds;
   }

   if( m_pViewObjectEx != NULL )
   {
    m_pViewObjectEx->GetViewStatus( &dwViewStatus );
    ASSERT( dwViewStatus == m_dwViewStatus );
   }
   else
   {
    ASSERT( m_dwViewStatus == 0 );
   }

   if( (m_dwAspectPass2 == DVASPECT_TRANSPARENT)&&(m_dwViewStatus&
    VIEWSTATUS_DVASPECTTRANSPARENT) )
   {
    m_lpViewObject->Draw( DVASPECT_TRANSPARENT, -1, NULL, NULL, NULL,
     pDC->m_hDC, prclBounds, NULL, NULL, 0 );
   }
   else if( m_dwAspectPass2 == DVASPECT_CONTENT )
   {
    m_lpViewObject->Draw( DVASPECT_CONTENT, -1, NULL, NULL, NULL, pDC->m_hDC,
     prclBounds, NULL, NULL, 0 );
   }

   return( TRUE );
}

BOOL CTestContainer98Item::DrawFrontToBack | ( | CDC * | pDC,
 |  | LPCRECT | prectBounds
 | ) |  |

Definition at line 2958 of file TCItem.Cpp.

{
   HRESULT hResult;
   RECTL rclBounds;
   RECTL* prclBounds;
   DWORD dwViewStatus;
   RECTL rclClip;
   CRect rectClip;
   CSize size;

   if( (m_lpObject == NULL) || (m_lpViewObject == NULL) )
   {
    return( FALSE );
   }

   if( IsInPlaceActive() && !m_tWindowless )
   {
    return( FALSE );
   }

   if( m_pViewObjectEx == NULL )
   {
    // The control doesn't understand two-pass drawing, so just draw it on
    // pass 2.
    return( FALSE );
   }

   if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
   {
    // We are invisible.
    return( FALSE );
   }

   // convert RECT lpBounds to RECTL rclBounds
   rclBounds.left = prectBounds->left;
   rclBounds.top = prectBounds->top;
   rclBounds.right = prectBounds->right;
   rclBounds.bottom = prectBounds->bottom;

   if( m_tWindowless )
   {
    prclBounds = NULL;
   }
   else
   {
    prclBounds = &rclBounds;
   }

   // Assume that we won't be able to draw the first pass.
   m_dwAspectPass2 = DVASPECT_CONTENT;

   m_pViewObjectEx->GetViewStatus( &dwViewStatus );
   ASSERT( m_dwViewStatus == dwViewStatus );
   if( !(m_dwViewStatus&VIEWSTATUS_DVASPECTOPAQUE) )
   {
    return( FALSE );
   }

   hResult = m_pViewObjectEx->GetRect( DVASPECT_OPAQUE, &rclClip );
   if( FAILED( hResult ) )
   {
    return( FALSE );
   }

   hResult = m_lpViewObject->Draw( DVASPECT_OPAQUE, -1, NULL, NULL, NULL,
    pDC->m_hDC, prclBounds, NULL, NULL, 0 );
   if( SUCCEEDED( hResult ) )
   {
    // Just draw the transparent part in pass 2.
    m_dwAspectPass2 = DVASPECT_TRANSPARENT;
   }

   size = CSize( rclClip.left, rclClip.top );
   pDC->HIMETRICtoDP( &size );
   rectClip.left = m_rect.left+size.cx;
   rectClip.top = m_rect.top+size.cy;
   size = CSize( rclClip.right, rclClip.bottom );
   pDC->HIMETRICtoDP( &size );
   rectClip.right = m_rect.left+size.cx;
   rectClip.bottom = m_rect.top+size.cy;
   pDC->ExcludeClipRect( &rectClip );

   return( TRUE );
}

CTestContainer98Item::END_INTERFACE_PART ( OleInPlaceSiteWindowless ) [protected]
BOOL CTestContainer98Item::FinishCreate ( HRESULT hr ) [protected]

Definition at line 523 of file TCItem.Cpp.

{
   BOOL tSuccess;
   IConnectionPointContainerPtr pCPContainer;
   HRESULT hResult;

   tSuccess = COleClientItem::FinishCreate( hr );
   if( !tSuccess )
   {
    return( tSuccess );
   }

   hResult = m_lpObject->QueryInterface( IID_IOleControl,
    (void**)&m_pOleControl );
   if( FAILED( hResult ) )
   {
    // That's OK, it might not be a control
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Could not get object's IOleControl interface\n" );
   }

   hResult = m_lpObject->QueryInterface( IID_IConnectionPointContainer,
    (void**)&pCPContainer );
   if( SUCCEEDED( hResult ) )
   {
    if( m_dwEventCookie == 0 )
    {
     hResult = pCPContainer->FindConnectionPoint( m_infoEvents.GetIID(),
      &m_pEventCP );
     if( SUCCEEDED( hResult ) )
     {
      m_pEventCP->Advise( &m_xEventHandler, &m_dwEventCookie );
     }
    }

    if( m_dwPropertyCookie == 0 )
    {
     hResult = pCPContainer->FindConnectionPoint( IID_IPropertyNotifySink,
      &m_pPropertyCP );
     if( SUCCEEDED( hResult ) )
     {
      m_pPropertyCP->Advise( &m_xPropertyNotifySink,
         &m_dwPropertyCookie );
     }
    }
   }

   m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &m_dwMiscStatus );
   if( m_dwMiscStatus&OLEMISC_INSIDEOUT )
   {
    TCControlTrace( TRACELEVEL_VERBOSE, this, "Control is inside-out\n" );
    m_tInsideOut = TRUE;
   }

   hResult = m_lpObject->QueryInterface( IID_IPointerInactive,
    (void**)&m_pPointerInactive );
   if( SUCCEEDED( hResult ) )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Control supports IPointerInactive.\n" );
   }

   hResult = m_lpObject->QueryInterface( IID_IViewObjectEx,
    (void**)&m_pViewObjectEx );
   if( SUCCEEDED( hResult ) )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Control supports IViewObjectEx.\n" );
    m_pViewObjectEx->GetViewStatus( &m_dwViewStatus );
   }
   else
   {
    m_dwViewStatus = 0;
   }

   UpdateFromServerExtent();

   // Activate the item if it wants to be active all the time.
   if( ShouldActivateWhenVisible() )
   {
    if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
    {
     DoVerb( OLEIVERB_HIDE, GetDocument()->GetView() );
    }
    else
    {
     DoVerb( OLEIVERB_SHOW, GetDocument()->GetView() );
    }
   }

   return( TRUE );
}

void CTestContainer98Item::FreezeEvents ( BOOL tFreeze )

Definition at line 2604 of file TCItem.Cpp.

{
   if( m_pOleControl != NULL )
   {
    m_pOleControl->FreezeEvents( tFreeze );
   }
}

DWORD CTestContainer98Item::GetActivationPolicy ( ) const

Definition at line 986 of file TCItem.Cpp.

{
   DWORD dwPolicy;
   HRESULT hResult;

   ASSERT( m_pPointerInactive != NULL );
   ASSERT( !IsInPlaceActive() );

   hResult = m_pPointerInactive->GetActivationPolicy( &dwPolicy );
   if( FAILED( hResult ) )
   {
    return( 0 );
   }

   return( dwPolicy );
}

CTestContainer98View* CTestContainer98Item::GetActiveView ( ) [inline]

Definition at line 49 of file TCItem.H.

   {
    return( GetDocument()->GetView() );
   }

IBindHost * CTestContainer98Item::GetBindHost ( ) [protected]

Definition at line 1703 of file TCItem.Cpp.

{
   HRESULT hResult;

   if( m_pBindHost == NULL )
   {
    hResult = CTCBindHost::CreateInstance( IID_IBindHost,
     (void**)&m_pBindHost );
    if( FAILED( hResult ) )
    {
     return( NULL );
    }
   }
   ASSERT( m_pBindHost != NULL );

   return( m_pBindHost );
}

STDMETHOD() CTestContainer98Item::GetCapture ( ) [protected]
HRESULT CTestContainer98Item::GetControlInfo ( ) [protected]

Definition at line 632 of file TCItem.Cpp.

{
   HRESULT hResult;

   m_infoControl.cb = sizeof( m_infoControl );
   m_infoControl.hAccel = NULL;
   m_infoControl.cAccel = 0;
   m_infoControl.dwFlags = 0;
   hResult = m_pOleControl->GetControlInfo( &m_infoControl );
   if( FAILED( hResult ) )
   {
    if( hResult == E_NOTIMPL )
    {
     TCControlTrace( TRACELEVEL_NORMAL, this,
      "IOleControl::GetControlInfo() not implemented\n" );
    }
    else
    {
     return( hResult );
    }
   }

   return( S_OK );
}

STDMETHOD() CTestContainer98Item::GetDC | ( | LPCRECT | prect,
 |  | DWORD | dwFlags,
 |  | HDC * | phDC |
 | ) |  |  | [protected]
CString CTestContainer98Item::GetDisplayName ( )

Definition at line 616 of file TCItem.Cpp.

{
   CString strName;

   if( m_pExtendedControl != NULL )
   {
    strName = BSTR( m_pExtendedControl->Name );
   }
   else
   {
    strName = m_strDisplayName;
   }

   return( strName );
}

CTestContainer98Doc* CTestContainer98Item::GetDocument ( ) [inline]

Definition at line 45 of file TCItem.H.

   {
    return( (CTestContainer98Doc*)COleClientItem::GetDocument() );
   }

CInterfaceInfo * CTestContainer98Item::GetEventInfo ( )

Definition at line 1721 of file TCItem.Cpp.

{
   return( &m_infoEvents );
}

STDMETHOD() CTestContainer98Item::GetExtendedControl ( IDispatch ** ppExtendedControl ) [protected]
STDMETHOD() CTestContainer98Item::GetFocus ( ) [protected]
STDMETHOD() CTestContainer98Item::GetIDsOfNames | ( | REFIID | iid,
 |  | LPOLESTR * | ppszNames,
 |  | UINT | nNames,
 |  | LCID | lcid,
 |  | DISPID * | pDispIDs |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::GetIDsOfNames | ( | REFIID | iid,
 |  | LPOLESTR * | ppszNames,
 |  | UINT | nNames,
 |  | LCID | lcid,
 |  | DISPID * | pDispIDs |
 | ) |  |  | [protected]
IUnknown * CTestContainer98Item::GetInterfaceHook ( const void * pv )

Definition at line 55 of file TCItem.Cpp.

{
   const IID* piid;

#ifdef _DEBUG
   // The standard MFC implementation of QueryInterface doesn't switch module
   // states, since most objects just use static data to implement QI.  Since
   // we're calling GetDocument(), though, we wind up calling ASSERT_VALID on
   // a bunch of MFC objects, and that requires the correct module state.
   // Because ASSERT_VALID doesn't do anything in release builds, we only need
   // to switch module states in debug builds.
   AFX_MANAGE_STATE( m_pModuleState );
#endif  // _DEBUG

   piid = (const IID*)pv;

   if( *piid == m_infoEvents.GetIID() )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this, "QI for event handler.\n" );
    return( &m_xEventHandler );
   }
   else if( *piid == IID_IOleInPlaceSiteEx )
   {
    if( GetDocument()->SupportsInterface( IID_IOleInPlaceSiteEx ) )
    {
     TCControlTrace( TRACELEVEL_NORMAL, this,
      "QI for IOleInPlaceSiteEx.\n" );
     return( &m_xOleInPlaceSiteWindowless );
    }
   }
   else if( *piid == IID_IOleInPlaceSiteWindowless )
   {
    if( GetDocument()->SupportsInterface( IID_IOleInPlaceSiteWindowless ) )
    {
     TCControlTrace( TRACELEVEL_NORMAL, this,
      "QI for IOleInPlaceSiteWindowless.\n" );
     return( &m_xOleInPlaceSiteWindowless );
    }
   }
   else if( *piid == IID_IAdviseSinkEx )
   {
    if( GetDocument()->SupportsInterface( IID_IAdviseSinkEx ) )
    {
     TCControlTrace( TRACELEVEL_NORMAL, this, "QI for IAdviseSinkEx.\n" );
     return( &m_xAdviseSinkEx );
    }
   }

   return( NULL );
}

CInterfaceInfo * CTestContainer98Item::GetMethodInfo ( )

Definition at line 1726 of file TCItem.Cpp.

{
   return( &m_infoMethods );
}

BOOL CTestContainer98Item::GetPropertyPageCLSIDs ( CArray< CLSID, CLSID & > & aclsidPages )

Definition at line 738 of file TCItem.Cpp.

{
   ISpecifyPropertyPagesPtr pSpecify;
   CAUUID pages;
   HRESULT hResult;
   ULONG iPage;
   CLSID clsid;

   pSpecify = m_lpObject;
   if( pSpecify != NULL )
   {
    pages.cElems = 0;
    pages.pElems = NULL;
    hResult = pSpecify->GetPages( &pages );
    if( FAILED( hResult ) )
    {
     TCControlTrace( TRACELEVEL_NORMAL, this,
      "ISpecifyPropertyPages::GetPages() failed\n" );
     return( FALSE );
    }

    for( iPage = 0; iPage < pages.cElems; iPage++ )
    {
     aclsidPages.Add( pages.pElems[iPage] );
    }

    CoTaskMemFree( pages.pElems );
   }

   if( m_pExtendedControl != NULL )
   {
    clsid = __uuidof( TCExtPage );
    aclsidPages.Add( clsid );
   }

   return( TRUE );
}

STDMETHOD() CTestContainer98Item::GetTypeInfo | ( | UINT | iTypeInfo,
 |  | LCID | lcid,
 |  | ITypeInfo ** | ppTypeInfo |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::GetTypeInfo | ( | UINT | iTypeInfo,
 |  | LCID | lcid,
 |  | ITypeInfo ** | ppTypeInfo |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::GetTypeInfoCount ( UINT * pnInfoCount ) [protected]
STDMETHOD() CTestContainer98Item::GetTypeInfoCount ( UINT * pnInfoCount ) [protected]
STDMETHOD() CTestContainer98Item::GetWindow ( HWND * phWnd ) [protected]
STDMETHOD() CTestContainer98Item::GetWindowContext | ( | IOleInPlaceFrame ** | ppFrame,
 |  | IOleInPlaceUIWindow ** | ppDoc,
 |  | LPRECT | prectPos,
 |  | LPRECT | prectClip,
 |  | LPOLEINPLACEFRAMEINFO | pFrameInfo |
 | ) |  |  | [protected]
BOOL CTestContainer98Item::HasUIActiveState ( ) const

Definition at line 2717 of file TCItem.Cpp.

{
   DWORD dwMiscStatus;

   dwMiscStatus = 0;
   m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &dwMiscStatus );

   return( !(dwMiscStatus&OLEMISC_NOUIACTIVATE) );
}

DWORD CTestContainer98Item::HitTest ( CPoint point )

Definition at line 2922 of file TCItem.Cpp.

{
   HRESULT hResult;
   IViewObjectExPtr pViewObjectEx;
   DWORD dwHitResult;

   if( m_lpObject == NULL )
   {
     return( HITRESULT_OUTSIDE );
   }
   if( !m_rect.PtInRect( point ) )
   {
    // Trivially reject the point.
    return( HITRESULT_OUTSIDE );
   }

   hResult = m_lpObject->QueryInterface( IID_IViewObjectEx,
    (void**)&pViewObjectEx );
   if( SUCCEEDED( hResult ) )
   {
    hResult = pViewObjectEx->QueryHitPoint( DVASPECT_CONTENT, &m_rect, point,
     0, &dwHitResult );
    if( SUCCEEDED( hResult ) )
    {
     return( dwHitResult );
    }
   }

   // If we got here, either the object doesn't support hit testing, or the hit
   // test call failed.  Since we would have rejected the point if it didn't
   // lie within the object's bounding rect, we know that the point lies within
   // the object.

   return( HITRESULT_HIT );
}

HRESULT CTestContainer98Item::InitControlInfo ( ) [protected]

Definition at line 778 of file TCItem.Cpp.

{
   IProvideClassInfoPtr pPCI;
   ITypeInfoPtr pClassInfo;
   ITypeInfoPtr pTypeInfo;
   HRESULT hResult;
   UINT iType;
   int iFlags;
   HREFTYPE hRefType;
   BOOL tFoundDefaultSource;
   BOOL tFoundDefaultInterface;

   hResult = m_lpObject->QueryInterface( IID_IProvideClassInfo,
    (void**)&pPCI );
   if( FAILED( hResult ) )
   {
   TCControlTrace( TRACELEVEL_NORMAL, this,
    "Control doesn't support IProvideClassInfo" );
    return( S_OK );
   }

   hResult = pPCI->GetClassInfo( &pClassInfo );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   CSmartTypeAttr pTypeAttr( pClassInfo );

   hResult = pClassInfo->GetTypeAttr( &pTypeAttr );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }
   ASSERT( pTypeAttr->typekind == TKIND_COCLASS );

   tFoundDefaultSource = FALSE;
   tFoundDefaultInterface = FALSE;
   for( iType = 0; (iType < pTypeAttr->cImplTypes) && !(tFoundDefaultSource &&
    tFoundDefaultInterface); iType++ )
   {
    hResult = pClassInfo->GetImplTypeFlags( iType, &iFlags );
    if( SUCCEEDED( hResult ) )
    {
     if( (iFlags&IMPLTYPE_MASK) == IMPLTYPE_DEFAULTSOURCE )
     {
      ASSERT( !tFoundDefaultSource );
      tFoundDefaultSource = TRUE;
      hResult = pClassInfo->GetRefTypeOfImplType( iType, &hRefType );
      if( FAILED( hResult ) )
      {
         return( hResult );
      }
      hResult = pClassInfo->GetRefTypeInfo( hRefType, &pTypeInfo );
      if( FAILED( hResult ) )
      {
         return( hResult );
      }
      TRACE( "Events:\n" );
      hResult = m_infoEvents.Init( pTypeInfo );
      if( FAILED( hResult ) )
      {
         return( hResult );
      }
      pTypeInfo.Release();
     }
     else if( (iFlags&IMPLTYPE_MASK) == IMPLTYPE_DEFAULTINTERFACE )
     {
      ASSERT( !tFoundDefaultInterface );
      tFoundDefaultInterface = TRUE;
      hResult = pClassInfo->GetRefTypeOfImplType( iType, &hRefType );
      if( FAILED( hResult ) )
      {
         return( hResult );
      }
      hResult = pClassInfo->GetRefTypeInfo( hRefType, &pTypeInfo );
      if( FAILED( hResult ) )
      {
         return( hResult );
      }
      TRACE( "Methods\n" );
      hResult = m_infoMethods.Init( pTypeInfo );
      if( FAILED( hResult ) )
      {
         return( hResult );
      }
      pTypeInfo.Release();
     }
    }
   }
   if( !tFoundDefaultSource )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Could not find control's default source\n" );
   }
   if( !tFoundDefaultInterface )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Could not find control's default interface\n" );
    return( E_FAIL );
   }

   return( S_OK );
}

void CTestContainer98Item::InvalidateItem ( )

Definition at line 1786 of file TCItem.Cpp.

{
   GetDocument()->UpdateAllViews( NULL, HINT_UPDATE_ITEM, this );
}

STDMETHOD() CTestContainer98Item::InvalidateRect | ( | LPCRECT | prect,
 |  | BOOL | tErase |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::InvalidateRgn | ( | HRGN | hRgn,
 |  | BOOL | tErase |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::Invoke | ( | DISPID | dispidMember,
 |  | REFIID | iid,
 |  | LCID | lcid,
 |  | WORD | wFlags,
 |  | DISPPARAMS * | pdpParams,
 |  | VARIANT * | pvarResult,
 |  | EXCEPINFO * | pExceptionInfo,
 |  | UINT * | piArgError |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::Invoke | ( | DISPID | dispidMember,
 |  | REFIID | iid,
 |  | LCID | lcid,
 |  | WORD | wFlags,
 |  | DISPPARAMS * | pdpParams,
 |  | VARIANT * | pvarResult,
 |  | EXCEPINFO * | pExceptionInfo,
 |  | UINT * | piArgError |
 | ) |  |  | [protected]
void CTestContainer98Item::InvokeMethods ( )

Definition at line 1873 of file TCItem.Cpp.

{
   HRESULT hResult;
   IDispatchPtr pDispatch;

   if( GetMethodInfo()->GetNumMethods() == 0 )
   {
    AfxMessageBox( IDS_CONTROLHASNOMETHODS );
    return;
   }

   hResult = m_lpObject->QueryInterface( IID_IDispatch, (void**)&pDispatch );
   if( FAILED( hResult ) )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Failed to get object's primary IDispatch interface.\n" );
    return;
   }

   CMethodDlg dlg( NULL, pDispatch, &m_infoMethods );

   dlg.DoModal();
}

BOOL CTestContainer98Item::IsInPlaceActive ( ) const

Definition at line 2612 of file TCItem.Cpp.

{
   UINT eState;

   eState = GetItemState();

   return( (eState == activeState) || (eState == activeUIState) );
}

BOOL CTestContainer98Item::IsInsideOut ( ) const

Definition at line 2727 of file TCItem.Cpp.

{
   return( m_tInsideOut );
}

BOOL CTestContainer98Item::IsInvisibleAtRuntime ( ) const

Definition at line 883 of file TCItem.Cpp.

{
   return( m_dwMiscStatus&OLEMISC_INVISIBLEATRUNTIME );
}

BOOL CTestContainer98Item::IsUIActive ( ) const

Definition at line 2621 of file TCItem.Cpp.

{
   return( GetItemState() == activeUIState );
}

BOOL CTestContainer98Item::IsWindowless ( ) const

Definition at line 888 of file TCItem.Cpp.

{
   return( m_tWindowless );
}

STDMETHOD() CTestContainer98Item::LockInPlaceActive ( BOOL tLock ) [protected]
void CTestContainer98Item::Move ( const CRect & rect )

Definition at line 2732 of file TCItem.Cpp.

{
   BOOL tSizeChanged;
   CRect rectOld;
   CSize size;
   BOOL tSuccess;

   tSizeChanged = (rect.Size() != m_rect.Size());

   InvalidateItem();
   rectOld = m_rect;
   m_rect = rect;

   if( IsInPlaceActive() )
   {
    SetItemRects();
   }

   if( tSizeChanged )
   {
    CClientDC dc( NULL );

    tSuccess = TRUE;
    size = m_rect.Size();
    dc.DPtoHIMETRIC( &size );
    TRY
    {
     SetExtent( size );
    }
    CATCH( CException, e )
    {
     tSuccess = FALSE;
    }
    END_CATCH

    if( !tSuccess )
    {
     m_rect = rectOld;
     if( IsInPlaceActive() )
     {
      SetItemRects();
     }
    }
   }

   InvalidateItem();
}

void CTestContainer98Item::OnActivate ( ) [virtual]

Definition at line 1130 of file TCItem.Cpp.

{
   TCControlTrace( TRACELEVEL_NORMAL, this, "Activating control\n" );

   COleClientItem::OnActivate();

   UpdateStatusBar();
}

void CTestContainer98Item::OnActivateUI ( )

Definition at line 1139 of file TCItem.Cpp.

{
   CTestContainer98Item* pItem;
   CTestContainer98Doc* pDoc;
   POSITION posItem;

   TCControlTrace( TRACELEVEL_NORMAL, this, "UIActivating control\n" );

   // Allow only one UIActive item per frame.
   pDoc = GetDocument();
   posItem = pDoc->GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
    if( pItem->IsUIActive() )
    {
     ASSERT( pItem != this );
     pItem->DeactivateUI();
    }
   }

//   GetActiveView()->SetSelection( this );

   COleClientItem::OnActivateUI();

   UpdateStatusBar();
}

void CTestContainer98Item::OnAmbientPropertyChange ( DISPID dispid )

Definition at line 2626 of file TCItem.Cpp.

{
   m_pOleControl->OnAmbientPropertyChange( dispid );
}

void CTestContainer98Item::OnChange | ( | OLE_NOTIFICATION | wNotification,
 |  | DWORD | dwParam |
 | ) |  |  | [virtual]

Definition at line 1053 of file TCItem.Cpp.

{
  ASSERT_VALID( this );

  COleClientItem::OnChange( nCode, dwParam );

  // When an item is being edited (either in-place or fully open), it sends
   // OnChange notifications for changes in the state of the item or visual
   // appearance of its content.

   switch( nCode )
   {
   case OLE_CHANGED:
    InvalidateItem();
    // Check for valid m_lpViewObject since controls like Windows Media Player
    // call IAdviseSink::OnViewChange before we're done initializing.
    if (m_lpViewObject)
      UpdateFromServerExtent();
    break;

   case OLE_CHANGED_STATE:
   case OLE_CHANGED_ASPECT:
    InvalidateItem();
    break;
   }
}

STDMETHOD() CTestContainer98Item::OnChanged ( DISPID dispid ) [protected]
BOOL CTestContainer98Item::OnChangeItemPosition ( const CRect & rectPos ) [protected, virtual]

Definition at line 1080 of file TCItem.Cpp.

{
  ASSERT_VALID( this );

  // During in-place activation CTestContainer98Item::OnChangeItemPosition
  //  is called by the server to change the position of the in-place
  //  window.  Usually, this is a result of the data in the server
  //  document changing such that the extent has changed or as a result
  //  of in-place resizing.
  //
  // The default here is to call the base class, which will call
  //  COleClientItem::SetItemRects to move the item
  //  to the new position.

  if( !COleClientItem::OnChangeItemPosition( rectPos ) )
   {
    return( FALSE );
   }

   InvalidateItem();
   m_rect = rectPos;
   InvalidateItem();

   // Mark document as dirty.
   GetDocument()->SetModifiedFlag();

  return( TRUE );
}

STDMETHOD() CTestContainer98Item::OnControlInfoChanged ( ) [protected]
void CTestContainer98Item::OnDeactivate ( )

Definition at line 3175 of file TCItem.Cpp.

{
   OnDeactivate( FALSE );
}

void CTestContainer98Item::OnDeactivate ( BOOL tNoRedraw )

Definition at line 3151 of file TCItem.Cpp.

{
   TCControlTrace( TRACELEVEL_NORMAL, this, "Deactivating control\n" );

   if( m_tWindowless )
   {
    if( GetActiveView()->GetItemWithFocus() == this )
    {
     GetActiveView()->OnWindowlessReleaseFocus();
    }
    m_tWindowless = FALSE;
    m_pOleInPlaceObjectWindowless.Release();
   }

   if( !tNoRedraw )
   {
    InvalidateItem();
   }

   COleClientItem::OnDeactivate();

   UpdateStatusBar();
}

void CTestContainer98Item::OnDeactivateUI ( BOOL bUndoable ) [protected, virtual]

Definition at line 1167 of file TCItem.Cpp.

{
   COleClientItem::OnDeactivateUI( bUndoable );

   TCControlTrace( TRACELEVEL_NORMAL, this, "UIDeactivating control\n" );

   // Also InPlaceDeactivate the object if it doesn't have the
   // ACTIVATEWHENVISIBLE flag set.
   if( !ShouldActivateWhenVisible() )
   {
    Close();
   }

   UpdateStatusBar();
}

STDMETHOD() CTestContainer98Item::OnDefWindowMessage | ( | UINT | nMessage,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | plResult |
 | ) |  |  | [protected]
void CTestContainer98Item::OnDeselect ( )

Definition at line 2631 of file TCItem.Cpp.

{
   CWnd* pStatusBarWnd;
   CWnd* pFrameWnd;
   CMainFrame* pFrame;
   CStatusBar* pStatusBar;

   pFrameWnd = AfxGetMainWnd();
   pFrame = STATIC_DOWNCAST( CMainFrame, pFrameWnd );

   pStatusBarWnd = pFrame->GetMessageBar();
   pStatusBar = STATIC_DOWNCAST( CStatusBar, pStatusBarWnd );

   pStatusBar->SetPaneText( 1, _T( "" ) );
   pStatusBar->SetPaneText( 2, _T( "" ) );
}

void CTestContainer98Item::OnEvent | ( | DISPID | dispid,
 |  | DISPPARAMS * | pdpParams |
 | ) |  |  | [virtual]

Definition at line 1731 of file TCItem.Cpp.

{
   CMethodInfo* pEventInfo;
   CLog* pLog;

   m_dispidEvent = dispid;
   CopyParams( pdpParams );

   pLog = GetDocument()->GetLog();
   if( pLog != NULL )
   {
    // Find the event.
    pEventInfo = m_infoEvents.FindMethod( m_dispidEvent );
    if( pEventInfo == NULL )
    {
     (*pLog)<<GetDisplayName()<<_T( ": Unknown event (DISPID=" )<<dispid<<
      _T( ")\n" );
    }
    else
    {
     if( pEventInfo->IsLogged() )
     {
      (*pLog)<<GetDisplayName()<<_T( ": " );
      pEventInfo->LogEvent( *pLog, pdpParams );
     }
    }
   }
}

void CTestContainer98Item::OnFocus ( BOOL tGotFocus ) [protected]

Definition at line 1897 of file TCItem.Cpp.

{
   if( tGotFocus )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this, "Control got focus\n" );
   }
   else
   {
    TCControlTrace( TRACELEVEL_NORMAL, this, "Control lost focus\n" );
   }

   GetActiveView()->OnFocus( this, tGotFocus );
}

STDMETHOD() CTestContainer98Item::OnFocus ( BOOL tGotFocus ) [protected]
COleDataSource * CTestContainer98Item::OnGetClipboardData | ( | BOOL | tIncludeLink,
 |  | LPPOINT | pptOffset,
 |  | LPSIZE | pSize
 | ) |  |

Definition at line 657 of file TCItem.Cpp.

{
   COleDataSource* pSource;
   IStreamPtr pStream;
   HRESULT hResult;
   IPersistStreamInitPtr pPSI;
   ULONG nStringLength;
   CString strDisplayName;
   CLSID clsid;

   ASSERT_VALID( this );

   pSource = new COleDataSource;
   try
   {
    hResult = CreateStreamOnHGlobal( NULL, TRUE, &pStream );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }
    pPSI = m_lpObject;
    if( pPSI == NULL )
    {
     AfxThrowOleException( E_NOINTERFACE );
    }
    strDisplayName = GetDisplayName();
    nStringLength = strDisplayName.GetLength();
    hResult = pStream->Write( &nStringLength, sizeof( ULONG ), NULL );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }
    hResult = pStream->Write( LPCTSTR( strDisplayName ), nStringLength*
     sizeof( TCHAR ), NULL );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    pPSI->GetClassID( &clsid );
    hResult = WriteClassStm( pStream, clsid );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }
    hResult = pPSI->Save( pStream, FALSE );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    LARGE_INTEGER nMove;

    nMove.QuadPart = 0;
    pStream->Seek( nMove, STREAM_SEEK_SET, NULL );

    CLIPFORMAT cf = CLIPFORMAT( ::RegisterClipboardFormat( _T(
     "TC98 Control" ) ) );
    STGMEDIUM stgmedium;

    stgmedium.tymed = TYMED_ISTREAM;
    stgmedium.pstm = pStream;
    stgmedium.pstm->AddRef();
    stgmedium.pUnkForRelease = NULL;

    pSource->CacheData( cf, &stgmedium );

    GetClipboardData( pSource, tIncludeLink, pptOffset, pSize );
   }
   catch( ... )
   {
    delete pSource;
    throw;
   }

   ASSERT_VALID( pSource );

   return( pSource );
}

void CTestContainer98Item::OnGetClipRect ( CRect & rPosition ) [protected, virtual]

Definition at line 1109 of file TCItem.Cpp.

{
   ASSERT_VALID( this );

   rectClip = m_rect;
}

void CTestContainer98Item::OnGetItemPosition ( CRect & rPosition ) [protected, virtual]

Definition at line 1116 of file TCItem.Cpp.

{
  ASSERT_VALID( this );

  // During in-place activation, CTestContainer98Item::OnGetItemPosition
  //  will be called to determine the location of this item.  The default
  //  implementation created from AppWizard simply returns a hard-coded
  //  rectangle.  Usually, this rectangle would reflect the current
  //  position of the item relative to the view used for activation.
  //  You can obtain the view by calling CTestContainer98Item::GetActiveView.

   rectPosition = m_rect;
}

STDMETHOD() CTestContainer98Item::OnInPlaceActivate ( ) [protected]
STDMETHOD() CTestContainer98Item::OnInPlaceActivateEx | ( | BOOL * | ptNoRedraw,
 |  | DWORD | dwFlags |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::OnInPlaceDeactivate ( ) [protected]
STDMETHOD() CTestContainer98Item::OnInPlaceDeactivateEx ( BOOL tNoRedraw ) [protected]
DWORD CTestContainer98Item::OnPointerInactiveMove | ( | CPoint | point,
 |  | DWORD | dwKeyState
 | ) |  |

Definition at line 1003 of file TCItem.Cpp.

{
   DWORD dwPolicy;

   ASSERT( m_pPointerInactive != NULL );
   ASSERT( !IsInPlaceActive() );

   dwPolicy = GetActivationPolicy();

   if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
   {
    return( dwPolicy );
   }

   m_pPointerInactive->OnInactiveMouseMove( &m_rect, point.x, point.y,
    dwKeyState );

   return( 0 );
}

DWORD CTestContainer98Item::OnPointerInactiveSetCursor | ( | CPoint | point,
 |  | DWORD | dwMouseMessage,
 |  | BOOL * | ptHandled
 | ) |  |

Definition at line 1024 of file TCItem.Cpp.

{
   HRESULT hResult;
   DWORD dwPolicy;

   ENSURE( ptHandled != NULL );
   *ptHandled = FALSE;

   ASSERT( m_pPointerInactive != NULL );
   ASSERT( !IsInPlaceActive() );

   dwPolicy = GetActivationPolicy();

   if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
   {
    return( dwPolicy );
   }

   hResult = m_pPointerInactive->OnInactiveSetCursor( &m_rect, point.x,
    point.y, dwMouseMessage, FALSE );
   if( hResult == S_OK )
   {
    *ptHandled = TRUE;
   }

   return( 0 );
}

STDMETHOD() CTestContainer98Item::OnPosRectChange ( LPCRECT prectPos ) [protected]
STDMETHOD() CTestContainer98Item::OnRequestEdit ( DISPID dispid ) [protected]
void CTestContainer98Item::OnSelect ( )

Definition at line 2712 of file TCItem.Cpp.

{
   UpdateStatusBar();
}

STDMETHOD() CTestContainer98Item::OnUIActivate ( ) [protected]
STDMETHOD() CTestContainer98Item::OnUIDeactivate ( BOOL tUndoable ) [protected]
BOOL CTestContainer98Item::OnWindowlessDragEnter | ( | COleDataObject * | pDataObject,
 |  | DWORD | dwKeyState,
 |  | CPoint | point,
 |  | DWORD * | pdwDropEffect
 | ) |  |

Definition at line 898 of file TCItem.Cpp.

{
   HRESULT hResult;
   POINTL pointl;

   TRACE( "OnWindowlessDragEnter()\n" );

   ENSURE( pdwDropEffect != NULL );
   *pdwDropEffect = DROPEFFECT_NONE;

   if( m_pDropTarget == NULL )
   {
    // We haven't tried to drop on this control yet, or the control doesn't
    // support IDropTarget.
    hResult = m_pOleInPlaceObjectWindowless->GetDropTarget( &m_pDropTarget );
    if( FAILED( hResult ) )
    {
     // The control doesn't support IDropTarget.
     return( FALSE );
    }
   }

   pointl.x = point.x;
   pointl.y = point.y;
   hResult = m_pDropTarget->DragEnter( pDataObject->m_lpDataObject, dwKeyState,
    pointl, pdwDropEffect );
   ASSERT( SUCCEEDED( hResult ) );
   if( hResult == S_FALSE )
   {
    // The control doesn't support any of the object's data formats.
    return( FALSE );
   }

   return( TRUE );
}

void CTestContainer98Item::OnWindowlessDragLeave ( )

Definition at line 935 of file TCItem.Cpp.

{
   HRESULT hResult;

   TRACE( "OnWindowlessDragLeave()\n" );

   ASSERT( m_pDropTarget != NULL );

   hResult = m_pDropTarget->DragLeave();
   ASSERT( SUCCEEDED( hResult ) );
}

void CTestContainer98Item::OnWindowlessDragOver | ( | DWORD | dwKeyState,
 |  | CPoint | point,
 |  | DWORD * | pdwDropEffect
 | ) |  |

Definition at line 947 of file TCItem.Cpp.

{
   HRESULT hResult;
   POINTL pointl;

   ENSURE( pdwDropEffect != NULL );
   *pdwDropEffect = DROPEFFECT_NONE;

   ASSERT( m_pDropTarget != NULL );

   pointl.x = point.x;
   pointl.y = point.y;
   hResult = m_pDropTarget->DragOver( dwKeyState, pointl, pdwDropEffect );
   ASSERT( SUCCEEDED( hResult ) );
}

void CTestContainer98Item::OnWindowlessDrop | ( | COleDataObject * | pDataObject,
 |  | DWORD | dwKeyState,
 |  | CPoint | point,
 |  | DWORD * | pdwDropEffect
 | ) |  |

Definition at line 964 of file TCItem.Cpp.

{
   HRESULT hResult;
   POINTL pointl;

   TRACE( "OnWindowlessDrop()\n" );

   ASSERT( m_pDropTarget != NULL );

   pointl.x = point.x;
   pointl.y = point.y;
   hResult = m_pDropTarget->Drop( pDataObject->m_lpDataObject, dwKeyState,
    pointl, pdwDropEffect );
   ASSERT( SUCCEEDED( hResult ) );
}

BOOL CTestContainer98Item::OnWindowMessage ( const MSG * pMessage )

Definition at line 3712 of file TCItem.Cpp.

{
   LRESULT lResult;
   HRESULT hResult;

   hResult = m_pOleInPlaceObjectWindowless->OnWindowMessage( pMessage->message,
    pMessage->wParam, pMessage->lParam, &lResult );
   if( hResult == S_OK )
   {
    return( TRUE );
   }
   else
   {
    return( FALSE );
   }
}

void CTestContainer98Item::Prepare ( )

Definition at line 2780 of file TCItem.Cpp.

{
   m_tracker.m_rect = m_rect;
   m_tracker.m_rect.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );

   if( m_pView->IsSelected( this ) )
   {
    m_tracker.m_nStyle |= CRectTracker::resizeInside;
   }
   else
   {
    m_tracker.m_nStyle &= ~CRectTracker::resizeInside;
   }

   if( (GetItemState() == openState) || (GetItemState() == activeUIState) )
   {
    m_tracker.m_nStyle |= CRectTracker::hatchInside;
   }
   else
   {
    m_tracker.m_nStyle &= ~CRectTracker::hatchInside;
   }
}

STDMETHOD() CTestContainer98Item::QueryService | ( | REFGUID | guidService,
 |  | REFIID | iid,
 |  | void ** | ppService |
 | ) |  |  | [protected]
BOOL CTestContainer98Item::QuickActivate ( )

Definition at line 409 of file TCItem.Cpp.

{
   HRESULT hResult;
   IQuickActivatePtr pQuickActivate;
   IDispatch* pFontDispatch;
   QACONTAINER qaContainer;
   QACONTROL qaControl;
   CTestContainer98Doc* pDoc;
   CAmbientProperty* pProperty;
   int iQAAmbient;

   pDoc = GetDocument();
   if( !pDoc->UseQuickActivation() )
   {
    // The container doesn't want to use quick activation.
    return( FALSE );
   }

   hResult = m_lpObject->QueryInterface( IID_IQuickActivate,
    (void**)&pQuickActivate );
   if( FAILED( hResult ) )
   {
    // The control doesn't support quick activation.
    return( FALSE );
   }

   qaContainer.cbSize = sizeof( qaContainer );
   qaContainer.pClientSite = GetClientSite();
   qaContainer.pAdviseSink = NULL;
   qaContainer.pPropertyNotifySink = &m_xPropertyNotifySink;
   qaContainer.pUnkEventSink = &m_xEventHandler;
   qaContainer.dwAmbientFlags = 0;

   for( iQAAmbient = 0; iQAAmbient < NUM_QAAMBIENTS; iQAAmbient++ )
   {
    pProperty = pDoc->FindAmbientProperty(
     g_aQAAmbients[iQAAmbient].dispid );
    if( pProperty != NULL )
    {
     ASSERT( pProperty->GetValue().vt == VT_BOOL );
     if( pProperty->GetValue().bVal )
     {
      qaContainer.dwAmbientFlags |= g_aQAAmbients[iQAAmbient].dwQAFlag;
     }
    }
   }

   qaContainer.colorFore = 0;
   pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_FORECOLOR );
   if( pProperty != NULL )
   {
    ASSERT( pProperty->GetValue().vt == VT_COLOR );
    qaContainer.colorFore = pProperty->GetValue().lVal;
   }

   qaContainer.colorBack = 0;
   pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_BACKCOLOR );
   if( pProperty != NULL )
   {
    ASSERT( pProperty->GetValue().vt == VT_COLOR );
    qaContainer.colorBack = pProperty->GetValue().lVal;
   }

   qaContainer.pFont = NULL;
   pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_FONT );
   if( pProperty != NULL )
   {
    ASSERT( pProperty->GetValue().vt == VT_DISPATCH );
    pFontDispatch = pProperty->GetValue().pdispVal;
    hResult = pFontDispatch->QueryInterface( IID_IFont,
     (void**)&qaContainer.pFont );
    ASSERT( SUCCEEDED( hResult ) );
   }

   qaContainer.pUndoMgr = NULL;

   qaContainer.dwAppearance = 0;
   pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_APPEARANCE );
   if( pProperty != NULL )
   {
    ASSERT( pProperty->GetValue().vt == VT_I4 );
    qaContainer.dwAppearance = pProperty->GetValue().lVal;
   }

   qaContainer.lcid = 0;
   pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_LOCALEID );
   if( pProperty != NULL )
   {
    ASSERT( pProperty->GetValue().vt == VT_I4 );
    qaContainer.lcid = pProperty->GetValue().lVal;
   }

   qaContainer.hpal = NULL;
   qaContainer.pBindHost = GetBindHost();

   memset( &qaControl, 0, sizeof( qaControl ) );
   qaControl.cbSize = sizeof( qaControl );

   hResult = pQuickActivate->QuickActivate( &qaContainer, &qaControl );
   if( FAILED( hResult ) )
   {
    return( FALSE );
   }

   m_dwMiscStatus = qaControl.dwMiscStatus;
   m_dwViewStatus = qaControl.dwViewStatus;
   m_dwEventCookie = qaControl.dwEventCookie;
   m_dwPropertyCookie = qaControl.dwPropNotifyCookie;

   TCControlTrace( TRACELEVEL_NORMAL, this, "Quick activation successful.\n" );

   return( TRUE );
}

void CTestContainer98Item::ReadItem ( CArchive & ar )

Definition at line 1446 of file TCItem.Cpp.

{

   BOOL tUsedStream;
   IStoragePtr pStorage;
   IPersistStreamInitPtr pPSI;
   IStreamPtr pStream;
  TCHAR szItemName[64];
   HRESULT hResult;
   BOOL tQuickActivated;
   IPersistStoragePtr pPersistStorage;
   CLSID clsid;

   (void)ar;

  CTestContainer98Doc* pDoc = GetDocument();
  ENSURE(pDoc);
  ENSURE(pDoc->m_lpRootStg != NULL);
  ENSURE(pDoc->m_bCompoundFile);
  ASSERT(m_lpStorage == NULL);
  ASSERT(m_lpLockBytes == NULL);
   ASSERT( !ar.m_bForceFlat );

  // get item name
  GetItemName( szItemName, _countof(szItemName) );

  // open storage for this item
  hResult = pDoc->m_lpRootStg->OpenStorage( CT2COLE( szItemName ), NULL,
    STGM_READWRITE|STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE, 0, 0, &pStorage );
  if( hResult != S_OK )
  {
    TRACE1( "Warning: unable to open child storage %s.\n", szItemName );
    // upon failure throw file exception (item will be cleaned up)
    AfxThrowOleException( hResult );
  }
  ASSERT(pStorage != NULL);

  // remember the storage
  m_lpStorage = pStorage;
  ASSERT(m_lpStorage != NULL);
   m_lpStorage->AddRef();

  // attempt to load the object from the storage

   hResult = ReadClassStg( m_lpStorage, &clsid );
   if( FAILED( hResult ) )
   {
    AfxThrowOleException( hResult );
   }

   tUsedStream = FALSE;
   if( clsid == CLSID_NULL )
   {
    hResult = m_lpStorage->OpenStream( L"Contents", NULL, STGM_READ|
     STGM_SHARE_EXCLUSIVE, 0, &pStream );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    hResult = ReadClassStm( pStream, &clsid );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    tUsedStream = TRUE;
   }

   m_tExtendedControl = TRUE;
   hResult = CExtendedControl::CreateInstance( clsid, this, NULL,
    IID_IOleObject, (void**)&m_lpObject );
   if( FAILED( hResult ) )
   {
    m_tExtendedControl = FALSE;
    // The control may not like being aggregated on, so just try to create it
    // directly and punt the extended control stuff.
    hResult = CoCreateInstance( clsid, NULL, CLSCTX_INPROC_SERVER|
    CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER, IID_IOleObject,
    (void**)&m_lpObject );
    if( SUCCEEDED( hResult ) )
    {
     TCControlTrace( TRACELEVEL_NORMAL, this,
      "Could not aggregate on the control, so it won't support extended properties.\n" );
    }
   }
   if( SUCCEEDED( hResult ) )
   {
    CString strUserType;

    GetUserType( USERCLASSTYPE_SHORT, strUserType );
    GetDocument()->CreateUniqueItemName( this, strUserType,
     m_strDisplayName );
   }

   if( m_tExtendedControl )
   {
    m_pExtendedControl = m_lpObject;
    ASSERT( m_pExtendedControl != NULL );
    m_pExtendedControl->Name = _bstr_t( m_strDisplayName );
   }

   if( SUCCEEDED( hResult ) )
   {
    hResult = InitControlInfo();
   }

   tQuickActivated = FALSE;
   if( SUCCEEDED( hResult ) )
   {
    tQuickActivated = QuickActivate();

    if( !tQuickActivated )
    {
     m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &m_dwMiscStatus );
     if( m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST )
     {
      hResult = m_lpObject->SetClientSite( GetClientSite() );
      if( FAILED( hResult ) )
      {
         TCControlTrace( TRACELEVEL_NORMAL, this,
          "SetClientSite failed.\n" );
      }
     }
    }
   }

   if( SUCCEEDED( hResult ) )
   {
    pPersistStorage = m_lpObject;
    if( pPersistStorage != NULL )
    {
     hResult = pPersistStorage->Load( m_lpStorage );
    }
   else
   {
    if( !tUsedStream )
    {
       hResult = E_NOINTERFACE;
    }
    else
    {
       pPSI = m_lpObject;
       if( pPSI == NULL )
       {
        hResult = E_NOINTERFACE;
       }
       else
       {
        hResult = pPSI->Load( pStream );
       }
    }
   }
   }

   if( SUCCEEDED( hResult ) )
   {
    if( !tQuickActivated )
    {
     if( !(m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST) )
     {
      hResult = m_lpObject->SetClientSite( GetClientSite() );
      if( FAILED( hResult ) )
      {
         TCControlTrace( TRACELEVEL_NORMAL, this,
          "SetClientSite failed.\n" );
      }
     }
    }
   }

  CheckGeneral(hResult);
}

void CTestContainer98Item::Release ( OLECLOSE dwCloseOption = OLECLOSE_NOSAVE ) [protected]

Definition at line 1204 of file TCItem.Cpp.

{
   UINT eState;
   IConnectionPointContainerPtr pConnectionPointContainer;
   HRESULT hResult;

   eState = GetItemState();
   if( (eState == activeUIState) || (eState == activeState) || (eState ==
    openState) )
   {
    Close( OLECLOSE_NOSAVE );
   }

   if( m_pDropTarget != NULL )
   {
    m_pDropTarget.Release();
   }

   if( m_pPointerInactive != NULL )
   {
    m_pPointerInactive.Release();
   }

   if( m_pOleInPlaceObjectWindowless != NULL )
   {
    m_pOleInPlaceObjectWindowless.Release();
   }

   if( m_pViewObjectEx != NULL )
   {
    m_pViewObjectEx.Release();
   }

   if( m_pOleControl != NULL )
   {
    m_pOleControl.Release();
   }

   if( m_pCtlDispatch != NULL )
   {
    m_pCtlDispatch.Release();
   }

   if( m_pExtendedControl != NULL )
   {
    // Salvage the display name from the extended control before it goes
    // away.
    m_strDisplayName = BSTR( m_pExtendedControl->Name );
    m_pExtendedControl.Release();
   }

   if( (m_lpObject != NULL) && ((m_dwEventCookie != 0) ||
    (m_dwPropertyCookie != 0)) )
   {
    m_lpObject->QueryInterface( IID_IConnectionPointContainer,
     (void**)&pConnectionPointContainer );
   }

   if( m_dwEventCookie != 0 )
   {
    if( m_pEventCP == NULL )
    {
     // We must have quick activated
     hResult = pConnectionPointContainer->FindConnectionPoint(
      m_infoEvents.GetIID(), &m_pEventCP );
     if( FAILED( hResult ) )
     {
      TCControlTrace( TRACELEVEL_NORMAL, this,
         "QuickActivated control connected to event sink, but doesn't support that connection point.\n" );
     }
    }
    if( m_pEventCP != NULL )
    {
     m_pEventCP->Unadvise( m_dwEventCookie );
     m_dwEventCookie = 0;
     m_pEventCP.Release();
    }
   }

   if( m_dwPropertyCookie != 0 )
   {
    if( m_pPropertyCP == NULL )
    {
     // We must have quick activated
     hResult = pConnectionPointContainer->FindConnectionPoint(
      IID_IPropertyNotifySink, &m_pPropertyCP );
     if( FAILED( hResult ) )
     {
      TCControlTrace( TRACELEVEL_NORMAL, this,
         "QuickActivated control connected to property notify sink, but doesn't support that connection point.\n" );
     }
    }
    if( m_pPropertyCP != NULL )
    {
     m_pPropertyCP->Unadvise( m_dwPropertyCookie );
     m_dwPropertyCookie = 0;
     m_pPropertyCP.Release();
    }
   }

   if( pConnectionPointContainer != NULL )
   {
    pConnectionPointContainer.Release();
   }

   COleClientItem::Release( dwCloseOption );

   CoFreeUnusedLibraries();
}

STDMETHOD() CTestContainer98Item::ReleaseDC ( HDC hDC ) [protected]
STDMETHOD() CTestContainer98Item::RequestUIActivate ( ) [protected]
HRESULT CTestContainer98Item::SaveToPropertyBag ( IPropertyBag * pPropertyBag )

Definition at line 2804 of file TCItem.Cpp.

{
   HRESULT hResult;
   IPersistPropertyBagPtr pPersistPropertyBag;

   ENSURE( pPropertyBag != NULL );
   ENSURE( m_lpObject != NULL );

   hResult = m_lpObject->QueryInterface( IID_IPersistPropertyBag,
    (void**)&pPersistPropertyBag );
   if( FAILED( hResult ) )
   {
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Control does not support IPersistPropertyBag.\n" );
    return( hResult );
   }

   hResult = pPersistPropertyBag->Save( pPropertyBag, TRUE, TRUE );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   return( S_OK );
}

HRESULT CTestContainer98Item::SaveToStorage ( IStorage * pStorage )

Definition at line 2830 of file TCItem.Cpp.

{
   HRESULT hResult;
   IPersistStoragePtr pPersistStorage;
   CLSID clsid;

   ASSERT( pStorage != NULL );
   ASSERT( m_lpObject != NULL );

   pPersistStorage = m_lpObject;
   if( pPersistStorage == NULL )
   {
    return( E_NOINTERFACE );
   }

   pPersistStorage->GetClassID( &clsid );
   hResult = WriteClassStg( pStorage, clsid );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   hResult = pPersistStorage->Save( pStorage, FALSE );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   pPersistStorage->SaveCompleted( NULL );

   return( S_OK );
}

HRESULT CTestContainer98Item::SaveToStream ( IStream * pStream )

Definition at line 2863 of file TCItem.Cpp.

{
   HRESULT hResult;
   IPersistStreamPtr pPersistStream;
   IPersistStreamInitPtr pPersistStreamInit;
   IPersistPtr pPersist;
   CLSID clsid;

   ENSURE( pStream != NULL );
   ENSURE( m_lpObject != NULL );

   hResult = m_lpObject->QueryInterface( IID_IPersist, (void**)&pPersist );
   if( FAILED( hResult ) )
   {
    // Some control implementers forget that the IPersist* interfaces are all
    // derived from IPersist.  If they forget to allow a QI for IPersist, let
    // them know the error of their ways, and just go for IPersistStorage to
    // get the IPersist interface.
    TCControlTrace( TRACELEVEL_NORMAL, this,
     "Object doesn't support IPersist.\n" );
    hResult = m_lpObject->QueryInterface( IID_IPersistStorage,
     (void**)&pPersist );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }
   }

   pPersist->GetClassID( &clsid );
   hResult = WriteClassStm( pStream, clsid );
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   hResult = m_lpObject->QueryInterface( IID_IPersistStream,
    (void**)&pPersistStream );
   if( SUCCEEDED( hResult ) )
   {
    hResult = pPersistStream->Save( pStream, TRUE );
   }
   else
   {
    hResult = m_lpObject->QueryInterface( IID_IPersistStreamInit,
     (void**)&pPersistStreamInit );
    if( FAILED( hResult ) )
    {
     return( hResult );
    }
    hResult = pPersistStreamInit->Save( pStream, TRUE );
   }
   if( FAILED( hResult ) )
   {
    return( hResult );
   }

   return( S_OK );
}

STDMETHOD() CTestContainer98Item::Scroll ( SIZE sizeExtent ) [protected]
STDMETHOD() CTestContainer98Item::ScrollRect | ( | int | dx,
 |  | int | dy,
 |  | LPCRECT | prectScroll,
 |  | LPCRECT | prectClip |
 | ) |  |  | [protected]
void CTestContainer98Item::Serialize ( CArchive & ar ) [protected, virtual]

Definition at line 1658 of file TCItem.Cpp.

{
   CString strDisplayName;

  ASSERT_VALID( this );

   if( ar.IsStoring() )
   {
    ar<<m_rect;
    ar<<GetDisplayName();
   }
  else
  {
    ar>>m_rect;
    ar>>strDisplayName;
   }

  COleClientItem::Serialize( ar );

  if( !ar.IsStoring() )
  {
    if( m_pExtendedControl != NULL )
    {
     m_pExtendedControl->Name = _bstr_t( strDisplayName );
    }
  }
}

STDMETHOD() CTestContainer98Item::SetCapture ( BOOL tCapture ) [protected]
STDMETHOD() CTestContainer98Item::SetFocus ( BOOL tFocus ) [protected]
void CTestContainer98Item::SetLoggingOptions ( )

Definition at line 1791 of file TCItem.Cpp.

{
   CMethodInfo* pMethod;
   int iMethod;
   int iRequestEditProperty;
   int iBindableProperty;
   int nResult;
   CEventLoggingPage pageEventLogging;
   CPropertyChangesPage pagePropertyChanges;
   CPropertyEditRequestsPage pageEditRequests;
   CPropertySheet sheet( IDS_CONTROLLOGGINGOPTIONS );

   for( iMethod = 0; iMethod < m_infoEvents.GetNumMethods(); iMethod++ )
   {
    pMethod = m_infoEvents.GetMethod( iMethod );
    pageEventLogging.m_astrEventNames.Add( pMethod->GetName() );
    pageEventLogging.m_atLogFlags.Add( pMethod->IsLogged() );
   }

   for( iMethod = 0; iMethod < m_infoMethods.GetNumMethods(); iMethod++ )
   {
    pMethod = m_infoMethods.GetMethod( iMethod );
    if( pMethod->GetInvokeKind() == INVOKE_PROPERTYGET )
    {
     if( pMethod->IsBindable() )
     {
      pagePropertyChanges.m_astrPropertyNames.Add( pMethod->GetName() );
      pagePropertyChanges.m_atLogFlags.Add( pMethod->IsLogged() );
     }
     if( pMethod->RequestsEdit() )
     {
      CPropertyEditRequestsPage::CPropertyInfo info( pMethod->GetName(),
         pMethod->LogEditRequests(), pMethod->GetRequestEditResponse() );

      pageEditRequests.m_aProperties.Add( info );
     }
    }
   }

   sheet.AddPage( &pageEventLogging );
   sheet.AddPage( &pagePropertyChanges );
   sheet.AddPage( &pageEditRequests );

   sheet.m_psh.dwFlags &= ~PSH_HASHELP;
   sheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
   nResult = (int)sheet.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   for( iMethod = 0; iMethod < m_infoEvents.GetNumMethods(); iMethod++ )
   {
    pMethod = m_infoEvents.GetMethod( iMethod );
    pMethod->EnableLogging( pageEventLogging.m_atLogFlags[iMethod] );
   }

   iBindableProperty = 0;
   iRequestEditProperty = 0;
   for( iMethod = 0; iMethod < m_infoMethods.GetNumMethods(); iMethod++ )
   {
    pMethod = m_infoMethods.GetMethod( iMethod );
    if( pMethod->GetInvokeKind() == INVOKE_PROPERTYGET )
    {
     if( pMethod->IsBindable() )
     {
      pMethod->EnableLogging(
         pagePropertyChanges.m_atLogFlags[iBindableProperty] );
      iBindableProperty++;
     }
     if( pMethod->RequestsEdit() )
     {
      pMethod->EnableEditRequestLogging( pageEditRequests.m_aProperties[
         iRequestEditProperty].m_tLogged );
      pMethod->SetRequestEditResponse( pageEditRequests.m_aProperties[
         iRequestEditProperty].m_iResponse );
      iRequestEditProperty++;
     }
    }
   }
}

BOOL CTestContainer98Item::ShouldActivateWhenVisible ( )

Definition at line 1183 of file TCItem.Cpp.

{
   DWORD dwMiscStatus;

   dwMiscStatus = 0;
   m_lpObject->GetMiscStatus( GetDrawAspect(), &dwMiscStatus );

   if( !(dwMiscStatus&OLEMISC_ACTIVATEWHENVISIBLE) )
   {
    return( FALSE );
   }

   if( (dwMiscStatus&OLEMISC_IGNOREACTIVATEWHENVISIBLE) &&
    (GetDocument()->HonorIgnoreActivateWhenVisible()) )
   {
    return( FALSE );
   }

   return( TRUE );
}

STDMETHOD() CTestContainer98Item::ShowPropertyFrame ( ) [protected]
CTestContainer98Item::STDMETHOD_ | ( | void | ,
 |  | OnViewChange |  |
 | ) |  |  | [protected]
CTestContainer98Item::STDMETHOD_ | ( | void | ,
 |  | OnRename |  |
 | ) |  |  | [protected]
CTestContainer98Item::STDMETHOD_ | ( | void | ,
 |  | OnViewStatusChange |  |
 | ) |  |  | [protected]
CTestContainer98Item::STDMETHOD_ | ( | void | ,
 |  | OnClose |  |
 | ) |  |  | [protected]
CTestContainer98Item::STDMETHOD_ | ( | void | ,
 |  | OnSave |  |
 | ) |  |  | [protected]
CTestContainer98Item::STDMETHOD_ | ( | void | ,
 |  | OnDataChange |  |
 | ) |  |  | [protected]
BOOL CTestContainer98Item::SupportsIPointerInactive ( ) const

Definition at line 893 of file TCItem.Cpp.

{
   return( m_pPointerInactive != NULL );
}

STDMETHOD() CTestContainer98Item::TransformCoords | ( | POINTL * | pptHiMetric,
 |  | POINTF * | pptContainer,
 |  | DWORD | dwFlags |
 | ) |  |  | [protected]
STDMETHOD() CTestContainer98Item::TranslateAccelerator | ( | LPMSG | pMessage,
 |  | DWORD | dwModifiers |
 | ) |  |  | [protected]
void CTestContainer98Item::UpdateFromServerExtent ( )

Definition at line 1760 of file TCItem.Cpp.

{
   CSize size;

   if( GetCachedExtent( &size ) )
   {
    // OLE returns the extent in HIMETRIC units -- we need pixels.
    CClientDC dc( NULL );
    dc.HIMETRICtoDP( &size );

    // Only invalidate if it has actually changed and also only if it is not
    // in-place active.
    if( (size != m_rect.Size()) && !IsInPlaceActive() )
    {
     // Invalidate old, update, invalidate new.
     InvalidateItem();
     m_rect.bottom = m_rect.top+size.cy;
     m_rect.right = m_rect.left+size.cx;
     InvalidateItem();

     // mark document as modified.
     GetDocument()->SetModifiedFlag();
    }
   }
}

void CTestContainer98Item::UpdateStatusBar ( )

Definition at line 2648 of file TCItem.Cpp.

{
   CWnd* pStatusBarWnd;
   CWnd* pFrameWnd;
   CMainFrame* pFrame;
   CStatusBar* pStatusBar;

   pFrameWnd = AfxGetMainWnd();
   // No Active window yet
   if (pFrameWnd != NULL) {
     pFrame = STATIC_DOWNCAST( CMainFrame, pFrameWnd );

     pStatusBarWnd = pFrame->GetMessageBar();
     pStatusBar = STATIC_DOWNCAST( CStatusBar, pStatusBarWnd );

     switch( GetItemState() )
     {
     case activeState:
      pStatusBar->SetPaneText( 1, _T( "Active" ) );
      if( m_tWindowless )
      {
       pStatusBar->SetPaneText( 2, _T( "Windowless" ) );
      }
      else
      {
       pStatusBar->SetPaneText( 2, _T( "Windowed" ) );
      }
      break;

     case activeUIState:
      pStatusBar->SetPaneText( 1, _T( "UIActive" ) );
      if( m_tWindowless )
      {
       pStatusBar->SetPaneText( 2, _T( "Windowless" ) );
      }
      else
      {
       pStatusBar->SetPaneText( 2, _T( "Windowed" ) );
      }
      break;

     case openState:
      pStatusBar->SetPaneText( 1, _T( "Open" ) );
      pStatusBar->SetPaneText( 2, _T( "" ) );
      break;

     case loadedState:
      pStatusBar->SetPaneText( 1, _T( "Loaded" ) );
      pStatusBar->SetPaneText( 2, _T( "" ) );
      break;

     case emptyState:
      pStatusBar->SetPaneText( 1, _T( "Empty" ) );
      pStatusBar->SetPaneText( 2, _T( "" ) );
      break;

     default:
      ASSERT( FALSE );
      break;
     }
   }

}

void CTestContainer98Item::WriteItem ( CArchive & ar )

Definition at line 1347 of file TCItem.Cpp.

{
   IStoragePtr pStorage;
   IStreamPtr pStream;
   IPersistStreamInitPtr pPSI;
   TCHAR szItemName[64];
   HRESULT hResult;
   IPersistStoragePtr pPersistStorage;
   CTestContainer98Doc* pDoc;
   CLSID clsid;

   (void)ar;

   pDoc = GetDocument();
   ENSURE( pDoc );
   ENSURE( pDoc->m_lpRootStg != NULL );
   ASSERT( pDoc->m_bCompoundFile );
   ASSERT( m_lpStorage != NULL );
   ASSERT( !ar.m_bForceFlat );

   GetItemName( szItemName, _countof(szItemName) );

   if( !pDoc->m_bSameAsLoad )
   {
    hResult = pDoc->m_lpRootStg->CreateStorage( CT2COLE( szItemName ),
     STGM_CREATE|STGM_READWRITE|STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE, 0, 0,
     &pStorage );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }
    m_lpNewStorage = pStorage;
    m_lpNewStorage->AddRef();
    m_bNeedCommit = TRUE;
   }
   else
   {
    pStorage = m_lpStorage;
   }

   pPersistStorage = m_lpObject;
   if( pPersistStorage != NULL )
   {
    pPersistStorage->GetClassID( &clsid );
    hResult = WriteClassStg( pStorage, clsid );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    hResult = pPersistStorage->Save( pStorage, pDoc->m_bSameAsLoad );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }
   }
   else
   {
    pPSI = m_lpObject;
    if( pPSI == NULL )
    {
     AfxThrowOleException( E_NOINTERFACE );
    }

    // Set the storage's CLSID to CLSID_NULL, so we know that we actually
    // used a stream
    hResult = WriteClassStg( pStorage, CLSID_NULL );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    hResult = pStorage->CreateStream( L"Contents", STGM_CREATE|
     STGM_READWRITE|STGM_SHARE_EXCLUSIVE, 0, 0, &pStream );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    pPSI->GetClassID( &clsid );
    hResult = WriteClassStm( pStream, clsid );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    hResult = pPSI->Save( pStream, TRUE );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    pStream.Release();
   }

   m_bNeedCommit = TRUE;
   pStorage->Commit( STGC_ONLYIFCURRENT );
}

Member Data Documentation

LONG CTestContainer98Item::lindex [protected]

Definition at line 211 of file TCItem.H.

DISPID CTestContainer98Item::m_dispidEvent

Definition at line 119 of file TCItem.H.

DISPPARAMS CTestContainer98Item::m_dpLastParams

Definition at line 120 of file TCItem.H.

DWORD CTestContainer98Item::m_dwAspectPass2

Definition at line 118 of file TCItem.H.

DWORD CTestContainer98Item::m_dwEventCookie

Definition at line 122 of file TCItem.H.

DWORD CTestContainer98Item::m_dwMiscStatus

Definition at line 133 of file TCItem.H.

DWORD CTestContainer98Item::m_dwPropertyCookie

Definition at line 124 of file TCItem.H.

DWORD CTestContainer98Item::m_dwViewStatus

Definition at line 134 of file TCItem.H.

CONTROLINFO CTestContainer98Item::m_infoControl [protected]

Definition at line 158 of file TCItem.H.

CInterfaceInfo CTestContainer98Item::m_infoEvents

Definition at line 135 of file TCItem.H.

CInterfaceInfo CTestContainer98Item::m_infoMethods

Definition at line 136 of file TCItem.H.

IBindHostPtr CTestContainer98Item::m_pBindHost [protected]

Definition at line 163 of file TCItem.H.

IDispatchPtr CTestContainer98Item::m_pCtlDispatch

Definition at line 126 of file TCItem.H.

CDC* CTestContainer98Item::m_pDC [protected]

Definition at line 162 of file TCItem.H.

IDropTargetPtr CTestContainer98Item::m_pDropTarget

Definition at line 132 of file TCItem.H.

IConnectionPointPtr CTestContainer98Item::m_pEventCP

Definition at line 121 of file TCItem.H.

ITCExtendedControlPtr CTestContainer98Item::m_pExtendedControl

Definition at line 127 of file TCItem.H.

IOleControlPtr CTestContainer98Item::m_pOleControl

Definition at line 128 of file TCItem.H.

IOleInPlaceObjectWindowlessPtr CTestContainer98Item::m_pOleInPlaceObjectWindowless

Definition at line 129 of file TCItem.H.

IPointerInactivePtr CTestContainer98Item::m_pPointerInactive

Definition at line 131 of file TCItem.H.

IConnectionPointPtr CTestContainer98Item::m_pPropertyCP

Definition at line 123 of file TCItem.H.

IViewObjectExPtr CTestContainer98Item::m_pViewObjectEx

Definition at line 130 of file TCItem.H.

CRect CTestContainer98Item::m_rect

Definition at line 125 of file TCItem.H.

CString CTestContainer98Item::m_strDisplayName [protected]

Definition at line 159 of file TCItem.H.

BOOL CTestContainer98Item::m_tDisplayAsDefault

Definition at line 115 of file TCItem.H.

BOOL CTestContainer98Item::m_tExtendedControl

Definition at line 116 of file TCItem.H.

BOOL CTestContainer98Item::m_tInsideOut [protected]

Definition at line 160 of file TCItem.H.

CRectTracker CTestContainer98Item::m_tracker [protected]

Definition at line 161 of file TCItem.H.

BOOL CTestContainer98Item::m_tWindowless

Definition at line 117 of file TCItem.H.

STGMEDIUM* CTestContainer98Item::pStgMedium [protected]

Definition at line 208 of file TCItem.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TCItem.H
  • ole/TstCon/TCItem.Cpp
Generated on Sat Nov 23 2024 17:01:10 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTestContainer98View Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes

CTestContainer98View Class Reference

#include "TCView.H"

List of all members.

Public Member Functions

virtual | ~CTestContainer98View ()
void | ClearSelection ()
CTestContainer98Doc * GetDocument ()
CTestContainer98Item * | GetItemWithCapture () const
CTestContainer98Item * | GetItemWithFocus () const
BOOL | HandlePointerInactiveDragOver (CPoint point)
BOOL | HandlePointerInactiveMove (CPoint point, DWORD dwKeyState)
BOOL | HandlePointerInactiveSetCursor (DWORD dwMouseMessage)
BOOL | HandleWindowlessDragEnter (COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect)
void | HandleWindowlessDragLeave ()
BOOL | HandleWindowlessDragOver (COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect)
BOOL | HandleWindowlessDrop (COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect)
BOOL | HandleWindowlessKeyboardMessage ()
BOOL | HandleWindowlessMouseMessage (CPoint point)
CTestContainer98Item * | HitTestItems (CPoint point, DWORD *pdwHitType)
virtual DROPEFFECT | OnDragEnter (COleDataObject *pDataObject, DWORD dwKeyState, CPoint point)
virtual void | OnDragLeave ()
virtual DROPEFFECT | OnDragOver (COleDataObject *pDataObject, DWORD dwKeyState, CPoint point)
virtual void | OnDraw (CDC *pDC)
virtual BOOL | OnDrop (COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point)
void | OnFocus (CTestContainer98Item *pItem, BOOL tGotFocus)
HRESULT | OnWindowlessDefWindowMessage (UINT nMessage, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
HRESULT | OnWindowlessReleaseCapture (CTestContainer98Item *pItem)
HRESULT | OnWindowlessReleaseFocus ()
HRESULT | OnWindowlessSetCapture (CTestContainer98Item *pItem)
HRESULT | OnWindowlessSetFocus (CTestContainer98Item *pItem)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
void | SetMultiSelect (CTestContainer98Item *pItem, BOOL tSelect)
void | SetSelection (CTestContainer98Item *pItem)
void | SetupSelectionTracker (CRectTracker *pTracker)
void | SetupTracker (CTestContainer98Item *pItem, CRectTracker *pTracker)
void | ToggleMultiSelect (CTestContainer98Item *pItem)

Public Attributes

CTestContainer98Item * m_pSelection

Protected Member Functions

CTestContainer98View ()
virtual BOOL | IsSelected (const CObject *pDocItem) const
afx_msg void | OnCancelEditCntr ()
afx_msg void | OnCancelMode ()
afx_msg void | OnCaptureChanged (CWnd *pWnd)
afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnControlActivate ()
afx_msg void | OnControlDeactivate ()
afx_msg void | OnControlDrawMetaFile ()
afx_msg void | OnControlInvokeMethods ()
afx_msg void | OnControlLogging ()
afx_msg void | OnControlSaveToPropertyBag ()
afx_msg void | OnControlSaveToStorage ()
afx_msg void | OnControlSaveToStream ()
afx_msg void | OnControlUIActivate ()
afx_msg void | OnControlUIDeactivate ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnEditBringToFront ()
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnEditInsertControlFromStorage ()
afx_msg void | OnEditInsertFromStream ()
afx_msg void | OnEditPaste ()
afx_msg void | OnEditProperties ()
afx_msg void | OnEditSelectAll ()
afx_msg void | OnEditSendToBack ()
virtual void | OnInitialUpdate ()
afx_msg void | OnInsertObject ()
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnKillFocus (CWnd *pNewWnd)
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnOptionsDesignMode ()
afx_msg void | OnRButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
afx_msg void | OnUpdateControlActivate (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlDeactivate (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlDrawMetaFile (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlInvokeMethods (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlLogging (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlSaveToPropertyBag (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlSaveToStorage (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlSaveToStream (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlUIActivate (CCmdUI *pCmdUI)
afx_msg void | OnUpdateControlUIDeactivate (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditBringToFront (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditClear (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditCopy (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditCut (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditPaste (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditProperties (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditSelectAll (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditSendToBack (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOptionsDesignMode (CCmdUI *pCmdUI)

Protected Attributes

COleDropTarget | m_dropTarget
DWORD | m_dwLastDropKeyState
CTypedPtrList< CObList,
CTestContainer98Item * > 		m_lpSelectedItems
CTestContainer98Item * m_pInactiveDropTarget
CTestContainer98Item * m_pItemToDeactivateOnLeave
CTestContainer98Item * m_pItemWithCapture
CTestContainer98Item * m_pItemWithFocus
CPoint | m_ptLastMousePosition
CTestContainer98Item * m_pWindowlessDropTarget

Static Protected Attributes

static CLIPFORMAT | s_cfObjectDescriptor = NULL

Detailed Description

Definition at line 25 of file TCView.H.

Constructor & Destructor Documentation

CTestContainer98View::CTestContainer98View ( ) [protected]

Definition at line 98 of file TCView.Cpp.

                                           :
   m_pSelection( NULL ),
//   m_tDoingDrag( FALSE ),
   m_pItemWithCapture( NULL ),
   m_pItemWithFocus( NULL ),
   m_pItemToDeactivateOnLeave( NULL ),
   m_pInactiveDropTarget( NULL ),
   m_pWindowlessDropTarget( NULL ),
   m_dwLastDropKeyState( 0 )
{
   if( s_cfObjectDescriptor == NULL )
   {
    s_cfObjectDescriptor = CLIPFORMAT( ::RegisterClipboardFormat( _T(
     "Object Descriptor" ) ) );
   }
}

CTestContainer98View::~CTestContainer98View ( ) [virtual]

Definition at line 115 of file TCView.Cpp.

{
}

Member Function Documentation

void CTestContainer98View::ClearSelection ( )

Definition at line 137 of file TCView.Cpp.

{
   m_pSelection = NULL;
   m_lpSelectedItems.RemoveAll();
}

CTestContainer98Doc * CTestContainer98View::GetDocument ( ) [inline]

Definition at line 181 of file TCView.H.

   { return (CTestContainer98Doc*)m_pDocument; }

CTestContainer98Item * CTestContainer98View::GetItemWithCapture ( ) const

Definition at line 1433 of file TCView.Cpp.

{
   return( m_pItemWithCapture );
}

CTestContainer98Item * CTestContainer98View::GetItemWithFocus ( ) const

Definition at line 1438 of file TCView.Cpp.

{
   return( m_pItemWithFocus );
}

BOOL CTestContainer98View::HandlePointerInactiveDragOver ( CPoint point )

Definition at line 756 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   DWORD dwHitType;
   DWORD dwPolicy;
   BOOL tHandled;

   if( !GetDocument()->UseIPointerInactive() )
   {
    return( FALSE );
   }

   pItemHit = HitTestItems( point, &dwHitType );
   if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->SupportsIPointerInactive() )
   {
    pItemHit = NULL;
   }

   tHandled = FALSE;
   if( pItemHit != NULL )
   {
    if( !pItemHit->IsInPlaceActive() )
    {
     dwPolicy = pItemHit->GetActivationPolicy();
     if( dwPolicy&POINTERINACTIVE_ACTIVATEONDRAG )
     {
      TCTrace( TRACELEVEL_NORMAL,
         "Activating item because of POINTERINACTIVE_ACTIVATEONDRAG.\n" );
      pItemHit->Activate( OLEIVERB_SHOW, this );
     }
    }
   }

   return( tHandled );
}

BOOL CTestContainer98View::HandlePointerInactiveMove | ( | CPoint | point,
 |  | DWORD | dwKeyState
 | ) |  |

Definition at line 626 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   CRect rect;
   BOOL tHandled;
   DWORD dwPolicy;
   MSG msg;
   DWORD dwHitType;

   if( !GetDocument()->UseIPointerInactive() )
   {
    return( FALSE );
   }

   tHandled = FALSE;

   pItemHit = HitTestItems( point, &dwHitType );
   if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->SupportsIPointerInactive() )
   {
    pItemHit = NULL;
   }

   if( m_pItemToDeactivateOnLeave != NULL )
   {
    // We have an active object that wants to be deactivated as soon as the
    // mouse leaves its extents.
    if( m_pItemToDeactivateOnLeave != pItemHit )
    {
     TCTrace( TRACELEVEL_NORMAL,
      "Deactivating item because of POINTERINACTIVE_DEACTIVATEONLEAVE.\n" );
     m_pItemToDeactivateOnLeave->Deactivate();
     m_pItemToDeactivateOnLeave = NULL;
    }
   }

   if( pItemHit != NULL )
   {
    if( !pItemHit->IsInPlaceActive() )
    {
     // The mouse was over an inactive control that wants to receive mouse
     // pointer messages, so send the message to that control first.
     dwPolicy = pItemHit->OnPointerInactiveMove( point, dwKeyState );
     if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
     {
      msg = *GetCurrentMessage();
      TCTrace( TRACELEVEL_NORMAL,
         "Activating item because of POINTERINACTIVE_ACTIVATEONENTRY.\n" );
      pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
      if( dwPolicy&POINTERINACTIVE_DEACTIVATEONLEAVE )
      {
         // The control wants to be deactivated as soon as the mouse
         // leaves its extents.
         m_pItemToDeactivateOnLeave = pItemHit;
      }
     }
     tHandled = TRUE;
    }
   }
   else
   {
    tHandled = FALSE;
   }

   return( tHandled );
}

BOOL CTestContainer98View::HandlePointerInactiveSetCursor ( DWORD dwMouseMessage )

Definition at line 693 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   CRect rect;
   BOOL tHandled;
   DWORD dwPolicy;
   MSG msg;
   CPoint point;
   DWORD dwHitType;

   if( !GetDocument()->UseIPointerInactive() )
   {
    return( FALSE );
   }

   point = m_ptLastMousePosition;
   pItemHit = HitTestItems( point, &dwHitType );
   if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->SupportsIPointerInactive() )
   {
    pItemHit = NULL;
   }

   if( m_pItemToDeactivateOnLeave != NULL )
   {
    // If the pointer is still over the same control, then we really haven't
    // left it.
    if( m_pItemToDeactivateOnLeave != pItemHit )
    {
     TCTrace( TRACELEVEL_NORMAL,
      "Deactivating item because of POINTERINACTIVE_DEACTIVATEONLEAVE.\n" );
     m_pItemToDeactivateOnLeave->Deactivate();
     m_pItemToDeactivateOnLeave = NULL;
    }
   }

   tHandled = FALSE;
   if( pItemHit != NULL )
   {
    if( !pItemHit->IsInPlaceActive() )
    {
     // The mouse was over an inactive control that wants to receive mouse
     // pointer messages, so send the message to that control first.
     dwPolicy = pItemHit->OnPointerInactiveSetCursor( point,
      dwMouseMessage, &tHandled );
     if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
     {
      msg = *GetCurrentMessage();
      TCTrace( TRACELEVEL_NORMAL,
         "Activating item because of POINTERINACTIVE_ACTIVATEONENTRY.\n" );
      pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
      if( dwPolicy&POINTERINACTIVE_DEACTIVATEONLEAVE )
      {
         m_pItemToDeactivateOnLeave = pItemHit;
      }
      tHandled = TRUE;
     }
    }
   }

   return( tHandled );
}

BOOL CTestContainer98View::HandleWindowlessDragEnter | ( | COleDataObject * | pDataObject,
 |  | DWORD | dwKeyState,
 |  | CPoint | point,
 |  | DWORD * | pdwDropEffect
 | ) |  |

Definition at line 792 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   DWORD dwHitType;
   BOOL tHandled;

   ASSERT( m_pWindowlessDropTarget == NULL );

   pItemHit = HitTestItems( point, &dwHitType );
   if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->IsWindowless() )
   {
    pItemHit = NULL;
   }

   tHandled = FALSE;
   if( pItemHit != NULL )
   {
    tHandled = pItemHit->OnWindowlessDragEnter( pDataObject, dwKeyState,
     point, pdwDropEffect );
    if( tHandled )
    {
     // Remember which item we're over.
     m_pWindowlessDropTarget = pItemHit;
    }
   }

   return( tHandled );
}

void CTestContainer98View::HandleWindowlessDragLeave ( )

Definition at line 874 of file TCView.Cpp.

{
   if( m_pWindowlessDropTarget != NULL )
   {
    m_pWindowlessDropTarget->OnWindowlessDragLeave();
    m_pWindowlessDropTarget = NULL;
   }
}

BOOL CTestContainer98View::HandleWindowlessDragOver | ( | COleDataObject * | pDataObject,
 |  | DWORD | dwKeyState,
 |  | CPoint | point,
 |  | DWORD * | pdwDropEffect
 | ) |  |

Definition at line 823 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   DWORD dwHitType;
   BOOL tHandled;

   pItemHit = HitTestItems( point, &dwHitType );
   if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->IsWindowless() )
   {
    pItemHit = NULL;
   }

   tHandled = FALSE;
   if( m_pWindowlessDropTarget != NULL )
   {
    // The cursor was previously over a windowless control.
    if( m_pWindowlessDropTarget != pItemHit )
    {
     // The cursor left that windowless control.
     m_pWindowlessDropTarget->OnWindowlessDragLeave();
     m_pWindowlessDropTarget = NULL;
    }
   }

   if( pItemHit != NULL )
   {
    // The cursor is now over a windowless control.
    if( pItemHit != m_pWindowlessDropTarget )
    {
     // The cursor entered a new windowless control.
     ASSERT( m_pWindowlessDropTarget == NULL );
     tHandled = pItemHit->OnWindowlessDragEnter( pDataObject, dwKeyState,
      point, pdwDropEffect );
     if( tHandled )
     {
      m_pWindowlessDropTarget = pItemHit;
     }
    }
    else
    {
     // The cursor is still over the same windowless control.
     pItemHit->OnWindowlessDragOver( dwKeyState, point, pdwDropEffect );
     tHandled = TRUE;
    }
   }

   return( tHandled );
}

BOOL CTestContainer98View::HandleWindowlessDrop | ( | COleDataObject * | pDataObject,
 |  | DWORD | dwKeyState,
 |  | CPoint | point,
 |  | DWORD * | pdwDropEffect
 | ) |  |

Definition at line 883 of file TCView.Cpp.

{
   if( m_pWindowlessDropTarget != NULL )
   {
    m_pWindowlessDropTarget->OnWindowlessDrop( pDataObject, dwKeyState,
     point, pdwEffect );
    m_pWindowlessDropTarget = NULL;
    return( TRUE );
   }
   else
   {
    return( FALSE );
   }
}

BOOL CTestContainer98View::HandleWindowlessKeyboardMessage ( )

Definition at line 612 of file TCView.Cpp.

{
   if( m_pItemWithFocus != NULL )
   {
    if( m_pItemWithFocus->IsWindowless() )
    {
     m_pItemWithFocus->OnWindowMessage( GetCurrentMessage() );
     return( TRUE );
    }
   }

   return( FALSE );
}

BOOL CTestContainer98View::HandleWindowlessMouseMessage ( CPoint point )

Definition at line 899 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   DWORD dwHitType;
   BOOL tHandled;
   CRect rect;

   // First, see if a windowless control has mouse capture.
   if( m_pItemWithCapture != NULL )
   {
    m_pItemWithCapture->OnWindowMessage( GetCurrentMessage() );
    return( TRUE );
   }

   // Now, see if we hit a windowless control.
   pItemHit = HitTestItems( point, &dwHitType );
   if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->IsWindowless() )
   {
    pItemHit = NULL;
   }

   if( pItemHit != NULL )
   {
    // The mouse was over a windowless control, so send the message to that
    // control first.
    tHandled = pItemHit->OnWindowMessage( GetCurrentMessage() );
    if( !tHandled )
    {
     // The windowless control didn't do anything, but we don't want the
     // container to do anything either.
     {
      Default();
     }
    }
    return( TRUE );
   }

   return( FALSE );
}

CTestContainer98Item * CTestContainer98View::HitTestItems | ( | CPoint | point,
 |  | DWORD * | pdwHitType
 | ) |  |

Definition at line 425 of file TCView.Cpp.

{
   CTestContainer98Doc* pDoc;
   CTestContainer98Item* pItem;
   POSITION posItem;
   CRect rectBorder;
   DWORD dwHitResult;

   pDoc = GetDocument();

   *pdwHitType = HITTYPE_NONE;  // Assume that we don't hit anything.

   // Traverse the list of controls from front to back.
   posItem = pDoc->GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
    dwHitResult = pItem->HitTest( point );
    if( dwHitResult == HITRESULT_HIT )
    {
     // We hit the control itself.
     *pdwHitType = HITTYPE_OBJECT;
     return( pItem );
    }
    else
    {
     // We missed the control, so check the grab border that we added to
     // it.
     rectBorder = pItem->m_rect;
     rectBorder.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
     if( rectBorder.PtInRect( point ) && !pItem->m_rect.PtInRect( point ) )
     {
      // The point is outside the item's bounding rectangle, but inside
      // the border rect.
      *pdwHitType = HITTYPE_BORDER;
      return( pItem );
     }
    }
   }

   return( NULL );
}

BOOL CTestContainer98View::IsSelected ( const CObject * pDocItem ) const [protected, virtual]

Definition at line 267 of file TCView.Cpp.

{
   // The implementation below is adequate if your selection consists of
   //  only CTestContainer98Item objects.  To handle different selection
   //  mechanisms, the implementation here should be replaced.

   // TODO: implement this function that tests for a selected OLE client item

   return( pDocItem == m_pSelection );
}

void CTestContainer98View::OnCancelEditCntr ( ) [protected]

Definition at line 346 of file TCView.Cpp.

{
   // Close any in-place active item on this view.
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
   if( pActiveItem != NULL )
   {
    pActiveItem->Close();
   }
   ASSERT( GetDocument()->GetInPlaceActiveItem( this ) == NULL );
}

void CTestContainer98View::OnCancelMode ( ) [protected]

Definition at line 1675 of file TCView.Cpp.

{
   BOOL tHandled;

   CView::OnCancelMode();

   tHandled = HandleWindowlessKeyboardMessage();
   if( tHandled )
   {
    return;
   }
}

void CTestContainer98View::OnCaptureChanged ( CWnd * pWnd ) [protected]

Definition at line 1604 of file TCView.Cpp.

{
   // We're losing the capture, so the windowless item that has the capture
   // loses it, too.
   m_pItemWithCapture = NULL;

  CView::OnCaptureChanged( pWnd );
}

void CTestContainer98View::OnChar | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 1662 of file TCView.Cpp.

{
   BOOL tHandled;

   tHandled = HandleWindowlessKeyboardMessage();
   if( tHandled )
   {
    return;
   }

   CView::OnChar( nChar, nRepCnt, nFlags );
}

void CTestContainer98View::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 2031 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   CPoint ptClient;
   CMenu menu;
   CMenu* pPopupMenu;
   DWORD dwHitType;

   if( pWnd->m_hWnd != m_hWnd )
   {
    return;
   }

   GetParentFrame()->ActivateFrame();

   ptClient = point;
   ScreenToClient( &ptClient );

   pItemHit = HitTestItems( ptClient, &dwHitType );

   if( pItemHit == NULL )
   {
    menu.LoadMenu( IDR_CONTAINER_CONTEXT );
    pPopupMenu = menu.GetSubMenu( 0 );
    pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x,
     point.y, AfxGetMainWnd(), NULL );
    menu.DestroyMenu();
   }
   else
   {
    if( m_lpSelectedItems.Find( pItemHit ) != NULL )
    {
     // The item is selected.  Create a popup menu at the current mouse
     // location, and fill it with the appropriate verbs for the object.
     menu.LoadMenu( IDR_CONTROL_CONTEXT );
     pPopupMenu = menu.GetSubMenu( 0 );
     pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x,
      point.y, AfxGetMainWnd(), NULL );
     menu.DestroyMenu();
    }
   }
}

void CTestContainer98View::OnControlActivate ( ) [protected]

Definition at line 1937 of file TCView.Cpp.

{
   ENSURE( m_pSelection != NULL );

   m_pSelection->Activate( OLEIVERB_INPLACEACTIVATE, this );
}

void CTestContainer98View::OnControlDeactivate ( ) [protected]

Definition at line 1944 of file TCView.Cpp.

{
   ENSURE( m_pSelection != NULL );

   m_pSelection->Deactivate();
}

void CTestContainer98View::OnControlDrawMetaFile ( ) [protected]

Definition at line 2550 of file TCView.Cpp.

{
   IUnknownPtr pObject;
   CMetaFileWnd* pWnd;
   CString strWindowTitle;

   ASSERT( m_lpSelectedItems.GetCount() == 1 );
   ENSURE( m_pSelection != NULL );

   pObject = m_pSelection->m_lpObject;

   LOAD_STRING_FROM_RESOURCE( strWindowTitle, IDS_METAFILEWINDOWTITLE );
   #pragma warning(suppress: 6014) // pWnd will be freed when the window is closed.
   pWnd = new CMetaFileWnd;
   pWnd->Create( NULL, strWindowTitle );
   pWnd->SetObject( pObject );
   pWnd->ShowWindow( SW_SHOW );
}

void CTestContainer98View::OnControlInvokeMethods ( ) [protected]

Definition at line 1913 of file TCView.Cpp.

{
   ENSURE( m_pSelection != NULL );

   m_pSelection->InvokeMethods();
}

void CTestContainer98View::OnControlLogging ( ) [protected]

Definition at line 1925 of file TCView.Cpp.

{
   ENSURE( m_pSelection != NULL );

   m_pSelection->SetLoggingOptions();
}

void CTestContainer98View::OnControlSaveToPropertyBag ( ) [protected]

Definition at line 1868 of file TCView.Cpp.

{
   CPropertyBag* pPropertyBagObject;
   IPropertyBagPtr pPropertyBag;
   HRESULT hResult;

   #pragma warning(suppress: 6014) // unexpected prefast memory leak warning
   pPropertyBagObject = new CPropertyBag;
   if( pPropertyBagObject == NULL )
   {
    return;
   }

   hResult = pPropertyBagObject->QueryInterface( IID_IPropertyBag,
    (void**)&pPropertyBag );
   ASSERT( SUCCEEDED( hResult ) );

   hResult = m_pSelection->SaveToPropertyBag( pPropertyBag );
   if( FAILED( hResult ) )
   {
    CString strErrorMessage;
    _com_error e( hResult );

    LOAD_STRING_FROM_RESOURCE(strErrorMessage, IDS_SAVETOPROPERTYBAGFAILED);

    strErrorMessage += e.ErrorMessage();
    AfxMessageBox( strErrorMessage );
    return;
   }

   CPropertyBagDlg dlg( pPropertyBagObject );

   dlg.DoModal();
}

void CTestContainer98View::OnControlSaveToStorage ( ) [protected]

Definition at line 2430 of file TCView.Cpp.

{

   LONG nResult;
   HRESULT hResult;
   IStoragePtr pStorage;

   CString strFilter;
   LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STORAGE_FILES);
   CFileDialog dlg( FALSE, _T( "TSG" ), NULL, OFN_HIDEREADONLY|
    OFN_OVERWRITEPROMPT, strFilter);

   ENSURE( m_pSelection != NULL );

   nResult = (LONG)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   hResult = StgCreateDocfile( CT2COLE( dlg.GetPathName() ), STGM_READWRITE|
    STGM_SHARE_EXCLUSIVE|STGM_CREATE, 0, &pStorage );
   if( FAILED( hResult ) )
   {
    return;
   }

   hResult = m_pSelection->SaveToStorage( pStorage );
   if( FAILED( hResult ) )
   {
    CString strErrorMessage;
    _com_error e( hResult );

    LOAD_STRING_FROM_RESOURCE( strErrorMessage, IDS_SAVETOSTORAGEFAILED );
    strErrorMessage += e.ErrorMessage();
    AfxMessageBox( strErrorMessage );
    return;
   }
}

void CTestContainer98View::OnControlSaveToStream ( ) [protected]

Definition at line 1688 of file TCView.Cpp.

{
   int nResult;

   CString strFilter;
   LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STREAM_FILES);
   CFileDialog dlg( FALSE, _T( "TSM" ), NULL, OFN_HIDEREADONLY|
    OFN_OVERWRITEPROMPT, strFilter);
   HRESULT hResult;
   IStreamPtr pStream;
   LARGE_INTEGER nDisplacement;
   ULARGE_INTEGER iSeekPtr;
   ULONG nBytesLeft;
   ULONG nBytesRead;
   BYTE abData[512];

   ENSURE( m_pSelection != NULL );

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   hResult = CreateStreamOnHGlobal( NULL, TRUE, &pStream );
   if( FAILED( hResult ) )
   {
    TRACE( "CreateStreamOnHGlobal() failed.\n" );
    return;
   }

   hResult = m_pSelection->SaveToStream( pStream );
   if( FAILED( hResult ) )
   {
    CString strErrorMessage;
    _com_error e( hResult );

    LOAD_STRING_FROM_RESOURCE(strErrorMessage, IDS_SAVETOSTREAMFAILED);
    strErrorMessage += e.ErrorMessage();
    AfxMessageBox( strErrorMessage );
    return;
   }

   try
   {
    CFile file( dlg.GetPathName(), CFile::modeCreate|CFile::modeWrite|
     CFile::shareExclusive );

    nDisplacement.QuadPart = 0;
    pStream->Seek( nDisplacement, STREAM_SEEK_CUR, &iSeekPtr );
    nBytesLeft = ULONG( iSeekPtr.QuadPart );
    pStream->Seek( nDisplacement, STREAM_SEEK_SET, NULL );
    while( nBytesLeft > 0 )
    {
     pStream->Read( abData, min( nBytesLeft, sizeof( abData ) ),
      &nBytesRead );
     ASSERT( nBytesRead > 0 );
     file.Write( abData, nBytesRead );
     nBytesLeft -= nBytesRead;
    }
   }
   catch( CFileException* pException )
   {
    pException->Delete();

    AfxMessageBox( IDS_ERRORWRITINGTOFILE );
   }
}

void CTestContainer98View::OnControlUIActivate ( ) [protected]

Definition at line 1951 of file TCView.Cpp.

{
   ENSURE( m_pSelection != NULL );

   m_pSelection->Activate( OLEIVERB_UIACTIVATE, this );
}

void CTestContainer98View::OnControlUIDeactivate ( ) [protected]

Definition at line 1958 of file TCView.Cpp.

{
   ENSURE( m_pSelection != NULL );

   m_pSelection->DeactivateUI();
}

int CTestContainer98View::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 1531 of file TCView.Cpp.

{
   if( CView::OnCreate( lpCreateStruct ) == -1 )
   {
    return( -1 );
   }

   // Register drop target.
   m_dropTarget.Register( this );

   return( 0 );
}

void CTestContainer98View::OnDestroy ( void ) [protected]

Definition at line 249 of file TCView.Cpp.

{
   // Deactivate the item on destruction; this is important
   // when a splitter view is being used.
   CView::OnDestroy();

   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
   if( (pActiveItem != NULL) && (pActiveItem->GetActiveView() == this) )
   {
    pActiveItem->Deactivate();
    ASSERT( GetDocument()->GetInPlaceActiveItem( this ) == NULL );
   }
}

DROPEFFECT CTestContainer98View::OnDragEnter | ( | COleDataObject * | pDataObject,
 |  | DWORD | dwKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 1489 of file TCView.Cpp.

{
   BOOL tHandled;
   DWORD dwDropEffect;

   TRACE( "OnDragEnter()\n" );

   HandlePointerInactiveDragOver( point );

   dwDropEffect = DROPEFFECT_COPY|DROPEFFECT_MOVE|DROPEFFECT_LINK;
   tHandled = HandleWindowlessDragEnter( pDataObject, dwKeyState, point,
    &dwDropEffect );
   if( tHandled )
   {
    return( dwDropEffect );
   }

  return( DROPEFFECT_NONE );
}

void CTestContainer98View::OnDragLeave ( ) [virtual]

Definition at line 1859 of file TCView.Cpp.

{
   TRACE( "OnDragLeave()\n" );

   HandleWindowlessDragLeave();

  CView::OnDragLeave();
}

DROPEFFECT CTestContainer98View::OnDragOver | ( | COleDataObject * | pDataObject,
 |  | DWORD | dwKeyState,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 1510 of file TCView.Cpp.

{
   DWORD dwDropEffect;
   BOOL tHandled;

   m_dwLastDropKeyState = dwKeyState;

   HandlePointerInactiveDragOver( point );

   dwDropEffect = DROPEFFECT_COPY|DROPEFFECT_MOVE|DROPEFFECT_LINK;
   tHandled = HandleWindowlessDragOver( pDataObject, dwKeyState, point,
    &dwDropEffect );
   if( tHandled )
   {
    return( dwDropEffect );
   }

   return( DROPEFFECT_NONE );
}

void CTestContainer98View::OnDraw ( CDC * pDC ) [virtual]

Definition at line 146 of file TCView.Cpp.

{
   POSITION posItem;
   CTestContainer98Doc* pDoc;
   CTestContainer98Item* pItem;

   pDoc = GetDocument();
   ASSERT_VALID( pDoc );

   if( pDoc->UseTwoPassDrawing() )
   {
    // Draw the opaque parts of the controls from front to back.
    TCTrace( TRACELEVEL_VERBOSE, "Starting drawing pass 1.\n" );
    posItem = pDoc->GetStartPosition();
    while( posItem != NULL )
    {
     pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );

     // Push the state of the DC onto the stack.  This is to save the
     // current clip region for when we do the second pass.
     pDC->SaveDC();

     // The item will exclude any opaque areas from the clip region of the
     // DC.
     pItem->DrawFrontToBack( pDC, pItem->m_rect );

     if( pDoc->UseSlowDrawing() )
     {
      Sleep( 1000 );
     }
    }

    // Draw the rest of each control from back to front, clipping out opaque
    // regions of any controls in front.
    TCTrace( TRACELEVEL_VERBOSE, "Starting drawing pass 2.\n" );
    posItem = pDoc->GetTailPosition();
    while( posItem != NULL )
    {
     pItem = (CTestContainer98Item*)pDoc->GetPrevItem( posItem );

     // Draw the tracker for the item.
     CRectTracker tracker;
     SetupTracker( pItem, &tracker );
     tracker.Draw( pDC );

     // Pop the state of the DC off the stack.  This makes sure the
     // clipping region excludes only the opaque regions of all the
     // controls in front of this one.
     pDC->RestoreDC( -1 );

     pItem->DrawBackToFront( pDC, pItem->m_rect );

     if( pDoc->UseSlowDrawing() )
     {
      Sleep( 1000 );
     }
    }
   }
   else
   {
    // Draw the OLE items from the list.
    posItem = pDoc->GetTailPosition();
    while( posItem != NULL )
    {
     pItem = (CTestContainer98Item*)pDoc->GetPrevItem( posItem );

     // Draw the tracker for the item.
     CRectTracker tracker;
     SetupTracker( pItem, &tracker );
     tracker.Draw( pDC );

     // Draw the item.
     pItem->Draw( pDC, pItem->m_rect );

     if( pDoc->UseSlowDrawing() )
     {
      Sleep( 1000 );
     }
    }
   }
}

BOOL CTestContainer98View::OnDrop | ( | COleDataObject * | pDataObject,
 |  | DROPEFFECT | dropEffect,
 |  | CPoint | point |
 | ) |  |  | [virtual]

Definition at line 1414 of file TCView.Cpp.

{
   DWORD dwDropEffect;
   BOOL tHandled;

   TRACE( "OnDrop()\n" );

   dwDropEffect = dropEffect;
   tHandled = HandleWindowlessDrop( pDataObject, m_dwLastDropKeyState, point,
    &dwDropEffect );
   if( tHandled )
   {
    return( CView::OnDrop( pDataObject, dropEffect, point ) );
   }

   return( CView::OnDrop( pDataObject, dropEffect, point ) );
}

void CTestContainer98View::OnEditBringToFront ( ) [protected]

Definition at line 1987 of file TCView.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;

   ASSERT( !m_lpSelectedItems.IsEmpty() );

   posItem = m_lpSelectedItems.GetHeadPosition();
   while( posItem != NULL )
   {
    pItem = m_lpSelectedItems.GetNext( posItem );
    GetDocument()->BringToFront( pItem );
   }

   Invalidate();
}

void CTestContainer98View::OnEditClear ( ) [protected]

Definition at line 1231 of file TCView.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;

   ASSERT( !m_lpSelectedItems.IsEmpty() );

   posItem = m_lpSelectedItems.GetHeadPosition();
   while( posItem != NULL )
   {
    pItem = m_lpSelectedItems.GetNext( posItem );
    pItem->Delete();
   }
   ClearSelection();
   GetDocument()->UpdateAllViews( NULL );
}

void CTestContainer98View::OnEditCopy ( ) [protected]

Definition at line 2215 of file TCView.Cpp.

{
   IStoragePtr pStorage;
   HRESULT hResult;
   POSITION posItem;
   CTestContainer98Item* pItem;
   COleStreamFile file;
   ULONG iItem;
   CString strStorageName;
   BSTR bstrStorageName;
   IStoragePtr pSubStorage;
   COleDataSource* pDataSource;
   CLIPFORMAT cf;
   STGMEDIUM stgmedium;
   int nSelectedItems;

   ASSERT( m_lpSelectedItems.GetCount() > 0 );

   pDataSource = new COleDataSource;
   try
   {
    hResult = StgCreateDocfile( NULL, STGM_CREATE|STGM_READWRITE|
     STGM_DELETEONRELEASE|STGM_SHARE_EXCLUSIVE, 0, &pStorage );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    if( !file.CreateStream( pStorage, _T( "Contents" ), CFile::modeReadWrite|
     CFile::shareExclusive|CFile::modeCreate ) )
    {
     AfxThrowOleException( E_FAIL );
    }

    CArchive ar( &file, CArchive::store );

    nSelectedItems = (int)m_lpSelectedItems.GetCount();
    ar<<nSelectedItems;

    posItem = m_lpSelectedItems.GetHeadPosition();
    iItem = 0;
    while( posItem != NULL )
    {
     pItem = m_lpSelectedItems.GetNext( posItem );
     strStorageName.Format( "Control%d", iItem );
     bstrStorageName = strStorageName.AllocSysString();

     hResult = pStorage->CreateStorage( bstrStorageName, STGM_READWRITE|
      STGM_CREATE|STGM_SHARE_EXCLUSIVE, 0, 0, &pSubStorage );
     SysFreeString( bstrStorageName );
     if( FAILED( hResult ) )
     {
      AfxThrowOleException( hResult );
     }

     pItem->CopyToClipboard( ar, pSubStorage );

     pSubStorage.Release();
     iItem++;
    }

    stgmedium.tymed = TYMED_ISTORAGE;
    stgmedium.pstg = pStorage;
    stgmedium.pstg->AddRef();
    stgmedium.pUnkForRelease = NULL;

    cf = CLIPFORMAT( ::RegisterClipboardFormat( _T( "TC98 Controls" ) ) );
    pDataSource->CacheData( cf, &stgmedium );
   }
   catch( COleException* pException )
   {
    CString strErrorMessage;
    _com_error error( pException->m_sc );

    pException->Delete();
    delete pDataSource;

    AfxFormatString1( strErrorMessage, IDS_COPYFAILED,
     error.ErrorMessage() );
    AfxMessageBox( strErrorMessage );
    return;
   }

   file.Close();

   pDataSource->SetClipboard();
   // Don't need to delete the object. The object was cached, when this object is removed from clipboard it will be destroyed.
   // delete pDataSource;
}

void CTestContainer98View::OnEditCut ( ) [protected]

Definition at line 2419 of file TCView.Cpp.

{
   OnEditCopy();
   OnEditClear();
}

void CTestContainer98View::OnEditInsertControlFromStorage ( ) [protected]

Definition at line 2475 of file TCView.Cpp.

{

   CTestContainer98Item* pItem;
   CTestContainer98Doc* pDoc;
   int nResult;
   IStoragePtr pStorage;
   HRESULT hResult;
   CLSID clsid;
   CString strMessage;

   CString strFilter;
   LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STORAGE_FILES);
   CFileDialog dlg( TRUE, _T( "TSG" ), NULL, OFN_HIDEREADONLY|
    OFN_OVERWRITEPROMPT, strFilter);

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   hResult = StgOpenStorage( CT2COLE( dlg.GetPathName() ), NULL, STGM_READ|
    STGM_SHARE_DENY_WRITE, NULL, 0, &pStorage );
   if( FAILED( hResult ) )
   {
    _com_error error( hResult );

    AfxFormatString1( strMessage, IDS_OPENSTORAGEFAILED,
     error.ErrorMessage() );
    AfxMessageBox( strMessage );
    return;
   }

   ReadClassStg( pStorage, &clsid );

   pDoc = GetDocument();

   pItem = NULL;
   try
   {
    pItem = pDoc->AddControl( clsid, NULL, IID_IStorage, pStorage );
   }
   catch( COleException* pException )
   {
    _com_error error( pException->m_sc );

    pException->Delete();

    AfxFormatString1( strMessage, IDS_LOADCONTROLFAILED,
     error.ErrorMessage() );

    AfxMessageBox( strMessage );
   }
   catch( CException* pException )
   {
    _com_error error( E_FAIL );

    pException->Delete();

    AfxFormatString1( strMessage, IDS_LOADCONTROLFAILED,
     error.ErrorMessage() );

    AfxMessageBox( strMessage );
   }
}

void CTestContainer98View::OnEditInsertFromStream ( ) [protected]

Definition at line 1757 of file TCView.Cpp.

{
   int nResult;
   HRESULT hResult;
   IStreamPtr pStream;
   LARGE_INTEGER nDisplacement;
   ULONG nBytesLeft;
   ULONG nBytesToRead;
   ULONGLONG nFileLength;
   CTestContainer98Doc* pDoc;
   CTestContainer98Item* pItem;
   CLSID clsid;
   BYTE abData[512];

   CString strFilter;
   LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STREAM_FILES);
   CFileDialog dlg( TRUE, _T( "TSM" ), NULL, OFN_HIDEREADONLY|
    OFN_OVERWRITEPROMPT, strFilter );

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   hResult = CreateStreamOnHGlobal( NULL, TRUE, &pStream );
   if( FAILED( hResult ) )
   {
    TRACE( "CreateStreamOnHGlobal() failed.\n" );
    return;
   }

   try
   {
    CFile file( dlg.GetPathName(), CFile::modeRead|CFile::shareDenyWrite );

     nFileLength = file.GetLength();
     if( nFileLength > INT_MAX )
     {
        AfxThrowOleException( E_FAIL );
     }
     nBytesLeft = ULONG( nFileLength );
    while( nBytesLeft > 0 )
    {
     nBytesToRead = min( nBytesLeft, sizeof( abData ) );
     file.Read( abData, nBytesToRead );
     pStream->Write( abData, nBytesToRead, NULL );
     nBytesLeft -= nBytesToRead;
    }
   }
   catch( CException* pException )
   {
    pException->Delete();
    AfxMessageBox( IDS_ERRORREADINGFROMFILE );
    return;
   }

   nDisplacement.QuadPart = 0;
   pStream->Seek( nDisplacement, STREAM_SEEK_SET, NULL );

   BeginWaitCursor();

   pItem = NULL;
   try
   {
    hResult = ReadClassStm( pStream, &clsid );
    if( FAILED( hResult ) )
    {
     AfxThrowOleException( hResult );
    }

    pDoc = GetDocument();
    pItem = pDoc->AddControl( clsid, NULL, IID_IStream, pStream );
   }
   catch( COleException* pException )
   {
    CString strErrorMessage;
    _com_error error( pException->m_sc );

    pException->Delete();

    if( pItem != NULL )
    {
     ASSERT_VALID( pItem );
     pItem->Delete();
    }

    AfxFormatString1( strErrorMessage, IDS_CREATEFAILED,
     error.ErrorMessage() );

    AfxMessageBox( strErrorMessage );
   }
   catch( CException* pException )
   {
    pException->Delete();

    AfxMessageBox( IDP_FAILED_TO_CREATE );
   }

   EndWaitCursor();
}

void CTestContainer98View::OnEditPaste ( ) [protected]

Definition at line 2305 of file TCView.Cpp.

{
   CTestContainer98Item* pItem;
   CTestContainer98Doc* pDoc;
   COleDataObject data;
   CLIPFORMAT cf;
   STGMEDIUM stgmedium;
   IStoragePtr pStorage;
   IStoragePtr pSubStorage;
   int iItem;
   int nItems;
   CString strItemName;
   BSTR bstrItemName;
   HRESULT hResult;
   COleStreamFile file;

   pDoc = GetDocument();

   if( !data.AttachClipboard() )
   {
    return;
   }

   cf = CLIPFORMAT( ::RegisterClipboardFormat( _T( "TC98 Controls" ) ) );
   if( !data.GetData( cf, &stgmedium ) )
   {
    return;
   }

   ASSERT( stgmedium.tymed == TYMED_ISTORAGE );

   pStorage = stgmedium.pstg;
   ReleaseStgMedium( &stgmedium );

   if( !file.OpenStream( pStorage, _T( "Contents" ), STGM_READ|
    STGM_SHARE_EXCLUSIVE ) )
   {
    return;
   }

   CArchive ar( &file, CArchive::load|CArchive::bNoFlushOnDelete );

   ClearSelection();

   ar>>nItems;

   for( iItem = 0; iItem < nItems; iItem++ )
   {
    pItem = NULL;
    try
    {
     strItemName.Format( "Control%d", iItem );
     bstrItemName = strItemName.AllocSysString();
     hResult = pStorage->OpenStorage( bstrItemName, NULL, STGM_READWRITE|
      STGM_SHARE_EXCLUSIVE, NULL, 0, &pSubStorage );
     SysFreeString( bstrItemName );
     if( FAILED( hResult ) )
     {
      AfxThrowOleException( hResult );
     }

     pItem = new CTestContainer98Item( pDoc );
     if( !pItem->CreateFromClipboard( ar, pSubStorage ) )
     {
      AfxThrowOleException( E_FAIL );
     }

     pItem->UpdateLink();
     pItem->InvalidateItem();

     // Activate the item if it wants to be active all the time.
     if( pItem->ShouldActivateWhenVisible() )
     {
      if( pDoc->GetUserMode() && pItem->IsInvisibleAtRuntime() )
      {
         pItem->DoVerb( OLEIVERB_HIDE, this );
      }
      else
      {
         pItem->DoVerb( OLEIVERB_SHOW, this );
      }
     }

     SetMultiSelect( pItem, TRUE );

     ASSERT_VALID( pItem );
    }
    catch( CException* pException )
    {
     pException->Delete();

     delete pItem;
    }
   }

   ar.Flush();
   file.Close();

   pDoc->SetModifiedFlag();

   Invalidate();
}

void CTestContainer98View::OnEditProperties ( ) [protected]

Definition at line 2074 of file TCView.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;
   CArray< CLSID, CLSID& > aclsidCommonPages;
   CArray< CLSID, CLSID& > aclsidPages;
   BOOL tSuccess;
   int iPage;
   int iCommonPage;
   BOOL tFound;
   CLSID clsidPage;

   posItem = m_lpSelectedItems.GetHeadPosition();
   pItem = m_lpSelectedItems.GetNext( posItem );
   tSuccess = pItem->GetPropertyPageCLSIDs( aclsidCommonPages );
   if( !tSuccess )
   {
    return;
   }
   while( posItem != NULL )
   {
    pItem = m_lpSelectedItems.GetNext( posItem );
    aclsidPages.RemoveAll();
    tSuccess = pItem->GetPropertyPageCLSIDs( aclsidPages );
    if( !tSuccess )
    {
     return;
    }

    for( iCommonPage = (int)aclsidCommonPages.GetSize()-1; iCommonPage >= 0;
     iCommonPage-- )
    {
     clsidPage = aclsidCommonPages[iCommonPage];
     tFound = FALSE;
     for( iPage = 0; iPage < aclsidPages.GetSize(); iPage++ )
     {
      if( IsEqualCLSID( clsidPage, aclsidPages[iPage] ) )
      {
         tFound = TRUE;
      }
     }
     if( !tFound )
     {
      aclsidCommonPages.RemoveAt( iCommonPage );
     }
    }
   }

   if( m_lpSelectedItems.GetCount() > 1 )
   {
    // Don't display the extended properties page if multiple items are
    // selected.
    for( iCommonPage = 0; iCommonPage < aclsidCommonPages.GetSize();
     iCommonPage++ )
    {
     if( IsEqualCLSID( aclsidCommonPages[iCommonPage], __uuidof(
      TCExtPage ) ) )
     {
      aclsidCommonPages.RemoveAt( iCommonPage );
     }
    }
   }

   if( aclsidCommonPages.GetSize() == 0 )
   {
      if( m_lpSelectedItems.GetCount() > 1 )
      {
        AfxMessageBox( IDS_NOCOMMONPROPERTIES );
      }
      else
      {
         AfxMessageBox( IDS_NOPROPERTYPAGES );
      }
   }
   else
   {

    int iObject;
    CString strCaption;

    ::ATL::CAutoStackPtr<IUnknown *> ppObjects((IUnknown**)_malloca( m_lpSelectedItems.GetCount()*sizeof( IUnknown* ) ));
    ENSURE(ppObjects);
    iObject = 0;
    posItem = m_lpSelectedItems.GetHeadPosition();
    while( posItem != NULL )
    {
     pItem = m_lpSelectedItems.GetNext( posItem );
     ppObjects[iObject] = pItem->m_lpObject;
     iObject++;
    }

    if (aclsidCommonPages.GetSize() < 0 || aclsidCommonPages.GetSize() > (INT_MAX / sizeof(CLSID)))
    {
      return;
    }

    ::ATL::CAutoStackPtr<CLSID> pclsidCommonPages( (CLSID*)_malloca( aclsidCommonPages.GetSize()*sizeof( CLSID ) ));
    ENSURE(pclsidCommonPages);
    for( iPage = 0; iPage < aclsidCommonPages.GetSize(); iPage++ )
    {
     pclsidCommonPages[iPage] = aclsidCommonPages[iPage];
    }

    if( m_lpSelectedItems.GetCount() > 1 )
    {
    LOAD_STRING_FROM_RESOURCE( strCaption, IDS_MULTIPLESELECTION );
    }
    else
    {
     strCaption = m_pSelection->GetDisplayName();
    }
    OleCreatePropertyFrame( m_hWnd, 0, 0, CT2COLE( strCaption ),
     m_lpSelectedItems.GetCount(), ppObjects, aclsidCommonPages.GetSize(),
     pclsidCommonPages, GetUserDefaultLCID(), 0, NULL );

    //WINBUG: OleCreatePropertyFrame doesn't return focus to its parent when
    // it closes
    SetFocus();
   }
}

void CTestContainer98View::OnEditSelectAll ( ) [protected]

Definition at line 2200 of file TCView.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;
   CTestContainer98Doc* pDoc;

   pDoc = GetDocument();
   posItem = pDoc->GetStartPosition();
   while( posItem != NULL )
   {
    pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
    SetMultiSelect( pItem, TRUE );
   }
}

void CTestContainer98View::OnEditSendToBack ( ) [protected]

Definition at line 2009 of file TCView.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;

   ASSERT( !m_lpSelectedItems.IsEmpty() );

   posItem = m_lpSelectedItems.GetHeadPosition();
   while( posItem != NULL )
   {
    pItem = m_lpSelectedItems.GetNext( posItem );
    GetDocument()->SendToBack( pItem );
   }

   Invalidate();
}

void CTestContainer98View::OnFocus | ( | CTestContainer98Item * | pItem,
 |  | BOOL | tGotFocus
 | ) |  |

Definition at line 1613 of file TCView.Cpp.

{
   ASSERT( pItem != NULL );

   if( tGotFocus )
   {
    m_pItemWithFocus = pItem;
   }
   else
   {
    if( m_pItemWithFocus == pItem )
    {
     m_pItemWithFocus = NULL;
    }
   }
}

void CTestContainer98View::OnInitialUpdate ( ) [protected, virtual]

Definition at line 228 of file TCView.Cpp.

{
   CView::OnInitialUpdate();

   m_pSelection = NULL;
   m_lpSelectedItems.RemoveAll();

   CTestContainer98App * pApp = (CTestContainer98App * )AfxGetApp();
   ENSURE(pApp);

   if(pApp->m_options.m_strDSMFile != _T(""))
   {
     CTestContainer98Doc * pDoc = GetDocument();
     ENSURE(pDoc);
     pDoc->RunAutomationScript(pApp->m_options.m_strDSMFile);
   }
}

void CTestContainer98View::OnInsertObject ( ) [protected]

Definition at line 278 of file TCView.Cpp.

{
   CTestContainer98Item* pItem;
   CTestContainer98Doc* pDoc;
   CInsertControlDlg dlg;
   int nResult;

   nResult = (int)dlg.DoModal();
   if( nResult != IDOK )
   {
    return;
   }

   BeginWaitCursor();

   pItem = NULL;
   try
   {
    // Create new item connected to this document.
    pDoc = GetDocument();

    pItem = pDoc->AddControl( dlg.m_clsid, NULL );
    ASSERT_VALID( pItem );

    // As an arbitrary user interface design, this sets the selection to the
    // last item inserted.

    SetSelection( pItem );

    pItem->InvalidateItem();
   }
   catch( COleException* pException )
   {
    CString strErrorMessage;
    _com_error error( pException->m_sc );

    pException->Delete();

    if( pItem != NULL )
    {
     ASSERT_VALID( pItem );
     pItem->Delete();
    }

    AfxFormatString1( strErrorMessage, IDS_CREATEFAILED,
     error.ErrorMessage() );

    AfxMessageBox( strErrorMessage );
   }
   catch( CException* pException )
   {
    pException->Delete();

    if( pItem != NULL )
    {
     ASSERT_VALID( pItem );
     pItem->Delete();
    }

    AfxMessageBox( IDP_FAILED_TO_CREATE );
   }

   EndWaitCursor();
}

void CTestContainer98View::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 1636 of file TCView.Cpp.

{
   BOOL tHandled;

   tHandled = HandleWindowlessKeyboardMessage();
   if( tHandled )
   {
    return;
   }

   CView::OnKeyDown( nChar, nRepCnt, nFlags );
}

void CTestContainer98View::OnKeyUp | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 1649 of file TCView.Cpp.

{
   BOOL tHandled;

   tHandled = HandleWindowlessKeyboardMessage();
   if( tHandled )
   {
    return;
   }

   CView::OnKeyUp( nChar, nRepCnt, nFlags );
}

void CTestContainer98View::OnKillFocus ( CWnd * pNewWnd ) [protected]

Definition at line 1631 of file TCView.Cpp.

{
  CView ::OnKillFocus( pNewWnd );
}

void CTestContainer98View::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 1118 of file TCView.Cpp.

{
   LONG iVerb;
   BOOL tHandled;
   CTestContainer98Item* pItemHit;
   MSG msg;
   DWORD dwHitType;

   tHandled = HandleWindowlessMouseMessage( point );
   if( tHandled )
   {
    return;
   }

   pItemHit = HitTestItems( point, &dwHitType );

   SetSelection( pItemHit );

   if( pItemHit != NULL )
   {
    if( !GetDocument()->GetUserMode() && pItemHit->IsInsideOut() &&
     !pItemHit->IsUIActive() )
    {
     // UIActivate the selected object.
     msg = *GetCurrentMessage();
     pItemHit->DoVerb( OLEIVERB_UIACTIVATE, this, &msg );
    }
   }

   Invalidate();

   if( m_pSelection != NULL )
   {
    if( GetKeyState( VK_CONTROL ) < 0 )
    {
     iVerb = OLEIVERB_OPEN;
    }
    else
    {
     iVerb = OLEIVERB_PRIMARY;
    }

    m_pSelection->DoVerb( iVerb, this );
   }

   CView::OnLButtonDblClk( nFlags, point );
}

void CTestContainer98View::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 939 of file TCView.Cpp.

{
   BOOL tHandled;
   CTestContainer98Item* pItemHit;
   CTestContainer98Item* pItem;
   POSITION posItem;
   DWORD dwHitType;
   int eHitType;
   MSG msg;

   tHandled = HandleWindowlessMouseMessage( point );
   if( tHandled )
   {
    return;
   }

   pItemHit = HitTestItems( point, &dwHitType );
   if( nFlags&MK_CONTROL )
   {
    if( pItemHit != NULL )
    {
     ToggleMultiSelect( pItemHit );
    }
   }
   else
   {
    if( m_lpSelectedItems.Find( pItemHit ) == NULL )
    {
     SetSelection( pItemHit );
    }
   }

   if( (pItemHit != NULL) && (dwHitType != HITTYPE_BORDER) )
   {
    if( !pItemHit->IsInPlaceActive() )
    {
     msg = *GetCurrentMessage();
     pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
    }
   }

   if( !m_lpSelectedItems.IsEmpty() )
   {
    if( dwHitType == HITTYPE_BORDER )
    {
     CRectTracker tracker;
     CPoint ptStart;
     CSize sizeDisplacement;
     CRect rectItem;

     SetupSelectionTracker( &tracker );
     ptStart = tracker.m_rect.TopLeft();
     eHitType = tracker.HitTest( point );
     if( eHitType == CRectTracker::hitMiddle )
     {
      // Drag the selection
      if( tracker.Track( this, point ) )
      {
         posItem = m_lpSelectedItems.GetHeadPosition();
         while( posItem != NULL )
         {
          pItem = m_lpSelectedItems.GetNext( posItem );
          pItem->InvalidateItem();
         }

         sizeDisplacement = tracker.m_rect.TopLeft()-ptStart;

         posItem = m_lpSelectedItems.GetHeadPosition();
         while( posItem != NULL )
         {
          pItem = m_lpSelectedItems.GetNext( posItem );
          rectItem = pItem->m_rect;
          rectItem.OffsetRect( sizeDisplacement );
          pItem->Move( rectItem );
          pItem->InvalidateItem();
         }

         GetDocument()->SetModifiedFlag();
      }
     }
     else
     {
      if( (eHitType != CRectTracker::hitNothing) && (m_pSelection !=
         NULL) )
      {
         // Resize the item.
         if( tracker.Track( this, point ) )
         {
          m_pSelection->InvalidateItem();
         }

         tracker.m_rect.DeflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
         m_pSelection->Move( tracker.m_rect );
         m_pSelection->InvalidateItem();

         GetDocument()->SetModifiedFlag();
      }
     }
    }
   }
   else
   {
    CRectTracker tracker;
    CRect rectIntersection;
    CTestContainer98Doc* pDoc;

    if( tracker.TrackRubberBand( this, point, TRUE ) )
    {
     tracker.m_rect.NormalizeRect();

     pDoc = GetDocument();
     posItem = pDoc->GetStartPosition();
     while( posItem != NULL )
     {
      pItem = STATIC_DOWNCAST( CTestContainer98Item, pDoc->GetNextItem(
         posItem ) );
      if( rectIntersection.IntersectRect( tracker.m_rect,
         pItem->m_rect ) )
      {
         SetMultiSelect( pItem, TRUE );
      }
     }
    }
   }
}

void CTestContainer98View::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 1544 of file TCView.Cpp.

{
   BOOL tHandled;

   tHandled = HandleWindowlessMouseMessage( point );
   if( tHandled )
   {
    return;
   }

   CView::OnLButtonUp( nFlags, point );
}

void CTestContainer98View::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 1557 of file TCView.Cpp.

{
   BOOL tHandled;

   m_ptLastMousePosition = point;

   tHandled = HandlePointerInactiveMove( point, nFlags );
   if( tHandled )
   {
    return;
   }

   tHandled = HandleWindowlessMouseMessage( point );
   if( tHandled )
   {
    return;
   }

   CView::OnMouseMove( nFlags, point );
}

void CTestContainer98View::OnOptionsDesignMode ( ) [protected]

Definition at line 1394 of file TCView.Cpp.

{
   CTestContainer98Doc* pDoc;

   pDoc = GetDocument();
   pDoc->SetUserMode( !pDoc->GetUserMode() );
}

void CTestContainer98View::OnRButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 1578 of file TCView.Cpp.

{
   BOOL tHandled;

   tHandled = HandleWindowlessMouseMessage( point );
   if( tHandled )
   {
    return;
   }

   CView::OnRButtonDblClk( nFlags, point );
}

void CTestContainer98View::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 1277 of file TCView.Cpp.

{
   CTestContainer98Item* pItemHit;
   BOOL tHandled;
   DWORD dwHitType;
   MSG msg;

   tHandled = HandleWindowlessMouseMessage( point );
   if( tHandled )
   {
    return;
   }

   pItemHit = HitTestItems( point, &dwHitType );

   if( !(nFlags&MK_CONTROL) )
   {
    if( (pItemHit != NULL) && (m_lpSelectedItems.Find( pItemHit ) == NULL) )
    {
     SetSelection( pItemHit );
    }
   }

   if( (pItemHit != NULL) && (dwHitType != HITTYPE_BORDER) )
   {
    if( !pItemHit->IsInPlaceActive() )
    {
     msg = *GetCurrentMessage();
     pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
    }
   }
}

void CTestContainer98View::OnRButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 1591 of file TCView.Cpp.

{
   BOOL tHandled;

   tHandled = HandleWindowlessMouseMessage( point );
   if( tHandled )
   {
    return;
   }

   CView::OnRButtonUp( nFlags, point );
}

BOOL CTestContainer98View::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 1185 of file TCView.Cpp.

{
   CPoint pt;
   DWORD dwHitType;
   CRectTracker tracker;
   BOOL tHandled;
   CTestContainer98Item* pItemHit;

   // First, give the any inactive objects underneath the cursor a chance to
   // set the cursor and/or activate.
   tHandled = HandlePointerInactiveSetCursor( message );
   if( tHandled )
   {
    return( TRUE );
   }

   // Now, see if a windowless control should be handling this message.
   tHandled = HandleWindowlessMouseMessage( m_ptLastMousePosition );
   if( tHandled )
   {
    return( FALSE );
   }

   // None of the controls handled the message, so set the cursor ourselves.
   // The only interesting thing we do is let the tracker for the current
   // selection set the cursor to show resize/move arrows.
   if( pWnd == this )
   {
    GetCursorPos( &pt );
    ScreenToClient( &pt );
    pItemHit = HitTestItems( pt, &dwHitType );
    if( (pItemHit != NULL) && (dwHitType == HITTYPE_BORDER) &&
     (m_lpSelectedItems.Find( pItemHit ) != NULL) )
    {
     SetupTracker( pItemHit, &tracker );
     if( tracker.SetCursor( this, nHitTest ) )
     {
      return( TRUE );
     }
    }
   }

   return( CView::OnSetCursor( pWnd, nHitTest, message ) );
}

void CTestContainer98View::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 359 of file TCView.Cpp.

{
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
   if( (pActiveItem != NULL) && (pActiveItem->GetItemState() ==
    COleClientItem::activeUIState) )
   {
    // need to set focus to this item if it is in the same view
    CWnd* pWnd = pActiveItem->GetInPlaceWindow();
    if( pWnd != NULL )
    {
     pWnd->SetFocus();   // don't call the base class
     return;
    }
   }

   CView::OnSetFocus( pOldWnd );
}

void CTestContainer98View::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 377 of file TCView.Cpp.

{
   COleClientItem* pActiveItem;

   CView::OnSize( nType, cx, cy );

   pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
   if( pActiveItem != NULL )
   {
    pActiveItem->SetItemRects();
   }
}

void CTestContainer98View::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 1253 of file TCView.Cpp.

{
   (void)pSender;

   switch( lHint )
   {
   case HINT_UPDATE_WINDOW:
    Invalidate();
    break;

   case HINT_UPDATE_ITEM:
    {
     CRectTracker tracker;
     CRect rect;

     SetupTracker( (CTestContainer98Item*)pHint, &tracker );
     tracker.GetTrueRect( &rect );
     InvalidateRect( rect );
    }
    break;
   }
}

void CTestContainer98View::OnUpdateControlActivate ( CCmdUI * pCmdUI ) [protected]

Definition at line 1975 of file TCView.Cpp.

{
   pCmdUI->Enable( (m_pSelection != NULL) &&
    (!m_pSelection->IsInPlaceActive()) );
}

void CTestContainer98View::OnUpdateControlDeactivate ( CCmdUI * pCmdUI ) [protected]

Definition at line 1981 of file TCView.Cpp.

{
   pCmdUI->Enable( (m_pSelection != NULL) &&
    (m_pSelection->IsInPlaceActive()) );
}

void CTestContainer98View::OnUpdateControlDrawMetaFile ( CCmdUI * pCmdUI ) [protected]

Definition at line 2569 of file TCView.Cpp.

{
   pCmdUI->Enable( m_lpSelectedItems.GetCount() == 1 );
}

void CTestContainer98View::OnUpdateControlInvokeMethods ( CCmdUI * pCmdUI ) [protected]

Definition at line 1920 of file TCView.Cpp.

{
   pCmdUI->Enable( m_pSelection != NULL );
}

void CTestContainer98View::OnUpdateControlLogging ( CCmdUI * pCmdUI ) [protected]

Definition at line 1932 of file TCView.Cpp.

{
   pCmdUI->Enable( m_pSelection != NULL );
}

void CTestContainer98View::OnUpdateControlSaveToPropertyBag ( CCmdUI * pCmdUI ) [protected]

Definition at line 1903 of file TCView.Cpp.

{
   pCmdUI->Enable( m_pSelection != NULL );
}

void CTestContainer98View::OnUpdateControlSaveToStorage ( CCmdUI * pCmdUI ) [protected]

Definition at line 2470 of file TCView.Cpp.

{
   pCmdUI->Enable( m_lpSelectedItems.GetCount() == 1 );
}

void CTestContainer98View::OnUpdateControlSaveToStream ( CCmdUI * pCmdUI ) [protected]

Definition at line 1908 of file TCView.Cpp.

{
   pCmdUI->Enable( m_pSelection != NULL );
}

void CTestContainer98View::OnUpdateControlUIActivate ( CCmdUI * pCmdUI ) [protected]

Definition at line 1970 of file TCView.Cpp.

{
   pCmdUI->Enable( (m_pSelection != NULL) && (!m_pSelection->IsUIActive()) );
}

void CTestContainer98View::OnUpdateControlUIDeactivate ( CCmdUI * pCmdUI ) [protected]

Definition at line 1965 of file TCView.Cpp.

{
   pCmdUI->Enable( (m_pSelection != NULL)   && (m_pSelection->IsUIActive()) );
}

void CTestContainer98View::OnUpdateEditBringToFront ( CCmdUI * pCmdUI ) [protected]

Definition at line 2004 of file TCView.Cpp.

{
   pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
}

void CTestContainer98View::OnUpdateEditClear ( CCmdUI * pCmdUI ) [protected]

Definition at line 1248 of file TCView.Cpp.

{
   pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
}

void CTestContainer98View::OnUpdateEditCopy ( CCmdUI * pCmdUI ) [protected]

Definition at line 2408 of file TCView.Cpp.

{
   pCmdUI->Enable( m_lpSelectedItems.GetCount() > 0 );
}

void CTestContainer98View::OnUpdateEditCut ( CCmdUI * pCmdUI ) [protected]

Definition at line 2425 of file TCView.Cpp.

{
   pCmdUI->Enable( m_lpSelectedItems.GetCount() > 0 );
}

void CTestContainer98View::OnUpdateEditPaste ( CCmdUI * pCmdUI ) [protected]

Definition at line 2413 of file TCView.Cpp.

{
   pCmdUI->Enable( IsClipboardFormatAvailable( ::RegisterClipboardFormat( _T(
    "TC98 Controls" ) ) ) );
}

void CTestContainer98View::OnUpdateEditProperties ( CCmdUI * pCmdUI ) [protected]

Definition at line 2195 of file TCView.Cpp.

{
   pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
}

void CTestContainer98View::OnUpdateEditSelectAll ( CCmdUI * pCmdUI ) [protected]

Definition at line 2542 of file TCView.Cpp.

{
   CTestContainer98Doc* pDoc;

   pDoc = GetDocument();
   pCmdUI->Enable( pDoc->GetStartPosition() != NULL );
}

void CTestContainer98View::OnUpdateEditSendToBack ( CCmdUI * pCmdUI ) [protected]

Definition at line 2026 of file TCView.Cpp.

{
   pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
}

void CTestContainer98View::OnUpdateOptionsDesignMode ( CCmdUI * pCmdUI ) [protected]

Definition at line 1402 of file TCView.Cpp.

{
   if( GetDocument()->GetUserMode() )
   {
    pCmdUI->SetCheck( 0 );
   }
   else
   {
    pCmdUI->SetCheck( 1 );
   }
}

HRESULT CTestContainer98View::OnWindowlessDefWindowMessage | ( | UINT | nMessage,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | plResult
 | ) |  |

Definition at line 1166 of file TCView.Cpp.

{
   const MSG* pMessage;

   (void)nMessage;
   (void)wParam;
   (void)lParam;

   pMessage = GetCurrentMessage();
   ASSERT( pMessage->message == nMessage );
   ASSERT( pMessage->wParam == wParam );
   ASSERT( pMessage->lParam == lParam );

   *plResult = Default();

   return( S_OK );
}

HRESULT CTestContainer98View::OnWindowlessReleaseCapture ( CTestContainer98Item * pItem )

Definition at line 1443 of file TCView.Cpp.

{
   if( m_pItemWithCapture == pItem )
   {
    m_pItemWithCapture = NULL;
    ReleaseCapture();
   }

   return( S_OK );
}

HRESULT CTestContainer98View::OnWindowlessReleaseFocus ( )

Definition at line 1455 of file TCView.Cpp.

{
   ASSERT( m_pItemWithFocus != NULL );

   m_pItemWithFocus = NULL;

   return( S_OK );
}

HRESULT CTestContainer98View::OnWindowlessSetCapture ( CTestContainer98Item * pItem )

Definition at line 1464 of file TCView.Cpp.

{
   ASSERT( pItem != NULL );
//   ASSERT( m_pItemWithCapture == NULL );

   SetCapture();
   m_pItemWithCapture = pItem;

   return( S_OK );
}

HRESULT CTestContainer98View::OnWindowlessSetFocus ( CTestContainer98Item * pItem )

Definition at line 1476 of file TCView.Cpp.

{
   ASSERT( pItem != NULL );

   TCTrace( TRACELEVEL_NORMAL, "Setting focus to windowless control.\n" );

   SetFocus();
   m_pItemWithFocus = pItem;

   return( S_OK );
}

BOOL CTestContainer98View::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 119 of file TCView.Cpp.

{
  WNDCLASS wc;

  if( !CView::PreCreateWindow( cs ) )
  {
    return( FALSE );
  }

  GetClassInfo( AfxGetInstanceHandle(), cs.lpszClass, &wc );
  cs.lpszClass = AfxRegisterWndClass( 0, wc.hCursor, wc.hbrBackground,
    wc.hIcon );

  cs.style |= WS_CLIPCHILDREN;

  return( TRUE );
}

BOOL CTestContainer98View::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 1310 of file TCView.Cpp.

{
   CTestContainer98Item* pItem;
   CTestContainer98Doc* pDoc;
   MSG msg;
   IOleInPlaceActiveObjectPtr pInPlaceActiveObject;
   HRESULT hResult;
   POSITION posItem;
   CTestContainer98Item* pCurrentItem;

   pDoc = GetDocument();

   pCurrentItem = NULL;
   if( m_pItemWithFocus != NULL )
   {
    pCurrentItem = m_pItemWithFocus;
   }
   else
   {
    // Try the UI active control
    posItem = pDoc->GetStartPosition();
    while( (posItem != NULL) && (pCurrentItem == NULL) )
    {
     pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
     if( pItem->IsUIActive() )
     {
      pCurrentItem = pItem;
     }
    }
   }

   if( ((pMsg->message >= WM_KEYFIRST) && (pMsg->message <= WM_KEYLAST)) ||
    ((pMsg->message >= WM_MOUSEFIRST) && (pMsg->message <= WM_MOUSELAST)) )
   {
    // Give the item with focus first crack at keyboard and mouse messages
    if( pCurrentItem != NULL )
    {
     pInPlaceActiveObject = pCurrentItem->m_lpObject;
     if( pInPlaceActiveObject != NULL )
     {
      hResult = pInPlaceActiveObject->TranslateAccelerator( pMsg );
      if( hResult == S_OK )
      {
         return( TRUE );
      }
     }
    }
   }

   if( pMsg->message == WM_KEYDOWN )
   {
    if( LOWORD( pMsg->wParam ) == VK_TAB )
    {
     pItem = pDoc->GetNextTabItem( pCurrentItem );
     if( pItem != NULL )
     {
      if( pItem->HasUIActiveState() )
      {
         if( !pItem->IsUIActive() )
         {
          msg = *pMsg;
          pItem->DoVerb( OLEIVERB_UIACTIVATE, this, &msg );
         }
      }
      if( pItem->ActsLikeButton() )
      {
         pItem->DisplayAsDefault( TRUE );
      }
     }

     return( TRUE );
    }
   }
   else if( pMsg->message == WM_KEYUP )
   {
    if( LOWORD( pMsg->wParam ) == VK_TAB )
    {
     return( TRUE );
    }
   }

   return( CView::PreTranslateMessage( pMsg ) );
}

void CTestContainer98View::SetMultiSelect | ( | CTestContainer98Item * | pItem,
 |  | BOOL | tSelect
 | ) |  |

Definition at line 469 of file TCView.Cpp.

{
   POSITION posItem;

   ENSURE( pItem != NULL );

   posItem = m_lpSelectedItems.Find( pItem );
   if( tSelect )
   {
    if( posItem != NULL )
    {
     // Already selected
     return;
    }
    else
    {
     m_lpSelectedItems.AddHead( pItem );
     if( m_lpSelectedItems.GetCount() == 1 )
     {
      ASSERT( m_pSelection == NULL );
      m_pSelection = pItem;
      ENSURE( m_pSelection != NULL );
      m_pSelection->OnSelect();
     }
     else
     {
      if( m_pSelection != NULL )
      {
         OnUpdate( NULL, HINT_UPDATE_ITEM, m_pSelection );
         m_pSelection->OnDeselect();
         m_pSelection = NULL;
      }
     }
     OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
    }
   }
   else
   {
    if( posItem == NULL )
    {
     // Already not selected
     return;
    }
    else
    {
     if( m_pSelection == pItem )
     {
      ASSERT( m_lpSelectedItems.GetCount() == 1 );
      m_pSelection->OnDeselect();
      m_pSelection = NULL;
     }
     m_lpSelectedItems.RemoveAt( posItem );
     if( m_lpSelectedItems.GetCount() == 1 )
     {
      ASSERT( m_pSelection == NULL );
      m_pSelection = m_lpSelectedItems.GetHead();
      m_pSelection->OnSelect();
      OnUpdate( NULL, HINT_UPDATE_ITEM, m_pSelection );
     }
     OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
    }
   }
}

void CTestContainer98View::SetSelection ( CTestContainer98Item * pItem )

Definition at line 578 of file TCView.Cpp.

{
   CTestContainer98Item* pSelectedItem;

   if( (pItem != NULL ) && (m_pSelection == pItem) )
   {
    // No change in selection
    return;
   }

   if( m_pSelection != NULL )
   {
    m_pSelection->OnDeselect();
    m_pSelection = NULL;
   }

   while( !m_lpSelectedItems.IsEmpty() )
   {
    pSelectedItem = m_lpSelectedItems.RemoveHead();
    if( pSelectedItem != pItem )
    {
     OnUpdate( NULL, HINT_UPDATE_ITEM, pSelectedItem );
    }
   }

   if( pItem != NULL )
   {
    m_lpSelectedItems.AddHead( pItem );
    m_pSelection = pItem;
    m_pSelection->OnSelect();
    OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
   }
}

void CTestContainer98View::SetupSelectionTracker ( CRectTracker * pTracker )

Definition at line 1065 of file TCView.Cpp.

{
   POSITION posItem;
   CTestContainer98Item* pItem;

   ASSERT( !m_lpSelectedItems.IsEmpty() );
   if( m_pSelection != NULL )
   {
    // Only one item is selected, so use its tracker.
    SetupTracker( m_pSelection, pTracker );
   }
   else
   {
    pTracker->m_rect.SetRectEmpty();
    posItem = m_lpSelectedItems.GetHeadPosition();
    while( posItem != NULL )
    {
     pItem = m_lpSelectedItems.GetNext( posItem );
     pTracker->m_rect.UnionRect( pTracker->m_rect, pItem->m_rect );
    }
    pTracker->m_rect.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
    pTracker->m_nHandleSize = MARGIN_PIXELS+1;
    pTracker->m_sizeMin.cx = 8;
    pTracker->m_sizeMin.cy = 8;
    pTracker->m_nStyle = CRectTracker::solidLine;
   }
}

void CTestContainer98View::SetupTracker | ( | CTestContainer98Item * | pItem,
 |  | CRectTracker * | pTracker
 | ) |  |

Definition at line 1093 of file TCView.Cpp.

{
   pTracker->m_rect = pItem->m_rect;
   pTracker->m_rect.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
   pTracker->m_nHandleSize = MARGIN_PIXELS+1;
   pTracker->m_sizeMin.cx = 8;
   pTracker->m_sizeMin.cy = 8;

   pTracker->m_nStyle = 0;

   if( m_lpSelectedItems.Find( pItem ) != NULL )
   {
    pTracker->m_nStyle |= CRectTracker::resizeInside;
   }

   pTracker->m_nStyle |= CRectTracker::solidLine;

   if( (pItem->GetItemState() == COleClientItem::openState) ||
    (pItem->GetItemState() == COleClientItem::activeUIState) )
   {
    pTracker->m_nStyle |= CRectTracker::hatchInside;
   }
}

void CTestContainer98View::ToggleMultiSelect ( CTestContainer98Item * pItem )

Definition at line 534 of file TCView.Cpp.

{
   POSITION posItem;

   ENSURE( pItem != NULL );

   posItem = m_lpSelectedItems.Find( pItem );
   if( posItem == NULL )
   {
    m_lpSelectedItems.AddHead( pItem );
    if( m_lpSelectedItems.GetCount() == 1 )
    {
     ASSERT( m_pSelection == NULL );
     m_pSelection = pItem;
     m_pSelection->OnSelect();
    }
    else
    {
     if( m_pSelection != NULL )
     {
      m_pSelection->OnDeselect();
      m_pSelection = NULL;
     }
    }
   }
   else
   {
    if( m_pSelection == pItem )
    {
     ASSERT( m_lpSelectedItems.GetCount() == 1 );
     m_pSelection->OnDeselect();
     m_pSelection = NULL;
    }
    m_lpSelectedItems.RemoveAt( posItem );
    if( m_lpSelectedItems.GetCount() == 1 )
    {
     ASSERT( m_pSelection == NULL );
     m_pSelection = m_lpSelectedItems.GetHead();
     m_pSelection->OnSelect();
    }
   }
   OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
}

Member Data Documentation

COleDropTarget CTestContainer98View::m_dropTarget [protected]

Definition at line 100 of file TCView.H.

DWORD CTestContainer98View::m_dwLastDropKeyState [protected]

Definition at line 107 of file TCView.H.

CTypedPtrList< CObList, CTestContainer98Item* > CTestContainer98View::m_lpSelectedItems [protected]

Definition at line 108 of file TCView.H.

CTestContainer98Item* CTestContainer98View::m_pInactiveDropTarget [protected]

Definition at line 105 of file TCView.H.

CTestContainer98Item* CTestContainer98View::m_pItemToDeactivateOnLeave [protected]

Definition at line 104 of file TCView.H.

CTestContainer98Item* CTestContainer98View::m_pItemWithCapture [protected]

Definition at line 101 of file TCView.H.

CTestContainer98Item* CTestContainer98View::m_pItemWithFocus [protected]

Definition at line 102 of file TCView.H.

CTestContainer98Item* CTestContainer98View::m_pSelection

Definition at line 35 of file TCView.H.

CPoint CTestContainer98View::m_ptLastMousePosition [protected]

Definition at line 103 of file TCView.H.

CTestContainer98Item* CTestContainer98View::m_pWindowlessDropTarget [protected]

Definition at line 106 of file TCView.H.

CLIPFORMAT CTestContainer98View::s_cfObjectDescriptor = NULL [static, protected]

Definition at line 110 of file TCView.H.

The documentation for this class was generated from the following files:
  • ole/TstCon/TCView.H
  • ole/TstCon/TCView.Cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTesthelpApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTesthelpApp Class Reference

#include "testhelp.h"

List of all members.

Public Member Functions

CTesthelpApp ()
int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 21 of file testhelp.h.

Constructor & Destructor Documentation

CTesthelpApp::CTesthelpApp ( )

Definition at line 31 of file testhelp.cpp.

{
  EnableHtmlHelp();
}

Member Function Documentation

int CTesthelpApp::ExitInstance ( )

Definition at line 55 of file testhelp.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CTesthelpApp::InitInstance ( )

Definition at line 39 of file testhelp.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/testhelp/testhelp.h
  • controls/testhelp/testhelp.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTesthelpCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CTesthelpCtrl Class Reference

#include "ThelpCtl.h"

List of all members.

Public Types

enum {
dispidName1 = 1L, dispidName2 = 2L, dispidName3 = 3L, dispidUseMyHelp = 4L,
dispidShowToolTip = 5L, dispidToolTipText = 6L, dispidUsePopupHelp = 7L
}

Public Member Functions

CTesthelpCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
LRESULT | OnHelpCommand (UINT_PTR wParam, LONG_PTR lParam)
virtual void | OnResetState ()
void | RelayEvent (UINT message, WPARAM wParam, LPARAM lParam)

Public Attributes

CToolTipCtrl | m_ttip

Protected Member Functions

~CTesthelpCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CTesthelpCtrl) DECLARE_OLETYPELIB(CTesthelpCtrl) DECLARE_PROPPAGEIDS(CTesthelpCtrl) DECLARE_OLECTLTYPE(CTesthelpCtrl) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnName1Changed ()
afx_msg void | OnName2Changed ()
afx_msg void | OnName3Changed ()
afx_msg void | OnShowToolTipChanged ()
afx_msg void | OnToolTipTextChanged ()
afx_msg void | OnUseMyHelpChanged ()
afx_msg void | OnUsePopupHelpChanged ()

Protected Attributes

BOOL | m_bShowToolTip
BOOL | m_bUseMyHelp
short | m_nUsePopupHelp
CString | m_szName1
CString | m_szName2
CString | m_szName3
CString | m_szToolTipText

Detailed Description

Definition at line 14 of file ThelpCtl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidName1
dispidName2
dispidName3
dispidUseMyHelp
dispidShowToolTip
dispidToolTipText
dispidUsePopupHelp

Definition at line 84 of file ThelpCtl.h.

        {
   //{{AFX_DISP_ID(CTesthelpCtrl)
  dispidName1 = 1L,
  dispidName2 = 2L,
  dispidName3 = 3L,
  dispidUseMyHelp = 4L,
  dispidShowToolTip = 5L,
  dispidToolTipText = 6L,
  dispidUsePopupHelp = 7L,
  //}}AFX_DISP_ID
   };

Constructor & Destructor Documentation

CTesthelpCtrl::CTesthelpCtrl ( )

Definition at line 161 of file ThelpCtl.cpp.

{
  InitializeIIDs(&IID_DTesthelp, &IID_DTesthelpEvents);
}

CTesthelpCtrl::~CTesthelpCtrl ( ) [protected]

Definition at line 170 of file ThelpCtl.cpp.

{
      // TODO: Cleanup your control's instance data here.
}

Member Function Documentation

void CTesthelpCtrl::AboutBox ( ) [protected]

Definition at line 260 of file ThelpCtl.cpp.

{
      CDialog dlgAbout(IDD_ABOUTBOX_TESTHELP);
      dlgAbout.DoModal();
}

CTesthelpCtrl::DECLARE_OLECREATE_EX ( CTesthelpCtrl ) [protected]
void CTesthelpCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 231 of file ThelpCtl.cpp.

{
      ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
      COleControl::DoPropExchange(pPX);
      // custom DDX
      PX_String(pPX, _T("Name1"), m_szName1);
      PX_String(pPX, _T("Name2"), m_szName2);
      PX_String(pPX, _T("Name3"), m_szName3);
      PX_Bool(pPX, _T("UseMyHelp"),m_bUseMyHelp, TRUE);
      PX_Bool(pPX, _T("ShowToolTip"), m_bShowToolTip,FALSE);
      PX_Short(pPX, _T("UsePopupHelp"), m_nUsePopupHelp,0);
      PX_String(pPX, _T("ToolTipText"),m_szToolTipText,"");

}

void CTesthelpCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 179 of file ThelpCtl.cpp.

{
  // Drawing code, mostly plagiarized from the Circ MFC sample.
  // The only thing done here is setting the border and drawing text
  // specified by our name properties in the control's client area.
    if(!GetBorderStyle())   //Control will always have a border.
          SetBorderStyle(TRUE);

    // Set up variables to use for drawing text background.
    // Use our current BackColor for the background color.
    CBrush* pOldBrush;
    CBrush bkBrush(TranslateColor(GetBackColor()));
    CPen* pOldPen;
    CRect rc = rcBounds;
    CFont* pOldFont;

    // Set up background mode and text color.  Use the
    // current ForeColor for the text color.
    pdc->SetTextColor(TranslateColor(GetForeColor()));
    pdc->SetBkMode(TRANSPARENT);

    // Fill our window with the current BackColor
    pdc->FillRect(rcBounds, &bkBrush);

    // Save off the existing brush and pen so they
    // can be restored when we're done.
    pOldBrush = pdc->SelectObject(&bkBrush);
    pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);

    // Save off the current font so we can restore it and
    // select our current stock font into this DC
    pOldFont = SelectStockFont(pdc);

    // Draw the text on our window
    pdc->ExtTextOut(rc.left+10, rc.top +2,
      ETO_CLIPPED, rc, m_szName1, m_szName1.GetLength(), NULL);
    pdc->ExtTextOut(rc.left+10, rc.top +22,
      ETO_CLIPPED, rc, m_szName2, m_szName2.GetLength(), NULL);
    pdc->ExtTextOut(rc.left+10, rc.top +42,
      ETO_CLIPPED, rc, m_szName3, m_szName3.GetLength(), NULL);

    // Restore our DC to it's original state.
    pdc->SelectObject(pOldFont);
    pdc->SelectObject(pOldPen);
    pdc->SelectObject(pOldBrush);

}

LRESULT CTesthelpCtrl::OnHelpCommand | ( | UINT_PTR | wParam,
 |  | LONG_PTR | lParam
 | ) |  |

Definition at line 290 of file ThelpCtl.cpp.

{
      LPHELPINFO hi;

      // If the control is in a running application
      // we'll just show context help.
      hi = (LPHELPINFO)lParam;
      if( (AmbientUserMode()||IsWindow(m_hWnd)) && m_bUseMyHelp )
      {
          if(m_nUsePopupHelp==0)
          {
            CString strPath = AfxGetApp()->m_pszHelpFilePath;
            strPath += _T("::/popups.txt");

            HH_POPUP popup;
            ZeroMemory(&popup, sizeof(popup));
            popup.cbStruct = sizeof(HH_POPUP);
            popup.idString = IDH_WHATISTHISTHING;
            popup.clrBackground = (COLORREF)-1; //Default
            popup.clrForeground = (COLORREF)-1; //Default
            RECT rDefault = {-1,-1,-1,-1}; //Default
            popup.rcMargins = rDefault;
            popup.pt = hi->MousePos;

            ::HtmlHelp((HWND)hi->hItemHandle, strPath, HH_DISPLAY_TEXT_POPUP, (DWORD_PTR)&popup);
            return TRUE;
          }
          else
          {
            AfxGetApp()->HtmlHelp(NULL, HH_DISPLAY_TOC);
            return TRUE;
          }

      }

      return (LONG)Default();
}

void CTesthelpCtrl::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 376 of file ThelpCtl.cpp.

{
      // pass this message to the ToolTip control
      RelayEvent(WM_LBUTTONDOWN, (WPARAM)nFlags,
          MAKELPARAM(LOWORD(point.x), LOWORD(point.y)));
      COleControl::OnLButtonDown(nFlags, point);
}

void CTesthelpCtrl::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 384 of file ThelpCtl.cpp.

{
      // pass this message to the ToolTip control
      RelayEvent(WM_LBUTTONUP, (WPARAM)nFlags,
          MAKELPARAM(LOWORD(point.x), LOWORD(point.y)));

      COleControl::OnLButtonUp(nFlags, point);
}

void CTesthelpCtrl::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 393 of file ThelpCtl.cpp.

{
      // pass this message to the ToolTip control
      RelayEvent(WM_MOUSEMOVE, (WPARAM)nFlags,
          MAKELPARAM(LOWORD(point.x), LOWORD(point.y)));

      COleControl::OnMouseMove(nFlags, point);
}

void CTesthelpCtrl::OnName1Changed ( ) [protected]

Definition at line 270 of file ThelpCtl.cpp.

{

      SetModifiedFlag();
      InvalidateControl();
}

void CTesthelpCtrl::OnName2Changed ( ) [protected]

Definition at line 277 of file ThelpCtl.cpp.

{

      SetModifiedFlag();
      InvalidateControl();
}

void CTesthelpCtrl::OnName3Changed ( ) [protected]

Definition at line 284 of file ThelpCtl.cpp.

{
      SetModifiedFlag();
      InvalidateControl();
}

void CTesthelpCtrl::OnResetState ( ) [virtual]

Definition at line 250 of file ThelpCtl.cpp.

{
      COleControl::OnResetState();  // Resets defaults found in DoPropExchange

}

void CTesthelpCtrl::OnShowToolTipChanged ( ) [protected]

Definition at line 402 of file ThelpCtl.cpp.

{
      // Activate or DeActivate the ToolTip
      if(m_ttip.m_hWnd && AmbientUserMode())
      {
        m_ttip.Activate(m_bShowToolTip);
        SetModifiedFlag();
      }
}

void CTesthelpCtrl::OnToolTipTextChanged ( ) [protected]

Definition at line 412 of file ThelpCtl.cpp.

{
      // Change the ToolTip's text
      if(m_ttip.m_hWnd && AmbientUserMode())
      {
        m_ttip.UpdateTipText((LPCTSTR)m_szToolTipText,this);
        SetModifiedFlag();
      }

}

void CTesthelpCtrl::OnUseMyHelpChanged ( ) [protected]

Definition at line 329 of file ThelpCtl.cpp.

{
      // TODO: Add notification handler code

      SetModifiedFlag();
}

void CTesthelpCtrl::OnUsePopupHelpChanged ( ) [protected]

Definition at line 424 of file ThelpCtl.cpp.

{
  // TODO: Add notification handler code

  SetModifiedFlag();
}

void CTesthelpCtrl::RelayEvent | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) |  |

Definition at line 337 of file ThelpCtl.cpp.

{
      // This function will create a MSG structure, fill it in a pass it to
      // the ToolTip control, m_ttip.  Note that we ensure the point is in window
      // coordinates (relative to the control's window).
      if(NULL != m_ttip.m_hWnd)
      {
          MSG msg;
          msg.hwnd = m_hWnd;
          msg.message = message;
          msg.wParam = wParam;
          msg.lParam = lParam;
          msg.time = 0;
          msg.pt.x = LOWORD(lParam);
          msg.pt.y = HIWORD(lParam);

          m_ttip.RelayEvent(&msg);
      }

}

Member Data Documentation

BOOL CTesthelpCtrl::m_bShowToolTip [protected]

Definition at line 66 of file ThelpCtl.h.

BOOL CTesthelpCtrl::m_bUseMyHelp [protected]

Definition at line 64 of file ThelpCtl.h.

short CTesthelpCtrl::m_nUsePopupHelp [protected]

Definition at line 70 of file ThelpCtl.h.

CString CTesthelpCtrl::m_szName1 [protected]

Definition at line 58 of file ThelpCtl.h.

CString CTesthelpCtrl::m_szName2 [protected]

Definition at line 60 of file ThelpCtl.h.

CString CTesthelpCtrl::m_szName3 [protected]

Definition at line 62 of file ThelpCtl.h.

CString CTesthelpCtrl::m_szToolTipText [protected]

Definition at line 68 of file ThelpCtl.h.

CToolTipCtrl CTesthelpCtrl::m_ttip

Definition at line 22 of file ThelpCtl.h.

The documentation for this class was generated from the following files:
  • controls/testhelp/ThelpCtl.h
  • controls/testhelp/ThelpCtl.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTesthelpPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTesthelpPropPage Class Reference

#include "ThelpPpg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_TESTHELP }

Public Member Functions

CTesthelpPropPage ()
BOOL | OnHelp (LPCTSTR helpdir)

Public Attributes

BOOL | m_bUseMine
BOOL | m_bUseToolTip
CEdit | m_CtrlTipCaption
int | m_nUsePopupHelp
CString | m_szName1
CString | m_szName2
CString | m_szName3
CString | m_szTipCaption

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
afx_msg void | OnUsetooltipClicked ()

Detailed Description

Definition at line 15 of file ThelpPpg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file ThelpPpg.h.

{ IDD = IDD_PROPPAGE_TESTHELP };

Constructor & Destructor Documentation

CTesthelpPropPage::CTesthelpPropPage ( )

Definition at line 62 of file ThelpPpg.cpp.

                                     :
   COlePropertyPage(IDD, IDS_TESTHELP_PPG_CAPTION)
{
   //{{AFX_DATA_INIT(CTesthelpPropPage)
   m_szName1 = _T("");
   m_szName2 = _T("");
   m_szName3 = _T("");
   m_bUseMine = FALSE;
   m_szTipCaption = _T("");
   m_bUseToolTip = FALSE;
  m_nUsePopupHelp = -1;
  //}}AFX_DATA_INIT

// Calling SetHelpInfo will set up the proper variables of COlePropertyPage
// so that when someone connects to our IPropertyPage and calls
// IPropertyPage::GetPageInfo the correct help information will be supplied.
SetHelpInfo(_T("Names to appear in the control"),
         _T("TESTHELP.CHM"),
         0);

}

Member Function Documentation

void CTesthelpPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 88 of file ThelpPpg.cpp.

{
   //{{AFX_DATA_MAP(CTesthelpPropPage)
   DDX_Control(pDX, IDC_TIPCAPTION, m_CtrlTipCaption);
  DDP_Text(pDX, IDC_NAME1, m_szName1, _T("Name1") );
  DDX_Text(pDX, IDC_NAME1, m_szName1);
  DDP_Text(pDX, IDC_NAME2, m_szName2, _T("Name2") );
  DDX_Text(pDX, IDC_NAME2, m_szName2);
  DDP_Text(pDX, IDC_NAME3, m_szName3, _T("Name3") );
  DDX_Text(pDX, IDC_NAME3, m_szName3);
  DDP_Check(pDX, IDC_USEMINE, m_bUseMine, _T("UseMyHelp") );
  DDX_Check(pDX, IDC_USEMINE, m_bUseMine);
  DDP_Text(pDX, IDC_TIPCAPTION, m_szTipCaption, _T("ToolTipText") );
  DDX_Text(pDX, IDC_TIPCAPTION, m_szTipCaption);
  DDP_Check(pDX, IDC_USETOOLTIP, m_bUseToolTip, _T("ShowToolTip") );
  DDX_Check(pDX, IDC_USETOOLTIP, m_bUseToolTip);
  DDP_Radio(pDX, IDC_POPUPHELP, m_nUsePopupHelp, _T("UsePopupHelp") );
  DDX_Radio(pDX, IDC_POPUPHELP, m_nUsePopupHelp);
  //}}AFX_DATA_MAP
   DDP_PostProcessing(pDX);
}

BOOL CTesthelpPropPage::OnHelp ( LPCTSTR helpdir )

Definition at line 126 of file ThelpPpg.cpp.

{
  // OnHelp is called by IPropertyPage::Help.  When someone requests
  // it, we supply help by calling CWinApp::HtmlHelp
  AfxGetApp()->HtmlHelp((DWORD_PTR)(_T("IDH_PROPERTIES.htm")), HH_DISPLAY_TOPIC);

  return TRUE;
}

BOOL CTesthelpPropPage::OnInitDialog ( ) [protected, virtual]

Definition at line 115 of file ThelpPpg.cpp.

{
   COlePropertyPage::OnInitDialog();

   // enable or disable the ToolTip caption edit control
   m_CtrlTipCaption.EnableWindow(m_bUseToolTip);

   return FALSE;  // return TRUE unless you set the focus to a control
           // EXCEPTION: OCX Property Pages should return FALSE
}

void CTesthelpPropPage::OnUsetooltipClicked ( ) [protected]

Definition at line 138 of file ThelpPpg.cpp.

{
   //Enable or disable the ToolTip caption window.
   UpdateData(TRUE);
   m_CtrlTipCaption.EnableWindow(m_bUseToolTip);

}

Member Data Documentation

BOOL CTesthelpPropPage::m_bUseMine

Definition at line 33 of file ThelpPpg.h.

BOOL CTesthelpPropPage::m_bUseToolTip

Definition at line 35 of file ThelpPpg.h.

CEdit CTesthelpPropPage::m_CtrlTipCaption

Definition at line 29 of file ThelpPpg.h.

int CTesthelpPropPage::m_nUsePopupHelp

Definition at line 36 of file ThelpPpg.h.

CString CTesthelpPropPage::m_szName1

Definition at line 30 of file ThelpPpg.h.

CString CTesthelpPropPage::m_szName2

Definition at line 31 of file ThelpPpg.h.

CString CTesthelpPropPage::m_szName3

Definition at line 32 of file ThelpPpg.h.

CString CTesthelpPropPage::m_szTipCaption

Definition at line 34 of file ThelpPpg.h.

The documentation for this class was generated from the following files:
  • controls/testhelp/ThelpPpg.h
  • controls/testhelp/ThelpPpg.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTestWindow Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CTestWindow Class Reference

#include "ctrltest.h"

List of all members.

Public Member Functions

void | SetupMenus ()

Protected Member Functions

void | AttachCustomMenu ()
virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam)
afx_msg void | OnTestBitmapButton1 ()
afx_msg void | OnTestBitmapButton2 ()
afx_msg void | OnTestBitmapButton3 ()
afx_msg void | OnTestCustomList ()
afx_msg void | OnTestDerivedEdit ()
afx_msg void | OnTestSpinEdit ()
afx_msg void | OnTestSubclassedEdit ()
afx_msg void | OnTestWndClassEdit ()

Protected Attributes

CColorMenu m_colorMenu

Detailed Description

Definition at line 37 of file ctrltest.h.

Member Function Documentation

void CTestWindow::AttachCustomMenu ( ) [protected]

Definition at line 107 of file custmenu.cpp.

{
  // now add a few new menu items

  for (int iColor = 0; iColor < nColors; iColor++)
    m_colorMenu.AppendColorMenuItem(IDS_COLOR_NAME_FIRST + iColor, colors[iColor]);

  // Replace the specified menu item with a color popup
  //  (note: will only work once)
  CMenu* pMenuBar = GetMenu();
  ENSURE(pMenuBar != NULL);
  TCHAR szString[256];     // don't change the string

  pMenuBar->GetMenuString(IDM_TEST_CUSTOM_MENU, szString, sizeof(szString),
    MF_BYCOMMAND);
  VERIFY(GetMenu()->ModifyMenu(IDM_TEST_CUSTOM_MENU, MF_BYCOMMAND | MF_POPUP,
    (UINT_PTR)m_colorMenu.m_hMenu, szString));
}

BOOL CTestWindow::OnCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected, virtual]

Definition at line 129 of file custmenu.cpp.

{
  if (wParam < IDS_COLOR_NAME_FIRST || wParam >= IDS_COLOR_NAME_FIRST + nColors)
    return CFrameWnd::OnCommand(wParam, lParam);        // default

  // special color selected
  CString strYouPicked;
  strYouPicked.LoadString(IDS_YOU_PICKED_COLOR);

  CString strColor;
  strColor.LoadString((UINT)wParam);

  CString strMsg;
  strMsg.Format(strYouPicked, (LPCTSTR)strColor);

  CString strMenuTest;
  strMenuTest.LoadString(IDS_MENU_TEST);

  MessageBox(strMsg, strMenuTest);

  return TRUE;
}

void CTestWindow::OnTestBitmapButton1 ( ) [protected]

Definition at line 194 of file bbutton.cpp.

{
  CBMTest1Dlg dlg;
  dlg.DoModal();
}

void CTestWindow::OnTestBitmapButton2 ( ) [protected]

Definition at line 200 of file bbutton.cpp.

{
  CBMTest2Dlg dlg;
  dlg.DoModal();
}

void CTestWindow::OnTestBitmapButton3 ( ) [protected]

Definition at line 206 of file bbutton.cpp.

{
  CBMTest3Dlg dlg;
  dlg.m_nNumber = 5;
  dlg.DoModal();

  CString strYouChose;
  strYouChose.LoadString(IDS_YOU_CHOSE);
  CString strMsg;
  strMsg.Format(strYouChose, dlg.m_nNumber);
  AfxMessageBox(strMsg);
}

void CTestWindow::OnTestCustomList ( ) [protected]

Definition at line 177 of file custlist.cpp.

{
  TRACE0("running dialog with custom listbox (owner draw)\n");
  CCustListDlg dlg;
  dlg.DoModal();
}

void CTestWindow::OnTestDerivedEdit ( ) [protected]

Definition at line 149 of file dertest.cpp.

{
  TRACE(_T("running dialog with special derived CParsedEdit controls in it\n"));
  CDerEditDlg dlg;
  dlg.DoModal();
}

void CTestWindow::OnTestSpinEdit ( ) [protected]

Definition at line 108 of file spintest.cpp.

{
  TRACE0("running dialog with spin controls in it\n");
  CSpinEditDlg dlg;
  dlg.DoModal();
}

void CTestWindow::OnTestSubclassedEdit ( ) [protected]

Definition at line 75 of file subtest.cpp.

{
  TRACE0("running dialog containing edit items aliased to ParsedEdits\n");
  CSubEditDlg dlg;
  dlg.DoModal();
}

void CTestWindow::OnTestWndClassEdit ( ) [protected]

Definition at line 94 of file wclstest.cpp.

{
  TRACE0("running dialog containing WNDCLASS special edit items\n");
  if (!CParsedEdit::RegisterControlClass())
  {
    CString strMsg;
    strMsg.LoadString(IDS_WNDCLASS_NOT_REGISTERED);
    MessageBox(strMsg);
    return;
  }
  CWclsEditDlg dlg;
  dlg.DoModal();
}

void CTestWindow::SetupMenus ( )

Definition at line 35 of file ctrltest.cpp.

{
  if ((GetSystemMetrics(SM_PENWINDOWS)) == NULL)
  {
    CMenu* pMenu = GetMenu();
    ENSURE(pMenu != NULL);
    pMenu->EnableMenuItem(IDM_TEST_PENEDIT_CODE, MF_DISABLED|MF_GRAYED);
    pMenu->EnableMenuItem(IDM_TEST_PENEDIT_TEMPLATE, MF_DISABLED|MF_GRAYED);
    pMenu->EnableMenuItem(IDM_TEST_PENEDIT_FEATURES, MF_DISABLED|MF_GRAYED);
  }
  // do not test for spin control until the user tries it
  // if the custom control DLL is not present, the test spin
  //  control menu item will be disabled in 'OnTestSpinEdit'.

  // custom menu tests
  AttachCustomMenu();
}

Member Data Documentation

CColorMenu CTestWindow::m_colorMenu [protected]

Definition at line 46 of file ctrltest.h.

The documentation for this class was generated from the following files:
  • general/ctrltest/ctrltest.h
  • general/ctrltest/bbutton.cpp
  • general/ctrltest/ctrltest.cpp
  • general/ctrltest/custlist.cpp
  • general/ctrltest/custmenu.cpp
  • general/ctrltest/dertest.cpp
  • general/ctrltest/spintest.cpp
  • general/ctrltest/subtest.cpp
  • general/ctrltest/wclstest.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTextDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions

CTextDoc Class Reference

#include "testdll1.h"

List of all members.

Protected Member Functions

void Serialize (CArchive &ar)

Detailed Description

Definition at line 28 of file testdll1.h.

Member Function Documentation

void CTextDoc::Serialize ( CArchive & ar ) [protected]

Definition at line 80 of file testdll1.cpp.

{
  CEditView* pView = (CEditView*)m_viewList.GetHead();
  ASSERT_KINDOF(CEditView, pView);
  pView->SerializeRaw(ar);
}

The documentation for this class was generated from the following files:
  • advanced/dllhusk/testdll1.h
  • advanced/dllhusk/testdll1.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTextView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CTextView Class Reference

#include "simpvw.h"

List of all members.

Public Member Functions

virtual | ~CTextView ()
CMainDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)

Protected Member Functions

CTextView ()
afx_msg int | OnMouseActivate (CWnd *pDesktopWnd, UINT nHitTest, UINT message)

Detailed Description

Definition at line 17 of file simpvw.h.

Constructor & Destructor Documentation

CTextView::CTextView ( ) [protected]

Definition at line 36 of file simpvw.cpp.

{
}

CTextView::~CTextView ( ) [virtual]

Definition at line 40 of file simpvw.cpp.

{
}

Member Function Documentation

CMainDoc* CTextView::GetDocument ( ) [inline]

Definition at line 25 of file simpvw.h.

      {
        ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
        return (CMainDoc*) m_pDocument;
      }

void CTextView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 47 of file simpvw.cpp.

{
  CMainDoc* pDoc = GetDocument();

  CRect rect;
  GetClientRect(rect);
  pDC->SetTextAlign(TA_BASELINE | TA_CENTER);
  pDC->SetTextColor(pDoc->m_colorData);
  pDC->SetBkMode(TRANSPARENT);
  // center in the window
  pDC->TextOut(rect.Width() / 2, rect.Height() / 2,
    pDoc->m_strData, pDoc->m_strData.GetLength());
}

int CTextView::OnMouseActivate | ( | CWnd * | pDesktopWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 62 of file simpvw.cpp.

{
  // side-step CView's implementation since we don't want to activate
  //  this view
  return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
}

The documentation for this class was generated from the following files:
  • general/viewex/simpvw.h
  • general/viewex/simpvw.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTheApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

CTheApp Class Reference

#include "Dlgcbar.h"

List of all members.

Public Member Functions

CTheApp ()
CTheApp ()
~CTheApp ()
virtual | ~CTheApp ()
virtual BOOL | InitInstance ()
virtual BOOL | InitInstance ()

Protected Member Functions

BOOL | FirstInstance ()
afx_msg void | OnHelpAbout ()

Private Member Functions

virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual BOOL | OnIdle (LONG lCount)
afx_msg void | OnPageSetup ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Private Attributes

DWORD | m_dwSplashTime
COleTemplateServer | m_server
CSplashWnd m_splash

Detailed Description

Definition at line 38 of file Dlgcbar.h.

Constructor & Destructor Documentation

CTheApp::CTheApp ( )

Definition at line 41 of file Dlgcbar.cpp.

{
}

CTheApp::~CTheApp ( ) [virtual]

Definition at line 45 of file Dlgcbar.cpp.

{
}

CTheApp::CTheApp ( )
CTheApp::~CTheApp ( )

Member Function Documentation

int CTheApp::ExitInstance ( ) [private, virtual]

Definition at line 187 of file superpad.cpp.

{
  dlgPageSetup.Terminate();
  CPadView::Terminate();
  CPadFrame::Terminate();

  return CWinApp::ExitInstance();
}

BOOL CTheApp::FirstInstance ( ) [protected]

Definition at line 61 of file Dlgcbar.cpp.

{
  CString strCaption;
  strCaption.LoadString(AFX_IDS_APP_TITLE);

  CWnd* pwndFirst = CWnd::FindWindow((LPCTSTR)(DWORD_PTR)WC_DIALOG,
                     strCaption);
  if (pwndFirst)
  {
    // another instance is already running - activate it
    CWnd* pwndPopup = pwndFirst->GetLastActivePopup();
    pwndFirst->SetForegroundWindow();
    if (pwndFirst->IsIconic())
      pwndFirst->ShowWindow(SW_SHOWNORMAL);
    if (pwndFirst != pwndPopup)
      pwndPopup->SetForegroundWindow();
    return FALSE;
  }
  else
  {
    // this is the first instance
    return TRUE;
  }
}

BOOL CTheApp::InitInstance ( ) [virtual]

Definition at line 93 of file Dlgcbar.cpp.

{
  if (!FirstInstance())
    return FALSE;

  // Create main window
  TRY
  {
    CWndListDlg* pMainWnd = new CWndListDlg;
    m_pMainWnd = pMainWnd;
    return pMainWnd->Create();
  }
  CATCH_ALL(e)
  {
    TRACE0("Failed to create main dialog\n");
    return FALSE;
  }
  END_CATCH_ALL

}

virtual BOOL CTheApp::InitInstance ( ) [virtual]
virtual BOOL CTheApp::InitInstance ( ) [private, virtual]
void CTheApp::OnAppAbout ( ) [private]

Definition at line 203 of file superpad.cpp.

{
  CAboutBox about;
  about.DoModal();
}

void CTheApp::OnHelpAbout ( ) [protected]

Definition at line 118 of file Dlgcbar.cpp.

{
  CAboutDlg dlg(m_pMainWnd);
  dlg.DoModal();
}

BOOL CTheApp::OnIdle ( LONG lCount ) [private, virtual]

Definition at line 139 of file superpad.cpp.

{
  // call base class idle first
  BOOL bResult = CWinApp::OnIdle(lCount);

  // then do our work
  if (m_splash.m_hWnd != NULL)
  {
    if (::GetCurrentTime() - m_dwSplashTime > 2500)
    {
      // timeout expired, destroy the splash window
      m_splash.DestroyWindow();
      m_pMainWnd->UpdateWindow();

      // NOTE: don't set bResult to FALSE,
      //  CWinApp::OnIdle may have returned TRUE
    }
    else
    {
      // check again later...
      bResult = TRUE;
    }
  }

  return bResult;
}

void CTheApp::OnPageSetup ( ) [private]

Definition at line 210 of file superpad.cpp.

{
  dlgPageSetup.DoModal();
}

BOOL CTheApp::PreTranslateMessage ( MSG * pMsg ) [private, virtual]

Definition at line 166 of file superpad.cpp.

{
  BOOL bResult = CWinApp::PreTranslateMessage(pMsg);

  if (m_splash.m_hWnd != NULL &&
    (pMsg->message == WM_KEYDOWN ||
     pMsg->message == WM_SYSKEYDOWN ||
     pMsg->message == WM_LBUTTONDOWN ||
     pMsg->message == WM_RBUTTONDOWN ||
     pMsg->message == WM_MBUTTONDOWN ||
     pMsg->message == WM_NCLBUTTONDOWN ||
     pMsg->message == WM_NCRBUTTONDOWN ||
     pMsg->message == WM_NCMBUTTONDOWN))
  {
    m_splash.DestroyWindow();
    m_pMainWnd->UpdateWindow();
  }

  return bResult;
}

Member Data Documentation

DWORD CTheApp::m_dwSplashTime [private]

Definition at line 33 of file superpad.h.

COleTemplateServer CTheApp::m_server [private]

Definition at line 36 of file superpad.h.

CSplashWnd CTheApp::m_splash [private]

Definition at line 34 of file superpad.h.

The documentation for this class was generated from the following files:
  • general/dlgcbr32/Dlgcbar.h
  • ole/superpad/superpad.h
  • general/hello/hello.h
  • general/dlgcbr32/Dlgcbar.cpp
  • general/hello/hello.cpp
  • ole/superpad/superpad.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CThreadApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CThreadApp Class Reference

#include "mtgdi.h"

List of all members.

Public Member Functions

CThreadApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 22 of file mtgdi.h.

Constructor & Destructor Documentation

CThreadApp::CThreadApp ( )

Definition at line 36 of file mtgdi.cpp.

{
}

Member Function Documentation

int CThreadApp::ExitInstance ( ) [virtual]

Definition at line 68 of file mtgdi.cpp.

{
  DeleteCriticalSection(&CGDIThread::m_csGDILock);
  CloseHandle(CGDIThread::m_hAnotherDead);

  return CWinApp::ExitInstance();
}

BOOL CThreadApp::InitInstance ( ) [virtual]

Definition at line 42 of file mtgdi.cpp.

{
  // Initialize static members of CGDIThread
  InitializeCriticalSection(&CGDIThread::m_csGDILock);

  // 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(CThreadDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CThreadView));
  AddDocTemplate(pDocTemplate);

  // create a new (empty) document
  OnFileNew();

  if (m_lpCmdLine[0] != '\0')
  {
    // TODO: add command line processing here
  }

  return TRUE;
}

void CThreadApp::OnAppAbout ( )

Definition at line 118 of file mtgdi.cpp.

{
  CAboutDlg().DoModal();
}

The documentation for this class was generated from the following files:
  • advanced/mtgdi/mtgdi.h
  • advanced/mtgdi/mtgdi.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CThreadDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CThreadDoc Class Reference

#include "mtgdidoc.h"

List of all members.

Public Member Functions

virtual | ~CThreadDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CThreadDoc ()

Detailed Description

Definition at line 12 of file mtgdidoc.h.

Constructor & Destructor Documentation

CThreadDoc::CThreadDoc ( ) [protected]

Definition at line 37 of file mtgdidoc.cpp.

{
  // TODO: add one-time construction code here

}

CThreadDoc::~CThreadDoc ( ) [virtual]

Definition at line 43 of file mtgdidoc.cpp.

{
}

Member Function Documentation

BOOL CThreadDoc::OnNewDocument ( ) [virtual]

Definition at line 47 of file mtgdidoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CThreadDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 61 of file mtgdidoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • advanced/mtgdi/mtgdidoc.h
  • advanced/mtgdi/mtgdidoc.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CThreadView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CThreadView Class Reference

#include "mtgdivw.h"

List of all members.

Public Member Functions

virtual | ~CThreadView ()
CThreadDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
void | StartThread (int ThreadID)
void | UpdateTitle (int nThreads=-1)

Public Attributes

CClientDC * | m_pDC
CTypedPtrList< CObList,
CGDIThread * > 		m_threadList

Protected Member Functions

CThreadView ()
afx_msg void | On10newballs ()
afx_msg void | On10newlines ()
afx_msg void | On10newrectangles ()
afx_msg void | On25newballs ()
afx_msg void | On25newlines ()
afx_msg void | On25newrectangles ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnKillThreads ()
afx_msg void | OnNewball ()
afx_msg void | OnNewline ()
afx_msg void | OnNewrectangle ()
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnThreadKillThreadsSlow ()

Detailed Description

Definition at line 14 of file mtgdivw.h.

Constructor & Destructor Documentation

CThreadView::CThreadView ( ) [protected]

Definition at line 50 of file mtgdivw.cpp.

{
  m_pDC = NULL;
}

CThreadView::~CThreadView ( ) [virtual]

Definition at line 55 of file mtgdivw.cpp.

{
}

Member Function Documentation

CThreadDoc * CThreadView::GetDocument ( ) [inline]

Definition at line 70 of file mtgdivw.h.

   { return (CThreadDoc*)m_pDocument; }

void CThreadView::On10newballs ( ) [protected]

Definition at line 185 of file mtgdivw.cpp.

{
  for (int i = 0; i < 10; i++)
  {
    StartThread(1);
    UpdateTitle();
  }
}

void CThreadView::On10newlines ( ) [protected]

Definition at line 233 of file mtgdivw.cpp.

{
  for (int i = 0 ;i < 10; i++)
  {
    StartThread(3);
    UpdateTitle();
  }
}

void CThreadView::On10newrectangles ( ) [protected]

Definition at line 209 of file mtgdivw.cpp.

{
  for (int i = 0; i < 10; i++)
  {
    StartThread(2);
    UpdateTitle();
  }
}

void CThreadView::On25newballs ( ) [protected]

Definition at line 194 of file mtgdivw.cpp.

{
  for (int i = 0; i < 25; i++)
  {
    StartThread(1);
    UpdateTitle();
  }
}

void CThreadView::On25newlines ( ) [protected]

Definition at line 242 of file mtgdivw.cpp.

{
  for (int i = 0; i < 25; i++)
  {
    StartThread(3);
    UpdateTitle();
  }
}

void CThreadView::On25newrectangles ( ) [protected]

Definition at line 218 of file mtgdivw.cpp.

{
  for (int i = 0; i < 25; i++)
  {
    StartThread(2);
    UpdateTitle();
  }
}

int CThreadView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 324 of file mtgdivw.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  // m_pDC must be initialized here instead of the constructor
  // because the HWND isn't created until Create is called.
  m_pDC = new CClientDC(this);
  UpdateTitle();

  return 0;
}

void CThreadView::OnDestroy ( ) [protected]

Definition at line 314 of file mtgdivw.cpp.

{
  OnKillThreads();

  delete m_pDC;
  m_pDC = NULL;

  CView::OnDestroy();
}

void CThreadView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 152 of file mtgdivw.cpp.

{
}

void CThreadView::OnKillThreads ( ) [protected]

Definition at line 257 of file mtgdivw.cpp.

{
  // tell all threads to shutdown
  POSITION pos;
  for (pos = m_threadList.GetHeadPosition(); pos != NULL; )
  {
    CGDIThread* pThread = m_threadList.GetNext(pos);
    VERIFY(SetEvent(pThread->m_hEventKill));
  }

  // wait for all threads to finish shutdown
  for (int nThreadsLeft = (int)m_threadList.GetCount(); nThreadsLeft != 0; )
  {
    WaitForSingleObject(CGDIThread::m_hAnotherDead, INFINITE);
    Sleep(nThreadsLeft*2);// 200ms for every 100 threads
    nThreadsLeft = 0;
    for (pos = m_threadList.GetHeadPosition(); pos != NULL; )
    {
      CGDIThread* pThread = m_threadList.GetNext(pos);
      if (WaitForSingleObject(pThread->m_hEventDead, 0) == WAIT_TIMEOUT)
        ++nThreadsLeft;
    }
    UpdateTitle(nThreadsLeft);
  }

  // delete all thread objects
  while (!m_threadList.IsEmpty())
  {
    CGDIThread* pThread = m_threadList.RemoveHead();
    VERIFY(WaitForSingleObject(pThread->m_hThread, INFINITE) == WAIT_OBJECT_0);
    delete pThread;
  }
  UpdateTitle();

  // invalidate the window since all threads are now gone
  Invalidate();
}

void CThreadView::OnNewball ( ) [protected]

Definition at line 179 of file mtgdivw.cpp.

{
  StartThread(1);
  UpdateTitle();
}

void CThreadView::OnNewline ( ) [protected]

Definition at line 227 of file mtgdivw.cpp.

{
  StartThread(3);
  UpdateTitle();
}

void CThreadView::OnNewrectangle ( ) [protected]

Definition at line 203 of file mtgdivw.cpp.

{
  StartThread(2);
  UpdateTitle();
}

void CThreadView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 337 of file mtgdivw.cpp.

{
  CView::OnSize(nType, cx, cy);

  // Instead of getting the client rect every time we draw, we only
  // update it when it changes.
  for (POSITION pos = m_threadList.GetHeadPosition(); pos != NULL; )
    m_threadList.GetNext(pos)->UpdateBorder();
}

void CThreadView::OnThreadKillThreadsSlow ( ) [protected]

Definition at line 300 of file mtgdivw.cpp.

{
  // Iterate through the threads killing each
  // KillThread doesn't return until the Thread is dead
  while (!m_threadList.IsEmpty())
  {
    m_threadList.RemoveHead()->KillThread();
    UpdateTitle();
  }

  // Invalidate the window so it blanks the window
  Invalidate();
}

void CThreadView::StartThread ( int ThreadID )

Definition at line 76 of file mtgdivw.cpp.

{
  CGDIThread* pThread = 0;
  CPoint Pos(rand()%100,rand()%100);
  CPoint Vel1((rand()%10)+2,(rand()%10)+2);
  CPoint Vel2((rand()%5)+2,(rand()%5)+2);
  CSize Size(((rand()%60)+20),((rand()%60)+20));
  COLORREF Color;

  //BLOCK: calculate random color
  {
    int r,g,b;

    do
    {
      r = (rand()%3);
      r = (r!=0) ? (r==2) ? 255 : 127 : 0;

      g = (rand()%3);
      g = (g!=0) ? (g==2) ? 255 : 127 : 0;

      b = (rand()%3);
      b = (b!=0) ? (b==2) ? 255 : 127 : 0;
    }
    while ((r==g) && (g==b));
    // No white(255,255,255), gray(127,127,127), or black(0,0,0) allowed

    Color = RGB(r,g,b);
  }

  if (rand()%1) Vel1.x*=-1;
  if (rand()%1) Vel1.y*=-1;
  if (rand()%1) Vel2.x*=-1;
  if (rand()%1) Vel2.y*=-1;

  switch(ThreadID)
  {
  case 1:
    pThread = new CBallThread(this,
      m_pDC->GetSafeHdc(), Pos, Vel1, Size, Color);
    break;
  case 2:
    pThread = new CRectThread(this,
      m_pDC->GetSafeHdc(), Pos, Vel1, Size, Color);
    break;
  case 3:
    pThread = new CLineThread(this,
      m_pDC->GetSafeHdc(), Pos, Vel1, Vel2, Size, Color);
    break;
  }

  if (pThread == NULL)
    return;

  ASSERT_VALID(pThread);
  pThread->m_pThreadParams = NULL;

  // Create Thread in a suspended state so we can set the Priority
  // before it starts getting away from us
  if (!pThread->CreateThread(CREATE_SUSPENDED))
  {
    delete pThread;
    return;
  }

  // since everything is successful, add the thread to our list
  m_threadList.AddTail(pThread);

  // If you want to make the sample more sprightly, set the thread priority here
  // a little higher. It has been set at idle priority to keep from bogging down
  // other apps that may also be running.
  VERIFY(pThread->SetThreadPriority(THREAD_PRIORITY_IDLE));
  // Now the thread can run wild
  pThread->ResumeThread();
}

void CThreadView::UpdateTitle ( int nThreads = -1 )

Definition at line 59 of file mtgdivw.cpp.

{
  if (nThreads == -1)
    nThreads = (int)m_threadList.GetCount();

  CString strCaption;
  if (nThreads != 0)
  {
    CString strFormat; strFormat.LoadString(IDS_CAPTION_FORMAT);
    strCaption.Format(strFormat, nThreads);
  }
  else
    strCaption.LoadString(IDS_CAPTION_NOTHREADS);

  GetParentFrame()->SetWindowText(strCaption);
}

Member Data Documentation

CClientDC* CThreadView::m_pDC

Definition at line 22 of file mtgdivw.h.

CTypedPtrList<CObList,CGDIThread*> CThreadView::m_threadList

Definition at line 23 of file mtgdivw.h.

The documentation for this class was generated from the following files:
  • advanced/mtgdi/mtgdivw.h
  • advanced/mtgdi/mtgdivw.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTimeApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTimeApp Class Reference

#include "time.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 22 of file time.h.

Member Function Documentation

int CTimeApp::ExitInstance ( )

Definition at line 49 of file time.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CTimeApp::InitInstance ( )

Definition at line 33 of file time.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/time/time.h
  • controls/time/time.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTimeCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CTimeCtrl Class Reference

#include "timectl.h"

List of all members.

Public Types

enum | { dispidInterval = 1L, eventidTimer = 1L }

Public Member Functions

CTimeCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnAmbientPropertyChange (DISPID dispid)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual void | OnEnabledChanged ()
virtual void | OnResetState ()

Protected Member Functions

~CTimeCtrl ()
afx_msg void | AboutBox ()
DECLARE_OLECREATE_EX (CTimeCtrl) DECLARE_OLETYPELIB(CTimeCtrl) DECLARE_PROPPAGEIDS(CTimeCtrl) DECLARE_OLECTLTYPE(CTimeCtrl) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
void | FireTimer ()
afx_msg void | OnDestroy ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnIntervalChanged ()
void | OnSetClientSite ()
afx_msg void | OnTimer (UINT_PTR nIDEvent)
void | StartTimer ()
void | StopTimer ()

Protected Attributes

short | m_interval

Detailed Description

Definition at line 23 of file timectl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidInterval
eventidTimer

Definition at line 83 of file timectl.h.

       {
  //{{AFX_DISP_ID(CTimeCtrl)
  dispidInterval = 1L,
  eventidTimer = 1L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CTimeCtrl::CTimeCtrl ( )

Definition at line 141 of file timectl.cpp.

{
  InitializeIIDs(&IID_DTime, &IID_DTimeEvents);

  SetInitialSize(24, 22);
  m_interval = (short) DEFAULT_INTERVAL; // initialize interval property
}

CTimeCtrl::~CTimeCtrl ( ) [protected]

Definition at line 153 of file timectl.cpp.

{
}

Member Function Documentation

void CTimeCtrl::AboutBox ( ) [protected]

Definition at line 213 of file timectl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_TIME);
  dlgAbout.DoModal();
}

CTimeCtrl::DECLARE_OLECREATE_EX ( CTimeCtrl ) [protected]
void CTimeCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 184 of file timectl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  short nInterval = m_interval;
  PX_Short(pPX, _T("Interval"), (short) m_interval, (short) DEFAULT_INTERVAL);

  if (pPX->IsLoading())
  {
    if (nInterval != m_interval)
      OnIntervalChanged();    // Force timer to recreate w/ correct interval
    OnEnabledChanged();
  }
}

void CTimeCtrl::FireTimer ( ) [inline, protected]

Definition at line 76 of file timectl.h.

    {FireEvent(eventidTimer,EVENT_PARAM(VTS_NONE));}

void CTimeCtrl::OnAmbientPropertyChange ( DISPID dispid ) [virtual]

Definition at line 314 of file timectl.cpp.

{
  if (dispid == DISPID_AMBIENT_USERMODE)
  {
    // Start or stop the timer
    if (GetEnabled())
    {
      if (AmbientUserMode())
        StartTimer();
      else
        StopTimer();
    }

    InvalidateControl();
  }
}

void CTimeCtrl::OnDestroy ( ) [protected]

Definition at line 283 of file timectl.cpp.

{
  StopTimer();

  COleControl::OnDestroy();
}

void CTimeCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 161 of file timectl.cpp.

{
  CBitmap bitmap;
  BITMAP  bmp;
  CPictureHolder picHolder;
  CRect rcSrcBounds;

  // Load clock bitmap
  bitmap.LoadBitmap(IDB_CLOCK);
  bitmap.GetObject(sizeof(BITMAP), &bmp);
  rcSrcBounds.right = bmp.bmWidth;
  rcSrcBounds.bottom = bmp.bmHeight;

  // Create picture and render
  picHolder.CreateFromBitmap((HBITMAP)bitmap.m_hObject, NULL, FALSE);
  picHolder.Render(pdc, rcBounds, rcSrcBounds);
}

void CTimeCtrl::OnEnabledChanged ( ) [virtual]

Definition at line 224 of file timectl.cpp.

{
  if (AmbientUserMode())
  {
    if (GetEnabled())
    {
      if (GetHwnd() != NULL)
        StartTimer();
    }
    else
      StopTimer();
  }
}

BOOL CTimeCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 294 of file timectl.cpp.

{
  return TRUE;
}

void CTimeCtrl::OnIntervalChanged ( ) [protected]

Definition at line 242 of file timectl.cpp.

{
  // Restart timer if it's enabled
  if (GetEnabled() && AmbientUserMode())
  {
    StopTimer();
    StartTimer();
  }

  SetModifiedFlag(TRUE);
}

void CTimeCtrl::OnResetState ( ) [virtual]

Definition at line 204 of file timectl.cpp.

{
  COleControl::OnResetState();  // Resets defaults found in DoPropExchange
}

void CTimeCtrl::OnSetClientSite ( ) [protected]

Definition at line 258 of file timectl.cpp.

{
  RecreateControlWindow();
}

void CTimeCtrl::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 303 of file timectl.cpp.

{
  FireTimer();
}

void CTimeCtrl::StartTimer ( ) [protected]

Definition at line 335 of file timectl.cpp.

{
  SetTimer(ID_TIMER, m_interval, NULL);
}

void CTimeCtrl::StopTimer ( ) [protected]

Definition at line 344 of file timectl.cpp.

{
  KillTimer(ID_TIMER);
}

Member Data Documentation

short CTimeCtrl::m_interval [protected]

Definition at line 67 of file timectl.h.

The documentation for this class was generated from the following files:
  • controls/time/timectl.h
  • controls/time/timectl.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTimePropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTimePropPage Class Reference

#include "timeppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_TIME }

Public Member Functions

CTimePropPage ()

Public Attributes

BOOL | m_Enabled
int | m_Interval

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file timeppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file timeppg.h.

{ IDD = IDD_PROPPAGE_TIME };

Constructor & Destructor Documentation

CTimePropPage::CTimePropPage ( )

Definition at line 59 of file timeppg.cpp.

                             :
  COlePropertyPage(IDD, IDS_TIME_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CTimePropPage)
  m_Enabled = FALSE;
  m_Interval = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CTimePropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 72 of file timeppg.cpp.

{
  //{{AFX_DATA_MAP(CTimePropPage)
  DDP_Check(pDX, IDC_ENABLEDCHECK, m_Enabled, _T("Enabled"));
  DDX_Check(pDX, IDC_ENABLEDCHECK, m_Enabled);
  DDP_Text(pDX, IDC_INTERVALEDIT, m_Interval, _T("Interval"));
  DDX_Text(pDX, IDC_INTERVALEDIT, m_Interval);
  DDV_MinMaxInt(pDX, m_Interval, 1, 32767);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

BOOL CTimePropPage::m_Enabled

Definition at line 28 of file timeppg.h.

int CTimePropPage::m_Interval

Definition at line 29 of file timeppg.h.

The documentation for this class was generated from the following files:
  • controls/time/timeppg.h
  • controls/time/timeppg.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CToolBarCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

CToolBarCtrlPage Class Reference

#include "toolpage.h"

List of all members.

Public Member Functions

CToolBarCtrlPage ()
~CToolBarCtrlPage ()

Protected Types

enum | { IDD = IDD_TOOLBARCTRL }

Protected Member Functions

void | ChangeCtrlStyle (long lStyle, BOOL bSetStyle)
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAltdrag ()
virtual BOOL | OnInitDialog ()
virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam)

Protected Attributes

BOOL | m_bAltDrag
CPaletteBar m_PaletteBar
CStandardBar m_StandardBar
CToolTipCtrl | m_ToolTip

Detailed Description

Definition at line 21 of file toolpage.h.

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
IDD

Definition at line 42 of file toolpage.h.

{ IDD = IDD_TOOLBARCTRL };

Constructor & Destructor Documentation

CToolBarCtrlPage::CToolBarCtrlPage ( )

Definition at line 30 of file toolpage.cpp.

                                   : CPropertyPage(CToolBarCtrlPage::IDD)
{
  //{{AFX_DATA_INIT(CToolBarCtrlPage)
  m_bAltDrag = FALSE;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
}

CToolBarCtrlPage::~CToolBarCtrlPage ( )

Definition at line 38 of file toolpage.cpp.

{
}

Member Function Documentation

void CToolBarCtrlPage::ChangeCtrlStyle | ( | long | lStyle,
 |  | BOOL | bSetStyle |
 | ) |  |  | [protected]

Definition at line 102 of file toolpage.cpp.

{
  long    lStyleOld;
  CRect   rect;

  m_StandardBar.GetWindowRect(&rect);
  lStyleOld = GetWindowLong( m_StandardBar.GetSafeHwnd(), GWL_STYLE );
  if ( bSetStyle )
    lStyleOld |= lStyle;
  else
    lStyleOld &= ~lStyle;

  SetWindowLong( m_StandardBar.GetSafeHwnd(), GWL_STYLE, lStyleOld );
  m_StandardBar.InvalidateRect(&rect);
}

void CToolBarCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 42 of file toolpage.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CToolBarCtrlPage)
  DDX_Check(pDX, IDC_ALTDRAG, m_bAltDrag);
  //}}AFX_DATA_MAP
}

void CToolBarCtrlPage::OnAltdrag ( ) [protected]

Definition at line 118 of file toolpage.cpp.

{
  UpdateData();
  ChangeCtrlStyle(TBSTYLE_ALTDRAG, m_bAltDrag);
}

BOOL CToolBarCtrlPage::OnInitDialog ( ) [protected, virtual]

Definition at line 59 of file toolpage.cpp.

{

  CPropertyPage::OnInitDialog();

  m_StandardBar.Create(WS_BORDER | WS_VISIBLE | WS_CHILD
      | CCS_TOP | CCS_ADJUSTABLE | TBSTYLE_TOOLTIPS,
    CRect(0,0,0,0),this, IDR_STANDARDBAR);

  m_PaletteBar.Create(WS_BORDER | WS_VISIBLE | WS_CHILD
      | CCS_BOTTOM | TBSTYLE_WRAPABLE | TBSTYLE_TOOLTIPS,
    CRect(0,0,0,0),this, IDR_PALETTEBAR);

  m_StandardBar.AutoSize();
  m_PaletteBar.AutoSize();

  m_ToolTip.Create(this);

  CString cstrToolTip;
  CWnd *pWnd = 0;
  CRect rect;

  // Setup the tooltip control for tooltips with the static controls
  for (int nIndex = ID_TOOLBARSTYLE; nIndex <= ID_TBSTYLETOOLTIPS2; nIndex++)
  {
    cstrToolTip.LoadString(nIndex);

    ENSURE(pWnd = GetDlgItem(nIndex));

    pWnd->GetWindowRect(&rect);
    ScreenToClient(&rect);

    m_ToolTip.AddTool(this, (LPCTSTR)cstrToolTip, &rect, nIndex);
  }

  m_ToolTip.Activate(TRUE);

  return TRUE;  // return TRUE unless you set the focus to a control
          // EXCEPTION: OCX Property Pages should return FALSE
}

LRESULT CToolBarCtrlPage::WindowProc | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected, virtual]

Definition at line 125 of file toolpage.cpp.

{
  // We need to pass these messages to the tooltip for it to determine
  // the position of the mouse

  switch (message)
  {
  case WM_LBUTTONDOWN:
  case WM_RBUTTONDOWN:
  case WM_MBUTTONDOWN:
  case WM_LBUTTONUP:
  case WM_MBUTTONUP:
  case WM_RBUTTONUP:
  case WM_MOUSEMOVE:
    {
      MSG msg;
      msg.hwnd = m_hWnd;
      msg.message = message;
      msg.wParam = wParam;
      msg.lParam = lParam;

      m_ToolTip.RelayEvent(&msg);
    }
  }

  return CPropertyPage::WindowProc(message,wParam,lParam);
}

Member Data Documentation

BOOL CToolBarCtrlPage::m_bAltDrag [protected]

Definition at line 43 of file toolpage.h.

CPaletteBar CToolBarCtrlPage::m_PaletteBar [protected]

Definition at line 38 of file toolpage.h.

CStandardBar CToolBarCtrlPage::m_StandardBar [protected]

Definition at line 37 of file toolpage.h.

CToolTipCtrl CToolBarCtrlPage::m_ToolTip [protected]

Definition at line 39 of file toolpage.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/toolpage.h
  • general/CmnCtrl1/toolpage.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CToolbarDateTimePickerApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CToolbarDateTimePickerApp Class Reference

#include "ToolbarDateTimePicker.h"

List of all members.

Public Member Functions

CToolbarDateTimePickerApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 29 of file ToolbarDateTimePicker.h.

Constructor & Destructor Documentation

CToolbarDateTimePickerApp::CToolbarDateTimePickerApp ( )

Definition at line 43 of file ToolbarDateTimePicker.cpp.

                                                     :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CToolbarDateTimePickerApp::ExitInstance ( ) [virtual]

Definition at line 178 of file ToolbarDateTimePicker.cpp.

{

  return CWinAppEx::ExitInstance();
}

BOOL CToolbarDateTimePickerApp::InitInstance ( ) [virtual]

Definition at line 58 of file ToolbarDateTimePicker.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

#if _MSC_VER < 1400
#ifdef _AFXDLL
  Enable3dControls();     // Call this when using MFC in a shared DLL
#else
  Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
#endif

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // 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(CToolbarDateTimePickerDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CToolbarDateTimePickerView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  return TRUE;
}

void CToolbarDateTimePickerApp::OnAppAbout ( )

Definition at line 169 of file ToolbarDateTimePicker.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CToolbarDateTimePickerApp::PreLoadState ( ) [virtual]

Definition at line 185 of file ToolbarDateTimePicker.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.h
  • vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CToolbarDateTimePickerDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CToolbarDateTimePickerDoc Class Reference

#include "ToolbarDateTimePickerDoc.h"

List of all members.

Public Member Functions

virtual | ~CToolbarDateTimePickerDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CToolbarDateTimePickerDoc ()

Detailed Description

Definition at line 19 of file ToolbarDateTimePickerDoc.h.

Constructor & Destructor Documentation

CToolbarDateTimePickerDoc::CToolbarDateTimePickerDoc ( ) [protected]

Definition at line 37 of file ToolbarDateTimePickerDoc.cpp.

{
  // TODO: add one-time construction code here

}

CToolbarDateTimePickerDoc::~CToolbarDateTimePickerDoc ( ) [virtual]

Definition at line 43 of file ToolbarDateTimePickerDoc.cpp.

{
}

Member Function Documentation

BOOL CToolbarDateTimePickerDoc::OnNewDocument ( ) [virtual]

Definition at line 47 of file ToolbarDateTimePickerDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CToolbarDateTimePickerDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 63 of file ToolbarDateTimePickerDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.h
  • vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CToolbarDateTimePickerView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CToolbarDateTimePickerView Class Reference

#include "ToolbarDateTimePickerView.h"

List of all members.

Public Member Functions

virtual | ~CToolbarDateTimePickerView ()
CToolbarDateTimePickerDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CToolbarDateTimePickerView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 19 of file ToolbarDateTimePickerView.h.

Constructor & Destructor Documentation

CToolbarDateTimePickerView::CToolbarDateTimePickerView ( ) [protected]

Definition at line 48 of file ToolbarDateTimePickerView.cpp.

{
  // TODO: add construction code here

}

CToolbarDateTimePickerView::~CToolbarDateTimePickerView ( ) [virtual]

Definition at line 54 of file ToolbarDateTimePickerView.cpp.

{
}

Member Function Documentation

CToolbarDateTimePickerDoc * CToolbarDateTimePickerView::GetDocument ( ) [inline]

Definition at line 66 of file ToolbarDateTimePickerView.h.

   { return (CToolbarDateTimePickerDoc*)m_pDocument; }

void CToolbarDateTimePickerView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 124 of file ToolbarDateTimePickerView.cpp.

{
  // TODO: add extra initialization before printing
}

void CToolbarDateTimePickerView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 158 of file ToolbarDateTimePickerView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CToolbarDateTimePickerView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 69 of file ToolbarDateTimePickerView.cpp.

{
  CToolbarDateTimePickerDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));

  rectFrame.DeflateRect (1, 1);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  rectFrame.DeflateRect (2, 2);
  pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
          ::GetSysColor (COLOR_3DLIGHT));

  pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
  pDC->SetBkMode (TRANSPARENT);

  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);

  pDC->SelectObject (pFontOld);
}

void CToolbarDateTimePickerView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 129 of file ToolbarDateTimePickerView.cpp.

{
  // TODO: add cleanup after printing
}

void CToolbarDateTimePickerView::OnFilePrintPreview ( ) [protected]

Definition at line 113 of file ToolbarDateTimePickerView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CToolbarDateTimePickerView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 118 of file ToolbarDateTimePickerView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CToolbarDateTimePickerView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 58 of file ToolbarDateTimePickerView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.h
  • vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CToolbarLabel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CToolbarLabel Class Reference

List of all members.

Public Member Functions

CToolbarLabel (UINT nID=0, LPCTSTR lpszText=NULL)
CToolbarLabel (UINT nID=0, LPCTSTR lpszText=NULL)
virtual void | OnDraw (CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE)
virtual void | OnDraw (CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE)

Detailed Description

Definition at line 24 of file MainFrm.cpp.

Constructor & Destructor Documentation

CToolbarLabel::CToolbarLabel | ( | UINT | nID = 0,
 |  | LPCTSTR | lpszText = NULL
 | ) |  |

Definition at line 44 of file MainFrm.cpp.

{
  if (lpszText != NULL)
  {
    m_strText = lpszText;
  }

  m_bText = TRUE;
  m_nID = nID;
  m_iImage = -1;
}

CToolbarLabel::CToolbarLabel | ( | UINT | nID = 0,
 |  | LPCTSTR | lpszText = NULL
 | ) |  |

Member Function Documentation

void CToolbarLabel::OnDraw | ( | CDC * | pDC,
 |  | const CRect & | rect,
 |  | CMFCToolBarImages * | pImages,
 |  | BOOL | bHorz = TRUE,
 |  | BOOL | bCustomizeMode = FALSE,
 |  | BOOL | bHighlight = FALSE,
 |  | BOOL | bDrawBorder = TRUE,
 |  | BOOL | bGrayDisabledButtons = TRUE |
 | ) |  |  | [virtual]

Definition at line 56 of file MainFrm.cpp.

{
  UINT nStyle = m_nStyle;
  m_nStyle &= ~TBBS_DISABLED;

  CMFCToolBarButton::OnDraw (pDC, rect, pImages, bHorz, FALSE,
                FALSE, FALSE, FALSE);

  m_nStyle = nStyle;
}

virtual void CToolbarLabel::OnDraw | ( | CDC * | pDC,
 |  | const CRect & | rect,
 |  | CMFCToolBarImages * | pImages,
 |  | BOOL | bHorz = TRUE,
 |  | BOOL | bCustomizeMode = FALSE,
 |  | BOOL | bHighlight = FALSE,
 |  | BOOL | bDrawBorder = TRUE,
 |  | BOOL | bGrayDisabledButtons = TRUE |
 | ) |  |  | [virtual]
The documentation for this class was generated from the following files:
  • vc2008fp/MDITabsDemo/MainFrm.cpp
  • vc2008fp/TabControl/MainFrm.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CToolDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CToolDlg Class Reference

#include "tooldlg.h"

List of all members.

Public Types

enum | { IDD = IDD_TOOLBAR }

Public Member Functions

CToolDlg (CWnd *pParent=NULL)

Public Attributes

BOOL | m_bBrowse
BOOL | m_bDebug
BOOL | m_bEdit
BOOL | m_bMain
BOOL | m_bPalette
BOOL | m_bResource
int | m_nColor
int | m_nColumns
int | m_nToolTips

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file tooldlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file tooldlg.h.

{ IDD = IDD_TOOLBAR };

Constructor & Destructor Documentation

CToolDlg::CToolDlg ( CWnd * pParent = NULL )

Definition at line 25 of file tooldlg.cpp.

  : CDialog(CToolDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CToolDlg)
  m_bBrowse = FALSE;
  m_bDebug = FALSE;
  m_bEdit = FALSE;
  m_bMain = FALSE;
  m_bResource = FALSE;
  m_nToolTips = -1;
  m_bPalette = FALSE;
  m_nColumns = -1;
  m_nColor = -1;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CToolDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 42 of file tooldlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CToolDlg)
  DDX_Check(pDX, IDC_BROWSE, m_bBrowse);
  DDX_Check(pDX, IDC_DEBUG, m_bDebug);
  DDX_Check(pDX, IDC_EDIT, m_bEdit);
  DDX_Check(pDX, IDC_MAIN, m_bMain);
  DDX_Check(pDX, IDC_RESOURCE, m_bResource);
  DDX_Radio(pDX, IDC_SHOW, m_nToolTips);
  DDX_Check(pDX, IDC_PALETTE, m_bPalette);
  DDX_Radio(pDX, IDC_TWO, m_nColumns);
  DDX_Radio(pDX, IDC_COLOR, m_nColor);
  //}}AFX_DATA_MAP
}

Member Data Documentation

BOOL CToolDlg::m_bBrowse

Definition at line 24 of file tooldlg.h.

BOOL CToolDlg::m_bDebug

Definition at line 25 of file tooldlg.h.

BOOL CToolDlg::m_bEdit

Definition at line 26 of file tooldlg.h.

BOOL CToolDlg::m_bMain

Definition at line 27 of file tooldlg.h.

BOOL CToolDlg::m_bPalette

Definition at line 30 of file tooldlg.h.

BOOL CToolDlg::m_bResource

Definition at line 28 of file tooldlg.h.

int CToolDlg::m_nColor

Definition at line 32 of file tooldlg.h.

int CToolDlg::m_nColumns

Definition at line 31 of file tooldlg.h.

int CToolDlg::m_nToolTips

Definition at line 29 of file tooldlg.h.

The documentation for this class was generated from the following files:
  • general/docktool/tooldlg.h
  • general/docktool/tooldlg.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CToolsPalette Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

CToolsPalette Class Reference

#include "ToolsPalette.h"

List of all members.

Public Member Functions

CToolsPalette ()
virtual | ~CToolsPalette ()
virtual void | AdjustLocations ()
virtual BOOL | AllowShowOnList () const
virtual CSize | CalcSize (BOOL bVertDock)
virtual void | DoPaint (CDC *pDC)
int | GetColumns () const
void | SetColumns (int nColumns)

Protected Attributes

int | m_nColumns
CRect | m_rectInfo

Detailed Description

Definition at line 16 of file ToolsPalette.h.

Constructor & Destructor Documentation

CToolsPalette::CToolsPalette ( )

Definition at line 28 of file ToolsPalette.cpp.

{
  m_nColumns = 2;
}

CToolsPalette::~CToolsPalette ( ) [virtual]

Definition at line 33 of file ToolsPalette.cpp.

{
}

Member Function Documentation

void CToolsPalette::AdjustLocations ( ) [virtual]

Definition at line 58 of file ToolsPalette.cpp.

{
  CRect rectClient;
  GetClientRect (rectClient);

  int x = rectClient.left + nHorzMargin;
  int y = rectClient.top + nVertMargin;

  // Set buttons locations:
  for (POSITION pos = m_Buttons.GetHeadPosition (); pos != NULL;)
  {
    CMFCToolBarButton* pButton = (CMFCToolBarButton*) m_Buttons.GetNext (pos);
    ASSERT_VALID (pButton);

    pButton->SetRect (CRect (CPoint (x, y), CSize (GetColumnWidth (), GetRowHeight ())));

    if (pButton->m_bWrap && pos != NULL)
    {
      // Start next row:
      y += GetRowHeight ();
      x = rectClient.left + nHorzMargin;
    }
    else
    {
      // Move to the next column:
      x += GetColumnWidth ();
    }
  }

  // Set info. area rectangle (at the bottom of bar):
  if (y + GetRowHeight () < rectClient.bottom)
  {
    m_rectInfo = rectClient;
    m_rectInfo.top = y + GetRowHeight ();
    m_rectInfo.DeflateRect (nHorzMargin, nVertMargin);
  }
  else
  {
    m_rectInfo.SetRectEmpty ();
  }
}

virtual BOOL CToolsPalette::AllowShowOnList ( ) const [inline, virtual]

Definition at line 41 of file ToolsPalette.h.

  {
    return FALSE; // Don't show me on the toolbars list
  }

CSize CToolsPalette::CalcSize ( BOOL bVertDock ) [virtual]

Definition at line 45 of file ToolsPalette.cpp.

{
  // Calculate palette bar size. First, calculate bar width
  // according to the number of columns:
  int cx = GetColumnWidth () * m_nColumns;

  // Now, wrap bar by width and calculate its height:
  int cy = WrapToolBar (cx) * GetRowHeight ();

  // Add vertical and horizontal margins:
  return CSize (cx + nHorzMargin * 2, cy + nInfoHeight + nVertMargin * 2);
}

void CToolsPalette::DoPaint ( CDC * pDC ) [virtual]

Definition at line 110 of file ToolsPalette.cpp.

{
  CMFCToolBar::DoPaint (pDC);

  //-----------------------
  // Draw information area:
  //-----------------------
  if (m_rectInfo.Height () > 10)
  {
    pDC->Draw3dRect (m_rectInfo,  afxGlobalData.clrBarShadow,
                    afxGlobalData.clrBarHilite);

    CFont* pOldFont = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
    pDC->SetBkMode (TRANSPARENT);

    pDC->DrawText (CString (_T("Info")), m_rectInfo, DT_VCENTER | DT_CENTER | DT_SINGLELINE);

    pDC->SelectObject (pOldFont);
  }
}

int CToolsPalette::GetColumns ( ) const [inline]

Definition at line 24 of file ToolsPalette.h.

  {
    return m_nColumns;
  }

void CToolsPalette::SetColumns ( int nColumns )

Definition at line 100 of file ToolsPalette.cpp.

{
  m_nColumns = nColumns;

  if (GetSafeHwnd () != NULL && GetParentFrame () != NULL)
  {
    GetParentFrame ()->RecalcLayout ();
  }
}

Member Data Documentation

int CToolsPalette::m_nColumns [protected]

Definition at line 30 of file ToolsPalette.h.

CRect CToolsPalette::m_rectInfo [protected]

Definition at line 31 of file ToolsPalette.h.

The documentation for this class was generated from the following files:
  • vc2008fp/PaletteDemo/ToolsPalette.h
  • vc2008fp/PaletteDemo/ToolsPalette.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTooltipDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CTooltipDemoApp Class Reference

#include "TooltipDemo.h"

List of all members.

Public Member Functions

CTooltipDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Public Attributes

BOOL | m_bTTInPopupMenus

Detailed Description

Definition at line 24 of file TooltipDemo.h.

Constructor & Destructor Documentation

CTooltipDemoApp::CTooltipDemoApp ( )

Definition at line 85 of file TooltipDemo.cpp.

{
  m_bTTInPopupMenus = TRUE;
}

Member Function Documentation

int CTooltipDemoApp::ExitInstance ( ) [virtual]

Definition at line 163 of file TooltipDemo.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CTooltipDemoApp::InitInstance ( ) [virtual]

Definition at line 98 of file TooltipDemo.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("BCGSoft\\BCGControlBarVS\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();
  InitTooltipManager ();

  // 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(CTooltipDemoDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CTooltipDemoView));
  AddDocTemplate(pDocTemplate);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The one and only window has been initialized, so show and update it.
  m_pMainWnd->ShowWindow(SW_SHOW);
  m_pMainWnd->UpdateWindow();

  if(afxGlobalData.m_nBitsPerPixel < 16)
  {
    AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
  }

  return TRUE;
}

void CTooltipDemoApp::OnAppAbout ( )

Definition at line 169 of file TooltipDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CTooltipDemoApp::PreLoadState ( ) [virtual]

Definition at line 175 of file TooltipDemo.cpp.

{
  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
}

Member Data Documentation

BOOL CTooltipDemoApp::m_bTTInPopupMenus

Definition at line 29 of file TooltipDemo.h.

The documentation for this class was generated from the following files:
  • vc2008fp/ToolTipDemo/TooltipDemo.h
  • vc2008fp/ToolTipDemo/TooltipDemo.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTooltipDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CTooltipDemoDoc Class Reference

#include "TooltipDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CTooltipDemoDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CTooltipDemoDoc ()

Detailed Description

Definition at line 13 of file TooltipDemoDoc.h.

Constructor & Destructor Documentation

CTooltipDemoDoc::CTooltipDemoDoc ( ) [protected]

Definition at line 33 of file TooltipDemoDoc.cpp.

{
  // TODO: add one-time construction code here

}

CTooltipDemoDoc::~CTooltipDemoDoc ( ) [virtual]

Definition at line 39 of file TooltipDemoDoc.cpp.

{
}

Member Function Documentation

BOOL CTooltipDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file TooltipDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CTooltipDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file TooltipDemoDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/ToolTipDemo/TooltipDemoDoc.h
  • vc2008fp/ToolTipDemo/TooltipDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTooltipDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTooltipDemoView Class Reference

#include "TooltipDemoView.h"

List of all members.

Public Types

enum | { IDD = IDD_TOOLTIPDEMO_FORM }

Public Member Functions

virtual | ~CTooltipDemoView ()
CTooltipDemoDoc * GetDocument ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Public Attributes

BOOL | m_bBoldLabel
BOOL | m_bCustomColors
BOOL | m_bDrawDescription
BOOL | m_bDrawIcon
BOOL | m_bDrawSeparator
BOOL | m_bRoundedCorners
BOOL | m_bTTInPopupMenus
int | m_nTTType

Protected Member Functions

CTooltipDemoView ()
virtual void | DoDataExchange (CDataExchange *pDX)
void | EnableControls ()
afx_msg void | OnApplyParams ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual void | OnInitialUpdate ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file TooltipDemoView.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 20 of file TooltipDemoView.h.

{ IDD = IDD_TOOLTIPDEMO_FORM };

Constructor & Destructor Documentation

CTooltipDemoView::CTooltipDemoView ( ) [protected]

Definition at line 53 of file TooltipDemoView.cpp.

  : CFormView(CTooltipDemoView::IDD)
{
  m_nTTType = 0;
  m_bBoldLabel = FALSE;
  m_bCustomColors = FALSE;
  m_bDrawDescription = FALSE;
  m_bDrawIcon = FALSE;
  m_bRoundedCorners = FALSE;
  m_bDrawSeparator = FALSE;
  m_bTTInPopupMenus = FALSE;

  m_nTTType = theApp.GetInt (_T("TTType"), 0);
  m_bBoldLabel = theApp.GetInt (_T("BoldLabel"), TRUE);
  m_bCustomColors = theApp.GetInt (_T("CustomColors"), TRUE);
  m_bDrawDescription = theApp.GetInt (_T("DrawDescription"), TRUE);
  m_bDrawIcon = theApp.GetInt (_T("DrawIcon"), TRUE);
  m_bRoundedCorners = theApp.GetInt (_T("RoundedCorners"), TRUE);
  m_bDrawSeparator = theApp.GetInt (_T("DrawSeparator"), TRUE);
  m_bTTInPopupMenus = theApp.GetInt (_T("TTInPopupMenus"), TRUE);
}

CTooltipDemoView::~CTooltipDemoView ( ) [virtual]

Definition at line 75 of file TooltipDemoView.cpp.

{
}

Member Function Documentation

void CTooltipDemoView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 79 of file TooltipDemoView.cpp.

{
  CFormView::DoDataExchange(pDX);
  DDX_Radio(pDX, IDC_TT_TYPE, m_nTTType);
  DDX_Check(pDX, IDC_BOLD_LABEL, m_bBoldLabel);
  DDX_Check(pDX, IDC_CUSTOM_COLORS, m_bCustomColors);
  DDX_Check(pDX, IDC_DRAW_DESCR, m_bDrawDescription);
  DDX_Check(pDX, IDC_DRAW_ICON, m_bDrawIcon);
  DDX_Check(pDX, IDC_ROUNDED_CORNERS, m_bRoundedCorners);
  DDX_Check(pDX, IDC_DRAW_SEPARATOR, m_bDrawSeparator);
  DDX_Check(pDX, IDC_SHOW_TOOLTIPS_IN_MENU, m_bTTInPopupMenus);
}

void CTooltipDemoView::EnableControls ( ) [protected]

Definition at line 287 of file TooltipDemoView.cpp.

{
  BOOL bEnableParams = m_nTTType == 2;

  GetDlgItem (IDC_DRAW_ICON)->EnableWindow (bEnableParams);
  GetDlgItem (IDC_DRAW_DESCR)->EnableWindow (bEnableParams);
  GetDlgItem (IDC_ROUNDED_CORNERS)->EnableWindow (bEnableParams);
  GetDlgItem (IDC_BOLD_LABEL)->EnableWindow (bEnableParams && m_bDrawDescription);
  GetDlgItem (IDC_CUSTOM_COLORS)->EnableWindow (bEnableParams);
  GetDlgItem (IDC_DRAW_SEPARATOR)->EnableWindow (bEnableParams && m_bDrawDescription);
}

CTooltipDemoDoc * CTooltipDemoView::GetDocument ( ) [inline]

Definition at line 65 of file TooltipDemoView.h.

   { return (CTooltipDemoDoc*)m_pDocument; }

void CTooltipDemoView::OnApplyParams ( ) [protected]

Definition at line 204 of file TooltipDemoView.cpp.

{
  UpdateData ();

  EnableControls ();

  afxGlobalData.m_nMaxToolTipWidth = 200;

  theApp.WriteInt (_T("TTType"), m_nTTType);
  theApp.WriteInt (_T("BoldLabel"), m_bBoldLabel);
  theApp.WriteInt (_T("CustomColors"), m_bCustomColors);
  theApp.WriteInt (_T("DrawDescription"), m_bDrawDescription);
  theApp.WriteInt (_T("DrawIcon"), m_bDrawIcon);
  theApp.WriteInt (_T("RoundedCorners"), m_bRoundedCorners);
  theApp.WriteInt (_T("DrawSeparator"), m_bDrawSeparator);
  theApp.WriteInt (_T("TTInPopupMenus"), m_bTTInPopupMenus);

  theApp.m_bTTInPopupMenus = m_bTTInPopupMenus;

  if (m_nTTType == 0) // Standard tooltip
  {
    theApp.GetTooltipManager ()->SetTooltipParams (
      AFX_TOOLTIP_TYPE_ALL,
      NULL,
      NULL);
    return;
  }

  if (m_nTTType == 1) // Balloon tooltip
  {
    CMFCToolTipInfo paramsBalloon;
    paramsBalloon.m_bBalloonTooltip = TRUE;

    theApp.GetTooltipManager ()->SetTooltipParams (
      AFX_TOOLTIP_TYPE_ALL,
      RUNTIME_CLASS (CMFCToolTipCtrl),
      &paramsBalloon);
    return;
  }

  if (m_nTTType == 3) // Visual Manager-based tooltip
  {
    CMFCToolTipInfo params;
    params.m_bVislManagerTheme = TRUE;

    theApp.GetTooltipManager ()->SetTooltipParams (
      AFX_TOOLTIP_TYPE_ALL,
      RUNTIME_CLASS (CMFCToolTipCtrl),
      &params);
    return;
  }

  if (m_nTTType == 4) // Custom tooltip
  {
    theApp.GetTooltipManager ()->SetTooltipParams (
      AFX_TOOLTIP_TYPE_ALL,
      RUNTIME_CLASS (CMyToolTipCtrl));
    return;
  }

  // Custom tooltip with parameters:
  CMFCToolTipInfo params;

  params.m_bBoldLabel = m_bBoldLabel;
  params.m_bDrawDescription = m_bDrawDescription;
  params.m_bDrawIcon = m_bDrawIcon;
  params.m_bRoundedCorners = m_bRoundedCorners;
  params.m_bDrawSeparator = m_bDrawSeparator;

  if (m_bCustomColors)
  {
    params.m_clrFill = RGB (255, 255, 255);
    params.m_clrFillGradient = RGB (228, 228, 240);
    params.m_clrText = RGB (61, 83, 80);
    params.m_clrBorder = RGB (144, 149, 168);
  }

  theApp.GetTooltipManager ()->SetTooltipParams (
    AFX_TOOLTIP_TYPE_ALL,
    RUNTIME_CLASS (CMFCToolTipCtrl),
    &params);
}

void CTooltipDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 160 of file TooltipDemoView.cpp.

{
  // TODO: add extra initialization before printing
}

void CTooltipDemoView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 199 of file TooltipDemoView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CTooltipDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 165 of file TooltipDemoView.cpp.

{
  // TODO: add cleanup after printing
}

void CTooltipDemoView::OnFilePrintPreview ( ) [protected]

Definition at line 149 of file TooltipDemoView.cpp.

{
  AFXPrintPreview (this);
}

void CTooltipDemoView::OnInitialUpdate ( ) [protected, virtual]

Definition at line 114 of file TooltipDemoView.cpp.

{
  // There is only one view ever, so it only needs to do the initial
  // update once--otherwise the application is  resized needlessly.
  static BOOL bUpdatedOnce = FALSE;
  if (bUpdatedOnce)
    return;
  bUpdatedOnce = TRUE;

  CFormView::OnInitialUpdate();
  GetParentFrame()->RecalcLayout();
  ResizeParentToFit();

  // Check for balloon tooltips:
  if (!IsBalloonTooltipAvailable ())
  {
    if (m_nTTType == 1)
    {
      m_nTTType = 0;
      UpdateData (FALSE);
    }

    GetDlgItem (IDC_TT_TYPE4)->EnableWindow (FALSE);
  }
  else
  {
    GetDlgItem (IDC_NO_BALLOON)->ShowWindow (SW_HIDE);
  }

  OnApplyParams ();
}

BOOL CTooltipDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 154 of file TooltipDemoView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CTooltipDemoView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 170 of file TooltipDemoView.cpp.

{
  // TODO: add customized printing code here
}

BOOL CTooltipDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 92 of file TooltipDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CFormView::PreCreateWindow(cs);
}

Member Data Documentation

BOOL CTooltipDemoView::m_bBoldLabel

Definition at line 22 of file TooltipDemoView.h.

BOOL CTooltipDemoView::m_bCustomColors

Definition at line 23 of file TooltipDemoView.h.

BOOL CTooltipDemoView::m_bDrawDescription

Definition at line 24 of file TooltipDemoView.h.

BOOL CTooltipDemoView::m_bDrawIcon

Definition at line 25 of file TooltipDemoView.h.

BOOL CTooltipDemoView::m_bDrawSeparator

Definition at line 27 of file TooltipDemoView.h.

BOOL CTooltipDemoView::m_bRoundedCorners

Definition at line 26 of file TooltipDemoView.h.

BOOL CTooltipDemoView::m_bTTInPopupMenus

Definition at line 28 of file TooltipDemoView.h.

int CTooltipDemoView::m_nTTType

Definition at line 21 of file TooltipDemoView.h.

The documentation for this class was generated from the following files:
  • vc2008fp/ToolTipDemo/TooltipDemoView.h
  • vc2008fp/ToolTipDemo/TooltipDemoView.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTrackerApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTrackerApp Class Reference

#include "trackapp.h"

List of all members.

Public Member Functions

CTrackerApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 24 of file trackapp.h.

Constructor & Destructor Documentation

CTrackerApp::CTrackerApp ( )

Definition at line 44 of file trackapp.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CTrackerApp::InitInstance ( ) [virtual]

Definition at line 58 of file trackapp.cpp.

{
  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI options (including MRU)

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  AddDocTemplate(new CMultiDocTemplate(IDR_TRACKETYPE,
      RUNTIME_CLASS(CTrackerDoc),
      RUNTIME_CLASS(CMDIChildWnd),        // standard MDI child frame
      RUNTIME_CLASS(CTrackerView)));

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    delete pMainFrame;
    return FALSE;
  }
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();
  m_pMainWnd = pMainFrame;

  // create a new (empty) document
  OnFileNew();

  if (m_lpCmdLine[0] != '\0')
  {
    // TODO: add command line processing here
  }

  return TRUE;
}

void CTrackerApp::OnAppAbout ( )

Definition at line 139 of file trackapp.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

The documentation for this class was generated from the following files:
  • general/tracker/trackapp.h
  • general/tracker/trackapp.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTrackerDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CTrackerDoc Class Reference

#include "trackdoc.h"

List of all members.

Public Member Functions

virtual | ~CTrackerDoc ()
virtual void | Serialize (CArchive &ar)

Public Attributes

BOOL | m_bAllowInvert
CRectTracker | m_tracker

Protected Member Functions

CTrackerDoc ()
afx_msg void | OnEditAllowInvert ()
afx_msg void | OnEditDottedline ()
afx_msg void | OnEditHatchedborder ()
afx_msg void | OnEditHatchedinside ()
afx_msg void | OnEditResizeinside ()
afx_msg void | OnEditResizeoutside ()
afx_msg void | OnEditSolidline ()
virtual BOOL | OnNewDocument ()
afx_msg void | OnUpdateEditAllowInvert (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditDottedline (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditHatchedborder (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditHatchedinside (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditResizeinside (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditResizeoutside (CCmdUI *pCmdUI)
afx_msg void | OnUpdateEditSolidline (CCmdUI *pCmdUI)

Detailed Description

Definition at line 14 of file trackdoc.h.

Constructor & Destructor Documentation

CTrackerDoc::CTrackerDoc ( ) [protected]

Definition at line 50 of file trackdoc.cpp.

{
  m_tracker.m_rect.left = 10;
  m_tracker.m_rect.top = 10;
  m_tracker.m_rect.right = 101;
  m_tracker.m_rect.bottom = 101;
  m_bAllowInvert = FALSE;
}

CTrackerDoc::~CTrackerDoc ( ) [virtual]

Definition at line 59 of file trackdoc.cpp.

{
}

Member Function Documentation

void CTrackerDoc::OnEditAllowInvert ( ) [protected]

Definition at line 207 of file trackdoc.cpp.

{
  m_bAllowInvert = !m_bAllowInvert;
  SetModifiedFlag();
}

void CTrackerDoc::OnEditDottedline ( ) [protected]

Definition at line 129 of file trackdoc.cpp.

{
  CRect rectTrue;
  m_tracker.GetTrueRect(&rectTrue);
  m_tracker.m_nStyle &= ~CRectTracker::solidLine;
  m_tracker.m_nStyle ^= CRectTracker::dottedLine;
  SetModifiedFlag();
  UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
  UpdateAllViews(NULL);
}

void CTrackerDoc::OnEditHatchedborder ( ) [protected]

Definition at line 145 of file trackdoc.cpp.

{
  CRect rectTrue;
  m_tracker.GetTrueRect(&rectTrue);
  m_tracker.m_nStyle ^= CRectTracker::hatchedBorder;
  SetModifiedFlag();
  UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
  UpdateAllViews(NULL);
}

void CTrackerDoc::OnEditHatchedinside ( ) [protected]

Definition at line 160 of file trackdoc.cpp.

{
  CRect rectTrue;
  m_tracker.GetTrueRect(&rectTrue);
  m_tracker.m_nStyle ^= CRectTracker::hatchInside;
  SetModifiedFlag();
  UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
  UpdateAllViews(NULL);
}

void CTrackerDoc::OnEditResizeinside ( ) [protected]

Definition at line 175 of file trackdoc.cpp.

{
  CRect rectTrue;
  m_tracker.GetTrueRect(&rectTrue);
  m_tracker.m_nStyle &= ~CRectTracker::resizeOutside;
  m_tracker.m_nStyle ^= CRectTracker::resizeInside;
  SetModifiedFlag();
  UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
  UpdateAllViews(NULL);
}

void CTrackerDoc::OnEditResizeoutside ( ) [protected]

Definition at line 191 of file trackdoc.cpp.

{
  CRect rectTrue;
  m_tracker.GetTrueRect(&rectTrue);
  m_tracker.m_nStyle &= ~CRectTracker::resizeInside;
  m_tracker.m_nStyle ^= CRectTracker::resizeOutside;
  SetModifiedFlag();
  UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
  UpdateAllViews(NULL);
}

void CTrackerDoc::OnEditSolidline ( ) [protected]

Definition at line 113 of file trackdoc.cpp.

{
  CRect rectTrue;
  m_tracker.GetTrueRect(&rectTrue);
  m_tracker.m_nStyle &= ~CRectTracker::dottedLine;
  m_tracker.m_nStyle ^= CRectTracker::solidLine;
  SetModifiedFlag();
  UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
  UpdateAllViews(NULL);
}

BOOL CTrackerDoc::OnNewDocument ( ) [protected, virtual]

Definition at line 63 of file trackdoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;
  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)
  return TRUE;
}

void CTrackerDoc::OnUpdateEditAllowInvert ( CCmdUI * pCmdUI ) [protected]

Definition at line 213 of file trackdoc.cpp.

{
  pCmdUI->SetCheck(m_bAllowInvert);
}

void CTrackerDoc::OnUpdateEditDottedline ( CCmdUI * pCmdUI ) [protected]

Definition at line 140 of file trackdoc.cpp.

{
  pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::dottedLine));
}

void CTrackerDoc::OnUpdateEditHatchedborder ( CCmdUI * pCmdUI ) [protected]

Definition at line 155 of file trackdoc.cpp.

{
  pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::hatchedBorder));
}

void CTrackerDoc::OnUpdateEditHatchedinside ( CCmdUI * pCmdUI ) [protected]

Definition at line 170 of file trackdoc.cpp.

{
  pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::hatchInside));
}

void CTrackerDoc::OnUpdateEditResizeinside ( CCmdUI * pCmdUI ) [protected]

Definition at line 186 of file trackdoc.cpp.

{
  pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::resizeInside));
}

void CTrackerDoc::OnUpdateEditResizeoutside ( CCmdUI * pCmdUI ) [protected]

Definition at line 202 of file trackdoc.cpp.

{
  pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::resizeOutside));
}

void CTrackerDoc::OnUpdateEditSolidline ( CCmdUI * pCmdUI ) [protected]

Definition at line 124 of file trackdoc.cpp.

{
  pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::solidLine));
}

void CTrackerDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 75 of file trackdoc.cpp.

{
  if (ar.IsStoring())
  {
    DWORD dw = m_tracker.m_nStyle;
    WORD w = (WORD)m_bAllowInvert;
    ar << m_tracker.m_rect << dw << w;
  }
  else
  {
    DWORD dw;
    WORD w;
    ar >> m_tracker.m_rect >> dw >> w;
    m_tracker.m_nStyle = (UINT)dw;
    m_bAllowInvert = w;
  }
}

Member Data Documentation

BOOL CTrackerDoc::m_bAllowInvert

Definition at line 23 of file trackdoc.h.

CRectTracker CTrackerDoc::m_tracker

Definition at line 22 of file trackdoc.h.

The documentation for this class was generated from the following files:
  • general/tracker/trackdoc.h
  • general/tracker/trackdoc.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTrackerView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CTrackerView Class Reference

#include "trackvw.h"

List of all members.

Public Member Functions

virtual | ~CTrackerView ()
CTrackerDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)

Protected Member Functions

CTrackerView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnViewSethandlesize ()
afx_msg void | OnViewSetminimumsize ()

Detailed Description

Definition at line 14 of file trackvw.h.

Constructor & Destructor Documentation

CTrackerView::CTrackerView ( ) [protected]

Definition at line 45 of file trackvw.cpp.

{
  // TODO: add construction code here
}

CTrackerView::~CTrackerView ( ) [virtual]

Definition at line 50 of file trackvw.cpp.

{
}

Member Function Documentation

CTrackerDoc * CTrackerView::GetDocument ( ) [inline]

Definition at line 55 of file trackvw.h.

   { return (CTrackerDoc*) m_pDocument; }

void CTrackerView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 167 of file trackvw.cpp.

{
  // TODO: add extra initialization before printing
}

void CTrackerView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 81 of file trackvw.cpp.

{
  CTrackerDoc* pDoc = GetDocument();

  CBrush* pOldBrush = NULL;
  TRY
  {
    // draw inside in various colors
    CBrush brush1, brush2;
    CRect rect;
    int nWidth = pDoc->m_tracker.m_rect.Width();
    int nHeight = pDoc->m_tracker.m_rect.Height();
    int nSgnX = nWidth != 0 ? nWidth / abs(nWidth) : 1;
    int nSgnY = nHeight != 0 ? nHeight / abs(nHeight) : 1;
    pDC->SetTextAlign(TA_CENTER);
    pDC->SetBkMode(TRANSPARENT);
    int nCenterX, nCenterY;

    TEXTMETRIC tm;
    pDC->GetTextMetrics(&tm);

    brush1.CreateSolidBrush(RGB(255, 0, 0));
    pOldBrush = pDC->SelectObject(&brush1);
    SetNormalRect(rect, pDoc->m_tracker.m_rect.left,
      pDoc->m_tracker.m_rect.top, nWidth/2, nHeight/2);
    pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
    nCenterX = rect.left + rect.Width()/2;
    nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
    pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("1"), 1, NULL);

    brush2.CreateSolidBrush(RGB(0, 255, 0));
    pDC->SelectObject(&brush2);
    brush1.DeleteObject();
    SetNormalRect(rect, pDoc->m_tracker.m_rect.left+nWidth/2,
      pDoc->m_tracker.m_rect.top, (nWidth+nSgnX)/2, nHeight/2);
    pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
    nCenterX = rect.left + rect.Width()/2;
    nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
    pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("2"), 1, NULL);

    brush1.CreateSolidBrush(RGB(0, 0, 255));
    pDC->SelectObject(&brush1);
    brush2.DeleteObject();
    SetNormalRect(rect, pDoc->m_tracker.m_rect.left,
      pDoc->m_tracker.m_rect.top+nHeight/2, nWidth/2, (nHeight+nSgnY)/2);
    pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
    nCenterX = rect.left + rect.Width()/2;
    nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
    pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("3"), 1, NULL);

    brush2.CreateSolidBrush(RGB(192, 192, 192));
    pDC->SelectObject(&brush2);
    brush1.DeleteObject();
    SetNormalRect(rect, pDoc->m_tracker.m_rect.left+nWidth/2,
      pDoc->m_tracker.m_rect.top+nHeight/2,
      (nWidth+nSgnX)/2, (nHeight+nSgnY)/2);
    pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
    nCenterX = rect.left + rect.Width()/2;
    nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
    pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("4"), 1, NULL);

    // cleanup DC
    if (pOldBrush != NULL)
      pDC->SelectObject(pOldBrush);
    brush2.DeleteObject();

    // draw tracker on outside
    pDoc->m_tracker.Draw(pDC);
  }
  CATCH_ALL(e)
  {
    if (pOldBrush != NULL)
      pDC->SelectObject(pOldBrush);
  }
  END_CATCH_ALL
}

void CTrackerView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 172 of file trackvw.cpp.

{
  // TODO: add cleanup after printing
}

void CTrackerView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 222 of file trackvw.cpp.

{
  CTrackerDoc* pDoc = GetDocument();
  CRect rectSave;
  pDoc->m_tracker.GetTrueRect(rectSave);
  if (pDoc->m_tracker.HitTest(point) < 0)
  {
    // just to demonstrate CRectTracker::TrackRubberBand
    CRectTracker tracker;
    if (tracker.TrackRubberBand(this, point, pDoc->m_bAllowInvert))
    {
      MessageBeep(0); // beep indicates TRUE

      // see if rubber band intersects with the doc's tracker
      CRect rectT;
      tracker.m_rect.NormalizeRect(); // so intersect rect works
      if (rectT.IntersectRect(tracker.m_rect, pDoc->m_tracker.m_rect))
      {
        // if so, put resize handles on it (ie. select it)
        if (pDoc->m_tracker.m_nStyle & CRectTracker::resizeInside)
        {
          // swap from resize inside to resize outside for effect
          pDoc->m_tracker.m_nStyle &= ~CRectTracker::resizeInside;
          pDoc->m_tracker.m_nStyle |= CRectTracker::resizeOutside;
        }
        else
        {
          // just use inside resize handles on first time
          pDoc->m_tracker.m_nStyle &= ~CRectTracker::resizeOutside;
          pDoc->m_tracker.m_nStyle |= CRectTracker::resizeInside;
        }
        pDoc->SetModifiedFlag();
        pDoc->UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectSave);
        pDoc->UpdateAllViews(NULL);
      }
    }
  }
  else if (pDoc->m_tracker.Track(this, point, pDoc->m_bAllowInvert))
  {
    // normal tracking action, when tracker is "hit"
    pDoc->SetModifiedFlag();
    pDoc->UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectSave);
    pDoc->UpdateAllViews(NULL);
  }
  CView::OnLButtonDown(nFlags, point);
}

BOOL CTrackerView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 161 of file trackvw.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CTrackerView::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 270 of file trackvw.cpp.

{
  // forward to tracker
  CTrackerDoc* pDoc = GetDocument();
  if (pWnd == this && pDoc->m_tracker.SetCursor(this, nHitTest))
    return TRUE;

  return CView::OnSetCursor(pWnd, nHitTest, message);
}

void CTrackerView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [virtual]

Definition at line 204 of file trackvw.cpp.

{
  if (lHint == 0)
  {
    CRect rectTrue;
    CTrackerDoc* pDoc = GetDocument();
    pDoc->m_tracker.GetTrueRect(&rectTrue);
    InvalidateRect(rectTrue);
  }
  else
  {
    InvalidateRect((CRect*)lHint);
  }
}

void CTrackerView::OnViewSethandlesize ( ) [protected]

Definition at line 281 of file trackvw.cpp.

{
  CTrackerDoc* pDoc = GetDocument();
  CHandleSize dlg;
  dlg.m_nHandleSize = pDoc->m_tracker.m_nHandleSize;
  if (dlg.DoModal() == IDOK)
  {
    pDoc->m_tracker.m_nHandleSize = dlg.m_nHandleSize;
    pDoc->UpdateAllViews(NULL);
  }
}

void CTrackerView::OnViewSetminimumsize ( ) [protected]

Definition at line 293 of file trackvw.cpp.

{
  CTrackerDoc* pDoc = GetDocument();
  CMinSize dlg;
  dlg.m_nMinX = pDoc->m_tracker.m_sizeMin.cx;
  dlg.m_nMinY = pDoc->m_tracker.m_sizeMin.cy;
  if (dlg.DoModal() == IDOK)
  {
    pDoc->m_tracker.m_sizeMin.cx = dlg.m_nMinX;
    pDoc->m_tracker.m_sizeMin.cy = dlg.m_nMinY;
    pDoc->UpdateAllViews(NULL);
  }
}

The documentation for this class was generated from the following files:
  • general/tracker/trackvw.h
  • general/tracker/trackvw.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTrackFile Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CTrackFile Class Reference

#include "multconv.h"

Inherited by COEMFile, and COEMFile.

List of all members.

Public Member Functions

CTrackFile (CFrameWnd *pWnd)
CTrackFile (CFrameWnd *pWnd)
~CTrackFile ()
~CTrackFile ()
void | OutputPercent (int nPercentComplete=0)
void | OutputPercent (int nPercentComplete=0)
void | OutputString (LPCTSTR lpsz)
void | OutputString (LPCTSTR lpsz)
virtual UINT | Read (void FAR *lpBuf, UINT nCount)
virtual UINT | Read (void FAR *lpBuf, UINT nCount)
virtual void | Write (const void FAR *lpBuf, UINT nCount)
virtual void | Write (const void FAR *lpBuf, UINT nCount)

Public Attributes

DWORD | m_dwLength
ULONGLONG | m_dwLength
int | m_nLastPercent
CFrameWnd * | m_pFrameWnd
CString | m_strComplete
CString | m_strSaving
CString | m_strWait

Detailed Description

Definition at line 30 of file multconv.h.

Constructor & Destructor Documentation

CTrackFile::CTrackFile ( CFrameWnd * pWnd )

Definition at line 28 of file multconv.cpp.

                                      : CFile()
{
  m_nLastPercent = -1;
  m_dwLength = 0;
  m_pFrameWnd = pWnd;
  VERIFY(m_strComplete.LoadString(IDS_COMPLETE));
  VERIFY(m_strWait.LoadString(IDS_PLEASE_WAIT));
  VERIFY(m_strSaving.LoadString(IDS_SAVING));
//  OutputPercent(0);
}

CTrackFile::~CTrackFile ( )

Definition at line 39 of file multconv.cpp.

{
  OutputPercent(100);
  if (m_pFrameWnd != NULL)
    m_pFrameWnd->SetMessageText(AFX_IDS_IDLEMESSAGE);
}

CTrackFile::CTrackFile ( CFrameWnd * pWnd )
CTrackFile::~CTrackFile ( )

Member Function Documentation

void CTrackFile::OutputPercent ( int nPercentComplete = 0 )

Definition at line 73 of file multconv.cpp.

{
  if (m_pFrameWnd != NULL && m_nLastPercent != nPercentComplete)
  {
    m_nLastPercent = nPercentComplete;
    TCHAR buf[64];
    int n = nPercentComplete;
    _stprintf_s(buf, 64, (n==100) ? m_strWait : m_strComplete, n);
    OutputString(buf);
  }
}

void CTrackFile::OutputPercent ( int nPercentComplete = 0 )
void CTrackFile::OutputString ( LPCTSTR lpsz )

Definition at line 62 of file multconv.cpp.

{
  if (m_pFrameWnd != NULL)
  {
    m_pFrameWnd->SetMessageText(lpsz);
    CWnd* pBarWnd = m_pFrameWnd->GetMessageBar();
    if (pBarWnd != NULL)
      pBarWnd->UpdateWindow();
  }
}

void CTrackFile::OutputString ( LPCTSTR lpsz )
virtual UINT CTrackFile::Read | ( | void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented in COEMFile, and COEMFile.

UINT CTrackFile::Read | ( | void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented in COEMFile, and COEMFile.

Definition at line 46 of file multconv.cpp.

{
  UINT n = CFile::Read(lpBuf, nCount);
  if (m_dwLength != 0)
    OutputPercent((int)((GetPosition()*100)/m_dwLength));
  return n;
}

void CTrackFile::Write | ( | const void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented in COEMFile, and COEMFile.

Definition at line 54 of file multconv.cpp.

{
  CFile::Write(lpBuf, nCount);
  OutputString(m_strSaving);
//  if (m_dwLength != 0)
//      OutputPercent((int)((GetPosition()*100)/m_dwLength));
}

virtual void CTrackFile::Write | ( | const void FAR * | lpBuf,
 |  | UINT | nCount |
 | ) |  |  | [virtual]

Reimplemented in COEMFile, and COEMFile.

Member Data Documentation

DWORD CTrackFile::m_dwLength

Definition at line 39 of file multconv.h.

ULONGLONG CTrackFile::m_dwLength

Definition at line 41 of file multconv.h.

int CTrackFile::m_nLastPercent

Definition at line 38 of file multconv.h.

CFrameWnd * CTrackFile::m_pFrameWnd

Definition at line 40 of file multconv.h.

CString CTrackFile::m_strComplete

Definition at line 41 of file multconv.h.

CString CTrackFile::m_strSaving

Definition at line 43 of file multconv.h.

CString CTrackFile::m_strWait

Definition at line 42 of file multconv.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/multconv.h
  • vc2008fp/WordPad/multconv.h
  • ole/wordpad/multconv.cpp
  • vc2008fp/WordPad/multconv.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTrayMenuApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTrayMenuApp Class Reference

#include "TrayMenu.h"

List of all members.

Public Member Functions

CTrayMenuApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 24 of file TrayMenu.h.

Constructor & Destructor Documentation

CTrayMenuApp::CTrayMenuApp ( )

Definition at line 31 of file TrayMenu.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CTrayMenuApp::InitInstance ( ) [virtual]

Definition at line 45 of file TrayMenu.cpp.

{
  AfxEnableControlContainer();

  InitContextMenuManager ();

  CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  CTrayMenuDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int) dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • vc2008fp/TrayMenu/TrayMenu.h
  • vc2008fp/TrayMenu/TrayMenu.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTrayMenuDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CTrayMenuDlg Class Reference

#include "TrayMenuDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_TRAYMENU_DIALOG }

Public Member Functions

CTrayMenuDlg (CWnd *pParent=NULL)
virtual | ~CTrayMenuDlg ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAppAbout ()
afx_msg void | OnAppExit ()
afx_msg void | OnAppOpen ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnItem1 ()
afx_msg void | OnItem2 ()
afx_msg void | OnItem3 ()
afx_msg void | OnItem4 ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)
void | OnTrayContextMenu ()
afx_msg LRESULT | OnTrayNotify (WPARAM wp, LPARAM lp)
afx_msg void | OnUpdateItem4 (CCmdUI *pCmdUI)

Protected Attributes

HICON | m_hIcon
NOTIFYICONDATA | m_nid

Detailed Description

Definition at line 18 of file TrayMenuDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 26 of file TrayMenuDlg.h.

{ IDD = IDD_TRAYMENU_DIALOG };

Constructor & Destructor Documentation

CTrayMenuDlg::CTrayMenuDlg ( CWnd * pParent = NULL )

Definition at line 26 of file TrayMenuDlg.cpp.

  : CDialog(CTrayMenuDlg::IDD, pParent)
{
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

  // Initialize NOTIFYICONDATA
  memset(&m_nid, 0 , sizeof(m_nid));
  m_nid.cbSize = sizeof(m_nid);
  m_nid.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
}

CTrayMenuDlg::~CTrayMenuDlg ( ) [virtual]

Definition at line 38 of file TrayMenuDlg.cpp.

{
  m_nid.hIcon = NULL;
  Shell_NotifyIcon (NIM_DELETE, &m_nid);
}

Member Function Documentation

void CTrayMenuDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 44 of file TrayMenuDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
}

void CTrayMenuDlg::OnAppAbout ( ) [protected]

Definition at line 193 of file TrayMenuDlg.cpp.

{
}

void CTrayMenuDlg::OnAppExit ( ) [protected]

Definition at line 197 of file TrayMenuDlg.cpp.

{
  PostMessage (WM_CLOSE);
}

void CTrayMenuDlg::OnAppOpen ( ) [protected]

Definition at line 202 of file TrayMenuDlg.cpp.

{
  ShowWindow (SW_SHOWNORMAL);
}

BOOL CTrayMenuDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 67 of file TrayMenuDlg.cpp.

{
  CDialog::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  if (pSysMenu != NULL)
  {
    BOOL bValidString;
    CString strAboutMenu;
    bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // Set tray notification window:
  m_nid.hWnd = GetSafeHwnd ();
  m_nid.uCallbackMessage = UM_TRAYNOTIFY;

  // Set tray icon and tooltip:
  m_nid.hIcon = m_hIcon;

  CString strToolTip = _T("MFCTrayDemo");
  _tcsncpy_s (m_nid.szTip, strToolTip, strToolTip.GetLength ());

  Shell_NotifyIcon (NIM_ADD, &m_nid);

  CMFCToolBar::AddToolBarForImageCollection (IDR_MENUIMAGES);

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CTrayMenuDlg::OnItem1 ( ) [protected]

Definition at line 207 of file TrayMenuDlg.cpp.

{
  ::MessageBox (NULL, _T("Item 1"), _T("TrayMenu"), MB_OK);
}

void CTrayMenuDlg::OnItem2 ( ) [protected]

Definition at line 212 of file TrayMenuDlg.cpp.

{
  ::MessageBox (NULL, _T("Item 2"), _T("TrayMenu"), MB_OK);
}

void CTrayMenuDlg::OnItem3 ( ) [protected]

Definition at line 217 of file TrayMenuDlg.cpp.

{
  ::MessageBox (NULL, _T("Item 3"), _T("TrayMenu"), MB_OK);
}

void CTrayMenuDlg::OnItem4 ( ) [protected]

Definition at line 224 of file TrayMenuDlg.cpp.

{
  bIsItem4Checked = !bIsItem4Checked;
}

void CTrayMenuDlg::OnPaint ( ) [protected]

Definition at line 127 of file TrayMenuDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CTrayMenuDlg::OnQueryDragIcon ( ) [protected]

Definition at line 154 of file TrayMenuDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CTrayMenuDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 112 of file TrayMenuDlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
  }
  else
  {
    CDialog::OnSysCommand(nID, lParam);
  }
}

void CTrayMenuDlg::OnTrayContextMenu ( ) [protected]

Definition at line 177 of file TrayMenuDlg.cpp.

{
  CPoint point;
  ::GetCursorPos (&point);

  CMenu menu;
  menu.LoadMenu (IDR_MENU1);

  CMFCPopupMenu::SetForceShadow (TRUE);

  HMENU hMenu = menu.GetSubMenu (0)->Detach ();
  CMFCPopupMenu* pMenu = theApp.GetContextMenuManager()->ShowPopupMenu(hMenu, point.x, point.y, this, TRUE);

  pMenu->SetForegroundWindow ();
}

LRESULT CTrayMenuDlg::OnTrayNotify | ( | WPARAM | wp,
 |  | LPARAM | lp |
 | ) |  |  | [protected]

Definition at line 159 of file TrayMenuDlg.cpp.

{
  UINT uiMsg = (UINT) lp;

  switch (uiMsg)
  {
  case WM_RBUTTONUP:
    OnTrayContextMenu ();
    return 1;

  case WM_LBUTTONDBLCLK:
    ShowWindow (SW_SHOWNORMAL);
    return 1;
  }

  return 0;
}

void CTrayMenuDlg::OnUpdateItem4 ( CCmdUI * pCmdUI ) [protected]

Definition at line 229 of file TrayMenuDlg.cpp.

{
  pCmdUI->SetCheck (bIsItem4Checked);
}

Member Data Documentation

HICON CTrayMenuDlg::m_hIcon [protected]

Definition at line 33 of file TrayMenuDlg.h.

NOTIFYICONDATA CTrayMenuDlg::m_nid [protected]

Definition at line 51 of file TrayMenuDlg.h.

The documentation for this class was generated from the following files:
  • vc2008fp/TrayMenu/TrayMenuDlg.h
  • vc2008fp/TrayMenu/TrayMenuDlg.cpp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTreeCtrlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTreeCtrlPage Class Reference

#include "treecpg.h"

List of all members.

Public Types

enum | { IDD = IDD_TREECTRL }

Public Member Functions

CTreeCtrlPage ()
~CTreeCtrlPage ()
afx_msg void | OnDisabledDragDrop ()
afx_msg void | OnEditLabels ()
afx_msg void | OnHasButtons ()
afx_msg void | OnHasLines ()
afx_msg void | OnLinesAtRoot ()
afx_msg void | OnShowSelAlways ()
afx_msg void | OnSingleExpand ()
afx_msg void | ShowNotification (LPNMHDR pnmhdr, LRESULT *pLResult)

Public Attributes

BOOL | m_bDisableDragDrop
BOOL | m_bEditLabels
BOOL | m_bHasButtons
BOOL | m_bHasLines
BOOL | m_bLinesAtRoot
BOOL | m_bShowSelAlways
BOOL | m_bSingleExpand
CString | m_cstrStatus
HTREEITEM | m_hitemDrag
HTREEITEM | m_hitemDrop
CMyTreeCtrl m_mytreectrl
CNotifyShowCase m_notifshowcase
HTREEITEM | m_rghItem [12]

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()

Detailed Description

Definition at line 21 of file treecpg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 32 of file treecpg.h.

{ IDD = IDD_TREECTRL };

Constructor & Destructor Documentation

CTreeCtrlPage::CTreeCtrlPage ( )

Definition at line 29 of file treecpg.cpp.

                             : CPropertyPage(CTreeCtrlPage::IDD)
{
  //{{AFX_DATA_INIT(CTreeCtrlPage)
  m_bDisableDragDrop = FALSE;
  m_bHasButtons = FALSE;
  m_bHasLines = FALSE;
  m_bLinesAtRoot = FALSE;
  m_bEditLabels = FALSE;
  m_bShowSelAlways = FALSE;
  m_cstrStatus = _T("");
  m_bSingleExpand = FALSE;
  //}}AFX_DATA_INIT
  m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
}

CTreeCtrlPage::~CTreeCtrlPage ( )

Definition at line 44 of file treecpg.cpp.

{
}

Member Function Documentation

void CTreeCtrlPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 48 of file treecpg.cpp.

{
  CPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CTreeCtrlPage)
  DDX_Control(pDX, IDC_TREESTATUS, m_notifshowcase);
  DDX_Control(pDX, IDC_TREEVIEW1, m_mytreectrl);
  DDX_Check(pDX, IDC_TVDISABLEDDRAGDROP, m_bDisableDragDrop);
  DDX_Check(pDX, IDC_TVHASBUTTONS, m_bHasButtons);
  DDX_Check(pDX, IDC_TVHASLINES, m_bHasLines);
  DDX_Check(pDX, IDC_TVLINESATROOT, m_bLinesAtRoot);
  DDX_Check(pDX, IDC_TVEDITLABELS, m_bEditLabels);
  DDX_Check(pDX, IDC_TVSHOWSELALWAYS, m_bShowSelAlways);
  DDX_Text(pDX, IDC_TREESTATUS, m_cstrStatus);
  DDX_Check(pDX, IDC_TVSSINGELEXPAND, m_bSingleExpand);
  //}}AFX_DATA_MAP
}

void CTreeCtrlPage::OnDisabledDragDrop ( )

Definition at line 168 of file treecpg.cpp.

{
  UpdateData(TRUE);
  m_mytreectrl.SetNewStyle(TVS_DISABLEDRAGDROP, m_bDisableDragDrop);
}

void CTreeCtrlPage::OnEditLabels ( )

Definition at line 144 of file treecpg.cpp.

{
  UpdateData(TRUE/*bSaveAndValidate*/);  // get information from the dialog
  m_mytreectrl.SetNewStyle(TVS_EDITLABELS, m_bEditLabels);
}

void CTreeCtrlPage::OnHasButtons ( )

Definition at line 150 of file treecpg.cpp.

{
  UpdateData(TRUE);
  m_mytreectrl.SetNewStyle(TVS_HASBUTTONS, m_bHasButtons);
}

void CTreeCtrlPage::OnHasLines ( )

Definition at line 156 of file treecpg.cpp.

{
  UpdateData(TRUE);
  m_mytreectrl.SetNewStyle(TVS_HASLINES, m_bHasLines);
}

BOOL CTreeCtrlPage::OnInitDialog ( ) [protected, virtual]

Definition at line 94 of file treecpg.cpp.

{
  CImageList          *pImageList;
  CBitmap             bitmap;
  CString             strItems[12];
  CCmnCtrl1App        *pApp;
  int                 iItem;
  UINT                nID;
  TV_INSERTSTRUCT     curTreeItem;

  strItems[0]= _T("Dogs");
  strItems[1]= _T("German Shepherd");
  strItems[2]= _T("Dalmatian");
  strItems[3]= _T("Great Dane");
  strItems[4]= _T("Birds");
  strItems[5]= _T("Hummingbird");
  strItems[6]= _T("Pigeon");
  strItems[7]= _T("Eagle");
  strItems[8]= _T("Fish");
  strItems[9]= _T("Snapper");
  strItems[10]= _T("Sole");
  strItems[11]= _T("Salmon");

  pApp = (CCmnCtrl1App *)AfxGetApp();
  CPropertyPage::OnInitDialog();  // let the base class do the default work
  pImageList = new CImageList();
  pImageList->Create(32, 16, ILC_MASK, 6, 4);

  for (nID = IDB_BMTREEFIRST; nID <= IDB_BMTREELAST; nID++)  // load bitmaps for dog, bird and fish
  {
    bitmap.LoadBitmap(nID);
    pImageList->Add(&bitmap, (COLORREF)0xFFFFFF);
    bitmap.DeleteObject();
  }

  m_mytreectrl.SetImageList(pImageList, TVSIL_NORMAL);
  for (iItem = 0; iItem < CELEMS(strItems); iItem ++)
  {
    curTreeItem.hParent = (iItem % 4 == 0)? NULL : m_rghItem[iItem / 4 * 4];
    curTreeItem.hInsertAfter = TVI_SORT;
    curTreeItem.item.iImage = iItem / 4 * 2;
    curTreeItem.item.iSelectedImage = curTreeItem.item.iImage + 1;
    curTreeItem.item.pszText = strItems[iItem].GetBuffer(strItems[iItem].GetLength());
    curTreeItem.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
    m_rghItem[iItem] = m_mytreectrl.InsertItem(&curTreeItem);
  }

  return FALSE;
}

void CTreeCtrlPage::OnLinesAtRoot ( )

Definition at line 162 of file treecpg.cpp.

{
  UpdateData(TRUE);
  m_mytreectrl.SetNewStyle(TVS_LINESATROOT, m_bLinesAtRoot);
}

void CTreeCtrlPage::OnShowSelAlways ( )

Definition at line 174 of file treecpg.cpp.

{
  UpdateData(TRUE);
  m_mytreectrl.SetNewStyle(TVS_SHOWSELALWAYS, m_bShowSelAlways);
}

void CTreeCtrlPage::OnSingleExpand ( )

Definition at line 185 of file treecpg.cpp.

{
  UpdateData(TRUE);
  m_mytreectrl.SetNewStyle(TVS_SINGLEEXPAND, m_bSingleExpand);
}

void CTreeCtrlPage::ShowNotification | ( | LPNMHDR | pnmhdr,
 |  | LRESULT * | pLResult
 | ) |  |

Definition at line 180 of file treecpg.cpp.

{
  ((CNotifyShowCase *)GetDlgItem(IDC_TREESTATUS))->ShowNotification(pnmhdr->code);
}

Member Data Documentation

BOOL CTreeCtrlPage::m_bDisableDragDrop

Definition at line 35 of file treecpg.h.

BOOL CTreeCtrlPage::m_bEditLabels

Definition at line 39 of file treecpg.h.

BOOL CTreeCtrlPage::m_bHasButtons

Definition at line 36 of file treecpg.h.

BOOL CTreeCtrlPage::m_bHasLines

Definition at line 37 of file treecpg.h.

BOOL CTreeCtrlPage::m_bLinesAtRoot

Definition at line 38 of file treecpg.h.

BOOL CTreeCtrlPage::m_bShowSelAlways

Definition at line 40 of file treecpg.h.

BOOL CTreeCtrlPage::m_bSingleExpand

Definition at line 42 of file treecpg.h.

CString CTreeCtrlPage::m_cstrStatus

Definition at line 41 of file treecpg.h.

HTREEITEM CTreeCtrlPage::m_hitemDrag

Definition at line 47 of file treecpg.h.

HTREEITEM CTreeCtrlPage::m_hitemDrop

Definition at line 48 of file treecpg.h.

CMyTreeCtrl CTreeCtrlPage::m_mytreectrl

Definition at line 34 of file treecpg.h.

CNotifyShowCase CTreeCtrlPage::m_notifshowcase

Definition at line 33 of file treecpg.h.

HTREEITEM CTreeCtrlPage::m_rghItem[12]

Definition at line 46 of file treecpg.h.

The documentation for this class was generated from the following files:
  • general/CmnCtrl1/treecpg.h
  • general/CmnCtrl1/treecpg.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTreeItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes

CTreeItem Class Reference

#include "tree.h"

List of all members.

Public Types

enum ITEM_TYPE {
typeUnknown, typeUnknown2, typeTypeLib, typeTypeLib2,
typeTypeInfo, typeTypeInfo2, typeMethods, typeMethods2,
typeProperties, typeProperties2, typeConstants, typeConstants2,
typeImplTypes, typeImplTypes2, typeMethod, typeProperty,
typeConstant, typeEnum, typeRecord, typeModule,
typeInterface, typeDispinterface, typeCoClass, typeAlias,
typeUnion, typeEnums, typeRecords, typeModules,
typeInterfaces, typeDispinterfaces, typeCoClasses, typeAliases,
typeUnions
}

Public Member Functions

CTreeItem (CTreeCtrl *pTree=NULL)
virtual | ~CTreeItem ()
virtual BOOL | Expand (HTREEITEM hitem)
virtual BOOL | ExpandFuncs (HTREEITEM hitem)
virtual BOOL | ExpandImplTypes (HTREEITEM hitem)
virtual BOOL | ExpandTypeInfo (HTREEITEM hitem)
virtual BOOL | ExpandTypeLib (HTREEITEM hitem)
virtual BOOL | ExpandVars (HTREEITEM hitem)
void | GetName (CString &szReturn, BOOL fIDLStyle=FALSE)
virtual ITypeInfo * | GetTypeInfo ()
TYPEKIND | GetTypeKind ()
virtual ITypeLib * | GetTypeLib ()
virtual void | SetTypeInfo (ITypeInfo *punk)
virtual void | SetTypeLib (ITypeLib *punk)
CString | TYPEDESCtoString (TYPEDESC *lptdesc)
ITEM_TYPE | TypeKindToItemType (TYPEKIND tkind)

Public Attributes

CTreeCtrl * | m_pTree
IUnknown * | m_punk
ITEM_TYPE m_Type
MEMBERID | m_uiMemid

Detailed Description

Definition at line 16 of file tree.h.

Member Enumeration Documentation

enum CTreeItem::ITEM_TYPE
Enumerator:
typeUnknown
typeUnknown2
typeTypeLib
typeTypeLib2
typeTypeInfo
typeTypeInfo2
typeMethods
typeMethods2
typeProperties
typeProperties2
typeConstants
typeConstants2
typeImplTypes
typeImplTypes2
typeMethod
typeProperty
typeConstant
typeEnum
typeRecord
typeModule
typeInterface
typeDispinterface
typeCoClass
typeAlias
typeUnion
typeEnums
typeRecords
typeModules
typeInterfaces
typeDispinterfaces
typeCoClasses
typeAliases
typeUnions

Definition at line 30 of file tree.h.

               {
    typeUnknown         ,
    typeUnknown2        ,
    typeTypeLib         ,
    typeTypeLib2        ,
    typeTypeInfo        ,
    typeTypeInfo2       ,
    typeMethods         ,
    typeMethods2        ,
    typeProperties      ,
    typeProperties2     ,
    typeConstants       ,
    typeConstants2      ,
    typeImplTypes       ,
    typeImplTypes2      ,
    typeMethod          ,
    typeProperty        ,
    typeConstant        ,
    typeEnum            ,       // TKIND_ENUM
    typeRecord          ,       // TKIND_RECORD
    typeModule          ,       // TKIND_MODULE
    typeInterface       ,       // TKIND_INTERFACE
    typeDispinterface   ,       // TKIND_DISPATCH
    typeCoClass         ,       // TKIND_COCLASS
    typeAlias           ,       // TKIND_ALIAS
    typeUnion           ,       // TKIND_UNION
    typeEnums           ,
    typeRecords         ,
    typeModules         ,
    typeInterfaces      ,
    typeDispinterfaces  ,
    typeCoClasses       ,
    typeAliases         ,
    typeUnions          ,
  } ITEM_TYPE ;

Constructor & Destructor Documentation

CTreeItem::CTreeItem ( CTreeCtrl * pTree = NULL )

Definition at line 20 of file tree.cpp.

{
  ASSERT(pTree) ;
  m_pTree = pTree ;
  m_punk = NULL ;
  m_Type = typeUnknown ;
  m_uiMemid = 0 ;
}

CTreeItem::~CTreeItem ( ) [virtual]

Definition at line 29 of file tree.cpp.

{
  if (m_punk )
    m_punk->Release()  ;
}

Member Function Documentation

BOOL CTreeItem::Expand ( HTREEITEM hitem ) [virtual]

Definition at line 35 of file tree.cpp.

{
  BOOL fExpand = FALSE ;

  switch(m_Type)
  {
  case typeUnknown:
  case typeUnknown2:
  break ;

  case typeTypeLib:
    fExpand = ExpandTypeLib( hitem );
  break ;

  case typeTypeLib2:
  {
    // CTypeLibWnd::m_fGroupByType == TRUE
    CTreeItem* pItem ;

    TV_INSERTSTRUCT tvis ;
    tvis.hParent = hitem ;
    tvis.hInsertAfter = TVI_LAST ;
    tvis.item.mask = TVIF_TEXT | TVIF_CHILDREN | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
    tvis.item.iImage = CTreeItem::typeUnknown ;
    tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
    tvis.item.cChildren = 1 ;

    #pragma warning (suppress: 6211) // Not Leaking. pItem is inserted into m_pTree
    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeEnums ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("Enums") ;
    m_pTree->InsertItem(&tvis) ;

    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeRecords ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("Structs") ;
    m_pTree->InsertItem(&tvis) ;

    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeModules ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("Modules") ;
    m_pTree->InsertItem(&tvis) ;

    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeInterfaces ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("Interfaces") ;
    m_pTree->InsertItem(&tvis) ;

    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeDispinterfaces ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("Dispinterfaces") ;
    m_pTree->InsertItem(&tvis) ;

    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeCoClasses ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("CoClasses") ;
    m_pTree->InsertItem(&tvis) ;

    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeAliases ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("Typedefs") ;
    m_pTree->InsertItem(&tvis) ;

    pItem = new CTreeItem(m_pTree) ;
    pItem->SetTypeLib( GetTypeLib() ) ;
    GetTypeLib()->AddRef() ;
    pItem->m_Type = CTreeItem::typeUnions ;
    tvis.item.lParam = (LPARAM)pItem ;
    tvis.item.pszText = _T("Unions") ;
    m_pTree->InsertItem(&tvis) ;

    fExpand = TRUE ;
  }
  break ;

  case typeEnums:
  case typeRecords:
  case typeModules:
  case typeInterfaces:
  case typeDispinterfaces:
  case typeCoClasses:
  case typeAliases:
  case typeUnions:
    fExpand = ExpandTypeLib( hitem ) ;
  break ;

  case typeTypeInfo:
  case typeTypeInfo2:
  case typeEnum:
  case typeRecord:
  case typeModule:
  case typeInterface:
  case typeDispinterface:
  case typeCoClass:
  case typeAlias:
  case typeUnion:
    fExpand = ExpandTypeInfo( hitem ) ;
  break ;

  case typeMethods:
  case typeMethods2:
    fExpand = ExpandFuncs( hitem ) ;
  break ;

  case typeProperties:
  case typeProperties2:
  case typeConstants:
  case typeConstants2:
    fExpand = ExpandVars( hitem ) ;
  break ;

  case typeImplTypes:
  case typeImplTypes2:
    fExpand = ExpandImplTypes( hitem ) ;
  break ;

  case typeMethod:
  case typeProperty:
  case typeConstant:
  default:
  break ;
  }

  return fExpand ;
}

BOOL CTreeItem::ExpandFuncs ( HTREEITEM hitem ) [virtual]

Definition at line 501 of file tree.cpp.

{
  ASSERT(hitem) ;

  CTreeItem*  pNewItem = NULL ;
  HRESULT         hr = S_OK ;
  TV_INSERTSTRUCT tvis ;
  CString         strError ;
  TYPEATTR*       pattr = NULL ;
  ITypeInfo*      pti = GetTypeInfo() ;
  ASSERT(pti) ;
  FUNCDESC*       pfuncdesc = NULL ;
  BSTR            bstrParams = NULL ;
  BOOL            fExpand = FALSE ;

  tvis.hParent = hitem  ;
  tvis.hInsertAfter = TVI_LAST ;
  tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;

  TRY
  {
    ENSURE(pti);
    hr = pti->GetTypeAttr(&pattr) ;
    if FAILED(hr)
    {
      strError.Format(_T("ITypeInfo::GetTypeAttr() failed: %x"), hr);
      AfxThrowMemoryException() ;
    }

    BSTR  rgbstrNames[MAX_NAMES] ;
    int   cNames ;

    //
    // Enumerate through all FUNCDESCS
    for ( int iIndex = 0 ; iIndex < pattr->cFuncs ; iIndex++)
    {
      hr = pti->GetFuncDesc( iIndex, &pfuncdesc ) ;
      if (FAILED(hr))
      {
        strError.Format(_T("GetVarDesc failed for function #%u"), iIndex) ;
        AfxThrowMemoryException() ;
      }

      //int cParams = pfuncdesc->cParams ;
      //int cParamsOpt = abs(pfuncdesc->cParamsOpt) ;

      // Get the names of the function and it's parameters into rgbstrNames.
      // cNames gets the number of parameters + 1.
      //
      hr = pti->GetNames( pfuncdesc->memid, rgbstrNames, 1, (UINT*)&cNames) ; //MAX_NAMES, (UINT FAR*)&cNames );
      if (FAILED(hr))
      {
        strError.Format(_T("GetNames failed for function #%u"), iIndex) ;
        AfxThrowMemoryException() ;
      }

      // rgbstrNames[0] is the name of the function
      if (cNames > 0)
      {
        #pragma warning (suppress: 6014)
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        pNewItem->m_Type = typeMethod ;
        pNewItem->m_uiMemid = iIndex ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.iImage = typeMethod ;
        tvis.item.iSelectedImage = tvis.item.iImage ;
        tvis.item.cChildren = 0 ;
        COLE2T lpszText(rgbstrNames[0]);
        tvis.item.pszText = lpszText;
        m_pTree->InsertItem( &tvis ) ;
        SysFreeString( rgbstrNames[0] ) ;
      }

      SysFreeString( bstrParams ) ;

      pti->ReleaseFuncDesc( pfuncdesc ) ;
      fExpand = TRUE ;
    }
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    ErrorMessage( strError, hr ) ;
    if (pNewItem)
      delete pNewItem ;

    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    if (pfuncdesc)
      pti->ReleaseFuncDesc( pfuncdesc ) ;

    if (bstrParams)
      SysFreeString(bstrParams) ;

    return FALSE ;
  }
  END_CATCH
  return fExpand ;
}

BOOL CTreeItem::ExpandImplTypes ( HTREEITEM hitem ) [virtual]

Definition at line 838 of file tree.cpp.

{
  ASSERT(hitem) ;

  BOOL fExpand = FALSE ;
  CTreeItem*  pNewItem = NULL ;
  HRESULT         hr = S_OK ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  TV_INSERTSTRUCT tvis ;
  CString         strError ;
  TYPEATTR*       pattr = NULL ;
  ITypeInfo*      pti = GetTypeInfo() ;

  tvis.hParent = hitem  ;
  tvis.hInsertAfter = TVI_LAST ;
  tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
  tvis.item.cChildren = 1 ;
  TRY
  {
    hr = pti->GetTypeAttr(&pattr) ;
    if FAILED(hr)
    {
      //#pragma warning (suppress: 6014)
      strError.Format(_T("ITypeInfo::GetTypeAttr() failed (0x%x)"), hr ) ;
      AfxThrowMemoryException() ;
    }

    for (UINT n = 0 ; n <  pattr->cImplTypes; n++)
    {
      #pragma warning (suppress: 6014)
      pNewItem = new CTreeItem( m_pTree ) ;
      pNewItem->m_uiMemid = n ;
      ASSERT(pNewItem) ;

      tvis.item.lParam = (LPARAM)pNewItem ;
      HREFTYPE href = NULL ;
      hr = pti->GetRefTypeOfImplType(n, &href) ;
      if (FAILED(hr))
      {
        strError.Format(_T("Could not get RefTypeOfImplType #%u"), n ) ;
        AfxThrowMemoryException() ;
      }
      hr = pti->GetRefTypeInfo( href, (ITypeInfo**)&pNewItem->m_punk ) ;
      if (FAILED(hr))
      {
        strError.Format(_T("Could not get RefTypeInfo") ) ;
        AfxThrowMemoryException() ;
      }

      ASSERT(pNewItem->m_punk) ;

      TYPEATTR* pattrNew ;
      hr = pNewItem->GetTypeInfo()->GetTypeAttr(&pattrNew) ;
      if FAILED(hr)
      {
        strError.Format(_T("ITypeInfo::GetTypeAttr() failed") ) ;
        AfxThrowMemoryException() ;
      }
      pNewItem->m_Type = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
      tvis.item.iImage = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
      tvis.item.iSelectedImage = tvis.item.iImage ;
      pNewItem->GetTypeInfo()->ReleaseTypeAttr( pattrNew ) ;

      hr = pNewItem->GetTypeInfo()->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
      if (FAILED(hr))
      {
        strError.Format(_T("ITypeInfo::GetDocumentation() failed")) ;
        AfxThrowMemoryException() ;
      }
      COLE2T lpszName(bstrName);
      tvis.item.pszText = lpszName  ;
      m_pTree->InsertItem( &tvis ) ;

      SysFreeString( bstrName ) ;
      bstrName = NULL ;
      SysFreeString( bstrDoc ) ;
      bstrDoc = NULL ;
      SysFreeString( bstrHelp ) ;
      bstrHelp = NULL ;

      fExpand = TRUE ;
    }
  }
  CATCH(CException, pException)
  {
    ErrorMessage( strError, hr ) ;
    if (pNewItem)
      delete pNewItem ;
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    return FALSE ;
  }
  END_CATCH

  if (pti && pattr)
    pti->ReleaseTypeAttr( pattr );
  return fExpand ;
}

BOOL CTreeItem::ExpandTypeInfo ( HTREEITEM hitem ) [virtual]

Definition at line 260 of file tree.cpp.

{
  ASSERT(m_pTree) ;
  ASSERT(hitem) ;

  CTreeItem*  pNewItem = NULL ;
  HRESULT         hr = S_OK ;
  TV_INSERTSTRUCT tvis ;
  CString         strError = "Enumerating TypeInfo" ;
  TYPEATTR*       pattr = NULL ;
  ITypeInfo*      pti = GetTypeInfo() ;
  ASSERT(pti) ;
  BOOL            fExpand = FALSE ;

  tvis.hParent = hitem  ;
  tvis.hInsertAfter = TVI_LAST ;
  tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
  tvis.item.iImage = typeUnknown ;
  tvis.item.iSelectedImage = tvis.item.iImage + 1 ;

  TRY
  {
    ENSURE(pti);
    hr = pti->GetTypeAttr(&pattr) ;
    if FAILED(hr)
    {
      strError.Format(_T("ITypeInfo::GetTypeAttr() failed"), hr ) ;
      AfxThrowMemoryException() ;
    }

    switch(pattr->typekind)
    {
    // typedef [attributes] enum [tag] {
    //      enumlist
    // } enumname;
    //
    // "typedef enum enumname"
    case TKIND_ENUM:
      fExpand = ExpandVars( hitem ) ;
    break ;

    // typedef [attributes]
    //  struct [tag] {
    //      memberlist
    //  } structname;
    //
    // "typedef struct structname"
    case TKIND_RECORD:
      fExpand = ExpandVars( hitem ) ;
    break ;

    // [attributes]
    //  module modulename {
    //      elementlist
    // };
    case TKIND_MODULE:
      if (pattr->cVars)
      {
        // Add "Constants" folder
        //
        #pragma warning (suppress: 6211)
        #pragma warning (suppress: 6014)
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->m_Type = typeProperties ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        tvis.item.cChildren = pattr->cVars ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.pszText = _T("Constants") ;
        tvis.item.iImage = typeConstants ;
        tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
        m_pTree->InsertItem( &tvis ) ;
        fExpand = TRUE ;
      }
      if (pattr->cFuncs)
      {
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->m_Type = typeMethods ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        tvis.item.cChildren = pattr->cFuncs ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.pszText = _T("Functions") ;
        tvis.item.iImage = typeMethods ;
        tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
        m_pTree->InsertItem( &tvis ) ;
        fExpand = TRUE ;
      }
    break ;

    // [attributes]
    //  interface interfacename  [:baseinterface] {
    //      functionlist
    // };
    case TKIND_INTERFACE:
      fExpand = ExpandFuncs( hitem) ;
      if (pattr->cImplTypes)
      {
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->m_Type = typeImplTypes ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        tvis.item.pszText = _T("Inherited Interfaces") ;
        tvis.item.iImage = typeInterface ;
        tvis.item.cChildren = pattr->cImplTypes ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.iSelectedImage = tvis.item.iImage ;
        m_pTree->InsertItem( &tvis ) ;
        fExpand = TRUE ;
      }
    break ;

    // [attributes]
    //  dispinterface intfname {
    //      interface interfacename
    // };
    case TKIND_DISPATCH :
      if (pattr->cVars)
      {
        // Add "Constants" folder
        //
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->m_Type = typeConstants ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        tvis.item.cChildren = pattr->cVars ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.pszText = _T("Constants") ;
        tvis.item.iImage = typeConstants ;
        tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
        m_pTree->InsertItem( &tvis ) ;

        // Add "Properties" folder
        //
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->m_Type = typeProperties ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        tvis.item.cChildren = pattr->cVars ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.pszText = _T("Properties") ;
        tvis.item.iImage = typeProperties ;
        tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
        m_pTree->InsertItem( &tvis ) ;
        fExpand = TRUE ;
       }
      if (pattr->cFuncs)
      {
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->m_Type = typeMethods ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        tvis.item.cChildren = pattr->cFuncs ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.pszText = _T("Methods") ;
        tvis.item.iImage = typeMethods ;
        tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
        m_pTree->InsertItem( &tvis ) ;
        fExpand = TRUE ;
      }
      if (pattr->cImplTypes)
      {
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->m_Type = typeImplTypes ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        tvis.item.pszText = _T("Inherited Interfaces") ;
        tvis.item.iImage = typeInterface ;
        tvis.item.cChildren = pattr->cImplTypes ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.iSelectedImage = tvis.item.iImage ;
        m_pTree->InsertItem( &tvis ) ;
        fExpand = TRUE ;
      }
    break ;

    // [attributes]
    //  coclass classname {
    //      [attributes2] [interface | dispinterface] interfacename;
    //      ...
    // };
    case TKIND_COCLASS:
      fExpand = ExpandImplTypes( hitem ) ;
    break ;

    // typedef [attributes] basetype aliasname;
    case TKIND_ALIAS:
      if (pattr->tdescAlias.vt == VT_USERDEFINED)
      {
        ITypeInfo* ptiRefType = NULL ;

        #pragma warning (suppress: 6246)
        HRESULT hr = pti->GetRefTypeInfo( pattr->tdescAlias.hreftype, &ptiRefType ) ;
        if (FAILED(hr))
          AfxThrowOleException( hr ) ;

        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->SetTypeInfo( ptiRefType ) ;
        pNewItem->m_Type = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
        tvis.item.iImage = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
        tvis.item.cChildren = 1 ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.iSelectedImage = tvis.item.iImage ;
        CString sName;
        pNewItem->GetName(sName, TRUE );
        tvis.item.pszText = sName.GetBuffer(0) ;
        m_pTree->InsertItem( &tvis ) ;
        sName.ReleaseBuffer();
        fExpand = TRUE ;
      }
    break ;

    // typedef [attributes] union [tag] {
    //      memberlist
    // } unionname;
    case TKIND_UNION:
      fExpand = ExpandVars( hitem ) ;
    break ;

    default:
    break ;
    }

    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    ErrorMessage( strError, hr ) ;
    if (pNewItem)
      delete pNewItem ;

    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    return FALSE ;
  }
  END_CATCH
  return fExpand ;
}

BOOL CTreeItem::ExpandTypeLib ( HTREEITEM hitem ) [virtual]

Definition at line 182 of file tree.cpp.

{
  ASSERT(hitem) ;
  CTreeItem*  pNewItem = NULL ;

  UINT            uiTypeInfoCount = GetTypeLib()->GetTypeInfoCount() ;
  HRESULT         hr = S_OK ;
  TV_INSERTSTRUCT tvis ;
  CString         strError = "Enumerating typeinfos";
  TYPEATTR*       pattr = NULL ;
  BOOL            fExpand = FALSE ;

  tvis.hParent = hitem  ;
  tvis.hInsertAfter = TVI_LAST ;
  tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
  tvis.item.cChildren = 1 ;
  TRY
  {
    for (UINT n = 0 ; n < uiTypeInfoCount ; n++)
    {
      #pragma warning (suppress: 6014)
      pNewItem = new CTreeItem( m_pTree ) ;
      pNewItem->m_Type = typeTypeInfo ;
      ASSERT(pNewItem) ;

      tvis.item.lParam = (LPARAM)pNewItem ;
      hr = GetTypeLib()->GetTypeInfo( n, (ITypeInfo**)&pNewItem->m_punk ) ;
      if (FAILED(hr))
      {
        strError.Format(_T("Could not get TypeInfo #%u"), n ) ;
        AfxThrowOleException(hr) ;
      }
      ASSERT(pNewItem->m_punk) ;

      hr = pNewItem->GetTypeInfo()->GetTypeAttr(&pattr) ;
      if FAILED(hr)
      {
        strError.Format(_T("ITypeInfo::GetTypeAttr() failed") ) ;
        AfxThrowOleException(hr) ;
      }

      if ((m_Type == typeTypeLib) ||
        (m_Type == (TypeKindToItemType(pattr->typekind) + 8)))
      {
        tvis.item.iImage = pattr->typekind + typeEnum ;
        tvis.item.iSelectedImage = tvis.item.iImage ;
        CString sName;
        pNewItem->GetName(sName, TRUE );
        tvis.item.pszText = sName.GetBuffer(0);
        m_pTree->InsertItem( &tvis ) ;
        sName.ReleaseBuffer();
        pNewItem->GetTypeInfo()->ReleaseTypeAttr( pattr ) ;
        fExpand = TRUE ;
      }
      else
      {
        pNewItem->GetTypeInfo()->ReleaseTypeAttr( pattr ) ;
        delete pNewItem ;
      }
     }
  }
  CATCH(CException, pException)
  {
    if (pException->IsKindOf(RUNTIME_CLASS(COleException)))
      ErrorMessage( strError, ((COleException*)pException)->m_sc ) ;
    else
      ErrorMessage( strError, hr ) ;

    if (pNewItem)
      delete pNewItem ;
    return FALSE ;
  }
  END_CATCH

  return fExpand ;
}

BOOL CTreeItem::ExpandVars ( HTREEITEM hitem ) [virtual]

Definition at line 605 of file tree.cpp.

{
  ASSERT(hitem) ;
  CTreeItem*  pNewItem = NULL ;
  HRESULT         hr = S_OK ;
  TV_INSERTSTRUCT tvis ;
  CString         strError ;
  TYPEATTR*       pattr = NULL ;
  ITypeInfo*      pti = GetTypeInfo() ;
  ASSERT(pti) ;
  LPVARDESC pvardesc = NULL ;
  BSTR            rgbstrNames[MAX_NAMES] ;
  int             cNames ;
  BOOL            fProperties = FALSE ;
  BOOL            fExpand = FALSE ;
  tvis.hParent = hitem  ;
  tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
  tvis.item.cChildren = 0 ;

  TRY
  {
    ENSURE(pti);
    hr = pti->GetTypeAttr(&pattr) ;
    if FAILED(hr)
    {
      strError.Format(_T("ITypeInfo::GetTypeAttr() failed"), hr ) ;
      AfxThrowMemoryException() ;
    }

    // if it's a struct or an enum, order is important
    //
    if (pattr->typekind == TKIND_RECORD || pattr->typekind == TKIND_ENUM || pattr->typekind == TKIND_UNION)
      tvis.hInsertAfter = TVI_LAST ;
    else
    {
      tvis.hInsertAfter = TVI_LAST ;

      // are we doing constants or properties?
      TV_ITEM tvi ;
      TCHAR szBuf[80] ;
      tvi.hItem = hitem ;
      tvi.mask = TVIF_TEXT ;
      tvi.cchTextMax = 80 ;
      tvi.pszText = szBuf ;
      m_pTree->GetItem(&tvi) ;
      #pragma warning(suppress: 6054) // tvi.pszText will always be null terminated.
      if (_stricmp(tvi.pszText, _T("Properties")) == 0)
        fProperties = TRUE ;
    }

    for (int iIndex = 0 ; iIndex < pattr->cVars ; iIndex++)
    {
      hr = pti->GetVarDesc( iIndex, &pvardesc ) ;
      if (FAILED(hr))
      {
        strError.Format(_T("GetVarDesc failed for variable #%u"), iIndex) ;
        AfxThrowMemoryException() ;
      }
      hr = pti->GetNames( pvardesc->memid, rgbstrNames, 1, (UINT FAR*)&cNames );
      if (FAILED(hr))
      {
        strError.Format(_T("GetNames failed for variable #%u"), iIndex) ;
        AfxThrowMemoryException() ;
      }
      if (pvardesc->varkind == VAR_CONST && fProperties == FALSE)
      {
//        #pragma warning (suppress: 6263)
        CString str = TYPEDESCtoString( &pvardesc->elemdescVar.tdesc ) ;

        VARIANT varValue ;
        VariantInit( &varValue ) ;
        if (FAILED(hr = VariantChangeType( &varValue, pvardesc->lpvarValue, 0, VT_BSTR )))
        {
          if (pvardesc->lpvarValue->vt == VT_ERROR || pvardesc->lpvarValue->vt == VT_HRESULT)
          {
            varValue.vt = VT_BSTR ;
            varValue.bstrVal = SysAllocString(CT2OLE(_GetScodeString(pvardesc->lpvarValue->scode))) ;
            hr = S_OK ;
          }
          else
            AfxThrowOleException( hr ) ;
        }

        // const type name = expression
        UINT len = SysStringLen( varValue.bstrVal ) ;
        COLE2T lpszSource(varValue.bstrVal);
        TCHAR* pstrExpand = new TCHAR[(len+1) * sizeof(TCHAR) * 2] ;
        LPTSTR lpD, lpS = lpszSource ;
        lpD = pstrExpand;
        for (UINT n = 0 ; n < len ; n++)
        {
          #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
          if (!isprint(*lpS) || (*lpS) == '\"' || (*lpS) == '\\')
          {
            // \"  \\ \a  \b  \f  \n  \r  \t  \v
            *lpD++ = '\\' ;
            switch(*lpS)
            {
            case '\"':
              *lpD++ = '\"' ;
            break ;
            case '\\':
              *lpD++ = '\\' ;
            break ;
            case '\a':
              *lpD++ = 'a' ;
            break ;
            case '\b':
              *lpD++ = 'b' ;
            break ;
            case '\f':
              *lpD++ = 'f' ;
            break ;
            case '\n':
              *lpD++ = 'n' ;
            break ;
            case '\r':
              *lpD++ = 'r' ;
            break ;
            case '\t':
              *lpD++ = 't' ;
            break ;
            case '\v':
              *lpD++ = 'v' ;
            break ;
            case '\0':
              *lpD++ = '0' ;
            break ;
            default:
              lpD += _stprintf_s( lpD, (len+1) * sizeof(TCHAR) * 2, _T("x%02X"), (UINT)*lpS );
            break ;
            }
            lpS++;
          }
          else
            *lpD++ = *lpS++;
        }
        *lpD = '\0';

        if (pvardesc->lpvarValue->vt == VT_BSTR)
          strError.Format(_T("const %s %s = \"%s\""), (LPCTSTR)str, COLE2CT(rgbstrNames[0]), pstrExpand) ;
        else
          strError.Format(_T("const %s %s = %s"), (LPCTSTR)str, COLE2CT(rgbstrNames[0]), pstrExpand);
        //#pragma warning (suppress: 6211)
        delete []pstrExpand ;
        VariantClear( &varValue ) ;
        tvis.item.iImage = typeConstant ;
        tvis.item.iSelectedImage = tvis.item.iImage ;
        #pragma warning (suppress: 6211)
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        pNewItem->m_Type = typeConstant ;
        pNewItem->m_uiMemid = iIndex ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.pszText = strError.GetBuffer(0) ;
        m_pTree->InsertItem( &tvis ) ;
        strError.ReleaseBuffer(-1) ;
        fExpand = TRUE ;
      }
      else if (fProperties == TRUE ||
          (pattr->typekind == TKIND_RECORD ||
           pattr->typekind == TKIND_UNION  ))
      {
        CString str ;
        static TCHAR szNameless[] = _T("(nameless)");
        if ((pvardesc->elemdescVar.tdesc.vt & 0x0FFF) == VT_CARRAY)
        {
          // type name[n]
          strError.Format(_T("%s "), TYPEDESCtoString( &pvardesc->elemdescVar.tdesc.lpadesc->tdescElem) );
          if (rgbstrNames[0])
          {
            COLE2CT tName (rgbstrNames[0]);
            strError += tName;
          }
          else
            strError += szNameless;
          // Allocate cDims * lstrlen("[123456]")
          for (USHORT n = 0 ; n < pvardesc->elemdescVar.tdesc.lpadesc->cDims ; n++)
          {
            str.Format( _T("[%d]"), pvardesc->elemdescVar.tdesc.lpadesc->rgbounds[n].cElements ) ;
            strError += str ;
          }
        }
        else
        {
          // type name
          strError.Format(_T("%s "),strError = TYPEDESCtoString( &pvardesc->elemdescVar.tdesc ));
          if (rgbstrNames[0]) {
            COLE2CT tName (rgbstrNames[0]);
            strError += tName;
          }
          else
            strError += szNameless;
        }
        tvis.item.iImage = typeProperty ;
        tvis.item.iSelectedImage = tvis.item.iImage ;
        pNewItem = new CTreeItem(m_pTree) ;
        pNewItem->SetTypeInfo(pti) ;
        pti->AddRef() ;
        pNewItem->m_Type = typeProperty ;
        pNewItem->m_uiMemid = iIndex ;
        tvis.item.lParam = (LPARAM)pNewItem ;
        tvis.item.pszText = strError.GetBuffer(0) ;
        m_pTree->InsertItem( &tvis ) ;
        strError.ReleaseBuffer(-1) ;
        fExpand = TRUE ;
      }
      SysFreeString( rgbstrNames[0] ) ;
      pti->ReleaseVarDesc( pvardesc ) ;
    }

    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    ErrorMessage( strError, hr ) ;
    if (pNewItem)
      delete pNewItem ;

    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    if (pvardesc)
      pti->ReleaseVarDesc( pvardesc ) ;

    return FALSE ;
  }
  END_CATCH
  return fExpand ;
}

void CTreeItem::GetName | ( | CString & | szReturn,
 |  | BOOL | fIDLStyle = FALSE
 | ) |  |

Definition at line 950 of file tree.cpp.

{
  BSTR    bstrName = NULL ;
  BSTR    bstrDoc = NULL ;
  BSTR    bstrHelp = NULL ;
  DWORD   dwHelpID ;
  HRESULT hr ;

  TRY
  {
    hr = GetTypeInfo()->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
    if (FAILED(hr))
      AfxThrowOleException( hr ) ;

    SysFreeString( bstrDoc ) ;
    bstrDoc = NULL ;
    SysFreeString( bstrHelp ) ;
    bstrHelp = NULL ;
    LPCTSTR lpszName = COLE2CT(bstrName);
    ::SysFreeString(bstrName);
    bstrName = NULL;
    if (fIDLStyle)
    {
      TYPEATTR* pattr ;
      hr = GetTypeInfo()->GetTypeAttr(&pattr) ;
      if FAILED(hr)
        AfxThrowOleException(hr) ;

      switch(pattr->typekind)
      {
      // typedef [attributes] enum [tag] {
      //      enumlist
      // } enumname;
      //
      // "typedef enum enumname"
      case TKIND_ENUM:
        szReturn.Format(_T("typedef enum %s"), lpszName ) ;
      break ;

      // typedef [attributes]
      //  struct [tag] {
      //      memberlist
      //  } structname;
      //
      // "typedef struct structname"
      case TKIND_RECORD:
        szReturn.Format(_T("typedef struct %s"), lpszName ) ;
      break ;

      // [attributes]
      //  module modulename {
      //      elementlist
      // };
      case TKIND_MODULE:
        szReturn.Format(_T("module %s"), lpszName ) ;
      break ;

      // [attributes]
      //  interface interfacename  [:baseinterface] {
      //      functionlist
      // };
      case TKIND_INTERFACE:
        // TODO:  enum base interfaces and append
        szReturn.Format(_T("interface %s"), lpszName ) ;
      break ;

      // [attributes]
      //  dispinterface intfname {
      //      interface interfacename
      // };
      case TKIND_DISPATCH :
        szReturn.Format(_T("dispinterface %s"), lpszName ) ;
      break ;

      // [attributes]
      //  coclass classname {
      //      [attributes2] [interface | dispinterface] interfacename;
      //      ...
      // };
      case TKIND_COCLASS:
        szReturn.Format(_T("coclass %s"), lpszName ) ;
      break ;

      // typedef [attributes] basetype aliasname;
      case TKIND_ALIAS:
        szReturn.Format(_T("typedef %s %s"),
          ::TYPEDESCtoString(GetTypeInfo(), &pattr->tdescAlias), lpszName);
      break ;

      // typedef [attributes] union [tag] {
      //      memberlist
      // } unionname;
      case TKIND_UNION:
        szReturn.Format(_T("typedef union %s"), lpszName ) ;
      break ;

      default:
      break ;
      }
      GetTypeInfo()->ReleaseTypeAttr( pattr ) ;
    }
  }
  CATCH(CException, pException)
  {
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    THROW_LAST();
  }
  END_CATCH

}

virtual ITypeInfo* CTreeItem::GetTypeInfo ( ) [inline, virtual]

Definition at line 81 of file tree.h.

    {return (ITypeInfo*)m_punk;}

TYPEKIND CTreeItem::GetTypeKind ( )

Definition at line 1066 of file tree.cpp.

{
  TYPEATTR* pattr ;
  TYPEKIND kind ;

  HRESULT hr = GetTypeInfo()->GetTypeAttr(&pattr) ;
  if FAILED(hr)
    AfxThrowOleException(hr) ;
  kind = pattr->typekind ;
  GetTypeInfo()->ReleaseTypeAttr(pattr) ;

  return kind ;
}

virtual ITypeLib* CTreeItem::GetTypeLib ( ) [inline, virtual]

Definition at line 76 of file tree.h.

    {return (ITypeLib*)m_punk;}

virtual void CTreeItem::SetTypeInfo ( ITypeInfo * punk ) [inline, virtual]

Definition at line 83 of file tree.h.

    {ASSERT(punk); m_punk = (IUnknown*)punk;}

virtual void CTreeItem::SetTypeLib ( ITypeLib * punk ) [inline, virtual]

Definition at line 78 of file tree.h.

    {ASSERT(punk); m_punk = (IUnknown*)punk;}

CString CTreeItem::TYPEDESCtoString ( TYPEDESC * lptdesc )

Definition at line 944 of file tree.cpp.

{
  ASSERT(GetTypeInfo()) ;
  return ::TYPEDESCtoString( GetTypeInfo(), ptdesc ) ;
}

CTreeItem::ITEM_TYPE CTreeItem::TypeKindToItemType ( TYPEKIND tkind )

Definition at line 1080 of file tree.cpp.

{
  ITEM_TYPE t ;

  switch(tkind)
  {
  case TKIND_ENUM:        t = typeEnum ; break ;
  case TKIND_RECORD:      t = typeRecord ; break ;
  case TKIND_MODULE:      t = typeModule ;break ;
  case TKIND_INTERFACE:   t = typeInterface ;break ;
  case TKIND_DISPATCH :   t = typeDispinterface ; break ;
  case TKIND_COCLASS:     t = typeCoClass ; break ;
  case TKIND_ALIAS:       t = typeAlias ; break ;
  case TKIND_UNION:       t = typeUnion ; break ;
  default:                t = typeUnknown ; break ;
  }

  return t ;
}

Member Data Documentation

CTreeCtrl* CTreeItem::m_pTree

Definition at line 26 of file tree.h.

IUnknown* CTreeItem::m_punk

Definition at line 25 of file tree.h.

ITEM_TYPE CTreeItem::m_Type

Definition at line 66 of file tree.h.

MEMBERID CTreeItem::m_uiMemid

Definition at line 67 of file tree.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/tree.h
  • ole/oleview/iviewers/tree.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTwoButtonsProp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CTwoButtonsProp Class Reference

#include "CustomProperties.h"

List of all members.

Public Member Functions

CTwoButtonsProp (const CString &strName, const COleVariant &varValue)

Protected Member Functions

virtual void | AdjustButtonRect ()
virtual BOOL | HasButton () const
virtual void | OnClickButton (CPoint point)
virtual void | OnDrawButton (CDC *pDC, CRect rectButton)

Protected Attributes

CImageList | m_images

Detailed Description

Definition at line 174 of file CustomProperties.h.

Constructor & Destructor Documentation

CTwoButtonsProp::CTwoButtonsProp | ( | const CString & | strName,
 |  | const COleVariant & | varValue
 | ) |  |

Definition at line 638 of file CustomProperties.cpp.

                                                                                : CMFCPropertyGridProperty(strName, varValue)
{
  CBitmap bmp;
  bmp.LoadBitmap(IDB_BUTTONS);

  m_images.Create(14, 14, ILC_MASK | ILC_COLOR8, 0, 0);
  m_images.Add(&bmp, RGB(255, 0, 255));
}

Member Function Documentation

void CTwoButtonsProp::AdjustButtonRect ( ) [protected, virtual]

Definition at line 647 of file CustomProperties.cpp.

{
  CMFCPropertyGridProperty::AdjustButtonRect();
  m_rectButton.left -= m_rectButton.Width();
}

virtual BOOL CTwoButtonsProp::HasButton ( ) const [inline, protected, virtual]

Definition at line 180 of file CustomProperties.h.

{ return TRUE; }

void CTwoButtonsProp::OnClickButton ( CPoint point ) [protected, virtual]

Definition at line 653 of file CustomProperties.cpp.

{
  BOOL bIsLeft = point.x < m_rectButton.CenterPoint().x;
  AfxMessageBox(bIsLeft ? _T("Left button clicked") : _T("Right button clicked"));
}

void CTwoButtonsProp::OnDrawButton | ( | CDC * | pDC,
 |  | CRect | rectButton |
 | ) |  |  | [protected, virtual]

Definition at line 659 of file CustomProperties.cpp.

{
  for (int i = 0; i < 2; i++)
  {
    CMFCToolBarButton button;

    CRect rect = rectButton;

    if (i == 0)
    {
      rect.right = rect.left + rect.Width() / 2;
    }
    else
    {
      rect.left = rect.right - rect.Width() / 2;
    }

    CMFCVisualManager::AFX_BUTTON_STATE state = CMFCVisualManager::ButtonsIsHighlighted;

    CMFCVisualManager::GetInstance()->OnFillButtonInterior(pDC, &button, rect, state);

    m_images.Draw(pDC, i, CPoint(rect.left, rect.top), ILD_NORMAL);

    CMFCVisualManager::GetInstance()->OnDrawButtonBorder(pDC, &button, rect, state);
  }
}

Member Data Documentation

CImageList CTwoButtonsProp::m_images [protected]

Definition at line 185 of file CustomProperties.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/CustomProperties.h
  • vc2008fp/NewControls/CustomProperties.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypedPtrArrayView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTypedPtrArrayView Class Reference

#include "typaryvw.h"

List of all members.

Public Types

enum | { IDD = IDD_TYPED_PTR_ARRAY }

Public Member Functions

CTypedPtrArrayView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
float | m_float
int | m_int
CString | m_str

Protected Member Functions

virtual | ~CTypedPtrArrayView ()
void | AddMyObjectToListBox (CMyObject *pMyObject, int nSel=-1)
virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnAdd ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
afx_msg void | OnUpdateButton ()

Detailed Description

Definition at line 19 of file typaryvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 36 of file typaryvw.h.

{ IDD = IDD_TYPED_PTR_ARRAY };

Constructor & Destructor Documentation

CTypedPtrArrayView::CTypedPtrArrayView ( )

Definition at line 28 of file typaryvw.cpp.

  : CFormView(CTypedPtrArrayView::IDD)
{
  //{{AFX_DATA_INIT(CTypedPtrArrayView)
  m_int = 0;
  m_float = 0.0f;
  m_str = "";
  //}}AFX_DATA_INIT
}

CTypedPtrArrayView::~CTypedPtrArrayView ( ) [protected, virtual]

Definition at line 38 of file typaryvw.cpp.

{
}

Member Function Documentation

void CTypedPtrArrayView::AddMyObjectToListBox | ( | CMyObject * | pMyObject,
 |  | int | nSel = -1 |
 | ) |  |  | [protected]

Definition at line 104 of file typaryvw.cpp.

{
  // Add new CMyObject to the listbox.
  CString str;
  pMyObject->FormatMyObject(str);
  if (nSel == -1)
    nSel = m_ctlList.AddString(str);
  else
    m_ctlList.InsertString(nSel, str);
}

void CTypedPtrArrayView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 57 of file typaryvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CTypedPtrArrayView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_INT, m_int);
  DDX_Text(pDX, IDC_FLOAT, m_float);
  DDX_Text(pDX, IDC_STRING, m_str);
  //}}AFX_DATA_MAP
}

CCollectDoc * CTypedPtrArrayView::GetDocument ( ) [inline]

Definition at line 74 of file typaryvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CTypedPtrArrayView::OnAdd ( ) [protected]

Definition at line 120 of file typaryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add new CMyObject to the CTypedPtrArray
  CMyObject* pMyObject = new CMyObject;
  pMyObject->m_int = m_int;
  pMyObject->m_float = m_float;
  pMyObject->m_str = m_str;
  GetDocument()->m_myobArray.Add(pMyObject);

  AddMyObjectToListBox(pMyObject);
}

void CTypedPtrArrayView::OnInitialUpdate ( )

Definition at line 42 of file typaryvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the entries from the document's CTypedPtrArray
  // to the listbox.
  m_ctlList.ResetContent();
  CMyObjectArray& myobArray = GetDocument()->m_myobArray;
  for (int nIndex = 0; nIndex < myobArray.GetSize(); nIndex++)
  {
    CMyObject* pMyObject = myobArray[nIndex];
    AddMyObjectToListBox(pMyObject);
  }
}

void CTypedPtrArrayView::OnRemove ( ) [protected]

Definition at line 160 of file typaryvw.cpp.

{
  int nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_ENTRY_TO_BE_REMOVED);
    return;
  }

  CMyObject* pMyObject = GetDocument()->m_myobArray[nSel];

  // Remove the CMyObject ptr from the CTypedPtrArray.
  GetDocument()->m_myobArray.RemoveAt(nSel);

  // Delete the CMyObject object. (The CTypedPtrArray only holds the ptr.)
  delete pMyObject;

  // Remove the corresponding entry from the listbox.
  m_ctlList.DeleteString(nSel);
}

void CTypedPtrArrayView::OnRemoveAll ( ) [protected]

Definition at line 181 of file typaryvw.cpp.

{
  CCollectDoc* pDoc = GetDocument();
  for (int n = 0; n < pDoc->m_myobArray.GetSize(); n++)
  {
    delete pDoc->m_myobArray[n];
  }
  pDoc->m_myobArray.RemoveAll();

  // Remove all of the corresponding formatted strings from the listbox.
  m_ctlList.ResetContent();
}

void CTypedPtrArrayView::OnSelChangeList ( ) [protected]

Definition at line 194 of file typaryvw.cpp.

{
  // Update the edit control to reflect the new selection
  // in the listbox.
  int nSel = m_ctlList.GetCurSel();
  CMyObject* pMyObject = GetDocument()->m_myobArray[nSel];

  m_int = pMyObject->m_int;
  m_float = pMyObject->m_float;
  m_str = pMyObject->m_str;

  UpdateData(FALSE);
}

void CTypedPtrArrayView::OnUpdateButton ( ) [protected]

Definition at line 135 of file typaryvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_ENTRY_TO_BE_UPDATED);
    return;
  }

  CMyObject* pMyObject = GetDocument()->m_myobArray[nSel];

  // Replace the value of the CMyObject in the CTypedPtrArray.
  pMyObject->m_int = m_int;
  pMyObject->m_float = m_float;
  pMyObject->m_str = m_str;

  // Replace the displayed CMyObject in the listbox by removing
  // the old listbox entry and adding a new entry.
  m_ctlList.DeleteString(nSel);
  AddMyObjectToListBox(pMyObject, nSel);
}

Member Data Documentation

CListBox CTypedPtrArrayView::m_ctlList

Definition at line 37 of file typaryvw.h.

float CTypedPtrArrayView::m_float

Definition at line 39 of file typaryvw.h.

int CTypedPtrArrayView::m_int

Definition at line 38 of file typaryvw.h.

CString CTypedPtrArrayView::m_str

Definition at line 40 of file typaryvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/typaryvw.h
  • advanced/collect/typaryvw.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypedPtrListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CTypedPtrListView Class Reference

#include "typlstvw.h"

List of all members.

Public Types

enum | { IDD = IDD_TYPED_PTR_LIST }

Public Member Functions

CTypedPtrListView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
float | m_float
int | m_int
CString | m_str

Protected Member Functions

virtual | ~CTypedPtrListView ()
void | AddMyStructToListBox (CMyStruct *pMyStruct, int nSel=-1)
virtual void | DoDataExchange (CDataExchange *pDX)
CMyStruct * | FindMyStruct (int &nSel, POSITION &pos)
afx_msg void | OnAdd ()
afx_msg void | OnInsertBefore ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
afx_msg void | OnUpdateButton ()

Detailed Description

Definition at line 19 of file typlstvw.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 36 of file typlstvw.h.

{ IDD = IDD_TYPED_PTR_LIST };

Constructor & Destructor Documentation

CTypedPtrListView::CTypedPtrListView ( )

Definition at line 28 of file typlstvw.cpp.

  : CFormView(CTypedPtrListView::IDD)
{
  //{{AFX_DATA_INIT(CTypedPtrListView)
  m_float = 0.0f;
  m_int = 0;
  m_str = "";
  //}}AFX_DATA_INIT
}

CTypedPtrListView::~CTypedPtrListView ( ) [protected, virtual]

Definition at line 38 of file typlstvw.cpp.

{
}

Member Function Documentation

void CTypedPtrListView::AddMyStructToListBox | ( | CMyStruct * | pMyStruct,
 |  | int | nSel = -1 |
 | ) |  |  | [protected]

Definition at line 133 of file typlstvw.cpp.

{
  // Add new CMyStruct to the listbox.
  CString str;
  pMyStruct->FormatMyStruct(str);
  if (nSel == -1)
    nSel = m_ctlList.AddString(str);
  else
    m_ctlList.InsertString(nSel, str);

  // Save the CMyStruct pointer as the listbox entry's "data item".
  m_ctlList.SetItemDataPtr(nSel, pMyStruct);
}

void CTypedPtrListView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 58 of file typlstvw.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CTypedPtrListView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_FLOAT, m_float);
  DDX_Text(pDX, IDC_INT, m_int);
  DDX_Text(pDX, IDC_STRING, m_str);
  //}}AFX_DATA_MAP
  if (pDX->m_bSaveAndValidate && _tcschr(m_str, ' ') != NULL)
  {
    AfxMessageBox(IDS_BLANK_CHARS_NOT_ALLOWED);
    pDX->Fail();
  }
}

CMyStruct * CTypedPtrListView::FindMyStruct | ( | int & | nSel,
 |  | POSITION & | pos |
 | ) |  |  | [protected]

Definition at line 111 of file typlstvw.cpp.

{
  nSel = m_ctlList.GetCurSel();
  if (nSel == LB_ERR)
  {
    AfxMessageBox(IDS_SELECT_ENTRY);
    return NULL;
  }

  // The CMyStruct pointer was saved as the listbox entry's data item.
  CMyStruct* pMyStruct = (CMyStruct*)m_ctlList.GetItemDataPtr(nSel);

  // Find the CMyStruct pointer in the CTypedPtrList.
  pos = GetDocument()->m_mystructList.Find(pMyStruct);

  // If the CMyStruct is displayed in the listbox, it should also be
  // found in the CTypedPtrList.
  ASSERT(pos != NULL);

  return pMyStruct;
}

CCollectDoc * CTypedPtrListView::GetDocument ( ) [inline]

Definition at line 76 of file typlstvw.h.

   { return (CCollectDoc*)m_pDocument; }

void CTypedPtrListView::OnAdd ( ) [protected]

Definition at line 151 of file typlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add new CMyStruct to the CTypedPtrList
  CMyStruct* pMyStruct = new CMyStruct;
  pMyStruct->m_int = m_int;
  pMyStruct->m_float = m_float;
  pMyStruct->m_str = m_str;
  GetDocument()->m_mystructList.AddTail(pMyStruct);

  AddMyStructToListBox(pMyStruct);
}

void CTypedPtrListView::OnInitialUpdate ( )

Definition at line 42 of file typlstvw.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the strings from the document's CTypedPtrList
  // to the listbox.
  m_ctlList.ResetContent();
  CMyStructList& mystructList = GetDocument()->m_mystructList;
  POSITION pos = mystructList.GetHeadPosition();
  while (pos != NULL)
  {
    CMyStruct* pMyStruct = mystructList.GetNext(pos);
    AddMyStructToListBox(pMyStruct);
  }
}

void CTypedPtrListView::OnInsertBefore ( ) [protected]

Definition at line 166 of file typlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel;
  POSITION pos;
  // Find the CMyStruct in the CTypedPtrList and listbox.
  if (FindMyStruct(nSel, pos) == NULL)
    return;

  // Insert new CMyStruct in the CTypedPtrList
  CMyStruct* pMyStruct = new CMyStruct;
  pMyStruct->m_int = m_int;
  pMyStruct->m_float = m_float;
  pMyStruct->m_str = m_str;
  GetDocument()->m_mystructList.InsertBefore(pos, pMyStruct);

  AddMyStructToListBox(pMyStruct, nSel);
}

void CTypedPtrListView::OnRemove ( ) [protected]

Definition at line 210 of file typlstvw.cpp.

{
  int nSel;
  POSITION pos;
  // Find the CMyStruct in the CTypedPtrList and listbox.
  CMyStruct* pMyStruct = FindMyStruct(nSel, pos);
  if (pMyStruct == NULL)
    return;

  // Remove the CMyStruct ptr from the CTypedPtrList.
  GetDocument()->m_mystructList.RemoveAt(pos);

  // Delete the CMyStruct object. (The CTypePtrList only holds the ptr.)
  delete pMyStruct;

  // Remove the corresponding entry from the listbox.
  m_ctlList.DeleteString(nSel);
}

void CTypedPtrListView::OnRemoveAll ( ) [protected]

Definition at line 229 of file typlstvw.cpp.

{
  CMyStructList& mystructList = GetDocument()->m_mystructList;

  // Delete all of the CMyStruct objects pointed to
  // by the CTypedPtrList. Then remove all of the
  // CMyStruct pointers from the CTypedPtrList, which
  // is faster than removing each individually.
  POSITION pos = mystructList.GetHeadPosition();
  while (pos != NULL)
  {
    delete mystructList.GetNext(pos);
  }
  mystructList.RemoveAll();

  // Remove all of the corresponding formatted strings from the listbox.
  m_ctlList.ResetContent();
}

void CTypedPtrListView::OnSelChangeList ( ) [protected]

Definition at line 248 of file typlstvw.cpp.

{
  // Update the edit control to reflect the new selection
  // in the listbox.

  int nSel;
  POSITION pos;
  // Find the CMyStruct in the CTypedPtrList and listbox.
  CMyStruct* pMyStruct = FindMyStruct(nSel, pos);

  m_int = pMyStruct->m_int;
  m_float = pMyStruct->m_float;
  m_str = pMyStruct->m_str;

  UpdateData(FALSE);
}

void CTypedPtrListView::OnUpdateButton ( ) [protected]

Definition at line 187 of file typlstvw.cpp.

{
  if (UpdateData() != TRUE)
    return;

  int nSel;
  POSITION pos;
  // Find the CMyStruct in the CTypedPtrList and listbox.
  CMyStruct* pMyStruct = FindMyStruct(nSel, pos);
  if (pMyStruct == NULL)
    return;

  // Replace the value of the CMyStruct in the CTypedPtrList.
  pMyStruct->m_int = m_int;
  pMyStruct->m_float = m_float;
  pMyStruct->m_str = m_str;

  // Replace the displayed CMyStruct in the listbox by removing
  // the old listbox entry and adding a new entry.
  m_ctlList.DeleteString(nSel);
  AddMyStructToListBox(pMyStruct, nSel);
}

Member Data Documentation

CListBox CTypedPtrListView::m_ctlList

Definition at line 37 of file typlstvw.h.

float CTypedPtrListView::m_float

Definition at line 38 of file typlstvw.h.

int CTypedPtrListView::m_int

Definition at line 39 of file typlstvw.h.

CString CTypedPtrListView::m_str

Definition at line 40 of file typlstvw.h.

The documentation for this class was generated from the following files:
  • advanced/collect/typlstvw.h
  • advanced/collect/typlstvw.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypedPtrMapView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions

CTypedPtrMapView Class Reference

#include "typtrmap.h"

List of all members.

Public Types

enum | { IDD = IDD_TYPED_PTR_MAP }

Public Member Functions

CTypedPtrMapView ()
CCollectDoc * GetDocument ()
void | OnInitialUpdate ()

Public Attributes

CListBox | m_ctlList
float | m_float
int | m_int
CString | m_str
CString | m_strKey

Protected Member Functions

virtual | ~CTypedPtrMapView ()
void | AddMapEntryToListBox (CString &strKey, CMyObject *pMyObject)
CMyObject * ConstructMyObjectFromView ()
virtual void | DoDataExchange (CDataExchange *pDX)
int | FindKeyInListBox (CString &strKey)
afx_msg void | OnAddOrUpdate ()
afx_msg void | OnFind ()
afx_msg void | OnRemove ()
afx_msg void | OnRemoveAll ()
afx_msg void | OnSelChangeList ()
void | UpdateViewFromMyObject (CMyObject *pMyObject)

Static Protected Member Functions

static CString | FormatListBoxEntry (CString &strKey, CMyObject *pMyObject)

Detailed Description

Definition at line 19 of file typtrmap.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file typtrmap.h.

{ IDD = IDD_TYPED_PTR_MAP };

Constructor & Destructor Documentation

CTypedPtrMapView::CTypedPtrMapView ( )

Definition at line 27 of file typtrmap.cpp.

  : CFormView(CTypedPtrMapView::IDD)
{
  //{{AFX_DATA_INIT(CTypedPtrMapView)
  m_strKey = "";
  m_int = 0;
  m_float = 0.0f;
  m_str = "";
  //}}AFX_DATA_INIT
}

CTypedPtrMapView::~CTypedPtrMapView ( ) [protected, virtual]

Definition at line 38 of file typtrmap.cpp.

{
}

Member Function Documentation

void CTypedPtrMapView::AddMapEntryToListBox | ( | CString & | strKey,
 |  | CMyObject * | pMyObject |
 | ) |  |  | [protected]

Definition at line 127 of file typtrmap.cpp.

{
  CString strListBoxEntry = FormatListBoxEntry(strKey, pMyObject);
  m_ctlList.AddString(strListBoxEntry);
}

CMyObject * CTypedPtrMapView::ConstructMyObjectFromView ( ) [protected]

Definition at line 133 of file typtrmap.cpp.

{
  CMyObject* pMyObject = new CMyObject;
  pMyObject->m_int = m_int;
  pMyObject->m_float = m_float;
  pMyObject->m_str = m_str;
  return pMyObject;
}

void CTypedPtrMapView::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 60 of file typtrmap.cpp.

{
  CFormView::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CTypedPtrMapView)
  DDX_Control(pDX, IDC_LIST, m_ctlList);
  DDX_Text(pDX, IDC_KEY, m_strKey);
  DDX_Text(pDX, IDC_INT, m_int);
  DDX_Text(pDX, IDC_FLOAT, m_float);
  DDX_Text(pDX, IDC_STRING, m_str);
  //}}AFX_DATA_MAP
}

int CTypedPtrMapView::FindKeyInListBox ( CString & strKey ) [protected]

Definition at line 118 of file typtrmap.cpp.

{
  CMyObject* pMyObject;
  if (GetDocument()->m_mapStringToMyObject.Lookup(strKey, pMyObject) != TRUE)
    return LB_ERR;
  CString strListBoxEntry = FormatListBoxEntry(strKey, pMyObject);
  return m_ctlList.FindString(-1, strListBoxEntry);
}

CString CTypedPtrMapView::FormatListBoxEntry | ( | CString & | strKey,
 |  | CMyObject * | pMyObject |
 | ) |  |  | [static, protected]

Definition at line 108 of file typtrmap.cpp.

{
  CString strListBoxEntry = strKey;
  strListBoxEntry += _T(" >> ");
  CString strMyObject;
  pMyObject->FormatMyObject(strMyObject);
  strListBoxEntry += strMyObject;
  return strListBoxEntry;
}

CCollectDoc * CTypedPtrMapView::GetDocument ( ) [inline]

Definition at line 77 of file typtrmap.h.

   { return (CCollectDoc*)m_pDocument; }

void CTypedPtrMapView::OnAddOrUpdate ( ) [protected]

Definition at line 154 of file typtrmap.cpp.

{
  if (UpdateData() != TRUE)
    return;

  // Add or replace entry in the listbox
  int nSel = FindKeyInListBox(m_strKey);
  if (nSel != LB_ERR)
    m_ctlList.DeleteString(nSel);
  CMyObject* pMyObject = ConstructMyObjectFromView();
  AddMapEntryToListBox(m_strKey, pMyObject);

  // Add or update association in the CTypedPtrMap
  CMyObject* pTemp = GetDocument()->m_mapStringToMyObject[m_strKey];
  delete pTemp; // delete old value
  GetDocument()->m_mapStringToMyObject[m_strKey] = pMyObject;
}

void CTypedPtrMapView::OnFind ( ) [protected]

Definition at line 172 of file typtrmap.cpp.

{
  if (UpdateData() != TRUE)
    return;

  CMyObject* pMyObject;
  if (GetDocument()->m_mapStringToMyObject.Lookup(m_strKey, pMyObject) != TRUE)
  {
    AfxMessageBox(IDS_KEY_NOT_FOUND);
    return;
  }

  UpdateViewFromMyObject(pMyObject);
}

void CTypedPtrMapView::OnInitialUpdate ( )

Definition at line 42 of file typtrmap.cpp.

{
  CFormView::OnInitialUpdate();

  // Copy all of the assocations from the document's CTypedPtrMap
  // to the listbox.
  CString strKey;
  CMyObject* pMyObject;
  m_ctlList.ResetContent();
  CMapStringToMyObject& map = GetDocument()->m_mapStringToMyObject;
  POSITION pos = map.GetStartPosition();
  while (pos != NULL)
  {
    map.GetNextAssoc(pos, strKey, pMyObject);
    AddMapEntryToListBox(strKey, pMyObject);
  }
}

void CTypedPtrMapView::OnRemove ( ) [protected]

Definition at line 187 of file typtrmap.cpp.

{
  if (UpdateData() != TRUE)
    return;

  CMyObject* pMyObject;
  CMapStringToMyObject& map = GetDocument()->m_mapStringToMyObject;
  if (map.Lookup(m_strKey, pMyObject) != TRUE)
  {
    AfxMessageBox(IDS_KEY_NOT_FOUND);
    return;
  }

  if (m_int != pMyObject->m_int
    || m_float != pMyObject->m_float
    || m_str != pMyObject->m_str)
  {
    UpdateViewFromMyObject(pMyObject);
    AfxMessageBox(IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN);
    return;
  }

  // Remove assocation from the listbox
  int nSel = FindKeyInListBox(m_strKey);
  ASSERT(nSel != LB_ERR);
  m_ctlList.DeleteString(nSel);

  // Remove the association from the CTypedPtrMap
  map.RemoveKey(m_strKey);

  // Delete the CMyObject
  delete pMyObject;
}

void CTypedPtrMapView::OnRemoveAll ( ) [protected]

Definition at line 221 of file typtrmap.cpp.

{
  CCollectDoc* pDoc = GetDocument();
  POSITION pos = pDoc->m_mapStringToMyObject.GetStartPosition();
  while (pos != NULL)
  {
    CString str;
    CMyObject* pMyObject;
    pDoc->m_mapStringToMyObject.GetNextAssoc(pos, str, pMyObject);
    delete pMyObject;
  }
  pDoc->m_mapStringToMyObject.RemoveAll();

  m_ctlList.ResetContent();
}

void CTypedPtrMapView::OnSelChangeList ( ) [protected]

Definition at line 237 of file typtrmap.cpp.

{
  // Update the "key" field to reflect the new selection in the listbox.
  CString str;
  m_ctlList.GetText(m_ctlList.GetCurSel(), str);
  m_strKey.Empty();
  LPCTSTR lpsz = str;
  while (*lpsz != ' ' || *(lpsz+1) != '>' || *(lpsz+2) != '>')
  {
    m_strKey += *lpsz;
    lpsz++;
  }
  UpdateData(FALSE);

  // Now that the key field has been updated to reflect the listbox selection,
  // find the string in the map as though the user had hit the Find button.
  OnFind();
}

void CTypedPtrMapView::UpdateViewFromMyObject ( CMyObject * pMyObject ) [protected]

Definition at line 142 of file typtrmap.cpp.

{
  m_int = pMyObject->m_int;
  m_float = pMyObject->m_float;
  m_str = pMyObject->m_str;
  UpdateData(FALSE);  // update the value found in the map lookup
}

Member Data Documentation

CListBox CTypedPtrMapView::m_ctlList

Definition at line 29 of file typtrmap.h.

float CTypedPtrMapView::m_float

Definition at line 32 of file typtrmap.h.

int CTypedPtrMapView::m_int

Definition at line 31 of file typtrmap.h.

CString CTypedPtrMapView::m_str

Definition at line 33 of file typtrmap.h.

CString CTypedPtrMapView::m_strKey

Definition at line 30 of file typtrmap.h.

The documentation for this class was generated from the following files:
  • advanced/collect/typtrmap.h
  • advanced/collect/typtrmap.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypeLibListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

CTypeLibListView Class Reference

#include "tlblist.h"

List of all members.

Public Member Functions

virtual void | OnInitialUpdate ()

Public Attributes

CListCtrl | m_list

Protected Member Functions

CTypeLibListView ()
virtual | ~CTypeLibListView ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
virtual void | OnDraw (CDC *pDC)
afx_msg void | OnSize (UINT nType, int cx, int cy)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)

Friends

class | CTypeLibWnd

Detailed Description

Definition at line 16 of file tlblist.h.

Constructor & Destructor Documentation

CTypeLibListView::CTypeLibListView ( ) [protected]

Definition at line 32 of file tlblist.cpp.

{
}

CTypeLibListView::~CTypeLibListView ( ) [protected, virtual]

Definition at line 36 of file tlblist.cpp.

{
}

Member Function Documentation

int CTypeLibListView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 69 of file tlblist.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  RECT rect ;
  rect.top = lpCreateStruct->y ;
  rect.left = lpCreateStruct->x ;
  rect.bottom = lpCreateStruct->cy ;
  rect.right = lpCreateStruct->cx ;

  if (!m_list.Create( WS_CHILD | WS_VISIBLE |
                WS_BORDER |
                LVS_REPORT |
//                                LVS_BUTTON |
                LVS_SINGLESEL |
                LVS_NOSORTHEADER,
                rect, this, ID_LISTVIEW ))
  {
    TRACE( _T("List control failed to create!") ) ;
    return -1 ;
  }

  return 0;
}

void CTypeLibListView::OnDestroy ( void ) [protected]

Definition at line 95 of file tlblist.cpp.

{
  CView::OnDestroy();
  m_list.DeleteAllItems() ;
}

void CTypeLibListView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 101 of file tlblist.cpp.

{
  // TODO: Add your specialized code here and/or call the base class

}

void CTypeLibListView::OnInitialUpdate ( ) [virtual]

Definition at line 115 of file tlblist.cpp.

{
  TRACE(_T("OnInitialUpdate\n")) ;
  CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
  ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));

  CView::OnInitialUpdate();
}

void CTypeLibListView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 107 of file tlblist.cpp.

{
  CView::OnSize(nType, cx, cy);

  m_list.SetWindowPos( NULL, -1, -1, cx+2, cy+2, SWP_NOZORDER ) ;

}

void CTypeLibListView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 125 of file tlblist.cpp.

{
}

Friends And Related Function Documentation

friend class CTypeLibWnd [friend]

Definition at line 18 of file tlblist.h.

Member Data Documentation

CListCtrl CTypeLibListView::m_list

Definition at line 25 of file tlblist.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/tlblist.h
  • ole/oleview/iviewers/tlblist.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypeLibODLView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

CTypeLibODLView Class Reference

#include "tlbodl.h"

List of all members.

Public Member Functions

HRESULT | DeCompileCoClass (IStream *pstm, ITypeInfo *pti, UINT uiIndent=0)
HRESULT | DeCompileConst (IStream *pstm, ITypeInfo *pti, MEMBERID memid, UINT uiIndent=0, BOOL fConst=TRUE)
HRESULT | DeCompileDispinterface (IStream *pstm, ITypeInfo *pti, UINT uiIndent=0)
HRESULT | DeCompileFunc (IStream *pstm, ITypeInfo *pti, MEMBERID memid, UINT uiIndent=0)
HRESULT | DeCompileInterface (IStream *pstm, ITypeInfo *pti, UINT uiIndent=0)
HRESULT | DeCompileModule (IStream *pstm, ITypeInfo *pti, UINT uiIndent=0)
HRESULT | DeCompileTypedef (IStream *pstm, ITypeInfo *pti, UINT uiIndent=0)
HRESULT | DeCompileTypeLib (IStream *pstm, ITypeLib *ptlb, UINT uiIndent=0)
HRESULT | DeCompileVar (IStream *pstm, ITypeInfo *pti, MEMBERID memid, UINT uiIndent=0)
HRESULT | DumpConst (IStream *pstm, ITypeInfo *pti, TYPEATTR *pattr, MEMBERID memid, UINT uiIndent=0, BOOL fConst=TRUE)
HRESULT | DumpFunc (IStream *pstm, ITypeInfo *pti, TYPEATTR *pattr, MEMBERID memid, UINT uiIndent=0)
HRESULT | DumpVar (IStream *pstm, ITypeInfo *pti, TYPEATTR *pattr, MEMBERID memid, UINT uiIndent=0)
virtual void | OnInitialUpdate ()

Public Attributes

CFont | m_Font

Protected Member Functions

CTypeLibODLView ()
virtual | ~CTypeLibODLView ()
afx_msg void | OnDestroy ()
virtual void | OnDraw (CDC *pDC)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Friends

class | CTypeLibWnd

Detailed Description

Definition at line 16 of file tlbodl.h.

Constructor & Destructor Documentation

CTypeLibODLView::CTypeLibODLView ( ) [protected]

Definition at line 42 of file tlbodl.cpp.

{
}

CTypeLibODLView::~CTypeLibODLView ( ) [protected, virtual]

Definition at line 46 of file tlbodl.cpp.

{
}

Member Function Documentation

HRESULT CTypeLibODLView::DeCompileCoClass | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 1232 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*   pattr = NULL ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  ITypeInfo*      ptiImpl = NULL ;
  TYPEATTR*       pattrImpl = NULL ;

  TRY
  {
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    WRITELINE(_T("[")) ;

    TCHAR szGUID[64] ;
    StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
    WRITE1("  uuid(") ;
    WRITE(szGUID) ;
    WRITE(")") ;

    // was version specified
    if (pattr->wMajorVerNum || pattr->wMinorVerNum)
    {
      WRITECR(",") ;
      CString str ;
      str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
      WRITE1(str) ;
    }

    if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
    {
      CString str ;
      if (bstrDoc && *bstrDoc)
      {
        WRITECR(",") ;
        COLE2CT lpszDoc(bstrDoc);
        ::SysFreeString(bstrDoc);
        bstrDoc = NULL;
        str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
        WRITE1( str ) ;
        if (dwHelpID > 0)
        {
          WRITECR(",") ;
          str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
          WRITE1( str ) ;
        }
      }
      else if (dwHelpID > 0)
      {
        WRITECR(",") ;
        str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
        WRITE1( str ) ;
      }
    }

    if (pattr->wTypeFlags == TYPEFLAG_FAPPOBJECT)
    {
      WRITECR(",") ;
      WRITE1("  appobject") ;
    }
    if (pattr->wTypeFlags == TYPEFLAG_FHIDDEN)
    {
      WRITECR(",") ;
      WRITE1("  hidden") ;
    }
    if (pattr->wTypeFlags == TYPEFLAG_FLICENSED)
    {
      WRITECR(",") ;
      WRITE1("  licensed") ;
    }
    if (pattr->wTypeFlags == TYPEFLAG_FCONTROL)
    {
      WRITECR(",") ;
      WRITE1("  control") ;
    }

    WRITECR("") ;
    WRITELINE(_T("]")) ;
    WRITE1(_T("coclass ")) ;
    // coclass name
    WRITEBSTR( bstrName ) ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    bstrName = bstrDoc = bstrHelp = NULL ;

    WRITECR(_T(" {")) ;

    //  [attributes2] [interface | dispinterface] interfacename;
    for (UINT n = 0 ; n < pattr->cImplTypes ; n++)
    {
      HREFTYPE href = NULL ;

      int impltype = NULL ;
      if (FAILED(hr = pti->GetImplTypeFlags( n, &impltype )))
        AfxThrowOleException(hr) ;

      if (FAILED(hr = pti->GetRefTypeOfImplType(n, &href)))
        AfxThrowOleException(hr) ;

      if (FAILED(hr = pti->GetRefTypeInfo( href, &ptiImpl )))
        AfxThrowOleException(hr) ;

      if (FAILED(hr = ptiImpl->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
        AfxThrowOleException(hr) ;

      if (FAILED(hr = ptiImpl->GetTypeAttr( &pattrImpl)))
        AfxThrowOleException( hr ) ;

      WRITE2(_T(""), 1 ) ;

      if (impltype)
      {
        WRITE(_T("[")) ;
        BOOL    fComma = FALSE ;
        if (impltype & IMPLTYPEFLAG_FDEFAULT)
        {
          WRITE(_T("default")) ;
          fComma = TRUE ;
        }
        if (impltype & IMPLTYPEFLAG_FSOURCE)
        {
          if (fComma)
            WRITE(_T(", ")) ;
          WRITE(_T("source")) ;
          fComma = TRUE ;
        }
        if (impltype & IMPLTYPEFLAG_FRESTRICTED)
        {
          if (fComma)
            WRITE(_T(", ")) ;
          WRITE(_T("restricted")) ;
        }

        WRITE(_T("] "));
      }

      if (pattrImpl->typekind == TKIND_INTERFACE)
        WRITE(_T("interface ")) ;

      if (pattrImpl->typekind == TKIND_DISPATCH)
        WRITE(_T("dispinterface ")) ;

      WRITE( bstrName ) ;

      WRITECR(_T(";")) ;

      SysFreeString( bstrName ) ;
      bstrName = NULL ;
      SysFreeString( bstrDoc ) ;
      bstrDoc = NULL ;
      SysFreeString( bstrHelp ) ;
      bstrHelp = NULL ;

      ptiImpl->ReleaseTypeAttr( pattrImpl ) ;
      pattrImpl = NULL ;

      ptiImpl->Release() ;
      ptiImpl = NULL ;
    }

    WRITELINE("};") ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (ptiImpl)
    {
      if (pattrImpl)
        ptiImpl->ReleaseTypeAttr( pattrImpl ) ;

      ptiImpl->Release() ;
    }
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    THROW_LAST();
  }
  END_CATCH
  return hr ;

}

HRESULT CTypeLibODLView::DeCompileConst | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | MEMBERID | memid,
 |  | UINT | uiIndent = 0,
 |  | BOOL | fConst = TRUE
 | ) |  |

Definition at line 2002 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*       pattr = NULL ;
  ASSERT(pti) ;

  TRY
  {
    ENSURE(pti);
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    if (FAILED(hr = DumpConst( pstm, pti, pattr, memid, uiIndent, fConst )))
      AfxThrowOleException( hr ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;
    THROW_LAST();
  }
  END_CATCH

  return hr ;
}

HRESULT CTypeLibODLView::DeCompileDispinterface | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 1096 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*   pattr = NULL ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  ITypeInfo*      ptiImpl = NULL ;

  TRY
  {
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    WRITELINE(_T("[")) ;

    TCHAR szGUID[64] ;
    StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
    WRITE1("  uuid(") ;
    WRITE(szGUID) ;
    WRITE(")") ;

    // was version specified
    if (pattr->wMajorVerNum || pattr->wMinorVerNum)
    {
      WRITECR(",") ;
      CString str ;
      str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
      WRITE1(str) ;
    }

    if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
    {
      CString str ;
      if (bstrDoc && *bstrDoc)
      {
        WRITECR(",") ;
        COLE2CT lpszDoc(bstrDoc);
        ::SysFreeString(bstrDoc);
        bstrDoc = NULL;
        str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
        WRITE1( str ) ;
        if (dwHelpID > 0)
        {
          WRITECR(",") ;
          str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
          WRITE1( str ) ;
        }
      }
      else if (dwHelpID > 0)
      {
        WRITECR(",") ;
        str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
        WRITE1( str ) ;
      }
    }

    // source, default, or restricted
    if (pattr->wTypeFlags == TYPEFLAG_FHIDDEN)
    {
      WRITECR(",") ;
      WRITE1("  hidden") ;
    }

    if (pattr->wTypeFlags == TYPEFLAG_FDUAL)
    {
      WRITECR(",") ;
      WRITE1("  dual") ;
    }

    WRITECR("") ;
    WRITELINE(_T("]")) ;
    WRITE1(_T("dispinterface ")) ;
    // interface name
    WRITEBSTR( bstrName ) ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    bstrName = bstrDoc = bstrHelp = NULL ;

    WRITECR(_T(" {")) ;

    WRITELINE2(_T("properties:"), 1) ;
    UINT n;
    for (n = 0 ; n < pattr->cVars ; n++)
      DumpVar( pstm, pti, pattr, n, uiIndent + 2 ) ;

    WRITELINE2(_T("methods:"), 1) ;
    for (n = 0 ; n < pattr->cFuncs ; n++)
      DumpFunc( pstm, pti, pattr, n, uiIndent + 2 ) ;

    WRITELINE("};") ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (ptiImpl)
      ptiImpl->Release() ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;
  }
  END_CATCH
  return hr ;
}

HRESULT CTypeLibODLView::DeCompileFunc | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | MEMBERID | memid,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 1437 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*   pattr = NULL ;
  ASSERT(pti) ;

  TRY
  {
    ENSURE(pti);
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    if (FAILED(hr = DumpFunc( pstm, pti, pattr, memid, uiIndent )))
      AfxThrowOleException( hr ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    THROW_LAST();
  }
  END_CATCH

  return hr ;
}

HRESULT CTypeLibODLView::DeCompileInterface | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 905 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*   pattr = NULL ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  ITypeInfo*      ptiImpl = NULL ;

  TRY
  {
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    WRITELINE(_T("[")) ;
    WRITE1( _T("  odl")) ;

    TCHAR szGUID[64] ;
    StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
    WRITECR(",") ;
    WRITE1("  uuid(") ;
    WRITE(szGUID) ;
    WRITE(")") ;

    // was version specified
    if (pattr->wMajorVerNum || pattr->wMinorVerNum)
    {
      WRITECR(",") ;
      CString str ;
      str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
      WRITE1(str) ;
    }

    if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
    {
      CString str ;
      if (bstrDoc && *bstrDoc)
      {
        WRITECR(",") ;
        COLE2CT lpszDoc(bstrDoc);
        ::SysFreeString(bstrDoc);
        bstrDoc = NULL;
        str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
        WRITE1( str ) ;
        if (dwHelpID > 0)
        {
          WRITECR(",") ;
          str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
          WRITE1( str ) ;
        }
      }
      else if (dwHelpID > 0)
      {
        WRITECR(",") ;
        str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
        WRITE1( str ) ;
      }
    }

    // source, default, or restricted
    if (pattr->wTypeFlags == TYPEFLAG_FHIDDEN)
    {
      WRITECR(",") ;
      WRITE1("  hidden") ;
    }

  /*
    int    implflags = NULL ;
    if (FAILED(hr = pti->GetImplTypeFlags(0, &implflags )))
      AfxThrowOleException(hr) ;

    if (implflags & IMPLTYPEFLAG_FDEFAULT)
    {
      WRITECR(",") ;
      WRITE1("  default") ;
    }

    if (implflags & IMPLTYPEFLAG_FSOURCE)
    {
      WRITECR(",") ;
      WRITE1("  source") ;
    }

    if (implflags & IMPLTYPEFLAG_FRESTRICTED)
    {
      WRITECR(",") ;
      WRITE1("  restricted") ;
    }
   */

    WRITECR("") ;
    WRITELINE(_T("]")) ;
    WRITE1(_T("interface ")) ;
    // interface name
    WRITEBSTR( bstrName ) ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    bstrName = bstrDoc = bstrHelp = NULL ;

    // is there a base interface?
    UINT n;
    for (n = 0 ; n <  pattr->cImplTypes; n++)
    {
      HREFTYPE href = NULL ;
      if (FAILED(hr = pti->GetRefTypeOfImplType(n, &href)))
        AfxThrowOleException(hr) ;

      if (FAILED(hr = pti->GetRefTypeInfo( href, &ptiImpl )))
        AfxThrowOleException(hr) ;

      if (FAILED(hr = ptiImpl->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
        AfxThrowOleException(hr) ;

      WRITE(_T(" : ")) ;
      WRITEBSTR( bstrName ) ;

      SysFreeString( bstrName ) ;
      bstrName = NULL ;
      SysFreeString( bstrDoc ) ;
      bstrDoc = NULL ;
      SysFreeString( bstrHelp ) ;
      bstrHelp = NULL ;

      ptiImpl->Release() ;
      ptiImpl = NULL ;
    }

    WRITECR(_T(" {")) ;

    for (n = 0 ; n < pattr->cFuncs ; n++)
      DumpFunc( pstm, pti, pattr, n, uiIndent + 1 ) ;

    WRITELINE("};") ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (ptiImpl)
      ptiImpl->Release() ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    THROW_LAST();
  }
  END_CATCH
  return hr ;
}

HRESULT CTypeLibODLView::DeCompileModule | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 774 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*   pattr = NULL ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;

  TRY
  {
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    WRITELINE(_T("// BUGBUG:   There appears to be no way to retrieve the dllname of"));
    WRITELINE(_T("//           a module via ITypeInfo in a reliable way. "));
    WRITELINE(_T("//           ITypeInfo::GetDllEntry offers a possibility, but it will"));
    WRITELINE(_T("//           only work if the module has entries in it."));
    WRITELINE(_T("// "));

    WRITELINE(_T("[")) ;
    WRITE1( _T("  dllname(")) ;

    /*
    if (FAILED(hr = pti->GetDllEntry(MEMBERID_NIL, INVOKE_FUNC, &bstrName, NULL, NULL)))
      AfxThrowOleException( hr ) ;

    WRITEBSTR(bstrName) ;
    SysFreeString(bstrName) ;
    bstrName = NULL ;
    */

    WRITE(_T(")")) ;

    // Was 'uuid' specified?
    if (!IsEqualGUID( pattr->guid, GUID_NULL ))
    {
      TCHAR szGUID[64] ;
      StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
      WRITECR(",") ;
      WRITE1("  uuid(") ;
      WRITE(szGUID) ;
      WRITE(")") ;
    }

    // was version specified
    if (pattr->wMajorVerNum || pattr->wMinorVerNum)
    {
      WRITECR(",") ;
      CString str ;
      str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
      WRITE1(str) ;
    }

    if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
    {
      CString str ;
      if (bstrDoc && *bstrDoc)
      {
        WRITECR(",") ;
        COLE2CT lpszDoc(bstrDoc);
        ::SysFreeString(bstrDoc);
        bstrDoc = NULL;
        str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
        WRITE1( str ) ;
        if (dwHelpID > 0)
        {
          WRITECR(",") ;
          str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
          WRITE1( str ) ;
        }
      }
      else if (dwHelpID > 0)
      {
        WRITECR(",") ;
        str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
        WRITE1( str ) ;
      }
    }

    WRITECR("") ;
    WRITELINE(_T("]")) ;
    WRITE1(_T("module ")) ;
    WRITEBSTR( bstrName ) ;
    WRITECR( _T(" {")) ;

    int n;
    for (n = 0 ; n < pattr->cFuncs ; n++)
      DumpFunc( pstm, pti, pattr, n, uiIndent + 1 ) ;

    for (n = 0 ; n < pattr->cVars ; n++)
      DumpConst( pstm, pti, pattr, n, uiIndent + 1, TRUE ) ;

    WRITELINE("};") ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    THROW_LAST();
  }
  END_CATCH
  return hr ;
}

HRESULT CTypeLibODLView::DeCompileTypedef | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 581 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*   pattr = NULL ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;

  WRITE1("typedef ") ;

  TRY
  {
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    BOOL    fAttributes = FALSE ;      // any attributes?
    BOOL    fAttribute = FALSE ;       // at least one (insert ",")

    // Was 'uuid' specified?
    if (!IsEqualGUID( pattr->guid, GUID_NULL ))
    {
      TCHAR szGUID[64] ;
      StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
      fAttributes = TRUE ;
      WRITE("[uuid(") ;
      WRITE(szGUID) ;
      WRITE(")") ;
      fAttribute = TRUE ;
    }

    // was version specified
    if (pattr->wMajorVerNum || pattr->wMinorVerNum)
    {
      if (fAttributes == FALSE)
        WRITE("[") ;
      fAttributes = TRUE ;
      if (fAttribute)
        WRITE(", ") ;

      CString str ;
      str.Format(_T("version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
      WRITE(str) ;
      fAttribute = TRUE ;
    }

    if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
    {
      CString str ;
      if (bstrDoc && *bstrDoc)
      {
        if (fAttributes == FALSE) WRITE("[") ;
        fAttributes = TRUE ;
        if (fAttribute)
          WRITE(", ") ;
        COLE2CT lpszDoc(bstrDoc);
        ::SysFreeString(bstrDoc);
        bstrDoc = NULL;

        str.Format( _T("helpstring(\"%s\")"), lpszDoc );
        WRITE( str ) ;
        if (dwHelpID > 0)
        {
          str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
          WRITE( str ) ;
        }
      }
      else if (dwHelpID > 0)
      {
        if (fAttributes == FALSE) WRITE("[") ;
        fAttributes = TRUE ;
        if (fAttribute)
          WRITE(", ") ;
        str.Format( _T("helpcontext(%#08.8x)"), dwHelpID ) ;
        WRITE( str ) ;
        fAttribute = TRUE ;
      }
    }

    if (pattr->typekind == TKIND_ALIAS)
    {
      if (fAttributes == FALSE) WRITE("[") ;
      fAttributes = TRUE ;
      if (fAttribute)
        WRITE(", ") ;
      WRITE("public") ;       // if it's in the tlb it had public
    }

    if (fAttributes)
      WRITE("] ") ;

    switch(pattr->typekind)
    {
    case TKIND_RECORD:
      #ifdef _WRITE_TAG
      WRITE("struct tag") ;
      WRITEBSTR(bstrName) ;
      #else
      WRITE("struct ") ;
      #endif
      WRITECR(" {" );
    break ;

    case TKIND_UNION:
      #ifdef _WRITE_TAG
      WRITE("union tag") ;
      WRITEBSTR(bstrName) ;
      #else
      WRITE("union ") ;
      #endif
      WRITECR(" {" );
    break ;

    case TKIND_ALIAS:  //typedef
      // write base type
      WRITE(TYPEDESCtoString( pti, &pattr->tdescAlias )) ;
      WRITE(" ") ;

      // write aliasname
    break ;

    case TKIND_ENUM:
      WRITECR("enum {" );
    break ;

    default:
    ASSERT(0) ;
    break ;
    }

    if (pattr->typekind == TKIND_RECORD || pattr->typekind == TKIND_UNION)
    {
      for (UINT n = 0 ; n < pattr->cVars ; n++)
        DumpVar( pstm, pti, pattr, n, uiIndent + 1 ) ;
      WRITE1("} ");
    }

    if (pattr->typekind == TKIND_ENUM)
    {
      for (int n = 0 ; n < pattr->cVars ; n++)
      {
        DumpConst( pstm, pti, pattr, n, uiIndent + 1, FALSE ) ;
        if (n < pattr->cVars-1)
          WRITECR(",") ;
        else
          WRITECR("") ;
      }
      WRITE1("} ");
    }

    WRITEBSTR(bstrName) ;
    WRITECR(";") ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    THROW_LAST();
  }
  END_CATCH
  return hr ;
}

HRESULT CTypeLibODLView::DeCompileTypeLib | ( | IStream * | pstm,
 |  | ITypeLib * | ptlb,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 373 of file tlbodl.cpp.

{
  HRESULT         hr = S_OK ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  TLIBATTR*       plibattr = NULL ;
  ITypeInfo*      pti = NULL ;
  TYPEATTR*       pattr = NULL ;

  ASSERT(ptlb) ;

  TRY
  {
    TCHAR szGUID[64] ;
    CString str;

    ENSURE(ptlb);
    hr = ptlb->GetLibAttr(&plibattr);
    if (FAILED(hr))
      AfxThrowOleException( hr ) ;

    // write header with library filename
    WRITELINE(_T("// Generated .ODL file (by Ole2View)"));
    WRITELINE(_T("// "));
    WRITE1(_T("// typelib filename: "));
    hr = ::QueryPathOfRegTypeLib(plibattr->guid, plibattr->wMajorVerNum, plibattr->wMinorVerNum, plibattr->lcid, &bstrName);
    if (SUCCEEDED(hr))
    {
      COLE2CT lpszName(bstrName);
      ::SysFreeString(bstrName);
      bstrName = NULL;

      LPCTSTR p = _tcsrchr(lpszName, '\\');
      if (p != NULL && *p && *(p+1))
        WRITECR( p+1 ) ;
      else
        WRITECR( (LPCTSTR)lpszName ) ;
    }
    else
    {
      // It's possible we're viewing a type lib that was never registered
      WRITECR( _T("<could not determine filename>") ) ;
    }

    WRITELINE( _T("[") ) ;

    StringFromGUID2T( plibattr->guid, szGUID, 64, sizeof(szGUID) );
    WRITE1(_T("  uuid(")) ; WRITE(szGUID); WRITECR(_T("),"))  ;

    str.Format( _T("  version(%d.%d)"), plibattr->wMajorVerNum, plibattr->wMinorVerNum ) ;
    WRITE1(str) ;

    hr = ptlb->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp );
    if (FAILED(hr))
      AfxThrowOleException( hr ) ;

    if (bstrDoc && *bstrDoc)
    {
      WRITECR(_T(",")) ;
      WRITE1(_T("  helpstring(\"")) ;
      WRITEBSTR( bstrDoc ) ;
      WRITE(_T("\")")) ;
    }

    if (bstrHelp && *bstrHelp)
    {
      WRITECR(",") ;
      COLE2CT lpszHelp(bstrHelp);
      ::SysFreeString(bstrHelp);
      bstrHelp = NULL;

      LPCTSTR p = _tcsrchr(lpszHelp, '\\');
      if (p != NULL && *p && *(p+1))
        str.Format( _T("  helpfile(\"%s\"),"), p+1 ) ;
      else
        str.Format( _T("  helpfile(\"%s\"),"), lpszHelp ) ;
      WRITELINE( str ) ;
      str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
      WRITE1( str ) ;
    }

    WRITECR(_T("")) ;
    WRITELINE(_T("]") ) ;

    WRITE1( _T("library ") ) ;
    WRITEBSTR(bstrName) ;
    WRITECR(_T("")) ;

    WRITELINE( _T("(") ) ;

    // TODO:  Grovel through all typeinfos for any referenced types
    // that are defined in imported libs
    //uiInfos = ptlb->GetTypeInfoCount() ;
    //for (UINT n = 0 ; n < uiInfos ; n++)
    //{
    //}
    WRITELINE(_T("// BUGBUG:  There most likely were \"importlib()\" statements in"));
    WRITELINE(_T("//          in the source.  While it appears possible to be able"));
    WRITELINE(_T("//          to identify them, it is non-trivial and is currently"));
    WRITELINE(_T("//          not supported."));
    WRITELINE(_T("// "));

    UINT uiInfos = ptlb->GetTypeInfoCount() ;
    for (UINT n = 0 ; n < uiInfos ; n++)
    {
      if (FAILED(hr = ptlb->GetTypeInfo( n, &pti )))
        AfxThrowOleException(hr) ;

      if (FAILED(hr = pti->GetTypeAttr( &pattr )))
        AfxThrowOleException(hr) ;

      switch(pattr->typekind)
      {
      case TKIND_ENUM:
      case TKIND_RECORD:
      case TKIND_UNION:
      case TKIND_ALIAS:
         hr = DeCompileTypedef( pstm, pti, uiIndent + 1 ) ;
      break ;

      case TKIND_MODULE:
         hr = DeCompileModule( pstm, pti, uiIndent + 1 ) ;
      break ;

      case TKIND_INTERFACE:
         hr = DeCompileInterface( pstm, pti, uiIndent + 1 ) ;
      break ;

      case TKIND_DISPATCH:
         hr = DeCompileDispinterface( pstm, pti, uiIndent + 1 ) ;
      break ;

      case TKIND_COCLASS:
         hr = DeCompileCoClass( pstm, pti, uiIndent + 1 ) ;
      break ;
      }

      if (n != uiInfos - 1)
        WRITECR(_T("")) ;

      pti->ReleaseTypeAttr( pattr ) ;
      pti->Release() ;
      pti = NULL ;
      pattr = NULL ;
    }
    // Last line of the .ODL file
    WRITELINE( ");" ) ;

    SysFreeString( bstrName ) ;
    bstrName = NULL ;
    SysFreeString( bstrDoc ) ;
    bstrDoc = NULL ;
    SysFreeString( bstrHelp ) ;
    bstrHelp = NULL ;

    if (plibattr)
      ptlb->ReleaseTLibAttr( plibattr ) ;
  }
  CATCH(CException, pException)
  {
    if (pti)
    {
      if (pattr)
        pti->ReleaseTypeAttr( pattr ) ;
      pti->Release() ;
    }
    if (plibattr)
      ptlb->ReleaseTLibAttr( plibattr ) ;
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    THROW_LAST() ;
  }
  END_CATCH

  return hr ;
}

HRESULT CTypeLibODLView::DeCompileVar | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | MEMBERID | memid,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 1823 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  TYPEATTR*   pattr = NULL ;
  ASSERT(pti) ;

  TRY
  {
    ENSURE(pti);
    if (FAILED(hr = pti->GetTypeAttr( &pattr)))
      AfxThrowOleException( hr ) ;

    if (FAILED(hr = DumpVar( pstm, pti, pattr, memid, uiIndent )))
      AfxThrowOleException( hr ) ;

    pti->ReleaseTypeAttr( pattr ) ;
  }
  CATCH(CException, pException)
  {
    if (pattr)
      pti->ReleaseTypeAttr( pattr ) ;

    THROW_LAST();
  }
  END_CATCH

  return hr ;
}

HRESULT CTypeLibODLView::DumpConst | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | TYPEATTR * | pattr,
 |  | MEMBERID | memid,
 |  | UINT | uiIndent = 0,
 |  | BOOL | fConst = TRUE
 | ) |  |

Definition at line 2030 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  VARDESC*    pvardesc = NULL ;
  BSTR            rgbstrNames[1] ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  ASSERT(pti) ;
  VARIANT varValue ;
  VariantInit( &varValue ) ;

  TRY
  {
    ENSURE(pti);
    if (FAILED(hr = pti->GetVarDesc( memid, &pvardesc )))
      AfxThrowOleException( hr ) ;

    ASSERT(pvardesc->varkind == VAR_CONST) ;

    CString str = TYPEDESCtoString( pti, &pvardesc->elemdescVar.tdesc ) ;
    if (FAILED(hr = VariantChangeType( &varValue, pvardesc->lpvarValue, 0, VT_BSTR )))
    {
      if (pvardesc->lpvarValue->vt == VT_ERROR || pvardesc->lpvarValue->vt == VT_HRESULT)
      {
        varValue.vt = VT_BSTR ;
        varValue.bstrVal = ::SysAllocString(CT2OLE(_GetScodeString(pvardesc->lpvarValue->scode))) ;
        hr = S_OK ;
      }
      else
        AfxThrowOleException( hr ) ;
    }

    BOOL fIndent = FALSE ;
    if (fConst)
    {
      if (pattr->typekind == TKIND_MODULE)
      {
        str.Format(_T("[entry(%d)"), memid) ;
        WRITE1(str) ;
        fIndent = TRUE ;
      }

      // [helpstring("<helpstring>"), helpcontext(<id>)] const type name = expression ;
      if (SUCCEEDED(pti->GetDocumentation( pvardesc->memid, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
      {
        if (bstrDoc && *bstrDoc)
        {
          if (!fIndent)
            WRITE1("[") ;
          else
            WRITE(", ") ;
          COLE2CT lpszDoc(bstrDoc);
          ::SysFreeString(bstrDoc);
          bstrDoc = NULL;
          str.Format( _T("helpstring(\"%s\")"), lpszDoc ) ;
          WRITE( str ) ;
          if (dwHelpID > 0)
          {
            str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
            WRITE( str ) ;
          }
          WRITE("] ");
          fIndent = TRUE ;
        }
        else if (dwHelpID > 0)
        {
          if (!fIndent)
            WRITE1("[") ;
          else
            WRITE(", ") ;
          str.Format( _T("helpcontext(%#08.8x)] "), dwHelpID ) ;
          WRITE( str ) ;
          fIndent = TRUE ;
        }
      }
    }

    UINT cNames ;
    if (FAILED( hr = pti->GetNames( pvardesc->memid, rgbstrNames, 1, (UINT FAR*)&cNames )))
      AfxThrowOleException( hr ) ;

    if (fConst)
    {
      if (!fIndent)
        WRITE1(_T("")) ;
      WRITE("const ") ; WRITE( str ) ; WRITE( " " ) ;
    }
    else
      WRITE1("") ;

    WRITEBSTR( rgbstrNames[0] ) ; WRITE( " = " ) ;

    if (pvardesc->lpvarValue->vt == VT_BSTR)
    {
      WRITE( "\"" ) ;
      WRITEBSTR( varValue.bstrVal ) ;
      WRITE( "\"" ) ;
    }
    else
      WRITEBSTR( varValue.bstrVal) ;

    if (fConst)
      WRITECR(";") ;

    VariantClear( &varValue ) ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    pti->ReleaseVarDesc( pvardesc ) ;
  }
  CATCH(CException, pException)
  {
    VariantClear( &varValue ) ;
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pvardesc)
      pti->ReleaseVarDesc( pvardesc ) ;

    THROW_LAST();
  }
  END_CATCH

  return hr ;
}

HRESULT CTypeLibODLView::DumpFunc | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | TYPEATTR * | pattr,
 |  | MEMBERID | memid,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 1466 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  FUNCDESC*   pfuncdesc = NULL ;
  BSTR            rgbstrNames[MAX_NAMES] ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  ASSERT(pti) ;

  for (UINT ui = 0 ; ui < MAX_NAMES ; ui++)
    rgbstrNames[ui] = NULL ;

  TRY
  {
    ENSURE(pti);
    if (FAILED(hr = pti->GetFuncDesc( memid, &pfuncdesc )))
      AfxThrowOleException( hr ) ;

    // If pattr->typekind == TKIND_DISPATCH (dispinterface)
    //    [attributes] returntype methname(params);
    // where attributes can be
    //      id(<id>), propput, propget,
    //      propputref, bindable, defaultbind, displaybind,
    //      requestedit, source, vararg, hidden, helpstring("<helpstring>"),
    //      helpcontext(<id>)
    //
    // If pattr->typekind == TKIND_INTERFACE || TKIND_MODULE
    //  [attributes] returntype [calling convention]  funcname(params);
    // where attributes can be
    //      restricted, bindable, defaultbind, displaybind,
    //      requestedit, source, vararg, hidden, helpstring("<helpstring>"),
    //      helpcontext(<id>)
    // and calling convention can be
    //      pascal, cdecl, stdcall
    //
    // Write [attributes]
    //
    BOOL    fAttributes = FALSE ;      // any attributes?
    BOOL    fAttribute = FALSE ;       // at least one (insert ",")
    WRITE1("") ;    // indent
    CString str ;
    if (pattr->typekind == TKIND_DISPATCH)
    {
      fAttributes = TRUE ;
      fAttribute = TRUE ;
      str.Format(_T("[id(%d)"), memid) ;
      WRITE(str) ;
    }
    else if (pattr->typekind == TKIND_MODULE)
    {
      fAttributes = TRUE ;
      fAttribute = TRUE ;
      str.Format(_T("[entry(%d)"), memid) ;
      WRITE(str) ;
    }
    else
      // if there are some attributes
      if ((pfuncdesc->invkind > 1)|| pfuncdesc->wFuncFlags || pfuncdesc->cParamsOpt == -1)
      {
        WRITE("[") ;
        fAttributes = TRUE ;
      }

    if (pfuncdesc->invkind & INVOKE_PROPERTYGET)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("propget") ;
    }
    if (pfuncdesc->invkind & INVOKE_PROPERTYPUT)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("propput") ;
    }
    if (pfuncdesc->invkind & INVOKE_PROPERTYPUTREF)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("propputref") ;
    }
    if (pfuncdesc->wFuncFlags & FUNCFLAG_FRESTRICTED)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("restricted") ;
    }
    if (pfuncdesc->wFuncFlags & FUNCFLAG_FSOURCE)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("source") ;
    }
    if (pfuncdesc->wFuncFlags & FUNCFLAG_FBINDABLE)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("bindable") ;
    }
    if (pfuncdesc->wFuncFlags & FUNCFLAG_FREQUESTEDIT)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("requestedit") ;
    }
    if (pfuncdesc->wFuncFlags & FUNCFLAG_FDISPLAYBIND)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("displaybind") ;
    }
    if (pfuncdesc->wFuncFlags & FUNCFLAG_FDEFAULTBIND)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("defaultbind") ;
    }
    if (pfuncdesc->wFuncFlags & FUNCFLAG_FHIDDEN)
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("hidden") ;
    }
    if (pfuncdesc->cParamsOpt == -1)    // cParamsOpt > 0 indicates VARIANT style
    {
      if (fAttribute)
        WRITE(", ") ;
      fAttribute = TRUE ;
      WRITE("vararg") ;         // optional params
    }

    if (SUCCEEDED(pti->GetDocumentation( pfuncdesc->memid, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
    {
      if (bstrDoc && *bstrDoc)
      {
        if (fAttributes == FALSE) WRITE("[") ;
        fAttributes = TRUE ;
        if (fAttribute)
          WRITE(", ") ;
        COLE2CT lpszDoc(bstrDoc);
        ::SysFreeString(bstrDoc);
        bstrDoc = NULL;
        str.Format( _T("helpstring(\"%s\")"), lpszDoc ) ;
        WRITE( str ) ;
        if (dwHelpID > 0)
        {
          str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
          WRITE( str ) ;
        }
      }
      else if (dwHelpID > 0)
      {
        if (fAttributes == FALSE) WRITE("[") ;
        if (fAttribute)
          WRITE(", ") ;
        fAttributes = TRUE ;
        str.Format( _T("helpcontext(%#08.8x)"), dwHelpID ) ;
        WRITE( str ) ;
      }
    }
    if (fAttributes)
      WRITE("] ") ;

    // Write return type
    WRITE(TYPEDESCtoString( pti, &pfuncdesc->elemdescFunc.tdesc )) ;
    WRITE(" ") ;

    if (pattr->typekind != TKIND_DISPATCH)
    {   // Write calling convention
      switch(pfuncdesc->callconv)
      {
        case CC_CDECL:      WRITE("_cdecl ") ;           break ;
        //case CC_MSCPASCAL:  WRITE("_mspascal ") ;        break ;
        case CC_PASCAL:     WRITE("_pascal ") ;          break ;
        case CC_MACPASCAL:  WRITE("_macpascal ") ;       break ;
        case CC_STDCALL :   WRITE("_stdcall ") ;          break ;
        //case CC_RESERVED:   WRITE("_reserved ") ;         break ;
        case CC_SYSCALL:    WRITE("_syscall ") ;          break ;
        case CC_MPWCDECL:   WRITE("_mpwcdecl ") ;         break ;
        case CC_MPWPASCAL:  WRITE("_mpwpascal ") ;        break ;
      }
    }

    // Write methodname

    // Problem:  If a property has the propput or propputref attributes the
    // 'right hand side' (rhs) is *always* the last parameter and MkTypeLib
    // strips the parameter name.  Thus you will always get 1 less name
    // back from ::GetNames than normal.
    //
    // Thus for the example below
    //  [propput] void Color([in] VARIANT rgb, [in] VARIANT rgb2 );
    // without taking this into consderation the output would be
    //  [propput] void Color([in] VARIANT rgb, [in] VARIANT );
    // when it should be
    //  [propput] void Color([in] VARIANT rgb, [in] VARIANT rhs );
    //
    // Another weirdness comes from a bug (which will never be fixed)
    // where optional parameters on property functions were allowed.
    // Because they were allowed by accident people used them, so they
    // are still allowed.
    //

    UINT cNames = 0 ;
    if (FAILED( hr = pti->GetNames( pfuncdesc->memid, rgbstrNames, MAX_NAMES, &cNames )))
      AfxThrowOleException( hr ) ;

    // fix for 'rhs' problem
    if ((int)cNames < pfuncdesc->cParams + 1)
    {
      rgbstrNames[cNames] = ::SysAllocString(OLESTR("rhs")) ;
      cNames++ ;
    }

    ASSERT((int)cNames == pfuncdesc->cParams+1) ;
    WRITEBSTR( rgbstrNames[0] ) ;
    WRITE("(") ;

    // params have the format
    //   [attributes] type paramname
    // where attributes can be
    //   in, out, optional, string   (string is not valid for TKIND_MODULE)
    //
    if (pfuncdesc->cParams > 1)
      WRITECR("") ;
    for ( int n = 0 ; n < pfuncdesc->cParams ; n++ )
    {
      if (pfuncdesc->cParams > 1)
        WRITE2("", 4 ) ;    // indent 4
      fAttributes = FALSE ;
      fAttribute = FALSE ;

      if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags)
      {
        WRITE("[") ;
        fAttributes = TRUE ;
      }

      if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FIN)
      {
        if (fAttribute)
          WRITE(", ") ;
        WRITE("in") ;
        fAttribute = TRUE ;
      }
      if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FOUT)
      {
        if (fAttribute)
          WRITE(", ") ;
        WRITE("out") ;
        fAttribute = TRUE ;
      }
      if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FLCID)
      {
        if (fAttribute)
          WRITE(", ") ;
        WRITE("lcid") ;
        fAttribute = TRUE ;
      }
      if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FRETVAL)
      {
        if (fAttribute)
          WRITE(", ") ;
        WRITE("retval") ;
        fAttribute = TRUE ;
      }

      // If we have an optional last parameter and we're on the last paramter
      // or we are into the optional parameters...
      if ((pfuncdesc->cParamsOpt == -1 && n == pfuncdesc->cParams - 1) ||
        (n > (pfuncdesc->cParams - pfuncdesc->cParamsOpt)))
      {
        if (fAttribute)
          WRITE(", ") ;
        if (!fAttributes)
          WRITE("[") ;
        WRITE("optional") ;
        fAttributes = TRUE ;
        fAttribute = TRUE ;
      }

      if (fAttributes)
        WRITE("] ") ;

      // type
      if ((pfuncdesc->lprgelemdescParam[n].tdesc.vt & 0x0FFF) == VT_CARRAY)
      {
        // type name[n]
        WRITE(TYPEDESCtoString( pti, &pfuncdesc->lprgelemdescParam[n].tdesc.lpadesc->tdescElem )) ;
        WRITE(" ") ;

        WRITEBSTR(rgbstrNames[n+1]) ;

        // Allocate cDims * lstrlen("[123456]")
        for (USHORT n1 = 0 ; n1 < pfuncdesc->lprgelemdescParam[n1].tdesc.lpadesc->cDims ; n1++)
        {
          str.Format( _T("[%d]"), pfuncdesc->lprgelemdescParam[n1].tdesc.lpadesc->rgbounds[n1].cElements ) ;
          WRITE(str) ;
        }
      }
      else
      {
        WRITE(TYPEDESCtoString( pti, &pfuncdesc->lprgelemdescParam[n].tdesc ) + " " ) ;
        WRITEBSTR(rgbstrNames[n+1]) ;
      }
      if (n < pfuncdesc->cParams - 1)
        WRITECR(", ") ;
    }

    WRITECR(");") ;

    for (UINT ui = 0 ; ui < MAX_NAMES ; ui++)
      if (rgbstrNames[ui])
        SysFreeString(rgbstrNames[ui]) ;
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    pti->ReleaseFuncDesc( pfuncdesc ) ;
  }
  CATCH(CException, pException)
  {
    for (UINT ui = 0 ; ui < MAX_NAMES ; ui++)
      if (rgbstrNames[ui])
        SysFreeString(rgbstrNames[ui]) ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pfuncdesc)
      pti->ReleaseFuncDesc( pfuncdesc ) ;

    THROW_LAST();
  }
  END_CATCH

  return hr ;
}

HRESULT CTypeLibODLView::DumpVar | ( | IStream * | pstm,
 |  | ITypeInfo * | pti,
 |  | TYPEATTR * | pattr,
 |  | MEMBERID | memid,
 |  | UINT | uiIndent = 0
 | ) |  |

Definition at line 1852 of file tlbodl.cpp.

{
  HRESULT     hr = S_OK ;
  VARDESC*    pvardesc = NULL ;
  BSTR            rgbstrNames[1] ;
  BSTR            bstrName = NULL ;
  BSTR            bstrDoc = NULL ;
  BSTR            bstrHelp = NULL ;
  DWORD           dwHelpID ;
  ASSERT(pti) ;

  TRY
  {
    ENSURE(pti);
    if (FAILED(hr = pti->GetVarDesc( memid, &pvardesc )))
      AfxThrowOleException( hr ) ;

    ASSERT(pvardesc->varkind != VAR_CONST) ;    // must not be a const

    // If pattr->typekind == TKIND_RECORD (struct) || TKIND_UNION
    //    type name[array];
    //
    // If pattr->typekind == TKIND_DISPATCH (dispinterface)
    //    [id(<id>), bindable, defaultbind, displaybind, readonly,
    //      requestedit, source, hidden, helpstring("<helpstring>"),
    //      helpcontext(<id>)] type name;
    //
    BOOL    fAttributes = FALSE ;
    WRITE1("") ;    // indent
    if (pattr->typekind == TKIND_DISPATCH)
    {
      CString str ;
      fAttributes = TRUE ;
      str.Format(_T("[id(%d)"), memid) ;
      WRITE(str) ;

      if (pvardesc->wVarFlags & VARFLAG_FREADONLY)
        WRITE(", readonly") ;
      if (pvardesc->wVarFlags & VARFLAG_FSOURCE)
        WRITE(", source") ;
      if (pvardesc->wVarFlags & VARFLAG_FBINDABLE)
        WRITE(", bindable") ;
      if (pvardesc->wVarFlags & VARFLAG_FREQUESTEDIT)
        WRITE(", requestedit") ;
      if (pvardesc->wVarFlags & VARFLAG_FDISPLAYBIND)
        WRITE(", displaybind") ;
      if (pvardesc->wVarFlags & VARFLAG_FDEFAULTBIND)
        WRITE(", defaultbind") ;
      if (pvardesc->wVarFlags & VARFLAG_FHIDDEN)
        WRITE(", hidden") ;
    }

    if (SUCCEEDED(pti->GetDocumentation( pvardesc->memid, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
    {
      CString str ;
      if (bstrDoc && *bstrDoc)
      {
        if (fAttributes == FALSE)
          WRITE("[") ;
        else
          WRITE(", ") ;
        fAttributes = TRUE ;
        COLE2CT lpszDoc(bstrDoc);
        ::SysFreeString(bstrDoc);
        bstrDoc = NULL;
        str.Format( _T("helpstring(\"%s\")"), lpszDoc ) ;
        WRITE( str ) ;
        if (dwHelpID > 0)
        {
          str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
          WRITE( str ) ;
        }
      }
      else if (dwHelpID > 0)
      {
        if (fAttributes == FALSE)
          WRITE("[") ;
        else
          WRITE(", ") ;
        fAttributes = TRUE ;
        str.Format( _T("helpcontext(%#08.8x)"), dwHelpID ) ;
        WRITE( str ) ;
      }
    }

    if (fAttributes)
      WRITE("] ") ;
    UINT cNames ;
    if (FAILED( hr = pti->GetNames( pvardesc->memid, rgbstrNames, 1, (UINT FAR*)&cNames )))
      AfxThrowOleException( hr ) ;

    CString str ;
    if ((pvardesc->elemdescVar.tdesc.vt & 0x0FFF) == VT_CARRAY)
    {
      // type name[n]
      WRITE(TYPEDESCtoString( pti, &pvardesc->elemdescVar.tdesc.lpadesc->tdescElem )) ;
      WRITE(" ") ;
      if (rgbstrNames[0])
        WRITEBSTR(rgbstrNames[0]);
      else
        WRITE(_T("(nameless)")) ;
      // Allocate cDims * lstrlen("[123456]")
      for (USHORT n = 0 ; n < pvardesc->elemdescVar.tdesc.lpadesc->cDims ; n++)
      {
        str.Format( _T("[%d]"), pvardesc->elemdescVar.tdesc.lpadesc->rgbounds[n].cElements ) ;
        WRITE(str) ;
      }
    }
    else
    {
      WRITE(TYPEDESCtoString( pti, &pvardesc->elemdescVar.tdesc ) + _T(" "));
      if (rgbstrNames[0])
        WRITEBSTR(rgbstrNames[0]);
      else
        WRITE(_T("(nameless)")) ;
    }
    WRITECR(";") ;

    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;

    pti->ReleaseVarDesc( pvardesc ) ;
  }
  CATCH(CException, pException)
  {
    if (bstrName)
      SysFreeString( bstrName ) ;
    if (bstrDoc)
      SysFreeString( bstrDoc ) ;
    if (bstrHelp)
      SysFreeString( bstrHelp ) ;
    if (pvardesc)
      pti->ReleaseVarDesc( pvardesc ) ;

    THROW_LAST();
  }
  END_CATCH

  return hr ;
}

void CTypeLibODLView::OnDestroy ( void ) [protected]

Definition at line 253 of file tlbodl.cpp.

{
  CEditView::OnDestroy();

  m_Font.DeleteObject() ;
}

void CTypeLibODLView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 61 of file tlbodl.cpp.

{
}

void CTypeLibODLView::OnInitialUpdate ( ) [virtual]

Definition at line 90 of file tlbodl.cpp.

{
  m_Font.CreateFont( -11, 0, 0, 0, 0, 0,
        0, 0, ANSI_CHARSET, 0, 0, 0,
        FIXED_PITCH | FF_DONTCARE, _T("Courier New") ) ;

  SetFont( &m_Font );
  CEditView::OnInitialUpdate();
}

void CTypeLibODLView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 100 of file tlbodl.cpp.

{
  CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
  ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));

  if (pFrame->m_pSelectedItem == NULL)
  {
    SetWindowText(_T("")) ;
    return ;
  }

  SetRedraw( FALSE ) ;
  BeginWaitCursor() ;

  CString     sText;
  HRESULT     hr = S_OK ;
  IStream*    pstm = NULL ;

  TRY
  {
    pstm = CreateMemoryStream() ;

    switch(pFrame->m_pSelectedItem->m_Type)
    {
    case CTreeItem::typeTypeLib:
    case CTreeItem::typeTypeLib2:
       hr = DeCompileTypeLib( pstm, pFrame->m_pSelectedItem->GetTypeLib() ) ;
    break ;

    case CTreeItem::typeEnum:
    case CTreeItem::typeRecord:
    case CTreeItem::typeModule:
    case CTreeItem::typeInterface:
    case CTreeItem::typeDispinterface:
    case CTreeItem::typeCoClass:
    case CTreeItem::typeAlias:
    case CTreeItem::typeUnion:
    case CTreeItem::typeTypeInfo:
    case CTreeItem::typeTypeInfo2:
      switch(pFrame->m_pSelectedItem->GetTypeKind())
      {
      case TKIND_ENUM:
      case TKIND_RECORD:
      case TKIND_UNION:
      case TKIND_ALIAS:
         hr = DeCompileTypedef( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
      break ;

      case TKIND_MODULE:
         hr = DeCompileModule( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
      break ;

      case TKIND_INTERFACE:
         hr = DeCompileInterface( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
      break ;

      case TKIND_DISPATCH:
         hr = DeCompileDispinterface( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
      break ;

      case TKIND_COCLASS:
         hr = DeCompileCoClass( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
      break ;

      default:
        sText = _T("<<unclassified typeinfo>>");
      break ;
      }
    break ;

    case CTreeItem::typeMethod:
       hr = DeCompileFunc( pstm, pFrame->m_pSelectedItem->GetTypeInfo(), pFrame->m_pSelectedItem->m_uiMemid ) ;
    break ;

    case CTreeItem::typeProperty:
       hr = DeCompileVar( pstm, pFrame->m_pSelectedItem->GetTypeInfo(), pFrame->m_pSelectedItem->m_uiMemid ) ;
    break ;

    case CTreeItem::typeConstant:
       hr = DeCompileConst( pstm, pFrame->m_pSelectedItem->GetTypeInfo(), pFrame->m_pSelectedItem->m_uiMemid ) ;
    break ;

    case CTreeItem::typeUnknown:
    case CTreeItem::typeUnknown2:
    case CTreeItem::typeEnums:
    case CTreeItem::typeRecords:
    case CTreeItem::typeModules:
    case CTreeItem::typeInterfaces:
    case CTreeItem::typeDispinterfaces:
    case CTreeItem::typeCoClasses:
    case CTreeItem::typeAliases:
    case CTreeItem::typeUnions:
    case CTreeItem::typeMethods:
    case CTreeItem::typeMethods2:
    case CTreeItem::typeProperties:
    case CTreeItem::typeProperties2:
    case CTreeItem::typeConstants:
    case CTreeItem::typeConstants2:
    case CTreeItem::typeImplTypes:
    case CTreeItem::typeImplTypes2:
    default:
      //bstr = ::SysAllocString(OLESTR(""));
    break ;
    }

    if (hr != S_OK)
      AfxThrowOleException( hr ) ;

    if (pstm)
    {
      STATSTG statstg ;
      if (FAILED(hr = pstm->Stat( &statstg,STATFLAG_NONAME )))
        AfxThrowOleException( hr ) ;

      // Seek to beginning
      LARGE_INTEGER li ;
      LISet32( li, 0 ) ;
      if (FAILED(hr = pstm->Seek( li, STREAM_SEEK_SET, NULL )))
        AfxThrowOleException( hr ) ;

      // Read into string
      LPSTR lpszBuf = sText.GetBuffer(statstg.cbSize.LowPart+1);
      if (FAILED(hr = pstm->Read( lpszBuf, statstg.cbSize.LowPart, NULL )))
        AfxThrowOleException( hr ) ;
      lpszBuf[statstg.cbSize.LowPart] = '\0';
      sText.ReleaseBuffer();
      SetWindowText(sText);
      pstm->Release() ;
    }
  }
  CATCH(CException, pException)
  {
    SetWindowText( _T("// Could not decompile selected item") ) ;
    if (pstm)
      pstm->Release() ;

    if (pException->IsKindOf(RUNTIME_CLASS(COleException)))
      hr = ((COleException*)pException)->m_sc ;
    else if (pException->IsKindOf(RUNTIME_CLASS(COleException)))
      hr = E_OUTOFMEMORY ;

    if (hr == S_OK)
      hr = GetLastError() ;

    ErrorMessage( "Could not decompile selected item", hr ) ;
  }
  END_CATCH

  SetRedraw( TRUE ) ;
  EndWaitCursor() ;
  SendMessage(EM_SETSEL, 0, 0)  ;
}

BOOL CTypeLibODLView::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 83 of file tlbodl.cpp.

{
  cs.style |= ES_READONLY | ES_MULTILINE | WS_VSCROLL | WS_HSCROLL ;

  return CEditView::PreCreateWindow(cs);
}

Friends And Related Function Documentation

friend class CTypeLibWnd [friend]

Definition at line 18 of file tlbodl.h.

Member Data Documentation

CFont CTypeLibODLView::m_Font

Definition at line 25 of file tlbodl.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/tlbodl.h
  • ole/oleview/iviewers/tlbodl.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypeLibTreeView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Friends

CTypeLibTreeView Class Reference

#include "tlbtree.h"

List of all members.

Public Types

enum | { IMGID_TYPELIB = 0, IMGID_TYPEINFO_C, IMGID_TYPEINFO_O }

Public Member Functions

CTypeLibTreeView ()
virtual | ~CTypeLibTreeView ()
void | DeleteTreeItems (HTREEITEM htree)
virtual void | OnInitialUpdate ()

Public Attributes

HTREEITEM | m_hTypeInfos
CImageList | m_images
ITypeLib * | m_ptlb
CTreeCtrl | m_tree

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
virtual void | OnDraw (CDC *pDC)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnTreeDeleteItem (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeItemExpanded (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeItemExpanding (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeItemReturn (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnTreeSelchanged (NMHDR *pNMHDR, LRESULT *pResult)
virtual void | OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)

Friends

class | CTypeLibWnd

Detailed Description

Definition at line 21 of file tlbtree.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IMGID_TYPELIB
IMGID_TYPEINFO_C
IMGID_TYPEINFO_O

Definition at line 35 of file tlbtree.h.

       {IMGID_TYPELIB = 0,
      IMGID_TYPEINFO_C,
      IMGID_TYPEINFO_O };

Constructor & Destructor Documentation

CTypeLibTreeView::CTypeLibTreeView ( )

Definition at line 32 of file tlbtree.cpp.

{
  m_hTypeInfos = NULL ;
  m_ptlb = NULL ;
}

CTypeLibTreeView::~CTypeLibTreeView ( ) [virtual]

Definition at line 38 of file tlbtree.cpp.

{
  if (m_ptlb)
    m_ptlb->Release() ;
}

Member Function Documentation

void CTypeLibTreeView::DeleteTreeItems ( HTREEITEM htree )

Definition at line 238 of file tlbtree.cpp.

{
  HTREEITEM       hItem, hItemNext ;
  ASSERT(htree) ;

  hItem = m_tree.GetChildItem( htree ) ;
  while( hItem )
  {
    hItemNext = m_tree.GetNextSiblingItem( hItem ) ;
    m_tree.DeleteItem( hItem ) ;
    hItem = hItemNext ;
  }
}

int CTypeLibTreeView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 81 of file tlbtree.cpp.

{
  if (CView::OnCreate(lpCreateStruct) == -1)
    return -1;

  RECT rect ;
  rect.top = lpCreateStruct->y ;
  rect.left = lpCreateStruct->x ;
  rect.bottom = lpCreateStruct->cy ;
  rect.right = lpCreateStruct->cx ;

  if (!m_tree.Create( WS_CHILD | WS_VISIBLE |
                WS_BORDER |
                TVS_HASLINES |
                TVS_LINESATROOT |
                TVS_SHOWSELALWAYS |
                TVS_HASBUTTONS |
                TVS_DISABLEDRAGDROP,
                rect, this, ID_TREEVIEW ))
  {
    TRACE( _T("Tree control failed to create!") ) ;
    return -1 ;
  }

  m_images.Create( IDB_IMAGELIST, 16, 64, RGBLTGREEN ) ;
  m_tree.SetImageList( &m_images, TVSIL_NORMAL ) ;

  return 0;
}

void CTypeLibTreeView::OnDestroy ( void ) [protected]

Definition at line 111 of file tlbtree.cpp.

{
  CView::OnDestroy();
  m_tree.DeleteAllItems() ;
}

void CTypeLibTreeView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 117 of file tlbtree.cpp.

{
  // TODO: Add your specialized code here and/or call the base class

}

void CTypeLibTreeView::OnInitialUpdate ( ) [virtual]

Definition at line 129 of file tlbtree.cpp.

{
  TRACE(_T("OnInitialUpdate\n")) ;
  CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
  ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));

  ASSERT(pFrame->m_ptlb) ;
  m_ptlb = pFrame->m_ptlb ;
  ENSURE(m_ptlb);
  m_ptlb->AddRef() ;

  CView::OnInitialUpdate();
}

void CTypeLibTreeView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 123 of file tlbtree.cpp.

{
  CView::OnSize(nType, cx, cy);
  m_tree.SetWindowPos( NULL, -1, -1, cx+2, cy+2, SWP_NOZORDER ) ;
}

void CTypeLibTreeView::OnTreeDeleteItem | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [inline, protected]

Definition at line 318 of file tlbtree.cpp.

{
  *pResult = (LRESULT)TRUE ;
  NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;

  if (pnmtv->itemOld.lParam)
  {
    CTreeItem* pItem = (CTreeItem*)pnmtv->itemOld.lParam ;
    ASSERT(pItem->IsKindOf(RUNTIME_CLASS(CTreeItem)));
    delete pItem ;
    //pnmtv->itemOld.lParam = NULL ;
  }

}

void CTypeLibTreeView::OnTreeItemExpanded | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 304 of file tlbtree.cpp.

{
  *pResult = (LRESULT)FALSE ;
}

void CTypeLibTreeView::OnTreeItemExpanding | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 270 of file tlbtree.cpp.

{
  *pResult = 0 ;
  NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;

  if ((pnmtv->action != TVE_EXPAND && pnmtv->itemNew.lParam) ||
    (pnmtv->itemNew.state & TVIS_EXPANDEDONCE))
    return ;

  CTreeItem*  pItem = (CTreeItem*)pnmtv->itemNew.lParam ;
  if (pItem == NULL)
    return ;
  ASSERT(pItem->IsKindOf(RUNTIME_CLASS(CTreeItem)));

  BeginWaitCursor() ;
  m_tree.SetRedraw( FALSE ) ;

  *pResult = !pItem->Expand(  pnmtv->itemNew.hItem ) ;

  // No children
  if (*pResult == TRUE)
  {
    TV_ITEM item ;
    item.cChildren = 0 ;
    item.mask = TVIF_CHILDREN ;
    item.hItem = pnmtv->itemNew.hItem ;
    m_tree.SetItem( &item ) ;
  }

  m_tree.SetRedraw( TRUE ) ;
  EndWaitCursor() ;
}

void CTypeLibTreeView::OnTreeItemReturn | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 309 of file tlbtree.cpp.

{
  *pResult = (LRESULT)TRUE ;
  HTREEITEM hTreeItemSel = m_tree.GetSelectedItem() ;

  if (hTreeItemSel)
    m_tree.Expand( hTreeItemSel, TVE_TOGGLE ) ;
}

void CTypeLibTreeView::OnTreeSelchanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult |
 | ) |  |  | [protected]

Definition at line 252 of file tlbtree.cpp.

{
  NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
  *pResult = 0;

  CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
  ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));

  CTreeItem*  pItem = (CTreeItem*)pnmtv->itemNew.lParam ;
  if (pItem == NULL)
    return ;
  ASSERT(pItem->IsKindOf(RUNTIME_CLASS(CTreeItem)));

  pFrame->m_pSelectedItem = pItem ;

  pFrame->UpdateAllViews( this, UPDF_NOTREEVIEW, pItem ) ;
}

void CTypeLibTreeView::OnUpdate | ( | CView * | pSender,
 |  | LPARAM | lHint,
 |  | CObject * | pHint |
 | ) |  |  | [protected, virtual]

Definition at line 143 of file tlbtree.cpp.

{
  if (lHint != NULL || (lHint & UPDF_NOTREEVIEW))
    return ;

  TRACE(_T("OnUpdate\n")) ;
  m_tree.SetRedraw( FALSE ) ;
  BeginWaitCursor() ;

  m_tree.DeleteAllItems() ;
  m_hTypeInfos = NULL ;

  TV_INSERTSTRUCT tvis ;
  tvis.hParent = TVI_ROOT ;
  tvis.hInsertAfter = TVI_FIRST ;
  tvis.item.mask = TVIF_TEXT | TVIF_CHILDREN | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
  tvis.item.iImage = CTreeItem::typeTypeLib ;
  tvis.item.iSelectedImage = tvis.item.iImage + 1 ;

  HRESULT hr = S_OK ;
  CString strError ;
  TRY
  {
    CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
    if (pFrame == NULL)
    {
      strError = _T("Internal Application error.");
      AfxThrowMemoryException() ;
    }

    if (pFrame->m_fGroupByKind)
    {
      tvis.item.cChildren = 1 ;
    }
    else
    {
      tvis.item.cChildren = m_ptlb->GetTypeInfoCount() ;
    }

    BSTR    bstrName = NULL ;
    BSTR    bstrDoc = NULL ;
    BSTR    bstrHelp = NULL ;
    DWORD   dwHelpID ;
    hr = m_ptlb->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
    if (FAILED(hr))
    {
      strError = _T("ITypeLib::GetDocumentation failed.") ;
      AfxThrowMemoryException() ;
    }

    #pragma warning (suppress: 6014)
    CTreeItem* pItem = new CTreeItem(&m_tree) ;
    if (pFrame->m_fGroupByKind)
      pItem->m_Type = CTreeItem::typeTypeLib2 ;
    else
      pItem->m_Type = CTreeItem::typeTypeLib ;
    pItem->SetTypeLib( m_ptlb ) ;
    m_ptlb->AddRef() ;
    tvis.item.lParam = (LPARAM)pItem ;

    COLE2CT lpszName(bstrName);
    if (::SysStringLen(bstrDoc) != 0)
    {
      COLE2CT lpszDoc(bstrDoc);
      CString str;
      str.Format( _T("%s (%s)"), lpszName, lpszDoc);
      tvis.item.pszText = str.GetBuffer(0);
      m_hTypeInfos = m_tree.InsertItem( &tvis ) ;
      str.ReleaseBuffer(-1) ;
    }
    else
    {
      tvis.item.pszText = (LPTSTR)lpszName;
      m_hTypeInfos = m_tree.InsertItem( &tvis ) ;
    }

    ::SysFreeString( bstrName ) ;
    ::SysFreeString( bstrDoc ) ;
    ::SysFreeString( bstrHelp ) ;
  }
  CATCH(CException, pException)
  {
  }
  END_CATCH

  if (m_hTypeInfos)
  {
    m_tree.Expand( m_hTypeInfos, TVE_EXPAND ) ;
    //m_tree.SelectItem( m_hTypeInfos ) ;
  }

  m_tree.SetRedraw( TRUE ) ;
  EndWaitCursor() ;
}

Friends And Related Function Documentation

friend class CTypeLibWnd [friend]

Definition at line 23 of file tlbtree.h.

Member Data Documentation

HTREEITEM CTypeLibTreeView::m_hTypeInfos

Definition at line 39 of file tlbtree.h.

CImageList CTypeLibTreeView::m_images

Definition at line 38 of file tlbtree.h.

ITypeLib* CTypeLibTreeView::m_ptlb

Definition at line 33 of file tlbtree.h.

CTreeCtrl CTypeLibTreeView::m_tree

Definition at line 31 of file tlbtree.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/tlbtree.h
  • ole/oleview/iviewers/tlbtree.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypeLibViewer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CTypeLibViewer Class Reference

#include "typelib.h"

Inherits CInterfaceViewer.

List of all members.

Public Member Functions

CTypeLibViewer ()
virtual | ~CTypeLibViewer ()
virtual void | OnFinalRelease ()
virtual HRESULT | OnView (HWND hwndParent, REFIID riid, LPUNKNOWN punk)

Detailed Description

Definition at line 25 of file typelib.h.

Constructor & Destructor Documentation

CTypeLibViewer::CTypeLibViewer ( )

Definition at line 39 of file typelib.cpp.

{
}

CTypeLibViewer::~CTypeLibViewer ( ) [virtual]

Definition at line 43 of file typelib.cpp.

{
}

Member Function Documentation

void CTypeLibViewer::OnFinalRelease ( ) [virtual]

Definition at line 162 of file typelib.cpp.

{

  CInterfaceViewer::OnFinalRelease();
}

HRESULT CTypeLibViewer::OnView | ( | HWND | hwndParent,
 |  | REFIID | riid,
 |  | LPUNKNOWN | punk |
 | ) |  |  | [virtual]

Reimplemented from CInterfaceViewer.

Definition at line 57 of file typelib.cpp.

{
  SCODE sc = NOERROR ;

  ASSERT(punk);

  if (riid != IID_ITypeLib)
  {
    AfxMessageBox( _T("ITypeLib interface viewer only supports IID_ITypeLib") ) ;
    return E_INVALIDARG ;
  }

  CTypeLibWnd wnd(CWnd::FromHandle(hwndParent)) ;
  if (punk)
  {
    sc = punk->QueryInterface( riid, (void**)&wnd.m_ptlb ) ;
    if (FAILED(sc))
    {
      AfxMessageBox( _T("Object does not support ITypeLib") ) ;
      return E_UNEXPECTED ;
    }
  }

  if (wnd.LoadFrame(IDR_TYPELIBWND, WS_OVERLAPPEDWINDOW, CWnd::FromHandle(hwndParent), NULL ) == FALSE)
  {
    TRACE(_T("LoadFrame failed\n") );
    return E_UNEXPECTED ;
  }
  ASSERT(wnd.m_hWnd);
  if (hwndParent)
    ::EnableWindow( hwndParent, FALSE ) ;

  wnd.InitialUpdateFrame( NULL, FALSE ) ;
  wnd.RestorePosition() ;
  wnd.UpdateWindow() ;

  // Go into a wait/peekmessage loop
  MSG msg ;
  for (;;)
  {
    while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
    {
      // We post a WM_CLOSE to force us out of the loop
      if (msg.hwnd == wnd.m_hWnd && msg.message == WM_CLOSE)
        goto done ;
      TranslateMessage(&msg) ;
      DispatchMessage(&msg) ;
    }
    WaitMessage() ;
  }
done:
  TRACE(_T("Exit from waitmessage loop\n") ) ;

  if (hwndParent)
    ::EnableWindow( hwndParent, TRUE ) ;
  wnd.DestroyWindow() ;

  return sc ;
}

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/typelib.h
  • ole/oleview/iviewers/typelib.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CTypeLibWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CTypeLibWnd Class Reference

#include "typelib.h"

List of all members.

Public Member Functions

CTypeLibWnd (CWnd *pParent=NULL)
virtual | ~CTypeLibWnd ()
void | RestorePosition ()
void | UpdateAllViews (CView *pSender, LPARAM lHint=0L, CObject *pHint=NULL)

Public Attributes

BOOL | m_fGroupByKind
CTypeLibODLView * m_pODLView
CTreeItem * m_pSelectedItem
ITypeLib * | m_ptlb
CTypeLibTreeView * m_pTreeView
CSplitterWnd | m_wndSplitter
CStatusBar | m_wndStatusBar
CToolBar | m_wndToolBar

Protected Member Functions

afx_msg void | OnAppAbout ()
afx_msg void | OnClose ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pcc)
afx_msg void | OnDestroy ()
afx_msg void | OnFileClose ()
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnUpdateViewGroupByKind (CCmdUI *pCmdUI)
afx_msg void | OnViewGroupKind ()
virtual void | PostNcDestroy ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Detailed Description

Definition at line 64 of file typelib.h.

Constructor & Destructor Documentation

CTypeLibWnd::CTypeLibWnd ( CWnd * pParent = NULL )

Definition at line 134 of file typelib.cpp.

{
  m_pSelectedItem = NULL ;
  m_ptlb = NULL ;

  CString szSection ;
  CString szKey ;

  LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
  LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_GROUPBYKIND ) ;
  m_fGroupByKind = AfxGetApp()->GetProfileInt(szSection, szKey, FALSE ) ;

}

CTypeLibWnd::~CTypeLibWnd ( ) [virtual]

Definition at line 148 of file typelib.cpp.

{
  if (m_ptlb)
    m_ptlb->Release() ;
  m_ptlb = NULL ;

  CString szSection ;
  CString szKey ;
  LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
  LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_GROUPBYKIND ) ;
  AfxGetApp()->WriteProfileInt(szSection, szKey, m_fGroupByKind ) ;

}

Member Function Documentation

void CTypeLibWnd::OnAppAbout ( ) [protected]

Definition at line 435 of file typelib.cpp.

{
  AfxMessageBox(_T("TypeLib viewer by Charlie Kindel") ) ;

}

void CTypeLibWnd::OnClose ( ) [protected]

Definition at line 417 of file typelib.cpp.

{
  #if (defined(_USRDLL) || defined(_AFXDLL))
  // Post WM_CLOSE which will drop us out of our modal loop
  //
  PostMessage( WM_CLOSE ) ;
  #else
  PostQuitMessage(0) ;
  DestroyWindow() ;
  #endif
}

int CTypeLibWnd::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 186 of file typelib.cpp.

{
  if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  if (!m_wndToolBar.Create(this) ||
    !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
    !m_wndToolBar.SetButtons(buttons, sizeof(buttons)/sizeof(UINT)))
  {
    TRACE(_T("Failed to create toolbar\n"));
    return -1;      // fail to create
  }

  m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
    CBRS_TOOLTIPS | CBRS_FLYBY);

  if (!m_wndStatusBar.Create(this) ||
    !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)) )
  {
    TRACE(_T("Failed to create status bar\n"));
    return -1;      // fail to create
  }

  m_wndStatusBar.ShowWindow(SW_SHOWNORMAL) ;
  m_wndToolBar.ShowWindow(SW_SHOWNORMAL) ;

  return 0;
}

BOOL CTypeLibWnd::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pcc |
 | ) |  |  | [protected, virtual]

Definition at line 215 of file typelib.cpp.

{

  CCreateContext context ;
  context.m_pNewViewClass = NULL ;
  context.m_pCurrentDoc = NULL ;
  context.m_pNewDocTemplate = NULL ;
  context.m_pLastView = NULL ;
  context.m_pCurrentFrame = NULL ;

  // create a splitter with 1 row, 2 columns
  if (!m_wndSplitter.CreateStatic(this, 1, 2))
  {
    TRACE(_T("Failed to CreateStaticSplitter\n"));
    return FALSE;
  }

  // add the first splitter pane - the default view in column 0
  if (!m_wndSplitter.CreateView(0, 0,
    RUNTIME_CLASS(CTypeLibTreeView), CSize(240, 0), &context))
  {
    TRACE(_T("Failed to create first pane\n"));
    return FALSE;
  }
#ifdef _LIST_VIEW
  if (!m_wndSplitter.CreateView(0, 1,
    RUNTIME_CLASS(CTypeLibListView), CSize(0, 0), &context))
  {
    TRACE(_T("Failed to create second pane\n"));
    return FALSE;
  }
#else
  if (!m_wndSplitter.CreateView(0, 1,
    RUNTIME_CLASS(CTypeLibODLView), CSize(0, 0), &context))
  {
    TRACE(_T("Failed to create second pane\n"));
    return FALSE;
  }
#endif

  m_pTreeView = (CTypeLibTreeView*)m_wndSplitter.GetPane(0, 0) ;
#ifdef _LIST_VIEW
  m_pListView = (CTypeLibListView*)m_wndSplitter.GetPane(0,1) ;
#else
  m_pODLView = (CTypeLibODLView*)m_wndSplitter.GetPane(0,1) ;
#endif

  SetActiveView(m_pTreeView);
  m_wndSplitter.SetColumnInfo( 0, 240, 0 ) ;

  CRect rc ;
  GetWindowRect( &rc) ;
  SetWindowPos( NULL, 0, 0, rc.Width()+1, rc.Height()+1, SWP_NOZORDER |
          SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOREDRAW) ;

  return TRUE ;
}

void CTypeLibWnd::OnDestroy ( void ) [protected]

Definition at line 273 of file typelib.cpp.

{
  CString szSection ;
  CString szKey ;

  LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
  LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_WNDPOS ) ;

  WINDOWPLACEMENT wp;
  CString szValue ;
  wp.length = sizeof( WINDOWPLACEMENT );
  GetWindowPlacement( &wp );
  int nWidth, n ;
  m_wndSplitter.GetColumnInfo( 0, nWidth, n ) ;
  szValue.Format( _T("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d"),
    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,
    nWidth,
    (m_wndToolBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE,
    (m_wndStatusBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE ) ;
  AfxGetApp()->WriteProfileString( szSection, szKey, szValue );

  CFrameWnd::OnDestroy();
}

void CTypeLibWnd::OnFileClose ( ) [protected]

Definition at line 441 of file typelib.cpp.

{
  SendMessage( WM_CLOSE ) ;
}

void CTypeLibWnd::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 408 of file typelib.cpp.

{
  CFrameWnd::OnSize(nType, cx, cy);

//    if (m_wndSplitter.GetSafeHwnd())
//        m_wndSplitter.SetWindowPos( NULL, 0, 0, cx, cy, SWP_NOZORDER ) ;
}

void CTypeLibWnd::OnUpdateViewGroupByKind ( CCmdUI * pCmdUI ) [protected]

Definition at line 452 of file typelib.cpp.

{
  pCmdUI->SetCheck( m_fGroupByKind ) ;
}

void CTypeLibWnd::OnViewGroupKind ( ) [protected]

Definition at line 446 of file typelib.cpp.

{
  m_fGroupByKind = !m_fGroupByKind ;
  UpdateAllViews( NULL ) ;
}

void CTypeLibWnd::PostNcDestroy ( ) [protected, virtual]

Definition at line 399 of file typelib.cpp.

{
  #if (defined(_USRDLL) || defined(_AFXDLL))
  // do nothing
  #else
  delete this ;
  #endif
}

BOOL CTypeLibWnd::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 429 of file typelib.cpp.

{
  return CFrameWnd::PreCreateWindow(cs);
}

void CTypeLibWnd::RestorePosition ( )

Definition at line 300 of file typelib.cpp.

{
  CString sz ;
  CString szSection ;
  CString szKey ;
  BOOL fToolBar = TRUE ;
  BOOL fStatusBar = TRUE ;

  LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
  LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_WNDPOS ) ;

  WINDOWPLACEMENT wp;
  memset(&wp, 0, sizeof(wp) ) ;
  int     nConv;
  wp.length = sizeof( WINDOWPLACEMENT );
  wp.flags = 0 ;

  TRY
  {
    sz = AfxGetApp()->GetProfileString(szSection, szKey, _T("") ) ;
    if (sz.IsEmpty())
      AfxThrowMemoryException();

    LPTSTR   lp = (LPTSTR)sz.GetBuffer( 255 );
    wp.showCmd = (WORD)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMinPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMinPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMaxPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.ptMaxPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.left = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.top = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.right = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    wp.rcNormalPosition.bottom = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    int nWidth = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    m_wndSplitter.SetColumnInfo( 0, nWidth, 0 ) ;

    fToolBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    fStatusBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
    if (!nConv)
      AfxThrowMemoryException();

    if (!nConv)
      AfxThrowMemoryException();
    // Always strip off minimize.
    //
    if (wp.showCmd == SW_SHOWMINIMIZED)
      wp.showCmd = SW_SHOWNORMAL ;
  }
  CATCH(CException, pException)
  {
    fToolBar = TRUE ;
    fStatusBar = TRUE ;
    ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
    ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
    ShowWindow( SW_SHOWNORMAL );
    m_pTreeView->SetFocus() ;
    return ;
  }
  END_CATCH
  ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
  ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
  SetWindowPlacement( &wp ) ;
  m_pTreeView->SetFocus() ;
}

void CTypeLibWnd::UpdateAllViews | ( | CView * | pSender,
 |  | LPARAM | lHint = 0L,
 |  | CObject * | pHint = NULL
 | ) |  |

Definition at line 458 of file typelib.cpp.

{
  if (m_pTreeView)
    m_pTreeView->OnUpdate( pSender, lHint, pHint ) ;
#ifdef _LIST_VIEW
  if (m_pListView)
    m_pListView->OnUpdate( pSender, lHint, pHint  ) ;
#else
  if (m_pODLView)
    m_pODLView->OnUpdate( pSender, lHint, pHint  ) ;
#endif
}

Member Data Documentation

BOOL CTypeLibWnd::m_fGroupByKind

Definition at line 89 of file typelib.h.

CTypeLibODLView* CTypeLibWnd::m_pODLView

Definition at line 81 of file typelib.h.

CTreeItem* CTypeLibWnd::m_pSelectedItem

Definition at line 84 of file typelib.h.

ITypeLib* CTypeLibWnd::m_ptlb

Definition at line 74 of file typelib.h.

CTypeLibTreeView* CTypeLibWnd::m_pTreeView

Definition at line 77 of file typelib.h.

CSplitterWnd CTypeLibWnd::m_wndSplitter

Definition at line 76 of file typelib.h.

CStatusBar CTypeLibWnd::m_wndStatusBar

Definition at line 86 of file typelib.h.

CToolBar CTypeLibWnd::m_wndToolBar

Definition at line 87 of file typelib.h.

The documentation for this class was generated from the following files:
  • ole/oleview/iviewers/typelib.h
  • ole/oleview/iviewers/typelib.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CUndoBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CUndoBar Class Reference

#include "UndoBar.h"

List of all members.

Public Member Functions

CUndoBar ()
virtual | ~CUndoBar ()
virtual CSize | CalcSize (BOOL bVertDock)
void | DoUndo ()
virtual void | OnFillBackground (CDC *pDC)
void | SetLabel (const CString &strLabel)

Protected Member Functions

CUndoButton * | GetParentButton () const
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

int | m_nLabelHeight
CRect | m_rectLabel
CString | m_strLabel
CUndoListBox m_wndList

Detailed Description

Definition at line 19 of file UndoBar.h.

Constructor & Destructor Documentation

CUndoBar::CUndoBar ( )

Definition at line 27 of file UndoBar.cpp.

                   : m_wndList(*this), m_nLabelHeight(0)
#pragma warning(default: 4355)
{
  m_rectLabel.SetRectEmpty();
}

CUndoBar::~CUndoBar ( ) [virtual]

Definition at line 33 of file UndoBar.cpp.

{
}

Member Function Documentation

CSize CUndoBar::CalcSize ( BOOL bVertDock ) [virtual]

Definition at line 68 of file UndoBar.cpp.

{
  return CSize(160, 115);
}

void CUndoBar::DoUndo ( )

Definition at line 142 of file UndoBar.cpp.

{
  CUndoButton* pUndoButton = GetParentButton();
  ASSERT_VALID(pUndoButton);

  pUndoButton->m_nSelNum = m_wndList.GetSelCount() + 1;

  CMDIChildWnd* pChildFrame = ((CMDIFrameWndEx*)GetTopLevelFrame())->MDIGetActive();
  if (pChildFrame)
  {
    CEditView* pView = DYNAMIC_DOWNCAST(CEditView, pChildFrame->GetActiveView());
    if (pView != NULL)
    {
      //pView->OnEditUndo(); TODO
    }
    else
    {
      ASSERT(FALSE);
    }
  }
  else
  {
    ASSERT(FALSE);
  }

  GetParent()->PostMessage(WM_CLOSE);
}

CUndoButton * CUndoBar::GetParentButton ( ) const [protected]

Definition at line 73 of file UndoBar.cpp.

{
  // Get parent button:
  CUndoButton* pUndoButton = NULL;

  CUndoMenu* pParentMenu = DYNAMIC_DOWNCAST(CUndoMenu, GetParent());
  if (pParentMenu != NULL)
  {
    pUndoButton = DYNAMIC_DOWNCAST(CUndoButton, pParentMenu->GetParentButton());
  }

  return pUndoButton;
}

int CUndoBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 107 of file UndoBar.cpp.

{
  if (CMFCPopupMenuBar::OnCreate(lpCreateStruct) == -1)
    return -1;

  CFont* pMenuFont = (CFont*) &CMFCMenuBar::GetMenuFont();

  // Set label height:
  CClientDC dc(this);
  CFont* pOldFont = dc.SelectObject(pMenuFont);

  TEXTMETRIC tm;
  dc.GetTextMetrics(&tm);

  m_nLabelHeight = tm.tmHeight + 2;

  dc.SelectObject(pOldFont);

  CRect rectDummy(0, 0, 0, 0);
  m_wndList.Create(WS_VISIBLE | WS_CHILD | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | WS_VSCROLL | LBS_MULTIPLESEL, rectDummy, this, ID_LIST);
  m_wndList.ModifyStyleEx(0, WS_EX_CLIENTEDGE);

  m_wndList.SetFont(pMenuFont);

  CUndoButton* pUndoButton = GetParentButton();
  ASSERT_VALID(pUndoButton);

  for (POSITION pos = pUndoButton->m_lstActions.GetHeadPosition(); pos != NULL;)
  {
    m_wndList.AddString(pUndoButton->m_lstActions.GetNext(pos));
  }

  return 0;
}

void CUndoBar::OnFillBackground ( CDC * pDC ) [virtual]

Definition at line 45 of file UndoBar.cpp.

{
  ASSERT_VALID(pDC);

  CRect rectClient;
  GetClientRect(rectClient);

  ::FillRect(pDC->GetSafeHdc(), &rectClient, ::GetSysColorBrush(COLOR_3DFACE));

  // Draw label:
  pDC->Draw3dRect(m_rectLabel, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DHILIGHT));

  CFont* pOldFont = pDC->SelectObject((CFont*) &CMFCMenuBar::GetMenuFont());
  pDC->SetBkMode(TRANSPARENT);
  pDC->SetTextColor(::GetSysColor(COLOR_BTNTEXT));

  CRect rectText = m_rectLabel;
  rectText.DeflateRect(1, 1);
  pDC->DrawText(m_strLabel, rectText, DT_CENTER | DT_VCENTER);

  pDC->SelectObject(pOldFont);
}

void CUndoBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 87 of file UndoBar.cpp.

{
  const int nMargin = 5;

  CMFCPopupMenuBar::OnSize(nType, cx, cy);

  CRect rectClient;
  GetClientRect(rectClient);

  rectClient.DeflateRect(nMargin, nMargin);

  m_rectLabel = rectClient;
  m_rectLabel.top = m_rectLabel.bottom - m_nLabelHeight;

  CRect rectList = rectClient;
  rectList.bottom = m_rectLabel.top - nMargin;

  m_wndList.MoveWindow(rectList);
}

void CUndoBar::SetLabel ( const CString & strLabel )

Definition at line 170 of file UndoBar.cpp.

{
  m_strLabel = strLabel;

  if (GetSafeHwnd() != NULL)
  {
    InvalidateRect(m_rectLabel);
    UpdateWindow();
  }
}

Member Data Documentation

int CUndoBar::m_nLabelHeight [protected]

Definition at line 31 of file UndoBar.h.

CRect CUndoBar::m_rectLabel [protected]

Definition at line 30 of file UndoBar.h.

CString CUndoBar::m_strLabel [protected]

Definition at line 32 of file UndoBar.h.

CUndoListBox CUndoBar::m_wndList [protected]

Definition at line 29 of file UndoBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/UndoBar.h
  • vc2008fp/VisualStudioDemo/UndoBar.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CUndoButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Friends

CUndoButton Class Reference

#include "UndoBar.h"

List of all members.

Public Member Functions

CUndoButton ()
CUndoButton (UINT uiCmdID, LPCTSTR lpszText)
int | GetSelNum ()
void | ResetSelNum ()

Public Attributes

CStringList | m_lstActions
int | m_nSelNum

Protected Member Functions

virtual CMFCPopupMenu * | CreatePopupMenu ()
virtual BOOL | IsEmptyMenuAllowed () const
virtual BOOL | IsExclusive () const
virtual void | OnChangeParentWnd (CWnd *pWndParent)

Friends

class | CUndoBar

Detailed Description

Definition at line 79 of file UndoBar.h.

Constructor & Destructor Documentation

CUndoButton::CUndoButton ( ) [inline]

Definition at line 86 of file UndoBar.h.

  {
  }

CUndoButton::CUndoButton | ( | UINT | uiCmdID,
 |  | LPCTSTR | lpszText |
 | ) |  |  | [inline]

Definition at line 90 of file UndoBar.h.

                                              : CMFCToolBarMenuButton(uiCmdID, NULL, GetCmdMgr()->GetCmdImage(uiCmdID, FALSE), lpszText)
  {
    m_nSelNum = 0;
  }

Member Function Documentation

CMFCPopupMenu * CUndoButton::CreatePopupMenu ( ) [protected, virtual]

Definition at line 186 of file UndoBar.cpp.

{
  if (CMFCToolBar::IsCustomizeMode() ||(m_nStyle & TBBS_DISABLED))
  {
    return NULL;
  }

  CUndoMenu* pPopupMenu = new CUndoMenu;

  ResetSelNum();

#if 0
  CMDIChildWnd* pChildFrame = ((CMDIFrameWndEx*)::AfxGetMainWnd())->MDIGetActive();
  if (pChildFrame)
  {
    CVisualStudioDemoView* pView = (CVisualStudioDemoView*)pChildFrame->GetActiveView();

    if (pView && pView->IsKindOf(RUNTIME_CLASS(CVisualStudioDemoView)))
    {
      CDWordArray dwaUAT;

      // Setup undo actions:
      switch (m_nID)
      {
      case ID_EDIT_UNDO:
        pView->GetUndoActions(m_lstActions);

        break;
      case ID_EDIT_REDO:
        pView->GetRedoActions(m_lstActions);

        break;
      default:
        break;
      }
    }
    else
    {
      ASSERT(FALSE);
      m_lstActions.RemoveAll();
    }
  }
  else
  {
    ASSERT(FALSE);
    m_lstActions.RemoveAll();
  }
#endif

  return pPopupMenu;
}

int CUndoButton::GetSelNum ( ) [inline]

Definition at line 98 of file UndoBar.h.

  {
    return m_nSelNum;
  }

virtual BOOL CUndoButton::IsEmptyMenuAllowed ( ) const [inline, protected, virtual]

Definition at line 111 of file UndoBar.h.

  {
    return TRUE;
  }

virtual BOOL CUndoButton::IsExclusive ( ) const [inline, protected, virtual]

Definition at line 122 of file UndoBar.h.

  {
    return TRUE;
  }

virtual void CUndoButton::OnChangeParentWnd ( CWnd * pWndParent ) [inline, protected, virtual]

Definition at line 116 of file UndoBar.h.

  {
    CMFCToolBarMenuButton::OnChangeParentWnd(pWndParent);
    m_bDrawDownArrow = TRUE;
  }

void CUndoButton::ResetSelNum ( ) [inline]

Definition at line 103 of file UndoBar.h.

  {
    m_nSelNum = 0;
  }

Friends And Related Function Documentation

friend class CUndoBar [friend]

Definition at line 81 of file UndoBar.h.

Member Data Documentation

CStringList CUndoButton::m_lstActions

Definition at line 95 of file UndoBar.h.

int CUndoButton::m_nSelNum

Definition at line 96 of file UndoBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/UndoBar.h
  • vc2008fp/VisualStudioDemo/UndoBar.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CUndoListBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CUndoListBox Class Reference

#include "UndoListBox.h"

List of all members.

Public Member Functions

CUndoListBox (CUndoBar &bar)
virtual | ~CUndoListBox ()

Protected Member Functions

afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)

Protected Attributes

CUndoBar & m_Bar

Detailed Description

Definition at line 17 of file UndoListBox.h.

Constructor & Destructor Documentation

CUndoListBox::CUndoListBox ( CUndoBar & bar )

Definition at line 23 of file UndoListBox.cpp.

                                        : m_Bar(bar)
{
}

CUndoListBox::~CUndoListBox ( ) [virtual]

Definition at line 27 of file UndoListBox.cpp.

{
}

Member Function Documentation

void CUndoListBox::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 39 of file UndoListBox.cpp.

{
  BOOL bOutside;
  ItemFromPoint(point, bOutside);

  if (!bOutside)
  {
    m_Bar.DoUndo();
  }

  if (IsWindow(GetSafeHwnd()))
  {
    CListBox::OnLButtonUp(nFlags, point);
  }
}

void CUndoListBox::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 55 of file UndoListBox.cpp.

{
  CListBox::OnMouseMove(nFlags, point);

  BOOL bOutside;
  int iItem = ItemFromPoint(point, bOutside);

  if (!bOutside)
  {
    SelItemRange(FALSE, iItem + 1, GetCount() - 1);

    if (iItem == 0)
    {
      SetSel(0);
    }
    else
    {
      SelItemRange(TRUE, 0, iItem);
    }

    CString strLabel;
    strLabel.Format(_T("Undo %d Actions"), iItem + 1);

    m_Bar.SetLabel(strLabel);
  }
}

Member Data Documentation

CUndoBar& CUndoListBox::m_Bar [protected]

Definition at line 25 of file UndoListBox.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/UndoListBox.h
  • vc2008fp/VisualStudioDemo/UndoListBox.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CUndoMenu Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions | Private Member Functions | Private Attributes

CUndoMenu Class Reference

#include "UndoBar.h"

List of all members.

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Private Member Functions

virtual CMFCPopupMenuBar * | GetMenuBar ()

Private Attributes

CUndoBar m_wndUndoBar

Detailed Description

Definition at line 59 of file UndoBar.h.

Member Function Documentation

virtual CMFCPopupMenuBar* CUndoMenu::GetMenuBar ( ) [inline, private, virtual]

Definition at line 63 of file UndoBar.h.

  {
    return &m_wndUndoBar;
  }

int CUndoMenu::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 247 of file UndoBar.cpp.

{
  if (CMiniFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

  DWORD toolbarStyle = AFX_DEFAULT_TOOLBAR_STYLE;
  if (m_AnimationType != NO_ANIMATION && !CMFCToolBar::IsCustomizeMode())
  {
    toolbarStyle &= ~WS_VISIBLE;
  }

  if (!m_wndUndoBar.Create(this, toolbarStyle | CBRS_TOOLTIPS | CBRS_FLYBY, 1))
  {
    TRACE(_T("Can't create popup menu bar\n"));
    return -1;
  }

  CWnd* pWndParent = GetParent();
  ASSERT_VALID(pWndParent);

  m_wndUndoBar.SetOwner(pWndParent);
  m_wndUndoBar.SetPaneStyle(m_wndUndoBar.GetPaneStyle() | CBRS_TOOLTIPS);

  ActivatePopupMenu(GetTopLevelFrame(), this);
  RecalcLayout();

  return 0;
}

Member Data Documentation

CUndoBar CUndoMenu::m_wndUndoBar [private]

Definition at line 68 of file UndoBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/UndoBar.h
  • vc2008fp/VisualStudioDemo/UndoBar.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CUnit Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CUnit Class Reference

#include "options.h"

List of all members.

Public Member Functions

CUnit ()
CUnit (int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv, int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev)
CUnit (int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv, int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev)
CUnit ()
const CUnit & | operator= (const CUnit &unit)
const CUnit & | operator= (const CUnit &unit)

Public Attributes

BOOL | m_bSpaceAbbrev
UINT m_nAbbrevID
int | m_nLargeDiv
int | m_nMediumDiv
int | m_nMinMove
int | m_nSmallDiv
int | m_nTPU
CString | m_strAbbrev

Detailed Description

Definition at line 12 of file options.h.

Constructor & Destructor Documentation

CUnit::CUnit ( ) [inline]

Definition at line 24 of file options.h.

{}

CUnit::CUnit | ( | int | nTPU,
 |  | int | nSmallDiv,
 |  | int | nMediumDiv,
 |  | int | nLargeDiv,
 |  | int | nMinMove,
 |  | UINT | nAbbrevID,
 |  | BOOL | bSpaceAbbrev
 | ) |  |

Definition at line 86 of file options.cpp.

{
  m_nTPU = nTPU;
  m_nSmallDiv = nSmallDiv;
  m_nMediumDiv = nMediumDiv;
  m_nLargeDiv = nLargeDiv;
  m_nMinMove = nMinMove;
  m_nAbbrevID = nAbbrevID;
  m_bSpaceAbbrev = bSpaceAbbrev;
}

CUnit::CUnit ( ) [inline]

Definition at line 26 of file options.h.

{}

CUnit::CUnit | ( | int | nTPU,
 |  | int | nSmallDiv,
 |  | int | nMediumDiv,
 |  | int | nLargeDiv,
 |  | int | nMinMove,
 |  | UINT | nAbbrevID,
 |  | BOOL | bSpaceAbbrev
 | ) |  |

Member Function Documentation

const CUnit & CUnit::operator= ( const CUnit & unit )

Definition at line 73 of file options.cpp.

{
  m_nTPU = unit.m_nTPU;
  m_nSmallDiv = unit.m_nSmallDiv;
  m_nMediumDiv = unit.m_nMediumDiv;
  m_nLargeDiv = unit.m_nLargeDiv;
  m_nMinMove = unit.m_nMinMove;
  m_nAbbrevID = unit.m_nAbbrevID;
  m_bSpaceAbbrev = unit.m_bSpaceAbbrev;
  m_strAbbrev = unit.m_strAbbrev;
  return *this;
}

const CUnit& CUnit::operator= ( const CUnit & unit )

Member Data Documentation

BOOL CUnit::m_bSpaceAbbrev

Definition at line 21 of file options.h.

UINT CUnit::m_nAbbrevID

Definition at line 20 of file options.h.

int CUnit::m_nLargeDiv

Definition at line 18 of file options.h.

int CUnit::m_nMediumDiv

Definition at line 17 of file options.h.

int CUnit::m_nMinMove

Definition at line 19 of file options.h.

int CUnit::m_nSmallDiv

Definition at line 16 of file options.h.

int CUnit::m_nTPU

Definition at line 15 of file options.h.

CString CUnit::m_strAbbrev

Definition at line 22 of file options.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/options.h
  • vc2008fp/WordPad/options.h
  • ole/wordpad/options.cpp
  • vc2008fp/WordPad/options.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CUnitsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Attributes

CUnitsPage Class Reference

#include "unitspag.h"

Inherits CCSPropertyPage, and CCSPropertyPage.

List of all members.

Public Types

enum | { IDD = IDD_OPTIONS_UNITS }
enum | { IDD = IDD_OPTIONS_UNITS }

Public Member Functions

CUnitsPage ()
CUnitsPage ()

Public Attributes

BOOL | m_bWordSel
int | m_nUnits

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | DoDataExchange (CDataExchange *pDX)
virtual const DWORD * | GetHelpIDs ()
virtual const DWORD * | GetHelpIDs ()

Static Protected Attributes

static const DWORD | m_nHelpIDs []

Detailed Description

Definition at line 15 of file unitspag.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file unitspag.h.

{ IDD = IDD_OPTIONS_UNITS };

anonymous enum
Enumerator:
IDD

Definition at line 25 of file unitspag.h.

{ IDD = IDD_OPTIONS_UNITS };

Constructor & Destructor Documentation

CUnitsPage::CUnitsPage ( )

Definition at line 36 of file unitspag.cpp.

                       : CCSPropertyPage(CUnitsPage::IDD)
{
  //{{AFX_DATA_INIT(CUnitsPage)
  m_nUnits = -1;
  m_bWordSel = FALSE;
  //}}AFX_DATA_INIT
}

CUnitsPage::CUnitsPage ( )

Member Function Documentation

void CUnitsPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 45 of file unitspag.cpp.

{
  CCSPropertyPage::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CUnitsPage)
  DDX_Radio(pDX, IDC_UNITS_IN, m_nUnits);
  DDX_Check(pDX, IDC_WORDSEL, m_bWordSel);
  //}}AFX_DATA_MAP
}

virtual void CUnitsPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]
virtual const DWORD* CUnitsPage::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSPropertyPage.

Definition at line 41 of file unitspag.h.

{return m_nHelpIDs;}

virtual const DWORD* CUnitsPage::GetHelpIDs ( ) [inline, protected, virtual]

Implements CCSPropertyPage.

Definition at line 39 of file unitspag.h.

{return m_nHelpIDs;}

Member Data Documentation

BOOL CUnitsPage::m_bWordSel

Definition at line 25 of file unitspag.h.

static const DWORD CUnitsPage::m_nHelpIDs [static, protected]
Initial value:
{
  IDC_BOX, IDH_COMM_GROUPBOX,
  IDC_UNITS_IN, IDH_WORDPAD_INCHES,
  IDC_UNITS_CM, IDH_WORDPAD_CENTIMETERS,
  IDC_UNITS_PT, IDH_WORDPAD_POINTS,
  IDC_UNITS_PI, IDH_WORDPAD_PICAS,
  IDC_WORDSEL, IDH_WORDPAD_OPTIONS_AUTOWORDSEL,
  0, 0
}

Definition at line 38 of file unitspag.h.

int CUnitsPage::m_nUnits

Definition at line 24 of file unitspag.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/unitspag.h
  • vc2008fp/WordPad/unitspag.h
  • ole/wordpad/unitspag.cpp
  • vc2008fp/WordPad/unitspag.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVariantAssoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CVariantAssoc Class Reference

#include "varassoc.h"

List of all members.

Public Member Functions

CVariantAssoc ()
VARIANT | GetKey ()
VARIANT | GetValue ()
virtual void | OnFinalRelease ()
void | SetKey (const VARIANT &)
void | SetValue (const VARIANT &)

Public Attributes

COleVariant | m_varKey
COleVariant | m_varValue

Protected Member Functions

virtual | ~CVariantAssoc ()
afx_msg VARIANT | GetKey ()
afx_msg VARIANT | GetValue ()

Detailed Description

Definition at line 15 of file varassoc.h.

Constructor & Destructor Documentation

CVariantAssoc::CVariantAssoc ( )

Definition at line 26 of file varassoc.cpp.

{
  EnableAutomation();

  // To keep the application running as long as an OLE automation
  //  object is active, the constructor calls AfxOleLockApp.

  AfxOleLockApp();
}

CVariantAssoc::~CVariantAssoc ( ) [protected, virtual]

Definition at line 36 of file varassoc.cpp.

{
  // To terminate the application when all objects created with
  //  with OLE automation, the destructor calls AfxOleUnlockApp.

  AfxOleUnlockApp();
}

Member Function Documentation

VARIANT CVariantAssoc::GetKey ( ) [protected]

Definition at line 82 of file varassoc.cpp.

{
  COleVariant varResult = m_varKey;
  return varResult.Detach();
}

VARIANT CVariantAssoc::GetKey ( )
VARIANT CVariantAssoc::GetValue ( )
VARIANT CVariantAssoc::GetValue ( ) [protected]

Definition at line 88 of file varassoc.cpp.

{
  COleVariant varResult = m_varValue;
  return varResult.Detach();
}

void CVariantAssoc::OnFinalRelease ( ) [virtual]

Definition at line 44 of file varassoc.cpp.

{
  // When the last reference for an automation object is released
  //  OnFinalRelease is called.  This implementation deletes the
  //  object.  Add additional cleanup required for your object before
  //  deleting it from memory.

  delete this;
}

void CVariantAssoc::SetKey ( const VARIANT & propVal )

Definition at line 214 of file ipremote.cpp.

{
  SetProperty(0x1, VT_VARIANT, &propVal);
}

void CVariantAssoc::SetValue ( const VARIANT & propVal )

Definition at line 226 of file ipremote.cpp.

{
  SetProperty(0x2, VT_VARIANT, &propVal);
}

Member Data Documentation

COleVariant CVariantAssoc::m_varKey

Definition at line 25 of file varassoc.h.

COleVariant CVariantAssoc::m_varValue

Definition at line 26 of file varassoc.h.

The documentation for this class was generated from the following files:
  • ole/inproc/varassoc.h
  • ole/ipdrive/ipremote.h
  • ole/inproc/varassoc.cpp
  • ole/ipdrive/ipremote.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVariantMap Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CVariantMap Class Reference

#include "varmap.h"

List of all members.

Public Member Functions

LPUNKNOWN | Get_NewEnum ()
long | GetCount ()
long | GetI1 ()
long | GetI2 ()
VARIANT | GetItem (const VARIANT &from)
CString | GetStr1 ()
CString | GetStr2 ()
BOOL | IsEmpty ()
virtual void | OnFinalRelease ()
void | RemoveAll ()
void | RemoveKey (const VARIANT &key)
void | SetAt (const VARIANT &from, const VARIANT &to)
void | SetCount (long)
void | SetI1 (long)
void | SetI2 (long)
void | SetStr1 (LPCTSTR)
void | SetStr2 (LPCTSTR)

Public Attributes

long | m_i2
CString | m_str2

Protected Member Functions

CVariantMap ()
virtual | ~CVariantMap ()
afx_msg long | GetCount ()
afx_msg long | GetI2 ()
afx_msg VARIANT | GetItem (const VARIANT FAR &from)
afx_msg LPUNKNOWN | GetNewEnum ()
afx_msg BSTR | GetStr2 ()
afx_msg BOOL | IsEmpty ()
afx_msg void | RemoveAll ()
afx_msg void | RemoveKey (const VARIANT FAR &key)
afx_msg void | SetAt (const VARIANT FAR &from, const VARIANT FAR &to)
afx_msg void | SetI2 (long nNewValue)
afx_msg void | SetStr2 (LPCTSTR lpszNewValue)

Protected Attributes

long | m_i1
CMapVariantToVariant m_map
CString | m_str1

Detailed Description

Definition at line 15 of file varmap.h.

Constructor & Destructor Documentation

CVariantMap::CVariantMap ( ) [protected]

Definition at line 28 of file varmap.cpp.

{
  EnableAutomation();

  // To keep the application running as long as an OLE automation
  //  object is active, the constructor calls AfxOleLockApp.

  AfxOleLockApp();
}

CVariantMap::~CVariantMap ( ) [protected, virtual]

Definition at line 38 of file varmap.cpp.

{
  // To terminate the application when all objects created with
  //  with OLE automation, the destructor calls AfxOleUnlockApp.

  AfxOleUnlockApp();
}

Member Function Documentation

LPUNKNOWN CVariantMap::Get_NewEnum ( )

Definition at line 119 of file ipremote.cpp.

{
  LPUNKNOWN result;
  InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
  return result;
}

long CVariantMap::GetCount ( )
long CVariantMap::GetCount ( void ) [protected]

Definition at line 161 of file varmap.cpp.

{
  return (long)m_map.GetCount();
}

long CVariantMap::GetI1 ( )

Definition at line 42 of file ipremote.cpp.

{
  long result;
  GetProperty(0x2, VT_I4, (void*)&result);
  return result;
}

long CVariantMap::GetI2 ( )
long CVariantMap::GetI2 ( ) [protected]

Definition at line 181 of file varmap.cpp.

{
  return m_i2;
}

VARIANT CVariantMap::GetItem ( const VARIANT FAR & from ) [protected]

Definition at line 144 of file varmap.cpp.

{
  COleVariant varResult;
  m_map.Lookup(from, varResult);
  return varResult.Detach();
}

VARIANT CVariantMap::GetItem ( const VARIANT & from )

Definition at line 109 of file ipremote.cpp.

{
  VARIANT result;
  static BYTE BASED_CODE parms[] =
    VTS_VARIANT;
  InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms,
    &from);
  return result;
}

LPUNKNOWN CVariantMap::GetNewEnum ( ) [protected]

Definition at line 98 of file varmap.cpp.

{
  #pragma warning (suppress: 6211)
  CEnumVariant* pEnum = new CEnumVariant;
  int nCount = (int)m_map.GetCount();
  #pragma warning (suppress: 6211)
  VARIANT* pContents = new VARIANT[nCount];
  unsigned int i = 0;

  TRY
  {
    POSITION pos = m_map.GetStartPosition();
    while (pos != NULL)
    {
      ASSERT(i < (unsigned int)nCount);

      // get next value from the map and create a CVariantAssoc from it
      #pragma warning (suppress: 6014)
      CVariantAssoc* pAssoc = new CVariantAssoc;
      m_map.GetNextAssoc(pos, pAssoc->m_varKey, pAssoc->m_varValue);

      // stuff it into a variant
      pContents[i].pdispVal = pAssoc->GetIDispatch(FALSE);
      pContents[i].vt = VT_DISPATCH;
      ++i;
    }
  }
  CATCH_ALL(e)
  {
    while (--i >= 0)
      VariantClear(&pContents[i]);
    delete [] pContents;

    THROW_LAST();
  }
  END_CATCH_ALL
  pEnum->SetContents(pContents, nCount);

  return pEnum->GetInterface(&IID_IUnknown);
}

CString CVariantMap::GetStr1 ( )

Definition at line 18 of file ipremote.cpp.

{
  CString result;
  GetProperty(0x1, VT_BSTR, (void*)&result);
  return result;
}

CString CVariantMap::GetStr2 ( ) [protected]

Definition at line 171 of file varmap.cpp.

{
  return m_str2.AllocSysString();
}

CString CVariantMap::GetStr2 ( )
BOOL CVariantMap::IsEmpty ( )
BOOL CVariantMap::IsEmpty ( ) [protected]

Definition at line 166 of file varmap.cpp.

{
  return m_map.IsEmpty();
}

void CVariantMap::OnFinalRelease ( ) [virtual]

Definition at line 46 of file varmap.cpp.

{
  // When the last reference for an automation object is released
  //  OnFinalRelease is called.  This implementation deletes the
  //  object.  Add additional cleanup required for your object before
  //  deleting it from memory.

  delete this;
}

void CVariantMap::RemoveAll ( ) [protected]

Definition at line 151 of file varmap.cpp.

{
  m_map.RemoveAll();
}

void CVariantMap::RemoveAll ( )
void CVariantMap::RemoveKey ( const VARIANT & key )

Definition at line 94 of file ipremote.cpp.

{
  static BYTE BASED_CODE parms[] =
    VTS_VARIANT;
  InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
     &key);
}

void CVariantMap::RemoveKey ( const VARIANT FAR & key ) [protected]

Definition at line 156 of file varmap.cpp.

{
  m_map.RemoveKey(key);
}

void CVariantMap::SetAt | ( | const VARIANT & | from,
 |  | const VARIANT & | to
 | ) |  |

Definition at line 81 of file ipremote.cpp.

{
  static BYTE BASED_CODE parms[] =
    VTS_VARIANT VTS_VARIANT;
  InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
     &from, &to);
}

void CVariantMap::SetAt | ( | const VARIANT FAR & | from,
 |  | const VARIANT FAR & | to |
 | ) |  |  | [protected]

Definition at line 139 of file varmap.cpp.

{
  m_map.SetAt(from, to);
}

void CVariantMap::SetCount ( long propVal )

Definition at line 73 of file ipremote.cpp.

{
  SetProperty(0x5, VT_I4, propVal);
}

void CVariantMap::SetI1 ( long propVal )

Definition at line 49 of file ipremote.cpp.

{
  SetProperty(0x2, VT_I4, propVal);
}

void CVariantMap::SetI2 ( long nNewValue ) [protected]

Definition at line 186 of file varmap.cpp.

{
  m_i2 = nNewValue;
}

void CVariantMap::SetI2 ( long )
void CVariantMap::SetStr1 ( LPCTSTR propVal )

Definition at line 25 of file ipremote.cpp.

{
  SetProperty(0x1, VT_BSTR, propVal);
}

void CVariantMap::SetStr2 ( LPCTSTR lpszNewValue ) [protected]

Definition at line 176 of file varmap.cpp.

{
  m_str2 = lpszNewValue;
}

void CVariantMap::SetStr2 ( LPCTSTR )

Member Data Documentation

long CVariantMap::m_i1 [protected]

Definition at line 52 of file varmap.h.

long CVariantMap::m_i2

Definition at line 24 of file varmap.h.

CMapVariantToVariant CVariantMap::m_map [protected]

Definition at line 39 of file varmap.h.

CString CVariantMap::m_str1 [protected]

Definition at line 51 of file varmap.h.

CString CVariantMap::m_str2

Definition at line 23 of file varmap.h.

The documentation for this class was generated from the following files:
  • ole/inproc/varmap.h
  • ole/ipdrive/ipremote.h
  • ole/inproc/varmap.cpp
  • ole/ipdrive/ipremote.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVarUseApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CVarUseApp Class Reference

#include "VariantUse.h"

List of all members.

Public Member Functions

CVarUseApp ()
virtual BOOL InitInstance ()

Detailed Description

Definition at line 29 of file VariantUse.h.

Constructor & Destructor Documentation

CVarUseApp::CVarUseApp ( )

Definition at line 35 of file VariantUse.cpp.

{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

BOOL CVarUseApp::InitInstance ( ) [virtual]

Definition at line 49 of file VariantUse.cpp.

{
  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  CVarUseDlg dlg;
  m_pMainWnd = &dlg;
  int nResponse = (int)dlg.DoModal();
  if (nResponse == IDOK)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
  }
  else if (nResponse == IDCANCEL)
  {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
  }

  // Since the dialog has been closed, return FALSE so that we exit the
  //  application, rather than start the application's message pump.
  return FALSE;
}

The documentation for this class was generated from the following files:
  • general/VariantUse/VariantUse.h
  • general/VariantUse/VariantUse.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVarUseDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CVarUseDlg Class Reference

#include "VariantUseDlg.h"

List of all members.

Public Types

enum | { IDD = IDD_VARIANTUSE_DIALOG }

Public Member Functions

CVarUseDlg (CWnd *pParent=NULL)
void | FunctionCallWithVariant (VARIANT myVariant)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnBasic ()
afx_msg void | OnCurrency ()
afx_msg void | OnDate ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnMultiDimensionArray ()
afx_msg void | OnOleArray ()
afx_msg void | OnPaint ()
afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSafeArray ()
afx_msg void | OnStrings ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Protected Attributes

HICON | m_hIcon

Detailed Description

Definition at line 21 of file VariantUseDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 30 of file VariantUseDlg.h.

{ IDD = IDD_VARIANTUSE_DIALOG };

Constructor & Destructor Documentation

CVarUseDlg::CVarUseDlg ( CWnd * pParent = NULL )

Definition at line 71 of file VariantUseDlg.cpp.

  : CDialog(CVarUseDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CVarUseDlg)
    // NOTE: the ClassWizard will add member initialization here
  //}}AFX_DATA_INIT
  // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

Member Function Documentation

void CVarUseDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 81 of file VariantUseDlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CVarUseDlg)
    // NOTE: the ClassWizard will add DDX and DDV calls here
  //}}AFX_DATA_MAP
}

void CVarUseDlg::FunctionCallWithVariant ( VARIANT myVariant )

Definition at line 462 of file VariantUseDlg.cpp.

{
  HRESULT hr;
  int* pData;
  int count;
  hr = SafeArrayAccessData(myVariant.parray, (void**)&pData); //access the array stored in the varriant.
  for(count = 0; count < 100; count++) ASSERT(pData[count] == count); //check data;
  pData[0] = 1234; //modify data
  SafeArrayUnaccessData(myVariant.parray);
}

void CVarUseDlg::OnBasic ( ) [protected]

Definition at line 268 of file VariantUseDlg.cpp.

{
  //create a variant of the character 'c'
  VARIANT varC;
  varC.vt=VT_UI1;
  varC.cVal = 'c';

  //create a variant of the short 12
  VARIANT varS;
  varS.vt = VT_I2;
  varS.iVal = 12;

  //create a variant of the long 1234567;
  VARIANT varL;
  varL.vt = VT_I4;
  varL.lVal = 1234567;
}

void CVarUseDlg::OnCurrency ( ) [protected]

Definition at line 188 of file VariantUseDlg.cpp.

{
  VARIANT myVar;
  myVar.vt = VT_CY;

  // put 15.15 into the currency variant.
  CURRENCY myValue;
  myValue.Hi = 0;
  myValue.Lo = (LONG)(15*10000 + 1537); // set the value to $15.15;
  myVar.cyVal = myValue;
  //or
  myValue.int64 = (151234);
  myVar.cyVal = myValue;

  //Now get the value from a float and put it into the currency.
  float myMoney = (float)5.37;
  myVar.vt = VT_R4;
  myVar.fltVal = myMoney;
  //no loss of precission.
  ENSURE(SUCCEEDED(VariantChangeType(&myVar, &myVar, 0, VT_CY)));

  //Now get the value from a String
  USES_CONVERSION;
  myVar.bstrVal = SysAllocString(L"23.4345");
  myVar.vt = VT_BSTR;
  ENSURE(SUCCEEDED(VariantChangeType(&myVar, &myVar, 0, VT_CY)));

  //Finally output a currency to a string.
  myVar.cyVal.int64 += myVar.cyVal.int64; // + myVar.cyVal;
  ENSURE(SUCCEEDED(VariantChangeType(&myVar, &myVar, 0, VT_BSTR)));

}

void CVarUseDlg::OnDate ( ) [protected]

Definition at line 428 of file VariantUseDlg.cpp.

{
  VARIANT timeSelection;
  COleDateTime timeNow;
  DATE curDate;
  HRESULT hr;
  //Get current Time.
  timeNow = COleDateTime::GetCurrentTime();

  //Put time into variant.
  timeSelection.vt = VT_DATE;
  timeSelection.date = timeNow.m_dt;

  //Convert Variant into string using Variant Change Type.
  hr = VariantChangeType(&timeSelection, &timeSelection, 0, VT_BSTR);
  CString sCurTime(timeSelection.bstrVal);

  //Get Time as System Time.
  SYSTEMTIME mySysTime;
  timeNow.GetAsSystemTime(mySysTime);

  //Use COleDateTime functionality to get change SYSTEMTIME into DATE.
  COleDateTime pastTime(mySysTime);
  curDate = pastTime.m_dt;

  //Use COldeDateTime Format command to get date as CString.
  LPCTSTR format = _T("%X %z");  //Current time and time zone.
  //Note see "strftime" help for valid formating strings.
  CString sTime = pastTime.Format(format);

}

BOOL CVarUseDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 107 of file VariantUseDlg.cpp.

{
  CDialog::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  if (pSysMenu != NULL)
  {
    CString strAboutMenu;
    strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE);     // Set big icon
  SetIcon(m_hIcon, FALSE);    // Set small icon

  // TODO: Add extra initialization here

  return TRUE;  // return TRUE  unless you set the focus to a control
}

void CVarUseDlg::OnMultiDimensionArray ( ) [protected]

Definition at line 389 of file VariantUseDlg.cpp.

{
  short pMyOriginalData[2][3][4][5];
  HRESULT hr;
  //initialize data
  for(short a = 0; a < 2; a++)
    for(short b = 0; b < 3; b++)
      for(short c = 0; c < 4; c++)
        for(short d = 0; d < 5; d++)
          pMyOriginalData[a][b][c][d] = a*b*c*d;

  SAFEARRAY* pMyArray;
  SAFEARRAYBOUND rgsabound[4];
  for(int count = 2; count < 6; count++)
  {
    rgsabound[count - 2].lLbound = 0;
    rgsabound[count - 2].cElements = count;
  }
  pMyArray = SafeArrayCreate(VT_I2, 4, rgsabound);
  short* pData;
  hr = SafeArrayAccessData(pMyArray, (void**)&pData);
  memcpy_s(pData, 2*3*4*5*2, pMyOriginalData, 2*3*4*5*2);
  short element;
  long location[4] = {1,2,3,4};
  hr = SafeArrayGetElement(pMyArray, location, (void*)&element);
  ASSERT(element == 1*2*3*4);

  hr = SafeArrayDestroy(pMyArray);
  ASSERT(hr != S_OK);
  hr = SafeArrayUnaccessData(pMyArray);
  hr = SafeArrayDestroy(pMyArray);
  ASSERT(hr == S_OK);

}

void CVarUseDlg::OnOleArray ( ) [protected]

Definition at line 366 of file VariantUseDlg.cpp.

{
  //Create and fill an array.
  int* pMyOriginalArray = new int[100];
  int* pData;
  int count;
  for(count = 0; count < 100; count++) pMyOriginalArray[count]=count;

  //Put it into a safe array.
  COleSafeArray myOleSafeArray;
  myOleSafeArray.CreateOneDim(VT_I4, 100, pMyOriginalArray); // create one dimension array of 4-byte values
                                   // 100 entries w/data from pMyOriginalArray.
  // Access that safe array.
  //Get a pointer to the Data.
  myOleSafeArray.AccessData((void**)&pData);
  //verify all of the data.
  for(count = 0; count < 100; count++) ASSERT(pData[count] == pMyOriginalArray[count]);
  myOleSafeArray.UnaccessData();

  //clean up.
  delete[] pMyOriginalArray;
}

void CVarUseDlg::OnPaint ( ) [protected]

Definition at line 156 of file VariantUseDlg.cpp.

{
  if (IsIconic())
  {
    CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
  }
  else
  {
    CDialog::OnPaint();
  }
}

HCURSOR CVarUseDlg::OnQueryDragIcon ( ) [protected]

Definition at line 183 of file VariantUseDlg.cpp.

{
  return (HCURSOR) m_hIcon;
}

void CVarUseDlg::OnSafeArray ( ) [protected]

Definition at line 286 of file VariantUseDlg.cpp.

{

  //Create a standard array;
  int* pMyOriginalArray = new int[100];
  int count;
  for(count = 0; count < 100; count++) pMyOriginalArray[count] = count;

  //Now get ready to put it into a safe array
  HRESULT hr;
  //create an array bound
  SAFEARRAYBOUND rgsabound[1];
  rgsabound[0].lLbound = 0;   //The first (and only) collumn of our array starts at 0.
  rgsabound[0].cElements = 100; //and has 100 elements.

  //create the array
  SAFEARRAY FAR* pMySafeArray;
  pMySafeArray = SafeArrayCreate(VT_I4, 1, rgsabound); //create the array of 4byte integers, one dimension
                             //with the bounds stored in rgsabound.

  //now access the safe array's data.
  int* pData;
  hr = SafeArrayAccessData(  pMySafeArray, (void**)&pData); //Get a pointer to the data.

  //copy the 400 bytes of data from our old array to the new one.
  memcpy_s(pData, 400, pMyOriginalArray, 400);

  //here we verify to you that the data is correct.
  for(count = 0; count < 100; count++) ASSERT(pData[count] == pMyOriginalArray[count]);
  SafeArrayUnaccessData(pMySafeArray);

  //To put the SafeArray in a Variant
  VARIANT myVariant;
  myVariant.parray = pMySafeArray;
  myVariant.vt = VT_ARRAY|VT_I4; // state it's an array and what type it holds.

  //pass the Variant to a function call.
  FunctionCallWithVariant(myVariant);
  //see that the original array was modified.
  hr = SafeArrayAccessData(myVariant.parray, (void**)&pData); //Get a pointer to the data.
  ASSERT(pData[0] == 1234);
  SafeArrayUnaccessData(pMySafeArray);

  //Copy the variant.
  VARIANT NewVariant;
  NewVariant.vt = VT_EMPTY; // must set variant type for copy to work.
  hr = VariantCopy(&NewVariant, &myVariant);

  //check array in copy of variant
  int* pNewData;
  hr = SafeArrayAccessData(NewVariant.parray, (void**) &pNewData);
  for(count = 0; count < 100; count++) ASSERT(pData[count] == pNewData[count]);
  ASSERT(pData != pNewData); //copying the varriant created a new copy of the
                 //array it contained too.  There is now 2 copies of the data.
  SafeArrayUnaccessData(NewVariant.parray);

  //Or you could use CreateVector to create the 1 dimensional array.
  SAFEARRAY* pMyVector = SafeArrayCreateVector(VT_I4, -50, 100);  //Vecoor of VT_I4, starting at 0
                                //with 100 elements.
  int* pVectorData;
  hr = SafeArrayAccessData(pMyVector, (void**)&pVectorData);
  memcpy_s(pVectorData, 400, pMyOriginalArray, 400); //copy the 400 bytes of data from our old array into the new one.
  int element;
  long location[1] = {-50};
  hr = SafeArrayGetElement(pMyVector, location, (void*)&element);
  ASSERT(element == 0); //element -50 is the first element from the original array
  location[0] = 0;
  hr = SafeArrayGetElement(pMyVector, location, (void*)&element);
  ASSERT(element == 50); // element 0 is the 50th element from the original array
  delete[] pMyOriginalArray;
  hr = SafeArrayDestroy(pMySafeArray);
  hr = SafeArrayDestroy(pMyVector);
  hr = SafeArrayDestroy(NewVariant.parray);

}

void CVarUseDlg::OnStrings ( ) [protected]

Definition at line 225 of file VariantUseDlg.cpp.

{
  //Create a BSTR and assign it to a Variant
  BSTR x = SysAllocString(L"Hello");
  VARIANT myVariant;
  myVariant.vt = VT_BSTR;
  myVariant.bstrVal = x;
  SysFreeString(x);

  //Create a CString and change it to a variant;
  CString myCString(_T("My String"));
  CString mySecondString;

  BSTR y = myCString.AllocSysString();
  myVariant.bstrVal = y;
  mySecondString = y;
  SysFreeString(y);

  //Create two BSTRs and add them.
  BSTR a = SysAllocString(L"One two ");
  BSTR b = SysAllocString(L"three four.");
  _bstr_t my_bstr_t(a, TRUE);
  my_bstr_t += b;
  myVariant.bstrVal = my_bstr_t;
  // or
  myVariant.bstrVal = _bstr_t(a, FALSE) + b;

  //Change a bstr to a CString.
  CString ANewString(b);
  //or if CString already exists.
  myCString = b;

  //Use of CComBSTR
  CComBSTR myCComBSTR(L"Hello");
  myCComBSTR.Append(L", how are you?");
  VARIANT varFromCCom;
  varFromCCom.vt = VT_BSTR;
  varFromCCom.bstrVal = myCComBSTR;

}

void CVarUseDlg::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 139 of file VariantUseDlg.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg dlgAbout;
    dlgAbout.DoModal();
  }
  else
  {
    CDialog::OnSysCommand(nID, lParam);
  }
}

Member Data Documentation

HICON CVarUseDlg::m_hIcon [protected]

Definition at line 42 of file VariantUseDlg.h.

The documentation for this class was generated from the following files:
  • general/VariantUse/VariantUseDlg.h
  • general/VariantUse/VariantUseDlg.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CVector Class Reference

#include "piece.h"

List of all members.

Public Member Functions

CVector (long nRad, double dAngle)
CVector (long x=0, long y=0)
CVector (CVector &vecClone)
CVector (CPoint pt)
double | GetAngle () const
long | GetLength () const
operator CPoint () const
CVector | operator+ (CVector vector2) const
CVector | operator+ (CPoint pt) const
CVector | operator+= (CPoint pt)
CVector | operator- (CPoint pt) const
CVector | operator- (CVector vector2) const
CVector | operator-= (CPoint pt)
CVector | operator= (CPoint pt)
CVector & | operator= (CVector &vector2)
void | Scale (long nNumer, long nDenom)
void | SetValueLengthAngle (long nRadius, double dAngle)

Public Attributes

double | m_dX
double | m_dY

Detailed Description

Definition at line 60 of file piece.h.

Constructor & Destructor Documentation

CVector::CVector | ( | long | nRad,
 |  | double | dAngle
 | ) |  |

Definition at line 30 of file piece.cpp.

{
  m_dX = nRadius * cos(dAngle);
  m_dY = nRadius * sin(dAngle);
}

CVector::CVector | ( | long | x = 0,
 |  | long | y = 0
 | ) |  |

Definition at line 24 of file piece.cpp.

{
  m_dX = (double)x;
  m_dY = (double)y;
}

CVector::CVector ( CPoint pt )

Definition at line 42 of file piece.cpp.

{
  m_dX = static_cast<double>(pt.x);
  m_dY = static_cast<double>(pt.y);
}

CVector::CVector ( CVector & vecClone )

Definition at line 48 of file piece.cpp.

{
  *this = vector2;
}

Member Function Documentation

double CVector::GetAngle ( ) const

Definition at line 115 of file piece.cpp.

{
  if (m_dX == 0 && m_dY > 0)  // the angle is pi/2
    return PI / 2.0;

  if (m_dX == 0 && m_dY < 0)
    return 1.5 * PI;

  if (m_dX ==0 && m_dY == 0)
    return 0;

  double dAngle = atan(m_dY / m_dX);
  if (m_dY <= 0 && m_dX < 0 || m_dY > 0 && m_dX < 0)
    dAngle += PI;

  return dAngle;
}

long CVector::GetLength ( ) const

Definition at line 133 of file piece.cpp.

{
  double dSqLen = m_dX * m_dX + m_dY * m_dY;
  return static_cast<long>(sqrt(dSqLen));
}

__inline CVector::operator CPoint ( ) const

Definition at line 95 of file piece.cpp.

{
  CPoint ptRet(static_cast<long>(m_dX), static_cast<long>(m_dY));
  return ptRet;
}

__inline CVector CVector::operator+ ( CVector vector2 ) const

Definition at line 53 of file piece.cpp.

{
  CVector vecSum((long)(m_dX + vector2.m_dX), (long)(m_dY + vector2.m_dY));
  return vecSum;
}

__inline CVector CVector::operator+ ( CPoint pt ) const

Definition at line 72 of file piece.cpp.

{
  CVector vectFinal;
  vectFinal.m_dX = m_dX + pt.x;
  vectFinal.m_dY = m_dY + pt.y;
  return vectFinal;
}

__inline CVector CVector::operator+= ( CPoint pt )

Definition at line 65 of file piece.cpp.

{
  m_dX += static_cast<double>(pt.x);
  m_dY += static_cast<double>(pt.y);
  return *this;
}

__inline CVector CVector::operator- ( CPoint pt ) const

Definition at line 80 of file piece.cpp.

{
  CVector vectFinal;
  vectFinal.m_dX = m_dX + pt.x;
  vectFinal.m_dY = m_dY + pt.y;
  return vectFinal;
}

__inline CVector CVector::operator- ( CVector vector2 ) const

Definition at line 59 of file piece.cpp.

{
  CVector vecDiff((long)(m_dX - vector2.m_dX), (long)(m_dY - vector2.m_dY));
  return vecDiff;
}

CVector CVector::operator-= ( CPoint pt ) [inline]

Definition at line 82 of file piece.h.

  {
    m_dX -= static_cast<double>(pt.x);
    m_dY -= static_cast<double>(pt.y);
    return *this;
  }

__inline CVector CVector::operator= ( CPoint pt )

Definition at line 108 of file piece.cpp.

{
  m_dX = pt.x;
  m_dY = pt.y;
  return *this;
}

__inline CVector & CVector::operator= ( CVector & vector2 )

Definition at line 101 of file piece.cpp.

{
  m_dX = vector2.m_dX;
  m_dY = vector2.m_dY;
  return *this;
}

__inline void CVector::Scale | ( | long | nNumer,
 |  | long | nDenom
 | ) |  |

Definition at line 88 of file piece.cpp.

{
  double dFactor = (double)nNumer / (double) nDenom;
  m_dX *= dFactor;
  m_dY *= dFactor;
}

void CVector::SetValueLengthAngle | ( | long | nRadius,
 |  | double | dAngle
 | ) |  |

Definition at line 36 of file piece.cpp.

{
  m_dX = nRadius * cos(dAngle);
  m_dY = nRadius * sin(dAngle);
}

Member Data Documentation

double CVector::m_dX

Definition at line 63 of file piece.h.

double CVector::m_dY

Definition at line 64 of file piece.h.

The documentation for this class was generated from the following files:
  • general/spiro/piece.h
  • general/spiro/piece.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CView1 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CView1 Class Reference

#include "View1.h"

List of all members.

Public Member Functions

CView1 ()
virtual | ~CView1 ()
virtual CScrollBar * | GetScrollBarCtrl (int nBar) const
virtual void | OnInitialUpdate ()

Protected Member Functions

CView1 ()
virtual | ~CView1 ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnDraw (CDC *pDC)
virtual void | OnDraw (CDC *pDC)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnWindowPosChanging (WINDOWPOS FAR *lpwndpos)

Detailed Description

Definition at line 3 of file View1.h.

Constructor & Destructor Documentation

CView1::CView1 ( )

Definition at line 19 of file View1.cpp.

{
}

CView1::~CView1 ( ) [virtual]

Definition at line 23 of file View1.cpp.

{
}

CView1::CView1 ( ) [protected]
virtual CView1::~CView1 ( ) [protected, virtual]

Member Function Documentation

CScrollBar * CView1::GetScrollBarCtrl ( int nBar ) const [virtual]

Definition at line 141 of file View1.cpp.

{
  if (nBar == SB_HORZ)
  {
    CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
    ASSERT_VALID (pTabWnd);

    return pTabWnd->GetScrollBar ();
  }

  return CScrollView::GetScrollBarCtrl(nBar);
}

void CView1::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 100 of file View1.cpp.

{
  // TODO: add extra initialization before printing
}

void CView1::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 110 of file View1.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

virtual void CView1::OnDraw ( CDC * pDC ) [protected, virtual]
void CView1::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 39 of file View1.cpp.

{
  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  CDrawingManager dm (*pDC);

  dm.FillGradient2 (rectFrame, RGB (232, 213, 232), RGB (204, 161, 202), 35);

  pDC->Draw3dRect (rectFrame, RGB (129, 69, 129), RGB (129, 69, 129));

  pDC->SetBkMode (TRANSPARENT);
  pDC->SetTextColor (0);
  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
  pDC->SelectObject (pFontOld);
}

void CView1::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 105 of file View1.cpp.

{
  // TODO: add cleanup after printing
}

BOOL CView1::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 154 of file View1.cpp.

{
  return TRUE;
}

void CView1::OnFilePrintPreview ( ) [protected]

Definition at line 89 of file View1.cpp.

{
  AFXPrintPreview (this);
}

void CView1::OnHScroll | ( | UINT | nSBCode,
 |  | UINT | nPos,
 |  | CScrollBar * | pScrollBar |
 | ) |  |  | [protected]

Definition at line 133 of file View1.cpp.

{
  CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
  ASSERT_VALID (pTabWnd);

  CScrollView::OnHScroll(nSBCode, nPos, pTabWnd->GetScrollBar ());
}

void CView1::OnInitialUpdate ( ) [virtual]

Definition at line 112 of file View1.cpp.

{
  CScrollView::OnInitialUpdate();

  SetScrollSizes (MM_TEXT, CSize (1000, 1000));

  CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
  ASSERT_VALID (pTabWnd);

  pTabWnd->SynchronizeScrollBar ();
}

BOOL CView1::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 94 of file View1.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CView1::OnWindowPosChanging ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 124 of file View1.cpp.

{
  CScrollView::OnWindowPosChanging(lpwndpos);

  // Hide horizontal scrollbar:
  ShowScrollBar (SB_HORZ, FALSE);
  ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookMultiViews/View1.h
  • vc2008fp/TabbedView/View1.h
  • vc2008fp/OutlookMultiViews/View1.cpp
  • vc2008fp/TabbedView/View1.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CView2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CView2 Class Reference

#include "View2.h"

List of all members.

Public Member Functions

CView2 ()
virtual | ~CView2 ()
virtual void | OnInitialUpdate ()

Protected Member Functions

CView2 ()
virtual | ~CView2 ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
virtual void | OnDraw (CDC *pDC)
virtual void | OnDraw (CDC *pDC)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnWindowPosChanging (WINDOWPOS FAR *lpwndpos)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Detailed Description

Definition at line 3 of file View2.h.

Constructor & Destructor Documentation

CView2::CView2 ( )

Definition at line 19 of file View2.cpp.

{
}

CView2::~CView2 ( ) [virtual]

Definition at line 23 of file View2.cpp.

{
}

CView2::CView2 ( ) [protected]
virtual CView2::~CView2 ( ) [protected, virtual]

Member Function Documentation

void CView2::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 100 of file View2.cpp.

{
  // TODO: add extra initialization before printing
}

void CView2::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 110 of file View2.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

afx_msg void CView2::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]
virtual void CView2::OnDraw ( CDC * pDC ) [protected, virtual]
void CView2::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 39 of file View2.cpp.

{
  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  CDrawingManager dm (*pDC);

  dm.FillGradient2 (rectFrame, RGB (196, 245, 184), RGB (119, 231, 91), 35);

  pDC->Draw3dRect (rectFrame, RGB (39, 126, 17), RGB (39, 126, 17));

  pDC->SetBkMode (TRANSPARENT);
  pDC->SetTextColor (0);
  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
  pDC->SelectObject (pFontOld);
}

void CView2::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 105 of file View2.cpp.

{
  // TODO: add cleanup after printing
}

void CView2::OnFilePrintPreview ( ) [protected]

Definition at line 89 of file View2.cpp.

{
  AFXPrintPreview (this);
}

void CView2::OnInitialUpdate ( ) [virtual]

Definition at line 72 of file View2.cpp.

{
  CListView::OnInitialUpdate();

  CListCtrl& wndList = GetListCtrl ();

  wndList.SetExtendedStyle (LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);

  const int nColumns = 15;
  int iColumn = 0;

  // Insert columns:
  for (iColumn = 0; iColumn < nColumns; iColumn++)
  {
    CString strColumn;
    strColumn.Format (_T("Column %d"), iColumn + 1);

    wndList.InsertColumn (iColumn, strColumn, LVCFMT_LEFT, 70);
  }

  // Insert items:
  for (int i = 0; i < 100; i++)
  {
    const CString strItemFmt = _T("Item (%d, %d)");

    CString strItem;
    strItem.Format (strItemFmt, 1, i + 1);

    int iItem = wndList.InsertItem (i, strItem, 0);

    for (iColumn = 1; iColumn < nColumns; iColumn++)
    {
      strItem.Format (strItemFmt, iColumn + 1, i + 1);
      wndList.SetItemText (iItem, iColumn, strItem);
    }
  }
}

void CView2::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 124 of file View2.cpp.

{
  CListView::OnKeyDown(nChar, nRepCnt, nFlags);

  if (nChar == VK_LEFT || nChar == VK_RIGHT)
  {
    // Assume scroll left or right. Synchronize scorll bars:
    CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
    ASSERT_VALID (pTabWnd);

    pTabWnd->SynchronizeScrollBar ();
  }
}

BOOL CView2::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 94 of file View2.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CView2::OnWindowPosChanging ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 115 of file View2.cpp.

{
  CListView::OnWindowPosChanging(lpwndpos);

  // Hide horizontal scrollbar:
  ShowScrollBar (SB_HORZ, FALSE);
  ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
}

BOOL CView2::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 66 of file View2.cpp.

{
  cs.style |= LVS_REPORT;
  return CListView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookMultiViews/View2.h
  • vc2008fp/TabbedView/View2.h
  • vc2008fp/OutlookMultiViews/View2.cpp
  • vc2008fp/TabbedView/View2.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CView3 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions

CView3 Class Reference

#include "View3.h"

List of all members.

Public Types

enum | { IDD = IDD_FORMVIEW }

Public Member Functions

CView3 ()
virtual | ~CView3 ()

Protected Member Functions

CView3 ()
virtual | ~CView3 ()
virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
virtual void | OnDraw (CDC *pDC)
virtual void | OnDraw (CDC *pDC)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
afx_msg void | OnWindowPosChanging (WINDOWPOS FAR *lpwndpos)

Detailed Description

Definition at line 3 of file View3.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 28 of file View3.h.

{ IDD = IDD_FORMVIEW };

Constructor & Destructor Documentation

CView3::CView3 ( )

Definition at line 19 of file View3.cpp.

{
}

CView3::~CView3 ( ) [virtual]

Definition at line 23 of file View3.cpp.

{
}

CView3::CView3 ( ) [protected]
virtual CView3::~CView3 ( ) [protected, virtual]

Member Function Documentation

void CView3::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 35 of file View3.cpp.

{
  CFormView::DoDataExchange(pDX);
}

void CView3::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 100 of file View3.cpp.

{
  // TODO: add extra initialization before printing
}

void CView3::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 110 of file View3.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

afx_msg void CView3::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]
virtual void CView3::OnDraw ( CDC * pDC ) [protected, virtual]
void CView3::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 39 of file View3.cpp.

{
  const int iOffset = 20;

  CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
  ASSERT (pFontOld != NULL);

  CRect rectClient;
  GetClientRect (&rectClient);

  CRect rectText = rectClient;
  rectText.DeflateRect (iOffset, iOffset);
  pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);

  rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
              (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);

  CRect rectFrame = rectText;
  rectFrame.InflateRect (iOffset, iOffset);

  CDrawingManager dm (*pDC);

  dm.FillGradient2 (rectFrame, RGB (219, 227, 251), RGB (167, 186, 247), 35);

  pDC->Draw3dRect (rectFrame, RGB (94, 128, 240), RGB (94, 128, 240));

  pDC->SetBkMode (TRANSPARENT);
  pDC->SetTextColor (0);
  pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
  pDC->SelectObject (pFontOld);
}

void CView3::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 105 of file View3.cpp.

{
  // TODO: add cleanup after printing
}

BOOL CView3::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 80 of file View3.cpp.

{
  return TRUE;
}

void CView3::OnFilePrintPreview ( ) [protected]

Definition at line 89 of file View3.cpp.

{
  AFXPrintPreview (this);
}

BOOL CView3::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 94 of file View3.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

void CView3::OnWindowPosChanging ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 70 of file View3.cpp.

{
  CFormView::OnWindowPosChanging(lpwndpos);

  // Hide horizontal scrollbar:
  ShowScrollBar (SB_HORZ, FALSE);
  ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
}

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookMultiViews/View3.h
  • vc2008fp/TabbedView/View3.h
  • vc2008fp/OutlookMultiViews/View3.cpp
  • vc2008fp/TabbedView/View3.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CView4 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CView4 Class Reference

#include "View4.h"

List of all members.

Public Member Functions

CMFCTabCtrl * | GetParentTab () const
virtual CScrollBar * | GetScrollBarCtrl (int nBar) const

Protected Member Functions

CView4 ()
virtual | ~CView4 ()
virtual void | OnDraw (CDC *pDC)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
virtual void | OnInitialUpdate ()
afx_msg void | OnWindowPosChanging (WINDOWPOS FAR *lpwndpos)

Detailed Description

Definition at line 16 of file View4.h.

Constructor & Destructor Documentation

CView4::CView4 ( ) [protected]

Definition at line 26 of file View4.cpp.

{
}

CView4::~CView4 ( ) [protected, virtual]

Definition at line 30 of file View4.cpp.

{
}

Member Function Documentation

CMFCTabCtrl* CView4::GetParentTab ( ) const [inline]

Definition at line 24 of file View4.h.

  {
    return DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
  }

CScrollBar * CView4::GetScrollBarCtrl ( int nBar ) const [virtual]

Definition at line 93 of file View4.cpp.

{
  if (nBar == SB_HORZ)
  {
    return GetParentTab ()->GetScrollBar ();
  }

  return CScrollView::GetScrollBarCtrl(nBar);
}

void CView4::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 54 of file View4.cpp.

{
  CRect rectClient;
  GetClientRect (&rectClient);

  pDC->DPtoLP (&rectClient);
  pDC->FillSolidRect (rectClient, ::GetSysColor (COLOR_WINDOW));

  CString str (_T("This is a scroll view"));
  pDC->TextOut (130, 30, str);
}

BOOL CView4::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 108 of file View4.cpp.

{
  return TRUE;
}

void CView4::OnHScroll | ( | UINT | nSBCode,
 |  | UINT | nPos,
 |  | CScrollBar * | pScrollBar |
 | ) |  |  | [protected]

Definition at line 103 of file View4.cpp.

{
  CScrollView::OnHScroll(nSBCode, nPos, GetParentTab ()->GetScrollBar ());
}

void CView4::OnInitialUpdate ( ) [protected, virtual]

Definition at line 44 of file View4.cpp.

{
  CScrollView::OnInitialUpdate();

  CSize sizeTotal;
  // TODO: calculate the total size of this view
  sizeTotal.cx = sizeTotal.cy = 1000;
  SetScrollSizes(MM_TEXT, sizeTotal);
}

void CView4::OnWindowPosChanging ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 84 of file View4.cpp.

{
  CScrollView::OnWindowPosChanging(lpwndpos);

  // Hide horizontal scrollbar:
  ShowScrollBar (SB_HORZ, FALSE);
  ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
}

The documentation for this class was generated from the following files:
  • vc2008fp/TabbedView/View4.h
  • vc2008fp/TabbedView/View4.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CViewExApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CViewExApp Class Reference

#include "viewex.h"

List of all members.

Public Member Functions

CViewExApp ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()

Detailed Description

Definition at line 27 of file viewex.h.

Constructor & Destructor Documentation

CViewExApp::CViewExApp ( )

Definition at line 37 of file viewex.cpp.

{
}

Member Function Documentation

BOOL CViewExApp::InitInstance ( ) [virtual]

Definition at line 49 of file viewex.cpp.

{
  // This VIEWEX sample shows several techniques for creating CView
  //  derived classes.   All the views in this sample use the same
  //  CMainDoc class.  For simplicity the CMainDoc class does not
  //  support serialization, but has a very simple data model of
  //  a single string and an RGB color.  We register different
  //  document templates for each of the interesting view types.

  // simple text output view
  AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
      RUNTIME_CLASS(CMainDoc),
      RUNTIME_CLASS(CMDIChildWnd),
      RUNTIME_CLASS(CTextView)));

  // simple color output view
  //   a doc template with no 'fileNewName' so it is not a choice for FileNew
  AddDocTemplate(new CMultiDocTemplate(IDR_COLORTYPE,
      RUNTIME_CLASS(CMainDoc),
      RUNTIME_CLASS(CMDIChildWnd),
      RUNTIME_CLASS(CColorView)));

  // form view with input
  AddDocTemplate(new CMultiDocTemplate(IDR_INPUTTYPE,
      RUNTIME_CLASS(CMainDoc),
      RUNTIME_CLASS(CMDIChildWnd),
      RUNTIME_CLASS(CInputView)));

  // splitter frame with both simple text output and form input view
  AddDocTemplate(new CMultiDocTemplate(IDR_SPLIT2TYPE,
      RUNTIME_CLASS(CMainDoc),
      RUNTIME_CLASS(CSplitterFrame),
      RUNTIME_CLASS(CTextView)));

  // 3-way splitter frame with form input, text output and color output views
  AddDocTemplate(new CMultiDocTemplate(IDR_SPLIT3TYPE,
      RUNTIME_CLASS(CMainDoc),
      RUNTIME_CLASS(C3WaySplitterFrame),
      RUNTIME_CLASS(CInputView)));

  // create main MDI Frame window
  // Please note that for simple MDI Frame windows with no toolbar,
  //   status bar or other special behavior, the CMDIFrameWnd class
  //   can be used directly for the main frame window just as the
  //   CMDIChildWnd can be use for a document frame window.

  CMDIFrameWnd* pMainFrame = new CMDIFrameWnd;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
  {
    // free the memory
    delete pMainFrame;
    return FALSE;
  }

  // Also in this example, there is only one menubar shared between
  //  all the views.  The automatic menu enabling support of MFC
  //  will disable the menu items that don't apply based on the
  //  currently active view.  The one MenuBar is used for all
  //  document types, including when there are no open documents.

  // Now finally show the main menu
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();
  m_pMainWnd = pMainFrame;

  // command line arguments are ignored, create a new (empty) document
  OnFileNew();

  return TRUE;
}

void CViewExApp::OnAppAbout ( )

Definition at line 123 of file viewex.cpp.

{
  CDialog(IDD_ABOUTBOX).DoModal();
}

The documentation for this class was generated from the following files:
  • general/viewex/viewex.h
  • general/viewex/viewex.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CViewExSplitWnd Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CViewExSplitWnd Class Reference

#include "splitter.h"

List of all members.

Public Member Functions

CViewExSplitWnd ()
~CViewExSplitWnd ()
CWnd * GetActivePane (int *pRow=NULL, int *pCol=NULL)

Detailed Description

Definition at line 39 of file splitter.h.

Constructor & Destructor Documentation

CViewExSplitWnd::CViewExSplitWnd ( )

Definition at line 158 of file splitter.cpp.

{
}

CViewExSplitWnd::~CViewExSplitWnd ( )

Definition at line 162 of file splitter.cpp.

{
}

Member Function Documentation

CWnd * CViewExSplitWnd::GetActivePane | ( | int * | pRow = NULL,
 |  | int * | pCol = NULL
 | ) |  |

Definition at line 166 of file splitter.cpp.

{
  ASSERT_VALID(this);

  // attempt to use active view of frame window
  CWnd* pView = NULL;
  CFrameWnd* pFrameWnd = GetParentFrame();
  ASSERT_VALID(pFrameWnd);
  pView = pFrameWnd->GetActiveView();

  // failing that, use the current focus
  if (pView == NULL)
    pView = GetFocus();

  return pView;
}

The documentation for this class was generated from the following files:
  • general/viewex/splitter.h
  • general/viewex/splitter.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVisualStudioDemoApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CVisualStudioDemoApp Class Reference

#include "VisualStudioDemo.h"

List of all members.

Public Member Functions

CVisualStudioDemoApp ()
virtual | ~CVisualStudioDemoApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
virtual void | LoadCustomState ()
afx_msg void | OnAppAbout ()
afx_msg void | OnHelpShowStart ()
afx_msg void | OnViewAppLook ()
virtual void | PreLoadState ()
virtual BOOL | SaveAllModified ()
virtual void | SaveCustomState ()

Public Attributes

BOOL | m_bHiColorIcons
CMultiDocTemplate * | m_pDocTemplateCpp
CMultiDocTemplate * | m_pStartDocTemplate

Detailed Description

Definition at line 23 of file VisualStudioDemo.h.

Constructor & Destructor Documentation

CVisualStudioDemoApp::CVisualStudioDemoApp ( )

Definition at line 43 of file VisualStudioDemo.cpp.

{
  m_pStartDocTemplate = NULL;
  m_pDocTemplateCpp = NULL;

  m_bHiColorIcons = FALSE;
}

CVisualStudioDemoApp::~CVisualStudioDemoApp ( ) [virtual]

Definition at line 51 of file VisualStudioDemo.cpp.

{
}

Member Function Documentation

int CVisualStudioDemoApp::ExitInstance ( ) [virtual]

Definition at line 221 of file VisualStudioDemo.cpp.

{
  return CWinAppEx::ExitInstance();
}

BOOL CVisualStudioDemoApp::InitInstance ( ) [virtual]

Definition at line 63 of file VisualStudioDemo.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options(including MRU)

  SetRegistryBase(_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();
  InitTooltipManager();

  EnableUserTools(ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10, RUNTIME_CLASS(CUserTool), IDR_MENU_ARGS, IDR_MENU_DIRS);

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  m_pDocTemplateCpp = new CMultiDocTemplate(IDR_DEVTYPE_CPP, RUNTIME_CLASS(CVisualStudioDemoDoc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CVisualStudioDemoView));
  AddDocTemplate(m_pDocTemplateCpp);

  m_pStartDocTemplate = new CMultiDocTemplate(IDR_DEVTYPE0, RUNTIME_CLASS(CVisualStudioDemoDoc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CStartView));
  AddDocTemplate(m_pStartDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;

  EnableLoadWindowPlacement(FALSE);

  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
  {
    if (!pMainFrame->LoadMDIState(GetRegSectionPath()))
    {
      m_pStartDocTemplate->OpenDocumentFile(NULL);
    }
  }
  else
  {
    // Dispatch commands specified on the command line
    if (!ProcessShellCommand(cmdInfo))
      return FALSE;
  }

  m_pMainWnd->DragAcceptFiles();

  // The main window has been initialized, so show and update it.
  if (!ReloadWindowPlacement(pMainFrame))
  {
    pMainFrame->ShowWindow(m_nCmdShow);
    pMainFrame->UpdateWindow();
  }

  CAppLookDlg dlg(TRUE, m_pMainWnd);
  dlg.DoModal();

  return TRUE;
}

void CVisualStudioDemoApp::LoadCustomState ( ) [virtual]

Definition at line 210 of file VisualStudioDemo.cpp.

{
}

void CVisualStudioDemoApp::OnAppAbout ( )

Definition at line 194 of file VisualStudioDemo.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CVisualStudioDemoApp::OnHelpShowStart ( )

Definition at line 226 of file VisualStudioDemo.cpp.

{
  ASSERT_VALID(m_pStartDocTemplate);

  POSITION pos = m_pStartDocTemplate->GetFirstDocPosition();
  if (pos == NULL)
  {
    m_pStartDocTemplate->OpenDocumentFile(NULL);
    return;
  }

  CDocument* pDoc = m_pStartDocTemplate->GetNextDoc(pos);
  ASSERT_VALID(pDoc);

  pos = pDoc->GetFirstViewPosition();
  ASSERT(pos != NULL);

  CView* pView = pDoc->GetNextView(pos);
  ASSERT_VALID(pView);

  CFrameWnd* pFrame = pView->GetParentFrame();
  ASSERT_VALID(pFrame);

  CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd();
  ASSERT_VALID(pMainFrame);

  ::SendMessage(pMainFrame->m_hWndMDIClient, WM_MDIACTIVATE, (WPARAM) pFrame->GetSafeHwnd(), 0);
}

void CVisualStudioDemoApp::OnViewAppLook ( )

Definition at line 255 of file VisualStudioDemo.cpp.

{
  CAppLookDlg dlg(FALSE, m_pMainWnd);
  dlg.DoModal();
}

void CVisualStudioDemoApp::PreLoadState ( ) [virtual]

Definition at line 203 of file VisualStudioDemo.cpp.

{
  GetContextMenuManager()->AddMenu(_T("Edit Context menu"), IDR_CONTEXT_MENU);
  GetContextMenuManager()->AddMenu(_T("Resource"), IDR_POPUP_RESOURCE);
  GetContextMenuManager()->AddMenu(_T("Solution Explorer"), IDR_POPUP_SOLUTION);
}

BOOL CVisualStudioDemoApp::SaveAllModified ( ) [virtual]

Definition at line 261 of file VisualStudioDemo.cpp.

{
  if (!CWinAppEx::SaveAllModified())
  {
    return FALSE;
  }

  CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, m_pMainWnd);
  if (pMainFrame != NULL)
  {
    pMainFrame->SaveMDIState(GetRegSectionPath());
  }

  return TRUE;
}

void CVisualStudioDemoApp::SaveCustomState ( ) [virtual]

Definition at line 214 of file VisualStudioDemo.cpp.

{
}

Member Data Documentation

BOOL CVisualStudioDemoApp::m_bHiColorIcons

Definition at line 29 of file VisualStudioDemo.h.

CMultiDocTemplate* CVisualStudioDemoApp::m_pDocTemplateCpp

Definition at line 35 of file VisualStudioDemo.h.

CMultiDocTemplate* CVisualStudioDemoApp::m_pStartDocTemplate

Definition at line 36 of file VisualStudioDemo.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/VisualStudioDemo.h
  • vc2008fp/VisualStudioDemo/VisualStudioDemo.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVisualStudioDemoDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CVisualStudioDemoDoc Class Reference

#include "VisualStudioDemoDoc.h"

List of all members.

Public Member Functions

virtual | ~CVisualStudioDemoDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CVisualStudioDemoDoc ()
afx_msg void | OnDummyBuild ()
afx_msg void | OnDummyClean ()
afx_msg void | OnDummyCompile ()
afx_msg void | OnDummyExecute ()
afx_msg void | OnDummyGo ()
afx_msg void | OnDummyRebuildAll ()
afx_msg void | OnDummyRemoveAllBreakpoints ()
afx_msg void | OnDummySelectActiveConfiguration ()
afx_msg void | OnNewAccelerator ()
afx_msg void | OnNewBitmap ()
afx_msg void | OnNewCursor ()
afx_msg void | OnNewDialog ()
afx_msg void | OnNewIcon ()
afx_msg void | OnNewMenu ()
afx_msg void | OnNewStringTable ()
afx_msg void | OnNewToolbar ()
afx_msg void | OnNewVersion ()

Detailed Description

Definition at line 12 of file VisualStudioDemoDoc.h.

Constructor & Destructor Documentation

CVisualStudioDemoDoc::CVisualStudioDemoDoc ( ) [protected]

Definition at line 48 of file VisualStudioDemoDoc.cpp.

{
  // TODO: add one-time construction code here
}

CVisualStudioDemoDoc::~CVisualStudioDemoDoc ( ) [virtual]

Definition at line 53 of file VisualStudioDemoDoc.cpp.

{
}

Member Function Documentation

void CVisualStudioDemoDoc::OnDummyBuild ( ) [protected]

Definition at line 125 of file VisualStudioDemoDoc.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoDoc::OnDummyClean ( ) [protected]

Definition at line 155 of file VisualStudioDemoDoc.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoDoc::OnDummyCompile ( ) [protected]

Definition at line 130 of file VisualStudioDemoDoc.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoDoc::OnDummyExecute ( ) [protected]

Definition at line 135 of file VisualStudioDemoDoc.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoDoc::OnDummyGo ( ) [protected]

Definition at line 140 of file VisualStudioDemoDoc.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoDoc::OnDummyRebuildAll ( ) [protected]

Definition at line 145 of file VisualStudioDemoDoc.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoDoc::OnDummyRemoveAllBreakpoints ( ) [protected]

Definition at line 150 of file VisualStudioDemoDoc.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoDoc::OnDummySelectActiveConfiguration ( ) [protected]

Definition at line 67 of file VisualStudioDemoDoc.cpp.

{
  CMFCToolBarComboBoxButton* pSrcCombo = NULL;

  CObList listButtons;
  if (CMFCToolBar::GetCommandButtons(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, listButtons) > 0)
  {
    for (POSITION posCombo = listButtons.GetHeadPosition();
      pSrcCombo == NULL && posCombo != NULL;)
    {
      CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));

      if (pCombo != NULL && CMFCToolBar::IsLastCommandFromButton(pCombo))
      {
        pSrcCombo = pCombo;
      }
    }
  }

  if (pSrcCombo != NULL)
  {
    ASSERT_VALID(pSrcCombo);

    LPCTSTR lpszSelItem = pSrcCombo->GetItem();
    CString strSelItem = (lpszSelItem == NULL) ? _T("") : lpszSelItem;

    AfxMessageBox(strSelItem);
  }
  else
  {
    AfxMessageBox(_T("Show \"Set Active Configuration\" dialog...."));
  }
}

void CVisualStudioDemoDoc::OnNewAccelerator ( ) [protected]

Definition at line 164 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Accelerator"));
}

void CVisualStudioDemoDoc::OnNewBitmap ( ) [protected]

Definition at line 169 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Bitmap"));
}

void CVisualStudioDemoDoc::OnNewCursor ( ) [protected]

Definition at line 174 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Cursor"));
}

void CVisualStudioDemoDoc::OnNewDialog ( ) [protected]

Definition at line 159 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Dialog"));
}

BOOL CVisualStudioDemoDoc::OnNewDocument ( ) [virtual]

Definition at line 57 of file VisualStudioDemoDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  //(SDI documents will reuse this document)
  return TRUE;
}

void CVisualStudioDemoDoc::OnNewIcon ( ) [protected]

Definition at line 179 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Icon"));
}

void CVisualStudioDemoDoc::OnNewMenu ( ) [protected]

Definition at line 184 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Menu"));
}

void CVisualStudioDemoDoc::OnNewStringTable ( ) [protected]

Definition at line 189 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New StringTable"));
}

void CVisualStudioDemoDoc::OnNewToolbar ( ) [protected]

Definition at line 194 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Toolbar"));
}

void CVisualStudioDemoDoc::OnNewVersion ( ) [protected]

Definition at line 199 of file VisualStudioDemoDoc.cpp.

{
  AfxMessageBox(_T("New Version"));
}

void CVisualStudioDemoDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 103 of file VisualStudioDemoDoc.cpp.

{
  // CEditView contains an edit control which handles all serialization
  reinterpret_cast<CEditView*>(m_viewList.GetHead())->SerializeRaw(ar);
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.h
  • vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CVisualStudioDemoView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions

CVisualStudioDemoView Class Reference

#include "VisualStudioDemoView.h"

List of all members.

Public Member Functions

virtual | ~CVisualStudioDemoView ()
CVisualStudioDemoDoc * | GetDocument () const
afx_msg void | OnEditTogglebreakpoint ()
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnFind ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CVisualStudioDemoView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Private Member Functions

void | VerifyFindString (CMFCToolBarComboBoxButton *pFindCombo, CString &strFindText)

Detailed Description

Definition at line 12 of file VisualStudioDemoView.h.

Constructor & Destructor Documentation

CVisualStudioDemoView::CVisualStudioDemoView ( ) [protected]

Definition at line 36 of file VisualStudioDemoView.cpp.

{
  // TODO: add construction code here
}

CVisualStudioDemoView::~CVisualStudioDemoView ( ) [virtual]

Definition at line 41 of file VisualStudioDemoView.cpp.

{
}

Member Function Documentation

CVisualStudioDemoDoc * CVisualStudioDemoView::GetDocument ( ) const [inline]

Definition at line 52 of file VisualStudioDemoView.h.

{ return reinterpret_cast<CVisualStudioDemoDoc*>(m_pDocument); }

void CVisualStudioDemoView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 64 of file VisualStudioDemoView.cpp.

{
  // Default CEditView begin printing
  CEditView::OnBeginPrinting(pDC, pInfo);
}

void CVisualStudioDemoView::OnEditTogglebreakpoint ( )

Definition at line 103 of file VisualStudioDemoView.cpp.

{
  // TODO: Add your command handler code here
}

void CVisualStudioDemoView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 70 of file VisualStudioDemoView.cpp.

{
  // Default CEditView end printing
  CEditView::OnEndPrinting(pDC, pInfo);
}

void CVisualStudioDemoView::OnFilePrintPreview ( )

Definition at line 76 of file VisualStudioDemoView.cpp.

{
  AFXPrintPreview(this);
}

void CVisualStudioDemoView::OnFind ( )

Definition at line 108 of file VisualStudioDemoView.cpp.

{
  CString strFindText;
  VerifyFindString(((CMainFrame*)AfxGetMainWnd())->GetFindCombo(), strFindText);

  if (!strFindText.IsEmpty())
  {
    FindText(strFindText);
  }
}

BOOL CVisualStudioDemoView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 58 of file VisualStudioDemoView.cpp.

{
  // default CEditView preparation
  return CEditView::OnPreparePrinting(pInfo);
}

BOOL CVisualStudioDemoView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 45 of file VisualStudioDemoView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  BOOL bPreCreated = CEditView::PreCreateWindow(cs);
  cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping

  return bPreCreated;
}

void CVisualStudioDemoView::VerifyFindString | ( | CMFCToolBarComboBoxButton * | pFindCombo,
 |  | CString & | strFindText |
 | ) |  |  | [private]

Definition at line 119 of file VisualStudioDemoView.cpp.

{
  if (pFindCombo == NULL)
  {
    return;
  }

  BOOL bIsLastCommandFromButton = CMFCToolBar::IsLastCommandFromButton(pFindCombo);

  if (bIsLastCommandFromButton)
  {
    strFindText = pFindCombo->GetText();
  }

  CComboBox* pCombo = pFindCombo->GetComboBox();

  if (!strFindText.IsEmpty())
  {
    const int nCount = pCombo->GetCount();
    int ind = 0;
    CString strCmpText;

    while (ind < nCount)
    {
      pCombo->GetLBText(ind, strCmpText);

      if (strCmpText.GetLength() == strFindText.GetLength())
      {
        if (strCmpText == strFindText)
          break;
      }

      ind++;
    }

    if (ind < nCount)
    {
      pCombo->DeleteString(ind);
    }

    pCombo->InsertString(0,strFindText);
    pCombo->SetCurSel(0);

    if (!bIsLastCommandFromButton)
    {
      pFindCombo->SetText(strFindText);
    }
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/VisualStudioDemoView.h
  • vc2008fp/VisualStudioDemo/VisualStudioDemoView.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWatchBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CWatchBar Class Reference

#include "WatchBar.h"

List of all members.

Public Member Functions

CWatchBar ()
virtual | ~CWatchBar ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnPaint ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

CFont | m_Font
CMFCListCtrl | m_wndWatch

Detailed Description

Definition at line 15 of file WatchBar.h.

Constructor & Destructor Documentation

CWatchBar::CWatchBar ( )

Definition at line 25 of file WatchBar.cpp.

{
}

CWatchBar::~CWatchBar ( ) [virtual]

Definition at line 29 of file WatchBar.cpp.

{
}

Member Function Documentation

int CWatchBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 43 of file WatchBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  m_Font.CreateStockObject(DEFAULT_GUI_FONT);

  CRect rectDummy;
  rectDummy.SetRectEmpty();

  // Create output pane:
  const DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_VSCROLL | LVS_REPORT;

  m_wndWatch.Create(dwStyle, rectDummy, this, ID_LIST_1);
  m_wndWatch.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
  m_wndWatch.InsertColumn(0, _T("Variable"), LVCFMT_LEFT, 100);
  m_wndWatch.InsertColumn(1, _T("Value"), LVCFMT_LEFT, 100);

  m_wndWatch.InsertItem(0, _T("m_nCount"));
  m_wndWatch.SetItemText(0, 1, _T("100"));

  m_wndWatch.SetFont(&m_Font);

  return 0;
}

void CWatchBar::OnPaint ( ) [protected]

Definition at line 82 of file WatchBar.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndWatch.GetWindowRect(rectTree);
  ScreenToClient(rectTree);

  rectTree.InflateRect(1, 1);
  dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
}

void CWatchBar::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 94 of file WatchBar.cpp.

{
  CDockablePane::OnSetFocus(pOldWnd);
  m_wndWatch.SetFocus();
}

void CWatchBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 69 of file WatchBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);

  if (CanAdjustLayout())
  {
    CRect rc;
    GetClientRect(rc);

    m_wndWatch.SetWindowPos(NULL, rc.left + 1, rc.top + 1, rc.Width() - 2, rc.Height() - 2, SWP_NOACTIVATE | SWP_NOZORDER);
  }
}

Member Data Documentation

CFont CWatchBar::m_Font [protected]

Definition at line 23 of file WatchBar.h.

CMFCListCtrl CWatchBar::m_wndWatch [protected]

Definition at line 24 of file WatchBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/VisualStudioDemo/WatchBar.h
  • vc2008fp/VisualStudioDemo/WatchBar.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWclsEditDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions

CWclsEditDlg Class Reference

List of all members.

Public Types

enum | { IDD = IDD_WNDCLASS_EDIT }

Public Member Functions

CWclsEditDlg ()
DECLARE_MESSAGE_MAP ()
CEdit & | Edit1 ()
CEdit & | Edit2 ()
CEdit & | Edit3 ()
CEdit & | Edit4 ()
afx_msg void | OnIllegalChar ()
BOOL | OnInitDialog ()
virtual void | OnOK ()

Detailed Description

Definition at line 20 of file wclstest.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 24 of file wclstest.cpp.

{ IDD = IDD_WNDCLASS_EDIT };

Constructor & Destructor Documentation

CWclsEditDlg::CWclsEditDlg ( ) [inline]

Definition at line 26 of file wclstest.cpp.

    : CDialog(CWclsEditDlg::IDD)
    { }

Member Function Documentation

CWclsEditDlg::DECLARE_MESSAGE_MAP ( )
CEdit& CWclsEditDlg::Edit1 ( ) [inline]

Definition at line 31 of file wclstest.cpp.

        { return *(CEdit*)GetDlgItem(IDC_EDIT1); }

CEdit& CWclsEditDlg::Edit2 ( ) [inline]

Definition at line 33 of file wclstest.cpp.

        { return *(CEdit*)GetDlgItem(IDC_EDIT2); }

CEdit& CWclsEditDlg::Edit3 ( ) [inline]

Definition at line 35 of file wclstest.cpp.

        { return *(CEdit*)GetDlgItem(IDC_EDIT3); }

CEdit& CWclsEditDlg::Edit4 ( ) [inline]

Definition at line 37 of file wclstest.cpp.

        { return *(CEdit*)GetDlgItem(IDC_EDIT4); }

void CWclsEditDlg::OnIllegalChar ( )

Definition at line 85 of file wclstest.cpp.

{
  TRACE0("Don't do that!\n");
  // add extra reporting here...
}

BOOL CWclsEditDlg::OnInitDialog ( )

Definition at line 48 of file wclstest.cpp.

{
  // nothing special to do
  return TRUE;
}

void CWclsEditDlg::OnOK ( ) [virtual]

Definition at line 54 of file wclstest.cpp.

{
#ifdef _DEBUG
  // dump results, normally you would do something with these
  CString s;
  Edit1().GetWindowText(s);
  TRACE1("edit1 = '%s'\n", s);
  Edit2().GetWindowText(s);
  TRACE1("edit2 = '%s'\n", s);
  Edit3().GetWindowText(s);
  TRACE1("edit3 = '%s'\n", s);
  Edit4().GetWindowText(s);
  TRACE1("edit4 = '%s'\n", s);
#endif

  EndDialog(IDOK);
}

The documentation for this class was generated from the following file:
  • general/ctrltest/wclstest.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWheel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Static Public Attributes

CWheel Class Reference

#include "piece.h"

Inherits CBasePiece.

Inherited by CRing.

List of all members.

Public Member Functions

CWheel (long nRadius, COLORREF co, COLORREF coPattern)
virtual void | AdvanceTrace (CPoint &ptContact, double &dAngle, double &dAngleExtra, bool bMove=true)
virtual void | Draw (CDC *pDC, long nZoomNumer, long nZoomDenom) const
virtual void | GetBoundingRect (CSpiroRect *prect, long nZoomNumer, long nZoomDenom) const
virtual void | GetContactPosition (CPoint point, long nZoomNumer, long nZoomDenom, CPoint &ptContact, double &dAngle)
virtual long | GetCycleError () const
virtual void | GetDevPieceRgn (CDC *pDC, CRgn *pRgn, long nZoomNumer, long nZoomDenom, bool bInflate) const
virtual double | GetFigData () const
virtual void | GetLogPieceRgn (CRgn *pRgn, long nZoomNumer, long nZoomDenom) const
virtual void | GetPenLocation (CPoint *pPoint) const
virtual void | GetPenRect (CRect *prect) const
virtual double | GetPerimeter () const
virtual int | HitTest (CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom) const
virtual void | MovePiece (CSpiroView *pView, CPoint point, double dWheelData, long nZoomNumer, long nZoomDenom)
virtual bool | ReverseWheelDirection () const
virtual void | SetAngleDelta (long nDistance, bool bReverse)
virtual void | SetFigData (double dData)
virtual bool | SetPenLocation (CSpiroView *pView, CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom)
virtual void | SetPosition (CPoint pt, double dAngle)
virtual void | SetPosition (CPoint pt)
virtual void | SetWheelMode (bool bWheel=true)

Public Attributes

double | m_angleCurrent
double | m_angleDelta
double | m_anglePen
COLORREF | m_coPattern
double | m_dAngleCorrection
long | m_nPenRadius
long | m_nRadius

Static Public Attributes

static COLORREF | m_rgco [TOTALWHEELS]
static COLORREF | m_rgcoPattern [TOTALWHEELS]
static long | m_rgnRads [TOTALWHEELS] = {130, 120, 110, 100, 90, 80, 70}

Detailed Description

Definition at line 169 of file piece.h.

Constructor & Destructor Documentation

CWheel::CWheel | ( | long | nRadius,
 |  | COLORREF | co,
 |  | COLORREF | coPattern
 | ) |  |

Definition at line 173 of file piece.cpp.

                                                            :
        CBasePiece(co)
{
  ASSERT(TOTALWHEELS == elementsof(m_rgco));
  ASSERT(TOTALWHEELS == elementsof(m_rgnRads));

  m_nPenRadius = 0;
  m_angleCurrent = m_bIsWheel? 0 : PI / 2.0;
  m_dAngleCorrection = 0;
  m_anglePen = 0;
  m_nRadius = nRadius;
  m_coPattern = coPattern;
  m_angleDelta = 0;
}

Member Function Documentation

__inline void CWheel::AdvanceTrace | ( | CPoint & | ptContact,
 |  | double & | dAngle,
 |  | double & | dAngleExtra,
 |  | bool | bMove = true |
 | ) |  |  | [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 423 of file piece.cpp.

{
  ASSERT(m_angleDelta != 0);

  if (m_bIsWheel)
  {
    CVector vecPos = ptContact;
    vecPos += CVector(m_nRadius, dAngle);  // new position for the wheel
    if (bMove)
    {
      m_ptPos = (CPoint)vecPos;
      m_angleCurrent += m_angleDelta + dAngleExtra;
    }
  }
  else  // code when wheel behaves like an anchor
  {
    if (bMove)
    {
      m_angleCurrent += m_angleDelta + m_dAngleCorrection;
    }

    CVector vecAfter(m_nRadius, m_angleCurrent);
    vecAfter += m_ptPos;
    ptContact = (CPoint)vecAfter;
    dAngle = m_angleCurrent;
    dAngleExtra = m_angleDelta + m_dAngleCorrection;
  }
}

void CWheel::Draw | ( | CDC * | pDC,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 190 of file piece.cpp.

{
  ENSURE(pDC != NULL);
  // First find if the bounding rectangle is visible at all in the DC

  CSpiroRect rect;
  GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
  if (!pDC->RectVisible(&rect))
    return;

  CRgn rgn;
  VERIFY(rgn.CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
  CBrush brush(m_co);
  pDC->FillRgn(&rgn, &brush);

  // Now draw the pattern.  (happy face)
  // First draw the smile at half the radius distance.
  long nRadSmile = m_nRadius * 5 / 8;
  double dAngle = m_bIsWheel? m_angleCurrent : 0;
  double dAngleStart = dAngle + PI * 9 / 8;

  int ptsInPen = max(m_nRadius * 100 * nZoomNumer / 12 / 72 / nZoomDenom, 1);
  CPen  pen(PS_SOLID /*| PS_ENDCAP_ROUND*/, ptsInPen, m_coPattern);
  CPen* pPenOld = pDC->SelectObject(&pen);

    // rectangle to draw smile arc
  rect.SetRect(m_ptPos.x - nRadSmile, m_ptPos.y + nRadSmile, m_ptPos.x + nRadSmile, m_ptPos.y - nRadSmile);
  rect.Scale(nZoomNumer, nZoomDenom);

  CVector vecStart(nRadSmile, dAngleStart);
  vecStart += m_ptPos;
  vecStart.Scale(nZoomNumer, nZoomDenom);
  CVector vecFinish(nRadSmile, dAngleStart + PI * 3.0 / 4.0);
  vecFinish += m_ptPos;
  vecFinish.Scale(nZoomNumer, nZoomDenom);

  pDC->Arc(&rect, (CPoint)vecStart, (CPoint)vecFinish);  // draw smile
  pDC->SelectObject(pPenOld);  // set the default black pen

  // finished drawing the smile for the happy face, now draw the eyes.
  CBrush brushPat(m_coPattern);
  CBrush* pBrushOld = pDC->SelectObject(&brushPat);

  nRadSmile = nRadSmile * 3 / 4;  // using += would lose precision
  vecStart.SetValueLengthAngle(nRadSmile, dAngle + 3.0 * PI / 4.0);
  vecStart += m_ptPos;
  vecStart.Scale(nZoomNumer, nZoomDenom);

  long  nRadEye = m_nRadius * nZoomNumer / nZoomDenom / 12;

  for (int i = 0; i < 2; i++)
  {
    rect.SetRect(((CPoint)vecStart).x - nRadEye, ((CPoint)vecStart).y + nRadEye,
              ((CPoint)vecStart).x + nRadEye, ((CPoint)vecStart).y - nRadEye);

    pDC->Ellipse(&rect);

    if (i == 0)
    {
      vecStart.SetValueLengthAngle(nRadSmile, dAngle + PI / 4.0);
      vecStart += m_ptPos;
      vecStart.Scale(nZoomNumer, nZoomDenom);
    }
  }

  pDC->SelectObject(pBrushOld);
  brushPat.DeleteObject();

  // now draw the pen location if the wheel is not an anchor
  if (m_bIsWheel)
  {
    ASSERT(m_icoCurrent >= -1 && m_icoCurrent < elementsof(m_rgCo));
    int   ico = max(m_icoCurrent, 0);
    CSpiroRect secondRect;
    GetPenRect(&secondRect);
    rect.Scale(nZoomNumer, nZoomDenom);
    brushPat.CreateSolidBrush(m_rgCo[ico]);
    pDC->SelectObject(&brushPat);
    pen.DeleteObject();
    pen.CreatePen(PS_SOLID, 1, m_coPattern);
    pDC->SelectObject(&pen);
    pDC->Ellipse(&rect);
  }

  // clean up and we're done
  pDC->SelectObject(pPenOld);
  pDC->SelectObject(pBrushOld);
}

void CWheel::GetBoundingRect | ( | CSpiroRect * | prect,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [virtual]

Implements CBasePiece.

Definition at line 280 of file piece.cpp.

{
  ENSURE(pRect != NULL);
  pRect->SetRect((m_ptPos.x - m_nRadius) * nZoomNumer / nZoomDenom,
            (m_ptPos.y + m_nRadius) * nZoomNumer / nZoomDenom,
            (m_ptPos.x + m_nRadius) * nZoomNumer / nZoomDenom,
            (m_ptPos.y - m_nRadius) * nZoomNumer / nZoomDenom);
}

void CWheel::GetContactPosition | ( | CPoint | point,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom,
 |  | CPoint & | ptContact,
 |  | double & | dAngle |
 | ) |  |  | [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 331 of file piece.cpp.

{
  ptContact.x = m_ptPos.x;
  ptContact.y = m_ptPos.y + m_nRadius;
  dAngle = PI / 2.0;
  m_angleCurrent = dAngle;
}

long CWheel::GetCycleError ( ) const [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 461 of file piece.cpp.

{
  // Calculate the distance for the cycle error to be 6 degrees
  // which means (PI / 30) * radius
  return (long)(PI * (double)m_nRadius / 30.0);
}

void CWheel::GetDevPieceRgn | ( | CDC * | pDC,
 |  | CRgn * | pRgn,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom,
 |  | bool | bInflate |
 | ) |  |  | const [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 309 of file piece.cpp.

{
  ENSURE(pDC != NULL);
  CSpiroRect  rect;
  GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
  pDC->LPtoDP(&rect);  // convert to client coords
  if (bInflate)  // cover off by one errors in region invalidation in Windows
    rect.InflateRect(10, 10);

  ENSURE(pRgn != NULL);
  VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
}

__inline double CWheel::GetFigData ( ) const [virtual]

Implements CBasePiece.

Definition at line 473 of file piece.cpp.

{
  return m_angleCurrent;
}

void CWheel::GetLogPieceRgn | ( | CRgn * | pRgn,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 323 of file piece.cpp.

{
  CSpiroRect  rect;
  GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
  ENSURE(pRgn != NULL);
  VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
}

__inline void CWheel::GetPenLocation ( CPoint * pPoint ) const [virtual]

Implements CBasePiece.

Definition at line 452 of file piece.cpp.

{
  ASSERT(m_bIsWheel);
  ASSERT(m_nPenRadius > 0);
  CVector vecPen(m_nPenRadius, m_anglePen + m_angleCurrent);
  vecPen += m_ptPos;  // move relative to the location of the wheel
  *pPoint = (CPoint)vecPen;
}

void CWheel::GetPenRect ( CRect * prect ) const [virtual]

Implements CBasePiece.

Definition at line 381 of file piece.cpp.

{
  CVector vectPosPen(m_nPenRadius, m_anglePen + m_angleCurrent);
  vectPosPen += m_ptPos;
  CPoint ptPen = (CPoint)vectPosPen;

  pRect->SetRect(ptPen.x - PENMARKERSIZE, ptPen.y + PENMARKERSIZE, // working in loenglish, so add
            ptPen.x + PENMARKERSIZE, ptPen.y - PENMARKERSIZE);
}

__inline double CWheel::GetPerimeter ( ) const [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 408 of file piece.cpp.

{
  return 2.0 * PI * (double)m_nRadius;
}

int CWheel::HitTest | ( | CDC * | pDC,
 |  | CPoint | point,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | const [virtual]

Implements CBasePiece.

Definition at line 391 of file piece.cpp.

{
  ENSURE(pDC != NULL);
  CSpiroRect rectPen;
  GetPenRect(&rectPen);
  rectPen.Scale(nZoomNumer, nZoomDenom);

  // convert the pen rectangle to device coordinates.
  pDC->LPtoDP(&rectPen);
  if (rectPen.PtInRect(point))
  {
    return HIT_PEN_LOCATION;
  }

  return HIT_NOTHING;
}

void CWheel::MovePiece | ( | CSpiroView * | pView,
 |  | CPoint | point,
 |  | double | dWheelData,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | [virtual]

Implements CBasePiece.

Definition at line 485 of file piece.cpp.

{
  ENSURE(pView != NULL);
  if (point == m_ptPos && dWheelData == m_angleCurrent)
    return;

  // First invalidate the current rectangle for the wheel and then the new position
  CSpiroRect rect;
  CDC* pDC = pView->GetDC();
  ENSURE(pDC != NULL);
  pView->OnPrepareDC(pDC);

  for (int i= 0; i < 2; i++)
  {
    GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
    pDC->LPtoDP(&rect);
    pView->InvalidateRect(&rect);
    m_ptPos = point;
    m_angleCurrent = dWheelData;
  }

  pView->ReleaseDC(pDC);
}

__inline bool CWheel::ReverseWheelDirection ( ) const [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 468 of file piece.cpp.

{
  return false;
}

__inline void CWheel::SetAngleDelta | ( | long | nDistance,
 |  | bool | bReverse |
 | ) |  |  | [virtual]

Implements CBasePiece.

Reimplemented in CRing.

Definition at line 413 of file piece.cpp.

{
  // according to physics, w * r = d, and so w = d / r.
  ASSERT(m_nRadius > 0);
  ASSERT(nDistance > 0);
  m_angleDelta = (bReverse? -1.0 : 1.0) * (double)nDistance / m_nRadius;

  ASSERT(m_angleDelta != 0);
}

__inline void CWheel::SetFigData ( double dData ) [virtual]

Implements CBasePiece.

Definition at line 478 of file piece.cpp.

{
  m_angleCurrent = dData;
}

bool CWheel::SetPenLocation | ( | CSpiroView * | pView,
 |  | CDC * | pDC,
 |  | CPoint | point,
 |  | long | nZoomNumer,
 |  | long | nZoomDenom |
 | ) |  |  | [virtual]

Implements CBasePiece.

Definition at line 343 of file piece.cpp.

{
  if (point != CPoint(0, 0))
  {
    CSpiroRect  rectPen;
    GetPenRect(&rectPen);
    point.x -= m_ptPos.x;
    point.y -= m_ptPos.y;
    CVector vect(point);  // easier to compute angle using vector
    long nNewPenRadius = vect.GetLength();
    if (nNewPenRadius < m_nRadius - PENMARKERSIZE - 1)
    {
      m_anglePen = vect.GetAngle() - m_angleCurrent;
      m_nPenRadius = nNewPenRadius;

      // invalidate the old location of the pen
      rectPen.Scale(nZoomNumer, nZoomDenom);
      pDC->LPtoDP(&rectPen);
      pView->InvalidateRect(&rectPen, FALSE);

      // now invalidate the new location of the pen
      GetPenRect(&rectPen);
      rectPen.Scale(nZoomNumer, nZoomDenom);
      pDC->LPtoDP(&rectPen);
      pView->InvalidateRect(&rectPen, FALSE);
      return true;
    }

    return false;  // if the new pen location is off the wheel don't change anything
  }

  //default value.
  m_anglePen = PI / 2.0;
  m_nPenRadius = m_nRadius * 3 / 4;
  return true;
}

void CWheel::SetPosition | ( | CPoint | pt,
 |  | double | dAngle |
 | ) |  |  | [virtual]

Implements CBasePiece.

Definition at line 297 of file piece.cpp.

{
  ASSERT(m_nRadius > 0);
  ASSERT(m_bIsWheel);  // this routine should never execute for anchors
  CVector vecCenter(m_nRadius, dAngle);
  vecCenter += point;  // add the point in logical coordinates.
  m_ptPos = (CPoint)vecCenter;
}

void CWheel::SetPosition ( CPoint pt ) [virtual]

Implements CBasePiece.

Definition at line 289 of file piece.cpp.

{
  m_ptPos.x = pt.x;
  m_ptPos.y = pt.y - m_nRadius;
}

void CWheel::SetWheelMode ( bool bWheel = true ) [virtual]

Implements CBasePiece.

Definition at line 510 of file piece.cpp.

{
  m_bIsWheel = bWheel;
  if (m_bIsWheel)
    m_angleCurrent = 0;
}

Member Data Documentation

double CWheel::m_angleCurrent

Definition at line 180 of file piece.h.

double CWheel::m_angleDelta

Definition at line 185 of file piece.h.

double CWheel::m_anglePen

Definition at line 181 of file piece.h.

COLORREF CWheel::m_coPattern

Definition at line 179 of file piece.h.

double CWheel::m_dAngleCorrection

Definition at line 182 of file piece.h.

long CWheel::m_nPenRadius

Definition at line 183 of file piece.h.

long CWheel::m_nRadius

Definition at line 178 of file piece.h.

COLORREF CWheel::m_rgco [static]
Initial value:

    {RGB(255, 0, 0),
    RGB(0, 0, 255),
    RGB(255, 255, 0),
    RGB(128, 128, 0),
    RGB(125, 0, 125),
    RGB(128, 50, 50),
    RGB(0, 128, 128)}

Reimplemented in CRing.

Definition at line 175 of file piece.h.

COLORREF CWheel::m_rgcoPattern [static]
Initial value:
 {
    RGB(128, 0, 0),
    RGB(255, 255, 0),
    RGB(0, 0, 255),
    RGB(255, 255, 0),
    RGB(255, 255, 0),
    RGB(0, 0, 255),
    RGB(255, 0, 0) }

Definition at line 176 of file piece.h.

long CWheel::m_rgnRads = {130, 120, 110, 100, 90, 80, 70} [static]

Reimplemented in CRing.

Definition at line 174 of file piece.h.

The documentation for this class was generated from the following files:
  • general/spiro/piece.h
  • general/spiro/piece.cpp
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWizardDialog Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Attributes

CWizardDialog Class Reference

#include "CTaskDialogDemoDlg.h"

List of all members.

Public Member Functions

CWizardDialog ()

Protected Member Functions

HRESULT OnCommandControlClick (int iButtonId)

Private Attributes

CEndWizardDialog m_endWizardDialog
CNextWizardDialog m_nextWizardDialog

Detailed Description

Definition at line 142 of file CTaskDialogDemoDlg.h.

Constructor & Destructor Documentation

CWizardDialog::CWizardDialog ( ) [inline]

Definition at line 145 of file CTaskDialogDemoDlg.h.

                  : CTaskDialog(_T("Introduce the wizard option."),
    _T("Let's begin"), _T("First window!"), TDCBF_YES_BUTTON | TDCBF_NO_BUTTON,
    TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_ALLOW_DIALOG_CANCELLATION)
  {
    SetExpansionArea(_T("If you click Go! You will be redirected to another CTaskDialog window."),
        _T("Say more!"), _T("I don't want details!"));

    AddCommandControl(100 , _T("Go next!\nThere is nothing interesting to see."));
    m_nextWizardDialog.SetDialog(&m_endWizardDialog, this);
    m_endWizardDialog.SetDialog(&m_nextWizardDialog);
  }

Member Function Documentation

HRESULT CWizardDialog::OnCommandControlClick ( int iButtonId ) [inline, protected]

Definition at line 157 of file CTaskDialogDemoDlg.h.

                                               {
    if (iButtonId == 100) {
      NavigateTo(m_nextWizardDialog);
      return S_FALSE;
    }

    return S_OK;
  }

Member Data Documentation

CEndWizardDialog CWizardDialog::m_endWizardDialog [private]

Definition at line 168 of file CTaskDialogDemoDlg.h.

CNextWizardDialog CWizardDialog::m_nextWizardDialog [private]

Definition at line 167 of file CTaskDialogDemoDlg.h.

The documentation for this class was generated from the following file:
  • general/CTaskDialog/CTaskDialogDemoDlg.h
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWndListDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

CWndListDlg Class Reference

#include "Wndlist.h"

Inherits CModelessMain.

List of all members.

Public Member Functions

CWndListDlg ()
BOOL | Create ()

Protected Types

enum | { IDD = IDR_MAIN }

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnClose ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnOptionNow ()
afx_msg void | OnOptionRate ()
afx_msg void | OnSelChangeWndList ()
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnUpdateOptionRate (CCmdUI *pCmdUI)
afx_msg void | OnUpdateTime (CCmdUI *pCmdUI)
void | WalkWindowList ()

Protected Attributes

UINT m_iRate
UINT m_iTicks
CListBox | m_lbWindows
UINT m_nIDTimer

Detailed Description

Definition at line 44 of file Wndlist.h.

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
IDD

Definition at line 57 of file Wndlist.h.

{ IDD = IDR_MAIN };

Constructor & Destructor Documentation

CWndListDlg::CWndListDlg ( )

Definition at line 71 of file Wndlist.cpp.

{
  //{{AFX_DATA_INIT(CWndListDlg)
  //}}AFX_DATA_INIT
  m_nIDTimer = 0;
  m_iRate = m_iTicks = 0;
}

Member Function Documentation

BOOL CWndListDlg::Create ( )

Definition at line 79 of file Wndlist.cpp.

{
  return CModelessMain::Create(CWndListDlg::IDD,
                 auIDStatusBar,
                 sizeof(auIDStatusBar)/sizeof(UINT),
                 auIDToolBar,
                 sizeof(auIDToolBar)/sizeof(UINT),
                 IDR_MAIN);
}

void CWndListDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 89 of file Wndlist.cpp.

{
  CModelessMain::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CWndListDlg)
  DDX_Control(pDX, IDC_WNDLIST, m_lbWindows);
  //}}AFX_DATA_MAP
}

void CWndListDlg::OnClose ( ) [protected]

Reimplemented from CModelessMain.

Definition at line 138 of file Wndlist.cpp.

{
  if (m_nIDTimer)
  {
    KillTimer(m_nIDTimer);
    m_nIDTimer = NULL;
  }
  CModelessMain::OnClose();
}

BOOL CWndListDlg::OnInitDialog ( ) [protected, virtual]

Reimplemented from CModelessMain.

Definition at line 117 of file Wndlist.cpp.

{
  CModelessMain::OnInitDialog();

  // Initialize windows listbox contents
  WalkWindowList();
  OnSelChangeWndList();

  // Set up a 1 second timer
  m_nIDTimer = (UINT)SetTimer(1, 1000, NULL);
  if (!m_nIDTimer)
    AfxMessageBox(IDP_NOTIMER);

  return TRUE;
}

void CWndListDlg::OnOptionNow ( ) [protected]

Definition at line 268 of file Wndlist.cpp.

{
  m_iTicks = 0;

  int iTopIndex = m_lbWindows.GetTopIndex();

  CString strSelect;
  int iSel = m_lbWindows.GetCurSel();
  if (iSel >= 0)
    m_lbWindows.GetText(iSel, strSelect);

  WalkWindowList();

  if (m_lbWindows.SelectString(-1, strSelect) <= 0)
    m_lbWindows.SetCurSel(iSel);

  m_lbWindows.SetTopIndex(iTopIndex);

}

void CWndListDlg::OnOptionRate ( ) [protected]

Definition at line 293 of file Wndlist.cpp.

{
  CRateDlg dlg(m_iRate, this);
  if (dlg.DoModal() == IDOK)
    m_iRate = dlg.GetRate();
}

void CWndListDlg::OnSelChangeWndList ( ) [protected]

Definition at line 188 of file Wndlist.cpp.

{
  static TCHAR szBuffer[256];
  static TCHAR szTemp[80];

  static TCHAR szParse[]  = _T("%08lX");
  static TCHAR szFormat[] = _T("%08lX: %s");

  HWND hwnd = 0;
  BOOL bValid = FALSE;

  int iSel = m_lbWindows.GetCurSel();
  if (iSel >= 0)
  {
    m_lbWindows.GetText(iSel, szBuffer);
    if( _stscanf_s(szBuffer, szParse, &hwnd) == 1 )
      bValid = ::IsWindow(hwnd);
    else
      bValid = FALSE;
  }

  if (bValid)
  {
    ::GetClassName(hwnd, szBuffer, sizeof(szBuffer));
    GetDlgItem(IDC_CLASS)->SetWindowText(szBuffer);

    HINSTANCE hInstance = (HINSTANCE)::GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
    ::GetModuleFileName(hInstance, szBuffer, sizeof(szBuffer));
    GetDlgItem(IDC_MODULE)->SetWindowText(szBuffer);

    HWND hwndParent = ::GetParent(hwnd);
    ::GetWindowText(hwndParent, szTemp, sizeof(szTemp));
    _stprintf_s(szBuffer, 256, szFormat, hwndParent, szTemp);
    GetDlgItem(IDC_PARENT)->SetWindowText(szBuffer);

    RECT rect;
    ::GetWindowRect(hwnd, &rect);
    _stprintf_s(szBuffer, 256, _T("(%d,%d) - (%d,%d)"), rect.left, rect.top,
        rect.right, rect.bottom);
    GetDlgItem(IDC_RECT)->SetWindowText(szBuffer);

    LONG lStyle = ::GetWindowLong(hwnd, GWL_STYLE);
    _stprintf_s(szBuffer, 256, _T("%08lX"), lStyle);
    GetDlgItem(IDC_STYLE)->SetWindowText(szBuffer);
  }
  else
  {
    szBuffer[0] = '\0';
    GetDlgItem(IDC_CLASS)->SetWindowText(szBuffer);
    GetDlgItem(IDC_MODULE)->SetWindowText(szBuffer);
    GetDlgItem(IDC_PARENT)->SetWindowText(szBuffer);
    GetDlgItem(IDC_RECT)->SetWindowText(szBuffer);
    GetDlgItem(IDC_STYLE)->SetWindowText(szBuffer);
  }

}

void CWndListDlg::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 253 of file Wndlist.cpp.

{
  if (m_iRate)
  {
    m_iTicks++;
    if (m_iTicks == m_iRate)
      OnOptionNow();
  }
}

void CWndListDlg::OnUpdateOptionRate ( CCmdUI * pCmdUI ) [protected]

Definition at line 305 of file Wndlist.cpp.

{
  pCmdUI->Enable(m_nIDTimer != 0);
}

void CWndListDlg::OnUpdateTime ( CCmdUI * pCmdUI ) [protected]

Definition at line 314 of file Wndlist.cpp.

{
  CTime t = CTime::GetCurrentTime();
  TCHAR  szTime[6];
  SYSTEMTIME sysTime;
  t.GetAsSystemTime(sysTime);

  // Localize to user locale, strip seconds and time marker
  int nLen;
  nLen = GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS|TIME_NOTIMEMARKER,
      &sysTime, NULL, szTime, sizeof(szTime));
  // Now set the text of the pane
  CStatusBar* pStatusBar = GetStatusBar();
  pStatusBar->SetPaneText(pStatusBar->CommandToIndex(ID_INDICATOR_TIME),
              szTime);
  pCmdUI->Enable();
}

void CWndListDlg::WalkWindowList ( ) [protected]

Definition at line 170 of file Wndlist.cpp.

{
  // don't assume that m_lbWindows has been initialized yet
  CListBox* plb = (CListBox*)GetDlgItem(IDC_WNDLIST);

  plb->SetRedraw(FALSE);
  plb->ResetContent();

  EnumWindows(EnumWindowsProc, (LPARAM)plb->GetSafeHwnd());

  plb->SetRedraw(TRUE);
}

Member Data Documentation

UINT CWndListDlg::m_iRate [protected]

Definition at line 62 of file Wndlist.h.

UINT CWndListDlg::m_iTicks [protected]

Definition at line 63 of file Wndlist.h.

CListBox CWndListDlg::m_lbWindows [protected]

Definition at line 58 of file Wndlist.h.

UINT CWndListDlg::m_nIDTimer [protected]

Definition at line 61 of file Wndlist.h.

The documentation for this class was generated from the following files:
  • general/dlgcbr32/Wndlist.h
  • general/dlgcbr32/Wndlist.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWordPadApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | Static Private Attributes

CWordPadApp Class Reference

#include "wordpad.h"

List of all members.

Public Member Functions

CWordPadApp ()
CWordPadApp ()
~CWordPadApp ()
~CWordPadApp ()
HGLOBAL | CreateDevNames ()
virtual int | ExitInstance ()
virtual int | ExitInstance ()
LPCTSTR | GetAbbrev (int n)
LPCTSTR | GetAbbrev ()
LPCTSTR | GetAbbrev (int n)
LPCTSTR | GetAbbrev ()
CDockState & | GetDockState (int nDocType, BOOL bPrimary=TRUE)
CDockState & | GetDockState (LONG_PTR nDocType, BOOL bPrimary=TRUE)
CDocOptions & | GetDocOptions (int nDocType)
CDocOptions & | GetDocOptions (LONG_PTR nDocType)
int | GetTPU ()
int | GetTPU (int n)
int | GetTPU ()
int | GetTPU (int n)
const CUnit & | GetUnit ()
const CUnit & | GetUnit ()
int | GetUnits ()
int | GetUnits ()
virtual BOOL | InitInstance ()
virtual BOOL | InitInstance ()
BOOL | IsDocOpen (LPCTSTR lpszFileName)
BOOL | IsDocOpen (LPCTSTR lpszFileName)
BOOL | IsIdleMessage (MSG *pMsg)
BOOL | IsIdleMessage (MSG *pMsg)
void | LoadAbbrevStrings ()
void | LoadAbbrevStrings ()
void | LoadOptions ()
void | LoadOptions ()
void | NotifyPrinterChanged (BOOL bUpdatePrinterSelection=FALSE)
void | NotifyPrinterChanged (BOOL bUpdatePrinterSelection=FALSE)
afx_msg void | OnAppAbout ()
afx_msg void | OnAppAbout ()
virtual BOOL | OnDDECommand (LPTSTR lpszCommand)
virtual BOOL | OnDDECommand (LPTSTR lpszCommand)
afx_msg void | OnFileNew ()
afx_msg void | OnFileNew ()
afx_msg void | OnFileOpen ()
afx_msg void | OnFileOpen ()
afx_msg void | OnViewAppLook ()
BOOL | ParseMeasurement (TCHAR *buf, int &lVal)
BOOL | ParseMeasurement (TCHAR *buf, int &lVal)
virtual void | PreLoadState ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
void | PrintTwips (TCHAR *buf, int nSize, int nValue, int nDecimal)
void | PrintTwips (TCHAR *buf, int nValue, int nDecimal)
BOOL | PromptForFileName (CString &fileName, UINT nIDSTitle, DWORD dwFlags, BOOL bOpenFileDialog, int *pType=NULL)
BOOL | PromptForFileName (CString &fileName, UINT nIDSTitle, DWORD dwFlags, BOOL bOpenFileDialog, int *pType=NULL)
void | RegisterFormats ()
void | RegisterFormats ()
void | SaveOptions ()
void | SaveOptions ()
void | SetUnits (int n)
void | SetUnits (int n)
void | UpdateRegistry ()
void | UpdateRegistry ()
virtual void | WinHelp (DWORD dwData, UINT nCmd=HELP_CONTEXT)
virtual void | WinHelp (DWORD dwData, UINT nCmd=HELP_CONTEXT)

Static Public Member Functions

static BOOL CALLBACK | StaticEnumProc (HWND hWnd, LPARAM lParam)
static BOOL CALLBACK | StaticEnumProc (HWND hWnd, LPARAM lParam)

Public Attributes

CWordPadCommandLineInfo cmdInfo
BOOL | m_bForceOEM
BOOL | m_bForceTextMode
BOOL | m_bHiColorIcons
BOOL | m_bLargeIcons
BOOL | m_bMaximized
BOOL | m_bPromptForType
BOOL | m_bWin31
BOOL | m_bWin4
BOOL | m_bWordSel
CDC | m_dcScreen
LOGFONT | m_lf
CList< HWND, HWND > | m_listPrinterNotify
int | m_nDefFont
int | m_nFilterIndex
int | m_nNewDocType
CDocOptions m_optionsIP
CDocOptions m_optionsNull
CDocOptions m_optionsRTF
CDocOptions m_optionsText
CDocOptions m_optionsWord
CDocOptions m_optionsWrite
CRect | m_rectInitialFrame
CRect | m_rectPageMargin
COleTemplateServer | m_server

Static Public Attributes

static int | m_nOpenMsg = RegisterWindowMessage(_T("WordPadOpenMessage"))
static int | m_nPrinterChangedMsg = RegisterWindowMessage(_T("WordPadPrinterChanged"))

Private Attributes

int | m_nUnits

Static Private Attributes

static const int | m_nNumUnits = 7
static const int | m_nPrimaryNumUnits = 4
static CUnit | m_units [7]

Detailed Description

Definition at line 36 of file wordpad.h.

Constructor & Destructor Documentation

CWordPadApp::CWordPadApp ( )

Definition at line 91 of file wordpad.cpp.

                         : m_optionsText(0), m_optionsRTF(1),
  m_optionsWord(2), m_optionsWrite(2), m_optionsIP(2), m_optionsNull(0)  //
{
  _tsetlocale(LC_ALL, _T(""));

  m_nFilterIndex = 1;
  DWORD dwVersion = ::GetVersion();
  m_bWin4 = (BYTE)dwVersion >= 4;
#ifndef _UNICODE
  m_bWin31 = (dwVersion > 0x80000000 && !m_bWin4);
#endif
  m_nDefFont = (m_bWin4) ? DEFAULT_GUI_FONT : ANSI_VAR_FONT;
  m_dcScreen.Attach(::GetDC(NULL));
  m_bLargeIcons = m_dcScreen.GetDeviceCaps(LOGPIXELSX) >= 120;
  m_bForceOEM = FALSE;
}

CWordPadApp::~CWordPadApp ( )

Definition at line 108 of file wordpad.cpp.

{
  if (m_dcScreen.m_hDC != NULL)
    ::ReleaseDC(NULL, m_dcScreen.Detach());
}

CWordPadApp::CWordPadApp ( )
CWordPadApp::~CWordPadApp ( )

Member Function Documentation

HGLOBAL CWordPadApp::CreateDevNames ( )

Definition at line 882 of file wordpad.cpp.

{
  HGLOBAL hDev = NULL;
  if (!cmdInfo.m_strDriverName.IsEmpty() && !cmdInfo.m_strPrinterName.IsEmpty() &&
    !cmdInfo.m_strPortName.IsEmpty())
  {
    int nAllocSize = 4 * sizeof(WORD) +
      cmdInfo.m_strDriverName.GetLength() + 1 +
      cmdInfo.m_strPrinterName.GetLength() + 1 +
      cmdInfo.m_strPortName.GetLength() + 1;
    hDev = GlobalAlloc(GPTR, nAllocSize);
    LPDEVNAMES lpDev = (LPDEVNAMES)GlobalLock(hDev);
    lpDev->wDriverOffset = sizeof(WORD)*4;
    _tcscpy_s((TCHAR*)lpDev + lpDev->wDriverOffset, nAllocSize - lpDev->wDriverOffset, cmdInfo.m_strDriverName);

    lpDev->wDeviceOffset = (WORD)(lpDev->wDriverOffset + cmdInfo.m_strDriverName.GetLength()+1);
    _tcscpy_s((TCHAR*)lpDev + lpDev->wDriverOffset, nAllocSize - lpDev->wDriverOffset, cmdInfo.m_strPrinterName);

    lpDev->wOutputOffset = (WORD)(lpDev->wDeviceOffset + cmdInfo.m_strPrinterName.GetLength()+1);
    _tcscpy_s((TCHAR*)lpDev + lpDev->wDriverOffset, nAllocSize - lpDev->wDriverOffset, cmdInfo.m_strPortName);

    lpDev->wDefault = 0;
  }
  return hDev;
}

int CWordPadApp::ExitInstance ( ) [virtual]

Definition at line 503 of file wordpad.cpp.

{
  m_pszHelpFilePath = NULL;

  FreeLibrary(GetModuleHandle(_T("RICHED32.DLL")));
  SaveOptions();

  return CWinApp::ExitInstance();
}

virtual int CWordPadApp::ExitInstance ( ) [virtual]
LPCTSTR CWordPadApp::GetAbbrev ( ) [inline]

Definition at line 77 of file wordpad.h.

{ return m_units[m_nUnits].m_strAbbrev;}

LPCTSTR CWordPadApp::GetAbbrev ( ) [inline]

Definition at line 82 of file wordpad.h.

{ return m_units[m_nUnits].m_strAbbrev;}

LPCTSTR CWordPadApp::GetAbbrev ( int n ) [inline]

Definition at line 83 of file wordpad.h.

{ return m_units[n].m_strAbbrev;}

LPCTSTR CWordPadApp::GetAbbrev ( int n ) [inline]

Definition at line 78 of file wordpad.h.

{ return m_units[n].m_strAbbrev;}

CDockState & CWordPadApp::GetDockState | ( | int | nDocType,
 |  | BOOL | bPrimary = TRUE
 | ) |  |

Definition at line 392 of file wordpad.cpp.

{
  return GetDocOptions(nDocType).GetDockState(bPrimary);
}

CDockState & CWordPadApp::GetDockState | ( | LONG_PTR | nDocType,
 |  | BOOL | bPrimary = TRUE
 | ) |  |

Definition at line 346 of file wordpad.cpp.

{
  return GetDocOptions(nDocType).GetDockState(bPrimary);
}

CDocOptions & CWordPadApp::GetDocOptions ( LONG_PTR nDocType )

Definition at line 325 of file wordpad.cpp.

{
  switch (nDocType)
  {
    case RD_WINWORD6:
    case RD_WORDPAD:
      return m_optionsWord;
    case RD_RICHTEXT:
      return m_optionsRTF;
    case RD_TEXT:
    case RD_OEMTEXT:
      return m_optionsText;
    case RD_WRITE:
      return m_optionsWrite;
    case RD_EMBEDDED:
      return m_optionsIP;
  }
  ASSERT(FALSE);
  return m_optionsNull;
}

CDocOptions & CWordPadApp::GetDocOptions ( int nDocType )

Definition at line 371 of file wordpad.cpp.

{
  switch (nDocType)
  {
    case RD_WINWORD6:
    case RD_WORDPAD:
      return m_optionsWord;
    case RD_RICHTEXT:
      return m_optionsRTF;
    case RD_TEXT:
    case RD_OEMTEXT:
      return m_optionsText;
    case RD_WRITE:
      return m_optionsWrite;
    case RD_EMBEDDED:
      return m_optionsIP;
  }
  ASSERT(FALSE);
  return m_optionsNull;
}

int CWordPadApp::GetTPU ( ) [inline]

Definition at line 80 of file wordpad.h.

{ return GetTPU(m_nUnits);}

int CWordPadApp::GetTPU ( int n ) [inline]

Definition at line 81 of file wordpad.h.

{ return m_units[n].m_nTPU;}

int CWordPadApp::GetTPU ( ) [inline]

Definition at line 75 of file wordpad.h.

{ return GetTPU(m_nUnits);}

int CWordPadApp::GetTPU ( int n ) [inline]

Definition at line 76 of file wordpad.h.

{ return m_units[n].m_nTPU;}

const CUnit& CWordPadApp::GetUnit ( ) [inline]

Definition at line 84 of file wordpad.h.

{return m_units[m_nUnits];}

const CUnit& CWordPadApp::GetUnit ( ) [inline]

Definition at line 79 of file wordpad.h.

{return m_units[m_nUnits];}

int CWordPadApp::GetUnits ( ) [inline]

Definition at line 79 of file wordpad.h.

{return m_nUnits;}

int CWordPadApp::GetUnits ( ) [inline]

Definition at line 74 of file wordpad.h.

{return m_nUnits;}

BOOL CWordPadApp::InitInstance ( ) [virtual]

Definition at line 135 of file wordpad.cpp.

{
  ParseCommandLine(cmdInfo);

  if (::FindWindow(szWordPadClass, NULL) && IsDocOpen(cmdInfo.m_strFileName))
    return FALSE;

  SetRegistryKey(szRegKey);
  LoadOptions();

  CSplashWnd splash;
  BOOL bSplash = cmdInfo.m_bShowSplash;
  if (!cmdInfo.m_bRunEmbedded)
  {
    switch (m_nCmdShow)
    {
      case SW_HIDE:
      case SW_SHOWMINIMIZED:
      case SW_MINIMIZE:
      case SW_SHOWMINNOACTIVE:
        bSplash = FALSE;
        break;
      case SW_RESTORE:
      case SW_SHOW:
      case SW_SHOWDEFAULT:
      case SW_SHOWNA:
      case SW_SHOWNOACTIVATE:
      case SW_SHOWNORMAL:
      case SW_SHOWMAXIMIZED:
        if (m_bMaximized)
          m_nCmdShow = SW_SHOWMAXIMIZED;
        break;
    }
  }
  else
  {
    //Excel 4 will start OLE servers minimized
    m_nCmdShow = SW_SHOWNORMAL;
  }
  int nCmdShow = m_nCmdShow;

  if (bSplash)
  {
    // only show splash if not embedded
    splash.Create();
    splash.ShowWindow(SW_SHOW);
    splash.UpdateWindow();
  }

  LoadAbbrevStrings();

  m_hDevNames = CreateDevNames();
  NotifyPrinterChanged((m_hDevNames == NULL));

  free((void*)m_pszHelpFilePath);
  m_pszHelpFilePath = _T("WORDPAD.HLP");

  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }
  RegisterFormats();

  // Initialize RichEdit control
  if (!AfxInitRichEdit())
  {
    AfxMessageBox(IDS_RICHED_LOAD_FAIL, MB_OK|MB_ICONEXCLAMATION);
    return FALSE;
  }

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  DocTemplate.SetContainerInfo(IDR_CNTR_INPLACE);
  DocTemplate.SetServerInfo(
    IDR_SRVR_EMBEDDED, IDR_SRVR_INPLACE,
    RUNTIME_CLASS(CInPlaceFrame));

  // Connect the COleTemplateServer to the document template.
  //  The COleTemplateServer creates new documents on behalf
  //  of requesting OLE containers by using information
  //  specified in the document template.
  m_server.ConnectTemplate(clsid, &DocTemplate, TRUE);
    // Note: SDI applications register server objects only if /Embedding
    //   or /Automation is present on the command line.

  // Check to see if launched as OLE server
  if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
  {
    // Register all OLE server (factories) as running.  This enables the
    //  OLE libraries to create objects from other applications.
    COleTemplateServer::RegisterAll();
    AfxOleSetUserCtrl(FALSE);

    // Application was run with /Embedding or /Automation.  Don't show the
    //  main window in this case.
    return TRUE;
  }

  // make sure the main window is showing
  m_bPromptForType = FALSE;
  OnFileNew();
  m_bPromptForType = TRUE;
  // destroy splash window
  if (cmdInfo.m_bShowSplash)
    splash.DestroyWindow();
  m_nCmdShow = -1;
  if (m_pMainWnd == NULL) // i.e. OnFileNew failed
    return FALSE;

  if (!cmdInfo.m_strFileName.IsEmpty())   // open an existing document
    m_nCmdShow = nCmdShow;
  // Dispatch commands specified on the command line
  if (cmdInfo.m_nShellCommand != CCommandLineInfo::FileNew &&
    !ProcessShellCommand(cmdInfo))
  {
    return FALSE;
  }

  // Enable File Manager drag/drop open
  m_pMainWnd->DragAcceptFiles();

  // When a server application is launched stand-alone, it is a good idea
  //  to update the system registry in case it has been damaged.
  // do registry stuff in separate thread
#ifndef _UNICODE
  if (m_bWin31) // no threads on Win32s
    UpdateRegistry();
  else
#endif
    AfxBeginThread(DoRegistry, this, THREAD_PRIORITY_IDLE);

  return TRUE;
}

virtual BOOL CWordPadApp::InitInstance ( ) [virtual]
BOOL CWordPadApp::IsDocOpen ( LPCTSTR lpszFileName )

Definition at line 279 of file wordpad.cpp.

{
  if (lpszFileName[0] == NULL)
    return FALSE;
  TCHAR szPath[_MAX_PATH];
  AfxFullPath(szPath, lpszFileName);
  ATOM atom = GlobalAddAtom(szPath);
  ASSERT(atom != NULL);
  if (atom == NULL)
    return FALSE;
  EnumWindows(StaticEnumProc, (LPARAM)&atom);
  if (atom == NULL)
    return TRUE;
  DeleteAtom(atom);
  return FALSE;
}

BOOL CWordPadApp::IsDocOpen ( LPCTSTR lpszFileName )
BOOL CWordPadApp::IsIdleMessage ( MSG * pMsg )

Definition at line 875 of file wordpad.cpp.

{
  if (pMsg->message == WM_MOUSEMOVE || pMsg->message == WM_NCMOUSEMOVE)
    return FALSE;
  return CWinApp::IsIdleMessage(pMsg);
}

BOOL CWordPadApp::IsIdleMessage ( MSG * pMsg )
void CWordPadApp::LoadAbbrevStrings ( )

Definition at line 417 of file wordpad.cpp.

{
  for (int i=0;i<m_nNumUnits;i++)
    m_units[i].m_strAbbrev.LoadString(m_units[i].m_nAbbrevID);
}

void CWordPadApp::LoadAbbrevStrings ( )
void CWordPadApp::LoadOptions ( )

Definition at line 367 of file wordpad.cpp.

{
  BYTE* pb = NULL;
  UINT nLen = 0;

  HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
  if (hFont == NULL)
    hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
  VERIFY(GetObject(hFont, sizeof(LOGFONT), &m_lf));

  m_bWordSel = GetProfileInt(szSection, szWordSel, TRUE);
  TCHAR buf[2];
  buf[0] = NULL;
  GetLocaleInfo(GetUserDefaultLCID(), LOCALE_IMEASURE, buf, 2);
  int nDefUnits = buf[0] == '1' ? 0 : 1;
  SetUnits(GetProfileInt(szSection, szUnits, nDefUnits));
  m_bMaximized = GetProfileInt(szSection, szMaximized, (int)FALSE);

  if (GetProfileBinary(szSection, szFrameRect, &pb, &nLen))
  {
    ASSERT(nLen == sizeof(CRect));
    memcpy_s(&m_rectInitialFrame, nLen, pb, sizeof(CRect));
    delete pb;
  }
  else
    m_rectInitialFrame.SetRect(0,0,0,0);

  CRect rectScreen(0, 0, GetSystemMetrics(SM_CXSCREEN),
    GetSystemMetrics(SM_CYSCREEN));
  CRect rectInt;
  rectInt.IntersectRect(&rectScreen, &m_rectInitialFrame);
  if (rectInt.Width() < 10 || rectInt.Height() < 10)
    m_rectInitialFrame.SetRect(0, 0, 0, 0);

  if (GetProfileBinary(szSection, szPageMargin, &pb, &nLen))
  {
    ASSERT(nLen == sizeof(CRect));
    memcpy_s(&m_rectPageMargin, nLen, pb, sizeof(CRect));
    delete pb;
  }
  else
    m_rectPageMargin.SetRect(1800, 1440, 1800, 1440);

  m_optionsText.LoadOptions(szTextSection);
  m_optionsRTF.LoadOptions(szRTFSection);
  m_optionsWord.LoadOptions(szWordSection);
  m_optionsWrite.LoadOptions(szWriteSection);
  m_optionsIP.LoadOptions(szIPSection);
}

void CWordPadApp::LoadOptions ( )
void CWordPadApp::NotifyPrinterChanged ( BOOL bUpdatePrinterSelection = FALSE )
void CWordPadApp::NotifyPrinterChanged ( BOOL bUpdatePrinterSelection = FALSE )

Definition at line 863 of file wordpad.cpp.

{
  if (bUpdatePrinterSelection)
    UpdatePrinterSelection(FALSE);
  POSITION pos = m_listPrinterNotify.GetHeadPosition();
  while (pos != NULL)
  {
    HWND hWnd = m_listPrinterNotify.GetNext(pos);
    ::SendMessage(hWnd, m_nPrinterChangedMsg, 0, 0);
  }
}

void CWordPadApp::OnAppAbout ( )

Definition at line 496 of file wordpad.cpp.

{
  CString strTitle;
  VERIFY(strTitle.LoadString(AFX_IDS_APP_TITLE));
  ShellAbout(m_pMainWnd->GetSafeHwnd(), strTitle, _T(""), LoadIcon(IDR_MAINFRAME));
}

afx_msg void CWordPadApp::OnAppAbout ( )
BOOL CWordPadApp::OnDDECommand ( LPTSTR lpszCommand ) [virtual]

Definition at line 615 of file wordpad.cpp.

{
  return FALSE;
}

virtual BOOL CWordPadApp::OnDDECommand ( LPTSTR lpszCommand ) [virtual]
void CWordPadApp::OnFileNew ( )

Definition at line 513 of file wordpad.cpp.

{
  int nDocType = -1;
  if (!m_bPromptForType)
  {
    if (cmdInfo.m_bForceTextMode)
      nDocType = RD_TEXT;
    else if (!cmdInfo.m_strFileName.IsEmpty())
    {
      CFileException fe;
      nDocType = GetDocTypeFromName(cmdInfo.m_strFileName, fe);
    }
    if (nDocType == -1)
      nDocType = RD_DEFAULT;
  }
  else
  {
    CFileNewDialog dlg;
    if (dlg.DoModal() == IDCANCEL)
      return;

    nDocType = (dlg.m_nSel == 0) ? RD_DEFAULT:  //Word 6
          (dlg.m_nSel == 1) ? RD_RICHTEXT :   //RTF
          RD_TEXT ;                   //text

    if (nDocType != RD_TEXT)
      cmdInfo.m_bForceTextMode = FALSE;
  }
  m_nNewDocType = nDocType;
  DocTemplate.OpenDocumentFile(NULL);
    // if returns NULL, the user has already been alerted
}

afx_msg void CWordPadApp::OnFileNew ( )
void CWordPadApp::OnFileOpen ( )

Definition at line 599 of file wordpad.cpp.

{
  // prompt the user (with all document templates)
  CString newName;
  int nType = RD_DEFAULT;
  if (!PromptForFileName(newName, AFX_IDS_OPENFILE,
    OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, &nType))
    return; // open cancelled

  if (nType == RD_OEMTEXT)
    m_bForceOEM = TRUE;
  OpenDocumentFile(newName);
  m_bForceOEM = FALSE;
  // if returns NULL, the user has already been alerted
}

afx_msg void CWordPadApp::OnFileOpen ( )
void CWordPadApp::OnViewAppLook ( )

Definition at line 988 of file wordpad.cpp.

{
  CAppLookDlg dlg (FALSE);
  dlg.DoModal ();
}

BOOL CWordPadApp::ParseMeasurement | ( | TCHAR * | buf,
 |  | int & | lVal
 | ) |  |
BOOL CWordPadApp::ParseMeasurement | ( | TCHAR * | buf,
 |  | int & | lVal
 | ) |  |
void CWordPadApp::PreLoadState ( ) [virtual]

Definition at line 983 of file wordpad.cpp.

{
  GetContextMenuManager()->AddMenu (_T("Context menu"), IDR_TEXT_POPUP);
}

virtual BOOL CWordPadApp::PreTranslateMessage ( MSG * pMsg ) [virtual]
BOOL CWordPadApp::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 855 of file wordpad.cpp.

{
  if (pMsg->message == WM_PAINT)
    return FALSE;
  // CWinApp::PreTranslateMessage does nothing but call base
  return CWinThread::PreTranslateMessage(pMsg);
}

void CWordPadApp::PrintTwips | ( | TCHAR * | buf,
 |  | int | nSize,
 |  | int | nValue,
 |  | int | nDecimal
 | ) |  |

Definition at line 450 of file wordpad.cpp.

{
  ASSERT(nDec == 2);
  int div = GetTPU();
  int lval = nValue;
  BOOL bNeg = FALSE;

  int* pVal = new int[nDec+1];

  if (lval < 0)
  {
    bNeg = TRUE;
    lval = -lval;
  }

  int i;
  for (i=0;i<=nDec;i++)
  {
    pVal[i] = lval/div; //integer number
    lval -= pVal[i]*div;
    lval *= 10;
  }
  i--;
  if (lval >= div/2)
    pVal[i]++;

  while ((pVal[i] == 10) && (i != 0))
  {
    pVal[i] = 0;
    pVal[--i]++;
  }

  while (nDec && pVal[nDec] == 0)
    nDec--;

  _stprintf_s(buf, nSize, _T("%.*f"), nDec, (float)nValue/(float)div);

  if (m_units[m_nUnits].m_bSpaceAbbrev)
    _tcscat_s(buf, nSize, _T(" "));
  _tcscat_s(buf, nSize, GetAbbrev());
  delete []pVal;
}

void CWordPadApp::PrintTwips | ( | TCHAR * | buf,
 |  | int | nValue,
 |  | int | nDecimal
 | ) |  |

Definition at line 500 of file wordpad.cpp.

{
  ASSERT(nDec == 2);
  int div = GetTPU();
  int lval = nValue;
  BOOL bNeg = FALSE;

  int* pVal = new int[nDec+1];

  if (lval < 0)
  {
    bNeg = TRUE;
    lval = -lval;
  }

  int i = 0;

  for (i=0;i<=nDec;i++)
  {
    pVal[i] = lval/div; //integer number
    lval -= pVal[i]*div;
    lval *= 10;
  }
  i--;
  if (lval >= div/2)
    pVal[i]++;

  while ((pVal[i] == 10) && (i != 0))
  {
    pVal[i] = 0;
    pVal[--i]++;
  }

  while (nDec && pVal[nDec] == 0)
    nDec--;

  _stprintf(buf, _T("%.*f"), nDec, (float)nValue/(float)div);

  if (m_units[m_nUnits].m_bSpaceAbbrev)
    lstrcat(buf, _T(" "));
  lstrcat(buf, GetAbbrev());
  delete []pVal;
}

BOOL CWordPadApp::PromptForFileName | ( | CString & | fileName,
 |  | UINT | nIDSTitle,
 |  | DWORD | dwFlags,
 |  | BOOL | bOpenFileDialog,
 |  | int * | pType = NULL
 | ) |  |

Definition at line 548 of file wordpad.cpp.

{
  ScanForConverters();
  CFileDialog dlgFile(bOpenFileDialog);
  CString title;

  VERIFY(title.LoadString(nIDSTitle));

  dlgFile.m_ofn.Flags |= dwFlags;
//  dlgFile.m_ofn.Flags &= ~OFN_SHOWHELP;

  int nIndex = m_nFilterIndex;
  if (!bOpenFileDialog)
  {
    int nDocType = (pType != NULL) ? *pType : RD_DEFAULT;
    nIndex = GetIndexFromType(nDocType, bOpenFileDialog);
    if (nIndex == -1)
      nIndex = GetIndexFromType(RD_DEFAULT, bOpenFileDialog);
    if (nIndex == -1)
      nIndex = GetIndexFromType(RD_NATIVE, bOpenFileDialog);
    ASSERT(nIndex != -1);
    nIndex++;
  }
  dlgFile.m_ofn.nFilterIndex = nIndex;
  // strDefExt is necessary to hold onto the memory from GetExtFromType
  CString strDefExt = GetExtFromType(GetTypeFromIndex(nIndex-1, bOpenFileDialog));
  dlgFile.m_ofn.lpstrDefExt = strDefExt;

  CString strFilter = GetFileTypes(bOpenFileDialog);
  dlgFile.m_ofn.lpstrFilter = strFilter;
  dlgFile.m_ofn.lpstrTitle = title;
  dlgFile.m_ofn.lpstrFile = fileName.GetBuffer(_MAX_PATH);

  BOOL bRet = (dlgFile.DoModal() == IDOK) ? TRUE : FALSE;
  fileName.ReleaseBuffer();
  if (bRet)
  {
    if (bOpenFileDialog)
      m_nFilterIndex = dlgFile.m_ofn.nFilterIndex;
    if (pType != NULL)
    {
      nIndex = (int)dlgFile.m_ofn.nFilterIndex - 1;
      ASSERT(nIndex >= 0);
      *pType = GetTypeFromIndex(nIndex, bOpenFileDialog);
    }
  }
  return bRet;
}

BOOL CWordPadApp::PromptForFileName | ( | CString & | fileName,
 |  | UINT | nIDSTitle,
 |  | DWORD | dwFlags,
 |  | BOOL | bOpenFileDialog,
 |  | int * | pType = NULL
 | ) |  |
void CWordPadApp::RegisterFormats ( )

Definition at line 318 of file wordpad.cpp.

{
  cfEmbeddedObject = (CLIPFORMAT)::RegisterClipboardFormat(_T("Embedded Object"));
  cfRTF = (CLIPFORMAT)::RegisterClipboardFormat(CF_RTF);
  cfRTO = (CLIPFORMAT)::RegisterClipboardFormat(CF_RETEXTOBJ);
}

void CWordPadApp::RegisterFormats ( )
void CWordPadApp::SaveOptions ( )
void CWordPadApp::SaveOptions ( )

Definition at line 351 of file wordpad.cpp.

{
  WriteProfileInt(szSection, szWordSel, m_bWordSel);
  WriteProfileInt(szSection, szUnits, GetUnits());
  WriteProfileInt(szSection, szMaximized, m_bMaximized);
  WriteProfileBinary(szSection, szFrameRect, (BYTE*)&m_rectInitialFrame,
    sizeof(CRect));
  WriteProfileBinary(szSection, szPageMargin, (BYTE*)&m_rectPageMargin,
    sizeof(CRect));
  m_optionsText.SaveOptions(szTextSection);
  m_optionsRTF.SaveOptions(szRTFSection);
  m_optionsWord.SaveOptions(szWordSection);
  m_optionsWrite.SaveOptions(szWriteSection);
  m_optionsIP.SaveOptions(szIPSection);
}

void CWordPadApp::SetUnits ( int n ) [inline]

Definition at line 89 of file wordpad.h.

  { ASSERT(n>=0 && n <m_nPrimaryNumUnits); m_nUnits = n; }

void CWordPadApp::SetUnits ( int n ) [inline]

Definition at line 84 of file wordpad.h.

  { ASSERT(n>=0 && n <m_nPrimaryNumUnits); m_nUnits = n; }

BOOL CALLBACK CWordPadApp::StaticEnumProc | ( | HWND | hWnd,
 |  | LPARAM | lParam |
 | ) |  |  | [static]

Definition at line 296 of file wordpad.cpp.

{
  TCHAR szClassName[30];
  GetClassName(hWnd, szClassName, 30);
  if (lstrcmp(szClassName, szWordPadClass) != 0)
    return TRUE;

  ATOM* pAtom = (ATOM*)lParam;
  ENSURE(pAtom != NULL);
  DWORD_PTR dw = NULL;
  ::SendMessageTimeout(hWnd, m_nOpenMsg, NULL, (LPARAM)*pAtom,
    SMTO_ABORTIFHUNG, 500, &dw);
  if (dw)
  {
    ::SetForegroundWindow(hWnd);
    DeleteAtom(*pAtom);
    *pAtom = NULL;
    return FALSE;
  }
  return TRUE;
}

static BOOL CALLBACK CWordPadApp::StaticEnumProc | ( | HWND | hWnd,
 |  | LPARAM | lParam |
 | ) |  |  | [static]
void CWordPadApp::UpdateRegistry ( )

Definition at line 726 of file wordpad.cpp.

{
  USES_CONVERSION;
  LPOLESTR lpszClassID = NULL;
  CDocTemplate* pDocTemplate = &DocTemplate;

  // get registration info from doc template string
  CString strServerName;
  CString strLocalServerName;
  CString strLocalShortName;

  if (!pDocTemplate->GetDocString(strServerName,
     CDocTemplate::regFileTypeId) || strServerName.IsEmpty())
  {
    TRACE0("Error: not enough information in DocTemplate to register OLE server.\n");
    return;
  }
  if (!pDocTemplate->GetDocString(strLocalServerName,
     CDocTemplate::regFileTypeName))
    strLocalServerName = strServerName;     // use non-localized name
  if (!pDocTemplate->GetDocString(strLocalShortName,
    CDocTemplate::fileNewName))
    strLocalShortName = strLocalServerName; // use long name

  ASSERT(strServerName.Find(' ') == -1);  // no spaces allowed

  ::StringFromCLSID(clsid, &lpszClassID);
  ASSERT (lpszClassID != NULL);

  // get path name to server
  TCHAR szLongPathName[_MAX_PATH];
  TCHAR szShortPathName[_MAX_PATH];
  ::GetModuleFileName(AfxGetInstanceHandle(), szLongPathName, _MAX_PATH);
  ::GetShortPathName(szLongPathName, szShortPathName, _MAX_PATH);

  LPCTSTR rglpszSymbols[NUM_REG_ARGS];
  rglpszSymbols[0] = COLE2CT(lpszClassID);
  rglpszSymbols[1] = strServerName;
  rglpszSymbols[2] = szShortPathName;
  rglpszSymbols[3] = strLocalShortName;
  rglpszSymbols[4] = strLocalServerName;
  rglpszSymbols[5] = m_pszAppName;    // will usually be long, readable name
  rglpszSymbols[6] = NULL;

  if (RegisterHelper((LPCTSTR*)rglpszWordPadRegister, rglpszSymbols, FALSE))
    RegisterHelper((LPCTSTR*)rglpszWordPadOverwrite, rglpszSymbols, TRUE);

//  RegisterExt(_T(".txt"), _T("txtfile"), IDS_TEXT_DOC, rglpszSymbols,
//      (LPCTSTR*)rglpszTxtExtRegister, (LPCTSTR*)rglpszTxtRegister, 3);
  RegisterExt(_T(".rtf"), _T("rtffile"), IDS_RICHTEXT_DOC, rglpszSymbols,
    (LPCTSTR*)rglpszRtfExtRegister, (LPCTSTR*)rglpszRtfRegister, 1);
  RegisterExt(_T(".wri"), _T("wrifile"), IDS_WRITE_DOC, rglpszSymbols,
    (LPCTSTR*)rglpszWriExtRegister, (LPCTSTR*)rglpszWriRegister, 2);
  RegisterExt(_T(".doc"), _T("WordPad.Document.1"), IDS_WINWORD6_DOC, rglpszSymbols,
    (LPCTSTR*)rglpszDocExtRegister, (LPCTSTR*)rglpszDocRegister, 1);

  // free memory for class ID
  ASSERT(lpszClassID != NULL);
  CoTaskMemFree(lpszClassID);
}

void CWordPadApp::UpdateRegistry ( )
virtual void CWordPadApp::WinHelp | ( | DWORD | dwData,
 |  | UINT | nCmd = HELP_CONTEXT |
 | ) |  |  | [virtual]
void CWordPadApp::WinHelp | ( | DWORD | dwData,
 |  | UINT | nCmd = HELP_CONTEXT |
 | ) |  |  | [virtual]

Definition at line 848 of file wordpad.cpp.

{
  if (nCmd == HELP_INDEX)
    nCmd = HELP_FINDER;
  CWinApp::WinHelp(dwData, nCmd);
}

Member Data Documentation

CWordPadCommandLineInfo CWordPadApp::cmdInfo

Definition at line 43 of file wordpad.h.

BOOL CWordPadApp::m_bForceOEM

Definition at line 60 of file wordpad.h.

BOOL CWordPadApp::m_bForceTextMode

Definition at line 58 of file wordpad.h.

BOOL CWordPadApp::m_bHiColorIcons

Definition at line 58 of file wordpad.h.

BOOL CWordPadApp::m_bLargeIcons

Definition at line 57 of file wordpad.h.

BOOL CWordPadApp::m_bMaximized

Definition at line 51 of file wordpad.h.

BOOL CWordPadApp::m_bPromptForType

Definition at line 52 of file wordpad.h.

BOOL CWordPadApp::m_bWin31

Definition at line 55 of file wordpad.h.

BOOL CWordPadApp::m_bWin4

Definition at line 53 of file wordpad.h.

BOOL CWordPadApp::m_bWordSel

Definition at line 59 of file wordpad.h.

CDC CWordPadApp::m_dcScreen

Definition at line 44 of file wordpad.h.

LOGFONT CWordPadApp::m_lf

Definition at line 45 of file wordpad.h.

CList< HWND, HWND > CWordPadApp::m_listPrinterNotify

Definition at line 69 of file wordpad.h.

int CWordPadApp::m_nDefFont

Definition at line 46 of file wordpad.h.

int CWordPadApp::m_nFilterIndex

Definition at line 61 of file wordpad.h.

int CWordPadApp::m_nNewDocType

Definition at line 62 of file wordpad.h.

static const int CWordPadApp::m_nNumUnits = 7 [static, private]

Definition at line 127 of file wordpad.h.

static int CWordPadApp::m_nOpenMsg = RegisterWindowMessage(_T("WordPadOpenMessage")) [static]

Definition at line 47 of file wordpad.h.

static const int CWordPadApp::m_nPrimaryNumUnits = 4 [static, private]

Definition at line 126 of file wordpad.h.

static int CWordPadApp::m_nPrinterChangedMsg = RegisterWindowMessage(_T("WordPadPrinterChanged")) [static]

Definition at line 48 of file wordpad.h.

int CWordPadApp::m_nUnits [private]

Definition at line 125 of file wordpad.h.

CDocOptions CWordPadApp::m_optionsIP

Definition at line 67 of file wordpad.h.

CDocOptions CWordPadApp::m_optionsNull

Definition at line 68 of file wordpad.h.

CDocOptions CWordPadApp::m_optionsRTF

Definition at line 64 of file wordpad.h.

CDocOptions CWordPadApp::m_optionsText

Definition at line 63 of file wordpad.h.

CDocOptions CWordPadApp::m_optionsWord

Definition at line 65 of file wordpad.h.

CDocOptions CWordPadApp::m_optionsWrite

Definition at line 66 of file wordpad.h.

CRect CWordPadApp::m_rectInitialFrame

Definition at line 50 of file wordpad.h.

CRect CWordPadApp::m_rectPageMargin

Definition at line 49 of file wordpad.h.

COleTemplateServer CWordPadApp::m_server

Definition at line 115 of file wordpad.h.

static CUnit CWordPadApp::m_units [static, private]
Initial value:
{

CUnit(1440, 180,        720,    1440,       90,         IDS_INCH1_ABBREV,   FALSE),
CUnit(568,  142,        284,    568,        142,        IDS_CM_ABBREV,      TRUE),
CUnit(20,   120,        720,    720,        100,        IDS_POINT_ABBREV,   TRUE),
CUnit(240,  240,        1440,   1440,       120,        IDS_PICA_ABBREV,    TRUE),
CUnit(1440, 180,        720,    1440,       90,         IDS_INCH2_ABBREV,   FALSE),
CUnit(1440, 180,        720,    1440,       90,         IDS_INCH3_ABBREV,   FALSE),
CUnit(1440, 180,        720,    1440,       90,         IDS_INCH4_ABBREV,   FALSE)
}

Definition at line 128 of file wordpad.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/wordpad.h
  • vc2008fp/WordPad/wordpad.h
  • ole/wordpad/wordpad.cpp
  • vc2008fp/WordPad/wordpad.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWordPadCntrItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CWordPadCntrItem Class Reference

#include "cntritem.h"

List of all members.

Public Member Functions

CWordPadCntrItem (REOBJECT *preo=NULL, CWordPadDoc *pContainer=NULL)
CWordPadCntrItem (REOBJECT *preo=NULL, CWordPadDoc *pContainer=NULL)
CWordPadView * GetActiveView ()
CWordPadView * GetActiveView ()
CWordPadDoc * GetDocument ()
CWordPadDoc * GetDocument ()

Protected Member Functions

virtual BOOL OnShowPanes (CFrameWnd *pFrameWnd, BOOL bShow)

Detailed Description

Definition at line 15 of file cntritem.h.

Constructor & Destructor Documentation

CWordPadCntrItem::CWordPadCntrItem | ( | REOBJECT * | preo = NULL,
 |  | CWordPadDoc * | pContainer = NULL
 | ) |  |

Definition at line 29 of file cntritem.cpp.

  : CRichEditCntrItem(preo, pContainer)
{
}

CWordPadCntrItem::CWordPadCntrItem | ( | REOBJECT * | preo = NULL,
 |  | CWordPadDoc * | pContainer = NULL
 | ) |  |

Member Function Documentation

CWordPadView* CWordPadCntrItem::GetActiveView ( ) [inline]

Definition at line 31 of file cntritem.h.

    { return (CWordPadView*)COleClientItem::GetActiveView(); }

CWordPadView* CWordPadCntrItem::GetActiveView ( ) [inline]

Definition at line 33 of file cntritem.h.

    { return (CWordPadView*)COleClientItem::GetActiveView(); }

CWordPadDoc* CWordPadCntrItem::GetDocument ( ) [inline]

Definition at line 29 of file cntritem.h.

    { return (CWordPadDoc*)COleClientItem::GetDocument(); }

CWordPadDoc* CWordPadCntrItem::GetDocument ( ) [inline]

Definition at line 31 of file cntritem.h.

    { return (CWordPadDoc*)COleClientItem::GetDocument(); }

BOOL CWordPadCntrItem::OnShowPanes | ( | CFrameWnd * | pFrameWnd,
 |  | BOOL | bShow |
 | ) |  |  | [protected, virtual]

Definition at line 37 of file cntritem.cpp.

{
  CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST (CMDIFrameWndEx, pFrameWnd);
  if (pMainFrame != NULL)
  {
    return pMainFrame->OnShowPanes (bShow);
  }
  else  // Maybe, SDI frame...
  {
    CFrameWndEx* pFrame = DYNAMIC_DOWNCAST (CFrameWndEx, pFrameWnd);
    if (pFrame != NULL)
    {
      return pFrame->OnShowPanes (bShow);
    }
  }

  return FALSE;
}

The documentation for this class was generated from the following files:
  • ole/wordpad/cntritem.h
  • vc2008fp/WordPad/cntritem.h
  • ole/wordpad/cntritem.cpp
  • vc2008fp/WordPad/cntritem.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWordPadCommandLineInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CWordPadCommandLineInfo Class Reference

#include "wordpad.h"

List of all members.

Public Member Functions

CWordPadCommandLineInfo ()
CWordPadCommandLineInfo ()
virtual void | ParseParam (const char *pszParam, BOOL bFlag, BOOL bLast)
virtual void | ParseParam (const char *pszParam, BOOL bFlag, BOOL bLast)

Public Attributes

BOOL | m_bForceTextMode

Detailed Description

Definition at line 28 of file wordpad.h.

Constructor & Destructor Documentation

CWordPadCommandLineInfo::CWordPadCommandLineInfo ( ) [inline]

Definition at line 31 of file wordpad.h.

{m_bForceTextMode = FALSE;}

CWordPadCommandLineInfo::CWordPadCommandLineInfo ( ) [inline]

Definition at line 33 of file wordpad.h.

{m_bForceTextMode = FALSE;}

Member Function Documentation

void CWordPadCommandLineInfo::ParseParam | ( | const char * | pszParam,
 |  | BOOL | bFlag,
 |  | BOOL | bLast |
 | ) |  |  | [virtual]

Definition at line 75 of file wordpad.cpp.

{
  if (bFlag)
  {
    if (lstrcmpA(pszParam, "t") == 0)
    {
      m_bForceTextMode = TRUE;
      return;
    }
  }
  CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
}

virtual void CWordPadCommandLineInfo::ParseParam | ( | const char * | pszParam,
 |  | BOOL | bFlag,
 |  | BOOL | bLast |
 | ) |  |  | [virtual]

Member Data Documentation

BOOL CWordPadCommandLineInfo::m_bForceTextMode

Definition at line 32 of file wordpad.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/wordpad.h
  • vc2008fp/WordPad/wordpad.h
  • ole/wordpad/wordpad.cpp
  • vc2008fp/WordPad/wordpad.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWordPadDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

CWordPadDoc Class Reference

#include "wordpdoc.h"

List of all members.

Public Member Functions

virtual CRichEditCntrItem * | CreateClientItem (REOBJECT *preo) const
virtual CRichEditCntrItem * | CreateClientItem (REOBJECT *preo) const
virtual BOOL | DoSave (LPCTSTR pszPathName, BOOL bReplace=TRUE)
virtual BOOL | DoSave (LPCTSTR pszPathName, BOOL bReplace=TRUE)
void | ForceDelayed (CFrameWnd *pFrameWnd)
void | ForceDelayed (CFrameWnd *pFrameWnd)
CLSID | GetClassID ()
CLSID | GetClassID ()
virtual CFile * | GetFile (LPCTSTR pszPathName, UINT nOpenFlags, CFileException *pException)
virtual CFile * | GetFile (LPCTSTR pszPathName, UINT nOpenFlags, CFileException *pException)
LPCTSTR | GetSection ()
LPCTSTR | GetSection ()
CWordPadView * GetView ()
CWordPadView * GetView ()
int | MapType (int nType)
int | MapType (int nType)
virtual void | OnCloseDocument ()
virtual void | OnCloseDocument ()
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual void | OnDeactivateUI (BOOL bUndoable)
virtual void | OnDeactivateUI (BOOL bUndoable)
virtual BOOL | OnNewDocument ()
virtual BOOL | OnNewDocument ()
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName)
virtual void | PreCloseFrame (CFrameWnd *pFrameArg)
virtual void | PreCloseFrame (CFrameWnd *pFrameArg)
virtual void | ReportSaveLoadException (LPCTSTR lpszPathName, CException *e, BOOL bSaving, UINT nIDPDefault)
virtual void | ReportSaveLoadException (LPCTSTR lpszPathName, CException *e, BOOL bSaving, UINT nIDPDefault)
void | RestoreState (int nType)
void | RestoreState (int nType)
void | SaveState (int nType)
void | SaveState (int nType)
virtual void | Serialize (CArchive &ar)
virtual void | Serialize (CArchive &ar)
void | SetDocType (int nDocType, BOOL bNoOptionChange=FALSE)
void | SetDocType (int nDocType, BOOL bNoOptionChange=FALSE)
virtual void | SetPathName (LPCTSTR lpszPathName, BOOL bAddToMRU=TRUE)

Public Attributes

int | m_nDocType
int | m_nNewDocType

Protected Member Functions

CWordPadDoc ()
CWordPadDoc ()
afx_msg void | OnFileSendMail ()
afx_msg void | OnFileSendMail ()
virtual COleServerItem * | OnGetEmbeddedItem ()
virtual COleServerItem * | OnGetEmbeddedItem ()
afx_msg void | OnUpdateIfEmbedded (CCmdUI *pCmdUI)
afx_msg void | OnUpdateIfEmbedded (CCmdUI *pCmdUI)
afx_msg void | OnUpdateObjectVerbMenu (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOleVerbPopup (CCmdUI *pCmdUI)
afx_msg void | OnUpdateOleVerbPopup (CCmdUI *pCmdUI)
afx_msg void | OnViewOptions ()
afx_msg void | OnViewOptions ()

Detailed Description

Definition at line 16 of file wordpdoc.h.

Constructor & Destructor Documentation

CWordPadDoc::CWordPadDoc ( ) [protected]

Definition at line 69 of file wordpdoc.cpp.

{
  m_nDocType = -1;
  m_nNewDocType = -1;
}

CWordPadDoc::CWordPadDoc ( ) [protected]

Member Function Documentation

CRichEditCntrItem * CWordPadDoc::CreateClientItem ( REOBJECT * preo ) const [virtual]

Definition at line 457 of file wordpdoc.cpp.

{
  // cast away constness of this
  return new CWordPadCntrItem(preo, (CWordPadDoc*)this);
}

virtual CRichEditCntrItem* CWordPadDoc::CreateClientItem ( REOBJECT * preo ) const [virtual]
BOOL CWordPadDoc::DoSave | ( | LPCTSTR | pszPathName,
 |  | BOOL | bReplace = TRUE |
 | ) |  |  | [virtual]

Definition at line 194 of file wordpdoc.cpp.

         : pszPathName can be different than 'm_strPathName'
  // if 'bReplace' is TRUE will change file name if successful (SaveAs)
  // if 'bReplace' is FALSE will not change path name (SaveCopyAs)
{
  CString newName = pszPathName;
  int nOrigDocType = m_nDocType;  //saved in case of SaveCopyAs or failure

  //  newName     bWrite  type    result
  //  empty       TRUE    -       SaveAs dialog
  //  empty       FALSE   -       SaveAs dialog
  //  notempty    TRUE    -       nothing
  //  notempty    FALSE   W6      warn (change to wordpad, save as, cancel)
  //  notempty    FALSE   other   warn (save as, cancel)

  BOOL bModified = IsModified();

  ScanForConverters();

  BOOL bSaveAs = FALSE;
  if (newName.IsEmpty())
    bSaveAs = TRUE;
  else if (!doctypes[m_nDocType].bWrite)
  {
    if (m_nDocType == RD_WINWORD6)
    {
      //      DWORD nHelpIDs[] =
      //      {
      //          0, 0
      //      };
      INT_PTR nRes = CButtonDialog::DisplayMessageBox(
        MAKEINTRESOURCE(IDS_WORD6_WARNING), AfxGetAppName(),
        MAKEINTRESOURCE(IDS_WORD6_WARNING_BUTTONS),
        MB_ICONEXCLAMATION, 1, 2);
      if (nRes == 0) // Save
        SetDocType(RD_WORDPAD, TRUE);
      else if (nRes == 2) // Cancel
        return FALSE;
      else
        bSaveAs = TRUE;
      // else save as
    }
    else //
    {
      if (AfxMessageBox(IDS_SAVE_UNSUPPORTED,
        MB_YESNO | MB_ICONEXCLAMATION) != IDYES)
      {
        return FALSE;
      }
      else
        bSaveAs = TRUE;
    }
  }

  if (m_lpRootStg == NULL && IsTextType(m_nDocType) &&
    !GetView()->IsFormatText())
  {
    // formatting changed in plain old text file
    DWORD nHelpIDs[] =
    {
      0, IDH_WORDPAD_WORD6FILE,
      0, IDH_WORDPAD_FORMATTED,
      0, IDH_WORDPAD_TEXTFILE,
      0, 0
    };
    CString str;
    AfxFormatString1(str, IDS_SAVE_FORMAT_TEXT, GetTitle());
    INT_PTR nRes = CButtonDialog::DisplayMessageBox(str,
      MAKEINTRESOURCE(AFX_IDS_APP_TITLE),
      MAKEINTRESOURCE(IDS_TF_BUTTONS), MB_ICONEXCLAMATION, 0, 3, nHelpIDs);
    if (nRes == 3)
      return FALSE;
    int nDocType = (nRes == 0) ? RD_DEFAULT:    //Word 6
          (nRes == 1) ? RD_RICHTEXT : //RTF
          RD_TEXT;                    //text
    if (IsTextType(m_nDocType) && nDocType != RD_TEXT)
      SetDocType(nDocType, TRUE);
    if (nDocType != RD_TEXT)
      bSaveAs = TRUE;
  }

  GetView()->GetParentFrame()->RecalcLayout();
  if (bSaveAs)
  {
    newName = m_strPathName;
    if (bReplace && newName.IsEmpty())
    {
      newName = m_strTitle;
      int iBad = newName.FindOneOf(_T(" #%;/\\"));    // dubious filename
      if (iBad != -1)
        newName.ReleaseBuffer(iBad);

      // append the default suffix if there is one
      newName += GetExtFromType(m_nDocType);
    }

    int nDocType = m_nDocType;
    if (!theApp.PromptForFileName(newName,
      bReplace ? AFX_IDS_SAVEFILE : AFX_IDS_SAVEFILECOPY,
      OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, FALSE, &nDocType))
    {
      SetDocType(nOrigDocType, TRUE);
      return FALSE;       // don't even try to save
    }
    SetDocType(nDocType, TRUE);
  }

  BeginWaitCursor();
  if (!OnSaveDocument(newName))
  {
    if (pszPathName == NULL)
    {
      // be sure to delete the file
      TRY
      {
        CFile::Remove(newName);
      }
      CATCH_ALL(e)
      {
        TRACE0("Warning: failed to delete file after failed SaveAs\n");
      }
      END_CATCH_ALL
    }
    // restore orginal document type
    SetDocType(nOrigDocType, TRUE);
    EndWaitCursor();
    return FALSE;
  }

  EndWaitCursor();
  if (bReplace)
  {
    int nType = m_nDocType;
    SetDocType(nOrigDocType, TRUE);
    SetDocType(nType);
    // Reset the title and change the document name
    SetPathName(newName, TRUE);
    ASSERT(m_strPathName == newName);       // must be set
  }
  else // SaveCopyAs
  {
    SetDocType(nOrigDocType, TRUE);
    SetModifiedFlag(bModified);
  }
  return TRUE;        // success
}

virtual BOOL CWordPadDoc::DoSave | ( | LPCTSTR | pszPathName,
 |  | BOOL | bReplace = TRUE |
 | ) |  |  | [virtual]
void CWordPadDoc::ForceDelayed ( CFrameWnd * pFrameWnd )
void CWordPadDoc::ForceDelayed ( CFrameWnd * pFrameWnd )

Definition at line 367 of file wordpdoc.cpp.

{
  ASSERT_VALID(this);
  ASSERT_VALID(pFrameWnd);

  POSITION pos = pFrameWnd->m_listControlBars.GetHeadPosition();
  while (pos != NULL)
  {
    // show/hide the next control bar
    CControlBar* pBar =
      (CControlBar*)pFrameWnd->m_listControlBars.GetNext(pos);

    BOOL bVis = pBar->GetStyle() & WS_VISIBLE;
    UINT swpFlags = 0;
    if ((pBar->m_nStateFlags & CControlBar::delayHide) && bVis)
      swpFlags = SWP_HIDEWINDOW;
    else if ((pBar->m_nStateFlags & CControlBar::delayShow) && !bVis)
      swpFlags = SWP_SHOWWINDOW;
    pBar->m_nStateFlags &= ~(CControlBar::delayShow|CControlBar::delayHide);
    if (swpFlags != 0)
    {
      pBar->SetWindowPos(NULL, 0, 0, 0, 0, swpFlags|
        SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
    }
  }
}

CLSID CWordPadDoc::GetClassID ( void )

Definition at line 396 of file wordpdoc.cpp.

{
  return (m_pFactory == NULL) ? CLSID_NULL : m_pFactory->GetClassID();
}

CLSID CWordPadDoc::GetClassID ( )
CFile * CWordPadDoc::GetFile | ( | LPCTSTR | pszPathName,
 |  | UINT | nOpenFlags,
 |  | CFileException * | pException |
 | ) |  |  | [virtual]

Definition at line 427 of file wordpdoc.cpp.

{
  CTrackFile* pFile = NULL;
  CFrameWnd* pWnd = GetView()->GetParentFrame();
#ifdef CONVERTERS
  ScanForConverters();

  // if writing use current doc type otherwise use new doc type
  int nType = (nOpenFlags & CFile::modeReadWrite) ? m_nDocType : m_nNewDocType;
  // m_nNewDocType will be same as m_nDocType except when opening a new file
  if (doctypes[nType].pszConverterName != NULL)
    pFile = new CConverter(doctypes[nType].pszConverterName, pWnd);
  else
#endif
  if (nType == RD_OEMTEXT)
    pFile = new COEMFile(pWnd);
  else
    pFile = new CTrackFile(pWnd);
  if (!pFile->Open(pszPathName, nOpenFlags, pException))
  {
    delete pFile;
    return NULL;
  }
  if (nOpenFlags & (CFile::modeWrite | CFile::modeReadWrite))
    pFile->m_dwLength = 0; // can't estimate this
  else
    pFile->m_dwLength = (DWORD)pFile->GetLength();
  return pFile;
}

virtual CFile* CWordPadDoc::GetFile | ( | LPCTSTR | pszPathName,
 |  | UINT | nOpenFlags,
 |  | CFileException * | pException |
 | ) |  |  | [virtual]
LPCTSTR CWordPadDoc::GetSection ( )
LPCTSTR CWordPadDoc::GetSection ( )
CWordPadView* CWordPadDoc::GetView ( )
CWordPadView * CWordPadDoc::GetView ( )

Definition at line 418 of file wordpdoc.cpp.

{
  POSITION pos = GetFirstViewPosition();
  return (CWordPadView* )GetNextView( pos );
}

int CWordPadDoc::MapType ( int nType )
int CWordPadDoc::MapType ( int nType )

Definition at line 497 of file wordpdoc.cpp.

{
  if (nType == RD_OEMTEXT)
    nType = RD_TEXT;
  else if (!IsInPlaceActive() && nType == RD_EMBEDDED)
    nType = RD_RICHTEXT;
  return nType;
}

void CWordPadDoc::OnCloseDocument ( ) [virtual]

Definition at line 587 of file wordpdoc.cpp.

{
  SaveState(m_nDocType);
  CRichEditDoc::OnCloseDocument();
}

virtual void CWordPadDoc::OnCloseDocument ( ) [virtual]
BOOL CWordPadDoc::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [virtual]

Definition at line 543 of file wordpdoc.cpp.

{
  if (nCode == CN_COMMAND && nID == ID_OLE_VERB_POPUP)
    nID = ID_OLE_VERB_FIRST;
  return CRichEditDoc::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}

virtual BOOL CWordPadDoc::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo |
 | ) |  |  | [virtual]
virtual void CWordPadDoc::OnDeactivateUI ( BOOL bUndoable ) [virtual]
void CWordPadDoc::OnDeactivateUI ( BOOL bUndoable ) [virtual]

Definition at line 351 of file wordpdoc.cpp.

{
  if (GetView()->m_bDelayUpdateItems)
    UpdateAllItems(NULL);
  SaveState(m_nDocType);
  CRichEditDoc::OnDeactivateUI(bUndoable);
  COIPF* pFrame = (COIPF*)m_pInPlaceFrame;
  if (pFrame != NULL)
  {
    if (pFrame->GetMainFrame() != NULL)
      ForceDelayed(pFrame->GetMainFrame());
    if (pFrame->GetDocFrame() != NULL)
      ForceDelayed(pFrame->GetDocFrame());
  }
}

void CWordPadDoc::OnFileSendMail ( ) [protected]

Definition at line 599 of file wordpdoc.cpp.

{
  if (m_strTitle.Find('.') == -1)
  {
    // add the extension because the default extension will be wrong
    CString strOldTitle = m_strTitle;
    m_strTitle += GetExtFromType(m_nDocType);
    CRichEditDoc::OnFileSendMail();
    m_strTitle = strOldTitle;
  }
  else
    CRichEditDoc::OnFileSendMail();
}

afx_msg void CWordPadDoc::OnFileSendMail ( ) [protected]
COleServerItem * CWordPadDoc::OnGetEmbeddedItem ( ) [protected, virtual]

Definition at line 466 of file wordpdoc.cpp.

{
  // OnGetEmbeddedItem is called by the framework to get the COleServerItem
  //  that is associated with the document.  It is only called when necessary.

  CEmbeddedItem* pItem = new CEmbeddedItem(this);
  ASSERT_VALID(pItem);
  return pItem;
}

virtual COleServerItem* CWordPadDoc::OnGetEmbeddedItem ( ) [protected, virtual]
virtual BOOL CWordPadDoc::OnNewDocument ( ) [virtual]
BOOL CWordPadDoc::OnNewDocument ( ) [virtual]

Definition at line 75 of file wordpdoc.cpp.

{
  if (!CRichEditDoc::OnNewDocument())
    return FALSE;

  //correct type already set in theApp.m_nNewDocType;
  int nDocType = (IsEmbedded()) ? RD_EMBEDDED : theApp.m_nNewDocType;

  GetView()->SetDefaultFont(IsTextType(nDocType));
  SetDocType(nDocType);

  return TRUE;
}

virtual BOOL CWordPadDoc::OnOpenDocument ( LPCTSTR lpszPathName ) [virtual]
BOOL CWordPadDoc::OnOpenDocument ( LPCTSTR lpszPathName ) [virtual]

Definition at line 142 of file wordpdoc.cpp.

{
  if (m_lpRootStg != NULL) // we are embedded
  {
    // we really want to use the converter on this storage
    m_nNewDocType = RD_EMBEDDED;
  }
  else
  {
    if (theApp.cmdInfo.m_bForceTextMode)
      m_nNewDocType = RD_TEXT;
    else
    {
      CFileException fe;
      m_nNewDocType = GetDocTypeFromName(lpszPathName, fe);
      if (m_nNewDocType == -1)
      {
        ReportSaveLoadException(lpszPathName, &fe, FALSE,
          AFX_IDP_FAILED_TO_OPEN_DOC);
        return FALSE;
      }
      if (m_nNewDocType == RD_TEXT && theApp.m_bForceOEM)
        m_nNewDocType = RD_OEMTEXT;
    }
    ScanForConverters();
    if (!doctypes[m_nNewDocType].bRead)
    {
      CString str;
      CString strName = doctypes[m_nNewDocType].GetString(DOCTYPE_DOCTYPE);
      AfxFormatString1(str, IDS_CANT_LOAD, strName);
      AfxMessageBox(str, MB_OK|MB_ICONINFORMATION);
      return FALSE;
    }
  }

//  SetDocType(nNewDocType);
  if (!CRichEditDoc::OnOpenDocument(lpszPathName))
    return FALSE;
  return TRUE;
}

afx_msg void CWordPadDoc::OnUpdateIfEmbedded ( CCmdUI * pCmdUI ) [protected]
void CWordPadDoc::OnUpdateIfEmbedded ( CCmdUI * pCmdUI ) [protected]

Definition at line 613 of file wordpdoc.cpp.

{
  pCmdUI->Enable(!IsEmbedded());
}

void CWordPadDoc::OnUpdateObjectVerbMenu ( CCmdUI * pCmdUI ) [protected]

Definition at line 632 of file wordpdoc.cpp.

{
//  if (pCmdUI->m_pMenu == NULL/* || pCmdUI->m_pParentMenu == NULL !!!Commented by Stas */)
  if (pCmdUI->m_pMenu == NULL || pCmdUI->m_pParentMenu == NULL)
  {
    // not a menu or is on sub-menu (don't recurse)
    pCmdUI->ContinueRouting();
    return;
  }

  // check for single selection
  COleClientItem* pItem = GetPrimarySelectedItem(GetRoutingView_());
  GetPrimarySelectedItem (GetRoutingView_());

  if (pItem == NULL || pItem->GetType() == OT_STATIC)
  {
    // no selection, or is 'static' item
    pCmdUI->Enable(FALSE);
  }

  // only include Convert... if there is a handler for ID_OLE_EDIT_CONVERT
  UINT nConvertID = ID_OLE_EDIT_CONVERT;
  AFX_CMDHANDLERINFO info;
  if (!OnCmdMsg(ID_OLE_EDIT_CONVERT, CN_COMMAND, NULL, &info))
    nConvertID = 0;

  // update the menu
  AfxOleSetEditMenu(GetPrimarySelectedItem(GetRoutingView_()),
    pCmdUI->m_pMenu, pCmdUI->m_nIndex,
    ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, nConvertID);
}

afx_msg void CWordPadDoc::OnUpdateOleVerbPopup ( CCmdUI * pCmdUI ) [protected]
void CWordPadDoc::OnUpdateOleVerbPopup ( CCmdUI * pCmdUI ) [protected]

Definition at line 537 of file wordpdoc.cpp.

{
  pCmdUI->m_pParentMenu = pCmdUI->m_pMenu;
  CRichEditDoc::OnUpdateObjectVerbMenu(pCmdUI);
}

void CWordPadDoc::OnViewOptions ( ) [protected]

Definition at line 506 of file wordpdoc.cpp.

{
  int nType = MapType(m_nDocType);
  int nFirstPage = 3;
  if (nType == RD_TEXT)
    nFirstPage = 1;
  else if (nType == RD_RICHTEXT)
    nFirstPage = 2;
  else if (nType == RD_WRITE)
    nFirstPage = 4;
  else if (nType == RD_EMBEDDED)
    nFirstPage = 5;

  SaveState(nType);

  COptionSheet sheet(IDS_OPTIONS, NULL, nFirstPage);

  if (sheet.DoModal() == IDOK)
  {
    CWordPadView* pView = GetView();
    if (theApp.m_bWordSel)
      pView->GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_AUTOWORDSELECTION);
    else
    {
      pView->GetRichEditCtrl().SetOptions(ECOOP_AND,
        ~(DWORD)ECO_AUTOWORDSELECTION);
    }
    RestoreState(nType);
  }
}

afx_msg void CWordPadDoc::OnViewOptions ( ) [protected]
virtual void CWordPadDoc::PreCloseFrame ( CFrameWnd * pFrameArg ) [virtual]
void CWordPadDoc::PreCloseFrame ( CFrameWnd * pFrameArg ) [virtual]

Definition at line 593 of file wordpdoc.cpp.

{
  CRichEditDoc::PreCloseFrame(pFrameArg);
  SaveState(m_nDocType);
}

void CWordPadDoc::ReportSaveLoadException | ( | LPCTSTR | lpszPathName,
 |  | CException * | e,
 |  | BOOL | bSaving,
 |  | UINT | nIDPDefault |
 | ) |  |  | [virtual]

Definition at line 89 of file wordpdoc.cpp.

{
  if (!m_bDeferErrors && e != NULL)
  {
    ASSERT_VALID(e);
    if (e->IsKindOf(RUNTIME_CLASS(CFileException)))
    {
      switch (((CFileException*)e)->m_cause)
      {
      case CFileException::fileNotFound:
      case CFileException::badPath:
        nIDP = AFX_IDP_FAILED_INVALID_PATH;
        break;
      case CFileException::diskFull:
        nIDP = AFX_IDP_FAILED_DISK_FULL;
        break;
      case CFileException::accessDenied:
        nIDP = bSaving ? AFX_IDP_FAILED_ACCESS_WRITE :
            AFX_IDP_FAILED_ACCESS_READ;
        if (((CFileException*)e)->m_lOsError == ERROR_WRITE_PROTECT)
          nIDP = IDS_WRITEPROTECT;
        break;
      case CFileException::tooManyOpenFiles:
        nIDP = IDS_TOOMANYFILES;
        break;
      case CFileException::directoryFull:
        nIDP = IDS_DIRFULL;
        break;
      case CFileException::sharingViolation:
        nIDP = IDS_SHAREVIOLATION;
        break;
      case CFileException::lockViolation:
      case CFileException::badSeek:
      case CFileException::genericException:
      case CFileException::invalidFile:
      case CFileException::hardIO:
        nIDP = bSaving ? AFX_IDP_FAILED_IO_ERROR_WRITE :
            AFX_IDP_FAILED_IO_ERROR_READ;
        break;
      default:
        break;
      }
      CString prompt;
      AfxFormatString1(prompt, nIDP, lpszPathName);
      AfxMessageBox(prompt, MB_ICONEXCLAMATION, nIDP);
      return;
    }
  }
  CRichEditDoc::ReportSaveLoadException(lpszPathName, e, bSaving, nIDP);
  return;
}

virtual void CWordPadDoc::ReportSaveLoadException | ( | LPCTSTR | lpszPathName,
 |  | CException * | e,
 |  | BOOL | bSaving,
 |  | UINT | nIDPDefault |
 | ) |  |  | [virtual]
void CWordPadDoc::RestoreState ( int nType )

Definition at line 566 of file wordpdoc.cpp.

{
  if (nType == -1)
    return;
  nType = MapType(nType);
  CWordPadView* pView = GetView();
  if (pView != NULL)
  {
    CFrameWnd* pFrame = pView->GetParentFrame();
    ENSURE(pFrame != NULL);
    // set new state
    pFrame->SendMessage(WPM_BARSTATE, 1, nType);
    int nWrapNew = theApp.GetDocOptions(nType).m_nWordWrap;
    if (pView->m_nWordWrap != nWrapNew)
    {
      pView->m_nWordWrap = nWrapNew;
      pView->WrapChanged();
    }
  }
}

void CWordPadDoc::RestoreState ( int nType )
void CWordPadDoc::SaveState ( int nType )
void CWordPadDoc::SaveState ( int nType )

Definition at line 550 of file wordpdoc.cpp.

{
  if (nType == -1)
    return;
  nType = MapType(nType);
  CWordPadView* pView = GetView();
  if (pView != NULL)
  {
    CFrameWnd* pFrame = pView->GetParentFrame();
    ENSURE(pFrame != NULL);
    // save current state
    pFrame->SendMessage(WPM_BARSTATE, 0, nType);
    theApp.GetDocOptions(nType).m_nWordWrap = pView->m_nWordWrap;
  }
}

void CWordPadDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 183 of file wordpdoc.cpp.

{
  COleMessageFilter* pFilter = AfxOleGetMessageFilter();
  ENSURE(pFilter != NULL);
  pFilter->EnableBusyDialog(FALSE);
  if (ar.IsLoading())
    SetDocType(m_nNewDocType);
  CRichEditDoc::Serialize(ar);
  pFilter->EnableBusyDialog(TRUE);
}

virtual void CWordPadDoc::Serialize ( CArchive & ar ) [virtual]
void CWordPadDoc::SetDocType | ( | int | nDocType,
 |  | BOOL | bNoOptionChange = FALSE
 | ) |  |

Definition at line 401 of file wordpdoc.cpp.

{
  ASSERT(nNewDocType != -1);
  if (nNewDocType == m_nDocType)
    return;

  m_bRTF = !IsTextType(nNewDocType);
  if (bNoOptionChange)
    m_nDocType = nNewDocType;
  else
  {
    SaveState(m_nDocType);
    m_nDocType = nNewDocType;
    RestoreState(m_nDocType);
  }
}

void CWordPadDoc::SetDocType | ( | int | nDocType,
 |  | BOOL | bNoOptionChange = FALSE
 | ) |  |
void CWordPadDoc::SetPathName | ( | LPCTSTR | lpszPathName,
 |  | BOOL | bAddToMRU = TRUE |
 | ) |  |  | [virtual]

Definition at line 664 of file wordpdoc.cpp.

{
  CRichEditDoc::SetPathName(lpszPathName, bAddToMRU);

  ((CMainFrame*) AfxGetMainWnd ())->UpdateMRUFilesList ();
}

Member Data Documentation

int CWordPadDoc::m_nDocType

Definition at line 27 of file wordpdoc.h.

int CWordPadDoc::m_nNewDocType

Definition at line 28 of file wordpdoc.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/wordpdoc.h
  • vc2008fp/WordPad/wordpdoc.h
  • ole/wordpad/wordpdoc.cpp
  • vc2008fp/WordPad/wordpdoc.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWordPadResizeBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CWordPadResizeBar Class Reference

#include "ipframe.h"

List of all members.

Public Member Functions

void | SetMinSize (CSize size)
void | SetMinSize (CSize size)

Detailed Description

Definition at line 12 of file ipframe.h.

Member Function Documentation

void CWordPadResizeBar::SetMinSize ( CSize size ) [inline]

Definition at line 15 of file ipframe.h.

{m_tracker.m_sizeMin = size;}

void CWordPadResizeBar::SetMinSize ( CSize size ) [inline]

Definition at line 17 of file ipframe.h.

{m_tracker.m_sizeMin = size;}

The documentation for this class was generated from the following files:
  • ole/wordpad/ipframe.h
  • vc2008fp/WordPad/ipframe.h
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWordPadView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CWordPadView Class Reference

#include "wordpvw.h"

List of all members.

Public Member Functions

void | DrawMargins (CDC *pDC)
void | DrawMargins (CDC *pDC)
virtual HMENU | GetContextMenu (WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE *lpchrg)
virtual HMENU | GetContextMenu (WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE *lpchrg)
void | GetDefaultFont (CCharFormat &cf, UINT nFontNameID)
void | GetDefaultFont (CCharFormat &cf, UINT nFontNameID)
CWordPadDoc * GetDocument ()
CWordPadDoc * GetDocument ()
void | GetDocumentColors (CList< COLORREF, COLORREF > &lstColors)
BOOL | IsFormatText ()
BOOL | IsFormatText ()
BOOL | PasteNative (LPDATAOBJECT lpdataobj)
BOOL | PasteNative (LPDATAOBJECT lpdataobj)
BOOL | SelectPalette ()
BOOL | SelectPalette ()
void | SetDefaultFont (BOOL bText)
void | SetDefaultFont (BOOL bText)
void | SetTextColor (COLORREF color)
void | SetUpdateTimer ()
void | SetUpdateTimer ()
BOOL | ShowContextMenu (CPoint pt)
virtual void | WrapChanged ()
virtual void | WrapChanged ()

Public Attributes

BOOL | m_bDelayUpdateItems
BOOL | m_bInPrint
CCharFormat m_defCharFormat
CParaFormat m_defParaFormat
CCharFormat m_defTextCharFormat
UINT_PTR | m_uTimerID

Protected Member Functions

CWordPadView ()
CWordPadView ()
virtual void | CalcWindowRect (LPRECT lpClientRect, UINT nAdjustType=adjustBorder)
virtual void | CalcWindowRect (LPRECT lpClientRect, UINT nAdjustType=adjustBorder)
virtual void | DeleteContents ()
virtual void | DeleteContents ()
virtual HRESULT | GetClipboardData (CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT lpRichDataObj, LPDATAOBJECT *lplpdataobj)
virtual HRESULT | GetClipboardData (CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT lpRichDataObj, LPDATAOBJECT *lplpdataobj)
afx_msg void | OnBarKillFocus (NMHDR *, LRESULT *)
afx_msg void | OnBarKillFocus (UINT, NMHDR *, LRESULT *)
afx_msg void | OnBarReturn (NMHDR *, LRESULT *)
afx_msg void | OnBarReturn (UINT, NMHDR *, LRESULT *)
afx_msg void | OnBarSetFocus (UINT, NMHDR *, LRESULT *)
afx_msg void | OnBarSetFocus (NMHDR *, LRESULT *)
afx_msg void | OnBorderType (UINT id)
afx_msg void | OnCancelEditSrvr ()
afx_msg void | OnCancelEditSrvr ()
afx_msg void | OnCharColor ()
afx_msg void | OnColorPick (UINT nID)
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnDestroy ()
afx_msg void | OnDestroy ()
afx_msg void | OnEditChange ()
afx_msg void | OnEditChange ()
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrint ()
afx_msg void | OnFilePrintPreview ()
afx_msg void | OnFontname ()
afx_msg void | OnFontsize ()
afx_msg void | OnFormatParagraph ()
afx_msg void | OnFormatParagraph ()
afx_msg void | OnFormatTabs ()
afx_msg void | OnFormatTabs ()
afx_msg void | OnGetCharFormat (NMHDR *pNMHDR, LRESULT *pRes)
afx_msg void | OnInsertDateTime ()
afx_msg void | OnInsertDateTime ()
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg int | OnMouseActivate (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg int | OnMouseActivate (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnPageSetup ()
afx_msg void | OnPageSetup ()
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnPenBackspace ()
afx_msg void | OnPenNewline ()
afx_msg void | OnPenPeriod ()
afx_msg void | OnPenSpace ()
afx_msg void | OnPenTab ()
BOOL | OnPreparePrinting (CPrintInfo *pInfo)
BOOL | OnPreparePrinting (CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
afx_msg LONG_PTR | OnPrinterChangedMsg (UINT_PTR, LONG_PTR)
afx_msg LONG | OnPrinterChangedMsg (UINT, LONG)
afx_msg BOOL | OnQueryNewPalette ()
afx_msg BOOL | OnQueryNewPalette ()
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnSetCharFormat (NMHDR *pNMHDR, LRESULT *pRes)
afx_msg void | OnSettingChange (UINT uFlags, LPCTSTR lpszSection)
afx_msg void | OnSettingChange (UINT uFlags, LPCTSTR lpszSection)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
virtual void | OnTextNotFound (LPCTSTR)
virtual void | OnTextNotFound (LPCTSTR)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnUpdateBorderType (CCmdUI *pCmdUI)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual HRESULT | QueryAcceptData (LPDATAOBJECT, CLIPFORMAT *, DWORD, BOOL, HGLOBAL)
virtual HRESULT | QueryAcceptData (LPDATAOBJECT, CLIPFORMAT *, DWORD, BOOL, HGLOBAL)

Protected Attributes

BOOL | m_bOnBar
UINT m_nBorderType

Detailed Description

Definition at line 13 of file wordpvw.h.

Constructor & Destructor Documentation

CWordPadView::CWordPadView ( ) [protected]

Definition at line 145 of file wordpvw.cpp.

{
  m_bSyncCharFormat = m_bSyncParaFormat = TRUE;
  m_uTimerID = 0;
  m_bDelayUpdateItems = FALSE;
  m_bOnBar = FALSE;
  m_bInPrint = FALSE;
  m_nPasteType = 0;
  m_rectMargin = theApp.m_rectPageMargin;
}

CWordPadView::CWordPadView ( ) [protected]

Member Function Documentation

void CWordPadView::CalcWindowRect | ( | LPRECT | lpClientRect,
 |  | UINT | nAdjustType = adjustBorder |
 | ) |  |  | [protected, virtual]

Definition at line 542 of file wordpvw.cpp.

{
  CRichEditView::CalcWindowRect(lpClientRect, nAdjustType);

  if (theApp.m_bWin4 && nAdjustType != 0 && (GetStyle() & WS_VSCROLL))
    lpClientRect->right--;

  // if the ruler is visible then slide the view up under the ruler to avoid
  // showing the top border of the view
  if (GetExStyle() & WS_EX_CLIENTEDGE)
  {
    CFrameWnd* pFrame = GetParentFrame();
    if (pFrame != NULL)
    {
      CRulerBar* pBar = (CRulerBar*)pFrame->GetControlBar(ID_VIEW_RULER);
      if (pBar != NULL)
      {
        BOOL bVis = pBar->IsVisible();
        if (pBar->m_bDeferInProgress)
          bVis = !bVis;
        if (bVis)
          lpClientRect->top -= 2;
      }
    }
  }
}

virtual void CWordPadView::CalcWindowRect | ( | LPRECT | lpClientRect,
 |  | UINT | nAdjustType = adjustBorder |
 | ) |  |  | [protected, virtual]
void CWordPadView::DeleteContents ( ) [protected, virtual]

Definition at line 249 of file wordpvw.cpp.

{
  ASSERT_VALID(this);
  ASSERT(m_hWnd != NULL);
  CRichEditView::DeleteContents();
  SetDefaultFont(IsTextType(GetDocument()->m_nNewDocType));
}

virtual void CWordPadView::DeleteContents ( ) [protected, virtual]
void CWordPadView::DrawMargins ( CDC * pDC )

Definition at line 289 of file wordpvw.cpp.

{
  if (pDC->m_hAttribDC != NULL)
  {
    CRect rect;
    rect.left = m_rectMargin.left;
    rect.right = m_sizePaper.cx - m_rectMargin.right;
    rect.top = m_rectMargin.top;
    rect.bottom = m_sizePaper.cy - m_rectMargin.bottom;
    //rect in twips
    int logx = ::GetDeviceCaps(pDC->m_hDC, LOGPIXELSX);
    int logy = ::GetDeviceCaps(pDC->m_hDC, LOGPIXELSY);
    rect.left = MulDiv(rect.left, logx, 1440);
    rect.right = MulDiv(rect.right, logx, 1440);
    rect.top = MulDiv(rect.top, logy, 1440);
    rect.bottom = MulDiv(rect.bottom, logy, 1440);
    CPen pen(PS_DOT, 0, pDC->GetTextColor());
    CPen* ppen = pDC->SelectObject(&pen);
    pDC->MoveTo(0, rect.top);
    pDC->LineTo(10000, rect.top);
    pDC->MoveTo(rect.left, 0);
    pDC->LineTo(rect.left, 10000);
    pDC->MoveTo(0, rect.bottom);
    pDC->LineTo(10000, rect.bottom);
    pDC->MoveTo(rect.right, 0);
    pDC->LineTo(rect.right, 10000);
    pDC->SelectObject(ppen);
  }
}

void CWordPadView::DrawMargins ( CDC * pDC )
HRESULT CWordPadView::GetClipboardData | ( | CHARRANGE * | lpchrg,
 |  | DWORD | reco,
 |  | LPDATAOBJECT | lpRichDataObj,
 |  | LPDATAOBJECT * | lplpdataobj |
 | ) |  |  | [protected, virtual]

Definition at line 588 of file wordpvw.cpp.

{
  CHARRANGE& cr = *lpchrg;

  if ((cr.cpMax - cr.cpMin == 1) &&
    GetRichEditCtrl().GetSelectionType() == SEL_OBJECT)
  {
    return E_NOTIMPL;
  }

  BeginWaitCursor();
  //create the data source
  COleDataSource* pDataSource = new COleDataSource;

  // put the formats into the data source
  LPENUMFORMATETC lpEnumFormatEtc;
  lpRichDataObj->EnumFormatEtc(DATADIR_SET, &lpEnumFormatEtc);
  if (lpEnumFormatEtc != NULL)
  {
    FORMATETC etc;
    while (lpEnumFormatEtc->Next(1, &etc, NULL) == S_OK)
    {
      STGMEDIUM stgMedium;
      lpRichDataObj->GetData(&etc, &stgMedium);
      pDataSource->CacheData(etc.cfFormat, &stgMedium, &etc);
    }
    lpEnumFormatEtc->Release();
  }

  CEmbeddedItem item(GetDocument(), cr.cpMin, cr.cpMax);
  item.m_lpRichDataObj = lpRichDataObj;
  // get wordpad formats
  item.GetClipboardData(pDataSource);

  // get the IDataObject from the data source
  *lplpdataobj =  (LPDATAOBJECT)pDataSource->GetInterface(&IID_IDataObject);

  EndWaitCursor();
  return S_OK;
}

virtual HRESULT CWordPadView::GetClipboardData | ( | CHARRANGE * | lpchrg,
 |  | DWORD | reco,
 |  | LPDATAOBJECT | lpRichDataObj,
 |  | LPDATAOBJECT * | lplpdataobj |
 | ) |  |  | [protected, virtual]
HMENU CWordPadView::GetContextMenu | ( | WORD | seltype,
 |  | LPOLEOBJECT | lpoleobj,
 |  | CHARRANGE * | lpchrg |
 | ) |  |  | [virtual]

Definition at line 193 of file wordpvw.cpp.

{
  CRichEditCntrItem* pItem = GetSelectedItem();
  if (pItem == NULL || !pItem->IsInPlaceActive())
  {
    CMenu menuText;
    menuText.LoadMenu(IDR_TEXT_POPUP);
    CMenu* pMenuPopup = menuText.GetSubMenu(0);
    menuText.RemoveMenu(0, MF_BYPOSITION);
    if (!GetSystemMetrics(SM_PENWINDOWS))
    {
      //delete pen specific stuff
      // remove Insert Keystrokes
      pMenuPopup->DeleteMenu(ID_PEN_LENS, MF_BYCOMMAND);
      int nIndex = pMenuPopup->GetMenuItemCount()-1; //index of last item
      // remove Edit Text...
      pMenuPopup->DeleteMenu(nIndex, MF_BYPOSITION);
      // remove separator
      pMenuPopup->DeleteMenu(nIndex-1, MF_BYPOSITION);
    }
    return pMenuPopup->Detach();
  }
  return NULL;
}

virtual HMENU CWordPadView::GetContextMenu | ( | WORD | seltype,
 |  | LPOLEOBJECT | lpoleobj,
 |  | CHARRANGE * | lpchrg |
 | ) |  |  | [virtual]
void CWordPadView::GetDefaultFont | ( | CCharFormat & | cf,
 |  | UINT | nFontNameID
 | ) |  |
void CWordPadView::GetDefaultFont | ( | CCharFormat & | cf,
 |  | UINT | nFontNameID
 | ) |  |

Definition at line 456 of file wordpvw.cpp.

{
  USES_CONVERSION;
  CString strDefFont;
  VERIFY(strDefFont.LoadString(nFontNameID));
  ASSERT(cf.cbSize == sizeof(CHARFORMAT2));
  cf.dwMask = CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT|CFM_SIZE|
    CFM_COLOR|CFM_OFFSET|CFM_PROTECTED;
  cf.dwEffects = CFE_AUTOCOLOR;
  cf.yHeight = 200; //10pt
  cf.yOffset = 0;
  cf.crTextColor = RGB(0, 0, 0);
  cf.bCharSet = 0;
  cf.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
  ASSERT(strDefFont.GetLength() < LF_FACESIZE);
  _tcsncpy_s(cf.szFaceName, LF_FACESIZE, strDefFont, _TRUNCATE);
  cf.dwMask |= CFM_FACE;
}

CWordPadDoc* CWordPadView::GetDocument ( )
CWordPadDoc * CWordPadView::GetDocument ( ) [inline]

Definition at line 106 of file wordpvw.h.

   { return (CWordPadDoc*)m_pDocument; }

void CWordPadView::GetDocumentColors ( CList< COLORREF, COLORREF > & lstColors )

Definition at line 935 of file wordpvw.cpp.

{
  CRichEditCtrl& wndRichEdit = GetRichEditCtrl();

  // Save current selection:
  CHARRANGE cr;
  wndRichEdit.GetSel(cr);

  wndRichEdit.HideSelection (TRUE, FALSE);

  int nTextLen = min (500, wndRichEdit.GetTextLength ());
    // For demonstration purposes only!

  for (long iSel = 0; iSel < nTextLen; iSel += 2)
  {
    wndRichEdit.SetSel (iSel, iSel);
    if (!(wndRichEdit.GetSelectionType() & (SEL_OBJECT|SEL_MULTIOBJECT)))
    {
      CCharFormat cf;
      wndRichEdit.GetSelectionCharFormat (cf);

      COLORREF color = cf.crTextColor;
      if (lstColors.Find (color) == NULL)
      {
        lstColors.AddTail (color);

        if (lstColors.GetCount () == 10)
        {
          break;
        }
      }
    }
  }

  // Restore selection:
  wndRichEdit.SetSel (cr);
  wndRichEdit.HideSelection (FALSE, FALSE);
}

BOOL CWordPadView::IsFormatText ( )

Definition at line 166 of file wordpvw.cpp.

{
  // this function checks to see if any formatting is not default text
  BOOL bRes = FALSE;
  CHARRANGE cr;
  CCharFormat cf;
  CParaFormat pf;
  GetRichEditCtrl().GetSel(cr);
  GetRichEditCtrl().HideSelection(TRUE, FALSE);
  GetRichEditCtrl().SetSel(0,-1);

  if (!(GetRichEditCtrl().GetSelectionType() & (SEL_OBJECT|SEL_MULTIOBJECT)))
  {
    GetRichEditCtrl().GetSelectionCharFormat(cf);
    if (cf == m_defTextCharFormat)
    {
      GetRichEditCtrl().GetParaFormat(pf);
      if (pf == m_defParaFormat) //compared using CParaFormat::operator==
        bRes = TRUE;
    }
  }

  GetRichEditCtrl().SetSel(cr);
  GetRichEditCtrl().HideSelection(FALSE, FALSE);
  return bRes;
}

BOOL CWordPadView::IsFormatText ( )
void CWordPadView::OnBarKillFocus | ( | NMHDR * | ,
 |  | LRESULT * |  |
 | ) |  |  | [protected]

Definition at line 824 of file wordpvw.cpp.

{
  m_bOnBar = FALSE;
}

void CWordPadView::OnBarKillFocus | ( | UINT | ,
 |  | NMHDR * | ,
 |  | LRESULT * |  |
 | ) |  |  | [protected]

Definition at line 858 of file wordpvw.cpp.

{
  m_bOnBar = FALSE;
}

void CWordPadView::OnBarReturn | ( | NMHDR * | ,
 |  | LRESULT * |  |
 | ) |  |  | [protected]

Definition at line 829 of file wordpvw.cpp.

{
  SetFocus();
}

void CWordPadView::OnBarReturn | ( | UINT | ,
 |  | NMHDR * | ,
 |  | LRESULT * |  |
 | ) |  |  | [protected]

Definition at line 863 of file wordpvw.cpp.

{
  SetFocus();
}

void CWordPadView::OnBarSetFocus | ( | NMHDR * | ,
 |  | LRESULT * |  |
 | ) |  |  | [protected]

Definition at line 819 of file wordpvw.cpp.

{
  m_bOnBar = TRUE;
}

void CWordPadView::OnBarSetFocus | ( | UINT | ,
 |  | NMHDR * | ,
 |  | LRESULT * |  |
 | ) |  |  | [protected]

Definition at line 853 of file wordpvw.cpp.

{
  m_bOnBar = TRUE;
}

void CWordPadView::OnBorderType ( UINT id ) [protected]

Definition at line 1042 of file wordpvw.cpp.

{
  m_nBorderType = id;

  MessageBox (_T("Add your code here..."));
}

afx_msg void CWordPadView::OnCancelEditSrvr ( ) [protected]
void CWordPadView::OnCancelEditSrvr ( ) [protected]

Definition at line 404 of file wordpvw.cpp.

{
  GetDocument()->OnDeactivateUI(FALSE);
}

void CWordPadView::OnCharColor ( ) [protected]

Definition at line 918 of file wordpvw.cpp.

{
  COLORREF color = CMFCColorMenuButton::GetColorByCmdID (ID_CHAR_COLOR);
  CRichEditView::OnColorPick (color == -1 ? ::GetSysColor (COLOR_WINDOWTEXT) : color);
}

void CWordPadView::OnColorPick ( UINT nID ) [protected]

Definition at line 505 of file wordpvw.cpp.

{
  CRichEditView::OnColorPick(CColorMenu::GetColor(nID));
}

void CWordPadView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 868 of file wordpvw.cpp.

{
  if (!ShowContextMenu (point))
  {
    Default ();
  }
}

afx_msg int CWordPadView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int CWordPadView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 435 of file wordpvw.cpp.

{
  if (CRichEditView::OnCreate(lpCreateStruct) == -1)
    return -1;
  theApp.m_listPrinterNotify.AddTail(m_hWnd);

  if (theApp.m_bWordSel)
    GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_AUTOWORDSELECTION);
  else
    GetRichEditCtrl().SetOptions(ECOOP_AND, ~(DWORD)ECO_AUTOWORDSELECTION);
//  GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_SELECTIONBAR);

  GetDefaultFont(m_defTextCharFormat, IDS_DEFAULTTEXTFONT);
  GetDefaultFont(m_defCharFormat, IDS_DEFAULTFONT);

  GetRichEditCtrl().GetParaFormat(m_defParaFormat);
  m_defParaFormat.cTabCount = 0;

  return 0;
}

afx_msg void CWordPadView::OnDestroy ( ) [protected]
void CWordPadView::OnDestroy ( void ) [protected]

Definition at line 529 of file wordpvw.cpp.

{
  POSITION pos = theApp.m_listPrinterNotify.Find(m_hWnd);
  ASSERT(pos != NULL);
  theApp.m_listPrinterNotify.RemoveAt(pos);

  CRichEditView::OnDestroy();

  if (m_uTimerID != 0) // if outstanding timer kill it
    OnTimer((UINT)m_uTimerID);
  ASSERT(m_uTimerID == 0);
}

void CWordPadView::OnEditChange ( ) [protected]

Definition at line 524 of file wordpvw.cpp.

{
  SetUpdateTimer();
}

afx_msg void CWordPadView::OnEditChange ( ) [protected]
afx_msg void CWordPadView::OnFilePrint ( ) [protected]
void CWordPadView::OnFilePrint ( ) [protected]

Definition at line 710 of file wordpvw.cpp.

{
  // don't allow winini changes to occur while printing
  m_bInPrint = TRUE;
  CRichEditView::OnFilePrint();
  // printer may have changed
  theApp.NotifyPrinterChanged(); // this will cause a GetDocument()->PrinterChanged();
  m_bInPrint = FALSE;
}

void CWordPadView::OnFilePrintPreview ( ) [protected]

Definition at line 924 of file wordpvw.cpp.

{
  CRichEditCntrItem* pItem = GetSelectedItem();
  if (pItem != NULL && pItem->IsInPlaceActive())
  {
    pItem->Deactivate ();
  }

  AFXPrintPreview (this);
}

void CWordPadView::OnFontname ( ) [protected]

Definition at line 974 of file wordpvw.cpp.

{
  USES_CONVERSION;

  CMFCToolBarFontComboBox* pSrcCombo =
    (CMFCToolBarFontComboBox*) CMFCToolBarComboBoxButton::GetByCmd (IDC_FONTNAME, TRUE);
  if (pSrcCombo == NULL)
  {
    CRichEditView::OnFormatFont ();
    return;
  }

  CCharFormat cf;
  cf.szFaceName[0] = NULL;
  cf.dwMask = CFM_FACE | CFM_CHARSET;

  const CMFCFontInfo* pDesc = pSrcCombo->GetFontDesc ();
  ASSERT_VALID (pDesc);
  ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);

  lstrcpyn(cf.szFaceName, pDesc->m_strName, LF_FACESIZE);

  cf.bCharSet = pDesc->m_nCharSet;
  cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;

  CMFCToolBarFontSizeComboBox* pSizeCombo =
    DYNAMIC_DOWNCAST (CMFCToolBarFontSizeComboBox, CMFCToolBarFontSizeComboBox::GetByCmd (IDC_FONTSIZE));
  if (pSizeCombo != NULL)
  {
    int nSize = pSizeCombo->GetTwipSize();
    pSizeCombo->RebuildFontSizes (pDesc->m_strName);
    pSizeCombo->SetTwipSize (nSize);
  }

  SetCharFormat (cf);
  SetFocus ();
}

void CWordPadView::OnFontsize ( ) [protected]

Definition at line 1012 of file wordpvw.cpp.

{
  CMFCToolBarFontSizeComboBox* pSrcCombo =
    (CMFCToolBarFontSizeComboBox*) CMFCToolBarComboBoxButton::GetByCmd (IDC_FONTSIZE, TRUE);
  if (pSrcCombo == NULL)
  {
    CRichEditView::OnFormatFont ();
    return;
  }

  int nSize = pSrcCombo->GetTwipSize();
  if (nSize == -2)
  {
    AfxMessageBox(IDS_INVALID_NUMBER, MB_OK|MB_ICONINFORMATION);
  }
  else if ((nSize >= 0 && nSize < 20) || nSize > 32760)
  {
    AfxMessageBox(IDS_INVALID_FONTSIZE, MB_OK|MB_ICONINFORMATION);
  }
  else if (nSize > 0)
  {
    CCharFormat cf;
    cf.dwMask = CFM_SIZE;
    cf.yHeight = nSize;

    SetCharFormat (cf);
    SetFocus ();
  }
}

afx_msg void CWordPadView::OnFormatParagraph ( ) [protected]
void CWordPadView::OnFormatParagraph ( ) [protected]

Definition at line 482 of file wordpvw.cpp.

{
  CFormatParaDlg dlg(GetParaFormatSelection());
  dlg.m_nWordWrap = m_nWordWrap;
  if (dlg.DoModal() == IDOK)
    SetParaFormat(dlg.m_pf);
}

afx_msg void CWordPadView::OnFormatTabs ( ) [protected]
void CWordPadView::OnFormatTabs ( ) [protected]

Definition at line 490 of file wordpvw.cpp.

{
  CFormatTabDlg dlg(GetParaFormatSelection());
  if (dlg.DoModal() == IDOK)
    SetParaFormat(dlg.m_pf);
}

void CWordPadView::OnGetCharFormat | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pRes |
 | ) |  |  | [protected]

Definition at line 803 of file wordpvw.cpp.

{
  ENSURE(pNMHDR != NULL);
  ENSURE(pRes != NULL);
  ((CHARHDR*)pNMHDR)->cf = GetCharFormatSelection();
  *pRes = 1;
}

afx_msg void CWordPadView::OnInsertDateTime ( ) [protected]
void CWordPadView::OnInsertDateTime ( ) [protected]

Definition at line 475 of file wordpvw.cpp.

{
  CDateDialog dlg;
  if (dlg.DoModal() == IDOK)
    GetRichEditCtrl().ReplaceSel(dlg.m_strSel);;
}

afx_msg void CWordPadView::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]
void CWordPadView::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags |
 | ) |  |  | [protected]

Definition at line 575 of file wordpvw.cpp.

{
  if (nChar == VK_F10 && GetKeyState(VK_SHIFT) < 0)
  {
    long nStart, nEnd;
    GetRichEditCtrl().GetSel(nStart, nEnd);
    CPoint pt = GetRichEditCtrl().GetCharPos(nEnd);
    SendMessage(WM_CONTEXTMENU, (WPARAM)m_hWnd, MAKELPARAM(pt.x, pt.y));
  }

  CRichEditView::OnKeyDown(nChar, nRepCnt, nFlags);
}

afx_msg void CWordPadView::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct |
 | ) |  |  | [protected]
void CWordPadView::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct |
 | ) |  |  | [protected]

Definition at line 569 of file wordpvw.cpp.

{
  lpMIS->itemID = (UINT)(WORD)lpMIS->itemID;
  CRichEditView::OnMeasureItem(nIDCtl, lpMIS);
}

int CWordPadView::OnMouseActivate | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]

Definition at line 720 of file wordpvw.cpp.

{
  if (m_bOnBar)
  {
    SetFocus();
    return MA_ACTIVATEANDEAT;
  }
  else
    return CRichEditView::OnMouseActivate(pWnd, nHitTest, message);
}

afx_msg int CWordPadView::OnMouseActivate | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message |
 | ) |  |  | [protected]
afx_msg void CWordPadView::OnPageSetup ( ) [protected]
void CWordPadView::OnPageSetup ( ) [protected]

Definition at line 354 of file wordpvw.cpp.

{
  CPageSetupDialog dlg;
  PAGESETUPDLG& psd = dlg.m_psd;
  BOOL bMetric = theApp.GetUnits() == 1; //centimeters
  psd.Flags |= PSD_MARGINS | (bMetric ? PSD_INHUNDREDTHSOFMILLIMETERS :
    PSD_INTHOUSANDTHSOFINCHES);
  int nUnitsPerInch = bMetric ? 2540 : 1000;
  MulDivRect(&psd.rtMargin, m_rectMargin, nUnitsPerInch, 1440);
  RoundRect(&psd.rtMargin);
  // get the current device from the app
  PRINTDLG pd;
  pd.hDevNames = NULL;
  pd.hDevMode = NULL;
  theApp.GetPrinterDeviceDefaults(&pd);
  psd.hDevNames = pd.hDevNames;
  psd.hDevMode = pd.hDevMode;
  if (dlg.DoModal() == IDOK)
  {
    RoundRect(&psd.rtMargin);
    MulDivRect(m_rectMargin, &psd.rtMargin, 1440, nUnitsPerInch);
    theApp.m_rectPageMargin = m_rectMargin;
    theApp.SelectPrinter(psd.hDevNames, psd.hDevMode);
    theApp.NotifyPrinterChanged();
  }
  // PageSetupDlg failed
  if (CommDlgExtendedError() != 0)
  {
    CPageSetupDlg pageDlg;
    pageDlg.m_nBottomMargin = m_rectMargin.bottom;
    pageDlg.m_nLeftMargin = m_rectMargin.left;
    pageDlg.m_nRightMargin = m_rectMargin.right;
    pageDlg.m_nTopMargin = m_rectMargin.top;
    if (pageDlg.DoModal() == IDOK)
    {
      m_rectMargin.SetRect(pageDlg.m_nLeftMargin, pageDlg.m_nTopMargin,
        pageDlg.m_nRightMargin, pageDlg.m_nBottomMargin);
      // m_page will be changed at this point
      theApp.m_rectPageMargin = m_rectMargin;
      theApp.NotifyPrinterChanged();
    }
  }
}

afx_msg void CWordPadView::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]
void CWordPadView::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]

Definition at line 753 of file wordpvw.cpp.

{
  ForwardPaletteChanged(m_hWnd, pFocusWnd->GetSafeHwnd());
  // allow the richedit control to realize its palette
  // remove this if if richedit fixes their code so that
  // they don't realize their palette into foreground
  if (::GetWindow(m_hWnd, GW_CHILD) == NULL)
    CRichEditView::OnPaletteChanged(pFocusWnd);
}

void CWordPadView::OnPenBackspace ( ) [protected]

Definition at line 569 of file wordpvw.cpp.

{
  SendMessage(WM_KEYDOWN, VK_BACK, 0);
  SendMessage(WM_KEYUP, VK_BACK, 0);
}

void CWordPadView::OnPenNewline ( ) [protected]

Definition at line 575 of file wordpvw.cpp.

{
  SendMessage(WM_CHAR, '\n', 0);
}

void CWordPadView::OnPenPeriod ( ) [protected]

Definition at line 580 of file wordpvw.cpp.

{
  SendMessage(WM_CHAR, '.', 0);
}

void CWordPadView::OnPenSpace ( ) [protected]

Definition at line 585 of file wordpvw.cpp.

{
  SendMessage(WM_CHAR, ' ', 0);
}

void CWordPadView::OnPenTab ( ) [protected]

Definition at line 590 of file wordpvw.cpp.

{
  SendMessage(WM_CHAR, VK_TAB, 0);
}

BOOL CWordPadView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected]

Definition at line 319 of file wordpvw.cpp.

{
  return DoPreparePrinting(pInfo);
}

BOOL CWordPadView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected]
void CWordPadView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 282 of file wordpvw.cpp.

{
  CRichEditView::OnPrint(pDC, pInfo);
  if (pInfo != NULL && pInfo->m_bPreview)
    DrawMargins(pDC);
}

virtual void CWordPadView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]
LONG_PTR CWordPadView::OnPrinterChangedMsg | ( | UINT_PTR | ,
 |  | LONG_PTR |  |
 | ) |  |  | [protected]

Definition at line 731 of file wordpvw.cpp.

{
  CDC dc;
  AfxGetApp()->CreatePrinterDC(dc);
  OnPrinterChanged(dc);
  return 0;
}

LONG CWordPadView::OnPrinterChangedMsg | ( | UINT | ,
 |  | LONG |  |
 | ) |  |  | [protected]

Definition at line 782 of file wordpvw.cpp.

{
  CDC dc;
  AfxGetApp()->CreatePrinterDC(dc);
  OnPrinterChanged(dc);
  return 0;
}

afx_msg BOOL CWordPadView::OnQueryNewPalette ( ) [protected]
BOOL CWordPadView::OnQueryNewPalette ( ) [protected]

Definition at line 777 of file wordpvw.cpp.

{
  if(FindQueryPalette(m_hWnd))
    return TRUE;
  return CRichEditView::OnQueryNewPalette();
}

void CWordPadView::OnRButtonUp | ( | UINT | nFlags,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 876 of file wordpvw.cpp.

{
  long nStartChar, nEndChar;
  GetRichEditCtrl().GetSel(nStartChar, nEndChar);
  if (nEndChar - nStartChar <= 1)
  {
    SendMessage (WM_LBUTTONDOWN, nFlags, MAKELPARAM (point.x, point.y));
    ReleaseCapture ();
  }

  CPoint ptScreen = point;
  ClientToScreen (&ptScreen);

  if (!ShowContextMenu (ptScreen))
  {
    Default ();
  }
}

void CWordPadView::OnSetCharFormat | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pRes |
 | ) |  |  | [protected]

Definition at line 811 of file wordpvw.cpp.

{
  ENSURE(pNMHDR != NULL);
  ENSURE(pRes != NULL);
  SetCharFormat(((CHARHDR*)pNMHDR)->cf);
  *pRes = 1;
}

void CWordPadView::OnSettingChange | ( | UINT | uFlags,
 |  | LPCTSTR | lpszSection |
 | ) |  |  | [protected]

Definition at line 784 of file wordpvw.cpp.

{
  CRichEditView::OnSettingChange(uFlags, lpszSection);
  //printer might have changed
  if (!m_bInPrint)
  {
#pragma warning(suppress:6400)
    if (lstrcmpi(lpszSection, _T("windows")) == 0)
      theApp.NotifyPrinterChanged(TRUE); // force update to defaults
  }
}

afx_msg void CWordPadView::OnSettingChange | ( | UINT | uFlags,
 |  | LPCTSTR | lpszSection |
 | ) |  |  | [protected]
void CWordPadView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 796 of file wordpvw.cpp.

{
  CRichEditView::OnSize(nType, cx, cy);
  CRect rect(HORZ_TEXTOFFSET, VERT_TEXTOFFSET, cx, cy);
  GetRichEditCtrl().SetRect(rect);
}

afx_msg void CWordPadView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
virtual void CWordPadView::OnTextNotFound ( LPCTSTR ) [protected, virtual]
void CWordPadView::OnTextNotFound ( LPCTSTR lpStr ) [protected, virtual]

Definition at line 497 of file wordpvw.cpp.

{
  ASSERT_VALID(this);
  MessageBeep(0);
  AfxMessageBox(IDS_FINISHED_SEARCH,MB_OK|MB_ICONINFORMATION);
  CRichEditView::OnTextNotFound(lpStr);
}

afx_msg void CWordPadView::OnTimer ( UINT_PTR nIDEvent ) [protected]
void CWordPadView::OnTimer ( UINT_PTR nIDEvent ) [protected]

Definition at line 510 of file wordpvw.cpp.

{
  if (m_uTimerID != nIDEvent) // not our timer
    CRichEditView::OnTimer(nIDEvent);
  else
  {
    KillTimer(m_uTimerID); // kill one-shot timer
    m_uTimerID = 0;
    if (m_bDelayUpdateItems)
      GetDocument()->UpdateAllItems(NULL);
    m_bDelayUpdateItems = FALSE;
  }
}

void CWordPadView::OnUpdateBorderType ( CCmdUI * pCmdUI ) [protected]

Definition at line 1049 of file wordpvw.cpp.

{
  pCmdUI->SetCheck (pCmdUI->m_nID == m_nBorderType);
}

BOOL CWordPadView::PasteNative ( LPDATAOBJECT lpdataobj )
BOOL CWordPadView::PasteNative ( LPDATAOBJECT lpdataobj )

Definition at line 651 of file wordpvw.cpp.

{
  // check data object for wordpad object
  // if true, suck out RTF directly
  FORMATETC etc = {NULL, NULL, DVASPECT_CONTENT, -1, TYMED_ISTORAGE};
  etc.cfFormat = (CLIPFORMAT)cfEmbeddedObject;
  STGMEDIUM stgMedium = {TYMED_ISTORAGE, 0, NULL};

  // create an IStorage to transfer the data in
  LPLOCKBYTES lpLockBytes;
  if (FAILED(::CreateILockBytesOnHGlobal(NULL, TRUE, &lpLockBytes)))
    return FALSE;
  ENSURE(lpLockBytes != NULL);

  HRESULT hr = ::StgCreateDocfileOnILockBytes(lpLockBytes,
    STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE, 0, &stgMedium.pstg);
  lpLockBytes->Release(); //storage addref'd
  if (FAILED(hr))
    return FALSE;

  ASSERT(stgMedium.pstg != NULL);
  CLSID clsid;
  BOOL bRes = FALSE; //let richedit do what it wants
  if (SUCCEEDED(lpdataobj->GetDataHere(&etc, &stgMedium)) &&
    SUCCEEDED(ReadClassStg(stgMedium.pstg, &clsid)) &&
    clsid == GetDocument()->GetClassID())
  {
    //suck out RTF now
    // open Contents stream
    COleStreamFile file;
    CFileException fe;
    if (file.OpenStream(stgMedium.pstg, szContents,
      CFile::modeReadWrite|CFile::shareExclusive, &fe))
    {

      // load it with CArchive (loads from Contents stream)
      CArchive loadArchive(&file, CArchive::load |
        CArchive::bNoFlushOnDelete);
      Stream(loadArchive, TRUE); //stream in selection
      bRes = TRUE; // don't let richedit do anything
    }
  }
  ::ReleaseStgMedium(&stgMedium);
  return bRes;
}

virtual BOOL CWordPadView::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]
BOOL CWordPadView::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 156 of file wordpvw.cpp.

{
  BOOL bRes = CRichEditView::PreCreateWindow(cs);
  cs.style |= ES_SELECTIONBAR;
  return bRes;
}

HRESULT CWordPadView::QueryAcceptData | ( | LPDATAOBJECT | lpdataobj,
 |  | CLIPFORMAT * | lpcfFormat,
 |  | DWORD | reco,
 |  | BOOL | bReally,
 |  | HGLOBAL | hMetaPict |
 | ) |  |  | [protected, virtual]

Definition at line 630 of file wordpvw.cpp.

{
  if (bReally && *lpcfFormat == 0 && (m_nPasteType == 0))
  {
    COleDataObject dataobj;
    dataobj.Attach(lpdataobj, FALSE);
    if (!dataobj.IsDataAvailable(cfRTO)) // native avail, let richedit do as it wants
    {
      if (dataobj.IsDataAvailable(cfEmbeddedObject))
      {
        if (PasteNative(lpdataobj))
          return S_FALSE;
      }
    }
  }
  return CRichEditView::QueryAcceptData(lpdataobj, lpcfFormat, reco, bReally,
    hMetaPict);
}

virtual HRESULT CWordPadView::QueryAcceptData | ( | LPDATAOBJECT | ,
 |  | CLIPFORMAT * | ,
 |  | DWORD | ,
 |  | BOOL | ,
 |  | HGLOBAL |  |
 | ) |  |  | [protected, virtual]
BOOL CWordPadView::SelectPalette ( )
BOOL CWordPadView::SelectPalette ( )
void CWordPadView::SetDefaultFont ( BOOL bText )
void CWordPadView::SetDefaultFont ( BOOL bText )

Definition at line 257 of file wordpvw.cpp.

{
  ASSERT_VALID(this);
  ASSERT(m_hWnd != NULL);
  m_bSyncCharFormat = m_bSyncParaFormat = TRUE;
  CHARFORMAT* pCharFormat = bText ? &m_defTextCharFormat : &m_defCharFormat;
  // set the default character format -- the FALSE makes it the default
  GetRichEditCtrl().SetSel(0,-1);
  GetRichEditCtrl().SetDefaultCharFormat(*pCharFormat);
  GetRichEditCtrl().SetSelectionCharFormat(*pCharFormat);

  GetRichEditCtrl().SetParaFormat(m_defParaFormat);

  GetRichEditCtrl().SetSel(0,0);
  GetRichEditCtrl().EmptyUndoBuffer();
  GetRichEditCtrl().SetModify(FALSE);
  ASSERT_VALID(this);
}

void CWordPadView::SetTextColor ( COLORREF color )

Definition at line 913 of file wordpvw.cpp.

{
  CRichEditView::OnColorPick (color == -1 ? ::GetSysColor (COLOR_WINDOWTEXT) : color);
}

void CWordPadView::SetUpdateTimer ( )
void CWordPadView::SetUpdateTimer ( )

Definition at line 238 of file wordpvw.cpp.

{
  if (m_uTimerID != 0) // if outstanding timer kill it
    KillTimer(m_uTimerID);
  m_uTimerID = SetTimer(1, 1000, NULL); //set a timer for 1000 milliseconds
  if (m_uTimerID == 0) // no timer available so force update now
    GetDocument()->UpdateAllItems(NULL);
  else
    m_bDelayUpdateItems = TRUE;
}

BOOL CWordPadView::ShowContextMenu ( CPoint pt )

Definition at line 895 of file wordpvw.cpp.

{
  if (DYNAMIC_DOWNCAST (CFrameWndEx, GetParentFrame ()) == NULL)
  {
    // Maybe, server mode, show the regular menu!
    return FALSE;
  }

  CRichEditCntrItem* pItem = GetSelectedItem();
  if (pItem == NULL || !pItem->IsInPlaceActive())
  {
    theApp.ShowPopupMenu (IDR_TEXT_POPUP, point, this);
    return TRUE;
  }

  return FALSE;
}

void CWordPadView::WrapChanged ( ) [virtual]

Definition at line 221 of file wordpvw.cpp.

{
  CWaitCursor wait;
  CFrameWnd* pFrameWnd = GetParentFrame();
  ENSURE(pFrameWnd != NULL);
  pFrameWnd->SetMessageText(IDS_FORMATTING);
  CWnd* pBarWnd = pFrameWnd->GetMessageBar();
  if (pBarWnd != NULL)
    pBarWnd->UpdateWindow();

  CRichEditView::WrapChanged();

  pFrameWnd->SetMessageText(AFX_IDS_IDLEMESSAGE);
  if (pBarWnd != NULL)
    pBarWnd->UpdateWindow();
}

virtual void CWordPadView::WrapChanged ( ) [virtual]

Member Data Documentation

BOOL CWordPadView::m_bDelayUpdateItems

Definition at line 22 of file wordpvw.h.

BOOL CWordPadView::m_bInPrint

Definition at line 23 of file wordpvw.h.

BOOL CWordPadView::m_bOnBar [protected]

Definition at line 67 of file wordpvw.h.

CCharFormat CWordPadView::m_defCharFormat

Definition at line 25 of file wordpvw.h.

CParaFormat CWordPadView::m_defParaFormat

Definition at line 24 of file wordpvw.h.

CCharFormat CWordPadView::m_defTextCharFormat

Definition at line 26 of file wordpvw.h.

UINT CWordPadView::m_nBorderType [protected]

Definition at line 74 of file wordpvw.h.

UINT_PTR CWordPadView::m_uTimerID

Definition at line 21 of file wordpvw.h.

The documentation for this class was generated from the following files:
  • ole/wordpad/wordpvw.h
  • vc2008fp/WordPad/wordpvw.h
  • ole/wordpad/wordpvw.cpp
  • vc2008fp/WordPad/wordpvw.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWorkspaceBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

CWorkspaceBar Class Reference

#include "WorkspaceBar.h"

List of all members.

Public Member Functions

CWorkspaceBar ()
CWorkspaceBar ()
CWorkspaceBar ()
CWorkspaceBar ()
CWorkspaceBar ()
virtual | ~CWorkspaceBar ()
virtual | ~CWorkspaceBar ()
virtual | ~CWorkspaceBar ()
virtual | ~CWorkspaceBar ()
virtual | ~CWorkspaceBar ()
void | AdjustLayout ()
void | SetPropState ()

Protected Types

enum {
idShowMDITabs, idTabsOnTop, idActiveTabCloseButton, idTabsStyle,
idTabsAutoColor, idMDITabsIcons, idMDITabsDocMenu, idDragMDITabs,
idMDITabsContextMenu, idMDITabsBorderSize, idDisableMDIChildRedraw, idFlatFrame,
idCustomTooltips
}

Protected Member Functions

afx_msg void | OnCommand1 ()
afx_msg void | OnCommand2 ()
afx_msg void | OnCommand3 ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnPaint ()
afx_msg void | OnPaint ()
afx_msg void | OnPaint ()
afx_msg LRESULT | OnPropertyChanged (WPARAM, LPARAM)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnUpdateCommand3 (CCmdUI *pCmdUI)

Protected Attributes

CMFCPropertyGridCtrl | m_wndPropList
CMFCTabCtrl | m_wndTabs
CWorkspaceToolBar m_wndToolBar
CTreeCtrl | m_wndTree
CTreeCtrl | m_wndTree1
CTreeCtrl | m_wndTree2

Detailed Description

Definition at line 13 of file WorkspaceBar.h.

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
idShowMDITabs
idTabsOnTop
idActiveTabCloseButton
idTabsStyle
idTabsAutoColor
idMDITabsIcons
idMDITabsDocMenu
idDragMDITabs
idMDITabsContextMenu
idMDITabsBorderSize
idDisableMDIChildRedraw
idFlatFrame
idCustomTooltips

Definition at line 22 of file WorkspaceBar.h.

  {
    idShowMDITabs,
    idTabsOnTop,
    idActiveTabCloseButton,
    idTabsStyle,
    idTabsAutoColor,
    idMDITabsIcons,
    idMDITabsDocMenu,
    idDragMDITabs,
    idMDITabsContextMenu,
    idMDITabsBorderSize,
    idDisableMDIChildRedraw,
    idFlatFrame,
    idCustomTooltips
  };

Constructor & Destructor Documentation

CWorkspaceBar::CWorkspaceBar ( )

Definition at line 55 of file WorkspaceBar.cpp.

{
  // TODO: add one-time construction code here

}

CWorkspaceBar::~CWorkspaceBar ( ) [virtual]

Definition at line 61 of file WorkspaceBar.cpp.

{
}

CWorkspaceBar::CWorkspaceBar ( )
virtual CWorkspaceBar::~CWorkspaceBar ( ) [virtual]
CWorkspaceBar::CWorkspaceBar ( )
virtual CWorkspaceBar::~CWorkspaceBar ( ) [virtual]
CWorkspaceBar::CWorkspaceBar ( )
virtual CWorkspaceBar::~CWorkspaceBar ( ) [virtual]
CWorkspaceBar::CWorkspaceBar ( )
virtual CWorkspaceBar::~CWorkspaceBar ( ) [virtual]

Member Function Documentation

void CWorkspaceBar::AdjustLayout ( )

Definition at line 144 of file WorkspaceBar.cpp.

{
  CRect rectClient;
  GetClientRect (rectClient);

  int cyTlb = m_wndToolBar.CalcFixedLayout (FALSE, TRUE).cy;

  m_wndToolBar.SetWindowPos (NULL, 0, 0,
                rectClient.Width (), cyTlb,
                SWP_NOACTIVATE | SWP_NOZORDER);
  m_wndTabs.SetWindowPos (NULL, 0, cyTlb, rectClient.Width (), rectClient.Height () - cyTlb,
              SWP_NOACTIVATE | SWP_NOZORDER);
}

void CWorkspaceBar::OnCommand1 ( ) [protected]

Definition at line 121 of file WorkspaceBar.cpp.

{
  MessageBox (_T("One!"));
}

void CWorkspaceBar::OnCommand2 ( ) [protected]

Definition at line 126 of file WorkspaceBar.cpp.

{
  MessageBox (_T("Two!"));
}

void CWorkspaceBar::OnCommand3 ( ) [protected]

Definition at line 133 of file WorkspaceBar.cpp.

{
  MessageBox (_T("Three!"));
  bIsThree = !bIsThree;
}

afx_msg int CWorkspaceBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
int CWorkspaceBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 68 of file WorkspaceBar.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy;
  rectDummy.SetRectEmpty ();

  if (!m_wndPropList.Create (WS_VISIBLE | WS_CHILD, rectDummy, this, 1))
  {
    TRACE0("Failed to create Properies Grid \n");
    return -1;      // fail to create
  }

  m_wndPropList.EnableHeaderCtrl (FALSE);
  m_wndPropList.EnableDescriptionArea ();
  m_wndPropList.SetVSDotNetLook ();

  CMFCPropertyGridProperty* pMDITabsProp = new CMFCPropertyGridProperty (_T("Enable MDI Tabs"),
    lpszMDITabsStyles [1],
    _T("Enable or disable either the standard MDI Tabs feature, or MDI Tabbed Groups feature"),
    idShowMDITabs);

  pMDITabsProp->AddOption (_T ("None"));
  pMDITabsProp->AddOption (_T ("MDI Tabs (Standard)"));
  pMDITabsProp->AddOption (_T ("MDI Tabbed Groups"));

  int i = 0;
  for (i = 0; lpszMDITabsStyles [i] != NULL; i++)
  {
    pMDITabsProp->AddOption (lpszMDITabsStyles [i]);
  }

  switch (theApp.m_Options.m_nMDITabsType)
  {
  case CMDITabOptions::None:
    pMDITabsProp->SetValue (lpszMDITabsStyles [0]);
    break;

  case CMDITabOptions::MDITabsStandard:
    pMDITabsProp->SetValue (lpszMDITabsStyles [1]);
    break;

  case CMDITabOptions::MDITabbedGroups:
    pMDITabsProp->SetValue (lpszMDITabsStyles [2]);
    break;
  }

  pMDITabsProp->AllowEdit (FALSE);

  m_wndPropList.AddProperty (pMDITabsProp);

  COleVariant varTabsOnTop((short)(theApp.m_Options.m_bTabsOnTop == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tabs on top"), varTabsOnTop,
    _T("Show MDI tabs on top"), idTabsOnTop));

  COleVariant varActiveTabCloseButton((short)(theApp.m_Options.m_bActiveTabCloseButton == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Active tab \"Close\" button"), varActiveTabCloseButton,
    _T("Show \"Close\" button on the active tab right side"), idActiveTabCloseButton));

  CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty (_T("MDI Tabs style"), _T(""),
    _T("One of: VS.NET, OneNote or Visual Studio 2005"), idTabsStyle);

  for (i = 0; lpszStyles [i] != NULL; i++)
  {
    pProp->AddOption (lpszStyles [i]);
  }

  switch (theApp.m_Options.m_nTabsStyle)
  {
  case CMFCTabCtrl::STYLE_3D_SCROLLED:
    pProp->SetValue (lpszStyles [0]);
    break;

  case CMFCTabCtrl::STYLE_3D_ONENOTE:
    pProp->SetValue (lpszStyles [1]);
    break;

  case CMFCTabCtrl::STYLE_3D_VS2005:
    pProp->SetValue (lpszStyles [2]);
    break;
  }

  pProp->AllowEdit (FALSE);
  m_wndPropList.AddProperty (pProp);

  COleVariant varTabsAutoColor((short)(theApp.m_Options.m_bTabsAutoColor == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tabs auto-color"), varTabsAutoColor,
    _T("Set MDI tabs automatic color"), idTabsAutoColor));

  COleVariant varMDITabsIcons((short)(theApp.m_Options.m_bMDITabsIcons == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tab icons"), varMDITabsIcons,
    _T("Show document icons on MDI tabs"), idMDITabsIcons));

  COleVariant varMDITabsDocMenu((short)(theApp.m_Options.m_bMDITabsDocMenu == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tabs document menu"), varMDITabsDocMenu,
    _T("Show menu with a list of opened documents"), idMDITabsDocMenu));

  COleVariant varDragMDITabs((short)(theApp.m_Options.m_bDragMDITabs == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Drag tabs"), varDragMDITabs,
    _T("Enable MDI tabs order changing"), idDragMDITabs));

  COleVariant varMDITabsContextMenu((short)(theApp.m_Options.m_bMDITabsContextMenu == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Context Menu"), varMDITabsContextMenu,
    _T("Enable MDI tabs context menu"), idMDITabsContextMenu));

  CMFCPropertyGridProperty* pBorderProp = new CMFCPropertyGridProperty (_T("Border Size"),
    (COleVariant) ((short) theApp.m_Options.m_nMDITabsBorderSize),
    _T("Set MDI border"), idMDITabsBorderSize);
  pBorderProp->EnableSpinControl (TRUE, 0, 10);
  pBorderProp->AllowEdit(FALSE);

  m_wndPropList.AddProperty (pBorderProp);

  COleVariant varDisableMDIChildRedraw((short)(theApp.m_Options.m_bDisableMDIChildRedraw == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("No optimize MDI child redraw"), varDisableMDIChildRedraw,
    _T("Disable MDI Child redraw optimization"), idDisableMDIChildRedraw));

  COleVariant varFlatFrame((short)(theApp.m_Options.m_bFlatFrame == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Flat Frame"), varFlatFrame,
    _T("Enable or disable 3D frame around MDI client area"), idFlatFrame));

  COleVariant varCustomTooltips((short)(theApp.m_Options.m_bCustomTooltips == TRUE), VT_BOOL);
  m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Custom Tooltips"), varCustomTooltips,
    _T("Enable MDI tabs custom tooltips"), idCustomTooltips));

  SetPropState ();
  return 0;
}

afx_msg int CWorkspaceBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CWorkspaceBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
afx_msg int CWorkspaceBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]
void CWorkspaceBar::OnPaint ( ) [protected]

Definition at line 208 of file WorkspaceBar.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndPropList.GetWindowRect (rectTree);
  ScreenToClient (rectTree);

  rectTree.InflateRect (nBorderSize, nBorderSize);
  dc.Draw3dRect (rectTree,  ::GetSysColor (COLOR_3DSHADOW),
                ::GetSysColor (COLOR_3DSHADOW));
}

afx_msg void CWorkspaceBar::OnPaint ( ) [protected]
afx_msg void CWorkspaceBar::OnPaint ( ) [protected]
LRESULT CWorkspaceBar::OnPropertyChanged | ( | WPARAM | ,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 221 of file WorkspaceBar.cpp.

{
  CMFCPropertyGridProperty* pProp = (CMFCPropertyGridProperty*) lParam;

  BOOL bResetMDIChild = FALSE;

  switch ((int) pProp->GetData ())
  {
  case idShowMDITabs:
    {
      CString strShowMdiTabOption = (LPCTSTR) (_bstr_t)pProp->GetValue ();
      bResetMDIChild = TRUE;

      for (int i = 0; lpszMDITabsStyles [i] != NULL; i++)
      {
        if (strShowMdiTabOption == lpszMDITabsStyles [i])
        {
          switch (i)
          {
          case 0:
            theApp.m_Options.m_nMDITabsType = CMDITabOptions::None;
            break;

          case 1:
            theApp.m_Options.m_nMDITabsType = CMDITabOptions::MDITabsStandard;
            break;

          case 2:
            theApp.m_Options.m_nMDITabsType = CMDITabOptions::MDITabbedGroups;
            break;
          }
          break;
        }
      }

      SetPropState ();
    }
    break;

  case idTabsOnTop:
    theApp.m_Options.m_bTabsOnTop = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idActiveTabCloseButton:
    theApp.m_Options.m_bActiveTabCloseButton = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idTabsStyle:
    {
      CString strStyle = (LPCTSTR) (_bstr_t)pProp->GetValue ();

      for (int i = 0; lpszStyles [i] != NULL; i++)
      {
        if (strStyle == lpszStyles [i])
        {
          switch (i)
          {
          case 0:
            theApp.m_Options.m_nTabsStyle = CMFCTabCtrl::STYLE_3D_SCROLLED;
            break;

          case 1:
            theApp.m_Options.m_nTabsStyle = CMFCTabCtrl::STYLE_3D_ONENOTE;
            break;

          case 2:
            theApp.m_Options.m_nTabsStyle = CMFCTabCtrl::STYLE_3D_VS2005;
            break;
          }
          break;
        }
      }
    }
    break;

  case idTabsAutoColor:
    theApp.m_Options.m_bTabsAutoColor = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idMDITabsIcons:
    theApp.m_Options.m_bMDITabsIcons = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idMDITabsDocMenu:
    theApp.m_Options.m_bMDITabsDocMenu = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idDragMDITabs:
    theApp.m_Options.m_bDragMDITabs = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idMDITabsContextMenu:
    theApp.m_Options.m_bMDITabsContextMenu = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idMDITabsBorderSize:
    {
      int nBorder = pProp->GetValue ().iVal;
      theApp.m_Options.m_nMDITabsBorderSize = min (10, max (0, nBorder));
    }
    break;

  case idDisableMDIChildRedraw:
    theApp.m_Options.m_bDisableMDIChildRedraw = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idFlatFrame:
    theApp.m_Options.m_bFlatFrame = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;

  case idCustomTooltips:
    theApp.m_Options.m_bCustomTooltips = pProp->GetValue().boolVal == VARIANT_TRUE;
    break;
  }

  theApp.UpdateMDITabs (bResetMDIChild);
  return 0;
}

afx_msg void CWorkspaceBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
afx_msg void CWorkspaceBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
void CWorkspaceBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 198 of file WorkspaceBar.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);

  // Tab control should cover a whole client area:
  m_wndPropList.SetWindowPos (NULL, nBorderSize, nBorderSize,
    cx - 2 * nBorderSize, cy - 2 * nBorderSize,
    SWP_NOACTIVATE | SWP_NOZORDER);
}

afx_msg void CWorkspaceBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
afx_msg void CWorkspaceBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]
void CWorkspaceBar::OnUpdateCommand3 ( CCmdUI * pCmdUI ) [protected]

Definition at line 139 of file WorkspaceBar.cpp.

{
  pCmdUI->SetCheck (bIsThree);
}

void CWorkspaceBar::SetPropState ( )

Definition at line 340 of file WorkspaceBar.cpp.

{
  for (int i = 0; i < m_wndPropList.GetPropertyCount (); i++)
  {
    CMFCPropertyGridProperty* pProp = m_wndPropList.GetProperty (i);
    ASSERT_VALID (pProp);

    if ((int) pProp->GetData () != idShowMDITabs)
    {
      pProp->Enable (theApp.m_Options.m_nMDITabsType != CMDITabOptions::None);
    }
  }

  if (m_wndPropList.GetSafeHwnd () != NULL)
  {
    m_wndPropList.RedrawWindow ();
  }
}

Member Data Documentation

CMFCPropertyGridCtrl CWorkspaceBar::m_wndPropList [protected]

Definition at line 20 of file WorkspaceBar.h.

CMFCTabCtrl CWorkspaceBar::m_wndTabs [protected]

Definition at line 20 of file WorkspaceBar.h.

CWorkspaceToolBar CWorkspaceBar::m_wndToolBar [protected]

Definition at line 35 of file WorkspaceBar.h.

CTreeCtrl CWorkspaceBar::m_wndTree [protected]

Definition at line 21 of file WorkspaceBar.h.

CTreeCtrl CWorkspaceBar::m_wndTree1 [protected]

Definition at line 22 of file WorkspaceBar.h.

CTreeCtrl CWorkspaceBar::m_wndTree2 [protected]

Definition at line 23 of file WorkspaceBar.h.

The documentation for this class was generated from the following files:
  • vc2008fp/MDITabsDemo/WorkspaceBar.h
  • vc2008fp/RibbonMDI/WorkspaceBar.h
  • vc2008fp/SetPaneSize/WorkspaceBar.h
  • vc2008fp/StateCollection/WorkspaceBar.h
  • vc2008fp/WorkSpaceToolBar/WorkspaceBar.h
  • vc2008fp/MDITabsDemo/WorkspaceBar.cpp
  • vc2008fp/RibbonMDI/WorkspaceBar.cpp
  • vc2008fp/SetPaneSize/WorkspaceBar.cpp
  • vc2008fp/StateCollection/WorkspaceBar.cpp
  • vc2008fp/WorkSpaceToolBar/WorkspaceBar.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWorkspaceBar2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

CWorkspaceBar2 Class Reference

#include "WorkspaceBar2.h"

List of all members.

Public Member Functions

CWorkspaceBar2 ()
virtual | ~CWorkspaceBar2 ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnPaint ()
afx_msg void | OnSize (UINT nType, int cx, int cy)

Protected Attributes

CTreeCtrl | m_wndTree

Detailed Description

Definition at line 14 of file WorkspaceBar2.h.

Constructor & Destructor Documentation

CWorkspaceBar2::CWorkspaceBar2 ( )

Definition at line 36 of file WorkspaceBar2.cpp.

{
  // TODO: add one-time construction code here

}

CWorkspaceBar2::~CWorkspaceBar2 ( ) [virtual]

Definition at line 42 of file WorkspaceBar2.cpp.

{
}

Member Function Documentation

int CWorkspaceBar2::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 49 of file WorkspaceBar2.cpp.

{
  if (CDockablePane::OnCreate(lpCreateStruct) == -1)
    return -1;

  CRect rectDummy;
  rectDummy.SetRectEmpty ();

  // Create tree windows.
  // TODO: create your own tab windows here:
  const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
                TVS_LINESATROOT | TVS_HASBUTTONS;

  if (!m_wndTree.Create (dwViewStyle, rectDummy, this, 1))
  {
    TRACE0("Failed to create workspace view\n");
    return -1;      // fail to create
  }

  // Setup trees content:
  HTREEITEM hRoot1 = m_wndTree.InsertItem (_T("Root 2"));
  m_wndTree.InsertItem (_T("Item 1"), hRoot1);
  m_wndTree.InsertItem (_T("Item 2"), hRoot1);

  return 0;
}

void CWorkspaceBar2::OnPaint ( ) [protected]

Definition at line 86 of file WorkspaceBar2.cpp.

{
  CPaintDC dc(this); // device context for painting

  CRect rectTree;
  m_wndTree.GetWindowRect (rectTree);
  ScreenToClient (rectTree);

  rectTree.InflateRect (nBorderSize, nBorderSize);
  dc.Draw3dRect (rectTree,  ::GetSysColor (COLOR_3DSHADOW),
                ::GetSysColor (COLOR_3DSHADOW));
}

void CWorkspaceBar2::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy |
 | ) |  |  | [protected]

Definition at line 76 of file WorkspaceBar2.cpp.

{
  CDockablePane::OnSize(nType, cx, cy);

  // Tab control should cover a whole client area:
  m_wndTree.SetWindowPos (NULL, nBorderSize, nBorderSize,
    cx - 2 * nBorderSize, cy - 2 * nBorderSize,
    SWP_NOACTIVATE | SWP_NOZORDER);
}

Member Data Documentation

CTreeCtrl CWorkspaceBar2::m_wndTree [protected]

Definition at line 21 of file WorkspaceBar2.h.

The documentation for this class was generated from the following files:
  • vc2008fp/RibbonMDI/WorkspaceBar2.h
  • vc2008fp/RibbonMDI/WorkspaceBar2.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWorkspaceObj Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

CWorkspaceObj Class Reference

#include "WorkspaceObj.h"

List of all members.

Public Member Functions

CWorkspaceObj (const CString &strName, const UINT uiCmd, const int iIconIndex, const UINT uiDefaultNewAction)
virtual | ~CWorkspaceObj ()

Public Attributes

const int | m_iIconIndex
const CString | m_strName
const UINT | m_uiCmd
const UINT | m_uiDefaultNewAction

Detailed Description

Definition at line 12 of file WorkspaceObj.h.

Constructor & Destructor Documentation

CWorkspaceObj::CWorkspaceObj | ( | const CString & | strName,
 |  | const UINT | uiCmd,
 |  | const int | iIconIndex,
 |  | const UINT | uiDefaultNewAction
 | ) |  |

Definition at line 24 of file WorkspaceObj.cpp.

                                                                                :
  m_strName(strName), m_uiCmd(uiCmd), m_iIconIndex(iIconIndex), m_uiDefaultNewAction(uiDefaultNewAction)
{
}

CWorkspaceObj::~CWorkspaceObj ( ) [virtual]

Definition at line 29 of file WorkspaceObj.cpp.

{
}

Member Data Documentation

const int CWorkspaceObj::m_iIconIndex

Definition at line 20 of file WorkspaceObj.h.

const CString CWorkspaceObj::m_strName

Definition at line 18 of file WorkspaceObj.h.

const UINT CWorkspaceObj::m_uiCmd

Definition at line 19 of file WorkspaceObj.h.

const UINT CWorkspaceObj::m_uiDefaultNewAction

Definition at line 21 of file WorkspaceObj.h.

The documentation for this class was generated from the following files:
  • vc2008fp/OutlookDemo/WorkspaceObj.h
  • vc2008fp/OutlookDemo/WorkspaceObj.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWorkspaceToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CWorkspaceToolBar Class Reference

#include "WorkspaceBar.h"

List of all members.

Public Member Functions

virtual void | AdjustLayout ()
virtual BOOL | AllowShowOnList () const
virtual void | OnUpdateCmdUI (CFrameWnd *, BOOL bDisableIfNoHndler)

Detailed Description

Definition at line 13 of file WorkspaceBar.h.

Member Function Documentation

void CWorkspaceToolBar::AdjustLayout ( ) [virtual]

Definition at line 158 of file WorkspaceBar.cpp.

{
  CMFCToolBar::AdjustLayout ();

  ((CWorkspaceBar*) GetParent ())->AdjustLayout ();
}

virtual BOOL CWorkspaceToolBar::AllowShowOnList ( ) const [inline, virtual]

Definition at line 23 of file WorkspaceBar.h.

{ return FALSE; }

virtual void CWorkspaceToolBar::OnUpdateCmdUI | ( | CFrameWnd * | ,
 |  | BOOL | bDisableIfNoHndler |
 | ) |  |  | [inline, virtual]

Definition at line 17 of file WorkspaceBar.h.

  {
    CMFCToolBar::OnUpdateCmdUI ((CFrameWnd*) GetOwner (), bDisableIfNoHndler);
  }

The documentation for this class was generated from the following files:
  • vc2008fp/WorkSpaceToolBar/WorkspaceBar.h
  • vc2008fp/WorkSpaceToolBar/WorkspaceBar.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWorkSpaceToolBarApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CWorkSpaceToolBarApp Class Reference

#include "WorkSpaceToolBar.h"

List of all members.

Public Member Functions

CWorkSpaceToolBarApp ()
virtual int | ExitInstance ()
virtual BOOL | InitInstance ()
afx_msg void | OnAppAbout ()
virtual void | PreLoadState ()

Detailed Description

Definition at line 24 of file WorkSpaceToolBar.h.

Constructor & Destructor Documentation

CWorkSpaceToolBarApp::CWorkSpaceToolBarApp ( )

Definition at line 40 of file WorkSpaceToolBar.cpp.

                                           :
  CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
{
  // TODO: add construction code here,
  // Place all significant initialization in InitInstance
}

Member Function Documentation

int CWorkSpaceToolBarApp::ExitInstance ( ) [virtual]

Definition at line 120 of file WorkSpaceToolBar.cpp.

{

  return CWinAppEx::ExitInstance();
}

BOOL CWorkSpaceToolBarApp::InitInstance ( ) [virtual]

Definition at line 55 of file WorkSpaceToolBar.cpp.

{
  // Initialize OLE libraries
  if (!AfxOleInit())
  {
    AfxMessageBox(IDP_OLE_INIT_FAILED);
    return FALSE;
  }

  AfxEnableControlContainer();

  // Standard initialization
  // If you are not using these features and wish to reduce the size
  //  of your final executable, you should remove from the following
  //  the specific initialization routines you do not need.

  // Change the registry key under which our settings are stored.
  // TODO: You should modify this string to be something appropriate
  // such as the name of your company or organization.
  SetRegistryKey(_T("Microsoft\\MFC\\Samples"));

  LoadStdProfileSettings();  // Load standard INI file options (including MRU)

  SetRegistryBase (_T("Settings"));

  // Initialize all Managers for usage. They are automatically constructed
  // if not yet present
  InitContextMenuManager();
  InitKeyboardManager();

  // Register the application's document templates.  Document templates
  //  serve as the connection between documents, frame windows and views.

  CMultiDocTemplate* pDocTemplate;
  pDocTemplate = new CMultiDocTemplate(
    IDR_WORKSPTYPE,
    RUNTIME_CLASS(CWorkSpaceToolBarDoc),
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame
    RUNTIME_CLASS(CWorkSpaceToolBarView));
  AddDocTemplate(pDocTemplate);

  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame;
  if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
    return FALSE;
  m_pMainWnd = pMainFrame;

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  // The main window has been initialized, so show and update it.
  pMainFrame->ShowWindow(m_nCmdShow);
  pMainFrame->UpdateWindow();

  return TRUE;
}

void CWorkSpaceToolBarApp::OnAppAbout ( )

Definition at line 183 of file WorkSpaceToolBar.cpp.

{
  CAboutDlg aboutDlg;
  aboutDlg.DoModal();
}

void CWorkSpaceToolBarApp::PreLoadState ( ) [virtual]

Definition at line 127 of file WorkSpaceToolBar.cpp.

{

  GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);

  // TODO: add another context menus here
}

The documentation for this class was generated from the following files:
  • vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.h
  • vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWorkSpaceToolBarDoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CWorkSpaceToolBarDoc Class Reference

#include "WorkSpaceToolBarDoc.h"

List of all members.

Public Member Functions

virtual | ~CWorkSpaceToolBarDoc ()
virtual BOOL | OnNewDocument ()
virtual void | Serialize (CArchive &ar)

Protected Member Functions

CWorkSpaceToolBarDoc ()

Detailed Description

Definition at line 13 of file WorkSpaceToolBarDoc.h.

Constructor & Destructor Documentation

CWorkSpaceToolBarDoc::CWorkSpaceToolBarDoc ( ) [protected]

Definition at line 33 of file WorkSpaceToolBarDoc.cpp.

{
  // TODO: add one-time construction code here

}

CWorkSpaceToolBarDoc::~CWorkSpaceToolBarDoc ( ) [virtual]

Definition at line 39 of file WorkSpaceToolBarDoc.cpp.

{
}

Member Function Documentation

BOOL CWorkSpaceToolBarDoc::OnNewDocument ( ) [virtual]

Definition at line 43 of file WorkSpaceToolBarDoc.cpp.

{
  if (!CDocument::OnNewDocument())
    return FALSE;

  // TODO: add reinitialization code here
  // (SDI documents will reuse this document)

  return TRUE;
}

void CWorkSpaceToolBarDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 59 of file WorkSpaceToolBarDoc.cpp.

{
  if (ar.IsStoring())
  {
    // TODO: add storing code here
  }
  else
  {
    // TODO: add loading code here
  }
}

The documentation for this class was generated from the following files:
  • vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.h
  • vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CWorkSpaceToolBarView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

CWorkSpaceToolBarView Class Reference

#include "WorkSpaceToolBarView.h"

List of all members.

Public Member Functions

virtual | ~CWorkSpaceToolBarView ()
CWorkSpaceToolBarDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)

Protected Member Functions

CWorkSpaceToolBarView ()
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnContextMenu (CWnd *, CPoint point)
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
afx_msg void | OnFilePrintPreview ()
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)

Detailed Description

Definition at line 13 of file WorkSpaceToolBarView.h.

Constructor & Destructor Documentation

CWorkSpaceToolBarView::CWorkSpaceToolBarView ( ) [protected]

Definition at line 39 of file WorkSpaceToolBarView.cpp.

{
  // TODO: add construction code here

}

CWorkSpaceToolBarView::~CWorkSpaceToolBarView ( ) [virtual]

Definition at line 45 of file WorkSpaceToolBarView.cpp.

{
}

Member Function Documentation

CWorkSpaceToolBarDoc * CWorkSpaceToolBarView::GetDocument ( ) [inline]

Definition at line 51 of file WorkSpaceToolBarView.h.

   { return (CWorkSpaceToolBarDoc*)m_pDocument; }

void CWorkSpaceToolBarView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 81 of file WorkSpaceToolBarView.cpp.

{
  // TODO: add extra initialization before printing
}

void CWorkSpaceToolBarView::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point |
 | ) |  |  | [protected]

Definition at line 115 of file WorkSpaceToolBarView.cpp.

{
  theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
}

void CWorkSpaceToolBarView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 60 of file WorkSpaceToolBarView.cpp.

{
  //CWorkSpaceToolBarDoc* pDoc = GetDocument();
  //ASSERT_VALID(pDoc);
  // TODO: add draw code for native data here
}

void CWorkSpaceToolBarView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo |
 | ) |  |  | [protected, virtual]

Definition at line 86 of file WorkSpaceToolBarView.cpp.

{
  // TODO: add cleanup after printing
}

void CWorkSpaceToolBarView::OnFilePrintPreview ( ) [protected]

Definition at line 70 of file WorkSpaceToolBarView.cpp.

{
  AFXPrintPreview (this);
}

BOOL CWorkSpaceToolBarView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

Definition at line 75 of file WorkSpaceToolBarView.cpp.

{
  // default preparation
  return DoPreparePrinting(pInfo);
}

BOOL CWorkSpaceToolBarView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 49 of file WorkSpaceToolBarView.cpp.

{
  // TODO: Modify the Window class or styles here by modifying
  //  the CREATESTRUCT cs

  return CView::PreCreateWindow(cs);
}

The documentation for this class was generated from the following files:
  • vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.h
  • vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CXlistApp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CXlistApp Class Reference

#include "xlist.h"

List of all members.

Public Member Functions

int | ExitInstance ()
BOOL | InitInstance ()

Detailed Description

Definition at line 22 of file xlist.h.

Member Function Documentation

int CXlistApp::ExitInstance ( )

Definition at line 49 of file xlist.cpp.

{
  // TODO: Add your own module termination code here.

  return COleControlModule::ExitInstance();
}

BOOL CXlistApp::InitInstance ( )

Definition at line 33 of file xlist.cpp.

{
  BOOL bInit = COleControlModule::InitInstance();

  if (bInit)
  {
    // TODO: Add your own module initialization code here.
  }

  return bInit;
}

The documentation for this class was generated from the following files:
  • controls/xlist/xlist.h
  • controls/xlist/xlist.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CXlistCtrl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CXlistCtrl Class Reference

#include "xlistctl.h"

List of all members.

Public Types

enum {
dispidInvertFlag = 1L, dispidItemBackColor = 7L, dispidItemForeColor = 8L, dispidItemText = 9L,
dispidItemFont = 10L, dispidItemPicture = 11L, dispidRemoveItem = 2L, dispidClear = 3L,
dispidAddTextFontItem = 4L, dispidAddTextItem = 5L, dispidAddPicItem = 6L
}

Public Member Functions

CXlistCtrl ()
virtual void | DoPropExchange (CPropExchange *pPX)
virtual void | OnDraw (CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid)
virtual void | OnResetState ()
virtual void | OnSetClientSite ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

~CXlistCtrl ()
afx_msg void | AboutBox ()
virtual void | AddItem (short nIndex, LPCTSTR lpstrText, LPFONTDISP lpFontDisp, LPPICTUREDISP lpPicDisp)
afx_msg void | AddPicItem (short nIndex, LPPICTUREDISP pic)
afx_msg void | AddTextFontItem (short nIndex, LPCTSTR lpstrText, LPFONTDISP font)
afx_msg void | AddTextItem (short nIndex, LPCTSTR lpstrText)
afx_msg void | Clear ()
DECLARE_OLECREATE_EX (CXlistCtrl) DECLARE_OLETYPELIB(CXlistCtrl) DECLARE_PROPPAGEIDS(CXlistCtrl) DECLARE_OLECTLTYPE(CXlistCtrl) BOOL PreCreateWindow(CREATESTRUCT &cs)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual void | DrawItemPicture (CItemData *pItemData, LPRECT rect, CDC *pdc)
virtual void | DrawItemText (CItemData *pItemData, LPRECT rect, CDC *pdc)
afx_msg OLE_COLOR | GetItemBackColor (short nIndex)
afx_msg LPFONTDISP | GetItemFont (short nIndex)
afx_msg OLE_COLOR | GetItemForeColor (short nIndex)
afx_msg LPPICTUREDISP | GetItemPicture (short nIndex)
virtual int | GetItemPictureHeight (CItemData *pItemData)
afx_msg BSTR | GetItemText (short nIndex)
virtual int | GetItemTextHeight (CItemData *pItemData)
BOOL | IsSubclassedControl ()
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMI)
virtual void | OnAmbientPropertyChange (DISPID dispid)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnInvertFlagChanged ()
LRESULT | OnOcmCommand (WPARAM wParam, LPARAM lParam)
LRESULT | OnOcmDrawItem (WPARAM wParam, LPARAM lParam)
LRESULT | OnOcmMeasureItem (WPARAM wParam, LPARAM lParam)
afx_msg void | RemoveItem (short nIndex)
virtual void | SelectItemBackColor (CItemData *pItemData, LPRECT rect, CDC *pdc)
virtual CFont * | SelectItemFont (CItemData *pItemData, CDC *pdc, CFontHolder &fontHolder)
virtual void | SelectItemForeColor (CItemData *pItemData, CDC *pdc)
afx_msg void | SetItemBackColor (short nIndex, OLE_COLOR newValue)
afx_msg void | SetItemFont (short nIndex, LPFONTDISP newValue)
afx_msg void | SetItemForeColor (short nIndex, OLE_COLOR newValue)
afx_msg void | SetItemPicture (short nIndex, LPPICTUREDISP newValue)
afx_msg void | SetItemText (short nIndex, LPCTSTR lpszNewValue)
virtual void | UpdateDefHeight ()
virtual void | UpdateItems ()

Protected Attributes

BOOL | m_invertFlag
CObArray | m_itemData
short | m_itemDefHeight

Detailed Description

Definition at line 51 of file xlistctl.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
dispidInvertFlag
dispidItemBackColor
dispidItemForeColor
dispidItemText
dispidItemFont
dispidItemPicture
dispidRemoveItem
dispidClear
dispidAddTextFontItem
dispidAddTextItem
dispidAddPicItem

Definition at line 150 of file xlistctl.h.

       {
  //{{AFX_DISP_ID(CXlistCtrl)
  dispidInvertFlag = 1L,
  dispidItemBackColor = 7L,
  dispidItemForeColor = 8L,
  dispidItemText = 9L,
  dispidItemFont = 10L,
  dispidItemPicture = 11L,
  dispidRemoveItem = 2L,
  dispidClear = 3L,
  dispidAddTextFontItem = 4L,
  dispidAddTextItem = 5L,
  dispidAddPicItem = 6L,
  //}}AFX_DISP_ID
  };

Constructor & Destructor Documentation

CXlistCtrl::CXlistCtrl ( )

Definition at line 366 of file xlistctl.cpp.

{
  InitializeIIDs(&IID_DXlist, &IID_DXlistEvents);

  m_itemDefHeight = 0;
  m_sBorderStyle = 1;
}

CXlistCtrl::~CXlistCtrl ( ) [protected]

Definition at line 378 of file xlistctl.cpp.

{
  // Cleanup any and all CItemData objects

  for (int i=0; i<=m_itemData.GetUpperBound(); i++)
  {
    CItemData* pItem = (CItemData*)m_itemData.GetAt(i);

    if (pItem != NULL)
      delete pItem;
  }

  m_itemData.RemoveAll();
}

Member Function Documentation

void CXlistCtrl::AboutBox ( ) [protected]

Definition at line 469 of file xlistctl.cpp.

{
  CDialog dlgAbout(IDD_ABOUTBOX_XLIST);
  dlgAbout.DoModal();
}

void CXlistCtrl::AddItem | ( | short | nIndex,
 |  | LPCTSTR | lpstrText,
 |  | LPFONTDISP | lpFontDisp,
 |  | LPPICTUREDISP | lpPicDisp |
 | ) |  |  | [protected, virtual]

Definition at line 770 of file xlistctl.cpp.

{
  if ((int)nIndex <= m_itemData.GetSize())
  {
    // Init item data
    CItemData* pItemData = NULL;

    TRY
    {
      pItemData = new CItemData(lpstrText, lpFontDisp, lpPicDisp);
    }
    CATCH (CMemoryException, e)
    {
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    }
    END_CATCH

    // Add item data to collection
    m_itemData.InsertAt(nIndex, pItemData);

    // Add item text to listbox
    SendMessage(LB_INSERTSTRING, nIndex, (LONG_PTR)lpstrText);

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

void CXlistCtrl::AddPicItem | ( | short | nIndex,
 |  | LPPICTUREDISP | pic |
 | ) |  |  | [protected]

Definition at line 761 of file xlistctl.cpp.

{
  AddItem(nIndex, NULL, NULL, pic);
}

void CXlistCtrl::AddTextFontItem | ( | short | nIndex,
 |  | LPCTSTR | lpstrText,
 |  | LPFONTDISP | font |
 | ) |  |  | [protected]

Definition at line 752 of file xlistctl.cpp.

{
  AddItem(nIndex, lpstrText, font, NULL);
}

void CXlistCtrl::AddTextItem | ( | short | nIndex,
 |  | LPCTSTR | lpstrText |
 | ) |  |  | [protected]

Definition at line 743 of file xlistctl.cpp.

{
  AddItem(nIndex, lpstrText, NULL, NULL);
}

void CXlistCtrl::Clear ( ) [protected]

Definition at line 824 of file xlistctl.cpp.

{
  if (m_itemData.GetSize() > 0)
  {
    // For each item
    for (int i = 0; i < m_itemData.GetSize(); i++)
    {
      // Free item data
      delete m_itemData.GetAt( i );
    }

    // Remove all items from item array
    m_itemData.RemoveAll();

    // Remove all text from listbox
    SendMessage(LB_RESETCONTENT, 0, 0L);

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

CXlistCtrl::DECLARE_OLECREATE_EX ( CXlistCtrl ) [protected]
void CXlistCtrl::DoPropExchange ( CPropExchange * pPX ) [virtual]

Definition at line 446 of file xlistctl.cpp.

{
  ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
  COleControl::DoPropExchange(pPX);

  PX_Bool(pPX, _T("InvertFlag"), m_invertFlag, TRUE);
}

void CXlistCtrl::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [protected, virtual]

Definition at line 898 of file xlistctl.cpp.

{
  CItemData *pItemData;
  CDC *pdc;
  CPen* pOldPen;

  // Return if id is invalid
  if ( (lpDrawItemStruct->itemID == (UINT)-1) ||
     ((int)lpDrawItemStruct->itemID >= m_itemData.GetSize()))
    return;

  // Get item data
  pItemData = (CItemData *)m_itemData.GetAt(lpDrawItemStruct->itemID);

  // Construct CDC object for drawing
  pdc = CDC::FromHandle(lpDrawItemStruct->hDC);

  switch (lpDrawItemStruct->itemAction)
  {
    case ODA_DRAWENTIRE:

       // Brush item background and set background color
      SelectItemBackColor(pItemData, &lpDrawItemStruct->rcItem, pdc);

      // Draw item's picture
      DrawItemPicture(pItemData, &lpDrawItemStruct->rcItem, pdc);

      // Draw item's text
      DrawItemText(pItemData, &lpDrawItemStruct->rcItem, pdc);

      // Break if item is not selected
      if (lpDrawItemStruct->itemState != ODS_SELECTED)
        break;

    case ODA_SELECT:

      // If invert flag is set, invert item when selected
      if (m_invertFlag)
        pdc->InvertRect(&lpDrawItemStruct->rcItem);
      break;

    case ODA_FOCUS:

      // Draw focus rect when item gets the focus
      pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
      pdc->DrawFocusRect(&lpDrawItemStruct->rcItem);
      pdc->SelectObject(pOldPen);
      break;
  }
}

void CXlistCtrl::DrawItemPicture | ( | CItemData * | pItemData,
 |  | LPRECT | rect,
 |  | CDC * | pdc |
 | ) |  |  | [protected, virtual]

Definition at line 983 of file xlistctl.cpp.

{
  CPictureHolder *pPicHolder;
  LPPICTUREDISP pPicDisp;

  int picHeight;
  int picWidth;
  long tempPicHeight;
  long tempPicWidth;

  // Get item picture
  pPicHolder = pItemData->GetPicture();

  // Draw item picture
  if (pPicHolder)
  {
    // Get height and width of picture
    pPicDisp = pPicHolder->GetPictureDispatch();
    tempPicHeight = GetPictureHeight(pPicDisp);
    tempPicWidth = GetPictureWidth(pPicDisp);
    pPicDisp->Release();

    // Convert height and width to pixels
    picHeight = XformHeightInHimetricToPixels(pdc->m_hDC, (int)LOWORD(tempPicHeight));
    picWidth = XformWidthInHimetricToPixels(pdc->m_hDC, (int)LOWORD(tempPicWidth));

    // Set up draw rect
    lpRect->right = lpRect->left + picWidth;
    lpRect->bottom = lpRect->top + picHeight;

    // Center rect
    lpRect->top += LSTITEMSPACING/2;
    lpRect->bottom += LSTITEMSPACING/2;

    // Draw picture
    pPicHolder->Render(pdc, *lpRect, *lpRect);
  }
}

void CXlistCtrl::DrawItemText | ( | CItemData * | pItemData,
 |  | LPRECT | rect,
 |  | CDC * | pdc |
 | ) |  |  | [protected, virtual]

Definition at line 1027 of file xlistctl.cpp.

{
  TCHAR textBuffer[MAXTEXTLEN];
  LPTSTR lpTextBuffer = (LPTSTR)textBuffer;
  USHORT usLen;
  CFont* pOldFont;

  // Get item text
  pItemData->GetText(lpTextBuffer,
    sizeof(textBuffer)/sizeof(*textBuffer));

  // If item has text
  usLen = (USHORT)_tcslen(lpTextBuffer);
  if (usLen)
  {
    // Set item foreground color
    SelectItemForeColor(pItemData, pdc);

    // Select item font
    CFontHolder fontHolder(NULL);
    pOldFont = SelectItemFont(pItemData, pdc, fontHolder);

    // Draw text
    pdc->ExtTextOut(lpRect->left, lpRect->top, ETO_CLIPPED, lpRect, lpTextBuffer, usLen, NULL);

    // Reselect old font
    pdc->SelectObject(pOldFont);
  }
}

OLE_COLOR CXlistCtrl::GetItemBackColor ( short nIndex ) [protected]

Definition at line 526 of file xlistctl.cpp.

{
  OLE_COLOR *pColor;
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    pColor = pItemData->GetBackColor();
    if (pColor)
      return *pColor;
  }
  return (OLE_COLOR)-1;
}

LPFONTDISP CXlistCtrl::GetItemFont ( short nIndex ) [protected]

Definition at line 657 of file xlistctl.cpp.

{
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    CFontHolder *pFontHolder = pItemData->GetFont();
    if (pFontHolder)
      return pFontHolder->GetFontDispatch();
  }
  return NULL;
}

OLE_COLOR CXlistCtrl::GetItemForeColor ( short nIndex ) [protected]

Definition at line 570 of file xlistctl.cpp.

{
  OLE_COLOR *pColor;
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    pColor = pItemData->GetForeColor();
    if (pColor)
      return *pColor;
  }
  return (OLE_COLOR)-1;
}

LPPICTUREDISP CXlistCtrl::GetItemPicture ( short nIndex ) [protected]

Definition at line 700 of file xlistctl.cpp.

{
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    CPictureHolder *pPictureHolder = pItemData->GetPicture();
    if (pPictureHolder)
      return pPictureHolder->GetPictureDispatch();
  }
  return NULL;
}

int CXlistCtrl::GetItemPictureHeight ( CItemData * pItemData ) [protected, virtual]

Definition at line 1204 of file xlistctl.cpp.

{
  CPictureHolder *pPicHolder;
  LPPICTUREDISP pPicDisp;
  long tempPicHeight;
  HDC dc;
  int picHeight;

  // Get item picture
  pPicHolder = pItemData->GetPicture();

  // If item has picture
  if (pPicHolder)
  {
    // Get picture height
    pPicDisp = pPicHolder->GetPictureDispatch();
    tempPicHeight = GetPictureHeight(pPicDisp);
    pPicDisp->Release();

    // Convert height to pixels
    dc = ::GetDC(m_hWnd);
    picHeight = XformHeightInHimetricToPixels(dc, (int)LOWORD(tempPicHeight));
    ::ReleaseDC(m_hWnd, dc);
  }
  else
    picHeight = 0;

  return picHeight;
}

BSTR CXlistCtrl::GetItemText ( short nIndex ) [protected]

Definition at line 613 of file xlistctl.cpp.

{
  TCHAR textBuffer[MAXTEXTLEN];
  LPTSTR lpTextBuffer = (LPTSTR)textBuffer;

  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    pItemData->GetText(lpTextBuffer, sizeof(textBuffer)/sizeof(*textBuffer));

    CString s = lpTextBuffer;
    return s.AllocSysString();
  }
  return NULL;
}

int CXlistCtrl::GetItemTextHeight ( CItemData * pItemData ) [protected, virtual]

Definition at line 1158 of file xlistctl.cpp.

{
  TCHAR textBuffer[MAXTEXTLEN];
  LPTSTR lpTextBuffer = (LPTSTR)textBuffer;

  CFontHolder *pFontHolder;
  LPFONTDISP pFontDisp;
  int textHeight;

  // Get item text
  pItemData->GetText(lpTextBuffer,
    sizeof(textBuffer)/sizeof(*textBuffer));

  // If item has text
  if (_tcslen(lpTextBuffer) > 0)
  {
    // Get item font
    pFontHolder = pItemData->GetFont();

    if (pFontHolder)
    {
      // Get font dispatch ID
      pFontDisp = pFontHolder->GetFontDispatch();

      // Get font height using dispatch ID
      textHeight = GetFontHeight(pFontDisp);
      if (pFontDisp != NULL)
        pFontDisp->Release();

      textHeight += LSTITEMSPACING;
    }
    else
      //If item font is not specified, use default item height
      textHeight = m_itemDefHeight;
  }
  else
    textHeight = 0;

  return textHeight;
}

BOOL CXlistCtrl::IsSubclassedControl ( ) [protected]

Definition at line 490 of file xlistctl.cpp.

{
  return TRUE;
}

void CXlistCtrl::MeasureItem ( LPMEASUREITEMSTRUCT lpMI ) [protected, virtual]

Definition at line 1121 of file xlistctl.cpp.

{
  CItemData *pItemData;
  int textHeight;
  int picHeight;
  int tempHeight;

  // Return if id is invalid
  if ((lpMI->itemID == 0xffff) || ((int)lpMI->itemID >= m_itemData.GetSize()))
    return;

  pItemData = (CItemData *)m_itemData.GetAt(lpMI->itemID);

  // Get item's text height - zero if item has no text
  textHeight = GetItemTextHeight(pItemData);

  // Get item's picture height - zero if item has no picture
  picHeight = GetItemPictureHeight(pItemData);

  // Calculate item height using font height, picture height and spacing

  // tempHeight = max of textHeight and picHeight
  tempHeight = (textHeight > picHeight)  ? textHeight : picHeight;

  // if zero, set to default item height, else add item spacing
  tempHeight = (tempHeight == 0) ? m_itemDefHeight : tempHeight + LSTITEMSPACING;

  lpMI->itemHeight = tempHeight;
}

void CXlistCtrl::OnAmbientPropertyChange ( DISPID dispid ) [protected, virtual]

Definition at line 851 of file xlistctl.cpp.

{
  if (dispid == DISPID_AMBIENT_FONT)
  {
    // Update item default height
    UpdateDefHeight();

    // Update item positions
    UpdateItems();
  }
}

void CXlistCtrl::OnDraw | ( | CDC * | pdc,
 |  | const CRect & | rcBounds,
 |  | const CRect & | rcInvalid |
 | ) |  |  | [virtual]

Definition at line 410 of file xlistctl.cpp.

{
  LPRECT      lpr;
  CBrush      br;

  lpr = (LPRECT)(LPCRECT)rcBounds;

  // Paint background with the ambient background color
  br.CreateSolidBrush(TranslateColor(AmbientBackColor()));
  pdc->FillRect(lpr, &br);

  // Adjust rectangle size to account for listbox idiosyncracies
  // (it paints its own nonclient stuff during WM_PAINT)
  CRect rect(rcBounds);

  if (!pdc->IsKindOf(RUNTIME_CLASS(CPaintDC)))
  {
    if (m_bUIActive && m_pRectTracker != NULL)
    {
      UINT nAdjust = 2 * m_pRectTracker->m_nHandleSize;
      rect.right -= nAdjust;
      rect.bottom -= nAdjust;
    }

    if (m_bInPlaceActive && (GetStyle() & WS_VSCROLL))
      rect.right -= GetSystemMetrics(SM_CXVSCROLL);
  }

  DoSuperclassPaint(pdc, rect);
}

BOOL CXlistCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 867 of file xlistctl.cpp.

{
  return COleControl::OnEraseBkgnd(pDC);
}

void CXlistCtrl::OnInvertFlagChanged ( ) [protected]

Definition at line 516 of file xlistctl.cpp.

{
  SetModifiedFlag(TRUE);
  InvalidateControl();
}

LRESULT CXlistCtrl::OnOcmCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 499 of file xlistctl.cpp.

{
#ifdef _WIN32
  WORD wNotifyCode = HIWORD(wParam);
  lParam;
#else
  WORD wNotifyCode = HIWORD(lParam);
  wParam;
#endif
  wNotifyCode;
  return 0;
}

LRESULT CXlistCtrl::OnOcmDrawItem | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 887 of file xlistctl.cpp.

{
  DrawItem((LPDRAWITEMSTRUCT)lParam);

  return 1;
}

LRESULT CXlistCtrl::OnOcmMeasureItem | ( | WPARAM | wParam,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 1109 of file xlistctl.cpp.

{
  MeasureItem((LPMEASUREITEMSTRUCT)lParam);

  return 1;
}

void CXlistCtrl::OnResetState ( ) [virtual]

Definition at line 458 of file xlistctl.cpp.

{
  Clear();

  COleControl::OnResetState();  // Resets defaults found in DoPropExchange
}

void CXlistCtrl::OnSetClientSite ( ) [virtual]

Definition at line 876 of file xlistctl.cpp.

{
  COleControl::OnSetClientSite();

  UpdateDefHeight();
}

BOOL CXlistCtrl::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 394 of file xlistctl.cpp.

{
  if (pMsg->message == WM_KEYDOWN)
  {
    if (pMsg->wParam == VK_DOWN || pMsg->wParam == VK_UP)
    {
      SendMessage(pMsg->message, pMsg->wParam, pMsg->lParam);
      return TRUE;
    }
  }
  return FALSE;
}

void CXlistCtrl::RemoveItem ( short nIndex ) [protected]

Definition at line 802 of file xlistctl.cpp.

{
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    // Free item data
    delete m_itemData.GetAt(nIndex);

    // Remove item from item array
    m_itemData.RemoveAt(nIndex);

    // Remove item text from listbox
    SendMessage(LB_DELETESTRING, nIndex, 0L);

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

void CXlistCtrl::SelectItemBackColor | ( | CItemData * | pItemData,
 |  | LPRECT | rect,
 |  | CDC * | pdc |
 | ) |  |  | [protected, virtual]

Definition at line 954 of file xlistctl.cpp.

{
  OLE_COLOR color;
  OLE_COLOR *pColor;

  // Get item background color
  pColor = pItemData->GetBackColor();

  // If background color is not specified, use ambient background color
  if (!pColor)
  {
    color = AmbientBackColor();
    pColor = (OLE_COLOR *)&color;
  }

  // Brush background
  CBrush brush;
  brush.CreateSolidBrush(TranslateColor(*pColor));
  pdc->FillRect(lpRect, &brush);

  // Set background color
  pdc->SetBkMode(TRANSPARENT);
}

CFont * CXlistCtrl::SelectItemFont | ( | CItemData * | pItemData,
 |  | CDC * | pdc,
 |  | CFontHolder & | fontHolder |
 | ) |  |  | [protected, virtual]

Definition at line 1081 of file xlistctl.cpp.

{
  CFontHolder *pFontHolder;
  CFont* pOldFont;
  LPFONTDISP pFontDisp;

  // Get item font
  pFontHolder = pItemData->GetFont();

  // If font is not specified, use ambient font
  if (!pFontHolder)
  {
    pFontHolder = &fontHolder;
    pFontDisp = AmbientFont();
    pFontHolder->InitializeFont(NULL, pFontDisp);
    if (pFontDisp != NULL)
      pFontDisp->Release();
  }

  pOldFont = SelectFontObject(pdc, *pFontHolder);
  return pOldFont;
}

void CXlistCtrl::SelectItemForeColor | ( | CItemData * | pItemData,
 |  | CDC * | pdc |
 | ) |  |  | [protected, virtual]

Definition at line 1061 of file xlistctl.cpp.

{
  OLE_COLOR color;
  OLE_COLOR *pColor;

  // Get item foreground color
  pColor = pItemData->GetForeColor();
  if (!pColor)
  {
    // If foreground color is not specified, use ambient foreground color
    color = AmbientForeColor();
    pColor = (OLE_COLOR *)&color;
  }
  pdc->SetTextColor(TranslateColor(*pColor));
}

void CXlistCtrl::SetItemBackColor | ( | short | nIndex,
 |  | OLE_COLOR | newValue |
 | ) |  |  | [protected]

Definition at line 543 of file xlistctl.cpp.

{
  OLE_COLOR *pColor;
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    newValue == -1 ? pColor = NULL : pColor = &newValue;

    TRY
    {
      pItemData->SetBackColor(pColor);
    }
    CATCH(CMemoryException, e)
    {
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    }
    END_CATCH

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

void CXlistCtrl::SetItemFont | ( | short | nIndex,
 |  | LPFONTDISP | newValue |
 | ) |  |  | [protected]

Definition at line 673 of file xlistctl.cpp.

{
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    TRY
    {
      pItemData->SetFont(newValue);
    }
    CATCH (CMemoryException, e)
    {
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    }
    END_CATCH

    // Update item positions because font size may have changed
    UpdateItems();

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

void CXlistCtrl::SetItemForeColor | ( | short | nIndex,
 |  | OLE_COLOR | newValue |
 | ) |  |  | [protected]

Definition at line 587 of file xlistctl.cpp.

{
  OLE_COLOR *pColor;
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    newValue == -1 ? pColor = NULL : pColor = &newValue;
    TRY
    {
      pItemData->SetForeColor(pColor);
    }
    CATCH (CMemoryException, e)
    {
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    }
    END_CATCH

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

void CXlistCtrl::SetItemPicture | ( | short | nIndex,
 |  | LPPICTUREDISP | newValue |
 | ) |  |  | [protected]

Definition at line 716 of file xlistctl.cpp.

{
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    TRY
    {
      pItemData->SetPicture(newValue);
    }
    CATCH (CMemoryException, e)
    {
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    }
    END_CATCH

    // Update item positions because picture size may have changed
    UpdateItems();

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

void CXlistCtrl::SetItemText | ( | short | nIndex,
 |  | LPCTSTR | lpszNewValue |
 | ) |  |  | [protected]

Definition at line 633 of file xlistctl.cpp.

{
  if ((int)nIndex <= m_itemData.GetSize() - 1)
  {
    CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
    TRY
    {
      pItemData->SetText(lpszNewValue);
    }
    CATCH (CMemoryException, e)
    {
      ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
    }
    END_CATCH

    SetModifiedFlag(TRUE);
    InvalidateControl();
  }
}

void CXlistCtrl::UpdateDefHeight ( ) [protected, virtual]

Definition at line 1265 of file xlistctl.cpp.

{
  CFontHolder fontHolder(NULL);
  LPFONTDISP pFontDisp;

  // Get height of ambient font
  pFontDisp = AmbientFont();

  if (pFontDisp != NULL)
  {
    m_itemDefHeight = GetFontHeight(pFontDisp);
    pFontDisp->Release();
  }
  if (m_itemDefHeight == 0)
  {
    // Initialize with default font
    fontHolder.InitializeFont(NULL, NULL);
    pFontDisp = fontHolder.GetFontDispatch();
    m_itemDefHeight = GetFontHeight(pFontDisp);
    pFontDisp->Release();
  }

  m_itemDefHeight += LSTITEMSPACING;
}

void CXlistCtrl::UpdateItems ( ) [protected, virtual]

Definition at line 1238 of file xlistctl.cpp.

{
  CItemData *pItemData;
  TCHAR textBuffer[MAXTEXTLEN];
  LPTSTR lpTextBuffer = (LPTSTR)textBuffer;

  if (m_itemData.GetSize() > 0)
  {
    // Delete items
    SendMessage(LB_RESETCONTENT, 0, 0L);

    // Readd items
    for (int i = 0; i < m_itemData.GetSize(); i++)
    {
      pItemData = (CItemData *)m_itemData.GetAt(i);
      pItemData->GetText(lpTextBuffer, sizeof(textBuffer)/sizeof(*textBuffer));

      // Add item text to listbox
      SendMessage(LB_INSERTSTRING, i, (LONG_PTR)lpTextBuffer);
    }
  }
}

Member Data Documentation

BOOL CXlistCtrl::m_invertFlag [protected]

Definition at line 121 of file xlistctl.h.

CObArray CXlistCtrl::m_itemData [protected]

Definition at line 168 of file xlistctl.h.

short CXlistCtrl::m_itemDefHeight [protected]

Definition at line 169 of file xlistctl.h.

The documentation for this class was generated from the following files:
  • controls/xlist/xlistctl.h
  • controls/xlist/xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CXlistPropPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CXlistPropPage Class Reference

#include "xlistppg.h"

List of all members.

Public Types

enum | { IDD = IDD_PROPPAGE_XLIST }

Public Member Functions

CXlistPropPage ()

Public Attributes

BOOL | m_InvertFlag

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 16 of file xlistppg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 27 of file xlistppg.h.

{ IDD = IDD_PROPPAGE_XLIST };

Constructor & Destructor Documentation

CXlistPropPage::CXlistPropPage ( )

Definition at line 59 of file xlistppg.cpp.

                               :
  COlePropertyPage(IDD, IDS_XLIST_PPG_CAPTION)
{
  //{{AFX_DATA_INIT(CXlistPropPage)
  m_InvertFlag = FALSE;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CXlistPropPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 71 of file xlistppg.cpp.

{
  //{{AFX_DATA_MAP(CXlistPropPage)
  DDP_Check(pDX, IDC_INVERTCHECK, m_InvertFlag, _T("InvertFlag"));
  DDX_Check(pDX, IDC_INVERTCHECK, m_InvertFlag);
  //}}AFX_DATA_MAP
  DDP_PostProcessing(pDX);
}

Member Data Documentation

BOOL CXlistPropPage::m_InvertFlag

Definition at line 28 of file xlistppg.h.

The documentation for this class was generated from the following files:
  • controls/xlist/xlistppg.h
  • controls/xlist/xlistppg.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CZoomDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Public Attributes | Protected Member Functions

CZoomDlg Class Reference

#include "zoomdlg.h"

List of all members.

Public Types

enum | { IDD = IDD_CUSTZOOM }

Public Member Functions

CZoomDlg (CWnd *pParent=NULL)

Public Attributes

int | m_zoomX
int | m_zoomY

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Detailed Description

Definition at line 15 of file zoomdlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
IDD

Definition at line 23 of file zoomdlg.h.

{ IDD = IDD_CUSTZOOM };

Constructor & Destructor Documentation

CZoomDlg::CZoomDlg ( CWnd * pParent = NULL )

Definition at line 25 of file zoomdlg.cpp.

  : CDialog(CZoomDlg::IDD, pParent)
{
  //{{AFX_DATA_INIT(CZoomDlg)
  m_zoomX = 0;
  m_zoomY = 0;
  //}}AFX_DATA_INIT
}

Member Function Documentation

void CZoomDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 34 of file zoomdlg.cpp.

{
  CDialog::DoDataExchange(pDX);
  //{{AFX_DATA_MAP(CZoomDlg)
  DDX_Text(pDX, IDC_EDIT1, m_zoomX);
  DDV_MinMaxInt(pDX, m_zoomX, 10, 500);
  DDX_Text(pDX, IDC_EDIT2, m_zoomY);
  DDV_MinMaxInt(pDX, m_zoomY, 10, 500);
  //}}AFX_DATA_MAP
}

Member Data Documentation

int CZoomDlg::m_zoomX

Definition at line 24 of file zoomdlg.h.

int CZoomDlg::m_zoomY

Definition at line 25 of file zoomdlg.h.

The documentation for this class was generated from the following files:
  • ole/hiersvr/zoomdlg.h
  • ole/hiersvr/zoomdlg.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: DICTENTRY Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

DICTENTRY Struct Reference

List of all members.

Public Attributes

DICTENTRYHEADER hdr
char sz [256]

Detailed Description

Definition at line 1128 of file propset.cpp.

Member Data Documentation

DICTENTRYHEADER DICTENTRY::hdr

Definition at line 1130 of file propset.cpp.

char DICTENTRY::sz

Definition at line 1131 of file propset.cpp.

The documentation for this struct was generated from the following files:
  • ole/drawcli/propset.cpp
  • vc2008fp/DrawClient/propset.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: DICTENTRYHEADER Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

DICTENTRYHEADER Struct Reference

List of all members.

Public Attributes

DWORD | cb
DWORD | dwPropID

Detailed Description

Definition at line 1122 of file propset.cpp.

Member Data Documentation

DWORD DICTENTRYHEADER::cb

Definition at line 1125 of file propset.cpp.

DWORD DICTENTRYHEADER::dwPropID

Definition at line 1124 of file propset.cpp.

The documentation for this struct was generated from the following files:
  • ole/drawcli/propset.cpp
  • vc2008fp/DrawClient/propset.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: DocType Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

DocType Struct Reference

#include "doctype.h"

List of all members.

Public Member Functions

CString | GetString (int nID)
CString | GetString (int nID)

Public Attributes

BOOL | bDup
BOOL | bRead
BOOL | bWrite
int | idStr
int | nID
LPCSTR | pszConverterName

Detailed Description

Definition at line 30 of file doctype.h.

Member Function Documentation

CString DocType::GetString ( int nID )

Definition at line 49 of file doctype.cpp.

{
  ASSERT(idStr != NULL);
  CString str;
  VERIFY(str.LoadString(idStr));
  CString strSub;
  AfxExtractSubString(strSub, str, nID);
  return strSub;
}

CString DocType::GetString ( int nID )

Member Data Documentation

BOOL DocType::bDup

Definition at line 37 of file doctype.h.

BOOL DocType::bRead

Definition at line 35 of file doctype.h.

BOOL DocType::bWrite

Definition at line 36 of file doctype.h.

int DocType::idStr

Definition at line 34 of file doctype.h.

int DocType::nID

Definition at line 33 of file doctype.h.

LPCSTR DocType::pszConverterName

Definition at line 38 of file doctype.h.

The documentation for this struct was generated from the following files:
  • ole/wordpad/doctype.h
  • vc2008fp/WordPad/doctype.h
  • ole/wordpad/doctype.cpp
  • vc2008fp/WordPad/doctype.cpp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: DrawClientHandlersLib::DrawCliLiveIconsHandler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • DrawClientHandlersLib
  • DrawClientHandlersLib::DrawCliLiveIconsHandler

DrawClientHandlersLib::DrawCliLiveIconsHandler Class Reference

import "DrawClientHandlers.idl";

Detailed Description

Definition at line 38 of file DrawClientHandlers.idl.

The documentation for this class was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.idl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: DrawClientHandlersLib::DrawCliSearchHandler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • DrawClientHandlersLib
  • DrawClientHandlersLib::DrawCliSearchHandler

DrawClientHandlersLib::DrawCliSearchHandler Class Reference

import "DrawClientHandlers.idl";

Detailed Description

Definition at line 46 of file DrawClientHandlers.idl.

The documentation for this class was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.idl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: DynaMenuDef Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

DynaMenuDef Struct Reference

#include "dmdoc.h"

List of all members.

Public Attributes

COLORREF m_crf
UINT m_nID
UINT m_nString

Detailed Description

Definition at line 38 of file dmdoc.h.

Member Data Documentation

COLORREF DynaMenuDef::m_crf

Definition at line 41 of file dmdoc.h.

UINT DynaMenuDef::m_nID

Definition at line 40 of file dmdoc.h.

UINT DynaMenuDef::m_nString

Definition at line 39 of file dmdoc.h.

The documentation for this struct was generated from the following file:
  • general/dynamenu/dmdoc.h
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: IDrawCliLiveIconsHandler Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IDrawCliLiveIconsHandler Interface Reference

import "DrawClientHandlers.idl";

Detailed Description

Definition at line 16 of file DrawClientHandlers.idl.

The documentation for this interface was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.idl
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: IDrawCliSearchHandler Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IDrawCliSearchHandler Interface Reference

import "DrawClientHandlers.idl";

Detailed Description

Definition at line 24 of file DrawClientHandlers.idl.

The documentation for this interface was generated from the following file:
  • vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.idl
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: IMAGELib::_DImage Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • IMAGELib
  • IMAGELib::_DImage
Properties

IMAGELib::_DImage Interface Reference

List of all members.

Properties

AutoSize | id
AboutBox | id

Detailed Description

Definition at line 21 of file image.odl.

Property Documentation

AutoSize IMAGELib::_DImage::id
AboutBox IMAGELib::_DImage::id
The documentation for this interface was generated from the following file:
  • controls/IMAGE/image.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: IMAGELib::_DImageEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • IMAGELib
  • IMAGELib::_DImageEvents
Public Member Functions

IMAGELib::_DImageEvents Interface Reference

List of all members.

Public Member Functions

void ReadyStateChange ()

Detailed Description

Definition at line 45 of file image.odl.

Member Function Documentation

void IMAGELib::_DImageEvents::ReadyStateChange ( )
The documentation for this interface was generated from the following file:
  • controls/IMAGE/image.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: IMAGELib::Image Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • IMAGELib
  • IMAGELib::Image

IMAGELib::Image Class Reference

Detailed Description

Definition at line 62 of file image.odl.

The documentation for this class was generated from the following file:
  • controls/IMAGE/image.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: inproc::CStringCollect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • inproc
  • inproc::CStringCollect

inproc::CStringCollect Class Reference

Detailed Description

Definition at line 82 of file inproc.odl.

The documentation for this class was generated from the following file:
  • ole/inproc/inproc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: inproc::CVariantAssoc Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • inproc
  • inproc::CVariantAssoc

inproc::CVariantAssoc Class Reference

Detailed Description

Definition at line 109 of file inproc.odl.

The documentation for this class was generated from the following file:
  • ole/inproc/inproc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: inproc::CVariantMap Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • inproc
  • inproc::CVariantMap

inproc::CVariantMap Class Reference

Detailed Description

Definition at line 50 of file inproc.odl.

The documentation for this class was generated from the following file:
  • ole/inproc/inproc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: inproc::IStringCollect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • inproc
  • inproc::IStringCollect
Properties

inproc::IStringCollect Interface Reference

List of all members.

Properties

BSTR | Add
BSTR | Find
long | id
BSTR | Item (long nIndex) [set]
VARIANT | Remove
RemoveAll

Detailed Description

Definition at line 57 of file inproc.odl.

Property Documentation

BSTR inproc::IStringCollect::Add
BSTR inproc::IStringCollect::Find
long inproc::IStringCollect::id
BSTR inproc::IStringCollect::Item( long nIndex) [set]
VARIANT inproc::IStringCollect::Remove
inproc::IStringCollect::RemoveAll
The documentation for this interface was generated from the following file:
  • ole/inproc/inproc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: inproc::IVariantAssoc Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • inproc
  • inproc::IVariantAssoc
Properties

inproc::IVariantAssoc Interface Reference

List of all members.

Properties

Value id

Detailed Description

Definition at line 89 of file inproc.odl.

Property Documentation

Value inproc::IVariantAssoc::id
The documentation for this interface was generated from the following file:
  • ole/inproc/inproc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: inproc::IVariantMap Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • inproc
  • inproc::IVariantMap
Properties

inproc::IVariantMap Interface Reference

List of all members.

Properties

str2 | id
i2 | id
VARIANT | id (VARIANT from)
IsEmpty
VARIANT | Item [get]
RemoveAll
VARIANT | RemoveKey

Detailed Description

Definition at line 22 of file inproc.odl.

Property Documentation

str2 inproc::IVariantMap::id
i2 inproc::IVariantMap::id
VARIANT inproc::IVariantMap::id( VARIANT from)
inproc::IVariantMap::IsEmpty
VARIANT inproc::IVariantMap::Item [get]
inproc::IVariantMap::RemoveAll
VARIANT inproc::IVariantMap::RemoveKey
The documentation for this interface was generated from the following file:
  • ole/inproc/inproc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: INVOKEKIND_ENTRY Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

INVOKEKIND_ENTRY Class Reference

List of all members.

Public Attributes

INVOKEKIND | invokekind
LPCTSTR | pszName

Detailed Description

Definition at line 19 of file VarUtils.Cpp.

Member Data Documentation

INVOKEKIND INVOKEKIND_ENTRY::invokekind

Definition at line 23 of file VarUtils.Cpp.

LPCTSTR INVOKEKIND_ENTRY::pszName

Definition at line 22 of file VarUtils.Cpp.

The documentation for this class was generated from the following file:
  • ole/TstCon/VarUtils.Cpp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LicensedLib::_DLicensed Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LicensedLib
  • LicensedLib::_DLicensed
Public Member Functions

LicensedLib::_DLicensed Interface Reference

List of all members.

Public Member Functions

void AboutBox ()

Detailed Description

Definition at line 29 of file licensed.odl.

Member Function Documentation

void LicensedLib::_DLicensed::AboutBox ( )
The documentation for this interface was generated from the following file:
  • controls/licensed/licensed.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LicensedLib::_DLicensedEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LicensedLib
  • LicensedLib::_DLicensedEvents

LicensedLib::_DLicensedEvents Interface Reference

Detailed Description

Definition at line 50 of file licensed.odl.

The documentation for this interface was generated from the following file:
  • controls/licensed/licensed.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LicensedLib::Licensed Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LicensedLib
  • LicensedLib::Licensed

LicensedLib::Licensed Class Reference

Detailed Description

Definition at line 66 of file licensed.odl.

The documentation for this class was generated from the following file:
  • controls/licensed/licensed.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LocalizeLib::_DLocalize Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LocalizeLib
  • LocalizeLib::_DLocalize
Public Member Functions | Properties

LocalizeLib::_DLocalize Interface Reference

List of all members.

Public Member Functions

void | AboutBox ()
void | AboutBoxInFrench ()
void | AboutBoxInGerman ()

Properties

CaptionInGerman | id (bindable)
Caption | id (bindable)
CaptionInFrench | id (bindable)

Detailed Description

Definition at line 30 of file localide.odl.

Member Function Documentation

void LocalizeLib::_DLocalize::AboutBox ( )
void LocalizeLib::_DLocalize::AboutBoxInFrench ( )
void LocalizeLib::_DLocalize::AboutBoxInGerman ( )

Property Documentation

CaptionInGerman LocalizeLib::_DLocalize::id( bindable)
Caption LocalizeLib::_DLocalize::id( bindable)
CaptionInFrench LocalizeLib::_DLocalize::id( bindable)
The documentation for this interface was generated from the following files:
  • controls/localize/localide.odl
  • controls/localize/localifr.odl
  • controls/localize/localize.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LocalizeLib::_DLocalizeEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LocalizeLib
  • LocalizeLib::_DLocalizeEvents
Public Member Functions

LocalizeLib::_DLocalizeEvents Interface Reference

List of all members.

Public Member Functions

void | Click ()
void | ClickInFrench ()
void | ClickInGerman ()

Detailed Description

Definition at line 53 of file localide.odl.

Member Function Documentation

void LocalizeLib::_DLocalizeEvents::Click ( )
void LocalizeLib::_DLocalizeEvents::ClickInFrench ( )
void LocalizeLib::_DLocalizeEvents::ClickInGerman ( )
The documentation for this interface was generated from the following files:
  • controls/localize/localide.odl
  • controls/localize/localifr.odl
  • controls/localize/localize.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LocalizeLib::Localize Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LocalizeLib
  • LocalizeLib::Localize

LocalizeLib::Localize Class Reference

Detailed Description

Definition at line 70 of file localide.odl.

The documentation for this class was generated from the following file:
  • controls/localize/localide.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: mfccalc::CCCalcDlg Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • mfccalc
  • mfccalc::CCCalcDlg

mfccalc::CCCalcDlg Class Reference

Detailed Description

Definition at line 43 of file mfccalc.odl.

The documentation for this class was generated from the following file:
  • ole/mfccalc/mfccalc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: mfccalc::ICalcDlg Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • mfccalc
  • mfccalc::ICalcDlg
Public Member Functions | Properties

mfccalc::ICalcDlg Interface Reference

List of all members.

Public Member Functions

boolean | Button (BSTR szButton)
void | Clear ()
void | Close ()
void | Display ()
boolean | Evaluate ()

Properties

Operand | id
Visible | id

Detailed Description

Definition at line 15 of file mfccalc.odl.

Member Function Documentation

boolean mfccalc::ICalcDlg::Button ( BSTR szButton )
void mfccalc::ICalcDlg::Clear ( )
void mfccalc::ICalcDlg::Close ( )
void mfccalc::ICalcDlg::Display ( )
boolean mfccalc::ICalcDlg::Evaluate ( )

Property Documentation

Operand mfccalc::ICalcDlg::id
Visible mfccalc::ICalcDlg::id
The documentation for this interface was generated from the following file:
  • ole/mfccalc/mfccalc.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: MSOfficeDemoKey Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

MSOfficeDemoKey Struct Reference

#include "keys.h"

List of all members.

Public Attributes

LPTSTR lpszKey
UINT uiCmd

Detailed Description

Definition at line 14 of file keys.h.

Member Data Documentation

LPTSTR MSOfficeDemoKey::lpszKey

Definition at line 17 of file keys.h.

UINT MSOfficeDemoKey::uiCmd

Definition at line 16 of file keys.h.

The documentation for this struct was generated from the following file:
  • vc2008fp/MSOffice2007Demo/keys.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: NewControlsPropSheet Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Protected Member Functions

NewControlsPropSheet Class Reference

#include "NewControlsPropSheet.h"

List of all members.

Public Member Functions

NewControlsPropSheet (CWnd *pParentWnd=NULL)
virtual | ~NewControlsPropSheet ()
virtual BOOL | OnInitDialog ()

Public Attributes

HICON | m_hIcon
CPage1 m_Page1
CPage2 m_Page2
CPage3 m_Page3
CPage4 m_Page4
CPage5 m_Page5
CPage6 m_Page6

Protected Member Functions

afx_msg HCURSOR | OnQueryDragIcon ()
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)

Detailed Description

Definition at line 22 of file NewControlsPropSheet.h.

Constructor & Destructor Documentation

NewControlsPropSheet::NewControlsPropSheet ( CWnd * pParentWnd = NULL )

Definition at line 25 of file NewControlsPropSheet.cpp.

:CMFCPropertySheet(IDS_CAPTION, pParentWnd)
{
  BOOL b32BitIcons = TRUE;

  if (afxGlobalData.m_nBitsPerPixel < 16)
  {
    b32BitIcons = FALSE;
  }

  SetLook(CMFCPropertySheet::PropSheetLook_OutlookBar);
  SetIconsList(b32BitIcons ? IDB_ICONS32 : IDB_ICONS, 32);

  AddPage(&m_Page1);
  AddPage(&m_Page2);
  AddPage(&m_Page3);
  AddPage(&m_Page4);
  AddPage(&m_Page5);
  AddPage(&m_Page6);

  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

NewControlsPropSheet::~NewControlsPropSheet ( ) [virtual]

Definition at line 48 of file NewControlsPropSheet.cpp.

{
}

Member Function Documentation

BOOL NewControlsPropSheet::OnInitDialog ( ) [virtual]

Definition at line 60 of file NewControlsPropSheet.cpp.

{
  BOOL bResult = CMFCPropertySheet::OnInitDialog();

  // Add "About..." menu item to system menu.

  // IDM_ABOUTBOX must be in the system command range.
  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
  ASSERT(IDM_ABOUTBOX < 0xF000);

  CMenu* pSysMenu = GetSystemMenu(FALSE);
  if (pSysMenu != NULL)
  {
    BOOL bValidString;
    CString strAboutMenu;
    bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
  }

  // Set the icon for this dialog.  The framework does this automatically
  //  when the application's main window is not a dialog
  SetIcon(m_hIcon, TRUE); // Set big icon
  SetIcon(m_hIcon, FALSE); // Set small icon

  return bResult;
}

HCURSOR NewControlsPropSheet::OnQueryDragIcon ( ) [protected]

Definition at line 91 of file NewControlsPropSheet.cpp.

{
  return(HCURSOR) m_hIcon;
}

void NewControlsPropSheet::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam |
 | ) |  |  | [protected]

Definition at line 96 of file NewControlsPropSheet.cpp.

{
  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
  {
    CAboutDlg aboutDlg;
    aboutDlg.DoModal();
  }
  else
  {
    CMFCPropertySheet::OnSysCommand(nID, lParam);
  }
}

Member Data Documentation

HICON NewControlsPropSheet::m_hIcon

Definition at line 39 of file NewControlsPropSheet.h.

CPage1 NewControlsPropSheet::m_Page1

Definition at line 32 of file NewControlsPropSheet.h.

CPage2 NewControlsPropSheet::m_Page2

Definition at line 33 of file NewControlsPropSheet.h.

CPage3 NewControlsPropSheet::m_Page3

Definition at line 34 of file NewControlsPropSheet.h.

CPage4 NewControlsPropSheet::m_Page4

Definition at line 35 of file NewControlsPropSheet.h.

CPage5 NewControlsPropSheet::m_Page5

Definition at line 36 of file NewControlsPropSheet.h.

CPage6 NewControlsPropSheet::m_Page6

Definition at line 37 of file NewControlsPropSheet.h.

The documentation for this class was generated from the following files:
  • vc2008fp/NewControls/NewControlsPropSheet.h
  • vc2008fp/NewControls/NewControlsPropSheet.cpp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: notif_tag Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

notif_tag Struct Reference

#include "notifwdw.h"

List of all members.

Public Attributes

UINT nCode
TCHAR sztCodeName [30]

Detailed Description

Definition at line 19 of file notifwdw.h.

Member Data Documentation

UINT notif_tag::nCode

Definition at line 21 of file notifwdw.h.

TCHAR notif_tag::sztCodeName

Definition at line 22 of file notifwdw.h.

The documentation for this struct was generated from the following files:
  • general/CmnCtrl1/notifwdw.h
  • general/CmnCtrl2/notifwdw.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PalLib::_DPal Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PalLib
  • PalLib::_DPal
Public Member Functions | Properties

PalLib::_DPal Interface Reference

List of all members.

Public Member Functions

void | AboutBox ()
OLE_COLOR | Entry (short nIndex)
void | Entry (short nIndex, OLE_COLOR newValue)

Properties

Picture | id

Detailed Description

Definition at line 29 of file pal.odl.

Member Function Documentation

void PalLib::_DPal::AboutBox ( )
OLE_COLOR PalLib::_DPal::Entry ( short nIndex ) [get]
void PalLib::_DPal::Entry | ( | short | nIndex,
 |  | OLE_COLOR | newValue |
 | ) |  |  | [set]

Property Documentation

Picture PalLib::_DPal::id
The documentation for this interface was generated from the following file:
  • controls/pal/pal.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PalLib::_DPalEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PalLib
  • PalLib::_DPalEvents

PalLib::_DPalEvents Interface Reference

Detailed Description

Definition at line 54 of file pal.odl.

The documentation for this interface was generated from the following file:
  • controls/pal/pal.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PalLib::Pal Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PalLib
  • PalLib::Pal

PalLib::Pal Class Reference

Detailed Description

Definition at line 70 of file pal.odl.

The documentation for this class was generated from the following file:
  • controls/pal/pal.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PushLib::_DPush Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PushLib
  • PushLib::_DPush
Properties

PushLib::_DPush Interface Reference

List of all members.

Properties

Caption | id (bindable)
AboutBox | id

Detailed Description

Definition at line 29 of file push.odl.

Property Documentation

Caption PushLib::_DPush::id( bindable)
AboutBox PushLib::_DPush::id
The documentation for this interface was generated from the following file:
  • controls/push/push.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PushLib::_DPushEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PushLib
  • PushLib::_DPushEvents
Public Member Functions

PushLib::_DPushEvents Interface Reference

List of all members.

Public Member Functions

void CustomClick (BSTR lpstrCaption, short cchCaption)

Detailed Description

Definition at line 53 of file push.odl.

Member Function Documentation

void PushLib::_DPushEvents::CustomClick | ( | BSTR | lpstrCaption,
 |  | short | cchCaption
 | ) |  |
The documentation for this interface was generated from the following file:
  • controls/push/push.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PushLib::Push Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PushLib
  • PushLib::Push

PushLib::Push Class Reference

Detailed Description

Definition at line 70 of file push.odl.

The documentation for this class was generated from the following file:
  • controls/push/push.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: QAAMBIENTENTRY Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

QAAMBIENTENTRY Class Reference

List of all members.

Public Attributes

DISPID | dispid
DWORD | dwQAFlag

Detailed Description

Definition at line 388 of file TCItem.Cpp.

Member Data Documentation

DISPID QAAMBIENTENTRY::dispid

Definition at line 391 of file TCItem.Cpp.

DWORD QAAMBIENTENTRY::dwQAFlag

Definition at line 392 of file TCItem.Cpp.

The documentation for this class was generated from the following file:
  • ole/TstCon/TCItem.Cpp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: SHAPE_COLOR Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

SHAPE_COLOR Struct Reference

#include "shapeobj.h"

List of all members.

Public Member Functions

operator COLORREF () const
operator int () const
const SHAPE_COLOR & | operator= (int n)
const SHAPE_COLOR & | operator= (COLORREF colorref)

Public Attributes

SHAPE_COLOR_ENUM e

Detailed Description

Definition at line 27 of file shapeobj.h.

Member Function Documentation

SHAPE_COLOR::operator COLORREF ( ) const

Definition at line 89 of file shapeobj.cpp.

{
  switch (e)
  {
    case black: return RGB(0,0,0);
    case red: return RGB(255,0,0);
    case green: return RGB(0,255,0);
    case blue: return RGB(0,0,255);
  }
  ASSERT(FALSE);
  return 0;
}

SHAPE_COLOR::operator int ( ) const

Definition at line 116 of file shapeobj.cpp.

{
  return (int)e;
};

const SHAPE_COLOR & SHAPE_COLOR::operator= ( int n )

Definition at line 121 of file shapeobj.cpp.

{
  e = (SHAPE_COLOR_ENUM)n;
  return *this;
};

const SHAPE_COLOR & SHAPE_COLOR::operator= ( COLORREF colorref )

Definition at line 102 of file shapeobj.cpp.

{
  switch (colorref)
  {
    case RGB(0,0,0): e = black; break;
    case RGB(255,0,0): e =  red; break;
    case RGB(0,255,0): e = green; break;
    case RGB(0,0,255): e = blue; break;
  }
  ASSERT(FALSE);
  e = black;
  return *this;
}

Member Data Documentation

SHAPE_COLOR_ENUM SHAPE_COLOR::e

Definition at line 29 of file shapeobj.h.

The documentation for this struct was generated from the following files:
  • general/propdlg/shapeobj.h
  • general/propdlg/shapeobj.cpp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: SpindialLib::_DSpindial Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • SpindialLib
  • SpindialLib::_DSpindial
Properties

SpindialLib::_DSpindial Interface Reference

List of all members.

Properties

AboutBox id

Detailed Description

Definition at line 29 of file spindial.odl.

Property Documentation

AboutBox SpindialLib::_DSpindial::id
The documentation for this interface was generated from the following file:
  • controls/spindial/spindial.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: SpindialLib::_DSpindialEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • SpindialLib
  • SpindialLib::_DSpindialEvents
Public Member Functions

SpindialLib::_DSpindialEvents Interface Reference

List of all members.

Public Member Functions

void SpinPositive ()

Detailed Description

Definition at line 51 of file spindial.odl.

Member Function Documentation

void SpindialLib::_DSpindialEvents::SpinPositive ( )
The documentation for this interface was generated from the following file:
  • controls/spindial/spindial.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: SpindialLib::Spindial Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • SpindialLib
  • SpindialLib::Spindial

SpindialLib::Spindial Class Reference

Detailed Description

Definition at line 68 of file spindial.odl.

The documentation for this class was generated from the following file:
  • controls/spindial/spindial.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagABSTIME Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagABSTIME Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

UINT ms
DWORD sec

Detailed Description

Definition at line 1631 of file penwin.h.

Member Data Documentation

UINT tagABSTIME::ms

Definition at line 1634 of file penwin.h.

DWORD tagABSTIME::sec

Definition at line 1633 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagANIMATEINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagANIMATEINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwReserved
UINT fuFlags
LPARAM | lParam
UINT uPeriodCB
UINT uSpeedPct

Detailed Description

Definition at line 1755 of file penwin.h.

Member Data Documentation

DWORD tagANIMATEINFO::cbSize

Definition at line 1757 of file penwin.h.

DWORD tagANIMATEINFO::dwReserved

Definition at line 1762 of file penwin.h.

UINT tagANIMATEINFO::fuFlags

Definition at line 1760 of file penwin.h.

LPARAM tagANIMATEINFO::lParam

Definition at line 1761 of file penwin.h.

UINT tagANIMATEINFO::uPeriodCB

Definition at line 1759 of file penwin.h.

UINT tagANIMATEINFO::uSpeedPct

Definition at line 1758 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagBOXEDITINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagBOXEDITINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

BOXLAYOUT boxlayout
int | cxBase
int | cxBox
int | cyBase
int | cyBox
int | cyMid
UINT | rgwReserved [8]
BYTE | szFaceName [BEI_FACESIZE]
UINT wFlags
UINT wFontHeight

Detailed Description

Definition at line 1685 of file penwin.h.

Member Data Documentation

BOXLAYOUT tagBOXEDITINFO::boxlayout

Definition at line 1692 of file penwin.h.

int tagBOXEDITINFO::cxBase

Definition at line 1689 of file penwin.h.

int tagBOXEDITINFO::cxBox

Definition at line 1687 of file penwin.h.

int tagBOXEDITINFO::cyBase

Definition at line 1690 of file penwin.h.

int tagBOXEDITINFO::cyBox

Definition at line 1688 of file penwin.h.

int tagBOXEDITINFO::cyMid

Definition at line 1691 of file penwin.h.

UINT tagBOXEDITINFO::rgwReserved[8]

Definition at line 1696 of file penwin.h.

BYTE tagBOXEDITINFO::szFaceName[BEI_FACESIZE]

Definition at line 1694 of file penwin.h.

UINT tagBOXEDITINFO::wFlags

Definition at line 1693 of file penwin.h.

UINT tagBOXEDITINFO::wFontHeight

Definition at line 1695 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagBOXLAYOUT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagBOXLAYOUT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | cyCusp
int | cyEndCusp
DWORD | dwReserved1
DWORD | dwReserved2
DWORD | dwReserved3
UINT style

Detailed Description

Definition at line 1655 of file penwin.h.

Member Data Documentation

int tagBOXLAYOUT::cyCusp

Definition at line 1657 of file penwin.h.

int tagBOXLAYOUT::cyEndCusp

Definition at line 1658 of file penwin.h.

DWORD tagBOXLAYOUT::dwReserved1

Definition at line 1660 of file penwin.h.

DWORD tagBOXLAYOUT::dwReserved2

Definition at line 1661 of file penwin.h.

DWORD tagBOXLAYOUT::dwReserved3

Definition at line 1662 of file penwin.h.

UINT tagBOXLAYOUT::style

Definition at line 1659 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagBOXRESULTS Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagBOXRESULTS Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

HINKSET | hinksetBox
UINT indxBox
SYV | rgSyv [1]

Detailed Description

Definition at line 1854 of file penwin.h.

Member Data Documentation

HINKSET tagBOXRESULTS::hinksetBox

Definition at line 1857 of file penwin.h.

UINT tagBOXRESULTS::indxBox

Definition at line 1856 of file penwin.h.

SYV tagBOXRESULTS::rgSyv[1]

Definition at line 1858 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagCALBSTRUCT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagCALBSTRUCT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | wDistinctHeight
int | wDistinctWidth
int | wOffsetX
int | wOffsetY

Detailed Description

Definition at line 1814 of file penwin.h.

Member Data Documentation

int tagCALBSTRUCT::wDistinctHeight

Definition at line 1819 of file penwin.h.

int tagCALBSTRUCT::wDistinctWidth

Definition at line 1818 of file penwin.h.

int tagCALBSTRUCT::wOffsetX

Definition at line 1816 of file penwin.h.

int tagCALBSTRUCT::wOffsetY

Definition at line 1817 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagCOLUMNSTRUCT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagCOLUMNSTRUCT Struct Reference

#include "idataobj.h"

List of all members.

Public Attributes

int | nLeft
int | nRight
UINT uiFlags

Detailed Description

Definition at line 21 of file idataobj.h.

Member Data Documentation

int tagCOLUMNSTRUCT::nLeft

Definition at line 23 of file idataobj.h.

int tagCOLUMNSTRUCT::nRight

Definition at line 24 of file idataobj.h.

UINT tagCOLUMNSTRUCT::uiFlags

Definition at line 25 of file idataobj.h.

The documentation for this struct was generated from the following files:
  • ole/oleview/iviewers/idataobj.h
  • ole/oleview/util.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagCTLINITBEDIT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagCTLINITBEDIT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwReserved
HWND | hwnd
int | id
WORD | wFlags
WORD | wSizeCategory

Detailed Description

Definition at line 1674 of file penwin.h.

Member Data Documentation

DWORD tagCTLINITBEDIT::cbSize

Definition at line 1676 of file penwin.h.

DWORD tagCTLINITBEDIT::dwReserved

Definition at line 1681 of file penwin.h.

HWND tagCTLINITBEDIT::hwnd

Definition at line 1677 of file penwin.h.

int tagCTLINITBEDIT::id

Definition at line 1678 of file penwin.h.

WORD tagCTLINITBEDIT::wFlags

Definition at line 1680 of file penwin.h.

WORD tagCTLINITBEDIT::wSizeCategory

Definition at line 1679 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagCTLINITHEDIT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagCTLINITHEDIT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwFlags
DWORD | dwReserved
HWND | hwnd
int | id

Detailed Description

Definition at line 1641 of file penwin.h.

Member Data Documentation

DWORD tagCTLINITHEDIT::cbSize

Definition at line 1643 of file penwin.h.

DWORD tagCTLINITHEDIT::dwFlags

Definition at line 1646 of file penwin.h.

DWORD tagCTLINITHEDIT::dwReserved

Definition at line 1647 of file penwin.h.

HWND tagCTLINITHEDIT::hwnd

Definition at line 1644 of file penwin.h.

int tagCTLINITHEDIT::id

Definition at line 1645 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagCTLINITIEDIT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagCTLINITIEDIT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwApp
DWORD | dwReserved
HGDIOBJ | hgdiobj
HPEN | hpenGrid
HPENDATA | hpndt
HWND | hwnd
int | id
WORD | ieb
WORD | iedo
WORD | iei
WORD | ien
WORD | ierec
WORD | ies
WORD | iesec
WORD | pdts
POINT | ptOrgGrid
WORD | wHGrid
WORD | wVGrid

Detailed Description

NOPENHRC

Definition at line 1881 of file penwin.h.

Member Data Documentation

DWORD tagCTLINITIEDIT::cbSize

Definition at line 1883 of file penwin.h.

DWORD tagCTLINITIEDIT::dwApp

Definition at line 1900 of file penwin.h.

DWORD tagCTLINITIEDIT::dwReserved

Definition at line 1901 of file penwin.h.

HGDIOBJ tagCTLINITIEDIT::hgdiobj

Definition at line 1895 of file penwin.h.

HPEN tagCTLINITIEDIT::hpenGrid

Definition at line 1896 of file penwin.h.

HPENDATA tagCTLINITIEDIT::hpndt

Definition at line 1894 of file penwin.h.

HWND tagCTLINITIEDIT::hwnd

Definition at line 1884 of file penwin.h.

int tagCTLINITIEDIT::id

Definition at line 1885 of file penwin.h.

WORD tagCTLINITIEDIT::ieb

Definition at line 1886 of file penwin.h.

WORD tagCTLINITIEDIT::iedo

Definition at line 1887 of file penwin.h.

WORD tagCTLINITIEDIT::iei

Definition at line 1888 of file penwin.h.

WORD tagCTLINITIEDIT::ien

Definition at line 1889 of file penwin.h.

WORD tagCTLINITIEDIT::ierec

Definition at line 1890 of file penwin.h.

WORD tagCTLINITIEDIT::ies

Definition at line 1891 of file penwin.h.

WORD tagCTLINITIEDIT::iesec

Definition at line 1892 of file penwin.h.

WORD tagCTLINITIEDIT::pdts

Definition at line 1893 of file penwin.h.

POINT tagCTLINITIEDIT::ptOrgGrid

Definition at line 1897 of file penwin.h.

WORD tagCTLINITIEDIT::wHGrid

Definition at line 1899 of file penwin.h.

WORD tagCTLINITIEDIT::wVGrid

Definition at line 1898 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagFORMATIDOFFSET Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagFORMATIDOFFSET Struct Reference

#include "propset.h"

List of all members.

Public Attributes

DWORD | dwOffset
GUID | formatID

Detailed Description

Definition at line 36 of file propset.h.

Member Data Documentation

DWORD tagFORMATIDOFFSET::dwOffset

Definition at line 39 of file propset.h.

GUID tagFORMATIDOFFSET::formatID

Definition at line 38 of file propset.h.

The documentation for this struct was generated from the following files:
  • ole/drawcli/propset.h
  • vc2008fp/DrawClient/propset.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagGUIDE Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagGUIDE Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | cHorzBox
int | cVertBox
int | cxBase
int | cxBox
int | cyBase
int | cyBox
int | cyMid
int | xOrigin
int | yOrigin

Detailed Description

Definition at line 1862 of file penwin.h.

Member Data Documentation

int tagGUIDE::cHorzBox

Definition at line 1870 of file penwin.h.

int tagGUIDE::cVertBox

Definition at line 1871 of file penwin.h.

int tagGUIDE::cxBase

Definition at line 1868 of file penwin.h.

int tagGUIDE::cxBox

Definition at line 1866 of file penwin.h.

int tagGUIDE::cyBase

Definition at line 1869 of file penwin.h.

int tagGUIDE::cyBox

Definition at line 1867 of file penwin.h.

int tagGUIDE::cyMid

Definition at line 1872 of file penwin.h.

int tagGUIDE::xOrigin

Definition at line 1864 of file penwin.h.

int tagGUIDE::yOrigin

Definition at line 1865 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagIMECOLORS Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagIMECOLORS Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | cColors
LPINT | lpnElem
COLORREF FAR * | lprgbIme

Detailed Description

Definition at line 1666 of file penwin.h.

Member Data Documentation

int tagIMECOLORS::cColors

Definition at line 1668 of file penwin.h.

LPINT tagIMECOLORS::lpnElem

Definition at line 1669 of file penwin.h.

COLORREF FAR* tagIMECOLORS::lprgbIme

Definition at line 1670 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagINKINGINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagINKINGINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
HRGN | hrgnClip
HRGN | hrgnInkStop
RECT | rectClip
RECT | rectInkStop
PENTIP tip
UINT wFlags

Detailed Description

Definition at line 1946 of file penwin.h.

Member Data Documentation

DWORD tagINKINGINFO::cbSize

Definition at line 1948 of file penwin.h.

HRGN tagINKINGINFO::hrgnClip

Definition at line 1953 of file penwin.h.

HRGN tagINKINGINFO::hrgnInkStop

Definition at line 1954 of file penwin.h.

RECT tagINKINGINFO::rectClip

Definition at line 1951 of file penwin.h.

RECT tagINKINGINFO::rectInkStop

Definition at line 1952 of file penwin.h.

PENTIP tagINKINGINFO::tip

Definition at line 1950 of file penwin.h.

UINT tagINKINGINFO::wFlags

Definition at line 1949 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagINPPARAMS Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagINPPARAMS Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwFlags
HPENDATA | hpndt
TARGET target

Detailed Description

Definition at line 2094 of file penwin.h.

Member Data Documentation

DWORD tagINPPARAMS::cbSize

Definition at line 2096 of file penwin.h.

DWORD tagINPPARAMS::dwFlags

Definition at line 2097 of file penwin.h.

HPENDATA tagINPPARAMS::hpndt

Definition at line 2098 of file penwin.h.

TARGET tagINPPARAMS::target

Definition at line 2099 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagINTERVAL Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagINTERVAL Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

ABSTIME atBegin
ABSTIME atEnd

Detailed Description

Definition at line 1847 of file penwin.h.

Member Data Documentation

ABSTIME tagINTERVAL::atBegin

Definition at line 1849 of file penwin.h.

ABSTIME tagINTERVAL::atEnd

Definition at line 1850 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagITEMDATA Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagITEMDATA Struct Reference

List of all members.

Public Attributes

int cColumns
LPVOID lpData
UINT nLevel
LPCOLUMNSTRUCT rgCol
UINT uiType

Detailed Description

Definition at line 32 of file idataobj.cpp.

Member Data Documentation

int tagITEMDATA::cColumns

Definition at line 36 of file idataobj.cpp.

LPVOID tagITEMDATA::lpData

Definition at line 38 of file idataobj.cpp.

UINT tagITEMDATA::nLevel

Definition at line 34 of file idataobj.cpp.

LPCOLUMNSTRUCT tagITEMDATA::rgCol

Definition at line 37 of file idataobj.cpp.

UINT tagITEMDATA::uiType

Definition at line 35 of file idataobj.cpp.

The documentation for this struct was generated from the following file:
  • ole/oleview/iviewers/idataobj.cpp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagOEM_PENPACKET Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagOEM_PENPACKET Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | dwTime
UINT | rgwOemData [MAXOEMDATAWORDS]
UINT wPDK
UINT wTabletX
UINT wTabletY

Detailed Description

Definition at line 1787 of file penwin.h.

Member Data Documentation

DWORD tagOEM_PENPACKET::dwTime

Definition at line 1793 of file penwin.h.

UINT tagOEM_PENPACKET::rgwOemData[MAXOEMDATAWORDS]

Definition at line 1792 of file penwin.h.

UINT tagOEM_PENPACKET::wPDK

Definition at line 1791 of file penwin.h.

UINT tagOEM_PENPACKET::wTabletX

Definition at line 1789 of file penwin.h.

UINT tagOEM_PENPACKET::wTabletY

Definition at line 1790 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagOEMPENINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagOEMPENINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

UINT wDistinct
UINT wPdt
UINT wValueMax

Detailed Description

NOPENDATA

Definition at line 1770 of file penwin.h.

Member Data Documentation

UINT tagOEMPENINFO::wDistinct

Definition at line 1774 of file penwin.h.

UINT tagOEMPENINFO::wPdt

Definition at line 1772 of file penwin.h.

UINT tagOEMPENINFO::wValueMax

Definition at line 1773 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPCMINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPCMINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwPcm
DWORD | dwTimeout
HRGN | hrgnBound
HRGN | hrgnExclude
RECT | rectBound
RECT | rectExclude

Detailed Description

NOPENIEDIT

Definition at line 1934 of file penwin.h.

Member Data Documentation

DWORD tagPCMINFO::cbSize

Definition at line 1936 of file penwin.h.

DWORD tagPCMINFO::dwPcm

Definition at line 1937 of file penwin.h.

DWORD tagPCMINFO::dwTimeout

Definition at line 1942 of file penwin.h.

HRGN tagPCMINFO::hrgnBound

Definition at line 1940 of file penwin.h.

HRGN tagPCMINFO::hrgnExclude

Definition at line 1941 of file penwin.h.

RECT tagPCMINFO::rectBound

Definition at line 1938 of file penwin.h.

RECT tagPCMINFO::rectExclude

Definition at line 1939 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPDEVENT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPDEVENT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwReserved
BOOL | fPen
HWND | hwnd
LONG | lExInfo
LPARAM | lParam
POINT | pt
UINT wm
WPARAM | wParam

Detailed Description

Definition at line 1905 of file penwin.h.

Member Data Documentation

DWORD tagPDEVENT::cbSize

Definition at line 1907 of file penwin.h.

DWORD tagPDEVENT::dwReserved

Definition at line 1915 of file penwin.h.

BOOL tagPDEVENT::fPen

Definition at line 1913 of file penwin.h.

HWND tagPDEVENT::hwnd

Definition at line 1908 of file penwin.h.

LONG tagPDEVENT::lExInfo

Definition at line 1914 of file penwin.h.

LPARAM tagPDEVENT::lParam

Definition at line 1911 of file penwin.h.

POINT tagPDEVENT::pt

Definition at line 1912 of file penwin.h.

UINT tagPDEVENT::wm

Definition at line 1909 of file penwin.h.

WPARAM tagPDEVENT::wParam

Definition at line 1910 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPENDATAHEADER Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPENDATAHEADER Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

UINT cbSizeUsed
UINT cPnt
UINT cPntStrokeMax
UINT cStrokes
int | nInkWidth
RECT | rectBound
DWORD | rgbInk
UINT wPndts
UINT wVersion

Detailed Description

NOPENCTL

Definition at line 1717 of file penwin.h.

Member Data Documentation

UINT tagPENDATAHEADER::cbSizeUsed

Definition at line 1720 of file penwin.h.

UINT tagPENDATAHEADER::cPnt

Definition at line 1722 of file penwin.h.

UINT tagPENDATAHEADER::cPntStrokeMax

Definition at line 1723 of file penwin.h.

UINT tagPENDATAHEADER::cStrokes

Definition at line 1721 of file penwin.h.

int tagPENDATAHEADER::nInkWidth

Definition at line 1726 of file penwin.h.

RECT tagPENDATAHEADER::rectBound

Definition at line 1724 of file penwin.h.

DWORD tagPENDATAHEADER::rgbInk

Definition at line 1727 of file penwin.h.

UINT tagPENDATAHEADER::wPndts

Definition at line 1725 of file penwin.h.

UINT tagPENDATAHEADER::wVersion

Definition at line 1719 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPENINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPENINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | cbOemData
int | cPens
UINT cxRawWidth
UINT cyRawHeight
UINT fuOEM
LONG | lPdc
int | nSamplingDist
int | nSamplingRate
OEMPENINFO | rgoempeninfo [MAXOEMDATAWORDS]
UINT | rgwReserved [7]
UINT wDistinctHeight
UINT wDistinctWidth

Detailed Description

Definition at line 1797 of file penwin.h.

Member Data Documentation

int tagPENINFO::cbOemData

Definition at line 1807 of file penwin.h.

int tagPENINFO::cPens

Definition at line 1806 of file penwin.h.

UINT tagPENINFO::cxRawWidth

Definition at line 1799 of file penwin.h.

UINT tagPENINFO::cyRawHeight

Definition at line 1800 of file penwin.h.

UINT tagPENINFO::fuOEM

Definition at line 1810 of file penwin.h.

LONG tagPENINFO::lPdc

Definition at line 1805 of file penwin.h.

int tagPENINFO::nSamplingDist

Definition at line 1804 of file penwin.h.

int tagPENINFO::nSamplingRate

Definition at line 1803 of file penwin.h.

OEMPENINFO tagPENINFO::rgoempeninfo[MAXOEMDATAWORDS]

Definition at line 1808 of file penwin.h.

UINT tagPENINFO::rgwReserved[7]

Definition at line 1809 of file penwin.h.

UINT tagPENINFO::wDistinctHeight

Definition at line 1802 of file penwin.h.

UINT tagPENINFO::wDistinctWidth

Definition at line 1801 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPENPACKET Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPENPACKET Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

UINT rgwOemData [MAXOEMDATAWORDS]
UINT wPDK
UINT wTabletX
UINT wTabletY

Detailed Description

Definition at line 1778 of file penwin.h.

Member Data Documentation

UINT tagPENPACKET::rgwOemData[MAXOEMDATAWORDS]

Definition at line 1783 of file penwin.h.

UINT tagPENPACKET::wPDK

Definition at line 1782 of file penwin.h.

UINT tagPENPACKET::wTabletX

Definition at line 1780 of file penwin.h.

UINT tagPENPACKET::wTabletY

Definition at line 1781 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPENTIP Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPENTIP Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

BYTE | bheight
BYTE | bOpacity
BYTE | btype
BYTE | bwidth
DWORD | cbSize
DWORD | dwFlags
DWORD | dwReserved
COLORREF | rgb

Detailed Description

Definition at line 1740 of file penwin.h.

Member Data Documentation

BYTE tagPENTIP::bheight

Definition at line 1745 of file penwin.h.

BYTE tagPENTIP::bOpacity

Definition at line 1746 of file penwin.h.

BYTE tagPENTIP::btype

Definition at line 1743 of file penwin.h.

BYTE tagPENTIP::bwidth

Definition at line 1744 of file penwin.h.

DWORD tagPENTIP::cbSize

Definition at line 1742 of file penwin.h.

DWORD tagPENTIP::dwFlags

Definition at line 1748 of file penwin.h.

DWORD tagPENTIP::dwReserved

Definition at line 1749 of file penwin.h.

COLORREF tagPENTIP::rgb

Definition at line 1747 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPROPERTYIDOFFSET Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPROPERTYIDOFFSET Struct Reference

#include "propset.h"

List of all members.

Public Attributes

DWORD | dwOffset
DWORD | propertyID

Detailed Description

Definition at line 21 of file propset.h.

Member Data Documentation

DWORD tagPROPERTYIDOFFSET::dwOffset

Definition at line 24 of file propset.h.

DWORD tagPROPERTYIDOFFSET::propertyID

Definition at line 23 of file propset.h.

The documentation for this struct was generated from the following files:
  • ole/drawcli/propset.h
  • vc2008fp/DrawClient/propset.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagPROPHEADER Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagPROPHEADER Struct Reference

#include "propset.h"

List of all members.

Public Attributes

CLSID | clsID
DWORD | cSections
DWORD | dwOSVer
WORD | wByteOrder
WORD | wFormat

Detailed Description

Definition at line 27 of file propset.h.

Member Data Documentation

CLSID tagPROPHEADER::clsID

Definition at line 32 of file propset.h.

DWORD tagPROPHEADER::cSections

Definition at line 33 of file propset.h.

DWORD tagPROPHEADER::dwOSVer

Definition at line 31 of file propset.h.

WORD tagPROPHEADER::wByteOrder

Definition at line 29 of file propset.h.

WORD tagPROPHEADER::wFormat

Definition at line 30 of file propset.h.

The documentation for this struct was generated from the following files:
  • ole/drawcli/propset.h
  • vc2008fp/DrawClient/propset.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagRC Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagRC Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

ALC alc
ALC alcPriority
CL clErrorLevel
DWORD | dwAppParam
DWORD | dwDictParam
DWORD | dwRecognizer
GUIDE guide
HREC | hrec
HWND | hwnd
LONG | lPcm
RCYIELDPROC lpfnYield
char | lpLanguage [cbRcLanguageMax]
BYTE | lpUser [cbRcUserMax]
LONG | lRcOptions
int | nInkWidth
RECT | rectBound
RECT | rectExclude
BYTE | rgbfAlc [cbRcrgbfAlcMax]
COLORREF | rgbInk
LPDF | rglpdf [MAXDICTIONARIES]
UINT | rgwReserved [cwRcReservedMax]
UINT wCountry
UINT wEventRef
UINT wIntlPreferences
UINT wRcDirect
UINT wRcOrient
UINT wRcPreferences
UINT wResultMode
UINT wTimeOut
UINT wTryDictionary

Detailed Description

Definition at line 1994 of file penwin.h.

Member Data Documentation

ALC tagRC::alc

Definition at line 2009 of file penwin.h.

ALC tagRC::alcPriority

Definition at line 2010 of file penwin.h.

CL tagRC::clErrorLevel

Definition at line 2008 of file penwin.h.

DWORD tagRC::dwAppParam

Definition at line 2022 of file penwin.h.

DWORD tagRC::dwDictParam

Definition at line 2023 of file penwin.h.

DWORD tagRC::dwRecognizer

Definition at line 2024 of file penwin.h.

GUIDE tagRC::guide

Definition at line 2017 of file penwin.h.

HREC tagRC::hrec

Definition at line 1996 of file penwin.h.

HWND tagRC::hwnd

Definition at line 1997 of file penwin.h.

LONG tagRC::lPcm

Definition at line 2014 of file penwin.h.

RCYIELDPROC tagRC::lpfnYield

Definition at line 2001 of file penwin.h.

char tagRC::lpLanguage[cbRcLanguageMax]

Definition at line 2005 of file penwin.h.

BYTE tagRC::lpUser[cbRcUserMax]

Definition at line 2002 of file penwin.h.

LONG tagRC::lRcOptions

Definition at line 2000 of file penwin.h.

int tagRC::nInkWidth

Definition at line 2020 of file penwin.h.

RECT tagRC::rectBound

Definition at line 2015 of file penwin.h.

RECT tagRC::rectExclude

Definition at line 2016 of file penwin.h.

BYTE tagRC::rgbfAlc[cbRcrgbfAlcMax]

Definition at line 2011 of file penwin.h.

COLORREF tagRC::rgbInk

Definition at line 2021 of file penwin.h.

LPDF tagRC::rglpdf[MAXDICTIONARIES]

Definition at line 2006 of file penwin.h.

UINT tagRC::rgwReserved[cwRcReservedMax]

Definition at line 2025 of file penwin.h.

UINT tagRC::wCountry

Definition at line 2003 of file penwin.h.

UINT tagRC::wEventRef

Definition at line 1998 of file penwin.h.

UINT tagRC::wIntlPreferences

Definition at line 2004 of file penwin.h.

UINT tagRC::wRcDirect

Definition at line 2019 of file penwin.h.

UINT tagRC::wRcOrient

Definition at line 2018 of file penwin.h.

UINT tagRC::wRcPreferences

Definition at line 1999 of file penwin.h.

UINT tagRC::wResultMode

Definition at line 2012 of file penwin.h.

UINT tagRC::wTimeOut

Definition at line 2013 of file penwin.h.

UINT tagRC::wTryDictionary

Definition at line 2007 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagRCRESULT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagRCRESULT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | cSyv
HPENDATA | hpendata
HANDLE | hSyv
LPRC lprc
LPSYV lpsyv
int | nBaseLine
int | nMidLine
POINT | pntEnd
RECT | rectBoundInk
SYG syg
UINT wResultsType

Detailed Description

Definition at line 2029 of file penwin.h.

Member Data Documentation

int tagRCRESULT::cSyv

Definition at line 2033 of file penwin.h.

HPENDATA tagRCRESULT::hpendata

Definition at line 2038 of file penwin.h.

HANDLE tagRCRESULT::hSyv

Definition at line 2035 of file penwin.h.

LPRC tagRCRESULT::lprc

Definition at line 2041 of file penwin.h.

LPSYV tagRCRESULT::lpsyv

Definition at line 2034 of file penwin.h.

int tagRCRESULT::nBaseLine

Definition at line 2036 of file penwin.h.

int tagRCRESULT::nMidLine

Definition at line 2037 of file penwin.h.

POINT tagRCRESULT::pntEnd

Definition at line 2040 of file penwin.h.

RECT tagRCRESULT::rectBoundInk

Definition at line 2039 of file penwin.h.

SYG tagRCRESULT::syg

Definition at line 2031 of file penwin.h.

UINT tagRCRESULT::wResultsType

Definition at line 2032 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagRECTL Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagRECTL Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

LONG | bottom
LONG | left
LONG | right
LONG | top

Detailed Description

NOPENRC1

Definition at line 2055 of file penwin.h.

Member Data Documentation

LONG tagRECTL::bottom

Definition at line 2060 of file penwin.h.

LONG tagRECTL::left

Definition at line 2057 of file penwin.h.

LONG tagRECTL::right

Definition at line 2059 of file penwin.h.

LONG tagRECTL::top

Definition at line 2058 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagRECTOFS Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagRECTOFS Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | dBottom
int | dLeft
int | dRight
int | dTop

Detailed Description

NOPENBEDIT

Definition at line 1704 of file penwin.h.

Member Data Documentation

int tagRECTOFS::dBottom

Definition at line 1709 of file penwin.h.

int tagRECTOFS::dLeft

Definition at line 1706 of file penwin.h.

int tagRECTOFS::dRight

Definition at line 1708 of file penwin.h.

int tagRECTOFS::dTop

Definition at line 1707 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagSECTIONHEADER Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagSECTIONHEADER Struct Reference

#include "propset.h"

List of all members.

Public Attributes

DWORD | cbSection
DWORD | cProperties

Detailed Description

Definition at line 15 of file propset.h.

Member Data Documentation

DWORD tagSECTIONHEADER::cbSection

Definition at line 17 of file propset.h.

DWORD tagSECTIONHEADER::cProperties

Definition at line 18 of file propset.h.

The documentation for this struct was generated from the following files:
  • ole/drawcli/propset.h
  • vc2008fp/DrawClient/propset.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagSTRKFMT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagSTRKFMT Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwReserved
DWORD | dwUser
UINT iesf
UINT iStrk
PENTIP tip

Detailed Description

Definition at line 1919 of file penwin.h.

Member Data Documentation

DWORD tagSTRKFMT::cbSize

Definition at line 1921 of file penwin.h.

DWORD tagSTRKFMT::dwReserved

Definition at line 1926 of file penwin.h.

DWORD tagSTRKFMT::dwUser

Definition at line 1925 of file penwin.h.

UINT tagSTRKFMT::iesf

Definition at line 1922 of file penwin.h.

UINT tagSTRKFMT::iStrk

Definition at line 1923 of file penwin.h.

PENTIP tagSTRKFMT::tip

Definition at line 1924 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagSTROKEINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagSTROKEINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

UINT cbPnts
UINT cPnt
DWORD dwTick
UINT wPdk

Detailed Description

Definition at line 1731 of file penwin.h.

Member Data Documentation

UINT tagSTROKEINFO::cbPnts

Definition at line 1734 of file penwin.h.

UINT tagSTROKEINFO::cPnt

Definition at line 1733 of file penwin.h.

DWORD tagSTROKEINFO::dwTick

Definition at line 1736 of file penwin.h.

UINT tagSTROKEINFO::wPdk

Definition at line 1735 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagSYC Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagSYC Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

BOOL fLastSyc
UINT wPntFirst
UINT wPntLast
UINT wStrokeFirst
UINT wStrokeLast

Detailed Description

NOPENINKPUT

Definition at line 1962 of file penwin.h.

Member Data Documentation

BOOL tagSYC::fLastSyc

Definition at line 1968 of file penwin.h.

UINT tagSYC::wPntFirst

Definition at line 1965 of file penwin.h.

UINT tagSYC::wPntLast

Definition at line 1967 of file penwin.h.

UINT tagSYC::wStrokeFirst

Definition at line 1964 of file penwin.h.

UINT tagSYC::wStrokeLast

Definition at line 1966 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagSYE Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagSYE Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

CL cl
int | iSyc
LONG | lRecogVal
SYV syv

Detailed Description

Definition at line 1972 of file penwin.h.

Member Data Documentation

CL tagSYE::cl

Definition at line 1976 of file penwin.h.

int tagSYE::iSyc

Definition at line 1977 of file penwin.h.

LONG tagSYE::lRecogVal

Definition at line 1975 of file penwin.h.

SYV tagSYE::syv

Definition at line 1974 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagSYG Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagSYG Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

int | cHotSpot
int | cSyc
int | cSye
LPSYC lpsyc
LPSYE lpsye
LONG | lRecogVal
int | nFirstBox
POINT | rgpntHotSpots [MAXHOTSPOT]

Detailed Description

Definition at line 1981 of file penwin.h.

Member Data Documentation

int tagSYG::cHotSpot

Definition at line 1984 of file penwin.h.

int tagSYG::cSyc

Definition at line 1990 of file penwin.h.

int tagSYG::cSye

Definition at line 1988 of file penwin.h.

LPSYC tagSYG::lpsyc

Definition at line 1989 of file penwin.h.

LPSYE tagSYG::lpsye

Definition at line 1987 of file penwin.h.

LONG tagSYG::lRecogVal

Definition at line 1986 of file penwin.h.

int tagSYG::nFirstBox

Definition at line 1985 of file penwin.h.

POINT tagSYG::rgpntHotSpots[MAXHOTSPOT]

Definition at line 1983 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagTARGET Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagTARGET Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | dwData
DWORD | dwFlags
HTRG | htrgTarget
DWORD | idTarget
RECTL rectBound
RECTL rectBoundInk
RECTL rectBoundLastInk

Detailed Description

Definition at line 2070 of file penwin.h.

Member Data Documentation

DWORD tagTARGET::dwData

Definition at line 2076 of file penwin.h.

DWORD tagTARGET::dwFlags

Definition at line 2072 of file penwin.h.

HTRG tagTARGET::htrgTarget

Definition at line 2074 of file penwin.h.

DWORD tagTARGET::idTarget

Definition at line 2073 of file penwin.h.

RECTL tagTARGET::rectBound

Definition at line 2075 of file penwin.h.

RECTL tagTARGET::rectBoundInk

Definition at line 2077 of file penwin.h.

RECTL tagTARGET::rectBoundLastInk

Definition at line 2078 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagTARGINFO Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagTARGINFO Struct Reference

#include "penwin.h"

List of all members.

Public Attributes

DWORD | cbSize
WORD | cTargets
DWORD | dwFlags
HTRG | htrgOwner
WORD | iTargetLast
TARGET | rgTarget [1]

Detailed Description

Definition at line 2082 of file penwin.h.

Member Data Documentation

DWORD tagTARGINFO::cbSize

Definition at line 2084 of file penwin.h.

WORD tagTARGINFO::cTargets

Definition at line 2087 of file penwin.h.

DWORD tagTARGINFO::dwFlags

Definition at line 2085 of file penwin.h.

HTRG tagTARGINFO::htrgOwner

Definition at line 2086 of file penwin.h.

WORD tagTARGINFO::iTargetLast

Definition at line 2088 of file penwin.h.

TARGET tagTARGINFO::rgTarget[1]

Definition at line 2090 of file penwin.h.

The documentation for this struct was generated from the following file:
  • ole/wordpad/penwin.h
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: tagVS_VERSION Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

tagVS_VERSION Struct Reference

List of all members.

Public Attributes

TCHAR | szSig [16]
VS_FIXEDFILEINFO | vffInfo
WORD | wTotLen
WORD | wValLen

Detailed Description

Definition at line 301 of file oleview.cpp.

Member Data Documentation

TCHAR tagVS_VERSION::szSig[16]

Definition at line 305 of file oleview.cpp.

VS_FIXEDFILEINFO tagVS_VERSION::vffInfo

Definition at line 306 of file oleview.cpp.

WORD tagVS_VERSION::wTotLen

Definition at line 303 of file oleview.cpp.

WORD tagVS_VERSION::wValLen

Definition at line 304 of file oleview.cpp.

The documentation for this struct was generated from the following file:
  • ole/oleview/oleview.cpp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TCPropsLib::ITCExtendedControl Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TCPropsLib
  • TCPropsLib::ITCExtendedControl
Public Member Functions

TCPropsLib::ITCExtendedControl Interface Reference

import "TCProps.idl";

List of all members.

Public Member Functions

HRESULT | Activate ()
HRESULT | Deactivate ()
HRESULT | Name ([in] BSTR bstrName)
HRESULT | Name ([out, retval] BSTR *pbstrName)
HRESULT | PositionX ([out, retval] long *px)
HRESULT | PositionX ([in] long x)
HRESULT | PositionY ([in] long y)
HRESULT | PositionY ([out, retval] long *py)
HRESULT | SizeX ([out, retval] long *px)
HRESULT | SizeX ([in] long x)
HRESULT | SizeY ([out, retval] long *py)
HRESULT | SizeY ([in] long y)
HRESULT | UIActivate ()
HRESULT | UIDeactivate ()

Detailed Description

Definition at line 34 of file TCProps.idl.

Member Function Documentation

HRESULT TCPropsLib::ITCExtendedControl::Activate ( )
HRESULT TCPropsLib::ITCExtendedControl::Deactivate ( )
HRESULT TCPropsLib::ITCExtendedControl::Name ( [in] BSTR bstrName ) [set]
HRESULT TCPropsLib::ITCExtendedControl::Name ( [out, retval] BSTR * pbstrName ) [get]
HRESULT TCPropsLib::ITCExtendedControl::PositionX ( [out, retval] long * px ) [get]
HRESULT TCPropsLib::ITCExtendedControl::PositionX ( [in] long x ) [set]
HRESULT TCPropsLib::ITCExtendedControl::PositionY ( [in] long y ) [set]
HRESULT TCPropsLib::ITCExtendedControl::PositionY ( [out, retval] long * py ) [get]
HRESULT TCPropsLib::ITCExtendedControl::SizeX ( [out, retval] long * px ) [get]
HRESULT TCPropsLib::ITCExtendedControl::SizeX ( [in] long x ) [set]
HRESULT TCPropsLib::ITCExtendedControl::SizeY ( [out, retval] long * py ) [get]
HRESULT TCPropsLib::ITCExtendedControl::SizeY ( [in] long y ) [set]
HRESULT TCPropsLib::ITCExtendedControl::UIActivate ( )
HRESULT TCPropsLib::ITCExtendedControl::UIDeactivate ( )
The documentation for this interface was generated from the following file:
  • ole/TstCon/TCProps/TCProps.idl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TCPropsLib::TCExtPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TCPropsLib
  • TCPropsLib::TCExtPage

TCPropsLib::TCExtPage Class Reference

import "TCProps.idl";

Detailed Description

Definition at line 71 of file TCProps.idl.

The documentation for this class was generated from the following file:
  • ole/TstCon/TCProps/TCProps.idl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TestContainer98::Document Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TestContainer98
  • TestContainer98::Document

TestContainer98::Document Class Reference

Detailed Description

Definition at line 46 of file TstCon.odl.

The documentation for this class was generated from the following file:
  • ole/TstCon/TstCon.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TestContainer98::ITestContainer98 Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TestContainer98
  • TestContainer98::ITestContainer98
Properties

TestContainer98::ITestContainer98 Interface Reference

List of all members.

Properties

BSTR | id
BSTR | Log

Detailed Description

Definition at line 14 of file TstCon.odl.

Property Documentation

BSTR TestContainer98::ITestContainer98::id
BSTR TestContainer98::ITestContainer98::Log
The documentation for this interface was generated from the following file:
  • ole/TstCon/TstCon.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TestContainer98::ITestContainer98Events Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TestContainer98
  • TestContainer98::ITestContainer98Events
Public Member Functions

TestContainer98::ITestContainer98Events Interface Reference

List of all members.

Public Member Functions

void OnNewControl (IDispatch *pControl)

Detailed Description

Definition at line 35 of file TstCon.odl.

Member Function Documentation

void TestContainer98::ITestContainer98Events::OnNewControl ( IDispatch * pControl )
The documentation for this interface was generated from the following file:
  • ole/TstCon/TstCon.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TESTHELPLib::_DTesthelp Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TESTHELPLib
  • TESTHELPLib::_DTesthelp
Properties

TESTHELPLib::_DTesthelp Interface Reference

List of all members.

Properties

BackColor | id (bindable)
AboutBox | id
ToolTipText | id
UseMyHelp | id
Name3 | id
Name1 | id

Detailed Description

Definition at line 29 of file testhelp.odl.

Property Documentation

BackColor TESTHELPLib::_DTesthelp::id( bindable)
AboutBox TESTHELPLib::_DTesthelp::id
ToolTipText TESTHELPLib::_DTesthelp::id
UseMyHelp TESTHELPLib::_DTesthelp::id
Name3 TESTHELPLib::_DTesthelp::id
Name1 TESTHELPLib::_DTesthelp::id
The documentation for this interface was generated from the following file:
  • controls/testhelp/testhelp.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TESTHELPLib::_DTesthelpEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TESTHELPLib
  • TESTHELPLib::_DTesthelpEvents

TESTHELPLib::_DTesthelpEvents Interface Reference

Detailed Description

Definition at line 61 of file testhelp.odl.

The documentation for this interface was generated from the following file:
  • controls/testhelp/testhelp.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TESTHELPLib::Testhelp Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TESTHELPLib
  • TESTHELPLib::Testhelp

TESTHELPLib::Testhelp Class Reference

Detailed Description

Definition at line 77 of file testhelp.odl.

The documentation for this class was generated from the following file:
  • controls/testhelp/testhelp.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TimeLib::_DTime Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TimeLib
  • TimeLib::_DTime
Public Member Functions | Properties

TimeLib::_DTime Interface Reference

List of all members.

Public Member Functions

void | AboutBox ()

Properties

Enabled | id (bindable)

Detailed Description

Definition at line 29 of file time.odl.

Member Function Documentation

void TimeLib::_DTime::AboutBox ( )

Property Documentation

Enabled TimeLib::_DTime::id( bindable)
The documentation for this interface was generated from the following file:
  • controls/time/time.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TimeLib::_DTimeEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TimeLib
  • TimeLib::_DTimeEvents
Public Member Functions

TimeLib::_DTimeEvents Interface Reference

List of all members.

Public Member Functions

void Timer ()

Detailed Description

Definition at line 52 of file time.odl.

Member Function Documentation

void TimeLib::_DTimeEvents::Timer ( )
The documentation for this interface was generated from the following file:
  • controls/time/time.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TimeLib::Time Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • TimeLib
  • TimeLib::Time

TimeLib::Time Class Reference

Detailed Description

Definition at line 69 of file time.odl.

The documentation for this class was generated from the following file:
  • controls/time/time.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: VARTYPE_ENTRY Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

VARTYPE_ENTRY Class Reference

List of all members.

Public Attributes

LPCTSTR | pszName
VARTYPE | vt

Detailed Description

Definition at line 52 of file VarUtils.Cpp.

Member Data Documentation

LPCTSTR VARTYPE_ENTRY::pszName

Definition at line 55 of file VarUtils.Cpp.

VARTYPE VARTYPE_ENTRY::vt

Definition at line 56 of file VarUtils.Cpp.

The documentation for this class was generated from the following file:
  • ole/TstCon/VarUtils.Cpp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: XlistLib::_DXlist Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • XlistLib
  • XlistLib::_DXlist
Properties

XlistLib::_DXlist Interface Reference

List of all members.

Properties

AboutBox
IPictureDisp | AddPicItem (short nIndex)
IFontDisp | AddTextFontItem (short nIndex, BSTR lpstrText)
BSTR | AddTextItem (short nIndex)
Clear
IPictureDisp | id (short nIndex) [get]
short | id
IFontDisp | id (short nIndex) [get]
OLE_COLOR | ItemBackColor (short nIndex) [set]
OLE_COLOR | ItemForeColor (short nIndex) [set]
short | ItemForeColor [get]
BSTR | ItemText (short nIndex) [set]
short | ItemText [get]
short | RemoveItem

Detailed Description

Definition at line 29 of file xlist.odl.

Property Documentation

XlistLib::_DXlist::AboutBox
IPictureDisp XlistLib::_DXlist::AddPicItem( short nIndex)
IFontDisp XlistLib::_DXlist::AddTextFontItem( short nIndex, BSTR lpstrText)
BSTR XlistLib::_DXlist::AddTextItem( short nIndex)
XlistLib::_DXlist::Clear
IPictureDisp XlistLib::_DXlist::id( short nIndex) [get]
short XlistLib::_DXlist::id
IFontDisp XlistLib::_DXlist::id( short nIndex) [get]
OLE_COLOR XlistLib::_DXlist::ItemBackColor( short nIndex) [set]
OLE_COLOR XlistLib::_DXlist::ItemForeColor( short nIndex) [set]
short XlistLib::_DXlist::ItemForeColor [get]
BSTR XlistLib::_DXlist::ItemText( short nIndex) [set]
short XlistLib::_DXlist::ItemText [get]
short XlistLib::_DXlist::RemoveItem
The documentation for this interface was generated from the following file:
  • controls/xlist/xlist.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: XlistLib::_DXlistEvents Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • XlistLib
  • XlistLib::_DXlistEvents

XlistLib::_DXlistEvents Interface Reference

Detailed Description

Definition at line 67 of file xlist.odl.

The documentation for this interface was generated from the following file:
  • controls/xlist/xlist.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: XlistLib::Xlist Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • XlistLib
  • XlistLib::Xlist

XlistLib::Xlist Class Reference

Detailed Description

Definition at line 83 of file xlist.odl.

The documentation for this class was generated from the following file:
  • controls/xlist/xlist.odl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Hierarchical Index

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
  • ACDual::Document
  • ACDual::IAClick
  • ACDual::IAutoClickPoint
  • ACDual::IDualAClick
  • ACDual::IDualAutoClickPoint
  • ACDual::Point
  • AutoClik::CAutoClickDoc
  • AutoClik::CAutoClickPoint
  • AutoClik::IAClick
  • AutoClik::IAutoClickPoint
  • BITMAPINFO256
  • ButtonLib::_DButton
  • ButtonLib::_DButtonEvents
  • ButtonLib::Button
  • C3WaySplitterFrame
  • CAboutBox
  • CAboutDlg
  • CAdderDialog
  • CAddNodeDlg
  • CAddressBox
  • CAddressCombo
  • CAllControlsSheet
  • CAmbientPropertiesDlg
  • CAmbientProperty
  • CAnimateCtrlPage
  • CAppLookDlg
  • CaptureData
  • CAutoClickApp
  • CAutoClickDoc
  • CAutoClickPoint
  • CAutoClickView
  • CAutoClik
  • CAutoDrivApp
  • CAutoDrivDlg
  • CBasePiece
    • CWheel
      • CRing
  • CBigIcon
  • CBitmapProperty
  • CBkfstPage
  • CBMTest1Dlg
  • CBMTest2Dlg
  • CBMTest3Dlg
  • CBounceDoc
  • CBounceFrame
  • CBounceMDIChildWnd
  • CBounceThread
  • CBounceView
  • CBounceWnd
  • CBoundedNumberPairProp
  • CBoundedNumberSubProp
  • CButtonApp
  • CButtonCtrl
  • CButtonPropPage
  • CCalcApp
  • CCalcDlg
  • CCalcDrivApp
  • CCalendarBar
  • CChangeNameDlg
  • CChangeText
  • CCharFormat
  • CCheckBoxProp
  • CChildFrame
  • CChildView
  • CCImageApp
  • CCircApp
  • CCircCtrl
  • CCircPropPage
  • CClassToolBar
  • CClassTreeWnd
  • CClassViewBar
  • CClassViewMenuButton
  • CClikPoint
  • CCmnCtrl1App
  • CCmnCtrl2App
  • CCmnCtrl3App
  • CCmnCtrl3Dlg
  • CCollectApp
  • CCollectDoc
  • CCollectView
  • CColorListBox
  • CColorMenu
  • CColorOptDlg
  • CColorPage
  • CColorView
  • CComboBoxExProp
  • CComboToolBar
  • CCommandLinkCtrlPage
  • CComponentCategoriesDlg
  • CConfigDlg
  • CContainerApp
  • CContainerDoc
  • CContainerInfoDlg
  • CContainerItem
  • CContainerView
  • CCSDialog
    • CButtonDialog
    • CButtonDialog
    • CDateDialog
    • CDateDialog
    • CFileNewDialog
    • CFileNewDialog
    • CFormatParaDlg
    • CFormatParaDlg
    • CFormatTabDlg
    • CFormatTabDlg
    • CPageSetupDlg
    • CPageSetupDlg
  • CCSPropertyPage
    • CDocOptPage
      • CEmbeddedOptPage
      • CEmbeddedOptPage
    • CDocOptPage
    • CUnitsPage
    • CUnitsPage
  • CCSPropertySheet
    • COptionSheet
    • COptionSheet
  • CCtrlbarsApp
  • CCubeApp
  • CCubeDoc
  • CCubeView
  • CCustListDlg
  • CCustomDlgProp
  • CCustomEditListBox
  • CCustomFileDialog
  • CCustomList
  • CCustomPagesApp
  • CCustomPagesDoc
  • CCustomPagesView
  • CCustomSliderCtrl
  • CCustomToolTipCtrl
  • CDataObjectDlg
  • CDateTimePage
  • CDBVListApp
  • CDBVListDoc
  • CDBVListSet
  • CDBVListView
  • CDemoOptionsPage
  • CDemoOptionsPropSheet
  • CDerEditDlg
  • CDesktopAlertDemoApp
  • CDesktopAlertDemoDlg
  • CDHtmlExploreApp
  • CDHtmlExploreDlg
  • CDialogItem
  • CDibDoc
  • CDibLookApp
  • CDibView
  • CDinnerPage
  • CDispatchDlg
  • CDisplayIC
  • CDlgBanner
  • CDlgStatusBar
  • CDlgtempApp
  • CDlgtempDlg
  • CDlgToolBar
  • CDlgToolTipsApp
  • CDlgToolTipsDlg
  • CDllScreenCapApp
  • CDockApp
  • CDockDoc
  • CDockView
  • CDocOptions
  • CDrawApp
  • CDrawClientHandlersApp
  • CDrawClientHandlersModule
  • CDrawCliLiveIconsHandler
  • CDrawCliSearchHandler
  • CDrawDoc
  • CDrawItem
  • CDrawObj
    • CDrawObjFriend
    • CDrawOleObj
    • CDrawOleObj
    • CDrawPoly
    • CDrawPoly
    • CDrawRect
    • CDrawRect
  • CDrawTool
    • CPolyTool
    • CPolyTool
    • CRectTool
    • CRectTool
    • CSelectTool
    • CSelectTool
  • CDrawView
  • CDrawView::XPreviewStateItem
  • CDriveApp
  • CDriverDlg
  • CDriverDoc
  • CDriverView
  • CDropTargetView
  • CDummyDoc
  • CDWordArrayView
  • CDynaMDIChildWnd
  • CDynaMenuApp
  • CDynaMenuDoc
  • CDynaMenuView
  • CDynamicHelpViewBar
  • CDynamicMenuApp
  • CDynamicMenuDoc
  • CDynamicMenuView
  • CEditBar
  • CEditToolbar
  • CEmbeddedItem
    • CPadLinkItem
  • CEmpView
  • CEndWizardDialog
  • CEnterDlg
  • CEntryInfoDlg
  • CEnumVariant
  • CEventLoggingPage
  • CExampleThread
    • CCounterThread
    • CDisplayThread
  • CExcepInfo
  • CExplorerApp
  • CExplorerBar
  • CExplorerDoc
  • CExplorerView
  • CExtendedControl
  • CFavorit
  • CFavoritesManager
  • CFeaturesPage
  • CFigCommand
  • CFigure
  • CFileDlgWatcherApp
  • CFileDlgWatcherDlg
  • CFileViewBar
  • CFileViewToolBar
  • CFindComboButton
  • CFindDlg
  • CFolderBar
  • CFolderListBar
  • CFolderListPopupWnd
  • CFoldersTree
  • CFontDesc
  • CFormatBar
  • CFormatMenu
  • CGDIThread
    • CBallThread
    • CLineThread
    • CRectThread
  • CGetURL
  • CGotoDlg
  • CGuidGenApp
  • CGuidGenDlg
  • CHandleSize
  • CHARHDR
  • CHelloApp
  • CHelloDoc
  • CHelloFrame
  • CHelloView
  • CHelloWindow
  • CHelloWnd
  • CHelpToolBar
  • CHierSvrDocTemplate
  • CHistoryList
  • CHistoryObj
  • CHTMLEdDoc
  • CHTMLEditApp
  • CHTMLEdView
  • CHuskApp
  • CIconCombo
  • CIconComboBox
  • CIconListProp
  • CIDataObjectDlg
  • CIEDemoApp
  • CIEDemoDoc
  • CIEDemoView
  • CImageApp
  • CImageCtrl
  • CImagePropPage
  • CImpIAdviseSink
  • CInfoBar
  • CInfoDlg
  • CInPlaceFrame
  • CInProcApp
  • CInputView
  • CInsertControlDlg
  • CInsertTableDlg
  • CInterfaceInfo
  • CInterfacesPage
  • CInterfaceViewer
    • CDataObjectViewer
    • CDispatchViewer
    • CTypeLibViewer
  • CIntListView
  • CircLib::_DCirc
  • CircLib::_DCircEvents
  • CircLib::Circ
  • CItemData
  • CItemIcons
  • CIViewersApp
  • CKey
  • CLicensedApp
  • CLicensedCtrl
  • CLicensedPropPage
  • CLineFile
  • CLineStyleMenuItem
  • CLineWeightDlg
  • CLinkButton
  • CLinksBar
  • CListDlg
  • CListHdrApp
  • CListHdrDlg
  • CListOutputFrame
  • CListViewEx
    • CRowListView
  • CLocalComboBox
    • CFontComboBox
    • CSizeComboBox
  • CLocalizeApp
  • CLocalizeCtrl
  • CLocalizePropPage
  • CLog
    • CDebugLog
    • CFileLog
    • CNullLog
    • COutputWindowLog
  • CLoggingDlg
  • CLunchPage
  • CMacroComboBox
  • CMacroDialogBar
  • CMacroDlg
  • CMailBar
  • CMailFrame
  • CMailView
  • CMainDlg
  • CMainDoc
  • CMainFrame
  • CMainFrame::XStyle
  • CMainView
  • CMainWindow
  • CMapDWordToMyStructView
  • CMapInfo
  • CMapStringToStringView
  • CMargueeTaskDialog
  • CMdiApp
  • CMDIApp
  • CMDITabOptions
  • CMDITabsDemoApp
  • CMDITabsDemoDoc
  • CMDITabsDemoView
  • CMenuSubSetApp
  • CMenuSubSetDoc
  • CMenuSubSetView
  • CMetaFileWnd
  • CMethodDlg
  • CMethodInfo
  • CMethodParamInfo
  • CMFCBindApp
  • CMFCBindCntrItem
  • CMFCBindDoc
  • CMFCBindView
  • CMfcieApp
  • CMfcieDoc
  • CMfcieView
  • CMFCRibbonNumEdit
  • CMFCRibbonNumEditCtrl
  • CMinSize
  • CMMXSwarmApp
  • CMMXUnsigned16Saturated
  • CModalShapePropSheet
  • CModelessApp
  • CModelessDialog
    • CModelessMain
      • CWndListDlg
  • CModelessShapePropSheet
  • CMonthCalPage
  • CMSMCaptionBar
  • CMSMCaptionBarButton
  • CMSMCategoryBarButton
  • CMSMDialog
  • CMSMLinksBarButton
  • CMSMMenuBar
  • CMSMoneyDemoApp
  • CMSMoneyDemoDoc
  • CMSMoneyDemoView
  • CMSMTasksPane
  • CMSMToolBar
    • CMSMCategoryBar
    • CMSMLinksBar
  • CMSMVisualManager
  • CMSNDlg
  • CMSNVisualManager
  • CMSOffice2007DemoApp
  • CMSOffice2007DemoCntrItem
  • CMSOffice2007DemoDoc
  • CMSOffice2007DemoView
  • CMultiPadApp
  • CMutexesApp
  • CMutexesDlg
  • CMyBrowseEdit
  • CMyCustomizationPage
  • CMyDialogTemplate
  • CMyListBox
  • CMyListCtrl
  • CMyMenuBar
  • CMyObject
  • CMyOutlookBar
  • CMyPopupDlg
  • CMyPropertyPage1
  • CMyPropertyPage2
  • CMyPropertyPage3
  • CMyPropertyPage4
  • CMyPropertySheet
  • CMyScheduler
  • CMyStruct
  • CMyToolTipCtrl
  • CMyTreeCtrl
  • CNetAddressCtrlPage
  • CNetAddrVerifierApp
  • CNetAddrVerifierDlg
  • CNewAmbientPropertyDlg
  • CNewControlsApp
  • CNextWizardDialog
  • CNotepadApp
  • CNotepadDoc
  • CNotepadView
  • CNotifyShowCase
  • CObjectData
  • CObjListView
  • CObjTreeView
  • COIPF
  • COle2ViewApp
  • COle2ViewDoc
  • COleClientApp
  • COlePropertiesEx
  • ColourTableEntry
  • COnCmdMsg
  • COptionsDlg
  • COptionsPage1
  • COptionsPage12
  • COptionsPage21
  • COptionsPage22
  • COptionsPage31
  • COptionsPage32
  • COutlookDemoApp
  • COutlookDemoDoc
  • COutlookDemoView
  • COutlookMultiViewsApp
  • COutlookMultiViewsDoc
  • COutlookMultiViewsView
  • COutputBar
  • COutputList
  • COutputList1
  • COutputToolBar
  • COutputViewBar
  • COutputWindowView
  • COwnerDrawDescrProp
  • COwnerDrawMenuApp
  • COwnerDrawMenuDoc
  • COwnerDrawMenuView
  • CPadDoc
  • CPadFrame
  • CPadView
  • CPage1
  • CPage2
  • CPage3
  • CPage4
  • CPage5
  • CPage6
  • CPagerCtrlPage
  • CPalApp
  • CPalCtrl
  • CPaletteBar
  • CPaletteDemoApp
  • CPaletteDemoDoc
  • CPaletteDemoView
  • CPalPropPage
  • CParaFormat
  • CParsedEdit
    • CParsedEditExported
  • CPasswordProp
  • CPenWidthsDlg
  • CPointArrayView
  • CPreviewPane
  • CProgCtrlPage
  • CProgressBarTaskDialog
  • CPropDlgApp
  • CPropertiesDlg
  • CPropertiesToolBar
  • CPropertiesViewBar
  • CProperty
  • CPropertyBag
  • CPropertyBagDlg
  • CPropertyBagItem
  • CPropertyChangesPage
  • CPropertyEditRequestsPage
  • CPropertyEditRequestsPage::CPropertyInfo
  • CPropertySection
  • CPropertySet
  • CPropSheetDemoApp
  • CPropSheetDemoDlg
  • CPropSliderCtrl
  • CPushApp
  • CPushCtrl
  • CPushPropPage
  • CRateDlg
  • CRebarTestApp
  • CRebarTestDoc
  • CRebarTestView
  • CRecalcApp
  • CRecalcDoc
  • CRecalcThreadInfo
  • CRecalcView
  • CRectDlg
  • CRectItem
  • CRegEntry
  • CRegisterControlsDlg
  • CRegistryView
  • CRemoteCalcDlg
  • CResourcePage
  • CResourceViewBar
  • CRibbonGadgetsApp
  • CRibbonGadgetsDoc
  • CRibbonGadgetsView
  • CRibbonListButton
  • CRibbonListFontButton
  • CRibbonListFontButton::XItem
  • CRibbonMDIDemoApp
  • CRibbonMDIDemoDoc
  • CRibbonMDIDemoView
  • CRibbonTableButton
  • CRibbonTooltipCtrl
  • CRoamer
    • CLeader
      • CBrightLeader
      • CHueLeader
    • CLlama
  • CRollupPaneApp
  • CRollupPaneDoc
  • CRollupPaneView
  • CRowListApp
  • CRowListDoc
  • CRulerBar
  • CRulerItem
    • CComboRulerItem
    • CComboRulerItem
    • CTabRulerItem
    • CTabRulerItem
  • CSchedulerApp
  • CSchedulerDlg
  • CScreenCapApp
  • CScribbleApp
  • CScribbleDoc
  • CScribbleItem
  • CScribbleView
  • CScript
  • CScriptManager
  • CSearchBox
  • CServerApp
  • CServerDC
  • CServerDoc
  • CServerItem
  • CServerNode
  • CServerView
  • CServicesPage
  • CSetPaneSizeApp
  • CSetPaneSizeDoc
  • CSetPaneSizeView
  • CSetTabStops
  • CShape
  • CShapePreviewWnd
  • CShapePropSheetFrame
  • CShapesDoc
  • CShapesView
  • CShellTreeCtrl
  • CSliderApp
  • CSliderButton
  • CSliderCtrlPage
  • CSliderDoc
  • CSliderProp
  • CSliderView
  • CSmartFuncDesc
  • CSmartTypeAttr
  • CSmartVarDesc
  • CSnapApp
  • CSnapDoc
  • CSnapPropertySheet
  • CSnapView
  • CSourceView
  • CSpeakNApp
  • CSpeakNDlg
  • CSpeedDlg
  • CSpinCtrlPage
  • CSpindialApp
  • CSpindialCtrl
  • CSpindialPropPage
  • CSpinEditDlg
  • CSpiroApp
  • CSpiroDoc
  • CSpiroRect
  • CSpiroView
  • CSplashWnd
  • CSplitButtonCtrlPage
  • CSplitFrame
  • CSplitterFrame
  • CSSE2Unsigned16Saturated
  • CStandardBar
  • CStartView
  • CStateCollectionApp
  • CStateCollectionDoc
  • CStateCollectionView
  • CStatPage
  • CStatusBarDemoApp
  • CStatusBarDemoDoc
  • CStatusBarDemoView
  • CStringCollect
  • CStringListView
  • CStroke
  • CStyleBar
  • CStylePage
  • CSubEditDlg
  • CSummInfo
  • CSummPage
  • CSurface
    • CMMXSurface16Intrinsic
    • CMMXSurface24Intrinsic
    • CMMXSurface32Intrinsic
    • CSSE2Surface16Intrinsic
    • CSSE2Surface24Intrinsic
    • CSSE2Surface32Intrinsic
  • CSwarm
  • CTabbedViewApp
  • CTabbedViewDoc
  • CTabbedViewView
  • CTabControlApp
  • CTabControlDoc
  • CTabControlView
  • CTabOrderDlg
  • CTaskDialogTestApp
  • CTaskDialogTestDlg
  • CTaskPane
  • CTasksPaneApp
  • CTasksPaneDoc
  • CTasksPaneView
  • CTBComboBox
  • CTCBindHost
  • CTCCommandLineInfo
  • CTCExtPage
  • CTCOptions
  • CTCPropsModule
  • CTCSplitter
  • CTestApp
  • CTestContainer98App
  • CTestContainer98Doc
  • CTestContainer98Item
  • CTestContainer98View
  • CTesthelpApp
  • CTesthelpCtrl
  • CTesthelpPropPage
  • CTestWindow
  • CTextDoc
  • CTextView
  • CTheApp
  • CThreadApp
  • CThreadDoc
  • CThreadView
  • CTimeApp
  • CTimeCtrl
  • CTimePropPage
  • CToolBarCtrlPage
  • CToolbarDateTimePickerApp
  • CToolbarDateTimePickerDoc
  • CToolbarDateTimePickerView
  • CToolbarLabel
  • CToolDlg
  • CToolsPalette
  • CTooltipDemoApp
  • CTooltipDemoDoc
  • CTooltipDemoView
  • CTrackerApp
  • CTrackerDoc
  • CTrackerView
  • CTrackFile
    • COEMFile
    • COEMFile
  • CTrayMenuApp
  • CTrayMenuDlg
  • CTreeCtrlPage
  • CTreeItem
  • CTwoButtonsProp
  • CTypedPtrArrayView
  • CTypedPtrListView
  • CTypedPtrMapView
  • CTypeLibListView
  • CTypeLibODLView
  • CTypeLibTreeView
  • CTypeLibWnd
  • CUndoBar
  • CUndoButton
  • CUndoListBox
  • CUndoMenu
  • CUnit
  • CVariantAssoc
  • CVariantMap
  • CVarUseApp
  • CVarUseDlg
  • CVector
  • CView1
  • CView2
  • CView3
  • CView4
  • CViewExApp
  • CViewExSplitWnd
  • CVisualStudioDemoApp
  • CVisualStudioDemoDoc
  • CVisualStudioDemoView
  • CWatchBar
  • CWclsEditDlg
  • CWizardDialog
  • CWordPadApp
  • CWordPadCntrItem
  • CWordPadCommandLineInfo
  • CWordPadDoc
  • CWordPadResizeBar
  • CWordPadView
  • CWorkspaceBar
  • CWorkspaceBar2
  • CWorkspaceObj
  • CWorkspaceToolBar
  • CWorkSpaceToolBarApp
  • CWorkSpaceToolBarDoc
  • CWorkSpaceToolBarView
  • CXlistApp
  • CXlistCtrl
  • CXlistPropPage
  • CZoomDlg
  • DICTENTRY
  • DICTENTRYHEADER
  • DocType
  • DrawClientHandlersLib::DrawCliLiveIconsHandler
  • DrawClientHandlersLib::DrawCliSearchHandler
  • DynaMenuDef
  • IDrawCliLiveIconsHandler
  • IDrawCliSearchHandler
  • IMAGELib::_DImage
  • IMAGELib::_DImageEvents
  • IMAGELib::Image
  • inproc::CStringCollect
  • inproc::CVariantAssoc
  • inproc::CVariantMap
  • inproc::IStringCollect
  • inproc::IVariantAssoc
  • inproc::IVariantMap
  • INVOKEKIND_ENTRY
  • LicensedLib::_DLicensed
  • LicensedLib::_DLicensedEvents
  • LicensedLib::Licensed
  • LocalizeLib::_DLocalize
  • LocalizeLib::_DLocalizeEvents
  • LocalizeLib::Localize
  • mfccalc::CCCalcDlg
  • mfccalc::ICalcDlg
  • MSOfficeDemoKey
  • NewControlsPropSheet
  • notif_tag
  • PalLib::_DPal
  • PalLib::_DPalEvents
  • PalLib::Pal
  • PushLib::_DPush
  • PushLib::_DPushEvents
  • PushLib::Push
  • QAAMBIENTENTRY
  • SHAPE_COLOR
  • SpindialLib::_DSpindial
  • SpindialLib::_DSpindialEvents
  • SpindialLib::Spindial
  • tagABSTIME
  • tagANIMATEINFO
  • tagBOXEDITINFO
  • tagBOXLAYOUT
  • tagBOXRESULTS
  • tagCALBSTRUCT
  • tagCOLUMNSTRUCT
  • tagCTLINITBEDIT
  • tagCTLINITHEDIT
  • tagCTLINITIEDIT
  • tagFORMATIDOFFSET
  • tagGUIDE
  • tagIMECOLORS
  • tagINKINGINFO
  • tagINPPARAMS
  • tagINTERVAL
  • tagITEMDATA
  • tagOEM_PENPACKET
  • tagOEMPENINFO
  • tagPCMINFO
  • tagPDEVENT
  • tagPENDATAHEADER
  • tagPENINFO
  • tagPENPACKET
  • tagPENTIP
  • tagPROPERTYIDOFFSET
  • tagPROPHEADER
  • tagRC
  • tagRCRESULT
  • tagRECTL
  • tagRECTOFS
  • tagSECTIONHEADER
  • tagSTRKFMT
  • tagSTROKEINFO
  • tagSYC
  • tagSYE
  • tagSYG
  • tagTARGET
  • tagTARGINFO
  • tagVS_VERSION
  • TCPropsLib::ITCExtendedControl
  • TCPropsLib::TCExtPage
  • TestContainer98::Document
  • TestContainer98::ITestContainer98
  • TestContainer98::ITestContainer98Events
  • TESTHELPLib::_DTesthelp
  • TESTHELPLib::_DTesthelpEvents
  • TESTHELPLib::Testhelp
  • TimeLib::_DTime
  • TimeLib::_DTimeEvents
  • TimeLib::Time
  • VARTYPE_ENTRY
  • XlistLib::_DXlist
  • XlistLib::_DXlistEvents
  • XlistLib::Xlist
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- a -

  • AboutBox : XlistLib::_DXlist , CButtonCtrl , CircLib::_DCirc , CLocalizeCtrl , CTimeCtrl , CXlistCtrl , LocalizeLib::_DLocalize , CCircCtrl , PalLib::_DPal , CPalCtrl , ButtonLib::_DButton , CImageCtrl , CPushCtrl , CSpindialCtrl , LicensedLib::_DLicensed , CTesthelpCtrl , TimeLib::_DTime
  • AboutBoxInFrench() : LocalizeLib::_DLocalize
  • AboutBoxInGerman() : LocalizeLib::_DLocalize
  • Activate() : TCPropsLib::ITCExtendedControl
  • ActivateByTab() : CMainFrame
  • ActivateFrame() : CPadFrame , CMainFrame , CChildFrame , CMainFrame
  • ActivateRibbonContextCategory() : CMainFrame
  • active : CDrawObj
  • ActsLikeButton() : CTestContainer98Item
  • Add : inproc::IStringCollect , CDrawDoc , CStringCollect , CDrawDoc
  • Add_Category1() : CMainFrame
  • Add_Category2() : CMainFrame
  • Add_Category3() : CMainFrame
  • Add_Category4() : CMainFrame
  • Add_Category5() : CMainFrame
  • Add_Category6() : CMainFrame
  • Add_MainPanel() : CMainFrame
  • Add_QAT() : CMainFrame
  • AddAmbientProperty() : CTestContainer98Doc
  • AddButton() : CButtonDialog
  • AddButtons() : CButtonDialog
  • AddColorItem() : CColorListBox
  • AddCommand() : CFigure
  • AddContextTab_Chart() : CMainFrame
  • AddContextTab_Format() : CMainFrame
  • AddContextTab_Picture() : CMainFrame
  • AddContextTab_Table() : CMainFrame
  • AddControl() : CTestContainer98Doc
  • AddControlPages() : CAllControlsSheet
  • AddCountToEditTime() : CSummInfo
  • AddFont() : CFontComboBox
  • AddGroup() : CRibbonListButton , CRibbonListFontButton
  • AddIntToListBox() : CIntListView
  • AddItem() : CXlistCtrl , CObjListView , CIDataObjectDlg , CTestContainer98Doc
  • AddLine() : CNotifyShowCase
  • AddMainCategory() : CMainFrame
  • AddMapEntryToListBox() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView
  • AddMRUEntry() : CMacroComboBox
  • AddMyObjectToListBox() : CTypedPtrArrayView
  • AddMyStructToListBox() : CTypedPtrListView
  • AddNamedItem() : CScript , CScriptManager
  • AddNamedItems() : CScriptManager
  • AddNotification() : CTabControlView
  • AddOption() : CComboBoxExProp
  • AddPanelArrange() : CMainFrame
  • AddPicItem : XlistLib::_DXlist , CXlistCtrl
  • AddPoint() : CDrawPoly
  • AddPointToListBox() : CPointArrayView
  • AddProperty() : CPropertySection , CPropertySet , CPropertySection , CPropertySet
  • AddressKind : CNetAddrVerifierDlg
  • AddSection() : CPropertySet
  • AddShape() : CShapesDoc
  • AddString() : CListOutputFrame , CHistoryList
  • AddSubMenu() : CMyMenuBar
  • AddTab() : COutputBar
  • AddTab_Developer() : CMainFrame
  • AddTab_Home() : CMainFrame
  • AddTab_Insert() : CMainFrame
  • AddTab_Mailings() : CMainFrame
  • AddTab_PageLayout() : CMainFrame
  • AddTab_References() : CMainFrame
  • AddTab_Review() : CMainFrame
  • AddTab_View() : CMainFrame
  • AddTabToArray() : CFormatTabDlg
  • AddTextFontItem : XlistLib::_DXlist , CXlistCtrl
  • AddTextItem : XlistLib::_DXlist , CXlistCtrl
  • AddToListBox() : CMutexesDlg
  • AddURLToHistory() : CIEDemoDoc
  • AddWorkSpace() : CMainFrame
  • AdjusrHorzScroll() : COutputViewBar , COutputBar
  • AdjustButtonRect() : CTwoButtonsProp
  • AdjustClientArea() : CMainFrame
  • AdjustColorsMenu() : CMainFrame
  • AdjustDockingLayout() : CMainFrame
  • AdjustHour() : CSchedulerDlg
  • AdjustItemPosition() : CMainDoc
  • AdjustLayout() : CDynamicHelpViewBar , CPropertiesViewBar , CWorkspaceBar , CFileViewBar , CWorkspaceToolBar , CClassViewBar , CPropertiesViewBar
  • AdjustLocations() : CToolsPalette
  • AdjustObjectSubmenu() : CMainFrame
  • AdjustRect() : CTestContainer98Item
  • AdjustWidth() : CMMXSurface32Intrinsic , CSSE2Surface24Intrinsic , CSSE2Surface32Intrinsic , CMailBar , CSurface , CMMXSurface16Intrinsic , CSSE2Surface16Intrinsic
  • AdvanceLesson() : CSpeakNDlg
  • AdvanceTrace() : CRing , CWheel , CBasePiece
  • alc : tagRC
  • alcPriority : tagRC
  • AllKinds : CNetAddrVerifierDlg
  • AllocValue() : CProperty
  • AllowChangeTextLabels() : CLinksBar
  • AllowShowOnList() : CPropertiesToolBar , CToolsPalette , CHelpToolBar , COutputToolBar , CPropertiesToolBar , CClassToolBar , CFileViewToolBar , CWorkspaceToolBar
  • AllowShowOnPaneMenu() : CMailBar , CMyOutlookBar
  • AndNot() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • AppendColorMenuItem() : CColorMenu
  • Apply() : CTCExtPage
  • ApplyChanges() : CAnimateCtrlPage
  • atBegin : tagINTERVAL
  • atEnd : tagINTERVAL
  • AttachCustomMenu() : CTestWindow
  • AutoSize() : CImageCtrl
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Namespace Index

  • Namespace List
  • Namespace Members

Namespace List

Here is a list of all namespaces with brief descriptions:
ACDual
AutoClik
ButtonLib
CircLib
DrawClientHandlersLib
IMAGELib
inproc
LicensedLib
LocalizeLib
mfccalc
PalLib
PushLib
SpindialLib
TCPropsLib
TestContainer98
TESTHELPLib
TimeLib
XlistLib
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ACDual Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

ACDual Namespace Reference

Classes

class | Document
interface | IAClick
interface | IAutoClickPoint
interface | IDualAClick
interface | IDualAutoClickPoint
class | Point

Functions

importlib ("stdole32.tlb")

Function Documentation

ACDual::importlib ( "stdole32.tlb" )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: AutoClik Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

AutoClik Namespace Reference

Classes

class | CAutoClickDoc
class | CAutoClickPoint
interface | IAClick
interface | IAutoClickPoint

Functions

importlib ("stdole32.tlb")

Function Documentation

AutoClik::importlib ( "stdole32.tlb" )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ButtonLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

ButtonLib Namespace Reference

Classes

interface | _DButton
interface | _DButtonEvents
class | Button

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

ButtonLib::importlib ( STDOLE_TLB )
ButtonLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: CircLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

CircLib Namespace Reference

Classes

interface | _DCirc
interface | _DCircEvents
class | Circ

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

CircLib::importlib ( STDOLE_TLB )
CircLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: DrawClientHandlersLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

DrawClientHandlersLib Namespace Reference

Classes

class | DrawCliLiveIconsHandler
class | DrawCliSearchHandler

Functions

importlib ("stdole2.tlb")

Function Documentation

DrawClientHandlersLib::importlib ( "stdole2.tlb" )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: IMAGELib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

IMAGELib Namespace Reference

Classes

interface | _DImage
interface | _DImageEvents
class | Image

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

IMAGELib::importlib ( STDOLE_TLB )
IMAGELib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: inproc Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

inproc Namespace Reference

Classes

class | CStringCollect
class | CVariantAssoc
class | CVariantMap
interface | IStringCollect
interface | IVariantAssoc
interface | IVariantMap

Functions

importlib ("stdole32.tlb")

Function Documentation

inproc::importlib ( "stdole32.tlb" )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LicensedLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

LicensedLib Namespace Reference

Classes

interface | _DLicensed
interface | _DLicensedEvents
class | Licensed

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

LicensedLib::importlib ( STDOLE_TLB )
LicensedLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: LocalizeLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

LocalizeLib Namespace Reference

Classes

interface | _DLocalize
interface | _DLocalizeEvents
class | Localize

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

LocalizeLib::importlib ( STDOLE_TLB )
LocalizeLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: mfccalc Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

mfccalc Namespace Reference

Classes

class | CCCalcDlg
interface | ICalcDlg

Functions

importlib ("stdole32.tlb")

Function Documentation

mfccalc::importlib ( "stdole32.tlb" )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PalLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

PalLib Namespace Reference

Classes

interface | _DPal
interface | _DPalEvents
class | Pal

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

PalLib::importlib ( STDOLE_TLB )
PalLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: PushLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

PushLib Namespace Reference

Classes

interface | _DPush
interface | _DPushEvents
class | Push

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

PushLib::importlib ( STDOLE_TLB )
PushLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: SpindialLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

SpindialLib Namespace Reference

Classes

interface | _DSpindial
interface | _DSpindialEvents
class | Spindial

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

SpindialLib::importlib ( STDOLE_TLB )
SpindialLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TCPropsLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

TCPropsLib Namespace Reference

Classes

interface | ITCExtendedControl
class | TCExtPage

Functions

importlib ("stdole32.tlb")
importlib ("stdole2.tlb")

Function Documentation

TCPropsLib::importlib ( "stdole32.tlb" )
TCPropsLib::importlib ( "stdole2.tlb" )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TestContainer98 Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

TestContainer98 Namespace Reference

Classes

class | Document
interface | ITestContainer98
interface | ITestContainer98Events

Functions

importlib ("stdole32.tlb")

Function Documentation

TestContainer98::importlib ( "stdole32.tlb" )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TESTHELPLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

TESTHELPLib Namespace Reference

Classes

interface | _DTesthelp
interface | _DTesthelpEvents
class | Testhelp

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

TESTHELPLib::importlib ( STDOLE_TLB )
TESTHELPLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: TimeLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

TimeLib Namespace Reference

Classes

interface | _DTime
interface | _DTimeEvents
class | Time

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

TimeLib::importlib ( STDOLE_TLB )
TimeLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: XlistLib Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

XlistLib Namespace Reference

Classes

interface | _DXlist
interface | _DXlistEvents
class | Xlist

Functions

importlib (STDOLE_TLB)
importlib (STDTYPE_TLB)

Function Documentation

XlistLib::importlib ( STDOLE_TLB )
XlistLib::importlib ( STDTYPE_TLB )
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
Here is a list of all namespace members with links to the namespace documentation for each member:
  • importlib() : ButtonLib , DrawClientHandlersLib , TestContainer98 , TCPropsLib , mfccalc , inproc , AutoClik , ACDual , XlistLib , TimeLib , TESTHELPLib , SpindialLib , PushLib , PalLib , LocalizeLib , LicensedLib , IMAGELib , CircLib , ButtonLib
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: File Index

  • File List
  • File Members

File List

Here is a list of all files with brief descriptions:
advanced/collect/collect.cpp [code]
advanced/collect/collect.h [code]
advanced/collect/colledoc.cpp [code]
advanced/collect/colledoc.h [code]
advanced/collect/collevw.cpp [code]
advanced/collect/collevw.h [code]
advanced/collect/dwarryvw.cpp [code]
advanced/collect/dwarryvw.h [code]
advanced/collect/intlstvw.cpp [code]
advanced/collect/intlstvw.h [code]
advanced/collect/mainfrm.cpp [code]
advanced/collect/mainfrm.h [code]
advanced/collect/mapdwvw.cpp [code]
advanced/collect/mapdwvw.h [code]
advanced/collect/mapssvw.cpp [code]
advanced/collect/mapssvw.h [code]
advanced/collect/ptarryvw.cpp [code]
advanced/collect/ptarryvw.h [code]
advanced/collect/resource.h [code]
advanced/collect/stdafx.cpp [code]
advanced/collect/stdafx.h [code]
advanced/collect/strlstvw.cpp [code]
advanced/collect/strlstvw.h [code]
advanced/collect/typaryvw.cpp [code]
advanced/collect/typaryvw.h [code]
advanced/collect/typlstvw.cpp [code]
advanced/collect/typlstvw.h [code]
advanced/collect/typtrmap.cpp [code]
advanced/collect/typtrmap.h [code]
advanced/cube/cube.cpp [code]
advanced/cube/cube.h [code]
advanced/cube/cubedoc.cpp [code]
advanced/cube/cubedoc.h [code]
advanced/cube/cubeview.cpp [code]
advanced/cube/cubeview.h [code]
advanced/cube/mainfrm.cpp [code]
advanced/cube/mainfrm.h [code]
advanced/cube/resource.h [code]
advanced/cube/stdafx.cpp [code]
advanced/cube/stdafx.h [code]
advanced/dllhusk/dllhusk.cpp [code]
advanced/dllhusk/dllhusk.h [code]
advanced/dllhusk/mainfrm.cpp [code]
advanced/dllhusk/mainfrm.h [code]
advanced/dllhusk/resource.h [code]
advanced/dllhusk/stdafx.cpp [code]
advanced/dllhusk/stdafx.h [code]
advanced/dllhusk/testdll1.cpp [code]
advanced/dllhusk/testdll1.h [code]
advanced/dllhusk/testdll2.cpp [code]
advanced/dllhusk/testdll2.h [code]
advanced/dllhusk/testres1.h [code]
advanced/dllhusk/testres2.h [code]
advanced/DllScreenCap/DllScreenCap/ConfigDlg.cpp [code]
advanced/DllScreenCap/DllScreenCap/ConfigDlg.h [code]
advanced/DllScreenCap/DllScreenCap/DllScreenCap.cpp [code]
advanced/DllScreenCap/DllScreenCap/DllScreenCap.h [code]
advanced/DllScreenCap/DllScreenCap/Exports.cpp [code]
advanced/DllScreenCap/DllScreenCap/Resource.h [code]
advanced/DllScreenCap/DllScreenCap/ScreenCapApi.h [code]
advanced/DllScreenCap/DllScreenCap/stdafx.cpp [code]
advanced/DllScreenCap/DllScreenCap/stdafx.h [code]
advanced/DllScreenCap/ScreenCap/ChildView.cpp [code]
advanced/DllScreenCap/ScreenCap/ChildView.h [code]
advanced/DllScreenCap/ScreenCap/MainFrm.cpp [code]
advanced/DllScreenCap/ScreenCap/MainFrm.h [code]
advanced/DllScreenCap/ScreenCap/Resource.h [code]
advanced/DllScreenCap/ScreenCap/ScreenCap.cpp [code]
advanced/DllScreenCap/ScreenCap/ScreenCap.h [code]
advanced/DllScreenCap/ScreenCap/stdafx.cpp [code]
advanced/DllScreenCap/ScreenCap/stdafx.h [code]
advanced/mtgdi/mainfrm.cpp [code]
advanced/mtgdi/mainfrm.h [code]
advanced/mtgdi/mtgdi.cpp [code]
advanced/mtgdi/mtgdi.h [code]
advanced/mtgdi/mtgdidoc.cpp [code]
advanced/mtgdi/mtgdidoc.h [code]
advanced/mtgdi/mtgdivw.cpp [code]
advanced/mtgdi/mtgdivw.h [code]
advanced/mtgdi/resource.h [code]
advanced/mtgdi/stdafx.cpp [code]
advanced/mtgdi/stdafx.h [code]
advanced/mtgdi/threads.cpp [code]
advanced/mtgdi/threads.h [code]
advanced/mtmdi/bounce.cpp [code]
advanced/mtmdi/bounce.h [code]
advanced/mtmdi/hello.cpp [code]
advanced/mtmdi/hello.h [code]
advanced/mtmdi/mainfrm.cpp [code]
advanced/mtmdi/mainfrm.h [code]
advanced/mtmdi/mdi.cpp [code]
advanced/mtmdi/mdi.h [code]
advanced/mtmdi/mtbounce.cpp [code]
advanced/mtmdi/mtbounce.h [code]
advanced/mtmdi/resource.h [code]
advanced/mtmdi/stdafx.cpp [code]
advanced/mtmdi/stdafx.h [code]
advanced/mtrecalc/calcthrd.cpp [code]
advanced/mtrecalc/calcthrd.h [code]
advanced/mtrecalc/mainfrm.cpp [code]
advanced/mtrecalc/mainfrm.h [code]
advanced/mtrecalc/mtrecalc.cpp [code]
advanced/mtrecalc/mtrecalc.h [code]
advanced/mtrecalc/recalcvw.cpp [code]
advanced/mtrecalc/recalcvw.h [code]
advanced/mtrecalc/recaldoc.cpp [code]
advanced/mtrecalc/recaldoc.h [code]
advanced/mtrecalc/resource.h [code]
advanced/mtrecalc/slowcalc.cpp [code]
advanced/mtrecalc/slowcalc.h [code]
advanced/mtrecalc/speeddlg.cpp [code]
advanced/mtrecalc/speeddlg.h [code]
advanced/mtrecalc/stdafx.cpp [code]
advanced/mtrecalc/stdafx.h [code]
advanced/mutexes/mutexdlg.cpp [code]
advanced/mutexes/mutexdlg.h [code]
advanced/mutexes/mutexes.cpp [code]
advanced/mutexes/mutexes.h [code]
advanced/mutexes/resource.h [code]
advanced/mutexes/stdafx.cpp [code]
advanced/mutexes/stdafx.h [code]
advanced/mutexes/threads.cpp [code]
advanced/mutexes/threads.h [code]
advanced/speakn/resource.h [code]
advanced/speakn/speakn.cpp [code]
advanced/speakn/speakn.h [code]
advanced/speakn/stdafx.cpp [code]
advanced/speakn/stdafx.h [code]
controls/button/btnctl.cpp [code]
controls/button/btnctl.h [code]
controls/button/btnppg.cpp [code]
controls/button/btnppg.h [code]
controls/button/button.cpp [code]
controls/button/button.h [code]
controls/button/button.odl [code]
controls/button/resource.h [code]
controls/button/stdafx.cpp [code]
controls/button/stdafx.h [code]
controls/circ/circ.cpp [code]
controls/circ/circ.h [code]
controls/circ/circ.odl [code]
controls/circ/circctl.cpp [code]
controls/circ/circctl.h [code]
controls/circ/circppg.cpp [code]
controls/circ/circppg.h [code]
controls/circ/resource.h [code]
controls/circ/stdafx.cpp [code]
controls/circ/stdafx.h [code]
controls/cmnctrl/AllControlsSheet.cpp [code]
controls/cmnctrl/AllControlsSheet.h [code]
controls/cmnctrl/CmnCtrl3.cpp [code]
controls/cmnctrl/CmnCtrl3.h [code]
controls/cmnctrl/CmnCtrl3Dlg.cpp [code]
controls/cmnctrl/CmnCtrl3Dlg.h [code]
controls/cmnctrl/CommandLinkCtrlPage.cpp [code]
controls/cmnctrl/CommandLinkCtrlPage.h [code]
controls/cmnctrl/NetAddressCtrlPage.cpp [code]
controls/cmnctrl/NetAddressCtrlPage.h [code]
controls/cmnctrl/PagerCtrlPage.cpp [code]
controls/cmnctrl/PagerCtrlPage.h [code]
controls/cmnctrl/resource.h [code]
controls/cmnctrl/SplitButtonCtrlPage.cpp [code]
controls/cmnctrl/SplitButtonCtrlPage.h [code]
controls/cmnctrl/stdafx.cpp [code]
controls/cmnctrl/stdafx.h [code]
controls/cmnctrl/targetver.h [code]
controls/contain/childfrm.cpp [code]
controls/contain/childfrm.h [code]
controls/contain/cntritem.cpp [code]
controls/contain/cntritem.h [code]
controls/contain/contain.cpp [code]
controls/contain/contain.h [code]
controls/contain/contrdoc.cpp [code]
controls/contain/contrdoc.h [code]
controls/contain/contrvw.cpp [code]
controls/contain/contrvw.h [code]
controls/contain/mainfrm.cpp [code]
controls/contain/mainfrm.h [code]
controls/contain/resource.h [code]
controls/contain/stdafx.cpp [code]
controls/contain/stdafx.h [code]
controls/IMAGE/bmpprop.cpp [code]
controls/IMAGE/bmpprop.h [code]
controls/IMAGE/image.cpp [code]
controls/IMAGE/image.h [code]
controls/IMAGE/image.odl [code]
controls/IMAGE/ImageCtl.cpp [code]
controls/IMAGE/ImageCtl.h [code]
controls/IMAGE/ImagePpg.cpp [code]
controls/IMAGE/ImagePpg.h [code]
controls/IMAGE/Resource.h [code]
controls/IMAGE/StdAfx.cpp [code]
controls/IMAGE/StdAfx.h [code]
controls/licensed/licenctl.cpp [code]
controls/licensed/licenctl.h [code]
controls/licensed/licenppg.cpp [code]
controls/licensed/licenppg.h [code]
controls/licensed/licensed.cpp [code]
controls/licensed/licensed.h [code]
controls/licensed/licensed.odl [code]
controls/licensed/resource.h [code]
controls/licensed/stdafx.cpp [code]
controls/licensed/stdafx.h [code]
controls/localize/localctl.cpp [code]
controls/localize/localctl.h [code]
controls/localize/localide.odl [code]
controls/localize/localifr.odl [code]
controls/localize/localize.cpp [code]
controls/localize/localize.h [code]
controls/localize/localize.odl [code]
controls/localize/localppg.cpp [code]
controls/localize/localppg.h [code]
controls/localize/locresde.cpp [code]
controls/localize/locresfr.cpp [code]
controls/localize/resource.h [code]
controls/localize/stdafx.cpp [code]
controls/localize/stdafx.h [code]
controls/netaddr/NetAddrVerifier.cpp [code]
controls/netaddr/NetAddrVerifier.h [code]
controls/netaddr/NetAddrVerifierDlg.cpp [code]
controls/netaddr/NetAddrVerifierDlg.h [code]
controls/netaddr/resource.h [code]
controls/netaddr/stdafx.cpp [code]
controls/netaddr/stdafx.h [code]
controls/pal/pal.cpp [code]
controls/pal/pal.h [code]
controls/pal/pal.odl [code]
controls/pal/palctl.cpp [code]
controls/pal/palctl.h [code]
controls/pal/palppg.cpp [code]
controls/pal/palppg.h [code]
controls/pal/resource.h [code]
controls/pal/stdafx.cpp [code]
controls/pal/stdafx.h [code]
controls/push/push.cpp [code]
controls/push/push.h [code]
controls/push/push.odl [code]
controls/push/pushctl.cpp [code]
controls/push/pushctl.h [code]
controls/push/pushppg.cpp [code]
controls/push/pushppg.h [code]
controls/push/resource.h [code]
controls/push/stdafx.cpp [code]
controls/push/stdafx.h [code]
controls/regsvr/regsvr.cpp [code]
controls/regsvr/resource.h [code]
controls/regsvr/version.h [code]
controls/spindial/resource.h [code]
controls/spindial/spinctl.cpp [code]
controls/spindial/spinctl.h [code]
controls/spindial/spindial.cpp [code]
controls/spindial/spindial.h [code]
controls/spindial/spindial.odl [code]
controls/spindial/spinppg.cpp [code]
controls/spindial/spinppg.h [code]
controls/spindial/stdafx.cpp [code]
controls/spindial/stdafx.h [code]
controls/testhelp/resource.h [code]
controls/testhelp/StdAfx.cpp [code]
controls/testhelp/StdAfx.h [code]
controls/testhelp/testhelp.cpp [code]
controls/testhelp/testhelp.h [code]
controls/testhelp/testhelp.odl [code]
controls/testhelp/ThelpCtl.cpp [code]
controls/testhelp/ThelpCtl.h [code]
controls/testhelp/ThelpPpg.cpp [code]
controls/testhelp/ThelpPpg.h [code]
controls/testhelp/hlp/popups.h [code]
controls/time/resource.h [code]
controls/time/stdafx.cpp [code]
controls/time/stdafx.h [code]
controls/time/time.cpp [code]
controls/time/time.h [code]
controls/time/time.odl [code]
controls/time/timectl.cpp [code]
controls/time/timectl.h [code]
controls/time/timeppg.cpp [code]
controls/time/timeppg.h [code]
controls/xlist/resource.h [code]
controls/xlist/stdafx.cpp [code]
controls/xlist/stdafx.h [code]
controls/xlist/xlist.cpp [code]
controls/xlist/xlist.h [code]
controls/xlist/xlist.odl [code]
controls/xlist/xlistctl.cpp [code]
controls/xlist/xlistctl.h [code]
controls/xlist/xlistppg.cpp [code]
controls/xlist/xlistppg.h [code]
general/clipart/resource.h [code]
general/CmnCtrl1/animctrl.cpp [code]
general/CmnCtrl1/animctrl.h [code]
general/CmnCtrl1/CmnCtrl1.cpp [code]
general/CmnCtrl1/CmnCtrl1.h [code]
general/CmnCtrl1/DateTime.cpp [code]
general/CmnCtrl1/DateTime.h [code]
general/CmnCtrl1/MonthCal.cpp [code]
general/CmnCtrl1/MonthCal.h [code]
general/CmnCtrl1/mtreectl.cpp [code]
general/CmnCtrl1/mtreectl.h [code]
general/CmnCtrl1/notifwdw.cpp [code]
general/CmnCtrl1/notifwdw.h [code]
general/CmnCtrl1/propsht.cpp [code]
general/CmnCtrl1/propsht.h [code]
general/CmnCtrl1/resource.h [code]
general/CmnCtrl1/StdAfx.cpp [code]
general/CmnCtrl1/StdAfx.h [code]
general/CmnCtrl1/toolbar1.cpp [code]
general/CmnCtrl1/toolbar1.h [code]
general/CmnCtrl1/toolbar2.cpp [code]
general/CmnCtrl1/toolbar2.h [code]
general/CmnCtrl1/toolpage.cpp [code]
general/CmnCtrl1/toolpage.h [code]
general/CmnCtrl1/treecpg.cpp [code]
general/CmnCtrl1/treecpg.h [code]
general/CmnCtrl2/CmnCtrl2.cpp [code]
general/CmnCtrl2/CmnCtrl2.h [code]
general/CmnCtrl2/notifwdw.cpp [code]
general/CmnCtrl2/notifwdw.h [code]
general/CmnCtrl2/progctrl.cpp [code]
general/CmnCtrl2/progctrl.h [code]
general/CmnCtrl2/propsht.cpp [code]
general/CmnCtrl2/propsht.h [code]
general/CmnCtrl2/resource.h [code]
general/CmnCtrl2/slidctrl.cpp [code]
general/CmnCtrl2/slidctrl.h [code]
general/CmnCtrl2/spinctrl.cpp [code]
general/CmnCtrl2/spinctrl.h [code]
general/CmnCtrl2/StdAfx.cpp [code]
general/CmnCtrl2/StdAfx.h [code]
general/CTaskDialog/CTaskDialogDemo.cpp [code]
general/CTaskDialog/CTaskDialogDemo.h [code]
general/CTaskDialog/CTaskDialogDemoDlg.cpp [code]
general/CTaskDialog/CTaskDialogDemoDlg.h [code]
general/CTaskDialog/Resource.h [code]
general/CTaskDialog/stdafx.cpp [code]
general/CTaskDialog/stdafx.h [code]
general/CTaskDialog/targetver.h [code]
general/ctrlbars/ctrlbars.cpp [code]
general/ctrlbars/ctrlbars.h [code]
general/ctrlbars/mainfrm.cpp [code]
general/ctrlbars/mainfrm.h [code]
general/ctrlbars/palette.cpp [code]
general/ctrlbars/palette.h [code]
general/ctrlbars/resource.h [code]
general/ctrlbars/stdafx.cpp [code]
general/ctrlbars/stdafx.h [code]
general/ctrltest/bbutton.cpp [code]
general/ctrltest/ctrltest.cpp [code]
general/ctrltest/ctrltest.h [code]
general/ctrltest/custlist.cpp [code]
general/ctrltest/custmenu.cpp [code]
general/ctrltest/dertest.cpp [code]
general/ctrltest/paredit.cpp [code]
general/ctrltest/paredit.h [code]
general/ctrltest/paredit2.cpp [code]
general/ctrltest/resource.h [code]
general/ctrltest/spintest.cpp [code]
general/ctrltest/stdafx.cpp [code]
general/ctrltest/stdafx.h [code]
general/ctrltest/subtest.cpp [code]
general/ctrltest/wclstest.cpp [code]
general/ctrltest/res/otherids.h [code]
general/DBVList/DBVList.cpp [code]
general/DBVList/DBVList.h [code]
general/DBVList/DBVListDoc.cpp [code]
general/DBVList/DBVListDoc.h [code]
general/DBVList/DBVListSet.cpp [code]
general/DBVList/DBVListSet.h [code]
general/DBVList/DBVListView.cpp [code]
general/DBVList/DBVListView.h [code]
general/DBVList/EmpView.cpp [code]
general/DBVList/EmpView.h [code]
general/DBVList/MainFrm.cpp [code]
general/DBVList/MainFrm.h [code]
general/DBVList/resource.h [code]
general/DBVList/StdAfx.cpp [code]
general/DBVList/StdAfx.h [code]
general/diblook/dibapi.cpp [code]
general/diblook/dibapi.h [code]
general/diblook/dibdoc.cpp [code]
general/diblook/dibdoc.h [code]
general/diblook/diblook.cpp [code]
general/diblook/diblook.h [code]
general/diblook/dibview.cpp [code]
general/diblook/dibview.h [code]
general/diblook/mainfrm.cpp [code]
general/diblook/mainfrm.h [code]
general/diblook/myfile.cpp [code]
general/diblook/resource.h [code]
general/diblook/stdafx.cpp [code]
general/diblook/stdafx.h [code]
general/dlgcbr32/Aboutdlg.cpp [code]
general/dlgcbr32/Aboutdlg.h [code]
general/dlgcbr32/Dlgbars.cpp [code]
general/dlgcbr32/Dlgbars.h [code]
general/dlgcbr32/Dlgcbar.cpp [code]
general/dlgcbr32/Dlgcbar.h [code]
general/dlgcbr32/Mdlsmain.cpp [code]
general/dlgcbr32/Mdlsmain.h [code]
general/dlgcbr32/Modeless.cpp [code]
general/dlgcbr32/Modeless.h [code]
general/dlgcbr32/Ratedlg.cpp [code]
general/dlgcbr32/Ratedlg.h [code]
general/dlgcbr32/resource.h [code]
general/dlgcbr32/STDAFX.CPP [code]
general/dlgcbr32/STDAFX.H [code]
general/dlgcbr32/Wndlist.cpp [code]
general/dlgcbr32/Wndlist.h [code]
general/dlgtempl/dlgtemp.cpp [code]
general/dlgtempl/dlgtemp.h [code]
general/dlgtempl/itemtemp.cpp [code]
general/dlgtempl/itemtemp.h [code]
general/dlgtempl/resource.h [code]
general/dlgtempl/setupdlg.cpp [code]
general/dlgtempl/setupdlg.h [code]
general/dlgtempl/stdafx.cpp [code]
general/dlgtempl/stdafx.h [code]
general/docktool/dockdoc.cpp [code]
general/docktool/dockdoc.h [code]
general/docktool/docktool.cpp [code]
general/docktool/docktool.h [code]
general/docktool/dockvw.cpp [code]
general/docktool/dockvw.h [code]
general/docktool/editbar.cpp [code]
general/docktool/editbar.h [code]
general/docktool/mainfrm.cpp [code]
general/docktool/mainfrm.h [code]
general/docktool/palette.cpp [code]
general/docktool/palette.h [code]
general/docktool/resource.h [code]
general/docktool/searchbx.cpp [code]
general/docktool/searchbx.h [code]
general/docktool/stdafx.cpp [code]
general/docktool/stdafx.h [code]
general/docktool/tooldlg.cpp [code]
general/docktool/tooldlg.h [code]
general/dynamenu/coloropt.cpp [code]
general/dynamenu/coloropt.h [code]
general/dynamenu/dmdoc.cpp [code]
general/dynamenu/dmdoc.h [code]
general/dynamenu/dmview.cpp [code]
general/dynamenu/dmview.h [code]
general/dynamenu/dynamenu.cpp [code]
general/dynamenu/dynamenu.h [code]
general/dynamenu/mainfrm.cpp [code]
general/dynamenu/mainfrm.h [code]
general/dynamenu/mdichild.cpp [code]
general/dynamenu/mdichild.h [code]
general/dynamenu/resource.h [code]
general/dynamenu/stdafx.cpp [code]
general/dynamenu/stdafx.h [code]
general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.cpp [code]
general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.h [code]
general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.cpp [code]
general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.h [code]
general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.cpp [code]
general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.h [code]
general/FileDlgWatcher/FileDlgWatcher/resource.h [code]
general/FileDlgWatcher/FileDlgWatcher/stdafx.cpp [code]
general/FileDlgWatcher/FileDlgWatcher/stdafx.h [code]
general/FileDlgWatcher/FileDlgWatcher/targetver.h [code]
general/hello/hello.cpp [code]
general/hello/hello.h [code]
general/hello/resource.h [code]
general/hello/stdafx.cpp [code]
general/hello/stdafx.h [code]
general/helloapp/helloapp.cpp [code]
general/ListHdr/LHdrDlg.cpp [code]
general/ListHdr/LHdrDlg.h [code]
general/ListHdr/ListHdr.cpp [code]
general/ListHdr/ListHdr.h [code]
general/ListHdr/mlistctl.cpp [code]
general/ListHdr/mlistctl.h [code]
general/ListHdr/resource.h [code]
general/ListHdr/StdAfx.cpp [code]
general/ListHdr/StdAfx.h [code]
general/mdi/bounce.cpp [code]
general/mdi/bounce.h [code]
general/mdi/hello.cpp [code]
general/mdi/hello.h [code]
general/mdi/mainfrm.cpp [code]
general/mdi/mainfrm.h [code]
general/mdi/mdi.cpp [code]
general/mdi/mdi.h [code]
general/mdi/resource.h [code]
general/mdi/stdafx.cpp [code]
general/mdi/stdafx.h [code]
general/mdidocvw/BncDoc.cpp [code]
general/mdidocvw/BncDoc.h [code]
general/mdidocvw/BncFrm.cpp [code]
general/mdidocvw/BncFrm.h [code]
general/mdidocvw/BncVw.cpp [code]
general/mdidocvw/BncVw.h [code]
general/mdidocvw/HelloDoc.cpp [code]
general/mdidocvw/HelloDoc.h [code]
general/mdidocvw/HelloFrm.cpp [code]
general/mdidocvw/HelloFrm.h [code]
general/mdidocvw/HelloVw.cpp [code]
general/mdidocvw/HelloVw.h [code]
general/mdidocvw/mainfrm.cpp [code]
general/mdidocvw/mainfrm.h [code]
general/mdidocvw/mdi.cpp [code]
general/mdidocvw/mdi.h [code]
general/mdidocvw/resource.h [code]
general/mdidocvw/stdafx.cpp [code]
general/mdidocvw/stdafx.h [code]
general/MMXSwarm/ChildView.cpp [code]
general/MMXSwarm/ChildView.h [code]
general/MMXSwarm/MainFrm.cpp [code]
general/MMXSwarm/MainFrm.h [code]
general/MMXSwarm/MMXSurface.h [code]
general/MMXSwarm/MMXSurface16.cpp [code]
general/MMXSwarm/MMXSurface24.cpp [code]
general/MMXSwarm/MMXSurface32.cpp [code]
general/MMXSwarm/MMXSwarm.cpp [code]
general/MMXSwarm/MMXSwarm.h [code]
general/MMXSwarm/MMXWrapper.h [code]
general/MMXSwarm/Resource.h [code]
general/MMXSwarm/SSE2Surface.h [code]
general/MMXSwarm/SSE2Surface16.cpp [code]
general/MMXSwarm/SSE2Surface24.cpp [code]
general/MMXSwarm/SSE2Surface32.cpp [code]
general/MMXSwarm/SSE2Wrapper.h [code]
general/MMXSwarm/stdafx.cpp [code]
general/MMXSwarm/stdafx.h [code]
general/MMXSwarm/Surface.cpp [code]
general/MMXSwarm/Surface.h [code]
general/MMXSwarm/Swarm.cpp [code]
general/MMXSwarm/Swarm.h [code]
general/modeless/adderdlg.cpp [code]
general/modeless/adderdlg.h [code]
general/modeless/modeldlg.cpp [code]
general/modeless/modeldlg.h [code]
general/modeless/modeless.cpp [code]
general/modeless/modeless.h [code]
general/modeless/resource.h [code]
general/modeless/stdafx.cpp [code]
general/modeless/stdafx.h [code]
general/multipad/multipad.cpp [code]
general/multipad/multipad.h [code]
general/multipad/resource.h [code]
general/multipad/stdafx.cpp [code]
general/multipad/stdafx.h [code]
general/npp/combobar.cpp [code]
general/npp/combobar.h [code]
general/npp/finddlg.cpp [code]
general/npp/finddlg.h [code]
general/npp/gotodlg.cpp [code]
general/npp/gotodlg.h [code]
general/npp/history.cpp [code]
general/npp/history.h [code]
general/npp/mainfrm.cpp [code]
general/npp/mainfrm.h [code]
general/npp/np.cpp [code]
general/npp/np.h [code]
general/npp/npdoc.cpp [code]
general/npp/npdoc.h [code]
general/npp/npview.cpp [code]
general/npp/npview.h [code]
general/npp/resource.h [code]
general/npp/stdafx.cpp [code]
general/npp/stdafx.h [code]
general/propdlg/colorpge.cpp [code]
general/propdlg/colorpge.h [code]
general/propdlg/mainfrm.cpp [code]
general/propdlg/mainfrm.h [code]
general/propdlg/minifrm.cpp [code]
general/propdlg/minifrm.h [code]
general/propdlg/preview.cpp [code]
general/propdlg/preview.h [code]
general/propdlg/propdlg.cpp [code]
general/propdlg/propdlg.h [code]
general/propdlg/propsht.cpp [code]
general/propdlg/propsht.h [code]
general/propdlg/propsht2.cpp [code]
general/propdlg/propsht2.h [code]
general/propdlg/resource.h [code]
general/propdlg/shapedoc.cpp [code]
general/propdlg/shapedoc.h [code]
general/propdlg/shapeobj.cpp [code]
general/propdlg/shapeobj.h [code]
general/propdlg/shapesvw.cpp [code]
general/propdlg/shapesvw.h [code]
general/propdlg/stdafx.cpp [code]
general/propdlg/stdafx.h [code]
general/propdlg/stylepge.cpp [code]
general/propdlg/stylepge.h [code]
general/rowlist/listvwex.cpp [code]
general/rowlist/listvwex.h [code]
general/rowlist/mainfrm.cpp [code]
general/rowlist/mainfrm.h [code]
general/rowlist/resource.h [code]
general/rowlist/rlistdoc.cpp [code]
general/rowlist/rlistdoc.h [code]
general/rowlist/rlistvw.cpp [code]
general/rowlist/rlistvw.h [code]
general/rowlist/rowlist.cpp [code]
general/rowlist/rowlist.h [code]
general/rowlist/stdafx.cpp [code]
general/rowlist/stdafx.h [code]
general/Scribble/childfrm.cpp [code]
general/Scribble/childfrm.h [code]
general/Scribble/ipframe.cpp [code]
general/Scribble/ipframe.h [code]
general/Scribble/mainfrm.cpp [code]
general/Scribble/mainfrm.h [code]
general/Scribble/pendlg.cpp [code]
general/Scribble/PenDlg.h [code]
general/Scribble/resource.h [code]
general/Scribble/scribble.cpp [code]
general/Scribble/scribble.h [code]
general/Scribble/scribdoc.cpp [code]
general/Scribble/scribdoc.h [code]
general/Scribble/scribitm.cpp [code]
general/Scribble/scribitm.h [code]
general/Scribble/scribvw.cpp [code]
general/Scribble/scribvw.h [code]
general/Scribble/stdafx.cpp [code]
general/Scribble/stdafx.h [code]
general/SimpleImage/ChildView.cpp [code]
general/SimpleImage/ChildView.h [code]
general/SimpleImage/CImage.cpp [code]
general/SimpleImage/CImage.h [code]
general/SimpleImage/InfoDlg.cpp [code]
general/SimpleImage/InfoDlg.h [code]
general/SimpleImage/MainFrm.cpp [code]
general/SimpleImage/MainFrm.h [code]
general/SimpleImage/resource.h [code]
general/SimpleImage/stdafx.cpp [code]
general/SimpleImage/stdafx.h [code]
general/snapvw/BkfstPg.cpp [code]
general/snapvw/BkfstPg.h [code]
general/snapvw/childfrm.cpp [code]
general/snapvw/childfrm.h [code]
general/snapvw/DinnerPg.cpp [code]
general/snapvw/DinnerPg.h [code]
general/snapvw/LunchPg.cpp [code]
general/snapvw/LunchPg.h [code]
general/snapvw/mainfrm.cpp [code]
general/snapvw/mainfrm.h [code]
general/snapvw/resource.h [code]
general/snapvw/Snapdoc.cpp [code]
general/snapvw/snapdoc.h [code]
general/snapvw/snapps.cpp [code]
general/snapvw/snapps.h [code]
general/snapvw/snapview.cpp [code]
general/snapvw/snapview.h [code]
general/snapvw/snapvw.cpp [code]
general/snapvw/snapvw.h [code]
general/snapvw/stdafx.cpp [code]
general/snapvw/stdafx.h [code]
general/spiro/MainFrm.cpp [code]
general/spiro/MainFrm.h [code]
general/spiro/piece.cpp [code]
general/spiro/piece.h [code]
general/spiro/resource.h [code]
general/spiro/spiro.cpp [code]
general/spiro/spiro.h [code]
general/spiro/spiroDoc.cpp [code]
general/spiro/spiroDoc.h [code]
general/spiro/spiroView.cpp [code]
general/spiro/spiroView.h [code]
general/spiro/StdAfx.cpp [code]
general/spiro/StdAfx.h [code]
general/tracker/dialogs.cpp [code]
general/tracker/dialogs.h [code]
general/tracker/mainfrm.cpp [code]
general/tracker/mainfrm.h [code]
general/tracker/resource.h [code]
general/tracker/stdafx.cpp [code]
general/tracker/stdafx.h [code]
general/tracker/trackapp.cpp [code]
general/tracker/trackapp.h [code]
general/tracker/trackdoc.cpp [code]
general/tracker/trackdoc.h [code]
general/tracker/trackvw.cpp [code]
general/tracker/trackvw.h [code]
general/VariantUse/Resource.h [code]
general/VariantUse/StdAfx.cpp [code]
general/VariantUse/StdAfx.h [code]
general/VariantUse/VariantUse.cpp [code]
general/VariantUse/VariantUse.h [code]
general/VariantUse/VariantUseDlg.cpp [code]
general/VariantUse/VariantUseDlg.h [code]
general/viewex/enterdlg.cpp [code]
general/viewex/enterdlg.h [code]
general/viewex/inputvw.cpp [code]
general/viewex/inputvw.h [code]
general/viewex/maindoc.cpp [code]
general/viewex/maindoc.h [code]
general/viewex/resource.h [code]
general/viewex/simpvw.cpp [code]
general/viewex/simpvw.h [code]
general/viewex/splitter.cpp [code]
general/viewex/splitter.h [code]
general/viewex/stdafx.cpp [code]
general/viewex/stdafx.h [code]
general/viewex/viewex.cpp [code]
general/viewex/viewex.h [code]
internet/DHtmlExplore/DHtmlExplore.cpp [code]
internet/DHtmlExplore/DHtmlExplore.h [code]
internet/DHtmlExplore/DHtmlExploreDlg.cpp [code]
internet/DHtmlExplore/DHtmlExploreDlg.h [code]
internet/DHtmlExplore/PropertiesDlg.cpp [code]
internet/DHtmlExplore/PropertiesDlg.h [code]
internet/DHtmlExplore/resource.h [code]
internet/DHtmlExplore/StdAfx.cpp [code]
internet/DHtmlExplore/StdAfx.h [code]
internet/HTMLEdit/AddressCombo.cpp [code]
internet/HTMLEdit/AddressCombo.h [code]
internet/HTMLEdit/EditToolbar.cpp [code]
internet/HTMLEdit/EditToolbar.h [code]
internet/HTMLEdit/GetURL.cpp [code]
internet/HTMLEdit/GetURL.h [code]
internet/HTMLEdit/HTMLEdDoc.cpp [code]
internet/HTMLEdit/HTMLEdDoc.h [code]
internet/HTMLEdit/htmledit.cpp [code]
internet/HTMLEdit/htmledit.h [code]
internet/HTMLEdit/HTMLEdView.cpp [code]
internet/HTMLEdit/HTMLEdView.h [code]
internet/HTMLEdit/InsertTbl.cpp [code]
internet/HTMLEdit/InsertTbl.h [code]
internet/HTMLEdit/MainFrm.cpp [code]
internet/HTMLEdit/MainFrm.h [code]
internet/HTMLEdit/resource.h [code]
internet/HTMLEdit/SourceView.cpp [code]
internet/HTMLEdit/SourceView.h [code]
internet/HTMLEdit/StdAfx.cpp [code]
internet/HTMLEdit/StdAfx.h [code]
internet/MFCIE/MainFrm.cpp [code]
internet/MFCIE/MainFrm.h [code]
internet/MFCIE/mfcie.cpp [code]
internet/MFCIE/mfcie.h [code]
internet/MFCIE/mfcieDoc.cpp [code]
internet/MFCIE/mfcieDoc.h [code]
internet/MFCIE/mfcieVw.cpp [code]
internet/MFCIE/mfcieVw.h [code]
internet/MFCIE/Resource.h [code]
internet/MFCIE/StdAfx.cpp [code]
internet/MFCIE/StdAfx.h [code]
internet/Scheduler/EnterInfoDlg.cpp [code]
internet/Scheduler/EnterInfoDlg.h [code]
internet/Scheduler/MyScheduler.cpp [code]
internet/Scheduler/MyScheduler.h [code]
internet/Scheduler/resource.h [code]
internet/Scheduler/Scheduler.cpp [code]
internet/Scheduler/Scheduler.h [code]
internet/Scheduler/SchedulerDlg.cpp [code]
internet/Scheduler/SchedulerDlg.h [code]
internet/Scheduler/stdafx.cpp [code]
internet/Scheduler/stdafx.h [code]
ole/acdual/aclikdoc.cpp [code]
ole/acdual/aclikdoc.h [code]
ole/acdual/aclikvw.cpp [code]
ole/acdual/aclikvw.h [code]
ole/acdual/autoclik.cpp [code]
ole/acdual/autoclik.h [code]
ole/acdual/autoclik.odl [code]
ole/acdual/childfrm.cpp [code]
ole/acdual/childfrm.h [code]
ole/acdual/clikpnt.cpp [code]
ole/acdual/clikpnt.h [code]
ole/acdual/dialogs.cpp [code]
ole/acdual/dialogs.h [code]
ole/acdual/initiids.cpp [code]
ole/acdual/mainfrm.cpp [code]
ole/acdual/mainfrm.h [code]
ole/acdual/mfcdual.cpp [code]
ole/acdual/mfcdual.h [code]
ole/acdual/resource.h [code]
ole/acdual/stdafx.cpp [code]
ole/acdual/stdafx.h [code]
ole/acdual/acdualdriv/autoclik.cpp [code]
ole/acdual/acdualdriv/autoclik.h [code]
ole/acdual/acdualdriv/autoddlg.cpp [code]
ole/acdual/acdualdriv/autoddlg.h [code]
ole/acdual/acdualdriv/autodriv.cpp [code]
ole/acdual/acdualdriv/autodriv.h [code]
ole/acdual/acdualdriv/initiids.cpp [code]
ole/acdual/acdualdriv/resource.h [code]
ole/acdual/acdualdriv/stdafx.cpp [code]
ole/acdual/acdualdriv/stdafx.h [code]
ole/autoclik/aclikdoc.cpp [code]
ole/autoclik/aclikdoc.h [code]
ole/autoclik/aclikvw.cpp [code]
ole/autoclik/aclikvw.h [code]
ole/autoclik/autoclik.cpp [code]
ole/autoclik/autoclik.h [code]
ole/autoclik/autoclik.odl [code]
ole/autoclik/childfrm.cpp [code]
ole/autoclik/childfrm.h [code]
ole/autoclik/clikpnt.cpp [code]
ole/autoclik/clikpnt.h [code]
ole/autoclik/dialogs.cpp [code]
ole/autoclik/dialogs.h [code]
ole/autoclik/mainfrm.cpp [code]
ole/autoclik/mainfrm.h [code]
ole/autoclik/resource.h [code]
ole/autoclik/stdafx.cpp [code]
ole/autoclik/stdafx.h [code]
ole/autoclik/autodriv/autoclik.cpp [code]
ole/autoclik/autodriv/autoclik.h [code]
ole/autoclik/autodriv/autoddlg.cpp [code]
ole/autoclik/autodriv/autoddlg.h [code]
ole/autoclik/autodriv/autodriv.cpp [code]
ole/autoclik/autodriv/autodriv.h [code]
ole/autoclik/autodriv/resource.h [code]
ole/autoclik/autodriv/stdafx.cpp [code]
ole/autoclik/autodriv/stdafx.h [code]
ole/calcdriv/calcdriv.cpp [code]
ole/calcdriv/calcdriv.h [code]
ole/calcdriv/calctype.cpp [code]
ole/calcdriv/calctype.h [code]
ole/calcdriv/resource.h [code]
ole/calcdriv/stdafx.cpp [code]
ole/calcdriv/stdafx.h [code]
ole/drawcli/cntritem.cpp [code]
ole/drawcli/cntritem.h [code]
ole/drawcli/drawcli.cpp [code]
ole/drawcli/drawcli.h [code]
ole/drawcli/drawdoc.cpp [code]
ole/drawcli/drawdoc.h [code]
ole/drawcli/drawobj.cpp [code]
ole/drawcli/drawobj.h [code]
ole/drawcli/drawtool.cpp [code]
ole/drawcli/drawtool.h [code]
ole/drawcli/drawvw.cpp [code]
ole/drawcli/drawvw.h [code]
ole/drawcli/mainfrm.cpp [code]
ole/drawcli/mainfrm.h [code]
ole/drawcli/propset.cpp [code]
ole/drawcli/propset.h [code]
ole/drawcli/rectdlg.cpp [code]
ole/drawcli/rectdlg.h [code]
ole/drawcli/resource.h [code]
ole/drawcli/splitfrm.cpp [code]
ole/drawcli/splitfrm.h [code]
ole/drawcli/statpage.cpp [code]
ole/drawcli/statpage.h [code]
ole/drawcli/stdafx.cpp [code]
ole/drawcli/stdafx.h [code]
ole/drawcli/summinfo.cpp [code]
ole/drawcli/summinfo.h [code]
ole/drawcli/summpage.cpp [code]
ole/drawcli/summpage.h [code]
ole/hiersvr/hiersvr.cpp [code]
ole/hiersvr/hiersvr.h [code]
ole/hiersvr/ipframe.cpp [code]
ole/hiersvr/ipframe.h [code]
ole/hiersvr/mainfrm.cpp [code]
ole/hiersvr/mainfrm.h [code]
ole/hiersvr/resource.h [code]
ole/hiersvr/stdafx.cpp [code]
ole/hiersvr/stdafx.h [code]
ole/hiersvr/svrdoc.cpp [code]
ole/hiersvr/svrdoc.h [code]
ole/hiersvr/svritem.cpp [code]
ole/hiersvr/svritem.h [code]
ole/hiersvr/svrview.cpp [code]
ole/hiersvr/svrview.h [code]
ole/hiersvr/zoomdlg.cpp [code]
ole/hiersvr/zoomdlg.h [code]
ole/inproc/enumvar.cpp [code]
ole/inproc/enumvar.h [code]
ole/inproc/inproc.cpp [code]
ole/inproc/inproc.h [code]
ole/inproc/inproc.odl [code]
ole/inproc/resource.h [code]
ole/inproc/stdafx.cpp [code]
ole/inproc/stdafx.h [code]
ole/inproc/strcoll.cpp [code]
ole/inproc/strcoll.h [code]
ole/inproc/varassoc.cpp [code]
ole/inproc/varassoc.h [code]
ole/inproc/varmap.cpp [code]
ole/inproc/varmap.h [code]
ole/ipdrive/ipdridoc.cpp [code]
ole/ipdrive/ipdridoc.h [code]
ole/ipdrive/ipdrive.cpp [code]
ole/ipdrive/ipdrive.h [code]
ole/ipdrive/ipdrivw.cpp [code]
ole/ipdrive/ipdrivw.h [code]
ole/ipdrive/ipremote.cpp [code]
ole/ipdrive/ipremote.h [code]
ole/ipdrive/mainfrm.cpp [code]
ole/ipdrive/mainfrm.h [code]
ole/ipdrive/resource.h [code]
ole/ipdrive/stdafx.cpp [code]
ole/ipdrive/stdafx.h [code]
ole/MFCBind/BindDoc.cpp [code]
ole/MFCBind/BindDoc.h [code]
ole/MFCBind/BindView.cpp [code]
ole/MFCBind/BindView.h [code]
ole/MFCBind/CntrItem.cpp [code]
ole/MFCBind/CntrItem.h [code]
ole/MFCBind/MainFrm.cpp [code]
ole/MFCBind/MainFrm.h [code]
ole/MFCBind/MFCBind.cpp [code]
ole/MFCBind/MFCBind.h [code]
ole/MFCBind/ObjView.cpp [code]
ole/MFCBind/ObjView.h [code]
ole/MFCBind/resource.h [code]
ole/MFCBind/StdAfx.cpp [code]
ole/MFCBind/StdAfx.h [code]
ole/mfccalc/calcdlg.cpp [code]
ole/mfccalc/calcdlg.h [code]
ole/mfccalc/mfccalc.cpp [code]
ole/mfccalc/mfccalc.h [code]
ole/mfccalc/mfccalc.odl [code]
ole/mfccalc/resource.h [code]
ole/mfccalc/stdafx.cpp [code]
ole/mfccalc/stdafx.h [code]
ole/oclient/frame.cpp [code]
ole/oclient/frame.h [code]
ole/oclient/maindoc.cpp [code]
ole/oclient/maindoc.h [code]
ole/oclient/mainview.cpp [code]
ole/oclient/mainview.h [code]
ole/oclient/oclient.cpp [code]
ole/oclient/oclient.h [code]
ole/oclient/rectitem.cpp [code]
ole/oclient/rectitem.h [code]
ole/oclient/resource.h [code]
ole/oclient/splitfra.cpp [code]
ole/oclient/splitfra.h [code]
ole/oclient/stdafx.cpp [code]
ole/oclient/stdafx.h [code]
ole/oleview/doc.cpp [code]
ole/oleview/doc.h [code]
ole/oleview/mainfrm.cpp [code]
ole/oleview/mainfrm.h [code]
ole/oleview/obj_vw.cpp [code]
ole/oleview/obj_vw.h [code]
ole/oleview/oleview.cpp [code]
ole/oleview/oleview.h [code]
ole/oleview/regview.cpp [code]
ole/oleview/regview.h [code]
ole/oleview/resource.h [code]
ole/oleview/shadow.cpp [code]
ole/oleview/shadow.h [code]
ole/oleview/stdafx.cpp [code]
ole/oleview/stdafx.h [code]
ole/oleview/util.cpp [code]
ole/oleview/util.h [code]
ole/oleview/view.cpp [code]
ole/oleview/view.h [code]
ole/oleview/iviewers/dataobj.cpp [code]
ole/oleview/iviewers/dataobj.h [code]
ole/oleview/iviewers/dispatch.cpp [code]
ole/oleview/iviewers/dispatch.h [code]
ole/oleview/iviewers/guid.cpp [code]
ole/oleview/iviewers/iadvsink.cpp [code]
ole/oleview/iviewers/iadvsink.h [code]
ole/oleview/iviewers/idataobj.cpp [code]
ole/oleview/iviewers/idataobj.h [code]
ole/oleview/iviewers/iview.h [code]
ole/oleview/iviewers/iviewer.cpp [code]
ole/oleview/iviewers/iviewer.h [code]
ole/oleview/iviewers/iviewers.cpp [code]
ole/oleview/iviewers/iviewers.h [code]
ole/oleview/iviewers/resource.h [code]
ole/oleview/iviewers/shadow.cpp [code]
ole/oleview/iviewers/shadow.h [code]
ole/oleview/iviewers/stdafx.cpp [code]
ole/oleview/iviewers/stdafx.h [code]
ole/oleview/iviewers/tlblist.cpp [code]
ole/oleview/iviewers/tlblist.h [code]
ole/oleview/iviewers/tlbodl.cpp [code]
ole/oleview/iviewers/tlbodl.h [code]
ole/oleview/iviewers/tlbtree.cpp [code]
ole/oleview/iviewers/tlbtree.h [code]
ole/oleview/iviewers/tree.cpp [code]
ole/oleview/iviewers/tree.h [code]
ole/oleview/iviewers/typelib.cpp [code]
ole/oleview/iviewers/typelib.h [code]
ole/oleview/iviewers/util.cpp [code]
ole/oleview/iviewers/util.h [code]
ole/superpad/aboutbox.cpp [code]
ole/superpad/aboutbox.h [code]
ole/superpad/ipframe.cpp [code]
ole/superpad/ipframe.h [code]
ole/superpad/linkitem.cpp [code]
ole/superpad/linkitem.h [code]
ole/superpad/mainfrm.cpp [code]
ole/superpad/mainfrm.h [code]
ole/superpad/paddoc.cpp [code]
ole/superpad/paddoc.h [code]
ole/superpad/padframe.cpp [code]
ole/superpad/padframe.h [code]
ole/superpad/paditem.cpp [code]
ole/superpad/paditem.h [code]
ole/superpad/padview.cpp [code]
ole/superpad/padview.h [code]
ole/superpad/pageset.cpp [code]
ole/superpad/pageset.h [code]
ole/superpad/resource.h [code]
ole/superpad/stdafx.cpp [code]
ole/superpad/stdafx.h [code]
ole/superpad/superpad.cpp [code]
ole/superpad/superpad.h [code]
ole/superpad/tabstop.cpp [code]
ole/superpad/tabstop.h [code]
ole/TstCon/AProp.Cpp [code]
ole/TstCon/AProp.H [code]
ole/TstCon/APropDg.Cpp [code]
ole/TstCon/APropDg.H [code]
ole/TstCon/BindHost.Cpp [code]
ole/TstCon/BindHost.H [code]
ole/TstCon/ComCatDg.Cpp [code]
ole/TstCon/ComCatDg.H [code]
ole/TstCon/ConInfDg.Cpp [code]
ole/TstCon/ConInfDg.H [code]
ole/TstCon/EvLogPg.Cpp [code]
ole/TstCon/EvLogPg.H [code]
ole/TstCon/ExcepInf.Cpp [code]
ole/TstCon/ExcepInf.H [code]
ole/TstCon/ExtCtl.Cpp [code]
ole/TstCon/ExtCtl.H [code]
ole/TstCon/FeatPg.Cpp [code]
ole/TstCon/FeatPg.H [code]
ole/TstCon/IFacesPg.Cpp [code]
ole/TstCon/IFacesPg.H [code]
ole/TstCon/InsCtlDg.Cpp [code]
ole/TstCon/InsCtlDg.H [code]
ole/TstCon/Log.Cpp [code]
ole/TstCon/Log.H [code]
ole/TstCon/LogDg.Cpp [code]
ole/TstCon/LogDg.H [code]
ole/TstCon/MacroCB.Cpp [code]
ole/TstCon/MacroCB.H [code]
ole/TstCon/MacroDB.Cpp [code]
ole/TstCon/MacroDB.H [code]
ole/TstCon/MacroDg.Cpp [code]
ole/TstCon/MacroDg.H [code]
ole/TstCon/MainFrm.Cpp [code]
ole/TstCon/MainFrm.H [code]
ole/TstCon/MethInfo.Cpp [code]
ole/TstCon/MethInfo.H [code]
ole/TstCon/MethodDg.Cpp [code]
ole/TstCon/MethodDg.H [code]
ole/TstCon/MFileWnd.Cpp [code]
ole/TstCon/MFileWnd.H [code]
ole/TstCon/NewAPDg.Cpp [code]
ole/TstCon/NewAPDg.H [code]
ole/TstCon/OutWndVw.Cpp [code]
ole/TstCon/OutWndVw.H [code]
ole/TstCon/PBagDg.Cpp [code]
ole/TstCon/PBagDg.H [code]
ole/TstCon/PChngPg.Cpp [code]
ole/TstCon/PChngPg.H [code]
ole/TstCon/PEdReqPg.Cpp [code]
ole/TstCon/PEdReqPg.H [code]
ole/TstCon/PropBag.Cpp [code]
ole/TstCon/PropBag.H [code]
ole/TstCon/RegCtlDg.Cpp [code]
ole/TstCon/RegCtlDg.H [code]
ole/TstCon/Resource.H [code]
ole/TstCon/Script.Cpp [code]
ole/TstCon/Script.H [code]
ole/TstCon/ScrMngr.Cpp [code]
ole/TstCon/ScrMngr.H [code]
ole/TstCon/ServPg.Cpp [code]
ole/TstCon/ServPg.H [code]
ole/TstCon/StdAfx.Cpp [code]
ole/TstCon/StdAfx.H [code]
ole/TstCon/TabOrdDg.Cpp [code]
ole/TstCon/TabOrdDg.H [code]
ole/TstCon/targetver.h [code]
ole/TstCon/TCDoc.Cpp [code]
ole/TstCon/TCDoc.H [code]
ole/TstCon/TCItem.Cpp [code]
ole/TstCon/TCItem.H [code]
ole/TstCon/TCSplit.Cpp [code]
ole/TstCon/TCSplit.H [code]
ole/TstCon/TCTrace.Cpp [code]
ole/TstCon/TCTrace.H [code]
ole/TstCon/TCView.Cpp [code]
ole/TstCon/TCView.H [code]
ole/TstCon/TestCon.H [code]
ole/TstCon/TstCon.Cpp [code]
ole/TstCon/TstCon.H [code]
ole/TstCon/TstCon.odl [code]
ole/TstCon/TypeAttr.Cpp [code]
ole/TstCon/TypeAttr.H [code]
ole/TstCon/VarUtils.Cpp [code]
ole/TstCon/VarUtils.H [code]
ole/TstCon/hlp/popups.h [code]
ole/TstCon/TCProps/Resource.H [code]
ole/TstCon/TCProps/StdAfx.cpp [code]
ole/TstCon/TCProps/StdAfx.h [code]
ole/TstCon/TCProps/TCExtPg.Cpp [code]
ole/TstCon/TCProps/TCExtPg.H [code]
ole/TstCon/TCProps/TCProps.cpp [code]
ole/TstCon/TCProps/TCProps.idl [code]
ole/wordpad/buttondi.cpp [code]
ole/wordpad/buttondi.h [code]
ole/wordpad/chicdial.cpp [code]
ole/wordpad/chicdial.h [code]
ole/wordpad/cntritem.cpp [code]
ole/wordpad/cntritem.h [code]
ole/wordpad/colorlis.cpp [code]
ole/wordpad/colorlis.h [code]
ole/wordpad/datedial.cpp [code]
ole/wordpad/datedial.h [code]
ole/wordpad/ddxm.cpp [code]
ole/wordpad/ddxm.h [code]
ole/wordpad/docopt.cpp [code]
ole/wordpad/docopt.h [code]
ole/wordpad/doctype.cpp [code]
ole/wordpad/doctype.h [code]
ole/wordpad/filenewd.cpp [code]
ole/wordpad/filenewd.h [code]
ole/wordpad/formatba.cpp [code]
ole/wordpad/formatba.h [code]
ole/wordpad/formatpa.cpp [code]
ole/wordpad/formatpa.h [code]
ole/wordpad/formatta.cpp [code]
ole/wordpad/formatta.h [code]
ole/wordpad/helpids.h [code]
ole/wordpad/ipframe.cpp [code]
ole/wordpad/ipframe.h [code]
ole/wordpad/key.cpp [code]
ole/wordpad/key.h [code]
ole/wordpad/listdlg.cpp [code]
ole/wordpad/listdlg.h [code]
ole/wordpad/mainfrm.cpp [code]
ole/wordpad/mainfrm.h [code]
ole/wordpad/mswd6_32.h [code]
ole/wordpad/multconv.cpp [code]
ole/wordpad/multconv.h [code]
ole/wordpad/options.cpp [code]
ole/wordpad/options.h [code]
ole/wordpad/optionsh.cpp [code]
ole/wordpad/optionsh.h [code]
ole/wordpad/pageset.cpp [code]
ole/wordpad/pageset.h [code]
ole/wordpad/penwin.h [code]
ole/wordpad/resource.h [code]
ole/wordpad/ruler.cpp [code]
ole/wordpad/ruler.h [code]
ole/wordpad/splash.cpp [code]
ole/wordpad/splash.h [code]
ole/wordpad/srvritem.cpp [code]
ole/wordpad/srvritem.h [code]
ole/wordpad/stdafx.cpp [code]
ole/wordpad/stdafx.h [code]
ole/wordpad/strings.cpp [code]
ole/wordpad/strings.h [code]
ole/wordpad/unitspag.cpp [code]
ole/wordpad/unitspag.h [code]
ole/wordpad/wordpad.cpp [code]
ole/wordpad/wordpad.h [code]
ole/wordpad/wordpdoc.cpp [code]
ole/wordpad/wordpdoc.h [code]
ole/wordpad/wordpvw.cpp [code]
ole/wordpad/wordpvw.h [code]
utility/guidgen/guidgdlg.cpp [code]
utility/guidgen/guidgdlg.h [code]
utility/guidgen/guidgen.cpp [code]
utility/guidgen/guidgen.h [code]
utility/guidgen/resource.h [code]
utility/guidgen/stdafx.cpp [code]
utility/guidgen/stdafx.h [code]
utility/makehm/makehm.cpp [code]
utility/makehm/resource.h [code]
vc2008fp/CustomPages/CustomPages.cpp [code]
vc2008fp/CustomPages/CustomPages.h [code]
vc2008fp/CustomPages/CustomPagesDoc.cpp [code]
vc2008fp/CustomPages/CustomPagesDoc.h [code]
vc2008fp/CustomPages/CustomPagesView.cpp [code]
vc2008fp/CustomPages/CustomPagesView.h [code]
vc2008fp/CustomPages/MainFrm.cpp [code]
vc2008fp/CustomPages/MainFrm.h [code]
vc2008fp/CustomPages/MyCustomizationPage.cpp [code]
vc2008fp/CustomPages/MyCustomizationPage.h [code]
vc2008fp/CustomPages/resource.h [code]
vc2008fp/CustomPages/StdAfx.cpp [code]
vc2008fp/CustomPages/StdAfx.h [code]
vc2008fp/CustomPages/targetver.h [code]
vc2008fp/DesktopAlertDemo/DesktopAlertDemo.cpp [code]
vc2008fp/DesktopAlertDemo/DesktopAlertDemo.h [code]
vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.cpp [code]
vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.h [code]
vc2008fp/DesktopAlertDemo/IconComboBox.cpp [code]
vc2008fp/DesktopAlertDemo/IconComboBox.h [code]
vc2008fp/DesktopAlertDemo/MSNDlg.cpp [code]
vc2008fp/DesktopAlertDemo/MSNDlg.h [code]
vc2008fp/DesktopAlertDemo/MSNVisualManager.cpp [code]
vc2008fp/DesktopAlertDemo/MSNVisualManager.h [code]
vc2008fp/DesktopAlertDemo/MyAlertDlg.cpp [code]
vc2008fp/DesktopAlertDemo/MyAlertDlg.h [code]
vc2008fp/DesktopAlertDemo/resource.h [code]
vc2008fp/DesktopAlertDemo/StdAfx.cpp [code]
vc2008fp/DesktopAlertDemo/StdAfx.h [code]
vc2008fp/DesktopAlertDemo/targetver.h [code]
vc2008fp/DlgToolTips/CustomToolTipCtrl.cpp [code]
vc2008fp/DlgToolTips/CustomToolTipCtrl.h [code]
vc2008fp/DlgToolTips/DlgToolTips.cpp [code]
vc2008fp/DlgToolTips/DlgToolTips.h [code]
vc2008fp/DlgToolTips/DlgToolTipsDlg.cpp [code]
vc2008fp/DlgToolTips/DlgToolTipsDlg.h [code]
vc2008fp/DlgToolTips/resource.h [code]
vc2008fp/DlgToolTips/StdAfx.cpp [code]
vc2008fp/DlgToolTips/StdAfx.h [code]
vc2008fp/DlgToolTips/targetver.h [code]
vc2008fp/DrawClient/cntritem.cpp [code]
vc2008fp/DrawClient/cntritem.h [code]
vc2008fp/DrawClient/DrawClient.cpp [code]
vc2008fp/DrawClient/DrawClient.h [code]
vc2008fp/DrawClient/drawdoc.cpp [code]
vc2008fp/DrawClient/drawdoc.h [code]
vc2008fp/DrawClient/drawobj.cpp [code]
vc2008fp/DrawClient/drawobj.h [code]
vc2008fp/DrawClient/drawtool.cpp [code]
vc2008fp/DrawClient/drawtool.h [code]
vc2008fp/DrawClient/drawvw.cpp [code]
vc2008fp/DrawClient/drawvw.h [code]
vc2008fp/DrawClient/LineWeightDlg.cpp [code]
vc2008fp/DrawClient/LineWeightDlg.h [code]
vc2008fp/DrawClient/mainfrm.cpp [code]
vc2008fp/DrawClient/mainfrm.h [code]
vc2008fp/DrawClient/PropertiesViewBar.cpp [code]
vc2008fp/DrawClient/PropertiesViewBar.h [code]
vc2008fp/DrawClient/propset.cpp [code]
vc2008fp/DrawClient/propset.h [code]
vc2008fp/DrawClient/rectdlg.cpp [code]
vc2008fp/DrawClient/rectdlg.h [code]
vc2008fp/DrawClient/resource.h [code]
vc2008fp/DrawClient/RibbonListButton.cpp [code]
vc2008fp/DrawClient/RibbonListButton.h [code]
vc2008fp/DrawClient/splitfrm.cpp [code]
vc2008fp/DrawClient/splitfrm.h [code]
vc2008fp/DrawClient/statpage.cpp [code]
vc2008fp/DrawClient/statpage.h [code]
vc2008fp/DrawClient/stdafx.cpp [code]
vc2008fp/DrawClient/stdafx.h [code]
vc2008fp/DrawClient/summinfo.cpp [code]
vc2008fp/DrawClient/summinfo.h [code]
vc2008fp/DrawClient/summpage.cpp [code]
vc2008fp/DrawClient/summpage.h [code]
vc2008fp/DrawClient/targetver.h [code]
vc2008fp/DrawClient/DrawClientHandlers/dllmain.cpp [code]
vc2008fp/DrawClient/DrawClientHandlers/dllmain.h [code]
vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.cpp [code]
vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.idl [code]
vc2008fp/DrawClient/DrawClientHandlers/DrawCliLiveIconsHandler.cpp [code]
vc2008fp/DrawClient/DrawClientHandlers/DrawCliLiveIconsHandler.h [code]
vc2008fp/DrawClient/DrawClientHandlers/DrawCliSearchHandler.cpp [code]
vc2008fp/DrawClient/DrawClientHandlers/DrawCliSearchHandler.h [code]
vc2008fp/DrawClient/DrawClientHandlers/resource.h [code]
vc2008fp/DrawClient/DrawClientHandlers/stdafx.cpp [code]
vc2008fp/DrawClient/DrawClientHandlers/stdafx.h [code]
vc2008fp/DrawClient/DrawClientHandlers/targetver.h [code]
vc2008fp/DynamicMenu/DynamicMenu.cpp [code]
vc2008fp/DynamicMenu/DynamicMenu.h [code]
vc2008fp/DynamicMenu/DynamicMenuDoc.cpp [code]
vc2008fp/DynamicMenu/DynamicMenuDoc.h [code]
vc2008fp/DynamicMenu/DynamicMenuView.cpp [code]
vc2008fp/DynamicMenu/DynamicMenuView.h [code]
vc2008fp/DynamicMenu/MainFrm.cpp [code]
vc2008fp/DynamicMenu/MainFrm.h [code]
vc2008fp/DynamicMenu/MyMenuBar.cpp [code]
vc2008fp/DynamicMenu/MyMenuBar.h [code]
vc2008fp/DynamicMenu/resource.h [code]
vc2008fp/DynamicMenu/StdAfx.cpp [code]
vc2008fp/DynamicMenu/StdAfx.h [code]
vc2008fp/DynamicMenu/targetver.h [code]
vc2008fp/Explorer/Explorer.cpp [code]
vc2008fp/Explorer/Explorer.h [code]
vc2008fp/Explorer/ExplorerDoc.cpp [code]
vc2008fp/Explorer/ExplorerDoc.h [code]
vc2008fp/Explorer/ExplorerView.cpp [code]
vc2008fp/Explorer/ExplorerView.h [code]
vc2008fp/Explorer/FolderBar.cpp [code]
vc2008fp/Explorer/FolderBar.h [code]
vc2008fp/Explorer/MainFrm.cpp [code]
vc2008fp/Explorer/MainFrm.h [code]
vc2008fp/Explorer/Resource.h [code]
vc2008fp/Explorer/StdAfx.cpp [code]
vc2008fp/Explorer/StdAfx.h [code]
vc2008fp/Explorer/targetver.h [code]
vc2008fp/IEDemo/ExplorerBar.cpp [code]
vc2008fp/IEDemo/ExplorerBar.h [code]
vc2008fp/IEDemo/FavoritesManager.cpp [code]
vc2008fp/IEDemo/FavoritesManager.h [code]
vc2008fp/IEDemo/HistoryObj.cpp [code]
vc2008fp/IEDemo/HistoryObj.h [code]
vc2008fp/IEDemo/IEDemo.cpp [code]
vc2008fp/IEDemo/IEDemo.h [code]
vc2008fp/IEDemo/IEDemoDoc.cpp [code]
vc2008fp/IEDemo/IEDemoDoc.h [code]
vc2008fp/IEDemo/IEDemoView.cpp [code]
vc2008fp/IEDemo/IEDemoView.h [code]
vc2008fp/IEDemo/LinkButton.cpp [code]
vc2008fp/IEDemo/LinkButton.h [code]
vc2008fp/IEDemo/LinksBar.cpp [code]
vc2008fp/IEDemo/LinksBar.h [code]
vc2008fp/IEDemo/MainFrm.cpp [code]
vc2008fp/IEDemo/MainFrm.h [code]
vc2008fp/IEDemo/Resource.h [code]
vc2008fp/IEDemo/stdafx.cpp [code]
vc2008fp/IEDemo/stdafx.h [code]
vc2008fp/IEDemo/targetver.h [code]
vc2008fp/MDITabsDemo/ChildFrm.cpp [code]
vc2008fp/MDITabsDemo/ChildFrm.h [code]
vc2008fp/MDITabsDemo/MainFrm.cpp [code]
vc2008fp/MDITabsDemo/MainFrm.h [code]
vc2008fp/MDITabsDemo/MDITabsDemo.cpp [code]
vc2008fp/MDITabsDemo/MDITabsDemo.h [code]
vc2008fp/MDITabsDemo/MDITabsDemoDoc.cpp [code]
vc2008fp/MDITabsDemo/MDITabsDemoDoc.h [code]
vc2008fp/MDITabsDemo/MDITabsDemoView.cpp [code]
vc2008fp/MDITabsDemo/MDITabsDemoView.h [code]
vc2008fp/MDITabsDemo/resource.h [code]
vc2008fp/MDITabsDemo/StdAfx.cpp [code]
vc2008fp/MDITabsDemo/StdAfx.h [code]
vc2008fp/MDITabsDemo/targetver.h [code]
vc2008fp/MDITabsDemo/WorkspaceBar.cpp [code]
vc2008fp/MDITabsDemo/WorkspaceBar.h [code]
vc2008fp/MenuSubSet/ChildFrm.cpp [code]
vc2008fp/MenuSubSet/ChildFrm.h [code]
vc2008fp/MenuSubSet/ConfigDlg.cpp [code]
vc2008fp/MenuSubSet/ConfigDlg.h [code]
vc2008fp/MenuSubSet/MainFrm.cpp [code]
vc2008fp/MenuSubSet/MainFrm.h [code]
vc2008fp/MenuSubSet/MenuSubSet.cpp [code]
vc2008fp/MenuSubSet/MenuSubSet.h [code]
vc2008fp/MenuSubSet/MenuSubSetDoc.cpp [code]
vc2008fp/MenuSubSet/MenuSubSetDoc.h [code]
vc2008fp/MenuSubSet/MenuSubSetView.cpp [code]
vc2008fp/MenuSubSet/MenuSubSetView.h [code]
vc2008fp/MenuSubSet/resource.h [code]
vc2008fp/MenuSubSet/StdAfx.cpp [code]
vc2008fp/MenuSubSet/StdAfx.h [code]
vc2008fp/MenuSubSet/targetver.h [code]
vc2008fp/MSMoneyDemo/MainFrm.cpp [code]
vc2008fp/MSMoneyDemo/MainFrm.h [code]
vc2008fp/MSMoneyDemo/MSMCaptionBar.cpp [code]
vc2008fp/MSMoneyDemo/MSMCaptionBar.h [code]
vc2008fp/MSMoneyDemo/MSMCaptionBarButton.cpp [code]
vc2008fp/MSMoneyDemo/MSMCaptionBarButton.h [code]
vc2008fp/MSMoneyDemo/MSMCategoryBar.cpp [code]
vc2008fp/MSMoneyDemo/MSMCategoryBar.h [code]
vc2008fp/MSMoneyDemo/MSMCategoryBarButton.cpp [code]
vc2008fp/MSMoneyDemo/MSMCategoryBarButton.h [code]
vc2008fp/MSMoneyDemo/MSMDialog.cpp [code]
vc2008fp/MSMoneyDemo/MSMDialog.h [code]
vc2008fp/MSMoneyDemo/MSMLinksBar.cpp [code]
vc2008fp/MSMoneyDemo/MSMLinksBar.h [code]
vc2008fp/MSMoneyDemo/MSMLinksBarButton.cpp [code]
vc2008fp/MSMoneyDemo/MSMLinksBarButton.h [code]
vc2008fp/MSMoneyDemo/MSMMenuBar.cpp [code]
vc2008fp/MSMoneyDemo/MSMMenuBar.h [code]
vc2008fp/MSMoneyDemo/MSMoneyDemo.cpp [code]
vc2008fp/MSMoneyDemo/MSMoneyDemo.h [code]
vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.cpp [code]
vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.h [code]
vc2008fp/MSMoneyDemo/MSMoneyDemoView.cpp [code]
vc2008fp/MSMoneyDemo/MSMoneyDemoView.h [code]
vc2008fp/MSMoneyDemo/MSMTasksPane.cpp [code]
vc2008fp/MSMoneyDemo/MSMTasksPane.h [code]
vc2008fp/MSMoneyDemo/MSMToolBar.cpp [code]
vc2008fp/MSMoneyDemo/MSMToolBar.h [code]
vc2008fp/MSMoneyDemo/MSMVisualManager.cpp [code]
vc2008fp/MSMoneyDemo/MSMVisualManager.h [code]
vc2008fp/MSMoneyDemo/Resource.h [code]
vc2008fp/MSMoneyDemo/stdafx.cpp [code]
vc2008fp/MSMoneyDemo/stdafx.h [code]
vc2008fp/MSMoneyDemo/targetver.h [code]
vc2008fp/MSOffice2007Demo/CntrItem.cpp [code]
vc2008fp/MSOffice2007Demo/CntrItem.h [code]
vc2008fp/MSOffice2007Demo/DlgBanner.cpp [code]
vc2008fp/MSOffice2007Demo/DlgBanner.h [code]
vc2008fp/MSOffice2007Demo/keys.cpp [code]
vc2008fp/MSOffice2007Demo/keys.h [code]
vc2008fp/MSOffice2007Demo/MainFrm.cpp [code]
vc2008fp/MSOffice2007Demo/MainFrm.h [code]
vc2008fp/MSOffice2007Demo/MSOffice2007Demo.cpp [code]
vc2008fp/MSOffice2007Demo/MSOffice2007Demo.h [code]
vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.cpp [code]
vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.h [code]
vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.cpp [code]
vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.h [code]
vc2008fp/MSOffice2007Demo/OptionsPage.cpp [code]
vc2008fp/MSOffice2007Demo/OptionsPage.h [code]
vc2008fp/MSOffice2007Demo/Resource.h [code]
vc2008fp/MSOffice2007Demo/ResourcePage.cpp [code]
vc2008fp/MSOffice2007Demo/ResourcePage.h [code]
vc2008fp/MSOffice2007Demo/RibbonListButton.cpp [code]
vc2008fp/MSOffice2007Demo/RibbonListButton.h [code]
vc2008fp/MSOffice2007Demo/RibbonTableButton.cpp [code]
vc2008fp/MSOffice2007Demo/RibbonTableButton.h [code]
vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.cpp [code]
vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.h [code]
vc2008fp/MSOffice2007Demo/StdAfx.cpp [code]
vc2008fp/MSOffice2007Demo/StdAfx.h [code]
vc2008fp/MSOffice2007Demo/targetver.h [code]
vc2008fp/MSOffice2007Demo/TaskPane.cpp [code]
vc2008fp/MSOffice2007Demo/TaskPane.h [code]
vc2008fp/NewControls/CustomProperties.cpp [code]
vc2008fp/NewControls/CustomProperties.h [code]
vc2008fp/NewControls/NewControls.cpp [code]
vc2008fp/NewControls/NewControls.h [code]
vc2008fp/NewControls/NewControlsPropSheet.cpp [code]
vc2008fp/NewControls/NewControlsPropSheet.h [code]
vc2008fp/NewControls/Page1.cpp [code]
vc2008fp/NewControls/Page1.h [code]
vc2008fp/NewControls/Page2.cpp [code]
vc2008fp/NewControls/Page2.h [code]
vc2008fp/NewControls/Page3.cpp [code]
vc2008fp/NewControls/Page3.h [code]
vc2008fp/NewControls/Page4.cpp [code]
vc2008fp/NewControls/Page4.h [code]
vc2008fp/NewControls/Page5.cpp [code]
vc2008fp/NewControls/Page5.h [code]
vc2008fp/NewControls/Page6.cpp [code]
vc2008fp/NewControls/Page6.h [code]
vc2008fp/NewControls/resource.h [code]
vc2008fp/NewControls/stdafx.cpp [code]
vc2008fp/NewControls/stdafx.h [code]
vc2008fp/NewControls/targetver.h [code]
vc2008fp/OutlookDemo/AppLookDlg.cpp [code]
vc2008fp/OutlookDemo/AppLookDlg.h [code]
vc2008fp/OutlookDemo/CalendarBar.cpp [code]
vc2008fp/OutlookDemo/CalendarBar.h [code]
vc2008fp/OutlookDemo/FolderListBar.cpp [code]
vc2008fp/OutlookDemo/FolderListBar.h [code]
vc2008fp/OutlookDemo/FolderListPopupWnd.cpp [code]
vc2008fp/OutlookDemo/FolderListPopupWnd.h [code]
vc2008fp/OutlookDemo/FoldersTree.cpp [code]
vc2008fp/OutlookDemo/FoldersTree.h [code]
vc2008fp/OutlookDemo/MailBar.cpp [code]
vc2008fp/OutlookDemo/MailBar.h [code]
vc2008fp/OutlookDemo/MailFrame.cpp [code]
vc2008fp/OutlookDemo/MailFrame.h [code]
vc2008fp/OutlookDemo/MailView.cpp [code]
vc2008fp/OutlookDemo/MailView.h [code]
vc2008fp/OutlookDemo/MainFrm.cpp [code]
vc2008fp/OutlookDemo/MainFrm.h [code]
vc2008fp/OutlookDemo/OutlookDemo.cpp [code]
vc2008fp/OutlookDemo/OutlookDemo.h [code]
vc2008fp/OutlookDemo/OutlookDemoDoc.cpp [code]
vc2008fp/OutlookDemo/OutlookDemoDoc.h [code]
vc2008fp/OutlookDemo/OutlookDemoView.cpp [code]
vc2008fp/OutlookDemo/OutlookDemoView.h [code]
vc2008fp/OutlookDemo/PreviewPane.cpp [code]
vc2008fp/OutlookDemo/PreviewPane.h [code]
vc2008fp/OutlookDemo/resource.h [code]
vc2008fp/OutlookDemo/StdAfx.cpp [code]
vc2008fp/OutlookDemo/stdafx.h [code]
vc2008fp/OutlookDemo/targetver.h [code]
vc2008fp/OutlookDemo/WorkspaceObj.cpp [code]
vc2008fp/OutlookDemo/WorkspaceObj.h [code]
vc2008fp/OutlookMultiViews/MainFrm.cpp [code]
vc2008fp/OutlookMultiViews/MainFrm.h [code]
vc2008fp/OutlookMultiViews/OutlookMultiViews.cpp [code]
vc2008fp/OutlookMultiViews/OutlookMultiViews.h [code]
vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.cpp [code]
vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.h [code]
vc2008fp/OutlookMultiViews/OutlookMultiViewsView.cpp [code]
vc2008fp/OutlookMultiViews/OutlookMultiViewsView.h [code]
vc2008fp/OutlookMultiViews/resource.h [code]
vc2008fp/OutlookMultiViews/StdAfx.cpp [code]
vc2008fp/OutlookMultiViews/StdAfx.h [code]
vc2008fp/OutlookMultiViews/targetver.h [code]
vc2008fp/OutlookMultiViews/View1.cpp [code]
vc2008fp/OutlookMultiViews/View1.h [code]
vc2008fp/OutlookMultiViews/View2.cpp [code]
vc2008fp/OutlookMultiViews/View2.h [code]
vc2008fp/OutlookMultiViews/View3.cpp [code]
vc2008fp/OutlookMultiViews/View3.h [code]
vc2008fp/OwnerDrawMenu/LineStyleMenuItem.cpp [code]
vc2008fp/OwnerDrawMenu/LineStyleMenuItem.h [code]
vc2008fp/OwnerDrawMenu/MainFrm.cpp [code]
vc2008fp/OwnerDrawMenu/MainFrm.h [code]
vc2008fp/OwnerDrawMenu/OwnerDrawMenu.cpp [code]
vc2008fp/OwnerDrawMenu/OwnerDrawMenu.h [code]
vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.cpp [code]
vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.h [code]
vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.cpp [code]
vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.h [code]
vc2008fp/OwnerDrawMenu/resource.h [code]
vc2008fp/OwnerDrawMenu/StdAfx.cpp [code]
vc2008fp/OwnerDrawMenu/StdAfx.h [code]
vc2008fp/OwnerDrawMenu/targetver.h [code]
vc2008fp/PaletteDemo/MainFrm.cpp [code]
vc2008fp/PaletteDemo/MainFrm.h [code]
vc2008fp/PaletteDemo/PaletteDemo.cpp [code]
vc2008fp/PaletteDemo/PaletteDemo.h [code]
vc2008fp/PaletteDemo/PaletteDemoDoc.cpp [code]
vc2008fp/PaletteDemo/PaletteDemoDoc.h [code]
vc2008fp/PaletteDemo/PaletteDemoView.cpp [code]
vc2008fp/PaletteDemo/PaletteDemoView.h [code]
vc2008fp/PaletteDemo/resource.h [code]
vc2008fp/PaletteDemo/StdAfx.cpp [code]
vc2008fp/PaletteDemo/StdAfx.h [code]
vc2008fp/PaletteDemo/targetver.h [code]
vc2008fp/PaletteDemo/ToolsPalette.cpp [code]
vc2008fp/PaletteDemo/ToolsPalette.h [code]
vc2008fp/PropSheetDemo/MyPropertyPage1.cpp [code]
vc2008fp/PropSheetDemo/MyPropertyPage1.h [code]
vc2008fp/PropSheetDemo/MyPropertySheet.cpp [code]
vc2008fp/PropSheetDemo/MyPropertySheet.h [code]
vc2008fp/PropSheetDemo/PropSheetDemo.cpp [code]
vc2008fp/PropSheetDemo/PropSheetDemo.h [code]
vc2008fp/PropSheetDemo/PropSheetDemoDlg.cpp [code]
vc2008fp/PropSheetDemo/PropSheetDemoDlg.h [code]
vc2008fp/PropSheetDemo/resource.h [code]
vc2008fp/PropSheetDemo/StdAfx.cpp [code]
vc2008fp/PropSheetDemo/StdAfx.h [code]
vc2008fp/PropSheetDemo/targetver.h [code]
vc2008fp/RebarTest/ChildFrm.cpp [code]
vc2008fp/RebarTest/ChildFrm.h [code]
vc2008fp/RebarTest/MainFrm.cpp [code]
vc2008fp/RebarTest/MainFrm.h [code]
vc2008fp/RebarTest/RebarTest.cpp [code]
vc2008fp/RebarTest/RebarTest.h [code]
vc2008fp/RebarTest/RebarTestDoc.cpp [code]
vc2008fp/RebarTest/RebarTestDoc.h [code]
vc2008fp/RebarTest/RebarTestView.cpp [code]
vc2008fp/RebarTest/RebarTestView.h [code]
vc2008fp/RebarTest/Resource.h [code]
vc2008fp/RebarTest/stdafx.cpp [code]
vc2008fp/RebarTest/stdafx.h [code]
vc2008fp/RebarTest/targetver.h [code]
vc2008fp/RibbonGadgets/MainFrm.cpp [code]
vc2008fp/RibbonGadgets/MainFrm.h [code]
vc2008fp/RibbonGadgets/OutputBar.cpp [code]
vc2008fp/RibbonGadgets/OutputBar.h [code]
vc2008fp/RibbonGadgets/resource.h [code]
vc2008fp/RibbonGadgets/RibbonGadgets.cpp [code]
vc2008fp/RibbonGadgets/RibbonGadgets.h [code]
vc2008fp/RibbonGadgets/RibbonGadgetsDoc.cpp [code]
vc2008fp/RibbonGadgets/RibbonGadgetsDoc.h [code]
vc2008fp/RibbonGadgets/RibbonGadgetsView.cpp [code]
vc2008fp/RibbonGadgets/RibbonGadgetsView.h [code]
vc2008fp/RibbonGadgets/StdAfx.cpp [code]
vc2008fp/RibbonGadgets/StdAfx.h [code]
vc2008fp/RibbonGadgets/targetver.h [code]
vc2008fp/RibbonMDI/ChildFrm.cpp [code]
vc2008fp/RibbonMDI/ChildFrm.h [code]
vc2008fp/RibbonMDI/MainFrm.cpp [code]
vc2008fp/RibbonMDI/MainFrm.h [code]
vc2008fp/RibbonMDI/OutputBar.cpp [code]
vc2008fp/RibbonMDI/OutputBar.h [code]
vc2008fp/RibbonMDI/resource.h [code]
vc2008fp/RibbonMDI/RibbonMDIDemo.cpp [code]
vc2008fp/RibbonMDI/RibbonMDIDemo.h [code]
vc2008fp/RibbonMDI/RibbonMDIDemoDoc.cpp [code]
vc2008fp/RibbonMDI/RibbonMDIDemoDoc.h [code]
vc2008fp/RibbonMDI/RibbonMDIDemoView.cpp [code]
vc2008fp/RibbonMDI/RibbonMDIDemoView.h [code]
vc2008fp/RibbonMDI/StdAfx.cpp [code]
vc2008fp/RibbonMDI/StdAfx.h [code]
vc2008fp/RibbonMDI/targetver.h [code]
vc2008fp/RibbonMDI/WorkspaceBar.cpp [code]
vc2008fp/RibbonMDI/WorkspaceBar.h [code]
vc2008fp/RibbonMDI/WorkspaceBar2.cpp [code]
vc2008fp/RibbonMDI/WorkspaceBar2.h [code]
vc2008fp/RollupPane/InfoBar.cpp [code]
vc2008fp/RollupPane/infobar.h [code]
vc2008fp/RollupPane/MainFrm.cpp [code]
vc2008fp/RollupPane/MainFrm.h [code]
vc2008fp/RollupPane/Resource.h [code]
vc2008fp/RollupPane/RollupPane.cpp [code]
vc2008fp/RollupPane/RollupPane.h [code]
vc2008fp/RollupPane/RollupPaneDoc.cpp [code]
vc2008fp/RollupPane/RollupPaneDoc.h [code]
vc2008fp/RollupPane/RollupPaneView.cpp [code]
vc2008fp/RollupPane/RollupPaneView.h [code]
vc2008fp/RollupPane/stdafx.cpp [code]
vc2008fp/RollupPane/stdafx.h [code]
vc2008fp/RollupPane/targetver.h [code]
vc2008fp/SetPaneSize/MainFrm.cpp [code]
vc2008fp/SetPaneSize/MainFrm.h [code]
vc2008fp/SetPaneSize/resource.h [code]
vc2008fp/SetPaneSize/SetPaneSize.cpp [code]
vc2008fp/SetPaneSize/SetPaneSize.h [code]
vc2008fp/SetPaneSize/SetPaneSizeDoc.cpp [code]
vc2008fp/SetPaneSize/SetPaneSizeDoc.h [code]
vc2008fp/SetPaneSize/SetPaneSizeView.cpp [code]
vc2008fp/SetPaneSize/SetPaneSizeView.h [code]
vc2008fp/SetPaneSize/StdAfx.cpp [code]
vc2008fp/SetPaneSize/StdAfx.h [code]
vc2008fp/SetPaneSize/targetver.h [code]
vc2008fp/SetPaneSize/WorkspaceBar.cpp [code]
vc2008fp/SetPaneSize/WorkspaceBar.h [code]
vc2008fp/Slider/MainFrm.cpp [code]
vc2008fp/Slider/MainFrm.h [code]
vc2008fp/Slider/resource.h [code]
vc2008fp/Slider/Slider.cpp [code]
vc2008fp/Slider/Slider.h [code]
vc2008fp/Slider/SliderButton.cpp [code]
vc2008fp/Slider/SliderButton.h [code]
vc2008fp/Slider/SliderDoc.cpp [code]
vc2008fp/Slider/SliderDoc.h [code]
vc2008fp/Slider/SliderView.cpp [code]
vc2008fp/Slider/SliderView.h [code]
vc2008fp/Slider/StdAfx.cpp [code]
vc2008fp/Slider/StdAfx.h [code]
vc2008fp/Slider/targetver.h [code]
vc2008fp/StateCollection/MainFrm.cpp [code]
vc2008fp/StateCollection/MainFrm.h [code]
vc2008fp/StateCollection/OutputBar.cpp [code]
vc2008fp/StateCollection/OutputBar.h [code]
vc2008fp/StateCollection/resource.h [code]
vc2008fp/StateCollection/StateCollection.cpp [code]
vc2008fp/StateCollection/StateCollection.h [code]
vc2008fp/StateCollection/StateCollectionDoc.cpp [code]
vc2008fp/StateCollection/StateCollectionDoc.h [code]
vc2008fp/StateCollection/StateCollectionView.cpp [code]
vc2008fp/StateCollection/StateCollectionView.h [code]
vc2008fp/StateCollection/StdAfx.cpp [code]
vc2008fp/StateCollection/StdAfx.h [code]
vc2008fp/StateCollection/targetver.h [code]
vc2008fp/StateCollection/WorkspaceBar.cpp [code]
vc2008fp/StateCollection/WorkspaceBar.h [code]
vc2008fp/StatusBarDemo/MainFrm.cpp [code]
vc2008fp/StatusBarDemo/MainFrm.h [code]
vc2008fp/StatusBarDemo/resource.h [code]
vc2008fp/StatusBarDemo/StatusBarDemo.cpp [code]
vc2008fp/StatusBarDemo/StatusBarDemo.h [code]
vc2008fp/StatusBarDemo/StatusBarDemoDoc.cpp [code]
vc2008fp/StatusBarDemo/StatusBarDemoDoc.h [code]
vc2008fp/StatusBarDemo/StatusBarDemoView.cpp [code]
vc2008fp/StatusBarDemo/StatusBarDemoView.h [code]
vc2008fp/StatusBarDemo/StdAfx.cpp [code]
vc2008fp/StatusBarDemo/StdAfx.h [code]
vc2008fp/StatusBarDemo/targetver.h [code]
vc2008fp/TabbedView/ChildFrm.cpp [code]
vc2008fp/TabbedView/ChildFrm.h [code]
vc2008fp/TabbedView/MainFrm.cpp [code]
vc2008fp/TabbedView/MainFrm.h [code]
vc2008fp/TabbedView/resource.h [code]
vc2008fp/TabbedView/StdAfx.cpp [code]
vc2008fp/TabbedView/StdAfx.h [code]
vc2008fp/TabbedView/TabbedView.cpp [code]
vc2008fp/TabbedView/TabbedView.h [code]
vc2008fp/TabbedView/TabbedViewDoc.cpp [code]
vc2008fp/TabbedView/TabbedViewDoc.h [code]
vc2008fp/TabbedView/TabbedViewView.cpp [code]
vc2008fp/TabbedView/TabbedViewView.h [code]
vc2008fp/TabbedView/targetver.h [code]
vc2008fp/TabbedView/View1.cpp [code]
vc2008fp/TabbedView/View1.h [code]
vc2008fp/TabbedView/View2.cpp [code]
vc2008fp/TabbedView/View2.h [code]
vc2008fp/TabbedView/View3.cpp [code]
vc2008fp/TabbedView/View3.h [code]
vc2008fp/TabbedView/View4.cpp [code]
vc2008fp/TabbedView/View4.h [code]
vc2008fp/TabControl/MainFrm.cpp [code]
vc2008fp/TabControl/MainFrm.h [code]
vc2008fp/TabControl/resource.h [code]
vc2008fp/TabControl/StdAfx.cpp [code]
vc2008fp/TabControl/StdAfx.h [code]
vc2008fp/TabControl/TabControl.cpp [code]
vc2008fp/TabControl/TabControl.h [code]
vc2008fp/TabControl/TabControlDoc.cpp [code]
vc2008fp/TabControl/TabControlDoc.h [code]
vc2008fp/TabControl/TabControlView.cpp [code]
vc2008fp/TabControl/TabControlView.h [code]
vc2008fp/TabControl/targetver.h [code]
vc2008fp/TasksPane/MainFrm.cpp [code]
vc2008fp/TasksPane/MainFrm.h [code]
vc2008fp/TasksPane/resource.h [code]
vc2008fp/TasksPane/StdAfx.cpp [code]
vc2008fp/TasksPane/StdAfx.h [code]
vc2008fp/TasksPane/targetver.h [code]
vc2008fp/TasksPane/TaskPane.cpp [code]
vc2008fp/TasksPane/TaskPane.h [code]
vc2008fp/TasksPane/TasksPane.cpp [code]
vc2008fp/TasksPane/TasksPane.h [code]
vc2008fp/TasksPane/TasksPaneDoc.cpp [code]
vc2008fp/TasksPane/TasksPaneDoc.h [code]
vc2008fp/TasksPane/TasksPaneView.cpp [code]
vc2008fp/TasksPane/TasksPaneView.h [code]
vc2008fp/ToolbarDateTimePicker/MainFrm.cpp [code]
vc2008fp/ToolbarDateTimePicker/MainFrm.h [code]
vc2008fp/ToolbarDateTimePicker/resource.h [code]
vc2008fp/ToolbarDateTimePicker/StdAfx.cpp [code]
vc2008fp/ToolbarDateTimePicker/StdAfx.h [code]
vc2008fp/ToolbarDateTimePicker/targetver.h [code]
vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.cpp [code]
vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.h [code]
vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.cpp [code]
vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.h [code]
vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.cpp [code]
vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.h [code]
vc2008fp/ToolTipDemo/MainFrm.cpp [code]
vc2008fp/ToolTipDemo/MainFrm.h [code]
vc2008fp/ToolTipDemo/MyToolTipCtrl.cpp [code]
vc2008fp/ToolTipDemo/MyToolTipCtrl.h [code]
vc2008fp/ToolTipDemo/resource.h [code]
vc2008fp/ToolTipDemo/StdAfx.cpp [code]
vc2008fp/ToolTipDemo/StdAfx.h [code]
vc2008fp/ToolTipDemo/TooltipDemo.cpp [code]
vc2008fp/ToolTipDemo/TooltipDemo.h [code]
vc2008fp/ToolTipDemo/TooltipDemoDoc.cpp [code]
vc2008fp/ToolTipDemo/TooltipDemoDoc.h [code]
vc2008fp/ToolTipDemo/TooltipDemoView.cpp [code]
vc2008fp/ToolTipDemo/TooltipDemoView.h [code]
vc2008fp/TrayMenu/resource.h [code]
vc2008fp/TrayMenu/StdAfx.cpp [code]
vc2008fp/TrayMenu/StdAfx.h [code]
vc2008fp/TrayMenu/targetver.h [code]
vc2008fp/TrayMenu/TrayMenu.cpp [code]
vc2008fp/TrayMenu/TrayMenu.h [code]
vc2008fp/TrayMenu/TrayMenuDlg.cpp [code]
vc2008fp/TrayMenu/TrayMenuDlg.h [code]
vc2008fp/VisualStudioDemo/AppLookDlg.cpp [code]
vc2008fp/VisualStudioDemo/AppLookDlg.h [code]
vc2008fp/VisualStudioDemo/ChildFrm.cpp [code]
vc2008fp/VisualStudioDemo/ChildFrm.h [code]
vc2008fp/VisualStudioDemo/ClassTreeWnd.cpp [code]
vc2008fp/VisualStudioDemo/ClassTreeWnd.h [code]
vc2008fp/VisualStudioDemo/ClassViewBar.cpp [code]
vc2008fp/VisualStudioDemo/ClassViewBar.h [code]
vc2008fp/VisualStudioDemo/DynamicHelpView.cpp [code]
vc2008fp/VisualStudioDemo/DynamicHelpView.h [code]
vc2008fp/VisualStudioDemo/FileViewBar.cpp [code]
vc2008fp/VisualStudioDemo/FileViewBar.h [code]
vc2008fp/VisualStudioDemo/FindComboBox.cpp [code]
vc2008fp/VisualStudioDemo/FindComboBox.h [code]
vc2008fp/VisualStudioDemo/MainFrm.cpp [code]
vc2008fp/VisualStudioDemo/MainFrm.h [code]
vc2008fp/VisualStudioDemo/OptionsDlg.cpp [code]
vc2008fp/VisualStudioDemo/OptionsDlg.h [code]
vc2008fp/VisualStudioDemo/OptionsPages.cpp [code]
vc2008fp/VisualStudioDemo/OptionsPages.h [code]
vc2008fp/VisualStudioDemo/OutputBar.cpp [code]
vc2008fp/VisualStudioDemo/OutputBar.h [code]
vc2008fp/VisualStudioDemo/OutputView.cpp [code]
vc2008fp/VisualStudioDemo/OutputView.h [code]
vc2008fp/VisualStudioDemo/PropertiesViewBar.cpp [code]
vc2008fp/VisualStudioDemo/PropertiesViewBar.h [code]
vc2008fp/VisualStudioDemo/Resource.h [code]
vc2008fp/VisualStudioDemo/ResourceView.cpp [code]
vc2008fp/VisualStudioDemo/ResourceView.h [code]
vc2008fp/VisualStudioDemo/StartView.cpp [code]
vc2008fp/VisualStudioDemo/StartView.h [code]
vc2008fp/VisualStudioDemo/stdafx.cpp [code]
vc2008fp/VisualStudioDemo/stdafx.h [code]
vc2008fp/VisualStudioDemo/targetver.h [code]
vc2008fp/VisualStudioDemo/UndoBar.cpp [code]
vc2008fp/VisualStudioDemo/UndoBar.h [code]
vc2008fp/VisualStudioDemo/UndoListBox.cpp [code]
vc2008fp/VisualStudioDemo/UndoListBox.h [code]
vc2008fp/VisualStudioDemo/VisualStudioDemo.cpp [code]
vc2008fp/VisualStudioDemo/VisualStudioDemo.h [code]
vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.cpp [code]
vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.h [code]
vc2008fp/VisualStudioDemo/VisualStudioDemoView.cpp [code]
vc2008fp/VisualStudioDemo/VisualStudioDemoView.h [code]
vc2008fp/VisualStudioDemo/WatchBar.cpp [code]
vc2008fp/VisualStudioDemo/WatchBar.h [code]
vc2008fp/WordPad/AppLookDlg.cpp [code]
vc2008fp/WordPad/AppLookDlg.h [code]
vc2008fp/WordPad/buttondi.cpp [code]
vc2008fp/WordPad/buttondi.h [code]
vc2008fp/WordPad/chicdial.cpp [code]
vc2008fp/WordPad/chicdial.h [code]
vc2008fp/WordPad/cntritem.cpp [code]
vc2008fp/WordPad/cntritem.h [code]
vc2008fp/WordPad/datedial.cpp [code]
vc2008fp/WordPad/datedial.h [code]
vc2008fp/WordPad/ddxm.cpp [code]
vc2008fp/WordPad/ddxm.h [code]
vc2008fp/WordPad/docopt.cpp [code]
vc2008fp/WordPad/docopt.h [code]
vc2008fp/WordPad/doctype.cpp [code]
vc2008fp/WordPad/doctype.h [code]
vc2008fp/WordPad/filenewd.cpp [code]
vc2008fp/WordPad/filenewd.h [code]
vc2008fp/WordPad/formatba.cpp [code]
vc2008fp/WordPad/formatba.h [code]
vc2008fp/WordPad/formatpa.cpp [code]
vc2008fp/WordPad/formatpa.h [code]
vc2008fp/WordPad/formatta.cpp [code]
vc2008fp/WordPad/formatta.h [code]
vc2008fp/WordPad/helpids.h [code]
vc2008fp/WordPad/ipframe.cpp [code]
vc2008fp/WordPad/ipframe.h [code]
vc2008fp/WordPad/key.cpp [code]
vc2008fp/WordPad/key.h [code]
vc2008fp/WordPad/listdlg.cpp [code]
vc2008fp/WordPad/listdlg.h [code]
vc2008fp/WordPad/mainfrm.cpp [code]
vc2008fp/WordPad/MainFrm.h [code]
vc2008fp/WordPad/mswd6_32.h [code]
vc2008fp/WordPad/multconv.cpp [code]
vc2008fp/WordPad/multconv.h [code]
vc2008fp/WordPad/options.cpp [code]
vc2008fp/WordPad/options.h [code]
vc2008fp/WordPad/optionsh.cpp [code]
vc2008fp/WordPad/optionsh.h [code]
vc2008fp/WordPad/pageset.cpp [code]
vc2008fp/WordPad/pageset.h [code]
vc2008fp/WordPad/resource.h [code]
vc2008fp/WordPad/ruler.cpp [code]
vc2008fp/WordPad/ruler.h [code]
vc2008fp/WordPad/splash.cpp [code]
vc2008fp/WordPad/splash.h [code]
vc2008fp/WordPad/srvritem.cpp [code]
vc2008fp/WordPad/srvritem.h [code]
vc2008fp/WordPad/stdafx.cpp [code]
vc2008fp/WordPad/stdafx.h [code]
vc2008fp/WordPad/strings.cpp [code]
vc2008fp/WordPad/strings.h [code]
vc2008fp/WordPad/targetver.h [code]
vc2008fp/WordPad/TaskPane.cpp [code]
vc2008fp/WordPad/TaskPane.h [code]
vc2008fp/WordPad/unitspag.cpp [code]
vc2008fp/WordPad/unitspag.h [code]
vc2008fp/WordPad/wordpad.cpp [code]
vc2008fp/WordPad/wordpad.h [code]
vc2008fp/WordPad/wordpdoc.cpp [code]
vc2008fp/WordPad/wordpdoc.h [code]
vc2008fp/WordPad/wordpvw.cpp [code]
vc2008fp/WordPad/wordpvw.h [code]
vc2008fp/WorkSpaceToolBar/ChildFrm.cpp [code]
vc2008fp/WorkSpaceToolBar/ChildFrm.h [code]
vc2008fp/WorkSpaceToolBar/MainFrm.cpp [code]
vc2008fp/WorkSpaceToolBar/MainFrm.h [code]
vc2008fp/WorkSpaceToolBar/resource.h [code]
vc2008fp/WorkSpaceToolBar/StdAfx.cpp [code]
vc2008fp/WorkSpaceToolBar/StdAfx.h [code]
vc2008fp/WorkSpaceToolBar/targetver.h [code]
vc2008fp/WorkSpaceToolBar/WorkspaceBar.cpp [code]
vc2008fp/WorkSpaceToolBar/WorkspaceBar.h [code]
vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.cpp [code]
vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.h [code]
vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.cpp [code]
vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.h [code]
vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.cpp [code]
vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collect.cpp File Reference

  • File Members
  • advanced
  • collect
Classes | Variables

collect.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "mainfrm.h"
#include "colledoc.h"
#include "strlstvw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CCollectApp theApp

Variable Documentation

CCollectApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collect.h File Reference

  • advanced
  • collect
Classes

collect.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CCollectApp
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/colledoc.cpp File Reference

  • advanced
  • collect
Functions

colledoc.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "resource.h"

Go to the source code of this file.

Functions

void SerializeElements (CArchive &ar, CMyStruct **ppElements, int nCount)

Function Documentation

void SerializeElements | ( | CArchive & | ar,
 |  | CMyStruct ** | ppElements,
 |  | int | nCount
 | ) |  |

Definition at line 34 of file colledoc.cpp.

{
  // Since SerializeElements is always called by the framework with nCount=1
  // for a CMap<>, it is a good idea to implement SerializeElement to handle
  // nCount>1, in case you decide to reuse it for a CArray<> with the same
  // element type.
  if (ar.IsStoring())
  {
    for (int i = 0; i < nCount; i++)
    {
      CMyStruct* pMyStruct = *(ppElements + i);
      WORD w = (WORD)pMyStruct->m_int;
      ar << w;
      ar << pMyStruct->m_float;
      ar << pMyStruct->m_str;
      nCount--;
    }
  }
  else
  {
    for (int i = 0; i < nCount; i++)
    {
      CMyStruct* pMyStruct = new CMyStruct;
      *(ppElements + i) = pMyStruct;
      WORD w;
      ar >> w;
      pMyStruct->m_int = w;
      ar >> pMyStruct->m_float;
      ar >> pMyStruct->m_str;
    }
  }
}

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/colledoc.h File Reference

  • advanced
  • collect
Classes | Typedefs | Functions

colledoc.h File Reference

Go to the source code of this file.

Classes

class | CCollectDoc
class | CMyObject
class | CMyStruct

Typedefs

typedef CMap< DWORD, DWORD,
CMyStruct *, CMyStruct *& > 		CMapDWordToMyStruct
typedef CTypedPtrMap
< CMapStringToOb, CString,
CMyObject * > 		CMapStringToMyObject
typedef CTypedPtrArray
< CObArray, CMyObject * > 		CMyObjectArray
typedef CTypedPtrList
< CPtrList, CMyStruct * > 		CMyStructList

Functions

void | SerializeElements (CArchive &ar, CMyStruct **ppElements, int nCount)

Typedef Documentation

typedef CMap<DWORD,DWORD,CMyStruct*,CMyStruct*&> CMapDWordToMyStruct

Definition at line 62 of file colledoc.h.

typedef CTypedPtrMap<CMapStringToOb,CString,CMyObject*> CMapStringToMyObject

Definition at line 61 of file colledoc.h.

typedef CTypedPtrArray<CObArray,CMyObject*> CMyObjectArray

Definition at line 60 of file colledoc.h.

typedef CTypedPtrList<CPtrList, CMyStruct*> CMyStructList

Definition at line 59 of file colledoc.h.

Function Documentation

void SerializeElements | ( | CArchive & | ar,
 |  | CMyStruct ** | ppElements,
 |  | int | nCount
 | ) |  |

Definition at line 34 of file colledoc.cpp.

{
  // Since SerializeElements is always called by the framework with nCount=1
  // for a CMap<>, it is a good idea to implement SerializeElement to handle
  // nCount>1, in case you decide to reuse it for a CArray<> with the same
  // element type.
  if (ar.IsStoring())
  {
    for (int i = 0; i < nCount; i++)
    {
      CMyStruct* pMyStruct = *(ppElements + i);
      WORD w = (WORD)pMyStruct->m_int;
      ar << w;
      ar << pMyStruct->m_float;
      ar << pMyStruct->m_str;
      nCount--;
    }
  }
  else
  {
    for (int i = 0; i < nCount; i++)
    {
      CMyStruct* pMyStruct = new CMyStruct;
      *(ppElements + i) = pMyStruct;
      WORD w;
      ar >> w;
      pMyStruct->m_int = w;
      ar >> pMyStruct->m_float;
      ar >> pMyStruct->m_str;
    }
  }
}

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collevw.cpp File Reference

  • advanced
  • collect

collevw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "collevw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collevw.h File Reference

  • advanced
  • collect
Classes

collevw.h File Reference

Go to the source code of this file.

Classes

class CCollectView
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/dwarryvw.cpp File Reference

  • advanced
  • collect

dwarryvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "dwarryvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/dwarryvw.h File Reference

  • advanced
  • collect
Classes

dwarryvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CDWordArrayView
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/intlstvw.cpp File Reference

  • advanced
  • collect

intlstvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "intlstvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/intlstvw.h File Reference

  • advanced
  • collect
Classes

intlstvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CIntListView
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mainfrm.cpp File Reference

  • advanced
  • collect

mainfrm.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "mainfrm.h"
#include "colledoc.h"
#include "strlstvw.h"
#include "typlstvw.h"
#include "intlstvw.h"
#include "dwarryvw.h"
#include "typaryvw.h"
#include "ptarryvw.h"
#include "mapssvw.h"
#include "typtrmap.h"
#include "mapdwvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mainfrm.h File Reference

  • advanced
  • collect
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapdwvw.cpp File Reference

  • advanced
  • collect

mapdwvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "mapdwvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapdwvw.h File Reference

  • advanced
  • collect
Classes

mapdwvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CMapDWordToMyStructView
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapssvw.cpp File Reference

  • advanced
  • collect

mapssvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "mapssvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapssvw.h File Reference

  • advanced
  • collect
Classes

mapssvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CMapStringToStringView
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/ptarryvw.cpp File Reference

  • advanced
  • collect

ptarryvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "ptarryvw.h"
#include "resource.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/ptarryvw.h File Reference

  • advanced
  • collect
Classes

ptarryvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CPointArrayView
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/resource.h File Reference

  • advanced
  • collect
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_ARRAY 32779
#define | ID_CLIST 32776
#define | ID_DWORDARRAY 32777
#define | ID_INTLIST 32776
#define | ID_MAP 32782
#define | ID_MAPBYTETOMYSTRUCT 32782
#define | ID_MAPDWORDTOMYSTRUCT 32782
#define | ID_MAPSTRINGTOSTRING 32780
#define | ID_POINTARRAY 32779
#define | ID_STRINGLIST 32774
#define | ID_TYPEDARRAY 32778
#define | ID_TYPEDLIST 32775
#define | ID_TYPEDPTRARRAY 32778
#define | ID_TYPEDPTRMAP 32781
#define | IDC_ADD 1003
#define | IDC_ADD_OR_UPDATE 1019
#define | IDC_DWORD 1015
#define | IDC_ELEMENT 1001
#define | IDC_FIND 1006
#define | IDC_FLOAT 1012
#define | IDC_GET_AT 1008
#define | IDC_INSERT_BEFORE 1018
#define | IDC_INT 1010
#define | IDC_KEY 1020
#define | IDC_LIST 1000
#define | IDC_REMOVE 1004
#define | IDC_REMOVE_ALL 1005
#define | IDC_STRING 1013
#define | IDC_UPDATE 1009
#define | IDC_VALUE 1021
#define | IDC_X 1016
#define | IDC_Y 1017
#define | IDD_ABOUTBOX 100
#define | IDD_DWORD_ARRAY 133
#define | IDD_INT_LIST 132
#define | IDD_LIST 132
#define | IDD_MAP_DWORD_TO_MYSTRUCT 138
#define | IDD_MAP_STRING_TO_STRING 136
#define | IDD_POINT_ARRAY 135
#define | IDD_STRING_LIST 130
#define | IDD_STRINGLIST 130
#define | IDD_TYPED_PTR_ARRAY 134
#define | IDD_TYPED_PTR_LIST 131
#define | IDD_TYPED_PTR_MAP 137
#define | IDD_TYPEDLIST 131
#define | IDR_MAINFRAME 128
#define | IDS_BLANK_CHARS_NOT_ALLOWED 57658
#define | IDS_INITIAL_KEY 57646
#define | IDS_INITIAL_STRING 57645
#define | IDS_INITIAL_VALUE 57647
#define | IDS_KEY_NOT_FOUND 57651
#define | IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN 57652
#define | IDS_SELECT_DWORD_TO_REMOVE 57649
#define | IDS_SELECT_DWORD_TO_UPDATE 57648
#define | IDS_SELECT_ENTRY 57659
#define | IDS_SELECT_ENTRY_TO_BE_REMOVED 57657
#define | IDS_SELECT_ENTRY_TO_BE_UPDATED 57656
#define | IDS_SELECT_INTEGER 57650
#define | IDS_SELECT_POINT_TO_BE_REMOVED 57654
#define | IDS_SELECT_POINT_TO_BE_UPDATED 57653
#define | IDS_SELECT_STRING_FIRST 57655

Define Documentation

#define ID_ARRAY 32779

Definition at line 44 of file resource.h.

#define ID_CLIST 32776

Definition at line 39 of file resource.h.

#define ID_DWORDARRAY 32777

Definition at line 41 of file resource.h.

#define ID_INTLIST 32776

Definition at line 40 of file resource.h.

#define ID_MAP 32782

Definition at line 48 of file resource.h.

#define ID_MAPBYTETOMYSTRUCT 32782

Definition at line 49 of file resource.h.

#define ID_MAPDWORDTOMYSTRUCT 32782

Definition at line 50 of file resource.h.

#define ID_MAPSTRINGTOSTRING 32780

Definition at line 46 of file resource.h.

#define ID_POINTARRAY 32779

Definition at line 45 of file resource.h.

#define ID_STRINGLIST 32774

Definition at line 37 of file resource.h.

#define ID_TYPEDARRAY 32778

Definition at line 42 of file resource.h.

#define ID_TYPEDLIST 32775

Definition at line 38 of file resource.h.

#define ID_TYPEDPTRARRAY 32778

Definition at line 43 of file resource.h.

#define ID_TYPEDPTRMAP 32781

Definition at line 47 of file resource.h.

#define IDC_ADD 1003

Definition at line 21 of file resource.h.

#define IDC_ADD_OR_UPDATE 1019

Definition at line 34 of file resource.h.

#define IDC_DWORD 1015

Definition at line 30 of file resource.h.

#define IDC_ELEMENT 1001

Definition at line 20 of file resource.h.

#define IDC_FIND 1006

Definition at line 24 of file resource.h.

#define IDC_FLOAT 1012

Definition at line 28 of file resource.h.

#define IDC_GET_AT 1008

Definition at line 25 of file resource.h.

#define IDC_INSERT_BEFORE 1018

Definition at line 33 of file resource.h.

#define IDC_INT 1010

Definition at line 27 of file resource.h.

#define IDC_KEY 1020

Definition at line 35 of file resource.h.

#define IDC_LIST 1000

Definition at line 19 of file resource.h.

#define IDC_REMOVE 1004

Definition at line 22 of file resource.h.

#define IDC_REMOVE_ALL 1005

Definition at line 23 of file resource.h.

#define IDC_STRING 1013

Definition at line 29 of file resource.h.

#define IDC_UPDATE 1009

Definition at line 26 of file resource.h.

#define IDC_VALUE 1021

Definition at line 36 of file resource.h.

#define IDC_X 1016

Definition at line 31 of file resource.h.

#define IDC_Y 1017

Definition at line 32 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_DWORD_ARRAY 133

Definition at line 13 of file resource.h.

#define IDD_INT_LIST 132

Definition at line 12 of file resource.h.

#define IDD_LIST 132

Definition at line 11 of file resource.h.

#define IDD_MAP_DWORD_TO_MYSTRUCT 138

Definition at line 18 of file resource.h.

#define IDD_MAP_STRING_TO_STRING 136

Definition at line 16 of file resource.h.

#define IDD_POINT_ARRAY 135

Definition at line 15 of file resource.h.

#define IDD_STRING_LIST 130

Definition at line 8 of file resource.h.

#define IDD_STRINGLIST 130

Definition at line 7 of file resource.h.

#define IDD_TYPED_PTR_ARRAY 134

Definition at line 14 of file resource.h.

#define IDD_TYPED_PTR_LIST 131

Definition at line 10 of file resource.h.

#define IDD_TYPED_PTR_MAP 137

Definition at line 17 of file resource.h.

#define IDD_TYPEDLIST 131

Definition at line 9 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDS_BLANK_CHARS_NOT_ALLOWED 57658

Definition at line 64 of file resource.h.

#define IDS_INITIAL_KEY 57646

Definition at line 52 of file resource.h.

#define IDS_INITIAL_STRING 57645

Definition at line 51 of file resource.h.

#define IDS_INITIAL_VALUE 57647

Definition at line 53 of file resource.h.

#define IDS_KEY_NOT_FOUND 57651

Definition at line 57 of file resource.h.

#define IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN 57652

Definition at line 58 of file resource.h.

#define IDS_SELECT_DWORD_TO_REMOVE 57649

Definition at line 55 of file resource.h.

#define IDS_SELECT_DWORD_TO_UPDATE 57648

Definition at line 54 of file resource.h.

#define IDS_SELECT_ENTRY 57659

Definition at line 65 of file resource.h.

#define IDS_SELECT_ENTRY_TO_BE_REMOVED 57657

Definition at line 63 of file resource.h.

#define IDS_SELECT_ENTRY_TO_BE_UPDATED 57656

Definition at line 62 of file resource.h.

#define IDS_SELECT_INTEGER 57650

Definition at line 56 of file resource.h.

#define IDS_SELECT_POINT_TO_BE_REMOVED 57654

Definition at line 60 of file resource.h.

#define IDS_SELECT_POINT_TO_BE_UPDATED 57653

Definition at line 59 of file resource.h.

#define IDS_SELECT_STRING_FIRST 57655

Definition at line 61 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/stdafx.cpp File Reference

  • advanced
  • collect

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/stdafx.h File Reference

  • advanced
  • collect
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxtempl.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/strlstvw.cpp File Reference

  • advanced
  • collect

strlstvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "strlstvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/strlstvw.h File Reference

  • advanced
  • collect
Classes

strlstvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CStringListView
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typaryvw.cpp File Reference

  • advanced
  • collect

typaryvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "typaryvw.h"
#include "resource.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typaryvw.h File Reference

  • advanced
  • collect
Classes

typaryvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CTypedPtrArrayView
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typlstvw.cpp File Reference

  • advanced
  • collect

typlstvw.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "typlstvw.h"
#include "resource.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typlstvw.h File Reference

  • advanced
  • collect
Classes

typlstvw.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CTypedPtrListView
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typtrmap.cpp File Reference

  • advanced
  • collect

typtrmap.cpp File Reference

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "typtrmap.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typtrmap.h File Reference

  • advanced
  • collect
Classes

typtrmap.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CTypedPtrMapView
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cube.cpp File Reference

  • advanced
  • cube
Classes | Variables

cube.cpp File Reference

#include "stdafx.h"
#include "cube.h"
#include "mainfrm.h"
#include "cubedoc.h"
#include "cubeview.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CCubeApp theApp

Variable Documentation

CCubeApp theApp

Definition at line 50 of file cube.cpp.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cube.h File Reference

  • advanced
  • cube
Classes

cube.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CCubeApp
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubedoc.cpp File Reference

  • advanced
  • cube

cubedoc.cpp File Reference

#include "stdafx.h"
#include "cube.h"
#include "cubedoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubedoc.h File Reference

  • advanced
  • cube
Classes

cubedoc.h File Reference

Go to the source code of this file.

Classes

class CCubeDoc
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubeview.cpp File Reference

  • advanced
  • cube
Variables

cubeview.cpp File Reference

#include "stdafx.h"
#include "cube.h"
#include "cubedoc.h"
#include "cubeview.h"
#include "gl/gl.h"
#include "gl/glu.h"

Go to the source code of this file.

Variables

unsigned char | oneto8 [2]
unsigned char | threeto8 [8]
unsigned char | twoto8 [4]

Variable Documentation

unsigned char oneto8[2]
Initial value:
{
  0, 255
}

Definition at line 36 of file cubeview.cpp.

unsigned char threeto8[8]
Initial value:
{
  0, 0111>>1, 0222>>1, 0333>>1, 0444>>1, 0555>>1, 0666>>1, 0377
}

Definition at line 26 of file cubeview.cpp.

unsigned char twoto8[4]
Initial value:
{
  0, 0x55, 0xaa, 0xff
}

Definition at line 31 of file cubeview.cpp.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubeview.h File Reference

  • advanced
  • cube
Classes

cubeview.h File Reference

Go to the source code of this file.

Classes

class CCubeView
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/mainfrm.cpp File Reference

  • advanced
  • cube

mainfrm.cpp File Reference

#include "stdafx.h"
#include "cube.h"
#include "cubedoc.h"
#include "cubeview.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/mainfrm.h File Reference

  • advanced
  • cube
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/resource.h File Reference

  • advanced
  • cube
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_FILE_PLAY 32772
#define | IDD_ABOUTBOX 100
#define | IDR_MAINFRAME 128

Define Documentation

#define ID_FILE_PLAY 32772

Definition at line 7 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/stdafx.cpp File Reference

  • advanced
  • cube

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/stdafx.h File Reference

  • advanced
  • cube
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/dllhusk.cpp File Reference

  • advanced
  • dllhusk
Variables

dllhusk.cpp File Reference

#include "stdafx.h"
#include "dllhusk.h"
#include "mainfrm.h"
#include "testdll1.h"
#include "testdll2.h"

Go to the source code of this file.

Variables

CHuskApp NEAR theApp

Variable Documentation

CHuskApp NEAR theApp

Definition at line 53 of file dllhusk.cpp.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/dllhusk.h File Reference

  • advanced
  • dllhusk
Classes

dllhusk.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CHuskApp
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/mainfrm.cpp File Reference

  • advanced
  • dllhusk

mainfrm.cpp File Reference

#include "stdafx.h"
#include "dllhusk.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/mainfrm.h File Reference

  • advanced
  • dllhusk
Classes

mainfrm.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/resource.h File Reference

  • advanced
  • dllhusk
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_DUMP_CLASSES 32768
#define | ID_DUMP_DLLS 32771
#define | ID_DUMP_DOCTEMPLATES 32770
#define | ID_DUMP_OBJECTS 32769
#define | IDD_ABOUTBOX 100
#define | IDR_HELLOTYPE 4
#define | IDR_MAINFRAME 2
#define | IDR_POPUPMENUS 101
#define | IDR_TEXTTYPE 3

Define Documentation

#define ID_DUMP_CLASSES 32768

Definition at line 10 of file resource.h.

#define ID_DUMP_DLLS 32771

Definition at line 13 of file resource.h.

#define ID_DUMP_DOCTEMPLATES 32770

Definition at line 12 of file resource.h.

#define ID_DUMP_OBJECTS 32769

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 8 of file resource.h.

#define IDR_HELLOTYPE 4

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

#define IDR_POPUPMENUS 101

Definition at line 9 of file resource.h.

#define IDR_TEXTTYPE 3

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/stdafx.cpp File Reference

  • advanced
  • dllhusk

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/stdafx.h File Reference

  • advanced
  • dllhusk
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll1.cpp File Reference

  • advanced
  • dllhusk
Functions

testdll1.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "testres1.h"
#include "testdll1.h"
#include "afxdllx.h"

Go to the source code of this file.

Functions

int APIENTRY | DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID)
void WINAPI | InitTestDLL1 ()

Function Documentation

int APIENTRY DllMain | ( | HINSTANCE | hInstance,
 |  | DWORD | dwReason,
 |  | LPVOID |
 | ) |  |

Definition at line 30 of file testdll1.cpp.

{
  if (dwReason == DLL_PROCESS_ATTACH)
  {
    // Extension DLL one-time initialization.
    if (!AfxInitExtensionModule(extensionDLL, hInstance))
       return 0;

    // Other initialization could be done here, as long as
    // it doesn't result in direct or indirect calls to AfxGetApp.
    // This extension DLL needs to add doc templates to the
    // app object, so it waits for the application to boot
    // and call an initialization function (see below).
  }
  return 1;   // ok
}

void WINAPI InitTestDLL1 ( )

Definition at line 48 of file testdll1.cpp.

{
  // create a new CDynLinkLibrary for this app
  #pragma warning(push)
  #pragma warning(disable:6211) //silence prefast warning because CDynLinkLibrary is cleaned up elsewhere
  new CDynLinkLibrary(extensionDLL);
  #pragma warning(pop)

  // Register the doc templates we provide to the app
  CWinApp* pApp = AfxGetApp();
  ENSURE(pApp != NULL);
  pApp->AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
      RUNTIME_CLASS(CTextDoc),
      RUNTIME_CLASS(CMDIChildWnd),
      RUNTIME_CLASS(CEditView)));
  pApp->AddDocTemplate(new CMultiDocTemplate(IDR_HELLOTYPE,
      RUNTIME_CLASS(CDummyDoc),
      RUNTIME_CLASS(CMDIChildWnd),
      RUNTIME_CLASS(CHelloView)));
  // add other initialization here
}

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll1.h File Reference

  • advanced
  • dllhusk
Classes | Defines | Functions

testdll1.h File Reference

Go to the source code of this file.

Classes

class | CDummyDoc
class | CHelloView
class | CTextDoc

Defines

#define | AFX_DATA

Functions

AFX_EXT_API void WINAPI | InitTestDLL1 ()

Define Documentation

#define AFX_DATA

Definition at line 76 of file testdll1.h.

Function Documentation

AFX_EXT_API void WINAPI InitTestDLL1 ( )

Definition at line 48 of file testdll1.cpp.

{
  // create a new CDynLinkLibrary for this app
  #pragma warning(push)
  #pragma warning(disable:6211) //silence prefast warning because CDynLinkLibrary is cleaned up elsewhere
  new CDynLinkLibrary(extensionDLL);
  #pragma warning(pop)

  // Register the doc templates we provide to the app
  CWinApp* pApp = AfxGetApp();
  ENSURE(pApp != NULL);
  pApp->AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
      RUNTIME_CLASS(CTextDoc),
      RUNTIME_CLASS(CMDIChildWnd),
      RUNTIME_CLASS(CEditView)));
  pApp->AddDocTemplate(new CMultiDocTemplate(IDR_HELLOTYPE,
      RUNTIME_CLASS(CDummyDoc),
      RUNTIME_CLASS(CMDIChildWnd),
      RUNTIME_CLASS(CHelloView)));
  // add other initialization here
}

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll2.cpp File Reference

  • advanced
  • dllhusk
Functions

testdll2.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "testres2.h"
#include "testdll2.h"
#include "afxdllx.h"

Go to the source code of this file.

Functions

int APIENTRY | DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID)
void WINAPI | InitTestDLL2 ()

Function Documentation

int APIENTRY DllMain | ( | HINSTANCE | hInstance,
 |  | DWORD | dwReason,
 |  | LPVOID |
 | ) |  |

Definition at line 30 of file testdll2.cpp.

{
  if (dwReason == DLL_PROCESS_ATTACH)
  {
    // Extension DLL one-time initialization - do not allocate memory here,
    //   use the TRACE or ASSERT macros or call MessageBox
    if (!AfxInitExtensionModule(extensionDLL, hInstance))
      return 0;

    // Other initialization could be done here, as long as
    // it doesn't result in direct or indirect calls to AfxGetApp.
    // This extension DLL doesn't need to access the app object
    // but to be consistent with testdll1.dll, this DLL requires
    // explicit initialization as well (see below).

    // This allows for greater flexibility later in development.
  }
  return 1;   // ok
}

void WINAPI InitTestDLL2 ( )

Definition at line 51 of file testdll2.cpp.

{
  // create a new CDynLinkLibrary for this app
  #pragma warning(push)
  #pragma warning(disable:6014) //silence prefast warning because CDynLinkLibrary is cleaned up elsewhere
  new CDynLinkLibrary(extensionDLL);
  #pragma warning(pop)
  // nothing more to do
}

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll2.h File Reference

  • advanced
  • dllhusk
Classes | Defines | Functions

testdll2.h File Reference

Go to the source code of this file.

Classes

class | CListOutputFrame

Defines

#define | AFX_DATA

Functions

AFX_EXT_API void WINAPI | InitTestDLL2 ()

Define Documentation

#define AFX_DATA

Definition at line 74 of file testdll2.h.

Function Documentation

AFX_EXT_API void WINAPI InitTestDLL2 ( )

Definition at line 51 of file testdll2.cpp.

{
  // create a new CDynLinkLibrary for this app
  #pragma warning(push)
  #pragma warning(disable:6014) //silence prefast warning because CDynLinkLibrary is cleaned up elsewhere
  new CDynLinkLibrary(extensionDLL);
  #pragma warning(pop)
  // nothing more to do
}

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testres1.h File Reference

  • advanced
  • dllhusk
Defines

testres1.h File Reference

Go to the source code of this file.

Defines

#define | IDM_BLACK 0x9000
#define | IDM_BLUE 0x9003
#define | IDM_CUSTOM 0x9005
#define | IDM_GREEN 0x9002
#define | IDM_RED 0x9001
#define | IDM_WHITE 0x9004

Define Documentation

#define IDM_BLACK 0x9000

Definition at line 14 of file testres1.h.

#define IDM_BLUE 0x9003

Definition at line 17 of file testres1.h.

#define IDM_CUSTOM 0x9005

Definition at line 19 of file testres1.h.

#define IDM_GREEN 0x9002

Definition at line 16 of file testres1.h.

#define IDM_RED 0x9001

Definition at line 15 of file testres1.h.

#define IDM_WHITE 0x9004

Definition at line 18 of file testres1.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testres2.h File Reference

  • advanced
  • dllhusk
Defines

testres2.h File Reference

Go to the source code of this file.

Defines

#define | IDD_DIALOGBAR1 8192
#define | IDR_LISTOUTPUT 8193

Define Documentation

#define IDD_DIALOGBAR1 8192

Definition at line 14 of file testres2.h.

#define IDR_LISTOUTPUT 8193

Definition at line 15 of file testres2.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/ConfigDlg.cpp File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap

ConfigDlg.cpp File Reference

#include "stdafx.h"
#include "DllScreenCap.h"
#include "ConfigDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/ConfigDlg.h File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap
Classes

ConfigDlg.h File Reference

Go to the source code of this file.

Classes

class CConfigDlg
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/DllScreenCap.cpp File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap
Variables

DllScreenCap.cpp File Reference

#include "stdafx.h"
#include "DllScreenCap.h"

Go to the source code of this file.

Variables

CDllScreenCapApp theApp

Variable Documentation

CDllScreenCapApp theApp

Definition at line 64 of file DllScreenCap.cpp.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/DllScreenCap.h File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap
Classes

DllScreenCap.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDllScreenCapApp
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/Exports.cpp File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap
Functions

Exports.cpp File Reference

#include "stdafx.h"
#include <AtlImage.h>
#include "DllScreenCap.h"
#include "ScreenCapApi.h"
#include "ConfigDlg.h"

Go to the source code of this file.

Functions

void WINAPI | CaptureScreen (CaptureData *lpData)
BOOL WINAPI | ConfigureCapture (HWND hWndParent, CaptureData *lpData)
BOOL WINAPI | FilterDllMsg (LPMSG lpMsg)
void WINAPI | ProcessDllIdle ()

Function Documentation

void WINAPI CaptureScreen ( CaptureData * lpData )

Definition at line 37 of file Exports.cpp.

{
  ASSERT(lpData);
  if (!lpData)
    return;

  AFX_MANAGE_STATE(AfxGetStaticModuleState());

  BOOL bStat;
  CImage image;
  CWnd *pWnd;
  CRect rect;
  if (lpData->bCaptureFullScreen) {
    pWnd = CWnd::GetDesktopWindow();
  }
  else {
    pWnd = CWnd::GetActiveWindow();
  }
  ASSERT(pWnd);
  if (pWnd == NULL)
    return;

  CWindowDC  winDC(pWnd);
  pWnd->GetWindowRect(rect);
  int nBPP = winDC.GetDeviceCaps(BITSPIXEL) * winDC.GetDeviceCaps(PLANES);
  if (nBPP < 24)
    nBPP = 24;
  bStat = image.Create(rect.Width(), rect.Height(), nBPP);
  ASSERT(bStat);
  if (!bStat)
    return;
  CImageDC imageDC(image);
  ::BitBlt(imageDC, 0, 0, rect.Width(), rect.Height(), winDC, 0, 0, SRCCOPY);
  CString strTempName = GetTempName(CString(lpData->szCapturePath));
  HRESULT hr = image.Save(strTempName);
  if (FAILED(hr)) {
    TRACE("Couldn't Save File: %s, %x\n", (LPCTSTR)strTempName, hr);
    return;
  }
  strncpy_s(lpData->szCaptureFilename, MAX_PATH, CT2A(::PathFindFileName(strTempName)), _TRUNCATE);
}

BOOL WINAPI ConfigureCapture | ( | HWND | hWndParent,
 |  | CaptureData * | lpData
 | ) |  |

Definition at line 18 of file Exports.cpp.

{
  ASSERT(lpData);
  if (!lpData)
    return(FALSE);

  AFX_MANAGE_STATE(AfxGetStaticModuleState());
  CConfigDlg dlg(lpData->bCaptureFullScreen,
    CA2T(lpData->szCapturePath), CWnd::FromHandle(hWndParent));
  BOOL bStat = FALSE;
  if (dlg.DoModal() == IDOK) {
    bStat = TRUE;
    lpData->bCaptureFullScreen = dlg.m_nFullScreen > 0;
    strncpy_s(lpData->szCapturePath, MAX_PATH, CT2A(dlg.m_strPath), _TRUNCATE);
    *lpData->szCaptureFilename = '\0';
  }
  return(bStat);
}

BOOL WINAPI FilterDllMsg ( LPMSG lpMsg )

Definition at line 79 of file Exports.cpp.

{
  AFX_MANAGE_STATE(AfxGetStaticModuleState());
  TRY
  {
    return AfxGetThread()->PreTranslateMessage(lpMsg);
  }
  END_TRY
  return FALSE;
}

void WINAPI ProcessDllIdle ( )

Definition at line 90 of file Exports.cpp.

{
  AFX_MANAGE_STATE(AfxGetStaticModuleState());
  TRY
  {
    // flush it all at once
    long lCount = 0;
    while (AfxGetThread()->OnIdle(lCount))
      lCount++;
  }
  END_TRY
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/Resource.h File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_BROWSE 1003
#define | IDC_PATH 1002
#define | IDC_SCREEN 1000
#define | IDC_WINDOW 1001
#define | IDD_CONFIG 1000
#define | IDS_CONFIG_CAPTION 1001

Define Documentation

#define IDC_BROWSE 1003

Definition at line 10 of file Resource.h.

#define IDC_PATH 1002

Definition at line 9 of file Resource.h.

#define IDC_SCREEN 1000

Definition at line 6 of file Resource.h.

#define IDC_WINDOW 1001

Definition at line 7 of file Resource.h.

#define IDD_CONFIG 1000

Definition at line 5 of file Resource.h.

#define IDS_CONFIG_CAPTION 1001

Definition at line 8 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/ScreenCapApi.h File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap
Classes | Functions

ScreenCapApi.h File Reference

Go to the source code of this file.

Classes

struct | CaptureData

Functions

void WINAPI | CaptureScreen (CaptureData *lpData)
BOOL WINAPI | ConfigureCapture (HWND hWndParent, CaptureData *lpData)
BOOL WINAPI | FilterDllMsg (LPMSG lpMsg)
void WINAPI | ProcessDllIdle ()

Function Documentation

void WINAPI CaptureScreen ( CaptureData * lpData )

Definition at line 37 of file Exports.cpp.

{
  ASSERT(lpData);
  if (!lpData)
    return;

  AFX_MANAGE_STATE(AfxGetStaticModuleState());

  BOOL bStat;
  CImage image;
  CWnd *pWnd;
  CRect rect;
  if (lpData->bCaptureFullScreen) {
    pWnd = CWnd::GetDesktopWindow();
  }
  else {
    pWnd = CWnd::GetActiveWindow();
  }
  ASSERT(pWnd);
  if (pWnd == NULL)
    return;

  CWindowDC  winDC(pWnd);
  pWnd->GetWindowRect(rect);
  int nBPP = winDC.GetDeviceCaps(BITSPIXEL) * winDC.GetDeviceCaps(PLANES);
  if (nBPP < 24)
    nBPP = 24;
  bStat = image.Create(rect.Width(), rect.Height(), nBPP);
  ASSERT(bStat);
  if (!bStat)
    return;
  CImageDC imageDC(image);
  ::BitBlt(imageDC, 0, 0, rect.Width(), rect.Height(), winDC, 0, 0, SRCCOPY);
  CString strTempName = GetTempName(CString(lpData->szCapturePath));
  HRESULT hr = image.Save(strTempName);
  if (FAILED(hr)) {
    TRACE("Couldn't Save File: %s, %x\n", (LPCTSTR)strTempName, hr);
    return;
  }
  strncpy_s(lpData->szCaptureFilename, MAX_PATH, CT2A(::PathFindFileName(strTempName)), _TRUNCATE);
}

BOOL WINAPI ConfigureCapture | ( | HWND | hWndParent,
 |  | CaptureData * | lpData
 | ) |  |

Definition at line 18 of file Exports.cpp.

{
  ASSERT(lpData);
  if (!lpData)
    return(FALSE);

  AFX_MANAGE_STATE(AfxGetStaticModuleState());
  CConfigDlg dlg(lpData->bCaptureFullScreen,
    CA2T(lpData->szCapturePath), CWnd::FromHandle(hWndParent));
  BOOL bStat = FALSE;
  if (dlg.DoModal() == IDOK) {
    bStat = TRUE;
    lpData->bCaptureFullScreen = dlg.m_nFullScreen > 0;
    strncpy_s(lpData->szCapturePath, MAX_PATH, CT2A(dlg.m_strPath), _TRUNCATE);
    *lpData->szCaptureFilename = '\0';
  }
  return(bStat);
}

BOOL WINAPI FilterDllMsg ( LPMSG lpMsg )

Definition at line 79 of file Exports.cpp.

{
  AFX_MANAGE_STATE(AfxGetStaticModuleState());
  TRY
  {
    return AfxGetThread()->PreTranslateMessage(lpMsg);
  }
  END_TRY
  return FALSE;
}

void WINAPI ProcessDllIdle ( )

Definition at line 90 of file Exports.cpp.

{
  AFX_MANAGE_STATE(AfxGetStaticModuleState());
  TRY
  {
    // flush it all at once
    long lCount = 0;
    while (AfxGetThread()->OnIdle(lCount))
      lCount++;
  }
  END_TRY
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/stdafx.cpp File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/stdafx.h File Reference

  • advanced
  • DllScreenCap
  • DllScreenCap
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxdisp.h>
#include <afxdb.h>
#include <afxdao.h>
#include <afxdtctl.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ChildView.cpp File Reference

  • advanced
  • DllScreenCap
  • ScreenCap

ChildView.cpp File Reference

#include "stdafx.h"
#include "ScreenCap.h"
#include "ChildView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ChildView.h File Reference

  • advanced
  • DllScreenCap
  • ScreenCap
Classes

ChildView.h File Reference

#include <AtlImage.h>

Go to the source code of this file.

Classes

class CChildView
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/MainFrm.cpp File Reference

  • advanced
  • DllScreenCap
  • ScreenCap

MainFrm.cpp File Reference

#include "stdafx.h"
#include "ScreenCap.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/MainFrm.h File Reference

  • advanced
  • DllScreenCap
  • ScreenCap
Classes

MainFrm.h File Reference

#include "../DllScreenCap/ScreenCapApi.h"
#include "ChildView.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/Resource.h File Reference

  • advanced
  • DllScreenCap
  • ScreenCap
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_FILE_CONFIGURESCREENCAPTURE 130
#define | ID_FILE_SCREENCAPTURE 131
#define | IDD_ABOUTBOX 100
#define | IDR_MAINFRAME 128
#define | IDR_ScreenCapTYPE 129

Define Documentation

#define ID_FILE_CONFIGURESCREENCAPTURE 130

Definition at line 8 of file Resource.h.

#define ID_FILE_SCREENCAPTURE 131

Definition at line 9 of file Resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file Resource.h.

#define IDR_ScreenCapTYPE 129

Definition at line 7 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ScreenCap.cpp File Reference

  • advanced
  • DllScreenCap
  • ScreenCap
Classes | Variables

ScreenCap.cpp File Reference

#include "stdafx.h"
#include "ScreenCap.h"
#include "MainFrm.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CScreenCapApp theApp

Variable Documentation

CScreenCapApp theApp

Definition at line 41 of file ScreenCap.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ScreenCap.h File Reference

  • advanced
  • DllScreenCap
  • ScreenCap
Classes | Variables

ScreenCap.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CScreenCapApp

Variables

CScreenCapApp theApp

Variable Documentation

CScreenCapApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/stdafx.cpp File Reference

  • advanced
  • DllScreenCap
  • ScreenCap

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/stdafx.h File Reference

  • advanced
  • DllScreenCap
  • ScreenCap
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdtctl.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mainfrm.cpp File Reference

  • advanced
  • mtgdi

mainfrm.cpp File Reference

#include "stdafx.h"
#include "mtgdi.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mainfrm.h File Reference

  • advanced
  • mtgdi
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdi.cpp File Reference

  • advanced
  • mtgdi
Classes | Variables

mtgdi.cpp File Reference

#include "stdafx.h"
#include "mtgdi.h"
#include "mainfrm.h"
#include "mtgdidoc.h"
#include "mtgdivw.h"
#include "threads.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CThreadApp theApp

Variable Documentation

CThreadApp theApp

Definition at line 40 of file mtgdi.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdi.h File Reference

  • advanced
  • mtgdi
Classes

mtgdi.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CThreadApp
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdidoc.cpp File Reference

  • advanced
  • mtgdi

mtgdidoc.cpp File Reference

#include "stdafx.h"
#include "mtgdi.h"
#include "mtgdidoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdidoc.h File Reference

  • advanced
  • mtgdi
Classes

mtgdidoc.h File Reference

Go to the source code of this file.

Classes

class CThreadDoc
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdivw.cpp File Reference

  • advanced
  • mtgdi

mtgdivw.cpp File Reference

#include "stdafx.h"
#include "mtgdi.h"
#include "mtgdidoc.h"
#include "mtgdivw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdivw.h File Reference

  • advanced
  • mtgdi
Classes

mtgdivw.h File Reference

#include "threads.h"
#include "threads.h"

Go to the source code of this file.

Classes

class CThreadView
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/resource.h File Reference

  • advanced
  • mtgdi
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_THREAD_10NEWBALLS 32775
#define | ID_THREAD_10NEWLINES 32779
#define | ID_THREAD_10NEWRECTANGLES 32777
#define | ID_THREAD_25NEWBALLS 32776
#define | ID_THREAD_25NEWLINES 32780
#define | ID_THREAD_25NEWRECTANGLES 32778
#define | ID_THREAD_KILLTHREADS 32772
#define | ID_THREAD_KILLTHREADSSLOW 32782
#define | ID_THREAD_NEWBALL 32771
#define | ID_THREAD_NEWLINE 32774
#define | ID_THREAD_NEWRECTANGLE 32773
#define | IDD_ABOUTBOX 100
#define | IDR_MAINFRAME 128
#define | IDS_CAPTION_FORMAT 129
#define | IDS_CAPTION_NOTHREADS 130

Define Documentation

#define ID_THREAD_10NEWBALLS 32775

Definition at line 13 of file resource.h.

#define ID_THREAD_10NEWLINES 32779

Definition at line 17 of file resource.h.

#define ID_THREAD_10NEWRECTANGLES 32777

Definition at line 15 of file resource.h.

#define ID_THREAD_25NEWBALLS 32776

Definition at line 14 of file resource.h.

#define ID_THREAD_25NEWLINES 32780

Definition at line 18 of file resource.h.

#define ID_THREAD_25NEWRECTANGLES 32778

Definition at line 16 of file resource.h.

#define ID_THREAD_KILLTHREADS 32772

Definition at line 10 of file resource.h.

#define ID_THREAD_KILLTHREADSSLOW 32782

Definition at line 19 of file resource.h.

#define ID_THREAD_NEWBALL 32771

Definition at line 9 of file resource.h.

#define ID_THREAD_NEWLINE 32774

Definition at line 12 of file resource.h.

#define ID_THREAD_NEWRECTANGLE 32773

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDS_CAPTION_FORMAT 129

Definition at line 7 of file resource.h.

#define IDS_CAPTION_NOTHREADS 130

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/stdafx.cpp File Reference

  • advanced
  • mtgdi

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/stdafx.h File Reference

  • advanced
  • mtgdi
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxtempl.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/threads.cpp File Reference

  • advanced
  • mtgdi

threads.cpp File Reference

#include "stdafx.h"
#include "mtgdi.h"
#include "threads.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/threads.h File Reference

  • advanced
  • mtgdi
Classes

threads.h File Reference

Go to the source code of this file.

Classes

class | CBallThread
class | CGDIThread
class | CLineThread
class | CRectThread
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/bounce.cpp File Reference

  • advanced
  • mtmdi
Defines

bounce.cpp File Reference

#include "stdafx.h"
#include "mdi.h"
#include "bounce.h"
#include "mtbounce.h"

Go to the source code of this file.

Defines

#define ABS(x) ((x) < 0? -(x) : (x) > 0? (x) : 0)

Define Documentation

#define ABS ( x ) ((x) < 0? -(x) : (x) > 0? (x) : 0)

Definition at line 17 of file bounce.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/bounce.h File Reference

  • advanced
  • mtmdi
Classes | Defines

bounce.h File Reference

Go to the source code of this file.

Classes

class | CBounceMDIChildWnd
class | CBounceWnd
struct | COnCmdMsg

Defines

#define | IDC_BOUNCE_WND 1
#define | WM_USER_ONCMDMSG (WM_USER + 0x1000)
#define | WM_USER_PREPARE_TO_CLOSE (WM_USER + 0x1001)

Define Documentation

#define IDC_BOUNCE_WND 1

Definition at line 16 of file bounce.h.

#define WM_USER_ONCMDMSG (WM_USER + 0x1000)

Definition at line 29 of file bounce.h.

#define WM_USER_PREPARE_TO_CLOSE (WM_USER + 0x1001)

Definition at line 30 of file bounce.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/hello.cpp File Reference

  • advanced
  • mtmdi

hello.cpp File Reference

#include "stdafx.h"
#include "hello.h"
#include "mdi.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/hello.h File Reference

  • advanced
  • mtmdi
Classes

hello.h File Reference

Go to the source code of this file.

Classes

class CHelloWnd
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mainfrm.cpp File Reference

  • advanced
  • mtmdi

mainfrm.cpp File Reference

#include "stdafx.h"
#include "bounce.h"
#include "hello.h"
#include "mdi.h"
#include "mainfrm.h"
#include "mtbounce.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mainfrm.h File Reference

  • advanced
  • mtmdi
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mdi.cpp File Reference

  • advanced
  • mtmdi
Variables

mdi.cpp File Reference

#include "stdafx.h"
#include "mdi.h"
#include "mainfrm.h"
#include "bounce.h"
#include "mtbounce.h"

Go to the source code of this file.

Variables

COLORREF NEAR | colorArray []
CMdiApp NEAR | theApp

Variable Documentation

COLORREF NEAR colorArray[]
Initial value:
{
  RGB (0, 0, 0),
  RGB (255, 0, 0),
  RGB (0, 255, 0),
  RGB (0, 0, 255),

}

Definition at line 95 of file mdi.cpp.

CMdiApp NEAR theApp

Definition at line 44 of file mdi.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mdi.h File Reference

  • advanced
  • mtmdi
Classes | Variables

mdi.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CMdiApp

Variables

COLORREF NEAR | colorArray []

Variable Documentation

COLORREF NEAR colorArray[]

Definition at line 95 of file mdi.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mtbounce.cpp File Reference

  • advanced
  • mtmdi

mtbounce.cpp File Reference

#include "stdafx.h"
#include "bounce.h"
#include "mtbounce.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mtbounce.h File Reference

  • advanced
  • mtmdi
Classes

mtbounce.h File Reference

Go to the source code of this file.

Classes

class CBounceThread
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/resource.h File Reference

  • advanced
  • mtmdi
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDD_ABOUTBOX 100
#define | IDI_HELLO 4
#define | IDM_BLACK 20
#define | IDM_BLUE 23
#define | IDM_BOUNCE 10
#define | IDM_CUSTOM 25
#define | IDM_FAST 30
#define | IDM_GREEN 22
#define | IDM_HELLO 11
#define | IDM_RED 21
#define | IDM_SLOW 31
#define | IDM_WHITE 24
#define | IDR_BOUNCE 101
#define | IDR_HELLO 102
#define | IDR_MAINFRAME 2
#define | IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 3

Define Documentation

#define IDD_ABOUTBOX 100

Definition at line 18 of file resource.h.

#define IDI_HELLO 4

Definition at line 7 of file resource.h.

#define IDM_BLACK 20

Definition at line 10 of file resource.h.

#define IDM_BLUE 23

Definition at line 13 of file resource.h.

#define IDM_BOUNCE 10

Definition at line 8 of file resource.h.

#define IDM_CUSTOM 25

Definition at line 15 of file resource.h.

#define IDM_FAST 30

Definition at line 16 of file resource.h.

#define IDM_GREEN 22

Definition at line 12 of file resource.h.

#define IDM_HELLO 11

Definition at line 9 of file resource.h.

#define IDM_RED 21

Definition at line 11 of file resource.h.

#define IDM_SLOW 31

Definition at line 17 of file resource.h.

#define IDM_WHITE 24

Definition at line 14 of file resource.h.

#define IDR_BOUNCE 101

Definition at line 19 of file resource.h.

#define IDR_HELLO 102

Definition at line 20 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

#define IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 3

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/stdafx.cpp File Reference

  • advanced
  • mtmdi

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/stdafx.h File Reference

  • advanced
  • mtmdi
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxdlgs.h>
#include <afxext.h>
#include <afxpriv.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/calcthrd.cpp File Reference

  • advanced
  • mtrecalc
Functions

calcthrd.cpp File Reference

#include "stdafx.h"
#include "calcthrd.h"
#include "recaldoc.h"
#include "slowcalc.h"
#include "mtrecalc.h"

Go to the source code of this file.

Functions

UINT RecalcThreadProc (LPVOID pParam)

Function Documentation

UINT RecalcThreadProc ( LPVOID pParam )

Definition at line 18 of file calcthrd.cpp.

{
  CRecalcThreadInfo* pRecalcInfo = (CRecalcThreadInfo*)pParam;

  // This recalc thread runs in an infinite loop, waiting to recalculate the
  // result whenever the main application thread sets the "start recalc" event.
  // The recalc thread exits the loop only when the main application sets the
  // "kill recalc" event.

  BOOL bRecalcCompleted = FALSE;
  while (TRUE)
  {
    bRecalcCompleted = FALSE;

    // Wait until the main application thread asks this thread to do
    //      another calculation.
    if (WaitForSingleObject(pRecalcInfo->m_hEventStartRecalc, INFINITE)
      != WAIT_OBJECT_0)
      break;

    // Exit the thread if the main application sets the "kill recalc"
    // event. The main application will set the "start recalc" event
    // before setting the "kill recalc" event.

    if (WaitForSingleObject(pRecalcInfo->m_hEventKillRecalcThread, 0)
      == WAIT_OBJECT_0)
      break; // Terminate this thread by existing the proc.

    // Reset event to indicate "not done", that is, recalculation is in progress.
    ResetEvent(pRecalcInfo->m_hEventRecalcDone);

    bRecalcCompleted = SlowAdd(pRecalcInfo->m_nInt1,
      pRecalcInfo->m_nInt2,
      pRecalcInfo->m_nSum,
      pRecalcInfo,
      pRecalcInfo->m_nRecalcSpeedSeconds,
      pRecalcInfo->m_hwndNotifyProgress);

    // Set event to indicate that recalculation is done (i.e., no longer in progres),
    // even if perhaps interrupted by "kill recalc" event detected in the SlowAdd function.
    SetEvent(pRecalcInfo->m_hEventRecalcDone);

    if (!bRecalcCompleted)  // If interrupted by kill then...
      break; // terminate this thread by exiting the proc.

    ::PostMessage(pRecalcInfo->m_hwndNotifyRecalcDone,
      WM_USER_RECALC_DONE, 0, 0);
  }

  if (!bRecalcCompleted)
    SetEvent(pRecalcInfo->m_hEventRecalcThreadKilled);

  return 0;
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/calcthrd.h File Reference

  • advanced
  • mtrecalc
Classes | Functions

calcthrd.h File Reference

Go to the source code of this file.

Classes

struct | CRecalcThreadInfo

Functions

UINT | RecalcThreadProc (LPVOID pParam)

Function Documentation

UINT RecalcThreadProc ( LPVOID pParam )

Definition at line 18 of file calcthrd.cpp.

{
  CRecalcThreadInfo* pRecalcInfo = (CRecalcThreadInfo*)pParam;

  // This recalc thread runs in an infinite loop, waiting to recalculate the
  // result whenever the main application thread sets the "start recalc" event.
  // The recalc thread exits the loop only when the main application sets the
  // "kill recalc" event.

  BOOL bRecalcCompleted = FALSE;
  while (TRUE)
  {
    bRecalcCompleted = FALSE;

    // Wait until the main application thread asks this thread to do
    //      another calculation.
    if (WaitForSingleObject(pRecalcInfo->m_hEventStartRecalc, INFINITE)
      != WAIT_OBJECT_0)
      break;

    // Exit the thread if the main application sets the "kill recalc"
    // event. The main application will set the "start recalc" event
    // before setting the "kill recalc" event.

    if (WaitForSingleObject(pRecalcInfo->m_hEventKillRecalcThread, 0)
      == WAIT_OBJECT_0)
      break; // Terminate this thread by existing the proc.

    // Reset event to indicate "not done", that is, recalculation is in progress.
    ResetEvent(pRecalcInfo->m_hEventRecalcDone);

    bRecalcCompleted = SlowAdd(pRecalcInfo->m_nInt1,
      pRecalcInfo->m_nInt2,
      pRecalcInfo->m_nSum,
      pRecalcInfo,
      pRecalcInfo->m_nRecalcSpeedSeconds,
      pRecalcInfo->m_hwndNotifyProgress);

    // Set event to indicate that recalculation is done (i.e., no longer in progres),
    // even if perhaps interrupted by "kill recalc" event detected in the SlowAdd function.
    SetEvent(pRecalcInfo->m_hEventRecalcDone);

    if (!bRecalcCompleted)  // If interrupted by kill then...
      break; // terminate this thread by exiting the proc.

    ::PostMessage(pRecalcInfo->m_hwndNotifyRecalcDone,
      WM_USER_RECALC_DONE, 0, 0);
  }

  if (!bRecalcCompleted)
    SetEvent(pRecalcInfo->m_hEventRecalcThreadKilled);

  return 0;
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mainfrm.cpp File Reference

  • advanced
  • mtrecalc

mainfrm.cpp File Reference

#include "stdafx.h"
#include "mtrecalc.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mainfrm.h File Reference

  • advanced
  • mtrecalc
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mtrecalc.cpp File Reference

  • advanced
  • mtrecalc
Classes | Variables

mtrecalc.cpp File Reference

#include "stdafx.h"
#include "mtrecalc.h"
#include "mainfrm.h"
#include "calcthrd.h"
#include "recaldoc.h"
#include "recalcvw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CRecalcApp theApp

Variable Documentation

CRecalcApp theApp

Definition at line 48 of file mtrecalc.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mtrecalc.h File Reference

  • advanced
  • mtrecalc
Classes | Defines

mtrecalc.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CRecalcApp

Defines

#define | WM_USER_RECALC_DONE (WM_USER + 2)
#define | WM_USER_RECALC_IN_PROGRESS (WM_USER + 1)
#define | WM_USER_RECALC_NOW (WM_USER + 3)

Define Documentation

#define WM_USER_RECALC_DONE (WM_USER + 2)

Definition at line 19 of file mtrecalc.h.

#define WM_USER_RECALC_IN_PROGRESS (WM_USER + 1)

Definition at line 18 of file mtrecalc.h.

#define WM_USER_RECALC_NOW (WM_USER + 3)

Definition at line 20 of file mtrecalc.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recalcvw.cpp File Reference

  • advanced
  • mtrecalc

recalcvw.cpp File Reference

#include "stdafx.h"
#include "mtrecalc.h"
#include "calcthrd.h"
#include "recaldoc.h"
#include "recalcvw.h"
#include "resource.h"
#include "slowcalc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recalcvw.h File Reference

  • advanced
  • mtrecalc
Classes | Defines

recalcvw.h File Reference

Go to the source code of this file.

Classes

class | CRecalcView

Defines

#define | UPDATE_HINT_SUM 1

Define Documentation

#define UPDATE_HINT_SUM 1

Definition at line 12 of file recalcvw.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recaldoc.cpp File Reference

  • advanced
  • mtrecalc

recaldoc.cpp File Reference

#include "stdafx.h"
#include "mtrecalc.h"
#include "calcthrd.h"
#include "recaldoc.h"
#include "slowcalc.h"
#include "speeddlg.h"
#include "recalcvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recaldoc.h File Reference

  • advanced
  • mtrecalc
Classes

recaldoc.h File Reference

Go to the source code of this file.

Classes

class CRecalcDoc
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/resource.h File Reference

  • advanced
  • mtrecalc
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_DERIVED_WORKER_THREAD 32774
#define | ID_KILL_WORKER_THREAD 32779
#define | ID_NONDERIVED_WORKER_THREAD 32775
#define | ID_OPTIONS_SPEED 32776
#define | ID_PERCENT_DONE 101
#define | ID_RECALC_DONE 32780
#define | ID_RECALC_SPEED 32777
#define | ID_RECALCULATE_NOW 32778
#define | ID_SINGLE_THREAD 32771
#define | ID_UI_THREAD 32773
#define | ID_WORKER_THREAD 32772
#define | IDC_INT1 1000
#define | IDC_INT2 1002
#define | IDC_INTEGER 1000
#define | IDC_PERCENT_DONE 1008
#define | IDC_RESULT 1001
#define | IDC_SPEED 1003
#define | IDC_SUM 1001
#define | IDD_ABOUTBOX 100
#define | IDD_MTRECALC_FORM 101
#define | IDD_RECALC_PROGRESS 131
#define | IDD_SPEED 130
#define | IDR_MAINFRAME 128
#define | IDR_RECALCTYPE 129
#define | IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 102
#define | IDS_CONTINUE_RECALC_BEFORE_SAVE 131
#define | IDS_FILE_NOT_SAVED 132
#define | IDS_NEED_RECALC_BEFORE_SAVE 133
#define | IDS_RECALCULATING 130

Define Documentation

#define ID_DERIVED_WORKER_THREAD 32774

Definition at line 27 of file resource.h.

#define ID_KILL_WORKER_THREAD 32779

Definition at line 32 of file resource.h.

#define ID_NONDERIVED_WORKER_THREAD 32775

Definition at line 28 of file resource.h.

#define ID_OPTIONS_SPEED 32776

Definition at line 29 of file resource.h.

#define ID_PERCENT_DONE 101

Definition at line 7 of file resource.h.

#define ID_RECALC_DONE 32780

Definition at line 33 of file resource.h.

#define ID_RECALC_SPEED 32777

Definition at line 30 of file resource.h.

#define ID_RECALCULATE_NOW 32778

Definition at line 31 of file resource.h.

#define ID_SINGLE_THREAD 32771

Definition at line 24 of file resource.h.

#define ID_UI_THREAD 32773

Definition at line 26 of file resource.h.

#define ID_WORKER_THREAD 32772

Definition at line 25 of file resource.h.

#define IDC_INT1 1000

Definition at line 18 of file resource.h.

#define IDC_INT2 1002

Definition at line 21 of file resource.h.

#define IDC_INTEGER 1000

Definition at line 17 of file resource.h.

#define IDC_PERCENT_DONE 1008

Definition at line 23 of file resource.h.

#define IDC_RESULT 1001

Definition at line 19 of file resource.h.

#define IDC_SPEED 1003

Definition at line 22 of file resource.h.

#define IDC_SUM 1001

Definition at line 20 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_MTRECALC_FORM 101

Definition at line 6 of file resource.h.

#define IDD_RECALC_PROGRESS 131

Definition at line 14 of file resource.h.

#define IDD_SPEED 130

Definition at line 12 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDR_RECALCTYPE 129

Definition at line 10 of file resource.h.

#define IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 102

Definition at line 8 of file resource.h.

#define IDS_CONTINUE_RECALC_BEFORE_SAVE 131

Definition at line 13 of file resource.h.

#define IDS_FILE_NOT_SAVED 132

Definition at line 15 of file resource.h.

#define IDS_NEED_RECALC_BEFORE_SAVE 133

Definition at line 16 of file resource.h.

#define IDS_RECALCULATING 130

Definition at line 11 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/slowcalc.cpp File Reference

  • advanced
  • mtrecalc
Functions

slowcalc.cpp File Reference

#include "stdafx.h"
#include "calcthrd.h"
#include "recaldoc.h"
#include "slowcalc.h"
#include "mtrecalc.h"

Go to the source code of this file.

Functions

BOOL SlowAdd (int nInt1, int nInt2, int &nResult, CRecalcThreadInfo *pInfo, int nSeconds, HWND hwndNotifyProgress)

Function Documentation

BOOL SlowAdd | ( | int | nInt1,
 |  | int | nInt2,
 |  | int & | nResult,
 |  | CRecalcThreadInfo * | pInfo,
 |  | int | nSeconds,
 |  | HWND | hwndNotifyProgress
 | ) |  |

Definition at line 21 of file slowcalc.cpp.

{
  CWnd* pWndNotifyProgress = CWnd::FromHandle(hwndNotifyProgress);

  BOOL bRestartCalculation = TRUE;
  while (bRestartCalculation)
  {
    bRestartCalculation = FALSE;
    // Do the calculation 5% at a time, allowing for interruption to
    // restart calculation.
    for (int nCount = 1; nCount < 20; nCount++)
    {
      if (pInfo != NULL
        && WaitForSingleObject(pInfo->m_hEventKillRecalcThread, 0)  == WAIT_OBJECT_0)
      {
        if (hwndNotifyProgress != NULL)
        {
          // Reset progress indication to 0 (recalculation not begun)
          pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS);
        }
        return FALSE; // Terminate this recalculation
      }

      if (pInfo != NULL
        &&WaitForSingleObject(pInfo->m_hEventStartRecalc, 0) == WAIT_OBJECT_0)
      {
        // Get new source data for the calculation.
        nInt1 = pInfo->m_nInt1;
        nInt2 = pInfo->m_nInt2;
        bRestartCalculation = TRUE;
        continue;
      }

      // Notify window about each 5% of progress
      if (hwndNotifyProgress != NULL)
      {
        // If calculating in a single thread, send rather than post the
        // "in progress" message, so that the progress is reflected
        // immediately in the status bar.  Otherwise, the posted "in
        // progress" messages won't be handled until after the recalculation
        // has totally completed.
        //
        // If calculating in a separate thread, however, then post rather
        // than send the "in progress" message.  Otherwise, in the case where
        // the main thread tries to kill the worker thread, there may be
        // a deadlock where the main thread is doing a WaitForSingleObject
        // on the "kill done" event while the worker thread is waiting for
        // the main thread to handle the sent message.
        if (pInfo == NULL)
        {
          pWndNotifyProgress->SendMessage(WM_USER_RECALC_IN_PROGRESS, nCount*5);
        }
        else
        {
          pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS, nCount*5);
        }
      }
      // Sleep 1/20th of total recalc time, which is 50 milliseconds
      // per each of total number of seconds (nSeconds) of recalc time.
      Sleep(nSeconds * 50);

    }

    if (hwndNotifyProgress != NULL)
    {
      // See comment above regarding post versus send message.
      if (pInfo == NULL)
        pWndNotifyProgress->SendMessage(WM_USER_RECALC_IN_PROGRESS, 100);
      else
        pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS, 100);

    }
  }

  nResult = nInt1 + nInt2;
  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/slowcalc.h File Reference

  • advanced
  • mtrecalc
Functions

slowcalc.h File Reference

Go to the source code of this file.

Functions

BOOL SlowAdd (int nInt1, int nInt2, int &nResult, CRecalcThreadInfo *pInfo, int nSeconds, HWND hwndNotifyProgress)

Function Documentation

BOOL SlowAdd | ( | int | nInt1,
 |  | int | nInt2,
 |  | int & | nResult,
 |  | CRecalcThreadInfo * | pInfo,
 |  | int | nSeconds,
 |  | HWND | hwndNotifyProgress
 | ) |  |

Definition at line 21 of file slowcalc.cpp.

{
  CWnd* pWndNotifyProgress = CWnd::FromHandle(hwndNotifyProgress);

  BOOL bRestartCalculation = TRUE;
  while (bRestartCalculation)
  {
    bRestartCalculation = FALSE;
    // Do the calculation 5% at a time, allowing for interruption to
    // restart calculation.
    for (int nCount = 1; nCount < 20; nCount++)
    {
      if (pInfo != NULL
        && WaitForSingleObject(pInfo->m_hEventKillRecalcThread, 0)  == WAIT_OBJECT_0)
      {
        if (hwndNotifyProgress != NULL)
        {
          // Reset progress indication to 0 (recalculation not begun)
          pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS);
        }
        return FALSE; // Terminate this recalculation
      }

      if (pInfo != NULL
        &&WaitForSingleObject(pInfo->m_hEventStartRecalc, 0) == WAIT_OBJECT_0)
      {
        // Get new source data for the calculation.
        nInt1 = pInfo->m_nInt1;
        nInt2 = pInfo->m_nInt2;
        bRestartCalculation = TRUE;
        continue;
      }

      // Notify window about each 5% of progress
      if (hwndNotifyProgress != NULL)
      {
        // If calculating in a single thread, send rather than post the
        // "in progress" message, so that the progress is reflected
        // immediately in the status bar.  Otherwise, the posted "in
        // progress" messages won't be handled until after the recalculation
        // has totally completed.
        //
        // If calculating in a separate thread, however, then post rather
        // than send the "in progress" message.  Otherwise, in the case where
        // the main thread tries to kill the worker thread, there may be
        // a deadlock where the main thread is doing a WaitForSingleObject
        // on the "kill done" event while the worker thread is waiting for
        // the main thread to handle the sent message.
        if (pInfo == NULL)
        {
          pWndNotifyProgress->SendMessage(WM_USER_RECALC_IN_PROGRESS, nCount*5);
        }
        else
        {
          pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS, nCount*5);
        }
      }
      // Sleep 1/20th of total recalc time, which is 50 milliseconds
      // per each of total number of seconds (nSeconds) of recalc time.
      Sleep(nSeconds * 50);

    }

    if (hwndNotifyProgress != NULL)
    {
      // See comment above regarding post versus send message.
      if (pInfo == NULL)
        pWndNotifyProgress->SendMessage(WM_USER_RECALC_IN_PROGRESS, 100);
      else
        pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS, 100);

    }
  }

  nResult = nInt1 + nInt2;
  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/speeddlg.cpp File Reference

  • advanced
  • mtrecalc

speeddlg.cpp File Reference

#include "stdafx.h"
#include "mtrecalc.h"
#include "speeddlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/speeddlg.h File Reference

  • advanced
  • mtrecalc
Classes

speeddlg.h File Reference

Go to the source code of this file.

Classes

class CSpeedDlg
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/stdafx.cpp File Reference

  • advanced
  • mtrecalc

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/stdafx.h File Reference

  • advanced
  • mtrecalc
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexdlg.cpp File Reference

  • advanced
  • mutexes
Classes | Defines

mutexdlg.cpp File Reference

#include "stdafx.h"
#include "mutexes.h"
#include "mutexdlg.h"
#include "threads.h"

Go to the source code of this file.

Classes

class | CAboutDlg

Defines

#define | MAX_DIGITS 6000

Define Documentation

#define MAX_DIGITS 6000

Definition at line 27 of file mutexdlg.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexdlg.h File Reference

  • advanced
  • mutexes
Classes

mutexdlg.h File Reference

Go to the source code of this file.

Classes

class CMutexesDlg
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexes.cpp File Reference

  • advanced
  • mutexes
Variables

mutexes.cpp File Reference

#include "stdafx.h"
#include "mutexes.h"
#include "mutexdlg.h"

Go to the source code of this file.

Variables

CMutexesApp theApp

Variable Documentation

CMutexesApp theApp

Definition at line 49 of file mutexes.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexes.h File Reference

  • advanced
  • mutexes
Classes

mutexes.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CMutexesApp
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/resource.h File Reference

  • advanced
  • mutexes
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_CNTRTHRDPRIORITY 102
#define | IDC_DATABOX 106
#define | IDC_DSPYTHRDPRIORITY 101
#define | IDC_PAUSE 103
#define | IDC_PRIORITYCLASS 100
#define | IDC_SHOWCNTRTHRD 105
#define | IDC_SYNCHRONIZE 104
#define | IDD_ABOUTBOX 100
#define | IDD_MUTEXES_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101

Define Documentation

#define IDC_CNTRTHRDPRIORITY 102

Definition at line 11 of file resource.h.

#define IDC_DATABOX 106

Definition at line 15 of file resource.h.

#define IDC_DSPYTHRDPRIORITY 101

Definition at line 9 of file resource.h.

#define IDC_PAUSE 103

Definition at line 12 of file resource.h.

#define IDC_PRIORITYCLASS 100

Definition at line 7 of file resource.h.

#define IDC_SHOWCNTRTHRD 105

Definition at line 14 of file resource.h.

#define IDC_SYNCHRONIZE 104

Definition at line 13 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_MUTEXES_DIALOG 102

Definition at line 10 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 16 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/stdafx.cpp File Reference

  • advanced
  • mutexes

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/stdafx.h File Reference

  • advanced
  • mutexes
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>
#include <afxmt.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 19 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/threads.cpp File Reference

  • advanced
  • mutexes

threads.cpp File Reference

#include "stdafx.h"
#include "mutexes.h"
#include "mutexdlg.h"
#include "threads.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/threads.h File Reference

  • advanced
  • mutexes
Classes

threads.h File Reference

Go to the source code of this file.

Classes

class | CCounterThread
class | CDisplayThread
class | CExampleThread
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/resource.h File Reference

  • advanced
  • speakn
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_GIVE_UP 205
#define | IDC_INPUT_EDIT 206
#define | IDC_PICTURE 201
#define | IDC_PROMPT_TEXT 203
#define | IDC_REPLAY_SOUND 204
#define | IDC_STATUS_FACE 202
#define | IDD_NOPENDIALOG 102
#define | IDD_PENDIALOG 101
#define | IDI_FACE_HAPPIER 12
#define | IDI_FACE_HAPPY 11
#define | IDI_FACE_NEUTRAL 10
#define | IDI_FACE_SAD 13
#define | IDS_CANNOT_PLAY_SOUND 1
#define | IDS_DONE 5
#define | IDS_FONT_NAME 2
#define | IDS_PICTURE_UNAVAILABLE 4
#define | IDS_TRY_AGAIN 3
#define | IDSOUND_CORRECT 103
#define | IDSOUND_GIVEUP 105
#define | IDSOUND_GOODBYE 106
#define | IDSOUND_INCORRECT 104
#define | IDSOUND_QUESTION 102
#define | IDSOUND_WELCOME 101

Define Documentation

#define IDC_GIVE_UP 205

Definition at line 26 of file resource.h.

#define IDC_INPUT_EDIT 206

Definition at line 27 of file resource.h.

#define IDC_PICTURE 201

Definition at line 22 of file resource.h.

#define IDC_PROMPT_TEXT 203

Definition at line 24 of file resource.h.

#define IDC_REPLAY_SOUND 204

Definition at line 25 of file resource.h.

#define IDC_STATUS_FACE 202

Definition at line 23 of file resource.h.

#define IDD_NOPENDIALOG 102

Definition at line 17 of file resource.h.

#define IDD_PENDIALOG 101

Definition at line 14 of file resource.h.

#define IDI_FACE_HAPPIER 12

Definition at line 12 of file resource.h.

#define IDI_FACE_HAPPY 11

Definition at line 11 of file resource.h.

#define IDI_FACE_NEUTRAL 10

Definition at line 10 of file resource.h.

#define IDI_FACE_SAD 13

Definition at line 13 of file resource.h.

#define IDS_CANNOT_PLAY_SOUND 1

Definition at line 5 of file resource.h.

#define IDS_DONE 5

Definition at line 9 of file resource.h.

#define IDS_FONT_NAME 2

Definition at line 6 of file resource.h.

#define IDS_PICTURE_UNAVAILABLE 4

Definition at line 8 of file resource.h.

#define IDS_TRY_AGAIN 3

Definition at line 7 of file resource.h.

#define IDSOUND_CORRECT 103

Definition at line 18 of file resource.h.

#define IDSOUND_GIVEUP 105

Definition at line 20 of file resource.h.

#define IDSOUND_GOODBYE 106

Definition at line 21 of file resource.h.

#define IDSOUND_INCORRECT 104

Definition at line 19 of file resource.h.

#define IDSOUND_QUESTION 102

Definition at line 16 of file resource.h.

#define IDSOUND_WELCOME 101

Definition at line 15 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/speakn.cpp File Reference

  • advanced
  • speakn
Variables

speakn.cpp File Reference

#include "stdafx.h"
#include "speakn.h"
#include <mmsystem.h>

Go to the source code of this file.

Variables

CSpeakNApp NEAR theApp

Variable Documentation

CSpeakNApp NEAR theApp

Definition at line 298 of file speakn.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/speakn.h File Reference

  • advanced
  • speakn
Classes

speakn.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CSpeakNApp
class | CSpeakNDlg
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/stdafx.cpp File Reference

  • advanced
  • speakn

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/stdafx.h File Reference

  • advanced
  • speakn
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 10 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnctl.cpp File Reference

  • controls
  • button
Functions | Variables

btnctl.cpp File Reference

#include "stdafx.h"
#include "button.h"
#include "btnctl.h"
#include "btnppg.h"
#include <msstkppg.h>

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CButtonCtrl,"BUTTON.ButtonCtrl.1", 0x4a8c998f, 0x7713, 0x101b, 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2) const IID BASED_CODE IID_DButton

Variables

const IID BASED_CODE IID_DButtonEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CButtonCtrl | ,
 |  | "BUTTON.ButtonCtrl.1" | ,
 |  | 0x4a8c998f | ,
 |  | 0x7713 | ,
 |  | 0x101b | ,
 |  | 0xa5 | ,
 |  | 0xa1 | ,
 |  | 0x4 | ,
 |  | 0x2 | ,
 |  | 0x1c | ,
 |  | 0x0 | ,
 |  | 0x94 | ,
 |  | 0x2 |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DButtonEvents
Initial value:
    { 0x4a8c9991, 0x7713, 0x101b, { 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2 } }

Definition at line 93 of file btnctl.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnctl.h File Reference

  • controls
  • button
Classes

btnctl.h File Reference

Go to the source code of this file.

Classes

class CButtonCtrl
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnppg.cpp File Reference

  • controls
  • button
Functions

btnppg.cpp File Reference

#include "stdafx.h"
#include "button.h"
#include "btnppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CButtonPropPage,"BUTTON.ButtonPropPage.1", 0x4a8c9993, 0x7713, 0x101b, 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2) BOOL CButtonPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CButtonPropPage | ,
 |  | "BUTTON.ButtonPropPage.1" | ,
 |  | 0x4a8c9993 | ,
 |  | 0x7713 | ,
 |  | 0x101b | ,
 |  | 0xa5 | ,
 |  | 0xa1 | ,
 |  | 0x4 | ,
 |  | 0x2 | ,
 |  | 0x1c | ,
 |  | 0x0 | ,
 |  | 0x94 | ,
 |  | 0x2 |
 | ) |  |

Definition at line 37 of file btnppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_BUTTON_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnppg.h File Reference

  • controls
  • button
Classes

btnppg.h File Reference

Go to the source code of this file.

Classes

class CButtonPropPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/button.cpp File Reference

  • controls
  • button
Functions | Variables

button.cpp File Reference

#include "stdafx.h"
#include "button.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CButtonApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 56 of file button.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 73 of file button.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x4a8c9992, 0x7713, 0x101b, { 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2 } }

Definition at line 23 of file button.cpp.

const WORD _wVerMajor = 1

Definition at line 25 of file button.cpp.

const WORD _wVerMinor = 0

Definition at line 26 of file button.cpp.

CButtonApp NEAR theApp

Definition at line 21 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/button.h File Reference

  • controls
  • button
Classes | Variables

button.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CButtonApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/button.odl File Reference

  • controls
  • button
Classes | Namespaces | Functions

button.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | ButtonLib::_DButton
interface | ButtonLib::_DButtonEvents
class | ButtonLib::Button

Namespaces

namespace | ButtonLib

Functions

ButtonLib::importlib (STDOLE_TLB)
ButtonLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/resource.h File Reference

  • controls
  • button
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_HELP_BUTTONCONTROL 32771
#define | ID_OPTIONS_OPTION1 32768
#define | ID_OPTIONS_OPTION2 32769
#define | ID_OPTIONS_OPTION3 32770
#define | IDB_BUTTON 1
#define | IDC_CAPTIONEDIT 201
#define | IDD_ABOUTBOX_BUTTON 100
#define | IDD_PROPPAGE_BUTTON 101
#define | IDI_ABOUTDLL 10
#define | IDR_INPLACEMENU 201
#define | IDS_BUTTON 1
#define | IDS_BUTTON_PPG 2
#define | IDS_BUTTON_PPG_CAPTION 101

Define Documentation

#define ID_HELP_BUTTONCONTROL 32771

Definition at line 26 of file resource.h.

#define ID_OPTIONS_OPTION1 32768

Definition at line 23 of file resource.h.

#define ID_OPTIONS_OPTION2 32769

Definition at line 24 of file resource.h.

#define ID_OPTIONS_OPTION3 32770

Definition at line 25 of file resource.h.

#define IDB_BUTTON 1

Definition at line 15 of file resource.h.

#define IDC_CAPTIONEDIT 201

Definition at line 22 of file resource.h.

#define IDD_ABOUTBOX_BUTTON 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_BUTTON 101

Definition at line 20 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 17 of file resource.h.

#define IDR_INPLACEMENU 201

Definition at line 21 of file resource.h.

#define IDS_BUTTON 1

Definition at line 14 of file resource.h.

#define IDS_BUTTON_PPG 2

Definition at line 16 of file resource.h.

#define IDS_BUTTON_PPG_CAPTION 101

Definition at line 19 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/stdafx.cpp File Reference

  • controls
  • button

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/stdafx.h File Reference

  • controls
  • button

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circ.cpp File Reference

  • controls
  • circ
Functions | Variables

circ.cpp File Reference

#include "stdafx.h"
#include "circ.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CCircApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 59 of file circ.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 76 of file circ.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x9dbafcd2, 0x592f, 0x101b, { 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b } }

Definition at line 23 of file circ.cpp.

const WORD _wVerMajor = 1

Definition at line 25 of file circ.cpp.

const WORD _wVerMinor = 0

Definition at line 26 of file circ.cpp.

CCircApp NEAR theApp

Definition at line 21 of file circ.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circ.h File Reference

  • controls
  • circ
Classes | Variables

circ.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CCircApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circ.odl File Reference

  • controls
  • circ
Classes | Namespaces | Functions

circ.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | CircLib::_DCirc
interface | CircLib::_DCircEvents
class | CircLib::Circ

Namespaces

namespace | CircLib

Functions

CircLib::importlib (STDOLE_TLB)
CircLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circctl.cpp File Reference

  • controls
  • circ
Functions | Variables

circctl.cpp File Reference

#include "stdafx.h"
#include "circ.h"
#include "circctl.h"
#include "circppg.h"
#include <msstkppg.h>

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CCircCtrl,"CIRC.CircCtrl.1", 0x9dbafccf, 0x592f, 0x101b, 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b) const IID BASED_CODE IID_DCirc

Variables

const IID BASED_CODE IID_DCircEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CCircCtrl | ,
 |  | "CIRC.CircCtrl.1" | ,
 |  | 0x9dbafccf | ,
 |  | 0x592f | ,
 |  | 0x101b | ,
 |  | 0x85 | ,
 |  | 0xce | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xec | ,
 |  | 0x29 | ,
 |  | 0x7b |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DCircEvents
Initial value:
    { 0x9dbafcd1, 0x592f, 0x101b, { 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b } }

Definition at line 99 of file circctl.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circctl.h File Reference

  • controls
  • circ
Classes

circctl.h File Reference

Go to the source code of this file.

Classes

class CCircCtrl
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circppg.cpp File Reference

  • controls
  • circ
Functions

circppg.cpp File Reference

#include "stdafx.h"
#include "circ.h"
#include "circppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CCircPropPage,"CIRC.CircPropPage.1", 0x9dbafcd3, 0x592f, 0x101b, 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b) BOOL CCircPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CCircPropPage | ,
 |  | "CIRC.CircPropPage.1" | ,
 |  | 0x9dbafcd3 | ,
 |  | 0x592f | ,
 |  | 0x101b | ,
 |  | 0x85 | ,
 |  | 0xce | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xec | ,
 |  | 0x29 | ,
 |  | 0x7b |
 | ) |  |

Definition at line 39 of file circppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_CIRC_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circppg.h File Reference

  • controls
  • circ
Classes

circppg.h File Reference

Go to the source code of this file.

Classes

class CCircPropPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/resource.h File Reference

  • controls
  • circ
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_CIRC 1
#define | IDC_CAPTION 201
#define | IDC_CIRCLEOFFSET 202
#define | IDC_CIRCLESHAPE 203
#define | IDC_NOTE 204
#define | IDD_ABOUTBOX_CIRC 100
#define | IDD_PROPPAGE_CIRC 101
#define | IDI_ABOUTDLL 10
#define | IDS_CIRC 1
#define | IDS_CIRC_PPG 2
#define | IDS_CIRC_PPG_CAPTION 101

Define Documentation

#define IDB_CIRC 1

Definition at line 15 of file resource.h.

#define IDC_CAPTION 201

Definition at line 21 of file resource.h.

#define IDC_CIRCLEOFFSET 202

Definition at line 22 of file resource.h.

#define IDC_CIRCLESHAPE 203

Definition at line 23 of file resource.h.

#define IDC_NOTE 204

Definition at line 24 of file resource.h.

#define IDD_ABOUTBOX_CIRC 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_CIRC 101

Definition at line 20 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 17 of file resource.h.

#define IDS_CIRC 1

Definition at line 14 of file resource.h.

#define IDS_CIRC_PPG 2

Definition at line 16 of file resource.h.

#define IDS_CIRC_PPG_CAPTION 101

Definition at line 19 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/stdafx.cpp File Reference

  • controls
  • circ

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/stdafx.h File Reference

  • controls
  • circ

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/AllControlsSheet.cpp File Reference

  • controls
  • cmnctrl

AllControlsSheet.cpp File Reference

#include "stdafx.h"
#include "AllControlsSheet.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/AllControlsSheet.h File Reference

  • controls
  • cmnctrl
Classes

AllControlsSheet.h File Reference

#include "CmnCtrl3.h"
#include "PagerCtrlPage.h"
#include "NetAddressCtrlPage.h"
#include "SplitButtonCtrlPage.h"
#include "CommandLinkCtrlPage.h"

Go to the source code of this file.

Classes

class CAllControlsSheet
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3.cpp File Reference

  • controls
  • cmnctrl
Variables

CmnCtrl3.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl3.h"
#include "AllControlsSheet.h"

Go to the source code of this file.

Variables

CCmnCtrl3App theApp

Variable Documentation

CCmnCtrl3App theApp

Definition at line 27 of file CmnCtrl3.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3.h File Reference

  • controls
  • cmnctrl
Classes | Variables

CmnCtrl3.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CCmnCtrl3App

Variables

CCmnCtrl3App theApp

Variable Documentation

CCmnCtrl3App theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3Dlg.cpp File Reference

  • controls
  • cmnctrl

CmnCtrl3Dlg.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl3.h"
#include "CmnCtrl3Dlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3Dlg.h File Reference

  • controls
  • cmnctrl
Classes

CmnCtrl3Dlg.h File Reference

Go to the source code of this file.

Classes

class CCmnCtrl3Dlg
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CommandLinkCtrlPage.cpp File Reference

  • controls
  • cmnctrl

CommandLinkCtrlPage.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl3.h"
#include "CommandLinkCtrlPage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CommandLinkCtrlPage.h File Reference

  • controls
  • cmnctrl
Classes

CommandLinkCtrlPage.h File Reference

#include "afxwin.h"

Go to the source code of this file.

Classes

class CCommandLinkCtrlPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/NetAddressCtrlPage.cpp File Reference

  • controls
  • cmnctrl

NetAddressCtrlPage.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl3.h"
#include "NetAddressCtrlPage.h"

Go to the source code of this file.

Variable Documentation

DWORD dwNetString

Definition at line 11 of file NetAddressCtrlPage.cpp.

LPCTSTR lpszDisplay

Definition at line 12 of file NetAddressCtrlPage.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/NetAddressCtrlPage.h File Reference

  • controls
  • cmnctrl
Classes

NetAddressCtrlPage.h File Reference

#include "afxcmn.h"
#include "afxwin.h"

Go to the source code of this file.

Classes

class CNetAddressCtrlPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/PagerCtrlPage.cpp File Reference

  • controls
  • cmnctrl

PagerCtrlPage.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl3.h"
#include "PagerCtrlPage.h"

Go to the source code of this file.

Variable Documentation

COLORREF color

Definition at line 11 of file PagerCtrlPage.cpp.

LPCTSTR lpszDisplay

Definition at line 12 of file PagerCtrlPage.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/PagerCtrlPage.h File Reference

  • controls
  • cmnctrl
Classes

PagerCtrlPage.h File Reference

#include "afxwin.h"

Go to the source code of this file.

Classes

class CPagerCtrlPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/resource.h File Reference

  • controls
  • cmnctrl
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BUTTON32777 32777
#define | ID_BUTTON32778 32778
#define | ID_BUTTON32779 32779
#define | ID_BUTTON32780 32780
#define | ID_BUTTON32781 32781
#define | ID_BUTTON32782 32782
#define | ID_BUTTON32783 32783
#define | ID_BUTTON32784 32784
#define | ID_BUTTON32785 32785
#define | ID_BUTTON32787 32787
#define | ID_BUTTON32788 32788
#define | ID_BUTTON32789 32789
#define | ID_MENU1_MENU1 32773
#define | ID_MENU1_MENU2 32774
#define | ID_MENU2_MENU2 32775
#define | ID_MENU2_MENU3 32776
#define | ID_MENU2_MENU4 32786
#define | ID_ROOT_MENU1 32771
#define | ID_ROOT_MENU2 32772
#define | IDB_BITMAP1 138
#define | IDC_ADD_BORDER 1012
#define | IDC_BACK_COLOR 1014
#define | IDC_BUTTON5 1008
#define | IDC_BUTTON_NOTE 1031
#define | IDC_BUTTON_SIZE 1021
#define | IDC_BUTTON_VALIDATE 1028
#define | IDC_CHECK1 1040
#define | IDC_CHECK4 1026
#define | IDC_CHECK_ADDRESS 1023
#define | IDC_CHECK_ELEV 1033
#define | IDC_CHECK_MOUSEFWD 1040
#define | IDC_CHECK_NETWORK 1025
#define | IDC_CHECK_NOSCOPE 1027
#define | IDC_CHECK_SERVICE 1024
#define | IDC_CHECK_STATE 1034
#define | IDC_COMBO2 1009
#define | IDC_COMMAND 1037
#define | IDC_DIRECTION 1009
#define | IDC_DIRECTION2 1010
#define | IDC_LIST1 1029
#define | IDC_LIST_NETSTRINGS 1030
#define | IDC_LIST_STYLE 1029
#define | IDC_MAX_RANGE 1017
#define | IDC_MAX_RANGE2 1017
#define | IDC_MIN_RANGE 1016
#define | IDC_NETADDRESS 1022
#define | IDC_NETADDRESS1 1022
#define | IDC_PAGER_CTRL 201
#define | IDC_POSITION 1019
#define | IDC_REDUCE_BORDER 1013
#define | IDC_SET_BUTTON_NOTE 1032
#define | IDC_SET_BUTTON_SIZE 1020
#define | IDC_SET_MENU1 1002
#define | IDC_SET_MENU2 1003
#define | IDC_SET_POSITION 1018
#define | IDC_SET_RANGE 1015
#define | IDC_SET_SIZE 1007
#define | IDC_SET_STATE 1004
#define | IDC_SLIDER_BORDER 1038
#define | IDC_SPLIT_BUTTON 1000
#define | IDC_SPLIT_STYLE 1009
#define | IDC_STATIC_BORDERSIZE 1039
#define | IDC_X_SIZE 1006
#define | IDC_Y_SIZE 1005
#define | IDD_COMMAND_LINK_CONTROL 103
#define | IDD_NETWORK_ADDRESS_CONTROL 131
#define | IDD_PAGER_CONTROL 130
#define | IDD_SPLIT_BUTTON 129
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDR_SPLIT_DROPDOWN_MENU 134
#define | IDR_TOOLBAR1 135
#define | IDS_ABOUTBOX 101

Define Documentation

#define ID_BUTTON32777 32777

Definition at line 65 of file resource.h.

#define ID_BUTTON32778 32778

Definition at line 66 of file resource.h.

#define ID_BUTTON32779 32779

Definition at line 67 of file resource.h.

#define ID_BUTTON32780 32780

Definition at line 68 of file resource.h.

#define ID_BUTTON32781 32781

Definition at line 69 of file resource.h.

#define ID_BUTTON32782 32782

Definition at line 70 of file resource.h.

#define ID_BUTTON32783 32783

Definition at line 71 of file resource.h.

#define ID_BUTTON32784 32784

Definition at line 72 of file resource.h.

#define ID_BUTTON32785 32785

Definition at line 73 of file resource.h.

#define ID_BUTTON32787 32787

Definition at line 75 of file resource.h.

#define ID_BUTTON32788 32788

Definition at line 76 of file resource.h.

#define ID_BUTTON32789 32789

Definition at line 77 of file resource.h.

#define ID_MENU1_MENU1 32773

Definition at line 61 of file resource.h.

#define ID_MENU1_MENU2 32774

Definition at line 62 of file resource.h.

#define ID_MENU2_MENU2 32775

Definition at line 63 of file resource.h.

#define ID_MENU2_MENU3 32776

Definition at line 64 of file resource.h.

#define ID_MENU2_MENU4 32786

Definition at line 74 of file resource.h.

#define ID_ROOT_MENU1 32771

Definition at line 59 of file resource.h.

#define ID_ROOT_MENU2 32772

Definition at line 60 of file resource.h.

#define IDB_BITMAP1 138

Definition at line 14 of file resource.h.

#define IDC_ADD_BORDER 1012

Definition at line 28 of file resource.h.

#define IDC_BACK_COLOR 1014

Definition at line 30 of file resource.h.

#define IDC_BUTTON5 1008

Definition at line 23 of file resource.h.

#define IDC_BUTTON_NOTE 1031

Definition at line 50 of file resource.h.

#define IDC_BUTTON_SIZE 1021

Definition at line 38 of file resource.h.

#define IDC_BUTTON_VALIDATE 1028

Definition at line 46 of file resource.h.

#define IDC_CHECK1 1040

Definition at line 57 of file resource.h.

#define IDC_CHECK4 1026

Definition at line 44 of file resource.h.

#define IDC_CHECK_ADDRESS 1023

Definition at line 41 of file resource.h.

#define IDC_CHECK_ELEV 1033

Definition at line 52 of file resource.h.

#define IDC_CHECK_MOUSEFWD 1040

Definition at line 58 of file resource.h.

#define IDC_CHECK_NETWORK 1025

Definition at line 43 of file resource.h.

#define IDC_CHECK_NOSCOPE 1027

Definition at line 45 of file resource.h.

#define IDC_CHECK_SERVICE 1024

Definition at line 42 of file resource.h.

#define IDC_CHECK_STATE 1034

Definition at line 53 of file resource.h.

#define IDC_COMBO2 1009

Definition at line 24 of file resource.h.

#define IDC_COMMAND 1037

Definition at line 54 of file resource.h.

#define IDC_DIRECTION 1009

Definition at line 26 of file resource.h.

#define IDC_DIRECTION2 1010

Definition at line 27 of file resource.h.

#define IDC_LIST1 1029

Definition at line 47 of file resource.h.

#define IDC_LIST_NETSTRINGS 1030

Definition at line 49 of file resource.h.

#define IDC_LIST_STYLE 1029

Definition at line 48 of file resource.h.

#define IDC_MAX_RANGE 1017

Definition at line 34 of file resource.h.

#define IDC_MAX_RANGE2 1017

Definition at line 33 of file resource.h.

#define IDC_MIN_RANGE 1016

Definition at line 32 of file resource.h.

#define IDC_NETADDRESS 1022

Definition at line 40 of file resource.h.

#define IDC_NETADDRESS1 1022

Definition at line 39 of file resource.h.

#define IDC_PAGER_CTRL 201

Definition at line 15 of file resource.h.

#define IDC_POSITION 1019

Definition at line 36 of file resource.h.

#define IDC_REDUCE_BORDER 1013

Definition at line 29 of file resource.h.

#define IDC_SET_BUTTON_NOTE 1032

Definition at line 51 of file resource.h.

#define IDC_SET_BUTTON_SIZE 1020

Definition at line 37 of file resource.h.

#define IDC_SET_MENU1 1002

Definition at line 17 of file resource.h.

#define IDC_SET_MENU2 1003

Definition at line 18 of file resource.h.

#define IDC_SET_POSITION 1018

Definition at line 35 of file resource.h.

#define IDC_SET_RANGE 1015

Definition at line 31 of file resource.h.

#define IDC_SET_SIZE 1007

Definition at line 22 of file resource.h.

#define IDC_SET_STATE 1004

Definition at line 19 of file resource.h.

#define IDC_SLIDER_BORDER 1038

Definition at line 55 of file resource.h.

#define IDC_SPLIT_BUTTON 1000

Definition at line 16 of file resource.h.

#define IDC_SPLIT_STYLE 1009

Definition at line 25 of file resource.h.

#define IDC_STATIC_BORDERSIZE 1039

Definition at line 56 of file resource.h.

#define IDC_X_SIZE 1006

Definition at line 21 of file resource.h.

#define IDC_Y_SIZE 1005

Definition at line 20 of file resource.h.

#define IDD_COMMAND_LINK_CONTROL 103

Definition at line 7 of file resource.h.

#define IDD_NETWORK_ADDRESS_CONTROL 131

Definition at line 11 of file resource.h.

#define IDD_PAGER_CONTROL 130

Definition at line 10 of file resource.h.

#define IDD_SPLIT_BUTTON 129

Definition at line 9 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_SPLIT_DROPDOWN_MENU 134

Definition at line 12 of file resource.h.

#define IDR_TOOLBAR1 135

Definition at line 13 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/SplitButtonCtrlPage.cpp File Reference

  • controls
  • cmnctrl

SplitButtonCtrlPage.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl3.h"
#include "SplitButtonCtrlPage.h"

Go to the source code of this file.

Variable Documentation

LPCTSTR lpszDisplay

Definition at line 12 of file SplitButtonCtrlPage.cpp.

UINT nStyle

Definition at line 11 of file SplitButtonCtrlPage.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/SplitButtonCtrlPage.h File Reference

  • controls
  • cmnctrl
Classes

SplitButtonCtrlPage.h File Reference

#include "commctrl.h"
#include "afxwin.h"

Go to the source code of this file.

Classes

class CSplitButtonCtrlPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/stdafx.cpp File Reference

  • controls
  • cmnctrl

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/stdafx.h File Reference

  • controls
  • cmnctrl
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxdlgs.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/targetver.h File Reference

  • controls
  • cmnctrl
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/childfrm.cpp File Reference

  • controls
  • contain

childfrm.cpp File Reference

#include "stdafx.h"
#include "Contain.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/childfrm.h File Reference

  • controls
  • contain
Classes

childfrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/cntritem.cpp File Reference

  • controls
  • contain

cntritem.cpp File Reference

#include "stdafx.h"
#include "Contain.h"
#include "ContrDoc.h"
#include "CntrItem.h"
#include "ContrVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/cntritem.h File Reference

  • controls
  • contain
Classes

cntritem.h File Reference

Go to the source code of this file.

Classes

class CContainerItem
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contain.cpp File Reference

  • controls
  • contain
Classes | Variables

contain.cpp File Reference

#include "stdafx.h"
#include "Contain.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "ContrDoc.h"
#include "ContrVw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CContainerApp theApp

Variable Documentation

CContainerApp theApp

Definition at line 53 of file contain.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contain.h File Reference

  • controls
  • contain
Classes

contain.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CContainerApp
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrdoc.cpp File Reference

  • controls
  • contain

contrdoc.cpp File Reference

#include "stdafx.h"
#include "Contain.h"
#include "ContrDoc.h"
#include "CntrItem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrdoc.h File Reference

  • controls
  • contain
Classes | Defines

contrdoc.h File Reference

Go to the source code of this file.

Classes

class | CContainerDoc

Defines

#define | HINT_UPDATE_ITEM 1
#define | HINT_UPDATE_WINDOW 0

Define Documentation

#define HINT_UPDATE_ITEM 1

Definition at line 13 of file contrdoc.h.

#define HINT_UPDATE_WINDOW 0

Definition at line 12 of file contrdoc.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrvw.cpp File Reference

  • controls
  • contain

contrvw.cpp File Reference

#include "stdafx.h"
#include "Contain.h"
#include "ContrDoc.h"
#include "CntrItem.h"
#include "ContrVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrvw.h File Reference

  • controls
  • contain
Classes

contrvw.h File Reference

Go to the source code of this file.

Classes

class CContainerView
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/mainfrm.cpp File Reference

  • controls
  • contain

mainfrm.cpp File Reference

#include "stdafx.h"
#include "Contain.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/mainfrm.h File Reference

  • controls
  • contain
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/resource.h File Reference

  • controls
  • contain
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_EDIT_CNTR 32768
#define | IDD_ABOUTBOX 100
#define | IDP_FAILED_TO_CREATE 102
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTRTYPE 129
#define | IDR_CONTRTYPE_CNTR_IP 6
#define | IDR_MAINFRAME 128

Define Documentation

#define ID_CANCEL_EDIT_CNTR 32768

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 8 of file resource.h.

#define IDP_FAILED_TO_CREATE 102

Definition at line 10 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 9 of file resource.h.

#define IDR_CONTRTYPE 129

Definition at line 6 of file resource.h.

#define IDR_CONTRTYPE_CNTR_IP 6

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 5 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/stdafx.cpp File Reference

  • controls
  • contain

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/stdafx.h File Reference

  • controls
  • contain
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 13 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/bmpprop.cpp File Reference

  • controls
  • IMAGE
Functions

bmpprop.cpp File Reference

#include "stdafx.h"
#include "image.h"
#include "BmpProp.h"
#include "ImageCtl.h"

Go to the source code of this file.

Functions

DWORD AfxTransferFileContent (CFile *pFrom, CFile *pTo, DWORD dwAmount)

Function Documentation

DWORD AfxTransferFileContent | ( | CFile * | pFrom,
 |  | CFile * | pTo,
 |  | DWORD | dwAmount
 | ) |  |

Definition at line 175 of file bmpprop.cpp.

{
  BYTE buff[1024];
  DWORD dwRead = 0;
  DWORD dwActual = 1; // bogus value to enter the loop
  while ((dwAmount > 0) && (dwActual > 0))
  {
    dwActual = pFrom->Read(buff, min(dwAmount, 1024));
    pTo->Write(buff, dwActual);

    dwAmount -= dwActual;
    dwRead += dwActual;
  }
  return dwRead;
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/bmpprop.h File Reference

  • controls
  • IMAGE
Classes

bmpprop.h File Reference

Go to the source code of this file.

Classes

struct | BITMAPINFO256
class | CBitmapProperty
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/image.cpp File Reference

  • controls
  • IMAGE
Functions | Variables

image.cpp File Reference

#include "stdafx.h"
#include "image.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CImageApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 52 of file image.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 69 of file image.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x346685e0, 0xc383, 0x11cf, { 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5 } }

Definition at line 24 of file image.cpp.

const WORD _wVerMajor = 1

Definition at line 26 of file image.cpp.

const WORD _wVerMinor = 0

Definition at line 27 of file image.cpp.

CImageApp NEAR theApp

Definition at line 22 of file image.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/image.h File Reference

  • controls
  • IMAGE
Classes | Variables

image.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CImageApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/image.odl File Reference

  • controls
  • IMAGE
Classes | Namespaces | Functions

image.odl File Reference

#include <olectl.h>
#include <idispids.h>

Go to the source code of this file.

Classes

interface | IMAGELib::_DImage
interface | IMAGELib::_DImageEvents
class | IMAGELib::Image

Namespaces

namespace | IMAGELib

Functions

IMAGELib::importlib (STDOLE_TLB)
IMAGELib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImageCtl.cpp File Reference

  • controls
  • IMAGE
Functions | Variables

ImageCtl.cpp File Reference

#include "stdafx.h"
#include "image.h"
#include "BmpProp.h"
#include "ImageCtl.h"
#include "ImagePpg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CImageCtrl,"IMAGE.ImageCtrl.1", 0x346685e3, 0xc383, 0x11cf, 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5) const IID BASED_CODE IID_DImage

Variables

const IID BASED_CODE IID_DImageEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CImageCtrl | ,
 |  | "IMAGE.ImageCtrl.1" | ,
 |  | 0x346685e3 | ,
 |  | 0xc383 | ,
 |  | 0x11cf | ,
 |  | 0xa5 | ,
 |  | 0xa4 | ,
 |  | 0 | ,
 |  | 0xaa | ,
 |  | 0 | ,
 |  | 0xa4 | ,
 |  | 0x57 | ,
 |  | 0x5 |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DImageEvents
Initial value:
    { 0x346685e2, 0xc383, 0x11cf, { 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5 } }

Definition at line 89 of file ImageCtl.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImageCtl.h File Reference

  • controls
  • IMAGE
Classes

ImageCtl.h File Reference

Go to the source code of this file.

Classes

class CImageCtrl
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImagePpg.cpp File Reference

  • controls
  • IMAGE
Functions

ImagePpg.cpp File Reference

#include "stdafx.h"
#include "image.h"
#include "ImagePpg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CImagePropPage,"IMAGE.ImagePropPage.1", 0x346685e4, 0xc383, 0x11cf, 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5) BOOL CImagePropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CImagePropPage | ,
 |  | "IMAGE.ImagePropPage.1" | ,
 |  | 0x346685e4 | ,
 |  | 0xc383 | ,
 |  | 0x11cf | ,
 |  | 0xa5 | ,
 |  | 0xa4 | ,
 |  | 0 | ,
 |  | 0xaa | ,
 |  | 0 | ,
 |  | 0xa4 | ,
 |  | 0x57 | ,
 |  | 0x5 |
 | ) |  |

Definition at line 40 of file ImagePpg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_IMAGE_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImagePpg.h File Reference

  • controls
  • IMAGE
Classes

ImagePpg.h File Reference

Go to the source code of this file.

Classes

class CImagePropPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/Resource.h File Reference

  • controls
  • IMAGE
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_IMAGE 1
#define | IDC_AUTOSIZE 202
#define | IDC_IMAGEPATH 201
#define | IDD_ABOUTBOX_IMAGE 1
#define | IDD_PROPPAGE_IMAGE 100
#define | IDI_ABOUTDLL 1
#define | IDS_IMAGE 1
#define | IDS_IMAGE_PPG 2
#define | IDS_IMAGE_PPG_CAPTION 100

Define Documentation

#define IDB_IMAGE 1

Definition at line 16 of file Resource.h.

#define IDC_AUTOSIZE 202

Definition at line 22 of file Resource.h.

#define IDC_IMAGEPATH 201

Definition at line 21 of file Resource.h.

#define IDD_ABOUTBOX_IMAGE 1

Definition at line 15 of file Resource.h.

#define IDD_PROPPAGE_IMAGE 100

Definition at line 20 of file Resource.h.

#define IDI_ABOUTDLL 1

Definition at line 17 of file Resource.h.

#define IDS_IMAGE 1

Definition at line 14 of file Resource.h.

#define IDS_IMAGE_PPG 2

Definition at line 18 of file Resource.h.

#define IDS_IMAGE_PPG_CAPTION 100

Definition at line 19 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/StdAfx.cpp File Reference

  • controls
  • IMAGE

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/StdAfx.h File Reference

  • controls
  • IMAGE
Defines

StdAfx.h File Reference

#include <afxctl.h>
#include <afxdb.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenctl.cpp File Reference

  • controls
  • licensed
Functions | Variables

licenctl.cpp File Reference

#include "stdafx.h"
#include "licensed.h"
#include "licenctl.h"
#include "licenppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CLicensedCtrl,"LICENSED.LicensedCtrl.1", 0x973b27a3, 0xf232, 0x101a, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) const IID BASED_CODE IID_DLicensed

Variables

const IID BASED_CODE IID_DLicensedEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CLicensedCtrl | ,
 |  | "LICENSED.LicensedCtrl.1" | ,
 |  | 0x973b27a3 | ,
 |  | 0xf232 | ,
 |  | 0x101a | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DLicensedEvents
Initial value:
    { 0x37446b81, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 83 of file licenctl.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenctl.h File Reference

  • controls
  • licensed
Classes

licenctl.h File Reference

Go to the source code of this file.

Classes

class CLicensedCtrl
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenppg.cpp File Reference

  • controls
  • licensed
Functions

licenppg.cpp File Reference

#include "stdafx.h"
#include "licensed.h"
#include "licenppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CLicensedPropPage,"LICENSED.LicensedPropPage.1", 0x37446b82, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) BOOL CLicensedPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CLicensedPropPage | ,
 |  | "LICENSED.LicensedPropPage.1" | ,
 |  | 0x37446b82 | ,
 |  | 0x5870 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |
 | ) |  |

Definition at line 37 of file licenppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_LICENSED_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenppg.h File Reference

  • controls
  • licensed
Classes

licenppg.h File Reference

Go to the source code of this file.

Classes

class CLicensedPropPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licensed.cpp File Reference

  • controls
  • licensed
Functions | Variables

licensed.cpp File Reference

#include "stdafx.h"
#include "licensed.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CLicensedApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 59 of file licensed.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 76 of file licensed.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x973b27a6, 0xf232, 0x101a, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 23 of file licensed.cpp.

const WORD _wVerMajor = 1

Definition at line 25 of file licensed.cpp.

const WORD _wVerMinor = 0

Definition at line 26 of file licensed.cpp.

CLicensedApp NEAR theApp

Definition at line 21 of file licensed.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licensed.h File Reference

  • controls
  • licensed
Classes | Variables

licensed.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CLicensedApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licensed.odl File Reference

  • controls
  • licensed
Classes | Namespaces | Functions

licensed.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | LicensedLib::_DLicensed
interface | LicensedLib::_DLicensedEvents
class | LicensedLib::Licensed

Namespaces

namespace | LicensedLib

Functions

LicensedLib::importlib (STDOLE_TLB)
LicensedLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/resource.h File Reference

  • controls
  • licensed
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | _APS_NEXT_COMMAND_VALUE 32768
#define | _APS_NEXT_CONTROL_VALUE 201
#define | _APS_NEXT_RESOURCE_VALUE 201
#define | _APS_NEXT_SYMED_VALUE 101
#define | IDB_LICENSED 1
#define | IDD_ABOUTBOX_LICENSED 100
#define | IDD_PROPPAGE_LICENSED 101
#define | IDI_ABOUTDLL 10
#define | IDS_LICENSED 1
#define | IDS_LICENSED_PPG 2
#define | IDS_LICENSED_PPG_CAPTION 101

Define Documentation

#define _APS_NEXT_COMMAND_VALUE 32768

Definition at line 26 of file resource.h.

#define _APS_NEXT_CONTROL_VALUE 201

Definition at line 24 of file resource.h.

#define _APS_NEXT_RESOURCE_VALUE 201

Definition at line 23 of file resource.h.

#define _APS_NEXT_SYMED_VALUE 101

Definition at line 25 of file resource.h.

#define IDB_LICENSED 1

Definition at line 20 of file resource.h.

#define IDD_ABOUTBOX_LICENSED 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_LICENSED 101

Definition at line 19 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 21 of file resource.h.

#define IDS_LICENSED 1

Definition at line 14 of file resource.h.

#define IDS_LICENSED_PPG 2

Definition at line 15 of file resource.h.

#define IDS_LICENSED_PPG_CAPTION 101

Definition at line 16 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/stdafx.cpp File Reference

  • controls
  • licensed

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/stdafx.h File Reference

  • controls
  • licensed

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localctl.cpp File Reference

  • controls
  • localize
Functions | Variables

localctl.cpp File Reference

#include "stdafx.h"
#include "localize.h"
#include "localctl.h"
#include "localppg.h"
#include <olenls.h>

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CLocalizeCtrl,"LOCALIZE.LocalizeCtrl.1", 0x879d6fe0, 0x5470, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) const IID BASED_CODE IID_DLocalize

Variables

const IID BASED_CODE IID_DLocalizeEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CLocalizeCtrl | ,
 |  | "LOCALIZE.LocalizeCtrl.1" | ,
 |  | 0x879d6fe0 | ,
 |  | 0x5470 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DLocalizeEvents
Initial value:
    { 0x35e3e53, 0x6745, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 95 of file localctl.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localctl.h File Reference

  • controls
  • localize
Classes

localctl.h File Reference

Go to the source code of this file.

Classes

class CLocalizeCtrl
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localide.odl File Reference

  • controls
  • localize
Classes | Namespaces | Functions

localide.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | LocalizeLib::_DLocalize
interface | LocalizeLib::_DLocalizeEvents
class | LocalizeLib::Localize

Namespaces

namespace | LocalizeLib

Functions

LocalizeLib::importlib (STDOLE_TLB)
LocalizeLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localifr.odl File Reference

  • controls
  • localize
Classes | Namespaces | Functions

localifr.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | LocalizeLib::_DLocalize
interface | LocalizeLib::_DLocalizeEvents
class | LocalizeLib::Localize

Namespaces

namespace | LocalizeLib

Functions

LocalizeLib::importlib (STDOLE_TLB)
LocalizeLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localize.cpp File Reference

  • controls
  • localize
Functions | Variables

localize.cpp File Reference

#include "stdafx.h"
#include "localize.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CLocalizeApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 59 of file localize.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid, _T("localifr.tlb"));
  AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid, _T("localide.tlb"));

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 79 of file localize.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x879d6fe3, 0x5470, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 23 of file localize.cpp.

const WORD _wVerMajor = 1

Definition at line 25 of file localize.cpp.

const WORD _wVerMinor = 0

Definition at line 26 of file localize.cpp.

CLocalizeApp NEAR theApp

Definition at line 21 of file localize.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localize.h File Reference

  • controls
  • localize
Classes | Variables

localize.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CLocalizeApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localize.odl File Reference

  • controls
  • localize
Classes | Namespaces | Functions

localize.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | LocalizeLib::_DLocalize
interface | LocalizeLib::_DLocalizeEvents
class | LocalizeLib::Localize

Namespaces

namespace | LocalizeLib

Functions

LocalizeLib::importlib (STDOLE_TLB)
LocalizeLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localppg.cpp File Reference

  • controls
  • localize
Functions

localppg.cpp File Reference

#include "stdafx.h"
#include "localize.h"
#include "localppg.h"
#include <olenls.h>

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CLocalizePropPage,"LOCALIZE.LocalizePropPage.1", 0x35e3e54, 0x6745, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) BOOL CLocalizePropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CLocalizePropPage | ,
 |  | "LOCALIZE.LocalizePropPage.1" | ,
 |  | 0x35e3e54 | ,
 |  | 0x6745 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |
 | ) |  |

Definition at line 45 of file localppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_LOCALIZE_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localppg.h File Reference

  • controls
  • localize
Classes

localppg.h File Reference

Go to the source code of this file.

Classes

class CLocalizePropPage
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/locresde.cpp File Reference

  • controls
  • localize
Functions

locresde.cpp File Reference

#include <windows.h>

Go to the source code of this file.

Functions

int CALLBACK LibMain (HINSTANCE, WORD, WORD, LPSTR)

Function Documentation

int CALLBACK LibMain | ( | HINSTANCE | ,
 |  | WORD | ,
 |  | WORD | ,
 |  | LPSTR |
 | ) |  |

Definition at line 15 of file locresde.cpp.

{
  return 1;
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/locresfr.cpp File Reference

  • controls
  • localize
Functions

locresfr.cpp File Reference

#include <windows.h>

Go to the source code of this file.

Functions

int CALLBACK LibMain (HINSTANCE, WORD, WORD, LPSTR)

Function Documentation

int CALLBACK LibMain | ( | HINSTANCE | ,
 |  | WORD | ,
 |  | WORD | ,
 |  | LPSTR |
 | ) |  |

Definition at line 15 of file locresfr.cpp.

{
  return 1;
}

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/resource.h File Reference

  • controls
  • localize
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_LOCALIZE 1
#define | IDC_CHECK1 201
#define | IDD_ABOUTBOX_LOCALIZE 100
#define | IDD_PROPPAGE_LOCALIZE 101
#define | IDI_ABOUTDLL 10
#define | IDS_CAPTION 201
#define | IDS_LOCALIZE 1
#define | IDS_LOCALIZE_PPG 2
#define | IDS_LOCALIZE_PPG_CAPTION 101

Define Documentation

#define IDB_LOCALIZE 1

Definition at line 6 of file resource.h.

#define IDC_CHECK1 201

Definition at line 12 of file resource.h.

#define IDD_ABOUTBOX_LOCALIZE 100

Definition at line 9 of file resource.h.

#define IDD_PROPPAGE_LOCALIZE 101

Definition at line 11 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 8 of file resource.h.

#define IDS_CAPTION 201

Definition at line 13 of file resource.h.

#define IDS_LOCALIZE 1

Definition at line 5 of file resource.h.

#define IDS_LOCALIZE_PPG 2

Definition at line 7 of file resource.h.

#define IDS_LOCALIZE_PPG_CAPTION 101

Definition at line 10 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/stdafx.cpp File Reference

  • controls
  • localize

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/stdafx.h File Reference

  • controls
  • localize

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifier.cpp File Reference

  • controls
  • netaddr
Variables

NetAddrVerifier.cpp File Reference

#include "stdafx.h"
#include "NetAddrVerifier.h"
#include "NetAddrVerifierDlg.h"

Go to the source code of this file.

Variables

CNetAddrVerifierApp theApp

Variable Documentation

CNetAddrVerifierApp theApp

Definition at line 31 of file NetAddrVerifier.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifier.h File Reference

  • controls
  • netaddr
Classes | Variables

NetAddrVerifier.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CNetAddrVerifierApp

Variables

CNetAddrVerifierApp theApp

Variable Documentation

CNetAddrVerifierApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifierDlg.cpp File Reference

  • controls
  • netaddr

NetAddrVerifierDlg.cpp File Reference

#include "stdafx.h"
#include "NetAddrVerifier.h"
#include "NetAddrVerifierDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifierDlg.h File Reference

  • controls
  • netaddr
Classes

NetAddrVerifierDlg.h File Reference

#include "afxwin.h"
#include "afxcmn.h"

Go to the source code of this file.

Classes

class CNetAddrVerifierDlg
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/resource.h File Reference

  • controls
  • netaddr
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_SPLITBUTTONMENU_VALIDATEALL 32771
#define | ID_SPLITBUTTONMENU_VALIDATEIPV4 32772
#define | ID_SPLITBUTTONMENU_VALIDATEIPV6 32773
#define | ID_SPLITBUTTONMENU_VALIDATENAMED 32774
#define | IDC_ADDRESS 1007
#define | IDC_ENUM_BUTTON 1000
#define | IDC_LIST1 1004
#define | IDC_VERIFY_BUTTON 1006
#define | IDD_NETADDRVERIFIER_DIALOG 102
#define | IDR_MAINFRAME 128
#define | IDR_MENU1 129

Define Documentation

#define ID_SPLITBUTTONMENU_VALIDATEALL 32771

Definition at line 12 of file resource.h.

#define ID_SPLITBUTTONMENU_VALIDATEIPV4 32772

Definition at line 13 of file resource.h.

#define ID_SPLITBUTTONMENU_VALIDATEIPV6 32773

Definition at line 14 of file resource.h.

#define ID_SPLITBUTTONMENU_VALIDATENAMED 32774

Definition at line 15 of file resource.h.

#define IDC_ADDRESS 1007

Definition at line 11 of file resource.h.

#define IDC_ENUM_BUTTON 1000

Definition at line 8 of file resource.h.

#define IDC_LIST1 1004

Definition at line 9 of file resource.h.

#define IDC_VERIFY_BUTTON 1006

Definition at line 10 of file resource.h.

#define IDD_NETADDRVERIFIER_DIALOG 102

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDR_MENU1 129

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/stdafx.cpp File Reference

  • controls
  • netaddr

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/stdafx.h File Reference

  • controls
  • netaddr
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <sstream>
#include <iomanip>
#include <lm.h>

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 16 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 13 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 10 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/pal.cpp File Reference

  • controls
  • pal
Functions | Variables

pal.cpp File Reference

#include "stdafx.h"
#include "pal.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CPalApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 59 of file pal.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 76 of file pal.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x5733f771, 0xbe58, 0x101a, { 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f } }

Definition at line 23 of file pal.cpp.

const WORD _wVerMajor = 1

Definition at line 25 of file pal.cpp.

const WORD _wVerMinor = 0

Definition at line 26 of file pal.cpp.

CPalApp NEAR theApp

Definition at line 21 of file pal.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/pal.h File Reference

  • controls
  • pal
Classes | Variables

pal.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CPalApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/pal.odl File Reference

  • controls
  • pal
Classes | Namespaces | Functions

pal.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | PalLib::_DPal
interface | PalLib::_DPalEvents
class | PalLib::Pal

Namespaces

namespace | PalLib

Functions

PalLib::importlib (STDOLE_TLB)
PalLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palctl.cpp File Reference

  • controls
  • pal
Functions | Variables

palctl.cpp File Reference

#include "stdafx.h"
#include "pal.h"
#include "palctl.h"
#include "palppg.h"

Go to the source code of this file.

Functions

HPALETTE | CopyPalette (HPALETTE srcpal)
IMPLEMENT_OLECREATE_EX (CPalCtrl,"PAL.PalCtrl.1", 0x5733f76e, 0xbe58, 0x101a, 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f) const IID BASED_CODE IID_DPal

Variables

const IID BASED_CODE | IID_DPalEvents

Function Documentation

HPALETTE CopyPalette ( HPALETTE srcpal )

Definition at line 539 of file palctl.cpp.

{
  HGLOBAL hmem;
  HPALETTE destpal;
  PLOGPALETTE ppal;
  int nNumEntries;

  if (!srcpal)
    return NULL;

  GetObject(srcpal, sizeof(int), (LPSTR)&nNumEntries);

  if (nNumEntries == 0)
    return NULL;

  // Allocate buffer for palette info
  hmem = GlobalAlloc(LPTR, (WORD)(sizeof(LOGPALETTE) + nNumEntries * sizeof(PALETTEENTRY)));
  if (!hmem)
    return NULL;

  ppal = (PLOGPALETTE)GlobalLock(hmem);

  // Init palette header info
  ppal->palVersion  = 0x300;
  ppal->palNumEntries = (WORD)nNumEntries;

  // Copy entries
  GetPaletteEntries(srcpal, 0, (WORD)nNumEntries, ppal->palPalEntry);

  // Create palette
  destpal = CreatePalette(ppal);

  GlobalFree(hmem);
  return destpal;
}

IMPLEMENT_OLECREATE_EX | ( | CPalCtrl | ,
 |  | "PAL.PalCtrl.1" | ,
 |  | 0x5733f76e | ,
 |  | 0xbe58 | ,
 |  | 0x101a | ,
 |  | 0xb5 | ,
 |  | 0x7a | ,
 |  | 0x0 | ,
 |  | 0x0 | ,
 |  | 0xc0 | ,
 |  | 0xc3 | ,
 |  | 0xed | ,
 |  | 0x5f |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DPalEvents
Initial value:
    { 0x37446b84, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 95 of file palctl.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palctl.h File Reference

  • controls
  • pal
Classes | Defines

palctl.h File Reference

Go to the source code of this file.

Classes

class | CPalCtrl

Defines

#define | PAL_E_CANTRESIZEPALETTE CUSTOM_CTL_SCODE(32002)

Define Documentation

#define PAL_E_CANTRESIZEPALETTE CUSTOM_CTL_SCODE(32002)

Definition at line 15 of file palctl.h.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palppg.cpp File Reference

  • controls
  • pal
Functions

palppg.cpp File Reference

#include "stdafx.h"
#include "pal.h"
#include "palppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CPalPropPage,"PAL.PalPropPage.1", 0x37446b85, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) BOOL CPalPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CPalPropPage | ,
 |  | "PAL.PalPropPage.1" | ,
 |  | 0x37446b85 | ,
 |  | 0x5870 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |
 | ) |  |

Definition at line 38 of file palppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_PAL_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palppg.h File Reference

  • controls
  • pal
Classes

palppg.h File Reference

Go to the source code of this file.

Classes

class CPalPropPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/resource.h File Reference

  • controls
  • pal
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_PAL 1
#define | IDC_LENGTHEDIT 201
#define | IDD_ABOUTBOX_PAL 100
#define | IDD_PROPPAGE_PAL 101
#define | IDI_ABOUTDLL 10
#define | IDS_EXCEP_CANTRESIZEPALETTE 300
#define | IDS_PAL 1
#define | IDS_PAL_PPG 2
#define | IDS_PAL_PPG_CAPTION 101

Define Documentation

#define IDB_PAL 1

Definition at line 15 of file resource.h.

#define IDC_LENGTHEDIT 201

Definition at line 21 of file resource.h.

#define IDD_ABOUTBOX_PAL 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_PAL 101

Definition at line 20 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 17 of file resource.h.

#define IDS_EXCEP_CANTRESIZEPALETTE 300

Definition at line 22 of file resource.h.

#define IDS_PAL 1

Definition at line 14 of file resource.h.

#define IDS_PAL_PPG 2

Definition at line 16 of file resource.h.

#define IDS_PAL_PPG_CAPTION 101

Definition at line 19 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/stdafx.cpp File Reference

  • controls
  • pal

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/stdafx.h File Reference

  • controls
  • pal

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/push.cpp File Reference

  • controls
  • push
Functions | Variables

push.cpp File Reference

#include "stdafx.h"
#include "push.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CPushApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 59 of file push.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 76 of file push.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x75303866, 0xb925, 0x101a, { 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f } }

Definition at line 23 of file push.cpp.

const WORD _wVerMajor = 1

Definition at line 25 of file push.cpp.

const WORD _wVerMinor = 0

Definition at line 26 of file push.cpp.

CPushApp NEAR theApp

Definition at line 21 of file push.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/push.h File Reference

  • controls
  • push
Classes | Variables

push.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CPushApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/push.odl File Reference

  • controls
  • push
Classes | Namespaces | Functions

push.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | PushLib::_DPush
interface | PushLib::_DPushEvents
class | PushLib::Push

Namespaces

namespace | PushLib

Functions

PushLib::importlib (STDOLE_TLB)
PushLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushctl.cpp File Reference

  • controls
  • push
Functions | Variables

pushctl.cpp File Reference

#include "stdafx.h"
#include "push.h"
#include "pushctl.h"
#include "pushppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CPushCtrl,"PUSH.PushCtrl.1", 0x75303863, 0xb925, 0x101a, 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f) const IID BASED_CODE IID_DPush

Variables

const IID BASED_CODE IID_DPushEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CPushCtrl | ,
 |  | "PUSH.PushCtrl.1" | ,
 |  | 0x75303863 | ,
 |  | 0xb925 | ,
 |  | 0x101a | ,
 |  | 0xb5 | ,
 |  | 0x7a | ,
 |  | 0x0 | ,
 |  | 0x0 | ,
 |  | 0xc0 | ,
 |  | 0xc3 | ,
 |  | 0xed | ,
 |  | 0x5f |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DPushEvents
Initial value:
    { 0x37446b87, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 91 of file pushctl.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushctl.h File Reference

  • controls
  • push
Classes

pushctl.h File Reference

Go to the source code of this file.

Classes

class CPushCtrl
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushppg.cpp File Reference

  • controls
  • push
Functions

pushppg.cpp File Reference

#include "stdafx.h"
#include "push.h"
#include "pushppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CPushPropPage,"PUSH.PushPropPage.1", 0x37446b88, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) BOOL CPushPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CPushPropPage | ,
 |  | "PUSH.PushPropPage.1" | ,
 |  | 0x37446b88 | ,
 |  | 0x5870 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |
 | ) |  |

Definition at line 38 of file pushppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_PUSH_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushppg.h File Reference

  • controls
  • push
Classes

pushppg.h File Reference

Go to the source code of this file.

Classes

class CPushPropPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/resource.h File Reference

  • controls
  • push
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_DOWNBITMAP 202
#define | IDB_PUSH 1
#define | IDB_UPBITMAP 204
#define | IDC_BORDERCHECK 202
#define | IDC_CAPTIONEDIT 201
#define | IDC_ENABLEDCHECK 203
#define | IDD_ABOUTBOX_PUSH 100
#define | IDD_PROPPAGE_PUSH 101
#define | IDI_ABOUTDLL 10
#define | IDS_PUSH 1
#define | IDS_PUSH_PPG 2
#define | IDS_PUSH_PPG_CAPTION 101

Define Documentation

#define IDB_DOWNBITMAP 202

Definition at line 23 of file resource.h.

#define IDB_PUSH 1

Definition at line 15 of file resource.h.

#define IDB_UPBITMAP 204

Definition at line 25 of file resource.h.

#define IDC_BORDERCHECK 202

Definition at line 22 of file resource.h.

#define IDC_CAPTIONEDIT 201

Definition at line 21 of file resource.h.

#define IDC_ENABLEDCHECK 203

Definition at line 24 of file resource.h.

#define IDD_ABOUTBOX_PUSH 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_PUSH 101

Definition at line 20 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 17 of file resource.h.

#define IDS_PUSH 1

Definition at line 14 of file resource.h.

#define IDS_PUSH_PPG 2

Definition at line 16 of file resource.h.

#define IDS_PUSH_PPG_CAPTION 101

Definition at line 19 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/stdafx.cpp File Reference

  • controls
  • push

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/stdafx.h File Reference

  • controls
  • push

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/regsvr/regsvr.cpp File Reference

  • controls
  • regsvr
Defines | Functions | Variables

regsvr.cpp File Reference

#include <windows.h>
#include <ole2.h>
#include <tchar.h>
#include <malloc.h>
#include <stdio.h>
#include "resource.h"

Go to the source code of this file.

Defines

#define | FAIL_ARGS 1
#define | FAIL_ENTRY 4
#define | FAIL_LOAD 3
#define | FAIL_OLE 2
#define | FAIL_REG 5
#define | MAX_STRING 1024
#define | SafePutts(string) ((stdout >= 0) ? _putts(string) : 0)

Functions

void | DisplayMessage (UINT ids, LPCTSTR pszArg1=NULL, LPCTSTR pszArg2=NULL, BOOL bUsage=FALSE, BOOL bInfo=FALSE)
void | FormatString2 (LPTSTR lpszOut, int nOutSize, LPCTSTR lpszFormat, LPCTSTR lpsz1, LPCTSTR lpsz2)
void | Info (UINT ids, LPCTSTR pszArg1=NULL, LPCTSTR pszArg2=NULL)
int | main (int argc, char *argv[])
void | Usage (UINT ids, LPCTSTR pszArg1=NULL, LPCTSTR pszArg2=NULL)

Variables

BOOL | _bConsole
BOOL | _bSilent
HINSTANCE | _hInstance
const TCHAR | _szAppName [] = _T("RegSvr32")
const char | _szDllRegSvr [] = "DllRegisterServer"
const char | _szDllUnregSvr [] = "DllUnregisterServer"

Define Documentation

#define FAIL_ARGS 1

Definition at line 19 of file regsvr.cpp.

#define FAIL_ENTRY 4

Definition at line 22 of file regsvr.cpp.

#define FAIL_LOAD 3

Definition at line 21 of file regsvr.cpp.

#define FAIL_OLE 2

Definition at line 20 of file regsvr.cpp.

#define FAIL_REG 5

Definition at line 23 of file regsvr.cpp.

#define MAX_STRING 1024

Definition at line 60 of file regsvr.cpp.

#define SafePutts ( string ) ((stdout >= 0) ? _putts(string) : 0)

Definition at line 33 of file regsvr.cpp.

Function Documentation

void DisplayMessage | ( | UINT | ids,
 |  | LPCTSTR | pszArg1 = NULL,
 |  | LPCTSTR | pszArg2 = NULL,
 |  | BOOL | bUsage = FALSE,
 |  | BOOL | bInfo = FALSE
 | ) |  |

Definition at line 63 of file regsvr.cpp.

{
  if (_bSilent && !_bConsole)
    return;

  TCHAR szFmt[MAX_STRING];
  LoadString(_hInstance, ids, szFmt, MAX_STRING);

  TCHAR szText[MAX_STRING];
  FormatString2(szText, MAX_STRING, szFmt, pszArg1, pszArg2);
  if (bUsage) {
    int cch = (int)_tcslen(szText);
    LoadString(_hInstance, IDS_USAGE, szText + cch, MAX_STRING - cch);
  }

  if (! _bSilent)
    MessageBox(NULL, szText, _szAppName,
      MB_TASKMODAL | (bInfo ? MB_ICONINFORMATION : MB_ICONEXCLAMATION));

  if (_bConsole) {
    TCHAR szMessage[MAX_STRING];
    FormatString2(szMessage, MAX_STRING, _T("%1: %2\n"), _szAppName, szText);
    SafePutts(szMessage);
  }
}

void FormatString2 | ( | LPTSTR | lpszOut,
 |  | int | nOutSize,
 |  | LPCTSTR | lpszFormat,
 |  | LPCTSTR | lpsz1,
 |  | LPCTSTR | lpsz2
 | ) |  |

Definition at line 36 of file regsvr.cpp.

{
  LPCTSTR pchSrc = lpszFormat;
  LPTSTR pchDest = lpszOut;
  while (*pchSrc != '\0') {
    if (pchSrc[0] == '%' && (pchSrc[1] >= '1' && pchSrc[1] <= '2')) {
      _tcscpy_s(pchDest, nOutSize, (LPCTSTR)(pchSrc[1] == '1' ? lpsz1 : lpsz2));
      pchDest += lstrlen(pchDest);
      pchSrc += 2;
    } else {
      if (_istlead(*pchSrc))
        *pchDest++ = *pchSrc++; // copy first of 2 bytes
      *pchDest++ = *pchSrc++;
    }
  }
  *pchDest = '\0';
}

void Info | ( | UINT | ids,
 |  | LPCTSTR | pszArg1 = NULL,
 |  | LPCTSTR | pszArg2 = NULL |
 | ) |  |  | [inline]

Definition at line 106 of file regsvr.cpp.

{
  DisplayMessage(ids, pszArg1, pszArg2, FALSE, TRUE);
}

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |  |

Definition at line 118 of file regsvr.cpp.

{
  int iReturn = 0;
  HRESULT (STDAPICALLTYPE * lpDllEntryPoint)(void);

  BOOL bVisualC = FALSE;
  BOOL bUnregister = FALSE;
  LPCSTR pszDllEntryPoint = _szDllRegSvr;
  LPTSTR ptszDllEntryPoint = NULL;
  LPCTSTR pszDllName = NULL;
  LPCTSTR pszTok;
  size_t EntryPointSize = 0;

  _hInstance = ::GetModuleHandle(NULL);

  // Parse command line arguments.
  int iTok;
  for (iTok = 1; iTok < argc; iTok++) {
    pszTok = argv[iTok];

    if ((pszTok[0] == '-') || (pszTok[0] == '/')) {
      switch (pszTok[1]) {
        case 'v':
        case 'V':
          bVisualC = TRUE;
          break;

        case 's':
        case 'S':
          _bSilent = TRUE;
          break;

        case 'u':
        case 'U':
          bUnregister = TRUE;
          pszDllEntryPoint = _szDllUnregSvr;
          break;

        case 'c':
        case 'C':
          _bConsole = TRUE;
          break;

        default:
          Usage(IDS_UNRECOGNIZEDFLAG, pszTok);
          return FAIL_ARGS;
      }
    } else {
      if (pszDllName == NULL) {
        pszDllName = pszTok;
        break;
      } else {
        Usage(IDS_EXTRAARGUMENT, pszTok);
        return FAIL_ARGS;
      }
    }
  }

  if (pszDllEntryPoint != NULL) {
    EntryPointSize = (1 + strlen(pszDllEntryPoint)) * (sizeof(TCHAR));
    ptszDllEntryPoint = (TCHAR *)_malloca(EntryPointSize); // _malloca may allocate memory on the heap, so we need to call _freea to clean the heap if used
#ifdef _UNICODE
    swprintf_s(ptszDllEntryPoint, EntryPointSize, _T("%hs"), pszDllEntryPoint);
#else // !_UNICODE
    strcpy_s(ptszDllEntryPoint, EntryPointSize, pszDllEntryPoint);
#endif
  }

  if (pszDllName == NULL) {
    if (bVisualC)
      DisplayMessage(IDS_NOPROJECT);
    else
      Usage(IDS_NODLLNAME);
    _freea(ptszDllEntryPoint);
    return FAIL_ARGS;
  }

  // Initialize OLE.
  if (FAILED(OleInitialize(NULL))) {
    DisplayMessage(IDS_OLEINITFAILED);
    _freea(ptszDllEntryPoint);
    return FAIL_OLE;
  }

  SetErrorMode(SEM_FAILCRITICALERRORS);       // Make sure LoadLib fails.
  for (; iTok < argc; iTok++) {
    pszDllName = argv[iTok];

    // Load the library.
    HINSTANCE hLib = LoadLibraryEx(pszDllName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);

    if (hLib < (HINSTANCE)HINSTANCE_ERROR) {
      TCHAR szError[12];
      _stprintf_s(szError, 12, _T("0x%08lx"), GetLastError());
      DisplayMessage(IDS_LOADLIBFAILED, pszDllName, szError);
      iReturn = FAIL_LOAD;
      goto CleanupOle;
    }

    // Find the entry point.
    (FARPROC&)lpDllEntryPoint = GetProcAddress(hLib, pszDllEntryPoint);

    if (lpDllEntryPoint == NULL) {
      TCHAR szExt[_MAX_EXT];
      _tsplitpath_s(pszDllName, NULL, 0, NULL, 0, NULL, 0, szExt, _MAX_EXT);

      if ((_tcsicmp(szExt, _T(".dll")) != 0) && (_tcsicmp(szExt, _T(".ocx")) != 0))
        DisplayMessage(IDS_NOTDLLOROCX, pszDllName, ptszDllEntryPoint);
      else
        DisplayMessage(IDS_NOENTRYPOINT, pszDllName, ptszDllEntryPoint);

      iReturn = FAIL_ENTRY;
      goto CleanupLibrary;
    }

    // Call the entry point.
    if (FAILED((*lpDllEntryPoint)())) {
      DisplayMessage(IDS_CALLFAILED, ptszDllEntryPoint, pszDllName);
      iReturn = FAIL_REG;
      goto CleanupLibrary;
    }

    Info(IDS_CALLSUCCEEDED, ptszDllEntryPoint, pszDllName);

CleanupLibrary:
    FreeLibrary(hLib);
  }

CleanupOle:
  OleUninitialize();
  _freea(ptszDllEntryPoint);
  return iReturn;
}

void Usage | ( | UINT | ids,
 |  | LPCTSTR | pszArg1 = NULL,
 |  | LPCTSTR | pszArg2 = NULL |
 | ) |  |  | [inline]

Definition at line 96 of file regsvr.cpp.

{
  DisplayMessage(ids, pszArg1, pszArg2, TRUE);
}

Variable Documentation

BOOL _bConsole

Definition at line 31 of file regsvr.cpp.

BOOL _bSilent

Definition at line 30 of file regsvr.cpp.

HINSTANCE _hInstance

Definition at line 28 of file regsvr.cpp.

const TCHAR _szAppName[] = _T("RegSvr32")

Definition at line 25 of file regsvr.cpp.

const char _szDllRegSvr[] = "DllRegisterServer"

Definition at line 26 of file regsvr.cpp.

const char _szDllUnregSvr[] = "DllUnregisterServer"

Definition at line 27 of file regsvr.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/regsvr/resource.h File Reference

  • controls
  • regsvr
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDS_CALLFAILED 10
#define | IDS_CALLSUCCEEDED 11
#define | IDS_EXTRAARGUMENT 3
#define | IDS_LOADLIBFAILED 7
#define | IDS_NODLLNAME 5
#define | IDS_NOENTRYPOINT 9
#define | IDS_NOPROJECT 4
#define | IDS_NOTDLLOROCX 8
#define | IDS_OLEINITFAILED 6
#define | IDS_UNRECOGNIZEDFLAG 2
#define | IDS_USAGE 1

Define Documentation

#define IDS_CALLFAILED 10

Definition at line 23 of file resource.h.

#define IDS_CALLSUCCEEDED 11

Definition at line 24 of file resource.h.

#define IDS_EXTRAARGUMENT 3

Definition at line 16 of file resource.h.

#define IDS_LOADLIBFAILED 7

Definition at line 20 of file resource.h.

#define IDS_NODLLNAME 5

Definition at line 18 of file resource.h.

#define IDS_NOENTRYPOINT 9

Definition at line 22 of file resource.h.

#define IDS_NOPROJECT 4

Definition at line 17 of file resource.h.

#define IDS_NOTDLLOROCX 8

Definition at line 21 of file resource.h.

#define IDS_OLEINITFAILED 6

Definition at line 19 of file resource.h.

#define IDS_UNRECOGNIZEDFLAG 2

Definition at line 15 of file resource.h.

#define IDS_USAGE 1

Definition at line 14 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/regsvr/version.h File Reference

  • controls
  • regsvr
Defines

version.h File Reference

Go to the source code of this file.

Defines

#define | rmj 4
#define | rmm 0
#define | rup 0
#define | szVerName ""
#define | szVerUser ""

Define Documentation

#define rmj 4

Definition at line 10 of file version.h.

#define rmm 0

Definition at line 11 of file version.h.

#define rup 0

Definition at line 12 of file version.h.

#define szVerName ""

Definition at line 13 of file version.h.

#define szVerUser ""

Definition at line 14 of file version.h.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/resource.h File Reference

  • controls
  • spindial
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_SPINDIAL 1
#define | IDC_POSITIONEDIT 201
#define | IDD_ABOUTBOX_SPINDIAL 100
#define | IDD_PROPPAGE_SPINDIAL 101
#define | IDI_ABOUTDLL 10
#define | IDS_SPINDIAL 1
#define | IDS_SPINDIAL_PPG 2
#define | IDS_SPINDIAL_PPG_CAPTION 101

Define Documentation

#define IDB_SPINDIAL 1

Definition at line 15 of file resource.h.

#define IDC_POSITIONEDIT 201

Definition at line 21 of file resource.h.

#define IDD_ABOUTBOX_SPINDIAL 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_SPINDIAL 101

Definition at line 20 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 17 of file resource.h.

#define IDS_SPINDIAL 1

Definition at line 14 of file resource.h.

#define IDS_SPINDIAL_PPG 2

Definition at line 16 of file resource.h.

#define IDS_SPINDIAL_PPG_CAPTION 101

Definition at line 19 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinctl.cpp File Reference

  • controls
  • spindial
Functions | Variables

spinctl.cpp File Reference

#include "stdafx.h"
#include "spindial.h"
#include "spinctl.h"
#include "spinppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CSpindialCtrl,"SPINDIAL.SpindialCtrl.1", 0x6889605, 0xb8d0, 0x101a, 0x91, 0xf1, 0x0, 0x60, 0x8c, 0xea, 0xd5, 0xb3) const IID BASED_CODE IID_DSpindial

Variables

const IID BASED_CODE | IID_DSpindialEvents
const int | MAX_POSITIONS = 4
const int | TICK_LEN = 6

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CSpindialCtrl | ,
 |  | "SPINDIAL.SpindialCtrl.1" | ,
 |  | 0x6889605 | ,
 |  | 0xb8d0 | ,
 |  | 0x101a | ,
 |  | 0x91 | ,
 |  | 0xf1 | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xea | ,
 |  | 0xd5 | ,
 |  | 0xb3 |  |
 | ) |  |  | const

Variable Documentation

const IID BASED_CODE IID_DSpindialEvents
Initial value:
    { 0x37446b8a, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 95 of file spinctl.cpp.

const int MAX_POSITIONS = 4

Definition at line 28 of file spinctl.cpp.

const int TICK_LEN = 6

Definition at line 29 of file spinctl.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinctl.h File Reference

  • controls
  • spindial
Classes

spinctl.h File Reference

Go to the source code of this file.

Classes

class CSpindialCtrl
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spindial.cpp File Reference

  • controls
  • spindial
Functions | Variables

spindial.cpp File Reference

#include "stdafx.h"
#include "spindial.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CSpindialApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 60 of file spindial.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 77 of file spindial.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x6889608, 0xb8d0, 0x101a, { 0x91, 0xf1, 0x0, 0x60, 0x8c, 0xea, 0xd5, 0xb3 } }

Definition at line 24 of file spindial.cpp.

const WORD _wVerMajor = 1

Definition at line 26 of file spindial.cpp.

const WORD _wVerMinor = 0

Definition at line 27 of file spindial.cpp.

CSpindialApp NEAR theApp

Definition at line 22 of file spindial.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spindial.h File Reference

  • controls
  • spindial
Classes | Variables

spindial.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CSpindialApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spindial.odl File Reference

  • controls
  • spindial
Classes | Namespaces | Functions

spindial.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | SpindialLib::_DSpindial
interface | SpindialLib::_DSpindialEvents
class | SpindialLib::Spindial

Namespaces

namespace | SpindialLib

Functions

SpindialLib::importlib (STDOLE_TLB)
SpindialLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinppg.cpp File Reference

  • controls
  • spindial
Functions

spinppg.cpp File Reference

#include "stdafx.h"
#include "spindial.h"
#include "spinppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CSpindialPropPage,"SPINDIAL.SpindialPropPage.1", 0x37446b8b, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) BOOL CSpindialPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CSpindialPropPage | ,
 |  | "SPINDIAL.SpindialPropPage.1" | ,
 |  | 0x37446b8b | ,
 |  | 0x5870 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |
 | ) |  |

Definition at line 38 of file spinppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_SPINDIAL_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinppg.h File Reference

  • controls
  • spindial
Classes

spinppg.h File Reference

Go to the source code of this file.

Classes

class CSpindialPropPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/stdafx.cpp File Reference

  • controls
  • spindial

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/stdafx.h File Reference

  • controls
  • spindial

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/resource.h File Reference

  • controls
  • testhelp
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_TESTHELP 1
#define | IDC_FULLHELP 210
#define | IDC_NAME1 201
#define | IDC_NAME2 202
#define | IDC_NAME3 203
#define | IDC_POPUPHELP 209
#define | IDC_TIPCAPTION 207
#define | IDC_USEMINE 204
#define | IDC_USETOOLTIP 206
#define | IDD_ABOUTBOX_TESTHELP 1
#define | IDD_PROPPAGE_TESTHELP 100
#define | IDI_ABOUTDLL 1
#define | IDS_COMPONENT0_DESCRIPTION 102
#define | IDS_COMPONENT0_TITLE 101
#define | IDS_COMPONENT_TYPE 3
#define | IDS_TESTHELP 1
#define | IDS_TESTHELP_PPG 2
#define | IDS_TESTHELP_PPG_CAPTION 100

Define Documentation

#define IDB_TESTHELP 1

Definition at line 16 of file resource.h.

#define IDC_FULLHELP 210

Definition at line 31 of file resource.h.

#define IDC_NAME1 201

Definition at line 24 of file resource.h.

#define IDC_NAME2 202

Definition at line 25 of file resource.h.

#define IDC_NAME3 203

Definition at line 26 of file resource.h.

#define IDC_POPUPHELP 209

Definition at line 30 of file resource.h.

#define IDC_TIPCAPTION 207

Definition at line 29 of file resource.h.

#define IDC_USEMINE 204

Definition at line 27 of file resource.h.

#define IDC_USETOOLTIP 206

Definition at line 28 of file resource.h.

#define IDD_ABOUTBOX_TESTHELP 1

Definition at line 17 of file resource.h.

#define IDD_PROPPAGE_TESTHELP 100

Definition at line 21 of file resource.h.

#define IDI_ABOUTDLL 1

Definition at line 14 of file resource.h.

#define IDS_COMPONENT0_DESCRIPTION 102

Definition at line 23 of file resource.h.

#define IDS_COMPONENT0_TITLE 101

Definition at line 22 of file resource.h.

#define IDS_COMPONENT_TYPE 3

Definition at line 19 of file resource.h.

#define IDS_TESTHELP 1

Definition at line 15 of file resource.h.

#define IDS_TESTHELP_PPG 2

Definition at line 18 of file resource.h.

#define IDS_TESTHELP_PPG_CAPTION 100

Definition at line 20 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/StdAfx.cpp File Reference

  • controls
  • testhelp

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/StdAfx.h File Reference

  • controls
  • testhelp
Defines

StdAfx.h File Reference

#include <afxctl.h>
#include <afxcmn.h>
#include <afxdb.h>
#include "hlp\HTMLDefines.h"
#include "hlp\popups.h"
#include "hlp\popups.h"

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/testhelp.cpp File Reference

  • controls
  • testhelp
Functions | Variables

testhelp.cpp File Reference

#include "stdafx.h"
#include "testhelp.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CTesthelpApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 66 of file testhelp.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 83 of file testhelp.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x31a2b280, 0x8c11, 0x11cf, { 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50 } }

Definition at line 25 of file testhelp.cpp.

const WORD _wVerMajor = 1

Definition at line 27 of file testhelp.cpp.

const WORD _wVerMinor = 0

Definition at line 28 of file testhelp.cpp.

CTesthelpApp NEAR theApp

Definition at line 23 of file testhelp.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/testhelp.h File Reference

  • controls
  • testhelp
Classes | Variables

testhelp.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CTesthelpApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/testhelp.odl File Reference

  • controls
  • testhelp
Classes | Namespaces | Functions

testhelp.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | TESTHELPLib::_DTesthelp
interface | TESTHELPLib::_DTesthelpEvents
class | TESTHELPLib::Testhelp

Namespaces

namespace | TESTHELPLib

Functions

TESTHELPLib::importlib (STDOLE_TLB)
TESTHELPLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpCtl.cpp File Reference

  • controls
  • testhelp
Functions | Variables

ThelpCtl.cpp File Reference

#include "stdafx.h"
#include "testhelp.h"
#include "ThelpCtl.h"
#include "ThelpPpg.h"
#include <msstkppg.h>

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CTesthelpCtrl,"TESTHELP.TesthelpCtrl.1", 0x31a2b283, 0x8c11, 0x11cf, 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50) const IID BASED_CODE IID_DTesthelp
ON_MESSAGE (WM_HELP, OnHelpCommand) PROPPAGEID(CLSID_StockColorPage)
PROPPAGEID (CLSID_StockFontPage)

Variables

const IID BASED_CODE IID_DTesthelpEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CTesthelpCtrl | ,
 |  | "TESTHELP.TesthelpCtrl.1" | ,
 |  | 0x31a2b283 | ,
 |  | 0x8c11 | ,
 |  | 0x11cf | ,
 |  | 0xb3 | ,
 |  | 0x7f | ,
 |  | 0 | ,
 |  | 0xaa | ,
 |  | 0 | ,
 |  | 0xb9 | ,
 |  | 0x2b | ,
 |  | 0x50 |  |
 | ) |  |  | const
ON_MESSAGE | ( | WM_HELP | ,
 |  | OnHelpCommand |
 | ) |  |
PROPPAGEID ( CLSID_StockFontPage )

Variable Documentation

const IID BASED_CODE IID_DTesthelpEvents
Initial value:
    { 0x31a2b282, 0x8c11, 0x11cf, { 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50 } }

Definition at line 112 of file ThelpCtl.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpCtl.h File Reference

  • controls
  • testhelp
Classes

ThelpCtl.h File Reference

Go to the source code of this file.

Classes

class CTesthelpCtrl
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpPpg.cpp File Reference

  • controls
  • testhelp
Functions

ThelpPpg.cpp File Reference

#include "stdafx.h"
#include "testhelp.h"
#include "ThelpPpg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CTesthelpPropPage,"TESTHELP.TesthelpPropPage.1", 0x31a2b284, 0x8c11, 0x11cf, 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50) BOOL CTesthelpPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CTesthelpPropPage | ,
 |  | "TESTHELP.TesthelpPropPage.1" | ,
 |  | 0x31a2b284 | ,
 |  | 0x8c11 | ,
 |  | 0x11cf | ,
 |  | 0xb3 | ,
 |  | 0x7f | ,
 |  | 0 | ,
 |  | 0xaa | ,
 |  | 0 | ,
 |  | 0xb9 | ,
 |  | 0x2b | ,
 |  | 0x50 |
 | ) |  |

Definition at line 41 of file ThelpPpg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_TESTHELP_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpPpg.h File Reference

  • controls
  • testhelp
Classes

ThelpPpg.h File Reference

Go to the source code of this file.

Classes

class CTesthelpPropPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/hlp/popups.h File Reference

  • controls
  • testhelp
  • hlp
Defines

popups.h File Reference

Go to the source code of this file.

Defines

#define IDH_WHATISTHISTHING 18001

Define Documentation

#define IDH_WHATISTHISTHING 18001

Definition at line 1 of file popups.h.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/resource.h File Reference

  • controls
  • time
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_CLOCK 201
#define | IDB_TIME 1
#define | IDC_ENABLEDCHECK 202
#define | IDC_INTERVALEDIT 201
#define | IDD_ABOUTBOX_TIME 100
#define | IDD_PROPPAGE_TIME 101
#define | IDI_ABOUTDLL 10
#define | IDS_TIME 1
#define | IDS_TIME_PPG 2
#define | IDS_TIME_PPG_CAPTION 101

Define Documentation

#define IDB_CLOCK 201

Definition at line 22 of file resource.h.

#define IDB_TIME 1

Definition at line 15 of file resource.h.

#define IDC_ENABLEDCHECK 202

Definition at line 23 of file resource.h.

#define IDC_INTERVALEDIT 201

Definition at line 21 of file resource.h.

#define IDD_ABOUTBOX_TIME 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_TIME 101

Definition at line 20 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 17 of file resource.h.

#define IDS_TIME 1

Definition at line 14 of file resource.h.

#define IDS_TIME_PPG 2

Definition at line 16 of file resource.h.

#define IDS_TIME_PPG_CAPTION 101

Definition at line 19 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/stdafx.cpp File Reference

  • controls
  • time

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/stdafx.h File Reference

  • controls
  • time

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/time.cpp File Reference

  • controls
  • time
Functions | Variables

time.cpp File Reference

#include "stdafx.h"
#include "time.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CTimeApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 60 of file time.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 77 of file time.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0xdcf07690, 0xba7a, 0x101a, { 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f } }

Definition at line 24 of file time.cpp.

const WORD _wVerMajor = 1

Definition at line 26 of file time.cpp.

const WORD _wVerMinor = 0

Definition at line 27 of file time.cpp.

CTimeApp NEAR theApp

Definition at line 22 of file time.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/time.h File Reference

  • controls
  • time
Classes | Variables

time.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CTimeApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/time.odl File Reference

  • controls
  • time
Classes | Namespaces | Functions

time.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | TimeLib::_DTime
interface | TimeLib::_DTimeEvents
class | TimeLib::Time

Namespaces

namespace | TimeLib

Functions

TimeLib::importlib (STDOLE_TLB)
TimeLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timectl.cpp File Reference

  • controls
  • time
Functions | Variables

timectl.cpp File Reference

#include "stdafx.h"
#include "time.h"
#include "timectl.h"
#include "timeppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CTimeCtrl,"TIME.TimeCtrl.1", 0xdcf0768d, 0xba7a, 0x101a, 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f) const IID BASED_CODE IID_DTime

Variables

const short | ID_TIMER = 1
const IID BASED_CODE | IID_DTimeEvents

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CTimeCtrl | ,
 |  | "TIME.TimeCtrl.1" | ,
 |  | 0xdcf0768d | ,
 |  | 0xba7a | ,
 |  | 0x101a | ,
 |  | 0xb5 | ,
 |  | 0x7a | ,
 |  | 0x0 | ,
 |  | 0x0 | ,
 |  | 0xc0 | ,
 |  | 0xc3 | ,
 |  | 0xed | ,
 |  | 0x5f |  |
 | ) |  |  | const

Variable Documentation

const short ID_TIMER = 1

Definition at line 28 of file timectl.cpp.

const IID BASED_CODE IID_DTimeEvents
Initial value:
    { 0x37446b92, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 97 of file timectl.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timectl.h File Reference

  • controls
  • time
Classes | Variables

timectl.h File Reference

Go to the source code of this file.

Classes

class | CTimeCtrl

Variables

const int | DEFAULT_INTERVAL = 1000

Variable Documentation

const int DEFAULT_INTERVAL = 1000

Definition at line 17 of file timectl.h.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timeppg.cpp File Reference

  • controls
  • time
Functions

timeppg.cpp File Reference

#include "stdafx.h"
#include "time.h"
#include "timeppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CTimePropPage,"TIME.TimePropPage.1", 0x37446b93, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) BOOL CTimePropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CTimePropPage | ,
 |  | "TIME.TimePropPage.1" | ,
 |  | 0x37446b93 | ,
 |  | 0x5870 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |
 | ) |  |

Definition at line 38 of file timeppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_TIME_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timeppg.h File Reference

  • controls
  • time
Classes

timeppg.h File Reference

Go to the source code of this file.

Classes

class CTimePropPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/resource.h File Reference

  • controls
  • xlist
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_XLIST 1
#define | IDC_HEIGHTEDIT 201
#define | IDC_INVERTCHECK 202
#define | IDD_ABOUTBOX_XLIST 100
#define | IDD_PROPPAGE_XLIST 101
#define | IDI_ABOUTDLL 10
#define | IDS_XLIST 1
#define | IDS_XLIST_PPG 2
#define | IDS_XLIST_PPG_CAPTION 101

Define Documentation

#define IDB_XLIST 1

Definition at line 15 of file resource.h.

#define IDC_HEIGHTEDIT 201

Definition at line 21 of file resource.h.

#define IDC_INVERTCHECK 202

Definition at line 22 of file resource.h.

#define IDD_ABOUTBOX_XLIST 100

Definition at line 18 of file resource.h.

#define IDD_PROPPAGE_XLIST 101

Definition at line 20 of file resource.h.

#define IDI_ABOUTDLL 10

Definition at line 17 of file resource.h.

#define IDS_XLIST 1

Definition at line 14 of file resource.h.

#define IDS_XLIST_PPG 2

Definition at line 16 of file resource.h.

#define IDS_XLIST_PPG_CAPTION 101

Definition at line 19 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/stdafx.cpp File Reference

  • controls
  • xlist

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/stdafx.h File Reference

  • controls
  • xlist

stdafx.h File Reference

#include <afxctl.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlist.cpp File Reference

  • controls
  • xlist
Functions | Variables

xlist.cpp File Reference

#include "stdafx.h"
#include "xlist.h"

Go to the source code of this file.

Functions

STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Variables

const GUID CDECL BASED_CODE | _tlid
const WORD | _wVerMajor = 1
const WORD | _wVerMinor = 0
CXlistApp NEAR | theApp

Function Documentation

STDAPI DllRegisterServer ( void )

Definition at line 60 of file xlist.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

STDAPI DllUnregisterServer ( void )

Definition at line 77 of file xlist.cpp.

{
  AFX_MANAGE_STATE(_afxModuleAddrThis);

  if (!AfxOleUnregisterTypeLib(_tlid))
    return ResultFromScode(SELFREG_E_TYPELIB);

  if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
    return ResultFromScode(SELFREG_E_CLASS);

  return NOERROR;
}

Variable Documentation

const GUID CDECL BASED_CODE _tlid
Initial value:
    { 0x37446b9c, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 24 of file xlist.cpp.

const WORD _wVerMajor = 1

Definition at line 26 of file xlist.cpp.

const WORD _wVerMinor = 0

Definition at line 27 of file xlist.cpp.

CXlistApp NEAR theApp

Definition at line 22 of file xlist.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlist.h File Reference

  • controls
  • xlist
Classes | Variables

xlist.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CXlistApp

Variables

const GUID CDECL | _tlid
const WORD | _wVerMajor
const WORD | _wVerMinor

Variable Documentation

const GUID CDECL _tlid

Definition at line 23 of file button.cpp.

const WORD _wVerMajor

Definition at line 25 of file button.cpp.

const WORD _wVerMinor

Definition at line 26 of file button.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlist.odl File Reference

  • controls
  • xlist
Classes | Namespaces | Functions

xlist.odl File Reference

#include <olectl.h>

Go to the source code of this file.

Classes

interface | XlistLib::_DXlist
interface | XlistLib::_DXlistEvents
class | XlistLib::Xlist

Namespaces

namespace | XlistLib

Functions

XlistLib::importlib (STDOLE_TLB)
XlistLib::importlib (STDTYPE_TLB)
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistctl.cpp File Reference

  • controls
  • xlist
Defines | Functions | Variables

xlistctl.cpp File Reference

#include "stdafx.h"
#include "xlist.h"
#include "xlistctl.h"
#include "xlistppg.h"

Go to the source code of this file.

Defines

#define | HIMETRIC_PER_INCH 2540
#define | MAP_LOGHIM_TO_PIX(x, ppli) MulDiv((ppli), (x), HIMETRIC_PER_INCH)

Functions

short | GetFontHeight (LPFONTDISP lpfd)
long | GetPictureHeight (LPPICTUREDISP lppd)
long | GetPictureWidth (LPPICTUREDISP lppd)
void | GetProperty (LPDISPATCH lpd, short dispId, short propType, void *value)
if (fSystemDC) ReleaseDC(NULL
if (NULL==hDC)
IMPLEMENT_OLECREATE_EX (CXlistCtrl,"XLIST.XlistCtrl.1", 0x37446b99, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) const IID BASED_CODE IID_DXlist
STDAPI_ (int) XformWidthInHimetricToPixels(HDC hDC

Variables

BOOL | fSystemDC = FALSE
hDC
int | iHeightInHiMetric
const IID BASED_CODE | IID_DXlistEvents
int | iWidthInHiMetric
int | iWidthInPix = MAP_LOGHIM_TO_PIX(iWidthInHiMetric, iXppli)
int iWidthInHiMetric int | iXppli = GetDeviceCaps (hDC, LOGPIXELSX)
const int | LSTITEMSPACING = 4
const int | MAXTEXTLEN = 128

Define Documentation

#define HIMETRIC_PER_INCH 2540

Definition at line 40 of file xlistctl.cpp.

#define MAP_LOGHIM_TO_PIX | ( | x,
 |  | ppli |
 | ) |  | MulDiv((ppli), (x), HIMETRIC_PER_INCH)

Definition at line 41 of file xlistctl.cpp.

Function Documentation

short GetFontHeight ( LPFONTDISP lpfd )

Definition at line 1295 of file xlistctl.cpp.

{
  short fontHeight = 0;
  GetProperty(lpfd, DISPID_FONT_SIZE, VT_I2, (void*)&fontHeight);
  return fontHeight;
}

long GetPictureHeight ( LPPICTUREDISP lppd )

Definition at line 1307 of file xlistctl.cpp.

{
  long picHeight = 0;
  GetProperty(lppd, DISPID_PICT_HEIGHT, VT_I4, (void*)&picHeight);
  return picHeight;
}

long GetPictureWidth ( LPPICTUREDISP lppd )

Definition at line 1319 of file xlistctl.cpp.

{
  long picWidth = 0;
  GetProperty(lppd, DISPID_PICT_WIDTH, VT_I4, (void*)&picWidth);
  return picWidth;
}

void GetProperty | ( | LPDISPATCH | lpd,
 |  | short | dispId,
 |  | short | propType,
 |  | void * | value
 | ) |  |

Definition at line 1330 of file xlistctl.cpp.

{
  COleDispatchDriver driver;

  if (lpd)
  {
    driver.AttachDispatch(lpd, TRUE);
    if (driver.m_lpDispatch != NULL)
    {
      TRY
      {
        driver.GetProperty(dispId, propType, value);
      }
      END_TRY
      driver.DetachDispatch();
    }
  }
}

if ( fSystemDC )
if ( NULL = =hDC )

Definition at line 1360 of file xlistctl.cpp.

  {
    hDC=GetDC(NULL);
    fSystemDC=TRUE;
  }

IMPLEMENT_OLECREATE_EX | ( | CXlistCtrl | ,
 |  | "XLIST.XlistCtrl.1" | ,
 |  | 0x37446b99 | ,
 |  | 0x5870 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |  |
 | ) |  |  | const
STDAPI_ ( int )

Variable Documentation

BOOL fSystemDC = FALSE

Definition at line 1358 of file xlistctl.cpp.

hDC

Definition at line 1372 of file xlistctl.cpp.

int iHeightInHiMetric

Definition at line 38 of file xlistctl.cpp.

const IID BASED_CODE IID_DXlistEvents
Initial value:
    { 0x37446b9b, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } }

Definition at line 323 of file xlistctl.cpp.

int iWidthInHiMetric

Definition at line 37 of file xlistctl.cpp.

return iWidthInPix = MAP_LOGHIM_TO_PIX(iWidthInHiMetric, iXppli)

Definition at line 1357 of file xlistctl.cpp.

iXppli = GetDeviceCaps (hDC, LOGPIXELSX)

Definition at line 1356 of file xlistctl.cpp.

const int LSTITEMSPACING = 4

Definition at line 26 of file xlistctl.cpp.

const int MAXTEXTLEN = 128

Definition at line 27 of file xlistctl.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistctl.h File Reference

  • controls
  • xlist
Classes

xlistctl.h File Reference

Go to the source code of this file.

Classes

class | CItemData
class | CXlistCtrl
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistppg.cpp File Reference

  • controls
  • xlist
Functions

xlistppg.cpp File Reference

#include "stdafx.h"
#include "xlist.h"
#include "xlistppg.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE_EX (CXlistPropPage,"XLIST.XlistPropPage.1", 0x37446b9d, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa) BOOL CXlistPropPage

Function Documentation

IMPLEMENT_OLECREATE_EX | ( | CXlistPropPage | ,
 |  | "XLIST.XlistPropPage.1" | ,
 |  | 0x37446b9d | ,
 |  | 0x5870 | ,
 |  | 0x101b | ,
 |  | 0xb5 | ,
 |  | 0x7b | ,
 |  | 0x0 | ,
 |  | 0x60 | ,
 |  | 0x8c | ,
 |  | 0xc9 | ,
 |  | 0x6a | ,
 |  | 0xfa |
 | ) |  |

Definition at line 38 of file xlistppg.cpp.

{
  if (bRegister)
    return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
      m_clsid, IDS_XLIST_PPG);
  else
    return AfxOleUnregisterClass(m_clsid, NULL);
}

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistppg.h File Reference

  • controls
  • xlist
Classes

xlistppg.h File Reference

Go to the source code of this file.

Classes

class CXlistPropPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/clipart/resource.h File Reference

  • general
  • clipart

resource.h File Reference

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/animctrl.cpp File Reference

  • general
  • CmnCtrl1

animctrl.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl1.h"
#include "animctrl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/animctrl.h File Reference

  • general
  • CmnCtrl1
Classes

animctrl.h File Reference

Go to the source code of this file.

Classes

class CAnimateCtrlPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/CmnCtrl1.cpp File Reference

  • general
  • CmnCtrl1
Variables

CmnCtrl1.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl1.h"
#include "propsht.h"

Go to the source code of this file.

Variables

CCmnCtrl1App theApp

Variable Documentation

CCmnCtrl1App theApp

Definition at line 40 of file CmnCtrl1.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/CmnCtrl1.h File Reference

  • general
  • CmnCtrl1
Classes | Defines

CmnCtrl1.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CCmnCtrl1App

Defines

#define | CELEMS(rgFoo) (sizeof(rgFoo) / sizeof(rgFoo[0]))
#define | TTT_BUF_SIZE 80

Define Documentation

#define CELEMS ( rgFoo ) (sizeof(rgFoo) / sizeof(rgFoo[0]))

Definition at line 31 of file CmnCtrl1.h.

#define TTT_BUF_SIZE 80

Definition at line 25 of file CmnCtrl1.h.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/DateTime.cpp File Reference

  • general
  • CmnCtrl1

DateTime.cpp File Reference

#include "stdafx.h"
#include "RESOURCE.H"
#include "DateTime.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/DateTime.h File Reference

  • general
  • CmnCtrl1
Classes

DateTime.h File Reference

Go to the source code of this file.

Classes

class CDateTimePage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/MonthCal.cpp File Reference

  • general
  • CmnCtrl1

MonthCal.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "MonthCal.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/MonthCal.h File Reference

  • general
  • CmnCtrl1
Classes

MonthCal.h File Reference

Go to the source code of this file.

Classes

class CMonthCalPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/mtreectl.cpp File Reference

  • general
  • CmnCtrl1

mtreectl.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl1.h"
#include "mtreectl.h"
#include "treecpg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/mtreectl.h File Reference

  • general
  • CmnCtrl1
Classes

mtreectl.h File Reference

Go to the source code of this file.

Classes

class CMyTreeCtrl
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/notifwdw.cpp File Reference

  • general
  • CmnCtrl1

notifwdw.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl1.h"
#include "notifwdw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/notifwdw.h File Reference

  • general
  • CmnCtrl1
Classes | Defines | Typedefs

notifwdw.h File Reference

Go to the source code of this file.

Classes

class | CNotifyShowCase
struct | notif_tag

Defines

#define | NOTIFCOUNT 23

Typedefs

typedef struct notif_tag | notifDescrip

Define Documentation

#define NOTIFCOUNT 23

Definition at line 26 of file notifwdw.h.

Typedef Documentation

typedef struct notif_tag notifDescrip
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/propsht.cpp File Reference

  • general
  • CmnCtrl1
Classes

propsht.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl1.h"
#include "propsht.h"
#include "mtreectl.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/propsht.h File Reference

  • general
  • CmnCtrl1
Classes

propsht.h File Reference

#include "treecpg.h"
#include "animctrl.h"
#include "toolpage.h"
#include "datetime.h"
#include "monthcal.h"

Go to the source code of this file.

Classes

class CAllControlsSheet
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/resource.h File Reference

  • general
  • CmnCtrl1
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_ABOUT 2007
#define | ID_AIRBRUSH 2013
#define | ID_BRUSH 2012
#define | ID_BUTTONSTYLE 3006
#define | ID_BUTTONSTYLE2 3009
#define | ID_CCSADJUSTABLE 3003
#define | ID_CCSBOTTOM 3002
#define | ID_CCSTOP 3001
#define | ID_CONTEXTHELP 2008
#define | ID_COPY 2004
#define | ID_CUT 2003
#define | ID_ELLIPSE 2020
#define | ID_ERASE 2009
#define | ID_FILL 2014
#define | ID_LINE 2015
#define | ID_MAGNIFY 2017
#define | ID_NEW 2000
#define | ID_OPEN 2001
#define | ID_PASTE 2005
#define | ID_PENCIL 2010
#define | ID_PRINT 2006
#define | ID_RECTANGLE 2018
#define | ID_ROUNDRECTANGLE 2019
#define | ID_SAVE 2002
#define | ID_SELECT 2011
#define | ID_SELECTCOLOR 2016
#define | ID_TBSTYLEBUTTON 3007
#define | ID_TBSTYLECHECKGROUP 3008
#define | ID_TBSTYLETOOLTIPS 3004
#define | ID_TBSTYLETOOLTIPS2 3011
#define | ID_TBSTYLEWRAPABLE 3005
#define | ID_TOOLBARSTYLE 3000
#define | ID_TOOLBARSTYLE2 3010
#define | IDB_BMTREEBIRD 141
#define | IDB_BMTREEBIRDSELECTED 142
#define | IDB_BMTREEDOG 139
#define | IDB_BMTREEDOGSELECTED 140
#define | IDB_BMTREEFIRST 138
#define | IDB_BMTREEFISH 143
#define | IDB_BMTREEFISHSELECTED 144
#define | IDB_BMTREELAST 145
#define | IDC_ALTDRAG 1017
#define | IDC_ANIMATE 105
#define | IDC_ANIMFRAME 1031
#define | IDC_ANIMSTATUS 1033
#define | IDC_AUTOPLAY 1028
#define | IDC_BROWSE 1025
#define | IDC_CENTER 1026
#define | IDC_CKAPPCANPARSE 1002
#define | IDC_CKDAYSTATE 1009
#define | IDC_CKLONGDATEFORMAT 1005
#define | IDC_CKNOTODAY 1011
#define | IDC_CKNOTODAYCIRCLE 1012
#define | IDC_CKSHORTDATEFORMAT 1004
#define | IDC_CKSHOWNONE 1001
#define | IDC_CKTIMEFORMAT 1003
#define | IDC_CKUPDOWN 1000
#define | IDC_CKWEEKNUMBERS 1013
#define | IDC_CMULTISELECT 1010
#define | IDC_DATETIME 101
#define | IDC_DTFRAME 1007
#define | IDC_EDIT1 104
#define | IDC_EDSELRANGE 1015
#define | IDC_LBNOTIFY 1006
#define | IDC_MCFRAME 1008
#define | IDC_MONTHCAL 102
#define | IDC_NOTIFYLIST 1014
#define | IDC_PLAY 1029
#define | IDC_STOP 1030
#define | IDC_STRRANGE 1017
#define | IDC_STRSELECTION 1016
#define | IDC_TRANSPARENT 1027
#define | IDC_TREESTATUS 1022
#define | IDC_TREEVIEW1 1015
#define | IDC_TVDISABLEDDRAGDROP 1020
#define | IDC_TVEDITLABELS 1016
#define | IDC_TVHASBUTTONS 1017
#define | IDC_TVHASLINES 1018
#define | IDC_TVLINESATROOT 1019
#define | IDC_TVSHOWSELALWAYS 1021
#define | IDC_TVSSINGELEXPAND 1023
#define | IDD_ABOUTBOX 100
#define | IDD_ANIMCTRL 137
#define | IDD_CMNCTRL1_DIALOG 102
#define | IDD_DATETIME 106
#define | IDD_MONTHCAL 107
#define | IDD_TOOLBARCTRL 131
#define | IDD_TREECTRL 134
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDR_PALETTEBAR 148
#define | IDR_STANDARDBAR 129
#define | IDS_ABOUTBOX 101

Define Documentation

#define ID_ABOUT 2007

Definition at line 72 of file resource.h.

#define ID_AIRBRUSH 2013

Definition at line 78 of file resource.h.

#define ID_BRUSH 2012

Definition at line 77 of file resource.h.

#define ID_BUTTONSTYLE 3006

Definition at line 92 of file resource.h.

#define ID_BUTTONSTYLE2 3009

Definition at line 95 of file resource.h.

#define ID_CCSADJUSTABLE 3003

Definition at line 89 of file resource.h.

#define ID_CCSBOTTOM 3002

Definition at line 88 of file resource.h.

#define ID_CCSTOP 3001

Definition at line 87 of file resource.h.

#define ID_CONTEXTHELP 2008

Definition at line 73 of file resource.h.

#define ID_COPY 2004

Definition at line 69 of file resource.h.

#define ID_CUT 2003

Definition at line 68 of file resource.h.

#define ID_ELLIPSE 2020

Definition at line 85 of file resource.h.

#define ID_ERASE 2009

Definition at line 74 of file resource.h.

#define ID_FILL 2014

Definition at line 79 of file resource.h.

#define ID_LINE 2015

Definition at line 80 of file resource.h.

#define ID_MAGNIFY 2017

Definition at line 82 of file resource.h.

#define ID_NEW 2000

Definition at line 65 of file resource.h.

#define ID_OPEN 2001

Definition at line 66 of file resource.h.

#define ID_PASTE 2005

Definition at line 70 of file resource.h.

#define ID_PENCIL 2010

Definition at line 75 of file resource.h.

#define ID_PRINT 2006

Definition at line 71 of file resource.h.

#define ID_RECTANGLE 2018

Definition at line 83 of file resource.h.

#define ID_ROUNDRECTANGLE 2019

Definition at line 84 of file resource.h.

#define ID_SAVE 2002

Definition at line 67 of file resource.h.

#define ID_SELECT 2011

Definition at line 76 of file resource.h.

#define ID_SELECTCOLOR 2016

Definition at line 81 of file resource.h.

#define ID_TBSTYLEBUTTON 3007

Definition at line 93 of file resource.h.

#define ID_TBSTYLECHECKGROUP 3008

Definition at line 94 of file resource.h.

#define ID_TBSTYLETOOLTIPS 3004

Definition at line 90 of file resource.h.

#define ID_TBSTYLETOOLTIPS2 3011

Definition at line 97 of file resource.h.

#define ID_TBSTYLEWRAPABLE 3005

Definition at line 91 of file resource.h.

#define ID_TOOLBARSTYLE 3000

Definition at line 86 of file resource.h.

#define ID_TOOLBARSTYLE2 3010

Definition at line 96 of file resource.h.

#define IDB_BMTREEBIRD 141

Definition at line 23 of file resource.h.

#define IDB_BMTREEBIRDSELECTED 142

Definition at line 24 of file resource.h.

#define IDB_BMTREEDOG 139

Definition at line 21 of file resource.h.

#define IDB_BMTREEDOGSELECTED 140

Definition at line 22 of file resource.h.

#define IDB_BMTREEFIRST 138

Definition at line 20 of file resource.h.

#define IDB_BMTREEFISH 143

Definition at line 25 of file resource.h.

#define IDB_BMTREEFISHSELECTED 144

Definition at line 26 of file resource.h.

#define IDB_BMTREELAST 145

Definition at line 27 of file resource.h.

#define IDC_ALTDRAG 1017

Definition at line 49 of file resource.h.

#define IDC_ANIMATE 105

Definition at line 12 of file resource.h.

#define IDC_ANIMFRAME 1031

Definition at line 63 of file resource.h.

#define IDC_ANIMSTATUS 1033

Definition at line 64 of file resource.h.

#define IDC_AUTOPLAY 1028

Definition at line 60 of file resource.h.

#define IDC_BROWSE 1025

Definition at line 57 of file resource.h.

#define IDC_CENTER 1026

Definition at line 58 of file resource.h.

#define IDC_CKAPPCANPARSE 1002

Definition at line 31 of file resource.h.

#define IDC_CKDAYSTATE 1009

Definition at line 38 of file resource.h.

#define IDC_CKLONGDATEFORMAT 1005

Definition at line 34 of file resource.h.

#define IDC_CKNOTODAY 1011

Definition at line 40 of file resource.h.

#define IDC_CKNOTODAYCIRCLE 1012

Definition at line 41 of file resource.h.

#define IDC_CKSHORTDATEFORMAT 1004

Definition at line 33 of file resource.h.

#define IDC_CKSHOWNONE 1001

Definition at line 30 of file resource.h.

#define IDC_CKTIMEFORMAT 1003

Definition at line 32 of file resource.h.

#define IDC_CKUPDOWN 1000

Definition at line 29 of file resource.h.

#define IDC_CKWEEKNUMBERS 1013

Definition at line 42 of file resource.h.

#define IDC_CMULTISELECT 1010

Definition at line 39 of file resource.h.

#define IDC_DATETIME 101

Definition at line 8 of file resource.h.

#define IDC_DTFRAME 1007

Definition at line 36 of file resource.h.

#define IDC_EDIT1 104

Definition at line 11 of file resource.h.

#define IDC_EDSELRANGE 1015

Definition at line 45 of file resource.h.

#define IDC_LBNOTIFY 1006

Definition at line 35 of file resource.h.

#define IDC_MCFRAME 1008

Definition at line 37 of file resource.h.

#define IDC_MONTHCAL 102

Definition at line 10 of file resource.h.

#define IDC_NOTIFYLIST 1014

Definition at line 43 of file resource.h.

#define IDC_PLAY 1029

Definition at line 61 of file resource.h.

#define IDC_STOP 1030

Definition at line 62 of file resource.h.

#define IDC_STRRANGE 1017

Definition at line 50 of file resource.h.

#define IDC_STRSELECTION 1016

Definition at line 47 of file resource.h.

#define IDC_TRANSPARENT 1027

Definition at line 59 of file resource.h.

#define IDC_TREESTATUS 1022

Definition at line 55 of file resource.h.

#define IDC_TREEVIEW1 1015

Definition at line 44 of file resource.h.

#define IDC_TVDISABLEDDRAGDROP 1020

Definition at line 53 of file resource.h.

#define IDC_TVEDITLABELS 1016

Definition at line 46 of file resource.h.

#define IDC_TVHASBUTTONS 1017

Definition at line 48 of file resource.h.

#define IDC_TVHASLINES 1018

Definition at line 51 of file resource.h.

#define IDC_TVLINESATROOT 1019

Definition at line 52 of file resource.h.

#define IDC_TVSHOWSELALWAYS 1021

Definition at line 54 of file resource.h.

#define IDC_TVSSINGELEXPAND 1023

Definition at line 56 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_ANIMCTRL 137

Definition at line 19 of file resource.h.

#define IDD_CMNCTRL1_DIALOG 102

Definition at line 9 of file resource.h.

#define IDD_DATETIME 106

Definition at line 13 of file resource.h.

#define IDD_MONTHCAL 107

Definition at line 14 of file resource.h.

#define IDD_TOOLBARCTRL 131

Definition at line 17 of file resource.h.

#define IDD_TREECTRL 134

Definition at line 18 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 15 of file resource.h.

#define IDR_PALETTEBAR 148

Definition at line 28 of file resource.h.

#define IDR_STANDARDBAR 129

Definition at line 16 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/StdAfx.cpp File Reference

  • general
  • CmnCtrl1

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/StdAfx.h File Reference

  • general
  • CmnCtrl1
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxcmn.h>
#include <afxdtctl.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 21 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar1.cpp File Reference

  • general
  • CmnCtrl1

toolbar1.cpp File Reference

#include "stdafx.h"
#include "afxpriv.h"
#include "CmnCtrl1.h"
#include "Toolbar1.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar1.h File Reference

  • general
  • CmnCtrl1
Classes

toolbar1.h File Reference

Go to the source code of this file.

Classes

class CStandardBar
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar2.cpp File Reference

  • general
  • CmnCtrl1

toolbar2.cpp File Reference

#include "stdafx.h"
#include "afxpriv.h"
#include "CmnCtrl1.h"
#include "Toolbar2.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar2.h File Reference

  • general
  • CmnCtrl1
Classes

toolbar2.h File Reference

Go to the source code of this file.

Classes

class CPaletteBar
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolpage.cpp File Reference

  • general
  • CmnCtrl1

toolpage.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl1.h"
#include "toolbar1.h"
#include "toolbar2.h"
#include "ToolPage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolpage.h File Reference

  • general
  • CmnCtrl1
Classes

toolpage.h File Reference

#include "toolbar1.h"
#include "toolbar2.h"

Go to the source code of this file.

Classes

class CToolBarCtrlPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/treecpg.cpp File Reference

  • general
  • CmnCtrl1

treecpg.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl1.h"
#include "treecpg.h"
#include "mtreectl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/treecpg.h File Reference

  • general
  • CmnCtrl1
Classes

treecpg.h File Reference

#include "mtreectl.h"
#include "notifwdw.h"
#include "notifwdw.h"

Go to the source code of this file.

Classes

class CTreeCtrlPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/CmnCtrl2.cpp File Reference

  • general
  • CmnCtrl2
Variables

CmnCtrl2.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl2.h"
#include "propsht.h"

Go to the source code of this file.

Variables

CCmnCtrl2App theApp

Variable Documentation

CCmnCtrl2App theApp

Definition at line 41 of file CmnCtrl2.cpp.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/CmnCtrl2.h File Reference

  • general
  • CmnCtrl2
Classes

CmnCtrl2.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CCmnCtrl2App
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/notifwdw.cpp File Reference

  • general
  • CmnCtrl2

notifwdw.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl2.h"
#include "notifwdw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/notifwdw.h File Reference

  • general
  • CmnCtrl2
Classes | Defines | Typedefs

notifwdw.h File Reference

Go to the source code of this file.

Classes

class | CNotifyShowCase
struct | notif_tag

Defines

#define | NOTIFCOUNT 23

Typedefs

typedef struct notif_tag | notifDescrip

Define Documentation

#define NOTIFCOUNT 23

Definition at line 26 of file notifwdw.h.

Typedef Documentation

typedef struct notif_tag notifDescrip
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/progctrl.cpp File Reference

  • general
  • CmnCtrl2

progctrl.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl2.h"
#include "ProgCtrl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/progctrl.h File Reference

  • general
  • CmnCtrl2
Classes

progctrl.h File Reference

Go to the source code of this file.

Classes

class CProgCtrlPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/propsht.cpp File Reference

  • general
  • CmnCtrl2
Classes

propsht.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl2.h"
#include "propsht.h"
#include "progctrl.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/propsht.h File Reference

  • general
  • CmnCtrl2
Classes

propsht.h File Reference

#include "progctrl.h"
#include "slidctrl.h"
#include "spinctrl.h"

Go to the source code of this file.

Classes

class CAllControlsSheet
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/resource.h File Reference

  • general
  • CmnCtrl2
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_NOTIFICATIONS 1084
#define | IDC_PROG_HORZPOS 1083
#define | IDC_PROG_VERTPOS 1006
#define | IDC_PROGRESS 106
#define | IDC_PROGRESS_DELTA 1074
#define | IDC_PROGRESS_FROM 1078
#define | IDC_PROGRESS_POS 1073
#define | IDC_PROGRESS_SETDELTA 1075
#define | IDC_PROGRESS_STEP 1057
#define | IDC_PROGRESS_STEPIT 1059
#define | IDC_PROGRESS_TO 1079
#define | IDC_SETPOS 1076
#define | IDC_SLIDER 104
#define | IDC_SLIDER_AUTOTICKS 1035
#define | IDC_SLIDER_ENABLESEL 1044
#define | IDC_SLIDER_FIXED 1036
#define | IDC_SLIDER_HORZPOS 1081
#define | IDC_SLIDER_LINE 1048
#define | IDC_SLIDER_NOTHUMB 1046
#define | IDC_SLIDER_NOTICKS 1034
#define | IDC_SLIDER_ORIENTATION 1080
#define | IDC_SLIDER_PAGE 1050
#define | IDC_SLIDER_POINT 1033
#define | IDC_SLIDER_RANGEFROM 1038
#define | IDC_SLIDER_RANGETO 1039
#define | IDC_SLIDER_SELRANGEFROM 1041
#define | IDC_SLIDER_SELRANGETO 1042
#define | IDC_SLIDER_TICKFREQ 1072
#define | IDC_SLIDER_VERTPOS 1082
#define | IDC_SMOOTH 1005
#define | IDC_SPIN 105
#define | IDC_SPIN_ALIGNMENT 1022
#define | IDC_SPIN_ARROWKEYS 1016
#define | IDC_SPIN_AUTOBUDDY 1017
#define | IDC_SPIN_EDIT 103
#define | IDC_SPIN_FROM 1021
#define | IDC_SPIN_NOTHOUSANDS 1024
#define | IDC_SPIN_ORIENTATION 1015
#define | IDC_SPIN_POS 1070
#define | IDC_SPIN_SETBUDDYINT 1018
#define | IDC_SPIN_TO 1020
#define | IDC_SPIN_WRAP 1023
#define | IDC_VERTICAL 1004
#define | IDD_ABOUTBOX 100
#define | IDD_CMNCTRL2_DIALOG 102
#define | IDD_PROGCTRL 135
#define | IDD_SLIDERCTRL 132
#define | IDD_SPINCTRL 136
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101

Define Documentation

#define IDC_NOTIFICATIONS 1084

Definition at line 55 of file resource.h.

#define IDC_PROG_HORZPOS 1083

Definition at line 54 of file resource.h.

#define IDC_PROG_VERTPOS 1006

Definition at line 19 of file resource.h.

#define IDC_PROGRESS 106

Definition at line 12 of file resource.h.

#define IDC_PROGRESS_DELTA 1074

Definition at line 46 of file resource.h.

#define IDC_PROGRESS_FROM 1078

Definition at line 49 of file resource.h.

#define IDC_PROGRESS_POS 1073

Definition at line 45 of file resource.h.

#define IDC_PROGRESS_SETDELTA 1075

Definition at line 47 of file resource.h.

#define IDC_PROGRESS_STEP 1057

Definition at line 41 of file resource.h.

#define IDC_PROGRESS_STEPIT 1059

Definition at line 42 of file resource.h.

#define IDC_PROGRESS_TO 1079

Definition at line 50 of file resource.h.

#define IDC_SETPOS 1076

Definition at line 48 of file resource.h.

#define IDC_SLIDER 104

Definition at line 10 of file resource.h.

#define IDC_SLIDER_AUTOTICKS 1035

Definition at line 31 of file resource.h.

#define IDC_SLIDER_ENABLESEL 1044

Definition at line 37 of file resource.h.

#define IDC_SLIDER_FIXED 1036

Definition at line 32 of file resource.h.

#define IDC_SLIDER_HORZPOS 1081

Definition at line 52 of file resource.h.

#define IDC_SLIDER_LINE 1048

Definition at line 39 of file resource.h.

#define IDC_SLIDER_NOTHUMB 1046

Definition at line 38 of file resource.h.

#define IDC_SLIDER_NOTICKS 1034

Definition at line 30 of file resource.h.

#define IDC_SLIDER_ORIENTATION 1080

Definition at line 51 of file resource.h.

#define IDC_SLIDER_PAGE 1050

Definition at line 40 of file resource.h.

#define IDC_SLIDER_POINT 1033

Definition at line 29 of file resource.h.

#define IDC_SLIDER_RANGEFROM 1038

Definition at line 33 of file resource.h.

#define IDC_SLIDER_RANGETO 1039

Definition at line 34 of file resource.h.

#define IDC_SLIDER_SELRANGEFROM 1041

Definition at line 35 of file resource.h.

#define IDC_SLIDER_SELRANGETO 1042

Definition at line 36 of file resource.h.

#define IDC_SLIDER_TICKFREQ 1072

Definition at line 44 of file resource.h.

#define IDC_SLIDER_VERTPOS 1082

Definition at line 53 of file resource.h.

#define IDC_SMOOTH 1005

Definition at line 18 of file resource.h.

#define IDC_SPIN 105

Definition at line 11 of file resource.h.

#define IDC_SPIN_ALIGNMENT 1022

Definition at line 26 of file resource.h.

#define IDC_SPIN_ARROWKEYS 1016

Definition at line 21 of file resource.h.

#define IDC_SPIN_AUTOBUDDY 1017

Definition at line 22 of file resource.h.

#define IDC_SPIN_EDIT 103

Definition at line 9 of file resource.h.

#define IDC_SPIN_FROM 1021

Definition at line 25 of file resource.h.

#define IDC_SPIN_NOTHOUSANDS 1024

Definition at line 28 of file resource.h.

#define IDC_SPIN_ORIENTATION 1015

Definition at line 20 of file resource.h.

#define IDC_SPIN_POS 1070

Definition at line 43 of file resource.h.

#define IDC_SPIN_SETBUDDYINT 1018

Definition at line 23 of file resource.h.

#define IDC_SPIN_TO 1020

Definition at line 24 of file resource.h.

#define IDC_SPIN_WRAP 1023

Definition at line 27 of file resource.h.

#define IDC_VERTICAL 1004

Definition at line 17 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_CMNCTRL2_DIALOG 102

Definition at line 8 of file resource.h.

#define IDD_PROGCTRL 135

Definition at line 15 of file resource.h.

#define IDD_SLIDERCTRL 132

Definition at line 14 of file resource.h.

#define IDD_SPINCTRL 136

Definition at line 16 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 13 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/slidctrl.cpp File Reference

  • general
  • CmnCtrl2

slidctrl.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl2.h"
#include "SlidCtrl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/slidctrl.h File Reference

  • general
  • CmnCtrl2
Classes

slidctrl.h File Reference

Go to the source code of this file.

Classes

class CSliderCtrlPage
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/spinctrl.cpp File Reference

  • general
  • CmnCtrl2

spinctrl.cpp File Reference

#include "stdafx.h"
#include "CmnCtrl2.h"
#include "SpinCtrl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/spinctrl.h File Reference

  • general
  • CmnCtrl2
Classes

spinctrl.h File Reference

Go to the source code of this file.

Classes

class CSpinCtrlPage
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/StdAfx.cpp File Reference

  • general
  • CmnCtrl2

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/StdAfx.h File Reference

  • general
  • CmnCtrl2
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 21 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemo.cpp File Reference

  • general
  • CTaskDialog
Variables

CTaskDialogDemo.cpp File Reference

#include "stdafx.h"
#include "CTaskDialogDemo.h"
#include "CTaskDialogDemoDlg.h"

Go to the source code of this file.

Variables

CTaskDialogTestApp theApp

Variable Documentation

CTaskDialogTestApp theApp

Definition at line 31 of file CTaskDialogDemo.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemo.h File Reference

  • general
  • CTaskDialog
Classes | Variables

CTaskDialogDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CTaskDialogTestApp

Variables

CTaskDialogTestApp theApp

Variable Documentation

CTaskDialogTestApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemoDlg.cpp File Reference

  • general
  • CTaskDialog

CTaskDialogDemoDlg.cpp File Reference

#include "stdafx.h"
#include "CTaskDialogDemo.h"
#include "CTaskDialogDemoDlg.h"
#include <afxtaskdialog.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemoDlg.h File Reference

  • general
  • CTaskDialog
Classes

CTaskDialogDemoDlg.h File Reference

#include <afxtaskdialog.h>

Go to the source code of this file.

Classes

class | CEndWizardDialog
class | CMargueeTaskDialog
class | CNextWizardDialog
class | CProgressBarTaskDialog
class | CTaskDialogTestDlg
class | CWizardDialog
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/Resource.h File Reference

  • general
  • CTaskDialog
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_BUT_ID 1010
#define | IDC_BUTTON1 1000
#define | IDC_BUTTON2 1001
#define | IDC_BUTTON3 1002
#define | IDC_BUTTON4 1003
#define | IDC_BUTTON5 1004
#define | IDC_BUTTON6 1005
#define | IDC_BUTTON7 1006
#define | IDC_BUTTON8 1007
#define | IDC_BUTTON9 1014
#define | IDC_CHECK 1009
#define | IDC_NEW_BUTTON 1012
#define | IDC_PROGRESS1 1013
#define | IDC_RADIO_ID 1011
#define | IDD_TASKDIALOGTEST_DIALOG 102
#define | IDR_MAINFRAME 128
#define | IDS_BUTTON 129
#define | IDS_END_BUTTON 132
#define | IDS_END_BUTTON_1 132
#define | IDS_RADIO_END 1002
#define | IDS_RADIO_END_1 1004
#define | IDS_RADIO_START 1000
#define | IDS_STRING1001 1001
#define | IDS_STRING1002 1002
#define | IDS_STRING1003 1003
#define | IDS_STRING130 130
#define | IDS_STRING131 131

Define Documentation

#define IDC_BUT_ID 1010

Definition at line 27 of file Resource.h.

#define IDC_BUTTON1 1000

Definition at line 12 of file Resource.h.

#define IDC_BUTTON2 1001

Definition at line 14 of file Resource.h.

#define IDC_BUTTON3 1002

Definition at line 16 of file Resource.h.

#define IDC_BUTTON4 1003

Definition at line 19 of file Resource.h.

#define IDC_BUTTON5 1004

Definition at line 21 of file Resource.h.

#define IDC_BUTTON6 1005

Definition at line 23 of file Resource.h.

#define IDC_BUTTON7 1006

Definition at line 24 of file Resource.h.

#define IDC_BUTTON8 1007

Definition at line 25 of file Resource.h.

#define IDC_BUTTON9 1014

Definition at line 31 of file Resource.h.

#define IDC_CHECK 1009

Definition at line 26 of file Resource.h.

#define IDC_NEW_BUTTON 1012

Definition at line 29 of file Resource.h.

#define IDC_PROGRESS1 1013

Definition at line 30 of file Resource.h.

#define IDC_RADIO_ID 1011

Definition at line 28 of file Resource.h.

#define IDD_TASKDIALOGTEST_DIALOG 102

Definition at line 5 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file Resource.h.

#define IDS_BUTTON 129

Definition at line 7 of file Resource.h.

#define IDS_END_BUTTON 132

Definition at line 10 of file Resource.h.

#define IDS_END_BUTTON_1 132

Definition at line 11 of file Resource.h.

#define IDS_RADIO_END 1002

Definition at line 18 of file Resource.h.

#define IDS_RADIO_END_1 1004

Definition at line 22 of file Resource.h.

#define IDS_RADIO_START 1000

Definition at line 13 of file Resource.h.

#define IDS_STRING1001 1001

Definition at line 15 of file Resource.h.

#define IDS_STRING1002 1002

Definition at line 17 of file Resource.h.

#define IDS_STRING1003 1003

Definition at line 20 of file Resource.h.

#define IDS_STRING130 130

Definition at line 8 of file Resource.h.

#define IDS_STRING131 131

Definition at line 9 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/stdafx.cpp File Reference

  • general
  • CTaskDialog

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/stdafx.h File Reference

  • general
  • CTaskDialog
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/targetver.h File Reference

  • general
  • CTaskDialog
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/ctrlbars.cpp File Reference

  • general
  • ctrlbars
Variables

ctrlbars.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include "ctrlbars.h"
#include "mainfrm.h"

Go to the source code of this file.

Variables

CCtrlbarsApp NEAR theApp

Variable Documentation

CCtrlbarsApp NEAR theApp

Definition at line 43 of file ctrlbars.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/ctrlbars.h File Reference

  • general
  • ctrlbars
Classes | Defines

ctrlbars.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CCtrlbarsApp

Defines

#define | WM_IDLEACTIVATE WM_USER+1

Define Documentation

#define WM_IDLEACTIVATE WM_USER+1

Definition at line 18 of file ctrlbars.h.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/mainfrm.cpp File Reference

  • general
  • ctrlbars

mainfrm.cpp File Reference

#include "stdafx.h"
#include "ctrlbars.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/mainfrm.h File Reference

  • general
  • ctrlbars
Classes

mainfrm.h File Reference

#include <afxext.h>
#include "palette.h"
#include "palette.h"

Go to the source code of this file.

Classes

class | CMainFrame
class | CStyleBar
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/palette.cpp File Reference

  • general
  • ctrlbars

palette.cpp File Reference

#include "stdafx.h"
#include "ctrlbars.h"
#include "palette.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/palette.h File Reference

  • general
  • ctrlbars
Classes

palette.h File Reference

Go to the source code of this file.

Classes

class CPaletteBar
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/resource.h File Reference

  • general
  • ctrlbars
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_PALETTE_BASE 601
#define | ID_PALETTEBAR 59396
#define | ID_PALETTEBRUSH 604
#define | ID_PALETTEERASE 601
#define | ID_PALETTEEYEDROP 608
#define | ID_PALETTELINE 607
#define | ID_PALETTEMAG 609
#define | ID_PALETTEOVAL 612
#define | ID_PALETTEPAINT 606
#define | ID_PALETTEPEN 602
#define | ID_PALETTERECT 610
#define | ID_PALETTEROUND 611
#define | ID_PALETTESELECT 603
#define | ID_PALETTESPRAY 605
#define | ID_STYLE_BASE 33000
#define | ID_STYLE_CENTERED 33001
#define | ID_STYLE_JUSTIFIED 33003
#define | ID_STYLE_LEFT 33000
#define | ID_STYLE_RIGHT 33002
#define | ID_TOGGLE_INSERT 32803
#define | ID_VIEW_DLGBARTOP 32800
#define | ID_VIEW_LONG 32802
#define | ID_VIEW_SHORT 32801
#define | IDB_PALETTE 106
#define | IDB_STYLES 3
#define | IDC_PALETTE 101
#define | IDD_ABOUTBOX 100
#define | IDD_VIEWSELECT 102
#define | IDM_PALETTE_2COLUMN 32804
#define | IDM_PALETTE_3COLUMN 32805
#define | IDM_VIEWPALETTE 502
#define | IDR_MAINFRAME 128
#define | IDS_CENTERED 61206
#define | IDS_DEFAULT_FONT 103
#define | IDS_JUSTIFIED 61207
#define | IDS_LEFT 61204
#define | IDS_RIGHT 61205
#define | IDS_SELECTED_PROMPT 61208
#define | IDW_COMBO 102
#define | IDW_STYLES 501

Define Documentation

#define ID_PALETTE_BASE 601

Definition at line 15 of file resource.h.

#define ID_PALETTEBAR 59396

Definition at line 39 of file resource.h.

#define ID_PALETTEBRUSH 604

Definition at line 19 of file resource.h.

#define ID_PALETTEERASE 601

Definition at line 16 of file resource.h.

#define ID_PALETTEEYEDROP 608

Definition at line 23 of file resource.h.

#define ID_PALETTELINE 607

Definition at line 22 of file resource.h.

#define ID_PALETTEMAG 609

Definition at line 24 of file resource.h.

#define ID_PALETTEOVAL 612

Definition at line 27 of file resource.h.

#define ID_PALETTEPAINT 606

Definition at line 21 of file resource.h.

#define ID_PALETTEPEN 602

Definition at line 17 of file resource.h.

#define ID_PALETTERECT 610

Definition at line 25 of file resource.h.

#define ID_PALETTEROUND 611

Definition at line 26 of file resource.h.

#define ID_PALETTESELECT 603

Definition at line 18 of file resource.h.

#define ID_PALETTESPRAY 605

Definition at line 20 of file resource.h.

#define ID_STYLE_BASE 33000

Definition at line 34 of file resource.h.

#define ID_STYLE_CENTERED 33001

Definition at line 36 of file resource.h.

#define ID_STYLE_JUSTIFIED 33003

Definition at line 38 of file resource.h.

#define ID_STYLE_LEFT 33000

Definition at line 35 of file resource.h.

#define ID_STYLE_RIGHT 33002

Definition at line 37 of file resource.h.

#define ID_TOGGLE_INSERT 32803

Definition at line 31 of file resource.h.

#define ID_VIEW_DLGBARTOP 32800

Definition at line 28 of file resource.h.

#define ID_VIEW_LONG 32802

Definition at line 30 of file resource.h.

#define ID_VIEW_SHORT 32801

Definition at line 29 of file resource.h.

#define IDB_PALETTE 106

Definition at line 11 of file resource.h.

#define IDB_STYLES 3

Definition at line 5 of file resource.h.

#define IDC_PALETTE 101

Definition at line 7 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_VIEWSELECT 102

Definition at line 9 of file resource.h.

#define IDM_PALETTE_2COLUMN 32804

Definition at line 32 of file resource.h.

#define IDM_PALETTE_3COLUMN 32805

Definition at line 33 of file resource.h.

#define IDM_VIEWPALETTE 502

Definition at line 14 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 12 of file resource.h.

#define IDS_CENTERED 61206

Definition at line 42 of file resource.h.

#define IDS_DEFAULT_FONT 103

Definition at line 10 of file resource.h.

#define IDS_JUSTIFIED 61207

Definition at line 43 of file resource.h.

#define IDS_LEFT 61204

Definition at line 40 of file resource.h.

#define IDS_RIGHT 61205

Definition at line 41 of file resource.h.

#define IDS_SELECTED_PROMPT 61208

Definition at line 44 of file resource.h.

#define IDW_COMBO 102

Definition at line 8 of file resource.h.

#define IDW_STYLES 501

Definition at line 13 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/stdafx.cpp File Reference

  • general
  • ctrlbars

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/stdafx.h File Reference

  • general
  • ctrlbars
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/bbutton.cpp File Reference

  • general
  • ctrltest
Classes | Defines

bbutton.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"

Go to the source code of this file.

Classes

class | CBMTest1Dlg
class | CBMTest2Dlg
class | CBMTest3Dlg

Defines

#define | ID_BUTTON_MIN IDOK
#define | N_BUTTONS (IDCANCEL - ID_BUTTON_MIN + 1)

Define Documentation

#define ID_BUTTON_MIN IDOK

Definition at line 77 of file bbutton.cpp.

#define N_BUTTONS (IDCANCEL - ID_BUTTON_MIN + 1)

Definition at line 78 of file bbutton.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/ctrltest.cpp File Reference

  • general
  • ctrltest
Classes | Variables

ctrltest.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"

Go to the source code of this file.

Classes

class | CTestApp

Variables

CTestApp NEAR | theTestApp

Variable Documentation

CTestApp NEAR theTestApp

Definition at line 80 of file ctrltest.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/ctrltest.h File Reference

  • general
  • ctrltest
Classes

ctrltest.h File Reference

#include "resource.h"
#include "res\otherids.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CColorMenu
class | CTestWindow
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/custlist.cpp File Reference

  • general
  • ctrltest
Classes | Defines | Functions

custlist.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"

Go to the source code of this file.

Classes

class | CColorListBox
class | CCustListDlg

Defines

#define | COLOR_ITEM_HEIGHT 20

Functions

ON_LBN_DBLCLK (IDC_LISTBOX1, OnOK) BOOL CCustListDlg

Define Documentation

#define COLOR_ITEM_HEIGHT 20

Definition at line 42 of file custlist.cpp.

Function Documentation

ON_LBN_DBLCLK | ( | IDC_LISTBOX1 | ,
 |  | OnOK |
 | ) |  |

Definition at line 134 of file custlist.cpp.

{
  // subclass the control
  VERIFY(m_colors.SubclassDlgItem(IDC_LISTBOX1, this));

  // add 8 colors to the listbox (primary + secondary color only)
  for (int red = 0; red <= 255; red += 255)
    for (int green = 0; green <= 255; green += 255)
      for (int blue = 0; blue <= 255; blue += 255)
        m_colors.AddColorItem(RGB(red, green, blue));

  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/custmenu.cpp File Reference

  • general
  • ctrltest
Defines | Variables

custmenu.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"

Go to the source code of this file.

Defines

#define | COLOR_BOX_HEIGHT 20
#define | COLOR_BOX_WIDTH 20

Variables

const int | nColors = sizeof(colors)/sizeof(colors[0])

Define Documentation

#define COLOR_BOX_HEIGHT 20

Definition at line 44 of file custmenu.cpp.

#define COLOR_BOX_WIDTH 20

Definition at line 43 of file custmenu.cpp.

Variable Documentation

const int nColors = sizeof(colors)/sizeof(colors[0])

Definition at line 98 of file custmenu.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/dertest.cpp File Reference

  • general
  • ctrltest
Classes

dertest.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"
#include "paredit.h"

Go to the source code of this file.

Classes

class CDerEditDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/paredit.cpp File Reference

  • general
  • ctrltest
Functions

paredit.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"
#include "paredit.h"

Go to the source code of this file.

Functions

ON_WM_VSCROLL () BOOL CParsedEdit

Function Documentation

ON_WM_VSCROLL ( )

Definition at line 28 of file paredit.cpp.

{
  m_wParseStyle = LOWORD(dwStyle);
  // figure out edit control style
  DWORD dwEditStyle = MAKELONG(ES_LEFT, HIWORD(dwStyle));
  return CWnd::Create(_T("EDIT"), NULL, dwEditStyle, rect, pParentWnd, nID);
}

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/paredit.h File Reference

  • general
  • ctrltest
Classes | Defines

paredit.h File Reference

Go to the source code of this file.

Classes

class | CParsedEdit

Defines

#define | PEN_ILLEGALCHAR 0x8000
#define | PES_ALL 0xFFFF
#define | PES_LETTERS 0x0002
#define | PES_NUMBERS 0x0001
#define | PES_OTHERCHARS 0x0004

Define Documentation

#define PEN_ILLEGALCHAR 0x8000

Definition at line 65 of file paredit.h.

#define PES_ALL 0xFFFF

Definition at line 59 of file paredit.h.

#define PES_LETTERS 0x0002

Definition at line 57 of file paredit.h.

#define PES_NUMBERS 0x0001

Definition at line 56 of file paredit.h.

#define PES_OTHERCHARS 0x0004

Definition at line 58 of file paredit.h.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/paredit2.cpp File Reference

  • general
  • ctrltest
Classes

paredit2.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"
#include "paredit.h"

Go to the source code of this file.

Classes

class CParsedEditExported
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/resource.h File Reference

  • general
  • ctrltest
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_NEXT 0x8001
#define | ID_PREV 0x8000
#define | IDC_EDIT1 2101
#define | IDC_EDIT2 2102
#define | IDC_EDIT3 2103
#define | IDC_EDIT4 2104
#define | IDC_LISTBOX1 2301
#define | IDC_NUMBEROUT 1000
#define | IDD_CUSTOM_LIST 500
#define | IDD_DERIVED_EDIT 501
#define | IDD_SUB_EDIT 505
#define | IDD_SUB_PENEDIT 506
#define | IDM_TEST_BITMAP_BUTTON1 400
#define | IDM_TEST_BITMAP_BUTTON2 401
#define | IDM_TEST_BITMAP_BUTTON3 402
#define | IDM_TEST_CUSTOM_LIST 403
#define | IDM_TEST_CUSTOM_MENU 405
#define | IDM_TEST_DERIVED_EDIT 406
#define | IDM_TEST_PENEDIT_CODE 407
#define | IDM_TEST_PENEDIT_FEATURES 408
#define | IDM_TEST_PENEDIT_TEMPLATE 409
#define | IDM_TEST_SPIN_EDIT 410
#define | IDM_TEST_SUB_EDIT 411
#define | IDM_TEST_WNDCLASS_EDIT 412
#define | IDS_COLOR_NAME_BLUE 2001
#define | IDS_COLOR_NAME_CYAN 2003
#define | IDS_COLOR_NAME_FIRST 2000
#define | IDS_COLOR_NAME_GREEN 2002
#define | IDS_COLOR_NAME_MAGENTA 2005
#define | IDS_COLOR_NAME_RED 2004
#define | IDS_COLOR_NAME_WHITE 2007
#define | IDS_COLOR_NAME_YELLOW 2006
#define | IDS_ILLEGAL_VALUE 2010
#define | IDS_MENU_TEST 2009
#define | IDS_MUSCRL32_DLL_REQUIRED 2011
#define | IDS_PLEASE_SELECT_COLOR 2
#define | IDS_WNDCLASS_NOT_REGISTERED 2012
#define | IDS_YOU_CHOSE 1
#define | IDS_YOU_PICKED_COLOR 2008

Define Documentation

#define ID_NEXT 0x8001

Definition at line 43 of file resource.h.

#define ID_PREV 0x8000

Definition at line 42 of file resource.h.

#define IDC_EDIT1 2101

Definition at line 37 of file resource.h.

#define IDC_EDIT2 2102

Definition at line 38 of file resource.h.

#define IDC_EDIT3 2103

Definition at line 39 of file resource.h.

#define IDC_EDIT4 2104

Definition at line 40 of file resource.h.

#define IDC_LISTBOX1 2301

Definition at line 41 of file resource.h.

#define IDC_NUMBEROUT 1000

Definition at line 23 of file resource.h.

#define IDD_CUSTOM_LIST 500

Definition at line 19 of file resource.h.

#define IDD_DERIVED_EDIT 501

Definition at line 20 of file resource.h.

#define IDD_SUB_EDIT 505

Definition at line 21 of file resource.h.

#define IDD_SUB_PENEDIT 506

Definition at line 22 of file resource.h.

#define IDM_TEST_BITMAP_BUTTON1 400

Definition at line 7 of file resource.h.

#define IDM_TEST_BITMAP_BUTTON2 401

Definition at line 8 of file resource.h.

#define IDM_TEST_BITMAP_BUTTON3 402

Definition at line 9 of file resource.h.

#define IDM_TEST_CUSTOM_LIST 403

Definition at line 10 of file resource.h.

#define IDM_TEST_CUSTOM_MENU 405

Definition at line 11 of file resource.h.

#define IDM_TEST_DERIVED_EDIT 406

Definition at line 12 of file resource.h.

#define IDM_TEST_PENEDIT_CODE 407

Definition at line 13 of file resource.h.

#define IDM_TEST_PENEDIT_FEATURES 408

Definition at line 14 of file resource.h.

#define IDM_TEST_PENEDIT_TEMPLATE 409

Definition at line 15 of file resource.h.

#define IDM_TEST_SPIN_EDIT 410

Definition at line 16 of file resource.h.

#define IDM_TEST_SUB_EDIT 411

Definition at line 17 of file resource.h.

#define IDM_TEST_WNDCLASS_EDIT 412

Definition at line 18 of file resource.h.

#define IDS_COLOR_NAME_BLUE 2001

Definition at line 25 of file resource.h.

#define IDS_COLOR_NAME_CYAN 2003

Definition at line 27 of file resource.h.

#define IDS_COLOR_NAME_FIRST 2000

Definition at line 24 of file resource.h.

#define IDS_COLOR_NAME_GREEN 2002

Definition at line 26 of file resource.h.

#define IDS_COLOR_NAME_MAGENTA 2005

Definition at line 29 of file resource.h.

#define IDS_COLOR_NAME_RED 2004

Definition at line 28 of file resource.h.

#define IDS_COLOR_NAME_WHITE 2007

Definition at line 31 of file resource.h.

#define IDS_COLOR_NAME_YELLOW 2006

Definition at line 30 of file resource.h.

#define IDS_ILLEGAL_VALUE 2010

Definition at line 34 of file resource.h.

#define IDS_MENU_TEST 2009

Definition at line 33 of file resource.h.

#define IDS_MUSCRL32_DLL_REQUIRED 2011

Definition at line 35 of file resource.h.

#define IDS_PLEASE_SELECT_COLOR 2

Definition at line 6 of file resource.h.

#define IDS_WNDCLASS_NOT_REGISTERED 2012

Definition at line 36 of file resource.h.

#define IDS_YOU_CHOSE 1

Definition at line 5 of file resource.h.

#define IDS_YOU_PICKED_COLOR 2008

Definition at line 32 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/spintest.cpp File Reference

  • general
  • ctrltest
Classes | Defines

spintest.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"
#include "paredit.h"

Go to the source code of this file.

Classes

class | CSpinEditDlg

Defines

#define | IDC_BUTTON_MAX IDC_BUTTON4
#define | IDC_EDIT_MIN IDC_EDIT1
#define | NUM_EDIT 4

Define Documentation

#define IDC_BUTTON_MAX IDC_BUTTON4

Definition at line 23 of file spintest.cpp.

#define IDC_EDIT_MIN IDC_EDIT1

Definition at line 22 of file spintest.cpp.

#define NUM_EDIT 4

Definition at line 21 of file spintest.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/stdafx.cpp File Reference

  • general
  • ctrltest

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/stdafx.h File Reference

  • general
  • ctrltest
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>
#include <atlbase.h>
#include <atlwin.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 10 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/subtest.cpp File Reference

  • general
  • ctrltest
Classes

subtest.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"
#include "paredit.h"

Go to the source code of this file.

Classes

class CSubEditDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/wclstest.cpp File Reference

  • general
  • ctrltest
Classes

wclstest.cpp File Reference

#include "stdafx.h"
#include "ctrltest.h"
#include "paredit.h"

Go to the source code of this file.

Classes

class CWclsEditDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/res/otherids.h File Reference

  • general
  • ctrltest
  • res
Defines

otherids.h File Reference

Go to the source code of this file.

Defines

#define | IDC_ALC_FIRST 1100
#define | IDC_BUTTON1 2201
#define | IDC_BUTTON2 2202
#define | IDC_BUTTON3 2203
#define | IDC_BUTTON4 2204
#define | IDC_CONFIGURE 1000
#define | IDC_LEFTHANDED 1001
#define | IDD_PENEDIT_CONFIGURE 502
#define | IDD_PENEDIT_FEATURES 503
#define | IDD_SPIN_EDIT 504
#define | IDD_WNDCLASS_EDIT 507

Define Documentation

#define IDC_ALC_FIRST 1100

Definition at line 7 of file otherids.h.

#define IDC_BUTTON1 2201

Definition at line 8 of file otherids.h.

#define IDC_BUTTON2 2202

Definition at line 9 of file otherids.h.

#define IDC_BUTTON3 2203

Definition at line 10 of file otherids.h.

#define IDC_BUTTON4 2204

Definition at line 11 of file otherids.h.

#define IDC_CONFIGURE 1000

Definition at line 12 of file otherids.h.

#define IDC_LEFTHANDED 1001

Definition at line 13 of file otherids.h.

#define IDD_PENEDIT_CONFIGURE 502

Definition at line 14 of file otherids.h.

#define IDD_PENEDIT_FEATURES 503

Definition at line 15 of file otherids.h.

#define IDD_SPIN_EDIT 504

Definition at line 16 of file otherids.h.

#define IDD_WNDCLASS_EDIT 507

Definition at line 17 of file otherids.h.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVList.cpp File Reference

  • general
  • DBVList
Classes | Variables

DBVList.cpp File Reference

#include "stdafx.h"
#include "DBVList.h"
#include "MainFrm.h"
#include "DBVListSet.h"
#include "DBVListDoc.h"
#include "DBVListView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CDBVListApp theApp

Variable Documentation

CDBVListApp theApp

Definition at line 45 of file DBVList.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVList.h File Reference

  • general
  • DBVList
Classes

DBVList.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDBVListApp
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListDoc.cpp File Reference

  • general
  • DBVList

DBVListDoc.cpp File Reference

#include "stdafx.h"
#include "DBVList.h"
#include "DBVListSet.h"
#include "DBVListDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListDoc.h File Reference

  • general
  • DBVList
Classes

DBVListDoc.h File Reference

Go to the source code of this file.

Classes

class CDBVListDoc
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListSet.cpp File Reference

  • general
  • DBVList

DBVListSet.cpp File Reference

#include "stdafx.h"
#include "DBVList.h"
#include "DBVListSet.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListSet.h File Reference

  • general
  • DBVList
Classes

DBVListSet.h File Reference

Go to the source code of this file.

Classes

class CDBVListSet
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListView.cpp File Reference

  • general
  • DBVList

DBVListView.cpp File Reference

#include "stdafx.h"
#include "DBVList.h"
#include "DBVListSet.h"
#include "DBVListDoc.h"
#include "DBVListView.h"
#include "MainFrm.h"
#include "EmpView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListView.h File Reference

  • general
  • DBVList
Classes

DBVListView.h File Reference

Go to the source code of this file.

Classes

class CDBVListView
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/EmpView.cpp File Reference

  • general
  • DBVList

EmpView.cpp File Reference

#include "stdafx.h"
#include "DBVList.h"
#include "DBVListSet.h"
#include "DBVListDoc.h"
#include "EmpView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/EmpView.h File Reference

  • general
  • DBVList
Classes

EmpView.h File Reference

Go to the source code of this file.

Classes

class CEmpView
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/MainFrm.cpp File Reference

  • general
  • DBVList

MainFrm.cpp File Reference

#include "stdafx.h"
#include "DBVList.h"
#include "DBVListSet.h"
#include "DBVListDoc.h"
#include "DBVListView.h"
#include "MainFrm.h"
#include "EmpView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/MainFrm.h File Reference

  • general
  • DBVList
Classes

MainFrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/resource.h File Reference

  • general
  • DBVList
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_DIV 1000
#define | IDC_FETCH 1005
#define | IDD_ABOUTBOX 100
#define | IDD_DBVLIST_FORM 101
#define | IDP_FAILED_OPEN_DATABASE 103
#define | IDR_DBVLISTYPE 129
#define | IDR_MAINFRAME 128

Define Documentation

#define IDC_DIV 1000

Definition at line 19 of file resource.h.

#define IDC_FETCH 1005

Definition at line 20 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 14 of file resource.h.

#define IDD_DBVLIST_FORM 101

Definition at line 15 of file resource.h.

#define IDP_FAILED_OPEN_DATABASE 103

Definition at line 16 of file resource.h.

#define IDR_DBVLISTYPE 129

Definition at line 18 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 17 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/StdAfx.cpp File Reference

  • general
  • DBVList

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/StdAfx.h File Reference

  • general
  • DBVList
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdao.h>
#include <afxcmn.h>
#include <afxcview.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 21 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibapi.cpp File Reference

  • general
  • diblook
Functions

dibapi.cpp File Reference

#include "stdafx.h"
#include "dibapi.h"
#include <io.h>
#include <errno.h>

Go to the source code of this file.

Functions

HGLOBAL WINAPI | CopyHandle (HGLOBAL h)
BOOL WINAPI | CreateDIBPalette (HDIB hDIB, CPalette *pPal)
DWORD WINAPI | DIBHeight (LPSTR lpDIB)
WORD WINAPI | DIBNumColors (LPSTR lpbi)
DWORD WINAPI | DIBWidth (LPSTR lpDIB)
LPSTR WINAPI | FindDIBBits (LPSTR lpbi)
BOOL WINAPI | PaintDIB (HDC hDC, LPRECT lpDCRect, HDIB hDIB, LPRECT lpDIBRect, CPalette *pPal)
WORD WINAPI | PaletteSize (LPSTR lpbi)

Function Documentation

HGLOBAL WINAPI CopyHandle ( HGLOBAL h )

Definition at line 462 of file dibapi.cpp.

{
  if (h == NULL)
    return NULL;

  DWORD dwLen = (DWORD)::GlobalSize((HGLOBAL) h);
  HGLOBAL hCopy = ::GlobalAlloc(GHND, dwLen);

  if (hCopy != NULL)
  {
    void* lpCopy = ::GlobalLock((HGLOBAL) hCopy);
    void* lp     = ::GlobalLock((HGLOBAL) h);
    memcpy_s(lpCopy, dwLen, lp, dwLen);
    ::GlobalUnlock(hCopy);
    ::GlobalUnlock(h);
  }

  return hCopy;
}

BOOL WINAPI CreateDIBPalette | ( | HDIB | hDIB,
 |  | CPalette * | pPal
 | ) |  |

Definition at line 162 of file dibapi.cpp.

{
  LPLOGPALETTE lpPal;      // pointer to a logical palette
  HANDLE hLogPal;          // handle to a logical palette
  int i;                   // loop index
  WORD wNumColors;         // number of colors in color table
  LPSTR lpbi;              // pointer to packed-DIB
  LPBITMAPINFO lpbmi;      // pointer to BITMAPINFO structure (Win3.0)
  LPBITMAPCOREINFO lpbmc;  // pointer to BITMAPCOREINFO structure (old)
  BOOL bWinStyleDIB;       // flag which signifies whether this is a Win3.0 DIB
  BOOL bResult = FALSE;

  /* if handle to DIB is invalid, return FALSE */

  if (hDIB == NULL)
    return FALSE;

   lpbi = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);

   /* get pointer to BITMAPINFO (Win 3.0) */
   lpbmi = (LPBITMAPINFO)lpbi;

   /* get pointer to BITMAPCOREINFO (old 1.x) */
   lpbmc = (LPBITMAPCOREINFO)lpbi;

   /* get the number of colors in the DIB */
   wNumColors = ::DIBNumColors(lpbi);

   if (wNumColors != 0)
   {
    /* allocate memory block for logical palette */
    hLogPal = ::GlobalAlloc(GHND, sizeof(LOGPALETTE)
                  + sizeof(PALETTEENTRY)
                  * wNumColors);

    /* if not enough memory, clean up and return NULL */
    if (hLogPal == 0)
    {
      ::GlobalUnlock((HGLOBAL) hDIB);
      return FALSE;
    }

    lpPal = (LPLOGPALETTE) ::GlobalLock((HGLOBAL) hLogPal);

    /* set version and number of palette entries */
    lpPal->palVersion = PALVERSION;
    lpPal->palNumEntries = (WORD)wNumColors;

    /* is this a Win 3.0 DIB? */
    bWinStyleDIB = IS_WIN30_DIB(lpbi);
    for (i = 0; i < (int)wNumColors; i++)
    {
      if (bWinStyleDIB)
      {
        lpPal->palPalEntry[i].peRed = lpbmi->bmiColors[i].rgbRed;
        lpPal->palPalEntry[i].peGreen = lpbmi->bmiColors[i].rgbGreen;
        lpPal->palPalEntry[i].peBlue = lpbmi->bmiColors[i].rgbBlue;
        lpPal->palPalEntry[i].peFlags = 0;
      }
      else
      {
        lpPal->palPalEntry[i].peRed = lpbmc->bmciColors[i].rgbtRed;
        lpPal->palPalEntry[i].peGreen = lpbmc->bmciColors[i].rgbtGreen;
        lpPal->palPalEntry[i].peBlue = lpbmc->bmciColors[i].rgbtBlue;
        lpPal->palPalEntry[i].peFlags = 0;
      }
    }

    /* create the palette and get handle to it */
    bResult = pPal->CreatePalette(lpPal);
    ::GlobalUnlock((HGLOBAL) hLogPal);
    ::GlobalFree((HGLOBAL) hLogPal);
  }

  ::GlobalUnlock((HGLOBAL) hDIB);

  return bResult;
}

DWORD WINAPI DIBHeight ( LPSTR lpDIB )

Definition at line 327 of file dibapi.cpp.

{
  LPBITMAPINFOHEADER lpbmi;  // pointer to a Win 3.0-style DIB
  LPBITMAPCOREHEADER lpbmc;  // pointer to an other-style DIB

  /* point to the header (whether old or Win 3.0 */

  lpbmi = (LPBITMAPINFOHEADER)lpDIB;
  lpbmc = (LPBITMAPCOREHEADER)lpDIB;

  /* return the DIB height if it is a Win 3.0 DIB */
  if (IS_WIN30_DIB(lpDIB))
    return lpbmi->biHeight;
  else  /* it is an other-style DIB, so return its height */
    return (DWORD)lpbmc->bcHeight;
}

WORD WINAPI DIBNumColors ( LPSTR lpbi )

Definition at line 399 of file dibapi.cpp.

{
  WORD wBitCount;  // DIB bit count

  /*  If this is a Windows-style DIB, the number of colors in the
   *  color table can be less than the number of bits per pixel
   *  allows for (i.e. lpbi->biClrUsed can be set to some value).
   *  If this is the case, return the appropriate value.
   */

  if (IS_WIN30_DIB(lpbi))
  {
    DWORD dwClrUsed;

    dwClrUsed = ((LPBITMAPINFOHEADER)lpbi)->biClrUsed;
    if (dwClrUsed != 0)
      return (WORD)dwClrUsed;
  }

  /*  Calculate the number of colors in the color table based on
   *  the number of bits per pixel for the DIB.
   */
  if (IS_WIN30_DIB(lpbi))
    wBitCount = ((LPBITMAPINFOHEADER)lpbi)->biBitCount;
  else
    wBitCount = ((LPBITMAPCOREHEADER)lpbi)->bcBitCount;

  /* return number of colors based on bits per pixel */
  switch (wBitCount)
  {
    case 1:
      return 2;

    case 4:
      return 16;

    case 8:
      return 256;

    default:
      return 0;
  }
}

DWORD WINAPI DIBWidth ( LPSTR lpDIB )

Definition at line 288 of file dibapi.cpp.

{
  LPBITMAPINFOHEADER lpbmi;  // pointer to a Win 3.0-style DIB
  LPBITMAPCOREHEADER lpbmc;  // pointer to an other-style DIB

  /* point to the header (whether Win 3.0 and old) */

  lpbmi = (LPBITMAPINFOHEADER)lpDIB;
  lpbmc = (LPBITMAPCOREHEADER)lpDIB;

  /* return the DIB width if it is a Win 3.0 DIB */
  if (IS_WIN30_DIB(lpDIB))
    return lpbmi->biWidth;
  else  /* it is an other-style DIB, so return its width */
    return (DWORD)lpbmc->bcWidth;
}

LPSTR WINAPI FindDIBBits ( LPSTR lpbi )

Definition at line 261 of file dibapi.cpp.

{
  return (lpbi + *(LPDWORD)lpbi + ::PaletteSize(lpbi));
}

BOOL WINAPI PaintDIB | ( | HDC | hDC,
 |  | LPRECT | lpDCRect,
 |  | HDIB | hDIB,
 |  | LPRECT | lpDIBRect,
 |  | CPalette * | pPal
 | ) |  |

Definition at line 60 of file dibapi.cpp.

{
  LPSTR    lpDIBHdr;            // Pointer to BITMAPINFOHEADER
  LPSTR    lpDIBBits;           // Pointer to DIB bits
  BOOL     bSuccess=FALSE;      // Success/fail flag
  HPALETTE hPal=NULL;           // Our DIB's palette
  HPALETTE hOldPal=NULL;        // Previous palette

  /* Check for valid DIB handle */
  if (hDIB == NULL)
    return FALSE;

  /* Lock down the DIB, and get a pointer to the beginning of the bit
   *  buffer
   */
  lpDIBHdr  = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
  lpDIBBits = ::FindDIBBits(lpDIBHdr);

  // Get the DIB's palette, then select it into DC
  if (pPal != NULL)
  {
    hPal = (HPALETTE) pPal->m_hObject;

    // Select as background since we have
    // already realized in forground if needed
    hOldPal = ::SelectPalette(hDC, hPal, TRUE);
  }

  /* Make sure to use the stretching mode best for color pictures */
  ::SetStretchBltMode(hDC, COLORONCOLOR);

  /* Determine whether to call StretchDIBits() or SetDIBitsToDevice() */
  if ((RECTWIDTH(lpDCRect)  == RECTWIDTH(lpDIBRect)) &&
     (RECTHEIGHT(lpDCRect) == RECTHEIGHT(lpDIBRect)))
    bSuccess = ::SetDIBitsToDevice(hDC,                    // hDC
                   lpDCRect->left,             // DestX
                   lpDCRect->top,              // DestY
                   RECTWIDTH(lpDCRect),        // nDestWidth
                   RECTHEIGHT(lpDCRect),       // nDestHeight
                   lpDIBRect->left,            // SrcX
                   (int)DIBHeight(lpDIBHdr) -
                    lpDIBRect->top -
                    RECTHEIGHT(lpDIBRect),   // SrcY
                   0,                          // nStartScan
                   (WORD)DIBHeight(lpDIBHdr),  // nNumScans
                   lpDIBBits,                  // lpBits
                   (LPBITMAPINFO)lpDIBHdr,     // lpBitsInfo
                   DIB_RGB_COLORS);            // wUsage
   else
    bSuccess = ::StretchDIBits(hDC,                          // hDC
                 lpDCRect->left,                 // DestX
                 lpDCRect->top,                  // DestY
                 RECTWIDTH(lpDCRect),            // nDestWidth
                 RECTHEIGHT(lpDCRect),           // nDestHeight
                 lpDIBRect->left,                // SrcX
                 lpDIBRect->top,                 // SrcY
                 RECTWIDTH(lpDIBRect),           // wSrcWidth
                 RECTHEIGHT(lpDIBRect),          // wSrcHeight
                 lpDIBBits,                      // lpBits
                 (LPBITMAPINFO)lpDIBHdr,         // lpBitsInfo
                 DIB_RGB_COLORS,                 // wUsage
                 SRCCOPY);                       // dwROP

   ::GlobalUnlock((HGLOBAL) hDIB);

  /* Reselect old palette */
  if (hOldPal != NULL)
  {
    ::SelectPalette(hDC, hOldPal, TRUE);
  }

   return bSuccess;
}

WORD WINAPI PaletteSize ( LPSTR lpbi )

Definition at line 367 of file dibapi.cpp.

{
   /* calculate the size required by the palette */
   if (IS_WIN30_DIB (lpbi))
    return (WORD)(::DIBNumColors(lpbi) * sizeof(RGBQUAD));
   else
    return (WORD)(::DIBNumColors(lpbi) * sizeof(RGBTRIPLE));
}

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibapi.h File Reference

  • general
  • diblook
Defines | Functions

dibapi.h File Reference

Go to the source code of this file.

Defines

#define | IS_WIN30_DIB(lpbi) ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
#define | PALVERSION 0x300
#define | RECTHEIGHT(lpRect) ((lpRect)->bottom - (lpRect)->top)
#define | RECTWIDTH(lpRect) ((lpRect)->right - (lpRect)->left)
#define | WIDTHBYTES(bits) (((bits) + 31) / 32 * 4)

Functions

HGLOBAL WINAPI | CopyHandle (HGLOBAL h)
BOOL WINAPI | CreateDIBPalette (HDIB hDIB, CPalette *cPal)
DECLARE_HANDLE (HDIB)
DWORD WINAPI | DIBHeight (LPSTR lpDIB)
WORD WINAPI | DIBNumColors (LPSTR lpbi)
DWORD WINAPI | DIBWidth (LPSTR lpDIB)
LPSTR WINAPI | FindDIBBits (LPSTR lpbi)
BOOL WINAPI | PaintDIB (HDC, LPRECT, HDIB, LPRECT, CPalette *pPal)
WORD WINAPI | PaletteSize (LPSTR lpbi)
HDIB WINAPI | ReadDIBFile (CFile &file)
BOOL WINAPI | SaveDIB (HDIB hDib, CFile &file)

Define Documentation

#define IS_WIN30_DIB ( lpbi ) ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))

Definition at line 24 of file dibapi.h.

#define PALVERSION 0x300

Definition at line 20 of file dibapi.h.

#define RECTHEIGHT ( lpRect ) ((lpRect)->bottom - (lpRect)->top)

Definition at line 26 of file dibapi.h.

#define RECTWIDTH ( lpRect ) ((lpRect)->right - (lpRect)->left)

Definition at line 25 of file dibapi.h.

#define WIDTHBYTES ( bits ) (((bits) + 31) / 32 * 4)

Definition at line 33 of file dibapi.h.

Function Documentation

HGLOBAL WINAPI CopyHandle ( HGLOBAL h )

Definition at line 462 of file dibapi.cpp.

{
  if (h == NULL)
    return NULL;

  DWORD dwLen = (DWORD)::GlobalSize((HGLOBAL) h);
  HGLOBAL hCopy = ::GlobalAlloc(GHND, dwLen);

  if (hCopy != NULL)
  {
    void* lpCopy = ::GlobalLock((HGLOBAL) hCopy);
    void* lp     = ::GlobalLock((HGLOBAL) h);
    memcpy_s(lpCopy, dwLen, lp, dwLen);
    ::GlobalUnlock(hCopy);
    ::GlobalUnlock(h);
  }

  return hCopy;
}

BOOL WINAPI CreateDIBPalette | ( | HDIB | hDIB,
 |  | CPalette * | cPal
 | ) |  |

Definition at line 162 of file dibapi.cpp.

{
  LPLOGPALETTE lpPal;      // pointer to a logical palette
  HANDLE hLogPal;          // handle to a logical palette
  int i;                   // loop index
  WORD wNumColors;         // number of colors in color table
  LPSTR lpbi;              // pointer to packed-DIB
  LPBITMAPINFO lpbmi;      // pointer to BITMAPINFO structure (Win3.0)
  LPBITMAPCOREINFO lpbmc;  // pointer to BITMAPCOREINFO structure (old)
  BOOL bWinStyleDIB;       // flag which signifies whether this is a Win3.0 DIB
  BOOL bResult = FALSE;

  /* if handle to DIB is invalid, return FALSE */

  if (hDIB == NULL)
    return FALSE;

   lpbi = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);

   /* get pointer to BITMAPINFO (Win 3.0) */
   lpbmi = (LPBITMAPINFO)lpbi;

   /* get pointer to BITMAPCOREINFO (old 1.x) */
   lpbmc = (LPBITMAPCOREINFO)lpbi;

   /* get the number of colors in the DIB */
   wNumColors = ::DIBNumColors(lpbi);

   if (wNumColors != 0)
   {
    /* allocate memory block for logical palette */
    hLogPal = ::GlobalAlloc(GHND, sizeof(LOGPALETTE)
                  + sizeof(PALETTEENTRY)
                  * wNumColors);

    /* if not enough memory, clean up and return NULL */
    if (hLogPal == 0)
    {
      ::GlobalUnlock((HGLOBAL) hDIB);
      return FALSE;
    }

    lpPal = (LPLOGPALETTE) ::GlobalLock((HGLOBAL) hLogPal);

    /* set version and number of palette entries */
    lpPal->palVersion = PALVERSION;
    lpPal->palNumEntries = (WORD)wNumColors;

    /* is this a Win 3.0 DIB? */
    bWinStyleDIB = IS_WIN30_DIB(lpbi);
    for (i = 0; i < (int)wNumColors; i++)
    {
      if (bWinStyleDIB)
      {
        lpPal->palPalEntry[i].peRed = lpbmi->bmiColors[i].rgbRed;
        lpPal->palPalEntry[i].peGreen = lpbmi->bmiColors[i].rgbGreen;
        lpPal->palPalEntry[i].peBlue = lpbmi->bmiColors[i].rgbBlue;
        lpPal->palPalEntry[i].peFlags = 0;
      }
      else
      {
        lpPal->palPalEntry[i].peRed = lpbmc->bmciColors[i].rgbtRed;
        lpPal->palPalEntry[i].peGreen = lpbmc->bmciColors[i].rgbtGreen;
        lpPal->palPalEntry[i].peBlue = lpbmc->bmciColors[i].rgbtBlue;
        lpPal->palPalEntry[i].peFlags = 0;
      }
    }

    /* create the palette and get handle to it */
    bResult = pPal->CreatePalette(lpPal);
    ::GlobalUnlock((HGLOBAL) hLogPal);
    ::GlobalFree((HGLOBAL) hLogPal);
  }

  ::GlobalUnlock((HGLOBAL) hDIB);

  return bResult;
}

DECLARE_HANDLE ( HDIB )
DWORD WINAPI DIBHeight ( LPSTR lpDIB )

Definition at line 327 of file dibapi.cpp.

{
  LPBITMAPINFOHEADER lpbmi;  // pointer to a Win 3.0-style DIB
  LPBITMAPCOREHEADER lpbmc;  // pointer to an other-style DIB

  /* point to the header (whether old or Win 3.0 */

  lpbmi = (LPBITMAPINFOHEADER)lpDIB;
  lpbmc = (LPBITMAPCOREHEADER)lpDIB;

  /* return the DIB height if it is a Win 3.0 DIB */
  if (IS_WIN30_DIB(lpDIB))
    return lpbmi->biHeight;
  else  /* it is an other-style DIB, so return its height */
    return (DWORD)lpbmc->bcHeight;
}

WORD WINAPI DIBNumColors ( LPSTR lpbi )

Definition at line 399 of file dibapi.cpp.

{
  WORD wBitCount;  // DIB bit count

  /*  If this is a Windows-style DIB, the number of colors in the
   *  color table can be less than the number of bits per pixel
   *  allows for (i.e. lpbi->biClrUsed can be set to some value).
   *  If this is the case, return the appropriate value.
   */

  if (IS_WIN30_DIB(lpbi))
  {
    DWORD dwClrUsed;

    dwClrUsed = ((LPBITMAPINFOHEADER)lpbi)->biClrUsed;
    if (dwClrUsed != 0)
      return (WORD)dwClrUsed;
  }

  /*  Calculate the number of colors in the color table based on
   *  the number of bits per pixel for the DIB.
   */
  if (IS_WIN30_DIB(lpbi))
    wBitCount = ((LPBITMAPINFOHEADER)lpbi)->biBitCount;
  else
    wBitCount = ((LPBITMAPCOREHEADER)lpbi)->bcBitCount;

  /* return number of colors based on bits per pixel */
  switch (wBitCount)
  {
    case 1:
      return 2;

    case 4:
      return 16;

    case 8:
      return 256;

    default:
      return 0;
  }
}

DWORD WINAPI DIBWidth ( LPSTR lpDIB )

Definition at line 288 of file dibapi.cpp.

{
  LPBITMAPINFOHEADER lpbmi;  // pointer to a Win 3.0-style DIB
  LPBITMAPCOREHEADER lpbmc;  // pointer to an other-style DIB

  /* point to the header (whether Win 3.0 and old) */

  lpbmi = (LPBITMAPINFOHEADER)lpDIB;
  lpbmc = (LPBITMAPCOREHEADER)lpDIB;

  /* return the DIB width if it is a Win 3.0 DIB */
  if (IS_WIN30_DIB(lpDIB))
    return lpbmi->biWidth;
  else  /* it is an other-style DIB, so return its width */
    return (DWORD)lpbmc->bcWidth;
}

LPSTR WINAPI FindDIBBits ( LPSTR lpbi )

Definition at line 261 of file dibapi.cpp.

{
  return (lpbi + *(LPDWORD)lpbi + ::PaletteSize(lpbi));
}

BOOL WINAPI PaintDIB | ( | HDC | ,
 |  | LPRECT | ,
 |  | HDIB | ,
 |  | LPRECT | ,
 |  | CPalette * | pPal
 | ) |  |

Definition at line 60 of file dibapi.cpp.

{
  LPSTR    lpDIBHdr;            // Pointer to BITMAPINFOHEADER
  LPSTR    lpDIBBits;           // Pointer to DIB bits
  BOOL     bSuccess=FALSE;      // Success/fail flag
  HPALETTE hPal=NULL;           // Our DIB's palette
  HPALETTE hOldPal=NULL;        // Previous palette

  /* Check for valid DIB handle */
  if (hDIB == NULL)
    return FALSE;

  /* Lock down the DIB, and get a pointer to the beginning of the bit
   *  buffer
   */
  lpDIBHdr  = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
  lpDIBBits = ::FindDIBBits(lpDIBHdr);

  // Get the DIB's palette, then select it into DC
  if (pPal != NULL)
  {
    hPal = (HPALETTE) pPal->m_hObject;

    // Select as background since we have
    // already realized in forground if needed
    hOldPal = ::SelectPalette(hDC, hPal, TRUE);
  }

  /* Make sure to use the stretching mode best for color pictures */
  ::SetStretchBltMode(hDC, COLORONCOLOR);

  /* Determine whether to call StretchDIBits() or SetDIBitsToDevice() */
  if ((RECTWIDTH(lpDCRect)  == RECTWIDTH(lpDIBRect)) &&
     (RECTHEIGHT(lpDCRect) == RECTHEIGHT(lpDIBRect)))
    bSuccess = ::SetDIBitsToDevice(hDC,                    // hDC
                   lpDCRect->left,             // DestX
                   lpDCRect->top,              // DestY
                   RECTWIDTH(lpDCRect),        // nDestWidth
                   RECTHEIGHT(lpDCRect),       // nDestHeight
                   lpDIBRect->left,            // SrcX
                   (int)DIBHeight(lpDIBHdr) -
                    lpDIBRect->top -
                    RECTHEIGHT(lpDIBRect),   // SrcY
                   0,                          // nStartScan
                   (WORD)DIBHeight(lpDIBHdr),  // nNumScans
                   lpDIBBits,                  // lpBits
                   (LPBITMAPINFO)lpDIBHdr,     // lpBitsInfo
                   DIB_RGB_COLORS);            // wUsage
   else
    bSuccess = ::StretchDIBits(hDC,                          // hDC
                 lpDCRect->left,                 // DestX
                 lpDCRect->top,                  // DestY
                 RECTWIDTH(lpDCRect),            // nDestWidth
                 RECTHEIGHT(lpDCRect),           // nDestHeight
                 lpDIBRect->left,                // SrcX
                 lpDIBRect->top,                 // SrcY
                 RECTWIDTH(lpDIBRect),           // wSrcWidth
                 RECTHEIGHT(lpDIBRect),          // wSrcHeight
                 lpDIBBits,                      // lpBits
                 (LPBITMAPINFO)lpDIBHdr,         // lpBitsInfo
                 DIB_RGB_COLORS,                 // wUsage
                 SRCCOPY);                       // dwROP

   ::GlobalUnlock((HGLOBAL) hDIB);

  /* Reselect old palette */
  if (hOldPal != NULL)
  {
    ::SelectPalette(hDC, hOldPal, TRUE);
  }

   return bSuccess;
}

WORD WINAPI PaletteSize ( LPSTR lpbi )

Definition at line 367 of file dibapi.cpp.

{
   /* calculate the size required by the palette */
   if (IS_WIN30_DIB (lpbi))
    return (WORD)(::DIBNumColors(lpbi) * sizeof(RGBQUAD));
   else
    return (WORD)(::DIBNumColors(lpbi) * sizeof(RGBTRIPLE));
}

HDIB WINAPI ReadDIBFile ( CFile & file )

Definition at line 171 of file myfile.cpp.

{
  BITMAPFILEHEADER bmfHeader;
  UINT nBitsSize;
  HDIB hDIB;
  LPSTR pDIB;

  /*
   * get length of DIB in bytes for use when reading
   */

  nBitsSize = (UINT)file.GetLength();

  /*
   * Go read the DIB file header and check if it's valid.
   */
  if (file.Read((LPSTR)&bmfHeader, sizeof(bmfHeader)) != sizeof(bmfHeader))
    return NULL;

  if (bmfHeader.bfType != DIB_HEADER_MARKER)
    return NULL;

  /*
   * Allocate memory for DIB
   */
  hDIB = (HDIB) ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, (DWORD)nBitsSize);
  if (hDIB == 0)
  {
    return NULL;
  }
  pDIB = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);

  /*
   * Go read the bits.
   */
  if (file.Read(pDIB, nBitsSize - sizeof(BITMAPFILEHEADER)) !=
    nBitsSize - sizeof(BITMAPFILEHEADER) )
  {
    ::GlobalUnlock((HGLOBAL) hDIB);
    ::GlobalFree((HGLOBAL) hDIB);
    return NULL;
  }
  ::GlobalUnlock((HGLOBAL) hDIB);
  return hDIB;
}

BOOL WINAPI SaveDIB | ( | HDIB | hDib,
 |  | CFile & | file
 | ) |  |

Definition at line 49 of file myfile.cpp.

{
  BITMAPFILEHEADER bmfHdr; // Header for Bitmap file
  LPBITMAPINFOHEADER lpBI;   // Pointer to DIB info structure
  UINT nDIBSize;

  if (hDib == NULL)
    return FALSE;

  /*
   * Get a pointer to the DIB memory, the first of which contains
   * a BITMAPINFO structure
   */
  lpBI = (LPBITMAPINFOHEADER) ::GlobalLock((HGLOBAL) hDib);
  if (lpBI == NULL)
    return FALSE;

  if (!IS_WIN30_DIB(lpBI))
  {
    ::GlobalUnlock((HGLOBAL) hDib);
    return FALSE;       // It's an other-style DIB (save not supported)
  }

  /*
   * Fill in the fields of the file header
   */

  /* Fill in file type (first 2 bytes must be "BM" for a bitmap) */
  bmfHdr.bfType = DIB_HEADER_MARKER;  // "BM"

  // Calculating the size of the DIB is a bit tricky (if we want to
  // do it right).  The easiest way to do this is to call GlobalSize()
  // on our global handle, but since the size of our global memory may have
  // been padded a few bytes, we may end up writing out a few too
  // many bytes to the file (which may cause problems with some apps).
  //
  // So, instead let's calculate the size manually (if we can)
  //
  // First, find size of header plus size of color table.  Since the
  // first DWORD in both BITMAPINFOHEADER and BITMAPCOREHEADER conains
  // the size of the structure, let's use this.

  nDIBSize = *(LPDWORD)lpBI + ::PaletteSize((LPSTR)lpBI);  // Partial Calculation

  // Now calculate the size of the image

  if ((lpBI->biCompression == BI_RLE8) || (lpBI->biCompression == BI_RLE4))
  {
    // It's an RLE bitmap, we can't calculate size, so trust the
    // biSizeImage field

    nDIBSize += lpBI->biSizeImage;
  }
  else
  {
    DWORD dwBmBitsSize;  // Size of Bitmap Bits only

    // It's not RLE, so size is Width (DWORD aligned) * Height

    dwBmBitsSize = WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount)) * lpBI->biHeight;

    nDIBSize += dwBmBitsSize;

    // Now, since we have calculated the correct size, why don't we
    // fill in the biSizeImage field (this will fix any .BMP files which
    // have this field incorrect).

    lpBI->biSizeImage = dwBmBitsSize;
  }

  // Calculate the file size by adding the DIB size to sizeof(BITMAPFILEHEADER)

  bmfHdr.bfSize = nDIBSize + sizeof(BITMAPFILEHEADER);
  bmfHdr.bfReserved1 = 0;
  bmfHdr.bfReserved2 = 0;

  /*
   * Now, calculate the offset the actual bitmap bits will be in
   * the file -- It's the Bitmap file header plus the DIB header,
   * plus the size of the color table.
   */
  bmfHdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + lpBI->biSize
                        + PaletteSize((LPSTR)lpBI);
  TRY
  {
    // Write the file header
    file.Write((LPSTR)&bmfHdr, sizeof(BITMAPFILEHEADER));
    //
    // Write the DIB header and the bits
    //
    file.Write(lpBI, nDIBSize);
  }
  CATCH (CFileException, e)
  {
    ::GlobalUnlock((HGLOBAL) hDib);
    THROW_LAST();
  }
  END_CATCH

  ::GlobalUnlock((HGLOBAL) hDib);
  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibdoc.cpp File Reference

  • general
  • diblook

dibdoc.cpp File Reference

#include "stdafx.h"
#include "diblook.h"
#include <limits.h>
#include "dibdoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibdoc.h File Reference

  • general
  • diblook
Classes

dibdoc.h File Reference

#include "dibapi.h"

Go to the source code of this file.

Classes

class CDibDoc
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/diblook.cpp File Reference

  • general
  • diblook
Classes | Variables

diblook.cpp File Reference

#include "stdafx.h"
#include "diblook.h"
#include "mainfrm.h"
#include "dibdoc.h"
#include "dibview.h"

Go to the source code of this file.

Classes

class | CAboutDlg

Variables

CDibLookApp NEAR | theApp

Variable Documentation

CDibLookApp NEAR theApp

Definition at line 49 of file diblook.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/diblook.h File Reference

  • general
  • diblook
Classes | Defines

diblook.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CDibLookApp

Defines

#define | WM_DOREALIZE (WM_USER + 0)

Define Documentation

#define WM_DOREALIZE (WM_USER + 0)

Definition at line 18 of file diblook.h.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibview.cpp File Reference

  • general
  • diblook

dibview.cpp File Reference

#include "stdafx.h"
#include "diblook.h"
#include "dibdoc.h"
#include "dibview.h"
#include "dibapi.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibview.h File Reference

  • general
  • diblook
Classes

dibview.h File Reference

Go to the source code of this file.

Classes

class CDibView
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/mainfrm.cpp File Reference

  • general
  • diblook

mainfrm.cpp File Reference

#include "stdafx.h"
#include "diblook.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/mainfrm.h File Reference

  • general
  • diblook
Classes

mainfrm.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/myfile.cpp File Reference

  • general
  • diblook
Defines | Functions

myfile.cpp File Reference

#include "stdafx.h"
#include <math.h>
#include <io.h>
#include <direct.h>
#include "dibapi.h"

Go to the source code of this file.

Defines

#define | DIB_HEADER_MARKER ((WORD) ('M' << 8) | 'B')

Functions

HDIB WINAPI | ReadDIBFile (CFile &file)
BOOL WINAPI | SaveDIB (HDIB hDib, CFile &file)

Define Documentation

#define DIB_HEADER_MARKER ((WORD) ('M' << 8) | 'B')

Definition at line 28 of file myfile.cpp.

Function Documentation

HDIB WINAPI ReadDIBFile ( CFile & file )

Definition at line 171 of file myfile.cpp.

{
  BITMAPFILEHEADER bmfHeader;
  UINT nBitsSize;
  HDIB hDIB;
  LPSTR pDIB;

  /*
   * get length of DIB in bytes for use when reading
   */

  nBitsSize = (UINT)file.GetLength();

  /*
   * Go read the DIB file header and check if it's valid.
   */
  if (file.Read((LPSTR)&bmfHeader, sizeof(bmfHeader)) != sizeof(bmfHeader))
    return NULL;

  if (bmfHeader.bfType != DIB_HEADER_MARKER)
    return NULL;

  /*
   * Allocate memory for DIB
   */
  hDIB = (HDIB) ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, (DWORD)nBitsSize);
  if (hDIB == 0)
  {
    return NULL;
  }
  pDIB = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);

  /*
   * Go read the bits.
   */
  if (file.Read(pDIB, nBitsSize - sizeof(BITMAPFILEHEADER)) !=
    nBitsSize - sizeof(BITMAPFILEHEADER) )
  {
    ::GlobalUnlock((HGLOBAL) hDIB);
    ::GlobalFree((HGLOBAL) hDIB);
    return NULL;
  }
  ::GlobalUnlock((HGLOBAL) hDIB);
  return hDIB;
}

BOOL WINAPI SaveDIB | ( | HDIB | hDib,
 |  | CFile & | file
 | ) |  |

Definition at line 49 of file myfile.cpp.

{
  BITMAPFILEHEADER bmfHdr; // Header for Bitmap file
  LPBITMAPINFOHEADER lpBI;   // Pointer to DIB info structure
  UINT nDIBSize;

  if (hDib == NULL)
    return FALSE;

  /*
   * Get a pointer to the DIB memory, the first of which contains
   * a BITMAPINFO structure
   */
  lpBI = (LPBITMAPINFOHEADER) ::GlobalLock((HGLOBAL) hDib);
  if (lpBI == NULL)
    return FALSE;

  if (!IS_WIN30_DIB(lpBI))
  {
    ::GlobalUnlock((HGLOBAL) hDib);
    return FALSE;       // It's an other-style DIB (save not supported)
  }

  /*
   * Fill in the fields of the file header
   */

  /* Fill in file type (first 2 bytes must be "BM" for a bitmap) */
  bmfHdr.bfType = DIB_HEADER_MARKER;  // "BM"

  // Calculating the size of the DIB is a bit tricky (if we want to
  // do it right).  The easiest way to do this is to call GlobalSize()
  // on our global handle, but since the size of our global memory may have
  // been padded a few bytes, we may end up writing out a few too
  // many bytes to the file (which may cause problems with some apps).
  //
  // So, instead let's calculate the size manually (if we can)
  //
  // First, find size of header plus size of color table.  Since the
  // first DWORD in both BITMAPINFOHEADER and BITMAPCOREHEADER conains
  // the size of the structure, let's use this.

  nDIBSize = *(LPDWORD)lpBI + ::PaletteSize((LPSTR)lpBI);  // Partial Calculation

  // Now calculate the size of the image

  if ((lpBI->biCompression == BI_RLE8) || (lpBI->biCompression == BI_RLE4))
  {
    // It's an RLE bitmap, we can't calculate size, so trust the
    // biSizeImage field

    nDIBSize += lpBI->biSizeImage;
  }
  else
  {
    DWORD dwBmBitsSize;  // Size of Bitmap Bits only

    // It's not RLE, so size is Width (DWORD aligned) * Height

    dwBmBitsSize = WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount)) * lpBI->biHeight;

    nDIBSize += dwBmBitsSize;

    // Now, since we have calculated the correct size, why don't we
    // fill in the biSizeImage field (this will fix any .BMP files which
    // have this field incorrect).

    lpBI->biSizeImage = dwBmBitsSize;
  }

  // Calculate the file size by adding the DIB size to sizeof(BITMAPFILEHEADER)

  bmfHdr.bfSize = nDIBSize + sizeof(BITMAPFILEHEADER);
  bmfHdr.bfReserved1 = 0;
  bmfHdr.bfReserved2 = 0;

  /*
   * Now, calculate the offset the actual bitmap bits will be in
   * the file -- It's the Bitmap file header plus the DIB header,
   * plus the size of the color table.
   */
  bmfHdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + lpBI->biSize
                        + PaletteSize((LPSTR)lpBI);
  TRY
  {
    // Write the file header
    file.Write((LPSTR)&bmfHdr, sizeof(BITMAPFILEHEADER));
    //
    // Write the DIB header and the bits
    //
    file.Write(lpBI, nDIBSize);
  }
  CATCH (CFileException, e)
  {
    ::GlobalUnlock((HGLOBAL) hDib);
    THROW_LAST();
  }
  END_CATCH

  ::GlobalUnlock((HGLOBAL) hDib);
  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/resource.h File Reference

  • general
  • diblook
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDD_ABOUTBOX 100
#define | IDR_DIBTYPE 3
#define | IDR_MAINFRAME 2
#define | IDS_CANNOT_LOAD_DIB 5
#define | IDS_CANNOT_SAVE_DIB 6
#define | IDS_DIB_TOO_BIG 4

Define Documentation

#define IDD_ABOUTBOX 100

Definition at line 10 of file resource.h.

#define IDR_DIBTYPE 3

Definition at line 6 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

#define IDS_CANNOT_LOAD_DIB 5

Definition at line 8 of file resource.h.

#define IDS_CANNOT_SAVE_DIB 6

Definition at line 9 of file resource.h.

#define IDS_DIB_TOO_BIG 4

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/stdafx.cpp File Reference

  • general
  • diblook

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/stdafx.h File Reference

  • general
  • diblook
Defines

stdafx.h File Reference

#include <afxwin.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Aboutdlg.cpp File Reference

  • general
  • dlgcbr32

Aboutdlg.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "aboutdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Aboutdlg.h File Reference

  • general
  • dlgcbr32
Classes

Aboutdlg.h File Reference

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgbars.cpp File Reference

  • general
  • dlgcbr32

Dlgbars.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include "dlgbars.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgbars.h File Reference

  • general
  • dlgcbr32
Classes

Dlgbars.h File Reference

Go to the source code of this file.

Classes

class | CDlgStatusBar
class | CDlgToolBar
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgcbar.cpp File Reference

  • general
  • dlgcbr32
Variables

Dlgcbar.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "dlgcbar.h"
#include "aboutdlg.h"
#include "wndlist.h"

Go to the source code of this file.

Variables

CTheApp theApp

Variable Documentation

CTheApp theApp

Definition at line 28 of file Dlgcbar.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgcbar.h File Reference

  • general
  • dlgcbr32
Classes

Dlgcbar.h File Reference

Go to the source code of this file.

Classes

class CTheApp
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Mdlsmain.cpp File Reference

  • general
  • dlgcbr32

Mdlsmain.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include "mdlsmain.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Mdlsmain.h File Reference

  • general
  • dlgcbr32
Classes

Mdlsmain.h File Reference

#include "modeless.h"
#include "dlgbars.h"
#include "modeless.h"

Go to the source code of this file.

Classes

class CModelessMain
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Modeless.cpp File Reference

  • general
  • dlgcbr32

Modeless.cpp File Reference

#include "stdafx.h"
#include "modeless.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Modeless.h File Reference

  • general
  • dlgcbr32
Classes

Modeless.h File Reference

Go to the source code of this file.

Classes

class CModelessDialog
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Ratedlg.cpp File Reference

  • general
  • dlgcbr32

Ratedlg.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "ratedlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Ratedlg.h File Reference

  • general
  • dlgcbr32
Classes

Ratedlg.h File Reference

Go to the source code of this file.

Classes

class CRateDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/resource.h File Reference

  • general
  • dlgcbr32
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | AFX_IDP_PARSE_INT 0xF110
#define | AFX_IDP_PARSE_INT_RANGE 0xF112
#define | AFX_IDP_PARSE_REAL 0xF111
#define | AFX_IDP_PARSE_REAL_RANGE 0xF113
#define | AFX_IDP_PARSE_STRING_SIZE 0xF114
#define | AFX_IDS_IDLEMESSAGE 0xE001
#define | AFX_IDS_MDICHILD 0xEF1F
#define | AFX_IDS_SCCLOSE 0xEF06
#define | AFX_IDS_SCMAXIMIZE 0xEF03
#define | AFX_IDS_SCMINIMIZE 0xEF02
#define | AFX_IDS_SCMOVE 0xEF01
#define | AFX_IDS_SCNEXTWINDOW 0xEF04
#define | AFX_IDS_SCPREVWINDOW 0xEF05
#define | AFX_IDS_SCRESTORE 0xEF12
#define | AFX_IDS_SCSIZE 0xEF00
#define | AFX_IDS_SCTASKLIST 0xEF13
#define | ID_APP_EXIT 0xE141
#define | ID_BUTTON40001 40001
#define | ID_BUTTON40002 40002
#define | ID_BUTTON40003 40003
#define | ID_BUTTON40004 40004
#define | ID_BUTTON40005 40005
#define | ID_HELP_ABOUT 40003
#define | ID_INDICATOR_TIME 59142
#define | ID_OPTION_NOW 40001
#define | ID_OPTION_RATE 40002
#define | ID_VIEW_STATUS_BAR 0xE801
#define | ID_VIEW_TOOLBAR 0xE800
#define | IDC_CLASS 1001
#define | IDC_INTERVAL 1014
#define | IDC_MODULE 1002
#define | IDC_PARENT 1003
#define | IDC_RECT 1004
#define | IDC_STYLE 1005
#define | IDC_WNDLIST 1000
#define | IDD_ABOUT 105
#define | IDD_RATE 106
#define | IDP_NOTIMER 1
#define | IDR_MAIN 102
#define | IDR_TOOLBAR1 105

Define Documentation

#define AFX_IDP_PARSE_INT 0xF110

Definition at line 40 of file resource.h.

#define AFX_IDP_PARSE_INT_RANGE 0xF112

Definition at line 42 of file resource.h.

#define AFX_IDP_PARSE_REAL 0xF111

Definition at line 41 of file resource.h.

#define AFX_IDP_PARSE_REAL_RANGE 0xF113

Definition at line 43 of file resource.h.

#define AFX_IDP_PARSE_STRING_SIZE 0xF114

Definition at line 44 of file resource.h.

#define AFX_IDS_IDLEMESSAGE 0xE001

Definition at line 25 of file resource.h.

#define AFX_IDS_MDICHILD 0xEF1F

Definition at line 39 of file resource.h.

#define AFX_IDS_SCCLOSE 0xEF06

Definition at line 36 of file resource.h.

#define AFX_IDS_SCMAXIMIZE 0xEF03

Definition at line 33 of file resource.h.

#define AFX_IDS_SCMINIMIZE 0xEF02

Definition at line 32 of file resource.h.

#define AFX_IDS_SCMOVE 0xEF01

Definition at line 31 of file resource.h.

#define AFX_IDS_SCNEXTWINDOW 0xEF04

Definition at line 34 of file resource.h.

#define AFX_IDS_SCPREVWINDOW 0xEF05

Definition at line 35 of file resource.h.

#define AFX_IDS_SCRESTORE 0xEF12

Definition at line 37 of file resource.h.

#define AFX_IDS_SCSIZE 0xEF00

Definition at line 30 of file resource.h.

#define AFX_IDS_SCTASKLIST 0xEF13

Definition at line 38 of file resource.h.

#define ID_APP_EXIT 0xE141

Definition at line 26 of file resource.h.

#define ID_BUTTON40001 40001

Definition at line 18 of file resource.h.

#define ID_BUTTON40002 40002

Definition at line 20 of file resource.h.

#define ID_BUTTON40003 40003

Definition at line 22 of file resource.h.

#define ID_BUTTON40004 40004

Definition at line 23 of file resource.h.

#define ID_BUTTON40005 40005

Definition at line 24 of file resource.h.

#define ID_HELP_ABOUT 40003

Definition at line 21 of file resource.h.

#define ID_INDICATOR_TIME 59142

Definition at line 27 of file resource.h.

#define ID_OPTION_NOW 40001

Definition at line 17 of file resource.h.

#define ID_OPTION_RATE 40002

Definition at line 19 of file resource.h.

#define ID_VIEW_STATUS_BAR 0xE801

Definition at line 29 of file resource.h.

#define ID_VIEW_TOOLBAR 0xE800

Definition at line 28 of file resource.h.

#define IDC_CLASS 1001

Definition at line 11 of file resource.h.

#define IDC_INTERVAL 1014

Definition at line 16 of file resource.h.

#define IDC_MODULE 1002

Definition at line 12 of file resource.h.

#define IDC_PARENT 1003

Definition at line 13 of file resource.h.

#define IDC_RECT 1004

Definition at line 14 of file resource.h.

#define IDC_STYLE 1005

Definition at line 15 of file resource.h.

#define IDC_WNDLIST 1000

Definition at line 10 of file resource.h.

#define IDD_ABOUT 105

Definition at line 7 of file resource.h.

#define IDD_RATE 106

Definition at line 9 of file resource.h.

#define IDP_NOTIMER 1

Definition at line 5 of file resource.h.

#define IDR_MAIN 102

Definition at line 6 of file resource.h.

#define IDR_TOOLBAR1 105

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/STDAFX.CPP File Reference

  • general
  • dlgcbr32

STDAFX.CPP File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/STDAFX.H File Reference

  • general
  • dlgcbr32

STDAFX.H File Reference

#include <afxwin.h>
#include <afxext.h>
#include <atlbase.h>
#include <atlwin.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Wndlist.cpp File Reference

  • general
  • dlgcbr32
Functions

Wndlist.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include "resource.h"
#include "wndlist.h"
#include "ratedlg.h"

Go to the source code of this file.

Functions

BOOL CALLBACK EnumWindowsProc (HWND hwnd, LPARAM lParam)

Function Documentation

BOOL CALLBACK EnumWindowsProc | ( | HWND | hwnd,
 |  | LPARAM | lParam
 | ) |  |

Definition at line 155 of file Wndlist.cpp.

{
  static TCHAR szBuffer[90];
  static TCHAR szTemp[80];

  static TCHAR szFormat[] = _T("%08lX: %s");
  HWND hwndListBox = (HWND)lParam;
  CListBox* plb = (CListBox*)CWnd::FromHandle(hwndListBox);

  GetWindowText(hwnd, szTemp, sizeof(szTemp));
  _stprintf_s(szBuffer, 90, szFormat, hwnd, szTemp);

  return (plb->AddString(szBuffer) >= 0) ? TRUE : FALSE;
}

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Wndlist.h File Reference

  • general
  • dlgcbr32
Classes

Wndlist.h File Reference

#include "mdlsmain.h"

Go to the source code of this file.

Classes

class CWndListDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/dlgtemp.cpp File Reference

  • general
  • dlgtempl
Variables

dlgtemp.cpp File Reference

#include "stdafx.h"
#include "dlgtemp.h"
#include "setupdlg.h"

Go to the source code of this file.

Variables

CDlgtempApp theApp

Variable Documentation

CDlgtempApp theApp

Definition at line 46 of file dlgtemp.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/dlgtemp.h File Reference

  • general
  • dlgtempl
Classes

dlgtemp.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDlgtempApp
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/itemtemp.cpp File Reference

  • general
  • dlgtempl
Defines

itemtemp.cpp File Reference

#include "stdafx.h"
#include "itemtemp.h"
#include "resource.h"

Go to the source code of this file.

Defines

#define SETRECT(rect, l, t, r, b)

Define Documentation

#define SETRECT | ( | rect,
 |  | l,
 |  | t,
 |  | r,
 |  | b
 | ) |
Value:
rect.left = l; \
  rect.top = t; \
  rect.right = r; \
  rect.bottom = b;

Definition at line 18 of file itemtemp.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/itemtemp.h File Reference

  • general
  • dlgtempl
Classes | Defines

itemtemp.h File Reference

Go to the source code of this file.

Classes

class | CDialogItem
class | CMyDialogTemplate

Defines

#define | IBUTTON 0
#define | IEDITCONTROL 1
#define | ISTATICTEXT 2
#define | TOTALITEMS 3

Define Documentation

#define IBUTTON 0

Definition at line 22 of file itemtemp.h.

#define IEDITCONTROL 1

Definition at line 23 of file itemtemp.h.

#define ISTATICTEXT 2

Definition at line 24 of file itemtemp.h.

#define TOTALITEMS 3

Definition at line 20 of file itemtemp.h.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/resource.h File Reference

  • general
  • dlgtempl
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_BUTTON 1011
#define | IDC_CAPTION 1010
#define | IDC_DEMOIT 1015
#define | IDC_EDITCONTROL 1012
#define | IDC_HEIGHT 1009
#define | IDC_MYBUTTON 1018
#define | IDC_MYEDITCONTROL 1020
#define | IDC_MYSTATICTEXT 1019
#define | IDC_SELECTEDITEM 1016
#define | IDC_STATICTEXT 1013
#define | IDC_TERMINATE 1014
#define | IDC_WIDTH 1008
#define | IDC_XPOS 1017
#define | IDC_YPOS 1007
#define | IDD_ABOUTBOX 100
#define | IDD_DLGTEMP_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101

Define Documentation

#define IDC_BUTTON 1011

Definition at line 14 of file resource.h.

#define IDC_CAPTION 1010

Definition at line 13 of file resource.h.

#define IDC_DEMOIT 1015

Definition at line 18 of file resource.h.

#define IDC_EDITCONTROL 1012

Definition at line 15 of file resource.h.

#define IDC_HEIGHT 1009

Definition at line 12 of file resource.h.

#define IDC_MYBUTTON 1018

Definition at line 21 of file resource.h.

#define IDC_MYEDITCONTROL 1020

Definition at line 23 of file resource.h.

#define IDC_MYSTATICTEXT 1019

Definition at line 22 of file resource.h.

#define IDC_SELECTEDITEM 1016

Definition at line 19 of file resource.h.

#define IDC_STATICTEXT 1013

Definition at line 16 of file resource.h.

#define IDC_TERMINATE 1014

Definition at line 17 of file resource.h.

#define IDC_WIDTH 1008

Definition at line 11 of file resource.h.

#define IDC_XPOS 1017

Definition at line 20 of file resource.h.

#define IDC_YPOS 1007

Definition at line 10 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_DLGTEMP_DIALOG 102

Definition at line 8 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/setupdlg.cpp File Reference

  • general
  • dlgtempl
Classes

setupdlg.cpp File Reference

#include "stdafx.h"
#include "dlgtemp.h"
#include "setupdlg.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/setupdlg.h File Reference

  • general
  • dlgtempl
Classes

setupdlg.h File Reference

#include "itemtemp.h"

Go to the source code of this file.

Classes

class CDlgtempDlg
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/stdafx.cpp File Reference

  • general
  • dlgtempl

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/stdafx.h File Reference

  • general
  • dlgtempl
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>
#include <winnls.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockdoc.cpp File Reference

  • general
  • docktool

dockdoc.cpp File Reference

#include "stdafx.h"
#include "docktool.h"
#include "dockdoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockdoc.h File Reference

  • general
  • docktool
Classes

dockdoc.h File Reference

Go to the source code of this file.

Classes

class CDockDoc
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/docktool.cpp File Reference

  • general
  • docktool
Classes | Variables

docktool.cpp File Reference

#include "stdafx.h"
#include "docktool.h"
#include "mainfrm.h"
#include "dockdoc.h"
#include "dockvw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CDockApp theApp

Variable Documentation

CDockApp theApp

Definition at line 50 of file docktool.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/docktool.h File Reference

  • general
  • docktool
Classes

docktool.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDockApp
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockvw.cpp File Reference

  • general
  • docktool

dockvw.cpp File Reference

#include "stdafx.h"
#include "docktool.h"
#include "dockdoc.h"
#include "dockvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockvw.h File Reference

  • general
  • docktool
Classes

dockvw.h File Reference

Go to the source code of this file.

Classes

class CDockView
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/editbar.cpp File Reference

  • general
  • docktool
Defines

editbar.cpp File Reference

#include "stdafx.h"
#include "docktool.h"
#include "editbar.h"

Go to the source code of this file.

Defines

#define | COMBOBOX_BITMAP 4
#define | COMBOBOX_HEIGHT 150
#define | COMBOBOX_INDEX 5
#define | COMBOBOX_WIDTH 150

Define Documentation

#define COMBOBOX_BITMAP 4

Definition at line 24 of file editbar.cpp.

#define COMBOBOX_HEIGHT 150

Definition at line 23 of file editbar.cpp.

#define COMBOBOX_INDEX 5

Definition at line 21 of file editbar.cpp.

#define COMBOBOX_WIDTH 150

Definition at line 22 of file editbar.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/editbar.h File Reference

  • general
  • docktool
Classes

editbar.h File Reference

#include "searchbx.h"

Go to the source code of this file.

Classes

class CEditBar
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/mainfrm.cpp File Reference

  • general
  • docktool

mainfrm.cpp File Reference

#include "stdafx.h"
#include "docktool.h"
#include "tooldlg.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/mainfrm.h File Reference

  • general
  • docktool
Classes

mainfrm.h File Reference

#include "palette.h"
#include "editbar.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/palette.cpp File Reference

  • general
  • docktool

palette.cpp File Reference

#include "stdafx.h"
#include "palette.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/palette.h File Reference

  • general
  • docktool
Classes

palette.h File Reference

Go to the source code of this file.

Classes

class CPaletteBar
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/resource.h File Reference

  • general
  • docktool
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BROWSE_CLASSGRAPH 32804
#define | ID_BROWSE_FILEOUTLINE 32803
#define | ID_BROWSE_GOTODEFINITION 32801
#define | ID_BROWSE_GOTOREFERENCE 32802
#define | ID_BROWSE_REVERSECLASSGRAPH 32805
#define | ID_DEBUG_CALLSTACK 32799
#define | ID_DEBUG_DISASSEMBLY 32800
#define | ID_DEBUG_LOCALS 32796
#define | ID_DEBUG_MEMORY 32798
#define | ID_DEBUG_QUICKWATCH 32794
#define | ID_DEBUG_REGISTERS 32797
#define | ID_DEBUG_RESTART 32788
#define | ID_DEBUG_RUNTOCURSOR 32793
#define | ID_DEBUG_STEPINTO 32790
#define | ID_DEBUG_STEPOUT 32791
#define | ID_DEBUG_STEPOVER 32792
#define | ID_DEBUG_STOPDEBUGGING 32789
#define | ID_DEBUG_WATCH 32795
#define | ID_EDIT_BM_CLEARALL 32777
#define | ID_EDIT_BM_NEXT 32775
#define | ID_EDIT_BM_PREV 32776
#define | ID_EDIT_BM_TOGGLE 32774
#define | ID_EDIT_FINDINFILES 32778
#define | ID_EDIT_INDENT 32779
#define | ID_EDIT_UNINDENT 32780
#define | ID_PALETTE_AIRBRUSH 32813
#define | ID_PALETTE_BRUSH 32811
#define | ID_PALETTE_ERASE 32808
#define | ID_PALETTE_EYEDROP 32816
#define | ID_PALETTE_FILL 32814
#define | ID_PALETTE_FRAME 32819
#define | ID_PALETTE_LINE 32815
#define | ID_PALETTE_OVAL 32820
#define | ID_PALETTE_PEN 32809
#define | ID_PALETTE_RECTANGLE 32818
#define | ID_PALETTE_SELECT 32810
#define | ID_PALETTE_ZOOM 32817
#define | ID_RESOURCE_NEWACCELERATORTABLE 32786
#define | ID_RESOURCE_NEWBITMAP 32784
#define | ID_RESOURCE_NEWCURSOR 32782
#define | ID_RESOURCE_NEWICON 32783
#define | ID_RESOURCE_NEWMENU 32781
#define | ID_RESOURCE_NEWSTRINGTABLE 32785
#define | ID_RESOURCE_NEWVERSION 32787
#define | ID_RETURN 32821
#define | ID_TOOLBARS_BROWSE 32823
#define | ID_TOOLBARS_DEBUG 32824
#define | ID_TOOLBARS_EDIT 32825
#define | ID_TOOLBARS_MAIN 32822
#define | ID_TOOLBARS_PALETTE 32826
#define | ID_TOOLBARS_RESOURCE 32827
#define | ID_TOOLS_TOOLBAR 32806
#define | IDB_BITMAP1 136
#define | IDB_PALETTE 106
#define | IDC_BROWSE 1004
#define | IDC_BW 1015
#define | IDC_COLOR 1013
#define | IDC_DEBUG 1001
#define | IDC_EDIT 1003
#define | IDC_EDITBAR_SEARCHBOX 101
#define | IDC_FOUR 1011
#define | IDC_HIDE 1007
#define | IDC_MAIN 1000
#define | IDC_PALETTE 1005
#define | IDC_RESOURCE 1002
#define | IDC_SHOW 1006
#define | IDC_SIX 1012
#define | IDC_THREE 1016
#define | IDC_TWO 1014
#define | IDD_ABOUTBOX 100
#define | IDD_TOOLBAR 135
#define | IDR_BROWSEBAR 133
#define | IDR_COLOR_BROWSEBAR 133
#define | IDR_COLOR_DEBUGBAR 134
#define | IDR_COLOR_EDITBAR 132
#define | IDR_COLOR_EDITBARHORZ 141
#define | IDR_COLOR_EDITBARVERT 132
#define | IDR_COLOR_MAINBAR 137
#define | IDR_COLOR_PALETTEBAR 148
#define | IDR_COLOR_RESOURCEBAR 131
#define | IDR_DEBUGBAR 134
#define | IDR_EDITBAR 132
#define | IDR_EDITBARHORZ 136
#define | IDR_EDITBARVERT 132
#define | IDR_MAINFRAME 128
#define | IDR_MONO_BROWSEBAR 147
#define | IDR_MONO_DEBUGBAR 140
#define | IDR_MONO_EDITBAR 142
#define | IDR_MONO_EDITBARHORZ 136
#define | IDR_MONO_EDITBARVERT 142
#define | IDR_MONO_MAINBAR 143
#define | IDR_MONO_PALETTEBAR 149
#define | IDR_MONO_RESOURCEBAR 144
#define | IDR_RESOURCEBAR 131
#define | IDR_TEXTTYPE 129
#define | IDR_TOOLBAR 138
#define | IDW_BROWSE_BAR 0xE807
#define | IDW_DEBUG_BAR 0xE805
#define | IDW_EDIT_BAR 0xE806
#define | IDW_MAIN_BAR 0xE800
#define | IDW_PALETTE_BAR 0xE808
#define | IDW_RESOURCE_BAR 0xE804

Define Documentation

#define ID_BROWSE_CLASSGRAPH 32804

Definition at line 79 of file resource.h.

#define ID_BROWSE_FILEOUTLINE 32803

Definition at line 78 of file resource.h.

#define ID_BROWSE_GOTODEFINITION 32801

Definition at line 76 of file resource.h.

#define ID_BROWSE_GOTOREFERENCE 32802

Definition at line 77 of file resource.h.

#define ID_BROWSE_REVERSECLASSGRAPH 32805

Definition at line 80 of file resource.h.

#define ID_DEBUG_CALLSTACK 32799

Definition at line 74 of file resource.h.

#define ID_DEBUG_DISASSEMBLY 32800

Definition at line 75 of file resource.h.

#define ID_DEBUG_LOCALS 32796

Definition at line 71 of file resource.h.

#define ID_DEBUG_MEMORY 32798

Definition at line 73 of file resource.h.

#define ID_DEBUG_QUICKWATCH 32794

Definition at line 69 of file resource.h.

#define ID_DEBUG_REGISTERS 32797

Definition at line 72 of file resource.h.

#define ID_DEBUG_RESTART 32788

Definition at line 63 of file resource.h.

#define ID_DEBUG_RUNTOCURSOR 32793

Definition at line 68 of file resource.h.

#define ID_DEBUG_STEPINTO 32790

Definition at line 65 of file resource.h.

#define ID_DEBUG_STEPOUT 32791

Definition at line 66 of file resource.h.

#define ID_DEBUG_STEPOVER 32792

Definition at line 67 of file resource.h.

#define ID_DEBUG_STOPDEBUGGING 32789

Definition at line 64 of file resource.h.

#define ID_DEBUG_WATCH 32795

Definition at line 70 of file resource.h.

#define ID_EDIT_BM_CLEARALL 32777

Definition at line 52 of file resource.h.

#define ID_EDIT_BM_NEXT 32775

Definition at line 50 of file resource.h.

#define ID_EDIT_BM_PREV 32776

Definition at line 51 of file resource.h.

#define ID_EDIT_BM_TOGGLE 32774

Definition at line 49 of file resource.h.

#define ID_EDIT_FINDINFILES 32778

Definition at line 53 of file resource.h.

#define ID_EDIT_INDENT 32779

Definition at line 54 of file resource.h.

#define ID_EDIT_UNINDENT 32780

Definition at line 55 of file resource.h.

#define ID_PALETTE_AIRBRUSH 32813

Definition at line 86 of file resource.h.

#define ID_PALETTE_BRUSH 32811

Definition at line 85 of file resource.h.

#define ID_PALETTE_ERASE 32808

Definition at line 82 of file resource.h.

#define ID_PALETTE_EYEDROP 32816

Definition at line 89 of file resource.h.

#define ID_PALETTE_FILL 32814

Definition at line 87 of file resource.h.

#define ID_PALETTE_FRAME 32819

Definition at line 92 of file resource.h.

#define ID_PALETTE_LINE 32815

Definition at line 88 of file resource.h.

#define ID_PALETTE_OVAL 32820

Definition at line 93 of file resource.h.

#define ID_PALETTE_PEN 32809

Definition at line 83 of file resource.h.

#define ID_PALETTE_RECTANGLE 32818

Definition at line 91 of file resource.h.

#define ID_PALETTE_SELECT 32810

Definition at line 84 of file resource.h.

#define ID_PALETTE_ZOOM 32817

Definition at line 90 of file resource.h.

#define ID_RESOURCE_NEWACCELERATORTABLE 32786

Definition at line 61 of file resource.h.

#define ID_RESOURCE_NEWBITMAP 32784

Definition at line 59 of file resource.h.

#define ID_RESOURCE_NEWCURSOR 32782

Definition at line 57 of file resource.h.

#define ID_RESOURCE_NEWICON 32783

Definition at line 58 of file resource.h.

#define ID_RESOURCE_NEWMENU 32781

Definition at line 56 of file resource.h.

#define ID_RESOURCE_NEWSTRINGTABLE 32785

Definition at line 60 of file resource.h.

#define ID_RESOURCE_NEWVERSION 32787

Definition at line 62 of file resource.h.

#define ID_RETURN 32821

Definition at line 94 of file resource.h.

#define ID_TOOLBARS_BROWSE 32823

Definition at line 96 of file resource.h.

#define ID_TOOLBARS_DEBUG 32824

Definition at line 97 of file resource.h.

#define ID_TOOLBARS_EDIT 32825

Definition at line 98 of file resource.h.

#define ID_TOOLBARS_MAIN 32822

Definition at line 95 of file resource.h.

#define ID_TOOLBARS_PALETTE 32826

Definition at line 99 of file resource.h.

#define ID_TOOLBARS_RESOURCE 32827

Definition at line 100 of file resource.h.

#define ID_TOOLS_TOOLBAR 32806

Definition at line 81 of file resource.h.

#define IDB_BITMAP1 136

Definition at line 21 of file resource.h.

#define IDB_PALETTE 106

Definition at line 7 of file resource.h.

#define IDC_BROWSE 1004

Definition at line 39 of file resource.h.

#define IDC_BW 1015

Definition at line 47 of file resource.h.

#define IDC_COLOR 1013

Definition at line 45 of file resource.h.

#define IDC_DEBUG 1001

Definition at line 36 of file resource.h.

#define IDC_EDIT 1003

Definition at line 38 of file resource.h.

#define IDC_EDITBAR_SEARCHBOX 101

Definition at line 6 of file resource.h.

#define IDC_FOUR 1011

Definition at line 43 of file resource.h.

#define IDC_HIDE 1007

Definition at line 42 of file resource.h.

#define IDC_MAIN 1000

Definition at line 35 of file resource.h.

#define IDC_PALETTE 1005

Definition at line 40 of file resource.h.

#define IDC_RESOURCE 1002

Definition at line 37 of file resource.h.

#define IDC_SHOW 1006

Definition at line 41 of file resource.h.

#define IDC_SIX 1012

Definition at line 44 of file resource.h.

#define IDC_THREE 1016

Definition at line 48 of file resource.h.

#define IDC_TWO 1014

Definition at line 46 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_TOOLBAR 135

Definition at line 20 of file resource.h.

#define IDR_BROWSEBAR 133

Definition at line 16 of file resource.h.

#define IDR_COLOR_BROWSEBAR 133

Definition at line 17 of file resource.h.

#define IDR_COLOR_DEBUGBAR 134

Definition at line 19 of file resource.h.

#define IDR_COLOR_EDITBAR 132

Definition at line 15 of file resource.h.

#define IDR_COLOR_EDITBARHORZ 141

Definition at line 27 of file resource.h.

#define IDR_COLOR_EDITBARVERT 132

Definition at line 14 of file resource.h.

#define IDR_COLOR_MAINBAR 137

Definition at line 24 of file resource.h.

#define IDR_COLOR_PALETTEBAR 148

Definition at line 33 of file resource.h.

#define IDR_COLOR_RESOURCEBAR 131

Definition at line 11 of file resource.h.

#define IDR_DEBUGBAR 134

Definition at line 18 of file resource.h.

#define IDR_EDITBAR 132

Definition at line 12 of file resource.h.

#define IDR_EDITBARHORZ 136

Definition at line 22 of file resource.h.

#define IDR_EDITBARVERT 132

Definition at line 13 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_MONO_BROWSEBAR 147

Definition at line 32 of file resource.h.

#define IDR_MONO_DEBUGBAR 140

Definition at line 26 of file resource.h.

#define IDR_MONO_EDITBAR 142

Definition at line 29 of file resource.h.

#define IDR_MONO_EDITBARHORZ 136

Definition at line 23 of file resource.h.

#define IDR_MONO_EDITBARVERT 142

Definition at line 28 of file resource.h.

#define IDR_MONO_MAINBAR 143

Definition at line 30 of file resource.h.

#define IDR_MONO_PALETTEBAR 149

Definition at line 34 of file resource.h.

#define IDR_MONO_RESOURCEBAR 144

Definition at line 31 of file resource.h.

#define IDR_RESOURCEBAR 131

Definition at line 10 of file resource.h.

#define IDR_TEXTTYPE 129

Definition at line 9 of file resource.h.

#define IDR_TOOLBAR 138

Definition at line 25 of file resource.h.

#define IDW_BROWSE_BAR 0xE807

Definition at line 105 of file resource.h.

#define IDW_DEBUG_BAR 0xE805

Definition at line 103 of file resource.h.

#define IDW_EDIT_BAR 0xE806

Definition at line 104 of file resource.h.

#define IDW_MAIN_BAR 0xE800

Definition at line 101 of file resource.h.

#define IDW_PALETTE_BAR 0xE808

Definition at line 106 of file resource.h.

#define IDW_RESOURCE_BAR 0xE804

Definition at line 102 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/searchbx.cpp File Reference

  • general
  • docktool

searchbx.cpp File Reference

#include "stdafx.h"
#include "docktool.h"
#include "searchbx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/searchbx.h File Reference

  • general
  • docktool
Classes

searchbx.h File Reference

Go to the source code of this file.

Classes

class CSearchBox
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/stdafx.cpp File Reference

  • general
  • docktool

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/stdafx.h File Reference

  • general
  • docktool
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/tooldlg.cpp File Reference

  • general
  • docktool

tooldlg.cpp File Reference

#include "stdafx.h"
#include "docktool.h"
#include "tooldlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/tooldlg.h File Reference

  • general
  • docktool
Classes

tooldlg.h File Reference

Go to the source code of this file.

Classes

class CToolDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/coloropt.cpp File Reference

  • general
  • dynamenu

coloropt.cpp File Reference

#include "stdafx.h"
#include "dynamenu.h"
#include "coloropt.h"
#include "dmdoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/coloropt.h File Reference

  • general
  • dynamenu
Classes

coloropt.h File Reference

Go to the source code of this file.

Classes

class CColorOptDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmdoc.cpp File Reference

  • general
  • dynamenu
Defines

dmdoc.cpp File Reference

#include "stdafx.h"
#include "dynamenu.h"
#include "dmdoc.h"
#include "coloropt.h"
#include "mdichild.h"

Go to the source code of this file.

Defines

#define new DEBUG_NEW

Define Documentation

#define new DEBUG_NEW

Definition at line 61 of file dmdoc.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmdoc.h File Reference

  • general
  • dynamenu
Classes | Variables

dmdoc.h File Reference

Go to the source code of this file.

Classes

class | CDynaMenuDoc
struct | DynaMenuDef

Variables

const int | MAX_COLORLEN = 20
const int | NUM_TEXTCOLOR = 4

Variable Documentation

const int MAX_COLORLEN = 20

Definition at line 32 of file dmdoc.h.

const int NUM_TEXTCOLOR = 4

Definition at line 29 of file dmdoc.h.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmview.cpp File Reference

  • general
  • dynamenu

dmview.cpp File Reference

#include "stdafx.h"
#include "dynamenu.h"
#include "dmdoc.h"
#include "dmview.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmview.h File Reference

  • general
  • dynamenu
Classes

dmview.h File Reference

Go to the source code of this file.

Classes

class CDynaMenuView
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dynamenu.cpp File Reference

  • general
  • dynamenu
Classes | Variables

dynamenu.cpp File Reference

#include "stdafx.h"
#include "dynamenu.h"
#include "mainfrm.h"
#include "dmdoc.h"
#include "dmview.h"
#include "mdichild.h"

Go to the source code of this file.

Classes

class | CAboutDlg

Variables

CDynaMenuApp NEAR | theApp

Variable Documentation

CDynaMenuApp NEAR theApp

Definition at line 62 of file dynamenu.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dynamenu.h File Reference

  • general
  • dynamenu
Classes

dynamenu.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDynaMenuApp
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mainfrm.cpp File Reference

  • general
  • dynamenu

mainfrm.cpp File Reference

#include "stdafx.h"
#include "dynamenu.h"
#include "mainfrm.h"
#include "dmdoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mainfrm.h File Reference

  • general
  • dynamenu
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mdichild.cpp File Reference

  • general
  • dynamenu

mdichild.cpp File Reference

#include "stdafx.h"
#include "dynamenu.h"
#include "mdichild.h"
#include "dmdoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mdichild.h File Reference

  • general
  • dynamenu
Classes

mdichild.h File Reference

Go to the source code of this file.

Classes

class CDynaMDIChildWnd
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/resource.h File Reference

  • general
  • dynamenu
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_COLOR1 32772
#define | ID_COLOR2 32773
#define | ID_COLOR3 32774
#define | ID_COLOR4 32775
#define | ID_COLOR_OPTIONS 32771
#define | IDC_COLOR1 1000
#define | IDC_COLOR2 1001
#define | IDC_COLOR3 1002
#define | IDC_COLOR4 1003
#define | IDD_ABOUTBOX 100
#define | IDD_CHANGECOLOR 102
#define | IDR_DYMENUTYPE 129
#define | IDR_MAINFRAME 128
#define | IDS_BLACK 100
#define | IDS_BLUE 103
#define | IDS_COLORHELPFMT 4
#define | IDS_PURPLE 102
#define | IDS_RED 101

Define Documentation

#define ID_COLOR1 32772

Definition at line 19 of file resource.h.

#define ID_COLOR2 32773

Definition at line 20 of file resource.h.

#define ID_COLOR3 32774

Definition at line 21 of file resource.h.

#define ID_COLOR4 32775

Definition at line 22 of file resource.h.

#define ID_COLOR_OPTIONS 32771

Definition at line 18 of file resource.h.

#define IDC_COLOR1 1000

Definition at line 14 of file resource.h.

#define IDC_COLOR2 1001

Definition at line 15 of file resource.h.

#define IDC_COLOR3 1002

Definition at line 16 of file resource.h.

#define IDC_COLOR4 1003

Definition at line 17 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 8 of file resource.h.

#define IDD_CHANGECOLOR 102

Definition at line 11 of file resource.h.

#define IDR_DYMENUTYPE 129

Definition at line 6 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 5 of file resource.h.

#define IDS_BLACK 100

Definition at line 9 of file resource.h.

#define IDS_BLUE 103

Definition at line 13 of file resource.h.

#define IDS_COLORHELPFMT 4

Definition at line 7 of file resource.h.

#define IDS_PURPLE 102

Definition at line 12 of file resource.h.

#define IDS_RED 101

Definition at line 10 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/stdafx.cpp File Reference

  • general
  • dynamenu

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/stdafx.h File Reference

  • general
  • dynamenu
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.cpp File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher

CustomFileDialog.cpp File Reference

#include "stdafx.h"
#include "FileDlgWatcher.h"
#include "CustomFileDialog.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.h File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher
Classes

CustomFileDialog.h File Reference

Go to the source code of this file.

Classes

class CCustomFileDialog
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.cpp File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher
Variables

FileDlgWatcher.cpp File Reference

#include "stdafx.h"
#include "FileDlgWatcher.h"
#include "FileDlgWatcherDlg.h"

Go to the source code of this file.

Variables

CFileDlgWatcherApp theApp

Variable Documentation

CFileDlgWatcherApp theApp

Definition at line 31 of file FileDlgWatcher.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.h File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher
Classes | Variables

FileDlgWatcher.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CFileDlgWatcherApp

Variables

CFileDlgWatcherApp theApp

Variable Documentation

CFileDlgWatcherApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.cpp File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher

FileDlgWatcherDlg.cpp File Reference

#include "stdafx.h"
#include "FileDlgWatcher.h"
#include "FileDlgWatcherDlg.h"
#include "CustomFileDialog.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.h File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher
Classes

FileDlgWatcherDlg.h File Reference

Go to the source code of this file.

Classes

class CFileDlgWatcherDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/resource.h File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_BUTTON1 1007
#define | IDC_CLEAR_LOG 1007
#define | IDC_CREATE_DLG 1000
#define | IDC_EVENT_POPUPS 1005
#define | IDC_LOG 1006
#define | IDC_OPEN_FILE_DLG 1003
#define | IDC_VISTA_STYLE 1004
#define | IDD_FILEDLGWATCHER_DIALOG 102
#define | IDR_MAINFRAME 128

Define Documentation

#define IDC_BUTTON1 1007

Definition at line 12 of file resource.h.

#define IDC_CLEAR_LOG 1007

Definition at line 13 of file resource.h.

#define IDC_CREATE_DLG 1000

Definition at line 7 of file resource.h.

#define IDC_EVENT_POPUPS 1005

Definition at line 10 of file resource.h.

#define IDC_LOG 1006

Definition at line 11 of file resource.h.

#define IDC_OPEN_FILE_DLG 1003

Definition at line 8 of file resource.h.

#define IDC_VISTA_STYLE 1004

Definition at line 9 of file resource.h.

#define IDD_FILEDLGWATCHER_DIALOG 102

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/stdafx.cpp File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/stdafx.h File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxdlgs.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/targetver.h File Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/hello.cpp File Reference

  • general
  • hello
Variables

hello.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "hello.h"

Go to the source code of this file.

Variables

CTheApp NEAR theApp

Variable Documentation

CTheApp NEAR theApp

Definition at line 26 of file hello.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/hello.h File Reference

  • general
  • hello
Classes

hello.h File Reference

Go to the source code of this file.

Classes

class | CMainWindow
class | CTheApp
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/resource.h File Reference

  • general
  • hello
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDD_ABOUTBOX 130
#define | IDR_MAINFRAME 128
#define | IDS_HELLO 129

Define Documentation

#define IDD_ABOUTBOX 130

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 5 of file resource.h.

#define IDS_HELLO 129

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/stdafx.cpp File Reference

  • general
  • hello

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/stdafx.h File Reference

  • general
  • hello
Defines

stdafx.h File Reference

#include <afxwin.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 10 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/helloapp/helloapp.cpp File Reference

  • general
  • helloapp
Classes | Variables

helloapp.cpp File Reference

#include <afxwin.h>

Go to the source code of this file.

Classes

class | CHelloApp
class | CHelloWindow

Variables

CHelloApp HelloApp

Variable Documentation

CHelloApp HelloApp

Definition at line 58 of file helloapp.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/LHdrDlg.cpp File Reference

  • general
  • ListHdr
Classes

LHdrDlg.cpp File Reference

#include "stdafx.h"
#include "ListHdr.h"
#include "LHdrDlg.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/LHdrDlg.h File Reference

  • general
  • ListHdr
Classes

LHdrDlg.h File Reference

#include "mlistctl.h"

Go to the source code of this file.

Classes

class CListHdrDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/ListHdr.cpp File Reference

  • general
  • ListHdr
Variables

ListHdr.cpp File Reference

#include "stdafx.h"
#include "ListHdr.h"
#include "LHdrDlg.h"

Go to the source code of this file.

Variables

CListHdrApp theApp

Variable Documentation

CListHdrApp theApp

Definition at line 41 of file ListHdr.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/ListHdr.h File Reference

  • general
  • ListHdr
Classes

ListHdr.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CListHdrApp
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/mlistctl.cpp File Reference

  • general
  • ListHdr

mlistctl.cpp File Reference

#include "stdafx.h"
#include "listhdr.h"
#include "mlistctl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/mlistctl.h File Reference

  • general
  • ListHdr
Classes

mlistctl.h File Reference

Go to the source code of this file.

Classes

class CMyListCtrl
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/resource.h File Reference

  • general
  • ListHdr
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDABOUT 1017
#define | IDC_ALIGN 1011
#define | IDC_AUTOARRANGE 1002
#define | IDC_BUTTON1 1015
#define | IDC_EDITLABELS 1006
#define | IDC_HOVER 1004
#define | IDC_LISTVIEW1 1001
#define | IDC_MYHOTCUR 1013
#define | IDC_NOCOLUMNHEADER 1007
#define | IDC_NOLABELWRAP 1005
#define | IDC_NOSORTHEADER 1008
#define | IDC_SINGLESEL 1003
#define | IDC_SORT 1012
#define | IDC_SPYGLASS 130
#define | IDC_STDHOTCUR 1009
#define | IDC_VIEWMODE 1010
#define | IDC_WORKAREAS 1014
#define | IDD_ABOUTBOX 100
#define | IDD_LISTHDR_DIALOG 102
#define | IDI_HDRICON1 130
#define | IDI_HDRICON2 136
#define | IDI_ICONLIST1 132
#define | IDI_ICONLIST2 133
#define | IDI_ICONLIST3 134
#define | IDI_ICONLIST4 135
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101

Define Documentation

#define IDABOUT 1017

Definition at line 32 of file resource.h.

#define IDC_ALIGN 1011

Definition at line 27 of file resource.h.

#define IDC_AUTOARRANGE 1002

Definition at line 18 of file resource.h.

#define IDC_BUTTON1 1015

Definition at line 31 of file resource.h.

#define IDC_EDITLABELS 1006

Definition at line 22 of file resource.h.

#define IDC_HOVER 1004

Definition at line 20 of file resource.h.

#define IDC_LISTVIEW1 1001

Definition at line 17 of file resource.h.

#define IDC_MYHOTCUR 1013

Definition at line 29 of file resource.h.

#define IDC_NOCOLUMNHEADER 1007

Definition at line 23 of file resource.h.

#define IDC_NOLABELWRAP 1005

Definition at line 21 of file resource.h.

#define IDC_NOSORTHEADER 1008

Definition at line 24 of file resource.h.

#define IDC_SINGLESEL 1003

Definition at line 19 of file resource.h.

#define IDC_SORT 1012

Definition at line 28 of file resource.h.

#define IDC_SPYGLASS 130

Definition at line 11 of file resource.h.

#define IDC_STDHOTCUR 1009

Definition at line 25 of file resource.h.

#define IDC_VIEWMODE 1010

Definition at line 26 of file resource.h.

#define IDC_WORKAREAS 1014

Definition at line 30 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_LISTHDR_DIALOG 102

Definition at line 8 of file resource.h.

#define IDI_HDRICON1 130

Definition at line 10 of file resource.h.

#define IDI_HDRICON2 136

Definition at line 16 of file resource.h.

#define IDI_ICONLIST1 132

Definition at line 12 of file resource.h.

#define IDI_ICONLIST2 133

Definition at line 13 of file resource.h.

#define IDI_ICONLIST3 134

Definition at line 14 of file resource.h.

#define IDI_ICONLIST4 135

Definition at line 15 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/StdAfx.cpp File Reference

  • general
  • ListHdr

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/StdAfx.h File Reference

  • general
  • ListHdr
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 21 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/bounce.cpp File Reference

  • general
  • mdi
Defines

bounce.cpp File Reference

#include "stdafx.h"
#include "mdi.h"
#include "bounce.h"

Go to the source code of this file.

Defines

#define ABS(x) ((x) < 0? -(x) : (x) > 0? (x) : 0)

Define Documentation

#define ABS ( x ) ((x) < 0? -(x) : (x) > 0? (x) : 0)

Definition at line 17 of file bounce.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/bounce.h File Reference

  • general
  • mdi
Classes

bounce.h File Reference

Go to the source code of this file.

Classes

class CBounceWnd
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/hello.cpp File Reference

  • general
  • mdi

hello.cpp File Reference

#include "stdafx.h"
#include "hello.h"
#include "mdi.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/hello.h File Reference

  • general
  • mdi
Classes

hello.h File Reference

Go to the source code of this file.

Classes

class CHelloWnd
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mainfrm.cpp File Reference

  • general
  • mdi

mainfrm.cpp File Reference

#include "stdafx.h"
#include "bounce.h"
#include "hello.h"
#include "mdi.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mainfrm.h File Reference

  • general
  • mdi
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mdi.cpp File Reference

  • general
  • mdi
Variables

mdi.cpp File Reference

#include "stdafx.h"
#include "mdi.h"
#include "mainfrm.h"

Go to the source code of this file.

Variables

COLORREF NEAR | colorArray []
CMdiApp NEAR | theApp

Variable Documentation

COLORREF NEAR colorArray[]
Initial value:
{
  RGB (0, 0, 0),
  RGB (255, 0, 0),
  RGB (0, 255, 0),
  RGB (0, 0, 255),

}

Definition at line 78 of file mdi.cpp.

CMdiApp NEAR theApp

Definition at line 42 of file mdi.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mdi.h File Reference

  • general
  • mdi
Classes | Variables

mdi.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CMdiApp

Variables

COLORREF NEAR | colorArray []

Variable Documentation

COLORREF NEAR colorArray[]

Definition at line 95 of file mdi.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/resource.h File Reference

  • general
  • mdi
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDD_ABOUTBOX 100
#define | IDI_HELLO 4
#define | IDM_BLACK 20
#define | IDM_BLUE 23
#define | IDM_BOUNCE 10
#define | IDM_CUSTOM 25
#define | IDM_FAST 30
#define | IDM_GREEN 22
#define | IDM_HELLO 11
#define | IDM_RED 21
#define | IDM_SLOW 31
#define | IDM_WHITE 24
#define | IDR_BOUNCE 101
#define | IDR_HELLO 102
#define | IDR_MAINFRAME 2

Define Documentation

#define IDD_ABOUTBOX 100

Definition at line 17 of file resource.h.

#define IDI_HELLO 4

Definition at line 6 of file resource.h.

#define IDM_BLACK 20

Definition at line 9 of file resource.h.

#define IDM_BLUE 23

Definition at line 12 of file resource.h.

#define IDM_BOUNCE 10

Definition at line 7 of file resource.h.

#define IDM_CUSTOM 25

Definition at line 14 of file resource.h.

#define IDM_FAST 30

Definition at line 15 of file resource.h.

#define IDM_GREEN 22

Definition at line 11 of file resource.h.

#define IDM_HELLO 11

Definition at line 8 of file resource.h.

#define IDM_RED 21

Definition at line 10 of file resource.h.

#define IDM_SLOW 31

Definition at line 16 of file resource.h.

#define IDM_WHITE 24

Definition at line 13 of file resource.h.

#define IDR_BOUNCE 101

Definition at line 18 of file resource.h.

#define IDR_HELLO 102

Definition at line 19 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/stdafx.cpp File Reference

  • general
  • mdi

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/stdafx.h File Reference

  • general
  • mdi
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxdlgs.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncDoc.cpp File Reference

  • general
  • mdidocvw

BncDoc.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "BncDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncDoc.h File Reference

  • general
  • mdidocvw
Classes

BncDoc.h File Reference

Go to the source code of this file.

Classes

class CBounceDoc
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncFrm.cpp File Reference

  • general
  • mdidocvw

BncFrm.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "BncFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncFrm.h File Reference

  • general
  • mdidocvw
Classes

BncFrm.h File Reference

Go to the source code of this file.

Classes

class CBounceFrame
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncVw.cpp File Reference

  • general
  • mdidocvw
Defines

BncVw.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "BncDoc.h"
#include "BncVw.h"

Go to the source code of this file.

Defines

#define ABS(x) ((x) < 0? -(x) : (x) > 0? (x) : 0)

Define Documentation

#define ABS ( x ) ((x) < 0? -(x) : (x) > 0? (x) : 0)

Definition at line 25 of file BncVw.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncVw.h File Reference

  • general
  • mdidocvw
Classes

BncVw.h File Reference

Go to the source code of this file.

Classes

class CBounceView
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloDoc.cpp File Reference

  • general
  • mdidocvw

HelloDoc.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "HelloDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloDoc.h File Reference

  • general
  • mdidocvw
Classes

HelloDoc.h File Reference

Go to the source code of this file.

Classes

class CHelloDoc
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloFrm.cpp File Reference

  • general
  • mdidocvw

HelloFrm.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "HelloFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloFrm.h File Reference

  • general
  • mdidocvw
Classes

HelloFrm.h File Reference

Go to the source code of this file.

Classes

class CHelloFrame
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloVw.cpp File Reference

  • general
  • mdidocvw

HelloVw.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "HelloDoc.h"
#include "HelloVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloVw.h File Reference

  • general
  • mdidocvw
Classes

HelloVw.h File Reference

Go to the source code of this file.

Classes

class CHelloView
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mainfrm.cpp File Reference

  • general
  • mdidocvw

mainfrm.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mainfrm.h File Reference

  • general
  • mdidocvw
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mdi.cpp File Reference

  • general
  • mdidocvw
Classes | Variables

mdi.cpp File Reference

#include "stdafx.h"
#include "MDI.h"
#include "MainFrm.h"
#include "HelloFrm.h"
#include "HelloDoc.h"
#include "HelloVw.h"
#include "BncFrm.h"
#include "BncDoc.h"
#include "BncVw.h"

Go to the source code of this file.

Classes

class | CAboutDlg

Variables

COLORREF NEAR | colorArray []
CMDIApp theApp

Variable Documentation

COLORREF NEAR colorArray[]
Initial value:
{
  RGB (0, 0, 0),
  RGB (255, 0, 0),
  RGB (0, 255, 0),
  RGB (0, 0, 255),

}

Definition at line 155 of file mdi.cpp.

CMDIApp theApp

Definition at line 56 of file mdi.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mdi.h File Reference

  • general
  • mdidocvw
Classes | Variables

mdi.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CMDIApp

Variables

COLORREF | colorArray []

Variable Documentation

COLORREF colorArray[]

Definition at line 95 of file mdi.cpp.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/resource.h File Reference

  • general
  • mdidocvw
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BLACK 20
#define | ID_BLUE 23
#define | ID_CUSTOM 25
#define | ID_FAST 32781
#define | ID_FILE_NEWBOUNCE 32772
#define | ID_FILE_NEWHELLO 32771
#define | ID_GREEN 22
#define | ID_MIX 32783
#define | ID_RED 21
#define | ID_SPEED_FAST 32779
#define | ID_SPEED_SLOW 32778
#define | ID_WHITE 24
#define | IDD_ABOUTBOX 100
#define | IDM_BLACK 20
#define | IDM_BLUE 23
#define | IDM_BOUNCE 10
#define | IDM_CUSTOM 25
#define | IDM_FAST 30
#define | IDM_GREEN 22
#define | IDM_HELLO 11
#define | IDM_RED 21
#define | IDM_SLOW 31
#define | IDM_WHITE 24
#define | IDR_BOUNCETYPE 31234
#define | IDR_HELLOTYPE 129
#define | IDR_MAINFRAME 128
#define | IDS_NOBOUNCETEMPLATE 32781
#define | IDS_NOHELLOTEMPLATE 32780
#define | IDS_STANDARD 32782
#define | IDS_TIMER 130
#define | IDS_UNKCOLOR 32784

Define Documentation

#define ID_BLACK 20

Definition at line 7 of file resource.h.

#define ID_BLUE 23

Definition at line 13 of file resource.h.

#define ID_CUSTOM 25

Definition at line 17 of file resource.h.

#define ID_FAST 32781

Definition at line 31 of file resource.h.

#define ID_FILE_NEWBOUNCE 32772

Definition at line 27 of file resource.h.

#define ID_FILE_NEWHELLO 32771

Definition at line 26 of file resource.h.

#define ID_GREEN 22

Definition at line 11 of file resource.h.

#define ID_MIX 32783

Definition at line 34 of file resource.h.

#define ID_RED 21

Definition at line 9 of file resource.h.

#define ID_SPEED_FAST 32779

Definition at line 29 of file resource.h.

#define ID_SPEED_SLOW 32778

Definition at line 28 of file resource.h.

#define ID_WHITE 24

Definition at line 15 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 21 of file resource.h.

#define IDM_BLACK 20

Definition at line 8 of file resource.h.

#define IDM_BLUE 23

Definition at line 14 of file resource.h.

#define IDM_BOUNCE 10

Definition at line 5 of file resource.h.

#define IDM_CUSTOM 25

Definition at line 18 of file resource.h.

#define IDM_FAST 30

Definition at line 19 of file resource.h.

#define IDM_GREEN 22

Definition at line 12 of file resource.h.

#define IDM_HELLO 11

Definition at line 6 of file resource.h.

#define IDM_RED 21

Definition at line 10 of file resource.h.

#define IDM_SLOW 31

Definition at line 20 of file resource.h.

#define IDM_WHITE 24

Definition at line 16 of file resource.h.

#define IDR_BOUNCETYPE 31234

Definition at line 25 of file resource.h.

#define IDR_HELLOTYPE 129

Definition at line 23 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 22 of file resource.h.

#define IDS_NOBOUNCETEMPLATE 32781

Definition at line 32 of file resource.h.

#define IDS_NOHELLOTEMPLATE 32780

Definition at line 30 of file resource.h.

#define IDS_STANDARD 32782

Definition at line 33 of file resource.h.

#define IDS_TIMER 130

Definition at line 24 of file resource.h.

#define IDS_UNKCOLOR 32784

Definition at line 35 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/stdafx.cpp File Reference

  • general
  • mdidocvw

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/stdafx.h File Reference

  • general
  • mdidocvw
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 16 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/ChildView.cpp File Reference

  • general
  • MMXSwarm

ChildView.cpp File Reference

#include "stdafx.h"
#include "MMXSwarm.h"
#include "ChildView.h"
#include "MMXSurface.h"
#include "SSE2Surface.h"
#include "Swarm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/ChildView.h File Reference

  • general
  • MMXSwarm
Classes

ChildView.h File Reference

#include "MMXSurface.h"
#include "Swarm.h"

Go to the source code of this file.

Classes

class CChildView
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MainFrm.cpp File Reference

  • general
  • MMXSwarm

MainFrm.cpp File Reference

#include "stdafx.h"
#include "MMXSwarm.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MainFrm.h File Reference

  • general
  • MMXSwarm
Classes

MainFrm.h File Reference

#include "ChildView.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface.h File Reference

  • general
  • MMXSwarm
Classes

MMXSurface.h File Reference

#include "Surface.h"

Go to the source code of this file.

Classes

class | CMMXSurface16Intrinsic
class | CMMXSurface24Intrinsic
class | CMMXSurface32Intrinsic
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface16.cpp File Reference

  • general
  • MMXSwarm
Typedefs

MMXSurface16.cpp File Reference

#include "stdafx.h"
#include "MMXSurface.h"
#include "MMXWrapper.h"

Go to the source code of this file.

Typedefs

typedef CMMXUnsigned16Saturated CMMX

Typedef Documentation

typedef CMMXUnsigned16Saturated CMMX

Definition at line 17 of file MMXSurface16.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface24.cpp File Reference

  • general
  • MMXSwarm
Typedefs

MMXSurface24.cpp File Reference

#include "stdafx.h"
#include "MMXSurface.h"
#include "MMXWrapper.h"

Go to the source code of this file.

Typedefs

typedef CMMXUnsigned16Saturated CMMX

Typedef Documentation

typedef CMMXUnsigned16Saturated CMMX

Definition at line 17 of file MMXSurface24.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface32.cpp File Reference

  • general
  • MMXSwarm
Typedefs

MMXSurface32.cpp File Reference

#include "stdafx.h"
#include "MMXSurface.h"
#include "MMXWrapper.h"

Go to the source code of this file.

Typedefs

typedef CMMXUnsigned16Saturated CMMX

Typedef Documentation

typedef CMMXUnsigned16Saturated CMMX

Definition at line 17 of file MMXSurface32.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSwarm.cpp File Reference

  • general
  • MMXSwarm
Classes | Variables

MMXSwarm.cpp File Reference

#include "stdafx.h"
#include "MMXSwarm.h"
#include "MainFrm.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CMMXSwarmApp theApp

Variable Documentation

CMMXSwarmApp theApp

Definition at line 41 of file MMXSwarm.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSwarm.h File Reference

  • general
  • MMXSwarm
Classes

MMXSwarm.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CMMXSwarmApp
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXWrapper.h File Reference

  • general
  • MMXSwarm
Classes | Functions

MMXWrapper.h File Reference

Go to the source code of this file.

Classes

class | CMMXUnsigned16Saturated

Functions

CMMXUnsigned16Saturated | operator& (const CMMXUnsigned16Saturated &m1, const CMMXUnsigned16Saturated &m2)
CMMXUnsigned16Saturated | operator+ (const CMMXUnsigned16Saturated &m1, const CMMXUnsigned16Saturated &m2)
CMMXUnsigned16Saturated | operator- (const CMMXUnsigned16Saturated &m1, const CMMXUnsigned16Saturated &m2)
CMMXUnsigned16Saturated | operator<< (const CMMXUnsigned16Saturated &m1, int nBits)
CMMXUnsigned16Saturated | operator>> (const CMMXUnsigned16Saturated &m1, int nBits)

Function Documentation

CMMXUnsigned16Saturated operator& | ( | const CMMXUnsigned16Saturated & | m1,
 |  | const CMMXUnsigned16Saturated & | m2 |
 | ) |  |  | [inline]

Definition at line 154 of file MMXWrapper.h.

{
  return(_mm_and_si64(m1, m2));
}

CMMXUnsigned16Saturated operator+ | ( | const CMMXUnsigned16Saturated & | m1,
 |  | const CMMXUnsigned16Saturated & | m2 |
 | ) |  |  | [inline]

Definition at line 134 of file MMXWrapper.h.

{
  return( _mm_adds_pu16( m1.m_m64, m2.m_m64 ) );
}

CMMXUnsigned16Saturated operator- | ( | const CMMXUnsigned16Saturated & | m1,
 |  | const CMMXUnsigned16Saturated & | m2 |
 | ) |  |  | [inline]

Definition at line 139 of file MMXWrapper.h.

{
  return( _mm_subs_pu16( m1.m_m64, m2.m_m64 ) );
}

CMMXUnsigned16Saturated operator<< | ( | const CMMXUnsigned16Saturated & | m1,
 |  | int | nBits |
 | ) |  |  | [inline]

Definition at line 144 of file MMXWrapper.h.

{
  return( _mm_slli_pi16( m1, nBits ) );
}

CMMXUnsigned16Saturated operator>> | ( | const CMMXUnsigned16Saturated & | m1,
 |  | int | nBits |
 | ) |  |  | [inline]

Definition at line 149 of file MMXWrapper.h.

{
  return( _mm_srli_pi16( m1, nBits ) );
}

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Resource.h File Reference

  • general
  • MMXSwarm
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_INDICATOR_FPS 59142
#define | ID_INDICATOR_PAUSE_BLIT 59146
#define | ID_INDICATOR_PAUSE_BLUR 59145
#define | ID_INDICATOR_PAUSE_SWARM 59144
#define | ID_INDICATOR_RESOLUTION 59143
#define | ID_VIEW_PAUSE_BLIT 59396
#define | ID_VIEW_PAUSE_BLUR 59395
#define | ID_VIEW_PAUSE_SWARM 59394
#define | IDD_16BIT_GENERICCBLUR 156
#define | IDD_16BIT_MMXINTRINSICS 150
#define | IDD_16BIT_SSE2INTRINSICS 153
#define | IDD_24BIT_GENERICCBLUR 157
#define | IDD_24BIT_MMXINTRINSICS 151
#define | IDD_24BIT_SSE2INTRINSICS 154
#define | IDD_32BIT_GENERICCBLUR 158
#define | IDD_32BIT_MMXINTRINSICS 152
#define | IDD_32BIT_SSE2INTRINSICS 155
#define | IDD_ABOUTBOX 100
#define | IDD_CIMAGE_16BIT 140
#define | IDD_CIMAGE_24BIT 141
#define | IDD_CIMAGE_32BIT 142
#define | IDR_MAINFRAME 128
#define | IDR_MMXSwaTYPE 129
#define | IDS_ALL_IMAGES 176
#define | IDS_ERROR_GETEXPORTERFILTER 170
#define | IDS_ERROR_GETPAGES 172
#define | IDS_ERROR_PROPERTYFRAME 171
#define | IDS_ERROR_SAVE 175
#define | IDS_WARNING_BITDEPTH 173
#define | IDS_WARNING_DEBUG 174

Define Documentation

#define ID_INDICATOR_FPS 59142

Definition at line 27 of file Resource.h.

#define ID_INDICATOR_PAUSE_BLIT 59146

Definition at line 31 of file Resource.h.

#define ID_INDICATOR_PAUSE_BLUR 59145

Definition at line 30 of file Resource.h.

#define ID_INDICATOR_PAUSE_SWARM 59144

Definition at line 29 of file Resource.h.

#define ID_INDICATOR_RESOLUTION 59143

Definition at line 28 of file Resource.h.

#define ID_VIEW_PAUSE_BLIT 59396

Definition at line 34 of file Resource.h.

#define ID_VIEW_PAUSE_BLUR 59395

Definition at line 33 of file Resource.h.

#define ID_VIEW_PAUSE_SWARM 59394

Definition at line 32 of file Resource.h.

#define IDD_16BIT_GENERICCBLUR 156

Definition at line 17 of file Resource.h.

#define IDD_16BIT_MMXINTRINSICS 150

Definition at line 11 of file Resource.h.

#define IDD_16BIT_SSE2INTRINSICS 153

Definition at line 14 of file Resource.h.

#define IDD_24BIT_GENERICCBLUR 157

Definition at line 18 of file Resource.h.

#define IDD_24BIT_MMXINTRINSICS 151

Definition at line 12 of file Resource.h.

#define IDD_24BIT_SSE2INTRINSICS 154

Definition at line 15 of file Resource.h.

#define IDD_32BIT_GENERICCBLUR 158

Definition at line 19 of file Resource.h.

#define IDD_32BIT_MMXINTRINSICS 152

Definition at line 13 of file Resource.h.

#define IDD_32BIT_SSE2INTRINSICS 155

Definition at line 16 of file Resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file Resource.h.

#define IDD_CIMAGE_16BIT 140

Definition at line 8 of file Resource.h.

#define IDD_CIMAGE_24BIT 141

Definition at line 9 of file Resource.h.

#define IDD_CIMAGE_32BIT 142

Definition at line 10 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file Resource.h.

#define IDR_MMXSwaTYPE 129

Definition at line 7 of file Resource.h.

#define IDS_ALL_IMAGES 176

Definition at line 26 of file Resource.h.

#define IDS_ERROR_GETEXPORTERFILTER 170

Definition at line 20 of file Resource.h.

#define IDS_ERROR_GETPAGES 172

Definition at line 22 of file Resource.h.

#define IDS_ERROR_PROPERTYFRAME 171

Definition at line 21 of file Resource.h.

#define IDS_ERROR_SAVE 175

Definition at line 25 of file Resource.h.

#define IDS_WARNING_BITDEPTH 173

Definition at line 23 of file Resource.h.

#define IDS_WARNING_DEBUG 174

Definition at line 24 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface.h File Reference

  • general
  • MMXSwarm
Classes

SSE2Surface.h File Reference

#include "Surface.h"

Go to the source code of this file.

Classes

class | CSSE2Surface16Intrinsic
class | CSSE2Surface24Intrinsic
class | CSSE2Surface32Intrinsic
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface16.cpp File Reference

  • general
  • MMXSwarm
Typedefs

SSE2Surface16.cpp File Reference

#include "stdafx.h"
#include "SSE2Surface.h"
#include "SSE2Wrapper.h"

Go to the source code of this file.

Typedefs

typedef CSSE2Unsigned16Saturated CSSE2

Typedef Documentation

typedef CSSE2Unsigned16Saturated CSSE2

Definition at line 17 of file SSE2Surface16.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface24.cpp File Reference

  • general
  • MMXSwarm
Typedefs

SSE2Surface24.cpp File Reference

#include "stdafx.h"
#include "SSE2Surface.h"
#include "SSE2Wrapper.h"

Go to the source code of this file.

Typedefs

typedef CSSE2Unsigned16Saturated CSSE2

Typedef Documentation

typedef CSSE2Unsigned16Saturated CSSE2

Definition at line 17 of file SSE2Surface24.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface32.cpp File Reference

  • general
  • MMXSwarm
Typedefs

SSE2Surface32.cpp File Reference

#include "stdafx.h"
#include "SSE2Surface.h"
#include "SSE2Wrapper.h"

Go to the source code of this file.

Typedefs

typedef CSSE2Unsigned16Saturated CSSE2

Typedef Documentation

typedef CSSE2Unsigned16Saturated CSSE2

Definition at line 17 of file SSE2Surface32.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Wrapper.h File Reference

  • general
  • MMXSwarm
Classes | Functions

SSE2Wrapper.h File Reference

Go to the source code of this file.

Classes

class | CSSE2Unsigned16Saturated

Functions

CSSE2Unsigned16Saturated | operator& (const CSSE2Unsigned16Saturated &m1, const CSSE2Unsigned16Saturated &m2)
CSSE2Unsigned16Saturated | operator+ (const CSSE2Unsigned16Saturated &m1, const CSSE2Unsigned16Saturated &m2)
CSSE2Unsigned16Saturated | operator- (const CSSE2Unsigned16Saturated &m1, const CSSE2Unsigned16Saturated &m2)
CSSE2Unsigned16Saturated | operator<< (const CSSE2Unsigned16Saturated &m1, int nBits)
CSSE2Unsigned16Saturated | operator>> (const CSSE2Unsigned16Saturated &m1, int nBits)

Function Documentation

CSSE2Unsigned16Saturated operator& | ( | const CSSE2Unsigned16Saturated & | m1,
 |  | const CSSE2Unsigned16Saturated & | m2 |
 | ) |  |  | [inline]

Definition at line 190 of file SSE2Wrapper.h.

{
  return(_mm_and_si128(m1, m2));
}

CSSE2Unsigned16Saturated operator+ | ( | const CSSE2Unsigned16Saturated & | m1,
 |  | const CSSE2Unsigned16Saturated & | m2 |
 | ) |  |  | [inline]

Definition at line 170 of file SSE2Wrapper.h.

{
  return( _mm_adds_epu16( m1.m_m128i, m2.m_m128i ) );
}

CSSE2Unsigned16Saturated operator- | ( | const CSSE2Unsigned16Saturated & | m1,
 |  | const CSSE2Unsigned16Saturated & | m2 |
 | ) |  |  | [inline]

Definition at line 175 of file SSE2Wrapper.h.

{
  return( _mm_subs_epu16( m1.m_m128i, m2.m_m128i ) );
}

CSSE2Unsigned16Saturated operator<< | ( | const CSSE2Unsigned16Saturated & | m1,
 |  | int | nBits |
 | ) |  |  | [inline]

Definition at line 180 of file SSE2Wrapper.h.

{
  return( _mm_slli_epi16( m1, nBits ) );
}

CSSE2Unsigned16Saturated operator>> | ( | const CSSE2Unsigned16Saturated & | m1,
 |  | int | nBits |
 | ) |  |  | [inline]

Definition at line 185 of file SSE2Wrapper.h.

{
  return( _mm_srli_epi16( m1, nBits ) );
}

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/stdafx.cpp File Reference

  • general
  • MMXSwarm
Functions | Variables

stdafx.cpp File Reference

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>

Go to the source code of this file.

Functions

bool | IsMMX ()
bool | IsSSE2 ()

Variables

const DWORD | _MMX_FEATURE_BIT = 0x00800000
const DWORD | _SSE2_FEATURE_BIT = 0x04000000

Function Documentation

bool IsMMX ( )

Definition at line 28 of file stdafx.cpp.

{
  static bool bMMX = _IsFeature(_MMX_FEATURE_BIT);
  return(bMMX);
}

bool IsSSE2 ( )

Definition at line 34 of file stdafx.cpp.

{
  static bool bSSE2 = _IsFeature(_SSE2_FEATURE_BIT);
  return(bSSE2);
}

Variable Documentation

const DWORD _MMX_FEATURE_BIT = 0x00800000

Definition at line 22 of file stdafx.cpp.

const DWORD _SSE2_FEATURE_BIT = 0x04000000

Definition at line 23 of file stdafx.cpp.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/stdafx.h File Reference

  • general
  • MMXSwarm
Defines | Functions

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <atlcoll.h>
#include <comdef.h>
#include <emmintrin.h>

Go to the source code of this file.

Defines

#define | VC_EXTRALEAN

Functions

bool | IsMMX ()
bool | IsSSE2 ()
int | Random ()
int | Random (int n)
void | SeedRandom (int nSeed=0)

Define Documentation

#define VC_EXTRALEAN

Definition at line 17 of file stdafx.h.

Function Documentation

bool IsMMX ( )

Definition at line 28 of file stdafx.cpp.

{
  static bool bMMX = _IsFeature(_MMX_FEATURE_BIT);
  return(bMMX);
}

bool IsSSE2 ( )

Definition at line 34 of file stdafx.cpp.

{
  static bool bSSE2 = _IsFeature(_SSE2_FEATURE_BIT);
  return(bSSE2);
}

int Random ( ) [inline]

Definition at line 29 of file stdafx.h.

{ return(rand()); }

int Random ( int n ) [inline]

Definition at line 30 of file stdafx.h.

{ return(rand() % n ); }

void SeedRandom ( int nSeed = 0 ) [inline]

Definition at line 27 of file stdafx.h.

{ srand(nSeed ? nSeed : ::GetTickCount()); }

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Surface.cpp File Reference

  • general
  • MMXSwarm

Surface.cpp File Reference

#include "stdafx.h"
#include "Surface.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Surface.h File Reference

  • general
  • MMXSwarm
Classes | Functions

Surface.h File Reference

#include <AtlImage.h>

Go to the source code of this file.

Classes

class | CSurface

Functions

template<class T >
T | ABS (T x)

Function Documentation

template<class T >
T ABS ( T x )

Definition at line 16 of file Surface.h.

{ return(x < 0 ? -x : x); }

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Swarm.cpp File Reference

  • general
  • MMXSwarm

Swarm.cpp File Reference

#include "stdafx.h"
#include "Swarm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Swarm.h File Reference

  • general
  • MMXSwarm
Classes | Typedefs

Swarm.h File Reference

#include "Surface.h"

Go to the source code of this file.

Classes

class | CBrightLeader
class | CHueLeader
class | CLeader
class | CLlama
struct | CRoamer
class | CSwarm

Typedefs

typedef CAtlArray< CLeader * > | CLeaderArray
typedef CAtlArray< CLlama * > | CLlamaArray

Typedef Documentation

typedef CAtlArray<CLeader *> CLeaderArray

Definition at line 19 of file Swarm.h.

typedef CAtlArray<CLlama *> CLlamaArray

Definition at line 16 of file Swarm.h.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/adderdlg.cpp File Reference

  • general
  • modeless

adderdlg.cpp File Reference

#include "stdafx.h"
#include "modeless.h"
#include "AdderDlg.h"
#include "modeldlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/adderdlg.h File Reference

  • general
  • modeless
Classes

adderdlg.h File Reference

Go to the source code of this file.

Classes

class CAdderDialog
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeldlg.cpp File Reference

  • general
  • modeless
Classes

modeldlg.cpp File Reference

#include "stdafx.h"
#include "modeless.h"
#include "adderdlg.h"
#include "modeldlg.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeldlg.h File Reference

  • general
  • modeless
Classes

modeldlg.h File Reference

Go to the source code of this file.

Classes

class CMainDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeless.cpp File Reference

  • general
  • modeless
Variables

modeless.cpp File Reference

#include "stdafx.h"
#include "modeless.h"
#include "adderdlg.h"
#include "modeldlg.h"

Go to the source code of this file.

Variables

CModelessApp theApp

Variable Documentation

CModelessApp theApp

Definition at line 46 of file modeless.cpp.

Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeless.h File Reference

  • general
  • modeless
Classes

modeless.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CModelessApp
Generated on Sat Nov 23 2024 17:00:42 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/resource.h File Reference

  • general
  • modeless
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_LIST 1001
#define | IDC_NEWTEXT 1000
#define | IDD_ABOUTBOX 100
#define | IDD_ADDME 129
#define | IDD_MAIN_DIALOG 102
#define | IDD_MODELESS_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101

Define Documentation

#define IDC_LIST 1001

Definition at line 13 of file resource.h.

#define IDC_NEWTEXT 1000

Definition at line 12 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_ADDME 129

Definition at line 11 of file resource.h.

#define IDD_MAIN_DIALOG 102

Definition at line 9 of file resource.h.

#define IDD_MODELESS_DIALOG 102

Definition at line 8 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 10 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/stdafx.cpp File Reference

  • general
  • modeless

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/stdafx.h File Reference

  • general
  • modeless
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/multipad.cpp File Reference

  • general
  • multipad
Functions | Variables

multipad.cpp File Reference

#include "stdafx.h"
#include "multipad.h"
#include <locale.h>

Go to the source code of this file.

Functions

ON_COMMAND (ID_FILE_NEW, CWinApp::OnFileNew) BOOL CMultiPadApp

Variables

CMultiPadApp NEAR theApp

Function Documentation

ON_COMMAND | ( | ID_FILE_NEW | ,
 |  | CWinApp::OnFileNew |
 | ) |  |

Definition at line 22 of file multipad.cpp.

{
  _tsetlocale(LC_ALL, _T(""));

  LoadStdProfileSettings();

  AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
    RUNTIME_CLASS(CPadDoc), RUNTIME_CLASS(CMDIChildWnd),
    RUNTIME_CLASS(CEditView)));
  m_pMainWnd = new CMainFrame;
  ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME);
  m_pMainWnd->ShowWindow(m_nCmdShow);

  // enable file manager drag/drop and DDE Execute open
  m_pMainWnd->DragAcceptFiles();
  EnableShellOpen();
  RegisterShellFileTypes(TRUE);

  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo cmdInfo;
  ParseCommandLine(cmdInfo);

  // Dispatch commands specified on the command line
  if (!ProcessShellCommand(cmdInfo))
    return FALSE;

  return TRUE;
}

Variable Documentation

CMultiPadApp NEAR theApp

Definition at line 16 of file multipad.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/multipad.h File Reference

  • general
  • multipad
Classes

multipad.h File Reference

#include <afxext.h>
#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CMainFrame
class | CMultiPadApp
class | CPadDoc
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/resource.h File Reference

  • general
  • multipad
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDD_ABOUTBOX 512
#define | IDR_MAINFRAME 128
#define | IDR_TEXTTYPE 129

Define Documentation

#define IDD_ABOUTBOX 512

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 5 of file resource.h.

#define IDR_TEXTTYPE 129

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/stdafx.cpp File Reference

  • general
  • multipad

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/stdafx.h File Reference

  • general
  • multipad
Defines

stdafx.h File Reference

#include <afxwin.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/combobar.cpp File Reference

  • general
  • npp

combobar.cpp File Reference

#include "stdafx.h"
#include "np.h"
#include "combobar.h"
#include "mainfrm.h"
#include "npdoc.h"
#include "npview.h"
#include "finddlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/combobar.h File Reference

  • general
  • npp
Classes

combobar.h File Reference

Go to the source code of this file.

Classes

class | CComboToolBar
class | CTBComboBox
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/finddlg.cpp File Reference

  • general
  • npp

finddlg.cpp File Reference

#include "stdafx.h"
#include <stddef.h>
#include "np.h"
#include "combobar.h"
#include "mainfrm.h"
#include "npdoc.h"
#include "npview.h"
#include "finddlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/finddlg.h File Reference

  • general
  • npp
Classes

finddlg.h File Reference

Go to the source code of this file.

Classes

class CFindDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/gotodlg.cpp File Reference

  • general
  • npp

gotodlg.cpp File Reference

#include "stdafx.h"
#include "np.h"
#include "gotodlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/gotodlg.h File Reference

  • general
  • npp
Classes

gotodlg.h File Reference

Go to the source code of this file.

Classes

class CGotoDlg
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/history.cpp File Reference

  • general
  • npp

history.cpp File Reference

#include "stdafx.h"
#include "np.h"
#include "combobar.h"
#include "mainfrm.h"
#include "npdoc.h"
#include "npview.h"
#include "finddlg.h"
#include <afxcoll.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/history.h File Reference

  • general
  • npp
Classes

history.h File Reference

Go to the source code of this file.

Classes

class CHistoryList
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/mainfrm.cpp File Reference

  • general
  • npp

mainfrm.cpp File Reference

#include "stdafx.h"
#include "np.h"
#include "combobar.h"
#include "mainfrm.h"
#include "npdoc.h"
#include "npview.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/mainfrm.h File Reference

  • general
  • npp
Classes | Functions

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame

Functions

CNotepadView * GetApplicationView ()

Function Documentation

CNotepadView* GetApplicationView ( ) [inline]

Definition at line 60 of file mainfrm.h.

{
  CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd();
  ENSURE(pFrame);
  return (CNotepadView*)(pFrame)->GetActiveView();
}

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/np.cpp File Reference

  • general
  • npp
Classes | Variables

np.cpp File Reference

#include "stdafx.h"
#include "np.h"
#include "combobar.h"
#include "mainfrm.h"
#include "npdoc.h"
#include "npview.h"
#include <locale.h>

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CNotepadApp theApp

Variable Documentation

CNotepadApp theApp

Definition at line 50 of file np.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/np.h File Reference

  • general
  • npp
Classes | Defines

np.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CNotepadApp

Defines

#define | COMBO_HEIGHT 100
#define | COMBO_WIDTH 160
#define | HISTORY_COUNT 10
#define | TIMER_ID 2

Define Documentation

#define COMBO_HEIGHT 100

Definition at line 20 of file np.h.

#define COMBO_WIDTH 160

Definition at line 21 of file np.h.

#define HISTORY_COUNT 10

Definition at line 22 of file np.h.

#define TIMER_ID 2

Definition at line 23 of file np.h.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npdoc.cpp File Reference

  • general
  • npp

npdoc.cpp File Reference

#include "stdafx.h"
#include "np.h"
#include "npdoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npdoc.h File Reference

  • general
  • npp
Classes

npdoc.h File Reference

Go to the source code of this file.

Classes

class CNotepadDoc
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npview.cpp File Reference

  • general
  • npp

npview.cpp File Reference

#include "stdafx.h"
#include "np.h"
#include "combobar.h"
#include "mainfrm.h"
#include "npdoc.h"
#include "npview.h"
#include "gotodlg.h"
#include "finddlg.h"
#include <afxcoll.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npview.h File Reference

  • general
  • npp
Classes

npview.h File Reference

#include "history.h"

Go to the source code of this file.

Classes

class CNotepadView
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/resource.h File Reference

  • general
  • npp
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_EDIT_FIND_COMBO 2002
#define | ID_EDIT_FIND_NEXT 1001
#define | ID_EDIT_GOTO 2000
#define | ID_EDIT_WORDWRAP 2003
#define | ID_INDICATOR_CLOCK 2005
#define | ID_INDICATOR_LINE 2004
#define | ID_VIEW_FIND_NEXT 2001
#define | IDC_CHECK1 1005
#define | IDC_COMBO1 1002
#define | IDC_GOTO_LINE 1000
#define | IDC_RADIO1 1003
#define | IDC_RADIO2 1004
#define | IDD_ABOUTBOX 100
#define | IDD_FIND 131
#define | IDD_GOTO 130
#define | IDR_MAINFRAME 128
#define | IDR_NPTYPE 129
#define | IDW_COMBO 103
#define | NPERROR_INVALID_LINENUM 2006
#define | NPERROR_NUM_TOO_BIG 2007

Define Documentation

#define ID_EDIT_FIND_COMBO 2002

Definition at line 19 of file resource.h.

#define ID_EDIT_FIND_NEXT 1001

Definition at line 12 of file resource.h.

#define ID_EDIT_GOTO 2000

Definition at line 17 of file resource.h.

#define ID_EDIT_WORDWRAP 2003

Definition at line 20 of file resource.h.

#define ID_INDICATOR_CLOCK 2005

Definition at line 22 of file resource.h.

#define ID_INDICATOR_LINE 2004

Definition at line 21 of file resource.h.

#define ID_VIEW_FIND_NEXT 2001

Definition at line 18 of file resource.h.

#define IDC_CHECK1 1005

Definition at line 16 of file resource.h.

#define IDC_COMBO1 1002

Definition at line 13 of file resource.h.

#define IDC_GOTO_LINE 1000

Definition at line 11 of file resource.h.

#define IDC_RADIO1 1003

Definition at line 14 of file resource.h.

#define IDC_RADIO2 1004

Definition at line 15 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_FIND 131

Definition at line 10 of file resource.h.

#define IDD_GOTO 130

Definition at line 9 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_NPTYPE 129

Definition at line 8 of file resource.h.

#define IDW_COMBO 103

Definition at line 6 of file resource.h.

#define NPERROR_INVALID_LINENUM 2006

Definition at line 23 of file resource.h.

#define NPERROR_NUM_TOO_BIG 2007

Definition at line 24 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/stdafx.cpp File Reference

  • general
  • npp

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/stdafx.h File Reference

  • general
  • npp
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/colorpge.cpp File Reference

  • general
  • propdlg

colorpge.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "stylepge.h"
#include "colorpge.h"
#include "shapeobj.h"
#include "preview.h"
#include "propsht.h"
#include "propsht2.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/colorpge.h File Reference

  • general
  • propdlg
Classes

colorpge.h File Reference

Go to the source code of this file.

Classes

class CColorPage
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/mainfrm.cpp File Reference

  • general
  • propdlg

mainfrm.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "colorpge.h"
#include "stylepge.h"
#include "shapeobj.h"
#include "preview.h"
#include "propsht.h"
#include "propsht2.h"
#include "minifrm.h"
#include "resource.h"
#include "mainfrm.h"
#include "shapedoc.h"
#include "shapesvw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/mainfrm.h File Reference

  • general
  • propdlg
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/minifrm.cpp File Reference

  • general
  • propdlg

minifrm.cpp File Reference

#include "stdafx.h"
#include "shapeobj.h"
#include "resource.h"
#include "colorpge.h"
#include "stylepge.h"
#include "propsht2.h"
#include "minifrm.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/minifrm.h File Reference

  • general
  • propdlg
Classes

minifrm.h File Reference

Go to the source code of this file.

Classes

class CShapePropSheetFrame
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/preview.cpp File Reference

  • general
  • propdlg

preview.cpp File Reference

#include "stdafx.h"
#include "preview.h"
#include "resource.h"
#include "colorpge.h"
#include "stylepge.h"
#include "shapeobj.h"
#include "propsht.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/preview.h File Reference

  • general
  • propdlg
Classes

preview.h File Reference

Go to the source code of this file.

Classes

class CShapePreviewWnd
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propdlg.cpp File Reference

  • general
  • propdlg
Classes | Variables

propdlg.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "shapeobj.h"
#include "colorpge.h"
#include "stylepge.h"
#include "preview.h"
#include "propsht.h"
#include "propsht2.h"
#include "minifrm.h"
#include "mainfrm.h"
#include "shapedoc.h"
#include "shapesvw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CPropDlgApp theApp

Variable Documentation

CPropDlgApp theApp

Definition at line 55 of file propdlg.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propdlg.h File Reference

  • general
  • propdlg
Classes | Defines

propdlg.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CPropDlgApp

Defines

#define | WM_USER_CHANGE_OBJECT_PROPERTIES (WM_USER + 1)

Define Documentation

#define WM_USER_CHANGE_OBJECT_PROPERTIES (WM_USER + 1)

Definition at line 18 of file propdlg.h.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht.cpp File Reference

  • general
  • propdlg

propsht.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "resource.h"
#include "shapeobj.h"
#include "colorpge.h"
#include "stylepge.h"
#include "preview.h"
#include "propsht.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht.h File Reference

  • general
  • propdlg
Classes

propsht.h File Reference

Go to the source code of this file.

Classes

class CModalShapePropSheet
Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht2.cpp File Reference

  • general
  • propdlg

propsht2.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "resource.h"
#include "shapeobj.h"
#include "colorpge.h"
#include "stylepge.h"
#include "propsht2.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht2.h File Reference

  • general
  • propdlg
Classes

propsht2.h File Reference

Go to the source code of this file.

Classes

class CModelessShapePropSheet
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/resource.h File Reference

  • general
  • propdlg
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CHANGE_OBJECT_PROPS 32775
#define | ID_MINI_FRAME_PROPERTY_SHEET 32773
#define | ID_MINI_FRAME_WITH_PIN_BUTTON 32774
#define | ID_PROPERTY_SHEET_WITH_PREVIEW 32772
#define | ID_SIMPLE_PROPERTY_SHEET 32771
#define | IDC_BLACK 1004
#define | IDC_BLUE 1007
#define | IDC_ELLIPSE 1002
#define | IDC_GREEN 1006
#define | IDC_RECTANGLE 1000
#define | IDC_RED 1005
#define | IDC_ROUND_RECTANGLE 1001
#define | IDD_ABOUTBOX 100
#define | IDD_COLOR 131
#define | IDD_STYLE 130
#define | IDR_MAINFRAME 128
#define | IDR_SHAPESTYPE 129
#define | IDS_OBJECT_PROPERTIES 61216

Define Documentation

#define ID_CHANGE_OBJECT_PROPS 32775

Definition at line 21 of file resource.h.

#define ID_MINI_FRAME_PROPERTY_SHEET 32773

Definition at line 19 of file resource.h.

#define ID_MINI_FRAME_WITH_PIN_BUTTON 32774

Definition at line 20 of file resource.h.

#define ID_PROPERTY_SHEET_WITH_PREVIEW 32772

Definition at line 18 of file resource.h.

#define ID_SIMPLE_PROPERTY_SHEET 32771

Definition at line 17 of file resource.h.

#define IDC_BLACK 1004

Definition at line 13 of file resource.h.

#define IDC_BLUE 1007

Definition at line 16 of file resource.h.

#define IDC_ELLIPSE 1002

Definition at line 12 of file resource.h.

#define IDC_GREEN 1006

Definition at line 15 of file resource.h.

#define IDC_RECTANGLE 1000

Definition at line 10 of file resource.h.

#define IDC_RED 1005

Definition at line 14 of file resource.h.

#define IDC_ROUND_RECTANGLE 1001

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_COLOR 131

Definition at line 9 of file resource.h.

#define IDD_STYLE 130

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDR_SHAPESTYPE 129

Definition at line 7 of file resource.h.

#define IDS_OBJECT_PROPERTIES 61216

Definition at line 22 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapedoc.cpp File Reference

  • general
  • propdlg

shapedoc.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "shapeobj.h"
#include "shapedoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapedoc.h File Reference

  • general
  • propdlg
Classes

shapedoc.h File Reference

#include <afxtempl.h>

Go to the source code of this file.

Classes

class CShapesDoc
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapeobj.cpp File Reference

  • general
  • propdlg

shapeobj.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "shapeobj.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapeobj.h File Reference

  • general
  • propdlg
Classes | Enumerations

shapeobj.h File Reference

Go to the source code of this file.

Classes

class | CShape
struct | SHAPE_COLOR

Enumerations

enum | SHAPE_COLOR_ENUM { black, red, green, blue }
enum | SHAPE_STYLE { rectangle, rounded_rectangle, ellipse }

Enumeration Type Documentation

enum SHAPE_COLOR_ENUM
Enumerator:
black
red
green
blue

Definition at line 19 of file shapeobj.h.

{
  black,
  red,
  green,
  blue,
};

enum SHAPE_STYLE
Enumerator:
rectangle
rounded_rectangle
ellipse

Definition at line 12 of file shapeobj.h.

{
  rectangle,
  rounded_rectangle,
  ellipse,
};

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapesvw.cpp File Reference

  • general
  • propdlg

shapesvw.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "shapeobj.h"
#include "colorpge.h"
#include "stylepge.h"
#include "preview.h"
#include "propsht.h"
#include "propsht2.h"
#include "shapedoc.h"
#include "shapesvw.h"
#include "minifrm.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapesvw.h File Reference

  • general
  • propdlg
Classes

shapesvw.h File Reference

Go to the source code of this file.

Classes

class CShapesView
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stdafx.cpp File Reference

  • general
  • propdlg

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stdafx.h File Reference

  • general
  • propdlg
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stylepge.cpp File Reference

  • general
  • propdlg

stylepge.cpp File Reference

#include "stdafx.h"
#include "propdlg.h"
#include "stylepge.h"
#include "colorpge.h"
#include "shapeobj.h"
#include "preview.h"
#include "propsht.h"
#include "propsht2.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stylepge.h File Reference

  • general
  • propdlg
Classes

stylepge.h File Reference

Go to the source code of this file.

Classes

class CStylePage
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/listvwex.cpp File Reference

  • general
  • rowlist
Defines

listvwex.cpp File Reference

#include "stdafx.h"
#include "ListVwEx.h"

Go to the source code of this file.

Defines

#define | OFFSET_FIRST 2
#define | OFFSET_OTHER 6

Define Documentation

#define OFFSET_FIRST 2

Definition at line 102 of file listvwex.cpp.

#define OFFSET_OTHER 6

Definition at line 103 of file listvwex.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/listvwex.h File Reference

  • general
  • rowlist
Classes

listvwex.h File Reference

Go to the source code of this file.

Classes

class CListViewEx
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/mainfrm.cpp File Reference

  • general
  • rowlist

mainfrm.cpp File Reference

#include "stdafx.h"
#include "RowList.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/mainfrm.h File Reference

  • general
  • rowlist
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/resource.h File Reference

  • general
  • rowlist
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_CLIENTWIDTHSEL 32788
#define | ID_VIEW_DETAILSMODE 32790
#define | ID_VIEW_LARGEICONS 32771
#define | ID_VIEW_LISTMODE 32789
#define | ID_VIEW_ROWDETAILS 32775
#define | ID_VIEW_SMALLICONS 32772
#define | ID_VIEW_STATEICONS 32782
#define | IDB_LARGEICONS 26019
#define | IDB_SMALLICONS 26018
#define | IDB_STATEICONS 130
#define | IDD_ABOUTBOX 100
#define | IDR_MAINFRAME 128
#define | IDR_ROWLISTYPE 129

Define Documentation

#define ID_VIEW_CLIENTWIDTHSEL 32788

Definition at line 15 of file resource.h.

#define ID_VIEW_DETAILSMODE 32790

Definition at line 17 of file resource.h.

#define ID_VIEW_LARGEICONS 32771

Definition at line 11 of file resource.h.

#define ID_VIEW_LISTMODE 32789

Definition at line 16 of file resource.h.

#define ID_VIEW_ROWDETAILS 32775

Definition at line 13 of file resource.h.

#define ID_VIEW_SMALLICONS 32772

Definition at line 12 of file resource.h.

#define ID_VIEW_STATEICONS 32782

Definition at line 14 of file resource.h.

#define IDB_LARGEICONS 26019

Definition at line 10 of file resource.h.

#define IDB_SMALLICONS 26018

Definition at line 9 of file resource.h.

#define IDB_STATEICONS 130

Definition at line 8 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDR_ROWLISTYPE 129

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistdoc.cpp File Reference

  • general
  • rowlist

rlistdoc.cpp File Reference

#include "stdafx.h"
#include "RowList.h"
#include "RListDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistdoc.h File Reference

  • general
  • rowlist
Classes

rlistdoc.h File Reference

Go to the source code of this file.

Classes

class CRowListDoc
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistvw.cpp File Reference

  • general
  • rowlist
Defines

rlistvw.cpp File Reference

#include "stdafx.h"
#include "RowList.h"
#include "RListDoc.h"
#include "ListVwEx.h"
#include "RListVw.h"

Go to the source code of this file.

Defines

#define | NUM_COLUMNS 8
#define | NUM_ITEMS 7

Define Documentation

#define NUM_COLUMNS 8

Definition at line 77 of file rlistvw.cpp.

#define NUM_ITEMS 7

Definition at line 78 of file rlistvw.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistvw.h File Reference

  • general
  • rowlist
Classes

rlistvw.h File Reference

Go to the source code of this file.

Classes

class CRowListView
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rowlist.cpp File Reference

  • general
  • rowlist
Classes | Variables

rowlist.cpp File Reference

#include "stdafx.h"
#include "RowList.h"
#include "MainFrm.h"
#include "RListDoc.h"
#include "ListVwEx.h"
#include "RListVw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CRowListApp theApp

Variable Documentation

CRowListApp theApp

Definition at line 53 of file rowlist.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rowlist.h File Reference

  • general
  • rowlist
Classes

rowlist.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CRowListApp
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/stdafx.cpp File Reference

  • general
  • rowlist

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/stdafx.h File Reference

  • general
  • rowlist
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcview.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/childfrm.cpp File Reference

  • general
  • Scribble

childfrm.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/childfrm.h File Reference

  • general
  • Scribble
Classes

childfrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/ipframe.cpp File Reference

  • general
  • Scribble

ipframe.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "IpFrame.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/ipframe.h File Reference

  • general
  • Scribble
Classes

ipframe.h File Reference

Go to the source code of this file.

Classes

class CInPlaceFrame
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/mainfrm.cpp File Reference

  • general
  • Scribble

mainfrm.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/mainfrm.h File Reference

  • general
  • Scribble
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/pendlg.cpp File Reference

  • general
  • Scribble

pendlg.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "PenDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/PenDlg.h File Reference

  • general
  • Scribble
Classes

PenDlg.h File Reference

Go to the source code of this file.

Classes

class CPenWidthsDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/resource.h File Reference

  • general
  • Scribble
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_EDIT_SRVR 32774
#define | ID_PEN_THICK_OR_THIN 32772
#define | ID_PEN_WIDTHS 32773
#define | IDC_DEFAULT_PEN_WIDTHS 1002
#define | IDC_THICK_PEN_WIDTH 1001
#define | IDC_THIN_PEN_WIDTH 1000
#define | IDD_ABOUTBOX 100
#define | IDD_PEN_WIDTHS 131
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_MAINFRAME 128
#define | IDR_SCRIBBTYPE 129
#define | IDR_SCRIBBTYPE_SRVR_EMB 5
#define | IDR_SCRIBBTYPE_SRVR_IP 4

Define Documentation

#define ID_CANCEL_EDIT_SRVR 32774

Definition at line 17 of file resource.h.

#define ID_PEN_THICK_OR_THIN 32772

Definition at line 15 of file resource.h.

#define ID_PEN_WIDTHS 32773

Definition at line 16 of file resource.h.

#define IDC_DEFAULT_PEN_WIDTHS 1002

Definition at line 14 of file resource.h.

#define IDC_THICK_PEN_WIDTH 1001

Definition at line 13 of file resource.h.

#define IDC_THIN_PEN_WIDTH 1000

Definition at line 12 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 7 of file resource.h.

#define IDD_PEN_WIDTHS 131

Definition at line 11 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDR_SCRIBBTYPE 129

Definition at line 10 of file resource.h.

#define IDR_SCRIBBTYPE_SRVR_EMB 5

Definition at line 6 of file resource.h.

#define IDR_SCRIBBTYPE_SRVR_IP 4

Definition at line 5 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribble.cpp File Reference

  • general
  • Scribble
Classes | Variables

scribble.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "IpFrame.h"
#include "ScribDoc.h"
#include "ScribVw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CScribbleApp theApp

Variable Documentation

CScribbleApp theApp

Definition at line 56 of file scribble.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribble.h File Reference

  • general
  • Scribble
Classes

scribble.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CScribbleApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribdoc.cpp File Reference

  • general
  • Scribble

scribdoc.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "ScribDoc.h"
#include "ScribItm.h"
#include "PenDlg.h"
#include "ScribVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribdoc.h File Reference

  • general
  • Scribble
Classes

scribdoc.h File Reference

Go to the source code of this file.

Classes

class | CScribbleDoc
class | CStroke
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribitm.cpp File Reference

  • general
  • Scribble

scribitm.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "ScribDoc.h"
#include "ScribItm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribitm.h File Reference

  • general
  • Scribble
Classes

scribitm.h File Reference

Go to the source code of this file.

Classes

class CScribbleItem
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribvw.cpp File Reference

  • general
  • Scribble

scribvw.cpp File Reference

#include "stdafx.h"
#include "Scribble.h"
#include "ScribDoc.h"
#include "ScribVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribvw.h File Reference

  • general
  • Scribble
Classes

scribvw.h File Reference

Go to the source code of this file.

Classes

class CScribbleView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/stdafx.cpp File Reference

  • general
  • Scribble

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/stdafx.h File Reference

  • general
  • Scribble

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxtempl.h>
#include <afxcmn.h>
#include <afxole.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/ChildView.cpp File Reference

  • general
  • SimpleImage

ChildView.cpp File Reference

#include "stdafx.h"
#include "CImage.h"
#include "ChildView.h"
#include "InfoDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/ChildView.h File Reference

  • general
  • SimpleImage
Classes | Enumerations

ChildView.h File Reference

#include <afxstr.h>
#include <atlimage.h>
#include <comdef.h>

Go to the source code of this file.

Classes

class CChildView

Enumerations

enum SizesEnum {
SIZE_HALF, SIZE_ORIGINAL, SIZE_DOUBLE, SIZE_FILL,
SIZE_NONE
}

Enumeration Type Documentation

enum SizesEnum
Enumerator:
SIZE_HALF
SIZE_ORIGINAL
SIZE_DOUBLE
SIZE_FILL
SIZE_NONE

Definition at line 20 of file ChildView.h.

{
  SIZE_HALF,
  SIZE_ORIGINAL,
  SIZE_DOUBLE,
  SIZE_FILL,
  SIZE_NONE
};

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/CImage.cpp File Reference

  • general
  • SimpleImage
Classes | Variables

CImage.cpp File Reference

#include "stdafx.h"
#include "CImage.h"
#include "MainFrm.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CCImageApp theApp

Variable Documentation

CCImageApp theApp

Definition at line 43 of file CImage.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/CImage.h File Reference

  • general
  • SimpleImage
Classes | Variables

CImage.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CCImageApp

Variables

CCImageApp theApp

Variable Documentation

CCImageApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/InfoDlg.cpp File Reference

  • general
  • SimpleImage

InfoDlg.cpp File Reference

#include "stdafx.h"
#include "InfoDlg.h"
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/InfoDlg.h File Reference

  • general
  • SimpleImage
Classes

InfoDlg.h File Reference

#include "resource.h"
#include <afxstr.h>
#include <atlimage.h>

Go to the source code of this file.

Classes

class CInfoDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/MainFrm.cpp File Reference

  • general
  • SimpleImage

MainFrm.cpp File Reference

#include "stdafx.h"
#include "CImage.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/MainFrm.h File Reference

  • general
  • SimpleImage
Classes

MainFrm.h File Reference

#include "ChildView.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/resource.h File Reference

  • general
  • SimpleImage
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_FILE_IMAGEINFO 132
#define | ID_FILE_OPENIMAGE 130
#define | ID_FILE_SAVEIMAGE 133
#define | ID_SIZE_BASE 2001
#define | ID_SIZE_DOUBLE 2003
#define | ID_SIZE_FILL 2004
#define | ID_SIZE_FULLSCREEN 2005
#define | ID_SIZE_HALF 2001
#define | ID_SIZE_ORIGINAL 2002
#define | ID_TOOLS_MAKEBW 131
#define | IDC_BITDEPTH 1007
#define | IDC_DIBSECTION 1005
#define | IDC_IMAGESIZE 1002
#define | IDC_INDEXED 1006
#define | IDC_PITCH 1004
#define | IDD_ABOUTBOX 100
#define | IDD_DIALOG1 134
#define | IDD_INFODLG 9
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CImageTYPE 129
#define | IDR_MAINFRAME 128
#define | IDR_SIZE_TOOLBAR 135

Define Documentation

#define ID_FILE_IMAGEINFO 132

Definition at line 12 of file resource.h.

#define ID_FILE_OPENIMAGE 130

Definition at line 10 of file resource.h.

#define ID_FILE_SAVEIMAGE 133

Definition at line 13 of file resource.h.

#define ID_SIZE_BASE 2001

Definition at line 21 of file resource.h.

#define ID_SIZE_DOUBLE 2003

Definition at line 24 of file resource.h.

#define ID_SIZE_FILL 2004

Definition at line 25 of file resource.h.

#define ID_SIZE_FULLSCREEN 2005

Definition at line 26 of file resource.h.

#define ID_SIZE_HALF 2001

Definition at line 22 of file resource.h.

#define ID_SIZE_ORIGINAL 2002

Definition at line 23 of file resource.h.

#define ID_TOOLS_MAKEBW 131

Definition at line 11 of file resource.h.

#define IDC_BITDEPTH 1007

Definition at line 20 of file resource.h.

#define IDC_DIBSECTION 1005

Definition at line 18 of file resource.h.

#define IDC_IMAGESIZE 1002

Definition at line 16 of file resource.h.

#define IDC_INDEXED 1006

Definition at line 19 of file resource.h.

#define IDC_PITCH 1004

Definition at line 17 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_DIALOG1 134

Definition at line 14 of file resource.h.

#define IDD_INFODLG 9

Definition at line 5 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 7 of file resource.h.

#define IDR_CImageTYPE 129

Definition at line 9 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_SIZE_TOOLBAR 135

Definition at line 15 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/stdafx.cpp File Reference

  • general
  • SimpleImage

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/stdafx.h File Reference

  • general
  • SimpleImage
Defines

stdafx.h File Reference

#include <winerror.h>
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 21 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 18 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/BkfstPg.cpp File Reference

  • general
  • snapvw

BkfstPg.cpp File Reference

#include "stdafx.h"
#include "snapvw.h"
#include "BkfstPg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/BkfstPg.h File Reference

  • general
  • snapvw
Classes

BkfstPg.h File Reference

Go to the source code of this file.

Classes

class CBkfstPage
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/childfrm.cpp File Reference

  • general
  • snapvw

childfrm.cpp File Reference

#include "stdafx.h"
#include "SnapVw.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/childfrm.h File Reference

  • general
  • snapvw
Classes

childfrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/DinnerPg.cpp File Reference

  • general
  • snapvw

DinnerPg.cpp File Reference

#include "stdafx.h"
#include "snapvw.h"
#include "DinnerPg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/DinnerPg.h File Reference

  • general
  • snapvw
Classes

DinnerPg.h File Reference

Go to the source code of this file.

Classes

class CDinnerPage
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/LunchPg.cpp File Reference

  • general
  • snapvw

LunchPg.cpp File Reference

#include "stdafx.h"
#include "snapvw.h"
#include "LunchPg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/LunchPg.h File Reference

  • general
  • snapvw
Classes

LunchPg.h File Reference

Go to the source code of this file.

Classes

class CLunchPage
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/mainfrm.cpp File Reference

  • general
  • snapvw

mainfrm.cpp File Reference

#include "stdafx.h"
#include "SnapVw.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/mainfrm.h File Reference

  • general
  • snapvw
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/resource.h File Reference

  • general
  • snapvw
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_AMERICAN 1007
#define | IDC_BEER 1018
#define | IDC_COFFEE 1002
#define | IDC_COFFEE1 1022
#define | IDC_CONTINENTAL 1006
#define | IDC_CONTINENTAL2 1008
#define | IDC_FINANCE 1010
#define | IDC_GREASY 1014
#define | IDC_GREASY2 1023
#define | IDC_HEALTHY 1015
#define | IDC_HOCKEY 1011
#define | IDC_HOT_TEA 1001
#define | IDC_MILK 1013
#define | IDC_NEIGHBOR 1020
#define | IDC_NERDY 1016
#define | IDC_ORANGE_JUICE 1003
#define | IDC_PRUNE_JUICE 1004
#define | IDC_PRUNE_JUICE2 1005
#define | IDC_ROMANTIC 1019
#define | IDC_SODA 1012
#define | IDC_TABLOID 1017
#define | IDC_TABLOID2 1021
#define | IDD_ABOUTBOX 100
#define | IDD_BREAKFAST 108
#define | IDD_DINNER 106
#define | IDD_LUNCH 109
#define | IDD_SNAP_FORM 101
#define | IDR_MAINFRAME 128
#define | IDR_SNAPTYPE 129
#define | IDS_CHILDWND_TITLE 131

Define Documentation

#define IDC_AMERICAN 1007

Definition at line 18 of file resource.h.

#define IDC_BEER 1018

Definition at line 28 of file resource.h.

#define IDC_COFFEE 1002

Definition at line 13 of file resource.h.

#define IDC_COFFEE1 1022

Definition at line 32 of file resource.h.

#define IDC_CONTINENTAL 1006

Definition at line 17 of file resource.h.

#define IDC_CONTINENTAL2 1008

Definition at line 19 of file resource.h.

#define IDC_FINANCE 1010

Definition at line 20 of file resource.h.

#define IDC_GREASY 1014

Definition at line 24 of file resource.h.

#define IDC_GREASY2 1023

Definition at line 33 of file resource.h.

#define IDC_HEALTHY 1015

Definition at line 25 of file resource.h.

#define IDC_HOCKEY 1011

Definition at line 21 of file resource.h.

#define IDC_HOT_TEA 1001

Definition at line 12 of file resource.h.

#define IDC_MILK 1013

Definition at line 23 of file resource.h.

#define IDC_NEIGHBOR 1020

Definition at line 30 of file resource.h.

#define IDC_NERDY 1016

Definition at line 26 of file resource.h.

#define IDC_ORANGE_JUICE 1003

Definition at line 14 of file resource.h.

#define IDC_PRUNE_JUICE 1004

Definition at line 15 of file resource.h.

#define IDC_PRUNE_JUICE2 1005

Definition at line 16 of file resource.h.

#define IDC_ROMANTIC 1019

Definition at line 29 of file resource.h.

#define IDC_SODA 1012

Definition at line 22 of file resource.h.

#define IDC_TABLOID 1017

Definition at line 27 of file resource.h.

#define IDC_TABLOID2 1021

Definition at line 31 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_BREAKFAST 108

Definition at line 8 of file resource.h.

#define IDD_DINNER 106

Definition at line 7 of file resource.h.

#define IDD_LUNCH 109

Definition at line 9 of file resource.h.

#define IDD_SNAP_FORM 101

Definition at line 6 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 10 of file resource.h.

#define IDR_SNAPTYPE 129

Definition at line 11 of file resource.h.

#define IDS_CHILDWND_TITLE 131

Definition at line 34 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/Snapdoc.cpp File Reference

  • general
  • snapvw

Snapdoc.cpp File Reference

#include "stdafx.h"
#include "SnapVw.h"
#include "SnapDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapdoc.h File Reference

  • general
  • snapvw
Classes

snapdoc.h File Reference

Go to the source code of this file.

Classes

class CSnapDoc
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapps.cpp File Reference

  • general
  • snapvw

snapps.cpp File Reference

#include "stdafx.h"
#include "SnapVw.h"
#include "SnapPs.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapps.h File Reference

  • general
  • snapvw
Classes

snapps.h File Reference

Go to the source code of this file.

Classes

class CSnapPropertySheet
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapview.cpp File Reference

  • general
  • snapvw

snapview.cpp File Reference

#include "stdafx.h"
#include "SnapVw.h"
#include "SnapDoc.h"
#include "SnapView.h"
#include "BkfstPg.h"
#include "LunchPg.h"
#include "DinnerPg.h"
#include "SnapPs.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapview.h File Reference

  • general
  • snapvw
Classes

snapview.h File Reference

Go to the source code of this file.

Classes

class CSnapView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapvw.cpp File Reference

  • general
  • snapvw
Classes | Variables

snapvw.cpp File Reference

#include "stdafx.h"
#include "SnapVw.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "SnapDoc.h"
#include "SnapView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CSnapApp theApp

Variable Documentation

CSnapApp theApp

Definition at line 54 of file snapvw.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapvw.h File Reference

  • general
  • snapvw
Classes

snapvw.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CSnapApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/stdafx.cpp File Reference

  • general
  • snapvw

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/stdafx.h File Reference

  • general
  • snapvw
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/MainFrm.cpp File Reference

  • general
  • spiro

MainFrm.cpp File Reference

#include "stdafx.h"
#include "spiro.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/MainFrm.h File Reference

  • general
  • spiro
Classes

MainFrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/piece.cpp File Reference

  • general
  • spiro
Variables

piece.cpp File Reference

#include "stdafx.h"
#include <math.h>
#include "piece.h"

Go to the source code of this file.

Variables

CSpiroView * g_pView

Variable Documentation

CSpiroView* g_pView

Definition at line 104 of file spiroView.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/piece.h File Reference

  • general
  • spiro
Classes | Defines

piece.h File Reference

Go to the source code of this file.

Classes

class | CBasePiece
class | CRing
class | CSpiroRect
class | CVector
class | CWheel

Defines

#define | HIT_NOTHING 0
#define | HIT_PEN_LOCATION 1
#define | PI 3.14159265359
#define | RINGWIDTH 25
#define | STEP_DISTANCE 10
#define | TOTALRINGS 4
#define | TOTALWHEELS 7

Define Documentation

#define HIT_NOTHING 0

Definition at line 96 of file piece.h.

#define HIT_PEN_LOCATION 1

Definition at line 95 of file piece.h.

#define PI 3.14159265359

Definition at line 16 of file piece.h.

#define RINGWIDTH 25

Definition at line 238 of file piece.h.

#define STEP_DISTANCE 10

Definition at line 167 of file piece.h.

#define TOTALRINGS 4

Definition at line 237 of file piece.h.

#define TOTALWHEELS 7

Definition at line 166 of file piece.h.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/resource.h File Reference

  • general
  • spiro
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BLACK 32808
#define | ID_BLUE 32804
#define | ID_DRAW 32776
#define | ID_DRAWPATTERN 32797
#define | ID_END_DRAWING 32812
#define | ID_ENORMOUSWHEEL 32779
#define | ID_FAST 32811
#define | ID_GREEN 32807
#define | ID_HUGERING 32776
#define | ID_HUGEWHEEL 32780
#define | ID_LARGEWHEEL 32782
#define | ID_MEDIUMRING 32778
#define | ID_MEDIUMWHEEL 32783
#define | ID_PAUSEDRAWING 32798
#define | ID_PENWIDTH 32773
#define | ID_PURPLE 32809
#define | ID_RED 32805
#define | ID_REMOVERING 32795
#define | ID_REMOVEWHEEL 32796
#define | ID_SMALLRING 32775
#define | ID_SMALLWHEEL 32784
#define | ID_TIMERTICK 32813
#define | ID_TINYWHEEL 32785
#define | ID_TRACEWIDTH 32799
#define | ID_VERYLARGERING 32777
#define | ID_VERYLARGEWHEEL 32781
#define | ID_YELLOW 32806
#define | ID_ZOOMIN 32801
#define | ID_ZOOMOUT 32803
#define | IDB_PENCIL 130
#define | IDC_DROPRING 134
#define | IDC_DROPWHEEL 132
#define | IDC_SLOW 32810
#define | IDD_ABOUTBOX 100
#define | IDR_MAINFRAME 128
#define | IDR_PIECES 133
#define | IDR_SPIROTYPE 129

Define Documentation

#define ID_BLACK 32808

Definition at line 36 of file resource.h.

#define ID_BLUE 32804

Definition at line 32 of file resource.h.

#define ID_DRAW 32776

Definition at line 14 of file resource.h.

#define ID_DRAWPATTERN 32797

Definition at line 27 of file resource.h.

#define ID_END_DRAWING 32812

Definition at line 40 of file resource.h.

#define ID_ENORMOUSWHEEL 32779

Definition at line 18 of file resource.h.

#define ID_FAST 32811

Definition at line 39 of file resource.h.

#define ID_GREEN 32807

Definition at line 35 of file resource.h.

#define ID_HUGERING 32776

Definition at line 15 of file resource.h.

#define ID_HUGEWHEEL 32780

Definition at line 19 of file resource.h.

#define ID_LARGEWHEEL 32782

Definition at line 21 of file resource.h.

#define ID_MEDIUMRING 32778

Definition at line 17 of file resource.h.

#define ID_MEDIUMWHEEL 32783

Definition at line 22 of file resource.h.

#define ID_PAUSEDRAWING 32798

Definition at line 28 of file resource.h.

#define ID_PENWIDTH 32773

Definition at line 12 of file resource.h.

#define ID_PURPLE 32809

Definition at line 37 of file resource.h.

#define ID_RED 32805

Definition at line 33 of file resource.h.

#define ID_REMOVERING 32795

Definition at line 25 of file resource.h.

#define ID_REMOVEWHEEL 32796

Definition at line 26 of file resource.h.

#define ID_SMALLRING 32775

Definition at line 13 of file resource.h.

#define ID_SMALLWHEEL 32784

Definition at line 23 of file resource.h.

#define ID_TIMERTICK 32813

Definition at line 41 of file resource.h.

#define ID_TINYWHEEL 32785

Definition at line 24 of file resource.h.

#define ID_TRACEWIDTH 32799

Definition at line 29 of file resource.h.

#define ID_VERYLARGERING 32777

Definition at line 16 of file resource.h.

#define ID_VERYLARGEWHEEL 32781

Definition at line 20 of file resource.h.

#define ID_YELLOW 32806

Definition at line 34 of file resource.h.

#define ID_ZOOMIN 32801

Definition at line 30 of file resource.h.

#define ID_ZOOMOUT 32803

Definition at line 31 of file resource.h.

#define IDB_PENCIL 130

Definition at line 8 of file resource.h.

#define IDC_DROPRING 134

Definition at line 11 of file resource.h.

#define IDC_DROPWHEEL 132

Definition at line 9 of file resource.h.

#define IDC_SLOW 32810

Definition at line 38 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDR_PIECES 133

Definition at line 10 of file resource.h.

#define IDR_SPIROTYPE 129

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiro.cpp File Reference

  • general
  • spiro
Classes | Variables

spiro.cpp File Reference

#include "stdafx.h"
#include "spiro.h"
#include "MainFrm.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CSpiroApp theApp

Variable Documentation

CSpiroApp theApp

Definition at line 49 of file spiro.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiro.h File Reference

  • general
  • spiro
Classes | Defines

spiro.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CSpiroApp

Defines

#define | GetApp() ((CSpiroApp*)AfxGetApp())

Define Documentation

#define GetApp ( ) ((CSpiroApp*)AfxGetApp())

Definition at line 57 of file spiro.h.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroDoc.cpp File Reference

  • general
  • spiro
Variables

spiroDoc.cpp File Reference

#include "stdafx.h"
#include "spiro.h"

Go to the source code of this file.

Variables

CSpiroView * g_pView

Variable Documentation

CSpiroView* g_pView

Definition at line 104 of file spiroView.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroDoc.h File Reference

  • general
  • spiro
Classes | Enumerations

spiroDoc.h File Reference

Go to the source code of this file.

Classes

class | CFigCommand
class | CFigure
class | CSpiroDoc

Enumerations

enum TRACE_COMMAND {
EMPTY_COMMAND = -1, SET_PEN_WIDTH, CHANGE_COLOR, MOVE_TO,
LINE_TO
}

Enumeration Type Documentation

enum TRACE_COMMAND
Enumerator:
EMPTY_COMMAND
SET_PEN_WIDTH
CHANGE_COLOR
MOVE_TO
LINE_TO

Definition at line 23 of file spiroDoc.h.

{
  EMPTY_COMMAND = -1,
  SET_PEN_WIDTH,
  CHANGE_COLOR,
  MOVE_TO,
  LINE_TO
};

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroView.cpp File Reference

  • general
  • spiro
Functions | Variables

spiroView.cpp File Reference

#include "stdafx.h"
#include "spiro.h"
#include "piece.h"
#include "mainfrm.h"

Go to the source code of this file.

Functions

int | CompareLong (const void *pn1, const void *pn2)

Variables

CSpiroView * | g_pView = NULL

Function Documentation

int CompareLong | ( | const void * | pn1,
 |  | const void * | pn2
 | ) |  |

Definition at line 931 of file spiroView.cpp.

{
  return *(long*)pn1 - *(long*)pn2;
}

Variable Documentation

CSpiroView* g_pView = NULL

Definition at line 104 of file spiroView.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroView.h File Reference

  • general
  • spiro
Classes

spiroView.h File Reference

#include "piece.h"

Go to the source code of this file.

Classes

class CSpiroView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/StdAfx.cpp File Reference

  • general
  • spiro

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/StdAfx.h File Reference

  • general
  • spiro
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>
#include <afxtempl.h>
#include "piece.h"
#include "spirodoc.h"
#include "spiroview.h"
#include <winspool.h>
#include <math.h>

Go to the source code of this file.

Defines

#define | CYCLE_ERROR 5
#define | elementsof(rgX) ((int)(sizeof(rgX) / sizeof(rgX[0])))
#define | MM_SPIRO MM_LOENGLISH
#define | PENMARKERSIZE 5
#define | TRACES_PER_TICK_FAST 16
#define | TRACES_PER_TICK_SLOW 8
#define | VC_EXTRALEAN

Define Documentation

#define CYCLE_ERROR 5

Definition at line 30 of file StdAfx.h.

#define elementsof ( rgX ) ((int)(sizeof(rgX) / sizeof(rgX[0])))

Definition at line 37 of file StdAfx.h.

#define MM_SPIRO MM_LOENGLISH

Definition at line 29 of file StdAfx.h.

#define PENMARKERSIZE 5

Definition at line 41 of file StdAfx.h.

#define TRACES_PER_TICK_FAST 16

Definition at line 32 of file StdAfx.h.

#define TRACES_PER_TICK_SLOW 8

Definition at line 31 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 21 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/dialogs.cpp File Reference

  • general
  • tracker

dialogs.cpp File Reference

#include "stdafx.h"
#include "trackapp.h"
#include "dialogs.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/dialogs.h File Reference

  • general
  • tracker
Classes

dialogs.h File Reference

Go to the source code of this file.

Classes

class | CHandleSize
class | CMinSize
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/mainfrm.cpp File Reference

  • general
  • tracker

mainfrm.cpp File Reference

#include "stdafx.h"
#include "trackapp.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/mainfrm.h File Reference

  • general
  • tracker
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/resource.h File Reference

  • general
  • tracker
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_EDIT_ALLOWINVERT 32774
#define | ID_EDIT_DOTTEDLINE 32769
#define | ID_EDIT_HATCHEDBORDER 32770
#define | ID_EDIT_HATCHEDINSIDE 32773
#define | ID_EDIT_RESIZEINSIDE 32771
#define | ID_EDIT_RESIZEOUTSIDE 32772
#define | ID_EDIT_SOLIDLINE 32768
#define | ID_VIEW_SETHANDLESIZE 32775
#define | ID_VIEW_SETMINIMUMSIZE 32776
#define | IDC_EDIT1 101
#define | IDC_EDIT2 102
#define | IDD_ABOUTBOX 100
#define | IDD_HANDLE_SIZE 101
#define | IDD_MIN_SIZE 102
#define | IDR_MAINFRAME 2
#define | IDR_TRACKETYPE 3

Define Documentation

#define ID_EDIT_ALLOWINVERT 32774

Definition at line 18 of file resource.h.

#define ID_EDIT_DOTTEDLINE 32769

Definition at line 13 of file resource.h.

#define ID_EDIT_HATCHEDBORDER 32770

Definition at line 14 of file resource.h.

#define ID_EDIT_HATCHEDINSIDE 32773

Definition at line 17 of file resource.h.

#define ID_EDIT_RESIZEINSIDE 32771

Definition at line 15 of file resource.h.

#define ID_EDIT_RESIZEOUTSIDE 32772

Definition at line 16 of file resource.h.

#define ID_EDIT_SOLIDLINE 32768

Definition at line 12 of file resource.h.

#define ID_VIEW_SETHANDLESIZE 32775

Definition at line 19 of file resource.h.

#define ID_VIEW_SETMINIMUMSIZE 32776

Definition at line 20 of file resource.h.

#define IDC_EDIT1 101

Definition at line 8 of file resource.h.

#define IDC_EDIT2 102

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 7 of file resource.h.

#define IDD_HANDLE_SIZE 101

Definition at line 9 of file resource.h.

#define IDD_MIN_SIZE 102

Definition at line 10 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

#define IDR_TRACKETYPE 3

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/stdafx.cpp File Reference

  • general
  • tracker

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/stdafx.h File Reference

  • general
  • tracker
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackapp.cpp File Reference

  • general
  • tracker
Classes | Variables

trackapp.cpp File Reference

#include "stdafx.h"
#include "trackapp.h"
#include "mainfrm.h"
#include "trackdoc.h"
#include "trackvw.h"

Go to the source code of this file.

Classes

class | CAboutDlg

Variables

CTrackerApp NEAR | theApp

Variable Documentation

CTrackerApp NEAR theApp

Definition at line 53 of file trackapp.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackapp.h File Reference

  • general
  • tracker
Classes

trackapp.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CTrackerApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackdoc.cpp File Reference

  • general
  • tracker

trackdoc.cpp File Reference

#include "stdafx.h"
#include "trackapp.h"
#include "trackdoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackdoc.h File Reference

  • general
  • tracker
Classes

trackdoc.h File Reference

Go to the source code of this file.

Classes

class CTrackerDoc
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackvw.cpp File Reference

  • general
  • tracker

trackvw.cpp File Reference

#include "stdafx.h"
#include "trackapp.h"
#include "trackdoc.h"
#include "trackvw.h"
#include "dialogs.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackvw.h File Reference

  • general
  • tracker
Classes

trackvw.h File Reference

Go to the source code of this file.

Classes

class CTrackerView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/Resource.h File Reference

  • general
  • VariantUse
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_Basic 1000
#define | IDC_Currency 1003
#define | IDC_Date 1002
#define | IDC_MultiDimensionArray 1004
#define | IDC_OleArray 1006
#define | IDC_SafeArray 1005
#define | IDC_Strings 1001
#define | IDD_ABOUTBOX 100
#define | IDD_VARIANTUSE_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101

Define Documentation

#define IDC_Basic 1000

Definition at line 10 of file Resource.h.

#define IDC_Currency 1003

Definition at line 13 of file Resource.h.

#define IDC_Date 1002

Definition at line 12 of file Resource.h.

#define IDC_MultiDimensionArray 1004

Definition at line 14 of file Resource.h.

#define IDC_OleArray 1006

Definition at line 16 of file Resource.h.

#define IDC_SafeArray 1005

Definition at line 15 of file Resource.h.

#define IDC_Strings 1001

Definition at line 11 of file Resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file Resource.h.

#define IDD_VARIANTUSE_DIALOG 102

Definition at line 8 of file Resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file Resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/StdAfx.cpp File Reference

  • general
  • VariantUse

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/StdAfx.h File Reference

  • general
  • VariantUse
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 20 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUse.cpp File Reference

  • general
  • VariantUse
Variables

VariantUse.cpp File Reference

#include "stdafx.h"
#include "VariantUse.h"
#include "VariantUseDlg.h"

Go to the source code of this file.

Variables

CVarUseApp theApp

Variable Documentation

CVarUseApp theApp

Definition at line 44 of file VariantUse.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUse.h File Reference

  • general
  • VariantUse
Classes

VariantUse.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CVarUseApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUseDlg.cpp File Reference

  • general
  • VariantUse
Classes

VariantUseDlg.cpp File Reference

#include "stdafx.h"
#include "VariantUse.h"
#include "VariantUseDlg.h"
#include <atlconv.h>
#include <atlbase.h>
#include <comdef.h>

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUseDlg.h File Reference

  • general
  • VariantUse
Classes

VariantUseDlg.h File Reference

Go to the source code of this file.

Classes

class CVarUseDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/enterdlg.cpp File Reference

  • general
  • viewex

enterdlg.cpp File Reference

#include "stdafx.h"
#include "viewex.h"
#include "enterdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/enterdlg.h File Reference

  • general
  • viewex
Classes

enterdlg.h File Reference

Go to the source code of this file.

Classes

class CEnterDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/inputvw.cpp File Reference

  • general
  • viewex

inputvw.cpp File Reference

#include "stdafx.h"
#include "viewex.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/inputvw.h File Reference

  • general
  • viewex
Classes

inputvw.h File Reference

Go to the source code of this file.

Classes

class CInputView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/maindoc.cpp File Reference

  • general
  • viewex

maindoc.cpp File Reference

#include "stdafx.h"
#include "viewex.h"
#include "enterdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/maindoc.h File Reference

  • general
  • viewex
Classes

maindoc.h File Reference

Go to the source code of this file.

Classes

class CMainDoc
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/resource.h File Reference

  • general
  • viewex
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_EDIT1 100
#define | IDC_GROUPBOX1 1005
#define | IDC_RADIO1 201
#define | IDC_RADIO2 202
#define | IDC_RADIO3 203
#define | IDD_ABOUTBOX 2000
#define | IDD_CHANGEDATA 2002
#define | IDD_INPUTFORM 2001
#define | IDM_CHANGEDATA 1001
#define | IDR_COLORTYPE 4
#define | IDR_INPUTTYPE 5
#define | IDR_MAINFRAME 128
#define | IDR_SPLIT2TYPE 6
#define | IDR_SPLIT3TYPE 7
#define | IDR_TEXTTYPE 129

Define Documentation

#define IDC_EDIT1 100

Definition at line 11 of file resource.h.

#define IDC_GROUPBOX1 1005

Definition at line 16 of file resource.h.

#define IDC_RADIO1 201

Definition at line 12 of file resource.h.

#define IDC_RADIO2 202

Definition at line 13 of file resource.h.

#define IDC_RADIO3 203

Definition at line 14 of file resource.h.

#define IDD_ABOUTBOX 2000

Definition at line 17 of file resource.h.

#define IDD_CHANGEDATA 2002

Definition at line 19 of file resource.h.

#define IDD_INPUTFORM 2001

Definition at line 18 of file resource.h.

#define IDM_CHANGEDATA 1001

Definition at line 15 of file resource.h.

#define IDR_COLORTYPE 4

Definition at line 7 of file resource.h.

#define IDR_INPUTTYPE 5

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 5 of file resource.h.

#define IDR_SPLIT2TYPE 6

Definition at line 9 of file resource.h.

#define IDR_SPLIT3TYPE 7

Definition at line 10 of file resource.h.

#define IDR_TEXTTYPE 129

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/simpvw.cpp File Reference

  • general
  • viewex

simpvw.cpp File Reference

#include "stdafx.h"
#include "viewex.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/simpvw.h File Reference

  • general
  • viewex
Classes

simpvw.h File Reference

Go to the source code of this file.

Classes

class | CColorView
class | CTextView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/splitter.cpp File Reference

  • general
  • viewex

splitter.cpp File Reference

#include "stdafx.h"
#include "viewex.h"
#include "splitter.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/splitter.h File Reference

  • general
  • viewex
Classes

splitter.h File Reference

Go to the source code of this file.

Classes

class | C3WaySplitterFrame
class | CSplitterFrame
class | CViewExSplitWnd
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/stdafx.cpp File Reference

  • general
  • viewex

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/stdafx.h File Reference

  • general
  • viewex
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 10 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/viewex.cpp File Reference

  • general
  • viewex
Variables

viewex.cpp File Reference

#include "stdafx.h"
#include "viewex.h"
#include "splitter.h"

Go to the source code of this file.

Variables

CViewExApp NEAR theApp

Variable Documentation

CViewExApp NEAR theApp

Definition at line 44 of file viewex.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/viewex.h File Reference

  • general
  • viewex
Classes

viewex.h File Reference

#include "resource.h"
#include "maindoc.h"
#include "simpvw.h"
#include "inputvw.h"
#include "resource.h"
#include "maindoc.h"

Go to the source code of this file.

Classes

class CViewExApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExplore.cpp File Reference

  • internet
  • DHtmlExplore
Variables

DHtmlExplore.cpp File Reference

#include "stdafx.h"
#include "DHtmlExplore.h"
#include "DHtmlExploreDlg.h"

Go to the source code of this file.

Variables

CDHtmlExploreApp theApp

Variable Documentation

CDHtmlExploreApp theApp

Definition at line 44 of file DHtmlExplore.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExplore.h File Reference

  • internet
  • DHtmlExplore
Classes

DHtmlExplore.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDHtmlExploreApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExploreDlg.cpp File Reference

  • internet
  • DHtmlExplore
Classes

DHtmlExploreDlg.cpp File Reference

#include "stdafx.h"
#include "DHtmlExplore.h"
#include "DHtmlExploreDlg.h"
#include "PropertiesDlg.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExploreDlg.h File Reference

  • internet
  • DHtmlExplore
Classes

DHtmlExploreDlg.h File Reference

Go to the source code of this file.

Classes

class CDHtmlExploreDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/PropertiesDlg.cpp File Reference

  • internet
  • DHtmlExplore

PropertiesDlg.cpp File Reference

#include "stdafx.h"
#include "DHtmlExplore.h"
#include "PropertiesDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/PropertiesDlg.h File Reference

  • internet
  • DHtmlExplore
Classes

PropertiesDlg.h File Reference

Go to the source code of this file.

Classes

class CPropertiesDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/resource.h File Reference

  • internet
  • DHtmlExplore
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CONTEXT_BROWSE 32771
#define | ID_CONTEXT_EXIT 32773
#define | ID_CONTEXT_PROPERTIES 32774
#define | IDD_ABOUTBOX 100
#define | IDD_DHTMLEXPLORE_DIALOG 102
#define | IDD_PROPERTIES 133
#define | IDM_ABOUTBOX 0x0010
#define | IDR_CONTEXT_MENU 132
#define | IDR_EXPLORE 129
#define | IDR_MAINFRAME 128
#define | IDR_PROPERTIES 134
#define | IDS_ABOUTBOX 101

Define Documentation

#define ID_CONTEXT_BROWSE 32771

Definition at line 14 of file resource.h.

#define ID_CONTEXT_EXIT 32773

Definition at line 15 of file resource.h.

#define ID_CONTEXT_PROPERTIES 32774

Definition at line 16 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_DHTMLEXPLORE_DIALOG 102

Definition at line 8 of file resource.h.

#define IDD_PROPERTIES 133

Definition at line 12 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 132

Definition at line 11 of file resource.h.

#define IDR_EXPLORE 129

Definition at line 10 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDR_PROPERTIES 134

Definition at line 13 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/StdAfx.cpp File Reference

  • internet
  • DHtmlExplore

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/StdAfx.h File Reference

  • internet
  • DHtmlExplore
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxdhtml.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/AddressCombo.cpp File Reference

  • internet
  • HTMLEdit
Defines

AddressCombo.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "AddressCombo.h"

Go to the source code of this file.

Defines

#define BUFF_LEN 512

Define Documentation

#define BUFF_LEN 512

Definition at line 42 of file AddressCombo.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/AddressCombo.h File Reference

  • internet
  • HTMLEdit
Classes

AddressCombo.h File Reference

Go to the source code of this file.

Classes

class CAddressCombo
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/EditToolbar.cpp File Reference

  • internet
  • HTMLEdit

EditToolbar.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "EditToolbar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/EditToolbar.h File Reference

  • internet
  • HTMLEdit
Classes

EditToolbar.h File Reference

Go to the source code of this file.

Classes

class CEditToolbar
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/GetURL.cpp File Reference

  • internet
  • HTMLEdit

GetURL.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "GetURL.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/GetURL.h File Reference

  • internet
  • HTMLEdit
Classes

GetURL.h File Reference

#include "addresscombo.h"

Go to the source code of this file.

Classes

class CGetURL
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdDoc.cpp File Reference

  • internet
  • HTMLEdit

HTMLEdDoc.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "HTMLEdDoc.h"
#include "htmledview.h"
#include "geturl.h"
#include "mainfrm.h"
#include "sourceview.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdDoc.h File Reference

  • internet
  • HTMLEdit
Classes | Defines

HTMLEdDoc.h File Reference

Go to the source code of this file.

Classes

class | CHTMLEdDoc

Defines

#define | DELETE_EXCEPTION(e) do { e->Delete(); } while (0)

Define Documentation

#define DELETE_EXCEPTION ( e ) do { e->Delete(); } while (0)

Definition at line 21 of file HTMLEdDoc.h.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/htmledit.cpp File Reference

  • internet
  • HTMLEdit
Classes | Variables

htmledit.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "MainFrm.h"
#include "HTMLEdDoc.h"
#include "HTMLEdView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CHTMLEditApp theApp

Variable Documentation

CHTMLEditApp theApp

Definition at line 53 of file htmledit.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/htmledit.h File Reference

  • internet
  • HTMLEdit
Classes

htmledit.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CHTMLEditApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdView.cpp File Reference

  • internet
  • HTMLEdit
Functions

HTMLEdView.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "HTMLEdDoc.h"
#include "htmledview.h"
#include "mainfrm.h"
#include <afxpriv.h>

Go to the source code of this file.

Functions

UINT_PTR CALLBACK CdlgHook (HWND hdlg, UINT uiMsg, WPARAM, LPARAM lParam)

Function Documentation

UINT_PTR CALLBACK CdlgHook | ( | HWND | hdlg,
 |  | UINT | uiMsg,
 |  | WPARAM | ,
 |  | LPARAM | lParam
 | ) |  |

Definition at line 356 of file HTMLEdView.cpp.

{
  if(uiMsg == WM_INITDIALOG)
  {
    CHOOSECOLOR *pcc = (CHOOSECOLOR*)lParam;
    CRect *rc = (CRect*)pcc->lCustData;
    if(rc)
      SetWindowPos(hdlg,HWND_TOP,rc->right,rc->bottom,
      0,0,SWP_NOZORDER|SWP_NOSIZE);
    SetWindowText(hdlg, _T("Choose a Foreground Color"));
    delete rc;
  }
  return 0;
}

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdView.h File Reference

  • internet
  • HTMLEdit
Classes | Defines

HTMLEdView.h File Reference

Go to the source code of this file.

Classes

class | CFormatMenu
class | CHTMLEdView

Defines

#define | COLORBASE 300
#define | FORMATBASE 200

Define Documentation

#define COLORBASE 300

Definition at line 23 of file HTMLEdView.h.

#define FORMATBASE 200

Definition at line 22 of file HTMLEdView.h.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/InsertTbl.cpp File Reference

  • internet
  • HTMLEdit

InsertTbl.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "InsertTbl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/InsertTbl.h File Reference

  • internet
  • HTMLEdit
Classes

InsertTbl.h File Reference

Go to the source code of this file.

Classes

class CInsertTableDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/MainFrm.cpp File Reference

  • internet
  • HTMLEdit
Functions

MainFrm.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "MainFrm.h"
#include "htmleddoc.h"
#include "htmlEdView.h"
#include "sourceview.h"

Go to the source code of this file.

Functions

BOOL | CreateEditBar ()
INT CALLBACK | NEnumFontNameProc (LOGFONT *plf, TEXTMETRIC *, INT, LPARAM lParam)

Function Documentation

BOOL CreateEditBar ( )
INT CALLBACK NEnumFontNameProc | ( | LOGFONT * | plf,
 |  | TEXTMETRIC * | ,
 |  | INT | ,
 |  | LPARAM | lParam
 | ) |  |

Definition at line 145 of file MainFrm.cpp.

{
  CComboBox* comboBox = (CComboBox*) lParam;

  comboBox->AddString(plf->lfFaceName);

  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/MainFrm.h File Reference

  • internet
  • HTMLEdit
Classes

MainFrm.h File Reference

#include "edittoolbar.h"
#include "SourceView.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/resource.h File Reference

  • internet
  • HTMLEdit
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | CG_ID_VIEW_FONTDLGBAR 103
#define | CG_IDD_FONTDLGBAR 102
#define | ID_BUTTON_ABSOLUTE 32808
#define | ID_BUTTON_BLOCKFMT 32946
#define | ID_BUTTON_BOLD 32821
#define | ID_BUTTON_BULLETLIST 32831
#define | ID_BUTTON_CENTER 32827
#define | ID_BUTTON_CENTERJUSTIFY 32805
#define | ID_BUTTON_COLOR 32945
#define | ID_BUTTON_FONTNAME 32822
#define | ID_BUTTON_FONTSIZE 32801
#define | ID_BUTTON_HYPERLINK 32804
#define | ID_BUTTON_IMAGE 32791
#define | ID_BUTTON_INDENT 32833
#define | ID_BUTTON_ITALIC 32825
#define | ID_BUTTON_LEFTJUSTIFY 32828
#define | ID_BUTTON_NUMBERLIST 32834
#define | ID_BUTTON_OUTDENT 32832
#define | ID_BUTTON_RIGHTJUSTIFY 32829
#define | ID_BUTTON_STATIC 32809
#define | ID_BUTTON_UNDERLINE 32826
#define | ID_BUTTONSTATIC 32809
#define | ID_EDIT_FONT 32777
#define | ID_EDIT_SELECTALL 32776
#define | ID_EDIT_TEST 32778
#define | ID_FILE_OPENURL 32774
#define | ID_FMTBAR_FONTNAME 104
#define | ID_FMTBAR_FONTSIZE 105
#define | ID_FORMAT_ABSOLUTEPOSITIONELEMENT 32799
#define | ID_FORMAT_BRINGABOVETEXT 32798
#define | ID_FORMAT_BRINGFORWARD 32796
#define | ID_FORMAT_BRINGTOFRONT 32794
#define | ID_FORMAT_SENDBACKWARD 32795
#define | ID_FORMAT_SENDBELOWTEXT 32797
#define | ID_FORMAT_SENDTOBACK 32793
#define | ID_FORMAT_STATICELEMENT 32800
#define | ID_INDICATOR_VIEW 145
#define | ID_Menu 138
#define | ID_TABLE_DELETECELLS 32788
#define | ID_TABLE_DELETECOLUMNS 32784
#define | ID_TABLE_DELETEROWS 32783
#define | ID_TABLE_INSERT 32779
#define | ID_TABLE_INSERTCELL 32787
#define | ID_TABLE_INSERTCOLUMN 32782
#define | ID_TABLE_INSERTROW 32781
#define | ID_TABLE_INSERTTABLE 32780
#define | ID_TABLE_MERGECELLS 32785
#define | ID_TABLE_SPLITCELL 32786
#define | ID_TOOLBAR_EDITING 144
#define | ID_VIEW_EDITINGTOOLBAR 32792
#define | ID_VIEW_SOURCE 32803
#define | ID_VIEW_WEB 32802
#define | IDC_ADDRCOMBO 106
#define | IDC_BTN_SEARCH 1017
#define | IDC_BTNGO 1015
#define | IDC_EDIT 137
#define | IDC_EDIT_CAPTION 1010
#define | IDC_EDIT_CELLATTRIBS 1009
#define | IDC_EDIT_DESIGNMODE 32775
#define | IDC_EDIT_EDITMODE 32771
#define | IDC_EDIT_NUMCOLS 1005
#define | IDC_EDIT_NUMROWS 1004
#define | IDC_EDIT_TABLEATTRIBS 1008
#define | IDC_EDURL 1000
#define | IDC_EXPLORER 1013
#define | IDC_FONTNAME 1001
#define | IDC_FONTSIZE 1002
#define | IDC_FONTSTYLE 1003
#define | IDC_PHSTATIC 1014
#define | IDC_SPIN1 1006
#define | IDC_SPIN2 1007
#define | IDD_ABOUTBOX 100
#define | IDD_INSERT_TABLE 133
#define | IDD_URLDIALOG 130
#define | IDR_EDITPOPUP 136
#define | IDR_HTMLEDTYPE 129
#define | IDR_MAINFRAME 128
#define | IDR_MENU1 136

Define Documentation

#define CG_ID_VIEW_FONTDLGBAR 103

Definition at line 7 of file resource.h.

#define CG_IDD_FONTDLGBAR 102

Definition at line 6 of file resource.h.

#define ID_BUTTON_ABSOLUTE 32808

Definition at line 67 of file resource.h.

#define ID_BUTTON_BLOCKFMT 32946

Definition at line 82 of file resource.h.

#define ID_BUTTON_BOLD 32821

Definition at line 70 of file resource.h.

#define ID_BUTTON_BULLETLIST 32831

Definition at line 77 of file resource.h.

#define ID_BUTTON_CENTER 32827

Definition at line 74 of file resource.h.

#define ID_BUTTON_CENTERJUSTIFY 32805

Definition at line 66 of file resource.h.

#define ID_BUTTON_COLOR 32945

Definition at line 81 of file resource.h.

#define ID_BUTTON_FONTNAME 32822

Definition at line 71 of file resource.h.

#define ID_BUTTON_FONTSIZE 32801

Definition at line 62 of file resource.h.

#define ID_BUTTON_HYPERLINK 32804

Definition at line 65 of file resource.h.

#define ID_BUTTON_IMAGE 32791

Definition at line 52 of file resource.h.

#define ID_BUTTON_INDENT 32833

Definition at line 79 of file resource.h.

#define ID_BUTTON_ITALIC 32825

Definition at line 72 of file resource.h.

#define ID_BUTTON_LEFTJUSTIFY 32828

Definition at line 75 of file resource.h.

#define ID_BUTTON_NUMBERLIST 32834

Definition at line 80 of file resource.h.

#define ID_BUTTON_OUTDENT 32832

Definition at line 78 of file resource.h.

#define ID_BUTTON_RIGHTJUSTIFY 32829

Definition at line 76 of file resource.h.

#define ID_BUTTON_STATIC 32809

Definition at line 69 of file resource.h.

#define ID_BUTTON_UNDERLINE 32826

Definition at line 73 of file resource.h.

#define ID_BUTTONSTATIC 32809

Definition at line 68 of file resource.h.

#define ID_EDIT_FONT 32777

Definition at line 40 of file resource.h.

#define ID_EDIT_SELECTALL 32776

Definition at line 39 of file resource.h.

#define ID_EDIT_TEST 32778

Definition at line 41 of file resource.h.

#define ID_FILE_OPENURL 32774

Definition at line 37 of file resource.h.

#define ID_FMTBAR_FONTNAME 104

Definition at line 8 of file resource.h.

#define ID_FMTBAR_FONTSIZE 105

Definition at line 9 of file resource.h.

#define ID_FORMAT_ABSOLUTEPOSITIONELEMENT 32799

Definition at line 60 of file resource.h.

#define ID_FORMAT_BRINGABOVETEXT 32798

Definition at line 59 of file resource.h.

#define ID_FORMAT_BRINGFORWARD 32796

Definition at line 57 of file resource.h.

#define ID_FORMAT_BRINGTOFRONT 32794

Definition at line 55 of file resource.h.

#define ID_FORMAT_SENDBACKWARD 32795

Definition at line 56 of file resource.h.

#define ID_FORMAT_SENDBELOWTEXT 32797

Definition at line 58 of file resource.h.

#define ID_FORMAT_SENDTOBACK 32793

Definition at line 54 of file resource.h.

#define ID_FORMAT_STATICELEMENT 32800

Definition at line 61 of file resource.h.

#define ID_INDICATOR_VIEW 145

Definition at line 20 of file resource.h.

#define ID_Menu 138

Definition at line 18 of file resource.h.

#define ID_TABLE_DELETECELLS 32788

Definition at line 51 of file resource.h.

#define ID_TABLE_DELETECOLUMNS 32784

Definition at line 47 of file resource.h.

#define ID_TABLE_DELETEROWS 32783

Definition at line 46 of file resource.h.

#define ID_TABLE_INSERT 32779

Definition at line 42 of file resource.h.

#define ID_TABLE_INSERTCELL 32787

Definition at line 50 of file resource.h.

#define ID_TABLE_INSERTCOLUMN 32782

Definition at line 45 of file resource.h.

#define ID_TABLE_INSERTROW 32781

Definition at line 44 of file resource.h.

#define ID_TABLE_INSERTTABLE 32780

Definition at line 43 of file resource.h.

#define ID_TABLE_MERGECELLS 32785

Definition at line 48 of file resource.h.

#define ID_TABLE_SPLITCELL 32786

Definition at line 49 of file resource.h.

#define ID_TOOLBAR_EDITING 144

Definition at line 19 of file resource.h.

#define ID_VIEW_EDITINGTOOLBAR 32792

Definition at line 53 of file resource.h.

#define ID_VIEW_SOURCE 32803

Definition at line 64 of file resource.h.

#define ID_VIEW_WEB 32802

Definition at line 63 of file resource.h.

#define IDC_ADDRCOMBO 106

Definition at line 10 of file resource.h.

#define IDC_BTN_SEARCH 1017

Definition at line 35 of file resource.h.

#define IDC_BTNGO 1015

Definition at line 34 of file resource.h.

#define IDC_EDIT 137

Definition at line 17 of file resource.h.

#define IDC_EDIT_CAPTION 1010

Definition at line 31 of file resource.h.

#define IDC_EDIT_CELLATTRIBS 1009

Definition at line 30 of file resource.h.

#define IDC_EDIT_DESIGNMODE 32775

Definition at line 38 of file resource.h.

#define IDC_EDIT_EDITMODE 32771

Definition at line 36 of file resource.h.

#define IDC_EDIT_NUMCOLS 1005

Definition at line 26 of file resource.h.

#define IDC_EDIT_NUMROWS 1004

Definition at line 25 of file resource.h.

#define IDC_EDIT_TABLEATTRIBS 1008

Definition at line 29 of file resource.h.

#define IDC_EDURL 1000

Definition at line 21 of file resource.h.

#define IDC_EXPLORER 1013

Definition at line 32 of file resource.h.

#define IDC_FONTNAME 1001

Definition at line 22 of file resource.h.

#define IDC_FONTSIZE 1002

Definition at line 23 of file resource.h.

#define IDC_FONTSTYLE 1003

Definition at line 24 of file resource.h.

#define IDC_PHSTATIC 1014

Definition at line 33 of file resource.h.

#define IDC_SPIN1 1006

Definition at line 27 of file resource.h.

#define IDC_SPIN2 1007

Definition at line 28 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_INSERT_TABLE 133

Definition at line 14 of file resource.h.

#define IDD_URLDIALOG 130

Definition at line 13 of file resource.h.

#define IDR_EDITPOPUP 136

Definition at line 16 of file resource.h.

#define IDR_HTMLEDTYPE 129

Definition at line 12 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 11 of file resource.h.

#define IDR_MENU1 136

Definition at line 15 of file resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/SourceView.cpp File Reference

  • internet
  • HTMLEdit

SourceView.cpp File Reference

#include "stdafx.h"
#include "HTMLEdit.h"
#include "SourceView.h"
#include "htmleddoc.h"
#include "mainfrm.h"
#include "htmledview.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/SourceView.h File Reference

  • internet
  • HTMLEdit
Classes

SourceView.h File Reference

Go to the source code of this file.

Classes

class CSourceView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/StdAfx.cpp File Reference

  • internet
  • HTMLEdit

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/StdAfx.h File Reference

  • internet
  • HTMLEdit
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxdlgs.h>
#include <atlbase.h>
#include <afxhtml.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 21 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/MainFrm.cpp File Reference

  • internet
  • MFCIE

MainFrm.cpp File Reference

#include "stdafx.h"
#include "mfcie.h"
#include <wininet.h>
#include "MainFrm.h"
#include "mfcieDoc.h"
#include "mfcieVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/MainFrm.h File Reference

  • internet
  • MFCIE
Classes

MainFrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcie.cpp File Reference

  • internet
  • MFCIE
Classes | Variables

mfcie.cpp File Reference

#include "stdafx.h"
#include "mfcie.h"
#include "MainFrm.h"
#include "mfcieDoc.h"
#include "mfcieVw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CMfcieApp theApp

Variable Documentation

CMfcieApp theApp

Definition at line 47 of file mfcie.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcie.h File Reference

  • internet
  • MFCIE
Classes

mfcie.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CMfcieApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieDoc.cpp File Reference

  • internet
  • MFCIE

mfcieDoc.cpp File Reference

#include "stdafx.h"
#include "mfcie.h"
#include "mfcieDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieDoc.h File Reference

  • internet
  • MFCIE
Classes

mfcieDoc.h File Reference

Go to the source code of this file.

Classes

class CMfcieDoc
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieVw.cpp File Reference

  • internet
  • MFCIE

mfcieVw.cpp File Reference

#include "stdafx.h"
#include "mfcie.h"
#include "MainFrm.h"
#include "mfcieDoc.h"
#include "mfcieVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieVw.h File Reference

  • internet
  • MFCIE
Classes

mfcieVw.h File Reference

Go to the source code of this file.

Classes

class CMfcieView
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/Resource.h File Reference

  • internet
  • MFCIE
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BOGUS 32818
#define | ID_FAVORITES_DROPDOWN 32792
#define | ID_FONT_DROPDOWN 32793
#define | ID_GO_BACK 32787
#define | ID_GO_BEST_OF_THE_WEB 32791
#define | ID_GO_FORWARD 32788
#define | ID_GO_SEARCH_THE_WEB 32790
#define | ID_GO_START_PAGE 32789
#define | ID_HELP_MICROSOFT_ON_THE_WEB_BEST_OF_THE_WEB 32805
#define | ID_HELP_MICROSOFT_ON_THE_WEB_FREE_STUFF 32801
#define | ID_HELP_MICROSOFT_ON_THE_WEB_FREQUENTLY_ASKED_QUESTIONS 32803
#define | ID_HELP_MICROSOFT_ON_THE_WEB_GET_FASTER_INTERNET_ACCESS 32802
#define | ID_HELP_MICROSOFT_ON_THE_WEB_INTERNET_START_PAGE 32812
#define | ID_HELP_MICROSOFT_ON_THE_WEB_MICROSOFT_HOME_PAGE 32807
#define | ID_HELP_MICROSOFT_ON_THE_WEB_SEARCH_THE_WEB 32806
#define | ID_HELP_MICROSOFT_ON_THE_WEB_SEND_FEEDBACK 32804
#define | ID_HELP_ONLINE_SUPPORT 32800
#define | ID_HELP_WEB_TUTORIAL 32798
#define | ID_VIEW_FONTS_LARGE 32783
#define | ID_VIEW_FONTS_LARGEST 32782
#define | ID_VIEW_FONTS_MEDIUM 32784
#define | ID_VIEW_FONTS_SMALL 32785
#define | ID_VIEW_FONTS_SMALLEST 32786
#define | ID_VIEW_REFRESH 32779
#define | ID_VIEW_STOP 32778
#define | IDB_COLDTOOLBAR 261
#define | IDB_HOTTOOLBAR 262
#define | IDD_ABOUTBOX 100
#define | IDP_SOCKETS_INIT_FAILED 104
#define | IDR_FAVORITES_POPUP 133
#define | IDR_FONT_POPUP 132
#define | IDR_MAINFRAME 128
#define | IDR_MFCAVI 131
#define | IDR_MFCIETYPE 129
#define | IDS_ADDRESS 757
#define | IDS_BACK 748
#define | IDS_BEST_OF_THE_WEB 745
#define | IDS_FAVORITES 754
#define | IDS_FILETYPES 1201
#define | IDS_FONT 756
#define | IDS_FORWARD 749
#define | IDS_FREE_STUFF 738
#define | IDS_FREQUENTLY_ASKED_QUESTIONS 742
#define | IDS_GET_FASTER_INTERNET_ACCESS 741
#define | IDS_HOME 752
#define | IDS_INTERNET_START_PAGE 743
#define | IDS_MICROSOFT_HOME_PAGE 747
#define | IDS_ONLINE_SUPPORT 737
#define | IDS_PRINT 755
#define | IDS_REFRESH 751
#define | IDS_SEARCH 753
#define | IDS_SEARCH_THE_WEB 746
#define | IDS_SEND_FEEDBACK 744
#define | IDS_STOP 750
#define | IDS_WEB_TUTORIAL 736

Define Documentation

#define ID_BOGUS 32818

Definition at line 59 of file Resource.h.

#define ID_FAVORITES_DROPDOWN 32792

Definition at line 47 of file Resource.h.

#define ID_FONT_DROPDOWN 32793

Definition at line 48 of file Resource.h.

#define ID_GO_BACK 32787

Definition at line 42 of file Resource.h.

#define ID_GO_BEST_OF_THE_WEB 32791

Definition at line 46 of file Resource.h.

#define ID_GO_FORWARD 32788

Definition at line 43 of file Resource.h.

#define ID_GO_SEARCH_THE_WEB 32790

Definition at line 45 of file Resource.h.

#define ID_GO_START_PAGE 32789

Definition at line 44 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_BEST_OF_THE_WEB 32805

Definition at line 55 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_FREE_STUFF 32801

Definition at line 51 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_FREQUENTLY_ASKED_QUESTIONS 32803

Definition at line 53 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_GET_FASTER_INTERNET_ACCESS 32802

Definition at line 52 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_INTERNET_START_PAGE 32812

Definition at line 58 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_MICROSOFT_HOME_PAGE 32807

Definition at line 57 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_SEARCH_THE_WEB 32806

Definition at line 56 of file Resource.h.

#define ID_HELP_MICROSOFT_ON_THE_WEB_SEND_FEEDBACK 32804

Definition at line 54 of file Resource.h.

#define ID_HELP_ONLINE_SUPPORT 32800

Definition at line 50 of file Resource.h.

#define ID_HELP_WEB_TUTORIAL 32798

Definition at line 49 of file Resource.h.

#define ID_VIEW_FONTS_LARGE 32783

Definition at line 38 of file Resource.h.

#define ID_VIEW_FONTS_LARGEST 32782

Definition at line 37 of file Resource.h.

#define ID_VIEW_FONTS_MEDIUM 32784

Definition at line 39 of file Resource.h.

#define ID_VIEW_FONTS_SMALL 32785

Definition at line 40 of file Resource.h.

#define ID_VIEW_FONTS_SMALLEST 32786

Definition at line 41 of file Resource.h.

#define ID_VIEW_REFRESH 32779

Definition at line 36 of file Resource.h.

#define ID_VIEW_STOP 32778

Definition at line 35 of file Resource.h.

#define IDB_COLDTOOLBAR 261

Definition at line 12 of file Resource.h.

#define IDB_HOTTOOLBAR 262

Definition at line 13 of file Resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file Resource.h.

#define IDP_SOCKETS_INIT_FAILED 104

Definition at line 6 of file Resource.h.

#define IDR_FAVORITES_POPUP 133

Definition at line 11 of file Resource.h.

#define IDR_FONT_POPUP 132

Definition at line 10 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file Resource.h.

#define IDR_MFCAVI 131

Definition at line 9 of file Resource.h.

#define IDR_MFCIETYPE 129

Definition at line 8 of file Resource.h.

#define IDS_ADDRESS 757

Definition at line 33 of file Resource.h.

#define IDS_BACK 748

Definition at line 24 of file Resource.h.

#define IDS_BEST_OF_THE_WEB 745

Definition at line 21 of file Resource.h.

#define IDS_FAVORITES 754

Definition at line 30 of file Resource.h.

#define IDS_FILETYPES 1201

Definition at line 34 of file Resource.h.

#define IDS_FONT 756

Definition at line 32 of file Resource.h.

#define IDS_FORWARD 749

Definition at line 25 of file Resource.h.

#define IDS_FREE_STUFF 738

Definition at line 16 of file Resource.h.

#define IDS_FREQUENTLY_ASKED_QUESTIONS 742

Definition at line 18 of file Resource.h.

#define IDS_GET_FASTER_INTERNET_ACCESS 741

Definition at line 17 of file Resource.h.

#define IDS_HOME 752

Definition at line 28 of file Resource.h.

#define IDS_INTERNET_START_PAGE 743

Definition at line 19 of file Resource.h.

#define IDS_MICROSOFT_HOME_PAGE 747

Definition at line 23 of file Resource.h.

#define IDS_ONLINE_SUPPORT 737

Definition at line 15 of file Resource.h.

#define IDS_PRINT 755

Definition at line 31 of file Resource.h.

#define IDS_REFRESH 751

Definition at line 27 of file Resource.h.

#define IDS_SEARCH 753

Definition at line 29 of file Resource.h.

#define IDS_SEARCH_THE_WEB 746

Definition at line 22 of file Resource.h.

#define IDS_SEND_FEEDBACK 744

Definition at line 20 of file Resource.h.

#define IDS_STOP 750

Definition at line 26 of file Resource.h.

#define IDS_WEB_TUTORIAL 736

Definition at line 14 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/StdAfx.cpp File Reference

  • internet
  • MFCIE

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/StdAfx.h File Reference

  • internet
  • MFCIE
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxcmn.h>
#include <afxhtml.h>
#include <afxsock.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 22 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/EnterInfoDlg.cpp File Reference

  • internet
  • Scheduler

EnterInfoDlg.cpp File Reference

#include "stdafx.h"
#include "EnterInfoDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/EnterInfoDlg.h File Reference

  • internet
  • Scheduler
Classes

EnterInfoDlg.h File Reference

#include "Scheduler.h"

Go to the source code of this file.

Classes

class CEntryInfoDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/MyScheduler.cpp File Reference

  • internet
  • Scheduler

MyScheduler.cpp File Reference

#include "stdafx.h"
#include "Scheduler.h"
#include "MyScheduler.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/MyScheduler.h File Reference

  • internet
  • Scheduler
Classes

MyScheduler.h File Reference

Go to the source code of this file.

Classes

class CMyScheduler
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/resource.h File Reference

  • internet
  • Scheduler
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDD_ABOUTBOX 100
#define | IDD_DELETEENTRIEDLG 106
#define | IDD_DELETESCHEDULEDLG 108
#define | IDD_DELETESCHEDULEENTRYDLG 134
#define | IDD_ENTRYINFO_DLG 103
#define | IDD_FILE_EXIT 146
#define | IDD_FILE_NEW 144
#define | IDD_FILE_OPEN 145
#define | IDD_HELP_ABOUTSCHEDULER 154
#define | IDD_MODIFYORDELETE 110
#define | IDD_SCHEDULEENTRYINFODLG 103
#define | IDD_SCHEDULER_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_FILEMENU 143
#define | IDR_HELPMENU 143
#define | IDR_HTML1 149
#define | IDR_HTML_DELETEENTRIEDLG 107
#define | IDR_HTML_DELETESCHEDULEDLG 109
#define | IDR_HTML_ENTRYINFO_DLG 105
#define | IDR_HTML_MODIFYORDELETE 111
#define | IDR_HTML_SCHEDULEENTRYINFODLG 105
#define | IDR_HTML_SCHEDULER_DIALOG 104
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101
#define | IDS_CANNOTOPENFILE 162
#define | IDS_ENTERTITLE 156
#define | IDS_INVALIDDATE 160
#define | IDS_INVALIDTIME 158

Define Documentation

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_DELETEENTRIEDLG 106

Definition at line 14 of file resource.h.

#define IDD_DELETESCHEDULEDLG 108

Definition at line 16 of file resource.h.

#define IDD_DELETESCHEDULEENTRYDLG 134

Definition at line 21 of file resource.h.

#define IDD_ENTRYINFO_DLG 103

Definition at line 10 of file resource.h.

#define IDD_FILE_EXIT 146

Definition at line 26 of file resource.h.

#define IDD_FILE_NEW 144

Definition at line 24 of file resource.h.

#define IDD_FILE_OPEN 145

Definition at line 25 of file resource.h.

#define IDD_HELP_ABOUTSCHEDULER 154

Definition at line 28 of file resource.h.

#define IDD_MODIFYORDELETE 110

Definition at line 18 of file resource.h.

#define IDD_SCHEDULEENTRYINFODLG 103

Definition at line 9 of file resource.h.

#define IDD_SCHEDULER_DIALOG 102

Definition at line 8 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_FILEMENU 143

Definition at line 22 of file resource.h.

#define IDR_HELPMENU 143

Definition at line 23 of file resource.h.

#define IDR_HTML1 149

Definition at line 27 of file resource.h.

#define IDR_HTML_DELETEENTRIEDLG 107

Definition at line 15 of file resource.h.

#define IDR_HTML_DELETESCHEDULEDLG 109

Definition at line 17 of file resource.h.

#define IDR_HTML_ENTRYINFO_DLG 105

Definition at line 13 of file resource.h.

#define IDR_HTML_MODIFYORDELETE 111

Definition at line 19 of file resource.h.

#define IDR_HTML_SCHEDULEENTRYINFODLG 105

Definition at line 12 of file resource.h.

#define IDR_HTML_SCHEDULER_DIALOG 104

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 20 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

#define IDS_CANNOTOPENFILE 162

Definition at line 32 of file resource.h.

#define IDS_ENTERTITLE 156

Definition at line 29 of file resource.h.

#define IDS_INVALIDDATE 160

Definition at line 31 of file resource.h.

#define IDS_INVALIDTIME 158

Definition at line 30 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/Scheduler.cpp File Reference

  • internet
  • Scheduler
Functions | Variables

Scheduler.cpp File Reference

#include "stdafx.h"
#include "Scheduler.h"
#include "SchedulerDlg.h"

Go to the source code of this file.

Functions

template<>
void AFXAPI SerializeElements< CMyScheduler > (CArchive &ar, CMyScheduler *pSchedule, INT_PTR nCount)

Variables

CSchedulerApp theApp

Function Documentation

template<>
void AFXAPI SerializeElements< CMyScheduler > | ( | CArchive & | ar,
 |  | CMyScheduler * | pSchedule,
 |  | INT_PTR | nCount
 | ) |  |

Variable Documentation

CSchedulerApp theApp

Definition at line 41 of file Scheduler.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/Scheduler.h File Reference

  • internet
  • Scheduler
Classes | Defines | Functions

Scheduler.h File Reference

#include "MyScheduler.h"
#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CSchedulerApp

Defines

#define | __SCHEDULER_H
#define | AQUA ((long)0x99ffff)
#define | BLACK ((long)0x000000)
#define | BLUE ((long)0x0000cc)
#define | BROWN ((long)0x993366)
#define | RED ((long)0xff0066)
#define | YELLOW ((long)0xfffacd)

Functions

template<>
void __stdcall | SerializeElements< CMyScheduler > (CArchive &ar, CMyScheduler *pSchedule, INT_PTR nCount)

Define Documentation

#define __SCHEDULER_H

Definition at line 12 of file Scheduler.h.

#define AQUA ((long)0x99ffff)

Definition at line 16 of file Scheduler.h.

#define BLACK ((long)0x000000)

Definition at line 15 of file Scheduler.h.

#define BLUE ((long)0x0000cc)

Definition at line 18 of file Scheduler.h.

#define BROWN ((long)0x993366)

Definition at line 14 of file Scheduler.h.

#define RED ((long)0xff0066)

Definition at line 19 of file Scheduler.h.

#define YELLOW ((long)0xfffacd)

Definition at line 17 of file Scheduler.h.

Function Documentation

template<>
void __stdcall SerializeElements< CMyScheduler > | ( | CArchive & | ar,
 |  | CMyScheduler * | pSchedule,
 |  | INT_PTR | nCount
 | ) |  |
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/SchedulerDlg.cpp File Reference

  • internet
  • Scheduler
Classes

SchedulerDlg.cpp File Reference

#include "stdafx.h"
#include "Scheduler.h"
#include "SchedulerDlg.h"
#include "EnterInfoDlg.h"
#include "MyScheduler.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/SchedulerDlg.h File Reference

  • internet
  • Scheduler
Classes | Defines

SchedulerDlg.h File Reference

#include "EnterInfoDlg.h"
#include "MyScheduler.h"

Go to the source code of this file.

Classes

class | CSchedulerDlg

Defines

#define | DISPID_DAY 0x11
#define | DISPID_MONTH 0x10
#define | DISPID_YEAR 0x0f

Define Documentation

#define DISPID_DAY 0x11

Definition at line 18 of file SchedulerDlg.h.

#define DISPID_MONTH 0x10

Definition at line 17 of file SchedulerDlg.h.

#define DISPID_YEAR 0x0f

Definition at line 19 of file SchedulerDlg.h.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/stdafx.cpp File Reference

  • internet
  • Scheduler

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/stdafx.h File Reference

  • internet
  • Scheduler
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxdhtml.h>
#include <afx.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 17 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikdoc.cpp File Reference

  • ole
  • acdual

aclikdoc.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "AClikDoc.h"
#include "Dialogs.h"
#include "ClikPnt.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikdoc.h File Reference

  • ole
  • acdual
Classes

aclikdoc.h File Reference

Go to the source code of this file.

Classes

class CAutoClickDoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikvw.cpp File Reference

  • ole
  • acdual

aclikvw.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "AClikDoc.h"
#include "AClikVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikvw.h File Reference

  • ole
  • acdual
Classes

aclikvw.h File Reference

Go to the source code of this file.

Classes

class CAutoClickView
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/autoclik.cpp File Reference

  • ole
  • acdual
Classes | Variables

autoclik.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "AClikDoc.h"
#include "AClikVw.h"
#include "Autoclik_i.c"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CAutoClickApp theApp

Variable Documentation

CAutoClickApp theApp

Definition at line 55 of file autoclik.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/autoclik.h File Reference

  • ole
  • acdual
Classes

autoclik.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CAutoClickApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/autoclik.odl File Reference

  • ole
  • acdual
Classes | Namespaces | Functions

autoclik.odl File Reference

Go to the source code of this file.

Classes

class | ACDual::Document
interface | ACDual::IAClick
interface | ACDual::IAutoClickPoint
interface | ACDual::IDualAClick
interface | ACDual::IDualAutoClickPoint
class | ACDual::Point

Namespaces

namespace | ACDual

Functions

ACDual::importlib ("stdole32.tlb")
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/childfrm.cpp File Reference

  • ole
  • acdual

childfrm.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/childfrm.h File Reference

  • ole
  • acdual
Classes

childfrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/clikpnt.cpp File Reference

  • ole
  • acdual

clikpnt.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "ClikPnt.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/clikpnt.h File Reference

  • ole
  • acdual
Classes

clikpnt.h File Reference

Go to the source code of this file.

Classes

class CAutoClickPoint
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/dialogs.cpp File Reference

  • ole
  • acdual

dialogs.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "Dialogs.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/dialogs.h File Reference

  • ole
  • acdual
Classes

dialogs.h File Reference

Go to the source code of this file.

Classes

class CChangeText
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/initiids.cpp File Reference

  • ole
  • acdual

initiids.cpp File Reference

#include <ole2.h>
#include <initguid.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mainfrm.cpp File Reference

  • ole
  • acdual

mainfrm.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mainfrm.h File Reference

  • ole
  • acdual
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mfcdual.cpp File Reference

  • ole
  • acdual
Functions

mfcdual.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include <afxpriv.h>

Go to the source code of this file.

Functions

HRESULT DualHandleException (REFIID riidSource, const CException *pAnyException)

Function Documentation

HRESULT DualHandleException | ( | REFIID | riidSource,
 |  | const CException * | pAnyException
 | ) |  |

Definition at line 27 of file mfcdual.cpp.

{
  USES_CONVERSION;

  ASSERT_VALID(pAnyException);

  TRACE0("DualHandleException called\n");

  // Set ErrInfo object so that VTLB binding container
  // applications can get rich error information.
  ICreateErrorInfo* pcerrinfo;
  HRESULT hr = CreateErrorInfo(&pcerrinfo);
  if (SUCCEEDED(hr))
  {
    TCHAR   szDescription[256];
    LPCTSTR pszDescription = szDescription;
    GUID    guid = GUID_NULL;
    DWORD   dwHelpContext = 0;
    BSTR    bstrHelpFile = NULL;
    BSTR    bstrSource = NULL;
    if (pAnyException->IsKindOf(RUNTIME_CLASS(COleDispatchException)))
    {
      // specific IDispatch style exception
      COleDispatchException* e = (COleDispatchException*)pAnyException;

      guid = riidSource;
      hr = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF,
                (e->m_wCode + 0x200));

      pszDescription = e->m_strDescription;
      dwHelpContext = e->m_dwHelpContext;

      // propagate source and help file if present
      // call ::SysAllocString directly so no further exceptions are thrown
      if (!e->m_strHelpFile.IsEmpty())
        bstrHelpFile = ::SysAllocString(CT2COLE(e->m_strHelpFile));
      if (!e->m_strSource.IsEmpty())
        bstrSource = ::SysAllocString(CT2COLE(e->m_strSource));

    }
    else if (pAnyException->IsKindOf(RUNTIME_CLASS(CMemoryException)))
    {
      // failed memory allocation
      AfxLoadString(AFX_IDP_FAILED_MEMORY_ALLOC, szDescription);
      hr = E_OUTOFMEMORY;
    }
    else
    {
      // other unknown/uncommon error
      AfxLoadString(AFX_IDP_INTERNAL_FAILURE, szDescription);
      hr = E_UNEXPECTED;
    }

    if (bstrHelpFile == NULL && dwHelpContext != 0)
      bstrHelpFile = ::SysAllocString(CT2COLE(AfxGetApp()->m_pszHelpFilePath));

    if (bstrSource == NULL)
      bstrSource = ::SysAllocString(CT2COLE(AfxGetAppName()));

    // Set up ErrInfo object
    pcerrinfo->SetGUID(guid);
    pcerrinfo->SetDescription(::SysAllocString(CT2COLE(pszDescription)));
    pcerrinfo->SetHelpContext(dwHelpContext);
    pcerrinfo->SetHelpFile(bstrHelpFile);
    pcerrinfo->SetSource(bstrSource);

    TRACE("\tSource = %ws\n", bstrSource);
    TRACE("\tDescription = %s\n", pszDescription);
    TRACE("\tHelpContext = %lx\n", dwHelpContext);
    TRACE("\tHelpFile = %ws\n", bstrHelpFile);

    // Set the ErrInfo object for the current thread
    IErrorInfo* perrinfo;
    if (SUCCEEDED(pcerrinfo->QueryInterface(IID_IErrorInfo, (LPVOID*)&perrinfo)))
    {
      SetErrorInfo(0, perrinfo);
      perrinfo->Release();
    }

    pcerrinfo->Release();
  }

  TRACE("DualHandleException returning HRESULT %lx\n", hr);

  return hr;
}

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mfcdual.h File Reference

  • ole
  • acdual
Defines | Functions

mfcdual.h File Reference

Go to the source code of this file.

Defines

#define | BEGIN_DUAL_INTERFACE_PART(localClass, baseClass)
#define | CATCH_ALL_DUAL
#define | DECLARE_DUAL_ERRORINFO()
#define | DELEGATE_DUAL_INTERFACE(objectClass, dualClass)
#define | DUAL_ERRORINFO_PART(objectClass) INTERFACE_PART(objectClass, IID_ISupportErrorInfo, SupportErrorInfo) \
#define | END_DUAL_INTERFACE_PART(localClass) END_INTERFACE_PART(localClass) \
#define | IMPLEMENT_DUAL_ERRORINFO(objectClass, riidSource)
#define | TRY_DUAL(iidSource)

Functions

HRESULT | DualHandleException (REFIID riidSource, const CException *pAnyException)

Define Documentation

#define BEGIN_DUAL_INTERFACE_PART | ( | localClass,
 |  | baseClass
 | ) |
Value:
BEGIN_INTERFACE_PART(localClass, baseClass) \
     STDMETHOD(GetTypeInfoCount)(UINT FAR* pctinfo); \
     STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo); \
     STDMETHOD(GetIDsOfNames)(REFIID riid, OLECHAR FAR* FAR* rgszNames, UINT cNames, LCID lcid, DISPID FAR* rgdispid); \
     STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pdispparams, VARIANT FAR* pvarResult, EXCEPINFO FAR* pexcepinfo, UINT FAR* puArgErr); \

Definition at line 17 of file mfcdual.h.

#define CATCH_ALL_DUAL
Value:
CATCH(COleException, e) \
  { \
    _hr = e->m_sc; \
  } \
  AND_CATCH_ALL(e) \
  { \
    __pragma(warning(push)) \
    __pragma(warning(disable:6246)) /*disable _ctlState prefast warning*/ \
    AFX_MANAGE_STATE(pThis->m_pModuleState); \
    __pragma(warning(pop)) \
    _hr = DualHandleException(_riidSource, e); \
  } \
  END_CATCH_ALL \
  return _hr; \

Definition at line 104 of file mfcdual.h.

#define DECLARE_DUAL_ERRORINFO ( )
Value:
BEGIN_INTERFACE_PART(SupportErrorInfo, ISupportErrorInfo) \
    STDMETHOD(InterfaceSupportsErrorInfo)(THIS_ REFIID riid); \
  END_INTERFACE_PART(SupportErrorInfo) \

Definition at line 130 of file mfcdual.h.

#define DELEGATE_DUAL_INTERFACE | ( | objectClass,
 |  | dualClass
 | ) |

Definition at line 36 of file mfcdual.h.

#define DUAL_ERRORINFO_PART ( objectClass ) INTERFACE_PART(objectClass, IID_ISupportErrorInfo, SupportErrorInfo) \

Definition at line 138 of file mfcdual.h.

#define END_DUAL_INTERFACE_PART ( localClass ) END_INTERFACE_PART(localClass) \

Definition at line 27 of file mfcdual.h.

#define IMPLEMENT_DUAL_ERRORINFO | ( | objectClass,
 |  | riidSource
 | ) |
Value:
STDMETHODIMP_(ULONG) objectClass::XSupportErrorInfo::AddRef() \
  { \
    METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
    return pThis->ExternalAddRef(); \
  } \
  STDMETHODIMP_(ULONG) objectClass::XSupportErrorInfo::Release() \
  { \
    METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
    return pThis->ExternalRelease(); \
  } \
  STDMETHODIMP objectClass::XSupportErrorInfo::QueryInterface( \
    REFIID iid, LPVOID* ppvObj) \
  { \
    METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
    return pThis->ExternalQueryInterface(&iid, ppvObj); \
  } \
  STDMETHODIMP objectClass::XSupportErrorInfo::InterfaceSupportsErrorInfo( \
    REFIID iid) \
  { \
    METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
    return (iid == riidSource) ? S_OK : S_FALSE; \
  }

Definition at line 145 of file mfcdual.h.

#define TRY_DUAL ( iidSource )
Value:
HRESULT _hr = S_OK; \
  REFIID  _riidSource = iidSource; \
  TRY \

Definition at line 99 of file mfcdual.h.

Function Documentation

HRESULT DualHandleException | ( | REFIID | riidSource,
 |  | const CException * | pAnyException
 | ) |  |

Definition at line 27 of file mfcdual.cpp.

{
  USES_CONVERSION;

  ASSERT_VALID(pAnyException);

  TRACE0("DualHandleException called\n");

  // Set ErrInfo object so that VTLB binding container
  // applications can get rich error information.
  ICreateErrorInfo* pcerrinfo;
  HRESULT hr = CreateErrorInfo(&pcerrinfo);
  if (SUCCEEDED(hr))
  {
    TCHAR   szDescription[256];
    LPCTSTR pszDescription = szDescription;
    GUID    guid = GUID_NULL;
    DWORD   dwHelpContext = 0;
    BSTR    bstrHelpFile = NULL;
    BSTR    bstrSource = NULL;
    if (pAnyException->IsKindOf(RUNTIME_CLASS(COleDispatchException)))
    {
      // specific IDispatch style exception
      COleDispatchException* e = (COleDispatchException*)pAnyException;

      guid = riidSource;
      hr = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF,
                (e->m_wCode + 0x200));

      pszDescription = e->m_strDescription;
      dwHelpContext = e->m_dwHelpContext;

      // propagate source and help file if present
      // call ::SysAllocString directly so no further exceptions are thrown
      if (!e->m_strHelpFile.IsEmpty())
        bstrHelpFile = ::SysAllocString(CT2COLE(e->m_strHelpFile));
      if (!e->m_strSource.IsEmpty())
        bstrSource = ::SysAllocString(CT2COLE(e->m_strSource));

    }
    else if (pAnyException->IsKindOf(RUNTIME_CLASS(CMemoryException)))
    {
      // failed memory allocation
      AfxLoadString(AFX_IDP_FAILED_MEMORY_ALLOC, szDescription);
      hr = E_OUTOFMEMORY;
    }
    else
    {
      // other unknown/uncommon error
      AfxLoadString(AFX_IDP_INTERNAL_FAILURE, szDescription);
      hr = E_UNEXPECTED;
    }

    if (bstrHelpFile == NULL && dwHelpContext != 0)
      bstrHelpFile = ::SysAllocString(CT2COLE(AfxGetApp()->m_pszHelpFilePath));

    if (bstrSource == NULL)
      bstrSource = ::SysAllocString(CT2COLE(AfxGetAppName()));

    // Set up ErrInfo object
    pcerrinfo->SetGUID(guid);
    pcerrinfo->SetDescription(::SysAllocString(CT2COLE(pszDescription)));
    pcerrinfo->SetHelpContext(dwHelpContext);
    pcerrinfo->SetHelpFile(bstrHelpFile);
    pcerrinfo->SetSource(bstrSource);

    TRACE("\tSource = %ws\n", bstrSource);
    TRACE("\tDescription = %s\n", pszDescription);
    TRACE("\tHelpContext = %lx\n", dwHelpContext);
    TRACE("\tHelpFile = %ws\n", bstrHelpFile);

    // Set the ErrInfo object for the current thread
    IErrorInfo* perrinfo;
    if (SUCCEEDED(pcerrinfo->QueryInterface(IID_IErrorInfo, (LPVOID*)&perrinfo)))
    {
      SetErrorInfo(0, perrinfo);
      perrinfo->Release();
    }

    pcerrinfo->Release();
  }

  TRACE("DualHandleException returning HRESULT %lx\n", hr);

  return hr;
}

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/resource.h File Reference

  • ole
  • acdual
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_EDIT_CHANGETEXT 32771
#define | IDC_EDIT1 1000
#define | IDD_ABOUTBOX 100
#define | IDD_CHANGE_TEXT 130
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_ACLICKTYPE 129
#define | IDR_MAINFRAME 128
#define | IDS_TESTERROR 130

Define Documentation

#define ID_EDIT_CHANGETEXT 32771

Definition at line 12 of file resource.h.

#define IDC_EDIT1 1000

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_CHANGE_TEXT 130

Definition at line 9 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDR_ACLICKTYPE 129

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDS_TESTERROR 130

Definition at line 10 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/stdafx.cpp File Reference

  • ole
  • acdual

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/stdafx.h File Reference

  • ole
  • acdual
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxcmn.h>
#include "acdual.h"
#include <afxctl.h>
#include "mfcdual.h"

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoclik.cpp File Reference

  • ole
  • acdual
  • acdualdriv

autoclik.cpp File Reference

#include "stdafx.h"
#include "autoclik.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoclik.h File Reference

  • ole
  • acdual
  • acdualdriv
Classes

autoclik.h File Reference

Go to the source code of this file.

Classes

class | CAutoClik
class | CClikPoint
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoddlg.cpp File Reference

  • ole
  • acdual
  • acdualdriv

autoddlg.cpp File Reference

#include "stdafx.h"
#include "..\autoclik_i.c"
#include "autodriv.h"
#include "autoclik.h"
#include "autoddlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoddlg.h File Reference

  • ole
  • acdual
  • acdualdriv
Classes

autoddlg.h File Reference

Go to the source code of this file.

Classes

class CAutoDrivDlg
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autodriv.cpp File Reference

  • ole
  • acdual
  • acdualdriv
Variables

autodriv.cpp File Reference

#include "stdafx.h"
#include "autodriv.h"
#include "autoclik.h"
#include "autoddlg.h"

Go to the source code of this file.

Variables

CAutoDrivApp theApp

Variable Documentation

CAutoDrivApp theApp

Definition at line 45 of file autodriv.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autodriv.h File Reference

  • ole
  • acdual
  • acdualdriv
Classes

autodriv.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CAutoDrivApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/initiids.cpp File Reference

  • ole
  • acdual
  • acdualdriv

initiids.cpp File Reference

#include <stdafx.h>
#include <initguid.h>
#include "..\ACDual.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/resource.h File Reference

  • ole
  • acdual
  • acdualdriv
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_ANIMATE_XY 1002
#define | IDC_ANIMATEPOS 1003
#define | IDC_CLOSE 1000
#define | IDC_EDITTEXT 1013
#define | IDC_EDITX 1011
#define | IDC_EDITY 1012
#define | IDC_GETALL 1010
#define | IDC_GETPOS 1007
#define | IDC_REFRESH 1001
#define | IDC_SETALL 1009
#define | IDC_SETPOS 1006
#define | IDC_SETTEXT 1008
#define | IDC_SETX 1004
#define | IDC_SETY 1005
#define | IDC_USEDISPATCH 1014
#define | IDD_AUTODRIV_DIALOG 102
#define | IDP_CANNOT_CREATE_AUTOCLIK 101
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_MAINFRAME 128

Define Documentation

#define IDC_ANIMATE_XY 1002

Definition at line 11 of file resource.h.

#define IDC_ANIMATEPOS 1003

Definition at line 12 of file resource.h.

#define IDC_CLOSE 1000

Definition at line 9 of file resource.h.

#define IDC_EDITTEXT 1013

Definition at line 22 of file resource.h.

#define IDC_EDITX 1011

Definition at line 20 of file resource.h.

#define IDC_EDITY 1012

Definition at line 21 of file resource.h.

#define IDC_GETALL 1010

Definition at line 19 of file resource.h.

#define IDC_GETPOS 1007

Definition at line 16 of file resource.h.

#define IDC_REFRESH 1001

Definition at line 10 of file resource.h.

#define IDC_SETALL 1009

Definition at line 18 of file resource.h.

#define IDC_SETPOS 1006

Definition at line 15 of file resource.h.

#define IDC_SETTEXT 1008

Definition at line 17 of file resource.h.

#define IDC_SETX 1004

Definition at line 13 of file resource.h.

#define IDC_SETY 1005

Definition at line 14 of file resource.h.

#define IDC_USEDISPATCH 1014

Definition at line 23 of file resource.h.

#define IDD_AUTODRIV_DIALOG 102

Definition at line 7 of file resource.h.

#define IDP_CANNOT_CREATE_AUTOCLIK 101

Definition at line 6 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/stdafx.cpp File Reference

  • ole
  • acdual
  • acdualdriv

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/stdafx.h File Reference

  • ole
  • acdual
  • acdualdriv

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include "..\ACDual.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikdoc.cpp File Reference

  • ole
  • autoclik

aclikdoc.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "AClikDoc.h"
#include "Dialogs.h"
#include "ClikPnt.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikdoc.h File Reference

  • ole
  • autoclik
Classes

aclikdoc.h File Reference

Go to the source code of this file.

Classes

class CAutoClickDoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikvw.cpp File Reference

  • ole
  • autoclik

aclikvw.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "AClikDoc.h"
#include "AClikVw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikvw.h File Reference

  • ole
  • autoclik
Classes

aclikvw.h File Reference

Go to the source code of this file.

Classes

class CAutoClickView
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autoclik.cpp File Reference

  • ole
  • autoclik
Classes | Variables

autoclik.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "AClikDoc.h"
#include "AClikVw.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CAutoClickApp theApp

Variable Documentation

CAutoClickApp theApp

Definition at line 54 of file autoclik.cpp.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autoclik.h File Reference

  • ole
  • autoclik
Classes

autoclik.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CAutoClickApp
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autoclik.odl File Reference

  • ole
  • autoclik
Classes | Namespaces | Functions

autoclik.odl File Reference

Go to the source code of this file.

Classes

class | AutoClik::CAutoClickDoc
class | AutoClik::CAutoClickPoint
interface | AutoClik::IAClick
interface | AutoClik::IAutoClickPoint

Namespaces

namespace | AutoClik

Functions

AutoClik::importlib ("stdole32.tlb")
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/childfrm.cpp File Reference

  • ole
  • autoclik

childfrm.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/childfrm.h File Reference

  • ole
  • autoclik
Classes

childfrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/clikpnt.cpp File Reference

  • ole
  • autoclik

clikpnt.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "ClikPnt.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/clikpnt.h File Reference

  • ole
  • autoclik
Classes

clikpnt.h File Reference

Go to the source code of this file.

Classes

class CAutoClickPoint
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/dialogs.cpp File Reference

  • ole
  • autoclik

dialogs.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "Dialogs.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/dialogs.h File Reference

  • ole
  • autoclik
Classes

dialogs.h File Reference

Go to the source code of this file.

Classes

class CChangeText
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/mainfrm.cpp File Reference

  • ole
  • autoclik

mainfrm.cpp File Reference

#include "stdafx.h"
#include "AutoClik.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/mainfrm.h File Reference

  • ole
  • autoclik
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/resource.h File Reference

  • ole
  • autoclik
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_EDIT_CHANGETEXT 32771
#define | IDC_EDIT1 1000
#define | IDD_ABOUTBOX 100
#define | IDD_CHANGE_TEXT 130
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_ACLICKTYPE 129
#define | IDR_MAINFRAME 128

Define Documentation

#define ID_EDIT_CHANGETEXT 32771

Definition at line 11 of file resource.h.

#define IDC_EDIT1 1000

Definition at line 10 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_CHANGE_TEXT 130

Definition at line 9 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDR_ACLICKTYPE 129

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/stdafx.cpp File Reference

  • ole
  • autoclik

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/stdafx.h File Reference

  • ole
  • autoclik
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoclik.cpp File Reference

  • ole
  • autoclik
  • autodriv

autoclik.cpp File Reference

#include "stdafx.h"
#include "autoclik.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoclik.h File Reference

  • ole
  • autoclik
  • autodriv
Classes

autoclik.h File Reference

Go to the source code of this file.

Classes

class | CAutoClik
class | CClikPoint
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoddlg.cpp File Reference

  • ole
  • autoclik
  • autodriv

autoddlg.cpp File Reference

#include "stdafx.h"
#include "autodriv.h"
#include "autoclik.h"
#include "autoddlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoddlg.h File Reference

  • ole
  • autoclik
  • autodriv
Classes

autoddlg.h File Reference

Go to the source code of this file.

Classes

class CAutoDrivDlg
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autodriv.cpp File Reference

  • ole
  • autoclik
  • autodriv
Variables

autodriv.cpp File Reference

#include "stdafx.h"
#include "autodriv.h"
#include "autoclik.h"
#include "autoddlg.h"

Go to the source code of this file.

Variables

CAutoDrivApp theApp

Variable Documentation

CAutoDrivApp theApp

Definition at line 45 of file autodriv.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autodriv.h File Reference

  • ole
  • autoclik
  • autodriv
Classes

autodriv.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CAutoDrivApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/resource.h File Reference

  • ole
  • autoclik
  • autodriv
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_ANIMATE_XY 1002
#define | IDC_ANIMATEPOS 1003
#define | IDC_CLOSE 1000
#define | IDC_EDITTEXT 1013
#define | IDC_EDITX 1011
#define | IDC_EDITY 1012
#define | IDC_GETALL 1010
#define | IDC_GETPOS 1007
#define | IDC_REFRESH 1001
#define | IDC_SETALL 1009
#define | IDC_SETPOS 1006
#define | IDC_SETTEXT 1008
#define | IDC_SETX 1004
#define | IDC_SETY 1005
#define | IDD_AUTODRIV_DIALOG 102
#define | IDP_CANNOT_CREATE_AUTOCLIK 101
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_MAINFRAME 128

Define Documentation

#define IDC_ANIMATE_XY 1002

Definition at line 11 of file resource.h.

#define IDC_ANIMATEPOS 1003

Definition at line 12 of file resource.h.

#define IDC_CLOSE 1000

Definition at line 9 of file resource.h.

#define IDC_EDITTEXT 1013

Definition at line 22 of file resource.h.

#define IDC_EDITX 1011

Definition at line 20 of file resource.h.

#define IDC_EDITY 1012

Definition at line 21 of file resource.h.

#define IDC_GETALL 1010

Definition at line 19 of file resource.h.

#define IDC_GETPOS 1007

Definition at line 16 of file resource.h.

#define IDC_REFRESH 1001

Definition at line 10 of file resource.h.

#define IDC_SETALL 1009

Definition at line 18 of file resource.h.

#define IDC_SETPOS 1006

Definition at line 15 of file resource.h.

#define IDC_SETTEXT 1008

Definition at line 17 of file resource.h.

#define IDC_SETX 1004

Definition at line 13 of file resource.h.

#define IDC_SETY 1005

Definition at line 14 of file resource.h.

#define IDD_AUTODRIV_DIALOG 102

Definition at line 7 of file resource.h.

#define IDP_CANNOT_CREATE_AUTOCLIK 101

Definition at line 6 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/stdafx.cpp File Reference

  • ole
  • autoclik
  • autodriv

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/stdafx.h File Reference

  • ole
  • autoclik
  • autodriv

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calcdriv.cpp File Reference

  • ole
  • calcdriv
Variables

calcdriv.cpp File Reference

#include "stdafx.h"
#include "calcdriv.h"

Go to the source code of this file.

Variables

CCalcDrivApp NEAR theApp

Variable Documentation

CCalcDrivApp NEAR theApp

Definition at line 43 of file calcdriv.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calcdriv.h File Reference

  • ole
  • calcdriv
Classes

calcdriv.h File Reference

#include "resource.h"
#include "calctype.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CCalcDrivApp
class | CDriverDlg
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calctype.cpp File Reference

  • ole
  • calcdriv

calctype.cpp File Reference

#include "stdafx.h"
#include "calctype.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calctype.h File Reference

  • ole
  • calcdriv
Classes

calctype.h File Reference

Go to the source code of this file.

Classes

class CRemoteCalcDlg
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/resource.h File Reference

  • ole
  • calcdriv
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_EXPRESSION 101
#define | IDC_GO 103
#define | IDC_LAST_ACCUM 105
#define | IDC_REFRESH 107
#define | IDC_SINGLE_STEP 104
#define | IDD_CALCDRIV 102
#define | IDD_LAST_OPERAND 106
#define | IDD_LAST_OPERATOR 108
#define | IDP_OLE_INIT_FAILED 100
#define | IDP_UNABLE_TO_CREATE 3
#define | IDP_UNABLE_TO_SHOW 4
#define | IDR_MAINFRAME 2

Define Documentation

#define IDC_EXPRESSION 101

Definition at line 9 of file resource.h.

#define IDC_GO 103

Definition at line 11 of file resource.h.

#define IDC_LAST_ACCUM 105

Definition at line 13 of file resource.h.

#define IDC_REFRESH 107

Definition at line 15 of file resource.h.

#define IDC_SINGLE_STEP 104

Definition at line 12 of file resource.h.

#define IDD_CALCDRIV 102

Definition at line 10 of file resource.h.

#define IDD_LAST_OPERAND 106

Definition at line 14 of file resource.h.

#define IDD_LAST_OPERATOR 108

Definition at line 16 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 8 of file resource.h.

#define IDP_UNABLE_TO_CREATE 3

Definition at line 6 of file resource.h.

#define IDP_UNABLE_TO_SHOW 4

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/stdafx.cpp File Reference

  • ole
  • calcdriv

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/stdafx.h File Reference

  • ole
  • calcdriv
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/cntritem.cpp File Reference

  • ole
  • drawcli

cntritem.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "drawdoc.h"
#include "drawobj.h"
#include "drawvw.h"
#include "cntritem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/cntritem.h File Reference

  • ole
  • drawcli
Classes

cntritem.h File Reference

Go to the source code of this file.

Classes

class CDrawItem
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawcli.cpp File Reference

  • ole
  • drawcli
Classes | Variables

drawcli.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "mainfrm.h"
#include "drawobj.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "splitfrm.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CDrawApp theApp

Variable Documentation

CDrawApp theApp

Definition at line 54 of file drawcli.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawcli.h File Reference

  • ole
  • drawcli
Classes

drawcli.h File Reference

#include "resource.h"
#include <afxtempl.h>
#include "resource.h"

Go to the source code of this file.

Classes

class CDrawApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawdoc.cpp File Reference

  • ole
  • drawcli

drawdoc.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "drawobj.h"
#include "cntritem.h"
#include "summpage.h"
#include "statpage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawdoc.h File Reference

  • ole
  • drawcli
Classes

drawdoc.h File Reference

#include "drawobj.h"
#include "summinfo.h"
#include "drawobj.h"
#include "summinfo.h"

Go to the source code of this file.

Classes

class CDrawDoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawobj.cpp File Reference

  • ole
  • drawcli

drawobj.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "drawobj.h"
#include "cntritem.h"
#include "rectdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawobj.h File Reference

  • ole
  • drawcli
Classes | Typedefs

drawobj.h File Reference

Go to the source code of this file.

Classes

class | CDrawObj
class | CDrawOleObj
class | CDrawPoly
class | CDrawRect

Typedefs

typedef CTypedPtrList< CObList,
CDrawObj * > 		CDrawObjList

Typedef Documentation

typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList

Definition at line 74 of file drawobj.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawtool.cpp File Reference

  • ole
  • drawcli
Enumerations | Variables

drawtool.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "drawobj.h"
#include "drawtool.h"

Go to the source code of this file.

Enumerations

enum SelectMode {
none, netSelect, move, size,
none, netSelect, move, size
}

Variables

CPoint | lastPoint
int | nDragHandle
SelectMode | selectMode = none

Enumeration Type Documentation

enum SelectMode
Enumerator:
none
netSelect
move
size
none
netSelect
move
size

Definition at line 102 of file drawtool.cpp.

{
  none,
  netSelect,
  move,
  size
};

Variable Documentation

CPoint lastPoint

Definition at line 113 of file drawtool.cpp.

int nDragHandle

Definition at line 111 of file drawtool.cpp.

SelectMode selectMode = none

Definition at line 110 of file drawtool.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawtool.h File Reference

  • ole
  • drawcli
Classes | Enumerations

drawtool.h File Reference

#include "drawobj.h"

Go to the source code of this file.

Classes

class | CDrawTool
class | CPolyTool
class | CRectTool
class | CSelectTool

Enumerations

enum DrawShape {
selection, line, rect, roundRect,
ellipse, poly, selection, line,
rect, roundRect, ellipse, poly
}

Enumeration Type Documentation

enum DrawShape
Enumerator:
selection
line
rect
roundRect
ellipse
poly
selection
line
rect
roundRect
ellipse
poly

Definition at line 20 of file drawtool.h.

{
  selection,
  line,
  rect,
  roundRect,
  ellipse,
  poly
};

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawvw.cpp File Reference

  • ole
  • drawcli

drawvw.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include "drawcli.h"
#include "drawdoc.h"
#include "drawobj.h"
#include "cntritem.h"
#include "drawvw.h"
#include "drawtool.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawvw.h File Reference

  • ole
  • drawcli
Classes | Defines

drawvw.h File Reference

Go to the source code of this file.

Classes

class | CDrawView

Defines

#define | HINT_DELETE_SELECTION 3
#define | HINT_UPDATE_DRAWOBJ 1
#define | HINT_UPDATE_OLE_ITEMS 4
#define | HINT_UPDATE_SELECTION 2
#define | HINT_UPDATE_WINDOW 0

Define Documentation

#define HINT_DELETE_SELECTION 3

Definition at line 17 of file drawvw.h.

#define HINT_UPDATE_DRAWOBJ 1

Definition at line 15 of file drawvw.h.

#define HINT_UPDATE_OLE_ITEMS 4

Definition at line 18 of file drawvw.h.

#define HINT_UPDATE_SELECTION 2

Definition at line 16 of file drawvw.h.

#define HINT_UPDATE_WINDOW 0

Definition at line 14 of file drawvw.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/mainfrm.cpp File Reference

  • ole
  • drawcli

mainfrm.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/mainfrm.h File Reference

  • ole
  • drawcli
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/propset.cpp File Reference

  • ole
  • drawcli
Classes | Defines

propset.cpp File Reference

#include "stdafx.h"
#include <malloc.h>
#include <ole2.h>
#include <oleauto.h>
#include "propset.h"

Go to the source code of this file.

Classes

struct | DICTENTRY
struct | DICTENTRYHEADER

Defines

#define | CountPrefixedStringT CountPrefixedStringA
#define | new DEBUG_NEW

Define Documentation

#define CountPrefixedStringT CountPrefixedStringA

Definition at line 62 of file propset.cpp.

#define new DEBUG_NEW

Definition at line 28 of file propset.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/propset.h File Reference

  • ole
  • drawcli
Classes | Typedefs

propset.h File Reference

Go to the source code of this file.

Classes

class | CProperty
class | CPropertySection
class | CPropertySet
struct | tagFORMATIDOFFSET
struct | tagPROPERTYIDOFFSET
struct | tagPROPHEADER
struct | tagSECTIONHEADER

Typedefs

typedef struct tagFORMATIDOFFSET | FORMATIDOFFSET
typedef struct tagFORMATIDOFFSET * | LPFORMATIDOFFSET
typedef struct
tagPROPERTYIDOFFSET * 		LPPROPERTYIDOFFSET
typedef struct tagPROPHEADER * | LPPROPHEADER
typedef struct tagSECTIONHEADER * | LPSECTIONHEADER
typedef struct tagPROPERTYIDOFFSET | PROPERTYIDOFFSET
typedef struct tagPROPHEADER | PROPHEADER
typedef struct tagSECTIONHEADER | SECTIONHEADER

Typedef Documentation

typedef struct tagFORMATIDOFFSET FORMATIDOFFSET
typedef struct tagFORMATIDOFFSET * LPFORMATIDOFFSET
typedef struct tagPROPERTYIDOFFSET * LPPROPERTYIDOFFSET
typedef struct tagPROPHEADER * LPPROPHEADER
typedef struct tagSECTIONHEADER * LPSECTIONHEADER
typedef struct tagPROPERTYIDOFFSET PROPERTYIDOFFSET
typedef struct tagPROPHEADER PROPHEADER
typedef struct tagSECTIONHEADER SECTIONHEADER
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/rectdlg.cpp File Reference

  • ole
  • drawcli

rectdlg.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "rectdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/rectdlg.h File Reference

  • ole
  • drawcli
Classes

rectdlg.h File Reference

Go to the source code of this file.

Classes

class CRectDlg
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/resource.h File Reference

  • ole
  • drawcli
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BUTTON32810 -32726
#define | ID_BUTTON32811 -32725
#define | ID_CANCEL_EDIT 32768
#define | ID_DRAW_ELLIPSE 32774
#define | ID_DRAW_LINE 32771
#define | ID_DRAW_POLYGON 32782
#define | ID_DRAW_RECT 32772
#define | ID_DRAW_ROUNDRECT 32773
#define | ID_DRAW_SELECT 32770
#define | ID_EDIT_PROPERTIES 32785
#define | ID_FILE_SUMMARYINFO 32792
#define | ID_OBJECT_FILLCOLOR 32776
#define | ID_OBJECT_LINECOLOR 32775
#define | ID_OBJECT_MOVEBACK 32780
#define | ID_OBJECT_MOVEFORWARD 32779
#define | ID_OBJECT_MOVETOBACK 32778
#define | ID_OBJECT_MOVETOFRONT 32777
#define | ID_POPUP_MENU 103
#define | ID_VIEW_GRID 32769
#define | ID_VIEW_PAPERCOLOR 32781
#define | ID_VIEW_SHOWOBJECTS 32784
#define | IDC_APPNAME 120
#define | IDC_AUTHOR 105
#define | IDC_COMMENTS 107
#define | IDC_CREATEDATE 115
#define | IDC_EDITTIME 113
#define | IDC_KEYWORDS 106
#define | IDC_LASTPRINT 114
#define | IDC_LASTSAVE 116
#define | IDC_NOFILL 103
#define | IDC_NUMCHARS 119
#define | IDC_NUMPAGES 117
#define | IDC_NUMWORDS 118
#define | IDC_PENCIL 102
#define | IDC_REVNUM 112
#define | IDC_SAVEDBY 111
#define | IDC_SECURITY 122
#define | IDC_SPIN1 104
#define | IDC_SUBJECT 109
#define | IDC_TEMPLATE 110
#define | IDC_THUMBNAIL 123
#define | IDC_TITLE 108
#define | IDC_WEIGHT 102
#define | IDD_ABOUTBOX 100
#define | IDD_PROP_RECT 101
#define | IDD_STAT_PAGE 105
#define | IDD_SUMM_PAGE 104
#define | IDP_BUSY 100
#define | IDP_FAILED_TO_CREATE 102
#define | IDP_OLE_INIT_FAILED 101
#define | IDR_DRAWCLTYPE 3
#define | IDR_DRAWCLTYPE_CNTR_IP 6
#define | IDR_MAINFRAME 2

Define Documentation

#define ID_BUTTON32810 -32726

Definition at line 56 of file resource.h.

#define ID_BUTTON32811 -32725

Definition at line 57 of file resource.h.

#define ID_CANCEL_EDIT 32768

Definition at line 38 of file resource.h.

#define ID_DRAW_ELLIPSE 32774

Definition at line 44 of file resource.h.

#define ID_DRAW_LINE 32771

Definition at line 41 of file resource.h.

#define ID_DRAW_POLYGON 32782

Definition at line 52 of file resource.h.

#define ID_DRAW_RECT 32772

Definition at line 42 of file resource.h.

#define ID_DRAW_ROUNDRECT 32773

Definition at line 43 of file resource.h.

#define ID_DRAW_SELECT 32770

Definition at line 40 of file resource.h.

#define ID_EDIT_PROPERTIES 32785

Definition at line 54 of file resource.h.

#define ID_FILE_SUMMARYINFO 32792

Definition at line 55 of file resource.h.

#define ID_OBJECT_FILLCOLOR 32776

Definition at line 46 of file resource.h.

#define ID_OBJECT_LINECOLOR 32775

Definition at line 45 of file resource.h.

#define ID_OBJECT_MOVEBACK 32780

Definition at line 50 of file resource.h.

#define ID_OBJECT_MOVEFORWARD 32779

Definition at line 49 of file resource.h.

#define ID_OBJECT_MOVETOBACK 32778

Definition at line 48 of file resource.h.

#define ID_OBJECT_MOVETOFRONT 32777

Definition at line 47 of file resource.h.

#define ID_POPUP_MENU 103

Definition at line 16 of file resource.h.

#define ID_VIEW_GRID 32769

Definition at line 39 of file resource.h.

#define ID_VIEW_PAPERCOLOR 32781

Definition at line 51 of file resource.h.

#define ID_VIEW_SHOWOBJECTS 32784

Definition at line 53 of file resource.h.

#define IDC_APPNAME 120

Definition at line 35 of file resource.h.

#define IDC_AUTHOR 105

Definition at line 19 of file resource.h.

#define IDC_COMMENTS 107

Definition at line 22 of file resource.h.

#define IDC_CREATEDATE 115

Definition at line 30 of file resource.h.

#define IDC_EDITTIME 113

Definition at line 28 of file resource.h.

#define IDC_KEYWORDS 106

Definition at line 21 of file resource.h.

#define IDC_LASTPRINT 114

Definition at line 29 of file resource.h.

#define IDC_LASTSAVE 116

Definition at line 31 of file resource.h.

#define IDC_NOFILL 103

Definition at line 15 of file resource.h.

#define IDC_NUMCHARS 119

Definition at line 34 of file resource.h.

#define IDC_NUMPAGES 117

Definition at line 32 of file resource.h.

#define IDC_NUMWORDS 118

Definition at line 33 of file resource.h.

#define IDC_PENCIL 102

Definition at line 14 of file resource.h.

#define IDC_REVNUM 112

Definition at line 27 of file resource.h.

#define IDC_SAVEDBY 111

Definition at line 26 of file resource.h.

#define IDC_SECURITY 122

Definition at line 36 of file resource.h.

#define IDC_SPIN1 104

Definition at line 17 of file resource.h.

#define IDC_SUBJECT 109

Definition at line 24 of file resource.h.

#define IDC_TEMPLATE 110

Definition at line 25 of file resource.h.

#define IDC_THUMBNAIL 123

Definition at line 37 of file resource.h.

#define IDC_TITLE 108

Definition at line 23 of file resource.h.

#define IDC_WEIGHT 102

Definition at line 13 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 8 of file resource.h.

#define IDD_PROP_RECT 101

Definition at line 11 of file resource.h.

#define IDD_STAT_PAGE 105

Definition at line 20 of file resource.h.

#define IDD_SUMM_PAGE 104

Definition at line 18 of file resource.h.

#define IDP_BUSY 100

Definition at line 9 of file resource.h.

#define IDP_FAILED_TO_CREATE 102

Definition at line 12 of file resource.h.

#define IDP_OLE_INIT_FAILED 101

Definition at line 10 of file resource.h.

#define IDR_DRAWCLTYPE 3

Definition at line 6 of file resource.h.

#define IDR_DRAWCLTYPE_CNTR_IP 6

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/splitfrm.cpp File Reference

  • ole
  • drawcli

splitfrm.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "splitfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/splitfrm.h File Reference

  • ole
  • drawcli
Classes

splitfrm.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CSplitFrame
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/statpage.cpp File Reference

  • ole
  • drawcli

statpage.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "statpage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/statpage.h File Reference

  • ole
  • drawcli
Classes

statpage.h File Reference

Go to the source code of this file.

Classes

class CStatPage
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/stdafx.cpp File Reference

  • ole
  • drawcli

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/stdafx.h File Reference

  • ole
  • drawcli
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxcmn.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 16 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summinfo.cpp File Reference

  • ole
  • drawcli
Defines | Variables

summinfo.cpp File Reference

#include "stdafx.h"
#include <winnls.h>
#include "drawcli.h"
#include <objbase.h>
#include <initguid.h>
#include "summinfo.h"

Go to the source code of this file.

Defines

#define | tcstocs(lpctStr) (LPCSTR)(lpctStr)

Variables

const OLECHAR | szSummInfo [] = OLESTR("\005SummaryInformation")

Define Documentation

#define tcstocs ( lpctStr ) (LPCSTR)(lpctStr)

Definition at line 45 of file summinfo.cpp.

Variable Documentation

const OLECHAR szSummInfo[] = OLESTR("\005SummaryInformation")

Definition at line 35 of file summinfo.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summinfo.h File Reference

  • ole
  • drawcli
Classes | Functions | Variables

summinfo.h File Reference

#include "propset.h"
#include <objidl.h>
#include "propset.h"

Go to the source code of this file.

Classes

class | CSummInfo

Functions

DEFINE_GUID (FMTID_SummaryInformation, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9)

Variables

const OLECHAR | szSummInfo []

Function Documentation

DEFINE_GUID | ( | FMTID_SummaryInformation | ,
 |  | 0xF29F85E0 | ,
 |  | 0x4FF9 | ,
 |  | 0x1068 | ,
 |  | 0xAB | ,
 |  | 0x91 | ,
 |  | 0x08 | ,
 |  | 0x00 | ,
 |  | 0x2B | ,
 |  | 0x27 | ,
 |  | 0xB3 | ,
 |  | 0xD9 |
 | ) |  |

Variable Documentation

const OLECHAR szSummInfo[]

Definition at line 35 of file summinfo.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summpage.cpp File Reference

  • ole
  • drawcli

summpage.cpp File Reference

#include "stdafx.h"
#include "drawcli.h"
#include "summpage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summpage.h File Reference

  • ole
  • drawcli
Classes

summpage.h File Reference

Go to the source code of this file.

Classes

class CSummPage
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/hiersvr.cpp File Reference

  • ole
  • hiersvr
Classes | Variables

hiersvr.cpp File Reference

#include "stdafx.h"
#include "hiersvr.h"
#include "mainfrm.h"
#include "ipframe.h"
#include "svrdoc.h"
#include "svrview.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CServerApp theApp

Variable Documentation

CServerApp theApp

Definition at line 50 of file hiersvr.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/hiersvr.h File Reference

  • ole
  • hiersvr
Classes

hiersvr.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CHierSvrDocTemplate
class | CServerApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/ipframe.cpp File Reference

  • ole
  • hiersvr

ipframe.cpp File Reference

#include "stdafx.h"
#include "hiersvr.h"
#include "ipframe.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/ipframe.h File Reference

  • ole
  • hiersvr
Classes

ipframe.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CInPlaceFrame
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/mainfrm.cpp File Reference

  • ole
  • hiersvr

mainfrm.cpp File Reference

#include "stdafx.h"
#include "hiersvr.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/mainfrm.h File Reference

  • ole
  • hiersvr
Classes

mainfrm.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/resource.h File Reference

  • ole
  • hiersvr
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_ADD_NODE 32769
#define | ID_CANCEL_INPLACE 32788
#define | ID_CHANGE_NAME 32768
#define | ID_IMPORT_TEXT 32770
#define | ID_OPTIONS_FONT 32787
#define | ID_TREE_COLLAPSEBRANCH 32786
#define | ID_TREE_EXPANDALL 32785
#define | ID_TREE_EXPANDBRANCH 32784
#define | ID_TREE_EXPANDONELEVEL 32783
#define | ID_VIEW_ZOOM100 32774
#define | ID_VIEW_ZOOM125 32775
#define | ID_VIEW_ZOOM150 32776
#define | ID_VIEW_ZOOM175 32777
#define | ID_VIEW_ZOOM200 32778
#define | ID_VIEW_ZOOM25 32771
#define | ID_VIEW_ZOOM250 32779
#define | ID_VIEW_ZOOM300 32780
#define | ID_VIEW_ZOOM50 32772
#define | ID_VIEW_ZOOM75 32773
#define | ID_VIEW_ZOOMCUSTOM 32781
#define | IDC_COMBO1 1002
#define | IDC_EDIT1 1000
#define | IDC_EDIT2 1001
#define | IDD_ABOUTBOX 100
#define | IDD_ADD_NODE 102
#define | IDD_CHANGE_NAME 101
#define | IDD_CUSTZOOM 106
#define | IDP_AFXOLEINIT_FAILED 100
#define | IDR_HIERSVRTYPE 2
#define | IDR_HIERSVRTYPE_SRVR_EMB 105
#define | IDR_HIERSVRTYPE_SRVR_IP 107
#define | IDR_MAINFRAME 1
#define | IDR_POPUPS 103

Define Documentation

#define ID_ADD_NODE 32769

Definition at line 19 of file resource.h.

#define ID_CANCEL_INPLACE 32788

Definition at line 37 of file resource.h.

#define ID_CHANGE_NAME 32768

Definition at line 18 of file resource.h.

#define ID_IMPORT_TEXT 32770

Definition at line 20 of file resource.h.

#define ID_OPTIONS_FONT 32787

Definition at line 36 of file resource.h.

#define ID_TREE_COLLAPSEBRANCH 32786

Definition at line 35 of file resource.h.

#define ID_TREE_EXPANDALL 32785

Definition at line 34 of file resource.h.

#define ID_TREE_EXPANDBRANCH 32784

Definition at line 33 of file resource.h.

#define ID_TREE_EXPANDONELEVEL 32783

Definition at line 32 of file resource.h.

#define ID_VIEW_ZOOM100 32774

Definition at line 24 of file resource.h.

#define ID_VIEW_ZOOM125 32775

Definition at line 25 of file resource.h.

#define ID_VIEW_ZOOM150 32776

Definition at line 26 of file resource.h.

#define ID_VIEW_ZOOM175 32777

Definition at line 27 of file resource.h.

#define ID_VIEW_ZOOM200 32778

Definition at line 28 of file resource.h.

#define ID_VIEW_ZOOM25 32771

Definition at line 21 of file resource.h.

#define ID_VIEW_ZOOM250 32779

Definition at line 29 of file resource.h.

#define ID_VIEW_ZOOM300 32780

Definition at line 30 of file resource.h.

#define ID_VIEW_ZOOM50 32772

Definition at line 22 of file resource.h.

#define ID_VIEW_ZOOM75 32773

Definition at line 23 of file resource.h.

#define ID_VIEW_ZOOMCUSTOM 32781

Definition at line 31 of file resource.h.

#define IDC_COMBO1 1002

Definition at line 17 of file resource.h.

#define IDC_EDIT1 1000

Definition at line 15 of file resource.h.

#define IDC_EDIT2 1001

Definition at line 16 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 7 of file resource.h.

#define IDD_ADD_NODE 102

Definition at line 10 of file resource.h.

#define IDD_CHANGE_NAME 101

Definition at line 9 of file resource.h.

#define IDD_CUSTZOOM 106

Definition at line 13 of file resource.h.

#define IDP_AFXOLEINIT_FAILED 100

Definition at line 8 of file resource.h.

#define IDR_HIERSVRTYPE 2

Definition at line 6 of file resource.h.

#define IDR_HIERSVRTYPE_SRVR_EMB 105

Definition at line 12 of file resource.h.

#define IDR_HIERSVRTYPE_SRVR_IP 107

Definition at line 14 of file resource.h.

#define IDR_MAINFRAME 1

Definition at line 5 of file resource.h.

#define IDR_POPUPS 103

Definition at line 11 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/stdafx.cpp File Reference

  • ole
  • hiersvr

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/stdafx.h File Reference

  • ole
  • hiersvr
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrdoc.cpp File Reference

  • ole
  • hiersvr

svrdoc.cpp File Reference

#include "stdafx.h"
#include "hiersvr.h"
#include "svrdoc.h"
#include "svritem.h"
#include "svrview.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrdoc.h File Reference

  • ole
  • hiersvr
Classes | Defines

svrdoc.h File Reference

Go to the source code of this file.

Classes

class | CServerDoc

Defines

#define | MAX_LEVEL 20

Define Documentation

#define MAX_LEVEL 20

Definition at line 12 of file svrdoc.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svritem.cpp File Reference

  • ole
  • hiersvr
Classes | Defines | Functions

svritem.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include <malloc.h>
#include "hiersvr.h"
#include "svritem.h"
#include "svrdoc.h"
#include "svrview.h"

Go to the source code of this file.

Classes

class | CAddNodeDlg
class | CChangeNameDlg

Defines

#define | CX_INSET 4
#define | CY_INSET 2

Functions

IMPLEMENT_SERIAL (CServerNode, CObject, 0)

Define Documentation

#define CX_INSET 4

Definition at line 212 of file svritem.cpp.

#define CY_INSET 2

Definition at line 213 of file svritem.cpp.

Function Documentation

IMPLEMENT_SERIAL | ( | CServerNode | ,
 |  | CObject | ,
 |  | 0 |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svritem.h File Reference

  • ole
  • hiersvr
Classes | Defines

svritem.h File Reference

Go to the source code of this file.

Classes

class | CServerItem
class | CServerNode

Defines

#define | CX_BACKDENT 5
#define | CX_INDENT 12
#define | CX_MARGIN 8
#define | CY_MARGIN 4
#define | CY_SEPARATOR 4

Define Documentation

#define CX_BACKDENT 5

Definition at line 19 of file svritem.h.

#define CX_INDENT 12

Definition at line 18 of file svritem.h.

#define CX_MARGIN 8

Definition at line 15 of file svritem.h.

#define CY_MARGIN 4

Definition at line 16 of file svritem.h.

#define CY_SEPARATOR 4

Definition at line 20 of file svritem.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrview.cpp File Reference

  • ole
  • hiersvr

svrview.cpp File Reference

#include "stdafx.h"
#include "afxdlgs.h"
#include "hiersvr.h"
#include "svrdoc.h"
#include "svrview.h"
#include "svritem.h"
#include "zoomdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrview.h File Reference

  • ole
  • hiersvr
Classes

svrview.h File Reference

#include "svritem.h"

Go to the source code of this file.

Classes

class | CServerDC
class | CServerView
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/zoomdlg.cpp File Reference

  • ole
  • hiersvr

zoomdlg.cpp File Reference

#include "stdafx.h"
#include "hiersvr.h"
#include "zoomdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/zoomdlg.h File Reference

  • ole
  • hiersvr
Classes

zoomdlg.h File Reference

Go to the source code of this file.

Classes

class CZoomDlg
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/enumvar.cpp File Reference

  • ole
  • inproc
Functions

enumvar.cpp File Reference

#include "stdafx.h"
#include "inproc.h"
#include "enumvar.h"

Go to the source code of this file.

Functions

STDMETHODIMP_ (ULONG) CEnumVariant

Function Documentation

STDMETHODIMP_ ( ULONG )

Definition at line 117 of file enumvar.cpp.

{
  METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
  return pThis->ExternalRelease();
}

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/enumvar.h File Reference

  • ole
  • inproc
Classes

enumvar.h File Reference

Go to the source code of this file.

Classes

class CEnumVariant
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/inproc.cpp File Reference

  • ole
  • inproc
Variables

inproc.cpp File Reference

#include "stdafx.h"
#include "inproc.h"

Go to the source code of this file.

Variables

CInProcApp NEAR theApp

Variable Documentation

CInProcApp NEAR theApp

Definition at line 42 of file inproc.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/inproc.h File Reference

  • ole
  • inproc
Classes | Typedefs

inproc.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CInProcApp

Typedefs

typedef CMap< COleVariant,
const VARIANT &, COleVariant,
const VARIANT & > 		CMapVariantToVariant

Typedef Documentation

typedef CMap<COleVariant, const VARIANT&, COleVariant, const VARIANT&> CMapVariantToVariant

Definition at line 44 of file inproc.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/inproc.odl File Reference

  • ole
  • inproc
Classes | Namespaces | Functions

inproc.odl File Reference

Go to the source code of this file.

Classes

class | inproc::CStringCollect
class | inproc::CVariantAssoc
class | inproc::CVariantMap
interface | inproc::IStringCollect
interface | inproc::IVariantAssoc
interface | inproc::IVariantMap

Namespaces

namespace | inproc

Functions

inproc::importlib ("stdole32.tlb")
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/resource.h File Reference

  • ole
  • inproc
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDD_ABOUTBOX 100
#define | IDP_CANT_RUN_STANDALONE 100
#define | IDP_OLE_INIT_FAILED 101
#define | IDR_MAINFRAME 128

Define Documentation

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDP_CANT_RUN_STANDALONE 100

Definition at line 6 of file resource.h.

#define IDP_OLE_INIT_FAILED 101

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/stdafx.cpp File Reference

  • ole
  • inproc

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/stdafx.h File Reference

  • ole
  • inproc
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxtempl.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/strcoll.cpp File Reference

  • ole
  • inproc
Functions

strcoll.cpp File Reference

#include "stdafx.h"
#include "inproc.h"
#include "strcoll.h"
#include "enumvar.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE (CStringCollect,"mfc.inproc.strcoll", 0xba0357c0, 0xc377, 0x11cd, 0x9a, 0x90, 0x0, 0xdd, 0x1, 0x11, 0x3f, 0x12)

Function Documentation

IMPLEMENT_OLECREATE | ( | CStringCollect | ,
 |  | "mfc.inproc.strcoll" | ,
 |  | 0xba0357c0 | ,
 |  | 0xc377 | ,
 |  | 0x11cd | ,
 |  | 0x9a | ,
 |  | 0x90 | ,
 |  | 0x0 | ,
 |  | 0xdd | ,
 |  | 0x1 | ,
 |  | 0x11 | ,
 |  | 0x3f | ,
 |  | 0x12 |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/strcoll.h File Reference

  • ole
  • inproc
Classes

strcoll.h File Reference

Go to the source code of this file.

Classes

class CStringCollect
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varassoc.cpp File Reference

  • ole
  • inproc

varassoc.cpp File Reference

#include "stdafx.h"
#include "inproc.h"
#include "varassoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varassoc.h File Reference

  • ole
  • inproc
Classes

varassoc.h File Reference

Go to the source code of this file.

Classes

class CVariantAssoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varmap.cpp File Reference

  • ole
  • inproc
Functions

varmap.cpp File Reference

#include "stdafx.h"
#include "inproc.h"
#include "enumvar.h"
#include "varassoc.h"
#include "varmap.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE (CVariantMap,"mfc.inproc.varmap", 0x7ace7860, 0x9a1c, 0x11cd, 0x9a, 0x90, 0x0, 0xdd, 0x1, 0x11, 0x3f, 0x12)

Function Documentation

IMPLEMENT_OLECREATE | ( | CVariantMap | ,
 |  | "mfc.inproc.varmap" | ,
 |  | 0x7ace7860 | ,
 |  | 0x9a1c | ,
 |  | 0x11cd | ,
 |  | 0x9a | ,
 |  | 0x90 | ,
 |  | 0x0 | ,
 |  | 0xdd | ,
 |  | 0x1 | ,
 |  | 0x11 | ,
 |  | 0x3f | ,
 |  | 0x12 |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varmap.h File Reference

  • ole
  • inproc
Classes

varmap.h File Reference

Go to the source code of this file.

Classes

class CVariantMap
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdridoc.cpp File Reference

  • ole
  • ipdrive

ipdridoc.cpp File Reference

#include "stdafx.h"
#include "ipdrive.h"
#include "ipdridoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdridoc.h File Reference

  • ole
  • ipdrive
Classes

ipdridoc.h File Reference

#include "ipremote.h"

Go to the source code of this file.

Classes

class CDriverDoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrive.cpp File Reference

  • ole
  • ipdrive
Classes | Variables

ipdrive.cpp File Reference

#include "stdafx.h"
#include "ipdrive.h"
#include "mainfrm.h"
#include "ipdridoc.h"
#include "ipdrivw.h"

Go to the source code of this file.

Classes

class | CAboutDlg

Variables

CDriveApp NEAR | theApp

Variable Documentation

CDriveApp NEAR theApp

Definition at line 50 of file ipdrive.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrive.h File Reference

  • ole
  • ipdrive
Classes

ipdrive.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDriveApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrivw.cpp File Reference

  • ole
  • ipdrive

ipdrivw.cpp File Reference

#include "stdafx.h"
#include "ipdrive.h"
#include "ipdridoc.h"
#include "ipdrivw.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrivw.h File Reference

  • ole
  • ipdrive
Classes

ipdrivw.h File Reference

Go to the source code of this file.

Classes

class CDriverView
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipremote.cpp File Reference

  • ole
  • ipdrive

ipremote.cpp File Reference

#include "stdafx.h"
#include "ipremote.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipremote.h File Reference

  • ole
  • ipdrive
Classes

ipremote.h File Reference

Go to the source code of this file.

Classes

class | CStringCollect
class | CVariantAssoc
class | CVariantMap
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/mainfrm.cpp File Reference

  • ole
  • ipdrive

mainfrm.cpp File Reference

#include "stdafx.h"
#include "ipdrive.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/mainfrm.h File Reference

  • ole
  • ipdrive
Classes

mainfrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/resource.h File Reference

  • ole
  • ipdrive
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_ADD 0x8002
#define | ID_LOOKUP 0x8001
#define | ID_REMOVE 0x8003
#define | IDC_BUTTON1 1010
#define | IDC_BUTTON2 1011
#define | IDC_COMBO2 1001
#define | IDC_COMBO3 1003
#define | IDC_CURRENT_COUNT 1007
#define | IDC_EDIT1 1002
#define | IDC_EDIT2 1004
#define | IDD_ABOUTBOX 100
#define | IDD_IPDRIVE_FORM 101
#define | IDP_INCOMPATIBLE_TYPE_VALUE 132
#define | IDP_OLE_INIT_FAILED 100
#define | IDP_TIMING_RESULT 133
#define | IDP_UNABLE_TO_CREATE_INPROC 131
#define | IDR_MAINFRAME 128
#define | IDS_NOTHING 129
#define | IDS_UNKNOWN 130

Define Documentation

#define ID_ADD 0x8002

Definition at line 22 of file resource.h.

#define ID_LOOKUP 0x8001

Definition at line 21 of file resource.h.

#define ID_REMOVE 0x8003

Definition at line 23 of file resource.h.

#define IDC_BUTTON1 1010

Definition at line 19 of file resource.h.

#define IDC_BUTTON2 1011

Definition at line 20 of file resource.h.

#define IDC_COMBO2 1001

Definition at line 14 of file resource.h.

#define IDC_COMBO3 1003

Definition at line 16 of file resource.h.

#define IDC_CURRENT_COUNT 1007

Definition at line 18 of file resource.h.

#define IDC_EDIT1 1002

Definition at line 15 of file resource.h.

#define IDC_EDIT2 1004

Definition at line 17 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_IPDRIVE_FORM 101

Definition at line 7 of file resource.h.

#define IDP_INCOMPATIBLE_TYPE_VALUE 132

Definition at line 12 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDP_TIMING_RESULT 133

Definition at line 13 of file resource.h.

#define IDP_UNABLE_TO_CREATE_INPROC 131

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDS_NOTHING 129

Definition at line 9 of file resource.h.

#define IDS_UNKNOWN 130

Definition at line 10 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/stdafx.cpp File Reference

  • ole
  • ipdrive

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/stdafx.h File Reference

  • ole
  • ipdrive
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindDoc.cpp File Reference

  • ole
  • MFCBind

BindDoc.cpp File Reference

#include "stdafx.h"
#include "MFCBind.h"
#include "BindDoc.h"
#include "BindView.h"
#include "CntrItem.h"
#include "MainFrm.h"
#include "ObjView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindDoc.h File Reference

  • ole
  • MFCBind
Classes

BindDoc.h File Reference

Go to the source code of this file.

Classes

class CMFCBindDoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindView.cpp File Reference

  • ole
  • MFCBind

BindView.cpp File Reference

#include "stdafx.h"
#include "MFCBind.h"
#include "BindDoc.h"
#include "CntrItem.h"
#include "BindView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindView.h File Reference

  • ole
  • MFCBind
Classes

BindView.h File Reference

Go to the source code of this file.

Classes

class CMFCBindView
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/CntrItem.cpp File Reference

  • ole
  • MFCBind

CntrItem.cpp File Reference

#include "stdafx.h"
#include "MFCBind.h"
#include "BindDoc.h"
#include "BindView.h"
#include "CntrItem.h"
#include "mainfrm.h"
#include "ObjView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/CntrItem.h File Reference

  • ole
  • MFCBind
Classes

CntrItem.h File Reference

Go to the source code of this file.

Classes

class CMFCBindCntrItem
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MainFrm.cpp File Reference

  • ole
  • MFCBind

MainFrm.cpp File Reference

#include "stdafx.h"
#include "MFCBind.h"
#include "MainFrm.h"
#include "BindView.h"
#include "ObjView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MainFrm.h File Reference

  • ole
  • MFCBind
Classes

MainFrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MFCBind.cpp File Reference

  • ole
  • MFCBind
Classes | Variables

MFCBind.cpp File Reference

#include "stdafx.h"
#include "MFCBind.h"
#include "MainFrm.h"
#include "BindDoc.h"
#include "BindView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CMFCBindApp theApp

Variable Documentation

CMFCBindApp theApp

Definition at line 53 of file MFCBind.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MFCBind.h File Reference

  • ole
  • MFCBind
Classes

MFCBind.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CMFCBindApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/ObjView.cpp File Reference

  • ole
  • MFCBind

ObjView.cpp File Reference

#include "stdafx.h"
#include "MFCBind.h"
#include "mainfrm.h"
#include "cntritem.h"
#include "BindDoc.h"
#include "BindView.h"
#include "ObjView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/ObjView.h File Reference

  • ole
  • MFCBind
Classes | Defines

ObjView.h File Reference

Go to the source code of this file.

Classes

class | CCustomList
struct | CItemIcons
class | CObjListView

Defines

#define | ITEM_HEIGHT 60

Define Documentation

#define ITEM_HEIGHT 60

Definition at line 21 of file ObjView.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/resource.h File Reference

  • ole
  • MFCBind
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_EDIT_CNTR 32768
#define | ID_FILE_PRINTALLSECTIONS 32775
#define | ID_LISTBOX 101
#define | ID_MENUITEM32771 32771
#define | ID_MENUITEM32772 32772
#define | ID_SECTION_FROMFILE 32774
#define | ID_SECTION_REMOVE 32773
#define | IDC_EDIT1 1002
#define | IDD_ABOUTBOX 100
#define | IDD_GETURL 132
#define | IDP_FAILED_TO_CREATE 102
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CNTR_INPLACE 6
#define | IDR_MAINFRAME 128
#define | IDR_MFCBINTYPE 129

Define Documentation

#define ID_CANCEL_EDIT_CNTR 32768

Definition at line 14 of file resource.h.

#define ID_FILE_PRINTALLSECTIONS 32775

Definition at line 19 of file resource.h.

#define ID_LISTBOX 101

Definition at line 8 of file resource.h.

#define ID_MENUITEM32771 32771

Definition at line 15 of file resource.h.

#define ID_MENUITEM32772 32772

Definition at line 16 of file resource.h.

#define ID_SECTION_FROMFILE 32774

Definition at line 18 of file resource.h.

#define ID_SECTION_REMOVE 32773

Definition at line 17 of file resource.h.

#define IDC_EDIT1 1002

Definition at line 13 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_GETURL 132

Definition at line 12 of file resource.h.

#define IDP_FAILED_TO_CREATE 102

Definition at line 9 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 7 of file resource.h.

#define IDR_CNTR_INPLACE 6

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 10 of file resource.h.

#define IDR_MFCBINTYPE 129

Definition at line 11 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/StdAfx.cpp File Reference

  • ole
  • MFCBind

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/StdAfx.h File Reference

  • ole
  • MFCBind
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxcmn.h>
#include <afxcview.h>
#include <afxpriv.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 21 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/calcdlg.cpp File Reference

  • ole
  • mfccalc
Classes | Defines | Functions

calcdlg.cpp File Reference

#include "stdafx.h"
#include "mfccalc.h"
#include "calcdlg.h"

Go to the source code of this file.

Classes

class | CAboutDlg

Defines

#define | IMPLEMENT_OLECREATE_SINGLE(class_name, external_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)

Functions

IMPLEMENT_OLECREATE_SINGLE (CCalcDlg,"mfccalc.calculator", 0x62c4dd10, 0xf45e, 0x11cd, 0x8c, 0x3d, 0x0, 0xaa, 0x0, 0x4b, 0xb3, 0xb7)

Define Documentation

#define IMPLEMENT_OLECREATE_SINGLE | ( | class_name,
 |  | external_name,
 |  | l,
 |  | w1,
 |  | w2,
 |  | b1,
 |  | b2,
 |  | b3,
 |  | b4,
 |  | b5,
 |  | b6,
 |  | b7,
 |  | b8
 | ) |
Value:
AFX_DATADEF COleObjectFactory class_name::factory(class_name::guid, \
    RUNTIME_CLASS(class_name), TRUE, _T(external_name)); \
  const AFX_DATADEF GUID class_name::guid = \
    { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } };

Definition at line 96 of file calcdlg.cpp.

Function Documentation

IMPLEMENT_OLECREATE_SINGLE | ( | CCalcDlg | ,
 |  | "mfccalc.calculator" | ,
 |  | 0x62c4dd10 | ,
 |  | 0xf45e | ,
 |  | 0x11cd | ,
 |  | 0x8c | ,
 |  | 0x3d | ,
 |  | 0x0 | ,
 |  | 0xaa | ,
 |  | 0x0 | ,
 |  | 0x4b | ,
 |  | 0xb3 | ,
 |  | 0xb7 |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/calcdlg.h File Reference

  • ole
  • mfccalc
Classes | Enumerations

calcdlg.h File Reference

Go to the source code of this file.

Classes

class | CCalcDlg

Enumerations

enum | CalcError { ErrNone, ErrDivideByZero }
enum Operator {
OpNone, OpAdd, OpSubtract, OpMultiply,
OpDivide
}

Enumeration Type Documentation

enum CalcError
Enumerator:
ErrNone
ErrDivideByZero

Definition at line 16 of file calcdlg.h.

{ ErrNone, ErrDivideByZero };

enum Operator
Enumerator:
OpNone
OpAdd
OpSubtract
OpMultiply
OpDivide

Definition at line 15 of file calcdlg.h.

{ OpNone, OpAdd, OpSubtract, OpMultiply, OpDivide };

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/mfccalc.cpp File Reference

  • ole
  • mfccalc
Variables

mfccalc.cpp File Reference

#include "stdafx.h"
#include "mfccalc.h"
#include "calcdlg.h"

Go to the source code of this file.

Variables

CCalcApp theApp

Variable Documentation

CCalcApp theApp

Definition at line 44 of file mfccalc.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/mfccalc.h File Reference

  • ole
  • mfccalc
Classes

mfccalc.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CCalcApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/mfccalc.odl File Reference

  • ole
  • mfccalc
Classes | Namespaces | Functions

mfccalc.odl File Reference

Go to the source code of this file.

Classes

class | mfccalc::CCCalcDlg
interface | mfccalc::ICalcDlg

Namespaces

namespace | mfccalc

Functions

mfccalc::importlib ("stdole32.tlb")
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/resource.h File Reference

  • ole
  • mfccalc
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_NOTHING 32789
#define | IDB_0 1000
#define | IDB_1 1001
#define | IDB_2 1002
#define | IDB_3 1003
#define | IDB_4 1004
#define | IDB_5 1005
#define | IDB_6 1006
#define | IDB_7 1007
#define | IDB_8 1008
#define | IDB_9 1009
#define | IDB_CLEAR 1021
#define | IDB_CLOSE 1017
#define | IDB_DIVIDE 1013
#define | IDB_EQUAL 1020
#define | IDB_MINUS 1011
#define | IDB_PLUS 1010
#define | IDB_TIMES 1012
#define | IDC_INVISIBLE_FOCUS 1016
#define | IDD_ABOUTBOX 100
#define | IDD_MFCCALC_DIALOG 102
#define | IDE_ACCUM 1030
#define | IDM_ABOUTBOX 0x0010
#define | IDP_OLE_INIT_FAILED 100
#define | IDP_UNABLE_TO_SHOW_CALC 103
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101
#define | IDS_ERROR 102

Define Documentation

#define ID_NOTHING 32789

Definition at line 32 of file resource.h.

#define IDB_0 1000

Definition at line 13 of file resource.h.

#define IDB_1 1001

Definition at line 14 of file resource.h.

#define IDB_2 1002

Definition at line 15 of file resource.h.

#define IDB_3 1003

Definition at line 16 of file resource.h.

#define IDB_4 1004

Definition at line 17 of file resource.h.

#define IDB_5 1005

Definition at line 18 of file resource.h.

#define IDB_6 1006

Definition at line 19 of file resource.h.

#define IDB_7 1007

Definition at line 20 of file resource.h.

#define IDB_8 1008

Definition at line 21 of file resource.h.

#define IDB_9 1009

Definition at line 22 of file resource.h.

#define IDB_CLEAR 1021

Definition at line 30 of file resource.h.

#define IDB_CLOSE 1017

Definition at line 28 of file resource.h.

#define IDB_DIVIDE 1013

Definition at line 26 of file resource.h.

#define IDB_EQUAL 1020

Definition at line 29 of file resource.h.

#define IDB_MINUS 1011

Definition at line 24 of file resource.h.

#define IDB_PLUS 1010

Definition at line 23 of file resource.h.

#define IDB_TIMES 1012

Definition at line 25 of file resource.h.

#define IDC_INVISIBLE_FOCUS 1016

Definition at line 27 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_MFCCALC_DIALOG 102

Definition at line 9 of file resource.h.

#define IDE_ACCUM 1030

Definition at line 31 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 7 of file resource.h.

#define IDP_UNABLE_TO_SHOW_CALC 103

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 12 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 8 of file resource.h.

#define IDS_ERROR 102

Definition at line 10 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/stdafx.cpp File Reference

  • ole
  • mfccalc

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/stdafx.h File Reference

  • ole
  • mfccalc
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/frame.cpp File Reference

  • ole
  • oclient

frame.cpp File Reference

#include "stdafx.h"
#include "oclient.h"
#include "frame.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/frame.h File Reference

  • ole
  • oclient
Classes

frame.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/maindoc.cpp File Reference

  • ole
  • oclient

maindoc.cpp File Reference

#include "stdafx.h"
#include "oclient.h"
#include "maindoc.h"
#include "rectitem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/maindoc.h File Reference

  • ole
  • oclient
Classes

maindoc.h File Reference

Go to the source code of this file.

Classes

class CMainDoc
Generated on Sat Nov 23 2024 17:00:44 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/mainview.cpp File Reference

  • ole
  • oclient
Classes

mainview.cpp File Reference

#include "stdafx.h"
#include "oclient.h"
#include "maindoc.h"
#include "mainview.h"
#include "rectitem.h"

Go to the source code of this file.

Classes

class COlePropertiesEx
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/mainview.h File Reference

  • ole
  • oclient
Classes

mainview.h File Reference

Go to the source code of this file.

Classes

class CMainView
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/oclient.cpp File Reference

  • ole
  • oclient
Variables

oclient.cpp File Reference

#include "stdafx.h"
#include <stddef.h>
#include "oclient.h"
#include "frame.h"
#include "maindoc.h"
#include "mainview.h"
#include "splitfra.h"

Go to the source code of this file.

Variables

COleClientApp NEAR theApp

Variable Documentation

COleClientApp NEAR theApp

Definition at line 30 of file oclient.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/oclient.h File Reference

  • ole
  • oclient
Classes

oclient.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class COleClientApp
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/rectitem.cpp File Reference

  • ole
  • oclient

rectitem.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include "oclient.h"
#include "maindoc.h"
#include "mainview.h"
#include "rectitem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/rectitem.h File Reference

  • ole
  • oclient
Classes

rectitem.h File Reference

Go to the source code of this file.

Classes

class CRectItem
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/resource.h File Reference

  • ole
  • oclient
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_INPLACE 2002
#define | ID_EDIT_CLONE 2006
#define | ID_OBJECT_CHANGEICON 2005
#define | ID_OBJECT_DISPLAYASICON 2004
#define | ID_OBJECT_DISPLAYCONTENT 2003
#define | ID_OBJECT_POPUP_MENU 102
#define | ID_OBJECT_RESETSIZE 2009
#define | ID_OBJECT_TRACK_SIZE 2000
#define | ID_OLE_CHANGE_SOURCE 2012
#define | IDD_ABOUTBOX 100
#define | IDP_AFXOLEINIT_FAILED 519
#define | IDP_BUSY 101
#define | IDP_CLIPBOARD_COPY_FAILED 0x202
#define | IDP_CLIPBOARD_CUT_FAILED 0x201
#define | IDP_CLIPBOARD_ZERO_SIZE 0x206
#define | IDP_FAILED_TO_CREATE 0x204
#define | IDP_GET_FROM_CLIPBOARD_FAILED 0x203
#define | IDP_SAVEINCOMPLETE 0x205
#define | IDR_MAINFRAME 2
#define | IDR_OCLIENTTYPE 3
#define | IDR_OCLIENTTYPE_CNTR_IP 104
#define | IDS_PRIVATE_CF_DESCR 102

Define Documentation

#define ID_CANCEL_INPLACE 2002

Definition at line 20 of file resource.h.

#define ID_EDIT_CLONE 2006

Definition at line 24 of file resource.h.

#define ID_OBJECT_CHANGEICON 2005

Definition at line 23 of file resource.h.

#define ID_OBJECT_DISPLAYASICON 2004

Definition at line 22 of file resource.h.

#define ID_OBJECT_DISPLAYCONTENT 2003

Definition at line 21 of file resource.h.

#define ID_OBJECT_POPUP_MENU 102

Definition at line 9 of file resource.h.

#define ID_OBJECT_RESETSIZE 2009

Definition at line 25 of file resource.h.

#define ID_OBJECT_TRACK_SIZE 2000

Definition at line 19 of file resource.h.

#define ID_OLE_CHANGE_SOURCE 2012

Definition at line 26 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 7 of file resource.h.

#define IDP_AFXOLEINIT_FAILED 519

Definition at line 18 of file resource.h.

#define IDP_BUSY 101

Definition at line 8 of file resource.h.

#define IDP_CLIPBOARD_COPY_FAILED 0x202

Definition at line 13 of file resource.h.

#define IDP_CLIPBOARD_CUT_FAILED 0x201

Definition at line 12 of file resource.h.

#define IDP_CLIPBOARD_ZERO_SIZE 0x206

Definition at line 17 of file resource.h.

#define IDP_FAILED_TO_CREATE 0x204

Definition at line 15 of file resource.h.

#define IDP_GET_FROM_CLIPBOARD_FAILED 0x203

Definition at line 14 of file resource.h.

#define IDP_SAVEINCOMPLETE 0x205

Definition at line 16 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

#define IDR_OCLIENTTYPE 3

Definition at line 6 of file resource.h.

#define IDR_OCLIENTTYPE_CNTR_IP 104

Definition at line 11 of file resource.h.

#define IDS_PRIVATE_CF_DESCR 102

Definition at line 10 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/splitfra.cpp File Reference

  • ole
  • oclient

splitfra.cpp File Reference

#include "stdafx.h"
#include "oclient.h"
#include "splitfra.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/splitfra.h File Reference

  • ole
  • oclient
Classes

splitfra.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CSplitFrame
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/stdafx.cpp File Reference

  • ole
  • oclient

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/stdafx.h File Reference

  • ole
  • oclient
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/doc.cpp File Reference

  • ole
  • oleview

doc.cpp File Reference

#include "stdafx.h"
#include "OleView.h"
#include "doc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/doc.h File Reference

  • ole
  • oleview
Classes

doc.h File Reference

Go to the source code of this file.

Classes

class COle2ViewDoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/mainfrm.cpp File Reference

  • ole
  • oleview
Functions

mainfrm.cpp File Reference

#include "stdafx.h"
#include "OleView.h"
#include "mainfrm.h"
#include "shadow.h"
#include "obj_vw.h"

Go to the source code of this file.

Functions

void WINAPI ViewInterface (HWND hwnd, REFIID riid, IUnknown *punk)

Function Documentation

void WINAPI ViewInterface | ( | HWND | hwnd,
 |  | REFIID | riid,
 |  | IUnknown * | punk
 | ) |  |

Definition at line 454 of file mainfrm.cpp.

{
  IInterfaceViewer* piv = NULL ;
  SCODE sc ;

  // Look in the registry for the "Ole2ViewIViewer=" key for this iid
  //
  TCHAR szKey[128] ;
  TCHAR szValue[80] ;
  TCHAR szInterface[80] ;

  // get the string from CLSID in TCHAR format
  LPOLESTR lpszOleIID = NULL;
  ::StringFromCLSID(riid, &lpszOleIID);
  ASSERT(lpszOleIID != NULL);

  COLE2T lpszIID(lpszOleIID);
  ENSURE(lpszIID != NULL);
  IMalloc* pmal = NULL ;
  ::CoGetMalloc( MEMCTX_TASK, &pmal ) ;
  pmal->Free( lpszOleIID ) ;
  pmal->Release() ;

  _stprintf_s(szKey, 128, _T("Interface\\%s"), lpszIID) ;

  LONG cb = sizeof(szValue);
  if (::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szInterface, &cb) != ERROR_SUCCESS)
  {
    _tcscpy_s( szInterface, 80, "<no name>" ) ;
  }

  _stprintf_s(szKey, 128, _T("Interface\\%s\\Ole2ViewIViewerCLSID"), lpszIID );

  cb = sizeof(szValue) ;
  if (::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szValue, &cb) != ERROR_SUCCESS)
  {
    CString str;
    str.Format(_T("There is no interface viewer for %s installed."), szInterface);
    ErrorMessage( str, E_FAIL ) ;
    return ;
  }

  CLSID clsid ;
  sc = ::CLSIDFromString( CT2OLE(szValue), &clsid ) ;
  if (FAILED(sc))
  {
    CString str;
    str.Format(_T("Could not convert the CLSID of the %s interface viewer."), szInterface);
    ErrorMessage( str, sc ) ;
    return ;
  }

  sc = ::CoCreateInstance( clsid, NULL, CLSCTX_SERVER, IID_IInterfaceViewer, (void**)&piv ) ;
  if (SUCCEEDED(sc))
  {
    IUnknown* ptemp = NULL ;
    HRESULT hr = punk->QueryInterface( riid, (void**)&ptemp ) ;
    if (SUCCEEDED(hr))
    {
      piv->View( hwnd, riid, ptemp ) ;
      piv->Release() ;
      ptemp->Release() ;
    }
  }
  else
  {
    CString str;
    str.Format(_T("The %s interface viewer failed to load."), szInterface);
    ErrorMessage( str, sc ) ;
  }
}

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/mainfrm.h File Reference

  • ole
  • oleview
Classes | Defines | Functions

mainfrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | UPD_ALL 0x00000000
#define | UPD_NOIFACELISTVIEW 0x00000004
#define | UPD_NOINTERFACEVIEW 0x00000002
#define | UPD_NOOBJECTVIEW 0x00000001
#define | UPD_NORELOAD 0x00000008

Functions

void WINAPI | ViewInterface (HWND hwnd, REFIID riid, IUnknown *punk)

Define Documentation

#define UPD_ALL 0x00000000

Definition at line 18 of file mainfrm.h.

#define UPD_NOIFACELISTVIEW 0x00000004

Definition at line 21 of file mainfrm.h.

#define UPD_NOINTERFACEVIEW 0x00000002

Definition at line 20 of file mainfrm.h.

#define UPD_NOOBJECTVIEW 0x00000001

Definition at line 19 of file mainfrm.h.

#define UPD_NORELOAD 0x00000008

Definition at line 22 of file mainfrm.h.

Function Documentation

void WINAPI ViewInterface | ( | HWND | hwnd,
 |  | REFIID | riid,
 |  | IUnknown * | punk
 | ) |  |

Definition at line 454 of file mainfrm.cpp.

{
  IInterfaceViewer* piv = NULL ;
  SCODE sc ;

  // Look in the registry for the "Ole2ViewIViewer=" key for this iid
  //
  TCHAR szKey[128] ;
  TCHAR szValue[80] ;
  TCHAR szInterface[80] ;

  // get the string from CLSID in TCHAR format
  LPOLESTR lpszOleIID = NULL;
  ::StringFromCLSID(riid, &lpszOleIID);
  ASSERT(lpszOleIID != NULL);

  COLE2T lpszIID(lpszOleIID);
  ENSURE(lpszIID != NULL);
  IMalloc* pmal = NULL ;
  ::CoGetMalloc( MEMCTX_TASK, &pmal ) ;
  pmal->Free( lpszOleIID ) ;
  pmal->Release() ;

  _stprintf_s(szKey, 128, _T("Interface\\%s"), lpszIID) ;

  LONG cb = sizeof(szValue);
  if (::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szInterface, &cb) != ERROR_SUCCESS)
  {
    _tcscpy_s( szInterface, 80, "<no name>" ) ;
  }

  _stprintf_s(szKey, 128, _T("Interface\\%s\\Ole2ViewIViewerCLSID"), lpszIID );

  cb = sizeof(szValue) ;
  if (::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szValue, &cb) != ERROR_SUCCESS)
  {
    CString str;
    str.Format(_T("There is no interface viewer for %s installed."), szInterface);
    ErrorMessage( str, E_FAIL ) ;
    return ;
  }

  CLSID clsid ;
  sc = ::CLSIDFromString( CT2OLE(szValue), &clsid ) ;
  if (FAILED(sc))
  {
    CString str;
    str.Format(_T("Could not convert the CLSID of the %s interface viewer."), szInterface);
    ErrorMessage( str, sc ) ;
    return ;
  }

  sc = ::CoCreateInstance( clsid, NULL, CLSCTX_SERVER, IID_IInterfaceViewer, (void**)&piv ) ;
  if (SUCCEEDED(sc))
  {
    IUnknown* ptemp = NULL ;
    HRESULT hr = punk->QueryInterface( riid, (void**)&ptemp ) ;
    if (SUCCEEDED(hr))
    {
      piv->View( hwnd, riid, ptemp ) ;
      piv->Release() ;
      ptemp->Release() ;
    }
  }
  else
  {
    CString str;
    str.Format(_T("The %s interface viewer failed to load."), szInterface);
    ErrorMessage( str, sc ) ;
  }
}

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/obj_vw.cpp File Reference

  • ole
  • oleview
Functions

obj_vw.cpp File Reference

#include "stdafx.h"
#include "OleView.h"
#include "shadow.h"
#include "obj_vw.h"
#include <winnls.h>

Go to the source code of this file.

Functions

BOOL | HasServer16 (HKEY hkCLSID)
BOOL | HasServer32 (HKEY hkCLSID)

Function Documentation

BOOL HasServer16 ( HKEY hkCLSID )

Definition at line 307 of file obj_vw.cpp.

{
  HKEY hkTemp ;
  if ((RegOpenKey( hkCLSID, _T("InprocServer"), &hkTemp ) == ERROR_SUCCESS) ||
    (RegOpenKey( hkCLSID, _T("InprocHandler"), &hkTemp ) == ERROR_SUCCESS) ||
    (RegOpenKey( hkCLSID, _T("LocalServer"), &hkTemp ) == ERROR_SUCCESS))
  {
    RegCloseKey( hkTemp ) ;
    return TRUE ;
  }

  return FALSE ;
}

BOOL HasServer32 ( HKEY hkCLSID )

Definition at line 293 of file obj_vw.cpp.

{
  HKEY hkTemp ;
  if ((RegOpenKey( hkCLSID, _T("InprocServer32"), &hkTemp ) == ERROR_SUCCESS) ||
    (RegOpenKey( hkCLSID, _T("InprocHandler32"), &hkTemp ) == ERROR_SUCCESS) ||
    (RegOpenKey( hkCLSID, _T("LocalServer32"), &hkTemp ) == ERROR_SUCCESS))
  {
    RegCloseKey( hkTemp ) ;
    return TRUE ;
  }

  return FALSE ;
}

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/obj_vw.h File Reference

  • ole
  • oleview
Classes

obj_vw.h File Reference

#include "view.h"

Go to the source code of this file.

Classes

class | CObjectData
class | CObjTreeView
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/oleview.cpp File Reference

  • ole
  • oleview
Classes | Typedefs | Variables

oleview.cpp File Reference

#include "stdafx.h"
#include <winver.h>
#include <initguid.h>
#include "iviewers\\iviewers.h"
#include "OleView.h"
#include "mainfrm.h"
#include "doc.h"
#include "obj_vw.h"
#include "regview.h"
#include "shadow.h"

Go to the source code of this file.

Classes

class | CAboutDlg
struct | tagVS_VERSION

Typedefs

typedef struct tagVS_VERSION | VS_VERSION

Variables

COle2ViewApp theApp

Typedef Documentation

typedef struct tagVS_VERSION VS_VERSION

Variable Documentation

COle2ViewApp theApp

Definition at line 53 of file oleview.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/oleview.h File Reference

  • ole
  • oleview
Classes | Defines | Variables

oleview.h File Reference

#include "iviewers\\iviewers.h"
#include "resource.h"
#include "util.h"
#include "mainfrm.h"
#include "doc.h"
#include "regview.h"
#include "obj_vw.h"
#include "resource.h"
#include "mainfrm.h"

Go to the source code of this file.

Classes

class | CMyListBox
class | COle2ViewApp

Defines

#define | BMINDEX(x) (x - IDB_FIRST)
#define | GETCLASSBRBACKGROUND(hwnd) (HBRUSH)GETCLASSUINT(hwnd, GCW_HBRBACKGROUND)
#define | GETCLASSUINT(hwnd, index) (UINT)GetClassWord(hwnd, index)
#define | IDB_FIRST IDB_QUESTION
#define | MGetModuleUsage GetModuleUsage

Variables

COle2ViewApp theApp

Define Documentation

#define BMINDEX ( x ) (x - IDB_FIRST)

Definition at line 54 of file oleview.h.

#define GETCLASSBRBACKGROUND ( hwnd ) (HBRUSH)GETCLASSUINT(hwnd, GCW_HBRBACKGROUND)

Definition at line 33 of file oleview.h.

#define GETCLASSUINT | ( | hwnd,
 |  | index |
 | ) |  | (UINT)GetClassWord(hwnd, index)

Definition at line 32 of file oleview.h.

#define IDB_FIRST IDB_QUESTION

Definition at line 53 of file oleview.h.

#define MGetModuleUsage GetModuleUsage

Definition at line 34 of file oleview.h.

Variable Documentation

COle2ViewApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/regview.cpp File Reference

  • ole
  • oleview
Classes | Functions | Variables

regview.cpp File Reference

#include "stdafx.h"
#include "oleview.h"
#include "regview.h"

Go to the source code of this file.

Classes

class | CRegEntry

Functions

HICON | GetIconFromReg (HKEY hk, LPTSTR szKey)
BOOL | RegToListBox (CTreeCtrl *pTree, const CString &strKey, HKEY hk, HTREEITEM htreeParent)

Variables

int const | MAX_KEYLEN = 256
int const | MAX_VALLEN = (_MAX_PATH + MAX_KEYLEN)

Function Documentation

HICON GetIconFromReg | ( | HKEY | hk,
 |  | LPTSTR | szKey
 | ) |  |

Definition at line 525 of file regview.cpp.

{
  TCHAR szValue[MAX_VALLEN] ;
  LONG cb = MAX_VALLEN ;
  if (RegQueryValue( hk, szKey, szValue, &cb) == ERROR_SUCCESS)
  {
    LPTSTR p = szValue + lstrlen( szValue ) - 1 ;
    if (p && *p == ' ')
      *p = '\0' ;
    if (*szValue == '"')
    {
      _tcscpy_s( szValue, MAX_VALLEN, szValue+1 ) ;
      p = strrchr( szValue, '"' ) ;
      if (p) *p = '\0' ;
    }

    return ExtractIcon( AfxGetInstanceHandle(), szValue, 0 ) ;
  }
  else
    return (HICON)-1 ;
}

BOOL RegToListBox | ( | CTreeCtrl * | pTree,
 |  | const CString & | strKey,
 |  | HKEY | hk,
 |  | HTREEITEM | htreeParent
 | ) |  |

Definition at line 476 of file regview.cpp.

{
  TCHAR szKey[MAX_KEYLEN];
  TCHAR szValue[MAX_VALLEN];
  TCHAR szBuf[MAX_VALLEN + 4];
  LONG  cb ;
  DWORD dwIndex ;

  TRY
  {
    TV_INSERTSTRUCT tvis ;
    tvis.hParent = htreeParent ;
    tvis.hInsertAfter = TVI_LAST ;
    tvis.item.mask = TVIF_TEXT | TVIF_PARAM ;

    cb = MAX_KEYLEN ;
    RegQueryValue( hk, NULL, szValue, &cb) ;
    _stprintf_s( szBuf, MAX_VALLEN + 4, _T("%s = %s"), (LPCTSTR)strKey, (LPCTSTR)szValue ) ;
    tvis.item.pszText = szBuf ;
    #pragma warning(suppress: 6014)
    tvis.item.lParam = (LPARAM)new CRegEntry( strKey, szValue ) ;
    HTREEITEM htree = pTree->InsertItem( &tvis ) ;

    for ( dwIndex = 0 ;
        RegEnumKey( hk, dwIndex, szKey, MAX_KEYLEN) == ERROR_SUCCESS ;
        ++dwIndex )
    {
      cb = MAX_KEYLEN ;
      *szValue = '\0' ;
      RegQueryValue( hk, (LPTSTR)szKey, szValue, &cb) ;
      HKEY hkNext ;
      if (RegOpenKey( hk, szKey, &hkNext) == ERROR_SUCCESS)
      {
        RegToListBox( pTree, szKey, hkNext, htree ) ;
        RegCloseKey( hkNext ) ;
      }
    }

    pTree->Expand( htree, TVE_EXPAND ) ;
  }
  CATCH(CException, pException)
  {
    return FALSE ;
  }
  END_CATCH;

  return TRUE ;
}

Variable Documentation

int const MAX_KEYLEN = 256

Definition at line 25 of file regview.cpp.

int const MAX_VALLEN = (_MAX_PATH + MAX_KEYLEN)

Definition at line 26 of file regview.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/regview.h File Reference

  • ole
  • oleview
Classes

regview.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CRegistryView
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/resource.h File Reference

  • ole
  • oleview
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | chx1 0x0410
#define | chx10 0x0419
#define | chx11 0x041a
#define | chx12 0x041b
#define | chx13 0x041c
#define | chx14 0x041d
#define | chx15 0x041e
#define | chx16 0x041f
#define | chx2 0x0411
#define | chx3 0x0412
#define | chx4 0x0413
#define | chx5 0x0414
#define | chx6 0x0415
#define | chx7 0x0416
#define | chx8 0x0417
#define | chx9 0x0418
#define | cmb1 0x0470
#define | cmb10 0x0479
#define | cmb11 0x047a
#define | cmb12 0x047b
#define | cmb13 0x047c
#define | cmb14 0x047d
#define | cmb15 0x047e
#define | cmb16 0x047f
#define | cmb2 0x0471
#define | cmb3 0x0472
#define | cmb4 0x0473
#define | cmb5 0x0474
#define | cmb6 0x0475
#define | cmb7 0x0476
#define | cmb8 0x0477
#define | cmb9 0x0478
#define | ctlFirst 0x0400
#define | ctlLast 0x04ff
#define | edt1 0x0480
#define | edt10 0x0489
#define | edt11 0x048a
#define | edt12 0x048b
#define | edt13 0x048c
#define | edt14 0x048d
#define | edt15 0x048e
#define | edt16 0x048f
#define | edt2 0x0481
#define | edt3 0x0482
#define | edt4 0x0483
#define | edt5 0x0484
#define | edt6 0x0485
#define | edt7 0x0486
#define | edt8 0x0487
#define | edt9 0x0488
#define | FILEOPENORD 1536
#define | FINDDLGORD 1540
#define | FONTDLGORD 1542
#define | FORMATDLGORD30 1544
#define | FORMATDLGORD31 1543
#define | frm1 0x0434
#define | frm2 0x0435
#define | frm3 0x0436
#define | frm4 0x0437
#define | grp1 0x0430
#define | grp2 0x0431
#define | grp3 0x0432
#define | grp4 0x0433
#define | ico1 0x043c
#define | ico2 0x043d
#define | ico3 0x043e
#define | ico4 0x043f
#define | ID_FILE_BINDTOAFILE 32784
#define | ID_FILE_RUNREGEDIT 32771
#define | ID_FILE_SHOWVERSION 32770
#define | ID_FILE_VIEWTYPELIB 32781
#define | ID_IFACES_USEINPROCHANDLER 32778
#define | ID_IFACES_USEINPROCSERVER 32777
#define | ID_IFACES_USELOCALSERVER 32779
#define | ID_IFACEVIEW 102
#define | ID_IFACEVIEW_GETINTERFACES 32774
#define | ID_IFACEVIEW_IFACEVIEWER 32772
#define | ID_INDICATOR_CF 0xE706
#define | ID_INDICATOR_UNK 0xE707
#define | ID_INTERFACES_SHOWCFI 32783
#define | ID_INTERFACES_SHOWCLASSFACTORYOBJECTINTERFACES 32782
#define | ID_INTERFACES_USECLSCTXINPROCHANDLER 32776
#define | ID_INTERFACES_USECLSCTXINPROCSERVER 32775
#define | ID_OBJECT_DELETE 32793
#define | ID_OBJECT_VERIFY 32792
#define | ID_OBJECTS_SHOWCONTAINERS 32788
#define | ID_OBJECTS_SHOWCONTROLS 32789
#define | ID_OBJECTS_SHOWINSERTABLE 32794
#define | ID_OBJECTS_SHOWINTERNAL 32780
#define | ID_OBJECTS_SHOWNOTINSERTABLEOBJECTS 32787
#define | ID_OBJECTS_SHOWOLE10OBJECTS 32786
#define | ID_OBJECTS_SHOWTYPELIBS 32790
#define | ID_OBJECTVIEW 101
#define | ID_TREEVIEW 103
#define | ID_VIEW_CLASSIDS 32768
#define | ID_VIEW_REFRESH 32773
#define | ID_VIEW_SHOWALLINTERFACES 32769
#define | ID_VIEW_TEST 32785
#define | IDB_AUTOMATION 205
#define | IDB_CONTAINER 206
#define | IDB_CONTAINER32 212
#define | IDB_IFACEFOLDER 216
#define | IDB_IMAGELIST 200
#define | IDB_INTERFACE 217
#define | IDB_OBJECT 202
#define | IDB_OBJECT32 209
#define | IDB_OBJECT_CONTROL 204
#define | IDB_OBJECT_CONTROL32 211
#define | IDB_OBJECT_INSERTABLE 203
#define | IDB_OBJECT_INSERTABLE10 207
#define | IDB_OBJECT_INSERTABLE1032 213
#define | IDB_OBJECT_INSERTABLE32 210
#define | IDB_OBJECTFOLDER 214
#define | IDB_QUESTION 201
#define | IDB_QUESTION32 208
#define | IDB_TYPELIBFOLDER 215
#define | IDC_ALLRIGHTSRESERVED 106
#define | IDC_APPNAME 104
#define | IDC_COPYRIGHT 105
#define | IDC_GROUP 108
#define | IDC_IFACE_PROPS 102
#define | IDC_INFO 117
#define | IDC_INTERFACE 103
#define | IDC_INTERFACE_ID 104
#define | IDC_LIST1 112
#define | IDC_LIST1LBL 109
#define | IDC_OBJECTCLSID 119
#define | IDC_OBJECTNAME 118
#define | IDC_OBJICON 126
#define | IDC_OLE2LIB 111
#define | IDC_OLE2LIB_LBL 110
#define | IDC_RUNTIME_LBL 113
#define | IDC_RUNTIMEVER 114
#define | IDC_SELFREG 123
#define | IDC_TREEVIEW 125
#define | IDC_UNREGISTER 124
#define | IDC_VERSION 101
#define | IDC_WRITTENBY 107
#define | IDD_ABOUTBOX 100
#define | IDD_IFACEDIALOG 103
#define | IDD_REGVIEW 122
#define | IDD_VERSIONINFO 118
#define | IDI_AUTOMATION 112
#define | IDI_DRAGDROP 113
#define | IDI_ICON1 124
#define | IDI_INTERFACE 114
#define | IDI_MAGNIFY 112
#define | IDI_NOICON 111
#define | IDI_OLE2 109
#define | IDI_OLE2_1 110
#define | IDR_MAINFRAME 2
#define | IDR_MAINFRAME_A 115
#define | IDR_MAINFRAME_U 114
#define | IDR_VERSION1 120
#define | IDS_AUTOREGFAILED 22
#define | IDS_BADCOMMANDLINE 10
#define | IDS_IDATAOBJECT 3
#define | IDS_IDISPATCH 11
#define | IDS_INI_CLSCTX 8
#define | IDS_INI_CONFIG 4
#define | IDS_INI_SHOWALLINTERFACES 7
#define | IDS_INI_SHOWCFI 3
#define | IDS_INI_SHOWCLASSIDS 6
#define | IDS_INI_SHOWCONTAINERS 13
#define | IDS_INI_SHOWCONTROLS 14
#define | IDS_INI_SHOWINSERTABLE 16
#define | IDS_INI_SHOWINTERNAL 9
#define | IDS_INI_SHOWNOTINSERTABLE 12
#define | IDS_INI_SHOWOLE1OBJECTS 11
#define | IDS_INI_SHOWTYPELIBS 15
#define | IDS_INI_WNDPOS 5
#define | IDS_INIFILE 3
#define | IDS_ITYPEINFO 12
#define | IDS_IVIEWERSNOTFOUND1 18
#define | IDS_IVIEWERSNOTFOUND2 19
#define | IDS_IVIEWERSNOTFOUND3 20
#define | IDS_IVIEWERSNOTFOUND4 21
#define | IDS_NOINFO 10
#define | IDS_REGISTRYKEY 17
#define | lst1 0x0460
#define | lst10 0x0469
#define | lst11 0x046a
#define | lst12 0x046b
#define | lst13 0x046c
#define | lst14 0x046d
#define | lst15 0x046e
#define | lst16 0x046f
#define | lst2 0x0461
#define | lst3 0x0462
#define | lst4 0x0463
#define | lst5 0x0464
#define | lst6 0x0465
#define | lst7 0x0466
#define | lst8 0x0467
#define | lst9 0x0468
#define | MULTIFILEOPENORD 1537
#define | PRINTDLGORD 1538
#define | PRNSETUPDLGORD 1539
#define | psh1 0x0400
#define | psh10 0x0409
#define | psh11 0x040a
#define | psh12 0x040b
#define | psh13 0x040c
#define | psh14 0x040d
#define | psh15 0x040e
#define | psh16 0x040f
#define | psh2 0x0401
#define | psh3 0x0402
#define | psh4 0x0403
#define | psh5 0x0404
#define | psh6 0x0405
#define | psh7 0x0406
#define | psh8 0x0407
#define | psh9 0x0408
#define | rad1 0x0420
#define | rad10 0x0429
#define | rad11 0x042a
#define | rad12 0x042b
#define | rad13 0x042c
#define | rad14 0x042d
#define | rad15 0x042e
#define | rad16 0x042f
#define | rad2 0x0421
#define | rad3 0x0422
#define | rad4 0x0423
#define | rad5 0x0424
#define | rad6 0x0425
#define | rad7 0x0426
#define | rad8 0x0427
#define | rad9 0x0428
#define | rct1 0x0438
#define | rct2 0x0439
#define | rct3 0x043a
#define | rct4 0x043b
#define | REPLACEDLGORD 1541
#define | scr1 0x0490
#define | scr2 0x0491
#define | scr3 0x0492
#define | scr4 0x0493
#define | scr5 0x0494
#define | scr6 0x0495
#define | scr7 0x0496
#define | scr8 0x0497
#define | stc1 0x0440
#define | stc10 0x0449
#define | stc11 0x044a
#define | stc12 0x044b
#define | stc13 0x044c
#define | stc14 0x044d
#define | stc15 0x044e
#define | stc16 0x044f
#define | stc17 0x0450
#define | stc18 0x0451
#define | stc19 0x0452
#define | stc2 0x0441
#define | stc20 0x0453
#define | stc21 0x0454
#define | stc22 0x0455
#define | stc23 0x0456
#define | stc24 0x0457
#define | stc25 0x0458
#define | stc26 0x0459
#define | stc27 0x045a
#define | stc28 0x045b
#define | stc29 0x045c
#define | stc3 0x0442
#define | stc30 0x045d
#define | stc31 0x045e
#define | stc32 0x045f
#define | stc4 0x0443
#define | stc5 0x0444
#define | stc6 0x0445
#define | stc7 0x0446
#define | stc8 0x0447
#define | stc9 0x0448

Define Documentation

#define chx1 0x0410

Definition at line 106 of file resource.h.

#define chx10 0x0419

Definition at line 115 of file resource.h.

#define chx11 0x041a

Definition at line 116 of file resource.h.

#define chx12 0x041b

Definition at line 117 of file resource.h.

#define chx13 0x041c

Definition at line 118 of file resource.h.

#define chx14 0x041d

Definition at line 119 of file resource.h.

#define chx15 0x041e

Definition at line 120 of file resource.h.

#define chx16 0x041f

Definition at line 121 of file resource.h.

#define chx2 0x0411

Definition at line 107 of file resource.h.

#define chx3 0x0412

Definition at line 108 of file resource.h.

#define chx4 0x0413

Definition at line 109 of file resource.h.

#define chx5 0x0414

Definition at line 110 of file resource.h.

#define chx6 0x0415

Definition at line 111 of file resource.h.

#define chx7 0x0416

Definition at line 112 of file resource.h.

#define chx8 0x0417

Definition at line 113 of file resource.h.

#define chx9 0x0418

Definition at line 114 of file resource.h.

#define cmb1 0x0470

Definition at line 202 of file resource.h.

#define cmb10 0x0479

Definition at line 211 of file resource.h.

#define cmb11 0x047a

Definition at line 212 of file resource.h.

#define cmb12 0x047b

Definition at line 213 of file resource.h.

#define cmb13 0x047c

Definition at line 214 of file resource.h.

#define cmb14 0x047d

Definition at line 215 of file resource.h.

#define cmb15 0x047e

Definition at line 216 of file resource.h.

#define cmb16 0x047f

Definition at line 217 of file resource.h.

#define cmb2 0x0471

Definition at line 203 of file resource.h.

#define cmb3 0x0472

Definition at line 204 of file resource.h.

#define cmb4 0x0473

Definition at line 205 of file resource.h.

#define cmb5 0x0474

Definition at line 206 of file resource.h.

#define cmb6 0x0475

Definition at line 207 of file resource.h.

#define cmb7 0x0476

Definition at line 208 of file resource.h.

#define cmb8 0x0477

Definition at line 209 of file resource.h.

#define cmb9 0x0478

Definition at line 210 of file resource.h.

#define ctlFirst 0x0400

Definition at line 89 of file resource.h.

#define ctlLast 0x04ff

Definition at line 242 of file resource.h.

#define edt1 0x0480

Definition at line 218 of file resource.h.

#define edt10 0x0489

Definition at line 227 of file resource.h.

#define edt11 0x048a

Definition at line 228 of file resource.h.

#define edt12 0x048b

Definition at line 229 of file resource.h.

#define edt13 0x048c

Definition at line 230 of file resource.h.

#define edt14 0x048d

Definition at line 231 of file resource.h.

#define edt15 0x048e

Definition at line 232 of file resource.h.

#define edt16 0x048f

Definition at line 233 of file resource.h.

#define edt2 0x0481

Definition at line 219 of file resource.h.

#define edt3 0x0482

Definition at line 220 of file resource.h.

#define edt4 0x0483

Definition at line 221 of file resource.h.

#define edt5 0x0484

Definition at line 222 of file resource.h.

#define edt6 0x0485

Definition at line 223 of file resource.h.

#define edt7 0x0486

Definition at line 224 of file resource.h.

#define edt8 0x0487

Definition at line 225 of file resource.h.

#define edt9 0x0488

Definition at line 226 of file resource.h.

#define FILEOPENORD 1536

Definition at line 243 of file resource.h.

#define FINDDLGORD 1540

Definition at line 247 of file resource.h.

#define FONTDLGORD 1542

Definition at line 249 of file resource.h.

#define FORMATDLGORD30 1544

Definition at line 251 of file resource.h.

#define FORMATDLGORD31 1543

Definition at line 250 of file resource.h.

#define frm1 0x0434

Definition at line 142 of file resource.h.

#define frm2 0x0435

Definition at line 143 of file resource.h.

#define frm3 0x0436

Definition at line 144 of file resource.h.

#define frm4 0x0437

Definition at line 145 of file resource.h.

#define grp1 0x0430

Definition at line 138 of file resource.h.

#define grp2 0x0431

Definition at line 139 of file resource.h.

#define grp3 0x0432

Definition at line 140 of file resource.h.

#define grp4 0x0433

Definition at line 141 of file resource.h.

#define ico1 0x043c

Definition at line 150 of file resource.h.

#define ico2 0x043d

Definition at line 151 of file resource.h.

#define ico3 0x043e

Definition at line 152 of file resource.h.

#define ico4 0x043f

Definition at line 153 of file resource.h.

#define ID_FILE_BINDTOAFILE 32784

Definition at line 268 of file resource.h.

#define ID_FILE_RUNREGEDIT 32771

Definition at line 255 of file resource.h.

#define ID_FILE_SHOWVERSION 32770

Definition at line 254 of file resource.h.

#define ID_FILE_VIEWTYPELIB 32781

Definition at line 265 of file resource.h.

#define ID_IFACES_USEINPROCHANDLER 32778

Definition at line 262 of file resource.h.

#define ID_IFACES_USEINPROCSERVER 32777

Definition at line 261 of file resource.h.

#define ID_IFACES_USELOCALSERVER 32779

Definition at line 263 of file resource.h.

#define ID_IFACEVIEW 102

Definition at line 34 of file resource.h.

#define ID_IFACEVIEW_GETINTERFACES 32774

Definition at line 258 of file resource.h.

#define ID_IFACEVIEW_IFACEVIEWER 32772

Definition at line 256 of file resource.h.

#define ID_INDICATOR_CF 0xE706

Definition at line 278 of file resource.h.

#define ID_INDICATOR_UNK 0xE707

Definition at line 279 of file resource.h.

#define ID_INTERFACES_SHOWCFI 32783

Definition at line 267 of file resource.h.

#define ID_INTERFACES_SHOWCLASSFACTORYOBJECTINTERFACES 32782

Definition at line 266 of file resource.h.

#define ID_INTERFACES_USECLSCTXINPROCHANDLER 32776

Definition at line 260 of file resource.h.

#define ID_INTERFACES_USECLSCTXINPROCSERVER 32775

Definition at line 259 of file resource.h.

#define ID_OBJECT_DELETE 32793

Definition at line 276 of file resource.h.

#define ID_OBJECT_VERIFY 32792

Definition at line 275 of file resource.h.

#define ID_OBJECTS_SHOWCONTAINERS 32788

Definition at line 272 of file resource.h.

#define ID_OBJECTS_SHOWCONTROLS 32789

Definition at line 273 of file resource.h.

#define ID_OBJECTS_SHOWINSERTABLE 32794

Definition at line 277 of file resource.h.

#define ID_OBJECTS_SHOWINTERNAL 32780

Definition at line 264 of file resource.h.

#define ID_OBJECTS_SHOWNOTINSERTABLEOBJECTS 32787

Definition at line 271 of file resource.h.

#define ID_OBJECTS_SHOWOLE10OBJECTS 32786

Definition at line 270 of file resource.h.

#define ID_OBJECTS_SHOWTYPELIBS 32790

Definition at line 274 of file resource.h.

#define ID_OBJECTVIEW 101

Definition at line 33 of file resource.h.

#define ID_TREEVIEW 103

Definition at line 36 of file resource.h.

#define ID_VIEW_CLASSIDS 32768

Definition at line 252 of file resource.h.

#define ID_VIEW_REFRESH 32773

Definition at line 257 of file resource.h.

#define ID_VIEW_SHOWALLINTERFACES 32769

Definition at line 253 of file resource.h.

#define ID_VIEW_TEST 32785

Definition at line 269 of file resource.h.

#define IDB_AUTOMATION 205

Definition at line 76 of file resource.h.

#define IDB_CONTAINER 206

Definition at line 77 of file resource.h.

#define IDB_CONTAINER32 212

Definition at line 83 of file resource.h.

#define IDB_IFACEFOLDER 216

Definition at line 87 of file resource.h.

#define IDB_IMAGELIST 200

Definition at line 71 of file resource.h.

#define IDB_INTERFACE 217

Definition at line 88 of file resource.h.

#define IDB_OBJECT 202

Definition at line 73 of file resource.h.

#define IDB_OBJECT32 209

Definition at line 80 of file resource.h.

#define IDB_OBJECT_CONTROL 204

Definition at line 75 of file resource.h.

#define IDB_OBJECT_CONTROL32 211

Definition at line 82 of file resource.h.

#define IDB_OBJECT_INSERTABLE 203

Definition at line 74 of file resource.h.

#define IDB_OBJECT_INSERTABLE10 207

Definition at line 78 of file resource.h.

#define IDB_OBJECT_INSERTABLE1032 213

Definition at line 84 of file resource.h.

#define IDB_OBJECT_INSERTABLE32 210

Definition at line 81 of file resource.h.

#define IDB_OBJECTFOLDER 214

Definition at line 85 of file resource.h.

#define IDB_QUESTION 201

Definition at line 72 of file resource.h.

#define IDB_QUESTION32 208

Definition at line 79 of file resource.h.

#define IDB_TYPELIBFOLDER 215

Definition at line 86 of file resource.h.

#define IDC_ALLRIGHTSRESERVED 106

Definition at line 42 of file resource.h.

#define IDC_APPNAME 104

Definition at line 40 of file resource.h.

#define IDC_COPYRIGHT 105

Definition at line 41 of file resource.h.

#define IDC_GROUP 108

Definition at line 44 of file resource.h.

#define IDC_IFACE_PROPS 102

Definition at line 35 of file resource.h.

#define IDC_INFO 117

Definition at line 60 of file resource.h.

#define IDC_INTERFACE 103

Definition at line 38 of file resource.h.

#define IDC_INTERFACE_ID 104

Definition at line 39 of file resource.h.

#define IDC_LIST1 112

Definition at line 52 of file resource.h.

#define IDC_LIST1LBL 109

Definition at line 46 of file resource.h.

#define IDC_OBJECTCLSID 119

Definition at line 63 of file resource.h.

#define IDC_OBJECTNAME 118

Definition at line 62 of file resource.h.

#define IDC_OBJICON 126

Definition at line 70 of file resource.h.

#define IDC_OLE2LIB 111

Definition at line 50 of file resource.h.

#define IDC_OLE2LIB_LBL 110

Definition at line 48 of file resource.h.

#define IDC_RUNTIME_LBL 113

Definition at line 54 of file resource.h.

#define IDC_RUNTIMEVER 114

Definition at line 56 of file resource.h.

#define IDC_SELFREG 123

Definition at line 66 of file resource.h.

#define IDC_TREEVIEW 125

Definition at line 69 of file resource.h.

#define IDC_UNREGISTER 124

Definition at line 67 of file resource.h.

#define IDC_VERSION 101

Definition at line 32 of file resource.h.

#define IDC_WRITTENBY 107

Definition at line 43 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 31 of file resource.h.

#define IDD_IFACEDIALOG 103

Definition at line 37 of file resource.h.

#define IDD_REGVIEW 122

Definition at line 65 of file resource.h.

#define IDD_VERSIONINFO 118

Definition at line 61 of file resource.h.

#define IDI_AUTOMATION 112

Definition at line 53 of file resource.h.

#define IDI_DRAGDROP 113

Definition at line 55 of file resource.h.

#define IDI_ICON1 124

Definition at line 68 of file resource.h.

#define IDI_INTERFACE 114

Definition at line 58 of file resource.h.

#define IDI_MAGNIFY 112

Definition at line 51 of file resource.h.

#define IDI_NOICON 111

Definition at line 49 of file resource.h.

#define IDI_OLE2 109

Definition at line 45 of file resource.h.

#define IDI_OLE2_1 110

Definition at line 47 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME_A 115

Definition at line 59 of file resource.h.

#define IDR_MAINFRAME_U 114

Definition at line 57 of file resource.h.

#define IDR_VERSION1 120

Definition at line 64 of file resource.h.

#define IDS_AUTOREGFAILED 22

Definition at line 30 of file resource.h.

#define IDS_BADCOMMANDLINE 10

Definition at line 16 of file resource.h.

#define IDS_IDATAOBJECT 3

Definition at line 7 of file resource.h.

#define IDS_IDISPATCH 11

Definition at line 17 of file resource.h.

#define IDS_INI_CLSCTX 8

Definition at line 13 of file resource.h.

#define IDS_INI_CONFIG 4

Definition at line 9 of file resource.h.

#define IDS_INI_SHOWALLINTERFACES 7

Definition at line 12 of file resource.h.

#define IDS_INI_SHOWCFI 3

Definition at line 8 of file resource.h.

#define IDS_INI_SHOWCLASSIDS 6

Definition at line 11 of file resource.h.

#define IDS_INI_SHOWCONTAINERS 13

Definition at line 21 of file resource.h.

#define IDS_INI_SHOWCONTROLS 14

Definition at line 22 of file resource.h.

#define IDS_INI_SHOWINSERTABLE 16

Definition at line 24 of file resource.h.

#define IDS_INI_SHOWINTERNAL 9

Definition at line 14 of file resource.h.

#define IDS_INI_SHOWNOTINSERTABLE 12

Definition at line 20 of file resource.h.

#define IDS_INI_SHOWOLE1OBJECTS 11

Definition at line 18 of file resource.h.

#define IDS_INI_SHOWTYPELIBS 15

Definition at line 23 of file resource.h.

#define IDS_INI_WNDPOS 5

Definition at line 10 of file resource.h.

#define IDS_INIFILE 3

Definition at line 6 of file resource.h.

#define IDS_ITYPEINFO 12

Definition at line 19 of file resource.h.

#define IDS_IVIEWERSNOTFOUND1 18

Definition at line 26 of file resource.h.

#define IDS_IVIEWERSNOTFOUND2 19

Definition at line 27 of file resource.h.

#define IDS_IVIEWERSNOTFOUND3 20

Definition at line 28 of file resource.h.

#define IDS_IVIEWERSNOTFOUND4 21

Definition at line 29 of file resource.h.

#define IDS_NOINFO 10

Definition at line 15 of file resource.h.

#define IDS_REGISTRYKEY 17

Definition at line 25 of file resource.h.

#define lst1 0x0460

Definition at line 186 of file resource.h.

#define lst10 0x0469

Definition at line 195 of file resource.h.

#define lst11 0x046a

Definition at line 196 of file resource.h.

#define lst12 0x046b

Definition at line 197 of file resource.h.

#define lst13 0x046c

Definition at line 198 of file resource.h.

#define lst14 0x046d

Definition at line 199 of file resource.h.

#define lst15 0x046e

Definition at line 200 of file resource.h.

#define lst16 0x046f

Definition at line 201 of file resource.h.

#define lst2 0x0461

Definition at line 187 of file resource.h.

#define lst3 0x0462

Definition at line 188 of file resource.h.

#define lst4 0x0463

Definition at line 189 of file resource.h.

#define lst5 0x0464

Definition at line 190 of file resource.h.

#define lst6 0x0465

Definition at line 191 of file resource.h.

#define lst7 0x0466

Definition at line 192 of file resource.h.

#define lst8 0x0467

Definition at line 193 of file resource.h.

#define lst9 0x0468

Definition at line 194 of file resource.h.

#define MULTIFILEOPENORD 1537

Definition at line 244 of file resource.h.

#define PRINTDLGORD 1538

Definition at line 245 of file resource.h.

#define PRNSETUPDLGORD 1539

Definition at line 246 of file resource.h.

#define psh1 0x0400

Definition at line 90 of file resource.h.

#define psh10 0x0409

Definition at line 99 of file resource.h.

#define psh11 0x040a

Definition at line 100 of file resource.h.

#define psh12 0x040b

Definition at line 101 of file resource.h.

#define psh13 0x040c

Definition at line 102 of file resource.h.

#define psh14 0x040d

Definition at line 103 of file resource.h.

#define psh15 0x040e

Definition at line 104 of file resource.h.

#define psh16 0x040f

Definition at line 105 of file resource.h.

#define psh2 0x0401

Definition at line 91 of file resource.h.

#define psh3 0x0402

Definition at line 92 of file resource.h.

#define psh4 0x0403

Definition at line 93 of file resource.h.

#define psh5 0x0404

Definition at line 94 of file resource.h.

#define psh6 0x0405

Definition at line 95 of file resource.h.

#define psh7 0x0406

Definition at line 96 of file resource.h.

#define psh8 0x0407

Definition at line 97 of file resource.h.

#define psh9 0x0408

Definition at line 98 of file resource.h.

#define rad1 0x0420

Definition at line 122 of file resource.h.

#define rad10 0x0429

Definition at line 131 of file resource.h.

#define rad11 0x042a

Definition at line 132 of file resource.h.

#define rad12 0x042b

Definition at line 133 of file resource.h.

#define rad13 0x042c

Definition at line 134 of file resource.h.

#define rad14 0x042d

Definition at line 135 of file resource.h.

#define rad15 0x042e

Definition at line 136 of file resource.h.

#define rad16 0x042f

Definition at line 137 of file resource.h.

#define rad2 0x0421

Definition at line 123 of file resource.h.

#define rad3 0x0422

Definition at line 124 of file resource.h.

#define rad4 0x0423

Definition at line 125 of file resource.h.

#define rad5 0x0424

Definition at line 126 of file resource.h.

#define rad6 0x0425

Definition at line 127 of file resource.h.

#define rad7 0x0426

Definition at line 128 of file resource.h.

#define rad8 0x0427

Definition at line 129 of file resource.h.

#define rad9 0x0428

Definition at line 130 of file resource.h.

#define rct1 0x0438

Definition at line 146 of file resource.h.

#define rct2 0x0439

Definition at line 147 of file resource.h.

#define rct3 0x043a

Definition at line 148 of file resource.h.

#define rct4 0x043b

Definition at line 149 of file resource.h.

#define REPLACEDLGORD 1541

Definition at line 248 of file resource.h.

#define scr1 0x0490

Definition at line 234 of file resource.h.

#define scr2 0x0491

Definition at line 235 of file resource.h.

#define scr3 0x0492

Definition at line 236 of file resource.h.

#define scr4 0x0493

Definition at line 237 of file resource.h.

#define scr5 0x0494

Definition at line 238 of file resource.h.

#define scr6 0x0495

Definition at line 239 of file resource.h.

#define scr7 0x0496

Definition at line 240 of file resource.h.

#define scr8 0x0497

Definition at line 241 of file resource.h.

#define stc1 0x0440

Definition at line 154 of file resource.h.

#define stc10 0x0449

Definition at line 163 of file resource.h.

#define stc11 0x044a

Definition at line 164 of file resource.h.

#define stc12 0x044b

Definition at line 165 of file resource.h.

#define stc13 0x044c

Definition at line 166 of file resource.h.

#define stc14 0x044d

Definition at line 167 of file resource.h.

#define stc15 0x044e

Definition at line 168 of file resource.h.

#define stc16 0x044f

Definition at line 169 of file resource.h.

#define stc17 0x0450

Definition at line 170 of file resource.h.

#define stc18 0x0451

Definition at line 171 of file resource.h.

#define stc19 0x0452

Definition at line 172 of file resource.h.

#define stc2 0x0441

Definition at line 155 of file resource.h.

#define stc20 0x0453

Definition at line 173 of file resource.h.

#define stc21 0x0454

Definition at line 174 of file resource.h.

#define stc22 0x0455

Definition at line 175 of file resource.h.

#define stc23 0x0456

Definition at line 176 of file resource.h.

#define stc24 0x0457

Definition at line 177 of file resource.h.

#define stc25 0x0458

Definition at line 178 of file resource.h.

#define stc26 0x0459

Definition at line 179 of file resource.h.

#define stc27 0x045a

Definition at line 180 of file resource.h.

#define stc28 0x045b

Definition at line 181 of file resource.h.

#define stc29 0x045c

Definition at line 182 of file resource.h.

#define stc3 0x0442

Definition at line 156 of file resource.h.

#define stc30 0x045d

Definition at line 183 of file resource.h.

#define stc31 0x045e

Definition at line 184 of file resource.h.

#define stc32 0x045f

Definition at line 185 of file resource.h.

#define stc4 0x0443

Definition at line 157 of file resource.h.

#define stc5 0x0444

Definition at line 158 of file resource.h.

#define stc6 0x0445

Definition at line 159 of file resource.h.

#define stc7 0x0446

Definition at line 160 of file resource.h.

#define stc8 0x0447

Definition at line 161 of file resource.h.

#define stc9 0x0448

Definition at line 162 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/shadow.cpp File Reference

  • ole
  • oleview
Defines | Functions

shadow.cpp File Reference

#include "stdafx.h"
#include "shadow.h"

Go to the source code of this file.

Defines

#define | SHADOWWIDTH 1

Functions

VOID NEAR PASCAL | Draw3DLine1 (HDC hDC, UINT x, UINT y, UINT nLen, UINT wFlags)
VOID NEAR PASCAL | DrawFrame (HDC hDC, LPRECT lprc)
VOID WINAPI | tdDraw3DCrease (HDC hDC, LPRECT lpRect, UINT uiFlags)
VOID WINAPI | tdDraw3DLine (HDC hDC, UINT x, UINT y, UINT uiLen, UINT uiShadowWidth, UINT uiFlags)
VOID WINAPI | tdDraw3DRect (HDC hDC, LPRECT lpRect, UINT uiShadowWidth, UINT uiFlags)
COLORREF WINAPI | tdGetHighlightColor (COLORREF rgb)
COLORREF WINAPI | tdGetShadowColor (COLORREF rgb)

Define Documentation

#define SHADOWWIDTH 1

Definition at line 21 of file shadow.cpp.

Function Documentation

VOID NEAR PASCAL Draw3DLine1 | ( | HDC | hDC,
 |  | UINT | x,
 |  | UINT | y,
 |  | UINT | nLen,
 |  | UINT | wFlags
 | ) |  |

Definition at line 447 of file shadow.cpp.

{
   BOOL    fDark ;
   RECT    rc ;
   COLORREF   rgbOld ;

   if ( uiFlags & DRAW3D_TOPLINE )
   {
    rc.left = x ;
    rc.right = rc.left + uiLen - 1 ;
    rc.top = y ;
    rc.bottom = y + 1 ;

    fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* possibly the bottom? */
   else if ( uiFlags & DRAW3D_BOTTOMLINE )
   {
    rc.left = x ;
    rc.right = rc.left + uiLen - 1 ;
    rc.top = y - 1 ;
    rc.bottom = y ;

    fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* ok, it's gotta be left? */
   else if ( uiFlags & DRAW3D_LEFTLINE )
   {
    rc.left = x ;
    rc.right = x + 1 ;
    rc.top = y ;
    rc.bottom = y + uiLen ;

    fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* well maybe it's for the right side? */
   else if ( uiFlags & DRAW3D_RIGHTLINE )
   {
    rc.left = x - 1 ;
    rc.right = x ;
    rc.top = y ;
    rc.bottom = y + uiLen ;

    fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* bad drugs? */
   else return ;

   /* select the appropriate color for the fill */
   if ( fDark )
    rgbOld = SetBkColor( hDC,
         GetNearestColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ) ;
   else
    rgbOld = SetBkColor( hDC,
         GetNearestColor( hDC, tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;

   /* finally, draw the dern thing */

   ExtTextOut( hDC, x, y, ETO_OPAQUE, &rc, NULL, 0, NULL ) ;

   SetBkColor( hDC, rgbOld ) ;

} /* Draw3DLine1()  */

VOID NEAR PASCAL DrawFrame | ( | HDC | hDC,
 |  | LPRECT | lprc
 | ) |  |

Definition at line 515 of file shadow.cpp.

{
   RECT    rc1 ;

   /* perform CopyRect w/o bloody windows style overhead */
   rc1 = *lprc ;

   /* top */
   rc1.top = lprc->top ;
   rc1.left = lprc->left ;
   rc1.bottom = lprc->top + 1 ;
   rc1.right = lprc->right ;

   /* blast it out */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

   /* right */
   rc1.left = lprc->right - 1 ;
   rc1.bottom = lprc->bottom ;

   /* blast this part now */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

   /* left */
   rc1.left = lprc->left ;
   rc1.right = lprc->left + 1 ;

   /* and another part */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

   /* bottom */
   rc1.right = lprc->right ;
   rc1.top = lprc->bottom - 1 ;

   /* finish it off */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

} /* DrawFaceFrame() */

VOID WINAPI tdDraw3DCrease | ( | HDC | hDC,
 |  | LPRECT | lpRect,
 |  | UINT | uiFlags
 | ) |  |

Definition at line 33 of file shadow.cpp.

{
   RECT       rc ;
   COLORREF   rgbOld ;

   rc = *lpRect ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, 1, 1 ) ;

   rgbOld = SetBkColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ;

   DrawFrame( hDC, &rc ) ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, -1, -1 ) ;
   else
    OffsetRect( &rc, 1, 1 ) ;

   SetBkColor( hDC, tdGetHighlightColor( rgbOld ) ) ;

   DrawFrame( hDC, &rc ) ;

   SetBkColor( hDC, rgbOld ) ;

} /* tdDraw3DCrease()  */

VOID WINAPI tdDraw3DLine | ( | HDC | hDC,
 |  | UINT | x,
 |  | UINT | y,
 |  | UINT | uiLen,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT nLen,.

DESCRIPTION: Draws a 3D line that can be used to make a 3D box.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the 3D line.

UINT x, y : Coordinates of the beginning of the line. These coordinates are in device UINTs and represent the _outside_ most point. Horiz- ontal lines are drawn from left to right and vertical lines are drawn from top to bottom.

UINT uiShadowWidth : Width of the shadow in device coordinates.

UINT uiFlags : The following flags may be passed to describe the style of the 3D line:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

DRAW3D_TOPLINE, _BOTTOMLINE, _LEFTLINE, and _RIGHTLINE : Specifies that a "top", "Bottom", "Left", or"Right" line is to be drawn.

RETURN (VOID WINAPI): The line will have been drawn into the DC.

NOTES:

cjp

Definition at line 195 of file shadow.cpp.

{
   HBRUSH  hBrush ;
   BOOL    fDark ;
   POINT   Point[ 4 ] ;         /* define a polgon with 4 points    */

   /* if width is zero, don't do nothin'! */
   if ( !uiShadowWidth )
     return ;

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    Draw3DLine1( hDC, x, y, uiLen, uiFlags ) ;
    return ;
   }

   /* define shape of polygon--origin is always the same */
   Point[0].x = x ;
   Point[0].y = y ;

   /*  To do this we'll simply draw a polygon with four sides, using
  *  the appropriate brush.  I dare you to ask me why this isn't a
  *  switch/case!
  */
   if ( uiFlags & DRAW3D_TOPLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
     Point[1].y = y ;

     /* down/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y + uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* possibly the bottom? */
   else if ( uiFlags & DRAW3D_BOTTOMLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen ;
     Point[1].y = y ;

     /* up/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y - uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y - uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* ok, it's gotta be left? */
   else if ( uiFlags & DRAW3D_LEFTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;

     /* up/right */
     Point[2].x = x + uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* down */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* well maybe it's for the right side? */
   else if ( uiFlags & DRAW3D_RIGHTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen ;

     /* up/left */
     Point[2].x = x - uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* up */
     Point[3].x = x - uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }
   else
    return ;

   /* select NULL_PEN for no borders */
   SelectObject( hDC, GetStockObject( NULL_PEN ) ) ;

   /* select the appropriate color for the fill */
   hBrush = CreateSolidBrush( GetNearestColor( hDC, fDark ?
                tdGetShadowColor( GetBkColor( hDC ) ) :
                tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;

   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   /* finally, draw the dern thing */
   Polygon( hDC, (LPPOINT)Point, 4 ) ;

   /* restore what we killed */
   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   DeleteObject( hBrush ) ;

} /*tdDraw3DLine() */

VOID WINAPI tdDraw3DRect | ( | HDC | hDC,
 |  | LPRECT | lpRect,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DRect( HDC, LPRECT, UINT, UINT ).

DESCRIPTION: Draws a 3D rectangle that is shaded. wFlags can be used to control how the rectangle looks.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the rectangle.

RECT rect : A rectangle describing the dimensions of the rectangle in device coordinates.

UINT wShadowWidth : Width of the shadow in device coordinates.

UINT wFlags : The following flags may be passed to describe the style of the rectangle:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

RETURN (VOID WINAPI): The 3D looking rectangle will have been drawn into the DC.

NOTES:

cjp

Definition at line 94 of file shadow.cpp.

{
   /* sanity check--don't work if you don't have to! */
   if ( !uiShadowWidth || !RectVisible( hDC, lpRect ) )
     return ;

   if (uiFlags & DRAW3D_CREASE)
   {
    tdDraw3DCrease( hDC, lpRect, uiFlags ) ;
    return ;
   }

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    /* draw the top line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    Draw3DLine1( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    Draw3DLine1( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_LEFTLINE | uiFlags ) ;
   }
   else
   {
    /* draw the top line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    tdDraw3DLine( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_LEFTLINE | uiFlags ) ;
   }
} /* Draw3DRect() */

COLORREF WINAPI tdGetHighlightColor ( COLORREF rgb )

Definition at line 333 of file shadow.cpp.

{
   BYTE  cRed, cGreen, cBlue ;

  #if _MFC_VER >= 0x0300
    if (rgb == GetSysColor( COLOR_BTNFACE ))
      return GetSysColor( COLOR_BTNHIGHLIGHT ) ;
  #endif

   if (rgb == RGBLTRED     ||
     rgb == RGBLTGREEN   ||
     rgb == RGBLTBLUE    ||
     rgb == RGBLTMAGENTA ||
     rgb == RGBLTCYAN    ||
     rgb == RGBLTGRAY    ||
     rgb == RGBYELLOW)
    return RGBWHITE ;

   if (rgb == RGBWHITE)
    return RGBLTGRAY ;

   if (rgb == RGBBLACK || rgb == RGBGRAY)
    return RGBLTGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed == 128)
    cRed += 64 ;

   if (cGreen == 128)
    cGreen += 64 ;

   if (cBlue == 128)
    cBlue += 64 ;

   return RGB( cRed, cGreen, cBlue ) ;

} /* tdGetHighlightColor()  */

COLORREF WINAPI tdGetShadowColor ( COLORREF rgb )

Definition at line 387 of file shadow.cpp.

{
  if (rgb == GetSysColor( COLOR_BTNFACE ))
    return GetSysColor( COLOR_BTNSHADOW ) ;

   BYTE  cRed, cGreen, cBlue ;

   if (rgb == RGBBLACK)
    return RGBGRAY ;

   if (rgb == RGBRED     ||
     rgb == RGBGREEN   ||
     rgb == RGBBLUE    ||
     rgb == RGBBROWN   ||
     rgb == RGBMAGENTA ||
     rgb == RGBCYAN    ||
     rgb == RGBWHITE   ||
     rgb == RGBGRAY)
    return RGBBLACK ;

   if (rgb == RGBLTGRAY)
    return RGBGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed > 128)
    cRed -= 64 ;

   if (cGreen > 128)
    cGreen -= 64 ;

   if (cBlue > 128)
    cBlue -= 64 ;

   return RGB( cRed, cGreen, cBlue ) ;
} /* tdGetShadowColor()  */

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/shadow.h File Reference

  • ole
  • oleview
Defines | Functions

shadow.h File Reference

Go to the source code of this file.

Defines

#define | DRAW3D_BOTTOMLINE 0x1000
#define | DRAW3D_CREASE 0x0400
#define | DRAW3D_IN 0x0100
#define | DRAW3D_LEFTLINE 0x2000
#define | DRAW3D_OUT 0x0200
#define | DRAW3D_RIGHTLINE 0x4000
#define | DRAW3D_TOPLINE 0x0800
#define | RGBBLACK RGB(0,0,0)
#define | RGBBLUE RGB(0,0,128)
#define | RGBBROWN RGB(128,128,0)
#define | RGBCYAN RGB(0,128,128)
#define | RGBGRAY RGB(128,128,128)
#define | RGBGREEN RGB(0,128,0)
#define | RGBLTBLUE RGB(0,0,255)
#define | RGBLTCYAN RGB(0,255,255)
#define | RGBLTGRAY RGB(192,192,192)
#define | RGBLTGREEN RGB(0,255,0)
#define | RGBLTMAGENTA RGB(255,0,255)
#define | RGBLTRED RGB(255,0,0)
#define | RGBMAGENTA RGB(128,0,128)
#define | RGBRED RGB(128,0,0)
#define | RGBWHITE RGB(255,255,255)
#define | RGBYELLOW RGB(255,255,0)
#define | tdDrawRect tdDrawFaceFrame

Functions

VOID WINAPI | tdDraw3DCrease (HDC hdc, LPRECT lprc, UINT uiFlags)
VOID WINAPI | tdDraw3DLine (HDC hdc, UINT x, UINT y, UINT nLen, UINT uiWidth, UINT wFlags)
VOID WINAPI | tdDraw3DRect (HDC hdc, LPRECT lprc, UINT uiWidth, UINT wFlags)
VOID WINAPI | tdDrawFaceFrame (HDC hdc, LPRECT lprc, UINT uiWidth)
COLORREF WINAPI | tdGetHighlightColor (COLORREF rgb)
COLORREF WINAPI | tdGetShadowColor (COLORREF rgb)

Define Documentation

#define DRAW3D_BOTTOMLINE 0x1000

Definition at line 20 of file shadow.h.

#define DRAW3D_CREASE 0x0400

Definition at line 17 of file shadow.h.

#define DRAW3D_IN 0x0100

Definition at line 15 of file shadow.h.

#define DRAW3D_LEFTLINE 0x2000

Definition at line 21 of file shadow.h.

#define DRAW3D_OUT 0x0200

Definition at line 16 of file shadow.h.

#define DRAW3D_RIGHTLINE 0x4000

Definition at line 22 of file shadow.h.

#define DRAW3D_TOPLINE 0x0800

Definition at line 19 of file shadow.h.

#define RGBBLACK RGB(0,0,0)

Definition at line 29 of file shadow.h.

#define RGBBLUE RGB(0,0,128)

Definition at line 32 of file shadow.h.

#define RGBBROWN RGB(128,128,0)

Definition at line 33 of file shadow.h.

#define RGBCYAN RGB(0,128,128)

Definition at line 35 of file shadow.h.

#define RGBGRAY RGB(128,128,128)

Definition at line 37 of file shadow.h.

#define RGBGREEN RGB(0,128,0)

Definition at line 31 of file shadow.h.

#define RGBLTBLUE RGB(0,0,255)

Definition at line 40 of file shadow.h.

#define RGBLTCYAN RGB(0,255,255)

Definition at line 43 of file shadow.h.

#define RGBLTGRAY RGB(192,192,192)

Definition at line 36 of file shadow.h.

#define RGBLTGREEN RGB(0,255,0)

Definition at line 39 of file shadow.h.

#define RGBLTMAGENTA RGB(255,0,255)

Definition at line 42 of file shadow.h.

#define RGBLTRED RGB(255,0,0)

Definition at line 38 of file shadow.h.

#define RGBMAGENTA RGB(128,0,128)

Definition at line 34 of file shadow.h.

#define RGBRED RGB(128,0,0)

Definition at line 30 of file shadow.h.

#define RGBWHITE RGB(255,255,255)

Definition at line 44 of file shadow.h.

#define RGBYELLOW RGB(255,255,0)

Definition at line 41 of file shadow.h.

#define tdDrawRect tdDrawFaceFrame

Definition at line 84 of file shadow.h.

Function Documentation

VOID WINAPI tdDraw3DCrease | ( | HDC | hdc,
 |  | LPRECT | lprc,
 |  | UINT | uiFlags
 | ) |  |

Definition at line 32 of file shadow.cpp.

{
   RECT       rc ;
   COLORREF   rgbOld ;

   rc = *lpRect ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, 1, 1 ) ;

   rgbOld = SetBkColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ;

   DrawFrame( hDC, &rc ) ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, -1, -1 ) ;
   else
    OffsetRect( &rc, 1, 1 ) ;

   SetBkColor( hDC, tdGetHighlightColor( rgbOld ) ) ;

   DrawFrame( hDC, &rc ) ;

   SetBkColor( hDC, rgbOld ) ;

} /* tdDraw3DCrease()  */

VOID WINAPI tdDraw3DLine | ( | HDC | hDC,
 |  | UINT | x,
 |  | UINT | y,
 |  | UINT | uiLen,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT nLen,.

DESCRIPTION: Draws a 3D line that can be used to make a 3D box.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the 3D line.

UINT x, y : Coordinates of the beginning of the line. These coordinates are in device UINTs and represent the _outside_ most point. Horiz- ontal lines are drawn from left to right and vertical lines are drawn from top to bottom.

UINT uiShadowWidth : Width of the shadow in device coordinates.

UINT uiFlags : The following flags may be passed to describe the style of the 3D line:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

DRAW3D_TOPLINE, _BOTTOMLINE, _LEFTLINE, and _RIGHTLINE : Specifies that a "top", "Bottom", "Left", or"Right" line is to be drawn.

RETURN (VOID WINAPI): The line will have been drawn into the DC.

NOTES:

cjp

Definition at line 194 of file shadow.cpp.

{
   HBRUSH  hBrush ;
   BOOL    fDark ;
   POINT   Point[ 4 ] ;         /* define a polgon with 4 points    */

   /* if width is zero, don't do nothin'! */
   if ( !uiShadowWidth )
     return ;

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    Draw3DLine1( hDC, x, y, uiLen, uiFlags ) ;
    return ;
   }

   /* define shape of polygon--origin is always the same */
   Point[0].x = x ;
   Point[0].y = y ;

   /*  To do this we'll simply draw a polygon with four sides, using
  *  the appropriate brush.  I dare you to ask me why this isn't a
  *  switch/case!
  */
   if ( uiFlags & DRAW3D_TOPLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
     Point[1].y = y ;

     /* down/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y + uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* possibly the bottom? */
   else if ( uiFlags & DRAW3D_BOTTOMLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen ;
     Point[1].y = y ;

     /* up/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y - uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y - uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* ok, it's gotta be left? */
   else if ( uiFlags & DRAW3D_LEFTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;

     /* up/right */
     Point[2].x = x + uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* down */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* well maybe it's for the right side? */
   else if ( uiFlags & DRAW3D_RIGHTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen ;

     /* up/left */
     Point[2].x = x - uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* up */
     Point[3].x = x - uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }
   else
    return ;

   /* select NULL_PEN for no borders */
   SelectObject( hDC, GetStockObject( NULL_PEN ) ) ;

   /* select the appropriate color for the fill */
   hBrush = CreateSolidBrush( GetNearestColor( hDC, fDark ?
                tdGetShadowColor( GetBkColor( hDC ) ) :
                tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;

   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   Polygon( hDC, (LPPOINT)Point, 4 ) ;

   /* restore what we killed */
   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   DeleteObject( hBrush ) ;

} /*tdDraw3DLine() */

VOID WINAPI tdDraw3DRect | ( | HDC | hDC,
 |  | LPRECT | lpRect,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DRect( HDC, LPRECT, UINT, UINT ).

DESCRIPTION: Draws a 3D rectangle that is shaded. wFlags can be used to control how the rectangle looks.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the rectangle.

RECT rect : A rectangle describing the dimensions of the rectangle in device coordinates.

UINT wShadowWidth : Width of the shadow in device coordinates.

UINT wFlags : The following flags may be passed to describe the style of the rectangle:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

RETURN (VOID WINAPI): The 3D looking rectangle will have been drawn into the DC.

NOTES:

cjp

Definition at line 93 of file shadow.cpp.

{
   /* sanity check--don't work if you don't have to! */
   if ( !uiShadowWidth || !RectVisible( hDC, lpRect ) )
     return ;

   if (uiFlags & DRAW3D_CREASE)
   {
    tdDraw3DCrease( hDC, lpRect, uiFlags ) ;
    return ;
   }

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    /* draw the top line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    Draw3DLine1( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    Draw3DLine1( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_LEFTLINE | uiFlags ) ;
   }
   else
   {
    /* draw the top line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    tdDraw3DLine( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_LEFTLINE | uiFlags ) ;
   }
} /* Draw3DRect() */

VOID WINAPI tdDrawFaceFrame | ( | HDC | hdc,
 |  | LPRECT | lprc,
 |  | UINT | uiWidth
 | ) |  |
COLORREF WINAPI tdGetHighlightColor ( COLORREF rgb )

Definition at line 331 of file shadow.cpp.

{
   BYTE  cRed, cGreen, cBlue ;

  #if _MFC_VER >= 0x0300
    if (rgb == GetSysColor( COLOR_BTNFACE ))
      return GetSysColor( COLOR_BTNHIGHLIGHT ) ;
  #endif

   if (rgb == RGBLTRED     ||
     rgb == RGBLTGREEN   ||
     rgb == RGBLTBLUE    ||
     rgb == RGBLTMAGENTA ||
     rgb == RGBLTCYAN    ||
     rgb == RGBLTGRAY    ||
     rgb == RGBYELLOW)
    return RGBWHITE ;

   if (rgb == RGBWHITE)
    return RGBLTGRAY ;

   if (rgb == RGBBLACK || rgb == RGBGRAY)
    return RGBLTGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed == 128)
    cRed += 64 ;

   if (cGreen == 128)
    cGreen += 64 ;

   if (cBlue == 128)
    cBlue += 64 ;

   return RGB( cRed, cGreen, cBlue ) ;

} /* tdGetHighlightColor()  */

COLORREF WINAPI tdGetShadowColor ( COLORREF rgb )

Definition at line 385 of file shadow.cpp.

{
  if (rgb == GetSysColor( COLOR_BTNFACE ))
    return GetSysColor( COLOR_BTNSHADOW ) ;

   BYTE  cRed, cGreen, cBlue ;

   if (rgb == RGBBLACK)
    return RGBGRAY ;

   if (rgb == RGBRED     ||
     rgb == RGBGREEN   ||
     rgb == RGBBLUE    ||
     rgb == RGBBROWN   ||
     rgb == RGBMAGENTA ||
     rgb == RGBCYAN    ||
     rgb == RGBWHITE   ||
     rgb == RGBGRAY)
    return RGBBLACK ;

   if (rgb == RGBLTGRAY)
    return RGBGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed > 128)
    cRed -= 64 ;

   if (cGreen > 128)
    cGreen -= 64 ;

   if (cBlue > 128)
    cBlue -= 64 ;

   return RGB( cRed, cGreen, cBlue ) ;
} /* tdGetShadowColor()  */

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/stdafx.cpp File Reference

  • ole
  • oleview

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/stdafx.h File Reference

  • ole
  • oleview
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxcmn.h>
#include <afxcview.h>
#include <afxpriv.h>
#include <ole2ver.h>
#include <winreg.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 15 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/util.cpp File Reference

  • ole
  • oleview
Defines | Functions

util.cpp File Reference

#include "stdafx.h"
#include "util.h"
#include "shadow.h"
#include <ctype.h>

Go to the source code of this file.

Defines

#define | _COUNTOF(array) (sizeof(array)/sizeof(array[0]))
#define | DSPDxax 0x00E20746L
#define | ETOFLAGS ETO_CLIPPED
#define | MAKE_RANGE_ENTRY(scRange)
#define | MAKE_SCODE_ENTRY(sc) { sc, _T(#sc) }

Functions

LPCTSTR AFXAPI | _GetFacilityString (SCODE sc)
LPCTSTR AFXAPI | _GetFullScodeString (SCODE sc)
LPCTSTR AFXAPI | _GetScodeRangeString (SCODE sc)
LPCTSTR AFXAPI | _GetScodeString (SCODE sc)
LPCTSTR AFXAPI | _GetSeverityString (SCODE sc)
VOID WINAPI | AddBackslash (LPTSTR lpszPath, int nSize)
void | bmColorTranslate (CBitmap *pbmSrc, COLORREF rgbNew)
void | bmColorTranslateDC (CDC *pdcMem, BITMAP *pBM, COLORREF rgbOld, COLORREF rgbNew)
CBitmap * | bmLoadAndTranslate (UINT id, COLORREF rgb)
void WINAPI | ColumnTextOut (HDC hdc, int nX, int nY, LPTSTR lpszIN, int cColumns, LPCOLUMNSTRUCT rgColumns)
void WINAPI | DlgCenter (HWND hwndCenter, HWND hwndWithin, BOOL fClient)
void | DrawListBoxBitmap (CDC *pdc, CBitmap *pbmt, int x, int y)
void | ErrorMessage (const CString &str, HRESULT hr)
int EXPORT CALLBACK | fnEnumReallyEx (LPENUMLOGFONT lpLogFont, LPNEWTEXTMETRIC lpTextMetrics, int nFontType, LPENUMLOGFONT lpELF)
int WINAPI | GetTextMetricsCorrectly (HDC hDC, LPTEXTMETRIC lpTM)
LPTSTR | HRtoString (HRESULT hr)
LONG WINAPI | ParseOffNumber (LPTSTR FAR *lplp, LPINT lpConv)
LPTSTR FAR PASCAL | PointerToNthField (LPTSTR lpszString, int nField, TCHAR chDelimiter)
CFont * | ReallyCreateFont (HDC hDC, LPTSTR lpszFace, LPTSTR lpszStyle, UINT nPointSize, UINT uiFlags)
VOID WINAPI | StripFilespec (LPTSTR lpszPath)
LPTSTR | VTtoString (VARTYPE vt)

Define Documentation

#define _COUNTOF ( array ) (sizeof(array)/sizeof(array[0]))

Definition at line 870 of file util.cpp.

#define DSPDxax 0x00E20746L
#define ETOFLAGS ETO_CLIPPED
#define MAKE_RANGE_ENTRY ( scRange )
Value:
{ scRange##_FIRST, scRange##_LAST, \
      _T(#scRange) _T("_FIRST...") _T(#scRange) _T("_LAST") }
#define MAKE_SCODE_ENTRY ( sc ) { sc, _T(#sc) }

Function Documentation

LPCTSTR AFXAPI _GetFacilityString ( SCODE sc )

Definition at line 1232 of file util.cpp.

{
  static const TCHAR* rgszFACILITY[] =
  {
    _T("FACILITY_NULL"),
    _T("FACILITY_RPC"),
    _T("FACILITY_DISPATCH"),
    _T("FACILITY_STORAGE"),
    _T("FACILITY_ITF"),
    _T("FACILITY_0x05"),
    _T("FACILITY_0x06"),
    _T("FACILITY_WIN32"),
    _T("FACILITY_WINDOWS"),
  };
  if (SCODE_FACILITY(sc) >= _COUNTOF(rgszFACILITY) || SCODE_FACILITY(sc) < 0)
    return _T("<Unknown Facility>");

  return rgszFACILITY[SCODE_FACILITY(sc)];
}

LPCTSTR AFXAPI _GetFullScodeString ( SCODE sc )

Definition at line 1252 of file util.cpp.

{
  static TCHAR szBuf[128];
  LPCTSTR lpsz;
  if ((lpsz = _GetScodeString(sc)) != NULL)
  {
    // found exact match
    _stprintf_s(szBuf, 128, _T("%s ($%08lX)"), lpsz, sc);
  }
  else if ((lpsz = _GetScodeRangeString(sc)) != NULL)
  {
    // found suitable range
    _stprintf_s(szBuf, 128, _T("range: %s ($%08lX)"), lpsz, sc);
  }
  else
  {
    // not found at all -- split it up into its parts
    _stprintf_s(szBuf, 128, _T("severity: %s, facility: %s ($%08lX)"),
      _GetSeverityString(sc), _GetFacilityString(sc), sc);
  }
  return szBuf;
}

LPCTSTR AFXAPI _GetScodeRangeString ( SCODE sc )

Definition at line 1164 of file util.cpp.

{
  struct RANGE_ENTRY
  {
    SCODE scFirst;
    SCODE scLast;
    LPCTSTR lpszName;
  };
  #define MAKE_RANGE_ENTRY(scRange) \
    { scRange##_FIRST, scRange##_LAST, \
      _T(#scRange) _T("_FIRST...") _T(#scRange) _T("_LAST") }

  static const RANGE_ENTRY scRangeTable[] =
  {
    MAKE_RANGE_ENTRY(CACHE_E),
    MAKE_RANGE_ENTRY(CACHE_S),
    MAKE_RANGE_ENTRY(CLASSFACTORY_E),
    MAKE_RANGE_ENTRY(CLASSFACTORY_S),
    MAKE_RANGE_ENTRY(CLIENTSITE_E),
    MAKE_RANGE_ENTRY(CLIENTSITE_S),
    MAKE_RANGE_ENTRY(CLIPBRD_E),
    MAKE_RANGE_ENTRY(CLIPBRD_S),
    MAKE_RANGE_ENTRY(CONVERT10_E),
    MAKE_RANGE_ENTRY(CONVERT10_S),
    MAKE_RANGE_ENTRY(CO_E),
    MAKE_RANGE_ENTRY(CO_S),
    MAKE_RANGE_ENTRY(DATA_E),
    MAKE_RANGE_ENTRY(DATA_S),
    MAKE_RANGE_ENTRY(DRAGDROP_E),
    MAKE_RANGE_ENTRY(DRAGDROP_S),
    MAKE_RANGE_ENTRY(ENUM_E),
    MAKE_RANGE_ENTRY(ENUM_S),
    MAKE_RANGE_ENTRY(INPLACE_E),
    MAKE_RANGE_ENTRY(INPLACE_S),
    MAKE_RANGE_ENTRY(MARSHAL_E),
    MAKE_RANGE_ENTRY(MARSHAL_S),
    MAKE_RANGE_ENTRY(MK_E),
    MAKE_RANGE_ENTRY(MK_S),
    MAKE_RANGE_ENTRY(OLEOBJ_E),
    MAKE_RANGE_ENTRY(OLEOBJ_S),
    MAKE_RANGE_ENTRY(OLE_E),
    MAKE_RANGE_ENTRY(OLE_S),
    MAKE_RANGE_ENTRY(REGDB_E),
    MAKE_RANGE_ENTRY(REGDB_S),
    MAKE_RANGE_ENTRY(VIEW_E),
    MAKE_RANGE_ENTRY(VIEW_S),
  };
  #undef MAKE_RANGE_ENTRY

  // look for it in the table
  for (int i = 0; i < _COUNTOF(scRangeTable); i++)
  {
    if (sc >= scRangeTable[i].scFirst && sc <= scRangeTable[i].scLast)
      return scRangeTable[i].lpszName;
  }
  return NULL;    // not found
}

LPCTSTR AFXAPI _GetScodeString ( SCODE sc )

Definition at line 872 of file util.cpp.

{
  struct SCODE_ENTRY
  {
    SCODE sc;
    LPCTSTR lpszName;
  };
  #define MAKE_SCODE_ENTRY(sc)    { sc, _T(#sc) }
  static const SCODE_ENTRY scNameTable[] =
  {
    MAKE_SCODE_ENTRY(S_OK),
    MAKE_SCODE_ENTRY(S_FALSE),

    MAKE_SCODE_ENTRY(CACHE_S_FORMATETC_NOTSUPPORTED),
    MAKE_SCODE_ENTRY(CACHE_S_SAMECACHE),
    MAKE_SCODE_ENTRY(CACHE_S_SOMECACHES_NOTUPDATED),
    MAKE_SCODE_ENTRY(CONVERT10_S_NO_PRESENTATION),
    MAKE_SCODE_ENTRY(DATA_S_SAMEFORMATETC),
    MAKE_SCODE_ENTRY(DRAGDROP_S_CANCEL),
    MAKE_SCODE_ENTRY(DRAGDROP_S_DROP),
    MAKE_SCODE_ENTRY(DRAGDROP_S_USEDEFAULTCURSORS),
    MAKE_SCODE_ENTRY(INPLACE_S_TRUNCATED),
    MAKE_SCODE_ENTRY(MK_S_HIM),
    MAKE_SCODE_ENTRY(MK_S_ME),
    MAKE_SCODE_ENTRY(MK_S_MONIKERALREADYREGISTERED),
    MAKE_SCODE_ENTRY(MK_S_REDUCED_TO_SELF),
    MAKE_SCODE_ENTRY(MK_S_US),
    MAKE_SCODE_ENTRY(OLE_S_MAC_CLIPFORMAT),
    MAKE_SCODE_ENTRY(OLE_S_STATIC),
    MAKE_SCODE_ENTRY(OLE_S_USEREG),
    MAKE_SCODE_ENTRY(OLEOBJ_S_CANNOT_DOVERB_NOW),
    MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDHWND),
    MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDVERB),
    MAKE_SCODE_ENTRY(OLEOBJ_S_LAST),
    MAKE_SCODE_ENTRY(STG_S_CONVERTED),
    MAKE_SCODE_ENTRY(VIEW_S_ALREADY_FROZEN),

    MAKE_SCODE_ENTRY(E_UNEXPECTED),
    MAKE_SCODE_ENTRY(E_NOTIMPL),
    MAKE_SCODE_ENTRY(E_OUTOFMEMORY),
    MAKE_SCODE_ENTRY(E_INVALIDARG),
    MAKE_SCODE_ENTRY(E_NOINTERFACE),
    MAKE_SCODE_ENTRY(E_POINTER),
    MAKE_SCODE_ENTRY(E_HANDLE),
    MAKE_SCODE_ENTRY(E_ABORT),
    MAKE_SCODE_ENTRY(E_FAIL),
    MAKE_SCODE_ENTRY(E_ACCESSDENIED),

    MAKE_SCODE_ENTRY(CACHE_E_NOCACHE_UPDATED),
    MAKE_SCODE_ENTRY(CLASS_E_CLASSNOTAVAILABLE),
    MAKE_SCODE_ENTRY(CLASS_E_NOAGGREGATION),
    MAKE_SCODE_ENTRY(CLIPBRD_E_BAD_DATA),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_CLOSE),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_EMPTY),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_OPEN),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_SET),
    MAKE_SCODE_ENTRY(CO_E_ALREADYINITIALIZED),
    MAKE_SCODE_ENTRY(CO_E_APPDIDNTREG),
    MAKE_SCODE_ENTRY(CO_E_APPNOTFOUND),
    MAKE_SCODE_ENTRY(CO_E_APPSINGLEUSE),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(CO_E_BAD_PATH),
    #endif
    MAKE_SCODE_ENTRY(CO_E_CANTDETERMINECLASS),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(CO_E_CLASS_CREATE_FAILED),
    #endif
    MAKE_SCODE_ENTRY(CO_E_CLASSSTRING),
    MAKE_SCODE_ENTRY(CO_E_DLLNOTFOUND),
    MAKE_SCODE_ENTRY(CO_E_ERRORINAPP),
    MAKE_SCODE_ENTRY(CO_E_ERRORINDLL),
    MAKE_SCODE_ENTRY(CO_E_IIDSTRING),
    MAKE_SCODE_ENTRY(CO_E_NOTINITIALIZED),
    MAKE_SCODE_ENTRY(CO_E_OBJISREG),
    MAKE_SCODE_ENTRY(CO_E_OBJNOTCONNECTED),
    MAKE_SCODE_ENTRY(CO_E_OBJNOTREG),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(CO_E_OBJSRV_RPC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SCM_ERROR),
    MAKE_SCODE_ENTRY(CO_E_SCM_RPC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SERVER_EXEC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SERVER_STOPPING),
    #endif
    MAKE_SCODE_ENTRY(CO_E_WRONGOSFORAPP),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_BITMAP_TO_DIB),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_FMT),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_GET),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_PUT),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_DIB_TO_BITMAP),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_FMT),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_NO_STD_STREAM),
    MAKE_SCODE_ENTRY(DISP_E_ARRAYISLOCKED),
    MAKE_SCODE_ENTRY(DISP_E_BADCALLEE),
    MAKE_SCODE_ENTRY(DISP_E_BADINDEX),
    MAKE_SCODE_ENTRY(DISP_E_BADPARAMCOUNT),
    MAKE_SCODE_ENTRY(DISP_E_BADVARTYPE),
    MAKE_SCODE_ENTRY(DISP_E_EXCEPTION),
    MAKE_SCODE_ENTRY(DISP_E_MEMBERNOTFOUND),
    MAKE_SCODE_ENTRY(DISP_E_NONAMEDARGS),
    MAKE_SCODE_ENTRY(DISP_E_NOTACOLLECTION),
    MAKE_SCODE_ENTRY(DISP_E_OVERFLOW),
    MAKE_SCODE_ENTRY(DISP_E_PARAMNOTFOUND),
    MAKE_SCODE_ENTRY(DISP_E_PARAMNOTOPTIONAL),
    MAKE_SCODE_ENTRY(DISP_E_TYPEMISMATCH),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNINTERFACE),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNLCID),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNNAME),
    MAKE_SCODE_ENTRY(DRAGDROP_E_ALREADYREGISTERED),
    MAKE_SCODE_ENTRY(DRAGDROP_E_INVALIDHWND),
    MAKE_SCODE_ENTRY(DRAGDROP_E_NOTREGISTERED),
    MAKE_SCODE_ENTRY(DV_E_CLIPFORMAT),
    MAKE_SCODE_ENTRY(DV_E_DVASPECT),
    MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE),
    MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE_SIZE),
    MAKE_SCODE_ENTRY(DV_E_FORMATETC),
    MAKE_SCODE_ENTRY(DV_E_LINDEX),
    MAKE_SCODE_ENTRY(DV_E_NOIVIEWOBJECT),
    MAKE_SCODE_ENTRY(DV_E_STATDATA),
    MAKE_SCODE_ENTRY(DV_E_STGMEDIUM),
    MAKE_SCODE_ENTRY(DV_E_TYMED),
    MAKE_SCODE_ENTRY(INPLACE_E_NOTOOLSPACE),
    MAKE_SCODE_ENTRY(INPLACE_E_NOTUNDOABLE),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(MEM_E_INVALID_LINK),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_ROOT),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_SIZE),
    #endif
    MAKE_SCODE_ENTRY(MK_E_CANTOPENFILE),
    MAKE_SCODE_ENTRY(MK_E_CONNECTMANUALLY),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(MK_E_ENUMERATION_FAILED),
    #endif
    MAKE_SCODE_ENTRY(MK_E_EXCEEDEDDEADLINE),
    MAKE_SCODE_ENTRY(MK_E_INTERMEDIATEINTERFACENOTSUPPORTED),
    MAKE_SCODE_ENTRY(MK_E_INVALIDEXTENSION),
    MAKE_SCODE_ENTRY(MK_E_MUSTBOTHERUSER),
    MAKE_SCODE_ENTRY(MK_E_NEEDGENERIC),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(MK_E_NO_NORMALIZED),
    #endif
    MAKE_SCODE_ENTRY(MK_E_NOINVERSE),
    MAKE_SCODE_ENTRY(MK_E_NOOBJECT),
    MAKE_SCODE_ENTRY(MK_E_NOPREFIX),
    MAKE_SCODE_ENTRY(MK_E_NOSTORAGE),
    MAKE_SCODE_ENTRY(MK_E_NOTBINDABLE),
    MAKE_SCODE_ENTRY(MK_E_NOTBOUND),
    MAKE_SCODE_ENTRY(MK_E_SYNTAX),
    MAKE_SCODE_ENTRY(MK_E_UNAVAILABLE),
    MAKE_SCODE_ENTRY(OLE_E_ADVF),
    MAKE_SCODE_ENTRY(OLE_E_ADVISENOTSUPPORTED),
    MAKE_SCODE_ENTRY(OLE_E_BLANK),
    MAKE_SCODE_ENTRY(OLE_E_CANT_BINDTOSOURCE),
    MAKE_SCODE_ENTRY(OLE_E_CANT_GETMONIKER),
    MAKE_SCODE_ENTRY(OLE_E_CANTCONVERT),
    MAKE_SCODE_ENTRY(OLE_E_CLASSDIFF),
    MAKE_SCODE_ENTRY(OLE_E_ENUM_NOMORE),
    MAKE_SCODE_ENTRY(OLE_E_INVALIDHWND),
    MAKE_SCODE_ENTRY(OLE_E_INVALIDRECT),
    MAKE_SCODE_ENTRY(OLE_E_NOCACHE),
    MAKE_SCODE_ENTRY(OLE_E_NOCONNECTION),
    MAKE_SCODE_ENTRY(OLE_E_NOSTORAGE),
    MAKE_SCODE_ENTRY(OLE_E_NOT_INPLACEACTIVE),
    MAKE_SCODE_ENTRY(OLE_E_NOTRUNNING),
    MAKE_SCODE_ENTRY(OLE_E_OLEVERB),
    MAKE_SCODE_ENTRY(OLE_E_PROMPTSAVECANCELLED),
    MAKE_SCODE_ENTRY(OLE_E_STATIC),
    MAKE_SCODE_ENTRY(OLE_E_WRONGCOMPOBJ),
    MAKE_SCODE_ENTRY(OLEOBJ_E_INVALIDVERB),
    MAKE_SCODE_ENTRY(OLEOBJ_E_NOVERBS),
    MAKE_SCODE_ENTRY(REGDB_E_CLASSNOTREG),
    MAKE_SCODE_ENTRY(REGDB_E_IIDNOTREG),
    MAKE_SCODE_ENTRY(REGDB_E_INVALIDVALUE),
    MAKE_SCODE_ENTRY(REGDB_E_KEYMISSING),
    MAKE_SCODE_ENTRY(REGDB_E_READREGDB),
    MAKE_SCODE_ENTRY(REGDB_E_WRITEREGDB),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(RPC_E_ATTEMPTED_MULTITHREAD),
    #endif
    MAKE_SCODE_ENTRY(RPC_E_CALL_CANCELED),
    MAKE_SCODE_ENTRY(RPC_E_CALL_REJECTED),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_AGAIN),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INASYNCCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INEXTERNALCALL),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_ININPUTSYNCCALL),
    #endif
    MAKE_SCODE_ENTRY(RPC_E_CANTPOST_INSENDCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTTRANSMIT_CALL),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(RPC_E_CHANGED_MODE),
    #endif
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTUNMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_DIED),
    MAKE_SCODE_ENTRY(RPC_E_CONNECTION_TERMINATED),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(RPC_E_DISCONNECTED),
    MAKE_SCODE_ENTRY(RPC_E_FAULT),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_CALLDATA),
    #endif
    MAKE_SCODE_ENTRY(RPC_E_INVALID_DATA),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_DATAPACKET),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_PARAMETER),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(RPC_E_INVALIDMETHOD),
    MAKE_SCODE_ENTRY(RPC_E_NOT_REGISTERED),
    MAKE_SCODE_ENTRY(RPC_E_OUT_OF_RESOURCES),
    MAKE_SCODE_ENTRY(RPC_E_RETRY),
    #endif
    MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTUNMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED),
    #ifdef _WIN32
    MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED_DNE),
    MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_REJECTED),
    MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_RETRYLATER),
    MAKE_SCODE_ENTRY(RPC_E_SERVERFAULT),
    MAKE_SCODE_ENTRY(RPC_E_SYS_CALL_FAILED),
    MAKE_SCODE_ENTRY(RPC_E_THREAD_NOT_INIT),
    MAKE_SCODE_ENTRY(RPC_E_WRONG_THREAD),
    #endif
    MAKE_SCODE_ENTRY(RPC_E_UNEXPECTED),
    MAKE_SCODE_ENTRY(STG_E_ABNORMALAPIEXIT),
    MAKE_SCODE_ENTRY(STG_E_ACCESSDENIED),
    MAKE_SCODE_ENTRY(STG_E_CANTSAVE),
    MAKE_SCODE_ENTRY(STG_E_DISKISWRITEPROTECTED),
    MAKE_SCODE_ENTRY(STG_E_EXTANTMARSHALLINGS),
    MAKE_SCODE_ENTRY(STG_E_FILEALREADYEXISTS),
    MAKE_SCODE_ENTRY(STG_E_FILENOTFOUND),
    MAKE_SCODE_ENTRY(STG_E_INSUFFICIENTMEMORY),
    MAKE_SCODE_ENTRY(STG_E_INUSE),
    MAKE_SCODE_ENTRY(STG_E_INVALIDFLAG),
    MAKE_SCODE_ENTRY(STG_E_INVALIDFUNCTION),
    MAKE_SCODE_ENTRY(STG_E_INVALIDHANDLE),
    MAKE_SCODE_ENTRY(STG_E_INVALIDHEADER),
    MAKE_SCODE_ENTRY(STG_E_INVALIDNAME),
    MAKE_SCODE_ENTRY(STG_E_INVALIDPARAMETER),
    MAKE_SCODE_ENTRY(STG_E_INVALIDPOINTER),
    MAKE_SCODE_ENTRY(STG_E_LOCKVIOLATION),
    MAKE_SCODE_ENTRY(STG_E_MEDIUMFULL),
    MAKE_SCODE_ENTRY(STG_E_NOMOREFILES),
    MAKE_SCODE_ENTRY(STG_E_NOTCURRENT),
    MAKE_SCODE_ENTRY(STG_E_NOTFILEBASEDSTORAGE),
    MAKE_SCODE_ENTRY(STG_E_OLDDLL),
    MAKE_SCODE_ENTRY(STG_E_OLDFORMAT),
    MAKE_SCODE_ENTRY(STG_E_PATHNOTFOUND),
    MAKE_SCODE_ENTRY(STG_E_READFAULT),
    MAKE_SCODE_ENTRY(STG_E_REVERTED),
    MAKE_SCODE_ENTRY(STG_E_SEEKERROR),
    MAKE_SCODE_ENTRY(STG_E_SHAREREQUIRED),
    MAKE_SCODE_ENTRY(STG_E_SHAREVIOLATION),
    MAKE_SCODE_ENTRY(STG_E_TOOMANYOPENFILES),
    MAKE_SCODE_ENTRY(STG_E_UNIMPLEMENTEDFUNCTION),
    MAKE_SCODE_ENTRY(STG_E_UNKNOWN),
    MAKE_SCODE_ENTRY(STG_E_WRITEFAULT),
    MAKE_SCODE_ENTRY(TYPE_E_AMBIGUOUSNAME),
    MAKE_SCODE_ENTRY(TYPE_E_BADMODULEKIND),
    MAKE_SCODE_ENTRY(TYPE_E_BUFFERTOOSMALL),
    MAKE_SCODE_ENTRY(TYPE_E_CANTCREATETMPFILE),
    MAKE_SCODE_ENTRY(TYPE_E_CANTLOADLIBRARY),
    MAKE_SCODE_ENTRY(TYPE_E_CIRCULARTYPE),
    MAKE_SCODE_ENTRY(TYPE_E_DLLFUNCTIONNOTFOUND),
    MAKE_SCODE_ENTRY(TYPE_E_DUPLICATEID),
    MAKE_SCODE_ENTRY(TYPE_E_ELEMENTNOTFOUND),
    MAKE_SCODE_ENTRY(TYPE_E_INCONSISTENTPROPFUNCS),
    MAKE_SCODE_ENTRY(TYPE_E_INVALIDSTATE),
    MAKE_SCODE_ENTRY(TYPE_E_INVDATAREAD),
    MAKE_SCODE_ENTRY(TYPE_E_IOERROR),
    MAKE_SCODE_ENTRY(TYPE_E_LIBNOTREGISTERED),
    MAKE_SCODE_ENTRY(TYPE_E_NAMECONFLICT),
    MAKE_SCODE_ENTRY(TYPE_E_OUTOFBOUNDS),
    MAKE_SCODE_ENTRY(TYPE_E_QUALIFIEDNAMEDISALLOWED),
    MAKE_SCODE_ENTRY(TYPE_E_REGISTRYACCESS),
    MAKE_SCODE_ENTRY(TYPE_E_SIZETOOBIG),
    MAKE_SCODE_ENTRY(TYPE_E_TYPEMISMATCH),
    MAKE_SCODE_ENTRY(TYPE_E_UNDEFINEDTYPE),
    MAKE_SCODE_ENTRY(TYPE_E_UNKNOWNLCID),
    MAKE_SCODE_ENTRY(TYPE_E_UNSUPFORMAT),
    MAKE_SCODE_ENTRY(TYPE_E_WRONGTYPEKIND),
    MAKE_SCODE_ENTRY(VIEW_E_DRAW),
  };
  #undef MAKE_SCODE_ENTRY

  // look for it in the table
  for (int i = 0; i < _COUNTOF(scNameTable); i++)
  {
    if (sc == scNameTable[i].sc)
      return scNameTable[i].lpszName;
  }
  return NULL;    // not found
}

LPCTSTR AFXAPI _GetSeverityString ( SCODE sc )

Definition at line 1222 of file util.cpp.

{
  static const TCHAR* rgszSEVERITY[] =
  {
    _T("SEVERITY_SUCCESS"),
    _T("SEVERITY_ERROR"),
  };
  return rgszSEVERITY[SCODE_SEVERITY(sc)];
}

VOID WINAPI AddBackslash | ( | LPTSTR | lpszPath,
 |  | int | nSize
 | ) |  |

Definition at line 1461 of file util.cpp.

{
  if (lpszPath[lstrlen( lpszPath ) - 1] == '\\')
    return ;
  _tcscat_s( lpszPath, nSize, _T("\\") ) ;
}

void bmColorTranslate | ( | CBitmap * | pbmSrc,
 |  | COLORREF | rgbNew
 | ) |  |

Definition at line 623 of file util.cpp.

{
   HDC      hdc ;
   CDC      dc ;
   CDC      dcMem ;
   BITMAP   bmBits ;

   hdc = GetDC( NULL );
   if (hdc)
     dc.Attach( hdc ) ;
   else
     return ;

  if (dcMem.CreateCompatibleDC( &dc ))
  {
   // Get the bitmap struct needed by bmColorTranslateDC()
   //
   pbmSrc->GetObject( sizeof( BITMAP ), &bmBits ) ;

   // Select our bitmap into the memory DC
   //
   pbmSrc = dcMem.SelectObject( pbmSrc ) ;

   // Translate the bitmap
   //
   bmColorTranslateDC( &dcMem, &bmBits, dcMem.GetPixel( 0, 0 ), rgbNew ) ;

   // Unselect our bitmap before deleting the DC
   //
   pbmSrc = dcMem.SelectObject( pbmSrc ) ;

   dcMem.DeleteDC( ) ;
  }

  dc.Detach() ;

  ReleaseDC( NULL, hdc ) ;

} /* bmColorTranslate()  */

void bmColorTranslateDC | ( | CDC * | pdcMem,
 |  | BITMAP * | pBM,
 |  | COLORREF | rgbOld,
 |  | COLORREF | rgbNew
 | ) |  |

Definition at line 568 of file util.cpp.

{
   CDC      dcMask ;
   CBitmap  bmMask ;
   CBitmap* pbmMask ;
   CBrush   brT ;
   CBrush*  pbrT ;

   if (bmMask.CreateBitmap( pBM->bmWidth, pBM->bmHeight, 1, 1, NULL ))
   {
    if (dcMask.CreateCompatibleDC( pdcMem ))
    {
     // Select th mask bitmap into the mono DC
     //
     pbmMask = dcMask.SelectObject( &bmMask ) ;

     // Create the brush and select it into the bits DC
     //
     brT.CreateSolidBrush( rgbNew ) ;
     pbrT = pdcMem->SelectObject( &brT ) ;

     // Do a color to mono bitblt to build the mask.  Generate
     // 1's where the source is equal to the background.
     //
     pdcMem->SetBkColor( rgbOld ) ;
     dcMask.BitBlt( 0, 0, pBM->bmWidth, pBM->bmHeight, pdcMem, 0, 0, SRCCOPY ) ;

     // Where the mask is 1, lay down the brush, where it is 0, leave
     // the destination.
     //
     pdcMem->SetBkColor( RGBWHITE ) ;
     pdcMem->SetTextColor( RGBBLACK ) ;

#define DSPDxax   0x00E20746L
     pdcMem->BitBlt( 0, 0, pBM->bmWidth, pBM->bmHeight, &dcMask, 0, 0, DSPDxax ) ;

     pbmMask = dcMask.SelectObject( &bmMask ) ;

     pbrT = pdcMem->SelectObject( pbrT ) ;
     brT.DeleteObject( ) ;

     dcMask.DeleteDC( ) ;
    }
    else
    {
     return ;
    }

    bmMask.DeleteObject( ) ;
   }

} /* bmColorTranslateDC()  */

CBitmap* bmLoadAndTranslate | ( | UINT | id,
 |  | COLORREF | rgb
 | ) |  |

Definition at line 664 of file util.cpp.

{
  CBitmap* pBitmap = new CBitmap ;

  if (pBitmap)
  {
    pBitmap->LoadBitmap( id ) ;
    bmColorTranslate( pBitmap, rgb ) ;
  }
  return pBitmap ;
}

void WINAPI ColumnTextOut | ( | HDC | hdc,
 |  | int | nX,
 |  | int | nY,
 |  | LPTSTR | lpszIN,
 |  | int | cColumns,
 |  | LPCOLUMNSTRUCT | rgColumns
 | ) |  |

Definition at line 782 of file util.cpp.

{

#define ETOFLAGS ETO_CLIPPED

  COLUMNSTRUCT   CS ;              // local copy for speed
  RECT           rc ;              // current cell rect
  unsigned int   cIteration = 0 ;  // what column
  LPTSTR         lpNext ;          // next string (current is lpsz)
  int            cch ;             // count of chars in current string
  SIZE           size ;            // extent of current string
  int            dx ;              // column width

  rc.left = nX ;
  rc.top = nY ;
  rc.right = 0 ;

  if (rgColumns == NULL || cColumns <= 1)
  {
    int Tab = 15 ;
    TabbedTextOut( hdc, nX, nY, lpszIN, lstrlen(lpszIN), 1, &Tab, nX ) ;
    return ;
  }

  // For each sub string (bracketed by a tab)
  //
  LPTSTR lpsz = lpszIN ;
  while (*lpsz)
  {
    if (cIteration >= (unsigned int)cColumns)
      return ;

    for (cch = 0, lpNext = lpsz ;
       *lpNext != '\t' && *lpNext ;
       lpNext++, cch++)
      ;

    CS = rgColumns[cIteration] ;

    // If it's the leftmost column use
    //
    if (cIteration == 0)
    {
      rc.left = nX + CS.nLeft ;
      rc.right = nX + CS.nRight ;
    }
    else
      rc.right = nX + CS.nRight ;

    GetTextExtentPoint( hdc, lpsz, cch, &size ) ;
    rc.bottom = rc.top + size.cy ;

    // If the width of the column is 0 do nothing
    //
    if ((dx = (rc.right - rc.left)) > 0)
    {
      switch(CS.uiFlags)
      {
        case DT_CENTER:
          ExtTextOut( hdc, rc.left + ((dx - size.cx) / (int)2),
          rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;

        case DT_RIGHT:
          // If it's right justified then make the left border 0
          //
          //rc.left = nX + rgColumns[0].nLeft ;
          ExtTextOut( hdc, rc.left + (dx - size.cx),
          rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;

        case DT_LEFT:
        default:
          ExtTextOut( hdc, rc.left, rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;
      }
    }
    rc.left = rc.right ;
    cIteration++ ;
    lpsz = lpNext + 1 ;
  }

} // ColumnTextOut()

void WINAPI DlgCenter | ( | HWND | hwndCenter,
 |  | HWND | hwndWithin,
 |  | BOOL | fClient
 | ) |  |

Definition at line 468 of file util.cpp.

{
   RECT rcWithin ;
   RECT rcCenter ;
   int   x, y ;
   int   dxCenter, dyCenter ;
   int   dxScreen, dyScreen ;

   dxScreen = GetSystemMetrics( SM_CXSCREEN ) ;
   dyScreen = GetSystemMetrics( SM_CYSCREEN ) ;

   if (!IsWindow(hwndCenter))
    return ;

   if (hwndWithin && !IsWindow(hwndWithin))
    return ;

   if (hwndWithin == NULL)
   {
    rcWithin.left = rcWithin.top = 0 ;
    rcWithin.right = dxScreen ;
    rcWithin.bottom = dyScreen ;
   }
   else
   {
    if (fClient)
    {
     /*
      * First get screen coords of rectangle we're going to be
      * centered within.
      */
     GetClientRect( hwndWithin, (LPRECT)&rcWithin ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.left ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.right ) ;
    }
    else
     GetWindowRect( hwndWithin, (LPRECT)&rcWithin ) ;
   }

   GetWindowRect( hwndCenter, (LPRECT)&rcCenter ) ;
   dxCenter = rcCenter.right - rcCenter.left ;
   dyCenter = rcCenter.bottom - rcCenter.top ;

   /*
  * Now we have both the within and center rects in screen coords.
  *
  * SetWindowPos behaves differently for Non child windows
  * than for child windows.  For popups it's coordinates
  * are relative to the upper left corner of the screen.  For
  * children it's coords are relative to the upper left corner
  * of the client area of the parent.
  */
   x = ((rcWithin.right - rcWithin.left) - dxCenter) / 2 ;
   y = ((rcWithin.bottom - rcWithin.top) - dyCenter) / 2 ;

   if (hwndWithin == GetParent( hwndCenter ) &&
     !(GetWindowLong( hwndCenter, GWL_STYLE ) & WS_CHILD ))
   {
    x += rcWithin.left ;
    y += rcWithin.top ;

    if (x + dxCenter > dxScreen )
     x = dxScreen - dxCenter ;

    if (y + dyCenter > dyScreen )
     y = dyScreen - dyCenter ;

    SetWindowPos( hwndCenter, NULL,
          max(x,0),
          max(y,0),
          0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

    return ;
   }

   SetWindowPos( hwndCenter, NULL,
         max(x,0),
         max(y,0),
         0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

   return ;

}/* DlgCenter() */

void DrawListBoxBitmap | ( | CDC * | pdc,
 |  | CBitmap * | pbmt,
 |  | int | x,
 |  | int | y
 | ) |  |

Definition at line 677 of file util.cpp.

{
  CDC   dcMem ;
  if (dcMem.CreateCompatibleDC( pdc ))
  {
    if (pbmt)
    {
      pbmt = dcMem.SelectObject( pbmt ) ;
      pdc->BitBlt( x, y, 16, 16, &dcMem, 0, 0, SRCCOPY ) ;
      dcMem.SelectObject( pbmt ) ;
    }
    dcMem.DeleteDC() ;
  }
}

void ErrorMessage | ( | const CString & | str,
 |  | HRESULT | hr
 | ) |  |

Definition at line 23 of file util.cpp.

{
  LPVOID lpMessageBuffer = NULL ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      GetScode(hr),
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    CString str2 ;
    str2.Format( _T("\n%s %s"), (LPCTSTR)lpMessageBuffer, (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    LocalFree(lpMessageBuffer) ;
    AfxMessageBox( str2 ) ;
  }
  else
  {
    CString str2 ;
    str2.Format( _T("\n<No system message defined> %s"), (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    AfxMessageBox( str2 ) ;
  }
}

int EXPORT CALLBACK fnEnumReallyEx | ( | LPENUMLOGFONT | lpLogFont,
 |  | LPNEWTEXTMETRIC | lpTextMetrics,
 |  | int | nFontType,
 |  | LPENUMLOGFONT | lpELF
 | ) |  |

Definition at line 232 of file util.cpp.

{
   /* If we are not true type, then we will only be called once,
  * in in this case we need to compare the weight and italic
  * members of the TM struct to some strings.
  */
   if (!(nFontType & TRUETYPE_FONTTYPE))
   {
    lpELF->elfLogFont = lpELFin->elfLogFont ;

     // Workaround for WindowsJ bug
     //
     LOGFONT lf ;
     GetObject( GetStockObject( SYSTEM_FONT ),
               sizeof( LOGFONT ), (LPTSTR)&lf ) ;
     lpELF->elfLogFont.lfCharSet = lf.lfCharSet;

    /* Parse szStyle.  It may be something like "Bold Italic" or
     * "Demibold Italic".  Let's be somewhat smart about this.
     *
     * If "Demibold Italic" is passed in then he wants bold and
     * italic.
     *
     * We want to search szStyle for the word "bold".  Got a better
     * search strategy, go ahead and put it here (but tell me about it!).
     *
     * WARNING!!!
     *   The style string is language dependent.
     */
    if (lpELF->elfStyle)
    {
     /*
      * Assume "Regular"
      */
     lpELF->elfLogFont.lfWeight = FW_NORMAL ;
     lpELF->elfLogFont.lfItalic = FALSE ;

     if (!lstrcmpi( (LPTSTR)lpELF->elfStyle, szBold ))
     {
      lpELF->elfLogFont.lfWeight = FW_BOLD ;
      return 0 ;
     }

     if (!lstrcmpi( (LPTSTR)lpELF->elfStyle, szItalic))
     {
      lpELF->elfLogFont.lfItalic = TRUE ;
      return 0 ;
     }

     if (!lstrcmpi( (LPTSTR)lpELF->elfStyle, szBoldItalic ))
     {
      lpELF->elfLogFont.lfWeight = FW_BOLD ;
      lpELF->elfLogFont.lfItalic = TRUE ;
      return 0 ;
     }
    }

    return 0 ;  /* stop the enumeration */

   }

   /* We now know we have a TT font.  For each style in the
  * family passed in, we will get here.
  *
  * If we get an exact match copy it into lpELF and return.
  * Otherwise get as close as possible.
  */
   if (0==lstrcmpi( (LPTSTR)lpELF->elfStyle, (LPTSTR)lpELFin->elfStyle ))
   {
    *lpELF = *lpELFin;
    return 0;
   }

   lpELF->elfLogFont = lpELFin->elfLogFont ;

   return 1 ;

}/* fnEnumReallyEx() */

int WINAPI GetTextMetricsCorrectly | ( | HDC | hDC,
 |  | LPTEXTMETRIC | lpTM
 | ) |  |

Definition at line 716 of file util.cpp.

{
   int    nAveWidth ;
   TCHAR  rgchAlphabet[52] ;
   int  i ;
   SIZE size ;

   // Get the TM of the current font.  Note that GetTextMetrics
   // gets the incorrect AveCharWidth value for proportional fonts.
   // This is the whole poshort in this exercise.
   //
   if (lpTM)
  GetTextMetrics(hDC, lpTM);

   // If it's not a variable pitch font GetTextMetrics was correct
   // so just return.
   //
   if (lpTM && !(lpTM->tmPitchAndFamily & FIXED_PITCH))
    return lpTM->tmAveCharWidth ;
   else
   {
    for ( i = 0 ; i <= 25 ; i++)
     rgchAlphabet[i] = (TCHAR)(i+(int)'a') ;

    for ( i = 0 ; i<=25 ; i++)
     rgchAlphabet[i+25] = (TCHAR)(i+(int)'A') ;

    GetTextExtentPoint( hDC, (LPTSTR)rgchAlphabet, 52, &size ) ;
    nAveWidth = size.cx / 26 ;
    nAveWidth = (nAveWidth + 1) / 2 ;
   }

   // Return the calculated average char width
   //
   return nAveWidth ;

} /* GetTextMetricsCorrectly()  */

LPTSTR HRtoString ( HRESULT hr )

Definition at line 1276 of file util.cpp.

{
  SCODE   sc ;
  sc = GetScode( hr ) ;

#ifdef FORMATMSG
  LPVOID lpMessageBuffer ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      sc,
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    _stprintf_s( sz, _countof(sz), _T( "%s (0x%lx)" ), (LPTSTR)lpMessageBuffer, sc);
    LocalFree(lpMessageBuffer) ;
  }
  else
  {
    _stprintf_s( sz, _countof(sz), _T( "Unknown Scode (0x%lx)" ), sc);
  }

#endif // !FORMATMSG

  return (LPTSTR)_GetFullScodeString(sc) ;
}

LONG WINAPI ParseOffNumber | ( | LPTSTR FAR * | lplp,
 |  | LPINT | lpConv
 | ) |  |

Definition at line 365 of file util.cpp.

{
  LPTSTR lp = *lplp;
  LONG  lValue=0;
  int   sign=1;

  while( isspace((unsigned char)*lp) )
    lp++;
  if( *lp=='-' )
  {
    sign = -1;
    lp++;
  }
  if (*lp=='\0')
  {
    *lpConv = FALSE;
    return 0L;
  }

  // Is it a decimal number
  #ifdef UNICODE
  if( _wcsnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  #ifdef WIN32
  if( _strnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  if( _fstrnicmp( lp, (LPTSTR)_T("0x"),2) )
  #endif
  #endif
  {

    while( isdigit((unsigned char)*lp) )
    {
      lValue *= 10;
      lValue += (*lp - (TCHAR)'0');
      lp++;
    }
  }
  else
  {
    lp+=2;

    while( isxdigit((unsigned char)*lp) )
    {
      lValue *= 16;
      if( isdigit((unsigned char)*lp) )
        lValue += (*lp - (TCHAR)'0');
      else
        lValue += (toupper(*lp) - (TCHAR)'A' + 10);
      lp++;
    }
  }
  while( isspace((unsigned char)*lp) )
    lp++;

  lValue *= (long)sign;

  if (*lp==(TCHAR)',')
  {
    lp++;
    while( isspace((unsigned char)*lp) )
      lp++;
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)TRUE;
  }
  else
  {
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)(*lp=='\0');
  }
  return lValue;

} //*** ParseOffNumber

LPTSTR FAR PASCAL PointerToNthField | ( | LPTSTR | lpszString,
 |  | int | nField,
 |  | TCHAR | chDelimiter
 | ) |  |

Definition at line 336 of file util.cpp.

{
   LPTSTR lpField = lpszString;
   int   cFieldFound = 1;

   if (1 ==nField)
    return lpszString;

   while (*lpField != '\0')
   {

    if (*lpField++ == chDelimiter)
    {

     cFieldFound++;

     if (nField == cFieldFound)
      return lpField;
    }
   }

   return lpField;

}

CFont* ReallyCreateFont | ( | HDC | hDC,
 |  | LPTSTR | lpszFace,
 |  | LPTSTR | lpszStyle,
 |  | UINT | nPointSize,
 |  | UINT | uiFlags
 | ) |  |

Definition at line 88 of file util.cpp.

{
   ENUMLOGFONT  elf ;
   FONTENUMPROC lpfn ;
   HDC          hdcCur ;

   if (!(lpfn = (FONTENUMPROC)MakeProcInstance( (FARPROC)fnEnumReallyEx, AfxGetInstanceHandle() )))
    return NULL ;

   // if the DC wasn't specified then use the display...
   //
   if (!hDC)
   {
    if (!(hdcCur = GetDC( NULL )))
    {
     FreeProcInstance( (FARPROC)lpfn ) ;
     return FALSE ;
    }
   }
   else
    hdcCur = hDC ;

   if (hdcCur)
   {
    /*
     * EnumFontFamilies takes the family name as the second param.
     * For example the family name might be "Lucida Sans" and the
     * style might be "Demibold Roman".
     *
     * The last parameter is app. defined.  In our case we pass a
     * structure that has a LOGFONT and a char array as it's members.
     * We put the style in the char array, and when this function
     * returns the LOGFONT has the logfont for the font we want to create.
     */
    if (lpszStyle)
     _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, lpszStyle ) ;
    else
    switch( uiFlags & ~(RCF_NODEFAULT | RCF_STRIKEOUT | RCF_UNDERLINE) )
    {
      case RCF_BOLD:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szBold ) ;
      break ;

      case RCF_ITALIC:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szItalic ) ;
      break ;

      case RCF_BOLD | RCF_ITALIC:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szBold ) ;
        _tcscat_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, _T(" ") ) ;
        _tcscat_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szItalic ) ;
      break ;

      default:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szRegular ) ;
        lpszStyle = (LPTSTR)elf.elfStyle ;
      break ;
    }

    if (lpszFace)
     EnumFontFamilies( hdcCur, lpszFace, lpfn, (LPARAM)(LPVOID)&elf ) ;

    if (!lpszFace || lstrcmpi( elf.elfLogFont.lfFaceName, lpszFace))
    {
     if ((uiFlags & RCF_NODEFAULT) == RCF_NODEFAULT)
     {
      FreeProcInstance( (FARPROC)lpfn ) ;

      if (hdcCur != hDC)
         ReleaseDC( NULL, hdcCur ) ;

      return NULL ;

     }
     else
      GetObject( GetStockObject( SYSTEM_FONT ),
             sizeof( LOGFONT ), (LPTSTR)&elf.elfLogFont ) ;
    }

    //
    // See pages 4-48, 4-49, of Reference Vol. 1 for explaination
    // of why we set lfWidth to 0
    //
    elf.elfLogFont.lfWidth = 0 ;

    //
    // The equation for calculating point size based on font
    // height (a point is 1/72 of an inch) is:
    //
    //
    //    pt = (height * 72) / number of pixels in the Y direction
    //
    // Using GetTextMetrics() you should calculate height as:
    //
    //    height = tm.tmHeight - tm.tmInternalLeading
    //
    // This is because Windows' interpretation of a font height
    // is different from everyone else's.
    //
    //
    elf.elfLogFont.lfHeight = -MulDiv( nPointSize,
               GetDeviceCaps( hdcCur, LOGPIXELSY),
               72 )  ;

    elf.elfLogFont.lfStrikeOut = (BYTE)((uiFlags & RCF_STRIKEOUT) == RCF_STRIKEOUT) ;
    elf.elfLogFont.lfUnderline = (BYTE)((uiFlags & RCF_UNDERLINE) == RCF_UNDERLINE) ;

    if (!lpszStyle)
    {
     elf.elfLogFont.lfWeight    = (uiFlags & RCF_BOLD) ? FW_BOLD : FW_NORMAL ;
     elf.elfLogFont.lfItalic    = (BYTE)((uiFlags & RCF_ITALIC) == RCF_ITALIC) ;
    }

   }
   FreeProcInstance( (FARPROC)lpfn ) ;

   if (hdcCur != hDC)
    ReleaseDC( NULL, hdcCur ) ;

   CFont * pFont = new CFont ;
   pFont->CreateFontIndirect( &elf.elfLogFont ) ;

   return pFont ;

} /* ReallyCreateFontEx()  */

VOID WINAPI StripFilespec ( LPTSTR lpszPath )

Definition at line 1438 of file util.cpp.

{
  LPTSTR     p;

  p = lpszPath + lstrlen( lpszPath ) ;
  while ((*p != '\\') && (*p != ':') && (p != lpszPath))
    p-- ;

  if (*p == ':')
    p++ ;

  /* Don't strip backslash from root directory entry. */
  if (p != lpszPath)
  {
    if ((*p == '\\') && (*(p-1) == ':'))
      p++ ;
  }

  *p = NULL ;
}

LPTSTR VTtoString ( VARTYPE vt )

Definition at line 1384 of file util.cpp.

{
  static TCHAR szBuf[64];

  if (vt <= VT_CLSID)
    return (LPTSTR)g_rgszVT[vt] ;

  if (vt & VT_VECTOR)
  {
    vt &= ~VT_VECTOR ;
    if (vt <= VT_CLSID)
      _stprintf_s( szBuf, 64, _T("VECTOR of %s"), (LPTSTR)g_rgszVT[vt] ) ;
    else
      _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_VECTOR ) ;
    return (LPTSTR)szBuf ;
  }

  if (vt & VT_ARRAY)
  {
    vt &= ~VT_ARRAY ;
    if (vt <= VT_CLSID)
      _stprintf_s( szBuf, 64, _T("Array of %s"), (LPTSTR)g_rgszVT[vt] ) ;
    else
      _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_ARRAY ) ;
    return (LPTSTR)szBuf ;
  }

  if (vt & VT_BYREF)
  {
    vt &= ~VT_BYREF ;
    if (vt <= VT_CLSID)
      _stprintf_s( szBuf, 64, _T("%s BYREF "), (LPTSTR)g_rgszVT[vt] ) ;
    else
      _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_BYREF ) ;
    return (LPTSTR)szBuf ;
  }

  if (vt & VT_RESERVED)
  {
    vt &= ~VT_RESERVED ;
    if (vt <= VT_CLSID)
      _stprintf_s( szBuf, 64, _T("RESERVED (%s)"), (LPTSTR)g_rgszVT[vt] ) ;
    else
      _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_RESERVED ) ;
    return (LPTSTR)szBuf ;
  }

  _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt ) ;

  return (LPTSTR)szBuf ;
}

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/util.h File Reference

  • ole
  • oleview
Classes | Defines | Typedefs | Functions

util.h File Reference

Go to the source code of this file.

Classes

struct | tagCOLUMNSTRUCT

Defines

#define | RCF_BOLD 0x0008
#define | RCF_ITALIC 0x0001
#define | RCF_NODEFAULT 0x0010
#define | RCF_NORMAL 0x0000
#define | RCF_STRIKEOUT 0x0004
#define | RCF_TRUETYPEONLY 0x0011
#define | RCF_UNDERLINE 0x0002

Typedefs

typedef struct FAR tagCOLUMNSTRUCT | COLUMNSTRUCT
typedef struct FAR
tagCOLUMNSTRUCT * 		LPCOLUMNSTRUCT
typedef struct FAR
tagCOLUMNSTRUCT * 		PCOLUMNSTRUCT

Functions

VOID WINAPI | AddBackslash (LPTSTR lpszPath, int nSize)
void | bmColorTranslate (CBitmap *pbmSrc, COLORREF rgbNew)
void | bmColorTranslateDC (CDC *pdcMem, BITMAP *pBM, COLORREF rgbOld, COLORREF rgbNew)
CBitmap * | bmLoadAndTranslate (UINT id, COLORREF rgb)
void WINAPI | ColumnTextOut (CDC *pDC, int nX, int nY, CString *pStr, int cColumns, LPCOLUMNSTRUCT rgColumns)
void WINAPI | DlgCenter (HWND hwndCenter, HWND hwndWithin, BOOL fClient)
void | DrawListBoxBitmap (CDC *pdc, CBitmap *pbmt, int x, int y)
void | ErrorMessage (const CString &str, HRESULT hr)
int WINAPI | GetTextMetricsCorrectly (HDC hDC, LPTEXTMETRIC lpTM)
LPTSTR | HRtoString (HRESULT hr)
LONG WINAPI | ParseOffNumber (LPTSTR FAR *lplp, LPINT lpConv)
LPTSTR FAR PASCAL | PointerToNthField (LPTSTR lpszString, int nField, TCHAR chDelimiter)
CFont * | ReallyCreateFont (HDC hDC, LPTSTR lpszFace, LPTSTR lpszStyle, UINT nPointSize, UINT uiFlags)
VOID WINAPI | StripFilespec (LPTSTR lpszPath)
LPTSTR | VTtoString (VARTYPE vt)

Define Documentation

#define RCF_BOLD 0x0008

Definition at line 20 of file util.h.

#define RCF_ITALIC 0x0001

Definition at line 17 of file util.h.

#define RCF_NODEFAULT 0x0010

Definition at line 21 of file util.h.

#define RCF_NORMAL 0x0000

Utilities.

Definition at line 16 of file util.h.

#define RCF_STRIKEOUT 0x0004

Definition at line 19 of file util.h.

#define RCF_TRUETYPEONLY 0x0011

Definition at line 22 of file util.h.

#define RCF_UNDERLINE 0x0002

Definition at line 18 of file util.h.

Typedef Documentation

typedef struct FAR tagCOLUMNSTRUCT COLUMNSTRUCT
typedef struct FAR tagCOLUMNSTRUCT* LPCOLUMNSTRUCT
typedef struct FAR tagCOLUMNSTRUCT * PCOLUMNSTRUCT

Function Documentation

VOID WINAPI AddBackslash | ( | LPTSTR | lpszPath,
 |  | int | nSize
 | ) |  |

Definition at line 1461 of file util.cpp.

{
  if (lpszPath[lstrlen( lpszPath ) - 1] == '\\')
    return ;
  _tcscat_s( lpszPath, nSize, _T("\\") ) ;
}

void bmColorTranslate | ( | CBitmap * | pbmSrc,
 |  | COLORREF | rgbNew
 | ) |  |

Definition at line 623 of file util.cpp.

{
   HDC      hdc ;
   CDC      dc ;
   CDC      dcMem ;
   BITMAP   bmBits ;

   hdc = GetDC( NULL );
   if (hdc)
     dc.Attach( hdc ) ;
   else
     return ;

  if (dcMem.CreateCompatibleDC( &dc ))
  {
   // Get the bitmap struct needed by bmColorTranslateDC()
   //
   pbmSrc->GetObject( sizeof( BITMAP ), &bmBits ) ;

   // Select our bitmap into the memory DC
   //
   pbmSrc = dcMem.SelectObject( pbmSrc ) ;

   // Translate the bitmap
   //
   bmColorTranslateDC( &dcMem, &bmBits, dcMem.GetPixel( 0, 0 ), rgbNew ) ;

   // Unselect our bitmap before deleting the DC
   //
   pbmSrc = dcMem.SelectObject( pbmSrc ) ;

   dcMem.DeleteDC( ) ;
  }

  dc.Detach() ;

  ReleaseDC( NULL, hdc ) ;

} /* bmColorTranslate()  */

void bmColorTranslateDC | ( | CDC * | pdcMem,
 |  | BITMAP * | pBM,
 |  | COLORREF | rgbOld,
 |  | COLORREF | rgbNew
 | ) |  |

Definition at line 568 of file util.cpp.

{
   CDC      dcMask ;
   CBitmap  bmMask ;
   CBitmap* pbmMask ;
   CBrush   brT ;
   CBrush*  pbrT ;

   if (bmMask.CreateBitmap( pBM->bmWidth, pBM->bmHeight, 1, 1, NULL ))
   {
    if (dcMask.CreateCompatibleDC( pdcMem ))
    {
     // Select th mask bitmap into the mono DC
     //
     pbmMask = dcMask.SelectObject( &bmMask ) ;

     // Create the brush and select it into the bits DC
     //
     brT.CreateSolidBrush( rgbNew ) ;
     pbrT = pdcMem->SelectObject( &brT ) ;

     // Do a color to mono bitblt to build the mask.  Generate
     // 1's where the source is equal to the background.
     //
     pdcMem->SetBkColor( rgbOld ) ;
     dcMask.BitBlt( 0, 0, pBM->bmWidth, pBM->bmHeight, pdcMem, 0, 0, SRCCOPY ) ;

     // Where the mask is 1, lay down the brush, where it is 0, leave
     // the destination.
     //
     pdcMem->SetBkColor( RGBWHITE ) ;
     pdcMem->SetTextColor( RGBBLACK ) ;

#define DSPDxax   0x00E20746L
     pdcMem->BitBlt( 0, 0, pBM->bmWidth, pBM->bmHeight, &dcMask, 0, 0, DSPDxax ) ;

     pbmMask = dcMask.SelectObject( &bmMask ) ;

     pbrT = pdcMem->SelectObject( pbrT ) ;
     brT.DeleteObject( ) ;

     dcMask.DeleteDC( ) ;
    }
    else
    {
     return ;
    }

    bmMask.DeleteObject( ) ;
   }

} /* bmColorTranslateDC()  */

CBitmap* bmLoadAndTranslate | ( | UINT | id,
 |  | COLORREF | rgb
 | ) |  |

Definition at line 664 of file util.cpp.

{
  CBitmap* pBitmap = new CBitmap ;

  if (pBitmap)
  {
    pBitmap->LoadBitmap( id ) ;
    bmColorTranslate( pBitmap, rgb ) ;
  }
  return pBitmap ;
}

void WINAPI ColumnTextOut | ( | CDC * | pDC,
 |  | int | nX,
 |  | int | nY,
 |  | CString * | pStr,
 |  | int | cColumns,
 |  | LPCOLUMNSTRUCT | rgColumns
 | ) |  |
void WINAPI DlgCenter | ( | HWND | hwndCenter,
 |  | HWND | hwndWithin,
 |  | BOOL | fClient
 | ) |  |

Definition at line 1107 of file idataobj.cpp.

{
   RECT rcWithin ;
   RECT rcCenter ;
   int   x, y ;
   int   dxCenter, dyCenter ;
   int   dxScreen, dyScreen ;

   dxScreen = GetSystemMetrics( SM_CXSCREEN ) ;
   dyScreen = GetSystemMetrics( SM_CYSCREEN ) ;

   if (!IsWindow(hwndCenter))
    return ;

   if (hwndWithin && !IsWindow(hwndWithin))
    return ;

   if (hwndWithin == NULL)
   {
    rcWithin.left = rcWithin.top = 0 ;
    rcWithin.right = dxScreen ;
    rcWithin.bottom = dyScreen ;
   }
   else
   {
    if (fClient)
    {
     /*
      * First get screen coords of rectangle we're going to be
      * centered within.
      */
     GetClientRect( hwndWithin, (LPRECT)&rcWithin ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.left ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.right ) ;
    }
    else
     GetWindowRect( hwndWithin, (LPRECT)&rcWithin ) ;
   }

   GetWindowRect( hwndCenter, (LPRECT)&rcCenter ) ;
   dxCenter = rcCenter.right - rcCenter.left ;
   dyCenter = rcCenter.bottom - rcCenter.top ;

   /*
  * Now we have both the within and center rects in screen coords.
  *
  * SetWindowPos behaves differently for Non child windows
  * than for child windows.  For popups it's coordinates
  * are relative to the upper left corner of the screen.  For
  * children it's coords are relative to the upper left corner
  * of the client area of the parent.
  */
   x = ((rcWithin.right - rcWithin.left) - dxCenter) / 2 ;
   y = ((rcWithin.bottom - rcWithin.top) - dyCenter) / 2 ;

   if (hwndWithin == GetParent( hwndCenter ) &&
     !(GetWindowLong( hwndCenter, GWL_STYLE ) & WS_CHILD ))
   {
    x += rcWithin.left ;
    y += rcWithin.top ;

    if (x + dxCenter > dxScreen )
     x = dxScreen - dxCenter ;

    if (y + dyCenter > dyScreen )
     y = dyScreen - dyCenter ;

    SetWindowPos( hwndCenter, NULL,
          max(x,0),
          max(y,0),
          0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

    return ;
   }

   SetWindowPos( hwndCenter, NULL,
         max(x,0),
         max(y,0),
         0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

   return ;

}/* DlgCenter() */

void DrawListBoxBitmap | ( | CDC * | pdc,
 |  | CBitmap * | pbmt,
 |  | int | x,
 |  | int | y
 | ) |  |

Definition at line 677 of file util.cpp.

{
  CDC   dcMem ;
  if (dcMem.CreateCompatibleDC( pdc ))
  {
    if (pbmt)
    {
      pbmt = dcMem.SelectObject( pbmt ) ;
      pdc->BitBlt( x, y, 16, 16, &dcMem, 0, 0, SRCCOPY ) ;
      dcMem.SelectObject( pbmt ) ;
    }
    dcMem.DeleteDC() ;
  }
}

void ErrorMessage | ( | const CString & | str,
 |  | HRESULT | hr
 | ) |  |

Definition at line 23 of file util.cpp.

{
  LPVOID lpMessageBuffer = NULL ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      GetScode(hr),
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    CString str2 ;
    str2.Format( _T("\n%s %s"), (LPCTSTR)lpMessageBuffer, (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    LocalFree(lpMessageBuffer) ;
    AfxMessageBox( str2 ) ;
  }
  else
  {
    CString str2 ;
    str2.Format( _T("\n<No system message defined> %s"), (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    AfxMessageBox( str2 ) ;
  }
}

int WINAPI GetTextMetricsCorrectly | ( | HDC | hDC,
 |  | LPTEXTMETRIC | lpTM
 | ) |  |

Definition at line 1213 of file idataobj.cpp.

{
   int    nAveWidth ;
   TCHAR  rgchAlphabet[52] ;
   int  i ;
   SIZE size ;

   // Get the TM of the current font.  Note that GetTextMetrics
   // gets the incorrect AveCharWidth value for proportional fonts.
   // This is the whole poshort in this exercise.
   //
   if (lpTM)
  GetTextMetrics(hDC, lpTM);

   // If it's not a variable pitch font GetTextMetrics was correct
   // so just return.
   //
   if (lpTM && !(lpTM->tmPitchAndFamily & FIXED_PITCH))
    return lpTM->tmAveCharWidth ;
   else
   {
    for ( i = 0 ; i <= 25 ; i++)
     rgchAlphabet[i] = (TCHAR)(i+(int)'a') ;

    for ( i = 0 ; i<=25 ; i++)
     rgchAlphabet[i+25] = (TCHAR)(i+(int)'A') ;

    GetTextExtentPoint( hDC, (LPTSTR)rgchAlphabet, 52, &size ) ;
    nAveWidth = size.cx / 26 ;
    nAveWidth = (nAveWidth + 1) / 2 ;
   }

   // Return the calculated average char width
   //
   return nAveWidth ;

} /* GetTextMetricsCorrectly()  */

LPTSTR HRtoString ( HRESULT hr )

Definition at line 440 of file util.cpp.

{
  SCODE   sc ;
  sc = GetScode( hr ) ;

#ifdef FORMATMSG
  LPVOID lpMessageBuffer ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      sc,
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    wsprintf( sz, _T( "%s (0x%lx)" ), (LPTSTR)lpMessageBuffer, sc);
    LocalFree(lpMessageBuffer) ;
  }
  else
  {
    wsprintf( sz, _T( "Unknown Scode (0x%lx)" ), sc);
  }

#endif // !FORMATMSG

  return (LPTSTR)_GetFullScodeString(sc) ;
}

LONG WINAPI ParseOffNumber | ( | LPTSTR FAR * | lplp,
 |  | LPINT | lpConv
 | ) |  |

Definition at line 475 of file util.cpp.

{
  LPTSTR lp = *lplp;
  LONG  lValue=0;
  int   sign=1;
  #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
  while( isspace(*lp) )
    lp++;
  if( *lp=='-' )
  {
    sign = -1;
    lp++;
  }
  if (*lp=='\0')
  {
    *lpConv = FALSE;
    return 0L;
  }

  // Is it a decimal number
  #ifdef UNICODE
  if( _wcsnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  #ifdef WIN32
  if( _strnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  if( _fstrnicmp( lp, (LPTSTR)_T("0x"),2) )
  #endif
  #endif
  {
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isdigit(*lp) )
    {
      lValue *= 10;
      lValue += (*lp - (TCHAR)'0');
      lp++;
    }
  }
  else
  {
    lp+=2;
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isxdigit(*lp) )
    {
      lValue *= 16;
      #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
      if( isdigit(*lp) )
        lValue += (*lp - (TCHAR)'0');
      else
        lValue += (toupper(*lp) - (TCHAR)'A' + 10);
      lp++;
    }
  }
  #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
  while( isspace(*lp) )
    lp++;

  lValue *= (long)sign;

  if (*lp==(TCHAR)',')
  {
    lp++;
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isspace(*lp) )
      lp++;
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)TRUE;
  }
  else
  {
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)(*lp=='\0');
  }
  return lValue;

} //*** ParseOffNumber

LPTSTR FAR PASCAL PointerToNthField | ( | LPTSTR | lpszString,
 |  | int | nField,
 |  | TCHAR | chDelimiter
 | ) |  |

Definition at line 336 of file util.cpp.

{
   LPTSTR lpField = lpszString;
   int   cFieldFound = 1;

   if (1 ==nField)
    return lpszString;

   while (*lpField != '\0')
   {

    if (*lpField++ == chDelimiter)
    {

     cFieldFound++;

     if (nField == cFieldFound)
      return lpField;
    }
   }

   return lpField;

}

CFont* ReallyCreateFont | ( | HDC | hDC,
 |  | LPTSTR | lpszFace,
 |  | LPTSTR | lpszStyle,
 |  | UINT | nPointSize,
 |  | UINT | uiFlags
 | ) |  |

Definition at line 88 of file util.cpp.

{
   ENUMLOGFONT  elf ;
   FONTENUMPROC lpfn ;
   HDC          hdcCur ;

   if (!(lpfn = (FONTENUMPROC)MakeProcInstance( (FARPROC)fnEnumReallyEx, AfxGetInstanceHandle() )))
    return NULL ;

   // if the DC wasn't specified then use the display...
   //
   if (!hDC)
   {
    if (!(hdcCur = GetDC( NULL )))
    {
     FreeProcInstance( (FARPROC)lpfn ) ;
     return FALSE ;
    }
   }
   else
    hdcCur = hDC ;

   if (hdcCur)
   {
    /*
     * EnumFontFamilies takes the family name as the second param.
     * For example the family name might be "Lucida Sans" and the
     * style might be "Demibold Roman".
     *
     * The last parameter is app. defined.  In our case we pass a
     * structure that has a LOGFONT and a char array as it's members.
     * We put the style in the char array, and when this function
     * returns the LOGFONT has the logfont for the font we want to create.
     */
    if (lpszStyle)
     _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, lpszStyle ) ;
    else
    switch( uiFlags & ~(RCF_NODEFAULT | RCF_STRIKEOUT | RCF_UNDERLINE) )
    {
      case RCF_BOLD:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szBold ) ;
      break ;

      case RCF_ITALIC:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szItalic ) ;
      break ;

      case RCF_BOLD | RCF_ITALIC:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szBold ) ;
        _tcscat_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, _T(" ") ) ;
        _tcscat_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szItalic ) ;
      break ;

      default:
        _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szRegular ) ;
        lpszStyle = (LPTSTR)elf.elfStyle ;
      break ;
    }

    if (lpszFace)
     EnumFontFamilies( hdcCur, lpszFace, lpfn, (LPARAM)(LPVOID)&elf ) ;

    if (!lpszFace || lstrcmpi( elf.elfLogFont.lfFaceName, lpszFace))
    {
     if ((uiFlags & RCF_NODEFAULT) == RCF_NODEFAULT)
     {
      FreeProcInstance( (FARPROC)lpfn ) ;

      if (hdcCur != hDC)
         ReleaseDC( NULL, hdcCur ) ;

      return NULL ;

     }
     else
      GetObject( GetStockObject( SYSTEM_FONT ),
             sizeof( LOGFONT ), (LPTSTR)&elf.elfLogFont ) ;
    }

    //
    // See pages 4-48, 4-49, of Reference Vol. 1 for explaination
    // of why we set lfWidth to 0
    //
    elf.elfLogFont.lfWidth = 0 ;

    //
    // The equation for calculating point size based on font
    // height (a point is 1/72 of an inch) is:
    //
    //
    //    pt = (height * 72) / number of pixels in the Y direction
    //
    // Using GetTextMetrics() you should calculate height as:
    //
    //    height = tm.tmHeight - tm.tmInternalLeading
    //
    // This is because Windows' interpretation of a font height
    // is different from everyone else's.
    //
    //
    elf.elfLogFont.lfHeight = -MulDiv( nPointSize,
               GetDeviceCaps( hdcCur, LOGPIXELSY),
               72 )  ;

    elf.elfLogFont.lfStrikeOut = (BYTE)((uiFlags & RCF_STRIKEOUT) == RCF_STRIKEOUT) ;
    elf.elfLogFont.lfUnderline = (BYTE)((uiFlags & RCF_UNDERLINE) == RCF_UNDERLINE) ;

    if (!lpszStyle)
    {
     elf.elfLogFont.lfWeight    = (uiFlags & RCF_BOLD) ? FW_BOLD : FW_NORMAL ;
     elf.elfLogFont.lfItalic    = (BYTE)((uiFlags & RCF_ITALIC) == RCF_ITALIC) ;
    }

   }
   FreeProcInstance( (FARPROC)lpfn ) ;

   if (hdcCur != hDC)
    ReleaseDC( NULL, hdcCur ) ;

   CFont * pFont = new CFont ;
   pFont->CreateFontIndirect( &elf.elfLogFont ) ;

   return pFont ;

} /* ReallyCreateFontEx()  */

VOID WINAPI StripFilespec ( LPTSTR lpszPath )

Definition at line 1438 of file util.cpp.

{
  LPTSTR     p;

  p = lpszPath + lstrlen( lpszPath ) ;
  while ((*p != '\\') && (*p != ':') && (p != lpszPath))
    p-- ;

  if (*p == ':')
    p++ ;

  /* Don't strip backslash from root directory entry. */
  if (p != lpszPath)
  {
    if ((*p == '\\') && (*(p-1) == ':'))
      p++ ;
  }

  *p = NULL ;
}

LPTSTR VTtoString ( VARTYPE vt )

Definition at line 631 of file util.cpp.

{
  CString str ;
  vt &= ~0xF000 ;
  if (vt <= VT_CLSID)
     str = g_rgszVT[vt]  ;
  else
     str = "BAD VARTYPE" ;

  return str ;
}

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/view.cpp File Reference

  • ole
  • oleview

view.cpp File Reference

#include "stdafx.h"
#include "OleView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/view.h File Reference

  • ole
  • oleview
Classes

view.h File Reference

Go to the source code of this file.

Classes

class CDropTargetView
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dataobj.cpp File Reference

  • ole
  • oleview
  • iviewers

dataobj.cpp File Reference

#include "stdafx.h"
#include "iviewers.h"
#include "iview.h"
#include "dataobj.h"
#include "util.h"
#include "idataobj.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dataobj.h File Reference

  • ole
  • oleview
  • iviewers
Classes

dataobj.h File Reference

#include "iviewer.h"

Go to the source code of this file.

Classes

class | CDataObjectDlg
class | CDataObjectViewer
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dispatch.cpp File Reference

  • ole
  • oleview
  • iviewers
Functions

dispatch.cpp File Reference

#include "stdafx.h"
#include "iviewers.h"
#include "iview.h"
#include "iviewer.h"
#include "dispatch.h"
#include "util.h"

Go to the source code of this file.

Functions

IMPLEMENT_OLECREATE (CDispatchViewer,"Ole2View.IDispatch.1", 0xd2af7a60, 0x4c42, 0x11ce, 0xb2, 0x7d, 0x00, 0xaa, 0x00, 0x1f, 0x73, 0xc1)

Function Documentation

IMPLEMENT_OLECREATE | ( | CDispatchViewer | ,
 |  | "Ole2View.IDispatch.1" | ,
 |  | 0xd2af7a60 | ,
 |  | 0x4c42 | ,
 |  | 0x11ce | ,
 |  | 0xb2 | ,
 |  | 0x7d | ,
 |  | 0x00 | ,
 |  | 0xaa | ,
 |  | 0x00 | ,
 |  | 0x1f | ,
 |  | 0x73 | ,
 |  | 0xc1 |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dispatch.h File Reference

  • ole
  • oleview
  • iviewers
Classes

dispatch.h File Reference

Go to the source code of this file.

Classes

class | CDispatchDlg
class | CDispatchViewer
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/guid.cpp File Reference

  • ole
  • oleview
  • iviewers

guid.cpp File Reference

#include "stdafx.h"
#include <initguid.h>
#include "iviewers.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iadvsink.cpp File Reference

  • ole
  • oleview
  • iviewers
Functions

iadvsink.cpp File Reference

#include "stdafx.h"
#include "iview.h"
#include "util.h"
#include "idataobj.h"
#include "iadvsink.h"

Go to the source code of this file.

Functions

STDMETHODIMP_ (ULONG) CImpIAdviseSink
STDMETHODIMP_ (void) CImpIAdviseSink

Function Documentation

STDMETHODIMP_ ( ULONG )

Definition at line 91 of file iadvsink.cpp.

  {
  ULONG   cRefT;

  cRefT=--m_cRef;

  if (0==cRefT)
    delete this;

  return cRefT;
  }

STDMETHODIMP_ ( void )

Definition at line 277 of file iadvsink.cpp.

  {
  return;
  }

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iadvsink.h File Reference

  • ole
  • oleview
  • iviewers
Classes

iadvsink.h File Reference

Go to the source code of this file.

Classes

class CImpIAdviseSink
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/idataobj.cpp File Reference

  • ole
  • oleview
  • iviewers
Classes | Defines | Typedefs | Functions

idataobj.cpp File Reference

#include "stdafx.h"
#include "iview.h"
#include "util.h"
#include "idataobj.h"
#include "iadvsink.h"

Go to the source code of this file.

Classes

struct | tagITEMDATA

Defines

#define | ETOFLAGS ETO_CLIPPED
#define | I_COLUMNENTRY 0x0003
#define | I_COLUMNHEAD 0x0002
#define | I_LABEL 0x0001
#define | I_NORMAL 0x0000

Typedefs

typedef struct FAR tagITEMDATA | ITEMDATA
typedef struct FAR tagITEMDATA * | LPITEMDATA
typedef struct FAR tagITEMDATA * | PITEMDATA

Functions

void WINAPI | ColumnTextOut (HDC hdc, int nX, int nY, LPTSTR lpszIN, int cColumns, LPCOLUMNSTRUCT rgColumns)
UINT | DBStrCpy (LPTSTR pszDst, LPCTSTR pszSrc, int far *pcLines)
void WINAPI | DlgCenter (HWND hwndCenter, HWND hwndWithin, BOOL fClient)
LRESULT EXPORT CALLBACK | fnEditSubclass (HWND hwnd, UINT uiMsg, WPARAM wP, LPARAM lP)
BOOL EXPORT CALLBACK | fnIDataObjectDlg (HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
int WINAPI | GetTextMetricsCorrectly (HDC hDC, LPTEXTMETRIC lpTM)
LPCTSTR | MyGetClipboardFormatName (UINT cf)

Define Documentation

#define ETOFLAGS ETO_CLIPPED
#define I_COLUMNENTRY 0x0003

Definition at line 30 of file idataobj.cpp.

#define I_COLUMNHEAD 0x0002

Definition at line 29 of file idataobj.cpp.

#define I_LABEL 0x0001

Definition at line 28 of file idataobj.cpp.

#define I_NORMAL 0x0000

Definition at line 27 of file idataobj.cpp.

Typedef Documentation

typedef struct FAR tagITEMDATA ITEMDATA
typedef struct FAR tagITEMDATA* LPITEMDATA
typedef struct FAR tagITEMDATA * PITEMDATA

Function Documentation

void WINAPI ColumnTextOut | ( | HDC | hdc,
 |  | int | nX,
 |  | int | nY,
 |  | LPTSTR | lpszIN,
 |  | int | cColumns,
 |  | LPCOLUMNSTRUCT | rgColumns
 | ) |  |

Definition at line 995 of file idataobj.cpp.

{

#define ETOFLAGS ETO_CLIPPED

  COLUMNSTRUCT   CS ;              // local copy for speed
  RECT           rc ;              // current cell rect
  unsigned int   cIteration = 0 ;  // what column
  LPTSTR         lpNext ;          // next string (current is lpsz)
  int            cch ;             // count of chars in current string
  SIZE           size ;            // extent of current string
  int            dx ;              // column width

  rc.left = nX ;
  rc.top = nY ;
  rc.right = 0 ;

  if (rgColumns == NULL || cColumns <= 1)
  {
    int Tab = 15 ;
    TabbedTextOut( hdc, nX, nY, lpszIN, lstrlen(lpszIN), 1, &Tab, nX ) ;
    return ;
  }

  // For each sub string (bracketed by a tab)
  //
  LPTSTR lpsz = lpszIN ;
  while (*lpsz)
  {
    if (cIteration >= (unsigned int)cColumns)
      return ;

    for (cch = 0, lpNext = lpsz ;
       *lpNext != '\t' && *lpNext ;
       lpNext++, cch++)
      ;

    CS = rgColumns[cIteration] ;

    // If it's the leftmost column use
    //
    if (cIteration == 0)
    {
      rc.left = nX + CS.nLeft ;
      rc.right = nX + CS.nRight ;
    }
    else
      rc.right = nX + CS.nRight ;

    GetTextExtentPoint( hdc, lpsz, cch, &size ) ;
    rc.bottom = rc.top + size.cy ;

    // If the width of the column is 0 do nothing
    //
    if ((dx = (rc.right - rc.left)) > 0)
    {
      switch(CS.uiFlags)
      {
        case DT_CENTER:
          ExtTextOut( hdc, rc.left + ((dx - size.cx) / (int)2),
          rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;

        case DT_RIGHT:
          // If it's right justified then make the left border 0
          //
          //rc.left = nX + rgColumns[0].nLeft ;
          ExtTextOut( hdc, rc.left + (dx - size.cx),
          rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;

        case DT_LEFT:
        default:
          ExtTextOut( hdc, rc.left, rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;
      }
    }
    rc.left = rc.right ;
    cIteration++ ;
    lpsz = lpNext + 1 ;
  }

} // ColumnTextOut()

UINT DBStrCpy | ( | LPTSTR | pszDst,
 |  | LPCTSTR | pszSrc,
 |  | int far * | pcLines
 | ) |  |

Definition at line 819 of file idataobj.cpp.

{
  TCHAR ch;
  UINT cch = 0;
  int cLines = 0;

  while (ch = *pszSrc++)
  {
    // If we find a CR or LF, then store a CR/LF in
    // the output string.
    //
    if (ch == 0x0d || ch == 0x0a)
    {
      cch += 2;
      cLines++;
      if (pszDst)
      {
        *pszDst++ = 0x0d;
        *pszDst++ = 0x0a;
      }

      // Skip any other CRs or LFs we find.
      //
      while ((ch = *pszSrc) && (ch == 0x0d || ch == 0x0a))
        ++pszSrc;
    }
    else
    {
      cch++;
      if (pszDst)
        *pszDst++ = ch;
    }
  }
  if (pszDst)
    *pszDst = 0;

  if (pcLines)
    *pcLines = cLines;

  return cch;
}

void WINAPI DlgCenter | ( | HWND | hwndCenter,
 |  | HWND | hwndWithin,
 |  | BOOL | fClient
 | ) |  |

Definition at line 1107 of file idataobj.cpp.

{
   RECT rcWithin ;
   RECT rcCenter ;
   int   x, y ;
   int   dxCenter, dyCenter ;
   int   dxScreen, dyScreen ;

   dxScreen = GetSystemMetrics( SM_CXSCREEN ) ;
   dyScreen = GetSystemMetrics( SM_CYSCREEN ) ;

   if (!IsWindow(hwndCenter))
    return ;

   if (hwndWithin && !IsWindow(hwndWithin))
    return ;

   if (hwndWithin == NULL)
   {
    rcWithin.left = rcWithin.top = 0 ;
    rcWithin.right = dxScreen ;
    rcWithin.bottom = dyScreen ;
   }
   else
   {
    if (fClient)
    {
     /*
      * First get screen coords of rectangle we're going to be
      * centered within.
      */
     GetClientRect( hwndWithin, (LPRECT)&rcWithin ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.left ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.right ) ;
    }
    else
     GetWindowRect( hwndWithin, (LPRECT)&rcWithin ) ;
   }

   GetWindowRect( hwndCenter, (LPRECT)&rcCenter ) ;
   dxCenter = rcCenter.right - rcCenter.left ;
   dyCenter = rcCenter.bottom - rcCenter.top ;

   /*
  * Now we have both the within and center rects in screen coords.
  *
  * SetWindowPos behaves differently for Non child windows
  * than for child windows.  For popups it's coordinates
  * are relative to the upper left corner of the screen.  For
  * children it's coords are relative to the upper left corner
  * of the client area of the parent.
  */
   x = ((rcWithin.right - rcWithin.left) - dxCenter) / 2 ;
   y = ((rcWithin.bottom - rcWithin.top) - dyCenter) / 2 ;

   if (hwndWithin == GetParent( hwndCenter ) &&
     !(GetWindowLong( hwndCenter, GWL_STYLE ) & WS_CHILD ))
   {
    x += rcWithin.left ;
    y += rcWithin.top ;

    if (x + dxCenter > dxScreen )
     x = dxScreen - dxCenter ;

    if (y + dyCenter > dyScreen )
     y = dyScreen - dyCenter ;

    SetWindowPos( hwndCenter, NULL,
          max(x,0),
          max(y,0),
          0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

    return ;
   }

   SetWindowPos( hwndCenter, NULL,
         max(x,0),
         max(y,0),
         0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

   return ;

}/* DlgCenter() */

LRESULT EXPORT CALLBACK fnEditSubclass | ( | HWND | hwnd,
 |  | UINT | uiMsg,
 |  | WPARAM | wP,
 |  | LPARAM | lP
 | ) |  |

Definition at line 930 of file idataobj.cpp.

{
  if (uiMsg == WM_PAINT)
  {
    HWND hwndParent = GetParent(hwnd) ;
    CIDataObjectDlg * pIDOD =(CIDataObjectDlg *)GetWindowLongPtr( hwndParent, DWLP_USER ) ;
    if (pIDOD && pIDOD->m_MetaFile.hMF != NULL)
    {
      PAINTSTRUCT ps ;
      BeginPaint( hwnd, &ps ) ;

/*
      if (pIDOD->m_MetaFile.mm == MM_ISOTROPIC || pIDOD->m_MetaFile.mm == MM_ANISOTROPIC)
      {
        if (pIDOD->m_MetaFile.xExt != 0 && pIDOD->m_MetaFile.yExt != 0)
        {

        }
      }
      else
      {
        SetMapMode( ps.hdc, MM_ANISOTROPIC ) ;
        SetWindowOrg( ps.hdc, 0, 0 ) ;
        SetWindowExt( ps.hdc, pIDOD->m_MetaFile.xExt, pIDOD->m_MetaFile.yExt ) ;
        SetViewportExt( ps.hdc, pIDOD->m_MetaFile.xExt, pIDOD->m_MetaFile.yExt ) ;
      }
*/
      PlayMetaFile( ps.hdc, pIDOD->m_MetaFile.hMF ) ;

      EndPaint( hwnd, &ps ) ;
      return 0L ;
    }
  }

  return CallWindowProc( g_pfnEdit, hwnd, uiMsg, wP, lP ) ;
}

BOOL EXPORT CALLBACK fnIDataObjectDlg | ( | HWND | hDlg,
 |  | UINT | uiMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) |  |

Definition at line 95 of file idataobj.cpp.

{
  CIDataObjectDlg * pIDOD =(CIDataObjectDlg *)GetWindowLongPtr( hDlg, DWLP_USER ) ;

  switch (uiMsg)
  {
    case WM_INITDIALOG:
      pIDOD=(CIDataObjectDlg *)lParam ;
      if (pIDOD==NULL)
      {
        EndDialog( hDlg, 0 ) ;
        return TRUE ;
      }
      SetWindowLongPtr( hDlg, DWLP_USER, (LONG_PTR)pIDOD ) ;
      pIDOD->m_hDlg = hDlg ;
      return pIDOD->OnInitDialog() ;
    break ;

    case WM_DESTROY:
      if (pIDOD)
        pIDOD->OnDestroy() ;
    break ;

    case WM_SIZE:
      if (pIDOD)
        pIDOD->OnSize( (UINT)wParam, LOWORD( lParam ), HIWORD( lParam ) ) ;
    break ;

    case WM_COMMAND:
    {
      WORD wNotifyCode = HIWORD(wParam);
      WORD wID = LOWORD(wParam);

      switch (wID)
      {
        case IDCANCEL:
          EndDialog( hDlg, IDCANCEL ) ;
        break ;

        case IDC_DOGETDATA:
          pIDOD->OnDoGetData() ;
        break ;

        case IDC_SETUPADVISE:
          if (pIDOD->m_dwConn != 0)
            pIDOD->OnKillAdvise() ;
          else
            pIDOD->OnSetupAdvise() ;
        break ;

        case IDC_CLEAROUTPUT:
          if (pIDOD)
          {
            pIDOD->m_cchOutput = 0 ;
            pIDOD->m_cLinesOutput = 0 ;
            if (pIDOD->m_MetaFile.hMF != NULL)
            {
              DeleteMetaFile( pIDOD->m_MetaFile.hMF ) ;
              pIDOD->m_MetaFile.hMF = NULL ;
            }
            SetWindowText( pIDOD->m_edtAdvise, _T("") ) ;
            InvalidateRect( pIDOD->m_edtAdvise, NULL, TRUE ) ;
            UpdateWindow( pIDOD->m_edtAdvise ) ;
          }
        break ;

        case IDC_FORMATETC:
          if (wNotifyCode == LBN_SELCHANGE)
            pIDOD->OnSelChangeFormatEtc() ;
        break ;

        case IDC_UPDATEDISPLAY:
          pIDOD->m_fUpdateDisplay = Button_GetCheck( pIDOD->m_chkUpdateDisplay ) ;
        break ;

        case IDC_PRIMEFIRST:
          if (Button_GetCheck( pIDOD->m_chkPrimeFirst ))
            pIDOD->m_advf = ADVF_PRIMEFIRST ;
          else
            pIDOD->m_advf = ADVF_NODATA ;
        break ;

        case IDC_ADVISEDATA:
          if (wNotifyCode == EN_ERRSPACE)
          {
            #ifdef _DEBUG
            OutputDebugString(_T("Output Edit Control reports EN_ERRSPACE\r\n")) ;
            #endif
          }
        break ;
      }
    }
    break ;

    case WM_DRAWITEM:
      if (pIDOD)
        pIDOD->OnDrawItem( (int)wParam, (LPDRAWITEMSTRUCT)lParam ) ;
    break ;

    case WM_MEASUREITEM:
      if (pIDOD)
        pIDOD->OnMeasureItem( (int)wParam, (LPMEASUREITEMSTRUCT)lParam ) ;
    break ;

    case WM_OUTPUTBUFFERHASDATA:
      if (pIDOD)
        pIDOD->OnOutputBufferHasData() ;
    break ;

    default:
       return FALSE ;
  }
  return TRUE ;
}

int WINAPI GetTextMetricsCorrectly | ( | HDC | hDC,
 |  | LPTEXTMETRIC | lpTM
 | ) |  |

Definition at line 1213 of file idataobj.cpp.

{
   int    nAveWidth ;
   TCHAR  rgchAlphabet[52] ;
   int  i ;
   SIZE size ;

   // Get the TM of the current font.  Note that GetTextMetrics
   // gets the incorrect AveCharWidth value for proportional fonts.
   // This is the whole poshort in this exercise.
   //
   if (lpTM)
  GetTextMetrics(hDC, lpTM);

   // If it's not a variable pitch font GetTextMetrics was correct
   // so just return.
   //
   if (lpTM && !(lpTM->tmPitchAndFamily & FIXED_PITCH))
    return lpTM->tmAveCharWidth ;
   else
   {
    for ( i = 0 ; i <= 25 ; i++)
     rgchAlphabet[i] = (TCHAR)(i+(int)'a') ;

    for ( i = 0 ; i<=25 ; i++)
     rgchAlphabet[i+25] = (TCHAR)(i+(int)'A') ;

    GetTextExtentPoint( hDC, (LPTSTR)rgchAlphabet, 52, &size ) ;
    nAveWidth = size.cx / 26 ;
    nAveWidth = (nAveWidth + 1) / 2 ;
   }

   // Return the calculated average char width
   //
   return nAveWidth ;

} /* GetTextMetricsCorrectly()  */

LPCTSTR MyGetClipboardFormatName ( UINT cf )

Definition at line 753 of file idataobj.cpp.

{
  static TCHAR sz[256] ;
  switch( cf )
  {

    case CF_UNICODETEXT: _tcscpy_s( sz, 256, _T( "CF_UNICODETEXT" ) ) ; break ;
    case CF_ENHMETAFILE: _tcscpy_s( sz, 256, _T( "CF_ENHMETAFILE" ) ) ; break ;
    case CF_TEXT: _tcscpy_s( sz, 256, _T( "CF_TEXT" ) ) ; break ;
    case CF_BITMAP: _tcscpy_s( sz, 256, _T( "CF_BITMAP" ) ) ; break ;
    case CF_METAFILEPICT: _tcscpy_s( sz, 256, _T( "CF_METAFILEPICT" ) ) ; break ;
    case CF_SYLK: _tcscpy_s( sz, 256, _T( "CF_SYLK" ) ) ; break ;
    case CF_DIF: _tcscpy_s( sz, 256, _T( "CF_DIF" ) ) ; break ;
    case CF_TIFF: _tcscpy_s( sz, 256, _T( "CF_TIFF" ) ) ; break ;
    case CF_OEMTEXT: _tcscpy_s( sz, 256, _T( "CF_OEMTEXT" ) ) ; break ;
    case CF_DIB: _tcscpy_s( sz, 256, _T( "CF_DIB" ) ) ; break ;
    case CF_PALETTE: _tcscpy_s( sz, 256, _T( "CF_PALETTE" ) ) ; break ;
    case CF_PENDATA: _tcscpy_s( sz, 256, _T( "CF_PENDATA" ) ) ; break ;
    case CF_RIFF: _tcscpy_s( sz, 256, _T( "CF_RIFF" ) ) ; break ;
    case CF_WAVE: _tcscpy_s( sz, 256, _T( "CF_WAVE" ) ) ; break ;
    case 0: _tcscpy_s( sz, 256, _T( "\"Wildcard Advise\"" ) ) ; break ;
    default:
      if (!GetClipboardFormatName( (UINT)cf, sz, 254 ))
        _stprintf_s( sz, 256, _T( "%#08lX" ), (DWORD)cf ) ;
    break ;
  }

  return sz ;
}

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/idataobj.h File Reference

  • ole
  • oleview
  • iviewers
Classes | Defines | Typedefs | Functions

idataobj.h File Reference

Go to the source code of this file.

Classes

class | CIDataObjectDlg
struct | tagCOLUMNSTRUCT

Defines

#define | CCHOUTPUTMAX 8192
#define | CLINESMAX 500
#define | WM_OUTPUTBUFFERHASDATA (WM_USER+1000)

Typedefs

typedef struct FAR tagCOLUMNSTRUCT | COLUMNSTRUCT
typedef struct FAR
tagCOLUMNSTRUCT * 		LPCOLUMNSTRUCT
typedef struct FAR
tagCOLUMNSTRUCT * 		PCOLUMNSTRUCT

Functions

void WINAPI | ColumnTextOut (HDC hdc, int nX, int nY, LPTSTR lpszIN, int cColumns, LPCOLUMNSTRUCT rgColumns)
void WINAPI | DlgCenter (HWND hwndCenter, HWND hwndWithin, BOOL fClient)
BOOL CALLBACK | fnIDataObjectDlg (HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
int WINAPI | GetTextMetricsCorrectly (HDC hDC, LPTEXTMETRIC lpTM)

Define Documentation

#define CCHOUTPUTMAX 8192

Definition at line 35 of file idataobj.h.

#define CLINESMAX 500

Definition at line 36 of file idataobj.h.

#define WM_OUTPUTBUFFERHASDATA (WM_USER+1000)

Definition at line 37 of file idataobj.h.

Typedef Documentation

typedef struct FAR tagCOLUMNSTRUCT COLUMNSTRUCT
typedef struct FAR tagCOLUMNSTRUCT* LPCOLUMNSTRUCT
typedef struct FAR tagCOLUMNSTRUCT * PCOLUMNSTRUCT

Function Documentation

void WINAPI ColumnTextOut | ( | HDC | hdc,
 |  | int | nX,
 |  | int | nY,
 |  | LPTSTR | lpszIN,
 |  | int | cColumns,
 |  | LPCOLUMNSTRUCT | rgColumns
 | ) |  |

Definition at line 995 of file idataobj.cpp.

{

#define ETOFLAGS ETO_CLIPPED

  COLUMNSTRUCT   CS ;              // local copy for speed
  RECT           rc ;              // current cell rect
  unsigned int   cIteration = 0 ;  // what column
  LPTSTR         lpNext ;          // next string (current is lpsz)
  int            cch ;             // count of chars in current string
  SIZE           size ;            // extent of current string
  int            dx ;              // column width

  rc.left = nX ;
  rc.top = nY ;
  rc.right = 0 ;

  if (rgColumns == NULL || cColumns <= 1)
  {
    int Tab = 15 ;
    TabbedTextOut( hdc, nX, nY, lpszIN, lstrlen(lpszIN), 1, &Tab, nX ) ;
    return ;
  }

  // For each sub string (bracketed by a tab)
  //
  LPTSTR lpsz = lpszIN ;
  while (*lpsz)
  {
    if (cIteration >= (unsigned int)cColumns)
      return ;

    for (cch = 0, lpNext = lpsz ;
       *lpNext != '\t' && *lpNext ;
       lpNext++, cch++)
      ;

    CS = rgColumns[cIteration] ;

    // If it's the leftmost column use
    //
    if (cIteration == 0)
    {
      rc.left = nX + CS.nLeft ;
      rc.right = nX + CS.nRight ;
    }
    else
      rc.right = nX + CS.nRight ;

    GetTextExtentPoint( hdc, lpsz, cch, &size ) ;
    rc.bottom = rc.top + size.cy ;

    // If the width of the column is 0 do nothing
    //
    if ((dx = (rc.right - rc.left)) > 0)
    {
      switch(CS.uiFlags)
      {
        case DT_CENTER:
          ExtTextOut( hdc, rc.left + ((dx - size.cx) / (int)2),
          rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;

        case DT_RIGHT:
          // If it's right justified then make the left border 0
          //
          //rc.left = nX + rgColumns[0].nLeft ;
          ExtTextOut( hdc, rc.left + (dx - size.cx),
          rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;

        case DT_LEFT:
        default:
          ExtTextOut( hdc, rc.left, rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
        break ;
      }
    }
    rc.left = rc.right ;
    cIteration++ ;
    lpsz = lpNext + 1 ;
  }

} // ColumnTextOut()

void WINAPI DlgCenter | ( | HWND | hwndCenter,
 |  | HWND | hwndWithin,
 |  | BOOL | fClient
 | ) |  |

Definition at line 1107 of file idataobj.cpp.

{
   RECT rcWithin ;
   RECT rcCenter ;
   int   x, y ;
   int   dxCenter, dyCenter ;
   int   dxScreen, dyScreen ;

   dxScreen = GetSystemMetrics( SM_CXSCREEN ) ;
   dyScreen = GetSystemMetrics( SM_CYSCREEN ) ;

   if (!IsWindow(hwndCenter))
    return ;

   if (hwndWithin && !IsWindow(hwndWithin))
    return ;

   if (hwndWithin == NULL)
   {
    rcWithin.left = rcWithin.top = 0 ;
    rcWithin.right = dxScreen ;
    rcWithin.bottom = dyScreen ;
   }
   else
   {
    if (fClient)
    {
     /*
      * First get screen coords of rectangle we're going to be
      * centered within.
      */
     GetClientRect( hwndWithin, (LPRECT)&rcWithin ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.left ) ;
     ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.right ) ;
    }
    else
     GetWindowRect( hwndWithin, (LPRECT)&rcWithin ) ;
   }

   GetWindowRect( hwndCenter, (LPRECT)&rcCenter ) ;
   dxCenter = rcCenter.right - rcCenter.left ;
   dyCenter = rcCenter.bottom - rcCenter.top ;

   /*
  * Now we have both the within and center rects in screen coords.
  *
  * SetWindowPos behaves differently for Non child windows
  * than for child windows.  For popups it's coordinates
  * are relative to the upper left corner of the screen.  For
  * children it's coords are relative to the upper left corner
  * of the client area of the parent.
  */
   x = ((rcWithin.right - rcWithin.left) - dxCenter) / 2 ;
   y = ((rcWithin.bottom - rcWithin.top) - dyCenter) / 2 ;

   if (hwndWithin == GetParent( hwndCenter ) &&
     !(GetWindowLong( hwndCenter, GWL_STYLE ) & WS_CHILD ))
   {
    x += rcWithin.left ;
    y += rcWithin.top ;

    if (x + dxCenter > dxScreen )
     x = dxScreen - dxCenter ;

    if (y + dyCenter > dyScreen )
     y = dyScreen - dyCenter ;

    SetWindowPos( hwndCenter, NULL,
          max(x,0),
          max(y,0),
          0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

    return ;
   }

   SetWindowPos( hwndCenter, NULL,
         max(x,0),
         max(y,0),
         0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;

   return ;

}/* DlgCenter() */

BOOL CALLBACK fnIDataObjectDlg | ( | HWND | hDlg,
 |  | UINT | uiMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) |  |

Definition at line 95 of file idataobj.cpp.

{
  CIDataObjectDlg * pIDOD =(CIDataObjectDlg *)GetWindowLongPtr( hDlg, DWLP_USER ) ;

  switch (uiMsg)
  {
    case WM_INITDIALOG:
      pIDOD=(CIDataObjectDlg *)lParam ;
      if (pIDOD==NULL)
      {
        EndDialog( hDlg, 0 ) ;
        return TRUE ;
      }
      SetWindowLongPtr( hDlg, DWLP_USER, (LONG_PTR)pIDOD ) ;
      pIDOD->m_hDlg = hDlg ;
      return pIDOD->OnInitDialog() ;
    break ;

    case WM_DESTROY:
      if (pIDOD)
        pIDOD->OnDestroy() ;
    break ;

    case WM_SIZE:
      if (pIDOD)
        pIDOD->OnSize( (UINT)wParam, LOWORD( lParam ), HIWORD( lParam ) ) ;
    break ;

    case WM_COMMAND:
    {
      WORD wNotifyCode = HIWORD(wParam);
      WORD wID = LOWORD(wParam);

      switch (wID)
      {
        case IDCANCEL:
          EndDialog( hDlg, IDCANCEL ) ;
        break ;

        case IDC_DOGETDATA:
          pIDOD->OnDoGetData() ;
        break ;

        case IDC_SETUPADVISE:
          if (pIDOD->m_dwConn != 0)
            pIDOD->OnKillAdvise() ;
          else
            pIDOD->OnSetupAdvise() ;
        break ;

        case IDC_CLEAROUTPUT:
          if (pIDOD)
          {
            pIDOD->m_cchOutput = 0 ;
            pIDOD->m_cLinesOutput = 0 ;
            if (pIDOD->m_MetaFile.hMF != NULL)
            {
              DeleteMetaFile( pIDOD->m_MetaFile.hMF ) ;
              pIDOD->m_MetaFile.hMF = NULL ;
            }
            SetWindowText( pIDOD->m_edtAdvise, _T("") ) ;
            InvalidateRect( pIDOD->m_edtAdvise, NULL, TRUE ) ;
            UpdateWindow( pIDOD->m_edtAdvise ) ;
          }
        break ;

        case IDC_FORMATETC:
          if (wNotifyCode == LBN_SELCHANGE)
            pIDOD->OnSelChangeFormatEtc() ;
        break ;

        case IDC_UPDATEDISPLAY:
          pIDOD->m_fUpdateDisplay = Button_GetCheck( pIDOD->m_chkUpdateDisplay ) ;
        break ;

        case IDC_PRIMEFIRST:
          if (Button_GetCheck( pIDOD->m_chkPrimeFirst ))
            pIDOD->m_advf = ADVF_PRIMEFIRST ;
          else
            pIDOD->m_advf = ADVF_NODATA ;
        break ;

        case IDC_ADVISEDATA:
          if (wNotifyCode == EN_ERRSPACE)
          {
            #ifdef _DEBUG
            OutputDebugString(_T("Output Edit Control reports EN_ERRSPACE\r\n")) ;
            #endif
          }
        break ;
      }
    }
    break ;

    case WM_DRAWITEM:
      if (pIDOD)
        pIDOD->OnDrawItem( (int)wParam, (LPDRAWITEMSTRUCT)lParam ) ;
    break ;

    case WM_MEASUREITEM:
      if (pIDOD)
        pIDOD->OnMeasureItem( (int)wParam, (LPMEASUREITEMSTRUCT)lParam ) ;
    break ;

    case WM_OUTPUTBUFFERHASDATA:
      if (pIDOD)
        pIDOD->OnOutputBufferHasData() ;
    break ;

    default:
       return FALSE ;
  }
  return TRUE ;
}

int WINAPI GetTextMetricsCorrectly | ( | HDC | hDC,
 |  | LPTEXTMETRIC | lpTM
 | ) |  |

Definition at line 1213 of file idataobj.cpp.

{
   int    nAveWidth ;
   TCHAR  rgchAlphabet[52] ;
   int  i ;
   SIZE size ;

   // Get the TM of the current font.  Note that GetTextMetrics
   // gets the incorrect AveCharWidth value for proportional fonts.
   // This is the whole poshort in this exercise.
   //
   if (lpTM)
  GetTextMetrics(hDC, lpTM);

   // If it's not a variable pitch font GetTextMetrics was correct
   // so just return.
   //
   if (lpTM && !(lpTM->tmPitchAndFamily & FIXED_PITCH))
    return lpTM->tmAveCharWidth ;
   else
   {
    for ( i = 0 ; i <= 25 ; i++)
     rgchAlphabet[i] = (TCHAR)(i+(int)'a') ;

    for ( i = 0 ; i<=25 ; i++)
     rgchAlphabet[i+25] = (TCHAR)(i+(int)'A') ;

    GetTextExtentPoint( hDC, (LPTSTR)rgchAlphabet, 52, &size ) ;
    nAveWidth = size.cx / 26 ;
    nAveWidth = (nAveWidth + 1) / 2 ;
   }

   // Return the calculated average char width
   //
   return nAveWidth ;

} /* GetTextMetricsCorrectly()  */

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iview.h File Reference

  • ole
  • oleview
  • iviewers
Defines

iview.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Defines

#define | _RGB_H_
#define | RGBBLACK RGB(0,0,0)
#define | RGBBLUE RGB(0,0,128)
#define | RGBBROWN RGB(128,128,0)
#define | RGBCYAN RGB(0,128,128)
#define | RGBGRAY RGB(128,128,128)
#define | RGBGREEN RGB(0,128,0)
#define | RGBLTBLUE RGB(0,0,255)
#define | RGBLTCYAN RGB(0,255,255)
#define | RGBLTGRAY RGB(192,192,192)
#define | RGBLTGREEN RGB(0,255,0)
#define | RGBLTMAGENTA RGB(255,0,255)
#define | RGBLTRED RGB(255,0,0)
#define | RGBMAGENTA RGB(128,0,128)
#define | RGBRED RGB(128,0,0)
#define | RGBWHITE RGB(255,255,255)
#define | RGBYELLOW RGB(255,255,0)

Define Documentation

#define _RGB_H_

Definition at line 22 of file iview.h.

#define RGBBLACK RGB(0,0,0)

Definition at line 23 of file iview.h.

#define RGBBLUE RGB(0,0,128)

Definition at line 26 of file iview.h.

#define RGBBROWN RGB(128,128,0)

Definition at line 27 of file iview.h.

#define RGBCYAN RGB(0,128,128)

Definition at line 29 of file iview.h.

#define RGBGRAY RGB(128,128,128)

Definition at line 31 of file iview.h.

#define RGBGREEN RGB(0,128,0)

Definition at line 25 of file iview.h.

#define RGBLTBLUE RGB(0,0,255)

Definition at line 34 of file iview.h.

#define RGBLTCYAN RGB(0,255,255)

Definition at line 37 of file iview.h.

#define RGBLTGRAY RGB(192,192,192)

Definition at line 30 of file iview.h.

#define RGBLTGREEN RGB(0,255,0)

Definition at line 33 of file iview.h.

#define RGBLTMAGENTA RGB(255,0,255)

Definition at line 36 of file iview.h.

#define RGBLTRED RGB(255,0,0)

Definition at line 32 of file iview.h.

#define RGBMAGENTA RGB(128,0,128)

Definition at line 28 of file iview.h.

#define RGBRED RGB(128,0,0)

Definition at line 24 of file iview.h.

#define RGBWHITE RGB(255,255,255)

Definition at line 38 of file iview.h.

#define RGBYELLOW RGB(255,255,0)

Definition at line 35 of file iview.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewer.cpp File Reference

  • ole
  • oleview
  • iviewers
Functions

iviewer.cpp File Reference

#include "stdafx.h"
#include "iviewers.h"
#include "iviewer.h"

Go to the source code of this file.

Functions

STDMETHODIMP_ (ULONG) CInterfaceViewer

Function Documentation

STDMETHODIMP_ ( ULONG )

Definition at line 74 of file iviewer.cpp.

{
  METHOD_PROLOGUE(CInterfaceViewer, InterfaceViewer)
  return pThis->ExternalRelease();
}

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewer.h File Reference

  • ole
  • oleview
  • iviewers
Classes

iviewer.h File Reference

Go to the source code of this file.

Classes

class CInterfaceViewer
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewers.cpp File Reference

  • ole
  • oleview
  • iviewers
Classes | Functions | Variables

iviewers.cpp File Reference

#include "stdafx.h"
#include "iviewers.h"
#include "typelib.h"
#include "iview.h"
#include "util.h"

Go to the source code of this file.

Classes

class | CIViewersApp

Functions

STDAPI | DllRegisterInterfaceViewer (REFCLSID rclsid, REFIID riid)

Variables

CIViewersApp NEAR | theApp

Function Documentation

STDAPI DllRegisterInterfaceViewer | ( | REFCLSID | rclsid,
 |  | REFIID | riid
 | ) |  |

Definition at line 184 of file iviewers.cpp.

{
  HRESULT hr = S_OK ;
  HKEY hk = NULL ;

  LPOLESTR lpszOleIID = NULL;
  LPOLESTR lpszOleCLSID = NULL;
  IMalloc* pmal = NULL ;

  if (FAILED(hr = ::CoGetMalloc(MEMCTX_TASK, &pmal)))
    return hr;
  ASSERT(pmal != NULL);

  TRY
  {
    LONG cb ;
    TCHAR szKey[1024];
    TCHAR szValue[1024];

    // \Interface\{iid} exists?
    if (FAILED(hr = StringFromCLSID(riid, &lpszOleIID)))
      AfxThrowMemoryException() ;

    COLE2T lpszIID(lpszOleIID);
    _stprintf_s( szKey, 1024, _T("Interface\\%s"), lpszIID );
    cb = sizeof(szValue);
    if ((hr = ::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szValue, &cb)) != ERROR_SUCCESS)
      AfxThrowMemoryException() ;

    // Create \Interface\{iid}\Ole2ViewIViewerCLSID
    _stprintf_s( szKey, 1024, _T("Interface\\%s\\Ole2ViewIViewerCLSID"), lpszIID);
    if ((hr = ::RegCreateKey(HKEY_CLASSES_ROOT, szKey, &hk)) != ERROR_SUCCESS)
      AfxThrowMemoryException() ;

    // Set = {clsid}
    if (FAILED(hr = ::StringFromCLSID(rclsid, &lpszOleCLSID)))
      AfxThrowMemoryException() ;

    COLE2T lpszCLSID(lpszOleCLSID);
    ENSURE (lpszCLSID);
    cb = lstrlen(lpszCLSID);
    if ((hr = ::RegSetValue(hk, NULL, REG_SZ, lpszCLSID, cb)) != ERROR_SUCCESS)
      AfxThrowMemoryException() ;
  }
  CATCH(CException, pException)
  {
  }
  END_CATCH

  if (hk)
    RegCloseKey( hk ) ;

  if (lpszOleIID && pmal)
    pmal->Free(lpszOleIID) ;

  if (lpszOleCLSID && pmal)
    pmal->Free(lpszOleCLSID) ;

  if (pmal)
    pmal->Release() ;

  return hr ;
}

Variable Documentation

CIViewersApp NEAR theApp

Definition at line 73 of file iviewers.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewers.h File Reference

  • ole
  • oleview
  • iviewers
Defines | Functions

iviewers.h File Reference

Go to the source code of this file.

Defines

#define | __IInterfaceViewer__

Functions

DECLARE_INTERFACE_ (IInterfaceViewer, IUnknown)
DEFINE_GUID (IID_IInterfaceViewer, 0xfc37e5ba, 0x4a8e, 0x11ce, 0x87, 0x0b, 0x08, 0x00, 0x36, 0x8d, 0x23, 0x02)
DEFINE_GUID (CLSID_IDispatchViewer, 0xd2af7a60, 0x4c42, 0x11ce, 0xb2, 0x7d, 0x00, 0xaa, 0x00, 0x1f, 0x73, 0xc1)
DEFINE_GUID (CLSID_IDataObjectViewer, 0x28d8aba0, 0x4b78, 0x11ce, 0xb2, 0x7d, 0x0, 0xaa, 0x0, 0x1f, 0x73, 0xc1)
DEFINE_GUID (CLSID_ITypeLibViewer, 0x57efbf49, 0x4a8b, 0x11ce, 0x87, 0xb, 0x8, 0x0, 0x36, 0x8d, 0x23, 0x2)
STDAPI | DllRegisterInterfaceViewer (REFCLSID rclsid, REFIID riid)

Define Documentation

#define __IInterfaceViewer__

Definition at line 26 of file iviewers.h.

Function Documentation

DECLARE_INTERFACE_ | ( | IInterfaceViewer | ,
 |  | IUnknown |
 | ) |  |

Definition at line 27 of file iviewers.h.

{
  // *** IUnknown methods ***
  STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  STDMETHOD_(ULONG,Release) (THIS) PURE;

  // *** IInterfaceViewer methods ***
  STDMETHOD(View) (HWND hwndParent, REFIID riid, LPUNKNOWN punk) PURE;
};

DEFINE_GUID | ( | IID_IInterfaceViewer | ,
 |  | 0xfc37e5ba | ,
 |  | 0x4a8e | ,
 |  | 0x11ce | ,
 |  | 0x87 | ,
 |  | 0x0b | ,
 |  | 0x08 | ,
 |  | 0x00 | ,
 |  | 0x36 | ,
 |  | 0x8d | ,
 |  | 0x23 | ,
 |  | 0x02 |
 | ) |  |
DEFINE_GUID | ( | CLSID_IDispatchViewer | ,
 |  | 0xd2af7a60 | ,
 |  | 0x4c42 | ,
 |  | 0x11ce | ,
 |  | 0xb2 | ,
 |  | 0x7d | ,
 |  | 0x00 | ,
 |  | 0xaa | ,
 |  | 0x00 | ,
 |  | 0x1f | ,
 |  | 0x73 | ,
 |  | 0xc1 |
 | ) |  |
DEFINE_GUID | ( | CLSID_IDataObjectViewer | ,
 |  | 0x28d8aba0 | ,
 |  | 0x4b78 | ,
 |  | 0x11ce | ,
 |  | 0xb2 | ,
 |  | 0x7d | ,
 |  | 0x0 | ,
 |  | 0xaa | ,
 |  | 0x0 | ,
 |  | 0x1f | ,
 |  | 0x73 | ,
 |  | 0xc1 |
 | ) |  |
DEFINE_GUID | ( | CLSID_ITypeLibViewer | ,
 |  | 0x57efbf49 | ,
 |  | 0x4a8b | ,
 |  | 0x11ce | ,
 |  | 0x87 | ,
 |  | 0xb | ,
 |  | 0x8 | ,
 |  | 0x0 | ,
 |  | 0x36 | ,
 |  | 0x8d | ,
 |  | 0x23 | ,
 |  | 0x2 |
 | ) |  |
STDAPI DllRegisterInterfaceViewer | ( | REFCLSID | rclsid,
 |  | REFIID | riid
 | ) |  |

Definition at line 184 of file iviewers.cpp.

{
  HRESULT hr = S_OK ;
  HKEY hk = NULL ;

  LPOLESTR lpszOleIID = NULL;
  LPOLESTR lpszOleCLSID = NULL;
  IMalloc* pmal = NULL ;

  if (FAILED(hr = ::CoGetMalloc(MEMCTX_TASK, &pmal)))
    return hr;
  ASSERT(pmal != NULL);

  TRY
  {
    LONG cb ;
    TCHAR szKey[1024];
    TCHAR szValue[1024];

    // \Interface\{iid} exists?
    if (FAILED(hr = StringFromCLSID(riid, &lpszOleIID)))
      AfxThrowMemoryException() ;

    COLE2T lpszIID(lpszOleIID);
    _stprintf_s( szKey, 1024, _T("Interface\\%s"), lpszIID );
    cb = sizeof(szValue);
    if ((hr = ::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szValue, &cb)) != ERROR_SUCCESS)
      AfxThrowMemoryException() ;

    // Create \Interface\{iid}\Ole2ViewIViewerCLSID
    _stprintf_s( szKey, 1024, _T("Interface\\%s\\Ole2ViewIViewerCLSID"), lpszIID);
    if ((hr = ::RegCreateKey(HKEY_CLASSES_ROOT, szKey, &hk)) != ERROR_SUCCESS)
      AfxThrowMemoryException() ;

    // Set = {clsid}
    if (FAILED(hr = ::StringFromCLSID(rclsid, &lpszOleCLSID)))
      AfxThrowMemoryException() ;

    COLE2T lpszCLSID(lpszOleCLSID);
    ENSURE (lpszCLSID);
    cb = lstrlen(lpszCLSID);
    if ((hr = ::RegSetValue(hk, NULL, REG_SZ, lpszCLSID, cb)) != ERROR_SUCCESS)
      AfxThrowMemoryException() ;
  }
  CATCH(CException, pException)
  {
  }
  END_CATCH

  if (hk)
    RegCloseKey( hk ) ;

  if (lpszOleIID && pmal)
    pmal->Free(lpszOleIID) ;

  if (lpszOleCLSID && pmal)
    pmal->Free(lpszOleCLSID) ;

  if (pmal)
    pmal->Release() ;

  return hr ;
}

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/resource.h File Reference

  • ole
  • oleview
  • iviewers
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_GROUPBYTYPEKIND 32771
#define | IDB_IMAGELIST 200
#define | IDC_ADVISEDATA 1023
#define | IDC_CLEAROUTPUT 1027
#define | IDC_DOGETDATA 1021
#define | IDC_FORMATETC 102
#define | IDC_GETDATA 1003
#define | IDC_PRIMEFIRST 1025
#define | IDC_SETUPADVISE 1022
#define | IDC_TYPEINFOCOUNT 1002
#define | IDC_UPDATEDISPLAY 1024
#define | IDC_VIEWTYPEINFO 1000
#define | IDD_ABOUTBOX 100
#define | IDD_DISPATCH 130
#define | IDD_IDATAOBJDLG 103
#define | IDD_TYPELIB 131
#define | IDP_CANT_RUN_STANDALONE 100
#define | IDP_OLE_INIT_FAILED 101
#define | IDR_MAINFRAME 128
#define | IDR_TYPELIBWND 128
#define | IDS_REG_GROUPBYKIND 105
#define | IDS_REG_TYPELIB 103
#define | IDS_REG_WNDPOS 104
#define | IDS_REGISTRYKEY 102

Define Documentation

#define ID_VIEW_GROUPBYTYPEKIND 32771

Definition at line 28 of file resource.h.

#define IDB_IMAGELIST 200

Definition at line 18 of file resource.h.

#define IDC_ADVISEDATA 1023

Definition at line 24 of file resource.h.

#define IDC_CLEAROUTPUT 1027

Definition at line 27 of file resource.h.

#define IDC_DOGETDATA 1021

Definition at line 22 of file resource.h.

#define IDC_FORMATETC 102

Definition at line 8 of file resource.h.

#define IDC_GETDATA 1003

Definition at line 21 of file resource.h.

#define IDC_PRIMEFIRST 1025

Definition at line 26 of file resource.h.

#define IDC_SETUPADVISE 1022

Definition at line 23 of file resource.h.

#define IDC_TYPEINFOCOUNT 1002

Definition at line 20 of file resource.h.

#define IDC_UPDATEDISPLAY 1024

Definition at line 25 of file resource.h.

#define IDC_VIEWTYPEINFO 1000

Definition at line 19 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_DISPATCH 130

Definition at line 16 of file resource.h.

#define IDD_IDATAOBJDLG 103

Definition at line 10 of file resource.h.

#define IDD_TYPELIB 131

Definition at line 17 of file resource.h.

#define IDP_CANT_RUN_STANDALONE 100

Definition at line 6 of file resource.h.

#define IDP_OLE_INIT_FAILED 101

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 14 of file resource.h.

#define IDR_TYPELIBWND 128

Definition at line 15 of file resource.h.

#define IDS_REG_GROUPBYKIND 105

Definition at line 13 of file resource.h.

#define IDS_REG_TYPELIB 103

Definition at line 11 of file resource.h.

#define IDS_REG_WNDPOS 104

Definition at line 12 of file resource.h.

#define IDS_REGISTRYKEY 102

Definition at line 9 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/shadow.cpp File Reference

  • ole
  • oleview
  • iviewers
Defines | Functions

shadow.cpp File Reference

#include "stdafx.h"
#include "shadow.h"

Go to the source code of this file.

Defines

#define | SHADOWWIDTH 1

Functions

VOID NEAR PASCAL | Draw3DLine1 (HDC hDC, UINT x, UINT y, UINT nLen, UINT wFlags)
VOID NEAR PASCAL | DrawFrame (HDC hDC, LPRECT lprc)
VOID WINAPI | tdDraw3DCrease (HDC hDC, LPRECT lpRect, UINT uiFlags)
VOID WINAPI | tdDraw3DLine (HDC hDC, UINT x, UINT y, UINT uiLen, UINT uiShadowWidth, UINT uiFlags)
VOID WINAPI | tdDraw3DRect (HDC hDC, LPRECT lpRect, UINT uiShadowWidth, UINT uiFlags)
COLORREF WINAPI | tdGetHighlightColor (COLORREF rgb)
COLORREF WINAPI | tdGetShadowColor (COLORREF rgb)

Define Documentation

#define SHADOWWIDTH 1

Definition at line 20 of file shadow.cpp.

Function Documentation

VOID NEAR PASCAL Draw3DLine1 | ( | HDC | hDC,
 |  | UINT | x,
 |  | UINT | y,
 |  | UINT | nLen,
 |  | UINT | wFlags
 | ) |  |

Definition at line 445 of file shadow.cpp.

{
   BOOL    fDark ;
   RECT    rc ;
   COLORREF   rgbOld ;

   if ( uiFlags & DRAW3D_TOPLINE )
   {
    rc.left = x ;
    rc.right = rc.left + uiLen - 1 ;
    rc.top = y ;
    rc.bottom = y + 1 ;

    fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* possibly the bottom? */
   else if ( uiFlags & DRAW3D_BOTTOMLINE )
   {
    rc.left = x ;
    rc.right = rc.left + uiLen - 1 ;
    rc.top = y - 1 ;
    rc.bottom = y ;

    fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* ok, it's gotta be left? */
   else if ( uiFlags & DRAW3D_LEFTLINE )
   {
    rc.left = x ;
    rc.right = x + 1 ;
    rc.top = y ;
    rc.bottom = y + uiLen ;

    fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* well maybe it's for the right side? */
   else if ( uiFlags & DRAW3D_RIGHTLINE )
   {
    rc.left = x - 1 ;
    rc.right = x ;
    rc.top = y ;
    rc.bottom = y + uiLen ;

    fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* bad drugs? */
   else return ;

   /* select the appropriate color for the fill */
   if ( fDark )
    rgbOld = SetBkColor( hDC,
         GetNearestColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ) ;
   else
    rgbOld = SetBkColor( hDC,
         GetNearestColor( hDC, tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;

   /* finally, draw the dern thing */

   ExtTextOut( hDC, x, y, ETO_OPAQUE, &rc, NULL, 0, NULL ) ;

   SetBkColor( hDC, rgbOld ) ;

} /* Draw3DLine1()  */

VOID NEAR PASCAL DrawFrame | ( | HDC | hDC,
 |  | LPRECT | lprc
 | ) |  |

Definition at line 513 of file shadow.cpp.

{
   RECT    rc1 ;

   /* perform CopyRect w/o bloody windows style overhead */
   rc1 = *lprc ;

   /* top */
   rc1.top = lprc->top ;
   rc1.left = lprc->left ;
   rc1.bottom = lprc->top + 1 ;
   rc1.right = lprc->right ;

   /* blast it out */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

   /* right */
   rc1.left = lprc->right - 1 ;
   rc1.bottom = lprc->bottom ;

   /* blast this part now */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

   /* left */
   rc1.left = lprc->left ;
   rc1.right = lprc->left + 1 ;

   /* and another part */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

   /* bottom */
   rc1.right = lprc->right ;
   rc1.top = lprc->bottom - 1 ;

   /* finish it off */
   ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;

} /* DrawFaceFrame() */

VOID WINAPI tdDraw3DCrease | ( | HDC | hDC,
 |  | LPRECT | lpRect,
 |  | UINT | uiFlags
 | ) |  |

Definition at line 32 of file shadow.cpp.

{
   RECT       rc ;
   COLORREF   rgbOld ;

   rc = *lpRect ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, 1, 1 ) ;

   rgbOld = SetBkColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ;

   DrawFrame( hDC, &rc ) ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, -1, -1 ) ;
   else
    OffsetRect( &rc, 1, 1 ) ;

   SetBkColor( hDC, tdGetHighlightColor( rgbOld ) ) ;

   DrawFrame( hDC, &rc ) ;

   SetBkColor( hDC, rgbOld ) ;

} /* tdDraw3DCrease()  */

VOID WINAPI tdDraw3DLine | ( | HDC | hDC,
 |  | UINT | x,
 |  | UINT | y,
 |  | UINT | uiLen,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT nLen,.

DESCRIPTION: Draws a 3D line that can be used to make a 3D box.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the 3D line.

UINT x, y : Coordinates of the beginning of the line. These coordinates are in device UINTs and represent the _outside_ most point. Horiz- ontal lines are drawn from left to right and vertical lines are drawn from top to bottom.

UINT uiShadowWidth : Width of the shadow in device coordinates.

UINT uiFlags : The following flags may be passed to describe the style of the 3D line:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

DRAW3D_TOPLINE, _BOTTOMLINE, _LEFTLINE, and _RIGHTLINE : Specifies that a "top", "Bottom", "Left", or"Right" line is to be drawn.

RETURN (VOID WINAPI): The line will have been drawn into the DC.

NOTES:

cjp

Definition at line 194 of file shadow.cpp.

{
   HBRUSH  hBrush ;
   BOOL    fDark ;
   POINT   Point[ 4 ] ;         /* define a polgon with 4 points    */

   /* if width is zero, don't do nothin'! */
   if ( !uiShadowWidth )
     return ;

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    Draw3DLine1( hDC, x, y, uiLen, uiFlags ) ;
    return ;
   }

   /* define shape of polygon--origin is always the same */
   Point[0].x = x ;
   Point[0].y = y ;

   /*  To do this we'll simply draw a polygon with four sides, using
  *  the appropriate brush.  I dare you to ask me why this isn't a
  *  switch/case!
  */
   if ( uiFlags & DRAW3D_TOPLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
     Point[1].y = y ;

     /* down/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y + uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* possibly the bottom? */
   else if ( uiFlags & DRAW3D_BOTTOMLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen ;
     Point[1].y = y ;

     /* up/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y - uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y - uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* ok, it's gotta be left? */
   else if ( uiFlags & DRAW3D_LEFTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;

     /* up/right */
     Point[2].x = x + uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* down */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* well maybe it's for the right side? */
   else if ( uiFlags & DRAW3D_RIGHTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen ;

     /* up/left */
     Point[2].x = x - uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* up */
     Point[3].x = x - uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }
   else
    return ;

   /* select NULL_PEN for no borders */
   SelectObject( hDC, GetStockObject( NULL_PEN ) ) ;

   /* select the appropriate color for the fill */
   hBrush = CreateSolidBrush( GetNearestColor( hDC, fDark ?
                tdGetShadowColor( GetBkColor( hDC ) ) :
                tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;

   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   Polygon( hDC, (LPPOINT)Point, 4 ) ;

   /* restore what we killed */
   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   DeleteObject( hBrush ) ;

} /*tdDraw3DLine() */

VOID WINAPI tdDraw3DRect | ( | HDC | hDC,
 |  | LPRECT | lpRect,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DRect( HDC, LPRECT, UINT, UINT ).

DESCRIPTION: Draws a 3D rectangle that is shaded. wFlags can be used to control how the rectangle looks.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the rectangle.

RECT rect : A rectangle describing the dimensions of the rectangle in device coordinates.

UINT wShadowWidth : Width of the shadow in device coordinates.

UINT wFlags : The following flags may be passed to describe the style of the rectangle:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

RETURN (VOID WINAPI): The 3D looking rectangle will have been drawn into the DC.

NOTES:

cjp

Definition at line 93 of file shadow.cpp.

{
   /* sanity check--don't work if you don't have to! */
   if ( !uiShadowWidth || !RectVisible( hDC, lpRect ) )
     return ;

   if (uiFlags & DRAW3D_CREASE)
   {
    tdDraw3DCrease( hDC, lpRect, uiFlags ) ;
    return ;
   }

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    /* draw the top line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    Draw3DLine1( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    Draw3DLine1( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_LEFTLINE | uiFlags ) ;
   }
   else
   {
    /* draw the top line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    tdDraw3DLine( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_LEFTLINE | uiFlags ) ;
   }
} /* Draw3DRect() */

COLORREF WINAPI tdGetHighlightColor ( COLORREF rgb )

Definition at line 331 of file shadow.cpp.

{
   BYTE  cRed, cGreen, cBlue ;

  #if _MFC_VER >= 0x0300
    if (rgb == GetSysColor( COLOR_BTNFACE ))
      return GetSysColor( COLOR_BTNHIGHLIGHT ) ;
  #endif

   if (rgb == RGBLTRED     ||
     rgb == RGBLTGREEN   ||
     rgb == RGBLTBLUE    ||
     rgb == RGBLTMAGENTA ||
     rgb == RGBLTCYAN    ||
     rgb == RGBLTGRAY    ||
     rgb == RGBYELLOW)
    return RGBWHITE ;

   if (rgb == RGBWHITE)
    return RGBLTGRAY ;

   if (rgb == RGBBLACK || rgb == RGBGRAY)
    return RGBLTGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed == 128)
    cRed += 64 ;

   if (cGreen == 128)
    cGreen += 64 ;

   if (cBlue == 128)
    cBlue += 64 ;

   return RGB( cRed, cGreen, cBlue ) ;

} /* tdGetHighlightColor()  */

COLORREF WINAPI tdGetShadowColor ( COLORREF rgb )

Definition at line 385 of file shadow.cpp.

{
  if (rgb == GetSysColor( COLOR_BTNFACE ))
    return GetSysColor( COLOR_BTNSHADOW ) ;

   BYTE  cRed, cGreen, cBlue ;

   if (rgb == RGBBLACK)
    return RGBGRAY ;

   if (rgb == RGBRED     ||
     rgb == RGBGREEN   ||
     rgb == RGBBLUE    ||
     rgb == RGBBROWN   ||
     rgb == RGBMAGENTA ||
     rgb == RGBCYAN    ||
     rgb == RGBWHITE   ||
     rgb == RGBGRAY)
    return RGBBLACK ;

   if (rgb == RGBLTGRAY)
    return RGBGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed > 128)
    cRed -= 64 ;

   if (cGreen > 128)
    cGreen -= 64 ;

   if (cBlue > 128)
    cBlue -= 64 ;

   return RGB( cRed, cGreen, cBlue ) ;
} /* tdGetShadowColor()  */

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/shadow.h File Reference

  • ole
  • oleview
  • iviewers
Defines | Functions

shadow.h File Reference

Go to the source code of this file.

Defines

#define | DRAW3D_BOTTOMLINE 0x1000
#define | DRAW3D_CREASE 0x0400
#define | DRAW3D_IN 0x0100
#define | DRAW3D_LEFTLINE 0x2000
#define | DRAW3D_OUT 0x0200
#define | DRAW3D_RIGHTLINE 0x4000
#define | DRAW3D_TOPLINE 0x0800
#define | RGBBLACK RGB(0,0,0)
#define | RGBBLUE RGB(0,0,128)
#define | RGBBROWN RGB(128,128,0)
#define | RGBCYAN RGB(0,128,128)
#define | RGBGRAY RGB(128,128,128)
#define | RGBGREEN RGB(0,128,0)
#define | RGBLTBLUE RGB(0,0,255)
#define | RGBLTCYAN RGB(0,255,255)
#define | RGBLTGRAY RGB(192,192,192)
#define | RGBLTGREEN RGB(0,255,0)
#define | RGBLTMAGENTA RGB(255,0,255)
#define | RGBLTRED RGB(255,0,0)
#define | RGBMAGENTA RGB(128,0,128)
#define | RGBRED RGB(128,0,0)
#define | RGBWHITE RGB(255,255,255)
#define | RGBYELLOW RGB(255,255,0)
#define | tdDrawRect tdDrawFaceFrame

Functions

VOID WINAPI | tdDraw3DCrease (HDC hdc, LPRECT lprc, UINT uiFlags)
VOID WINAPI | tdDraw3DLine (HDC hdc, UINT x, UINT y, UINT nLen, UINT uiWidth, UINT wFlags)
VOID WINAPI | tdDraw3DRect (HDC hdc, LPRECT lprc, UINT uiWidth, UINT wFlags)
VOID WINAPI | tdDrawFaceFrame (HDC hdc, LPRECT lprc, UINT uiWidth)
COLORREF WINAPI | tdGetHighlightColor (COLORREF rgb)
COLORREF WINAPI | tdGetShadowColor (COLORREF rgb)

Define Documentation

#define DRAW3D_BOTTOMLINE 0x1000

Definition at line 20 of file shadow.h.

#define DRAW3D_CREASE 0x0400

Definition at line 17 of file shadow.h.

#define DRAW3D_IN 0x0100

Definition at line 15 of file shadow.h.

#define DRAW3D_LEFTLINE 0x2000

Definition at line 21 of file shadow.h.

#define DRAW3D_OUT 0x0200

Definition at line 16 of file shadow.h.

#define DRAW3D_RIGHTLINE 0x4000

Definition at line 22 of file shadow.h.

#define DRAW3D_TOPLINE 0x0800

Definition at line 19 of file shadow.h.

#define RGBBLACK RGB(0,0,0)

Definition at line 29 of file shadow.h.

#define RGBBLUE RGB(0,0,128)

Definition at line 32 of file shadow.h.

#define RGBBROWN RGB(128,128,0)

Definition at line 33 of file shadow.h.

#define RGBCYAN RGB(0,128,128)

Definition at line 35 of file shadow.h.

#define RGBGRAY RGB(128,128,128)

Definition at line 37 of file shadow.h.

#define RGBGREEN RGB(0,128,0)

Definition at line 31 of file shadow.h.

#define RGBLTBLUE RGB(0,0,255)

Definition at line 40 of file shadow.h.

#define RGBLTCYAN RGB(0,255,255)

Definition at line 43 of file shadow.h.

#define RGBLTGRAY RGB(192,192,192)

Definition at line 36 of file shadow.h.

#define RGBLTGREEN RGB(0,255,0)

Definition at line 39 of file shadow.h.

#define RGBLTMAGENTA RGB(255,0,255)

Definition at line 42 of file shadow.h.

#define RGBLTRED RGB(255,0,0)

Definition at line 38 of file shadow.h.

#define RGBMAGENTA RGB(128,0,128)

Definition at line 34 of file shadow.h.

#define RGBRED RGB(128,0,0)

Definition at line 30 of file shadow.h.

#define RGBWHITE RGB(255,255,255)

Definition at line 44 of file shadow.h.

#define RGBYELLOW RGB(255,255,0)

Definition at line 41 of file shadow.h.

#define tdDrawRect tdDrawFaceFrame

Definition at line 84 of file shadow.h.

Function Documentation

VOID WINAPI tdDraw3DCrease | ( | HDC | hdc,
 |  | LPRECT | lprc,
 |  | UINT | uiFlags
 | ) |  |

Definition at line 32 of file shadow.cpp.

{
   RECT       rc ;
   COLORREF   rgbOld ;

   rc = *lpRect ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, 1, 1 ) ;

   rgbOld = SetBkColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ;

   DrawFrame( hDC, &rc ) ;

   if (uiFlags & DRAW3D_OUT)
    OffsetRect( &rc, -1, -1 ) ;
   else
    OffsetRect( &rc, 1, 1 ) ;

   SetBkColor( hDC, tdGetHighlightColor( rgbOld ) ) ;

   DrawFrame( hDC, &rc ) ;

   SetBkColor( hDC, rgbOld ) ;

} /* tdDraw3DCrease()  */

VOID WINAPI tdDraw3DLine | ( | HDC | hDC,
 |  | UINT | x,
 |  | UINT | y,
 |  | UINT | uiLen,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT nLen,.

DESCRIPTION: Draws a 3D line that can be used to make a 3D box.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the 3D line.

UINT x, y : Coordinates of the beginning of the line. These coordinates are in device UINTs and represent the _outside_ most point. Horiz- ontal lines are drawn from left to right and vertical lines are drawn from top to bottom.

UINT uiShadowWidth : Width of the shadow in device coordinates.

UINT uiFlags : The following flags may be passed to describe the style of the 3D line:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

DRAW3D_TOPLINE, _BOTTOMLINE, _LEFTLINE, and _RIGHTLINE : Specifies that a "top", "Bottom", "Left", or"Right" line is to be drawn.

RETURN (VOID WINAPI): The line will have been drawn into the DC.

NOTES:

cjp

Definition at line 194 of file shadow.cpp.

{
   HBRUSH  hBrush ;
   BOOL    fDark ;
   POINT   Point[ 4 ] ;         /* define a polgon with 4 points    */

   /* if width is zero, don't do nothin'! */
   if ( !uiShadowWidth )
     return ;

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    Draw3DLine1( hDC, x, y, uiLen, uiFlags ) ;
    return ;
   }

   /* define shape of polygon--origin is always the same */
   Point[0].x = x ;
   Point[0].y = y ;

   /*  To do this we'll simply draw a polygon with four sides, using
  *  the appropriate brush.  I dare you to ask me why this isn't a
  *  switch/case!
  */
   if ( uiFlags & DRAW3D_TOPLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
     Point[1].y = y ;

     /* down/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y + uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* possibly the bottom? */
   else if ( uiFlags & DRAW3D_BOTTOMLINE )
   {
     /* across to right */
     Point[1].x = x + uiLen ;
     Point[1].y = y ;

     /* up/left */
     Point[2].x = x + uiLen - uiShadowWidth ;
     Point[2].y = y - uiShadowWidth ;

     /* accross to left */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y - uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }

   /* ok, it's gotta be left? */
   else if ( uiFlags & DRAW3D_LEFTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;

     /* up/right */
     Point[2].x = x + uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* down */
     Point[3].x = x + uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'dark' brush if 'in'--'light' for 'out' */
     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
   }

   /* well maybe it's for the right side? */
   else if ( uiFlags & DRAW3D_RIGHTLINE )
   {
     /* down */
     Point[1].x = x ;
     Point[1].y = y + uiLen ;

     /* up/left */
     Point[2].x = x - uiShadowWidth ;
     Point[2].y = y + uiLen - uiShadowWidth ;

     /* up */
     Point[3].x = x - uiShadowWidth ;
     Point[3].y = y + uiShadowWidth ;

     /* select 'light' brush if 'in' */
     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
   }
   else
    return ;

   /* select NULL_PEN for no borders */
   SelectObject( hDC, GetStockObject( NULL_PEN ) ) ;

   /* select the appropriate color for the fill */
   hBrush = CreateSolidBrush( GetNearestColor( hDC, fDark ?
                tdGetShadowColor( GetBkColor( hDC ) ) :
                tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;

   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   Polygon( hDC, (LPPOINT)Point, 4 ) ;

   /* restore what we killed */
   hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;

   DeleteObject( hBrush ) ;

} /*tdDraw3DLine() */

VOID WINAPI tdDraw3DRect | ( | HDC | hDC,
 |  | LPRECT | lpRect,
 |  | UINT | uiShadowWidth,
 |  | UINT | uiFlags
 | ) |  |

VOID WINAPI tdDraw3DRect( HDC, LPRECT, UINT, UINT ).

DESCRIPTION: Draws a 3D rectangle that is shaded. wFlags can be used to control how the rectangle looks.

ARGUMENTS: HDC hDC : Handle to the device context that will be used to display the rectangle.

RECT rect : A rectangle describing the dimensions of the rectangle in device coordinates.

UINT wShadowWidth : Width of the shadow in device coordinates.

UINT wFlags : The following flags may be passed to describe the style of the rectangle:

DRAW3D_IN : The shadow is drawn such that the box appears to be sunk in to the screen. This is default if 0 is passed.

DRAW3D_OUT : The shadow is drawn such that the box appears to be sticking out of the screen.

RETURN (VOID WINAPI): The 3D looking rectangle will have been drawn into the DC.

NOTES:

cjp

Definition at line 93 of file shadow.cpp.

{
   /* sanity check--don't work if you don't have to! */
   if ( !uiShadowWidth || !RectVisible( hDC, lpRect ) )
     return ;

   if (uiFlags & DRAW3D_CREASE)
   {
    tdDraw3DCrease( hDC, lpRect, uiFlags ) ;
    return ;
   }

   /* if width is 1 use lines instead of polygons */
   if (uiShadowWidth == 1)
   {
    /* draw the top line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    Draw3DLine1( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    Draw3DLine1( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    Draw3DLine1( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           DRAW3D_LEFTLINE | uiFlags ) ;
   }
   else
   {
    /* draw the top line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_TOPLINE | uiFlags ) ;

    /* right line */
    tdDraw3DLine( hDC, lpRect->right, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_RIGHTLINE | uiFlags ) ;

    /* bottom line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->bottom,
           lpRect->right - lpRect->left,
           uiShadowWidth, DRAW3D_BOTTOMLINE | uiFlags ) ;

    /* left line */
    tdDraw3DLine( hDC, lpRect->left, lpRect->top,
           lpRect->bottom - lpRect->top,
           uiShadowWidth, DRAW3D_LEFTLINE | uiFlags ) ;
   }
} /* Draw3DRect() */

VOID WINAPI tdDrawFaceFrame | ( | HDC | hdc,
 |  | LPRECT | lprc,
 |  | UINT | uiWidth
 | ) |  |
COLORREF WINAPI tdGetHighlightColor ( COLORREF rgb )

Definition at line 331 of file shadow.cpp.

{
   BYTE  cRed, cGreen, cBlue ;

  #if _MFC_VER >= 0x0300
    if (rgb == GetSysColor( COLOR_BTNFACE ))
      return GetSysColor( COLOR_BTNHIGHLIGHT ) ;
  #endif

   if (rgb == RGBLTRED     ||
     rgb == RGBLTGREEN   ||
     rgb == RGBLTBLUE    ||
     rgb == RGBLTMAGENTA ||
     rgb == RGBLTCYAN    ||
     rgb == RGBLTGRAY    ||
     rgb == RGBYELLOW)
    return RGBWHITE ;

   if (rgb == RGBWHITE)
    return RGBLTGRAY ;

   if (rgb == RGBBLACK || rgb == RGBGRAY)
    return RGBLTGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed == 128)
    cRed += 64 ;

   if (cGreen == 128)
    cGreen += 64 ;

   if (cBlue == 128)
    cBlue += 64 ;

   return RGB( cRed, cGreen, cBlue ) ;

} /* tdGetHighlightColor()  */

COLORREF WINAPI tdGetShadowColor ( COLORREF rgb )

Definition at line 385 of file shadow.cpp.

{
  if (rgb == GetSysColor( COLOR_BTNFACE ))
    return GetSysColor( COLOR_BTNSHADOW ) ;

   BYTE  cRed, cGreen, cBlue ;

   if (rgb == RGBBLACK)
    return RGBGRAY ;

   if (rgb == RGBRED     ||
     rgb == RGBGREEN   ||
     rgb == RGBBLUE    ||
     rgb == RGBBROWN   ||
     rgb == RGBMAGENTA ||
     rgb == RGBCYAN    ||
     rgb == RGBWHITE   ||
     rgb == RGBGRAY)
    return RGBBLACK ;

   if (rgb == RGBLTGRAY)
    return RGBGRAY ;

   cRed = (BYTE)(rgb & 0x000000FF) ;

   cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;

   cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;

   if (cRed > 128)
    cRed -= 64 ;

   if (cGreen > 128)
    cGreen -= 64 ;

   if (cBlue > 128)
    cBlue -= 64 ;

   return RGB( cRed, cGreen, cBlue ) ;
} /* tdGetShadowColor()  */

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/stdafx.cpp File Reference

  • ole
  • oleview
  • iviewers

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/stdafx.h File Reference

  • ole
  • oleview
  • iviewers

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxcmn.h>
#include <afxpriv.h>
#include <atlbase.h>
#include <atlwin.h>
#include "windowsx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlblist.cpp File Reference

  • ole
  • oleview
  • iviewers
Defines

tlblist.cpp File Reference

#include "stdafx.h"
#include "iview.h"
#include "util.h"
#include "iviewers.h"
#include "iviewer.h"
#include "typelib.h"
#include "tlblist.h"

Go to the source code of this file.

Defines

#define ID_LISTVIEW 43

Define Documentation

#define ID_LISTVIEW 43

Definition at line 26 of file tlblist.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlblist.h File Reference

  • ole
  • oleview
  • iviewers
Classes

tlblist.h File Reference

Go to the source code of this file.

Classes

class CTypeLibListView
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbodl.cpp File Reference

  • ole
  • oleview
  • iviewers
Defines | Functions

tlbodl.cpp File Reference

#include "stdafx.h"
#include "iviewers.h"
#include "iview.h"
#include "util.h"
#include "iviewer.h"
#include "typelib.h"
#include "tree.h"
#include "tlbodl.h"

Go to the source code of this file.

Defines

#define | _WRITE_TAG 1
#define | MAX_NAMES 64
#define | WRITE(s) WriteLine( pstm, s, 0, FALSE )
#define | WRITE1(s) WriteLine( pstm, s, uiIndent, FALSE )
#define | WRITE2(s, ui) WriteLine( pstm, s, uiIndent+ui, FALSE )
#define | WRITEBSTR(p) WriteBSTR( pstm, p )
#define | WRITECR(s) WriteLine( pstm, s, 0, TRUE )
#define | WRITELINE(s) WriteLine( pstm, s, uiIndent, TRUE )
#define | WRITELINE2(s, ui) WriteLine( pstm, s, uiIndent+ui, TRUE )
#define | WRITERAW(p, len) WriteRaw( pstm, p, len )

Functions

IStream * | CreateMemoryStream ()
int | StringFromGUID2T (REFGUID rguid, LPTSTR lpszGUID, int nSize, int cbMax)
void | WriteBSTR (IStream *pstm, BSTR bstr)
void | WriteLine (IStream *pstm, const CString &rstr, UINT uiIndent, BOOL fNewLine)
void | WriteRaw (IStream *pstm, const void *pv, UINT cb)

Define Documentation

#define _WRITE_TAG 1

Definition at line 35 of file tlbodl.cpp.

#define MAX_NAMES 64

Definition at line 28 of file tlbodl.cpp.

#define WRITE ( s ) WriteLine( pstm, s, 0, FALSE )

Definition at line 261 of file tlbodl.cpp.

#define WRITE1 ( s ) WriteLine( pstm, s, uiIndent, FALSE )

Definition at line 264 of file tlbodl.cpp.

#define WRITE2 | ( | s,
 |  | ui |
 | ) |  | WriteLine( pstm, s, uiIndent+ui, FALSE )

Definition at line 265 of file tlbodl.cpp.

#define WRITEBSTR ( p ) WriteBSTR( pstm, p )

Definition at line 273 of file tlbodl.cpp.

#define WRITECR ( s ) WriteLine( pstm, s, 0, TRUE )

Definition at line 270 of file tlbodl.cpp.

#define WRITELINE ( s ) WriteLine( pstm, s, uiIndent, TRUE )

Definition at line 268 of file tlbodl.cpp.

#define WRITELINE2 | ( | s,
 |  | ui |
 | ) |  | WriteLine( pstm, s, uiIndent+ui, TRUE )

Definition at line 269 of file tlbodl.cpp.

#define WRITERAW | ( | p,
 |  | len |
 | ) |  | WriteRaw( pstm, p, len )

Definition at line 272 of file tlbodl.cpp.

Function Documentation

IStream * CreateMemoryStream ( )

Definition at line 2165 of file tlbodl.cpp.

{
  LPSTREAM lpStream = NULL;

  // Create a stream object on a memory block.
  HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE|GMEM_SHARE, 0);
  if (hGlobal != NULL)
  {
    HRESULT hr ;
    if (FAILED(hr = CreateStreamOnHGlobal(hGlobal, TRUE, &lpStream)))
    {
      TRACE0("CreateStreamOnHGlobal failed.\n");
      GlobalFree(hGlobal);
      AfxThrowOleException( hr ) ;
    }
  }
  else
  {
    #pragma warning (suppress: 6255)
    TRACE0("Failed to allocate memory for stream.\n");
    AfxThrowMemoryException() ;
  }

  return lpStream;
}

int StringFromGUID2T | ( | REFGUID | rguid,
 |  | LPTSTR | lpszGUID,
 |  | int | nSize,
 |  | int | cbMax
 | ) |  |

Definition at line 2191 of file tlbodl.cpp.

{
  OLECHAR* lpszOle = (OLECHAR*)_malloca(cbMax*sizeof(OLECHAR));
  int nCount = ::StringFromGUID2(rguid,lpszOle, cbMax*sizeof(OLECHAR));
  if (nCount == 0)
  {
    lpszGUID[0] = '\0';
    _freea(lpszOle);

    return 0; // buffer too small for the returned string
  }
  COLE2T lpszRes(lpszOle);
  _tcscpy_s(lpszGUID, nSize, lpszRes);
  _freea(lpszOle);
  return 0;
}

void WriteBSTR | ( | IStream * | pstm,
 |  | BSTR | bstr |
 | ) |  |  | [inline]

Definition at line 295 of file tlbodl.cpp.

{
  UINT len = ::SysStringLen(bstr) ;
  if (!len)
    return ;

  COLE2T lpszSource(bstr);
  TCHAR *pstrTemp = new TCHAR[((len + 1) * sizeof(TCHAR)) * 2];
  LPTSTR lpD, lpS = lpszSource ;

  lpD = pstrTemp;
  for (UINT n = 0 ; n < len ; n++)
  {
    #pragma warning (suppress: 6328) // unexpected type mismatch warning
    if (!isprint(*lpS) || (*lpS) == '\"' || (*lpS) == '\\')
    {
      // \"  \\ \a  \b  \f  \n  \r  \t  \v
      *lpD++ = '\\' ;
      switch(*lpS)
      {
      case '\"':
        *lpD++ = '\"' ;
      break ;
      case '\\':
        *lpD++ = '\\' ;
      break ;
      case '\a':
        *lpD++ = 'a' ;
      break ;
      case '\b':
        *lpD++ = 'b' ;
      break ;
      case '\f':
        *lpD++ = 'f' ;
      break ;
      case '\n':
        *lpD++ = 'n' ;
      break ;
      case '\r':
        *lpD++ = 'r' ;
      break ;
      case '\t':
        *lpD++ = 't' ;
      break ;
      case '\v':
        *lpD++ = 'v' ;
      break ;
      case '\0':
        *lpD++ = '0' ;
      break ;
      default:
        lpD += _stprintf_s( lpD, ((len + 1) * sizeof(TCHAR)) * 2, _T("x%02X"), (UINT)*lpS );
      break ;
      }
      lpS++;
    }
    else
      *lpD++ = *lpS++;
  }
  *lpD = '\0';
  #pragma warning(suppress: 6387) // pstrTemp will always be null terminated.
  WriteRaw( pstm, pstrTemp, lstrlen(pstrTemp)*sizeof(TCHAR) ) ;
  delete []pstrTemp ;
}

void WriteLine | ( | IStream * | pstm,
 |  | const CString & | rstr,
 |  | UINT | uiIndent,
 |  | BOOL | fNewLine |
 | ) |  |  | [inline]

Definition at line 282 of file tlbodl.cpp.

{
  while(uiIndent--)
  {
    WriteRaw( pstm, _T("    "), 4 * sizeof(TCHAR));
  }

  WriteRaw( pstm, rstr, rstr.GetLength() * sizeof(TCHAR)) ;

  if (fNewLine)
    WriteRaw(pstm, _T("\r\n"), 2 * sizeof(TCHAR)) ;
}

void WriteRaw | ( | IStream * | pstm,
 |  | const void * | pv,
 |  | UINT | cb |
 | ) |  |  | [inline]

Definition at line 275 of file tlbodl.cpp.

{
  HRESULT hr ;
  if (FAILED(hr = pstm->Write( pv, cb, NULL )))
    AfxThrowOleException( hr ) ;
}

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbodl.h File Reference

  • ole
  • oleview
  • iviewers
Classes

tlbodl.h File Reference

Go to the source code of this file.

Classes

class CTypeLibODLView
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbtree.cpp File Reference

  • ole
  • oleview
  • iviewers
Defines

tlbtree.cpp File Reference

#include "stdafx.h"
#include "iview.h"
#include "util.h"
#include "iviewers.h"
#include "iviewer.h"
#include "typelib.h"
#include "tlbtree.h"

Go to the source code of this file.

Defines

#define MAX_NAMES 256

Define Documentation

#define MAX_NAMES 256

Definition at line 26 of file tlbtree.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbtree.h File Reference

  • ole
  • oleview
  • iviewers
Classes | Defines

tlbtree.h File Reference

#include "tree.h"

Go to the source code of this file.

Classes

class | CTypeLibTreeView

Defines

#define | ID_TREEVIEW 42

Define Documentation

#define ID_TREEVIEW 42

Definition at line 20 of file tlbtree.h.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tree.cpp File Reference

  • ole
  • oleview
  • iviewers
Defines

tree.cpp File Reference

#include "stdafx.h"
#include "tree.h"
#include "util.h"

Go to the source code of this file.

Defines

#define MAX_NAMES 64

Define Documentation

#define MAX_NAMES 64

Definition at line 17 of file tree.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tree.h File Reference

  • ole
  • oleview
  • iviewers
Classes

tree.h File Reference

Go to the source code of this file.

Classes

class CTreeItem
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/typelib.cpp File Reference

  • ole
  • oleview
  • iviewers
Defines

typelib.cpp File Reference

#include "stdafx.h"
#include "iviewers.h"
#include "typelib.h"
#include "iview.h"
#include "iviewer.h"
#include "util.h"
#include "tlbtree.h"
#include "tlblist.h"
#include "tlbodl.h"

Go to the source code of this file.

Defines

#define LOAD_STRING_FROM_RESOURCE(s, r) if(s.LoadString(r) == FALSE) { AfxThrowResourceException(); }

Define Documentation

#define LOAD_STRING_FROM_RESOURCE | ( | s,
 |  | r |
 | ) |  | if(s.LoadString(r) == FALSE) { AfxThrowResourceException(); }

Definition at line 29 of file typelib.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/typelib.h File Reference

  • ole
  • oleview
  • iviewers
Classes | Variables

typelib.h File Reference

#include "iviewer.h"

Go to the source code of this file.

Classes

class | CTypeLibViewer
class | CTypeLibWnd

Variables

const int | UPDF_NOLISTVIEW = 0x0002
const int | UPDF_NOODLVIEW = 0x0004
const int | UPDF_NOTREEVIEW = 0x0001

Variable Documentation

const int UPDF_NOLISTVIEW = 0x0002

Definition at line 19 of file typelib.h.

const int UPDF_NOODLVIEW = 0x0004

Definition at line 20 of file typelib.h.

const int UPDF_NOTREEVIEW = 0x0001

Definition at line 18 of file typelib.h.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/util.cpp File Reference

  • ole
  • oleview
  • iviewers
Defines | Functions

util.cpp File Reference

#include "stdafx.h"
#include "util.h"
#include "shadow.h"
#include <ctype.h>

Go to the source code of this file.

Defines

#define | _COUNTOF(array) (sizeof(array)/sizeof(array[0]))
#define | MAKE_RANGE_ENTRY(scRange)
#define | MAKE_SCODE_ENTRY(sc) { sc, _T(#sc) }

Functions

LPCTSTR AFXAPI | _GetFacilityString (SCODE sc)
LPCTSTR AFXAPI | _GetFullScodeString (SCODE sc)
LPCTSTR AFXAPI | _GetScodeRangeString (SCODE sc)
LPCTSTR AFXAPI | _GetScodeString (SCODE sc)
LPCTSTR AFXAPI | _GetSeverityString (SCODE sc)
void | ErrorMessage (const CString &str, HRESULT hr)
LPTSTR | HRtoString (HRESULT hr)
LONG WINAPI | ParseOffNumber (LPTSTR FAR *lplp, LPINT lpConv)
CString | TYPEDESCtoString (ITypeInfo *pti, TYPEDESC *ptdesc)
CString | VTtoString (VARTYPE vt)

Define Documentation

#define _COUNTOF ( array ) (sizeof(array)/sizeof(array[0]))

Definition at line 54 of file util.cpp.

#define MAKE_RANGE_ENTRY ( scRange )
Value:
{ scRange##_FIRST, scRange##_LAST, \
      _T(#scRange) _T("_FIRST...") _T(#scRange) _T("_LAST") }
#define MAKE_SCODE_ENTRY ( sc ) { sc, _T(#sc) }

Function Documentation

LPCTSTR AFXAPI _GetFacilityString ( SCODE sc )

Definition at line 396 of file util.cpp.

{
  static const TCHAR* rgszFACILITY[] =
  {
    _T("FACILITY_NULL"),
    _T("FACILITY_RPC"),
    _T("FACILITY_DISPATCH"),
    _T("FACILITY_STORAGE"),
    _T("FACILITY_ITF"),
    _T("FACILITY_0x05"),
    _T("FACILITY_0x06"),
    _T("FACILITY_WIN32"),
    _T("FACILITY_WINDOWS"),
  };
  if (SCODE_FACILITY(sc) >= _COUNTOF(rgszFACILITY) || SCODE_FACILITY(sc) < 0)
    return _T("<Unknown Facility>");

  return rgszFACILITY[SCODE_FACILITY(sc)];
}

LPCTSTR AFXAPI _GetFullScodeString ( SCODE sc )

Definition at line 416 of file util.cpp.

{
  static TCHAR szBuf[128];
  LPCTSTR lpsz;
  if ((lpsz = _GetScodeString(sc)) != NULL)
  {
    // found exact match
    _stprintf_s(szBuf, 128, _T("%s ($%08lX)"), lpsz, sc);
  }
  else if ((lpsz = _GetScodeRangeString(sc)) != NULL)
  {
    // found suitable range
    _stprintf_s(szBuf, 128, _T("range: %s ($%08lX)"), lpsz, sc);
  }
  else
  {
    // not found at all -- split it up into its parts
    _stprintf_s(szBuf, 128, _T("severity: %s, facility: %s ($%08lX)"),
      _GetSeverityString(sc), _GetFacilityString(sc), sc);
  }
  return szBuf;
}

LPCTSTR AFXAPI _GetScodeRangeString ( SCODE sc )

Definition at line 328 of file util.cpp.

{
  struct RANGE_ENTRY
  {
    SCODE scFirst;
    SCODE scLast;
    LPCTSTR lpszName;
  };
  #define MAKE_RANGE_ENTRY(scRange) \
    { scRange##_FIRST, scRange##_LAST, \
      _T(#scRange) _T("_FIRST...") _T(#scRange) _T("_LAST") }

  static const RANGE_ENTRY scRangeTable[] =
  {
    MAKE_RANGE_ENTRY(CACHE_E),
    MAKE_RANGE_ENTRY(CACHE_S),
    MAKE_RANGE_ENTRY(CLASSFACTORY_E),
    MAKE_RANGE_ENTRY(CLASSFACTORY_S),
    MAKE_RANGE_ENTRY(CLIENTSITE_E),
    MAKE_RANGE_ENTRY(CLIENTSITE_S),
    MAKE_RANGE_ENTRY(CLIPBRD_E),
    MAKE_RANGE_ENTRY(CLIPBRD_S),
    MAKE_RANGE_ENTRY(CONVERT10_E),
    MAKE_RANGE_ENTRY(CONVERT10_S),
    MAKE_RANGE_ENTRY(CO_E),
    MAKE_RANGE_ENTRY(CO_S),
    MAKE_RANGE_ENTRY(DATA_E),
    MAKE_RANGE_ENTRY(DATA_S),
    MAKE_RANGE_ENTRY(DRAGDROP_E),
    MAKE_RANGE_ENTRY(DRAGDROP_S),
    MAKE_RANGE_ENTRY(ENUM_E),
    MAKE_RANGE_ENTRY(ENUM_S),
    MAKE_RANGE_ENTRY(INPLACE_E),
    MAKE_RANGE_ENTRY(INPLACE_S),
    MAKE_RANGE_ENTRY(MARSHAL_E),
    MAKE_RANGE_ENTRY(MARSHAL_S),
    MAKE_RANGE_ENTRY(MK_E),
    MAKE_RANGE_ENTRY(MK_S),
    MAKE_RANGE_ENTRY(OLEOBJ_E),
    MAKE_RANGE_ENTRY(OLEOBJ_S),
    MAKE_RANGE_ENTRY(OLE_E),
    MAKE_RANGE_ENTRY(OLE_S),
    MAKE_RANGE_ENTRY(REGDB_E),
    MAKE_RANGE_ENTRY(REGDB_S),
    MAKE_RANGE_ENTRY(VIEW_E),
    MAKE_RANGE_ENTRY(VIEW_S),
  };
  #undef MAKE_RANGE_ENTRY

  // look for it in the table
  for (int i = 0; i < _COUNTOF(scRangeTable); i++)
  {
    if (sc >= scRangeTable[i].scFirst && sc <= scRangeTable[i].scLast)
      return scRangeTable[i].lpszName;
  }
  return NULL;    // not found
}

LPCTSTR AFXAPI _GetScodeString ( SCODE sc )

Definition at line 56 of file util.cpp.

{
  struct SCODE_ENTRY
  {
    SCODE sc;
    LPCTSTR lpszName;
  };
  #define MAKE_SCODE_ENTRY(sc)    { sc, _T(#sc) }
  static const SCODE_ENTRY scNameTable[] =
  {
    MAKE_SCODE_ENTRY(S_OK),
    MAKE_SCODE_ENTRY(S_FALSE),

    MAKE_SCODE_ENTRY(CACHE_S_FORMATETC_NOTSUPPORTED),
    MAKE_SCODE_ENTRY(CACHE_S_SAMECACHE),
    MAKE_SCODE_ENTRY(CACHE_S_SOMECACHES_NOTUPDATED),
    MAKE_SCODE_ENTRY(CONVERT10_S_NO_PRESENTATION),
    MAKE_SCODE_ENTRY(DATA_S_SAMEFORMATETC),
    MAKE_SCODE_ENTRY(DRAGDROP_S_CANCEL),
    MAKE_SCODE_ENTRY(DRAGDROP_S_DROP),
    MAKE_SCODE_ENTRY(DRAGDROP_S_USEDEFAULTCURSORS),
    MAKE_SCODE_ENTRY(INPLACE_S_TRUNCATED),
    MAKE_SCODE_ENTRY(MK_S_HIM),
    MAKE_SCODE_ENTRY(MK_S_ME),
    MAKE_SCODE_ENTRY(MK_S_MONIKERALREADYREGISTERED),
    MAKE_SCODE_ENTRY(MK_S_REDUCED_TO_SELF),
    MAKE_SCODE_ENTRY(MK_S_US),
    MAKE_SCODE_ENTRY(OLE_S_MAC_CLIPFORMAT),
    MAKE_SCODE_ENTRY(OLE_S_STATIC),
    MAKE_SCODE_ENTRY(OLE_S_USEREG),
    MAKE_SCODE_ENTRY(OLEOBJ_S_CANNOT_DOVERB_NOW),
    MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDHWND),
    MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDVERB),
    MAKE_SCODE_ENTRY(OLEOBJ_S_LAST),
    MAKE_SCODE_ENTRY(STG_S_CONVERTED),
    MAKE_SCODE_ENTRY(VIEW_S_ALREADY_FROZEN),

    MAKE_SCODE_ENTRY(E_UNEXPECTED),
    MAKE_SCODE_ENTRY(E_NOTIMPL),
    MAKE_SCODE_ENTRY(E_OUTOFMEMORY),
    MAKE_SCODE_ENTRY(E_INVALIDARG),
    MAKE_SCODE_ENTRY(E_NOINTERFACE),
    MAKE_SCODE_ENTRY(E_POINTER),
    MAKE_SCODE_ENTRY(E_HANDLE),
    MAKE_SCODE_ENTRY(E_ABORT),
    MAKE_SCODE_ENTRY(E_FAIL),
    MAKE_SCODE_ENTRY(E_ACCESSDENIED),

    MAKE_SCODE_ENTRY(CACHE_E_NOCACHE_UPDATED),
    MAKE_SCODE_ENTRY(CLASS_E_CLASSNOTAVAILABLE),
    MAKE_SCODE_ENTRY(CLASS_E_NOAGGREGATION),
    MAKE_SCODE_ENTRY(CLIPBRD_E_BAD_DATA),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_CLOSE),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_EMPTY),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_OPEN),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_SET),
    MAKE_SCODE_ENTRY(CO_E_ALREADYINITIALIZED),
    MAKE_SCODE_ENTRY(CO_E_APPDIDNTREG),
    MAKE_SCODE_ENTRY(CO_E_APPNOTFOUND),
    MAKE_SCODE_ENTRY(CO_E_APPSINGLEUSE),
    MAKE_SCODE_ENTRY(CO_E_BAD_PATH),
    MAKE_SCODE_ENTRY(CO_E_CANTDETERMINECLASS),
    MAKE_SCODE_ENTRY(CO_E_CLASS_CREATE_FAILED),
    MAKE_SCODE_ENTRY(CO_E_CLASSSTRING),
    MAKE_SCODE_ENTRY(CO_E_DLLNOTFOUND),
    MAKE_SCODE_ENTRY(CO_E_ERRORINAPP),
    MAKE_SCODE_ENTRY(CO_E_ERRORINDLL),
    MAKE_SCODE_ENTRY(CO_E_IIDSTRING),
    MAKE_SCODE_ENTRY(CO_E_NOTINITIALIZED),
    MAKE_SCODE_ENTRY(CO_E_OBJISREG),
    MAKE_SCODE_ENTRY(CO_E_OBJNOTCONNECTED),
    MAKE_SCODE_ENTRY(CO_E_OBJNOTREG),
    MAKE_SCODE_ENTRY(CO_E_OBJSRV_RPC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SCM_ERROR),
    MAKE_SCODE_ENTRY(CO_E_SCM_RPC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SERVER_EXEC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SERVER_STOPPING),
    MAKE_SCODE_ENTRY(CO_E_WRONGOSFORAPP),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_BITMAP_TO_DIB),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_FMT),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_GET),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_PUT),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_DIB_TO_BITMAP),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_FMT),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_NO_STD_STREAM),
    MAKE_SCODE_ENTRY(DISP_E_ARRAYISLOCKED),
    MAKE_SCODE_ENTRY(DISP_E_BADCALLEE),
    MAKE_SCODE_ENTRY(DISP_E_BADINDEX),
    MAKE_SCODE_ENTRY(DISP_E_BADPARAMCOUNT),
    MAKE_SCODE_ENTRY(DISP_E_BADVARTYPE),
    MAKE_SCODE_ENTRY(DISP_E_EXCEPTION),
    MAKE_SCODE_ENTRY(DISP_E_MEMBERNOTFOUND),
    MAKE_SCODE_ENTRY(DISP_E_NONAMEDARGS),
    MAKE_SCODE_ENTRY(DISP_E_NOTACOLLECTION),
    MAKE_SCODE_ENTRY(DISP_E_OVERFLOW),
    MAKE_SCODE_ENTRY(DISP_E_PARAMNOTFOUND),
    MAKE_SCODE_ENTRY(DISP_E_PARAMNOTOPTIONAL),
    MAKE_SCODE_ENTRY(DISP_E_TYPEMISMATCH),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNINTERFACE),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNLCID),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNNAME),
    MAKE_SCODE_ENTRY(DRAGDROP_E_ALREADYREGISTERED),
    MAKE_SCODE_ENTRY(DRAGDROP_E_INVALIDHWND),
    MAKE_SCODE_ENTRY(DRAGDROP_E_NOTREGISTERED),
    MAKE_SCODE_ENTRY(DV_E_CLIPFORMAT),
    MAKE_SCODE_ENTRY(DV_E_DVASPECT),
    MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE),
    MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE_SIZE),
    MAKE_SCODE_ENTRY(DV_E_FORMATETC),
    MAKE_SCODE_ENTRY(DV_E_LINDEX),
    MAKE_SCODE_ENTRY(DV_E_NOIVIEWOBJECT),
    MAKE_SCODE_ENTRY(DV_E_STATDATA),
    MAKE_SCODE_ENTRY(DV_E_STGMEDIUM),
    MAKE_SCODE_ENTRY(DV_E_TYMED),
    MAKE_SCODE_ENTRY(INPLACE_E_NOTOOLSPACE),
    MAKE_SCODE_ENTRY(INPLACE_E_NOTUNDOABLE),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_LINK),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_ROOT),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_SIZE),
    MAKE_SCODE_ENTRY(MK_E_CANTOPENFILE),
    MAKE_SCODE_ENTRY(MK_E_CONNECTMANUALLY),
    MAKE_SCODE_ENTRY(MK_E_ENUMERATION_FAILED),
    MAKE_SCODE_ENTRY(MK_E_EXCEEDEDDEADLINE),
    MAKE_SCODE_ENTRY(MK_E_INTERMEDIATEINTERFACENOTSUPPORTED),
    MAKE_SCODE_ENTRY(MK_E_INVALIDEXTENSION),
    MAKE_SCODE_ENTRY(MK_E_MUSTBOTHERUSER),
    MAKE_SCODE_ENTRY(MK_E_NEEDGENERIC),
    MAKE_SCODE_ENTRY(MK_E_NO_NORMALIZED),
    MAKE_SCODE_ENTRY(MK_E_NOINVERSE),
    MAKE_SCODE_ENTRY(MK_E_NOOBJECT),
    MAKE_SCODE_ENTRY(MK_E_NOPREFIX),
    MAKE_SCODE_ENTRY(MK_E_NOSTORAGE),
    MAKE_SCODE_ENTRY(MK_E_NOTBINDABLE),
    MAKE_SCODE_ENTRY(MK_E_NOTBOUND),
    MAKE_SCODE_ENTRY(MK_E_SYNTAX),
    MAKE_SCODE_ENTRY(MK_E_UNAVAILABLE),
    MAKE_SCODE_ENTRY(OLE_E_ADVF),
    MAKE_SCODE_ENTRY(OLE_E_ADVISENOTSUPPORTED),
    MAKE_SCODE_ENTRY(OLE_E_BLANK),
    MAKE_SCODE_ENTRY(OLE_E_CANT_BINDTOSOURCE),
    MAKE_SCODE_ENTRY(OLE_E_CANT_GETMONIKER),
    MAKE_SCODE_ENTRY(OLE_E_CANTCONVERT),
    MAKE_SCODE_ENTRY(OLE_E_CLASSDIFF),
    MAKE_SCODE_ENTRY(OLE_E_ENUM_NOMORE),
    MAKE_SCODE_ENTRY(OLE_E_INVALIDHWND),
    MAKE_SCODE_ENTRY(OLE_E_INVALIDRECT),
    MAKE_SCODE_ENTRY(OLE_E_NOCACHE),
    MAKE_SCODE_ENTRY(OLE_E_NOCONNECTION),
    MAKE_SCODE_ENTRY(OLE_E_NOSTORAGE),
    MAKE_SCODE_ENTRY(OLE_E_NOT_INPLACEACTIVE),
    MAKE_SCODE_ENTRY(OLE_E_NOTRUNNING),
    MAKE_SCODE_ENTRY(OLE_E_OLEVERB),
    MAKE_SCODE_ENTRY(OLE_E_PROMPTSAVECANCELLED),
    MAKE_SCODE_ENTRY(OLE_E_STATIC),
    MAKE_SCODE_ENTRY(OLE_E_WRONGCOMPOBJ),
    MAKE_SCODE_ENTRY(OLEOBJ_E_INVALIDVERB),
    MAKE_SCODE_ENTRY(OLEOBJ_E_NOVERBS),
    MAKE_SCODE_ENTRY(REGDB_E_CLASSNOTREG),
    MAKE_SCODE_ENTRY(REGDB_E_IIDNOTREG),
    MAKE_SCODE_ENTRY(REGDB_E_INVALIDVALUE),
    MAKE_SCODE_ENTRY(REGDB_E_KEYMISSING),
    MAKE_SCODE_ENTRY(REGDB_E_READREGDB),
    MAKE_SCODE_ENTRY(REGDB_E_WRITEREGDB),
    MAKE_SCODE_ENTRY(RPC_E_ATTEMPTED_MULTITHREAD),
    MAKE_SCODE_ENTRY(RPC_E_CALL_CANCELED),
    MAKE_SCODE_ENTRY(RPC_E_CALL_REJECTED),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_AGAIN),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INASYNCCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INEXTERNALCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_ININPUTSYNCCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTPOST_INSENDCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTTRANSMIT_CALL),
    MAKE_SCODE_ENTRY(RPC_E_CHANGED_MODE),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTUNMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_DIED),
    MAKE_SCODE_ENTRY(RPC_E_CONNECTION_TERMINATED),
    MAKE_SCODE_ENTRY(RPC_E_DISCONNECTED),
    MAKE_SCODE_ENTRY(RPC_E_FAULT),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_CALLDATA),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_DATA),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_DATAPACKET),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_PARAMETER),
    MAKE_SCODE_ENTRY(RPC_E_INVALIDMETHOD),
    MAKE_SCODE_ENTRY(RPC_E_NOT_REGISTERED),
    MAKE_SCODE_ENTRY(RPC_E_OUT_OF_RESOURCES),
    MAKE_SCODE_ENTRY(RPC_E_RETRY),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTUNMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED_DNE),
    MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_REJECTED),
    MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_RETRYLATER),
    MAKE_SCODE_ENTRY(RPC_E_SERVERFAULT),
    MAKE_SCODE_ENTRY(RPC_E_SYS_CALL_FAILED),
    MAKE_SCODE_ENTRY(RPC_E_THREAD_NOT_INIT),
    MAKE_SCODE_ENTRY(RPC_E_UNEXPECTED),
    MAKE_SCODE_ENTRY(RPC_E_WRONG_THREAD),
    MAKE_SCODE_ENTRY(STG_E_ABNORMALAPIEXIT),
    MAKE_SCODE_ENTRY(STG_E_ACCESSDENIED),
    MAKE_SCODE_ENTRY(STG_E_CANTSAVE),
    MAKE_SCODE_ENTRY(STG_E_DISKISWRITEPROTECTED),
    MAKE_SCODE_ENTRY(STG_E_EXTANTMARSHALLINGS),
    MAKE_SCODE_ENTRY(STG_E_FILEALREADYEXISTS),
    MAKE_SCODE_ENTRY(STG_E_FILENOTFOUND),
    MAKE_SCODE_ENTRY(STG_E_INSUFFICIENTMEMORY),
    MAKE_SCODE_ENTRY(STG_E_INUSE),
    MAKE_SCODE_ENTRY(STG_E_INVALIDFLAG),
    MAKE_SCODE_ENTRY(STG_E_INVALIDFUNCTION),
    MAKE_SCODE_ENTRY(STG_E_INVALIDHANDLE),
    MAKE_SCODE_ENTRY(STG_E_INVALIDHEADER),
    MAKE_SCODE_ENTRY(STG_E_INVALIDNAME),
    MAKE_SCODE_ENTRY(STG_E_INVALIDPARAMETER),
    MAKE_SCODE_ENTRY(STG_E_INVALIDPOINTER),
    MAKE_SCODE_ENTRY(STG_E_LOCKVIOLATION),
    MAKE_SCODE_ENTRY(STG_E_MEDIUMFULL),
    MAKE_SCODE_ENTRY(STG_E_NOMOREFILES),
    MAKE_SCODE_ENTRY(STG_E_NOTCURRENT),
    MAKE_SCODE_ENTRY(STG_E_NOTFILEBASEDSTORAGE),
    MAKE_SCODE_ENTRY(STG_E_OLDDLL),
    MAKE_SCODE_ENTRY(STG_E_OLDFORMAT),
    MAKE_SCODE_ENTRY(STG_E_PATHNOTFOUND),
    MAKE_SCODE_ENTRY(STG_E_READFAULT),
    MAKE_SCODE_ENTRY(STG_E_REVERTED),
    MAKE_SCODE_ENTRY(STG_E_SEEKERROR),
    MAKE_SCODE_ENTRY(STG_E_SHAREREQUIRED),
    MAKE_SCODE_ENTRY(STG_E_SHAREVIOLATION),
    MAKE_SCODE_ENTRY(STG_E_TOOMANYOPENFILES),
    MAKE_SCODE_ENTRY(STG_E_UNIMPLEMENTEDFUNCTION),
    MAKE_SCODE_ENTRY(STG_E_UNKNOWN),
    MAKE_SCODE_ENTRY(STG_E_WRITEFAULT),
    MAKE_SCODE_ENTRY(TYPE_E_AMBIGUOUSNAME),
    MAKE_SCODE_ENTRY(TYPE_E_BADMODULEKIND),
    MAKE_SCODE_ENTRY(TYPE_E_BUFFERTOOSMALL),
    MAKE_SCODE_ENTRY(TYPE_E_CANTCREATETMPFILE),
    MAKE_SCODE_ENTRY(TYPE_E_CANTLOADLIBRARY),
    MAKE_SCODE_ENTRY(TYPE_E_CIRCULARTYPE),
    MAKE_SCODE_ENTRY(TYPE_E_DLLFUNCTIONNOTFOUND),
    MAKE_SCODE_ENTRY(TYPE_E_DUPLICATEID),
    MAKE_SCODE_ENTRY(TYPE_E_ELEMENTNOTFOUND),
    MAKE_SCODE_ENTRY(TYPE_E_INCONSISTENTPROPFUNCS),
    MAKE_SCODE_ENTRY(TYPE_E_INVALIDSTATE),
    MAKE_SCODE_ENTRY(TYPE_E_INVDATAREAD),
    MAKE_SCODE_ENTRY(TYPE_E_IOERROR),
    MAKE_SCODE_ENTRY(TYPE_E_LIBNOTREGISTERED),
    MAKE_SCODE_ENTRY(TYPE_E_NAMECONFLICT),
    MAKE_SCODE_ENTRY(TYPE_E_OUTOFBOUNDS),
    MAKE_SCODE_ENTRY(TYPE_E_QUALIFIEDNAMEDISALLOWED),
    MAKE_SCODE_ENTRY(TYPE_E_REGISTRYACCESS),
    MAKE_SCODE_ENTRY(TYPE_E_SIZETOOBIG),
    MAKE_SCODE_ENTRY(TYPE_E_TYPEMISMATCH),
    MAKE_SCODE_ENTRY(TYPE_E_UNDEFINEDTYPE),
    MAKE_SCODE_ENTRY(TYPE_E_UNKNOWNLCID),
    MAKE_SCODE_ENTRY(TYPE_E_UNSUPFORMAT),
    MAKE_SCODE_ENTRY(TYPE_E_WRONGTYPEKIND),
    MAKE_SCODE_ENTRY(VIEW_E_DRAW),
  };
  #undef MAKE_SCODE_ENTRY

  // look for it in the table
  for (int i = 0; i < _COUNTOF(scNameTable); i++)
  {
    if (sc == scNameTable[i].sc)
      return scNameTable[i].lpszName;
  }

  static TCHAR szError[32] ;
  _stprintf_s( szError, 32, _T("%#08.8x"), sc ) ;

  return szError ;    // not found
}

LPCTSTR AFXAPI _GetSeverityString ( SCODE sc )

Definition at line 386 of file util.cpp.

{
  static const TCHAR* rgszSEVERITY[] =
  {
    _T("SEVERITY_SUCCESS"),
    _T("SEVERITY_ERROR"),
  };
  return rgszSEVERITY[SCODE_SEVERITY(sc)];
}

void ErrorMessage | ( | const CString & | str,
 |  | HRESULT | hr
 | ) |  |

Definition at line 23 of file util.cpp.

{
  LPVOID lpMessageBuffer = NULL ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      GetScode(hr),
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    CString str2 ;
    str2.Format( _T("\n%s %s"), (LPCTSTR)lpMessageBuffer, (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    LocalFree(lpMessageBuffer) ;
    AfxMessageBox( str2 ) ;
  }
  else
  {
    CString str2 ;
    str2.Format( _T("\n<No system message defined> %s"), (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    AfxMessageBox( str2 ) ;
  }
}

LPTSTR HRtoString ( HRESULT hr )

Definition at line 440 of file util.cpp.

{
  SCODE   sc ;
  sc = GetScode( hr ) ;

#ifdef FORMATMSG
  LPVOID lpMessageBuffer ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      sc,
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    wsprintf( sz, _T( "%s (0x%lx)" ), (LPTSTR)lpMessageBuffer, sc);
    LocalFree(lpMessageBuffer) ;
  }
  else
  {
    wsprintf( sz, _T( "Unknown Scode (0x%lx)" ), sc);
  }

#endif // !FORMATMSG

  return (LPTSTR)_GetFullScodeString(sc) ;
}

LONG WINAPI ParseOffNumber | ( | LPTSTR FAR * | lplp,
 |  | LPINT | lpConv
 | ) |  |

Definition at line 475 of file util.cpp.

{
  LPTSTR lp = *lplp;
  LONG  lValue=0;
  int   sign=1;
  #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
  while( isspace(*lp) )
    lp++;
  if( *lp=='-' )
  {
    sign = -1;
    lp++;
  }
  if (*lp=='\0')
  {
    *lpConv = FALSE;
    return 0L;
  }

  // Is it a decimal number
  #ifdef UNICODE
  if( _wcsnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  #ifdef WIN32
  if( _strnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  if( _fstrnicmp( lp, (LPTSTR)_T("0x"),2) )
  #endif
  #endif
  {
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isdigit(*lp) )
    {
      lValue *= 10;
      lValue += (*lp - (TCHAR)'0');
      lp++;
    }
  }
  else
  {
    lp+=2;
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isxdigit(*lp) )
    {
      lValue *= 16;
      #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
      if( isdigit(*lp) )
        lValue += (*lp - (TCHAR)'0');
      else
        lValue += (toupper(*lp) - (TCHAR)'A' + 10);
      lp++;
    }
  }
  #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
  while( isspace(*lp) )
    lp++;

  lValue *= (long)sign;

  if (*lp==(TCHAR)',')
  {
    lp++;
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isspace(*lp) )
      lp++;
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)TRUE;
  }
  else
  {
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)(*lp=='\0');
  }
  return lValue;

} //*** ParseOffNumber

CString TYPEDESCtoString | ( | ITypeInfo * | pti,
 |  | TYPEDESC * | ptdesc
 | ) |  |

Definition at line 642 of file util.cpp.

{
  CString str ;

  if (ptdesc->vt == VT_PTR)
  {
    // ptdesc->lptdesc points to a TYPEDESC that specifies the thing pointed to

    str = TYPEDESCtoString( pti, ptdesc->lptdesc ) ;
    str += "*" ;
    return str.AllocSysString() ;
  }

  if ((ptdesc->vt & 0x0FFF) == VT_CARRAY)
  {
    // ptdesc->lpadesc points to an ARRAYDESC
    str = TYPEDESCtoString( pti, &ptdesc->lpadesc->tdescElem ) ;

    // Allocate cDims * lstrlen("[123456]")
    CString strTemp ;
    for (USHORT n = 0 ; n < ptdesc->lpadesc->cDims ; n++)
    {
      strTemp.Format( _T("[%d]"), ptdesc->lpadesc->rgbounds[n].cElements ) ;
      str += strTemp ;
    }
    return str ;
  }

  if ((ptdesc->vt & 0x0FFF) == VT_SAFEARRAY)
  {
    str = "SAFEARRAY(" + TYPEDESCtoString( pti, ptdesc->lptdesc ) + ")" ;
    return str ;
  }

  if (ptdesc->vt == VT_USERDEFINED)
  {
    // Use ptdesc->hreftype and pti->GetRefTypeInfo
    //
    ASSERT(pti) ;
    ITypeInfo* ptiRefType = NULL ;
    HRESULT hr = pti->GetRefTypeInfo( ptdesc->hreftype, &ptiRefType ) ;
    if (SUCCEEDED(hr))
    {
      BSTR            bstrName = NULL ;
      BSTR            bstrDoc = NULL ;
      BSTR            bstrHelp = NULL ;
      DWORD           dwHelpID ;
      hr = ptiRefType->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
      if (FAILED(hr))
      {
        #ifdef _DEBUG
        ErrorMessage(_T("ITypeInfo::GetDocumentation() failed"), hr ) ;
        #endif
        return _T("ITypeInfo::GetDocumentation() failed in TYPEDESCToString") ;
      }

      str = bstrName ;

      SysFreeString(bstrName) ;
      SysFreeString( bstrDoc ) ;
      SysFreeString( bstrHelp ) ;

      ptiRefType->Release() ;
    }
    else
    {
      #ifdef _DEBUG
      ErrorMessage( _T("GetRefTypeInfo failed in TYPEDESCToString"), hr ) ;
      #endif
      return _T("<GetRefTypeInfo failed>") ;
    }

    return str ;
  }
  return VTtoString( ptdesc->vt );
}

CString VTtoString ( VARTYPE vt )

Definition at line 631 of file util.cpp.

{
  CString str ;
  vt &= ~0xF000 ;
  if (vt <= VT_CLSID)
     str = g_rgszVT[vt]  ;
  else
     str = "BAD VARTYPE" ;

  return str ;
}

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/util.h File Reference

  • ole
  • oleview
  • iviewers
Functions

util.h File Reference

Go to the source code of this file.

Functions

LPCTSTR AFXAPI | _GetScodeString (SCODE sc)
void | ErrorMessage (const CString &str, HRESULT hr)
LPTSTR | HRtoString (HRESULT hr)
LONG WINAPI | ParseOffNumber (LPTSTR FAR *lplp, LPINT lpConv)
CString | TYPEDESCtoString (ITypeInfo *pti, TYPEDESC *ptdesc)
CString | VTtoString (VARTYPE vt)

Function Documentation

LPCTSTR AFXAPI _GetScodeString ( SCODE sc )

Definition at line 56 of file util.cpp.

{
  struct SCODE_ENTRY
  {
    SCODE sc;
    LPCTSTR lpszName;
  };
  #define MAKE_SCODE_ENTRY(sc)    { sc, _T(#sc) }
  static const SCODE_ENTRY scNameTable[] =
  {
    MAKE_SCODE_ENTRY(S_OK),
    MAKE_SCODE_ENTRY(S_FALSE),

    MAKE_SCODE_ENTRY(CACHE_S_FORMATETC_NOTSUPPORTED),
    MAKE_SCODE_ENTRY(CACHE_S_SAMECACHE),
    MAKE_SCODE_ENTRY(CACHE_S_SOMECACHES_NOTUPDATED),
    MAKE_SCODE_ENTRY(CONVERT10_S_NO_PRESENTATION),
    MAKE_SCODE_ENTRY(DATA_S_SAMEFORMATETC),
    MAKE_SCODE_ENTRY(DRAGDROP_S_CANCEL),
    MAKE_SCODE_ENTRY(DRAGDROP_S_DROP),
    MAKE_SCODE_ENTRY(DRAGDROP_S_USEDEFAULTCURSORS),
    MAKE_SCODE_ENTRY(INPLACE_S_TRUNCATED),
    MAKE_SCODE_ENTRY(MK_S_HIM),
    MAKE_SCODE_ENTRY(MK_S_ME),
    MAKE_SCODE_ENTRY(MK_S_MONIKERALREADYREGISTERED),
    MAKE_SCODE_ENTRY(MK_S_REDUCED_TO_SELF),
    MAKE_SCODE_ENTRY(MK_S_US),
    MAKE_SCODE_ENTRY(OLE_S_MAC_CLIPFORMAT),
    MAKE_SCODE_ENTRY(OLE_S_STATIC),
    MAKE_SCODE_ENTRY(OLE_S_USEREG),
    MAKE_SCODE_ENTRY(OLEOBJ_S_CANNOT_DOVERB_NOW),
    MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDHWND),
    MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDVERB),
    MAKE_SCODE_ENTRY(OLEOBJ_S_LAST),
    MAKE_SCODE_ENTRY(STG_S_CONVERTED),
    MAKE_SCODE_ENTRY(VIEW_S_ALREADY_FROZEN),

    MAKE_SCODE_ENTRY(E_UNEXPECTED),
    MAKE_SCODE_ENTRY(E_NOTIMPL),
    MAKE_SCODE_ENTRY(E_OUTOFMEMORY),
    MAKE_SCODE_ENTRY(E_INVALIDARG),
    MAKE_SCODE_ENTRY(E_NOINTERFACE),
    MAKE_SCODE_ENTRY(E_POINTER),
    MAKE_SCODE_ENTRY(E_HANDLE),
    MAKE_SCODE_ENTRY(E_ABORT),
    MAKE_SCODE_ENTRY(E_FAIL),
    MAKE_SCODE_ENTRY(E_ACCESSDENIED),

    MAKE_SCODE_ENTRY(CACHE_E_NOCACHE_UPDATED),
    MAKE_SCODE_ENTRY(CLASS_E_CLASSNOTAVAILABLE),
    MAKE_SCODE_ENTRY(CLASS_E_NOAGGREGATION),
    MAKE_SCODE_ENTRY(CLIPBRD_E_BAD_DATA),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_CLOSE),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_EMPTY),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_OPEN),
    MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_SET),
    MAKE_SCODE_ENTRY(CO_E_ALREADYINITIALIZED),
    MAKE_SCODE_ENTRY(CO_E_APPDIDNTREG),
    MAKE_SCODE_ENTRY(CO_E_APPNOTFOUND),
    MAKE_SCODE_ENTRY(CO_E_APPSINGLEUSE),
    MAKE_SCODE_ENTRY(CO_E_BAD_PATH),
    MAKE_SCODE_ENTRY(CO_E_CANTDETERMINECLASS),
    MAKE_SCODE_ENTRY(CO_E_CLASS_CREATE_FAILED),
    MAKE_SCODE_ENTRY(CO_E_CLASSSTRING),
    MAKE_SCODE_ENTRY(CO_E_DLLNOTFOUND),
    MAKE_SCODE_ENTRY(CO_E_ERRORINAPP),
    MAKE_SCODE_ENTRY(CO_E_ERRORINDLL),
    MAKE_SCODE_ENTRY(CO_E_IIDSTRING),
    MAKE_SCODE_ENTRY(CO_E_NOTINITIALIZED),
    MAKE_SCODE_ENTRY(CO_E_OBJISREG),
    MAKE_SCODE_ENTRY(CO_E_OBJNOTCONNECTED),
    MAKE_SCODE_ENTRY(CO_E_OBJNOTREG),
    MAKE_SCODE_ENTRY(CO_E_OBJSRV_RPC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SCM_ERROR),
    MAKE_SCODE_ENTRY(CO_E_SCM_RPC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SERVER_EXEC_FAILURE),
    MAKE_SCODE_ENTRY(CO_E_SERVER_STOPPING),
    MAKE_SCODE_ENTRY(CO_E_WRONGOSFORAPP),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_BITMAP_TO_DIB),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_FMT),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_GET),
    MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_PUT),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_DIB_TO_BITMAP),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_FMT),
    MAKE_SCODE_ENTRY(CONVERT10_E_STG_NO_STD_STREAM),
    MAKE_SCODE_ENTRY(DISP_E_ARRAYISLOCKED),
    MAKE_SCODE_ENTRY(DISP_E_BADCALLEE),
    MAKE_SCODE_ENTRY(DISP_E_BADINDEX),
    MAKE_SCODE_ENTRY(DISP_E_BADPARAMCOUNT),
    MAKE_SCODE_ENTRY(DISP_E_BADVARTYPE),
    MAKE_SCODE_ENTRY(DISP_E_EXCEPTION),
    MAKE_SCODE_ENTRY(DISP_E_MEMBERNOTFOUND),
    MAKE_SCODE_ENTRY(DISP_E_NONAMEDARGS),
    MAKE_SCODE_ENTRY(DISP_E_NOTACOLLECTION),
    MAKE_SCODE_ENTRY(DISP_E_OVERFLOW),
    MAKE_SCODE_ENTRY(DISP_E_PARAMNOTFOUND),
    MAKE_SCODE_ENTRY(DISP_E_PARAMNOTOPTIONAL),
    MAKE_SCODE_ENTRY(DISP_E_TYPEMISMATCH),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNINTERFACE),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNLCID),
    MAKE_SCODE_ENTRY(DISP_E_UNKNOWNNAME),
    MAKE_SCODE_ENTRY(DRAGDROP_E_ALREADYREGISTERED),
    MAKE_SCODE_ENTRY(DRAGDROP_E_INVALIDHWND),
    MAKE_SCODE_ENTRY(DRAGDROP_E_NOTREGISTERED),
    MAKE_SCODE_ENTRY(DV_E_CLIPFORMAT),
    MAKE_SCODE_ENTRY(DV_E_DVASPECT),
    MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE),
    MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE_SIZE),
    MAKE_SCODE_ENTRY(DV_E_FORMATETC),
    MAKE_SCODE_ENTRY(DV_E_LINDEX),
    MAKE_SCODE_ENTRY(DV_E_NOIVIEWOBJECT),
    MAKE_SCODE_ENTRY(DV_E_STATDATA),
    MAKE_SCODE_ENTRY(DV_E_STGMEDIUM),
    MAKE_SCODE_ENTRY(DV_E_TYMED),
    MAKE_SCODE_ENTRY(INPLACE_E_NOTOOLSPACE),
    MAKE_SCODE_ENTRY(INPLACE_E_NOTUNDOABLE),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_LINK),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_ROOT),
    MAKE_SCODE_ENTRY(MEM_E_INVALID_SIZE),
    MAKE_SCODE_ENTRY(MK_E_CANTOPENFILE),
    MAKE_SCODE_ENTRY(MK_E_CONNECTMANUALLY),
    MAKE_SCODE_ENTRY(MK_E_ENUMERATION_FAILED),
    MAKE_SCODE_ENTRY(MK_E_EXCEEDEDDEADLINE),
    MAKE_SCODE_ENTRY(MK_E_INTERMEDIATEINTERFACENOTSUPPORTED),
    MAKE_SCODE_ENTRY(MK_E_INVALIDEXTENSION),
    MAKE_SCODE_ENTRY(MK_E_MUSTBOTHERUSER),
    MAKE_SCODE_ENTRY(MK_E_NEEDGENERIC),
    MAKE_SCODE_ENTRY(MK_E_NO_NORMALIZED),
    MAKE_SCODE_ENTRY(MK_E_NOINVERSE),
    MAKE_SCODE_ENTRY(MK_E_NOOBJECT),
    MAKE_SCODE_ENTRY(MK_E_NOPREFIX),
    MAKE_SCODE_ENTRY(MK_E_NOSTORAGE),
    MAKE_SCODE_ENTRY(MK_E_NOTBINDABLE),
    MAKE_SCODE_ENTRY(MK_E_NOTBOUND),
    MAKE_SCODE_ENTRY(MK_E_SYNTAX),
    MAKE_SCODE_ENTRY(MK_E_UNAVAILABLE),
    MAKE_SCODE_ENTRY(OLE_E_ADVF),
    MAKE_SCODE_ENTRY(OLE_E_ADVISENOTSUPPORTED),
    MAKE_SCODE_ENTRY(OLE_E_BLANK),
    MAKE_SCODE_ENTRY(OLE_E_CANT_BINDTOSOURCE),
    MAKE_SCODE_ENTRY(OLE_E_CANT_GETMONIKER),
    MAKE_SCODE_ENTRY(OLE_E_CANTCONVERT),
    MAKE_SCODE_ENTRY(OLE_E_CLASSDIFF),
    MAKE_SCODE_ENTRY(OLE_E_ENUM_NOMORE),
    MAKE_SCODE_ENTRY(OLE_E_INVALIDHWND),
    MAKE_SCODE_ENTRY(OLE_E_INVALIDRECT),
    MAKE_SCODE_ENTRY(OLE_E_NOCACHE),
    MAKE_SCODE_ENTRY(OLE_E_NOCONNECTION),
    MAKE_SCODE_ENTRY(OLE_E_NOSTORAGE),
    MAKE_SCODE_ENTRY(OLE_E_NOT_INPLACEACTIVE),
    MAKE_SCODE_ENTRY(OLE_E_NOTRUNNING),
    MAKE_SCODE_ENTRY(OLE_E_OLEVERB),
    MAKE_SCODE_ENTRY(OLE_E_PROMPTSAVECANCELLED),
    MAKE_SCODE_ENTRY(OLE_E_STATIC),
    MAKE_SCODE_ENTRY(OLE_E_WRONGCOMPOBJ),
    MAKE_SCODE_ENTRY(OLEOBJ_E_INVALIDVERB),
    MAKE_SCODE_ENTRY(OLEOBJ_E_NOVERBS),
    MAKE_SCODE_ENTRY(REGDB_E_CLASSNOTREG),
    MAKE_SCODE_ENTRY(REGDB_E_IIDNOTREG),
    MAKE_SCODE_ENTRY(REGDB_E_INVALIDVALUE),
    MAKE_SCODE_ENTRY(REGDB_E_KEYMISSING),
    MAKE_SCODE_ENTRY(REGDB_E_READREGDB),
    MAKE_SCODE_ENTRY(REGDB_E_WRITEREGDB),
    MAKE_SCODE_ENTRY(RPC_E_ATTEMPTED_MULTITHREAD),
    MAKE_SCODE_ENTRY(RPC_E_CALL_CANCELED),
    MAKE_SCODE_ENTRY(RPC_E_CALL_REJECTED),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_AGAIN),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INASYNCCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INEXTERNALCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_ININPUTSYNCCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTPOST_INSENDCALL),
    MAKE_SCODE_ENTRY(RPC_E_CANTTRANSMIT_CALL),
    MAKE_SCODE_ENTRY(RPC_E_CHANGED_MODE),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTUNMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_CLIENT_DIED),
    MAKE_SCODE_ENTRY(RPC_E_CONNECTION_TERMINATED),
    MAKE_SCODE_ENTRY(RPC_E_DISCONNECTED),
    MAKE_SCODE_ENTRY(RPC_E_FAULT),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_CALLDATA),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_DATA),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_DATAPACKET),
    MAKE_SCODE_ENTRY(RPC_E_INVALID_PARAMETER),
    MAKE_SCODE_ENTRY(RPC_E_INVALIDMETHOD),
    MAKE_SCODE_ENTRY(RPC_E_NOT_REGISTERED),
    MAKE_SCODE_ENTRY(RPC_E_OUT_OF_RESOURCES),
    MAKE_SCODE_ENTRY(RPC_E_RETRY),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTUNMARSHAL_DATA),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED),
    MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED_DNE),
    MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_REJECTED),
    MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_RETRYLATER),
    MAKE_SCODE_ENTRY(RPC_E_SERVERFAULT),
    MAKE_SCODE_ENTRY(RPC_E_SYS_CALL_FAILED),
    MAKE_SCODE_ENTRY(RPC_E_THREAD_NOT_INIT),
    MAKE_SCODE_ENTRY(RPC_E_UNEXPECTED),
    MAKE_SCODE_ENTRY(RPC_E_WRONG_THREAD),
    MAKE_SCODE_ENTRY(STG_E_ABNORMALAPIEXIT),
    MAKE_SCODE_ENTRY(STG_E_ACCESSDENIED),
    MAKE_SCODE_ENTRY(STG_E_CANTSAVE),
    MAKE_SCODE_ENTRY(STG_E_DISKISWRITEPROTECTED),
    MAKE_SCODE_ENTRY(STG_E_EXTANTMARSHALLINGS),
    MAKE_SCODE_ENTRY(STG_E_FILEALREADYEXISTS),
    MAKE_SCODE_ENTRY(STG_E_FILENOTFOUND),
    MAKE_SCODE_ENTRY(STG_E_INSUFFICIENTMEMORY),
    MAKE_SCODE_ENTRY(STG_E_INUSE),
    MAKE_SCODE_ENTRY(STG_E_INVALIDFLAG),
    MAKE_SCODE_ENTRY(STG_E_INVALIDFUNCTION),
    MAKE_SCODE_ENTRY(STG_E_INVALIDHANDLE),
    MAKE_SCODE_ENTRY(STG_E_INVALIDHEADER),
    MAKE_SCODE_ENTRY(STG_E_INVALIDNAME),
    MAKE_SCODE_ENTRY(STG_E_INVALIDPARAMETER),
    MAKE_SCODE_ENTRY(STG_E_INVALIDPOINTER),
    MAKE_SCODE_ENTRY(STG_E_LOCKVIOLATION),
    MAKE_SCODE_ENTRY(STG_E_MEDIUMFULL),
    MAKE_SCODE_ENTRY(STG_E_NOMOREFILES),
    MAKE_SCODE_ENTRY(STG_E_NOTCURRENT),
    MAKE_SCODE_ENTRY(STG_E_NOTFILEBASEDSTORAGE),
    MAKE_SCODE_ENTRY(STG_E_OLDDLL),
    MAKE_SCODE_ENTRY(STG_E_OLDFORMAT),
    MAKE_SCODE_ENTRY(STG_E_PATHNOTFOUND),
    MAKE_SCODE_ENTRY(STG_E_READFAULT),
    MAKE_SCODE_ENTRY(STG_E_REVERTED),
    MAKE_SCODE_ENTRY(STG_E_SEEKERROR),
    MAKE_SCODE_ENTRY(STG_E_SHAREREQUIRED),
    MAKE_SCODE_ENTRY(STG_E_SHAREVIOLATION),
    MAKE_SCODE_ENTRY(STG_E_TOOMANYOPENFILES),
    MAKE_SCODE_ENTRY(STG_E_UNIMPLEMENTEDFUNCTION),
    MAKE_SCODE_ENTRY(STG_E_UNKNOWN),
    MAKE_SCODE_ENTRY(STG_E_WRITEFAULT),
    MAKE_SCODE_ENTRY(TYPE_E_AMBIGUOUSNAME),
    MAKE_SCODE_ENTRY(TYPE_E_BADMODULEKIND),
    MAKE_SCODE_ENTRY(TYPE_E_BUFFERTOOSMALL),
    MAKE_SCODE_ENTRY(TYPE_E_CANTCREATETMPFILE),
    MAKE_SCODE_ENTRY(TYPE_E_CANTLOADLIBRARY),
    MAKE_SCODE_ENTRY(TYPE_E_CIRCULARTYPE),
    MAKE_SCODE_ENTRY(TYPE_E_DLLFUNCTIONNOTFOUND),
    MAKE_SCODE_ENTRY(TYPE_E_DUPLICATEID),
    MAKE_SCODE_ENTRY(TYPE_E_ELEMENTNOTFOUND),
    MAKE_SCODE_ENTRY(TYPE_E_INCONSISTENTPROPFUNCS),
    MAKE_SCODE_ENTRY(TYPE_E_INVALIDSTATE),
    MAKE_SCODE_ENTRY(TYPE_E_INVDATAREAD),
    MAKE_SCODE_ENTRY(TYPE_E_IOERROR),
    MAKE_SCODE_ENTRY(TYPE_E_LIBNOTREGISTERED),
    MAKE_SCODE_ENTRY(TYPE_E_NAMECONFLICT),
    MAKE_SCODE_ENTRY(TYPE_E_OUTOFBOUNDS),
    MAKE_SCODE_ENTRY(TYPE_E_QUALIFIEDNAMEDISALLOWED),
    MAKE_SCODE_ENTRY(TYPE_E_REGISTRYACCESS),
    MAKE_SCODE_ENTRY(TYPE_E_SIZETOOBIG),
    MAKE_SCODE_ENTRY(TYPE_E_TYPEMISMATCH),
    MAKE_SCODE_ENTRY(TYPE_E_UNDEFINEDTYPE),
    MAKE_SCODE_ENTRY(TYPE_E_UNKNOWNLCID),
    MAKE_SCODE_ENTRY(TYPE_E_UNSUPFORMAT),
    MAKE_SCODE_ENTRY(TYPE_E_WRONGTYPEKIND),
    MAKE_SCODE_ENTRY(VIEW_E_DRAW),
  };
  #undef MAKE_SCODE_ENTRY

  // look for it in the table
  for (int i = 0; i < _COUNTOF(scNameTable); i++)
  {
    if (sc == scNameTable[i].sc)
      return scNameTable[i].lpszName;
  }

  static TCHAR szError[32] ;
  _stprintf_s( szError, 32, _T("%#08.8x"), sc ) ;

  return szError ;    // not found
}

void ErrorMessage | ( | const CString & | str,
 |  | HRESULT | hr
 | ) |  |

Definition at line 23 of file util.cpp.

{
  LPVOID lpMessageBuffer = NULL ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      GetScode(hr),
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    CString str2 ;
    str2.Format( _T("\n%s %s"), (LPCTSTR)lpMessageBuffer, (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    LocalFree(lpMessageBuffer) ;
    AfxMessageBox( str2 ) ;
  }
  else
  {
    CString str2 ;
    str2.Format( _T("\n<No system message defined> %s"), (LPCTSTR)HRtoString(hr) ) ;
    str2 = str + str2 ;
    AfxMessageBox( str2 ) ;
  }
}

LPTSTR HRtoString ( HRESULT hr )

Definition at line 440 of file util.cpp.

{
  SCODE   sc ;
  sc = GetScode( hr ) ;

#ifdef FORMATMSG
  LPVOID lpMessageBuffer ;
  if (FormatMessage(
      FORMAT_MESSAGE_ALLOCATE_BUFFER |
      FORMAT_MESSAGE_FROM_SYSTEM,
      NULL,
      sc,
      MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
      (LPTSTR) &lpMessageBuffer,
      0,
      NULL ))
  {
    wsprintf( sz, _T( "%s (0x%lx)" ), (LPTSTR)lpMessageBuffer, sc);
    LocalFree(lpMessageBuffer) ;
  }
  else
  {
    wsprintf( sz, _T( "Unknown Scode (0x%lx)" ), sc);
  }

#endif // !FORMATMSG

  return (LPTSTR)_GetFullScodeString(sc) ;
}

LONG WINAPI ParseOffNumber | ( | LPTSTR FAR * | lplp,
 |  | LPINT | lpConv
 | ) |  |

Definition at line 475 of file util.cpp.

{
  LPTSTR lp = *lplp;
  LONG  lValue=0;
  int   sign=1;
  #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
  while( isspace(*lp) )
    lp++;
  if( *lp=='-' )
  {
    sign = -1;
    lp++;
  }
  if (*lp=='\0')
  {
    *lpConv = FALSE;
    return 0L;
  }

  // Is it a decimal number
  #ifdef UNICODE
  if( _wcsnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  #ifdef WIN32
  if( _strnicmp( lp, (LPTSTR)_T("0x"),2) )
  #else
  if( _fstrnicmp( lp, (LPTSTR)_T("0x"),2) )
  #endif
  #endif
  {
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isdigit(*lp) )
    {
      lValue *= 10;
      lValue += (*lp - (TCHAR)'0');
      lp++;
    }
  }
  else
  {
    lp+=2;
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isxdigit(*lp) )
    {
      lValue *= 16;
      #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
      if( isdigit(*lp) )
        lValue += (*lp - (TCHAR)'0');
      else
        lValue += (toupper(*lp) - (TCHAR)'A' + 10);
      lp++;
    }
  }
  #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
  while( isspace(*lp) )
    lp++;

  lValue *= (long)sign;

  if (*lp==(TCHAR)',')
  {
    lp++;
    #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
    while( isspace(*lp) )
      lp++;
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)TRUE;
  }
  else
  {
    *lplp = lp;
    if (lpConv)
      *lpConv = (int)(*lp=='\0');
  }
  return lValue;

} //*** ParseOffNumber

CString TYPEDESCtoString | ( | ITypeInfo * | pti,
 |  | TYPEDESC * | ptdesc
 | ) |  |

Definition at line 642 of file util.cpp.

{
  CString str ;

  if (ptdesc->vt == VT_PTR)
  {
    // ptdesc->lptdesc points to a TYPEDESC that specifies the thing pointed to

    str = TYPEDESCtoString( pti, ptdesc->lptdesc ) ;
    str += "*" ;
    return str.AllocSysString() ;
  }

  if ((ptdesc->vt & 0x0FFF) == VT_CARRAY)
  {
    // ptdesc->lpadesc points to an ARRAYDESC
    str = TYPEDESCtoString( pti, &ptdesc->lpadesc->tdescElem ) ;

    // Allocate cDims * lstrlen("[123456]")
    CString strTemp ;
    for (USHORT n = 0 ; n < ptdesc->lpadesc->cDims ; n++)
    {
      strTemp.Format( _T("[%d]"), ptdesc->lpadesc->rgbounds[n].cElements ) ;
      str += strTemp ;
    }
    return str ;
  }

  if ((ptdesc->vt & 0x0FFF) == VT_SAFEARRAY)
  {
    str = "SAFEARRAY(" + TYPEDESCtoString( pti, ptdesc->lptdesc ) + ")" ;
    return str ;
  }

  if (ptdesc->vt == VT_USERDEFINED)
  {
    // Use ptdesc->hreftype and pti->GetRefTypeInfo
    //
    ASSERT(pti) ;
    ITypeInfo* ptiRefType = NULL ;
    HRESULT hr = pti->GetRefTypeInfo( ptdesc->hreftype, &ptiRefType ) ;
    if (SUCCEEDED(hr))
    {
      BSTR            bstrName = NULL ;
      BSTR            bstrDoc = NULL ;
      BSTR            bstrHelp = NULL ;
      DWORD           dwHelpID ;
      hr = ptiRefType->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
      if (FAILED(hr))
      {
        #ifdef _DEBUG
        ErrorMessage(_T("ITypeInfo::GetDocumentation() failed"), hr ) ;
        #endif
        return _T("ITypeInfo::GetDocumentation() failed in TYPEDESCToString") ;
      }

      str = bstrName ;

      SysFreeString(bstrName) ;
      SysFreeString( bstrDoc ) ;
      SysFreeString( bstrHelp ) ;

      ptiRefType->Release() ;
    }
    else
    {
      #ifdef _DEBUG
      ErrorMessage( _T("GetRefTypeInfo failed in TYPEDESCToString"), hr ) ;
      #endif
      return _T("<GetRefTypeInfo failed>") ;
    }

    return str ;
  }
  return VTtoString( ptdesc->vt );
}

CString VTtoString ( VARTYPE vt )

Definition at line 631 of file util.cpp.

{
  CString str ;
  vt &= ~0xF000 ;
  if (vt <= VT_CLSID)
     str = g_rgszVT[vt]  ;
  else
     str = "BAD VARTYPE" ;

  return str ;
}

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/aboutbox.cpp File Reference

  • ole
  • superpad
Defines

aboutbox.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "aboutbox.h"
#include <dos.h>
#include <direct.h>

Go to the source code of this file.

Defines

#define | CX_SHADOW 4
#define | CY_SHADOW 4

Define Documentation

#define CX_SHADOW 4

Definition at line 149 of file aboutbox.cpp.

#define CY_SHADOW 4

Definition at line 148 of file aboutbox.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/aboutbox.h File Reference

  • ole
  • superpad
Classes

aboutbox.h File Reference

Go to the source code of this file.

Classes

class | CAboutBox
class | CBigIcon
class | CSplashWnd
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/ipframe.cpp File Reference

  • ole
  • superpad

ipframe.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include "ipframe.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/ipframe.h File Reference

  • ole
  • superpad
Classes

ipframe.h File Reference

Go to the source code of this file.

Classes

class CInPlaceFrame
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/linkitem.cpp File Reference

  • ole
  • superpad

linkitem.cpp File Reference

#include "stdafx.h"
#include "padview.h"
#include "paddoc.h"
#include "paditem.h"
#include "linkitem.h"
#include <limits.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/linkitem.h File Reference

  • ole
  • superpad
Classes

linkitem.h File Reference

Go to the source code of this file.

Classes

class CPadLinkItem
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/mainfrm.cpp File Reference

  • ole
  • superpad

mainfrm.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/mainfrm.h File Reference

  • ole
  • superpad
Classes

mainfrm.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paddoc.cpp File Reference

  • ole
  • superpad

paddoc.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include "paddoc.h"
#include "paditem.h"
#include "linkitem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paddoc.h File Reference

  • ole
  • superpad
Classes

paddoc.h File Reference

Go to the source code of this file.

Classes

class CPadDoc
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padframe.cpp File Reference

  • ole
  • superpad

padframe.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include "padframe.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padframe.h File Reference

  • ole
  • superpad
Classes

padframe.h File Reference

Go to the source code of this file.

Classes

class CPadFrame
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paditem.cpp File Reference

  • ole
  • superpad

paditem.cpp File Reference

#include "stdafx.h"
#include "padview.h"
#include "paddoc.h"
#include "paditem.h"
#include <limits.h>
#include <winnls.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paditem.h File Reference

  • ole
  • superpad
Classes

paditem.h File Reference

Go to the source code of this file.

Classes

class CEmbeddedItem
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padview.cpp File Reference

  • ole
  • superpad

padview.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include "padview.h"
#include "paditem.h"
#include "linkitem.h"
#include "tabstop.h"
#include <afxpriv.h>
#include <stdlib.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padview.h File Reference

  • ole
  • superpad
Classes

padview.h File Reference

#include <afxdlgs.h>
#include <afxext.h>
#include "paddoc.h"

Go to the source code of this file.

Classes

class CPadView
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/pageset.cpp File Reference

  • ole
  • superpad

pageset.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include <malloc.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/pageset.h File Reference

  • ole
  • superpad
Classes

pageset.h File Reference

Go to the source code of this file.

Classes

class CPageSetupDlg
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/resource.h File Reference

  • ole
  • superpad
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_INPLACE 32772
#define | ID_CHOOSE_FONT 1004
#define | ID_CHOOSE_PRINT_FONT 32770
#define | ID_MIRROR_DISPLAY_FONT 104
#define | ID_PAGE_SETUP 32769
#define | ID_SET_TABSTOPS 1005
#define | ID_VIEW_UPDATENOW 32771
#define | ID_WORD_WRAP 1006
#define | IDC_BIGICON 1008
#define | IDC_DISK_SPACE 107
#define | IDC_EDIT_TABS 1004
#define | IDC_FOOTER 1003
#define | IDC_FOOTER_FILE 1006
#define | IDC_FOOTER_SYSTEM 1007
#define | IDC_HEADER 1002
#define | IDC_HEADER_FILE 1004
#define | IDC_HEADER_SYSTEM 1005
#define | IDC_PHYSICAL_MEM 101
#define | IDD_ABOUTBOX 512
#define | IDD_PAGE_SETUP 101
#define | IDD_SET_TABSTOPS 1010
#define | IDD_SPLASH 105
#define | IDP_ERR_GET_DEVICE_DEFAULTS 4001
#define | IDP_ERR_GET_PRINTER_DC 4000
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_MAINFRAME 1
#define | IDR_TEXTTYPE 2
#define | IDR_TEXTTYPE_EMBEDDED 4
#define | IDR_TEXTTYPE_INPLACE 3
#define | IDS_DISK_SPACE 1009
#define | IDS_DISK_SPACE_UNAVAIL 1008
#define | IDS_MATH_COPR_NOTPRESENT 1010
#define | IDS_MATH_COPR_PRESENT 1011
#define | IDS_PHYSICAL_MEM 1012

Define Documentation

#define ID_CANCEL_INPLACE 32772

Definition at line 38 of file resource.h.

#define ID_CHOOSE_FONT 1004

Definition at line 18 of file resource.h.

#define ID_CHOOSE_PRINT_FONT 32770

Definition at line 36 of file resource.h.

#define ID_MIRROR_DISPLAY_FONT 104

Definition at line 12 of file resource.h.

#define ID_PAGE_SETUP 32769

Definition at line 35 of file resource.h.

#define ID_SET_TABSTOPS 1005

Definition at line 21 of file resource.h.

#define ID_VIEW_UPDATENOW 32771

Definition at line 37 of file resource.h.

#define ID_WORD_WRAP 1006

Definition at line 23 of file resource.h.

#define IDC_BIGICON 1008

Definition at line 27 of file resource.h.

#define IDC_DISK_SPACE 107

Definition at line 14 of file resource.h.

#define IDC_EDIT_TABS 1004

Definition at line 19 of file resource.h.

#define IDC_FOOTER 1003

Definition at line 17 of file resource.h.

#define IDC_FOOTER_FILE 1006

Definition at line 24 of file resource.h.

#define IDC_FOOTER_SYSTEM 1007

Definition at line 25 of file resource.h.

#define IDC_HEADER 1002

Definition at line 16 of file resource.h.

#define IDC_HEADER_FILE 1004

Definition at line 20 of file resource.h.

#define IDC_HEADER_SYSTEM 1005

Definition at line 22 of file resource.h.

#define IDC_PHYSICAL_MEM 101

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 512

Definition at line 15 of file resource.h.

#define IDD_PAGE_SETUP 101

Definition at line 10 of file resource.h.

#define IDD_SET_TABSTOPS 1010

Definition at line 29 of file resource.h.

#define IDD_SPLASH 105

Definition at line 13 of file resource.h.

#define IDP_ERR_GET_DEVICE_DEFAULTS 4001

Definition at line 34 of file resource.h.

#define IDP_ERR_GET_PRINTER_DC 4000

Definition at line 33 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 9 of file resource.h.

#define IDR_MAINFRAME 1

Definition at line 5 of file resource.h.

#define IDR_TEXTTYPE 2

Definition at line 6 of file resource.h.

#define IDR_TEXTTYPE_EMBEDDED 4

Definition at line 8 of file resource.h.

#define IDR_TEXTTYPE_INPLACE 3

Definition at line 7 of file resource.h.

#define IDS_DISK_SPACE 1009

Definition at line 28 of file resource.h.

#define IDS_DISK_SPACE_UNAVAIL 1008

Definition at line 26 of file resource.h.

#define IDS_MATH_COPR_NOTPRESENT 1010

Definition at line 30 of file resource.h.

#define IDS_MATH_COPR_PRESENT 1011

Definition at line 31 of file resource.h.

#define IDS_PHYSICAL_MEM 1012

Definition at line 32 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/stdafx.cpp File Reference

  • ole
  • superpad

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/stdafx.h File Reference

  • ole
  • superpad
Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <atlbase.h>
#include <atlwin.h>

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 14 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/superpad.cpp File Reference

  • ole
  • superpad
Variables

superpad.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include "mainfrm.h"
#include "padview.h"
#include "paddoc.h"
#include "padframe.h"
#include "ipframe.h"
#include <locale.h>

Go to the source code of this file.

Variables

CPageSetupDlg NEAR | dlgPageSetup
CTheApp NEAR | theApp

Variable Documentation

CPageSetupDlg NEAR dlgPageSetup

Definition at line 209 of file superpad.cpp.

CTheApp NEAR theApp

Definition at line 36 of file superpad.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/superpad.h File Reference

  • ole
  • superpad
Classes | Variables

superpad.h File Reference

#include "resource.h"
#include "pageset.h"
#include "aboutbox.h"
#include "pageset.h"

Go to the source code of this file.

Classes

class | CTheApp

Variables

CPageSetupDlg NEAR | dlgPageSetup
CTheApp NEAR | theApp

Variable Documentation

CPageSetupDlg NEAR dlgPageSetup

Definition at line 209 of file superpad.cpp.

CTheApp NEAR theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/tabstop.cpp File Reference

  • ole
  • superpad

tabstop.cpp File Reference

#include "stdafx.h"
#include "superpad.h"
#include "tabstop.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/tabstop.h File Reference

  • ole
  • superpad
Classes

tabstop.h File Reference

Go to the source code of this file.

Classes

class CSetTabStops
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/AProp.Cpp File Reference

  • ole
  • TstCon
Functions

AProp.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

IMPLEMENT_SERIAL (CAmbientProperty, CObject, 1)

Function Documentation

IMPLEMENT_SERIAL | ( | CAmbientProperty | ,
 |  | CObject | ,
 |  | 1 |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/AProp.H File Reference

  • ole
  • TstCon
Classes

AProp.H File Reference

Go to the source code of this file.

Classes

class CAmbientProperty
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/APropDg.Cpp File Reference

  • ole
  • TstCon

APropDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/APropDg.H File Reference

  • ole
  • TstCon
Classes

APropDg.H File Reference

Go to the source code of this file.

Classes

class CAmbientPropertiesDlg
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/BindHost.Cpp File Reference

  • ole
  • TstCon
Functions

BindHost.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

STDMETHODIMP_ (ULONG) CTCBindHost

Function Documentation

STDMETHODIMP_ ( ULONG )

Definition at line 69 of file BindHost.Cpp.

{
   m_nRefCount--;

   if( m_nRefCount == 0 )
   {
    delete this;
    return( 0 );
   }

   return( m_nRefCount );
}

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/BindHost.H File Reference

  • ole
  • TstCon
Classes

BindHost.H File Reference

Go to the source code of this file.

Classes

class CTCBindHost
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ComCatDg.Cpp File Reference

  • ole
  • TstCon

ComCatDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ComCatDg.H File Reference

  • ole
  • TstCon
Classes

ComCatDg.H File Reference

Go to the source code of this file.

Classes

class CComponentCategoriesDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ConInfDg.Cpp File Reference

  • ole
  • TstCon

ConInfDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ConInfDg.H File Reference

  • ole
  • TstCon
Classes

ConInfDg.H File Reference

Go to the source code of this file.

Classes

class CContainerInfoDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/EvLogPg.Cpp File Reference

  • ole
  • TstCon

EvLogPg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/EvLogPg.H File Reference

  • ole
  • TstCon
Classes

EvLogPg.H File Reference

Go to the source code of this file.

Classes

class CEventLoggingPage
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExcepInf.Cpp File Reference

  • ole
  • TstCon

ExcepInf.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExcepInf.H File Reference

  • ole
  • TstCon
Classes

ExcepInf.H File Reference

Go to the source code of this file.

Classes

class CExcepInfo
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExtCtl.Cpp File Reference

  • ole
  • TstCon
Functions | Variables

ExtCtl.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

STDMETHODIMP_ (ULONG) CExtendedControl

Variables

const GUID LIBID_TCPROPSLib

Function Documentation

STDMETHODIMP_ ( ULONG )

Definition at line 145 of file ExtCtl.Cpp.

{
   m_nRefCount--;
   if( m_nRefCount == 0 )
   {
    m_nRefCount++;
    delete this;
    return( 0 );
   }

   return( m_nRefCount );
}

Variable Documentation

const GUID LIBID_TCPROPSLib
Initial value:
{ 0xffc3c462, 0x18de, 0x11d1, { 0x8e, 0x2f, 0x0, 0xc0, 0x4f, 0xb6, 0x8d, 0x60 } }

Definition at line 20 of file ExtCtl.Cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExtCtl.H File Reference

  • ole
  • TstCon
Classes | Defines | Variables

ExtCtl.H File Reference

Go to the source code of this file.

Classes

class | CExtendedControl

Defines

#define | DISPID_EXT_ACTIVATE 0x80010100
#define | DISPID_EXT_DEACTIVATE 0x80010101
#define | DISPID_EXT_NAME 0x80010000
#define | DISPID_EXT_POSITIONX 0x80010001
#define | DISPID_EXT_POSITIONY 0x80010002
#define | DISPID_EXT_UIACTIVATE 0x80010102
#define | DISPID_EXT_UIDEACTIVATE 0x80010103

Variables

const IID | IID_ITC98ExtendedControl

Define Documentation

#define DISPID_EXT_ACTIVATE 0x80010100

Definition at line 18 of file ExtCtl.H.

#define DISPID_EXT_DEACTIVATE 0x80010101

Definition at line 19 of file ExtCtl.H.

#define DISPID_EXT_NAME 0x80010000

Definition at line 15 of file ExtCtl.H.

#define DISPID_EXT_POSITIONX 0x80010001

Definition at line 16 of file ExtCtl.H.

#define DISPID_EXT_POSITIONY 0x80010002

Definition at line 17 of file ExtCtl.H.

#define DISPID_EXT_UIACTIVATE 0x80010102

Definition at line 20 of file ExtCtl.H.

#define DISPID_EXT_UIDEACTIVATE 0x80010103

Definition at line 21 of file ExtCtl.H.

Variable Documentation

const IID IID_ITC98ExtendedControl
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/FeatPg.Cpp File Reference

  • ole
  • TstCon

FeatPg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/FeatPg.H File Reference

  • ole
  • TstCon
Classes

FeatPg.H File Reference

Go to the source code of this file.

Classes

class CFeaturesPage
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/IFacesPg.Cpp File Reference

  • ole
  • TstCon

IFacesPg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/IFacesPg.H File Reference

  • ole
  • TstCon
Classes

IFacesPg.H File Reference

Go to the source code of this file.

Classes

class CInterfacesPage
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/InsCtlDg.Cpp File Reference

  • ole
  • TstCon
Functions

InsCtlDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

void GetClassServerPath (REFCLSID clsid, CString &strServerPath)

Function Documentation

void GetClassServerPath | ( | REFCLSID | clsid,
 |  | CString & | strServerPath
 | ) |  |

Definition at line 110 of file InsCtlDg.Cpp.

{
   HKEY hKey;
   HKEY hServerKey;
   OLECHAR szCLSID[64];
   LONG nResult;
   ULONG nBytes;
   DWORD dwType;
   LPTSTR pszServerPath;

   StringFromGUID2( clsid, szCLSID, 64 );

   hKey = NULL;
   hServerKey = NULL;
   try
   {
    nResult = RegOpenKeyEx( HKEY_CLASSES_ROOT, CString( "CLSID\\" )+CString(
     szCLSID ), 0, KEY_READ, &hKey );
    if( nResult != ERROR_SUCCESS )
    {
     throw( E_FAIL );
    }

    nResult = RegOpenKeyEx( hKey, _T( "InprocServer32" ), 0, KEY_READ,
     &hServerKey );
    if( nResult != ERROR_SUCCESS )
    {
     nResult = RegOpenKeyEx( hKey, _T( "InprocHandler32" ), 0, KEY_READ,
      &hServerKey );
     if( nResult != ERROR_SUCCESS )
     {
      nResult = RegOpenKeyEx( hKey, _T( "LocalServer32" ), 0, KEY_READ,
         &hServerKey );
      if( nResult != ERROR_SUCCESS )
      {
         throw( E_FAIL );
      }
     }
    }

    nBytes = 0;
    nResult = RegQueryValueEx( hServerKey, NULL, NULL, &dwType, NULL,
     &nBytes );
    if( (nResult != ERROR_SUCCESS) || (dwType != REG_SZ) )
    {
     throw( E_FAIL );
    }
    pszServerPath = LPTSTR( _alloca( nBytes ) );
    nResult = RegQueryValueEx( hServerKey, NULL, NULL, &dwType,
     LPBYTE( pszServerPath ), &nBytes );
    if( (nResult != ERROR_SUCCESS) || (dwType != REG_SZ) )
    {
     throw( E_FAIL );
    }

    strServerPath = pszServerPath;

    RegCloseKey( hKey );
    hKey = NULL;
    RegCloseKey( hServerKey );
    hServerKey = NULL;
   }
   catch( HRESULT )
   {
    if( hKey != NULL )
    {
     RegCloseKey( hKey );
    }
    if( hServerKey != NULL )
    {
     RegCloseKey( hServerKey );
    }

    LOAD_STRING_FROM_RESOURCE( strServerPath, IDS_SERVERNOTFOUND );

    return;
   }
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/InsCtlDg.H File Reference

  • ole
  • TstCon
Classes

InsCtlDg.H File Reference

Go to the source code of this file.

Classes

class CInsertControlDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Log.Cpp File Reference

  • ole
  • TstCon
Functions

Log.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

IMPLEMENT_DYNAMIC (CLog, CObject)
IMPLEMENT_DYNAMIC (COutputWindowLog, CLog)
IMPLEMENT_DYNAMIC (CFileLog, CLog)
IMPLEMENT_DYNAMIC (CDebugLog, CLog)
IMPLEMENT_DYNAMIC (CNullLog, CLog)

Function Documentation

IMPLEMENT_DYNAMIC | ( | CLog | ,
 |  | CObject |
 | ) |  |
IMPLEMENT_DYNAMIC | ( | COutputWindowLog | ,
 |  | CLog |
 | ) |  |
IMPLEMENT_DYNAMIC | ( | CFileLog | ,
 |  | CLog |
 | ) |  |
IMPLEMENT_DYNAMIC | ( | CDebugLog | ,
 |  | CLog |
 | ) |  |
IMPLEMENT_DYNAMIC | ( | CNullLog | ,
 |  | CLog |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Log.H File Reference

  • ole
  • TstCon
Classes

Log.H File Reference

Go to the source code of this file.

Classes

class | CDebugLog
class | CFileLog
class | CLog
class | CNullLog
class | COutputWindowLog
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/LogDg.Cpp File Reference

  • ole
  • TstCon

LogDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/LogDg.H File Reference

  • ole
  • TstCon
Classes

LogDg.H File Reference

Go to the source code of this file.

Classes

class CLoggingDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroCB.Cpp File Reference

  • ole
  • TstCon
Variables

MacroCB.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Variables

const int MACROCOMBOBOX_MRUSIZE = 8

Variable Documentation

const int MACROCOMBOBOX_MRUSIZE = 8

Definition at line 20 of file MacroCB.Cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroCB.H File Reference

  • ole
  • TstCon
Classes | Defines

MacroCB.H File Reference

Go to the source code of this file.

Classes

class | CMacroComboBox

Defines

#define | MCBN_RETURN WM_APP

Define Documentation

#define MCBN_RETURN WM_APP

Definition at line 19 of file MacroCB.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDB.Cpp File Reference

  • ole
  • TstCon

MacroDB.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDB.H File Reference

  • ole
  • TstCon
Classes

MacroDB.H File Reference

Go to the source code of this file.

Classes

class CMacroDialogBar
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDg.Cpp File Reference

  • ole
  • TstCon

MacroDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDg.H File Reference

  • ole
  • TstCon
Classes

MacroDg.H File Reference

Go to the source code of this file.

Classes

class CMacroDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MainFrm.Cpp File Reference

  • ole
  • TstCon

MainFrm.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MainFrm.H File Reference

  • ole
  • TstCon
Classes

MainFrm.H File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethInfo.Cpp File Reference

  • ole
  • TstCon

MethInfo.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethInfo.H File Reference

  • ole
  • TstCon
Classes | Functions | Variables

MethInfo.H File Reference

Go to the source code of this file.

Classes

class | CInterfaceInfo
class | CMethodInfo
class | CMethodParamInfo

Functions

CLog & | operator<< (CLog &log, CMethodInfo *pMethodInfo)

Variables

const int | REQUESTEDIT_ALWAYS = 0
const int | REQUESTEDIT_NEVER = 1
const int | REQUESTEDIT_PROMPT = 2

Function Documentation

CLog& operator<< | ( | CLog & | log,
 |  | CMethodInfo * | pMethodInfo
 | ) |  |

Variable Documentation

const int REQUESTEDIT_ALWAYS = 0

Definition at line 26 of file MethInfo.H.

const int REQUESTEDIT_NEVER = 1

Definition at line 27 of file MethInfo.H.

const int REQUESTEDIT_PROMPT = 2

Definition at line 28 of file MethInfo.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethodDg.Cpp File Reference

  • ole
  • TstCon

MethodDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethodDg.H File Reference

  • ole
  • TstCon
Classes

MethodDg.H File Reference

Go to the source code of this file.

Classes

class CMethodDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MFileWnd.Cpp File Reference

  • ole
  • TstCon
Functions

MFileWnd.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

STDAPI_ (HDC) OleStdCreateDC(DVTARGETDEVICE FAR *ptd)

Function Documentation

STDAPI_ ( HDC )

Definition at line 44 of file MFileWnd.Cpp.

{
  HDC hdc=NULL;
  LPDEVNAMES lpDevNames;
  LPDEVMODE lpDevMode;
  LPTSTR lpszDriverName;
  LPTSTR lpszDeviceName;
  LPTSTR lpszPortName;

  if (ptd == NULL) {
    hdc = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
    goto errReturn;
  }

  lpDevNames = (LPDEVNAMES) ptd; // offset for size field

  if (ptd->tdExtDevmodeOffset == 0) {
    lpDevMode = NULL;
  }else{
    lpDevMode  = (LPDEVMODE) ((LPTSTR)ptd + ptd->tdExtDevmodeOffset);
  }

  lpszDriverName = (LPTSTR) lpDevNames + ptd->tdDriverNameOffset;
  lpszDeviceName = (LPTSTR) lpDevNames + ptd->tdDeviceNameOffset;
  lpszPortName   = (LPTSTR) lpDevNames + ptd->tdPortNameOffset;

  hdc = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, lpDevMode);

errReturn:
  return hdc;
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MFileWnd.H File Reference

  • ole
  • TstCon
Classes

MFileWnd.H File Reference

Go to the source code of this file.

Classes

class CMetaFileWnd
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/NewAPDg.Cpp File Reference

  • ole
  • TstCon

NewAPDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/NewAPDg.H File Reference

  • ole
  • TstCon
Classes

NewAPDg.H File Reference

Go to the source code of this file.

Classes

class CNewAmbientPropertyDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/OutWndVw.Cpp File Reference

  • ole
  • TstCon

OutWndVw.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/OutWndVw.H File Reference

  • ole
  • TstCon
Classes

OutWndVw.H File Reference

Go to the source code of this file.

Classes

class COutputWindowView
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PBagDg.Cpp File Reference

  • ole
  • TstCon
Functions

PBagDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

void AutoSetColumnWidth (CListCtrl &list, int iColumn)

Function Documentation

void AutoSetColumnWidth | ( | CListCtrl & | list,
 |  | int | iColumn
 | ) |  |

Definition at line 20 of file PBagDg.Cpp.

{
   int nAutoWidth;
   int nAutoHeaderWidth;

   list.SetColumnWidth( iColumn, LVSCW_AUTOSIZE );
   nAutoWidth = list.GetColumnWidth( iColumn );
   list.SetColumnWidth( iColumn, LVSCW_AUTOSIZE_USEHEADER );
   nAutoHeaderWidth = list.GetColumnWidth( iColumn );
   list.SetColumnWidth( iColumn, max( nAutoWidth, nAutoHeaderWidth ) );
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PBagDg.H File Reference

  • ole
  • TstCon
Classes

PBagDg.H File Reference

Go to the source code of this file.

Classes

class CPropertyBagDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PChngPg.Cpp File Reference

  • ole
  • TstCon

PChngPg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PChngPg.H File Reference

  • ole
  • TstCon
Classes

PChngPg.H File Reference

Go to the source code of this file.

Classes

class CPropertyChangesPage
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PEdReqPg.Cpp File Reference

  • ole
  • TstCon

PEdReqPg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PEdReqPg.H File Reference

  • ole
  • TstCon
Classes

PEdReqPg.H File Reference

Go to the source code of this file.

Classes

class | CPropertyEditRequestsPage
class | CPropertyEditRequestsPage::CPropertyInfo
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PropBag.Cpp File Reference

  • ole
  • TstCon
Functions

PropBag.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

IMPLEMENT_DYNAMIC (CPropertyBagItem, CObject)
STDMETHODIMP_ (ULONG) CPropertyBag

Function Documentation

IMPLEMENT_DYNAMIC | ( | CPropertyBagItem | ,
 |  | CObject |
 | ) |  |
STDMETHODIMP_ ( ULONG )

Definition at line 61 of file PropBag.Cpp.

{
   m_nRefCount--;

   if( m_nRefCount == 0 )
   {
    delete this;
    return( 0 );
   }
   else
   {
    return( m_nRefCount );
   }
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PropBag.H File Reference

  • ole
  • TstCon
Classes | Typedefs

PropBag.H File Reference

Go to the source code of this file.

Classes

class | CPropertyBag
class | CPropertyBagItem

Typedefs

typedef CTypedPtrList< CObList,
CPropertyBagItem * > 		CPropertyBagItemList

Typedef Documentation

typedef CTypedPtrList< CObList, CPropertyBagItem* > CPropertyBagItemList

Definition at line 23 of file PropBag.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/RegCtlDg.Cpp File Reference

  • ole
  • TstCon
Typedefs

RegCtlDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Typedefs

typedef HRESULT(STDAPICALLTYPE * | PDLLREGISTERSERVER )(void)
typedef HRESULT(STDAPICALLTYPE * | PDLLUNREGISTERSERVER )(void)

Typedef Documentation

typedef HRESULT(STDAPICALLTYPE* PDLLREGISTERSERVER)(void)

Definition at line 208 of file RegCtlDg.Cpp.

typedef HRESULT(STDAPICALLTYPE* PDLLUNREGISTERSERVER)(void)

Definition at line 209 of file RegCtlDg.Cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/RegCtlDg.H File Reference

  • ole
  • TstCon
Classes

RegCtlDg.H File Reference

Go to the source code of this file.

Classes

class CRegisterControlsDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Resource.H File Reference

  • ole
  • TstCon
Defines

Resource.H File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_EDIT_CNTR 32768
#define | ID_CLEAR 1002
#define | ID_CLOSE 1001
#define | ID_CONTAINER_AMBIENTPROPERTIES 32817
#define | ID_CONTAINER_INFO 32818
#define | ID_CONTAINER_OPTIONS 32816
#define | ID_CONTAINER_TABORDER 32821
#define | ID_CONTROL_ACTIVATE 32832
#define | ID_CONTROL_DEACTIVATE 32833
#define | ID_CONTROL_DRAWMETAFILE 32855
#define | ID_CONTROL_EVENTLOGGING 32795
#define | ID_CONTROL_INVOKEMETHODS 32815
#define | ID_CONTROL_LOGGING 32823
#define | ID_CONTROL_SAVETOPROPERTYBAG 32797
#define | ID_CONTROL_SAVETOSTORAGE 32850
#define | ID_CONTROL_SAVETOSTREAM 32788
#define | ID_CONTROL_SAVETOSUBSTORAGE 32824
#define | ID_CONTROL_UIACTIVATE 32834
#define | ID_CONTROL_UIDEACTIVATE 32835
#define | ID_EDIT_AMBIENTPROPERTIES 32781
#define | ID_EDIT_BRINGTOFRONT 32836
#define | ID_EDIT_DELETE 32771
#define | ID_EDIT_DELETEALL 32819
#define | ID_EDIT_EMBEDDEDOBJECT_ACTIVATE 32783
#define | ID_EDIT_EMBEDDEDOBJECTFUNCTIONS_ACTIVATE 32782
#define | ID_EDIT_INSERTCONTROL 32777
#define | ID_EDIT_INSERTCONTROLFROMSTORAGE 32851
#define | ID_EDIT_INSERTCONTROLFROMSUBSTORAGE 32825
#define | ID_EDIT_INSERTFROMSTREAM 32790
#define | ID_EDIT_INVOKEMETHODS 32780
#define | ID_EDIT_LOADOBJECTFROMSTREAM 32789
#define | ID_EDIT_MULTISELPROPERTIES 32838
#define | ID_EDIT_PROPERTIES 32848
#define | ID_EDIT_SELECTALL 32841
#define | ID_EDIT_SENDTOBACK 32837
#define | ID_FILE_LOADFROMSTREAM 32793
#define | ID_FILE_REGISTERCONTROLS 32806
#define | ID_FILE_SAVETOSTREAM 32792
#define | ID_OBJECT_SAVETOSTREAM 32787
#define | ID_OPTIONS_CONTAINEROPTIONS 32785
#define | ID_OPTIONS_CONTAINERPROPERTIES 32784
#define | ID_OPTIONS_DESIGNMODE 32779
#define | ID_OPTIONS_FREEZEEVENTS 32776
#define | ID_OPTIONS_LOGGING 32814
#define | ID_OPTIONS_SLOWDRAWING 32812
#define | ID_OPTIONS_TRACELEVEL_NONE 32801
#define | ID_OPTIONS_TRACELEVEL_NORMAL 32803
#define | ID_OPTIONS_TRACELEVEL_VERBOSE 32805
#define | ID_OPTIONS_TWOPASSDRAWING 32813
#define | ID_OPTIONS_USERMODE 32778
#define | ID_OUTPUTLOGEDIT_CLEAR 32857
#define | ID_OUTPUTLOGEDIT_COPY 32858
#define | ID_OUTPUTLOGEDIT_HIDE 32859
#define | ID_RUNMACRO 32856
#define | ID_SLOWDRAWING 32811
#define | ID_TOOLS_MACROS 32853
#define | ID_TOOLS_OLEVIEW 32846
#define | ID_TOOLS_REGEDIT 32847
#define | ID_TOOLS_RUNSCRIPT 32839
#define | ID_TWOPASSDRAWING 32809
#define | ID_VIEW_CONTAINERINFO 32786
#define | ID_VIEW_EVENTLOG 32775
#define | ID_VIEW_MACROBAR 32860
#define | ID_VIEW_NOTIFICATIONLOG 32774
#define | ID_VIEW_OUTPUT_WINDOW 32826
#define | IDC_ADD 1058
#define | IDC_ALLOWEDIT_ALWAYS 1003
#define | IDC_ALLOWEDIT_NEVER 1004
#define | IDC_ALLOWEDIT_PROMPT 1005
#define | IDC_ALLOWWINDOWLESS 1028
#define | IDC_ALWAYS 1048
#define | IDC_AVAILABLECATEGORIES 1055
#define | IDC_CATEGORIES 1064
#define | IDC_CHOOSECOLOR 1020
#define | IDC_CHOOSECOLOR_AMBIENT 1073
#define | IDC_CHOOSEFONT 1021
#define | IDC_CHOOSEFONT_AMBIENT 1072
#define | IDC_CLEAROUTPUTWINDOW 1047
#define | IDC_CONTROL_LOGGING 32822
#define | IDC_CONTROLS 1053
#define | IDC_DATE 1084
#define | IDC_DATE_AMBIENT 1087
#define | IDC_DISPID 1060
#define | IDC_DISPID_NEW 1074
#define | IDC_ENABLED 1023
#define | IDC_EVENTS 1031
#define | IDC_EXCEPTIONDESC 1018
#define | IDC_EXCEPTIONHELP 1019
#define | IDC_EXCEPTIONSOURCE 1017
#define | IDC_FILENAME 1041
#define | IDC_FILENAME_BROWSE 3
#define | IDC_IADVISESINKEX 1031
#define | IDC_IGNOREACTIVATEWHENVISIBLE 1030
#define | IDC_IGNOREREQUIREDCATEGORIES 1058
#define | IDC_IMPLEMENTEDCATEGORIES 1056
#define | IDC_INVOKE 1015
#define | IDC_IOLEINPLACESITEEX 1029
#define | IDC_IOLEINPLACESITEWINDOWLESS 1030
#define | IDC_LOGTODEBUG 1039
#define | IDC_LOGTOFILE 1040
#define | IDC_LOGTONULL 1042
#define | IDC_LOGTOOUTPUT 1043
#define | IDC_MACRO 1038
#define | IDC_MACROBAR 103
#define | IDC_MACROS 1066
#define | IDC_METHODNAME 1008
#define | IDC_NEVER 1049
#define | IDC_NEWPROPERTY 1059
#define | IDC_OBJECTS 1030
#define | IDC_OPENFILE 1067
#define | IDC_OUTPUT 1300
#define | IDC_OUTPUTWINDOW 102
#define | IDC_PARAMS 1014
#define | IDC_PARAMTYPE 1012
#define | IDC_PARAMVALUE 1011
#define | IDC_PARAMVALUECOMBO 1089
#define | IDC_PROMPT 1050
#define | IDC_PROPERTIES 1032
#define | IDC_PROPERTIES_CHANGES 1075
#define | IDC_PROPERTIES_EDITREQUESTS 1076
#define | IDC_PROPNAME 1022
#define | IDC_PROPNAME_NEW 1078
#define | IDC_PROPTYPE 1027
#define | IDC_PROPVALUE 1024
#define | IDC_PROPVALUECOMBO_AMBIENT 1086
#define | IDC_REGISTER 1036
#define | IDC_REGISTEREDCONTROLS 1034
#define | IDC_REMOVE 1057
#define | IDC_REMOVEALL 1063
#define | IDC_REQUIREDCATEGORIES 1057
#define | IDC_REREGISTER 1037
#define | IDC_RETURNVALUE 1016
#define | IDC_SBINDHOST 1065
#define | IDC_SELECTALL 1051
#define | IDC_SELECTALL_EDITREQUESTS 1077
#define | IDC_SERVERPATH 1083
#define | IDC_SETVALUE 1013
#define | IDC_SETVALUE_AMBIENT 1079
#define | IDC_STATIC_PARAMETERVALUE 1070
#define | IDC_STATIC_PROPERTYVALUE 1069
#define | IDC_TABORDER 1043
#define | IDC_TRACELEVEL 1038
#define | IDC_TWOPASSDRAWING 1029
#define | IDC_UNREGISTER 1035
#define | IDC_USEIPOINTERINACTIVE 1031
#define | IDC_USEQUICKACTIVATION 1032
#define | IDD_ABOUTBOX 100
#define | IDD_AMBIENTPROPERTIES 135
#define | IDD_CATEGORIES 153
#define | IDD_COMPONENTCATEGORIES 156
#define | IDD_CONTAINERINFO 138
#define | IDD_CONTAINEROPTIONS_FEATURES 136
#define | IDD_CONTAINEROPTIONS_INTERFACES 137
#define | IDD_CONTAINEROPTIONS_SERVICES 157
#define | IDD_CONTROLLOGGING_EVENTS 149
#define | IDD_CONTROLLOGGING_PROPERTYCHANGES 150
#define | IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS 151
#define | IDD_INSERTCONTROL 152
#define | IDD_LOGGING 145
#define | IDD_MACRO 159
#define | IDD_MACROBAR 143
#define | IDD_METHOD 134
#define | IDD_NEWAMBIENTPROPERTY 154
#define | IDD_OBJECTSAFETY 155
#define | IDD_OUTPUTWINDOW 146
#define | IDD_PROPERTYBAG 140
#define | IDD_REGISTERCONTROLS 142
#define | IDD_TABORDER 147
#define | IDP_FAILED_TO_CREATE 102
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTAINER_CONTEXT 130
#define | IDR_CONTROL_CONTEXT 131
#define | IDR_MAINFRAME 128
#define | IDR_OUTPUTLOGEDIT_CONTEXT 168
#define | IDR_TC98TYPE 129
#define | IDR_TC98TYPE_CNTR_IP 6
#define | IDS_ACTIVESTATE 61464
#define | IDS_AMODENAME_SHOWGRABHANDLES 61451
#define | IDS_AMODENAME_SHOWHATCHING 61450
#define | IDS_AMODENAME_UIDEAD 61449
#define | IDS_AMODENAME_USERMODE 61448
#define | IDS_APROPNAME_BACKCOLOR 61453
#define | IDS_APROPNAME_DISPLAYNAME 61456
#define | IDS_APROPNAME_FONT 61455
#define | IDS_APROPNAME_FORECOLOR 61454
#define | IDS_APROPNAME_LOCALEID 61459
#define | IDS_APROPNAME_MESSAGEREFLECT 61458
#define | IDS_APROPNAME_SCALEUNITS 61457
#define | IDS_APROPNAME_SHOWGRABHANDLES 61451
#define | IDS_APROPNAME_SHOWHATCHING 61450
#define | IDS_APROPNAME_SUPPORTSMNEMONICS 61460
#define | IDS_APROPNAME_TEXTALIGN 61452
#define | IDS_APROPNAME_UIDEAD 61449
#define | IDS_APROPNAME_USERMODE 61448
#define | IDS_BOUNDPROP_CHANGED 61446
#define | IDS_BOUNDPROP_REQUESTEDIT 61447
#define | IDS_CONTAINERINFOOBJECTHEADER 61462
#define | IDS_CONTAINERINFOSTATEHEADER 61463
#define | IDS_CONTAINERINFOWINDOWHEADER 61495
#define | IDS_CONTAINEROPTIONS 61482
#define | IDS_CONTROLHASNOMETHODS 61492
#define | IDS_CONTROLLOGGINGOPTIONS 61481
#define | IDS_COPYFAILED 61507
#define | IDS_CREATEFAILED 61494
#define | IDS_DISPATCHEXCEPTION 61500
#define | IDS_EMPTYSTATE 61468
#define | IDS_ERRORLOADINGSCRIPT 61510
#define | IDS_ERRORREADINGFROMFILE 61488
#define | IDS_ERRORWRITINGTOFILE 61487
#define | IDS_FALSE 61516
#define | IDS_IMPLEMENTEDCATEGORIES 61490
#define | IDS_LOADCONTROLFAILED 61506
#define | IDS_LOADEDSTATE 61466
#define | IDS_LOGEVENTFORMAT 61469
#define | IDS_LOGPROPERTYCHANGEFORMAT 61471
#define | IDS_LOGPROPERTYREQUESTEDITFORMAT 61472
#define | IDS_METAFILEWINDOWTITLE 61508
#define | IDS_MULTIPLESELECTION 61499
#define | IDS_NEWPROPERTY 61493
#define | IDS_NOCOMMONPROPERTIES 61498
#define | IDS_NODFVIEW 61503
#define | IDS_NOOLEVIEW 61504
#define | IDS_NOPROPERTYPAGES 61515
#define | IDS_NOSCRIPTING 61509
#define | IDS_OPENSTATE 61467
#define | IDS_OPENSTORAGEFAILED 61505
#define | IDS_OUTPUTWINDOWTITLE 61511
#define | IDS_PARAMETER 61473
#define | IDS_PATH 61480
#define | IDS_PROGID 61479
#define | IDS_PROPERTY 61478
#define | IDS_PROPERTYEDITALLOWED 61484
#define | IDS_PROPERTYEDITDENIED 61485
#define | IDS_PROPERTYEDITREQUESTFORMAT 61483
#define | IDS_PROPERTYVALUE 61477
#define | IDS_REQUIREDCATEGORIES 61491
#define | IDS_SAVETOPROPERTYBAGFAILED 61489
#define | IDS_SAVETOSTORAGEFAILED 61502
#define | IDS_SAVETOSTREAMFAILED 61486
#define | IDS_SCRIPT_FILES 101
#define | IDS_SCRIPTERRORFORMAT 61501
#define | IDS_SERVERNOTFOUND 61514
#define | IDS_STORAGE_FILES 104
#define | IDS_STREAM_FILES 103
#define | IDS_TRUE 61517
#define | IDS_TYPE 61475
#define | IDS_UIACTIVESTATE 61465
#define | IDS_UNABLETOREPRESENT 61476
#define | IDS_UNKNOWNDISPIDFORMAT 61470
#define | IDS_UNREGISTERSERVERFAILED 61461
#define | IDS_UNSPECIFIEDEXCEPTION 61513
#define | IDS_UNSPECIFIEDSOURCE 61512
#define | IDS_VALUE 61474
#define | IDS_VTBOOL 61460
#define | IDS_VTBSTR 61464
#define | IDS_VTCOLOR 61465
#define | IDS_VTFONT 61463
#define | IDS_VTI2 61461
#define | IDS_VTI4 61462
#define | IDS_WINDOWED 61496
#define | IDS_WINDOWLESS 61497

Define Documentation

#define ID_CANCEL_EDIT_CNTR 32768

Definition at line 120 of file Resource.H.

#define ID_CLEAR 1002

Definition at line 42 of file Resource.H.

#define ID_CLOSE 1001

Definition at line 41 of file Resource.H.

#define ID_CONTAINER_AMBIENTPROPERTIES 32817

Definition at line 154 of file Resource.H.

#define ID_CONTAINER_INFO 32818

Definition at line 155 of file Resource.H.

#define ID_CONTAINER_OPTIONS 32816

Definition at line 153 of file Resource.H.

#define ID_CONTAINER_TABORDER 32821

Definition at line 157 of file Resource.H.

#define ID_CONTROL_ACTIVATE 32832

Definition at line 163 of file Resource.H.

#define ID_CONTROL_DEACTIVATE 32833

Definition at line 164 of file Resource.H.

#define ID_CONTROL_DRAWMETAFILE 32855

Definition at line 178 of file Resource.H.

#define ID_CONTROL_EVENTLOGGING 32795

Definition at line 141 of file Resource.H.

#define ID_CONTROL_INVOKEMETHODS 32815

Definition at line 152 of file Resource.H.

#define ID_CONTROL_LOGGING 32823

Definition at line 159 of file Resource.H.

#define ID_CONTROL_SAVETOPROPERTYBAG 32797

Definition at line 142 of file Resource.H.

#define ID_CONTROL_SAVETOSTORAGE 32850

Definition at line 175 of file Resource.H.

#define ID_CONTROL_SAVETOSTREAM 32788

Definition at line 136 of file Resource.H.

#define ID_CONTROL_SAVETOSUBSTORAGE 32824

Definition at line 160 of file Resource.H.

#define ID_CONTROL_UIACTIVATE 32834

Definition at line 165 of file Resource.H.

#define ID_CONTROL_UIDEACTIVATE 32835

Definition at line 166 of file Resource.H.

#define ID_EDIT_AMBIENTPROPERTIES 32781

Definition at line 129 of file Resource.H.

#define ID_EDIT_BRINGTOFRONT 32836

Definition at line 167 of file Resource.H.

#define ID_EDIT_DELETE 32771

Definition at line 121 of file Resource.H.

#define ID_EDIT_DELETEALL 32819

Definition at line 156 of file Resource.H.

#define ID_EDIT_EMBEDDEDOBJECT_ACTIVATE 32783

Definition at line 131 of file Resource.H.

#define ID_EDIT_EMBEDDEDOBJECTFUNCTIONS_ACTIVATE 32782

Definition at line 130 of file Resource.H.

#define ID_EDIT_INSERTCONTROL 32777

Definition at line 125 of file Resource.H.

#define ID_EDIT_INSERTCONTROLFROMSTORAGE 32851

Definition at line 176 of file Resource.H.

#define ID_EDIT_INSERTCONTROLFROMSUBSTORAGE 32825

Definition at line 161 of file Resource.H.

#define ID_EDIT_INSERTFROMSTREAM 32790

Definition at line 138 of file Resource.H.

#define ID_EDIT_INVOKEMETHODS 32780

Definition at line 128 of file Resource.H.

#define ID_EDIT_LOADOBJECTFROMSTREAM 32789

Definition at line 137 of file Resource.H.

#define ID_EDIT_MULTISELPROPERTIES 32838

Definition at line 169 of file Resource.H.

#define ID_EDIT_PROPERTIES 32848

Definition at line 174 of file Resource.H.

#define ID_EDIT_SELECTALL 32841

Definition at line 171 of file Resource.H.

#define ID_EDIT_SENDTOBACK 32837

Definition at line 168 of file Resource.H.

#define ID_FILE_LOADFROMSTREAM 32793

Definition at line 140 of file Resource.H.

#define ID_FILE_REGISTERCONTROLS 32806

Definition at line 146 of file Resource.H.

#define ID_FILE_SAVETOSTREAM 32792

Definition at line 139 of file Resource.H.

#define ID_OBJECT_SAVETOSTREAM 32787

Definition at line 135 of file Resource.H.

#define ID_OPTIONS_CONTAINEROPTIONS 32785

Definition at line 133 of file Resource.H.

#define ID_OPTIONS_CONTAINERPROPERTIES 32784

Definition at line 132 of file Resource.H.

#define ID_OPTIONS_DESIGNMODE 32779

Definition at line 127 of file Resource.H.

#define ID_OPTIONS_FREEZEEVENTS 32776

Definition at line 124 of file Resource.H.

#define ID_OPTIONS_LOGGING 32814

Definition at line 151 of file Resource.H.

#define ID_OPTIONS_SLOWDRAWING 32812

Definition at line 149 of file Resource.H.

#define ID_OPTIONS_TRACELEVEL_NONE 32801

Definition at line 143 of file Resource.H.

#define ID_OPTIONS_TRACELEVEL_NORMAL 32803

Definition at line 144 of file Resource.H.

#define ID_OPTIONS_TRACELEVEL_VERBOSE 32805

Definition at line 145 of file Resource.H.

#define ID_OPTIONS_TWOPASSDRAWING 32813

Definition at line 150 of file Resource.H.

#define ID_OPTIONS_USERMODE 32778

Definition at line 126 of file Resource.H.

#define ID_OUTPUTLOGEDIT_CLEAR 32857

Definition at line 180 of file Resource.H.

#define ID_OUTPUTLOGEDIT_COPY 32858

Definition at line 181 of file Resource.H.

#define ID_OUTPUTLOGEDIT_HIDE 32859

Definition at line 182 of file Resource.H.

#define ID_RUNMACRO 32856

Definition at line 179 of file Resource.H.

#define ID_SLOWDRAWING 32811

Definition at line 148 of file Resource.H.

#define ID_TOOLS_MACROS 32853

Definition at line 177 of file Resource.H.

#define ID_TOOLS_OLEVIEW 32846

Definition at line 172 of file Resource.H.

#define ID_TOOLS_REGEDIT 32847

Definition at line 173 of file Resource.H.

#define ID_TOOLS_RUNSCRIPT 32839

Definition at line 170 of file Resource.H.

#define ID_TWOPASSDRAWING 32809

Definition at line 147 of file Resource.H.

#define ID_VIEW_CONTAINERINFO 32786

Definition at line 134 of file Resource.H.

#define ID_VIEW_EVENTLOG 32775

Definition at line 123 of file Resource.H.

#define ID_VIEW_MACROBAR 32860

Definition at line 183 of file Resource.H.

#define ID_VIEW_NOTIFICATIONLOG 32774

Definition at line 122 of file Resource.H.

#define ID_VIEW_OUTPUT_WINDOW 32826

Definition at line 162 of file Resource.H.

#define IDC_ADD 1058

Definition at line 95 of file Resource.H.

#define IDC_ALLOWEDIT_ALWAYS 1003

Definition at line 43 of file Resource.H.

#define IDC_ALLOWEDIT_NEVER 1004

Definition at line 44 of file Resource.H.

#define IDC_ALLOWEDIT_PROMPT 1005

Definition at line 45 of file Resource.H.

#define IDC_ALLOWWINDOWLESS 1028

Definition at line 62 of file Resource.H.

#define IDC_ALWAYS 1048

Definition at line 86 of file Resource.H.

#define IDC_AVAILABLECATEGORIES 1055

Definition at line 91 of file Resource.H.

#define IDC_CATEGORIES 1064

Definition at line 100 of file Resource.H.

#define IDC_CHOOSECOLOR 1020

Definition at line 56 of file Resource.H.

#define IDC_CHOOSECOLOR_AMBIENT 1073

Definition at line 107 of file Resource.H.

#define IDC_CHOOSEFONT 1021

Definition at line 57 of file Resource.H.

#define IDC_CHOOSEFONT_AMBIENT 1072

Definition at line 106 of file Resource.H.

#define IDC_CLEAROUTPUTWINDOW 1047

Definition at line 85 of file Resource.H.

#define IDC_CONTROL_LOGGING 32822

Definition at line 158 of file Resource.H.

#define IDC_CONTROLS 1053

Definition at line 90 of file Resource.H.

#define IDC_DATE 1084

Definition at line 115 of file Resource.H.

#define IDC_DATE_AMBIENT 1087

Definition at line 117 of file Resource.H.

#define IDC_DISPID 1060

Definition at line 98 of file Resource.H.

#define IDC_DISPID_NEW 1074

Definition at line 108 of file Resource.H.

#define IDC_ENABLED 1023

Definition at line 59 of file Resource.H.

#define IDC_EVENTS 1031

Definition at line 68 of file Resource.H.

#define IDC_EXCEPTIONDESC 1018

Definition at line 54 of file Resource.H.

#define IDC_EXCEPTIONHELP 1019

Definition at line 55 of file Resource.H.

#define IDC_EXCEPTIONSOURCE 1017

Definition at line 53 of file Resource.H.

#define IDC_FILENAME 1041

Definition at line 81 of file Resource.H.

#define IDC_FILENAME_BROWSE 3

Definition at line 5 of file Resource.H.

#define IDC_IADVISESINKEX 1031

Definition at line 70 of file Resource.H.

#define IDC_IGNOREACTIVATEWHENVISIBLE 1030

Definition at line 67 of file Resource.H.

#define IDC_IGNOREREQUIREDCATEGORIES 1058

Definition at line 96 of file Resource.H.

#define IDC_IMPLEMENTEDCATEGORIES 1056

Definition at line 92 of file Resource.H.

#define IDC_INVOKE 1015

Definition at line 51 of file Resource.H.

#define IDC_IOLEINPLACESITEEX 1029

Definition at line 63 of file Resource.H.

#define IDC_IOLEINPLACESITEWINDOWLESS 1030

Definition at line 65 of file Resource.H.

#define IDC_LOGTODEBUG 1039

Definition at line 79 of file Resource.H.

#define IDC_LOGTOFILE 1040

Definition at line 80 of file Resource.H.

#define IDC_LOGTONULL 1042

Definition at line 82 of file Resource.H.

#define IDC_LOGTOOUTPUT 1043

Definition at line 83 of file Resource.H.

#define IDC_MACRO 1038

Definition at line 78 of file Resource.H.

#define IDC_MACROBAR 103

Definition at line 12 of file Resource.H.

#define IDC_MACROS 1066

Definition at line 102 of file Resource.H.

#define IDC_METHODNAME 1008

Definition at line 46 of file Resource.H.

#define IDC_NEVER 1049

Definition at line 87 of file Resource.H.

#define IDC_NEWPROPERTY 1059

Definition at line 97 of file Resource.H.

#define IDC_OBJECTS 1030

Definition at line 66 of file Resource.H.

#define IDC_OPENFILE 1067

Definition at line 103 of file Resource.H.

#define IDC_OUTPUT 1300

Definition at line 119 of file Resource.H.

#define IDC_OUTPUTWINDOW 102

Definition at line 11 of file Resource.H.

#define IDC_PARAMS 1014

Definition at line 50 of file Resource.H.

#define IDC_PARAMTYPE 1012

Definition at line 48 of file Resource.H.

#define IDC_PARAMVALUE 1011

Definition at line 47 of file Resource.H.

#define IDC_PARAMVALUECOMBO 1089

Definition at line 118 of file Resource.H.

#define IDC_PROMPT 1050

Definition at line 88 of file Resource.H.

#define IDC_PROPERTIES 1032

Definition at line 71 of file Resource.H.

#define IDC_PROPERTIES_CHANGES 1075

Definition at line 109 of file Resource.H.

#define IDC_PROPERTIES_EDITREQUESTS 1076

Definition at line 110 of file Resource.H.

#define IDC_PROPNAME 1022

Definition at line 58 of file Resource.H.

#define IDC_PROPNAME_NEW 1078

Definition at line 112 of file Resource.H.

#define IDC_PROPTYPE 1027

Definition at line 61 of file Resource.H.

#define IDC_PROPVALUE 1024

Definition at line 60 of file Resource.H.

#define IDC_PROPVALUECOMBO_AMBIENT 1086

Definition at line 116 of file Resource.H.

#define IDC_REGISTER 1036

Definition at line 75 of file Resource.H.

#define IDC_REGISTEREDCONTROLS 1034

Definition at line 73 of file Resource.H.

#define IDC_REMOVE 1057

Definition at line 93 of file Resource.H.

#define IDC_REMOVEALL 1063

Definition at line 99 of file Resource.H.

#define IDC_REQUIREDCATEGORIES 1057

Definition at line 94 of file Resource.H.

#define IDC_REREGISTER 1037

Definition at line 76 of file Resource.H.

#define IDC_RETURNVALUE 1016

Definition at line 52 of file Resource.H.

#define IDC_SBINDHOST 1065

Definition at line 101 of file Resource.H.

#define IDC_SELECTALL 1051

Definition at line 89 of file Resource.H.

#define IDC_SELECTALL_EDITREQUESTS 1077

Definition at line 111 of file Resource.H.

#define IDC_SERVERPATH 1083

Definition at line 114 of file Resource.H.

#define IDC_SETVALUE 1013

Definition at line 49 of file Resource.H.

#define IDC_SETVALUE_AMBIENT 1079

Definition at line 113 of file Resource.H.

#define IDC_STATIC_PARAMETERVALUE 1070

Definition at line 105 of file Resource.H.

#define IDC_STATIC_PROPERTYVALUE 1069

Definition at line 104 of file Resource.H.

#define IDC_TABORDER 1043

Definition at line 84 of file Resource.H.

#define IDC_TRACELEVEL 1038

Definition at line 77 of file Resource.H.

#define IDC_TWOPASSDRAWING 1029

Definition at line 64 of file Resource.H.

#define IDC_UNREGISTER 1035

Definition at line 74 of file Resource.H.

#define IDC_USEIPOINTERINACTIVE 1031

Definition at line 69 of file Resource.H.

#define IDC_USEQUICKACTIVATION 1032

Definition at line 72 of file Resource.H.

#define IDD_ABOUTBOX 100

Definition at line 7 of file Resource.H.

#define IDD_AMBIENTPROPERTIES 135

Definition at line 20 of file Resource.H.

#define IDD_CATEGORIES 153

Definition at line 34 of file Resource.H.

#define IDD_COMPONENTCATEGORIES 156

Definition at line 37 of file Resource.H.

#define IDD_CONTAINERINFO 138

Definition at line 23 of file Resource.H.

#define IDD_CONTAINEROPTIONS_FEATURES 136

Definition at line 21 of file Resource.H.

#define IDD_CONTAINEROPTIONS_INTERFACES 137

Definition at line 22 of file Resource.H.

#define IDD_CONTAINEROPTIONS_SERVICES 157

Definition at line 38 of file Resource.H.

#define IDD_CONTROLLOGGING_EVENTS 149

Definition at line 30 of file Resource.H.

#define IDD_CONTROLLOGGING_PROPERTYCHANGES 150

Definition at line 31 of file Resource.H.

#define IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS 151

Definition at line 32 of file Resource.H.

#define IDD_INSERTCONTROL 152

Definition at line 33 of file Resource.H.

#define IDD_LOGGING 145

Definition at line 27 of file Resource.H.

#define IDD_MACRO 159

Definition at line 39 of file Resource.H.

#define IDD_MACROBAR 143

Definition at line 26 of file Resource.H.

#define IDD_METHOD 134

Definition at line 19 of file Resource.H.

#define IDD_NEWAMBIENTPROPERTY 154

Definition at line 35 of file Resource.H.

#define IDD_OBJECTSAFETY 155

Definition at line 36 of file Resource.H.

#define IDD_OUTPUTWINDOW 146

Definition at line 28 of file Resource.H.

#define IDD_PROPERTYBAG 140

Definition at line 24 of file Resource.H.

#define IDD_REGISTERCONTROLS 142

Definition at line 25 of file Resource.H.

#define IDD_TABORDER 147

Definition at line 29 of file Resource.H.

#define IDP_FAILED_TO_CREATE 102

Definition at line 10 of file Resource.H.

#define IDP_OLE_INIT_FAILED 100

Definition at line 8 of file Resource.H.

#define IDR_CONTAINER_CONTEXT 130

Definition at line 17 of file Resource.H.

#define IDR_CONTROL_CONTEXT 131

Definition at line 18 of file Resource.H.

#define IDR_MAINFRAME 128

Definition at line 15 of file Resource.H.

#define IDR_OUTPUTLOGEDIT_CONTEXT 168

Definition at line 40 of file Resource.H.

#define IDR_TC98TYPE 129

Definition at line 16 of file Resource.H.

#define IDR_TC98TYPE_CNTR_IP 6

Definition at line 6 of file Resource.H.

#define IDS_ACTIVESTATE 61464

Definition at line 211 of file Resource.H.

#define IDS_AMODENAME_SHOWGRABHANDLES 61451

Definition at line 192 of file Resource.H.

#define IDS_AMODENAME_SHOWHATCHING 61450

Definition at line 190 of file Resource.H.

#define IDS_AMODENAME_UIDEAD 61449

Definition at line 188 of file Resource.H.

#define IDS_AMODENAME_USERMODE 61448

Definition at line 186 of file Resource.H.

#define IDS_APROPNAME_BACKCOLOR 61453

Definition at line 195 of file Resource.H.

#define IDS_APROPNAME_DISPLAYNAME 61456

Definition at line 198 of file Resource.H.

#define IDS_APROPNAME_FONT 61455

Definition at line 197 of file Resource.H.

#define IDS_APROPNAME_FORECOLOR 61454

Definition at line 196 of file Resource.H.

#define IDS_APROPNAME_LOCALEID 61459

Definition at line 201 of file Resource.H.

#define IDS_APROPNAME_MESSAGEREFLECT 61458

Definition at line 200 of file Resource.H.

#define IDS_APROPNAME_SCALEUNITS 61457

Definition at line 199 of file Resource.H.

#define IDS_APROPNAME_SHOWGRABHANDLES 61451

Definition at line 193 of file Resource.H.

#define IDS_APROPNAME_SHOWHATCHING 61450

Definition at line 191 of file Resource.H.

#define IDS_APROPNAME_SUPPORTSMNEMONICS 61460

Definition at line 203 of file Resource.H.

#define IDS_APROPNAME_TEXTALIGN 61452

Definition at line 194 of file Resource.H.

#define IDS_APROPNAME_UIDEAD 61449

Definition at line 189 of file Resource.H.

#define IDS_APROPNAME_USERMODE 61448

Definition at line 187 of file Resource.H.

#define IDS_BOUNDPROP_CHANGED 61446

Definition at line 184 of file Resource.H.

#define IDS_BOUNDPROP_REQUESTEDIT 61447

Definition at line 185 of file Resource.H.

#define IDS_CONTAINERINFOOBJECTHEADER 61462

Definition at line 207 of file Resource.H.

#define IDS_CONTAINERINFOSTATEHEADER 61463

Definition at line 209 of file Resource.H.

#define IDS_CONTAINERINFOWINDOWHEADER 61495

Definition at line 243 of file Resource.H.

#define IDS_CONTAINEROPTIONS 61482

Definition at line 230 of file Resource.H.

#define IDS_CONTROLHASNOMETHODS 61492

Definition at line 240 of file Resource.H.

#define IDS_CONTROLLOGGINGOPTIONS 61481

Definition at line 229 of file Resource.H.

#define IDS_COPYFAILED 61507

Definition at line 255 of file Resource.H.

#define IDS_CREATEFAILED 61494

Definition at line 242 of file Resource.H.

#define IDS_DISPATCHEXCEPTION 61500

Definition at line 248 of file Resource.H.

#define IDS_EMPTYSTATE 61468

Definition at line 216 of file Resource.H.

#define IDS_ERRORLOADINGSCRIPT 61510

Definition at line 258 of file Resource.H.

#define IDS_ERRORREADINGFROMFILE 61488

Definition at line 236 of file Resource.H.

#define IDS_ERRORWRITINGTOFILE 61487

Definition at line 235 of file Resource.H.

#define IDS_FALSE 61516

Definition at line 264 of file Resource.H.

#define IDS_IMPLEMENTEDCATEGORIES 61490

Definition at line 238 of file Resource.H.

#define IDS_LOADCONTROLFAILED 61506

Definition at line 254 of file Resource.H.

#define IDS_LOADEDSTATE 61466

Definition at line 214 of file Resource.H.

#define IDS_LOGEVENTFORMAT 61469

Definition at line 217 of file Resource.H.

#define IDS_LOGPROPERTYCHANGEFORMAT 61471

Definition at line 219 of file Resource.H.

#define IDS_LOGPROPERTYREQUESTEDITFORMAT 61472

Definition at line 220 of file Resource.H.

#define IDS_METAFILEWINDOWTITLE 61508

Definition at line 256 of file Resource.H.

#define IDS_MULTIPLESELECTION 61499

Definition at line 247 of file Resource.H.

#define IDS_NEWPROPERTY 61493

Definition at line 241 of file Resource.H.

#define IDS_NOCOMMONPROPERTIES 61498

Definition at line 246 of file Resource.H.

#define IDS_NODFVIEW 61503

Definition at line 251 of file Resource.H.

#define IDS_NOOLEVIEW 61504

Definition at line 252 of file Resource.H.

#define IDS_NOPROPERTYPAGES 61515

Definition at line 263 of file Resource.H.

#define IDS_NOSCRIPTING 61509

Definition at line 257 of file Resource.H.

#define IDS_OPENSTATE 61467

Definition at line 215 of file Resource.H.

#define IDS_OPENSTORAGEFAILED 61505

Definition at line 253 of file Resource.H.

#define IDS_OUTPUTWINDOWTITLE 61511

Definition at line 259 of file Resource.H.

#define IDS_PARAMETER 61473

Definition at line 221 of file Resource.H.

#define IDS_PATH 61480

Definition at line 228 of file Resource.H.

#define IDS_PROGID 61479

Definition at line 227 of file Resource.H.

#define IDS_PROPERTY 61478

Definition at line 226 of file Resource.H.

#define IDS_PROPERTYEDITALLOWED 61484

Definition at line 232 of file Resource.H.

#define IDS_PROPERTYEDITDENIED 61485

Definition at line 233 of file Resource.H.

#define IDS_PROPERTYEDITREQUESTFORMAT 61483

Definition at line 231 of file Resource.H.

#define IDS_PROPERTYVALUE 61477

Definition at line 225 of file Resource.H.

#define IDS_REQUIREDCATEGORIES 61491

Definition at line 239 of file Resource.H.

#define IDS_SAVETOPROPERTYBAGFAILED 61489

Definition at line 237 of file Resource.H.

#define IDS_SAVETOSTORAGEFAILED 61502

Definition at line 250 of file Resource.H.

#define IDS_SAVETOSTREAMFAILED 61486

Definition at line 234 of file Resource.H.

#define IDS_SCRIPT_FILES 101

Definition at line 9 of file Resource.H.

#define IDS_SCRIPTERRORFORMAT 61501

Definition at line 249 of file Resource.H.

#define IDS_SERVERNOTFOUND 61514

Definition at line 262 of file Resource.H.

#define IDS_STORAGE_FILES 104

Definition at line 14 of file Resource.H.

#define IDS_STREAM_FILES 103

Definition at line 13 of file Resource.H.

#define IDS_TRUE 61517

Definition at line 265 of file Resource.H.

#define IDS_TYPE 61475

Definition at line 223 of file Resource.H.

#define IDS_UIACTIVESTATE 61465

Definition at line 213 of file Resource.H.

#define IDS_UNABLETOREPRESENT 61476

Definition at line 224 of file Resource.H.

#define IDS_UNKNOWNDISPIDFORMAT 61470

Definition at line 218 of file Resource.H.

#define IDS_UNREGISTERSERVERFAILED 61461

Definition at line 205 of file Resource.H.

#define IDS_UNSPECIFIEDEXCEPTION 61513

Definition at line 261 of file Resource.H.

#define IDS_UNSPECIFIEDSOURCE 61512

Definition at line 260 of file Resource.H.

#define IDS_VALUE 61474

Definition at line 222 of file Resource.H.

#define IDS_VTBOOL 61460

Definition at line 202 of file Resource.H.

#define IDS_VTBSTR 61464

Definition at line 210 of file Resource.H.

#define IDS_VTCOLOR 61465

Definition at line 212 of file Resource.H.

#define IDS_VTFONT 61463

Definition at line 208 of file Resource.H.

#define IDS_VTI2 61461

Definition at line 204 of file Resource.H.

#define IDS_VTI4 61462

Definition at line 206 of file Resource.H.

#define IDS_WINDOWED 61496

Definition at line 244 of file Resource.H.

#define IDS_WINDOWLESS 61497

Definition at line 245 of file Resource.H.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Script.Cpp File Reference

  • ole
  • TstCon
Functions

Script.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

STDMETHODIMP_ (ULONG) CScript

Function Documentation

STDMETHODIMP_ ( ULONG )

Definition at line 558 of file Script.Cpp.

{
   METHOD_PROLOGUE_( CScript, ActiveScriptSiteWindow )

   TRACE( "XActiveScriptSiteWindow::Release()\n" );

   return( pThis->ExternalRelease() );
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Script.H File Reference

  • ole
  • TstCon
Classes

Script.H File Reference

Go to the source code of this file.

Classes

class CScript
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ScrMngr.Cpp File Reference

  • ole
  • TstCon
Functions

ScrMngr.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

IMPLEMENT_DYNAMIC (CScriptManager, CObject)

Function Documentation

IMPLEMENT_DYNAMIC | ( | CScriptManager | ,
 |  | CObject |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ScrMngr.H File Reference

  • ole
  • TstCon
Classes

ScrMngr.H File Reference

Go to the source code of this file.

Classes

class CScriptManager
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ServPg.Cpp File Reference

  • ole
  • TstCon

ServPg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ServPg.H File Reference

  • ole
  • TstCon
Classes

ServPg.H File Reference

Go to the source code of this file.

Classes

class CServicesPage
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/StdAfx.Cpp File Reference

  • ole
  • TstCon

StdAfx.Cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/StdAfx.H File Reference

  • ole
  • TstCon
Defines

StdAfx.H File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxdisp.h>
#include <afxcmn.h>
#include <afxdtctl.h>
#include <afxctl.h>
#include <afxtempl.h>
#include <afxconv.h>
#include <comcat.h>
#include <windowsx.h>
#include <activscp.h>
#include <objsafe.h>
#include <shlwapi.h>
#include <atlbase.h>
#include <comdef.h>
#include "hlp/popups.h"
#include "targetver.h"

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 20 of file StdAfx.H.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TabOrdDg.Cpp File Reference

  • ole
  • TstCon

TabOrdDg.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TabOrdDg.H File Reference

  • ole
  • TstCon
Classes

TabOrdDg.H File Reference

Go to the source code of this file.

Classes

class CTabOrderDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/targetver.h File Reference

  • ole
  • TstCon
Defines

targetver.h File Reference

#include <WinSDKVer.h>
#include <SDKDDKVer.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 15 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCDoc.Cpp File Reference

  • ole
  • TstCon
Variables

TCDoc.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Variables

const IID LIBID_TestContainer98 = {0x198184FB,0xB837,0x11D0,{0x8D,0xF1,0x00,0xC0,0x4F,0xB6,0x8D,0x60}}

Variable Documentation

const IID LIBID_TestContainer98 = {0x198184FB,0xB837,0x11D0,{0x8D,0xF1,0x00,0xC0,0x4F,0xB6,0x8D,0x60}}

Definition at line 70 of file TCDoc.Cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCDoc.H File Reference

  • ole
  • TstCon
Classes | Variables

TCDoc.H File Reference

Go to the source code of this file.

Classes

class | CTestContainer98Doc

Variables

const LPARAM | HINT_UPDATE_ITEM = 1
const LPARAM | HINT_UPDATE_WINDOW = 0

Variable Documentation

const LPARAM HINT_UPDATE_ITEM = 1

Definition at line 20 of file TCDoc.H.

const LPARAM HINT_UPDATE_WINDOW = 0

Definition at line 19 of file TCDoc.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCItem.Cpp File Reference

  • ole
  • TstCon
Classes | Functions | Variables

TCItem.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Classes

class | QAAMBIENTENTRY

Functions

INTERFACE_PART (CTestContainer98Item, IID_IServiceProvider, ServiceProvider) INTERFACE_PART(CTestContainer98Item
PropertyNotifySink | STDMETHODIMP_ (ULONG) CTestContainer98Item

Variables

IID_IPropertyNotifySink
const int | NUM_QAAMBIENTS = sizeof( g_aQAAmbients )/sizeof( g_aQAAmbients[0] )

Function Documentation

INTERFACE_PART | ( | CTestContainer98Item | ,
 |  | IID_IServiceProvider | ,
 |  | ServiceProvider |
 | ) |  |
PropertyNotifySink STDMETHODIMP_ ( ULONG )

Definition at line 3646 of file TCItem.Cpp.

{
   METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx )

   TCControlTrace( TRACELEVEL_NORMAL, pThis, "XAdviseSinkEx::Release().\n" );

   return( pThis->ExternalRelease() );
}

Variable Documentation

IID_IPropertyNotifySink

Definition at line 1914 of file TCItem.Cpp.

const int NUM_QAAMBIENTS = sizeof( g_aQAAmbients )/sizeof( g_aQAAmbients[0] )

Definition at line 407 of file TCItem.Cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCItem.H File Reference

  • ole
  • TstCon
Classes | Defines | Variables

TCItem.H File Reference

#include "TCDoc.H"

Go to the source code of this file.

Classes

class | CTestContainer98Item

Defines

#define | IMPLTYPE_DEFAULTINTERFACE (IMPLTYPEFLAG_FDEFAULT)
#define | IMPLTYPE_DEFAULTSOURCE (IMPLTYPEFLAG_FDEFAULT|IMPLTYPEFLAG_FSOURCE)
#define | IMPLTYPE_MASK

Variables

const int | MARGIN_PIXELS = 5

Define Documentation

#define IMPLTYPE_DEFAULTINTERFACE (IMPLTYPEFLAG_FDEFAULT)

Definition at line 22 of file TCItem.H.

#define IMPLTYPE_DEFAULTSOURCE (IMPLTYPEFLAG_FDEFAULT|IMPLTYPEFLAG_FSOURCE)

Definition at line 21 of file TCItem.H.

#define IMPLTYPE_MASK
Value:
(IMPLTYPEFLAG_FDEFAULT|IMPLTYPEFLAG_FSOURCE|\
   IMPLTYPEFLAG_FRESTRICTED)

Definition at line 18 of file TCItem.H.

Variable Documentation

const int MARGIN_PIXELS = 5

Definition at line 24 of file TCItem.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCSplit.Cpp File Reference

  • ole
  • TstCon

TCSplit.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCSplit.H File Reference

  • ole
  • TstCon
Classes

TCSplit.H File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CTCSplitter
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCTrace.Cpp File Reference

  • ole
  • TstCon
Functions

TCTrace.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Functions

int | GetTraceLevel ()
void | SetTraceLevel (int nLevel)
void __cdecl | TCControlTrace (int nLevel, CTestContainer98Item *pItem, LPCTSTR pszFormat,...)
void __cdecl | TCTrace (int nLevel, LPCTSTR pszFormat,...)

Function Documentation

int GetTraceLevel ( )

Definition at line 21 of file TCTrace.Cpp.

{
   return( g_nTraceLevel );
}

void SetTraceLevel ( int nLevel )

Definition at line 26 of file TCTrace.Cpp.

{
   g_nTraceLevel = nLevel;
}

void __cdecl TCControlTrace | ( | int | nLevel,
 |  | CTestContainer98Item * | pItem,
 |  | LPCTSTR | pszFormat,
 |  |  | ...
 | ) |  |

Definition at line 31 of file TCTrace.Cpp.

{
   va_list args;
   va_start( args, pszFormat );

   int nBuf;
   TCHAR szBuffer[512];
   CString strItemName;

   if( g_nTraceLevel < nLevel )
   {
    return;
   }

   strItemName = pItem->GetDisplayName();
   sprintf_s( szBuffer, 512, "TestCon: %s: ", LPCTSTR( strItemName ) );
   OutputDebugString( szBuffer );

   nBuf = _vstprintf_s( szBuffer, 512, pszFormat, args );
   ASSERT( nBuf < sizeof( szBuffer ) );

   OutputDebugString( szBuffer );

   va_end( args );
}

void __cdecl TCTrace | ( | int | nLevel,
 |  | LPCTSTR | pszFormat,
 |  |  | ...
 | ) |  |

Definition at line 58 of file TCTrace.Cpp.

{
   va_list args;
   va_start( args, pszFormat );

   int nBuf;
   TCHAR szBuffer[512];

   if( g_nTraceLevel < nLevel )
   {
    return;
   }

   nBuf = _vstprintf_s( szBuffer, 512, pszFormat, args );
   ASSERT( nBuf < sizeof( szBuffer ) );

   OutputDebugString( _T( "TestCon: " ) );
   OutputDebugString( szBuffer );

   va_end( args );
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCTrace.H File Reference

  • ole
  • TstCon
Functions | Variables

TCTrace.H File Reference

Go to the source code of this file.

Functions

int | GetTraceLevel ()
void | SetTraceLevel (int nLevel)
void __cdecl | TCControlTrace (int nLevel, CTestContainer98Item *pItem, LPCTSTR pszFormat,...)
void __cdecl | TCTrace (int nLevel, LPCTSTR pszFormat,...)

Variables

const int | TRACELEVEL_NONE = 0
const int | TRACELEVEL_NORMAL = 1
const int | TRACELEVEL_VERBOSE = 2

Function Documentation

int GetTraceLevel ( )

Definition at line 21 of file TCTrace.Cpp.

{
   return( g_nTraceLevel );
}

void SetTraceLevel ( int nLevel )

Definition at line 26 of file TCTrace.Cpp.

{
   g_nTraceLevel = nLevel;
}

void __cdecl TCControlTrace | ( | int | nLevel,
 |  | CTestContainer98Item * | pItem,
 |  | LPCTSTR | pszFormat,
 |  |  | ...
 | ) |  |

Definition at line 31 of file TCTrace.Cpp.

{
   va_list args;
   va_start( args, pszFormat );

   int nBuf;
   TCHAR szBuffer[512];
   CString strItemName;

   if( g_nTraceLevel < nLevel )
   {
    return;
   }

   strItemName = pItem->GetDisplayName();
   sprintf_s( szBuffer, 512, "TestCon: %s: ", LPCTSTR( strItemName ) );
   OutputDebugString( szBuffer );

   nBuf = _vstprintf_s( szBuffer, 512, pszFormat, args );
   ASSERT( nBuf < sizeof( szBuffer ) );

   OutputDebugString( szBuffer );

   va_end( args );
}

void __cdecl TCTrace | ( | int | nLevel,
 |  | LPCTSTR | pszFormat,
 |  |  | ...
 | ) |  |

Definition at line 58 of file TCTrace.Cpp.

{
   va_list args;
   va_start( args, pszFormat );

   int nBuf;
   TCHAR szBuffer[512];

   if( g_nTraceLevel < nLevel )
   {
    return;
   }

   nBuf = _vstprintf_s( szBuffer, 512, pszFormat, args );
   ASSERT( nBuf < sizeof( szBuffer ) );

   OutputDebugString( _T( "TestCon: " ) );
   OutputDebugString( szBuffer );

   va_end( args );
}

Variable Documentation

const int TRACELEVEL_NONE = 0

Definition at line 10 of file TCTrace.H.

const int TRACELEVEL_NORMAL = 1

Definition at line 11 of file TCTrace.H.

const int TRACELEVEL_VERBOSE = 2

Definition at line 12 of file TCTrace.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCView.Cpp File Reference

  • ole
  • TstCon

TCView.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCView.H File Reference

  • ole
  • TstCon
Classes | Variables

TCView.H File Reference

Go to the source code of this file.

Classes

class | CTestContainer98View

Variables

const DWORD | HITTYPE_BORDER = 2
const DWORD | HITTYPE_NONE = 0
const DWORD | HITTYPE_OBJECT = 1

Variable Documentation

const DWORD HITTYPE_BORDER = 2

Definition at line 23 of file TCView.H.

const DWORD HITTYPE_NONE = 0

Definition at line 21 of file TCView.H.

const DWORD HITTYPE_OBJECT = 1

Definition at line 22 of file TCView.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TestCon.H File Reference

  • ole
  • TstCon
Functions

TestCon.H File Reference

#import "TCProps.tlb"
#include "TstCon.H"
#include "TstConIF.H"
#include "TCTrace.H"
#include "OutWndVw.H"
#include "TCSplit.H"
#include "Log.H"
#include "MacroCB.H"
#include "MacroDB.H"
#include "AProp.H"
#include "TypeAttr.H"
#include "ExcepInf.H"
#include "VarUtils.H"
#include "PropBag.H"
#include "BindHost.H"
#include "MethInfo.H"
#include "MethodDg.H"
#include "MacroDg.H"
#include "MFileWnd.H"
#include "MainFrm.H"
#include "LogDg.H"
#include "RegCtlDg.H"
#include "ComCatDg.H"
#include "InsCtlDg.H"
#include "ExtCtl.H"
#include "TCItem.H"
#include "Script.H"
#include "ScrMngr.H"
#include "TCDoc.H"
#include "TCView.H"
#include "TabOrdDg.H"
#include "FeatPg.H"
#include "IFacesPg.H"
#include "ServPg.H"
#include "ConInfDg.H"
#include "NewAPDg.H"
#include "APropDg.H"
#include "EvLogPg.H"
#include "PChngPg.H"
#include "PEdReqPg.H"
#include "PBagDg.H"
#include "MainFrm.H"

Go to the source code of this file.

Functions

_COM_SMARTPTR_TYPEDEF (ICatInformation, __uuidof(ICatInformation))
_COM_SMARTPTR_TYPEDEF (IEnumGUID, __uuidof(IEnumGUID))
_COM_SMARTPTR_TYPEDEF (IEnumCATEGORYINFO, __uuidof(IEnumCATEGORYINFO))
_COM_SMARTPTR_TYPEDEF (IActiveScriptParse, __uuidof(IActiveScriptParse))
_COM_SMARTPTR_TYPEDEF (IActiveScript, __uuidof(IActiveScript))

Function Documentation

_COM_SMARTPTR_TYPEDEF | ( | ICatInformation | ,
 |  | __uuidof(ICatInformation) |
 | ) |  |
_COM_SMARTPTR_TYPEDEF | ( | IEnumGUID | ,
 |  | __uuidof(IEnumGUID) |
 | ) |  |
_COM_SMARTPTR_TYPEDEF | ( | IEnumCATEGORYINFO | ,
 |  | __uuidof(IEnumCATEGORYINFO) |
 | ) |  |
_COM_SMARTPTR_TYPEDEF | ( | IActiveScriptParse | ,
 |  | __uuidof(IActiveScriptParse) |
 | ) |  |
_COM_SMARTPTR_TYPEDEF | ( | IActiveScript | ,
 |  | __uuidof(IActiveScript) |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TstCon.Cpp File Reference

  • ole
  • TstCon
Classes | Variables

TstCon.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CTestContainer98App theApp

Variable Documentation

CTestContainer98App theApp

Definition at line 431 of file TstCon.Cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TstCon.H File Reference

  • ole
  • TstCon
Classes | Defines | Variables

TstCon.H File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CTCCommandLineInfo
class | CTCOptions
class | CTestContainer98App

Defines

#define | LOAD_STRING_FROM_RESOURCE(s, r) if(s.LoadString(r) == FALSE) { AfxThrowResourceException(); }

Variables

const int | TCLOG_DEBUG = 2
const int | TCLOG_FILE = 3
const int | TCLOG_NULL = 0
const int | TCLOG_OUTPUTWINDOW = 1

Define Documentation

#define LOAD_STRING_FROM_RESOURCE | ( | s,
 |  | r |
 | ) |  | if(s.LoadString(r) == FALSE) { AfxThrowResourceException(); }

Definition at line 29 of file TstCon.H.

Variable Documentation

const int TCLOG_DEBUG = 2

Definition at line 26 of file TstCon.H.

const int TCLOG_FILE = 3

Definition at line 27 of file TstCon.H.

const int TCLOG_NULL = 0

Definition at line 24 of file TstCon.H.

const int TCLOG_OUTPUTWINDOW = 1

Definition at line 25 of file TstCon.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TstCon.odl File Reference

  • ole
  • TstCon
Classes | Namespaces | Functions

TstCon.odl File Reference

Go to the source code of this file.

Classes

class | TestContainer98::Document
interface | TestContainer98::ITestContainer98
interface | TestContainer98::ITestContainer98Events

Namespaces

namespace | TestContainer98

Functions

TestContainer98::importlib ("stdole32.tlb")
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TypeAttr.Cpp File Reference

  • ole
  • TstCon

TypeAttr.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TypeAttr.H File Reference

  • ole
  • TstCon
Classes

TypeAttr.H File Reference

Go to the source code of this file.

Classes

class | CSmartFuncDesc
class | CSmartTypeAttr
class | CSmartVarDesc
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/VarUtils.Cpp File Reference

  • ole
  • TstCon
Classes | Functions | Variables

VarUtils.Cpp File Reference

#include "StdAfx.H"
#include "TestCon.H"

Go to the source code of this file.

Classes

class | INVOKEKIND_ENTRY
class | VARTYPE_ENTRY

Functions

LPCTSTR | InvokeKindToString (INVOKEKIND invokekind)
CString | VariantToString (const VARIANT &var)
LPCTSTR | VTIToString (int iType)
VARTYPE | VTIToVT (int iType)
LPCTSTR | VTToString (VARTYPE vt)
int | VTToVTI (VARTYPE vt)

Variables

const int | NUM_INVOKEKINDS

Function Documentation

LPCTSTR InvokeKindToString ( INVOKEKIND invokekind )

Definition at line 37 of file VarUtils.Cpp.

{
   int iInvokeKind;

   for( iInvokeKind = 0; iInvokeKind < NUM_INVOKEKINDS; iInvokeKind++ )
   {
    if( g_aInvokeKinds[iInvokeKind].invokekind == invokekind )
    {
     return( g_aInvokeKinds[iInvokeKind].pszName );
    }
   }

   return( NULL );
}

CString VariantToString ( const VARIANT & var )

Definition at line 122 of file VarUtils.Cpp.

{

   CString strResult;
   COleVariant varString;
   BOOL tHandled;

   tHandled = FALSE;
   switch( var.vt )
   {
   case VT_BOOL:
    if( var.boolVal == VARIANT_FALSE )
    {
     strResult = _T( "FALSE" );
    }
    else
    {
     strResult = _T( "TRUE" );
    }
    tHandled = TRUE;
    break;
   }

   if( !tHandled )
   {
    varString = var;
    TRY
    {
     varString.ChangeType( VT_BSTR );
    }
    CATCH( COleException, e )
    {
     TRACE( "ChangeType() failed.\n" );
    }
    END_CATCH

    strResult = varString.bstrVal;
   }

   return( strResult );
}

LPCTSTR VTIToString ( int iType )

Definition at line 82 of file VarUtils.Cpp.

{
   return( g_aVarTypes[iType].pszName );
}

VARTYPE VTIToVT ( int iType )

Definition at line 87 of file VarUtils.Cpp.

{
   return( g_aVarTypes[iType].vt );
}

LPCTSTR VTToString ( VARTYPE vt )

Definition at line 92 of file VarUtils.Cpp.

{
   int iType;

   for( iType = 0; iType < NUM_VARTYPES; iType++ )
   {
    if( g_aVarTypes[iType].vt == vt )
    {
     return( g_aVarTypes[iType].pszName );
    }
   }

   return( NULL );
}

int VTToVTI ( VARTYPE vt )

Definition at line 107 of file VarUtils.Cpp.

{
   int iType;

   for( iType = 0; iType < NUM_VARTYPES; iType++ )
   {
    if( g_aVarTypes[iType].vt == vt )
    {
     return( iType );
    }
   }

   return( -1 );
}

Variable Documentation

const int NUM_INVOKEKINDS
Initial value:
 sizeof( g_aInvokeKinds )/sizeof(
   g_aInvokeKinds[0] )

Definition at line 34 of file VarUtils.Cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/VarUtils.H File Reference

  • ole
  • TstCon
Functions | Variables

VarUtils.H File Reference

Go to the source code of this file.

Functions

LPCTSTR | InvokeKindToString (INVOKEKIND invokekind)
CString | VariantToString (const VARIANT &var)
LPCTSTR | VTIToString (int iType)
VARTYPE | VTIToVT (int iType)
LPCTSTR | VTToString (VARTYPE vt)
int | VTToVTI (VARTYPE vt)

Variables

const int | NUM_VARTYPES = 19
const VARIANT_BOOL | VAR_FALSE = VARIANT_FALSE
const VARIANT_BOOL | VAR_TRUE = ~VARIANT_FALSE
const int | VTI_BOOL = 1
const int | VTI_BSTR = 12
const int | VTI_COLOR = 16
const int | VTI_CY = 13
const int | VTI_DATE = 14
const int | VTI_EMPTY = 0
const int | VTI_ERROR = 15
const int | VTI_FONT = 17
const int | VTI_I1 = 6
const int | VTI_I2 = 7
const int | VTI_I4 = 8
const int | VTI_I8 = 9
const int | VTI_R4 = 10
const int | VTI_R8 = 11
const int | VTI_UI1 = 2
const int | VTI_UI2 = 3
const int | VTI_UI4 = 4
const int | VTI_UI8 = 5
const int | VTI_UNKNOWN = 18

Function Documentation

LPCTSTR InvokeKindToString ( INVOKEKIND invokekind )

Definition at line 37 of file VarUtils.Cpp.

{
   int iInvokeKind;

   for( iInvokeKind = 0; iInvokeKind < NUM_INVOKEKINDS; iInvokeKind++ )
   {
    if( g_aInvokeKinds[iInvokeKind].invokekind == invokekind )
    {
     return( g_aInvokeKinds[iInvokeKind].pszName );
    }
   }

   return( NULL );
}

CString VariantToString ( const VARIANT & var )

Definition at line 122 of file VarUtils.Cpp.

{

   CString strResult;
   COleVariant varString;
   BOOL tHandled;

   tHandled = FALSE;
   switch( var.vt )
   {
   case VT_BOOL:
    if( var.boolVal == VARIANT_FALSE )
    {
     strResult = _T( "FALSE" );
    }
    else
    {
     strResult = _T( "TRUE" );
    }
    tHandled = TRUE;
    break;
   }

   if( !tHandled )
   {
    varString = var;
    TRY
    {
     varString.ChangeType( VT_BSTR );
    }
    CATCH( COleException, e )
    {
     TRACE( "ChangeType() failed.\n" );
    }
    END_CATCH

    strResult = varString.bstrVal;
   }

   return( strResult );
}

LPCTSTR VTIToString ( int iType )

Definition at line 82 of file VarUtils.Cpp.

{
   return( g_aVarTypes[iType].pszName );
}

VARTYPE VTIToVT ( int iType )

Definition at line 87 of file VarUtils.Cpp.

{
   return( g_aVarTypes[iType].vt );
}

LPCTSTR VTToString ( VARTYPE vt )

Definition at line 92 of file VarUtils.Cpp.

{
   int iType;

   for( iType = 0; iType < NUM_VARTYPES; iType++ )
   {
    if( g_aVarTypes[iType].vt == vt )
    {
     return( g_aVarTypes[iType].pszName );
    }
   }

   return( NULL );
}

int VTToVTI ( VARTYPE vt )

Definition at line 107 of file VarUtils.Cpp.

{
   int iType;

   for( iType = 0; iType < NUM_VARTYPES; iType++ )
   {
    if( g_aVarTypes[iType].vt == vt )
    {
     return( iType );
    }
   }

   return( -1 );
}

Variable Documentation

const int NUM_VARTYPES = 19

Definition at line 29 of file VarUtils.H.

const VARIANT_BOOL VAR_FALSE = VARIANT_FALSE

Definition at line 32 of file VarUtils.H.

const VARIANT_BOOL VAR_TRUE = ~VARIANT_FALSE

Definition at line 31 of file VarUtils.H.

const int VTI_BOOL = 1

Definition at line 11 of file VarUtils.H.

const int VTI_BSTR = 12

Definition at line 22 of file VarUtils.H.

const int VTI_COLOR = 16

Definition at line 26 of file VarUtils.H.

const int VTI_CY = 13

Definition at line 23 of file VarUtils.H.

const int VTI_DATE = 14

Definition at line 24 of file VarUtils.H.

const int VTI_EMPTY = 0

Definition at line 10 of file VarUtils.H.

const int VTI_ERROR = 15

Definition at line 25 of file VarUtils.H.

const int VTI_FONT = 17

Definition at line 27 of file VarUtils.H.

const int VTI_I1 = 6

Definition at line 16 of file VarUtils.H.

const int VTI_I2 = 7

Definition at line 17 of file VarUtils.H.

const int VTI_I4 = 8

Definition at line 18 of file VarUtils.H.

const int VTI_I8 = 9

Definition at line 19 of file VarUtils.H.

const int VTI_R4 = 10

Definition at line 20 of file VarUtils.H.

const int VTI_R8 = 11

Definition at line 21 of file VarUtils.H.

const int VTI_UI1 = 2

Definition at line 12 of file VarUtils.H.

const int VTI_UI2 = 3

Definition at line 13 of file VarUtils.H.

const int VTI_UI4 = 4

Definition at line 14 of file VarUtils.H.

const int VTI_UI8 = 5

Definition at line 15 of file VarUtils.H.

const int VTI_UNKNOWN = 18

Definition at line 28 of file VarUtils.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/hlp/popups.h File Reference

  • ole
  • TstCon
  • hlp
Defines

popups.h File Reference

Go to the source code of this file.

Defines

#define | HIDC_ALLOWWINDOWLESS 18016
#define | HIDC_ALWAYS 18028
#define | HIDC_CATEGORIES 18013
#define | HIDC_CHOOSECOLOR 18058
#define | HIDC_CHOOSECOLOR_AMBIENT 18004
#define | HIDC_CHOOSEFONT 18057
#define | HIDC_CHOOSEFONT_AMBIENT 18008
#define | HIDC_CLEAROUTPUTWINDOW 18062
#define | HIDC_CONTROLS 18032
#define | HIDC_DATE 18048
#define | HIDC_DATE_AMBIENT 18005
#define | HIDC_DISPID 18002
#define | HIDC_DISPID_NEW 18060
#define | HIDC_ENABLED 18003
#define | HIDC_EVENTS 18025
#define | HIDC_EXCEPTIONDESC 18054
#define | HIDC_EXCEPTIONHELP 18055
#define | HIDC_EXCEPTIONSOURCE 18053
#define | HIDC_FILENAME 18040
#define | HIDC_FILENAME_BROWSE 18041
#define | HIDC_IADVISESINKEX 18023
#define | HIDC_IGNOREACTIVATEWHENVISIBLE 18018
#define | HIDC_IGNOREREQUIREDCATEGORIES 18035
#define | HIDC_IMPLEMENTEDCATEGORIES 18033
#define | HIDC_INVOKE 18056
#define | HIDC_IOLEINPLACESITEEX 18021
#define | HIDC_IOLEINPLACESITEWINDOWLESS 18022
#define | HIDC_LOGTODEBUG 18038
#define | HIDC_LOGTOFILE 18039
#define | HIDC_LOGTONULL 18036
#define | HIDC_LOGTOOUTPUT 18037
#define | HIDC_MACROS 18042
#define | HIDC_METHODNAME 18044
#define | HIDC_NEVER 18029
#define | HIDC_NEWPROPERTY 18012
#define | HIDC_OBJECTS 18015
#define | HIDC_OPENFILE 18043
#define | HIDC_OUTPUT 18061
#define | HIDC_PARAMS 18045
#define | HIDC_PARAMTYPE 18050
#define | HIDC_PARAMVALUE 18046
#define | HIDC_PARAMVALUECOMBO 18049
#define | HIDC_PROMPT 18030
#define | HIDC_PROPERTIES 18063
#define | HIDC_PROPERTIES_CHANGES 18026
#define | HIDC_PROPERTIES_EDITREQUESTS 18027
#define | HIDC_PROPNAME 18001
#define | HIDC_PROPNAME_NEW 18059
#define | HIDC_PROPTYPE 18010
#define | HIDC_PROPVALUE 18009
#define | HIDC_PROPVALUECOMBO_AMBIENT 18007
#define | HIDC_REGISTER 18066
#define | HIDC_REGISTEREDCONTROLS 18064
#define | HIDC_REQUIREDCATEGORIES 18034
#define | HIDC_REREGISTER 18067
#define | HIDC_RETURNVALUE 18052
#define | HIDC_SBINDHOST 18024
#define | HIDC_SELECTALL 18014
#define | HIDC_SELECTALL_EDITREQUESTS 18031
#define | HIDC_SETVALUE 18051
#define | HIDC_SETVALUE_AMBIENT 18011
#define | HIDC_STATIC_PARAMETERVALUE 18047
#define | HIDC_STATIC_PROPERTYVALUE 18006
#define | HIDC_TABORDER 18068
#define | HIDC_TWOPASSDRAWING 18017
#define | HIDC_UNREGISTER 18065
#define | HIDC_USEIPOINTERINACTIVE 18019
#define | HIDC_USEQUICKACTIVATION 18020

Define Documentation

#define HIDC_ALLOWWINDOWLESS 18016

Definition at line 16 of file popups.h.

#define HIDC_ALWAYS 18028

Definition at line 28 of file popups.h.

#define HIDC_CATEGORIES 18013

Definition at line 13 of file popups.h.

#define HIDC_CHOOSECOLOR 18058

Definition at line 58 of file popups.h.

#define HIDC_CHOOSECOLOR_AMBIENT 18004

Definition at line 4 of file popups.h.

#define HIDC_CHOOSEFONT 18057

Definition at line 57 of file popups.h.

#define HIDC_CHOOSEFONT_AMBIENT 18008

Definition at line 8 of file popups.h.

#define HIDC_CLEAROUTPUTWINDOW 18062

Definition at line 62 of file popups.h.

#define HIDC_CONTROLS 18032

Definition at line 32 of file popups.h.

#define HIDC_DATE 18048

Definition at line 48 of file popups.h.

#define HIDC_DATE_AMBIENT 18005

Definition at line 5 of file popups.h.

#define HIDC_DISPID 18002

Definition at line 2 of file popups.h.

#define HIDC_DISPID_NEW 18060

Definition at line 60 of file popups.h.

#define HIDC_ENABLED 18003

Definition at line 3 of file popups.h.

#define HIDC_EVENTS 18025

Definition at line 25 of file popups.h.

#define HIDC_EXCEPTIONDESC 18054

Definition at line 54 of file popups.h.

#define HIDC_EXCEPTIONHELP 18055

Definition at line 55 of file popups.h.

#define HIDC_EXCEPTIONSOURCE 18053

Definition at line 53 of file popups.h.

#define HIDC_FILENAME 18040

Definition at line 40 of file popups.h.

#define HIDC_FILENAME_BROWSE 18041

Definition at line 41 of file popups.h.

#define HIDC_IADVISESINKEX 18023

Definition at line 23 of file popups.h.

#define HIDC_IGNOREACTIVATEWHENVISIBLE 18018

Definition at line 18 of file popups.h.

#define HIDC_IGNOREREQUIREDCATEGORIES 18035

Definition at line 35 of file popups.h.

#define HIDC_IMPLEMENTEDCATEGORIES 18033

Definition at line 33 of file popups.h.

#define HIDC_INVOKE 18056

Definition at line 56 of file popups.h.

#define HIDC_IOLEINPLACESITEEX 18021

Definition at line 21 of file popups.h.

#define HIDC_IOLEINPLACESITEWINDOWLESS 18022

Definition at line 22 of file popups.h.

#define HIDC_LOGTODEBUG 18038

Definition at line 38 of file popups.h.

#define HIDC_LOGTOFILE 18039

Definition at line 39 of file popups.h.

#define HIDC_LOGTONULL 18036

Definition at line 36 of file popups.h.

#define HIDC_LOGTOOUTPUT 18037

Definition at line 37 of file popups.h.

#define HIDC_MACROS 18042

Definition at line 42 of file popups.h.

#define HIDC_METHODNAME 18044

Definition at line 44 of file popups.h.

#define HIDC_NEVER 18029

Definition at line 29 of file popups.h.

#define HIDC_NEWPROPERTY 18012

Definition at line 12 of file popups.h.

#define HIDC_OBJECTS 18015

Definition at line 15 of file popups.h.

#define HIDC_OPENFILE 18043

Definition at line 43 of file popups.h.

#define HIDC_OUTPUT 18061

Definition at line 61 of file popups.h.

#define HIDC_PARAMS 18045

Definition at line 45 of file popups.h.

#define HIDC_PARAMTYPE 18050

Definition at line 50 of file popups.h.

#define HIDC_PARAMVALUE 18046

Definition at line 46 of file popups.h.

#define HIDC_PARAMVALUECOMBO 18049

Definition at line 49 of file popups.h.

#define HIDC_PROMPT 18030

Definition at line 30 of file popups.h.

#define HIDC_PROPERTIES 18063

Definition at line 63 of file popups.h.

#define HIDC_PROPERTIES_CHANGES 18026

Definition at line 26 of file popups.h.

#define HIDC_PROPERTIES_EDITREQUESTS 18027

Definition at line 27 of file popups.h.

#define HIDC_PROPNAME 18001

Definition at line 1 of file popups.h.

#define HIDC_PROPNAME_NEW 18059

Definition at line 59 of file popups.h.

#define HIDC_PROPTYPE 18010

Definition at line 10 of file popups.h.

#define HIDC_PROPVALUE 18009

Definition at line 9 of file popups.h.

#define HIDC_PROPVALUECOMBO_AMBIENT 18007

Definition at line 7 of file popups.h.

#define HIDC_REGISTER 18066

Definition at line 66 of file popups.h.

#define HIDC_REGISTEREDCONTROLS 18064

Definition at line 64 of file popups.h.

#define HIDC_REQUIREDCATEGORIES 18034

Definition at line 34 of file popups.h.

#define HIDC_REREGISTER 18067

Definition at line 67 of file popups.h.

#define HIDC_RETURNVALUE 18052

Definition at line 52 of file popups.h.

#define HIDC_SBINDHOST 18024

Definition at line 24 of file popups.h.

#define HIDC_SELECTALL 18014

Definition at line 14 of file popups.h.

#define HIDC_SELECTALL_EDITREQUESTS 18031

Definition at line 31 of file popups.h.

#define HIDC_SETVALUE 18051

Definition at line 51 of file popups.h.

#define HIDC_SETVALUE_AMBIENT 18011

Definition at line 11 of file popups.h.

#define HIDC_STATIC_PARAMETERVALUE 18047

Definition at line 47 of file popups.h.

#define HIDC_STATIC_PROPERTYVALUE 18006

Definition at line 6 of file popups.h.

#define HIDC_TABORDER 18068

Definition at line 68 of file popups.h.

#define HIDC_TWOPASSDRAWING 18017

Definition at line 17 of file popups.h.

#define HIDC_UNREGISTER 18065

Definition at line 65 of file popups.h.

#define HIDC_USEIPOINTERINACTIVE 18019

Definition at line 19 of file popups.h.

#define HIDC_USEQUICKACTIVATION 18020

Definition at line 20 of file popups.h.

Generated on Sat Nov 23 2024 17:00:41 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/Resource.H File Reference

  • ole
  • TstCon
  • TCProps
Defines

Resource.H File Reference

Go to the source code of this file.

Defines

#define | IDC_NAME 201
#define | IDD_TCEXTPAGE 105
#define | IDR_TCEXTPAGE 104
#define | IDS_DOCSTRINGTCExtPage 103
#define | IDS_HELPFILETCExtPage 102
#define | IDS_PROJNAME 100
#define | IDS_TITLETCExtPage 101

Define Documentation

#define IDC_NAME 201

Definition at line 11 of file Resource.H.

#define IDD_TCEXTPAGE 105

Definition at line 10 of file Resource.H.

#define IDR_TCEXTPAGE 104

Definition at line 9 of file Resource.H.

#define IDS_DOCSTRINGTCExtPage 103

Definition at line 8 of file Resource.H.

#define IDS_HELPFILETCExtPage 102

Definition at line 7 of file Resource.H.

#define IDS_PROJNAME 100

Definition at line 5 of file Resource.H.

#define IDS_TITLETCExtPage 101

Definition at line 6 of file Resource.H.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/StdAfx.cpp File Reference

  • ole
  • TstCon
  • TCProps

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/StdAfx.h File Reference

  • ole
  • TstCon
  • TCProps
Defines

StdAfx.h File Reference

#include "resource.h"
#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>
#include "resource.h"

Go to the source code of this file.

Defines

#define | _ATL_APARTMENT_THREADED
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | _ATL_NO_AUTOMATIC_NAMESPACE

Define Documentation

#define _ATL_APARTMENT_THREADED

Definition at line 18 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 21 of file StdAfx.h.

#define _ATL_NO_AUTOMATIC_NAMESPACE

Definition at line 19 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCExtPg.Cpp File Reference

  • ole
  • TstCon
  • TCProps

TCExtPg.Cpp File Reference

#include "StdAfx.H"
#include "TCExtPg.H"
#include "TCProps.H"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCExtPg.H File Reference

  • ole
  • TstCon
  • TCProps
Classes | Variables

TCExtPg.H File Reference

#include "resource.h"

Go to the source code of this file.

Classes

class | CTCExtPage

Variables

EXTERN_C const CLSID | CLSID_TCExtPage

Variable Documentation

EXTERN_C const CLSID CLSID_TCExtPage

Definition at line 16 of file TCExtPg.H.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCProps.cpp File Reference

  • ole
  • TstCon
  • TCProps
Classes | Functions | Variables

TCProps.cpp File Reference

#include "StdAfx.H"
#include <initguid.h>
#include "TCProps.h"
#include "TCProps_i.c"
#include "TCExtPg.H"

Go to the source code of this file.

Classes

class | CTCPropsModule

Functions

STDAPI | DllCanUnloadNow (void)
STDAPI | DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
BOOL WINAPI | DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)

Variables

CTCPropsModule _AtlModule

Function Documentation

STDAPI DllCanUnloadNow ( void )

Definition at line 35 of file TCProps.cpp.

{
    return _AtlModule.DllCanUnloadNow();
}

STDAPI DllGetClassObject | ( | REFCLSID | rclsid,
 |  | REFIID | riid,
 |  | LPVOID * | ppv
 | ) |  |

Definition at line 42 of file TCProps.cpp.

{
    return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
}

BOOL WINAPI DllMain | ( | HINSTANCE | hInstance,
 |  | DWORD | dwReason,
 |  | LPVOID | lpReserved
 | ) |  |

Definition at line 27 of file TCProps.cpp.

{
  hInstance;
    return _AtlModule.DllMain(dwReason, lpReserved);
}

Variable Documentation

CTCPropsModule _AtlModule

Definition at line 23 of file TCProps.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCProps.idl File Reference

  • ole
  • TstCon
  • TCProps
Classes | Namespaces | Functions

TCProps.idl File Reference

Go to the source code of this file.

Classes

interface | TCPropsLib::ITCExtendedControl
class | TCPropsLib::TCExtPage

Namespaces

namespace | TCPropsLib

Functions

TCPropsLib::importlib ("stdole32.tlb")
TCPropsLib::importlib ("stdole2.tlb")
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/buttondi.cpp File Reference

  • ole
  • wordpad
Defines

buttondi.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "buttondi.h"
#include "strings.h"
#include "wordpad.h"

Go to the source code of this file.

Defines

#define | DS_3DLOOK 0x4
#define | DS_CONTEXTHELP 0x2000L

Define Documentation

#define DS_3DLOOK 0x4

Definition at line 167 of file buttondi.cpp.

#define DS_CONTEXTHELP 0x2000L

Definition at line 24 of file buttondi.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/buttondi.h File Reference

  • ole
  • wordpad
Classes

buttondi.h File Reference

Go to the source code of this file.

Classes

class CButtonDialog
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/chicdial.cpp File Reference

  • ole
  • wordpad

chicdial.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/chicdial.h File Reference

  • ole
  • wordpad
Classes

chicdial.h File Reference

Go to the source code of this file.

Classes

class | CCSDialog
class | CCSPropertyPage
class | CCSPropertySheet
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/cntritem.cpp File Reference

  • ole
  • wordpad

cntritem.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "cntritem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/cntritem.h File Reference

  • ole
  • wordpad
Classes

cntritem.h File Reference

Go to the source code of this file.

Classes

class CWordPadCntrItem
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/colorlis.cpp File Reference

  • ole
  • wordpad

colorlis.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "colorlis.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/colorlis.h File Reference

  • ole
  • wordpad
Classes

colorlis.h File Reference

Go to the source code of this file.

Classes

class CColorMenu
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/datedial.cpp File Reference

  • ole
  • wordpad

datedial.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "datedial.h"
#include "helpids.h"
#include <winnls.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/datedial.h File Reference

  • ole
  • wordpad
Classes

datedial.h File Reference

Go to the source code of this file.

Classes

class CDateDialog
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ddxm.cpp File Reference

  • ole
  • wordpad
Functions

ddxm.cpp File Reference

#include "stdafx.h"
#include "ddxm.h"
#include "wordpad.h"
#include "resource.h"

Go to the source code of this file.

Functions

void PASCAL | DDV_MinMaxTwips (CDataExchange *pDX, int value, int minVal, int maxVal)
void PASCAL | DDX_Twips (CDataExchange *pDX, int nIDC, int &value)

Function Documentation

void PASCAL DDV_MinMaxTwips | ( | CDataExchange * | pDX,
 |  | int | value,
 |  | int | minVal,
 |  | int | maxVal
 | ) |  |

Definition at line 50 of file ddxm.cpp.

{
  ASSERT(minVal <= maxVal);
  if (value < minVal || value > maxVal)
  {
    // "The measurement must be between %1 and %2."
    if (!pDX->m_bSaveAndValidate)
    {
      TRACE0("Warning: initial dialog data is out of range.\n");
      return;     // don't stop now
    }
    TCHAR szMin[64];
    TCHAR szMax[64];
    theApp.PrintTwips(szMin, 64, minVal, 2);
    theApp.PrintTwips(szMax, 64, maxVal, 2);
    CString prompt;
    AfxFormatString2(prompt, IDS_MEASUREMENT_RANGE, szMin, szMax);
    AfxMessageBox(prompt, MB_ICONEXCLAMATION, AFX_IDS_APP_TITLE);
    prompt.Empty(); // exception prep
    pDX->Fail();
  }
}

void PASCAL DDX_Twips | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | int & | value
 | ) |  |

Definition at line 18 of file ddxm.cpp.

{
  HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  TCHAR szT[64];

  if (pDX->m_bSaveAndValidate)
  {
    ::GetWindowText(hWndCtrl, szT, sizeof(szT));
    if (szT[0] != NULL) // not empty
    {
      if (!theApp.ParseMeasurement(szT, value))
      {
        AfxMessageBox(IDS_INVALID_MEASUREMENT,MB_OK|MB_ICONINFORMATION);
        pDX->Fail();            // throws exception
      }
      theApp.PrintTwips(szT, 64, value, 2);
      theApp.ParseMeasurement(szT, value);
    }
    else // empty
      value = INT_MAX;
  }
  else
  {
    // convert from twips to default units
    if (value != INT_MAX)
    {
      theApp.PrintTwips(szT, 64, value, 2);
      SetWindowText(hWndCtrl, szT);
    }
  }
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ddxm.h File Reference

  • ole
  • wordpad
Defines | Functions

ddxm.h File Reference

#include <limits.h>

Go to the source code of this file.

Defines

#define | DDXM_BLANK INT_MAX

Functions

void PASCAL | DDV_MinMaxTwips (CDataExchange *pDX, int value, int minVal, int maxVal)
void PASCAL | DDX_Twips (CDataExchange *pDX, int nIDC, int &value)

Define Documentation

#define DDXM_BLANK INT_MAX

Definition at line 13 of file ddxm.h.

Function Documentation

void PASCAL DDV_MinMaxTwips | ( | CDataExchange * | pDX,
 |  | int | value,
 |  | int | minVal,
 |  | int | maxVal
 | ) |  |

Definition at line 50 of file ddxm.cpp.

{
  ASSERT(minVal <= maxVal);
  if (value < minVal || value > maxVal)
  {
    // "The measurement must be between %1 and %2."
    if (!pDX->m_bSaveAndValidate)
    {
      TRACE0("Warning: initial dialog data is out of range.\n");
      return;     // don't stop now
    }
    TCHAR szMin[64];
    TCHAR szMax[64];
    theApp.PrintTwips(szMin, 64, minVal, 2);
    theApp.PrintTwips(szMax, 64, maxVal, 2);
    CString prompt;
    AfxFormatString2(prompt, IDS_MEASUREMENT_RANGE, szMin, szMax);
    AfxMessageBox(prompt, MB_ICONEXCLAMATION, AFX_IDS_APP_TITLE);
    prompt.Empty(); // exception prep
    pDX->Fail();
  }
}

void PASCAL DDX_Twips | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | int & | value
 | ) |  |

Definition at line 18 of file ddxm.cpp.

{
  HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  TCHAR szT[64];

  if (pDX->m_bSaveAndValidate)
  {
    ::GetWindowText(hWndCtrl, szT, sizeof(szT));
    if (szT[0] != NULL) // not empty
    {
      if (!theApp.ParseMeasurement(szT, value))
      {
        AfxMessageBox(IDS_INVALID_MEASUREMENT,MB_OK|MB_ICONINFORMATION);
        pDX->Fail();            // throws exception
      }
      theApp.PrintTwips(szT, 64, value, 2);
      theApp.ParseMeasurement(szT, value);
    }
    else // empty
      value = INT_MAX;
  }
  else
  {
    // convert from twips to default units
    if (value != INT_MAX)
    {
      theApp.PrintTwips(szT, 64, value, 2);
      SetWindowText(hWndCtrl, szT);
    }
  }
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/docopt.cpp File Reference

  • ole
  • wordpad

docopt.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "docopt.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/docopt.h File Reference

  • ole
  • wordpad
Classes

docopt.h File Reference

Go to the source code of this file.

Classes

class | CDocOptPage
class | CEmbeddedOptPage
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/doctype.cpp File Reference

  • ole
  • wordpad
Functions | Variables

doctype.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "strings.h"
#include "multconv.h"

Go to the source code of this file.

Functions

int | GetDocTypeFromName (LPCTSTR pszPathName, CFileException &fe)
CString | GetExtFromType (int nDocType)
CString | GetFileTypes (BOOL bOpen)
int | GetIndexFromType (int nType, BOOL bOpen)
int | GetTypeFromIndex (int nIndex, BOOL bOpen)
BOOL | IsDLLInPath (LPCSTR lpszName)
void | ScanForConverters ()

Variables

DocType | doctypes [NUM_DOC_TYPES]

Function Documentation

int GetDocTypeFromName | ( | LPCTSTR | pszPathName,
 |  | CFileException & | fe
 | ) |  |

Definition at line 108 of file doctype.cpp.

{
  CFile file;
  ASSERT(pszPathName != NULL);

  if (!file.Open(pszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
    return -1;

  CFileStatus stat;
  VERIFY(file.GetStatus(stat));

  if (stat.m_size == 0) // file is empty
  {
    CString ext = CString(pszPathName).Right(4);
    if (ext[0] != '.')
      return RD_TEXT;
#pragma warning(suppress:6400)
    if (lstrcmpi(ext, _T(".doc"))==0)
      return RD_WORDPAD;
#pragma warning(suppress:6400)
    if (lstrcmpi(ext, _T(".rtf"))==0)
      return RD_RICHTEXT;
    return RD_TEXT;
  }
  // RTF
  if (IsLeadMatch(file, byteRTFPrefix, sizeof(byteRTFPrefix)))
    return RD_RICHTEXT;
  // WORD 2
  if (IsLeadMatch(file, byteWord2Prefix, sizeof(byteWord2Prefix)))
    return RD_WINWORD2;
  // EXE
  if (IsLeadMatch(file, byteExePrefix, sizeof(byteExePrefix)))
    return RD_EXE;
  // write file can start with 31BE or 32BE depending on whether it has
  // OLE objects in it or not
  if (IsLeadMatch(file, byteWrite1Prefix, sizeof(byteWrite1Prefix)) ||
    IsLeadMatch(file, byteWrite2Prefix, sizeof(byteWrite2Prefix)))
  {
    file.Close();
    if (IsConverterFormat(szWriteConverter, pszPathName))
      return RD_WRITE;
    else
      return RD_TEXT;
  }

  // test for compound file
  if (IsLeadMatch(file, byteCompFilePrefix, sizeof(byteCompFilePrefix)))
  {
    file.Close();
    if (IsConverterFormat(szWordConverter, pszPathName))
    {
      if (IsWord6(pszPathName))
        return RD_WINWORD6;
      else
        return RD_WORDPAD;
    }
    return RD_TEXT;
  }
  return RD_TEXT;
}

CString GetExtFromType ( int nDocType )

Definition at line 194 of file doctype.cpp.

{
  ScanForConverters();

  CString str = doctypes[nDocType].GetString(DOCTYPE_EXT);
  if (!str.IsEmpty())
  {
    ASSERT(str.GetLength() == 5); // "*.ext"
    ASSERT(str[1] == '.');
    return str.Right(str.GetLength()-1);
  }
  return str;
}

CString GetFileTypes ( BOOL bOpen )

Definition at line 247 of file doctype.cpp.

{
  ScanForConverters();

  CString str;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (bOpen && doctypes[i].bRead && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DESC);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
    else if (!bOpen && doctypes[i].bWrite && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DOCTYPE);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
  }
  return str;
}

int GetIndexFromType | ( | int | nType,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 229 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (i == nType)
        return nCnt;
      nCnt++;
    }
  }
  return -1;
}

int GetTypeFromIndex | ( | int | nIndex,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 209 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (nCnt == nIndex)
        return i;
      nCnt++;
    }
  }
  ASSERT(FALSE);
  return -1;
}

BOOL IsDLLInPath ( LPCSTR lpszName )

Definition at line 187 of file doctype.cpp.

{
  ASSERT(lpszName != NULL);
  OFSTRUCT ofs;
  return (OpenFile(lpszName, &ofs, OF_EXIST) != HFILE_ERROR);
}

void ScanForConverters ( )

Definition at line 169 of file doctype.cpp.

{
  static BOOL bScanned = FALSE;
  if (bScanned)
    return;

  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    LPCSTR lpsz = doctypes[i].pszConverterName;
    // if converter specified but can't find it
    if (lpsz != NULL && *lpsz != NULL && !IsDLLInPath(lpsz))
      doctypes[i].bRead = doctypes[i].bWrite = FALSE;
  }
  if (GetSystemMetrics(SM_DBCSENABLED))
    doctypes[RD_OEMTEXT].bRead = doctypes[RD_OEMTEXT].bWrite = FALSE;
  bScanned = TRUE;
}

Variable Documentation

DocType doctypes[NUM_DOC_TYPES]
Initial value:
{
  DECLARE_DOCTYPE(WINWORD2, FALSE, FALSE, FALSE, NULL),
  DECLARE_DOCTYPE(WINWORD6, TRUE, FALSE, TRUE, szWordConverter),
  DECLARE_DOCTYPE_SYN(WORDPAD, WINWORD6, TRUE, TRUE, FALSE, szWordConverter),
  DECLARE_DOCTYPE(WRITE, TRUE, FALSE, FALSE, szWriteConverter),
  DECLARE_DOCTYPE(RICHTEXT, TRUE, TRUE, FALSE, NULL),
  DECLARE_DOCTYPE(TEXT, TRUE, TRUE, FALSE, NULL),
  DECLARE_DOCTYPE(OEMTEXT, TRUE, TRUE, FALSE, NULL),
  DECLARE_DOCTYPE(ALL, TRUE, FALSE, FALSE, NULL),
  DECLARE_DOCTYPE(EXE, FALSE, FALSE, FALSE, NULL),

}

Definition at line 35 of file doctype.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/doctype.h File Reference

  • ole
  • wordpad
Classes | Defines | Typedefs | Functions | Variables

doctype.h File Reference

Go to the source code of this file.

Classes

struct | DocType

Defines

#define | DECLARE_DOCTYPE(name, b1, b2, b3, p) {RD_##name, IDS_##name##_DOC, b1, b2, b3, p}
#define | DECLARE_DOCTYPE_NULL(name, b1, b2, b3, p) {RD_##name, NULL, b1, b2, b3, p}
#define | DECLARE_DOCTYPE_SYN(actname, name, b1, b2, b3, p) {RD_##actname, IDS_##name##_DOC, b1, b2, b3, p}
#define | DOCTYPE_DESC 1
#define | DOCTYPE_DOCTYPE 0
#define | DOCTYPE_EXT 2
#define | DOCTYPE_PROGID 3
#define | NUM_DOC_TYPES 10
#define | RD_ALL 7
#define | RD_DEFAULT RD_WORDPAD
#define | RD_EMBEDDED 9
#define | RD_EXE 8
#define | RD_NATIVE RD_RICHTEXT
#define | RD_OEMTEXT 6
#define | RD_RICHTEXT 4
#define | RD_TEXT 5
#define | RD_WINWORD2 0
#define | RD_WINWORD6 1
#define | RD_WORDPAD 2
#define | RD_WRITE 3

Typedefs

typedef BOOL(* | PISFORMATFUNC )(LPCSTR pszConverter, LPCSTR pszPathName)

Functions

int | GetDocTypeFromName (LPCTSTR pszPathName, CFileException &fe)
CString | GetExtFromType (int nDocType)
CString | GetFileTypes (BOOL bOpen)
int | GetIndexFromType (int nType, BOOL bOpen)
int | GetTypeFromIndex (int nType, BOOL bOpen)
BOOL | IsDLLInPath (LPCSTR lpszName)
BOOL | IsTextType (LONG_PTR nType)
void | ScanForConverters ()

Variables

DocType | doctypes [NUM_DOC_TYPES]

Define Documentation

#define DECLARE_DOCTYPE | ( | name,
 |  | b1,
 |  | b2,
 |  | b3,
 |  | p |
 | ) |  | {RD_##name, IDS_##name##_DOC, b1, b2, b3, p}

Definition at line 47 of file doctype.h.

#define DECLARE_DOCTYPE_NULL | ( | name,
 |  | b1,
 |  | b2,
 |  | b3,
 |  | p |
 | ) |  | {RD_##name, NULL, b1, b2, b3, p}

Definition at line 51 of file doctype.h.

#define DECLARE_DOCTYPE_SYN | ( | actname,
 |  | name,
 |  | b1,
 |  | b2,
 |  | b3,
 |  | p |
 | ) |  | {RD_##actname, IDS_##name##_DOC, b1, b2, b3, p}

Definition at line 49 of file doctype.h.

#define DOCTYPE_DESC 1

Definition at line 43 of file doctype.h.

#define DOCTYPE_DOCTYPE 0

Definition at line 42 of file doctype.h.

#define DOCTYPE_EXT 2

Definition at line 44 of file doctype.h.

#define DOCTYPE_PROGID 3

Definition at line 45 of file doctype.h.

#define NUM_DOC_TYPES 10

Definition at line 22 of file doctype.h.

#define RD_ALL 7

Definition at line 19 of file doctype.h.

#define RD_DEFAULT RD_WORDPAD

Definition at line 24 of file doctype.h.

#define RD_EMBEDDED 9

Definition at line 21 of file doctype.h.

#define RD_EXE 8

Definition at line 20 of file doctype.h.

#define RD_NATIVE RD_RICHTEXT

Definition at line 25 of file doctype.h.

#define RD_OEMTEXT 6

Definition at line 18 of file doctype.h.

#define RD_RICHTEXT 4

Definition at line 16 of file doctype.h.

#define RD_TEXT 5

Definition at line 17 of file doctype.h.

#define RD_WINWORD2 0

Definition at line 12 of file doctype.h.

#define RD_WINWORD6 1

Definition at line 13 of file doctype.h.

#define RD_WORDPAD 2

Definition at line 14 of file doctype.h.

#define RD_WRITE 3

Definition at line 15 of file doctype.h.

Typedef Documentation

typedef BOOL(* PISFORMATFUNC)(LPCSTR pszConverter, LPCSTR pszPathName)

Definition at line 27 of file doctype.h.

Function Documentation

int GetDocTypeFromName | ( | LPCTSTR | pszPathName,
 |  | CFileException & | fe
 | ) |  |

Definition at line 108 of file doctype.cpp.

{
  CFile file;
  ASSERT(pszPathName != NULL);

  if (!file.Open(pszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
    return -1;

  CFileStatus stat;
  VERIFY(file.GetStatus(stat));

  if (stat.m_size == 0) // file is empty
  {
    CString ext = CString(pszPathName).Right(4);
    if (ext[0] != '.')
      return RD_TEXT;
#pragma warning(suppress:6400)
    if (lstrcmpi(ext, _T(".doc"))==0)
      return RD_WORDPAD;
#pragma warning(suppress:6400)
    if (lstrcmpi(ext, _T(".rtf"))==0)
      return RD_RICHTEXT;
    return RD_TEXT;
  }
  // RTF
  if (IsLeadMatch(file, byteRTFPrefix, sizeof(byteRTFPrefix)))
    return RD_RICHTEXT;
  // WORD 2
  if (IsLeadMatch(file, byteWord2Prefix, sizeof(byteWord2Prefix)))
    return RD_WINWORD2;
  // EXE
  if (IsLeadMatch(file, byteExePrefix, sizeof(byteExePrefix)))
    return RD_EXE;
  // write file can start with 31BE or 32BE depending on whether it has
  // OLE objects in it or not
  if (IsLeadMatch(file, byteWrite1Prefix, sizeof(byteWrite1Prefix)) ||
    IsLeadMatch(file, byteWrite2Prefix, sizeof(byteWrite2Prefix)))
  {
    file.Close();
    if (IsConverterFormat(szWriteConverter, pszPathName))
      return RD_WRITE;
    else
      return RD_TEXT;
  }

  // test for compound file
  if (IsLeadMatch(file, byteCompFilePrefix, sizeof(byteCompFilePrefix)))
  {
    file.Close();
    if (IsConverterFormat(szWordConverter, pszPathName))
    {
      if (IsWord6(pszPathName))
        return RD_WINWORD6;
      else
        return RD_WORDPAD;
    }
    return RD_TEXT;
  }
  return RD_TEXT;
}

CString GetExtFromType ( int nDocType )

Definition at line 194 of file doctype.cpp.

{
  ScanForConverters();

  CString str = doctypes[nDocType].GetString(DOCTYPE_EXT);
  if (!str.IsEmpty())
  {
    ASSERT(str.GetLength() == 5); // "*.ext"
    ASSERT(str[1] == '.');
    return str.Right(str.GetLength()-1);
  }
  return str;
}

CString GetFileTypes ( BOOL bOpen )

Definition at line 247 of file doctype.cpp.

{
  ScanForConverters();

  CString str;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (bOpen && doctypes[i].bRead && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DESC);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
    else if (!bOpen && doctypes[i].bWrite && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DOCTYPE);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
  }
  return str;
}

int GetIndexFromType | ( | int | nType,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 229 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (i == nType)
        return nCnt;
      nCnt++;
    }
  }
  return -1;
}

int GetTypeFromIndex | ( | int | nType,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 209 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (nCnt == nIndex)
        return i;
      nCnt++;
    }
  }
  ASSERT(FALSE);
  return -1;
}

BOOL IsDLLInPath ( LPCSTR lpszName )

Definition at line 187 of file doctype.cpp.

{
  ASSERT(lpszName != NULL);
  OFSTRUCT ofs;
  return (OpenFile(lpszName, &ofs, OF_EXIST) != HFILE_ERROR);
}

BOOL IsTextType ( LONG_PTR nType ) [inline]

Definition at line 28 of file doctype.h.

{return ((nType==RD_TEXT) || (nType==RD_OEMTEXT));}

void ScanForConverters ( )

Definition at line 169 of file doctype.cpp.

{
  static BOOL bScanned = FALSE;
  if (bScanned)
    return;

  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    LPCSTR lpsz = doctypes[i].pszConverterName;
    // if converter specified but can't find it
    if (lpsz != NULL && *lpsz != NULL && !IsDLLInPath(lpsz))
      doctypes[i].bRead = doctypes[i].bWrite = FALSE;
  }
  if (GetSystemMetrics(SM_DBCSENABLED))
    doctypes[RD_OEMTEXT].bRead = doctypes[RD_OEMTEXT].bWrite = FALSE;
  bScanned = TRUE;
}

Variable Documentation

DocType doctypes[NUM_DOC_TYPES]

Definition at line 35 of file doctype.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/filenewd.cpp File Reference

  • ole
  • wordpad

filenewd.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "filenewd.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/filenewd.h File Reference

  • ole
  • wordpad
Classes

filenewd.h File Reference

Go to the source code of this file.

Classes

class CFileNewDialog
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatba.cpp File Reference

  • ole
  • wordpad
Classes | Defines

formatba.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "formatba.h"
#include "strings.h"

Go to the source code of this file.

Classes

class | CFontDesc

Defines

#define | BMH 15
#define | BMW 16
#define | DEVICE_FONT 0x0400
#define | PRINTER_FONT 0x0100
#define | TT_FONT 0x0200

Define Documentation

#define BMH 15

Definition at line 31 of file formatba.cpp.

#define BMW 16

Definition at line 30 of file formatba.cpp.

#define DEVICE_FONT 0x0400

Definition at line 28 of file formatba.cpp.

#define PRINTER_FONT 0x0100

Definition at line 26 of file formatba.cpp.

#define TT_FONT 0x0200

Definition at line 27 of file formatba.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatba.h File Reference

  • ole
  • wordpad
Classes | Defines

formatba.h File Reference

Go to the source code of this file.

Classes

class | CFontComboBox
class | CFormatBar
struct | CHARHDR
class | CLocalComboBox
class | CSizeComboBox

Defines

#define | FN_GETFORMAT 0x1001
#define | FN_SETFORMAT 0x1000

Define Documentation

#define FN_GETFORMAT 0x1001

Definition at line 33 of file formatba.h.

#define FN_SETFORMAT 0x1000

Definition at line 32 of file formatba.h.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatpa.cpp File Reference

  • ole
  • wordpad

formatpa.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "formatpa.h"
#include "ddxm.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatpa.h File Reference

  • ole
  • wordpad
Classes

formatpa.h File Reference

Go to the source code of this file.

Classes

class CFormatParaDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatta.cpp File Reference

  • ole
  • wordpad

formatta.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "formatta.h"
#include "ddxm.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatta.h File Reference

  • ole
  • wordpad
Classes

formatta.h File Reference

Go to the source code of this file.

Classes

class CFormatTabDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/helpids.h File Reference

  • ole
  • wordpad
Defines

helpids.h File Reference

Go to the source code of this file.

Defines

#define | IDH_COMM_GROUPBOX 1026
#define | IDH_WORDPAD_ALIGN 1003
#define | IDH_WORDPAD_BOTTOMMARGIN 1036
#define | IDH_WORDPAD_CENTIMETERS 1028
#define | IDH_WORDPAD_CHECK_FORMATBAR 1032
#define | IDH_WORDPAD_CHECK_RULERBAR 1034
#define | IDH_WORDPAD_CHECK_STATUSBAR 1033
#define | IDH_WORDPAD_CHECK_TOOLBAR 1031
#define | IDH_WORDPAD_FILENEW_DOC 1018
#define | IDH_WORDPAD_FORMATTED 1009
#define | IDH_WORDPAD_INCHES 1027
#define | IDH_WORDPAD_INDENT_FIRST 1022
#define | IDH_WORDPAD_INDENT_LEFT 1020
#define | IDH_WORDPAD_INDENT_RIGHT 1021
#define | IDH_WORDPAD_LEFTMARGIN 1037
#define | IDH_WORDPAD_OPTIONS_AUTOWORDSEL 1019
#define | IDH_WORDPAD_PAGEBREAK 1041
#define | IDH_WORDPAD_PICAS 1030
#define | IDH_WORDPAD_POINTS 1029
#define | IDH_WORDPAD_RIGHTMARGIN 1038
#define | IDH_WORDPAD_SPACE_AFTER 1040
#define | IDH_WORDPAD_SPACE_BEFORE 1039
#define | IDH_WORDPAD_TAB_CLEARALL 1006
#define | IDH_WORDPAD_TABCLEAR 1005
#define | IDH_WORDPAD_TABSET 1004
#define | IDH_WORDPAD_TABSTOPS 1007
#define | IDH_WORDPAD_TEXTFILE 1008
#define | IDH_WORDPAD_TIMEDATE 1001
#define | IDH_WORDPAD_TOPMARGIN 1035
#define | IDH_WORDPAD_WORD6FILE 1017
#define | IDH_WORDPAD_WRAP_NO 1023
#define | IDH_WORDPAD_WRAP_RULER 1025
#define | IDH_WORDPAD_WRAP_WINDOW 1024

Define Documentation

#define IDH_COMM_GROUPBOX 1026

Definition at line 32 of file helpids.h.

#define IDH_WORDPAD_ALIGN 1003

Definition at line 12 of file helpids.h.

#define IDH_WORDPAD_BOTTOMMARGIN 1036

Definition at line 45 of file helpids.h.

#define IDH_WORDPAD_CENTIMETERS 1028

Definition at line 35 of file helpids.h.

#define IDH_WORDPAD_CHECK_FORMATBAR 1032

Definition at line 40 of file helpids.h.

#define IDH_WORDPAD_CHECK_RULERBAR 1034

Definition at line 42 of file helpids.h.

#define IDH_WORDPAD_CHECK_STATUSBAR 1033

Definition at line 41 of file helpids.h.

#define IDH_WORDPAD_CHECK_TOOLBAR 1031

Definition at line 39 of file helpids.h.

#define IDH_WORDPAD_FILENEW_DOC 1018

Definition at line 21 of file helpids.h.

#define IDH_WORDPAD_FORMATTED 1009

Definition at line 18 of file helpids.h.

#define IDH_WORDPAD_INCHES 1027

Definition at line 34 of file helpids.h.

#define IDH_WORDPAD_INDENT_FIRST 1022

Definition at line 26 of file helpids.h.

#define IDH_WORDPAD_INDENT_LEFT 1020

Definition at line 24 of file helpids.h.

#define IDH_WORDPAD_INDENT_RIGHT 1021

Definition at line 25 of file helpids.h.

#define IDH_WORDPAD_LEFTMARGIN 1037

Definition at line 46 of file helpids.h.

#define IDH_WORDPAD_OPTIONS_AUTOWORDSEL 1019

Definition at line 22 of file helpids.h.

#define IDH_WORDPAD_PAGEBREAK 1041

Definition at line 51 of file helpids.h.

#define IDH_WORDPAD_PICAS 1030

Definition at line 37 of file helpids.h.

#define IDH_WORDPAD_POINTS 1029

Definition at line 36 of file helpids.h.

#define IDH_WORDPAD_RIGHTMARGIN 1038

Definition at line 47 of file helpids.h.

#define IDH_WORDPAD_SPACE_AFTER 1040

Definition at line 50 of file helpids.h.

#define IDH_WORDPAD_SPACE_BEFORE 1039

Definition at line 49 of file helpids.h.

#define IDH_WORDPAD_TAB_CLEARALL 1006

Definition at line 15 of file helpids.h.

#define IDH_WORDPAD_TABCLEAR 1005

Definition at line 14 of file helpids.h.

#define IDH_WORDPAD_TABSET 1004

Definition at line 13 of file helpids.h.

#define IDH_WORDPAD_TABSTOPS 1007

Definition at line 16 of file helpids.h.

#define IDH_WORDPAD_TEXTFILE 1008

Definition at line 17 of file helpids.h.

#define IDH_WORDPAD_TIMEDATE 1001

Definition at line 10 of file helpids.h.

#define IDH_WORDPAD_TOPMARGIN 1035

Definition at line 44 of file helpids.h.

#define IDH_WORDPAD_WORD6FILE 1017

Definition at line 20 of file helpids.h.

#define IDH_WORDPAD_WRAP_NO 1023

Definition at line 28 of file helpids.h.

#define IDH_WORDPAD_WRAP_RULER 1025

Definition at line 30 of file helpids.h.

#define IDH_WORDPAD_WRAP_WINDOW 1024

Definition at line 29 of file helpids.h.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ipframe.cpp File Reference

  • ole
  • wordpad
Defines

ipframe.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "formatba.h"
#include "ruler.h"
#include "ipframe.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "colorlis.h"

Go to the source code of this file.

Defines

#define | NUM_PEN_ITEMS 7
#define | NUM_PEN_TOGGLE 5

Define Documentation

#define NUM_PEN_ITEMS 7

Definition at line 71 of file ipframe.cpp.

#define NUM_PEN_TOGGLE 5

Definition at line 72 of file ipframe.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ipframe.h File Reference

  • ole
  • wordpad
Classes

ipframe.h File Reference

Go to the source code of this file.

Classes

class | CInPlaceFrame
class | CWordPadResizeBar
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/key.cpp File Reference

  • ole
  • wordpad

key.cpp File Reference

#include "stdafx.h"
#include "key.h"
#include <winreg.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/key.h File Reference

  • ole
  • wordpad
Classes

key.h File Reference

Go to the source code of this file.

Classes

class CKey
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/listdlg.cpp File Reference

  • ole
  • wordpad

listdlg.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "listdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/listdlg.h File Reference

  • ole
  • wordpad
Classes

listdlg.h File Reference

Go to the source code of this file.

Classes

class CListDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/mainfrm.cpp File Reference

  • ole
  • wordpad
Defines

mainfrm.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "mainfrm.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "strings.h"
#include "colorlis.h"

Go to the source code of this file.

Defines

#define | NUM_PEN_ITEMS 7
#define | NUM_PEN_TOGGLE 5

Define Documentation

#define NUM_PEN_ITEMS 7

Definition at line 92 of file mainfrm.cpp.

#define NUM_PEN_TOGGLE 5

Definition at line 93 of file mainfrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/mainfrm.h File Reference

  • ole
  • wordpad
Classes

mainfrm.h File Reference

#include "formatba.h"
#include "ruler.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/mswd6_32.h File Reference

  • ole
  • wordpad
Typedefs | Functions

mswd6_32.h File Reference

Go to the source code of this file.

Typedefs

typedef unsigned long(pascal * | PFN_RTF_CALLBACK )(int, int)

Functions

int pascal | ForeignToRtf32 (HANDLE, void *, HANDLE, HANDLE, HANDLE, PFN_RTF_CALLBACK)
int pascal | InitConverter32 (HANDLE, char *)
int pascal | IsFormatCorrect32 (HANDLE, HANDLE)
HANDLE pascal | RegisterApp32 (unsigned long, void *)
int pascal | RtfToForeign32 (HANDLE, LPSTORAGE, HANDLE, HANDLE, PFN_RTF_CALLBACK)

Typedef Documentation

typedef unsigned long(pascal * PFN_RTF_CALLBACK)(int, int)

Definition at line 13 of file mswd6_32.h.

Function Documentation

int pascal ForeignToRtf32 | ( | HANDLE | ,
 |  | void * | ,
 |  | HANDLE | ,
 |  | HANDLE | ,
 |  | HANDLE | ,
 |  | PFN_RTF_CALLBACK |
 | ) |  |
int pascal InitConverter32 | ( | HANDLE | ,
 |  | char * |
 | ) |  |
int pascal IsFormatCorrect32 | ( | HANDLE | ,
 |  | HANDLE |
 | ) |  |
HANDLE pascal RegisterApp32 | ( | unsigned | long,
 |  | void * |
 | ) |  |
int pascal RtfToForeign32 | ( | HANDLE | ,
 |  | LPSTORAGE | ,
 |  | HANDLE | ,
 |  | HANDLE | ,
 |  | PFN_RTF_CALLBACK |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/multconv.cpp File Reference

  • ole
  • wordpad
Defines

multconv.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "multconv.h"
#include "mswd6_32.h"

Go to the source code of this file.

Defines

#define BUFFSIZE 4096

Define Documentation

#define BUFFSIZE 4096

Definition at line 26 of file multconv.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/multconv.h File Reference

  • ole
  • wordpad
Classes

multconv.h File Reference

Go to the source code of this file.

Classes

class | COEMFile
class | CTrackFile
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/options.cpp File Reference

  • ole
  • wordpad

options.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "strings.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/options.h File Reference

  • ole
  • wordpad
Classes

options.h File Reference

Go to the source code of this file.

Classes

class | CDocOptions
class | CUnit
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/optionsh.cpp File Reference

  • ole
  • wordpad

optionsh.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "unitspag.h"
#include "docopt.h"
#include "optionsh.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/optionsh.h File Reference

  • ole
  • wordpad
Classes

optionsh.h File Reference

Go to the source code of this file.

Classes

class COptionSheet
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/pageset.cpp File Reference

  • ole
  • wordpad

pageset.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "resource.h"
#include "pageset.h"
#include "ruler.h"
#include "ddxm.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/pageset.h File Reference

  • ole
  • wordpad
Classes

pageset.h File Reference

Go to the source code of this file.

Classes

class CPageSetupDlg
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/penwin.h File Reference

  • ole
  • wordpad
Classes | Defines | Typedefs | Functions | Variables

penwin.h File Reference

#include <windows.h>
#include <skbapi.h>

Go to the source code of this file.

Classes

struct | tagABSTIME
struct | tagANIMATEINFO
struct | tagBOXEDITINFO
struct | tagBOXLAYOUT
struct | tagBOXRESULTS
struct | tagCALBSTRUCT
struct | tagCTLINITBEDIT
struct | tagCTLINITHEDIT
struct | tagCTLINITIEDIT
struct | tagGUIDE
struct | tagIMECOLORS
struct | tagINKINGINFO
struct | tagINPPARAMS
struct | tagINTERVAL
struct | tagOEM_PENPACKET
struct | tagOEMPENINFO
struct | tagPCMINFO
struct | tagPDEVENT
struct | tagPENDATAHEADER
struct | tagPENINFO
struct | tagPENPACKET
struct | tagPENTIP
struct | tagRC
struct | tagRCRESULT
struct | tagRECTL
struct | tagRECTOFS
struct | tagSTRKFMT
struct | tagSTROKEINFO
struct | tagSYC
struct | tagSYE
struct | tagSYG
struct | tagTARGET
struct | tagTARGINFO

Defines

#define | AI_CBSTROKE 0xFFFF
#define | AI_SKIPUPSTROKES 0x0001
#define | ALC_ALL
#define | ALC_ALPHA (ALC_LCALPHA | ALC_UCALPHA)
#define | ALC_ALPHANUMERIC (ALC_ALPHA | ALC_NUMERIC)
#define | ALC_ASCII 0x00000080L
#define | ALC_DBCS 0x00000400L
#define | ALC_DEFAULT 0x00000000L
#define | ALC_GESTURE 0x00004000L
#define | ALC_GLOBALPRIORITY 0x10000000L
#define | ALC_HIRAGANA 0x00010000L
#define | ALC_JIS1 0x00000800L
#define | ALC_KANJI 0x00040000L
#define | ALC_KANJIALL (ALC_ALL | ALC_HIRAGANA | ALC_KATAKANA | ALC_KANJI)
#define | ALC_KANJISYSMINIMUM (ALC_SYSMINIMUM | ALC_HIRAGANA | ALC_KATAKANA | ALC_JIS1)
#define | ALC_KATAKANA 0x00020000L
#define | ALC_LCALPHA 0x00000001L
#define | ALC_MATH 0x00000010L
#define | ALC_MONETARY 0x00000020L
#define | ALC_NONPRINT 0x00000200L
#define | ALC_NOPRIORITY 0x00000000L
#define | ALC_NUMERIC 0x00000004L
#define | ALC_OEM 0x0FF80000L
#define | ALC_OTHER 0x00000040L
#define | ALC_PUNC 0x00000008L
#define | ALC_RESERVED 0xE0003000L
#define | ALC_SYSMINIMUM (ALC_ALPHANUMERIC | ALC_PUNC | ALC_WHITE | ALC_GESTURE)
#define | ALC_UCALPHA 0x00000002L
#define | ALC_USEBITMAP 0x00008000L
#define | ALC_WHITE 0x00000100L
#define | BEI_FACESIZE 32
#define | BEIF_BOXCROSS 0x0001
#define | BESC_DEFAULT 0
#define | BESC_KANJIFIXED 2
#define | BESC_ROMANFIXED 1
#define | BESC_USERDEFINED 3
#define | BITPENUP 0x8000
#define | BXD_BASEHEIGHT 13
#define | BXD_BASEHORZ 0
#define | BXD_CELLHEIGHT 16
#define | BXD_CELLWIDTH 12
#define | BXD_CUSPHEIGHT 2
#define | BXD_ENDCUSPHEIGHT 4
#define | BXD_MIDFROMBASE 0
#define | BXDK_BASEHEIGHT 28
#define | BXDK_BASEHORZ 0
#define | BXDK_CELLHEIGHT 32
#define | BXDK_CELLWIDTH 32
#define | BXDK_CUSPHEIGHT 28
#define | BXDK_ENDCUSPHEIGHT 10
#define | BXDK_MIDFROMBASE 0
#define | BXS_BOXCROSS 0x0004U
#define | BXS_MASK 0x0007U
#define | BXS_NONE 0x0000U
#define | BXS_RECT 0x0001U
#define | cbDictPathMax 255
#define | cbRcLanguageMax 44
#define | cbRcrgbfAlcMax 32
#define | cbRcUserMax 32
#define | ChSyvToAnsi(syv) ((BYTE) (LOBYTE(LOWORD((syv)))))
#define | CIB_NOACTIONHANDLE 0x0002
#define | CIB_NOFLASHCURSOR 0x0004
#define | CIB_NOGDMSG 0x0001
#define | CIH_NOACTIONHANDLE 0x0002
#define | CIH_NOEDITTEXT 0x0004
#define | CIH_NOFLASHCURSOR 0x0008
#define | CIH_NOGDMSG 0x0001
#define | CL_MAXIMUM 100
#define | CL_MINIMUM 1
#define | CL_NULL 0
#define | CMPD_COMPRESS 0x0001
#define | CMPD_DECOMPRESS 0x0002
#define | CPD_DEFAULT 0x047F
#define | CPD_TIME 0x0400
#define | CPD_USERBYTE 0x0100
#define | CPD_USERDWORD 0x0300
#define | CPD_USERWORD 0x0200
#define | CPDR_BOX 1
#define | CPDR_LASSO 2
#define | CRUC_NOTIFY 0
#define | CRUC_REMOVE 1
#define | CTLINIT_BEDIT 7
#define | CTLINIT_HEDIT 1
#define | CTLINIT_IEDIT 9
#define | CTLINIT_MAX 10
#define | CWR_BOXES 0x0200
#define | CWR_HEDIT 0x0080
#define | CWR_INSERT 0x0008
#define | CWR_KEYBOARD 0x0100
#define | CWR_KKCONVERT 0x0020
#define | CWR_REPLACECR 0x0001
#define | CWR_REPLACETAB 0x0004
#define | CWR_SIMPLE 0x0040
#define | CWR_SINGLELINEEDIT (CWR_REPLACECR|CWR_STRIPLF|CWR_REPLACETAB)
#define | CWR_STRIPCR CWR_REPLACECR
#define | CWR_STRIPLF 0x0002
#define | CWR_STRIPTAB CWR_REPLACETAB
#define | CWR_TITLE 0x0010
#define | cwRcReservedMax 8
#define | CWRK_BASIC 1
#define | CWRK_DEFAULT 0
#define | CWRK_FULL 2
#define | CWRK_NUMPAD 3
#define | CWRK_TELPAD 4
#define | DECLARE_HANDLE32(name)
#define | DIRQ_ADD 9
#define | DIRQ_CLEANUP 15
#define | DIRQ_CLOSE 5
#define | DIRQ_CONFIGURE 3
#define | DIRQ_COPYRIGHT 16
#define | DIRQ_DELETE 10
#define | DIRQ_DESCRIPTION 2
#define | DIRQ_FLUSH 11
#define | DIRQ_INIT 14
#define | DIRQ_OPEN 4
#define | DIRQ_QUERY 1
#define | DIRQ_RCCHANGE 12
#define | DIRQ_SETWORDLISTS 6
#define | DIRQ_STRING 7
#define | DIRQ_SUGGEST 8
#define | DIRQ_SYMBOLGRAPH 13
#define | DIRQ_USER 4096
#define | DPD_DRAWSEL 0x0002
#define | DPD_HDCPEN 0x0001
#define | DrawPenDataFmt(hdc, lprect, hpndt) DrawPenDataEx(hdc, lprect, hpndt, 0, IX_END, 0, IX_END, NULL, NULL, 0)
#define | DRV_BADPARAM1 0xFFFFFFFF
#define | DRV_BADPARAM2 0xFFFFFFFE
#define | DRV_BADSTRUCT 0xFFFFFFFD
#define | DRV_Calibrate DRV_RESERVED+17
#define | DRV_FAILURE 0x00000000
#define | DRV_GetCalibration DRV_RESERVED+11
#define | DRV_GetName DRV_RESERVED+5
#define | DRV_GetPenInfo DRV_RESERVED+7
#define | DRV_GetPenSamplingRate DRV_RESERVED+16
#define | DRV_GetVersion DRV_RESERVED+6
#define | DRV_PenPlayBack DRV_RESERVED+9
#define | DRV_PenPlayStart DRV_RESERVED+8
#define | DRV_PenPlayStop DRV_RESERVED+10
#define | DRV_Query DRV_RESERVED+15
#define | DRV_RemoveEntryPoints DRV_RESERVED+2
#define | DRV_RemovePenDriverEntryPoints DRV_RESERVED+2
#define | DRV_Reserved1 DRV_RESERVED+13
#define | DRV_Reserved2 DRV_RESERVED+14
#define | DRV_SetCalibration DRV_RESERVED+12
#define | DRV_SetEntryPoints DRV_RESERVED+1
#define | DRV_SetPenDriverEntryPoints DRV_RESERVED+1
#define | DRV_SetPenSamplingDist DRV_RESERVED+4
#define | DRV_SetPenSamplingRate DRV_RESERVED+3
#define | DRV_SUCCESS 0x00000001
#define | dwDiffAT(at1, at2) (1000L*((at2).sec - (at1).sec) - (DWORD)(at1).ms + (DWORD)(at2).ms)
#define | dwDurInterval(lpi) dwDiffAT((lpi)->atBegin, (lpi)->atEnd)
#define | ENUM_MAXIMUM 4096
#define | ENUM_MINIMUM 1
#define | EPDP_REMOVE 0x0001
#define | EPDS_EQ 0x0000
#define | EPDS_GT 0x0020
#define | EPDS_GTE 0x0050
#define | EPDS_INKSET 8
#define | EPDS_LT 0x0010
#define | EPDS_LTE 0x0060
#define | EPDS_NE 0x0040
#define | EPDS_NOT 0x0040
#define | EPDS_PENTIP 4
#define | EPDS_REMOVE 0x8000
#define | EPDS_SELECT 1
#define | EPDS_STROKEINDEX 2
#define | EPDS_TIPCOLOR 5
#define | EPDS_TIPNIB 7
#define | EPDS_TIPWIDTH 6
#define | EPDS_USER 3
#define | EventRefFromWpLp(wp, lp) (LOWORD(lp))
#define | FAbsTimeInInterval(at, lpi) (FLTEAbsTime((lpi)->atBegin, at) && FLTEAbsTime(at, (lpi)->atEnd))
#define | FEQAbsTime(at1, at2) ((at1).sec == (at2).sec && (at1).ms == (at2).ms)
#define | FIntervalInInterval(lpiT, lpiS)
#define | FIntervalXInterval(lpiT, lpiS)
#define | FIsAnsi(syv) (HIWORD((syv))==SYVHI_ANSI)
#define | FIsAnsiGesture(syv)
#define | FIsGesture(syv) (HIWORD((syv))==SYVHI_GESTURE)
#define | FIsKanji(syv) (HIWORD((syv))==SYVHI_KANJI)
#define | FIsSelectGesture(syv) ((syv) >= SYVSELECTFIRST && (syv) <= SYVSELECTLAST)
#define | FIsShape(syv) (HIWORD((syv))==SYVHI_SHAPE)
#define | FIsSpecial(syv) (HIWORD((syv))==SYVHI_SPECIAL)
#define | FIsStdGesture(syv)
#define | FIsUniCode(syv) (HIWORD((syv))==SYVHI_UNICODE)
#define | FIsVKey(syv) (HIWORD((syv))==SYVHI_VKEY)
#define | FLTAbsTime(at1, at2) ((at1).sec < (at2).sec || ((at1).sec == (at2).sec && (at1).ms < (at2).ms))
#define | FLTEAbsTime(at1, at2) ((at1).sec < (at2).sec || ((at1).sec == (at2).sec && (at1).ms <= (at2).ms))
#define | FPenUpX(x) ((BOOL)(((x) & BITPENUP) != 0))
#define | GetWEventRef() (LOWORD(GetMessageExtraInfo()))
#define | GGRC_DICTBUFTOOSMALL 1
#define | GGRC_NA 3
#define | GGRC_OK 0
#define | GGRC_PARAMERROR 2
#define | GPA_MAXLEN 1
#define | GPA_PDTS 3
#define | GPA_POINTS 2
#define | GPA_RATE 4
#define | GPA_RECTBOUND 5
#define | GPA_RECTBOUNDINK 6
#define | GPA_SIZE 7
#define | GPA_STROKES 8
#define | GPA_TIME 9
#define | GPA_USER 10
#define | GPA_VERSION 11
#define | GRH_ALL 0
#define | GRH_GESTURE 1
#define | GRH_NONGESTURE 2
#define | GSA_DOWN 8
#define | GSA_PENTIP 1
#define | GSA_PENTIPCLASS 2
#define | GSA_PENTIPTABLE 10
#define | GSA_RECTBOUND 9
#define | GSA_SELECT 7
#define | GSA_SIZE 6
#define | GSA_SIZETABLE 11
#define | GSA_TIME 5
#define | GSA_USER 3
#define | GSA_USERCLASS 4
#define | GSA_USERTABLE 12
#define | GST_ALL 0x00000317L
#define | GST_CIRCLE 0x00000300L
#define | GST_CIRCLELO 0x00000100L
#define | GST_CIRCLEUP 0x00000200L
#define | GST_CLIP 0x00000002L
#define | GST_EDIT 0x00000010L
#define | GST_KKCONVERT 0x00000008L
#define | GST_SEL 0x00000001L
#define | GST_SYS 0x00000017L
#define | GST_WHITE 0x00000004L
#define | HE_CANCELKKCONVERT 32
#define | HE_CHAROFFSET 15
#define | HE_CHARPOSITION 14
#define | HE_DEFAULTFONT 13
#define | HE_ENABLEALTLIST 40
#define | HE_FIXKKCONVERT 33
#define | HE_GETBOXLAYOUT 20
#define | HE_GETIMEDEFAULT 37
#define | HE_GETINFLATE 5
#define | HE_GETINKHANDLE 9
#define | HE_GETKKCONVERT 31
#define | HE_GETKKSTATUS 34
#define | HE_GETLENSTYPE 43
#define | HE_GETRC 3
#define | HE_GETRCRESULT 22
#define | HE_GETRCRESULTCODE 12
#define | HE_GETUNDERLINE 7
#define | HE_HIDEALTLIST 42
#define | HE_KKCONVERT 30
#define | HE_KKNOCONVERT 35
#define | HE_SETBOXLAYOUT 21
#define | HE_SETIMEDEFAULT 36
#define | HE_SETINFLATE 6
#define | HE_SETINKMODE 10
#define | HE_SETLENSTYPE 44
#define | HE_SETRC 4
#define | HE_SETUNDERLINE 8
#define | HE_SHOWALTLIST 41
#define | HE_STOPINKMODE 11
#define | HEAL_DEFAULT -1L
#define | HEKK_CANDIDATE 2
#define | HEKK_CONVERT 1
#define | HEKK_DBCSCHAR 3
#define | HEKK_DEFAULT 0
#define | HEKK_HIRAGANA 5
#define | HEKK_KATAKANA 6
#define | HEKK_SBCSCHAR 4
#define | HEKKR_CONVERT 2
#define | HEKKR_PRECONVERT 1
#define | HEKKR_TEMPCONFIRM 3
#define | HEP_NORECOG 0
#define | HEP_RECOG 1
#define | HEP_WAITFORTAP 2
#define | HKP_SETHOOK 0
#define | HKP_UNHOOK 0xFFFF
#define | HN_BEGINDIALOG 40
#define | HN_DELAYEDRECOGFAIL 5
#define | HN_ENDDIALOG 41
#define | HN_ENDKKCONVERT 30
#define | HN_ENDREC 4
#define | HN_RCRESULT HN_RESULT
#define | HN_RESULT 20
#define | HpcmFromWpLp(wp, lp) ((HPCM)HIWORD(lp))
#define | HRCR_COMPLETE 3
#define | HRCR_CONFLICT (-6)
#define | HRCR_ERROR (-1)
#define | HRCR_GESTURE 2
#define | HRCR_HOOKED (-8)
#define | HRCR_INCOMPLETE 0
#define | HRCR_INVALIDGUIDE (-3)
#define | HRCR_INVALIDPNDT (-4)
#define | HRCR_MEMERR (-2)
#define | HRCR_NORESULTS 4
#define | HRCR_OK 1
#define | HRCR_UNSUPPORTED (-5)
#define | HtrgFromHwnd(hwnd) ((HTRG)(UINT)(hwnd))
#define | HWL_SYSTEM ((HWL)1)
#define | HwndFromHtrg(htrg) ((HWND)(DWORD)(htrg))
#define | HWR_APPWIDE 1
#define | HWR_RESULTS 0
#define | IDC_ALTSELECT MAKEINTRESOURCE(32501)
#define | IDC_PEN MAKEINTRESOURCE(32631)
#define | IE_CANUNDO (EM_CANUNDO)
#define | IE_DOCOMMAND (IE_MSGFIRST+50)
#define | IE_EMPTYUNDOBUFFER (EM_EMPTYUNDOBUFFER)
#define | IE_GETAPPDATA (IE_MSGFIRST+34)
#define | IE_GETBKGND (IE_MSGFIRST+6)
#define | IE_GETCOMMAND (IE_MSGFIRST+51)
#define | IE_GETCOUNT (IE_MSGFIRST+52)
#define | IE_GETDRAWOPTS (IE_MSGFIRST+36)
#define | IE_GETERASERTIP (IE_MSGFIRST+4)
#define | IE_GETFORMAT (IE_MSGFIRST+38)
#define | IE_GETGESTURE (IE_MSGFIRST+53)
#define | IE_GETGRIDORIGIN (IE_MSGFIRST+8)
#define | IE_GETGRIDPEN (IE_MSGFIRST+10)
#define | IE_GETGRIDSIZE (IE_MSGFIRST+12)
#define | IE_GETINK (IE_MSGFIRST+0)
#define | IE_GETINKINPUT (IE_MSGFIRST+40)
#define | IE_GETINKRECT (IE_MSGFIRST+16)
#define | IE_GETMENU (IE_MSGFIRST+54)
#define | IE_GETMODE (IE_MSGFIRST+14)
#define | IE_GETMODIFY (EM_GETMODIFY)
#define | IE_GETNOTIFY (IE_MSGFIRST+42)
#define | IE_GETPAINTDC (IE_MSGFIRST+55)
#define | IE_GETPDEVENT (IE_MSGFIRST+56)
#define | IE_GETPENTIP (IE_MSGFIRST+2)
#define | IE_GETRECOG (IE_MSGFIRST+44)
#define | IE_GETSECURITY (IE_MSGFIRST+46)
#define | IE_GETSEL (IE_MSGFIRST+48)
#define | IE_GETSELCOUNT (IE_MSGFIRST+57)
#define | IE_GETSELITEMS (IE_MSGFIRST+58)
#define | IE_GETSTYLE (IE_MSGFIRST+59)
#define | IE_MSGFIRST (WM_USER+150)
#define | IE_SETAPPDATA (IE_MSGFIRST+35)
#define | IE_SETBKGND (IE_MSGFIRST+7)
#define | IE_SETDRAWOPTS (IE_MSGFIRST+37)
#define | IE_SETERASERTIP (IE_MSGFIRST+5)
#define | IE_SETFORMAT (IE_MSGFIRST+39)
#define | IE_SETGRIDORIGIN (IE_MSGFIRST+9)
#define | IE_SETGRIDPEN (IE_MSGFIRST+11)
#define | IE_SETGRIDSIZE (IE_MSGFIRST+13)
#define | IE_SETINK (IE_MSGFIRST+1)
#define | IE_SETINKINPUT (IE_MSGFIRST+41)
#define | IE_SETMODE (IE_MSGFIRST+15)
#define | IE_SETMODIFY (EM_SETMODIFY)
#define | IE_SETNOTIFY (IE_MSGFIRST+43)
#define | IE_SETPENTIP (IE_MSGFIRST+3)
#define | IE_SETRECOG (IE_MSGFIRST+45)
#define | IE_SETSECURITY (IE_MSGFIRST+47)
#define | IE_SETSEL (IE_MSGFIRST+49)
#define | IE_UNDO (EM_UNDO)
#define | IEB_BIT_CENTER 3
#define | IEB_BIT_STRETCH 5
#define | IEB_BIT_TILE 4
#define | IEB_BIT_UL 2
#define | IEB_BRUSH 1
#define | IEB_DEFAULT 0
#define | IEB_OWNERDRAW 6
#define | IEDO_FAST 0x0001
#define | IEDO_NONE 0x0000
#define | IEDO_RESERVED 0xFFFC
#define | IEDO_SAVEUPSTROKES 0x0002
#define | IEGI_ALL 0x0000
#define | IEGI_SELECTION 0x0001
#define | IEI_CROP 0x0004
#define | IEI_DISCARD 0x0008
#define | IEI_MOVE 0x0001
#define | IEI_RESERVED 0xFFF0
#define | IEI_RESIZE 0x0002
#define | IEM_CLEAR 5
#define | IEM_COPY 3
#define | IEM_CUT 2
#define | IEM_ERASE 7
#define | IEM_LASSO 9
#define | IEM_PASTE 4
#define | IEM_PROPERTIES 8
#define | IEM_RESIZE 10
#define | IEM_SELECTALL 6
#define | IEM_UNDO 1
#define | IEM_USER 100
#define | IEMODE_ERASE 1
#define | IEMODE_LASSO 2
#define | IEMODE_READY 0
#define | IEN_EDIT 0x0010
#define | IEN_FOCUS 0x0004
#define | IEN_NULL 0x0000
#define | IEN_PAINT 0x0002
#define | IEN_PDEVENT 0x0001
#define | IEN_PROPERTIES 0x0020
#define | IEN_RESERVED 0xFF80
#define | IEN_SCROLL 0x0008
#define | IER_ERROR (-1)
#define | IER_MEMERR (-7)
#define | IER_NO 0
#define | IER_NOCOMMAND (-8)
#define | IER_NOGESTURE (-9)
#define | IER_NOPDEVENT (-10)
#define | IER_NOTINPAINT (-11)
#define | IER_OK 0
#define | IER_OWNERDRAW (-3)
#define | IER_PARAMERR (-2)
#define | IER_PENDATA (-12)
#define | IER_SCALE (-6)
#define | IER_SECURITY (-4)
#define | IER_SELECTION (-5)
#define | IER_YES 1
#define | IEREC_ALL (IEREC_GESTURE)
#define | IEREC_GESTURE 0x0001
#define | IEREC_NONE 0x0000
#define | IEREC_RESERVED 0xFFFE
#define | IES_BORDER 0x0001
#define | IES_HSCROLL 0x0002
#define | IES_OWNERDRAW 0x0008
#define | IES_VSCROLL 0x0004
#define | IESEC_NOCOPY 0x0001
#define | IESEC_NOCUT 0x0002
#define | IESEC_NOERASE 0x0020
#define | IESEC_NOGET 0x0040
#define | IESEC_NOINK 0x0010
#define | IESEC_NOPASTE 0x0004
#define | IESEC_NOSET 0x0080
#define | IESEC_NOUNDO 0x0008
#define | IESEC_RESERVED 0xFF00
#define | IESF_ALL 0x0001
#define | IESF_PENTIP (IESF_TIPCOLOR|IESF_TIPWIDTH)
#define | IESF_SELECTION 0x0002
#define | IESF_STROKE 0x0004
#define | IESF_TIPCOLOR 0x0008
#define | IESF_TIPWIDTH 0x0010
#define | IESI_APPEND 0x0001
#define | IESI_REPLACE 0x0000
#define | IN_CHANGE ((IEN_EDIT<<8)|6)
#define | IN_CLOSE ((IEN_NULL<<8)|15)
#define | IN_COMMAND ((IEN_EDIT<<8)|14)
#define | IN_ERASEBKGND ((IEN_NULL<<8)|1)
#define | IN_GESTURE ((IEN_EDIT<<8)|13)
#define | IN_HSCROLL ((IEN_SCROLL<<8)|11)
#define | IN_KILLFOCUS ((IEN_FOCUS<<8)|9)
#define | IN_MEMERR ((IEN_NULL<<8)|10)
#define | IN_MODECHANGED ((IEN_EDIT<<8)|5)
#define | IN_PAINT ((IEN_NULL<<8)|3)
#define | IN_PDEVENT ((IEN_PDEVENT<<8)|0)
#define | IN_POSTPAINT ((IEN_PAINT<<8)|4)
#define | IN_PREPAINT ((IEN_PAINT<<8)|2)
#define | IN_PROPERTIES ((IEN_PROPERTIES<<8)|16)
#define | IN_SETFOCUS ((IEN_FOCUS<<8)|8)
#define | IN_UPDATE ((IEN_EDIT<<8)|7)
#define | IN_VSCROLL ((IEN_SCROLL<<8)|12)
#define | INKWIDTH_MAXIMUM 15
#define | INKWIDTH_MINIMUM 0
#define | IsAlcBitAnsi(lprc, i) ((MpAlcB(lprc,i) & MpIbf(i)) != 0)
#define | ISR_BADINDEX (-3)
#define | ISR_BADINKSET (-2)
#define | ISR_ERROR (-1)
#define | iSycNull (-1)
#define | IX_END 0xFFFF
#define | LPDFNULL ((LPDF)NULL)
#define | LRET_ABORT (-1L)
#define | LRET_DONE 1L
#define | LRET_HPENDATA (-3L)
#define | LRET_HRC (-2L)
#define | LRET_PRIVATE (-4L)
#define | MakeAbsTime(lpat, sec, ms)
#define | MAXDICTIONARIES 16
#define | MAXHOTSPOT 8
#define | MAXOEMDATAWORDS 6
#define | MpAlcB(lprc, i) ((lprc)->rgbfAlc[((i) & 0xff) >> 3])
#define | MpIbf(i) ((BYTE)(1 << ((i) & 7)))
#define | OBM_HANBTNDISABLED 32759
#define | OBM_HANBTNDOWN 32760
#define | OBM_HANBTNUP 32761
#define | OBM_KKCBTNDISABLED 32756
#define | OBM_KKCBTNDOWN 32757
#define | OBM_KKCBTNUP 32758
#define | OBM_PTYBTNDISABLED 32750
#define | OBM_PTYBTNDOWN 32751
#define | OBM_PTYBTNUP 32752
#define | OBM_SIPBTNDISABLED 32753
#define | OBM_SIPBTNDOWN 32754
#define | OBM_SIPBTNUP 32755
#define | OBM_SKBBTNDISABLED 32765
#define | OBM_SKBBTNDOWN 32766
#define | OBM_SKBBTNUP 32767
#define | OBM_ZENBTNDISABLED 32762
#define | OBM_ZENBTNDOWN 32763
#define | OBM_ZENBTNUP 32764
#define | PCM_ADDDEFAULTS RC_LDEFAULTFLAGS
#define | PCM_DOPOLLING 0x00040000L
#define | PCM_INVERT 0x00000020L
#define | PCM_PENUP 0x00000001L
#define | PCM_RANGE 0x00000002L
#define | PCM_RECTBOUND 0x00004000L
#define | PCM_RECTEXCLUDE 0x00002000L
#define | PCM_RGNBOUND 0x00010000L
#define | PCM_RGNEXCLUDE 0x00020000L
#define | PCM_TAPNHOLD 0x00080000L
#define | PCM_TIMEOUT 0x00008000L
#define | PCMR_ALREADYCOLLECTING (-1)
#define | PCMR_APPTERMINATED (-10)
#define | PCMR_DISPLAYERR (-15)
#define | PCMR_ERROR (-14)
#define | PCMR_EVENTLOCK (-3)
#define | PCMR_INVALID_PACKETID (-4)
#define | PCMR_INVALIDCOLLECTION (-2)
#define | PCMR_OK 0
#define | PCMR_OVERFLOW (-13)
#define | PCMR_SELECT (-12)
#define | PCMR_TAP (-11)
#define | PCMR_TERMBOUND (-9)
#define | PCMR_TERMEX (-8)
#define | PCMR_TERMINVERT (-16)
#define | PCMR_TERMPENUP (-7)
#define | PCMR_TERMRANGE (-6)
#define | PCMR_TERMTIMEOUT (-5)
#define | PDC_BARREL1 0x00000020L
#define | PDC_BARREL2 0x00000040L
#define | PDC_BARREL3 0x00000080L
#define | PDC_INTEGRATED 0x00000001L
#define | PDC_INVERT 0x00000008L
#define | PDC_PROXIMITY 0x00000002L
#define | PDC_RANGE 0x00000004L
#define | PDC_RELATIVE 0x00000010L
#define | PDK_BARREL1 0x0002
#define | PDK_BARREL2 0x0004
#define | PDK_BARREL3 0x0008
#define | PDK_DOWN 0x0001
#define | PDK_DRIVER 0x8000
#define | PDK_INKSTOPPED 0x2000
#define | PDK_INVERTED 0x0080
#define | PDK_NULL 0x0000
#define | PDK_OUTOFRANGE 0x4000
#define | PDK_PENIDMASK 0x0F00
#define | PDK_SWITCHES 0x000f
#define | PDK_TIPMASK 0x0001
#define | PDK_TRANSITION 0x0010
#define | PDK_UNUSED10 0x0020
#define | PDK_UNUSED1000 0x1000
#define | PDK_UNUSED20 0x0040
#define | PDK_UP 0x0000
#define | PDR_ABORT (-9)
#define | PDR_CANCEL 0
#define | PDR_COMPRESSED (-4)
#define | PDR_ERROR (-1)
#define | PDR_HIT 2
#define | PDR_INKSETERR (-8)
#define | PDR_MEMERR (-7)
#define | PDR_NA (-10)
#define | PDR_NOHIT 3
#define | PDR_OEMDATAERR (-19)
#define | PDR_OK 1
#define | PDR_PNDTERR (-2)
#define | PDR_PNTINDEXERR (-6)
#define | PDR_SCALINGERR (-17)
#define | PDR_SCTERR (-20)
#define | PDR_STRKINDEXERR (-5)
#define | PDR_TIMESTAMPERR (-18)
#define | PDR_USERDATAERR (-16)
#define | PDR_VERSIONERR (-3)
#define | PDT_ANGLEXY 3
#define | PDT_ANGLEZ 4
#define | PDT_BARRELROTATION 5
#define | PDT_HEIGHT 2
#define | PDT_NULL 0
#define | PDT_OEMSPECIFIC 16
#define | PDT_PRESSURE 1
#define | PDTS_ARBITRARY 4
#define | PDTS_COMPRESS2NDDERIV 0x0010
#define | PDTS_COMPRESSED 0x8000
#define | PDTS_COMPRESSMETHOD 0x00F0
#define | PDTS_DISPLAY 3
#define | PDTS_HIENGLISH 2
#define | PDTS_HIMETRIC 1
#define | PDTS_LOMETRIC 0
#define | PDTS_NOCOLINEAR 0x0800
#define | PDTS_NOCOLLINEAR 0x0800
#define | PDTS_NOEMPTYSTROKES 0x4000
#define | PDTS_NOOEMDATA 0x0400
#define | PDTS_NOPENINFO 0x0100
#define | PDTS_NOTICK 0x1000
#define | PDTS_NOUPPOINTS 0x0200
#define | PDTS_NOUSER 0x2000
#define | PDTS_SCALEMASK 0x000F
#define | PDTS_STANDARDSCALE 2
#define | PDTT_ALL 0x0F00
#define | PDTT_COLINEAR 0x0800
#define | PDTT_COLLINEAR 0x0800
#define | PDTT_COMPRESS 0x8000
#define | PDTT_DECOMPRESS 0x4000
#define | PDTT_DEFAULT 0x0000
#define | PDTT_OEMDATA 0x0400
#define | PDTT_PENINFO 0x0100
#define | PDTT_UPPOINTS 0x0200
#define | PE_BEGINDATA 9
#define | PE_BEGININPUT 7
#define | PE_BUFFERWARNING 6
#define | PE_ENDDATA 11
#define | PE_ENDINPUT 14
#define | PE_GETINKINGINFO 13
#define | PE_GETPCMINFO 12
#define | PE_MOREDATA 10
#define | PE_PENDOWN 1
#define | PE_PENMOVE 3
#define | PE_PENUP 2
#define | PE_RESULT 15
#define | PE_SETTARGETS 8
#define | PE_TERMINATED 5
#define | PE_TERMINATING 4
#define | PENREG_DEFAULT 0x00000002
#define | PENREG_WILLHANDLEMOUSE 0x00000001
#define | PENTIP_HEIGHTDEFAULT ((BYTE)0)
#define | PENTIP_HILITE ((BYTE)0x80)
#define | PENTIP_NIBDEFAULT ((BYTE)0)
#define | PENTIP_OPAQUE ((BYTE)0xFF)
#define | PENTIP_TRANSPARENT ((BYTE)0)
#define | PENVER 0x0200
#define | PH_DEFAULT 0xFFFFFFFEL
#define | PH_MAX 0xFFFFFFFFL
#define | PH_MIN 0xFFFFFFFDL
#define | PHW_ALL 0x007F
#define | PHW_ANGLEXY 0x0004
#define | PHW_ANGLEZ 0x0008
#define | PHW_BARRELROTATION 0x0010
#define | PHW_HEIGHT 0x0002
#define | PHW_NONE 0x0000
#define | PHW_OEMSPECIFIC 0x0020
#define | PHW_PDK 0x0040
#define | PHW_PRESSURE 0x0001
#define | PID_CURRENT (UINT)(-1)
#define | PII_CLIPSTOP 0x0040
#define | PII_INKCLIPRECT 0x0001
#define | PII_INKCLIPRGN 0x0004
#define | PII_INKPENTIP 0x0010
#define | PII_INKSTOPRECT 0x0002
#define | PII_INKSTOPRGN 0x0008
#define | PII_SAVEBACKGROUND 0x0020
#define | PIT_RGNBOUND 0x0001
#define | PIT_RGNEXCLUDE 0x0002
#define | PIT_TAPNHOLD 0x0008
#define | PIT_TIMEOUT 0x0004
#define | PLAY_VERSION_10_DATA 0
#define | PLAY_VERSION_20_DATA 1
#define | PMI_BEDIT 1
#define | PMI_CXTABLET 3
#define | PMI_CYTABLET 4
#define | PMI_ENABLEFLAGS 7
#define | PMI_IMECOLOR 2
#define | PMI_INDEXFROMRGB 12
#define | PMI_PENTIP 6
#define | PMI_RCCHANGE 0
#define | PMI_RGBFROMINDEX 13
#define | PMI_SAVE 0x1000
#define | PMI_SYSFLAGS 11
#define | PMI_SYSREC 14
#define | PMI_TICKREF 15
#define | PMI_TIMEOUT 8
#define | PMI_TIMEOUTGEST 9
#define | PMI_TIMEOUTSEL 10
#define | PMIR_ERROR (-5L)
#define | PMIR_INDEX (-1L)
#define | PMIR_INIERROR (-4L)
#define | PMIR_INVALIDBOXEDITINFO (-3L)
#define | PMIR_NA (-6L)
#define | PMIR_OK 0L
#define | PMIR_VALUE (-2L)
#define | PMSC_BEDITCHANGE 1
#define | PMSC_GETHRC 9
#define | PMSC_GETINKINGINFO 7
#define | PMSC_GETPCMINFO 5
#define | PMSC_GETSYMBOLCOUNT 11
#define | PMSC_GETSYMBOLS 12
#define | PMSC_INKSTOP 16
#define | PMSC_LOADPW 15
#define | PMSC_SETHRC 10
#define | PMSC_SETINKINGINFO 8
#define | PMSC_SETPCMINFO 6
#define | PMSC_SETSYMBOLS 13
#define | PMSCL_LOADED 1L
#define | PMSCL_UNLOADED 0L
#define | PMSCL_UNLOADING 2L
#define | PWE_ACTIONHANDLES 0x0002
#define | PWE_AUTOWRITE 0x0001
#define | PWE_INPUTCURSOR 0x0004
#define | PWE_LENS 0x0008
#define | PWF_BEDIT 0x0100
#define | PWF_ENHANCED 0x1000
#define | PWF_FULL
#define | PWF_HEDIT 0x0200
#define | PWF_IEDIT 0x0400
#define | PWF_INKDISPLAY 0x0008
#define | PWF_PEN 0x0004
#define | PWF_RC1 0x0001
#define | PWF_RECOGNIZER 0x0010
#define | RC_LDEFAULT 0xffffffffL
#define | RC_LDEFAULTFLAGS 0x80000000L
#define | RC_WDEFAULT 0xffff
#define | RC_WDEFAULTFLAGS 0x8000
#define | RCD_BT 4
#define | RCD_DEFAULT 0
#define | RCD_LR 1
#define | RCD_RL 2
#define | RCD_TB 3
#define | RCIP_ALLANSICHAR 0x0001
#define | RCIP_MASK 0x0001
#define | RCO_BOXCROSS 0x00001000L
#define | RCO_BOXED 0x00000100L
#define | RCO_COLDRECOG 0x00008000L
#define | RCO_DISABLEGESMAP 0x00000400L
#define | RCO_DODEFAULT 0x00020000L
#define | RCO_NOFLASHCURSOR 0x00000800L
#define | RCO_NOFLASHUNKNOWN 0x00000008L
#define | RCO_NOHIDECURSOR 0x00000040L
#define | RCO_NOHOOK 0x00000080L
#define | RCO_NOPOINTEREVENT 0x00000001L
#define | RCO_NOSPACEBREAK 0x00000020L
#define | RCO_SAVEALLDATA 0x00000002L
#define | RCO_SAVEBACKGROUND 0x00010000L
#define | RCO_SAVEHPENDATA 0x00000004L
#define | RCO_SUGGEST 0x00000200L
#define | RCO_TABLETCOORD 0x00000010L
#define | RCOR_LEFT 4
#define | RCOR_NORMAL 1
#define | RCOR_RIGHT 2
#define | RCOR_UPSIDEDOWN 3
#define | RCP_LEFTHAND 0x0001
#define | RCP_MAPCHAR 0x0004
#define | RCRT_ALREADYPROCESSED 0x0008
#define | RCRT_DEFAULT 0x0000
#define | RCRT_GESTURE 0x0002
#define | RCRT_GESTURETOKEYS 0x0020
#define | RCRT_GESTURETRANSLATED 0x0010
#define | RCRT_NORECOG 0x8000
#define | RCRT_NOSYMBOLMATCH 0x0004
#define | RCRT_PRIVATE 0x4000
#define | RCRT_UNIDENTIFIED 0x0001
#define | REC_ABORT (-3)
#define | REC_ALC (-39)
#define | REC_BADEVENTREF (-33)
#define | REC_BADHPENDATA (-9)
#define | REC_BUFFERTOOSMALL (-4)
#define | REC_BUSY (-5)
#define | REC_CLVERIFY (-37)
#define | REC_DEBUG (-32)
#define | REC_DICT (-36)
#define | REC_DONE 6
#define | REC_ERRORLEVEL (-38)
#define | REC_GUIDE (-47)
#define | REC_HREC (-35)
#define | REC_HWND (-40)
#define | REC_INVALIDREF (-45)
#define | REC_LANGUAGE (-48)
#define | REC_NA (-2)
#define | REC_NOCOLLECTION (-32)
#define | REC_NOINPUT (-7)
#define | REC_NOTABLET (-6)
#define | REC_OEM (-1024)
#define | REC_OK 0
#define | REC_OOM (-8)
#define | REC_OVERFLOW (-1)
#define | REC_PARAMERROR (-46)
#define | REC_PCM (-42)
#define | REC_POINTEREVENT (-31)
#define | REC_RECTBOUND (-43)
#define | REC_RECTEXCLUDE (-44)
#define | REC_RESULTMODE (-41)
#define | REC_TERMBOUND 1
#define | REC_TERMEX 2
#define | REC_TERMOEM 512
#define | REC_TERMPENUP 3
#define | REC_TERMRANGE 4
#define | REC_TERMTIMEOUT 5
#define | ResetAlcBitAnsi(lprc, i) do {MpAlcB(lprc,i) &= ~MpIbf(i);} while (0)
#define | RHH_BOX 1
#define | RHH_STD 0
#define | RPA_DBCSPRIORITY 0x0004
#define | RPA_DEFAULT 0x0001
#define | RPA_HEDIT 0x0001
#define | RPA_KANJIFIXEDBEDIT 0x0002
#define | RRM_COMPLETE 16
#define | RRM_NEWLINE 3
#define | RRM_STROKE 0
#define | RRM_SYMBOL 1
#define | RRM_WORD 2
#define | SCH_ADVISE 1
#define | SCH_FORCE 2
#define | SCH_NONE 0
#define | SCIM_INSERT 0
#define | SCIM_OVERWRITE 1
#define | SetAlcBitAnsi(lprc, i) do {MpAlcB(lprc,i) |= MpIbf(i);} while (0)
#define | SGRC_DICTIONARY 0x0010
#define | SGRC_INIFILE 0x0020
#define | SGRC_NA 0x8000
#define | SGRC_OK 0x0000
#define | SGRC_PARAMERROR 0x0002
#define | SGRC_RC 0x0004
#define | SGRC_RECOGNIZER 0x0008
#define | SGRC_USER 0x0001
#define | SIH_ALLANSICHAR 1
#define | SRH_HOOKALL (HREC)1
#define | SSA_DOWN 7
#define | SSA_PENTIP 1
#define | SSA_PENTIPCLASS 2
#define | SSA_PENTIPTABLE 8
#define | SSA_SELECT 6
#define | SSA_TIME 5
#define | SSA_USER 3
#define | SSA_USERCLASS 4
#define | SSA_USERTABLE 9
#define | SSH_DL 5
#define | SSH_DR 6
#define | SSH_LD 3
#define | SSH_LU 4
#define | SSH_RD 1
#define | SSH_RU 2
#define | SSH_UL 7
#define | SSH_UR 8
#define | SubPenMsgFromWpLp(wp, lp) (LOWORD(wp))
#define | SYV_APPGESTUREMASK 0x00020000L
#define | SYV_BACKSPACE 0x00020008L
#define | SYV_BEGINOR 0x00000010L
#define | SYV_CIRCLELOA 0x000224D0L
#define | SYV_CIRCLELOZ 0x000224E9L
#define | SYV_CIRCLEUPA 0x000224B6L
#define | SYV_CIRCLEUPZ 0x000224CFL
#define | SYV_CLEAR 0x0002FFD5L
#define | SYV_CLEARCHAR 0x0002FFD2L
#define | SYV_CLEARWORD 0x0002FFDDL
#define | SYV_CONTEXT 0x0002FFD7L
#define | SYV_COPY 0x0002FFDAL
#define | SYV_CORRECT 0x0002FFDFL
#define | SYV_CUT 0x0002FFDBL
#define | SYV_EMPTY 0x00000003L
#define | SYV_ENDOR 0x00000011L
#define | SYV_EXTENDSELECT 0x0002FFD8L
#define | SYV_HELP 0x0002FFD3L
#define | SYV_INSERT 0x0002FFD6L
#define | SYV_KKCONVERT 0x0002FFD4L
#define | SYV_LASSO 0x0002FFC1L
#define | SYV_NULL 0x00000000L
#define | SYV_OR 0x00000012L
#define | SYV_PASTE 0x0002FFDCL
#define | SYV_RETURN 0x0002000DL
#define | SYV_SELECTFIRST 0x0002FFC0L
#define | SYV_SELECTLAST 0x0002FFCFL
#define | SYV_SELECTLEFT 0x0002FFC2L
#define | SYV_SELECTRIGHT 0x0002FFC3L
#define | SYV_SHAPEELLIPSE 0x00040002L
#define | SYV_SHAPELINE 0x00040001L
#define | SYV_SHAPEMAX SYV_SHAPERECT
#define | SYV_SHAPEMIN SYV_SHAPELINE
#define | SYV_SHAPERECT 0x00040003L
#define | SYV_SOFTNEWLINE 0x00000020L
#define | SYV_SPACE 0x00020020L
#define | SYV_SPACENULL 0x00010000L
#define | SYV_TAB 0x00020009L
#define | SYV_UNDO 0x0002FFD9L
#define | SYV_UNKNOWN 0x00000001L
#define | SYV_USER 0x0002FFDEL
#define | SyvCharacterToSymbol(c) ((LONG)(unsigned char)(c) | 0x00010000)
#define | SYVHI_ANSI 1
#define | SYVHI_GESTURE 2
#define | SYVHI_KANJI 3
#define | SYVHI_SHAPE 4
#define | SYVHI_SPECIAL 0
#define | SYVHI_UNICODE 5
#define | SYVHI_VKEY 6
#define | SyvKanjiToSymbol(c) ((LONG)(UINT)(c) | 0x00030000)
#define | TerminationFromWpLp(wp, lp) ((int)LOWORD(lp))
#define | TH_FORCE 1
#define | TH_QUERY 0
#define | TH_SUGGEST 2
#define | TIP_ERASECOLOR 1
#define | TPD_COLINEAR 0x0400
#define | TPD_COLLINEAR 0x0400
#define | TPD_EMPTYSTROKES 0x2000
#define | TPD_EVERYTHING 0x3FFF
#define | TPD_OEMDATA 0x1000
#define | TPD_PENINFO 0x0800
#define | TPD_PHW 0x1000
#define | TPD_RECALCSIZE 0x0000
#define | TPD_TIME 0x0100
#define | TPD_UPPOINTS 0x0200
#define | TPD_USER 0x0080
#define | TPT_CLOSEST 0x0001
#define | TPT_DEFAULT (TPT_TEXTUAL | TPT_INTERSECTINK | TPT_CLOSEST)
#define | TPT_INTERSECTINK 0x0002
#define | TPT_TEXTUAL 0x0004
#define | TRAIN_BOTH (TRAIN_DEFAULT | TRAIN_CUSTOM)
#define | TRAIN_CUSTOM 0x0002
#define | TRAIN_DEFAULT 0x0001
#define | TRAIN_NONE 0x0000
#define | TRAIN_RESET 2
#define | TRAIN_REVERT 1
#define | TRAIN_SAVE 0
#define | VWM_MOUSELEFTDOWN 0x0002
#define | VWM_MOUSELEFTUP 0x0004
#define | VWM_MOUSEMOVE 0x0001
#define | VWM_MOUSERIGHTDOWN 0x0008
#define | VWM_MOUSERIGHTUP 0x0010
#define | WCR_CLOSERECOGNIZER 23
#define | WCR_CONFIGDIALOG 2
#define | WCR_DEFAULT 3
#define | WCR_GETALCPRIORITY 14
#define | WCR_GETANSISTATE 16
#define | WCR_GETDIRECTION 20
#define | WCR_GETHAND 18
#define | WCR_INITRECOGNIZER 22
#define | WCR_PRIVATE 1024
#define | WCR_PWVERSION 13
#define | WCR_QUERY 1
#define | WCR_QUERYLANGUAGE 11
#define | WCR_RCCHANGE 4
#define | WCR_RECOGNAME 0
#define | WCR_SETALCPRIORITY 15
#define | WCR_SETANSISTATE 17
#define | WCR_SETDIRECTION 21
#define | WCR_SETHAND 19
#define | WCR_TRAIN 6
#define | WCR_TRAINCUSTOM 10
#define | WCR_TRAINDIRTY 9
#define | WCR_TRAINMAX 8
#define | WCR_TRAINSAVE 7
#define | WCR_USERCHANGE 12
#define | WCR_VERSION 5
#define | WLT_EMPTY 2
#define | WLT_STRING 0
#define | WLT_STRINGTABLE 1
#define | WLT_WORDLIST 3
#define | WM_CTLINIT (WM_PENWINFIRST+7)
#define | WM_GLOBALRCCHANGE (WM_PENWINFIRST+3)
#define | WM_HEDITCTL (WM_PENWINFIRST+5)
#define | WM_HOOKRCRESULT (WM_PENWINFIRST+2)
#define | WM_PENCTL (WM_PENWINFIRST+5)
#define | WM_PENEVENT (WM_PENWINFIRST+8)
#define | WM_PENMISC (WM_PENWINFIRST+6)
#define | WM_PENMISCINFO (WM_PENWINFIRST+3)
#define | WM_RCRESULT (WM_PENWINFIRST+1)
#define | WM_SKB (WM_PENWINFIRST+4)
#define | wPntAll (UINT)0xFFFF
#define | WSyvToKanji(syv) ((WORD) (LOWORD((syv))))

Typedefs

typedef struct tagABSTIME | ABSTIME
typedef LONG | ALC
typedef struct tagANIMATEINFO | ANIMATEINFO
typedef BOOL(CALLBACK * | ANIMATEPROC )(HPENDATA, UINT, UINT, UINT FAR *, LPARAM)
typedef struct tagBOXEDITINFO | BOXEDITINFO
typedef struct tagBOXLAYOUT | BOXLAYOUT
typedef struct tagBOXRESULTS | BOXRESULTS
typedef struct tagCALBSTRUCT | CALBSTRUCT
typedef int | CL
typedef struct tagCTLINITBEDIT | CTLINITBEDIT
typedef struct tagCTLINITHEDIT | CTLINITHEDIT
typedef struct tagCTLINITIEDIT | CTLINITIEDIT
typedef int(CALLBACK * | ENUMPROC )(LPSYV, int, VOID FAR *)
typedef struct tagGUIDE | GUIDE
typedef UINT | HKP
typedef struct tagIMECOLORS | IMECOLORS
typedef struct tagINKINGINFO | INKINGINFO
typedef struct tagINPPARAMS | INPPARAMS
typedef struct tagINTERVAL | INTERVAL
typedef struct tagABSTIME * | LPABSTIME
typedef ALC FAR * | LPALC
typedef struct tagANIMATEINFO * | LPANIMATEINFO
typedef struct tagBOXEDITINFO * | LPBOXEDITINFO
typedef struct tagBOXLAYOUT * | LPBOXLAYOUT
typedef struct tagBOXRESULTS * | LPBOXRESULTS
typedef struct tagCALBSTRUCT * | LPCALBSTRUCT
typedef const RECTL FAR * | LPCRECTL
typedef struct tagCTLINITBEDIT * | LPCTLINITBEDIT
typedef struct tagCTLINITHEDIT * | LPCTLINITHEDIT
typedef struct tagCTLINITIEDIT * | LPCTLINITIEDIT
typedef int(CALLBACK * | LPDF )(int, LPVOID, LPVOID, int, DWORD, DWORD)
typedef BOOL(CALLBACK * | LPFNRAWHOOK )(LPPENPACKET)
typedef int(CALLBACK * | LPFUNCRESULTS )(LPRCRESULT, REC)
typedef struct tagGUIDE * | LPGUIDE
typedef HINKSET FAR * | LPHINKSET
typedef HPENDATA FAR * | LPHPENDATA
typedef HRC FAR * | LPHRC
typedef HRCRESULT FAR * | LPHRCRESULT
typedef HWL FAR * | LPHWL
typedef struct tagIMECOLORS * | LPIMECOLORS
typedef struct tagINKINGINFO * | LPINKINGINFO
typedef struct tagINPPARAMS * | LPINPPARAMS
typedef struct tagINTERVAL * | LPINTERVAL
typedef LPVOID | LPOEM
typedef struct tagOEM_PENPACKET * | LPOEM_PENPACKET
typedef struct tagOEMPENINFO * | LPOEMPENINFO
typedef struct tagPCMINFO * | LPPCMINFO
typedef struct tagPDEVENT * | LPPDEVENT
typedef struct tagPENDATAHEADER * | LPPENDATA
typedef struct tagPENDATAHEADER * | LPPENDATAHEADER
typedef struct tagPENINFO * | LPPENINFO
typedef struct tagPENPACKET * | LPPENPACKET
typedef struct tagPENTIP * | LPPENTIP
typedef struct tagRC * | LPRC
typedef struct tagRCRESULT * | LPRCRESULT
typedef RECTL FAR * | LPRECTL
typedef struct tagRECTOFS * | LPRECTOFS
typedef struct tagSTRKFMT * | LPSTRKFMT
typedef struct tagSTROKEINFO * | LPSTROKEINFO
typedef struct tagSYC * | LPSYC
typedef struct tagSYE * | LPSYE
typedef struct tagSYG * | LPSYG
typedef SYV FAR * | LPSYV
typedef struct tagTARGET * | LPTARGET
typedef struct tagTARGINFO * | LPTARGINFO
typedef RECTL NEAR * | NPRECTL
typedef struct tagOEM_PENPACKET | OEM_PENPACKET
typedef struct tagOEMPENINFO | OEMPENINFO
typedef struct tagPCMINFO | PCMINFO
typedef struct tagPDEVENT | PDEVENT
typedef struct tagPENDATAHEADER | PENDATAHEADER
typedef struct tagPENINFO | PENINFO
typedef struct tagPENPACKET | PENPACKET
typedef struct tagPENTIP | PENTIP
typedef RECTL * | PRECTL
typedef struct tagRC | RC
typedef struct tagRCRESULT | RCRESULT
typedef BOOL(CALLBACK * | RCYIELDPROC )(VOID)
typedef int | REC
typedef struct tagRECTL | RECTL
typedef struct tagRECTOFS | RECTOFS
typedef struct tagSTRKFMT | STRKFMT
typedef struct tagSTROKEINFO | STROKEINFO
typedef struct tagSYC | SYC
typedef struct tagSYE | SYE
typedef struct tagSYG | SYG
typedef LONG | SYV
typedef struct tagTARGET | TARGET
typedef struct tagTARGINFO | TARGINFO

Functions

BOOL WINAPI | AddInksetInterval (HINKSET, LPINTERVAL)
int WINAPI | AddPenDataHRC (HRC, HPENDATA)
int WINAPI | AddPenInputHRC (HRC, LPPOINT, LPVOID, UINT, LPSTROKEINFO)
HPENDATA WINAPI | AddPointsPenData (HPENDATA, LPPOINT, LPVOID, LPSTROKEINFO)
int WINAPI | AddWordsHWL (HWL, LPSTR, UINT)
VOID WINAPI | AtomicVirtualEvent (BOOL)
LPPENDATA WINAPI | BeginEnumStrokes (HPENDATA)
typedef | BOOL (CALLBACK *HRCRESULTHOOKPROC)(HREC
VOID WINAPI | BoundingRectFromPoints (LPPOINT, UINT, LPRECT)
int WINAPI | CharacterToSymbol (LPSTR, int, LPSYV)
VOID WINAPI | CloseRecognizer (VOID)
HPENDATA WINAPI | CompactPenData (HPENDATA, UINT)
int WINAPI | CompressPenData (HPENDATA, UINT, DWORD)
int WINAPI | ConfigHREC (HREC, UINT, WPARAM, LPARAM)
UINT WINAPI | ConfigRecognizer (UINT, WPARAM, LPARAM)
BOOL WINAPI | CorrectWriting (HWND, LPSTR, UINT, LPVOID, DWORD, DWORD)
HRC WINAPI | CreateCompatibleHRC (HRC, HREC)
HWL WINAPI | CreateHWL (HREC, LPSTR, UINT, DWORD)
HINKSET WINAPI | CreateInkset (UINT)
HINKSET WINAPI | CreateInksetHRCRESULT (HRCRESULT, UINT, UINT)
HPENDATA WINAPI | CreatePenData (LPPENINFO, int, UINT, UINT)
HPENDATA WINAPI | CreatePenDataEx (LPPENINFO, UINT, UINT, UINT)
HPENDATA WINAPI | CreatePenDataHRC (HRC)
HRGN WINAPI | CreatePenDataRegion (HPENDATA, UINT)
DECLARE_HANDLE (HREC)
DECLARE_HANDLE (HPCM)
DECLARE_HANDLE (HINKSET)
DECLARE_HANDLE (HPENDATA)
DECLARE_HANDLE32 (HRECHOOK)
DECLARE_HANDLE32 (HTRG)
DECLARE_HANDLE32 (HRC)
DECLARE_HANDLE32 (HRCRESULT)
DECLARE_HANDLE32 (HWL)
LRESULT CALLBACK | DefPenWindowProc (HWND, UINT, WPARAM, LPARAM)
int WINAPI | DestroyHRC (HRC)
int WINAPI | DestroyHRCRESULT (HRCRESULT)
int WINAPI | DestroyHWL (HWL)
BOOL WINAPI | DestroyInkset (HINKSET)
BOOL WINAPI | DestroyPenData (HPENDATA)
BOOL WINAPI | DictionarySearch (LPRC, LPSYE, int, LPSYV, int)
int WINAPI | DoDefaultPenInput (HWND, UINT)
BOOL WINAPI | DPtoTP (LPPOINT, int)
VOID WINAPI | DrawPenData (HDC, LPRECT, HPENDATA)
int WINAPI | DrawPenDataEx (HDC, LPRECT, HPENDATA, UINT, UINT, UINT, UINT, ANIMATEPROC, LPANIMATEINFO, UINT)
HPENDATA WINAPI | DuplicatePenData (HPENDATA, UINT)
VOID WINAPI | EmulatePen (BOOL)
int WINAPI | EnableGestureSetHRC (HRC, SYV, BOOL)
int WINAPI | EnableSystemDictionaryHRC (HRC, BOOL)
LPPENDATA WINAPI | EndEnumStrokes (HPENDATA)
BOOL WINAPI | EndPenCollection (REC)
int WINAPI | EndPenInputHRC (HRC)
UINT WINAPI | EnumSymbols (LPSYG, UINT, ENUMPROC, LPVOID)
BOOL WINAPI | ExecuteGesture (HWND, SYV, LPRCRESULT)
int WINAPI | ExtractPenDataPoints (HPENDATA, UINT, UINT, UINT, LPPOINT, LPVOID, UINT)
int WINAPI | ExtractPenDataStrokes (HPENDATA, UINT, LPARAM, LPHPENDATA, UINT)
VOID WINAPI | FirstSymbolFromGraph (LPSYG, LPSYV, int, LPINT)
int WINAPI | GetAlphabetHRC (HRC, LPALC, LPBYTE)
int WINAPI | GetAlphabetPriorityHRC (HRC, LPALC, LPBYTE)
int WINAPI | GetAlternateWordsHRCRESULT (HRCRESULT, UINT, UINT, LPHRCRESULT, UINT)
int WINAPI | GetBoxMappingHRCRESULT (HRCRESULT, UINT, UINT, UINT FAR *)
int WINAPI | GetBoxResultsHRC (HRC, UINT, UINT, UINT, LPBOXRESULTS, BOOL)
UINT WINAPI | GetGlobalRC (LPRC, LPSTR, LPSTR, int)
int WINAPI | GetGuideHRC (HRC, LPGUIDE, UINT FAR *)
int WINAPI | GetHotspotsHRCRESULT (HRCRESULT, UINT, LPPOINT, UINT)
HREC WINAPI | GetHRECFromHRC (HRC)
int WINAPI | GetInksetInterval (HINKSET, UINT, LPINTERVAL)
int WINAPI | GetInksetIntervalCount (HINKSET)
int WINAPI | GetInternationalHRC (HRC, UINT FAR *, LPSTR, UINT FAR *, UINT FAR *)
int WINAPI | GetMaxResultsHRC (HRC)
UINT WINAPI | GetPenAppFlags (VOID)
BOOL WINAPI | GetPenAsyncState (UINT)
int WINAPI | GetPenDataAttributes (HPENDATA, LPVOID, UINT)
BOOL WINAPI | GetPenDataInfo (HPENDATA, LPPENDATAHEADER, LPPENINFO, DWORD)
BOOL WINAPI | GetPenDataStroke (LPPENDATA, UINT, LPPOINT FAR *, LPVOID FAR *, LPSTROKEINFO)
REC WINAPI | GetPenHwData (LPPOINT, LPVOID, int, UINT, LPSTROKEINFO)
REC WINAPI | GetPenHwEventData (UINT, UINT, LPPOINT, LPVOID, int, LPSTROKEINFO)
int WINAPI | GetPenInput (HPCM, LPPOINT, LPVOID, UINT, UINT, LPSTROKEINFO)
LONG WINAPI | GetPenMiscInfo (WPARAM, LPARAM)
BOOL WINAPI | GetPointsFromPenData (HPENDATA, UINT, UINT, UINT, LPPOINT)
int WINAPI | GetResultsHRC (HRC, UINT, LPHRCRESULT, UINT)
int WINAPI | GetStrokeAttributes (HPENDATA, UINT, LPVOID, UINT)
int WINAPI | GetStrokeTableAttributes (HPENDATA, UINT, LPVOID, UINT)
int WINAPI | GetSymbolCount (LPSYG)
int WINAPI | GetSymbolCountHRCRESULT (HRCRESULT)
int WINAPI | GetSymbolMaxLength (LPSYG)
int WINAPI | GetSymbolsHRCRESULT (HRCRESULT, UINT, LPSYV, UINT)
UINT WINAPI | GetVersionPenWin (VOID)
int WINAPI | GetWordlistCoercionHRC (HRC)
int WINAPI | GetWordlistHRC (HRC, LPHWL)
int WINAPI | HitTestPenData (HPENDATA, LPPOINT, UINT, UINT FAR *, UINT FAR *)
VOID WINAPI | InitRC (HWND, LPRC)
BOOL WINAPI | InitRecognizer (LPRC)
int WINAPI | InsertPenData (HPENDATA, HPENDATA, UINT)
int WINAPI | InsertPenDataPoints (HPENDATA, UINT, UINT, UINT, LPPOINT, LPVOID)
int WINAPI | InsertPenDataStroke (HPENDATA, UINT, LPPOINT, LPVOID, LPSTROKEINFO)
HREC WINAPI | InstallRecognizer (LPSTR)
UINT WINAPI | IsPenAware (VOID)
BOOL WINAPI | IsPenEvent (UINT, LONG)
BOOL WINAPI | MetricScalePenData (HPENDATA, UINT)
BOOL WINAPI | OffsetPenData (HPENDATA, int, int)
int WINAPI | PeekPenInput (HPCM, UINT, LPPOINT, LPVOID, UINT)
LONG WINAPI | PenDataFromBuffer (LPHPENDATA, UINT, LPBYTE, LONG, LPDWORD)
LONG WINAPI | PenDataToBuffer (HPENDATA, LPBYTE, LONG, LPDWORD)
VOID WINAPI | PostVirtualKeyEvent (UINT, BOOL)
VOID WINAPI | PostVirtualMouseEvent (UINT, int, int)
int WINAPI | ProcessHRC (HRC, DWORD)
REC WINAPI | ProcessWriting (HWND, LPRC)
int WINAPI | ReadHWL (HWL, HFILE)
REC WINAPI | Recognize (LPRC)
REC WINAPI | RecognizeData (LPRC, HPENDATA)
REC WINAPI | RecognizeDataInternal (LPRC, HPENDATA, LPFUNCRESULTS)
REC WINAPI | RecognizeInternal (LPRC, LPFUNCRESULTS)
BOOL WINAPI | RedisplayPenData (HDC, HPENDATA, LPPOINT, LPPOINT, int, DWORD)
VOID WINAPI | RegisterPenApp (UINT, UINT)
int WINAPI | RemovePenDataStrokes (HPENDATA, UINT, UINT)
BOOL WINAPI | ResizePenData (HPENDATA, LPRECT)
int WINAPI | SetAlphabetHRC (HRC, ALC, LPBYTE)
int WINAPI | SetAlphabetPriorityHRC (HRC, ALC, LPBYTE)
int WINAPI | SetBoxAlphabetHRC (HRC, LPALC, UINT)
UINT WINAPI | SetGlobalRC (LPRC, LPSTR, LPSTR)
int WINAPI | SetGuideHRC (HRC, LPGUIDE, UINT)
int WINAPI | SetInternationalHRC (HRC, UINT, LPCSTR, UINT, UINT)
int WINAPI | SetMaxResultsHRC (HRC, UINT)
VOID WINAPI | SetPenAppFlags (UINT, UINT)
BOOL WINAPI | SetPenHook (HKP, LPFNRAWHOOK)
LONG WINAPI | SetPenMiscInfo (WPARAM, LPARAM)
BOOL WINAPI | SetRecogHook (UINT, UINT, HWND)
HRECHOOK WINAPI | SetResultsHookHREC (HREC, HRCRESULTHOOKPROC)
int WINAPI | SetStrokeAttributes (HPENDATA, UINT, LPARAM, UINT)
int WINAPI | SetStrokeTableAttributes (HPENDATA, UINT, LPARAM, UINT)
int WINAPI | SetWordlistCoercionHRC (HRC, UINT)
int WINAPI | SetWordlistHRC (HRC, HWL)
BOOL WINAPI | ShowKeyboard (HWND, UINT, LPPOINT, LPSKBINFO)
int WINAPI | StartInking (HPCM, UINT, LPINKINGINFO)
HPCM WINAPI | StartPenInput (HWND, UINT, LPPCMINFO, LPINT)
int WINAPI | StopInking (HPCM)
int WINAPI | StopPenInput (HPCM, UINT, int)
BOOL WINAPI | SymbolToCharacter (LPSYV, int, LPSTR, LPINT)
int WINAPI | TargetPoints (LPTARGINFO, LPPOINT, DWORD, UINT, LPSTROKEINFO)
BOOL WINAPI | TPtoDP (LPPOINT, int)
BOOL WINAPI | TrainContext (LPRCRESULT, LPSYE, int, LPSYC, int)
BOOL WINAPI | TrainContextInternal (LPRCRESULT, LPSYE, int, LPSYC, int)
int WINAPI | TrainHREC (HREC, LPSYV, UINT, HPENDATA, UINT)
BOOL WINAPI | TrainInk (LPRC, HPENDATA, LPSYV)
BOOL WINAPI | TrainInkInternal (LPRC, HPENDATA, LPSYV)
int WINAPI | TrimPenData (HPENDATA, DWORD, DWORD)
int WINAPI | UnhookResultsHookHREC (HREC, HRECHOOK)
VOID WINAPI | UninstallRecognizer (HREC)
VOID WINAPI | UpdatePenInfo (LPPENINFO)
int WINAPI | WriteHWL (HWL, HFILE)

Variables

typedef | HRC
typedef | LPVOID
typedef | UINT

Define Documentation

#define AI_CBSTROKE 0xFFFF

NOPENIEDIT

Definition at line 292 of file penwin.h.

#define AI_SKIPUPSTROKES 0x0001

Definition at line 295 of file penwin.h.

#define ALC_ALL
Value:
(ALC_SYSMINIMUM | ALC_MATH | ALC_MONETARY\
    | ALC_OTHER | ALC_NONPRINT)

Definition at line 132 of file penwin.h.

#define ALC_ALPHA (ALC_LCALPHA | ALC_UCALPHA)

Definition at line 123 of file penwin.h.

#define ALC_ALPHANUMERIC (ALC_ALPHA | ALC_NUMERIC)

Definition at line 126 of file penwin.h.

#define ALC_ASCII 0x00000080L

Definition at line 108 of file penwin.h.

#define ALC_DBCS 0x00000400L

Definition at line 111 of file penwin.h.

#define ALC_DEFAULT 0x00000000L

PENVER.

NOPENAPPS

Definition at line 100 of file penwin.h.

#define ALC_GESTURE 0x00004000L

Definition at line 113 of file penwin.h.

#define ALC_GLOBALPRIORITY 0x10000000L

Definition at line 118 of file penwin.h.

#define ALC_HIRAGANA 0x00010000L

Definition at line 115 of file penwin.h.

#define ALC_JIS1 0x00000800L

Definition at line 112 of file penwin.h.

#define ALC_KANJI 0x00040000L

Definition at line 117 of file penwin.h.

#define ALC_KANJIALL (ALC_ALL | ALC_HIRAGANA | ALC_KATAKANA | ALC_KANJI)

Definition at line 139 of file penwin.h.

#define ALC_KANJISYSMINIMUM (ALC_SYSMINIMUM | ALC_HIRAGANA | ALC_KATAKANA | ALC_JIS1)

Definition at line 136 of file penwin.h.

#define ALC_KATAKANA 0x00020000L

Definition at line 116 of file penwin.h.

#define ALC_LCALPHA 0x00000001L

Definition at line 101 of file penwin.h.

#define ALC_MATH 0x00000010L

Definition at line 105 of file penwin.h.

#define ALC_MONETARY 0x00000020L

Definition at line 106 of file penwin.h.

#define ALC_NONPRINT 0x00000200L

Definition at line 110 of file penwin.h.

#define ALC_NOPRIORITY 0x00000000L

Definition at line 121 of file penwin.h.

#define ALC_NUMERIC 0x00000004L

Definition at line 103 of file penwin.h.

#define ALC_OEM 0x0FF80000L

Definition at line 119 of file penwin.h.

#define ALC_OTHER 0x00000040L

Definition at line 107 of file penwin.h.

#define ALC_PUNC 0x00000008L

Definition at line 104 of file penwin.h.

#define ALC_RESERVED 0xE0003000L

Definition at line 120 of file penwin.h.

#define ALC_SYSMINIMUM (ALC_ALPHANUMERIC | ALC_PUNC | ALC_WHITE | ALC_GESTURE)

Definition at line 129 of file penwin.h.

#define ALC_UCALPHA 0x00000002L

Definition at line 102 of file penwin.h.

#define ALC_USEBITMAP 0x00008000L

Definition at line 114 of file penwin.h.

#define ALC_WHITE 0x00000100L

Definition at line 109 of file penwin.h.

#define BEI_FACESIZE 32

Definition at line 1345 of file penwin.h.

#define BEIF_BOXCROSS 0x0001

Definition at line 1346 of file penwin.h.

#define BESC_DEFAULT 0

Definition at line 1349 of file penwin.h.

#define BESC_KANJIFIXED 2

Definition at line 1351 of file penwin.h.

#define BESC_ROMANFIXED 1

Definition at line 1350 of file penwin.h.

#define BESC_USERDEFINED 3

Definition at line 1352 of file penwin.h.

#define BITPENUP 0x8000

NOPENDICT

Definition at line 505 of file penwin.h.

#define BXD_BASEHEIGHT 13

Definition at line 1364 of file penwin.h.

#define BXD_BASEHORZ 0

Definition at line 1365 of file penwin.h.

#define BXD_CELLHEIGHT 16

Definition at line 1363 of file penwin.h.

#define BXD_CELLWIDTH 12

Definition at line 1362 of file penwin.h.

#define BXD_CUSPHEIGHT 2

Definition at line 1367 of file penwin.h.

#define BXD_ENDCUSPHEIGHT 4

Definition at line 1368 of file penwin.h.

#define BXD_MIDFROMBASE 0

Definition at line 1366 of file penwin.h.

#define BXDK_BASEHEIGHT 28

Definition at line 1372 of file penwin.h.

#define BXDK_BASEHORZ 0

Definition at line 1373 of file penwin.h.

#define BXDK_CELLHEIGHT 32

Definition at line 1371 of file penwin.h.

#define BXDK_CELLWIDTH 32

Definition at line 1370 of file penwin.h.

#define BXDK_CUSPHEIGHT 28

Definition at line 1375 of file penwin.h.

#define BXDK_ENDCUSPHEIGHT 10

Definition at line 1376 of file penwin.h.

#define BXDK_MIDFROMBASE 0

Definition at line 1374 of file penwin.h.

#define BXS_BOXCROSS 0x0004U

Definition at line 149 of file penwin.h.

#define BXS_MASK 0x0007U

Definition at line 150 of file penwin.h.

#define BXS_NONE 0x0000U

NOPENALC

Definition at line 147 of file penwin.h.

#define BXS_RECT 0x0001U

Definition at line 148 of file penwin.h.

#define cbDictPathMax 255

NOPENDATA

Definition at line 481 of file penwin.h.

#define cbRcLanguageMax 44

Definition at line 964 of file penwin.h.

#define cbRcrgbfAlcMax 32

Definition at line 966 of file penwin.h.

#define cbRcUserMax 32

Definition at line 965 of file penwin.h.

#define ChSyvToAnsi ( syv ) ((BYTE) (LOBYTE(LOWORD((syv)))))

Definition at line 1541 of file penwin.h.

#define CIB_NOACTIONHANDLE 0x0002

Definition at line 1356 of file penwin.h.

#define CIB_NOFLASHCURSOR 0x0004

Definition at line 1357 of file penwin.h.

#define CIB_NOGDMSG 0x0001

Definition at line 1355 of file penwin.h.

#define CIH_NOACTIONHANDLE 0x0002

Definition at line 1331 of file penwin.h.

#define CIH_NOEDITTEXT 0x0004

Definition at line 1332 of file penwin.h.

#define CIH_NOFLASHCURSOR 0x0008

Definition at line 1333 of file penwin.h.

#define CIH_NOGDMSG 0x0001

NOPENIEDIT

Definition at line 1330 of file penwin.h.

#define CL_MAXIMUM 100

Definition at line 949 of file penwin.h.

#define CL_MINIMUM 1

Definition at line 948 of file penwin.h.

#define CL_NULL 0

NOPENINKPUT

Definition at line 947 of file penwin.h.

#define CMPD_COMPRESS 0x0001

Definition at line 298 of file penwin.h.

#define CMPD_DECOMPRESS 0x0002

Definition at line 299 of file penwin.h.

#define CPD_DEFAULT 0x047F

Definition at line 307 of file penwin.h.

#define CPD_TIME 0x0400

Definition at line 311 of file penwin.h.

#define CPD_USERBYTE 0x0100

Definition at line 308 of file penwin.h.

#define CPD_USERDWORD 0x0300

Definition at line 310 of file penwin.h.

#define CPD_USERWORD 0x0200

Definition at line 309 of file penwin.h.

#define CPDR_BOX 1

Definition at line 302 of file penwin.h.

#define CPDR_LASSO 2

Definition at line 303 of file penwin.h.

#define CRUC_NOTIFY 0

Definition at line 772 of file penwin.h.

#define CRUC_REMOVE 1

Definition at line 773 of file penwin.h.

#define CTLINIT_BEDIT 7

Definition at line 1427 of file penwin.h.

#define CTLINIT_HEDIT 1

Definition at line 1426 of file penwin.h.

#define CTLINIT_IEDIT 9

Definition at line 1428 of file penwin.h.

#define CTLINIT_MAX 10

Definition at line 1429 of file penwin.h.

#define CWR_BOXES 0x0200

Definition at line 986 of file penwin.h.

#define CWR_HEDIT 0x0080

Definition at line 984 of file penwin.h.

#define CWR_INSERT 0x0008

Definition at line 980 of file penwin.h.

#define CWR_KEYBOARD 0x0100

Definition at line 985 of file penwin.h.

#define CWR_KKCONVERT 0x0020

Definition at line 982 of file penwin.h.

#define CWR_REPLACECR 0x0001

Definition at line 974 of file penwin.h.

#define CWR_REPLACETAB 0x0004

Definition at line 977 of file penwin.h.

#define CWR_SIMPLE 0x0040

Definition at line 983 of file penwin.h.

#define CWR_SINGLELINEEDIT (CWR_REPLACECR|CWR_STRIPLF|CWR_REPLACETAB)

Definition at line 979 of file penwin.h.

#define CWR_STRIPCR CWR_REPLACECR

Definition at line 975 of file penwin.h.

#define CWR_STRIPLF 0x0002

Definition at line 976 of file penwin.h.

#define CWR_STRIPTAB CWR_REPLACETAB

Definition at line 978 of file penwin.h.

#define CWR_TITLE 0x0010

Definition at line 981 of file penwin.h.

#define cwRcReservedMax 8

Definition at line 950 of file penwin.h.

#define CWRK_BASIC 1

Definition at line 990 of file penwin.h.

#define CWRK_DEFAULT 0

Definition at line 989 of file penwin.h.

#define CWRK_FULL 2

Definition at line 991 of file penwin.h.

#define CWRK_NUMPAD 3

Definition at line 992 of file penwin.h.

#define CWRK_TELPAD 4

Definition at line 993 of file penwin.h.

#define DECLARE_HANDLE32 ( name )
Value:
struct name##__ { int unused; };\
    typedef const struct name##__ FAR* name

Definition at line 1608 of file penwin.h.

#define DIRQ_ADD 9

Definition at line 490 of file penwin.h.

#define DIRQ_CLEANUP 15

Definition at line 496 of file penwin.h.

#define DIRQ_CLOSE 5

Definition at line 486 of file penwin.h.

#define DIRQ_CONFIGURE 3

Definition at line 484 of file penwin.h.

#define DIRQ_COPYRIGHT 16

Definition at line 497 of file penwin.h.

#define DIRQ_DELETE 10

Definition at line 491 of file penwin.h.

#define DIRQ_DESCRIPTION 2

Definition at line 483 of file penwin.h.

#define DIRQ_FLUSH 11

Definition at line 492 of file penwin.h.

#define DIRQ_INIT 14

Definition at line 495 of file penwin.h.

#define DIRQ_OPEN 4

Definition at line 485 of file penwin.h.

#define DIRQ_QUERY 1

Definition at line 482 of file penwin.h.

#define DIRQ_RCCHANGE 12

Definition at line 493 of file penwin.h.

#define DIRQ_SETWORDLISTS 6

Definition at line 487 of file penwin.h.

#define DIRQ_STRING 7

Definition at line 488 of file penwin.h.

#define DIRQ_SUGGEST 8

Definition at line 489 of file penwin.h.

#define DIRQ_SYMBOLGRAPH 13

Definition at line 494 of file penwin.h.

#define DIRQ_USER 4096

Definition at line 498 of file penwin.h.

#define DPD_DRAWSEL 0x0002

Definition at line 315 of file penwin.h.

#define DPD_HDCPEN 0x0001

Definition at line 314 of file penwin.h.

#define DrawPenDataFmt | ( | hdc,
 |  | lprect,
 |  | hpndt |
 | ) |  | DrawPenDataEx(hdc, lprect, hpndt, 0, IX_END, 0, IX_END, NULL, NULL, 0)

NOPENALC

Definition at line 1484 of file penwin.h.

#define DRV_BADPARAM1 0xFFFFFFFF

Definition at line 535 of file penwin.h.

#define DRV_BADPARAM2 0xFFFFFFFE

Definition at line 536 of file penwin.h.

#define DRV_BADSTRUCT 0xFFFFFFFD

Definition at line 537 of file penwin.h.

#define DRV_Calibrate DRV_RESERVED+17

Definition at line 526 of file penwin.h.

#define DRV_FAILURE 0x00000000

Definition at line 533 of file penwin.h.

#define DRV_GetCalibration DRV_RESERVED+11

Definition at line 520 of file penwin.h.

#define DRV_GetName DRV_RESERVED+5

Definition at line 514 of file penwin.h.

#define DRV_GetPenInfo DRV_RESERVED+7

Definition at line 516 of file penwin.h.

#define DRV_GetPenSamplingRate DRV_RESERVED+16

Definition at line 525 of file penwin.h.

#define DRV_GetVersion DRV_RESERVED+6

Definition at line 515 of file penwin.h.

#define DRV_PenPlayBack DRV_RESERVED+9

Definition at line 518 of file penwin.h.

#define DRV_PenPlayStart DRV_RESERVED+8

Definition at line 517 of file penwin.h.

#define DRV_PenPlayStop DRV_RESERVED+10

Definition at line 519 of file penwin.h.

#define DRV_Query DRV_RESERVED+15

Definition at line 524 of file penwin.h.

#define DRV_RemoveEntryPoints DRV_RESERVED+2

Definition at line 511 of file penwin.h.

#define DRV_RemovePenDriverEntryPoints DRV_RESERVED+2

Definition at line 510 of file penwin.h.

#define DRV_Reserved1 DRV_RESERVED+13

Definition at line 522 of file penwin.h.

#define DRV_Reserved2 DRV_RESERVED+14

Definition at line 523 of file penwin.h.

#define DRV_SetCalibration DRV_RESERVED+12

Definition at line 521 of file penwin.h.

#define DRV_SetEntryPoints DRV_RESERVED+1

Definition at line 509 of file penwin.h.

#define DRV_SetPenDriverEntryPoints DRV_RESERVED+1

Definition at line 508 of file penwin.h.

#define DRV_SetPenSamplingDist DRV_RESERVED+4

Definition at line 513 of file penwin.h.

#define DRV_SetPenSamplingRate DRV_RESERVED+3

Definition at line 512 of file penwin.h.

#define DRV_SUCCESS 0x00000001

Definition at line 534 of file penwin.h.

#define dwDiffAT | ( | at1,
 |  | at2 |
 | ) |  | (1000L*((at2).sec - (at1).sec) - (DWORD)(at1).ms + (DWORD)(at2).ms)

NOPENDATA

Definition at line 1496 of file penwin.h.

#define dwDurInterval ( lpi ) dwDiffAT((lpi)->atBegin, (lpi)->atEnd)

Definition at line 1524 of file penwin.h.

#define ENUM_MAXIMUM 4096

Definition at line 952 of file penwin.h.

#define ENUM_MINIMUM 1

Definition at line 951 of file penwin.h.

#define EPDP_REMOVE 0x0001

Definition at line 318 of file penwin.h.

#define EPDS_EQ 0x0000

Definition at line 330 of file penwin.h.

#define EPDS_GT 0x0020

Definition at line 332 of file penwin.h.

#define EPDS_GTE 0x0050

Definition at line 335 of file penwin.h.

#define EPDS_INKSET 8

Definition at line 328 of file penwin.h.

#define EPDS_LT 0x0010

Definition at line 331 of file penwin.h.

#define EPDS_LTE 0x0060

Definition at line 336 of file penwin.h.

#define EPDS_NE 0x0040

Definition at line 334 of file penwin.h.

#define EPDS_NOT 0x0040

Definition at line 333 of file penwin.h.

#define EPDS_PENTIP 4

Definition at line 324 of file penwin.h.

#define EPDS_REMOVE 0x8000

Definition at line 338 of file penwin.h.

#define EPDS_SELECT 1

Definition at line 321 of file penwin.h.

#define EPDS_STROKEINDEX 2

Definition at line 322 of file penwin.h.

#define EPDS_TIPCOLOR 5

Definition at line 325 of file penwin.h.

#define EPDS_TIPNIB 7

Definition at line 327 of file penwin.h.

#define EPDS_TIPWIDTH 6

Definition at line 326 of file penwin.h.

#define EPDS_USER 3

Definition at line 323 of file penwin.h.

#define EventRefFromWpLp | ( | wp,
 |  | lp |
 | ) |  | (LOWORD(lp))

Definition at line 1584 of file penwin.h.

#define FAbsTimeInInterval | ( | at,
 |  | lpi |
 | ) |  | (FLTEAbsTime((lpi)->atBegin, at) && FLTEAbsTime(at, (lpi)->atEnd))

Definition at line 1510 of file penwin.h.

#define FEQAbsTime | ( | at1,
 |  | at2 |
 | ) |  | ((at1).sec == (at2).sec && (at1).ms == (at2).ms)

Definition at line 1506 of file penwin.h.

#define FIntervalInInterval | ( | lpiT,
 |  | lpiS
 | ) |
Value:
(FLTEAbsTime((lpiS)->atBegin, (lpiT)->atBegin)\
    && FLTEAbsTime((lpiT)->atEnd, (lpiS)->atEnd))

Definition at line 1514 of file penwin.h.

#define FIntervalXInterval | ( | lpiT,
 |  | lpiS
 | ) |
Value:
(!(FLTAbsTime((lpiT)->atEnd, (lpiS)->atBegin)\
    || FLTAbsTime((lpiS)->atEnd, (lpiT)->atBegin)))

Definition at line 1519 of file penwin.h.

#define FIsAnsi ( syv ) (HIWORD((syv))==SYVHI_ANSI)

Definition at line 1534 of file penwin.h.

#define FIsAnsiGesture ( syv )
Value:
(                            \
   (syv) == SYV_BACKSPACE       \
   || (syv) == SYV_TAB          \
   || (syv) == SYV_RETURN       \
   || (syv) == SYV_SPACE        \
   )

Definition at line 1565 of file penwin.h.

#define FIsGesture ( syv ) (HIWORD((syv))==SYVHI_GESTURE)

Definition at line 1535 of file penwin.h.

#define FIsKanji ( syv ) (HIWORD((syv))==SYVHI_KANJI)

Definition at line 1536 of file penwin.h.

#define FIsSelectGesture ( syv ) ((syv) >= SYVSELECTFIRST && (syv) <= SYVSELECTLAST)

Definition at line 1546 of file penwin.h.

#define FIsShape ( syv ) (HIWORD((syv))==SYVHI_SHAPE)

Definition at line 1537 of file penwin.h.

#define FIsSpecial ( syv ) (HIWORD((syv))==SYVHI_SPECIAL)

Definition at line 1533 of file penwin.h.

#define FIsStdGesture ( syv )
Value:
(                            \
   FIsSelectGesture(syv)        \
   || (syv)==SYV_CLEAR          \
   || (syv)==SYV_HELP           \
   || (syv)==SYV_EXTENDSELECT   \
   || (syv)==SYV_UNDO           \
   || (syv)==SYV_COPY           \
   || (syv)==SYV_CUT            \
   || (syv)==SYV_PASTE          \
   || (syv)==SYV_CLEARWORD      \
   || (syv)==SYV_KKCONVERT      \
   || (syv)==SYV_USER           \
   || (syv)==SYV_CORRECT        \
   )

Definition at line 1549 of file penwin.h.

#define FIsUniCode ( syv ) (HIWORD((syv))==SYVHI_UNICODE)

Definition at line 1538 of file penwin.h.

#define FIsVKey ( syv ) (HIWORD((syv))==SYVHI_VKEY)

Definition at line 1539 of file penwin.h.

#define FLTAbsTime | ( | at1,
 |  | at2 |
 | ) |  | ((at1).sec < (at2).sec || ((at1).sec == (at2).sec && (at1).ms < (at2).ms))

Definition at line 1500 of file penwin.h.

#define FLTEAbsTime | ( | at1,
 |  | at2 |
 | ) |  | ((at1).sec < (at2).sec || ((at1).sec == (at2).sec && (at1).ms <= (at2).ms))

Definition at line 1503 of file penwin.h.

#define FPenUpX ( x ) ((BOOL)(((x) & BITPENUP) != 0))

NOPENMSGS

Definition at line 1464 of file penwin.h.

#define GetWEventRef ( ) (LOWORD(GetMessageExtraInfo()))

Definition at line 1465 of file penwin.h.

#define GGRC_DICTBUFTOOSMALL 1

Definition at line 1073 of file penwin.h.

#define GGRC_NA 3

Definition at line 1075 of file penwin.h.

#define GGRC_OK 0

NOPENMISC

Definition at line 1072 of file penwin.h.

#define GGRC_PARAMERROR 2

Definition at line 1074 of file penwin.h.

#define GPA_MAXLEN 1

Definition at line 341 of file penwin.h.

#define GPA_PDTS 3

Definition at line 343 of file penwin.h.

#define GPA_POINTS 2

Definition at line 342 of file penwin.h.

#define GPA_RATE 4

Definition at line 344 of file penwin.h.

#define GPA_RECTBOUND 5

Definition at line 345 of file penwin.h.

#define GPA_RECTBOUNDINK 6

Definition at line 346 of file penwin.h.

#define GPA_SIZE 7

Definition at line 347 of file penwin.h.

#define GPA_STROKES 8

Definition at line 348 of file penwin.h.

#define GPA_TIME 9

Definition at line 349 of file penwin.h.

#define GPA_USER 10

Definition at line 350 of file penwin.h.

#define GPA_VERSION 11

Definition at line 351 of file penwin.h.

#define GRH_ALL 0

NOPENDRIVER

Definition at line 648 of file penwin.h.

#define GRH_GESTURE 1

Definition at line 649 of file penwin.h.

#define GRH_NONGESTURE 2

Definition at line 650 of file penwin.h.

#define GSA_DOWN 8

Definition at line 361 of file penwin.h.

#define GSA_PENTIP 1

Definition at line 354 of file penwin.h.

#define GSA_PENTIPCLASS 2

Definition at line 355 of file penwin.h.

#define GSA_PENTIPTABLE 10

Definition at line 365 of file penwin.h.

#define GSA_RECTBOUND 9

Definition at line 362 of file penwin.h.

#define GSA_SELECT 7

Definition at line 360 of file penwin.h.

#define GSA_SIZE 6

Definition at line 359 of file penwin.h.

#define GSA_SIZETABLE 11

Definition at line 366 of file penwin.h.

#define GSA_TIME 5

Definition at line 358 of file penwin.h.

#define GSA_USER 3

Definition at line 356 of file penwin.h.

#define GSA_USERCLASS 4

Definition at line 357 of file penwin.h.

#define GSA_USERTABLE 12

Definition at line 367 of file penwin.h.

#define GST_ALL 0x00000317L

Definition at line 662 of file penwin.h.

#define GST_CIRCLE 0x00000300L

Definition at line 661 of file penwin.h.

#define GST_CIRCLELO 0x00000100L

Definition at line 659 of file penwin.h.

#define GST_CIRCLEUP 0x00000200L

Definition at line 660 of file penwin.h.

#define GST_CLIP 0x00000002L

Definition at line 654 of file penwin.h.

#define GST_EDIT 0x00000010L

Definition at line 657 of file penwin.h.

#define GST_KKCONVERT 0x00000008L

Definition at line 656 of file penwin.h.

#define GST_SEL 0x00000001L

Definition at line 653 of file penwin.h.

#define GST_SYS 0x00000017L

Definition at line 658 of file penwin.h.

#define GST_WHITE 0x00000004L

Definition at line 655 of file penwin.h.

#define HE_CANCELKKCONVERT 32

Definition at line 1217 of file penwin.h.

#define HE_CHAROFFSET 15

Definition at line 1210 of file penwin.h.

#define HE_CHARPOSITION 14

Definition at line 1209 of file penwin.h.

#define HE_DEFAULTFONT 13

_WIN32

Definition at line 1208 of file penwin.h.

#define HE_ENABLEALTLIST 40

_WIN32

Definition at line 1224 of file penwin.h.

#define HE_FIXKKCONVERT 33

Definition at line 1218 of file penwin.h.

#define HE_GETBOXLAYOUT 20

Definition at line 1211 of file penwin.h.

#define HE_GETIMEDEFAULT 37

Definition at line 1222 of file penwin.h.

#define HE_GETINFLATE 5

Definition at line 1197 of file penwin.h.

#define HE_GETINKHANDLE 9

Definition at line 1202 of file penwin.h.

#define HE_GETKKCONVERT 31

Definition at line 1216 of file penwin.h.

#define HE_GETKKSTATUS 34

Definition at line 1219 of file penwin.h.

#define HE_GETLENSTYPE 43

Definition at line 1227 of file penwin.h.

#define HE_GETRC 3

Definition at line 1195 of file penwin.h.

#define HE_GETRCRESULT 22

Definition at line 1214 of file penwin.h.

#define HE_GETRCRESULTCODE 12

Definition at line 1206 of file penwin.h.

#define HE_GETUNDERLINE 7

_WIN32

Definition at line 1200 of file penwin.h.

#define HE_HIDEALTLIST 42

Definition at line 1226 of file penwin.h.

#define HE_KKCONVERT 30

Definition at line 1215 of file penwin.h.

#define HE_KKNOCONVERT 35

Definition at line 1220 of file penwin.h.

#define HE_SETBOXLAYOUT 21

Definition at line 1212 of file penwin.h.

#define HE_SETIMEDEFAULT 36

Definition at line 1221 of file penwin.h.

#define HE_SETINFLATE 6

Definition at line 1198 of file penwin.h.

#define HE_SETINKMODE 10

Definition at line 1203 of file penwin.h.

#define HE_SETLENSTYPE 44

Definition at line 1228 of file penwin.h.

#define HE_SETRC 4

Definition at line 1196 of file penwin.h.

#define HE_SETUNDERLINE 8

Definition at line 1201 of file penwin.h.

#define HE_SHOWALTLIST 41

Definition at line 1225 of file penwin.h.

#define HE_STOPINKMODE 11

Definition at line 1204 of file penwin.h.

#define HEAL_DEFAULT -1L

Definition at line 1342 of file penwin.h.

#define HEKK_CANDIDATE 2

Definition at line 1234 of file penwin.h.

#define HEKK_CONVERT 1

Definition at line 1233 of file penwin.h.

#define HEKK_DBCSCHAR 3

Definition at line 1235 of file penwin.h.

#define HEKK_DEFAULT 0

Definition at line 1232 of file penwin.h.

#define HEKK_HIRAGANA 5

Definition at line 1237 of file penwin.h.

#define HEKK_KATAKANA 6

Definition at line 1238 of file penwin.h.

#define HEKK_SBCSCHAR 4

Definition at line 1236 of file penwin.h.

#define HEKKR_CONVERT 2

Definition at line 1243 of file penwin.h.

#define HEKKR_PRECONVERT 1

Definition at line 1242 of file penwin.h.

#define HEKKR_TEMPCONFIRM 3

Definition at line 1244 of file penwin.h.

#define HEP_NORECOG 0

Definition at line 1247 of file penwin.h.

#define HEP_RECOG 1

Definition at line 1248 of file penwin.h.

#define HEP_WAITFORTAP 2

Definition at line 1249 of file penwin.h.

#define HKP_SETHOOK 0

Definition at line 954 of file penwin.h.

#define HKP_UNHOOK 0xFFFF

Definition at line 955 of file penwin.h.

#define HN_BEGINDIALOG 40

Definition at line 1259 of file penwin.h.

#define HN_DELAYEDRECOGFAIL 5

Definition at line 1253 of file penwin.h.

#define HN_ENDDIALOG 41

Definition at line 1261 of file penwin.h.

#define HN_ENDKKCONVERT 30

_WIN32

Definition at line 1258 of file penwin.h.

#define HN_ENDREC 4

Definition at line 1252 of file penwin.h.

#define HN_RCRESULT HN_RESULT

Definition at line 1256 of file penwin.h.

#define HN_RESULT 20

Definition at line 1254 of file penwin.h.

#define HpcmFromWpLp | ( | wp,
 |  | lp |
 | ) |  | ((HPCM)HIWORD(lp))

Definition at line 1586 of file penwin.h.

#define HRCR_COMPLETE 3

Definition at line 666 of file penwin.h.

#define HRCR_CONFLICT (-6)

Definition at line 675 of file penwin.h.

#define HRCR_ERROR (-1)

Definition at line 670 of file penwin.h.

#define HRCR_GESTURE 2

Definition at line 667 of file penwin.h.

#define HRCR_HOOKED (-8)

Definition at line 676 of file penwin.h.

#define HRCR_INCOMPLETE 0

Definition at line 669 of file penwin.h.

#define HRCR_INVALIDGUIDE (-3)

Definition at line 672 of file penwin.h.

#define HRCR_INVALIDPNDT (-4)

Definition at line 673 of file penwin.h.

#define HRCR_MEMERR (-2)

Definition at line 671 of file penwin.h.

#define HRCR_NORESULTS 4

Definition at line 665 of file penwin.h.

#define HRCR_OK 1

Definition at line 668 of file penwin.h.

#define HRCR_UNSUPPORTED (-5)

Definition at line 674 of file penwin.h.

#define HtrgFromHwnd ( hwnd ) ((HTRG)(UINT)(hwnd))

Definition at line 1594 of file penwin.h.

#define HWL_SYSTEM ((HWL)1)

Definition at line 679 of file penwin.h.

#define HwndFromHtrg ( htrg ) ((HWND)(DWORD)(htrg))

NOPENINKPUT

Definition at line 1593 of file penwin.h.

#define HWR_APPWIDE 1

Definition at line 958 of file penwin.h.

#define HWR_RESULTS 0

Definition at line 957 of file penwin.h.

#define IDC_ALTSELECT MAKEINTRESOURCE(32501)

Definition at line 189 of file penwin.h.

#define IDC_PEN MAKEINTRESOURCE(32631)

NOPENBMP

Definition at line 186 of file penwin.h.

#define IE_CANUNDO (EM_CANUNDO)

Definition at line 1270 of file penwin.h.

#define IE_DOCOMMAND (IE_MSGFIRST+50)

Definition at line 1312 of file penwin.h.

#define IE_EMPTYUNDOBUFFER (EM_EMPTYUNDOBUFFER)

Definition at line 1272 of file penwin.h.

#define IE_GETAPPDATA (IE_MSGFIRST+34)

Definition at line 1296 of file penwin.h.

#define IE_GETBKGND (IE_MSGFIRST+6)

Definition at line 1283 of file penwin.h.

#define IE_GETCOMMAND (IE_MSGFIRST+51)

Definition at line 1313 of file penwin.h.

#define IE_GETCOUNT (IE_MSGFIRST+52)

Definition at line 1314 of file penwin.h.

#define IE_GETDRAWOPTS (IE_MSGFIRST+36)

Definition at line 1298 of file penwin.h.

#define IE_GETERASERTIP (IE_MSGFIRST+4)

Definition at line 1281 of file penwin.h.

#define IE_GETFORMAT (IE_MSGFIRST+38)

Definition at line 1300 of file penwin.h.

#define IE_GETGESTURE (IE_MSGFIRST+53)

Definition at line 1315 of file penwin.h.

#define IE_GETGRIDORIGIN (IE_MSGFIRST+8)

Definition at line 1285 of file penwin.h.

#define IE_GETGRIDPEN (IE_MSGFIRST+10)

Definition at line 1287 of file penwin.h.

#define IE_GETGRIDSIZE (IE_MSGFIRST+12)

Definition at line 1289 of file penwin.h.

#define IE_GETINK (IE_MSGFIRST+0)

Definition at line 1277 of file penwin.h.

#define IE_GETINKINPUT (IE_MSGFIRST+40)

Definition at line 1302 of file penwin.h.

#define IE_GETINKRECT (IE_MSGFIRST+16)

Definition at line 1293 of file penwin.h.

#define IE_GETMENU (IE_MSGFIRST+54)

Definition at line 1316 of file penwin.h.

#define IE_GETMODE (IE_MSGFIRST+14)

Definition at line 1291 of file penwin.h.

#define IE_GETMODIFY (EM_GETMODIFY)

Definition at line 1268 of file penwin.h.

#define IE_GETNOTIFY (IE_MSGFIRST+42)

Definition at line 1304 of file penwin.h.

#define IE_GETPAINTDC (IE_MSGFIRST+55)

Definition at line 1317 of file penwin.h.

#define IE_GETPDEVENT (IE_MSGFIRST+56)

Definition at line 1318 of file penwin.h.

#define IE_GETPENTIP (IE_MSGFIRST+2)

Definition at line 1279 of file penwin.h.

#define IE_GETRECOG (IE_MSGFIRST+44)

Definition at line 1306 of file penwin.h.

#define IE_GETSECURITY (IE_MSGFIRST+46)

Definition at line 1308 of file penwin.h.

#define IE_GETSEL (IE_MSGFIRST+48)

Definition at line 1310 of file penwin.h.

#define IE_GETSELCOUNT (IE_MSGFIRST+57)

Definition at line 1319 of file penwin.h.

#define IE_GETSELITEMS (IE_MSGFIRST+58)

Definition at line 1320 of file penwin.h.

#define IE_GETSTYLE (IE_MSGFIRST+59)

Definition at line 1321 of file penwin.h.

#define IE_MSGFIRST (WM_USER+150)

Definition at line 1274 of file penwin.h.

#define IE_SETAPPDATA (IE_MSGFIRST+35)

Definition at line 1297 of file penwin.h.

#define IE_SETBKGND (IE_MSGFIRST+7)

Definition at line 1284 of file penwin.h.

#define IE_SETDRAWOPTS (IE_MSGFIRST+37)

Definition at line 1299 of file penwin.h.

#define IE_SETERASERTIP (IE_MSGFIRST+5)

Definition at line 1282 of file penwin.h.

#define IE_SETFORMAT (IE_MSGFIRST+39)

Definition at line 1301 of file penwin.h.

#define IE_SETGRIDORIGIN (IE_MSGFIRST+9)

Definition at line 1286 of file penwin.h.

#define IE_SETGRIDPEN (IE_MSGFIRST+11)

Definition at line 1288 of file penwin.h.

#define IE_SETGRIDSIZE (IE_MSGFIRST+13)

Definition at line 1290 of file penwin.h.

#define IE_SETINK (IE_MSGFIRST+1)

Definition at line 1278 of file penwin.h.

#define IE_SETINKINPUT (IE_MSGFIRST+41)

Definition at line 1303 of file penwin.h.

#define IE_SETMODE (IE_MSGFIRST+15)

Definition at line 1292 of file penwin.h.

#define IE_SETMODIFY (EM_SETMODIFY)

Definition at line 1269 of file penwin.h.

#define IE_SETNOTIFY (IE_MSGFIRST+43)

Definition at line 1305 of file penwin.h.

#define IE_SETPENTIP (IE_MSGFIRST+3)

Definition at line 1280 of file penwin.h.

#define IE_SETRECOG (IE_MSGFIRST+45)

Definition at line 1307 of file penwin.h.

#define IE_SETSECURITY (IE_MSGFIRST+47)

Definition at line 1309 of file penwin.h.

#define IE_SETSEL (IE_MSGFIRST+49)

Definition at line 1311 of file penwin.h.

#define IE_UNDO (EM_UNDO)

Definition at line 1271 of file penwin.h.

#define IEB_BIT_CENTER 3

Definition at line 790 of file penwin.h.

#define IEB_BIT_STRETCH 5

Definition at line 792 of file penwin.h.

#define IEB_BIT_TILE 4

Definition at line 791 of file penwin.h.

#define IEB_BIT_UL 2

Definition at line 789 of file penwin.h.

#define IEB_BRUSH 1

Definition at line 788 of file penwin.h.

#define IEB_DEFAULT 0

NOPENHRC

Definition at line 787 of file penwin.h.

#define IEB_OWNERDRAW 6

Definition at line 793 of file penwin.h.

#define IEDO_FAST 0x0001

Definition at line 797 of file penwin.h.

#define IEDO_NONE 0x0000

Definition at line 796 of file penwin.h.

#define IEDO_RESERVED 0xFFFC

Definition at line 799 of file penwin.h.

#define IEDO_SAVEUPSTROKES 0x0002

Definition at line 798 of file penwin.h.

#define IEGI_ALL 0x0000

Definition at line 809 of file penwin.h.

#define IEGI_SELECTION 0x0001

Definition at line 810 of file penwin.h.

#define IEI_CROP 0x0004

Definition at line 804 of file penwin.h.

#define IEI_DISCARD 0x0008

Definition at line 805 of file penwin.h.

#define IEI_MOVE 0x0001

Definition at line 802 of file penwin.h.

#define IEI_RESERVED 0xFFF0

Definition at line 806 of file penwin.h.

#define IEI_RESIZE 0x0002

Definition at line 803 of file penwin.h.

#define IEM_CLEAR 5

Definition at line 264 of file penwin.h.

#define IEM_COPY 3

Definition at line 262 of file penwin.h.

#define IEM_CUT 2

Definition at line 261 of file penwin.h.

#define IEM_ERASE 7

Definition at line 266 of file penwin.h.

#define IEM_LASSO 9

Definition at line 268 of file penwin.h.

#define IEM_PASTE 4

Definition at line 263 of file penwin.h.

#define IEM_PROPERTIES 8

Definition at line 267 of file penwin.h.

#define IEM_RESIZE 10

Definition at line 269 of file penwin.h.

#define IEM_SELECTALL 6

Definition at line 265 of file penwin.h.

#define IEM_UNDO 1

NOPENHRC.

Definition at line 260 of file penwin.h.

#define IEM_USER 100

Definition at line 271 of file penwin.h.

#define IEMODE_ERASE 1

Definition at line 814 of file penwin.h.

#define IEMODE_LASSO 2

Definition at line 815 of file penwin.h.

#define IEMODE_READY 0

Definition at line 813 of file penwin.h.

#define IEN_EDIT 0x0010

Definition at line 823 of file penwin.h.

#define IEN_FOCUS 0x0004

Definition at line 821 of file penwin.h.

#define IEN_NULL 0x0000

Definition at line 818 of file penwin.h.

#define IEN_PAINT 0x0002

Definition at line 820 of file penwin.h.

#define IEN_PDEVENT 0x0001

Definition at line 819 of file penwin.h.

#define IEN_PROPERTIES 0x0020

Definition at line 824 of file penwin.h.

#define IEN_RESERVED 0xFF80

Definition at line 825 of file penwin.h.

#define IEN_SCROLL 0x0008

Definition at line 822 of file penwin.h.

#define IER_ERROR (-1)

Definition at line 831 of file penwin.h.

#define IER_MEMERR (-7)

Definition at line 837 of file penwin.h.

#define IER_NO 0

Definition at line 829 of file penwin.h.

#define IER_NOCOMMAND (-8)

Definition at line 838 of file penwin.h.

#define IER_NOGESTURE (-9)

Definition at line 839 of file penwin.h.

#define IER_NOPDEVENT (-10)

Definition at line 840 of file penwin.h.

#define IER_NOTINPAINT (-11)

Definition at line 841 of file penwin.h.

#define IER_OK 0

Definition at line 828 of file penwin.h.

#define IER_OWNERDRAW (-3)

Definition at line 833 of file penwin.h.

#define IER_PARAMERR (-2)

Definition at line 832 of file penwin.h.

#define IER_PENDATA (-12)

Definition at line 842 of file penwin.h.

#define IER_SCALE (-6)

Definition at line 836 of file penwin.h.

#define IER_SECURITY (-4)

Definition at line 834 of file penwin.h.

#define IER_SELECTION (-5)

Definition at line 835 of file penwin.h.

#define IER_YES 1

Definition at line 830 of file penwin.h.

#define IEREC_ALL (IEREC_GESTURE)

Definition at line 847 of file penwin.h.

#define IEREC_GESTURE 0x0001

Definition at line 846 of file penwin.h.

#define IEREC_NONE 0x0000

Definition at line 845 of file penwin.h.

#define IEREC_RESERVED 0xFFFE

Definition at line 848 of file penwin.h.

#define IES_BORDER 0x0001

Definition at line 274 of file penwin.h.

#define IES_HSCROLL 0x0002

Definition at line 275 of file penwin.h.

#define IES_OWNERDRAW 0x0008

Definition at line 277 of file penwin.h.

#define IES_VSCROLL 0x0004

Definition at line 276 of file penwin.h.

#define IESEC_NOCOPY 0x0001

Definition at line 851 of file penwin.h.

#define IESEC_NOCUT 0x0002

Definition at line 852 of file penwin.h.

#define IESEC_NOERASE 0x0020

Definition at line 856 of file penwin.h.

#define IESEC_NOGET 0x0040

Definition at line 857 of file penwin.h.

#define IESEC_NOINK 0x0010

Definition at line 855 of file penwin.h.

#define IESEC_NOPASTE 0x0004

Definition at line 853 of file penwin.h.

#define IESEC_NOSET 0x0080

Definition at line 858 of file penwin.h.

#define IESEC_NOUNDO 0x0008

Definition at line 854 of file penwin.h.

#define IESEC_RESERVED 0xFF00

Definition at line 859 of file penwin.h.

#define IESF_ALL 0x0001

Definition at line 862 of file penwin.h.

#define IESF_PENTIP (IESF_TIPCOLOR|IESF_TIPWIDTH)

Definition at line 868 of file penwin.h.

#define IESF_SELECTION 0x0002

Definition at line 863 of file penwin.h.

#define IESF_STROKE 0x0004

Definition at line 864 of file penwin.h.

#define IESF_TIPCOLOR 0x0008

Definition at line 866 of file penwin.h.

#define IESF_TIPWIDTH 0x0010

Definition at line 867 of file penwin.h.

#define IESI_APPEND 0x0001

Definition at line 873 of file penwin.h.

#define IESI_REPLACE 0x0000

Definition at line 872 of file penwin.h.

#define IN_CHANGE ((IEN_EDIT<<8)|6)

Definition at line 883 of file penwin.h.

#define IN_CLOSE ((IEN_NULL<<8)|15)

Definition at line 892 of file penwin.h.

#define IN_COMMAND ((IEN_EDIT<<8)|14)

Definition at line 891 of file penwin.h.

#define IN_ERASEBKGND ((IEN_NULL<<8)|1)

Definition at line 878 of file penwin.h.

#define IN_GESTURE ((IEN_EDIT<<8)|13)

Definition at line 890 of file penwin.h.

#define IN_HSCROLL ((IEN_SCROLL<<8)|11)

Definition at line 888 of file penwin.h.

#define IN_KILLFOCUS ((IEN_FOCUS<<8)|9)

Definition at line 886 of file penwin.h.

#define IN_MEMERR ((IEN_NULL<<8)|10)

Definition at line 887 of file penwin.h.

#define IN_MODECHANGED ((IEN_EDIT<<8)|5)

Definition at line 882 of file penwin.h.

#define IN_PAINT ((IEN_NULL<<8)|3)

Definition at line 880 of file penwin.h.

#define IN_PDEVENT ((IEN_PDEVENT<<8)|0)

Definition at line 877 of file penwin.h.

#define IN_POSTPAINT ((IEN_PAINT<<8)|4)

Definition at line 881 of file penwin.h.

#define IN_PREPAINT ((IEN_PAINT<<8)|2)

Definition at line 879 of file penwin.h.

#define IN_PROPERTIES ((IEN_PROPERTIES<<8)|16)

Definition at line 893 of file penwin.h.

#define IN_SETFOCUS ((IEN_FOCUS<<8)|8)

Definition at line 885 of file penwin.h.

#define IN_UPDATE ((IEN_EDIT<<8)|7)

Definition at line 884 of file penwin.h.

#define IN_VSCROLL ((IEN_SCROLL<<8)|12)

Definition at line 889 of file penwin.h.

#define INKWIDTH_MAXIMUM 15

Definition at line 1002 of file penwin.h.

#define INKWIDTH_MINIMUM 0

Definition at line 1001 of file penwin.h.

#define IsAlcBitAnsi | ( | lprc,
 |  | i |
 | ) |  | ((MpAlcB(lprc,i) & MpIbf(i)) != 0)

Definition at line 1477 of file penwin.h.

#define ISR_BADINDEX (-3)

Definition at line 684 of file penwin.h.

#define ISR_BADINKSET (-2)

Definition at line 683 of file penwin.h.

#define ISR_ERROR (-1)

Definition at line 682 of file penwin.h.

#define iSycNull (-1)

Definition at line 960 of file penwin.h.

#define IX_END 0xFFFF

Definition at line 370 of file penwin.h.

#define LPDFNULL ((LPDF)NULL)

Definition at line 961 of file penwin.h.

#define LRET_ABORT (-1L)

Definition at line 904 of file penwin.h.

#define LRET_DONE 1L

NOPENIEDIT

Definition at line 903 of file penwin.h.

#define LRET_HPENDATA (-3L)

Definition at line 906 of file penwin.h.

#define LRET_HRC (-2L)

Definition at line 905 of file penwin.h.

#define LRET_PRIVATE (-4L)

Definition at line 907 of file penwin.h.

#define MakeAbsTime | ( | lpat,
 |  | sec,
 |  | ms
 | ) |
Value:
do {\
    (lpat)->sec = sec + ((ms) / 1000);\
    (lpat)->ms = (ms) % 1000;\
    } while (0)

Definition at line 1527 of file penwin.h.

#define MAXDICTIONARIES 16

Definition at line 962 of file penwin.h.

#define MAXHOTSPOT 8

IX_END.

Definition at line 690 of file penwin.h.

#define MAXOEMDATAWORDS 6

Definition at line 543 of file penwin.h.

#define MpAlcB | ( | lprc,
 |  | i |
 | ) |  | ((lprc)->rgbfAlc[((i) & 0xff) >> 3])

NOPENDRIVER

Definition at line 1473 of file penwin.h.

#define MpIbf ( i ) ((BYTE)(1 << ((i) & 7)))

Definition at line 1474 of file penwin.h.

#define OBM_HANBTNDISABLED 32759

Definition at line 168 of file penwin.h.

#define OBM_HANBTNDOWN 32760

Definition at line 167 of file penwin.h.

#define OBM_HANBTNUP 32761

Definition at line 166 of file penwin.h.

#define OBM_KKCBTNDISABLED 32756

Definition at line 172 of file penwin.h.

#define OBM_KKCBTNDOWN 32757

Definition at line 171 of file penwin.h.

#define OBM_KKCBTNUP 32758

Definition at line 170 of file penwin.h.

#define OBM_PTYBTNDISABLED 32750

Definition at line 180 of file penwin.h.

#define OBM_PTYBTNDOWN 32751

Definition at line 179 of file penwin.h.

#define OBM_PTYBTNUP 32752

Definition at line 178 of file penwin.h.

#define OBM_SIPBTNDISABLED 32753

Definition at line 176 of file penwin.h.

#define OBM_SIPBTNDOWN 32754

Definition at line 175 of file penwin.h.

#define OBM_SIPBTNUP 32755

Definition at line 174 of file penwin.h.

#define OBM_SKBBTNDISABLED 32765

Definition at line 160 of file penwin.h.

#define OBM_SKBBTNDOWN 32766

Definition at line 159 of file penwin.h.

#define OBM_SKBBTNUP 32767

NOPENBEDIT

Definition at line 158 of file penwin.h.

#define OBM_ZENBTNDISABLED 32762

Definition at line 164 of file penwin.h.

#define OBM_ZENBTNDOWN 32763

Definition at line 163 of file penwin.h.

#define OBM_ZENBTNUP 32764

Definition at line 162 of file penwin.h.

#define PCM_ADDDEFAULTS RC_LDEFAULTFLAGS

Definition at line 558 of file penwin.h.

#define PCM_DOPOLLING 0x00040000L

Definition at line 556 of file penwin.h.

#define PCM_INVERT 0x00000020L

Definition at line 549 of file penwin.h.

#define PCM_PENUP 0x00000001L

Definition at line 547 of file penwin.h.

#define PCM_RANGE 0x00000002L

Definition at line 548 of file penwin.h.

#define PCM_RECTBOUND 0x00004000L

Definition at line 551 of file penwin.h.

#define PCM_RECTEXCLUDE 0x00002000L

Definition at line 550 of file penwin.h.

#define PCM_RGNBOUND 0x00010000L

Definition at line 554 of file penwin.h.

#define PCM_RGNEXCLUDE 0x00020000L

Definition at line 555 of file penwin.h.

#define PCM_TAPNHOLD 0x00080000L

Definition at line 557 of file penwin.h.

#define PCM_TIMEOUT 0x00008000L

Definition at line 552 of file penwin.h.

#define PCMR_ALREADYCOLLECTING (-1)

Definition at line 911 of file penwin.h.

#define PCMR_APPTERMINATED (-10)

Definition at line 920 of file penwin.h.

#define PCMR_DISPLAYERR (-15)

Definition at line 925 of file penwin.h.

#define PCMR_ERROR (-14)

Definition at line 924 of file penwin.h.

#define PCMR_EVENTLOCK (-3)

Definition at line 913 of file penwin.h.

#define PCMR_INVALID_PACKETID (-4)

Definition at line 914 of file penwin.h.

#define PCMR_INVALIDCOLLECTION (-2)

Definition at line 912 of file penwin.h.

#define PCMR_OK 0

Definition at line 910 of file penwin.h.

#define PCMR_OVERFLOW (-13)

Definition at line 923 of file penwin.h.

#define PCMR_SELECT (-12)

Definition at line 922 of file penwin.h.

#define PCMR_TAP (-11)

Definition at line 921 of file penwin.h.

#define PCMR_TERMBOUND (-9)

Definition at line 919 of file penwin.h.

#define PCMR_TERMEX (-8)

Definition at line 918 of file penwin.h.

#define PCMR_TERMINVERT (-16)

Definition at line 926 of file penwin.h.

#define PCMR_TERMPENUP (-7)

Definition at line 917 of file penwin.h.

#define PCMR_TERMRANGE (-6)

Definition at line 916 of file penwin.h.

#define PCMR_TERMTIMEOUT (-5)

Definition at line 915 of file penwin.h.

#define PDC_BARREL1 0x00000020L

Definition at line 566 of file penwin.h.

#define PDC_BARREL2 0x00000040L

Definition at line 567 of file penwin.h.

#define PDC_BARREL3 0x00000080L

Definition at line 568 of file penwin.h.

#define PDC_INTEGRATED 0x00000001L

Definition at line 561 of file penwin.h.

#define PDC_INVERT 0x00000008L

Definition at line 564 of file penwin.h.

#define PDC_PROXIMITY 0x00000002L

Definition at line 562 of file penwin.h.

#define PDC_RANGE 0x00000004L

Definition at line 563 of file penwin.h.

#define PDC_RELATIVE 0x00000010L

Definition at line 565 of file penwin.h.

#define PDK_BARREL1 0x0002

Definition at line 574 of file penwin.h.

#define PDK_BARREL2 0x0004

Definition at line 575 of file penwin.h.

#define PDK_BARREL3 0x0008

Definition at line 576 of file penwin.h.

#define PDK_DOWN 0x0001

Definition at line 573 of file penwin.h.

#define PDK_DRIVER 0x8000

Definition at line 586 of file penwin.h.

#define PDK_INKSTOPPED 0x2000

Definition at line 584 of file penwin.h.

#define PDK_INVERTED 0x0080

Definition at line 581 of file penwin.h.

#define PDK_NULL 0x0000

Definition at line 571 of file penwin.h.

#define PDK_OUTOFRANGE 0x4000

Definition at line 585 of file penwin.h.

#define PDK_PENIDMASK 0x0F00

Definition at line 582 of file penwin.h.

#define PDK_SWITCHES 0x000f

Definition at line 577 of file penwin.h.

#define PDK_TIPMASK 0x0001

Definition at line 588 of file penwin.h.

#define PDK_TRANSITION 0x0010

Definition at line 578 of file penwin.h.

#define PDK_UNUSED10 0x0020

Definition at line 579 of file penwin.h.

#define PDK_UNUSED1000 0x1000

Definition at line 583 of file penwin.h.

#define PDK_UNUSED20 0x0040

Definition at line 580 of file penwin.h.

#define PDK_UP 0x0000

Definition at line 572 of file penwin.h.

#define PDR_ABORT (-9)

Definition at line 394 of file penwin.h.

#define PDR_CANCEL 0

Definition at line 384 of file penwin.h.

#define PDR_COMPRESSED (-4)

Definition at line 389 of file penwin.h.

#define PDR_ERROR (-1)

Definition at line 386 of file penwin.h.

#define PDR_HIT 2

Definition at line 382 of file penwin.h.

#define PDR_INKSETERR (-8)

Definition at line 393 of file penwin.h.

#define PDR_MEMERR (-7)

Definition at line 392 of file penwin.h.

#define PDR_NA (-10)

Definition at line 395 of file penwin.h.

#define PDR_NOHIT 3

Definition at line 381 of file penwin.h.

#define PDR_OEMDATAERR (-19)

Definition at line 400 of file penwin.h.

#define PDR_OK 1

Definition at line 383 of file penwin.h.

#define PDR_PNDTERR (-2)

Definition at line 387 of file penwin.h.

#define PDR_PNTINDEXERR (-6)

Definition at line 391 of file penwin.h.

#define PDR_SCALINGERR (-17)

Definition at line 398 of file penwin.h.

#define PDR_SCTERR (-20)

Definition at line 401 of file penwin.h.

#define PDR_STRKINDEXERR (-5)

Definition at line 390 of file penwin.h.

#define PDR_TIMESTAMPERR (-18)

Definition at line 399 of file penwin.h.

#define PDR_USERDATAERR (-16)

Definition at line 397 of file penwin.h.

#define PDR_VERSIONERR (-3)

Definition at line 388 of file penwin.h.

#define PDT_ANGLEXY 3

Definition at line 594 of file penwin.h.

#define PDT_ANGLEZ 4

Definition at line 595 of file penwin.h.

#define PDT_BARRELROTATION 5

Definition at line 596 of file penwin.h.

#define PDT_HEIGHT 2

Definition at line 593 of file penwin.h.

#define PDT_NULL 0

Definition at line 591 of file penwin.h.

#define PDT_OEMSPECIFIC 16

Definition at line 597 of file penwin.h.

#define PDT_PRESSURE 1

Definition at line 592 of file penwin.h.

#define PDTS_ARBITRARY 4

Definition at line 409 of file penwin.h.

#define PDTS_COMPRESS2NDDERIV 0x0010

Definition at line 434 of file penwin.h.

#define PDTS_COMPRESSED 0x8000

Definition at line 444 of file penwin.h.

#define PDTS_COMPRESSMETHOD 0x00F0

Definition at line 435 of file penwin.h.

#define PDTS_DISPLAY 3

Definition at line 408 of file penwin.h.

#define PDTS_HIENGLISH 2

Definition at line 406 of file penwin.h.

#define PDTS_HIMETRIC 1

Definition at line 405 of file penwin.h.

#define PDTS_LOMETRIC 0

Definition at line 404 of file penwin.h.

#define PDTS_NOCOLINEAR 0x0800

Definition at line 440 of file penwin.h.

#define PDTS_NOCOLLINEAR 0x0800

Definition at line 439 of file penwin.h.

#define PDTS_NOEMPTYSTROKES 0x4000

Definition at line 443 of file penwin.h.

#define PDTS_NOOEMDATA 0x0400

Definition at line 438 of file penwin.h.

#define PDTS_NOPENINFO 0x0100

Definition at line 436 of file penwin.h.

#define PDTS_NOTICK 0x1000

Definition at line 441 of file penwin.h.

#define PDTS_NOUPPOINTS 0x0200

Definition at line 437 of file penwin.h.

#define PDTS_NOUSER 0x2000

Definition at line 442 of file penwin.h.

#define PDTS_SCALEMASK 0x000F

Definition at line 410 of file penwin.h.

#define PDTS_STANDARDSCALE 2

Definition at line 407 of file penwin.h.

#define PDTT_ALL 0x0F00

Definition at line 421 of file penwin.h.

#define PDTT_COLINEAR 0x0800

Definition at line 418 of file penwin.h.

#define PDTT_COLLINEAR 0x0800

Definition at line 417 of file penwin.h.

#define PDTT_COMPRESS 0x8000

Definition at line 420 of file penwin.h.

#define PDTT_DECOMPRESS 0x4000

Definition at line 419 of file penwin.h.

#define PDTT_DEFAULT 0x0000

Definition at line 413 of file penwin.h.

#define PDTT_OEMDATA 0x0400

Definition at line 416 of file penwin.h.

#define PDTT_PENINFO 0x0100

Definition at line 414 of file penwin.h.

#define PDTT_UPPOINTS 0x0200

Definition at line 415 of file penwin.h.

#define PE_BEGINDATA 9

Definition at line 1442 of file penwin.h.

#define PE_BEGININPUT 7

Definition at line 1440 of file penwin.h.

#define PE_BUFFERWARNING 6

Definition at line 1439 of file penwin.h.

#define PE_ENDDATA 11

Definition at line 1444 of file penwin.h.

#define PE_ENDINPUT 14

Definition at line 1447 of file penwin.h.

#define PE_GETINKINGINFO 13

Definition at line 1446 of file penwin.h.

#define PE_GETPCMINFO 12

Definition at line 1445 of file penwin.h.

#define PE_MOREDATA 10

Definition at line 1443 of file penwin.h.

#define PE_PENDOWN 1

Definition at line 1434 of file penwin.h.

#define PE_PENMOVE 3

Definition at line 1436 of file penwin.h.

#define PE_PENUP 2

Definition at line 1435 of file penwin.h.

#define PE_RESULT 15

Definition at line 1449 of file penwin.h.

#define PE_SETTARGETS 8

Definition at line 1441 of file penwin.h.

#define PE_TERMINATED 5

Definition at line 1438 of file penwin.h.

#define PE_TERMINATING 4

Definition at line 1437 of file penwin.h.

#define PENREG_DEFAULT 0x00000002

Definition at line 540 of file penwin.h.

#define PENREG_WILLHANDLEMOUSE 0x00000001

Definition at line 541 of file penwin.h.

#define PENTIP_HEIGHTDEFAULT ((BYTE)0)

Definition at line 375 of file penwin.h.

#define PENTIP_HILITE ((BYTE)0x80)

Definition at line 377 of file penwin.h.

#define PENTIP_NIBDEFAULT ((BYTE)0)

IX_END.

Definition at line 374 of file penwin.h.

#define PENTIP_OPAQUE ((BYTE)0xFF)

Definition at line 376 of file penwin.h.

#define PENTIP_TRANSPARENT ((BYTE)0)

Definition at line 378 of file penwin.h.

#define PENVER 0x0200

_WIN32

Definition at line 64 of file penwin.h.

#define PH_DEFAULT 0xFFFFFFFEL

Definition at line 694 of file penwin.h.

#define PH_MAX 0xFFFFFFFFL

Definition at line 693 of file penwin.h.

#define PH_MIN 0xFFFFFFFDL

Definition at line 695 of file penwin.h.

#define PHW_ALL 0x007F

Definition at line 431 of file penwin.h.

#define PHW_ANGLEXY 0x0004

Definition at line 426 of file penwin.h.

#define PHW_ANGLEZ 0x0008

Definition at line 427 of file penwin.h.

#define PHW_BARRELROTATION 0x0010

Definition at line 428 of file penwin.h.

#define PHW_HEIGHT 0x0002

Definition at line 425 of file penwin.h.

#define PHW_NONE 0x0000

Definition at line 423 of file penwin.h.

#define PHW_OEMSPECIFIC 0x0020

Definition at line 429 of file penwin.h.

#define PHW_PDK 0x0040

Definition at line 430 of file penwin.h.

#define PHW_PRESSURE 0x0001

Definition at line 424 of file penwin.h.

#define PID_CURRENT (UINT)(-1)

Definition at line 600 of file penwin.h.

#define PII_CLIPSTOP 0x0040

Definition at line 934 of file penwin.h.

#define PII_INKCLIPRECT 0x0001

Definition at line 928 of file penwin.h.

#define PII_INKCLIPRGN 0x0004

Definition at line 930 of file penwin.h.

#define PII_INKPENTIP 0x0010

Definition at line 932 of file penwin.h.

#define PII_INKSTOPRECT 0x0002

Definition at line 929 of file penwin.h.

#define PII_INKSTOPRGN 0x0008

Definition at line 931 of file penwin.h.

#define PII_SAVEBACKGROUND 0x0020

Definition at line 933 of file penwin.h.

#define PIT_RGNBOUND 0x0001

Definition at line 936 of file penwin.h.

#define PIT_RGNEXCLUDE 0x0002

Definition at line 937 of file penwin.h.

#define PIT_TAPNHOLD 0x0008

Definition at line 939 of file penwin.h.

#define PIT_TIMEOUT 0x0004

Definition at line 938 of file penwin.h.

#define PLAY_VERSION_10_DATA 0

Definition at line 529 of file penwin.h.

#define PLAY_VERSION_20_DATA 1

Definition at line 530 of file penwin.h.

#define PMI_BEDIT 1

Definition at line 1008 of file penwin.h.

#define PMI_CXTABLET 3

Definition at line 1010 of file penwin.h.

#define PMI_CYTABLET 4

Definition at line 1011 of file penwin.h.

#define PMI_ENABLEFLAGS 7

Definition at line 1013 of file penwin.h.

#define PMI_IMECOLOR 2

Definition at line 1009 of file penwin.h.

#define PMI_INDEXFROMRGB 12

Definition at line 1018 of file penwin.h.

#define PMI_PENTIP 6

Definition at line 1012 of file penwin.h.

#define PMI_RCCHANGE 0

Definition at line 1006 of file penwin.h.

#define PMI_RGBFROMINDEX 13

Definition at line 1019 of file penwin.h.

#define PMI_SAVE 0x1000

Definition at line 1023 of file penwin.h.

#define PMI_SYSFLAGS 11

Definition at line 1017 of file penwin.h.

#define PMI_SYSREC 14

Definition at line 1020 of file penwin.h.

#define PMI_TICKREF 15

Definition at line 1021 of file penwin.h.

#define PMI_TIMEOUT 8

Definition at line 1014 of file penwin.h.

#define PMI_TIMEOUTGEST 9

Definition at line 1015 of file penwin.h.

#define PMI_TIMEOUTSEL 10

Definition at line 1016 of file penwin.h.

#define PMIR_ERROR (-5L)

Definition at line 1055 of file penwin.h.

#define PMIR_INDEX (-1L)

Definition at line 1051 of file penwin.h.

#define PMIR_INIERROR (-4L)

Definition at line 1054 of file penwin.h.

#define PMIR_INVALIDBOXEDITINFO (-3L)

Definition at line 1053 of file penwin.h.

#define PMIR_NA (-6L)

Definition at line 1056 of file penwin.h.

#define PMIR_OK 0L

Definition at line 1050 of file penwin.h.

#define PMIR_VALUE (-2L)

Definition at line 1052 of file penwin.h.

#define PMSC_BEDITCHANGE 1

Definition at line 1400 of file penwin.h.

#define PMSC_GETHRC 9

Definition at line 1410 of file penwin.h.

#define PMSC_GETINKINGINFO 7

Definition at line 1408 of file penwin.h.

#define PMSC_GETPCMINFO 5

_WIN32

Definition at line 1406 of file penwin.h.

#define PMSC_GETSYMBOLCOUNT 11

Definition at line 1412 of file penwin.h.

#define PMSC_GETSYMBOLS 12

Definition at line 1413 of file penwin.h.

#define PMSC_INKSTOP 16

Definition at line 1416 of file penwin.h.

#define PMSC_LOADPW 15

Definition at line 1415 of file penwin.h.

#define PMSC_SETHRC 10

Definition at line 1411 of file penwin.h.

#define PMSC_SETINKINGINFO 8

Definition at line 1409 of file penwin.h.

#define PMSC_SETPCMINFO 6

Definition at line 1407 of file penwin.h.

#define PMSC_SETSYMBOLS 13

Definition at line 1414 of file penwin.h.

#define PMSCL_LOADED 1L

Definition at line 1420 of file penwin.h.

#define PMSCL_UNLOADED 0L

Definition at line 1419 of file penwin.h.

#define PMSCL_UNLOADING 2L

Definition at line 1421 of file penwin.h.

#define PWE_ACTIONHANDLES 0x0002

Definition at line 1027 of file penwin.h.

#define PWE_AUTOWRITE 0x0001

Definition at line 1026 of file penwin.h.

#define PWE_INPUTCURSOR 0x0004

Definition at line 1028 of file penwin.h.

#define PWE_LENS 0x0008

Definition at line 1029 of file penwin.h.

#define PWF_BEDIT 0x0100

Definition at line 1036 of file penwin.h.

#define PWF_ENHANCED 0x1000

Definition at line 1039 of file penwin.h.

#define PWF_FULL
Value:
PWF_RC1|PWF_PEN|PWF_INKDISPLAY|PWF_RECOGNIZER|\
        PWF_BEDIT|PWF_HEDIT |PWF_IEDIT|PWF_ENHANCED

Definition at line 1040 of file penwin.h.

#define PWF_HEDIT 0x0200

Definition at line 1037 of file penwin.h.

#define PWF_IEDIT 0x0400

Definition at line 1038 of file penwin.h.

#define PWF_INKDISPLAY 0x0008

Definition at line 1034 of file penwin.h.

#define PWF_PEN 0x0004

Definition at line 1033 of file penwin.h.

#define PWF_RC1 0x0001

Definition at line 1032 of file penwin.h.

#define PWF_RECOGNIZER 0x0010

Definition at line 1035 of file penwin.h.

#define RC_LDEFAULT 0xffffffffL

Definition at line 968 of file penwin.h.

#define RC_LDEFAULTFLAGS 0x80000000L

Definition at line 970 of file penwin.h.

#define RC_WDEFAULT 0xffff

Definition at line 967 of file penwin.h.

#define RC_WDEFAULTFLAGS 0x8000

Definition at line 969 of file penwin.h.

#define RCD_BT 4

Definition at line 1082 of file penwin.h.

#define RCD_DEFAULT 0

Definition at line 1078 of file penwin.h.

#define RCD_LR 1

Definition at line 1079 of file penwin.h.

#define RCD_RL 2

Definition at line 1080 of file penwin.h.

#define RCD_TB 3

Definition at line 1081 of file penwin.h.

#define RCIP_ALLANSICHAR 0x0001

Definition at line 1085 of file penwin.h.

#define RCIP_MASK 0x0001

Definition at line 1086 of file penwin.h.

#define RCO_BOXCROSS 0x00001000L

Definition at line 1101 of file penwin.h.

#define RCO_BOXED 0x00000100L

Definition at line 1097 of file penwin.h.

#define RCO_COLDRECOG 0x00008000L

Definition at line 1102 of file penwin.h.

#define RCO_DISABLEGESMAP 0x00000400L

Definition at line 1099 of file penwin.h.

#define RCO_DODEFAULT 0x00020000L

Definition at line 1104 of file penwin.h.

#define RCO_NOFLASHCURSOR 0x00000800L

Definition at line 1100 of file penwin.h.

#define RCO_NOFLASHUNKNOWN 0x00000008L

Definition at line 1092 of file penwin.h.

#define RCO_NOHIDECURSOR 0x00000040L

Definition at line 1095 of file penwin.h.

#define RCO_NOHOOK 0x00000080L

Definition at line 1096 of file penwin.h.

#define RCO_NOPOINTEREVENT 0x00000001L

Definition at line 1089 of file penwin.h.

#define RCO_NOSPACEBREAK 0x00000020L

Definition at line 1094 of file penwin.h.

#define RCO_SAVEALLDATA 0x00000002L

Definition at line 1090 of file penwin.h.

#define RCO_SAVEBACKGROUND 0x00010000L

Definition at line 1103 of file penwin.h.

#define RCO_SAVEHPENDATA 0x00000004L

Definition at line 1091 of file penwin.h.

#define RCO_SUGGEST 0x00000200L

Definition at line 1098 of file penwin.h.

#define RCO_TABLETCOORD 0x00000010L

Definition at line 1093 of file penwin.h.

#define RCOR_LEFT 4

Definition at line 1110 of file penwin.h.

#define RCOR_NORMAL 1

Definition at line 1107 of file penwin.h.

#define RCOR_RIGHT 2

Definition at line 1108 of file penwin.h.

#define RCOR_UPSIDEDOWN 3

Definition at line 1109 of file penwin.h.

#define RCP_LEFTHAND 0x0001

Definition at line 1113 of file penwin.h.

#define RCP_MAPCHAR 0x0004

Definition at line 1114 of file penwin.h.

#define RCRT_ALREADYPROCESSED 0x0008

Definition at line 1123 of file penwin.h.

#define RCRT_DEFAULT 0x0000

Definition at line 1117 of file penwin.h.

#define RCRT_GESTURE 0x0002

Definition at line 1119 of file penwin.h.

#define RCRT_GESTURETOKEYS 0x0020

Definition at line 1125 of file penwin.h.

#define RCRT_GESTURETRANSLATED 0x0010

Definition at line 1124 of file penwin.h.

#define RCRT_NORECOG 0x8000

Definition at line 1122 of file penwin.h.

#define RCRT_NOSYMBOLMATCH 0x0004

Definition at line 1120 of file penwin.h.

#define RCRT_PRIVATE 0x4000

Definition at line 1121 of file penwin.h.

#define RCRT_UNIDENTIFIED 0x0001

Definition at line 1118 of file penwin.h.

#define REC_ABORT (-3)

Definition at line 628 of file penwin.h.

#define REC_ALC (-39)

Definition at line 613 of file penwin.h.

#define REC_BADEVENTREF (-33)

Definition at line 618 of file penwin.h.

#define REC_BADHPENDATA (-9)

Definition at line 622 of file penwin.h.

#define REC_BUFFERTOOSMALL (-4)

Definition at line 627 of file penwin.h.

#define REC_BUSY (-5)

Definition at line 626 of file penwin.h.

#define REC_CLVERIFY (-37)

Definition at line 615 of file penwin.h.

#define REC_DEBUG (-32)

Definition at line 620 of file penwin.h.

#define REC_DICT (-36)

Definition at line 616 of file penwin.h.

#define REC_DONE 6

Definition at line 637 of file penwin.h.

#define REC_ERRORLEVEL (-38)

Definition at line 614 of file penwin.h.

#define REC_GUIDE (-47)

Definition at line 605 of file penwin.h.

#define REC_HREC (-35)

Definition at line 617 of file penwin.h.

#define REC_HWND (-40)

Definition at line 612 of file penwin.h.

#define REC_INVALIDREF (-45)

Definition at line 607 of file penwin.h.

#define REC_LANGUAGE (-48)

Definition at line 604 of file penwin.h.

#define REC_NA (-2)

Definition at line 629 of file penwin.h.

#define REC_NOCOLLECTION (-32)

Definition at line 619 of file penwin.h.

#define REC_NOINPUT (-7)

Definition at line 624 of file penwin.h.

#define REC_NOTABLET (-6)

Definition at line 625 of file penwin.h.

#define REC_OEM (-1024)

Definition at line 603 of file penwin.h.

#define REC_OK 0

Definition at line 631 of file penwin.h.

#define REC_OOM (-8)

Definition at line 623 of file penwin.h.

#define REC_OVERFLOW (-1)

Definition at line 630 of file penwin.h.

#define REC_PARAMERROR (-46)

Definition at line 606 of file penwin.h.

#define REC_PCM (-42)

Definition at line 610 of file penwin.h.

#define REC_POINTEREVENT (-31)

Definition at line 621 of file penwin.h.

#define REC_RECTBOUND (-43)

Definition at line 609 of file penwin.h.

#define REC_RECTEXCLUDE (-44)

Definition at line 608 of file penwin.h.

#define REC_RESULTMODE (-41)

Definition at line 611 of file penwin.h.

#define REC_TERMBOUND 1

Definition at line 632 of file penwin.h.

#define REC_TERMEX 2

Definition at line 633 of file penwin.h.

#define REC_TERMOEM 512

Definition at line 638 of file penwin.h.

#define REC_TERMPENUP 3

Definition at line 634 of file penwin.h.

#define REC_TERMRANGE 4

Definition at line 635 of file penwin.h.

#define REC_TERMTIMEOUT 5

Definition at line 636 of file penwin.h.

#define ResetAlcBitAnsi | ( | lprc,
 |  | i |
 | ) |  | do {MpAlcB(lprc,i) &= ~MpIbf(i);} while (0)

Definition at line 1476 of file penwin.h.

#define RHH_BOX 1

Definition at line 699 of file penwin.h.

#define RHH_STD 0

Definition at line 698 of file penwin.h.

#define RPA_DBCSPRIORITY 0x0004

Definition at line 1048 of file penwin.h.

#define RPA_DEFAULT 0x0001

Definition at line 1045 of file penwin.h.

#define RPA_HEDIT 0x0001

Definition at line 1046 of file penwin.h.

#define RPA_KANJIFIXEDBEDIT 0x0002

Definition at line 1047 of file penwin.h.

#define RRM_COMPLETE 16

Definition at line 1132 of file penwin.h.

#define RRM_NEWLINE 3

Definition at line 1131 of file penwin.h.

#define RRM_STROKE 0

Definition at line 1128 of file penwin.h.

#define RRM_SYMBOL 1

Definition at line 1129 of file penwin.h.

#define RRM_WORD 2

Definition at line 1130 of file penwin.h.

#define SCH_ADVISE 1

Definition at line 703 of file penwin.h.

#define SCH_FORCE 2

Definition at line 704 of file penwin.h.

#define SCH_NONE 0

Definition at line 702 of file penwin.h.

#define SCIM_INSERT 0

Definition at line 707 of file penwin.h.

#define SCIM_OVERWRITE 1

Definition at line 708 of file penwin.h.

#define SetAlcBitAnsi | ( | lprc,
 |  | i |
 | ) |  | do {MpAlcB(lprc,i) |= MpIbf(i);} while (0)

Definition at line 1475 of file penwin.h.

#define SGRC_DICTIONARY 0x0010

Definition at line 1140 of file penwin.h.

#define SGRC_INIFILE 0x0020

Definition at line 1141 of file penwin.h.

#define SGRC_NA 0x8000

Definition at line 1142 of file penwin.h.

#define SGRC_OK 0x0000

Definition at line 1135 of file penwin.h.

#define SGRC_PARAMERROR 0x0002

Definition at line 1137 of file penwin.h.

#define SGRC_RC 0x0004

Definition at line 1138 of file penwin.h.

#define SGRC_RECOGNIZER 0x0008

Definition at line 1139 of file penwin.h.

#define SGRC_USER 0x0001

Definition at line 1136 of file penwin.h.

#define SIH_ALLANSICHAR 1

Definition at line 723 of file penwin.h.

#define SRH_HOOKALL (HREC)1

Definition at line 711 of file penwin.h.

#define SSA_DOWN 7

Definition at line 453 of file penwin.h.

#define SSA_PENTIP 1

Definition at line 447 of file penwin.h.

#define SSA_PENTIPCLASS 2

Definition at line 448 of file penwin.h.

#define SSA_PENTIPTABLE 8

Definition at line 456 of file penwin.h.

#define SSA_SELECT 6

Definition at line 452 of file penwin.h.

#define SSA_TIME 5

Definition at line 451 of file penwin.h.

#define SSA_USER 3

Definition at line 449 of file penwin.h.

#define SSA_USERCLASS 4

Definition at line 450 of file penwin.h.

#define SSA_USERTABLE 9

Definition at line 457 of file penwin.h.

#define SSH_DL 5

Definition at line 718 of file penwin.h.

#define SSH_DR 6

Definition at line 719 of file penwin.h.

#define SSH_LD 3

Definition at line 716 of file penwin.h.

#define SSH_LU 4

Definition at line 717 of file penwin.h.

#define SSH_RD 1

Definition at line 714 of file penwin.h.

#define SSH_RU 2

Definition at line 715 of file penwin.h.

#define SSH_UL 7

Definition at line 720 of file penwin.h.

#define SSH_UR 8

Definition at line 721 of file penwin.h.

#define SubPenMsgFromWpLp | ( | wp,
 |  | lp |
 | ) |  | (LOWORD(wp))

NOPENHRC

Definition at line 1578 of file penwin.h.

#define SYV_APPGESTUREMASK 0x00020000L

Definition at line 233 of file penwin.h.

#define SYV_BACKSPACE 0x00020008L

Definition at line 227 of file penwin.h.

#define SYV_BEGINOR 0x00000010L

Definition at line 199 of file penwin.h.

#define SYV_CIRCLELOA 0x000224D0L

Definition at line 236 of file penwin.h.

#define SYV_CIRCLELOZ 0x000224E9L

Definition at line 237 of file penwin.h.

#define SYV_CIRCLEUPA 0x000224B6L

Definition at line 234 of file penwin.h.

#define SYV_CIRCLEUPZ 0x000224CFL

Definition at line 235 of file penwin.h.

#define SYV_CLEAR 0x0002FFD5L

Definition at line 215 of file penwin.h.

#define SYV_CLEARCHAR 0x0002FFD2L

Definition at line 212 of file penwin.h.

#define SYV_CLEARWORD 0x0002FFDDL

Definition at line 223 of file penwin.h.

#define SYV_CONTEXT 0x0002FFD7L

Definition at line 217 of file penwin.h.

#define SYV_COPY 0x0002FFDAL

Definition at line 220 of file penwin.h.

#define SYV_CORRECT 0x0002FFDFL

Definition at line 225 of file penwin.h.

#define SYV_CUT 0x0002FFDBL

Definition at line 221 of file penwin.h.

#define SYV_EMPTY 0x00000003L

Definition at line 198 of file penwin.h.

#define SYV_ENDOR 0x00000011L

Definition at line 200 of file penwin.h.

#define SYV_EXTENDSELECT 0x0002FFD8L

Definition at line 218 of file penwin.h.

#define SYV_HELP 0x0002FFD3L

Definition at line 213 of file penwin.h.

#define SYV_INSERT 0x0002FFD6L

Definition at line 216 of file penwin.h.

#define SYV_KKCONVERT 0x0002FFD4L

Definition at line 214 of file penwin.h.

#define SYV_LASSO 0x0002FFC1L

Definition at line 207 of file penwin.h.

#define SYV_NULL 0x00000000L

NOPENCURS

Definition at line 196 of file penwin.h.

#define SYV_OR 0x00000012L

Definition at line 201 of file penwin.h.

#define SYV_PASTE 0x0002FFDCL

Definition at line 222 of file penwin.h.

#define SYV_RETURN 0x0002000DL

Definition at line 229 of file penwin.h.

#define SYV_SELECTFIRST 0x0002FFC0L

Definition at line 206 of file penwin.h.

#define SYV_SELECTLAST 0x0002FFCFL

Definition at line 210 of file penwin.h.

#define SYV_SELECTLEFT 0x0002FFC2L

Definition at line 208 of file penwin.h.

#define SYV_SELECTRIGHT 0x0002FFC3L

Definition at line 209 of file penwin.h.

#define SYV_SHAPEELLIPSE 0x00040002L

Definition at line 241 of file penwin.h.

#define SYV_SHAPELINE 0x00040001L

Definition at line 240 of file penwin.h.

#define SYV_SHAPEMAX SYV_SHAPERECT

Definition at line 244 of file penwin.h.

#define SYV_SHAPEMIN SYV_SHAPELINE

Definition at line 243 of file penwin.h.

#define SYV_SHAPERECT 0x00040003L

Definition at line 242 of file penwin.h.

#define SYV_SOFTNEWLINE 0x00000020L

Definition at line 202 of file penwin.h.

#define SYV_SPACE 0x00020020L

Definition at line 230 of file penwin.h.

#define SYV_SPACENULL 0x00010000L

Definition at line 203 of file penwin.h.

#define SYV_TAB 0x00020009L

Definition at line 228 of file penwin.h.

#define SYV_UNDO 0x0002FFD9L

Definition at line 219 of file penwin.h.

#define SYV_UNKNOWN 0x00000001L

Definition at line 197 of file penwin.h.

#define SYV_USER 0x0002FFDEL

Definition at line 224 of file penwin.h.

#define SyvCharacterToSymbol ( c ) ((LONG)(unsigned char)(c) | 0x00010000)

Definition at line 1543 of file penwin.h.

#define SYVHI_ANSI 1

Definition at line 248 of file penwin.h.

#define SYVHI_GESTURE 2

Definition at line 249 of file penwin.h.

#define SYVHI_KANJI 3

Definition at line 250 of file penwin.h.

#define SYVHI_SHAPE 4

Definition at line 251 of file penwin.h.

#define SYVHI_SPECIAL 0

Definition at line 247 of file penwin.h.

#define SYVHI_UNICODE 5

Definition at line 252 of file penwin.h.

#define SYVHI_VKEY 6

Definition at line 253 of file penwin.h.

#define SyvKanjiToSymbol ( c ) ((LONG)(UINT)(c) | 0x00030000)

Definition at line 1544 of file penwin.h.

#define TerminationFromWpLp | ( | wp,
 |  | lp |
 | ) |  | ((int)LOWORD(lp))

Definition at line 1585 of file penwin.h.

#define TH_FORCE 1

Definition at line 727 of file penwin.h.

#define TH_QUERY 0

Definition at line 726 of file penwin.h.

#define TH_SUGGEST 2

Definition at line 728 of file penwin.h.

#define TIP_ERASECOLOR 1

Definition at line 460 of file penwin.h.

#define TPD_COLINEAR 0x0400

Definition at line 468 of file penwin.h.

#define TPD_COLLINEAR 0x0400

Definition at line 467 of file penwin.h.

#define TPD_EMPTYSTROKES 0x2000

Definition at line 472 of file penwin.h.

#define TPD_EVERYTHING 0x3FFF

Definition at line 473 of file penwin.h.

#define TPD_OEMDATA 0x1000

Definition at line 471 of file penwin.h.

#define TPD_PENINFO 0x0800

Definition at line 469 of file penwin.h.

#define TPD_PHW 0x1000

Definition at line 470 of file penwin.h.

#define TPD_RECALCSIZE 0x0000

Definition at line 463 of file penwin.h.

#define TPD_TIME 0x0100

Definition at line 465 of file penwin.h.

#define TPD_UPPOINTS 0x0200

Definition at line 466 of file penwin.h.

#define TPD_USER 0x0080

Definition at line 464 of file penwin.h.

#define TPT_CLOSEST 0x0001

NOPENRC1

Definition at line 1150 of file penwin.h.

#define TPT_DEFAULT (TPT_TEXTUAL | TPT_INTERSECTINK | TPT_CLOSEST)

Definition at line 1153 of file penwin.h.

#define TPT_INTERSECTINK 0x0002

Definition at line 1151 of file penwin.h.

#define TPT_TEXTUAL 0x0004

Definition at line 1152 of file penwin.h.

#define TRAIN_BOTH (TRAIN_DEFAULT | TRAIN_CUSTOM)

Definition at line 734 of file penwin.h.

#define TRAIN_CUSTOM 0x0002

Definition at line 733 of file penwin.h.

#define TRAIN_DEFAULT 0x0001

Definition at line 732 of file penwin.h.

#define TRAIN_NONE 0x0000

Definition at line 731 of file penwin.h.

#define TRAIN_RESET 2

Definition at line 739 of file penwin.h.

#define TRAIN_REVERT 1

Definition at line 738 of file penwin.h.

#define TRAIN_SAVE 0

Definition at line 737 of file penwin.h.

#define VWM_MOUSELEFTDOWN 0x0002

Definition at line 1162 of file penwin.h.

#define VWM_MOUSELEFTUP 0x0004

Definition at line 1163 of file penwin.h.

#define VWM_MOUSEMOVE 0x0001

NOPENTARGET

Definition at line 1161 of file penwin.h.

#define VWM_MOUSERIGHTDOWN 0x0008

Definition at line 1164 of file penwin.h.

#define VWM_MOUSERIGHTUP 0x0010

Definition at line 1165 of file penwin.h.

#define WCR_CLOSERECOGNIZER 23

Definition at line 767 of file penwin.h.

#define WCR_CONFIGDIALOG 2

Definition at line 744 of file penwin.h.

#define WCR_DEFAULT 3

Definition at line 745 of file penwin.h.

#define WCR_GETALCPRIORITY 14

Definition at line 758 of file penwin.h.

#define WCR_GETANSISTATE 16

Definition at line 760 of file penwin.h.

#define WCR_GETDIRECTION 20

Definition at line 764 of file penwin.h.

#define WCR_GETHAND 18

Definition at line 762 of file penwin.h.

#define WCR_INITRECOGNIZER 22

Definition at line 766 of file penwin.h.

#define WCR_PRIVATE 1024

Definition at line 769 of file penwin.h.

#define WCR_PWVERSION 13

Definition at line 757 of file penwin.h.

#define WCR_QUERY 1

Definition at line 743 of file penwin.h.

#define WCR_QUERYLANGUAGE 11

Definition at line 753 of file penwin.h.

#define WCR_RCCHANGE 4

Definition at line 746 of file penwin.h.

#define WCR_RECOGNAME 0

Definition at line 742 of file penwin.h.

#define WCR_SETALCPRIORITY 15

Definition at line 759 of file penwin.h.

#define WCR_SETANSISTATE 17

Definition at line 761 of file penwin.h.

#define WCR_SETDIRECTION 21

Definition at line 765 of file penwin.h.

#define WCR_SETHAND 19

Definition at line 763 of file penwin.h.

#define WCR_TRAIN 6

Definition at line 748 of file penwin.h.

#define WCR_TRAINCUSTOM 10

Definition at line 752 of file penwin.h.

#define WCR_TRAINDIRTY 9

Definition at line 751 of file penwin.h.

#define WCR_TRAINMAX 8

Definition at line 750 of file penwin.h.

#define WCR_TRAINSAVE 7

Definition at line 749 of file penwin.h.

#define WCR_USERCHANGE 12

Definition at line 754 of file penwin.h.

#define WCR_VERSION 5

Definition at line 747 of file penwin.h.

#define WLT_EMPTY 2

Definition at line 778 of file penwin.h.

#define WLT_STRING 0

Definition at line 776 of file penwin.h.

#define WLT_STRINGTABLE 1

Definition at line 777 of file penwin.h.

#define WLT_WORDLIST 3

Definition at line 779 of file penwin.h.

#define WM_CTLINIT (WM_PENWINFIRST+7)

Definition at line 1423 of file penwin.h.

#define WM_GLOBALRCCHANGE (WM_PENWINFIRST+3)

Definition at line 1184 of file penwin.h.

#define WM_HEDITCTL (WM_PENWINFIRST+5)

Definition at line 1191 of file penwin.h.

#define WM_HOOKRCRESULT (WM_PENWINFIRST+2)

Definition at line 1180 of file penwin.h.

#define WM_PENCTL (WM_PENWINFIRST+5)

NOPENAPPS

Definition at line 1190 of file penwin.h.

#define WM_PENEVENT (WM_PENWINFIRST+8)

Definition at line 1431 of file penwin.h.

#define WM_PENMISC (WM_PENWINFIRST+6)

NOPENBEDIT

Definition at line 1397 of file penwin.h.

#define WM_PENMISCINFO (WM_PENWINFIRST+3)

NOPENRC1

Definition at line 1183 of file penwin.h.

#define WM_RCRESULT (WM_PENWINFIRST+1)

NOPENVIRTEVENT

Definition at line 1179 of file penwin.h.

#define WM_SKB (WM_PENWINFIRST+4)

Definition at line 1187 of file penwin.h.

#define wPntAll (UINT)0xFFFF

Definition at line 963 of file penwin.h.

#define WSyvToKanji ( syv ) ((WORD) (LOWORD((syv))))

Definition at line 1542 of file penwin.h.

Typedef Documentation

typedef struct tagABSTIME ABSTIME
typedef LONG ALC

NOPENTARGET

Definition at line 1601 of file penwin.h.

typedef struct tagANIMATEINFO ANIMATEINFO
typedef BOOL(CALLBACK * ANIMATEPROC)(HPENDATA, UINT, UINT, UINT FAR *, LPARAM)

Definition at line 1753 of file penwin.h.

typedef struct tagBOXEDITINFO BOXEDITINFO
typedef struct tagBOXLAYOUT BOXLAYOUT
typedef struct tagBOXRESULTS BOXRESULTS
typedef struct tagCALBSTRUCT CALBSTRUCT
typedef int CL

Definition at line 1602 of file penwin.h.

typedef struct tagCTLINITBEDIT CTLINITBEDIT
typedef struct tagCTLINITHEDIT CTLINITHEDIT
typedef struct tagCTLINITIEDIT CTLINITIEDIT

NOPENHRC

typedef int(CALLBACK * ENUMPROC)(LPSYV, int, VOID FAR *)

Definition at line 1625 of file penwin.h.

typedef struct tagGUIDE GUIDE
typedef UINT HKP

Definition at line 1603 of file penwin.h.

typedef struct tagIMECOLORS IMECOLORS
typedef struct tagINKINGINFO INKINGINFO
typedef struct tagINPPARAMS INPPARAMS
typedef struct tagINTERVAL INTERVAL
typedef struct tagABSTIME* LPABSTIME
typedef ALC FAR* LPALC

Definition at line 1619 of file penwin.h.

typedef struct tagANIMATEINFO* LPANIMATEINFO
typedef struct tagBOXEDITINFO* LPBOXEDITINFO
typedef struct tagBOXLAYOUT* LPBOXLAYOUT
typedef struct tagBOXRESULTS* LPBOXRESULTS
typedef struct tagCALBSTRUCT* LPCALBSTRUCT
typedef const RECTL FAR* LPCRECTL

Definition at line 2065 of file penwin.h.

typedef struct tagCTLINITBEDIT* LPCTLINITBEDIT
typedef struct tagCTLINITHEDIT* LPCTLINITHEDIT
typedef struct tagCTLINITIEDIT* LPCTLINITIEDIT
typedef int(CALLBACK * LPDF)(int, LPVOID, LPVOID, int, DWORD, DWORD)

Definition at line 1626 of file penwin.h.

typedef BOOL(CALLBACK * LPFNRAWHOOK)(LPPENPACKET)

Definition at line 1823 of file penwin.h.

typedef int(CALLBACK * LPFUNCRESULTS)(LPRCRESULT, REC)

Definition at line 2045 of file penwin.h.

typedef struct tagGUIDE* LPGUIDE
typedef HINKSET FAR* LPHINKSET

Definition at line 1845 of file penwin.h.

typedef HPENDATA FAR* LPHPENDATA

Definition at line 1622 of file penwin.h.

typedef HRC FAR* LPHRC

Definition at line 1836 of file penwin.h.

typedef HRCRESULT FAR* LPHRCRESULT

Definition at line 1837 of file penwin.h.

typedef HWL FAR* LPHWL

Definition at line 1838 of file penwin.h.

typedef struct tagIMECOLORS* LPIMECOLORS
typedef struct tagINKINGINFO* LPINKINGINFO
typedef struct tagINPPARAMS* LPINPPARAMS
typedef struct tagINTERVAL* LPINTERVAL
typedef LPVOID LPOEM

Definition at line 1620 of file penwin.h.

typedef struct tagOEM_PENPACKET* LPOEM_PENPACKET
typedef struct tagOEMPENINFO* LPOEMPENINFO
typedef struct tagPCMINFO* LPPCMINFO
typedef struct tagPDEVENT* LPPDEVENT
typedef struct tagPENDATAHEADER* LPPENDATA
typedef struct tagPENDATAHEADER* LPPENDATAHEADER
typedef struct tagPENINFO* LPPENINFO
typedef struct tagPENPACKET* LPPENPACKET
typedef struct tagPENTIP* LPPENTIP
typedef struct tagRC* LPRC
typedef struct tagRCRESULT* LPRCRESULT
typedef RECTL FAR* LPRECTL

Definition at line 2064 of file penwin.h.

typedef struct tagRECTOFS* LPRECTOFS
typedef struct tagSTRKFMT* LPSTRKFMT
typedef struct tagSTROKEINFO* LPSTROKEINFO
typedef struct tagSYC* LPSYC
typedef struct tagSYE* LPSYE
typedef struct tagSYG* LPSYG
typedef SYV FAR* LPSYV

Definition at line 1621 of file penwin.h.

typedef struct tagTARGET* LPTARGET
typedef struct tagTARGINFO* LPTARGINFO
typedef RECTL NEAR* NPRECTL

Definition at line 2063 of file penwin.h.

typedef struct tagOEM_PENPACKET OEM_PENPACKET
typedef struct tagOEMPENINFO OEMPENINFO

NOPENDATA

typedef struct tagPCMINFO PCMINFO

NOPENIEDIT

typedef struct tagPDEVENT PDEVENT
typedef struct tagPENDATAHEADER PENDATAHEADER

NOPENCTL

typedef struct tagPENINFO PENINFO
typedef struct tagPENPACKET PENPACKET
typedef struct tagPENTIP PENTIP
typedef RECTL* PRECTL

Definition at line 2062 of file penwin.h.

typedef struct tagRC RC
typedef struct tagRCRESULT RCRESULT
typedef BOOL(CALLBACK * RCYIELDPROC)(VOID)

Definition at line 1627 of file penwin.h.

typedef int REC

Definition at line 1604 of file penwin.h.

typedef struct tagRECTL RECTL

NOPENRC1

typedef struct tagRECTOFS RECTOFS

NOPENBEDIT

typedef struct tagSTRKFMT STRKFMT
typedef struct tagSTROKEINFO STROKEINFO
typedef struct tagSYC SYC

NOPENINKPUT

typedef struct tagSYE SYE
typedef struct tagSYG SYG
typedef LONG SYV

Definition at line 1605 of file penwin.h.

typedef struct tagTARGET TARGET
typedef struct tagTARGINFO TARGINFO

Function Documentation

BOOL WINAPI AddInksetInterval | ( | HINKSET | ,
 |  | LPINTERVAL |
 | ) |  |
int WINAPI AddPenDataHRC | ( | HRC | ,
 |  | HPENDATA |
 | ) |  |

NOPENDRIVER

int WINAPI AddPenInputHRC | ( | HRC | ,
 |  | LPPOINT | ,
 |  | LPVOID | ,
 |  | UINT | ,
 |  | LPSTROKEINFO |
 | ) |  |
HPENDATA WINAPI AddPointsPenData | ( | HPENDATA | ,
 |  | LPPOINT | ,
 |  | LPVOID | ,
 |  | LPSTROKEINFO |
 | ) |  |

NOPENAPIFUN.

int WINAPI AddWordsHWL | ( | HWL | ,
 |  | LPSTR | ,
 |  | UINT |
 | ) |  |
VOID WINAPI AtomicVirtualEvent ( BOOL )

NOPENTARGET

LPPENDATA WINAPI BeginEnumStrokes ( HPENDATA )

NOPENAPPS

typedef BOOL ( CALLBACK * HRCRESULTHOOKPROC )
VOID WINAPI BoundingRectFromPoints | ( | LPPOINT | ,
 |  | UINT | ,
 |  | LPRECT |
 | ) |  |

NOPENINKPUT

int WINAPI CharacterToSymbol | ( | LPSTR | ,
 |  | int | ,
 |  | LPSYV |
 | ) |  |
VOID WINAPI CloseRecognizer ( VOID )
HPENDATA WINAPI CompactPenData | ( | HPENDATA | ,
 |  | UINT |
 | ) |  |
int WINAPI CompressPenData | ( | HPENDATA | ,
 |  | UINT | ,
 |  | DWORD |
 | ) |  |
int WINAPI ConfigHREC | ( | HREC | ,
 |  | UINT | ,
 |  | WPARAM | ,
 |  | LPARAM |
 | ) |  |
UINT WINAPI ConfigRecognizer | ( | UINT | ,
 |  | WPARAM | ,
 |  | LPARAM |
 | ) |  |
BOOL WINAPI CorrectWriting | ( | HWND | ,
 |  | LPSTR | ,
 |  | UINT | ,
 |  | LPVOID | ,
 |  | DWORD | ,
 |  | DWORD |
 | ) |  |
HRC WINAPI CreateCompatibleHRC | ( | HRC | ,
 |  | HREC |
 | ) |  |
HWL WINAPI CreateHWL | ( | HREC | ,
 |  | LPSTR | ,
 |  | UINT | ,
 |  | DWORD |
 | ) |  |
HINKSET WINAPI CreateInkset ( UINT )
HINKSET WINAPI CreateInksetHRCRESULT | ( | HRCRESULT | ,
 |  | UINT | ,
 |  | UINT |
 | ) |  |
HPENDATA WINAPI CreatePenData | ( | LPPENINFO | ,
 |  | int | ,
 |  | UINT | ,
 |  | UINT |
 | ) |  |
HPENDATA WINAPI CreatePenDataEx | ( | LPPENINFO | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT |
 | ) |  |
HPENDATA WINAPI CreatePenDataHRC ( HRC )
HRGN WINAPI CreatePenDataRegion | ( | HPENDATA | ,
 |  | UINT |
 | ) |  |
DECLARE_HANDLE ( HREC )
DECLARE_HANDLE ( HPCM )
DECLARE_HANDLE ( HINKSET )
DECLARE_HANDLE ( HPENDATA )
DECLARE_HANDLE32 ( HRECHOOK )
DECLARE_HANDLE32 ( HTRG )

DECLARE_HANDLE32.

DECLARE_HANDLE32 ( HRC )

NOPENDRIVER

DECLARE_HANDLE32 ( HRCRESULT )
DECLARE_HANDLE32 ( HWL )
LRESULT CALLBACK DefPenWindowProc | ( | HWND | ,
 |  | UINT | ,
 |  | WPARAM | ,
 |  | LPARAM |
 | ) |  |

NOPENTARGET

int WINAPI DestroyHRC ( HRC )
int WINAPI DestroyHRCRESULT ( HRCRESULT )
int WINAPI DestroyHWL ( HWL )
BOOL WINAPI DestroyInkset ( HINKSET )
BOOL WINAPI DestroyPenData ( HPENDATA )
BOOL WINAPI DictionarySearch | ( | LPRC | ,
 |  | LPSYE | ,
 |  | int | ,
 |  | LPSYV | ,
 |  | int |
 | ) |  |

NOPENDATA

int WINAPI DoDefaultPenInput | ( | HWND | ,
 |  | UINT |
 | ) |  |

NOPENHRC

BOOL WINAPI DPtoTP | ( | LPPOINT | ,
 |  | int |
 | ) |  |
VOID WINAPI DrawPenData | ( | HDC | ,
 |  | LPRECT | ,
 |  | HPENDATA |
 | ) |  |
int WINAPI DrawPenDataEx | ( | HDC | ,
 |  | LPRECT | ,
 |  | HPENDATA | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | ANIMATEPROC | ,
 |  | LPANIMATEINFO | ,
 |  | UINT |
 | ) |  |
HPENDATA WINAPI DuplicatePenData | ( | HPENDATA | ,
 |  | UINT |
 | ) |  |
VOID WINAPI EmulatePen ( BOOL )

_WIN32

NOPENMISC

int WINAPI EnableGestureSetHRC | ( | HRC | ,
 |  | SYV | ,
 |  | BOOL |
 | ) |  |
int WINAPI EnableSystemDictionaryHRC | ( | HRC | ,
 |  | BOOL |
 | ) |  |
LPPENDATA WINAPI EndEnumStrokes ( HPENDATA )
BOOL WINAPI EndPenCollection ( REC )

NOPENDICT

int WINAPI EndPenInputHRC ( HRC )
UINT WINAPI EnumSymbols | ( | LPSYG | ,
 |  | UINT | ,
 |  | ENUMPROC | ,
 |  | LPVOID |
 | ) |  |
BOOL WINAPI ExecuteGesture | ( | HWND | ,
 |  | SYV | ,
 |  | LPRCRESULT |
 | ) |  |
int WINAPI ExtractPenDataPoints | ( | HPENDATA | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | LPPOINT | ,
 |  | LPVOID | ,
 |  | UINT |
 | ) |  |
int WINAPI ExtractPenDataStrokes | ( | HPENDATA | ,
 |  | UINT | ,
 |  | LPARAM | ,
 |  | LPHPENDATA | ,
 |  | UINT |
 | ) |  |
VOID WINAPI FirstSymbolFromGraph | ( | LPSYG | ,
 |  | LPSYV | ,
 |  | int | ,
 |  | LPINT |
 | ) |  |
int WINAPI GetAlphabetHRC | ( | HRC | ,
 |  | LPALC | ,
 |  | LPBYTE |
 | ) |  |
int WINAPI GetAlphabetPriorityHRC | ( | HRC | ,
 |  | LPALC | ,
 |  | LPBYTE |
 | ) |  |
int WINAPI GetAlternateWordsHRCRESULT | ( | HRCRESULT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | LPHRCRESULT | ,
 |  | UINT |
 | ) |  |
int WINAPI GetBoxMappingHRCRESULT | ( | HRCRESULT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT FAR * |
 | ) |  |
int WINAPI GetBoxResultsHRC | ( | HRC | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | LPBOXRESULTS | ,
 |  | BOOL |
 | ) |  |
UINT WINAPI GetGlobalRC | ( | LPRC | ,
 |  | LPSTR | ,
 |  | LPSTR | ,
 |  | int |
 | ) |  |
int WINAPI GetGuideHRC | ( | HRC | ,
 |  | LPGUIDE | ,
 |  | UINT FAR * |
 | ) |  |
int WINAPI GetHotspotsHRCRESULT | ( | HRCRESULT | ,
 |  | UINT | ,
 |  | LPPOINT | ,
 |  | UINT |
 | ) |  |
HREC WINAPI GetHRECFromHRC ( HRC )
int WINAPI GetInksetInterval | ( | HINKSET | ,
 |  | UINT | ,
 |  | LPINTERVAL |
 | ) |  |
int WINAPI GetInksetIntervalCount ( HINKSET )
int WINAPI GetInternationalHRC | ( | HRC | ,
 |  | UINT FAR * | ,
 |  | LPSTR | ,
 |  | UINT FAR * | ,
 |  | UINT FAR * |
 | ) |  |
int WINAPI GetMaxResultsHRC ( HRC )
UINT WINAPI GetPenAppFlags ( VOID )
BOOL WINAPI GetPenAsyncState ( UINT )

NOPENAPIFUN.

int WINAPI GetPenDataAttributes | ( | HPENDATA | ,
 |  | LPVOID | ,
 |  | UINT |
 | ) |  |
BOOL WINAPI GetPenDataInfo | ( | HPENDATA | ,
 |  | LPPENDATAHEADER | ,
 |  | LPPENINFO | ,
 |  | DWORD |
 | ) |  |
BOOL WINAPI GetPenDataStroke | ( | LPPENDATA | ,
 |  | UINT | ,
 |  | LPPOINT FAR * | ,
 |  | LPVOID FAR * | ,
 |  | LPSTROKEINFO |
 | ) |  |
REC WINAPI GetPenHwData | ( | LPPOINT | ,
 |  | LPVOID | ,
 |  | int | ,
 |  | UINT | ,
 |  | LPSTROKEINFO |
 | ) |  |
REC WINAPI GetPenHwEventData | ( | UINT | ,
 |  | UINT | ,
 |  | LPPOINT | ,
 |  | LPVOID | ,
 |  | int | ,
 |  | LPSTROKEINFO |
 | ) |  |
int WINAPI GetPenInput | ( | HPCM | ,
 |  | LPPOINT | ,
 |  | LPVOID | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | LPSTROKEINFO |
 | ) |  |
LONG WINAPI GetPenMiscInfo | ( | WPARAM | ,
 |  | LPARAM |
 | ) |  |
BOOL WINAPI GetPointsFromPenData | ( | HPENDATA | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | LPPOINT |
 | ) |  |
int WINAPI GetResultsHRC | ( | HRC | ,
 |  | UINT | ,
 |  | LPHRCRESULT | ,
 |  | UINT |
 | ) |  |
int WINAPI GetStrokeAttributes | ( | HPENDATA | ,
 |  | UINT | ,
 |  | LPVOID | ,
 |  | UINT |
 | ) |  |
int WINAPI GetStrokeTableAttributes | ( | HPENDATA | ,
 |  | UINT | ,
 |  | LPVOID | ,
 |  | UINT |
 | ) |  |
int WINAPI GetSymbolCount ( LPSYG )
int WINAPI GetSymbolCountHRCRESULT ( HRCRESULT )
int WINAPI GetSymbolMaxLength ( LPSYG )
int WINAPI GetSymbolsHRCRESULT | ( | HRCRESULT | ,
 |  | UINT | ,
 |  | LPSYV | ,
 |  | UINT |
 | ) |  |
UINT WINAPI GetVersionPenWin ( VOID )
int WINAPI GetWordlistCoercionHRC ( HRC )
int WINAPI GetWordlistHRC | ( | HRC | ,
 |  | LPHWL |
 | ) |  |
int WINAPI HitTestPenData | ( | HPENDATA | ,
 |  | LPPOINT | ,
 |  | UINT | ,
 |  | UINT FAR * | ,
 |  | UINT FAR * |
 | ) |  |
VOID WINAPI InitRC | ( | HWND | ,
 |  | LPRC |
 | ) |  |
BOOL WINAPI InitRecognizer ( LPRC )
int WINAPI InsertPenData | ( | HPENDATA | ,
 |  | HPENDATA | ,
 |  | UINT |
 | ) |  |
int WINAPI InsertPenDataPoints | ( | HPENDATA | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | UINT | ,
 |  | LPPOINT | ,
 |  | LPVOID |
 | ) |  |
int WINAPI InsertPenDataStroke | ( | HPENDATA | ,
 |  | UINT | ,
 |  | LPPOINT | ,
 |  | LPVOID | ,
 |  | LPSTROKEINFO |
 | ) |  |
HREC WINAPI InstallRecognizer ( LPSTR )
UINT WINAPI IsPenAware ( VOID )
BOOL WINAPI IsPenEvent | ( | UINT | ,
 |  | LONG |
 | ) |  |
BOOL WINAPI MetricScalePenData | ( | HPENDATA | ,
 |  | UINT |
 | ) |  |
BOOL WINAPI OffsetPenData | ( | HPENDATA | ,
 |  | int | ,
 |  | int |
 | ) |  |
int WINAPI PeekPenInput | ( | HPCM | ,
 |  | UINT | ,
 |  | LPPOINT | ,
 |  | LPVOID | ,
 |  | UINT |
 | ) |  |
LONG WINAPI PenDataFromBuffer | ( | LPHPENDATA | ,
 |  | UINT | ,
 |  | LPBYTE | ,
 |  | LONG | ,
 |  | LPDWORD |
 | ) |  |
LONG WINAPI PenDataToBuffer | ( | HPENDATA | ,
 |  | LPBYTE | ,
 |  | LONG | ,
 |  | LPDWORD |
 | ) |  |
VOID WINAPI PostVirtualKeyEvent | ( | UINT | ,
 |  | BOOL |
 | ) |  |
VOID WINAPI PostVirtualMouseEvent | ( | UINT | ,
 |  | int | ,
 |  | int |
 | ) |  |
int WINAPI ProcessHRC | ( | HRC | ,
 |  | DWORD |
 | ) |  |
REC WINAPI ProcessWriting | ( | HWND | ,
 |  | LPRC |
 | ) |  |
int WINAPI ReadHWL | ( | HWL | ,
 |  | HFILE |
 | ) |  |
REC WINAPI Recognize ( LPRC )
REC WINAPI RecognizeData | ( | LPRC | ,
 |  | HPENDATA |
 | ) |  |
REC WINAPI RecognizeDataInternal | ( | LPRC | ,
 |  | HPENDATA | ,
 |  | LPFUNCRESULTS |
 | ) |  |
REC WINAPI RecognizeInternal | ( | LPRC | ,
 |  | LPFUNCRESULTS |
 | ) |  |
BOOL WINAPI RedisplayPenData | ( | HDC | ,
 |  | HPENDATA | ,
 |  | LPPOINT | ,
 |  | LPPOINT | ,
 |  | int | ,
 |  | DWORD |
 | ) |  |
VOID WINAPI RegisterPenApp | ( | UINT | ,
 |  | UINT |
 | ) |  |
int WINAPI RemovePenDataStrokes | ( | HPENDATA | ,
 |  | UINT | ,
 |  | UINT |
 | ) |  |
BOOL WINAPI ResizePenData | ( | HPENDATA | ,
 |  | LPRECT |
 | ) |  |
int WINAPI SetAlphabetHRC | ( | HRC | ,
 |  | ALC | ,
 |  | LPBYTE |
 | ) |  |
int WINAPI SetAlphabetPriorityHRC | ( | HRC | ,
 |  | ALC | ,
 |  | LPBYTE |
 | ) |  |
int WINAPI SetBoxAlphabetHRC | ( | HRC | ,
 |  | LPALC | ,
 |  | UINT |
 | ) |  |
UINT WINAPI SetGlobalRC | ( | LPRC | ,
 |  | LPSTR | ,
 |  | LPSTR |
 | ) |  |
int WINAPI SetGuideHRC | ( | HRC | ,
 |  | LPGUIDE | ,
 |  | UINT |
 | ) |  |
int WINAPI SetInternationalHRC | ( | HRC | ,
 |  | UINT | ,
 |  | LPCSTR | ,
 |  | UINT | ,
 |  | UINT |
 | ) |  |
int WINAPI SetMaxResultsHRC | ( | HRC | ,
 |  | UINT |
 | ) |  |
VOID WINAPI SetPenAppFlags | ( | UINT | ,
 |  | UINT |
 | ) |  |
BOOL WINAPI SetPenHook | ( | HKP | ,
 |  | LPFNRAWHOOK |
 | ) |  |
LONG WINAPI SetPenMiscInfo | ( | WPARAM | ,
 |  | LPARAM |
 | ) |  |
BOOL WINAPI SetRecogHook | ( | UINT | ,
 |  | UINT | ,
 |  | HWND |
 | ) |  |
HRECHOOK WINAPI SetResultsHookHREC | ( | HREC | ,
 |  | HRCRESULTHOOKPROC |
 | ) |  |
int WINAPI SetStrokeAttributes | ( | HPENDATA | ,
 |  | UINT | ,
 |  | LPARAM | ,
 |  | UINT |
 | ) |  |
int WINAPI SetStrokeTableAttributes | ( | HPENDATA | ,
 |  | UINT | ,
 |  | LPARAM | ,
 |  | UINT |
 | ) |  |
int WINAPI SetWordlistCoercionHRC | ( | HRC | ,
 |  | UINT |
 | ) |  |
int WINAPI SetWordlistHRC | ( | HRC | ,
 |  | HWL |
 | ) |  |
BOOL WINAPI ShowKeyboard | ( | HWND | ,
 |  | UINT | ,
 |  | LPPOINT | ,
 |  | LPSKBINFO |
 | ) |  |
int WINAPI StartInking | ( | HPCM | ,
 |  | UINT | ,
 |  | LPINKINGINFO |
 | ) |  |
HPCM WINAPI StartPenInput | ( | HWND | ,
 |  | UINT | ,
 |  | LPPCMINFO | ,
 |  | LPINT |
 | ) |  |
int WINAPI StopInking ( HPCM )
int WINAPI StopPenInput | ( | HPCM | ,
 |  | UINT | ,
 |  | int |
 | ) |  |
BOOL WINAPI SymbolToCharacter | ( | LPSYV | ,
 |  | int | ,
 |  | LPSTR | ,
 |  | LPINT |
 | ) |  |
int WINAPI TargetPoints | ( | LPTARGINFO | ,
 |  | LPPOINT | ,
 |  | DWORD | ,
 |  | UINT | ,
 |  | LPSTROKEINFO |
 | ) |  |

NOPENRC1

BOOL WINAPI TPtoDP | ( | LPPOINT | ,
 |  | int |
 | ) |  |
BOOL WINAPI TrainContext | ( | LPRCRESULT | ,
 |  | LPSYE | ,
 |  | int | ,
 |  | LPSYC | ,
 |  | int |
 | ) |  |
BOOL WINAPI TrainContextInternal | ( | LPRCRESULT | ,
 |  | LPSYE | ,
 |  | int | ,
 |  | LPSYC | ,
 |  | int |
 | ) |  |
int WINAPI TrainHREC | ( | HREC | ,
 |  | LPSYV | ,
 |  | UINT | ,
 |  | HPENDATA | ,
 |  | UINT |
 | ) |  |
BOOL WINAPI TrainInk | ( | LPRC | ,
 |  | HPENDATA | ,
 |  | LPSYV |
 | ) |  |
BOOL WINAPI TrainInkInternal | ( | LPRC | ,
 |  | HPENDATA | ,
 |  | LPSYV |
 | ) |  |
int WINAPI TrimPenData | ( | HPENDATA | ,
 |  | DWORD | ,
 |  | DWORD |
 | ) |  |
int WINAPI UnhookResultsHookHREC | ( | HREC | ,
 |  | HRECHOOK |
 | ) |  |
VOID WINAPI UninstallRecognizer ( HREC )
VOID WINAPI UpdatePenInfo ( LPPENINFO )
int WINAPI WriteHWL | ( | HWL | ,
 |  | HFILE |
 | ) |  |

Variable Documentation

typedef HRC

Definition at line 1841 of file penwin.h.

typedef LPVOID

Definition at line 1841 of file penwin.h.

typedef UINT

Definition at line 1841 of file penwin.h.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/resource.h File Reference

  • ole
  • wordpad
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_EDIT_CNTR 32768
#define | ID_CANCEL_EDIT_SRVR 32769
#define | ID_CHAR_BOLD 32799
#define | ID_CHAR_COLOR 32801
#define | ID_CHAR_ITALIC 32800
#define | ID_CHAR_UNDERLINE 32802
#define | ID_COLOR0 32782
#define | ID_COLOR1 32783
#define | ID_COLOR10 32792
#define | ID_COLOR11 32793
#define | ID_COLOR12 32794
#define | ID_COLOR13 32795
#define | ID_COLOR14 32796
#define | ID_COLOR15 32797
#define | ID_COLOR16 32798
#define | ID_COLOR2 32784
#define | ID_COLOR3 32785
#define | ID_COLOR4 32786
#define | ID_COLOR5 32787
#define | ID_COLOR6 32788
#define | ID_COLOR7 32789
#define | ID_COLOR8 32790
#define | ID_COLOR9 32791
#define | ID_FORMAT_PARAGRAPH 32780
#define | ID_FORMAT_TABS 32781
#define | ID_INSERT_BULLET 32777
#define | ID_INSERT_DATE_TIME 32778
#define | ID_OLE_VERB_POPUP 32811
#define | ID_PAGE_SETUP 32771
#define | ID_PARA_CENTER 32804
#define | ID_PARA_LEFT 32803
#define | ID_PARA_RIGHT 32805
#define | ID_PEN_BACKSPACE 32809
#define | ID_PEN_LENS 32813
#define | ID_PEN_NEWLINE 32810
#define | ID_PEN_PERIOD 32807
#define | ID_PEN_SPACE 32808
#define | ID_PEN_TAB 32814
#define | ID_PEN_TOGGLE 32812
#define | ID_VIEW_FORMATBAR 59396
#define | ID_VIEW_OPTIONS 32776
#define | ID_VIEW_RULER 59397
#define | IDB_BITMAP48 162
#define | IDB_BITMAP_PRINTER 163
#define | IDB_BITMAP_TT 130
#define | IDB_FONTTYPE 167
#define | IDB_FORMATBAR 139
#define | IDB_FORMATBAR_BIG 141
#define | IDB_PRINTER 167
#define | IDB_RULER_BLOCK 131
#define | IDB_RULER_BLOCKM 132
#define | IDB_RULER_DOWN 133
#define | IDB_RULER_DOWNM 134
#define | IDB_RULER_TAB 135
#define | IDB_RULER_TABM 136
#define | IDB_RULER_UP 137
#define | IDB_RULER_UPM 138
#define | IDC_BIGICON 1023
#define | IDC_BOX 1022
#define | IDC_BOXT 1032
#define | IDC_BUTTON_CLEAR 1006
#define | IDC_BUTTON_CLEARALL 1007
#define | IDC_BUTTON_SET 1005
#define | IDC_CHECK_FORMATBAR 1029
#define | IDC_CHECK_PAGEBREAK 1033
#define | IDC_CHECK_RULERBAR 1030
#define | IDC_CHECK_STATUSBAR 1031
#define | IDC_CHECK_TOOLBAR 1028
#define | IDC_COMBO1 1019
#define | IDC_COMBO_ALIGNMENT 111
#define | IDC_COMBO_UNITS 1012
#define | IDC_COMBO_WRAP 1011
#define | IDC_DATEDIALOG_LIST 1018
#define | IDC_EDIT_AFTER 1036
#define | IDC_EDIT_BEFORE 1035
#define | IDC_EDIT_BM 1005
#define | IDC_EDIT_FIRST_LINE 1002
#define | IDC_EDIT_LEFT 1000
#define | IDC_EDIT_LM 1006
#define | IDC_EDIT_RIGHT 1001
#define | IDC_EDIT_RM 1007
#define | IDC_EDIT_TM 1016
#define | IDC_FONTNAME 165
#define | IDC_FONTSIZE 166
#define | IDC_LISTDIALOG_LIST 1018
#define | IDC_SPIN_AFTER 1039
#define | IDC_SPIN_BEFORE 1038
#define | IDC_STATIC_HEADING 1009
#define | IDC_TEXT_ALIGNMENT 1017
#define | IDC_TEXT_UNITS 1021
#define | IDC_TEXT_WRAP 1020
#define | IDC_UNITS_CM 1025
#define | IDC_UNITS_IN 1024
#define | IDC_UNITS_PI 1027
#define | IDC_UNITS_PT 1026
#define | IDC_WORDSEL 1029
#define | IDC_WRAP_NONE 1027
#define | IDC_WRAP_RULER 1025
#define | IDC_WRAP_WINDOW 1026
#define | IDD_DATEDIALOG 151
#define | IDD_FILENEWDIALOG 160
#define | IDD_FORMAT_PARA 143
#define | IDD_FORMAT_TAB 145
#define | IDD_LISTDIALOG 147
#define | IDD_OPTIONS 148
#define | IDD_OPTIONS_MARGINS 160
#define | IDD_OPTIONS_UNITS 158
#define | IDD_OPTIONS_WRAP 159
#define | IDD_PAGE_SETUP_DIALOG 150
#define | IDD_SPLASH 157
#define | IDI_ICON_DOC 154
#define | IDI_ICON_TEXT 165
#define | IDI_ICON_WRITE 155
#define | IDP_FAILED_TO_CREATE 102
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CNTR_INPLACE 6
#define | IDR_COLOR_MENU 142
#define | IDR_MAINFRAME 128
#define | IDR_MAINFRAME1 140
#define | IDR_MAINFRAME1_BIG 143
#define | IDR_MAINFRAME_BIG 142
#define | IDR_MENU1 151
#define | IDR_SRVR_EMBEDDED 5
#define | IDR_SRVR_INPLACE 4
#define | IDR_SRVR_INPLACE_BIG 144
#define | IDR_TEXT_POPUP 152
#define | IDS_ALL_DOC 132
#define | IDS_CANT_LOAD 179
#define | IDS_CENTER 117
#define | IDS_CENTIMETERS 123
#define | IDS_CLIP_FILENAME 139
#define | IDS_CLIP_RTF 114
#define | IDS_CLIP_TEXT 138
#define | IDS_CLOSE_TEXT 107
#define | IDS_CM_ABBREV 173
#define | IDS_COMPLETE 105
#define | IDS_DEFAULTFONT 109
#define | IDS_DEFAULTTEXTFONT 111
#define | IDS_DIRFULL 181
#define | IDS_DT1 149
#define | IDS_DT10 158
#define | IDS_DT11 159
#define | IDS_DT12 160
#define | IDS_DT13 161
#define | IDS_DT2 150
#define | IDS_DT3 151
#define | IDS_DT4 152
#define | IDS_DT5 153
#define | IDS_DT6 154
#define | IDS_DT7 155
#define | IDS_DT8 156
#define | IDS_DT9 157
#define | IDS_EMBEDDED_OPTIONS 188
#define | IDS_ERRSPACE 178
#define | IDS_EXE_DOC 135
#define | IDS_FILE_EXISTS 136
#define | IDS_FINISHED_SEARCH 164
#define | IDS_FORMATTING 115
#define | IDS_INCH1_ABBREV 169
#define | IDS_INCH2_ABBREV 170
#define | IDS_INCH3_ABBREV 171
#define | IDS_INCH4_ABBREV 172
#define | IDS_INCHES 122
#define | IDS_INVALID_FONTSIZE 121
#define | IDS_INVALID_MEASUREMENT 103
#define | IDS_INVALID_NUMBER 120
#define | IDS_LEFT 116
#define | IDS_MAPI_FAIL 177
#define | IDS_MAPILOAD_FAILED 137
#define | IDS_MEASUREMENT_RANGE 119
#define | IDS_NOMORETABS 176
#define | IDS_NOWRAP 119
#define | IDS_OEMTEXT_DOC 137
#define | IDS_OPTIONS 186
#define | IDS_PICA_ABBREV 175
#define | IDS_PICAS 125
#define | IDS_PLEASE_WAIT 104
#define | IDS_POINT_ABBREV 174
#define | IDS_POINTS 124
#define | IDS_RICHED_LOAD_FAIL 108
#define | IDS_RICHTEXT_DOC 130
#define | IDS_RIGHT 118
#define | IDS_RTF_DOCUMENT 190
#define | IDS_RTF_OPTIONS 184
#define | IDS_SAVE_FORMAT 113
#define | IDS_SAVE_FORMAT_TEXT 112
#define | IDS_SAVE_UNSUPPORTED 106
#define | IDS_SAVING 113
#define | IDS_SHAREVIOLATION 182
#define | IDS_TEXT_DOC 129
#define | IDS_TEXT_DOCUMENT 189
#define | IDS_TEXT_OPTIONS 183
#define | IDS_TF_BUTTONS 110
#define | IDS_TITLE_FORMATBAR 167
#define | IDS_TITLE_TOOLBAR 168
#define | IDS_TOOMANYFILES 180
#define | IDS_WINWORD2_DOC 134
#define | IDS_WINWORD6_DOC 133
#define | IDS_WORD6_DOCUMENT 191
#define | IDS_WORD6_OPTIONS 185
#define | IDS_WORD6_WARNING 126
#define | IDS_WORD6_WARNING_BUTTONS 127
#define | IDS_WRAPTORULER 121
#define | IDS_WRAPTOWINDOW 120
#define | IDS_WRITE_DOC 131
#define | IDS_WRITE_OPTIONS 187
#define | IDS_WRITEPROTECT 192

Define Documentation

#define ID_CANCEL_EDIT_CNTR 32768

Definition at line 170 of file resource.h.

#define ID_CANCEL_EDIT_SRVR 32769

Definition at line 171 of file resource.h.

#define ID_CHAR_BOLD 32799

Definition at line 195 of file resource.h.

#define ID_CHAR_COLOR 32801

Definition at line 197 of file resource.h.

#define ID_CHAR_ITALIC 32800

Definition at line 196 of file resource.h.

#define ID_CHAR_UNDERLINE 32802

Definition at line 198 of file resource.h.

#define ID_COLOR0 32782

Definition at line 178 of file resource.h.

#define ID_COLOR1 32783

Definition at line 179 of file resource.h.

#define ID_COLOR10 32792

Definition at line 188 of file resource.h.

#define ID_COLOR11 32793

Definition at line 189 of file resource.h.

#define ID_COLOR12 32794

Definition at line 190 of file resource.h.

#define ID_COLOR13 32795

Definition at line 191 of file resource.h.

#define ID_COLOR14 32796

Definition at line 192 of file resource.h.

#define ID_COLOR15 32797

Definition at line 193 of file resource.h.

#define ID_COLOR16 32798

Definition at line 194 of file resource.h.

#define ID_COLOR2 32784

Definition at line 180 of file resource.h.

#define ID_COLOR3 32785

Definition at line 181 of file resource.h.

#define ID_COLOR4 32786

Definition at line 182 of file resource.h.

#define ID_COLOR5 32787

Definition at line 183 of file resource.h.

#define ID_COLOR6 32788

Definition at line 184 of file resource.h.

#define ID_COLOR7 32789

Definition at line 185 of file resource.h.

#define ID_COLOR8 32790

Definition at line 186 of file resource.h.

#define ID_COLOR9 32791

Definition at line 187 of file resource.h.

#define ID_FORMAT_PARAGRAPH 32780

Definition at line 176 of file resource.h.

#define ID_FORMAT_TABS 32781

Definition at line 177 of file resource.h.

#define ID_INSERT_BULLET 32777

Definition at line 174 of file resource.h.

#define ID_INSERT_DATE_TIME 32778

Definition at line 175 of file resource.h.

#define ID_OLE_VERB_POPUP 32811

Definition at line 206 of file resource.h.

#define ID_PAGE_SETUP 32771

Definition at line 172 of file resource.h.

#define ID_PARA_CENTER 32804

Definition at line 200 of file resource.h.

#define ID_PARA_LEFT 32803

Definition at line 199 of file resource.h.

#define ID_PARA_RIGHT 32805

Definition at line 201 of file resource.h.

#define ID_PEN_BACKSPACE 32809

Definition at line 204 of file resource.h.

#define ID_PEN_LENS 32813

Definition at line 208 of file resource.h.

#define ID_PEN_NEWLINE 32810

Definition at line 205 of file resource.h.

#define ID_PEN_PERIOD 32807

Definition at line 202 of file resource.h.

#define ID_PEN_SPACE 32808

Definition at line 203 of file resource.h.

#define ID_PEN_TAB 32814

Definition at line 209 of file resource.h.

#define ID_PEN_TOGGLE 32812

Definition at line 207 of file resource.h.

#define ID_VIEW_FORMATBAR 59396

Definition at line 210 of file resource.h.

#define ID_VIEW_OPTIONS 32776

Definition at line 173 of file resource.h.

#define ID_VIEW_RULER 59397

Definition at line 211 of file resource.h.

#define IDB_BITMAP48 162

Definition at line 97 of file resource.h.

#define IDB_BITMAP_PRINTER 163

Definition at line 98 of file resource.h.

#define IDB_BITMAP_TT 130

Definition at line 43 of file resource.h.

#define IDB_FONTTYPE 167

Definition at line 105 of file resource.h.

#define IDB_FORMATBAR 139

Definition at line 61 of file resource.h.

#define IDB_FORMATBAR_BIG 141

Definition at line 64 of file resource.h.

#define IDB_PRINTER 167

Definition at line 104 of file resource.h.

#define IDB_RULER_BLOCK 131

Definition at line 45 of file resource.h.

#define IDB_RULER_BLOCKM 132

Definition at line 47 of file resource.h.

#define IDB_RULER_DOWN 133

Definition at line 49 of file resource.h.

#define IDB_RULER_DOWNM 134

Definition at line 51 of file resource.h.

#define IDB_RULER_TAB 135

Definition at line 52 of file resource.h.

#define IDB_RULER_TABM 136

Definition at line 54 of file resource.h.

#define IDB_RULER_UP 137

Definition at line 56 of file resource.h.

#define IDB_RULER_UPM 138

Definition at line 59 of file resource.h.

#define IDC_BIGICON 1023

Definition at line 151 of file resource.h.

#define IDC_BOX 1022

Definition at line 150 of file resource.h.

#define IDC_BOXT 1032

Definition at line 164 of file resource.h.

#define IDC_BUTTON_CLEAR 1006

Definition at line 136 of file resource.h.

#define IDC_BUTTON_CLEARALL 1007

Definition at line 138 of file resource.h.

#define IDC_BUTTON_SET 1005

Definition at line 134 of file resource.h.

#define IDC_CHECK_FORMATBAR 1029

Definition at line 160 of file resource.h.

#define IDC_CHECK_PAGEBREAK 1033

Definition at line 165 of file resource.h.

#define IDC_CHECK_RULERBAR 1030

Definition at line 162 of file resource.h.

#define IDC_CHECK_STATUSBAR 1031

Definition at line 163 of file resource.h.

#define IDC_CHECK_TOOLBAR 1028

Definition at line 159 of file resource.h.

#define IDC_COMBO1 1019

Definition at line 147 of file resource.h.

#define IDC_COMBO_ALIGNMENT 111

Definition at line 18 of file resource.h.

#define IDC_COMBO_UNITS 1012

Definition at line 142 of file resource.h.

#define IDC_COMBO_WRAP 1011

Definition at line 141 of file resource.h.

#define IDC_DATEDIALOG_LIST 1018

Definition at line 146 of file resource.h.

#define IDC_EDIT_AFTER 1036

Definition at line 167 of file resource.h.

#define IDC_EDIT_BEFORE 1035

Definition at line 166 of file resource.h.

#define IDC_EDIT_BM 1005

Definition at line 135 of file resource.h.

#define IDC_EDIT_FIRST_LINE 1002

Definition at line 133 of file resource.h.

#define IDC_EDIT_LEFT 1000

Definition at line 131 of file resource.h.

#define IDC_EDIT_LM 1006

Definition at line 137 of file resource.h.

#define IDC_EDIT_RIGHT 1001

Definition at line 132 of file resource.h.

#define IDC_EDIT_RM 1007

Definition at line 139 of file resource.h.

#define IDC_EDIT_TM 1016

Definition at line 143 of file resource.h.

#define IDC_FONTNAME 165

Definition at line 100 of file resource.h.

#define IDC_FONTSIZE 166

Definition at line 102 of file resource.h.

#define IDC_LISTDIALOG_LIST 1018

Definition at line 145 of file resource.h.

#define IDC_SPIN_AFTER 1039

Definition at line 169 of file resource.h.

#define IDC_SPIN_BEFORE 1038

Definition at line 168 of file resource.h.

#define IDC_STATIC_HEADING 1009

Definition at line 140 of file resource.h.

#define IDC_TEXT_ALIGNMENT 1017

Definition at line 144 of file resource.h.

#define IDC_TEXT_UNITS 1021

Definition at line 149 of file resource.h.

#define IDC_TEXT_WRAP 1020

Definition at line 148 of file resource.h.

#define IDC_UNITS_CM 1025

Definition at line 153 of file resource.h.

#define IDC_UNITS_IN 1024

Definition at line 152 of file resource.h.

#define IDC_UNITS_PI 1027

Definition at line 157 of file resource.h.

#define IDC_UNITS_PT 1026

Definition at line 155 of file resource.h.

#define IDC_WORDSEL 1029

Definition at line 161 of file resource.h.

#define IDC_WRAP_NONE 1027

Definition at line 158 of file resource.h.

#define IDC_WRAP_RULER 1025

Definition at line 154 of file resource.h.

#define IDC_WRAP_WINDOW 1026

Definition at line 156 of file resource.h.

#define IDD_DATEDIALOG 151

Definition at line 78 of file resource.h.

#define IDD_FILENEWDIALOG 160

Definition at line 95 of file resource.h.

#define IDD_FORMAT_PARA 143

Definition at line 67 of file resource.h.

#define IDD_FORMAT_TAB 145

Definition at line 70 of file resource.h.

#define IDD_LISTDIALOG 147

Definition at line 71 of file resource.h.

#define IDD_OPTIONS 148

Definition at line 72 of file resource.h.

#define IDD_OPTIONS_MARGINS 160

Definition at line 94 of file resource.h.

#define IDD_OPTIONS_UNITS 158

Definition at line 90 of file resource.h.

#define IDD_OPTIONS_WRAP 159

Definition at line 92 of file resource.h.

#define IDD_PAGE_SETUP_DIALOG 150

Definition at line 74 of file resource.h.

#define IDD_SPLASH 157

Definition at line 88 of file resource.h.

#define IDI_ICON_DOC 154

Definition at line 83 of file resource.h.

#define IDI_ICON_TEXT 165

Definition at line 101 of file resource.h.

#define IDI_ICON_WRITE 155

Definition at line 85 of file resource.h.

#define IDP_FAILED_TO_CREATE 102

Definition at line 9 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 8 of file resource.h.

#define IDR_CNTR_INPLACE 6

Definition at line 7 of file resource.h.

#define IDR_COLOR_MENU 142

Definition at line 65 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 40 of file resource.h.

#define IDR_MAINFRAME1 140

Definition at line 63 of file resource.h.

#define IDR_MAINFRAME1_BIG 143

Definition at line 68 of file resource.h.

#define IDR_MAINFRAME_BIG 142

Definition at line 66 of file resource.h.

#define IDR_MENU1 151

Definition at line 76 of file resource.h.

#define IDR_SRVR_EMBEDDED 5

Definition at line 6 of file resource.h.

#define IDR_SRVR_INPLACE 4

Definition at line 5 of file resource.h.

#define IDR_SRVR_INPLACE_BIG 144

Definition at line 69 of file resource.h.

#define IDR_TEXT_POPUP 152

Definition at line 80 of file resource.h.

#define IDS_ALL_DOC 132

Definition at line 46 of file resource.h.

#define IDS_CANT_LOAD 179

Definition at line 117 of file resource.h.

#define IDS_CENTER 117

Definition at line 26 of file resource.h.

#define IDS_CENTIMETERS 123

Definition at line 35 of file resource.h.

#define IDS_CLIP_FILENAME 139

Definition at line 62 of file resource.h.

#define IDS_CLIP_RTF 114

Definition at line 23 of file resource.h.

#define IDS_CLIP_TEXT 138

Definition at line 60 of file resource.h.

#define IDS_CLOSE_TEXT 107

Definition at line 14 of file resource.h.

#define IDS_CM_ABBREV 173

Definition at line 111 of file resource.h.

#define IDS_COMPLETE 105

Definition at line 12 of file resource.h.

#define IDS_DEFAULTFONT 109

Definition at line 16 of file resource.h.

#define IDS_DEFAULTTEXTFONT 111

Definition at line 19 of file resource.h.

#define IDS_DIRFULL 181

Definition at line 119 of file resource.h.

#define IDS_DT1 149

Definition at line 73 of file resource.h.

#define IDS_DT10 158

Definition at line 89 of file resource.h.

#define IDS_DT11 159

Definition at line 91 of file resource.h.

#define IDS_DT12 160

Definition at line 93 of file resource.h.

#define IDS_DT13 161

Definition at line 96 of file resource.h.

#define IDS_DT2 150

Definition at line 75 of file resource.h.

#define IDS_DT3 151

Definition at line 77 of file resource.h.

#define IDS_DT4 152

Definition at line 79 of file resource.h.

#define IDS_DT5 153

Definition at line 81 of file resource.h.

#define IDS_DT6 154

Definition at line 82 of file resource.h.

#define IDS_DT7 155

Definition at line 84 of file resource.h.

#define IDS_DT8 156

Definition at line 86 of file resource.h.

#define IDS_DT9 157

Definition at line 87 of file resource.h.

#define IDS_EMBEDDED_OPTIONS 188

Definition at line 126 of file resource.h.

#define IDS_ERRSPACE 178

Definition at line 116 of file resource.h.

#define IDS_EXE_DOC 135

Definition at line 53 of file resource.h.

#define IDS_FILE_EXISTS 136

Definition at line 55 of file resource.h.

#define IDS_FINISHED_SEARCH 164

Definition at line 99 of file resource.h.

#define IDS_FORMATTING 115

Definition at line 24 of file resource.h.

#define IDS_INCH1_ABBREV 169

Definition at line 107 of file resource.h.

#define IDS_INCH2_ABBREV 170

Definition at line 108 of file resource.h.

#define IDS_INCH3_ABBREV 171

Definition at line 109 of file resource.h.

#define IDS_INCH4_ABBREV 172

Definition at line 110 of file resource.h.

#define IDS_INCHES 122

Definition at line 34 of file resource.h.

#define IDS_INVALID_FONTSIZE 121

Definition at line 33 of file resource.h.

#define IDS_INVALID_MEASUREMENT 103

Definition at line 10 of file resource.h.

#define IDS_INVALID_NUMBER 120

Definition at line 31 of file resource.h.

#define IDS_LEFT 116

Definition at line 25 of file resource.h.

#define IDS_MAPI_FAIL 177

Definition at line 115 of file resource.h.

#define IDS_MAPILOAD_FAILED 137

Definition at line 57 of file resource.h.

#define IDS_MEASUREMENT_RANGE 119

Definition at line 29 of file resource.h.

#define IDS_NOMORETABS 176

Definition at line 114 of file resource.h.

#define IDS_NOWRAP 119

Definition at line 28 of file resource.h.

#define IDS_OEMTEXT_DOC 137

Definition at line 58 of file resource.h.

#define IDS_OPTIONS 186

Definition at line 124 of file resource.h.

#define IDS_PICA_ABBREV 175

Definition at line 113 of file resource.h.

#define IDS_PICAS 125

Definition at line 37 of file resource.h.

#define IDS_PLEASE_WAIT 104

Definition at line 11 of file resource.h.

#define IDS_POINT_ABBREV 174

Definition at line 112 of file resource.h.

#define IDS_POINTS 124

Definition at line 36 of file resource.h.

#define IDS_RICHED_LOAD_FAIL 108

Definition at line 15 of file resource.h.

#define IDS_RICHTEXT_DOC 130

Definition at line 42 of file resource.h.

#define IDS_RIGHT 118

Definition at line 27 of file resource.h.

#define IDS_RTF_DOCUMENT 190

Definition at line 128 of file resource.h.

#define IDS_RTF_OPTIONS 184

Definition at line 122 of file resource.h.

#define IDS_SAVE_FORMAT 113

Definition at line 21 of file resource.h.

#define IDS_SAVE_FORMAT_TEXT 112

Definition at line 20 of file resource.h.

#define IDS_SAVE_UNSUPPORTED 106

Definition at line 13 of file resource.h.

#define IDS_SAVING 113

Definition at line 22 of file resource.h.

#define IDS_SHAREVIOLATION 182

Definition at line 120 of file resource.h.

#define IDS_TEXT_DOC 129

Definition at line 41 of file resource.h.

#define IDS_TEXT_DOCUMENT 189

Definition at line 127 of file resource.h.

#define IDS_TEXT_OPTIONS 183

Definition at line 121 of file resource.h.

#define IDS_TF_BUTTONS 110

Definition at line 17 of file resource.h.

#define IDS_TITLE_FORMATBAR 167

Definition at line 103 of file resource.h.

#define IDS_TITLE_TOOLBAR 168

Definition at line 106 of file resource.h.

#define IDS_TOOMANYFILES 180

Definition at line 118 of file resource.h.

#define IDS_WINWORD2_DOC 134

Definition at line 50 of file resource.h.

#define IDS_WINWORD6_DOC 133

Definition at line 48 of file resource.h.

#define IDS_WORD6_DOCUMENT 191

Definition at line 129 of file resource.h.

#define IDS_WORD6_OPTIONS 185

Definition at line 123 of file resource.h.

#define IDS_WORD6_WARNING 126

Definition at line 38 of file resource.h.

#define IDS_WORD6_WARNING_BUTTONS 127

Definition at line 39 of file resource.h.

#define IDS_WRAPTORULER 121

Definition at line 32 of file resource.h.

#define IDS_WRAPTOWINDOW 120

Definition at line 30 of file resource.h.

#define IDS_WRITE_DOC 131

Definition at line 44 of file resource.h.

#define IDS_WRITE_OPTIONS 187

Definition at line 125 of file resource.h.

#define IDS_WRITEPROTECT 192

Definition at line 130 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ruler.cpp File Reference

  • ole
  • wordpad
Defines

ruler.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "ruler.h"
#include "wordpvw.h"
#include "wordpdoc.h"
#include "strings.h"
#include <memory.h>

Go to the source code of this file.

Defines

#define | HEIGHT 17
#define | RULERBARHEIGHT 17

Define Documentation

#define HEIGHT 17

Definition at line 25 of file ruler.cpp.

#define RULERBARHEIGHT 17

Definition at line 26 of file ruler.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ruler.h File Reference

  • ole
  • wordpad
Classes

ruler.h File Reference

Go to the source code of this file.

Classes

class | CComboRulerItem
class | CRulerBar
class | CRulerItem
class | CTabRulerItem
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/splash.cpp File Reference

  • ole
  • wordpad
Defines

splash.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"

Go to the source code of this file.

Defines

#define | CX_SHADOW 4
#define | CY_SHADOW 4

Define Documentation

#define CX_SHADOW 4

Definition at line 67 of file splash.cpp.

#define CY_SHADOW 4

Definition at line 66 of file splash.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/splash.h File Reference

  • ole
  • wordpad
Classes

splash.h File Reference

Go to the source code of this file.

Classes

class | CBigIcon
class | CSplashWnd
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/srvritem.cpp File Reference

  • ole
  • wordpad
Variables

srvritem.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "srvritem.h"
#include <limits.h>

Go to the source code of this file.

Variables

CLIPFORMAT cfRTF

Variable Documentation

CLIPFORMAT cfRTF

Definition at line 36 of file wordpad.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/srvritem.h File Reference

  • ole
  • wordpad
Classes

srvritem.h File Reference

Go to the source code of this file.

Classes

class CEmbeddedItem
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/stdafx.cpp File Reference

  • ole
  • wordpad

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/stdafx.h File Reference

  • ole
  • wordpad
Classes | Defines

stdafx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxcmn.h>
#include <afxrich.h>
#include <afxpriv.h>
#include "doctype.h"
#include "chicdial.h"
#include "doctype.h"
#include "chicdial.h"

Go to the source code of this file.

Classes

struct | CCharFormat
class | CDisplayIC
struct | CParaFormat

Defines

#define | CONVERTERS
#define | HORZ_TEXTOFFSET 15
#define | VC_EXTRALEAN
#define | VERT_TEXTOFFSET 5

Define Documentation

#define CONVERTERS

Definition at line 19 of file stdafx.h.

#define HORZ_TEXTOFFSET 15

Definition at line 29 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 16 of file stdafx.h.

#define VERT_TEXTOFFSET 5

Definition at line 30 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/strings.cpp File Reference

  • ole
  • wordpad
Variables

strings.cpp File Reference

#include "stdafx.h"
#include "strings.h"

Go to the source code of this file.

Variables

const TCHAR | szContents [] = _T("Contents")
const TCHAR | szFrameRect [] = _T("FrameRect")
const TCHAR | szIPSection [] = _T("IP")
const TCHAR | szLayout1 [] = _T("Layout2")
const TCHAR | szLayout2 [] = _T("LayoutAux2")
const TCHAR | szMaximized [] = _T("Maximized")
const TCHAR | szPageMargin [] = _T("PageMargin")
const TCHAR | szRegKey [] = _T("Microsoft\\Windows\\CurrentVersion\\Applets")
const TCHAR | szRTFSection [] = _T("RTF")
const TCHAR | szSection [] = _T("Options")
const TCHAR | szSumInfo [] = _T("\005SummaryInformation")
const TCHAR | szTextSection [] = _T("Text")
const TCHAR | szUnits [] = _T("Units")
const char | szWordConverter [] = "MSWRD632.WPC"
const TCHAR | szWordPadClass [] = _T("WordPadClass")
const TCHAR | szWordSection [] = _T("Word6")
const TCHAR | szWordSel [] = _T("WordSel")
const TCHAR | szWrap [] = _T("Wrap")
const char | szWriteConverter [] = "WRITE32.WPC"
const TCHAR | szWriteSection [] = _T("Write")

Variable Documentation

const TCHAR szContents[] = _T("Contents")

Definition at line 44 of file strings.cpp.

const TCHAR szFrameRect[] = _T("FrameRect")

Definition at line 36 of file strings.cpp.

const TCHAR szIPSection[] = _T("IP")

Definition at line 29 of file strings.cpp.

const TCHAR szLayout1[] = _T("Layout2")

Definition at line 21 of file strings.cpp.

const TCHAR szLayout2[] = _T("LayoutAux2")

Definition at line 22 of file strings.cpp.

const TCHAR szMaximized[] = _T("Maximized")

Definition at line 37 of file strings.cpp.

const TCHAR szPageMargin[] = _T("PageMargin")

Definition at line 31 of file strings.cpp.

const TCHAR szRegKey[] = _T("Microsoft\\Windows\\CurrentVersion\\Applets")

Definition at line 23 of file strings.cpp.

const TCHAR szRTFSection[] = _T("RTF")

Definition at line 26 of file strings.cpp.

const TCHAR szSection[] = _T("Options")

Definition at line 33 of file strings.cpp.

const TCHAR szSumInfo[] = _T("\005SummaryInformation")

Definition at line 39 of file strings.cpp.

const TCHAR szTextSection[] = _T("Text")

Definition at line 25 of file strings.cpp.

const TCHAR szUnits[] = _T("Units")

Definition at line 35 of file strings.cpp.

const char szWordConverter[] = "MSWRD632.WPC"

Definition at line 41 of file strings.cpp.

const TCHAR szWordPadClass[] = _T("WordPadClass")

Definition at line 20 of file strings.cpp.

const TCHAR szWordSection[] = _T("Word6")

Definition at line 27 of file strings.cpp.

const TCHAR szWordSel[] = _T("WordSel")

Definition at line 34 of file strings.cpp.

const TCHAR szWrap[] = _T("Wrap")

Definition at line 30 of file strings.cpp.

const char szWriteConverter[] = "WRITE32.WPC"

Definition at line 42 of file strings.cpp.

const TCHAR szWriteSection[] = _T("Write")

Definition at line 28 of file strings.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/strings.h File Reference

  • ole
  • wordpad
Variables

strings.h File Reference

Go to the source code of this file.

Variables

const TCHAR | szContents []
const TCHAR | szDeleteTemp []
const TCHAR | szFrameRect []
const TCHAR | szIPSection []
const TCHAR | szLayout1 []
const TCHAR | szLayout2 []
const TCHAR | szMaximized []
const TCHAR | szPageMargin []
const TCHAR | szRegKey []
const TCHAR | szRTFSection []
const TCHAR | szSection []
const TCHAR | szSumInfo []
const TCHAR | szTextSection []
const TCHAR | szUnits []
const char | szWordConverter []
const TCHAR | szWordPadClass []
const TCHAR | szWordSection []
const TCHAR | szWordSel []
const TCHAR | szWrap []
const char | szWriteConverter []
const TCHAR | szWriteSection []

Variable Documentation

const TCHAR szContents[]

Definition at line 44 of file strings.cpp.

const TCHAR szDeleteTemp[]
const TCHAR szFrameRect[]

Definition at line 36 of file strings.cpp.

const TCHAR szIPSection[]

Definition at line 29 of file strings.cpp.

const TCHAR szLayout1[]

Definition at line 21 of file strings.cpp.

const TCHAR szLayout2[]

Definition at line 22 of file strings.cpp.

const TCHAR szMaximized[]

Definition at line 37 of file strings.cpp.

const TCHAR szPageMargin[]

Definition at line 31 of file strings.cpp.

const TCHAR szRegKey[]

Definition at line 23 of file strings.cpp.

const TCHAR szRTFSection[]

Definition at line 26 of file strings.cpp.

const TCHAR szSection[]

Definition at line 33 of file strings.cpp.

const TCHAR szSumInfo[]

Definition at line 39 of file strings.cpp.

const TCHAR szTextSection[]

Definition at line 25 of file strings.cpp.

const TCHAR szUnits[]

Definition at line 35 of file strings.cpp.

const char szWordConverter[]

Definition at line 41 of file strings.cpp.

const TCHAR szWordPadClass[]

Definition at line 20 of file strings.cpp.

const TCHAR szWordSection[]

Definition at line 27 of file strings.cpp.

const TCHAR szWordSel[]

Definition at line 34 of file strings.cpp.

const TCHAR szWrap[]

Definition at line 30 of file strings.cpp.

const char szWriteConverter[]

Definition at line 42 of file strings.cpp.

const TCHAR szWriteSection[]

Definition at line 28 of file strings.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/unitspag.cpp File Reference

  • ole
  • wordpad

unitspag.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "unitspag.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/unitspag.h File Reference

  • ole
  • wordpad
Classes

unitspag.h File Reference

Go to the source code of this file.

Classes

class CUnitsPage
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpad.cpp File Reference

  • ole
  • wordpad
Defines | Functions | Variables

wordpad.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "mainfrm.h"
#include "ipframe.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "strings.h"
#include "key.h"
#include "filenewd.h"
#include <locale.h>
#include <winnls.h>
#include <winreg.h>

Go to the source code of this file.

Defines

#define | NUM_REG_ARGS 8
#define | REGENTRY(key, value) _T(key) _T("\0\0") _T(value)
#define | REGENTRYX(key, valuename, value) _T(key) _T("\0") _T(valuename) _T("\0") _T(value)

Functions

BOOL AFXAPI | AfxFullPath (LPTSTR lpszPathOut, LPCTSTR lpszFileIn)

Variables

CLIPFORMAT | cfEmbeddedObject
CLIPFORMAT | cfRTF
CLIPFORMAT | cfRTO
CWordPadApp theApp

Define Documentation

#define NUM_REG_ARGS 8

Definition at line 667 of file wordpad.cpp.

#define REGENTRY | ( | key,
 |  | value |
 | ) |  | _T(key) _T("\0\0") _T(value)

Definition at line 631 of file wordpad.cpp.

#define REGENTRYX | ( | key,
 |  | valuename,
 |  | value |
 | ) |  | _T(key) _T("\0") _T(valuename) _T("\0") _T(value)

Definition at line 632 of file wordpad.cpp.

Function Documentation

BOOL AFXAPI AfxFullPath | ( | LPTSTR | lpszPathOut,
 |  | LPCTSTR | lpszFileIn
 | ) |  |

Variable Documentation

CLIPFORMAT cfEmbeddedObject

Definition at line 35 of file wordpad.cpp.

CLIPFORMAT cfRTF

Definition at line 36 of file wordpad.cpp.

CLIPFORMAT cfRTO

Definition at line 37 of file wordpad.cpp.

CWordPadApp theApp

Definition at line 117 of file wordpad.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpad.h File Reference

  • ole
  • wordpad
Classes | Defines | Variables

wordpad.h File Reference

#include "resource.h"
#include "splash.h"
#include "options.h"
#include "afxtempl.h"
#include "splash.h"
#include "options.h"

Go to the source code of this file.

Classes

class | CWordPadApp
class | CWordPadCommandLineInfo

Defines

#define | WPM_BARSTATE WM_USER

Variables

CWordPadApp theApp

Define Documentation

#define WPM_BARSTATE WM_USER

Definition at line 21 of file wordpad.h.

Variable Documentation

CWordPadApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpdoc.cpp File Reference

  • ole
  • wordpad
Classes | Defines | Functions

wordpdoc.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "cntritem.h"
#include "srvritem.h"
#include "formatba.h"
#include "mainfrm.h"
#include "ipframe.h"
#include "buttondi.h"
#include "helpids.h"
#include "strings.h"
#include "unitspag.h"
#include "docopt.h"
#include "optionsh.h"
#include "multconv.h"

Go to the source code of this file.

Classes

class | COIPF

Defines

#define | OFN_EXPLORER 0x00080000L

Functions

BOOL AFXAPI | AfxFullPath (LPTSTR lpszPathOut, LPCTSTR lpszFileIn)
UINT AFXAPI | AfxGetFileTitle (LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax)

Define Documentation

#define OFN_EXPLORER 0x00080000L

Definition at line 41 of file wordpdoc.cpp.

Function Documentation

BOOL AFXAPI AfxFullPath | ( | LPTSTR | lpszPathOut,
 |  | LPCTSTR | lpszFileIn
 | ) |  |
UINT AFXAPI AfxGetFileTitle | ( | LPCTSTR | lpszPathName,
 |  | LPTSTR | lpszTitle,
 |  | UINT | nMax
 | ) |  |
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpdoc.h File Reference

  • ole
  • wordpad
Classes

wordpdoc.h File Reference

Go to the source code of this file.

Classes

class CWordPadDoc
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpvw.cpp File Reference

  • ole
  • wordpad
Functions | Variables

wordpvw.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "cntritem.h"
#include "srvritem.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "formatta.h"
#include "datedial.h"
#include "formatpa.h"
#include "formatba.h"
#include "ruler.h"
#include "strings.h"
#include "colorlis.h"
#include "pageset.h"

Go to the source code of this file.

Functions

int | roundleast (int n)

Variables

CLIPFORMAT | cfEmbeddedObject
CLIPFORMAT | cfRTO

Function Documentation

int roundleast ( int n ) [inline]

Definition at line 327 of file wordpvw.cpp.

{
  int mod = n%10;
  n -= mod;
  if (mod >= 5)
    n += 10;
  else if (mod <= -5)
    n -= 10;
  return n;
}

Variable Documentation

CLIPFORMAT cfEmbeddedObject

Definition at line 35 of file wordpad.cpp.

CLIPFORMAT cfRTO

Definition at line 37 of file wordpad.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpvw.h File Reference

  • ole
  • wordpad
Classes

wordpvw.h File Reference

Go to the source code of this file.

Classes

class CWordPadView
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgdlg.cpp File Reference

  • utility
  • guidgen
Classes

guidgdlg.cpp File Reference

#include "stdafx.h"
#include "guidgen.h"
#include "guidgdlg.h"

Go to the source code of this file.

Classes

class CAboutDlg
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgdlg.h File Reference

  • utility
  • guidgen
Classes

guidgdlg.h File Reference

Go to the source code of this file.

Classes

class CGuidGenDlg
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgen.cpp File Reference

  • utility
  • guidgen
Functions | Variables

guidgen.cpp File Reference

#include "stdafx.h"
#include "guidgen.h"
#include "guidgdlg.h"

Go to the source code of this file.

Functions

HMODULE | LoadLocalizedResourceDLL (const CString &strDLLName)
HMODULE | LoadLocalizedResourceDLLUsingPath (const CString &strPath, const CString &strDLLName)

Variables

const TCHAR * | szLocalizedUIDll = _T("GuidGenUI.dll")
CGuidGenApp theApp

Function Documentation

HMODULE LoadLocalizedResourceDLL ( const CString & strDLLName )

Definition at line 78 of file guidgen.cpp.

{
  TCHAR szModulePath[_MAX_PATH + 1];
  GetModuleFileName(GetModuleHandle(NULL), szModulePath, _MAX_PATH);

  // find path of current executable
  CString strModule = szModulePath;
  CString strPath = strModule.Left(strModule.ReverseFind(_T('\\')));

  return LoadLocalizedResourceDLLUsingPath(strPath, strDLLName);
}

HMODULE LoadLocalizedResourceDLLUsingPath | ( | const CString & | strPath,
 |  | const CString & | strDLLName
 | ) |  |

Definition at line 21 of file guidgen.cpp.

{
  if (strPath.IsEmpty() || strPath.IsEmpty())
  {
    return NULL;
  }

  // Check if given path even exists
  if (GetFileAttributes(strPath) == 0xFFFFFFFF)
  {
    return NULL;
  }

  LANGID langid = GetUserDefaultUILanguage();
  const LCID lcidUser = MAKELCID(langid, SORT_DEFAULT);

  LCID rglcid[3];
  rglcid[0] = lcidUser;
  rglcid[1] = MAKELCID(MAKELANGID(PRIMARYLANGID(lcidUser), SUBLANG_DEFAULT), SORTIDFROMLCID(lcidUser));
  rglcid[2] = 0x409;

  CString strFullPath;
  BOOL fFoundDLL = FALSE;

  for (int i = 0; i < _countof(rglcid); i++)
  {
    // Check if it's the same as any LCID already checked, which is very possible
    int n = 0;
    for (n = 0; n < i; n++)
    {
      if (rglcid[n] == rglcid[i])
        break;
    }

    if (n < i)
    {
      continue;
    }

    strFullPath.Format(_T("%s\\%d\\%s"), strPath, rglcid[i], strDLLName);

    if (GetFileAttributes(strFullPath) != 0xFFFFFFFF)
    {
      fFoundDLL = TRUE;
      break;
    }
  }

  if (fFoundDLL)
  {
    // Finally, attempt to load the library
    return LoadLibraryEx(strFullPath, NULL, 0);
  }

  return NULL;
}

Variable Documentation

const TCHAR* szLocalizedUIDll = _T("GuidGenUI.dll")

Definition at line 90 of file guidgen.cpp.

CGuidGenApp theApp

Definition at line 115 of file guidgen.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgen.h File Reference

  • utility
  • guidgen
Classes

guidgen.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CGuidGenApp
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/resource.h File Reference

  • utility
  • guidgen
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDC_NEWGUID 1101
#define | IDC_RADIO1 1000
#define | IDC_RADIO2 1001
#define | IDC_RADIO3 1002
#define | IDC_RADIO4 1003
#define | IDC_RADIO5 1004
#define | IDC_RADIO6 1005
#define | IDC_RESULTS 1100
#define | IDD_ABOUTBOX 100
#define | IDD_GUIDGEN_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDP_ERR_CREATE_GUID 2000
#define | IDP_ERR_INIT_OLE 102
#define | IDP_ERR_LOCAL_ONLY 2002
#define | IDP_ERR_NO_ADDRESS 2003
#define | IDP_ERR_NOT_OK 2004
#define | IDP_ERR_OPEN_CLIP 2001
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101
#define | IDS_FORMATS 104
#define | IDS_STRING105 105
#define | IDS_STRING106 106
#define | IDS_STRING107 107
#define | IDS_STRING108 108
#define | IDS_STRING109 109

Define Documentation

#define IDC_NEWGUID 1101

Definition at line 24 of file resource.h.

#define IDC_RADIO1 1000

Definition at line 17 of file resource.h.

#define IDC_RADIO2 1001

Definition at line 18 of file resource.h.

#define IDC_RADIO3 1002

Definition at line 19 of file resource.h.

#define IDC_RADIO4 1003

Definition at line 20 of file resource.h.

#define IDC_RADIO5 1004

Definition at line 21 of file resource.h.

#define IDC_RADIO6 1005

Definition at line 22 of file resource.h.

#define IDC_RESULTS 1100

Definition at line 23 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_GUIDGEN_DIALOG 102

Definition at line 8 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDP_ERR_CREATE_GUID 2000

Definition at line 25 of file resource.h.

#define IDP_ERR_INIT_OLE 102

Definition at line 9 of file resource.h.

#define IDP_ERR_LOCAL_ONLY 2002

Definition at line 27 of file resource.h.

#define IDP_ERR_NO_ADDRESS 2003

Definition at line 28 of file resource.h.

#define IDP_ERR_NOT_OK 2004

Definition at line 29 of file resource.h.

#define IDP_ERR_OPEN_CLIP 2001

Definition at line 26 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 16 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 7 of file resource.h.

#define IDS_FORMATS 104

Definition at line 10 of file resource.h.

#define IDS_STRING105 105

Definition at line 11 of file resource.h.

#define IDS_STRING106 106

Definition at line 12 of file resource.h.

#define IDS_STRING107 107

Definition at line 13 of file resource.h.

#define IDS_STRING108 108

Definition at line 14 of file resource.h.

#define IDS_STRING109 109

Definition at line 15 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/stdafx.cpp File Reference

  • utility
  • guidgen

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/stdafx.h File Reference

  • utility
  • guidgen

stdafx.h File Reference

#include <afxwin.h>
#include <afxdisp.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/makehm/makehm.cpp File Reference

  • utility
  • makehm
Classes | Defines | Functions | Variables

makehm.cpp File Reference

#include <ctype.h>
#include <afxcoll.h>

Go to the source code of this file.

Classes

class | CLineFile
struct | CMapInfo

Defines

#define | isodigit(i) (_T('0') <= (i) && (i) <= _T('7'))
#define | SIGNON_REV 0
#define | SIGNON_VER 10

Functions

int | _tmain (int argc, TCHAR **argv)
void | AddPath (CStringList &strrgPathList, const CString &strIncludePath)
void | AddToMap (TCHAR *pszArg)
BOOL | FileExists (const TCHAR *pszFileName)
CString | FindIncludeFile (const TCHAR *pszIncludeFilename, const TCHAR *pszIncludePath)
CMapInfo * | FindInMap (const TCHAR *psz)
BOOL | IsValidSymbol (const TCHAR *psz)
BOOL | IsValidValue (const TCHAR *psz, DWORD &dwValue)
BOOL | MapLine (CString &strLine, BOOL fHTMLFormat)
BOOL | MapNameValue (const TCHAR *pszName, CString &strNewName, DWORD &dwValue)
CString | StringFromDword (DWORD dwValue)
void | UsageErr (const TCHAR *szErrorMessage=NULL, const TCHAR *szErrorParam=NULL)

Variables

CPtrArray | aMap

Define Documentation

#define isodigit ( i ) (_T('0') <= (i) && (i) <= _T('7'))

Definition at line 141 of file makehm.cpp.

#define SIGNON_REV 0

Definition at line 31 of file makehm.cpp.

#define SIGNON_VER 10

Definition at line 30 of file makehm.cpp.

Function Documentation

int _tmain | ( | int | argc,
 |  | TCHAR ** | argv
 | ) |  |

Definition at line 412 of file makehm.cpp.

{
  int iFirstParam = 1;

  // Turn on the "termination on heap corruption" flag.
  (void)HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);

  // generate output for HTML Help format
  BOOL fHTMLFormat = FALSE;

  // <include.h> filename to be copied
  const TCHAR *pszIncludeFilename = NULL;

  // additional include path
  const TCHAR *pszIncludePath = NULL;

  if( argc > 1 && _tcsicmp(argv[1], _T("/h")) == 0 )
  {
    fHTMLFormat = TRUE;
    iFirstParam++;

    if( ( argc > 3 ) && _tcsicmp(argv[2], _T("/a")) == 0 ) // copy file operation
    {
      pszIncludeFilename = argv[3];
      iFirstParam += 2;

      if( argc > 5 && _tcsicmp(argv[4], _T("/i")) == 0 )
      {
        pszIncludePath = argv[5];
        iFirstParam += 2;
      }
    }
  }

  // add symbol mappings to the map.
  BOOL fAddedToMap = FALSE;
  int i;
  for (i = iFirstParam; i < argc && _tcschr(argv[i], _T(',')) != NULL; i++)
  {
    AddToMap(argv[i]);
    fAddedToMap = TRUE;
  }

  // must only have 1-2 parms left on command line.
  if (!fAddedToMap || i < argc-2 || i > argc-1)
  {
    UsageErr(NULL, NULL);
    ASSERT(FALSE);
  }

  // open input file.
  CLineFile fileIn;
  fileIn.SafeOpen(argv[i], CLineFile::modeRead);

  // open/hook up output file.
  CLineFile fileOut;
  if (i+1 < argc)
    fileOut.SafeOpen(argv[i+1], CLineFile::modeWrite | CLineFile::modeCreate);
  else
    fileOut.m_pStream = stdout;

  // process the file.
  CString strLine;
  while (fileIn.ReadLine(strLine))
  {
    if (MapLine(strLine, fHTMLFormat))
    {
      fileOut.WriteLine(strLine);
    }
  }

  // close input file.
  fileIn.Close();

  if( pszIncludeFilename != NULL )
  {
    CString strIncludeFilePath = FindIncludeFile( pszIncludeFilename, pszIncludePath );
    if( strIncludeFilePath.IsEmpty() )
    {
      _ftprintf(stderr, _T("Error: Additional include file %s not found\n\n"), pszIncludeFilename );
      fileOut.Close();
      exit(1);
    }

    fileIn.SafeOpen(strIncludeFilePath, CLineFile::modeRead);

    while (fileIn.ReadLine(strLine))
    {
      fileOut.WriteLine(strLine);
    }
  }

  // close output file.
  fileOut.Close();

  return 0;
}

void AddPath | ( | CStringList & | strrgPathList,
 |  | const CString & | strIncludePath
 | ) |  |

Definition at line 345 of file makehm.cpp.

{
  CString strPath;
  int curPos = 0;

  strPath = strIncludePath.Tokenize(_T(";"), curPos );

  while( ! strPath.IsEmpty() )
  {
    strPath.TrimLeft();
    strPath.TrimRight();
    strrgPathList.AddTail( strPath );
    strPath = strIncludePath.Tokenize(_T(";"), curPos );
  }
}

void AddToMap ( TCHAR * pszArg )

Definition at line 198 of file makehm.cpp.

{
  ENSURE(pszArg != NULL);
  TCHAR* psz = _tcsdup(pszArg);
  if (psz == NULL)
  {
    AfxThrowMemoryException();
  }
  ASSERT(_tcschr(psz, _T(',')) != NULL);

  TCHAR* pszPrefixFrom;
  TCHAR* pszPrefixTo;
  TCHAR* pszAddTo;
  DWORD dwAddTo;
  CMapInfo* pInfo;
  TCHAR* pContext=NULL;

  // parse each field out of the argument.
  pszPrefixFrom = _tcstok_s(psz, _T(","), &pContext);
  pszPrefixTo = _tcstok_s(NULL, _T(","), &pContext);
  if (pszPrefixTo == NULL)
    goto ParmError;
  pszAddTo = _tcstok_s(NULL, _T(","), &pContext);
  if (pszAddTo == NULL)
    goto ParmError;

  // make sure they are valid symbols/values.
  if (!IsValidSymbol(pszPrefixFrom) || !IsValidSymbol(pszPrefixTo))
    goto ParmError;
  if (!IsValidValue(pszAddTo, dwAddTo))
    goto ParmError;

  // add them to the map.
  pInfo = new CMapInfo;
  ASSERT(pInfo);
  pInfo->pszPrefixFrom = pszPrefixFrom;
  pInfo->pszPrefixTo = pszPrefixTo;
  pInfo->dwAddTo = dwAddTo;
  aMap.Add(pInfo);
  return;

ParmError:
  UsageErr(_T("parameter \"%s\" not correctly formed."), pszArg);
  ASSERT(FALSE);
}

BOOL FileExists ( const TCHAR * pszFileName )

Definition at line 361 of file makehm.cpp.

{
  BOOL r = FALSE;
  CStdioFile file;
  if( file.Open( pszFileName, CLineFile::modeRead ) )
  {
    file.Close();
    r = TRUE;
  }

  return r;
}

CString FindIncludeFile | ( | const TCHAR * | pszIncludeFilename,
 |  | const TCHAR * | pszIncludePath
 | ) |  |

Definition at line 374 of file makehm.cpp.

{
  CString strEnvInclude;
  CStringList strrgPathList;

  if( FileExists( pszIncludeFilename ) )
    return CString(pszIncludeFilename);

  // add current directory to path list;
  strrgPathList.AddTail( ".\\" );

  // add path specified in the command line (/I option)
  if( pszIncludePath )
    AddPath( strrgPathList, pszIncludePath );

  // add path specified in the INCLUDE variable
  if( strEnvInclude.GetEnvironmentVariable( _T("INCLUDE") ) )
    AddPath( strrgPathList, strEnvInclude );

  POSITION pos = strrgPathList.GetHeadPosition();
  for (int i=0;i < strrgPathList.GetCount();i++)
  {
    CString strPath = strrgPathList.GetNext(pos);
    CString tmp = strPath.Right(1);
    if( tmp != ":" && tmp != "\\" )
      strPath += '\\';

    strPath += pszIncludeFilename;

    if( FileExists( strPath ) )
      return CString(strPath);
  }

  return CString("");
}

CMapInfo* FindInMap ( const TCHAR * psz )

Definition at line 244 of file makehm.cpp.

{
  ENSURE(psz != NULL);
  ENSURE(*psz != 0);
  int nMax = (int)aMap.GetSize();
  for (int i = 0; i < nMax; i++)
  {
    CMapInfo* pInfo = (CMapInfo*)aMap.GetAt(i);
    size_t nLen = _tcslen(pInfo->pszPrefixFrom);
    if (_tcsncmp(pInfo->pszPrefixFrom, psz, nLen) == 0)
      return pInfo;
  }
  return NULL;
}

BOOL IsValidSymbol ( const TCHAR * psz )

Definition at line 117 of file makehm.cpp.

{
#ifdef UNICODE
  if (!__iswcsymf(*psz))
#else
  if (!__iscsymf(*psz))
#endif
    return FALSE;

  ASSERT(*psz != 0);
  ++psz;
  while (*psz)
  {
#ifdef UNICODE
    if (!__iswcsym(*psz))
#else
    if (!__iscsym(*psz))
#endif
      return FALSE;
    ++psz;
  }
  return TRUE;
}

BOOL IsValidValue | ( | const TCHAR * | psz,
 |  | DWORD & | dwValue
 | ) |  |

Definition at line 143 of file makehm.cpp.

{
  if (*psz == 0 || !_istdigit(*psz))
    return FALSE;

  DWORD dw = 0;
  if (psz[0] == '0' && (psz[1] == 'x' || psz[1] == 'X'))
  {
    if (psz[1] == 0)
      return FALSE;
    psz += 2;
    while (_istxdigit(*psz))
    {
      dw *= 16;
      dw += _istdigit(*psz) ? *psz - '0' : 10 + (*psz|0x20) - 'a';
      ++psz;
    }
  }
  else if (psz[0] == '0')
  {
    while (isodigit(*psz))
    {
      dw *= 8;
      dw += *psz - '0';
      ++psz;
    }
  }
  else
  {
    while (_istdigit(*psz))
    {
      dw *= 10;
      dw += *psz - '0';
      ++psz;
    }
  }

  if (*psz != 0)
    return FALSE;

  dwValue = dw;
  return TRUE;
}

BOOL MapLine | ( | CString & | strLine,
 |  | BOOL | fHTMLFormat
 | ) |  |

Definition at line 282 of file makehm.cpp.

{
  static TCHAR szWhiteSpace1[] = _T("\t ");
  static TCHAR szWhiteSpace2[] = _T("\t\n ");
  static TCHAR szDefine[] = _T("#define");

  TCHAR* pszCopy = _tcsdup(strLine);
  if (pszCopy == NULL)
  {
    AfxThrowMemoryException();
  }

  TCHAR* psz;
  TCHAR* pszSymbol;
  TCHAR* pszValue;
  DWORD dwValue;
  CString strNewName;
  TCHAR* pContext=NULL;

  // '//{{NOHELP}}' can be placed on the line and it will not be included
  if (_tcsstr(strLine, _T("//{{NOHELP}}")) != NULL)
    goto RetFalse;

  psz = _tcstok_s(pszCopy, szWhiteSpace1, &pContext);
  if (psz == NULL)
    goto RetFalse;
  if (_tcscmp(psz, szDefine) != 0)
    goto RetFalse;
  pszSymbol = _tcstok_s(NULL, szWhiteSpace1, &pContext);
  if (pszSymbol == NULL)
    goto RetFalse;
  pszValue = _tcstok_s(NULL, szWhiteSpace2, &pContext);
  if (pszValue == NULL)
    goto RetFalse;

  if (!IsValidSymbol(pszSymbol))
    goto RetFalse;
  if (!IsValidValue(pszValue, dwValue))
    goto RetFalse;
  if (!MapNameValue(pszSymbol, strNewName, dwValue))
    goto RetFalse;

  //BLOCK: format output line
  {
    CString strPad(_T(' '), 40-strNewName.GetLength());
    if (strPad.IsEmpty())
      strPad = _T('\t');
    if( fHTMLFormat )
      strLine = _T("#define ") + strNewName + strPad + StringFromDword(dwValue) + _T("\n");
    else
      strLine = strNewName + strPad + StringFromDword(dwValue) + _T("\n");
  }

  ASSERT(pszCopy != NULL);
  free(pszCopy);
  return TRUE;

RetFalse:
  ASSERT(pszCopy != NULL);
  free(pszCopy);
  return FALSE;
}

BOOL MapNameValue | ( | const TCHAR * | pszName,
 |  | CString & | strNewName,
 |  | DWORD & | dwValue
 | ) |  |

Definition at line 262 of file makehm.cpp.

{
  CMapInfo* pInfo = FindInMap(pszName);
  if (pInfo == NULL)
    return FALSE;

  CString strName = pszName;
  strNewName = (CString)pInfo->pszPrefixTo +
    strName.Right(strName.GetLength()-(int)_tcslen(pInfo->pszPrefixFrom));
  dwValue += pInfo->dwAddTo;
  return TRUE;
}

CString StringFromDword ( DWORD dwValue )

Definition at line 275 of file makehm.cpp.

{
  TCHAR buf[sizeof _T("0x12345678")];
  _stprintf_s(buf, sizeof _T("0x12345678"), _T("0x%lX"), dwValue);
  return CString(buf);
}

void UsageErr | ( | const TCHAR * | szErrorMessage = NULL,
 |  | const TCHAR * | szErrorParam = NULL
 | ) |  |

Definition at line 35 of file makehm.cpp.

{
  _ftprintf(stderr,
    _T("\nMicrosoft (R) Help Maintenance Utility   Version %d.%02d\n")
    _T("Copyright (c) Microsoft Corporation.  All rights reserved.\n\n"),
    SIGNON_VER, SIGNON_REV);

  if (szErrorMessage != NULL)
  {
    _ftprintf(stderr, _T("makehm: error: "));
    _ftprintf(stderr, szErrorMessage, szErrorParam);
    _ftprintf(stderr, _T(".\n\n"));
  }

  _ftprintf(stderr, _T("makehm usage:\n\n")
  _T("  makehm [/h [/a <file.h> [/I <path>]]] <from>,<to>,<add>... <resource.h> [output.hm]\n")
  _T("\n")
  _T("    /h     - generates an include file (.h) for HTML help instead of\n")
  _T("             a normal (.hm) WinHelp map file.\n")
  _T("    /a     - copies the contents of the specified <file.h> file to the\n")
  _T("             output.\n")
  _T("    /I     - additional path to search for the file.h file.  The program will\n")
  _T("             first look in the current directory, then the path specified by the\n")
  _T("             /I option and then in the path specified by the INCLUDE\n")
  _T("             environment variable.\n")
  _T("\n")
  _T("    <from>,<to>,<add> fields must appear as one argument and\n")
  _T("       are separated by commas.  A set of these arguments may\n")
  _T("       appear more than once.\n")
  _T("    <from> - identifies the symbol prefix to map from (e.g., ID_)\n")
  _T("    <to>   - identifies the symbol prefix to map to (e.g., HID_)\n")
  _T("    <add>  - identifies a numeric offset to be used (e.g., 0x10000)\n")
  _T("\n")
  _T("    <resource.h> - identifies the input header file (e.g., resource.h).\n")
  _T("    [output.hm] - identifies the output help map file.  If not\n")
  _T("       supplied, output is written to stdout.\n"));

  exit(1);
}

Variable Documentation

CPtrArray aMap

Definition at line 189 of file makehm.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/makehm/resource.h File Reference

  • utility
  • makehm

resource.h File Reference

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPages.cpp File Reference

  • vc2008fp
  • CustomPages
Classes | Variables

CustomPages.cpp File Reference

#include "stdafx.h"
#include "CustomPages.h"
#include "MainFrm.h"
#include "CustomPagesDoc.h"
#include "CustomPagesView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CCustomPagesApp theApp

Variable Documentation

CCustomPagesApp theApp

Definition at line 48 of file CustomPages.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPages.h File Reference

  • vc2008fp
  • CustomPages
Classes | Variables

CustomPages.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CCustomPagesApp

Variables

CCustomPagesApp theApp

Variable Documentation

CCustomPagesApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesDoc.cpp File Reference

  • vc2008fp
  • CustomPages

CustomPagesDoc.cpp File Reference

#include "stdafx.h"
#include "CustomPages.h"
#include "CustomPagesDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesDoc.h File Reference

  • vc2008fp
  • CustomPages
Classes

CustomPagesDoc.h File Reference

Go to the source code of this file.

Classes

class CCustomPagesDoc
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesView.cpp File Reference

  • vc2008fp
  • CustomPages

CustomPagesView.cpp File Reference

#include "stdafx.h"
#include "CustomPages.h"
#include "CustomPagesDoc.h"
#include "CustomPagesView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesView.h File Reference

  • vc2008fp
  • CustomPages
Classes

CustomPagesView.h File Reference

Go to the source code of this file.

Classes

class CCustomPagesView
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MainFrm.cpp File Reference

  • vc2008fp
  • CustomPages

MainFrm.cpp File Reference

#include "stdafx.h"
#include "CustomPages.h"
#include "MainFrm.h"
#include "MyCustomizationPage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MainFrm.h File Reference

  • vc2008fp
  • CustomPages
Classes | Defines

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 13 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MyCustomizationPage.cpp File Reference

  • vc2008fp
  • CustomPages

MyCustomizationPage.cpp File Reference

#include "stdafx.h"
#include "CustomPages.h"
#include "MyCustomizationPage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MyCustomizationPage.h File Reference

  • vc2008fp
  • CustomPages
Classes

MyCustomizationPage.h File Reference

Go to the source code of this file.

Classes

class CMyCustomizationPage
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/resource.h File Reference

  • vc2008fp
  • CustomPages
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | IDC_CHECK1 1041
#define | IDC_CHECK2 1042
#define | IDD_ABOUTBOX 1000
#define | IDD_CUST_PAGE_DLG 151
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_CUSTOMTYPE 129
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 15 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 16 of file resource.h.

#define IDC_CHECK1 1041

Definition at line 13 of file resource.h.

#define IDC_CHECK2 1042

Definition at line 14 of file resource.h.

#define IDD_ABOUTBOX 1000

Definition at line 12 of file resource.h.

#define IDD_CUST_PAGE_DLG 151

Definition at line 11 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 9 of file resource.h.

#define IDR_CUSTOMTYPE 129

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 10 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/StdAfx.cpp File Reference

  • vc2008fp
  • CustomPages

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/StdAfx.h File Reference

  • vc2008fp
  • CustomPages
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/targetver.h File Reference

  • vc2008fp
  • CustomPages
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemo.cpp File Reference

  • vc2008fp
  • DesktopAlertDemo
Variables

DesktopAlertDemo.cpp File Reference

#include "stdafx.h"
#include "DesktopAlertDemo.h"
#include "DesktopAlertDemoDlg.h"

Go to the source code of this file.

Variables

CDesktopAlertDemoApp theApp

Variable Documentation

CDesktopAlertDemoApp theApp

Definition at line 40 of file DesktopAlertDemo.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemo.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Classes | Variables

DesktopAlertDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDesktopAlertDemoApp

Variables

CDesktopAlertDemoApp theApp

Variable Documentation

CDesktopAlertDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.cpp File Reference

  • vc2008fp
  • DesktopAlertDemo

DesktopAlertDemoDlg.cpp File Reference

#include "stdafx.h"
#include "DesktopAlertDemo.h"
#include "DesktopAlertDemoDlg.h"
#include "MyAlertDlg.h"
#include "MSNDlg.h"
#include "MSNVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Classes

DesktopAlertDemoDlg.h File Reference

#include "IconComboBox.h"

Go to the source code of this file.

Classes

class CDesktopAlertDemoDlg
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/IconComboBox.cpp File Reference

  • vc2008fp
  • DesktopAlertDemo

IconComboBox.cpp File Reference

#include "stdafx.h"
#include "DesktopAlertDemo.h"
#include "IconComboBox.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/IconComboBox.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Classes

IconComboBox.h File Reference

Go to the source code of this file.

Classes

class CIconComboBox
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNDlg.cpp File Reference

  • vc2008fp
  • DesktopAlertDemo

MSNDlg.cpp File Reference

#include "stdafx.h"
#include "DesktopAlertDemo.h"
#include "MSNDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNDlg.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Classes

MSNDlg.h File Reference

Go to the source code of this file.

Classes

class CMSNDlg
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNVisualManager.cpp File Reference

  • vc2008fp
  • DesktopAlertDemo
Variables

MSNVisualManager.cpp File Reference

#include "stdafx.h"
#include "DesktopAlertDemo.h"
#include "MSNVisualManager.h"

Go to the source code of this file.

Variables

const COLORREF | clrFillDark = RGB (220, 228, 247)
const COLORREF | clrFillLight = RGB (255, 255, 255)

Variable Documentation

const COLORREF clrFillDark = RGB (220, 228, 247)

Definition at line 23 of file MSNVisualManager.cpp.

const COLORREF clrFillLight = RGB (255, 255, 255)

Definition at line 24 of file MSNVisualManager.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNVisualManager.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Classes

MSNVisualManager.h File Reference

Go to the source code of this file.

Classes

class CMSNVisualManager
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MyAlertDlg.cpp File Reference

  • vc2008fp
  • DesktopAlertDemo

MyAlertDlg.cpp File Reference

#include "stdafx.h"
#include "DesktopAlertDemo.h"
#include "MyAlertDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MyAlertDlg.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Classes

MyAlertDlg.h File Reference

Go to the source code of this file.

Classes

class CMyPopupDlg
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/resource.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_POPUP_DELETEITEM 32773
#define | ID_POPUP_DESKTOPALERTSETTINGS 32776
#define | ID_POPUP_DISABLENEWDESKTOPALERT 32775
#define | ID_POPUP_FLAGITEM 32772
#define | ID_POPUP_MARKASREAD 32774
#define | ID_POPUP_OPENITEM 32771
#define | IDB_DELETE 133
#define | IDB_FLAG 132
#define | IDB_ICONS 145
#define | IDB_ICONS_SMALL 146
#define | IDB_LOGO 134
#define | IDB_MENUIMAGES 149
#define | IDC_ANIM_SPEED 1006
#define | IDC_ANIM_SPEED_VAL 1007
#define | IDC_ANIMATION 1005
#define | IDC_AUTO_CLOSE 1022
#define | IDC_AUTOCLOSE_TIME 1010
#define | IDC_AUTOCLOSE_VAL 1012
#define | IDC_BUTTON1 1003
#define | IDC_DELETE 1009
#define | IDC_FLAG 1008
#define | IDC_FROM 1010
#define | IDC_ICON_LABEL 1017
#define | IDC_ICONS 1016
#define | IDC_LINK 1021
#define | IDC_OPTIONS 1012
#define | IDC_POPUP_SOURCE 1013
#define | IDC_POPUP_SOURCE2 1014
#define | IDC_SHOW 1000
#define | IDC_SMALL_CAPTION 1011
#define | IDC_TEXT 1019
#define | IDC_TEXT_LABEL 1018
#define | IDC_TRANSP 1008
#define | IDC_TRANSP_VAL 1009
#define | IDC_URL_LABEL 1020
#define | IDC_VISUAL_MNGR 1004
#define | IDD_ALERT_DIALOG 102
#define | IDD_DIALOG1 129
#define | IDD_DIALOG2 130
#define | IDI_MAIL 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP 136
#define | IDR_TOOLBAR1 147

Define Documentation

#define ID_POPUP_DELETEITEM 32773

Definition at line 44 of file resource.h.

#define ID_POPUP_DESKTOPALERTSETTINGS 32776

Definition at line 47 of file resource.h.

#define ID_POPUP_DISABLENEWDESKTOPALERT 32775

Definition at line 46 of file resource.h.

#define ID_POPUP_FLAGITEM 32772

Definition at line 43 of file resource.h.

#define ID_POPUP_MARKASREAD 32774

Definition at line 45 of file resource.h.

#define ID_POPUP_OPENITEM 32771

Definition at line 42 of file resource.h.

#define IDB_DELETE 133

Definition at line 11 of file resource.h.

#define IDB_FLAG 132

Definition at line 10 of file resource.h.

#define IDB_ICONS 145

Definition at line 14 of file resource.h.

#define IDB_ICONS_SMALL 146

Definition at line 15 of file resource.h.

#define IDB_LOGO 134

Definition at line 12 of file resource.h.

#define IDB_MENUIMAGES 149

Definition at line 17 of file resource.h.

#define IDC_ANIM_SPEED 1006

Definition at line 22 of file resource.h.

#define IDC_ANIM_SPEED_VAL 1007

Definition at line 23 of file resource.h.

#define IDC_ANIMATION 1005

Definition at line 21 of file resource.h.

#define IDC_AUTO_CLOSE 1022

Definition at line 41 of file resource.h.

#define IDC_AUTOCLOSE_TIME 1010

Definition at line 29 of file resource.h.

#define IDC_AUTOCLOSE_VAL 1012

Definition at line 32 of file resource.h.

#define IDC_BUTTON1 1003

Definition at line 19 of file resource.h.

#define IDC_DELETE 1009

Definition at line 27 of file resource.h.

#define IDC_FLAG 1008

Definition at line 25 of file resource.h.

#define IDC_FROM 1010

Definition at line 28 of file resource.h.

#define IDC_ICON_LABEL 1017

Definition at line 36 of file resource.h.

#define IDC_ICONS 1016

Definition at line 35 of file resource.h.

#define IDC_LINK 1021

Definition at line 40 of file resource.h.

#define IDC_OPTIONS 1012

Definition at line 31 of file resource.h.

#define IDC_POPUP_SOURCE 1013

Definition at line 33 of file resource.h.

#define IDC_POPUP_SOURCE2 1014

Definition at line 34 of file resource.h.

#define IDC_SHOW 1000

Definition at line 18 of file resource.h.

#define IDC_SMALL_CAPTION 1011

Definition at line 30 of file resource.h.

#define IDC_TEXT 1019

Definition at line 38 of file resource.h.

#define IDC_TEXT_LABEL 1018

Definition at line 37 of file resource.h.

#define IDC_TRANSP 1008

Definition at line 24 of file resource.h.

#define IDC_TRANSP_VAL 1009

Definition at line 26 of file resource.h.

#define IDC_URL_LABEL 1020

Definition at line 39 of file resource.h.

#define IDC_VISUAL_MNGR 1004

Definition at line 20 of file resource.h.

#define IDD_ALERT_DIALOG 102

Definition at line 5 of file resource.h.

#define IDD_DIALOG1 129

Definition at line 7 of file resource.h.

#define IDD_DIALOG2 130

Definition at line 9 of file resource.h.

#define IDI_MAIL 130

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDR_POPUP 136

Definition at line 13 of file resource.h.

#define IDR_TOOLBAR1 147

Definition at line 16 of file resource.h.

Generated on Sat Nov 23 2024 17:00:36 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/StdAfx.cpp File Reference

  • vc2008fp
  • DesktopAlertDemo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/StdAfx.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/targetver.h File Reference

  • vc2008fp
  • DesktopAlertDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/CustomToolTipCtrl.cpp File Reference

  • vc2008fp
  • DlgToolTips

CustomToolTipCtrl.cpp File Reference

#include "stdafx.h"
#include "DlgToolTips.h"
#include "CustomToolTipCtrl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/CustomToolTipCtrl.h File Reference

  • vc2008fp
  • DlgToolTips
Classes

CustomToolTipCtrl.h File Reference

Go to the source code of this file.

Classes

class CCustomToolTipCtrl
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTips.cpp File Reference

  • vc2008fp
  • DlgToolTips
Variables

DlgToolTips.cpp File Reference

#include "stdafx.h"
#include "DlgToolTips.h"
#include "DlgToolTipsDlg.h"

Go to the source code of this file.

Variables

CDlgToolTipsApp theApp

Variable Documentation

CDlgToolTipsApp theApp

Definition at line 40 of file DlgToolTips.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTips.h File Reference

  • vc2008fp
  • DlgToolTips
Classes

DlgToolTips.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDlgToolTipsApp
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTipsDlg.cpp File Reference

  • vc2008fp
  • DlgToolTips

DlgToolTipsDlg.cpp File Reference

#include "stdafx.h"
#include "DlgToolTips.h"
#include "DlgToolTipsDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTipsDlg.h File Reference

  • vc2008fp
  • DlgToolTips
Classes

DlgToolTipsDlg.h File Reference

#include "CustomToolTipCtrl.h"

Go to the source code of this file.

Classes

class CDlgToolTipsDlg
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/resource.h File Reference

  • vc2008fp
  • DlgToolTips
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_CANCEL 129
#define | IDB_OK 130
#define | IDD_DLGTOOLTIPS_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101

Define Documentation

#define IDB_CANCEL 129

Definition at line 9 of file resource.h.

#define IDB_OK 130

Definition at line 10 of file resource.h.

#define IDD_DLGTOOLTIPS_DIALOG 102

Definition at line 7 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/StdAfx.cpp File Reference

  • vc2008fp
  • DlgToolTips

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/StdAfx.h File Reference

  • vc2008fp
  • DlgToolTips
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/targetver.h File Reference

  • vc2008fp
  • DlgToolTips
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/cntritem.cpp File Reference

  • vc2008fp
  • DrawClient

cntritem.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "drawdoc.h"
#include "drawobj.h"
#include "drawvw.h"
#include "cntritem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/cntritem.h File Reference

  • vc2008fp
  • DrawClient
Classes

cntritem.h File Reference

Go to the source code of this file.

Classes

class CDrawItem
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClient.cpp File Reference

  • vc2008fp
  • DrawClient
Classes | Variables

DrawClient.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "mainfrm.h"
#include "drawobj.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "splitfrm.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CDrawApp theApp

Variable Documentation

CDrawApp theApp

Definition at line 56 of file DrawClient.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClient.h File Reference

  • vc2008fp
  • DrawClient
Classes | Variables

DrawClient.h File Reference

#include "resource.h"
#include <afxtempl.h>
#include "resource.h"

Go to the source code of this file.

Classes

class CDrawApp

Variables

CDrawApp theApp

Variable Documentation

CDrawApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawdoc.cpp File Reference

  • vc2008fp
  • DrawClient

drawdoc.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "mainfrm.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "drawobj.h"
#include "cntritem.h"
#include "summpage.h"
#include "statpage.h"
#include "propkey.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawdoc.h File Reference

  • vc2008fp
  • DrawClient
Classes

drawdoc.h File Reference

#include "drawobj.h"
#include "summinfo.h"

Go to the source code of this file.

Classes

class CDrawDoc
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawobj.cpp File Reference

  • vc2008fp
  • DrawClient

drawobj.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "drawobj.h"
#include "cntritem.h"
#include "rectdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawobj.h File Reference

  • vc2008fp
  • DrawClient
Classes | Typedefs

drawobj.h File Reference

Go to the source code of this file.

Classes

class | CDrawObj
class | CDrawOleObj
class | CDrawPoly
class | CDrawRect

Typedefs

typedef CTypedPtrList< CObList,
CDrawObj * > 		CDrawObjList

Typedef Documentation

typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList

Definition at line 125 of file drawobj.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawtool.cpp File Reference

  • vc2008fp
  • DrawClient
Enumerations | Variables

drawtool.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "drawobj.h"
#include "drawtool.h"
#include "mainfrm.h"

Go to the source code of this file.

Enumerations

enum SelectMode {
none, netSelect, move, size,
none, netSelect, move, size
}

Variables

CPoint | lastPoint
int | nDragHandle
SelectMode | selectMode = none

Enumeration Type Documentation

enum SelectMode
Enumerator:
none
netSelect
move
size
none
netSelect
move
size

Definition at line 103 of file drawtool.cpp.

{
  none, netSelect, move, size
};

Variable Documentation

CPoint lastPoint

Definition at line 111 of file drawtool.cpp.

int nDragHandle

Definition at line 109 of file drawtool.cpp.

SelectMode selectMode = none

Definition at line 108 of file drawtool.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawtool.h File Reference

  • vc2008fp
  • DrawClient
Classes | Enumerations

drawtool.h File Reference

#include "drawobj.h"

Go to the source code of this file.

Classes

class | CDrawTool
class | CPolyTool
class | CRectTool
class | CSelectTool

Enumerations

enum DrawShape {
selection, line, rect, roundRect,
ellipse, poly, selection, line,
rect, roundRect, ellipse, poly
}

Enumeration Type Documentation

enum DrawShape
Enumerator:
selection
line
rect
roundRect
ellipse
poly
selection
line
rect
roundRect
ellipse
poly

Definition at line 17 of file drawtool.h.

{
  selection, line, rect, roundRect, ellipse, poly
};

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawvw.cpp File Reference

  • vc2008fp
  • DrawClient
Classes

drawvw.cpp File Reference

#include "stdafx.h"
#include <afxpriv.h>
#include "DrawClient.h"
#include "drawdoc.h"
#include "drawobj.h"
#include "cntritem.h"
#include "drawvw.h"
#include "drawtool.h"
#include "mainfrm.h"
#include "LineWeightDlg.h"

Go to the source code of this file.

Classes

class CDrawObjFriend
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawvw.h File Reference

  • vc2008fp
  • DrawClient
Classes | Defines

drawvw.h File Reference

Go to the source code of this file.

Classes

class | CDrawView
struct | CDrawView::XPreviewStateItem

Defines

#define | HINT_DELETE_SELECTION 3
#define | HINT_UPDATE_DRAWOBJ 1
#define | HINT_UPDATE_OLE_ITEMS 4
#define | HINT_UPDATE_SELECTION 2
#define | HINT_UPDATE_WINDOW 0

Define Documentation

#define HINT_DELETE_SELECTION 3

Definition at line 16 of file drawvw.h.

#define HINT_UPDATE_DRAWOBJ 1

Definition at line 14 of file drawvw.h.

#define HINT_UPDATE_OLE_ITEMS 4

Definition at line 17 of file drawvw.h.

#define HINT_UPDATE_SELECTION 2

Definition at line 15 of file drawvw.h.

#define HINT_UPDATE_WINDOW 0

Definition at line 13 of file drawvw.h.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/LineWeightDlg.cpp File Reference

  • vc2008fp
  • DrawClient

LineWeightDlg.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "LineWeightDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/LineWeightDlg.h File Reference

  • vc2008fp
  • DrawClient
Classes

LineWeightDlg.h File Reference

Go to the source code of this file.

Classes

class CLineWeightDlg
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/mainfrm.cpp File Reference

  • vc2008fp
  • DrawClient

mainfrm.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "mainfrm.h"
#include "drawdoc.h"
#include "drawvw.h"
#include "RibbonListButton.h"
#include <memory>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/mainfrm.h File Reference

  • vc2008fp
  • DrawClient
Classes | Defines

mainfrm.h File Reference

#include "drawobj.h"

Go to the source code of this file.

Classes

class | CMainFrame
struct | CMainFrame::XStyle

Defines

#define | ID_FORMAT_CONTEXT_TAB 1

Define Documentation

#define ID_FORMAT_CONTEXT_TAB 1

Definition at line 15 of file mainfrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/PropertiesViewBar.cpp File Reference

  • vc2008fp
  • DrawClient

PropertiesViewBar.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "PropertiesViewBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/PropertiesViewBar.h File Reference

  • vc2008fp
  • DrawClient
Classes

PropertiesViewBar.h File Reference

Go to the source code of this file.

Classes

class | CPropertiesToolBar
class | CPropertiesViewBar
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/propset.cpp File Reference

  • vc2008fp
  • DrawClient
Classes | Defines

propset.cpp File Reference

#include "stdafx.h"
#include <malloc.h>
#include <ole2.h>
#include <oleauto.h>
#include "propset.h"

Go to the source code of this file.

Classes

struct | DICTENTRY
struct | DICTENTRYHEADER

Defines

#define | CountPrefixedStringT CountPrefixedStringA
#define | new DEBUG_NEW

Define Documentation

#define CountPrefixedStringT CountPrefixedStringA

Definition at line 61 of file propset.cpp.

#define new DEBUG_NEW

Definition at line 30 of file propset.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/propset.h File Reference

  • vc2008fp
  • DrawClient
Classes | Typedefs

propset.h File Reference

Go to the source code of this file.

Classes

class | CProperty
class | CPropertySection
class | CPropertySet
struct | tagFORMATIDOFFSET
struct | tagPROPERTYIDOFFSET
struct | tagPROPHEADER
struct | tagSECTIONHEADER

Typedefs

typedef struct tagFORMATIDOFFSET | FORMATIDOFFSET
typedef struct tagFORMATIDOFFSET * | LPFORMATIDOFFSET
typedef struct
tagPROPERTYIDOFFSET * 		LPPROPERTYIDOFFSET
typedef struct tagPROPHEADER * | LPPROPHEADER
typedef struct tagSECTIONHEADER * | LPSECTIONHEADER
typedef struct tagPROPERTYIDOFFSET | PROPERTYIDOFFSET
typedef struct tagPROPHEADER | PROPHEADER
typedef struct tagSECTIONHEADER | SECTIONHEADER

Typedef Documentation

typedef struct tagFORMATIDOFFSET FORMATIDOFFSET
typedef struct tagFORMATIDOFFSET * LPFORMATIDOFFSET
typedef struct tagPROPERTYIDOFFSET * LPPROPERTYIDOFFSET
typedef struct tagPROPHEADER * LPPROPHEADER
typedef struct tagSECTIONHEADER * LPSECTIONHEADER
typedef struct tagPROPERTYIDOFFSET PROPERTYIDOFFSET
typedef struct tagPROPHEADER PROPHEADER
typedef struct tagSECTIONHEADER SECTIONHEADER
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/rectdlg.cpp File Reference

  • vc2008fp
  • DrawClient

rectdlg.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "rectdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/rectdlg.h File Reference

  • vc2008fp
  • DrawClient
Classes

rectdlg.h File Reference

Go to the source code of this file.

Classes

class CRectDlg
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/resource.h File Reference

  • vc2008fp
  • DrawClient
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CANCEL_EDIT 32768
#define | ID_DRAW_ELLIPSE 32774
#define | ID_DRAW_LINE 32771
#define | ID_DRAW_POLYGON 32782
#define | ID_DRAW_RECT 32772
#define | ID_DRAW_ROUNDRECT 32773
#define | ID_DRAW_SELECT 32770
#define | ID_EXPAND 32829
#define | ID_FILE_SUMMARYINFO 32792
#define | ID_MDI_CANCEL 32828
#define | ID_MDI_MOVE_TO_NEXT_GROUP 32826
#define | ID_MDI_MOVE_TO_PREV_GROUP 32827
#define | ID_MDI_NEW_HORZ_TAB_GROUP 32824
#define | ID_MDI_NEW_VERT_GROUP 32825
#define | ID_NEWWINDOW 32823
#define | ID_OBJECT_FILLCOLOR 32776
#define | ID_OBJECT_LINECOLOR 32775
#define | ID_OBJECT_LINEWEIGHT 32835
#define | ID_OBJECT_LINEWEIGHT_MORE 32836
#define | ID_OBJECT_MOVEBACK 32780
#define | ID_OBJECT_MOVEFORWARD 32779
#define | ID_OBJECT_MOVETOBACK 32778
#define | ID_OBJECT_MOVETOFRONT 32777
#define | ID_OBJECT_NOFILL 32834
#define | ID_OBJECT_NOLINE 32839
#define | ID_OBJECT_PROPERTIES 32838
#define | ID_OBJECT_STYLES 32840
#define | ID_POPUP_MENU 103
#define | ID_SORTINGGROUP 32830
#define | ID_STATUSBAR_PANE_OBJECTCOUNT 32831
#define | ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT 32832
#define | ID_TOOLS_OPTIONS 32833
#define | ID_VIEW_APPLOOK_2007 32818
#define | ID_VIEW_APPLOOK_2007_1 32819
#define | ID_VIEW_APPLOOK_2007_2 32820
#define | ID_VIEW_APPLOOK_2007_3 32821
#define | ID_VIEW_APPLOOK_SCENIC 32822
#define | ID_VIEW_GRID 32769
#define | ID_VIEW_PAPERCOLOR 32781
#define | ID_VIEW_SHOWOBJECTS 32784
#define | ID_WINDOW_MANAGER 32813
#define | ID_WINDOW_WINDOWS 32812
#define | ID_WINDOWS_MENU 32793
#define | IDB_LINEWEIGHT 134
#define | IDB_RIBBON_FILELARGE 112
#define | IDB_RIBBON_FILESMALL 113
#define | IDB_RIBBON_FORMATLARGE 132
#define | IDB_RIBBON_FORMATSMALL 133
#define | IDB_RIBBON_HOMELARGE 126
#define | IDB_RIBBON_HOMESMALL 127
#define | IDB_RIBBON_ICONS 117
#define | IDB_RIBBON_MAIN 110
#define | IDB_RIBBON_VIEWLARGE 129
#define | IDB_RIBBON_VIEWSMALL 128
#define | IDB_STATUSBAR_1 130
#define | IDB_STATUSBAR_2 131
#define | IDB_STYLES 136
#define | IDC_APPNAME 120
#define | IDC_AUTHOR 105
#define | IDC_COMMENTS 107
#define | IDC_CREATEDATE 115
#define | IDC_EDITTIME 113
#define | IDC_KEYWORDS 106
#define | IDC_LASTPRINT 114
#define | IDC_LASTSAVE 116
#define | IDC_NOFILL 103
#define | IDC_NUMCHARS 119
#define | IDC_NUMPAGES 117
#define | IDC_NUMWORDS 118
#define | IDC_PENCIL 102
#define | IDC_REVNUM 112
#define | IDC_SAVEDBY 111
#define | IDC_SECURITY 122
#define | IDC_SPIN1 104
#define | IDC_SUBJECT 109
#define | IDC_TEMPLATE 110
#define | IDC_THUMBNAIL 123
#define | IDC_TITLE 108
#define | IDC_WEIGHT 102
#define | IDD_ABOUTBOX 999
#define | IDD_LINEWEIGHT 135
#define | IDD_PROP_RECT 101
#define | IDD_STAT_PAGE 105
#define | IDD_SUMM_PAGE 104
#define | IDP_BUSY 100
#define | IDP_FAILED_TO_CREATE 102
#define | IDP_OLE_INIT_FAILED 101
#define | IDR_DRAWCLTYPE 3
#define | IDR_DRAWCLTYPE_CNTR_IP 6
#define | IDR_MAINFRAME 2
#define | IDR_POPUP_DROP_MDITABS 120
#define | IDR_POPUP_MDITABS 119
#define | IDR_PROPERTIES 123
#define | IDR_PROPERTY 123
#define | IDR_THEME_MENU 116
#define | IDR_WINDOWS_MENU 118

Define Documentation

#define ID_CANCEL_EDIT 32768

Definition at line 59 of file resource.h.

#define ID_DRAW_ELLIPSE 32774

Definition at line 65 of file resource.h.

#define ID_DRAW_LINE 32771

Definition at line 62 of file resource.h.

#define ID_DRAW_POLYGON 32782

Definition at line 73 of file resource.h.

#define ID_DRAW_RECT 32772

Definition at line 63 of file resource.h.

#define ID_DRAW_ROUNDRECT 32773

Definition at line 64 of file resource.h.

#define ID_DRAW_SELECT 32770

Definition at line 61 of file resource.h.

#define ID_EXPAND 32829

Definition at line 90 of file resource.h.

#define ID_FILE_SUMMARYINFO 32792

Definition at line 75 of file resource.h.

#define ID_MDI_CANCEL 32828

Definition at line 89 of file resource.h.

#define ID_MDI_MOVE_TO_NEXT_GROUP 32826

Definition at line 87 of file resource.h.

#define ID_MDI_MOVE_TO_PREV_GROUP 32827

Definition at line 88 of file resource.h.

#define ID_MDI_NEW_HORZ_TAB_GROUP 32824

Definition at line 85 of file resource.h.

#define ID_MDI_NEW_VERT_GROUP 32825

Definition at line 86 of file resource.h.

#define ID_NEWWINDOW 32823

Definition at line 84 of file resource.h.

#define ID_OBJECT_FILLCOLOR 32776

Definition at line 67 of file resource.h.

#define ID_OBJECT_LINECOLOR 32775

Definition at line 66 of file resource.h.

#define ID_OBJECT_LINEWEIGHT 32835

Definition at line 96 of file resource.h.

#define ID_OBJECT_LINEWEIGHT_MORE 32836

Definition at line 97 of file resource.h.

#define ID_OBJECT_MOVEBACK 32780

Definition at line 71 of file resource.h.

#define ID_OBJECT_MOVEFORWARD 32779

Definition at line 70 of file resource.h.

#define ID_OBJECT_MOVETOBACK 32778

Definition at line 69 of file resource.h.

#define ID_OBJECT_MOVETOFRONT 32777

Definition at line 68 of file resource.h.

#define ID_OBJECT_NOFILL 32834

Definition at line 95 of file resource.h.

#define ID_OBJECT_NOLINE 32839

Definition at line 99 of file resource.h.

#define ID_OBJECT_PROPERTIES 32838

Definition at line 98 of file resource.h.

#define ID_OBJECT_STYLES 32840

Definition at line 100 of file resource.h.

#define ID_POPUP_MENU 103

Definition at line 15 of file resource.h.

#define ID_SORTINGGROUP 32830

Definition at line 91 of file resource.h.

#define ID_STATUSBAR_PANE_OBJECTCOUNT 32831

Definition at line 92 of file resource.h.

#define ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT 32832

Definition at line 93 of file resource.h.

#define ID_TOOLS_OPTIONS 32833

Definition at line 94 of file resource.h.

#define ID_VIEW_APPLOOK_2007 32818

Definition at line 79 of file resource.h.

#define ID_VIEW_APPLOOK_2007_1 32819

Definition at line 80 of file resource.h.

#define ID_VIEW_APPLOOK_2007_2 32820

Definition at line 81 of file resource.h.

#define ID_VIEW_APPLOOK_2007_3 32821

Definition at line 82 of file resource.h.

#define ID_VIEW_APPLOOK_SCENIC 32822

Definition at line 83 of file resource.h.

#define ID_VIEW_GRID 32769

Definition at line 60 of file resource.h.

#define ID_VIEW_PAPERCOLOR 32781

Definition at line 72 of file resource.h.

#define ID_VIEW_SHOWOBJECTS 32784

Definition at line 74 of file resource.h.

#define ID_WINDOW_MANAGER 32813

Definition at line 78 of file resource.h.

#define ID_WINDOW_WINDOWS 32812

Definition at line 77 of file resource.h.

#define ID_WINDOWS_MENU 32793

Definition at line 76 of file resource.h.

#define IDB_LINEWEIGHT 134

Definition at line 55 of file resource.h.

#define IDB_RIBBON_FILELARGE 112

Definition at line 28 of file resource.h.

#define IDB_RIBBON_FILESMALL 113

Definition at line 30 of file resource.h.

#define IDB_RIBBON_FORMATLARGE 132

Definition at line 53 of file resource.h.

#define IDB_RIBBON_FORMATSMALL 133

Definition at line 54 of file resource.h.

#define IDB_RIBBON_HOMELARGE 126

Definition at line 47 of file resource.h.

#define IDB_RIBBON_HOMESMALL 127

Definition at line 48 of file resource.h.

#define IDB_RIBBON_ICONS 117

Definition at line 36 of file resource.h.

#define IDB_RIBBON_MAIN 110

Definition at line 25 of file resource.h.

#define IDB_RIBBON_VIEWLARGE 129

Definition at line 50 of file resource.h.

#define IDB_RIBBON_VIEWSMALL 128

Definition at line 49 of file resource.h.

#define IDB_STATUSBAR_1 130

Definition at line 51 of file resource.h.

#define IDB_STATUSBAR_2 131

Definition at line 52 of file resource.h.

#define IDB_STYLES 136

Definition at line 57 of file resource.h.

#define IDC_APPNAME 120

Definition at line 41 of file resource.h.

#define IDC_AUTHOR 105

Definition at line 18 of file resource.h.

#define IDC_COMMENTS 107

Definition at line 21 of file resource.h.

#define IDC_CREATEDATE 115

Definition at line 32 of file resource.h.

#define IDC_EDITTIME 113

Definition at line 29 of file resource.h.

#define IDC_KEYWORDS 106

Definition at line 20 of file resource.h.

#define IDC_LASTPRINT 114

Definition at line 31 of file resource.h.

#define IDC_LASTSAVE 116

Definition at line 33 of file resource.h.

#define IDC_NOFILL 103

Definition at line 14 of file resource.h.

#define IDC_NUMCHARS 119

Definition at line 39 of file resource.h.

#define IDC_NUMPAGES 117

Definition at line 35 of file resource.h.

#define IDC_NUMWORDS 118

Definition at line 37 of file resource.h.

#define IDC_PENCIL 102

Definition at line 13 of file resource.h.

#define IDC_REVNUM 112

Definition at line 27 of file resource.h.

#define IDC_SAVEDBY 111

Definition at line 26 of file resource.h.

#define IDC_SECURITY 122

Definition at line 43 of file resource.h.

#define IDC_SPIN1 104

Definition at line 16 of file resource.h.

#define IDC_SUBJECT 109

Definition at line 23 of file resource.h.

#define IDC_TEMPLATE 110

Definition at line 24 of file resource.h.

#define IDC_THUMBNAIL 123

Definition at line 44 of file resource.h.

#define IDC_TITLE 108

Definition at line 22 of file resource.h.

#define IDC_WEIGHT 102

Definition at line 12 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 58 of file resource.h.

#define IDD_LINEWEIGHT 135

Definition at line 56 of file resource.h.

#define IDD_PROP_RECT 101

Definition at line 10 of file resource.h.

#define IDD_STAT_PAGE 105

Definition at line 19 of file resource.h.

#define IDD_SUMM_PAGE 104

Definition at line 17 of file resource.h.

#define IDP_BUSY 100

Definition at line 8 of file resource.h.

#define IDP_FAILED_TO_CREATE 102

Definition at line 11 of file resource.h.

#define IDP_OLE_INIT_FAILED 101

Definition at line 9 of file resource.h.

#define IDR_DRAWCLTYPE 3

Definition at line 6 of file resource.h.

#define IDR_DRAWCLTYPE_CNTR_IP 6

Definition at line 7 of file resource.h.

#define IDR_MAINFRAME 2

Definition at line 5 of file resource.h.

#define IDR_POPUP_DROP_MDITABS 120

Definition at line 42 of file resource.h.

#define IDR_POPUP_MDITABS 119

Definition at line 40 of file resource.h.

#define IDR_PROPERTIES 123

Definition at line 46 of file resource.h.

#define IDR_PROPERTY 123

Definition at line 45 of file resource.h.

#define IDR_THEME_MENU 116

Definition at line 34 of file resource.h.

#define IDR_WINDOWS_MENU 118

Definition at line 38 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/RibbonListButton.cpp File Reference

  • vc2008fp
  • DrawClient
Variables

RibbonListButton.cpp File Reference

#include "stdafx.h"
#include "RibbonListButton.h"

Go to the source code of this file.

Variables

const int | nBorderMarginX = 1
const int | nBorderMarginY = 3
const int | nCheckMargin = 2
const int | nImageMargin = 4
const int | nTextOffsetX = 11
const int | nTextOffsetY = 2

Variable Documentation

const int nBorderMarginX = 1

Definition at line 26 of file RibbonListButton.cpp.

const int nBorderMarginY = 3

Definition at line 27 of file RibbonListButton.cpp.

const int nCheckMargin = 2

Definition at line 22 of file RibbonListButton.cpp.

const int nImageMargin = 4

Definition at line 21 of file RibbonListButton.cpp.

const int nTextOffsetX = 11

Definition at line 23 of file RibbonListButton.cpp.

const int nTextOffsetY = 2

Definition at line 24 of file RibbonListButton.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/RibbonListButton.h File Reference

  • vc2008fp
  • DrawClient
Classes

RibbonListButton.h File Reference

Go to the source code of this file.

Classes

class CRibbonListButton
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/splitfrm.cpp File Reference

  • vc2008fp
  • DrawClient

splitfrm.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "splitfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/splitfrm.h File Reference

  • vc2008fp
  • DrawClient
Classes

splitfrm.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CSplitFrame
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/statpage.cpp File Reference

  • vc2008fp
  • DrawClient

statpage.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "statpage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/statpage.h File Reference

  • vc2008fp
  • DrawClient
Classes

statpage.h File Reference

Go to the source code of this file.

Classes

class CStatPage
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/stdafx.cpp File Reference

  • vc2008fp
  • DrawClient

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/stdafx.h File Reference

  • vc2008fp
  • DrawClient
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxrich.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 31 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 28 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 23 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summinfo.cpp File Reference

  • vc2008fp
  • DrawClient
Defines | Variables

summinfo.cpp File Reference

#include "stdafx.h"
#include <winnls.h>
#include "DrawClient.h"
#include <objbase.h>
#include <initguid.h>
#include "summinfo.h"

Go to the source code of this file.

Defines

#define | tcstocs(lpctStr) (LPCSTR)(lpctStr)

Variables

const OLECHAR | szSummInfo [] = OLESTR("\005SummaryInformation")

Define Documentation

#define tcstocs ( lpctStr ) (LPCSTR)(lpctStr)

Definition at line 47 of file summinfo.cpp.

Variable Documentation

const OLECHAR szSummInfo[] = OLESTR("\005SummaryInformation")

Definition at line 37 of file summinfo.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summinfo.h File Reference

  • vc2008fp
  • DrawClient
Classes | Functions | Variables

summinfo.h File Reference

#include "propset.h"
#include <objidl.h>

Go to the source code of this file.

Classes

class | CSummInfo

Functions

DEFINE_GUID (FMTID_SummaryInformation, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9)

Variables

const OLECHAR | szSummInfo []

Function Documentation

DEFINE_GUID | ( | FMTID_SummaryInformation | ,
 |  | 0xF29F85E0 | ,
 |  | 0x4FF9 | ,
 |  | 0x1068 | ,
 |  | 0xAB | ,
 |  | 0x91 | ,
 |  | 0x08 | ,
 |  | 0x00 | ,
 |  | 0x2B | ,
 |  | 0x27 | ,
 |  | 0xB3 | ,
 |  | 0xD9 |
 | ) |  |

Variable Documentation

const OLECHAR szSummInfo[]

Definition at line 35 of file summinfo.cpp.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summpage.cpp File Reference

  • vc2008fp
  • DrawClient

summpage.cpp File Reference

#include "stdafx.h"
#include "DrawClient.h"
#include "summpage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summpage.h File Reference

  • vc2008fp
  • DrawClient
Classes

summpage.h File Reference

Go to the source code of this file.

Classes

class CSummPage
Generated on Sat Nov 23 2024 17:00:45 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/targetver.h File Reference

  • vc2008fp
  • DrawClient
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 19 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/dllmain.cpp File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Classes | Variables

dllmain.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "DrawClientHandlers_i.h"
#include "dllmain.h"

Go to the source code of this file.

Classes

class CDrawClientHandlersApp

Variables

CDrawClientHandlersModule _AtlModule
CDrawClientHandlersApp theApp

Variable Documentation

CDrawClientHandlersModule _AtlModule

Definition at line 8 of file dllmain.cpp.

CDrawClientHandlersApp theApp

Definition at line 24 of file dllmain.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/dllmain.h File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Classes | Variables

dllmain.h File Reference

Go to the source code of this file.

Classes

class | CDrawClientHandlersModule

Variables

class CDrawClientHandlersModule | _AtlModule

Variable Documentation

class CDrawClientHandlersModule _AtlModule

Definition at line 23 of file TCProps.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.cpp File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Functions

DrawClientHandlers.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "DrawClientHandlers_i.h"
#include "dllmain.h"

Go to the source code of this file.

Functions

STDAPI | DllCanUnloadNow (void)
STDAPI | DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
STDAPI | DllInstall (BOOL bInstall, LPCWSTR pszCmdLine)
STDAPI | DllRegisterServer (void)
STDAPI | DllUnregisterServer (void)

Function Documentation

STDAPI DllCanUnloadNow ( void )

Definition at line 10 of file DrawClientHandlers.cpp.

{
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE;
}

STDAPI DllGetClassObject | ( | REFCLSID | rclsid,
 |  | REFIID | riid,
 |  | LPVOID * | ppv
 | ) |  |

Definition at line 18 of file DrawClientHandlers.cpp.

{
    return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
}

STDAPI DllInstall | ( | BOOL | bInstall,
 |  | LPCWSTR | pszCmdLine
 | ) |  |

Definition at line 42 of file DrawClientHandlers.cpp.

{
    HRESULT hr = E_FAIL;
    static const wchar_t szUserSwitch[] = _T("user");

    if (pszCmdLine != NULL)
    {
      if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)
      {
        AtlSetPerUserRegistration(true);
      }
    }

    if (bInstall)
    {
      hr = DllRegisterServer();
      if (FAILED(hr))
      {
        DllUnregisterServer();
      }
    }
    else
    {
      hr = DllUnregisterServer();
    }

    return hr;
}

STDAPI DllRegisterServer ( void )

Definition at line 25 of file DrawClientHandlers.cpp.

{
    // registers object, typelib and all interfaces in typelib
    HRESULT hr = _AtlModule.DllRegisterServer();
  return hr;
}

STDAPI DllUnregisterServer ( void )

Definition at line 34 of file DrawClientHandlers.cpp.

{
  HRESULT hr = _AtlModule.DllUnregisterServer();
  return hr;
}

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.idl File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Classes | Namespaces | Functions

DrawClientHandlers.idl File Reference

Go to the source code of this file.

Classes

class | DrawClientHandlersLib::DrawCliLiveIconsHandler
class | DrawClientHandlersLib::DrawCliSearchHandler
interface | IDrawCliLiveIconsHandler
interface | IDrawCliSearchHandler

Namespaces

namespace | DrawClientHandlersLib

Functions

DrawClientHandlersLib::importlib ("stdole2.tlb")
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliLiveIconsHandler.cpp File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawCliLiveIconsHandler.cpp File Reference

#include "stdafx.h"
#include "DrawCliLiveIconsHandler.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliLiveIconsHandler.h File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Classes

DrawCliLiveIconsHandler.h File Reference

#include "resource.h"
#include <atlhandler.h>
#include <atlhandlerimpl.h>
#include "..\drawdoc.h"
#include "DrawClientHandlers_i.h"

Go to the source code of this file.

Classes

class CDrawCliLiveIconsHandler
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliSearchHandler.cpp File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawCliSearchHandler.cpp File Reference

#include "stdafx.h"
#include "DrawCliSearchHandler.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliSearchHandler.h File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Classes

DrawCliSearchHandler.h File Reference

#include "resource.h"
#include <atlhandler.h>
#include <atlhandlerimpl.h>
#include "..\drawdoc.h"
#include "DrawClientHandlers_i.h"

Go to the source code of this file.

Classes

class CDrawCliSearchHandler
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/resource.h File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDR_DRAWCLIENTHANDLERS 101
#define | IDR_DRAWCLILIVEICONSHANDLER 103
#define | IDR_DRAWCLISEARCHHANDLER 105
#define | IDS_PROJNAME 100

Define Documentation

#define IDR_DRAWCLIENTHANDLERS 101

Definition at line 6 of file resource.h.

#define IDR_DRAWCLILIVEICONSHANDLER 103

Definition at line 7 of file resource.h.

#define IDR_DRAWCLISEARCHHANDLER 105

Definition at line 8 of file resource.h.

#define IDS_PROJNAME 100

Definition at line 5 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/stdafx.cpp File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/stdafx.h File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxole.h>
#include <afxdisp.h>
#include "resource.h"
#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>
#include "targetver.h"
#include "resource.h"

Go to the source code of this file.

Defines

#define | _ATL_APARTMENT_THREADED
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | _ATL_NO_AUTOMATIC_NAMESPACE
#define | SHARED_HANDLERS

Define Documentation

#define _ATL_APARTMENT_THREADED

Definition at line 13 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 16 of file stdafx.h.

#define _ATL_NO_AUTOMATIC_NAMESPACE

Definition at line 14 of file stdafx.h.

#define SHARED_HANDLERS

Definition at line 18 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/targetver.h File Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers
Defines

targetver.h File Reference

Go to the source code of this file.

Defines

#define | _WIN32_IE 0x0700
#define | _WIN32_WINDOWS 0x0410
#define | _WIN32_WINNT 0x0600
#define | WINVER 0x0600

Define Documentation

#define _WIN32_IE 0x0700

Definition at line 24 of file targetver.h.

#define _WIN32_WINDOWS 0x0410

Definition at line 20 of file targetver.h.

#define _WIN32_WINNT 0x0600

Definition at line 16 of file targetver.h.

#define WINVER 0x0600

Definition at line 12 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenu.cpp File Reference

  • vc2008fp
  • DynamicMenu
Classes | Variables

DynamicMenu.cpp File Reference

#include "stdafx.h"
#include "DynamicMenu.h"
#include "MainFrm.h"
#include "DynamicMenuDoc.h"
#include "DynamicMenuView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CDynamicMenuApp theApp

Variable Documentation

CDynamicMenuApp theApp

Definition at line 48 of file DynamicMenu.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenu.h File Reference

  • vc2008fp
  • DynamicMenu
Classes | Variables

DynamicMenu.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CDynamicMenuApp

Variables

CDynamicMenuApp theApp

Variable Documentation

CDynamicMenuApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuDoc.cpp File Reference

  • vc2008fp
  • DynamicMenu

DynamicMenuDoc.cpp File Reference

#include "stdafx.h"
#include "DynamicMenu.h"
#include "DynamicMenuDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuDoc.h File Reference

  • vc2008fp
  • DynamicMenu
Classes

DynamicMenuDoc.h File Reference

Go to the source code of this file.

Classes

class CDynamicMenuDoc
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuView.cpp File Reference

  • vc2008fp
  • DynamicMenu

DynamicMenuView.cpp File Reference

#include "stdafx.h"
#include "DynamicMenu.h"
#include "DynamicMenuDoc.h"
#include "DynamicMenuView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuView.h File Reference

  • vc2008fp
  • DynamicMenu
Classes

DynamicMenuView.h File Reference

Go to the source code of this file.

Classes

class CDynamicMenuView
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MainFrm.cpp File Reference

  • vc2008fp
  • DynamicMenu

MainFrm.cpp File Reference

#include "stdafx.h"
#include "DynamicMenu.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MainFrm.h File Reference

  • vc2008fp
  • DynamicMenu
Classes | Defines

MainFrm.h File Reference

#include "MyMenuBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 19 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MyMenuBar.cpp File Reference

  • vc2008fp
  • DynamicMenu

MyMenuBar.cpp File Reference

#include "stdafx.h"
#include "DynamicMenu.h"
#include "MyMenuBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MyMenuBar.h File Reference

  • vc2008fp
  • DynamicMenu
Classes

MyMenuBar.h File Reference

Go to the source code of this file.

Classes

class CMyMenuBar
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/resource.h File Reference

  • vc2008fp
  • DynamicMenu
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_DYNAMIC_COMMANDS 32822
#define | ID_DYNAMIC_ITEM_1 32823
#define | ID_DYNAMIC_ITEM_2 32824
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | IDB_MENU_LOGO 151
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_DYNAMIC_MENU 152
#define | IDR_DYNAMITYPE 129
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDS_EDIT_MYITEM_1 57645
#define | IDS_EDIT_MYITEM_2 57646
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_DYNAMIC_COMMANDS 32822

Definition at line 16 of file resource.h.

#define ID_DYNAMIC_ITEM_1 32823

Definition at line 17 of file resource.h.

#define ID_DYNAMIC_ITEM_2 32824

Definition at line 18 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 14 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 15 of file resource.h.

#define IDB_MENU_LOGO 151

Definition at line 11 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 13 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 9 of file resource.h.

#define IDR_DYNAMIC_MENU 152

Definition at line 12 of file resource.h.

#define IDR_DYNAMITYPE 129

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 10 of file resource.h.

#define IDS_EDIT_MYITEM_1 57645

Definition at line 19 of file resource.h.

#define IDS_EDIT_MYITEM_2 57646

Definition at line 20 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/StdAfx.cpp File Reference

  • vc2008fp
  • DynamicMenu

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/StdAfx.h File Reference

  • vc2008fp
  • DynamicMenu
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/targetver.h File Reference

  • vc2008fp
  • DynamicMenu
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/Explorer.cpp File Reference

  • vc2008fp
  • Explorer
Classes | Variables

Explorer.cpp File Reference

#include "stdafx.h"
#include "Explorer.h"
#include "MainFrm.h"
#include "ExplorerDoc.h"
#include "ExplorerView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CExplorerApp theApp

Variable Documentation

CExplorerApp theApp

Definition at line 48 of file Explorer.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/Explorer.h File Reference

  • vc2008fp
  • Explorer
Classes | Variables

Explorer.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CExplorerApp

Variables

CExplorerApp theApp

Variable Documentation

CExplorerApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerDoc.cpp File Reference

  • vc2008fp
  • Explorer

ExplorerDoc.cpp File Reference

#include "stdafx.h"
#include "Explorer.h"
#include "ExplorerDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerDoc.h File Reference

  • vc2008fp
  • Explorer
Classes

ExplorerDoc.h File Reference

Go to the source code of this file.

Classes

class CExplorerDoc
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerView.cpp File Reference

  • vc2008fp
  • Explorer

ExplorerView.cpp File Reference

#include "stdafx.h"
#include "Explorer.h"
#include "ExplorerDoc.h"
#include "ExplorerView.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerView.h File Reference

  • vc2008fp
  • Explorer
Classes

ExplorerView.h File Reference

Go to the source code of this file.

Classes

class CExplorerView
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/FolderBar.cpp File Reference

  • vc2008fp
  • Explorer
Defines | Variables

FolderBar.cpp File Reference

#include "stdafx.h"
#include "explorer.h"
#include "FolderBar.h"

Go to the source code of this file.

Defines

#define | SHCNF_ACCEPT_INTERRUPTS 0x0001
#define | SHCNF_ACCEPT_NON_INTERRUPTS 0x0002

Variables

const int | idTree = 1
UINT | UWM_NOTIFY_RECYCLE_BIN = ::RegisterWindowMessage(_T("UWM_NOTIFY_RECYCLE_BIN"))

Define Documentation

#define SHCNF_ACCEPT_INTERRUPTS 0x0001

Definition at line 23 of file FolderBar.cpp.

#define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002

Definition at line 24 of file FolderBar.cpp.

Variable Documentation

const int idTree = 1

Definition at line 21 of file FolderBar.cpp.

UINT UWM_NOTIFY_RECYCLE_BIN = ::RegisterWindowMessage(_T("UWM_NOTIFY_RECYCLE_BIN"))

Definition at line 26 of file FolderBar.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/FolderBar.h File Reference

  • vc2008fp
  • Explorer
Classes

FolderBar.h File Reference

Go to the source code of this file.

Classes

class CFolderBar
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/MainFrm.cpp File Reference

  • vc2008fp
  • Explorer

MainFrm.cpp File Reference

#include "stdafx.h"
#include "Explorer.h"
#include "MainFrm.h"
#include "ExplorerDoc.h"
#include "ExplorerView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/MainFrm.h File Reference

  • vc2008fp
  • Explorer
Classes | Defines

MainFrm.h File Reference

#include "FolderBar.h"

Go to the source code of this file.

Classes

class | CAddressBox
class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 15 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/Resource.h File Reference

  • vc2008fp
  • Explorer
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_COMMAND_HISTORY 32829
#define | ID_COPY_TO 32827
#define | ID_FOLDER_UP 32823
#define | ID_GO_BACK 32824
#define | ID_GO_FORWARD 32825
#define | ID_MOVE_TO 32826
#define | ID_TOOLS_ENTRY 32805
#define | ID_USER_TOOL1 32806
#define | ID_USER_TOOL10 32815
#define | ID_USER_TOOL2 32807
#define | ID_USER_TOOL3 32808
#define | ID_USER_TOOL4 32809
#define | ID_USER_TOOL5 32810
#define | ID_USER_TOOL6 32811
#define | ID_USER_TOOL7 32812
#define | ID_USER_TOOL8 32813
#define | ID_USER_TOOL9 32814
#define | ID_VIEW_ARRANGE 127
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_FOLDERS 32822
#define | ID_VIEW_REFRESH 32830
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_VIEWS 32828
#define | IDB_MENU16 156
#define | IDB_MENU256 155
#define | IDB_TOOLBAR256 151
#define | IDB_TOOLBARCOLD256 152
#define | IDC_COMPANY_URL 1041
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_EXPTYPE 129
#define | IDR_HISTORY_POPUP 154
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_VIEWS_POPUP 155
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_COMMAND_HISTORY 32829

Definition at line 40 of file Resource.h.

#define ID_COPY_TO 32827

Definition at line 38 of file Resource.h.

#define ID_FOLDER_UP 32823

Definition at line 34 of file Resource.h.

#define ID_GO_BACK 32824

Definition at line 35 of file Resource.h.

#define ID_GO_FORWARD 32825

Definition at line 36 of file Resource.h.

#define ID_MOVE_TO 32826

Definition at line 37 of file Resource.h.

#define ID_TOOLS_ENTRY 32805

Definition at line 22 of file Resource.h.

#define ID_USER_TOOL1 32806

Definition at line 23 of file Resource.h.

#define ID_USER_TOOL10 32815

Definition at line 32 of file Resource.h.

#define ID_USER_TOOL2 32807

Definition at line 24 of file Resource.h.

#define ID_USER_TOOL3 32808

Definition at line 25 of file Resource.h.

#define ID_USER_TOOL4 32809

Definition at line 26 of file Resource.h.

#define ID_USER_TOOL5 32810

Definition at line 27 of file Resource.h.

#define ID_USER_TOOL6 32811

Definition at line 28 of file Resource.h.

#define ID_USER_TOOL7 32812

Definition at line 29 of file Resource.h.

#define ID_USER_TOOL8 32813

Definition at line 30 of file Resource.h.

#define ID_USER_TOOL9 32814

Definition at line 31 of file Resource.h.

#define ID_VIEW_ARRANGE 127

Definition at line 7 of file Resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 20 of file Resource.h.

#define ID_VIEW_FOLDERS 32822

Definition at line 33 of file Resource.h.

#define ID_VIEW_REFRESH 32830

Definition at line 41 of file Resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 21 of file Resource.h.

#define ID_VIEW_VIEWS 32828

Definition at line 39 of file Resource.h.

#define IDB_MENU16 156

Definition at line 17 of file Resource.h.

#define IDB_MENU256 155

Definition at line 16 of file Resource.h.

#define IDB_TOOLBAR256 151

Definition at line 12 of file Resource.h.

#define IDB_TOOLBARCOLD256 152

Definition at line 13 of file Resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 19 of file Resource.h.

#define IDD_ABOUTBOX 999

Definition at line 18 of file Resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file Resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 10 of file Resource.h.

#define IDR_EXPTYPE 129

Definition at line 9 of file Resource.h.

#define IDR_HISTORY_POPUP 154

Definition at line 14 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file Resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 11 of file Resource.h.

#define IDR_VIEWS_POPUP 155

Definition at line 15 of file Resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/StdAfx.cpp File Reference

  • vc2008fp
  • Explorer

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/StdAfx.h File Reference

  • vc2008fp
  • Explorer
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/targetver.h File Reference

  • vc2008fp
  • Explorer
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/ExplorerBar.cpp File Reference

  • vc2008fp
  • IEDemo
Variables

ExplorerBar.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "ExplorerBar.h"
#include "IEDemoDoc.h"
#include "IEDemoView.h"

Go to the source code of this file.

Variables

const int idTree = 1

Variable Documentation

const int idTree = 1

Definition at line 23 of file ExplorerBar.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/ExplorerBar.h File Reference

  • vc2008fp
  • IEDemo
Classes

ExplorerBar.h File Reference

Go to the source code of this file.

Classes

class CExplorerBar
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/FavoritesManager.cpp File Reference

  • vc2008fp
  • IEDemo

FavoritesManager.cpp File Reference

#include "stdafx.h"
#include <wininet.h>
#include "IEDemo.h"
#include "FavoritesManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/FavoritesManager.h File Reference

  • vc2008fp
  • IEDemo
Classes | Defines

FavoritesManager.h File Reference

Go to the source code of this file.

Classes

class | CFavorit
class | CFavoritesManager

Defines

#define | FIRST_FAVORITE_COMMAND 0xe00
#define | LAST_FAVORITE_COMMAND 0xfff

Define Documentation

#define FIRST_FAVORITE_COMMAND 0xe00

Definition at line 13 of file FavoritesManager.h.

#define LAST_FAVORITE_COMMAND 0xfff

Definition at line 14 of file FavoritesManager.h.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/HistoryObj.cpp File Reference

  • vc2008fp
  • IEDemo

HistoryObj.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "HistoryObj.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/HistoryObj.h File Reference

  • vc2008fp
  • IEDemo
Classes

HistoryObj.h File Reference

Go to the source code of this file.

Classes

class CHistoryObj
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemo.cpp File Reference

  • vc2008fp
  • IEDemo
Classes | Variables

IEDemo.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "MainFrm.h"
#include "IEDemoDoc.h"
#include "IEDemoView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CIEDemoApp theApp

Variable Documentation

CIEDemoApp theApp

Definition at line 47 of file IEDemo.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemo.h File Reference

  • vc2008fp
  • IEDemo
Classes | Variables

IEDemo.h File Reference

#include "resource.h"
#include "FavoritesManager.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CIEDemoApp

Variables

CIEDemoApp theApp

Variable Documentation

CIEDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoDoc.cpp File Reference

  • vc2008fp
  • IEDemo

IEDemoDoc.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "IEDemoDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoDoc.h File Reference

  • vc2008fp
  • IEDemo
Classes | Defines | Typedefs

IEDemoDoc.h File Reference

#include "HistoryObj.h"

Go to the source code of this file.

Classes

class | CIEDemoDoc

Defines

#define | FIRST_HISTORY_COMMAND 0x1000
#define | HISTORY_LEN 10

Typedefs

typedef CList< CHistoryObj
*, CHistoryObj * > 		_T_HistotyList

Define Documentation

#define FIRST_HISTORY_COMMAND 0x1000

Definition at line 13 of file IEDemoDoc.h.

#define HISTORY_LEN 10

Definition at line 14 of file IEDemoDoc.h.

Typedef Documentation

typedef CList<CHistoryObj*, CHistoryObj*> _T_HistotyList

Definition at line 18 of file IEDemoDoc.h.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoView.cpp File Reference

  • vc2008fp
  • IEDemo

IEDemoView.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "IEDemoDoc.h"
#include "IEDemoView.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoView.h File Reference

  • vc2008fp
  • IEDemo
Classes

IEDemoView.h File Reference

Go to the source code of this file.

Classes

class CIEDemoView
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinkButton.cpp File Reference

  • vc2008fp
  • IEDemo

LinkButton.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "LinkButton.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinkButton.h File Reference

  • vc2008fp
  • IEDemo
Classes

LinkButton.h File Reference

Go to the source code of this file.

Classes

class CLinkButton
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinksBar.cpp File Reference

  • vc2008fp
  • IEDemo

LinksBar.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "LinksBar.h"
#include "LinkButton.h"
#include "IEDemoDoc.h"
#include "IEDemoView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinksBar.h File Reference

  • vc2008fp
  • IEDemo
Classes

LinksBar.h File Reference

Go to the source code of this file.

Classes

class CLinksBar
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/MainFrm.cpp File Reference

  • vc2008fp
  • IEDemo
Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "IEDemo.h"
#include "IEDemoDoc.h"
#include "IEDemoView.h"
#include "MainFrm.h"
#include "LinkButton.h"

Go to the source code of this file.

Variables

const int | nStatusIcon = 0
const int | nStatusInfo = 1
const int | nStatusProgress = 2

Variable Documentation

const int nStatusIcon = 0

Definition at line 65 of file MainFrm.cpp.

const int nStatusInfo = 1

Definition at line 66 of file MainFrm.cpp.

const int nStatusProgress = 2

Definition at line 67 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/MainFrm.h File Reference

  • vc2008fp
  • IEDemo
Classes | Defines

MainFrm.h File Reference

#include "LinksBar.h"
#include "ExplorerBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 13 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/Resource.h File Reference

  • vc2008fp
  • IEDemo
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_FAVORITES_DROPDOWN 32792
#define | ID_FAVORITS_DUMMY 32819
#define | ID_FONT_DROPDOWN 32793
#define | ID_GO_BACK 32787
#define | ID_GO_BEST_OF_THE_WEB 32791
#define | ID_GO_FORWARD 32788
#define | ID_GO_SEARCH_THE_WEB 32790
#define | ID_GO_START_PAGE 32789
#define | ID_HELP_ONLINE_SUPPORT 32800
#define | ID_HELP_WEB_TUTORIAL 32798
#define | ID_HISTORY_DUMMY 32820
#define | ID_INDICATOR_ICON 102
#define | ID_INDICATOR_PROGRESS 103
#define | ID_LINK_1 32781
#define | ID_LINK_MICROSOFT 32827
#define | ID_LINK_MSDN 32826
#define | ID_LINK_VISUALCPP 32828
#define | ID_VIEW_ADDRESS_BAR 32722
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_EXPLORERBAR 32825
#define | ID_VIEW_FONTS_LARGE 32783
#define | ID_VIEW_FONTS_LARGEST 32782
#define | ID_VIEW_FONTS_MEDIUM 32784
#define | ID_VIEW_FONTS_SMALL 32785
#define | ID_VIEW_FONTS_SMALLEST 32786
#define | ID_VIEW_LINKS_BAR 32821
#define | ID_VIEW_REFRESH 32779
#define | ID_VIEW_STOP 32778
#define | ID_VIEW_TEXTLABELS 32823
#define | IDB_COLDTOOLBAR 261
#define | IDB_HOTTOOLBAR 262
#define | IDB_IMAGE_COLLECTION 140
#define | IDB_IMAGE_COLLECTION_SMALL 263
#define | IDB_MENU_IMAGES 134
#define | IDB_MENU_IMAGES_16 264
#define | IDB_STATUS_ANIMATION 142
#define | IDB_STATUS_READY 141
#define | IDC_MAIL 1000
#define | IDC_TREE1 1003
#define | IDC_URL 1001
#define | IDC_VERSION 1002
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDP_SOCKETS_INIT_FAILED 104
#define | IDR_FAVORITES_POPUP 133
#define | IDR_FONT_POPUP 132
#define | IDR_HISTORY_POPUP 134
#define | IDR_IEDTYPE 129
#define | IDR_MAINFRAME 128
#define | IDR_MAINFRAME2 129
#define | IDR_MFCAVI 132
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_TOOLBAR_IMAGE_COLLECTION 138
#define | IDS_ADDRESS 757
#define | IDS_BACK 748
#define | IDS_BEST_OF_THE_WEB 745
#define | IDS_FAVORITES 754
#define | IDS_FILETYPES 1201
#define | IDS_FONT 756
#define | IDS_FORWARD 749
#define | IDS_FREE_STUFF 738
#define | IDS_HOME 752
#define | IDS_INTERNET_START_PAGE 743
#define | IDS_LINKS 758
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_MICROSOFT_HOME_PAGE 747
#define | IDS_ONLINE_SUPPORT 737
#define | IDS_PRINT 755
#define | IDS_REFRESH 751
#define | IDS_SEARCH 753
#define | IDS_STOP 750
#define | IDS_WEB_TUTORIAL 736

Define Documentation

#define ID_FAVORITES_DROPDOWN 32792

Definition at line 65 of file Resource.h.

#define ID_FAVORITS_DUMMY 32819

Definition at line 69 of file Resource.h.

#define ID_FONT_DROPDOWN 32793

Definition at line 66 of file Resource.h.

#define ID_GO_BACK 32787

Definition at line 60 of file Resource.h.

#define ID_GO_BEST_OF_THE_WEB 32791

Definition at line 64 of file Resource.h.

#define ID_GO_FORWARD 32788

Definition at line 61 of file Resource.h.

#define ID_GO_SEARCH_THE_WEB 32790

Definition at line 63 of file Resource.h.

#define ID_GO_START_PAGE 32789

Definition at line 62 of file Resource.h.

#define ID_HELP_ONLINE_SUPPORT 32800

Definition at line 68 of file Resource.h.

#define ID_HELP_WEB_TUTORIAL 32798

Definition at line 67 of file Resource.h.

#define ID_HISTORY_DUMMY 32820

Definition at line 70 of file Resource.h.

#define ID_INDICATOR_ICON 102

Definition at line 7 of file Resource.h.

#define ID_INDICATOR_PROGRESS 103

Definition at line 8 of file Resource.h.

#define ID_LINK_1 32781

Definition at line 54 of file Resource.h.

#define ID_LINK_MICROSOFT 32827

Definition at line 75 of file Resource.h.

#define ID_LINK_MSDN 32826

Definition at line 74 of file Resource.h.

#define ID_LINK_VISUALCPP 32828

Definition at line 76 of file Resource.h.

#define ID_VIEW_ADDRESS_BAR 32722

Definition at line 50 of file Resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 51 of file Resource.h.

#define ID_VIEW_EXPLORERBAR 32825

Definition at line 73 of file Resource.h.

#define ID_VIEW_FONTS_LARGE 32783

Definition at line 56 of file Resource.h.

#define ID_VIEW_FONTS_LARGEST 32782

Definition at line 55 of file Resource.h.

#define ID_VIEW_FONTS_MEDIUM 32784

Definition at line 57 of file Resource.h.

#define ID_VIEW_FONTS_SMALL 32785

Definition at line 58 of file Resource.h.

#define ID_VIEW_FONTS_SMALLEST 32786

Definition at line 59 of file Resource.h.

#define ID_VIEW_LINKS_BAR 32821

Definition at line 71 of file Resource.h.

#define ID_VIEW_REFRESH 32779

Definition at line 53 of file Resource.h.

#define ID_VIEW_STOP 32778

Definition at line 52 of file Resource.h.

#define ID_VIEW_TEXTLABELS 32823

Definition at line 72 of file Resource.h.

#define IDB_COLDTOOLBAR 261

Definition at line 23 of file Resource.h.

#define IDB_HOTTOOLBAR 262

Definition at line 24 of file Resource.h.

#define IDB_IMAGE_COLLECTION 140

Definition at line 20 of file Resource.h.

#define IDB_IMAGE_COLLECTION_SMALL 263

Definition at line 25 of file Resource.h.

#define IDB_MENU_IMAGES 134

Definition at line 18 of file Resource.h.

#define IDB_MENU_IMAGES_16 264

Definition at line 26 of file Resource.h.

#define IDB_STATUS_ANIMATION 142

Definition at line 22 of file Resource.h.

#define IDB_STATUS_READY 141

Definition at line 21 of file Resource.h.

#define IDC_MAIL 1000

Definition at line 45 of file Resource.h.

#define IDC_TREE1 1003

Definition at line 48 of file Resource.h.

#define IDC_URL 1001

Definition at line 46 of file Resource.h.

#define IDC_VERSION 1002

Definition at line 47 of file Resource.h.

#define IDD_ABOUTBOX 999

Definition at line 44 of file Resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file Resource.h.

#define IDP_SOCKETS_INIT_FAILED 104

Definition at line 9 of file Resource.h.

#define IDR_FAVORITES_POPUP 133

Definition at line 16 of file Resource.h.

#define IDR_FONT_POPUP 132

Definition at line 14 of file Resource.h.

#define IDR_HISTORY_POPUP 134

Definition at line 17 of file Resource.h.

#define IDR_IEDTYPE 129

Definition at line 11 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 10 of file Resource.h.

#define IDR_MAINFRAME2 129

Definition at line 12 of file Resource.h.

#define IDR_MFCAVI 132

Definition at line 15 of file Resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 13 of file Resource.h.

#define IDR_TOOLBAR_IMAGE_COLLECTION 138

Definition at line 19 of file Resource.h.

#define IDS_ADDRESS 757

Definition at line 42 of file Resource.h.

#define IDS_BACK 748

Definition at line 33 of file Resource.h.

#define IDS_BEST_OF_THE_WEB 745

Definition at line 31 of file Resource.h.

#define IDS_FAVORITES 754

Definition at line 39 of file Resource.h.

#define IDS_FILETYPES 1201

Definition at line 49 of file Resource.h.

#define IDS_FONT 756

Definition at line 41 of file Resource.h.

#define IDS_FORWARD 749

Definition at line 34 of file Resource.h.

#define IDS_FREE_STUFF 738

Definition at line 29 of file Resource.h.

#define IDS_HOME 752

Definition at line 37 of file Resource.h.

#define IDS_INTERNET_START_PAGE 743

Definition at line 30 of file Resource.h.

#define IDS_LINKS 758

Definition at line 43 of file Resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file Resource.h.

#define IDS_MICROSOFT_HOME_PAGE 747

Definition at line 32 of file Resource.h.

#define IDS_ONLINE_SUPPORT 737

Definition at line 28 of file Resource.h.

#define IDS_PRINT 755

Definition at line 40 of file Resource.h.

#define IDS_REFRESH 751

Definition at line 36 of file Resource.h.

#define IDS_SEARCH 753

Definition at line 38 of file Resource.h.

#define IDS_STOP 750

Definition at line 35 of file Resource.h.

#define IDS_WEB_TUTORIAL 736

Definition at line 27 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/stdafx.cpp File Reference

  • vc2008fp
  • IEDemo

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/stdafx.h File Reference

  • vc2008fp
  • IEDemo
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include <afxhtml.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/targetver.h File Reference

  • vc2008fp
  • IEDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/ChildFrm.cpp File Reference

  • vc2008fp
  • MDITabsDemo

ChildFrm.cpp File Reference

#include "stdafx.h"
#include "MDITabsDemo.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/ChildFrm.h File Reference

  • vc2008fp
  • MDITabsDemo
Classes

ChildFrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MainFrm.cpp File Reference

  • vc2008fp
  • MDITabsDemo
Classes | Defines

MainFrm.cpp File Reference

#include "stdafx.h"
#include "MDITabsDemo.h"
#include "MainFrm.h"

Go to the source code of this file.

Classes

class | CToolbarLabel

Defines

#define | UM_RECALCLAYOUT (WM_USER + 101)

Define Documentation

#define UM_RECALCLAYOUT (WM_USER + 101)

Definition at line 22 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MainFrm.h File Reference

  • vc2008fp
  • MDITabsDemo
Classes | Defines

MainFrm.h File Reference

#include "WorkspaceBar.h"
#include "WorkspaceBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CMDIFrameWnd CMDIFrameWndEx

Define Documentation

#define CMDIFrameWnd CMDIFrameWndEx

Definition at line 15 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemo.cpp File Reference

  • vc2008fp
  • MDITabsDemo
Classes | Variables

MDITabsDemo.cpp File Reference

#include "stdafx.h"
#include "MDITabsDemo.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "MDITabsDemoDoc.h"
#include "MDITabsDemoView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CMDITabsDemoApp theApp

Variable Documentation

CMDITabsDemoApp theApp

Definition at line 101 of file MDITabsDemo.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemo.h File Reference

  • vc2008fp
  • MDITabsDemo
Classes | Variables

MDITabsDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CMDITabOptions
class | CMDITabsDemoApp

Variables

CMDITabsDemoApp theApp

Variable Documentation

CMDITabsDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoDoc.cpp File Reference

  • vc2008fp
  • MDITabsDemo

MDITabsDemoDoc.cpp File Reference

#include "stdafx.h"
#include "MDITabsDemo.h"
#include "MDITabsDemoDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoDoc.h File Reference

  • vc2008fp
  • MDITabsDemo
Classes

MDITabsDemoDoc.h File Reference

Go to the source code of this file.

Classes

class CMDITabsDemoDoc
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoView.cpp File Reference

  • vc2008fp
  • MDITabsDemo

MDITabsDemoView.cpp File Reference

#include "stdafx.h"
#include "MDITabsDemo.h"
#include "MDITabsDemoDoc.h"
#include "MDITabsDemoView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoView.h File Reference

  • vc2008fp
  • MDITabsDemo
Classes

MDITabsDemoView.h File Reference

Go to the source code of this file.

Classes

class CMDITabsDemoView
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/resource.h File Reference

  • vc2008fp
  • MDITabsDemo
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_LABEL 32842
#define | ID_MDI_TABBED 32843
#define | ID_VIEW_APPLOOK_2000 32832
#define | ID_VIEW_APPLOOK_2003 32834
#define | ID_VIEW_APPLOOK_2007_1 32837
#define | ID_VIEW_APPLOOK_2007_2 32838
#define | ID_VIEW_APPLOOK_2007_3 32839
#define | ID_VIEW_APPLOOK_2007_4 32840
#define | ID_VIEW_APPLOOK_VS2005 32836
#define | ID_VIEW_APPLOOK_WIN_XP 32835
#define | ID_VIEW_APPLOOK_XP 32833
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_THEME_TOOLBAR 32841
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_WORKSPACE 32803
#define | ID_WINDOW_MANAGER 32823
#define | IDB_TOOLBAR256 151
#define | IDB_WORKSPACE 147
#define | IDC_COMPANY_URL 1041
#define | IDD_ABOUTBOX 100
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_MDITABTYPE 129
#define | IDR_POPUP_MDITABS 132
#define | IDR_POPUP_STYLE_20007 133
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_THEME 154
#define | IDS_WINDOWS_MANAGER 107
#define | IDS_WRONG_DISPLAY_SETTINGS 108

Define Documentation

#define ID_LABEL 32842

Definition at line 33 of file resource.h.

#define ID_MDI_TABBED 32843

Definition at line 34 of file resource.h.

#define ID_VIEW_APPLOOK_2000 32832

Definition at line 23 of file resource.h.

#define ID_VIEW_APPLOOK_2003 32834

Definition at line 25 of file resource.h.

#define ID_VIEW_APPLOOK_2007_1 32837

Definition at line 28 of file resource.h.

#define ID_VIEW_APPLOOK_2007_2 32838

Definition at line 29 of file resource.h.

#define ID_VIEW_APPLOOK_2007_3 32839

Definition at line 30 of file resource.h.

#define ID_VIEW_APPLOOK_2007_4 32840

Definition at line 31 of file resource.h.

#define ID_VIEW_APPLOOK_VS2005 32836

Definition at line 27 of file resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32835

Definition at line 26 of file resource.h.

#define ID_VIEW_APPLOOK_XP 32833

Definition at line 24 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 19 of file resource.h.

#define ID_VIEW_THEME_TOOLBAR 32841

Definition at line 32 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 20 of file resource.h.

#define ID_VIEW_WORKSPACE 32803

Definition at line 21 of file resource.h.

#define ID_WINDOW_MANAGER 32823

Definition at line 22 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 16 of file resource.h.

#define IDB_WORKSPACE 147

Definition at line 15 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 18 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDR_MDITABTYPE 129

Definition at line 10 of file resource.h.

#define IDR_POPUP_MDITABS 132

Definition at line 13 of file resource.h.

#define IDR_POPUP_STYLE_20007 133

Definition at line 14 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 12 of file resource.h.

#define IDR_THEME 154

Definition at line 17 of file resource.h.

#define IDS_WINDOWS_MANAGER 107

Definition at line 7 of file resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 108

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/StdAfx.cpp File Reference

  • vc2008fp
  • MDITabsDemo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/StdAfx.h File Reference

  • vc2008fp
  • MDITabsDemo
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/targetver.h File Reference

  • vc2008fp
  • MDITabsDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/WorkspaceBar.cpp File Reference

  • vc2008fp
  • MDITabsDemo
Variables

WorkspaceBar.cpp File Reference

#include "stdafx.h"
#include "MDITabsDemo.h"
#include "WorkspaceBar.h"

Go to the source code of this file.

Variables

const int nBorderSize = 1

Variable Documentation

const int nBorderSize = 1

Definition at line 23 of file WorkspaceBar.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/WorkspaceBar.h File Reference

  • vc2008fp
  • MDITabsDemo
Classes

WorkspaceBar.h File Reference

Go to the source code of this file.

Classes

class CWorkspaceBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ChildFrm.cpp File Reference

  • vc2008fp
  • MenuSubSet

ChildFrm.cpp File Reference

#include "stdafx.h"
#include "MenuSubSet.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ChildFrm.h File Reference

  • vc2008fp
  • MenuSubSet
Classes

ChildFrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ConfigDlg.cpp File Reference

  • vc2008fp
  • MenuSubSet

ConfigDlg.cpp File Reference

#include "stdafx.h"
#include "MenuSubSet.h"
#include "ConfigDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ConfigDlg.h File Reference

  • vc2008fp
  • MenuSubSet
Classes

ConfigDlg.h File Reference

Go to the source code of this file.

Classes

class CConfigDlg
Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MainFrm.cpp File Reference

  • vc2008fp
  • MenuSubSet
Functions

MainFrm.cpp File Reference

#include "stdafx.h"
#include "MenuSubSet.h"
#include "MainFrm.h"

Go to the source code of this file.

Functions

BOOL IsMenuButtonEmpty (CMFCToolBarButton *pButton)

Function Documentation

BOOL IsMenuButtonEmpty ( CMFCToolBarButton * pButton )

Definition at line 24 of file MainFrm.cpp.

{
  ASSERT_VALID (pButton);

  if (pButton->m_nID != 0 && pButton->m_nID != (UINT)-1)
  {
    return FALSE;
  }

  CMFCToolBarMenuButton* pMenuButton = DYNAMIC_DOWNCAST(
    CMFCToolBarMenuButton, pButton);
  if (pMenuButton == NULL)
  {
    return FALSE;
  }

  const CObList& lstCommands = pMenuButton->GetCommands ();

  for (POSITION pos = lstCommands.GetHeadPosition (); pos != NULL;)
  {
    CMFCToolBarButton* pSubButton = (CMFCToolBarButton*) lstCommands.GetNext (pos);
    ASSERT_VALID (pSubButton);

    if (CMFCToolBar::IsCommandPermitted (pSubButton->m_nID))
    {
      return FALSE;
    }
  }

  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MainFrm.h File Reference

  • vc2008fp
  • MenuSubSet
Classes | Defines

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame
class | CMyMenuBar

Defines

#define | CMDIFrameWnd CMDIFrameWndEx

Define Documentation

#define CMDIFrameWnd CMDIFrameWndEx

Definition at line 13 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSet.cpp File Reference

  • vc2008fp
  • MenuSubSet
Classes | Variables

MenuSubSet.cpp File Reference

#include "stdafx.h"
#include "MenuSubSet.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "MenuSubSetDoc.h"
#include "MenuSubSetView.h"
#include "ConfigDlg.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CMenuSubSetApp theApp

Variable Documentation

CMenuSubSetApp theApp

Definition at line 51 of file MenuSubSet.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSet.h File Reference

  • vc2008fp
  • MenuSubSet
Classes | Variables

MenuSubSet.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CMenuSubSetApp

Variables

CMenuSubSetApp theApp

Variable Documentation

CMenuSubSetApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetDoc.cpp File Reference

  • vc2008fp
  • MenuSubSet

MenuSubSetDoc.cpp File Reference

#include "stdafx.h"
#include "MenuSubSet.h"
#include "MenuSubSetDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetDoc.h File Reference

  • vc2008fp
  • MenuSubSet
Classes

MenuSubSetDoc.h File Reference

Go to the source code of this file.

Classes

class CMenuSubSetDoc
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetView.cpp File Reference

  • vc2008fp
  • MenuSubSet

MenuSubSetView.cpp File Reference

#include "stdafx.h"
#include "MenuSubSet.h"
#include "MenuSubSetDoc.h"
#include "MenuSubSetView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetView.h File Reference

  • vc2008fp
  • MenuSubSet
Classes

MenuSubSetView.h File Reference

Go to the source code of this file.

Classes

class CMenuSubSetView
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/resource.h File Reference

  • vc2008fp
  • MenuSubSet
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_DEMO_DEMO1 32844
#define | ID_DEMO_DEMO2 32845
#define | ID_VIEW_APPLOOK_2000 32833
#define | ID_VIEW_APPLOOK_2003 32835
#define | ID_VIEW_APPLOOK_2007 32838
#define | ID_VIEW_APPLOOK_VS2005 32837
#define | ID_VIEW_APPLOOK_WIN_XP 32836
#define | ID_VIEW_APPLOOK_XP 32834
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | ID_WINDOW_MANAGER 32823
#define | IDB_TOOLBAR256 151
#define | IDC_COMPANY_URL 1041
#define | IDC_CONF1 1042
#define | IDC_CONF2 1043
#define | IDC_CONF3 1044
#define | IDD_ABOUTBOX 100
#define | IDD_MENUSUBSET_FORM 101
#define | IDD_SELECT_CONF 154
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_MENUSUTYPE 129
#define | IDR_POPUP_TOOLBAR 131
#define | IDS_WINDOWS_MANAGER 107

Define Documentation

#define ID_DEMO_DEMO1 32844

Definition at line 28 of file resource.h.

#define ID_DEMO_DEMO2 32845

Definition at line 29 of file resource.h.

#define ID_VIEW_APPLOOK_2000 32833

Definition at line 22 of file resource.h.

#define ID_VIEW_APPLOOK_2003 32835

Definition at line 24 of file resource.h.

#define ID_VIEW_APPLOOK_2007 32838

Definition at line 27 of file resource.h.

#define ID_VIEW_APPLOOK_VS2005 32837

Definition at line 26 of file resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32836

Definition at line 25 of file resource.h.

#define ID_VIEW_APPLOOK_XP 32834

Definition at line 23 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 19 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 20 of file resource.h.

#define ID_WINDOW_MANAGER 32823

Definition at line 21 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 13 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 15 of file resource.h.

#define IDC_CONF1 1042

Definition at line 16 of file resource.h.

#define IDC_CONF2 1043

Definition at line 17 of file resource.h.

#define IDC_CONF3 1044

Definition at line 18 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_MENUSUBSET_FORM 101

Definition at line 7 of file resource.h.

#define IDD_SELECT_CONF 154

Definition at line 14 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDR_MENUSUTYPE 129

Definition at line 10 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 12 of file resource.h.

#define IDS_WINDOWS_MANAGER 107

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/StdAfx.cpp File Reference

  • vc2008fp
  • MenuSubSet

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/StdAfx.h File Reference

  • vc2008fp
  • MenuSubSet
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/targetver.h File Reference

  • vc2008fp
  • MenuSubSet
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MainFrm.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MainFrm.cpp File Reference

#include "stdafx.h"
#include "MSMoneyDemo.h"
#include "MSMoneyDemoDoc.h"
#include "MSMoneyDemoView.h"
#include "MainFrm.h"
#include "MSMVisualManager.h"
#include "MSMLinksBarButton.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MainFrm.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes | Defines

MainFrm.h File Reference

#include "MSMCaptionBar.h"
#include "MSMMenuBar.h"
#include "MSMToolBar.h"
#include "MSMTasksPane.h"
#include "MSMCategoryBar.h"
#include "MSMLinksBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 25 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBar.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMCaptionBar.cpp File Reference

#include "stdafx.h"
#include "MSMCaptionBar.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBar.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMCaptionBar.h File Reference

#include "MSMCaptionBarButton.h"

Go to the source code of this file.

Classes

class CMSMCaptionBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBarButton.cpp File Reference

  • vc2008fp
  • MSMoneyDemo
Functions

MSMCaptionBarButton.cpp File Reference

#include "stdafx.h"
#include "MSMCaptionBarButton.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Functions

IMPLEMENT_DYNCREATE (CMSMCaptionBarButton, CMFCButton)

Function Documentation

IMPLEMENT_DYNCREATE | ( | CMSMCaptionBarButton | ,
 |  | CMFCButton |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBarButton.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMCaptionBarButton.h File Reference

Go to the source code of this file.

Classes

class CMSMCaptionBarButton
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBar.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMCategoryBar.cpp File Reference

#include "stdafx.h"
#include "MSMoneyDemo.h"
#include "MSMCategoryBar.h"
#include "MSMCategoryBarButton.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBar.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMCategoryBar.h File Reference

#include "MSMToolBar.h"

Go to the source code of this file.

Classes

class CMSMCategoryBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBarButton.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMCategoryBarButton.cpp File Reference

#include "stdafx.h"
#include "MSMCategoryBarButton.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBarButton.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMCategoryBarButton.h File Reference

Go to the source code of this file.

Classes

class CMSMCategoryBarButton
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMDialog.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMDialog.cpp File Reference

#include "stdafx.h"
#include "MSMDialog.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMDialog.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMDialog.h File Reference

Go to the source code of this file.

Classes

class CMSMDialog
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBar.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMLinksBar.cpp File Reference

#include "stdafx.h"
#include "MSMoneyDemo.h"
#include "MSMLinksBar.h"
#include "MSMLinksBarButton.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBar.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMLinksBar.h File Reference

#include "MSMToolBar.h"

Go to the source code of this file.

Classes

class CMSMLinksBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBarButton.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMLinksBarButton.cpp File Reference

#include "stdafx.h"
#include "MSMLinksBarButton.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBarButton.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMLinksBarButton.h File Reference

Go to the source code of this file.

Classes

class CMSMLinksBarButton
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMMenuBar.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMMenuBar.cpp File Reference

#include "stdafx.h"
#include "MSMMenuBar.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMMenuBar.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMMenuBar.h File Reference

Go to the source code of this file.

Classes

class CMSMMenuBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemo.cpp File Reference

  • vc2008fp
  • MSMoneyDemo
Variables

MSMoneyDemo.cpp File Reference

#include "stdafx.h"
#include "MSMoneyDemo.h"
#include "MainFrm.h"
#include "MSMoneyDemoDoc.h"
#include "MSMoneyDemoView.h"
#include "MSMDialog.h"

Go to the source code of this file.

Variables

CMSMoneyDemoApp theApp

Variable Documentation

CMSMoneyDemoApp theApp

Definition at line 50 of file MSMoneyDemo.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemo.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes | Variables

MSMoneyDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CMSMoneyDemoApp

Variables

CMSMoneyDemoApp theApp

Variable Documentation

CMSMoneyDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemoDoc.cpp File Reference

#include "stdafx.h"
#include "MSMoneyDemo.h"
#include "MSMoneyDemoDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes | Defines

MSMoneyDemoDoc.h File Reference

Go to the source code of this file.

Classes

class | CMSMoneyDemoDoc

Defines

#define | FIRST_HISTORY_COMMAND 0x1000
#define | HISTORY_LEN 10

Define Documentation

#define FIRST_HISTORY_COMMAND 0x1000

Definition at line 15 of file MSMoneyDemoDoc.h.

#define HISTORY_LEN 10

Definition at line 16 of file MSMoneyDemoDoc.h.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoView.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemoView.cpp File Reference

#include "stdafx.h"
#include "MSMoneyDemo.h"
#include "MSMoneyDemoDoc.h"
#include "MSMoneyDemoView.h"
#include "MainFrm.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoView.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMoneyDemoView.h File Reference

Go to the source code of this file.

Classes

class CMSMoneyDemoView
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMTasksPane.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMTasksPane.cpp File Reference

#include "stdafx.h"
#include "msmoneydemo.h"
#include "MSMTasksPane.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMTasksPane.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMTasksPane.h File Reference

Go to the source code of this file.

Classes

class CMSMTasksPane
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMToolBar.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

MSMToolBar.cpp File Reference

#include "stdafx.h"
#include "MSMToolBar.h"
#include "MSMVisualManager.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMToolBar.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMToolBar.h File Reference

Go to the source code of this file.

Classes

class CMSMToolBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMVisualManager.cpp File Reference

  • vc2008fp
  • MSMoneyDemo
Defines | Functions

MSMVisualManager.cpp File Reference

#include "stdafx.h"
#include "MSMVisualManager.h"
#include "MSMCaptionBar.h"
#include "MSMMenuBar.h"
#include "MSMToolBar.h"
#include "MSMTasksPane.h"
#include "MSMCategoryBar.h"
#include "MSMCategoryBarButton.h"
#include "MSMLinksBar.h"
#include "MSMLinksBarButton.h"

Go to the source code of this file.

Defines

#define | CBS_DISABLED 4
#define | CBS_HOT 2
#define | CBS_NORMAL 1
#define | CBS_PUSHED 3
#define | WP_CLOSEBUTTON 18
#define | WP_MAXBUTTON 17
#define | WP_MINBUTTON 15
#define | WP_RESTOREBUTTON 21

Functions

void | _DrawReflectedGradient (CDC *pDC, COLORREF clrS, COLORREF clrM, COLORREF clrF, const CRect &rect, BOOL bHorz)
BOOL | _StretchBitmap (CDC *pDC, const CRect &rectClient, CBitmap &bmp)

Define Documentation

#define CBS_DISABLED 4

Definition at line 39 of file MSMVisualManager.cpp.

#define CBS_HOT 2

Definition at line 37 of file MSMVisualManager.cpp.

#define CBS_NORMAL 1

Definition at line 36 of file MSMVisualManager.cpp.

#define CBS_PUSHED 3

Definition at line 38 of file MSMVisualManager.cpp.

#define WP_CLOSEBUTTON 18

Definition at line 33 of file MSMVisualManager.cpp.

#define WP_MAXBUTTON 17

Definition at line 32 of file MSMVisualManager.cpp.

#define WP_MINBUTTON 15

Definition at line 31 of file MSMVisualManager.cpp.

#define WP_RESTOREBUTTON 21

Definition at line 34 of file MSMVisualManager.cpp.

Function Documentation

void _DrawReflectedGradient | ( | CDC * | pDC,
 |  | COLORREF | clrS,
 |  | COLORREF | clrM,
 |  | COLORREF | clrF,
 |  | const CRect & | rect,
 |  | BOOL | bHorz
 | ) |  |

Definition at line 80 of file MSMVisualManager.cpp.

{
  ASSERT_VALID (pDC);

  CDrawingManager dm (*pDC);

  long x1 = rect.left;
  long x2 = rect.right;
  long y1 = rect.top;
  long y2 = rect.bottom;

  if (bHorz)
  {
    CRect rt (x1, y1, x2, (y1 + y2) / 2);
    dm.FillGradient (rt, clrM, clrS, TRUE);
    rt.top = rt.bottom;
    rt.bottom = y2;
    dm.FillGradient (rt, clrF, clrM, TRUE);
  }
  else
  {
    CRect rt (x1, y1, (x1 + x2) / 2, y2);
    dm.FillGradient (rt, clrS, clrM, FALSE);
    rt.left  = rt.right;
    rt.right = x2;
    dm.FillGradient (rt, clrM, clrF, FALSE);
  }
}

BOOL _StretchBitmap | ( | CDC * | pDC,
 |  | const CRect & | rectClient,
 |  | CBitmap & | bmp
 | ) |  |

Definition at line 46 of file MSMVisualManager.cpp.

{
  ASSERT_VALID (pDC);

  if (bmp.GetSafeHandle () != NULL)
  {
    BITMAP bm;
    ZeroMemory (&bm, sizeof (BITMAP));

    bmp.GetBitmap (&bm);

    CDC dc;
    dc.CreateCompatibleDC (pDC);

    // Select the bitmap into the in-memory DC
    CBitmap* pOldBitmap = dc.SelectObject (&bmp);

    int nOldStretchBltMode = pDC->SetStretchBltMode (COLORONCOLOR);

    pDC->StretchBlt(0, 0, rectClient.Width (), rectClient.Height (), &dc,
            0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);

    dc.SelectObject (pOldBitmap);

    pDC->SetStretchBltMode (nOldStretchBltMode);

    return true;
  }

  return false;
}

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMVisualManager.h File Reference

  • vc2008fp
  • MSMoneyDemo
Classes

MSMVisualManager.h File Reference

Go to the source code of this file.

Classes

class CMSMVisualManager
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/Resource.h File Reference

  • vc2008fp
  • MSMoneyDemo
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_APP_HELP_MICROSOFT 32881
#define | ID_BACKWARD_1 32878
#define | ID_BACKWARD_2 32879
#define | ID_CATEGORIE_1 32832
#define | ID_CATEGORIE_2 32833
#define | ID_CATEGORIE_3 32834
#define | ID_CATEGORIE_4 32835
#define | ID_CATEGORIE_5 32836
#define | ID_CATEGORIE_6 32837
#define | ID_CATEGORIE_7 32838
#define | ID_CATEGORIE_8 32839
#define | ID_FORWARD_1 32876
#define | ID_FORWARD_2 32877
#define | ID_GO_ADDRESS 32830
#define | ID_GO_ADDRESS_EDIT 32831
#define | ID_GO_BACK 32787
#define | ID_GO_FORWARD 32788
#define | ID_HELP_MICROSOFT 32880
#define | ID_LINKS_BANKING_1 32842
#define | ID_LINKS_BANKING_2 32843
#define | ID_LINKS_BANKING_3 32844
#define | ID_LINKS_BANKING_4 32845
#define | ID_LINKS_BANKING_5 32846
#define | ID_LINKS_BILLS_1 32847
#define | ID_LINKS_BILLS_2 32848
#define | ID_LINKS_BILLS_3 32849
#define | ID_LINKS_BILLS_4 32850
#define | ID_LINKS_BILLS_5 32851
#define | ID_LINKS_BUDGET_1 32855
#define | ID_LINKS_BUDGET_2 32856
#define | ID_LINKS_HOME_1 32840
#define | ID_LINKS_HOME_2 32841
#define | ID_LINKS_INVESTING_1 32857
#define | ID_LINKS_INVESTING_2 32858
#define | ID_LINKS_INVESTING_3 32859
#define | ID_LINKS_INVESTING_4 32860
#define | ID_LINKS_INVESTING_5 32861
#define | ID_LINKS_INVESTING_6 32862
#define | ID_LINKS_INVESTING_7 32863
#define | ID_LINKS_PLANNING_1 32864
#define | ID_LINKS_PLANNING_2 32865
#define | ID_LINKS_PLANNING_3 32866
#define | ID_LINKS_PLANNING_4 32867
#define | ID_LINKS_PLANNING_5 32868
#define | ID_LINKS_PLANNING_6 32869
#define | ID_LINKS_REPORTS_1 32852
#define | ID_LINKS_REPORTS_2 32853
#define | ID_LINKS_REPORTS_3 32854
#define | ID_LINKS_TAXES_1 32870
#define | ID_LINKS_TAXES_2 32871
#define | ID_LINKS_TAXES_3 32872
#define | ID_LINKS_TAXES_4 32873
#define | ID_LINKS_TAXES_5 32874
#define | ID_TOOLBAR_CUSTOMIZE 32875
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_REFRESH 32779
#define | ID_VIEW_STOP 32778
#define | IDB_COLDTOOLBAR 261
#define | IDB_DISABLEDTOOLBAR 263
#define | IDB_HOTTOOLBAR 262
#define | IDB_MENU_IMAGES 134
#define | IDB_MENU_IMAGES_16 264
#define | IDB_MSM_VIEW_BKGND 147
#define | IDB_PRESSEDTOOLBAR 146
#define | IDC_MAIL 1000
#define | IDC_URL 1001
#define | IDC_VERSION 1002
#define | IDP_OLE_INIT_FAILED 100
#define | IDP_SOCKETS_INIT_FAILED 104
#define | IDR_BACKWARD_MENU 145
#define | IDR_FORWARD_MENU 144
#define | IDR_MAINFRAME 128
#define | IDR_MSMONETYPE 129
#define | IDS_BACK 748
#define | IDS_FORWARD 749
#define | IDS_REFRESH 751
#define | IDS_STOP 750

Define Documentation

#define ID_APP_HELP_MICROSOFT 32881

Definition at line 81 of file Resource.h.

#define ID_BACKWARD_1 32878

Definition at line 78 of file Resource.h.

#define ID_BACKWARD_2 32879

Definition at line 79 of file Resource.h.

#define ID_CATEGORIE_1 32832

Definition at line 32 of file Resource.h.

#define ID_CATEGORIE_2 32833

Definition at line 33 of file Resource.h.

#define ID_CATEGORIE_3 32834

Definition at line 34 of file Resource.h.

#define ID_CATEGORIE_4 32835

Definition at line 35 of file Resource.h.

#define ID_CATEGORIE_5 32836

Definition at line 36 of file Resource.h.

#define ID_CATEGORIE_6 32837

Definition at line 37 of file Resource.h.

#define ID_CATEGORIE_7 32838

Definition at line 38 of file Resource.h.

#define ID_CATEGORIE_8 32839

Definition at line 39 of file Resource.h.

#define ID_FORWARD_1 32876

Definition at line 76 of file Resource.h.

#define ID_FORWARD_2 32877

Definition at line 77 of file Resource.h.

#define ID_GO_ADDRESS 32830

Definition at line 30 of file Resource.h.

#define ID_GO_ADDRESS_EDIT 32831

Definition at line 31 of file Resource.h.

#define ID_GO_BACK 32787

Definition at line 28 of file Resource.h.

#define ID_GO_FORWARD 32788

Definition at line 29 of file Resource.h.

#define ID_HELP_MICROSOFT 32880

Definition at line 80 of file Resource.h.

#define ID_LINKS_BANKING_1 32842

Definition at line 42 of file Resource.h.

#define ID_LINKS_BANKING_2 32843

Definition at line 43 of file Resource.h.

#define ID_LINKS_BANKING_3 32844

Definition at line 44 of file Resource.h.

#define ID_LINKS_BANKING_4 32845

Definition at line 45 of file Resource.h.

#define ID_LINKS_BANKING_5 32846

Definition at line 46 of file Resource.h.

#define ID_LINKS_BILLS_1 32847

Definition at line 47 of file Resource.h.

#define ID_LINKS_BILLS_2 32848

Definition at line 48 of file Resource.h.

#define ID_LINKS_BILLS_3 32849

Definition at line 49 of file Resource.h.

#define ID_LINKS_BILLS_4 32850

Definition at line 50 of file Resource.h.

#define ID_LINKS_BILLS_5 32851

Definition at line 51 of file Resource.h.

#define ID_LINKS_BUDGET_1 32855

Definition at line 55 of file Resource.h.

#define ID_LINKS_BUDGET_2 32856

Definition at line 56 of file Resource.h.

#define ID_LINKS_HOME_1 32840

Definition at line 40 of file Resource.h.

#define ID_LINKS_HOME_2 32841

Definition at line 41 of file Resource.h.

#define ID_LINKS_INVESTING_1 32857

Definition at line 57 of file Resource.h.

#define ID_LINKS_INVESTING_2 32858

Definition at line 58 of file Resource.h.

#define ID_LINKS_INVESTING_3 32859

Definition at line 59 of file Resource.h.

#define ID_LINKS_INVESTING_4 32860

Definition at line 60 of file Resource.h.

#define ID_LINKS_INVESTING_5 32861

Definition at line 61 of file Resource.h.

#define ID_LINKS_INVESTING_6 32862

Definition at line 62 of file Resource.h.

#define ID_LINKS_INVESTING_7 32863

Definition at line 63 of file Resource.h.

#define ID_LINKS_PLANNING_1 32864

Definition at line 64 of file Resource.h.

#define ID_LINKS_PLANNING_2 32865

Definition at line 65 of file Resource.h.

#define ID_LINKS_PLANNING_3 32866

Definition at line 66 of file Resource.h.

#define ID_LINKS_PLANNING_4 32867

Definition at line 67 of file Resource.h.

#define ID_LINKS_PLANNING_5 32868

Definition at line 68 of file Resource.h.

#define ID_LINKS_PLANNING_6 32869

Definition at line 69 of file Resource.h.

#define ID_LINKS_REPORTS_1 32852

Definition at line 52 of file Resource.h.

#define ID_LINKS_REPORTS_2 32853

Definition at line 53 of file Resource.h.

#define ID_LINKS_REPORTS_3 32854

Definition at line 54 of file Resource.h.

#define ID_LINKS_TAXES_1 32870

Definition at line 70 of file Resource.h.

#define ID_LINKS_TAXES_2 32871

Definition at line 71 of file Resource.h.

#define ID_LINKS_TAXES_3 32872

Definition at line 72 of file Resource.h.

#define ID_LINKS_TAXES_4 32873

Definition at line 73 of file Resource.h.

#define ID_LINKS_TAXES_5 32874

Definition at line 74 of file Resource.h.

#define ID_TOOLBAR_CUSTOMIZE 32875

Definition at line 75 of file Resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 25 of file Resource.h.

#define ID_VIEW_REFRESH 32779

Definition at line 27 of file Resource.h.

#define ID_VIEW_STOP 32778

Definition at line 26 of file Resource.h.

#define IDB_COLDTOOLBAR 261

Definition at line 14 of file Resource.h.

#define IDB_DISABLEDTOOLBAR 263

Definition at line 16 of file Resource.h.

#define IDB_HOTTOOLBAR 262

Definition at line 15 of file Resource.h.

#define IDB_MENU_IMAGES 134

Definition at line 9 of file Resource.h.

#define IDB_MENU_IMAGES_16 264

Definition at line 17 of file Resource.h.

#define IDB_MSM_VIEW_BKGND 147

Definition at line 13 of file Resource.h.

#define IDB_PRESSEDTOOLBAR 146

Definition at line 12 of file Resource.h.

#define IDC_MAIL 1000

Definition at line 22 of file Resource.h.

#define IDC_URL 1001

Definition at line 23 of file Resource.h.

#define IDC_VERSION 1002

Definition at line 24 of file Resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file Resource.h.

#define IDP_SOCKETS_INIT_FAILED 104

Definition at line 6 of file Resource.h.

#define IDR_BACKWARD_MENU 145

Definition at line 11 of file Resource.h.

#define IDR_FORWARD_MENU 144

Definition at line 10 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file Resource.h.

#define IDR_MSMONETYPE 129

Definition at line 8 of file Resource.h.

#define IDS_BACK 748

Definition at line 18 of file Resource.h.

#define IDS_FORWARD 749

Definition at line 19 of file Resource.h.

#define IDS_REFRESH 751

Definition at line 21 of file Resource.h.

#define IDS_STOP 750

Definition at line 20 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/stdafx.cpp File Reference

  • vc2008fp
  • MSMoneyDemo

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/stdafx.h File Reference

  • vc2008fp
  • MSMoneyDemo
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/targetver.h File Reference

  • vc2008fp
  • MSMoneyDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/CntrItem.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

CntrItem.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "MSOffice2007DemoDoc.h"
#include "MSOffice2007DemoView.h"
#include "CntrItem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/CntrItem.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

CntrItem.h File Reference

Go to the source code of this file.

Classes

class CMSOffice2007DemoCntrItem
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/DlgBanner.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

DlgBanner.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "DlgBanner.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/DlgBanner.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

DlgBanner.h File Reference

Go to the source code of this file.

Classes

class CDlgBanner
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/keys.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo
Variables

keys.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "keys.h"

Go to the source code of this file.

Variables

MSOfficeDemoKey keys []

Variable Documentation

MSOfficeDemoKey keys[]

Definition at line 22 of file keys.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/keys.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes | Variables

keys.h File Reference

Go to the source code of this file.

Classes

struct MSOfficeDemoKey

Variables

MSOfficeDemoKey keys []

Variable Documentation

MSOfficeDemoKey keys[]

Definition at line 22 of file keys.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MainFrm.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes | Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "OptionsPage.h"
#include "ResourcePage.h"
#include "MainFrm.h"
#include "keys.h"
#include "RibbonTableButton.h"
#include <memory>

Go to the source code of this file.

Classes

class | CMFCRibbonNumEdit
class | CMFCRibbonNumEditCtrl

Variables

const int | IdShowProgressTimer = 2
const int | IdStartProgressTimer = 1
const DWORD | idTabDeveloper = 101

Variable Documentation

const int IdShowProgressTimer = 2

Definition at line 31 of file MainFrm.cpp.

const int IdStartProgressTimer = 1

Definition at line 30 of file MainFrm.cpp.

const DWORD idTabDeveloper = 101

Definition at line 33 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MainFrm.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

MainFrm.h File Reference

#include "TaskPane.h"
#include "RibbonListButton.h"
#include "TaskPane.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007Demo.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes | Variables

MSOffice2007Demo.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "MainFrm.h"
#include "MSOffice2007DemoDoc.h"
#include "MSOffice2007DemoView.h"
#include "RibbonTooltipCtrl.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CMSOffice2007DemoApp theApp

Variable Documentation

CMSOffice2007DemoApp theApp

Definition at line 60 of file MSOffice2007Demo.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007Demo.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes | Variables

MSOffice2007Demo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CMSOffice2007DemoApp

Variables

CMSOffice2007DemoApp theApp

Variable Documentation

CMSOffice2007DemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007DemoDoc.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "MSOffice2007DemoDoc.h"
#include "CntrItem.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

MSOffice2007DemoDoc.h File Reference

Go to the source code of this file.

Classes

class CMSOffice2007DemoDoc
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes | Defines | Functions

MSOffice2007DemoView.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "MainFrm.h"
#include "MSOffice2007DemoDoc.h"
#include "CntrItem.h"
#include "MSOffice2007DemoView.h"
#include "RibbonTableButton.h"
#include <memory>

Go to the source code of this file.

Classes

struct | CCharFormat

Defines

#define | WPD_CHARFORMAT CHARFORMAT
#define | WPD_PARAFORMAT PARAFORMAT

Functions

int | GetTwipSize (CString str)
CString | TwipsToPointString (int nTwips)

Define Documentation

#define WPD_CHARFORMAT CHARFORMAT

Definition at line 35 of file MSOffice2007DemoView.cpp.

#define WPD_PARAFORMAT PARAFORMAT

Definition at line 36 of file MSOffice2007DemoView.cpp.

Function Documentation

int GetTwipSize ( CString str )

Definition at line 45 of file MSOffice2007DemoView.cpp.

{
  LPCTSTR lpszText = str;

  while (*lpszText == ' ' || *lpszText == '\t')
    lpszText++;

  if (lpszText[0] == NULL)
    return -1; // no text in control

  double d = _tcstod(lpszText, (LPTSTR*)&lpszText);
  while (*lpszText == ' ' || *lpszText == '\t')
    lpszText++;

  if (*lpszText != NULL)
    return -2;   // not terminated properly

  return(d < 0.) ? 0 :(int)(d * 20.);
}

CString TwipsToPointString ( int nTwips )

Definition at line 65 of file MSOffice2007DemoView.cpp.

{
  CString str;
  if (nTwips >= 0)
  {
    // round to nearest half point
    nTwips = (nTwips + 5) / 10;

    if ((nTwips % 2) == 0)
    {
      str.Format (_T("%ld"), nTwips/2);
    }
    else
    {
      str.Format (_T("%.1f"), (float) nTwips / 2.F);
    }
  }

  return str;
}

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

MSOffice2007DemoView.h File Reference

Go to the source code of this file.

Classes

class CMSOffice2007DemoView
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/OptionsPage.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

OptionsPage.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "OptionsPage.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/OptionsPage.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

OptionsPage.h File Reference

#include "DlgBanner.h"

Go to the source code of this file.

Classes

class | CDemoOptionsPage
class | CDemoOptionsPropSheet
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/Resource.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BORDERS_ALLBORDERS 33104
#define | ID_BORDERS_BORDERSANDSHADING 33105
#define | ID_BORDERS_BOTTOMBORDER 33106
#define | ID_BORDERS_DIAGONALDOWNBORDER 33107
#define | ID_BORDERS_DIAGONALUPBORDER 33108
#define | ID_BORDERS_HORIZONTALLINE 33109
#define | ID_BORDERS_INSIDEBORDERS 33110
#define | ID_BORDERS_INSIDEHORIZONTALBORDER 33111
#define | ID_BORDERS_INSIDEVERTICALBORDER 33112
#define | ID_BORDERS_LEFTBORDER 33113
#define | ID_BORDERS_NOBORDER 33114
#define | ID_BORDERS_OUTSIDEBORDERS 33115
#define | ID_BORDERS_RIGHTBORDER 33116
#define | ID_BORDERS_TOPBORDER 33117
#define | ID_BORDERS_VIEWGRIDLINES 33118
#define | ID_CANCEL_EDIT_CNTR 32779
#define | ID_CHART_DESIGN_DATA_EDIT 33042
#define | ID_CHART_DESIGN_DATA_SHOW 33043
#define | ID_CHART_DESIGN_DATA_SWITCH 33041
#define | ID_CHART_DESIGN_TYPE_CHANGE 33039
#define | ID_CHART_DESIGN_TYPE_SAVETEMPLATE 33040
#define | ID_CHART_FORMAT_CURSEL_FORMAT 33054
#define | ID_CHART_FORMAT_CURSEL_RESET 33055
#define | ID_CHART_FORMAT_SHAPES_EFFECTS 33058
#define | ID_CHART_FORMAT_SHAPES_FILL 33056
#define | ID_CHART_FORMAT_SHAPES_OUTLINE 33057
#define | ID_CHART_LAYOUT_AXES_AXES 33052
#define | ID_CHART_LAYOUT_AXES_GRIDLINES 33053
#define | ID_CHART_LAYOUT_LABELS_AXIS 33048
#define | ID_CHART_LAYOUT_LABELS_DATALABELS 33050
#define | ID_CHART_LAYOUT_LABELS_DATATABLE 33051
#define | ID_CHART_LAYOUT_LABELS_LEGEND 33049
#define | ID_CHART_LAYOUT_LABELS_TITLE 33047
#define | ID_CHART_LAYOUT_SHAPES_PICTURE 33044
#define | ID_CHART_LAYOUT_SHAPES_SHAPES 33045
#define | ID_CHART_LAYOUT_SHAPES_TEXTBOX 33046
#define | ID_CUSTOMIZE_QUICK_ACCESS_TOOLBAR 33032
#define | ID_DUMMY 33080
#define | ID_EDIT_COPYFORMAT 32784
#define | ID_EDIT_GOTO 33014
#define | ID_EDIT_PASTE_HYPERLINK 33015
#define | ID_EDIT_SELECTFORMAT 32966
#define | ID_EDIT_SELECTOBJECTS 32967
#define | ID_FILE_PREPARE 32801
#define | ID_FILE_PREPARE_ADD_SIGNATURE 33143
#define | ID_FILE_PREPARE_ENCRYPT 33142
#define | ID_FILE_PREPARE_INSPECT 33141
#define | ID_FILE_PREPARE_MARK_AS_FINAL 33144
#define | ID_FILE_PREPARE_PROPERTIES 33140
#define | ID_FILE_PREPARE_RUN_CHECKER 33145
#define | ID_FILE_PUBLISH 33133
#define | ID_FILE_PUBLISH_BLOG 33134
#define | ID_FILE_PUBLISH_CREATE_DOCWORKSPACE 32800
#define | ID_FILE_PUBLISH_DOCMANAGE_SERVER 32785
#define | ID_FILE_SAVE_AS_ADDINS 33138
#define | ID_FILE_SAVE_AS_DOCUMENT 33135
#define | ID_FILE_SAVE_AS_DOCUMENT_OLD 33137
#define | ID_FILE_SAVE_AS_OTHER 33139
#define | ID_FILE_SAVE_AS_TEMPLATE 33136
#define | ID_FILE_SEND 32807
#define | ID_FILE_SEND_EMAIL 32778
#define | ID_FILE_SEND_FAX 32783
#define | ID_FONT_BOLD 32786
#define | ID_FONT_CASE_CAPITALIZE 32974
#define | ID_FONT_CASE_LOWERCASE 33091
#define | ID_FONT_CASE_SENTENCE 32971
#define | ID_FONT_CASE_TOGGLECASE 32980
#define | ID_FONT_CASE_UPPERCASE 32983
#define | ID_FONT_CHANGECASE 32787
#define | ID_FONT_CLEARFORMAT 32788
#define | ID_FONT_COLOR 32789
#define | ID_FONT_FONT 32790
#define | ID_FONT_FONTSIZE 32791
#define | ID_FONT_GROWFONT 32792
#define | ID_FONT_ITALIC 32793
#define | ID_FONT_NOT_FOUND 32217
#define | ID_FONT_SHRINK 32794
#define | ID_FONT_STRIKETHROUGH 32795
#define | ID_FONT_SUBSCRIPT 32796
#define | ID_FONT_SUPERSCRIPT 32797
#define | ID_FONT_TEXTHIGHLIGHT 32798
#define | ID_FONT_UNDERLINE 32799
#define | ID_FROM_PALETTE_BULLET 33067
#define | ID_FROM_PALETTE_MULTILEVEL 33119
#define | ID_FROM_PALETTE_NUMBER 33069
#define | ID_FROM_PALETTE_POSITION 33120
#define | ID_FROM_PALETTE_TABLE 33074
#define | ID_GROUP_SHORTCUTS 32811
#define | ID_INSERT_BLACKPAGE 32802
#define | ID_INSERT_BOOKMARK 32803
#define | ID_INSERT_BOTTOMOFPAGE 32804
#define | ID_INSERT_CHART 32805
#define | ID_INSERT_CITATION 33089
#define | ID_INSERT_CLIPART 32806
#define | ID_INSERT_COVERPAGE 32808
#define | ID_INSERT_CURRENTPOSITION 33121
#define | ID_INSERT_DATETIME 32809
#define | ID_INSERT_DRAWTEXTBOX 33122
#define | ID_INSERT_DROPCAP 32812
#define | ID_INSERT_EDITFOOTER 32813
#define | ID_INSERT_EDITHEADER 32814
#define | ID_INSERT_EQUATION 32815
#define | ID_INSERT_FOOTER 32817
#define | ID_INSERT_FORMATPAGENUMBERS 32818
#define | ID_INSERT_HEADER 32819
#define | ID_INSERT_HYPERLINK 32820
#define | ID_INSERT_OBJECT 32821
#define | ID_INSERT_PAGEBREAK 32822
#define | ID_INSERT_PAGEMARGINS 32823
#define | ID_INSERT_PAGENUMBER 32824
#define | ID_INSERT_PICTURE 32825
#define | ID_INSERT_PICTUREFROMSCANER 32826
#define | ID_INSERT_QUICKPARTS 32827
#define | ID_INSERT_REFERENCE 32829
#define | ID_INSERT_REMOVECURRENTCOVERPAGE 32830
#define | ID_INSERT_REMOVEFOOTER 32831
#define | ID_INSERT_REMOVEHEADER 32832
#define | ID_INSERT_REMOVEPAGENUMBERS 32833
#define | ID_INSERT_SAVESELECTIONTOFOOTERGALLERY 32834
#define | ID_INSERT_SAVESELECTIONTOHEADERGALLERY 32835
#define | ID_INSERT_SAVESELECTIONTOTEXTBOXGALLERY 33123
#define | ID_INSERT_SAVETOCOVERPAGEGALLERY 32836
#define | ID_INSERT_SHAPES 32837
#define | ID_INSERT_SHAPESNEW 32838
#define | ID_INSERT_SIGNATURELINE 32839
#define | ID_INSERT_SMARTART 32810
#define | ID_INSERT_SYMBOL 32840
#define | ID_INSERT_TABLE 32841
#define | ID_INSERT_TEXTBOX 32842
#define | ID_INSERT_TOPOFPAGE 32843
#define | ID_INSERT_WORDART 32844
#define | ID_MAILINGS_ADDRESSBLOCK 32851
#define | ID_MAILINGS_AUTOCHECHERRORS 32852
#define | ID_MAILINGS_CREATE 32853
#define | ID_MAILINGS_CREATELABELS 32854
#define | ID_MAILINGS_DIRECTORY 32855
#define | ID_MAILINGS_EDITRECIPIENTLIST 32856
#define | ID_MAILINGS_EMAILMESSAGES 32857
#define | ID_MAILINGS_ENVELOPES 32858
#define | ID_MAILINGS_FINDRECIPIENT 32860
#define | ID_MAILINGS_FINISH 32861
#define | ID_MAILINGS_FIRSTRECORD 32862
#define | ID_MAILINGS_GOTORECORD 32863
#define | ID_MAILINGS_GREETINGLINE 32864
#define | ID_MAILINGS_HIGHLIGHT 32865
#define | ID_MAILINGS_INSERTMERGEDFIELD 32866
#define | ID_MAILINGS_LABELS 32867
#define | ID_MAILINGS_LASTRECORD 32868
#define | ID_MAILINGS_LETTERS 32869
#define | ID_MAILINGS_MATCHFIELDS 32870
#define | ID_MAILINGS_NEXTRECORD 32871
#define | ID_MAILINGS_NORMALDOCUMENT 32872
#define | ID_MAILINGS_PREVIOUSRECORD 32873
#define | ID_MAILINGS_RULES 32874
#define | ID_MAILINGS_SELECTFROMCONTACTS 32875
#define | ID_MAILINGS_SELECTRECIPIENTS 32877
#define | ID_MAILINGS_STARTMAILMERGE 32878
#define | ID_MAILINGS_STEPBYSTEPMAILMERGEWIZARD 32879
#define | ID_MAILINGS_TYPENEWLIST 32880
#define | ID_MAILINGS_UPDATELABELS 32881
#define | ID_MAILINGS_USEEXISTINGLIST 32883
#define | ID_MAILINGS_VIEWMERGEDDATA 32884
#define | ID_MAIN_BUTTON 33066
#define | ID_PAGELAYOUT_ARRANGE_ALIGN 32894
#define | ID_PAGELAYOUT_ARRANGE_BRINGTOFRONT 32895
#define | ID_PAGELAYOUT_ARRANGE_GROUP 32896
#define | ID_PAGELAYOUT_ARRANGE_POSITION 32897
#define | ID_PAGELAYOUT_ARRANGE_ROTATE 32898
#define | ID_PAGELAYOUT_ARRANGE_SENDTOBACK 32899
#define | ID_PAGELAYOUT_ARRANGE_TEXTWRAPPING 32900
#define | ID_PAGELAYOUT_BRINGFORWARD 32775
#define | ID_PAGELAYOUT_BRINGINFRONTOFTEXT 32776
#define | ID_PAGELAYOUT_BRINGTOFRONT 32777
#define | ID_PAGELAYOUT_COLORS 33082
#define | ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS 32976
#define | ID_PAGELAYOUT_COLUMNS 33086
#define | ID_PAGELAYOUT_COLUMNS_LEFT 33092
#define | ID_PAGELAYOUT_COLUMNS_MORECOLUMNS 32886
#define | ID_PAGELAYOUT_COLUMNS_ONE 32893
#define | ID_PAGELAYOUT_COLUMNS_RIGHT 32963
#define | ID_PAGELAYOUT_COLUMNS_THREE 32977
#define | ID_PAGELAYOUT_COLUMNS_TWO 32982
#define | ID_PAGELAYOUT_EFFECTS 33083
#define | ID_PAGELAYOUT_EFFECTS_ACADEMIC 32770
#define | ID_PAGELAYOUT_EFFECTS_ATRIUM 32773
#define | ID_PAGELAYOUT_EFFECTS_CIVIC 33093
#define | ID_PAGELAYOUT_EFFECTS_OFFICE 32892
#define | ID_PAGELAYOUT_FONTS 32913
#define | ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS 33206
#define | ID_PAGELAYOUT_INDENT_LEFT 33062
#define | ID_PAGELAYOUT_INDENT_RIGHT 33063
#define | ID_PAGELAYOUT_MARGINS 33084
#define | ID_PAGELAYOUT_MARGINS_CUSTOMMARGINS 33023
#define | ID_PAGELAYOUT_MARGINS_MIRRORED 32885
#define | ID_PAGELAYOUT_MARGINS_MODERATE 33124
#define | ID_PAGELAYOUT_MARGINS_NARROW 32887
#define | ID_PAGELAYOUT_MARGINS_NORMAL 32890
#define | ID_PAGELAYOUT_MARGINS_WIDE 33010
#define | ID_PAGELAYOUT_MORELAYOUTOPTIONS 33125
#define | ID_PAGELAYOUT_ORIENTATION 33085
#define | ID_PAGELAYOUT_ORIENTATION_LANDSCAPE 33094
#define | ID_PAGELAYOUT_ORIENTATION_PORTRAIT 32943
#define | ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS 32901
#define | ID_PAGELAYOUT_PAGEBACKGROUND_PAGECOLOR 32902
#define | ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK 32903
#define | ID_PAGELAYOUT_PAGESETUP_BREAKS 32904
#define | ID_PAGELAYOUT_PAGESETUP_COLUMNS 32905
#define | ID_PAGELAYOUT_PAGESETUP_HYPHENATION 32906
#define | ID_PAGELAYOUT_PAGESETUP_LINENUMBERS 32907
#define | ID_PAGELAYOUT_PAGESETUP_MARGINS 32908
#define | ID_PAGELAYOUT_PAGESETUP_ORIENTATTION 32909
#define | ID_PAGELAYOUT_PAGESETUP_SIZE 32910
#define | ID_PAGELAYOUT_PAGESETUP_SIZE_MOREPAPERSIZES 33210
#define | ID_PAGELAYOUT_SENDBACKWARD 32968
#define | ID_PAGELAYOUT_SENDBEHINDTEXT 32969
#define | ID_PAGELAYOUT_SENDTOBACK 32970
#define | ID_PAGELAYOUT_SPACE_AFTER 33065
#define | ID_PAGELAYOUT_SPACE_BEFORE 33064
#define | ID_PAGELAYOUT_TEXTWRAPPING 33090
#define | ID_PAGELAYOUT_TEXTWRAPPING_BEHINDTEXT 32774
#define | ID_PAGELAYOUT_TEXTWRAPPING_EDITWRAPPOINTS 33024
#define | ID_PAGELAYOUT_TEXTWRAPPING_INFRONTOFTEXT 33095
#define | ID_PAGELAYOUT_TEXTWRAPPING_INLINEWITHTEXT 33096
#define | ID_PAGELAYOUT_TEXTWRAPPING_SQUARE 32972
#define | ID_PAGELAYOUT_TEXTWRAPPING_THROUGH 32978
#define | ID_PAGELAYOUT_TEXTWRAPPING_TIGHT 32979
#define | ID_PAGELAYOUT_TEXTWRAPPING_TOPANDBOTTOM 32981
#define | ID_PAGELAYOUT_THEMES 33081
#define | ID_PAGELAYOUT_THEMES_BROWSEFORTHEMES 32973
#define | ID_PAGELAYOUT_THEMES_MORETHEMES 33208
#define | ID_PAGELAYOUT_THEMES_RESETFROMTEMPLATE 33207
#define | ID_PAGELAYOUT_THEMES_SAVECURRENTTHEME 32964
#define | ID_PARA_ALIGNLEFT 32915
#define | ID_PARA_ALIGNRIGHT 32916
#define | ID_PARA_BORDER 32917
#define | ID_PARA_BULLETS 32918
#define | ID_PARA_CENTER 32919
#define | ID_PARA_CHANGE_LIST_LEVEL 33068
#define | ID_PARA_DECREASEINDENT 32920
#define | ID_PARA_DEFINENEWBULLET 32921
#define | ID_PARA_DEFINENEWLISTSTYLE 32922
#define | ID_PARA_DEFINENEWMULTILEVELLIST 32923
#define | ID_PARA_DEFINENEWNUMBERFORMAT 32924
#define | ID_PARA_ENDLINEMARK 32925
#define | ID_PARA_INCREASEINDENT 32926
#define | ID_PARA_JUSTIFY 32927
#define | ID_PARA_LINESPACING 32928
#define | ID_PARA_LINESPACING1 32929
#define | ID_PARA_LINESPACING2 32930
#define | ID_PARA_LINESPACING3 32931
#define | ID_PARA_LINESPACING4 32932
#define | ID_PARA_LINESPACING5 32933
#define | ID_PARA_LINESPACING6 33126
#define | ID_PARA_LINESPACINGAFTER 32934
#define | ID_PARA_LINESPACINGBEFORE 32935
#define | ID_PARA_LINESPACINGOPTIONS 32936
#define | ID_PARA_MULTILEVEL 32937
#define | ID_PARA_MULTYLEVEL 32938
#define | ID_PARA_NUMBERING 32939
#define | ID_PARA_PAGESETUP 33029
#define | ID_PARA_SETNUMBERINGVALUE 32940
#define | ID_PARA_SHADING 32941
#define | ID_PARA_SORT 32942
#define | ID_PICTURE_FORMAT_TOOLS_BRIGHTNESS 33033
#define | ID_PICTURE_FORMAT_TOOLS_CHANGE 33037
#define | ID_PICTURE_FORMAT_TOOLS_COMPRESS 33036
#define | ID_PICTURE_FORMAT_TOOLS_CONTRAST 33034
#define | ID_PICTURE_FORMAT_TOOLS_RECOLOR 33035
#define | ID_PICTURE_FORMAT_TOOLS_RESET 33038
#define | ID_REFERENCES_ADDTEXT 33088
#define | ID_REFERENCES_ADDTEXT_LEVEL1 33097
#define | ID_REFERENCES_ADDTEXT_LEVEL2 33098
#define | ID_REFERENCES_ADDTEXT_LEVEL3 33099
#define | ID_REFERENCES_ADDTEXT_NOTSHOWNIN 32891
#define | ID_REFERENCES_CAPTIONS_CROSSREFERENCE 32946
#define | ID_REFERENCES_CAPTIONS_INSERTCAPTION 32947
#define | ID_REFERENCES_CAPTIONS_INSERTTOF 32948
#define | ID_REFERENCES_CAPTIONS_UPDATETABLE 32949
#define | ID_REFERENCES_CB_INSERTBIBLIOGRAPHY 32950
#define | ID_REFERENCES_CB_MANAGESOURCES 33100
#define | ID_REFERENCES_ENDNOTE_NEXT 32888
#define | ID_REFERENCES_ENDNOTE_PREVIOUS 32944
#define | ID_REFERENCES_FOOTNOTE_NEXT 32889
#define | ID_REFERENCES_FOOTNOTE_PREVIOUS 32945
#define | ID_REFERENCES_FOOTNOTES_INSERTENDNOTE 32952
#define | ID_REFERENCES_FOOTNOTES_INSERTFOOTNOTE 32953
#define | ID_REFERENCES_FOOTNOTES_NEXTFOOTNOTE 32954
#define | ID_REFERENCES_FOOTNOTES_SHOWNOTES 32955
#define | ID_REFERENCES_INDEX_INSERTINDEX 32956
#define | ID_REFERENCES_INDEX_MARKENTRY 32957
#define | ID_REFERENCES_INDEX_UPDATEINDEX 32958
#define | ID_REFERENCES_INSERTCITATION_ADDNEWPLACEHOLDER 32771
#define | ID_REFERENCES_INSERTCITATION_ADDNEWSOURCE 32772
#define | ID_REFERENCES_INSERTCITATION_SEARCHLIBRARIES 32965
#define | ID_REFERENCES_STYLE 32951
#define | ID_REFERENCES_TA_INSERTTOA 32959
#define | ID_REFERENCES_TA_MARKCITATION 32960
#define | ID_REFERENCES_TA_UPDATETABLE 32961
#define | ID_REFERENCES_TC_UPDATETABLE 32962
#define | ID_REVIEW_CHANGES_ACCEPT 33185
#define | ID_REVIEW_CHANGES_ACCEPT_ALL 33188
#define | ID_REVIEW_CHANGES_ACCEPT_ALLSHOWN 33187
#define | ID_REVIEW_CHANGES_ACCEPT_CHANGE 33186
#define | ID_REVIEW_CHANGES_NEXT 33194
#define | ID_REVIEW_CHANGES_PREVIOUS 33193
#define | ID_REVIEW_CHANGES_REJECT 33189
#define | ID_REVIEW_CHANGES_REJECT_ALL 33192
#define | ID_REVIEW_CHANGES_REJECT_ALLSHOWN 33191
#define | ID_REVIEW_CHANGES_REJECT_CHANGE 33190
#define | ID_REVIEW_COMMENTS_DELETE 33164
#define | ID_REVIEW_COMMENTS_DELETE_ALL 33162
#define | ID_REVIEW_COMMENTS_DELETE_ALLSHOWN 33161
#define | ID_REVIEW_COMMENTS_NEWCOMMENT 33159
#define | ID_REVIEW_COMMENTS_NEXT 33166
#define | ID_REVIEW_COMMENTS_PREVIOUS 33165
#define | ID_REVIEW_COMPARE_COMPARE 33196
#define | ID_REVIEW_COMPARE_COMPARE_COMBINE 33198
#define | ID_REVIEW_COMPARE_COMPARE_COMPARE 33197
#define | ID_REVIEW_COMPARE_SHOWSOURCE 33199
#define | ID_REVIEW_COMPARE_SHOWSOURCE_HIDESOURCE 33200
#define | ID_REVIEW_COMPARE_SHOWSOURCE_SHOWBOTH 33203
#define | ID_REVIEW_COMPARE_SHOWSOURCE_SHOWORIGINAL 33201
#define | ID_REVIEW_COMPARE_SHOWSOURCE_SHOWREVISED 33202
#define | ID_REVIEW_PROOFING_RESEARCH 33153
#define | ID_REVIEW_PROOFING_SETLANGUAGE 33157
#define | ID_REVIEW_PROOFING_SPELLINGGRAMMAR 33152
#define | ID_REVIEW_PROOFING_THESAURUS 33154
#define | ID_REVIEW_PROOFING_TRANSLATE 33155
#define | ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP 33156
#define | ID_REVIEW_PROOFING_WORDCOUNT 33158
#define | ID_REVIEW_PROTECT 33195
#define | ID_REVIEW_TRACKCHANGES_CHANGETRACKINGOPTIONS 33168
#define | ID_REVIEW_TRACKING_BALLOONS 33170
#define | ID_REVIEW_TRACKING_CHANGEUSERNAME 33169
#define | ID_REVIEW_TRACKING_DISPLAYFORREVIEW 33174
#define | ID_REVIEW_TRACKING_REVIEWINGPANE 33182
#define | ID_REVIEW_TRACKING_REVIEWINGPANE_HORIZONTAL 33184
#define | ID_REVIEW_TRACKING_REVIEWINGPANE_VERTICAL 33183
#define | ID_REVIEW_TRACKING_SHOW_ALLREVIEWERS 33181
#define | ID_REVIEW_TRACKING_SHOW_COMMENTS 33176
#define | ID_REVIEW_TRACKING_SHOW_FORMATTING 33179
#define | ID_REVIEW_TRACKING_SHOW_INK 33177
#define | ID_REVIEW_TRACKING_SHOW_INSERTIONSANDDELETIONS 33178
#define | ID_REVIEW_TRACKING_SHOW_MARKUP 33175
#define | ID_REVIEW_TRACKING_SHOW_MARKUPAREAHIGHLIGHT 33180
#define | ID_REVIEW_TRACKING_SHOWALLREVISIONS 33172
#define | ID_REVIEW_TRACKING_SHOWONLYCOOMENTS 33173
#define | ID_REVIEW_TRACKING_SHOWREVISIONS 33171
#define | ID_REVIEW_TRACKING_TRACKCHANGES 33167
#define | ID_SET_STYLE 32850
#define | ID_STATUSBAR_COLUMN 32781
#define | ID_STATUSBAR_DRAFT 32846
#define | ID_STATUSBAR_FULL_SCREEN_READING 32828
#define | ID_STATUSBAR_LINE 32780
#define | ID_STATUSBAR_LINK 33073
#define | ID_STATUSBAR_MASTER_DOCUMENT_TOOLS 32847
#define | ID_STATUSBAR_PAGE 33059
#define | ID_STATUSBAR_PRINTLAYOUT 32816
#define | ID_STATUSBAR_PROGRESS 32782
#define | ID_STATUSBAR_REFRESH 33060
#define | ID_STATUSBAR_SPELL 33061
#define | ID_STATUSBAR_WEBLAYOUT 32845
#define | ID_STATUSBAR_ZOOM 32849
#define | ID_STATUSBAR_ZOOM_SLIDER 32848
#define | ID_STOP_HIGHLIGHTING 32779
#define | ID_STYLECHANGE_COLORS 33127
#define | ID_STYLECHANGE_FONTS 33128
#define | ID_STYLECHANGE_SETDEFAULT 33129
#define | ID_STYLECHANGE_STYLESET 33130
#define | ID_TABLE_BANDEDCOLUMNS 33216
#define | ID_TABLE_BANDEDROWS 33213
#define | ID_TABLE_CONVERTTOTABLE 33101
#define | ID_TABLE_DRAWTABLE 33071
#define | ID_TABLE_EXCELSPREADSHEET 33102
#define | ID_TABLE_FIRSTCOLUMN 33214
#define | ID_TABLE_HEADERROW 33211
#define | ID_TABLE_LASTCOLUMN 33215
#define | ID_TABLE_OF_CONTENTS 33087
#define | ID_TABLE_QUICKTABLES 33103
#define | ID_TABLE_TABLE 33131
#define | ID_TABLE_TOTALROW 33212
#define | ID_TOOLS_OPTIONS 33070
#define | ID_VIEW_APPLOOK_2003 32985
#define | ID_VIEW_APPLOOK_2007_1 32986
#define | ID_VIEW_APPLOOK_2007_2 32987
#define | ID_VIEW_APPLOOK_2007_3 32988
#define | ID_VIEW_APPLOOK_2007_4 32989
#define | ID_VIEW_APPLOOK_WIN7 32990
#define | ID_VIEW_ARRANGEALL 32218
#define | ID_VIEW_COMPARE 32991
#define | ID_VIEW_CUSTOMIZE 32992
#define | ID_VIEW_DOCUMENTMAP 32993
#define | ID_VIEW_DRAFT 32994
#define | ID_VIEW_FULLSCREEN 32995
#define | ID_VIEW_GRIDLINES 32996
#define | ID_VIEW_MACROS 33079
#define | ID_VIEW_MESSAGEBAR 32984
#define | ID_VIEW_NEWWINDOW 32997
#define | ID_VIEW_OUTLINE 32998
#define | ID_VIEW_PRINTLAYOUT 32999
#define | ID_VIEW_PROPERTIES 33000
#define | ID_VIEW_RESETWINDOW 33001
#define | ID_VIEW_RTL 33072
#define | ID_VIEW_RULER 33002
#define | ID_VIEW_SPLIT 33003
#define | ID_VIEW_SWITCHWINDOW 33004
#define | ID_VIEW_SYNCSCROLLING 33005
#define | ID_VIEW_TASK_PANE 32975
#define | ID_VIEW_TOOLBARS 33006
#define | ID_VIEW_TRUMBNAILS 33007
#define | ID_VIEW_WEBLAYOUT 33008
#define | ID_VIEW_ZOOM 33009
#define | ID_VIEW_ZOOM_100 33075
#define | ID_VIEW_ZOOM_ONE_PAGE 33076
#define | ID_VIEW_ZOOM_PAGE_WIDTH 33078
#define | ID_VIEW_ZOOM_TWO_PAGES 33077
#define | ID_WRITE_APPLYSTYLES 33011
#define | ID_WRITE_CHANGESTYLES 33012
#define | ID_WRITE_CLEARFORMATTING 33013
#define | ID_WRITE_CLIPBOARD 33025
#define | ID_WRITE_FONT 33026
#define | ID_WRITE_PARAGRAPH 33027
#define | ID_WRITE_QUICKSTYLES 33016
#define | ID_WRITE_SAVESTYLE 33020
#define | ID_WRITE_SELECT 33022
#define | ID_WRITE_STYLE 33028
#define | IDB_BULLETS 189
#define | IDB_BUTTONS 100
#define | IDB_CHART 176
#define | IDB_CHART_DESIGN 180
#define | IDB_CHART_DESIGNLARGE 181
#define | IDB_CHART_FORMAT 184
#define | IDB_CHART_FORMATLARGE 185
#define | IDB_CHART_LAYOUT 182
#define | IDB_CHART_LAYOUTLARGE 183
#define | IDB_FILELARGE 169
#define | IDB_FILESMALL 170
#define | IDB_HEADERPAT_1 200
#define | IDB_HEADERPAT_2 201
#define | IDB_HEADERPAT_3 202
#define | IDB_HEADERPAT_4 203
#define | IDB_INFO 204
#define | IDB_INSERT 101
#define | IDB_INSERTLARGE 102
#define | IDB_LAYOUT 186
#define | IDB_MAILINGS 106
#define | IDB_MAILINGSLARGE 107
#define | IDB_MAIN 108
#define | IDB_MULTI 208
#define | IDB_NUM 190
#define | IDB_OPTIONS 192
#define | IDB_PAGELAYOUT 109
#define | IDB_PAGELAYOUTLARGE 110
#define | IDB_PICTURE 175
#define | IDB_PICTURE_FORMAT 178
#define | IDB_PICTURE_FORMATLARGE 179
#define | IDB_POSITION_1 209
#define | IDB_POSITION_2 210
#define | IDB_REFERENCES 111
#define | IDB_REFERENCESLARGE 112
#define | IDB_REVIEW 211
#define | IDB_REVIEWLARGE 212
#define | IDB_SHAPE1 163
#define | IDB_SHAPE2 164
#define | IDB_SHAPE3 172
#define | IDB_SHAPE4 173
#define | IDB_SHAPE5 174
#define | IDB_SHAPE6 168
#define | IDB_SHAPE7 162
#define | IDB_SPELL 187
#define | IDB_STYLES 171
#define | IDB_TABLE 177
#define | IDB_THEME_COLORS 222
#define | IDB_THEME_EFFECTS 225
#define | IDB_THEME_FONTS 227
#define | IDB_THEME_THEMES 224
#define | IDB_TOOLTIP_CLIPBOARD 167
#define | IDB_TOOLTIP_FONTDLG 165
#define | IDB_TOOLTIP_MAIN 188
#define | IDB_TOOLTIP_PARAGRAPH 166
#define | IDB_VIEW 114
#define | IDB_VIEWLARGE 115
#define | IDB_VIEWPAT_1 154
#define | IDB_VIEWPAT_2 155
#define | IDB_VIEWPAT_3 156
#define | IDB_VIEWPAT_4 157
#define | IDB_WRITE 116
#define | IDB_WRITELARGE 117
#define | IDC_BANER 1010
#define | IDC_COLOR_SCHEME 1007
#define | IDC_CONTACT 1009
#define | IDC_HOME 1008
#define | IDC_PRODUCT 1010
#define | IDC_SCREENTIP_STYLE 1008
#define | IDC_SHOW_DEV_TAB 1006
#define | IDC_SHOW_FLOATY 1005
#define | IDC_SHOW_KEY_TIPS 1009
#define | IDC_SUPPORT 1011
#define | IDD_ABOUTBOX 999
#define | IDD_POPULAR_PAGE 106
#define | IDD_RES_PAGE 107
#define | IDI_REFRESH 186
#define | IDI_SPELL 187
#define | IDP_FAILED_TO_CREATE 119
#define | IDP_OLE_INIT_FAILED 120
#define | IDR_CNTR_INPLACE 122
#define | IDR_CONTEXT_MENU 123
#define | IDR_DUMMY_MENU 165
#define | IDR_FONT 125
#define | IDR_INSERT_COVERPAGE_MENU 127
#define | IDR_INSERT_FOOTER_MENU 129
#define | IDR_INSERT_HEADER_MENU 130
#define | IDR_INSERT_PAGENUMBERS_MENU 131
#define | IDR_INSERT_PICTURE_MENU 132
#define | IDR_INSERT_SHAPES_MENU 133
#define | IDR_INSERT_TABLE_MENU 162
#define | IDR_INSERT_TEXTBOX_MENU 207
#define | IDR_MAIL_MERGE_MENU 134
#define | IDR_MAIL_RECIPIENTS_MENU 135
#define | IDR_MAINFRAME 128
#define | IDR_MSTYPE 168
#define | IDR_PAGELAYOUT_BRINGTOFRONT 137
#define | IDR_PAGELAYOUT_COLUMNS 139
#define | IDR_PAGELAYOUT_MARGINS 141
#define | IDR_PAGELAYOUT_ORIENTATION 142
#define | IDR_PAGELAYOUT_SENDTOBACK 143
#define | IDR_PAGELAYOUT_TEXTWRAPPING 144
#define | IDR_PARA_BULLETS_MENU 146
#define | IDR_PARA_LINESPACING_MENU 147
#define | IDR_PARA_MULTILIST_MENU 148
#define | IDR_PARA_NUMBERING_MENU 149
#define | IDR_PARAGRAPH 150
#define | IDR_REFERENCES_ADDTEXT 153
#define | IDR_REFERENCES_INSERTCITATION 154
#define | IDR_REFERENCES_NEXTFOOTNOTE 155
#define | IDR_REVIEW_CHANGES_ACCEPT 218
#define | IDR_REVIEW_CHANGES_REJECT 219
#define | IDR_REVIEW_COMMENTS_DELETE 213
#define | IDR_REVIEW_COMPARE_COMPARE_COMPARE 221
#define | IDR_REVIEW_COMPARE_SHOWSOURCE 220
#define | IDR_REVIEW_TRACKING_BALLOONS 215
#define | IDR_REVIEW_TRACKING_REVIEWINGPANE 217
#define | IDR_REVIEW_TRACKING_SHOW 216
#define | IDR_REVIEW_TRACKING_TRACKCHANGES 214
#define | IDR_THEME_MENU 163
#define | IDR_THEME_MENU_STATIC 164
#define | IDR_WRITE_BORDERS_MENU 205
#define | IDR_WRITE_FIND_MENU 206
#define | IDR_WRITE_FONTCASE_MENU 126
#define | IDR_WRITE_PASTE_MENU 151
#define | IDR_WRITE_SELECT_MENU 157
#define | IDR_WRITE_STYLECHANGE_MENU 161

Define Documentation

#define ID_BORDERS_ALLBORDERS 33104

Definition at line 454 of file Resource.h.

#define ID_BORDERS_BORDERSANDSHADING 33105

Definition at line 455 of file Resource.h.

#define ID_BORDERS_BOTTOMBORDER 33106

Definition at line 456 of file Resource.h.

#define ID_BORDERS_DIAGONALDOWNBORDER 33107

Definition at line 457 of file Resource.h.

#define ID_BORDERS_DIAGONALUPBORDER 33108

Definition at line 458 of file Resource.h.

#define ID_BORDERS_HORIZONTALLINE 33109

Definition at line 459 of file Resource.h.

#define ID_BORDERS_INSIDEBORDERS 33110

Definition at line 460 of file Resource.h.

#define ID_BORDERS_INSIDEHORIZONTALBORDER 33111

Definition at line 461 of file Resource.h.

#define ID_BORDERS_INSIDEVERTICALBORDER 33112

Definition at line 462 of file Resource.h.

#define ID_BORDERS_LEFTBORDER 33113

Definition at line 463 of file Resource.h.

#define ID_BORDERS_NOBORDER 33114

Definition at line 464 of file Resource.h.

#define ID_BORDERS_OUTSIDEBORDERS 33115

Definition at line 465 of file Resource.h.

#define ID_BORDERS_RIGHTBORDER 33116

Definition at line 466 of file Resource.h.

#define ID_BORDERS_TOPBORDER 33117

Definition at line 467 of file Resource.h.

#define ID_BORDERS_VIEWGRIDLINES 33118

Definition at line 468 of file Resource.h.

#define ID_CANCEL_EDIT_CNTR 32779

Definition at line 140 of file Resource.h.

#define ID_CHART_DESIGN_DATA_EDIT 33042

Definition at line 392 of file Resource.h.

#define ID_CHART_DESIGN_DATA_SHOW 33043

Definition at line 393 of file Resource.h.

#define ID_CHART_DESIGN_DATA_SWITCH 33041

Definition at line 391 of file Resource.h.

#define ID_CHART_DESIGN_TYPE_CHANGE 33039

Definition at line 389 of file Resource.h.

#define ID_CHART_DESIGN_TYPE_SAVETEMPLATE 33040

Definition at line 390 of file Resource.h.

#define ID_CHART_FORMAT_CURSEL_FORMAT 33054

Definition at line 404 of file Resource.h.

#define ID_CHART_FORMAT_CURSEL_RESET 33055

Definition at line 405 of file Resource.h.

#define ID_CHART_FORMAT_SHAPES_EFFECTS 33058

Definition at line 408 of file Resource.h.

#define ID_CHART_FORMAT_SHAPES_FILL 33056

Definition at line 406 of file Resource.h.

#define ID_CHART_FORMAT_SHAPES_OUTLINE 33057

Definition at line 407 of file Resource.h.

#define ID_CHART_LAYOUT_AXES_AXES 33052

Definition at line 402 of file Resource.h.

#define ID_CHART_LAYOUT_AXES_GRIDLINES 33053

Definition at line 403 of file Resource.h.

#define ID_CHART_LAYOUT_LABELS_AXIS 33048

Definition at line 398 of file Resource.h.

#define ID_CHART_LAYOUT_LABELS_DATALABELS 33050

Definition at line 400 of file Resource.h.

#define ID_CHART_LAYOUT_LABELS_DATATABLE 33051

Definition at line 401 of file Resource.h.

#define ID_CHART_LAYOUT_LABELS_LEGEND 33049

Definition at line 399 of file Resource.h.

#define ID_CHART_LAYOUT_LABELS_TITLE 33047

Definition at line 397 of file Resource.h.

#define ID_CHART_LAYOUT_SHAPES_PICTURE 33044

Definition at line 394 of file Resource.h.

#define ID_CHART_LAYOUT_SHAPES_SHAPES 33045

Definition at line 395 of file Resource.h.

#define ID_CHART_LAYOUT_SHAPES_TEXTBOX 33046

Definition at line 396 of file Resource.h.

#define ID_CUSTOMIZE_QUICK_ACCESS_TOOLBAR 33032

Definition at line 382 of file Resource.h.

#define ID_DUMMY 33080

Definition at line 430 of file Resource.h.

#define ID_EDIT_COPYFORMAT 32784

Definition at line 146 of file Resource.h.

#define ID_EDIT_GOTO 33014

Definition at line 370 of file Resource.h.

#define ID_EDIT_PASTE_HYPERLINK 33015

Definition at line 371 of file Resource.h.

#define ID_EDIT_SELECTFORMAT 32966

Definition at line 322 of file Resource.h.

#define ID_EDIT_SELECTOBJECTS 32967

Definition at line 323 of file Resource.h.

#define ID_FILE_PREPARE 32801

Definition at line 163 of file Resource.h.

#define ID_FILE_PREPARE_ADD_SIGNATURE 33143

Definition at line 492 of file Resource.h.

#define ID_FILE_PREPARE_ENCRYPT 33142

Definition at line 491 of file Resource.h.

#define ID_FILE_PREPARE_INSPECT 33141

Definition at line 490 of file Resource.h.

#define ID_FILE_PREPARE_MARK_AS_FINAL 33144

Definition at line 493 of file Resource.h.

#define ID_FILE_PREPARE_PROPERTIES 33140

Definition at line 489 of file Resource.h.

#define ID_FILE_PREPARE_RUN_CHECKER 33145

Definition at line 494 of file Resource.h.

#define ID_FILE_PUBLISH 33133

Definition at line 482 of file Resource.h.

#define ID_FILE_PUBLISH_BLOG 33134

Definition at line 483 of file Resource.h.

#define ID_FILE_PUBLISH_CREATE_DOCWORKSPACE 32800

Definition at line 162 of file Resource.h.

#define ID_FILE_PUBLISH_DOCMANAGE_SERVER 32785

Definition at line 147 of file Resource.h.

#define ID_FILE_SAVE_AS_ADDINS 33138

Definition at line 487 of file Resource.h.

#define ID_FILE_SAVE_AS_DOCUMENT 33135

Definition at line 484 of file Resource.h.

#define ID_FILE_SAVE_AS_DOCUMENT_OLD 33137

Definition at line 486 of file Resource.h.

#define ID_FILE_SAVE_AS_OTHER 33139

Definition at line 488 of file Resource.h.

#define ID_FILE_SAVE_AS_TEMPLATE 33136

Definition at line 485 of file Resource.h.

#define ID_FILE_SEND 32807

Definition at line 169 of file Resource.h.

#define ID_FILE_SEND_EMAIL 32778

Definition at line 139 of file Resource.h.

#define ID_FILE_SEND_FAX 32783

Definition at line 145 of file Resource.h.

#define ID_FONT_BOLD 32786

Definition at line 148 of file Resource.h.

#define ID_FONT_CASE_CAPITALIZE 32974

Definition at line 330 of file Resource.h.

#define ID_FONT_CASE_LOWERCASE 33091

Definition at line 441 of file Resource.h.

#define ID_FONT_CASE_SENTENCE 32971

Definition at line 327 of file Resource.h.

#define ID_FONT_CASE_TOGGLECASE 32980

Definition at line 336 of file Resource.h.

#define ID_FONT_CASE_UPPERCASE 32983

Definition at line 339 of file Resource.h.

#define ID_FONT_CHANGECASE 32787

Definition at line 149 of file Resource.h.

#define ID_FONT_CLEARFORMAT 32788

Definition at line 150 of file Resource.h.

#define ID_FONT_COLOR 32789

Definition at line 151 of file Resource.h.

#define ID_FONT_FONT 32790

Definition at line 152 of file Resource.h.

#define ID_FONT_FONTSIZE 32791

Definition at line 153 of file Resource.h.

#define ID_FONT_GROWFONT 32792

Definition at line 154 of file Resource.h.

#define ID_FONT_ITALIC 32793

Definition at line 155 of file Resource.h.

#define ID_FONT_NOT_FOUND 32217

Definition at line 555 of file Resource.h.

#define ID_FONT_SHRINK 32794

Definition at line 156 of file Resource.h.

#define ID_FONT_STRIKETHROUGH 32795

Definition at line 157 of file Resource.h.

#define ID_FONT_SUBSCRIPT 32796

Definition at line 158 of file Resource.h.

#define ID_FONT_SUPERSCRIPT 32797

Definition at line 159 of file Resource.h.

#define ID_FONT_TEXTHIGHLIGHT 32798

Definition at line 160 of file Resource.h.

#define ID_FONT_UNDERLINE 32799

Definition at line 161 of file Resource.h.

#define ID_FROM_PALETTE_BULLET 33067

Definition at line 417 of file Resource.h.

#define ID_FROM_PALETTE_MULTILEVEL 33119

Definition at line 469 of file Resource.h.

#define ID_FROM_PALETTE_NUMBER 33069

Definition at line 419 of file Resource.h.

#define ID_FROM_PALETTE_POSITION 33120

Definition at line 470 of file Resource.h.

#define ID_FROM_PALETTE_TABLE 33074

Definition at line 424 of file Resource.h.

#define ID_GROUP_SHORTCUTS 32811

Definition at line 173 of file Resource.h.

#define ID_INSERT_BLACKPAGE 32802

Definition at line 164 of file Resource.h.

#define ID_INSERT_BOOKMARK 32803

Definition at line 165 of file Resource.h.

#define ID_INSERT_BOTTOMOFPAGE 32804

Definition at line 166 of file Resource.h.

#define ID_INSERT_CHART 32805

Definition at line 167 of file Resource.h.

#define ID_INSERT_CITATION 33089

Definition at line 439 of file Resource.h.

#define ID_INSERT_CLIPART 32806

Definition at line 168 of file Resource.h.

#define ID_INSERT_COVERPAGE 32808

Definition at line 170 of file Resource.h.

#define ID_INSERT_CURRENTPOSITION 33121

Definition at line 471 of file Resource.h.

#define ID_INSERT_DATETIME 32809

Definition at line 171 of file Resource.h.

#define ID_INSERT_DRAWTEXTBOX 33122

Definition at line 472 of file Resource.h.

#define ID_INSERT_DROPCAP 32812

Definition at line 174 of file Resource.h.

#define ID_INSERT_EDITFOOTER 32813

Definition at line 175 of file Resource.h.

#define ID_INSERT_EDITHEADER 32814

Definition at line 176 of file Resource.h.

#define ID_INSERT_EQUATION 32815

Definition at line 177 of file Resource.h.

#define ID_INSERT_FOOTER 32817

Definition at line 179 of file Resource.h.

#define ID_INSERT_FORMATPAGENUMBERS 32818

Definition at line 180 of file Resource.h.

#define ID_INSERT_HEADER 32819

Definition at line 181 of file Resource.h.

#define ID_INSERT_HYPERLINK 32820

Definition at line 182 of file Resource.h.

#define ID_INSERT_OBJECT 32821

Definition at line 183 of file Resource.h.

#define ID_INSERT_PAGEBREAK 32822

Definition at line 184 of file Resource.h.

#define ID_INSERT_PAGEMARGINS 32823

Definition at line 185 of file Resource.h.

#define ID_INSERT_PAGENUMBER 32824

Definition at line 186 of file Resource.h.

#define ID_INSERT_PICTURE 32825

Definition at line 187 of file Resource.h.

#define ID_INSERT_PICTUREFROMSCANER 32826

Definition at line 188 of file Resource.h.

#define ID_INSERT_QUICKPARTS 32827

Definition at line 189 of file Resource.h.

#define ID_INSERT_REFERENCE 32829

Definition at line 191 of file Resource.h.

#define ID_INSERT_REMOVECURRENTCOVERPAGE 32830

Definition at line 192 of file Resource.h.

#define ID_INSERT_REMOVEFOOTER 32831

Definition at line 193 of file Resource.h.

#define ID_INSERT_REMOVEHEADER 32832

Definition at line 194 of file Resource.h.

#define ID_INSERT_REMOVEPAGENUMBERS 32833

Definition at line 195 of file Resource.h.

#define ID_INSERT_SAVESELECTIONTOFOOTERGALLERY 32834

Definition at line 196 of file Resource.h.

#define ID_INSERT_SAVESELECTIONTOHEADERGALLERY 32835

Definition at line 197 of file Resource.h.

#define ID_INSERT_SAVESELECTIONTOTEXTBOXGALLERY 33123

Definition at line 473 of file Resource.h.

#define ID_INSERT_SAVETOCOVERPAGEGALLERY 32836

Definition at line 198 of file Resource.h.

#define ID_INSERT_SHAPES 32837

Definition at line 199 of file Resource.h.

#define ID_INSERT_SHAPESNEW 32838

Definition at line 200 of file Resource.h.

#define ID_INSERT_SIGNATURELINE 32839

Definition at line 201 of file Resource.h.

#define ID_INSERT_SMARTART 32810

Definition at line 172 of file Resource.h.

#define ID_INSERT_SYMBOL 32840

Definition at line 202 of file Resource.h.

#define ID_INSERT_TABLE 32841

Definition at line 203 of file Resource.h.

#define ID_INSERT_TEXTBOX 32842

Definition at line 204 of file Resource.h.

#define ID_INSERT_TOPOFPAGE 32843

Definition at line 205 of file Resource.h.

#define ID_INSERT_WORDART 32844

Definition at line 206 of file Resource.h.

#define ID_MAILINGS_ADDRESSBLOCK 32851

Definition at line 213 of file Resource.h.

#define ID_MAILINGS_AUTOCHECHERRORS 32852

Definition at line 214 of file Resource.h.

#define ID_MAILINGS_CREATE 32853

Definition at line 215 of file Resource.h.

#define ID_MAILINGS_CREATELABELS 32854

Definition at line 216 of file Resource.h.

#define ID_MAILINGS_DIRECTORY 32855

Definition at line 217 of file Resource.h.

#define ID_MAILINGS_EDITRECIPIENTLIST 32856

Definition at line 218 of file Resource.h.

#define ID_MAILINGS_EMAILMESSAGES 32857

Definition at line 219 of file Resource.h.

#define ID_MAILINGS_ENVELOPES 32858

Definition at line 220 of file Resource.h.

#define ID_MAILINGS_FINDRECIPIENT 32860

Definition at line 221 of file Resource.h.

#define ID_MAILINGS_FINISH 32861

Definition at line 222 of file Resource.h.

#define ID_MAILINGS_FIRSTRECORD 32862

Definition at line 223 of file Resource.h.

#define ID_MAILINGS_GOTORECORD 32863

Definition at line 224 of file Resource.h.

#define ID_MAILINGS_GREETINGLINE 32864

Definition at line 225 of file Resource.h.

#define ID_MAILINGS_HIGHLIGHT 32865

Definition at line 226 of file Resource.h.

#define ID_MAILINGS_INSERTMERGEDFIELD 32866

Definition at line 227 of file Resource.h.

#define ID_MAILINGS_LABELS 32867

Definition at line 228 of file Resource.h.

#define ID_MAILINGS_LASTRECORD 32868

Definition at line 229 of file Resource.h.

#define ID_MAILINGS_LETTERS 32869

Definition at line 230 of file Resource.h.

#define ID_MAILINGS_MATCHFIELDS 32870

Definition at line 231 of file Resource.h.

#define ID_MAILINGS_NEXTRECORD 32871

Definition at line 232 of file Resource.h.

#define ID_MAILINGS_NORMALDOCUMENT 32872

Definition at line 233 of file Resource.h.

#define ID_MAILINGS_PREVIOUSRECORD 32873

Definition at line 234 of file Resource.h.

#define ID_MAILINGS_RULES 32874

Definition at line 235 of file Resource.h.

#define ID_MAILINGS_SELECTFROMCONTACTS 32875

Definition at line 236 of file Resource.h.

#define ID_MAILINGS_SELECTRECIPIENTS 32877

Definition at line 237 of file Resource.h.

#define ID_MAILINGS_STARTMAILMERGE 32878

Definition at line 238 of file Resource.h.

#define ID_MAILINGS_STEPBYSTEPMAILMERGEWIZARD 32879

Definition at line 239 of file Resource.h.

#define ID_MAILINGS_TYPENEWLIST 32880

Definition at line 240 of file Resource.h.

#define ID_MAILINGS_UPDATELABELS 32881

Definition at line 241 of file Resource.h.

#define ID_MAILINGS_USEEXISTINGLIST 32883

Definition at line 242 of file Resource.h.

#define ID_MAILINGS_VIEWMERGEDDATA 32884

Definition at line 243 of file Resource.h.

#define ID_MAIN_BUTTON 33066

Definition at line 416 of file Resource.h.

#define ID_PAGELAYOUT_ARRANGE_ALIGN 32894

Definition at line 253 of file Resource.h.

#define ID_PAGELAYOUT_ARRANGE_BRINGTOFRONT 32895

Definition at line 254 of file Resource.h.

#define ID_PAGELAYOUT_ARRANGE_GROUP 32896

Definition at line 255 of file Resource.h.

#define ID_PAGELAYOUT_ARRANGE_POSITION 32897

Definition at line 256 of file Resource.h.

#define ID_PAGELAYOUT_ARRANGE_ROTATE 32898

Definition at line 257 of file Resource.h.

#define ID_PAGELAYOUT_ARRANGE_SENDTOBACK 32899

Definition at line 258 of file Resource.h.

#define ID_PAGELAYOUT_ARRANGE_TEXTWRAPPING 32900

Definition at line 259 of file Resource.h.

#define ID_PAGELAYOUT_BRINGFORWARD 32775

Definition at line 136 of file Resource.h.

#define ID_PAGELAYOUT_BRINGINFRONTOFTEXT 32776

Definition at line 137 of file Resource.h.

#define ID_PAGELAYOUT_BRINGTOFRONT 32777

Definition at line 138 of file Resource.h.

#define ID_PAGELAYOUT_COLORS 33082

Definition at line 432 of file Resource.h.

#define ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS 32976

Definition at line 332 of file Resource.h.

#define ID_PAGELAYOUT_COLUMNS 33086

Definition at line 436 of file Resource.h.

#define ID_PAGELAYOUT_COLUMNS_LEFT 33092

Definition at line 442 of file Resource.h.

#define ID_PAGELAYOUT_COLUMNS_MORECOLUMNS 32886

Definition at line 245 of file Resource.h.

#define ID_PAGELAYOUT_COLUMNS_ONE 32893

Definition at line 252 of file Resource.h.

#define ID_PAGELAYOUT_COLUMNS_RIGHT 32963

Definition at line 319 of file Resource.h.

#define ID_PAGELAYOUT_COLUMNS_THREE 32977

Definition at line 333 of file Resource.h.

#define ID_PAGELAYOUT_COLUMNS_TWO 32982

Definition at line 338 of file Resource.h.

#define ID_PAGELAYOUT_EFFECTS 33083

Definition at line 433 of file Resource.h.

#define ID_PAGELAYOUT_EFFECTS_ACADEMIC 32770

Definition at line 131 of file Resource.h.

#define ID_PAGELAYOUT_EFFECTS_ATRIUM 32773

Definition at line 134 of file Resource.h.

#define ID_PAGELAYOUT_EFFECTS_CIVIC 33093

Definition at line 443 of file Resource.h.

#define ID_PAGELAYOUT_EFFECTS_OFFICE 32892

Definition at line 251 of file Resource.h.

#define ID_PAGELAYOUT_FONTS 32913

Definition at line 270 of file Resource.h.

#define ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS 33206

Definition at line 545 of file Resource.h.

#define ID_PAGELAYOUT_INDENT_LEFT 33062

Definition at line 412 of file Resource.h.

#define ID_PAGELAYOUT_INDENT_RIGHT 33063

Definition at line 413 of file Resource.h.

#define ID_PAGELAYOUT_MARGINS 33084

Definition at line 434 of file Resource.h.

#define ID_PAGELAYOUT_MARGINS_CUSTOMMARGINS 33023

Definition at line 375 of file Resource.h.

#define ID_PAGELAYOUT_MARGINS_MIRRORED 32885

Definition at line 244 of file Resource.h.

#define ID_PAGELAYOUT_MARGINS_MODERATE 33124

Definition at line 474 of file Resource.h.

#define ID_PAGELAYOUT_MARGINS_NARROW 32887

Definition at line 246 of file Resource.h.

#define ID_PAGELAYOUT_MARGINS_NORMAL 32890

Definition at line 249 of file Resource.h.

#define ID_PAGELAYOUT_MARGINS_WIDE 33010

Definition at line 366 of file Resource.h.

#define ID_PAGELAYOUT_MORELAYOUTOPTIONS 33125

Definition at line 475 of file Resource.h.

#define ID_PAGELAYOUT_ORIENTATION 33085

Definition at line 435 of file Resource.h.

#define ID_PAGELAYOUT_ORIENTATION_LANDSCAPE 33094

Definition at line 444 of file Resource.h.

#define ID_PAGELAYOUT_ORIENTATION_PORTRAIT 32943

Definition at line 299 of file Resource.h.

#define ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS 32901

Definition at line 260 of file Resource.h.

#define ID_PAGELAYOUT_PAGEBACKGROUND_PAGECOLOR 32902

Definition at line 261 of file Resource.h.

#define ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK 32903

Definition at line 262 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_BREAKS 32904

Definition at line 263 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_COLUMNS 32905

Definition at line 264 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_HYPHENATION 32906

Definition at line 265 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_LINENUMBERS 32907

Definition at line 266 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_MARGINS 32908

Definition at line 267 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_ORIENTATTION 32909

Definition at line 268 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_SIZE 32910

Definition at line 269 of file Resource.h.

#define ID_PAGELAYOUT_PAGESETUP_SIZE_MOREPAPERSIZES 33210

Definition at line 548 of file Resource.h.

#define ID_PAGELAYOUT_SENDBACKWARD 32968

Definition at line 324 of file Resource.h.

#define ID_PAGELAYOUT_SENDBEHINDTEXT 32969

Definition at line 325 of file Resource.h.

#define ID_PAGELAYOUT_SENDTOBACK 32970

Definition at line 326 of file Resource.h.

#define ID_PAGELAYOUT_SPACE_AFTER 33065

Definition at line 415 of file Resource.h.

#define ID_PAGELAYOUT_SPACE_BEFORE 33064

Definition at line 414 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING 33090

Definition at line 440 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_BEHINDTEXT 32774

Definition at line 135 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_EDITWRAPPOINTS 33024

Definition at line 376 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_INFRONTOFTEXT 33095

Definition at line 445 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_INLINEWITHTEXT 33096

Definition at line 446 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_SQUARE 32972

Definition at line 328 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_THROUGH 32978

Definition at line 334 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_TIGHT 32979

Definition at line 335 of file Resource.h.

#define ID_PAGELAYOUT_TEXTWRAPPING_TOPANDBOTTOM 32981

Definition at line 337 of file Resource.h.

#define ID_PAGELAYOUT_THEMES 33081

Definition at line 431 of file Resource.h.

#define ID_PAGELAYOUT_THEMES_BROWSEFORTHEMES 32973

Definition at line 329 of file Resource.h.

#define ID_PAGELAYOUT_THEMES_MORETHEMES 33208

Definition at line 547 of file Resource.h.

#define ID_PAGELAYOUT_THEMES_RESETFROMTEMPLATE 33207

Definition at line 546 of file Resource.h.

#define ID_PAGELAYOUT_THEMES_SAVECURRENTTHEME 32964

Definition at line 320 of file Resource.h.

#define ID_PARA_ALIGNLEFT 32915

Definition at line 271 of file Resource.h.

#define ID_PARA_ALIGNRIGHT 32916

Definition at line 272 of file Resource.h.

#define ID_PARA_BORDER 32917

Definition at line 273 of file Resource.h.

#define ID_PARA_BULLETS 32918

Definition at line 274 of file Resource.h.

#define ID_PARA_CENTER 32919

Definition at line 275 of file Resource.h.

#define ID_PARA_CHANGE_LIST_LEVEL 33068

Definition at line 418 of file Resource.h.

#define ID_PARA_DECREASEINDENT 32920

Definition at line 276 of file Resource.h.

#define ID_PARA_DEFINENEWBULLET 32921

Definition at line 277 of file Resource.h.

#define ID_PARA_DEFINENEWLISTSTYLE 32922

Definition at line 278 of file Resource.h.

#define ID_PARA_DEFINENEWMULTILEVELLIST 32923

Definition at line 279 of file Resource.h.

#define ID_PARA_DEFINENEWNUMBERFORMAT 32924

Definition at line 280 of file Resource.h.

#define ID_PARA_ENDLINEMARK 32925

Definition at line 281 of file Resource.h.

#define ID_PARA_INCREASEINDENT 32926

Definition at line 282 of file Resource.h.

#define ID_PARA_JUSTIFY 32927

Definition at line 283 of file Resource.h.

#define ID_PARA_LINESPACING 32928

Definition at line 284 of file Resource.h.

#define ID_PARA_LINESPACING1 32929

Definition at line 285 of file Resource.h.

#define ID_PARA_LINESPACING2 32930

Definition at line 286 of file Resource.h.

#define ID_PARA_LINESPACING3 32931

Definition at line 287 of file Resource.h.

#define ID_PARA_LINESPACING4 32932

Definition at line 288 of file Resource.h.

#define ID_PARA_LINESPACING5 32933

Definition at line 289 of file Resource.h.

#define ID_PARA_LINESPACING6 33126

Definition at line 476 of file Resource.h.

#define ID_PARA_LINESPACINGAFTER 32934

Definition at line 290 of file Resource.h.

#define ID_PARA_LINESPACINGBEFORE 32935

Definition at line 291 of file Resource.h.

#define ID_PARA_LINESPACINGOPTIONS 32936

Definition at line 292 of file Resource.h.

#define ID_PARA_MULTILEVEL 32937

Definition at line 293 of file Resource.h.

#define ID_PARA_MULTYLEVEL 32938

Definition at line 294 of file Resource.h.

#define ID_PARA_NUMBERING 32939

Definition at line 295 of file Resource.h.

#define ID_PARA_PAGESETUP 33029

Definition at line 381 of file Resource.h.

#define ID_PARA_SETNUMBERINGVALUE 32940

Definition at line 296 of file Resource.h.

#define ID_PARA_SHADING 32941

Definition at line 297 of file Resource.h.

#define ID_PARA_SORT 32942

Definition at line 298 of file Resource.h.

#define ID_PICTURE_FORMAT_TOOLS_BRIGHTNESS 33033

Definition at line 383 of file Resource.h.

#define ID_PICTURE_FORMAT_TOOLS_CHANGE 33037

Definition at line 387 of file Resource.h.

#define ID_PICTURE_FORMAT_TOOLS_COMPRESS 33036

Definition at line 386 of file Resource.h.

#define ID_PICTURE_FORMAT_TOOLS_CONTRAST 33034

Definition at line 384 of file Resource.h.

#define ID_PICTURE_FORMAT_TOOLS_RECOLOR 33035

Definition at line 385 of file Resource.h.

#define ID_PICTURE_FORMAT_TOOLS_RESET 33038

Definition at line 388 of file Resource.h.

#define ID_REFERENCES_ADDTEXT 33088

Definition at line 438 of file Resource.h.

#define ID_REFERENCES_ADDTEXT_LEVEL1 33097

Definition at line 447 of file Resource.h.

#define ID_REFERENCES_ADDTEXT_LEVEL2 33098

Definition at line 448 of file Resource.h.

#define ID_REFERENCES_ADDTEXT_LEVEL3 33099

Definition at line 449 of file Resource.h.

#define ID_REFERENCES_ADDTEXT_NOTSHOWNIN 32891

Definition at line 250 of file Resource.h.

#define ID_REFERENCES_CAPTIONS_CROSSREFERENCE 32946

Definition at line 302 of file Resource.h.

#define ID_REFERENCES_CAPTIONS_INSERTCAPTION 32947

Definition at line 303 of file Resource.h.

#define ID_REFERENCES_CAPTIONS_INSERTTOF 32948

Definition at line 304 of file Resource.h.

#define ID_REFERENCES_CAPTIONS_UPDATETABLE 32949

Definition at line 305 of file Resource.h.

#define ID_REFERENCES_CB_INSERTBIBLIOGRAPHY 32950

Definition at line 306 of file Resource.h.

#define ID_REFERENCES_CB_MANAGESOURCES 33100

Definition at line 450 of file Resource.h.

#define ID_REFERENCES_ENDNOTE_NEXT 32888

Definition at line 247 of file Resource.h.

#define ID_REFERENCES_ENDNOTE_PREVIOUS 32944

Definition at line 300 of file Resource.h.

#define ID_REFERENCES_FOOTNOTE_NEXT 32889

Definition at line 248 of file Resource.h.

#define ID_REFERENCES_FOOTNOTE_PREVIOUS 32945

Definition at line 301 of file Resource.h.

#define ID_REFERENCES_FOOTNOTES_INSERTENDNOTE 32952

Definition at line 308 of file Resource.h.

#define ID_REFERENCES_FOOTNOTES_INSERTFOOTNOTE 32953

Definition at line 309 of file Resource.h.

#define ID_REFERENCES_FOOTNOTES_NEXTFOOTNOTE 32954

Definition at line 310 of file Resource.h.

#define ID_REFERENCES_FOOTNOTES_SHOWNOTES 32955

Definition at line 311 of file Resource.h.

#define ID_REFERENCES_INDEX_INSERTINDEX 32956

Definition at line 312 of file Resource.h.

#define ID_REFERENCES_INDEX_MARKENTRY 32957

Definition at line 313 of file Resource.h.

#define ID_REFERENCES_INDEX_UPDATEINDEX 32958

Definition at line 314 of file Resource.h.

#define ID_REFERENCES_INSERTCITATION_ADDNEWPLACEHOLDER 32771

Definition at line 132 of file Resource.h.

#define ID_REFERENCES_INSERTCITATION_ADDNEWSOURCE 32772

Definition at line 133 of file Resource.h.

#define ID_REFERENCES_INSERTCITATION_SEARCHLIBRARIES 32965

Definition at line 321 of file Resource.h.

#define ID_REFERENCES_STYLE 32951

Definition at line 307 of file Resource.h.

#define ID_REFERENCES_TA_INSERTTOA 32959

Definition at line 315 of file Resource.h.

#define ID_REFERENCES_TA_MARKCITATION 32960

Definition at line 316 of file Resource.h.

#define ID_REFERENCES_TA_UPDATETABLE 32961

Definition at line 317 of file Resource.h.

#define ID_REFERENCES_TC_UPDATETABLE 32962

Definition at line 318 of file Resource.h.

#define ID_REVIEW_CHANGES_ACCEPT 33185

Definition at line 526 of file Resource.h.

#define ID_REVIEW_CHANGES_ACCEPT_ALL 33188

Definition at line 529 of file Resource.h.

#define ID_REVIEW_CHANGES_ACCEPT_ALLSHOWN 33187

Definition at line 528 of file Resource.h.

#define ID_REVIEW_CHANGES_ACCEPT_CHANGE 33186

Definition at line 527 of file Resource.h.

#define ID_REVIEW_CHANGES_NEXT 33194

Definition at line 535 of file Resource.h.

#define ID_REVIEW_CHANGES_PREVIOUS 33193

Definition at line 534 of file Resource.h.

#define ID_REVIEW_CHANGES_REJECT 33189

Definition at line 530 of file Resource.h.

#define ID_REVIEW_CHANGES_REJECT_ALL 33192

Definition at line 533 of file Resource.h.

#define ID_REVIEW_CHANGES_REJECT_ALLSHOWN 33191

Definition at line 532 of file Resource.h.

#define ID_REVIEW_CHANGES_REJECT_CHANGE 33190

Definition at line 531 of file Resource.h.

#define ID_REVIEW_COMMENTS_DELETE 33164

Definition at line 505 of file Resource.h.

#define ID_REVIEW_COMMENTS_DELETE_ALL 33162

Definition at line 504 of file Resource.h.

#define ID_REVIEW_COMMENTS_DELETE_ALLSHOWN 33161

Definition at line 503 of file Resource.h.

#define ID_REVIEW_COMMENTS_NEWCOMMENT 33159

Definition at line 502 of file Resource.h.

#define ID_REVIEW_COMMENTS_NEXT 33166

Definition at line 507 of file Resource.h.

#define ID_REVIEW_COMMENTS_PREVIOUS 33165

Definition at line 506 of file Resource.h.

#define ID_REVIEW_COMPARE_COMPARE 33196

Definition at line 537 of file Resource.h.

#define ID_REVIEW_COMPARE_COMPARE_COMBINE 33198

Definition at line 539 of file Resource.h.

#define ID_REVIEW_COMPARE_COMPARE_COMPARE 33197

Definition at line 538 of file Resource.h.

#define ID_REVIEW_COMPARE_SHOWSOURCE 33199

Definition at line 540 of file Resource.h.

#define ID_REVIEW_COMPARE_SHOWSOURCE_HIDESOURCE 33200

Definition at line 541 of file Resource.h.

#define ID_REVIEW_COMPARE_SHOWSOURCE_SHOWBOTH 33203

Definition at line 544 of file Resource.h.

#define ID_REVIEW_COMPARE_SHOWSOURCE_SHOWORIGINAL 33201

Definition at line 542 of file Resource.h.

#define ID_REVIEW_COMPARE_SHOWSOURCE_SHOWREVISED 33202

Definition at line 543 of file Resource.h.

#define ID_REVIEW_PROOFING_RESEARCH 33153

Definition at line 496 of file Resource.h.

#define ID_REVIEW_PROOFING_SETLANGUAGE 33157

Definition at line 500 of file Resource.h.

#define ID_REVIEW_PROOFING_SPELLINGGRAMMAR 33152

Definition at line 495 of file Resource.h.

#define ID_REVIEW_PROOFING_THESAURUS 33154

Definition at line 497 of file Resource.h.

#define ID_REVIEW_PROOFING_TRANSLATE 33155

Definition at line 498 of file Resource.h.

#define ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP 33156

Definition at line 499 of file Resource.h.

#define ID_REVIEW_PROOFING_WORDCOUNT 33158

Definition at line 501 of file Resource.h.

#define ID_REVIEW_PROTECT 33195

Definition at line 536 of file Resource.h.

#define ID_REVIEW_TRACKCHANGES_CHANGETRACKINGOPTIONS 33168

Definition at line 509 of file Resource.h.

#define ID_REVIEW_TRACKING_BALLOONS 33170

Definition at line 511 of file Resource.h.

#define ID_REVIEW_TRACKING_CHANGEUSERNAME 33169

Definition at line 510 of file Resource.h.

#define ID_REVIEW_TRACKING_DISPLAYFORREVIEW 33174

Definition at line 515 of file Resource.h.

#define ID_REVIEW_TRACKING_REVIEWINGPANE 33182

Definition at line 523 of file Resource.h.

#define ID_REVIEW_TRACKING_REVIEWINGPANE_HORIZONTAL 33184

Definition at line 525 of file Resource.h.

#define ID_REVIEW_TRACKING_REVIEWINGPANE_VERTICAL 33183

Definition at line 524 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOW_ALLREVIEWERS 33181

Definition at line 522 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOW_COMMENTS 33176

Definition at line 517 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOW_FORMATTING 33179

Definition at line 520 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOW_INK 33177

Definition at line 518 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOW_INSERTIONSANDDELETIONS 33178

Definition at line 519 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOW_MARKUP 33175

Definition at line 516 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOW_MARKUPAREAHIGHLIGHT 33180

Definition at line 521 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOWALLREVISIONS 33172

Definition at line 513 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOWONLYCOOMENTS 33173

Definition at line 514 of file Resource.h.

#define ID_REVIEW_TRACKING_SHOWREVISIONS 33171

Definition at line 512 of file Resource.h.

#define ID_REVIEW_TRACKING_TRACKCHANGES 33167

Definition at line 508 of file Resource.h.

#define ID_SET_STYLE 32850

Definition at line 212 of file Resource.h.

#define ID_STATUSBAR_COLUMN 32781

Definition at line 143 of file Resource.h.

#define ID_STATUSBAR_DRAFT 32846

Definition at line 208 of file Resource.h.

#define ID_STATUSBAR_FULL_SCREEN_READING 32828

Definition at line 190 of file Resource.h.

#define ID_STATUSBAR_LINE 32780

Definition at line 142 of file Resource.h.

#define ID_STATUSBAR_LINK 33073

Definition at line 423 of file Resource.h.

#define ID_STATUSBAR_MASTER_DOCUMENT_TOOLS 32847

Definition at line 209 of file Resource.h.

#define ID_STATUSBAR_PAGE 33059

Definition at line 409 of file Resource.h.

#define ID_STATUSBAR_PRINTLAYOUT 32816

Definition at line 178 of file Resource.h.

#define ID_STATUSBAR_PROGRESS 32782

Definition at line 144 of file Resource.h.

#define ID_STATUSBAR_REFRESH 33060

Definition at line 410 of file Resource.h.

#define ID_STATUSBAR_SPELL 33061

Definition at line 411 of file Resource.h.

#define ID_STATUSBAR_WEBLAYOUT 32845

Definition at line 207 of file Resource.h.

#define ID_STATUSBAR_ZOOM 32849

Definition at line 211 of file Resource.h.

#define ID_STATUSBAR_ZOOM_SLIDER 32848

Definition at line 210 of file Resource.h.

#define ID_STOP_HIGHLIGHTING 32779

Definition at line 141 of file Resource.h.

#define ID_STYLECHANGE_COLORS 33127

Definition at line 477 of file Resource.h.

#define ID_STYLECHANGE_FONTS 33128

Definition at line 478 of file Resource.h.

#define ID_STYLECHANGE_SETDEFAULT 33129

Definition at line 479 of file Resource.h.

#define ID_STYLECHANGE_STYLESET 33130

Definition at line 480 of file Resource.h.

#define ID_TABLE_BANDEDCOLUMNS 33216

Definition at line 554 of file Resource.h.

#define ID_TABLE_BANDEDROWS 33213

Definition at line 551 of file Resource.h.

#define ID_TABLE_CONVERTTOTABLE 33101

Definition at line 451 of file Resource.h.

#define ID_TABLE_DRAWTABLE 33071

Definition at line 421 of file Resource.h.

#define ID_TABLE_EXCELSPREADSHEET 33102

Definition at line 452 of file Resource.h.

#define ID_TABLE_FIRSTCOLUMN 33214

Definition at line 552 of file Resource.h.

#define ID_TABLE_HEADERROW 33211

Definition at line 549 of file Resource.h.

#define ID_TABLE_LASTCOLUMN 33215

Definition at line 553 of file Resource.h.

#define ID_TABLE_OF_CONTENTS 33087

Definition at line 437 of file Resource.h.

#define ID_TABLE_QUICKTABLES 33103

Definition at line 453 of file Resource.h.

#define ID_TABLE_TABLE 33131

Definition at line 481 of file Resource.h.

#define ID_TABLE_TOTALROW 33212

Definition at line 550 of file Resource.h.

#define ID_TOOLS_OPTIONS 33070

Definition at line 420 of file Resource.h.

#define ID_VIEW_APPLOOK_2003 32985

Definition at line 341 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_1 32986

Definition at line 342 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_2 32987

Definition at line 343 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_3 32988

Definition at line 344 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_4 32989

Definition at line 345 of file Resource.h.

#define ID_VIEW_APPLOOK_WIN7 32990

Definition at line 346 of file Resource.h.

#define ID_VIEW_ARRANGEALL 32218

Definition at line 556 of file Resource.h.

#define ID_VIEW_COMPARE 32991

Definition at line 347 of file Resource.h.

#define ID_VIEW_CUSTOMIZE 32992

Definition at line 348 of file Resource.h.

#define ID_VIEW_DOCUMENTMAP 32993

Definition at line 349 of file Resource.h.

#define ID_VIEW_DRAFT 32994

Definition at line 350 of file Resource.h.

#define ID_VIEW_FULLSCREEN 32995

Definition at line 351 of file Resource.h.

#define ID_VIEW_GRIDLINES 32996

Definition at line 352 of file Resource.h.

#define ID_VIEW_MACROS 33079

Definition at line 429 of file Resource.h.

#define ID_VIEW_MESSAGEBAR 32984

Definition at line 340 of file Resource.h.

#define ID_VIEW_NEWWINDOW 32997

Definition at line 353 of file Resource.h.

#define ID_VIEW_OUTLINE 32998

Definition at line 354 of file Resource.h.

#define ID_VIEW_PRINTLAYOUT 32999

Definition at line 355 of file Resource.h.

#define ID_VIEW_PROPERTIES 33000

Definition at line 356 of file Resource.h.

#define ID_VIEW_RESETWINDOW 33001

Definition at line 357 of file Resource.h.

#define ID_VIEW_RTL 33072

Definition at line 422 of file Resource.h.

#define ID_VIEW_RULER 33002

Definition at line 358 of file Resource.h.

#define ID_VIEW_SPLIT 33003

Definition at line 359 of file Resource.h.

#define ID_VIEW_SWITCHWINDOW 33004

Definition at line 360 of file Resource.h.

#define ID_VIEW_SYNCSCROLLING 33005

Definition at line 361 of file Resource.h.

#define ID_VIEW_TASK_PANE 32975

Definition at line 331 of file Resource.h.

#define ID_VIEW_TOOLBARS 33006

Definition at line 362 of file Resource.h.

#define ID_VIEW_TRUMBNAILS 33007

Definition at line 363 of file Resource.h.

#define ID_VIEW_WEBLAYOUT 33008

Definition at line 364 of file Resource.h.

#define ID_VIEW_ZOOM 33009

Definition at line 365 of file Resource.h.

#define ID_VIEW_ZOOM_100 33075

Definition at line 425 of file Resource.h.

#define ID_VIEW_ZOOM_ONE_PAGE 33076

Definition at line 426 of file Resource.h.

#define ID_VIEW_ZOOM_PAGE_WIDTH 33078

Definition at line 428 of file Resource.h.

#define ID_VIEW_ZOOM_TWO_PAGES 33077

Definition at line 427 of file Resource.h.

#define ID_WRITE_APPLYSTYLES 33011

Definition at line 367 of file Resource.h.

#define ID_WRITE_CHANGESTYLES 33012

Definition at line 368 of file Resource.h.

#define ID_WRITE_CLEARFORMATTING 33013

Definition at line 369 of file Resource.h.

#define ID_WRITE_CLIPBOARD 33025

Definition at line 377 of file Resource.h.

#define ID_WRITE_FONT 33026

Definition at line 378 of file Resource.h.

#define ID_WRITE_PARAGRAPH 33027

Definition at line 379 of file Resource.h.

#define ID_WRITE_QUICKSTYLES 33016

Definition at line 372 of file Resource.h.

#define ID_WRITE_SAVESTYLE 33020

Definition at line 373 of file Resource.h.

#define ID_WRITE_SELECT 33022

Definition at line 374 of file Resource.h.

#define ID_WRITE_STYLE 33028

Definition at line 380 of file Resource.h.

#define IDB_BULLETS 189

Definition at line 91 of file Resource.h.

#define IDB_BUTTONS 100

Definition at line 5 of file Resource.h.

#define IDB_CHART 176

Definition at line 76 of file Resource.h.

#define IDB_CHART_DESIGN 180

Definition at line 80 of file Resource.h.

#define IDB_CHART_DESIGNLARGE 181

Definition at line 81 of file Resource.h.

#define IDB_CHART_FORMAT 184

Definition at line 84 of file Resource.h.

#define IDB_CHART_FORMATLARGE 185

Definition at line 85 of file Resource.h.

#define IDB_CHART_LAYOUT 182

Definition at line 82 of file Resource.h.

#define IDB_CHART_LAYOUTLARGE 183

Definition at line 83 of file Resource.h.

#define IDB_FILELARGE 169

Definition at line 69 of file Resource.h.

#define IDB_FILESMALL 170

Definition at line 70 of file Resource.h.

#define IDB_HEADERPAT_1 200

Definition at line 94 of file Resource.h.

#define IDB_HEADERPAT_2 201

Definition at line 95 of file Resource.h.

#define IDB_HEADERPAT_3 202

Definition at line 96 of file Resource.h.

#define IDB_HEADERPAT_4 203

Definition at line 97 of file Resource.h.

#define IDB_INFO 204

Definition at line 98 of file Resource.h.

#define IDB_INSERT 101

Definition at line 6 of file Resource.h.

#define IDB_INSERTLARGE 102

Definition at line 7 of file Resource.h.

#define IDB_LAYOUT 186

Definition at line 86 of file Resource.h.

#define IDB_MAILINGS 106

Definition at line 8 of file Resource.h.

#define IDB_MAILINGSLARGE 107

Definition at line 10 of file Resource.h.

#define IDB_MAIN 108

Definition at line 12 of file Resource.h.

#define IDB_MULTI 208

Definition at line 102 of file Resource.h.

#define IDB_NUM 190

Definition at line 92 of file Resource.h.

#define IDB_OPTIONS 192

Definition at line 93 of file Resource.h.

#define IDB_PAGELAYOUT 109

Definition at line 13 of file Resource.h.

#define IDB_PAGELAYOUTLARGE 110

Definition at line 14 of file Resource.h.

#define IDB_PICTURE 175

Definition at line 75 of file Resource.h.

#define IDB_PICTURE_FORMAT 178

Definition at line 78 of file Resource.h.

#define IDB_PICTURE_FORMATLARGE 179

Definition at line 79 of file Resource.h.

#define IDB_POSITION_1 209

Definition at line 103 of file Resource.h.

#define IDB_POSITION_2 210

Definition at line 104 of file Resource.h.

#define IDB_REFERENCES 111

Definition at line 15 of file Resource.h.

#define IDB_REFERENCESLARGE 112

Definition at line 16 of file Resource.h.

#define IDB_REVIEW 211

Definition at line 105 of file Resource.h.

#define IDB_REVIEWLARGE 212

Definition at line 106 of file Resource.h.

#define IDB_SHAPE1 163

Definition at line 60 of file Resource.h.

#define IDB_SHAPE2 164

Definition at line 61 of file Resource.h.

#define IDB_SHAPE3 172

Definition at line 72 of file Resource.h.

#define IDB_SHAPE4 173

Definition at line 73 of file Resource.h.

#define IDB_SHAPE5 174

Definition at line 74 of file Resource.h.

#define IDB_SHAPE6 168

Definition at line 68 of file Resource.h.

#define IDB_SHAPE7 162

Definition at line 58 of file Resource.h.

#define IDB_SPELL 187

Definition at line 88 of file Resource.h.

#define IDB_STYLES 171

Definition at line 71 of file Resource.h.

#define IDB_TABLE 177

Definition at line 77 of file Resource.h.

#define IDB_THEME_COLORS 222

Definition at line 116 of file Resource.h.

#define IDB_THEME_EFFECTS 225

Definition at line 118 of file Resource.h.

#define IDB_THEME_FONTS 227

Definition at line 119 of file Resource.h.

#define IDB_THEME_THEMES 224

Definition at line 117 of file Resource.h.

#define IDB_TOOLTIP_CLIPBOARD 167

Definition at line 66 of file Resource.h.

#define IDB_TOOLTIP_FONTDLG 165

Definition at line 63 of file Resource.h.

#define IDB_TOOLTIP_MAIN 188

Definition at line 90 of file Resource.h.

#define IDB_TOOLTIP_PARAGRAPH 166

Definition at line 65 of file Resource.h.

#define IDB_VIEW 114

Definition at line 17 of file Resource.h.

#define IDB_VIEWLARGE 115

Definition at line 18 of file Resource.h.

#define IDB_VIEWPAT_1 154

Definition at line 50 of file Resource.h.

#define IDB_VIEWPAT_2 155

Definition at line 52 of file Resource.h.

#define IDB_VIEWPAT_3 156

Definition at line 53 of file Resource.h.

#define IDB_VIEWPAT_4 157

Definition at line 55 of file Resource.h.

#define IDB_WRITE 116

Definition at line 19 of file Resource.h.

#define IDB_WRITELARGE 117

Definition at line 20 of file Resource.h.

#define IDC_BANER 1010

Definition at line 129 of file Resource.h.

#define IDC_COLOR_SCHEME 1007

Definition at line 123 of file Resource.h.

#define IDC_CONTACT 1009

Definition at line 126 of file Resource.h.

#define IDC_HOME 1008

Definition at line 125 of file Resource.h.

#define IDC_PRODUCT 1010

Definition at line 128 of file Resource.h.

#define IDC_SCREENTIP_STYLE 1008

Definition at line 124 of file Resource.h.

#define IDC_SHOW_DEV_TAB 1006

Definition at line 122 of file Resource.h.

#define IDC_SHOW_FLOATY 1005

Definition at line 121 of file Resource.h.

#define IDC_SHOW_KEY_TIPS 1009

Definition at line 127 of file Resource.h.

#define IDC_SUPPORT 1011

Definition at line 130 of file Resource.h.

#define IDD_ABOUTBOX 999

Definition at line 120 of file Resource.h.

#define IDD_POPULAR_PAGE 106

Definition at line 9 of file Resource.h.

#define IDD_RES_PAGE 107

Definition at line 11 of file Resource.h.

#define IDI_REFRESH 186

Definition at line 87 of file Resource.h.

#define IDI_SPELL 187

Definition at line 89 of file Resource.h.

#define IDP_FAILED_TO_CREATE 119

Definition at line 21 of file Resource.h.

#define IDP_OLE_INIT_FAILED 120

Definition at line 22 of file Resource.h.

#define IDR_CNTR_INPLACE 122

Definition at line 23 of file Resource.h.

#define IDR_CONTEXT_MENU 123

Definition at line 24 of file Resource.h.

#define IDR_DUMMY_MENU 165

Definition at line 64 of file Resource.h.

#define IDR_FONT 125

Definition at line 25 of file Resource.h.

#define IDR_INSERT_COVERPAGE_MENU 127

Definition at line 27 of file Resource.h.

#define IDR_INSERT_FOOTER_MENU 129

Definition at line 29 of file Resource.h.

#define IDR_INSERT_HEADER_MENU 130

Definition at line 30 of file Resource.h.

#define IDR_INSERT_PAGENUMBERS_MENU 131

Definition at line 31 of file Resource.h.

#define IDR_INSERT_PICTURE_MENU 132

Definition at line 32 of file Resource.h.

#define IDR_INSERT_SHAPES_MENU 133

Definition at line 33 of file Resource.h.

#define IDR_INSERT_TABLE_MENU 162

Definition at line 57 of file Resource.h.

#define IDR_INSERT_TEXTBOX_MENU 207

Definition at line 101 of file Resource.h.

#define IDR_MAIL_MERGE_MENU 134

Definition at line 34 of file Resource.h.

#define IDR_MAIL_RECIPIENTS_MENU 135

Definition at line 35 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 28 of file Resource.h.

#define IDR_MSTYPE 168

Definition at line 67 of file Resource.h.

#define IDR_PAGELAYOUT_BRINGTOFRONT 137

Definition at line 36 of file Resource.h.

#define IDR_PAGELAYOUT_COLUMNS 139

Definition at line 37 of file Resource.h.

#define IDR_PAGELAYOUT_MARGINS 141

Definition at line 38 of file Resource.h.

#define IDR_PAGELAYOUT_ORIENTATION 142

Definition at line 39 of file Resource.h.

#define IDR_PAGELAYOUT_SENDTOBACK 143

Definition at line 40 of file Resource.h.

#define IDR_PAGELAYOUT_TEXTWRAPPING 144

Definition at line 41 of file Resource.h.

#define IDR_PARA_BULLETS_MENU 146

Definition at line 42 of file Resource.h.

#define IDR_PARA_LINESPACING_MENU 147

Definition at line 43 of file Resource.h.

#define IDR_PARA_MULTILIST_MENU 148

Definition at line 44 of file Resource.h.

#define IDR_PARA_NUMBERING_MENU 149

Definition at line 45 of file Resource.h.

#define IDR_PARAGRAPH 150

Definition at line 46 of file Resource.h.

#define IDR_REFERENCES_ADDTEXT 153

Definition at line 48 of file Resource.h.

#define IDR_REFERENCES_INSERTCITATION 154

Definition at line 49 of file Resource.h.

#define IDR_REFERENCES_NEXTFOOTNOTE 155

Definition at line 51 of file Resource.h.

#define IDR_REVIEW_CHANGES_ACCEPT 218

Definition at line 112 of file Resource.h.

#define IDR_REVIEW_CHANGES_REJECT 219

Definition at line 113 of file Resource.h.

#define IDR_REVIEW_COMMENTS_DELETE 213

Definition at line 107 of file Resource.h.

#define IDR_REVIEW_COMPARE_COMPARE_COMPARE 221

Definition at line 115 of file Resource.h.

#define IDR_REVIEW_COMPARE_SHOWSOURCE 220

Definition at line 114 of file Resource.h.

#define IDR_REVIEW_TRACKING_BALLOONS 215

Definition at line 109 of file Resource.h.

#define IDR_REVIEW_TRACKING_REVIEWINGPANE 217

Definition at line 111 of file Resource.h.

#define IDR_REVIEW_TRACKING_SHOW 216

Definition at line 110 of file Resource.h.

#define IDR_REVIEW_TRACKING_TRACKCHANGES 214

Definition at line 108 of file Resource.h.

#define IDR_THEME_MENU 163

Definition at line 59 of file Resource.h.

#define IDR_THEME_MENU_STATIC 164

Definition at line 62 of file Resource.h.

#define IDR_WRITE_BORDERS_MENU 205

Definition at line 99 of file Resource.h.

#define IDR_WRITE_FIND_MENU 206

Definition at line 100 of file Resource.h.

#define IDR_WRITE_FONTCASE_MENU 126

Definition at line 26 of file Resource.h.

#define IDR_WRITE_PASTE_MENU 151

Definition at line 47 of file Resource.h.

#define IDR_WRITE_SELECT_MENU 157

Definition at line 54 of file Resource.h.

#define IDR_WRITE_STYLECHANGE_MENU 161

Definition at line 56 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/ResourcePage.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

ResourcePage.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "ResourcePage.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/ResourcePage.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

ResourcePage.h File Reference

Go to the source code of this file.

Classes

class CResourcePage
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonListButton.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo
Variables

RibbonListButton.cpp File Reference

#include "stdafx.h"
#include "RibbonListButton.h"

Go to the source code of this file.

Variables

const int | nBorderMarginX = 1
const int | nBorderMarginY = 3
const int | nCheckMargin = 2
const int | nImageMargin = 4
const int | nTextOffsetX = 11
const int | nTextOffsetY = 2

Variable Documentation

const int nBorderMarginX = 1

Definition at line 28 of file RibbonListButton.cpp.

const int nBorderMarginY = 3

Definition at line 29 of file RibbonListButton.cpp.

const int nCheckMargin = 2

Definition at line 24 of file RibbonListButton.cpp.

const int nImageMargin = 4

Definition at line 23 of file RibbonListButton.cpp.

const int nTextOffsetX = 11

Definition at line 25 of file RibbonListButton.cpp.

const int nTextOffsetY = 2

Definition at line 26 of file RibbonListButton.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonListButton.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

RibbonListButton.h File Reference

Go to the source code of this file.

Classes

class | CRibbonListButton
class | CRibbonListFontButton
struct | CRibbonListFontButton::XItem
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTableButton.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo
Defines | Variables

RibbonTableButton.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "RibbonTableButton.h"

Go to the source code of this file.

Defines

#define | CELLS_X 10
#define | CELLS_Y 8

Variables

LPCTSTR | lpszDefaultCaption = _T("Insert Table")

Define Documentation

#define CELLS_X 10

Definition at line 22 of file RibbonTableButton.cpp.

#define CELLS_Y 8

Definition at line 23 of file RibbonTableButton.cpp.

Variable Documentation

LPCTSTR lpszDefaultCaption = _T("Insert Table")

Definition at line 30 of file RibbonTableButton.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTableButton.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

RibbonTableButton.h File Reference

Go to the source code of this file.

Classes

class CRibbonTableButton
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

RibbonTooltipCtrl.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "RibbonTooltipCtrl.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

RibbonTooltipCtrl.h File Reference

Go to the source code of this file.

Classes

class CRibbonTooltipCtrl
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/StdAfx.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/StdAfx.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxrich.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 19 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/targetver.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 19 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/TaskPane.cpp File Reference

  • vc2008fp
  • MSOffice2007Demo

TaskPane.cpp File Reference

#include "stdafx.h"
#include "MSOffice2007Demo.h"
#include "TaskPane.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/TaskPane.h File Reference

  • vc2008fp
  • MSOffice2007Demo
Classes

TaskPane.h File Reference

Go to the source code of this file.

Classes

class CTaskPane
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/CustomProperties.cpp File Reference

  • vc2008fp
  • NewControls
Variables

CustomProperties.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "CustomProperties.h"

Go to the source code of this file.

Variables

const TCHAR | cPassword = _T('*')
const int | nIconMargin = 3

Variable Documentation

const TCHAR cPassword = _T('*')

Definition at line 86 of file CustomProperties.cpp.

const int nIconMargin = 3

Definition at line 336 of file CustomProperties.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/CustomProperties.h File Reference

  • vc2008fp
  • NewControls
Classes

CustomProperties.h File Reference

Go to the source code of this file.

Classes

class | CBoundedNumberPairProp
class | CBoundedNumberSubProp
class | CCheckBoxProp
class | CComboBoxExProp
class | CCustomDlgProp
class | CIconCombo
class | CIconListProp
class | COwnerDrawDescrProp
class | CPasswordProp
class | CPropSliderCtrl
class | CSliderProp
class | CTwoButtonsProp
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControls.cpp File Reference

  • vc2008fp
  • NewControls
Variables

NewControls.cpp File Reference

#include "stdafx.h"
#include <locale.h>
#include "NewControls.h"
#include "NewControlsPropSheet.h"

Go to the source code of this file.

Variables

CNewControlsApp theApp

Variable Documentation

CNewControlsApp theApp

Definition at line 57 of file NewControls.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControls.h File Reference

  • vc2008fp
  • NewControls
Classes | Variables

NewControls.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CAboutDlg
class | CNewControlsApp

Variables

CNewControlsApp theApp

Variable Documentation

CNewControlsApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControlsPropSheet.cpp File Reference

  • vc2008fp
  • NewControls

NewControlsPropSheet.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "NewControlsPropSheet.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControlsPropSheet.h File Reference

  • vc2008fp
  • NewControls
Classes

NewControlsPropSheet.h File Reference

#include "Page1.h"
#include "Page2.h"
#include "Page3.h"
#include "Page4.h"
#include "Page5.h"
#include "Page6.h"

Go to the source code of this file.

Classes

class NewControlsPropSheet
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page1.cpp File Reference

  • vc2008fp
  • NewControls
Variables

Page1.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "Page1.h"

Go to the source code of this file.

Variables

const size_t MAX_TIP_TEXT_LENGTH = 1024

Variable Documentation

const size_t MAX_TIP_TEXT_LENGTH = 1024

Definition at line 20 of file Page1.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page1.h File Reference

  • vc2008fp
  • NewControls
Classes

Page1.h File Reference

Go to the source code of this file.

Classes

class CPage1
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page2.cpp File Reference

  • vc2008fp
  • NewControls
Defines

Page2.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "Page2.h"

Go to the source code of this file.

Defines

#define NUM_COLOURS 64

Define Documentation

#define NUM_COLOURS 64
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page2.h File Reference

  • vc2008fp
  • NewControls
Classes

Page2.h File Reference

Go to the source code of this file.

Classes

class CPage2
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page3.cpp File Reference

  • vc2008fp
  • NewControls

Page3.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "Page3.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page3.h File Reference

  • vc2008fp
  • NewControls
Classes

Page3.h File Reference

Go to the source code of this file.

Classes

class | CCustomEditListBox
class | CMyBrowseEdit
class | CPage3
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page4.cpp File Reference

  • vc2008fp
  • NewControls

Page4.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "Page4.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page4.h File Reference

  • vc2008fp
  • NewControls
Classes

Page4.h File Reference

Go to the source code of this file.

Classes

class CPage4
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page5.cpp File Reference

  • vc2008fp
  • NewControls
Variables

Page5.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "CustomProperties.h"
#include "Page5.h"
#include <memory>

Go to the source code of this file.

Variables

const int | nColumns = 3
const int | nRows = 50

Variable Documentation

const int nColumns = 3

Definition at line 90 of file Page5.cpp.

const int nRows = 50

Definition at line 91 of file Page5.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page5.h File Reference

  • vc2008fp
  • NewControls
Classes

Page5.h File Reference

Go to the source code of this file.

Classes

class | CMyListCtrl
class | CPage5
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page6.cpp File Reference

  • vc2008fp
  • NewControls
Defines | Variables

Page6.cpp File Reference

#include "stdafx.h"
#include "NewControls.h"
#include "Page6.h"

Go to the source code of this file.

Defines

#define | SHCNF_ACCEPT_INTERRUPTS 0x0001
#define | SHCNF_ACCEPT_NON_INTERRUPTS 0x0002

Variables

UINT | UWM_CHANGE_SYSTEM_ICON = ::RegisterWindowMessage(_T("UWM_CHANGE_SYSTEM_ICON"))

Define Documentation

#define SHCNF_ACCEPT_INTERRUPTS 0x0001

Definition at line 20 of file Page6.cpp.

#define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002

Definition at line 21 of file Page6.cpp.

Variable Documentation

UINT UWM_CHANGE_SYSTEM_ICON = ::RegisterWindowMessage(_T("UWM_CHANGE_SYSTEM_ICON"))

Definition at line 23 of file Page6.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page6.h File Reference

  • vc2008fp
  • NewControls
Classes

Page6.h File Reference

Go to the source code of this file.

Classes

class CPage6
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/resource.h File Reference

  • vc2008fp
  • NewControls
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_DIALOG_ABOUT 32775
#define | ID_ITEM_1 32771
#define | ID_ITEM_2 32772
#define | ID_ITEM_3 32773
#define | ID_ITEM_4 32774
#define | IDB_BACK 140
#define | IDB_BTN1 129
#define | IDB_BTN1_32 158
#define | IDB_BTN1_HOT 130
#define | IDB_BTN1_HOT_32 157
#define | IDB_BUTTONS 149
#define | IDB_CHECK 144
#define | IDB_CHECK32 153
#define | IDB_CHECKNO 151
#define | IDB_CHECKNO32 154
#define | IDB_GLOBE 132
#define | IDB_ICONS 143
#define | IDB_ICONS32 159
#define | IDB_IMAGE 137
#define | IDB_PLAY 133
#define | IDB_PLAY_HOT 136
#define | IDB_PROPICONS 147
#define | IDB_RADIO_OFF 152
#define | IDB_RADIO_OFF32 155
#define | IDB_RADIO_ON 146
#define | IDB_RADIO_ON32 156
#define | IDB_STOP 134
#define | IDB_STOP_HOT 135
#define | IDB_TEST_BITMAP 138
#define | IDC_BACKGROUND 1029
#define | IDC_BORDER 131
#define | IDC_BORDER_LABEL 1040
#define | IDC_BUTTON 1000
#define | IDC_BUTTON1 1060
#define | IDC_BUTTON_MENU 1013
#define | IDC_BUTTON_MULTLINE 1003
#define | IDC_BUTTON_URL 1016
#define | IDC_CHECK_BUTTON 1038
#define | IDC_CHECKMINUTES 1085
#define | IDC_COLOR_AREA 1023
#define | IDC_COLOR_DLG 1024
#define | IDC_COLOR_PALETTE 1043
#define | IDC_COLOR_PICKER 1025
#define | IDC_COLOR_ROWS 1072
#define | IDC_COLORBAR 16516
#define | IDC_COLORBAR2 16518
#define | IDC_CURSOR 130
#define | IDC_CUSTOM_COLORS 1074
#define | IDC_CUSTOM_EDIT 1111
#define | IDC_DATETIME 1074
#define | IDC_DATETIMEFORMAT 1095
#define | IDC_DATETIMELOCATION 1074
#define | IDC_DATETIMEPICKER2 1088
#define | IDC_DESCRIPTION_AREA 1070
#define | IDC_DEVICE 1026
#define | IDC_DOT_NET_LOOK 1069
#define | IDC_DRAW_USING_FONT 1027
#define | IDC_EDIT_IMAGE 1022
#define | IDC_EDIT_LIST 1015
#define | IDC_FILE_EDIT 1109
#define | IDC_FOLDER_EDIT 1110
#define | IDC_FONT 1039
#define | IDC_HEADER 1068
#define | IDC_HIDE_FONT_PROPS 1114
#define | IDC_IMAGE 1001
#define | IDC_IMAGE_AREA 1021
#define | IDC_IMAGE_LOCATION 1002
#define | IDC_LIST1 1044
#define | IDC_LUM 1072
#define | IDC_MAIL 1000
#define | IDC_MARK_CHANGED 1077
#define | IDC_MARK_SORTED_COLUMN 1071
#define | IDC_MASKEDIT1 1045
#define | IDC_MASKEDIT2 1046
#define | IDC_MASKEDIT3 1047
#define | IDC_MASKEDIT4 1048
#define | IDC_MASKEDIT5 1049
#define | IDC_MENU_DEFAULT_CLICK 1024
#define | IDC_MODIFY_FONT 1073
#define | IDC_PRESSED_ON_MENU 1023
#define | IDC_PROPLIST_CATEGORIZED 1075
#define | IDC_PROPLIST_CATEGORIZED2 1076
#define | IDC_PROPLIST_EXPAND_ALL 1105
#define | IDC_PROPLIST_LOCATION 1067
#define | IDC_RADIO1 1041
#define | IDC_RADIO2 1042
#define | IDC_RADIO3 1043
#define | IDC_RADIO4 1044
#define | IDC_RASTER 1025
#define | IDC_RESET_VALUES 1113
#define | IDC_RGB 1027
#define | IDC_RGB_COLOR_BAR 1028
#define | IDC_RGB_COLOR_BAR2 1042
#define | IDC_RGB_COLOR_PALETTE 1044
#define | IDC_RGB_DLG 1029
#define | IDC_RIGHT_ARROW 1014
#define | IDC_SELECT_FOLDER 1104
#define | IDC_SELECTED_FOLDER 1107
#define | IDC_SET_TOOLTIP 1009
#define | IDC_TOOLTIP 1008
#define | IDC_TREE1 1103
#define | IDC_TRUETYPE 1024
#define | IDC_URL 1001
#define | IDC_VALUE1 1061
#define | IDC_VALUE2 1062
#define | IDC_VALUE3 1063
#define | IDC_VALUE4 1064
#define | IDC_VALUE5 1065
#define | IDC_VERSION 1002
#define | IDC_XP_BUTTONS 1030
#define | IDD_ABOUTBOX 999
#define | IDD_NewControls_DIALOG 102
#define | IDD_PAGE1 107
#define | IDD_PAGE2 108
#define | IDD_PAGE3 109
#define | IDD_PAGE4 110
#define | IDD_PAGE5 111
#define | IDD_PAGE6 113
#define | IDM_ABOUTBOX 0x0010
#define | IDR_DIALOG_MENU 132
#define | IDR_MAINFRAME 128
#define | IDR_MENU1 131
#define | IDR_TOOLBAR_MENU_IMAGES 141
#define | IDS_ABOUTBOX 101
#define | IDS_CAPTION 102

Define Documentation

#define ID_DIALOG_ABOUT 32775

Definition at line 129 of file resource.h.

#define ID_ITEM_1 32771

Definition at line 125 of file resource.h.

#define ID_ITEM_2 32772

Definition at line 126 of file resource.h.

#define ID_ITEM_3 32773

Definition at line 127 of file resource.h.

#define ID_ITEM_4 32774

Definition at line 128 of file resource.h.

#define IDB_BACK 140

Definition at line 29 of file resource.h.

#define IDB_BTN1 129

Definition at line 16 of file resource.h.

#define IDB_BTN1_32 158

Definition at line 43 of file resource.h.

#define IDB_BTN1_HOT 130

Definition at line 17 of file resource.h.

#define IDB_BTN1_HOT_32 157

Definition at line 42 of file resource.h.

#define IDB_BUTTONS 149

Definition at line 35 of file resource.h.

#define IDB_CHECK 144

Definition at line 32 of file resource.h.

#define IDB_CHECK32 153

Definition at line 38 of file resource.h.

#define IDB_CHECKNO 151

Definition at line 36 of file resource.h.

#define IDB_CHECKNO32 154

Definition at line 39 of file resource.h.

#define IDB_GLOBE 132

Definition at line 21 of file resource.h.

#define IDB_ICONS 143

Definition at line 31 of file resource.h.

#define IDB_ICONS32 159

Definition at line 44 of file resource.h.

#define IDB_IMAGE 137

Definition at line 27 of file resource.h.

#define IDB_PLAY 133

Definition at line 23 of file resource.h.

#define IDB_PLAY_HOT 136

Definition at line 26 of file resource.h.

#define IDB_PROPICONS 147

Definition at line 34 of file resource.h.

#define IDB_RADIO_OFF 152

Definition at line 37 of file resource.h.

#define IDB_RADIO_OFF32 155

Definition at line 40 of file resource.h.

#define IDB_RADIO_ON 146

Definition at line 33 of file resource.h.

#define IDB_RADIO_ON32 156

Definition at line 41 of file resource.h.

#define IDB_STOP 134

Definition at line 24 of file resource.h.

#define IDB_STOP_HOT 135

Definition at line 25 of file resource.h.

#define IDB_TEST_BITMAP 138

Definition at line 28 of file resource.h.

#define IDC_BACKGROUND 1029

Definition at line 72 of file resource.h.

#define IDC_BORDER 131

Definition at line 20 of file resource.h.

#define IDC_BORDER_LABEL 1040

Definition at line 77 of file resource.h.

#define IDC_BUTTON 1000

Definition at line 46 of file resource.h.

#define IDC_BUTTON1 1060

Definition at line 91 of file resource.h.

#define IDC_BUTTON_MENU 1013

Definition at line 55 of file resource.h.

#define IDC_BUTTON_MULTLINE 1003

Definition at line 52 of file resource.h.

#define IDC_BUTTON_URL 1016

Definition at line 58 of file resource.h.

#define IDC_CHECK_BUTTON 1038

Definition at line 75 of file resource.h.

#define IDC_CHECKMINUTES 1085

Definition at line 111 of file resource.h.

#define IDC_COLOR_AREA 1023

Definition at line 61 of file resource.h.

#define IDC_COLOR_DLG 1024

Definition at line 63 of file resource.h.

#define IDC_COLOR_PALETTE 1043

Definition at line 82 of file resource.h.

#define IDC_COLOR_PICKER 1025

Definition at line 66 of file resource.h.

#define IDC_COLOR_ROWS 1072

Definition at line 102 of file resource.h.

#define IDC_COLORBAR 16516

Definition at line 123 of file resource.h.

#define IDC_COLORBAR2 16518

Definition at line 124 of file resource.h.

#define IDC_CURSOR 130

Definition at line 18 of file resource.h.

#define IDC_CUSTOM_COLORS 1074

Definition at line 107 of file resource.h.

#define IDC_CUSTOM_EDIT 1111

Definition at line 120 of file resource.h.

#define IDC_DATETIME 1074

Definition at line 106 of file resource.h.

#define IDC_DATETIMEFORMAT 1095

Definition at line 113 of file resource.h.

#define IDC_DATETIMELOCATION 1074

Definition at line 105 of file resource.h.

#define IDC_DATETIMEPICKER2 1088

Definition at line 112 of file resource.h.

#define IDC_DESCRIPTION_AREA 1070

Definition at line 100 of file resource.h.

#define IDC_DEVICE 1026

Definition at line 68 of file resource.h.

#define IDC_DOT_NET_LOOK 1069

Definition at line 99 of file resource.h.

#define IDC_DRAW_USING_FONT 1027

Definition at line 70 of file resource.h.

#define IDC_EDIT_IMAGE 1022

Definition at line 60 of file resource.h.

#define IDC_EDIT_LIST 1015

Definition at line 57 of file resource.h.

#define IDC_FILE_EDIT 1109

Definition at line 118 of file resource.h.

#define IDC_FOLDER_EDIT 1110

Definition at line 119 of file resource.h.

#define IDC_FONT 1039

Definition at line 76 of file resource.h.

#define IDC_HEADER 1068

Definition at line 98 of file resource.h.

#define IDC_HIDE_FONT_PROPS 1114

Definition at line 122 of file resource.h.

#define IDC_IMAGE 1001

Definition at line 48 of file resource.h.

#define IDC_IMAGE_AREA 1021

Definition at line 59 of file resource.h.

#define IDC_IMAGE_LOCATION 1002

Definition at line 51 of file resource.h.

#define IDC_LIST1 1044

Definition at line 85 of file resource.h.

#define IDC_LUM 1072

Definition at line 103 of file resource.h.

#define IDC_MAIL 1000

Definition at line 47 of file resource.h.

#define IDC_MARK_CHANGED 1077

Definition at line 110 of file resource.h.

#define IDC_MARK_SORTED_COLUMN 1071

Definition at line 101 of file resource.h.

#define IDC_MASKEDIT1 1045

Definition at line 86 of file resource.h.

#define IDC_MASKEDIT2 1046

Definition at line 87 of file resource.h.

#define IDC_MASKEDIT3 1047

Definition at line 88 of file resource.h.

#define IDC_MASKEDIT4 1048

Definition at line 89 of file resource.h.

#define IDC_MASKEDIT5 1049

Definition at line 90 of file resource.h.

#define IDC_MENU_DEFAULT_CLICK 1024

Definition at line 65 of file resource.h.

#define IDC_MODIFY_FONT 1073

Definition at line 104 of file resource.h.

#define IDC_PRESSED_ON_MENU 1023

Definition at line 62 of file resource.h.

#define IDC_PROPLIST_CATEGORIZED 1075

Definition at line 108 of file resource.h.

#define IDC_PROPLIST_CATEGORIZED2 1076

Definition at line 109 of file resource.h.

#define IDC_PROPLIST_EXPAND_ALL 1105

Definition at line 116 of file resource.h.

#define IDC_PROPLIST_LOCATION 1067

Definition at line 97 of file resource.h.

#define IDC_RADIO1 1041

Definition at line 78 of file resource.h.

#define IDC_RADIO2 1042

Definition at line 79 of file resource.h.

#define IDC_RADIO3 1043

Definition at line 81 of file resource.h.

#define IDC_RADIO4 1044

Definition at line 83 of file resource.h.

#define IDC_RASTER 1025

Definition at line 67 of file resource.h.

#define IDC_RESET_VALUES 1113

Definition at line 121 of file resource.h.

#define IDC_RGB 1027

Definition at line 69 of file resource.h.

#define IDC_RGB_COLOR_BAR 1028

Definition at line 71 of file resource.h.

#define IDC_RGB_COLOR_BAR2 1042

Definition at line 80 of file resource.h.

#define IDC_RGB_COLOR_PALETTE 1044

Definition at line 84 of file resource.h.

#define IDC_RGB_DLG 1029

Definition at line 73 of file resource.h.

#define IDC_RIGHT_ARROW 1014

Definition at line 56 of file resource.h.

#define IDC_SELECT_FOLDER 1104

Definition at line 115 of file resource.h.

#define IDC_SELECTED_FOLDER 1107

Definition at line 117 of file resource.h.

#define IDC_SET_TOOLTIP 1009

Definition at line 54 of file resource.h.

#define IDC_TOOLTIP 1008

Definition at line 53 of file resource.h.

#define IDC_TREE1 1103

Definition at line 114 of file resource.h.

#define IDC_TRUETYPE 1024

Definition at line 64 of file resource.h.

#define IDC_URL 1001

Definition at line 49 of file resource.h.

#define IDC_VALUE1 1061

Definition at line 92 of file resource.h.

#define IDC_VALUE2 1062

Definition at line 93 of file resource.h.

#define IDC_VALUE3 1063

Definition at line 94 of file resource.h.

#define IDC_VALUE4 1064

Definition at line 95 of file resource.h.

#define IDC_VALUE5 1065

Definition at line 96 of file resource.h.

#define IDC_VERSION 1002

Definition at line 50 of file resource.h.

#define IDC_XP_BUTTONS 1030

Definition at line 74 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 45 of file resource.h.

#define IDD_NewControls_DIALOG 102

Definition at line 7 of file resource.h.

#define IDD_PAGE1 107

Definition at line 9 of file resource.h.

#define IDD_PAGE2 108

Definition at line 10 of file resource.h.

#define IDD_PAGE3 109

Definition at line 11 of file resource.h.

#define IDD_PAGE4 110

Definition at line 12 of file resource.h.

#define IDD_PAGE5 111

Definition at line 13 of file resource.h.

#define IDD_PAGE6 113

Definition at line 14 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_DIALOG_MENU 132

Definition at line 22 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 15 of file resource.h.

#define IDR_MENU1 131

Definition at line 19 of file resource.h.

#define IDR_TOOLBAR_MENU_IMAGES 141

Definition at line 30 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 6 of file resource.h.

#define IDS_CAPTION 102

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/stdafx.cpp File Reference

  • vc2008fp
  • NewControls

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/stdafx.h File Reference

  • vc2008fp
  • NewControls
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 16 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 13 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 8 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/targetver.h File Reference

  • vc2008fp
  • NewControls
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/AppLookDlg.cpp File Reference

  • vc2008fp
  • OutlookDemo

AppLookDlg.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "AppLookDlg.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/AppLookDlg.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

AppLookDlg.h File Reference

Go to the source code of this file.

Classes

class CAppLookDlg
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/CalendarBar.cpp File Reference

  • vc2008fp
  • OutlookDemo
Variables

CalendarBar.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "CalendarBar.h"

Go to the source code of this file.

Variables

const int nBorderSize = 10

Variable Documentation

const int nBorderSize = 10

Definition at line 20 of file CalendarBar.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/CalendarBar.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

CalendarBar.h File Reference

Go to the source code of this file.

Classes

class CCalendarBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListBar.cpp File Reference

  • vc2008fp
  • OutlookDemo
Variables

FolderListBar.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "FolderListBar.h"
#include "WorkspaceObj.h"
#include "MainFrm.h"

Go to the source code of this file.

Variables

const int idTree = 5

Variable Documentation

const int idTree = 5

Definition at line 22 of file FolderListBar.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListBar.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

FolderListBar.h File Reference

#include "FoldersTree.h"

Go to the source code of this file.

Classes

class CFolderListBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListPopupWnd.cpp File Reference

  • vc2008fp
  • OutlookDemo
Variables

FolderListPopupWnd.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "FolderListPopupWnd.h"
#include "MainFrm.h"

Go to the source code of this file.

Variables

const UINT | idFoldersTree = 1
const UINT | idPinBtn = 2
const int | nHorzMargin = 2

Variable Documentation

const UINT idFoldersTree = 1

Definition at line 21 of file FolderListPopupWnd.cpp.

const UINT idPinBtn = 2

Definition at line 22 of file FolderListPopupWnd.cpp.

const int nHorzMargin = 2

Definition at line 23 of file FolderListPopupWnd.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListPopupWnd.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

FolderListPopupWnd.h File Reference

#include "FoldersTree.h"

Go to the source code of this file.

Classes

class CFolderListPopupWnd
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FoldersTree.cpp File Reference

  • vc2008fp
  • OutlookDemo

FoldersTree.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "FoldersTree.h"
#include "WorkspaceObj.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FoldersTree.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

FoldersTree.h File Reference

Go to the source code of this file.

Classes

class CFoldersTree
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailBar.cpp File Reference

  • vc2008fp
  • OutlookDemo
Defines

MailBar.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "MailBar.h"

Go to the source code of this file.

Defines

#define | BUTTON_CLASS _T("Button")
#define | MAX_CLASS_NAME 255
#define | STATIC_CLASS _T("Static")

Define Documentation

#define BUTTON_CLASS _T("Button")
#define MAX_CLASS_NAME 255
#define STATIC_CLASS _T("Static")
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailBar.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

MailBar.h File Reference

Go to the source code of this file.

Classes

class CMailBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailFrame.cpp File Reference

  • vc2008fp
  • OutlookDemo

MailFrame.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "MailFrame.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailFrame.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

MailFrame.h File Reference

#include "MailBar.h"

Go to the source code of this file.

Classes

class CMailFrame
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailView.cpp File Reference

  • vc2008fp
  • OutlookDemo

MailView.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "MailView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailView.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

MailView.h File Reference

Go to the source code of this file.

Classes

class CMailView
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MainFrm.cpp File Reference

  • vc2008fp
  • OutlookDemo
Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "WorkspaceObj.h"
#include "FolderListPopupWnd.h"
#include "PreviewPane.h"
#include "MailFrame.h"
#include "MainFrm.h"

Go to the source code of this file.

Variables

const int | iMaxUserToolbars = 10
const UINT | uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40
const UINT | uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Variable Documentation

const int iMaxUserToolbars = 10

Definition at line 35 of file MainFrm.cpp.

const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40

Definition at line 36 of file MainFrm.cpp.

const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Definition at line 37 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MainFrm.h File Reference

  • vc2008fp
  • OutlookDemo
Classes | Defines

MainFrm.h File Reference

#include "FolderListBar.h"
#include "CalendarBar.h"

Go to the source code of this file.

Classes

class | CMainFrame
class | CMyOutlookBar
class | CShellTreeCtrl

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 12 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemo.cpp File Reference

  • vc2008fp
  • OutlookDemo
Classes | Variables

OutlookDemo.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "MainFrm.h"
#include "OutlookDemoDoc.h"
#include "OutlookDemoView.h"
#include "AppLookDlg.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

COutlookDemoApp theApp

Variable Documentation

COutlookDemoApp theApp

Definition at line 49 of file OutlookDemo.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemo.h File Reference

  • vc2008fp
  • OutlookDemo
Classes | Variables

OutlookDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class COutlookDemoApp

Variables

COutlookDemoApp theApp

Variable Documentation

COutlookDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoDoc.cpp File Reference

  • vc2008fp
  • OutlookDemo

OutlookDemoDoc.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "OutlookDemoDoc.h"
#include "MailFrame.h"
#include "MailView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoDoc.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

OutlookDemoDoc.h File Reference

Go to the source code of this file.

Classes

class COutlookDemoDoc
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoView.cpp File Reference

  • vc2008fp
  • OutlookDemo

OutlookDemoView.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "OutlookDemoDoc.h"
#include "OutlookDemoView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoView.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

OutlookDemoView.h File Reference

Go to the source code of this file.

Classes

class COutlookDemoView
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/PreviewPane.cpp File Reference

  • vc2008fp
  • OutlookDemo
Variables

PreviewPane.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "PreviewPane.h"

Go to the source code of this file.

Variables

const int | nHorzMargin = 2
const int | nVertMargin = 2

Variable Documentation

const int nHorzMargin = 2

Definition at line 20 of file PreviewPane.cpp.

const int nVertMargin = 2

Definition at line 21 of file PreviewPane.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/PreviewPane.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

PreviewPane.h File Reference

Go to the source code of this file.

Classes

class CPreviewPane
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/resource.h File Reference

  • vc2008fp
  • OutlookDemo
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_ADDRESS_BOOK 32817
#define | ID_DUMMY 32866
#define | ID_FIND_CONTACT 32818
#define | ID_INDICATOR_ANIMATION 59142
#define | ID_MAIL_ATTACHMENT 32872
#define | ID_MAIL_BAR 32848
#define | ID_MAIL_CHECK_NAMES 32873
#define | ID_MAIL_CLOSE 32888
#define | ID_MAIL_COPY_TO_FOLDER 32883
#define | ID_MAIL_DELETE 32881
#define | ID_MAIL_FLAG 32876
#define | ID_MAIL_FONTSIZE 32878
#define | ID_MAIL_HIGHT_PRIORITY 32874
#define | ID_MAIL_ITEM 32885
#define | ID_MAIL_LOW_PRIORITY 32875
#define | ID_MAIL_MENU 32826
#define | ID_MAIL_MOVE_TO_FOLDER 32882
#define | ID_MAIL_OPTIONS 32877
#define | ID_MAIL_PRINT 32869
#define | ID_MAIL_PROPERTIES 32884
#define | ID_MAIL_SAVE 32868
#define | ID_MAIL_SAVE_ATTACHMENTS 32879
#define | ID_MAIL_SAVE_STATIONERY 32880
#define | ID_MAIL_SEND 32867
#define | ID_MAIL_SIGNATURE 32871
#define | ID_MAIL_SPELL 32886
#define | ID_NEW_APPOINTMENT 32853
#define | ID_NEW_CONTRACT 32857
#define | ID_NEW_DISTRIBUTION_LIST 32858
#define | ID_NEW_FAX 32851
#define | ID_NEW_FOLDER 32855
#define | ID_NEW_JOURNAL_ENTRY 32861
#define | ID_NEW_MAIL 32850
#define | ID_NEW_MEETING 32854
#define | ID_NEW_NOTE 32862
#define | ID_NEW_POST_FOLDER 32852
#define | ID_NEW_SHORTCUT 32856
#define | ID_NEW_TASK 32859
#define | ID_NEW_TASK_REQUEST 32860
#define | ID_OUTLOOK_ADD_PAGE 32891
#define | ID_OUTLOOK_ANIMATION 32894
#define | ID_OUTLOOK_DELETE_PAGE 32893
#define | ID_OUTLOOK_RENAME_PAGE 32892
#define | ID_OUTLOOK_SHOW_BACKGROUND 32889
#define | ID_OUTLOOK_SHOW_TEXT_LABELS 32890
#define | ID_RESET_PAGE 32895
#define | ID_RULES_WIZARD 32827
#define | ID_SEND_RECEIVE 32816
#define | ID_SHOW_FOLDERS_POPUP 32822
#define | ID_TOOLS_ENTRY 32805
#define | ID_USER_TOOL1 32806
#define | ID_USER_TOOL10 32815
#define | ID_USER_TOOL2 32807
#define | ID_USER_TOOL3 32808
#define | ID_USER_TOOL4 32809
#define | ID_USER_TOOL5 32810
#define | ID_USER_TOOL6 32811
#define | ID_USER_TOOL7 32812
#define | ID_USER_TOOL8 32813
#define | ID_USER_TOOL9 32814
#define | ID_VIEW_ADVANCED_TOOLBAR 32828
#define | ID_VIEW_APP_LOOK 32950
#define | ID_VIEW_BACK 32820
#define | ID_VIEW_CAPTIONBAR 32838
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_FOLDER_LIST 32824
#define | ID_VIEW_FORWARD 32821
#define | ID_VIEW_GOTO_CALENDAR 32840
#define | ID_VIEW_GOTO_DRAFTS 32841
#define | ID_VIEW_GOTO_FAVORITES 32849
#define | ID_VIEW_GOTO_HOME 32839
#define | ID_VIEW_GOTO_INBOX 32842
#define | ID_VIEW_GOTO_JOURNAL 32843
#define | ID_VIEW_GOTO_NOTES 32844
#define | ID_VIEW_GOTO_OUTBOX 32845
#define | ID_VIEW_GOTO_PERSONAL 32848
#define | ID_VIEW_GOTO_SENTITEMS 32846
#define | ID_VIEW_GOTO_TASKS 32847
#define | ID_VIEW_HOME 32819
#define | ID_VIEW_MAIL_TOOLBAR 32887
#define | ID_VIEW_MY_COMPUTER 32803
#define | ID_VIEW_OUTLOOKBAR 32837
#define | ID_VIEW_OUTLOOKBAR2003 32951
#define | ID_VIEW_PREVIEW_PANE 32825
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_UP 32823
#define | ID_VIEW_USER_TOOLBAR1 32793
#define | ID_VIEW_USER_TOOLBAR10 32802
#define | ID_VIEW_USER_TOOLBAR2 32794
#define | ID_VIEW_USER_TOOLBAR3 32795
#define | ID_VIEW_USER_TOOLBAR4 32796
#define | ID_VIEW_USER_TOOLBAR5 32797
#define | ID_VIEW_USER_TOOLBAR6 32798
#define | ID_VIEW_USER_TOOLBAR7 32799
#define | ID_VIEW_USER_TOOLBAR8 32800
#define | ID_VIEW_USER_TOOLBAR9 32801
#define | ID_VIEW_WEB_TOOLBAR 32829
#define | ID_WEB_ADDRESS 32836
#define | ID_WEB_BACK 32830
#define | ID_WEB_FIND 32835
#define | ID_WEB_FORWARD 32831
#define | ID_WEB_REFRESH 32833
#define | ID_WEB_START 32834
#define | ID_WEB_STOP 32832
#define | IDB_ADVANCED_HC 185
#define | IDB_ANIMATION 182
#define | IDB_ANIMATION_HC 196
#define | IDB_HEADER_IMAGES 175
#define | IDB_LIST_IMAGES 176
#define | IDB_MAIL_HC 187
#define | IDB_MENU_IMAGE_HC 188
#define | IDB_OUTLOOK_LARGE 168
#define | IDB_OUTLOOK_LARGE_HC 193
#define | IDB_OUTLOOK_SMALL 169
#define | IDB_OUTLOOK_SMALL_HC 194
#define | IDB_PAGES 183
#define | IDB_PAGES_HC 190
#define | IDB_PAGES_SMALL 192
#define | IDB_PAGES_SMALL_HC 191
#define | IDB_PIN 174
#define | IDB_TOOLBAR_HC 189
#define | IDB_WEB_HC 186
#define | IDC_APP_LOOK1 1012
#define | IDC_APP_LOOK2 1013
#define | IDC_APP_LOOK3 1014
#define | IDC_APPLY 3
#define | IDC_MAIL 1000
#define | IDC_MAIL_CC 1042
#define | IDC_MAIL_CC_NAME 1044
#define | IDC_MAIL_SUBJECT_NAME 1045
#define | IDC_MAIL_TO 1041
#define | IDC_MAIL_TO_NAME 1043
#define | IDC_OUTLOOKBAR2003 1044
#define | IDC_SHOW_AT_STARTUP 1015
#define | IDC_STYLE2007 1033
#define | IDD_ABOUTBOX 999
#define | IDD_APP_LOOK 180
#define | IDD_MAILBAR 103
#define | IDP_OLE_INIT_FAILED 100
#define | IDP_REST_OUTLOOK_PAGE 106
#define | IDR_ADVANCED 148
#define | IDR_CONTEXT_MENU 130
#define | IDR_DUMMY 173
#define | IDR_MAILFRAME 177
#define | IDR_MAINFRAME 128
#define | IDR_MENU_IMAGES 171
#define | IDR_OUTTYPE 129
#define | IDR_POPUP_OLBAR 150
#define | IDR_POPUP_OLBAR2003 151
#define | IDR_WEB 152
#define | IDS_ADV_TOOLBAR 102
#define | IDS_CUSTOMIZE 104
#define | IDS_FOLDER_POPUP_CAPTION 105
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_WEB_TOOLBAR 103
#define | IDS_WRONG_DISPLAY_SETTINGS 107

Define Documentation

#define ID_ADDRESS_BOOK 32817

Definition at line 82 of file resource.h.

#define ID_DUMMY 32866

Definition at line 129 of file resource.h.

#define ID_FIND_CONTACT 32818

Definition at line 83 of file resource.h.

#define ID_INDICATOR_ANIMATION 59142

Definition at line 160 of file resource.h.

#define ID_MAIL_ATTACHMENT 32872

Definition at line 134 of file resource.h.

#define ID_MAIL_BAR 32848

Definition at line 114 of file resource.h.

#define ID_MAIL_CHECK_NAMES 32873

Definition at line 135 of file resource.h.

#define ID_MAIL_CLOSE 32888

Definition at line 150 of file resource.h.

#define ID_MAIL_COPY_TO_FOLDER 32883

Definition at line 145 of file resource.h.

#define ID_MAIL_DELETE 32881

Definition at line 143 of file resource.h.

#define ID_MAIL_FLAG 32876

Definition at line 138 of file resource.h.

#define ID_MAIL_FONTSIZE 32878

Definition at line 140 of file resource.h.

#define ID_MAIL_HIGHT_PRIORITY 32874

Definition at line 136 of file resource.h.

#define ID_MAIL_ITEM 32885

Definition at line 147 of file resource.h.

#define ID_MAIL_LOW_PRIORITY 32875

Definition at line 137 of file resource.h.

#define ID_MAIL_MENU 32826

Definition at line 91 of file resource.h.

#define ID_MAIL_MOVE_TO_FOLDER 32882

Definition at line 144 of file resource.h.

#define ID_MAIL_OPTIONS 32877

Definition at line 139 of file resource.h.

#define ID_MAIL_PRINT 32869

Definition at line 132 of file resource.h.

#define ID_MAIL_PROPERTIES 32884

Definition at line 146 of file resource.h.

#define ID_MAIL_SAVE 32868

Definition at line 131 of file resource.h.

#define ID_MAIL_SAVE_ATTACHMENTS 32879

Definition at line 141 of file resource.h.

#define ID_MAIL_SAVE_STATIONERY 32880

Definition at line 142 of file resource.h.

#define ID_MAIL_SEND 32867

Definition at line 130 of file resource.h.

#define ID_MAIL_SIGNATURE 32871

Definition at line 133 of file resource.h.

#define ID_MAIL_SPELL 32886

Definition at line 148 of file resource.h.

#define ID_NEW_APPOINTMENT 32853

Definition at line 119 of file resource.h.

#define ID_NEW_CONTRACT 32857

Definition at line 123 of file resource.h.

#define ID_NEW_DISTRIBUTION_LIST 32858

Definition at line 124 of file resource.h.

#define ID_NEW_FAX 32851

Definition at line 117 of file resource.h.

#define ID_NEW_FOLDER 32855

Definition at line 121 of file resource.h.

#define ID_NEW_JOURNAL_ENTRY 32861

Definition at line 127 of file resource.h.

#define ID_NEW_MAIL 32850

Definition at line 116 of file resource.h.

#define ID_NEW_MEETING 32854

Definition at line 120 of file resource.h.

#define ID_NEW_NOTE 32862

Definition at line 128 of file resource.h.

#define ID_NEW_POST_FOLDER 32852

Definition at line 118 of file resource.h.

#define ID_NEW_SHORTCUT 32856

Definition at line 122 of file resource.h.

#define ID_NEW_TASK 32859

Definition at line 125 of file resource.h.

#define ID_NEW_TASK_REQUEST 32860

Definition at line 126 of file resource.h.

#define ID_OUTLOOK_ADD_PAGE 32891

Definition at line 153 of file resource.h.

#define ID_OUTLOOK_ANIMATION 32894

Definition at line 156 of file resource.h.

#define ID_OUTLOOK_DELETE_PAGE 32893

Definition at line 155 of file resource.h.

#define ID_OUTLOOK_RENAME_PAGE 32892

Definition at line 154 of file resource.h.

#define ID_OUTLOOK_SHOW_BACKGROUND 32889

Definition at line 151 of file resource.h.

#define ID_OUTLOOK_SHOW_TEXT_LABELS 32890

Definition at line 152 of file resource.h.

#define ID_RESET_PAGE 32895

Definition at line 157 of file resource.h.

#define ID_RULES_WIZARD 32827

Definition at line 92 of file resource.h.

#define ID_SEND_RECEIVE 32816

Definition at line 81 of file resource.h.

#define ID_SHOW_FOLDERS_POPUP 32822

Definition at line 87 of file resource.h.

#define ID_TOOLS_ENTRY 32805

Definition at line 70 of file resource.h.

#define ID_USER_TOOL1 32806

Definition at line 71 of file resource.h.

#define ID_USER_TOOL10 32815

Definition at line 80 of file resource.h.

#define ID_USER_TOOL2 32807

Definition at line 72 of file resource.h.

#define ID_USER_TOOL3 32808

Definition at line 73 of file resource.h.

#define ID_USER_TOOL4 32809

Definition at line 74 of file resource.h.

#define ID_USER_TOOL5 32810

Definition at line 75 of file resource.h.

#define ID_USER_TOOL6 32811

Definition at line 76 of file resource.h.

#define ID_USER_TOOL7 32812

Definition at line 77 of file resource.h.

#define ID_USER_TOOL8 32813

Definition at line 78 of file resource.h.

#define ID_USER_TOOL9 32814

Definition at line 79 of file resource.h.

#define ID_VIEW_ADVANCED_TOOLBAR 32828

Definition at line 93 of file resource.h.

#define ID_VIEW_APP_LOOK 32950

Definition at line 158 of file resource.h.

#define ID_VIEW_BACK 32820

Definition at line 85 of file resource.h.

#define ID_VIEW_CAPTIONBAR 32838

Definition at line 103 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 57 of file resource.h.

#define ID_VIEW_FOLDER_LIST 32824

Definition at line 89 of file resource.h.

#define ID_VIEW_FORWARD 32821

Definition at line 86 of file resource.h.

#define ID_VIEW_GOTO_CALENDAR 32840

Definition at line 105 of file resource.h.

#define ID_VIEW_GOTO_DRAFTS 32841

Definition at line 106 of file resource.h.

#define ID_VIEW_GOTO_FAVORITES 32849

Definition at line 115 of file resource.h.

#define ID_VIEW_GOTO_HOME 32839

Definition at line 104 of file resource.h.

#define ID_VIEW_GOTO_INBOX 32842

Definition at line 107 of file resource.h.

#define ID_VIEW_GOTO_JOURNAL 32843

Definition at line 108 of file resource.h.

#define ID_VIEW_GOTO_NOTES 32844

Definition at line 109 of file resource.h.

#define ID_VIEW_GOTO_OUTBOX 32845

Definition at line 110 of file resource.h.

#define ID_VIEW_GOTO_PERSONAL 32848

Definition at line 113 of file resource.h.

#define ID_VIEW_GOTO_SENTITEMS 32846

Definition at line 111 of file resource.h.

#define ID_VIEW_GOTO_TASKS 32847

Definition at line 112 of file resource.h.

#define ID_VIEW_HOME 32819

Definition at line 84 of file resource.h.

#define ID_VIEW_MAIL_TOOLBAR 32887

Definition at line 149 of file resource.h.

#define ID_VIEW_MY_COMPUTER 32803

Definition at line 69 of file resource.h.

#define ID_VIEW_OUTLOOKBAR 32837

Definition at line 102 of file resource.h.

#define ID_VIEW_OUTLOOKBAR2003 32951

Definition at line 159 of file resource.h.

#define ID_VIEW_PREVIEW_PANE 32825

Definition at line 90 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 58 of file resource.h.

#define ID_VIEW_UP 32823

Definition at line 88 of file resource.h.

#define ID_VIEW_USER_TOOLBAR1 32793

Definition at line 59 of file resource.h.

#define ID_VIEW_USER_TOOLBAR10 32802

Definition at line 68 of file resource.h.

#define ID_VIEW_USER_TOOLBAR2 32794

Definition at line 60 of file resource.h.

#define ID_VIEW_USER_TOOLBAR3 32795

Definition at line 61 of file resource.h.

#define ID_VIEW_USER_TOOLBAR4 32796

Definition at line 62 of file resource.h.

#define ID_VIEW_USER_TOOLBAR5 32797

Definition at line 63 of file resource.h.

#define ID_VIEW_USER_TOOLBAR6 32798

Definition at line 64 of file resource.h.

#define ID_VIEW_USER_TOOLBAR7 32799

Definition at line 65 of file resource.h.

#define ID_VIEW_USER_TOOLBAR8 32800

Definition at line 66 of file resource.h.

#define ID_VIEW_USER_TOOLBAR9 32801

Definition at line 67 of file resource.h.

#define ID_VIEW_WEB_TOOLBAR 32829

Definition at line 94 of file resource.h.

#define ID_WEB_ADDRESS 32836

Definition at line 101 of file resource.h.

#define ID_WEB_BACK 32830

Definition at line 95 of file resource.h.

#define ID_WEB_FIND 32835

Definition at line 100 of file resource.h.

#define ID_WEB_FORWARD 32831

Definition at line 96 of file resource.h.

#define ID_WEB_REFRESH 32833

Definition at line 98 of file resource.h.

#define ID_WEB_START 32834

Definition at line 99 of file resource.h.

#define ID_WEB_STOP 32832

Definition at line 97 of file resource.h.

#define IDB_ADVANCED_HC 185

Definition at line 33 of file resource.h.

#define IDB_ANIMATION 182

Definition at line 31 of file resource.h.

#define IDB_ANIMATION_HC 196

Definition at line 43 of file resource.h.

#define IDB_HEADER_IMAGES 175

Definition at line 27 of file resource.h.

#define IDB_LIST_IMAGES 176

Definition at line 28 of file resource.h.

#define IDB_MAIL_HC 187

Definition at line 35 of file resource.h.

#define IDB_MENU_IMAGE_HC 188

Definition at line 36 of file resource.h.

#define IDB_OUTLOOK_LARGE 168

Definition at line 22 of file resource.h.

#define IDB_OUTLOOK_LARGE_HC 193

Definition at line 41 of file resource.h.

#define IDB_OUTLOOK_SMALL 169

Definition at line 23 of file resource.h.

#define IDB_OUTLOOK_SMALL_HC 194

Definition at line 42 of file resource.h.

#define IDB_PAGES 183

Definition at line 32 of file resource.h.

#define IDB_PAGES_HC 190

Definition at line 38 of file resource.h.

#define IDB_PAGES_SMALL 192

Definition at line 40 of file resource.h.

#define IDB_PAGES_SMALL_HC 191

Definition at line 39 of file resource.h.

#define IDB_PIN 174

Definition at line 26 of file resource.h.

#define IDB_TOOLBAR_HC 189

Definition at line 37 of file resource.h.

#define IDB_WEB_HC 186

Definition at line 34 of file resource.h.

#define IDC_APP_LOOK1 1012

Definition at line 46 of file resource.h.

#define IDC_APP_LOOK2 1013

Definition at line 47 of file resource.h.

#define IDC_APP_LOOK3 1014

Definition at line 48 of file resource.h.

#define IDC_APPLY 3

Definition at line 5 of file resource.h.

#define IDC_MAIL 1000

Definition at line 45 of file resource.h.

#define IDC_MAIL_CC 1042

Definition at line 52 of file resource.h.

#define IDC_MAIL_CC_NAME 1044

Definition at line 54 of file resource.h.

#define IDC_MAIL_SUBJECT_NAME 1045

Definition at line 56 of file resource.h.

#define IDC_MAIL_TO 1041

Definition at line 51 of file resource.h.

#define IDC_MAIL_TO_NAME 1043

Definition at line 53 of file resource.h.

#define IDC_OUTLOOKBAR2003 1044

Definition at line 55 of file resource.h.

#define IDC_SHOW_AT_STARTUP 1015

Definition at line 49 of file resource.h.

#define IDC_STYLE2007 1033

Definition at line 50 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 44 of file resource.h.

#define IDD_APP_LOOK 180

Definition at line 30 of file resource.h.

#define IDD_MAILBAR 103

Definition at line 10 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDP_REST_OUTLOOK_PAGE 106

Definition at line 13 of file resource.h.

#define IDR_ADVANCED 148

Definition at line 18 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 17 of file resource.h.

#define IDR_DUMMY 173

Definition at line 25 of file resource.h.

#define IDR_MAILFRAME 177

Definition at line 29 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 15 of file resource.h.

#define IDR_MENU_IMAGES 171

Definition at line 24 of file resource.h.

#define IDR_OUTTYPE 129

Definition at line 16 of file resource.h.

#define IDR_POPUP_OLBAR 150

Definition at line 19 of file resource.h.

#define IDR_POPUP_OLBAR2003 151

Definition at line 20 of file resource.h.

#define IDR_WEB 152

Definition at line 21 of file resource.h.

#define IDS_ADV_TOOLBAR 102

Definition at line 8 of file resource.h.

#define IDS_CUSTOMIZE 104

Definition at line 11 of file resource.h.

#define IDS_FOLDER_POPUP_CAPTION 105

Definition at line 12 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 7 of file resource.h.

#define IDS_WEB_TOOLBAR 103

Definition at line 9 of file resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 107

Definition at line 14 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/StdAfx.cpp File Reference

  • vc2008fp
  • OutlookDemo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/stdafx.h File Reference

  • vc2008fp
  • OutlookDemo
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxcview.h>
#include <afxadv.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/targetver.h File Reference

  • vc2008fp
  • OutlookDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/WorkspaceObj.cpp File Reference

  • vc2008fp
  • OutlookDemo

WorkspaceObj.cpp File Reference

#include "stdafx.h"
#include "OutlookDemo.h"
#include "WorkspaceObj.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/WorkspaceObj.h File Reference

  • vc2008fp
  • OutlookDemo
Classes

WorkspaceObj.h File Reference

Go to the source code of this file.

Classes

class CWorkspaceObj
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/MainFrm.cpp File Reference

  • vc2008fp
  • OutlookMultiViews

MainFrm.cpp File Reference

#include "stdafx.h"
#include "OutlookMultiViews.h"
#include "MainFrm.h"
#include "View1.h"
#include "View2.h"
#include "View3.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/MainFrm.h File Reference

  • vc2008fp
  • OutlookMultiViews
Classes | Defines

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx
#define | NUMVIEWS 4

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 3 of file MainFrm.h.

#define NUMVIEWS 4

Definition at line 4 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViews.cpp File Reference

  • vc2008fp
  • OutlookMultiViews
Classes | Variables

OutlookMultiViews.cpp File Reference

#include "stdafx.h"
#include "OutlookMultiViews.h"
#include "MainFrm.h"
#include "OutlookMultiViewsDoc.h"
#include "OutlookMultiViewsView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

COutlookMultiViewsApp theApp

Variable Documentation

COutlookMultiViewsApp theApp

Definition at line 38 of file OutlookMultiViews.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViews.h File Reference

  • vc2008fp
  • OutlookMultiViews
Classes | Variables

OutlookMultiViews.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class COutlookMultiViewsApp

Variables

COutlookMultiViewsApp theApp

Variable Documentation

COutlookMultiViewsApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.cpp File Reference

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViewsDoc.cpp File Reference

#include "stdafx.h"
#include "OutlookMultiViews.h"
#include "OutlookMultiViewsDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.h File Reference

  • vc2008fp
  • OutlookMultiViews
Classes

OutlookMultiViewsDoc.h File Reference

Go to the source code of this file.

Classes

class COutlookMultiViewsDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsView.cpp File Reference

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViewsView.cpp File Reference

#include "stdafx.h"
#include "OutlookMultiViews.h"
#include "OutlookMultiViewsDoc.h"
#include "OutlookMultiViewsView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsView.h File Reference

  • vc2008fp
  • OutlookMultiViews
Classes

OutlookMultiViewsView.h File Reference

Go to the source code of this file.

Classes

class COutlookMultiViewsView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/resource.h File Reference

  • vc2008fp
  • OutlookMultiViews
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_SHORTCUT_1 32818
#define | ID_SHORTCUT_2 32819
#define | ID_SHORTCUT_3 32820
#define | ID_SHORTCUT_4 32821
#define | ID_SHORTCUTS_PANE_1 32824
#define | ID_SHORTCUTS_PANE_2 32825
#define | ID_SHORTCUTS_TREE 32826
#define | ID_VIEW_APPLOOK_2000 32833
#define | ID_VIEW_APPLOOK_2003 32835
#define | ID_VIEW_APPLOOK_2007_1 32838
#define | ID_VIEW_APPLOOK_2007_2 32839
#define | ID_VIEW_APPLOOK_2007_3 32840
#define | ID_VIEW_APPLOOK_2007_4 32841
#define | ID_VIEW_APPLOOK_VS2005 32837
#define | ID_VIEW_APPLOOK_WIN_XP 32836
#define | ID_VIEW_APPLOOK_XP 32834
#define | ID_VIEW_CAPTIONBAR 32816
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_OUTLOOKBAR 32817
#define | ID_VIEW_TOOLBARS 32771
#define | IDB_CAPTION 150
#define | IDB_SHORTCUTS 148
#define | IDB_TOOLBAR256 151
#define | IDC_COMPANY_URL 1041
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_OUTLOOTYPE 129
#define | IDR_POPUP_TOOLBAR 131

Define Documentation

#define ID_SHORTCUT_1 32818

Definition at line 20 of file resource.h.

#define ID_SHORTCUT_2 32819

Definition at line 21 of file resource.h.

#define ID_SHORTCUT_3 32820

Definition at line 22 of file resource.h.

#define ID_SHORTCUT_4 32821

Definition at line 23 of file resource.h.

#define ID_SHORTCUTS_PANE_1 32824

Definition at line 24 of file resource.h.

#define ID_SHORTCUTS_PANE_2 32825

Definition at line 25 of file resource.h.

#define ID_SHORTCUTS_TREE 32826

Definition at line 26 of file resource.h.

#define ID_VIEW_APPLOOK_2000 32833

Definition at line 28 of file resource.h.

#define ID_VIEW_APPLOOK_2003 32835

Definition at line 30 of file resource.h.

#define ID_VIEW_APPLOOK_2007_1 32838

Definition at line 33 of file resource.h.

#define ID_VIEW_APPLOOK_2007_2 32839

Definition at line 34 of file resource.h.

#define ID_VIEW_APPLOOK_2007_3 32840

Definition at line 35 of file resource.h.

#define ID_VIEW_APPLOOK_2007_4 32841

Definition at line 36 of file resource.h.

#define ID_VIEW_APPLOOK_VS2005 32837

Definition at line 32 of file resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32836

Definition at line 31 of file resource.h.

#define ID_VIEW_APPLOOK_XP 32834

Definition at line 29 of file resource.h.

#define ID_VIEW_CAPTIONBAR 32816

Definition at line 18 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 17 of file resource.h.

#define ID_VIEW_OUTLOOKBAR 32817

Definition at line 19 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 16 of file resource.h.

#define IDB_CAPTION 150

Definition at line 12 of file resource.h.

#define IDB_SHORTCUTS 148

Definition at line 11 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 13 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 15 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 14 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 8 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDR_OUTLOOTYPE 129

Definition at line 7 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 9 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/StdAfx.cpp File Reference

  • vc2008fp
  • OutlookMultiViews

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/StdAfx.h File Reference

  • vc2008fp
  • OutlookMultiViews
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/targetver.h File Reference

  • vc2008fp
  • OutlookMultiViews
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View1.cpp File Reference

  • vc2008fp
  • OutlookMultiViews

View1.cpp File Reference

#include "stdafx.h"
#include "OutlookMultiViews.h"
#include "View1.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View1.h File Reference

  • vc2008fp
  • OutlookMultiViews
Classes

View1.h File Reference

Go to the source code of this file.

Classes

class CView1
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View2.cpp File Reference

  • vc2008fp
  • OutlookMultiViews

View2.cpp File Reference

#include "stdafx.h"
#include "OutlookMultiViews.h"
#include "View2.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View2.h File Reference

  • vc2008fp
  • OutlookMultiViews
Classes

View2.h File Reference

Go to the source code of this file.

Classes

class CView2
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View3.cpp File Reference

  • vc2008fp
  • OutlookMultiViews

View3.cpp File Reference

#include "stdafx.h"
#include "OutlookMultiViews.h"
#include "View3.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View3.h File Reference

  • vc2008fp
  • OutlookMultiViews
Classes

View3.h File Reference

Go to the source code of this file.

Classes

class CView3
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/LineStyleMenuItem.cpp File Reference

  • vc2008fp
  • OwnerDrawMenu
Variables

LineStyleMenuItem.cpp File Reference

#include "stdafx.h"
#include "LineStyleMenuItem.h"

Go to the source code of this file.

Variables

const int nHorzMargin = 5

Variable Documentation

const int nHorzMargin = 5

Definition at line 22 of file LineStyleMenuItem.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/LineStyleMenuItem.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Classes

LineStyleMenuItem.h File Reference

Go to the source code of this file.

Classes

class CLineStyleMenuItem
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/MainFrm.cpp File Reference

  • vc2008fp
  • OwnerDrawMenu

MainFrm.cpp File Reference

#include "stdafx.h"
#include "OwnerDrawMenu.h"
#include "LineStyleMenuItem.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/MainFrm.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Classes | Defines

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 13 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenu.cpp File Reference

  • vc2008fp
  • OwnerDrawMenu
Classes | Variables

OwnerDrawMenu.cpp File Reference

#include "stdafx.h"
#include "OwnerDrawMenu.h"
#include "MainFrm.h"
#include "OwnerDrawMenuDoc.h"
#include "OwnerDrawMenuView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

COwnerDrawMenuApp theApp

Variable Documentation

COwnerDrawMenuApp theApp

Definition at line 48 of file OwnerDrawMenu.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenu.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Classes | Variables

OwnerDrawMenu.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class COwnerDrawMenuApp

Variables

COwnerDrawMenuApp theApp

Variable Documentation

COwnerDrawMenuApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.cpp File Reference

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenuDoc.cpp File Reference

#include "stdafx.h"
#include "OwnerDrawMenu.h"
#include "OwnerDrawMenuDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Classes

OwnerDrawMenuDoc.h File Reference

Go to the source code of this file.

Classes

class COwnerDrawMenuDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.cpp File Reference

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenuView.cpp File Reference

#include "stdafx.h"
#include "OwnerDrawMenu.h"
#include "OwnerDrawMenuDoc.h"
#include "OwnerDrawMenuView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Classes

OwnerDrawMenuView.h File Reference

Go to the source code of this file.

Classes

class COwnerDrawMenuView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/resource.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_LINE_STYLE_1 32822
#define | ID_LINE_STYLE_10 32831
#define | ID_LINE_STYLE_2 32823
#define | ID_LINE_STYLE_3 32824
#define | ID_LINE_STYLE_4 32825
#define | ID_LINE_STYLE_5 32826
#define | ID_LINE_STYLE_6 32827
#define | ID_LINE_STYLE_7 32828
#define | ID_LINE_STYLE_8 32829
#define | ID_LINE_STYLE_9 32830
#define | ID_LINE_STYLE_MENU 32833
#define | ID_MORE_LINES 32832
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_LINE_STYLE_POPUP 151
#define | IDR_MAINFRAME 128
#define | IDR_OWNERDTYPE 129
#define | IDR_POPUP_TOOLBAR 131
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_LINE_STYLE_1 32822

Definition at line 15 of file resource.h.

#define ID_LINE_STYLE_10 32831

Definition at line 24 of file resource.h.

#define ID_LINE_STYLE_2 32823

Definition at line 16 of file resource.h.

#define ID_LINE_STYLE_3 32824

Definition at line 17 of file resource.h.

#define ID_LINE_STYLE_4 32825

Definition at line 18 of file resource.h.

#define ID_LINE_STYLE_5 32826

Definition at line 19 of file resource.h.

#define ID_LINE_STYLE_6 32827

Definition at line 20 of file resource.h.

#define ID_LINE_STYLE_7 32828

Definition at line 21 of file resource.h.

#define ID_LINE_STYLE_8 32829

Definition at line 22 of file resource.h.

#define ID_LINE_STYLE_9 32830

Definition at line 23 of file resource.h.

#define ID_LINE_STYLE_MENU 32833

Definition at line 26 of file resource.h.

#define ID_MORE_LINES 32832

Definition at line 25 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 13 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 14 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 12 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 9 of file resource.h.

#define IDR_LINE_STYLE_POPUP 151

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_OWNERDTYPE 129

Definition at line 8 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 10 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/StdAfx.cpp File Reference

  • vc2008fp
  • OwnerDrawMenu

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/StdAfx.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/targetver.h File Reference

  • vc2008fp
  • OwnerDrawMenu
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/MainFrm.cpp File Reference

  • vc2008fp
  • PaletteDemo

MainFrm.cpp File Reference

#include "stdafx.h"
#include "PaletteDemo.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/MainFrm.h File Reference

  • vc2008fp
  • PaletteDemo
Classes

MainFrm.h File Reference

#include "ToolsPalette.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemo.cpp File Reference

  • vc2008fp
  • PaletteDemo
Classes | Variables

PaletteDemo.cpp File Reference

#include "stdafx.h"
#include "PaletteDemo.h"
#include "MainFrm.h"
#include "PaletteDemoDoc.h"
#include "PaletteDemoView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CPaletteDemoApp theApp

Variable Documentation

CPaletteDemoApp theApp

Definition at line 48 of file PaletteDemo.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemo.h File Reference

  • vc2008fp
  • PaletteDemo
Classes | Variables

PaletteDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CPaletteDemoApp

Variables

CPaletteDemoApp theApp

Variable Documentation

CPaletteDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoDoc.cpp File Reference

  • vc2008fp
  • PaletteDemo

PaletteDemoDoc.cpp File Reference

#include "stdafx.h"
#include "PaletteDemo.h"
#include "PaletteDemoDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoDoc.h File Reference

  • vc2008fp
  • PaletteDemo
Classes

PaletteDemoDoc.h File Reference

Go to the source code of this file.

Classes

class CPaletteDemoDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoView.cpp File Reference

  • vc2008fp
  • PaletteDemo

PaletteDemoView.cpp File Reference

#include "stdafx.h"
#include "PaletteDemo.h"
#include "PaletteDemoDoc.h"
#include "PaletteDemoView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoView.h File Reference

  • vc2008fp
  • PaletteDemo
Classes

PaletteDemoView.h File Reference

Go to the source code of this file.

Classes

class CPaletteDemoView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/resource.h File Reference

  • vc2008fp
  • PaletteDemo
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CPAL_CHECK 32825
#define | ID_FOUR_COLUMNS 32843
#define | ID_PAL_AVI 32838
#define | ID_PAL_BUTTON 32824
#define | ID_PAL_COMBO 32827
#define | ID_PAL_CURSOR 32819
#define | ID_PAL_EDIT 32822
#define | ID_PAL_FRAME 32823
#define | ID_PAL_HSCROLL 32829
#define | ID_PAL_KEY 32834
#define | ID_PAL_LIST 32828
#define | ID_PAL_LIST_CTRL 32835
#define | ID_PAL_PICTURE 32820
#define | ID_PAL_PROGRESS 32832
#define | ID_PAL_RADIO 32826
#define | ID_PAL_SLIDER 32833
#define | ID_PAL_SPIN 32831
#define | ID_PAL_STATIC 32821
#define | ID_PAL_TAB 32837
#define | ID_PAL_VSCROLL 32830
#define | ID_THREE_COLUMNS 32841
#define | ID_TREE_CTRL 32836
#define | ID_TWO_COLUMNS 32839
#define | ID_VIEW_CUSTOMIZE 32844
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_TOOLS_PALETTE 32818
#define | IDD_ABOUTBOX 999
#define | IDR_MAINFRAME 128
#define | IDR_PALETTE 151
#define | IDR_PALETTTYPE 129
#define | IDR_POPUP_TOOLBAR 131
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_PALETTE 102

Define Documentation

#define ID_CPAL_CHECK 32825

Definition at line 20 of file resource.h.

#define ID_FOUR_COLUMNS 32843

Definition at line 36 of file resource.h.

#define ID_PAL_AVI 32838

Definition at line 33 of file resource.h.

#define ID_PAL_BUTTON 32824

Definition at line 19 of file resource.h.

#define ID_PAL_COMBO 32827

Definition at line 22 of file resource.h.

#define ID_PAL_CURSOR 32819

Definition at line 14 of file resource.h.

#define ID_PAL_EDIT 32822

Definition at line 17 of file resource.h.

#define ID_PAL_FRAME 32823

Definition at line 18 of file resource.h.

#define ID_PAL_HSCROLL 32829

Definition at line 24 of file resource.h.

#define ID_PAL_KEY 32834

Definition at line 29 of file resource.h.

#define ID_PAL_LIST 32828

Definition at line 23 of file resource.h.

#define ID_PAL_LIST_CTRL 32835

Definition at line 30 of file resource.h.

#define ID_PAL_PICTURE 32820

Definition at line 15 of file resource.h.

#define ID_PAL_PROGRESS 32832

Definition at line 27 of file resource.h.

#define ID_PAL_RADIO 32826

Definition at line 21 of file resource.h.

#define ID_PAL_SLIDER 32833

Definition at line 28 of file resource.h.

#define ID_PAL_SPIN 32831

Definition at line 26 of file resource.h.

#define ID_PAL_STATIC 32821

Definition at line 16 of file resource.h.

#define ID_PAL_TAB 32837

Definition at line 32 of file resource.h.

#define ID_PAL_VSCROLL 32830

Definition at line 25 of file resource.h.

#define ID_THREE_COLUMNS 32841

Definition at line 35 of file resource.h.

#define ID_TREE_CTRL 32836

Definition at line 31 of file resource.h.

#define ID_TWO_COLUMNS 32839

Definition at line 34 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32844

Definition at line 37 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 12 of file resource.h.

#define ID_VIEW_TOOLS_PALETTE 32818

Definition at line 13 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_PALETTE 151

Definition at line 10 of file resource.h.

#define IDR_PALETTTYPE 129

Definition at line 8 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 9 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 5 of file resource.h.

#define IDS_PALETTE 102

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/StdAfx.cpp File Reference

  • vc2008fp
  • PaletteDemo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/StdAfx.h File Reference

  • vc2008fp
  • PaletteDemo
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/targetver.h File Reference

  • vc2008fp
  • PaletteDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/ToolsPalette.cpp File Reference

  • vc2008fp
  • PaletteDemo
Variables

ToolsPalette.cpp File Reference

#include "stdafx.h"
#include "PaletteDemo.h"
#include "ToolsPalette.h"

Go to the source code of this file.

Variables

const int | nHorzMargin = 5
const int | nInfoHeight = 50
const int | nVertMargin = 5

Variable Documentation

const int nHorzMargin = 5

Definition at line 22 of file ToolsPalette.cpp.

const int nInfoHeight = 50

Definition at line 21 of file ToolsPalette.cpp.

const int nVertMargin = 5

Definition at line 23 of file ToolsPalette.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/ToolsPalette.h File Reference

  • vc2008fp
  • PaletteDemo
Classes

ToolsPalette.h File Reference

Go to the source code of this file.

Classes

class CToolsPalette
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertyPage1.cpp File Reference

  • vc2008fp
  • PropSheetDemo

MyPropertyPage1.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "MyPropertyPage1.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertyPage1.h File Reference

  • vc2008fp
  • PropSheetDemo
Classes

MyPropertyPage1.h File Reference

Go to the source code of this file.

Classes

class | CMyPropertyPage1
class | CMyPropertyPage2
class | CMyPropertyPage3
class | CMyPropertyPage4
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertySheet.cpp File Reference

  • vc2008fp
  • PropSheetDemo

MyPropertySheet.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "MyPropertySheet.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertySheet.h File Reference

  • vc2008fp
  • PropSheetDemo
Classes

MyPropertySheet.h File Reference

#include "MyPropertyPage1.h"

Go to the source code of this file.

Classes

class CMyPropertySheet
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemo.cpp File Reference

  • vc2008fp
  • PropSheetDemo
Variables

PropSheetDemo.cpp File Reference

#include "stdafx.h"
#include "PropSheetDemo.h"
#include "PropSheetDemoDlg.h"

Go to the source code of this file.

Variables

CPropSheetDemoApp theApp

Variable Documentation

CPropSheetDemoApp theApp

Definition at line 29 of file PropSheetDemo.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemo.h File Reference

  • vc2008fp
  • PropSheetDemo
Classes

PropSheetDemo.h File Reference

#include "resource.h"

Go to the source code of this file.

Classes

class CPropSheetDemoApp
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemoDlg.cpp File Reference

  • vc2008fp
  • PropSheetDemo
Defines

PropSheetDemoDlg.cpp File Reference

#include "stdafx.h"
#include "PropSheetDemo.h"
#include "PropSheetDemoDlg.h"
#include "MyPropertySheet.h"

Go to the source code of this file.

Defines

#define HEADER_HEIGHT 30

Define Documentation

#define HEADER_HEIGHT 30

Definition at line 12 of file PropSheetDemoDlg.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemoDlg.h File Reference

  • vc2008fp
  • PropSheetDemo
Classes

PropSheetDemoDlg.h File Reference

Go to the source code of this file.

Classes

class CPropSheetDemoDlg
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/resource.h File Reference

  • vc2008fp
  • PropSheetDemo
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | IDB_ICONS_LARGE 129
#define | IDB_ICONS_SMALL 130
#define | IDB_TREE_ICONS 131
#define | IDC_HEADER 1005
#define | IDC_PROP_SHEET1 1000
#define | IDC_PROP_SHEET2 1001
#define | IDC_PROP_SHEET3 1002
#define | IDC_PROP_SHEET4 1003
#define | IDC_PROP_SHEET5 1004
#define | IDD_PROPPAGE1 104
#define | IDD_PROPPAGE2 105
#define | IDD_PROPPAGE3 106
#define | IDD_PROPPAGE4 107
#define | IDD_PROPSHEETDEMO_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDS_ABOUTBOX 101
#define | IDS_PROPSHT_CAPTION 103

Define Documentation

#define IDB_ICONS_LARGE 129

Definition at line 14 of file resource.h.

#define IDB_ICONS_SMALL 130

Definition at line 15 of file resource.h.

#define IDB_TREE_ICONS 131

Definition at line 16 of file resource.h.

#define IDC_HEADER 1005

Definition at line 22 of file resource.h.

#define IDC_PROP_SHEET1 1000

Definition at line 17 of file resource.h.

#define IDC_PROP_SHEET2 1001

Definition at line 18 of file resource.h.

#define IDC_PROP_SHEET3 1002

Definition at line 19 of file resource.h.

#define IDC_PROP_SHEET4 1003

Definition at line 20 of file resource.h.

#define IDC_PROP_SHEET5 1004

Definition at line 21 of file resource.h.

#define IDD_PROPPAGE1 104

Definition at line 9 of file resource.h.

#define IDD_PROPPAGE2 105

Definition at line 10 of file resource.h.

#define IDD_PROPPAGE3 106

Definition at line 11 of file resource.h.

#define IDD_PROPPAGE4 107

Definition at line 12 of file resource.h.

#define IDD_PROPSHEETDEMO_DIALOG 102

Definition at line 7 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 13 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 6 of file resource.h.

#define IDS_PROPSHT_CAPTION 103

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/StdAfx.cpp File Reference

  • vc2008fp
  • PropSheetDemo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/StdAfx.h File Reference

  • vc2008fp
  • PropSheetDemo
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/targetver.h File Reference

  • vc2008fp
  • PropSheetDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/ChildFrm.cpp File Reference

  • vc2008fp
  • RebarTest

ChildFrm.cpp File Reference

#include "stdafx.h"
#include "RebarTest.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/ChildFrm.h File Reference

  • vc2008fp
  • RebarTest
Classes

ChildFrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/MainFrm.cpp File Reference

  • vc2008fp
  • RebarTest
Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "RebarTest.h"
#include "MainFrm.h"

Go to the source code of this file.

Variables

const int | iMaxUserToolbars = 10
const UINT | uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40
const UINT | uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Variable Documentation

const int iMaxUserToolbars = 10

Definition at line 25 of file MainFrm.cpp.

const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40

Definition at line 26 of file MainFrm.cpp.

const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Definition at line 27 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/MainFrm.h File Reference

  • vc2008fp
  • RebarTest
Classes

MainFrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTest.cpp File Reference

  • vc2008fp
  • RebarTest
Classes | Variables

RebarTest.cpp File Reference

#include "stdafx.h"
#include "RebarTest.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "RebarTestDoc.h"
#include "RebarTestView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CRebarTestApp theApp

Variable Documentation

CRebarTestApp theApp

Definition at line 48 of file RebarTest.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTest.h File Reference

  • vc2008fp
  • RebarTest
Classes | Variables

RebarTest.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CRebarTestApp

Variables

CRebarTestApp theApp

Variable Documentation

CRebarTestApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestDoc.cpp File Reference

  • vc2008fp
  • RebarTest

RebarTestDoc.cpp File Reference

#include "stdafx.h"
#include "RebarTest.h"
#include "RebarTestDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestDoc.h File Reference

  • vc2008fp
  • RebarTest
Classes

RebarTestDoc.h File Reference

Go to the source code of this file.

Classes

class CRebarTestDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestView.cpp File Reference

  • vc2008fp
  • RebarTest

RebarTestView.cpp File Reference

#include "stdafx.h"
#include "RebarTest.h"
#include "RebarTestDoc.h"
#include "RebarTestView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestView.h File Reference

  • vc2008fp
  • RebarTest
Classes

RebarTestView.h File Reference

Go to the source code of this file.

Classes

class CRebarTestView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/Resource.h File Reference

  • vc2008fp
  • RebarTest
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_APPLOOK_2000 32826
#define | ID_VIEW_APPLOOK_2003 32828
#define | ID_VIEW_APPLOOK_2007 32831
#define | ID_VIEW_APPLOOK_2007_1 32832
#define | ID_VIEW_APPLOOK_2007_2 32833
#define | ID_VIEW_APPLOOK_2007_3 32834
#define | ID_VIEW_APPLOOK_VS2005 32830
#define | ID_VIEW_APPLOOK_WIN_XP 32829
#define | ID_VIEW_APPLOOK_XP 32827
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_USER_TOOLBAR1 32793
#define | ID_VIEW_USER_TOOLBAR10 32802
#define | ID_VIEW_USER_TOOLBAR2 32794
#define | ID_VIEW_USER_TOOLBAR3 32795
#define | ID_VIEW_USER_TOOLBAR4 32796
#define | ID_VIEW_USER_TOOLBAR5 32797
#define | ID_VIEW_USER_TOOLBAR6 32798
#define | ID_VIEW_USER_TOOLBAR7 32799
#define | ID_VIEW_USER_TOOLBAR8 32800
#define | ID_VIEW_USER_TOOLBAR9 32801
#define | ID_WINDOW_MANAGER 32825
#define | IDB_TOOLBAR256 151
#define | IDC_COMPANY_URL 1041
#define | IDD_ABOUTBOX 100
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_RebarTestTYPE 129
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_WINDOWS_MANAGER 107

Define Documentation

#define ID_VIEW_APPLOOK_2000 32826

Definition at line 28 of file Resource.h.

#define ID_VIEW_APPLOOK_2003 32828

Definition at line 30 of file Resource.h.

#define ID_VIEW_APPLOOK_2007 32831

Definition at line 33 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_1 32832

Definition at line 34 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_2 32833

Definition at line 35 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_3 32834

Definition at line 36 of file Resource.h.

#define ID_VIEW_APPLOOK_VS2005 32830

Definition at line 32 of file Resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32829

Definition at line 31 of file Resource.h.

#define ID_VIEW_APPLOOK_XP 32827

Definition at line 29 of file Resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 16 of file Resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 13 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR1 32793

Definition at line 17 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR10 32802

Definition at line 26 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR2 32794

Definition at line 18 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR3 32795

Definition at line 19 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR4 32796

Definition at line 20 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR5 32797

Definition at line 21 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR6 32798

Definition at line 22 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR7 32799

Definition at line 23 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR8 32800

Definition at line 24 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR9 32801

Definition at line 25 of file Resource.h.

#define ID_WINDOW_MANAGER 32825

Definition at line 27 of file Resource.h.

#define IDB_TOOLBAR256 151

Definition at line 11 of file Resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 15 of file Resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file Resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file Resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 9 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file Resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 10 of file Resource.h.

#define IDR_RebarTestTYPE 129

Definition at line 8 of file Resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 12 of file Resource.h.

#define IDS_WINDOWS_MANAGER 107

Definition at line 14 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/stdafx.cpp File Reference

  • vc2008fp
  • RebarTest

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/stdafx.h File Reference

  • vc2008fp
  • RebarTest
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/targetver.h File Reference

  • vc2008fp
  • RebarTest
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/MainFrm.cpp File Reference

  • vc2008fp
  • RibbonGadgets
Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "RibbonGadgets.h"
#include "MainFrm.h"
#include <memory>

Go to the source code of this file.

Variables

const int | IdShowProgress1Timer = 1
const int | IdShowProgress2Timer = 2

Variable Documentation

const int IdShowProgress1Timer = 1

Definition at line 25 of file MainFrm.cpp.

const int IdShowProgress2Timer = 2

Definition at line 26 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/MainFrm.h File Reference

  • vc2008fp
  • RibbonGadgets
Classes

MainFrm.h File Reference

#include "OutputBar.h"
#include "OutputBar.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/OutputBar.cpp File Reference

  • vc2008fp
  • RibbonGadgets
Functions

OutputBar.cpp File Reference

#include "stdafx.h"
#include "ribbongadgets.h"
#include "OutputBar.h"
#include "../src/mfc/AfxImpl.h"
#include <memory>

Go to the source code of this file.

Functions

void ErrorReport (LPCTSTR lpszPathName, CException *e)

Function Documentation

void ErrorReport | ( | LPCTSTR | lpszPathName,
 |  | CException * | e
 | ) |  |

Definition at line 204 of file OutputBar.cpp.

{
  UINT nIDP = 0;
  UINT nHelpContext = 0;
  CString prompt;

  if (e->IsKindOf(RUNTIME_CLASS(CFileException)))
  {
    TRACE(traceAppMsg, 0, "Reporting file I/O exception on save with lOsError = $%lX.\n",
      ((CFileException*)e)->m_lOsError);

    CFileException* pFileException = (CFileException*)e;
    if (pFileException->m_strFileName.IsEmpty())
    {
      pFileException->m_strFileName = lpszPathName;
    }

    LPTSTR lpszMessage = prompt.GetBuffer(255);
    ASSERT(lpszMessage != NULL);
    if (!e->GetErrorMessage(lpszMessage, 256, &nHelpContext))
    {
      switch (((CFileException*)e)->m_cause)
      {
        case CFileException::fileNotFound:
        case CFileException::badPath:
          nIDP = AFX_IDP_FAILED_INVALID_PATH;
          break;
        case CFileException::diskFull:
          nIDP = AFX_IDP_FAILED_DISK_FULL;
          break;
        case CFileException::accessDenied:
          nIDP = AFX_IDP_FAILED_ACCESS_WRITE;
          break;

        case CFileException::badSeek:
        case CFileException::genericException:
        case CFileException::tooManyOpenFiles:
        case CFileException::invalidFile:
        case CFileException::hardIO:
        case CFileException::directoryFull:
          break;

        default:
          break;
      }
    }
    prompt.ReleaseBuffer();
  }

  if (prompt.IsEmpty())
  {
    TCHAR szTitle[_MAX_PATH];
    AfxGetFileTitle(lpszPathName, szTitle, _countof(szTitle));

    if (nIDP != 0)
    {
      AfxFormatString1(prompt, nIDP, szTitle);
    }
    else
    {
      prompt.Format (_T("Failed to save file: %s."), szTitle);
    }
  }

  AfxMessageBox(prompt, MB_ICONEXCLAMATION, nHelpContext);
}

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/OutputBar.h File Reference

  • vc2008fp
  • RibbonGadgets
Classes

OutputBar.h File Reference

Go to the source code of this file.

Classes

class | COutputBar
class | COutputToolBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/resource.h File Reference

  • vc2008fp
  • RibbonGadgets
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_RIBBON_A 32853
#define | ID_RIBBON_BTN_1 32855
#define | ID_RIBBON_BTN_2 32857
#define | ID_RIBBON_BTN_3 32858
#define | ID_RIBBON_BTN_4 32859
#define | ID_RIBBON_BTN_5 32860
#define | ID_RIBBON_BTN_6 32861
#define | ID_RIBBON_BTN_7 32862
#define | ID_RIBBON_BTN_8 32854
#define | ID_RIBBON_BTN_9 32863
#define | ID_RIBBON_CBTN_1 32901
#define | ID_RIBBON_CBTN_10 32930
#define | ID_RIBBON_CBTN_2 32902
#define | ID_RIBBON_CBTN_3 32900
#define | ID_RIBBON_CBTN_4 32903
#define | ID_RIBBON_CBTN_5 32904
#define | ID_RIBBON_CBTN_6 32905
#define | ID_RIBBON_CBTN_7 32906
#define | ID_RIBBON_CBTN_8 32907
#define | ID_RIBBON_CBTN_9 32908
#define | ID_RIBBON_EBTN_1 32909
#define | ID_RIBBON_EBTN_2 32910
#define | ID_RIBBON_EBTN_3 32911
#define | ID_RIBBON_EBTN_4 32913
#define | ID_RIBBON_EBTN_5 32914
#define | ID_RIBBON_EBTN_6 32915
#define | ID_RIBBON_EBTN_7 32916
#define | ID_RIBBON_EBTN_8 32917
#define | ID_RIBBON_EBTN_9 32918
#define | ID_RIBBON_GBTN_1 32886
#define | ID_RIBBON_GBTN_10 32897
#define | ID_RIBBON_GBTN_11 32898
#define | ID_RIBBON_GBTN_2 32887
#define | ID_RIBBON_GBTN_3 32888
#define | ID_RIBBON_GBTN_4 32889
#define | ID_RIBBON_GBTN_5 32890
#define | ID_RIBBON_GBTN_6 32891
#define | ID_RIBBON_GBTN_7 32894
#define | ID_RIBBON_GBTN_8 32895
#define | ID_RIBBON_GBTN_9 32896
#define | ID_RIBBON_MBTN_1 32870
#define | ID_RIBBON_MBTN_2 32871
#define | ID_RIBBON_MENU_ITEM_1 32864
#define | ID_RIBBON_MENU_ITEM_2 32865
#define | ID_RIBBON_MENU_ITEM_3 32866
#define | ID_RIBBON_MENU_ITEM_4 32867
#define | ID_RIBBON_MENU_ITEM_5 32868
#define | ID_RIBBON_MENU_ITEM_6 32869
#define | ID_RIBBON_OBTN_1 32919
#define | ID_RIBBON_OBTN_10 32928
#define | ID_RIBBON_OBTN_11 32929
#define | ID_RIBBON_OBTN_2 32920
#define | ID_RIBBON_OBTN_3 32921
#define | ID_RIBBON_OBTN_4 32922
#define | ID_RIBBON_OBTN_5 32923
#define | ID_RIBBON_OBTN_6 32924
#define | ID_RIBBON_OBTN_7 32925
#define | ID_RIBBON_OBTN_8 32926
#define | ID_RIBBON_OBTN_9 32927
#define | ID_RIBBON_PBTN_1 32881
#define | ID_RIBBON_PBTN_2 32882
#define | ID_RIBBON_PBTN_3 32883
#define | ID_RIBBON_PBTN_4 32884
#define | ID_RIBBON_PBTN_5 32885
#define | ID_RIBBON_SOURCE_CODE_1_1 2933
#define | ID_RIBBON_SOURCE_CODE_1_2 2934
#define | ID_RIBBON_SOURCE_CODE_1_3 2935
#define | ID_RIBBON_SOURCE_CODE_2_1 2936
#define | ID_RIBBON_SOURCE_CODE_2_2 2937
#define | ID_RIBBON_SOURCE_CODE_3_1 2938
#define | ID_RIBBON_SOURCE_CODE_3_2 2939
#define | ID_RIBBON_SOURCE_CODE_3_3 2940
#define | ID_RIBBON_SOURCE_CODE_3_4 2941
#define | ID_RIBBON_SOURCE_CODE_4_1 2942
#define | ID_RIBBON_SOURCE_CODE_4_2 2943
#define | ID_RIBBON_SOURCE_CODE_5_1 2944
#define | ID_RIBBON_SOURCE_CODE_5_2 2945
#define | ID_RIBBON_SOURCE_CODE_5_3 2946
#define | ID_RIBBON_SOURCE_CODE_6_1 2947
#define | ID_RIBBON_SOURCE_CODE_6_2 2948
#define | ID_RIBBON_SOURCE_CODE_6_3 2949
#define | ID_RIBBON_SOURCE_CODE_6_4 2950
#define | ID_RIBBON_SOURCE_CODE_6_5 2951
#define | ID_RIBBON_Z 33000
#define | ID_STATUSBAR_PANE1 32848
#define | ID_STATUSBAR_PANE2 32849
#define | ID_TOOLS_OPTIONS 32847
#define | ID_VIEW_APPLOOK_2007 32838
#define | ID_VIEW_APPLOOK_2007_1 32839
#define | ID_VIEW_APPLOOK_2007_2 32840
#define | ID_VIEW_APPLOOK_2007_3 32841
#define | ID_VIEW_OUTPUT 32833
#define | ID_VIEW_TOOLBARS 32771
#define | IDB_RIBBON_CATEGORY1_LARGE 161
#define | IDB_RIBBON_CATEGORY1_SMALL 160
#define | IDB_RIBBON_CATEGORY2_LARGE 174
#define | IDB_RIBBON_CATEGORY2_SMALL 175
#define | IDB_RIBBON_CATEGORY3_LARGE 176
#define | IDB_RIBBON_CATEGORY3_SMALL 173
#define | IDB_RIBBON_CATEGORY4_SMALL 171
#define | IDB_RIBBON_CATEGORY5_SMALL 172
#define | IDB_RIBBON_CATEGORY6_LARGE 177
#define | IDB_RIBBON_CATEGORY6_SMALL 178
#define | IDB_RIBBON_FILE_LARGE 156
#define | IDB_RIBBON_FILE_SMALL 155
#define | IDB_RIBBON_ICONS 154
#define | IDB_RIBBON_MAIN 159
#define | IDB_RIBBON_PALETTE_1 164
#define | IDB_RIBBON_PALETTE_2 165
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CODE 169
#define | IDR_EDIT_MENU 163
#define | IDR_MAINFRAME 128
#define | IDR_PASTE_MENU 134
#define | IDR_RIBBON 33001
#define | IDR_RIBBON_MENU_1 162
#define | IDR_RIBBON_MENU_2 164
#define | IDR_RIBBONTYPE 129
#define | IDR_THEME_MENU 136
#define | IDR_TOOLBAR 168

Define Documentation

#define ID_RIBBON_A 32853

Definition at line 60 of file resource.h.

#define ID_RIBBON_BTN_1 32855

Definition at line 62 of file resource.h.

#define ID_RIBBON_BTN_2 32857

Definition at line 63 of file resource.h.

#define ID_RIBBON_BTN_3 32858

Definition at line 64 of file resource.h.

#define ID_RIBBON_BTN_4 32859

Definition at line 65 of file resource.h.

#define ID_RIBBON_BTN_5 32860

Definition at line 66 of file resource.h.

#define ID_RIBBON_BTN_6 32861

Definition at line 67 of file resource.h.

#define ID_RIBBON_BTN_7 32862

Definition at line 68 of file resource.h.

#define ID_RIBBON_BTN_8 32854

Definition at line 61 of file resource.h.

#define ID_RIBBON_BTN_9 32863

Definition at line 69 of file resource.h.

#define ID_RIBBON_CBTN_1 32901

Definition at line 95 of file resource.h.

#define ID_RIBBON_CBTN_10 32930

Definition at line 123 of file resource.h.

#define ID_RIBBON_CBTN_2 32902

Definition at line 96 of file resource.h.

#define ID_RIBBON_CBTN_3 32900

Definition at line 94 of file resource.h.

#define ID_RIBBON_CBTN_4 32903

Definition at line 97 of file resource.h.

#define ID_RIBBON_CBTN_5 32904

Definition at line 98 of file resource.h.

#define ID_RIBBON_CBTN_6 32905

Definition at line 99 of file resource.h.

#define ID_RIBBON_CBTN_7 32906

Definition at line 100 of file resource.h.

#define ID_RIBBON_CBTN_8 32907

Definition at line 101 of file resource.h.

#define ID_RIBBON_CBTN_9 32908

Definition at line 102 of file resource.h.

#define ID_RIBBON_EBTN_1 32909

Definition at line 103 of file resource.h.

#define ID_RIBBON_EBTN_2 32910

Definition at line 104 of file resource.h.

#define ID_RIBBON_EBTN_3 32911

Definition at line 105 of file resource.h.

#define ID_RIBBON_EBTN_4 32913

Definition at line 106 of file resource.h.

#define ID_RIBBON_EBTN_5 32914

Definition at line 107 of file resource.h.

#define ID_RIBBON_EBTN_6 32915

Definition at line 108 of file resource.h.

#define ID_RIBBON_EBTN_7 32916

Definition at line 109 of file resource.h.

#define ID_RIBBON_EBTN_8 32917

Definition at line 110 of file resource.h.

#define ID_RIBBON_EBTN_9 32918

Definition at line 111 of file resource.h.

#define ID_RIBBON_GBTN_1 32886

Definition at line 83 of file resource.h.

#define ID_RIBBON_GBTN_10 32897

Definition at line 92 of file resource.h.

#define ID_RIBBON_GBTN_11 32898

Definition at line 93 of file resource.h.

#define ID_RIBBON_GBTN_2 32887

Definition at line 84 of file resource.h.

#define ID_RIBBON_GBTN_3 32888

Definition at line 85 of file resource.h.

#define ID_RIBBON_GBTN_4 32889

Definition at line 86 of file resource.h.

#define ID_RIBBON_GBTN_5 32890

Definition at line 87 of file resource.h.

#define ID_RIBBON_GBTN_6 32891

Definition at line 88 of file resource.h.

#define ID_RIBBON_GBTN_7 32894

Definition at line 89 of file resource.h.

#define ID_RIBBON_GBTN_8 32895

Definition at line 90 of file resource.h.

#define ID_RIBBON_GBTN_9 32896

Definition at line 91 of file resource.h.

#define ID_RIBBON_MBTN_1 32870

Definition at line 76 of file resource.h.

#define ID_RIBBON_MBTN_2 32871

Definition at line 77 of file resource.h.

#define ID_RIBBON_MENU_ITEM_1 32864

Definition at line 70 of file resource.h.

#define ID_RIBBON_MENU_ITEM_2 32865

Definition at line 71 of file resource.h.

#define ID_RIBBON_MENU_ITEM_3 32866

Definition at line 72 of file resource.h.

#define ID_RIBBON_MENU_ITEM_4 32867

Definition at line 73 of file resource.h.

#define ID_RIBBON_MENU_ITEM_5 32868

Definition at line 74 of file resource.h.

#define ID_RIBBON_MENU_ITEM_6 32869

Definition at line 75 of file resource.h.

#define ID_RIBBON_OBTN_1 32919

Definition at line 112 of file resource.h.

#define ID_RIBBON_OBTN_10 32928

Definition at line 121 of file resource.h.

#define ID_RIBBON_OBTN_11 32929

Definition at line 122 of file resource.h.

#define ID_RIBBON_OBTN_2 32920

Definition at line 113 of file resource.h.

#define ID_RIBBON_OBTN_3 32921

Definition at line 114 of file resource.h.

#define ID_RIBBON_OBTN_4 32922

Definition at line 115 of file resource.h.

#define ID_RIBBON_OBTN_5 32923

Definition at line 116 of file resource.h.

#define ID_RIBBON_OBTN_6 32924

Definition at line 117 of file resource.h.

#define ID_RIBBON_OBTN_7 32925

Definition at line 118 of file resource.h.

#define ID_RIBBON_OBTN_8 32926

Definition at line 119 of file resource.h.

#define ID_RIBBON_OBTN_9 32927

Definition at line 120 of file resource.h.

#define ID_RIBBON_PBTN_1 32881

Definition at line 78 of file resource.h.

#define ID_RIBBON_PBTN_2 32882

Definition at line 79 of file resource.h.

#define ID_RIBBON_PBTN_3 32883

Definition at line 80 of file resource.h.

#define ID_RIBBON_PBTN_4 32884

Definition at line 81 of file resource.h.

#define ID_RIBBON_PBTN_5 32885

Definition at line 82 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_1_1 2933

Definition at line 32 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_1_2 2934

Definition at line 33 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_1_3 2935

Definition at line 34 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_2_1 2936

Definition at line 35 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_2_2 2937

Definition at line 36 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_3_1 2938

Definition at line 37 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_3_2 2939

Definition at line 38 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_3_3 2940

Definition at line 39 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_3_4 2941

Definition at line 40 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_4_1 2942

Definition at line 41 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_4_2 2943

Definition at line 42 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_5_1 2944

Definition at line 43 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_5_2 2945

Definition at line 44 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_5_3 2946

Definition at line 45 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_6_1 2947

Definition at line 46 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_6_2 2948

Definition at line 47 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_6_3 2949

Definition at line 48 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_6_4 2950

Definition at line 49 of file resource.h.

#define ID_RIBBON_SOURCE_CODE_6_5 2951

Definition at line 50 of file resource.h.

#define ID_RIBBON_Z 33000

Definition at line 124 of file resource.h.

#define ID_STATUSBAR_PANE1 32848

Definition at line 58 of file resource.h.

#define ID_STATUSBAR_PANE2 32849

Definition at line 59 of file resource.h.

#define ID_TOOLS_OPTIONS 32847

Definition at line 57 of file resource.h.

#define ID_VIEW_APPLOOK_2007 32838

Definition at line 53 of file resource.h.

#define ID_VIEW_APPLOOK_2007_1 32839

Definition at line 54 of file resource.h.

#define ID_VIEW_APPLOOK_2007_2 32840

Definition at line 55 of file resource.h.

#define ID_VIEW_APPLOOK_2007_3 32841

Definition at line 56 of file resource.h.

#define ID_VIEW_OUTPUT 32833

Definition at line 52 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 51 of file resource.h.

#define IDB_RIBBON_CATEGORY1_LARGE 161

Definition at line 15 of file resource.h.

#define IDB_RIBBON_CATEGORY1_SMALL 160

Definition at line 14 of file resource.h.

#define IDB_RIBBON_CATEGORY2_LARGE 174

Definition at line 26 of file resource.h.

#define IDB_RIBBON_CATEGORY2_SMALL 175

Definition at line 27 of file resource.h.

#define IDB_RIBBON_CATEGORY3_LARGE 176

Definition at line 28 of file resource.h.

#define IDB_RIBBON_CATEGORY3_SMALL 173

Definition at line 25 of file resource.h.

#define IDB_RIBBON_CATEGORY4_SMALL 171

Definition at line 23 of file resource.h.

#define IDB_RIBBON_CATEGORY5_SMALL 172

Definition at line 24 of file resource.h.

#define IDB_RIBBON_CATEGORY6_LARGE 177

Definition at line 29 of file resource.h.

#define IDB_RIBBON_CATEGORY6_SMALL 178

Definition at line 30 of file resource.h.

#define IDB_RIBBON_FILE_LARGE 156

Definition at line 12 of file resource.h.

#define IDB_RIBBON_FILE_SMALL 155

Definition at line 11 of file resource.h.

#define IDB_RIBBON_ICONS 154

Definition at line 10 of file resource.h.

#define IDB_RIBBON_MAIN 159

Definition at line 13 of file resource.h.

#define IDB_RIBBON_PALETTE_1 164

Definition at line 18 of file resource.h.

#define IDB_RIBBON_PALETTE_2 165

Definition at line 20 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 31 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CODE 169

Definition at line 22 of file resource.h.

#define IDR_EDIT_MENU 163

Definition at line 17 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 6 of file resource.h.

#define IDR_PASTE_MENU 134

Definition at line 8 of file resource.h.

#define IDR_RIBBON 33001

Definition at line 125 of file resource.h.

#define IDR_RIBBON_MENU_1 162

Definition at line 16 of file resource.h.

#define IDR_RIBBON_MENU_2 164

Definition at line 19 of file resource.h.

#define IDR_RIBBONTYPE 129

Definition at line 7 of file resource.h.

#define IDR_THEME_MENU 136

Definition at line 9 of file resource.h.

#define IDR_TOOLBAR 168

Definition at line 21 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgets.cpp File Reference

  • vc2008fp
  • RibbonGadgets
Classes | Variables

RibbonGadgets.cpp File Reference

#include "stdafx.h"
#include "RibbonGadgets.h"
#include "MainFrm.h"
#include "RibbonGadgetsDoc.h"
#include "RibbonGadgetsView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CRibbonGadgetsApp theApp

Variable Documentation

CRibbonGadgetsApp theApp

Definition at line 49 of file RibbonGadgets.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgets.h File Reference

  • vc2008fp
  • RibbonGadgets
Classes | Variables

RibbonGadgets.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CRibbonGadgetsApp

Variables

CRibbonGadgetsApp theApp

Variable Documentation

CRibbonGadgetsApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsDoc.cpp File Reference

  • vc2008fp
  • RibbonGadgets

RibbonGadgetsDoc.cpp File Reference

#include "stdafx.h"
#include "RibbonGadgets.h"
#include "RibbonGadgetsDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsDoc.h File Reference

  • vc2008fp
  • RibbonGadgets
Classes

RibbonGadgetsDoc.h File Reference

Go to the source code of this file.

Classes

class CRibbonGadgetsDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsView.cpp File Reference

  • vc2008fp
  • RibbonGadgets

RibbonGadgetsView.cpp File Reference

#include "stdafx.h"
#include "RibbonGadgets.h"
#include "RibbonGadgetsDoc.h"
#include "RibbonGadgetsView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsView.h File Reference

  • vc2008fp
  • RibbonGadgets
Classes

RibbonGadgetsView.h File Reference

Go to the source code of this file.

Classes

class CRibbonGadgetsView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/StdAfx.cpp File Reference

  • vc2008fp
  • RibbonGadgets

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/StdAfx.h File Reference

  • vc2008fp
  • RibbonGadgets
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 31 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 28 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 23 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/targetver.h File Reference

  • vc2008fp
  • RibbonGadgets
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 19 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/ChildFrm.cpp File Reference

  • vc2008fp
  • RibbonMDI

ChildFrm.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/ChildFrm.h File Reference

  • vc2008fp
  • RibbonMDI
Classes

ChildFrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/MainFrm.cpp File Reference

  • vc2008fp
  • RibbonMDI

MainFrm.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "MainFrm.h"
#include <memory>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/MainFrm.h File Reference

  • vc2008fp
  • RibbonMDI
Classes | Defines

MainFrm.h File Reference

#include "WorkspaceBar.h"
#include "WorkspaceBar2.h"
#include "OutputBar.h"
#include "WorkspaceBar.h"
#include "OutputBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CMDIFrameWnd CMDIFrameWndEx

Define Documentation

#define CMDIFrameWnd CMDIFrameWndEx

Definition at line 18 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/OutputBar.cpp File Reference

  • vc2008fp
  • RibbonMDI
Variables

OutputBar.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "OutputBar.h"

Go to the source code of this file.

Variables

const int nBorderSize = 1

Variable Documentation

const int nBorderSize = 1

Definition at line 22 of file OutputBar.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/OutputBar.h File Reference

  • vc2008fp
  • RibbonMDI
Classes

OutputBar.h File Reference

Go to the source code of this file.

Classes

class COutputBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/resource.h File Reference

  • vc2008fp
  • RibbonMDI
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_MDI_CANCEL 32842
#define | ID_MDI_MOVE_TO_NEXT_GROUP 32843
#define | ID_MDI_MOVE_TO_PREV_GROUP 32841
#define | ID_MDI_NEW_HORZ_TAB_GROUP 32840
#define | ID_MDI_NEW_VERT_GROUP 32839
#define | ID_VIEW_APPLOOK_2000 32833
#define | ID_VIEW_APPLOOK_2003 32835
#define | ID_VIEW_APPLOOK_2007 32838
#define | ID_VIEW_APPLOOK_VS2005 32837
#define | ID_VIEW_APPLOOK_WIN_XP 32836
#define | ID_VIEW_APPLOOK_XP 32834
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_OUTPUT 32804
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_WORKSPACE 32803
#define | ID_VIEW_WORKSPACE2 32792
#define | ID_WINDOW_MANAGER 32823
#define | ID_WRITE_PASTEASHYPERLINK 33015
#define | IDB_BUTTONS 156
#define | IDB_FILELARGE 169
#define | IDB_FILESMALL 170
#define | IDB_MAIN 154
#define | IDB_TOOLBAR256 151
#define | IDB_WORKSPACE 147
#define | IDB_WRITE 116
#define | IDB_WRITELARGE 117
#define | IDC_COMPANY_URL 1041
#define | IDD_ABOUTBOX 100
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_PASTE_MENU 151
#define | IDR_POPUP_DROP_MDITABS 133
#define | IDR_POPUP_MDITABS 132
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_RIBBONTYPE 129
#define | IDR_WINDOWS_MENU 152
#define | IDS_WINDOWS_MANAGER 107

Define Documentation

#define ID_MDI_CANCEL 32842

Definition at line 40 of file resource.h.

#define ID_MDI_MOVE_TO_NEXT_GROUP 32843

Definition at line 41 of file resource.h.

#define ID_MDI_MOVE_TO_PREV_GROUP 32841

Definition at line 39 of file resource.h.

#define ID_MDI_NEW_HORZ_TAB_GROUP 32840

Definition at line 38 of file resource.h.

#define ID_MDI_NEW_VERT_GROUP 32839

Definition at line 37 of file resource.h.

#define ID_VIEW_APPLOOK_2000 32833

Definition at line 31 of file resource.h.

#define ID_VIEW_APPLOOK_2003 32835

Definition at line 33 of file resource.h.

#define ID_VIEW_APPLOOK_2007 32838

Definition at line 36 of file resource.h.

#define ID_VIEW_APPLOOK_VS2005 32837

Definition at line 35 of file resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32836

Definition at line 34 of file resource.h.

#define ID_VIEW_APPLOOK_XP 32834

Definition at line 32 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 25 of file resource.h.

#define ID_VIEW_OUTPUT 32804

Definition at line 29 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 26 of file resource.h.

#define ID_VIEW_WORKSPACE 32803

Definition at line 28 of file resource.h.

#define ID_VIEW_WORKSPACE2 32792

Definition at line 27 of file resource.h.

#define ID_WINDOW_MANAGER 32823

Definition at line 30 of file resource.h.

#define ID_WRITE_PASTEASHYPERLINK 33015

Definition at line 42 of file resource.h.

#define IDB_BUTTONS 156

Definition at line 21 of file resource.h.

#define IDB_FILELARGE 169

Definition at line 22 of file resource.h.

#define IDB_FILESMALL 170

Definition at line 23 of file resource.h.

#define IDB_MAIN 154

Definition at line 20 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 17 of file resource.h.

#define IDB_WORKSPACE 147

Definition at line 16 of file resource.h.

#define IDB_WRITE 116

Definition at line 8 of file resource.h.

#define IDB_WRITELARGE 117

Definition at line 9 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 24 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 12 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 10 of file resource.h.

#define IDR_PASTE_MENU 151

Definition at line 18 of file resource.h.

#define IDR_POPUP_DROP_MDITABS 133

Definition at line 15 of file resource.h.

#define IDR_POPUP_MDITABS 132

Definition at line 14 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 13 of file resource.h.

#define IDR_RIBBONTYPE 129

Definition at line 11 of file resource.h.

#define IDR_WINDOWS_MENU 152

Definition at line 19 of file resource.h.

#define IDS_WINDOWS_MANAGER 107

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemo.cpp File Reference

  • vc2008fp
  • RibbonMDI
Classes | Variables

RibbonMDIDemo.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "RibbonMDIDemoDoc.h"
#include "RibbonMDIDemoView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CRibbonMDIDemoApp theApp

Variable Documentation

CRibbonMDIDemoApp theApp

Definition at line 50 of file RibbonMDIDemo.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemo.h File Reference

  • vc2008fp
  • RibbonMDI
Classes | Variables

RibbonMDIDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CRibbonMDIDemoApp

Variables

CRibbonMDIDemoApp theApp

Variable Documentation

CRibbonMDIDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoDoc.cpp File Reference

  • vc2008fp
  • RibbonMDI

RibbonMDIDemoDoc.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "RibbonMDIDemoDoc.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoDoc.h File Reference

  • vc2008fp
  • RibbonMDI
Classes

RibbonMDIDemoDoc.h File Reference

Go to the source code of this file.

Classes

class CRibbonMDIDemoDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoView.cpp File Reference

  • vc2008fp
  • RibbonMDI

RibbonMDIDemoView.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "RibbonMDIDemoDoc.h"
#include "RibbonMDIDemoView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoView.h File Reference

  • vc2008fp
  • RibbonMDI
Classes

RibbonMDIDemoView.h File Reference

Go to the source code of this file.

Classes

class CRibbonMDIDemoView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/StdAfx.cpp File Reference

  • vc2008fp
  • RibbonMDI

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/StdAfx.h File Reference

  • vc2008fp
  • RibbonMDI
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 31 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 28 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 23 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/targetver.h File Reference

  • vc2008fp
  • RibbonMDI
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 19 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar.cpp File Reference

  • vc2008fp
  • RibbonMDI
Variables

WorkspaceBar.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "WorkspaceBar.h"

Go to the source code of this file.

Variables

const int nBorderSize = 1

Variable Documentation

const int nBorderSize = 1

Definition at line 22 of file WorkspaceBar.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar.h File Reference

  • vc2008fp
  • RibbonMDI
Classes

WorkspaceBar.h File Reference

Go to the source code of this file.

Classes

class CWorkspaceBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar2.cpp File Reference

  • vc2008fp
  • RibbonMDI
Variables

WorkspaceBar2.cpp File Reference

#include "stdafx.h"
#include "RibbonMDIDemo.h"
#include "WorkspaceBar2.h"

Go to the source code of this file.

Variables

const int nBorderSize = 1

Variable Documentation

const int nBorderSize = 1

Definition at line 22 of file WorkspaceBar2.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar2.h File Reference

  • vc2008fp
  • RibbonMDI
Classes

WorkspaceBar2.h File Reference

Go to the source code of this file.

Classes

class CWorkspaceBar2
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/InfoBar.cpp File Reference

  • vc2008fp
  • RollupPane

InfoBar.cpp File Reference

#include "stdafx.h"
#include "RollupPane.h"
#include "InfoBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/infobar.h File Reference

  • vc2008fp
  • RollupPane
Classes

infobar.h File Reference

Go to the source code of this file.

Classes

class CInfoBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/MainFrm.cpp File Reference

  • vc2008fp
  • RollupPane

MainFrm.cpp File Reference

#include "stdafx.h"
#include "RollupPane.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/MainFrm.h File Reference

  • vc2008fp
  • RollupPane
Classes | Defines

MainFrm.h File Reference

#include "InfoBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 13 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/Resource.h File Reference

  • vc2008fp
  • RollupPane
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_APPLOOK_2000 32826
#define | ID_VIEW_APPLOOK_2003 32828
#define | ID_VIEW_APPLOOK_2007 32831
#define | ID_VIEW_APPLOOK_2007_1 32832
#define | ID_VIEW_APPLOOK_2007_2 32833
#define | ID_VIEW_APPLOOK_2007_3 32834
#define | ID_VIEW_APPLOOK_VS2005 32830
#define | ID_VIEW_APPLOOK_WIN_XP 32829
#define | ID_VIEW_APPLOOK_XP 32827
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_INFOBAR 32835
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_USER_TOOLBAR1 32793
#define | ID_VIEW_USER_TOOLBAR10 32802
#define | ID_VIEW_USER_TOOLBAR2 32794
#define | ID_VIEW_USER_TOOLBAR3 32795
#define | ID_VIEW_USER_TOOLBAR4 32796
#define | ID_VIEW_USER_TOOLBAR5 32797
#define | ID_VIEW_USER_TOOLBAR6 32798
#define | ID_VIEW_USER_TOOLBAR7 32799
#define | ID_VIEW_USER_TOOLBAR8 32800
#define | ID_VIEW_USER_TOOLBAR9 32801
#define | IDB_TOOLBAR256 151
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_RollupControlBaTYPE 129
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_WRONG_DISPLAY_SETTINGS 152

Define Documentation

#define ID_VIEW_APPLOOK_2000 32826

Definition at line 26 of file Resource.h.

#define ID_VIEW_APPLOOK_2003 32828

Definition at line 28 of file Resource.h.

#define ID_VIEW_APPLOOK_2007 32831

Definition at line 31 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_1 32832

Definition at line 32 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_2 32833

Definition at line 33 of file Resource.h.

#define ID_VIEW_APPLOOK_2007_3 32834

Definition at line 34 of file Resource.h.

#define ID_VIEW_APPLOOK_VS2005 32830

Definition at line 30 of file Resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32829

Definition at line 29 of file Resource.h.

#define ID_VIEW_APPLOOK_XP 32827

Definition at line 27 of file Resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 14 of file Resource.h.

#define ID_VIEW_INFOBAR 32835

Definition at line 35 of file Resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 15 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR1 32793

Definition at line 16 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR10 32802

Definition at line 25 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR2 32794

Definition at line 17 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR3 32795

Definition at line 18 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR4 32796

Definition at line 19 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR5 32797

Definition at line 20 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR6 32798

Definition at line 21 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR7 32799

Definition at line 22 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR8 32800

Definition at line 23 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR9 32801

Definition at line 24 of file Resource.h.

#define IDB_TOOLBAR256 151

Definition at line 11 of file Resource.h.

#define IDD_ABOUTBOX 999

Definition at line 13 of file Resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file Resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 9 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file Resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 10 of file Resource.h.

#define IDR_RollupControlBaTYPE 129

Definition at line 8 of file Resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file Resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 152

Definition at line 12 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPane.cpp File Reference

  • vc2008fp
  • RollupPane
Classes | Variables

RollupPane.cpp File Reference

#include "stdafx.h"
#include "RollupPane.h"
#include "MainFrm.h"
#include "RollupPaneDoc.h"
#include "RollupPaneView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CRollupPaneApp theApp

Variable Documentation

CRollupPaneApp theApp

Definition at line 47 of file RollupPane.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPane.h File Reference

  • vc2008fp
  • RollupPane
Classes | Variables

RollupPane.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CRollupPaneApp

Variables

CRollupPaneApp theApp

Variable Documentation

CRollupPaneApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneDoc.cpp File Reference

  • vc2008fp
  • RollupPane

RollupPaneDoc.cpp File Reference

#include "stdafx.h"
#include "RollupPane.h"
#include "RollupPaneDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneDoc.h File Reference

  • vc2008fp
  • RollupPane
Classes

RollupPaneDoc.h File Reference

Go to the source code of this file.

Classes

class CRollupPaneDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneView.cpp File Reference

  • vc2008fp
  • RollupPane

RollupPaneView.cpp File Reference

#include "stdafx.h"
#include "RollupPane.h"
#include "RollupPaneDoc.h"
#include "RollupPaneView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneView.h File Reference

  • vc2008fp
  • RollupPane
Classes

RollupPaneView.h File Reference

Go to the source code of this file.

Classes

class CRollupPaneView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/stdafx.cpp File Reference

  • vc2008fp
  • RollupPane

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/stdafx.h File Reference

  • vc2008fp
  • RollupPane
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 12 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/targetver.h File Reference

  • vc2008fp
  • RollupPane
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/MainFrm.cpp File Reference

  • vc2008fp
  • SetPaneSize

MainFrm.cpp File Reference

#include "stdafx.h"
#include "SetPaneSize.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/MainFrm.h File Reference

  • vc2008fp
  • SetPaneSize
Classes | Defines

MainFrm.h File Reference

#include "WorkspaceBar.h"
#include "WorkspaceBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 15 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/resource.h File Reference

  • vc2008fp
  • SetPaneSize
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_DLGBAR 32792
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_WORKSPACE 32803
#define | IDB_TOOLBAR256 151
#define | IDB_WORKSPACE 147
#define | IDC_BTN_SET_HEIGHT_IN_PIXELS 1050
#define | IDC_BTN_SET_WIDTH_IN_PIXELS 1049
#define | IDC_BUTTON_SET_CONTAINER_SIZE 1045
#define | IDC_BUTTON_SET_DLGBAR_SIZE 1044
#define | IDC_COMPANY_URL 1041
#define | IDC_EDIT_HEIGHT_IN_PIXELS 1048
#define | IDC_EDIT_SIZE 1042
#define | IDC_EDIT_WIDTH 1043
#define | IDC_EDIT_WIDTH_IN_PIXELS 1047
#define | IDD_ABOUTBOX 999
#define | IDD_DLG_BAR 154
#define | IDD_SetPaneSize_FORM 101
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_SETBARTYPE 129
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 25 of file resource.h.

#define ID_VIEW_DLGBAR 32792

Definition at line 27 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 26 of file resource.h.

#define ID_VIEW_WORKSPACE 32803

Definition at line 28 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 13 of file resource.h.

#define IDB_WORKSPACE 147

Definition at line 12 of file resource.h.

#define IDC_BTN_SET_HEIGHT_IN_PIXELS 1050

Definition at line 24 of file resource.h.

#define IDC_BTN_SET_WIDTH_IN_PIXELS 1049

Definition at line 23 of file resource.h.

#define IDC_BUTTON_SET_CONTAINER_SIZE 1045

Definition at line 20 of file resource.h.

#define IDC_BUTTON_SET_DLGBAR_SIZE 1044

Definition at line 19 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 16 of file resource.h.

#define IDC_EDIT_HEIGHT_IN_PIXELS 1048

Definition at line 22 of file resource.h.

#define IDC_EDIT_SIZE 1042

Definition at line 17 of file resource.h.

#define IDC_EDIT_WIDTH 1043

Definition at line 18 of file resource.h.

#define IDC_EDIT_WIDTH_IN_PIXELS 1047

Definition at line 21 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 15 of file resource.h.

#define IDD_DLG_BAR 154

Definition at line 14 of file resource.h.

#define IDD_SetPaneSize_FORM 101

Definition at line 6 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 10 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 11 of file resource.h.

#define IDR_SETBARTYPE 129

Definition at line 9 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSize.cpp File Reference

  • vc2008fp
  • SetPaneSize
Classes | Variables

SetPaneSize.cpp File Reference

#include "stdafx.h"
#include "SetPaneSize.h"
#include "MainFrm.h"
#include "SetPaneSizeDoc.h"
#include "SetPaneSizeView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CSetPaneSizeApp theApp

Variable Documentation

CSetPaneSizeApp theApp

Definition at line 49 of file SetPaneSize.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSize.h File Reference

  • vc2008fp
  • SetPaneSize
Classes | Variables

SetPaneSize.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CSetPaneSizeApp

Variables

CSetPaneSizeApp theApp

Variable Documentation

CSetPaneSizeApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeDoc.cpp File Reference

  • vc2008fp
  • SetPaneSize

SetPaneSizeDoc.cpp File Reference

#include "stdafx.h"
#include "SetPaneSize.h"
#include "SetPaneSizeDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeDoc.h File Reference

  • vc2008fp
  • SetPaneSize
Classes

SetPaneSizeDoc.h File Reference

Go to the source code of this file.

Classes

class CSetPaneSizeDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeView.cpp File Reference

  • vc2008fp
  • SetPaneSize

SetPaneSizeView.cpp File Reference

#include "stdafx.h"
#include "SetPaneSize.h"
#include "SetPaneSizeDoc.h"
#include "SetPaneSizeView.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeView.h File Reference

  • vc2008fp
  • SetPaneSize
Classes

SetPaneSizeView.h File Reference

Go to the source code of this file.

Classes

class CSetPaneSizeView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/StdAfx.cpp File Reference

  • vc2008fp
  • SetPaneSize

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/StdAfx.h File Reference

  • vc2008fp
  • SetPaneSize
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/targetver.h File Reference

  • vc2008fp
  • SetPaneSize
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/WorkspaceBar.cpp File Reference

  • vc2008fp
  • SetPaneSize
Variables

WorkspaceBar.cpp File Reference

#include "stdafx.h"
#include "SetPaneSize.h"
#include "WorkspaceBar.h"

Go to the source code of this file.

Variables

const int nBorderSize = 1

Variable Documentation

const int nBorderSize = 1

Definition at line 21 of file WorkspaceBar.cpp.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/WorkspaceBar.h File Reference

  • vc2008fp
  • SetPaneSize
Classes

WorkspaceBar.h File Reference

Go to the source code of this file.

Classes

class CWorkspaceBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/MainFrm.cpp File Reference

  • vc2008fp
  • Slider

MainFrm.cpp File Reference

#include "stdafx.h"
#include "Slider.h"
#include "SliderButton.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/MainFrm.h File Reference

  • vc2008fp
  • Slider
Classes

MainFrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/resource.h File Reference

  • vc2008fp
  • Slider
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_SLIDER 32822
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_SLIDERTYPE 129
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_SLIDER 32822

Definition at line 13 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 11 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 12 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 10 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 9 of file resource.h.

#define IDR_SLIDERTYPE 129

Definition at line 8 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/Slider.cpp File Reference

  • vc2008fp
  • Slider
Classes | Variables

Slider.cpp File Reference

#include "stdafx.h"
#include "Slider.h"
#include "MainFrm.h"
#include "SliderDoc.h"
#include "SliderView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CSliderApp theApp

Variable Documentation

CSliderApp theApp

Definition at line 48 of file Slider.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/Slider.h File Reference

  • vc2008fp
  • Slider
Classes | Variables

Slider.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CSliderApp

Variables

CSliderApp theApp

Variable Documentation

CSliderApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderButton.cpp File Reference

  • vc2008fp
  • Slider

SliderButton.cpp File Reference

#include "stdafx.h"
#include "SliderButton.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderButton.h File Reference

  • vc2008fp
  • Slider
Classes

SliderButton.h File Reference

Go to the source code of this file.

Classes

class | CCustomSliderCtrl
class | CSliderButton
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderDoc.cpp File Reference

  • vc2008fp
  • Slider

SliderDoc.cpp File Reference

#include "stdafx.h"
#include "Slider.h"
#include "SliderDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderDoc.h File Reference

  • vc2008fp
  • Slider
Classes

SliderDoc.h File Reference

Go to the source code of this file.

Classes

class CSliderDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderView.cpp File Reference

  • vc2008fp
  • Slider

SliderView.cpp File Reference

#include "stdafx.h"
#include "Slider.h"
#include "SliderDoc.h"
#include "SliderView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderView.h File Reference

  • vc2008fp
  • Slider
Classes

SliderView.h File Reference

Go to the source code of this file.

Classes

class CSliderView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/StdAfx.cpp File Reference

  • vc2008fp
  • Slider

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/StdAfx.h File Reference

  • vc2008fp
  • Slider
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/targetver.h File Reference

  • vc2008fp
  • Slider
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/MainFrm.cpp File Reference

  • vc2008fp
  • StateCollection
Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "StateCollection.h"
#include "MainFrm.h"

Go to the source code of this file.

Variables

const int | iMaxUserToolbars = 10
const UINT | uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40
const UINT | uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Variable Documentation

const int iMaxUserToolbars = 10

Definition at line 22 of file MainFrm.cpp.

const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40

Definition at line 23 of file MainFrm.cpp.

const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Definition at line 24 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/MainFrm.h File Reference

  • vc2008fp
  • StateCollection
Classes | Defines

MainFrm.h File Reference

#include "WorkspaceBar.h"
#include "OutputBar.h"
#include "WorkspaceBar.h"
#include "OutputBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 16 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/OutputBar.cpp File Reference

  • vc2008fp
  • StateCollection

OutputBar.cpp File Reference

#include "stdafx.h"
#include "StateCollection.h"
#include "OutputBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/OutputBar.h File Reference

  • vc2008fp
  • StateCollection
Classes

OutputBar.h File Reference

Go to the source code of this file.

Classes

class COutputBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/resource.h File Reference

  • vc2008fp
  • StateCollection
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_LOAD_DEBUG_CONF 32824
#define | ID_LOAD_REGULAR_CONF 32825
#define | ID_SAVE_DEBUG_CONF 32822
#define | ID_SAVE_REGULAR_CONF 32823
#define | ID_TOOLS_ENTRY 32805
#define | ID_USER_TOOL1 32806
#define | ID_USER_TOOL10 32815
#define | ID_USER_TOOL2 32807
#define | ID_USER_TOOL3 32808
#define | ID_USER_TOOL4 32809
#define | ID_USER_TOOL5 32810
#define | ID_USER_TOOL6 32811
#define | ID_USER_TOOL7 32812
#define | ID_USER_TOOL8 32813
#define | ID_USER_TOOL9 32814
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_OUTPUT 32804
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_WORKSPACE 32803
#define | IDB_WORKSPACE 147
#define | IDC_COMPANY_URL 1041
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_STATECTYPE 129
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_LOAD_DEBUG_CONF 32824

Definition at line 31 of file resource.h.

#define ID_LOAD_REGULAR_CONF 32825

Definition at line 32 of file resource.h.

#define ID_SAVE_DEBUG_CONF 32822

Definition at line 29 of file resource.h.

#define ID_SAVE_REGULAR_CONF 32823

Definition at line 30 of file resource.h.

#define ID_TOOLS_ENTRY 32805

Definition at line 18 of file resource.h.

#define ID_USER_TOOL1 32806

Definition at line 19 of file resource.h.

#define ID_USER_TOOL10 32815

Definition at line 28 of file resource.h.

#define ID_USER_TOOL2 32807

Definition at line 20 of file resource.h.

#define ID_USER_TOOL3 32808

Definition at line 21 of file resource.h.

#define ID_USER_TOOL4 32809

Definition at line 22 of file resource.h.

#define ID_USER_TOOL5 32810

Definition at line 23 of file resource.h.

#define ID_USER_TOOL6 32811

Definition at line 24 of file resource.h.

#define ID_USER_TOOL7 32812

Definition at line 25 of file resource.h.

#define ID_USER_TOOL8 32813

Definition at line 26 of file resource.h.

#define ID_USER_TOOL9 32814

Definition at line 27 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 14 of file resource.h.

#define ID_VIEW_OUTPUT 32804

Definition at line 17 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 15 of file resource.h.

#define ID_VIEW_WORKSPACE 32803

Definition at line 16 of file resource.h.

#define IDB_WORKSPACE 147

Definition at line 11 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 12 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 13 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 9 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 10 of file resource.h.

#define IDR_STATECTYPE 129

Definition at line 8 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollection.cpp File Reference

  • vc2008fp
  • StateCollection
Classes | Variables

StateCollection.cpp File Reference

#include "stdafx.h"
#include "StateCollection.h"
#include "MainFrm.h"
#include "StateCollectionDoc.h"
#include "StateCollectionView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CStateCollectionApp theApp

Variable Documentation

CStateCollectionApp theApp

Definition at line 48 of file StateCollection.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollection.h File Reference

  • vc2008fp
  • StateCollection
Classes | Variables

StateCollection.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CStateCollectionApp

Variables

CStateCollectionApp theApp

Variable Documentation

CStateCollectionApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionDoc.cpp File Reference

  • vc2008fp
  • StateCollection

StateCollectionDoc.cpp File Reference

#include "stdafx.h"
#include "StateCollection.h"
#include "StateCollectionDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionDoc.h File Reference

  • vc2008fp
  • StateCollection
Classes

StateCollectionDoc.h File Reference

Go to the source code of this file.

Classes

class CStateCollectionDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionView.cpp File Reference

  • vc2008fp
  • StateCollection

StateCollectionView.cpp File Reference

#include "stdafx.h"
#include "StateCollection.h"
#include "StateCollectionDoc.h"
#include "StateCollectionView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionView.h File Reference

  • vc2008fp
  • StateCollection
Classes

StateCollectionView.h File Reference

Go to the source code of this file.

Classes

class CStateCollectionView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StdAfx.cpp File Reference

  • vc2008fp
  • StateCollection

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StdAfx.h File Reference

  • vc2008fp
  • StateCollection
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/targetver.h File Reference

  • vc2008fp
  • StateCollection
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/WorkspaceBar.cpp File Reference

  • vc2008fp
  • StateCollection

WorkspaceBar.cpp File Reference

#include "stdafx.h"
#include "StateCollection.h"
#include "WorkspaceBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/WorkspaceBar.h File Reference

  • vc2008fp
  • StateCollection
Classes

WorkspaceBar.h File Reference

Go to the source code of this file.

Classes

class CWorkspaceBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/MainFrm.cpp File Reference

  • vc2008fp
  • StatusBarDemo

MainFrm.cpp File Reference

#include "stdafx.h"
#include "StatusBarDemo.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/MainFrm.h File Reference

  • vc2008fp
  • StatusBarDemo
Classes | Defines | Variables

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Variables

const int | nStatusAnimation = 4
const int | nStatusIcon = 0
const int | nStatusInfo = 1
const int | nStatusLabel = 3
const int | nStatusProgress = 2

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 13 of file MainFrm.h.

Variable Documentation

const int nStatusAnimation = 4

Definition at line 22 of file MainFrm.h.

const int nStatusIcon = 0

Definition at line 18 of file MainFrm.h.

const int nStatusInfo = 1

Definition at line 19 of file MainFrm.h.

const int nStatusLabel = 3

Definition at line 21 of file MainFrm.h.

const int nStatusProgress = 2

Definition at line 20 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/resource.h File Reference

  • vc2008fp
  • StatusBarDemo
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_INDICATOR_ANIMATION 105
#define | ID_INDICATOR_ICON 102
#define | ID_INDICATOR_LABEL 104
#define | ID_INDICATOR_PROGRESS 103
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | IDB_ANIMATION 154
#define | IDB_ICON1 155
#define | IDB_ICON2 156
#define | IDC_BACK_COLOR 1048
#define | IDC_COMPANY_URL 1041
#define | IDC_ICON1 1045
#define | IDC_ICON2 1046
#define | IDC_START_ANIMATION 1044
#define | IDC_START_PROGRESS 1043
#define | IDC_TEXT_COLOR 1047
#define | IDD_ABOUTBOX 999
#define | IDD_STATUSBARDEMO_FORM 101
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_STATUSTYPE 129
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_WRONG_DISPLAY_SETTINGS 106

Define Documentation

#define ID_INDICATOR_ANIMATION 105

Definition at line 11 of file resource.h.

#define ID_INDICATOR_ICON 102

Definition at line 8 of file resource.h.

#define ID_INDICATOR_LABEL 104

Definition at line 10 of file resource.h.

#define ID_INDICATOR_PROGRESS 103

Definition at line 9 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 28 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 29 of file resource.h.

#define IDB_ANIMATION 154

Definition at line 17 of file resource.h.

#define IDB_ICON1 155

Definition at line 18 of file resource.h.

#define IDB_ICON2 156

Definition at line 19 of file resource.h.

#define IDC_BACK_COLOR 1048

Definition at line 27 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 21 of file resource.h.

#define IDC_ICON1 1045

Definition at line 24 of file resource.h.

#define IDC_ICON2 1046

Definition at line 25 of file resource.h.

#define IDC_START_ANIMATION 1044

Definition at line 23 of file resource.h.

#define IDC_START_PROGRESS 1043

Definition at line 22 of file resource.h.

#define IDC_TEXT_COLOR 1047

Definition at line 26 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 20 of file resource.h.

#define IDD_STATUSBARDEMO_FORM 101

Definition at line 6 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 15 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 13 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 16 of file resource.h.

#define IDR_STATUSTYPE 129

Definition at line 14 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 7 of file resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 106

Definition at line 12 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemo.cpp File Reference

  • vc2008fp
  • StatusBarDemo
Classes | Variables

StatusBarDemo.cpp File Reference

#include "stdafx.h"
#include "StatusBarDemo.h"
#include "MainFrm.h"
#include "StatusBarDemoDoc.h"
#include "StatusBarDemoView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CStatusBarDemoApp theApp

Variable Documentation

CStatusBarDemoApp theApp

Definition at line 49 of file StatusBarDemo.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemo.h File Reference

  • vc2008fp
  • StatusBarDemo
Classes | Variables

StatusBarDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CStatusBarDemoApp

Variables

CStatusBarDemoApp theApp

Variable Documentation

CStatusBarDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoDoc.cpp File Reference

  • vc2008fp
  • StatusBarDemo

StatusBarDemoDoc.cpp File Reference

#include "stdafx.h"
#include "StatusBarDemo.h"
#include "StatusBarDemoDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoDoc.h File Reference

  • vc2008fp
  • StatusBarDemo
Classes

StatusBarDemoDoc.h File Reference

Go to the source code of this file.

Classes

class CStatusBarDemoDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoView.cpp File Reference

  • vc2008fp
  • StatusBarDemo
Defines

StatusBarDemoView.cpp File Reference

#include "stdafx.h"
#include "StatusBarDemo.h"
#include "StatusBarDemoDoc.h"
#include "StatusBarDemoView.h"

Go to the source code of this file.

Defines

#define | ID_PROGRESS_TIMER 1
#define | PROGRESS_MAX 50

Define Documentation

#define ID_PROGRESS_TIMER 1

Definition at line 23 of file StatusBarDemoView.cpp.

#define PROGRESS_MAX 50

Definition at line 24 of file StatusBarDemoView.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoView.h File Reference

  • vc2008fp
  • StatusBarDemo
Classes

StatusBarDemoView.h File Reference

#include "MainFrm.h"

Go to the source code of this file.

Classes

class CStatusBarDemoView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StdAfx.cpp File Reference

  • vc2008fp
  • StatusBarDemo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StdAfx.h File Reference

  • vc2008fp
  • StatusBarDemo
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/targetver.h File Reference

  • vc2008fp
  • StatusBarDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/ChildFrm.cpp File Reference

  • vc2008fp
  • TabbedView

ChildFrm.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/ChildFrm.h File Reference

  • vc2008fp
  • TabbedView
Classes | Defines

ChildFrm.h File Reference

Go to the source code of this file.

Classes

class | CChildFrame

Defines

#define | CMDIChildWnd CMDIChildWndEx

Define Documentation

#define CMDIChildWnd CMDIChildWndEx

Definition at line 13 of file ChildFrm.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/MainFrm.cpp File Reference

  • vc2008fp
  • TabbedView

MainFrm.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/MainFrm.h File Reference

  • vc2008fp
  • TabbedView
Classes | Defines

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CMDIFrameWnd CMDIFrameWndEx

Define Documentation

#define CMDIFrameWnd CMDIFrameWndEx

Definition at line 13 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/resource.h File Reference

  • vc2008fp
  • TabbedView
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | IDC_CHECK1 1042
#define | IDC_EDIT1 1041
#define | IDD_ABOUTBOX 999
#define | IDD_FORMVIEW 101
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_TABBEDTYPE 129
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 15 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 16 of file resource.h.

#define IDC_CHECK1 1042

Definition at line 14 of file resource.h.

#define IDC_EDIT1 1041

Definition at line 13 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 12 of file resource.h.

#define IDD_FORMVIEW 101

Definition at line 7 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 10 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 11 of file resource.h.

#define IDR_TABBEDTYPE 129

Definition at line 9 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/StdAfx.cpp File Reference

  • vc2008fp
  • TabbedView

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/StdAfx.h File Reference

  • vc2008fp
  • TabbedView
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include "afxcview.h"
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 21 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 18 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedView.cpp File Reference

  • vc2008fp
  • TabbedView
Classes | Variables

TabbedView.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "TabbedViewDoc.h"
#include "TabbedViewView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CTabbedViewApp theApp

Variable Documentation

CTabbedViewApp theApp

Definition at line 49 of file TabbedView.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedView.h File Reference

  • vc2008fp
  • TabbedView
Classes | Variables

TabbedView.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CTabbedViewApp

Variables

CTabbedViewApp theApp

Variable Documentation

CTabbedViewApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewDoc.cpp File Reference

  • vc2008fp
  • TabbedView

TabbedViewDoc.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "TabbedViewDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewDoc.h File Reference

  • vc2008fp
  • TabbedView
Classes

TabbedViewDoc.h File Reference

Go to the source code of this file.

Classes

class CTabbedViewDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewView.cpp File Reference

  • vc2008fp
  • TabbedView

TabbedViewView.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "TabbedViewDoc.h"
#include "TabbedViewView.h"
#include "View1.h"
#include "View2.h"
#include "View3.h"
#include "View4.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewView.h File Reference

  • vc2008fp
  • TabbedView
Classes

TabbedViewView.h File Reference

Go to the source code of this file.

Classes

class CTabbedViewView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/targetver.h File Reference

  • vc2008fp
  • TabbedView
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View1.cpp File Reference

  • vc2008fp
  • TabbedView

View1.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "View1.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View1.h File Reference

  • vc2008fp
  • TabbedView
Classes

View1.h File Reference

Go to the source code of this file.

Classes

class CView1
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View2.cpp File Reference

  • vc2008fp
  • TabbedView

View2.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "View2.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View2.h File Reference

  • vc2008fp
  • TabbedView
Classes

View2.h File Reference

Go to the source code of this file.

Classes

class CView2
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View3.cpp File Reference

  • vc2008fp
  • TabbedView

View3.cpp File Reference

#include "stdafx.h"
#include "TabbedView.h"
#include "View3.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View3.h File Reference

  • vc2008fp
  • TabbedView
Classes

View3.h File Reference

#include <afxext.h>

Go to the source code of this file.

Classes

class CView3
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View4.cpp File Reference

  • vc2008fp
  • TabbedView

View4.cpp File Reference

#include "stdafx.h"
#include "tabbedview.h"
#include "View4.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View4.h File Reference

  • vc2008fp
  • TabbedView
Classes

View4.h File Reference

Go to the source code of this file.

Classes

class CView4
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/MainFrm.cpp File Reference

  • vc2008fp
  • TabControl
Classes

MainFrm.cpp File Reference

#include "stdafx.h"
#include "TabControl.h"
#include "MainFrm.h"

Go to the source code of this file.

Classes

class CToolbarLabel
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/MainFrm.h File Reference

  • vc2008fp
  • TabControl
Classes | Defines

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 13 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/resource.h File Reference

  • vc2008fp
  • TabControl
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_LABEL 32842
#define | ID_VIEW_APPLOOK_2000 32832
#define | ID_VIEW_APPLOOK_2003 32834
#define | ID_VIEW_APPLOOK_2007_1 32837
#define | ID_VIEW_APPLOOK_2007_2 32838
#define | ID_VIEW_APPLOOK_2007_3 32839
#define | ID_VIEW_APPLOOK_2007_4 32840
#define | ID_VIEW_APPLOOK_VS2005 32836
#define | ID_VIEW_APPLOOK_WIN_XP 32835
#define | ID_VIEW_APPLOOK_XP 32833
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_THEME_TOOLBAR 32841
#define | ID_VIEW_TOOLBARS 32771
#define | IDB_ICONS 155
#define | IDB_TOOLBAR256 151
#define | IDC_COLOR 1046
#define | IDC_COLOR1 1047
#define | IDC_COLOR2 1048
#define | IDC_COMPANY_URL 1041
#define | IDC_LOCATION 1044
#define | IDC_LOCATION2 1045
#define | IDC_NOTIFICATIONS 1050
#define | IDC_TAB 1042
#define | IDC_TAB_ICONS 1049
#define | IDC_TAB_STYLE 1043
#define | IDC_TAB_SWAP 1051
#define | IDD_ABOUTBOX 999
#define | IDD_TABCONTROL_FORM 101
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_STYLE_20007 132
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_TABCONTYPE 129
#define | IDR_THEME 154
#define | IDS_WRONG_DISPLAY_SETTINGS 102

Define Documentation

#define ID_LABEL 32842

Definition at line 40 of file resource.h.

#define ID_VIEW_APPLOOK_2000 32832

Definition at line 30 of file resource.h.

#define ID_VIEW_APPLOOK_2003 32834

Definition at line 32 of file resource.h.

#define ID_VIEW_APPLOOK_2007_1 32837

Definition at line 35 of file resource.h.

#define ID_VIEW_APPLOOK_2007_2 32838

Definition at line 36 of file resource.h.

#define ID_VIEW_APPLOOK_2007_3 32839

Definition at line 37 of file resource.h.

#define ID_VIEW_APPLOOK_2007_4 32840

Definition at line 38 of file resource.h.

#define ID_VIEW_APPLOOK_VS2005 32836

Definition at line 34 of file resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32835

Definition at line 33 of file resource.h.

#define ID_VIEW_APPLOOK_XP 32833

Definition at line 31 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 28 of file resource.h.

#define ID_VIEW_THEME_TOOLBAR 32841

Definition at line 39 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 29 of file resource.h.

#define IDB_ICONS 155

Definition at line 15 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 13 of file resource.h.

#define IDC_COLOR 1046

Definition at line 22 of file resource.h.

#define IDC_COLOR1 1047

Definition at line 23 of file resource.h.

#define IDC_COLOR2 1048

Definition at line 24 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 17 of file resource.h.

#define IDC_LOCATION 1044

Definition at line 20 of file resource.h.

#define IDC_LOCATION2 1045

Definition at line 21 of file resource.h.

#define IDC_NOTIFICATIONS 1050

Definition at line 26 of file resource.h.

#define IDC_TAB 1042

Definition at line 18 of file resource.h.

#define IDC_TAB_ICONS 1049

Definition at line 25 of file resource.h.

#define IDC_TAB_STYLE 1043

Definition at line 19 of file resource.h.

#define IDC_TAB_SWAP 1051

Definition at line 27 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 16 of file resource.h.

#define IDD_TABCONTROL_FORM 101

Definition at line 6 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 10 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_POPUP_STYLE_20007 132

Definition at line 12 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 11 of file resource.h.

#define IDR_TABCONTYPE 129

Definition at line 9 of file resource.h.

#define IDR_THEME 154

Definition at line 14 of file resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 102

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/StdAfx.cpp File Reference

  • vc2008fp
  • TabControl

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/StdAfx.h File Reference

  • vc2008fp
  • TabControl
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControl.cpp File Reference

  • vc2008fp
  • TabControl
Classes | Variables

TabControl.cpp File Reference

#include "stdafx.h"
#include "TabControl.h"
#include "MainFrm.h"
#include "TabControlDoc.h"
#include "TabControlView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CTabControlApp theApp

Variable Documentation

CTabControlApp theApp

Definition at line 49 of file TabControl.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControl.h File Reference

  • vc2008fp
  • TabControl
Classes | Variables

TabControl.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CTabControlApp

Variables

CTabControlApp theApp

Variable Documentation

CTabControlApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlDoc.cpp File Reference

  • vc2008fp
  • TabControl

TabControlDoc.cpp File Reference

#include "stdafx.h"
#include "TabControl.h"
#include "TabControlDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlDoc.h File Reference

  • vc2008fp
  • TabControl
Classes

TabControlDoc.h File Reference

Go to the source code of this file.

Classes

class CTabControlDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlView.cpp File Reference

  • vc2008fp
  • TabControl

TabControlView.cpp File Reference

#include "stdafx.h"
#include "TabControl.h"
#include "TabControlDoc.h"
#include "TabControlView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlView.h File Reference

  • vc2008fp
  • TabControl
Classes

TabControlView.h File Reference

Go to the source code of this file.

Classes

class CTabControlView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/targetver.h File Reference

  • vc2008fp
  • TabControl
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/MainFrm.cpp File Reference

  • vc2008fp
  • TasksPane

MainFrm.cpp File Reference

#include "stdafx.h"
#include "TasksPane.h"
#include "MainFrm.h"
#include "TasksPaneDoc.h"
#include "TasksPaneView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/MainFrm.h File Reference

  • vc2008fp
  • TasksPane
Classes | Defines

MainFrm.h File Reference

#include "TaskPane.h"
#include "TaskPane.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 15 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/resource.h File Reference

  • vc2008fp
  • TasksPane
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_TASK1 32828
#define | ID_TASK2 32829
#define | ID_TASK3 32830
#define | ID_TASK4 32831
#define | ID_TASK5 32832
#define | ID_TASK6 32832
#define | ID_TASK7 32832
#define | ID_TASK8 32832
#define | ID_TASK9 32832
#define | ID_VIEW_APPLOOK_2000 32833
#define | ID_VIEW_APPLOOK_2003 32835
#define | ID_VIEW_APPLOOK_2007 32838
#define | ID_VIEW_APPLOOK_VS2005 32837
#define | ID_VIEW_APPLOOK_WIN_XP 32836
#define | ID_VIEW_APPLOOK_XP 32834
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TASKPANE 32827
#define | ID_VIEW_TOOLBARS 32771
#define | IDB_TASKPANE_TOOLBAR 154
#define | IDB_TASKS 153
#define | IDB_TASKS_HC 155
#define | IDB_TOOLBAR256 151
#define | IDC_CHECK_ANIMATION 1056
#define | IDC_CHECK_CAPTIONICON 1086
#define | IDC_CHECK_COLLAPSEGROUPS 1058
#define | IDC_CHECK_HICOLORIMAGES 1050
#define | IDC_CHECK_HISTBUTTONS 1049
#define | IDC_CHECK_MARGINS 1057
#define | IDC_CHECK_NAVTOOLBAR 1048
#define | IDC_CHECK_SCROLLBUTTONS 1055
#define | IDC_CHECK_WRAPLABELS 1047
#define | IDC_CHECK_WRAPTASKS 1046
#define | IDC_COLOR_GROUPTEXT 1077
#define | IDC_COLOR_GROUPTEXTHOT 1078
#define | IDC_COLOR_TASKTEXT 1075
#define | IDC_COLOR_TASKTEXTHOT 1076
#define | IDC_COMPANY_URL 1041
#define | IDC_EDIT_CAPTIONHEIGHT 1063
#define | IDC_EDIT_GROUPSPACING 1061
#define | IDC_EDIT_HMARGIN 1060
#define | IDC_EDIT_ICONOFFSET 1065
#define | IDC_EDIT_TASKOFFSET 1064
#define | IDC_EDIT_TASKSPACING 1062
#define | IDC_EDIT_VMARGIN 1059
#define | IDC_RADIO_OFFICE2003 1053
#define | IDC_RADIO_OFFICE2007 1067
#define | IDC_RADIO_OFFICEXP 1052
#define | IDC_RADIO_VS2005 1066
#define | IDC_RADIO_WIN 1051
#define | IDC_RADIO_WINXP 1054
#define | IDC_SPIN3 1068
#define | IDC_SPIN4 1069
#define | IDC_SPIN5 1070
#define | IDC_SPIN6 1071
#define | IDC_SPIN7 1072
#define | IDC_SPIN8 1073
#define | IDC_SPIN9 1074
#define | IDC_STATIC_MARGINS1 1079
#define | IDC_STATIC_MARGINS2 1080
#define | IDC_STATIC_MARGINS3 1081
#define | IDC_STATIC_MARGINS4 1082
#define | IDC_STATIC_MARGINS5 1083
#define | IDC_STATIC_MARGINS6 1084
#define | IDC_STATIC_MARGINS7 1085
#define | IDD_ABOUTBOX 999
#define | IDD_TASKSPANE_FORM 101
#define | IDI_NOTE 157
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_TASKSPTYPE 129
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_WRONG_DISPLAY_SETTINGS 102

Define Documentation

#define ID_TASK1 32828

Definition at line 64 of file resource.h.

#define ID_TASK2 32829

Definition at line 65 of file resource.h.

#define ID_TASK3 32830

Definition at line 66 of file resource.h.

#define ID_TASK4 32831

Definition at line 67 of file resource.h.

#define ID_TASK5 32832

Definition at line 68 of file resource.h.

#define ID_TASK6 32832

Definition at line 69 of file resource.h.

#define ID_TASK7 32832

Definition at line 70 of file resource.h.

#define ID_TASK8 32832

Definition at line 71 of file resource.h.

#define ID_TASK9 32832

Definition at line 72 of file resource.h.

#define ID_VIEW_APPLOOK_2000 32833

Definition at line 73 of file resource.h.

#define ID_VIEW_APPLOOK_2003 32835

Definition at line 75 of file resource.h.

#define ID_VIEW_APPLOOK_2007 32838

Definition at line 78 of file resource.h.

#define ID_VIEW_APPLOOK_VS2005 32837

Definition at line 77 of file resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32836

Definition at line 76 of file resource.h.

#define ID_VIEW_APPLOOK_XP 32834

Definition at line 74 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 61 of file resource.h.

#define ID_VIEW_TASKPANE 32827

Definition at line 63 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 62 of file resource.h.

#define IDB_TASKPANE_TOOLBAR 154

Definition at line 15 of file resource.h.

#define IDB_TASKS 153

Definition at line 14 of file resource.h.

#define IDB_TASKS_HC 155

Definition at line 16 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 13 of file resource.h.

#define IDC_CHECK_ANIMATION 1056

Definition at line 30 of file resource.h.

#define IDC_CHECK_CAPTIONICON 1086

Definition at line 60 of file resource.h.

#define IDC_CHECK_COLLAPSEGROUPS 1058

Definition at line 32 of file resource.h.

#define IDC_CHECK_HICOLORIMAGES 1050

Definition at line 24 of file resource.h.

#define IDC_CHECK_HISTBUTTONS 1049

Definition at line 23 of file resource.h.

#define IDC_CHECK_MARGINS 1057

Definition at line 31 of file resource.h.

#define IDC_CHECK_NAVTOOLBAR 1048

Definition at line 22 of file resource.h.

#define IDC_CHECK_SCROLLBUTTONS 1055

Definition at line 29 of file resource.h.

#define IDC_CHECK_WRAPLABELS 1047

Definition at line 21 of file resource.h.

#define IDC_CHECK_WRAPTASKS 1046

Definition at line 20 of file resource.h.

#define IDC_COLOR_GROUPTEXT 1077

Definition at line 51 of file resource.h.

#define IDC_COLOR_GROUPTEXTHOT 1078

Definition at line 52 of file resource.h.

#define IDC_COLOR_TASKTEXT 1075

Definition at line 49 of file resource.h.

#define IDC_COLOR_TASKTEXTHOT 1076

Definition at line 50 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 19 of file resource.h.

#define IDC_EDIT_CAPTIONHEIGHT 1063

Definition at line 37 of file resource.h.

#define IDC_EDIT_GROUPSPACING 1061

Definition at line 35 of file resource.h.

#define IDC_EDIT_HMARGIN 1060

Definition at line 34 of file resource.h.

#define IDC_EDIT_ICONOFFSET 1065

Definition at line 39 of file resource.h.

#define IDC_EDIT_TASKOFFSET 1064

Definition at line 38 of file resource.h.

#define IDC_EDIT_TASKSPACING 1062

Definition at line 36 of file resource.h.

#define IDC_EDIT_VMARGIN 1059

Definition at line 33 of file resource.h.

#define IDC_RADIO_OFFICE2003 1053

Definition at line 27 of file resource.h.

#define IDC_RADIO_OFFICE2007 1067

Definition at line 41 of file resource.h.

#define IDC_RADIO_OFFICEXP 1052

Definition at line 26 of file resource.h.

#define IDC_RADIO_VS2005 1066

Definition at line 40 of file resource.h.

#define IDC_RADIO_WIN 1051

Definition at line 25 of file resource.h.

#define IDC_RADIO_WINXP 1054

Definition at line 28 of file resource.h.

#define IDC_SPIN3 1068

Definition at line 42 of file resource.h.

#define IDC_SPIN4 1069

Definition at line 43 of file resource.h.

#define IDC_SPIN5 1070

Definition at line 44 of file resource.h.

#define IDC_SPIN6 1071

Definition at line 45 of file resource.h.

#define IDC_SPIN7 1072

Definition at line 46 of file resource.h.

#define IDC_SPIN8 1073

Definition at line 47 of file resource.h.

#define IDC_SPIN9 1074

Definition at line 48 of file resource.h.

#define IDC_STATIC_MARGINS1 1079

Definition at line 53 of file resource.h.

#define IDC_STATIC_MARGINS2 1080

Definition at line 54 of file resource.h.

#define IDC_STATIC_MARGINS3 1081

Definition at line 55 of file resource.h.

#define IDC_STATIC_MARGINS4 1082

Definition at line 56 of file resource.h.

#define IDC_STATIC_MARGINS5 1083

Definition at line 57 of file resource.h.

#define IDC_STATIC_MARGINS6 1084

Definition at line 58 of file resource.h.

#define IDC_STATIC_MARGINS7 1085

Definition at line 59 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 18 of file resource.h.

#define IDD_TASKSPANE_FORM 101

Definition at line 6 of file resource.h.

#define IDI_NOTE 157

Definition at line 17 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 12 of file resource.h.

#define IDR_TASKSPTYPE 129

Definition at line 10 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 7 of file resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 102

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:37 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/StdAfx.cpp File Reference

  • vc2008fp
  • TasksPane

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/StdAfx.h File Reference

  • vc2008fp
  • TasksPane
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/targetver.h File Reference

  • vc2008fp
  • TasksPane
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TaskPane.cpp File Reference

  • vc2008fp
  • TasksPane

TaskPane.cpp File Reference

#include "stdafx.h"
#include "TasksPane.h"
#include "TaskPane.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TaskPane.h File Reference

  • vc2008fp
  • TasksPane
Classes

TaskPane.h File Reference

Go to the source code of this file.

Classes

class CTaskPane
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPane.cpp File Reference

  • vc2008fp
  • TasksPane
Classes | Variables

TasksPane.cpp File Reference

#include "stdafx.h"
#include "TasksPane.h"
#include "MainFrm.h"
#include "TasksPaneDoc.h"
#include "TasksPaneView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CTasksPaneApp theApp

Variable Documentation

CTasksPaneApp theApp

Definition at line 48 of file TasksPane.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPane.h File Reference

  • vc2008fp
  • TasksPane
Classes | Variables

TasksPane.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CTasksPaneApp

Variables

CTasksPaneApp theApp

Variable Documentation

CTasksPaneApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneDoc.cpp File Reference

  • vc2008fp
  • TasksPane

TasksPaneDoc.cpp File Reference

#include "stdafx.h"
#include "TasksPane.h"
#include "TasksPaneDoc.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneDoc.h File Reference

  • vc2008fp
  • TasksPane
Classes

TasksPaneDoc.h File Reference

Go to the source code of this file.

Classes

class CTasksPaneDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneView.cpp File Reference

  • vc2008fp
  • TasksPane

TasksPaneView.cpp File Reference

#include "stdafx.h"
#include "TasksPane.h"
#include "MainFrm.h"
#include "TasksPaneDoc.h"
#include "TasksPaneView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneView.h File Reference

  • vc2008fp
  • TasksPane
Classes

TasksPaneView.h File Reference

#include "TaskPane.h"

Go to the source code of this file.

Classes

class CTasksPaneView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/MainFrm.cpp File Reference

  • vc2008fp
  • ToolbarDateTimePicker

MainFrm.cpp File Reference

#include "stdafx.h"
#include "ToolbarDateTimePicker.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/MainFrm.h File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Classes | Defines

MainFrm.h File Reference

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CFrameWnd CFrameWndEx

Define Documentation

#define CFrameWnd CFrameWndEx

Definition at line 18 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/resource.h File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_DATE 32833
#define | ID_TIME 32834
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | IDC_COMPANY_URL 1041
#define | IDC_DATETIMEPICKER1 1042
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_TOOLBATYPE 129
#define | IDS_MAIN_TOOLBAR 101

Define Documentation

#define ID_DATE 32833

Definition at line 16 of file resource.h.

#define ID_TIME 32834

Definition at line 17 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 14 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 15 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 12 of file resource.h.

#define IDC_DATETIMEPICKER1 1042

Definition at line 13 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 11 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 9 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 7 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 10 of file resource.h.

#define IDR_TOOLBATYPE 129

Definition at line 8 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/StdAfx.cpp File Reference

  • vc2008fp
  • ToolbarDateTimePicker

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/StdAfx.h File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxadv.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define VC_EXTRALEAN

Define Documentation

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/targetver.h File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.cpp File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Classes | Variables

ToolbarDateTimePicker.cpp File Reference

#include "stdafx.h"
#include "ToolbarDateTimePicker.h"
#include "MainFrm.h"
#include "ToolbarDateTimePickerDoc.h"
#include "ToolbarDateTimePickerView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CToolbarDateTimePickerApp theApp

Variable Documentation

CToolbarDateTimePickerApp theApp

Definition at line 53 of file ToolbarDateTimePicker.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.h File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Classes | Variables

ToolbarDateTimePicker.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CToolbarDateTimePickerApp

Variables

CToolbarDateTimePickerApp theApp

Variable Documentation

CToolbarDateTimePickerApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.cpp File Reference

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePickerDoc.cpp File Reference

#include "stdafx.h"
#include "ToolbarDateTimePicker.h"
#include "ToolbarDateTimePickerDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.h File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Classes

ToolbarDateTimePickerDoc.h File Reference

Go to the source code of this file.

Classes

class CToolbarDateTimePickerDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.cpp File Reference

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePickerView.cpp File Reference

#include "stdafx.h"
#include "ToolbarDateTimePicker.h"
#include "ToolbarDateTimePickerDoc.h"
#include "ToolbarDateTimePickerView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.h File Reference

  • vc2008fp
  • ToolbarDateTimePicker
Classes

ToolbarDateTimePickerView.h File Reference

Go to the source code of this file.

Classes

class CToolbarDateTimePickerView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MainFrm.cpp File Reference

  • vc2008fp
  • ToolTipDemo
Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "TooltipDemo.h"
#include "MainFrm.h"

Go to the source code of this file.

Variables

const int | iMaxUserToolbars = 10
const UINT | uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40
const UINT | uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Variable Documentation

const int iMaxUserToolbars = 10

Definition at line 27 of file MainFrm.cpp.

const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40

Definition at line 28 of file MainFrm.cpp.

const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Definition at line 29 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MainFrm.h File Reference

  • vc2008fp
  • ToolTipDemo
Classes

MainFrm.h File Reference

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MyToolTipCtrl.cpp File Reference

  • vc2008fp
  • ToolTipDemo

MyToolTipCtrl.cpp File Reference

#include "stdafx.h"
#include "TooltipDemo.h"
#include "MyToolTipCtrl.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MyToolTipCtrl.h File Reference

  • vc2008fp
  • ToolTipDemo
Classes

MyToolTipCtrl.h File Reference

Go to the source code of this file.

Classes

class CMyToolTipCtrl
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/resource.h File Reference

  • vc2008fp
  • ToolTipDemo
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_VIEW_APPLOOK_2000 32833
#define | ID_VIEW_APPLOOK_2003 32835
#define | ID_VIEW_APPLOOK_2007_1 32838
#define | ID_VIEW_APPLOOK_2007_2 32839
#define | ID_VIEW_APPLOOK_2007_3 32840
#define | ID_VIEW_APPLOOK_2007_4 32841
#define | ID_VIEW_APPLOOK_VS2005 32837
#define | ID_VIEW_APPLOOK_WIN_XP 32836
#define | ID_VIEW_APPLOOK_XP 32834
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_USER_TOOLBAR1 32793
#define | ID_VIEW_USER_TOOLBAR10 32802
#define | ID_VIEW_USER_TOOLBAR2 32794
#define | ID_VIEW_USER_TOOLBAR3 32795
#define | ID_VIEW_USER_TOOLBAR4 32796
#define | ID_VIEW_USER_TOOLBAR5 32797
#define | ID_VIEW_USER_TOOLBAR6 32798
#define | ID_VIEW_USER_TOOLBAR7 32799
#define | ID_VIEW_USER_TOOLBAR8 32800
#define | ID_VIEW_USER_TOOLBAR9 32801
#define | IDB_TOOLBAR256 151
#define | IDC_BOLD_LABEL 1047
#define | IDC_COMPANY_URL 1041
#define | IDC_CUSTOM_COLORS 1048
#define | IDC_DRAW_DESCR 1045
#define | IDC_DRAW_ICON 1044
#define | IDC_DRAW_SEPARATOR 1050
#define | IDC_NO_BALLOON 1053
#define | IDC_ROUNDED_CORNERS 1046
#define | IDC_SHOW_TOOLTIPS_IN_MENU 1051
#define | IDC_TT_TYPE 1042
#define | IDC_TT_TYPE2 1043
#define | IDC_TT_TYPE3 1049
#define | IDC_TT_TYPE4 1052
#define | IDC_TT_TYPE5 1054
#define | IDD_ABOUTBOX 100
#define | IDD_TOOLTIPDEMO_FORM 101
#define | IDI_ICON1 154
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_TOOLTITYPE 129
#define | IDS_WRONG_DISPLAY_SETTINGS 102

Define Documentation

#define ID_VIEW_APPLOOK_2000 32833

Definition at line 41 of file resource.h.

#define ID_VIEW_APPLOOK_2003 32835

Definition at line 43 of file resource.h.

#define ID_VIEW_APPLOOK_2007_1 32838

Definition at line 46 of file resource.h.

#define ID_VIEW_APPLOOK_2007_2 32839

Definition at line 47 of file resource.h.

#define ID_VIEW_APPLOOK_2007_3 32840

Definition at line 48 of file resource.h.

#define ID_VIEW_APPLOOK_2007_4 32841

Definition at line 49 of file resource.h.

#define ID_VIEW_APPLOOK_VS2005 32837

Definition at line 45 of file resource.h.

#define ID_VIEW_APPLOOK_WIN_XP 32836

Definition at line 44 of file resource.h.

#define ID_VIEW_APPLOOK_XP 32834

Definition at line 42 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 29 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 30 of file resource.h.

#define ID_VIEW_USER_TOOLBAR1 32793

Definition at line 31 of file resource.h.

#define ID_VIEW_USER_TOOLBAR10 32802

Definition at line 40 of file resource.h.

#define ID_VIEW_USER_TOOLBAR2 32794

Definition at line 32 of file resource.h.

#define ID_VIEW_USER_TOOLBAR3 32795

Definition at line 33 of file resource.h.

#define ID_VIEW_USER_TOOLBAR4 32796

Definition at line 34 of file resource.h.

#define ID_VIEW_USER_TOOLBAR5 32797

Definition at line 35 of file resource.h.

#define ID_VIEW_USER_TOOLBAR6 32798

Definition at line 36 of file resource.h.

#define ID_VIEW_USER_TOOLBAR7 32799

Definition at line 37 of file resource.h.

#define ID_VIEW_USER_TOOLBAR8 32800

Definition at line 38 of file resource.h.

#define ID_VIEW_USER_TOOLBAR9 32801

Definition at line 39 of file resource.h.

#define IDB_TOOLBAR256 151

Definition at line 13 of file resource.h.

#define IDC_BOLD_LABEL 1047

Definition at line 21 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 15 of file resource.h.

#define IDC_CUSTOM_COLORS 1048

Definition at line 22 of file resource.h.

#define IDC_DRAW_DESCR 1045

Definition at line 19 of file resource.h.

#define IDC_DRAW_ICON 1044

Definition at line 18 of file resource.h.

#define IDC_DRAW_SEPARATOR 1050

Definition at line 24 of file resource.h.

#define IDC_NO_BALLOON 1053

Definition at line 27 of file resource.h.

#define IDC_ROUNDED_CORNERS 1046

Definition at line 20 of file resource.h.

#define IDC_SHOW_TOOLTIPS_IN_MENU 1051

Definition at line 25 of file resource.h.

#define IDC_TT_TYPE 1042

Definition at line 16 of file resource.h.

#define IDC_TT_TYPE2 1043

Definition at line 17 of file resource.h.

#define IDC_TT_TYPE3 1049

Definition at line 23 of file resource.h.

#define IDC_TT_TYPE4 1052

Definition at line 26 of file resource.h.

#define IDC_TT_TYPE5 1054

Definition at line 28 of file resource.h.

#define IDD_ABOUTBOX 100

Definition at line 5 of file resource.h.

#define IDD_TOOLTIPDEMO_FORM 101

Definition at line 7 of file resource.h.

#define IDI_ICON1 154

Definition at line 14 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 11 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 9 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 12 of file resource.h.

#define IDR_TOOLTITYPE 129

Definition at line 10 of file resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 102

Definition at line 8 of file resource.h.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/StdAfx.cpp File Reference

  • vc2008fp
  • ToolTipDemo

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/StdAfx.h File Reference

  • vc2008fp
  • ToolTipDemo
Defines

StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 24 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 21 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 18 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemo.cpp File Reference

  • vc2008fp
  • ToolTipDemo
Classes | Variables

TooltipDemo.cpp File Reference

#include "stdafx.h"
#include "TooltipDemo.h"
#include "MainFrm.h"
#include "TooltipDemoDoc.h"
#include "TooltipDemoView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CTooltipDemoApp theApp

Variable Documentation

CTooltipDemoApp theApp

Definition at line 93 of file TooltipDemo.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemo.h File Reference

  • vc2008fp
  • ToolTipDemo
Classes | Variables

TooltipDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CTooltipDemoApp

Variables

CTooltipDemoApp theApp

Variable Documentation

CTooltipDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoDoc.cpp File Reference

  • vc2008fp
  • ToolTipDemo

TooltipDemoDoc.cpp File Reference

#include "stdafx.h"
#include "TooltipDemo.h"
#include "TooltipDemoDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoDoc.h File Reference

  • vc2008fp
  • ToolTipDemo
Classes

TooltipDemoDoc.h File Reference

Go to the source code of this file.

Classes

class CTooltipDemoDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoView.cpp File Reference

  • vc2008fp
  • ToolTipDemo
Functions

TooltipDemoView.cpp File Reference

#include "stdafx.h"
#include "TooltipDemo.h"
#include "TooltipDemoDoc.h"
#include "TooltipDemoView.h"
#include "MyToolTipCtrl.h"

Go to the source code of this file.

Functions

BOOL IsBalloonTooltipAvailable ()

Function Documentation

BOOL IsBalloonTooltipAvailable ( )

Definition at line 100 of file TooltipDemoView.cpp.

{
  CSettingsStore reg (FALSE, TRUE);
  DWORD dwEnableBalloonTips = 1;

  if (reg.Open (_T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced")) &&
    reg.Read (_T("EnableBalloonTips"), dwEnableBalloonTips))
  {
    return dwEnableBalloonTips == 1;
  }

  return TRUE;
}

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoView.h File Reference

  • vc2008fp
  • ToolTipDemo
Classes

TooltipDemoView.h File Reference

Go to the source code of this file.

Classes

class CTooltipDemoView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/resource.h File Reference

  • vc2008fp
  • TrayMenu
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_APP_OPEN 32771
#define | ID_ITEM1 32773
#define | ID_ITEM2 32774
#define | ID_ITEM3 32775
#define | ID_ITEM4 32776
#define | IDD_TRAYMENU_DIALOG 102
#define | IDM_ABOUTBOX 0x0010
#define | IDR_MAINFRAME 128
#define | IDR_MENU1 129
#define | IDR_MENUIMAGES 130
#define | IDS_ABOUTBOX 101

Define Documentation

#define ID_APP_OPEN 32771

Definition at line 11 of file resource.h.

#define ID_ITEM1 32773

Definition at line 12 of file resource.h.

#define ID_ITEM2 32774

Definition at line 13 of file resource.h.

#define ID_ITEM3 32775

Definition at line 14 of file resource.h.

#define ID_ITEM4 32776

Definition at line 15 of file resource.h.

#define IDD_TRAYMENU_DIALOG 102

Definition at line 7 of file resource.h.

#define IDM_ABOUTBOX 0x0010

Definition at line 5 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_MENU1 129

Definition at line 9 of file resource.h.

#define IDR_MENUIMAGES 130

Definition at line 10 of file resource.h.

#define IDS_ABOUTBOX 101

Definition at line 6 of file resource.h.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/StdAfx.cpp File Reference

  • vc2008fp
  • TrayMenu

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/StdAfx.h File Reference

  • vc2008fp
  • TrayMenu
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/targetver.h File Reference

  • vc2008fp
  • TrayMenu
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenu.cpp File Reference

  • vc2008fp
  • TrayMenu
Variables

TrayMenu.cpp File Reference

#include "stdafx.h"
#include "TrayMenu.h"
#include "TrayMenuDlg.h"

Go to the source code of this file.

Variables

CTrayMenuApp theApp

Variable Documentation

CTrayMenuApp theApp

Definition at line 40 of file TrayMenu.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenu.h File Reference

  • vc2008fp
  • TrayMenu
Classes | Variables

TrayMenu.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CTrayMenuApp

Variables

CTrayMenuApp theApp

Variable Documentation

CTrayMenuApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenuDlg.cpp File Reference

  • vc2008fp
  • TrayMenu
Defines

TrayMenuDlg.cpp File Reference

#include "stdafx.h"
#include "TrayMenu.h"
#include "TrayMenuDlg.h"

Go to the source code of this file.

Defines

#define UM_TRAYNOTIFY (WM_USER + 1)

Define Documentation

#define UM_TRAYNOTIFY (WM_USER + 1)

Definition at line 21 of file TrayMenuDlg.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenuDlg.h File Reference

  • vc2008fp
  • TrayMenu
Classes | Defines

TrayMenuDlg.h File Reference

Go to the source code of this file.

Classes

class | CTrayMenuDlg

Defines

#define | CDialog CDialogEx

Define Documentation

#define CDialog CDialogEx

Definition at line 16 of file TrayMenuDlg.h.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/AppLookDlg.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

AppLookDlg.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "AppLookDlg.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/AppLookDlg.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

AppLookDlg.h File Reference

Go to the source code of this file.

Classes

class CAppLookDlg
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ChildFrm.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

ChildFrm.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "StartView.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ChildFrm.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

ChildFrm.h File Reference

Go to the source code of this file.

Classes

class CChildFrame
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassTreeWnd.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

ClassTreeWnd.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "ClassTreeWnd.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassTreeWnd.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

ClassTreeWnd.h File Reference

Go to the source code of this file.

Classes

class CClassTreeWnd
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassViewBar.cpp File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

ClassViewBar.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "MainFrm.h"
#include "ClassViewBar.h"

Go to the source code of this file.

Classes

class CClassViewMenuButton
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassViewBar.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

ClassViewBar.h File Reference

#include "ClassTreeWnd.h"

Go to the source code of this file.

Classes

class | CClassToolBar
class | CClassViewBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/DynamicHelpView.cpp File Reference

  • vc2008fp
  • VisualStudioDemo
Variables

DynamicHelpView.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "MainFrm.h"
#include "DynamicHelpView.h"

Go to the source code of this file.

Variables

const int idTree = 1

Variable Documentation

const int idTree = 1

Definition at line 21 of file DynamicHelpView.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/DynamicHelpView.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

DynamicHelpView.h File Reference

Go to the source code of this file.

Classes

class | CDynamicHelpViewBar
class | CHelpToolBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FileViewBar.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

FileViewBar.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "mainfrm.h"
#include "FileViewBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FileViewBar.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

FileViewBar.h File Reference

#include "ClassTreeWnd.h"

Go to the source code of this file.

Classes

class | CFileViewBar
class | CFileViewToolBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FindComboBox.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

FindComboBox.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "FindComboBox.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FindComboBox.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

FindComboBox.h File Reference

Go to the source code of this file.

Classes

class CFindComboButton
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/MainFrm.cpp File Reference

  • vc2008fp
  • VisualStudioDemo
Variables

MainFrm.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "FindComboBox.h"
#include "OptionsDlg.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "UndoBar.h"

Go to the source code of this file.

Variables

const int | iMaxUserToolbars = 10
const UINT | uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40
const UINT | uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Variable Documentation

const int iMaxUserToolbars = 10

Definition at line 30 of file MainFrm.cpp.

const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40

Definition at line 31 of file MainFrm.cpp.

const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Definition at line 32 of file MainFrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/MainFrm.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

MainFrm.h File Reference

#include "WatchBar.h"
#include "ClassViewBar.h"
#include "ResourceView.h"
#include "FileViewBar.h"
#include "OutputView.h"
#include "DynamicHelpView.h"
#include "PropertiesViewBar.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsDlg.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

OptionsDlg.cpp File Reference

#include "stdafx.h"
#include "OptionsDlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsDlg.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

OptionsDlg.h File Reference

#include "OptionsPages.h"

Go to the source code of this file.

Classes

class COptionsDlg
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsPages.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

OptionsPages.cpp File Reference

#include "stdafx.h"
#include "OptionsPages.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsPages.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

OptionsPages.h File Reference

#include "resource.h"

Go to the source code of this file.

Classes

class | COptionsPage1
class | COptionsPage12
class | COptionsPage21
class | COptionsPage22
class | COptionsPage31
class | COptionsPage32
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputBar.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

OutputBar.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "MainFrm.h"
#include "OutputBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputBar.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

OutputBar.h File Reference

Go to the source code of this file.

Classes

class | COutputBar
class | COutputList1
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputView.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

OutputView.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "MainFrm.h"
#include "OutputView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputView.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

OutputView.h File Reference

Go to the source code of this file.

Classes

class | COutputList
class | COutputViewBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/PropertiesViewBar.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

PropertiesViewBar.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "MainFrm.h"
#include "PropertiesViewBar.h"
#include <memory>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/PropertiesViewBar.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

PropertiesViewBar.h File Reference

Go to the source code of this file.

Classes

class | CPropertiesToolBar
class | CPropertiesViewBar
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/Resource.h File Reference

  • vc2008fp
  • VisualStudioDemo
Defines

Resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_CLASS_ADD_MEMEBER_FUNCTION 32837
#define | ID_CLASS_ADD_MEMEBER_VARIABLE 32838
#define | ID_CLASS_DEFINITION 32836
#define | ID_CLASS_PROPERTIES 32839
#define | ID_DHELP1 32873
#define | ID_DHELP2 32874
#define | ID_DHELP3 32875
#define | ID_DUMMY_BUILD 32788
#define | ID_DUMMY_CLEAN 32799
#define | ID_DUMMY_COMPILE 32787
#define | ID_DUMMY_EXECUTE 32790
#define | ID_DUMMY_GO 32791
#define | ID_DUMMY_INSERT_RESOURCE 32842
#define | ID_DUMMY_REBUILD_ALL 32798
#define | ID_DUMMY_REMOVE_ALL_BREAKPOINTS 32796
#define | ID_DUMMY_SELECT_ACTIVE_CONFIGURATION 32794
#define | ID_DUMMY_STOP_BUILD 32789
#define | ID_EDIT_AUTOOUTLINING 32958
#define | ID_EDIT_CLEAR_ALLBOOKMARKS 32930
#define | ID_EDIT_COLLAPSETODEFINITIONS 32956
#define | ID_EDIT_DECREASE_IDENT 32932
#define | ID_EDIT_ENABLEOUTLINING 32959
#define | ID_EDIT_FIND_COMBO 32948
#define | ID_EDIT_FINDNEXT 108
#define | ID_EDIT_FINDPREV 113
#define | ID_EDIT_GOTO_LINE 32963
#define | ID_EDIT_HIDESELECTION 32952
#define | ID_EDIT_INCREASE_IDENT 32931
#define | ID_EDIT_LINENUMBERS 32961
#define | ID_EDIT_LISTMEMBERS 32935
#define | ID_EDIT_NEXT_WORD 32960
#define | ID_EDIT_NEXTBOOKMARK 32926
#define | ID_EDIT_PREVIOUSBOOKMARK 32927
#define | ID_EDIT_SHOWHINT 116
#define | ID_EDIT_STOPHIDINGCURRENT 32954
#define | ID_EDIT_STOPOUTLINING 32957
#define | ID_EDIT_TOGGLEALLOUTLINING 32955
#define | ID_EDIT_TOGGLEBOOKMARK 32925
#define | ID_EDIT_TOGGLEBREAKPOINT 32928
#define | ID_EDIT_TOGGLEOUTLINING 32953
#define | ID_EXAMPLE_CPP 177
#define | ID_EXAMPLE_WEB 178
#define | ID_EXPAND 32878
#define | ID_FILE_CLOSE_SOLUTION 32889
#define | ID_FILE_NEW_BLANK_SOLUTION 32887
#define | ID_FILE_NEW_PROJECT 32886
#define | ID_FILE_OPEN_SOLUTION 32888
#define | ID_FILE_SAVE_ALL 32892
#define | ID_HELP_KEYBOARDMAP 32845
#define | ID_HELP_SHOW_START 32896
#define | ID_HELP_WEB 32951
#define | ID_MDI_CANCEL 32968
#define | ID_MDI_MOVE_TO_NEXT_GROUP 32969
#define | ID_MDI_MOVE_TO_PREV_GROUP 32967
#define | ID_MDI_NEW_HORZ_TAB_GROUP 32966
#define | ID_MDI_NEW_VERT_GROUP 32965
#define | ID_MDI_TABBED_DOCUMENT 32974
#define | ID_MDITABS_BOTTOM 32852
#define | ID_MDITABS_CLOSE 32855
#define | ID_MDITABS_ICONS 32850
#define | ID_MDITABS_TOP 32851
#define | ID_MENU_DIR1 32847
#define | ID_MENU_DIR2 32848
#define | ID_MENU_DIR3 32849
#define | ID_MENU_ITEM1 32866
#define | ID_MENU_ITEM2 32867
#define | ID_MENU_ITEM3 32868
#define | ID_NEW_ACCELERATOR 32829
#define | ID_NEW_BITMAP 32827
#define | ID_NEW_CURSOR 32825
#define | ID_NEW_DIALOG 32823
#define | ID_NEW_FOLDER 32882
#define | ID_NEW_ICON 32826
#define | ID_NEW_MENU 32824
#define | ID_NEW_STRING_TABLE 32830
#define | ID_NEW_TOOLBAR 32828
#define | ID_NEW_VERSION 32831
#define | ID_OUTPUT_GOTO_ERROR 32833
#define | ID_PROPERIES1 32880
#define | ID_PROPERIES2 32881
#define | ID_PROPERTIES 32883
#define | ID_RESOURCE_OPEN 32840
#define | ID_RESOURCE_OPEN_BINARY 32841
#define | ID_SOLUTION_OPEN 32884
#define | ID_SOLUTION_OPEN_WITH 32885
#define | ID_SORT_MENU 32789
#define | ID_SORTING_GROUPBYTYPE 32869
#define | ID_SORTING_SORTALF 32870
#define | ID_SORTING_SORTBYACCESS 32872
#define | ID_SORTING_SORTBYTYPE 32871
#define | ID_SORTINGPROP 32879
#define | ID_TOOLS_CONNECT_TO_DATABASE 32894
#define | ID_TOOLS_DEBUG_PROCESSES 32893
#define | ID_TOOLS_ENTRY 32819
#define | ID_TOOLS_MACRO 32816
#define | ID_TOOLS_OPTIONS 32949
#define | ID_USER_TOOL1 32806
#define | ID_USER_TOOL10 32815
#define | ID_USER_TOOL2 32807
#define | ID_USER_TOOL3 32808
#define | ID_USER_TOOL4 32809
#define | ID_USER_TOOL5 32810
#define | ID_USER_TOOL6 32811
#define | ID_USER_TOOL7 32812
#define | ID_USER_TOOL8 32813
#define | ID_USER_TOOL9 32814
#define | ID_VIEW_APP_LOOK 32950
#define | ID_VIEW_BUILD_TOOLBAR 32797
#define | ID_VIEW_CB_CAPTION 32804
#define | ID_VIEW_CLASS 32856
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_DOCUMENT_TAB 32845
#define | ID_VIEW_DYNAMICHELP 32785
#define | ID_VIEW_EDIT_TOOLBAR 32933
#define | ID_VIEW_EDITCTRL 112
#define | ID_VIEW_FILE 32858
#define | ID_VIEW_FORCE_GRADIENT 32805
#define | ID_VIEW_FULLSCREEN 32902
#define | ID_VIEW_MDI_TABS 32853
#define | ID_VIEW_OUTPUT 32783
#define | ID_VIEW_PROPERTIES 32900
#define | ID_VIEW_REFRESH 32897
#define | ID_VIEW_RESOURCE 32857
#define | ID_VIEW_TAB_FLAT_BORDERS 32844
#define | ID_VIEW_TOOLBARS 32781
#define | ID_VIEW_USER_TOOLBAR1 32771
#define | ID_VIEW_USER_TOOLBAR10 32780
#define | ID_VIEW_USER_TOOLBAR2 32772
#define | ID_VIEW_USER_TOOLBAR3 32773
#define | ID_VIEW_USER_TOOLBAR4 32774
#define | ID_VIEW_USER_TOOLBAR5 32775
#define | ID_VIEW_USER_TOOLBAR6 32776
#define | ID_VIEW_USER_TOOLBAR7 32777
#define | ID_VIEW_USER_TOOLBAR8 32778
#define | ID_VIEW_USER_TOOLBAR9 32779
#define | ID_VIEW_WATCH 32901
#define | ID_VIEW_WORKSPACE 32782
#define | ID_WINDOW_CLOSE_ALL 32895
#define | ID_WINDOW_MANAGER 32784
#define | IDB_BREAK 207
#define | IDB_BUILD24 187
#define | IDB_CHECK 143
#define | IDB_CLASS_VIEW 135
#define | IDB_CLASS_VIEW_24 197
#define | IDB_CURRENT 208
#define | IDB_DYNAMICHELP 150
#define | IDB_DYNAMICHELP24 205
#define | IDB_EDIT24 188
#define | IDB_FILE_VIEW 137
#define | IDB_FILE_VIEW24 203
#define | IDB_HELPTOOLBAR_24 204
#define | IDB_IMG_INTELLISENSE 173
#define | IDB_IMG_INTELLISENSE_HC 189
#define | IDB_MENUIMAGES24 185
#define | IDB_OPTIONSIMAGES 174
#define | IDB_PROP24 196
#define | IDB_RESOURCE_VIEW 136
#define | IDB_RESOURCE_VIEW24 206
#define | IDB_SOLUTION_EXPLORER_24 195
#define | IDB_SORT24 198
#define | IDB_TOOLBAR24 186
#define | IDB_TOOLS_PAGE1 168
#define | IDB_TOOLS_PAGE1_HC 200
#define | IDB_TOOLS_PAGE2 169
#define | IDB_TOOLS_PAGE2_HC 201
#define | IDB_TOOLS_PAGE3 170
#define | IDB_TOOLS_PAGE3_HC 202
#define | IDB_WORKSPACE 134
#define | IDC_ACTIVETAB_CLOSE_BUTTON 1018
#define | IDC_APP_LOOK 1023
#define | IDC_APP_LOOK1 1012
#define | IDC_APP_LOOK2 1013
#define | IDC_APP_LOOK3 1014
#define | IDC_APP_LOOK4 1018
#define | IDC_APP_LOOK5 1019
#define | IDC_APP_LOOK6 1022
#define | IDC_APPLY 3
#define | IDC_BUTTON1 1009
#define | IDC_CHECK1 1011
#define | IDC_CHECK10 1015
#define | IDC_CHECK11 1016
#define | IDC_CHECK12 1017
#define | IDC_CHECK13 1018
#define | IDC_CHECK2 1014
#define | IDC_CHECK3 1015
#define | IDC_CHECK4 1016
#define | IDC_CHECK5 1012
#define | IDC_CHECK6 1017
#define | IDC_CHECK7 1018
#define | IDC_CHECK8 1013
#define | IDC_CHECK9 1014
#define | IDC_COMBO1 1010
#define | IDC_CUSTOM_TOOLTIPS 1021
#define | IDC_DOCK_TAB_COLORS 1017
#define | IDC_EDIT1 1017
#define | IDC_EDIT2 1012
#define | IDC_EDIT3 1013
#define | IDC_EDIT4 1018
#define | IDC_FINDDIALOG_DOWNRADIO 1006
#define | IDC_FINDDIALOG_FINDCOMBO 1011
#define | IDC_FINDDIALOG_MARKALLBUTTON 1007
#define | IDC_FINDDIALOG_MATCHCASECHECK 1002
#define | IDC_FINDDIALOG_MATCHWHOLEWORDONLYCHECK 1001
#define | IDC_FINDDIALOG_REGULARBUTTON 1008
#define | IDC_FINDDIALOG_REGULAREXPRESSIONCHECK 1003
#define | IDC_FINDDIALOG_SEARCHALLOPENDOCUMENTSCHECK 1004
#define | IDC_FINDDIALOG_UPRADIO 1005
#define | IDC_LINE 1018
#define | IDC_MAIL 1000
#define | IDC_ONENOTE_TABS 1016
#define | IDC_RADIO1 1007
#define | IDC_RADIO2 1008
#define | IDC_RADIO3 1009
#define | IDC_RADIO4 1019
#define | IDC_RADIO5 1020
#define | IDC_ROUNDED_TABS 1020
#define | IDC_SHOW_AT_STARTUP 1015
#define | IDC_STYLE 1024
#define | IDC_URL 1001
#define | IDC_VERSION 1002
#define | IDC_XP_COLORS 1018
#define | IDD_ABOUTBOX 999
#define | IDD_APP_LOOK 180
#define | IDD_FINDDIALOG 169
#define | IDD_GOTO_LINE 201
#define | IDD_OPTIONSPAGE1 154
#define | IDD_OPTIONSPAGE2 149
#define | IDD_OPTIONSPAGE3 150
#define | IDD_OPTIONSPAGE4 151
#define | IDD_OPTIONSPAGE5 152
#define | IDD_OPTIONSPAGE6 153
#define | IDI_CLASS_VIEW 132
#define | IDI_CLASS_VIEW_HC 158
#define | IDI_DYNAMICHELP_VIEW 148
#define | IDI_DYNAMICHELP_VIEW_HC 193
#define | IDI_FILE_VIEW 134
#define | IDI_FILE_VIEW_HC 189
#define | IDI_OUTPUT_BAR 135
#define | IDI_OUTPUT_BAR_HC 195
#define | IDI_PROP_BAR_HC 192
#define | IDI_PROPERTIES_BAR 153
#define | IDI_RES_VIEW 133
#define | IDI_RES_VIEW_HC 190
#define | IDI_WATCH_BAR 136
#define | IDI_WATCH_BAR_HC 194
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_BUILD 138
#define | IDR_CONTEXT_MENU 132
#define | IDR_DEVTYPE0 129
#define | IDR_DEVTYPE_CPP 130
#define | IDR_DYNAMIC_HELP 149
#define | IDR_EDIT 155
#define | IDR_EDITOR_XML_SETTINGS_CPP 183
#define | IDR_EDITOR_XML_SETTINGS_WEB 182
#define | IDR_MAINFRAME 128
#define | IDR_MENU_ARGS 161
#define | IDR_MENU_DIRS 147
#define | IDR_MENU_IMAGES 142
#define | IDR_POPUP_CONTROLBAR 164
#define | IDR_POPUP_DROP_MDITABS 178
#define | IDR_POPUP_MDITABS 177
#define | IDR_POPUP_OUTPUT 144
#define | IDR_POPUP_RESOURCE 163
#define | IDR_POPUP_SOLUTION 162
#define | IDR_POPUP_SORT 139
#define | IDR_POPUP_TOOLBAR 133
#define | IDR_PROPERTIES 151
#define | IDR_SOLUTION_EXPLORER 154
#define | IDR_SORT 146
#define | IDR_START 209
#define | IDR_TOOLBAR_RESOURCE 145
#define | IDS_BUILD_TOOLBAR 103
#define | IDS_DUMMY_UNDO_ACTION 32800
#define | IDS_EDIT_TOOLBAR 106
#define | IDS_EDITFAILED 121
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_PGUPFAILED 122
#define | IDS_RESOURCE_TOOLBAR 104
#define | IDS_STRING_NOT_FOUND_FMT 102
#define | IDS_UAT_BACKSPACE 32943
#define | IDS_UAT_CUT 32941
#define | IDS_UAT_DELETE 32938
#define | IDS_UAT_DELETEDATA 32938
#define | IDS_UAT_DRAGDROP 32945
#define | IDS_UAT_ENTER 32947
#define | IDS_UAT_INDENT 32939
#define | IDS_UAT_INDENTDATA 32939
#define | IDS_UAT_INSERTDATA 32937
#define | IDS_UAT_PASTE 32942
#define | IDS_UAT_REPLACE 32962
#define | IDS_UAT_TAB 32946
#define | IDS_UAT_TYPING 32937
#define | IDS_UAT_UNDEFINED 32936
#define | IDS_UAT_UNINDENT 32944
#define | IDS_UAT_UNKNOWN 32940

Define Documentation

#define ID_CLASS_ADD_MEMEBER_FUNCTION 32837

Definition at line 203 of file Resource.h.

#define ID_CLASS_ADD_MEMEBER_VARIABLE 32838

Definition at line 204 of file Resource.h.

#define ID_CLASS_DEFINITION 32836

Definition at line 202 of file Resource.h.

#define ID_CLASS_PROPERTIES 32839

Definition at line 205 of file Resource.h.

#define ID_DHELP1 32873

Definition at line 230 of file Resource.h.

#define ID_DHELP2 32874

Definition at line 231 of file Resource.h.

#define ID_DHELP3 32875

Definition at line 232 of file Resource.h.

#define ID_DUMMY_BUILD 32788

Definition at line 167 of file Resource.h.

#define ID_DUMMY_CLEAN 32799

Definition at line 176 of file Resource.h.

#define ID_DUMMY_COMPILE 32787

Definition at line 166 of file Resource.h.

#define ID_DUMMY_EXECUTE 32790

Definition at line 170 of file Resource.h.

#define ID_DUMMY_GO 32791

Definition at line 171 of file Resource.h.

#define ID_DUMMY_INSERT_RESOURCE 32842

Definition at line 208 of file Resource.h.

#define ID_DUMMY_REBUILD_ALL 32798

Definition at line 175 of file Resource.h.

#define ID_DUMMY_REMOVE_ALL_BREAKPOINTS 32796

Definition at line 173 of file Resource.h.

#define ID_DUMMY_SELECT_ACTIVE_CONFIGURATION 32794

Definition at line 172 of file Resource.h.

#define ID_DUMMY_STOP_BUILD 32789

Definition at line 168 of file Resource.h.

#define ID_EDIT_AUTOOUTLINING 32958

Definition at line 288 of file Resource.h.

#define ID_EDIT_CLEAR_ALLBOOKMARKS 32930

Definition at line 258 of file Resource.h.

#define ID_EDIT_COLLAPSETODEFINITIONS 32956

Definition at line 286 of file Resource.h.

#define ID_EDIT_DECREASE_IDENT 32932

Definition at line 260 of file Resource.h.

#define ID_EDIT_ENABLEOUTLINING 32959

Definition at line 289 of file Resource.h.

#define ID_EDIT_FIND_COMBO 32948

Definition at line 278 of file Resource.h.

#define ID_EDIT_FINDNEXT 108

Definition at line 12 of file Resource.h.

#define ID_EDIT_FINDPREV 113

Definition at line 14 of file Resource.h.

#define ID_EDIT_GOTO_LINE 32963

Definition at line 293 of file Resource.h.

#define ID_EDIT_HIDESELECTION 32952

Definition at line 282 of file Resource.h.

#define ID_EDIT_INCREASE_IDENT 32931

Definition at line 259 of file Resource.h.

#define ID_EDIT_LINENUMBERS 32961

Definition at line 291 of file Resource.h.

#define ID_EDIT_LISTMEMBERS 32935

Definition at line 262 of file Resource.h.

#define ID_EDIT_NEXT_WORD 32960

Definition at line 290 of file Resource.h.

#define ID_EDIT_NEXTBOOKMARK 32926

Definition at line 255 of file Resource.h.

#define ID_EDIT_PREVIOUSBOOKMARK 32927

Definition at line 256 of file Resource.h.

#define ID_EDIT_SHOWHINT 116

Definition at line 15 of file Resource.h.

#define ID_EDIT_STOPHIDINGCURRENT 32954

Definition at line 284 of file Resource.h.

#define ID_EDIT_STOPOUTLINING 32957

Definition at line 287 of file Resource.h.

#define ID_EDIT_TOGGLEALLOUTLINING 32955

Definition at line 285 of file Resource.h.

#define ID_EDIT_TOGGLEBOOKMARK 32925

Definition at line 254 of file Resource.h.

#define ID_EDIT_TOGGLEBREAKPOINT 32928

Definition at line 257 of file Resource.h.

#define ID_EDIT_TOGGLEOUTLINING 32953

Definition at line 283 of file Resource.h.

#define ID_EXAMPLE_CPP 177

Definition at line 64 of file Resource.h.

#define ID_EXAMPLE_WEB 178

Definition at line 66 of file Resource.h.

#define ID_EXPAND 32878

Definition at line 233 of file Resource.h.

#define ID_FILE_CLOSE_SOLUTION 32889

Definition at line 244 of file Resource.h.

#define ID_FILE_NEW_BLANK_SOLUTION 32887

Definition at line 242 of file Resource.h.

#define ID_FILE_NEW_PROJECT 32886

Definition at line 241 of file Resource.h.

#define ID_FILE_OPEN_SOLUTION 32888

Definition at line 243 of file Resource.h.

#define ID_FILE_SAVE_ALL 32892

Definition at line 245 of file Resource.h.

#define ID_HELP_KEYBOARDMAP 32845

Definition at line 210 of file Resource.h.

#define ID_HELP_SHOW_START 32896

Definition at line 249 of file Resource.h.

#define ID_HELP_WEB 32951

Definition at line 281 of file Resource.h.

#define ID_MDI_CANCEL 32968

Definition at line 297 of file Resource.h.

#define ID_MDI_MOVE_TO_NEXT_GROUP 32969

Definition at line 298 of file Resource.h.

#define ID_MDI_MOVE_TO_PREV_GROUP 32967

Definition at line 296 of file Resource.h.

#define ID_MDI_NEW_HORZ_TAB_GROUP 32966

Definition at line 295 of file Resource.h.

#define ID_MDI_NEW_VERT_GROUP 32965

Definition at line 294 of file Resource.h.

#define ID_MDI_TABBED_DOCUMENT 32974

Definition at line 299 of file Resource.h.

#define ID_MDITABS_BOTTOM 32852

Definition at line 217 of file Resource.h.

#define ID_MDITABS_CLOSE 32855

Definition at line 219 of file Resource.h.

#define ID_MDITABS_ICONS 32850

Definition at line 215 of file Resource.h.

#define ID_MDITABS_TOP 32851

Definition at line 216 of file Resource.h.

#define ID_MENU_DIR1 32847

Definition at line 212 of file Resource.h.

#define ID_MENU_DIR2 32848

Definition at line 213 of file Resource.h.

#define ID_MENU_DIR3 32849

Definition at line 214 of file Resource.h.

#define ID_MENU_ITEM1 32866

Definition at line 223 of file Resource.h.

#define ID_MENU_ITEM2 32867

Definition at line 224 of file Resource.h.

#define ID_MENU_ITEM3 32868

Definition at line 225 of file Resource.h.

#define ID_NEW_ACCELERATOR 32829

Definition at line 198 of file Resource.h.

#define ID_NEW_BITMAP 32827

Definition at line 196 of file Resource.h.

#define ID_NEW_CURSOR 32825

Definition at line 194 of file Resource.h.

#define ID_NEW_DIALOG 32823

Definition at line 192 of file Resource.h.

#define ID_NEW_FOLDER 32882

Definition at line 237 of file Resource.h.

#define ID_NEW_ICON 32826

Definition at line 195 of file Resource.h.

#define ID_NEW_MENU 32824

Definition at line 193 of file Resource.h.

#define ID_NEW_STRING_TABLE 32830

Definition at line 199 of file Resource.h.

#define ID_NEW_TOOLBAR 32828

Definition at line 197 of file Resource.h.

#define ID_NEW_VERSION 32831

Definition at line 200 of file Resource.h.

#define ID_OUTPUT_GOTO_ERROR 32833

Definition at line 201 of file Resource.h.

#define ID_PROPERIES1 32880

Definition at line 235 of file Resource.h.

#define ID_PROPERIES2 32881

Definition at line 236 of file Resource.h.

#define ID_PROPERTIES 32883

Definition at line 238 of file Resource.h.

#define ID_RESOURCE_OPEN 32840

Definition at line 206 of file Resource.h.

#define ID_RESOURCE_OPEN_BINARY 32841

Definition at line 207 of file Resource.h.

#define ID_SOLUTION_OPEN 32884

Definition at line 239 of file Resource.h.

#define ID_SOLUTION_OPEN_WITH 32885

Definition at line 240 of file Resource.h.

#define ID_SORT_MENU 32789

Definition at line 169 of file Resource.h.

#define ID_SORTING_GROUPBYTYPE 32869

Definition at line 226 of file Resource.h.

#define ID_SORTING_SORTALF 32870

Definition at line 227 of file Resource.h.

#define ID_SORTING_SORTBYACCESS 32872

Definition at line 229 of file Resource.h.

#define ID_SORTING_SORTBYTYPE 32871

Definition at line 228 of file Resource.h.

#define ID_SORTINGPROP 32879

Definition at line 234 of file Resource.h.

#define ID_TOOLS_CONNECT_TO_DATABASE 32894

Definition at line 247 of file Resource.h.

#define ID_TOOLS_DEBUG_PROCESSES 32893

Definition at line 246 of file Resource.h.

#define ID_TOOLS_ENTRY 32819

Definition at line 191 of file Resource.h.

#define ID_TOOLS_MACRO 32816

Definition at line 190 of file Resource.h.

#define ID_TOOLS_OPTIONS 32949

Definition at line 279 of file Resource.h.

#define ID_USER_TOOL1 32806

Definition at line 180 of file Resource.h.

#define ID_USER_TOOL10 32815

Definition at line 189 of file Resource.h.

#define ID_USER_TOOL2 32807

Definition at line 181 of file Resource.h.

#define ID_USER_TOOL3 32808

Definition at line 182 of file Resource.h.

#define ID_USER_TOOL4 32809

Definition at line 183 of file Resource.h.

#define ID_USER_TOOL5 32810

Definition at line 184 of file Resource.h.

#define ID_USER_TOOL6 32811

Definition at line 185 of file Resource.h.

#define ID_USER_TOOL7 32812

Definition at line 186 of file Resource.h.

#define ID_USER_TOOL8 32813

Definition at line 187 of file Resource.h.

#define ID_USER_TOOL9 32814

Definition at line 188 of file Resource.h.

#define ID_VIEW_APP_LOOK 32950

Definition at line 280 of file Resource.h.

#define ID_VIEW_BUILD_TOOLBAR 32797

Definition at line 174 of file Resource.h.

#define ID_VIEW_CB_CAPTION 32804

Definition at line 178 of file Resource.h.

#define ID_VIEW_CLASS 32856

Definition at line 220 of file Resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 150 of file Resource.h.

#define ID_VIEW_DOCUMENT_TAB 32845

Definition at line 211 of file Resource.h.

#define ID_VIEW_DYNAMICHELP 32785

Definition at line 165 of file Resource.h.

#define ID_VIEW_EDIT_TOOLBAR 32933

Definition at line 261 of file Resource.h.

#define ID_VIEW_EDITCTRL 112

Definition at line 13 of file Resource.h.

#define ID_VIEW_FILE 32858

Definition at line 222 of file Resource.h.

#define ID_VIEW_FORCE_GRADIENT 32805

Definition at line 179 of file Resource.h.

#define ID_VIEW_FULLSCREEN 32902

Definition at line 253 of file Resource.h.

#define ID_VIEW_MDI_TABS 32853

Definition at line 218 of file Resource.h.

#define ID_VIEW_OUTPUT 32783

Definition at line 163 of file Resource.h.

#define ID_VIEW_PROPERTIES 32900

Definition at line 251 of file Resource.h.

#define ID_VIEW_REFRESH 32897

Definition at line 250 of file Resource.h.

#define ID_VIEW_RESOURCE 32857

Definition at line 221 of file Resource.h.

#define ID_VIEW_TAB_FLAT_BORDERS 32844

Definition at line 209 of file Resource.h.

#define ID_VIEW_TOOLBARS 32781

Definition at line 161 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR1 32771

Definition at line 151 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR10 32780

Definition at line 160 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR2 32772

Definition at line 152 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR3 32773

Definition at line 153 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR4 32774

Definition at line 154 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR5 32775

Definition at line 155 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR6 32776

Definition at line 156 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR7 32777

Definition at line 157 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR8 32778

Definition at line 158 of file Resource.h.

#define ID_VIEW_USER_TOOLBAR9 32779

Definition at line 159 of file Resource.h.

#define ID_VIEW_WATCH 32901

Definition at line 252 of file Resource.h.

#define ID_VIEW_WORKSPACE 32782

Definition at line 162 of file Resource.h.

#define ID_WINDOW_CLOSE_ALL 32895

Definition at line 248 of file Resource.h.

#define ID_WINDOW_MANAGER 32784

Definition at line 164 of file Resource.h.

#define IDB_BREAK 207

Definition at line 94 of file Resource.h.

#define IDB_BUILD24 187

Definition at line 73 of file Resource.h.

#define IDB_CHECK 143

Definition at line 35 of file Resource.h.

#define IDB_CLASS_VIEW 135

Definition at line 27 of file Resource.h.

#define IDB_CLASS_VIEW_24 197

Definition at line 84 of file Resource.h.

#define IDB_CURRENT 208

Definition at line 95 of file Resource.h.

#define IDB_DYNAMICHELP 150

Definition at line 43 of file Resource.h.

#define IDB_DYNAMICHELP24 205

Definition at line 92 of file Resource.h.

#define IDB_EDIT24 188

Definition at line 74 of file Resource.h.

#define IDB_FILE_VIEW 137

Definition at line 31 of file Resource.h.

#define IDB_FILE_VIEW24 203

Definition at line 90 of file Resource.h.

#define IDB_HELPTOOLBAR_24 204

Definition at line 91 of file Resource.h.

#define IDB_IMG_INTELLISENSE 173

Definition at line 62 of file Resource.h.

#define IDB_IMG_INTELLISENSE_HC 189

Definition at line 76 of file Resource.h.

#define IDB_MENUIMAGES24 185

Definition at line 71 of file Resource.h.

#define IDB_OPTIONSIMAGES 174

Definition at line 63 of file Resource.h.

#define IDB_PROP24 196

Definition at line 83 of file Resource.h.

#define IDB_RESOURCE_VIEW 136

Definition at line 29 of file Resource.h.

#define IDB_RESOURCE_VIEW24 206

Definition at line 93 of file Resource.h.

#define IDB_SOLUTION_EXPLORER_24 195

Definition at line 82 of file Resource.h.

#define IDB_SORT24 198

Definition at line 85 of file Resource.h.

#define IDB_TOOLBAR24 186

Definition at line 72 of file Resource.h.

#define IDB_TOOLS_PAGE1 168

Definition at line 58 of file Resource.h.

#define IDB_TOOLS_PAGE1_HC 200

Definition at line 86 of file Resource.h.

#define IDB_TOOLS_PAGE2 169

Definition at line 59 of file Resource.h.

#define IDB_TOOLS_PAGE2_HC 201

Definition at line 88 of file Resource.h.

#define IDB_TOOLS_PAGE3 170

Definition at line 61 of file Resource.h.

#define IDB_TOOLS_PAGE3_HC 202

Definition at line 89 of file Resource.h.

#define IDB_WORKSPACE 134

Definition at line 25 of file Resource.h.

#define IDC_ACTIVETAB_CLOSE_BUTTON 1018

Definition at line 141 of file Resource.h.

#define IDC_APP_LOOK 1023

Definition at line 148 of file Resource.h.

#define IDC_APP_LOOK1 1012

Definition at line 118 of file Resource.h.

#define IDC_APP_LOOK2 1013

Definition at line 121 of file Resource.h.

#define IDC_APP_LOOK3 1014

Definition at line 124 of file Resource.h.

#define IDC_APP_LOOK4 1018

Definition at line 139 of file Resource.h.

#define IDC_APP_LOOK5 1019

Definition at line 143 of file Resource.h.

#define IDC_APP_LOOK6 1022

Definition at line 147 of file Resource.h.

#define IDC_APPLY 3

Definition at line 5 of file Resource.h.

#define IDC_BUTTON1 1009

Definition at line 111 of file Resource.h.

#define IDC_CHECK1 1011

Definition at line 115 of file Resource.h.

#define IDC_CHECK10 1015

Definition at line 126 of file Resource.h.

#define IDC_CHECK11 1016

Definition at line 129 of file Resource.h.

#define IDC_CHECK12 1017

Definition at line 133 of file Resource.h.

#define IDC_CHECK13 1018

Definition at line 136 of file Resource.h.

#define IDC_CHECK2 1014

Definition at line 122 of file Resource.h.

#define IDC_CHECK3 1015

Definition at line 125 of file Resource.h.

#define IDC_CHECK4 1016

Definition at line 128 of file Resource.h.

#define IDC_CHECK5 1012

Definition at line 117 of file Resource.h.

#define IDC_CHECK6 1017

Definition at line 131 of file Resource.h.

#define IDC_CHECK7 1018

Definition at line 135 of file Resource.h.

#define IDC_CHECK8 1013

Definition at line 120 of file Resource.h.

#define IDC_CHECK9 1014

Definition at line 123 of file Resource.h.

#define IDC_COMBO1 1010

Definition at line 113 of file Resource.h.

#define IDC_CUSTOM_TOOLTIPS 1021

Definition at line 146 of file Resource.h.

#define IDC_DOCK_TAB_COLORS 1017

Definition at line 134 of file Resource.h.

#define IDC_EDIT1 1017

Definition at line 132 of file Resource.h.

#define IDC_EDIT2 1012

Definition at line 116 of file Resource.h.

#define IDC_EDIT3 1013

Definition at line 119 of file Resource.h.

#define IDC_EDIT4 1018

Definition at line 137 of file Resource.h.

#define IDC_FINDDIALOG_DOWNRADIO 1006

Definition at line 106 of file Resource.h.

#define IDC_FINDDIALOG_FINDCOMBO 1011

Definition at line 114 of file Resource.h.

#define IDC_FINDDIALOG_MARKALLBUTTON 1007

Definition at line 107 of file Resource.h.

#define IDC_FINDDIALOG_MATCHCASECHECK 1002

Definition at line 102 of file Resource.h.

#define IDC_FINDDIALOG_MATCHWHOLEWORDONLYCHECK 1001

Definition at line 100 of file Resource.h.

#define IDC_FINDDIALOG_REGULARBUTTON 1008

Definition at line 109 of file Resource.h.

#define IDC_FINDDIALOG_REGULAREXPRESSIONCHECK 1003

Definition at line 103 of file Resource.h.

#define IDC_FINDDIALOG_SEARCHALLOPENDOCUMENTSCHECK 1004

Definition at line 104 of file Resource.h.

#define IDC_FINDDIALOG_UPRADIO 1005

Definition at line 105 of file Resource.h.

#define IDC_LINE 1018

Definition at line 140 of file Resource.h.

#define IDC_MAIL 1000

Definition at line 98 of file Resource.h.

#define IDC_ONENOTE_TABS 1016

Definition at line 130 of file Resource.h.

#define IDC_RADIO1 1007

Definition at line 108 of file Resource.h.

#define IDC_RADIO2 1008

Definition at line 110 of file Resource.h.

#define IDC_RADIO3 1009

Definition at line 112 of file Resource.h.

#define IDC_RADIO4 1019

Definition at line 142 of file Resource.h.

#define IDC_RADIO5 1020

Definition at line 144 of file Resource.h.

#define IDC_ROUNDED_TABS 1020

Definition at line 145 of file Resource.h.

#define IDC_SHOW_AT_STARTUP 1015

Definition at line 127 of file Resource.h.

#define IDC_STYLE 1024

Definition at line 149 of file Resource.h.

#define IDC_URL 1001

Definition at line 99 of file Resource.h.

#define IDC_VERSION 1002

Definition at line 101 of file Resource.h.

#define IDC_XP_COLORS 1018

Definition at line 138 of file Resource.h.

#define IDD_ABOUTBOX 999

Definition at line 97 of file Resource.h.

#define IDD_APP_LOOK 180

Definition at line 68 of file Resource.h.

#define IDD_FINDDIALOG 169

Definition at line 60 of file Resource.h.

#define IDD_GOTO_LINE 201

Definition at line 87 of file Resource.h.

#define IDD_OPTIONSPAGE1 154

Definition at line 51 of file Resource.h.

#define IDD_OPTIONSPAGE2 149

Definition at line 42 of file Resource.h.

#define IDD_OPTIONSPAGE3 150

Definition at line 44 of file Resource.h.

#define IDD_OPTIONSPAGE4 151

Definition at line 46 of file Resource.h.

#define IDD_OPTIONSPAGE5 152

Definition at line 47 of file Resource.h.

#define IDD_OPTIONSPAGE6 153

Definition at line 49 of file Resource.h.

#define IDI_CLASS_VIEW 132

Definition at line 22 of file Resource.h.

#define IDI_CLASS_VIEW_HC 158

Definition at line 53 of file Resource.h.

#define IDI_DYNAMICHELP_VIEW 148

Definition at line 40 of file Resource.h.

#define IDI_DYNAMICHELP_VIEW_HC 193

Definition at line 79 of file Resource.h.

#define IDI_FILE_VIEW 134

Definition at line 26 of file Resource.h.

#define IDI_FILE_VIEW_HC 189

Definition at line 75 of file Resource.h.

#define IDI_OUTPUT_BAR 135

Definition at line 28 of file Resource.h.

#define IDI_OUTPUT_BAR_HC 195

Definition at line 81 of file Resource.h.

#define IDI_PROP_BAR_HC 192

Definition at line 78 of file Resource.h.

#define IDI_PROPERTIES_BAR 153

Definition at line 48 of file Resource.h.

#define IDI_RES_VIEW 133

Definition at line 24 of file Resource.h.

#define IDI_RES_VIEW_HC 190

Definition at line 77 of file Resource.h.

#define IDI_WATCH_BAR 136

Definition at line 30 of file Resource.h.

#define IDI_WATCH_BAR_HC 194

Definition at line 80 of file Resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 6 of file Resource.h.

#define IDR_BUILD 138

Definition at line 32 of file Resource.h.

#define IDR_CONTEXT_MENU 132

Definition at line 21 of file Resource.h.

#define IDR_DEVTYPE0 129

Definition at line 19 of file Resource.h.

#define IDR_DEVTYPE_CPP 130

Definition at line 20 of file Resource.h.

#define IDR_DYNAMIC_HELP 149

Definition at line 41 of file Resource.h.

#define IDR_EDIT 155

Definition at line 52 of file Resource.h.

#define IDR_EDITOR_XML_SETTINGS_CPP 183

Definition at line 70 of file Resource.h.

#define IDR_EDITOR_XML_SETTINGS_WEB 182

Definition at line 69 of file Resource.h.

#define IDR_MAINFRAME 128

Definition at line 18 of file Resource.h.

#define IDR_MENU_ARGS 161

Definition at line 54 of file Resource.h.

#define IDR_MENU_DIRS 147

Definition at line 39 of file Resource.h.

#define IDR_MENU_IMAGES 142

Definition at line 34 of file Resource.h.

#define IDR_POPUP_CONTROLBAR 164

Definition at line 57 of file Resource.h.

#define IDR_POPUP_DROP_MDITABS 178

Definition at line 67 of file Resource.h.

#define IDR_POPUP_MDITABS 177

Definition at line 65 of file Resource.h.

#define IDR_POPUP_OUTPUT 144

Definition at line 36 of file Resource.h.

#define IDR_POPUP_RESOURCE 163

Definition at line 56 of file Resource.h.

#define IDR_POPUP_SOLUTION 162

Definition at line 55 of file Resource.h.

#define IDR_POPUP_SORT 139

Definition at line 33 of file Resource.h.

#define IDR_POPUP_TOOLBAR 133

Definition at line 23 of file Resource.h.

#define IDR_PROPERTIES 151

Definition at line 45 of file Resource.h.

#define IDR_SOLUTION_EXPLORER 154

Definition at line 50 of file Resource.h.

#define IDR_SORT 146

Definition at line 38 of file Resource.h.

#define IDR_START 209

Definition at line 96 of file Resource.h.

#define IDR_TOOLBAR_RESOURCE 145

Definition at line 37 of file Resource.h.

#define IDS_BUILD_TOOLBAR 103

Definition at line 9 of file Resource.h.

#define IDS_DUMMY_UNDO_ACTION 32800

Definition at line 177 of file Resource.h.

#define IDS_EDIT_TOOLBAR 106

Definition at line 11 of file Resource.h.

#define IDS_EDITFAILED 121

Definition at line 16 of file Resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 7 of file Resource.h.

#define IDS_PGUPFAILED 122

Definition at line 17 of file Resource.h.

#define IDS_RESOURCE_TOOLBAR 104

Definition at line 10 of file Resource.h.

#define IDS_STRING_NOT_FOUND_FMT 102

Definition at line 8 of file Resource.h.

#define IDS_UAT_BACKSPACE 32943

Definition at line 273 of file Resource.h.

#define IDS_UAT_CUT 32941

Definition at line 271 of file Resource.h.

#define IDS_UAT_DELETE 32938

Definition at line 267 of file Resource.h.

#define IDS_UAT_DELETEDATA 32938

Definition at line 266 of file Resource.h.

#define IDS_UAT_DRAGDROP 32945

Definition at line 275 of file Resource.h.

#define IDS_UAT_ENTER 32947

Definition at line 277 of file Resource.h.

#define IDS_UAT_INDENT 32939

Definition at line 269 of file Resource.h.

#define IDS_UAT_INDENTDATA 32939

Definition at line 268 of file Resource.h.

#define IDS_UAT_INSERTDATA 32937

Definition at line 264 of file Resource.h.

#define IDS_UAT_PASTE 32942

Definition at line 272 of file Resource.h.

#define IDS_UAT_REPLACE 32962

Definition at line 292 of file Resource.h.

#define IDS_UAT_TAB 32946

Definition at line 276 of file Resource.h.

#define IDS_UAT_TYPING 32937

Definition at line 265 of file Resource.h.

#define IDS_UAT_UNDEFINED 32936

Definition at line 263 of file Resource.h.

#define IDS_UAT_UNINDENT 32944

Definition at line 274 of file Resource.h.

#define IDS_UAT_UNKNOWN 32940

Definition at line 270 of file Resource.h.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ResourceView.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

ResourceView.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "MainFrm.h"
#include "ResourceView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ResourceView.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

ResourceView.h File Reference

#include "ClassTreeWnd.h"

Go to the source code of this file.

Classes

class CResourceViewBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/StartView.cpp File Reference

  • vc2008fp
  • VisualStudioDemo
Defines

StartView.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "StartView.h"

Go to the source code of this file.

Defines

#define IDC_START_IMAGE 1

Define Documentation

#define IDC_START_IMAGE 1

Definition at line 23 of file StartView.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/StartView.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

StartView.h File Reference

Go to the source code of this file.

Classes

class CStartView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/stdafx.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/stdafx.h File Reference

  • vc2008fp
  • VisualStudioDemo
Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 29 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 26 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 21 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/targetver.h File Reference

  • vc2008fp
  • VisualStudioDemo
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoBar.cpp File Reference

  • vc2008fp
  • VisualStudioDemo
Variables

UndoBar.cpp File Reference

#include "stdafx.h"
#include "UndoBar.h"

Go to the source code of this file.

Variables

const int ID_LIST = 1

Variable Documentation

const int ID_LIST = 1

Definition at line 21 of file UndoBar.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoBar.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

UndoBar.h File Reference

#include "UndoListBox.h"

Go to the source code of this file.

Classes

class | CUndoBar
class | CUndoButton
class | CUndoMenu
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoListBox.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

UndoListBox.cpp File Reference

#include "stdafx.h"
#include "UndoListBox.h"
#include "UndoBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoListBox.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

UndoListBox.h File Reference

Go to the source code of this file.

Classes

class CUndoListBox
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemo.cpp File Reference

  • vc2008fp
  • VisualStudioDemo
Classes | Variables

VisualStudioDemo.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "VisualStudioDemoDoc.h"
#include "VisualStudioDemoView.h"
#include "StartView.h"
#include "AppLookDlg.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CVisualStudioDemoApp theApp

Variable Documentation

CVisualStudioDemoApp theApp

Definition at line 58 of file VisualStudioDemo.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemo.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes | Variables

VisualStudioDemo.h File Reference

#include "resource.h"
#include "resource.h"

Go to the source code of this file.

Classes

class CVisualStudioDemoApp

Variables

CVisualStudioDemoApp theApp

Variable Documentation

CVisualStudioDemoApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemoDoc.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "VisualStudioDemoDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

VisualStudioDemoDoc.h File Reference

Go to the source code of this file.

Classes

class CVisualStudioDemoDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoView.cpp File Reference

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemoView.cpp File Reference

#include "stdafx.h"
#include "MainFrm.h"
#include "VisualStudioDemo.h"
#include "VisualStudioDemoDoc.h"
#include "VisualStudioDemoView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoView.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

VisualStudioDemoView.h File Reference

Go to the source code of this file.

Classes

class CVisualStudioDemoView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/WatchBar.cpp File Reference

  • vc2008fp
  • VisualStudioDemo
Defines

WatchBar.cpp File Reference

#include "stdafx.h"
#include "VisualStudioDemo.h"
#include "WatchBar.h"

Go to the source code of this file.

Defines

#define ID_LIST_1 1

Define Documentation

#define ID_LIST_1 1

Definition at line 20 of file WatchBar.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/WatchBar.h File Reference

  • vc2008fp
  • VisualStudioDemo
Classes

WatchBar.h File Reference

Go to the source code of this file.

Classes

class CWatchBar
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/AppLookDlg.cpp File Reference

  • vc2008fp
  • WordPad

AppLookDlg.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "AppLookDlg.h"
#include "mainfrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/AppLookDlg.h File Reference

  • vc2008fp
  • WordPad
Classes

AppLookDlg.h File Reference

Go to the source code of this file.

Classes

class CAppLookDlg
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/buttondi.cpp File Reference

  • vc2008fp
  • WordPad
Defines

buttondi.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "buttondi.h"
#include "strings.h"
#include "wordpad.h"

Go to the source code of this file.

Defines

#define | DS_3DLOOK 0x4
#define | DS_CONTEXTHELP 0x2000L

Define Documentation

#define DS_3DLOOK 0x4

Definition at line 178 of file buttondi.cpp.

#define DS_CONTEXTHELP 0x2000L

Definition at line 26 of file buttondi.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/buttondi.h File Reference

  • vc2008fp
  • WordPad
Classes

buttondi.h File Reference

Go to the source code of this file.

Classes

class CButtonDialog
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/chicdial.cpp File Reference

  • vc2008fp
  • WordPad

chicdial.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/chicdial.h File Reference

  • vc2008fp
  • WordPad
Classes

chicdial.h File Reference

Go to the source code of this file.

Classes

class | CCSDialog
class | CCSPropertyPage
class | CCSPropertySheet
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/cntritem.cpp File Reference

  • vc2008fp
  • WordPad

cntritem.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "cntritem.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/cntritem.h File Reference

  • vc2008fp
  • WordPad
Classes

cntritem.h File Reference

Go to the source code of this file.

Classes

class CWordPadCntrItem
Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/datedial.cpp File Reference

  • vc2008fp
  • WordPad

datedial.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "datedial.h"
#include "helpids.h"
#include <winnls.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/datedial.h File Reference

  • vc2008fp
  • WordPad
Classes

datedial.h File Reference

Go to the source code of this file.

Classes

class CDateDialog
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ddxm.cpp File Reference

  • vc2008fp
  • WordPad
Functions

ddxm.cpp File Reference

#include "stdafx.h"
#include "ddxm.h"
#include "wordpad.h"
#include "resource.h"

Go to the source code of this file.

Functions

void PASCAL | DDV_MinMaxTwips (CDataExchange *pDX, int value, int minVal, int maxVal)
void PASCAL | DDX_Twips (CDataExchange *pDX, int nIDC, int &value)

Function Documentation

void PASCAL DDV_MinMaxTwips | ( | CDataExchange * | pDX,
 |  | int | value,
 |  | int | minVal,
 |  | int | maxVal
 | ) |  |

Definition at line 52 of file ddxm.cpp.

{
  ASSERT(minVal <= maxVal);
  if (value < minVal || value > maxVal)
  {
    // "The measurement must be between %1 and %2."
    if (!pDX->m_bSaveAndValidate)
    {
      TRACE0("Warning: initial dialog data is out of range.\n");
      return;     // don't stop now
    }
    TCHAR szMin[32];
    TCHAR szMax[32];
    theApp.PrintTwips(szMin, minVal, 2);
    theApp.PrintTwips(szMax, maxVal, 2);
    CString prompt;
    AfxFormatString2(prompt, IDS_MEASUREMENT_RANGE, szMin, szMax);
    AfxMessageBox(prompt, MB_ICONEXCLAMATION, AFX_IDS_APP_TITLE);
    prompt.Empty(); // exception prep
    pDX->Fail();
  }
}

void PASCAL DDX_Twips | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | int & | value
 | ) |  |

Definition at line 20 of file ddxm.cpp.

{
  HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  TCHAR szT[64];

  if (pDX->m_bSaveAndValidate)
  {
    ::GetWindowText(hWndCtrl, szT, sizeof(szT)/sizeof(TCHAR));
    if (szT[0] != NULL) // not empty
    {
      if (!theApp.ParseMeasurement(szT, value))
      {
        AfxMessageBox(IDS_INVALID_MEASUREMENT,MB_OK|MB_ICONINFORMATION);
        pDX->Fail();            // throws exception
      }
      theApp.PrintTwips(szT, value, 2);
      theApp.ParseMeasurement(szT, value);
    }
    else // empty
      value = INT_MAX;
  }
  else
  {
    // convert from twips to default units
    if (value != INT_MAX)
    {
      theApp.PrintTwips(szT, value, 2);
      SetWindowText(hWndCtrl, szT);
    }
  }
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ddxm.h File Reference

  • vc2008fp
  • WordPad
Defines | Functions

ddxm.h File Reference

#include <limits.h>

Go to the source code of this file.

Defines

#define | DDXM_BLANK INT_MAX

Functions

void PASCAL | DDV_MinMaxTwips (CDataExchange *pDX, int value, int minVal, int maxVal)
void PASCAL | DDX_Twips (CDataExchange *pDX, int nIDC, int &value)

Define Documentation

#define DDXM_BLANK INT_MAX

Definition at line 15 of file ddxm.h.

Function Documentation

void PASCAL DDV_MinMaxTwips | ( | CDataExchange * | pDX,
 |  | int | value,
 |  | int | minVal,
 |  | int | maxVal
 | ) |  |

Definition at line 50 of file ddxm.cpp.

{
  ASSERT(minVal <= maxVal);
  if (value < minVal || value > maxVal)
  {
    // "The measurement must be between %1 and %2."
    if (!pDX->m_bSaveAndValidate)
    {
      TRACE0("Warning: initial dialog data is out of range.\n");
      return;     // don't stop now
    }
    TCHAR szMin[64];
    TCHAR szMax[64];
    theApp.PrintTwips(szMin, 64, minVal, 2);
    theApp.PrintTwips(szMax, 64, maxVal, 2);
    CString prompt;
    AfxFormatString2(prompt, IDS_MEASUREMENT_RANGE, szMin, szMax);
    AfxMessageBox(prompt, MB_ICONEXCLAMATION, AFX_IDS_APP_TITLE);
    prompt.Empty(); // exception prep
    pDX->Fail();
  }
}

void PASCAL DDX_Twips | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | int & | value
 | ) |  |

Definition at line 18 of file ddxm.cpp.

{
  HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  TCHAR szT[64];

  if (pDX->m_bSaveAndValidate)
  {
    ::GetWindowText(hWndCtrl, szT, sizeof(szT));
    if (szT[0] != NULL) // not empty
    {
      if (!theApp.ParseMeasurement(szT, value))
      {
        AfxMessageBox(IDS_INVALID_MEASUREMENT,MB_OK|MB_ICONINFORMATION);
        pDX->Fail();            // throws exception
      }
      theApp.PrintTwips(szT, 64, value, 2);
      theApp.ParseMeasurement(szT, value);
    }
    else // empty
      value = INT_MAX;
  }
  else
  {
    // convert from twips to default units
    if (value != INT_MAX)
    {
      theApp.PrintTwips(szT, 64, value, 2);
      SetWindowText(hWndCtrl, szT);
    }
  }
}

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/docopt.cpp File Reference

  • vc2008fp
  • WordPad

docopt.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "docopt.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/docopt.h File Reference

  • vc2008fp
  • WordPad
Classes

docopt.h File Reference

Go to the source code of this file.

Classes

class | CDocOptPage
class | CEmbeddedOptPage
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/doctype.cpp File Reference

  • vc2008fp
  • WordPad
Functions | Variables

doctype.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "strings.h"
#include "multconv.h"

Go to the source code of this file.

Functions

int | GetDocTypeFromName (LPCTSTR pszPathName, CFileException &fe)
CString | GetExtFromType (int nDocType)
CString | GetFileTypes (BOOL bOpen)
int | GetIndexFromType (int nType, BOOL bOpen)
int | GetTypeFromIndex (int nIndex, BOOL bOpen)
BOOL | IsDLLInPath (LPCSTR lpszName)
void | ScanForConverters ()

Variables

DocType | doctypes [NUM_DOC_TYPES]

Function Documentation

int GetDocTypeFromName | ( | LPCTSTR | pszPathName,
 |  | CFileException & | fe
 | ) |  |

Definition at line 116 of file doctype.cpp.

{
  CFile file;
  ASSERT(pszPathName != NULL);

  if (!file.Open(pszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
    return -1;

  CFileStatus stat;
  VERIFY(file.GetStatus(stat));

  if (stat.m_size == 0) // file is empty
  {
    CString ext = CString(pszPathName).Right(4);
    if (ext[0] != '.')
      return RD_TEXT;
    if (_tcsicmp(ext, _T(".doc"))==0)
      return RD_WORDPAD;
    if (_tcsicmp(ext, _T(".rtf"))==0)
      return RD_RICHTEXT;
    return RD_TEXT;
  }
  // RTF
  if (IsLeadMatch(file, byteRTFPrefix, sizeof(byteRTFPrefix)))
    return RD_RICHTEXT;
  // WORD 2
  if (IsLeadMatch(file, byteWord2Prefix, sizeof(byteWord2Prefix)))
    return RD_WINWORD2;
  // EXE
  if (IsLeadMatch(file, byteExePrefix, sizeof(byteExePrefix)))
    return RD_EXE;
  // write file can start with 31BE or 32BE depending on whether it has
  // OLE objects in it or not
  if (IsLeadMatch(file, byteWrite1Prefix, sizeof(byteWrite1Prefix)) ||
    IsLeadMatch(file, byteWrite2Prefix, sizeof(byteWrite2Prefix)))
  {
    file.Close();
#ifdef CONVERTERS
    if (IsConverterFormat(szWriteConverter, pszPathName))
      return RD_WRITE;
    else
#endif
      return RD_TEXT;
  }

  // test for compound file
  if (IsLeadMatch(file, byteCompFilePrefix, sizeof(byteCompFilePrefix)))
  {
    file.Close();
#ifdef CONVERTERS
    if (IsConverterFormat(szWordConverter, pszPathName))
    {
      if (IsWord6(pszPathName))
        return RD_WINWORD6;
      else
        return RD_WORDPAD;
    }
#endif
    return RD_TEXT;
  }
  return RD_TEXT;
}

CString GetExtFromType ( int nDocType )

Definition at line 209 of file doctype.cpp.

{
  ScanForConverters();

  CString str = doctypes[nDocType].GetString(DOCTYPE_EXT);
  if (!str.IsEmpty())
  {
    ASSERT(str[1] == '.');
    return str.Right(str.GetLength()-1);
  }
  return str;
}

CString GetFileTypes ( BOOL bOpen )

Definition at line 261 of file doctype.cpp.

{
  ScanForConverters();

  CString str;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (bOpen && doctypes[i].bRead && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DESC);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
    else if (!bOpen && doctypes[i].bWrite && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DOCTYPE);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
  }
  return str;
}

int GetIndexFromType | ( | int | nType,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 243 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (i == nType)
        return nCnt;
      nCnt++;
    }
  }
  return -1;
}

int GetTypeFromIndex | ( | int | nIndex,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 223 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (nCnt == nIndex)
        return i;
      nCnt++;
    }
  }
  ASSERT(FALSE);
  return -1;
}

BOOL IsDLLInPath ( LPCSTR lpszName )

Definition at line 197 of file doctype.cpp.

{
  ASSERT(lpszName != NULL);
  if (lpszName != NULL)
  {
    OFSTRUCT ofs;
    return (OpenFile(lpszName, &ofs, OF_EXIST) != HFILE_ERROR);
  }

  return FALSE;
}

void ScanForConverters ( )

Definition at line 179 of file doctype.cpp.

{
  static BOOL bScanned = FALSE;
  if (bScanned)
    return;

  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    LPCSTR lpsz = doctypes[i].pszConverterName;
    // if converter specified but can't find it
    if (lpsz != NULL && *lpsz != NULL && !IsDLLInPath(lpsz))
      doctypes[i].bRead = doctypes[i].bWrite = FALSE;
  }
  if (GetSystemMetrics(SM_DBCSENABLED))
    doctypes[RD_OEMTEXT].bRead = doctypes[RD_OEMTEXT].bWrite = FALSE;
  bScanned = TRUE;
}

Variable Documentation

DocType doctypes[NUM_DOC_TYPES]
Initial value:
{
  DECLARE_DOCTYPE(WINWORD2, FALSE, FALSE, FALSE, NULL),
  DECLARE_DOCTYPE(WINWORD6, TRUE, FALSE, TRUE, szWordConverter),
  DECLARE_DOCTYPE_SYN(WORDPAD, WINWORD6, TRUE, TRUE, FALSE, szWordConverter),
  DECLARE_DOCTYPE(WRITE, TRUE, FALSE, FALSE, szWriteConverter),
  DECLARE_DOCTYPE(RICHTEXT, TRUE, TRUE, FALSE, NULL),
  DECLARE_DOCTYPE(TEXT, TRUE, TRUE, FALSE, NULL),
  DECLARE_DOCTYPE(OEMTEXT, TRUE, TRUE, FALSE, NULL),
  DECLARE_DOCTYPE(ALL, TRUE, FALSE, FALSE, NULL),
  DECLARE_DOCTYPE(EXE, FALSE, FALSE, FALSE, NULL),

}

Definition at line 39 of file doctype.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/doctype.h File Reference

  • vc2008fp
  • WordPad
Classes | Defines | Typedefs | Functions | Variables

doctype.h File Reference

Go to the source code of this file.

Classes

struct | DocType

Defines

#define | DECLARE_DOCTYPE(name, b1, b2, b3, p) {RD_##name, IDS_##name##_DOC, b1, b2, b3, p}
#define | DECLARE_DOCTYPE_NULL(name, b1, b2, b3, p) {RD_##name, NULL, b1, b2, b3, p}
#define | DECLARE_DOCTYPE_SYN(actname, name, b1, b2, b3, p) {RD_##actname, IDS_##name##_DOC, b1, b2, b3, p}
#define | DOCTYPE_DESC 1
#define | DOCTYPE_DOCTYPE 0
#define | DOCTYPE_EXT 2
#define | DOCTYPE_PROGID 3
#define | NUM_DOC_TYPES 10
#define | RD_ALL 7
#define | RD_DEFAULT RD_WORDPAD
#define | RD_EMBEDDED 9
#define | RD_EXE 8
#define | RD_NATIVE RD_RICHTEXT
#define | RD_OEMTEXT 6
#define | RD_RICHTEXT 4
#define | RD_TEXT 5
#define | RD_WINWORD2 0
#define | RD_WINWORD6 1
#define | RD_WORDPAD 2
#define | RD_WRITE 3

Typedefs

typedef BOOL(* | PISFORMATFUNC )(LPCSTR pszConverter, LPCSTR pszPathName)

Functions

int | GetDocTypeFromName (LPCTSTR pszPathName, CFileException &fe)
CString | GetExtFromType (int nDocType)
CString | GetFileTypes (BOOL bOpen)
int | GetIndexFromType (int nType, BOOL bOpen)
int | GetTypeFromIndex (int nType, BOOL bOpen)
BOOL | IsDLLInPath (LPCSTR lpszName)
BOOL | IsTextType (int nType)
void | ScanForConverters ()

Variables

DocType | doctypes [NUM_DOC_TYPES]

Define Documentation

#define DECLARE_DOCTYPE | ( | name,
 |  | b1,
 |  | b2,
 |  | b3,
 |  | p |
 | ) |  | {RD_##name, IDS_##name##_DOC, b1, b2, b3, p}

Definition at line 49 of file doctype.h.

#define DECLARE_DOCTYPE_NULL | ( | name,
 |  | b1,
 |  | b2,
 |  | b3,
 |  | p |
 | ) |  | {RD_##name, NULL, b1, b2, b3, p}

Definition at line 53 of file doctype.h.

#define DECLARE_DOCTYPE_SYN | ( | actname,
 |  | name,
 |  | b1,
 |  | b2,
 |  | b3,
 |  | p |
 | ) |  | {RD_##actname, IDS_##name##_DOC, b1, b2, b3, p}

Definition at line 51 of file doctype.h.

#define DOCTYPE_DESC 1

Definition at line 45 of file doctype.h.

#define DOCTYPE_DOCTYPE 0

Definition at line 44 of file doctype.h.

#define DOCTYPE_EXT 2

Definition at line 46 of file doctype.h.

#define DOCTYPE_PROGID 3

Definition at line 47 of file doctype.h.

#define NUM_DOC_TYPES 10

Definition at line 24 of file doctype.h.

#define RD_ALL 7

Definition at line 21 of file doctype.h.

#define RD_DEFAULT RD_WORDPAD

Definition at line 26 of file doctype.h.

#define RD_EMBEDDED 9

Definition at line 23 of file doctype.h.

#define RD_EXE 8

Definition at line 22 of file doctype.h.

#define RD_NATIVE RD_RICHTEXT

Definition at line 27 of file doctype.h.

#define RD_OEMTEXT 6

Definition at line 20 of file doctype.h.

#define RD_RICHTEXT 4

Definition at line 18 of file doctype.h.

#define RD_TEXT 5

Definition at line 19 of file doctype.h.

#define RD_WINWORD2 0

Definition at line 14 of file doctype.h.

#define RD_WINWORD6 1

Definition at line 15 of file doctype.h.

#define RD_WORDPAD 2

Definition at line 16 of file doctype.h.

#define RD_WRITE 3

Definition at line 17 of file doctype.h.

Typedef Documentation

typedef BOOL(* PISFORMATFUNC)(LPCSTR pszConverter, LPCSTR pszPathName)

Definition at line 29 of file doctype.h.

Function Documentation

int GetDocTypeFromName | ( | LPCTSTR | pszPathName,
 |  | CFileException & | fe
 | ) |  |

Definition at line 108 of file doctype.cpp.

{
  CFile file;
  ASSERT(pszPathName != NULL);

  if (!file.Open(pszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
    return -1;

  CFileStatus stat;
  VERIFY(file.GetStatus(stat));

  if (stat.m_size == 0) // file is empty
  {
    CString ext = CString(pszPathName).Right(4);
    if (ext[0] != '.')
      return RD_TEXT;
#pragma warning(suppress:6400)
    if (lstrcmpi(ext, _T(".doc"))==0)
      return RD_WORDPAD;
#pragma warning(suppress:6400)
    if (lstrcmpi(ext, _T(".rtf"))==0)
      return RD_RICHTEXT;
    return RD_TEXT;
  }
  // RTF
  if (IsLeadMatch(file, byteRTFPrefix, sizeof(byteRTFPrefix)))
    return RD_RICHTEXT;
  // WORD 2
  if (IsLeadMatch(file, byteWord2Prefix, sizeof(byteWord2Prefix)))
    return RD_WINWORD2;
  // EXE
  if (IsLeadMatch(file, byteExePrefix, sizeof(byteExePrefix)))
    return RD_EXE;
  // write file can start with 31BE or 32BE depending on whether it has
  // OLE objects in it or not
  if (IsLeadMatch(file, byteWrite1Prefix, sizeof(byteWrite1Prefix)) ||
    IsLeadMatch(file, byteWrite2Prefix, sizeof(byteWrite2Prefix)))
  {
    file.Close();
    if (IsConverterFormat(szWriteConverter, pszPathName))
      return RD_WRITE;
    else
      return RD_TEXT;
  }

  // test for compound file
  if (IsLeadMatch(file, byteCompFilePrefix, sizeof(byteCompFilePrefix)))
  {
    file.Close();
    if (IsConverterFormat(szWordConverter, pszPathName))
    {
      if (IsWord6(pszPathName))
        return RD_WINWORD6;
      else
        return RD_WORDPAD;
    }
    return RD_TEXT;
  }
  return RD_TEXT;
}

CString GetExtFromType ( int nDocType )

Definition at line 194 of file doctype.cpp.

{
  ScanForConverters();

  CString str = doctypes[nDocType].GetString(DOCTYPE_EXT);
  if (!str.IsEmpty())
  {
    ASSERT(str.GetLength() == 5); // "*.ext"
    ASSERT(str[1] == '.');
    return str.Right(str.GetLength()-1);
  }
  return str;
}

CString GetFileTypes ( BOOL bOpen )

Definition at line 247 of file doctype.cpp.

{
  ScanForConverters();

  CString str;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (bOpen && doctypes[i].bRead && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DESC);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
    else if (!bOpen && doctypes[i].bWrite && !doctypes[i].bDup)
    {
      str += doctypes[i].GetString(DOCTYPE_DOCTYPE);
      str += (TCHAR)NULL;
      str += doctypes[i].GetString(DOCTYPE_EXT);
      str += (TCHAR)NULL;
    }
  }
  return str;
}

int GetIndexFromType | ( | int | nType,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 229 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (i == nType)
        return nCnt;
      nCnt++;
    }
  }
  return -1;
}

int GetTypeFromIndex | ( | int | nType,
 |  | BOOL | bOpen
 | ) |  |

Definition at line 209 of file doctype.cpp.

{
  ScanForConverters();

  int nCnt = 0;
  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    if (!doctypes[i].bDup &&
      (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
    {
      if (nCnt == nIndex)
        return i;
      nCnt++;
    }
  }
  ASSERT(FALSE);
  return -1;
}

BOOL IsDLLInPath ( LPCSTR lpszName )

Definition at line 187 of file doctype.cpp.

{
  ASSERT(lpszName != NULL);
  OFSTRUCT ofs;
  return (OpenFile(lpszName, &ofs, OF_EXIST) != HFILE_ERROR);
}

BOOL IsTextType ( int nType ) [inline]

Definition at line 30 of file doctype.h.

{return ((nType==RD_TEXT) || (nType==RD_OEMTEXT));}

void ScanForConverters ( )

Definition at line 169 of file doctype.cpp.

{
  static BOOL bScanned = FALSE;
  if (bScanned)
    return;

  for (int i=0;i<NUM_DOC_TYPES;i++)
  {
    LPCSTR lpsz = doctypes[i].pszConverterName;
    // if converter specified but can't find it
    if (lpsz != NULL && *lpsz != NULL && !IsDLLInPath(lpsz))
      doctypes[i].bRead = doctypes[i].bWrite = FALSE;
  }
  if (GetSystemMetrics(SM_DBCSENABLED))
    doctypes[RD_OEMTEXT].bRead = doctypes[RD_OEMTEXT].bWrite = FALSE;
  bScanned = TRUE;
}

Variable Documentation

DocType doctypes[NUM_DOC_TYPES]

Definition at line 35 of file doctype.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/filenewd.cpp File Reference

  • vc2008fp
  • WordPad

filenewd.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "filenewd.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/filenewd.h File Reference

  • vc2008fp
  • WordPad
Classes

filenewd.h File Reference

Go to the source code of this file.

Classes

class CFileNewDialog
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatba.cpp File Reference

  • vc2008fp
  • WordPad
Classes | Defines

formatba.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "formatba.h"
#include "strings.h"

Go to the source code of this file.

Classes

struct | ColourTableEntry

Defines

#define | MAX_COLOURS 100

Define Documentation

#define MAX_COLOURS 100

Definition at line 186 of file formatba.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatba.h File Reference

  • vc2008fp
  • WordPad
Classes

formatba.h File Reference

Go to the source code of this file.

Classes

class CFormatBar
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatpa.cpp File Reference

  • vc2008fp
  • WordPad

formatpa.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "formatpa.h"
#include "ddxm.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatpa.h File Reference

  • vc2008fp
  • WordPad
Classes

formatpa.h File Reference

Go to the source code of this file.

Classes

class CFormatParaDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatta.cpp File Reference

  • vc2008fp
  • WordPad

formatta.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "formatta.h"
#include "ddxm.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatta.h File Reference

  • vc2008fp
  • WordPad
Classes

formatta.h File Reference

Go to the source code of this file.

Classes

class CFormatTabDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/helpids.h File Reference

  • vc2008fp
  • WordPad
Defines

helpids.h File Reference

Go to the source code of this file.

Defines

#define | IDH_COMM_GROUPBOX 1026
#define | IDH_WORDPAD_ALIGN 1003
#define | IDH_WORDPAD_BOTTOMMARGIN 1036
#define | IDH_WORDPAD_CENTIMETERS 1028
#define | IDH_WORDPAD_CHECK_FORMATBAR 1032
#define | IDH_WORDPAD_CHECK_RULERBAR 1034
#define | IDH_WORDPAD_CHECK_STATUSBAR 1033
#define | IDH_WORDPAD_CHECK_TOOLBAR 1031
#define | IDH_WORDPAD_FILENEW_DOC 1018
#define | IDH_WORDPAD_FORMATTED 1009
#define | IDH_WORDPAD_INCHES 1027
#define | IDH_WORDPAD_INDENT_FIRST 1022
#define | IDH_WORDPAD_INDENT_LEFT 1020
#define | IDH_WORDPAD_INDENT_RIGHT 1021
#define | IDH_WORDPAD_LEFTMARGIN 1037
#define | IDH_WORDPAD_OPTIONS_AUTOWORDSEL 1019
#define | IDH_WORDPAD_PICAS 1030
#define | IDH_WORDPAD_POINTS 1029
#define | IDH_WORDPAD_RIGHTMARGIN 1038
#define | IDH_WORDPAD_TAB_CLEARALL 1006
#define | IDH_WORDPAD_TABCLEAR 1005
#define | IDH_WORDPAD_TABSET 1004
#define | IDH_WORDPAD_TABSTOPS 1007
#define | IDH_WORDPAD_TEXTFILE 1008
#define | IDH_WORDPAD_TIMEDATE 1001
#define | IDH_WORDPAD_TOPMARGIN 1035
#define | IDH_WORDPAD_WORD6FILE 1017
#define | IDH_WORDPAD_WRAP_NO 1023
#define | IDH_WORDPAD_WRAP_RULER 1025
#define | IDH_WORDPAD_WRAP_WINDOW 1024

Define Documentation

#define IDH_COMM_GROUPBOX 1026

Definition at line 34 of file helpids.h.

#define IDH_WORDPAD_ALIGN 1003

Definition at line 14 of file helpids.h.

#define IDH_WORDPAD_BOTTOMMARGIN 1036

Definition at line 47 of file helpids.h.

#define IDH_WORDPAD_CENTIMETERS 1028

Definition at line 37 of file helpids.h.

#define IDH_WORDPAD_CHECK_FORMATBAR 1032

Definition at line 42 of file helpids.h.

#define IDH_WORDPAD_CHECK_RULERBAR 1034

Definition at line 44 of file helpids.h.

#define IDH_WORDPAD_CHECK_STATUSBAR 1033

Definition at line 43 of file helpids.h.

#define IDH_WORDPAD_CHECK_TOOLBAR 1031

Definition at line 41 of file helpids.h.

#define IDH_WORDPAD_FILENEW_DOC 1018

Definition at line 23 of file helpids.h.

#define IDH_WORDPAD_FORMATTED 1009

Definition at line 20 of file helpids.h.

#define IDH_WORDPAD_INCHES 1027

Definition at line 36 of file helpids.h.

#define IDH_WORDPAD_INDENT_FIRST 1022

Definition at line 28 of file helpids.h.

#define IDH_WORDPAD_INDENT_LEFT 1020

Definition at line 26 of file helpids.h.

#define IDH_WORDPAD_INDENT_RIGHT 1021

Definition at line 27 of file helpids.h.

#define IDH_WORDPAD_LEFTMARGIN 1037

Definition at line 48 of file helpids.h.

#define IDH_WORDPAD_OPTIONS_AUTOWORDSEL 1019

Definition at line 24 of file helpids.h.

#define IDH_WORDPAD_PICAS 1030

Definition at line 39 of file helpids.h.

#define IDH_WORDPAD_POINTS 1029

Definition at line 38 of file helpids.h.

#define IDH_WORDPAD_RIGHTMARGIN 1038

Definition at line 49 of file helpids.h.

#define IDH_WORDPAD_TAB_CLEARALL 1006

Definition at line 17 of file helpids.h.

#define IDH_WORDPAD_TABCLEAR 1005

Definition at line 16 of file helpids.h.

#define IDH_WORDPAD_TABSET 1004

Definition at line 15 of file helpids.h.

#define IDH_WORDPAD_TABSTOPS 1007

Definition at line 18 of file helpids.h.

#define IDH_WORDPAD_TEXTFILE 1008

Definition at line 19 of file helpids.h.

#define IDH_WORDPAD_TIMEDATE 1001

Definition at line 12 of file helpids.h.

#define IDH_WORDPAD_TOPMARGIN 1035

Definition at line 46 of file helpids.h.

#define IDH_WORDPAD_WORD6FILE 1017

Definition at line 22 of file helpids.h.

#define IDH_WORDPAD_WRAP_NO 1023

Definition at line 30 of file helpids.h.

#define IDH_WORDPAD_WRAP_RULER 1025

Definition at line 32 of file helpids.h.

#define IDH_WORDPAD_WRAP_WINDOW 1024

Definition at line 31 of file helpids.h.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ipframe.cpp File Reference

  • vc2008fp
  • WordPad
Defines | Variables

ipframe.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "formatba.h"
#include "ruler.h"
#include "ipframe.h"
#include "wordpdoc.h"
#include "wordpvw.h"

Go to the source code of this file.

Defines

#define | NUM_PEN_ITEMS 7
#define | NUM_PEN_TOGGLE 5

Variables

const UINT | uiMenuBarId = AFX_IDW_CONTROLBAR_FIRST + 20

Define Documentation

#define NUM_PEN_ITEMS 7

Definition at line 72 of file ipframe.cpp.

#define NUM_PEN_TOGGLE 5

Definition at line 73 of file ipframe.cpp.

Variable Documentation

const UINT uiMenuBarId = AFX_IDW_CONTROLBAR_FIRST + 20

Definition at line 27 of file ipframe.cpp.

Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ipframe.h File Reference

  • vc2008fp
  • WordPad
Classes

ipframe.h File Reference

Go to the source code of this file.

Classes

class | CInPlaceFrame
class | CWordPadResizeBar
Generated on Sat Nov 23 2024 17:00:43 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/key.cpp File Reference

  • vc2008fp
  • WordPad

key.cpp File Reference

#include "stdafx.h"
#include "key.h"
#include <winreg.h>

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/key.h File Reference

  • vc2008fp
  • WordPad
Classes

key.h File Reference

Go to the source code of this file.

Classes

class CKey
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/listdlg.cpp File Reference

  • vc2008fp
  • WordPad

listdlg.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "listdlg.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/listdlg.h File Reference

  • vc2008fp
  • WordPad
Classes

listdlg.h File Reference

Go to the source code of this file.

Classes

class CListDlg
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/mainfrm.cpp File Reference

  • vc2008fp
  • WordPad
Variables

mainfrm.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "mainfrm.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "strings.h"

Go to the source code of this file.

Variables

const int | iMaxUserToolbars = 10
const UINT | uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40
const UINT | uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Variable Documentation

const int iMaxUserToolbars = 10

Definition at line 27 of file mainfrm.cpp.

const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40

Definition at line 29 of file mainfrm.cpp.

const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1

Definition at line 30 of file mainfrm.cpp.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/MainFrm.h File Reference

  • vc2008fp
  • WordPad
Classes

MainFrm.h File Reference

#include "formatba.h"
#include "ruler.h"
#include "taskpane.h"

Go to the source code of this file.

Classes

class CMainFrame
Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/mswd6_32.h File Reference

  • vc2008fp
  • WordPad
Typedefs | Functions

mswd6_32.h File Reference

Go to the source code of this file.

Typedefs

typedef unsigned long(pascal * | PFN_RTF_CALLBACK )(int, int)

Functions

int pascal | ForeignToRtf32 (HANDLE, void *, HANDLE, HANDLE, HANDLE, PFN_RTF_CALLBACK)
int pascal | InitConverter32 (HANDLE, char *)
int pascal | IsFormatCorrect32 (HANDLE, HANDLE)
HANDLE pascal | RegisterApp32 (unsigned long, void *)
int pascal | RtfToForeign32 (HANDLE, LPSTORAGE, HANDLE, HANDLE, PFN_RTF_CALLBACK)

Typedef Documentation

typedef unsigned long(pascal * PFN_RTF_CALLBACK)(int, int)

Definition at line 15 of file mswd6_32.h.

Function Documentation

int pascal ForeignToRtf32 | ( | HANDLE | ,
 |  | void * | ,
 |  | HANDLE | ,
 |  | HANDLE | ,
 |  | HANDLE | ,
 |  | PFN_RTF_CALLBACK |
 | ) |  |
int pascal InitConverter32 | ( | HANDLE | ,
 |  | char * |
 | ) |  |
int pascal IsFormatCorrect32 | ( | HANDLE | ,
 |  | HANDLE |
 | ) |  |
HANDLE pascal RegisterApp32 | ( | unsigned | long,
 |  | void * |
 | ) |  |
int pascal RtfToForeign32 | ( | HANDLE | ,
 |  | LPSTORAGE | ,
 |  | HANDLE | ,
 |  | HANDLE | ,
 |  | PFN_RTF_CALLBACK |
 | ) |  |
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/multconv.cpp File Reference

  • vc2008fp
  • WordPad
Defines

multconv.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "multconv.h"
#include "mswd6_32.h"

Go to the source code of this file.

Defines

#define BUFFSIZE 4096

Define Documentation

#define BUFFSIZE 4096

Definition at line 28 of file multconv.cpp.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/multconv.h File Reference

  • vc2008fp
  • WordPad
Classes

multconv.h File Reference

Go to the source code of this file.

Classes

class | COEMFile
class | CTrackFile
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/options.cpp File Reference

  • vc2008fp
  • WordPad

options.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "strings.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/options.h File Reference

  • vc2008fp
  • WordPad
Classes

options.h File Reference

Go to the source code of this file.

Classes

class | CDocOptions
class | CUnit
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/optionsh.cpp File Reference

  • vc2008fp
  • WordPad

optionsh.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "unitspag.h"
#include "docopt.h"
#include "optionsh.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/optionsh.h File Reference

  • vc2008fp
  • WordPad
Classes

optionsh.h File Reference

Go to the source code of this file.

Classes

class COptionSheet
Generated on Sat Nov 23 2024 17:00:47 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/pageset.cpp File Reference

  • vc2008fp
  • WordPad

pageset.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "resource.h"
#include "pageset.h"
#include "ruler.h"
#include "ddxm.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/pageset.h File Reference

  • vc2008fp
  • WordPad
Classes

pageset.h File Reference

Go to the source code of this file.

Classes

class CPageSetupDlg
Generated on Sat Nov 23 2024 17:00:46 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/resource.h File Reference

  • vc2008fp
  • WordPad
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_BORDER_1 32952
#define | ID_BORDER_10 32961
#define | ID_BORDER_11 32962
#define | ID_BORDER_12 32963
#define | ID_BORDER_13 32964
#define | ID_BORDER_2 32953
#define | ID_BORDER_3 32954
#define | ID_BORDER_4 32955
#define | ID_BORDER_5 32956
#define | ID_BORDER_6 32957
#define | ID_BORDER_7 32958
#define | ID_BORDER_8 32959
#define | ID_BORDER_9 32960
#define | ID_BORDER_TEAROFF 32775
#define | ID_CANCEL_EDIT_CNTR 32768
#define | ID_CANCEL_EDIT_SRVR 32769
#define | ID_CHAR_BOLD 32799
#define | ID_CHAR_COLOR 32801
#define | ID_CHAR_ITALIC 32800
#define | ID_CHAR_UNDERLINE 32802
#define | ID_COLOR_AUTOMATIC 57876
#define | ID_COLOR_TEAROFF 32772
#define | ID_DUMMY 59398
#define | ID_FORMAT_PARAGRAPH 32780
#define | ID_FORMAT_TABS 32781
#define | ID_FREE_TEAROFF1 32773
#define | ID_FREE_TEAROFF2 32774
#define | ID_HELP_FIND 32968
#define | ID_INSERT_BULLET 32777
#define | ID_INSERT_DATE_TIME 32778
#define | ID_OLE_VERB_POPUP 32811
#define | ID_PAGE_SETUP 32771
#define | ID_PARA_CENTER 32804
#define | ID_PARA_LEFT 32803
#define | ID_PARA_RIGHT 32805
#define | ID_PEN_BACKSPACE 32809
#define | ID_PEN_LENS 32813
#define | ID_PEN_NEWLINE 32810
#define | ID_PEN_PERIOD 32807
#define | ID_PEN_SPACE 32808
#define | ID_PEN_TAB 32814
#define | ID_PEN_TOGGLE 32812
#define | ID_VIEW_APP_LOOK 32950
#define | ID_VIEW_CUSTOMIZE 32816
#define | ID_VIEW_FORMATBAR 59396
#define | ID_VIEW_FULL_SCREEN 32965
#define | ID_VIEW_FULLSCREEN 32883
#define | ID_VIEW_OPTIONS 32776
#define | ID_VIEW_RULER 59397
#define | ID_VIEW_TASK_PANE 32886
#define | ID_VIEW_TOOLBARS 32885
#define | ID_VIEW_USER_TOOLBAR1 32819
#define | ID_VIEW_USER_TOOLBAR10 32828
#define | ID_VIEW_USER_TOOLBAR2 32820
#define | ID_VIEW_USER_TOOLBAR3 32821
#define | ID_VIEW_USER_TOOLBAR4 32822
#define | ID_VIEW_USER_TOOLBAR5 32823
#define | ID_VIEW_USER_TOOLBAR6 32824
#define | ID_VIEW_USER_TOOLBAR7 32825
#define | ID_VIEW_USER_TOOLBAR8 32826
#define | ID_VIEW_USER_TOOLBAR9 32827
#define | IDB_BITMAP48 162
#define | IDB_BITMAP_PRINTER 163
#define | IDB_BITMAP_TT 130
#define | IDB_FONTTYPE 167
#define | IDB_FORMATBAR 139
#define | IDB_FORMATBAR_BIG 141
#define | IDB_MAINFRAME_HC 187
#define | IDB_PRINTER 167
#define | IDB_RULER_BLOCK 131
#define | IDB_RULER_BLOCKM 132
#define | IDB_RULER_DOWN 133
#define | IDB_RULER_DOWNM 134
#define | IDB_RULER_TAB 135
#define | IDB_RULER_TABM 136
#define | IDB_RULER_UP 137
#define | IDB_RULER_UPM 138
#define | IDB_TASKS 182
#define | IDB_TASKS_HC 188
#define | IDB_TASKSPANE_TOOLBAR 189
#define | IDC_APP_LOOK1 1012
#define | IDC_APP_LOOK2 1013
#define | IDC_APP_LOOK3 1014
#define | IDC_APPLY 3
#define | IDC_BIGICON 1023
#define | IDC_BOX 1022
#define | IDC_BOXT 1032
#define | IDC_BUTTON_CLEAR 1006
#define | IDC_BUTTON_CLEARALL 1007
#define | IDC_BUTTON_SET 1005
#define | IDC_CHECK_FORMATBAR 1029
#define | IDC_CHECK_RULERBAR 1030
#define | IDC_CHECK_STATUSBAR 1031
#define | IDC_CHECK_TOOLBAR 1028
#define | IDC_COMBO1 1019
#define | IDC_COMBO_ALIGNMENT 111
#define | IDC_COMBO_UNITS 1012
#define | IDC_COMBO_WRAP 1011
#define | IDC_DATEDIALOG_LIST 1018
#define | IDC_EDIT_BM 1005
#define | IDC_EDIT_FIRST_LINE 1002
#define | IDC_EDIT_LEFT 1000
#define | IDC_EDIT_LM 1006
#define | IDC_EDIT_RIGHT 1001
#define | IDC_EDIT_RM 1007
#define | IDC_EDIT_TM 1016
#define | IDC_FONTNAME 165
#define | IDC_FONTSIZE 166
#define | IDC_LISTDIALOG_LIST 1018
#define | IDC_SHOW_AT_STARTUP 1015
#define | IDC_STATIC_HEADING 1009
#define | IDC_STYLE2007 1033
#define | IDC_TEXT_ALIGNMENT 1017
#define | IDC_TEXT_UNITS 1021
#define | IDC_TEXT_WRAP 1020
#define | IDC_UNITS_CM 1025
#define | IDC_UNITS_IN 1024
#define | IDC_UNITS_PI 1027
#define | IDC_UNITS_PT 1026
#define | IDC_WORDSEL 1029
#define | IDC_WRAP_NONE 1027
#define | IDC_WRAP_RULER 1025
#define | IDC_WRAP_WINDOW 1026
#define | IDD_APP_LOOK 180
#define | IDD_DATEDIALOG 151
#define | IDD_FILENEWDIALOG 160
#define | IDD_FORMAT_PARA 143
#define | IDD_FORMAT_TAB 145
#define | IDD_LISTDIALOG 147
#define | IDD_OPTIONS 148
#define | IDD_OPTIONS_MARGINS 160
#define | IDD_OPTIONS_UNITS 158
#define | IDD_OPTIONS_WRAP 159
#define | IDD_PAGE_SETUP_DIALOG 150
#define | IDD_SPLASH 157
#define | IDI_ICON_DOC 154
#define | IDI_ICON_TEXT 165
#define | IDI_ICON_WRITE 155
#define | IDP_FAILED_TO_CREATE 102
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_BORDER_PALETTE 192
#define | IDR_BORDER_TYPE 190
#define | IDR_CNTR_INPLACE 6
#define | IDR_FORMATBAR 139
#define | IDR_FORMATBAR_BIG 141
#define | IDR_MAINFRAME 128
#define | IDR_MAINFRAME1 140
#define | IDR_MAINFRAME1_BIG 143
#define | IDR_MAINFRAME_BIG 142
#define | IDR_MENU1 151
#define | IDR_SRVR_EMBEDDED 5
#define | IDR_SRVR_INPLACE 4
#define | IDR_SRVR_INPLACE_BIG 144
#define | IDR_TEXT_POPUP 152
#define | IDR_TOOLBAR_IMAGES 172
#define | IDR_TOOLBAR_IMAGES_BIG 173
#define | IDR_TOOLBAR_IMAGES_HC 186
#define | IDS_ABOUT_INFO 194
#define | IDS_ALL_DOC 132
#define | IDS_CANT_LOAD 179
#define | IDS_CENTER 117
#define | IDS_CENTIMETERS 123
#define | IDS_CLIP_FILENAME 139
#define | IDS_CLIP_RTF 114
#define | IDS_CLIP_TEXT 138
#define | IDS_CLOSE_TEXT 107
#define | IDS_CM_ABBREV 173
#define | IDS_COMPLETE 105
#define | IDS_DEFAULTFONT 109
#define | IDS_DEFAULTTEXTFONT 111
#define | IDS_DIRFULL 181
#define | IDS_DT1 149
#define | IDS_DT10 158
#define | IDS_DT11 159
#define | IDS_DT12 160
#define | IDS_DT13 161
#define | IDS_DT2 150
#define | IDS_DT3 151
#define | IDS_DT4 152
#define | IDS_DT5 153
#define | IDS_DT6 154
#define | IDS_DT7 155
#define | IDS_DT8 156
#define | IDS_DT9 157
#define | IDS_EMBEDDED_OPTIONS 188
#define | IDS_ERRSPACE 178
#define | IDS_EXE_DOC 135
#define | IDS_FILE_EXISTS 136
#define | IDS_FINISHED_SEARCH 164
#define | IDS_FORMATTING 115
#define | IDS_INCH1_ABBREV 169
#define | IDS_INCH2_ABBREV 170
#define | IDS_INCH3_ABBREV 171
#define | IDS_INCH4_ABBREV 172
#define | IDS_INCHES 122
#define | IDS_INVALID_FONTSIZE 121
#define | IDS_INVALID_MEASUREMENT 103
#define | IDS_INVALID_NUMBER 120
#define | IDS_LEFT 116
#define | IDS_MAPI_FAIL 177
#define | IDS_MAPILOAD_FAILED 137
#define | IDS_MEASUREMENT_RANGE 119
#define | IDS_NOMORETABS 176
#define | IDS_NOWRAP 119
#define | IDS_OEMTEXT_DOC 137
#define | IDS_OPTIONS 186
#define | IDS_PICA_ABBREV 175
#define | IDS_PICAS 125
#define | IDS_PLEASE_WAIT 104
#define | IDS_POINT_ABBREV 174
#define | IDS_POINTS 124
#define | IDS_RICHED_LOAD_FAIL 108
#define | IDS_RICHTEXT_DOC 130
#define | IDS_RIGHT 118
#define | IDS_RTF_DOCUMENT 190
#define | IDS_RTF_OPTIONS 184
#define | IDS_SAVE_FORMAT 113
#define | IDS_SAVE_FORMAT_TEXT 112
#define | IDS_SAVE_UNSUPPORTED 106
#define | IDS_SAVING 113
#define | IDS_SHAREVIOLATION 182
#define | IDS_TEXT_DOC 129
#define | IDS_TEXT_DOCUMENT 189
#define | IDS_TEXT_OPTIONS 183
#define | IDS_TF_BUTTONS 110
#define | IDS_TITLE_FORMATBAR 167
#define | IDS_TITLE_MENUBAR 193
#define | IDS_TITLE_TOOLBAR 168
#define | IDS_TOOMANYFILES 180
#define | IDS_WINWORD2_DOC 134
#define | IDS_WINWORD6_DOC 133
#define | IDS_WORD6_DOCUMENT 191
#define | IDS_WORD6_OPTIONS 185
#define | IDS_WORD6_WARNING 126
#define | IDS_WORD6_WARNING_BUTTONS 127
#define | IDS_WRAPTORULER 121
#define | IDS_WRAPTOWINDOW 120
#define | IDS_WRITE_DOC 131
#define | IDS_WRITE_OPTIONS 187
#define | IDS_WRITEPROTECT 192
#define | IDS_WRONG_DISPLAY_SETTINGS 195

Define Documentation

#define ID_BORDER_1 32952

Definition at line 227 of file resource.h.

#define ID_BORDER_10 32961

Definition at line 236 of file resource.h.

#define ID_BORDER_11 32962

Definition at line 237 of file resource.h.

#define ID_BORDER_12 32963

Definition at line 238 of file resource.h.

#define ID_BORDER_13 32964

Definition at line 239 of file resource.h.

#define ID_BORDER_2 32953

Definition at line 228 of file resource.h.

#define ID_BORDER_3 32954

Definition at line 229 of file resource.h.

#define ID_BORDER_4 32955

Definition at line 230 of file resource.h.

#define ID_BORDER_5 32956

Definition at line 231 of file resource.h.

#define ID_BORDER_6 32957

Definition at line 232 of file resource.h.

#define ID_BORDER_7 32958

Definition at line 233 of file resource.h.

#define ID_BORDER_8 32959

Definition at line 234 of file resource.h.

#define ID_BORDER_9 32960

Definition at line 235 of file resource.h.

#define ID_BORDER_TEAROFF 32775

Definition at line 191 of file resource.h.

#define ID_CANCEL_EDIT_CNTR 32768

Definition at line 185 of file resource.h.

#define ID_CANCEL_EDIT_SRVR 32769

Definition at line 186 of file resource.h.

#define ID_CHAR_BOLD 32799

Definition at line 197 of file resource.h.

#define ID_CHAR_COLOR 32801

Definition at line 199 of file resource.h.

#define ID_CHAR_ITALIC 32800

Definition at line 198 of file resource.h.

#define ID_CHAR_UNDERLINE 32802

Definition at line 200 of file resource.h.

#define ID_COLOR_AUTOMATIC 57876

Definition at line 242 of file resource.h.

#define ID_COLOR_TEAROFF 32772

Definition at line 188 of file resource.h.

#define ID_DUMMY 59398

Definition at line 245 of file resource.h.

#define ID_FORMAT_PARAGRAPH 32780

Definition at line 195 of file resource.h.

#define ID_FORMAT_TABS 32781

Definition at line 196 of file resource.h.

#define ID_FREE_TEAROFF1 32773

Definition at line 189 of file resource.h.

#define ID_FREE_TEAROFF2 32774

Definition at line 190 of file resource.h.

#define ID_HELP_FIND 32968

Definition at line 241 of file resource.h.

#define ID_INSERT_BULLET 32777

Definition at line 193 of file resource.h.

#define ID_INSERT_DATE_TIME 32778

Definition at line 194 of file resource.h.

#define ID_OLE_VERB_POPUP 32811

Definition at line 208 of file resource.h.

#define ID_PAGE_SETUP 32771

Definition at line 187 of file resource.h.

#define ID_PARA_CENTER 32804

Definition at line 202 of file resource.h.

#define ID_PARA_LEFT 32803

Definition at line 201 of file resource.h.

#define ID_PARA_RIGHT 32805

Definition at line 203 of file resource.h.

#define ID_PEN_BACKSPACE 32809

Definition at line 206 of file resource.h.

#define ID_PEN_LENS 32813

Definition at line 210 of file resource.h.

#define ID_PEN_NEWLINE 32810

Definition at line 207 of file resource.h.

#define ID_PEN_PERIOD 32807

Definition at line 204 of file resource.h.

#define ID_PEN_SPACE 32808

Definition at line 205 of file resource.h.

#define ID_PEN_TAB 32814

Definition at line 211 of file resource.h.

#define ID_PEN_TOGGLE 32812

Definition at line 209 of file resource.h.

#define ID_VIEW_APP_LOOK 32950

Definition at line 226 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32816

Definition at line 212 of file resource.h.

#define ID_VIEW_FORMATBAR 59396

Definition at line 243 of file resource.h.

#define ID_VIEW_FULL_SCREEN 32965

Definition at line 240 of file resource.h.

#define ID_VIEW_FULLSCREEN 32883

Definition at line 223 of file resource.h.

#define ID_VIEW_OPTIONS 32776

Definition at line 192 of file resource.h.

#define ID_VIEW_RULER 59397

Definition at line 244 of file resource.h.

#define ID_VIEW_TASK_PANE 32886

Definition at line 225 of file resource.h.

#define ID_VIEW_TOOLBARS 32885

Definition at line 224 of file resource.h.

#define ID_VIEW_USER_TOOLBAR1 32819

Definition at line 213 of file resource.h.

#define ID_VIEW_USER_TOOLBAR10 32828

Definition at line 222 of file resource.h.

#define ID_VIEW_USER_TOOLBAR2 32820

Definition at line 214 of file resource.h.

#define ID_VIEW_USER_TOOLBAR3 32821

Definition at line 215 of file resource.h.

#define ID_VIEW_USER_TOOLBAR4 32822

Definition at line 216 of file resource.h.

#define ID_VIEW_USER_TOOLBAR5 32823

Definition at line 217 of file resource.h.

#define ID_VIEW_USER_TOOLBAR6 32824

Definition at line 218 of file resource.h.

#define ID_VIEW_USER_TOOLBAR7 32825

Definition at line 219 of file resource.h.

#define ID_VIEW_USER_TOOLBAR8 32826

Definition at line 220 of file resource.h.

#define ID_VIEW_USER_TOOLBAR9 32827

Definition at line 221 of file resource.h.

#define IDB_BITMAP48 162

Definition at line 99 of file resource.h.

#define IDB_BITMAP_PRINTER 163

Definition at line 100 of file resource.h.

#define IDB_BITMAP_TT 130

Definition at line 44 of file resource.h.

#define IDB_FONTTYPE 167

Definition at line 107 of file resource.h.

#define IDB_FORMATBAR 139

Definition at line 62 of file resource.h.

#define IDB_FORMATBAR_BIG 141

Definition at line 66 of file resource.h.

#define IDB_MAINFRAME_HC 187

Definition at line 133 of file resource.h.

#define IDB_PRINTER 167

Definition at line 106 of file resource.h.

#define IDB_RULER_BLOCK 131

Definition at line 46 of file resource.h.

#define IDB_RULER_BLOCKM 132

Definition at line 48 of file resource.h.

#define IDB_RULER_DOWN 133

Definition at line 50 of file resource.h.

#define IDB_RULER_DOWNM 134

Definition at line 52 of file resource.h.

#define IDB_RULER_TAB 135

Definition at line 53 of file resource.h.

#define IDB_RULER_TABM 136

Definition at line 55 of file resource.h.

#define IDB_RULER_UP 137

Definition at line 57 of file resource.h.

#define IDB_RULER_UPM 138

Definition at line 60 of file resource.h.

#define IDB_TASKS 182

Definition at line 126 of file resource.h.

#define IDB_TASKS_HC 188

Definition at line 135 of file resource.h.

#define IDB_TASKSPANE_TOOLBAR 189

Definition at line 137 of file resource.h.

#define IDC_APP_LOOK1 1012

Definition at line 158 of file resource.h.

#define IDC_APP_LOOK2 1013

Definition at line 159 of file resource.h.

#define IDC_APP_LOOK3 1014

Definition at line 160 of file resource.h.

#define IDC_APPLY 3

Definition at line 5 of file resource.h.

#define IDC_BIGICON 1023

Definition at line 170 of file resource.h.

#define IDC_BOX 1022

Definition at line 169 of file resource.h.

#define IDC_BOXT 1032

Definition at line 183 of file resource.h.

#define IDC_BUTTON_CLEAR 1006

Definition at line 151 of file resource.h.

#define IDC_BUTTON_CLEARALL 1007

Definition at line 153 of file resource.h.

#define IDC_BUTTON_SET 1005

Definition at line 149 of file resource.h.

#define IDC_CHECK_FORMATBAR 1029

Definition at line 179 of file resource.h.

#define IDC_CHECK_RULERBAR 1030

Definition at line 181 of file resource.h.

#define IDC_CHECK_STATUSBAR 1031

Definition at line 182 of file resource.h.

#define IDC_CHECK_TOOLBAR 1028

Definition at line 178 of file resource.h.

#define IDC_COMBO1 1019

Definition at line 166 of file resource.h.

#define IDC_COMBO_ALIGNMENT 111

Definition at line 19 of file resource.h.

#define IDC_COMBO_UNITS 1012

Definition at line 157 of file resource.h.

#define IDC_COMBO_WRAP 1011

Definition at line 156 of file resource.h.

#define IDC_DATEDIALOG_LIST 1018

Definition at line 165 of file resource.h.

#define IDC_EDIT_BM 1005

Definition at line 150 of file resource.h.

#define IDC_EDIT_FIRST_LINE 1002

Definition at line 148 of file resource.h.

#define IDC_EDIT_LEFT 1000

Definition at line 146 of file resource.h.

#define IDC_EDIT_LM 1006

Definition at line 152 of file resource.h.

#define IDC_EDIT_RIGHT 1001

Definition at line 147 of file resource.h.

#define IDC_EDIT_RM 1007

Definition at line 154 of file resource.h.

#define IDC_EDIT_TM 1016

Definition at line 162 of file resource.h.

#define IDC_FONTNAME 165

Definition at line 102 of file resource.h.

#define IDC_FONTSIZE 166

Definition at line 104 of file resource.h.

#define IDC_LISTDIALOG_LIST 1018

Definition at line 164 of file resource.h.

#define IDC_SHOW_AT_STARTUP 1015

Definition at line 161 of file resource.h.

#define IDC_STATIC_HEADING 1009

Definition at line 155 of file resource.h.

#define IDC_STYLE2007 1033

Definition at line 184 of file resource.h.

#define IDC_TEXT_ALIGNMENT 1017

Definition at line 163 of file resource.h.

#define IDC_TEXT_UNITS 1021

Definition at line 168 of file resource.h.

#define IDC_TEXT_WRAP 1020

Definition at line 167 of file resource.h.

#define IDC_UNITS_CM 1025

Definition at line 172 of file resource.h.

#define IDC_UNITS_IN 1024

Definition at line 171 of file resource.h.

#define IDC_UNITS_PI 1027

Definition at line 176 of file resource.h.

#define IDC_UNITS_PT 1026

Definition at line 174 of file resource.h.

#define IDC_WORDSEL 1029

Definition at line 180 of file resource.h.

#define IDC_WRAP_NONE 1027

Definition at line 177 of file resource.h.

#define IDC_WRAP_RULER 1025

Definition at line 173 of file resource.h.

#define IDC_WRAP_WINDOW 1026

Definition at line 175 of file resource.h.

#define IDD_APP_LOOK 180

Definition at line 123 of file resource.h.

#define IDD_DATEDIALOG 151

Definition at line 80 of file resource.h.

#define IDD_FILENEWDIALOG 160

Definition at line 97 of file resource.h.

#define IDD_FORMAT_PARA 143

Definition at line 69 of file resource.h.

#define IDD_FORMAT_TAB 145

Definition at line 72 of file resource.h.

#define IDD_LISTDIALOG 147

Definition at line 73 of file resource.h.

#define IDD_OPTIONS 148

Definition at line 74 of file resource.h.

#define IDD_OPTIONS_MARGINS 160

Definition at line 96 of file resource.h.

#define IDD_OPTIONS_UNITS 158

Definition at line 92 of file resource.h.

#define IDD_OPTIONS_WRAP 159

Definition at line 94 of file resource.h.

#define IDD_PAGE_SETUP_DIALOG 150

Definition at line 76 of file resource.h.

#define IDD_SPLASH 157

Definition at line 90 of file resource.h.

#define IDI_ICON_DOC 154

Definition at line 85 of file resource.h.

#define IDI_ICON_TEXT 165

Definition at line 103 of file resource.h.

#define IDI_ICON_WRITE 155

Definition at line 87 of file resource.h.

#define IDP_FAILED_TO_CREATE 102

Definition at line 10 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 9 of file resource.h.

#define IDR_BORDER_PALETTE 192

Definition at line 142 of file resource.h.

#define IDR_BORDER_TYPE 190

Definition at line 139 of file resource.h.

#define IDR_CNTR_INPLACE 6

Definition at line 8 of file resource.h.

#define IDR_FORMATBAR 139

Definition at line 64 of file resource.h.

#define IDR_FORMATBAR_BIG 141

Definition at line 67 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 41 of file resource.h.

#define IDR_MAINFRAME1 140

Definition at line 65 of file resource.h.

#define IDR_MAINFRAME1_BIG 143

Definition at line 70 of file resource.h.

#define IDR_MAINFRAME_BIG 142

Definition at line 68 of file resource.h.

#define IDR_MENU1 151

Definition at line 78 of file resource.h.

#define IDR_SRVR_EMBEDDED 5

Definition at line 7 of file resource.h.

#define IDR_SRVR_INPLACE 4

Definition at line 6 of file resource.h.

#define IDR_SRVR_INPLACE_BIG 144

Definition at line 71 of file resource.h.

#define IDR_TEXT_POPUP 152

Definition at line 82 of file resource.h.

#define IDR_TOOLBAR_IMAGES 172

Definition at line 113 of file resource.h.

#define IDR_TOOLBAR_IMAGES_BIG 173

Definition at line 115 of file resource.h.

#define IDR_TOOLBAR_IMAGES_HC 186

Definition at line 131 of file resource.h.

#define IDS_ABOUT_INFO 194

Definition at line 144 of file resource.h.

#define IDS_ALL_DOC 132

Definition at line 47 of file resource.h.

#define IDS_CANT_LOAD 179

Definition at line 121 of file resource.h.

#define IDS_CENTER 117

Definition at line 27 of file resource.h.

#define IDS_CENTIMETERS 123

Definition at line 36 of file resource.h.

#define IDS_CLIP_FILENAME 139

Definition at line 63 of file resource.h.

#define IDS_CLIP_RTF 114

Definition at line 24 of file resource.h.

#define IDS_CLIP_TEXT 138

Definition at line 61 of file resource.h.

#define IDS_CLOSE_TEXT 107

Definition at line 15 of file resource.h.

#define IDS_CM_ABBREV 173

Definition at line 114 of file resource.h.

#define IDS_COMPLETE 105

Definition at line 13 of file resource.h.

#define IDS_DEFAULTFONT 109

Definition at line 17 of file resource.h.

#define IDS_DEFAULTTEXTFONT 111

Definition at line 20 of file resource.h.

#define IDS_DIRFULL 181

Definition at line 124 of file resource.h.

#define IDS_DT1 149

Definition at line 75 of file resource.h.

#define IDS_DT10 158

Definition at line 91 of file resource.h.

#define IDS_DT11 159

Definition at line 93 of file resource.h.

#define IDS_DT12 160

Definition at line 95 of file resource.h.

#define IDS_DT13 161

Definition at line 98 of file resource.h.

#define IDS_DT2 150

Definition at line 77 of file resource.h.

#define IDS_DT3 151

Definition at line 79 of file resource.h.

#define IDS_DT4 152

Definition at line 81 of file resource.h.

#define IDS_DT5 153

Definition at line 83 of file resource.h.

#define IDS_DT6 154

Definition at line 84 of file resource.h.

#define IDS_DT7 155

Definition at line 86 of file resource.h.

#define IDS_DT8 156

Definition at line 88 of file resource.h.

#define IDS_DT9 157

Definition at line 89 of file resource.h.

#define IDS_EMBEDDED_OPTIONS 188

Definition at line 134 of file resource.h.

#define IDS_ERRSPACE 178

Definition at line 120 of file resource.h.

#define IDS_EXE_DOC 135

Definition at line 54 of file resource.h.

#define IDS_FILE_EXISTS 136

Definition at line 56 of file resource.h.

#define IDS_FINISHED_SEARCH 164

Definition at line 101 of file resource.h.

#define IDS_FORMATTING 115

Definition at line 25 of file resource.h.

#define IDS_INCH1_ABBREV 169

Definition at line 109 of file resource.h.

#define IDS_INCH2_ABBREV 170

Definition at line 110 of file resource.h.

#define IDS_INCH3_ABBREV 171

Definition at line 111 of file resource.h.

#define IDS_INCH4_ABBREV 172

Definition at line 112 of file resource.h.

#define IDS_INCHES 122

Definition at line 35 of file resource.h.

#define IDS_INVALID_FONTSIZE 121

Definition at line 34 of file resource.h.

#define IDS_INVALID_MEASUREMENT 103

Definition at line 11 of file resource.h.

#define IDS_INVALID_NUMBER 120

Definition at line 32 of file resource.h.

#define IDS_LEFT 116

Definition at line 26 of file resource.h.

#define IDS_MAPI_FAIL 177

Definition at line 119 of file resource.h.

#define IDS_MAPILOAD_FAILED 137

Definition at line 58 of file resource.h.

#define IDS_MEASUREMENT_RANGE 119

Definition at line 30 of file resource.h.

#define IDS_NOMORETABS 176

Definition at line 118 of file resource.h.

#define IDS_NOWRAP 119

Definition at line 29 of file resource.h.

#define IDS_OEMTEXT_DOC 137

Definition at line 59 of file resource.h.

#define IDS_OPTIONS 186

Definition at line 130 of file resource.h.

#define IDS_PICA_ABBREV 175

Definition at line 117 of file resource.h.

#define IDS_PICAS 125

Definition at line 38 of file resource.h.

#define IDS_PLEASE_WAIT 104

Definition at line 12 of file resource.h.

#define IDS_POINT_ABBREV 174

Definition at line 116 of file resource.h.

#define IDS_POINTS 124

Definition at line 37 of file resource.h.

#define IDS_RICHED_LOAD_FAIL 108

Definition at line 16 of file resource.h.

#define IDS_RICHTEXT_DOC 130

Definition at line 43 of file resource.h.

#define IDS_RIGHT 118

Definition at line 28 of file resource.h.

#define IDS_RTF_DOCUMENT 190

Definition at line 138 of file resource.h.

#define IDS_RTF_OPTIONS 184

Definition at line 128 of file resource.h.

#define IDS_SAVE_FORMAT 113

Definition at line 22 of file resource.h.

#define IDS_SAVE_FORMAT_TEXT 112

Definition at line 21 of file resource.h.

#define IDS_SAVE_UNSUPPORTED 106

Definition at line 14 of file resource.h.

#define IDS_SAVING 113

Definition at line 23 of file resource.h.

#define IDS_SHAREVIOLATION 182

Definition at line 125 of file resource.h.

#define IDS_TEXT_DOC 129

Definition at line 42 of file resource.h.

#define IDS_TEXT_DOCUMENT 189

Definition at line 136 of file resource.h.

#define IDS_TEXT_OPTIONS 183

Definition at line 127 of file resource.h.

#define IDS_TF_BUTTONS 110

Definition at line 18 of file resource.h.

#define IDS_TITLE_FORMATBAR 167

Definition at line 105 of file resource.h.

#define IDS_TITLE_MENUBAR 193

Definition at line 143 of file resource.h.

#define IDS_TITLE_TOOLBAR 168

Definition at line 108 of file resource.h.

#define IDS_TOOMANYFILES 180

Definition at line 122 of file resource.h.

#define IDS_WINWORD2_DOC 134

Definition at line 51 of file resource.h.

#define IDS_WINWORD6_DOC 133

Definition at line 49 of file resource.h.

#define IDS_WORD6_DOCUMENT 191

Definition at line 140 of file resource.h.

#define IDS_WORD6_OPTIONS 185

Definition at line 129 of file resource.h.

#define IDS_WORD6_WARNING 126

Definition at line 39 of file resource.h.

#define IDS_WORD6_WARNING_BUTTONS 127

Definition at line 40 of file resource.h.

#define IDS_WRAPTORULER 121

Definition at line 33 of file resource.h.

#define IDS_WRAPTOWINDOW 120

Definition at line 31 of file resource.h.

#define IDS_WRITE_DOC 131

Definition at line 45 of file resource.h.

#define IDS_WRITE_OPTIONS 187

Definition at line 132 of file resource.h.

#define IDS_WRITEPROTECT 192

Definition at line 141 of file resource.h.

#define IDS_WRONG_DISPLAY_SETTINGS 195

Definition at line 145 of file resource.h.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ruler.cpp File Reference

  • vc2008fp
  • WordPad
Defines

ruler.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "ruler.h"
#include "wordpvw.h"
#include "wordpdoc.h"
#include "strings.h"
#include <memory.h>

Go to the source code of this file.

Defines

#define | HEIGHT 17
#define | RULERBARHEIGHT 17

Define Documentation

#define HEIGHT 17

Definition at line 27 of file ruler.cpp.

#define RULERBARHEIGHT 17

Definition at line 28 of file ruler.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ruler.h File Reference

  • vc2008fp
  • WordPad
Classes

ruler.h File Reference

Go to the source code of this file.

Classes

class | CComboRulerItem
class | CRulerBar
class | CRulerItem
class | CTabRulerItem
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/splash.cpp File Reference

  • vc2008fp
  • WordPad
Defines

splash.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"

Go to the source code of this file.

Defines

#define | CX_SHADOW 4
#define | CY_SHADOW 4

Define Documentation

#define CX_SHADOW 4

Definition at line 69 of file splash.cpp.

#define CY_SHADOW 4

Definition at line 68 of file splash.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/splash.h File Reference

  • vc2008fp
  • WordPad
Classes

splash.h File Reference

Go to the source code of this file.

Classes

class | CBigIcon
class | CSplashWnd
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/srvritem.cpp File Reference

  • vc2008fp
  • WordPad
Variables

srvritem.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "srvritem.h"
#include <limits.h>

Go to the source code of this file.

Variables

CLIPFORMAT cfRTF

Variable Documentation

CLIPFORMAT cfRTF

Definition at line 36 of file wordpad.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/srvritem.h File Reference

  • vc2008fp
  • WordPad
Classes

srvritem.h File Reference

Go to the source code of this file.

Classes

class CEmbeddedItem
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/stdafx.cpp File Reference

  • vc2008fp
  • WordPad

stdafx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/stdafx.h File Reference

  • vc2008fp
  • WordPad
Classes | Defines

stdafx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxcmn.h>
#include <afxpriv.h>
#include <afxrich.h>
#include "doctype.h"
#include "chicdial.h"
#include <afxdtctl.h>
#include <afxcontrolbars.h>
#include "targetver.h"

Go to the source code of this file.

Classes

struct | CCharFormat
class | CDisplayIC
struct | CParaFormat

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | HORZ_TEXTOFFSET 15
#define | VC_EXTRALEAN
#define | VERT_TEXTOFFSET 5
#define | WPD_CHARFORMAT CHARFORMAT2
#define | WPD_PARAFORMAT PARAFORMAT2

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 16 of file stdafx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 13 of file stdafx.h.

#define HORZ_TEXTOFFSET 15

Definition at line 31 of file stdafx.h.

#define VC_EXTRALEAN

Definition at line 8 of file stdafx.h.

#define VERT_TEXTOFFSET 5

Definition at line 32 of file stdafx.h.

#define WPD_CHARFORMAT CHARFORMAT2

Definition at line 40 of file stdafx.h.

#define WPD_PARAFORMAT PARAFORMAT2

Definition at line 41 of file stdafx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/strings.cpp File Reference

  • vc2008fp
  • WordPad
Variables

strings.cpp File Reference

#include "stdafx.h"
#include "strings.h"

Go to the source code of this file.

Variables

const TCHAR | szContents [] = _T("Contents")
const TCHAR | szFrameRect [] = _T("FrameRect")
const TCHAR | szIPSection [] = _T("IP")
const TCHAR | szLayout1 [] = _T("Layout2")
const TCHAR | szLayout2 [] = _T("LayoutAux2")
const TCHAR | szMaximized [] = _T("Maximized")
const TCHAR | szPageMargin [] = _T("PageMargin")
const TCHAR | szRegKey [] = _T("Microsoft\\MFC\\Samples")
const TCHAR | szRTFSection [] = _T("RTF")
const TCHAR | szSection [] = _T("Options")
const TCHAR | szSumInfo [] = _T("\005SummaryInformation")
const TCHAR | szTextSection [] = _T("Text")
const TCHAR | szUnits [] = _T("Units")
const char | szWordConverter [] = "MSWD6_32.WPC"
const TCHAR | szWordPadClass [] = _T("WordPadClass")
const TCHAR | szWordSection [] = _T("Word6")
const TCHAR | szWordSel [] = _T("WordSel")
const TCHAR | szWrap [] = _T("Wrap")
const char | szWriteConverter [] = "WRITE32.WPC"
const TCHAR | szWriteSection [] = _T("Write")

Variable Documentation

const TCHAR szContents[] = _T("Contents")

Definition at line 46 of file strings.cpp.

const TCHAR szFrameRect[] = _T("FrameRect")

Definition at line 38 of file strings.cpp.

const TCHAR szIPSection[] = _T("IP")

Definition at line 31 of file strings.cpp.

const TCHAR szLayout1[] = _T("Layout2")

Definition at line 23 of file strings.cpp.

const TCHAR szLayout2[] = _T("LayoutAux2")

Definition at line 24 of file strings.cpp.

const TCHAR szMaximized[] = _T("Maximized")

Definition at line 39 of file strings.cpp.

const TCHAR szPageMargin[] = _T("PageMargin")

Definition at line 33 of file strings.cpp.

const TCHAR szRegKey[] = _T("Microsoft\\MFC\\Samples")

Definition at line 25 of file strings.cpp.

const TCHAR szRTFSection[] = _T("RTF")

Definition at line 28 of file strings.cpp.

const TCHAR szSection[] = _T("Options")

Definition at line 35 of file strings.cpp.

const TCHAR szSumInfo[] = _T("\005SummaryInformation")

Definition at line 41 of file strings.cpp.

const TCHAR szTextSection[] = _T("Text")

Definition at line 27 of file strings.cpp.

const TCHAR szUnits[] = _T("Units")

Definition at line 37 of file strings.cpp.

const char szWordConverter[] = "MSWD6_32.WPC"

Definition at line 43 of file strings.cpp.

const TCHAR szWordPadClass[] = _T("WordPadClass")

Definition at line 22 of file strings.cpp.

const TCHAR szWordSection[] = _T("Word6")

Definition at line 29 of file strings.cpp.

const TCHAR szWordSel[] = _T("WordSel")

Definition at line 36 of file strings.cpp.

const TCHAR szWrap[] = _T("Wrap")

Definition at line 32 of file strings.cpp.

const char szWriteConverter[] = "WRITE32.WPC"

Definition at line 44 of file strings.cpp.

const TCHAR szWriteSection[] = _T("Write")

Definition at line 30 of file strings.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/strings.h File Reference

  • vc2008fp
  • WordPad
Variables

strings.h File Reference

Go to the source code of this file.

Variables

const TCHAR | szContents []
const TCHAR | szDeleteTemp []
const TCHAR | szFrameRect []
const TCHAR | szIPSection []
const TCHAR | szLayout1 []
const TCHAR | szLayout2 []
const TCHAR | szMaximized []
const TCHAR | szPageMargin []
const TCHAR | szRegKey []
const TCHAR | szRTFSection []
const TCHAR | szSection []
const TCHAR | szSumInfo []
const TCHAR | szTextSection []
const TCHAR | szUnits []
const char | szWordConverter []
const TCHAR | szWordPadClass []
const TCHAR | szWordSection []
const TCHAR | szWordSel []
const TCHAR | szWrap []
const char | szWriteConverter []
const TCHAR | szWriteSection []

Variable Documentation

const TCHAR szContents[]

Definition at line 44 of file strings.cpp.

const TCHAR szDeleteTemp[]
const TCHAR szFrameRect[]

Definition at line 36 of file strings.cpp.

const TCHAR szIPSection[]

Definition at line 29 of file strings.cpp.

const TCHAR szLayout1[]

Definition at line 21 of file strings.cpp.

const TCHAR szLayout2[]

Definition at line 22 of file strings.cpp.

const TCHAR szMaximized[]

Definition at line 37 of file strings.cpp.

const TCHAR szPageMargin[]

Definition at line 31 of file strings.cpp.

const TCHAR szRegKey[]

Definition at line 23 of file strings.cpp.

const TCHAR szRTFSection[]

Definition at line 26 of file strings.cpp.

const TCHAR szSection[]

Definition at line 33 of file strings.cpp.

const TCHAR szSumInfo[]

Definition at line 39 of file strings.cpp.

const TCHAR szTextSection[]

Definition at line 25 of file strings.cpp.

const TCHAR szUnits[]

Definition at line 35 of file strings.cpp.

const char szWordConverter[]

Definition at line 41 of file strings.cpp.

const TCHAR szWordPadClass[]

Definition at line 20 of file strings.cpp.

const TCHAR szWordSection[]

Definition at line 27 of file strings.cpp.

const TCHAR szWordSel[]

Definition at line 34 of file strings.cpp.

const TCHAR szWrap[]

Definition at line 30 of file strings.cpp.

const char szWriteConverter[]

Definition at line 42 of file strings.cpp.

const TCHAR szWriteSection[]

Definition at line 28 of file strings.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/targetver.h File Reference

  • vc2008fp
  • WordPad
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/TaskPane.cpp File Reference

  • vc2008fp
  • WordPad

TaskPane.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "TaskPane.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/TaskPane.h File Reference

  • vc2008fp
  • WordPad
Classes

TaskPane.h File Reference

Go to the source code of this file.

Classes

class CTaskPane
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/unitspag.cpp File Reference

  • vc2008fp
  • WordPad

unitspag.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "unitspag.h"
#include "helpids.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/unitspag.h File Reference

  • vc2008fp
  • WordPad
Classes

unitspag.h File Reference

Go to the source code of this file.

Classes

class CUnitsPage
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpad.cpp File Reference

  • vc2008fp
  • WordPad
Defines | Functions | Variables

wordpad.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "mainfrm.h"
#include "ipframe.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "strings.h"
#include "key.h"
#include "filenewd.h"
#include <locale.h>
#include <winnls.h>
#include <winreg.h>
#include "AppLookDlg.h"

Go to the source code of this file.

Defines

#define | NUM_REG_ARGS 8
#define | REGENTRY(key, value) _T(key) _T("\0\0") _T(value)
#define | REGENTRYX(key, valuename, value) _T(key) _T("\0") _T(valuename) _T("\0") _T(value)

Functions

BOOL AFXAPI | AfxFullPath (LPTSTR lpszPathOut, LPCTSTR lpszFileIn)

Variables

CLIPFORMAT | cfEmbeddedObject
CLIPFORMAT | cfRTF
CLIPFORMAT | cfRTO
CWordPadApp theApp

Define Documentation

#define NUM_REG_ARGS 8

Definition at line 732 of file wordpad.cpp.

#define REGENTRY | ( | key,
 |  | value |
 | ) |  | _T(key) _T("\0\0") _T(value)

Definition at line 696 of file wordpad.cpp.

#define REGENTRYX | ( | key,
 |  | valuename,
 |  | value |
 | ) |  | _T(key) _T("\0") _T(valuename) _T("\0") _T(value)

Definition at line 697 of file wordpad.cpp.

Function Documentation

BOOL AFXAPI AfxFullPath | ( | LPTSTR | lpszPathOut,
 |  | LPCTSTR | lpszFileIn
 | ) |  |

Variable Documentation

CLIPFORMAT cfEmbeddedObject

Definition at line 39 of file wordpad.cpp.

CLIPFORMAT cfRTF

Definition at line 40 of file wordpad.cpp.

CLIPFORMAT cfRTO

Definition at line 41 of file wordpad.cpp.

CWordPadApp theApp

Definition at line 127 of file wordpad.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpad.h File Reference

  • vc2008fp
  • WordPad
Classes | Defines | Variables

wordpad.h File Reference

#include "resource.h"
#include "splash.h"
#include "options.h"
#include "afxtempl.h"
#include "resource.h"

Go to the source code of this file.

Classes

class | CWordPadApp
class | CWordPadCommandLineInfo

Defines

#define | WPM_BARSTATE WM_USER

Variables

CWordPadApp theApp

Define Documentation

#define WPM_BARSTATE WM_USER

Definition at line 23 of file wordpad.h.

Variable Documentation

CWordPadApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpdoc.cpp File Reference

  • vc2008fp
  • WordPad
Classes | Defines | Functions

wordpdoc.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "cntritem.h"
#include "srvritem.h"
#include "formatba.h"
#include "mainfrm.h"
#include "ipframe.h"
#include "buttondi.h"
#include "helpids.h"
#include "strings.h"
#include "unitspag.h"
#include "docopt.h"
#include "optionsh.h"
#include "multconv.h"

Go to the source code of this file.

Classes

class | COIPF

Defines

#define | OFN_EXPLORER 0x00080000L

Functions

BOOL AFXAPI | AfxFullPath (LPTSTR lpszPathOut, LPCTSTR lpszFileIn)
UINT AFXAPI | AfxGetFileTitle (LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax)

Define Documentation

#define OFN_EXPLORER 0x00080000L

Definition at line 43 of file wordpdoc.cpp.

Function Documentation

BOOL AFXAPI AfxFullPath | ( | LPTSTR | lpszPathOut,
 |  | LPCTSTR | lpszFileIn
 | ) |  |
UINT AFXAPI AfxGetFileTitle | ( | LPCTSTR | lpszPathName,
 |  | LPTSTR | lpszTitle,
 |  | UINT | nMax
 | ) |  |
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpdoc.h File Reference

  • vc2008fp
  • WordPad
Classes

wordpdoc.h File Reference

Go to the source code of this file.

Classes

class CWordPadDoc
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpvw.cpp File Reference

  • vc2008fp
  • WordPad
Functions | Variables

wordpvw.cpp File Reference

#include "stdafx.h"
#include "wordpad.h"
#include "cntritem.h"
#include "srvritem.h"
#include "wordpdoc.h"
#include "wordpvw.h"
#include "formatta.h"
#include "datedial.h"
#include "formatpa.h"
#include "ruler.h"
#include "strings.h"
#include "pageset.h"

Go to the source code of this file.

Functions

int | roundleast (int n)

Variables

CLIPFORMAT | cfEmbeddedObject
CLIPFORMAT | cfRTO

Function Documentation

int roundleast ( int n ) [inline]

Definition at line 312 of file wordpvw.cpp.

{
  int mod = n%10;
  n -= mod;
  if (mod >= 5)
    n += 10;
  else if (mod <= -5)
    n -= 10;
  return n;
}

Variable Documentation

CLIPFORMAT cfEmbeddedObject

Definition at line 35 of file wordpad.cpp.

CLIPFORMAT cfRTO

Definition at line 37 of file wordpad.cpp.

Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpvw.h File Reference

  • vc2008fp
  • WordPad
Classes

wordpvw.h File Reference

Go to the source code of this file.

Classes

class CWordPadView
Generated on Sat Nov 23 2024 17:00:48 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/ChildFrm.cpp File Reference

  • vc2008fp
  • WorkSpaceToolBar

ChildFrm.cpp File Reference

#include "stdafx.h"
#include "WorkSpaceToolBar.h"
#include "ChildFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/ChildFrm.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Classes | Defines

ChildFrm.h File Reference

Go to the source code of this file.

Classes

class | CChildFrame

Defines

#define | CMDIChildWnd CMDIChildWndEx

Define Documentation

#define CMDIChildWnd CMDIChildWndEx

Definition at line 13 of file ChildFrm.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/MainFrm.cpp File Reference

  • vc2008fp
  • WorkSpaceToolBar

MainFrm.cpp File Reference

#include "stdafx.h"
#include "WorkSpaceToolBar.h"
#include "MainFrm.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/MainFrm.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Classes | Defines

MainFrm.h File Reference

#include "WorkspaceBar.h"

Go to the source code of this file.

Classes

class | CMainFrame

Defines

#define | CMDIFrameWnd CMDIFrameWndEx

Define Documentation

#define CMDIFrameWnd CMDIFrameWndEx

Definition at line 15 of file MainFrm.h.

Generated on Sat Nov 23 2024 17:00:35 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/resource.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Defines

resource.h File Reference

Go to the source code of this file.

Defines

#define | ID_COMMAND_1 32824
#define | ID_COMMAND_2 32825
#define | ID_COMMAND_3 32826
#define | ID_VIEW_CUSTOMIZE 32770
#define | ID_VIEW_TOOLBARS 32771
#define | ID_VIEW_WORKSPACE 32803
#define | ID_WINDOW_MANAGER 32823
#define | IDB_WORKSPACE 147
#define | IDC_COMPANY_URL 1041
#define | IDD_ABOUTBOX 999
#define | IDP_OLE_INIT_FAILED 100
#define | IDR_CONTEXT_MENU 130
#define | IDR_MAINFRAME 128
#define | IDR_POPUP_TOOLBAR 131
#define | IDR_WORKSPACE_TOOLBAR 153
#define | IDR_WORKSPTYPE 129
#define | IDS_MAIN_TOOLBAR 101
#define | IDS_WINDOWS_MANAGER 107

Define Documentation

#define ID_COMMAND_1 32824

Definition at line 20 of file resource.h.

#define ID_COMMAND_2 32825

Definition at line 21 of file resource.h.

#define ID_COMMAND_3 32826

Definition at line 22 of file resource.h.

#define ID_VIEW_CUSTOMIZE 32770

Definition at line 16 of file resource.h.

#define ID_VIEW_TOOLBARS 32771

Definition at line 17 of file resource.h.

#define ID_VIEW_WORKSPACE 32803

Definition at line 18 of file resource.h.

#define ID_WINDOW_MANAGER 32823

Definition at line 19 of file resource.h.

#define IDB_WORKSPACE 147

Definition at line 12 of file resource.h.

#define IDC_COMPANY_URL 1041

Definition at line 15 of file resource.h.

#define IDD_ABOUTBOX 999

Definition at line 14 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 5 of file resource.h.

#define IDR_CONTEXT_MENU 130

Definition at line 10 of file resource.h.

#define IDR_MAINFRAME 128

Definition at line 8 of file resource.h.

#define IDR_POPUP_TOOLBAR 131

Definition at line 11 of file resource.h.

#define IDR_WORKSPACE_TOOLBAR 153

Definition at line 13 of file resource.h.

#define IDR_WORKSPTYPE 129

Definition at line 9 of file resource.h.

#define IDS_MAIN_TOOLBAR 101

Definition at line 6 of file resource.h.

#define IDS_WINDOWS_MANAGER 107

Definition at line 7 of file resource.h.

Generated on Sat Nov 23 2024 17:00:38 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/StdAfx.cpp File Reference

  • vc2008fp
  • WorkSpaceToolBar

StdAfx.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/StdAfx.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Defines

StdAfx.h File Reference

#include "targetver.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxhtml.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxcontrolbars.h>

Go to the source code of this file.

Defines

#define | _AFX_ALL_WARNINGS
#define | _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#define | VC_EXTRALEAN

Define Documentation

#define _AFX_ALL_WARNINGS

Definition at line 20 of file StdAfx.h.

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Definition at line 17 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 12 of file StdAfx.h.

Generated on Sat Nov 23 2024 17:00:39 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/targetver.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Defines

targetver.h File Reference

#include <winsdkver.h>
#include <sdkddkver.h>

Go to the source code of this file.

Defines

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Define Documentation

#define _WIN32_WINNT _WIN32_WINNT_MAXVER

Definition at line 8 of file targetver.h.

Generated on Sat Nov 23 2024 17:00:40 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkspaceBar.cpp File Reference

  • vc2008fp
  • WorkSpaceToolBar

WorkspaceBar.cpp File Reference

#include "stdafx.h"
#include "WorkSpaceToolBar.h"
#include "WorkspaceBar.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkspaceBar.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Classes

WorkspaceBar.h File Reference

Go to the source code of this file.

Classes

class | CWorkspaceBar
class | CWorkspaceToolBar
Generated on Sat Nov 23 2024 17:00:49 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.cpp File Reference

  • vc2008fp
  • WorkSpaceToolBar
Classes | Variables

WorkSpaceToolBar.cpp File Reference

#include "stdafx.h"
#include "WorkSpaceToolBar.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "WorkSpaceToolBarDoc.h"
#include "WorkSpaceToolBarView.h"

Go to the source code of this file.

Classes

class CAboutDlg

Variables

CWorkSpaceToolBarApp theApp

Variable Documentation

CWorkSpaceToolBarApp theApp

Definition at line 50 of file WorkSpaceToolBar.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Classes | Variables

WorkSpaceToolBar.h File Reference

#include "resource.h"

Go to the source code of this file.

Classes

class CWorkSpaceToolBarApp

Variables

CWorkSpaceToolBarApp theApp

Variable Documentation

CWorkSpaceToolBarApp theApp

Definition at line 48 of file collect.cpp.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.cpp File Reference

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBarDoc.cpp File Reference

#include "stdafx.h"
#include "WorkSpaceToolBar.h"
#include "WorkSpaceToolBarDoc.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Classes

WorkSpaceToolBarDoc.h File Reference

Go to the source code of this file.

Classes

class CWorkSpaceToolBarDoc
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.cpp File Reference

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBarView.cpp File Reference

#include "stdafx.h"
#include "WorkSpaceToolBar.h"
#include "WorkSpaceToolBarDoc.h"
#include "WorkSpaceToolBarView.h"

Go to the source code of this file.

Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.h File Reference

  • vc2008fp
  • WorkSpaceToolBar
Classes

WorkSpaceToolBarView.h File Reference

Go to the source code of this file.

Classes

class CWorkSpaceToolBarView
Generated on Sat Nov 23 2024 17:00:50 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Directory Hierarchy

Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • advanced
    • collect
    • cube
    • dllhusk
    • DllScreenCap
      • DllScreenCap
      • ScreenCap
    • mtgdi
    • mtmdi
    • mtrecalc
    • mutexes
    • speakn
  • controls
    • button
    • circ
    • cmnctrl
    • contain
    • IMAGE
    • licensed
    • localize
    • netaddr
    • pal
    • push
    • regsvr
    • spindial
    • testhelp
      • hlp
    • time
    • xlist
  • general
    • clipart
    • CmnCtrl1
    • CmnCtrl2
    • CTaskDialog
    • ctrlbars
    • ctrltest
      • res
    • DBVList
    • diblook
    • dlgcbr32
    • dlgtempl
    • docktool
    • dynamenu
    • FileDlgWatcher
      • FileDlgWatcher
    • hello
    • helloapp
    • ListHdr
    • mdi
    • mdidocvw
    • MMXSwarm
    • modeless
    • multipad
    • npp
    • propdlg
    • rowlist
    • Scribble
    • SimpleImage
    • snapvw
    • spiro
    • tracker
    • VariantUse
    • viewex
  • internet
    • DHtmlExplore
    • HTMLEdit
    • MFCIE
    • Scheduler
  • ole
    • acdual
      • acdualdriv
    • autoclik
      • autodriv
    • calcdriv
    • drawcli
    • hiersvr
    • inproc
    • ipdrive
    • MFCBind
    • mfccalc
    • oclient
    • oleview
      • iviewers
    • superpad
    • TstCon
      • hlp
      • TCProps
    • wordpad
  • utility
    • guidgen
    • makehm
  • vc2008fp
    • CustomPages
    • DesktopAlertDemo
    • DlgToolTips
    • DrawClient
      • DrawClientHandlers
    • DynamicMenu
    • Explorer
    • IEDemo
    • MDITabsDemo
    • MenuSubSet
    • MSMoneyDemo
    • MSOffice2007Demo
    • NewControls
    • OutlookDemo
    • OutlookMultiViews
    • OwnerDrawMenu
    • PaletteDemo
    • PropSheetDemo
    • RebarTest
    • RibbonGadgets
    • RibbonMDI
    • RollupPane
    • SetPaneSize
    • Slider
    • StateCollection
    • StatusBarDemo
    • TabbedView
    • TabControl
    • TasksPane
    • ToolbarDateTimePicker
    • ToolTipDemo
    • TrayMenu
    • VisualStudioDemo
    • WordPad
    • WorkSpaceToolBar
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/ Directory Reference

  • advanced

advanced Directory Reference

Directories

directory | collect
directory | cube
directory | dllhusk
directory | DllScreenCap
directory | mtgdi
directory | mtmdi
directory | mtrecalc
directory | mutexes
directory | speakn
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/ Directory Reference

  • advanced
  • collect

collect Directory Reference

Files

file | collect.cpp [code]
file | collect.h [code]
file | colledoc.cpp [code]
file | colledoc.h [code]
file | collevw.cpp [code]
file | collevw.h [code]
file | dwarryvw.cpp [code]
file | dwarryvw.h [code]
file | intlstvw.cpp [code]
file | intlstvw.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mapdwvw.cpp [code]
file | mapdwvw.h [code]
file | mapssvw.cpp [code]
file | mapssvw.h [code]
file | ptarryvw.cpp [code]
file | ptarryvw.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | strlstvw.cpp [code]
file | strlstvw.h [code]
file | typaryvw.cpp [code]
file | typaryvw.h [code]
file | typlstvw.cpp [code]
file | typlstvw.h [code]
file | typtrmap.cpp [code]
file | typtrmap.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/ Directory Reference

  • advanced
  • cube

cube Directory Reference

Files

file | cube.cpp [code]
file | cube.h [code]
file | cubedoc.cpp [code]
file | cubedoc.h [code]
file | cubeview.cpp [code]
file | cubeview.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/ Directory Reference

  • advanced
  • dllhusk

dllhusk Directory Reference

Files

file | dllhusk.cpp [code]
file | dllhusk.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | testdll1.cpp [code]
file | testdll1.h [code]
file | testdll2.cpp [code]
file | testdll2.h [code]
file | testres1.h [code]
file | testres2.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ Directory Reference

  • advanced
  • DllScreenCap

DllScreenCap Directory Reference

Directories

directory | DllScreenCap
directory | ScreenCap
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/ Directory Reference

  • advanced
  • DllScreenCap
  • DllScreenCap

DllScreenCap Directory Reference

Files

file | ConfigDlg.cpp [code]
file | ConfigDlg.h [code]
file | DllScreenCap.cpp [code]
file | DllScreenCap.h [code]
file | Exports.cpp [code]
file | Resource.h [code]
file | ScreenCapApi.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ Directory Reference

  • advanced
  • DllScreenCap
  • ScreenCap

ScreenCap Directory Reference

Files

file | ChildView.cpp [code]
file | ChildView.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | Resource.h [code]
file | ScreenCap.cpp [code]
file | ScreenCap.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/ Directory Reference

  • advanced
  • mtgdi

mtgdi Directory Reference

Files

file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mtgdi.cpp [code]
file | mtgdi.h [code]
file | mtgdidoc.cpp [code]
file | mtgdidoc.h [code]
file | mtgdivw.cpp [code]
file | mtgdivw.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | threads.cpp [code]
file | threads.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/ Directory Reference

  • advanced
  • mtmdi

mtmdi Directory Reference

Files

file | bounce.cpp [code]
file | bounce.h [code]
file | hello.cpp [code]
file | hello.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mdi.cpp [code]
file | mdi.h [code]
file | mtbounce.cpp [code]
file | mtbounce.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/ Directory Reference

  • advanced
  • mtrecalc

mtrecalc Directory Reference

Files

file | calcthrd.cpp [code]
file | calcthrd.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mtrecalc.cpp [code]
file | mtrecalc.h [code]
file | recalcvw.cpp [code]
file | recalcvw.h [code]
file | recaldoc.cpp [code]
file | recaldoc.h [code]
file | resource.h [code]
file | slowcalc.cpp [code]
file | slowcalc.h [code]
file | speeddlg.cpp [code]
file | speeddlg.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/ Directory Reference

  • advanced
  • mutexes

mutexes Directory Reference

Files

file | mutexdlg.cpp [code]
file | mutexdlg.h [code]
file | mutexes.cpp [code]
file | mutexes.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | threads.cpp [code]
file | threads.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/ Directory Reference

  • advanced
  • speakn

speakn Directory Reference

Files

file | resource.h [code]
file | speakn.cpp [code]
file | speakn.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/ Directory Reference

  • controls

controls Directory Reference

Directories

directory | button
directory | circ
directory | cmnctrl
directory | contain
directory | IMAGE
directory | licensed
directory | localize
directory | netaddr
directory | pal
directory | push
directory | regsvr
directory | spindial
directory | testhelp
directory | time
directory | xlist
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/ Directory Reference

  • controls
  • button

button Directory Reference

Files

file | btnctl.cpp [code]
file | btnctl.h [code]
file | btnppg.cpp [code]
file | btnppg.h [code]
file | button.cpp [code]
file | button.h [code]
file | button.odl [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/ Directory Reference

  • controls
  • circ

circ Directory Reference

Files

file | circ.cpp [code]
file | circ.h [code]
file | circ.odl [code]
file | circctl.cpp [code]
file | circctl.h [code]
file | circppg.cpp [code]
file | circppg.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/ Directory Reference

  • controls
  • cmnctrl

cmnctrl Directory Reference

Files

file | AllControlsSheet.cpp [code]
file | AllControlsSheet.h [code]
file | CmnCtrl3.cpp [code]
file | CmnCtrl3.h [code]
file | CmnCtrl3Dlg.cpp [code]
file | CmnCtrl3Dlg.h [code]
file | CommandLinkCtrlPage.cpp [code]
file | CommandLinkCtrlPage.h [code]
file | NetAddressCtrlPage.cpp [code]
file | NetAddressCtrlPage.h [code]
file | PagerCtrlPage.cpp [code]
file | PagerCtrlPage.h [code]
file | resource.h [code]
file | SplitButtonCtrlPage.cpp [code]
file | SplitButtonCtrlPage.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/ Directory Reference

  • controls
  • contain

contain Directory Reference

Files

file | childfrm.cpp [code]
file | childfrm.h [code]
file | cntritem.cpp [code]
file | cntritem.h [code]
file | contain.cpp [code]
file | contain.h [code]
file | contrdoc.cpp [code]
file | contrdoc.h [code]
file | contrvw.cpp [code]
file | contrvw.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ Directory Reference

  • controls
  • IMAGE

IMAGE Directory Reference

Files

file | bmpprop.cpp [code]
file | bmpprop.h [code]
file | image.cpp [code]
file | image.h [code]
file | image.odl [code]
file | ImageCtl.cpp [code]
file | ImageCtl.h [code]
file | ImagePpg.cpp [code]
file | ImagePpg.h [code]
file | Resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/ Directory Reference

  • controls
  • licensed

licensed Directory Reference

Files

file | licenctl.cpp [code]
file | licenctl.h [code]
file | licenppg.cpp [code]
file | licenppg.h [code]
file | licensed.cpp [code]
file | licensed.h [code]
file | licensed.odl [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/ Directory Reference

  • controls
  • localize

localize Directory Reference

Files

file | localctl.cpp [code]
file | localctl.h [code]
file | localide.odl [code]
file | localifr.odl [code]
file | localize.cpp [code]
file | localize.h [code]
file | localize.odl [code]
file | localppg.cpp [code]
file | localppg.h [code]
file | locresde.cpp [code]
file | locresfr.cpp [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/ Directory Reference

  • controls
  • netaddr

netaddr Directory Reference

Files

file | NetAddrVerifier.cpp [code]
file | NetAddrVerifier.h [code]
file | NetAddrVerifierDlg.cpp [code]
file | NetAddrVerifierDlg.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/ Directory Reference

  • controls
  • pal

pal Directory Reference

Files

file | pal.cpp [code]
file | pal.h [code]
file | pal.odl [code]
file | palctl.cpp [code]
file | palctl.h [code]
file | palppg.cpp [code]
file | palppg.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/ Directory Reference

  • controls
  • push

push Directory Reference

Files

file | push.cpp [code]
file | push.h [code]
file | push.odl [code]
file | pushctl.cpp [code]
file | pushctl.h [code]
file | pushppg.cpp [code]
file | pushppg.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/regsvr/ Directory Reference

  • controls
  • regsvr

regsvr Directory Reference

Files

file | regsvr.cpp [code]
file | resource.h [code]
file | version.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/ Directory Reference

  • controls
  • spindial

spindial Directory Reference

Files

file | resource.h [code]
file | spinctl.cpp [code]
file | spinctl.h [code]
file | spindial.cpp [code]
file | spindial.h [code]
file | spindial.odl [code]
file | spinppg.cpp [code]
file | spinppg.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ Directory Reference

  • controls
  • testhelp

testhelp Directory Reference

Directories

directory | hlp

Files

file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | testhelp.cpp [code]
file | testhelp.h [code]
file | testhelp.odl [code]
file | ThelpCtl.cpp [code]
file | ThelpCtl.h [code]
file | ThelpPpg.cpp [code]
file | ThelpPpg.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/hlp/ Directory Reference

  • controls
  • testhelp
  • hlp

hlp Directory Reference

Files

file popups.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/ Directory Reference

  • controls
  • time

time Directory Reference

Files

file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | time.cpp [code]
file | time.h [code]
file | time.odl [code]
file | timectl.cpp [code]
file | timectl.h [code]
file | timeppg.cpp [code]
file | timeppg.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/ Directory Reference

  • controls
  • xlist

xlist Directory Reference

Files

file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | xlist.cpp [code]
file | xlist.h [code]
file | xlist.odl [code]
file | xlistctl.cpp [code]
file | xlistctl.h [code]
file | xlistppg.cpp [code]
file | xlistppg.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ Directory Reference

  • general

general Directory Reference

Directories

directory | clipart
directory | CmnCtrl1
directory | CmnCtrl2
directory | CTaskDialog
directory | ctrlbars
directory | ctrltest
directory | DBVList
directory | diblook
directory | dlgcbr32
directory | dlgtempl
directory | docktool
directory | dynamenu
directory | FileDlgWatcher
directory | hello
directory | helloapp
directory | ListHdr
directory | mdi
directory | mdidocvw
directory | MMXSwarm
directory | modeless
directory | multipad
directory | npp
directory | propdlg
directory | rowlist
directory | Scribble
directory | SimpleImage
directory | snapvw
directory | spiro
directory | tracker
directory | VariantUse
directory | viewex
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/clipart/ Directory Reference

  • general
  • clipart

clipart Directory Reference

Files

file resource.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/ Directory Reference

  • general
  • CmnCtrl1

CmnCtrl1 Directory Reference

Files

file | animctrl.cpp [code]
file | animctrl.h [code]
file | CmnCtrl1.cpp [code]
file | CmnCtrl1.h [code]
file | DateTime.cpp [code]
file | DateTime.h [code]
file | MonthCal.cpp [code]
file | MonthCal.h [code]
file | mtreectl.cpp [code]
file | mtreectl.h [code]
file | notifwdw.cpp [code]
file | notifwdw.h [code]
file | propsht.cpp [code]
file | propsht.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | toolbar1.cpp [code]
file | toolbar1.h [code]
file | toolbar2.cpp [code]
file | toolbar2.h [code]
file | toolpage.cpp [code]
file | toolpage.h [code]
file | treecpg.cpp [code]
file | treecpg.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/ Directory Reference

  • general
  • CmnCtrl2

CmnCtrl2 Directory Reference

Files

file | CmnCtrl2.cpp [code]
file | CmnCtrl2.h [code]
file | notifwdw.cpp [code]
file | notifwdw.h [code]
file | progctrl.cpp [code]
file | progctrl.h [code]
file | propsht.cpp [code]
file | propsht.h [code]
file | resource.h [code]
file | slidctrl.cpp [code]
file | slidctrl.h [code]
file | spinctrl.cpp [code]
file | spinctrl.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/ Directory Reference

  • general
  • CTaskDialog

CTaskDialog Directory Reference

Files

file | CTaskDialogDemo.cpp [code]
file | CTaskDialogDemo.h [code]
file | CTaskDialogDemoDlg.cpp [code]
file | CTaskDialogDemoDlg.h [code]
file | Resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/ Directory Reference

  • general
  • ctrlbars

ctrlbars Directory Reference

Files

file | ctrlbars.cpp [code]
file | ctrlbars.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | palette.cpp [code]
file | palette.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/ Directory Reference

  • general
  • ctrltest

ctrltest Directory Reference

Directories

directory | res

Files

file | bbutton.cpp [code]
file | ctrltest.cpp [code]
file | ctrltest.h [code]
file | custlist.cpp [code]
file | custmenu.cpp [code]
file | dertest.cpp [code]
file | paredit.cpp [code]
file | paredit.h [code]
file | paredit2.cpp [code]
file | resource.h [code]
file | spintest.cpp [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | subtest.cpp [code]
file | wclstest.cpp [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/res/ Directory Reference

  • general
  • ctrltest
  • res

res Directory Reference

Files

file otherids.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/ Directory Reference

  • general
  • DBVList

DBVList Directory Reference

Files

file | DBVList.cpp [code]
file | DBVList.h [code]
file | DBVListDoc.cpp [code]
file | DBVListDoc.h [code]
file | DBVListSet.cpp [code]
file | DBVListSet.h [code]
file | DBVListView.cpp [code]
file | DBVListView.h [code]
file | EmpView.cpp [code]
file | EmpView.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/ Directory Reference

  • general
  • diblook

diblook Directory Reference

Files

file | dibapi.cpp [code]
file | dibapi.h [code]
file | dibdoc.cpp [code]
file | dibdoc.h [code]
file | diblook.cpp [code]
file | diblook.h [code]
file | dibview.cpp [code]
file | dibview.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | myfile.cpp [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/ Directory Reference

  • general
  • dlgcbr32

dlgcbr32 Directory Reference

Files

file | Aboutdlg.cpp [code]
file | Aboutdlg.h [code]
file | Dlgbars.cpp [code]
file | Dlgbars.h [code]
file | Dlgcbar.cpp [code]
file | Dlgcbar.h [code]
file | Mdlsmain.cpp [code]
file | Mdlsmain.h [code]
file | Modeless.cpp [code]
file | Modeless.h [code]
file | Ratedlg.cpp [code]
file | Ratedlg.h [code]
file | resource.h [code]
file | STDAFX.CPP [code]
file | STDAFX.H [code]
file | Wndlist.cpp [code]
file | Wndlist.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/ Directory Reference

  • general
  • dlgtempl

dlgtempl Directory Reference

Files

file | dlgtemp.cpp [code]
file | dlgtemp.h [code]
file | itemtemp.cpp [code]
file | itemtemp.h [code]
file | resource.h [code]
file | setupdlg.cpp [code]
file | setupdlg.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/ Directory Reference

  • general
  • docktool

docktool Directory Reference

Files

file | dockdoc.cpp [code]
file | dockdoc.h [code]
file | docktool.cpp [code]
file | docktool.h [code]
file | dockvw.cpp [code]
file | dockvw.h [code]
file | editbar.cpp [code]
file | editbar.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | palette.cpp [code]
file | palette.h [code]
file | resource.h [code]
file | searchbx.cpp [code]
file | searchbx.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | tooldlg.cpp [code]
file | tooldlg.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/ Directory Reference

  • general
  • dynamenu

dynamenu Directory Reference

Files

file | coloropt.cpp [code]
file | coloropt.h [code]
file | dmdoc.cpp [code]
file | dmdoc.h [code]
file | dmview.cpp [code]
file | dmview.h [code]
file | dynamenu.cpp [code]
file | dynamenu.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mdichild.cpp [code]
file | mdichild.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/ Directory Reference

  • general
  • FileDlgWatcher

FileDlgWatcher Directory Reference

Directories

directory FileDlgWatcher
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/ Directory Reference

  • general
  • FileDlgWatcher
  • FileDlgWatcher

FileDlgWatcher Directory Reference

Files

file | CustomFileDialog.cpp [code]
file | CustomFileDialog.h [code]
file | FileDlgWatcher.cpp [code]
file | FileDlgWatcher.h [code]
file | FileDlgWatcherDlg.cpp [code]
file | FileDlgWatcherDlg.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/ Directory Reference

  • general
  • hello

hello Directory Reference

Files

file | hello.cpp [code]
file | hello.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/helloapp/ Directory Reference

  • general
  • helloapp

helloapp Directory Reference

Files

file helloapp.cpp [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/ Directory Reference

  • general
  • ListHdr

ListHdr Directory Reference

Files

file | LHdrDlg.cpp [code]
file | LHdrDlg.h [code]
file | ListHdr.cpp [code]
file | ListHdr.h [code]
file | mlistctl.cpp [code]
file | mlistctl.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/ Directory Reference

  • general
  • mdi

mdi Directory Reference

Files

file | bounce.cpp [code]
file | bounce.h [code]
file | hello.cpp [code]
file | hello.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mdi.cpp [code]
file | mdi.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/ Directory Reference

  • general
  • mdidocvw

mdidocvw Directory Reference

Files

file | BncDoc.cpp [code]
file | BncDoc.h [code]
file | BncFrm.cpp [code]
file | BncFrm.h [code]
file | BncVw.cpp [code]
file | BncVw.h [code]
file | HelloDoc.cpp [code]
file | HelloDoc.h [code]
file | HelloFrm.cpp [code]
file | HelloFrm.h [code]
file | HelloVw.cpp [code]
file | HelloVw.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mdi.cpp [code]
file | mdi.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/ Directory Reference

  • general
  • MMXSwarm

MMXSwarm Directory Reference

Files

file | ChildView.cpp [code]
file | ChildView.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MMXSurface.h [code]
file | MMXSurface16.cpp [code]
file | MMXSurface24.cpp [code]
file | MMXSurface32.cpp [code]
file | MMXSwarm.cpp [code]
file | MMXSwarm.h [code]
file | MMXWrapper.h [code]
file | Resource.h [code]
file | SSE2Surface.h [code]
file | SSE2Surface16.cpp [code]
file | SSE2Surface24.cpp [code]
file | SSE2Surface32.cpp [code]
file | SSE2Wrapper.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | Surface.cpp [code]
file | Surface.h [code]
file | Swarm.cpp [code]
file | Swarm.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/ Directory Reference

  • general
  • modeless

modeless Directory Reference

Files

file | adderdlg.cpp [code]
file | adderdlg.h [code]
file | modeldlg.cpp [code]
file | modeldlg.h [code]
file | modeless.cpp [code]
file | modeless.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/ Directory Reference

  • general
  • multipad

multipad Directory Reference

Files

file | multipad.cpp [code]
file | multipad.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/ Directory Reference

  • general
  • npp

npp Directory Reference

Files

file | combobar.cpp [code]
file | combobar.h [code]
file | finddlg.cpp [code]
file | finddlg.h [code]
file | gotodlg.cpp [code]
file | gotodlg.h [code]
file | history.cpp [code]
file | history.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | np.cpp [code]
file | np.h [code]
file | npdoc.cpp [code]
file | npdoc.h [code]
file | npview.cpp [code]
file | npview.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/ Directory Reference

  • general
  • propdlg

propdlg Directory Reference

Files

file | colorpge.cpp [code]
file | colorpge.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | minifrm.cpp [code]
file | minifrm.h [code]
file | preview.cpp [code]
file | preview.h [code]
file | propdlg.cpp [code]
file | propdlg.h [code]
file | propsht.cpp [code]
file | propsht.h [code]
file | propsht2.cpp [code]
file | propsht2.h [code]
file | resource.h [code]
file | shapedoc.cpp [code]
file | shapedoc.h [code]
file | shapeobj.cpp [code]
file | shapeobj.h [code]
file | shapesvw.cpp [code]
file | shapesvw.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | stylepge.cpp [code]
file | stylepge.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/ Directory Reference

  • general
  • rowlist

rowlist Directory Reference

Files

file | listvwex.cpp [code]
file | listvwex.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | rlistdoc.cpp [code]
file | rlistdoc.h [code]
file | rlistvw.cpp [code]
file | rlistvw.h [code]
file | rowlist.cpp [code]
file | rowlist.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/ Directory Reference

  • general
  • Scribble

Scribble Directory Reference

Files

file | childfrm.cpp [code]
file | childfrm.h [code]
file | ipframe.cpp [code]
file | ipframe.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | pendlg.cpp [code]
file | PenDlg.h [code]
file | resource.h [code]
file | scribble.cpp [code]
file | scribble.h [code]
file | scribdoc.cpp [code]
file | scribdoc.h [code]
file | scribitm.cpp [code]
file | scribitm.h [code]
file | scribvw.cpp [code]
file | scribvw.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/ Directory Reference

  • general
  • SimpleImage

SimpleImage Directory Reference

Files

file | ChildView.cpp [code]
file | ChildView.h [code]
file | CImage.cpp [code]
file | CImage.h [code]
file | InfoDlg.cpp [code]
file | InfoDlg.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/ Directory Reference

  • general
  • snapvw

snapvw Directory Reference

Files

file | BkfstPg.cpp [code]
file | BkfstPg.h [code]
file | childfrm.cpp [code]
file | childfrm.h [code]
file | DinnerPg.cpp [code]
file | DinnerPg.h [code]
file | LunchPg.cpp [code]
file | LunchPg.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | Snapdoc.cpp [code]
file | snapdoc.h [code]
file | snapps.cpp [code]
file | snapps.h [code]
file | snapview.cpp [code]
file | snapview.h [code]
file | snapvw.cpp [code]
file | snapvw.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/ Directory Reference

  • general
  • spiro

spiro Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | piece.cpp [code]
file | piece.h [code]
file | resource.h [code]
file | spiro.cpp [code]
file | spiro.h [code]
file | spiroDoc.cpp [code]
file | spiroDoc.h [code]
file | spiroView.cpp [code]
file | spiroView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/ Directory Reference

  • general
  • tracker

tracker Directory Reference

Files

file | dialogs.cpp [code]
file | dialogs.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | trackapp.cpp [code]
file | trackapp.h [code]
file | trackdoc.cpp [code]
file | trackdoc.h [code]
file | trackvw.cpp [code]
file | trackvw.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/ Directory Reference

  • general
  • VariantUse

VariantUse Directory Reference

Files

file | Resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | VariantUse.cpp [code]
file | VariantUse.h [code]
file | VariantUseDlg.cpp [code]
file | VariantUseDlg.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/ Directory Reference

  • general
  • viewex

viewex Directory Reference

Files

file | enterdlg.cpp [code]
file | enterdlg.h [code]
file | inputvw.cpp [code]
file | inputvw.h [code]
file | maindoc.cpp [code]
file | maindoc.h [code]
file | resource.h [code]
file | simpvw.cpp [code]
file | simpvw.h [code]
file | splitter.cpp [code]
file | splitter.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | viewex.cpp [code]
file | viewex.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/ Directory Reference

  • internet

internet Directory Reference

Directories

directory | DHtmlExplore
directory | HTMLEdit
directory | MFCIE
directory | Scheduler
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/ Directory Reference

  • internet
  • DHtmlExplore

DHtmlExplore Directory Reference

Files

file | DHtmlExplore.cpp [code]
file | DHtmlExplore.h [code]
file | DHtmlExploreDlg.cpp [code]
file | DHtmlExploreDlg.h [code]
file | PropertiesDlg.cpp [code]
file | PropertiesDlg.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/ Directory Reference

  • internet
  • HTMLEdit

HTMLEdit Directory Reference

Files

file | AddressCombo.cpp [code]
file | AddressCombo.h [code]
file | EditToolbar.cpp [code]
file | EditToolbar.h [code]
file | GetURL.cpp [code]
file | GetURL.h [code]
file | HTMLEdDoc.cpp [code]
file | HTMLEdDoc.h [code]
file | htmledit.cpp [code]
file | htmledit.h [code]
file | HTMLEdView.cpp [code]
file | HTMLEdView.h [code]
file | InsertTbl.cpp [code]
file | InsertTbl.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | SourceView.cpp [code]
file | SourceView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/ Directory Reference

  • internet
  • MFCIE

MFCIE Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | mfcie.cpp [code]
file | mfcie.h [code]
file | mfcieDoc.cpp [code]
file | mfcieDoc.h [code]
file | mfcieVw.cpp [code]
file | mfcieVw.h [code]
file | Resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/ Directory Reference

  • internet
  • Scheduler

Scheduler Directory Reference

Files

file | EnterInfoDlg.cpp [code]
file | EnterInfoDlg.h [code]
file | MyScheduler.cpp [code]
file | MyScheduler.h [code]
file | resource.h [code]
file | Scheduler.cpp [code]
file | Scheduler.h [code]
file | SchedulerDlg.cpp [code]
file | SchedulerDlg.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ Directory Reference

  • ole

ole Directory Reference

Directories

directory | acdual
directory | autoclik
directory | calcdriv
directory | drawcli
directory | hiersvr
directory | inproc
directory | ipdrive
directory | MFCBind
directory | mfccalc
directory | oclient
directory | oleview
directory | superpad
directory | TstCon
directory | wordpad
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/ Directory Reference

  • ole
  • acdual

acdual Directory Reference

Directories

directory | acdualdriv

Files

file | aclikdoc.cpp [code]
file | aclikdoc.h [code]
file | aclikvw.cpp [code]
file | aclikvw.h [code]
file | autoclik.cpp [code]
file | autoclik.h [code]
file | autoclik.odl [code]
file | childfrm.cpp [code]
file | childfrm.h [code]
file | clikpnt.cpp [code]
file | clikpnt.h [code]
file | dialogs.cpp [code]
file | dialogs.h [code]
file | initiids.cpp [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mfcdual.cpp [code]
file | mfcdual.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/ Directory Reference

  • ole
  • acdual
  • acdualdriv

acdualdriv Directory Reference

Files

file | autoclik.cpp [code]
file | autoclik.h [code]
file | autoddlg.cpp [code]
file | autoddlg.h [code]
file | autodriv.cpp [code]
file | autodriv.h [code]
file | initiids.cpp [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/ Directory Reference

  • ole
  • autoclik

autoclik Directory Reference

Directories

directory | autodriv

Files

file | aclikdoc.cpp [code]
file | aclikdoc.h [code]
file | aclikvw.cpp [code]
file | aclikvw.h [code]
file | autoclik.cpp [code]
file | autoclik.h [code]
file | autoclik.odl [code]
file | childfrm.cpp [code]
file | childfrm.h [code]
file | clikpnt.cpp [code]
file | clikpnt.h [code]
file | dialogs.cpp [code]
file | dialogs.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/ Directory Reference

  • ole
  • autoclik
  • autodriv

autodriv Directory Reference

Files

file | autoclik.cpp [code]
file | autoclik.h [code]
file | autoddlg.cpp [code]
file | autoddlg.h [code]
file | autodriv.cpp [code]
file | autodriv.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/ Directory Reference

  • ole
  • calcdriv

calcdriv Directory Reference

Files

file | calcdriv.cpp [code]
file | calcdriv.h [code]
file | calctype.cpp [code]
file | calctype.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/ Directory Reference

  • ole
  • drawcli

drawcli Directory Reference

Files

file | cntritem.cpp [code]
file | cntritem.h [code]
file | drawcli.cpp [code]
file | drawcli.h [code]
file | drawdoc.cpp [code]
file | drawdoc.h [code]
file | drawobj.cpp [code]
file | drawobj.h [code]
file | drawtool.cpp [code]
file | drawtool.h [code]
file | drawvw.cpp [code]
file | drawvw.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | propset.cpp [code]
file | propset.h [code]
file | rectdlg.cpp [code]
file | rectdlg.h [code]
file | resource.h [code]
file | splitfrm.cpp [code]
file | splitfrm.h [code]
file | statpage.cpp [code]
file | statpage.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | summinfo.cpp [code]
file | summinfo.h [code]
file | summpage.cpp [code]
file | summpage.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/ Directory Reference

  • ole
  • hiersvr

hiersvr Directory Reference

Files

file | hiersvr.cpp [code]
file | hiersvr.h [code]
file | ipframe.cpp [code]
file | ipframe.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | svrdoc.cpp [code]
file | svrdoc.h [code]
file | svritem.cpp [code]
file | svritem.h [code]
file | svrview.cpp [code]
file | svrview.h [code]
file | zoomdlg.cpp [code]
file | zoomdlg.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/ Directory Reference

  • ole
  • inproc

inproc Directory Reference

Files

file | enumvar.cpp [code]
file | enumvar.h [code]
file | inproc.cpp [code]
file | inproc.h [code]
file | inproc.odl [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | strcoll.cpp [code]
file | strcoll.h [code]
file | varassoc.cpp [code]
file | varassoc.h [code]
file | varmap.cpp [code]
file | varmap.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ Directory Reference

  • ole
  • ipdrive

ipdrive Directory Reference

Files

file | ipdridoc.cpp [code]
file | ipdridoc.h [code]
file | ipdrive.cpp [code]
file | ipdrive.h [code]
file | ipdrivw.cpp [code]
file | ipdrivw.h [code]
file | ipremote.cpp [code]
file | ipremote.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/ Directory Reference

  • ole
  • MFCBind

MFCBind Directory Reference

Files

file | BindDoc.cpp [code]
file | BindDoc.h [code]
file | BindView.cpp [code]
file | BindView.h [code]
file | CntrItem.cpp [code]
file | CntrItem.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MFCBind.cpp [code]
file | MFCBind.h [code]
file | ObjView.cpp [code]
file | ObjView.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/ Directory Reference

  • ole
  • mfccalc

mfccalc Directory Reference

Files

file | calcdlg.cpp [code]
file | calcdlg.h [code]
file | mfccalc.cpp [code]
file | mfccalc.h [code]
file | mfccalc.odl [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/ Directory Reference

  • ole
  • oclient

oclient Directory Reference

Files

file | frame.cpp [code]
file | frame.h [code]
file | maindoc.cpp [code]
file | maindoc.h [code]
file | mainview.cpp [code]
file | mainview.h [code]
file | oclient.cpp [code]
file | oclient.h [code]
file | rectitem.cpp [code]
file | rectitem.h [code]
file | resource.h [code]
file | splitfra.cpp [code]
file | splitfra.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/ Directory Reference

  • ole
  • oleview

oleview Directory Reference

Directories

directory | iviewers

Files

file | doc.cpp [code]
file | doc.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | obj_vw.cpp [code]
file | obj_vw.h [code]
file | oleview.cpp [code]
file | oleview.h [code]
file | regview.cpp [code]
file | regview.h [code]
file | resource.h [code]
file | shadow.cpp [code]
file | shadow.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | util.cpp [code]
file | util.h [code]
file | view.cpp [code]
file | view.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/ Directory Reference

  • ole
  • oleview
  • iviewers

iviewers Directory Reference

Files

file | dataobj.cpp [code]
file | dataobj.h [code]
file | dispatch.cpp [code]
file | dispatch.h [code]
file | guid.cpp [code]
file | iadvsink.cpp [code]
file | iadvsink.h [code]
file | idataobj.cpp [code]
file | idataobj.h [code]
file | iview.h [code]
file | iviewer.cpp [code]
file | iviewer.h [code]
file | iviewers.cpp [code]
file | iviewers.h [code]
file | resource.h [code]
file | shadow.cpp [code]
file | shadow.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | tlblist.cpp [code]
file | tlblist.h [code]
file | tlbodl.cpp [code]
file | tlbodl.h [code]
file | tlbtree.cpp [code]
file | tlbtree.h [code]
file | tree.cpp [code]
file | tree.h [code]
file | typelib.cpp [code]
file | typelib.h [code]
file | util.cpp [code]
file | util.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/ Directory Reference

  • ole
  • superpad

superpad Directory Reference

Files

file | aboutbox.cpp [code]
file | aboutbox.h [code]
file | ipframe.cpp [code]
file | ipframe.h [code]
file | linkitem.cpp [code]
file | linkitem.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | paddoc.cpp [code]
file | paddoc.h [code]
file | padframe.cpp [code]
file | padframe.h [code]
file | paditem.cpp [code]
file | paditem.h [code]
file | padview.cpp [code]
file | padview.h [code]
file | pageset.cpp [code]
file | pageset.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | superpad.cpp [code]
file | superpad.h [code]
file | tabstop.cpp [code]
file | tabstop.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ Directory Reference

  • ole
  • TstCon

TstCon Directory Reference

Directories

directory | hlp
directory | TCProps

Files

file | AProp.Cpp [code]
file | AProp.H [code]
file | APropDg.Cpp [code]
file | APropDg.H [code]
file | BindHost.Cpp [code]
file | BindHost.H [code]
file | ComCatDg.Cpp [code]
file | ComCatDg.H [code]
file | ConInfDg.Cpp [code]
file | ConInfDg.H [code]
file | EvLogPg.Cpp [code]
file | EvLogPg.H [code]
file | ExcepInf.Cpp [code]
file | ExcepInf.H [code]
file | ExtCtl.Cpp [code]
file | ExtCtl.H [code]
file | FeatPg.Cpp [code]
file | FeatPg.H [code]
file | IFacesPg.Cpp [code]
file | IFacesPg.H [code]
file | InsCtlDg.Cpp [code]
file | InsCtlDg.H [code]
file | Log.Cpp [code]
file | Log.H [code]
file | LogDg.Cpp [code]
file | LogDg.H [code]
file | MacroCB.Cpp [code]
file | MacroCB.H [code]
file | MacroDB.Cpp [code]
file | MacroDB.H [code]
file | MacroDg.Cpp [code]
file | MacroDg.H [code]
file | MainFrm.Cpp [code]
file | MainFrm.H [code]
file | MethInfo.Cpp [code]
file | MethInfo.H [code]
file | MethodDg.Cpp [code]
file | MethodDg.H [code]
file | MFileWnd.Cpp [code]
file | MFileWnd.H [code]
file | NewAPDg.Cpp [code]
file | NewAPDg.H [code]
file | OutWndVw.Cpp [code]
file | OutWndVw.H [code]
file | PBagDg.Cpp [code]
file | PBagDg.H [code]
file | PChngPg.Cpp [code]
file | PChngPg.H [code]
file | PEdReqPg.Cpp [code]
file | PEdReqPg.H [code]
file | PropBag.Cpp [code]
file | PropBag.H [code]
file | RegCtlDg.Cpp [code]
file | RegCtlDg.H [code]
file | Resource.H [code]
file | Script.Cpp [code]
file | Script.H [code]
file | ScrMngr.Cpp [code]
file | ScrMngr.H [code]
file | ServPg.Cpp [code]
file | ServPg.H [code]
file | StdAfx.Cpp [code]
file | StdAfx.H [code]
file | TabOrdDg.Cpp [code]
file | TabOrdDg.H [code]
file | targetver.h [code]
file | TCDoc.Cpp [code]
file | TCDoc.H [code]
file | TCItem.Cpp [code]
file | TCItem.H [code]
file | TCSplit.Cpp [code]
file | TCSplit.H [code]
file | TCTrace.Cpp [code]
file | TCTrace.H [code]
file | TCView.Cpp [code]
file | TCView.H [code]
file | TestCon.H [code]
file | TstCon.Cpp [code]
file | TstCon.H [code]
file | TstCon.odl [code]
file | TypeAttr.Cpp [code]
file | TypeAttr.H [code]
file | VarUtils.Cpp [code]
file | VarUtils.H [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/hlp/ Directory Reference

  • ole
  • TstCon
  • hlp

hlp Directory Reference

Files

file popups.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/ Directory Reference

  • ole
  • TstCon
  • TCProps

TCProps Directory Reference

Files

file | Resource.H [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | TCExtPg.Cpp [code]
file | TCExtPg.H [code]
file | TCProps.cpp [code]
file | TCProps.idl [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ Directory Reference

  • ole
  • wordpad

wordpad Directory Reference

Files

file | buttondi.cpp [code]
file | buttondi.h [code]
file | chicdial.cpp [code]
file | chicdial.h [code]
file | cntritem.cpp [code]
file | cntritem.h [code]
file | colorlis.cpp [code]
file | colorlis.h [code]
file | datedial.cpp [code]
file | datedial.h [code]
file | ddxm.cpp [code]
file | ddxm.h [code]
file | docopt.cpp [code]
file | docopt.h [code]
file | doctype.cpp [code]
file | doctype.h [code]
file | filenewd.cpp [code]
file | filenewd.h [code]
file | formatba.cpp [code]
file | formatba.h [code]
file | formatpa.cpp [code]
file | formatpa.h [code]
file | formatta.cpp [code]
file | formatta.h [code]
file | helpids.h [code]
file | ipframe.cpp [code]
file | ipframe.h [code]
file | key.cpp [code]
file | key.h [code]
file | listdlg.cpp [code]
file | listdlg.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | mswd6_32.h [code]
file | multconv.cpp [code]
file | multconv.h [code]
file | options.cpp [code]
file | options.h [code]
file | optionsh.cpp [code]
file | optionsh.h [code]
file | pageset.cpp [code]
file | pageset.h [code]
file | penwin.h [code]
file | resource.h [code]
file | ruler.cpp [code]
file | ruler.h [code]
file | splash.cpp [code]
file | splash.h [code]
file | srvritem.cpp [code]
file | srvritem.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | strings.cpp [code]
file | strings.h [code]
file | unitspag.cpp [code]
file | unitspag.h [code]
file | wordpad.cpp [code]
file | wordpad.h [code]
file | wordpdoc.cpp [code]
file | wordpdoc.h [code]
file | wordpvw.cpp [code]
file | wordpvw.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/ Directory Reference

  • utility

utility Directory Reference

Directories

directory | guidgen
directory | makehm
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/ Directory Reference

  • utility
  • guidgen

guidgen Directory Reference

Files

file | guidgdlg.cpp [code]
file | guidgdlg.h [code]
file | guidgen.cpp [code]
file | guidgen.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/makehm/ Directory Reference

  • utility
  • makehm

makehm Directory Reference

Files

file | makehm.cpp [code]
file | resource.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ Directory Reference

  • vc2008fp

vc2008fp Directory Reference

Directories

directory | CustomPages
directory | DesktopAlertDemo
directory | DlgToolTips
directory | DrawClient
directory | DynamicMenu
directory | Explorer
directory | IEDemo
directory | MDITabsDemo
directory | MenuSubSet
directory | MSMoneyDemo
directory | MSOffice2007Demo
directory | NewControls
directory | OutlookDemo
directory | OutlookMultiViews
directory | OwnerDrawMenu
directory | PaletteDemo
directory | PropSheetDemo
directory | RebarTest
directory | RibbonGadgets
directory | RibbonMDI
directory | RollupPane
directory | SetPaneSize
directory | Slider
directory | StateCollection
directory | StatusBarDemo
directory | TabbedView
directory | TabControl
directory | TasksPane
directory | ToolbarDateTimePicker
directory | ToolTipDemo
directory | TrayMenu
directory | VisualStudioDemo
directory | WordPad
directory | WorkSpaceToolBar
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/ Directory Reference

  • vc2008fp
  • CustomPages

CustomPages Directory Reference

Files

file | CustomPages.cpp [code]
file | CustomPages.h [code]
file | CustomPagesDoc.cpp [code]
file | CustomPagesDoc.h [code]
file | CustomPagesView.cpp [code]
file | CustomPagesView.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MyCustomizationPage.cpp [code]
file | MyCustomizationPage.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/ Directory Reference

  • vc2008fp
  • DesktopAlertDemo

DesktopAlertDemo Directory Reference

Files

file | DesktopAlertDemo.cpp [code]
file | DesktopAlertDemo.h [code]
file | DesktopAlertDemoDlg.cpp [code]
file | DesktopAlertDemoDlg.h [code]
file | IconComboBox.cpp [code]
file | IconComboBox.h [code]
file | MSNDlg.cpp [code]
file | MSNDlg.h [code]
file | MSNVisualManager.cpp [code]
file | MSNVisualManager.h [code]
file | MyAlertDlg.cpp [code]
file | MyAlertDlg.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/ Directory Reference

  • vc2008fp
  • DlgToolTips

DlgToolTips Directory Reference

Files

file | CustomToolTipCtrl.cpp [code]
file | CustomToolTipCtrl.h [code]
file | DlgToolTips.cpp [code]
file | DlgToolTips.h [code]
file | DlgToolTipsDlg.cpp [code]
file | DlgToolTipsDlg.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/ Directory Reference

  • vc2008fp
  • DrawClient

DrawClient Directory Reference

Directories

directory | DrawClientHandlers

Files

file | cntritem.cpp [code]
file | cntritem.h [code]
file | DrawClient.cpp [code]
file | DrawClient.h [code]
file | drawdoc.cpp [code]
file | drawdoc.h [code]
file | drawobj.cpp [code]
file | drawobj.h [code]
file | drawtool.cpp [code]
file | drawtool.h [code]
file | drawvw.cpp [code]
file | drawvw.h [code]
file | LineWeightDlg.cpp [code]
file | LineWeightDlg.h [code]
file | mainfrm.cpp [code]
file | mainfrm.h [code]
file | PropertiesViewBar.cpp [code]
file | PropertiesViewBar.h [code]
file | propset.cpp [code]
file | propset.h [code]
file | rectdlg.cpp [code]
file | rectdlg.h [code]
file | resource.h [code]
file | RibbonListButton.cpp [code]
file | RibbonListButton.h [code]
file | splitfrm.cpp [code]
file | splitfrm.h [code]
file | statpage.cpp [code]
file | statpage.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | summinfo.cpp [code]
file | summinfo.h [code]
file | summpage.cpp [code]
file | summpage.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/ Directory Reference

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawClientHandlers Directory Reference

Files

file | dllmain.cpp [code]
file | dllmain.h [code]
file | DrawClientHandlers.cpp [code]
file | DrawClientHandlers.idl [code]
file | DrawCliLiveIconsHandler.cpp [code]
file | DrawCliLiveIconsHandler.h [code]
file | DrawCliSearchHandler.cpp [code]
file | DrawCliSearchHandler.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/ Directory Reference

  • vc2008fp
  • DynamicMenu

DynamicMenu Directory Reference

Files

file | DynamicMenu.cpp [code]
file | DynamicMenu.h [code]
file | DynamicMenuDoc.cpp [code]
file | DynamicMenuDoc.h [code]
file | DynamicMenuView.cpp [code]
file | DynamicMenuView.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MyMenuBar.cpp [code]
file | MyMenuBar.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ Directory Reference

  • vc2008fp
  • Explorer

Explorer Directory Reference

Files

file | Explorer.cpp [code]
file | Explorer.h [code]
file | ExplorerDoc.cpp [code]
file | ExplorerDoc.h [code]
file | ExplorerView.cpp [code]
file | ExplorerView.h [code]
file | FolderBar.cpp [code]
file | FolderBar.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | Resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/ Directory Reference

  • vc2008fp
  • IEDemo

IEDemo Directory Reference

Files

file | ExplorerBar.cpp [code]
file | ExplorerBar.h [code]
file | FavoritesManager.cpp [code]
file | FavoritesManager.h [code]
file | HistoryObj.cpp [code]
file | HistoryObj.h [code]
file | IEDemo.cpp [code]
file | IEDemo.h [code]
file | IEDemoDoc.cpp [code]
file | IEDemoDoc.h [code]
file | IEDemoView.cpp [code]
file | IEDemoView.h [code]
file | LinkButton.cpp [code]
file | LinkButton.h [code]
file | LinksBar.cpp [code]
file | LinksBar.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | Resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/ Directory Reference

  • vc2008fp
  • MDITabsDemo

MDITabsDemo Directory Reference

Files

file | ChildFrm.cpp [code]
file | ChildFrm.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MDITabsDemo.cpp [code]
file | MDITabsDemo.h [code]
file | MDITabsDemoDoc.cpp [code]
file | MDITabsDemoDoc.h [code]
file | MDITabsDemoView.cpp [code]
file | MDITabsDemoView.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | WorkspaceBar.cpp [code]
file | WorkspaceBar.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ Directory Reference

  • vc2008fp
  • MenuSubSet

MenuSubSet Directory Reference

Files

file | ChildFrm.cpp [code]
file | ChildFrm.h [code]
file | ConfigDlg.cpp [code]
file | ConfigDlg.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MenuSubSet.cpp [code]
file | MenuSubSet.h [code]
file | MenuSubSetDoc.cpp [code]
file | MenuSubSetDoc.h [code]
file | MenuSubSetView.cpp [code]
file | MenuSubSetView.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/ Directory Reference

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemo Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MSMCaptionBar.cpp [code]
file | MSMCaptionBar.h [code]
file | MSMCaptionBarButton.cpp [code]
file | MSMCaptionBarButton.h [code]
file | MSMCategoryBar.cpp [code]
file | MSMCategoryBar.h [code]
file | MSMCategoryBarButton.cpp [code]
file | MSMCategoryBarButton.h [code]
file | MSMDialog.cpp [code]
file | MSMDialog.h [code]
file | MSMLinksBar.cpp [code]
file | MSMLinksBar.h [code]
file | MSMLinksBarButton.cpp [code]
file | MSMLinksBarButton.h [code]
file | MSMMenuBar.cpp [code]
file | MSMMenuBar.h [code]
file | MSMoneyDemo.cpp [code]
file | MSMoneyDemo.h [code]
file | MSMoneyDemoDoc.cpp [code]
file | MSMoneyDemoDoc.h [code]
file | MSMoneyDemoView.cpp [code]
file | MSMoneyDemoView.h [code]
file | MSMTasksPane.cpp [code]
file | MSMTasksPane.h [code]
file | MSMToolBar.cpp [code]
file | MSMToolBar.h [code]
file | MSMVisualManager.cpp [code]
file | MSMVisualManager.h [code]
file | Resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/ Directory Reference

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007Demo Directory Reference

Files

file | CntrItem.cpp [code]
file | CntrItem.h [code]
file | DlgBanner.cpp [code]
file | DlgBanner.h [code]
file | keys.cpp [code]
file | keys.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MSOffice2007Demo.cpp [code]
file | MSOffice2007Demo.h [code]
file | MSOffice2007DemoDoc.cpp [code]
file | MSOffice2007DemoDoc.h [code]
file | MSOffice2007DemoView.cpp [code]
file | MSOffice2007DemoView.h [code]
file | OptionsPage.cpp [code]
file | OptionsPage.h [code]
file | Resource.h [code]
file | ResourcePage.cpp [code]
file | ResourcePage.h [code]
file | RibbonListButton.cpp [code]
file | RibbonListButton.h [code]
file | RibbonTableButton.cpp [code]
file | RibbonTableButton.h [code]
file | RibbonTooltipCtrl.cpp [code]
file | RibbonTooltipCtrl.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | TaskPane.cpp [code]
file | TaskPane.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/ Directory Reference

  • vc2008fp
  • NewControls

NewControls Directory Reference

Files

file | CustomProperties.cpp [code]
file | CustomProperties.h [code]
file | NewControls.cpp [code]
file | NewControls.h [code]
file | NewControlsPropSheet.cpp [code]
file | NewControlsPropSheet.h [code]
file | Page1.cpp [code]
file | Page1.h [code]
file | Page2.cpp [code]
file | Page2.h [code]
file | Page3.cpp [code]
file | Page3.h [code]
file | Page4.cpp [code]
file | Page4.h [code]
file | Page5.cpp [code]
file | Page5.h [code]
file | Page6.cpp [code]
file | Page6.h [code]
file | resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/ Directory Reference

  • vc2008fp
  • OutlookDemo

OutlookDemo Directory Reference

Files

file | AppLookDlg.cpp [code]
file | AppLookDlg.h [code]
file | CalendarBar.cpp [code]
file | CalendarBar.h [code]
file | FolderListBar.cpp [code]
file | FolderListBar.h [code]
file | FolderListPopupWnd.cpp [code]
file | FolderListPopupWnd.h [code]
file | FoldersTree.cpp [code]
file | FoldersTree.h [code]
file | MailBar.cpp [code]
file | MailBar.h [code]
file | MailFrame.cpp [code]
file | MailFrame.h [code]
file | MailView.cpp [code]
file | MailView.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | OutlookDemo.cpp [code]
file | OutlookDemo.h [code]
file | OutlookDemoDoc.cpp [code]
file | OutlookDemoDoc.h [code]
file | OutlookDemoView.cpp [code]
file | OutlookDemoView.h [code]
file | PreviewPane.cpp [code]
file | PreviewPane.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
file | WorkspaceObj.cpp [code]
file | WorkspaceObj.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/ Directory Reference

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViews Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | OutlookMultiViews.cpp [code]
file | OutlookMultiViews.h [code]
file | OutlookMultiViewsDoc.cpp [code]
file | OutlookMultiViewsDoc.h [code]
file | OutlookMultiViewsView.cpp [code]
file | OutlookMultiViewsView.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | View1.cpp [code]
file | View1.h [code]
file | View2.cpp [code]
file | View2.h [code]
file | View3.cpp [code]
file | View3.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/ Directory Reference

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenu Directory Reference

Files

file | LineStyleMenuItem.cpp [code]
file | LineStyleMenuItem.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | OwnerDrawMenu.cpp [code]
file | OwnerDrawMenu.h [code]
file | OwnerDrawMenuDoc.cpp [code]
file | OwnerDrawMenuDoc.h [code]
file | OwnerDrawMenuView.cpp [code]
file | OwnerDrawMenuView.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/ Directory Reference

  • vc2008fp
  • PaletteDemo

PaletteDemo Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | PaletteDemo.cpp [code]
file | PaletteDemo.h [code]
file | PaletteDemoDoc.cpp [code]
file | PaletteDemoDoc.h [code]
file | PaletteDemoView.cpp [code]
file | PaletteDemoView.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | ToolsPalette.cpp [code]
file | ToolsPalette.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/ Directory Reference

  • vc2008fp
  • PropSheetDemo

PropSheetDemo Directory Reference

Files

file | MyPropertyPage1.cpp [code]
file | MyPropertyPage1.h [code]
file | MyPropertySheet.cpp [code]
file | MyPropertySheet.h [code]
file | PropSheetDemo.cpp [code]
file | PropSheetDemo.h [code]
file | PropSheetDemoDlg.cpp [code]
file | PropSheetDemoDlg.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/ Directory Reference

  • vc2008fp
  • RebarTest

RebarTest Directory Reference

Files

file | ChildFrm.cpp [code]
file | ChildFrm.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | RebarTest.cpp [code]
file | RebarTest.h [code]
file | RebarTestDoc.cpp [code]
file | RebarTestDoc.h [code]
file | RebarTestView.cpp [code]
file | RebarTestView.h [code]
file | Resource.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/ Directory Reference

  • vc2008fp
  • RibbonGadgets

RibbonGadgets Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | OutputBar.cpp [code]
file | OutputBar.h [code]
file | resource.h [code]
file | RibbonGadgets.cpp [code]
file | RibbonGadgets.h [code]
file | RibbonGadgetsDoc.cpp [code]
file | RibbonGadgetsDoc.h [code]
file | RibbonGadgetsView.cpp [code]
file | RibbonGadgetsView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/ Directory Reference

  • vc2008fp
  • RibbonMDI

RibbonMDI Directory Reference

Files

file | ChildFrm.cpp [code]
file | ChildFrm.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | OutputBar.cpp [code]
file | OutputBar.h [code]
file | resource.h [code]
file | RibbonMDIDemo.cpp [code]
file | RibbonMDIDemo.h [code]
file | RibbonMDIDemoDoc.cpp [code]
file | RibbonMDIDemoDoc.h [code]
file | RibbonMDIDemoView.cpp [code]
file | RibbonMDIDemoView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | WorkspaceBar.cpp [code]
file | WorkspaceBar.h [code]
file | WorkspaceBar2.cpp [code]
file | WorkspaceBar2.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/ Directory Reference

  • vc2008fp
  • RollupPane

RollupPane Directory Reference

Files

file | InfoBar.cpp [code]
file | infobar.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | Resource.h [code]
file | RollupPane.cpp [code]
file | RollupPane.h [code]
file | RollupPaneDoc.cpp [code]
file | RollupPaneDoc.h [code]
file | RollupPaneView.cpp [code]
file | RollupPaneView.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/ Directory Reference

  • vc2008fp
  • SetPaneSize

SetPaneSize Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | SetPaneSize.cpp [code]
file | SetPaneSize.h [code]
file | SetPaneSizeDoc.cpp [code]
file | SetPaneSizeDoc.h [code]
file | SetPaneSizeView.cpp [code]
file | SetPaneSizeView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | WorkspaceBar.cpp [code]
file | WorkspaceBar.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/ Directory Reference

  • vc2008fp
  • Slider

Slider Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | Slider.cpp [code]
file | Slider.h [code]
file | SliderButton.cpp [code]
file | SliderButton.h [code]
file | SliderDoc.cpp [code]
file | SliderDoc.h [code]
file | SliderView.cpp [code]
file | SliderView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/ Directory Reference

  • vc2008fp
  • StateCollection

StateCollection Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | OutputBar.cpp [code]
file | OutputBar.h [code]
file | resource.h [code]
file | StateCollection.cpp [code]
file | StateCollection.h [code]
file | StateCollectionDoc.cpp [code]
file | StateCollectionDoc.h [code]
file | StateCollectionView.cpp [code]
file | StateCollectionView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | WorkspaceBar.cpp [code]
file | WorkspaceBar.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/ Directory Reference

  • vc2008fp
  • StatusBarDemo

StatusBarDemo Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | StatusBarDemo.cpp [code]
file | StatusBarDemo.h [code]
file | StatusBarDemoDoc.cpp [code]
file | StatusBarDemoDoc.h [code]
file | StatusBarDemoView.cpp [code]
file | StatusBarDemoView.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/ Directory Reference

  • vc2008fp
  • TabbedView

TabbedView Directory Reference

Files

file | ChildFrm.cpp [code]
file | ChildFrm.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | TabbedView.cpp [code]
file | TabbedView.h [code]
file | TabbedViewDoc.cpp [code]
file | TabbedViewDoc.h [code]
file | TabbedViewView.cpp [code]
file | TabbedViewView.h [code]
file | targetver.h [code]
file | View1.cpp [code]
file | View1.h [code]
file | View2.cpp [code]
file | View2.h [code]
file | View3.cpp [code]
file | View3.h [code]
file | View4.cpp [code]
file | View4.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/ Directory Reference

  • vc2008fp
  • TabControl

TabControl Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | TabControl.cpp [code]
file | TabControl.h [code]
file | TabControlDoc.cpp [code]
file | TabControlDoc.h [code]
file | TabControlView.cpp [code]
file | TabControlView.h [code]
file | targetver.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/ Directory Reference

  • vc2008fp
  • TasksPane

TasksPane Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | TaskPane.cpp [code]
file | TaskPane.h [code]
file | TasksPane.cpp [code]
file | TasksPane.h [code]
file | TasksPaneDoc.cpp [code]
file | TasksPaneDoc.h [code]
file | TasksPaneView.cpp [code]
file | TasksPaneView.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ Directory Reference

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePicker Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | ToolbarDateTimePicker.cpp [code]
file | ToolbarDateTimePicker.h [code]
file | ToolbarDateTimePickerDoc.cpp [code]
file | ToolbarDateTimePickerDoc.h [code]
file | ToolbarDateTimePickerView.cpp [code]
file | ToolbarDateTimePickerView.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/ Directory Reference

  • vc2008fp
  • ToolTipDemo

ToolTipDemo Directory Reference

Files

file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | MyToolTipCtrl.cpp [code]
file | MyToolTipCtrl.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | TooltipDemo.cpp [code]
file | TooltipDemo.h [code]
file | TooltipDemoDoc.cpp [code]
file | TooltipDemoDoc.h [code]
file | TooltipDemoView.cpp [code]
file | TooltipDemoView.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/ Directory Reference

  • vc2008fp
  • TrayMenu

TrayMenu Directory Reference

Files

file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | TrayMenu.cpp [code]
file | TrayMenu.h [code]
file | TrayMenuDlg.cpp [code]
file | TrayMenuDlg.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ Directory Reference

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemo Directory Reference

Files

file | AppLookDlg.cpp [code]
file | AppLookDlg.h [code]
file | ChildFrm.cpp [code]
file | ChildFrm.h [code]
file | ClassTreeWnd.cpp [code]
file | ClassTreeWnd.h [code]
file | ClassViewBar.cpp [code]
file | ClassViewBar.h [code]
file | DynamicHelpView.cpp [code]
file | DynamicHelpView.h [code]
file | FileViewBar.cpp [code]
file | FileViewBar.h [code]
file | FindComboBox.cpp [code]
file | FindComboBox.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | OptionsDlg.cpp [code]
file | OptionsDlg.h [code]
file | OptionsPages.cpp [code]
file | OptionsPages.h [code]
file | OutputBar.cpp [code]
file | OutputBar.h [code]
file | OutputView.cpp [code]
file | OutputView.h [code]
file | PropertiesViewBar.cpp [code]
file | PropertiesViewBar.h [code]
file | Resource.h [code]
file | ResourceView.cpp [code]
file | ResourceView.h [code]
file | StartView.cpp [code]
file | StartView.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | targetver.h [code]
file | UndoBar.cpp [code]
file | UndoBar.h [code]
file | UndoListBox.cpp [code]
file | UndoListBox.h [code]
file | VisualStudioDemo.cpp [code]
file | VisualStudioDemo.h [code]
file | VisualStudioDemoDoc.cpp [code]
file | VisualStudioDemoDoc.h [code]
file | VisualStudioDemoView.cpp [code]
file | VisualStudioDemoView.h [code]
file | WatchBar.cpp [code]
file | WatchBar.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ Directory Reference

  • vc2008fp
  • WordPad

WordPad Directory Reference

Files

file | AppLookDlg.cpp [code]
file | AppLookDlg.h [code]
file | buttondi.cpp [code]
file | buttondi.h [code]
file | chicdial.cpp [code]
file | chicdial.h [code]
file | cntritem.cpp [code]
file | cntritem.h [code]
file | datedial.cpp [code]
file | datedial.h [code]
file | ddxm.cpp [code]
file | ddxm.h [code]
file | docopt.cpp [code]
file | docopt.h [code]
file | doctype.cpp [code]
file | doctype.h [code]
file | filenewd.cpp [code]
file | filenewd.h [code]
file | formatba.cpp [code]
file | formatba.h [code]
file | formatpa.cpp [code]
file | formatpa.h [code]
file | formatta.cpp [code]
file | formatta.h [code]
file | helpids.h [code]
file | ipframe.cpp [code]
file | ipframe.h [code]
file | key.cpp [code]
file | key.h [code]
file | listdlg.cpp [code]
file | listdlg.h [code]
file | mainfrm.cpp [code]
file | MainFrm.h [code]
file | mswd6_32.h [code]
file | multconv.cpp [code]
file | multconv.h [code]
file | options.cpp [code]
file | options.h [code]
file | optionsh.cpp [code]
file | optionsh.h [code]
file | pageset.cpp [code]
file | pageset.h [code]
file | resource.h [code]
file | ruler.cpp [code]
file | ruler.h [code]
file | splash.cpp [code]
file | splash.h [code]
file | srvritem.cpp [code]
file | srvritem.h [code]
file | stdafx.cpp [code]
file | stdafx.h [code]
file | strings.cpp [code]
file | strings.h [code]
file | targetver.h [code]
file | TaskPane.cpp [code]
file | TaskPane.h [code]
file | unitspag.cpp [code]
file | unitspag.h [code]
file | wordpad.cpp [code]
file | wordpad.h [code]
file | wordpdoc.cpp [code]
file | wordpdoc.h [code]
file | wordpvw.cpp [code]
file | wordpvw.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/ Directory Reference

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBar Directory Reference

Files

file | ChildFrm.cpp [code]
file | ChildFrm.h [code]
file | MainFrm.cpp [code]
file | MainFrm.h [code]
file | resource.h [code]
file | StdAfx.cpp [code]
file | StdAfx.h [code]
file | targetver.h [code]
file | WorkspaceBar.cpp [code]
file | WorkspaceBar.h [code]
file | WorkSpaceToolBar.cpp [code]
file | WorkSpaceToolBar.h [code]
file | WorkSpaceToolBarDoc.cpp [code]
file | WorkSpaceToolBarDoc.h [code]
file | WorkSpaceToolBarView.cpp [code]
file | WorkSpaceToolBarView.h [code]
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- _ -

  • __IInterfaceViewer__ : iviewers.h
  • __SCHEDULER_H : Scheduler.h
  • _AFX_ALL_WARNINGS : stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h
  • _APS_NEXT_COMMAND_VALUE : resource.h
  • _APS_NEXT_CONTROL_VALUE : resource.h
  • _APS_NEXT_RESOURCE_VALUE : resource.h
  • _APS_NEXT_SYMED_VALUE : resource.h
  • _ATL_APARTMENT_THREADED : StdAfx.h , stdafx.h
  • _ATL_CSTRING_EXPLICIT_CONSTRUCTORS : stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h
  • _ATL_NO_AUTOMATIC_NAMESPACE : StdAfx.h , stdafx.h
  • _AtlModule : TCProps.cpp , dllmain.cpp , dllmain.h
  • _bConsole : regsvr.cpp
  • _bSilent : regsvr.cpp
  • _COM_SMARTPTR_TYPEDEF() : TestCon.H
  • _COUNTOF : util.cpp
  • _DrawReflectedGradient() : MSMVisualManager.cpp
  • _GetFacilityString() : util.cpp
  • _GetFullScodeString() : util.cpp
  • _GetScodeRangeString() : util.cpp
  • _GetScodeString() : util.cpp , util.h , util.cpp
  • _GetSeverityString() : util.cpp
  • _hInstance : regsvr.cpp
  • _MMX_FEATURE_BIT : stdafx.cpp
  • _RGB_H_ : iview.h
  • _SSE2_FEATURE_BIT : stdafx.cpp
  • _StretchBitmap() : MSMVisualManager.cpp
  • _szAppName : regsvr.cpp
  • _szDllRegSvr : regsvr.cpp
  • _szDllUnregSvr : regsvr.cpp
  • _T_HistotyList : IEDemoDoc.h
  • _tlid : spindial.cpp , licensed.h , localize.cpp , localize.h , pal.cpp , pal.h , push.cpp , push.h , spindial.h , testhelp.cpp , testhelp.h , time.h , xlist.cpp , xlist.h , time.cpp , licensed.cpp , circ.cpp , button.cpp , button.h , circ.h , image.cpp , image.h
  • _tmain() : makehm.cpp
  • _WIN32_IE : targetver.h
  • _WIN32_WINDOWS : targetver.h
  • _WIN32_WINNT : targetver.h
  • _WRITE_TAG : tlbodl.cpp
  • _wVerMajor : localize.h , button.cpp , testhelp.cpp , circ.cpp , time.cpp , licensed.cpp , image.cpp , pal.h , pal.cpp , push.cpp , image.h , licensed.h , xlist.h , spindial.h , button.h , xlist.cpp , push.h , testhelp.h , circ.h , localize.cpp , spindial.cpp , time.h
  • _wVerMinor : licensed.cpp , button.cpp , circ.h , push.h , licensed.h , pal.cpp , image.cpp , push.cpp , time.cpp , button.h , spindial.cpp , localize.h , spindial.h , image.h , xlist.h , localize.cpp , pal.h , testhelp.cpp , circ.cpp , xlist.cpp , time.h , testhelp.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Alphabetical List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Class Index

B | C | D | I | L | M | N | P | Q | S | T | V | X | _
B
CDlgToolBar CListDlg COutlookMultiViewsDoc CSnapApp CWndListDlg
BITMAPINFO256 CDlgToolTipsApp CListHdrApp COutlookMultiViewsView CSnapDoc CWordPadApp
Button (ButtonLib) CDlgToolTipsDlg CListHdrDlg COutputBar CSnapPropertySheet CWordPadCntrItem
C
CDllScreenCapApp CListOutputFrame COutputList CSnapView CWordPadCommandLineInfo
C3WaySplitterFrame CDockApp CListViewEx COutputList1 CSourceView CWordPadDoc
CAboutBox CDockDoc CLlama COutputToolBar CSpeakNApp CWordPadResizeBar
CAboutDlg CDockView CLocalComboBox COutputViewBar CSpeakNDlg CWordPadView
CAdderDialog CDocOptions CLocalizeApp COutputWindowLog CSpeedDlg CWorkspaceBar
CAddNodeDlg CDocOptPage CLocalizeCtrl COutputWindowView CSpinCtrlPage CWorkspaceBar2
CAddressBox CDrawApp CLocalizePropPage COwnerDrawDescrProp CSpindialApp CWorkspaceObj
CAddressCombo CDrawClientHandlersApp CLog COwnerDrawMenuApp CSpindialCtrl CWorkspaceToolBar
CAllControlsSheet CDrawClientHandlersModule CLoggingDlg COwnerDrawMenuDoc CSpindialPropPage CWorkSpaceToolBarApp
CAmbientPropertiesDlg CDrawCliLiveIconsHandler CLunchPage COwnerDrawMenuView CSpinEditDlg CWorkSpaceToolBarDoc
CAmbientProperty CDrawCliSearchHandler CMacroComboBox CPadDoc CSpiroApp CWorkSpaceToolBarView
CAnimateCtrlPage CDrawDoc CMacroDialogBar CPadFrame CSpiroDoc CXlistApp
CAppLookDlg CDrawItem CMacroDlg CPadLinkItem CSpiroRect CXlistCtrl
CaptureData CDrawObj CMailBar CPadView CSpiroView CXlistPropPage
CAutoClickApp CDrawObjFriend CMailFrame CPage1 CSplashWnd CZoomDlg
CAutoClickDoc CDrawOleObj CMailView CPage2 CSplitButtonCtrlPage
D
CAutoClickDoc (AutoClik) CDrawPoly CMainDlg CPage3 CSplitFrame DICTENTRY
CAutoClickPoint CDrawRect CMainDoc CPage4 CSplitterFrame DICTENTRYHEADER
CAutoClickPoint (AutoClik) CDrawTool CMainFrame CPage5 CSSE2Surface16Intrinsic DocType
CAutoClickView CDrawView CMainView CPage6 CSSE2Surface24Intrinsic Document (TestContainer98)
CAutoClik CDriveApp CMainWindow CPagerCtrlPage CSSE2Surface32Intrinsic Document (ACDual)
CAutoDrivApp CDriverDlg CMapDWordToMyStructView CPageSetupDlg CSSE2Unsigned16Saturated DrawCliLiveIconsHandler (DrawClientHandlersLib)
CAutoDrivDlg CDriverDoc CMapInfo CPalApp CStandardBar DrawCliSearchHandler (DrawClientHandlersLib)
CBallThread CDriverView CMapStringToStringView CPalCtrl CStartView DynaMenuDef
CBasePiece CDropTargetView CMargueeTaskDialog CPaletteBar CStateCollectionApp
I
CBigIcon CDummyDoc CMDIApp CPaletteDemoApp CStateCollectionDoc IAClick (AutoClik)
CBitmapProperty CDWordArrayView CMdiApp CPaletteDemoDoc CStateCollectionView IAClick (ACDual)
CBkfstPage CDynaMDIChildWnd CMDITabOptions CPaletteDemoView CStatPage IAutoClickPoint (AutoClik)
CBMTest1Dlg CDynaMenuApp CMDITabsDemoApp CPalPropPage CStatusBarDemoApp IAutoClickPoint (ACDual)
CBMTest2Dlg CDynaMenuDoc CMDITabsDemoDoc CParaFormat CStatusBarDemoDoc ICalcDlg (mfccalc)
CBMTest3Dlg CDynaMenuView CMDITabsDemoView CParsedEdit CStatusBarDemoView IDrawCliLiveIconsHandler
CBounceDoc CDynamicHelpViewBar CMenuSubSetApp CParsedEditExported CStringCollect (inproc) IDrawCliSearchHandler
CBounceFrame CDynamicMenuApp CMenuSubSetDoc CPasswordProp CStringCollect IDualAClick (ACDual)
CBounceMDIChildWnd CDynamicMenuDoc CMenuSubSetView CPenWidthsDlg CStringListView IDualAutoClickPoint (ACDual)
CBounceThread CDynamicMenuView CMetaFileWnd CPointArrayView CStroke Image (IMAGELib)
CBounceView CEditBar CMethodDlg CPolyTool CStyleBar INVOKEKIND_ENTRY
CBounceWnd CEditToolbar CMethodInfo CPreviewPane CStylePage IStringCollect (inproc)
CBoundedNumberPairProp CEmbeddedItem CMethodParamInfo CProgCtrlPage CSubEditDlg ITCExtendedControl (TCPropsLib)
CBoundedNumberSubProp CEmbeddedOptPage CMFCBindApp CProgressBarTaskDialog CSummInfo ITestContainer98 (TestContainer98)
CBrightLeader CEmpView CMFCBindCntrItem CPropDlgApp CSummPage ITestContainer98Events (TestContainer98)
CButtonApp CEndWizardDialog CMFCBindDoc CPropertiesDlg CSurface IVariantAssoc (inproc)
CButtonCtrl CEnterDlg CMFCBindView CPropertiesToolBar CSwarm IVariantMap (inproc)
CButtonDialog CEntryInfoDlg CMfcieApp CPropertiesViewBar CTabbedViewApp
L
CButtonPropPage CEnumVariant CMfcieDoc CProperty CTabbedViewDoc Licensed (LicensedLib)
CCalcApp CEventLoggingPage CMfcieView CPropertyBag CTabbedViewView Localize (LocalizeLib)
CCalcDlg CExampleThread CMFCRibbonNumEdit CPropertyBagDlg CTabControlApp
M
CCalcDrivApp CExcepInfo CMFCRibbonNumEditCtrl CPropertyBagItem CTabControlDoc MSOfficeDemoKey
CCalendarBar CExplorerApp CMinSize CPropertyChangesPage CTabControlView
N
CCCalcDlg (mfccalc) CExplorerBar CMMXSurface16Intrinsic CPropertyEditRequestsPage CTabOrderDlg NewControlsPropSheet
CChangeNameDlg CExplorerDoc CMMXSurface24Intrinsic CPropertyEditRequestsPage::CPropertyInfo CTabRulerItem notif_tag
CChangeText CExplorerView CMMXSurface32Intrinsic CPropertySection CTaskDialogTestApp
P
CCharFormat CExtendedControl CMMXSwarmApp CPropertySet CTaskDialogTestDlg Pal (PalLib)
CCheckBoxProp CFavorit CMMXUnsigned16Saturated CPropSheetDemoApp CTaskPane Point (ACDual)
CChildFrame CFavoritesManager CModalShapePropSheet CPropSheetDemoDlg CTasksPaneApp Push (PushLib)
CChildView CFeaturesPage CModelessApp CPropSliderCtrl CTasksPaneDoc
Q
CCImageApp CFigCommand CModelessDialog CPushApp CTasksPaneView QAAMBIENTENTRY
CCircApp CFigure CModelessMain CPushCtrl CTBComboBox
S
CCircCtrl CFileDlgWatcherApp CModelessShapePropSheet CPushPropPage CTCBindHost SHAPE_COLOR
CCircPropPage CFileDlgWatcherDlg CMonthCalPage CRateDlg CTCCommandLineInfo Spindial (SpindialLib)
CClassToolBar CFileLog CMSMCaptionBar CRebarTestApp CTCExtPage
T
CClassTreeWnd CFileNewDialog CMSMCaptionBarButton CRebarTestDoc CTCOptions tagABSTIME
CClassViewBar CFileViewBar CMSMCategoryBar CRebarTestView CTCPropsModule tagANIMATEINFO
CClassViewMenuButton CFileViewToolBar CMSMCategoryBarButton CRecalcApp CTCSplitter tagBOXEDITINFO
CClikPoint CFindComboButton CMSMDialog CRecalcDoc CTestApp tagBOXLAYOUT
CCmnCtrl1App CFindDlg CMSMLinksBar CRecalcThreadInfo CTestContainer98App tagBOXRESULTS
CCmnCtrl2App CFolderBar CMSMLinksBarButton CRecalcView CTestContainer98Doc tagCALBSTRUCT
CCmnCtrl3App CFolderListBar CMSMMenuBar CRectDlg CTestContainer98Item tagCOLUMNSTRUCT
CCmnCtrl3Dlg CFolderListPopupWnd CMSMoneyDemoApp CRectItem CTestContainer98View tagCTLINITBEDIT
CCollectApp CFoldersTree CMSMoneyDemoDoc CRectThread CTesthelpApp tagCTLINITHEDIT
CCollectDoc CFontComboBox CMSMoneyDemoView CRectTool CTesthelpCtrl tagCTLINITIEDIT
CCollectView CFontDesc CMSMTasksPane CRegEntry CTesthelpPropPage tagFORMATIDOFFSET
CColorListBox CFormatBar CMSMToolBar CRegisterControlsDlg CTestWindow tagGUIDE
CColorMenu CFormatMenu CMSMVisualManager CRegistryView CTextDoc tagIMECOLORS
CColorOptDlg CFormatParaDlg CMSNDlg CRemoteCalcDlg CTextView tagINKINGINFO
CColorPage CFormatTabDlg CMSNVisualManager CResourcePage CTheApp tagINPPARAMS
CColorView CGDIThread CMSOffice2007DemoApp CResourceViewBar CThreadApp tagINTERVAL
CComboBoxExProp CGetURL CMSOffice2007DemoCntrItem CRibbonGadgetsApp CThreadDoc tagITEMDATA
CComboRulerItem CGotoDlg CMSOffice2007DemoDoc CRibbonGadgetsDoc CThreadView tagOEM_PENPACKET
CComboToolBar CGuidGenApp CMSOffice2007DemoView CRibbonGadgetsView CTimeApp tagOEMPENINFO
CCommandLinkCtrlPage CGuidGenDlg CMultiPadApp CRibbonListButton CTimeCtrl tagPCMINFO
CComponentCategoriesDlg CHandleSize CMutexesApp CRibbonListFontButton CTimePropPage tagPDEVENT
CConfigDlg CHARHDR CMutexesDlg CRibbonMDIDemoApp CToolBarCtrlPage tagPENDATAHEADER
CContainerApp CHelloApp CMyBrowseEdit CRibbonMDIDemoDoc CToolbarDateTimePickerApp tagPENINFO
CContainerDoc CHelloDoc CMyCustomizationPage CRibbonMDIDemoView CToolbarDateTimePickerDoc tagPENPACKET
CContainerInfoDlg CHelloFrame CMyDialogTemplate CRibbonTableButton CToolbarDateTimePickerView tagPENTIP
CContainerItem CHelloView CMyListBox CRibbonTooltipCtrl CToolbarLabel tagPROPERTYIDOFFSET
CContainerView CHelloWindow CMyListCtrl CRing CToolDlg tagPROPHEADER
CCounterThread CHelloWnd CMyMenuBar CRoamer CToolsPalette tagRC
CCSDialog CHelpToolBar CMyObject CRollupPaneApp CTooltipDemoApp tagRCRESULT
CCSPropertyPage CHierSvrDocTemplate CMyOutlookBar CRollupPaneDoc CTooltipDemoDoc tagRECTL
CCSPropertySheet CHistoryList CMyPopupDlg CRollupPaneView CTooltipDemoView tagRECTOFS
CCtrlbarsApp CHistoryObj CMyPropertyPage1 CRowListApp CTrackerApp tagSECTIONHEADER
CCubeApp CHTMLEdDoc CMyPropertyPage2 CRowListDoc CTrackerDoc tagSTRKFMT
CCubeDoc CHTMLEditApp CMyPropertyPage3 CRowListView CTrackerView tagSTROKEINFO
CCubeView CHTMLEdView CMyPropertyPage4 CRulerBar CTrackFile tagSYC
CCustListDlg CHueLeader CMyPropertySheet CRulerItem CTrayMenuApp tagSYE
CCustomDlgProp CHuskApp CMyScheduler CSchedulerApp CTrayMenuDlg tagSYG
CCustomEditListBox CIconCombo CMyStruct CSchedulerDlg CTreeCtrlPage tagTARGET
CCustomFileDialog CIconComboBox CMyToolTipCtrl CScreenCapApp CTreeItem tagTARGINFO
CCustomList CIconListProp CMyTreeCtrl CScribbleApp CTwoButtonsProp tagVS_VERSION
CCustomPagesApp CIDataObjectDlg CNetAddressCtrlPage CScribbleDoc CTypedPtrArrayView TCExtPage (TCPropsLib)
CCustomPagesDoc CIEDemoApp CNetAddrVerifierApp CScribbleItem CTypedPtrListView Testhelp (TESTHELPLib)
CCustomPagesView CIEDemoDoc CNetAddrVerifierDlg CScribbleView CTypedPtrMapView Time (TimeLib)
CCustomSliderCtrl CIEDemoView CNewAmbientPropertyDlg CScript CTypeLibListView
V
CCustomToolTipCtrl CImageApp CNewControlsApp CScriptManager CTypeLibODLView VARTYPE_ENTRY
CDataObjectDlg CImageCtrl CNextWizardDialog CSearchBox CTypeLibTreeView
X
CDataObjectViewer CImagePropPage CNotepadApp CSelectTool CTypeLibViewer CRibbonListFontButton::XItem
CDateDialog CImpIAdviseSink CNotepadDoc CServerApp CTypeLibWnd Xlist (XlistLib)
CDateTimePage CInfoBar CNotepadView CServerDC CUndoBar CDrawView::XPreviewStateItem
CDBVListApp CInfoDlg CNotifyShowCase CServerDoc CUndoButton CMainFrame::XStyle
CDBVListDoc CInPlaceFrame CNullLog CServerItem CUndoListBox
_
CDBVListSet CInProcApp CObjectData CServerNode CUndoMenu _DButton (ButtonLib)
CDBVListView CInputView CObjListView CServerView CUnit _DButtonEvents (ButtonLib)
CDebugLog CInsertControlDlg CObjTreeView CServicesPage CUnitsPage _DCirc (CircLib)
CDemoOptionsPage CInsertTableDlg COEMFile CSetPaneSizeApp CVariantAssoc (inproc) _DCircEvents (CircLib)
CDemoOptionsPropSheet CInterfaceInfo COIPF CSetPaneSizeDoc CVariantAssoc _DImage (IMAGELib)
CDerEditDlg CInterfacesPage COle2ViewApp CSetPaneSizeView CVariantMap (inproc) _DImageEvents (IMAGELib)
CDesktopAlertDemoApp CInterfaceViewer COle2ViewDoc CSetTabStops CVariantMap _DLicensed (LicensedLib)
CDesktopAlertDemoDlg CIntListView COleClientApp CShape CVarUseApp _DLicensedEvents (LicensedLib)
CDHtmlExploreApp Circ (CircLib) COlePropertiesEx CShapePreviewWnd CVarUseDlg _DLocalize (LocalizeLib)
CDHtmlExploreDlg CItemData ColourTableEntry CShapePropSheetFrame CVector _DLocalizeEvents (LocalizeLib)
CDialogItem CItemIcons COnCmdMsg CShapesDoc CView1 _DPal (PalLib)
CDibDoc CIViewersApp COptionsDlg CShapesView CView2 _DPalEvents (PalLib)
CDibLookApp CKey COptionSheet CShellTreeCtrl CView3 _DPush (PushLib)
CDibView CLeader COptionsPage1 CSizeComboBox CView4 _DPushEvents (PushLib)
CDinnerPage CLicensedApp COptionsPage12 CSliderApp CViewExApp _DSpindial (SpindialLib)
CDispatchDlg CLicensedCtrl COptionsPage21 CSliderButton CViewExSplitWnd _DSpindialEvents (SpindialLib)
CDispatchViewer CLicensedPropPage COptionsPage22 CSliderCtrlPage CVisualStudioDemoApp _DTesthelp (TESTHELPLib)
CDisplayIC CLineFile COptionsPage31 CSliderDoc CVisualStudioDemoDoc _DTesthelpEvents (TESTHELPLib)
CDisplayThread CLineStyleMenuItem COptionsPage32 CSliderProp CVisualStudioDemoView _DTime (TimeLib)
CDlgBanner CLineThread COutlookDemoApp CSliderView CWatchBar _DTimeEvents (TimeLib)
CDlgStatusBar CLineWeightDlg COutlookDemoDoc CSmartFuncDesc CWclsEditDlg _DXlist (XlistLib)
CDlgtempApp CLinkButton COutlookDemoView CSmartTypeAttr CWheel _DXlistEvents (XlistLib)
CDlgtempDlg CLinksBar COutlookMultiViewsApp CSmartVarDesc CWizardDialog
B | C | D | I | L | M | N | P | Q | S | T | V | X | _
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- k -

  • Kick() : CLlama
  • KillThread() : CGDIThread
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- l -

  • left : tagRECTL
  • lExInfo : tagPDEVENT
  • LimitText() : CLocalComboBox
  • lindex : CTestContainer98Item
  • line : CDrawRect
  • Line() : CSurface
  • LineInRect() : CSpiroRect
  • Load() : CSSE2Unsigned16Saturated , CFavoritesManager , CMDITabOptions
  • LoadAbbrevStrings() : CWordPadApp
  • LoadBitmaps() : COle2ViewApp
  • LoadCaption() : CLocalizeCtrl
  • LoadCustomState() : CVisualStudioDemoApp
  • LoadDockState() : CDocOptions
  • LoadFrame() : CMainFrame , CMailFrame , CMainFrame
  • LoadFromMoniker() : CMFCBindCntrItem
  • LoadLesson() : CSpeakNDlg
  • LoadMaskedBitmap() : CRulerItem
  • LoadMSMCaptionButtonsIcons() : CMSMVisualManager
  • LoadOptions() : CWordPadApp , CDocOptions , CWordPadApp , CDocOptions
  • LoadRegistrySettings() : CTestContainer98App
  • LoadScript() : CScript , CScriptManager
  • LoadToolBar() : CMSMToolBar
  • LoadU() : CSSE2Unsigned16Saturated
  • Locate() : CServerView
  • LockBuffer() : CPadView
  • LockInPlaceActive() : CTestContainer98Item
  • Log : TestContainer98::ITestContainer98 , CTestContainer98Doc
  • LogEditRequests() : CMethodInfo
  • LogEvent() : CCustomFileDialog , CMethodInfo
  • LONG : CImpIAdviseSink
  • lParam : tagANIMATEINFO , tagPDEVENT
  • lPcm : tagRC
  • lpData : tagITEMDATA
  • lPdc : tagPENINFO
  • lpfnSuperEdit : CParsedEditExported
  • lpfnYield : tagRC
  • lpLanguage : tagRC
  • lpnElem : tagIMECOLORS
  • lprc : tagRCRESULT
  • lprgbIme : tagIMECOLORS
  • LPSTGMEDIUM : CImpIAdviseSink
  • lpsyc : tagSYG
  • lpsye : tagSYG
  • lpsyv : tagRCRESULT
  • lpszKey : MSOfficeDemoKey
  • lpUser : tagRC
  • lRcOptions : tagRC
  • lRecogVal : tagSYG , tagSYE
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- m -

  • m_aAvailableCategories : CComponentCategoriesDlg
  • m_abAllowColor : CDynaMenuDoc
  • m_accum : CCalcDlg
  • m_aColorDef : CDynaMenuDoc
  • m_AddrCombo : CGetURL
  • m_advf : CIDataObjectDlg
  • m_aImplementedCategories : CInsertControlDlg
  • m_angleCurrent : CWheel
  • m_angleDelta : CWheel
  • m_anglePen : CWheel
  • m_AnimateCtrl : CAnimateCtrlPage
  • m_animctrlpage : CAllControlsSheet
  • m_apAmbientProperties : CTestContainer98Doc
  • m_apMethodInfo : CInterfaceInfo
  • m_apParamInfo : CMethodInfo
  • m_apParams : CMethodDlg
  • m_AppName : CAboutDlg
  • m_aProperties : CPropertyEditRequestsPage
  • m_arColorThemes : CMainFrame
  • m_aRequiredCategories : CInsertControlDlg
  • m_arFonts : CMainFrame
  • m_arHistory : CIEDemoDoc
  • m_arItems : CRibbonListFontButton
  • m_arLabels : CRibbonListButton
  • m_arrayFontDesc : CLocalComboBox
  • m_arrCommands : CFigure
  • m_arrPFigures : CSpiroDoc
  • m_arStyles : CMainFrame
  • m_arStyleSets : CMainFrame
  • m_arThemes : CMainFrame
  • m_astrEventNames : CEventLoggingPage
  • m_astrFavoriteURLs : CMainFrame
  • m_astrPropertyNames : CPropertyChangesPage
  • m_atLogFlags : CEventLoggingPage , CPropertyChangesPage
  • m_autoClikObject : CAutoDrivDlg
  • m_bActive : CDrawView
  • m_bActiveTabCloseButton : CMDITabOptions , CAppLookDlg
  • m_bAllowInvert : CTrackerDoc
  • m_bAltDrag : CToolBarCtrlPage
  • m_bAnimation : CTasksPaneView
  • m_bAppCanParse : CDateTimePage
  • m_Bar : CUndoListBox
  • m_bArrowkeys : CSpinCtrlPage
  • m_bAutoArrange : CListHdrDlg
  • m_bAutobuddy : CSpinCtrlPage
  • m_bAutoClose : CDesktopAlertDemoDlg
  • m_bAutoDelete : CCalcDlg
  • m_bAutoplay : CAnimateCtrlPage
  • m_bAutoSize : CImagePropPage
  • m_bAutoticks : CSliderCtrlPage
  • m_bBlack : CBounceDoc , CHelloDoc
  • m_bBlue : CBounceDoc , CHelloDoc
  • m_bBoldLabel : CTooltipDemoView
  • m_bBrowse : CToolDlg
  • m_bBrush : CDrawObj , CDrawView::XPreviewStateItem
  • m_bCallCloseDocument : CHTMLEdDoc
  • m_bCallNewDocument : CHTMLEdDoc
  • m_bCanDeactivateInplace : CDrawDoc
  • m_bCaptionIcon : CTasksPaneView
  • m_bCentered : CAnimateCtrlPage
  • m_bCheck : CPage1
  • m_bCheckBox1 : CMainFrame
  • m_bCheckBox2 : CMainFrame
  • m_bCheckBox3 : CMainFrame
  • m_bClientWidthSel : CListViewEx
  • m_bCollapseGroups : CTasksPaneView
  • m_bColor : CEditBar , CMainFrame , CMyListCtrl , CPage5
  • m_bCustom : CBounceDoc , CHelloDoc
  • m_bCustomColors : CTooltipDemoView
  • m_bCustomizeMargins : CTasksPaneView
  • m_bCustomTooltips : CMDITabOptions , CAppLookDlg
  • m_bDayState : CMonthCalPage
  • m_bDebug : CToolDlg
  • m_bDeferInProgress : CRulerBar
  • m_bDefWordWrap : CPadView
  • m_bDefWordWrapOld : CPadView
  • m_bDelayUpdateItems : CWordPadView
  • m_bDescrArea : CPage5
  • m_bDeviceFont : CPage3
  • m_bDialogTop : CMainFrame
  • m_bDisableDragDrop : CTreeCtrlPage
  • m_bDisableMDIChildRedraw : CMDITabOptions
  • m_bDockTabColors : CAppLookDlg
  • m_bDone : CExampleThread
  • m_bDoSaveOnDocCom : CHTMLEdDoc
  • m_bDotNetLook : CPage5
  • m_bDragDataAcceptable : CDrawView
  • m_bDragging : CMyTreeCtrl , CMyListCtrl
  • m_bDragMDITabs : CMDITabOptions
  • m_bDraw3DExt : CRulerBar
  • m_bDrawDescription : CTooltipDemoView
  • m_bDrawIcon : CTooltipDemoView
  • m_bDrawingActive : CSpiroView
  • m_bDrawingDone : CSpiroView
  • m_bDrawSeparator : CTooltipDemoView
  • m_bDrawUsingFont : CPage3
  • m_bDroppingAnchor : CSpiroView
  • m_bDroppingWheel : CSpiroView
  • m_bEdit : CToolDlg
  • m_bEditLabels : CTreeCtrlPage , CListHdrDlg
  • m_bEnablesel : CSliderCtrlPage
  • m_bEventPopups : CCustomFileDialog , CFileDlgWatcherDlg
  • m_bFastSpeed : CBounceWnd , CBounceDoc
  • m_bFirstKillFocus : CRecalcView
  • m_bFixed : CSliderCtrlPage
  • m_bFlatFrame : CMDITabOptions
  • m_bFont : CObjListView
  • m_bForceOEM : CWordPadApp
  • m_bForceReloadBmps : CMSOffice2007DemoView
  • m_bForceTextMode : CWordPadCommandLineInfo , CWordPadApp
  • m_bFormatBar : CDocOptPage
  • m_bFullRowSel : CListViewEx
  • m_bGreen : CBounceDoc , CHelloDoc
  • m_bGrid : CDrawView
  • m_bHasButtons : CTreeCtrlPage
  • m_bHasFocus : CFindComboButton
  • m_bHasLines : CTreeCtrlPage
  • m_bHeader : CPage5 , CPropSheetDemoDlg
  • m_bHiColorIcons : CVisualStudioDemoApp , CWordPadApp
  • m_bHicolorImages : CTasksPaneView
  • m_bHideChildren : CServerNode
  • m_bHideFontProps : CPage5
  • m_bHitPrimary : CComboRulerItem
  • m_bHotCursor : CListHdrDlg
  • m_bHoverSelect : CListHdrDlg
  • m_biggerFont : CSpeakNDlg
  • m_bInAnimation : CStatusBarDemoView
  • m_bInDrag : CMainView
  • m_bInfiniteProgressMode : CMainFrame
  • m_bInitialized : CDriverView
  • m_bInPrint : CWordPadView
  • m_bInProgress : CStatusBarDemoView
  • m_bInsert : CMainFrame
  • m_bIsEndOfPrint : CMSOffice2007DemoView
  • m_bIsFullScreen : CMainFrame
  • m_bIsHighColor : CMainFrame
  • m_bIsRTL : CMSOffice2007DemoApp
  • m_bIsStartup : CConfigDlg
  • m_bIsWheel : CBasePiece
  • m_Bitmap : CBitmapProperty
  • m_bitmap : CBigIcon
  • m_BitmapSize : CBitmapProperty
  • m_bitprop : CImageCtrl
  • m_bLargeIcons : CWordPadApp
  • m_bLinesAtRoot : CTreeCtrlPage
  • m_bMain : CToolDlg
  • m_bMainToolbarMenu : CMainFrame
  • m_bMarkChanged : CPage5
  • m_bMarkSortedColumn : CPage5
  • m_bMatchCase : CFindDlg
  • m_bMaximized : CWordPadApp
  • m_bmBall : CBounceWnd , CBounceDoc
  • m_bMDITabsContextMenu : CMDITabOptions
  • m_bMDITabsDocMenu : CMDITabOptions
  • m_bMDITabsIcons : CMDITabOptions
  • m_bMenuButtons : CTasksPaneView
  • m_bMenuDefaultClick : CPage1
  • m_bMenuStayPressed : CPage1
  • m_bmFontType : CFontComboBox
  • m_bmInfo : CBitmapProperty
  • m_bModifyFont : CMyListCtrl , CPage5
  • m_bMovingPencil : CSpiroView
  • m_bmpCaption : CMainFrame
  • m_bmpIcon1 : CStatusBarDemoView
  • m_bmpIcon2 : CStatusBarDemoView
  • m_bmpImage : CPage3
  • m_bmpStatus : CMainFrame
  • m_bMultiSelect : CMonthCalPage
  • m_bNavToolbar : CTasksPaneView
  • m_bNeedUpdate : CMainDoc
  • m_bNoAnswerCheck : CSpeakNDlg
  • m_bNoColHdr : CListHdrDlg
  • m_bNoFill : CRectDlg
  • m_bNoLabelWrap : CListHdrDlg
  • m_bNoPen : CSpeakNDlg
  • m_bNoSortHdr : CListHdrDlg
  • m_bNothousands : CSpinCtrlPage
  • m_bNothumb : CSliderCtrlPage
  • m_bNoticks : CSliderCtrlPage
  • m_bNotify : CFolderListPopupWnd
  • m_bNotifyFrame : CFolderListBar
  • m_bNoToday : CMonthCalPage
  • m_bNoTodayCircle : CMonthCalPage
  • m_bOnBar : CWordPadView
  • m_bOneNoteTabs : CAppLookDlg
  • m_bOpenFileDialog : CFileDlgWatcherDlg
  • m_bOperandAvail : CCalcDlg
  • m_Border : CPushPropPage
  • m_bOutlookBar2003 : CAppLookDlg , CMainFrame
  • m_bPageBreak : CFormatParaDlg
  • m_bPalette : CToolDlg
  • m_bParentActive : CMSMCaptionBar
  • m_bParentMaximize : CMSMCaptionBar
  • m_bPauseBlit : CChildView
  • m_bPauseBlur : CChildView
  • m_bPauseSwarm : CChildView
  • m_bPen : CDrawObj , CDrawView::XPreviewStateItem
  • m_bPromptForType : CWordPadApp
  • m_bPropListCategorized : CPage5
  • m_bPropListCustomColors : CPage5
  • m_bRaster : CPage3
  • m_brBackground : CPropSliderCtrl
  • m_bRecalcInProgress : CRecalcDoc
  • m_bRecalcNeeded : CRecalcDoc
  • m_bRed : CBounceDoc , CHelloDoc
  • m_bResource : CToolDlg
  • m_brHatch : CMainView
  • m_bRightAlignedText : CRibbonListButton
  • m_bRightArrow : CPage1
  • m_brLinksBarBack : CMSMVisualManager
  • m_brLinksBarButtonHighlighted : CMSMVisualManager
  • m_brMenuBarButtonHighlighted : CMSMVisualManager
  • m_bRoundedCorners : CTooltipDemoView
  • m_bRoundedTabs : CAppLookDlg
  • m_bRulerBar : CDocOptPage
  • m_brush : CBallThread , CRectThread
  • m_bScrollButtons : CTasksPaneView
  • m_bSetbuddyint : CSpinCtrlPage
  • m_bShowAtStartup : CAppLookDlg
  • m_bShowDevTab : CMSOffice2007DemoApp , CDemoOptionsPage
  • m_bShowDragContext : CPage5
  • m_bShowFloaty : CMSOffice2007DemoApp , CDemoOptionsPage
  • m_bShowKeyTips : CMSOffice2007DemoApp , CDemoOptionsPage
  • m_bShowNone : CDateTimePage
  • m_bShowSelAlways : CTreeCtrlPage
  • m_bShowToolTip : CTesthelpCtrl
  • m_bShowToolTipDescr : CMSOffice2007DemoApp
  • m_bShowToolTips : CMSOffice2007DemoApp
  • m_bSingleExpand : CTreeCtrlPage
  • m_bSingleSel : CListHdrDlg
  • m_bSizeChanged : CChildView
  • m_bSizedBefore : CSnapView
  • m_bSmallCaption : CDesktopAlertDemoDlg
  • m_bSmooth : CProgCtrlPage
  • m_bSpaceAbbrev : CUnit
  • m_bStartDrag : CSpiroView
  • m_bStartup : CAppLookDlg , CRibbonGadgetsDoc
  • m_bStateIcons : CRowListView
  • m_bStatusBar : CDocOptPage
  • m_bstrName : CExtendedControl
  • m_bTabIcons : CTabControlView
  • m_bTabsAutoColor : CMDITabOptions
  • m_bTabsOnTop : CMDITabOptions
  • m_bTabsSwap : CTabControlView
  • m_bThickPen : CScribbleDoc , CSpiroDoc
  • m_bTimerPopped : CChildView
  • m_btnCancel : CConfigDlg
  • m_btnCheck : CPage1
  • m_BtnClose : CMSMCaptionBar
  • m_btnDelete : CMyPopupDlg
  • m_btnDoGetData : CIDataObjectDlg
  • m_btnExpandAll : CPage5
  • m_btnFlag : CMyPopupDlg
  • m_btnImageEdit : CPage3
  • m_btnLink : CPage3
  • m_BtnMaximize : CMSMCaptionBar
  • m_btnMenu : CPage1
  • m_BtnMinimize : CMSMCaptionBar
  • m_btnMultiLine : CPage1
  • m_btnOK : CChangeNameDlg , CAddNodeDlg
  • m_btnPin : CFolderListPopupWnd
  • m_btnRadio1 : CPage1
  • m_btnRadio2 : CPage1
  • m_btnRadio3 : CPage1
  • m_btnRadio4 : CPage1
  • m_btnRL : CMSNDlg , CMyPopupDlg
  • m_btnSetupAdvise : CIDataObjectDlg
  • m_btnSlider : CCustomSliderCtrl
  • m_btnViewTypeInfo : CDispatchDlg
  • m_bToolBar : CDocOptPage
  • m_bToolTips : CMainFrame
  • m_bTrack : CRulerItem
  • m_bTransparent : CAnimateCtrlPage
  • m_bTrueType : CPage3
  • m_bTTInPopupMenus : CTooltipDemoApp , CTooltipDemoView
  • m_bUpDown : CDateTimePage
  • m_bUseDispatch : CAutoDrivDlg
  • m_bUseMine : CTesthelpPropPage
  • m_bUseMyHelp : CTesthelpCtrl
  • m_bUserMode : CHTMLEdView
  • m_bUseToolTip : CTesthelpPropPage
  • m_butChooseColor : CAmbientPropertiesDlg
  • m_butChooseFont : CAmbientPropertiesDlg
  • m_butFileNameBrowse : CLoggingDlg
  • m_butIgnoreRequiredCategories : CInsertControlDlg
  • m_butOK : CInsertControlDlg
  • m_butRequiredCategories : CInsertControlDlg
  • m_butReregister : CRegisterControlsDlg
  • m_butRun : CMacroDlg
  • m_butSetValue : CAmbientPropertiesDlg
  • m_Button : CPage1
  • m_buttonClear : CFormatTabDlg
  • m_buttonClearAll : CFormatTabDlg
  • m_buttonNext : CSpeakNDlg
  • m_buttonSet : CFormatTabDlg
  • m_butUnregister : CRegisterControlsDlg
  • m_bVertical : CProgCtrlPage , CEditBar
  • m_bViewDocMap : CMSOffice2007DemoView
  • m_bViewGridLines : CMSOffice2007DemoView
  • m_bViewProps : CMSOffice2007DemoView
  • m_bViewRuler : CMSOffice2007DemoView
  • m_bViewThumb : CMSOffice2007DemoView
  • m_bVistaStyle : CFileDlgWatcherDlg
  • m_bWeekNumbers : CMonthCalPage
  • m_bWheelInside : CRing
  • m_bWhite : CBounceDoc , CHelloDoc
  • m_bWin31 : CWordPadApp
  • m_bWin4 : CWordPadApp
  • m_bWordSel : CUnitsPage , CWordPadApp
  • m_bWorkAreas : CListHdrDlg
  • m_bWrap : CSpinCtrlPage
  • m_bWrapLabels : CTasksPaneView
  • m_bWrapTasks : CTasksPaneView
  • m_bXPButtons : CPage1
  • m_CacheFile : CBitmapProperty
  • m_calc : CDriverDlg
  • m_Cancel : CAboutDlg
  • m_CapData : CMainFrame
  • m_Caption : CButtonPropPage , CPushPropPage , CInsertTableDlg , CRibbonListFontButton::XItem
  • m_caption : CCircPropPage
  • m_CaptionButtonIconst : CMSMVisualManager
  • m_CaptionButtonSize : CMSMVisualManager
  • m_CaptionFont : CMSMCaptionBar
  • m_CaptionHeight : CMSMCaptionBar , CTasksPaneView
  • m_cboxMacroName : CMacroDialogBar
  • m_cboxMethodName : CMethodDlg
  • m_cboxParamType : CMethodDlg
  • m_cboxParamValue : CMethodDlg
  • m_cboxPropName : CAmbientPropertiesDlg
  • m_cboxPropType : CAmbientPropertiesDlg
  • m_cboxPropValue : CAmbientPropertiesDlg
  • m_cbRead : CBitmapProperty
  • m_cchOutput : CIDataObjectDlg
  • m_CellAttribs : CInsertTableDlg
  • m_cfDraw : CDrawView
  • m_cfObjectDescriptor : CDrawView , CMainView
  • m_cfPrivate : CServerDoc , CMainDoc
  • m_checkEnabled : CAmbientPropertiesDlg
  • m_checkShowElev : CCommandLinkCtrlPage
  • m_checkState : CSplitButtonCtrlPage
  • m_chkDump : CIDataObjectDlg
  • m_chkPrimeFirst : CIDataObjectDlg
  • m_chkUpdateDisplay : CIDataObjectDlg
  • m_cIDStatusBar : CModelessMain
  • m_cIDToolBar : CModelessMain
  • m_circleOffset : CCircCtrl , CCircPropPage
  • m_circleShape : CCircCtrl , CCircPropPage
  • m_ClassViewImages : CClassViewBar
  • m_cLinesOutput : CIDataObjectDlg
  • m_clrBack : CPropSliderCtrl
  • m_clrBall : CBounceWnd , CBounceDoc
  • m_clrBkgnd : CListViewEx
  • m_clrCategorieBarButtonBorder : CMSMVisualManager
  • m_clrCategorieBarButtonBorderM : CMSMVisualManager
  • m_clrCategorieBarButtonF : CMSMVisualManager
  • m_clrCategorieBarButtonL : CMSMVisualManager
  • m_clrCategorieBarButtonLine : CMSMVisualManager
  • m_clrCategorieBarButtonTextHighlighted : CMSMVisualManager
  • m_clrCategorieBarButtonTextPressed : CMSMVisualManager
  • m_clrCategorieBarButtonTextRegular : CMSMVisualManager
  • m_clrComboBoxBorder : CMSMVisualManager
  • m_clrComboBoxBtnHighlightedBorder : CMSMVisualManager
  • m_clrComboBoxBtnHighlightedF : CMSMVisualManager
  • m_clrComboBoxBtnHighlightedL : CMSMVisualManager
  • m_clrComboBoxBtnPressedBorder : CMSMVisualManager
  • m_clrComboBoxBtnPressedF : CMSMVisualManager
  • m_clrComboBoxBtnPressedL : CMSMVisualManager
  • m_clrComboBoxBtnRegularBorder : CMSMVisualManager
  • m_clrComboBoxBtnRegularF : CMSMVisualManager
  • m_clrComboBoxBtnRegularL : CMSMVisualManager
  • m_clrLinksBarButtonBorderHighlighted : CMSMVisualManager
  • m_clrMenuBarButtonBorderHighlighted : CMSMVisualManager
  • m_clrMenuBarButtonTextHighlighted : CMSMVisualManager
  • m_clrMenuBarButtonTextPressed : CMSMVisualManager
  • m_clrMenuBarButtonTextRegular : CMSMVisualManager
  • m_clrText : CHelloView , CHelloWnd , CHelloDoc , CListViewEx
  • m_clrTextBk : CListViewEx
  • m_clrToolBarButtonTextHighlighted : CMSMVisualManager
  • m_clrToolBarButtonTextPressed : CMSMVisualManager
  • m_clrToolBarButtonTextRegular : CMSMVisualManager
  • m_clrToolBarSeparatorF : CMSMVisualManager
  • m_clrToolBarSeparatorM : CMSMVisualManager
  • m_clrToolBarSeparatorS : CMSMVisualManager
  • m_clsid : CObjectData , CInsertControlDlg
  • m_CLSID : CRegistryView
  • m_clsidCur : COle2ViewDoc
  • m_cmdbtn : CCommandLinkCtrlPage
  • m_co : CBasePiece , CFigCommand
  • m_coCurrentPen : CSpiroView
  • m_Color : CPage2
  • m_color : CLlama
  • m_colorData : CMainDoc
  • m_ColorGroupText : CTasksPaneView
  • m_ColorGroupTextHot : CTasksPaneView
  • m_colorMenu : CTestWindow
  • m_colorPage : CModalShapePropSheet , CModelessShapePropSheet
  • m_ColorPicker : CPage2
  • m_colors : CCustListDlg
  • m_ColorTable : CHueLeader
  • m_ColorTaskText : CTasksPaneView
  • m_ColorTaskTextHot : CTasksPaneView
  • m_comboBox : CStyleBar , CFormatTabDlg
  • m_comboColor : CPagerCtrlPage
  • m_comboFontName : CFormatBar
  • m_comboFontSize : CFormatBar
  • m_commandLinkpage : CAllControlsSheet
  • m_cOnDataChanges : CIDataObjectDlg
  • m_controltype : CDialogItem
  • m_coPattern : CWheel
  • m_Copyright : CAboutDlg
  • m_cPalette : CCubeView
  • m_cRef : CImpIAdviseSink
  • m_crf : DynaMenuDef
  • m_crText : CServerDoc
  • m_csGDILock : CGDIThread
  • m_cstrFileName : CAnimateCtrlPage
  • m_cstrStatus : CTreeCtrlPage
  • m_ctlList : CDWordArrayView , CIntListView , CMapDWordToMyStructView , CMapStringToStringView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView
  • m_ctlSum : CRecalcView
  • m_CtrlTipCaption : CTesthelpPropPage
  • m_ctrlType : CDriverView
  • m_ctrlValue : CDriverView
  • m_currDay : CSchedulerDlg
  • m_CurrentCommand : CMSMLinksBar
  • m_currMonth : CSchedulerDlg
  • m_currYear : CSchedulerDlg
  • m_cursorRing : CSpiroApp
  • m_cursorWheel : CSpiroApp
  • m_cxClient : CListViewEx
  • m_cxStateImageOffset : CListViewEx
  • m_cyFont : COle2ViewApp
  • m_dAnchorData : CFigCommand
  • m_dAngleCorrection : CWheel
  • m_date : CAmbientPropertiesDlg , CMethodDlg
  • m_DateTime : CDateTimePage
  • m_datetimepage : CAllControlsSheet
  • m_day : CSchedulerDlg
  • m_dBVListSet : CDBVListDoc
  • m_dc : CGDIThread
  • m_dcPrinter : CFormatBar
  • m_dcScreen : CWordPadApp
  • m_dDataAnchorFirst : CSpiroView
  • m_dDataWheelFirst : CSpiroView
  • m_defCharFormat : CWordPadView
  • m_defParaFormat : CWordPadView
  • m_defTextCharFormat : CWordPadView
  • m_delta : CMMXSurface24Intrinsic , CSSE2Surface24Intrinsic
  • m_Department : CDBVListSet
  • m_descFont : CTestContainer98Doc
  • m_dispid : CMethodInfo , CNewAmbientPropertyDlg , CAmbientProperty
  • m_dispidChanged : CAmbientPropertiesDlg
  • m_dispidEvent : CTestContainer98Item
  • m_Division : CDBVListSet
  • m_dlgBar : CListOutputFrame
  • m_dlgItemTemplate : CDialogItem
  • m_dlgTempl : CMyDialogTemplate
  • m_dlgTemplate : CDlgtempDlg
  • m_dlState : CBitmapProperty
  • m_dpLastParams : CTestContainer98Item
  • m_dragOffset : CDrawView , CMainView
  • m_dragPoint : CDrawView , CMainView
  • m_dragSize : CDrawView , CMainView
  • m_drawShape : CDrawTool
  • m_dropTarget : CInPlaceFrame , CDrawView , CServerView , CMainView , CTestContainer98View
  • m_ds1 : CDocOptions
  • m_ds2 : CDocOptions
  • m_dw : CDWordArrayView
  • m_dwArray : CCollectDoc
  • m_dwAspectPass2 : CTestContainer98Item
  • m_dwClsCtx : COle2ViewDoc
  • m_dwConn : CIDataObjectDlg
  • m_dwCurrentView : CMainFrame
  • m_dwEventCookie : CTestContainer98Item
  • m_dwFileAttributes : CPropertiesDlg
  • m_dwFlags : CFontDesc
  • m_dWheelData : CFigCommand
  • m_dwKey : CMapDWordToMyStructView
  • m_dwLastDropKeyState : CTestContainer98View
  • m_dwLength : CTrackFile
  • m_dwMiscStatus : CTestContainer98Item
  • m_dwpl : CMMXSurface32Intrinsic , CMMXSurface24Intrinsic
  • m_dwPropertyCookie : CTestContainer98Item
  • m_dwPropID : CProperty
  • m_dwRegister : CCalcDlg
  • m_dwSplashTime : CTheApp
  • m_dwStyle : CAnimateCtrlPage , CSliderButton
  • m_dwTickStart : CChildView
  • m_dwTime : CIDataObjectDlg
  • m_dwType : CProperty
  • m_dwViewStatus : CTestContainer98Item
  • m_dX : CVector
  • m_dY : CVector
  • m_DynamicHelpImages : CDynamicHelpViewBar
  • m_eboxFileName : CLoggingDlg
  • m_edit1 : CDerEditDlg
  • m_edit2 : CDerEditDlg
  • m_edit3 : CDerEditDlg
  • m_edit4 : CDerEditDlg
  • m_editDescription : CChangeNameDlg , CAddNodeDlg
  • m_editDISPID : CAmbientPropertiesDlg
  • m_editExceptionDesc : CMethodDlg
  • m_editExceptionSource : CMethodDlg
  • m_editExpression : CDriverDlg
  • m_editName : CNewAmbientPropertyDlg
  • m_editNote : CCommandLinkCtrlPage
  • m_editParamValue : CMethodDlg
  • m_editPropValue : CAmbientPropertiesDlg
  • m_EditRect : CSpinCtrlPage
  • m_editReturnValue : CMethodDlg
  • m_edMaxSel : CMonthCalPage
  • m_edtAdvise : CIDataObjectDlg
  • m_Email : CDBVListSet
  • m_Enabled : CPushPropPage , CTimePropPage
  • m_endWizardDialog : CWizardDialog
  • m_eRequestEditResponse : CMethodInfo
  • m_errorState : CCalcDlg
  • m_eSurf : CChildView
  • m_excepInfo : CMethodDlg
  • m_extent : CDrawOleObj
  • m_Favorites : CIEDemoApp
  • m_fCancelSchedule : CEntryInfoDlg
  • m_fClearSchedule : CEntryInfoDlg
  • m_fDeleteSchedule : CEntryInfoDlg
  • m_fDoOnGetDataPosted : CIDataObjectDlg
  • m_fetc : CIDataObjectDlg
  • m_fGroupByKind : CTypeLibWnd
  • m_file : CFileLog
  • m_FileViewImages : CFileViewBar
  • m_fInterface : COle2ViewDoc
  • m_flashColor : CCircCtrl
  • m_float : CMyStruct , CMyObject , CMapDWordToMyStructView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView
  • m_fModifySchedule : CEntryInfoDlg
  • m_fntPropList : CPropertiesViewBar
  • m_Font : CTypeLibODLView , CRibbonListFontButton::XItem , COutputBar , CTaskPane , CWatchBar
  • m_font : CStyleBar , CTBComboBox , CAddressCombo , CEditToolbar , CSourceView , CSplashWnd , CPadView , COutputWindowView , CButtonDialog
  • m_fontBold : CMyPopupDlg
  • m_fontNameCombo : CEditToolbar
  • m_fontPrint : CPadView
  • m_fontSizeCombo : CEditToolbar
  • m_FormatID : CPropertySection
  • m_fRadius : CCubeView
  • m_fTypeLib : COle2ViewDoc
  • m_fUpdateDisplay : CIDataObjectDlg
  • m_fUpdateScheduleDisplay : CEntryInfoDlg
  • m_fVisibleButtons : CEntryInfoDlg
  • m_fVisibleDefaultButtons : CEntryInfoDlg
  • m_fVista : CNetAddrVerifierDlg
  • m_gridColor : CDrawView
  • m_Group : CAboutDlg
  • m_GroupSpacing : CTasksPaneView
  • m_guid : CGuidGenDlg
  • m_hAccel : CSchedulerDlg , CCalcDlg
  • m_hAnotherDead : CGDIThread
  • m_hbm : CRulerItem
  • m_hbmMask : CRulerItem
  • m_hBrush : CBallThread , CRectThread
  • m_hControls : CObjTreeView
  • m_hDC : CGDIThread
  • m_hDestDC : CSurface
  • m_hDIB : CDibDoc
  • m_hDlg : CIDataObjectDlg
  • m_hDlgTmp : CButtonDialog
  • m_Height : CRibbonListFontButton::XItem
  • m_hEventBounceThreadKilled : CBounceThread
  • m_hEventDead : CGDIThread
  • m_hEventKill : CGDIThread
  • m_hEventKillRecalcThread : CRecalcThreadInfo , CRecalcDoc
  • m_hEventRecalcDone : CRecalcThreadInfo , CRecalcDoc
  • m_hEventRecalcThreadKilled : CRecalcThreadInfo , CRecalcDoc
  • m_hEventStartRecalc : CRecalcThreadInfo , CRecalcDoc
  • m_hIcon : CMutexesDlg , CAllControlsSheet , CCmnCtrl3Dlg , CNetAddrVerifierDlg , CTaskDialogTestDlg , CModelessMain , CDlgtempDlg , CFileDlgWatcherDlg , CListHdrDlg , CMainDlg , CMainFrame , CVarUseDlg , CDHtmlExploreDlg , CSchedulerDlg , CAutoDrivDlg , CItemIcons , CCalcDlg , CGuidGenDlg , CDesktopAlertDemoDlg , CDlgToolTipsDlg , CMSMCaptionBar , NewControlsPropSheet , CPropSheetDemoDlg , CMyToolTipCtrl , CTrayMenuDlg
  • m_hIconDoc : CMainFrame
  • m_hIconText : CMainFrame
  • m_hIconWrite : CMainFrame
  • m_himSystem : CFavoritesManager
  • m_hInsertable : CObjTreeView
  • m_hInterfaces : CObjTreeView
  • m_hInternal : CObjTreeView
  • m_hitemDrag : CMyTreeCtrl , CTreeCtrlPage
  • m_hitemDrop : CMyTreeCtrl , CTreeCtrlPage
  • m_hKey : CKey
  • m_hLargeIcon : CRowListView
  • m_HMargin : CTasksPaneView
  • m_hMetaFile : CMetaFileWnd
  • m_hMyHotCursor : CListHdrDlg
  • m_hObjects : CObjTreeView
  • m_hOLE1 : CObjTreeView
  • m_hPen : CLineThread
  • m_hSmallIcon : CRowListView
  • m_hStdHotCursor : CListHdrDlg
  • m_hTypeInfos : CTypeLibTreeView
  • m_hTypeLibs : CObjTreeView
  • m_hUnclassified : CObjTreeView
  • m_hwndNotifyProgress : CRecalcThreadInfo
  • m_hwndNotifyRecalcDone : CRecalcThreadInfo
  • m_hWndParent : CIDataObjectDlg
  • m_hwndParent : CBounceThread
  • m_i1 : CVariantMap
  • m_i2 : CVariantMap
  • m_iAlignment : CSpinCtrlPage
  • m_iAllowEdit : CPropertyEditRequestsPage
  • m_iBorderStyle : CPage1
  • m_icoCurrent : CBasePiece
  • m_iColor : CDynaMenuDoc , CInputView
  • m_icon : CRegistryView , CAboutBox , CSplashWnd
  • m_IconFont : CObjListView
  • m_IconOffset : CTasksPaneView
  • m_Icons : CDesktopAlertDemoDlg , CIconComboBox , CDemoOptionsPropSheet
  • m_IconsSmall : CDesktopAlertDemoDlg
  • m_iCurrentParam : CMethodDlg
  • m_iCursor : CPage1
  • m_id : CDateDialog
  • m_iDay : CMyScheduler
  • m_idCaption : CComponentCategoriesDlg
  • m_iDelta : CProgCtrlPage
  • m_IDIcons : CFavorit
  • m_IDTimer : CSpiroView
  • m_idxLeader : CLlama
  • m_iEndHour : CEntryInfoDlg , CMyScheduler
  • m_iEndMinutes : CMyScheduler
  • m_iFolderIcon : CFavorit
  • m_iFooterTime : CPageSetupDlg
  • m_iFooterTimeOld : CPageSetupDlg
  • m_iFrameRate : CPage1
  • m_iHeaderTime : CPageSetupDlg
  • m_iHeaderTimeOld : CPageSetupDlg
  • m_iHistoryOffset : CIEDemoDoc
  • m_iIcon : CFavorit
  • m_iIconIndex : CWorkspaceObj
  • m_iid : CInterfaceInfo
  • m_iId : CMyScheduler
  • m_iImage : CPage1
  • m_iInternetShortcutIcon : CFavorit
  • m_iItemDrag : CMyListCtrl
  • m_iItemDrop : CMyListCtrl
  • m_iLastDivID : CSchedulerDlg
  • m_iLogType : CLoggingDlg , CTCOptions
  • m_image : CChildView , CSplitButtonCtrlPage , CSurface
  • m_Image : CMSMoneyDemoView , CStartView
  • m_imageList : CSpiroApp , CPage5
  • m_imageListIcons : CIconListProp , CIconCombo
  • m_Images : CCalendarBar
  • m_images : CTypeLibTreeView , COle2ViewApp , CTwoButtonsProp , CFoldersTree
  • m_ImagesHeader : COutlookDemoView
  • m_ImagesList : COutlookDemoView
  • m_ImagesSmall : CMainFrame
  • m_imgLogo : CMSNDlg
  • m_imlStatusAnimation : CMainFrame , CStatusBarDemoView
  • m_iMonth : CMyScheduler
  • m_indent : CRulerBar
  • m_infoControl : CTestContainer98Item
  • m_infoEvents : CTestContainer98Item
  • m_infoMethods : CTestContainer98Item
  • m_int : CMyStruct , CMyObject , CIntListView , CMapDWordToMyStructView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView
  • m_interval : CTimeCtrl
  • m_Interval : CTimePropPage
  • m_intList : CCollectDoc
  • m_invert : CLocalizeCtrl
  • m_Invert : CLocalizePropPage
  • m_inverted : CLocalizeCtrl
  • m_invertFlag : CXlistCtrl
  • m_InvertFlag : CXlistPropPage
  • m_invkind : CMethodInfo
  • m_iOrientation : CSliderCtrlPage , CSpinCtrlPage
  • m_iPalette : CPalCtrl
  • m_iPieceDropped : CSpiroView
  • m_iRate : CRateDlg , CWndListDlg
  • m_iResponse : CPropertyEditRequestsPage::CPropertyInfo
  • m_iStartHour : CEntryInfoDlg , CMyScheduler
  • m_iStartMinutes : CMyScheduler
  • m_itemData : CXlistCtrl
  • m_itemDefHeight : CXlistCtrl
  • m_Items : CFoldersTree
  • m_iTickpos : CSliderCtrlPage
  • m_iTicks : CWndListDlg
  • m_iWidth : CSliderButton
  • m_iYear : CMyScheduler
  • m_kDeltaX : CSurface
  • m_kDeltaY : CSurface
  • m_kTimerDelay : CChildView
  • m_kTimerID : CChildView
  • m_LargeImageList : CRowListView
  • m_lb : CDropTargetView
  • m_lbCategories : CComponentCategoriesDlg
  • m_lbControls : CInsertControlDlg
  • m_lbEvents : CEventLoggingPage
  • m_lbFmtEtc : CIDataObjectDlg
  • m_lbGetData : CIDataObjectDlg
  • m_lbMacros : CMacroDlg
  • m_lbNotifyList : CDateTimePage
  • m_lboxTabOrder : CTabOrderDlg
  • m_lbProperties : CPropertyChangesPage , CPropertyEditRequestsPage
  • m_lbWindows : CWndListDlg
  • m_lControls : CInsertControlDlg
  • m_LeaderArr : CSwarm
  • m_leftmargin : CRulerBar
  • m_Length : CPalPropPage
  • m_lf : CWordPadApp
  • m_lfDefFont : CPadView
  • m_lfDefFontOld : CPadView
  • m_lfDefPrintFont : CPadView
  • m_lfDefPrintFontOld : CPadView
  • m_link : CComboRulerItem
  • m_list : CTypeLibListView
  • m_listbox : CNetAddressCtrlPage , CObjListView , CFileNewDialog
  • m_listBox : CListOutputFrame , CDateDialog
  • m_listChild : CServerNode
  • m_listctrl : CListHdrDlg
  • m_listCtrl : CNetAddrVerifierDlg
  • m_listImages : CRibbonListButton , CRibbonListFontButton
  • m_listItems : CListDlg
  • m_listObjects : CContainerInfoDlg
  • m_listParams : CMethodDlg
  • m_listPrinterNotify : CWordPadApp
  • m_listSplitStyle : CSplitButtonCtrlPage
  • m_LlamaArr : CSwarm
  • m_Location : CDBVListSet
  • m_logbrush : CDrawObj , CDrawView::XPreviewStateItem
  • m_logfont : CServerDoc
  • m_logpen : CDrawObj , CDrawView::XPreviewStateItem
  • m_logx : CRulerBar
  • m_lpaIDStatusBar : CModelessMain
  • m_lpaIDToolBar : CModelessMain
  • m_lpDO : CIDataObjectDlg
  • m_lpItems : CPropertyBag
  • m_lpRichDataObj : CEmbeddedItem
  • m_lpScripts : CScriptManager
  • m_lpSelectedItems : CTestContainer98View
  • m_lpszName : CIDataObjectDlg
  • m_lpszNextQuestion : CSpeakNDlg
  • m_lpTabOrder : CTabOrderDlg , CTestContainer98Doc
  • m_lSelectedCategories : CComponentCategoriesDlg
  • m_lstActions : CUndoButton
  • m_lstAdditionalColors : CMainFrame
  • m_lstIconNames : CIconListProp , CIconCombo
  • m_lstIcons : CComboBoxExProp
  • m_lstIndents : CComboBoxExProp
  • m_lstMailFrames : CMailFrame
  • m_lstMainColors : CMainFrame
  • m_lstStandardColors : CMainFrame
  • m_lstSubItems : CFavorit
  • m_lstWorkspaces : CFoldersTree , CMainFrame
  • m_lvProperties : CPropertyBagDlg
  • m_lvRegisteredControls : CRegisterControlsDlg
  • m_m128i : CSSE2Unsigned16Saturated
  • m_m64 : CMMXUnsigned16Saturated
  • m_MainButton : CMainFrame
  • m_map : CVariantMap , CDriverDoc
  • m_mapDWordToMyStruct : CCollectDoc
  • m_mapMacros : CScript
  • m_mapNamedItems : CScriptManager
  • m_mapStringToMyObject : CCollectDoc
  • m_mapStringToString : CCollectDoc
  • m_MemBitmap : CMainFrame
  • m_MemoryBitmap : CMSMVisualManager
  • m_MemoryDC : CMSMVisualManager
  • m_MemoryFilled : CMSMVisualManager
  • m_MemorySize : CMSMVisualManager
  • m_menu : CListOutputFrame , CPage1
  • m_menuFavotites : CMainFrame
  • m_menuInPlace : CButtonCtrl
  • m_menuPopup : CDesktopAlertDemoDlg
  • m_MetaFile : CIDataObjectDlg
  • m_month : CSchedulerDlg
  • m_MonthCal : CMonthCalPage
  • m_monthcalpage : CAllControlsSheet
  • m_MSMFrameBitmap : CMSMVisualManager
  • m_MSMViewBitmap : CMSMVisualManager
  • m_mutex : CMutexesDlg
  • m_myobArray : CCollectDoc
  • m_mystructList : CCollectDoc
  • m_mytreectrl : CTreeCtrlPage
  • m_nAbbrevID : CUnit
  • m_nActiveItem : CDlgtempDlg
  • m_nAfter : CFormatParaDlg
  • m_nAge : CSwarm
  • m_nAlignment : CFormatParaDlg , CRulerItem
  • m_nAllocPoints : CDrawPoly
  • m_Name : CDBVListSet , CItemIcons , CRegistryView
  • m_NameDict : CPropertySection
  • m_nAnimation : CDesktopAlertDemoDlg
  • m_nAnimationSpeed : CDesktopAlertDemoDlg
  • m_nAppLook : CMainFrame , CMSOffice2007DemoApp , CAppLookDlg
  • m_nArchive : CPropertiesDlg
  • m_nAutoCloseTime : CDesktopAlertDemoDlg
  • m_nBaseID : CButtonDialog
  • m_nBefore : CFormatParaDlg
  • m_nBeg : CEmbeddedItem
  • m_nBitDepth : CSurface
  • m_nBorder : CSwarm
  • m_nBorderType : CWordPadView
  • m_nBottomMargin : CPageSetupDlg
  • m_nButtonCount : CStandardBar , CPaletteBar
  • m_nByteDepth : CSurface
  • m_nCancel : CButtonDialog
  • m_nCaptionHeight : CTasksPaneView
  • m_nCategorie : CMainFrame
  • m_nCharSet : CFontDesc
  • m_nCheckedItem : CRowListView
  • m_nCode : COnCmdMsg
  • m_nColor : CToolDlg , CColorPage , CTabControlView
  • m_nColorCount : CBasePiece
  • m_nColorCounter : CBrightLeader , CHueLeader
  • m_nColorScheme : CDemoOptionsPage
  • m_nColumns : CPaletteBar , CToolDlg , CRibbonTableButton , CToolsPalette
  • m_nConfig : CConfigDlg
  • m_nContainerSize : CSetPaneSizeView
  • m_nCount : CEnumVariant , CFormatTabDlg
  • m_nCurFontCharSet : CPage3
  • m_nCurrConfig : CMenuSubSetApp
  • m_nCurrentDemoCommand : CRecalcDoc
  • m_nCurrentExample : CMainFrame
  • m_nCurrentPenWidth : CSpiroView
  • m_nCurrID : CCustomToolTipCtrl
  • m_nCurrSort : CClassViewBar
  • m_nCurView : CMainFrame
  • m_nDefButton : CButtonDialog
  • m_nDefCmdShow : CPadFrame
  • m_nDefCmdShowOld : CPadFrame
  • m_nDefFont : CWordPadApp
  • m_nDefTabStops : CPadView
  • m_nDefTabStopsOld : CPadView
  • m_nDefWrap : CDocOptions
  • m_nDirection : CFindDlg
  • m_nDocID : CMFCBindCntrItem
  • m_nDocType : CWordPadDoc
  • m_nDocumentsGroup : CTaskPane
  • m_needlePosition : CSpindialCtrl
  • m_NeedlePosition : CSpindialPropPage
  • m_nEnd : CEmbeddedItem
  • m_netaddrctrl : CNetAddressCtrlPage
  • m_netaddressctrlpage : CAllControlsSheet
  • m_next : CNextWizardDialog
  • m_nextWizardDialog : CWizardDialog
  • m_nFilterIndex : CWordPadApp
  • m_nFilterLoad : CChildView
  • m_nFilterSave : CChildView
  • m_nFirst : CFormatParaDlg
  • m_nFontHeight : CLocalComboBox
  • m_nFrameCounter : CChildView
  • m_nFullScreen : CConfigDlg
  • m_nGroupSpacing : CTasksPaneView
  • m_nGuidType : CGuidGenDlg
  • m_nHandleSize : CHandleSize
  • m_nHeight : CDlgtempDlg , CSwarm
  • m_nHeightInPixels : CSetPaneSizeView
  • m_nHelpIDs : CDateDialog , CDocOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CPageSetupDlg , CUnitsPage
  • m_nHidden : CPropertiesDlg
  • m_nHMargin : CTasksPaneView
  • m_nIcon : CDesktopAlertDemoDlg , CStatusBarDemoView
  • m_nIconOffset : CTasksPaneView
  • m_nid : CTrayMenuDlg
  • m_nID : COnCmdMsg , DynaMenuDef , CAdderDialog , CRibbonTooltipCtrl
  • m_nIDBitmap : CModelessMain
  • m_nIDColor : CHelloView , CBounceWnd , CHelloWnd
  • m_nIDLastMessage : CModelessMain
  • m_nIDTimer : CWndListDlg
  • m_nIDTracking : CModelessMain
  • m_nImageLocation : CPage1
  • m_nImageSize : CChildView
  • m_nIndex : CEnumVariant
  • m_nInt1 : CRecalcThreadInfo , CRecalcView , CRecalcDoc
  • m_nInt2 : CRecalcThreadInfo , CRecalcView , CRecalcDoc
  • m_nItem : CDlgtempDlg
  • m_nLabelHeight : CUndoBar
  • m_nLargeDiv : CUnit
  • m_nLastPercent : CTrackFile
  • m_nLeft : CFormatParaDlg
  • m_nLeftMargin : CPageSetupDlg
  • m_nLimitText : CLocalComboBox
  • m_nLineNum : CGotoDlg
  • m_nLinePos : CRulerBar
  • m_nLlamaAcc : CLeader
  • m_nLlamaVel : CLeader
  • m_nLogVert : CSizeComboBox
  • m_nMapMode : CDrawDoc
  • m_nMax : CRulerItem , CSliderButton
  • m_nMaxSelCount : CMonthCalPage
  • m_nMaxValue : CBoundedNumberSubProp
  • m_nMaxValue1 : CBoundedNumberPairProp
  • m_nMaxValue2 : CBoundedNumberPairProp
  • m_nMDITabsBorderSize : CMDITabOptions
  • m_nMDITabsType : CMDITabOptions
  • m_nMediumDiv : CUnit
  • m_nMin : CRulerItem , CSliderButton
  • m_nMinMove : CUnit
  • m_nMinValue : CBoundedNumberSubProp
  • m_nMinValue1 : CBoundedNumberPairProp
  • m_nMinValue2 : CBoundedNumberPairProp
  • m_nMinX : CMinSize
  • m_nMinY : CMinSize
  • m_nMyAcc : CLeader
  • m_nMyCalendarsY : CCalendarBar
  • m_nMyVel : CLeader
  • m_nNewDocType : CWordPadApp , CWordPadDoc
  • m_nNumber : CBMTest3Dlg
  • m_nNumColours : CFormatBar
  • m_nNumUnits : CWordPadApp
  • m_nOpenMsg : CWordPadApp
  • m_note : CCircCtrl , CCircPropPage
  • m_Notifications : CSliderCtrlPage
  • m_notifshowcase : CTreeCtrlPage
  • m_NotifyList : CMonthCalPage
  • m_nPaletteCol : CMainFrame
  • m_nPenRadius : CWheel
  • m_nPenWidth : CStroke , CScribbleDoc , CFigCommand
  • m_nPercentDone : CMainFrame
  • m_nPitchAndFamily : CFontDesc
  • m_nPoints : CDrawPoly
  • m_nPopupSource : CDesktopAlertDemoDlg
  • m_nPreviewPage : CPadView
  • m_nPrevStyle : CDateTimePage
  • m_nPrimaryNumUnits : CWordPadApp
  • m_nPrinterChangedMsg : CWordPadApp
  • m_nPriority : CMailView
  • m_nProgressCurr : CStatusBarDemoView
  • m_nProgressValue : CMainFrame
  • m_nProgressValue1 : CMainFrame
  • m_nProgressValue2 : CMainFrame
  • m_nRadius : CWheel
  • m_nRadiusInt : CRing
  • m_nReadOnly : CPropertiesDlg
  • m_nRecalcSpeedSeconds : CRecalcThreadInfo , CRecalcDoc , CSpeedDlg
  • m_nRefCount : CPropertyBag , CTCBindHost , CExtendedControl
  • m_nRight : CFormatParaDlg
  • m_nRightMargin : CPageSetupDlg
  • m_nRows : CRibbonTableButton
  • m_nScanLine : CBitmapProperty
  • m_nScroll : CRulerBar
  • m_nSel : CFileNewDialog
  • m_nSelection : CListDlg
  • m_nSelNum : CUndoButton
  • m_nShape : CDrawRect
  • m_nShapeStyle : CStylePage
  • m_nSize : CPagerCtrlPage
  • m_nSizePercent : CSetPaneSizeView
  • m_nSmallDiv : CUnit
  • m_nString : DynaMenuDef
  • m_nStyle : CAppLookDlg
  • m_nStyle2007 : CAppLookDlg
  • m_nSum : CRecalcThreadInfo , CRecalcDoc
  • m_nSystem : CPropertiesDlg
  • m_nTabLocation : CTabControlView
  • m_nTabs : CRulerBar
  • m_nTabsStyle : CMDITabOptions
  • m_nTabStops : CSetTabStops
  • m_nTabStyle : CTabControlView
  • m_nTaskOffset : CTasksPaneView
  • m_nTaskSpacing : CTasksPaneView
  • m_nThickWidth : CPenWidthsDlg , CScribbleDoc
  • m_nThinWidth : CPenWidthsDlg , CScribbleDoc
  • m_nToolTips : CToolDlg
  • m_nTooltipStyle : CDemoOptionsPage
  • m_nTopMargin : CPageSetupDlg
  • m_nTotalDrawn : CFigure
  • m_nTotalTraces : CFigure
  • m_nTPU : CUnit
  • m_nTracesPerColor : CFigure
  • m_nTracesPerTick : CSpiroView
  • m_nTracesThisColor : CFigure
  • m_nTransparency : CDesktopAlertDemoDlg
  • m_nTTType : CTooltipDemoView
  • m_nTwipsLast : CSizeComboBox
  • m_nType : CObjectData
  • m_NumCols : CInsertTableDlg
  • m_NumRows : CInsertTableDlg
  • m_nUnits : CUnitsPage , CWordPadApp
  • m_nUsePopupHelp : CTesthelpPropPage , CTesthelpCtrl
  • m_nUserColorGroup : CTaskPane
  • m_nUserColorTask : CTaskPane
  • m_nValidNum : CMFCRibbonNumEditCtrl
  • m_nValue : CSliderButton
  • m_nVisualManager : CTasksPaneView
  • m_nVisualMngr : CDesktopAlertDemoDlg
  • m_nVMargin : CTasksPaneView
  • m_nWidth : CDlgtempDlg , CSwarm , CLineStyleMenuItem
  • m_nWidthInPixels : CSetPaneSizeView
  • m_nWordWrap : CDocOptPage , CFormatParaDlg , CDocOptions
  • m_nXPosTwips : CRulerItem
  • m_nYPosPix : CRulerItem
  • m_nZoomDenom : CSpiroView
  • m_nZoomNumer : CSpiroView
  • m_objects : CDrawDoc
  • m_oldDNDStyle : CMyListCtrl
  • m_oldRect : CCubeView
  • m_operand : CCalcDlg
  • m_operator : CCalcDlg
  • m_options : CTestContainer98App
  • m_Options : CMSNDlg , CMDITabsDemoApp
  • m_optionsIP : CWordPadApp
  • m_optionsNull : CWordPadApp
  • m_optionsRTF : CWordPadApp
  • m_optionsText : CWordPadApp
  • m_optionsWord : CWordPadApp
  • m_optionsWrite : CWordPadApp
  • m_pActiveScript : CScript , CTestContainer98Doc
  • m_pActiveScriptParse : CTestContainer98Doc , CScript
  • m_Page1 : NewControlsPropSheet , CMyPropertySheet
  • m_Page11 : COptionsDlg
  • m_Page12 : COptionsDlg
  • m_Page2 : NewControlsPropSheet , CMyPropertySheet
  • m_Page21 : COptionsDlg
  • m_Page22 : COptionsDlg
  • m_Page3 : NewControlsPropSheet , CMyPropertySheet
  • m_Page31 : COptionsDlg
  • m_Page32 : COptionsDlg
  • m_Page4 : NewControlsPropSheet , CMyPropertySheet
  • m_Page5 : NewControlsPropSheet
  • m_Page6 : NewControlsPropSheet
  • m_pagectrlpage : CAllControlsSheet
  • m_pagerctrl : CPagerCtrlPage
  • m_palColorPicker : CFormatBar , CPage2
  • m_palDIB : CDibDoc
  • m_palette : CMainFrame
  • m_PaletteBar : CToolBarCtrlPage
  • m_palSys : CPage2
  • m_pAnchor : CSpiroView
  • m_PanelImages : CMainFrame
  • m_paperColor : CDrawDoc
  • m_paperColorLast : CDrawDoc
  • m_Pat : CMainFrame , CDemoOptionsPropSheet
  • m_pBindHost : CTestContainer98Item
  • m_pBitmap : CSpiroView
  • m_pBitmapDragFigure : CSpiroView
  • m_pbitmapOld : CSpiroView
  • m_pButton : CNetAddrVerifierDlg
  • m_pButtons : CButtonDialog
  • m_pCatInfo : CComponentCategoriesDlg , CInsertControlDlg
  • m_pcf : CObjectData
  • m_pClientItem : CDrawOleObj
  • m_pClonedFrom : CEnumVariant
  • m_pClrMenu : CHTMLEdView
  • m_pContents : CEnumVariant
  • m_pControl : CExtendedControl
  • m_pCounterThread : CMutexesDlg
  • m_pCtlDispatch : CTestContainer98Item
  • m_pCurrOutlookPage : CMainFrame
  • m_pCurrOutlookWnd : CMainFrame
  • m_pCurrWorkSpace : CMainFrame
  • m_pDC : CCubeView , CTestContainer98Item , CRulerItem , CThreadView
  • m_pDCMem : CSpiroView
  • m_pdisp : CDispatchDlg
  • m_pDispatch : CMethodDlg , CScript
  • m_pDisplayThread : CMutexesDlg
  • m_pDoc : CAmbientPropertiesDlg , CContainerInfoDlg , CScriptManager , CColorOptDlg
  • m_pDocTemplateCpp : CVisualStudioDemoApp
  • m_pDocument : CDrawObj , CServerNode
  • m_pDragNode : CServerView
  • m_pDrawObj : CDrawPoly , CPolyTool , CDrawItem
  • m_pDropTarget : CTestContainer98Item
  • m_pDualAutoClikObject : CAutoDrivDlg
  • m_pEdit : CNetAddrVerifierDlg
  • m_pEditBox : COutputWindowLog
  • m_pen : CLineThread
  • m_penCur : CScribbleDoc
  • m_penSize : CRectDlg , CLineWeightDlg
  • m_pEventCP : CTestContainer98Item
  • m_pExtendedControl : CTestContainer98Item
  • m_pExtra : COnCmdMsg
  • m_pf : CFormatParaDlg , CFormatTabDlg , CFormatParaDlg
  • m_pFigureCurrent : CSpiroDoc
  • m_pFigureDrag : CSpiroView
  • m_pFindDialog : CNotepadView
  • m_pFmtMenu : CHTMLEdView
  • m_pFont : CDerEditDlg , COle2ViewApp
  • m_pFontBold : COle2ViewApp
  • m_pFontHolder : CTestContainer98Doc
  • m_pFrameWnd : CTrackFile
  • m_pFuncDesc : CSmartFuncDesc
  • m_pGotoDialog : CNotepadView
  • m_PH : CPropertySet
  • m_pHandlerInfo : COnCmdMsg
  • m_pHelpIDs : CButtonDialog
  • m_Phone : CDBVListSet
  • m_pictureButton : CSpeakNDlg
  • m_pIDOD : CImpIAdviseSink
  • m_pILDragFigure : CSpiroView
  • m_pImage : CInfoDlg
  • m_pImageHdrSmall : CListHdrDlg
  • m_pimagelist : CMyTreeCtrl
  • m_pImageList : CListHdrDlg , CComboBoxExProp
  • m_pimageListDrag : CMyListCtrl
  • m_pImageListSmall : CListHdrDlg
  • m_pInactiveDropTarget : CTestContainer98View
  • m_pInnerDispatch : CExtendedControl
  • m_pInterfaceInfo : CMethodDlg
  • m_piParamTypes : CMethodDlg
  • m_pItem : CExtendedControl
  • m_pItemToDeactivateOnLeave : CTestContainer98View
  • m_pItemWithCapture : CTestContainer98View
  • m_pItemWithFocus : CTestContainer98View
  • m_play : CCubeView
  • m_pListBox : CDateDialog
  • m_pListOut : CHuskApp
  • m_pLog : CTestContainer98Doc
  • m_pMainWnd : CMailFrame
  • m_pManager : CScript
  • m_pMethodInfo : CMethodDlg
  • m_pModalShapePropSheet : CShapesView
  • m_pModeless : CMainDlg
  • m_pModelessShapePropSheet : CShapePropSheetFrame
  • m_pNetAddr : CNetAddrVerifierDlg
  • m_pObject : CItemIcons
  • m_pObjectView : CMainFrame
  • m_pObjTreeView : CMainFrame
  • m_pODLView : CTypeLibWnd
  • m_point : CFigCommand
  • m_pointArray : CStroke
  • m_points : CDrawPoly
  • m_pOldPalette : CCubeView
  • m_pOleControl : CTestContainer98Item
  • m_pOleInPlaceObjectWindowless : CTestContainer98Item
  • m_pOleObject : CMetaFileWnd
  • m_pOptions : CTCCommandLineInfo
  • m_position : CDrawObj
  • m_pOwner : CExampleThread
  • m_pPageBkfst : CSnapView
  • m_pPageDinner : CSnapView
  • m_pPageLunch : CSnapView
  • m_pParamInfo : CMethodDlg
  • m_pParent : CCustomList , CAdderDialog
  • m_pParentMenuBar : CRibbonTooltipCtrl
  • m_pParentRibbon : CRibbonTooltipCtrl
  • m_pPointerInactive : CTestContainer98Item
  • m_pProp : CAmbientPropertiesDlg , CPropSliderCtrl
  • m_pPropertyBag : CPropertyBagDlg
  • m_pPropertyCP : CTestContainer98Item
  • m_pPropSheet : CSnapView
  • m_ppThis : CListOutputFrame
  • m_pRecalcWorkerThread : CRecalcDoc
  • m_PressedImages : CMSMToolBar
  • m_prev : CNextWizardDialog , CEndWizardDialog
  • m_prevDropEffect : CDrawView , CMainView , CServerView
  • m_prevFormat : CHTMLEdView
  • m_PreviewState : CDrawView
  • m_progctrlpage : CAllControlsSheet
  • m_Progress : CProgCtrlPage
  • m_pRoot : CServerDoc
  • m_PropList : CPropertySection
  • m_propSet : CSummInfo
  • m_pRuler : CRulerItem
  • m_pScript : CMacroDlg
  • m_pScriptManager : CMacroDlg , CTestContainer98Doc
  • m_pSection : CSummInfo
  • m_pSelectedItem : CTypeLibWnd
  • m_pSelectedNode : CServerView
  • m_pSelection : CMFCBindView , CMainView , CTestContainer98View , CContainerView
  • m_pSelItem : CRulerBar
  • m_pSelWorkSpace : CFolderListPopupWnd
  • m_pServerItem : CServerNode
  • m_pServerNode : CServerItem
  • m_pSet : CDBVListView
  • m_pShapePropFrame : CMainFrame
  • m_pShapeSelected : CShapesView
  • m_pSink : CIDataObjectDlg
  • m_pSrcView : CMainFrame
  • m_pSrcWnd : CSurface
  • m_pStartDocTemplate : CVisualStudioDemoApp
  • m_pStorage : CTestContainer98Doc
  • m_pStream : CTestContainer98Doc
  • m_pStrokeCur : CScribbleView
  • m_pSummInfo : CDrawDoc
  • m_pSurf : CSwarm
  • m_pSurface : CChildView
  • m_pSwarm : CLeader
  • m_pszRange : CMonthCalPage
  • m_pszSelection : CMonthCalPage
  • m_pszText : CRegEntry
  • m_pt : CAutoClickDoc
  • m_pTabItems : CRulerBar
  • m_ptArray : CCollectDoc
  • m_pTBButtons : CPaletteBar , CStandardBar
  • m_ptCenter : CBounceWnd , CBounceDoc
  • m_ptHotSpot : CMyListCtrl
  • m_ptHotSpotDragFigure : CSpiroView
  • m_ptLastMousePosition : CTestContainer98View
  • m_ptlb : CTypeLibTreeView , CTypeLibWnd
  • m_ptMouseDown : CMSOffice2007DemoView
  • m_ptOrigin : CMyListCtrl
  • m_ptPixel : CBounceWnd , CBounceDoc
  • m_ptPopup : CDesktopAlertDemoDlg
  • m_ptPos : CBasePiece , CRectItem
  • m_ptPosition : CExtendedControl
  • m_ptPosition1 : CLineThread
  • m_ptPosition2 : CLineThread
  • m_ptPrev : CScribbleView
  • m_pTree : CTreeItem
  • m_pTreeView : CTypeLibWnd
  • m_ptStart : CServerView
  • m_ptVelocity : CRectThread , CBallThread
  • m_ptVelocity1 : CLineThread
  • m_ptVelocity2 : CLineThread
  • m_ptWheelPos : CFigCommand
  • m_ptWheelPosFirst : CSpiroView
  • m_pTypeAttr : CSmartTypeAttr
  • m_pTypeInfo : CExtendedControl , CSmartVarDesc , CSmartTypeAttr , CSmartFuncDesc
  • m_punk : CTreeItem , CObjectData
  • m_pValidateBtn : CNetAddrVerifierDlg
  • m_pValue : CProperty
  • m_pvarCurrentParam : CMethodDlg
  • m_pVarDesc : CSmartVarDesc
  • m_pvarParams : CMethodDlg
  • m_pView : CMMXSwarmApp , CExtendedControl
  • m_pViewObject : CMetaFileWnd
  • m_pViewObjectEx : CTestContainer98Item
  • m_pViews : CMainFrame
  • m_pWebView : CMainFrame
  • m_pWheel : CSpiroView
  • m_pWindowlessDropTarget : CTestContainer98View
  • m_qqwpl : CSSE2Surface16Intrinsic
  • m_qwpl : CSSE2Surface32Intrinsic , CMMXSurface16Intrinsic , CSSE2Surface24Intrinsic
  • m_rcTrack : CRulerItem
  • m_recalcThreadInfo : CRecalcDoc
  • m_rect : CShape , CContainerItem , CTestContainer98Item
  • m_rectAnimateCtrl : CAnimateCtrlPage
  • m_rectBorder : CGDIThread
  • m_rectBound : CFigure
  • m_rectBounding : CStroke
  • m_rectCaption : CFolderListPopupWnd
  • m_rectCheck : CCheckBoxProp
  • m_rectDocumentBounds : CDrawDoc
  • m_rectFill : CMainFrame
  • m_rectImage : CPage3
  • m_rectInfo : CToolsPalette
  • m_rectInitialFrame : CWordPadApp
  • m_rectLabel : CUndoBar
  • m_rectMargin : CRulerBar
  • m_rectPageMargin : CWordPadApp
  • m_rectPosition : CBallThread , CRectThread
  • m_rectSizing : CMainFrame
  • m_replayButton : CSpeakNDlg
  • m_ResourceViewImages : CResourceViewBar
  • m_rgCo : CBasePiece
  • m_rgco : CRing , CWheel
  • m_rgcoPattern : CWheel
  • m_rgDlgItem : CMyDialogTemplate
  • m_rghItem : CTreeCtrlPage
  • m_rgNotifDescrip : CNotifyShowCase
  • m_rgnRads : CRing , CWheel
  • m_rightmargin : CRulerBar
  • m_Root : CFavoritesManager
  • m_roundness : CDrawRect
  • m_sa : CFormatMenu
  • m_scheduler_array : CSchedulerDlg
  • m_scheduler_filepath : CSchedulerDlg
  • m_sColorTable : CBrightLeader
  • m_SearchBox : CEditBar
  • m_searchHistory : CNotepadView
  • m_secondary : CComboRulerItem
  • m_SectionList : CPropertySet
  • m_selection : CDrawView
  • m_server : CScribbleApp , CAutoClickApp , CWordPadApp , CDrawApp , CTheApp , COleClientApp , CTestContainer98App , CServerApp
  • m_SH : CPropertySection
  • m_shape : CServerNode , CChangeNameDlg , CAddNodeDlg
  • m_shapecolor : CShape
  • m_shapeList : CShapesDoc
  • m_shapestyle : CShape
  • m_size : CMetaFileWnd , CDrawDoc , CExtendedControl , CRulerItem
  • m_sizeBitmap : CSpiroView , CBigIcon
  • m_sizeContent : CRectItem
  • m_sizeContentExtent : CRectItem
  • m_sizeDelta : CMyListCtrl
  • m_sizeDoc : CScribbleDoc , CDibDoc , CMainDoc
  • m_sizeExtent : CSpiroDoc
  • m_sizeIcon : CRectItem
  • m_sizeIconExtent : CRectItem
  • m_sizeImage : CMSMoneyDemoView
  • m_sizeMargins : CRibbonListFontButton , CRibbonListButton
  • m_sizeMaxText : CRibbonListButton , CRibbonListFontButton
  • m_sizeMove : CBounceWnd , CBounceDoc
  • m_sizePaper : CRulerBar
  • m_sizeRadius : CBounceWnd , CBounceDoc
  • m_sizeTotal : CBounceWnd , CBounceDoc
  • m_Slider : CSliderCtrlPage
  • m_sliderBorderSize : CPagerCtrlPage
  • m_sliderctrlpage : CAllControlsSheet
  • m_SmallImageList : CRowListView
  • m_spBrowser : CGetURL
  • m_spCurrElement : CDHtmlExploreDlg
  • m_Spin : CSpinCtrlPage
  • m_SpinCtrl : CRectDlg , CLineWeightDlg
  • m_spinctrlpage : CAllControlsSheet
  • m_splash : CTheApp
  • m_splitButton : CSplitButtonCtrlPage
  • m_splitButtonpage : CAllControlsSheet
  • m_sSaveFileName : CHTMLEdDoc
  • m_StandardBar : CToolBarCtrlPage
  • m_StateImageList : CRowListView
  • m_static1 : CDerEditDlg
  • m_static2 : CDerEditDlg
  • m_static3 : CDerEditDlg
  • m_static4 : CDerEditDlg
  • m_staticBorderSize : CPagerCtrlPage
  • m_staticIcon : CButtonDialog
  • m_staticParameterValue : CMethodDlg
  • m_staticPropertyValue : CAmbientPropertiesDlg
  • m_staticServerPath : CInsertControlDlg
  • m_staticText : CButtonDialog
  • m_statusBar : CModelessMain
  • m_StatusBar : CMainFrame
  • m_stcAccum : CDriverDlg
  • m_stcOperand : CDriverDlg
  • m_stcOperator : CDriverDlg
  • m_str : CAutoClickDoc , CMyObject , CChangeText , CTypedPtrMapView , CMapDWordToMyStructView , CTypedPtrListView , CHelloDoc , CTypedPtrArrayView , CMyStruct
  • m_str1 : CVariantMap
  • m_str2 : CVariantMap
  • m_strAbbrev : CUnit
  • m_strAccessTime : CPropertiesDlg
  • m_strAlignMode : CListHdrDlg
  • m_strAnimSpeed : CDesktopAlertDemoDlg
  • m_strAppname : CSummPage
  • m_strArray : CButtonDialog , CStringCollect
  • m_strAuthor : CSummPage
  • m_strAutoClose : CDesktopAlertDemoDlg
  • m_strCaption : CMSMCaptionBar , CFolderListPopupWnd , CDlgtempDlg , CDialogItem , CButtonDialog
  • m_strClassName : CFolderListPopupWnd
  • m_strCmt : CSummPage
  • m_strComplete : CTrackFile
  • m_strCreateDate : CStatPage
  • m_strCreationTime : CPropertiesDlg
  • m_strCtxFileName : CDHtmlExploreDlg
  • m_strCurFontName : CPage3
  • m_strCurrDir : CDHtmlExploreDlg
  • m_strCurrentCount : CDriverView
  • m_strData : CMainDoc , CInputView
  • m_strDescription : CAddNodeDlg , CChangeNameDlg , CServerNode
  • m_strDirectory : CTestContainer98Doc
  • m_strDisplayName : CTestContainer98Item
  • m_strDiv : CDBVListView
  • m_strDlgTitle : CListDlg
  • m_strDSMFile : CTCOptions
  • m_strEditTime : CStatPage
  • m_strElement : CStringListView
  • m_strFileName : CLoggingDlg , CPropertiesDlg
  • m_strFileSize : CPropertiesDlg
  • m_strFooter : CPageSetupDlg
  • m_strFooterOld : CPageSetupDlg
  • m_strHeader : CPageSetupDlg
  • m_strHeaderOld : CPageSetupDlg
  • m_strImagePath : CImagePropPage
  • m_stringList : CCollectDoc , CCollectView
  • m_strInput : CEnterDlg
  • m_strKey : CRegEntry , CTypedPtrMapView , CMapStringToStringView
  • m_strKeywd : CSummPage
  • m_strLabel : CUndoBar
  • m_strLastPrint : CStatPage
  • m_strLastSave : CStatPage
  • m_strLastType : CDriverView
  • m_strLastValue : CDriverView
  • m_strLink : CDesktopAlertDemoDlg
  • m_strLinkKey : CAddNodeDlg , CServerNode , CChangeNameDlg
  • m_strListTitle : CListDlg
  • m_strLog : CCustomFileDialog , CFileDlgWatcherDlg
  • m_strLogFileName : CTCOptions
  • m_strMacroName : CMacroDlg
  • m_strModificationTime : CPropertiesDlg
  • m_strName : CPropertyEditRequestsPage::CPropertyInfo , CNewAmbientPropertyDlg , CAmbientProperty , CMethodInfo , CFontDesc , CWorkspaceObj , CPropertyBagItem , CFavorit , CMethodParamInfo
  • m_strNumber : CMutexesDlg
  • m_strNumChars : CStatPage
  • m_strNumPages : CStatPage
  • m_strNumWords : CStatPage
  • m_strokeList : CScribbleDoc
  • m_strParsedAddr : CNetAddrVerifierDlg
  • m_strPath : CConfigDlg
  • m_strProgID : CTCOptions
  • m_strRevNum : CStatPage
  • m_strRGB : CPage2
  • m_strRGBColorBar : CPage2
  • m_strRGBColorBar2 : CPage2
  • m_strRGBColorDialog : CPage2
  • m_strRGBColorPalette : CPage2
  • m_strSavedBy : CStatPage
  • m_strSaving : CTrackFile
  • m_strScript : CFontDesc
  • m_strScriptName : CScript
  • m_strScriptText : CScript
  • m_strSectionName : CPropertySection
  • m_strSecurity : CStatPage
  • m_strSel : CDateDialog
  • m_strSelectedFolder : CPage6
  • m_strSelectedItem : CDlgtempDlg
  • m_strSortMode : CListHdrDlg
  • m_strSubj : CSummPage
  • m_strTempl : CSummPage
  • m_strText : CButtonDialog , CDesktopAlertDemoDlg
  • m_strTitle : CSummPage , CHistoryObj
  • m_strToolTip : CPage1
  • m_strTransparency : CDesktopAlertDemoDlg
  • m_strType : CPropertiesDlg
  • m_strURL : CFavorit , CHistoryObj , CLinkButton
  • m_strValue : CMapStringToStringView , CRegEntry
  • m_strValue1 : CPage4
  • m_strValue2 : CPage4
  • m_strValue3 : CPage4
  • m_strValue4 : CPage4
  • m_strValue5 : CPage4
  • m_strViewMode : CListHdrDlg
  • m_strWait : CTrackFile
  • m_stylePage : CModelessShapePropSheet , CModalShapePropSheet
  • m_swarm : CChildView
  • m_SysImageSize : CFavoritesManager
  • m_SystemHeight : CMSMCaptionBar
  • m_szBaseUnits : CFormatBar
  • m_szCurAddr : CGetURL
  • m_szDescription : CEntryInfoDlg , CMyScheduler
  • m_szDivClass : CSchedulerDlg
  • m_szEndTime : CEntryInfoDlg
  • m_szEndTimeHour : CEntryInfoDlg
  • m_szEndTimeMinute : CEntryInfoDlg
  • m_szIcon : CMSMCaptionBar
  • m_szName1 : CTesthelpPropPage , CTesthelpCtrl
  • m_szName2 : CTesthelpPropPage , CTesthelpCtrl
  • m_szName3 : CTesthelpPropPage , CTesthelpCtrl
  • m_szObjectCur : COle2ViewDoc
  • m_szOutput : CIDataObjectDlg
  • m_szProgID : CObjectData
  • m_szStartTime : CEntryInfoDlg
  • m_szStartTimeHour : CEntryInfoDlg
  • m_szStartTimeMinute : CEntryInfoDlg
  • m_szStatusText : COle2ViewApp
  • m_szText : CFindDlg , CAutoDrivDlg
  • m_szTipCaption : CTesthelpPropPage
  • m_szTitle : CEntryInfoDlg , CMyScheduler
  • m_szToolTipText : CTesthelpCtrl
  • m_tabarray : CFormatTabDlg
  • m_tabItem : CRulerBar
  • m_TableAttribs : CInsertTableDlg
  • m_tAllowWindowless : CFeaturesPage , CTestContainer98Doc , CTCOptions
  • m_targetRes : CSpeakNDlg
  • m_targetWord : CSpeakNDlg
  • m_TaskOffset : CTasksPaneView
  • m_TaskSpacing : CTasksPaneView
  • m_tBindable : CMethodInfo
  • m_tChanged : CAmbientPropertiesDlg
  • m_tDisplayAsDefault : CTestContainer98Item
  • m_tEnabled : CAmbientProperty
  • m_tException : CMethodDlg
  • m_tExpectingDSMFile : CTCCommandLineInfo
  • m_tExpectingLogFileName : CTCCommandLineInfo
  • m_tExpectingProgID : CTCCommandLineInfo
  • m_tExtendedControl : CTestContainer98Item
  • m_tFreezeEvents : CTestContainer98Doc
  • m_tHonorIgnoreActivateWhenVisible : CTestContainer98Doc , CTCOptions , CFeaturesPage
  • m_threadList : CThreadView
  • m_tIAdviseSinkEx : CInterfacesPage , CTestContainer98Doc , CTCOptions
  • m_time : CDateDialog
  • m_timeFooter : CPadView
  • m_timeHeader : CPadView
  • m_tInsideOut : CTestContainer98Item
  • m_tIOleInPlaceSiteEx : CInterfacesPage , CTestContainer98Doc , CTCOptions
  • m_tIOleInPlaceSiteWindowless : CTestContainer98Doc , CTCOptions , CInterfacesPage
  • m_Title : CDBVListSet
  • m_tLog : CMethodInfo
  • m_tLogEditRequests : CMethodInfo
  • m_tLogged : CPropertyEditRequestsPage::CPropertyInfo
  • m_toolbar : CPagerCtrlPage
  • m_toolBar : CModelessMain
  • m_ToolBar : CMainFrame
  • m_toolBarCombo : CComboToolBar
  • m_toolbarpage : CAllControlsSheet
  • m_ToolTip : CDlgToolTipsDlg , CToolBarCtrlPage
  • m_TooltipImages : CMainFrame
  • m_totalLines : CNotifyShowCase
  • m_toType : CDriverView
  • m_toValue : CDriverView
  • m_tQuickActivation : CTCOptions
  • m_tracker : CTrackerDoc , CTestContainer98Item
  • m_tree : CRegistryView , CTypeLibTreeView
  • m_treectrlpage : CAllControlsSheet
  • m_tRequestEdit : CMethodInfo
  • m_tSBindHost : CTCOptions , CServicesPage , CTestContainer98Doc
  • m_tSlowDrawing : CTestContainer98Doc
  • m_tStartOfLine : CDebugLog
  • m_tStock : CAmbientProperty
  • m_ttip : CTesthelpCtrl
  • m_tTwoPassDrawing : CTestContainer98Doc , CTCOptions , CFeaturesPage
  • m_tUseIPointerInactive : CFeaturesPage , CTCOptions , CTestContainer98Doc
  • m_tUseQuickActivation : CFeaturesPage , CTestContainer98Doc
  • m_tUserMode : CTCOptions , CTestContainer98Doc
  • m_tVisible : CExtendedControl
  • m_tWindowless : CTestContainer98Item
  • m_type : CFigCommand
  • m_Type : CTreeItem
  • m_uiBitmap : CObjectData
  • m_uiCategoryID : CMSOffice2007DemoCntrItem
  • m_uiCmd : CWorkspaceObj
  • m_uiCommand : CHistoryObj , CFavorit
  • m_uiCurrTool : CPaletteDemoDoc
  • m_uiDefaultNewAction : CWorkspaceObj
  • m_uiHilightedPage : CMainFrame
  • m_uiLine : CSliderCtrlPage
  • m_uiLineStyleCmd : COwnerDrawMenuView
  • m_uiMemid : CTreeItem
  • m_uiNextCommand : CFavorit
  • m_uiPage : CSliderCtrlPage
  • m_uiPos : CProgCtrlPage
  • m_uiRangeFrom : CSliderCtrlPage , CSpinCtrlPage , CProgCtrlPage
  • m_uiRangeTo : CProgCtrlPage , CSliderCtrlPage , CSpinCtrlPage
  • m_uiSelRangeFrom : CSliderCtrlPage
  • m_uiSelRangeTo : CSliderCtrlPage
  • m_uiStep : CProgCtrlPage
  • m_uiTickFreq : CSliderCtrlPage
  • m_uiTypeInfoCount : CDispatchDlg
  • m_ulChangeIconNotifyID : CPage6
  • m_ulRecycleBin : CFolderBar
  • m_unit : CRulerBar
  • m_units : CWordPadApp
  • m_URL : CGetURL
  • m_URLIcons : CFavorit
  • m_UserImages : CMainFrame
  • m_uTimerID : CPadView , CWordPadView
  • m_varKey : CVariantAssoc
  • m_varResult : CMethodDlg
  • m_varValue : CAmbientProperty , CVariantAssoc , CPropertyBagItem
  • m_VMargin : CTasksPaneView
  • m_vt : CMethodParamInfo
  • m_vti : CAmbientProperty
  • m_wbdShellTree : CPage6
  • m_width : CSSE2Surface24Intrinsic , CMMXSurface24Intrinsic , CMMXSurface16Intrinsic , CSSE2Surface16Intrinsic , CSSE2Surface32Intrinsic , CMMXSurface32Intrinsic
  • m_wMajorVer : CObjectData
  • m_wMinorVer : CObjectData
  • m_wnd1 : CTabControlView
  • m_wnd2 : CTabControlView
  • m_wnd3 : CTabControlView
  • m_wnd4 : CTabControlView
  • m_wndAddress : CMainFrame
  • m_wndAnimate : CMainFrame
  • m_wndANimationSpeed : CDesktopAlertDemoDlg
  • m_wndArticles : CDynamicHelpViewBar
  • m_wndAutoCloseTime : CDesktopAlertDemoDlg
  • m_wndBackColor : CStatusBarDemoView
  • m_wndBanner : CDemoOptionsPage
  • m_wndBarOutlook : CMainFrame
  • m_wndBarOutlook2003 : CMainFrame
  • m_wndBorder : CPage1
  • m_wndBorderLabel : CPage1
  • m_wndBounce : CBounceThread
  • m_wndBrowseBar : CMainFrame
  • m_wndCalendar : CMainFrame , CCalendarBar
  • m_wndCalendar2003 : CMainFrame
  • m_wndCancel : CAppLookDlg
  • m_wndCaption : CMainFrame
  • m_wndCaptionBar : CMainFrame
  • m_wndCategoryBar : CMainFrame
  • m_wndClassView : CMainFrame , CClassViewBar
  • m_wndColorBar : CPage2
  • m_wndColorBar2 : CPage2
  • m_wndColorBarFrame : CPage2
  • m_wndColorBarFrame2 : CPage2
  • m_wndColorPalette : CPage2
  • m_wndColorScheme : CDemoOptionsPage
  • m_wndCustomEdit : CPage3
  • m_wndDebugBar : CMainFrame
  • m_wndDlgBar : CMainFrame
  • m_wndDockTabColors : CAppLookDlg
  • m_wndDynamicHelpView : CMainFrame
  • m_wndEdit : CTaskPane
  • m_wndEditBar : CMainFrame
  • m_wndEditListBox : CPage3
  • m_wndExplorerBar : CMainFrame
  • m_wndFavorites : CExplorerBar
  • m_wndFileEdit : CPage3
  • m_wndFileView : CMainFrame , CFileViewBar
  • m_wndFolderEdit : CPage3
  • m_wndFolderList : CMainFrame
  • m_wndFolders : CFolderListPopupWnd , CFolderListBar , CFoldersTree
  • m_wndFoldersBar : CMainFrame
  • m_wndFont : CPage3
  • m_wndFormatBar : CInPlaceFrame , CMainFrame
  • m_wndFrom : CMyPopupDlg
  • m_wndHeight : CSurface
  • m_wndIcons : CDesktopAlertDemoDlg
  • m_wndImageArea : CPage3
  • m_wndInfoBar : CMainFrame
  • m_wndLabel1 : CDesktopAlertDemoDlg
  • m_wndLabel2 : CDesktopAlertDemoDlg
  • m_wndLabel3 : CDesktopAlertDemoDlg
  • m_wndLink : CDesktopAlertDemoDlg
  • m_wndLinksBar : CMainFrame
  • m_wndLinksBars : CMainFrame
  • m_wndList : CUndoBar , CPage5 , CExplorerView
  • m_wndList1 : COutputBar
  • m_wndList2 : COutputBar
  • m_wndList3 : COutputBar
  • m_wndLum : CPage2
  • m_wndMacroBar : CMainFrame
  • m_wndMailBar : CMailFrame
  • m_wndMainBar : CMainFrame
  • m_wndMaskEdit1 : CPage4
  • m_wndMaskEdit2 : CPage4
  • m_wndMaskEdit3 : CPage4
  • m_wndMaskEdit4 : CPage4
  • m_wndMaskEdit5 : CPage4
  • m_wndMenuBar : CMailFrame , CMainFrame , CInPlaceFrame
  • m_wndMessageBar : CMainFrame
  • m_wndNotifications : CTabControlView
  • m_wndObjectCombo : CPropertiesViewBar
  • m_wndOK : CAppLookDlg
  • m_wndOneNoteTabs : CAppLookDlg
  • m_wndOutlookBar2003 : CAppLookDlg
  • m_wndOutlookPane1 : CMainFrame
  • m_wndOutlookPane12003 : CMainFrame
  • m_wndOutlookPane2 : CMainFrame
  • m_wndOutlookPane22003 : CMainFrame
  • m_wndOutput : COutputViewBar , CMainFrame
  • m_wndOutputBuild : COutputBar
  • m_wndOutputDebug : COutputBar
  • m_wndOutputFind1 : COutputBar
  • m_wndOutputFind2 : COutputBar
  • m_wndOutputSQL : COutputBar
  • m_wndOutputView : CMainFrame
  • m_wndPalette : CMainFrame
  • m_wndPaletteBar : CMainFrame
  • m_wndPreview : CModalShapePropSheet
  • m_wndPropertiesBar : CMainFrame
  • m_wndPropList : CWorkspaceBar , CPropertiesViewBar , CPage5
  • m_wndPropListLocation : CPage5
  • m_wndReBar : CMainFrame
  • m_wndResizeBar : CInPlaceFrame
  • m_wndResourceBar : CMainFrame
  • m_wndResourceView : CResourceViewBar , CMainFrame
  • m_wndRibbonBar : CMainFrame
  • m_wndRoundedTabs : CAppLookDlg
  • m_wndRulerBar : CMainFrame , CInPlaceFrame
  • m_wndShellList : CPage6
  • m_wndShellTree : CFolderBar
  • m_wndShortcutsBar : CMainFrame
  • m_wndShortcutsPane1 : CMainFrame
  • m_wndSizeToolBar : CMainFrame
  • m_wndSlider : CSliderButton
  • m_wndSplitter : CMainFrame , C3WaySplitterFrame , CTypeLibWnd , CSplitFrame , CChildFrame , CMainFrame , CSplitterFrame , CMainFrame , CSplitFrame
  • m_wndSplitter2 : C3WaySplitterFrame
  • m_wndStartAnimation : CStatusBarDemoView
  • m_wndStartProgress : CStatusBarDemoView
  • m_wndStatusBar : CTypeLibWnd , CMainFrame , CMailFrame
  • m_wndStyle : CAppLookDlg
  • m_wndStyle2007 : CAppLookDlg
  • m_wndStyleBar : CMainFrame
  • m_wndTab : CTabControlView
  • m_wndTabIcons : CTabControlView
  • m_wndTabLoc : CTabControlView
  • m_wndTabs : CWorkspaceBar , COutputBar
  • m_wndTaskPane : CMainFrame
  • m_wndText : CDesktopAlertDemoDlg
  • m_wndTextColor : CStatusBarDemoView
  • m_wndToolBar : COutputBar , CDynamicHelpViewBar , CClassViewBar , CInPlaceFrame , CTypeLibWnd , CWorkspaceBar , CPropertiesViewBar , CFileViewBar , CMainFrame , CMailFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • m_wndToolBarAdvanced : CMainFrame
  • m_wndToolbarBuild : CMainFrame
  • m_wndToolbarEdit : CMainFrame
  • m_wndToolbarResource : CMainFrame
  • m_wndToolBarSpiro : CMainFrame
  • m_wndToolBarTheme : CMainFrame
  • m_wndToolBarWeb : CMainFrame
  • m_wndToolTip : CPage1
  • m_wndTransparency : CDesktopAlertDemoDlg
  • m_wndTree : CTaskPane , CWorkspaceBar2 , CMainFrame , CWorkspaceBar
  • m_wndTree1 : CWorkspaceBar
  • m_wndTree2 : CWorkspaceBar
  • m_wndTree2003 : CMainFrame
  • m_wndUndoBar : CUndoMenu
  • m_wndView : CMainFrame
  • m_wndWatch : CWatchBar
  • m_wndWatchBar : CMainFrame
  • m_wndWidth : CSurface
  • m_wndWorkSpace : CMainFrame
  • m_wndWorkSpace2 : CMainFrame
  • m_wndXPButtons : CPage1
  • m_wParseStyle : CParsedEdit
  • m_wpPrev : CMainFrame
  • m_WrittenBy : CAboutDlg
  • m_wStyle : CButtonDialog
  • m_x : CDlgtempDlg , CAutoClickPoint , CPointArrayView , CAutoDrivDlg
  • m_xSize : CSplitButtonCtrlPage
  • m_y : CAutoClickPoint , CAutoDrivDlg , CPointArrayView , CDlgtempDlg
  • m_year : CSchedulerDlg
  • m_ySize : CSplitButtonCtrlPage
  • m_zoomDenom : CServerView
  • m_zoomNum : CServerView
  • m_zoomX : CZoomDlg
  • m_zoomY : CZoomDlg
  • MailFrame : COutlookDemoApp
  • MainFrame : COutlookDemoApp
  • MakeNewBall() : CBounceWnd , CBounceView
  • MakeShortString() : CListViewEx
  • MapType() : CWordPadDoc
  • MatchDocType() : CHierSvrDocTemplate
  • MatchFont() : CFontComboBox
  • MDITabbedGroups : CMDITabOptions
  • MDITabsStandard : CMDITabOptions
  • MDITabsType : CMDITabOptions
  • MeasureItem() : CIconComboBox , CColorMenu , CFontComboBox , CXlistCtrl , CColorMenu , CColorListBox , CCustomList
  • menu : CBounceMDIChildWnd , CBounceWnd , CHelloWnd
  • MixColors() : CHelloView , CBounceView
  • ModifyHeaderItems() : CListHdrDlg
  • MonikerBindToObject() : CTCBindHost
  • MonikerBindToStorage() : CTCBindHost
  • Move() : CTestContainer98Item , CRectItem
  • MoveFigure() : CFigure
  • MoveHandleTo() : CDrawPoly , CDrawRect , CDrawObj , CDrawRect
  • MovePiece() : CBasePiece , CWheel
  • MoveTo() : CDrawObj , CDrawPoly , CDrawOleObj , CDrawPoly , CDrawObj , CDrawOleObj
  • ms : tagABSTIME
  • MSMDrawCaptionButton() : CMSMVisualManager
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- n -

  • Name() : TCPropsLib::ITCExtendedControl
  • Named : CNetAddrVerifierDlg
  • nBaseLine : tagRCRESULT
  • nCode : notif_tag
  • NeedText() : CStandardBar , CPaletteBar
  • NewControlsPropSheet() : NewControlsPropSheet
  • NewDocument() : CSourceView
  • NewStroke() : CScribbleDoc
  • Next() : CEnumVariant
  • nextButton : CBMTest3Dlg
  • nFirstBox : tagSYG
  • nID : DocType
  • nInkWidth : tagRC , tagPENDATAHEADER
  • nLeft : tagCOLUMNSTRUCT
  • nLevel : tagITEMDATA
  • nMidLine : tagRCRESULT
  • NoKind : CNetAddrVerifierDlg
  • None : CMDITabOptions
  • normal : CDrawObj
  • NotifyCommand() : CFindComboButton
  • NotifyHighlightListItem() : CRibbonTableButton
  • NotifyOwner() : CFormatBar
  • NotifyPrinterChanged() : CWordPadApp
  • nRight : tagCOLUMNSTRUCT
  • nSamplingDist : tagPENINFO
  • nSamplingRate : tagPENINFO
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- o -

  • ObjectAt() : CDrawDoc
  • okButton : CBMTest3Dlg
  • On10newballs() : CThreadView
  • On10newlines() : CThreadView
  • On10newrectangles() : CThreadView
  • On25newballs() : CThreadView
  • On25newlines() : CThreadView
  • On25newrectangles() : CThreadView
  • OnAbout() : CMainWindow , CListHdrDlg
  • OnActivate() : CRectItem , CTestContainer98Item , CDrawItem , CMainFrame , CFolderListPopupWnd , CMailFrame , CMainFrame , CContainerItem , CShapePropSheetFrame , CDrawItem , CMFCBindCntrItem
  • OnActivateApp() : CFolderListPopupWnd
  • OnActivateUI() : CTestContainer98Item
  • OnActivateView() : CDibView , CColorView , CHTMLEdView , CSourceView , CDrawView , CExplorerView
  • OnAdd() : CDWordArrayView , CIntListView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CDriverView
  • OnAddNode() : CServerView
  • OnAddOrUpdate() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView
  • OnAddressBook() : COutlookDemoDoc
  • OnAltdrag() : CToolBarCtrlPage
  • OnAlways() : CPropertyEditRequestsPage
  • OnAmbientPropertyChange() : CLocalizeCtrl , CTimeCtrl , CXlistCtrl , CTestContainer98Item
  • OnAnimatePos() : CAutoDrivDlg
  • OnAnimateXY() : CAutoDrivDlg
  • OnAnimation() : CTasksPaneView
  • OnAnyChange() : CSpinCtrlPage
  • OnAppAbout() : CCtrlbarsApp , CWorkSpaceToolBarApp , CTestApp , CDBVListApp , CDibLookApp , CDockApp , CDynaMenuApp , CMdiApp , CMDIApp , CMMXSwarmApp , CMultiPadApp , CNotepadApp , CPropDlgApp , CRowListApp , CScribbleApp , CCImageApp , CSnapApp , CSpiroApp , CTrackerApp , CViewExApp , CHTMLEditApp , CMfcieApp , CAutoClickApp , CDrawApp , CServerApp , CInProcApp , CDriveApp , CMFCBindApp , COleClientApp , CIViewersApp , CTypeLibWnd , COle2ViewApp , CTheApp , CTestContainer98App , CWordPadApp , CCustomPagesApp , CDrawApp , CDynamicMenuApp , CExplorerApp , CIEDemoApp , CMDITabsDemoApp , CMenuSubSetApp , CMSMoneyDemoApp , CMSOffice2007DemoApp , COutlookDemoApp , COutlookMultiViewsApp , COwnerDrawMenuApp , CPaletteDemoApp , CCollectApp , CRebarTestApp , CRibbonGadgetsApp , CCubeApp , CRibbonMDIDemoApp , CRollupPaneApp , CHuskApp , CSetPaneSizeApp , CSliderApp , CScreenCapApp , CStateCollectionApp , CStatusBarDemoApp , CThreadApp , CTabbedViewApp , CTabControlApp , CMdiApp , CTasksPaneApp , CToolbarDateTimePickerApp , CRecalcApp , CTooltipDemoApp , CTrayMenuDlg , CContainerApp , CVisualStudioDemoApp , CWordPadApp
  • OnAppExit() : CTrayMenuDlg
  • OnAppLook() : CMainFrame , CAppLookDlg , CMainFrame , CAppLookDlg
  • OnApply() : CSpinCtrlPage , CAppLookDlg
  • OnApplyNow() : CModalShapePropSheet
  • OnApplyParams() : CTooltipDemoView
  • OnApplyScale() : COlePropertiesEx
  • OnAppOpen() : CTrayMenuDlg
  • OnAskQuestion() : CMainFrame
  • OnAutoArrange() : CListHdrDlg
  • OnAutoClose() : CDesktopAlertDemoDlg
  • OnAutoplay() : CAnimateCtrlPage
  • OnAutoSizeChanged() : CImageCtrl
  • OnAutoticks() : CSliderCtrlPage
  • OnBackColor() : CStatusBarDemoView
  • OnBadInput() : CParsedEdit
  • OnBarKillFocus() : CWordPadView
  • OnBarReturn() : CWordPadView
  • OnBarSetFocus() : CWordPadView
  • OnBarState() : CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • OnBasic() : CVarUseDlg
  • OnBeforeNavigate2() : CMfcieView , CIEDemoView
  • OnBeginDrag() : CMyTreeCtrl , CMyListCtrl
  • OnBeginPrinting() : CCollectView , CRecalcView , CContainerView , CDynaMenuView , CNotepadView , CShapesView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawView , CPadView , CCustomPagesView , CDrawView , CDynamicMenuView , CIEDemoView , CMDITabsDemoView , CMenuSubSetView , CMSMoneyDemoView , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWorkSpaceToolBarView
  • OnBlack() : CSpiroView
  • OnBlockFmtDropdown() : CMainFrame
  • OnBlue() : CSpiroView
  • OnBnClickedBrowse() : CConfigDlg
  • OnBnClickedButton1() : CNetAddrVerifierDlg , CTaskDialogTestDlg
  • OnBnClickedButton2() : CTaskDialogTestDlg
  • OnBnClickedButton3() : CTaskDialogTestDlg
  • OnBnClickedButton4() : CTaskDialogTestDlg
  • OnBnClickedButton5() : CTaskDialogTestDlg
  • OnBnClickedButton6() : CTaskDialogTestDlg
  • OnBnClickedButton7() : CTaskDialogTestDlg
  • OnBnClickedButton8() : CTaskDialogTestDlg
  • OnBnClickedButtonValidate() : CNetAddressCtrlPage
  • OnBnClickedCheckElev() : CCommandLinkCtrlPage
  • OnBnClickedCheckState() : CSplitButtonCtrlPage
  • OnBnClickedClearLog() : CFileDlgWatcherDlg
  • OnBnClickedCreateDlg() : CFileDlgWatcherDlg
  • OnBnClickedSetButtonNote() : CCommandLinkCtrlPage
  • OnBnClickedSetButtonSize() : CPagerCtrlPage
  • OnBnClickedSetMenu1() : CSplitButtonCtrlPage
  • OnBnClickedSetMenu2() : CSplitButtonCtrlPage
  • OnBnClickedSetSize() : CSplitButtonCtrlPage
  • OnBnClickedSplitButton() : CSplitButtonCtrlPage
  • OnBorderType() : CWordPadView
  • OnBounce() : CMainFrame
  • OnBrowse() : CAnimateCtrlPage , CDHtmlExploreDlg , CCustomEditListBox , CMyBrowseEdit
  • OnBtnSetHeightInPixels() : CSetPaneSizeView
  • OnBtnSetWidthInPixels() : CSetPaneSizeView
  • OnButton() : CPage1
  • OnButton1() : CDriverView , CMSNDlg , CMyPopupDlg
  • OnButton2() : CDriverView
  • OnButtonCancel() : CEntryInfoDlg
  • OnButtonClear() : CEntryInfoDlg
  • OnButtonClearAll() : CSchedulerDlg
  • OnButtonDelete() : CEntryInfoDlg
  • OnButtonGet() : CPage4
  • OnButtonInformation() : CDlgtempDlg
  • OnButtonMenu() : CPage1
  • OnButtonModify() : CEntryInfoDlg
  • OnButtonSave() : CEntryInfoDlg
  • OnButtonSetContainerSize() : CSetPaneSizeView
  • OnButtonSetDlgBarSize() : CSetPaneSizeView
  • OnButtonUp() : CMyTreeCtrl , CMyListCtrl
  • OnCalcSize() : CPagerCtrlPage
  • OnCalculateSize() : CMSMCategoryBarButton , CMSMLinksBarButton , CLineStyleMenuItem , CSliderButton
  • OnCallTimerTick() : CSpiroView
  • OnCancel() : CModelessDialog , CCustomFileDialog , CAdderDialog , CGotoDlg , CDrawTool , CPolyTool , CCalcDlg , CDrawTool , CPolyTool
  • OnCancelEdit() : CDrawView
  • OnCancelEditCntr() : CContainerView , CMFCBindView , CTestContainer98View
  • OnCancelEditSrvr() : CScribbleView , CWordPadView
  • OnCancelInplace() : CServerDoc , CMainView , CPadDoc
  • OnCancelMode() : CLocalizeCtrl , CTestContainer98View , CFolderListPopupWnd
  • OnCaptionicon() : CTasksPaneView
  • OnCaptureChanged() : CTestContainer98View
  • OnCategorie() : CMainFrame
  • OnCbnSelchangeBackColor() : CPagerCtrlPage
  • OnCenter() : CAnimateCtrlPage
  • OnChange() : CContainerItem , CDrawItem , CChangeNameDlg , CAddNodeDlg , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CDrawItem
  • OnChangeActiveTab() : CTabControlView , CClassViewBar
  • OnChangeAlign() : CListHdrDlg
  • OnChanged() : CTestContainer98Item
  • OnChangeData() : CMainDoc
  • OnChangedSel() : CGuidGenDlg
  • OnChangeEdselrange() : CMonthCalPage
  • OnChangeFolder() : CExplorerView
  • OnChangeItemPosition() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CDrawItem
  • OnChangeLayout() : CMainFrame
  • OnChangeLook() : CMailFrame , CMainFrame
  • OnChangeMargins() : CTasksPaneView
  • OnChangeName() : CServerView
  • OnChangeObjectProps() : CShapesView
  • OnChangeParentWnd() : CSliderButton , CUndoButton
  • OnChangeRibbonCategory() : CMainFrame
  • OnChangeSize() : CChildView
  • OnChangeSort() : CListHdrDlg
  • OnChangeStyle() : CMainFrame
  • OnChangeSystemIcon() : CPage6
  • OnChangeView() : CListHdrDlg
  • OnChangeVisualStyle() : CClassViewBar , CDynamicHelpViewBar , CFileViewBar , CPropertiesViewBar , CResourceViewBar
  • OnChangingActiveTab() : CTabControlView
  • OnChar() : CParsedEdit , CMainView , CTestContainer98View
  • OnCharColor() : CInPlaceFrame , CMainFrame , CWordPadView
  • OnCharStrikeThrough() : CMSOffice2007DemoView
  • OnChildNotify() : CStandardBar , CPaletteBar , CEmpView
  • OnChooseColor() : CAmbientPropertiesDlg , CMethodDlg
  • OnChooseFont() : CPadView , CAmbientPropertiesDlg , CMethodDlg
  • OnChoosePrintFont() : CPadView
  • OnCircleShapeChanged() : CCircCtrl
  • OnCkappcanparse() : CDateTimePage
  • OnCkdaystate() : CMonthCalPage
  • OnCklongdateformat() : CDateTimePage
  • OnCknotoday() : CMonthCalPage
  • OnCknotodaycircle() : CMonthCalPage
  • OnCkshortdateformat() : CDateTimePage
  • OnCkshownone() : CDateTimePage
  • OnCktimeformat() : CDateTimePage
  • OnCkupdown() : CDateTimePage
  • OnCkweeknumbers() : CMonthCalPage
  • OnClassAddMemeberFunction() : CClassViewBar
  • OnClassAddMemeberVariable() : CClassViewBar
  • OnClassDefinition() : CClassViewBar
  • OnClassProperties() : CClassViewBar
  • OnClear() : COutputWindowView
  • OnClickButton() : CTwoButtonsProp , CCustomDlgProp
  • OnClickCalendar() : CSchedulerDlg
  • OnClickedClear() : CCalcDlg , CFormatTabDlg
  • OnClickedClearAll() : CFormatTabDlg
  • OnClickedDivide() : CCalcDlg
  • OnClickedEqual() : CCalcDlg
  • OnClickedMinus() : CCalcDlg
  • OnClickedNumber() : CCalcDlg
  • OnClickedPlus() : CCalcDlg
  • OnClickedSet() : CFormatTabDlg
  • OnClickedTimes() : CCalcDlg
  • OnClickFile() : CDHtmlExploreDlg
  • OnClickFolder() : CDHtmlExploreDlg
  • OnClickName() : CCheckBoxProp
  • OnClickNewElements() : CSchedulerDlg
  • OnClickTime() : CSchedulerDlg
  • OnClickTimeDesc() : CSchedulerDlg
  • OnClose() : CMutexesDlg , CModelessMain , CWndListDlg , CMainFrame , CShapePropSheetFrame , CAutoDrivDlg , CTypeLibWnd , CMainFrame , CMSOffice2007DemoDoc , CMailFrame , CMainFrame
  • OnCloseDocument() : CHTMLEdDoc , CMFCBindDoc , COle2ViewDoc , CWordPadDoc
  • OnCloseFoldersPopup() : CMainFrame
  • OnClosePopup() : CDesktopAlertDemoDlg
  • OnCloseup() : CGetURL
  • OnCmdMsg() : CMainFrame , CBounceMDIChildWnd , CDynaMenuDoc , CMainFrame , CWordPadDoc
  • OnCmultiselect() : CMonthCalPage
  • OnCollapsegroups() : CTasksPaneView
  • OnColor() : CHelloView , CBounceWnd , CHelloWnd , CBounceWnd , CHelloWnd , CBounceView , CHelloView , CTabControlView
  • OnColorBar() : CPage2
  • OnColorBar2() : CPage2
  • OnColorClicked() : CColorPage
  • OnColorDlg() : CPage2
  • OnColorGrouptext() : CTasksPaneView
  • OnColorGrouptexthot() : CTasksPaneView
  • OnColorOptions() : CDynaMenuDoc
  • OnColorPalette() : CPage2
  • OnColorPick() : CWordPadView
  • OnColorPicker() : CPage2
  • OnColorRows() : CPage5
  • OnColorTasktext() : CTasksPaneView
  • OnColorTasktexthot() : CTasksPaneView
  • OnColumnClick() : CEmpView
  • OnComboCloseUp() : CFormatBar
  • OnComboSetFocus() : CFormatBar
  • OnCommand() : CTestWindow , CButtonDialog , CMSMCaptionBar , CMainFrame , CButtonDialog , CMainFrame
  • OnCommand1() : CWorkspaceBar
  • OnCommand2() : CWorkspaceBar
  • OnCommand3() : CWorkspaceBar
  • OnCommandControlClick() : CNextWizardDialog , CWizardDialog
  • OnCommandHelp() : CObjTreeView , CMyListBox
  • OnCommandHistory() : CExplorerDoc
  • OnCompareItems() : CMyListCtrl
  • OnContact() : CResourcePage
  • OnContainerAmbientProperties() : CTestContainer98Doc
  • OnContainerInfo() : CTestContainer98Doc
  • OnContainerOptions() : CTestContainer98Doc
  • OnContainerTabOrder() : CTestContainer98Doc
  • OnContextBrowse() : CDHtmlExploreDlg
  • OnContextExit() : CDHtmlExploreDlg
  • OnContextMenu() : CView3 , COwnerDrawMenuView , CRibbonGadgetsView , CRibbonMDIDemoView , CSetPaneSizeView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CView2 , CView3 , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CClassViewBar , CFileViewBar , COutputList1 , COutputList , CResourceViewBar , CWordPadView , CWorkSpaceToolBarView , CDrawView , CAmbientPropertiesDlg , CComponentCategoriesDlg , CContainerInfoDlg , CEventLoggingPage , CFeaturesPage , CInterfacesPage , CInsertControlDlg , CLoggingDlg , CMacroDlg , CMethodDlg , CNewAmbientPropertyDlg , COutputWindowView , CPropertyBagDlg , CPropertyChangesPage , CPropertyEditRequestsPage , CRegisterControlsDlg , CServicesPage , CTabOrderDlg , CTestContainer98View , CCustomPagesView , CDrawView , CDynamicMenuView , CMDITabsDemoView , CMenuSubSetView , CMSMCaptionBar , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2
  • OnContextMenuAction() : CHTMLEdView
  • OnContextProperties() : CDHtmlExploreDlg
  • OnControlActivate() : CTestContainer98View
  • OnControlDeactivate() : CTestContainer98View
  • OnControlDrawMetaFile() : CTestContainer98View
  • OnControlInfoChanged() : CTestContainer98Item
  • OnControlInvokeMethods() : CTestContainer98View
  • OnControlLogging() : CTestContainer98View
  • OnControlSaveToPropertyBag() : CTestContainer98View
  • OnControlSaveToStorage() : CTestContainer98View
  • OnControlSaveToStream() : CTestContainer98View
  • OnControlsDblClk() : CInsertControlDlg
  • OnControlsSelChange() : CInsertControlDlg
  • OnControlUIActivate() : CTestContainer98View
  • OnControlUIDeactivate() : CTestContainer98View
  • OnCopy() : COutputWindowView
  • OnCopyTo() : CExplorerView
  • OnCreate() : CMainFrame , CCubeView , CMainFrame , CListOutputFrame , CMainFrame , CThreadView , CBounceWnd , CMainFrame , CBounceWnd , CBounceView , CMainFrame , CTBComboBox , CMainFrame , CShapePropSheetFrame , CMainFrame , CInPlaceFrame , CMainFrame , CAddressCombo , CEditToolbar , CMainFrame , CSourceView , CMainFrame , CAutoDrivDlg , CMainFrame , CAutoDrivDlg , CMainFrame , CDrawView , CMainFrame , CInPlaceFrame , CMainFrame , CServerView , CMainFrame , CObjListView , CMainFrame , CMainView , CTypeLibListView , CTypeLibTreeView , CTypeLibWnd , CMainFrame , CObjTreeView , CDropTargetView , CInPlaceFrame , CMainFrame , CPadView , CMainFrame , COutputWindowView , CTestContainer98View , CButtonDialog , CLocalComboBox , CFormatBar , CInPlaceFrame , CMainFrame , CWordPadView , CMainFrame , CDrawView , CMainFrame , CPropertiesViewBar , CMainFrame , CExplorerView , CFolderBar , CMainFrame , CExplorerBar , CLinksBar , CMainFrame , CWorkspaceBar , CMainFrame , CMSMCategoryBar , CMSMMenuBar , CMSMoneyDemoView , CMSMTasksPane , CMSMToolBar , CMainFrame , CRibbonTooltipCtrl , CTaskPane , CCalendarBar , CFolderListBar , CFolderListPopupWnd , CFoldersTree , CMailFrame , CMainFrame , COutlookDemoView , CMainFrame , COutputBar , CRibbonGadgetsView , CMainFrame , COutputBar , CWorkspaceBar , CWorkspaceBar2 , CMainFrame , CWorkspaceBar , CMainFrame , COutputBar , CWorkspaceBar , CMainFrame , CTabbedViewView , CMainFrame , CTaskPane , CMainFrame , CMyToolTipCtrl , CChildFrame , CClassViewBar , CDynamicHelpViewBar , CFileViewBar , CMainFrame , COutputBar , COutputViewBar , CPropertiesViewBar , CResourceViewBar , CUndoBar , CUndoMenu , CWatchBar , CButtonDialog , CInPlaceFrame , CMainFrame , CRulerBar , CTaskPane , CWordPadView , CMainFrame , CWorkspaceBar
  • OnCreateClient() : CMainFrame , CChildFrame , CSplitterFrame , C3WaySplitterFrame , CMainFrame , CSplitFrame , CMainFrame , CSplitFrame , CTypeLibWnd , CMainFrame , CSplitFrame , CMainFrame
  • OnCreateControlBars() : CInPlaceFrame
  • OnCreated() : CMMXSurface32Intrinsic , CMMXSurface24Intrinsic , CMMXSurface16Intrinsic , CSSE2Surface32Intrinsic , CSSE2Surface24Intrinsic , CSSE2Surface16Intrinsic , CSurface
  • OnCtlColor() : CTCSplitter , CMailBar
  • OnCurrency() : CVarUseDlg
  • OnCustom() : CHelloView
  • OnCustomColor() : CHelloView , CBounceWnd , CHelloWnd , CBounceWnd , CHelloWnd , CBounceView
  • OnDataAvailable() : CBitmapProperty
  • OnDataChange() : CInputView
  • OnDate() : CVarUseDlg , CMainFrame
  • OnDblClk() : CCheckBoxProp
  • OnDblclkDatedialogList() : CDateDialog , CFileNewDialog , CDateDialog , CFileNewDialog
  • OnDblClkFormatEtc() : CIDataObjectDlg
  • OnDDECommand() : CWordPadApp
  • OnDeactivate() : CTestContainer98Item
  • OnDeactivateUI() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CWordPadDoc , CDrawItem , CWordPadDoc
  • OnDefaultPenWidths() : CPenWidthsDlg
  • OnDefWindowMessage() : CTestContainer98Item
  • OnDelegatedCmdMsg() : CBounceWnd
  • OnDelete() : CMyPopupDlg
  • OnDeleteItemTreeView() : CRegistryView
  • OnDeleteScheduleDisplay() : CSchedulerDlg
  • OnDeltaposSpinAfter() : CFormatParaDlg
  • OnDeltaposSpinBefore() : CFormatParaDlg
  • OnDemoDemo1() : CMenuSubSetView
  • OnDemoDemo2() : CMenuSubSetView
  • OnDemoIt() : CDlgtempDlg
  • OnDemoThread() : CRecalcDoc
  • OnDescriptionArea() : CPage5
  • OnDeselect() : CTestContainer98Item
  • OnDestroy() : CCubeView , CThreadView , CBounceWnd , CTimeCtrl , CMyTreeCtrl , CChildView , CDrawView , CMFCBindView , CObjListView , CMainView , CIDataObjectDlg , CTypeLibListView , CTypeLibODLView , CTypeLibTreeView , CTypeLibWnd , CMainFrame , CObjTreeView , CMainFrame , CTestContainer98View , CFontComboBox , CFormatBar , CInPlaceFrame , CWordPadView , CDrawView , CFolderBar , CIEDemoView , CMSOffice2007DemoView , CPage6 , COutputBar , CRibbonGadgetsView , CTasksPaneView , CInPlaceFrame , CWordPadView
  • OnDevModeChange() : CMainFrame
  • OnDhelp1() : CDynamicHelpViewBar
  • OnDhelp2() : CDynamicHelpViewBar
  • OnDhelp3() : CDynamicHelpViewBar
  • OnDialogAbout() : CPage1
  • OnDisabledDragDrop() : CTreeCtrlPage
  • OnDisableUpdate() : CStartView
  • OnDisplayChanged() : CHTMLEdView
  • OnDocumentComplete() : CDHtmlExploreDlg , CGetURL , CHTMLEdView , CMfcieView , CEntryInfoDlg , CSchedulerDlg , CIEDemoView
  • OnDoGetData() : CIDataObjectDlg
  • OnDoRealize() : CDibView
  • OnDotNetLook() : CPage5
  • OnDragEnter() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDragLeave() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDragOver() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDraw() : CCollectView , CCubeView , CHelloView , CThreadView , CButtonCtrl , CCircCtrl , CContainerView , CImageCtrl , CLicensedCtrl , CLocalizeCtrl , CPalCtrl , CPushCtrl , CSpindialCtrl , CTesthelpCtrl , CTimeCtrl , CXlistCtrl , CDibView , CDockView , CDynaMenuView , CBounceView , CHelloView , CNotepadView , CShapesView , CScribbleItem , CScribbleView , CSnapView , CSpiroView , CTrackerView , CTextView , CColorView , CSourceView , CMfcieView , CAutoClickView , CDrawView , CServerItem , CServerView , CMFCBindView , CObjListView , CMainView , CTypeLibListView , CTypeLibODLView , CTypeLibTreeView , CObjTreeView , CEmbeddedItem , COutputWindowView , CTestContainer98View , CEmbeddedItem , CCustomPagesView , CMSNDlg , CDrawView , CDynamicMenuView , CExplorerView , CIEDemoView , CToolbarLabel , CMDITabsDemoView , CMSMCaptionBarButton , CMSMCategoryBarButton , CMSMLinksBarButton , CMSMoneyDemoView , COutlookDemoView , CPreviewPane , COutlookMultiViewsView , CView1 , CView2 , CView3 , CLineStyleMenuItem , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonGadgetsView , CRibbonMDIDemoView , CRollupPaneView , CSliderButton , CSliderView , CStateCollectionView , CTabbedViewView , CView1 , CView2 , CView3 , CView4 , CToolbarLabel , CToolbarDateTimePickerView , CClassViewMenuButton , CStartView , CEmbeddedItem , CWorkSpaceToolBarView
  • OnDrawButton() : CCheckBoxProp , CTwoButtonsProp
  • OnDrawButtonBorder() : CMSMVisualManager
  • OnDrawCheckBox() : CCheckBoxProp
  • OnDrawComboBorder() : CMSMVisualManager
  • OnDrawComboDropButton() : CMSMVisualManager
  • OnDrawDescription() : COwnerDrawDescrProp
  • OnDrawEllipse() : CDrawView
  • OnDrawEx() : CEmbeddedItem
  • OnDrawIcon() : CCustomToolTipCtrl , CRibbonTooltipCtrl , CMyToolTipCtrl
  • OnDrawItem() : CIDataObjectDlg , CIconCombo
  • OnDrawLine() : CDrawView
  • OnDrawMenuBorder() : CMSMVisualManager
  • OnDrawMenuImage() : CMainFrame
  • OnDrawName() : CCheckBoxProp
  • OnDrawPageHeader() : CDemoOptionsPropSheet , CMyPropertySheet
  • OnDrawPaletteIcon() : CRibbonListButton , CRibbonListFontButton , CRibbonTableButton
  • OnDrawPattern() : CSpiroView
  • OnDrawPolygon() : CDrawView
  • OnDrawPopupWindowBorder() : CMSNVisualManager
  • OnDrawPopupWindowCaption() : CMSNVisualManager
  • OnDrawRect() : CDrawView
  • OnDrawRoundRect() : CDrawView
  • OnDrawSelect() : CDrawView
  • OnDrawSeparator() : CMSMVisualManager , CMyToolTipCtrl
  • OnDrawTask() : CMSMVisualManager
  • OnDrawTasksGroupAreaBorder() : CMSMVisualManager
  • OnDrawUsingFont() : CPage3
  • OnDrawValue() : CCheckBoxProp , CIconListProp
  • OnDrop() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDropDown() : CMainFrame
  • OnDropFiles() : CMainFrame
  • OnDropPiece() : CSpiroView
  • OnDropRing() : CSpiroView
  • OnDropWheel() : CSpiroView
  • OnDTNotify() : CDateTimePage
  • OnDummy() : CMainFrame
  • OnDummyBuild() : CVisualStudioDemoDoc
  • OnDummyClean() : CVisualStudioDemoDoc
  • OnDummyCompile() : CFileViewBar , CVisualStudioDemoDoc
  • OnDummyExecute() : CVisualStudioDemoDoc
  • OnDummyGo() : CVisualStudioDemoDoc
  • OnDummyRebuildAll() : CVisualStudioDemoDoc
  • OnDummyRemoveAllBreakpoints() : CVisualStudioDemoDoc
  • OnDummySelectActiveConfiguration() : CVisualStudioDemoDoc
  • OnDumpClasses() : CHuskApp
  • OnDumpDLLs() : CHuskApp
  • OnDumpDocTemplates() : CHuskApp
  • OnDumpObjects() : CHuskApp
  • OnDynamicItem1() : CMainFrame
  • OnDynamicItem2() : CMainFrame
  • OnEdit() : CCheckBoxProp , CComboBoxExProp
  • OnEditAllowInvert() : CTrackerDoc
  • OnEditBarNotify() : CHTMLEdView
  • OnEditBringToFront() : CTestContainer98View
  • OnEditChange() : CPadView , CFormatTabDlg , CWordPadView , CMSOffice2007DemoView , CFormatTabDlg , CWordPadView
  • OnEditChangetext() : CAutoClickDoc
  • OnEditClear() : CListOutputFrame , CContainerView , CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView , CFileViewBar , COutputList1 , COutputList , CResourceViewBar
  • OnEditClearAll() : CScribbleDoc , CMainDoc
  • OnEditClone() : CMainView
  • OnEditControlInformation() : CDlgtempDlg
  • OnEditCopy() : CListOutputFrame , CContainerView , CDibView , CNotepadView , CScribbleDoc , CDrawView , CServerView , CMainView , CPadView , CTestContainer98View , CDrawView , COutputBar , CChildFrame , CFileViewBar , COutputList1 , COutputList , CResourceViewBar
  • OnEditCut() : CListOutputFrame , CDrawView , CServerView , CMainView , CPadView , CTestContainer98View , CDrawView , CChildFrame , CFileViewBar , CResourceViewBar
  • OnEditDeleteAll() : CTestContainer98Doc
  • OnEditDottedline() : CTrackerDoc
  • OnEditFind() : CNotepadView
  • OnEditFindCombo() : CMainFrame
  • OnEditFindNext() : CFindDlg
  • OnEditGoto() : CNotepadView
  • OnEditHatchedborder() : CTrackerDoc
  • OnEditHatchedinside() : CTrackerDoc
  • OnEditImage() : CPage3
  • OnEditInsertControlFromStorage() : CTestContainer98View
  • OnEditInsertFromStream() : CTestContainer98View
  • OnEditLabels() : CTreeCtrlPage , CListHdrDlg
  • OnEditMyItem1() : CMainFrame
  • OnEditMyItem2() : CMainFrame
  • OnEditPaste() : CContainerView , CDibView , CNotepadView , CDrawView , CServerView , CTestContainer98View , CDrawView , CChildFrame , CResourceViewBar
  • OnEditPasteSpecial() : CChildFrame
  • OnEditProperties() : CDrawObj , CDrawOleObj , CDrawTool , CSelectTool , CDrawView , CTestContainer98View , CDrawObj , CDrawOleObj , CDrawTool , CSelectTool
  • OnEditResizeinside() : CTrackerDoc
  • OnEditResizeoutside() : CTrackerDoc
  • OnEditSelectAll() : CDrawView , CTestContainer98View , CDrawView
  • OnEditSendToBack() : CTestContainer98View
  • OnEditSolidline() : CTrackerDoc
  • OnEditTogglebreakpoint() : CVisualStudioDemoView
  • OnEditUndo() : CMSOffice2007DemoView
  • OnEnable() : CMailFrame , CMainFrame
  • OnEnabled() : CAmbientPropertiesDlg
  • OnEnabledChanged() : CTimeCtrl
  • OnEnablesel() : CSliderCtrlPage
  • OnEnChangeNetaddress() : CNetAddressCtrlPage
  • OnEndDrawing() : CSpiroView
  • OnEndLabelEdit() : CMyTreeCtrl , CMyListCtrl
  • OnEndPrinting() : CCollectView , CRecalcView , CContainerView , CDynaMenuView , CNotepadView , CShapesView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawView , CCustomPagesView , CDrawView , CDynamicMenuView , CIEDemoView , CMDITabsDemoView , CMenuSubSetView , CMSMoneyDemoView , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWorkSpaceToolBarView
  • OnEnterIdle() : CModelessMain
  • OnEnterScript() : CScript
  • OnEraseBkgnd() : CCubeView , CChildView , CPushCtrl , CTimeCtrl , CXlistCtrl , CModelessMain , CChildView , CShapePreviewWnd , CSnapView , CSpiroView , CDrawView , CBigIcon , CDrawView , CExplorerView , CFolderBar , CMSMoneyDemoView , CMainFrame , CCalendarBar , CFolderListPopupWnd , CMailBar , CPreviewPane , CTabbedViewView , CView1 , CView3 , CView4 , CStartView , CBigIcon
  • OnEraseWorkArea() : CFolderListBar , CDynamicHelpViewBar
  • OnEvent() : CTestContainer98Item
  • OnExample() : CMainFrame
  • OnExceptionHelp() : CMethodDlg
  • OnExpand() : CPropertiesViewBar
  • OnFast() : CBounceWnd , CBounceView , CSpiroView
  • OnFavorite() : CMainFrame
  • OnFetch() : CDBVListView
  • OnFileBind() : CMainFrame , CObjTreeView
  • OnFileChange() : CAnimateCtrlPage
  • OnFileClose() : CTypeLibWnd , CRibbonMDIDemoDoc
  • OnFileCloseSolution() : CMainFrame
  • OnFileConfigureScreenCapture() : CMainFrame
  • OnFileNameBrowse() : CLoggingDlg
  • OnFileNameChange() : CCustomFileDialog
  • OnFileNameOK() : CCustomFileDialog
  • OnFileNew() : CWordPadApp , CMSOffice2007DemoApp , CWordPadApp
  • OnFileNewBlankSolution() : CMainFrame
  • OnFileNewProject() : CMainFrame
  • OnFileOpen() : CChildView , CMfcieView , CWordPadApp , CIEDemoView , CMSOffice2007DemoApp , CWordPadApp
  • OnFileOpenimage() : CChildView
  • OnFileOpenSolution() : CMainFrame
  • OnFileOpenurl() : CHTMLEdDoc
  • OnFilePlay() : CCubeView
  • OnFilePrint() : CDrawView , CMFCBindDoc , CWordPadView , CDrawView , CSplitFrame , CMainFrame , COutputBar , CWordPadView
  • OnFilePrintAll() : CMFCBindDoc
  • OnFilePrintPreview() : CCustomPagesView , CDrawView , CSplitFrame , CDynamicMenuView , CMDITabsDemoView , CMenuSubSetView , CMainFrame , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CMainFrame , CRibbonGadgetsView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWordPadView , CWorkSpaceToolBarView
  • OnFileRegisterControls() : CTestContainer98App
  • OnFileRunREGEDIT() : CMainFrame
  • OnFileSave() : CChildView
  • OnFileSaveAll() : CMainFrame
  • OnFileSaveAs() : COutputBar
  • OnFileSaveImage() : CChildView
  • OnFileScreencapture() : CMainFrame
  • OnFileSendMail() : CWordPadDoc
  • OnFileSummaryInfo() : CDrawDoc
  • OnFileViewTypeLib() : CMainFrame
  • OnFillBackground() : CMyToolTipCtrl , CUndoBar
  • OnFillBarBackground() : CMSMVisualManager
  • OnFillHighlightedArea() : CMSMVisualManager
  • OnFillPopupWindowBackground() : CMSNVisualManager
  • OnFillTasksGroupInterior() : CMSMVisualManager
  • OnFillTasksPaneBackground() : CMSMVisualManager
  • OnFinalRelease() : CLocalizePropPage , CAutoClickPoint , CEnumVariant , CStringCollect , CVariantAssoc , CVariantMap , CTypeLibViewer
  • OnFind() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView , CVisualStudioDemoView
  • OnFindContact() : COutlookDemoDoc
  • OnFixed() : CSliderCtrlPage
  • OnFlag() : CMyPopupDlg
  • OnFlashColorChanged() : CCircCtrl
  • OnFocus() : CTestContainer98Item , CTestContainer98View
  • OnFolderChange() : CCustomFileDialog
  • OnFolderUp() : CExplorerView
  • OnFontChange() : CMainFrame
  • OnFontColor() : CMSOffice2007DemoView
  • OnFontDialog() : CMSOffice2007DemoView
  • OnFontname() : CMSOffice2007DemoView , CWordPadView
  • OnFontNameChange() : CMainFrame
  • OnFontNameKillFocus() : CFormatBar
  • OnFontsize() : CMSOffice2007DemoView , CWordPadView
  • OnFontSizeChange() : CMainFrame
  • OnFontSizeDropDown() : CFormatBar
  • OnFontSizeKillFocus() : CFormatBar
  • OnFontType() : CPage3
  • OnFormatParagraph() : CWordPadView
  • OnFormatPopup() : CHTMLEdView
  • OnFormatTabs() : CWordPadView
  • OnFourColumns() : CMainFrame
  • OnFrom() : CProgCtrlPage
  • OnGetAll() : CAutoDrivDlg
  • OnGetCellBkColor() : CMyListCtrl
  • OnGetCellFont() : CMyListCtrl
  • OnGetCellTextColor() : CMyListCtrl
  • OnGetCharFormat() : CWordPadView
  • OnGetClipboardData() : CServerItem , CRectItem , CTestContainer98Item
  • OnGetClipRect() : CTestContainer98Item
  • OnGetDispInfoTreeView() : CRegistryView
  • OnGetDocumentColors() : CMainFrame
  • OnGetEmbeddedItem() : CScribbleDoc , CServerDoc , CPadDoc , CWordPadDoc
  • OnGetExtent() : CScribbleItem , CServerItem , CEmbeddedItem
  • OnGetInPlaceMenu() : CButtonCtrl
  • OnGetItemPosition() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CDrawItem
  • OnGetLinkedItem() : CServerDoc , CPadDoc
  • OnGetMinMaxInfo() : CMainFrame
  • OnGetPosition() : CAutoDrivDlg
  • OnGetRecordset() : CDBVListView
  • OnGetTabToolTip() : CMainFrame
  • OnGiveUp() : CSpeakNDlg
  • OnGo() : CGetURL , CDriverDlg
  • OnGoAddress() : CMSMoneyDemoDoc
  • OnGoBack() : CMfcieView , CExplorerDoc , CIEDemoView , CMSMoneyDemoDoc
  • OnGoForward() : CMfcieView , CExplorerDoc , CIEDemoView , CMSMoneyDemoDoc
  • OnGoSearchTheWeb() : CMfcieView , CIEDemoView
  • OnGoStartPage() : CMfcieView , CIEDemoView
  • OnGreen() : CSpiroView
  • OnHasButtons() : CTreeCtrlPage
  • OnHasLines() : CTreeCtrlPage
  • OnHeader() : CPage5
  • OnHello() : CMainFrame
  • OnHelp() : CTesthelpPropPage , CCSDialog , CCSPropertyPage , CCSPropertySheet , CCSDialog , CCSPropertyPage , CCSPropertySheet
  • OnHelpAbout() : CTheApp , CSchedulerDlg
  • OnHelpCommand() : CTesthelpCtrl
  • OnHelpContextMenu() : CCSDialog , CCSPropertyPage , CCSPropertySheet , CCSDialog , CCSPropertyPage , CCSPropertySheet
  • OnHelpCustomizeToolbars() : CMainFrame
  • OnHelpFinder() : CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • OnHelpInfo() : CAmbientPropertiesDlg , CComponentCategoriesDlg , CContainerInfoDlg , CEventLoggingPage , CFeaturesPage , CInterfacesPage , CInsertControlDlg , CLoggingDlg , CMacroDlg , CMethodDlg , CNewAmbientPropertyDlg , CPropertyBagDlg , CPropertyChangesPage , CPropertyEditRequestsPage , CRegisterControlsDlg , CServicesPage , CTabOrderDlg
  • OnHelpKeyboardmap() : CMainFrame
  • OnHelpMicrosoft() : CMainFrame
  • OnHelpMicrosoftOnTheWebBestOfTheWeb() : CMfcieView
  • OnHelpMicrosoftOnTheWebFreeStuff() : CMfcieView
  • OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions() : CMfcieView
  • OnHelpMicrosoftOnTheWebGetFasterInternetAccess() : CMfcieView
  • OnHelpMicrosoftOnTheWebInternetStartPage() : CMfcieView
  • OnHelpMicrosoftOnTheWebMicrosoftHomePage() : CMfcieView
  • OnHelpMicrosoftOnTheWebSearchTheWeb() : CMfcieView
  • OnHelpMicrosoftOnTheWebSendFeedback() : CMfcieView
  • OnHelpOnlineSupport() : CMfcieView
  • OnHelpShowStart() : CVisualStudioDemoApp
  • OnHelpWeb() : CMainFrame
  • OnHelpWebTutorial() : CMfcieView
  • OnHicolorimages() : CTasksPaneView
  • OnHideFontProps() : CPage5
  • OnHighlightMenuItem() : CMSMVisualManager
  • OnHighlightRibbonListItem() : CMainFrame
  • OnHistbuttons() : CTasksPaneView
  • OnHistory() : CMainFrame
  • OnHome() : CResourcePage
  • OnHover() : CListHdrDlg
  • OnHScroll() : CPagerCtrlPage , CDesktopAlertDemoDlg , CView1 , CView4
  • OnIcon() : CStatusBarDemoView
  • OnIdle() : CScreenCapApp , CCtrlbarsApp , CChildView , CMMXSwarmApp , CNotepadApp , CTheApp
  • OnIdleUpdateCmdUI() : CDlgToolBar , CDlgStatusBar
  • OnIgnoreRequiredCategories() : CInsertControlDlg
  • OnIllegalChar() : CWclsEditDlg
  • OnImageFormats() : CChildView
  • OnImageInfo() : CChildView
  • OnImplementedCategories() : CInsertControlDlg
  • OnImportText() : CServerView
  • OnIndentLeft() : CMSOffice2007DemoView
  • OnIndentRight() : CMSOffice2007DemoView
  • OnIndicatorLabel() : CStatusBarDemoView
  • OnInitDialog() : CMutexesDlg , CSpeakNDlg , CAllControlsSheet , CCmnCtrl3Dlg , CCommandLinkCtrlPage , CNetAddressCtrlPage , CPagerCtrlPage , CSplitButtonCtrlPage , CNetAddrVerifierDlg , CTesthelpPropPage , CAnimateCtrlPage , CDateTimePage , CMonthCalPage , CAllControlsSheet , CToolBarCtrlPage , CTreeCtrlPage , CProgCtrlPage , CAllControlsSheet , CSliderCtrlPage , CSpinCtrlPage , CTaskDialogTestDlg , CBMTest1Dlg , CBMTest2Dlg , CBMTest3Dlg , CCustListDlg , CDerEditDlg , CSpinEditDlg , CSubEditDlg , CWclsEditDlg , CModelessMain , CRateDlg , CWndListDlg , CDlgtempDlg , CColorOptDlg , CCustomFileDialog , CFileDlgWatcherDlg , CListHdrDlg , CMainDlg , CFindDlg , CModalShapePropSheet , CInfoDlg , CBkfstPage , CDinnerPage , CLunchPage , CVarUseDlg , CDHtmlExploreDlg , CPropertiesDlg , CGetURL , CEntryInfoDlg , CSchedulerDlg , CAutoDrivDlg , CDriverDlg , CRectDlg , CChangeNameDlg , CAddNodeDlg , CAboutDlg , CCalcDlg , CDispatchDlg , CIDataObjectDlg , CAboutDlg , CAboutBox , CSplashWnd , CAmbientPropertiesDlg , CComponentCategoriesDlg , CContainerInfoDlg , CEventLoggingPage , CInsertControlDlg , CLoggingDlg , CMacroDlg , CMethodDlg , CNewAmbientPropertyDlg , CPropertyBagDlg , CPropertyChangesPage , CPropertyEditRequestsPage , CRegisterControlsDlg , CTabOrderDlg , CTCExtPage , CButtonDialog , CCSDialog , CDateDialog , CEmbeddedOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CListDlg , CSplashWnd , CAboutDlg , CGuidGenDlg , CDesktopAlertDemoDlg , CMSNDlg , CMyPopupDlg , CDlgToolTipsDlg , CLineWeightDlg , CRectDlg , CConfigDlg , CDemoOptionsPage , CDemoOptionsPropSheet , NewControlsPropSheet , CPage1 , CPage2 , CPage3 , CPage4 , CPage5 , CPage6 , CAppLookDlg , CPropSheetDemoDlg , CTrayMenuDlg , CAppLookDlg , CButtonDialog , CCSDialog , CDateDialog , CEmbeddedOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CListDlg , CSplashWnd
  • OnInitDone() : CCustomFileDialog
  • OnInitialUpdate() : CDWordArrayView , CIntListView , CMapDWordToMyStructView , CMapStringToStringView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView , CContainerView , CDBVListView , CEmpView , CDibView , CBounceView , CRowListView , CScribbleView , CSnapView , CSpiroView , CHTMLEdView , CMfcieView , CDrawView , CServerView , CDriverView , CMFCBindView , CMainView , CTypeLibListView , CTypeLibODLView , CTypeLibTreeView , CObjTreeView , CRegistryView , CTestContainer98View , CDrawView , CExplorerView , CIEDemoView , CMenuSubSetView , CMSOffice2007DemoView , CMailView , COutlookDemoView , CSetPaneSizeView , CStatusBarDemoView , CView1 , CView2 , CView4 , CTabControlView , CTasksPaneView , CTooltipDemoView , CStartView
  • OnInitMenuPopup() : CModelessMain
  • OnInPlaceActivate() : CTestContainer98Item
  • OnInPlaceActivateEx() : CTestContainer98Item
  • OnInPlaceDeactivate() : CTestContainer98Item
  • OnInPlaceDeactivateEx() : CTestContainer98Item
  • OnInsertBefore() : CIntListView , CStringListView , CTypedPtrListView
  • OnInsertBulletFromPalette() : CMSOffice2007DemoView
  • OnInsertChart() : CMSOffice2007DemoView
  • OnInsertDateTime() : CWordPadView
  • OnInsertMultilevelFromPalette() : CMSOffice2007DemoView
  • OnInsertNumberFromPalette() : CMSOffice2007DemoView
  • OnInsertObject() : CContainerView , CDrawView , CMFCBindView , CMainView , CTestContainer98View , CDrawView
  • OnInsertPicture() : CMSOffice2007DemoView
  • OnInsertShape() : CMSOffice2007DemoView
  • OnInsertTable() : CMSOffice2007DemoView
  • OnInsertTableGallery() : CMSOffice2007DemoView
  • OnIntervalChanged() : CTimeCtrl
  • OnInvertChanged() : CLocalizeCtrl
  • OnInvertFlagChanged() : CXlistCtrl
  • OnInvoke() : CMethodDlg
  • OnItem1() : CTrayMenuDlg
  • OnItem2() : CTrayMenuDlg
  • OnItem3() : CTrayMenuDlg
  • OnItem4() : CTrayMenuDlg
  • OnKeepVisible() : CFolderListPopupWnd
  • OnKeyDown() : CShapesView , CServerView , CTestContainer98View , CWordPadView , CCustomSliderCtrl , CView2 , CWordPadView
  • OnKeyUp() : CTestContainer98View
  • OnKillAdvise() : CIDataObjectDlg
  • OnKillFocus() : CRecalcView , CListViewEx , CTestContainer98View , CMFCRibbonNumEditCtrl
  • OnKillThreads() : CThreadView
  • OnKillWorkerThread() : CRecalcDoc
  • OnLbnSelchangeListStyle() : CSplitButtonCtrlPage
  • OnLBSelChangedNotify() : CCustomFileDialog
  • OnLButtonDblClk() : CCircCtrl , CContainerView , CShapesView , CRowListView , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CServerView , CMainView , CObjTreeView , CTestContainer98View , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CStateCollectionView
  • OnLButtonDown() : CBounceWnd , CContainerView , CTesthelpCtrl , CShapesView , CRowListView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CServerView , CMainView , CTestContainer98View , CRulerBar , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CMSOffice2007DemoView , CRulerBar
  • OnLButtonUp() : CMSOffice2007DemoView , CSelectTool , CDrawView , CMyTreeCtrl , CCircCtrl , CLocalizeCtrl , CTesthelpCtrl , CMyListCtrl , CScribbleView , CSpiroView , CDrawTool , CSelectTool , CRectTool , CPolyTool , CTestContainer98View , CRulerBar , CDrawTool , CRectTool , CPolyTool , CDrawView , CCustomSliderCtrl , CUndoListBox , CRulerBar
  • OnLeaveScript() : CScript
  • OnLine() : CSliderCtrlPage
  • OnLinesAtRoot() : CTreeCtrlPage
  • OnLineStyle() : COwnerDrawMenuView
  • OnLink() : CMainFrame
  • OnLink1() : CMainFrame
  • OnLinkMicrosoft() : CMainFrame
  • OnLinkMSDN() : CMainFrame
  • OnLinks() : CMainFrame
  • OnLinkVisualCPP() : CMainFrame
  • OnLoadDebugConf() : CMainFrame
  • OnLoadRegularConf() : CMainFrame
  • OnLocation() : CTabControlView
  • OnLogToDebug() : CLoggingDlg
  • OnLogToFile() : CLoggingDlg
  • OnLogToNull() : CLoggingDlg
  • OnLogToOutput() : CLoggingDlg
  • OnLookup() : CDriverView
  • OnLum() : CPage2
  • OnMailAttachment() : CMailView
  • OnMailCc() : CMailView
  • OnMailCheckNames() : CMailView
  • OnMailClose() : CMailFrame
  • OnMailCopyToFolder() : CMailView
  • OnMailDelete() : CMailView
  • OnMailFlag() : CMailView
  • OnMailFontsize() : CMailView
  • OnMailHightPriority() : CMailView
  • OnMailItem() : CMailView
  • OnMailLowPriority() : CMailView
  • OnMailMoveToFolder() : CMailView
  • OnMailOptions() : CMailView
  • OnMailProperties() : CMailView
  • OnMailSave() : CMailView
  • OnMailSaveAttachments() : CMailView
  • OnMailSaveStationery() : CMailView
  • OnMailSend() : CMailView
  • OnMailSignature() : CMailView
  • OnMailSpell() : CMailView
  • OnMailTo() : CMailView
  • OnMapPropertyToPage() : CCircCtrl , CPalCtrl
  • OnMargins() : CTasksPaneView
  • OnMarkChanged() : CPage5
  • OnMarkSortedColumn() : CPage5
  • OnMDIActivate() : CDynaMDIChildWnd
  • OnMdiCancel() : CMainFrame
  • OnMdiMoveToNextGroup() : CMainFrame
  • OnMdiMoveToPrevGroup() : CMainFrame
  • OnMdiNewHorzTabGroup() : CMainFrame
  • OnMdiNewVertGroup() : CMainFrame
  • OnMdiTabbed() : CMainFrame
  • OnMdiTabbedDocument() : CMainFrame
  • OnMeasureItem() : CIDataObjectDlg , CWordPadView , CIconCombo , CWordPadView
  • OnMenuButtonToolHitTest() : CMainFrame
  • OnMenuDefaultClick() : CPage1
  • OnMenuSelect() : CModelessMain
  • OnMenuSelection() : CMainFrame
  • OnMethodNameSelChange() : CMethodDlg
  • OnMiniFramePropertySheet() : CMainFrame
  • OnMirrorDisplayFont() : CPadView
  • OnModifyFont() : CPage5
  • OnModifyScheduleDisplay() : CSchedulerDlg
  • OnMoreLines() : COwnerDrawMenuView
  • OnMouseActivate() : CTextView , CColorView , CWordPadView
  • OnMouseMove() : CCustomSliderCtrl , CDrawView , CDrawTool , CMyTreeCtrl , CTesthelpCtrl , CMyListCtrl , CScribbleView , CSpiroView , CSelectTool , CRectTool , CPolyTool , CTestContainer98View , CRulerBar , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CUndoListBox , CRulerBar
  • OnMouseOutButtons() : CSchedulerDlg , CEntryInfoDlg
  • OnMouseOutElement() : CDHtmlExploreDlg
  • OnMouseOutNewElements() : CSchedulerDlg
  • OnMouseOutTime() : CSchedulerDlg
  • OnMouseOverButtons() : CEntryInfoDlg , CSchedulerDlg
  • OnMouseOverElement() : CDHtmlExploreDlg
  • OnMouseOverNewElements() : CSchedulerDlg
  • OnMouseOverTime() : CSchedulerDlg
  • OnMouseOverTimeDesc() : CSchedulerDlg
  • OnMove() : CMainFrame , CSliderButton
  • OnMoveTab() : CTabControlView
  • OnMoveTo() : CExplorerView
  • OnMultiDimensionArray() : CVarUseDlg
  • OnMyHotCur() : CListHdrDlg
  • OnName1Changed() : CTesthelpCtrl
  • OnName2Changed() : CTesthelpCtrl
  • OnName3Changed() : CTesthelpCtrl
  • OnNavtoolbar() : CTasksPaneView
  • OnNcCreate() : CParsedEditExported
  • OnNcDestroy() : CFolderListPopupWnd
  • OnNcRButtonDown() : CMainFrame
  • OnNeedTextA() : CStandardBar , CPaletteBar
  • OnNeedTextW() : CStandardBar , CPaletteBar
  • OnNever() : CPropertyEditRequestsPage
  • OnNewAccelerator() : CVisualStudioDemoDoc
  • OnNewAddress() : CMainFrame
  • OnNewAddressEnter() : CMainFrame
  • OnNewAppointment() : COutlookDemoDoc
  • OnNewball() : CThreadView
  • OnNewBitmap() : CVisualStudioDemoDoc
  • OnNewBounce() : CMDIApp
  • OnNewContract() : COutlookDemoDoc
  • OnNewControl() : TestContainer98::ITestContainer98Events
  • OnNewCursor() : CVisualStudioDemoDoc
  • OnNewDialog() : CVisualStudioDemoDoc
  • OnNewDistributionList() : COutlookDemoDoc
  • OnNewDocument() : CTooltipDemoDoc , CTabbedViewDoc , CSetPaneSizeDoc , COutlookDemoDoc , CMDITabsDemoDoc , CDrawDoc , CHTMLEdDoc , CSnapDoc , CDockDoc , CRecalcDoc , CCollectDoc , CCubeDoc , CThreadDoc , CContainerDoc , CDBVListDoc , CDibDoc , CDynaMenuDoc , CBounceDoc , CHelloDoc , CNotepadDoc , CShapesDoc , CRowListDoc , CScribbleDoc , CSpiroDoc , CTrackerDoc , CMainDoc , CMfcieDoc , CAutoClickDoc , CServerDoc , CDriverDoc , CMFCBindDoc , COle2ViewDoc , CTestContainer98Doc , CWordPadDoc , CCustomPagesDoc , CDynamicMenuDoc , CExplorerDoc , CIEDemoDoc , CMenuSubSetDoc , CMSMoneyDemoDoc , CMSOffice2007DemoDoc , COutlookMultiViewsDoc , COwnerDrawMenuDoc , CPaletteDemoDoc , CRebarTestDoc , CRibbonGadgetsDoc , CRibbonMDIDemoDoc , CRollupPaneDoc , CSliderDoc , CStateCollectionDoc , CStatusBarDemoDoc , CTabControlDoc , CTasksPaneDoc , CToolbarDateTimePickerDoc , CVisualStudioDemoDoc , CWordPadDoc , CWorkSpaceToolBarDoc
  • OnNewFax() : COutlookDemoDoc
  • OnNewFolder() : COutlookDemoDoc , CClassViewBar
  • OnNewguid() : CGuidGenDlg
  • OnNewHello() : CMDIApp
  • OnNewIcon() : CVisualStudioDemoDoc
  • OnNewJournalEntry() : COutlookDemoDoc
  • OnNewline() : CThreadView
  • OnNewMail() : COutlookDemoDoc
  • OnNewMeeting() : COutlookDemoDoc
  • OnNewMenu() : CVisualStudioDemoDoc
  • OnNewNote() : COutlookDemoDoc
  • OnNewPostFolder() : COutlookDemoDoc
  • OnNewProperty() : CAmbientPropertiesDlg
  • OnNewrectangle() : CThreadView
  • OnNewShortcut() : COutlookDemoDoc
  • OnNewStringTable() : CVisualStudioDemoDoc
  • OnNewTask() : COutlookDemoDoc
  • OnNewTaskRequest() : COutlookDemoDoc
  • OnNewToolbar() : CVisualStudioDemoDoc
  • OnNewVersion() : CVisualStudioDemoDoc
  • OnNextNumber() : CBMTest3Dlg
  • OnNoColHdr() : CListHdrDlg
  • OnNoLabelWrap() : CListHdrDlg
  • OnNoSortHdr() : CListHdrDlg
  • OnNothumb() : CSliderCtrlPage
  • OnNoticks() : CSliderCtrlPage
  • OnNotify() : CClassTreeWnd , CShellTreeCtrl
  • OnNotifyRecycleBin() : CFolderBar
  • OnObjectDelete() : CMainFrame , CObjTreeView
  • OnObjectDisplayAsIcon() : CMainView
  • OnObjectDisplayContent() : CMainView
  • OnObjectFillColor() : CDrawView
  • OnObjectLineColor() : CDrawView
  • OnObjectLineWeight() : CDrawView
  • OnObjectMoveBack() : CDrawView
  • OnObjectMoveForward() : CDrawView
  • OnObjectMoveToBack() : CDrawView
  • OnObjectMoveToFront() : CDrawView
  • OnObjectNoFill() : CDrawView
  • OnObjectNoLine() : CDrawView
  • OnObjectProperties() : CDrawView
  • OnObjectResetsize() : CMainView
  • OnObjectStyles() : CDrawView
  • OnObjectVerify() : CMainFrame , CObjTreeView
  • OnOcmCommand() : CXlistCtrl , CButtonCtrl , CPushCtrl
  • OnOcmDrawItem() : CPushCtrl , CXlistCtrl
  • OnOcmMeasureItem() : CXlistCtrl
  • OnOK() : CDemoOptionsPage , CFormatParaDlg , CAdderDialog , CSpeakNDlg , CCustListDlg , CDerEditDlg , CSpinEditDlg , CSubEditDlg , CWclsEditDlg , CModelessDialog , CCustomFileDialog , CMainDlg , CGetURL , CCalcDlg , CFormatTabDlg , CListDlg , CGuidGenDlg , CAppLookDlg , CFormatParaDlg , CFormatTabDlg , CListDlg
  • OnOleArray() : CVarUseDlg
  • OnOleChangeSource() : CMainView
  • OnOleEditProperties() : CMainView
  • OnOleInsertNew() : CMFCBindDoc , CMainFrame
  • OnOpen() : CDrawOleObj , CDrawObj , CDrawOleObj , CServerItem , CDrawObj
  • OnOpenDocument() : CDibDoc , CScribbleDoc , CHTMLEdDoc , CDrawDoc , CMFCBindDoc , CTestContainer98Doc , CWordPadDoc , CDrawDoc , CWordPadDoc
  • OnOpenFile() : CMacroDlg
  • OnOpenMsg() : CMainFrame
  • OnOpenRecentFile() : CMSOffice2007DemoApp
  • OnOptionNow() : CWndListDlg
  • OnOptionRate() : CWndListDlg
  • OnOptions() : CMSNDlg
  • OnOptionsDesignMode() : CTestContainer98View
  • OnOptionsFont() : CServerDoc
  • OnOptionsFreezeEvents() : CTestContainer98Doc
  • OnOptionsLogging() : CTestContainer98Doc
  • OnOptionsOption1() : CButtonCtrl
  • OnOptionsOption2() : CButtonCtrl
  • OnOptionsOption3() : CButtonCtrl
  • OnOptionsSlowDrawing() : CTestContainer98Doc
  • OnOptionsTraceLevelNone() : CTestContainer98App
  • OnOptionsTraceLevelNormal() : CTestContainer98App
  • OnOptionsTraceLevelVerbose() : CTestContainer98App
  • OnOptionsTwoPassDrawing() : CTestContainer98Doc
  • OnOrientation() : CSliderCtrlPage
  • OnOutlookAddPage() : CMainFrame
  • OnOutlookAnimation() : CMainFrame
  • OnOutlookBarShortcut() : CMainFrame
  • OnOutlookDeletePage() : CMainFrame
  • OnOutlookRenamePage() : CMainFrame
  • OnOutlookShowTextLabels() : CMainFrame
  • OnOutputBufferHasData() : CIDataObjectDlg
  • OnOutputGotoError() : COutputList1 , COutputList
  • OnPage() : CSliderCtrlPage
  • OnPagelayoutIndentLeft() : CMSOffice2007DemoView
  • OnPagelayoutIndentRight() : CMSOffice2007DemoView
  • OnPageLayoutTheme() : CMSOffice2007DemoView
  • OnPageSetup() : CTheApp , CWordPadView
  • OnPagesetupDialog() : CMSOffice2007DemoView
  • OnPaint() : CChildView , CMutexesDlg , CCmnCtrl3Dlg , CNetAddrVerifierDlg , CTaskDialogTestDlg , CModelessMain , CDlgtempDlg , CFileDlgWatcherDlg , CListHdrDlg , CHelloWnd , CChildView , CShapePreviewWnd , CListViewEx , CChildView , CDHtmlExploreDlg , CSchedulerDlg , CAutoDrivDlg , CCalcDlg , CMetaFileWnd , CGuidGenDlg , CDlgToolTipsDlg , CWorkspaceBar , CDlgBanner , CPage3 , CCalendarBar , CFolderListPopupWnd , CWorkspaceBar , CWorkspaceBar2 , CInfoBar , CWorkspaceBar , CTrayMenuDlg , CClassViewBar , CDynamicHelpViewBar , COutputViewBar , CResourceViewBar , CWatchBar , CFileViewBar , CPropSheetDemoDlg , CMainFrame , CDesktopAlertDemoDlg , CVarUseDlg , CMainDlg , CMainWindow , CHelloWnd
  • OnPalette() : CMainFrame
  • OnPalette2column() : CMainFrame
  • OnPalette3column() : CMainFrame
  • OnPaletteChanged() : CMainFrame , CWordPadView , CMainFrame , CWordPadView , CMainFrame
  • OnPaletteTool() : CPaletteDemoDoc
  • OnParagraphDialog() : CMSOffice2007DemoView
  • OnParamsItemChanged() : CMethodDlg
  • OnParamTypeSelChange() : CMethodDlg
  • OnParamValueChange() : CMethodDlg
  • OnParamValueSetFocus() : CMethodDlg
  • OnPaste() : CMainView
  • OnPasteLink() : CMainView
  • OnPasteSpecial() : CMainView
  • OnPause() : CMutexesDlg
  • OnPauseDrawing() : CSpiroView
  • OnPenBackspace() : CWordPadView
  • OnPenNewline() : CWordPadView
  • OnPenPeriod() : CWordPadView
  • OnPenSpace() : CWordPadView
  • OnPenTab() : CWordPadView
  • OnPenThickOrThin() : CScribbleDoc
  • OnPenToggle() : CInPlaceFrame , CMainFrame
  • OnPenWidth() : CSpiroView
  • OnPenWidths() : CScribbleDoc
  • OnPlay() : CAnimateCtrlPage
  • OnPoint() : CSliderCtrlPage
  • OnPointerInactiveMove() : CTestContainer98Item
  • OnPointerInactiveSetCursor() : CTestContainer98Item
  • OnPopMessageString() : CModelessMain
  • OnPopupSource() : CDesktopAlertDemoDlg
  • OnPosRectChange() : CTestContainer98Item
  • OnPostRecalcLayout() : CMainFrame
  • OnPrepareDC() : CScribbleView , CSpiroView , CDrawView , CServerView , CDrawView , CMSOffice2007DemoView , CMainView
  • OnPreparePrinting() : CCollectView , CContainerView , CDibView , CDynaMenuView , CShapesView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawView , CWordPadView , CCustomPagesView , CDrawView , CIEDemoView , CMDITabsDemoView , CMenuSubSetView , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CRebarTestView , CRibbonGadgetsView , CRibbonMDIDemoView , CSetPaneSizeView , CSliderView , CStateCollectionView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWordPadView , CWorkSpaceToolBarView , CStatusBarDemoView , CRollupPaneView , CPaletteDemoView , CMSMoneyDemoView , CDynamicMenuView , CMainView , CNotepadView , CRecalcView
  • OnPrepareToClose() : CBounceMDIChildWnd , CBounceWnd
  • OnPressedOnMenu() : CPage1
  • OnPrevNumber() : CBMTest3Dlg
  • OnPrint() : CRecalcView , CScribbleView , CSpiroView , CPadView , CWordPadView , CDrawView , CMenuSubSetView , CSetPaneSizeView , CStatusBarDemoView , CTabControlView , CTooltipDemoView , CWordPadView , CTasksPaneView , CDrawView
  • OnPrinterChanged() : CFormatBar
  • OnPrinterChangedMsg() : CWordPadView
  • OnPriorityChange() : CMutexesDlg
  • OnPriorityChangeCntr() : CMutexesDlg
  • OnPriorityChangeDisp() : CMutexesDlg
  • OnPriorityClassChange() : CMutexesDlg
  • OnProduct() : CResourcePage
  • OnProgressChange() : CIEDemoView
  • OnProgressSetdelta() : CProgCtrlPage
  • OnProgressStepit() : CProgCtrlPage
  • OnPrompt() : CPropertyEditRequestsPage
  • OnProperies1() : CPropertiesViewBar
  • OnProperies2() : CPropertiesViewBar
  • OnProperties() : CFileViewBar
  • OnPropertiesSelChange() : CPropertyEditRequestsPage
  • OnPropertyChanged() : CAmbientPropertiesDlg , CWorkspaceBar
  • OnPropertySheetWithPreview() : CShapesView
  • OnPropListAlphabetMode() : CPropertiesViewBar
  • OnProplistCategorized() : CPage5
  • OnProplistCategorized2() : CPage5
  • OnPropListCustomColors() : CPage5
  • OnProplistExpandAll() : CPage5
  • OnPropListTreeMode() : CPropertiesViewBar
  • OnPropNameSelChange() : CAmbientPropertiesDlg
  • OnPropSheet1() : CPropSheetDemoDlg
  • OnPropSheet2() : CPropSheetDemoDlg
  • OnPropSheet3() : CPropSheetDemoDlg
  • OnPropSheet4() : CPropSheetDemoDlg
  • OnPropSheet5() : CPropSheetDemoDlg
  • OnPropTypeSelChange() : CAmbientPropertiesDlg
  • OnPropValueSetFocus() : CAmbientPropertiesDlg
  • OnPurple() : CSpiroView
  • OnQueryDragIcon() : CModelessMain , CDesktopAlertDemoDlg , CDlgToolTipsDlg , CMutexesDlg , CAllControlsSheet , CCmnCtrl3Dlg , CAutoDrivDlg , CSchedulerDlg , CMainDlg , CAutoDrivDlg , CAllControlsSheet , CTaskDialogTestDlg , CFileDlgWatcherDlg , CListHdrDlg , CGuidGenDlg , CVarUseDlg , CDHtmlExploreDlg , CCalcDlg , NewControlsPropSheet , CPropSheetDemoDlg , CTrayMenuDlg , CNetAddrVerifierDlg
  • OnQueryNewPalette() : CWordPadView , CMainFrame , CWordPadView
  • OnQuickStyle() : CMSOffice2007DemoView
  • OnRangefrom() : CSliderCtrlPage
  • OnRangeto() : CSliderCtrlPage
  • OnRButtonDblClk() : CTestContainer98View
  • OnRButtonDown() : CServerView , CMainView , CPadView , CTestContainer98View
  • OnRButtonUp() : CMSOffice2007DemoView , CMyListCtrl , CMyTreeCtrl , CTestContainer98View , CWordPadView
  • OnRecalcDone() : CRecalcView
  • OnRecalcInProgress() : CMainFrame
  • OnRecalcNowMsg() : CRecalcView
  • OnRecalcSpeed() : CRecalcDoc
  • OnRecalculateNow() : CRecalcView
  • OnRed() : CSpiroView
  • OnRefresh() : CDriverDlg , CMainFrame , CAutoDrivDlg
  • OnRegister() : CRegisterControlsDlg
  • OnRegisteredControlsItemChanged() : CRegisterControlsDlg
  • OnRemove() : CMapDWordToMyStructView , CTypedPtrMapView , CPointArrayView , CDWordArrayView , CMapStringToStringView , CIntListView , CStringListView , CTypedPtrListView , CDriverView , CTypedPtrArrayView
  • OnRemoveAll() : CTypedPtrArrayView , CTypedPtrMapView , CIntListView , CMapDWordToMyStructView , CMapStringToStringView , CPointArrayView , CStringListView , CTypedPtrListView , CDWordArrayView
  • OnRemovePiece() : CSpiroView
  • OnRemoveRing() : CSpiroView
  • OnRemoveWheel() : CSpiroView
  • OnRenderFileData() : CEmbeddedItem , CServerItem
  • OnReplaySound() : CSpeakNDlg
  • OnRequestEdit() : CTestContainer98Item
  • OnRequiredCategories() : CInsertControlDlg
  • OnReregister() : CRegisterControlsDlg
  • OnReset() : CFormatBar
  • OnResetButton() : CPage1
  • OnResetMenu() : CMainFrame
  • OnResetPage() : CMainFrame
  • OnResetState() : CTesthelpCtrl , CLocalizeCtrl , CButtonCtrl , CLicensedCtrl , CImageCtrl , CCircCtrl , CPalCtrl , CSpindialCtrl , CTimeCtrl , CPushCtrl , CXlistCtrl
  • OnResetValues() : CPage5
  • OnResizeChild() : CInPlaceFrame
  • OnRibbonBtn7() : CMainFrame
  • OnRibbonBtn8() : CMainFrame
  • OnRibbonBtn9() : CMainFrame
  • OnRibbonCustomize() : CMainFrame
  • OnRibbonObtn10() : CMainFrame
  • OnRibbonObtn2() : CMainFrame
  • OnRibbonObtn3() : CMainFrame
  • OnRibbonObtn4() : CMainFrame
  • OnRibbonObtn8() : CMainFrame
  • OnRightArrow() : CPage1
  • OnRulesWizard() : COutlookDemoDoc
  • OnRunMacro() : CTestContainer98Doc
  • OnSafeArray() : CVarUseDlg
  • OnSaveDebugConf() : CMainFrame
  • OnSaveDocument() : CTestContainer98Doc , CHTMLEdDoc , CDibDoc , CDrawDoc , CRecalcDoc , CDrawDoc
  • OnSaveRegularConf() : CMainFrame
  • OnScriptError() : CScript
  • OnScriptTerminate() : CScript
  • OnScrollbuttons() : CTasksPaneView
  • OnScrollBy() : CDrawView , CMainView , CDrawView
  • OnScrollTo() : CPadView
  • OnSearch() : CGetURL
  • OnSectionRemove() : CMFCBindDoc
  • OnSelchange() : CFormatTabDlg , CCustomList
  • OnSelChange() : CMSOffice2007DemoView
  • OnSelchange() : CFormatTabDlg
  • OnSelchangeAnimation() : CDesktopAlertDemoDlg
  • OnSelchangeFont() : CPage3
  • OnSelChangeFormatEtc() : CIDataObjectDlg
  • OnSelChangeList() : CDWordArrayView , CMapDWordToMyStructView , CPointArrayView , CTypedPtrMapView , CMapStringToStringView , CIntListView , CTypedPtrListView , CStringListView , CTypedPtrArrayView
  • OnSelChangePalette() : CMainFrame
  • OnSelchangeTabStyle() : CTabControlView
  • OnSelchangeVisualMngr() : CDesktopAlertDemoDlg
  • OnSelChangeWndList() : CWndListDlg
  • OnSelect() : CTestContainer98Item
  • OnSelectAll() : CComponentCategoriesDlg , CPropertyEditRequestsPage
  • OnSelectEndOk() : CComboToolBar
  • OnSelectFolder() : CPage6
  • OnSelectTree() : CExplorerBar , CFolderListPopupWnd , CFolderListBar , CDynamicHelpViewBar
  • OnSelrangefrom() : CSliderCtrlPage
  • OnSelrangeto() : CSliderCtrlPage
  • OnSendCommand() : CLinksBar
  • OnSendReceive() : COutlookDemoDoc
  • OnSetAll() : CAutoDrivDlg
  • OnSetBkColor() : CListViewEx
  • OnSetCharFormat() : CWordPadView
  • OnSetClientSite() : CXlistCtrl , CTimeCtrl
  • OnSetCursor() : CContainerView , CSpiroView , CMainView , CTrackerView , CChildView , CPage1 , CTestContainer98View , CSliderProp
  • OnSetDispInfoTreeView() : CRegistryView
  • OnSetFocus() : CMainView , CFileViewBar , CDynamicHelpViewBar , CListViewEx , CContainerView , CMainFrame , CComboToolBar , CDrawView , CClassViewBar , CPropertiesViewBar , CMainFrame , CTestContainer98View , CResourceViewBar , CMainFrame , CShapePropSheetFrame , CFolderBar , COutputViewBar , CWatchBar , CPropertiesViewBar , CExplorerView , CMFCBindView
  • OnSetFocusAccum() : CCalcDlg
  • OnSetFont() : CDerEditDlg , CCustomFileDialog
  • OnSetImageList() : CListViewEx
  • OnSetItemRects() : CServerDoc , CScribbleDoc
  • OnSetMessageString() : CModelessMain , CMainFrame
  • OnSetPageSite() : CLocalizePropPage
  • OnSetpos() : CProgCtrlPage
  • OnSetPosition() : CAutoDrivDlg
  • OnSetTabStops() : CPadView
  • OnSetText() : CAutoDrivDlg , CMSMCaptionBar , CAutoDrivDlg
  • OnSetTextBkColor() : CListViewEx
  • OnSetTextColor() : CListViewEx
  • OnSettingChange() : CMainFrame , CPropertiesViewBar , CWordPadView
  • OnSetTooltip() : CPage1
  • OnSetupAdvise() : CIDataObjectDlg
  • OnSetValue() : CAmbientPropertiesDlg , CMethodDlg
  • OnSetX() : CAutoDrivDlg
  • OnSetY() : CAutoDrivDlg
  • OnShareViolation() : CCustomFileDialog
  • OnShow() : CPadLinkItem , CCustomToolTipCtrl , CSliderButton , CRibbonTooltipCtrl , CDesktopAlertDemoDlg
  • OnShowContextMenu() : CHTMLEdView
  • OnShowControlBarMenu() : CMyOutlookBar
  • OnShowControlBars() : CDrawItem
  • OnShowMDITabContextMenu() : CMainFrame
  • OnShowPanes() : CMSOffice2007DemoCntrItem , CWordPadCntrItem
  • OnShowPopupMenu() : CMainFrame , CRibbonTableButton , CRibbonListButton , CMainFrame , CRibbonListButton , CRibbonListFontButton , CMainFrame
  • OnShowRibbonItemMenu() : CMainFrame
  • OnShowSelAlways() : CTreeCtrlPage
  • OnShowToolTipChanged() : CTesthelpCtrl
  • OnShowViews() : CMainDoc
  • OnShowWindow() : CRulerBar
  • OnSimplePropertySheet() : CShapesView
  • OnSingleExpand() : CTreeCtrlPage
  • OnSingleSel() : CListHdrDlg
  • OnSingleStep() : CDriverDlg
  • OnSize() : CWorkspaceBar , CTestContainer98View , CPropertiesViewBar , CPadView , CCircCtrl , CMainFrame , CBounceMDIChildWnd , CBounceWnd , CServerView , CBounceView , CChildView , CScribbleView , CMFCBindView , CMainView , CTypeLibListView , CCubeView , CPadFrame , CWordPadView , COutputBar , CFolderBar , CMainFrame , CFolderListPopupWnd , CMailBar , CWorkspaceBar , COutputBar , CClassViewBar , CFileViewBar , CResourceViewBar , CUndoBar , CWatchBar , CWordPadView , COutputBar , CMainFrame , COutputViewBar , CPropertiesViewBar , CWorkspaceBar2 , CDynamicHelpViewBar , CWorkspaceBar , CSliderButton , CListViewEx , CDemoOptionsPage , CCalendarBar , CFolderListBar , CDrawView , CMSMCaptionBar , CWorkspaceBar , CThreadView , CExplorerView , CTypeLibTreeView , CMainFrame , CTypeLibWnd , CContainerView , CRegistryView , CSnapView , CIDataObjectDlg , CDrawView , CObjListView , CBounceWnd , CWorkspaceBar
  • OnSizeParent() : CRulerBar
  • OnSizing() : CMainFrame
  • OnSlider() : CMainFrame
  • OnSlow() : CBounceWnd , CBounceView , CSpiroView , CBounceWnd
  • OnSmallCaption() : CDesktopAlertDemoDlg
  • OnSolutionOpen() : CFileViewBar
  • OnSolutionOpenWith() : CFileViewBar
  • OnSort() : CClassViewBar
  • OnSortingprop() : CPropertiesViewBar
  • OnSpaceAfter() : CMSOffice2007DemoView
  • OnSpaceBefore() : CMSOffice2007DemoView
  • OnSpell() : CMainFrame
  • OnStartAnimation() : CStatusBarDemoView
  • OnStartCustomize() : CMainFrame
  • OnStartProgress() : CStatusBarDemoView
  • OnStateChange() : CScript
  • OnStaticTextInformation() : CDlgtempDlg
  • OnStatusBarCheck() : CModelessMain
  • OnStdHotCur() : CListHdrDlg
  • OnStep() : CProgCtrlPage
  • OnStnClickedRadioId() : CTaskDialogTestDlg
  • OnStop() : CAnimateCtrlPage
  • OnStrings() : CVarUseDlg
  • OnStyleChange() : CProgCtrlPage
  • OnStyleClicked() : CStylePage
  • OnStyleDialog() : CMSOffice2007DemoView
  • OnSupport() : CResourcePage
  • OnSysColorChange() : CMainFrame , CRulerBar , CMSMToolBar , CRulerBar , CMainFrame
  • OnSysCommand() : CDlgtempDlg , CMainDlg , NewControlsPropSheet , CAllControlsSheet , CDHtmlExploreDlg , CDlgToolTipsDlg , CTrayMenuDlg , CVarUseDlg , CSchedulerDlg , CPropSheetDemoDlg , CCalcDlg , CMSMCaptionBar , CGuidGenDlg , CMutexesDlg , CAllControlsSheet
  • OnTabIcons() : CTabControlView
  • OnTabSwap() : CTabControlView
  • OnTask() : CMainFrame
  • OnTearOffMenu() : CMainFrame
  • OnTestBitmapButton1() : CTestWindow
  • OnTestBitmapButton2() : CTestWindow
  • OnTestBitmapButton3() : CTestWindow
  • OnTestCustomList() : CTestWindow
  • OnTestDerivedEdit() : CTestWindow
  • OnTestSpinEdit() : CTestWindow
  • OnTestSubclassedEdit() : CTestWindow
  • OnTestWndClassEdit() : CTestWindow
  • OnTextColor() : CStatusBarDemoView
  • OnTextNotFound() : CWordPadView
  • OnThreadKillThreadsSlow() : CThreadView
  • OnThreeColumns() : CMainFrame
  • OnTickfreq() : CSliderCtrlPage
  • OnTime() : CMainFrame
  • OnTimer() : CCubeView , CBounceWnd , CTimeCtrl , CWndListDlg , CPadView , CMainFrame , CStatusBarDemoView , CProgressBarTaskDialog , CWordPadView , CBounceWnd , CMainFrame , CBounceView , CChildView , CWordPadView
  • OnTitleChange() : CMfcieView , CIEDemoView
  • OnTo() : CProgCtrlPage
  • OnToggleInsert() : CMainFrame
  • OnToolBarCheck() : CModelessMain
  • OnToolbarContextMenu() : CMainFrame
  • OnToolbarCreateNew() : CMainFrame
  • OnToolbarReset() : CMainFrame , CMailFrame , CMainFrame
  • OnToolsConnectToDatabase() : CMainFrame
  • OnToolsDebugProcesses() : CMainFrame
  • OnToolsMacros() : CTestContainer98Doc
  • OnToolsMakeBW() : CChildView
  • OnToolsOptions() : CMainFrame
  • OnToolsToolbar() : CMainFrame
  • OnToolsViewUserToolbar() : CMainFrame
  • OnToolTipText() : CModelessMain
  • OnToolTipTextChanged() : CTesthelpCtrl
  • OnTraceWidth() : CSpiroView
  • OnTransparent() : CAnimateCtrlPage
  • OnTrayContextMenu() : CTrayMenuDlg
  • OnTrayNotify() : CTrayMenuDlg
  • OnTreeCollapsebranch() : CServerView
  • OnTreeDeleteItem() : CObjTreeView , CTypeLibTreeView
  • OnTreeExpandall() : CServerView
  • OnTreeExpandbranch() : CServerView
  • OnTreeExpandonelevel() : CServerView
  • OnTreeItemExpanded() : CTypeLibTreeView , CObjTreeView
  • OnTreeItemExpanding() : CTypeLibTreeView , CObjTreeView
  • OnTreeItemReturn() : CTypeLibTreeView
  • OnTreeReturn() : CObjTreeView
  • OnTreeSelchanged() : CTypeLibTreeView , CObjTreeView
  • OnTreeViewItemExpanding() : CRegistryView
  • OnTwoColumns() : CMainFrame
  • OnTypeChange() : CCustomFileDialog
  • OnUIActivate() : CTestContainer98Item
  • OnUIDeactivate() : CTestContainer98Item
  • OnUnloadHandler() : CDrawDoc
  • OnUnregister() : CRegistryView , CRegisterControlsDlg
  • OnUpdate() : CTypeLibListView , CTypeLibODLView , CRegistryView , CTestContainer98View , CDrawView , CServerView , CScribbleView , CContainerView , CInputView , CTrackerView , CMainView , CObjTreeView , CTypeLibTreeView , CRecalcView
  • OnUpdateAnyRing() : CSpiroView
  • OnUpdateAnySelect() : CDrawView
  • OnUpdateAnyWheel() : CSpiroView
  • OnUpdateAppLook() : CMainFrame
  • OnUpdateBackward1() : CMainFrame
  • OnUpdateBackward2() : CMainFrame
  • OnUpdateBarMenu() : CMainFrame
  • OnUpdateBlack() : CHelloView , CBounceView
  • OnUpdateBlockFmt() : CHTMLEdView
  • OnUpdateBlue() : CBounceView , CHelloView
  • OnUpdateBorderType() : CWordPadView
  • OnUpdateButton() : CDWordArrayView , CPointArrayView , CTypedPtrListView , CIntListView , CTypedPtrArrayView
  • OnUpdateCategorie() : CMainFrame
  • OnUpdateCharStrikeThrough() : CMSOffice2007DemoView
  • OnUpdateChoosePrintFont() : CPadView
  • OnUpdateClock() : CMainFrame
  • OnUpdateCmdUI() : CRulerBar , COutputToolBar , CPropertiesToolBar , CRulerBar , CFileViewToolBar , CClassToolBar , CHelpToolBar , CWorkspaceToolBar , CPropertiesToolBar , CFormatBar
  • OnUpdateColor() : CHTMLEdView , CBounceWnd , CHelloView , CHelloWnd , CBounceWnd , CHelloWnd , CSpiroView
  • OnUpdateCommand3() : CWorkspaceBar
  • OnUpdateContextHelp() : CInPlaceFrame
  • OnUpdateControlActivate() : CTestContainer98View
  • OnUpdateControlDeactivate() : CTestContainer98View
  • OnUpdateControlDrawMetaFile() : CTestContainer98View
  • OnUpdateControlInvokeMethods() : CTestContainer98View
  • OnUpdateControlLogging() : CTestContainer98View
  • OnUpdateControlSaveToPropertyBag() : CTestContainer98View
  • OnUpdateControlSaveToStorage() : CTestContainer98View
  • OnUpdateControlSaveToStream() : CTestContainer98View
  • OnUpdateControlUIActivate() : CTestContainer98View
  • OnUpdateControlUIDeactivate() : CTestContainer98View
  • OnUpdateCustom() : CBounceView , CHelloView
  • OnUpdateCustomize() : CMainFrame
  • OnUpdateDemoThread() : CRecalcDoc
  • OnUpdateDhelp1() : CDynamicHelpViewBar
  • OnUpdateDhelp2() : CDynamicHelpViewBar
  • OnUpdateDhelp3() : CDynamicHelpViewBar
  • OnUpdateDraw() : CSpiroView
  • OnUpdateDrawEllipse() : CDrawView
  • OnUpdateDrawLine() : CDrawView
  • OnUpdateDrawPattern() : CSpiroView
  • OnUpdateDrawPolygon() : CDrawView
  • OnUpdateDrawRect() : CDrawView
  • OnUpdateDrawRoundRect() : CDrawView
  • OnUpdateDrawSelect() : CDrawView
  • OnUpdateEditAllowInvert() : CTrackerDoc
  • OnUpdateEditBringToFront() : CTestContainer98View
  • OnUpdateEditClear() : CContainerView , CTestContainer98View
  • OnUpdateEditClearAll() : CMainDoc , CScribbleDoc
  • OnUpdateEditClone() : CMainView
  • OnUpdateEditCopy() : CTestContainer98View , CDrawView , CContainerView , CDibView
  • OnUpdateEditCut() : CTestContainer98View , CDrawView
  • OnUpdateEditDeleteAll() : CTestContainer98Doc
  • OnUpdateEditDottedline() : CTrackerDoc
  • OnUpdateEditFind() : CNotepadView , CMSOffice2007DemoView
  • OnUpdateEditGoto() : CNotepadView
  • OnUpdateEditHatchedborder() : CTrackerDoc
  • OnUpdateEditHatchedinside() : CTrackerDoc
  • OnUpdateEditMenu() : CMainView
  • OnUpdateEditPaste() : CServerView , CDrawView , CTestContainer98View , CDrawView , CMainView , CDibView
  • OnUpdateEditProperties() : CDrawView , CTestContainer98View
  • OnUpdateEditReplace() : CMSOffice2007DemoView
  • OnUpdateEditResizeinside() : CTrackerDoc
  • OnUpdateEditResizeoutside() : CTrackerDoc
  • OnUpdateEditSelectAll() : CDrawView , CTestContainer98View , CDrawView
  • OnUpdateEditSendToBack() : CTestContainer98View
  • OnUpdateEditSolidline() : CTrackerDoc
  • OnUpdateElement() : CStringListView
  • OnUpdateExampleUI() : CMainFrame
  • OnUpdateExpand() : CPropertiesViewBar
  • OnUpdateFast() : CBounceView , CBounceWnd , CSpiroView
  • OnUpdateFilePlay() : CCubeView
  • OnUpdateFilePrintPreview() : CMainFrame , CSplitFrame
  • OnUpdateFolderUp() : CExplorerView
  • OnUpdateFontName() : CMainFrame
  • OnUpdateFontSize() : CMainFrame
  • OnUpdateForward1() : CMainFrame
  • OnUpdateForward2() : CMainFrame
  • OnUpdateFourColumns() : CMainFrame
  • OnUpdateFPS() : CChildView
  • OnUpdateGoAddress() : CMSMoneyDemoDoc
  • OnUpdateGoAddressEdit() : CMainFrame
  • OnUpdateGoBack() : CIEDemoView , CMSMoneyDemoDoc
  • OnUpdateGoForward() : CIEDemoView , CMSMoneyDemoDoc
  • OnUpdateGreen() : CHelloView , CBounceView
  • OnUpdateHasSel() : CServerView
  • OnUpdateIfEmbedded() : CWordPadDoc
  • OnUpdateImage() : CChildView
  • OnUpdateImageFormats() : CChildView
  • OnUpdateIndicatorSendReceive() : CMainFrame
  • OnUpdateInsert() : CMainFrame
  • OnUpdateItem2() : CPage1
  • OnUpdateItem4() : CTrayMenuDlg
  • OnUpdateKeyIndicator() : CModelessMain
  • OnUpdateKillWorkerThread() : CRecalcDoc
  • OnUpdateLineNumber() : CMainFrame
  • OnUpdateLineStyle() : COwnerDrawMenuView
  • OnUpdateLinks() : CMainFrame
  • OnUpdateMailHightPriority() : CMailView
  • OnUpdateMailLowPriority() : CMailView
  • OnUpdateMdiTabbed() : CMainFrame
  • OnUpdateMdiTabbedDocument() : CMainFrame
  • OnUpdateMiniFramePropertySheet() : CMainFrame
  • OnUpdateMirrorDisplayFont() : CPadView
  • OnUpdateObjectDelete() : CMainFrame
  • OnUpdateObjectDisplayAsIcon() : CMainView
  • OnUpdateObjectDisplayContent() : CMainView
  • OnUpdateObjectFillColor() : CDrawView
  • OnUpdateObjectLineColor() : CDrawView
  • OnUpdateObjectLineWeight() : CDrawView
  • OnUpdateObjectNoFill() : CDrawView
  • OnUpdateObjectNoLine() : CDrawView
  • OnUpdateObjectProperties() : CDrawView
  • OnUpdateObjectStyles() : CDrawView
  • OnUpdateObjectVerbMenu() : CWordPadDoc
  • OnUpdateObjectVerify() : CMainFrame
  • OnUpdateOleChangeSource() : CMainView
  • OnUpdateOleEditProperties() : CMainView
  • OnUpdateOleVerbPopup() : CWordPadDoc
  • OnUpdateOptionRate() : CWndListDlg
  • OnUpdateOptionsDesignMode() : CTestContainer98View
  • OnUpdateOptionsFreezeEvents() : CTestContainer98Doc
  • OnUpdateOptionsSlowDrawing() : CTestContainer98Doc
  • OnUpdateOptionsTraceLevelNone() : CTestContainer98App
  • OnUpdateOptionsTraceLevelNormal() : CTestContainer98App
  • OnUpdateOptionsTraceLevelVerbose() : CTestContainer98App
  • OnUpdateOptionsTwoPassDrawing() : CTestContainer98Doc
  • OnUpdateOutlookAddPage() : CMainFrame
  • OnUpdateOutlookAnimation() : CMainFrame
  • OnUpdateOutlookBarShortcut() : CMainFrame
  • OnUpdateOutlookDeletePage() : CMainFrame
  • OnUpdateOutlookRenamePage() : CMainFrame
  • OnUpdateOutlookShowTextLabels() : CMainFrame
  • OnUpdatePalette() : CMainFrame
  • OnUpdatePalette2column() : CMainFrame
  • OnUpdatePalette3column() : CMainFrame
  • OnUpdatePaletteMenu() : CMainFrame
  • OnUpdatePaletteTool() : CPaletteDemoDoc
  • OnUpdatePane() : CMainFrame
  • OnUpdatePause() : CSpiroView
  • OnUpdatePauseBlit() : CChildView
  • OnUpdatePauseBlur() : CChildView
  • OnUpdatePauseDrawing() : CSpiroView
  • OnUpdatePauseSwarm() : CChildView
  • OnUpdatePenThickOrThin() : CScribbleDoc
  • OnUpdatePenWidth() : CSpiroView
  • OnUpdatePercentDone() : CMainFrame
  • OnUpdatePrintLayout() : CMSOffice2007DemoView
  • OnUpdateProperies1() : CPropertiesViewBar
  • OnUpdateProperies2() : CPropertiesViewBar
  • OnUpdatePropertySheetWithPreview() : CShapesView
  • OnUpdatePropListAlphabetMode() : CPropertiesViewBar
  • OnUpdatePropListTreeMode() : CPropertiesViewBar
  • OnUpdateRed() : CHelloView , CBounceView
  • OnUpdateRefresh() : CMainFrame
  • OnUpdateRemoveRing() : CSpiroView
  • OnUpdateRemoveWheel() : CSpiroView
  • OnUpdateResetPage() : CMainFrame
  • OnUpdateResolution() : CChildView
  • OnUpdateRibbonBtn7() : CMainFrame
  • OnUpdateRibbonBtn8() : CMainFrame
  • OnUpdateRibbonBtn9() : CMainFrame
  • OnUpdateRibbonObtn10() : CMainFrame
  • OnUpdateRibbonObtn8() : CMainFrame
  • OnUpdateScheduleDisplay() : CSchedulerDlg
  • OnUpdateSectionRemove() : CMFCBindDoc
  • OnUpdateSelection() : CDrawView
  • OnUpdateSimplePropertySheet() : CShapesView
  • OnUpdateSingleSelect() : CDrawView
  • OnUpdateSizeDouble() : CChildView
  • OnUpdateSizeFill() : CChildView
  • OnUpdateSizeHalf() : CChildView
  • OnUpdateSizeOriginal() : CChildView
  • OnUpdateSlow() : CBounceWnd , CSpiroView , CBounceWnd , CBounceView
  • OnUpdateSort() : CClassViewBar
  • OnUpdateSortingprop() : CPropertiesViewBar
  • OnUpdateStatus() : CSpeakNDlg
  • OnUpdateStatusBarMenu() : CModelessMain
  • OnUpdateStyle() : CMainFrame
  • OnUpdateSystemColors() : CMSMVisualManager
  • OnUpdateThreeColumns() : CMainFrame
  • OnUpdateTime() : CWndListDlg
  • OnUpdateTimerTick() : CSpiroView
  • OnUpdateToolbarButtons() : CHTMLEdView
  • OnUpdateToolBarMenu() : CModelessMain
  • OnUpdateToolsViewUserToolbar() : CMainFrame
  • OnUpdateTraceWidth() : CSpiroView
  • OnUpdateTreeCollapsebranch() : CServerView
  • OnUpdateTreeExpandall() : CServerView
  • OnUpdateTreeExpandbranch() : CServerView
  • OnUpdateTreeExpandonelevel() : CServerView
  • OnUpdateTwoColumns() : CMainFrame
  • OnUpdateUI() : CHTMLEdView
  • OnUpdateUseInProcHandler() : CMainFrame , CObjTreeView
  • OnUpdateUseInProcServer() : CMainFrame , CObjTreeView
  • OnUpdateUseLocalServer() : CMainFrame , CObjTreeView
  • OnUpdateValue() : CSliderProp , CBoundedNumberPairProp , CBoundedNumberSubProp
  • OnUpdateViewAddressBar() : CMainFrame
  • OnUpdateViewCaptionBar() : CMainFrame
  • OnUpdateViewCaptionbar() : CMainFrame
  • OnUpdateViewClass() : CMainFrame
  • OnUpdateViewClientWidthSel() : CRowListView
  • OnUpdateViewDetails() : CRowListView , CExplorerView
  • OnUpdateViewDialogBar() : CMainFrame
  • OnUpdateViewDlgbartop() : CMainFrame
  • OnUpdateViewDocMap() : CMSOffice2007DemoView
  • OnUpdateViewDynamichelp() : CMainFrame
  • OnUpdateViewEditingtoolbar() : CMainFrame
  • OnUpdateViewExplorerbar() : CMainFrame
  • OnUpdateViewFile() : CMainFrame
  • OnUpdateViewFolderList() : CMainFrame
  • OnUpdateViewFolders() : CMainFrame
  • OnUpdateViewFullRowDetails() : CRowListView
  • OnUpdateViewGrid() : CDrawView
  • OnUpdateViewGridLines() : CMSOffice2007DemoView
  • OnUpdateViewGroupByKind() : CTypeLibWnd
  • OnUpdateViewInfobar() : CMainFrame
  • OnUpdateViewLargeicon() : CExplorerView
  • OnUpdateViewLargeIcons() : CRowListView
  • OnUpdateViewLinksBar() : CMainFrame
  • OnUpdateViewList() : CRowListView , CExplorerView
  • OnUpdateViewMacroBar() : CMainFrame
  • OnUpdateViewMessageBar() : CMainFrame
  • OnUpdateViewOutlookBar() : CMainFrame
  • OnUpdateViewOutlookbar() : CMainFrame
  • OnUpdateViewOutput() : CMainFrame
  • OnUpdateViewPreviewPane() : COutlookDemoView
  • OnUpdateViewProperties() : CMainFrame
  • OnUpdateViewProps() : CMSOffice2007DemoView
  • OnUpdateViewRefresh() : CMainFrame , CMSMoneyDemoDoc
  • OnUpdateViewResource() : CMainFrame
  • OnUpdateViewRtl() : CMainFrame
  • OnUpdateViewRuler() : CMSOffice2007DemoView
  • OnUpdateViewShowObjects() : CDrawView
  • OnUpdateViewSmallicon() : CExplorerView
  • OnUpdateViewSmallIcons() : CRowListView
  • OnUpdateViewSource() : CMainFrame
  • OnUpdateViewStateIcons() : CRowListView
  • OnUpdateViewStatusBar() : CMainFrame
  • OnUpdateViewStop() : CMSMoneyDemoDoc
  • OnUpdateViewTaskpane() : CMainFrame
  • OnUpdateViewTextlabels() : CMainFrame
  • OnUpdateViewThemeToolbar() : CMainFrame
  • OnUpdateViewThumb() : CMSOffice2007DemoView
  • OnUpdateViewToolsPalette() : CMainFrame
  • OnUpdateViewWatch() : CMainFrame
  • OnUpdateViewWeb() : CMainFrame
  • OnUpdateViewWorkspace() : CMainFrame
  • OnUpdateViewWorkspace2() : CMainFrame
  • OnUpdateWhite() : CHelloView , CBounceView
  • OnUpdateWindowManager() : CMainFrame
  • OnUpdateWordWrap() : CPadView
  • OnUpdateWriteClipboard() : CMainFrame
  • OnUpdateZoom() : CServerView
  • OnUpdateZoomIn() : CSpiroView
  • OnUpdateZoomOut() : CSpiroView
  • OnUseDispatch() : CAutoDrivDlg
  • OnUseInProcHandler() : CObjTreeView , CMainFrame
  • OnUseInProcServer() : CMainFrame , CObjTreeView
  • OnUseLocalServer() : CObjTreeView , CMainFrame
  • OnUseMyHelpChanged() : CTesthelpCtrl
  • OnUsePopupHelpChanged() : CTesthelpCtrl
  • OnUsetooltipClicked() : CTesthelpPropPage
  • OnVerifyAll() : CNetAddrVerifierDlg
  • OnVerifyIPv4() : CNetAddrVerifierApp , CNetAddrVerifierDlg
  • OnVerifyIPv6() : CNetAddrVerifierDlg
  • OnVerifyNamed() : CNetAddrVerifierDlg
  • OnView() : CInterfaceViewer , CDataObjectViewer , CDispatchViewer , CTypeLibViewer
  • OnViewAddressBar() : CMainFrame
  • OnViewAppLook() : CVisualStudioDemoApp , CWordPadApp , COutlookDemoApp
  • OnViewBack() : COutlookDemoDoc
  • OnViewBar() : CMainFrame
  • OnViewCaptionbar() : CMainFrame
  • OnViewCaptionBar() : CMainFrame
  • OnViewClass() : CMainFrame
  • OnViewClientWidthSel() : CRowListView
  • OnViewCustomize() : CMainFrame , CMailFrame , CMainFrame
  • OnViewDetails() : CRowListView , CExplorerView
  • OnViewDialogBar() : CMainFrame
  • OnViewDlgbarTop() : CMainFrame
  • OnViewDocMap() : CMSOffice2007DemoView
  • OnViewDynamichelp() : CMainFrame
  • OnViewEditingtoolbar() : CMainFrame
  • OnViewExplorerbar() : CMainFrame
  • OnViewFile() : CMainFrame
  • OnViewFindNext() : CNotepadView
  • OnViewFolderList() : CMainFrame
  • OnViewFolders() : CMainFrame
  • OnViewFoldersPopup() : CMainFrame
  • OnViewFontsLarge() : CIEDemoView , CMfcieView
  • OnViewFontsLargest() : CMfcieView , CIEDemoView
  • OnViewFontsMedium() : CMfcieView , CIEDemoView
  • OnViewFontsSmall() : CMfcieView , CIEDemoView
  • OnViewFontsSmallest() : CMfcieView , CIEDemoView
  • OnViewFullRowDetails() : CRowListView
  • OnViewFullScreen() : CMainFrame
  • OnViewGrid() : CDrawView
  • OnViewGridLines() : CMSOffice2007DemoView
  • OnViewGroupKind() : CTypeLibWnd
  • OnViewInfobar() : CMainFrame
  • OnViewLargeicon() : CExplorerView
  • OnViewLargeIcons() : CRowListView
  • OnViewLinksBar() : CMainFrame
  • OnViewList() : CExplorerView , CRowListView
  • OnViewLong() : CMainFrame
  • OnViewMacroBar() : CMainFrame
  • OnViewMessageBar() : CMainFrame
  • OnViewMyComputer() : CMainFrame
  • OnViewOptions() : CWordPadDoc
  • OnViewOutlookbar() : CMainFrame
  • OnViewOutlookBar() : CMainFrame
  • OnViewOutput() : CMainFrame , COutputList1 , CMainFrame , COutputList
  • OnViewPalette() : CMainFrame
  • OnViewPaperColor() : CDrawDoc
  • OnViewPauseBlit() : CChildView
  • OnViewPauseBlur() : CChildView
  • OnViewPauseSwarm() : CChildView
  • OnViewPreviewPane() : COutlookDemoView
  • OnViewProperties() : CMainFrame
  • OnViewProps() : CMSOffice2007DemoView
  • OnViewRefresh() : CMfcieView , CMainFrame , CIEDemoView , CMSMoneyDemoDoc , CExplorerView
  • OnViewResource() : CMainFrame
  • OnViewRtl() : CMainFrame
  • OnViewRuler() : CMSOffice2007DemoView
  • OnViewSethandlesize() : CTrackerView
  • OnViewSetminimumsize() : CTrackerView
  • OnViewShort() : CMainFrame
  • OnViewShowObjects() : CDrawView
  • OnViewSmallicon() : CExplorerView
  • OnViewSmallIcons() : CRowListView
  • OnViewSource() : CMainFrame
  • OnViewStateIcons() : CRowListView
  • OnViewStatusBar() : CMainFrame
  • OnViewStop() : CIEDemoView , CMfcieView , CMSMoneyDemoDoc
  • OnViewTaskpane() : CMainFrame
  • OnViewTextlabels() : CMainFrame
  • OnViewThemeToolbar() : CMainFrame
  • OnViewToolsPalette() : CMainFrame
  • OnViewTypeInfo() : CDispatchDlg
  • OnViewUp() : COutlookDemoDoc
  • OnViewUpdatenow() : CPadDoc
  • OnViewWatch() : CMainFrame
  • OnViewWeb() : CMainFrame
  • OnViewWorkspace() : CMainFrame
  • OnViewWorkSpace() : CMainFrame
  • OnViewWorkspace() : CMainFrame
  • OnViewWorkspace2() : CMainFrame
  • OnViewZoomCustom() : CServerView
  • OnVisualManager() : CTasksPaneView
  • OnVScroll() : CParsedEdit
  • OnWebAddress() : COutlookDemoDoc
  • OnWebBack() : COutlookDemoDoc
  • OnWebFind() : COutlookDemoDoc
  • OnWebRefresh() : COutlookDemoDoc
  • OnWebStart() : COutlookDemoDoc
  • OnWindowlessDefWindowMessage() : CTestContainer98View
  • OnWindowlessDragEnter() : CTestContainer98Item
  • OnWindowlessDragLeave() : CTestContainer98Item
  • OnWindowlessDragOver() : CTestContainer98Item
  • OnWindowlessDrop() : CTestContainer98Item
  • OnWindowlessReleaseCapture() : CTestContainer98View
  • OnWindowlessReleaseFocus() : CTestContainer98View
  • OnWindowlessSetCapture() : CTestContainer98View
  • OnWindowlessSetFocus() : CTestContainer98View
  • OnWindowManager() : CMainFrame
  • OnWindowMessage() : CTestContainer98Item
  • OnWindowPosChanged() : CRulerBar
  • OnWindowPosChanging() : CRulerBar , CView4 , CView1 , COutputList1 , CView2 , CView3 , CRulerBar
  • OnWindowTileHorz() : CMainFrame
  • OnWordWrap() : CPadView
  • OnWorkAreas() : CListHdrDlg
  • OnWraplabels() : CTasksPaneView
  • OnWraptasks() : CTasksPaneView
  • OnWriteClipboard() : CMainFrame
  • OnXpButtons() : CPage1
  • OnYellow() : CSpiroView
  • OnZoom() : CMainFrame , CServerView
  • OnZoomIn() : CSpiroView
  • OnZoomOut() : CSpiroView
  • OnZoomSlider() : CMainFrame
  • Open() : CKey
  • OpenScheduler() : CSchedulerDlg
  • operator __m128i() : CSSE2Unsigned16Saturated
  • operator __m64() : CMMXUnsigned16Saturated
  • operator COLORREF() : SHAPE_COLOR
  • operator const FUNCDESC *() : CSmartFuncDesc
  • operator const VARDESC *() : CSmartVarDesc
  • operator CPoint() : CVector
  • operator delete() : CBounceThread
  • operator int() : SHAPE_COLOR
  • operator ULONGLONG() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • operator&() : CSmartTypeAttr , CSmartFuncDesc , CSmartVarDesc
  • operator&=() : CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated
  • operator+() : CVector
  • operator+=() : CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated , CVector
  • operator-() : CVector
  • operator-=() : CVector , CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated
  • operator->() : CSmartFuncDesc , CSmartTypeAttr , CSmartVarDesc
  • operator<< : CMethodInfo , CDebugLog , CFileLog , CLog , COutputWindowLog , CLog , CNullLog
  • operator<<=() : CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated
  • operator=() : CMMXUnsigned16Saturated , CVector , CSSE2Unsigned16Saturated , SHAPE_COLOR , CUnit , CAmbientProperty , SHAPE_COLOR , CRibbonListFontButton::XItem , CMMXUnsigned16Saturated , CUnit , CSSE2Unsigned16Saturated , CEntryInfoDlg , CVector , CMyScheduler
  • operator==() : CParaFormat , CCharFormat , CParaFormat , CCharFormat
  • operator>>=() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • operator|=() : CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated
  • OUTLOOK_FRAME : COutlookDemoApp
  • OutputPercent() : CTrackFile
  • OutputString() : CTrackFile
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- z -

  • ZoomChange() : CSpiroView
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- ~ -

  • ~C3WaySplitterFrame() : C3WaySplitterFrame
  • ~CAddressCombo() : CAddressCombo
  • ~CAllControlsSheet() : CAllControlsSheet
  • ~CAutoClickDoc() : CAutoClickDoc
  • ~CAutoClickPoint() : CAutoClickPoint
  • ~CAutoClickView() : CAutoClickView
  • ~CBallThread() : CBallThread
  • ~CBitmapProperty() : CBitmapProperty
  • ~CBkfstPage() : CBkfstPage
  • ~CBounceDoc() : CBounceDoc
  • ~CBounceFrame() : CBounceFrame
  • ~CBounceThread() : CBounceThread
  • ~CBounceView() : CBounceView
  • ~CButtonCtrl() : CButtonCtrl
  • ~CButtonDialog() : CButtonDialog
  • ~CCalcDlg() : CCalcDlg
  • ~CCalendarBar() : CCalendarBar
  • ~CChildFrame() : CChildFrame
  • ~CChildView() : CChildView
  • ~CCircCtrl() : CCircCtrl
  • ~CClassTreeWnd() : CClassTreeWnd
  • ~CClassViewBar() : CClassViewBar
  • ~CCollectDoc() : CCollectDoc
  • ~CCollectView() : CCollectView
  • ~CColorMenu() : CColorMenu
  • ~CColorView() : CColorView
  • ~CCommandLinkCtrlPage() : CCommandLinkCtrlPage
  • ~CConfigDlg() : CConfigDlg
  • ~CContainerDoc() : CContainerDoc
  • ~CContainerItem() : CContainerItem
  • ~CContainerView() : CContainerView
  • ~CCounterThread() : CCounterThread
  • ~CCubeDoc() : CCubeDoc
  • ~CCubeView() : CCubeView
  • ~CCustomFileDialog() : CCustomFileDialog
  • ~CCustomList() : CCustomList
  • ~CCustomPagesDoc() : CCustomPagesDoc
  • ~CCustomPagesView() : CCustomPagesView
  • ~CCustomSliderCtrl() : CCustomSliderCtrl
  • ~CCustomToolTipCtrl() : CCustomToolTipCtrl
  • ~CDataObjectViewer() : CDataObjectViewer
  • ~CDateTimePage() : CDateTimePage
  • ~CDBVListDoc() : CDBVListDoc
  • ~CDBVListView() : CDBVListView
  • ~CDebugLog() : CDebugLog
  • ~CDemoOptionsPage() : CDemoOptionsPage
  • ~CDibDoc() : CDibDoc
  • ~CDibView() : CDibView
  • ~CDinnerPage() : CDinnerPage
  • ~CDispatchViewer() : CDispatchViewer
  • ~CDisplayThread() : CDisplayThread
  • ~CDlgBanner() : CDlgBanner
  • ~CDlgStatusBar() : CDlgStatusBar
  • ~CDlgToolBar() : CDlgToolBar
  • ~CDockDoc() : CDockDoc
  • ~CDockView() : CDockView
  • ~CDocOptPage() : CDocOptPage
  • ~CDrawDoc() : CDrawDoc
  • ~CDrawItem() : CDrawItem
  • ~CDrawObj() : CDrawObj
  • ~CDrawOleObj() : CDrawOleObj
  • ~CDrawPoly() : CDrawPoly
  • ~CDrawView() : CDrawView
  • ~CDriverDlg() : CDriverDlg
  • ~CDriverDoc() : CDriverDoc
  • ~CDriverView() : CDriverView
  • ~CDWordArrayView() : CDWordArrayView
  • ~CDynaMDIChildWnd() : CDynaMDIChildWnd
  • ~CDynaMenuDoc() : CDynaMenuDoc
  • ~CDynaMenuView() : CDynaMenuView
  • ~CDynamicHelpViewBar() : CDynamicHelpViewBar
  • ~CDynamicMenuDoc() : CDynamicMenuDoc
  • ~CDynamicMenuView() : CDynamicMenuView
  • ~CEditBar() : CEditBar
  • ~CEditToolbar() : CEditToolbar
  • ~CEmpView() : CEmpView
  • ~CEntryInfoDlg() : CEntryInfoDlg
  • ~CEnumVariant() : CEnumVariant
  • ~CEventLoggingPage() : CEventLoggingPage
  • ~CExcepInfo() : CExcepInfo
  • ~CExplorerBar() : CExplorerBar
  • ~CExplorerDoc() : CExplorerDoc
  • ~CExplorerView() : CExplorerView
  • ~CExtendedControl() : CExtendedControl
  • ~CFavorit() : CFavorit
  • ~CFavoritesManager() : CFavoritesManager
  • ~CFeaturesPage() : CFeaturesPage
  • ~CFigure() : CFigure
  • ~CFileLog() : CFileLog
  • ~CFileViewBar() : CFileViewBar
  • ~CFolderBar() : CFolderBar
  • ~CFolderListBar() : CFolderListBar
  • ~CFolderListPopupWnd() : CFolderListPopupWnd
  • ~CFoldersTree() : CFoldersTree
  • ~CFormatTabDlg() : CFormatTabDlg
  • ~CGDIThread() : CGDIThread
  • ~CHelloDoc() : CHelloDoc
  • ~CHelloFrame() : CHelloFrame
  • ~CHelloView() : CHelloView
  • ~CHistoryObj() : CHistoryObj
  • ~CHTMLEdDoc() : CHTMLEdDoc
  • ~CHTMLEdView() : CHTMLEdView
  • ~CIconCombo() : CIconCombo
  • ~CIconComboBox() : CIconComboBox
  • ~CIDataObjectDlg() : CIDataObjectDlg
  • ~CIEDemoDoc() : CIEDemoDoc
  • ~CIEDemoView() : CIEDemoView
  • ~CImageCtrl() : CImageCtrl
  • ~CImpIAdviseSink() : CImpIAdviseSink
  • ~CInfoBar() : CInfoBar
  • ~CInPlaceFrame() : CInPlaceFrame
  • ~CInputView() : CInputView
  • ~CInterfaceInfo() : CInterfaceInfo
  • ~CInterfacesPage() : CInterfacesPage
  • ~CInterfaceViewer() : CInterfaceViewer
  • ~CIntListView() : CIntListView
  • ~CItemData() : CItemData
  • ~CItemIcons() : CItemIcons
  • ~CKey() : CKey
  • ~CLicensedCtrl() : CLicensedCtrl
  • ~CLineStyleMenuItem() : CLineStyleMenuItem
  • ~CLineThread() : CLineThread
  • ~CLinkButton() : CLinkButton
  • ~CLinksBar() : CLinksBar
  • ~CListHdrDlg() : CListHdrDlg
  • ~CListOutputFrame() : CListOutputFrame
  • ~CListViewEx() : CListViewEx
  • ~CLocalizeCtrl() : CLocalizeCtrl
  • ~CLog() : CLog
  • ~CLunchPage() : CLunchPage
  • ~CMacroComboBox() : CMacroComboBox
  • ~CMailFrame() : CMailFrame
  • ~CMailView() : CMailView
  • ~CMainDoc() : CMainDoc
  • ~CMainFrame() : CMainFrame
  • ~CMainView() : CMainView
  • ~CMapDWordToMyStructView() : CMapDWordToMyStructView
  • ~CMapStringToStringView() : CMapStringToStringView
  • ~CMDITabsDemoDoc() : CMDITabsDemoDoc
  • ~CMDITabsDemoView() : CMDITabsDemoView
  • ~CMenuSubSetDoc() : CMenuSubSetDoc
  • ~CMenuSubSetView() : CMenuSubSetView
  • ~CMetaFileWnd() : CMetaFileWnd
  • ~CMethodDlg() : CMethodDlg
  • ~CMethodInfo() : CMethodInfo
  • ~CMethodParamInfo() : CMethodParamInfo
  • ~CMFCBindCntrItem() : CMFCBindCntrItem
  • ~CMFCBindDoc() : CMFCBindDoc
  • ~CMFCBindView() : CMFCBindView
  • ~CMfcieDoc() : CMfcieDoc
  • ~CMfcieView() : CMfcieView
  • ~CMFCRibbonNumEdit() : CMFCRibbonNumEdit
  • ~CModelessDialog() : CModelessDialog
  • ~CModelessMain() : CModelessMain
  • ~CMonthCalPage() : CMonthCalPage
  • ~CMSMCaptionBar() : CMSMCaptionBar
  • ~CMSMCaptionBarButton() : CMSMCaptionBarButton
  • ~CMSMCategoryBar() : CMSMCategoryBar
  • ~CMSMCategoryBarButton() : CMSMCategoryBarButton
  • ~CMSMLinksBar() : CMSMLinksBar
  • ~CMSMLinksBarButton() : CMSMLinksBarButton
  • ~CMSMMenuBar() : CMSMMenuBar
  • ~CMSMoneyDemoDoc() : CMSMoneyDemoDoc
  • ~CMSMoneyDemoView() : CMSMoneyDemoView
  • ~CMSMTasksPane() : CMSMTasksPane
  • ~CMSMToolBar() : CMSMToolBar
  • ~CMSMVisualManager() : CMSMVisualManager
  • ~CMSNVisualManager() : CMSNVisualManager
  • ~CMSOffice2007DemoCntrItem() : CMSOffice2007DemoCntrItem
  • ~CMSOffice2007DemoDoc() : CMSOffice2007DemoDoc
  • ~CMSOffice2007DemoView() : CMSOffice2007DemoView
  • ~CMutexesDlg() : CMutexesDlg
  • ~CMyListCtrl() : CMyListCtrl
  • ~CMyMenuBar() : CMyMenuBar
  • ~CMyObject() : CMyObject
  • ~CMyPropertyPage1() : CMyPropertyPage1
  • ~CMyPropertyPage2() : CMyPropertyPage2
  • ~CMyPropertyPage3() : CMyPropertyPage3
  • ~CMyPropertyPage4() : CMyPropertyPage4
  • ~CMyPropertySheet() : CMyPropertySheet
  • ~CMyScheduler() : CMyScheduler
  • ~CMyToolTipCtrl() : CMyToolTipCtrl
  • ~CMyTreeCtrl() : CMyTreeCtrl
  • ~CNetAddressCtrlPage() : CNetAddressCtrlPage
  • ~CNetAddrVerifierDlg() : CNetAddrVerifierDlg
  • ~CNotepadDoc() : CNotepadDoc
  • ~CNotepadView() : CNotepadView
  • ~CNotifyShowCase() : CNotifyShowCase
  • ~CNullLog() : CNullLog
  • ~CObjectData() : CObjectData
  • ~CObjListView() : CObjListView
  • ~CObjTreeView() : CObjTreeView
  • ~COle2ViewDoc() : COle2ViewDoc
  • ~COptionsDlg() : COptionsDlg
  • ~COptionsPage1() : COptionsPage1
  • ~COptionsPage12() : COptionsPage12
  • ~COptionsPage21() : COptionsPage21
  • ~COptionsPage22() : COptionsPage22
  • ~COptionsPage31() : COptionsPage31
  • ~COptionsPage32() : COptionsPage32
  • ~COutlookDemoDoc() : COutlookDemoDoc
  • ~COutlookDemoView() : COutlookDemoView
  • ~COutlookMultiViewsDoc() : COutlookMultiViewsDoc
  • ~COutlookMultiViewsView() : COutlookMultiViewsView
  • ~COutputBar() : COutputBar
  • ~COutputList() : COutputList
  • ~COutputList1() : COutputList1
  • ~COutputViewBar() : COutputViewBar
  • ~COutputWindowLog() : COutputWindowLog
  • ~COutputWindowView() : COutputWindowView
  • ~COwnerDrawMenuDoc() : COwnerDrawMenuDoc
  • ~COwnerDrawMenuView() : COwnerDrawMenuView
  • ~CPadDoc() : CPadDoc
  • ~CPage1() : CPage1
  • ~CPage2() : CPage2
  • ~CPage3() : CPage3
  • ~CPage4() : CPage4
  • ~CPage5() : CPage5
  • ~CPage6() : CPage6
  • ~CPagerCtrlPage() : CPagerCtrlPage
  • ~CPalCtrl() : CPalCtrl
  • ~CPaletteBar() : CPaletteBar
  • ~CPaletteDemoDoc() : CPaletteDemoDoc
  • ~CPaletteDemoView() : CPaletteDemoView
  • ~CPointArrayView() : CPointArrayView
  • ~CPreviewPane() : CPreviewPane
  • ~CProgCtrlPage() : CProgCtrlPage
  • ~CPropertiesViewBar() : CPropertiesViewBar
  • ~CProperty() : CProperty
  • ~CPropertyBag() : CPropertyBag
  • ~CPropertyChangesPage() : CPropertyChangesPage
  • ~CPropertySection() : CPropertySection
  • ~CPropertySet() : CPropertySet
  • ~CPropSliderCtrl() : CPropSliderCtrl
  • ~CPushCtrl() : CPushCtrl
  • ~CRebarTestDoc() : CRebarTestDoc
  • ~CRebarTestView() : CRebarTestView
  • ~CRecalcDoc() : CRecalcDoc
  • ~CRecalcView() : CRecalcView
  • ~CRectItem() : CRectItem
  • ~CRectThread() : CRectThread
  • ~CRegEntry() : CRegEntry
  • ~CRegistryView() : CRegistryView
  • ~CResourcePage() : CResourcePage
  • ~CResourceViewBar() : CResourceViewBar
  • ~CRibbonGadgetsDoc() : CRibbonGadgetsDoc
  • ~CRibbonGadgetsView() : CRibbonGadgetsView
  • ~CRibbonListButton() : CRibbonListButton
  • ~CRibbonListFontButton() : CRibbonListFontButton
  • ~CRibbonMDIDemoDoc() : CRibbonMDIDemoDoc
  • ~CRibbonMDIDemoView() : CRibbonMDIDemoView
  • ~CRibbonTableButton() : CRibbonTableButton
  • ~CRibbonTooltipCtrl() : CRibbonTooltipCtrl
  • ~CRoamer() : CRoamer
  • ~CRollupPaneDoc() : CRollupPaneDoc
  • ~CRollupPaneView() : CRollupPaneView
  • ~CRowListDoc() : CRowListDoc
  • ~CRowListView() : CRowListView
  • ~CRulerBar() : CRulerBar
  • ~CRulerItem() : CRulerItem
  • ~CScribbleDoc() : CScribbleDoc
  • ~CScribbleItem() : CScribbleItem
  • ~CScribbleView() : CScribbleView
  • ~CScript() : CScript
  • ~CScriptManager() : CScriptManager
  • ~CSearchBox() : CSearchBox
  • ~CServerDC() : CServerDC
  • ~CServerDoc() : CServerDoc
  • ~CServerItem() : CServerItem
  • ~CServerNode() : CServerNode
  • ~CServerView() : CServerView
  • ~CServicesPage() : CServicesPage
  • ~CSetPaneSizeDoc() : CSetPaneSizeDoc
  • ~CSetPaneSizeView() : CSetPaneSizeView
  • ~CShapesDoc() : CShapesDoc
  • ~CShapesView() : CShapesView
  • ~CSliderButton() : CSliderButton
  • ~CSliderCtrlPage() : CSliderCtrlPage
  • ~CSliderDoc() : CSliderDoc
  • ~CSliderView() : CSliderView
  • ~CSmartFuncDesc() : CSmartFuncDesc
  • ~CSmartTypeAttr() : CSmartTypeAttr
  • ~CSmartVarDesc() : CSmartVarDesc
  • ~CSnapDoc() : CSnapDoc
  • ~CSnapPropertySheet() : CSnapPropertySheet
  • ~CSnapView() : CSnapView
  • ~CSourceView() : CSourceView
  • ~CSpinCtrlPage() : CSpinCtrlPage
  • ~CSpindialCtrl() : CSpindialCtrl
  • ~CSpiroDoc() : CSpiroDoc
  • ~CSpiroView() : CSpiroView
  • ~CSplitButtonCtrlPage() : CSplitButtonCtrlPage
  • ~CSplitFrame() : CSplitFrame
  • ~CSplitterFrame() : CSplitterFrame
  • ~CStandardBar() : CStandardBar
  • ~CStartView() : CStartView
  • ~CStateCollectionDoc() : CStateCollectionDoc
  • ~CStateCollectionView() : CStateCollectionView
  • ~CStatPage() : CStatPage
  • ~CStatusBarDemoDoc() : CStatusBarDemoDoc
  • ~CStatusBarDemoView() : CStatusBarDemoView
  • ~CStringCollect() : CStringCollect
  • ~CStringListView() : CStringListView
  • ~CSummPage() : CSummPage
  • ~CSurface() : CSurface
  • ~CSwarm() : CSwarm
  • ~CTabbedViewDoc() : CTabbedViewDoc
  • ~CTabbedViewView() : CTabbedViewView
  • ~CTabControlDoc() : CTabControlDoc
  • ~CTabControlView() : CTabControlView
  • ~CTaskPane() : CTaskPane
  • ~CTasksPaneDoc() : CTasksPaneDoc
  • ~CTasksPaneView() : CTasksPaneView
  • ~CTCBindHost() : CTCBindHost
  • ~CTCSplitter() : CTCSplitter
  • ~CTestContainer98Doc() : CTestContainer98Doc
  • ~CTestContainer98Item() : CTestContainer98Item
  • ~CTestContainer98View() : CTestContainer98View
  • ~CTesthelpCtrl() : CTesthelpCtrl
  • ~CTextView() : CTextView
  • ~CTheApp() : CTheApp
  • ~CThreadDoc() : CThreadDoc
  • ~CThreadView() : CThreadView
  • ~CTimeCtrl() : CTimeCtrl
  • ~CToolBarCtrlPage() : CToolBarCtrlPage
  • ~CToolbarDateTimePickerDoc() : CToolbarDateTimePickerDoc
  • ~CToolbarDateTimePickerView() : CToolbarDateTimePickerView
  • ~CToolsPalette() : CToolsPalette
  • ~CTooltipDemoDoc() : CTooltipDemoDoc
  • ~CTooltipDemoView() : CTooltipDemoView
  • ~CTrackerDoc() : CTrackerDoc
  • ~CTrackerView() : CTrackerView
  • ~CTrackFile() : CTrackFile
  • ~CTrayMenuDlg() : CTrayMenuDlg
  • ~CTreeCtrlPage() : CTreeCtrlPage
  • ~CTreeItem() : CTreeItem
  • ~CTypedPtrArrayView() : CTypedPtrArrayView
  • ~CTypedPtrListView() : CTypedPtrListView
  • ~CTypedPtrMapView() : CTypedPtrMapView
  • ~CTypeLibListView() : CTypeLibListView
  • ~CTypeLibODLView() : CTypeLibODLView
  • ~CTypeLibTreeView() : CTypeLibTreeView
  • ~CTypeLibViewer() : CTypeLibViewer
  • ~CTypeLibWnd() : CTypeLibWnd
  • ~CUndoBar() : CUndoBar
  • ~CUndoListBox() : CUndoListBox
  • ~CVariantAssoc() : CVariantAssoc
  • ~CVariantMap() : CVariantMap
  • ~CView1() : CView1
  • ~CView2() : CView2
  • ~CView3() : CView3
  • ~CView4() : CView4
  • ~CViewExSplitWnd() : CViewExSplitWnd
  • ~CVisualStudioDemoApp() : CVisualStudioDemoApp
  • ~CVisualStudioDemoDoc() : CVisualStudioDemoDoc
  • ~CVisualStudioDemoView() : CVisualStudioDemoView
  • ~CWatchBar() : CWatchBar
  • ~CWordPadApp() : CWordPadApp
  • ~CWorkspaceBar() : CWorkspaceBar
  • ~CWorkspaceBar2() : CWorkspaceBar2
  • ~CWorkspaceObj() : CWorkspaceObj
  • ~CWorkSpaceToolBarDoc() : CWorkSpaceToolBarDoc
  • ~CWorkSpaceToolBarView() : CWorkSpaceToolBarView
  • ~CXlistCtrl() : CXlistCtrl
  • ~NewControlsPropSheet() : NewControlsPropSheet
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- b -

  • bCaptureFullScreen : CaptureData
  • bDup : DocType
  • BEGIN_OLEFACTORY() : CLicensedCtrl
  • BeginAdjust() : CStandardBar , CPaletteBar
  • BeginDrag() : CStandardBar , CPaletteBar
  • bheight : tagPENTIP
  • BlitBits() : CSurface
  • BlurBits() : CSurface , CMMXSurface32Intrinsic , CMMXSurface24Intrinsic , CMMXSurface16Intrinsic , CSSE2Surface32Intrinsic , CSSE2Surface24Intrinsic , CSSE2Surface16Intrinsic
  • bmiOtherColors : BITMAPINFO256
  • bOpacity : tagPENTIP
  • bottom : tagRECTL
  • Bounce() : CRoamer
  • BoxDone() : CMainDlg
  • boxlayout : tagBOXEDITINFO
  • bRead : DocType
  • BringToFront() : CTestContainer98Doc
  • BroadcastAmbientPropertyChange() : CTestContainer98Doc
  • brushBtnFace : CRulerBar
  • brushWindow : CRulerBar
  • bSetupPixelFormat() : CCubeView
  • btype : tagPENTIP
  • Build() : CFavorit
  • BuildFavoritesMenu() : CMainFrame
  • Button() : CRemoteCalcDlg
  • BUTTON : CDialogItem
  • Button() : mfccalc::ICalcDlg , CCalcDlg
  • button1 : CBMTest1Dlg
  • button2 : CBMTest1Dlg
  • buttons : CBMTest2Dlg
  • bwidth : tagPENTIP
  • bWrite : DocType
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- c -

  • C3WaySplitterFrame() : C3WaySplitterFrame
  • c_bShowItems : CDrawOleObj
  • c_down : CDrawTool
  • c_drawShape : CDrawTool
  • c_last : CDrawTool
  • c_nDownFlags : CDrawTool
  • c_tools : CDrawTool
  • CAboutBox() : CAboutBox
  • CAboutDlg() : CAboutDlg
  • CAdderDialog() : CAdderDialog
  • CAddNodeDlg() : CAddNodeDlg
  • CAddressCombo() : CAddressCombo
  • CalcActualItemSize() : CServerView
  • CalcActualViewSize() : CServerView
  • CalcBounding() : CServerDoc , CServerNode
  • CalcDynamicLayout() : CEditBar
  • CalcFixedLayout() : CMacroDialogBar , CRulerBar , CMSMCaptionBar , CRulerBar
  • CalcNodeSize() : CServerNode
  • CalcScaledItemSize() : CServerView
  • CalcScaledViewSize() : CServerView
  • CalcSize() : CToolsPalette , CUndoBar
  • CalcWindowRect() : CInPlaceFrame , CWordPadView , CInPlaceFrame , CWordPadView
  • CAllControlsSheet() : CAllControlsSheet
  • CallInterfaceViewer() : CObjTreeView
  • CAmbientPropertiesDlg() : CAmbientPropertiesDlg
  • CAmbientProperty() : CAmbientProperty
  • CanAcceptPane() : CFolderListBar
  • CanBeRestored() : CLinksBar
  • CanBeStretched() : CSliderButton
  • CanChangeFillColor() : CDrawObj , CDrawRect , CDrawOleObj
  • CanChangeLineColor() : CDrawObj , CDrawOleObj
  • CanChangeLineWeight() : CDrawObj , CDrawOleObj
  • CanCloseFrame() : CTestContainer98Doc , CDrawDoc
  • CanDeactivateInplace() : CDrawDoc
  • CAnimateCtrlPage() : CAnimateCtrlPage
  • CanInPlaceActivate() : CTestContainer98Item
  • CanWindowlessActivate() : CTestContainer98Doc , CTestContainer98Item
  • CAppLookDlg() : CAppLookDlg
  • CAutoClickApp() : CAutoClickApp
  • CAutoClickDoc() : CAutoClickDoc
  • CAutoClickPoint() : CAutoClickPoint
  • CAutoClickView() : CAutoClickView
  • CAutoDrivApp() : CAutoDrivApp
  • CAutoDrivDlg() : CAutoDrivDlg
  • cb : DICTENTRYHEADER
  • CBallThread() : CBallThread
  • CBasePiece() : CBasePiece
  • CBitmapProperty() : CBitmapProperty
  • CBkfstPage() : CBkfstPage
  • CBMTest1Dlg() : CBMTest1Dlg
  • CBMTest2Dlg() : CBMTest2Dlg
  • CBMTest3Dlg() : CBMTest3Dlg
  • cbOemData : tagPENINFO
  • CBounceDoc() : CBounceDoc
  • CBounceFrame() : CBounceFrame
  • CBounceMDIChildWnd() : CBounceMDIChildWnd
  • CBounceThread() : CBounceThread
  • CBounceView() : CBounceView
  • CBounceWnd() : CBounceWnd
  • CBoundedNumberPairProp() : CBoundedNumberPairProp
  • CBoundedNumberSubProp() : CBoundedNumberSubProp
  • cbPnts : tagSTROKEINFO
  • CBrightLeader() : CBrightLeader
  • cbSection : tagSECTIONHEADER
  • cbSize : tagCTLINITHEDIT , tagCTLINITBEDIT , tagPENTIP , tagANIMATEINFO , tagCTLINITIEDIT , tagPDEVENT , tagSTRKFMT , tagPCMINFO , tagINKINGINFO , tagTARGINFO , tagINPPARAMS
  • cbSizeUsed : tagPENDATAHEADER
  • CButtonCtrl() : CButtonCtrl
  • CButtonDialog() : CButtonDialog
  • CButtonPropPage() : CButtonPropPage
  • CCalcApp() : CCalcApp
  • CCalcDlg() : CCalcDlg
  • CCalcDrivApp() : CCalcDrivApp
  • CCalendarBar() : CCalendarBar
  • CChangeNameDlg() : CChangeNameDlg
  • CChangeText() : CChangeText
  • CCharFormat() : CCharFormat
  • CCheckBoxProp() : CCheckBoxProp
  • CChildFrame() : CChildFrame
  • CChildView() : CChildView
  • CCImageApp() : CCImageApp
  • CCircCtrl() : CCircCtrl
  • CCircPropPage() : CCircPropPage
  • CClassTreeWnd() : CClassTreeWnd
  • CClassViewBar : CClassViewMenuButton , CClassViewBar
  • CClassViewMenuButton() : CClassViewMenuButton
  • CCmnCtrl1App() : CCmnCtrl1App
  • CCmnCtrl2App() : CCmnCtrl2App
  • CCmnCtrl3App() : CCmnCtrl3App
  • CCmnCtrl3Dlg() : CCmnCtrl3Dlg
  • CCollectApp() : CCollectApp
  • CCollectDoc() : CCollectDoc
  • CCollectView() : CCollectView
  • CColorMenu() : CColorMenu
  • CColorOptDlg() : CColorOptDlg
  • CColorPage() : CColorPage
  • cColors : tagIMECOLORS
  • CColorView() : CColorView
  • cColumns : tagITEMDATA
  • CComboBoxExProp() : CComboBoxExProp
  • CComboRulerItem() : CComboRulerItem
  • CCommandLinkCtrlPage() : CCommandLinkCtrlPage
  • CComponentCategoriesDlg() : CComponentCategoriesDlg
  • CConfigDlg() : CConfigDlg
  • CContainerApp() : CContainerApp
  • CContainerDoc() : CContainerDoc
  • CContainerInfoDlg() : CContainerInfoDlg
  • CContainerItem() : CContainerItem
  • CContainerView() : CContainerView
  • CCounterThread() : CCounterThread
  • CCSDialog() : CCSDialog
  • CCSPropertyPage() : CCSPropertyPage
  • CCSPropertySheet() : CCSPropertySheet
  • CCtrlbarsApp() : CCtrlbarsApp
  • CCubeApp() : CCubeApp
  • CCubeDoc() : CCubeDoc
  • CCubeView() : CCubeView
  • CCustListDlg() : CCustListDlg
  • CCustomDlgProp() : CCustomDlgProp
  • CCustomFileDialog() : CCustomFileDialog
  • CCustomList() : CCustomList
  • CCustomPagesApp() : CCustomPagesApp
  • CCustomPagesDoc() : CCustomPagesDoc
  • CCustomPagesView() : CCustomPagesView
  • CCustomSliderCtrl() : CCustomSliderCtrl
  • CCustomToolTipCtrl() : CCustomToolTipCtrl
  • CDataObjectDlg() : CDataObjectDlg
  • CDataObjectViewer() : CDataObjectViewer
  • CDateDialog() : CDateDialog
  • CDateTimePage() : CDateTimePage
  • CDBVListApp() : CDBVListApp
  • CDBVListDoc() : CDBVListDoc
  • CDBVListSet() : CDBVListSet
  • CDBVListView() : CDBVListView
  • CDebugLog() : CDebugLog
  • CDemoOptionsPage() : CDemoOptionsPage
  • CDemoOptionsPropSheet() : CDemoOptionsPropSheet
  • CDerEditDlg() : CDerEditDlg
  • CDesktopAlertDemoApp() : CDesktopAlertDemoApp
  • CDesktopAlertDemoDlg() : CDesktopAlertDemoDlg
  • CDHtmlExploreApp() : CDHtmlExploreApp
  • CDHtmlExploreDlg() : CDHtmlExploreDlg
  • CDialogItem() : CDialogItem
  • CDibDoc() : CDibDoc
  • CDibLookApp() : CDibLookApp
  • CDibView() : CDibView
  • CDinnerPage() : CDinnerPage
  • CDispatchDlg() : CDispatchDlg
  • CDispatchViewer() : CDispatchViewer
  • CDisplayIC() : CDisplayIC
  • CDisplayThread() : CDisplayThread
  • CDlgBanner() : CDlgBanner
  • CDlgStatusBar() : CDlgStatusBar
  • CDlgtempApp() : CDlgtempApp
  • CDlgtempDlg() : CDlgtempDlg
  • CDlgToolBar() : CDlgToolBar
  • CDlgToolTipsApp() : CDlgToolTipsApp
  • CDlgToolTipsDlg() : CDlgToolTipsDlg
  • CDllScreenCapApp() : CDllScreenCapApp
  • CDockApp() : CDockApp
  • CDockDoc() : CDockDoc
  • CDockView() : CDockView
  • CDocOptions() : CDocOptions
  • CDocOptPage() : CDocOptPage
  • CDrawApp() : CDrawApp
  • CDrawCliLiveIconsHandler() : CDrawCliLiveIconsHandler
  • CDrawCliSearchHandler() : CDrawCliSearchHandler
  • CDrawDoc() : CDrawDoc
  • CDrawItem() : CDrawItem
  • CDrawObj() : CDrawObj
  • CDrawObjFriend : CDrawView
  • CDrawOleObj() : CDrawOleObj
  • CDrawPoly() : CDrawPoly
  • CDrawRect() : CDrawRect
  • CDrawTool() : CDrawTool
  • CDrawView() : CDrawView
  • CDrawView::XPreviewStateItem : CDrawObjFriend
  • CDriveApp() : CDriveApp
  • CDriverDlg() : CDriverDlg
  • CDriverDoc() : CDriverDoc
  • CDriverView() : CDriverView
  • CDropTargetView() : CDropTargetView
  • CDWordArrayView() : CDWordArrayView
  • CDynaMDIChildWnd() : CDynaMDIChildWnd
  • CDynaMenuApp() : CDynaMenuApp
  • CDynaMenuDoc() : CDynaMenuDoc
  • CDynaMenuView() : CDynaMenuView
  • CDynamicHelpViewBar() : CDynamicHelpViewBar
  • CDynamicMenuApp() : CDynamicMenuApp
  • CDynamicMenuDoc() : CDynamicMenuDoc
  • CDynamicMenuView() : CDynamicMenuView
  • CEditBar() : CEditBar
  • CEditToolbar() : CEditToolbar
  • CEmbeddedItem : CPadDoc , CEmbeddedItem
  • CEmbeddedOptPage() : CEmbeddedOptPage
  • CEmpView() : CEmpView
  • CEndWizardDialog() : CEndWizardDialog
  • CEnterDlg() : CEnterDlg
  • CEntryInfoDlg() : CEntryInfoDlg
  • CEnumVariant() : CEnumVariant
  • CEventLoggingPage() : CEventLoggingPage
  • CExampleThread() : CExampleThread
  • CExcepInfo() : CExcepInfo
  • CExplorerApp() : CExplorerApp
  • CExplorerBar() : CExplorerBar
  • CExplorerDoc() : CExplorerDoc
  • CExplorerView() : CExplorerView
  • CExtendedControl() : CExtendedControl
  • cf : CHARHDR
  • CFavorit() : CFavorit
  • CFavoritesManager : CFavorit , CFavoritesManager
  • CFeaturesPage() : CFeaturesPage
  • CFigCommand() : CFigCommand
  • CFigure() : CFigure
  • CFileDlgWatcherApp() : CFileDlgWatcherApp
  • CFileDlgWatcherDlg() : CFileDlgWatcherDlg
  • CFileLog() : CFileLog
  • CFileNewDialog() : CFileNewDialog
  • CFileViewBar() : CFileViewBar
  • CFindComboButton() : CFindComboButton
  • CFindDlg() : CFindDlg
  • CFolderBar() : CFolderBar
  • CFolderListBar() : CFolderListBar
  • CFolderListPopupWnd() : CFolderListPopupWnd
  • CFoldersTree() : CFoldersTree
  • CFontComboBox() : CFontComboBox
  • CFontDesc() : CFontDesc
  • CFormatBar() : CFormatBar
  • CFormatParaDlg() : CFormatParaDlg
  • CFormatTabDlg() : CFormatTabDlg
  • CGDIThread() : CGDIThread
  • CGetURL() : CGetURL
  • CGotoDlg() : CGotoDlg
  • CGuidGenApp() : CGuidGenApp
  • CGuidGenDlg() : CGuidGenDlg
  • CHandleSize() : CHandleSize
  • ChangeCtrlStyle() : CToolBarCtrlPage , CSliderCtrlPage
  • ChangeListCtrlStyle() : CListHdrDlg
  • ChangeSpeed() : CBounceWnd , CBounceView
  • CHARHDR() : CHARHDR
  • CheckDates() : CSchedulerDlg
  • CheckIndex() : CStringCollect
  • CheckItem() : CRowListView
  • CheckStartEndTime() : CEntryInfoDlg
  • CheckValidDescription() : CEntryInfoDlg
  • CheckValidTitle() : CEntryInfoDlg
  • CHelloDoc() : CHelloDoc
  • CHelloFrame() : CHelloFrame
  • CHelloView() : CHelloView
  • CHelloWindow() : CHelloWindow
  • CHelloWnd() : CHelloWnd
  • CHierSvrDocTemplate() : CHierSvrDocTemplate
  • CHistoryObj() : CHistoryObj
  • ChooseConfig() : CMenuSubSetApp
  • cHorzBox : tagGUIDE
  • cHotSpot : tagSYG
  • CHTMLEdDoc() : CHTMLEdDoc
  • CHTMLEditApp() : CHTMLEditApp
  • CHTMLEdView() : CHTMLEdView
  • CHueLeader() : CHueLeader
  • CHuskApp() : CHuskApp
  • CIconCombo() : CIconCombo
  • CIconComboBox() : CIconComboBox
  • CIconListProp() : CIconListProp
  • CIDataObjectDlg() : CIDataObjectDlg
  • CIEDemoApp() : CIEDemoApp
  • CIEDemoDoc() : CIEDemoDoc
  • CIEDemoView() : CIEDemoView
  • CImageCtrl() : CImageCtrl
  • CImagePropPage() : CImagePropPage
  • CImpIAdviseSink : CIDataObjectDlg , CImpIAdviseSink
  • CInfoBar() : CInfoBar
  • CInfoDlg() : CInfoDlg
  • CInPlaceFrame() : CInPlaceFrame
  • CInProcApp() : CInProcApp
  • CInputView() : CInputView
  • CInsertControlDlg() : CInsertControlDlg
  • CInsertTableDlg() : CInsertTableDlg
  • CInterfaceInfo() : CInterfaceInfo
  • CInterfacesPage() : CInterfacesPage
  • CInterfaceViewer() : CInterfaceViewer
  • CIntListView() : CIntListView
  • CItemData() : CItemData
  • CItemIcons() : CItemIcons
  • CIViewersApp() : CIViewersApp
  • CKey() : CKey
  • cl : tagSYE
  • CLeader() : CLeader
  • Clean() : CFigure
  • Cleanup() : CTestContainer98Doc
  • CleanUp() : CFavorit
  • CleanupParams() : CTestContainer98Item
  • Clear : XlistLib::_DXlist , CListOutputFrame , CXlistCtrl , CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated , CRemoteCalcDlg , CCalcDlg , mfccalc::ICalcDlg , CExcepInfo , CRibbonListButton , CRibbonListFontButton
  • ClearAllColors() : CBounceDoc , CHelloDoc
  • ClearBits() : CSurface
  • ClearSelection() : CTestContainer98View
  • ClearStringArray() : CFormatMenu
  • ClearTabs() : COutputBar
  • clErrorLevel : tagRC
  • CLicensedCtrl() : CLicensedCtrl
  • CLicensedPropPage() : CLicensedPropPage
  • Click()
: ButtonLib::_DButtonEvents
, LocalizeLib::_DLocalizeEvents
  • ClickedNumber() : CCalcDlg
  • ClickIn() : CircLib::_DCircEvents
  • ClickInFrench() : LocalizeLib::_DLocalizeEvents
  • ClickInGerman() : LocalizeLib::_DLocalizeEvents
  • ClickOut() : CircLib::_DCircEvents
  • ClientToDoc() : CMainView , CDrawView , CMainView
  • ClientToRuler() : CRulerBar
  • CLineStyleMenuItem() : CLineStyleMenuItem
  • CLineThread() : CLineThread
  • CLineWeightDlg() : CLineWeightDlg
  • CLinkButton() : CLinkButton
  • CLinksBar() : CLinksBar
  • CListDlg() : CListDlg
  • CListHdrApp() : CListHdrApp
  • CListHdrDlg() : CListHdrDlg
  • CListOutputFrame() : CListOutputFrame
  • CListViewEx() : CListViewEx
  • CLocalizeCtrl() : CLocalizeCtrl
  • CLocalizePropPage() : CLocalizePropPage
  • CLog() : CLog
  • CLoggingDlg() : CLoggingDlg
  • Clone() : CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj , CEnumVariant , CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj
  • CloneSelection() : CDrawView
  • Close() : CRemoteCalcDlg , CCalcDlg , mfccalc::ICalcDlg , CKey
  • CloseMe() : CFolderListPopupWnd
  • clrFill : CMainFrame::XStyle
  • clrLine : CMainFrame::XStyle
  • clsID : tagPROPHEADER
  • CLunchPage() : CLunchPage
  • CMacroComboBox() : CMacroComboBox
  • CMacroDlg() : CMacroDlg
  • CMailBar() : CMailBar
  • CMailFrame() : CMailFrame
  • CMailView() : CMailView
  • CMainDlg() : CMainDlg
  • CMainDoc() : CMainDoc
  • CMainFrame : COle2ViewDoc , CObjTreeView , CMainFrame
  • CMainView() : CMainView
  • CMainWindow() : CMainWindow
  • CMapDWordToMyStructView() : CMapDWordToMyStructView
  • CMapStringToStringView() : CMapStringToStringView
  • CMargueeTaskDialog() : CMargueeTaskDialog
  • CmdAbout() : CButtonCtrl
  • CMdiApp() : CMdiApp
  • CMDIApp() : CMDIApp
  • cmdInfo : CWordPadApp
  • CMDITabOptions() : CMDITabOptions
  • CMDITabsDemoApp() : CMDITabsDemoApp
  • CMDITabsDemoDoc() : CMDITabsDemoDoc
  • CMDITabsDemoView() : CMDITabsDemoView
  • CMenuSubSetApp() : CMenuSubSetApp
  • CMenuSubSetDoc() : CMenuSubSetDoc
  • CMenuSubSetView() : CMenuSubSetView
  • CMetaFileWnd() : CMetaFileWnd
  • CMethodDlg() : CMethodDlg
  • CMethodInfo() : CMethodInfo
  • CMethodParamInfo() : CMethodParamInfo
  • CMFCBindApp() : CMFCBindApp
  • CMFCBindCntrItem() : CMFCBindCntrItem
  • CMFCBindDoc() : CMFCBindDoc
  • CMFCBindView() : CMFCBindView
  • CMfcieApp() : CMfcieApp
  • CMfcieDoc() : CMfcieDoc
  • CMfcieView() : CMfcieView
  • CMFCRibbonNumEdit() : CMFCRibbonNumEdit
  • CMFCRibbonNumEditCtrl() : CMFCRibbonNumEditCtrl
  • CMinSize() : CMinSize
  • CMMXSwarmApp() : CMMXSwarmApp
  • CMMXUnsigned16Saturated() : CMMXUnsigned16Saturated
  • CModalShapePropSheet : CShapePreviewWnd , CModalShapePropSheet
  • CModelessApp() : CModelessApp
  • CModelessDialog() : CModelessDialog
  • CModelessMain() : CModelessMain
  • CModelessShapePropSheet() : CModelessShapePropSheet
  • CMonthCalPage() : CMonthCalPage
  • CMSMCaptionBar() : CMSMCaptionBar
  • CMSMCaptionBarButton() : CMSMCaptionBarButton
  • CMSMCategoryBar() : CMSMCategoryBar
  • CMSMCategoryBarButton() : CMSMCategoryBarButton
  • CMSMDialog() : CMSMDialog
  • CMSMLinksBar() : CMSMLinksBar
  • CMSMLinksBarButton() : CMSMLinksBarButton
  • CMSMMenuBar() : CMSMMenuBar
  • CMSMoneyDemoApp() : CMSMoneyDemoApp
  • CMSMoneyDemoDoc() : CMSMoneyDemoDoc
  • CMSMoneyDemoView() : CMSMoneyDemoView
  • CMSMTasksPane() : CMSMTasksPane
  • CMSMToolBar() : CMSMToolBar
  • CMSMVisualManager() : CMSMVisualManager
  • CMSNDlg() : CMSNDlg
  • CMSNVisualManager() : CMSNVisualManager
  • CMSOffice2007DemoApp() : CMSOffice2007DemoApp
  • CMSOffice2007DemoCntrItem() : CMSOffice2007DemoCntrItem
  • CMSOffice2007DemoDoc() : CMSOffice2007DemoDoc
  • CMSOffice2007DemoView() : CMSOffice2007DemoView
  • CMutexesApp() : CMutexesApp
  • CMutexesDlg() : CMutexesDlg
  • CMyCustomizationPage() : CMyCustomizationPage
  • CMyDialogTemplate() : CMyDialogTemplate
  • CMyListCtrl() : CMyListCtrl , CPage5
  • CMyMenuBar() : CMyMenuBar
  • CMyObject() : CMyObject
  • CMyPopupDlg() : CMyPopupDlg
  • CMyPropertyPage1() : CMyPropertyPage1
  • CMyPropertyPage2() : CMyPropertyPage2
  • CMyPropertyPage3() : CMyPropertyPage3
  • CMyPropertyPage4() : CMyPropertyPage4
  • CMyPropertySheet() : CMyPropertySheet
  • CMyScheduler() : CMyScheduler
  • CMyToolTipCtrl() : CMyToolTipCtrl
  • CMyTreeCtrl() : CMyTreeCtrl
  • CNetAddressCtrlPage() : CNetAddressCtrlPage
  • CNetAddrVerifierApp() : CNetAddrVerifierApp
  • CNetAddrVerifierDlg() : CNetAddrVerifierDlg
  • CNewAmbientPropertyDlg() : CNewAmbientPropertyDlg
  • CNewControlsApp() : CNewControlsApp
  • CNextWizardDialog() : CNextWizardDialog
  • CNotepadApp() : CNotepadApp
  • CNotepadDoc() : CNotepadDoc
  • CNotepadView() : CNotepadView
  • CNotifyShowCase() : CNotifyShowCase
  • CNullLog() : CNullLog
  • CObjectData() : CObjectData
  • CObjListView() : CObjListView
  • CObjTreeView : COle2ViewDoc , CObjTreeView
  • COEMFile() : COEMFile
  • COle2ViewApp : CMainFrame , COle2ViewApp
  • COle2ViewDoc() : COle2ViewDoc
  • COleClientApp() : COleClientApp
  • COlePropertiesEx() : COlePropertiesEx
  • CommitItem() : CTestContainer98Item
  • CommonConstruct() : CMSMDialog
  • CompareItem() : CColorListBox , CFontComboBox , CIconComboBox
  • ComponentFromIndex() : CCubeView
  • ComputePageSize() : CDrawDoc
  • ConstructAddrMask() : CNetAddrVerifierDlg
  • ConstructMyObjectFromView() : CTypedPtrMapView
  • ConstructMyStructFromView() : CMapDWordToMyStructView
  • ContextSensitiveHelp() : CTestContainer98Item
  • controltype : CDialogItem
  • COptionsDlg() : COptionsDlg
  • COptionSheet() : COptionSheet
  • COptionsPage1() : COptionsPage1
  • COptionsPage12() : COptionsPage12
  • COptionsPage21() : COptionsPage21
  • COptionsPage22() : COptionsPage22
  • COptionsPage31() : COptionsPage31
  • COptionsPage32() : COptionsPage32
  • CopyFrom() : CRibbonListFontButton , CRibbonListButton , CLinkButton , CRibbonListButton , CLineStyleMenuItem , CSliderButton
  • CopyParams() : CTestContainer98Item
  • CopyToClipboard() : CTestContainer98Item
  • COutlookDemoApp() : COutlookDemoApp
  • COutlookDemoDoc() : COutlookDemoDoc
  • COutlookDemoView() : COutlookDemoView
  • COutlookMultiViewsApp() : COutlookMultiViewsApp
  • COutlookMultiViewsDoc() : COutlookMultiViewsDoc
  • COutlookMultiViewsView() : COutlookMultiViewsView
  • COutputBar() : COutputBar
  • COutputList() : COutputList
  • COutputList1() : COutputList1
  • COutputViewBar() : COutputViewBar
  • COutputWindowLog() : COutputWindowLog
  • COutputWindowView() : COutputWindowView
  • COwnerDrawDescrProp() : COwnerDrawDescrProp
  • COwnerDrawMenuApp() : COwnerDrawMenuApp
  • COwnerDrawMenuDoc() : COwnerDrawMenuDoc
  • COwnerDrawMenuView() : COwnerDrawMenuView
  • CPadDoc() : CPadDoc
  • CPadLinkItem() : CPadLinkItem
  • CPadView() : CPadView
  • CPage1() : CPage1
  • CPage2() : CPage2
  • CPage3() : CPage3
  • CPage4() : CPage4
  • CPage5() : CPage5
  • CPage6() : CPage6
  • CPagerCtrlPage() : CPagerCtrlPage
  • CPageSetupDlg() : CPageSetupDlg
  • CPalCtrl() : CPalCtrl
  • CPaletteBar() : CPaletteBar
  • CPaletteDemoApp() : CPaletteDemoApp
  • CPaletteDemoDoc() : CPaletteDemoDoc
  • CPaletteDemoView() : CPaletteDemoView
  • CPalPropPage() : CPalPropPage
  • CParaFormat() : CParaFormat
  • CParsedEdit() : CParsedEdit , CParsedEditExported
  • CParsedEditExported() : CParsedEditExported
  • CPasswordProp() : CPasswordProp
  • cPens : tagPENINFO
  • CPenWidthsDlg() : CPenWidthsDlg
  • cPnt : tagPENDATAHEADER , tagSTROKEINFO
  • cPntStrokeMax : tagPENDATAHEADER
  • CPointArrayView() : CPointArrayView
  • CPolyTool : CDrawPoly , CPolyTool
  • CPreviewPane() : CPreviewPane
  • CProgCtrlPage() : CProgCtrlPage
  • CProgressBarTaskDialog() : CProgressBarTaskDialog
  • CPropDlgApp() : CPropDlgApp
  • cProperties : tagSECTIONHEADER
  • CPropertiesDlg() : CPropertiesDlg
  • CPropertiesViewBar() : CPropertiesViewBar
  • CProperty : CPropertySection , CPropertySet , CProperty
  • CPropertyBag() : CPropertyBag
  • CPropertyBagDlg() : CPropertyBagDlg
  • CPropertyBagItem() : CPropertyBagItem
  • CPropertyChangesPage() : CPropertyChangesPage
  • CPropertyEditRequestsPage() : CPropertyEditRequestsPage
  • CPropertyInfo() : CPropertyEditRequestsPage::CPropertyInfo
  • CPropertySection : CProperty , CPropertySet , CPropertySection
  • CPropertySet : CProperty , CPropertySection , CPropertySet
  • CPropSheetDemoApp() : CPropSheetDemoApp
  • CPropSheetDemoDlg() : CPropSheetDemoDlg
  • CPropSliderCtrl() : CPropSliderCtrl
  • CPushCtrl() : CPushCtrl
  • CPushPropPage() : CPushPropPage
  • CRateDlg() : CRateDlg
  • crColour : ColourTableEntry
  • Create() : CHelloWnd , CKey , CRulerBar , CTestContainer98Item , CHelloWnd , CBounceFrame , CModelessMain , CPaletteBar , CListOutputFrame , CBounceMDIChildWnd , CAllControlsSheet , CBounceWnd , CParsedEdit , CBounceWnd , CAdderDialog , CNotepadView , CSnapView , CFileLog , CRulerBar , CMSMCaptionBar , CFolderListPopupWnd , CAllControlsSheet , CWndListDlg , CStandardBar , CSurface , CSplashWnd , CKey , CCalendarBar , CSplashWnd , CMacroDialogBar , CSplashWnd
  • CreateBorderTypeButton() : CFormatBar
  • CreateCaptionBar() : CMainFrame
  • CreateChildNode() : CServerNode
  • CreateClientItem() : CWordPadDoc , CMSOffice2007DemoDoc
  • CreateColorButton() : CFormatBar
  • CreateCombo() : CIconListProp , CComboBoxExProp
  • CreateComboBox() : CMainFrame
  • CreateDevNames() : CWordPadApp
  • CreateDockingBars() : CMainFrame
  • CreateDocumentColors() : CMainFrame
  • CreateDocumentWindow() : CMainFrame
  • CreateEdit() : CMFCRibbonNumEdit
  • CreateEditBar() : CMainFrame
  • CreateEditControl() : CTaskPane
  • CreateEx() : CMSMCaptionBar
  • CreateFigure() : CSpiroView
  • CreateFontComboButton() : CFormatBar
  • CreateFontsList() : CMainFrame
  • CreateFormatBar() : CInPlaceFrame , CMainFrame
  • CreateFromClipboard() : CTestContainer98Item
  • CreateFromMenu() : CMyMenuBar
  • CreateGDIObjects() : CRulerBar
  • CreateInPlaceEdit() : CIconListProp , CPasswordProp , CSliderProp
  • CreateInstance() : CTCBindHost , CObjectData , CExtendedControl
  • CreateItem() : CMainDoc
  • CreateListOutput() : CHuskApp
  • CreateLogEpilogue() : CFileDlgWatcherDlg
  • CreateLogPrologue() : CFileDlgWatcherDlg
  • CreateMenu() : CFavorit , CFavoritesManager
  • CreateMenuBar() : CInPlaceFrame , CMainFrame
  • CreateMessageBar() : CMainFrame
  • CreateMoniker() : CTCBindHost
  • CreateOrLoad() : CTestContainer98Item
  • CreateOutlookBar() : CMainFrame
  • CreatePaletteBar() : CMainFrame
  • CreatePopupMenu() : CUndoButton
  • CreateRGBPalette() : CCubeView
  • CreateRibbonBar() : CMainFrame
  • CreateRootNode() : CServerNode
  • CreateRulerBar() : CMainFrame , CInPlaceFrame
  • CreateShortcutsBar() : CMainFrame
  • CreateSpinCtrl() : CSpinCtrlPage
  • CreateStatusBar() : CMainFrame
  • CreateStyleBar() : CMainFrame
  • CreateStyleList() : CMainFrame
  • CreateSurface() : CChildView
  • CreateTaskPane() : CMainFrame
  • CreateThemeList() : CMainFrame
  • CreateToolBar() : CMainFrame , CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • CreateTreeControl() : CTaskPane
  • CreateTreeWindow() : CTaskPane
  • CreateUniqueItemName() : CTestContainer98Doc
  • CRebarTestApp() : CRebarTestApp
  • CRebarTestDoc() : CRebarTestDoc
  • CRebarTestView() : CRebarTestView
  • CRecalcApp() : CRecalcApp
  • CRecalcDoc() : CRecalcDoc
  • CRecalcView() : CRecalcView
  • CRectDlg() : CRectDlg
  • CRectItem() : CRectItem
  • CRectThread() : CRectThread
  • CRectTool() : CRectTool , CDrawRect , CRectTool
  • CRegEntry() : CRegEntry
  • CRegisterControlsDlg() : CRegisterControlsDlg
  • CRegistryView : COle2ViewDoc , CRegistryView
  • CResourcePage() : CResourcePage
  • CResourceViewBar() : CResourceViewBar
  • CRibbonGadgetsApp() : CRibbonGadgetsApp
  • CRibbonGadgetsDoc() : CRibbonGadgetsDoc
  • CRibbonGadgetsView() : CRibbonGadgetsView
  • CRibbonListButton() : CRibbonListButton
  • CRibbonListFontButton() : CRibbonListFontButton
  • CRibbonMDIDemoApp() : CRibbonMDIDemoApp
  • CRibbonMDIDemoDoc() : CRibbonMDIDemoDoc
  • CRibbonMDIDemoView() : CRibbonMDIDemoView
  • CRibbonTableButton() : CRibbonTableButton
  • CRibbonTooltipCtrl() : CRibbonTooltipCtrl
  • CRing() : CRing
  • CRollupPaneApp() : CRollupPaneApp
  • CRollupPaneDoc() : CRollupPaneDoc
  • CRollupPaneView() : CRollupPaneView
  • CRowListApp() : CRowListApp
  • CRowListDoc() : CRowListDoc
  • CRowListView() : CRowListView
  • CRulerBar() : CRulerBar
  • CRulerItem : CRulerBar , CRulerItem
  • CSchedulerApp() : CSchedulerApp
  • CSchedulerDlg() : CSchedulerDlg
  • CScreenCapApp() : CScreenCapApp
  • CScribbleApp() : CScribbleApp
  • CScribbleDoc() : CScribbleDoc
  • CScribbleItem() : CScribbleItem
  • CScribbleView() : CScribbleView
  • CScript() : CScript
  • CScriptManager() : CScriptManager
  • CSearchBox() : CSearchBox
  • cSections : tagPROPHEADER
  • CSelectTool() : CSelectTool
  • CServerApp() : CServerApp
  • CServerDC() : CServerDC
  • CServerDoc() : CServerDoc
  • CServerItem() : CServerItem , CServerNode
  • CServerNode : CServerItem , CServerNode
  • CServerView() : CServerView
  • CServerViewDC : CServerView
  • CServicesPage() : CServicesPage
  • CSetPaneSizeApp() : CSetPaneSizeApp
  • CSetPaneSizeDoc() : CSetPaneSizeDoc
  • CSetPaneSizeView() : CSetPaneSizeView
  • CSetTabStops() : CSetTabStops
  • CShape() : CShape
  • CShapePreviewWnd() : CShapePreviewWnd
  • CShapePropSheetFrame() : CShapePropSheetFrame
  • CShapesDoc() : CShapesDoc
  • CShapesView() : CShapesView
  • CSizeComboBox() : CSizeComboBox
  • CSliderApp() : CSliderApp
  • CSliderButton() : CSliderButton
  • CSliderCtrlPage() : CSliderCtrlPage
  • CSliderDoc() : CSliderDoc
  • CSliderProp() : CSliderProp
  • CSliderView() : CSliderView
  • CSmartFuncDesc() : CSmartFuncDesc
  • CSmartTypeAttr() : CSmartTypeAttr
  • CSmartVarDesc() : CSmartVarDesc
  • CSnapApp() : CSnapApp
  • CSnapDoc() : CSnapDoc
  • CSnapPropertySheet() : CSnapPropertySheet
  • CSnapView() : CSnapView
  • CSourceView() : CSourceView
  • CSpeakNDlg() : CSpeakNDlg
  • CSpeedDlg() : CSpeedDlg
  • CSpinCtrlPage() : CSpinCtrlPage
  • CSpindialCtrl() : CSpindialCtrl
  • CSpindialPropPage() : CSpindialPropPage
  • CSpinEditDlg() : CSpinEditDlg
  • CSpiroApp() : CSpiroApp
  • CSpiroDoc() : CSpiroDoc
  • CSpiroRect() : CSpiroRect
  • CSpiroView() : CSpiroView
  • CSplitButtonCtrlPage() : CSplitButtonCtrlPage
  • CSplitFrame() : CSplitFrame
  • CSplitterFrame() : CSplitterFrame
  • CSSE2Unsigned16Saturated() : CSSE2Unsigned16Saturated
  • CStandardBar() : CStandardBar
  • CStartView() : CStartView
  • CStateCollectionApp() : CStateCollectionApp
  • CStateCollectionDoc() : CStateCollectionDoc
  • CStateCollectionView() : CStateCollectionView
  • CStatPage() : CStatPage
  • CStatusBarDemoApp() : CStatusBarDemoApp
  • CStatusBarDemoDoc() : CStatusBarDemoDoc
  • CStatusBarDemoView() : CStatusBarDemoView
  • CStringCollect() : CStringCollect
  • CStringListView() : CStringListView
  • CStroke() : CStroke
  • cStrokes : tagPENDATAHEADER
  • CStylePage() : CStylePage
  • CSubEditDlg() : CSubEditDlg
  • CSummInfo() : CSummInfo
  • CSummPage() : CSummPage
  • CSurface() : CSurface
  • CSwarm() : CSwarm
  • cSyc : tagSYG
  • cSye : tagSYG
  • cSyv : tagRCRESULT
  • CTabbedViewApp() : CTabbedViewApp
  • CTabbedViewDoc() : CTabbedViewDoc
  • CTabbedViewView() : CTabbedViewView
  • CTabControlApp() : CTabControlApp
  • CTabControlDoc() : CTabControlDoc
  • CTabControlView() : CTabControlView
  • CTabOrderDlg() : CTabOrderDlg
  • CTabRulerItem() : CTabRulerItem
  • cTargets : tagTARGINFO
  • CTaskDialogTestApp() : CTaskDialogTestApp
  • CTaskDialogTestDlg() : CTaskDialogTestDlg
  • CTaskPane() : CTaskPane
  • CTasksPaneApp() : CTasksPaneApp
  • CTasksPaneDoc() : CTasksPaneDoc
  • CTasksPaneView : CMainFrame , CTaskPane , CTasksPaneView
  • CTCBindHost() : CTCBindHost
  • CTCCommandLineInfo() : CTCCommandLineInfo
  • CTCExtPage() : CTCExtPage
  • CTCOptions() : CTCOptions
  • CTCSplitter() : CTCSplitter
  • CTestApp() : CTestApp
  • CTestContainer98App() : CTestContainer98App
  • CTestContainer98Doc() : CTestContainer98Doc
  • CTestContainer98Item : CTestContainer98Doc , CTestContainer98Item
  • CTestContainer98View() : CTestContainer98View
  • CTesthelpApp() : CTesthelpApp
  • CTesthelpCtrl() : CTesthelpCtrl
  • CTesthelpPropPage() : CTesthelpPropPage
  • CTextView() : CTextView
  • CTheApp() : CTheApp
  • CThreadApp() : CThreadApp
  • CThreadDoc() : CThreadDoc
  • CThreadView() : CThreadView
  • CTimeCtrl() : CTimeCtrl
  • CTimePropPage() : CTimePropPage
  • CtlColor() : CPropSliderCtrl
  • CToolBarCtrlPage() : CToolBarCtrlPage
  • CToolbarDateTimePickerApp() : CToolbarDateTimePickerApp
  • CToolbarDateTimePickerDoc() : CToolbarDateTimePickerDoc
  • CToolbarDateTimePickerView() : CToolbarDateTimePickerView
  • CToolbarLabel() : CToolbarLabel
  • CToolDlg() : CToolDlg
  • CToolsPalette() : CToolsPalette
  • CTooltipDemoApp() : CTooltipDemoApp
  • CTooltipDemoDoc() : CTooltipDemoDoc
  • CTooltipDemoView() : CTooltipDemoView
  • CTrackerApp() : CTrackerApp
  • CTrackerDoc() : CTrackerDoc
  • CTrackerView() : CTrackerView
  • CTrackFile() : CTrackFile
  • CTrayMenuApp() : CTrayMenuApp
  • CTrayMenuDlg() : CTrayMenuDlg
  • CTreeCtrlPage() : CTreeCtrlPage
  • CTreeItem() : CTreeItem
  • CTwoButtonsProp() : CTwoButtonsProp
  • CTypedPtrArrayView() : CTypedPtrArrayView
  • CTypedPtrListView() : CTypedPtrListView
  • CTypedPtrMapView() : CTypedPtrMapView
  • CTypeLibListView() : CTypeLibListView
  • CTypeLibODLView() : CTypeLibODLView
  • CTypeLibTreeView() : CTypeLibTreeView
  • CTypeLibViewer() : CTypeLibViewer
  • CTypeLibWnd : CTypeLibListView , CTypeLibWnd , CTypeLibODLView , CTypeLibTreeView
  • CUndoBar() : CUndoBar , CUndoButton
  • CUndoButton() : CUndoButton
  • CUndoListBox() : CUndoListBox
  • CUnit() : CUnit
  • CUnitsPage() : CUnitsPage
  • CustomClick() : PushLib::_DPushEvents
  • CustomizeHelp() : CStandardBar , CPaletteBar
  • CVariantAssoc() : CVariantAssoc
  • CVariantMap() : CVariantMap
  • CVarUseApp() : CVarUseApp
  • CVarUseDlg() : CVarUseDlg
  • CVector() : CVector
  • cVertBox : tagGUIDE
  • CView1() : CView1
  • CView2() : CView2
  • CView3() : CView3
  • CView4() : CView4
  • CViewExApp() : CViewExApp
  • CViewExSplitWnd() : CViewExSplitWnd
  • CVisualStudioDemoApp() : CVisualStudioDemoApp
  • CVisualStudioDemoDoc() : CVisualStudioDemoDoc
  • CVisualStudioDemoView() : CVisualStudioDemoView
  • CWatchBar() : CWatchBar
  • CWclsEditDlg() : CWclsEditDlg
  • CWheel() : CWheel
  • CWizardDialog() : CWizardDialog
  • CWndListDlg() : CWndListDlg
  • CWordPadApp() : CWordPadApp
  • CWordPadCntrItem() : CWordPadCntrItem
  • CWordPadCommandLineInfo() : CWordPadCommandLineInfo
  • CWordPadDoc() : CWordPadDoc
  • CWordPadView() : CWordPadView
  • CWorkspaceBar() : CWorkspaceBar
  • CWorkspaceBar2() : CWorkspaceBar2
  • CWorkspaceObj() : CWorkspaceObj
  • CWorkSpaceToolBarApp() : CWorkSpaceToolBarApp
  • CWorkSpaceToolBarDoc() : CWorkSpaceToolBarDoc
  • CWorkSpaceToolBarView() : CWorkSpaceToolBarView
  • cxBase : tagGUIDE , tagBOXEDITINFO
  • cxBox : tagBOXEDITINFO , tagGUIDE
  • CXlistCtrl() : CXlistCtrl
  • CXlistPropPage() : CXlistPropPage
  • cxRawWidth : tagPENINFO
  • cyBase : tagGUIDE , tagBOXEDITINFO
  • cyBox : tagBOXEDITINFO , tagGUIDE
  • cyCusp : tagBOXLAYOUT
  • cyEndCusp : tagBOXLAYOUT
  • cyMid : tagGUIDE , tagBOXEDITINFO
  • cyRawHeight : tagPENINFO
  • CZoomDlg() : CZoomDlg
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- d -

  • DateFmtEnumProc() : CDateDialog
  • DateSchedules() : CSchedulerDlg
  • dBottom : tagRECTOFS
  • Deactivate() : TCPropsLib::ITCExtendedControl
  • DeactivateAndUndo() : CTestContainer98Item
  • DECLARE_DHTMLEDITING_CMDMAP() : CHTMLEdView
  • DECLARE_DYNAMIC() : CLog , CNullLog , CDebugLog , CFileLog , COutputWindowLog , CPropertyBagItem , CScriptManager
  • DECLARE_DYNCREATE() : CMSMCaptionBarButton
  • DECLARE_MESSAGE_MAP() : CTestApp , CCustListDlg , CParsedEditExported , CWclsEditDlg
  • DECLARE_OLECREATE_EX() : CButtonCtrl , CCircCtrl , CImageCtrl , CLocalizeCtrl , CPalCtrl , CPushCtrl , CSpindialCtrl , CTesthelpCtrl , CTimeCtrl , CXlistCtrl
  • DECLARE_OLETYPELIB() : CLicensedCtrl
  • DECLARE_SERIAL() : CDrawRect , CDrawPoly , CDrawOleObj , CServerNode , CAmbientProperty , CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj , CDrawObj
  • DeCompileCoClass() : CTypeLibODLView
  • DeCompileConst() : CTypeLibODLView
  • DeCompileDispinterface() : CTypeLibODLView
  • DeCompileFunc() : CTypeLibODLView
  • DeCompileInterface() : CTypeLibODLView
  • DeCompileModule() : CTypeLibODLView
  • DeCompileTypedef() : CTypeLibODLView
  • DeCompileTypeLib() : CTypeLibODLView
  • DeCompileVar() : CTypeLibODLView
  • Delete() : CGDIThread
  • DeleteChildNodes() : CServerNode
  • DeleteContents() : CCollectDoc , CScribbleDoc , CSpiroDoc , CServerDoc , CPadDoc , CTestContainer98Doc , CWordPadView
  • DeleteItem() : CMainDoc
  • DeleteTreeContents() : CObjTreeView
  • DeleteTreeItems() : CTypeLibTreeView , CObjTreeView
  • DeltaRandom() : CRoamer
  • DemoIt() : CMyDialogTemplate
  • Deselect() : CDrawView
  • Destroy() : CSurface , CSwarm
  • DestroyWindow() : CBounceMDIChildWnd , CMainFrame
  • Dirty() : CRectItem
  • DiscardUndoState() : CTestContainer98Item
  • dispid : QAAMBIENTENTRY
  • dispidAddPicItem : CXlistCtrl
  • dispidAddTextFontItem : CXlistCtrl
  • dispidAddTextItem : CXlistCtrl
  • dispidAutoSize : CImageCtrl
  • dispidCircleOffset : CCircCtrl
  • dispidCircleShape : CCircCtrl
  • dispidClear : CXlistCtrl
  • dispidEntry : CPalCtrl
  • dispidFlashColor : CCircCtrl
  • dispidHandle : CPalCtrl
  • dispidImagePath : CImageCtrl
  • dispidInterval : CTimeCtrl
  • dispidInvert : CLocalizeCtrl
  • dispidInvertFlag : CXlistCtrl
  • dispidItemBackColor : CXlistCtrl
  • dispidItemFont : CXlistCtrl
  • dispidItemForeColor : CXlistCtrl
  • dispidItemPicture : CXlistCtrl
  • dispidItemText : CXlistCtrl
  • dispidLength : CPalCtrl
  • dispidName1 : CTesthelpCtrl
  • dispidName2 : CTesthelpCtrl
  • dispidName3 : CTesthelpCtrl
  • dispidNeedlePosition : CSpindialCtrl
  • dispidNote : CCircCtrl
  • dispidPicture : CPalCtrl
  • dispidRemoveItem : CXlistCtrl
  • dispidShowToolTip : CTesthelpCtrl
  • dispidToolTipText : CTesthelpCtrl
  • dispidUseMyHelp : CTesthelpCtrl
  • dispidUsePopupHelp : CTesthelpCtrl
  • Display() : CRemoteCalcDlg , CCalcDlg , mfccalc::ICalcDlg
  • DisplayAsDefault() : CTestContainer98Item
  • DisplayExceptionInfo() : CMethodDlg
  • DisplayMessageBox() : CButtonDialog
  • DisplayParamValueInList() : CMethodDlg
  • DisplayParamValues() : CMethodDlg
  • DisplayPropValues() : CAmbientPropertiesDlg
  • dlColorTable : CBitmapProperty
  • dlDone : CBitmapProperty
  • dLeft : tagRECTOFS
  • dlFileHeader : CBitmapProperty
  • dlInfoHeader : CBitmapProperty
  • dlNone : CBitmapProperty
  • DLState : CBitmapProperty
  • DoBranch() : CServerView
  • DockControlBarLeftOf() : CMainFrame
  • DoCopySelection() : CMainView
  • DocToClient() : CDrawView , CMainView , CDrawView
  • DoDataExchange() : CDataObjectDlg , CDispatchDlg , CAboutDlg , CRegistryView , CAboutBox , CSplashWnd , CAboutDlg , CUnitsPage , CPageSetupDlg , CFormatTabDlg , CFormatParaDlg , CSetTabStops , CAmbientPropertiesDlg , CDateDialog , CAppLookDlg , CAboutDlg , CComponentCategoriesDlg , COptionsPage31 , CContainerInfoDlg , CEventLoggingPage , CAboutDlg , COptionsPage1 , CAppLookDlg , CTrayMenuDlg , CFeaturesPage , CAboutDlg , CInterfacesPage , CDWordArrayView , CTabControlView , CAboutDlg , CView3 , CInsertControlDlg , CStatusBarDemoView , CAboutDlg , CLoggingDlg , CIntListView , CSetPaneSizeView , CAboutDlg , CMacroDlg , CAboutDlg , CMethodDlg , CMapDWordToMyStructView , CMyPropertyPage3 , CMyPropertyPage2 , CMyPropertyPage1 , CNewAmbientPropertyDlg , CPropertyBagDlg , CMapStringToStringView , CPropertyChangesPage , CPropertyEditRequestsPage , CAppLookDlg , CPage6 , CPage5 , CPointArrayView , CPage3 , CPage2 , CRegisterControlsDlg , CServicesPage , CResourcePage , CDemoOptionsPage , CAboutDlg , CStringListView , CAboutDlg , CConfigDlg , CTabOrderDlg , CAboutDlg , CSummPage , CTypedPtrArrayView , CRectDlg , CLineWeightDlg , CDateDialog , CDocOptPage , CMyPopupDlg , CMSNDlg , CDesktopAlertDemoDlg , CTypedPtrListView , CAboutDlg , CFileNewDialog , CFormatParaDlg , CTypedPtrMapView , CFormatTabDlg , CPageSetupDlg , CAboutDlg , CUnitsPage , CAboutDlg , CConfigDlg , CGuidGenDlg , CAboutDlg , CMyCustomizationPage , CAboutDlg , CDlgToolTipsDlg , CAboutDlg , CRecalcView , CSpeedDlg , CStatPage , CAboutDlg , CMutexesDlg , CAboutDlg , CSpeakNDlg , CButtonPropPage , CMenuSubSetView , CCircPropPage , CCmnCtrl3Dlg , CAboutDlg , CPage1 , CCommandLinkCtrlPage , CNetAddressCtrlPage , CPage4 , CPagerCtrlPage , CSplitButtonCtrlPage , CCalcDlg , CMailBar , CAboutDlg , CImagePropPage , CAboutDlg , CLicensedPropPage , CLocalizePropPage , CMyPropertyPage4 , CPropSheetDemoDlg , CNetAddrVerifierDlg , CPalPropPage , CAboutDlg , CPushPropPage , CSpindialPropPage , CSchedulerDlg , CAboutDlg , CTesthelpPropPage , CInsertTableDlg , CTimePropPage , CAboutDlg , CXlistPropPage , CAnimateCtrlPage , CAboutDlg , CTasksPaneView , CDateTimePage , CVarUseDlg , CMonthCalPage , CTooltipDemoView , CAboutDlg , CHandleSize , CToolBarCtrlPage , COptionsPage12 , COptionsPage21 , CLunchPage , CTreeCtrlPage , COptionsPage22 , CProgCtrlPage , COptionsPage32 , CAboutDlg , CSliderCtrlPage , CDocOptPage , CAboutDlg , CFileNewDialog , CSpinCtrlPage , CTaskDialogTestDlg , CFindDlg , CPageSetupDlg , CAboutDlg , CDBVListView , CAboutDlg , CRateDlg , CWndListDlg , CAboutDlg , CDlgtempDlg , CAboutDlg , CToolDlg , CColorOptDlg , CAboutDlg , CFileDlgWatcherDlg , CAboutDlg , CListHdrDlg , CAboutDlg , CAdderDialog , CAboutDlg , CMainDlg , CGotoDlg , CAboutDlg , CColorPage , CStylePage , CAboutDlg , CPenWidthsDlg , CAboutDlg , CBkfstPage , CDinnerPage , CSnapView , CAboutDlg , CMinSize , CAboutDlg , CEnterDlg , CInputView , CAboutDlg , CDHtmlExploreDlg , CPropertiesDlg , CGetURL , CAboutDlg , CEntryInfoDlg , CAboutDlg , CAutoDrivDlg , CAboutDlg , CChangeText , CAutoDrivDlg , CChangeText , CDriverDlg , CAboutDlg , CRectDlg , CStatPage , CSummPage , CChangeNameDlg , CAddNodeDlg , CZoomDlg , CDriverView , CAboutDlg
  • DoesAllowDynInsertBefore() : CFolderListBar
  • DoFieldExchange() : CDBVListSet
  • DoIDataObject() : CIDataObjectDlg
  • DoIEnumFormatEtc() : CIDataObjectDlg
  • DoImportText() : CServerView
  • DoModal() : CButtonDialog , COptionSheet , CIDataObjectDlg , COptionSheet , CButtonDialog
  • DoNothing() : CMainFrame
  • DoPaint() : CMSMCaptionBar , CRulerBar , CToolsPalette
  • DoPasteItem() : CMainView , CServerView
  • DoPasteNative() : CMainView , CServerView
  • DoPasteStandard() : CMainView
  • DoPasteText() : CServerView
  • DoPropExchange() : CLicensedCtrl , CSpindialCtrl , CTimeCtrl , CCircCtrl , CButtonCtrl , CLocalizeCtrl , CTesthelpCtrl , CPushCtrl , CImageCtrl , CXlistCtrl , CPalCtrl
  • DoSave() : CWordPadDoc
  • DoSelectColor() : CDynaMenuDoc
  • DoUndo() : CUndoBar
  • DoUpdateSelectColor() : CDynaMenuDoc
  • Draw() : CComboRulerItem , CDrawRect , CServerNode , CDrawOleObj , CDrawPoly , CDrawDoc , CRulerItem , CDrawObj , CTabRulerItem , CComboRulerItem , CTestContainer98Item , CDrawObj , CDrawRect , CBasePiece , CWheel , CRing , CRulerItem , CDrawPoly , CDrawOleObj , CShape , CFigure , CTabRulerItem , CDrawDoc
  • DrawBackToFront() : CTestContainer98Item
  • DrawButton() : CMSMToolBar
  • DrawDiv() : CRulerBar
  • DrawFace() : CRulerBar
  • DrawFocusLine() : CRulerItem
  • DrawFrontToBack() : CTestContainer98Item
  • DrawGrid() : CDrawView
  • DrawItem() : CColorMenu , CColorListBox , CColorMenu , CBigIcon , CIconComboBox , CXlistCtrl , CPushCtrl , CCustomList , CBigIcon , CListViewEx , CFontComboBox , CBigIcon
  • DrawItemPicture() : CXlistCtrl
  • DrawItemText() : CXlistCtrl
  • DrawMargins() : CWordPadView
  • DrawNumbers() : CRulerBar
  • DrawScene() : CCubeView
  • DrawStroke() : CStroke
  • DrawTabs() : CRulerBar
  • DrawTickMarks() : CRulerBar
  • DrawTracker() : CDrawObj
  • DrawTree() : CServerDoc , CServerNode
  • dRight : tagRECTOFS
  • dTop : tagRECTOFS
  • DumpConst() : CTypeLibODLView
  • DumpFunc() : CTypeLibODLView
  • DumpVar() : CTypeLibODLView
  • dwAddTo : CMapInfo
  • dwApp : tagCTLINITIEDIT
  • dwAppParam : tagRC
  • dwData : tagTARGET
  • dwDictParam : tagRC
  • dwFlags : tagINPPARAMS , tagPENTIP , tagCTLINITHEDIT , tagTARGINFO , tagTARGET
  • dwOffset : tagFORMATIDOFFSET , tagPROPERTYIDOFFSET
  • dwOSVer : tagPROPHEADER
  • dwPcm : tagPCMINFO
  • dwPropID : DICTENTRYHEADER
  • dwQAFlag : QAAMBIENTENTRY
  • dwRecognizer : tagRC
  • dwReserved : tagPENTIP , tagSTRKFMT , tagCTLINITIEDIT , tagCTLINITBEDIT , tagPDEVENT , tagANIMATEINFO , tagCTLINITHEDIT
  • dwReserved1 : tagBOXLAYOUT
  • dwReserved2 : tagBOXLAYOUT
  • dwReserved3 : tagBOXLAYOUT
  • dwTick : tagSTROKEINFO
  • dwTime : tagOEM_PENPACKET
  • dwTimeout : tagPCMINFO
  • dwUser : tagSTRKFMT
  • dx : CRoamer
  • dy : CRoamer
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- e -

  • e : SHAPE_COLOR
  • e16BitGeneric : CChildView
  • e16BitMMXIntrin : CChildView
  • e16BitSSE2Intrin : CChildView
  • e24BitGeneric : CChildView
  • e24BitMMXIntrin : CChildView
  • e24BitSSE2Intrin : CChildView
  • e32BitGeneric : CChildView
  • e32BitMMXIntrin : CChildView
  • e32BitSSE2Intrin : CChildView
  • edit : CSpinEditDlg
  • edit1 : CSubEditDlg
  • Edit1() : CWclsEditDlg
  • edit2 : CSubEditDlg
  • Edit2() : CWclsEditDlg
  • edit3 : CSubEditDlg
  • Edit3() : CWclsEditDlg
  • edit4 : CSubEditDlg
  • Edit4() : CWclsEditDlg
  • EDITCONTROL : CDialogItem
  • ellipse : CDrawRect
  • EmptyContents() : CFontComboBox
  • Enable() : CAmbientProperty
  • EnableControls() : CDesktopAlertDemoDlg , CTooltipDemoView
  • EnableEditRequestLogging() : CMethodInfo
  • EnableFill() : CDrawObj
  • EnableLine() : CDrawObj
  • EnableLogging() : CMethodInfo
  • EnableModeless() : CScript
  • EnableSourceControls() : CDesktopAlertDemoDlg
  • END_INTERFACE_PART() : CTestContainer98Item
  • EndAdjust() : CStandardBar , CPaletteBar
  • EndDrag() : CStandardBar , CPaletteBar
  • eNone : CChildView
  • Entry() : PalLib::_DPal
  • Enum() : CNetAddrVerifierDlg
  • EnumFamPrinterCallBack() : CFontComboBox
  • EnumFamPrinterCallBackEx() : CFontComboBox
  • EnumFamScreenCallBack() : CFontComboBox
  • EnumFamScreenCallBackEx() : CFontComboBox
  • EnumFontFamiliesEx() : CFontComboBox
  • EnumFontSizes() : CSizeComboBox
  • EnumSizeCallBack() : CSizeComboBox
  • EShape : CServerNode
  • ESurface : CChildView
  • Evaluate() : CRemoteCalcDlg , CCalcDlg , mfccalc::ICalcDlg
  • eventidClickIn : CCircCtrl
  • eventidClickOut : CCircCtrl
  • eventidCustomClick : CPushCtrl
  • eventidSpinPositive : CSpindialCtrl
  • eventidTimer : CTimeCtrl
  • ExitInstance() : CButtonApp , CDynamicMenuApp , CMdiApp , CThreadApp , CMSOffice2007DemoApp , CTasksPaneApp , CLicensedApp , CSetPaneSizeApp , CRollupPaneApp , CLocalizeApp , CPalApp , CTabControlApp , COutlookDemoApp , CSpindialApp , CWordPadApp , CTabbedViewApp , CPaletteDemoApp , COutlookMultiViewsApp , CTimeApp , CMDITabsDemoApp , CMenuSubSetApp , CServerApp , CCustomPagesApp , CIViewersApp , CToolbarDateTimePickerApp , CIEDemoApp , CTooltipDemoApp , CStateCollectionApp , CDrawClientHandlersApp , CExplorerApp , CRebarTestApp , CBounceThread , CWordPadApp , CRibbonGadgetsApp , CPushApp , CVisualStudioDemoApp , CXlistApp , CStatusBarDemoApp , CTheApp , CDrawApp , COle2ViewApp , CGuidGenApp , CCircApp , CRibbonMDIDemoApp , CSliderApp , CTesthelpApp , CWorkSpaceToolBarApp , CImageApp , COwnerDrawMenuApp
  • ExitScheduler() : CSchedulerDlg
  • Expand() : CTreeItem
  • ExpandClassification() : CObjTreeView
  • ExpandFuncs() : CTreeItem
  • ExpandImplTypes() : CTreeItem
  • ExpandInterfaces() : CObjTreeView
  • ExpandObject() : CObjTreeView
  • ExpandTypeInfo() : CTreeItem
  • ExpandTypeLib() : CTreeItem
  • ExpandTypeLibs() : CObjTreeView
  • ExpandVars() : CTreeItem
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- f -

  • Fill() : CSSE2Unsigned16Saturated
  • FillBuildWindow() : COutputBar , COutputViewBar
  • FillClassView() : CClassViewBar
  • FillCombobox() : CHistoryList
  • FillDebugWindow() : COutputBar , COutputViewBar
  • FillFileView() : CFileViewBar
  • FillHelp() : CDynamicHelpViewBar
  • FillInHeader() : CButtonDialog
  • FillInParaFormat() : CRulerBar
  • FillListCtrl() : CListHdrDlg
  • FillResourceView() : CResourceViewBar
  • FillTree() : CFavorit , CFavoritesManager
  • FillWithExplorerHistory() : CAddressCombo
  • FinalConstruct() : CDrawCliLiveIconsHandler , CDrawCliSearchHandler
  • FinalRelease() : CDrawCliLiveIconsHandler , CDrawCliSearchHandler
  • Find : inproc::IStringCollect , CStringCollect
  • FindAmbientProperty() : CTestContainer98Doc
  • FindAndDelete() : CServerNode
  • FindByID() : CFavorit
  • FindControl() : CTestContainer98Doc
  • FindFocusedOutlookWnd() : CMainFrame
  • FindInt() : CIntListView
  • FindInternalDivider() : CMainFrame
  • FindItem() : CEmpView , CTestContainer98Doc
  • FindKeyInListBox() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView
  • FindMacro() : CScript , CScriptManager
  • FindMethod() : CInterfaceInfo
  • FindMyStruct() : CTypedPtrListView
  • FindNode() : CServerNode
  • FindOutlookParent() : CMainFrame
  • FindPropertyGet() : CInterfaceInfo
  • FindString() : CStringListView
  • FindTool() : CDrawTool
  • FinishCreate() : CMFCBindCntrItem , CTestContainer98Item
  • FinishStroke() : CStroke
  • FireClick() : CButtonCtrl , CLocalizeCtrl
  • FireClickIn() : CCircCtrl
  • FireClickOut() : CCircCtrl
  • FireCustomClick() : CPushCtrl
  • FireOnNewControl() : CTestContainer98Doc
  • FireSpinPositive() : CSpindialCtrl
  • FireTimer() : CTimeCtrl
  • FirstInstance() : CTheApp
  • FixUpObjectPositions() : CDrawDoc
  • FlashColor() : CCircCtrl
  • fLastSyc : tagSYC
  • fnIDataObjectDlg : CIDataObjectDlg
  • fnt : CRulerBar
  • font : CServerDC
  • FontEnumProc() : CTBComboBox
  • ForceDelayed() : CWordPadDoc
  • FormatFilePage() : CPageSetupDlg
  • FormatFooter() : CPageSetupDlg
  • FormatHeader() : CPageSetupDlg
  • formatID : tagFORMATIDOFFSET
  • FormatListBoxEntry() : CMapDWordToMyStructView , CTypedPtrMapView
  • FormatMyObject() : CMyObject
  • FormatMyStruct() : CMyStruct
  • FormatProperty() : CPasswordProp
  • fPen : tagPDEVENT
  • FreeBitmaps() : COle2ViewApp
  • FreeValue() : CProperty
  • FreezeEvents() : CTestContainer98Item
  • fuFlags : tagANIMATEINFO
  • FunctionCallWithVariant() : CVarUseDlg
  • fuOEM : tagPENINFO
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- g -

  • Get() : CProperty , CPropertySection , CProperty , CPropertySection , CPropertySet , CPropertySection , CPropertySet , CPropertySection , CPropertySet , CProperty
  • get_accName() : CAddressBox
  • get_Name() : CExtendedControl
  • Get_NewEnum() : CStringCollect , CVariantMap
  • get_Position() : CAutoClickDoc
  • get_PositionX() : CExtendedControl
  • get_PositionY() : CExtendedControl
  • get_SizeX() : CExtendedControl
  • get_SizeY() : CExtendedControl
  • get_text() : CAutoClickDoc
  • get_x() : CAutoClickDoc , CAutoClickPoint
  • get_y() : CAutoClickDoc , CAutoClickPoint
  • GetAbbrev() : CWordPadApp
  • GetAccum() : CCalcDlg , CRemoteCalcDlg
  • GetActivationPolicy() : CTestContainer98Item
  • GetActivePane() : CViewExSplitWnd
  • GetActiveView() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CWordPadCntrItem , CDrawItem , CMSOffice2007DemoCntrItem , CWordPadCntrItem
  • GetAge() : CSwarm
  • GetAmbientProperty() : CTestContainer98Doc
  • GetAngle() : CVector
  • GetAppname() : CSummInfo
  • GetAuthor() : CSummInfo
  • GetBackColor() : CItemData
  • GetBackList() : CIEDemoDoc
  • GetBaseSize() : CRectItem
  • GetBaseUnits() : CButtonDialog , CRulerBar , CButtonDialog , CRulerBar
  • GetBindHost() : CTestContainer98Item
  • GetBitDepth() : CSurface
  • GetBitmap() : CDrawCliLiveIconsHandler
  • GetBorder() : CSwarm
  • GetBoundingRect() : CWheel , CFigure , CStroke , CBasePiece
  • GetButtonInfo() : CStandardBar , CPaletteBar
  • GetByteDepth() : CSurface
  • GetByteOrder() : CPropertySet
  • GetCaptionFont() : CMSMCaptionBar
  • GetCaptionHeight() : CMSMCaptionBar
  • GetCaptionTextColor() : CMSMCaptionBar
  • GetCapture() : CTestContainer98Item
  • GetChangedPropertyID() : CAmbientPropertiesDlg
  • GetCircleOffset() : CCircCtrl
  • GetClassID() : CPropertySet , CWordPadDoc , CDrawCliSearchHandler , CPropertySet , CWordPadDoc
  • GetClickPoint() : CAutoClickPoint
  • GetClipboardData() : CWordPadView
  • GetColor() : CColorMenu
  • GetColorFromColorButton() : CDrawView , CMainFrame
  • GetColumns() : CPaletteBar , CRibbonTableButton , CToolsPalette
  • GetCommand() : CFavorit , CHistoryObj
  • GetComments() : CSummInfo
  • GetContactPosition() : CBasePiece , CWheel , CRing
  • GetContextMenu() : CWordPadView , CRibbonGadgetsView , CWordPadView
  • GetControlFlags() : CImageCtrl
  • GetControlInfo() : CTestContainer98Item
  • GetCount() : CPropertySection , CPropertySet , CStringCollect , CVariantMap , CStringCollect , CPropertySection , CPropertySet
  • GetCreateDate() : CSummInfo
  • GetCurrentCommand() : CMSMLinksBar
  • GetCurrentPen() : CScribbleDoc
  • GetCurrentView() : CMainFrame
  • GetCycleError() : CBasePiece , CWheel , CRing
  • GetDayState() : CMonthCalPage
  • GetDC() : CTestContainer98Item
  • GetDefaultDBName() : CDBVListSet
  • GetDefaultFont() : CWordPadView , CMSOffice2007DemoView , CWordPadView
  • GetDefaultSQL() : CDBVListSet
  • GetDevPieceRgn() : CBasePiece , CWheel , CRing
  • GetDispatchIID() : CTestContainer98Doc
  • GetDispInfo() : CEmpView
  • GetDisplayName() : CTestContainer98Item
  • GetDocFrame() : COIPF
  • GetDockState() : CDocOptions , CWordPadApp , CDocOptions , CWordPadApp
  • GetDocOptions() : CWordPadApp
  • GetDocPalette() : CDibDoc
  • GetDocSize() : CDibDoc , CScribbleDoc
  • GetDocument() : CCollectView , CDWordArrayView , CIntListView , CMapDWordToMyStructView , CMapStringToStringView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView , CCubeView , CThreadView , CRecalcView , CContainerItem , CContainerView , CDBVListView , CEmpView , CDibView , CDockView , CDynaMenuView , CBounceView , CHelloView , CNotepadView , CShapesView , CRowListView , CScribbleItem , CScribbleView , CSnapView , CSpiroView , CTrackerView , CInputView , CTextView , CColorView , CHTMLEdView , CMfcieView , CAutoClickView , CDrawItem , CDrawView , CServerNode , CServerItem , CServerView , CDriverView , CMFCBindView , CMFCBindCntrItem , CMainView , CRectItem , CObjTreeView , CRegistryView , CDropTargetView , CEmbeddedItem , CPadView , CTestContainer98Item , CTestContainer98View , CWordPadCntrItem , CRulerBar , CEmbeddedItem , CWordPadView , CCustomPagesView , CDrawItem , CDrawView , CDynamicMenuView , CExplorerView , CIEDemoView , CMDITabsDemoView , CMenuSubSetView , CMSMoneyDemoView , CMSOffice2007DemoCntrItem , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonGadgetsView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWordPadCntrItem , CRulerBar , CEmbeddedItem , CWordPadView , CWorkSpaceToolBarView
  • GetDocumentColors() : CWordPadView
  • GetDocumentName() : CChildFrame
  • GetDocumentSize() : CMainDoc
  • GetDocVersionString() : CScript
  • GetDocView() : CMainFrame
  • GetDrawRect() : CCircCtrl
  • GetEditTime() : CSummInfo
  • GetEmbeddedItem() : CScribbleDoc
  • GetEntry() : CPalCtrl
  • GetEventInfo() : CTestContainer98Item
  • GetExtendedControl() : CTestContainer98Item
  • GetFigData() : CBasePiece , CWheel
  • GetFile() : CWordPadDoc
  • GetFileName() : CFileLog
  • GetFillColor() : CDrawObj
  • GetFindCombo() : CMainFrame
  • GetFirstItemPosition() : CPropertyBag
  • GetFirstMacroPosition() : CScript
  • GetFirstScriptPosition() : CScriptManager
  • GetFocus() : CTestContainer98Item
  • GetFolderIcon() : CFavoritesManager
  • GetFolders() : CMainFrame
  • GetFont() : CItemData
  • GetFontNameCombo() : CMainFrame
  • GetFontSizeCombo() : CMainFrame
  • GetForeColor() : CItemData
  • GetFormatID() : CPropertySection
  • GetFormattedGuid() : CGuidGenDlg
  • GetFormatVersion() : CPropertySet
  • GetFreeTab() : CRulerBar
  • GetFromVariant() : CDriverView
  • GetFrwdList() : CIEDemoDoc
  • GetFullRowSel() : CListViewEx
  • GetHandle() : CDrawObj , CDrawRect , CDrawPoly , CDrawObj , CDrawRect , CDrawPoly
  • GetHandleCount() : CDrawObj , CDrawRect , CDrawPoly , CDrawObj , CDrawRect , CDrawPoly
  • GetHandleCursor() : CDrawObj , CDrawRect , CDrawPoly , CDrawObj , CDrawRect , CDrawPoly
  • GetHandleRect() : CDrawObj
  • GetHDIB() : CDibDoc
  • GetHeight() : CSwarm
  • GetHelpIDs() : CButtonDialog , CCSDialog , CCSPropertyPage , CDateDialog , CDocOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CPageSetupDlg , CUnitsPage , CButtonDialog , CCSDialog , CCSPropertyPage , CDateDialog , CDocOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CPageSetupDlg , CUnitsPage
  • GetHitItem() : CMainView
  • GetHitRectPix() : CRulerItem
  • GetHitTabPix() : CRulerBar
  • GetHorzPosPix() : CRulerItem
  • GetHorzPosTwips() : CRulerItem
  • GetHourMinute() : CEntryInfoDlg
  • GetHwnd() : CSliderButton
  • GetI1() : CVariantMap
  • GetI2() : CVariantMap
  • GetIcon() : CMainFrame , CFavorit , CMainFrame
  • GetIconID() : CButtonDialog
  • GetIconSize() : CCustomToolTipCtrl , CRibbonListButton , CRibbonListFontButton , CRibbonTooltipCtrl , CMyToolTipCtrl
  • GetID() : CProperty , CPropertySection , CAmbientProperty , CMethodInfo , CPropertySection
  • GetIDIcon() : CFavoritesManager
  • GetIDsOfNames() : CTestContainer98Item , CExtendedControl , CTestContainer98Item
  • GetIID() : CInterfaceInfo
  • GetImage() : CSurface
  • GetImagePath() : CImageCtrl
  • GetInitialLlamaColor() : CLeader , CBrightLeader , CHueLeader
  • GetInitialPosition() : CDrawView
  • GetInnerRect() : CRing
  • GetInterfaceHook() : CTestContainer98Item
  • GetInternetShortcutIcon() : CFavoritesManager
  • GetInvokeKind() : CMethodInfo
  • GetItem() : CVariantMap , CStringCollect , CVariantMap , CStringCollect
  • GetItemBackColor() : CXlistCtrl
  • GetItemDispatch() : CScriptManager
  • GetItemFont() : CXlistCtrl
  • GetItemForeColor() : CXlistCtrl
  • GetItemInfo() : CScript
  • GetItemName() : CServerNode
  • GetItemPicture() : CXlistCtrl
  • GetItemPictureHeight() : CXlistCtrl
  • GetItemText() : CXlistCtrl
  • GetItemTextHeight() : CXlistCtrl
  • GetItemTypeInfo() : CScriptManager
  • GetItemWithCapture() : CTestContainer98View
  • GetItemWithFocus() : CTestContainer98View
  • GetKey() : CVariantAssoc
  • GetKeywords() : CSummInfo
  • GetLastAuthor() : CSummInfo
  • GetLastPrintDate() : CSummInfo
  • GetLastSaveDate() : CSummInfo
  • GetLCID() : CScript
  • GetLeader() : CSwarm
  • GetLeaderCount() : CSwarm
  • GetLength() : CPalCtrl , CVector
  • GetLicenseKey() : CLicensedCtrl
  • GetLineColor() : CDrawObj
  • GetLineWeight() : CDrawObj
  • GetLinksBar() : CMainFrame
  • GetList() : CPropertySection , CPropertySet , CPropertySection , CPropertySet
  • GetLlamaAcc() : CLeader
  • GetLlamaColor() : CLeader , CHueLeader , CBrightLeader
  • GetLlamaCount() : CSwarm
  • GetLlamaVel() : CLeader
  • GetLog() : CTestContainer98Doc
  • GetLogPieceRgn() : CBasePiece , CWheel , CRing
  • GetMainFrame() : COIPF
  • GetMapMode() : CDrawDoc
  • GetMax() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • GetMenuBar() : CUndoMenu
  • GetMessageString() : CDynaMenuDoc , CMainFrame
  • GetMethod() : CInterfaceInfo
  • GetMethodInfo() : CTestContainer98Item
  • GetMin() : CComboRulerItem , CRulerItem , CComboRulerItem , CRulerItem
  • GetModelessShapePropSheet() : CShapesView
  • GetMSMCaptionButtonsSize() : CMSMVisualManager
  • GetName() : CTreeItem , CFavorit , CMethodParamInfo , CScript , CMethodInfo , CAmbientProperty
  • GetNativeClipboardData() : CRectItem , CServerItem
  • GetNeedlePosition() : CSpindialCtrl
  • GetNewEnum() : CVariantMap , CStringCollect
  • GetNext() : CServerNode
  • GetNextItem() : CPropertyBag
  • GetNextMacroName() : CScript
  • GetNextScript() : CScriptManager
  • GetNextTabItem() : CTestContainer98Doc
  • GetNote() : CCircCtrl
  • GetNumAmbientProperties() : CTestContainer98Doc
  • GetNumChars() : CSummInfo
  • GetNumMethods() : CInterfaceInfo
  • GetNumPages() : CSummInfo
  • GetNumParams() : CMethodInfo
  • GetNumScripts() : CScriptManager
  • GetNumWords() : CSummInfo
  • GetObjectInfo() : CMainView , CDrawView
  • GetObjects() : CDrawDoc
  • GetObjListView() : CMainFrame
  • GetOperand() : CRemoteCalcDlg , CCalcDlg
  • GetOperation() : CCalcDlg , CRemoteCalcDlg
  • GetOSVersion() : CPropertySet
  • GetOutputEditControl() : CTestContainer98Doc
  • GetPaneName() : CMyOutlookBar
  • GetPaperColor() : CDrawDoc
  • GetParam() : CMethodDlg , CMethodInfo
  • GetParentButton() : CUndoBar
  • GetParentTab() : CView4
  • GetPenLocation() : CBasePiece , CWheel
  • GetPenRect() : CBasePiece , CWheel
  • GetPerimeter() : CRing , CBasePiece , CWheel
  • GetPicture() : CItemData , CPalCtrl
  • GetPitch() : CSurface
  • GetPixelAddress() : CSurface
  • GetPopupMenuIndex() : CServerNode
  • GetPos() : CSliderButton
  • GetPosition() : CAutoClickDoc , CAutoClik , CAutoClickDoc , CAutoClik
  • GetPrev() : CServerNode
  • GetPrevItem() : CTestContainer98Doc
  • GetPrimarySelection() : CTestContainer98Doc
  • GetProperty() : CPropertySet , CPropertySection , CPropertySet
  • GetPropertyPageCLSIDs() : CTestContainer98Item
  • GetPropList() : CPropertiesViewBar
  • GetRate() : CRateDlg
  • GetRawValue() : CProperty
  • GetRect() : CRectItem
  • GetRequestEditResponse() : CMethodInfo
  • GetResourceHandle() : CLocalizeCtrl , CLocalizePropPage
  • GetRevNum() : CSummInfo
  • GetRibbonBar() : CMainFrame
  • GetRowHeight() : CMSMLinksBar , CMSMCategoryBar
  • GetRows() : CRibbonTableButton
  • GetScriptManager() : CTestContainer98Doc
  • GetScrollBarCtrl() : CView1 , CView4
  • GetSection() : CPropertySet , CWordPadDoc , CPropertySet , CWordPadDoc
  • GetSectionName() : CPropertySection
  • GetSecurity() : CSummInfo
  • GetSelection() : CMainView
  • GetSelectionResponse() : CPropertyEditRequestsPage
  • GetSelNum() : CUndoButton
  • GetShape() : CDrawRect
  • GetSize() : CDrawDoc , CPropertySection , CDrawDoc , CRectItem
  • GetSliderPos() : CMainFrame
  • GetSourceView() : CMainFrame
  • GetStartTimeFormatted() : CSchedulerDlg
  • GetStatusBar() : CModelessMain , CStatusBarDemoView , CMainFrame
  • GetStr1() : CVariantMap
  • GetStr2() : CVariantMap
  • GetString() : DocType
  • GetStringArray() : CFormatMenu
  • GetStringValue() : CKey
  • GetStyleFromStyles() : CMainFrame
  • GetSubItems() : CFavorit
  • GetSubject() : CSummInfo
  • GetSurface() : CSwarm , CChildView
  • GetSysCommand() : CMSMCaptionBarButton
  • GetSysImages() : CFavoritesManager
  • GetSysImageSize() : CFavoritesManager
  • GetTailPosition() : CTestContainer98Doc
  • GetTasksPane() : CTasksPaneView
  • GetTemplate() : CSummInfo
  • GetText() : CAutoClik , CItemData
  • GetTextData() : CListOutputFrame
  • GetTheText() : CLocalComboBox
  • GetTitle() : CSummInfo , CHistoryObj
  • GetToolBar() : CModelessMain
  • GetToolbarButtonTextColor() : CMSMVisualManager
  • GetToolbarButtonToolTipText() : CMainFrame
  • GetTooltipImage() : CMainFrame
  • GetToVariant() : CDriverView
  • GetTPU() : CWordPadApp
  • GetTwipSize() : CSizeComboBox
  • GetType() : CProperty , CMethodParamInfo
  • GetTypeInfo() : CTreeItem , CTestContainer98Item , CExtendedControl
  • GetTypeInfoCount() : CTestContainer98Item , CExtendedControl , CTestContainer98Item
  • GetTypeKind() : CTreeItem
  • GetTypeLib() : CTreeItem
  • GetUnit() : CWordPadApp
  • GetUnits() : CWordPadApp
  • GetURL() : CHistoryObj , CFavorit , CLinkButton
  • GetURLofID() : CFavoritesManager
  • GetUserMode() : CTestContainer98Doc
  • GetValue() : CVariantAssoc , CAmbientProperty
  • GetVertPosPix() : CRulerItem
  • GetView() : CWordPadDoc , CTestContainer98Doc , CRulerBar , CEmbeddedItem , CMainFrame , CComboToolBar , CRulerBar , CEmbeddedItem , CWordPadDoc
  • GetViewType() : CRowListView
  • GetVisible() : CCalcDlg , CRemoteCalcDlg
  • GetVisibleHeight() : CSurface
  • GetVisibleWidth() : CSurface
  • GetVTI() : CAmbientProperty
  • GetWebView() : CMainFrame
  • GetWeightFromLineWeight() : CMainFrame
  • GetWheelDistanceForFigure() : CSpiroView
  • GetWidth() : CSwarm
  • GetWindow() : CTestContainer98Item , CScript
  • GetWindowContext() : CTestContainer98Item
  • GetX() : CAutoClik , CClikPoint , CAutoClik , CAutoClickDoc
  • GetY() : CClikPoint , CAutoClik , CAutoClickDoc , CAutoClik
  • Go() : CIEDemoDoc
  • GoBack() : CIEDemoDoc
  • GoForward() : CIEDemoDoc
  • GotData() : CIDataObjectDlg
  • guide : tagRC
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- h -

  • HandlePointerInactiveDragOver() : CTestContainer98View
  • HandlePointerInactiveMove() : CTestContainer98View
  • HandlePointerInactiveSetCursor() : CTestContainer98View
  • HandleSelChange() : CMonthCalPage
  • HandleSelect() : CMonthCalPage
  • HandleWindowlessDragEnter() : CTestContainer98View
  • HandleWindowlessDragLeave() : CTestContainer98View
  • HandleWindowlessDragOver() : CTestContainer98View
  • HandleWindowlessDrop() : CTestContainer98View
  • HandleWindowlessKeyboardMessage() : CTestContainer98View
  • HandleWindowlessMouseMessage() : CTestContainer98View
  • HasButton() : CCheckBoxProp , CTwoButtonsProp , CCustomDlgProp
  • HasChildren() : CServerNode
  • HasFocus() : CLocalComboBox , CFindComboButton
  • HasUIActiveState() : CTestContainer98Item
  • HaveHotBorder() : CSliderButton
  • hdr : DICTENTRY
  • hgdiobj : tagCTLINITIEDIT
  • HideModelessPropSheet() : CMainFrame
  • hinksetBox : tagBOXRESULTS
  • HitTest() : CShapesDoc , CBasePiece , CWheel , CDrawObj , CTestContainer98Item , CDrawObj , CMSMCaptionBar
  • HitTestItems() : CTestContainer98View , CContainerView
  • HitTestPix() : CRulerItem , CComboRulerItem , CTabRulerItem , CRulerItem , CComboRulerItem , CTabRulerItem
  • HonorIgnoreActivateWhenVisible() : CTestContainer98Doc
  • hpendata : tagRCRESULT
  • hpenGrid : tagCTLINITIEDIT
  • hpndt : tagINPPARAMS , tagCTLINITIEDIT
  • hrec : tagRC
  • hResHandle : CLocalizePropPage
  • hrgnBound : tagPCMINFO
  • hrgnClip : tagINKINGINFO
  • hrgnExclude : tagPCMINFO
  • hrgnInkStop : tagINKINGINFO
  • HSB() : CLeader
  • HScroll() : CPropSliderCtrl
  • hSyv : tagRCRESULT
  • htrgOwner : tagTARGINFO
  • htrgTarget : tagTARGET
  • hwnd : tagCTLINITBEDIT , tagCTLINITHEDIT , tagCTLINITIEDIT , tagRC , tagPDEVENT
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- i -

  • id
: ButtonLib::_DButton
, CircLib::_DCirc
, IMAGELib::_DImage
, TESTHELPLib::_DTesthelp
, inproc::IVariantMap
, TESTHELPLib::_DTesthelp
, inproc::IVariantMap
, inproc::IStringCollect
, LocalizeLib::_DLocalize
, TESTHELPLib::_DTesthelp
, inproc::IVariantAssoc
, mfccalc::ICalcDlg
, TESTHELPLib::_DTesthelp
, mfccalc::ICalcDlg
, TestContainer98::ITestContainer98
, CircLib::_DCirc
, LocalizeLib::_DLocalize
, TESTHELPLib::_DTesthelp
, tagCTLINITHEDIT
, tagCTLINITBEDIT
, TESTHELPLib::_DTesthelp
, tagCTLINITIEDIT
, LocalizeLib::_DLocalize
, TimeLib::_DTime
, XlistLib::_DXlist
, CircLib::_DCirc
, PalLib::_DPal
, XlistLib::_DXlist
, PushLib::_DPush
, ACDual::IAClick
, IMAGELib::_DImage
, PushLib::_DPush
, ACDual::IAutoClickPoint
, AutoClik::IAClick
, SpindialLib::_DSpindial
, AutoClik::IAClick
, AutoClik::IAutoClickPoint
  • idActiveTabCloseButton : CWorkspaceBar
  • idCustomTooltips : CWorkspaceBar
  • IDD : CNetAddressCtrlPage , CStatPage , CSummPage , CPagerCtrlPage , CChangeNameDlg , CAddNodeDlg , CSplitButtonCtrlPage , CZoomDlg , CDriverView , CImagePropPage , CCalcDlg , CDataObjectDlg , CLicensedPropPage , CDispatchDlg , CRegistryView , CLocalizePropPage , CAboutBox , CSplashWnd , CNetAddrVerifierDlg , CPageSetupDlg , CSetTabStops , CPalPropPage , CAmbientPropertiesDlg , CComponentCategoriesDlg , CPushPropPage , CContainerInfoDlg , CEventLoggingPage , CSpindialPropPage , CFeaturesPage , CInterfacesPage , CTesthelpPropPage , CInsertControlDlg , CLoggingDlg , CTimePropPage , CMacroDlg , CMethodDlg , CXlistPropPage , CNewAmbientPropertyDlg , CPropertyBagDlg , CAnimateCtrlPage , CPropertyChangesPage , CPropertyEditRequestsPage , CDateTimePage , CRegisterControlsDlg , CServicesPage , CMonthCalPage , CTabOrderDlg , CTCExtPage , CToolBarCtrlPage , CDateDialog , CDocOptPage , CTreeCtrlPage , CFileNewDialog , CFormatParaDlg , CProgCtrlPage , CFormatTabDlg , CListDlg , CSliderCtrlPage , CUnitsPage , CGuidGenDlg , CSpinCtrlPage , CMyCustomizationPage , CDesktopAlertDemoDlg , CTaskDialogTestDlg , CMSNDlg , CMyPopupDlg , CBMTest1Dlg , CDlgToolTipsDlg , CLineWeightDlg , CBMTest2Dlg , CMenuSubSetView , CDemoOptionsPage , CBMTest3Dlg , CResourcePage , CPage1 , CCustListDlg , CPage2 , CPage3 , CAboutDlg , CDerEditDlg , CPage4 , CPage5 , CSpinEditDlg , CPage6 , CAppLookDlg , CDWordArrayView , CSubEditDlg , CMailBar , CMyPropertyPage1 , CWclsEditDlg , CMyPropertyPage2 , CMyPropertyPage3 , CIntListView , CDBVListView , CMyPropertyPage4 , CPropSheetDemoDlg , CRateDlg , CSetPaneSizeView , CStatusBarDemoView , CMapDWordToMyStructView , CWndListDlg , CView3 , CTabControlView , CDlgtempDlg , CTasksPaneView , CTooltipDemoView , CMapStringToStringView , CToolDlg , CTrayMenuDlg , COptionsPage1 , CColorOptDlg , COptionsPage12 , COptionsPage21 , CPointArrayView , CFileDlgWatcherDlg , COptionsPage22 , COptionsPage31 , CListHdrDlg , COptionsPage32 , CStringListView , CAdderDialog , CMainDlg , CTypedPtrArrayView , CFindDlg , CGotoDlg , CTypedPtrListView , CColorPage , CStylePage , CTypedPtrMapView , CPenWidthsDlg , CInfoDlg , CConfigDlg , CBkfstPage , CDinnerPage , CRecalcView , CLunchPage , CHandleSize , CSpeedDlg , CMinSize , CVarUseDlg , CMutexesDlg , CEnterDlg , CInputView , CSpeakNDlg , CDHtmlExploreDlg , CPropertiesDlg , CButtonPropPage , CGetURL , CInsertTableDlg , CCircPropPage , CEntryInfoDlg , CSchedulerDlg , CCmnCtrl3Dlg , CAutoDrivDlg , CChangeText , CCommandLinkCtrlPage , CDriverDlg , CRectDlg
  • idDisableMDIChildRedraw : CWorkspaceBar
  • idDragMDITabs : CWorkspaceBar
  • idFlatFrame : CWorkspaceBar
  • IDH : CEntryInfoDlg , CSchedulerDlg
  • idMDITabsBorderSize : CWorkspaceBar
  • idMDITabsContextMenu : CWorkspaceBar
  • idMDITabsDocMenu : CWorkspaceBar
  • idMDITabsIcons : CWorkspaceBar
  • idShowMDITabs : CWorkspaceBar
  • idStr : DocType
  • idTabsAutoColor : CWorkspaceBar
  • idTabsOnTop : CWorkspaceBar
  • idTabsStyle : CWorkspaceBar
  • idTarget : tagTARGET
  • ieb : tagCTLINITIEDIT
  • iedo : tagCTLINITIEDIT
  • iei : tagCTLINITIEDIT
  • ien : tagCTLINITIEDIT
  • ierec : tagCTLINITIEDIT
  • ies : tagCTLINITIEDIT
  • iesec : tagCTLINITIEDIT
  • iesf : tagSTRKFMT
  • IMGID_TYPEINFO_C : CTypeLibTreeView
  • IMGID_TYPEINFO_O : CTypeLibTreeView
  • IMGID_TYPELIB : CTypeLibTreeView
  • imgOriginal : CChildView
  • Import() : CSurface , CLeader
  • InBounds() : CCircCtrl
  • InCircle() : CCircCtrl
  • IncrRevNum() : CSummInfo
  • indexMap : CColorMenu
  • indxBox : tagBOXRESULTS
  • InformDlStatus() : CImageCtrl
  • InformSize() : CImageCtrl
  • InfoToDialogHelper() : CDlgtempDlg
  • Init() : CCubeView , CEditBar , CLlama , CExtendedControl , CMethodParamInfo , CMethodInfo , CInterfaceInfo
  • InitBulletPalette() : CMainFrame
  • InitControlInfo() : CTestContainer98Item
  • InitDefaultAmbientProperties() : CTestContainer98Doc
  • InitDIBData() : CDibDoc
  • InitDocument() : CScribbleDoc
  • InitFloaty() : CMSOffice2007DemoView
  • InitHomeCategory() : CMainFrame
  • Initialize() : CSwarm , CPadFrame , CPadView , CPageSetupDlg , CTestContainer98Doc , CLinkButton , CMSMCategoryBarButton , CMSMLinksBarButton , CDialogItem
  • InitialShowWindow() : CMainFrame
  • InitInstance() : CCollectApp , CCubeApp , CDllScreenCapApp , CScreenCapApp , CThreadApp , CBallThread , CRectThread , CLineThread , CMdiApp , CBounceThread , CRecalcApp , CMutexesApp , CDisplayThread , CSpeakNApp , CButtonApp , CCmnCtrl3App , CContainerApp , CImageApp , CLocalizeApp , CNetAddrVerifierApp , CPalApp , CPushApp , CSpindialApp , CTesthelpApp , CTimeApp , CCmnCtrl1App , CCmnCtrl2App , CTaskDialogTestApp , CTestApp , CDBVListApp , CDibLookApp , CDlgtempApp , CDockApp , CDynaMenuApp , CFileDlgWatcherApp , CTheApp , CHelloApp , CListHdrApp , CMDIApp , CMMXSwarmApp , CModelessApp , CNotepadApp , CPropDlgApp , CRowListApp , COwnerDrawMenuApp , CPaletteDemoApp , CRebarTestApp , CRibbonGadgetsApp , CSetPaneSizeApp , CSliderApp , CStatusBarDemoApp , CCImageApp , CToolbarDateTimePickerApp , CTooltipDemoApp , CVisualStudioDemoApp , CWordPadApp , CMSMoneyDemoApp , CMenuSubSetApp , CExplorerApp , CDynamicMenuApp , CDlgToolTipsApp , CDesktopAlertDemoApp , CWordPadApp , CSnapApp , CIViewersApp , COleClientApp , CMFCBindApp , CSpiroApp , CCalcDrivApp , CAutoDrivApp , CTrackerApp , CVarUseApp , CViewExApp , CDHtmlExploreApp , CMfcieApp , CSchedulerApp , CAutoClickApp , CServerApp , CInProcApp , CDriveApp , CCalcApp , CTheApp , CTestContainer98App , CCustomPagesApp , CMSOffice2007DemoApp , CTabbedViewApp , CWorkSpaceToolBarApp , CDrawClientHandlersApp , CMDITabsDemoApp , CTabControlApp , CTrayMenuApp , CTasksPaneApp , CNewControlsApp , CStateCollectionApp , CRibbonMDIDemoApp , CRollupPaneApp , COutlookDemoApp , CPropSheetDemoApp , COutlookMultiViewsApp , CXlistApp , CIEDemoApp , CGuidGenApp , CDrawApp , COle2ViewApp , CCounterThread , CAutoClickApp , CDrawApp , CLicensedApp , CHTMLEditApp , CCircApp , CScribbleApp , CCtrlbarsApp , CGDIThread , CMultiPadApp , CHuskApp , CMdiApp , CTheApp
  • InitMainButton() : CMainFrame
  • InitMultilevelPalette() : CMainFrame
  • InitNumberingPalette() : CMainFrame
  • InitPositionPalette() : CMainFrame
  • InitPropertyGet() : CMethodInfo
  • InitPropertyPut() : CMethodInfo
  • InitPropList() : CPropertiesViewBar
  • InitRibbon() : CMainFrame
  • InitRootNode() : CServerNode
  • InitScriptManager() : CTestContainer98Doc
  • InitTabButtons() : CMainFrame
  • InitViewCategory() : CMainFrame
  • InitViews() : CMainFrame
  • InputEdit() : CSpeakNDlg
  • InsertBitmap() : CMSOffice2007DemoView
  • InsertControl() : CTestContainer98Doc
  • InsertSize() : CSizeComboBox
  • InternalInvoke() : CExtendedControl
  • IntersectRect() : CSpiroRect
  • Intersects() : CDrawRect , CDrawPoly , CDrawRect , CDrawObj , CDrawPoly , CDrawObj
  • Invalidate() : CRectItem , CRulerItem , CDrawObj
  • InvalidateItem() : CTestContainer98Item , CMainView , CContainerItem , CServerView
  • InvalidateRect() : CTestContainer98Item
  • InvalidateRgn() : CTestContainer98Item
  • InvalObj() : CDrawView
  • Invoke() : CTestContainer98Item , CExtendedControl
  • invokekind : INVOKEKIND_ENTRY
  • InvokeMethods() : CTestContainer98Item
  • IPv4 : CNetAddrVerifierDlg
  • Ipv4AddrToString() : CNetAddrVerifierDlg
  • IPv6 : CNetAddrVerifierDlg
  • Ipv6AddrToString() : CNetAddrVerifierDlg
  • IsBackAvailable() : CIEDemoDoc , CMSMoneyDemoDoc
  • IsBindable() : CMethodInfo
  • IsChild() : CServerNode
  • IsChildNodeOf() : CMyTreeCtrl
  • IsDocOpen() : CWordPadApp
  • IsEditable() : CMSMCategoryBarButton , CMSMLinksBarButton , CLinkButton
  • IsEditViewActive() : CMainFrame
  • IsEmpty : inproc::IVariantMap , CVariantMap
  • IsEmptyMenuAllowed() : CUndoButton
  • IsEnabled() : CAmbientProperty
  • IsEnableFill() : CDrawObj
  • IsEnableLine() : CDrawObj
  • IsExclusive() : CUndoButton
  • IsFavoritesMenu() : CMainFrame
  • IsFormatText() : CWordPadView
  • IsFrwdAvailable() : CMSMoneyDemoDoc , CIEDemoDoc
  • IsIdleMessage() : CWordPadApp
  • IsInPlaceActive() : CTestContainer98Item
  • IsInsideOut() : CTestContainer98Item
  • IsInvisibleAtRuntime() : CTestContainer98Item
  • IsItemMenuLook() : CRibbonListButton
  • IsLogged() : CMethodInfo
  • IsMDITabsDisabled() : CMDITabOptions
  • IsModified() : CHTMLEdDoc
  • IsNull() : CSurface
  • IsOutlookBar2003() : CMainFrame
  • IsParentActive() : CMSMCaptionBar
  • IsParentMaximize() : CMSMCaptionBar
  • IsPrintPreviewMode() : CMainFrame
  • IsReadOnly() : CChildFrame
  • IsScrollBar() : CTabbedViewView
  • IsSelected() : CContainerView , CMainView , CTestContainer98View , CDrawView , CMFCBindView , CDrawView
  • IsStock() : CAmbientProperty
  • IsSubclassedControl() : CPushCtrl , CButtonCtrl , CXlistCtrl
  • iStrk : tagSTRKFMT
  • IsUIActive() : CTestContainer98Item
  • IsUpdatePending() : CPadView
  • IsValidSel() : CObjTreeView
  • IsWheel() : CBasePiece
  • IsWindowless() : CTestContainer98Item
  • IsWordWrap() : CPadView
  • iSyc : tagSYE
  • iTargetLast : tagTARGINFO
  • Item : inproc::IStringCollect , inproc::IVariantMap
  • ITEM_TYPE : CTreeItem
  • ItemBackColor : XlistLib::_DXlist
  • ItemForeColor : XlistLib::_DXlist
  • ItemText : XlistLib::_DXlist
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- p -

  • p1 : CRoamer
  • p2 : CRoamer
  • PackBytes() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • PackBytesU() : CSSE2Unsigned16Saturated
  • pageEmbedded : COptionSheet
  • pageRTF : COptionSheet
  • pageText : COptionSheet
  • pageWord : COptionSheet
  • pageWrite : COptionSheet
  • ParseInterfaceFlag() : CTCCommandLineInfo
  • ParseMeasurement() : CWordPadApp
  • ParseOptionFlag() : CTCCommandLineInfo
  • ParseParam() : CTCCommandLineInfo , CWordPadCommandLineInfo
  • ParseServiceFlag() : CTCCommandLineInfo
  • PasteEmbedded() : CDrawView
  • PasteNative() : CDrawView , CWordPadView , CDrawView , CWordPadView
  • pBack : CItemData
  • pdts : tagCTLINITIEDIT
  • penBtnFace : CRulerBar
  • penBtnHighLight : CRulerBar
  • penBtnShadow : CRulerBar
  • penBtnText : CRulerBar
  • penFocusLine : CRulerBar
  • penWindow : CRulerBar
  • penWindowFrame : CRulerBar
  • penWindowText : CRulerBar
  • PerformOperation() : CCalcDlg
  • pFontHolder : CItemData
  • pFore : CItemData
  • pGroupFont : CPage5
  • pntEnd : tagRCRESULT
  • point : CCircCtrl , CLocalizeCtrl , CSpindialCtrl
  • PointColor() : CSurface
  • pOldFont : CServerDC
  • PopBlockFmtMenu() : CHTMLEdView
  • PopColorMenu() : CHTMLEdView
  • Position() : ACDual::IDualAClick
  • PositionCombos() : CFormatBar
  • PositionControls() : CButtonDialog
  • PositionX() : TCPropsLib::ITCExtendedControl
  • PositionY() : TCPropsLib::ITCExtendedControl
  • PostNcDestroy() : CCalcDlg , CTypeLibWnd , CParsedEditExported , CModelessDialog , CAdderDialog , CModelessShapePropSheet
  • pPicHolder : CItemData
  • PreCloseFrame() : CTestContainer98Doc , CWordPadDoc
  • PreCreateWindow() : CMainFrame , CIEDemoView , CMainFrame , CChildFrame , CMainFrame , CMDITabsDemoView , CChildFrame , CMainFrame , CMenuSubSetView , CMSMCaptionBar , CMSMoneyDemoView , CMainFrame , CCubeView , CMSOffice2007DemoView , CFoldersTree , CMainFrame , COutlookDemoView , CChildView , CMainFrame , CChildFrame , CMainFrame , COutlookMultiViewsView , CCSPropertySheet , CVisualStudioDemoView , CMainFrame , CTooltipDemoView , CMainFrame , COwnerDrawMenuView , CTasksPaneView , CMainFrame , CTabControlView , CMainFrame , CView2 , CTabbedViewView , CMainFrame , CPaletteDemoView , CStatusBarDemoView , CMainFrame , CStateCollectionView , CChildFrame , CSliderView , CChildFrame , CMainFrame , CContainerView , CRollupPaneView , CMainFrame , CRibbonMDIDemoView , CRebarTestView , CMainFrame , CRibbonGadgetsView , CChildFrame , CMainFrame , CDBVListView , CMainFrame , CSetPaneSizeView , CBounceFrame , CMainFrame , CBounceView , CMainFrame , CHelloFrame , CHelloView , CChildFrame , CMainFrame , CChildView , CMainFrame , CListViewEx , CMainFrame , CToolbarDateTimePickerView , CMainFrame , CRowListView , CChildFrame , CExplorerView , CChildFrame , CInPlaceFrame , CMainFrame , CWordPadView , CMainFrame , CScribbleView , CCSPropertySheet , CWorkSpaceToolBarView , CChildView , CMainFrame , CChildFrame , CMainFrame , CSpiroView , CMFCBindView , CMainFrame , CMfcieView , CAutoClickView , CChildFrame , CMainFrame , CAutoClickView , CChildFrame , CMainFrame , CDrawView , CMainFrame , CTypeLibODLView , CTypeLibWnd , CObjTreeView , CPadView , CMainFrame , CTestContainer98View , CMainFrame , CWordPadView , CCustomPagesView , CDrawView , CDynamicMenuView , CMainFrame
  • PreLoadState() : CExplorerApp , CTasksPaneApp , CStateCollectionApp , CTabControlApp , CTabbedViewApp , CRibbonGadgetsApp , CRollupPaneApp , COwnerDrawMenuApp , COutlookDemoApp , CDynamicMenuApp , CCustomPagesApp , CIEDemoApp , CMDITabsDemoApp , CMenuSubSetApp , CWordPadApp , CRibbonMDIDemoApp , CSetPaneSizeApp , CStatusBarDemoApp , CToolbarDateTimePickerApp , CTooltipDemoApp , CWorkSpaceToolBarApp , CVisualStudioDemoApp , CRebarTestApp , COutlookMultiViewsApp
  • Prepare() : CTestContainer98Item
  • PrepareCache() : CEmpView
  • PressButton() : CSpiroView
  • PreTranslateMessage() : CCalcDlg , CFolderListPopupWnd , CDlgToolTipsDlg , CSearchBox , CLocalComboBox , CClassViewBar , CWordPadApp , CMainFrame , CSnapPropertySheet , CComboToolBar , CMSMCaptionBar , CButtonCtrl , CTestContainer98View , CWordPadApp , CScreenCapApp , CXlistCtrl , CMainFrame , CTheApp , CMacroComboBox
  • prevButton : CBMTest3Dlg
  • PreviewFillColor() : CDrawView
  • PreviewLineColor() : CDrawView
  • PreviewLineWeight() : CDrawView
  • PreviewStyle() : CDrawView
  • PrintPageHeader() : CScribbleView
  • PrintTitlePage() : CScribbleView
  • PrintTwips() : CWordPadApp
  • PrintWidth() : CRulerBar
  • ProcessNewObject() : CMFCBindCntrItem
  • PromptChangeNode() : CServerNode
  • PromptForFileName() : CWordPadApp
  • PromptNewChildNode() : CServerNode
  • PromptText() : CSpeakNDlg
  • propertyID : tagPROPERTYIDOFFSET
  • pStgMedium : CTestContainer98Item
  • pszConverterName : DocType
  • pszName : VARTYPE_ENTRY , INVOKEKIND_ENTRY
  • pszPrefixFrom : CMapInfo
  • pszPrefixTo : CMapInfo
  • pt : tagPDEVENT
  • pText : CItemData
  • ptOrgGrid : tagCTLINITIEDIT
  • PushChar() : CCheckBoxProp
  • put_Name() : CExtendedControl
  • put_Position() : CAutoClickDoc
  • put_PositionX() : CExtendedControl
  • put_PositionY() : CExtendedControl
  • put_SizeX() : CExtendedControl
  • put_SizeY() : CExtendedControl
  • put_text() : CAutoClickDoc
  • put_x() : CAutoClickPoint , CAutoClickDoc
  • put_y() : CAutoClickPoint , CAutoClickDoc
  • putref_Position() : CAutoClickDoc
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- q -

  • QueryAcceptData() : CWordPadView
  • QueryDelete() : CPaletteBar , CStandardBar
  • QueryInsert() : CStandardBar , CPaletteBar
  • QueryInterface() : CExtendedControl , CTCBindHost , CPropertyBag , CImpIAdviseSink
  • QueryService() : CTestContainer98Item
  • QuickActivate() : CTestContainer98Item
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- r -

  • RandomBits() : CSurface
  • RandomLine() : CSurface
  • raw_Activate() : CExtendedControl
  • raw_Deactivate() : CExtendedControl
  • raw_UIActivate() : CExtendedControl
  • raw_UIDeactivate() : CExtendedControl
  • Read() : CTrackFile , COEMFile , CTrackFile , COEMFile , CPropertyBag
  • ReadArray() : CBitmapProperty
  • ReadFromStorage() : CSummInfo
  • ReadFromStream() : CPropertySection , CPropertySet , CProperty , CPropertySection , CPropertySet , CProperty
  • ReadItem() : CTestContainer98Item
  • ReadLine() : CLineFile
  • ReadNameDictFromStream() : CPropertySection
  • ReadStruct() : CBitmapProperty
  • ReadyStateChange() : IMAGELib::_DImageEvents
  • RecalcBounds() : CDrawPoly
  • RecalcDone() : CRecalcDoc
  • RecalcInSecondThread() : CRecalcDoc
  • RecalcInSingleThread() : CRecalcDoc
  • RecalcLayout() : CInPlaceFrame , CMainFrame , CInPlaceFrame
  • RecalcTextSizes() : CRibbonListButton , CRibbonListFontButton
  • RecordCreateDate() : CSummInfo
  • RecordPrintDate() : CSummInfo
  • RecordSaveDate() : CSummInfo
  • rectangle : CDrawRect
  • rectBound : tagPENDATAHEADER , tagPCMINFO , tagRC , tagTARGET
  • rectBoundInk : tagRCRESULT , tagTARGET
  • rectBoundLastInk : tagTARGET
  • rectClip : tagINKINGINFO
  • rectExclude : tagPCMINFO , tagRC
  • rectInkStop : tagINKINGINFO
  • Refresh() : CAutoClickDoc
  • RefreshColorMenu() : CDynaMDIChildWnd
  • RefreshControlList() : CInsertControlDlg
  • RefreshDir() : CDHtmlExploreDlg
  • RefreshRegisteredControls() : CRegisterControlsDlg
  • RefreshWindow()
: ACDual::IAClick
, ACDual::IDualAClick
, AutoClik::IAClick
, CAutoClik
, CAutoClickDoc
  • RegisterActive() : CCalcDlg
  • RegisterControlClass() : CParsedEdit , CParsedEditExported
  • RegisterFormats() : CWordPadApp
  • RelayEvent() : CTesthelpCtrl
  • Release() : CObjectData , CTestContainer98Item , CSmartTypeAttr , CSmartVarDesc , CSmartFuncDesc
  • ReleaseDC() : CTestContainer98Item
  • Remove : inproc::IStringCollect , CDrawDoc , CDrawObj , CPropertySet , CDrawOleObj , CDrawView , CPropertySection , CDrawObj , CPropertySet , CStringCollect , CDrawDoc , CDrawOleObj , CDrawView , CPropertySection , CPropertySet
  • RemoveAll() : CVariantMap , inproc::IVariantMap , inproc::IStringCollect , CPropertySection , CPropertySet , CStringCollect , CVariantMap , CStringCollect , CPropertySection , CPropertySet
  • RemoveAllItems() : CObjListView
  • RemoveInfoFromTable() : CSchedulerDlg
  • RemoveItem() : CObjListView , XlistLib::_DXlist , CXlistCtrl , CTestContainer98Doc
  • RemoveKey() : CVariantMap , inproc::IVariantMap , CVariantMap
  • RemoveTabFromArray() : CFormatTabDlg
  • RemoveTabFromArrayByIndex() : CFormatTabDlg
  • RenewListCtrl() : CListHdrDlg
  • RepaintSelectedItems() : CListViewEx
  • ReplaceHDIB() : CDibDoc
  • ReplacePen() : CScribbleDoc
  • ReportSaveLoadException() : CWordPadDoc
  • RepositionFrame() : CInPlaceFrame
  • RequestsEdit() : CMethodInfo
  • RequestUIActivate() : CTestContainer98Item
  • Reset() : CStandardBar , CPaletteBar , CEnumVariant
  • ResetData() : CBitmapProperty
  • ResetPreviewState() : CDrawView
  • ResetSelNum() : CUndoButton
  • ResetSize() : CRectItem
  • ResetVariables() : CEntryInfoDlg
  • Restore() : CDrawView::XPreviewStateItem
  • RestoreOriginalstate() : CLinksBar , CMSMCategoryBar , CMyMenuBar
  • RestorePosition() : CTypeLibWnd , CMainFrame
  • RestorePreviewState() : CDrawView
  • RestoreState() : CWordPadDoc
  • ResyncScrollSizes() : CScribbleView
  • Revalidate() : CNetAddrVerifierDlg
  • ReverseWheelDirection() : CWheel , CRing , CBasePiece
  • rgb : tagPENTIP
  • rgbfAlc : tagRC
  • rgbInk : tagRC , tagPENDATAHEADER
  • rgCol : tagITEMDATA
  • rglpdf : tagRC
  • rgoempeninfo : tagPENINFO
  • rgpntHotSpots : tagSYG
  • rgSyv : tagBOXRESULTS
  • rgTarget : tagTARGINFO
  • rgwOemData : tagOEM_PENPACKET , tagPENPACKET
  • rgwReserved : tagBOXEDITINFO , tagRC , tagPENINFO
  • right : tagRECTL
  • roundRectangle : CDrawRect
  • RulerToClient() : CRulerBar
  • Run() : CCounterThread , CDisplayThread
  • RunAutomationScript() : CTestContainer98Doc
  • RunMacro() : CScript
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- s -

  • s_cfObjectDescriptor : CTestContainer98View
  • SafeOpen() : CLineFile
  • Save() : CMDITabOptions
  • SaveAllModified() : CMenuSubSetApp , CRibbonMDIDemoApp , CVisualStudioDemoApp
  • SaveAsText() : CServerNode
  • SaveCustomState() : CVisualStudioDemoApp
  • SaveDockState() : CDocOptions
  • SaveModified() : CTestContainer98Doc
  • SaveMyDocument() : CHTMLEdDoc
  • SaveOptions() : CWordPadApp , CDocOptions , CWordPadApp , CDocOptions
  • SavePosition() : CMainFrame
  • SaveRegistrySettings() : CTestContainer98App
  • SaveState() : CWordPadDoc
  • SaveToFile() : CEmbeddedItem
  • SaveToPropertyBag() : CTestContainer98Item
  • SaveToStorage() : CTestContainer98Item
  • SaveToStream() : CTestContainer98Item
  • Scale() : CSpiroRect , CVector
  • Scroll() : CTestContainer98Item
  • ScrollRect() : CTestContainer98Item
  • ScrollToItem() : CServerView
  • sec : tagABSTIME
  • Select() : CDrawView
  • SelectAtPoint() : CServerView
  • SelectDocFont() : CServerDoc
  • selected : CDrawObj
  • SelectItemBackColor() : CXlistCtrl
  • SelectItemFont() : CXlistCtrl
  • SelectItemForeColor() : CXlistCtrl
  • SelectPalette() : CMainFrame , CWordPadView
  • SelectWithinRect() : CDrawView
  • SelectWorkspace() : CFolderListBar , CFoldersTree
  • SendToBack() : CTestContainer98Doc
  • Serialize() : CRowListDoc , CTasksPaneDoc , CToolbarDateTimePickerDoc , CStroke , CTooltipDemoDoc , CVisualStudioDemoDoc , CScribbleDoc , CEmbeddedItem , CWordPadDoc , CScribbleItem , CWorkSpaceToolBarDoc , CFigCommand , CFigure , CSpiroDoc , CTrackerDoc , CMainDoc , CMfcieDoc , CMyScheduler , CAutoClickDoc , CDrawItem , CDrawDoc , CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj , CServerDoc , CServerNode , CServerItem , CDriverDoc , CMFCBindDoc , CMFCBindCntrItem , CMainDoc , CRectItem , CPadDoc , CEmbeddedItem , CAmbientProperty , CMyObject , CTestContainer98Doc , CTestContainer98Item , CCollectDoc , CEmbeddedItem , CWordPadDoc , CCubeDoc , CCustomPagesDoc , CDrawItem , CTextDoc , CDrawDoc , CDrawObj , CThreadDoc , CDrawRect , CDrawPoly , CRecalcDoc , CDrawOleObj , CDynamicMenuDoc , CContainerItem , CExplorerDoc , CIEDemoDoc , CContainerDoc , CLinkButton , CMDITabsDemoDoc , CPalCtrl , CMenuSubSetDoc , CMSMoneyDemoDoc , CDockDoc , CMSOffice2007DemoDoc , COutlookDemoDoc , CDynaMenuDoc , COutlookMultiViewsDoc , COwnerDrawMenuDoc , CBounceDoc , CPaletteDemoDoc , CRebarTestDoc , CHelloDoc , CRibbonGadgetsDoc , CRibbonMDIDemoDoc , CPadDoc , CRollupPaneDoc , CSetPaneSizeDoc , CNotepadDoc , CSliderButton , CSliderDoc , CShapesDoc , CStateCollectionDoc , CStatusBarDemoDoc , CShape , CTabbedViewDoc , CTabControlDoc
  • SerializeFontInfo() : CServerDoc
  • Set() : CProperty , CPropertySection , CPropertySet , CFormatTabDlg , CProperty , CPropertySection , CPropertySet , CFormatTabDlg
  • SetAbsPos() : CHTMLEdView
  • SetAccum() : CRemoteCalcDlg , CCalcDlg
  • SetActiveFrame() : COutlookDemoApp
  • SetAddress() : CMainFrame
  • SetAlignment() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • SetAllProps() : CAutoClik , CAutoClickDoc , ACDual::IAClick , ACDual::IDualAClick , CAutoClickDoc , AutoClik::IAClick , CAutoClik
  • SetAngleDelta() : CBasePiece , CWheel , CRing
  • SetAnswerText() : CSpeakNDlg
  • SetAppname() : CSummInfo
  • SetAt() : CVariantMap
  • SetAuthor() : CSummInfo
  • SetBackColor() : CItemData
  • SetBackpointer() : CListOutputFrame
  • SetBallRadius() : CBounceDoc
  • SetBaseSize() : CRectItem
  • SetBasicCommands() : CMainFrame
  • SetBounds() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • SetBufferSize() : CNotifyShowCase
  • SetCancel() : CButtonDialog
  • SetCaptionFont() : CMSMCaptionBar
  • SetCaptionHeight() : CMSMCaptionBar
  • SetCapture() : CTestContainer98Item
  • SetCharFormat() : CFormatBar
  • SetCheck() : CDateTimePage
  • SetCircleOffset() : CCircCtrl
  • SetClassID() : CPropertySet
  • SetClickPoint() : CAutoClickPoint
  • SetColor() : CEditBar
  • SetColumns() : CPaletteBar , CToolsPalette
  • SetComments() : CSummInfo
  • SetContainerSize() : CMainFrame
  • SetContents() : CEnumVariant
  • SetControls() : CTaskDialogTestDlg
  • SetCount() : CVariantMap , CStringCollect
  • SetCurrentCommand() : CMSMLinksBar
  • SetCurrFolder() : CMainFrame
  • SetCustomBallColor() : CBounceDoc
  • SetCustomStrColor() : CHelloDoc
  • SetDefault() : CButtonDialog
  • SetDefaultFont() : CWordPadView
  • SetDefaultProperties() : CSchedulerDlg
  • SetDefaultSettings() : CEntryInfoDlg
  • SetDescription() : CMyToolTipCtrl
  • SetDialog() : CNextWizardDialog , CEndWizardDialog
  • SetDlgBarHeightInPixels() : CMainFrame
  • SetDlgBarSizeInContainer() : CMainFrame
  • SetDlgBarWidthInPixels() : CMainFrame
  • SetDockingBarsIcons() : CMainFrame
  • SetDocType() : CWordPadDoc
  • SetEditFocus() : CFormatTabDlg
  • SetEntry() : CPalCtrl
  • SetFigData() : CBasePiece , CWheel
  • SetFillColor() : CDrawObj
  • SetFilter() : CDBVListSet
  • SetFlatTabs() : COutputBar
  • SetFocus() : CTestContainer98Item
  • SetFont() : CItemData
  • SetForeColor() : CItemData
  • SetFormatID() : CPropertySection
  • SetFormatVersion() : CPropertySet
  • SetFullRowSel() : CListViewEx
  • SetHorizontal() : CEditBar
  • SetHorzPosTwips() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • SetI1() : CVariantMap
  • SetI2() : CVariantMap
  • SetIcon() : CMSMCaptionBar
  • SetID() : CProperty
  • SetImage() : CChildView
  • SetImagePath() : CImageCtrl
  • SetItem() : CStringCollect
  • SetItemBackColor() : CXlistCtrl
  • SetItemFont() : CXlistCtrl
  • SetItemForeColor() : CXlistCtrl
  • SetItemPicture() : CXlistCtrl
  • SetItemTabOrder() : CTestContainer98Doc
  • SetItemText() : CXlistCtrl
  • SetKey() : CVariantAssoc
  • SetKeys() : CMainFrame
  • SetKeywords() : CSummInfo
  • SetLabel() : CUndoBar
  • SetLandscape() : CSpiroApp
  • SetLastAuthor() : CSummInfo
  • SetLength() : CPalCtrl
  • SetLineColor() : CDrawObj
  • SetLineWeight() : CDrawObj
  • SetLoggingOptions() : CTestContainer98Item
  • SetLook() : CAppLookDlg
  • SetMarginBounds() : CRulerBar
  • SetMinSize() : CWordPadResizeBar
  • SetMultiSelect() : CTestContainer98View
  • SetName() : CPropertySection
  • SetNeedlePosition() : CSpindialCtrl
  • SetNewStyle() : CMyTreeCtrl
  • SetNote() : CCircCtrl
  • SetNumChars() : CSummInfo
  • SetNumPages() : CSummInfo
  • SetNumWords() : CSummInfo
  • SetObject() : CMetaFileWnd
  • SetOperand() : CRemoteCalcDlg , CCalcDlg
  • SetOperation() : CRemoteCalcDlg , CCalcDlg
  • SetOSVersion() : CPropertySet
  • SetOwner() : CExampleThread
  • SetPageButtons() : COptionSheet
  • SetPageSize() : CDrawView
  • SetParentActive() : CMSMCaptionBar
  • SetParentMaximize() : CMSMCaptionBar
  • SetPathName() : CMSOffice2007DemoDoc , CTasksPaneDoc , CWordPadDoc
  • SetPenLocation() : CBasePiece , CWheel
  • SetPicture() : CPalCtrl , CItemData
  • SetPosition() : CBasePiece , CWheel , CAutoClik , CAutoClickDoc , CAutoClik , CWheel
  • SetPreviewColor() : CDrawDoc
  • SetPrimarySelection() : CTestContainer98Doc
  • SetProgress() : CMainFrame
  • SetProgressPos() : CMainFrame
  • SetPropListFont() : CPropertiesViewBar
  • SetPropState() : CWorkspaceBar
  • SetRange() : CSliderButton
  • SetRect() : CRectItem
  • SetRequestEditResponse() : CMethodInfo
  • SetRibbonContextCategory() : CMainFrame
  • SetRightAlignedText() : CRibbonListButton
  • SetRuler() : CRulerItem , CComboRulerItem , CRulerItem
  • SetScrollInfo() : CServerView
  • SetSectionName() : CPropertySection
  • SetSecurity() : CSummInfo
  • SetSelection() : CContainerView , CServerView , CMainView , CPadDoc , CTestContainer98View
  • SetSelectionResponse() : CPropertyEditRequestsPage
  • SetShapePropsFromSheet() : CModalShapePropSheet , CModelessShapePropSheet
  • SetSheetPropsFromShape() : CModelessShapePropSheet , CModalShapePropSheet
  • SetSize() : CRectItem
  • SetSliderPos() : CMainFrame
  • SetSort() : CDBVListSet
  • SetState() : COptionSheet
  • SetStaticPos() : CHTMLEdView
  • SetStr1() : CVariantMap
  • SetStr2() : CVariantMap
  • SetStrColor() : CHelloDoc
  • SetStringValue() : CKey
  • SetSubject() : CSummInfo
  • SetSwarm() : CLeader
  • SetSysCommand() : CMSMCaptionBarButton
  • SetTemplate() : CSummInfo
  • SetText() : CItemData , CAutoClik
  • SetTextColor() : CWordPadView
  • SetTheText() : CLocalComboBox
  • SetTimeFormat() : CSchedulerDlg
  • SetTitle() : CSummInfo
  • SetTrack() : CRulerItem
  • SetTwipSize() : CSizeComboBox
  • SetType() : CProperty
  • SetTypeInfo() : CTreeItem
  • SetTypeLib() : CTreeItem
  • SetUnits() : CWordPadApp
  • SetUpdateTimer() : CWordPadView
  • SetupMemoryBitmapSize() : CMSMVisualManager , CMainFrame
  • SetupMenus() : CTestWindow
  • SetupOffice2007Button() : CMainFrame
  • SetupSelectionTracker() : CTestContainer98View
  • SetupTracker() : CTestContainer98View , CMainView , CContainerView
  • SetUserMode() : CTestContainer98Doc
  • SetValue() : CVariantAssoc , CAmbientProperty , CSliderButton
  • SetValueLengthAngle() : CVector
  • SetVertical() : CEditBar
  • SetVertPos() : CComboRulerItem , CRulerItem , CComboRulerItem , CRulerItem
  • SetViewType() : CRowListView
  • SetVisible() : CRemoteCalcDlg , CCalcDlg
  • SetVSDotNetLook() : CPropertiesViewBar
  • SetWheelMode() : CWheel , CBasePiece
  • SetWordWrap() : CPadView
  • SetWorkSpace() : CMainFrame
  • SetX() : CAutoClickDoc , CAutoClik , CClikPoint
  • SetY() : CClikPoint , CAutoClickDoc , CClikPoint , CAutoClickDoc , CAutoClik
  • SetZoomFactor() : CServerView
  • Shape : CDrawRect
  • shapeMax : CServerNode
  • shapeOval : CServerNode
  • shapeRect : CServerNode
  • shapeRound : CServerNode
  • ShiftBits() : CSurface
  • ShouldActivateWhenVisible() : CTestContainer98Item
  • ShowContextMenu() : CWordPadView , CDHtmlExploreDlg , CMSOffice2007DemoView
  • ShowNotification() : CNotifyShowCase , CTreeCtrlPage , CNotifyShowCase
  • ShowOptions() : CMainFrame
  • ShowProgress() : CMainFrame
  • ShowPropertyFrame() : CTestContainer98Item
  • ShowSysMenu() : CMSMCaptionBar
  • ShowWindow() : CAutoClickDoc , CAutoClik , CAutoClickDoc , ACDual::IDualAClick , CAutoClik , ACDual::IAClick , AutoClik::IAClick
  • SingleStep() : CRectThread , CLineThread , CGDIThread , CBallThread
  • SizeToContent() : CBigIcon
  • SizeX() : TCPropsLib::ITCExtendedControl
  • SizeY() : TCPropsLib::ITCExtendedControl
  • Skip() : CEnumVariant
  • SortTabs() : CRulerBar
  • SpinNeedlePosition() : CSpindialCtrl
  • SpinPositive() : SpindialLib::_DSpindialEvents
  • StartAnimation() : CMainFrame
  • startEdit : CSummInfo
  • StartEditTimeCount() : CSummInfo
  • StartThread() : CThreadView
  • StartTimer() : CTimeCtrl
  • StaticEnumProc() : CWordPadApp
  • STATICTEXT : CDialogItem
  • StatusFace() : CSpeakNDlg
  • STDMETHOD_() : CExtendedControl , CTestContainer98Item , CTCBindHost , CPropertyBag , CTestContainer98Item , CTCBindHost , CTestContainer98Item , CExtendedControl , CTestContainer98Item
  • STDMETHODIMP_() : CImpIAdviseSink
  • StopTimer() : CTimeCtrl
  • Store() : CSSE2Unsigned16Saturated , CDrawView::XPreviewStateItem
  • StorePreviewState() : CDrawView
  • StoreU() : CSSE2Unsigned16Saturated
  • StripeBits() : CSurface
  • style : tagBOXLAYOUT
  • SubclassEdit() : CParsedEdit
  • SupportsInterface() : CTestContainer98Doc
  • SupportsIPointerInactive() : CTestContainer98Item
  • SupportsService() : CTestContainer98Doc
  • SwapStrings() : CHistoryList
  • SwapView() : CMainFrame
  • syg : tagRCRESULT
  • SyncFont() : CMSOffice2007DemoView
  • SyncToView() : CFormatBar
  • syv : tagSYE
  • sz : DICTENTRY
  • szCaptureFilename : CaptureData
  • szCapturePath : CaptureData
  • szFaceName : tagBOXEDITINFO
  • szName : ColourTableEntry
  • szSig : tagVS_VERSION
  • sztCodeName : notif_tag
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- t -

  • target : tagINPPARAMS
  • Terminate() : CPadFrame , CPageSetupDlg , CPadView
  • TestError() : CAutoClickDoc , ACDual::IAClick , ACDual::IDualAClick
  • TestErrorHandler() : CAutoClickDoc
  • text() : ACDual::IDualAClick
  • Tick() : CSwarm , CLlama , CLeader , CBrightLeader , CHueLeader
  • TimeFmtEnumProc() : CDateDialog
  • Timer() : TimeLib::_DTimeEvents
  • TimerCallBack() : CSpiroView
  • tip : tagSTRKFMT , tagINKINGINFO
  • ToggleMultiSelect() : CTestContainer98View
  • ToggleSelectedItem() : CServerView
  • ToolBarChange() : CStandardBar , CPaletteBar
  • top : tagRECTL
  • TrackerState : CDrawObj
  • TrackHorzPosTwips() : CRulerItem , CComboRulerItem , CTabRulerItem , CRulerItem , CComboRulerItem , CTabRulerItem
  • TransferCurrentFigure() : CSpiroDoc
  • TransferItem() : CMyTreeCtrl
  • TransformCoords() : CTestContainer98Item
  • TranslateAccelerator() : CTestContainer98Item
  • TwipsToPointString() : CSizeComboBox
  • typeAlias : CTreeItem
  • typeAliases : CTreeItem
  • typeCoClass : CTreeItem
  • typeCoClasses : CTreeItem
  • typeConstant : CTreeItem
  • typeConstants : CTreeItem
  • typeConstants2 : CTreeItem
  • TYPEDESCtoString() : CTreeItem
  • typeDispinterface : CTreeItem
  • typeDispinterfaces : CTreeItem
  • typeEnum : CTreeItem
  • typeEnums : CTreeItem
  • typeImplTypes : CTreeItem
  • typeImplTypes2 : CTreeItem
  • typeInterface : CObjectData , CTreeItem
  • typeInterfaces : CTreeItem
  • TypeKindToItemType() : CTreeItem
  • typeMethod : CTreeItem
  • typeMethods : CTreeItem
  • typeMethods2 : CTreeItem
  • typeModule : CTreeItem
  • typeModules : CTreeItem
  • typeObject : CObjectData
  • typeProperties : CTreeItem
  • typeProperties2 : CTreeItem
  • typeProperty : CTreeItem
  • typeRecord : CTreeItem
  • typeRecords : CTreeItem
  • typeStaticInterface : CObjectData
  • typeTypeInfo : CTreeItem
  • typeTypeInfo2 : CTreeItem
  • typeTypeLib : CTreeItem , CObjectData
  • typeTypeLib2 : CTreeItem
  • typeUnion : CTreeItem
  • typeUnions : CTreeItem
  • typeUnknown : CObjectData , CTreeItem
  • typeUnknown2 : CTreeItem
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- u -

  • UIActivate() : TCPropsLib::ITCExtendedControl
  • uiCmd : MSOfficeDemoKey
  • UIDeactivate() : TCPropsLib::ITCExtendedControl
  • uiFlags : tagCOLUMNSTRUCT
  • uiType : tagITEMDATA
  • units : COptionSheet
  • Unload() : CScript
  • UnlockBuffer() : CPadView
  • UnpackBytes() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • UnpackBytesHi() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • UnpackBytesLo() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • Update() : CRulerBar , CBMTest3Dlg
  • UpdateActiveItem() : CDrawView , CMainView , CDrawView
  • UpdateAllViews() : CTypeLibWnd
  • UpdateBorder() : CGDIThread
  • UpdateButton() : CFormatTabDlg
  • UpdateButtons() : CRegisterControlsDlg , CFormatTabDlg
  • UpdateContextTab() : CMainFrame
  • UpdateContextTabFromObject() : CMainFrame
  • UpdateCurrentCount() : CDriverView
  • UpdateCurrentVariant() : CDriverView
  • UpdateDefHeight() : CXlistCtrl
  • UpdateDisplay() : CCalcDlg
  • UpdateExtent() : CDrawItem , CRectItem , CDrawItem
  • UpdateFilter() : CEmpView
  • UpdateFontCombos() : CHTMLEdView
  • UpdateFonts() : COutputViewBar
  • UpdateFromServerExtent() : CTestContainer98Item , CContainerItem
  • UpdateIcons() : CTaskPane
  • UpdateInt1AndInt2() : CRecalcDoc
  • UpdateItemName() : CServerNode
  • UpdateItems() : CXlistCtrl
  • UpdateListBox() : CFormatTabDlg
  • UpdateMacroList() : CMacroDlg
  • UpdateMDITabs() : CMDITabsDemoApp , CMainFrame
  • UpdateMRUFilesList() : CMainFrame , CTaskPane
  • UpdateRegistry() : CWordPadApp
  • UpdateServerView() : CServerView
  • UpdateShapePreview() : CModalShapePropSheet
  • UpdateStatusBar() : CTestContainer98Item
  • UpdateStatusBarCountPane() : CMainFrame
  • UpdateTime() : CMainFrame
  • UpdateTitle() : CThreadView
  • UpdateToNothing() : CDriverView
  • UpdateToolbar() : CTaskPane
  • UpdateToolTips() : CRibbonListFontButton , CRibbonListButton
  • UpdateUI() : CMainFrame
  • UpdateView() : CHTMLEdView , CSourceView
  • UpdateViewFromMyObject() : CTypedPtrMapView
  • UpdateViewFromMyStruct() : CMapDWordToMyStructView
  • uPeriodCB : tagANIMATEINFO
  • UseIPointerInactive() : CTestContainer98Doc
  • UseQuickActivation() : CTestContainer98Doc
  • UseSlowDrawing() : CTestContainer98Doc
  • UseTwoPassDrawing() : CTestContainer98Doc
  • uSpeedPct : tagANIMATEINFO
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- v -

  • Verify() : CNetAddrVerifierDlg
  • VerifyFindString() : CVisualStudioDemoView
  • vffInfo : tagVS_VERSION
  • View() : CInterfaceViewer
  • vt : VARTYPE_ENTRY
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- w -

  • WalkWindowList() : CWndListDlg
  • wByteOrder : tagPROPHEADER
  • wCountry : tagRC
  • wDistinct : tagOEMPENINFO
  • wDistinctHeight : tagPENINFO , tagCALBSTRUCT
  • wDistinctWidth : tagCALBSTRUCT , tagPENINFO
  • wEventRef : tagRC
  • wFlags : tagCTLINITBEDIT , tagBOXEDITINFO , tagINKINGINFO
  • wFontHeight : tagBOXEDITINFO
  • wFormat : tagPROPHEADER
  • wHGrid : tagCTLINITIEDIT
  • WindowProc() : CToolBarCtrlPage
  • WinHelp() : CWordPadApp
  • wIntlPreferences : tagRC
  • wm : tagPDEVENT
  • WndProcHook() : CParsedEditExported
  • wOffsetX : tagCALBSTRUCT
  • wOffsetY : tagCALBSTRUCT
  • wParam : tagPDEVENT
  • wPdk : tagSTROKEINFO
  • wPDK : tagPENPACKET , tagOEM_PENPACKET
  • wPdt : tagOEMPENINFO
  • wPndts : tagPENDATAHEADER
  • wPntFirst : tagSYC
  • wPntLast : tagSYC
  • WrapChanged() : CWordPadView
  • wRcDirect : tagRC
  • wRcOrient : tagRC
  • wRcPreferences : tagRC
  • wResultMode : tagRC
  • wResultsType : tagRCRESULT
  • Write() : CPropertyBag , CTrackFile , COEMFile , CTrackFile , COEMFile
  • WriteItem() : CTestContainer98Item
  • WriteLine() : CLineFile
  • WriteNameDictToStream() : CPropertySection
  • WriteToOutput() : CIDataObjectDlg
  • WriteToStorage() : CSummInfo
  • WriteToStream() : CProperty , CPropertySection , CPropertySet , CPropertySection , CProperty , CPropertySet
  • wSizeCategory : tagCTLINITBEDIT
  • wStrokeFirst : tagSYC
  • wStrokeLast : tagSYC
  • wTabletX : tagOEM_PENPACKET , tagPENPACKET
  • wTabletY : tagPENPACKET , tagOEM_PENPACKET
  • wTimeOut : tagRC
  • wTotLen : tagVS_VERSION
  • wTryDictionary : tagRC
  • wValLen : tagVS_VERSION
  • wValueMax : tagOEMPENINFO
  • wVersion : tagPENDATAHEADER
  • wVGrid : tagCTLINITIEDIT
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- x -

  • x()
: ACDual::IDualAClick
, ACDual::IDualAutoClickPoint
  • XClientToRuler() : CRulerBar
  • XClientToTwips() : CRulerBar
  • XItem() : CRibbonListFontButton::XItem
  • XItems : CRibbonListFontButton
  • xOrigin : tagGUIDE
  • XPreviewState : CDrawView
  • XPreviewStateItem() : CDrawView::XPreviewStateItem
  • XRulerToClient() : CRulerBar
  • XRulerToTwips() : CRulerBar
  • XTwipsToClient() : CRulerBar
  • XTwipsToRuler() : CRulerBar
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- y -

  • y()
: ACDual::IDualAClick
, ACDual::IDualAutoClickPoint
  • yOrigin : tagGUIDE
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerations

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • AddressKind : CNetAddrVerifierDlg
  • controltype : CDialogItem
  • DLState : CBitmapProperty
  • EShape : CServerNode
  • ESurface : CChildView
  • ITEM_TYPE : CTreeItem
  • MDITabsType : CMDITabOptions
  • OUTLOOK_FRAME : COutlookDemoApp
  • Shape : CDrawRect
  • TrackerState : CDrawObj
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- a -

  • active : CDrawObj
  • AllKinds : CNetAddrVerifierDlg
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- l -

  • line : CDrawRect
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- m -

  • MailFrame : COutlookDemoApp
  • MainFrame : COutlookDemoApp
  • MDITabbedGroups : CMDITabOptions
  • MDITabsStandard : CMDITabOptions
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- n -

  • Named : CNetAddrVerifierDlg
  • NoKind : CNetAddrVerifierDlg
  • None : CMDITabOptions
  • normal : CDrawObj
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- b -

  • BUTTON : CDialogItem
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- d -

  • dispidAddPicItem : CXlistCtrl
  • dispidAddTextFontItem : CXlistCtrl
  • dispidAddTextItem : CXlistCtrl
  • dispidAutoSize : CImageCtrl
  • dispidCircleOffset : CCircCtrl
  • dispidCircleShape : CCircCtrl
  • dispidClear : CXlistCtrl
  • dispidEntry : CPalCtrl
  • dispidFlashColor : CCircCtrl
  • dispidHandle : CPalCtrl
  • dispidImagePath : CImageCtrl
  • dispidInterval : CTimeCtrl
  • dispidInvert : CLocalizeCtrl
  • dispidInvertFlag : CXlistCtrl
  • dispidItemBackColor : CXlistCtrl
  • dispidItemFont : CXlistCtrl
  • dispidItemForeColor : CXlistCtrl
  • dispidItemPicture : CXlistCtrl
  • dispidItemText : CXlistCtrl
  • dispidLength : CPalCtrl
  • dispidName1 : CTesthelpCtrl
  • dispidName2 : CTesthelpCtrl
  • dispidName3 : CTesthelpCtrl
  • dispidNeedlePosition : CSpindialCtrl
  • dispidNote : CCircCtrl
  • dispidPicture : CPalCtrl
  • dispidRemoveItem : CXlistCtrl
  • dispidShowToolTip : CTesthelpCtrl
  • dispidToolTipText : CTesthelpCtrl
  • dispidUseMyHelp : CTesthelpCtrl
  • dispidUsePopupHelp : CTesthelpCtrl
  • dlColorTable : CBitmapProperty
  • dlDone : CBitmapProperty
  • dlFileHeader : CBitmapProperty
  • dlInfoHeader : CBitmapProperty
  • dlNone : CBitmapProperty
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- e -

  • e16BitGeneric : CChildView
  • e16BitMMXIntrin : CChildView
  • e16BitSSE2Intrin : CChildView
  • e24BitGeneric : CChildView
  • e24BitMMXIntrin : CChildView
  • e24BitSSE2Intrin : CChildView
  • e32BitGeneric : CChildView
  • e32BitMMXIntrin : CChildView
  • e32BitSSE2Intrin : CChildView
  • EDITCONTROL : CDialogItem
  • ellipse : CDrawRect
  • eNone : CChildView
  • eventidClickIn : CCircCtrl
  • eventidClickOut : CCircCtrl
  • eventidCustomClick : CPushCtrl
  • eventidSpinPositive : CSpindialCtrl
  • eventidTimer : CTimeCtrl
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- i -

  • idActiveTabCloseButton : CWorkspaceBar
  • idCustomTooltips : CWorkspaceBar
  • IDD : CDWordArrayView , CPointArrayView , CMutexesDlg , CTesthelpPropPage , CColorPage , CMSNDlg , CMyPopupDlg , CStylePage , CDlgToolTipsDlg , CLineWeightDlg , CTimePropPage , CPenWidthsDlg , CMenuSubSetView , CDemoOptionsPage , CInfoDlg , CResourcePage , CPage1 , COptionsPage32 , COptionsPage31 , COptionsPage22 , COptionsPage21 , COptionsPage12 , COptionsPage1 , CTrayMenuDlg , CTooltipDemoView , CTasksPaneView , CTabControlView , CView3 , CStatusBarDemoView , CSetPaneSizeView , CPropSheetDemoDlg , CMyPropertyPage4 , CMyPropertyPage3 , CMyPropertyPage2 , CMyPropertyPage1 , CMailBar , CAppLookDlg , CPage6 , CPage5 , CPage4 , CSpeakNDlg , CXlistPropPage , CBkfstPage , CPage2 , CPage3 , CDinnerPage , CAnimateCtrlPage , CLunchPage , CHandleSize , CStringListView , CDesktopAlertDemoDlg , CMyCustomizationPage , CGuidGenDlg , CUnitsPage , CListDlg , CFormatTabDlg , CFormatParaDlg , CFileNewDialog , CDocOptPage , CDateDialog , CTCExtPage , CTabOrderDlg , CServicesPage , CRegisterControlsDlg , CPropertyEditRequestsPage , CPropertyChangesPage , CPropertyBagDlg , CNewAmbientPropertyDlg , CMethodDlg , CMacroDlg , CLoggingDlg , CInsertControlDlg , CInterfacesPage , CFeaturesPage , CEventLoggingPage , CContainerInfoDlg , CComponentCategoriesDlg , CAmbientPropertiesDlg , CSetTabStops , CPageSetupDlg , CSplashWnd , CAboutBox , CRegistryView , CDispatchDlg , CDataObjectDlg , CCalcDlg , CDriverView , CZoomDlg , CAddNodeDlg , CChangeNameDlg , CSummPage , CStatPage , CRectDlg , CDriverDlg , CChangeText , CAutoDrivDlg , CSchedulerDlg , CEntryInfoDlg , CInsertTableDlg , CGetURL , CPropertiesDlg , CDHtmlExploreDlg , CInputView , CEnterDlg , CButtonPropPage , CDateTimePage , CMinSize , CVarUseDlg , CMonthCalPage , CCircPropPage , CToolBarCtrlPage , CTreeCtrlPage , CIntListView , CTypedPtrArrayView , CGotoDlg , CFindDlg , CMainDlg , CAdderDialog , CListHdrDlg , CFileDlgWatcherDlg , CColorOptDlg , CToolDlg , CDlgtempDlg , CWndListDlg , CRateDlg , CDBVListView , CWclsEditDlg , CSubEditDlg , CSpinEditDlg , CDerEditDlg , CCustListDlg , CBMTest3Dlg , CBMTest2Dlg , CBMTest1Dlg , CTaskDialogTestDlg , CSpinCtrlPage , CCmnCtrl3Dlg , CProgCtrlPage , CSliderCtrlPage , CCommandLinkCtrlPage , CTypedPtrListView , CNetAddressCtrlPage , CPagerCtrlPage , CAboutDlg , CMapDWordToMyStructView , CTypedPtrMapView , CSpindialPropPage , CPushPropPage , CPalPropPage , CNetAddrVerifierDlg , CLocalizePropPage , CLicensedPropPage , CSplitButtonCtrlPage , CImagePropPage , CConfigDlg , CMapStringToStringView , CRecalcView , CSpeedDlg
  • idDisableMDIChildRedraw : CWorkspaceBar
  • idDragMDITabs : CWorkspaceBar
  • idFlatFrame : CWorkspaceBar
  • IDH : CEntryInfoDlg , CSchedulerDlg
  • idMDITabsBorderSize : CWorkspaceBar
  • idMDITabsContextMenu : CWorkspaceBar
  • idMDITabsDocMenu : CWorkspaceBar
  • idMDITabsIcons : CWorkspaceBar
  • idShowMDITabs : CWorkspaceBar
  • idTabsAutoColor : CWorkspaceBar
  • idTabsOnTop : CWorkspaceBar
  • idTabsStyle : CWorkspaceBar
  • IMGID_TYPEINFO_C : CTypeLibTreeView
  • IMGID_TYPEINFO_O : CTypeLibTreeView
  • IMGID_TYPELIB : CTypeLibTreeView
  • IPv4 : CNetAddrVerifierDlg
  • IPv6 : CNetAddrVerifierDlg
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- r -

  • rectangle : CDrawRect
  • roundRectangle : CDrawRect
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- s -

  • selected : CDrawObj
  • shapeMax : CServerNode
  • shapeOval : CServerNode
  • shapeRect : CServerNode
  • shapeRound : CServerNode
  • STATICTEXT : CDialogItem
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • d
  • e
  • i
  • l
  • m
  • n
  • r
  • s
  • t

- t -

  • typeAlias : CTreeItem
  • typeAliases : CTreeItem
  • typeCoClass : CTreeItem
  • typeCoClasses : CTreeItem
  • typeConstant : CTreeItem
  • typeConstants : CTreeItem
  • typeConstants2 : CTreeItem
  • typeDispinterface : CTreeItem
  • typeDispinterfaces : CTreeItem
  • typeEnum : CTreeItem
  • typeEnums : CTreeItem
  • typeImplTypes : CTreeItem
  • typeImplTypes2 : CTreeItem
  • typeInterface : CTreeItem , CObjectData
  • typeInterfaces : CTreeItem
  • typeMethod : CTreeItem
  • typeMethods : CTreeItem
  • typeMethods2 : CTreeItem
  • typeModule : CTreeItem
  • typeModules : CTreeItem
  • typeObject : CObjectData
  • typeProperties : CTreeItem
  • typeProperties2 : CTreeItem
  • typeProperty : CTreeItem
  • typeRecord : CTreeItem
  • typeRecords : CTreeItem
  • typeStaticInterface : CObjectData
  • typeTypeInfo : CTreeItem
  • typeTypeInfo2 : CTreeItem
  • typeTypeLib : CObjectData , CTreeItem
  • typeTypeLib2 : CTreeItem
  • typeUnion : CTreeItem
  • typeUnions : CTreeItem
  • typeUnknown : CObjectData , CTreeItem
  • typeUnknown2 : CTreeItem
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- a -

  • AboutBox() : CButtonCtrl , ButtonLib::_DButton , CCircCtrl , LocalizeLib::_DLocalize , CXlistCtrl , PalLib::_DPal , CImageCtrl , CPalCtrl , CPushCtrl , CircLib::_DCirc , LicensedLib::_DLicensed , CSpindialCtrl , CTesthelpCtrl , CLocalizeCtrl , TimeLib::_DTime , CTimeCtrl
  • AboutBoxInFrench() : LocalizeLib::_DLocalize
  • AboutBoxInGerman() : LocalizeLib::_DLocalize
  • Activate() : TCPropsLib::ITCExtendedControl
  • ActivateByTab() : CMainFrame
  • ActivateFrame() : CPadFrame , CMainFrame , CChildFrame , CMainFrame
  • ActivateRibbonContextCategory() : CMainFrame
  • ActsLikeButton() : CTestContainer98Item
  • Add() : CStringCollect , CDrawDoc , CStringCollect
  • Add_Category1() : CMainFrame
  • Add_Category2() : CMainFrame
  • Add_Category3() : CMainFrame
  • Add_Category4() : CMainFrame
  • Add_Category5() : CMainFrame
  • Add_Category6() : CMainFrame
  • Add_MainPanel() : CMainFrame
  • Add_QAT() : CMainFrame
  • AddAmbientProperty() : CTestContainer98Doc
  • AddButton() : CButtonDialog
  • AddButtons() : CButtonDialog
  • AddColorItem() : CColorListBox
  • AddCommand() : CFigure
  • AddContextTab_Chart() : CMainFrame
  • AddContextTab_Format() : CMainFrame
  • AddContextTab_Picture() : CMainFrame
  • AddContextTab_Table() : CMainFrame
  • AddControl() : CTestContainer98Doc
  • AddControlPages() : CAllControlsSheet
  • AddCountToEditTime() : CSummInfo
  • AddFont() : CFontComboBox
  • AddGroup() : CRibbonListFontButton , CRibbonListButton
  • AddIntToListBox() : CIntListView
  • AddItem() : CXlistCtrl , CObjListView , CIDataObjectDlg , CTestContainer98Doc
  • AddLine() : CNotifyShowCase
  • AddMainCategory() : CMainFrame
  • AddMapEntryToListBox() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView
  • AddMRUEntry() : CMacroComboBox
  • AddMyObjectToListBox() : CTypedPtrArrayView
  • AddMyStructToListBox() : CTypedPtrListView
  • AddNamedItem() : CScript , CScriptManager
  • AddNamedItems() : CScriptManager
  • AddNotification() : CTabControlView
  • AddOption() : CComboBoxExProp
  • AddPanelArrange() : CMainFrame
  • AddPicItem() : CXlistCtrl
  • AddPoint() : CDrawPoly
  • AddPointToListBox() : CPointArrayView
  • AddProperty() : CPropertySection , CPropertySet , CPropertySection , CPropertySet
  • AddSection() : CPropertySet
  • AddShape() : CShapesDoc
  • AddString() : CListOutputFrame , CHistoryList
  • AddSubMenu() : CMyMenuBar
  • AddTab() : COutputBar
  • AddTab_Developer() : CMainFrame
  • AddTab_Home() : CMainFrame
  • AddTab_Insert() : CMainFrame
  • AddTab_Mailings() : CMainFrame
  • AddTab_PageLayout() : CMainFrame
  • AddTab_References() : CMainFrame
  • AddTab_Review() : CMainFrame
  • AddTab_View() : CMainFrame
  • AddTabToArray() : CFormatTabDlg
  • AddTextFontItem() : CXlistCtrl
  • AddTextItem() : CXlistCtrl
  • AddToListBox() : CMutexesDlg
  • AddURLToHistory() : CIEDemoDoc
  • AddWorkSpace() : CMainFrame
  • AdjusrHorzScroll() : COutputViewBar , COutputBar
  • AdjustButtonRect() : CTwoButtonsProp
  • AdjustClientArea() : CMainFrame
  • AdjustColorsMenu() : CMainFrame
  • AdjustDockingLayout() : CMainFrame
  • AdjustHour() : CSchedulerDlg
  • AdjustItemPosition() : CMainDoc
  • AdjustLayout() : CClassViewBar , CDynamicHelpViewBar , CFileViewBar , CWorkspaceToolBar , CWorkspaceBar , CPropertiesViewBar
  • AdjustLocations() : CToolsPalette
  • AdjustObjectSubmenu() : CMainFrame
  • AdjustRect() : CTestContainer98Item
  • AdjustWidth() : CSSE2Surface24Intrinsic , CMailBar , CMMXSurface16Intrinsic , CSSE2Surface16Intrinsic , CSSE2Surface32Intrinsic , CSurface , CMMXSurface32Intrinsic
  • AdvanceLesson() : CSpeakNDlg
  • AdvanceTrace() : CRing , CBasePiece , CWheel
  • AllocValue() : CProperty
  • AllowChangeTextLabels() : CLinksBar
  • AllowShowOnList() : CFileViewToolBar , CToolsPalette , CHelpToolBar , COutputToolBar , CPropertiesToolBar , CWorkspaceToolBar , CClassToolBar , CPropertiesToolBar
  • AllowShowOnPaneMenu() : CMailBar , CMyOutlookBar
  • AndNot() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • AppendColorMenuItem() : CColorMenu
  • Apply() : CTCExtPage
  • ApplyChanges() : CAnimateCtrlPage
  • AttachCustomMenu() : CTestWindow
  • AutoSize() : CImageCtrl
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- k -

  • Kick() : CLlama
  • KillThread() : CGDIThread
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- l -

  • LimitText() : CLocalComboBox
  • Line() : CSurface
  • LineInRect() : CSpiroRect
  • Load() : CSSE2Unsigned16Saturated , CFavoritesManager , CMDITabOptions
  • LoadAbbrevStrings() : CWordPadApp
  • LoadBitmaps() : COle2ViewApp
  • LoadCaption() : CLocalizeCtrl
  • LoadCustomState() : CVisualStudioDemoApp
  • LoadDockState() : CDocOptions
  • LoadFrame() : CMailFrame , CMainFrame
  • LoadFromMoniker() : CMFCBindCntrItem
  • LoadLesson() : CSpeakNDlg
  • LoadMaskedBitmap() : CRulerItem
  • LoadMSMCaptionButtonsIcons() : CMSMVisualManager
  • LoadOptions() : CDocOptions , CWordPadApp
  • LoadRegistrySettings() : CTestContainer98App
  • LoadScript() : CScriptManager , CScript
  • LoadToolBar() : CMSMToolBar
  • LoadU() : CSSE2Unsigned16Saturated
  • Locate() : CServerView
  • LockBuffer() : CPadView
  • LockInPlaceActive() : CTestContainer98Item
  • Log() : CTestContainer98Doc
  • LogEditRequests() : CMethodInfo
  • LogEvent() : CCustomFileDialog , CMethodInfo
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- m -

  • MakeNewBall() : CBounceWnd , CBounceView
  • MakeShortString() : CListViewEx
  • MapType() : CWordPadDoc
  • MatchDocType() : CHierSvrDocTemplate
  • MatchFont() : CFontComboBox
  • MeasureItem() : CXlistCtrl , CColorMenu , CColorListBox , CCustomList , CColorMenu , CFontComboBox , CIconComboBox
  • MixColors() : CBounceView , CHelloView
  • ModifyHeaderItems() : CListHdrDlg
  • MonikerBindToObject() : CTCBindHost
  • MonikerBindToStorage() : CTCBindHost
  • Move() : CRectItem , CTestContainer98Item
  • MoveFigure() : CFigure
  • MoveHandleTo() : CDrawObj , CDrawRect , CDrawPoly , CDrawRect
  • MovePiece() : CWheel , CBasePiece
  • MoveTo() : CDrawPoly , CDrawObj , CDrawPoly , CDrawObj , CDrawPoly , CDrawOleObj
  • MSMDrawCaptionButton() : CMSMVisualManager
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- n -

  • Name() : TCPropsLib::ITCExtendedControl
  • NeedText() : CPaletteBar , CStandardBar
  • NewControlsPropSheet() : NewControlsPropSheet
  • NewDocument() : CSourceView
  • NewStroke() : CScribbleDoc
  • Next() : CEnumVariant
  • NotifyCommand() : CFindComboButton
  • NotifyHighlightListItem() : CRibbonTableButton
  • NotifyOwner() : CFormatBar
  • NotifyPrinterChanged() : CWordPadApp
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- o -

  • ObjectAt() : CDrawDoc
  • On10newballs() : CThreadView
  • On10newlines() : CThreadView
  • On10newrectangles() : CThreadView
  • On25newballs() : CThreadView
  • On25newlines() : CThreadView
  • On25newrectangles() : CThreadView
  • OnAbout() : CMainWindow , CListHdrDlg
  • OnActivate() : CTestContainer98Item , CDrawItem , CMainFrame , CFolderListPopupWnd , CMailFrame , CMainFrame , CContainerItem , CShapePropSheetFrame , CDrawItem , CMFCBindCntrItem , CRectItem
  • OnActivateApp() : CFolderListPopupWnd
  • OnActivateUI() : CTestContainer98Item
  • OnActivateView() : CDibView , CColorView , CHTMLEdView , CSourceView , CDrawView , CExplorerView
  • OnAdd() : CIntListView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CDriverView , CDWordArrayView
  • OnAddNode() : CServerView
  • OnAddOrUpdate() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView
  • OnAddressBook() : COutlookDemoDoc
  • OnAltdrag() : CToolBarCtrlPage
  • OnAlways() : CPropertyEditRequestsPage
  • OnAmbientPropertyChange() : CLocalizeCtrl , CTimeCtrl , CXlistCtrl , CTestContainer98Item
  • OnAnimatePos() : CAutoDrivDlg
  • OnAnimateXY() : CAutoDrivDlg
  • OnAnimation() : CTasksPaneView
  • OnAnyChange() : CSpinCtrlPage
  • OnAppAbout() : CTestApp , CDBVListApp , CDibLookApp , CDockApp , CDynaMenuApp , CMdiApp , CMDIApp , CMMXSwarmApp , CMultiPadApp , CNotepadApp , CPropDlgApp , CRowListApp , CScribbleApp , CCImageApp , CSnapApp , CSpiroApp , CTrackerApp , CViewExApp , CHTMLEditApp , CMfcieApp , CAutoClickApp , CDrawApp , CServerApp , CInProcApp , CDriveApp , CMFCBindApp , COleClientApp , CIViewersApp , CTypeLibWnd , COle2ViewApp , CTheApp , CTestContainer98App , CWordPadApp , CCustomPagesApp , CDrawApp , CDynamicMenuApp , CExplorerApp , CIEDemoApp , CMDITabsDemoApp , CMenuSubSetApp , CMSMoneyDemoApp , CMSOffice2007DemoApp , COutlookDemoApp , COutlookMultiViewsApp , COwnerDrawMenuApp , CCollectApp , CPaletteDemoApp , CRebarTestApp , CCubeApp , CRibbonGadgetsApp , CRibbonMDIDemoApp , CHuskApp , CRollupPaneApp , CSetPaneSizeApp , CScreenCapApp , CSliderApp , CStateCollectionApp , CThreadApp , CStatusBarDemoApp , CTabbedViewApp , CMdiApp , CTabControlApp , CTasksPaneApp , CRecalcApp , CToolbarDateTimePickerApp , CTooltipDemoApp , CContainerApp , CTrayMenuDlg , CVisualStudioDemoApp , CCtrlbarsApp , CWordPadApp , CWorkSpaceToolBarApp
  • OnAppExit() : CTrayMenuDlg
  • OnAppLook() : CMainFrame , CAppLookDlg , CMainFrame , CAppLookDlg
  • OnApply() : CSpinCtrlPage , CAppLookDlg
  • OnApplyNow() : CModalShapePropSheet
  • OnApplyParams() : CTooltipDemoView
  • OnApplyScale() : COlePropertiesEx
  • OnAppOpen() : CTrayMenuDlg
  • OnAskQuestion() : CMainFrame
  • OnAutoArrange() : CListHdrDlg
  • OnAutoClose() : CDesktopAlertDemoDlg
  • OnAutoplay() : CAnimateCtrlPage
  • OnAutoSizeChanged() : CImageCtrl
  • OnAutoticks() : CSliderCtrlPage
  • OnBackColor() : CStatusBarDemoView
  • OnBadInput() : CParsedEdit
  • OnBarKillFocus() : CWordPadView
  • OnBarReturn() : CWordPadView
  • OnBarSetFocus() : CWordPadView
  • OnBarState() : CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • OnBasic() : CVarUseDlg
  • OnBeforeNavigate2() : CMfcieView , CIEDemoView
  • OnBeginDrag() : CMyTreeCtrl , CMyListCtrl
  • OnBeginPrinting() : CCollectView , CRecalcView , CContainerView , CDynaMenuView , CNotepadView , CShapesView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawView , CPadView , CCustomPagesView , CDrawView , CDynamicMenuView , CIEDemoView , CMDITabsDemoView , CMenuSubSetView , CMSMoneyDemoView , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWorkSpaceToolBarView
  • OnBlack() : CSpiroView
  • OnBlockFmtDropdown() : CMainFrame
  • OnBlue() : CSpiroView
  • OnBnClickedBrowse() : CConfigDlg
  • OnBnClickedButton1() : CNetAddrVerifierDlg , CTaskDialogTestDlg
  • OnBnClickedButton2() : CTaskDialogTestDlg
  • OnBnClickedButton3() : CTaskDialogTestDlg
  • OnBnClickedButton4() : CTaskDialogTestDlg
  • OnBnClickedButton5() : CTaskDialogTestDlg
  • OnBnClickedButton6() : CTaskDialogTestDlg
  • OnBnClickedButton7() : CTaskDialogTestDlg
  • OnBnClickedButton8() : CTaskDialogTestDlg
  • OnBnClickedButtonValidate() : CNetAddressCtrlPage
  • OnBnClickedCheckElev() : CCommandLinkCtrlPage
  • OnBnClickedCheckState() : CSplitButtonCtrlPage
  • OnBnClickedClearLog() : CFileDlgWatcherDlg
  • OnBnClickedCreateDlg() : CFileDlgWatcherDlg
  • OnBnClickedSetButtonNote() : CCommandLinkCtrlPage
  • OnBnClickedSetButtonSize() : CPagerCtrlPage
  • OnBnClickedSetMenu1() : CSplitButtonCtrlPage
  • OnBnClickedSetMenu2() : CSplitButtonCtrlPage
  • OnBnClickedSetSize() : CSplitButtonCtrlPage
  • OnBnClickedSplitButton() : CSplitButtonCtrlPage
  • OnBorderType() : CWordPadView
  • OnBounce() : CMainFrame
  • OnBrowse() : CAnimateCtrlPage , CDHtmlExploreDlg , CCustomEditListBox , CMyBrowseEdit
  • OnBtnSetHeightInPixels() : CSetPaneSizeView
  • OnBtnSetWidthInPixels() : CSetPaneSizeView
  • OnButton() : CPage1
  • OnButton1() : CDriverView , CMSNDlg , CMyPopupDlg
  • OnButton2() : CDriverView
  • OnButtonCancel() : CEntryInfoDlg
  • OnButtonClear() : CEntryInfoDlg
  • OnButtonClearAll() : CSchedulerDlg
  • OnButtonDelete() : CEntryInfoDlg
  • OnButtonGet() : CPage4
  • OnButtonInformation() : CDlgtempDlg
  • OnButtonMenu() : CPage1
  • OnButtonModify() : CEntryInfoDlg
  • OnButtonSave() : CEntryInfoDlg
  • OnButtonSetContainerSize() : CSetPaneSizeView
  • OnButtonSetDlgBarSize() : CSetPaneSizeView
  • OnButtonUp() : CMyTreeCtrl , CMyListCtrl
  • OnCalcSize() : CPagerCtrlPage
  • OnCalculateSize() : CMSMCategoryBarButton , CMSMLinksBarButton , CLineStyleMenuItem , CSliderButton
  • OnCallTimerTick() : CSpiroView
  • OnCancel() : CModelessDialog , CCustomFileDialog , CAdderDialog , CGotoDlg , CDrawTool , CPolyTool , CCalcDlg , CDrawTool , CPolyTool
  • OnCancelEdit() : CDrawView
  • OnCancelEditCntr() : CContainerView , CMFCBindView , CTestContainer98View
  • OnCancelEditSrvr() : CScribbleView , CWordPadView
  • OnCancelInplace() : CServerDoc , CMainView , CPadDoc
  • OnCancelMode() : CLocalizeCtrl , CTestContainer98View , CFolderListPopupWnd
  • OnCaptionicon() : CTasksPaneView
  • OnCaptureChanged() : CTestContainer98View
  • OnCategorie() : CMainFrame
  • OnCbnSelchangeBackColor() : CPagerCtrlPage
  • OnCenter() : CAnimateCtrlPage
  • OnChange() : CContainerItem , CDrawItem , CChangeNameDlg , CAddNodeDlg , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CDrawItem
  • OnChangeActiveTab() : CTabControlView , CClassViewBar
  • OnChangeAlign() : CListHdrDlg
  • OnChanged() : CTestContainer98Item
  • OnChangeData() : CMainDoc
  • OnChangedSel() : CGuidGenDlg
  • OnChangeEdselrange() : CMonthCalPage
  • OnChangeFolder() : CExplorerView
  • OnChangeItemPosition() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CDrawItem
  • OnChangeLayout() : CMainFrame
  • OnChangeLook() : CMailFrame , CMainFrame
  • OnChangeMargins() : CTasksPaneView
  • OnChangeName() : CServerView
  • OnChangeObjectProps() : CShapesView
  • OnChangeParentWnd() : CSliderButton , CUndoButton
  • OnChangeRibbonCategory() : CMainFrame
  • OnChangeSize() : CChildView
  • OnChangeSort() : CListHdrDlg
  • OnChangeStyle() : CMainFrame
  • OnChangeSystemIcon() : CPage6
  • OnChangeView() : CListHdrDlg
  • OnChangeVisualStyle() : CClassViewBar , CDynamicHelpViewBar , CFileViewBar , CPropertiesViewBar , CResourceViewBar
  • OnChangingActiveTab() : CTabControlView
  • OnChar() : CParsedEdit , CMainView , CTestContainer98View
  • OnCharColor() : CInPlaceFrame , CMainFrame , CWordPadView
  • OnCharStrikeThrough() : CMSOffice2007DemoView
  • OnChildNotify() : CStandardBar , CPaletteBar , CEmpView
  • OnChooseColor() : CAmbientPropertiesDlg , CMethodDlg
  • OnChooseFont() : CPadView , CAmbientPropertiesDlg , CMethodDlg
  • OnChoosePrintFont() : CPadView
  • OnCircleShapeChanged() : CCircCtrl
  • OnCkappcanparse() : CDateTimePage
  • OnCkdaystate() : CMonthCalPage
  • OnCklongdateformat() : CDateTimePage
  • OnCknotoday() : CMonthCalPage
  • OnCknotodaycircle() : CMonthCalPage
  • OnCkshortdateformat() : CDateTimePage
  • OnCkshownone() : CDateTimePage
  • OnCktimeformat() : CDateTimePage
  • OnCkupdown() : CDateTimePage
  • OnCkweeknumbers() : CMonthCalPage
  • OnClassAddMemeberFunction() : CClassViewBar
  • OnClassAddMemeberVariable() : CClassViewBar
  • OnClassDefinition() : CClassViewBar
  • OnClassProperties() : CClassViewBar
  • OnClear() : COutputWindowView
  • OnClickButton() : CTwoButtonsProp , CCustomDlgProp
  • OnClickCalendar() : CSchedulerDlg
  • OnClickedClear() : CCalcDlg , CFormatTabDlg
  • OnClickedClearAll() : CFormatTabDlg
  • OnClickedDivide() : CCalcDlg
  • OnClickedEqual() : CCalcDlg
  • OnClickedMinus() : CCalcDlg
  • OnClickedNumber() : CCalcDlg
  • OnClickedPlus() : CCalcDlg
  • OnClickedSet() : CFormatTabDlg
  • OnClickedTimes() : CCalcDlg
  • OnClickFile() : CDHtmlExploreDlg
  • OnClickFolder() : CDHtmlExploreDlg
  • OnClickName() : CCheckBoxProp
  • OnClickNewElements() : CSchedulerDlg
  • OnClickTime() : CSchedulerDlg
  • OnClickTimeDesc() : CSchedulerDlg
  • OnClose() : CMutexesDlg , CModelessMain , CWndListDlg , CMainFrame , CShapePropSheetFrame , CAutoDrivDlg , CTypeLibWnd , CMainFrame , CMSOffice2007DemoDoc , CMailFrame , CMainFrame
  • OnCloseDocument() : CHTMLEdDoc , CMFCBindDoc , COle2ViewDoc , CWordPadDoc
  • OnCloseFoldersPopup() : CMainFrame
  • OnClosePopup() : CDesktopAlertDemoDlg
  • OnCloseup() : CGetURL
  • OnCmdMsg() : CMainFrame , CBounceMDIChildWnd , CDynaMenuDoc , CMainFrame , CWordPadDoc
  • OnCmultiselect() : CMonthCalPage
  • OnCollapsegroups() : CTasksPaneView
  • OnColor() : CHelloView , CBounceWnd , CHelloWnd , CBounceWnd , CHelloWnd , CBounceView , CHelloView , CTabControlView
  • OnColorBar() : CPage2
  • OnColorBar2() : CPage2
  • OnColorClicked() : CColorPage
  • OnColorDlg() : CPage2
  • OnColorGrouptext() : CTasksPaneView
  • OnColorGrouptexthot() : CTasksPaneView
  • OnColorOptions() : CDynaMenuDoc
  • OnColorPalette() : CPage2
  • OnColorPick() : CWordPadView
  • OnColorPicker() : CPage2
  • OnColorRows() : CPage5
  • OnColorTasktext() : CTasksPaneView
  • OnColorTasktexthot() : CTasksPaneView
  • OnColumnClick() : CEmpView
  • OnComboCloseUp() : CFormatBar
  • OnComboSetFocus() : CFormatBar
  • OnCommand() : CTestWindow , CButtonDialog , CMSMCaptionBar , CMainFrame , CButtonDialog , CMainFrame
  • OnCommand1() : CWorkspaceBar
  • OnCommand2() : CWorkspaceBar
  • OnCommand3() : CWorkspaceBar
  • OnCommandControlClick() : CNextWizardDialog , CWizardDialog
  • OnCommandHelp() : CObjTreeView , CMyListBox
  • OnCommandHistory() : CExplorerDoc
  • OnCompareItems() : CMyListCtrl
  • OnContact() : CResourcePage
  • OnContainerAmbientProperties() : CTestContainer98Doc
  • OnContainerInfo() : CTestContainer98Doc
  • OnContainerOptions() : CTestContainer98Doc
  • OnContainerTabOrder() : CTestContainer98Doc
  • OnContextBrowse() : CDHtmlExploreDlg
  • OnContextExit() : CDHtmlExploreDlg
  • OnContextMenu() : COwnerDrawMenuView , CRibbonGadgetsView , CRibbonMDIDemoView , CSetPaneSizeView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CView2 , CView3 , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CClassViewBar , CFileViewBar , COutputList1 , COutputList , CResourceViewBar , CWordPadView , CWorkSpaceToolBarView , CDrawView , CAmbientPropertiesDlg , CComponentCategoriesDlg , CContainerInfoDlg , CEventLoggingPage , CFeaturesPage , CInterfacesPage , CInsertControlDlg , CLoggingDlg , CMacroDlg , CMethodDlg , CNewAmbientPropertyDlg , COutputWindowView , CPropertyBagDlg , CPropertyChangesPage , CPropertyEditRequestsPage , CRegisterControlsDlg , CServicesPage , CTabOrderDlg , CTestContainer98View , CCustomPagesView , CDrawView , CDynamicMenuView , CMDITabsDemoView , CMenuSubSetView , CMSMCaptionBar , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3
  • OnContextMenuAction() : CHTMLEdView
  • OnContextProperties() : CDHtmlExploreDlg
  • OnControlActivate() : CTestContainer98View
  • OnControlDeactivate() : CTestContainer98View
  • OnControlDrawMetaFile() : CTestContainer98View
  • OnControlInfoChanged() : CTestContainer98Item
  • OnControlInvokeMethods() : CTestContainer98View
  • OnControlLogging() : CTestContainer98View
  • OnControlSaveToPropertyBag() : CTestContainer98View
  • OnControlSaveToStorage() : CTestContainer98View
  • OnControlSaveToStream() : CTestContainer98View
  • OnControlsDblClk() : CInsertControlDlg
  • OnControlsSelChange() : CInsertControlDlg
  • OnControlUIActivate() : CTestContainer98View
  • OnControlUIDeactivate() : CTestContainer98View
  • OnCopy() : COutputWindowView
  • OnCopyTo() : CExplorerView
  • OnCreate() : CMainFrame , CCubeView , CMainFrame , CListOutputFrame , CMainFrame , CThreadView , CBounceWnd , CMainFrame , CBounceWnd , CBounceView , CMainFrame , CTBComboBox , CMainFrame , CShapePropSheetFrame , CMainFrame , CInPlaceFrame , CMainFrame , CAddressCombo , CEditToolbar , CMainFrame , CSourceView , CMainFrame , CAutoDrivDlg , CMainFrame , CAutoDrivDlg , CMainFrame , CDrawView , CMainFrame , CInPlaceFrame , CMainFrame , CServerView , CMainFrame , CObjListView , CMainFrame , CMainView , CTypeLibListView , CTypeLibTreeView , CTypeLibWnd , CMainFrame , CObjTreeView , CDropTargetView , CInPlaceFrame , CMainFrame , CPadView , CMainFrame , COutputWindowView , CTestContainer98View , CButtonDialog , CLocalComboBox , CFormatBar , CInPlaceFrame , CMainFrame , CWordPadView , CMainFrame , CDrawView , CMainFrame , CPropertiesViewBar , CMainFrame , CExplorerView , CFolderBar , CMainFrame , CExplorerBar , CLinksBar , CMainFrame , CWorkspaceBar , CMainFrame , CMSMCategoryBar , CMSMMenuBar , CMSMoneyDemoView , CMSMTasksPane , CMSMToolBar , CMainFrame , CRibbonTooltipCtrl , CTaskPane , CCalendarBar , CFolderListBar , CFolderListPopupWnd , CFoldersTree , CMailFrame , CMainFrame , COutlookDemoView , CMainFrame , COutputBar , CRibbonGadgetsView , CMainFrame , COutputBar , CWorkspaceBar , CWorkspaceBar2 , CMainFrame , CWorkspaceBar , CMainFrame , COutputBar , CWorkspaceBar , CMainFrame , CTabbedViewView , CMainFrame , CTaskPane , CMainFrame , CMyToolTipCtrl , CChildFrame , CClassViewBar , CDynamicHelpViewBar , CFileViewBar , CMainFrame , COutputBar , COutputViewBar , CPropertiesViewBar , CResourceViewBar , CUndoBar , CUndoMenu , CWatchBar , CButtonDialog , CInPlaceFrame , CMainFrame , CRulerBar , CTaskPane , CWordPadView , CMainFrame , CWorkspaceBar
  • OnCreateClient() : CMainFrame , CChildFrame , CSplitterFrame , C3WaySplitterFrame , CMainFrame , CSplitFrame , CMainFrame , CSplitFrame , CTypeLibWnd , CMainFrame , CSplitFrame , CMainFrame
  • OnCreateControlBars() : CInPlaceFrame
  • OnCreated() : CMMXSurface32Intrinsic , CMMXSurface24Intrinsic , CMMXSurface16Intrinsic , CSSE2Surface32Intrinsic , CSSE2Surface24Intrinsic , CSSE2Surface16Intrinsic , CSurface
  • OnCtlColor() : CTCSplitter , CMailBar
  • OnCurrency() : CVarUseDlg
  • OnCustom() : CHelloView
  • OnCustomColor() : CHelloView , CBounceWnd , CHelloWnd , CBounceWnd , CHelloWnd , CBounceView
  • OnDataAvailable() : CBitmapProperty
  • OnDataChange() : CInputView
  • OnDate() : CVarUseDlg , CMainFrame
  • OnDblClk() : CCheckBoxProp
  • OnDblclkDatedialogList() : CDateDialog , CFileNewDialog , CDateDialog , CFileNewDialog
  • OnDblClkFormatEtc() : CIDataObjectDlg
  • OnDDECommand() : CWordPadApp
  • OnDeactivate() : CTestContainer98Item
  • OnDeactivateUI() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CWordPadDoc , CDrawItem , CWordPadDoc
  • OnDefaultPenWidths() : CPenWidthsDlg
  • OnDefWindowMessage() : CTestContainer98Item
  • OnDelegatedCmdMsg() : CBounceWnd
  • OnDelete() : CMyPopupDlg
  • OnDeleteItemTreeView() : CRegistryView
  • OnDeleteScheduleDisplay() : CSchedulerDlg
  • OnDeltaposSpinAfter() : CFormatParaDlg
  • OnDeltaposSpinBefore() : CFormatParaDlg
  • OnDemoDemo1() : CMenuSubSetView
  • OnDemoDemo2() : CMenuSubSetView
  • OnDemoIt() : CDlgtempDlg
  • OnDemoThread() : CRecalcDoc
  • OnDescriptionArea() : CPage5
  • OnDeselect() : CTestContainer98Item
  • OnDestroy() : CCubeView , CThreadView , CBounceWnd , CTimeCtrl , CMyTreeCtrl , CChildView , CDrawView , CMFCBindView , CObjListView , CMainView , CIDataObjectDlg , CTypeLibListView , CTypeLibODLView , CTypeLibTreeView , CTypeLibWnd , CMainFrame , CObjTreeView , CMainFrame , CTestContainer98View , CFontComboBox , CFormatBar , CInPlaceFrame , CWordPadView , CDrawView , CFolderBar , CIEDemoView , CMSOffice2007DemoView , CPage6 , COutputBar , CRibbonGadgetsView , CTasksPaneView , CInPlaceFrame , CWordPadView
  • OnDevModeChange() : CMainFrame
  • OnDhelp1() : CDynamicHelpViewBar
  • OnDhelp2() : CDynamicHelpViewBar
  • OnDhelp3() : CDynamicHelpViewBar
  • OnDialogAbout() : CPage1
  • OnDisabledDragDrop() : CTreeCtrlPage
  • OnDisableUpdate() : CStartView
  • OnDisplayChanged() : CHTMLEdView
  • OnDocumentComplete() : CDHtmlExploreDlg , CGetURL , CHTMLEdView , CMfcieView , CEntryInfoDlg , CSchedulerDlg , CIEDemoView
  • OnDoGetData() : CIDataObjectDlg
  • OnDoRealize() : CDibView
  • OnDotNetLook() : CPage5
  • OnDragEnter() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDragLeave() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDragOver() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDraw() : CCollectView , CCubeView , CHelloView , CThreadView , CButtonCtrl , CCircCtrl , CContainerView , CImageCtrl , CLicensedCtrl , CLocalizeCtrl , CPalCtrl , CPushCtrl , CSpindialCtrl , CTesthelpCtrl , CTimeCtrl , CXlistCtrl , CDibView , CDockView , CDynaMenuView , CBounceView , CHelloView , CNotepadView , CShapesView , CScribbleItem , CScribbleView , CSnapView , CSpiroView , CTrackerView , CTextView , CColorView , CSourceView , CMfcieView , CAutoClickView , CDrawView , CServerItem , CServerView , CMFCBindView , CObjListView , CMainView , CTypeLibListView , CTypeLibODLView , CTypeLibTreeView , CObjTreeView , CEmbeddedItem , COutputWindowView , CTestContainer98View , CEmbeddedItem , CCustomPagesView , CMSNDlg , CDrawView , CDynamicMenuView , CExplorerView , CIEDemoView , CToolbarLabel , CMDITabsDemoView , CMSMCaptionBarButton , CMSMCategoryBarButton , CMSMLinksBarButton , CMSMoneyDemoView , COutlookDemoView , CPreviewPane , COutlookMultiViewsView , CView1 , CView2 , CView3 , CLineStyleMenuItem , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonGadgetsView , CRibbonMDIDemoView , CRollupPaneView , CSliderButton , CSliderView , CStateCollectionView , CTabbedViewView , CView1 , CView2 , CView3 , CView4 , CToolbarLabel , CToolbarDateTimePickerView , CClassViewMenuButton , CStartView , CEmbeddedItem , CWorkSpaceToolBarView
  • OnDrawButton() : CCheckBoxProp , CTwoButtonsProp
  • OnDrawButtonBorder() : CMSMVisualManager
  • OnDrawCheckBox() : CCheckBoxProp
  • OnDrawComboBorder() : CMSMVisualManager
  • OnDrawComboDropButton() : CMSMVisualManager
  • OnDrawDescription() : COwnerDrawDescrProp
  • OnDrawEllipse() : CDrawView
  • OnDrawEx() : CEmbeddedItem
  • OnDrawIcon() : CCustomToolTipCtrl , CRibbonTooltipCtrl , CMyToolTipCtrl
  • OnDrawItem() : CIDataObjectDlg , CIconCombo
  • OnDrawLine() : CDrawView
  • OnDrawMenuBorder() : CMSMVisualManager
  • OnDrawMenuImage() : CMainFrame
  • OnDrawName() : CCheckBoxProp
  • OnDrawPageHeader() : CDemoOptionsPropSheet , CMyPropertySheet
  • OnDrawPaletteIcon() : CRibbonListButton , CRibbonListFontButton , CRibbonTableButton
  • OnDrawPattern() : CSpiroView
  • OnDrawPolygon() : CDrawView
  • OnDrawPopupWindowBorder() : CMSNVisualManager
  • OnDrawPopupWindowCaption() : CMSNVisualManager
  • OnDrawRect() : CDrawView
  • OnDrawRoundRect() : CDrawView
  • OnDrawSelect() : CDrawView
  • OnDrawSeparator() : CMSMVisualManager , CMyToolTipCtrl
  • OnDrawTask() : CMSMVisualManager
  • OnDrawTasksGroupAreaBorder() : CMSMVisualManager
  • OnDrawUsingFont() : CPage3
  • OnDrawValue() : CCheckBoxProp , CIconListProp
  • OnDrop() : CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView
  • OnDropDown() : CMainFrame
  • OnDropFiles() : CMainFrame
  • OnDropPiece() : CSpiroView
  • OnDropRing() : CSpiroView
  • OnDropWheel() : CSpiroView
  • OnDTNotify() : CDateTimePage
  • OnDummy() : CMainFrame
  • OnDummyBuild() : CVisualStudioDemoDoc
  • OnDummyClean() : CVisualStudioDemoDoc
  • OnDummyCompile() : CFileViewBar , CVisualStudioDemoDoc
  • OnDummyExecute() : CVisualStudioDemoDoc
  • OnDummyGo() : CVisualStudioDemoDoc
  • OnDummyRebuildAll() : CVisualStudioDemoDoc
  • OnDummyRemoveAllBreakpoints() : CVisualStudioDemoDoc
  • OnDummySelectActiveConfiguration() : CVisualStudioDemoDoc
  • OnDumpClasses() : CHuskApp
  • OnDumpDLLs() : CHuskApp
  • OnDumpDocTemplates() : CHuskApp
  • OnDumpObjects() : CHuskApp
  • OnDynamicItem1() : CMainFrame
  • OnDynamicItem2() : CMainFrame
  • OnEdit() : CCheckBoxProp , CComboBoxExProp
  • OnEditAllowInvert() : CTrackerDoc
  • OnEditBarNotify() : CHTMLEdView
  • OnEditBringToFront() : CTestContainer98View
  • OnEditChange() : CPadView , CFormatTabDlg , CWordPadView , CMSOffice2007DemoView , CFormatTabDlg , CWordPadView
  • OnEditChangetext() : CAutoClickDoc
  • OnEditClear() : CListOutputFrame , CContainerView , CDrawView , CServerView , CMainView , CTestContainer98View , CDrawView , CFileViewBar , COutputList1 , COutputList , CResourceViewBar
  • OnEditClearAll() : CScribbleDoc , CMainDoc
  • OnEditClone() : CMainView
  • OnEditControlInformation() : CDlgtempDlg
  • OnEditCopy() : CListOutputFrame , CContainerView , CDibView , CNotepadView , CScribbleDoc , CDrawView , CServerView , CMainView , CPadView , CTestContainer98View , CDrawView , COutputBar , CChildFrame , CFileViewBar , COutputList1 , COutputList , CResourceViewBar
  • OnEditCut() : CListOutputFrame , CDrawView , CServerView , CMainView , CPadView , CTestContainer98View , CDrawView , CChildFrame , CFileViewBar , CResourceViewBar
  • OnEditDeleteAll() : CTestContainer98Doc
  • OnEditDottedline() : CTrackerDoc
  • OnEditFind() : CNotepadView
  • OnEditFindCombo() : CMainFrame
  • OnEditFindNext() : CFindDlg
  • OnEditGoto() : CNotepadView
  • OnEditHatchedborder() : CTrackerDoc
  • OnEditHatchedinside() : CTrackerDoc
  • OnEditImage() : CPage3
  • OnEditInsertControlFromStorage() : CTestContainer98View
  • OnEditInsertFromStream() : CTestContainer98View
  • OnEditLabels() : CTreeCtrlPage , CListHdrDlg
  • OnEditMyItem1() : CMainFrame
  • OnEditMyItem2() : CMainFrame
  • OnEditPaste() : CContainerView , CDibView , CNotepadView , CDrawView , CServerView , CTestContainer98View , CDrawView , CChildFrame , CResourceViewBar
  • OnEditPasteSpecial() : CChildFrame
  • OnEditProperties() : CDrawObj , CDrawOleObj , CDrawTool , CSelectTool , CDrawView , CTestContainer98View , CDrawObj , CDrawOleObj , CDrawTool , CSelectTool
  • OnEditResizeinside() : CTrackerDoc
  • OnEditResizeoutside() : CTrackerDoc
  • OnEditSelectAll() : CDrawView , CTestContainer98View , CDrawView
  • OnEditSendToBack() : CTestContainer98View
  • OnEditSolidline() : CTrackerDoc
  • OnEditTogglebreakpoint() : CVisualStudioDemoView
  • OnEditUndo() : CMSOffice2007DemoView
  • OnEnable() : CMailFrame , CMainFrame
  • OnEnabled() : CAmbientPropertiesDlg
  • OnEnabledChanged() : CTimeCtrl
  • OnEnablesel() : CSliderCtrlPage
  • OnEnChangeNetaddress() : CNetAddressCtrlPage
  • OnEndDrawing() : CSpiroView
  • OnEndLabelEdit() : CMyTreeCtrl , CMyListCtrl
  • OnEndPrinting() : CCollectView , CRecalcView , CContainerView , CDynaMenuView , CNotepadView , CShapesView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawView , CCustomPagesView , CDrawView , CDynamicMenuView , CIEDemoView , CMDITabsDemoView , CMenuSubSetView , CMSMoneyDemoView , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWorkSpaceToolBarView
  • OnEnterIdle() : CModelessMain
  • OnEnterScript() : CScript
  • OnEraseBkgnd() : CCubeView , CChildView , CPushCtrl , CTimeCtrl , CXlistCtrl , CModelessMain , CChildView , CShapePreviewWnd , CSnapView , CSpiroView , CDrawView , CBigIcon , CDrawView , CExplorerView , CFolderBar , CMSMoneyDemoView , CMainFrame , CCalendarBar , CFolderListPopupWnd , CMailBar , CPreviewPane , CTabbedViewView , CView1 , CView3 , CView4 , CStartView , CBigIcon
  • OnEraseWorkArea() : CFolderListBar , CDynamicHelpViewBar
  • OnEvent() : CTestContainer98Item
  • OnExample() : CMainFrame
  • OnExceptionHelp() : CMethodDlg
  • OnExpand() : CPropertiesViewBar
  • OnFast() : CBounceWnd , CBounceView , CSpiroView
  • OnFavorite() : CMainFrame
  • OnFetch() : CDBVListView
  • OnFileBind() : CMainFrame , CObjTreeView
  • OnFileChange() : CAnimateCtrlPage
  • OnFileClose() : CTypeLibWnd , CRibbonMDIDemoDoc
  • OnFileCloseSolution() : CMainFrame
  • OnFileConfigureScreenCapture() : CMainFrame
  • OnFileNameBrowse() : CLoggingDlg
  • OnFileNameChange() : CCustomFileDialog
  • OnFileNameOK() : CCustomFileDialog
  • OnFileNew() : CWordPadApp , CMSOffice2007DemoApp , CWordPadApp
  • OnFileNewBlankSolution() : CMainFrame
  • OnFileNewProject() : CMainFrame
  • OnFileOpen() : CChildView , CMfcieView , CWordPadApp , CIEDemoView , CMSOffice2007DemoApp , CWordPadApp
  • OnFileOpenimage() : CChildView
  • OnFileOpenSolution() : CMainFrame
  • OnFileOpenurl() : CHTMLEdDoc
  • OnFilePlay() : CCubeView
  • OnFilePrint() : CDrawView , CMFCBindDoc , CWordPadView , CDrawView , CSplitFrame , CMainFrame , COutputBar , CWordPadView
  • OnFilePrintAll() : CMFCBindDoc
  • OnFilePrintPreview() : CCustomPagesView , CDrawView , CSplitFrame , CDynamicMenuView , CMDITabsDemoView , CMenuSubSetView , CMainFrame , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CMainFrame , CRibbonGadgetsView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWordPadView , CWorkSpaceToolBarView
  • OnFileRegisterControls() : CTestContainer98App
  • OnFileRunREGEDIT() : CMainFrame
  • OnFileSave() : CChildView
  • OnFileSaveAll() : CMainFrame
  • OnFileSaveAs() : COutputBar
  • OnFileSaveImage() : CChildView
  • OnFileScreencapture() : CMainFrame
  • OnFileSendMail() : CWordPadDoc
  • OnFileSummaryInfo() : CDrawDoc
  • OnFileViewTypeLib() : CMainFrame
  • OnFillBackground() : CMyToolTipCtrl , CUndoBar
  • OnFillBarBackground() : CMSMVisualManager
  • OnFillHighlightedArea() : CMSMVisualManager
  • OnFillPopupWindowBackground() : CMSNVisualManager
  • OnFillTasksGroupInterior() : CMSMVisualManager
  • OnFillTasksPaneBackground() : CMSMVisualManager
  • OnFinalRelease() : CLocalizePropPage , CAutoClickPoint , CEnumVariant , CStringCollect , CVariantAssoc , CVariantMap , CTypeLibViewer
  • OnFind() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView , CVisualStudioDemoView
  • OnFindContact() : COutlookDemoDoc
  • OnFixed() : CSliderCtrlPage
  • OnFlag() : CMyPopupDlg
  • OnFlashColorChanged() : CCircCtrl
  • OnFocus() : CTestContainer98Item , CTestContainer98View
  • OnFolderChange() : CCustomFileDialog
  • OnFolderUp() : CExplorerView
  • OnFontChange() : CMainFrame
  • OnFontColor() : CMSOffice2007DemoView
  • OnFontDialog() : CMSOffice2007DemoView
  • OnFontname() : CMSOffice2007DemoView , CWordPadView
  • OnFontNameChange() : CMainFrame
  • OnFontNameKillFocus() : CFormatBar
  • OnFontsize() : CMSOffice2007DemoView , CWordPadView
  • OnFontSizeChange() : CMainFrame
  • OnFontSizeDropDown() : CFormatBar
  • OnFontSizeKillFocus() : CFormatBar
  • OnFontType() : CPage3
  • OnFormatParagraph() : CWordPadView
  • OnFormatPopup() : CHTMLEdView
  • OnFormatTabs() : CWordPadView
  • OnFourColumns() : CMainFrame
  • OnFrom() : CProgCtrlPage
  • OnGetAll() : CAutoDrivDlg
  • OnGetCellBkColor() : CMyListCtrl
  • OnGetCellFont() : CMyListCtrl
  • OnGetCellTextColor() : CMyListCtrl
  • OnGetCharFormat() : CWordPadView
  • OnGetClipboardData() : CServerItem , CRectItem , CTestContainer98Item
  • OnGetClipRect() : CTestContainer98Item
  • OnGetDispInfoTreeView() : CRegistryView
  • OnGetDocumentColors() : CMainFrame
  • OnGetEmbeddedItem() : CScribbleDoc , CServerDoc , CPadDoc , CWordPadDoc
  • OnGetExtent() : CScribbleItem , CServerItem , CEmbeddedItem
  • OnGetInPlaceMenu() : CButtonCtrl
  • OnGetItemPosition() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CDrawItem
  • OnGetLinkedItem() : CServerDoc , CPadDoc
  • OnGetMinMaxInfo() : CMainFrame
  • OnGetPosition() : CAutoDrivDlg
  • OnGetRecordset() : CDBVListView
  • OnGetTabToolTip() : CMainFrame
  • OnGiveUp() : CSpeakNDlg
  • OnGo() : CGetURL , CDriverDlg
  • OnGoAddress() : CMSMoneyDemoDoc
  • OnGoBack() : CMfcieView , CExplorerDoc , CIEDemoView , CMSMoneyDemoDoc
  • OnGoForward() : CMfcieView , CExplorerDoc , CIEDemoView , CMSMoneyDemoDoc
  • OnGoSearchTheWeb() : CMfcieView , CIEDemoView
  • OnGoStartPage() : CMfcieView , CIEDemoView
  • OnGreen() : CSpiroView
  • OnHasButtons() : CTreeCtrlPage
  • OnHasLines() : CTreeCtrlPage
  • OnHeader() : CPage5
  • OnHello() : CMainFrame
  • OnHelp() : CTesthelpPropPage , CCSDialog , CCSPropertyPage , CCSPropertySheet , CCSDialog , CCSPropertyPage , CCSPropertySheet
  • OnHelpAbout() : CTheApp , CSchedulerDlg
  • OnHelpCommand() : CTesthelpCtrl
  • OnHelpContextMenu() : CCSDialog , CCSPropertyPage , CCSPropertySheet , CCSDialog , CCSPropertyPage , CCSPropertySheet
  • OnHelpCustomizeToolbars() : CMainFrame
  • OnHelpFinder() : CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • OnHelpInfo() : CAmbientPropertiesDlg , CComponentCategoriesDlg , CContainerInfoDlg , CEventLoggingPage , CFeaturesPage , CInterfacesPage , CInsertControlDlg , CLoggingDlg , CMacroDlg , CMethodDlg , CNewAmbientPropertyDlg , CPropertyBagDlg , CPropertyChangesPage , CPropertyEditRequestsPage , CRegisterControlsDlg , CServicesPage , CTabOrderDlg
  • OnHelpKeyboardmap() : CMainFrame
  • OnHelpMicrosoft() : CMainFrame
  • OnHelpMicrosoftOnTheWebBestOfTheWeb() : CMfcieView
  • OnHelpMicrosoftOnTheWebFreeStuff() : CMfcieView
  • OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions() : CMfcieView
  • OnHelpMicrosoftOnTheWebGetFasterInternetAccess() : CMfcieView
  • OnHelpMicrosoftOnTheWebInternetStartPage() : CMfcieView
  • OnHelpMicrosoftOnTheWebMicrosoftHomePage() : CMfcieView
  • OnHelpMicrosoftOnTheWebSearchTheWeb() : CMfcieView
  • OnHelpMicrosoftOnTheWebSendFeedback() : CMfcieView
  • OnHelpOnlineSupport() : CMfcieView
  • OnHelpShowStart() : CVisualStudioDemoApp
  • OnHelpWeb() : CMainFrame
  • OnHelpWebTutorial() : CMfcieView
  • OnHicolorimages() : CTasksPaneView
  • OnHideFontProps() : CPage5
  • OnHighlightMenuItem() : CMSMVisualManager
  • OnHighlightRibbonListItem() : CMainFrame
  • OnHistbuttons() : CTasksPaneView
  • OnHistory() : CMainFrame
  • OnHome() : CResourcePage
  • OnHover() : CListHdrDlg
  • OnHScroll() : CPagerCtrlPage , CDesktopAlertDemoDlg , CView1 , CView4
  • OnIcon() : CStatusBarDemoView
  • OnIdle() : CScreenCapApp , CCtrlbarsApp , CChildView , CMMXSwarmApp , CNotepadApp , CTheApp
  • OnIdleUpdateCmdUI() : CDlgToolBar , CDlgStatusBar
  • OnIgnoreRequiredCategories() : CInsertControlDlg
  • OnIllegalChar() : CWclsEditDlg
  • OnImageFormats() : CChildView
  • OnImageInfo() : CChildView
  • OnImplementedCategories() : CInsertControlDlg
  • OnImportText() : CServerView
  • OnIndentLeft() : CMSOffice2007DemoView
  • OnIndentRight() : CMSOffice2007DemoView
  • OnIndicatorLabel() : CStatusBarDemoView
  • OnInitDialog() : CMutexesDlg , CSpeakNDlg , CAllControlsSheet , CCmnCtrl3Dlg , CCommandLinkCtrlPage , CNetAddressCtrlPage , CPagerCtrlPage , CSplitButtonCtrlPage , CNetAddrVerifierDlg , CTesthelpPropPage , CAnimateCtrlPage , CDateTimePage , CMonthCalPage , CAllControlsSheet , CToolBarCtrlPage , CTreeCtrlPage , CProgCtrlPage , CAllControlsSheet , CSliderCtrlPage , CSpinCtrlPage , CTaskDialogTestDlg , CBMTest1Dlg , CBMTest2Dlg , CBMTest3Dlg , CCustListDlg , CDerEditDlg , CSpinEditDlg , CSubEditDlg , CWclsEditDlg , CModelessMain , CRateDlg , CWndListDlg , CDlgtempDlg , CColorOptDlg , CCustomFileDialog , CFileDlgWatcherDlg , CListHdrDlg , CMainDlg , CFindDlg , CModalShapePropSheet , CInfoDlg , CBkfstPage , CDinnerPage , CLunchPage , CVarUseDlg , CDHtmlExploreDlg , CPropertiesDlg , CGetURL , CEntryInfoDlg , CSchedulerDlg , CAutoDrivDlg , CDriverDlg , CRectDlg , CChangeNameDlg , CAddNodeDlg , CAboutDlg , CCalcDlg , CDispatchDlg , CIDataObjectDlg , CAboutDlg , CAboutBox , CSplashWnd , CAmbientPropertiesDlg , CComponentCategoriesDlg , CContainerInfoDlg , CEventLoggingPage , CInsertControlDlg , CLoggingDlg , CMacroDlg , CMethodDlg , CNewAmbientPropertyDlg , CPropertyBagDlg , CPropertyChangesPage , CPropertyEditRequestsPage , CRegisterControlsDlg , CTabOrderDlg , CTCExtPage , CButtonDialog , CCSDialog , CDateDialog , CEmbeddedOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CListDlg , CSplashWnd , CAboutDlg , CGuidGenDlg , CDesktopAlertDemoDlg , CMSNDlg , CMyPopupDlg , CDlgToolTipsDlg , CLineWeightDlg , CRectDlg , CConfigDlg , CDemoOptionsPage , CDemoOptionsPropSheet , NewControlsPropSheet , CPage1 , CPage2 , CPage3 , CPage4 , CPage5 , CPage6 , CAppLookDlg , CPropSheetDemoDlg , CTrayMenuDlg , CAppLookDlg , CButtonDialog , CCSDialog , CDateDialog , CEmbeddedOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CListDlg , CSplashWnd
  • OnInitDone() : CCustomFileDialog
  • OnInitialUpdate() : CDWordArrayView , CIntListView , CMapDWordToMyStructView , CMapStringToStringView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView , CContainerView , CDBVListView , CEmpView , CDibView , CBounceView , CRowListView , CScribbleView , CSnapView , CSpiroView , CHTMLEdView , CMfcieView , CDrawView , CServerView , CDriverView , CMFCBindView , CMainView , CTypeLibListView , CTypeLibODLView , CTypeLibTreeView , CObjTreeView , CRegistryView , CTestContainer98View , CDrawView , CExplorerView , CIEDemoView , CMenuSubSetView , CMSOffice2007DemoView , CMailView , COutlookDemoView , CSetPaneSizeView , CStatusBarDemoView , CView1 , CView2 , CView4 , CTabControlView , CTasksPaneView , CTooltipDemoView , CStartView
  • OnInitMenuPopup() : CModelessMain
  • OnInPlaceActivate() : CTestContainer98Item
  • OnInPlaceActivateEx() : CTestContainer98Item
  • OnInPlaceDeactivate() : CTestContainer98Item
  • OnInPlaceDeactivateEx() : CTestContainer98Item
  • OnInsertBefore() : CIntListView , CStringListView , CTypedPtrListView
  • OnInsertBulletFromPalette() : CMSOffice2007DemoView
  • OnInsertChart() : CMSOffice2007DemoView
  • OnInsertDateTime() : CWordPadView
  • OnInsertMultilevelFromPalette() : CMSOffice2007DemoView
  • OnInsertNumberFromPalette() : CMSOffice2007DemoView
  • OnInsertObject() : CContainerView , CDrawView , CMFCBindView , CMainView , CTestContainer98View , CDrawView
  • OnInsertPicture() : CMSOffice2007DemoView
  • OnInsertShape() : CMSOffice2007DemoView
  • OnInsertTable() : CMSOffice2007DemoView
  • OnInsertTableGallery() : CMSOffice2007DemoView
  • OnIntervalChanged() : CTimeCtrl
  • OnInvertChanged() : CLocalizeCtrl
  • OnInvertFlagChanged() : CXlistCtrl
  • OnInvoke() : CMethodDlg
  • OnItem1() : CTrayMenuDlg
  • OnItem2() : CTrayMenuDlg
  • OnItem3() : CTrayMenuDlg
  • OnItem4() : CTrayMenuDlg
  • OnKeepVisible() : CFolderListPopupWnd
  • OnKeyDown() : CShapesView , CServerView , CTestContainer98View , CWordPadView , CCustomSliderCtrl , CView2 , CWordPadView
  • OnKeyUp() : CTestContainer98View
  • OnKillAdvise() : CIDataObjectDlg
  • OnKillFocus() : CRecalcView , CListViewEx , CTestContainer98View , CMFCRibbonNumEditCtrl
  • OnKillThreads() : CThreadView
  • OnKillWorkerThread() : CRecalcDoc
  • OnLbnSelchangeListStyle() : CSplitButtonCtrlPage
  • OnLBSelChangedNotify() : CCustomFileDialog
  • OnLButtonDblClk() : CCircCtrl , CContainerView , CShapesView , CRowListView , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CServerView , CMainView , CObjTreeView , CTestContainer98View , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CStateCollectionView
  • OnLButtonDown() : CBounceWnd , CContainerView , CTesthelpCtrl , CShapesView , CRowListView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CServerView , CMainView , CTestContainer98View , CRulerBar , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CMSOffice2007DemoView , CRulerBar
  • OnLButtonUp() : CRectTool , CCustomSliderCtrl , CTestContainer98View , CCircCtrl , CMyListCtrl , CLocalizeCtrl , CTesthelpCtrl , CMyTreeCtrl , CScribbleView , CSpiroView , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CRulerBar , CDrawTool , CSelectTool , CPolyTool , CDrawView , CMSOffice2007DemoView , CUndoListBox , CRulerBar
  • OnLeaveScript() : CScript
  • OnLine() : CSliderCtrlPage
  • OnLinesAtRoot() : CTreeCtrlPage
  • OnLineStyle() : COwnerDrawMenuView
  • OnLink() : CMainFrame
  • OnLink1() : CMainFrame
  • OnLinkMicrosoft() : CMainFrame
  • OnLinkMSDN() : CMainFrame
  • OnLinks() : CMainFrame
  • OnLinkVisualCPP() : CMainFrame
  • OnLoadDebugConf() : CMainFrame
  • OnLoadRegularConf() : CMainFrame
  • OnLocation() : CTabControlView
  • OnLogToDebug() : CLoggingDlg
  • OnLogToFile() : CLoggingDlg
  • OnLogToNull() : CLoggingDlg
  • OnLogToOutput() : CLoggingDlg
  • OnLookup() : CDriverView
  • OnLum() : CPage2
  • OnMailAttachment() : CMailView
  • OnMailCc() : CMailView
  • OnMailCheckNames() : CMailView
  • OnMailClose() : CMailFrame
  • OnMailCopyToFolder() : CMailView
  • OnMailDelete() : CMailView
  • OnMailFlag() : CMailView
  • OnMailFontsize() : CMailView
  • OnMailHightPriority() : CMailView
  • OnMailItem() : CMailView
  • OnMailLowPriority() : CMailView
  • OnMailMoveToFolder() : CMailView
  • OnMailOptions() : CMailView
  • OnMailProperties() : CMailView
  • OnMailSave() : CMailView
  • OnMailSaveAttachments() : CMailView
  • OnMailSaveStationery() : CMailView
  • OnMailSend() : CMailView
  • OnMailSignature() : CMailView
  • OnMailSpell() : CMailView
  • OnMailTo() : CMailView
  • OnMapPropertyToPage() : CCircCtrl , CPalCtrl
  • OnMargins() : CTasksPaneView
  • OnMarkChanged() : CPage5
  • OnMarkSortedColumn() : CPage5
  • OnMDIActivate() : CDynaMDIChildWnd
  • OnMdiCancel() : CMainFrame
  • OnMdiMoveToNextGroup() : CMainFrame
  • OnMdiMoveToPrevGroup() : CMainFrame
  • OnMdiNewHorzTabGroup() : CMainFrame
  • OnMdiNewVertGroup() : CMainFrame
  • OnMdiTabbed() : CMainFrame
  • OnMdiTabbedDocument() : CMainFrame
  • OnMeasureItem() : CIDataObjectDlg , CWordPadView , CIconCombo , CWordPadView
  • OnMenuButtonToolHitTest() : CMainFrame
  • OnMenuDefaultClick() : CPage1
  • OnMenuSelect() : CModelessMain
  • OnMenuSelection() : CMainFrame
  • OnMethodNameSelChange() : CMethodDlg
  • OnMiniFramePropertySheet() : CMainFrame
  • OnMirrorDisplayFont() : CPadView
  • OnModifyFont() : CPage5
  • OnModifyScheduleDisplay() : CSchedulerDlg
  • OnMoreLines() : COwnerDrawMenuView
  • OnMouseActivate() : CTextView , CColorView , CWordPadView
  • OnMouseMove() : CUndoListBox , CSelectTool , CTestContainer98View , CMyListCtrl , CTesthelpCtrl , CMyTreeCtrl , CScribbleView , CSpiroView , CDrawTool , CRectTool , CPolyTool , CDrawView , CRulerBar , CDrawTool , CSelectTool , CRectTool , CPolyTool , CDrawView , CCustomSliderCtrl , CRulerBar
  • OnMouseOutButtons() : CEntryInfoDlg , CSchedulerDlg
  • OnMouseOutElement() : CDHtmlExploreDlg
  • OnMouseOutNewElements() : CSchedulerDlg
  • OnMouseOutTime() : CSchedulerDlg
  • OnMouseOverButtons() : CSchedulerDlg , CEntryInfoDlg
  • OnMouseOverElement() : CDHtmlExploreDlg
  • OnMouseOverNewElements() : CSchedulerDlg
  • OnMouseOverTime() : CSchedulerDlg
  • OnMouseOverTimeDesc() : CSchedulerDlg
  • OnMove() : CMainFrame , CSliderButton , CMainFrame
  • OnMoveTab() : CTabControlView
  • OnMoveTo() : CExplorerView
  • OnMultiDimensionArray() : CVarUseDlg
  • OnMyHotCur() : CListHdrDlg
  • OnName1Changed() : CTesthelpCtrl
  • OnName2Changed() : CTesthelpCtrl
  • OnName3Changed() : CTesthelpCtrl
  • OnNavtoolbar() : CTasksPaneView
  • OnNcCreate() : CParsedEditExported
  • OnNcDestroy() : CFolderListPopupWnd
  • OnNcRButtonDown() : CMainFrame
  • OnNeedTextA() : CStandardBar , CPaletteBar
  • OnNeedTextW() : CStandardBar , CPaletteBar
  • OnNever() : CPropertyEditRequestsPage
  • OnNewAccelerator() : CVisualStudioDemoDoc
  • OnNewAddress() : CMainFrame
  • OnNewAddressEnter() : CMainFrame
  • OnNewAppointment() : COutlookDemoDoc
  • OnNewball() : CThreadView
  • OnNewBitmap() : CVisualStudioDemoDoc
  • OnNewBounce() : CMDIApp
  • OnNewContract() : COutlookDemoDoc
  • OnNewControl() : TestContainer98::ITestContainer98Events
  • OnNewCursor() : CVisualStudioDemoDoc
  • OnNewDialog() : CVisualStudioDemoDoc
  • OnNewDistributionList() : COutlookDemoDoc
  • OnNewDocument() : CDynaMenuDoc , CTabControlDoc , CVisualStudioDemoDoc , CSliderDoc , CMenuSubSetDoc , COutlookMultiViewsDoc , CDynamicMenuDoc , CMfcieDoc , CServerDoc , CSpiroDoc , CContainerDoc , CCollectDoc , CCubeDoc , CThreadDoc , CRecalcDoc , CDBVListDoc , CDibDoc , CDockDoc , CBounceDoc , CHelloDoc , CNotepadDoc , CShapesDoc , CRowListDoc , CScribbleDoc , CSnapDoc , CTrackerDoc , CMainDoc , CHTMLEdDoc , CAutoClickDoc , CDrawDoc , CDriverDoc , CMFCBindDoc , COle2ViewDoc , CTestContainer98Doc , CWordPadDoc , CCustomPagesDoc , CDrawDoc , CExplorerDoc , CIEDemoDoc , CMDITabsDemoDoc , CMSMoneyDemoDoc , CMSOffice2007DemoDoc , COutlookDemoDoc , COwnerDrawMenuDoc , CPaletteDemoDoc , CRebarTestDoc , CRibbonGadgetsDoc , CRibbonMDIDemoDoc , CRollupPaneDoc , CSetPaneSizeDoc , CStateCollectionDoc , CStatusBarDemoDoc , CTabbedViewDoc , CTasksPaneDoc , CToolbarDateTimePickerDoc , CTooltipDemoDoc , CWordPadDoc , CWorkSpaceToolBarDoc
  • OnNewFax() : COutlookDemoDoc
  • OnNewFolder() : COutlookDemoDoc , CClassViewBar
  • OnNewguid() : CGuidGenDlg
  • OnNewHello() : CMDIApp
  • OnNewIcon() : CVisualStudioDemoDoc
  • OnNewJournalEntry() : COutlookDemoDoc
  • OnNewline() : CThreadView
  • OnNewMail() : COutlookDemoDoc
  • OnNewMeeting() : COutlookDemoDoc
  • OnNewMenu() : CVisualStudioDemoDoc
  • OnNewNote() : COutlookDemoDoc
  • OnNewPostFolder() : COutlookDemoDoc
  • OnNewProperty() : CAmbientPropertiesDlg
  • OnNewrectangle() : CThreadView
  • OnNewShortcut() : COutlookDemoDoc
  • OnNewStringTable() : CVisualStudioDemoDoc
  • OnNewTask() : COutlookDemoDoc
  • OnNewTaskRequest() : COutlookDemoDoc
  • OnNewToolbar() : CVisualStudioDemoDoc
  • OnNewVersion() : CVisualStudioDemoDoc
  • OnNextNumber() : CBMTest3Dlg
  • OnNoColHdr() : CListHdrDlg
  • OnNoLabelWrap() : CListHdrDlg
  • OnNoSortHdr() : CListHdrDlg
  • OnNothumb() : CSliderCtrlPage
  • OnNoticks() : CSliderCtrlPage
  • OnNotify() : CShellTreeCtrl , CClassTreeWnd
  • OnNotifyRecycleBin() : CFolderBar
  • OnObjectDelete() : CMainFrame , CObjTreeView
  • OnObjectDisplayAsIcon() : CMainView
  • OnObjectDisplayContent() : CMainView
  • OnObjectFillColor() : CDrawView
  • OnObjectLineColor() : CDrawView
  • OnObjectLineWeight() : CDrawView
  • OnObjectMoveBack() : CDrawView
  • OnObjectMoveForward() : CDrawView
  • OnObjectMoveToBack() : CDrawView
  • OnObjectMoveToFront() : CDrawView
  • OnObjectNoFill() : CDrawView
  • OnObjectNoLine() : CDrawView
  • OnObjectProperties() : CDrawView
  • OnObjectResetsize() : CMainView
  • OnObjectStyles() : CDrawView
  • OnObjectVerify() : CObjTreeView , CMainFrame
  • OnOcmCommand() : CButtonCtrl , CPushCtrl , CXlistCtrl
  • OnOcmDrawItem() : CPushCtrl , CXlistCtrl
  • OnOcmMeasureItem() : CXlistCtrl
  • OnOK() : CAppLookDlg , CFormatTabDlg , CMainDlg , CCustListDlg , CSpeakNDlg , CDerEditDlg , CSpinEditDlg , CSubEditDlg , CWclsEditDlg , CModelessDialog , CCustomFileDialog , CAdderDialog , CGetURL , CCalcDlg , CFormatParaDlg , CListDlg , CGuidGenDlg , CDemoOptionsPage , CAppLookDlg , CFormatParaDlg , CFormatTabDlg , CListDlg
  • OnOleArray() : CVarUseDlg
  • OnOleChangeSource() : CMainView
  • OnOleEditProperties() : CMainView
  • OnOleInsertNew() : CMFCBindDoc , CMainFrame
  • OnOpen() : CDrawOleObj , CDrawObj , CServerItem , CDrawObj , CDrawOleObj
  • OnOpenDocument() : CScribbleDoc , CHTMLEdDoc , CDrawDoc , CMFCBindDoc , CTestContainer98Doc , CWordPadDoc , CDrawDoc , CWordPadDoc , CDibDoc
  • OnOpenFile() : CMacroDlg
  • OnOpenMsg() : CMainFrame
  • OnOpenRecentFile() : CMSOffice2007DemoApp
  • OnOptionNow() : CWndListDlg
  • OnOptionRate() : CWndListDlg
  • OnOptions() : CMSNDlg
  • OnOptionsDesignMode() : CTestContainer98View
  • OnOptionsFont() : CServerDoc
  • OnOptionsFreezeEvents() : CTestContainer98Doc
  • OnOptionsLogging() : CTestContainer98Doc
  • OnOptionsOption1() : CButtonCtrl
  • OnOptionsOption2() : CButtonCtrl
  • OnOptionsOption3() : CButtonCtrl
  • OnOptionsSlowDrawing() : CTestContainer98Doc
  • OnOptionsTraceLevelNone() : CTestContainer98App
  • OnOptionsTraceLevelNormal() : CTestContainer98App
  • OnOptionsTraceLevelVerbose() : CTestContainer98App
  • OnOptionsTwoPassDrawing() : CTestContainer98Doc
  • OnOrientation() : CSliderCtrlPage
  • OnOutlookAddPage() : CMainFrame
  • OnOutlookAnimation() : CMainFrame
  • OnOutlookBarShortcut() : CMainFrame
  • OnOutlookDeletePage() : CMainFrame
  • OnOutlookRenamePage() : CMainFrame
  • OnOutlookShowTextLabels() : CMainFrame
  • OnOutputBufferHasData() : CIDataObjectDlg
  • OnOutputGotoError() : COutputList1 , COutputList
  • OnPage() : CSliderCtrlPage
  • OnPagelayoutIndentLeft() : CMSOffice2007DemoView
  • OnPagelayoutIndentRight() : CMSOffice2007DemoView
  • OnPageLayoutTheme() : CMSOffice2007DemoView
  • OnPageSetup() : CTheApp , CWordPadView
  • OnPagesetupDialog() : CMSOffice2007DemoView
  • OnPaint() : CChildView , CHelloWnd , CCmnCtrl3Dlg , CNetAddrVerifierDlg , CTaskDialogTestDlg , CModelessMain , CDlgtempDlg , CFileDlgWatcherDlg , CMainWindow , CHelloWnd , CChildView , CMainDlg , CListViewEx , CChildView , CVarUseDlg , CSchedulerDlg , CAutoDrivDlg , CCalcDlg , CMetaFileWnd , CGuidGenDlg , CDesktopAlertDemoDlg , CWorkspaceBar , CDlgBanner , CMainFrame , CCalendarBar , CFolderListPopupWnd , CPropSheetDemoDlg , CWorkspaceBar2 , CInfoBar , CWorkspaceBar , CTrayMenuDlg , CClassViewBar , CDynamicHelpViewBar , CFileViewBar , CResourceViewBar , CWatchBar , COutputViewBar , CPage3 , CWorkspaceBar , CDlgToolTipsDlg , CShapePreviewWnd , CDHtmlExploreDlg , CListHdrDlg , CMutexesDlg
  • OnPalette() : CMainFrame
  • OnPalette2column() : CMainFrame
  • OnPalette3column() : CMainFrame
  • OnPaletteChanged() : CMainFrame , CWordPadView , CMainFrame , CWordPadView , CMainFrame
  • OnPaletteTool() : CPaletteDemoDoc
  • OnParagraphDialog() : CMSOffice2007DemoView
  • OnParamsItemChanged() : CMethodDlg
  • OnParamTypeSelChange() : CMethodDlg
  • OnParamValueChange() : CMethodDlg
  • OnParamValueSetFocus() : CMethodDlg
  • OnPaste() : CMainView
  • OnPasteLink() : CMainView
  • OnPasteSpecial() : CMainView
  • OnPause() : CMutexesDlg
  • OnPauseDrawing() : CSpiroView
  • OnPenBackspace() : CWordPadView
  • OnPenNewline() : CWordPadView
  • OnPenPeriod() : CWordPadView
  • OnPenSpace() : CWordPadView
  • OnPenTab() : CWordPadView
  • OnPenThickOrThin() : CScribbleDoc
  • OnPenToggle() : CInPlaceFrame , CMainFrame , CInPlaceFrame
  • OnPenWidth() : CSpiroView
  • OnPenWidths() : CScribbleDoc
  • OnPlay() : CAnimateCtrlPage
  • OnPoint() : CSliderCtrlPage
  • OnPointerInactiveMove() : CTestContainer98Item
  • OnPointerInactiveSetCursor() : CTestContainer98Item
  • OnPopMessageString() : CModelessMain
  • OnPopupSource() : CDesktopAlertDemoDlg
  • OnPosRectChange() : CTestContainer98Item
  • OnPostRecalcLayout() : CMainFrame
  • OnPrepareDC() : CScribbleView , CSpiroView , CDrawView , CServerView , CMainView , CMSOffice2007DemoView , CDrawView
  • OnPreparePrinting() : CCollectView , CRecalcView , CDibView , CDynaMenuView , CNotepadView , CScribbleView , CSpiroView , CTrackerView , CAutoClickView , CDrawView , CMainView , CCustomPagesView , CDrawView , CDynamicMenuView , CMDITabsDemoView , CMenuSubSetView , CMSMoneyDemoView , COutlookDemoView , COutlookMultiViewsView , CView1 , CView2 , CView3 , COwnerDrawMenuView , CPaletteDemoView , CRibbonGadgetsView , CRibbonMDIDemoView , CRollupPaneView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWordPadView , CWorkSpaceToolBarView , CSetPaneSizeView , CTabbedViewView , CRebarTestView , CIEDemoView , CMSOffice2007DemoView , CWordPadView , CContainerView , CShapesView
  • OnPrepareToClose() : CBounceWnd , CBounceMDIChildWnd
  • OnPressedOnMenu() : CPage1
  • OnPrevNumber() : CBMTest3Dlg
  • OnPrint() : CScribbleView , CSpiroView , CDrawView , CWordPadView , CDrawView , CMenuSubSetView , CSetPaneSizeView , CStatusBarDemoView , CTabControlView , CTasksPaneView , CWordPadView , CTooltipDemoView , CRecalcView , CPadView
  • OnPrinterChanged() : CFormatBar
  • OnPrinterChangedMsg() : CWordPadView
  • OnPriorityChange() : CMutexesDlg
  • OnPriorityChangeCntr() : CMutexesDlg
  • OnPriorityChangeDisp() : CMutexesDlg
  • OnPriorityClassChange() : CMutexesDlg
  • OnProduct() : CResourcePage
  • OnProgressChange() : CIEDemoView
  • OnProgressSetdelta() : CProgCtrlPage
  • OnProgressStepit() : CProgCtrlPage
  • OnPrompt() : CPropertyEditRequestsPage
  • OnProperies1() : CPropertiesViewBar
  • OnProperies2() : CPropertiesViewBar
  • OnProperties() : CFileViewBar
  • OnPropertiesSelChange() : CPropertyEditRequestsPage
  • OnPropertyChanged() : CAmbientPropertiesDlg , CWorkspaceBar
  • OnPropertySheetWithPreview() : CShapesView
  • OnPropListAlphabetMode() : CPropertiesViewBar
  • OnProplistCategorized() : CPage5
  • OnProplistCategorized2() : CPage5
  • OnPropListCustomColors() : CPage5
  • OnProplistExpandAll() : CPage5
  • OnPropListTreeMode() : CPropertiesViewBar
  • OnPropNameSelChange() : CAmbientPropertiesDlg
  • OnPropSheet1() : CPropSheetDemoDlg
  • OnPropSheet2() : CPropSheetDemoDlg
  • OnPropSheet3() : CPropSheetDemoDlg
  • OnPropSheet4() : CPropSheetDemoDlg
  • OnPropSheet5() : CPropSheetDemoDlg
  • OnPropTypeSelChange() : CAmbientPropertiesDlg
  • OnPropValueSetFocus() : CAmbientPropertiesDlg
  • OnPurple() : CSpiroView
  • OnQueryDragIcon() : CAllControlsSheet , CCalcDlg , NewControlsPropSheet , CGuidGenDlg , CAutoDrivDlg , CDesktopAlertDemoDlg , CAllControlsSheet , CDlgToolTipsDlg , CFileDlgWatcherDlg , CAllControlsSheet , CTaskDialogTestDlg , CModelessMain , CAutoDrivDlg , CListHdrDlg , CVarUseDlg , CDHtmlExploreDlg , CSchedulerDlg , CMainDlg , CMutexesDlg , CPropSheetDemoDlg , CTrayMenuDlg , CCmnCtrl3Dlg , CNetAddrVerifierDlg
  • OnQueryNewPalette() : CMainFrame , CWordPadView , CMainFrame , CWordPadView , CMainFrame
  • OnQuickStyle() : CMSOffice2007DemoView
  • OnRangefrom() : CSliderCtrlPage
  • OnRangeto() : CSliderCtrlPage
  • OnRButtonDblClk() : CTestContainer98View
  • OnRButtonDown() : CPadView , CTestContainer98View , CServerView , CMainView
  • OnRButtonUp() : CMyTreeCtrl , CMyListCtrl , CMSOffice2007DemoView , CWordPadView , CTestContainer98View
  • OnRecalcDone() : CRecalcView
  • OnRecalcInProgress() : CMainFrame
  • OnRecalcNowMsg() : CRecalcView
  • OnRecalcSpeed() : CRecalcDoc
  • OnRecalculateNow() : CRecalcView
  • OnRed() : CSpiroView
  • OnRefresh() : CMainFrame , CAutoDrivDlg , CDriverDlg
  • OnRegister() : CRegisterControlsDlg
  • OnRegisteredControlsItemChanged() : CRegisterControlsDlg
  • OnRemove() : CDriverView , CStringListView , CPointArrayView , CDWordArrayView , CMapDWordToMyStructView , CTypedPtrArrayView , CTypedPtrMapView , CMapStringToStringView , CIntListView , CTypedPtrListView
  • OnRemoveAll() : CMapStringToStringView , CDWordArrayView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrMapView , CIntListView , CMapDWordToMyStructView , CTypedPtrListView
  • OnRemovePiece() : CSpiroView
  • OnRemoveRing() : CSpiroView
  • OnRemoveWheel() : CSpiroView
  • OnRenderFileData() : CServerItem , CEmbeddedItem
  • OnReplaySound() : CSpeakNDlg
  • OnRequestEdit() : CTestContainer98Item
  • OnRequiredCategories() : CInsertControlDlg
  • OnReregister() : CRegisterControlsDlg
  • OnReset() : CFormatBar
  • OnResetButton() : CPage1
  • OnResetMenu() : CMainFrame
  • OnResetPage() : CMainFrame
  • OnResetState() : CTimeCtrl , CPalCtrl , CLicensedCtrl , CLocalizeCtrl , CButtonCtrl , CImageCtrl , CPushCtrl , CTesthelpCtrl , CXlistCtrl , CCircCtrl , CSpindialCtrl
  • OnResetValues() : CPage5
  • OnResizeChild() : CInPlaceFrame
  • OnRibbonBtn7() : CMainFrame
  • OnRibbonBtn8() : CMainFrame
  • OnRibbonBtn9() : CMainFrame
  • OnRibbonCustomize() : CMainFrame
  • OnRibbonObtn10() : CMainFrame
  • OnRibbonObtn2() : CMainFrame
  • OnRibbonObtn3() : CMainFrame
  • OnRibbonObtn4() : CMainFrame
  • OnRibbonObtn8() : CMainFrame
  • OnRightArrow() : CPage1
  • OnRulesWizard() : COutlookDemoDoc
  • OnRunMacro() : CTestContainer98Doc
  • OnSafeArray() : CVarUseDlg
  • OnSaveDebugConf() : CMainFrame
  • OnSaveDocument() : CHTMLEdDoc , CRecalcDoc , CDibDoc , CTestContainer98Doc , CDrawDoc
  • OnSaveRegularConf() : CMainFrame
  • OnScriptError() : CScript
  • OnScriptTerminate() : CScript
  • OnScrollbuttons() : CTasksPaneView
  • OnScrollBy() : CMainView , CDrawView
  • OnScrollTo() : CPadView
  • OnSearch() : CGetURL
  • OnSectionRemove() : CMFCBindDoc
  • OnSelchange() : CCustomList , CFormatTabDlg
  • OnSelChange() : CMSOffice2007DemoView
  • OnSelchangeAnimation() : CDesktopAlertDemoDlg
  • OnSelchangeFont() : CPage3
  • OnSelChangeFormatEtc() : CIDataObjectDlg
  • OnSelChangeList() : CIntListView , CStringListView , CMapStringToStringView , CMapDWordToMyStructView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView , CPointArrayView , CDWordArrayView
  • OnSelChangePalette() : CMainFrame
  • OnSelchangeTabStyle() : CTabControlView
  • OnSelchangeVisualMngr() : CDesktopAlertDemoDlg
  • OnSelChangeWndList() : CWndListDlg
  • OnSelect() : CTestContainer98Item
  • OnSelectAll() : CPropertyEditRequestsPage , CComponentCategoriesDlg
  • OnSelectEndOk() : CComboToolBar
  • OnSelectFolder() : CPage6
  • OnSelectTree() : CFolderListBar , CDynamicHelpViewBar , CExplorerBar , CFolderListPopupWnd
  • OnSelrangefrom() : CSliderCtrlPage
  • OnSelrangeto() : CSliderCtrlPage
  • OnSendCommand() : CLinksBar
  • OnSendReceive() : COutlookDemoDoc
  • OnSetAll() : CAutoDrivDlg
  • OnSetBkColor() : CListViewEx
  • OnSetCharFormat() : CWordPadView
  • OnSetClientSite() : CTimeCtrl , CXlistCtrl
  • OnSetCursor() : CChildView , CTrackerView , CTestContainer98View , CSpiroView , CSliderProp , CPage1 , CMainView , CContainerView
  • OnSetDispInfoTreeView() : CRegistryView
  • OnSetFocus() : COutputViewBar , CMainFrame , CTestContainer98View , CMainFrame , CContainerView , CShapePropSheetFrame , CMFCBindView , CPropertiesViewBar , CDynamicHelpViewBar , CFileViewBar , CResourceViewBar , CListViewEx , CMainView , CExplorerView , CFolderBar , CWatchBar , CClassViewBar , CPropertiesViewBar , CDrawView , CComboToolBar
  • OnSetFocusAccum() : CCalcDlg
  • OnSetFont() : CCustomFileDialog , CDerEditDlg
  • OnSetImageList() : CListViewEx
  • OnSetItemRects() : CScribbleDoc , CServerDoc
  • OnSetMessageString() : CModelessMain , CMainFrame
  • OnSetPageSite() : CLocalizePropPage
  • OnSetpos() : CProgCtrlPage
  • OnSetPosition() : CAutoDrivDlg
  • OnSetTabStops() : CPadView
  • OnSetText() : CMSMCaptionBar , CAutoDrivDlg
  • OnSetTextBkColor() : CListViewEx
  • OnSetTextColor() : CListViewEx
  • OnSettingChange() : CMainFrame , CWordPadView , CPropertiesViewBar , CMainFrame , CWordPadView , CMainFrame
  • OnSetTooltip() : CPage1
  • OnSetupAdvise() : CIDataObjectDlg
  • OnSetValue() : CAmbientPropertiesDlg , CMethodDlg
  • OnSetX() : CAutoDrivDlg
  • OnSetY() : CAutoDrivDlg
  • OnShareViolation() : CCustomFileDialog
  • OnShow() : CDesktopAlertDemoDlg , CRibbonTooltipCtrl , CCustomToolTipCtrl , CSliderButton , CPadLinkItem
  • OnShowContextMenu() : CHTMLEdView
  • OnShowControlBarMenu() : CMyOutlookBar
  • OnShowControlBars() : CDrawItem
  • OnShowMDITabContextMenu() : CMainFrame
  • OnShowPanes() : CWordPadCntrItem , CMSOffice2007DemoCntrItem
  • OnShowPopupMenu() : CMainFrame , CRibbonListFontButton , CRibbonTableButton , CMainFrame , CRibbonListButton , CMainFrame , CRibbonListButton
  • OnShowRibbonItemMenu() : CMainFrame
  • OnShowSelAlways() : CTreeCtrlPage
  • OnShowToolTipChanged() : CTesthelpCtrl
  • OnShowViews() : CMainDoc
  • OnShowWindow() : CRulerBar
  • OnSimplePropertySheet() : CShapesView
  • OnSingleExpand() : CTreeCtrlPage
  • OnSingleSel() : CListHdrDlg
  • OnSingleStep() : CDriverDlg
  • OnSize() : CDynamicHelpViewBar , CMainFrame , CThreadView , CExplorerView , CContainerView , CCubeView , CBounceWnd , CBounceView , CChildView , CListViewEx , CSnapView , CObjListView , CIDataObjectDlg , CTypeLibTreeView , CPadView , CTestContainer98View , CMainFrame , CDrawView , CWorkspaceBar , CMSMCaptionBar , CDemoOptionsPage , CMailBar , COutputBar , CWorkspaceBar2 , CWorkspaceBar , COutputBar , CUndoBar , CWatchBar , CWorkspaceBar , COutputBar , CFolderListPopupWnd , CWordPadView , CResourceViewBar , CFileViewBar , CPropertiesViewBar , COutputViewBar , COutputBar , CClassViewBar , CWorkspaceBar , CSliderButton , CWorkspaceBar , CMainFrame , CFolderListBar , CCalendarBar , CFolderBar , CMainFrame , CWordPadView , CPropertiesViewBar , CPadFrame , CCircCtrl , CTypeLibListView , CRegistryView , CTypeLibWnd , CMFCBindView , CDrawView , CMainView , CServerView , CScribbleView , CBounceWnd , CBounceMDIChildWnd
  • OnSizeParent() : CRulerBar
  • OnSizing() : CMainFrame
  • OnSlider() : CMainFrame
  • OnSlow() : CBounceWnd , CBounceView , CBounceWnd , CSpiroView
  • OnSmallCaption() : CDesktopAlertDemoDlg
  • OnSolutionOpen() : CFileViewBar
  • OnSolutionOpenWith() : CFileViewBar
  • OnSort() : CClassViewBar
  • OnSortingprop() : CPropertiesViewBar
  • OnSpaceAfter() : CMSOffice2007DemoView
  • OnSpaceBefore() : CMSOffice2007DemoView
  • OnSpell() : CMainFrame
  • OnStartAnimation() : CStatusBarDemoView
  • OnStartCustomize() : CMainFrame
  • OnStartProgress() : CStatusBarDemoView
  • OnStateChange() : CScript
  • OnStaticTextInformation() : CDlgtempDlg
  • OnStatusBarCheck() : CModelessMain
  • OnStdHotCur() : CListHdrDlg
  • OnStep() : CProgCtrlPage
  • OnStnClickedRadioId() : CTaskDialogTestDlg
  • OnStop() : CAnimateCtrlPage
  • OnStrings() : CVarUseDlg
  • OnStyleChange() : CProgCtrlPage
  • OnStyleClicked() : CStylePage
  • OnStyleDialog() : CMSOffice2007DemoView
  • OnSupport() : CResourcePage
  • OnSysColorChange() : CMainFrame , CRulerBar , CMSMToolBar , CMainFrame
  • OnSysCommand() : CMutexesDlg , CPropSheetDemoDlg , CVarUseDlg , CAllControlsSheet , CDlgtempDlg , CMainDlg , CSchedulerDlg , CMSMCaptionBar , CAllControlsSheet , CTrayMenuDlg , CDlgToolTipsDlg , NewControlsPropSheet , CDHtmlExploreDlg , CGuidGenDlg , CCalcDlg
  • OnTabIcons() : CTabControlView
  • OnTabSwap() : CTabControlView
  • OnTask() : CMainFrame
  • OnTearOffMenu() : CMainFrame
  • OnTestBitmapButton1() : CTestWindow
  • OnTestBitmapButton2() : CTestWindow
  • OnTestBitmapButton3() : CTestWindow
  • OnTestCustomList() : CTestWindow
  • OnTestDerivedEdit() : CTestWindow
  • OnTestSpinEdit() : CTestWindow
  • OnTestSubclassedEdit() : CTestWindow
  • OnTestWndClassEdit() : CTestWindow
  • OnTextColor() : CStatusBarDemoView
  • OnTextNotFound() : CWordPadView
  • OnThreadKillThreadsSlow() : CThreadView
  • OnThreeColumns() : CMainFrame
  • OnTickfreq() : CSliderCtrlPage
  • OnTime() : CMainFrame
  • OnTimer() : CBounceWnd , CTimeCtrl , CProgressBarTaskDialog , CBounceWnd , CWordPadView , CMainFrame , CWordPadView , CStatusBarDemoView , CPadView , CMainFrame , CWndListDlg , CChildView , CBounceView , CCubeView
  • OnTitleChange() : CIEDemoView , CMfcieView
  • OnTo() : CProgCtrlPage
  • OnToggleInsert() : CMainFrame
  • OnToolBarCheck() : CModelessMain
  • OnToolbarContextMenu() : CMainFrame
  • OnToolbarCreateNew() : CMainFrame
  • OnToolbarReset() : CMainFrame , CMailFrame , CMainFrame
  • OnToolsConnectToDatabase() : CMainFrame
  • OnToolsDebugProcesses() : CMainFrame
  • OnToolsMacros() : CTestContainer98Doc
  • OnToolsMakeBW() : CChildView
  • OnToolsOptions() : CMainFrame
  • OnToolsToolbar() : CMainFrame
  • OnToolsViewUserToolbar() : CMainFrame
  • OnToolTipText() : CModelessMain
  • OnToolTipTextChanged() : CTesthelpCtrl
  • OnTraceWidth() : CSpiroView
  • OnTransparent() : CAnimateCtrlPage
  • OnTrayContextMenu() : CTrayMenuDlg
  • OnTrayNotify() : CTrayMenuDlg
  • OnTreeCollapsebranch() : CServerView
  • OnTreeDeleteItem() : CObjTreeView , CTypeLibTreeView
  • OnTreeExpandall() : CServerView
  • OnTreeExpandbranch() : CServerView
  • OnTreeExpandonelevel() : CServerView
  • OnTreeItemExpanded() : CObjTreeView , CTypeLibTreeView
  • OnTreeItemExpanding() : CTypeLibTreeView , CObjTreeView
  • OnTreeItemReturn() : CTypeLibTreeView
  • OnTreeReturn() : CObjTreeView
  • OnTreeSelchanged() : CObjTreeView , CTypeLibTreeView
  • OnTreeViewItemExpanding() : CRegistryView
  • OnTwoColumns() : CMainFrame
  • OnTypeChange() : CCustomFileDialog
  • OnUIActivate() : CTestContainer98Item
  • OnUIDeactivate() : CTestContainer98Item
  • OnUnloadHandler() : CDrawDoc
  • OnUnregister() : CRegistryView , CRegisterControlsDlg
  • OnUpdate() : CContainerView , CTestContainer98View , CTypeLibODLView , CTypeLibTreeView , CDrawView , CTrackerView , CServerView , CDrawView , CScribbleView , CRecalcView , CInputView , CMainView , CTypeLibListView , CRegistryView , CObjTreeView
  • OnUpdateAnyRing() : CSpiroView
  • OnUpdateAnySelect() : CDrawView
  • OnUpdateAnyWheel() : CSpiroView
  • OnUpdateAppLook() : CMainFrame
  • OnUpdateBackward1() : CMainFrame
  • OnUpdateBackward2() : CMainFrame
  • OnUpdateBarMenu() : CMainFrame
  • OnUpdateBlack() : CBounceView , CHelloView
  • OnUpdateBlockFmt() : CHTMLEdView
  • OnUpdateBlue() : CBounceView , CHelloView
  • OnUpdateBorderType() : CWordPadView
  • OnUpdateButton() : CDWordArrayView , CIntListView , CTypedPtrArrayView , CTypedPtrListView , CPointArrayView
  • OnUpdateCategorie() : CMainFrame
  • OnUpdateCharStrikeThrough() : CMSOffice2007DemoView
  • OnUpdateChoosePrintFont() : CPadView
  • OnUpdateClock() : CMainFrame
  • OnUpdateCmdUI() : CFormatBar , CClassToolBar , CPropertiesToolBar , CFormatBar , CPropertiesToolBar , CFileViewToolBar , CWorkspaceToolBar , COutputToolBar , CHelpToolBar , CRulerBar
  • OnUpdateColor() : CHelloWnd , CSpiroView , CBounceWnd , CHelloView , CHelloWnd , CHTMLEdView
  • OnUpdateCommand3() : CWorkspaceBar
  • OnUpdateContextHelp() : CInPlaceFrame
  • OnUpdateControlActivate() : CTestContainer98View
  • OnUpdateControlDeactivate() : CTestContainer98View
  • OnUpdateControlDrawMetaFile() : CTestContainer98View
  • OnUpdateControlInvokeMethods() : CTestContainer98View
  • OnUpdateControlLogging() : CTestContainer98View
  • OnUpdateControlSaveToPropertyBag() : CTestContainer98View
  • OnUpdateControlSaveToStorage() : CTestContainer98View
  • OnUpdateControlSaveToStream() : CTestContainer98View
  • OnUpdateControlUIActivate() : CTestContainer98View
  • OnUpdateControlUIDeactivate() : CTestContainer98View
  • OnUpdateCustom() : CBounceView , CHelloView
  • OnUpdateCustomize() : CMainFrame
  • OnUpdateDemoThread() : CRecalcDoc
  • OnUpdateDhelp1() : CDynamicHelpViewBar
  • OnUpdateDhelp2() : CDynamicHelpViewBar
  • OnUpdateDhelp3() : CDynamicHelpViewBar
  • OnUpdateDraw() : CSpiroView
  • OnUpdateDrawEllipse() : CDrawView
  • OnUpdateDrawLine() : CDrawView
  • OnUpdateDrawPattern() : CSpiroView
  • OnUpdateDrawPolygon() : CDrawView
  • OnUpdateDrawRect() : CDrawView
  • OnUpdateDrawRoundRect() : CDrawView
  • OnUpdateDrawSelect() : CDrawView
  • OnUpdateEditAllowInvert() : CTrackerDoc
  • OnUpdateEditBringToFront() : CTestContainer98View
  • OnUpdateEditClear() : CTestContainer98View , CContainerView
  • OnUpdateEditClearAll() : CScribbleDoc , CMainDoc
  • OnUpdateEditClone() : CMainView
  • OnUpdateEditCopy() : CDrawView , CTestContainer98View , CDrawView , CDibView , CContainerView
  • OnUpdateEditCut() : CDrawView , CTestContainer98View
  • OnUpdateEditDeleteAll() : CTestContainer98Doc
  • OnUpdateEditDottedline() : CTrackerDoc
  • OnUpdateEditFind() : CMSOffice2007DemoView , CNotepadView
  • OnUpdateEditGoto() : CNotepadView
  • OnUpdateEditHatchedborder() : CTrackerDoc
  • OnUpdateEditHatchedinside() : CTrackerDoc
  • OnUpdateEditMenu() : CMainView
  • OnUpdateEditPaste() : CServerView , CDrawView , CTestContainer98View , CMainView , CDibView
  • OnUpdateEditProperties() : CTestContainer98View , CDrawView
  • OnUpdateEditReplace() : CMSOffice2007DemoView
  • OnUpdateEditResizeinside() : CTrackerDoc
  • OnUpdateEditResizeoutside() : CTrackerDoc
  • OnUpdateEditSelectAll() : CDrawView , CTestContainer98View , CDrawView
  • OnUpdateEditSendToBack() : CTestContainer98View
  • OnUpdateEditSolidline() : CTrackerDoc
  • OnUpdateElement() : CStringListView
  • OnUpdateExampleUI() : CMainFrame
  • OnUpdateExpand() : CPropertiesViewBar
  • OnUpdateFast() : CBounceView , CBounceWnd , CSpiroView , CBounceWnd
  • OnUpdateFilePlay() : CCubeView
  • OnUpdateFilePrintPreview() : CMainFrame , CSplitFrame , CMainFrame
  • OnUpdateFolderUp() : CExplorerView
  • OnUpdateFontName() : CMainFrame
  • OnUpdateFontSize() : CMainFrame
  • OnUpdateForward1() : CMainFrame
  • OnUpdateForward2() : CMainFrame
  • OnUpdateFourColumns() : CMainFrame
  • OnUpdateFPS() : CChildView
  • OnUpdateGoAddress() : CMSMoneyDemoDoc
  • OnUpdateGoAddressEdit() : CMainFrame
  • OnUpdateGoBack() : CIEDemoView , CMSMoneyDemoDoc
  • OnUpdateGoForward() : CMSMoneyDemoDoc , CIEDemoView
  • OnUpdateGreen() : CBounceView , CHelloView
  • OnUpdateHasSel() : CServerView
  • OnUpdateIfEmbedded() : CWordPadDoc
  • OnUpdateImage() : CChildView
  • OnUpdateImageFormats() : CChildView
  • OnUpdateIndicatorSendReceive() : CMainFrame
  • OnUpdateInsert() : CMainFrame
  • OnUpdateItem2() : CPage1
  • OnUpdateItem4() : CTrayMenuDlg
  • OnUpdateKeyIndicator() : CModelessMain
  • OnUpdateKillWorkerThread() : CRecalcDoc
  • OnUpdateLineNumber() : CMainFrame
  • OnUpdateLineStyle() : COwnerDrawMenuView
  • OnUpdateLinks() : CMainFrame
  • OnUpdateMailHightPriority() : CMailView
  • OnUpdateMailLowPriority() : CMailView
  • OnUpdateMdiTabbed() : CMainFrame
  • OnUpdateMdiTabbedDocument() : CMainFrame
  • OnUpdateMiniFramePropertySheet() : CMainFrame
  • OnUpdateMirrorDisplayFont() : CPadView
  • OnUpdateObjectDelete() : CMainFrame
  • OnUpdateObjectDisplayAsIcon() : CMainView
  • OnUpdateObjectDisplayContent() : CMainView
  • OnUpdateObjectFillColor() : CDrawView
  • OnUpdateObjectLineColor() : CDrawView
  • OnUpdateObjectLineWeight() : CDrawView
  • OnUpdateObjectNoFill() : CDrawView
  • OnUpdateObjectNoLine() : CDrawView
  • OnUpdateObjectProperties() : CDrawView
  • OnUpdateObjectStyles() : CDrawView
  • OnUpdateObjectVerbMenu() : CWordPadDoc
  • OnUpdateObjectVerify() : CMainFrame
  • OnUpdateOleChangeSource() : CMainView
  • OnUpdateOleEditProperties() : CMainView
  • OnUpdateOleVerbPopup() : CWordPadDoc
  • OnUpdateOptionRate() : CWndListDlg
  • OnUpdateOptionsDesignMode() : CTestContainer98View
  • OnUpdateOptionsFreezeEvents() : CTestContainer98Doc
  • OnUpdateOptionsSlowDrawing() : CTestContainer98Doc
  • OnUpdateOptionsTraceLevelNone() : CTestContainer98App
  • OnUpdateOptionsTraceLevelNormal() : CTestContainer98App
  • OnUpdateOptionsTraceLevelVerbose() : CTestContainer98App
  • OnUpdateOptionsTwoPassDrawing() : CTestContainer98Doc
  • OnUpdateOutlookAddPage() : CMainFrame
  • OnUpdateOutlookAnimation() : CMainFrame
  • OnUpdateOutlookBarShortcut() : CMainFrame
  • OnUpdateOutlookDeletePage() : CMainFrame
  • OnUpdateOutlookRenamePage() : CMainFrame
  • OnUpdateOutlookShowTextLabels() : CMainFrame
  • OnUpdatePalette() : CMainFrame
  • OnUpdatePalette2column() : CMainFrame
  • OnUpdatePalette3column() : CMainFrame
  • OnUpdatePaletteMenu() : CMainFrame
  • OnUpdatePaletteTool() : CPaletteDemoDoc
  • OnUpdatePane() : CMainFrame
  • OnUpdatePause() : CSpiroView
  • OnUpdatePauseBlit() : CChildView
  • OnUpdatePauseBlur() : CChildView
  • OnUpdatePauseDrawing() : CSpiroView
  • OnUpdatePauseSwarm() : CChildView
  • OnUpdatePenThickOrThin() : CScribbleDoc
  • OnUpdatePenWidth() : CSpiroView
  • OnUpdatePercentDone() : CMainFrame
  • OnUpdatePrintLayout() : CMSOffice2007DemoView
  • OnUpdateProperies1() : CPropertiesViewBar
  • OnUpdateProperies2() : CPropertiesViewBar
  • OnUpdatePropertySheetWithPreview() : CShapesView
  • OnUpdatePropListAlphabetMode() : CPropertiesViewBar
  • OnUpdatePropListTreeMode() : CPropertiesViewBar
  • OnUpdateRed() : CBounceView , CHelloView
  • OnUpdateRefresh() : CMainFrame
  • OnUpdateRemoveRing() : CSpiroView
  • OnUpdateRemoveWheel() : CSpiroView
  • OnUpdateResetPage() : CMainFrame
  • OnUpdateResolution() : CChildView
  • OnUpdateRibbonBtn7() : CMainFrame
  • OnUpdateRibbonBtn8() : CMainFrame
  • OnUpdateRibbonBtn9() : CMainFrame
  • OnUpdateRibbonObtn10() : CMainFrame
  • OnUpdateRibbonObtn8() : CMainFrame
  • OnUpdateScheduleDisplay() : CSchedulerDlg
  • OnUpdateSectionRemove() : CMFCBindDoc
  • OnUpdateSelection() : CDrawView
  • OnUpdateSimplePropertySheet() : CShapesView
  • OnUpdateSingleSelect() : CDrawView
  • OnUpdateSizeDouble() : CChildView
  • OnUpdateSizeFill() : CChildView
  • OnUpdateSizeHalf() : CChildView
  • OnUpdateSizeOriginal() : CChildView
  • OnUpdateSlow() : CBounceView , CSpiroView , CBounceWnd
  • OnUpdateSort() : CClassViewBar
  • OnUpdateSortingprop() : CPropertiesViewBar
  • OnUpdateStatus() : CSpeakNDlg
  • OnUpdateStatusBarMenu() : CModelessMain
  • OnUpdateStyle() : CMainFrame
  • OnUpdateSystemColors() : CMSMVisualManager
  • OnUpdateThreeColumns() : CMainFrame
  • OnUpdateTime() : CWndListDlg
  • OnUpdateTimerTick() : CSpiroView
  • OnUpdateToolbarButtons() : CHTMLEdView
  • OnUpdateToolBarMenu() : CModelessMain
  • OnUpdateToolsViewUserToolbar() : CMainFrame
  • OnUpdateTraceWidth() : CSpiroView
  • OnUpdateTreeCollapsebranch() : CServerView
  • OnUpdateTreeExpandall() : CServerView
  • OnUpdateTreeExpandbranch() : CServerView
  • OnUpdateTreeExpandonelevel() : CServerView
  • OnUpdateTwoColumns() : CMainFrame
  • OnUpdateUI() : CHTMLEdView
  • OnUpdateUseInProcHandler() : CMainFrame , CObjTreeView
  • OnUpdateUseInProcServer() : CObjTreeView , CMainFrame
  • OnUpdateUseLocalServer() : CMainFrame , CObjTreeView
  • OnUpdateValue() : CBoundedNumberSubProp , CBoundedNumberPairProp , CSliderProp
  • OnUpdateViewAddressBar() : CMainFrame
  • OnUpdateViewCaptionbar() : CMainFrame
  • OnUpdateViewCaptionBar() : CMainFrame
  • OnUpdateViewClass() : CMainFrame
  • OnUpdateViewClientWidthSel() : CRowListView
  • OnUpdateViewDetails() : CExplorerView , CRowListView
  • OnUpdateViewDialogBar() : CMainFrame
  • OnUpdateViewDlgbartop() : CMainFrame
  • OnUpdateViewDocMap() : CMSOffice2007DemoView
  • OnUpdateViewDynamichelp() : CMainFrame
  • OnUpdateViewEditingtoolbar() : CMainFrame
  • OnUpdateViewExplorerbar() : CMainFrame
  • OnUpdateViewFile() : CMainFrame
  • OnUpdateViewFolderList() : CMainFrame
  • OnUpdateViewFolders() : CMainFrame
  • OnUpdateViewFullRowDetails() : CRowListView
  • OnUpdateViewGrid() : CDrawView
  • OnUpdateViewGridLines() : CMSOffice2007DemoView
  • OnUpdateViewGroupByKind() : CTypeLibWnd
  • OnUpdateViewInfobar() : CMainFrame
  • OnUpdateViewLargeicon() : CExplorerView
  • OnUpdateViewLargeIcons() : CRowListView
  • OnUpdateViewLinksBar() : CMainFrame
  • OnUpdateViewList() : CRowListView , CExplorerView
  • OnUpdateViewMacroBar() : CMainFrame
  • OnUpdateViewMessageBar() : CMainFrame
  • OnUpdateViewOutlookbar() : CMainFrame
  • OnUpdateViewOutlookBar() : CMainFrame
  • OnUpdateViewOutput() : CMainFrame
  • OnUpdateViewPreviewPane() : COutlookDemoView
  • OnUpdateViewProperties() : CMainFrame
  • OnUpdateViewProps() : CMSOffice2007DemoView
  • OnUpdateViewRefresh() : CMainFrame , CMSMoneyDemoDoc
  • OnUpdateViewResource() : CMainFrame
  • OnUpdateViewRtl() : CMainFrame
  • OnUpdateViewRuler() : CMSOffice2007DemoView
  • OnUpdateViewShowObjects() : CDrawView
  • OnUpdateViewSmallicon() : CExplorerView
  • OnUpdateViewSmallIcons() : CRowListView
  • OnUpdateViewSource() : CMainFrame
  • OnUpdateViewStateIcons() : CRowListView
  • OnUpdateViewStatusBar() : CMainFrame
  • OnUpdateViewStop() : CMSMoneyDemoDoc
  • OnUpdateViewTaskpane() : CMainFrame
  • OnUpdateViewTextlabels() : CMainFrame
  • OnUpdateViewThemeToolbar() : CMainFrame
  • OnUpdateViewThumb() : CMSOffice2007DemoView
  • OnUpdateViewToolsPalette() : CMainFrame
  • OnUpdateViewWatch() : CMainFrame
  • OnUpdateViewWeb() : CMainFrame
  • OnUpdateViewWorkspace() : CMainFrame
  • OnUpdateViewWorkspace2() : CMainFrame
  • OnUpdateWhite() : CBounceView , CHelloView
  • OnUpdateWindowManager() : CMainFrame
  • OnUpdateWordWrap() : CPadView
  • OnUpdateWriteClipboard() : CMainFrame
  • OnUpdateZoom() : CServerView
  • OnUpdateZoomIn() : CSpiroView
  • OnUpdateZoomOut() : CSpiroView
  • OnUseDispatch() : CAutoDrivDlg
  • OnUseInProcHandler() : CMainFrame , CObjTreeView
  • OnUseInProcServer() : CObjTreeView , CMainFrame
  • OnUseLocalServer() : CObjTreeView , CMainFrame
  • OnUseMyHelpChanged() : CTesthelpCtrl
  • OnUsePopupHelpChanged() : CTesthelpCtrl
  • OnUsetooltipClicked() : CTesthelpPropPage
  • OnVerifyAll() : CNetAddrVerifierDlg
  • OnVerifyIPv4() : CNetAddrVerifierApp , CNetAddrVerifierDlg
  • OnVerifyIPv6() : CNetAddrVerifierDlg
  • OnVerifyNamed() : CNetAddrVerifierDlg
  • OnView() : CInterfaceViewer , CTypeLibViewer , CDispatchViewer , CDataObjectViewer
  • OnViewAddressBar() : CMainFrame
  • OnViewAppLook() : CWordPadApp , COutlookDemoApp , CVisualStudioDemoApp
  • OnViewBack() : COutlookDemoDoc
  • OnViewBar() : CMainFrame
  • OnViewCaptionbar() : CMainFrame
  • OnViewCaptionBar() : CMainFrame
  • OnViewClass() : CMainFrame
  • OnViewClientWidthSel() : CRowListView
  • OnViewCustomize() : CMailFrame , CMainFrame
  • OnViewDetails() : CRowListView , CExplorerView
  • OnViewDialogBar() : CMainFrame
  • OnViewDlgbarTop() : CMainFrame
  • OnViewDocMap() : CMSOffice2007DemoView
  • OnViewDynamichelp() : CMainFrame
  • OnViewEditingtoolbar() : CMainFrame
  • OnViewExplorerbar() : CMainFrame
  • OnViewFile() : CMainFrame
  • OnViewFindNext() : CNotepadView
  • OnViewFolderList() : CMainFrame
  • OnViewFolders() : CMainFrame
  • OnViewFoldersPopup() : CMainFrame
  • OnViewFontsLarge() : CIEDemoView , CMfcieView
  • OnViewFontsLargest() : CMfcieView , CIEDemoView
  • OnViewFontsMedium() : CIEDemoView , CMfcieView
  • OnViewFontsSmall() : CIEDemoView , CMfcieView
  • OnViewFontsSmallest() : CIEDemoView , CMfcieView
  • OnViewFullRowDetails() : CRowListView
  • OnViewFullScreen() : CMainFrame
  • OnViewGrid() : CDrawView
  • OnViewGridLines() : CMSOffice2007DemoView
  • OnViewGroupKind() : CTypeLibWnd
  • OnViewInfobar() : CMainFrame
  • OnViewLargeicon() : CExplorerView
  • OnViewLargeIcons() : CRowListView
  • OnViewLinksBar() : CMainFrame
  • OnViewList() : CRowListView , CExplorerView
  • OnViewLong() : CMainFrame
  • OnViewMacroBar() : CMainFrame
  • OnViewMessageBar() : CMainFrame
  • OnViewMyComputer() : CMainFrame
  • OnViewOptions() : CWordPadDoc
  • OnViewOutlookbar() : CMainFrame
  • OnViewOutlookBar() : CMainFrame
  • OnViewOutput() : CMainFrame , COutputList1 , CMainFrame , COutputList
  • OnViewPalette() : CMainFrame
  • OnViewPaperColor() : CDrawDoc
  • OnViewPauseBlit() : CChildView
  • OnViewPauseBlur() : CChildView
  • OnViewPauseSwarm() : CChildView
  • OnViewPreviewPane() : COutlookDemoView
  • OnViewProperties() : CMainFrame
  • OnViewProps() : CMSOffice2007DemoView
  • OnViewRefresh() : CIEDemoView , CExplorerView , CMSMoneyDemoDoc , CMfcieView , CMainFrame
  • OnViewResource() : CMainFrame
  • OnViewRtl() : CMainFrame
  • OnViewRuler() : CMSOffice2007DemoView
  • OnViewSethandlesize() : CTrackerView
  • OnViewSetminimumsize() : CTrackerView
  • OnViewShort() : CMainFrame
  • OnViewShowObjects() : CDrawView
  • OnViewSmallicon() : CExplorerView
  • OnViewSmallIcons() : CRowListView
  • OnViewSource() : CMainFrame
  • OnViewStateIcons() : CRowListView
  • OnViewStatusBar() : CMainFrame
  • OnViewStop() : CMfcieView , CIEDemoView , CMSMoneyDemoDoc
  • OnViewTaskpane() : CMainFrame
  • OnViewTextlabels() : CMainFrame
  • OnViewThemeToolbar() : CMainFrame
  • OnViewToolsPalette() : CMainFrame
  • OnViewTypeInfo() : CDispatchDlg
  • OnViewUp() : COutlookDemoDoc
  • OnViewUpdatenow() : CPadDoc
  • OnViewWatch() : CMainFrame
  • OnViewWeb() : CMainFrame
  • OnViewWorkspace() : CMainFrame
  • OnViewWorkSpace() : CMainFrame
  • OnViewWorkspace2() : CMainFrame
  • OnViewZoomCustom() : CServerView
  • OnVisualManager() : CTasksPaneView
  • OnVScroll() : CParsedEdit
  • OnWebAddress() : COutlookDemoDoc
  • OnWebBack() : COutlookDemoDoc
  • OnWebFind() : COutlookDemoDoc
  • OnWebRefresh() : COutlookDemoDoc
  • OnWebStart() : COutlookDemoDoc
  • OnWindowlessDefWindowMessage() : CTestContainer98View
  • OnWindowlessDragEnter() : CTestContainer98Item
  • OnWindowlessDragLeave() : CTestContainer98Item
  • OnWindowlessDragOver() : CTestContainer98Item
  • OnWindowlessDrop() : CTestContainer98Item
  • OnWindowlessReleaseCapture() : CTestContainer98View
  • OnWindowlessReleaseFocus() : CTestContainer98View
  • OnWindowlessSetCapture() : CTestContainer98View
  • OnWindowlessSetFocus() : CTestContainer98View
  • OnWindowManager() : CMainFrame
  • OnWindowMessage() : CTestContainer98Item
  • OnWindowPosChanged() : CRulerBar
  • OnWindowPosChanging() : COutputList1 , CView3 , CRulerBar , CView4 , CView1 , CRulerBar , CView2
  • OnWindowTileHorz() : CMainFrame
  • OnWordWrap() : CPadView
  • OnWorkAreas() : CListHdrDlg
  • OnWraplabels() : CTasksPaneView
  • OnWraptasks() : CTasksPaneView
  • OnWriteClipboard() : CMainFrame
  • OnXpButtons() : CPage1
  • OnYellow() : CSpiroView
  • OnZoom() : CServerView , CMainFrame
  • OnZoomIn() : CSpiroView
  • OnZoomOut() : CSpiroView
  • OnZoomSlider() : CMainFrame
  • Open() : CKey
  • OpenScheduler() : CSchedulerDlg
  • operator __m128i() : CSSE2Unsigned16Saturated
  • operator __m64() : CMMXUnsigned16Saturated
  • operator COLORREF() : SHAPE_COLOR
  • operator const FUNCDESC *() : CSmartFuncDesc
  • operator const VARDESC *() : CSmartVarDesc
  • operator CPoint() : CVector
  • operator delete() : CBounceThread
  • operator int() : SHAPE_COLOR
  • operator ULONGLONG() : CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated
  • operator&() : CSmartFuncDesc , CSmartTypeAttr , CSmartVarDesc
  • operator&=() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • operator+() : CVector
  • operator+=() : CVector , CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • operator-() : CVector
  • operator-=() : CVector , CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • operator->() : CSmartFuncDesc , CSmartVarDesc , CSmartTypeAttr
  • operator<<() : CLog , COutputWindowLog , CFileLog , CLog , CDebugLog , CNullLog
  • operator<<=() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • operator=() : CMMXUnsigned16Saturated , SHAPE_COLOR , CSSE2Unsigned16Saturated , CVector , CAmbientProperty , CMyScheduler , CEntryInfoDlg , CUnit , CSSE2Unsigned16Saturated , SHAPE_COLOR , CRibbonListFontButton::XItem , CMMXUnsigned16Saturated , CUnit , CVector , CMMXUnsigned16Saturated
  • operator==() : CParaFormat , CCharFormat , CParaFormat
  • operator>>=() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • operator|=() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • OutputPercent() : CTrackFile
  • OutputString() : CTrackFile
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- z -

  • ZoomChange() : CSpiroView
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- ~ -

  • ~C3WaySplitterFrame() : C3WaySplitterFrame
  • ~CAddressCombo() : CAddressCombo
  • ~CAllControlsSheet() : CAllControlsSheet
  • ~CAutoClickDoc() : CAutoClickDoc
  • ~CAutoClickPoint() : CAutoClickPoint
  • ~CAutoClickView() : CAutoClickView
  • ~CBallThread() : CBallThread
  • ~CBitmapProperty() : CBitmapProperty
  • ~CBkfstPage() : CBkfstPage
  • ~CBounceDoc() : CBounceDoc
  • ~CBounceFrame() : CBounceFrame
  • ~CBounceThread() : CBounceThread
  • ~CBounceView() : CBounceView
  • ~CButtonCtrl() : CButtonCtrl
  • ~CButtonDialog() : CButtonDialog
  • ~CCalcDlg() : CCalcDlg
  • ~CCalendarBar() : CCalendarBar
  • ~CChildFrame() : CChildFrame
  • ~CChildView() : CChildView
  • ~CCircCtrl() : CCircCtrl
  • ~CClassTreeWnd() : CClassTreeWnd
  • ~CClassViewBar() : CClassViewBar
  • ~CCollectDoc() : CCollectDoc
  • ~CCollectView() : CCollectView
  • ~CColorMenu() : CColorMenu
  • ~CColorView() : CColorView
  • ~CCommandLinkCtrlPage() : CCommandLinkCtrlPage
  • ~CConfigDlg() : CConfigDlg
  • ~CContainerDoc() : CContainerDoc
  • ~CContainerItem() : CContainerItem
  • ~CContainerView() : CContainerView
  • ~CCounterThread() : CCounterThread
  • ~CCubeDoc() : CCubeDoc
  • ~CCubeView() : CCubeView
  • ~CCustomFileDialog() : CCustomFileDialog
  • ~CCustomList() : CCustomList
  • ~CCustomPagesDoc() : CCustomPagesDoc
  • ~CCustomPagesView() : CCustomPagesView
  • ~CCustomSliderCtrl() : CCustomSliderCtrl
  • ~CCustomToolTipCtrl() : CCustomToolTipCtrl
  • ~CDataObjectViewer() : CDataObjectViewer
  • ~CDateTimePage() : CDateTimePage
  • ~CDBVListDoc() : CDBVListDoc
  • ~CDBVListView() : CDBVListView
  • ~CDebugLog() : CDebugLog
  • ~CDemoOptionsPage() : CDemoOptionsPage
  • ~CDibDoc() : CDibDoc
  • ~CDibView() : CDibView
  • ~CDinnerPage() : CDinnerPage
  • ~CDispatchViewer() : CDispatchViewer
  • ~CDisplayThread() : CDisplayThread
  • ~CDlgBanner() : CDlgBanner
  • ~CDlgStatusBar() : CDlgStatusBar
  • ~CDlgToolBar() : CDlgToolBar
  • ~CDockDoc() : CDockDoc
  • ~CDockView() : CDockView
  • ~CDocOptPage() : CDocOptPage
  • ~CDrawDoc() : CDrawDoc
  • ~CDrawItem() : CDrawItem
  • ~CDrawObj() : CDrawObj
  • ~CDrawOleObj() : CDrawOleObj
  • ~CDrawPoly() : CDrawPoly
  • ~CDrawView() : CDrawView
  • ~CDriverDlg() : CDriverDlg
  • ~CDriverDoc() : CDriverDoc
  • ~CDriverView() : CDriverView
  • ~CDWordArrayView() : CDWordArrayView
  • ~CDynaMDIChildWnd() : CDynaMDIChildWnd
  • ~CDynaMenuDoc() : CDynaMenuDoc
  • ~CDynaMenuView() : CDynaMenuView
  • ~CDynamicHelpViewBar() : CDynamicHelpViewBar
  • ~CDynamicMenuDoc() : CDynamicMenuDoc
  • ~CDynamicMenuView() : CDynamicMenuView
  • ~CEditBar() : CEditBar
  • ~CEditToolbar() : CEditToolbar
  • ~CEmpView() : CEmpView
  • ~CEntryInfoDlg() : CEntryInfoDlg
  • ~CEnumVariant() : CEnumVariant
  • ~CEventLoggingPage() : CEventLoggingPage
  • ~CExcepInfo() : CExcepInfo
  • ~CExplorerBar() : CExplorerBar
  • ~CExplorerDoc() : CExplorerDoc
  • ~CExplorerView() : CExplorerView
  • ~CExtendedControl() : CExtendedControl
  • ~CFavorit() : CFavorit
  • ~CFavoritesManager() : CFavoritesManager
  • ~CFeaturesPage() : CFeaturesPage
  • ~CFigure() : CFigure
  • ~CFileLog() : CFileLog
  • ~CFileViewBar() : CFileViewBar
  • ~CFolderBar() : CFolderBar
  • ~CFolderListBar() : CFolderListBar
  • ~CFolderListPopupWnd() : CFolderListPopupWnd
  • ~CFoldersTree() : CFoldersTree
  • ~CFormatTabDlg() : CFormatTabDlg
  • ~CGDIThread() : CGDIThread
  • ~CHelloDoc() : CHelloDoc
  • ~CHelloFrame() : CHelloFrame
  • ~CHelloView() : CHelloView
  • ~CHistoryObj() : CHistoryObj
  • ~CHTMLEdDoc() : CHTMLEdDoc
  • ~CHTMLEdView() : CHTMLEdView
  • ~CIconCombo() : CIconCombo
  • ~CIconComboBox() : CIconComboBox
  • ~CIDataObjectDlg() : CIDataObjectDlg
  • ~CIEDemoDoc() : CIEDemoDoc
  • ~CIEDemoView() : CIEDemoView
  • ~CImageCtrl() : CImageCtrl
  • ~CImpIAdviseSink() : CImpIAdviseSink
  • ~CInfoBar() : CInfoBar
  • ~CInPlaceFrame() : CInPlaceFrame
  • ~CInputView() : CInputView
  • ~CInterfaceInfo() : CInterfaceInfo
  • ~CInterfacesPage() : CInterfacesPage
  • ~CInterfaceViewer() : CInterfaceViewer
  • ~CIntListView() : CIntListView
  • ~CItemData() : CItemData
  • ~CItemIcons() : CItemIcons
  • ~CKey() : CKey
  • ~CLicensedCtrl() : CLicensedCtrl
  • ~CLineStyleMenuItem() : CLineStyleMenuItem
  • ~CLineThread() : CLineThread
  • ~CLinkButton() : CLinkButton
  • ~CLinksBar() : CLinksBar
  • ~CListHdrDlg() : CListHdrDlg
  • ~CListOutputFrame() : CListOutputFrame
  • ~CListViewEx() : CListViewEx
  • ~CLocalizeCtrl() : CLocalizeCtrl
  • ~CLog() : CLog
  • ~CLunchPage() : CLunchPage
  • ~CMacroComboBox() : CMacroComboBox
  • ~CMailFrame() : CMailFrame
  • ~CMailView() : CMailView
  • ~CMainDoc() : CMainDoc
  • ~CMainFrame() : CMainFrame
  • ~CMainView() : CMainView
  • ~CMapDWordToMyStructView() : CMapDWordToMyStructView
  • ~CMapStringToStringView() : CMapStringToStringView
  • ~CMDITabsDemoDoc() : CMDITabsDemoDoc
  • ~CMDITabsDemoView() : CMDITabsDemoView
  • ~CMenuSubSetDoc() : CMenuSubSetDoc
  • ~CMenuSubSetView() : CMenuSubSetView
  • ~CMetaFileWnd() : CMetaFileWnd
  • ~CMethodDlg() : CMethodDlg
  • ~CMethodInfo() : CMethodInfo
  • ~CMethodParamInfo() : CMethodParamInfo
  • ~CMFCBindCntrItem() : CMFCBindCntrItem
  • ~CMFCBindDoc() : CMFCBindDoc
  • ~CMFCBindView() : CMFCBindView
  • ~CMfcieDoc() : CMfcieDoc
  • ~CMfcieView() : CMfcieView
  • ~CMFCRibbonNumEdit() : CMFCRibbonNumEdit
  • ~CModelessDialog() : CModelessDialog
  • ~CModelessMain() : CModelessMain
  • ~CMonthCalPage() : CMonthCalPage
  • ~CMSMCaptionBar() : CMSMCaptionBar
  • ~CMSMCaptionBarButton() : CMSMCaptionBarButton
  • ~CMSMCategoryBar() : CMSMCategoryBar
  • ~CMSMCategoryBarButton() : CMSMCategoryBarButton
  • ~CMSMLinksBar() : CMSMLinksBar
  • ~CMSMLinksBarButton() : CMSMLinksBarButton
  • ~CMSMMenuBar() : CMSMMenuBar
  • ~CMSMoneyDemoDoc() : CMSMoneyDemoDoc
  • ~CMSMoneyDemoView() : CMSMoneyDemoView
  • ~CMSMTasksPane() : CMSMTasksPane
  • ~CMSMToolBar() : CMSMToolBar
  • ~CMSMVisualManager() : CMSMVisualManager
  • ~CMSNVisualManager() : CMSNVisualManager
  • ~CMSOffice2007DemoCntrItem() : CMSOffice2007DemoCntrItem
  • ~CMSOffice2007DemoDoc() : CMSOffice2007DemoDoc
  • ~CMSOffice2007DemoView() : CMSOffice2007DemoView
  • ~CMutexesDlg() : CMutexesDlg
  • ~CMyListCtrl() : CMyListCtrl
  • ~CMyMenuBar() : CMyMenuBar
  • ~CMyObject() : CMyObject
  • ~CMyPropertyPage1() : CMyPropertyPage1
  • ~CMyPropertyPage2() : CMyPropertyPage2
  • ~CMyPropertyPage3() : CMyPropertyPage3
  • ~CMyPropertyPage4() : CMyPropertyPage4
  • ~CMyPropertySheet() : CMyPropertySheet
  • ~CMyScheduler() : CMyScheduler
  • ~CMyToolTipCtrl() : CMyToolTipCtrl
  • ~CMyTreeCtrl() : CMyTreeCtrl
  • ~CNetAddressCtrlPage() : CNetAddressCtrlPage
  • ~CNetAddrVerifierDlg() : CNetAddrVerifierDlg
  • ~CNotepadDoc() : CNotepadDoc
  • ~CNotepadView() : CNotepadView
  • ~CNotifyShowCase() : CNotifyShowCase
  • ~CNullLog() : CNullLog
  • ~CObjectData() : CObjectData
  • ~CObjListView() : CObjListView
  • ~CObjTreeView() : CObjTreeView
  • ~COle2ViewDoc() : COle2ViewDoc
  • ~COptionsDlg() : COptionsDlg
  • ~COptionsPage1() : COptionsPage1
  • ~COptionsPage12() : COptionsPage12
  • ~COptionsPage21() : COptionsPage21
  • ~COptionsPage22() : COptionsPage22
  • ~COptionsPage31() : COptionsPage31
  • ~COptionsPage32() : COptionsPage32
  • ~COutlookDemoDoc() : COutlookDemoDoc
  • ~COutlookDemoView() : COutlookDemoView
  • ~COutlookMultiViewsDoc() : COutlookMultiViewsDoc
  • ~COutlookMultiViewsView() : COutlookMultiViewsView
  • ~COutputBar() : COutputBar
  • ~COutputList() : COutputList
  • ~COutputList1() : COutputList1
  • ~COutputViewBar() : COutputViewBar
  • ~COutputWindowLog() : COutputWindowLog
  • ~COutputWindowView() : COutputWindowView
  • ~COwnerDrawMenuDoc() : COwnerDrawMenuDoc
  • ~COwnerDrawMenuView() : COwnerDrawMenuView
  • ~CPadDoc() : CPadDoc
  • ~CPage1() : CPage1
  • ~CPage2() : CPage2
  • ~CPage3() : CPage3
  • ~CPage4() : CPage4
  • ~CPage5() : CPage5
  • ~CPage6() : CPage6
  • ~CPagerCtrlPage() : CPagerCtrlPage
  • ~CPalCtrl() : CPalCtrl
  • ~CPaletteBar() : CPaletteBar
  • ~CPaletteDemoDoc() : CPaletteDemoDoc
  • ~CPaletteDemoView() : CPaletteDemoView
  • ~CPointArrayView() : CPointArrayView
  • ~CPreviewPane() : CPreviewPane
  • ~CProgCtrlPage() : CProgCtrlPage
  • ~CPropertiesViewBar() : CPropertiesViewBar
  • ~CProperty() : CProperty
  • ~CPropertyBag() : CPropertyBag
  • ~CPropertyChangesPage() : CPropertyChangesPage
  • ~CPropertySection() : CPropertySection
  • ~CPropertySet() : CPropertySet
  • ~CPropSliderCtrl() : CPropSliderCtrl
  • ~CPushCtrl() : CPushCtrl
  • ~CRebarTestDoc() : CRebarTestDoc
  • ~CRebarTestView() : CRebarTestView
  • ~CRecalcDoc() : CRecalcDoc
  • ~CRecalcView() : CRecalcView
  • ~CRectItem() : CRectItem
  • ~CRectThread() : CRectThread
  • ~CRegEntry() : CRegEntry
  • ~CRegistryView() : CRegistryView
  • ~CResourcePage() : CResourcePage
  • ~CResourceViewBar() : CResourceViewBar
  • ~CRibbonGadgetsDoc() : CRibbonGadgetsDoc
  • ~CRibbonGadgetsView() : CRibbonGadgetsView
  • ~CRibbonListButton() : CRibbonListButton
  • ~CRibbonListFontButton() : CRibbonListFontButton
  • ~CRibbonMDIDemoDoc() : CRibbonMDIDemoDoc
  • ~CRibbonMDIDemoView() : CRibbonMDIDemoView
  • ~CRibbonTableButton() : CRibbonTableButton
  • ~CRibbonTooltipCtrl() : CRibbonTooltipCtrl
  • ~CRoamer() : CRoamer
  • ~CRollupPaneDoc() : CRollupPaneDoc
  • ~CRollupPaneView() : CRollupPaneView
  • ~CRowListDoc() : CRowListDoc
  • ~CRowListView() : CRowListView
  • ~CRulerBar() : CRulerBar
  • ~CRulerItem() : CRulerItem
  • ~CScribbleDoc() : CScribbleDoc
  • ~CScribbleItem() : CScribbleItem
  • ~CScribbleView() : CScribbleView
  • ~CScript() : CScript
  • ~CScriptManager() : CScriptManager
  • ~CSearchBox() : CSearchBox
  • ~CServerDC() : CServerDC
  • ~CServerDoc() : CServerDoc
  • ~CServerItem() : CServerItem
  • ~CServerNode() : CServerNode
  • ~CServerView() : CServerView
  • ~CServicesPage() : CServicesPage
  • ~CSetPaneSizeDoc() : CSetPaneSizeDoc
  • ~CSetPaneSizeView() : CSetPaneSizeView
  • ~CShapesDoc() : CShapesDoc
  • ~CShapesView() : CShapesView
  • ~CSliderButton() : CSliderButton
  • ~CSliderCtrlPage() : CSliderCtrlPage
  • ~CSliderDoc() : CSliderDoc
  • ~CSliderView() : CSliderView
  • ~CSmartFuncDesc() : CSmartFuncDesc
  • ~CSmartTypeAttr() : CSmartTypeAttr
  • ~CSmartVarDesc() : CSmartVarDesc
  • ~CSnapDoc() : CSnapDoc
  • ~CSnapPropertySheet() : CSnapPropertySheet
  • ~CSnapView() : CSnapView
  • ~CSourceView() : CSourceView
  • ~CSpinCtrlPage() : CSpinCtrlPage
  • ~CSpindialCtrl() : CSpindialCtrl
  • ~CSpiroDoc() : CSpiroDoc
  • ~CSpiroView() : CSpiroView
  • ~CSplitButtonCtrlPage() : CSplitButtonCtrlPage
  • ~CSplitFrame() : CSplitFrame
  • ~CSplitterFrame() : CSplitterFrame
  • ~CStandardBar() : CStandardBar
  • ~CStartView() : CStartView
  • ~CStateCollectionDoc() : CStateCollectionDoc
  • ~CStateCollectionView() : CStateCollectionView
  • ~CStatPage() : CStatPage
  • ~CStatusBarDemoDoc() : CStatusBarDemoDoc
  • ~CStatusBarDemoView() : CStatusBarDemoView
  • ~CStringCollect() : CStringCollect
  • ~CStringListView() : CStringListView
  • ~CSummPage() : CSummPage
  • ~CSurface() : CSurface
  • ~CSwarm() : CSwarm
  • ~CTabbedViewDoc() : CTabbedViewDoc
  • ~CTabbedViewView() : CTabbedViewView
  • ~CTabControlDoc() : CTabControlDoc
  • ~CTabControlView() : CTabControlView
  • ~CTaskPane() : CTaskPane
  • ~CTasksPaneDoc() : CTasksPaneDoc
  • ~CTasksPaneView() : CTasksPaneView
  • ~CTCBindHost() : CTCBindHost
  • ~CTCSplitter() : CTCSplitter
  • ~CTestContainer98Doc() : CTestContainer98Doc
  • ~CTestContainer98Item() : CTestContainer98Item
  • ~CTestContainer98View() : CTestContainer98View
  • ~CTesthelpCtrl() : CTesthelpCtrl
  • ~CTextView() : CTextView
  • ~CTheApp() : CTheApp
  • ~CThreadDoc() : CThreadDoc
  • ~CThreadView() : CThreadView
  • ~CTimeCtrl() : CTimeCtrl
  • ~CToolBarCtrlPage() : CToolBarCtrlPage
  • ~CToolbarDateTimePickerDoc() : CToolbarDateTimePickerDoc
  • ~CToolbarDateTimePickerView() : CToolbarDateTimePickerView
  • ~CToolsPalette() : CToolsPalette
  • ~CTooltipDemoDoc() : CTooltipDemoDoc
  • ~CTooltipDemoView() : CTooltipDemoView
  • ~CTrackerDoc() : CTrackerDoc
  • ~CTrackerView() : CTrackerView
  • ~CTrackFile() : CTrackFile
  • ~CTrayMenuDlg() : CTrayMenuDlg
  • ~CTreeCtrlPage() : CTreeCtrlPage
  • ~CTreeItem() : CTreeItem
  • ~CTypedPtrArrayView() : CTypedPtrArrayView
  • ~CTypedPtrListView() : CTypedPtrListView
  • ~CTypedPtrMapView() : CTypedPtrMapView
  • ~CTypeLibListView() : CTypeLibListView
  • ~CTypeLibODLView() : CTypeLibODLView
  • ~CTypeLibTreeView() : CTypeLibTreeView
  • ~CTypeLibViewer() : CTypeLibViewer
  • ~CTypeLibWnd() : CTypeLibWnd
  • ~CUndoBar() : CUndoBar
  • ~CUndoListBox() : CUndoListBox
  • ~CVariantAssoc() : CVariantAssoc
  • ~CVariantMap() : CVariantMap
  • ~CView1() : CView1
  • ~CView2() : CView2
  • ~CView3() : CView3
  • ~CView4() : CView4
  • ~CViewExSplitWnd() : CViewExSplitWnd
  • ~CVisualStudioDemoApp() : CVisualStudioDemoApp
  • ~CVisualStudioDemoDoc() : CVisualStudioDemoDoc
  • ~CVisualStudioDemoView() : CVisualStudioDemoView
  • ~CWatchBar() : CWatchBar
  • ~CWordPadApp() : CWordPadApp
  • ~CWorkspaceBar() : CWorkspaceBar
  • ~CWorkspaceBar2() : CWorkspaceBar2
  • ~CWorkspaceObj() : CWorkspaceObj
  • ~CWorkSpaceToolBarDoc() : CWorkSpaceToolBarDoc
  • ~CWorkSpaceToolBarView() : CWorkSpaceToolBarView
  • ~CXlistCtrl() : CXlistCtrl
  • ~NewControlsPropSheet() : NewControlsPropSheet
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- b -

  • BEGIN_OLEFACTORY() : CLicensedCtrl
  • BeginAdjust() : CStandardBar , CPaletteBar
  • BeginDrag() : CStandardBar , CPaletteBar
  • BlitBits() : CSurface
  • BlurBits() : CMMXSurface24Intrinsic , CMMXSurface16Intrinsic , CSSE2Surface32Intrinsic , CSSE2Surface24Intrinsic , CSSE2Surface16Intrinsic , CSurface , CMMXSurface32Intrinsic
  • Bounce() : CRoamer
  • BoxDone() : CMainDlg
  • BringToFront() : CTestContainer98Doc
  • BroadcastAmbientPropertyChange() : CTestContainer98Doc
  • bSetupPixelFormat() : CCubeView
  • Build() : CFavorit
  • BuildFavoritesMenu() : CMainFrame
  • Button() : mfccalc::ICalcDlg , CCalcDlg , CRemoteCalcDlg
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- c -

  • C3WaySplitterFrame() : C3WaySplitterFrame
  • CAboutBox() : CAboutBox
  • CAboutDlg() : CAboutDlg
  • CAdderDialog() : CAdderDialog
  • CAddNodeDlg() : CAddNodeDlg
  • CAddressCombo() : CAddressCombo
  • CalcActualItemSize() : CServerView
  • CalcActualViewSize() : CServerView
  • CalcBounding() : CServerDoc , CServerNode
  • CalcDynamicLayout() : CEditBar
  • CalcFixedLayout() : CMacroDialogBar , CRulerBar , CMSMCaptionBar , CRulerBar
  • CalcNodeSize() : CServerNode
  • CalcScaledItemSize() : CServerView
  • CalcScaledViewSize() : CServerView
  • CalcSize() : CToolsPalette , CUndoBar
  • CalcWindowRect() : CInPlaceFrame , CWordPadView , CInPlaceFrame , CWordPadView
  • CAllControlsSheet() : CAllControlsSheet
  • CallInterfaceViewer() : CObjTreeView
  • CAmbientPropertiesDlg() : CAmbientPropertiesDlg
  • CAmbientProperty() : CAmbientProperty
  • CanAcceptPane() : CFolderListBar
  • CanBeRestored() : CLinksBar
  • CanBeStretched() : CSliderButton
  • CanChangeFillColor() : CDrawObj , CDrawRect , CDrawOleObj
  • CanChangeLineColor() : CDrawObj , CDrawOleObj
  • CanChangeLineWeight() : CDrawObj , CDrawOleObj
  • CanCloseFrame() : CTestContainer98Doc , CDrawDoc
  • CanDeactivateInplace() : CDrawDoc
  • CAnimateCtrlPage() : CAnimateCtrlPage
  • CanInPlaceActivate() : CTestContainer98Item
  • CanWindowlessActivate() : CTestContainer98Doc , CTestContainer98Item
  • CAppLookDlg() : CAppLookDlg
  • CAutoClickApp() : CAutoClickApp
  • CAutoClickDoc() : CAutoClickDoc
  • CAutoClickPoint() : CAutoClickPoint
  • CAutoClickView() : CAutoClickView
  • CAutoDrivApp() : CAutoDrivApp
  • CAutoDrivDlg() : CAutoDrivDlg
  • CBallThread() : CBallThread
  • CBasePiece() : CBasePiece
  • CBitmapProperty() : CBitmapProperty
  • CBkfstPage() : CBkfstPage
  • CBMTest1Dlg() : CBMTest1Dlg
  • CBMTest2Dlg() : CBMTest2Dlg
  • CBMTest3Dlg() : CBMTest3Dlg
  • CBounceDoc() : CBounceDoc
  • CBounceFrame() : CBounceFrame
  • CBounceMDIChildWnd() : CBounceMDIChildWnd
  • CBounceThread() : CBounceThread
  • CBounceView() : CBounceView
  • CBounceWnd() : CBounceWnd
  • CBoundedNumberPairProp() : CBoundedNumberPairProp
  • CBoundedNumberSubProp() : CBoundedNumberSubProp
  • CBrightLeader() : CBrightLeader
  • CButtonCtrl() : CButtonCtrl
  • CButtonDialog() : CButtonDialog
  • CButtonPropPage() : CButtonPropPage
  • CCalcApp() : CCalcApp
  • CCalcDlg() : CCalcDlg
  • CCalcDrivApp() : CCalcDrivApp
  • CCalendarBar() : CCalendarBar
  • CChangeNameDlg() : CChangeNameDlg
  • CChangeText() : CChangeText
  • CCharFormat() : CCharFormat
  • CCheckBoxProp() : CCheckBoxProp
  • CChildFrame() : CChildFrame
  • CChildView() : CChildView
  • CCImageApp() : CCImageApp
  • CCircCtrl() : CCircCtrl
  • CCircPropPage() : CCircPropPage
  • CClassTreeWnd() : CClassTreeWnd
  • CClassViewBar() : CClassViewBar
  • CClassViewMenuButton() : CClassViewMenuButton
  • CCmnCtrl1App() : CCmnCtrl1App
  • CCmnCtrl2App() : CCmnCtrl2App
  • CCmnCtrl3App() : CCmnCtrl3App
  • CCmnCtrl3Dlg() : CCmnCtrl3Dlg
  • CCollectApp() : CCollectApp
  • CCollectDoc() : CCollectDoc
  • CCollectView() : CCollectView
  • CColorMenu() : CColorMenu
  • CColorOptDlg() : CColorOptDlg
  • CColorPage() : CColorPage
  • CColorView() : CColorView
  • CComboBoxExProp() : CComboBoxExProp
  • CComboRulerItem() : CComboRulerItem
  • CCommandLinkCtrlPage() : CCommandLinkCtrlPage
  • CComponentCategoriesDlg() : CComponentCategoriesDlg
  • CConfigDlg() : CConfigDlg
  • CContainerApp() : CContainerApp
  • CContainerDoc() : CContainerDoc
  • CContainerInfoDlg() : CContainerInfoDlg
  • CContainerItem() : CContainerItem
  • CContainerView() : CContainerView
  • CCounterThread() : CCounterThread
  • CCSDialog() : CCSDialog
  • CCSPropertyPage() : CCSPropertyPage
  • CCSPropertySheet() : CCSPropertySheet
  • CCtrlbarsApp() : CCtrlbarsApp
  • CCubeApp() : CCubeApp
  • CCubeDoc() : CCubeDoc
  • CCubeView() : CCubeView
  • CCustListDlg() : CCustListDlg
  • CCustomDlgProp() : CCustomDlgProp
  • CCustomFileDialog() : CCustomFileDialog
  • CCustomList() : CCustomList
  • CCustomPagesApp() : CCustomPagesApp
  • CCustomPagesDoc() : CCustomPagesDoc
  • CCustomPagesView() : CCustomPagesView
  • CCustomSliderCtrl() : CCustomSliderCtrl
  • CCustomToolTipCtrl() : CCustomToolTipCtrl
  • CDataObjectDlg() : CDataObjectDlg
  • CDataObjectViewer() : CDataObjectViewer
  • CDateDialog() : CDateDialog
  • CDateTimePage() : CDateTimePage
  • CDBVListApp() : CDBVListApp
  • CDBVListDoc() : CDBVListDoc
  • CDBVListSet() : CDBVListSet
  • CDBVListView() : CDBVListView
  • CDebugLog() : CDebugLog
  • CDemoOptionsPage() : CDemoOptionsPage
  • CDemoOptionsPropSheet() : CDemoOptionsPropSheet
  • CDerEditDlg() : CDerEditDlg
  • CDesktopAlertDemoApp() : CDesktopAlertDemoApp
  • CDesktopAlertDemoDlg() : CDesktopAlertDemoDlg
  • CDHtmlExploreApp() : CDHtmlExploreApp
  • CDHtmlExploreDlg() : CDHtmlExploreDlg
  • CDialogItem() : CDialogItem
  • CDibDoc() : CDibDoc
  • CDibLookApp() : CDibLookApp
  • CDibView() : CDibView
  • CDinnerPage() : CDinnerPage
  • CDispatchDlg() : CDispatchDlg
  • CDispatchViewer() : CDispatchViewer
  • CDisplayIC() : CDisplayIC
  • CDisplayThread() : CDisplayThread
  • CDlgBanner() : CDlgBanner
  • CDlgStatusBar() : CDlgStatusBar
  • CDlgtempApp() : CDlgtempApp
  • CDlgtempDlg() : CDlgtempDlg
  • CDlgToolBar() : CDlgToolBar
  • CDlgToolTipsApp() : CDlgToolTipsApp
  • CDlgToolTipsDlg() : CDlgToolTipsDlg
  • CDllScreenCapApp() : CDllScreenCapApp
  • CDockApp() : CDockApp
  • CDockDoc() : CDockDoc
  • CDockView() : CDockView
  • CDocOptions() : CDocOptions
  • CDocOptPage() : CDocOptPage
  • CDrawApp() : CDrawApp
  • CDrawCliLiveIconsHandler() : CDrawCliLiveIconsHandler
  • CDrawCliSearchHandler() : CDrawCliSearchHandler
  • CDrawDoc() : CDrawDoc
  • CDrawItem() : CDrawItem
  • CDrawObj() : CDrawObj
  • CDrawOleObj() : CDrawOleObj
  • CDrawPoly() : CDrawPoly
  • CDrawRect() : CDrawRect
  • CDrawTool() : CDrawTool
  • CDrawView() : CDrawView
  • CDriveApp() : CDriveApp
  • CDriverDlg() : CDriverDlg
  • CDriverDoc() : CDriverDoc
  • CDriverView() : CDriverView
  • CDropTargetView() : CDropTargetView
  • CDWordArrayView() : CDWordArrayView
  • CDynaMDIChildWnd() : CDynaMDIChildWnd
  • CDynaMenuApp() : CDynaMenuApp
  • CDynaMenuDoc() : CDynaMenuDoc
  • CDynaMenuView() : CDynaMenuView
  • CDynamicHelpViewBar() : CDynamicHelpViewBar
  • CDynamicMenuApp() : CDynamicMenuApp
  • CDynamicMenuDoc() : CDynamicMenuDoc
  • CDynamicMenuView() : CDynamicMenuView
  • CEditBar() : CEditBar
  • CEditToolbar() : CEditToolbar
  • CEmbeddedItem() : CEmbeddedItem
  • CEmbeddedOptPage() : CEmbeddedOptPage
  • CEmpView() : CEmpView
  • CEndWizardDialog() : CEndWizardDialog
  • CEnterDlg() : CEnterDlg
  • CEntryInfoDlg() : CEntryInfoDlg
  • CEnumVariant() : CEnumVariant
  • CEventLoggingPage() : CEventLoggingPage
  • CExampleThread() : CExampleThread
  • CExcepInfo() : CExcepInfo
  • CExplorerApp() : CExplorerApp
  • CExplorerBar() : CExplorerBar
  • CExplorerDoc() : CExplorerDoc
  • CExplorerView() : CExplorerView
  • CExtendedControl() : CExtendedControl
  • CFavorit() : CFavorit
  • CFavoritesManager() : CFavoritesManager
  • CFeaturesPage() : CFeaturesPage
  • CFigCommand() : CFigCommand
  • CFigure() : CFigure
  • CFileDlgWatcherApp() : CFileDlgWatcherApp
  • CFileDlgWatcherDlg() : CFileDlgWatcherDlg
  • CFileLog() : CFileLog
  • CFileNewDialog() : CFileNewDialog
  • CFileViewBar() : CFileViewBar
  • CFindComboButton() : CFindComboButton
  • CFindDlg() : CFindDlg
  • CFolderBar() : CFolderBar
  • CFolderListBar() : CFolderListBar
  • CFolderListPopupWnd() : CFolderListPopupWnd
  • CFoldersTree() : CFoldersTree
  • CFontComboBox() : CFontComboBox
  • CFontDesc() : CFontDesc
  • CFormatBar() : CFormatBar
  • CFormatParaDlg() : CFormatParaDlg
  • CFormatTabDlg() : CFormatTabDlg
  • CGDIThread() : CGDIThread
  • CGetURL() : CGetURL
  • CGotoDlg() : CGotoDlg
  • CGuidGenApp() : CGuidGenApp
  • CGuidGenDlg() : CGuidGenDlg
  • CHandleSize() : CHandleSize
  • ChangeCtrlStyle() : CToolBarCtrlPage , CSliderCtrlPage
  • ChangeListCtrlStyle() : CListHdrDlg
  • ChangeSpeed() : CBounceWnd , CBounceView
  • CHARHDR() : CHARHDR
  • CheckDates() : CSchedulerDlg
  • CheckIndex() : CStringCollect
  • CheckItem() : CRowListView
  • CheckStartEndTime() : CEntryInfoDlg
  • CheckValidDescription() : CEntryInfoDlg
  • CheckValidTitle() : CEntryInfoDlg
  • CHelloDoc() : CHelloDoc
  • CHelloFrame() : CHelloFrame
  • CHelloView() : CHelloView
  • CHelloWindow() : CHelloWindow
  • CHelloWnd() : CHelloWnd
  • CHierSvrDocTemplate() : CHierSvrDocTemplate
  • CHistoryObj() : CHistoryObj
  • ChooseConfig() : CMenuSubSetApp
  • CHTMLEdDoc() : CHTMLEdDoc
  • CHTMLEditApp() : CHTMLEditApp
  • CHTMLEdView() : CHTMLEdView
  • CHueLeader() : CHueLeader
  • CHuskApp() : CHuskApp
  • CIconCombo() : CIconCombo
  • CIconComboBox() : CIconComboBox
  • CIconListProp() : CIconListProp
  • CIDataObjectDlg() : CIDataObjectDlg
  • CIEDemoApp() : CIEDemoApp
  • CIEDemoDoc() : CIEDemoDoc
  • CIEDemoView() : CIEDemoView
  • CImageCtrl() : CImageCtrl
  • CImagePropPage() : CImagePropPage
  • CImpIAdviseSink() : CImpIAdviseSink
  • CInfoBar() : CInfoBar
  • CInfoDlg() : CInfoDlg
  • CInPlaceFrame() : CInPlaceFrame
  • CInProcApp() : CInProcApp
  • CInputView() : CInputView
  • CInsertControlDlg() : CInsertControlDlg
  • CInsertTableDlg() : CInsertTableDlg
  • CInterfaceInfo() : CInterfaceInfo
  • CInterfacesPage() : CInterfacesPage
  • CInterfaceViewer() : CInterfaceViewer
  • CIntListView() : CIntListView
  • CItemData() : CItemData
  • CItemIcons() : CItemIcons
  • CIViewersApp() : CIViewersApp
  • CKey() : CKey
  • CLeader() : CLeader
  • Clean() : CFigure
  • Cleanup() : CTestContainer98Doc
  • CleanUp() : CFavorit
  • CleanupParams() : CTestContainer98Item
  • Clear() : CListOutputFrame , CXlistCtrl , CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated , CRemoteCalcDlg , CCalcDlg , mfccalc::ICalcDlg , CExcepInfo , CRibbonListButton , CRibbonListFontButton
  • ClearAllColors() : CBounceDoc , CHelloDoc
  • ClearBits() : CSurface
  • ClearSelection() : CTestContainer98View
  • ClearStringArray() : CFormatMenu
  • ClearTabs() : COutputBar
  • CLicensedCtrl() : CLicensedCtrl
  • CLicensedPropPage() : CLicensedPropPage
  • Click()
: ButtonLib::_DButtonEvents
, LocalizeLib::_DLocalizeEvents
  • ClickedNumber() : CCalcDlg
  • ClickIn() : CircLib::_DCircEvents
  • ClickInFrench() : LocalizeLib::_DLocalizeEvents
  • ClickInGerman() : LocalizeLib::_DLocalizeEvents
  • ClickOut() : CircLib::_DCircEvents
  • ClientToDoc() : CDrawView , CMainView , CDrawView
  • ClientToRuler() : CRulerBar
  • CLineStyleMenuItem() : CLineStyleMenuItem
  • CLineThread() : CLineThread
  • CLineWeightDlg() : CLineWeightDlg
  • CLinkButton() : CLinkButton
  • CLinksBar() : CLinksBar
  • CListDlg() : CListDlg
  • CListHdrApp() : CListHdrApp
  • CListHdrDlg() : CListHdrDlg
  • CListOutputFrame() : CListOutputFrame
  • CListViewEx() : CListViewEx
  • CLocalizeCtrl() : CLocalizeCtrl
  • CLocalizePropPage() : CLocalizePropPage
  • CLog() : CLog
  • CLoggingDlg() : CLoggingDlg
  • Clone() : CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj , CEnumVariant , CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj
  • CloneSelection() : CDrawView
  • Close() : mfccalc::ICalcDlg , CKey , CRemoteCalcDlg , CCalcDlg
  • CloseMe() : CFolderListPopupWnd
  • CLunchPage() : CLunchPage
  • CMacroComboBox() : CMacroComboBox
  • CMacroDlg() : CMacroDlg
  • CMailBar() : CMailBar
  • CMailFrame() : CMailFrame
  • CMailView() : CMailView
  • CMainDlg() : CMainDlg
  • CMainDoc() : CMainDoc
  • CMainFrame() : CMainFrame
  • CMainView() : CMainView
  • CMainWindow() : CMainWindow
  • CMapDWordToMyStructView() : CMapDWordToMyStructView
  • CMapStringToStringView() : CMapStringToStringView
  • CMargueeTaskDialog() : CMargueeTaskDialog
  • CmdAbout() : CButtonCtrl
  • CMdiApp() : CMdiApp
  • CMDIApp() : CMDIApp
  • CMDITabOptions() : CMDITabOptions
  • CMDITabsDemoApp() : CMDITabsDemoApp
  • CMDITabsDemoDoc() : CMDITabsDemoDoc
  • CMDITabsDemoView() : CMDITabsDemoView
  • CMenuSubSetApp() : CMenuSubSetApp
  • CMenuSubSetDoc() : CMenuSubSetDoc
  • CMenuSubSetView() : CMenuSubSetView
  • CMetaFileWnd() : CMetaFileWnd
  • CMethodDlg() : CMethodDlg
  • CMethodInfo() : CMethodInfo
  • CMethodParamInfo() : CMethodParamInfo
  • CMFCBindApp() : CMFCBindApp
  • CMFCBindCntrItem() : CMFCBindCntrItem
  • CMFCBindDoc() : CMFCBindDoc
  • CMFCBindView() : CMFCBindView
  • CMfcieApp() : CMfcieApp
  • CMfcieDoc() : CMfcieDoc
  • CMfcieView() : CMfcieView
  • CMFCRibbonNumEdit() : CMFCRibbonNumEdit
  • CMFCRibbonNumEditCtrl() : CMFCRibbonNumEditCtrl
  • CMinSize() : CMinSize
  • CMMXSwarmApp() : CMMXSwarmApp
  • CMMXUnsigned16Saturated() : CMMXUnsigned16Saturated
  • CModalShapePropSheet() : CModalShapePropSheet
  • CModelessApp() : CModelessApp
  • CModelessDialog() : CModelessDialog
  • CModelessMain() : CModelessMain
  • CModelessShapePropSheet() : CModelessShapePropSheet
  • CMonthCalPage() : CMonthCalPage
  • CMSMCaptionBar() : CMSMCaptionBar
  • CMSMCaptionBarButton() : CMSMCaptionBarButton
  • CMSMCategoryBar() : CMSMCategoryBar
  • CMSMCategoryBarButton() : CMSMCategoryBarButton
  • CMSMDialog() : CMSMDialog
  • CMSMLinksBar() : CMSMLinksBar
  • CMSMLinksBarButton() : CMSMLinksBarButton
  • CMSMMenuBar() : CMSMMenuBar
  • CMSMoneyDemoApp() : CMSMoneyDemoApp
  • CMSMoneyDemoDoc() : CMSMoneyDemoDoc
  • CMSMoneyDemoView() : CMSMoneyDemoView
  • CMSMTasksPane() : CMSMTasksPane
  • CMSMToolBar() : CMSMToolBar
  • CMSMVisualManager() : CMSMVisualManager
  • CMSNDlg() : CMSNDlg
  • CMSNVisualManager() : CMSNVisualManager
  • CMSOffice2007DemoApp() : CMSOffice2007DemoApp
  • CMSOffice2007DemoCntrItem() : CMSOffice2007DemoCntrItem
  • CMSOffice2007DemoDoc() : CMSOffice2007DemoDoc
  • CMSOffice2007DemoView() : CMSOffice2007DemoView
  • CMutexesApp() : CMutexesApp
  • CMutexesDlg() : CMutexesDlg
  • CMyCustomizationPage() : CMyCustomizationPage
  • CMyDialogTemplate() : CMyDialogTemplate
  • CMyListCtrl() : CMyListCtrl
  • CMyMenuBar() : CMyMenuBar
  • CMyObject() : CMyObject
  • CMyPopupDlg() : CMyPopupDlg
  • CMyPropertyPage1() : CMyPropertyPage1
  • CMyPropertyPage2() : CMyPropertyPage2
  • CMyPropertyPage3() : CMyPropertyPage3
  • CMyPropertyPage4() : CMyPropertyPage4
  • CMyPropertySheet() : CMyPropertySheet
  • CMyScheduler() : CMyScheduler
  • CMyToolTipCtrl() : CMyToolTipCtrl
  • CMyTreeCtrl() : CMyTreeCtrl
  • CNetAddressCtrlPage() : CNetAddressCtrlPage
  • CNetAddrVerifierApp() : CNetAddrVerifierApp
  • CNetAddrVerifierDlg() : CNetAddrVerifierDlg
  • CNewAmbientPropertyDlg() : CNewAmbientPropertyDlg
  • CNewControlsApp() : CNewControlsApp
  • CNextWizardDialog() : CNextWizardDialog
  • CNotepadApp() : CNotepadApp
  • CNotepadDoc() : CNotepadDoc
  • CNotepadView() : CNotepadView
  • CNotifyShowCase() : CNotifyShowCase
  • CNullLog() : CNullLog
  • CObjectData() : CObjectData
  • CObjListView() : CObjListView
  • CObjTreeView() : CObjTreeView
  • COEMFile() : COEMFile
  • COle2ViewApp() : COle2ViewApp
  • COle2ViewDoc() : COle2ViewDoc
  • COleClientApp() : COleClientApp
  • COlePropertiesEx() : COlePropertiesEx
  • CommitItem() : CTestContainer98Item
  • CommonConstruct() : CMSMDialog
  • CompareItem() : CColorListBox , CIconComboBox , CFontComboBox
  • ComponentFromIndex() : CCubeView
  • ComputePageSize() : CDrawDoc
  • ConstructAddrMask() : CNetAddrVerifierDlg
  • ConstructMyObjectFromView() : CTypedPtrMapView
  • ConstructMyStructFromView() : CMapDWordToMyStructView
  • ContextSensitiveHelp() : CTestContainer98Item
  • COptionsDlg() : COptionsDlg
  • COptionSheet() : COptionSheet
  • COptionsPage1() : COptionsPage1
  • COptionsPage12() : COptionsPage12
  • COptionsPage21() : COptionsPage21
  • COptionsPage22() : COptionsPage22
  • COptionsPage31() : COptionsPage31
  • COptionsPage32() : COptionsPage32
  • CopyFrom() : CRibbonListButton , CLinkButton , CRibbonListFontButton , CLineStyleMenuItem , CSliderButton , CRibbonListButton
  • CopyParams() : CTestContainer98Item
  • CopyToClipboard() : CTestContainer98Item
  • COutlookDemoApp() : COutlookDemoApp
  • COutlookDemoDoc() : COutlookDemoDoc
  • COutlookDemoView() : COutlookDemoView
  • COutlookMultiViewsApp() : COutlookMultiViewsApp
  • COutlookMultiViewsDoc() : COutlookMultiViewsDoc
  • COutlookMultiViewsView() : COutlookMultiViewsView
  • COutputBar() : COutputBar
  • COutputList() : COutputList
  • COutputList1() : COutputList1
  • COutputViewBar() : COutputViewBar
  • COutputWindowLog() : COutputWindowLog
  • COutputWindowView() : COutputWindowView
  • COwnerDrawDescrProp() : COwnerDrawDescrProp
  • COwnerDrawMenuApp() : COwnerDrawMenuApp
  • COwnerDrawMenuDoc() : COwnerDrawMenuDoc
  • COwnerDrawMenuView() : COwnerDrawMenuView
  • CPadDoc() : CPadDoc
  • CPadLinkItem() : CPadLinkItem
  • CPadView() : CPadView
  • CPage1() : CPage1
  • CPage2() : CPage2
  • CPage3() : CPage3
  • CPage4() : CPage4
  • CPage5() : CPage5
  • CPage6() : CPage6
  • CPagerCtrlPage() : CPagerCtrlPage
  • CPageSetupDlg() : CPageSetupDlg
  • CPalCtrl() : CPalCtrl
  • CPaletteBar() : CPaletteBar
  • CPaletteDemoApp() : CPaletteDemoApp
  • CPaletteDemoDoc() : CPaletteDemoDoc
  • CPaletteDemoView() : CPaletteDemoView
  • CPalPropPage() : CPalPropPage
  • CParaFormat() : CParaFormat
  • CParsedEdit() : CParsedEdit
  • CParsedEditExported() : CParsedEditExported
  • CPasswordProp() : CPasswordProp
  • CPenWidthsDlg() : CPenWidthsDlg
  • CPointArrayView() : CPointArrayView
  • CPolyTool() : CPolyTool
  • CPreviewPane() : CPreviewPane
  • CProgCtrlPage() : CProgCtrlPage
  • CProgressBarTaskDialog() : CProgressBarTaskDialog
  • CPropDlgApp() : CPropDlgApp
  • CPropertiesDlg() : CPropertiesDlg
  • CPropertiesViewBar() : CPropertiesViewBar
  • CProperty() : CProperty
  • CPropertyBag() : CPropertyBag
  • CPropertyBagDlg() : CPropertyBagDlg
  • CPropertyBagItem() : CPropertyBagItem
  • CPropertyChangesPage() : CPropertyChangesPage
  • CPropertyEditRequestsPage() : CPropertyEditRequestsPage
  • CPropertyInfo() : CPropertyEditRequestsPage::CPropertyInfo
  • CPropertySection() : CPropertySection
  • CPropertySet() : CPropertySet
  • CPropSheetDemoApp() : CPropSheetDemoApp
  • CPropSheetDemoDlg() : CPropSheetDemoDlg
  • CPropSliderCtrl() : CPropSliderCtrl
  • CPushCtrl() : CPushCtrl
  • CPushPropPage() : CPushPropPage
  • CRateDlg() : CRateDlg
  • Create() : CListOutputFrame , CSnapView , CCalendarBar , CFolderListPopupWnd , CRulerBar , CFileLog , CAdderDialog , CBounceWnd , CParsedEdit , CAllControlsSheet , CHelloWnd , CBounceMDIChildWnd , CStandardBar , CAllControlsSheet , CModelessMain , CHelloWnd , CBounceFrame , CSurface , CNotepadView , CMacroDialogBar , CKey , CSplashWnd , CKey , CRulerBar , CSplashWnd , CPaletteBar , CModelessMain , CWndListDlg , CTestContainer98Item , CMSMCaptionBar , CSplashWnd
  • CreateBorderTypeButton() : CFormatBar
  • CreateCaptionBar() : CMainFrame
  • CreateChildNode() : CServerNode
  • CreateClientItem() : CMSOffice2007DemoDoc , CWordPadDoc
  • CreateColorButton() : CFormatBar
  • CreateCombo() : CComboBoxExProp , CIconListProp
  • CreateComboBox() : CMainFrame
  • CreateDevNames() : CWordPadApp
  • CreateDockingBars() : CMainFrame
  • CreateDocumentColors() : CMainFrame
  • CreateDocumentWindow() : CMainFrame
  • CreateEdit() : CMFCRibbonNumEdit
  • CreateEditBar() : CMainFrame
  • CreateEditControl() : CTaskPane
  • CreateEx() : CMSMCaptionBar
  • CreateFigure() : CSpiroView
  • CreateFontComboButton() : CFormatBar
  • CreateFontsList() : CMainFrame
  • CreateFormatBar() : CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • CreateFromClipboard() : CTestContainer98Item
  • CreateFromMenu() : CMyMenuBar
  • CreateGDIObjects() : CRulerBar
  • CreateInPlaceEdit() : CSliderProp , CPasswordProp , CIconListProp
  • CreateInstance() : CObjectData , CExtendedControl , CTCBindHost
  • CreateItem() : CMainDoc
  • CreateListOutput() : CHuskApp
  • CreateLogEpilogue() : CFileDlgWatcherDlg
  • CreateLogPrologue() : CFileDlgWatcherDlg
  • CreateMenu() : CFavorit , CFavoritesManager
  • CreateMenuBar() : CMainFrame , CInPlaceFrame
  • CreateMessageBar() : CMainFrame
  • CreateMoniker() : CTCBindHost
  • CreateOrLoad() : CTestContainer98Item
  • CreateOutlookBar() : CMainFrame
  • CreatePaletteBar() : CMainFrame
  • CreatePopupMenu() : CUndoButton
  • CreateRGBPalette() : CCubeView
  • CreateRibbonBar() : CMainFrame
  • CreateRootNode() : CServerNode
  • CreateRulerBar() : CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • CreateShortcutsBar() : CMainFrame
  • CreateSpinCtrl() : CSpinCtrlPage
  • CreateStatusBar() : CMainFrame
  • CreateStyleBar() : CMainFrame
  • CreateStyleList() : CMainFrame
  • CreateSurface() : CChildView
  • CreateTaskPane() : CMainFrame
  • CreateThemeList() : CMainFrame
  • CreateToolBar() : CInPlaceFrame , CMainFrame , CInPlaceFrame , CMainFrame
  • CreateTreeControl() : CTaskPane
  • CreateTreeWindow() : CTaskPane
  • CreateUniqueItemName() : CTestContainer98Doc
  • CRebarTestApp() : CRebarTestApp
  • CRebarTestDoc() : CRebarTestDoc
  • CRebarTestView() : CRebarTestView
  • CRecalcApp() : CRecalcApp
  • CRecalcDoc() : CRecalcDoc
  • CRecalcView() : CRecalcView
  • CRectDlg() : CRectDlg
  • CRectItem() : CRectItem
  • CRectThread() : CRectThread
  • CRectTool() : CRectTool
  • CRegEntry() : CRegEntry
  • CRegisterControlsDlg() : CRegisterControlsDlg
  • CRegistryView() : CRegistryView
  • CResourcePage() : CResourcePage
  • CResourceViewBar() : CResourceViewBar
  • CRibbonGadgetsApp() : CRibbonGadgetsApp
  • CRibbonGadgetsDoc() : CRibbonGadgetsDoc
  • CRibbonGadgetsView() : CRibbonGadgetsView
  • CRibbonListButton() : CRibbonListButton
  • CRibbonListFontButton() : CRibbonListFontButton
  • CRibbonMDIDemoApp() : CRibbonMDIDemoApp
  • CRibbonMDIDemoDoc() : CRibbonMDIDemoDoc
  • CRibbonMDIDemoView() : CRibbonMDIDemoView
  • CRibbonTableButton() : CRibbonTableButton
  • CRibbonTooltipCtrl() : CRibbonTooltipCtrl
  • CRing() : CRing
  • CRollupPaneApp() : CRollupPaneApp
  • CRollupPaneDoc() : CRollupPaneDoc
  • CRollupPaneView() : CRollupPaneView
  • CRowListApp() : CRowListApp
  • CRowListDoc() : CRowListDoc
  • CRowListView() : CRowListView
  • CRulerBar() : CRulerBar
  • CRulerItem() : CRulerItem
  • CSchedulerApp() : CSchedulerApp
  • CSchedulerDlg() : CSchedulerDlg
  • CScreenCapApp() : CScreenCapApp
  • CScribbleApp() : CScribbleApp
  • CScribbleDoc() : CScribbleDoc
  • CScribbleItem() : CScribbleItem
  • CScribbleView() : CScribbleView
  • CScript() : CScript
  • CScriptManager() : CScriptManager
  • CSearchBox() : CSearchBox
  • CSelectTool() : CSelectTool
  • CServerApp() : CServerApp
  • CServerDC() : CServerDC
  • CServerDoc() : CServerDoc
  • CServerItem() : CServerItem
  • CServerNode() : CServerNode
  • CServerView() : CServerView
  • CServicesPage() : CServicesPage
  • CSetPaneSizeApp() : CSetPaneSizeApp
  • CSetPaneSizeDoc() : CSetPaneSizeDoc
  • CSetPaneSizeView() : CSetPaneSizeView
  • CSetTabStops() : CSetTabStops
  • CShape() : CShape
  • CShapePreviewWnd() : CShapePreviewWnd
  • CShapePropSheetFrame() : CShapePropSheetFrame
  • CShapesDoc() : CShapesDoc
  • CShapesView() : CShapesView
  • CSizeComboBox() : CSizeComboBox
  • CSliderApp() : CSliderApp
  • CSliderButton() : CSliderButton
  • CSliderCtrlPage() : CSliderCtrlPage
  • CSliderDoc() : CSliderDoc
  • CSliderProp() : CSliderProp
  • CSliderView() : CSliderView
  • CSmartFuncDesc() : CSmartFuncDesc
  • CSmartTypeAttr() : CSmartTypeAttr
  • CSmartVarDesc() : CSmartVarDesc
  • CSnapApp() : CSnapApp
  • CSnapDoc() : CSnapDoc
  • CSnapPropertySheet() : CSnapPropertySheet
  • CSnapView() : CSnapView
  • CSourceView() : CSourceView
  • CSpeakNDlg() : CSpeakNDlg
  • CSpeedDlg() : CSpeedDlg
  • CSpinCtrlPage() : CSpinCtrlPage
  • CSpindialCtrl() : CSpindialCtrl
  • CSpindialPropPage() : CSpindialPropPage
  • CSpinEditDlg() : CSpinEditDlg
  • CSpiroApp() : CSpiroApp
  • CSpiroDoc() : CSpiroDoc
  • CSpiroRect() : CSpiroRect
  • CSpiroView() : CSpiroView
  • CSplitButtonCtrlPage() : CSplitButtonCtrlPage
  • CSplitFrame() : CSplitFrame
  • CSplitterFrame() : CSplitterFrame
  • CSSE2Unsigned16Saturated() : CSSE2Unsigned16Saturated
  • CStandardBar() : CStandardBar
  • CStartView() : CStartView
  • CStateCollectionApp() : CStateCollectionApp
  • CStateCollectionDoc() : CStateCollectionDoc
  • CStateCollectionView() : CStateCollectionView
  • CStatPage() : CStatPage
  • CStatusBarDemoApp() : CStatusBarDemoApp
  • CStatusBarDemoDoc() : CStatusBarDemoDoc
  • CStatusBarDemoView() : CStatusBarDemoView
  • CStringCollect() : CStringCollect
  • CStringListView() : CStringListView
  • CStroke() : CStroke
  • CStylePage() : CStylePage
  • CSubEditDlg() : CSubEditDlg
  • CSummInfo() : CSummInfo
  • CSummPage() : CSummPage
  • CSurface() : CSurface
  • CSwarm() : CSwarm
  • CTabbedViewApp() : CTabbedViewApp
  • CTabbedViewDoc() : CTabbedViewDoc
  • CTabbedViewView() : CTabbedViewView
  • CTabControlApp() : CTabControlApp
  • CTabControlDoc() : CTabControlDoc
  • CTabControlView() : CTabControlView
  • CTabOrderDlg() : CTabOrderDlg
  • CTabRulerItem() : CTabRulerItem
  • CTaskDialogTestApp() : CTaskDialogTestApp
  • CTaskDialogTestDlg() : CTaskDialogTestDlg
  • CTaskPane() : CTaskPane
  • CTasksPaneApp() : CTasksPaneApp
  • CTasksPaneDoc() : CTasksPaneDoc
  • CTasksPaneView() : CTasksPaneView
  • CTCBindHost() : CTCBindHost
  • CTCCommandLineInfo() : CTCCommandLineInfo
  • CTCExtPage() : CTCExtPage
  • CTCOptions() : CTCOptions
  • CTCSplitter() : CTCSplitter
  • CTestApp() : CTestApp
  • CTestContainer98App() : CTestContainer98App
  • CTestContainer98Doc() : CTestContainer98Doc
  • CTestContainer98Item() : CTestContainer98Item
  • CTestContainer98View() : CTestContainer98View
  • CTesthelpApp() : CTesthelpApp
  • CTesthelpCtrl() : CTesthelpCtrl
  • CTesthelpPropPage() : CTesthelpPropPage
  • CTextView() : CTextView
  • CTheApp() : CTheApp
  • CThreadApp() : CThreadApp
  • CThreadDoc() : CThreadDoc
  • CThreadView() : CThreadView
  • CTimeCtrl() : CTimeCtrl
  • CTimePropPage() : CTimePropPage
  • CtlColor() : CPropSliderCtrl
  • CToolBarCtrlPage() : CToolBarCtrlPage
  • CToolbarDateTimePickerApp() : CToolbarDateTimePickerApp
  • CToolbarDateTimePickerDoc() : CToolbarDateTimePickerDoc
  • CToolbarDateTimePickerView() : CToolbarDateTimePickerView
  • CToolbarLabel() : CToolbarLabel
  • CToolDlg() : CToolDlg
  • CToolsPalette() : CToolsPalette
  • CTooltipDemoApp() : CTooltipDemoApp
  • CTooltipDemoDoc() : CTooltipDemoDoc
  • CTooltipDemoView() : CTooltipDemoView
  • CTrackerApp() : CTrackerApp
  • CTrackerDoc() : CTrackerDoc
  • CTrackerView() : CTrackerView
  • CTrackFile() : CTrackFile
  • CTrayMenuApp() : CTrayMenuApp
  • CTrayMenuDlg() : CTrayMenuDlg
  • CTreeCtrlPage() : CTreeCtrlPage
  • CTreeItem() : CTreeItem
  • CTwoButtonsProp() : CTwoButtonsProp
  • CTypedPtrArrayView() : CTypedPtrArrayView
  • CTypedPtrListView() : CTypedPtrListView
  • CTypedPtrMapView() : CTypedPtrMapView
  • CTypeLibListView() : CTypeLibListView
  • CTypeLibODLView() : CTypeLibODLView
  • CTypeLibTreeView() : CTypeLibTreeView
  • CTypeLibViewer() : CTypeLibViewer
  • CTypeLibWnd() : CTypeLibWnd
  • CUndoBar() : CUndoBar
  • CUndoButton() : CUndoButton
  • CUndoListBox() : CUndoListBox
  • CUnit() : CUnit
  • CUnitsPage() : CUnitsPage
  • CustomClick() : PushLib::_DPushEvents
  • CustomizeHelp() : CPaletteBar , CStandardBar
  • CVariantAssoc() : CVariantAssoc
  • CVariantMap() : CVariantMap
  • CVarUseApp() : CVarUseApp
  • CVarUseDlg() : CVarUseDlg
  • CVector() : CVector
  • CView1() : CView1
  • CView2() : CView2
  • CView3() : CView3
  • CView4() : CView4
  • CViewExApp() : CViewExApp
  • CViewExSplitWnd() : CViewExSplitWnd
  • CVisualStudioDemoApp() : CVisualStudioDemoApp
  • CVisualStudioDemoDoc() : CVisualStudioDemoDoc
  • CVisualStudioDemoView() : CVisualStudioDemoView
  • CWatchBar() : CWatchBar
  • CWclsEditDlg() : CWclsEditDlg
  • CWheel() : CWheel
  • CWizardDialog() : CWizardDialog
  • CWndListDlg() : CWndListDlg
  • CWordPadApp() : CWordPadApp
  • CWordPadCntrItem() : CWordPadCntrItem
  • CWordPadCommandLineInfo() : CWordPadCommandLineInfo
  • CWordPadDoc() : CWordPadDoc
  • CWordPadView() : CWordPadView
  • CWorkspaceBar() : CWorkspaceBar
  • CWorkspaceBar2() : CWorkspaceBar2
  • CWorkspaceObj() : CWorkspaceObj
  • CWorkSpaceToolBarApp() : CWorkSpaceToolBarApp
  • CWorkSpaceToolBarDoc() : CWorkSpaceToolBarDoc
  • CWorkSpaceToolBarView() : CWorkSpaceToolBarView
  • CXlistCtrl() : CXlistCtrl
  • CXlistPropPage() : CXlistPropPage
  • CZoomDlg() : CZoomDlg
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- d -

  • DateFmtEnumProc() : CDateDialog
  • DateSchedules() : CSchedulerDlg
  • Deactivate() : TCPropsLib::ITCExtendedControl
  • DeactivateAndUndo() : CTestContainer98Item
  • DECLARE_DHTMLEDITING_CMDMAP() : CHTMLEdView
  • DECLARE_DYNAMIC() : CNullLog , CDebugLog , CFileLog , COutputWindowLog , CPropertyBagItem , CScriptManager , CLog
  • DECLARE_DYNCREATE() : CMSMCaptionBarButton
  • DECLARE_MESSAGE_MAP() : CCustListDlg , CParsedEditExported , CWclsEditDlg , CTestApp
  • DECLARE_OLECREATE_EX() : CButtonCtrl , CCircCtrl , CImageCtrl , CLocalizeCtrl , CPalCtrl , CPushCtrl , CSpindialCtrl , CTesthelpCtrl , CTimeCtrl , CXlistCtrl
  • DECLARE_OLETYPELIB() : CLicensedCtrl
  • DECLARE_SERIAL() : CDrawPoly , CDrawOleObj , CServerNode , CAmbientProperty , CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj , CDrawObj , CDrawRect
  • DeCompileCoClass() : CTypeLibODLView
  • DeCompileConst() : CTypeLibODLView
  • DeCompileDispinterface() : CTypeLibODLView
  • DeCompileFunc() : CTypeLibODLView
  • DeCompileInterface() : CTypeLibODLView
  • DeCompileModule() : CTypeLibODLView
  • DeCompileTypedef() : CTypeLibODLView
  • DeCompileTypeLib() : CTypeLibODLView
  • DeCompileVar() : CTypeLibODLView
  • Delete() : CGDIThread
  • DeleteChildNodes() : CServerNode
  • DeleteContents() : CCollectDoc , CScribbleDoc , CSpiroDoc , CServerDoc , CPadDoc , CTestContainer98Doc , CWordPadView
  • DeleteItem() : CMainDoc
  • DeleteTreeContents() : CObjTreeView
  • DeleteTreeItems() : CTypeLibTreeView , CObjTreeView
  • DeltaRandom() : CRoamer
  • DemoIt() : CMyDialogTemplate
  • Deselect() : CDrawView
  • Destroy() : CSurface , CSwarm
  • DestroyWindow() : CBounceMDIChildWnd , CMainFrame
  • Dirty() : CRectItem
  • DiscardUndoState() : CTestContainer98Item
  • Display() : CRemoteCalcDlg , CCalcDlg , mfccalc::ICalcDlg
  • DisplayAsDefault() : CTestContainer98Item
  • DisplayExceptionInfo() : CMethodDlg
  • DisplayMessageBox() : CButtonDialog
  • DisplayParamValueInList() : CMethodDlg
  • DisplayParamValues() : CMethodDlg
  • DisplayPropValues() : CAmbientPropertiesDlg
  • DoBranch() : CServerView
  • DockControlBarLeftOf() : CMainFrame
  • DoCopySelection() : CMainView
  • DocToClient() : CDrawView , CMainView , CDrawView
  • DoDataExchange() : CSpindialPropPage , CDlgToolTipsDlg , CAboutDlg , CTesthelpPropPage , CLineWeightDlg , CRectDlg , CTimePropPage , CStatPage , CSummPage , CXlistPropPage , CAboutDlg , CUnitsPage , CAboutDlg , CAnimateCtrlPage , CAboutDlg , CDateTimePage , CDateDialog , CAppLookDlg , CAboutDlg , CConfigDlg , COptionsPage31 , COptionsPage22 , CAboutDlg , CMonthCalPage , COptionsPage1 , CAppLookDlg , CTrayMenuDlg , CMenuSubSetView , CAboutDlg , CTabControlView , CAboutDlg , CView3 , CDemoOptionsPage , CStatusBarDemoView , CAboutDlg , CResourcePage , CToolBarCtrlPage , CSetPaneSizeView , CAboutDlg , CPage1 , CTreeCtrlPage , CPage2 , CMyPropertyPage3 , CMyPropertyPage2 , CMyPropertyPage1 , CPage3 , CAboutDlg , CProgCtrlPage , CPage4 , CPage5 , CAboutDlg , CPage6 , CAppLookDlg , CSliderCtrlPage , CMailBar , CAboutDlg , CSpinCtrlPage , CTaskDialogTestDlg , CAboutDlg , CDBVListView , CMyPropertyPage4 , CPropSheetDemoDlg , CAboutDlg , CRateDlg , CWndListDlg , CAboutDlg , CDlgtempDlg , CMyPopupDlg , CMSNDlg , CDesktopAlertDemoDlg , CAboutDlg , CGuidGenDlg , CAboutDlg , CToolDlg , CPageSetupDlg , CFormatTabDlg , CFormatParaDlg , CAboutDlg , CDocOptPage , CDateDialog , CTasksPaneView , CColorOptDlg , CServicesPage , CRegisterControlsDlg , CPropertyEditRequestsPage , CAboutDlg , CPropertyBagDlg , CNewAmbientPropertyDlg , CTooltipDemoView , CFileDlgWatcherDlg , CLoggingDlg , CInsertControlDlg , CInterfacesPage , CAboutDlg , CEventLoggingPage , COptionsPage12 , COptionsPage21 , CListHdrDlg , CSetTabStops , CPageSetupDlg , CSplashWnd , CAboutDlg , CRegistryView , CAboutDlg , COptionsPage32 , CAboutDlg , CCalcDlg , CAboutDlg , CAdderDialog , CAboutDlg , CZoomDlg , CDocOptPage , CFileNewDialog , CAboutDlg , CSummPage , CStatPage , CAboutDlg , CDriverDlg , CFormatParaDlg , CFormatTabDlg , CAboutDlg , CChangeText , CAboutDlg , CMainDlg , CPageSetupDlg , CFindDlg , CGotoDlg , CAboutDlg , CInsertTableDlg , CAboutDlg , CGetURL , CColorPage , CDHtmlExploreDlg , CAboutDlg , CStylePage , CAboutDlg , CVarUseDlg , CPenWidthsDlg , CAboutDlg , CBkfstPage , CDinnerPage , CLunchPage , CSnapView , CAboutDlg , CHandleSize , CMinSize , CAboutDlg , CEnterDlg , CInputView , CAboutDlg , CPropertiesDlg , CDWordArrayView , CIntListView , CAboutDlg , CEntryInfoDlg , CMapDWordToMyStructView , CAboutDlg , CSchedulerDlg , CMapStringToStringView , CAutoDrivDlg , CPointArrayView , CStringListView , CAutoDrivDlg , CChangeText , CTypedPtrArrayView , CTypedPtrListView , CRectDlg , CTypedPtrMapView , CAboutDlg , CChangeNameDlg , CAddNodeDlg , CConfigDlg , CAboutDlg , CDriverView , CAboutDlg , CDataObjectDlg , CDispatchDlg , CRecalcView , CSpeedDlg , CAboutBox , CAboutDlg , CMutexesDlg , CAmbientPropertiesDlg , CComponentCategoriesDlg , CSpeakNDlg , CContainerInfoDlg , CButtonPropPage , CPushPropPage , CMyCustomizationPage , CNetAddrVerifierDlg , CAboutDlg , CLicensedPropPage , CFileNewDialog , CAboutDlg , CFeaturesPage , CPagerCtrlPage , CPropertyChangesPage , CCircPropPage , CCmnCtrl3Dlg , CMacroDlg , CMethodDlg , CCommandLinkCtrlPage , CNetAddressCtrlPage , CSplitButtonCtrlPage , CTabOrderDlg , CAboutDlg , CImagePropPage , CLocalizePropPage , CUnitsPage , CPalPropPage
  • DoesAllowDynInsertBefore() : CFolderListBar
  • DoFieldExchange() : CDBVListSet
  • DoIDataObject() : CIDataObjectDlg
  • DoIEnumFormatEtc() : CIDataObjectDlg
  • DoImportText() : CServerView
  • DoModal() : CButtonDialog , COptionSheet , CButtonDialog , CIDataObjectDlg , COptionSheet
  • DoNothing() : CMainFrame
  • DoPaint() : CMSMCaptionBar , CRulerBar , CToolsPalette , CRulerBar
  • DoPasteItem() : CServerView , CMainView
  • DoPasteNative() : CServerView , CMainView
  • DoPasteStandard() : CMainView
  • DoPasteText() : CServerView
  • DoPropExchange() : CXlistCtrl , CButtonCtrl , CPalCtrl , CSpindialCtrl , CLicensedCtrl , CTesthelpCtrl , CLocalizeCtrl , CPushCtrl , CCircCtrl , CTimeCtrl , CImageCtrl
  • DoSave() : CWordPadDoc
  • DoSelectColor() : CDynaMenuDoc
  • DoUndo() : CUndoBar
  • DoUpdateSelectColor() : CDynaMenuDoc
  • Draw() : CDrawDoc , CWheel , CShape , CComboRulerItem , CDrawDoc , CDrawOleObj , CDrawPoly , CTestContainer98Item , CDrawPoly , CDrawObj , CComboRulerItem , CTabRulerItem , CFigure , CDrawDoc , CDrawRect , CDrawOleObj , CRulerItem , CDrawRect , CTabRulerItem , CRulerItem , CBasePiece , CServerNode , CDrawObj , CRing
  • DrawBackToFront() : CTestContainer98Item
  • DrawButton() : CMSMToolBar
  • DrawDiv() : CRulerBar
  • DrawFace() : CRulerBar
  • DrawFocusLine() : CRulerItem
  • DrawFrontToBack() : CTestContainer98Item
  • DrawGrid() : CDrawView
  • DrawItem() : CBigIcon , CColorMenu , CXlistCtrl , CColorListBox , CPushCtrl , CCustomList , CListViewEx , CFontComboBox , CColorMenu , CIconComboBox , CBigIcon
  • DrawItemPicture() : CXlistCtrl
  • DrawItemText() : CXlistCtrl
  • DrawMargins() : CWordPadView
  • DrawNumbers() : CRulerBar
  • DrawScene() : CCubeView
  • DrawStroke() : CStroke
  • DrawTabs() : CRulerBar
  • DrawTickMarks() : CRulerBar
  • DrawTracker() : CDrawObj
  • DrawTree() : CServerDoc , CServerNode
  • DumpConst() : CTypeLibODLView
  • DumpFunc() : CTypeLibODLView
  • DumpVar() : CTypeLibODLView
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- e -

  • Edit1() : CWclsEditDlg
  • Edit2() : CWclsEditDlg
  • Edit3() : CWclsEditDlg
  • Edit4() : CWclsEditDlg
  • EmptyContents() : CFontComboBox
  • Enable() : CAmbientProperty
  • EnableControls() : CTooltipDemoView , CDesktopAlertDemoDlg
  • EnableEditRequestLogging() : CMethodInfo
  • EnableFill() : CDrawObj
  • EnableLine() : CDrawObj
  • EnableLogging() : CMethodInfo
  • EnableModeless() : CScript
  • EnableSourceControls() : CDesktopAlertDemoDlg
  • END_INTERFACE_PART() : CTestContainer98Item
  • EndAdjust() : CStandardBar , CPaletteBar
  • EndDrag() : CStandardBar , CPaletteBar
  • Entry() : PalLib::_DPal
  • Enum() : CNetAddrVerifierDlg
  • EnumFamPrinterCallBack() : CFontComboBox
  • EnumFamPrinterCallBackEx() : CFontComboBox
  • EnumFamScreenCallBack() : CFontComboBox
  • EnumFamScreenCallBackEx() : CFontComboBox
  • EnumFontFamiliesEx() : CFontComboBox
  • EnumFontSizes() : CSizeComboBox
  • EnumSizeCallBack() : CSizeComboBox
  • Evaluate() : mfccalc::ICalcDlg , CRemoteCalcDlg , CCalcDlg
  • ExitInstance() : CMSOffice2007DemoApp , CSliderApp , CMDITabsDemoApp , CTasksPaneApp , CExplorerApp , COwnerDrawMenuApp , CDrawClientHandlersApp , CDrawApp , CCustomPagesApp , CPaletteDemoApp , CWordPadApp , CThreadApp , CMdiApp , CRibbonMDIDemoApp , CServerApp , CXlistApp , CTimeApp , CBounceThread , CSpindialApp , CToolbarDateTimePickerApp , CPalApp , CButtonApp , CLicensedApp , CStateCollectionApp , CCircApp , CTooltipDemoApp , CImageApp , CTabControlApp , CLocalizeApp , CWordPadApp , CRebarTestApp , CMenuSubSetApp , CIEDemoApp , CDynamicMenuApp , CSetPaneSizeApp , CGuidGenApp , CTheApp , COle2ViewApp , CTabbedViewApp , CPushApp , CStatusBarDemoApp , CTesthelpApp , COutlookDemoApp , CVisualStudioDemoApp , CIViewersApp , CRollupPaneApp , CWorkSpaceToolBarApp , COutlookMultiViewsApp , CRibbonGadgetsApp
  • ExitScheduler() : CSchedulerDlg
  • Expand() : CTreeItem
  • ExpandClassification() : CObjTreeView
  • ExpandFuncs() : CTreeItem
  • ExpandImplTypes() : CTreeItem
  • ExpandInterfaces() : CObjTreeView
  • ExpandObject() : CObjTreeView
  • ExpandTypeInfo() : CTreeItem
  • ExpandTypeLib() : CTreeItem
  • ExpandTypeLibs() : CObjTreeView
  • ExpandVars() : CTreeItem
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- f -

  • Fill() : CSSE2Unsigned16Saturated
  • FillBuildWindow() : COutputBar , COutputViewBar
  • FillClassView() : CClassViewBar
  • FillCombobox() : CHistoryList
  • FillDebugWindow() : COutputBar , COutputViewBar
  • FillFileView() : CFileViewBar
  • FillHelp() : CDynamicHelpViewBar
  • FillInHeader() : CButtonDialog
  • FillInParaFormat() : CRulerBar
  • FillListCtrl() : CListHdrDlg
  • FillResourceView() : CResourceViewBar
  • FillTree() : CFavorit , CFavoritesManager
  • FillWithExplorerHistory() : CAddressCombo
  • FinalConstruct() : CDrawCliLiveIconsHandler , CDrawCliSearchHandler
  • FinalRelease() : CDrawCliLiveIconsHandler , CDrawCliSearchHandler
  • Find() : CStringCollect
  • FindAmbientProperty() : CTestContainer98Doc
  • FindAndDelete() : CServerNode
  • FindByID() : CFavorit
  • FindControl() : CTestContainer98Doc
  • FindFocusedOutlookWnd() : CMainFrame
  • FindInt() : CIntListView
  • FindInternalDivider() : CMainFrame
  • FindItem() : CEmpView , CTestContainer98Doc
  • FindKeyInListBox() : CMapDWordToMyStructView , CMapStringToStringView , CTypedPtrMapView
  • FindMacro() : CScript , CScriptManager
  • FindMethod() : CInterfaceInfo
  • FindMyStruct() : CTypedPtrListView
  • FindNode() : CServerNode
  • FindOutlookParent() : CMainFrame
  • FindPropertyGet() : CInterfaceInfo
  • FindString() : CStringListView
  • FindTool() : CDrawTool
  • FinishCreate() : CMFCBindCntrItem , CTestContainer98Item
  • FinishStroke() : CStroke
  • FireClick() : CLocalizeCtrl , CButtonCtrl
  • FireClickIn() : CCircCtrl
  • FireClickOut() : CCircCtrl
  • FireCustomClick() : CPushCtrl
  • FireOnNewControl() : CTestContainer98Doc
  • FireSpinPositive() : CSpindialCtrl
  • FireTimer() : CTimeCtrl
  • FirstInstance() : CTheApp
  • FixUpObjectPositions() : CDrawDoc
  • FlashColor() : CCircCtrl
  • FontEnumProc() : CTBComboBox
  • ForceDelayed() : CWordPadDoc
  • FormatFilePage() : CPageSetupDlg
  • FormatFooter() : CPageSetupDlg
  • FormatHeader() : CPageSetupDlg
  • FormatListBoxEntry() : CMapDWordToMyStructView , CTypedPtrMapView
  • FormatMyObject() : CMyObject
  • FormatMyStruct() : CMyStruct
  • FormatProperty() : CPasswordProp
  • FreeBitmaps() : COle2ViewApp
  • FreeValue() : CProperty
  • FreezeEvents() : CTestContainer98Item
  • FunctionCallWithVariant() : CVarUseDlg
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- g -

  • Get() : CProperty , CPropertySection , CProperty , CPropertySection , CPropertySet , CPropertySection , CPropertySet , CPropertySection , CPropertySet , CProperty
  • get_accName() : CAddressBox
  • get_Name() : CExtendedControl
  • Get_NewEnum() : CStringCollect , CVariantMap
  • get_Position() : CAutoClickDoc
  • get_PositionX() : CExtendedControl
  • get_PositionY() : CExtendedControl
  • get_SizeX() : CExtendedControl
  • get_SizeY() : CExtendedControl
  • get_text() : CAutoClickDoc
  • get_x() : CAutoClickDoc , CAutoClickPoint
  • get_y() : CAutoClickDoc , CAutoClickPoint
  • GetAbbrev() : CWordPadApp
  • GetAccum() : CCalcDlg , CRemoteCalcDlg
  • GetActivationPolicy() : CTestContainer98Item
  • GetActivePane() : CViewExSplitWnd
  • GetActiveView() : CContainerItem , CDrawItem , CMFCBindCntrItem , CRectItem , CTestContainer98Item , CWordPadCntrItem , CDrawItem , CMSOffice2007DemoCntrItem , CWordPadCntrItem
  • GetAge() : CSwarm
  • GetAmbientProperty() : CTestContainer98Doc
  • GetAngle() : CVector
  • GetAppname() : CSummInfo
  • GetAuthor() : CSummInfo
  • GetBackColor() : CItemData
  • GetBackList() : CIEDemoDoc
  • GetBaseSize() : CRectItem
  • GetBaseUnits() : CButtonDialog , CRulerBar , CButtonDialog , CRulerBar
  • GetBindHost() : CTestContainer98Item
  • GetBitDepth() : CSurface
  • GetBitmap() : CDrawCliLiveIconsHandler
  • GetBorder() : CSwarm
  • GetBoundingRect() : CWheel , CFigure , CStroke , CBasePiece
  • GetButtonInfo() : CStandardBar , CPaletteBar
  • GetByteDepth() : CSurface
  • GetByteOrder() : CPropertySet
  • GetCaptionFont() : CMSMCaptionBar
  • GetCaptionHeight() : CMSMCaptionBar
  • GetCaptionTextColor() : CMSMCaptionBar
  • GetCapture() : CTestContainer98Item
  • GetChangedPropertyID() : CAmbientPropertiesDlg
  • GetCircleOffset() : CCircCtrl
  • GetClassID() : CPropertySet , CWordPadDoc , CDrawCliSearchHandler , CPropertySet , CWordPadDoc
  • GetClickPoint() : CAutoClickPoint
  • GetClipboardData() : CWordPadView
  • GetColor() : CColorMenu
  • GetColorFromColorButton() : CDrawView , CMainFrame
  • GetColumns() : CPaletteBar , CRibbonTableButton , CToolsPalette
  • GetCommand() : CFavorit , CHistoryObj
  • GetComments() : CSummInfo
  • GetContactPosition() : CBasePiece , CWheel , CRing
  • GetContextMenu() : CWordPadView , CRibbonGadgetsView , CWordPadView
  • GetControlFlags() : CImageCtrl
  • GetControlInfo() : CTestContainer98Item
  • GetCount() : CPropertySection , CPropertySet , CStringCollect , CVariantMap , CStringCollect , CPropertySection , CPropertySet
  • GetCreateDate() : CSummInfo
  • GetCurrentCommand() : CMSMLinksBar
  • GetCurrentPen() : CScribbleDoc
  • GetCurrentView() : CMainFrame
  • GetCycleError() : CBasePiece , CWheel , CRing
  • GetDayState() : CMonthCalPage
  • GetDC() : CTestContainer98Item
  • GetDefaultDBName() : CDBVListSet
  • GetDefaultFont() : CWordPadView , CMSOffice2007DemoView , CWordPadView
  • GetDefaultSQL() : CDBVListSet
  • GetDevPieceRgn() : CBasePiece , CWheel , CRing
  • GetDispatchIID() : CTestContainer98Doc
  • GetDispInfo() : CEmpView
  • GetDisplayName() : CTestContainer98Item
  • GetDocFrame() : COIPF
  • GetDockState() : CDocOptions , CWordPadApp , CDocOptions , CWordPadApp
  • GetDocOptions() : CWordPadApp
  • GetDocPalette() : CDibDoc
  • GetDocSize() : CDibDoc , CScribbleDoc
  • GetDocument() : CCollectView , CDWordArrayView , CIntListView , CMapDWordToMyStructView , CMapStringToStringView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView , CCubeView , CThreadView , CRecalcView , CContainerItem , CContainerView , CDBVListView , CEmpView , CDibView , CDockView , CDynaMenuView , CBounceView , CHelloView , CNotepadView , CShapesView , CRowListView , CScribbleItem , CScribbleView , CSnapView , CSpiroView , CTrackerView , CInputView , CTextView , CColorView , CHTMLEdView , CMfcieView , CAutoClickView , CDrawItem , CDrawView , CServerNode , CServerItem , CServerView , CDriverView , CMFCBindView , CMFCBindCntrItem , CMainView , CRectItem , CObjTreeView , CRegistryView , CDropTargetView , CEmbeddedItem , CPadView , CTestContainer98Item , CTestContainer98View , CWordPadCntrItem , CRulerBar , CEmbeddedItem , CWordPadView , CCustomPagesView , CDrawItem , CDrawView , CDynamicMenuView , CExplorerView , CIEDemoView , CMDITabsDemoView , CMenuSubSetView , CMSMoneyDemoView , CMSOffice2007DemoCntrItem , CMSOffice2007DemoView , COutlookDemoView , COutlookMultiViewsView , COwnerDrawMenuView , CPaletteDemoView , CRebarTestView , CRibbonGadgetsView , CRibbonMDIDemoView , CRollupPaneView , CSetPaneSizeView , CSliderView , CStateCollectionView , CStatusBarDemoView , CTabbedViewView , CTabControlView , CTasksPaneView , CToolbarDateTimePickerView , CTooltipDemoView , CVisualStudioDemoView , CWordPadCntrItem , CRulerBar , CEmbeddedItem , CWordPadView , CWorkSpaceToolBarView
  • GetDocumentColors() : CWordPadView
  • GetDocumentName() : CChildFrame
  • GetDocumentSize() : CMainDoc
  • GetDocVersionString() : CScript
  • GetDocView() : CMainFrame
  • GetDrawRect() : CCircCtrl
  • GetEditTime() : CSummInfo
  • GetEmbeddedItem() : CScribbleDoc
  • GetEntry() : CPalCtrl
  • GetEventInfo() : CTestContainer98Item
  • GetExtendedControl() : CTestContainer98Item
  • GetFigData() : CBasePiece , CWheel
  • GetFile() : CWordPadDoc
  • GetFileName() : CFileLog
  • GetFillColor() : CDrawObj
  • GetFindCombo() : CMainFrame
  • GetFirstItemPosition() : CPropertyBag
  • GetFirstMacroPosition() : CScript
  • GetFirstScriptPosition() : CScriptManager
  • GetFocus() : CTestContainer98Item
  • GetFolderIcon() : CFavoritesManager
  • GetFolders() : CMainFrame
  • GetFont() : CItemData
  • GetFontNameCombo() : CMainFrame
  • GetFontSizeCombo() : CMainFrame
  • GetForeColor() : CItemData
  • GetFormatID() : CPropertySection
  • GetFormattedGuid() : CGuidGenDlg
  • GetFormatVersion() : CPropertySet
  • GetFreeTab() : CRulerBar
  • GetFromVariant() : CDriverView
  • GetFrwdList() : CIEDemoDoc
  • GetFullRowSel() : CListViewEx
  • GetHandle() : CDrawObj , CDrawRect , CDrawPoly , CDrawObj , CDrawRect , CDrawPoly
  • GetHandleCount() : CDrawObj , CDrawRect , CDrawPoly , CDrawObj , CDrawRect , CDrawPoly
  • GetHandleCursor() : CDrawObj , CDrawRect , CDrawPoly , CDrawObj , CDrawRect , CDrawPoly
  • GetHandleRect() : CDrawObj
  • GetHDIB() : CDibDoc
  • GetHeight() : CSwarm
  • GetHelpIDs() : CButtonDialog , CCSDialog , CCSPropertyPage , CDateDialog , CDocOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CPageSetupDlg , CUnitsPage , CButtonDialog , CCSDialog , CCSPropertyPage , CDateDialog , CDocOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CPageSetupDlg , CUnitsPage
  • GetHitItem() : CMainView
  • GetHitRectPix() : CRulerItem
  • GetHitTabPix() : CRulerBar
  • GetHorzPosPix() : CRulerItem
  • GetHorzPosTwips() : CRulerItem
  • GetHourMinute() : CEntryInfoDlg
  • GetHwnd() : CSliderButton
  • GetI1() : CVariantMap
  • GetI2() : CVariantMap
  • GetIcon() : CMainFrame , CFavorit , CMainFrame
  • GetIconID() : CButtonDialog
  • GetIconSize() : CCustomToolTipCtrl , CRibbonListButton , CRibbonListFontButton , CRibbonTooltipCtrl , CMyToolTipCtrl
  • GetID() : CProperty , CPropertySection , CAmbientProperty , CMethodInfo , CPropertySection
  • GetIDIcon() : CFavoritesManager
  • GetIDsOfNames() : CTestContainer98Item , CExtendedControl , CTestContainer98Item
  • GetIID() : CInterfaceInfo
  • GetImage() : CSurface
  • GetImagePath() : CImageCtrl
  • GetInitialLlamaColor() : CLeader , CBrightLeader , CHueLeader
  • GetInitialPosition() : CDrawView
  • GetInnerRect() : CRing
  • GetInterfaceHook() : CTestContainer98Item
  • GetInternetShortcutIcon() : CFavoritesManager
  • GetInvokeKind() : CMethodInfo
  • GetItem() : CVariantMap , CStringCollect , CVariantMap , CStringCollect
  • GetItemBackColor() : CXlistCtrl
  • GetItemDispatch() : CScriptManager
  • GetItemFont() : CXlistCtrl
  • GetItemForeColor() : CXlistCtrl
  • GetItemInfo() : CScript
  • GetItemName() : CServerNode
  • GetItemPicture() : CXlistCtrl
  • GetItemPictureHeight() : CXlistCtrl
  • GetItemText() : CXlistCtrl
  • GetItemTextHeight() : CXlistCtrl
  • GetItemTypeInfo() : CScriptManager
  • GetItemWithCapture() : CTestContainer98View
  • GetItemWithFocus() : CTestContainer98View
  • GetKey() : CVariantAssoc
  • GetKeywords() : CSummInfo
  • GetLastAuthor() : CSummInfo
  • GetLastPrintDate() : CSummInfo
  • GetLastSaveDate() : CSummInfo
  • GetLCID() : CScript
  • GetLeader() : CSwarm
  • GetLeaderCount() : CSwarm
  • GetLength() : CPalCtrl , CVector
  • GetLicenseKey() : CLicensedCtrl
  • GetLineColor() : CDrawObj
  • GetLineWeight() : CDrawObj
  • GetLinksBar() : CMainFrame
  • GetList() : CPropertySection , CPropertySet , CPropertySection , CPropertySet
  • GetLlamaAcc() : CLeader
  • GetLlamaColor() : CLeader , CHueLeader , CBrightLeader
  • GetLlamaCount() : CSwarm
  • GetLlamaVel() : CLeader
  • GetLog() : CTestContainer98Doc
  • GetLogPieceRgn() : CBasePiece , CWheel , CRing
  • GetMainFrame() : COIPF
  • GetMapMode() : CDrawDoc
  • GetMax() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • GetMenuBar() : CUndoMenu
  • GetMessageString() : CDynaMenuDoc , CMainFrame
  • GetMethod() : CInterfaceInfo
  • GetMethodInfo() : CTestContainer98Item
  • GetMin() : CComboRulerItem , CRulerItem , CComboRulerItem , CRulerItem
  • GetModelessShapePropSheet() : CShapesView
  • GetMSMCaptionButtonsSize() : CMSMVisualManager
  • GetName() : CMethodInfo , CTreeItem , CScript , CMethodParamInfo , CFavorit , CAmbientProperty
  • GetNativeClipboardData() : CRectItem , CServerItem
  • GetNeedlePosition() : CSpindialCtrl
  • GetNewEnum() : CStringCollect , CVariantMap
  • GetNext() : CServerNode
  • GetNextItem() : CPropertyBag
  • GetNextMacroName() : CScript
  • GetNextScript() : CScriptManager
  • GetNextTabItem() : CTestContainer98Doc
  • GetNote() : CCircCtrl
  • GetNumAmbientProperties() : CTestContainer98Doc
  • GetNumChars() : CSummInfo
  • GetNumMethods() : CInterfaceInfo
  • GetNumPages() : CSummInfo
  • GetNumParams() : CMethodInfo
  • GetNumScripts() : CScriptManager
  • GetNumWords() : CSummInfo
  • GetObjectInfo() : CDrawView , CMainView , CDrawView
  • GetObjects() : CDrawDoc
  • GetObjListView() : CMainFrame
  • GetOperand() : CRemoteCalcDlg , CCalcDlg
  • GetOperation() : CCalcDlg , CRemoteCalcDlg
  • GetOSVersion() : CPropertySet
  • GetOutputEditControl() : CTestContainer98Doc
  • GetPaneName() : CMyOutlookBar
  • GetPaperColor() : CDrawDoc
  • GetParam() : CMethodDlg , CMethodInfo
  • GetParentButton() : CUndoBar
  • GetParentTab() : CView4
  • GetPenLocation() : CBasePiece , CWheel
  • GetPenRect() : CBasePiece , CWheel
  • GetPerimeter() : CRing , CBasePiece , CWheel
  • GetPicture() : CItemData , CPalCtrl
  • GetPitch() : CSurface
  • GetPixelAddress() : CSurface
  • GetPopupMenuIndex() : CServerNode
  • GetPos() : CSliderButton
  • GetPosition() : CAutoClik , CAutoClickDoc , CAutoClik , CAutoClickDoc
  • GetPrev() : CServerNode
  • GetPrevItem() : CTestContainer98Doc
  • GetPrimarySelection() : CTestContainer98Doc
  • GetProperty() : CPropertySection , CPropertySet , CPropertySection , CPropertySet
  • GetPropertyPageCLSIDs() : CTestContainer98Item
  • GetPropList() : CPropertiesViewBar
  • GetRate() : CRateDlg
  • GetRawValue() : CProperty
  • GetRect() : CRectItem
  • GetRequestEditResponse() : CMethodInfo
  • GetResourceHandle() : CLocalizeCtrl , CLocalizePropPage
  • GetRevNum() : CSummInfo
  • GetRibbonBar() : CMainFrame
  • GetRowHeight() : CMSMLinksBar , CMSMCategoryBar
  • GetRows() : CRibbonTableButton
  • GetScriptManager() : CTestContainer98Doc
  • GetScrollBarCtrl() : CView1 , CView4
  • GetSection() : CPropertySet , CWordPadDoc , CPropertySet
  • GetSectionName() : CPropertySection
  • GetSecurity() : CSummInfo
  • GetSelection() : CMainView
  • GetSelectionResponse() : CPropertyEditRequestsPage
  • GetSelNum() : CUndoButton
  • GetShape() : CDrawRect
  • GetSize() : CDrawDoc , CRectItem , CPropertySection
  • GetSliderPos() : CMainFrame
  • GetSourceView() : CMainFrame
  • GetStartTimeFormatted() : CSchedulerDlg
  • GetStatusBar() : CModelessMain , CStatusBarDemoView , CMainFrame
  • GetStr1() : CVariantMap
  • GetStr2() : CVariantMap
  • GetString() : DocType
  • GetStringArray() : CFormatMenu
  • GetStringValue() : CKey
  • GetStyleFromStyles() : CMainFrame
  • GetSubItems() : CFavorit
  • GetSubject() : CSummInfo
  • GetSurface() : CChildView , CSwarm
  • GetSysCommand() : CMSMCaptionBarButton
  • GetSysImages() : CFavoritesManager
  • GetSysImageSize() : CFavoritesManager
  • GetTailPosition() : CTestContainer98Doc
  • GetTasksPane() : CTasksPaneView
  • GetTemplate() : CSummInfo
  • GetText() : CAutoClik , CItemData
  • GetTextData() : CListOutputFrame
  • GetTheText() : CLocalComboBox
  • GetTitle() : CSummInfo , CHistoryObj
  • GetToolBar() : CModelessMain
  • GetToolbarButtonTextColor() : CMSMVisualManager
  • GetToolbarButtonToolTipText() : CMainFrame
  • GetTooltipImage() : CMainFrame
  • GetToVariant() : CDriverView
  • GetTPU() : CWordPadApp
  • GetTwipSize() : CSizeComboBox
  • GetType() : CMethodParamInfo , CProperty
  • GetTypeInfo() : CTestContainer98Item , CExtendedControl , CTreeItem , CTestContainer98Item
  • GetTypeInfoCount() : CExtendedControl , CTestContainer98Item
  • GetTypeKind() : CTreeItem
  • GetTypeLib() : CTreeItem
  • GetUnit() : CWordPadApp
  • GetUnits() : CWordPadApp
  • GetURL() : CHistoryObj , CFavorit , CLinkButton
  • GetURLofID() : CFavoritesManager
  • GetUserMode() : CTestContainer98Doc
  • GetValue() : CVariantAssoc , CAmbientProperty , CVariantAssoc
  • GetVertPosPix() : CRulerItem
  • GetView() : CRulerBar , CComboToolBar , CEmbeddedItem , CMainFrame , CRulerBar , CEmbeddedItem , CWordPadDoc , CTestContainer98Doc
  • GetViewType() : CRowListView
  • GetVisible() : CRemoteCalcDlg , CCalcDlg
  • GetVisibleHeight() : CSurface
  • GetVisibleWidth() : CSurface
  • GetVTI() : CAmbientProperty
  • GetWebView() : CMainFrame
  • GetWeightFromLineWeight() : CMainFrame
  • GetWheelDistanceForFigure() : CSpiroView
  • GetWidth() : CSwarm
  • GetWindow() : CScript , CTestContainer98Item
  • GetWindowContext() : CTestContainer98Item
  • GetX() : CAutoClik , CClikPoint , CAutoClickDoc , CClikPoint , CAutoClik , CAutoClickDoc
  • GetY() : CAutoClickDoc , CAutoClik , CAutoClickDoc , CAutoClik , CClikPoint
  • Go() : CIEDemoDoc
  • GoBack() : CIEDemoDoc
  • GoForward() : CIEDemoDoc
  • GotData() : CIDataObjectDlg
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- h -

  • HandlePointerInactiveDragOver() : CTestContainer98View
  • HandlePointerInactiveMove() : CTestContainer98View
  • HandlePointerInactiveSetCursor() : CTestContainer98View
  • HandleSelChange() : CMonthCalPage
  • HandleSelect() : CMonthCalPage
  • HandleWindowlessDragEnter() : CTestContainer98View
  • HandleWindowlessDragLeave() : CTestContainer98View
  • HandleWindowlessDragOver() : CTestContainer98View
  • HandleWindowlessDrop() : CTestContainer98View
  • HandleWindowlessKeyboardMessage() : CTestContainer98View
  • HandleWindowlessMouseMessage() : CTestContainer98View
  • HasButton() : CCheckBoxProp , CTwoButtonsProp , CCustomDlgProp
  • HasChildren() : CServerNode
  • HasFocus() : CLocalComboBox , CFindComboButton
  • HasUIActiveState() : CTestContainer98Item
  • HaveHotBorder() : CSliderButton
  • HideModelessPropSheet() : CMainFrame
  • HitTest() : CWheel , CShapesDoc , CBasePiece , CDrawObj , CTestContainer98Item , CDrawObj , CMSMCaptionBar
  • HitTestItems() : CTestContainer98View , CContainerView
  • HitTestPix() : CRulerItem , CComboRulerItem , CTabRulerItem , CRulerItem
  • HonorIgnoreActivateWhenVisible() : CTestContainer98Doc
  • HSB() : CLeader
  • HScroll() : CPropSliderCtrl
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- i -

  • Import() : CSurface , CLeader
  • InBounds() : CCircCtrl
  • InCircle() : CCircCtrl
  • IncrRevNum() : CSummInfo
  • InformDlStatus() : CImageCtrl
  • InformSize() : CImageCtrl
  • InfoToDialogHelper() : CDlgtempDlg
  • Init() : CInterfaceInfo , CCubeView , CEditBar , CLlama , CExtendedControl , CMethodParamInfo , CMethodInfo
  • InitBulletPalette() : CMainFrame
  • InitControlInfo() : CTestContainer98Item
  • InitDefaultAmbientProperties() : CTestContainer98Doc
  • InitDIBData() : CDibDoc
  • InitDocument() : CScribbleDoc
  • InitFloaty() : CMSOffice2007DemoView
  • InitHomeCategory() : CMainFrame
  • Initialize() : CMSMLinksBarButton , CDialogItem , CSwarm , CPadFrame , CPadView , CPageSetupDlg , CTestContainer98Doc , CLinkButton , CMSMCategoryBarButton
  • InitialShowWindow() : CMainFrame
  • InitInstance() : CXlistApp , CMSOffice2007DemoApp , CNewControlsApp , CCmnCtrl1App , COutlookDemoApp , COutlookMultiViewsApp , CCmnCtrl2App , COwnerDrawMenuApp , CPaletteDemoApp , CTaskDialogTestApp , CPropSheetDemoApp , CRebarTestApp , CCollectApp , CCtrlbarsApp , CRibbonGadgetsApp , CRibbonMDIDemoApp , CTestApp , CRollupPaneApp , CSetPaneSizeApp , CCubeApp , CDBVListApp , CSliderApp , CStateCollectionApp , CDibLookApp , CStatusBarDemoApp , CTabbedViewApp , CHuskApp , CTheApp , CTabControlApp , CTasksPaneApp , CDlgtempApp , CToolbarDateTimePickerApp , CTooltipDemoApp , CDllScreenCapApp , CDockApp , CTrayMenuApp , CVisualStudioDemoApp , CDynaMenuApp , CWordPadApp , CWorkSpaceToolBarApp , CScreenCapApp , CFileDlgWatcherApp , CTheApp , CThreadApp , CHelloApp , CListHdrApp , CGDIThread , CMdiApp , CMDIApp , CBallThread , CMMXSwarmApp , CModelessApp , CRectThread , CMultiPadApp , CNotepadApp , CLineThread , CPropDlgApp , CRowListApp , CMdiApp , CScribbleApp , CCImageApp , CBounceThread , CSnapApp , CSpiroApp , CRecalcApp , CTrackerApp , CVarUseApp , CMutexesApp , CViewExApp , CDHtmlExploreApp , CCounterThread , CHTMLEditApp , CMfcieApp , CDisplayThread , CSchedulerApp , CAutoDrivApp , CSpeakNApp , CAutoClickApp , CButtonApp , CAutoDrivApp , CCalcDrivApp , CCircApp , CDrawApp , CServerApp , CCmnCtrl3App , CInProcApp , CDriveApp , CContainerApp , CMFCBindApp , CCalcApp , CImageApp , COleClientApp , CMSMoneyDemoApp , CMenuSubSetApp , CMDITabsDemoApp , CIViewersApp , CExplorerApp , CDynamicMenuApp , CLicensedApp , COle2ViewApp , CDlgToolTipsApp , CDesktopAlertDemoApp , CCustomPagesApp , CTheApp , CLocalizeApp , CTestContainer98App , CWordPadApp , CNetAddrVerifierApp , CGuidGenApp , CPalApp , CPushApp , CDrawApp , CDrawClientHandlersApp , CSpindialApp , CTesthelpApp , CIEDemoApp , CTimeApp
  • InitMainButton() : CMainFrame
  • InitMultilevelPalette() : CMainFrame
  • InitNumberingPalette() : CMainFrame
  • InitPositionPalette() : CMainFrame
  • InitPropertyGet() : CMethodInfo
  • InitPropertyPut() : CMethodInfo
  • InitPropList() : CPropertiesViewBar
  • InitRibbon() : CMainFrame
  • InitRootNode() : CServerNode
  • InitScriptManager() : CTestContainer98Doc
  • InitTabButtons() : CMainFrame
  • InitViewCategory() : CMainFrame
  • InitViews() : CMainFrame
  • InputEdit() : CSpeakNDlg
  • InsertBitmap() : CMSOffice2007DemoView
  • InsertControl() : CTestContainer98Doc
  • InsertSize() : CSizeComboBox
  • InternalInvoke() : CExtendedControl
  • IntersectRect() : CSpiroRect
  • Intersects() : CDrawRect , CDrawObj , CDrawRect , CDrawPoly
  • Invalidate() : CDrawObj , CRulerItem , CRectItem , CDrawObj , CRulerItem
  • InvalidateItem() : CMainView , CTestContainer98Item , CContainerItem , CServerView
  • InvalidateRect() : CTestContainer98Item
  • InvalidateRgn() : CTestContainer98Item
  • InvalObj() : CDrawView
  • Invoke() : CTestContainer98Item , CExtendedControl
  • InvokeMethods() : CTestContainer98Item
  • Ipv4AddrToString() : CNetAddrVerifierDlg
  • Ipv6AddrToString() : CNetAddrVerifierDlg
  • IsBackAvailable() : CIEDemoDoc , CMSMoneyDemoDoc
  • IsBindable() : CMethodInfo
  • IsChild() : CServerNode
  • IsChildNodeOf() : CMyTreeCtrl
  • IsDocOpen() : CWordPadApp
  • IsEditable() : CMSMLinksBarButton , CLinkButton , CMSMCategoryBarButton
  • IsEditViewActive() : CMainFrame
  • IsEmpty() : CVariantMap
  • IsEmptyMenuAllowed() : CUndoButton
  • IsEnabled() : CAmbientProperty
  • IsEnableFill() : CDrawObj
  • IsEnableLine() : CDrawObj
  • IsExclusive() : CUndoButton
  • IsFavoritesMenu() : CMainFrame
  • IsFormatText() : CWordPadView
  • IsFrwdAvailable() : CMSMoneyDemoDoc , CIEDemoDoc
  • IsIdleMessage() : CWordPadApp
  • IsInPlaceActive() : CTestContainer98Item
  • IsInsideOut() : CTestContainer98Item
  • IsInvisibleAtRuntime() : CTestContainer98Item
  • IsItemMenuLook() : CRibbonListButton
  • IsLogged() : CMethodInfo
  • IsMDITabsDisabled() : CMDITabOptions
  • IsModified() : CHTMLEdDoc
  • IsNull() : CSurface
  • IsOutlookBar2003() : CMainFrame
  • IsParentActive() : CMSMCaptionBar
  • IsParentMaximize() : CMSMCaptionBar
  • IsPrintPreviewMode() : CMainFrame
  • IsReadOnly() : CChildFrame
  • IsScrollBar() : CTabbedViewView
  • IsSelected() : CDrawView , CMainView , CMFCBindView , CTestContainer98View , CContainerView
  • IsStock() : CAmbientProperty
  • IsSubclassedControl() : CPushCtrl , CButtonCtrl , CXlistCtrl
  • IsUIActive() : CTestContainer98Item
  • IsUpdatePending() : CPadView
  • IsValidSel() : CObjTreeView
  • IsWheel() : CBasePiece
  • IsWindowless() : CTestContainer98Item
  • IsWordWrap() : CPadView
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- p -

  • PackBytes() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • PackBytesU() : CSSE2Unsigned16Saturated
  • ParseInterfaceFlag() : CTCCommandLineInfo
  • ParseMeasurement() : CWordPadApp
  • ParseOptionFlag() : CTCCommandLineInfo
  • ParseParam() : CTCCommandLineInfo , CWordPadCommandLineInfo
  • ParseServiceFlag() : CTCCommandLineInfo
  • PasteEmbedded() : CDrawView
  • PasteNative() : CDrawView , CWordPadView , CDrawView , CWordPadView
  • PerformOperation() : CCalcDlg
  • PointColor() : CSurface
  • PopBlockFmtMenu() : CHTMLEdView
  • PopColorMenu() : CHTMLEdView
  • Position() : ACDual::IDualAClick
  • PositionCombos() : CFormatBar
  • PositionControls() : CButtonDialog
  • PositionX() : TCPropsLib::ITCExtendedControl
  • PositionY() : TCPropsLib::ITCExtendedControl
  • PostNcDestroy() : CParsedEditExported , CModelessDialog , CAdderDialog , CModelessShapePropSheet , CCalcDlg , CTypeLibWnd
  • PreCloseFrame() : CTestContainer98Doc , CWordPadDoc
  • PreCreateWindow() : CRowListView , CRibbonGadgetsView , CChildFrame , CMainFrame , CRibbonMDIDemoView , CInPlaceFrame , CMainFrame , CRollupPaneView , CMainFrame , CSetPaneSizeView , CScribbleView , CMainFrame , CSliderView , CChildView , CMainFrame , CStateCollectionView , CMainFrame , CStatusBarDemoView , CChildFrame , CMainFrame , CTabbedViewView , CView2 , CMainFrame , CTabControlView , CSpiroView , CMainFrame , CTasksPaneView , CMainFrame , CToolbarDateTimePickerView , CWordPadView , CMainFrame , CCSPropertySheet , CMainFrame , CTooltipDemoView , CMfcieView , CChildFrame , CMainFrame , CAutoClickView , CVisualStudioDemoView , CChildFrame , CMainFrame , CChildFrame , CMainFrame , CAutoClickView , CWorkSpaceToolBarView , CChildFrame , CMainFrame , CDrawView , CMFCBindView , CMainFrame , CTypeLibODLView , CCubeView , CTypeLibWnd , CObjTreeView , CMainFrame , CPadView , CMainFrame , CChildView , CTestContainer98View , CCSPropertySheet , CMainFrame , CRebarTestView , CMainFrame , CPaletteDemoView , CMainFrame , CWordPadView , COutlookMultiViewsView , CMainFrame , COutlookDemoView , CMainFrame , CFoldersTree , CMSOffice2007DemoView , CCustomPagesView , CMainFrame , CMSMCaptionBar , CMenuSubSetView , CMainFrame , CChildFrame , CMDITabsDemoView , CMainFrame , CDrawView , CDynamicMenuView , CIEDemoView , CContainerView , CMainFrame , CExplorerView , CMainFrame , CChildFrame , CDBVListView , CMainFrame , CChildFrame , CBounceFrame , CBounceView , CMSMoneyDemoView , CMainFrame , CHelloFrame , CHelloView , CMainFrame , CChildView , CMainFrame , COwnerDrawMenuView , CMainFrame , CListViewEx , CChildFrame , CMainFrame
  • PreLoadState() : CRibbonMDIDemoApp , CExplorerApp , CRollupPaneApp , CRibbonGadgetsApp , CToolbarDateTimePickerApp , CWorkSpaceToolBarApp , CTooltipDemoApp , CTabControlApp , CTasksPaneApp , CStateCollectionApp , CMDITabsDemoApp , CCustomPagesApp , COwnerDrawMenuApp , COutlookDemoApp , CIEDemoApp , CDynamicMenuApp , CMenuSubSetApp , COutlookMultiViewsApp , CRebarTestApp , CWordPadApp , CSetPaneSizeApp , CStatusBarDemoApp , CVisualStudioDemoApp , CTabbedViewApp
  • Prepare() : CTestContainer98Item
  • PrepareCache() : CEmpView
  • PressButton() : CSpiroView
  • PreTranslateMessage() : CWordPadApp , CFolderListPopupWnd , CDlgToolTipsDlg , CWordPadApp , CComboToolBar , CCalcDlg , CTheApp , CMSMCaptionBar , CScreenCapApp , CSnapPropertySheet , CXlistCtrl , CMainFrame , CSearchBox , CClassViewBar , CTestContainer98View , CLocalComboBox , CMainFrame , CButtonCtrl , CMacroComboBox
  • PreviewFillColor() : CDrawView
  • PreviewLineColor() : CDrawView
  • PreviewLineWeight() : CDrawView
  • PreviewStyle() : CDrawView
  • PrintPageHeader() : CScribbleView
  • PrintTitlePage() : CScribbleView
  • PrintTwips() : CWordPadApp
  • PrintWidth() : CRulerBar
  • ProcessNewObject() : CMFCBindCntrItem
  • PromptChangeNode() : CServerNode
  • PromptForFileName() : CWordPadApp
  • PromptNewChildNode() : CServerNode
  • PromptText() : CSpeakNDlg
  • PushChar() : CCheckBoxProp
  • put_Name() : CExtendedControl
  • put_Position() : CAutoClickDoc
  • put_PositionX() : CExtendedControl
  • put_PositionY() : CExtendedControl
  • put_SizeX() : CExtendedControl
  • put_SizeY() : CExtendedControl
  • put_text() : CAutoClickDoc
  • put_x() : CAutoClickDoc , CAutoClickPoint
  • put_y() : CAutoClickDoc , CAutoClickPoint
  • putref_Position() : CAutoClickDoc
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- q -

  • QueryAcceptData() : CWordPadView
  • QueryDelete() : CPaletteBar , CStandardBar
  • QueryInsert() : CStandardBar , CPaletteBar
  • QueryInterface() : CExtendedControl , CTCBindHost , CPropertyBag , CImpIAdviseSink
  • QueryService() : CTestContainer98Item
  • QuickActivate() : CTestContainer98Item
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- r -

  • RandomBits() : CSurface
  • RandomLine() : CSurface
  • raw_Activate() : CExtendedControl
  • raw_Deactivate() : CExtendedControl
  • raw_UIActivate() : CExtendedControl
  • raw_UIDeactivate() : CExtendedControl
  • Read() : CTrackFile , COEMFile , CTrackFile , COEMFile , CPropertyBag
  • ReadArray() : CBitmapProperty
  • ReadFromStorage() : CSummInfo
  • ReadFromStream() : CPropertySection , CPropertySet , CProperty , CPropertySection , CPropertySet , CProperty
  • ReadItem() : CTestContainer98Item
  • ReadLine() : CLineFile
  • ReadNameDictFromStream() : CPropertySection
  • ReadStruct() : CBitmapProperty
  • ReadyStateChange() : IMAGELib::_DImageEvents
  • RecalcBounds() : CDrawPoly
  • RecalcDone() : CRecalcDoc
  • RecalcInSecondThread() : CRecalcDoc
  • RecalcInSingleThread() : CRecalcDoc
  • RecalcLayout() : CInPlaceFrame , CMainFrame , CInPlaceFrame
  • RecalcTextSizes() : CRibbonListButton , CRibbonListFontButton
  • RecordCreateDate() : CSummInfo
  • RecordPrintDate() : CSummInfo
  • RecordSaveDate() : CSummInfo
  • Refresh() : CAutoClickDoc
  • RefreshColorMenu() : CDynaMDIChildWnd
  • RefreshControlList() : CInsertControlDlg
  • RefreshDir() : CDHtmlExploreDlg
  • RefreshRegisteredControls() : CRegisterControlsDlg
  • RefreshWindow() : CAutoClik , CAutoClickDoc , ACDual::IAClick , ACDual::IDualAClick , AutoClik::IAClick , CAutoClik
  • RegisterActive() : CCalcDlg
  • RegisterControlClass() : CParsedEdit , CParsedEditExported
  • RegisterFormats() : CWordPadApp
  • RelayEvent() : CTesthelpCtrl
  • Release() : CSmartTypeAttr , CSmartVarDesc , CSmartFuncDesc , CObjectData , CTestContainer98Item
  • ReleaseDC() : CTestContainer98Item
  • Remove() : CDrawDoc , CStringCollect , CDrawObj , CDrawOleObj , CDrawView , CPropertySection , CPropertySet , CStringCollect , CDrawDoc , CDrawObj , CDrawView , CPropertySection , CPropertySet , CDrawOleObj
  • RemoveAll() : CPropertySection , CPropertySet , CStringCollect , CVariantMap , CStringCollect , CPropertySection , CPropertySet , CVariantMap
  • RemoveAllItems() : CObjListView
  • RemoveInfoFromTable() : CSchedulerDlg
  • RemoveItem() : CXlistCtrl , CObjListView , CTestContainer98Doc
  • RemoveKey() : CVariantMap
  • RemoveTabFromArray() : CFormatTabDlg
  • RemoveTabFromArrayByIndex() : CFormatTabDlg
  • RenewListCtrl() : CListHdrDlg
  • RepaintSelectedItems() : CListViewEx
  • ReplaceHDIB() : CDibDoc
  • ReplacePen() : CScribbleDoc
  • ReportSaveLoadException() : CWordPadDoc
  • RepositionFrame() : CInPlaceFrame
  • RequestsEdit() : CMethodInfo
  • RequestUIActivate() : CTestContainer98Item
  • Reset() : CPaletteBar , CStandardBar , CEnumVariant
  • ResetData() : CBitmapProperty
  • ResetPreviewState() : CDrawView
  • ResetSelNum() : CUndoButton
  • ResetSize() : CRectItem
  • ResetVariables() : CEntryInfoDlg
  • Restore() : CDrawView::XPreviewStateItem
  • RestoreOriginalstate() : CLinksBar , CMSMCategoryBar , CMyMenuBar
  • RestorePosition() : CMainFrame , CTypeLibWnd
  • RestorePreviewState() : CDrawView
  • RestoreState() : CWordPadDoc
  • ResyncScrollSizes() : CScribbleView
  • Revalidate() : CNetAddrVerifierDlg
  • ReverseWheelDirection() : CRing , CBasePiece , CWheel
  • RulerToClient() : CRulerBar
  • Run() : CCounterThread , CDisplayThread
  • RunAutomationScript() : CTestContainer98Doc
  • RunMacro() : CScript
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- s -

  • SafeOpen() : CLineFile
  • Save() : CMDITabOptions
  • SaveAllModified() : CRibbonMDIDemoApp , CVisualStudioDemoApp , CMenuSubSetApp
  • SaveAsText() : CServerNode
  • SaveCustomState() : CVisualStudioDemoApp
  • SaveDockState() : CDocOptions
  • SaveModified() : CTestContainer98Doc
  • SaveMyDocument() : CHTMLEdDoc
  • SaveOptions() : CDocOptions , CWordPadApp , CDocOptions , CWordPadApp
  • SavePosition() : CMainFrame
  • SaveRegistrySettings() : CTestContainer98App
  • SaveState() : CWordPadDoc
  • SaveToFile() : CEmbeddedItem
  • SaveToPropertyBag() : CTestContainer98Item
  • SaveToStorage() : CTestContainer98Item
  • SaveToStream() : CTestContainer98Item
  • Scale() : CSpiroRect , CVector
  • Scroll() : CTestContainer98Item
  • ScrollRect() : CTestContainer98Item
  • ScrollToItem() : CServerView
  • Select() : CDrawView
  • SelectAtPoint() : CServerView
  • SelectDocFont() : CServerDoc
  • SelectItemBackColor() : CXlistCtrl
  • SelectItemFont() : CXlistCtrl
  • SelectItemForeColor() : CXlistCtrl
  • SelectPalette() : CMainFrame , CWordPadView
  • SelectWithinRect() : CDrawView
  • SelectWorkspace() : CFolderListBar , CFoldersTree
  • SendToBack() : CTestContainer98Doc
  • Serialize() : CScribbleItem , CVisualStudioDemoDoc , CEmbeddedItem , CFigCommand , CWordPadDoc , CWorkSpaceToolBarDoc , CFigure , CSpiroDoc , CTrackerDoc , CMainDoc , CMfcieDoc , CMyScheduler , CAutoClickDoc , CDrawItem , CDrawDoc , CDrawObj , CDrawRect , CDrawPoly , CDrawOleObj , CServerDoc , CServerNode , CServerItem , CDriverDoc , CMFCBindDoc , CMFCBindCntrItem , CMainDoc , CRectItem , CMyObject , CPadDoc , CEmbeddedItem , CCollectDoc , CAmbientProperty , CTestContainer98Doc , CCubeDoc , CTestContainer98Item , CEmbeddedItem , CTextDoc , CWordPadDoc , CCustomPagesDoc , CThreadDoc , CDrawItem , CDrawDoc , CRecalcDoc , CDrawObj , CDrawRect , CContainerItem , CDrawPoly , CDrawOleObj , CContainerDoc , CDynamicMenuDoc , CExplorerDoc , CPalCtrl , CIEDemoDoc , CLinkButton , CDockDoc , CMDITabsDemoDoc , CMenuSubSetDoc , CDynaMenuDoc , CMSMoneyDemoDoc , CMSOffice2007DemoDoc , CBounceDoc , COutlookDemoDoc , COutlookMultiViewsDoc , CHelloDoc , COwnerDrawMenuDoc , CPaletteDemoDoc , CPadDoc , CRebarTestDoc , CRibbonGadgetsDoc , CNotepadDoc , CRibbonMDIDemoDoc , CRollupPaneDoc , CShapesDoc , CSetPaneSizeDoc , CSliderButton , CShape , CSliderDoc , CStateCollectionDoc , CRowListDoc , CStatusBarDemoDoc , CTabbedViewDoc , CStroke , CTabControlDoc , CTasksPaneDoc , CScribbleDoc , CToolbarDateTimePickerDoc , CTooltipDemoDoc
  • SerializeFontInfo() : CServerDoc
  • Set() : CProperty , CPropertySection , CPropertySet , CFormatTabDlg , CProperty , CPropertySection , CPropertySet , CFormatTabDlg
  • SetAbsPos() : CHTMLEdView
  • SetAccum() : CRemoteCalcDlg , CCalcDlg
  • SetActiveFrame() : COutlookDemoApp
  • SetAddress() : CMainFrame
  • SetAlignment() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • SetAllProps() : CAutoClik , CAutoClickDoc , ACDual::IAClick , ACDual::IDualAClick , CAutoClickDoc , AutoClik::IAClick , CAutoClik
  • SetAngleDelta() : CBasePiece , CWheel , CRing
  • SetAnswerText() : CSpeakNDlg
  • SetAppname() : CSummInfo
  • SetAt() : CVariantMap
  • SetAuthor() : CSummInfo
  • SetBackColor() : CItemData
  • SetBackpointer() : CListOutputFrame
  • SetBallRadius() : CBounceDoc
  • SetBaseSize() : CRectItem
  • SetBasicCommands() : CMainFrame
  • SetBounds() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • SetBufferSize() : CNotifyShowCase
  • SetCancel() : CButtonDialog
  • SetCaptionFont() : CMSMCaptionBar
  • SetCaptionHeight() : CMSMCaptionBar
  • SetCapture() : CTestContainer98Item
  • SetCharFormat() : CFormatBar
  • SetCheck() : CDateTimePage
  • SetCircleOffset() : CCircCtrl
  • SetClassID() : CPropertySet
  • SetClickPoint() : CAutoClickPoint
  • SetColor() : CEditBar
  • SetColumns() : CPaletteBar , CToolsPalette
  • SetComments() : CSummInfo
  • SetContainerSize() : CMainFrame
  • SetContents() : CEnumVariant
  • SetControls() : CTaskDialogTestDlg
  • SetCount() : CVariantMap , CStringCollect
  • SetCurrentCommand() : CMSMLinksBar
  • SetCurrFolder() : CMainFrame
  • SetCustomBallColor() : CBounceDoc
  • SetCustomStrColor() : CHelloDoc
  • SetDefault() : CButtonDialog
  • SetDefaultFont() : CWordPadView
  • SetDefaultProperties() : CSchedulerDlg
  • SetDefaultSettings() : CEntryInfoDlg
  • SetDescription() : CMyToolTipCtrl
  • SetDialog() : CNextWizardDialog , CEndWizardDialog
  • SetDlgBarHeightInPixels() : CMainFrame
  • SetDlgBarSizeInContainer() : CMainFrame
  • SetDlgBarWidthInPixels() : CMainFrame
  • SetDockingBarsIcons() : CMainFrame
  • SetDocType() : CWordPadDoc
  • SetEditFocus() : CFormatTabDlg
  • SetEntry() : CPalCtrl
  • SetFigData() : CBasePiece , CWheel
  • SetFillColor() : CDrawObj
  • SetFilter() : CDBVListSet
  • SetFlatTabs() : COutputBar
  • SetFocus() : CTestContainer98Item
  • SetFont() : CItemData
  • SetForeColor() : CItemData
  • SetFormatID() : CPropertySection
  • SetFormatVersion() : CPropertySet
  • SetFullRowSel() : CListViewEx
  • SetHorizontal() : CEditBar
  • SetHorzPosTwips() : CRulerItem , CComboRulerItem , CRulerItem , CComboRulerItem
  • SetI1() : CVariantMap
  • SetI2() : CVariantMap
  • SetIcon() : CMSMCaptionBar
  • SetID() : CProperty
  • SetImage() : CChildView
  • SetImagePath() : CImageCtrl
  • SetItem() : CStringCollect
  • SetItemBackColor() : CXlistCtrl
  • SetItemFont() : CXlistCtrl
  • SetItemForeColor() : CXlistCtrl
  • SetItemPicture() : CXlistCtrl
  • SetItemTabOrder() : CTestContainer98Doc
  • SetItemText() : CXlistCtrl
  • SetKey() : CVariantAssoc
  • SetKeys() : CMainFrame
  • SetKeywords() : CSummInfo
  • SetLabel() : CUndoBar
  • SetLandscape() : CSpiroApp
  • SetLastAuthor() : CSummInfo
  • SetLength() : CPalCtrl
  • SetLineColor() : CDrawObj
  • SetLineWeight() : CDrawObj
  • SetLoggingOptions() : CTestContainer98Item
  • SetLook() : CAppLookDlg
  • SetMarginBounds() : CRulerBar
  • SetMinSize() : CWordPadResizeBar
  • SetMultiSelect() : CTestContainer98View
  • SetName() : CPropertySection
  • SetNeedlePosition() : CSpindialCtrl
  • SetNewStyle() : CMyTreeCtrl
  • SetNote() : CCircCtrl
  • SetNumChars() : CSummInfo
  • SetNumPages() : CSummInfo
  • SetNumWords() : CSummInfo
  • SetObject() : CMetaFileWnd
  • SetOperand() : CRemoteCalcDlg , CCalcDlg
  • SetOperation() : CCalcDlg , CRemoteCalcDlg
  • SetOSVersion() : CPropertySet
  • SetOwner() : CExampleThread
  • SetPageButtons() : COptionSheet
  • SetPageSize() : CDrawView
  • SetParentActive() : CMSMCaptionBar
  • SetParentMaximize() : CMSMCaptionBar
  • SetPathName() : CMSOffice2007DemoDoc , CWordPadDoc , CTasksPaneDoc
  • SetPenLocation() : CBasePiece , CWheel
  • SetPicture() : CItemData , CPalCtrl
  • SetPosition() : CBasePiece , CWheel , CAutoClik , CAutoClickDoc , CAutoClik , CAutoClickDoc
  • SetPreviewColor() : CDrawDoc
  • SetPrimarySelection() : CTestContainer98Doc
  • SetProgress() : CMainFrame
  • SetProgressPos() : CMainFrame
  • SetPropListFont() : CPropertiesViewBar
  • SetPropState() : CWorkspaceBar
  • SetRange() : CSliderButton
  • SetRect() : CRectItem
  • SetRequestEditResponse() : CMethodInfo
  • SetRibbonContextCategory() : CMainFrame
  • SetRightAlignedText() : CRibbonListButton
  • SetRuler() : CRulerItem , CComboRulerItem
  • SetScrollInfo() : CServerView
  • SetSectionName() : CPropertySection
  • SetSecurity() : CSummInfo
  • SetSelection() : CPadDoc , CContainerView , CServerView , CMainView , CTestContainer98View
  • SetSelectionResponse() : CPropertyEditRequestsPage
  • SetShapePropsFromSheet() : CModelessShapePropSheet , CModalShapePropSheet
  • SetSheetPropsFromShape() : CModalShapePropSheet , CModelessShapePropSheet
  • SetSize() : CRectItem
  • SetSliderPos() : CMainFrame
  • SetSort() : CDBVListSet
  • SetState() : COptionSheet
  • SetStaticPos() : CHTMLEdView
  • SetStr1() : CVariantMap
  • SetStr2() : CVariantMap
  • SetStrColor() : CHelloDoc
  • SetStringValue() : CKey
  • SetSubject() : CSummInfo
  • SetSwarm() : CLeader
  • SetSysCommand() : CMSMCaptionBarButton
  • SetTemplate() : CSummInfo
  • SetText() : CAutoClik , CItemData , CAutoClik
  • SetTextColor() : CWordPadView
  • SetTheText() : CLocalComboBox
  • SetTimeFormat() : CSchedulerDlg
  • SetTitle() : CSummInfo
  • SetTrack() : CRulerItem
  • SetTwipSize() : CSizeComboBox
  • SetType() : CProperty
  • SetTypeInfo() : CTreeItem
  • SetTypeLib() : CTreeItem
  • SetUnits() : CWordPadApp
  • SetUpdateTimer() : CWordPadView
  • SetupMemoryBitmapSize() : CMSMVisualManager , CMainFrame
  • SetupMenus() : CTestWindow
  • SetupOffice2007Button() : CMainFrame
  • SetupSelectionTracker() : CTestContainer98View
  • SetupTracker() : CContainerView , CMainView , CTestContainer98View
  • SetUserMode() : CTestContainer98Doc
  • SetValue() : CAmbientProperty , CSliderButton , CVariantAssoc
  • SetValueLengthAngle() : CVector
  • SetVertical() : CEditBar
  • SetVertPos() : CRulerItem , CComboRulerItem
  • SetViewType() : CRowListView
  • SetVisible() : CCalcDlg , CRemoteCalcDlg
  • SetVSDotNetLook() : CPropertiesViewBar
  • SetWheelMode() : CBasePiece , CWheel
  • SetWordWrap() : CPadView
  • SetWorkSpace() : CMainFrame
  • SetX() : CAutoClickDoc , CClikPoint , CAutoClik , CClikPoint , CAutoClik , CAutoClickDoc
  • SetY() : CAutoClickDoc , CAutoClik , CAutoClickDoc , CClikPoint , CAutoClik , CClikPoint
  • SetZoomFactor() : CServerView
  • ShiftBits() : CSurface
  • ShouldActivateWhenVisible() : CTestContainer98Item
  • ShowContextMenu() : CDHtmlExploreDlg , CMSOffice2007DemoView , CWordPadView
  • ShowNotification() : CNotifyShowCase , CTreeCtrlPage , CNotifyShowCase
  • ShowOptions() : CMainFrame
  • ShowProgress() : CMainFrame
  • ShowPropertyFrame() : CTestContainer98Item
  • ShowSysMenu() : CMSMCaptionBar
  • ShowWindow() : AutoClik::IAClick , CAutoClik , ACDual::IAClick , CAutoClik , CAutoClickDoc , ACDual::IDualAClick , CAutoClickDoc
  • SingleStep() : CLineThread , CRectThread , CBallThread , CGDIThread
  • SizeToContent() : CBigIcon
  • SizeX() : TCPropsLib::ITCExtendedControl
  • SizeY() : TCPropsLib::ITCExtendedControl
  • Skip() : CEnumVariant
  • SortTabs() : CRulerBar
  • SpinNeedlePosition() : CSpindialCtrl
  • SpinPositive() : SpindialLib::_DSpindialEvents
  • StartAnimation() : CMainFrame
  • StartEditTimeCount() : CSummInfo
  • StartThread() : CThreadView
  • StartTimer() : CTimeCtrl
  • StaticEnumProc() : CWordPadApp
  • StatusFace() : CSpeakNDlg
  • STDMETHOD_() : CTestContainer98Item , CExtendedControl , CTestContainer98Item , CExtendedControl , CTCBindHost , CPropertyBag , CTCBindHost , CTestContainer98Item
  • STDMETHODIMP_() : CImpIAdviseSink
  • StopTimer() : CTimeCtrl
  • Store() : CDrawView::XPreviewStateItem , CSSE2Unsigned16Saturated
  • StorePreviewState() : CDrawView
  • StoreU() : CSSE2Unsigned16Saturated
  • StripeBits() : CSurface
  • SubclassEdit() : CParsedEdit
  • SupportsInterface() : CTestContainer98Doc
  • SupportsIPointerInactive() : CTestContainer98Item
  • SupportsService() : CTestContainer98Doc
  • SwapStrings() : CHistoryList
  • SwapView() : CMainFrame
  • SyncFont() : CMSOffice2007DemoView
  • SyncToView() : CFormatBar
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- t -

  • Terminate() : CPadFrame , CPadView , CPageSetupDlg
  • TestError() : CAutoClickDoc , ACDual::IAClick , ACDual::IDualAClick
  • TestErrorHandler() : CAutoClickDoc
  • text() : ACDual::IDualAClick
  • Tick() : CSwarm , CLlama , CLeader , CBrightLeader , CHueLeader
  • TimeFmtEnumProc() : CDateDialog
  • Timer() : TimeLib::_DTimeEvents
  • TimerCallBack() : CSpiroView
  • ToggleMultiSelect() : CTestContainer98View
  • ToggleSelectedItem() : CServerView
  • ToolBarChange() : CStandardBar , CPaletteBar
  • TrackHorzPosTwips() : CTabRulerItem , CRulerItem , CComboRulerItem , CTabRulerItem , CRulerItem
  • TransferCurrentFigure() : CSpiroDoc
  • TransferItem() : CMyTreeCtrl
  • TransformCoords() : CTestContainer98Item
  • TranslateAccelerator() : CTestContainer98Item
  • TwipsToPointString() : CSizeComboBox
  • TYPEDESCtoString() : CTreeItem
  • TypeKindToItemType() : CTreeItem
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- u -

  • UIActivate() : TCPropsLib::ITCExtendedControl
  • UIDeactivate() : TCPropsLib::ITCExtendedControl
  • Unload() : CScript
  • UnlockBuffer() : CPadView
  • UnpackBytes() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • UnpackBytesHi() : CSSE2Unsigned16Saturated , CMMXUnsigned16Saturated
  • UnpackBytesLo() : CMMXUnsigned16Saturated , CSSE2Unsigned16Saturated
  • Update() : CBMTest3Dlg , CRulerBar
  • UpdateActiveItem() : CDrawView , CMainView , CDrawView
  • UpdateAllViews() : CTypeLibWnd
  • UpdateBorder() : CGDIThread
  • UpdateButton() : CFormatTabDlg
  • UpdateButtons() : CRegisterControlsDlg , CFormatTabDlg
  • UpdateContextTab() : CMainFrame
  • UpdateContextTabFromObject() : CMainFrame
  • UpdateCurrentCount() : CDriverView
  • UpdateCurrentVariant() : CDriverView
  • UpdateDefHeight() : CXlistCtrl
  • UpdateDisplay() : CCalcDlg
  • UpdateExtent() : CDrawItem , CRectItem , CDrawItem
  • UpdateFilter() : CEmpView
  • UpdateFontCombos() : CHTMLEdView
  • UpdateFonts() : COutputViewBar
  • UpdateFromServerExtent() : CContainerItem , CTestContainer98Item
  • UpdateIcons() : CTaskPane
  • UpdateInt1AndInt2() : CRecalcDoc
  • UpdateItemName() : CServerNode
  • UpdateItems() : CXlistCtrl
  • UpdateListBox() : CFormatTabDlg
  • UpdateMacroList() : CMacroDlg
  • UpdateMDITabs() : CMDITabsDemoApp , CMainFrame
  • UpdateMRUFilesList() : CMainFrame , CTaskPane
  • UpdateRegistry() : CWordPadApp
  • UpdateServerView() : CServerView
  • UpdateShapePreview() : CModalShapePropSheet
  • UpdateStatusBar() : CTestContainer98Item
  • UpdateStatusBarCountPane() : CMainFrame
  • UpdateTime() : CMainFrame
  • UpdateTitle() : CThreadView
  • UpdateToNothing() : CDriverView
  • UpdateToolbar() : CTaskPane
  • UpdateToolTips() : CRibbonListFontButton , CRibbonListButton
  • UpdateUI() : CMainFrame
  • UpdateView() : CSourceView , CHTMLEdView
  • UpdateViewFromMyObject() : CTypedPtrMapView
  • UpdateViewFromMyStruct() : CMapDWordToMyStructView
  • UseIPointerInactive() : CTestContainer98Doc
  • UseQuickActivation() : CTestContainer98Doc
  • UseSlowDrawing() : CTestContainer98Doc
  • UseTwoPassDrawing() : CTestContainer98Doc
Generated on Sat Nov 23 2024 17:00:51 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- v -

  • Verify() : CNetAddrVerifierDlg
  • VerifyFindString() : CVisualStudioDemoView
  • View() : CInterfaceViewer
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- w -

  • WalkWindowList() : CWndListDlg
  • WindowProc() : CToolBarCtrlPage
  • WinHelp() : CWordPadApp
  • WndProcHook() : CParsedEditExported
  • WrapChanged() : CWordPadView
  • Write() : CPropertyBag , CTrackFile , COEMFile , CTrackFile , COEMFile
  • WriteItem() : CTestContainer98Item
  • WriteLine() : CLineFile
  • WriteNameDictToStream() : CPropertySection
  • WriteToOutput() : CIDataObjectDlg
  • WriteToStorage() : CSummInfo
  • WriteToStream() : CPropertySection , CProperty , CPropertySection , CPropertySet
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- x -

  • x()
: ACDual::IDualAClick
, ACDual::IDualAutoClickPoint
  • XClientToRuler() : CRulerBar
  • XClientToTwips() : CRulerBar
  • XItem() : CRibbonListFontButton::XItem
  • XPreviewStateItem() : CDrawView::XPreviewStateItem
  • XRulerToClient() : CRulerBar
  • XRulerToTwips() : CRulerBar
  • XTwipsToClient() : CRulerBar
  • XTwipsToRuler() : CRulerBar
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- y -

  • y()
: ACDual::IDualAClick
, ACDual::IDualAutoClickPoint
, ACDual::IDualAClick
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • c
  • f
  • i
  • l
  • r

- a -

  • AboutBox : XlistLib::_DXlist
  • Add : inproc::IStringCollect
  • AddPicItem : XlistLib::_DXlist
  • AddTextFontItem : XlistLib::_DXlist
  • AddTextItem : XlistLib::_DXlist

- c -

  • Clear : XlistLib::_DXlist

- f -

  • Find : inproc::IStringCollect

- i -

  • id
: ButtonLib::_DButton
, CircLib::_DCirc
, IMAGELib::_DImage
, TESTHELPLib::_DTesthelp
, inproc::IVariantMap
, TESTHELPLib::_DTesthelp
, inproc::IVariantMap
, TestContainer98::ITestContainer98
, mfccalc::ICalcDlg
, inproc::IStringCollect
, LocalizeLib::_DLocalize
, TESTHELPLib::_DTesthelp
, inproc::IVariantAssoc
, TESTHELPLib::_DTesthelp
, AutoClik::IAutoClickPoint
, AutoClik::IAClick
, ACDual::IAutoClickPoint
, ACDual::IAClick
, XlistLib::_DXlist
, TimeLib::_DTime
, TESTHELPLib::_DTesthelp
, CircLib::_DCirc
, LocalizeLib::_DLocalize
, TESTHELPLib::_DTesthelp
, LocalizeLib::_DLocalize
, CircLib::_DCirc
, SpindialLib::_DSpindial
, PushLib::_DPush
, CircLib::_DCirc
, PalLib::_DPal
, IMAGELib::_DImage
  • IsEmpty : inproc::IVariantMap
  • Item : inproc::IStringCollect , inproc::IVariantMap
  • ItemBackColor : XlistLib::_DXlist
  • ItemForeColor : XlistLib::_DXlist
  • ItemText : XlistLib::_DXlist

- l -

  • Log : TestContainer98::ITestContainer98

- r -

  • Remove : inproc::IStringCollect
  • RemoveAll : inproc::IVariantMap , inproc::IStringCollect
  • RemoveItem : XlistLib::_DXlist
  • RemoveKey : inproc::IVariantMap
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Related Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • c
  • f
  • o

- c -

  • CClassViewBar : CClassViewMenuButton
  • CDrawObjFriend : CDrawView
  • CDrawView::XPreviewStateItem : CDrawObjFriend
  • CEmbeddedItem : CPadDoc
  • CFavoritesManager : CFavorit
  • CImpIAdviseSink : CIDataObjectDlg
  • CMainFrame : CObjTreeView , COle2ViewDoc
  • CModalShapePropSheet : CShapePreviewWnd
  • CMyListCtrl : CPage5
  • CObjTreeView : COle2ViewDoc
  • COle2ViewApp : CMainFrame
  • CParsedEdit : CParsedEditExported
  • CPolyTool : CDrawPoly
  • CProperty : CPropertySet , CPropertySection
  • CPropertySection : CProperty , CPropertySet
  • CPropertySet : CProperty , CPropertySection
  • CRectTool : CDrawRect
  • CRegistryView : COle2ViewDoc
  • CRulerItem : CRulerBar
  • CServerItem : CServerNode
  • CServerNode : CServerItem
  • CServerViewDC : CServerView
  • CTasksPaneView : CTaskPane , CMainFrame
  • CTestContainer98Item : CTestContainer98Doc
  • CTypeLibWnd : CTypeLibListView , CTypeLibTreeView , CTypeLibODLView
  • CUndoBar : CUndoButton

- f -

  • fnIDataObjectDlg : CIDataObjectDlg

- o -

  • operator<< : CMethodInfo
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Typedefs

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • XItems : CRibbonListFontButton
  • XPreviewState : CDrawView
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- a -

  • alc : tagRC
  • alcPriority : tagRC
  • atBegin : tagINTERVAL
  • atEnd : tagINTERVAL
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- l -

  • left : tagRECTL
  • lExInfo : tagPDEVENT
  • lindex : CTestContainer98Item
  • LONG : CImpIAdviseSink
  • lParam : tagANIMATEINFO , tagPDEVENT
  • lPcm : tagRC
  • lpData : tagITEMDATA
  • lPdc : tagPENINFO
  • lpfnSuperEdit : CParsedEditExported
  • lpfnYield : tagRC
  • lpLanguage : tagRC
  • lpnElem : tagIMECOLORS
  • lprc : tagRCRESULT
  • lprgbIme : tagIMECOLORS
  • LPSTGMEDIUM : CImpIAdviseSink
  • lpsyc : tagSYG
  • lpsye : tagSYG
  • lpsyv : tagRCRESULT
  • lpszKey : MSOfficeDemoKey
  • lpUser : tagRC
  • lRcOptions : tagRC
  • lRecogVal : tagSYE , tagSYG
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- m -

  • m_aAvailableCategories : CComponentCategoriesDlg
  • m_abAllowColor : CDynaMenuDoc
  • m_accum : CCalcDlg
  • m_aColorDef : CDynaMenuDoc
  • m_AddrCombo : CGetURL
  • m_advf : CIDataObjectDlg
  • m_aImplementedCategories : CInsertControlDlg
  • m_angleCurrent : CWheel
  • m_angleDelta : CWheel
  • m_anglePen : CWheel
  • m_AnimateCtrl : CAnimateCtrlPage
  • m_animctrlpage : CAllControlsSheet
  • m_apAmbientProperties : CTestContainer98Doc
  • m_apMethodInfo : CInterfaceInfo
  • m_apParamInfo : CMethodInfo
  • m_apParams : CMethodDlg
  • m_AppName : CAboutDlg
  • m_aProperties : CPropertyEditRequestsPage
  • m_arColorThemes : CMainFrame
  • m_aRequiredCategories : CInsertControlDlg
  • m_arFonts : CMainFrame
  • m_arHistory : CIEDemoDoc
  • m_arItems : CRibbonListFontButton
  • m_arLabels : CRibbonListButton
  • m_arrayFontDesc : CLocalComboBox
  • m_arrCommands : CFigure
  • m_arrPFigures : CSpiroDoc
  • m_arStyles : CMainFrame
  • m_arStyleSets : CMainFrame
  • m_arThemes : CMainFrame
  • m_astrEventNames : CEventLoggingPage
  • m_astrFavoriteURLs : CMainFrame
  • m_astrPropertyNames : CPropertyChangesPage
  • m_atLogFlags : CEventLoggingPage , CPropertyChangesPage
  • m_autoClikObject : CAutoDrivDlg
  • m_bActive : CDrawView
  • m_bActiveTabCloseButton : CMDITabOptions , CAppLookDlg
  • m_bAllowInvert : CTrackerDoc
  • m_bAltDrag : CToolBarCtrlPage
  • m_bAnimation : CTasksPaneView
  • m_bAppCanParse : CDateTimePage
  • m_Bar : CUndoListBox
  • m_bArrowkeys : CSpinCtrlPage
  • m_bAutoArrange : CListHdrDlg
  • m_bAutobuddy : CSpinCtrlPage
  • m_bAutoClose : CDesktopAlertDemoDlg
  • m_bAutoDelete : CCalcDlg
  • m_bAutoplay : CAnimateCtrlPage
  • m_bAutoSize : CImagePropPage
  • m_bAutoticks : CSliderCtrlPage
  • m_bBlack : CBounceDoc , CHelloDoc
  • m_bBlue : CBounceDoc , CHelloDoc
  • m_bBoldLabel : CTooltipDemoView
  • m_bBrowse : CToolDlg
  • m_bBrush : CDrawObj , CDrawView::XPreviewStateItem
  • m_bCallCloseDocument : CHTMLEdDoc
  • m_bCallNewDocument : CHTMLEdDoc
  • m_bCanDeactivateInplace : CDrawDoc
  • m_bCaptionIcon : CTasksPaneView
  • m_bCentered : CAnimateCtrlPage
  • m_bCheck : CPage1
  • m_bCheckBox1 : CMainFrame
  • m_bCheckBox2 : CMainFrame
  • m_bCheckBox3 : CMainFrame
  • m_bClientWidthSel : CListViewEx
  • m_bCollapseGroups : CTasksPaneView
  • m_bColor : CEditBar , CMainFrame , CMyListCtrl , CPage5
  • m_bCustom : CBounceDoc , CHelloDoc
  • m_bCustomColors : CTooltipDemoView
  • m_bCustomizeMargins : CTasksPaneView
  • m_bCustomTooltips : CMDITabOptions , CAppLookDlg
  • m_bDayState : CMonthCalPage
  • m_bDebug : CToolDlg
  • m_bDeferInProgress : CRulerBar
  • m_bDefWordWrap : CPadView
  • m_bDefWordWrapOld : CPadView
  • m_bDelayUpdateItems : CWordPadView
  • m_bDescrArea : CPage5
  • m_bDeviceFont : CPage3
  • m_bDialogTop : CMainFrame
  • m_bDisableDragDrop : CTreeCtrlPage
  • m_bDisableMDIChildRedraw : CMDITabOptions
  • m_bDockTabColors : CAppLookDlg
  • m_bDone : CExampleThread
  • m_bDoSaveOnDocCom : CHTMLEdDoc
  • m_bDotNetLook : CPage5
  • m_bDragDataAcceptable : CDrawView
  • m_bDragging : CMyTreeCtrl , CMyListCtrl
  • m_bDragMDITabs : CMDITabOptions
  • m_bDraw3DExt : CRulerBar
  • m_bDrawDescription : CTooltipDemoView
  • m_bDrawIcon : CTooltipDemoView
  • m_bDrawingActive : CSpiroView
  • m_bDrawingDone : CSpiroView
  • m_bDrawSeparator : CTooltipDemoView
  • m_bDrawUsingFont : CPage3
  • m_bDroppingAnchor : CSpiroView
  • m_bDroppingWheel : CSpiroView
  • m_bEdit : CToolDlg
  • m_bEditLabels : CTreeCtrlPage , CListHdrDlg
  • m_bEnablesel : CSliderCtrlPage
  • m_bEventPopups : CCustomFileDialog , CFileDlgWatcherDlg
  • m_bFastSpeed : CBounceWnd , CBounceDoc
  • m_bFirstKillFocus : CRecalcView
  • m_bFixed : CSliderCtrlPage
  • m_bFlatFrame : CMDITabOptions
  • m_bFont : CObjListView
  • m_bForceOEM : CWordPadApp
  • m_bForceReloadBmps : CMSOffice2007DemoView
  • m_bForceTextMode : CWordPadCommandLineInfo , CWordPadApp
  • m_bFormatBar : CDocOptPage
  • m_bFullRowSel : CListViewEx
  • m_bGreen : CBounceDoc , CHelloDoc
  • m_bGrid : CDrawView
  • m_bHasButtons : CTreeCtrlPage
  • m_bHasFocus : CFindComboButton
  • m_bHasLines : CTreeCtrlPage
  • m_bHeader : CPage5 , CPropSheetDemoDlg
  • m_bHiColorIcons : CVisualStudioDemoApp , CWordPadApp
  • m_bHicolorImages : CTasksPaneView
  • m_bHideChildren : CServerNode
  • m_bHideFontProps : CPage5
  • m_bHitPrimary : CComboRulerItem
  • m_bHotCursor : CListHdrDlg
  • m_bHoverSelect : CListHdrDlg
  • m_biggerFont : CSpeakNDlg
  • m_bInAnimation : CStatusBarDemoView
  • m_bInDrag : CMainView
  • m_bInfiniteProgressMode : CMainFrame
  • m_bInitialized : CDriverView
  • m_bInPrint : CWordPadView
  • m_bInProgress : CStatusBarDemoView
  • m_bInsert : CMainFrame
  • m_bIsEndOfPrint : CMSOffice2007DemoView
  • m_bIsFullScreen : CMainFrame
  • m_bIsHighColor : CMainFrame
  • m_bIsRTL : CMSOffice2007DemoApp
  • m_bIsStartup : CConfigDlg
  • m_bIsWheel : CBasePiece
  • m_Bitmap : CBitmapProperty
  • m_bitmap : CBigIcon
  • m_BitmapSize : CBitmapProperty
  • m_bitprop : CImageCtrl
  • m_bLargeIcons : CWordPadApp
  • m_bLinesAtRoot : CTreeCtrlPage
  • m_bMain : CToolDlg
  • m_bMainToolbarMenu : CMainFrame
  • m_bMarkChanged : CPage5
  • m_bMarkSortedColumn : CPage5
  • m_bMatchCase : CFindDlg
  • m_bMaximized : CWordPadApp
  • m_bmBall : CBounceWnd , CBounceDoc
  • m_bMDITabsContextMenu : CMDITabOptions
  • m_bMDITabsDocMenu : CMDITabOptions
  • m_bMDITabsIcons : CMDITabOptions
  • m_bMenuButtons : CTasksPaneView
  • m_bMenuDefaultClick : CPage1
  • m_bMenuStayPressed : CPage1
  • m_bmFontType : CFontComboBox
  • m_bmInfo : CBitmapProperty
  • m_bModifyFont : CMyListCtrl , CPage5
  • m_bMovingPencil : CSpiroView
  • m_bmpCaption : CMainFrame
  • m_bmpIcon1 : CStatusBarDemoView
  • m_bmpIcon2 : CStatusBarDemoView
  • m_bmpImage : CPage3
  • m_bmpStatus : CMainFrame
  • m_bMultiSelect : CMonthCalPage
  • m_bNavToolbar : CTasksPaneView
  • m_bNeedUpdate : CMainDoc
  • m_bNoAnswerCheck : CSpeakNDlg
  • m_bNoColHdr : CListHdrDlg
  • m_bNoFill : CRectDlg
  • m_bNoLabelWrap : CListHdrDlg
  • m_bNoPen : CSpeakNDlg
  • m_bNoSortHdr : CListHdrDlg
  • m_bNothousands : CSpinCtrlPage
  • m_bNothumb : CSliderCtrlPage
  • m_bNoticks : CSliderCtrlPage
  • m_bNotify : CFolderListPopupWnd
  • m_bNotifyFrame : CFolderListBar
  • m_bNoToday : CMonthCalPage
  • m_bNoTodayCircle : CMonthCalPage
  • m_bOnBar : CWordPadView
  • m_bOneNoteTabs : CAppLookDlg
  • m_bOpenFileDialog : CFileDlgWatcherDlg
  • m_bOperandAvail : CCalcDlg
  • m_Border : CPushPropPage
  • m_bOutlookBar2003 : CAppLookDlg , CMainFrame
  • m_bPageBreak : CFormatParaDlg
  • m_bPalette : CToolDlg
  • m_bParentActive : CMSMCaptionBar
  • m_bParentMaximize : CMSMCaptionBar
  • m_bPauseBlit : CChildView
  • m_bPauseBlur : CChildView
  • m_bPauseSwarm : CChildView
  • m_bPen : CDrawObj , CDrawView::XPreviewStateItem
  • m_bPromptForType : CWordPadApp
  • m_bPropListCategorized : CPage5
  • m_bPropListCustomColors : CPage5
  • m_bRaster : CPage3
  • m_brBackground : CPropSliderCtrl
  • m_bRecalcInProgress : CRecalcDoc
  • m_bRecalcNeeded : CRecalcDoc
  • m_bRed : CBounceDoc , CHelloDoc
  • m_bResource : CToolDlg
  • m_brHatch : CMainView
  • m_bRightAlignedText : CRibbonListButton
  • m_bRightArrow : CPage1
  • m_brLinksBarBack : CMSMVisualManager
  • m_brLinksBarButtonHighlighted : CMSMVisualManager
  • m_brMenuBarButtonHighlighted : CMSMVisualManager
  • m_bRoundedCorners : CTooltipDemoView
  • m_bRoundedTabs : CAppLookDlg
  • m_bRulerBar : CDocOptPage
  • m_brush : CBallThread , CRectThread
  • m_bScrollButtons : CTasksPaneView
  • m_bSetbuddyint : CSpinCtrlPage
  • m_bShowAtStartup : CAppLookDlg
  • m_bShowDevTab : CMSOffice2007DemoApp , CDemoOptionsPage
  • m_bShowDragContext : CPage5
  • m_bShowFloaty : CMSOffice2007DemoApp , CDemoOptionsPage
  • m_bShowKeyTips : CMSOffice2007DemoApp , CDemoOptionsPage
  • m_bShowNone : CDateTimePage
  • m_bShowSelAlways : CTreeCtrlPage
  • m_bShowToolTip : CTesthelpCtrl
  • m_bShowToolTipDescr : CMSOffice2007DemoApp
  • m_bShowToolTips : CMSOffice2007DemoApp
  • m_bSingleExpand : CTreeCtrlPage
  • m_bSingleSel : CListHdrDlg
  • m_bSizeChanged : CChildView
  • m_bSizedBefore : CSnapView
  • m_bSmallCaption : CDesktopAlertDemoDlg
  • m_bSmooth : CProgCtrlPage
  • m_bSpaceAbbrev : CUnit
  • m_bStartDrag : CSpiroView
  • m_bStartup : CAppLookDlg , CRibbonGadgetsDoc
  • m_bStateIcons : CRowListView
  • m_bStatusBar : CDocOptPage
  • m_bstrName : CExtendedControl
  • m_bTabIcons : CTabControlView
  • m_bTabsAutoColor : CMDITabOptions
  • m_bTabsOnTop : CMDITabOptions
  • m_bTabsSwap : CTabControlView
  • m_bThickPen : CScribbleDoc , CSpiroDoc
  • m_bTimerPopped : CChildView
  • m_btnCancel : CConfigDlg
  • m_btnCheck : CPage1
  • m_BtnClose : CMSMCaptionBar
  • m_btnDelete : CMyPopupDlg
  • m_btnDoGetData : CIDataObjectDlg
  • m_btnExpandAll : CPage5
  • m_btnFlag : CMyPopupDlg
  • m_btnImageEdit : CPage3
  • m_btnLink : CPage3
  • m_BtnMaximize : CMSMCaptionBar
  • m_btnMenu : CPage1
  • m_BtnMinimize : CMSMCaptionBar
  • m_btnMultiLine : CPage1
  • m_btnOK : CChangeNameDlg , CAddNodeDlg
  • m_btnPin : CFolderListPopupWnd
  • m_btnRadio1 : CPage1
  • m_btnRadio2 : CPage1
  • m_btnRadio3 : CPage1
  • m_btnRadio4 : CPage1
  • m_btnRL : CMSNDlg , CMyPopupDlg
  • m_btnSetupAdvise : CIDataObjectDlg
  • m_btnSlider : CCustomSliderCtrl
  • m_btnViewTypeInfo : CDispatchDlg
  • m_bToolBar : CDocOptPage
  • m_bToolTips : CMainFrame
  • m_bTrack : CRulerItem
  • m_bTransparent : CAnimateCtrlPage
  • m_bTrueType : CPage3
  • m_bTTInPopupMenus : CTooltipDemoApp , CTooltipDemoView
  • m_bUpDown : CDateTimePage
  • m_bUseDispatch : CAutoDrivDlg
  • m_bUseMine : CTesthelpPropPage
  • m_bUseMyHelp : CTesthelpCtrl
  • m_bUserMode : CHTMLEdView
  • m_bUseToolTip : CTesthelpPropPage
  • m_butChooseColor : CAmbientPropertiesDlg
  • m_butChooseFont : CAmbientPropertiesDlg
  • m_butFileNameBrowse : CLoggingDlg
  • m_butIgnoreRequiredCategories : CInsertControlDlg
  • m_butOK : CInsertControlDlg
  • m_butRequiredCategories : CInsertControlDlg
  • m_butReregister : CRegisterControlsDlg
  • m_butRun : CMacroDlg
  • m_butSetValue : CAmbientPropertiesDlg
  • m_Button : CPage1
  • m_buttonClear : CFormatTabDlg
  • m_buttonClearAll : CFormatTabDlg
  • m_buttonNext : CSpeakNDlg
  • m_buttonSet : CFormatTabDlg
  • m_butUnregister : CRegisterControlsDlg
  • m_bVertical : CProgCtrlPage , CEditBar
  • m_bViewDocMap : CMSOffice2007DemoView
  • m_bViewGridLines : CMSOffice2007DemoView
  • m_bViewProps : CMSOffice2007DemoView
  • m_bViewRuler : CMSOffice2007DemoView
  • m_bViewThumb : CMSOffice2007DemoView
  • m_bVistaStyle : CFileDlgWatcherDlg
  • m_bWeekNumbers : CMonthCalPage
  • m_bWheelInside : CRing
  • m_bWhite : CBounceDoc , CHelloDoc
  • m_bWin31 : CWordPadApp
  • m_bWin4 : CWordPadApp
  • m_bWordSel : CUnitsPage , CWordPadApp
  • m_bWorkAreas : CListHdrDlg
  • m_bWrap : CSpinCtrlPage
  • m_bWrapLabels : CTasksPaneView
  • m_bWrapTasks : CTasksPaneView
  • m_bXPButtons : CPage1
  • m_CacheFile : CBitmapProperty
  • m_calc : CDriverDlg
  • m_Cancel : CAboutDlg
  • m_CapData : CMainFrame
  • m_Caption : CButtonPropPage , CPushPropPage , CInsertTableDlg , CRibbonListFontButton::XItem
  • m_caption : CCircPropPage
  • m_CaptionButtonIconst : CMSMVisualManager
  • m_CaptionButtonSize : CMSMVisualManager
  • m_CaptionFont : CMSMCaptionBar
  • m_CaptionHeight : CMSMCaptionBar , CTasksPaneView
  • m_cboxMacroName : CMacroDialogBar
  • m_cboxMethodName : CMethodDlg
  • m_cboxParamType : CMethodDlg
  • m_cboxParamValue : CMethodDlg
  • m_cboxPropName : CAmbientPropertiesDlg
  • m_cboxPropType : CAmbientPropertiesDlg
  • m_cboxPropValue : CAmbientPropertiesDlg
  • m_cbRead : CBitmapProperty
  • m_cchOutput : CIDataObjectDlg
  • m_CellAttribs : CInsertTableDlg
  • m_cfDraw : CDrawView
  • m_cfObjectDescriptor : CDrawView , CMainView
  • m_cfPrivate : CServerDoc , CMainDoc
  • m_checkEnabled : CAmbientPropertiesDlg
  • m_checkShowElev : CCommandLinkCtrlPage
  • m_checkState : CSplitButtonCtrlPage
  • m_chkDump : CIDataObjectDlg
  • m_chkPrimeFirst : CIDataObjectDlg
  • m_chkUpdateDisplay : CIDataObjectDlg
  • m_cIDStatusBar : CModelessMain
  • m_cIDToolBar : CModelessMain
  • m_circleOffset : CCircCtrl , CCircPropPage
  • m_circleShape : CCircCtrl , CCircPropPage
  • m_ClassViewImages : CClassViewBar
  • m_cLinesOutput : CIDataObjectDlg
  • m_clrBack : CPropSliderCtrl
  • m_clrBall : CBounceWnd , CBounceDoc
  • m_clrBkgnd : CListViewEx
  • m_clrCategorieBarButtonBorder : CMSMVisualManager
  • m_clrCategorieBarButtonBorderM : CMSMVisualManager
  • m_clrCategorieBarButtonF : CMSMVisualManager
  • m_clrCategorieBarButtonL : CMSMVisualManager
  • m_clrCategorieBarButtonLine : CMSMVisualManager
  • m_clrCategorieBarButtonTextHighlighted : CMSMVisualManager
  • m_clrCategorieBarButtonTextPressed : CMSMVisualManager
  • m_clrCategorieBarButtonTextRegular : CMSMVisualManager
  • m_clrComboBoxBorder : CMSMVisualManager
  • m_clrComboBoxBtnHighlightedBorder : CMSMVisualManager
  • m_clrComboBoxBtnHighlightedF : CMSMVisualManager
  • m_clrComboBoxBtnHighlightedL : CMSMVisualManager
  • m_clrComboBoxBtnPressedBorder : CMSMVisualManager
  • m_clrComboBoxBtnPressedF : CMSMVisualManager
  • m_clrComboBoxBtnPressedL : CMSMVisualManager
  • m_clrComboBoxBtnRegularBorder : CMSMVisualManager
  • m_clrComboBoxBtnRegularF : CMSMVisualManager
  • m_clrComboBoxBtnRegularL : CMSMVisualManager
  • m_clrLinksBarButtonBorderHighlighted : CMSMVisualManager
  • m_clrMenuBarButtonBorderHighlighted : CMSMVisualManager
  • m_clrMenuBarButtonTextHighlighted : CMSMVisualManager
  • m_clrMenuBarButtonTextPressed : CMSMVisualManager
  • m_clrMenuBarButtonTextRegular : CMSMVisualManager
  • m_clrText : CHelloView , CHelloWnd , CHelloDoc , CListViewEx
  • m_clrTextBk : CListViewEx
  • m_clrToolBarButtonTextHighlighted : CMSMVisualManager
  • m_clrToolBarButtonTextPressed : CMSMVisualManager
  • m_clrToolBarButtonTextRegular : CMSMVisualManager
  • m_clrToolBarSeparatorF : CMSMVisualManager
  • m_clrToolBarSeparatorM : CMSMVisualManager
  • m_clrToolBarSeparatorS : CMSMVisualManager
  • m_clsid : CObjectData , CInsertControlDlg
  • m_CLSID : CRegistryView
  • m_clsidCur : COle2ViewDoc
  • m_cmdbtn : CCommandLinkCtrlPage
  • m_co : CBasePiece , CFigCommand
  • m_coCurrentPen : CSpiroView
  • m_Color : CPage2
  • m_color : CLlama
  • m_colorData : CMainDoc
  • m_ColorGroupText : CTasksPaneView
  • m_ColorGroupTextHot : CTasksPaneView
  • m_colorMenu : CTestWindow
  • m_colorPage : CModalShapePropSheet , CModelessShapePropSheet
  • m_ColorPicker : CPage2
  • m_colors : CCustListDlg
  • m_ColorTable : CHueLeader
  • m_ColorTaskText : CTasksPaneView
  • m_ColorTaskTextHot : CTasksPaneView
  • m_comboBox : CStyleBar , CFormatTabDlg
  • m_comboColor : CPagerCtrlPage
  • m_comboFontName : CFormatBar
  • m_comboFontSize : CFormatBar
  • m_commandLinkpage : CAllControlsSheet
  • m_cOnDataChanges : CIDataObjectDlg
  • m_controltype : CDialogItem
  • m_coPattern : CWheel
  • m_Copyright : CAboutDlg
  • m_cPalette : CCubeView
  • m_cRef : CImpIAdviseSink
  • m_crf : DynaMenuDef
  • m_crText : CServerDoc
  • m_csGDILock : CGDIThread
  • m_cstrFileName : CAnimateCtrlPage
  • m_cstrStatus : CTreeCtrlPage
  • m_ctlList : CDWordArrayView , CIntListView , CMapDWordToMyStructView , CMapStringToStringView , CPointArrayView , CStringListView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView
  • m_ctlSum : CRecalcView
  • m_CtrlTipCaption : CTesthelpPropPage
  • m_ctrlType : CDriverView
  • m_ctrlValue : CDriverView
  • m_currDay : CSchedulerDlg
  • m_CurrentCommand : CMSMLinksBar
  • m_currMonth : CSchedulerDlg
  • m_currYear : CSchedulerDlg
  • m_cursorRing : CSpiroApp
  • m_cursorWheel : CSpiroApp
  • m_cxClient : CListViewEx
  • m_cxStateImageOffset : CListViewEx
  • m_cyFont : COle2ViewApp
  • m_dAnchorData : CFigCommand
  • m_dAngleCorrection : CWheel
  • m_date : CAmbientPropertiesDlg , CMethodDlg
  • m_DateTime : CDateTimePage
  • m_datetimepage : CAllControlsSheet
  • m_day : CSchedulerDlg
  • m_dBVListSet : CDBVListDoc
  • m_dc : CGDIThread
  • m_dcPrinter : CFormatBar
  • m_dcScreen : CWordPadApp
  • m_dDataAnchorFirst : CSpiroView
  • m_dDataWheelFirst : CSpiroView
  • m_defCharFormat : CWordPadView
  • m_defParaFormat : CWordPadView
  • m_defTextCharFormat : CWordPadView
  • m_delta : CMMXSurface24Intrinsic , CSSE2Surface24Intrinsic
  • m_Department : CDBVListSet
  • m_descFont : CTestContainer98Doc
  • m_dispid : CMethodInfo , CNewAmbientPropertyDlg , CAmbientProperty
  • m_dispidChanged : CAmbientPropertiesDlg
  • m_dispidEvent : CTestContainer98Item
  • m_Division : CDBVListSet
  • m_dlgBar : CListOutputFrame
  • m_dlgItemTemplate : CDialogItem
  • m_dlgTempl : CMyDialogTemplate
  • m_dlgTemplate : CDlgtempDlg
  • m_dlState : CBitmapProperty
  • m_dpLastParams : CTestContainer98Item
  • m_dragOffset : CDrawView , CMainView
  • m_dragPoint : CDrawView , CMainView
  • m_dragSize : CDrawView , CMainView
  • m_drawShape : CDrawTool
  • m_dropTarget : CInPlaceFrame , CDrawView , CServerView , CMainView , CTestContainer98View
  • m_ds1 : CDocOptions
  • m_ds2 : CDocOptions
  • m_dw : CDWordArrayView
  • m_dwArray : CCollectDoc
  • m_dwAspectPass2 : CTestContainer98Item
  • m_dwClsCtx : COle2ViewDoc
  • m_dwConn : CIDataObjectDlg
  • m_dwCurrentView : CMainFrame
  • m_dwEventCookie : CTestContainer98Item
  • m_dwFileAttributes : CPropertiesDlg
  • m_dwFlags : CFontDesc
  • m_dWheelData : CFigCommand
  • m_dwKey : CMapDWordToMyStructView
  • m_dwLastDropKeyState : CTestContainer98View
  • m_dwLength : CTrackFile
  • m_dwMiscStatus : CTestContainer98Item
  • m_dwpl : CMMXSurface32Intrinsic , CMMXSurface24Intrinsic
  • m_dwPropertyCookie : CTestContainer98Item
  • m_dwPropID : CProperty
  • m_dwRegister : CCalcDlg
  • m_dwSplashTime : CTheApp
  • m_dwStyle : CAnimateCtrlPage , CSliderButton
  • m_dwTickStart : CChildView
  • m_dwTime : CIDataObjectDlg
  • m_dwType : CProperty
  • m_dwViewStatus : CTestContainer98Item
  • m_dX : CVector
  • m_dY : CVector
  • m_DynamicHelpImages : CDynamicHelpViewBar
  • m_eboxFileName : CLoggingDlg
  • m_edit1 : CDerEditDlg
  • m_edit2 : CDerEditDlg
  • m_edit3 : CDerEditDlg
  • m_edit4 : CDerEditDlg
  • m_editDescription : CChangeNameDlg , CAddNodeDlg
  • m_editDISPID : CAmbientPropertiesDlg
  • m_editExceptionDesc : CMethodDlg
  • m_editExceptionSource : CMethodDlg
  • m_editExpression : CDriverDlg
  • m_editName : CNewAmbientPropertyDlg
  • m_editNote : CCommandLinkCtrlPage
  • m_editParamValue : CMethodDlg
  • m_editPropValue : CAmbientPropertiesDlg
  • m_EditRect : CSpinCtrlPage
  • m_editReturnValue : CMethodDlg
  • m_edMaxSel : CMonthCalPage
  • m_edtAdvise : CIDataObjectDlg
  • m_Email : CDBVListSet
  • m_Enabled : CPushPropPage , CTimePropPage
  • m_endWizardDialog : CWizardDialog
  • m_eRequestEditResponse : CMethodInfo
  • m_errorState : CCalcDlg
  • m_eSurf : CChildView
  • m_excepInfo : CMethodDlg
  • m_extent : CDrawOleObj
  • m_Favorites : CIEDemoApp
  • m_fCancelSchedule : CEntryInfoDlg
  • m_fClearSchedule : CEntryInfoDlg
  • m_fDeleteSchedule : CEntryInfoDlg
  • m_fDoOnGetDataPosted : CIDataObjectDlg
  • m_fetc : CIDataObjectDlg
  • m_fGroupByKind : CTypeLibWnd
  • m_file : CFileLog
  • m_FileViewImages : CFileViewBar
  • m_fInterface : COle2ViewDoc
  • m_flashColor : CCircCtrl
  • m_float : CMyStruct , CMyObject , CMapDWordToMyStructView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView
  • m_fModifySchedule : CEntryInfoDlg
  • m_fntPropList : CPropertiesViewBar
  • m_Font : CTypeLibODLView , CRibbonListFontButton::XItem , COutputBar , CTaskPane , CWatchBar
  • m_font : CStyleBar , CTBComboBox , CAddressCombo , CEditToolbar , CSourceView , CSplashWnd , CPadView , COutputWindowView , CButtonDialog
  • m_fontBold : CMyPopupDlg
  • m_fontNameCombo : CEditToolbar
  • m_fontPrint : CPadView
  • m_fontSizeCombo : CEditToolbar
  • m_FormatID : CPropertySection
  • m_fRadius : CCubeView
  • m_fTypeLib : COle2ViewDoc
  • m_fUpdateDisplay : CIDataObjectDlg
  • m_fUpdateScheduleDisplay : CEntryInfoDlg
  • m_fVisibleButtons : CEntryInfoDlg
  • m_fVisibleDefaultButtons : CEntryInfoDlg
  • m_fVista : CNetAddrVerifierDlg
  • m_gridColor : CDrawView
  • m_Group : CAboutDlg
  • m_GroupSpacing : CTasksPaneView
  • m_guid : CGuidGenDlg
  • m_hAccel : CSchedulerDlg , CCalcDlg
  • m_hAnotherDead : CGDIThread
  • m_hbm : CRulerItem
  • m_hbmMask : CRulerItem
  • m_hBrush : CBallThread , CRectThread
  • m_hControls : CObjTreeView
  • m_hDC : CGDIThread
  • m_hDestDC : CSurface
  • m_hDIB : CDibDoc
  • m_hDlg : CIDataObjectDlg
  • m_hDlgTmp : CButtonDialog
  • m_Height : CRibbonListFontButton::XItem
  • m_hEventBounceThreadKilled : CBounceThread
  • m_hEventDead : CGDIThread
  • m_hEventKill : CGDIThread
  • m_hEventKillRecalcThread : CRecalcThreadInfo , CRecalcDoc
  • m_hEventRecalcDone : CRecalcThreadInfo , CRecalcDoc
  • m_hEventRecalcThreadKilled : CRecalcThreadInfo , CRecalcDoc
  • m_hEventStartRecalc : CRecalcThreadInfo , CRecalcDoc
  • m_hIcon : CMutexesDlg , CAllControlsSheet , CCmnCtrl3Dlg , CNetAddrVerifierDlg , CTaskDialogTestDlg , CModelessMain , CDlgtempDlg , CFileDlgWatcherDlg , CListHdrDlg , CMainDlg , CMainFrame , CVarUseDlg , CDHtmlExploreDlg , CSchedulerDlg , CAutoDrivDlg , CItemIcons , CCalcDlg , CGuidGenDlg , CDesktopAlertDemoDlg , CDlgToolTipsDlg , CMSMCaptionBar , NewControlsPropSheet , CPropSheetDemoDlg , CMyToolTipCtrl , CTrayMenuDlg
  • m_hIconDoc : CMainFrame
  • m_hIconText : CMainFrame
  • m_hIconWrite : CMainFrame
  • m_himSystem : CFavoritesManager
  • m_hInsertable : CObjTreeView
  • m_hInterfaces : CObjTreeView
  • m_hInternal : CObjTreeView
  • m_hitemDrag : CMyTreeCtrl , CTreeCtrlPage
  • m_hitemDrop : CMyTreeCtrl , CTreeCtrlPage
  • m_hKey : CKey
  • m_hLargeIcon : CRowListView
  • m_HMargin : CTasksPaneView
  • m_hMetaFile : CMetaFileWnd
  • m_hMyHotCursor : CListHdrDlg
  • m_hObjects : CObjTreeView
  • m_hOLE1 : CObjTreeView
  • m_hPen : CLineThread
  • m_hSmallIcon : CRowListView
  • m_hStdHotCursor : CListHdrDlg
  • m_hTypeInfos : CTypeLibTreeView
  • m_hTypeLibs : CObjTreeView
  • m_hUnclassified : CObjTreeView
  • m_hwndNotifyProgress : CRecalcThreadInfo
  • m_hwndNotifyRecalcDone : CRecalcThreadInfo
  • m_hWndParent : CIDataObjectDlg
  • m_hwndParent : CBounceThread
  • m_i1 : CVariantMap
  • m_i2 : CVariantMap
  • m_iAlignment : CSpinCtrlPage
  • m_iAllowEdit : CPropertyEditRequestsPage
  • m_iBorderStyle : CPage1
  • m_icoCurrent : CBasePiece
  • m_iColor : CDynaMenuDoc , CInputView
  • m_icon : CRegistryView , CAboutBox , CSplashWnd
  • m_IconFont : CObjListView
  • m_IconOffset : CTasksPaneView
  • m_Icons : CDesktopAlertDemoDlg , CIconComboBox , CDemoOptionsPropSheet
  • m_IconsSmall : CDesktopAlertDemoDlg
  • m_iCurrentParam : CMethodDlg
  • m_iCursor : CPage1
  • m_id : CDateDialog
  • m_iDay : CMyScheduler
  • m_idCaption : CComponentCategoriesDlg
  • m_iDelta : CProgCtrlPage
  • m_IDIcons : CFavorit
  • m_IDTimer : CSpiroView
  • m_idxLeader : CLlama
  • m_iEndHour : CEntryInfoDlg , CMyScheduler
  • m_iEndMinutes : CMyScheduler
  • m_iFolderIcon : CFavorit
  • m_iFooterTime : CPageSetupDlg
  • m_iFooterTimeOld : CPageSetupDlg
  • m_iFrameRate : CPage1
  • m_iHeaderTime : CPageSetupDlg
  • m_iHeaderTimeOld : CPageSetupDlg
  • m_iHistoryOffset : CIEDemoDoc
  • m_iIcon : CFavorit
  • m_iIconIndex : CWorkspaceObj
  • m_iid : CInterfaceInfo
  • m_iId : CMyScheduler
  • m_iImage : CPage1
  • m_iInternetShortcutIcon : CFavorit
  • m_iItemDrag : CMyListCtrl
  • m_iItemDrop : CMyListCtrl
  • m_iLastDivID : CSchedulerDlg
  • m_iLogType : CLoggingDlg , CTCOptions
  • m_image : CChildView , CSplitButtonCtrlPage , CSurface
  • m_Image : CMSMoneyDemoView , CStartView
  • m_imageList : CSpiroApp , CPage5
  • m_imageListIcons : CIconListProp , CIconCombo
  • m_Images : CCalendarBar
  • m_images : CTypeLibTreeView , COle2ViewApp , CTwoButtonsProp , CFoldersTree
  • m_ImagesHeader : COutlookDemoView
  • m_ImagesList : COutlookDemoView
  • m_ImagesSmall : CMainFrame
  • m_imgLogo : CMSNDlg
  • m_imlStatusAnimation : CMainFrame , CStatusBarDemoView
  • m_iMonth : CMyScheduler
  • m_indent : CRulerBar
  • m_infoControl : CTestContainer98Item
  • m_infoEvents : CTestContainer98Item
  • m_infoMethods : CTestContainer98Item
  • m_int : CMyStruct , CMyObject , CIntListView , CMapDWordToMyStructView , CTypedPtrArrayView , CTypedPtrListView , CTypedPtrMapView
  • m_interval : CTimeCtrl
  • m_Interval : CTimePropPage
  • m_intList : CCollectDoc
  • m_invert : CLocalizeCtrl
  • m_Invert : CLocalizePropPage
  • m_inverted : CLocalizeCtrl
  • m_invertFlag : CXlistCtrl
  • m_InvertFlag : CXlistPropPage
  • m_invkind : CMethodInfo
  • m_iOrientation : CSliderCtrlPage , CSpinCtrlPage
  • m_iPalette : CPalCtrl
  • m_iPieceDropped : CSpiroView
  • m_iRate : CRateDlg , CWndListDlg
  • m_iResponse : CPropertyEditRequestsPage::CPropertyInfo
  • m_iStartHour : CEntryInfoDlg , CMyScheduler
  • m_iStartMinutes : CMyScheduler
  • m_itemData : CXlistCtrl
  • m_itemDefHeight : CXlistCtrl
  • m_Items : CFoldersTree
  • m_iTickpos : CSliderCtrlPage
  • m_iTicks : CWndListDlg
  • m_iWidth : CSliderButton
  • m_iYear : CMyScheduler
  • m_kDeltaX : CSurface
  • m_kDeltaY : CSurface
  • m_kTimerDelay : CChildView
  • m_kTimerID : CChildView
  • m_LargeImageList : CRowListView
  • m_lb : CDropTargetView
  • m_lbCategories : CComponentCategoriesDlg
  • m_lbControls : CInsertControlDlg
  • m_lbEvents : CEventLoggingPage
  • m_lbFmtEtc : CIDataObjectDlg
  • m_lbGetData : CIDataObjectDlg
  • m_lbMacros : CMacroDlg
  • m_lbNotifyList : CDateTimePage
  • m_lboxTabOrder : CTabOrderDlg
  • m_lbProperties : CPropertyChangesPage , CPropertyEditRequestsPage
  • m_lbWindows : CWndListDlg
  • m_lControls : CInsertControlDlg
  • m_LeaderArr : CSwarm
  • m_leftmargin : CRulerBar
  • m_Length : CPalPropPage
  • m_lf : CWordPadApp
  • m_lfDefFont : CPadView
  • m_lfDefFontOld : CPadView
  • m_lfDefPrintFont : CPadView
  • m_lfDefPrintFontOld : CPadView
  • m_link : CComboRulerItem
  • m_list : CTypeLibListView
  • m_listbox : CNetAddressCtrlPage , CObjListView , CFileNewDialog
  • m_listBox : CListOutputFrame , CDateDialog
  • m_listChild : CServerNode
  • m_listctrl : CListHdrDlg
  • m_listCtrl : CNetAddrVerifierDlg
  • m_listImages : CRibbonListButton , CRibbonListFontButton
  • m_listItems : CListDlg
  • m_listObjects : CContainerInfoDlg
  • m_listParams : CMethodDlg
  • m_listPrinterNotify : CWordPadApp
  • m_listSplitStyle : CSplitButtonCtrlPage
  • m_LlamaArr : CSwarm
  • m_Location : CDBVListSet
  • m_logbrush : CDrawObj , CDrawView::XPreviewStateItem
  • m_logfont : CServerDoc
  • m_logpen : CDrawObj , CDrawView::XPreviewStateItem
  • m_logx : CRulerBar
  • m_lpaIDStatusBar : CModelessMain
  • m_lpaIDToolBar : CModelessMain
  • m_lpDO : CIDataObjectDlg
  • m_lpItems : CPropertyBag
  • m_lpRichDataObj : CEmbeddedItem
  • m_lpScripts : CScriptManager
  • m_lpSelectedItems : CTestContainer98View
  • m_lpszName : CIDataObjectDlg
  • m_lpszNextQuestion : CSpeakNDlg
  • m_lpTabOrder : CTabOrderDlg , CTestContainer98Doc
  • m_lSelectedCategories : CComponentCategoriesDlg
  • m_lstActions : CUndoButton
  • m_lstAdditionalColors : CMainFrame
  • m_lstIconNames : CIconListProp , CIconCombo
  • m_lstIcons : CComboBoxExProp
  • m_lstIndents : CComboBoxExProp
  • m_lstMailFrames : CMailFrame
  • m_lstMainColors : CMainFrame
  • m_lstStandardColors : CMainFrame
  • m_lstSubItems : CFavorit
  • m_lstWorkspaces : CFoldersTree , CMainFrame
  • m_lvProperties : CPropertyBagDlg
  • m_lvRegisteredControls : CRegisterControlsDlg
  • m_m128i : CSSE2Unsigned16Saturated
  • m_m64 : CMMXUnsigned16Saturated
  • m_MainButton : CMainFrame
  • m_map : CVariantMap , CDriverDoc
  • m_mapDWordToMyStruct : CCollectDoc
  • m_mapMacros : CScript
  • m_mapNamedItems : CScriptManager
  • m_mapStringToMyObject : CCollectDoc
  • m_mapStringToString : CCollectDoc
  • m_MemBitmap : CMainFrame
  • m_MemoryBitmap : CMSMVisualManager
  • m_MemoryDC : CMSMVisualManager
  • m_MemoryFilled : CMSMVisualManager
  • m_MemorySize : CMSMVisualManager
  • m_menu : CListOutputFrame , CPage1
  • m_menuFavotites : CMainFrame
  • m_menuInPlace : CButtonCtrl
  • m_menuPopup : CDesktopAlertDemoDlg
  • m_MetaFile : CIDataObjectDlg
  • m_month : CSchedulerDlg
  • m_MonthCal : CMonthCalPage
  • m_monthcalpage : CAllControlsSheet
  • m_MSMFrameBitmap : CMSMVisualManager
  • m_MSMViewBitmap : CMSMVisualManager
  • m_mutex : CMutexesDlg
  • m_myobArray : CCollectDoc
  • m_mystructList : CCollectDoc
  • m_mytreectrl : CTreeCtrlPage
  • m_nAbbrevID : CUnit
  • m_nActiveItem : CDlgtempDlg
  • m_nAfter : CFormatParaDlg
  • m_nAge : CSwarm
  • m_nAlignment : CFormatParaDlg , CRulerItem
  • m_nAllocPoints : CDrawPoly
  • m_Name : CDBVListSet , CItemIcons , CRegistryView
  • m_NameDict : CPropertySection
  • m_nAnimation : CDesktopAlertDemoDlg
  • m_nAnimationSpeed : CDesktopAlertDemoDlg
  • m_nAppLook : CMainFrame , CMSOffice2007DemoApp , CAppLookDlg
  • m_nArchive : CPropertiesDlg
  • m_nAutoCloseTime : CDesktopAlertDemoDlg
  • m_nBaseID : CButtonDialog
  • m_nBefore : CFormatParaDlg
  • m_nBeg : CEmbeddedItem
  • m_nBitDepth : CSurface
  • m_nBorder : CSwarm
  • m_nBorderType : CWordPadView
  • m_nBottomMargin : CPageSetupDlg
  • m_nButtonCount : CStandardBar , CPaletteBar
  • m_nByteDepth : CSurface
  • m_nCancel : CButtonDialog
  • m_nCaptionHeight : CTasksPaneView
  • m_nCategorie : CMainFrame
  • m_nCharSet : CFontDesc
  • m_nCheckedItem : CRowListView
  • m_nCode : COnCmdMsg
  • m_nColor : CToolDlg , CColorPage , CTabControlView
  • m_nColorCount : CBasePiece
  • m_nColorCounter : CBrightLeader , CHueLeader
  • m_nColorScheme : CDemoOptionsPage
  • m_nColumns : CPaletteBar , CToolDlg , CRibbonTableButton , CToolsPalette
  • m_nConfig : CConfigDlg
  • m_nContainerSize : CSetPaneSizeView
  • m_nCount : CEnumVariant , CFormatTabDlg
  • m_nCurFontCharSet : CPage3
  • m_nCurrConfig : CMenuSubSetApp
  • m_nCurrentDemoCommand : CRecalcDoc
  • m_nCurrentExample : CMainFrame
  • m_nCurrentPenWidth : CSpiroView
  • m_nCurrID : CCustomToolTipCtrl
  • m_nCurrSort : CClassViewBar
  • m_nCurView : CMainFrame
  • m_nDefButton : CButtonDialog
  • m_nDefCmdShow : CPadFrame
  • m_nDefCmdShowOld : CPadFrame
  • m_nDefFont : CWordPadApp
  • m_nDefTabStops : CPadView
  • m_nDefTabStopsOld : CPadView
  • m_nDefWrap : CDocOptions
  • m_nDirection : CFindDlg
  • m_nDocID : CMFCBindCntrItem
  • m_nDocType : CWordPadDoc
  • m_nDocumentsGroup : CTaskPane
  • m_needlePosition : CSpindialCtrl
  • m_NeedlePosition : CSpindialPropPage
  • m_nEnd : CEmbeddedItem
  • m_netaddrctrl : CNetAddressCtrlPage
  • m_netaddressctrlpage : CAllControlsSheet
  • m_next : CNextWizardDialog
  • m_nextWizardDialog : CWizardDialog
  • m_nFilterIndex : CWordPadApp
  • m_nFilterLoad : CChildView
  • m_nFilterSave : CChildView
  • m_nFirst : CFormatParaDlg
  • m_nFontHeight : CLocalComboBox
  • m_nFrameCounter : CChildView
  • m_nFullScreen : CConfigDlg
  • m_nGroupSpacing : CTasksPaneView
  • m_nGuidType : CGuidGenDlg
  • m_nHandleSize : CHandleSize
  • m_nHeight : CDlgtempDlg , CSwarm
  • m_nHeightInPixels : CSetPaneSizeView
  • m_nHelpIDs : CDateDialog , CDocOptPage , CFileNewDialog , CFormatParaDlg , CFormatTabDlg , CPageSetupDlg , CUnitsPage
  • m_nHidden : CPropertiesDlg
  • m_nHMargin : CTasksPaneView
  • m_nIcon : CDesktopAlertDemoDlg , CStatusBarDemoView
  • m_nIconOffset : CTasksPaneView
  • m_nid : CTrayMenuDlg
  • m_nID : COnCmdMsg , DynaMenuDef , CAdderDialog , CRibbonTooltipCtrl
  • m_nIDBitmap : CModelessMain
  • m_nIDColor : CHelloView , CBounceWnd , CHelloWnd
  • m_nIDLastMessage : CModelessMain
  • m_nIDTimer : CWndListDlg
  • m_nIDTracking : CModelessMain
  • m_nImageLocation : CPage1
  • m_nImageSize : CChildView
  • m_nIndex : CEnumVariant
  • m_nInt1 : CRecalcThreadInfo , CRecalcView , CRecalcDoc
  • m_nInt2 : CRecalcThreadInfo , CRecalcView , CRecalcDoc
  • m_nItem : CDlgtempDlg
  • m_nLabelHeight : CUndoBar
  • m_nLargeDiv : CUnit
  • m_nLastPercent : CTrackFile
  • m_nLeft : CFormatParaDlg
  • m_nLeftMargin : CPageSetupDlg
  • m_nLimitText : CLocalComboBox
  • m_nLineNum : CGotoDlg
  • m_nLinePos : CRulerBar
  • m_nLlamaAcc : CLeader
  • m_nLlamaVel : CLeader
  • m_nLogVert : CSizeComboBox
  • m_nMapMode : CDrawDoc
  • m_nMax : CSliderButton , CRulerItem
  • m_nMaxSelCount : CMonthCalPage
  • m_nMaxValue : CBoundedNumberSubProp
  • m_nMaxValue1 : CBoundedNumberPairProp
  • m_nMaxValue2 : CBoundedNumberPairProp
  • m_nMDITabsBorderSize : CMDITabOptions
  • m_nMDITabsType : CMDITabOptions
  • m_nMediumDiv : CUnit
  • m_nMin : CRulerItem , CSliderButton
  • m_nMinMove : CUnit
  • m_nMinValue : CBoundedNumberSubProp
  • m_nMinValue1 : CBoundedNumberPairProp
  • m_nMinValue2 : CBoundedNumberPairProp
  • m_nMinX : CMinSize
  • m_nMinY : CMinSize
  • m_nMyAcc : CLeader
  • m_nMyCalendarsY : CCalendarBar
  • m_nMyVel : CLeader
  • m_nNewDocType : CWordPadApp , CWordPadDoc
  • m_nNumber : CBMTest3Dlg
  • m_nNumColours : CFormatBar
  • m_nNumUnits : CWordPadApp
  • m_nOpenMsg : CWordPadApp
  • m_note : CCircCtrl , CCircPropPage
  • m_Notifications : CSliderCtrlPage
  • m_notifshowcase : CTreeCtrlPage
  • m_NotifyList : CMonthCalPage
  • m_nPaletteCol : CMainFrame
  • m_nPenRadius : CWheel
  • m_nPenWidth : CScribbleDoc , CFigCommand , CStroke
  • m_nPercentDone : CMainFrame
  • m_nPitchAndFamily : CFontDesc
  • m_nPoints : CDrawPoly
  • m_nPopupSource : CDesktopAlertDemoDlg
  • m_nPreviewPage : CPadView
  • m_nPrevStyle : CDateTimePage
  • m_nPrimaryNumUnits : CWordPadApp
  • m_nPrinterChangedMsg : CWordPadApp
  • m_nPriority : CMailView
  • m_nProgressCurr : CStatusBarDemoView
  • m_nProgressValue : CMainFrame
  • m_nProgressValue1 : CMainFrame
  • m_nProgressValue2 : CMainFrame
  • m_nRadius : CWheel
  • m_nRadiusInt : CRing
  • m_nReadOnly : CPropertiesDlg
  • m_nRecalcSpeedSeconds : CRecalcThreadInfo , CRecalcDoc , CSpeedDlg
  • m_nRefCount : CTCBindHost , CExtendedControl , CPropertyBag
  • m_nRight : CFormatParaDlg
  • m_nRightMargin : CPageSetupDlg
  • m_nRows : CRibbonTableButton
  • m_nScanLine : CBitmapProperty
  • m_nScroll : CRulerBar
  • m_nSel : CFileNewDialog
  • m_nSelection : CListDlg
  • m_nSelNum : CUndoButton
  • m_nShape : CDrawRect
  • m_nShapeStyle : CStylePage
  • m_nSize : CPagerCtrlPage
  • m_nSizePercent : CSetPaneSizeView
  • m_nSmallDiv : CUnit
  • m_nString : DynaMenuDef
  • m_nStyle : CAppLookDlg
  • m_nStyle2007 : CAppLookDlg
  • m_nSum : CRecalcThreadInfo , CRecalcDoc
  • m_nSystem : CPropertiesDlg
  • m_nTabLocation : CTabControlView
  • m_nTabs : CRulerBar
  • m_nTabsStyle : CMDITabOptions
  • m_nTabStops : CSetTabStops
  • m_nTabStyle : CTabControlView
  • m_nTaskOffset : CTasksPaneView
  • m_nTaskSpacing : CTasksPaneView
  • m_nThickWidth : CPenWidthsDlg , CScribbleDoc
  • m_nThinWidth : CPenWidthsDlg , CScribbleDoc
  • m_nToolTips : CToolDlg
  • m_nTooltipStyle : CDemoOptionsPage
  • m_nTopMargin : CPageSetupDlg
  • m_nTotalDrawn : CFigure
  • m_nTotalTraces : CFigure
  • m_nTPU : CUnit
  • m_nTracesPerColor : CFigure
  • m_nTracesPerTick : CSpiroView
  • m_nTracesThisColor : CFigure
  • m_nTransparency : CDesktopAlertDemoDlg
  • m_nTTType : CTooltipDemoView
  • m_nTwipsLast : CSizeComboBox
  • m_nType : CObjectData
  • m_NumCols : CInsertTableDlg
  • m_NumRows : CInsertTableDlg
  • m_nUnits : CUnitsPage , CWordPadApp
  • m_nUsePopupHelp : CTesthelpPropPage , CTesthelpCtrl
  • m_nUserColorGroup : CTaskPane
  • m_nUserColorTask : CTaskPane
  • m_nValidNum : CMFCRibbonNumEditCtrl
  • m_nValue : CSliderButton
  • m_nVisualManager : CTasksPaneView
  • m_nVisualMngr : CDesktopAlertDemoDlg
  • m_nVMargin : CTasksPaneView
  • m_nWidth : CDlgtempDlg , CSwarm , CLineStyleMenuItem
  • m_nWidthInPixels : CSetPaneSizeView
  • m_nWordWrap : CDocOptPage , CFormatParaDlg , CDocOptions
  • m_nXPosTwips : CRulerItem
  • m_nYPosPix : CRulerItem
  • m_nZoomDenom : CSpiroView
  • m_nZoomNumer : CSpiroView
  • m_objects : CDrawDoc
  • m_oldDNDStyle : CMyListCtrl
  • m_oldRect : CCubeView
  • m_operand : CCalcDlg
  • m_operator : CCalcDlg
  • m_options : CTestContainer98App
  • m_Options : CMSNDlg , CMDITabsDemoApp
  • m_optionsIP : CWordPadApp
  • m_optionsNull : CWordPadApp
  • m_optionsRTF : CWordPadApp
  • m_optionsText : CWordPadApp
  • m_optionsWord : CWordPadApp
  • m_optionsWrite : CWordPadApp
  • m_pActiveScript : CScript , CTestContainer98Doc
  • m_pActiveScriptParse : CTestContainer98Doc , CScript
  • m_Page1 : NewControlsPropSheet , CMyPropertySheet
  • m_Page11 : COptionsDlg
  • m_Page12 : COptionsDlg
  • m_Page2 : NewControlsPropSheet , CMyPropertySheet
  • m_Page21 : COptionsDlg
  • m_Page22 : COptionsDlg
  • m_Page3 : NewControlsPropSheet , CMyPropertySheet
  • m_Page31 : COptionsDlg
  • m_Page32 : COptionsDlg
  • m_Page4 : NewControlsPropSheet , CMyPropertySheet
  • m_Page5 : NewControlsPropSheet
  • m_Page6 : NewControlsPropSheet
  • m_pagectrlpage : CAllControlsSheet
  • m_pagerctrl : CPagerCtrlPage
  • m_palColorPicker : CFormatBar , CPage2
  • m_palDIB : CDibDoc
  • m_palette : CMainFrame
  • m_PaletteBar : CToolBarCtrlPage
  • m_palSys : CPage2
  • m_pAnchor : CSpiroView
  • m_PanelImages : CMainFrame
  • m_paperColor : CDrawDoc
  • m_paperColorLast : CDrawDoc
  • m_Pat : CMainFrame , CDemoOptionsPropSheet
  • m_pBindHost : CTestContainer98Item
  • m_pBitmap : CSpiroView
  • m_pBitmapDragFigure : CSpiroView
  • m_pbitmapOld : CSpiroView
  • m_pButton : CNetAddrVerifierDlg
  • m_pButtons : CButtonDialog
  • m_pCatInfo : CComponentCategoriesDlg , CInsertControlDlg
  • m_pcf : CObjectData
  • m_pClientItem : CDrawOleObj
  • m_pClonedFrom : CEnumVariant
  • m_pClrMenu : CHTMLEdView
  • m_pContents : CEnumVariant
  • m_pControl : CExtendedControl
  • m_pCounterThread : CMutexesDlg
  • m_pCtlDispatch : CTestContainer98Item
  • m_pCurrOutlookPage : CMainFrame
  • m_pCurrOutlookWnd : CMainFrame
  • m_pCurrWorkSpace : CMainFrame
  • m_pDC : CCubeView , CTestContainer98Item , CRulerItem , CThreadView
  • m_pDCMem : CSpiroView
  • m_pdisp : CDispatchDlg
  • m_pDispatch : CMethodDlg , CScript
  • m_pDisplayThread : CMutexesDlg
  • m_pDoc : CAmbientPropertiesDlg , CContainerInfoDlg , CScriptManager , CColorOptDlg
  • m_pDocTemplateCpp : CVisualStudioDemoApp
  • m_pDocument : CDrawObj , CServerNode
  • m_pDragNode : CServerView
  • m_pDrawObj : CDrawPoly , CPolyTool , CDrawItem
  • m_pDropTarget : CTestContainer98Item
  • m_pDualAutoClikObject : CAutoDrivDlg
  • m_pEdit : CNetAddrVerifierDlg
  • m_pEditBox : COutputWindowLog
  • m_pen : CLineThread
  • m_penCur : CScribbleDoc
  • m_penSize : CRectDlg , CLineWeightDlg
  • m_pEventCP : CTestContainer98Item
  • m_pExtendedControl : CTestContainer98Item
  • m_pExtra : COnCmdMsg
  • m_pf : CFormatParaDlg , CFormatTabDlg , CFormatParaDlg
  • m_pFigureCurrent : CSpiroDoc
  • m_pFigureDrag : CSpiroView
  • m_pFindDialog : CNotepadView
  • m_pFmtMenu : CHTMLEdView
  • m_pFont : CDerEditDlg , COle2ViewApp
  • m_pFontBold : COle2ViewApp
  • m_pFontHolder : CTestContainer98Doc
  • m_pFrameWnd : CTrackFile
  • m_pFuncDesc : CSmartFuncDesc
  • m_pGotoDialog : CNotepadView
  • m_PH : CPropertySet
  • m_pHandlerInfo : COnCmdMsg
  • m_pHelpIDs : CButtonDialog
  • m_Phone : CDBVListSet
  • m_pictureButton : CSpeakNDlg
  • m_pIDOD : CImpIAdviseSink
  • m_pILDragFigure : CSpiroView
  • m_pImage : CInfoDlg
  • m_pImageHdrSmall : CListHdrDlg
  • m_pimagelist : CMyTreeCtrl
  • m_pImageList : CListHdrDlg , CComboBoxExProp
  • m_pimageListDrag : CMyListCtrl
  • m_pImageListSmall : CListHdrDlg
  • m_pInactiveDropTarget : CTestContainer98View
  • m_pInnerDispatch : CExtendedControl
  • m_pInterfaceInfo : CMethodDlg
  • m_piParamTypes : CMethodDlg
  • m_pItem : CExtendedControl
  • m_pItemToDeactivateOnLeave : CTestContainer98View
  • m_pItemWithCapture : CTestContainer98View
  • m_pItemWithFocus : CTestContainer98View
  • m_play : CCubeView
  • m_pListBox : CDateDialog
  • m_pListOut : CHuskApp
  • m_pLog : CTestContainer98Doc
  • m_pMainWnd : CMailFrame
  • m_pManager : CScript
  • m_pMethodInfo : CMethodDlg
  • m_pModalShapePropSheet : CShapesView
  • m_pModeless : CMainDlg
  • m_pModelessShapePropSheet : CShapePropSheetFrame
  • m_pNetAddr : CNetAddrVerifierDlg
  • m_pObject : CItemIcons
  • m_pObjectView : CMainFrame
  • m_pObjTreeView : CMainFrame
  • m_pODLView : CTypeLibWnd
  • m_point : CFigCommand
  • m_pointArray : CStroke
  • m_points : CDrawPoly
  • m_pOldPalette : CCubeView
  • m_pOleControl : CTestContainer98Item
  • m_pOleInPlaceObjectWindowless : CTestContainer98Item
  • m_pOleObject : CMetaFileWnd
  • m_pOptions : CTCCommandLineInfo
  • m_position : CDrawObj
  • m_pOwner : CExampleThread
  • m_pPageBkfst : CSnapView
  • m_pPageDinner : CSnapView
  • m_pPageLunch : CSnapView
  • m_pParamInfo : CMethodDlg
  • m_pParent : CCustomList , CAdderDialog
  • m_pParentMenuBar : CRibbonTooltipCtrl
  • m_pParentRibbon : CRibbonTooltipCtrl
  • m_pPointerInactive : CTestContainer98Item
  • m_pProp : CAmbientPropertiesDlg , CPropSliderCtrl
  • m_pPropertyBag : CPropertyBagDlg
  • m_pPropertyCP : CTestContainer98Item
  • m_pPropSheet : CSnapView
  • m_ppThis : CListOutputFrame
  • m_pRecalcWorkerThread : CRecalcDoc
  • m_PressedImages : CMSMToolBar
  • m_prev : CNextWizardDialog , CEndWizardDialog
  • m_prevDropEffect : CDrawView , CMainView , CServerView
  • m_prevFormat : CHTMLEdView
  • m_PreviewState : CDrawView
  • m_progctrlpage : CAllControlsSheet
  • m_Progress : CProgCtrlPage
  • m_pRoot : CServerDoc
  • m_PropList : CPropertySection
  • m_propSet : CSummInfo
  • m_pRuler : CRulerItem
  • m_pScript : CMacroDlg
  • m_pScriptManager : CMacroDlg , CTestContainer98Doc
  • m_pSection : CSummInfo
  • m_pSelectedItem : CTypeLibWnd
  • m_pSelectedNode : CServerView
  • m_pSelection : CMFCBindView , CMainView , CTestContainer98View , CContainerView
  • m_pSelItem : CRulerBar
  • m_pSelWorkSpace : CFolderListPopupWnd
  • m_pServerItem : CServerNode
  • m_pServerNode : CServerItem
  • m_pSet : CDBVListView
  • m_pShapePropFrame : CMainFrame
  • m_pShapeSelected : CShapesView
  • m_pSink : CIDataObjectDlg
  • m_pSrcView : CMainFrame
  • m_pSrcWnd : CSurface
  • m_pStartDocTemplate : CVisualStudioDemoApp
  • m_pStorage : CTestContainer98Doc
  • m_pStream : CTestContainer98Doc
  • m_pStrokeCur : CScribbleView
  • m_pSummInfo : CDrawDoc
  • m_pSurf : CSwarm
  • m_pSurface : CChildView
  • m_pSwarm : CLeader
  • m_pszRange : CMonthCalPage
  • m_pszSelection : CMonthCalPage
  • m_pszText : CRegEntry
  • m_pt : CAutoClickDoc
  • m_pTabItems : CRulerBar
  • m_ptArray : CCollectDoc
  • m_pTBButtons : CStandardBar , CPaletteBar
  • m_ptCenter : CBounceWnd , CBounceDoc
  • m_ptHotSpot : CMyListCtrl
  • m_ptHotSpotDragFigure : CSpiroView
  • m_ptLastMousePosition : CTestContainer98View
  • m_ptlb : CTypeLibWnd , CTypeLibTreeView
  • m_ptMouseDown : CMSOffice2007DemoView
  • m_ptOrigin : CMyListCtrl
  • m_ptPixel : CBounceDoc , CBounceWnd
  • m_ptPopup : CDesktopAlertDemoDlg
  • m_ptPos : CRectItem , CBasePiece
  • m_ptPosition : CExtendedControl
  • m_ptPosition1 : CLineThread
  • m_ptPosition2 : CLineThread
  • m_ptPrev : CScribbleView
  • m_pTree : CTreeItem
  • m_pTreeView : CTypeLibWnd
  • m_ptStart : CServerView
  • m_ptVelocity : CRectThread , CBallThread
  • m_ptVelocity1 : CLineThread
  • m_ptVelocity2 : CLineThread
  • m_ptWheelPos : CFigCommand
  • m_ptWheelPosFirst : CSpiroView
  • m_pTypeAttr : CSmartTypeAttr
  • m_pTypeInfo : CSmartVarDesc , CSmartTypeAttr , CSmartFuncDesc , CExtendedControl
  • m_punk : CTreeItem , CObjectData
  • m_pValidateBtn : CNetAddrVerifierDlg
  • m_pValue : CProperty
  • m_pvarCurrentParam : CMethodDlg
  • m_pVarDesc : CSmartVarDesc
  • m_pvarParams : CMethodDlg
  • m_pView : CMMXSwarmApp , CExtendedControl
  • m_pViewObject : CMetaFileWnd
  • m_pViewObjectEx : CTestContainer98Item
  • m_pViews : CMainFrame
  • m_pWebView : CMainFrame
  • m_pWheel : CSpiroView
  • m_pWindowlessDropTarget : CTestContainer98View
  • m_qqwpl : CSSE2Surface16Intrinsic
  • m_qwpl : CSSE2Surface32Intrinsic , CSSE2Surface24Intrinsic , CMMXSurface16Intrinsic
  • m_rcTrack : CRulerItem
  • m_recalcThreadInfo : CRecalcDoc
  • m_rect : CShape , CContainerItem , CTestContainer98Item
  • m_rectAnimateCtrl : CAnimateCtrlPage
  • m_rectBorder : CGDIThread
  • m_rectBound : CFigure
  • m_rectBounding : CStroke
  • m_rectCaption : CFolderListPopupWnd
  • m_rectCheck : CCheckBoxProp
  • m_rectDocumentBounds : CDrawDoc
  • m_rectFill : CMainFrame
  • m_rectImage : CPage3
  • m_rectInfo : CToolsPalette
  • m_rectInitialFrame : CWordPadApp
  • m_rectLabel : CUndoBar
  • m_rectMargin : CRulerBar
  • m_rectPageMargin : CWordPadApp
  • m_rectPosition : CBallThread , CRectThread
  • m_rectSizing : CMainFrame
  • m_replayButton : CSpeakNDlg
  • m_ResourceViewImages : CResourceViewBar
  • m_rgco : CRing
  • m_rgCo : CBasePiece
  • m_rgco : CWheel
  • m_rgcoPattern : CWheel
  • m_rgDlgItem : CMyDialogTemplate
  • m_rghItem : CTreeCtrlPage
  • m_rgNotifDescrip : CNotifyShowCase
  • m_rgnRads : CWheel , CRing
  • m_rightmargin : CRulerBar
  • m_Root : CFavoritesManager
  • m_roundness : CDrawRect
  • m_sa : CFormatMenu
  • m_scheduler_array : CSchedulerDlg
  • m_scheduler_filepath : CSchedulerDlg
  • m_sColorTable : CBrightLeader
  • m_SearchBox : CEditBar
  • m_searchHistory : CNotepadView
  • m_secondary : CComboRulerItem
  • m_SectionList : CPropertySet
  • m_selection : CDrawView
  • m_server : CWordPadApp , CServerApp , CTestContainer98App , COleClientApp , CTheApp , CDrawApp , CScribbleApp , CAutoClickApp
  • m_SH : CPropertySection
  • m_shape : CAddNodeDlg , CServerNode , CChangeNameDlg
  • m_shapecolor : CShape
  • m_shapeList : CShapesDoc
  • m_shapestyle : CShape
  • m_size : CRulerItem , CDrawDoc , CExtendedControl , CMetaFileWnd
  • m_sizeBitmap : CSpiroView , CBigIcon
  • m_sizeContent : CRectItem
  • m_sizeContentExtent : CRectItem
  • m_sizeDelta : CMyListCtrl
  • m_sizeDoc : CMainDoc , CDibDoc , CScribbleDoc
  • m_sizeExtent : CSpiroDoc
  • m_sizeIcon : CRectItem
  • m_sizeIconExtent : CRectItem
  • m_sizeImage : CMSMoneyDemoView
  • m_sizeMargins : CRibbonListButton , CRibbonListFontButton
  • m_sizeMaxText : CRibbonListFontButton , CRibbonListButton
  • m_sizeMove : CBounceWnd , CBounceDoc
  • m_sizePaper : CRulerBar
  • m_sizeRadius : CBounceWnd , CBounceDoc
  • m_sizeTotal : CBounceWnd , CBounceDoc
  • m_Slider : CSliderCtrlPage
  • m_sliderBorderSize : CPagerCtrlPage
  • m_sliderctrlpage : CAllControlsSheet
  • m_SmallImageList : CRowListView
  • m_spBrowser : CGetURL
  • m_spCurrElement : CDHtmlExploreDlg
  • m_Spin : CSpinCtrlPage
  • m_SpinCtrl : CLineWeightDlg , CRectDlg
  • m_spinctrlpage : CAllControlsSheet
  • m_splash : CTheApp
  • m_splitButton : CSplitButtonCtrlPage
  • m_splitButtonpage : CAllControlsSheet
  • m_sSaveFileName : CHTMLEdDoc
  • m_StandardBar : CToolBarCtrlPage
  • m_StateImageList : CRowListView
  • m_static1 : CDerEditDlg
  • m_static2 : CDerEditDlg
  • m_static3 : CDerEditDlg
  • m_static4 : CDerEditDlg
  • m_staticBorderSize : CPagerCtrlPage
  • m_staticIcon : CButtonDialog
  • m_staticParameterValue : CMethodDlg
  • m_staticPropertyValue : CAmbientPropertiesDlg
  • m_staticServerPath : CInsertControlDlg
  • m_staticText : CButtonDialog
  • m_StatusBar : CMainFrame
  • m_statusBar : CModelessMain
  • m_stcAccum : CDriverDlg
  • m_stcOperand : CDriverDlg
  • m_stcOperator : CDriverDlg
  • m_str : CAutoClickDoc , CMyObject , CTypedPtrArrayView , CMyStruct , CMapDWordToMyStructView , CTypedPtrListView , CHelloDoc , CChangeText , CTypedPtrMapView
  • m_str1 : CVariantMap
  • m_str2 : CVariantMap
  • m_strAbbrev : CUnit
  • m_strAccessTime : CPropertiesDlg
  • m_strAlignMode : CListHdrDlg
  • m_strAnimSpeed : CDesktopAlertDemoDlg
  • m_strAppname : CSummPage
  • m_strArray : CStringCollect , CButtonDialog
  • m_strAuthor : CSummPage
  • m_strAutoClose : CDesktopAlertDemoDlg
  • m_strCaption : CDialogItem , CButtonDialog , CFolderListPopupWnd , CMSMCaptionBar , CDlgtempDlg
  • m_strClassName : CFolderListPopupWnd
  • m_strCmt : CSummPage
  • m_strComplete : CTrackFile
  • m_strCreateDate : CStatPage
  • m_strCreationTime : CPropertiesDlg
  • m_strCtxFileName : CDHtmlExploreDlg
  • m_strCurFontName : CPage3
  • m_strCurrDir : CDHtmlExploreDlg
  • m_strCurrentCount : CDriverView
  • m_strData : CInputView , CMainDoc
  • m_strDescription : CChangeNameDlg , CServerNode , CAddNodeDlg
  • m_strDirectory : CTestContainer98Doc
  • m_strDisplayName : CTestContainer98Item
  • m_strDiv : CDBVListView
  • m_strDlgTitle : CListDlg
  • m_strDSMFile : CTCOptions
  • m_strEditTime : CStatPage
  • m_strElement : CStringListView
  • m_strFileName : CPropertiesDlg , CLoggingDlg
  • m_strFileSize : CPropertiesDlg
  • m_strFooter : CPageSetupDlg
  • m_strFooterOld : CPageSetupDlg
  • m_strHeader : CPageSetupDlg
  • m_strHeaderOld : CPageSetupDlg
  • m_strImagePath : CImagePropPage
  • m_stringList : CCollectDoc , CCollectView
  • m_strInput : CEnterDlg
  • m_strKey : CTypedPtrMapView , CRegEntry , CMapStringToStringView
  • m_strKeywd : CSummPage
  • m_strLabel : CUndoBar
  • m_strLastPrint : CStatPage
  • m_strLastSave : CStatPage
  • m_strLastType : CDriverView
  • m_strLastValue : CDriverView
  • m_strLink : CDesktopAlertDemoDlg
  • m_strLinkKey : CAddNodeDlg , CChangeNameDlg , CServerNode
  • m_strListTitle : CListDlg
  • m_strLog : CCustomFileDialog , CFileDlgWatcherDlg
  • m_strLogFileName : CTCOptions
  • m_strMacroName : CMacroDlg
  • m_strModificationTime : CPropertiesDlg
  • m_strName : CPropertyEditRequestsPage::CPropertyInfo , CNewAmbientPropertyDlg , CAmbientProperty , CMethodInfo , CFontDesc , CWorkspaceObj , CFavorit , CPropertyBagItem , CMethodParamInfo
  • m_strNumber : CMutexesDlg
  • m_strNumChars : CStatPage
  • m_strNumPages : CStatPage
  • m_strNumWords : CStatPage
  • m_strokeList : CScribbleDoc
  • m_strParsedAddr : CNetAddrVerifierDlg
  • m_strPath : CConfigDlg
  • m_strProgID : CTCOptions
  • m_strRevNum : CStatPage
  • m_strRGB : CPage2
  • m_strRGBColorBar : CPage2
  • m_strRGBColorBar2 : CPage2
  • m_strRGBColorDialog : CPage2
  • m_strRGBColorPalette : CPage2
  • m_strSavedBy : CStatPage
  • m_strSaving : CTrackFile
  • m_strScript : CFontDesc
  • m_strScriptName : CScript
  • m_strScriptText : CScript
  • m_strSectionName : CPropertySection
  • m_strSecurity : CStatPage
  • m_strSel : CDateDialog
  • m_strSelectedFolder : CPage6
  • m_strSelectedItem : CDlgtempDlg
  • m_strSortMode : CListHdrDlg
  • m_strSubj : CSummPage
  • m_strTempl : CSummPage
  • m_strText : CDesktopAlertDemoDlg , CButtonDialog
  • m_strTitle : CSummPage , CHistoryObj
  • m_strToolTip : CPage1
  • m_strTransparency : CDesktopAlertDemoDlg
  • m_strType : CPropertiesDlg
  • m_strURL : CFavorit , CLinkButton , CHistoryObj
  • m_strValue : CRegEntry , CMapStringToStringView
  • m_strValue1 : CPage4
  • m_strValue2 : CPage4
  • m_strValue3 : CPage4
  • m_strValue4 : CPage4
  • m_strValue5 : CPage4
  • m_strViewMode : CListHdrDlg
  • m_strWait : CTrackFile
  • m_stylePage : CModelessShapePropSheet , CModalShapePropSheet
  • m_swarm : CChildView
  • m_SysImageSize : CFavoritesManager
  • m_SystemHeight : CMSMCaptionBar
  • m_szBaseUnits : CFormatBar
  • m_szCurAddr : CGetURL
  • m_szDescription : CEntryInfoDlg , CMyScheduler
  • m_szDivClass : CSchedulerDlg
  • m_szEndTime : CEntryInfoDlg
  • m_szEndTimeHour : CEntryInfoDlg
  • m_szEndTimeMinute : CEntryInfoDlg
  • m_szIcon : CMSMCaptionBar
  • m_szName1 : CTesthelpPropPage , CTesthelpCtrl
  • m_szName2 : CTesthelpPropPage , CTesthelpCtrl
  • m_szName3 : CTesthelpPropPage , CTesthelpCtrl
  • m_szObjectCur : COle2ViewDoc
  • m_szOutput : CIDataObjectDlg
  • m_szProgID : CObjectData
  • m_szStartTime : CEntryInfoDlg
  • m_szStartTimeHour : CEntryInfoDlg
  • m_szStartTimeMinute : CEntryInfoDlg
  • m_szStatusText : COle2ViewApp
  • m_szText : CAutoDrivDlg , CFindDlg
  • m_szTipCaption : CTesthelpPropPage
  • m_szTitle : CEntryInfoDlg , CMyScheduler
  • m_szToolTipText : CTesthelpCtrl
  • m_tabarray : CFormatTabDlg
  • m_tabItem : CRulerBar
  • m_TableAttribs : CInsertTableDlg
  • m_tAllowWindowless : CFeaturesPage , CTestContainer98Doc , CTCOptions
  • m_targetRes : CSpeakNDlg
  • m_targetWord : CSpeakNDlg
  • m_TaskOffset : CTasksPaneView
  • m_TaskSpacing : CTasksPaneView
  • m_tBindable : CMethodInfo
  • m_tChanged : CAmbientPropertiesDlg
  • m_tDisplayAsDefault : CTestContainer98Item
  • m_tEnabled : CAmbientProperty
  • m_tException : CMethodDlg
  • m_tExpectingDSMFile : CTCCommandLineInfo
  • m_tExpectingLogFileName : CTCCommandLineInfo
  • m_tExpectingProgID : CTCCommandLineInfo
  • m_tExtendedControl : CTestContainer98Item
  • m_tFreezeEvents : CTestContainer98Doc
  • m_tHonorIgnoreActivateWhenVisible : CTestContainer98Doc , CFeaturesPage , CTCOptions
  • m_threadList : CThreadView
  • m_tIAdviseSinkEx : CTestContainer98Doc , CInterfacesPage , CTCOptions
  • m_time : CDateDialog
  • m_timeFooter : CPadView
  • m_timeHeader : CPadView
  • m_tInsideOut : CTestContainer98Item
  • m_tIOleInPlaceSiteEx : CInterfacesPage , CTCOptions , CTestContainer98Doc
  • m_tIOleInPlaceSiteWindowless : CTCOptions , CTestContainer98Doc , CInterfacesPage
  • m_Title : CDBVListSet
  • m_tLog : CMethodInfo
  • m_tLogEditRequests : CMethodInfo
  • m_tLogged : CPropertyEditRequestsPage::CPropertyInfo
  • m_toolBar : CModelessMain
  • m_toolbar : CPagerCtrlPage
  • m_ToolBar : CMainFrame
  • m_toolBarCombo : CComboToolBar
  • m_toolbarpage : CAllControlsSheet
  • m_ToolTip : CDlgToolTipsDlg , CToolBarCtrlPage
  • m_TooltipImages : CMainFrame
  • m_totalLines : CNotifyShowCase
  • m_toType : CDriverView
  • m_toValue : CDriverView
  • m_tQuickActivation : CTCOptions
  • m_tracker : CTestContainer98Item , CTrackerDoc
  • m_tree : CRegistryView , CTypeLibTreeView
  • m_treectrlpage : CAllControlsSheet
  • m_tRequestEdit : CMethodInfo
  • m_tSBindHost : CTestContainer98Doc , CServicesPage , CTCOptions
  • m_tSlowDrawing : CTestContainer98Doc
  • m_tStartOfLine : CDebugLog
  • m_tStock : CAmbientProperty
  • m_ttip : CTesthelpCtrl
  • m_tTwoPassDrawing : CFeaturesPage , CTestContainer98Doc , CTCOptions
  • m_tUseIPointerInactive : CFeaturesPage , CTestContainer98Doc , CTCOptions
  • m_tUseQuickActivation : CFeaturesPage , CTestContainer98Doc
  • m_tUserMode : CTCOptions , CTestContainer98Doc
  • m_tVisible : CExtendedControl
  • m_tWindowless : CTestContainer98Item
  • m_Type : CTreeItem
  • m_type : CFigCommand
  • m_uiBitmap : CObjectData
  • m_uiCategoryID : CMSOffice2007DemoCntrItem
  • m_uiCmd : CWorkspaceObj
  • m_uiCommand : CHistoryObj , CFavorit
  • m_uiCurrTool : CPaletteDemoDoc
  • m_uiDefaultNewAction : CWorkspaceObj
  • m_uiHilightedPage : CMainFrame
  • m_uiLine : CSliderCtrlPage
  • m_uiLineStyleCmd : COwnerDrawMenuView
  • m_uiMemid : CTreeItem
  • m_uiNextCommand : CFavorit
  • m_uiPage : CSliderCtrlPage
  • m_uiPos : CProgCtrlPage
  • m_uiRangeFrom : CSliderCtrlPage , CSpinCtrlPage , CProgCtrlPage
  • m_uiRangeTo : CProgCtrlPage , CSpinCtrlPage , CSliderCtrlPage
  • m_uiSelRangeFrom : CSliderCtrlPage
  • m_uiSelRangeTo : CSliderCtrlPage
  • m_uiStep : CProgCtrlPage
  • m_uiTickFreq : CSliderCtrlPage
  • m_uiTypeInfoCount : CDispatchDlg
  • m_ulChangeIconNotifyID : CPage6
  • m_ulRecycleBin : CFolderBar
  • m_unit : CRulerBar
  • m_units : CWordPadApp
  • m_URL : CGetURL
  • m_URLIcons : CFavorit
  • m_UserImages : CMainFrame
  • m_uTimerID : CWordPadView , CPadView
  • m_varKey : CVariantAssoc
  • m_varResult : CMethodDlg
  • m_varValue : CVariantAssoc , CPropertyBagItem , CAmbientProperty
  • m_VMargin : CTasksPaneView
  • m_vt : CMethodParamInfo
  • m_vti : CAmbientProperty
  • m_wbdShellTree : CPage6
  • m_width : CMMXSurface16Intrinsic , CSSE2Surface16Intrinsic , CSSE2Surface24Intrinsic , CSSE2Surface32Intrinsic , CMMXSurface24Intrinsic , CMMXSurface32Intrinsic
  • m_wMajorVer : CObjectData
  • m_wMinorVer : CObjectData
  • m_wnd1 : CTabControlView
  • m_wnd2 : CTabControlView
  • m_wnd3 : CTabControlView
  • m_wnd4 : CTabControlView
  • m_wndAddress : CMainFrame
  • m_wndAnimate : CMainFrame
  • m_wndANimationSpeed : CDesktopAlertDemoDlg
  • m_wndArticles : CDynamicHelpViewBar
  • m_wndAutoCloseTime : CDesktopAlertDemoDlg
  • m_wndBackColor : CStatusBarDemoView
  • m_wndBanner : CDemoOptionsPage
  • m_wndBarOutlook : CMainFrame
  • m_wndBarOutlook2003 : CMainFrame
  • m_wndBorder : CPage1
  • m_wndBorderLabel : CPage1
  • m_wndBounce : CBounceThread
  • m_wndBrowseBar : CMainFrame
  • m_wndCalendar : CMainFrame , CCalendarBar
  • m_wndCalendar2003 : CMainFrame
  • m_wndCancel : CAppLookDlg
  • m_wndCaption : CMainFrame
  • m_wndCaptionBar : CMainFrame
  • m_wndCategoryBar : CMainFrame
  • m_wndClassView : CMainFrame , CClassViewBar
  • m_wndColorBar : CPage2
  • m_wndColorBar2 : CPage2
  • m_wndColorBarFrame : CPage2
  • m_wndColorBarFrame2 : CPage2
  • m_wndColorPalette : CPage2
  • m_wndColorScheme : CDemoOptionsPage
  • m_wndCustomEdit : CPage3
  • m_wndDebugBar : CMainFrame
  • m_wndDlgBar : CMainFrame
  • m_wndDockTabColors : CAppLookDlg
  • m_wndDynamicHelpView : CMainFrame
  • m_wndEdit : CTaskPane
  • m_wndEditBar : CMainFrame
  • m_wndEditListBox : CPage3
  • m_wndExplorerBar : CMainFrame
  • m_wndFavorites : CExplorerBar
  • m_wndFileEdit : CPage3
  • m_wndFileView : CFileViewBar , CMainFrame
  • m_wndFolderEdit : CPage3
  • m_wndFolderList : CMainFrame
  • m_wndFolders : CFoldersTree , CFolderListPopupWnd , CFolderListBar
  • m_wndFoldersBar : CMainFrame
  • m_wndFont : CPage3
  • m_wndFormatBar : CInPlaceFrame , CMainFrame
  • m_wndFrom : CMyPopupDlg
  • m_wndHeight : CSurface
  • m_wndIcons : CDesktopAlertDemoDlg
  • m_wndImageArea : CPage3
  • m_wndInfoBar : CMainFrame
  • m_wndLabel1 : CDesktopAlertDemoDlg
  • m_wndLabel2 : CDesktopAlertDemoDlg
  • m_wndLabel3 : CDesktopAlertDemoDlg
  • m_wndLink : CDesktopAlertDemoDlg
  • m_wndLinksBar : CMainFrame
  • m_wndLinksBars : CMainFrame
  • m_wndList : CExplorerView , CPage5 , CUndoBar
  • m_wndList1 : COutputBar
  • m_wndList2 : COutputBar
  • m_wndList3 : COutputBar
  • m_wndLum : CPage2
  • m_wndMacroBar : CMainFrame
  • m_wndMailBar : CMailFrame
  • m_wndMainBar : CMainFrame
  • m_wndMaskEdit1 : CPage4
  • m_wndMaskEdit2 : CPage4
  • m_wndMaskEdit3 : CPage4
  • m_wndMaskEdit4 : CPage4
  • m_wndMaskEdit5 : CPage4
  • m_wndMenuBar : CInPlaceFrame , CMainFrame , CMailFrame , CMainFrame
  • m_wndMessageBar : CMainFrame
  • m_wndNotifications : CTabControlView
  • m_wndObjectCombo : CPropertiesViewBar
  • m_wndOK : CAppLookDlg
  • m_wndOneNoteTabs : CAppLookDlg
  • m_wndOutlookBar2003 : CAppLookDlg
  • m_wndOutlookPane1 : CMainFrame
  • m_wndOutlookPane12003 : CMainFrame
  • m_wndOutlookPane2 : CMainFrame
  • m_wndOutlookPane22003 : CMainFrame
  • m_wndOutput : COutputViewBar , CMainFrame
  • m_wndOutputBuild : COutputBar
  • m_wndOutputDebug : COutputBar
  • m_wndOutputFind1 : COutputBar
  • m_wndOutputFind2 : COutputBar
  • m_wndOutputSQL : COutputBar
  • m_wndOutputView : CMainFrame
  • m_wndPalette : CMainFrame
  • m_wndPaletteBar : CMainFrame
  • m_wndPreview : CModalShapePropSheet
  • m_wndPropertiesBar : CMainFrame
  • m_wndPropList : CWorkspaceBar , CPage5 , CPropertiesViewBar
  • m_wndPropListLocation : CPage5
  • m_wndReBar : CMainFrame
  • m_wndResizeBar : CInPlaceFrame
  • m_wndResourceBar : CMainFrame
  • m_wndResourceView : CResourceViewBar , CMainFrame
  • m_wndRibbonBar : CMainFrame
  • m_wndRoundedTabs : CAppLookDlg
  • m_wndRulerBar : CInPlaceFrame , CMainFrame
  • m_wndShellList : CPage6
  • m_wndShellTree : CFolderBar
  • m_wndShortcutsBar : CMainFrame
  • m_wndShortcutsPane1 : CMainFrame
  • m_wndSizeToolBar : CMainFrame
  • m_wndSlider : CSliderButton
  • m_wndSplitter : CChildFrame , CSplitFrame , C3WaySplitterFrame , CTypeLibWnd , CMainFrame , CSplitFrame , CMainFrame , CSplitterFrame
  • m_wndSplitter2 : C3WaySplitterFrame
  • m_wndStartAnimation : CStatusBarDemoView
  • m_wndStartProgress : CStatusBarDemoView
  • m_wndStatusBar : CMainFrame , CMailFrame , CMainFrame , CTypeLibWnd
  • m_wndStyle : CAppLookDlg
  • m_wndStyle2007 : CAppLookDlg
  • m_wndStyleBar : CMainFrame
  • m_wndTab : CTabControlView
  • m_wndTabIcons : CTabControlView
  • m_wndTabLoc : CTabControlView
  • m_wndTabs : CWorkspaceBar , COutputBar
  • m_wndTaskPane : CMainFrame
  • m_wndText : CDesktopAlertDemoDlg
  • m_wndTextColor : CStatusBarDemoView
  • m_wndToolBar : CMainFrame , CClassViewBar , COutputBar , CPropertiesViewBar , CTypeLibWnd , CWorkspaceBar , CMainFrame , CFileViewBar , CMainFrame , CDynamicHelpViewBar , CInPlaceFrame , CMainFrame , CMailFrame , CInPlaceFrame
  • m_wndToolBarAdvanced : CMainFrame
  • m_wndToolbarBuild : CMainFrame
  • m_wndToolbarEdit : CMainFrame
  • m_wndToolbarResource : CMainFrame
  • m_wndToolBarSpiro : CMainFrame
  • m_wndToolBarTheme : CMainFrame
  • m_wndToolBarWeb : CMainFrame
  • m_wndToolTip : CPage1
  • m_wndTransparency : CDesktopAlertDemoDlg
  • m_wndTree : CWorkspaceBar2 , CWorkspaceBar , CTaskPane , CMainFrame
  • m_wndTree1 : CWorkspaceBar
  • m_wndTree2 : CWorkspaceBar
  • m_wndTree2003 : CMainFrame
  • m_wndUndoBar : CUndoMenu
  • m_wndView : CMainFrame
  • m_wndWatch : CWatchBar
  • m_wndWatchBar : CMainFrame
  • m_wndWidth : CSurface
  • m_wndWorkSpace : CMainFrame
  • m_wndWorkSpace2 : CMainFrame
  • m_wndXPButtons : CPage1
  • m_wParseStyle : CParsedEdit
  • m_wpPrev : CMainFrame
  • m_WrittenBy : CAboutDlg
  • m_wStyle : CButtonDialog
  • m_x : CDlgtempDlg , CAutoDrivDlg , CAutoClickPoint , CPointArrayView
  • m_xSize : CSplitButtonCtrlPage
  • m_y : CAutoClickPoint , CPointArrayView , CAutoDrivDlg , CDlgtempDlg
  • m_year : CSchedulerDlg
  • m_ySize : CSplitButtonCtrlPage
  • m_zoomDenom : CServerView
  • m_zoomNum : CServerView
  • m_zoomX : CZoomDlg
  • m_zoomY : CZoomDlg
  • menu : CHelloWnd , CBounceWnd , CBounceMDIChildWnd
  • ms : tagABSTIME
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- n -

  • nBaseLine : tagRCRESULT
  • nCode : notif_tag
  • nextButton : CBMTest3Dlg
  • nFirstBox : tagSYG
  • nID : DocType
  • nInkWidth : tagPENDATAHEADER , tagRC
  • nLeft : tagCOLUMNSTRUCT
  • nLevel : tagITEMDATA
  • nMidLine : tagRCRESULT
  • nRight : tagCOLUMNSTRUCT
  • nSamplingDist : tagPENINFO
  • nSamplingRate : tagPENINFO
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- o -

  • okButton : CBMTest3Dlg
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- b -

  • bCaptureFullScreen : CaptureData
  • bDup : DocType
  • bheight : tagPENTIP
  • bmiOtherColors : BITMAPINFO256
  • bOpacity : tagPENTIP
  • bottom : tagRECTL
  • boxlayout : tagBOXEDITINFO
  • bRead : DocType
  • brushBtnFace : CRulerBar
  • brushWindow : CRulerBar
  • btype : tagPENTIP
  • button1 : CBMTest1Dlg
  • button2 : CBMTest1Dlg
  • buttons : CBMTest2Dlg
  • bwidth : tagPENTIP
  • bWrite : DocType
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- c -

  • c_bShowItems : CDrawOleObj
  • c_down : CDrawTool
  • c_drawShape : CDrawTool
  • c_last : CDrawTool
  • c_nDownFlags : CDrawTool
  • c_tools : CDrawTool
  • cb : DICTENTRYHEADER
  • cbOemData : tagPENINFO
  • cbPnts : tagSTROKEINFO
  • cbSection : tagSECTIONHEADER
  • cbSize : tagPDEVENT , tagSTRKFMT , tagPCMINFO , tagINKINGINFO , tagTARGINFO , tagINPPARAMS , tagCTLINITHEDIT , tagCTLINITBEDIT , tagPENTIP , tagANIMATEINFO , tagCTLINITIEDIT
  • cbSizeUsed : tagPENDATAHEADER
  • cColors : tagIMECOLORS
  • cColumns : tagITEMDATA
  • cf : CHARHDR
  • cHorzBox : tagGUIDE
  • cHotSpot : tagSYG
  • cl : tagSYE
  • clErrorLevel : tagRC
  • clrFill : CMainFrame::XStyle
  • clrLine : CMainFrame::XStyle
  • clsID : tagPROPHEADER
  • cmdInfo : CWordPadApp
  • cPens : tagPENINFO
  • cPnt : tagPENDATAHEADER , tagSTROKEINFO
  • cPntStrokeMax : tagPENDATAHEADER
  • cProperties : tagSECTIONHEADER
  • crColour : ColourTableEntry
  • cSections : tagPROPHEADER
  • cStrokes : tagPENDATAHEADER
  • cSyc : tagSYG
  • cSye : tagSYG
  • cSyv : tagRCRESULT
  • cTargets : tagTARGINFO
  • cVertBox : tagGUIDE
  • cxBase : tagGUIDE , tagBOXEDITINFO
  • cxBox : tagBOXEDITINFO , tagGUIDE
  • cxRawWidth : tagPENINFO
  • cyBase : tagGUIDE , tagBOXEDITINFO
  • cyBox : tagBOXEDITINFO , tagGUIDE
  • cyCusp : tagBOXLAYOUT
  • cyEndCusp : tagBOXLAYOUT
  • cyMid : tagGUIDE , tagBOXEDITINFO
  • cyRawHeight : tagPENINFO
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- d -

  • dBottom : tagRECTOFS
  • dispid : QAAMBIENTENTRY
  • dLeft : tagRECTOFS
  • dRight : tagRECTOFS
  • dTop : tagRECTOFS
  • dwAddTo : CMapInfo
  • dwApp : tagCTLINITIEDIT
  • dwAppParam : tagRC
  • dwData : tagTARGET
  • dwDictParam : tagRC
  • dwFlags : tagCTLINITHEDIT , tagPENTIP , tagTARGET , tagTARGINFO , tagINPPARAMS
  • dwOffset : tagPROPERTYIDOFFSET , tagFORMATIDOFFSET
  • dwOSVer : tagPROPHEADER
  • dwPcm : tagPCMINFO
  • dwPropID : DICTENTRYHEADER
  • dwQAFlag : QAAMBIENTENTRY
  • dwRecognizer : tagRC
  • dwReserved : tagSTRKFMT , tagCTLINITHEDIT , tagCTLINITIEDIT , tagCTLINITBEDIT , tagPENTIP , tagANIMATEINFO , tagPDEVENT
  • dwReserved1 : tagBOXLAYOUT
  • dwReserved2 : tagBOXLAYOUT
  • dwReserved3 : tagBOXLAYOUT
  • dwTick : tagSTROKEINFO
  • dwTime : tagOEM_PENPACKET
  • dwTimeout : tagPCMINFO
  • dwUser : tagSTRKFMT
  • dx : CRoamer
  • dy : CRoamer
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- e -

  • e : SHAPE_COLOR
  • edit : CSpinEditDlg
  • edit1 : CSubEditDlg
  • edit2 : CSubEditDlg
  • edit3 : CSubEditDlg
  • edit4 : CSubEditDlg
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- f -

  • fLastSyc : tagSYC
  • fnt : CRulerBar
  • font : CServerDC
  • formatID : tagFORMATIDOFFSET
  • fPen : tagPDEVENT
  • fuFlags : tagANIMATEINFO
  • fuOEM : tagPENINFO
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- g -

  • guide : tagRC
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- h -

  • hdr : DICTENTRY
  • hgdiobj : tagCTLINITIEDIT
  • hinksetBox : tagBOXRESULTS
  • hpendata : tagRCRESULT
  • hpenGrid : tagCTLINITIEDIT
  • hpndt : tagCTLINITIEDIT , tagINPPARAMS
  • hrec : tagRC
  • hResHandle : CLocalizePropPage
  • hrgnBound : tagPCMINFO
  • hrgnClip : tagINKINGINFO
  • hrgnExclude : tagPCMINFO
  • hrgnInkStop : tagINKINGINFO
  • hSyv : tagRCRESULT
  • htrgOwner : tagTARGINFO
  • htrgTarget : tagTARGET
  • hwnd : tagCTLINITHEDIT , tagRC , tagPDEVENT , tagCTLINITBEDIT , tagCTLINITIEDIT
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- i -

  • id : tagCTLINITHEDIT , tagCTLINITBEDIT , tagCTLINITIEDIT
  • idStr : DocType
  • idTarget : tagTARGET
  • ieb : tagCTLINITIEDIT
  • iedo : tagCTLINITIEDIT
  • iei : tagCTLINITIEDIT
  • ien : tagCTLINITIEDIT
  • ierec : tagCTLINITIEDIT
  • ies : tagCTLINITIEDIT
  • iesec : tagCTLINITIEDIT
  • iesf : tagSTRKFMT
  • imgOriginal : CChildView
  • indexMap : CColorMenu
  • indxBox : tagBOXRESULTS
  • invokekind : INVOKEKIND_ENTRY
  • iStrk : tagSTRKFMT
  • iSyc : tagSYE
  • iTargetLast : tagTARGINFO
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- p -

  • p1 : CRoamer
  • p2 : CRoamer
  • pageEmbedded : COptionSheet
  • pageRTF : COptionSheet
  • pageText : COptionSheet
  • pageWord : COptionSheet
  • pageWrite : COptionSheet
  • pBack : CItemData
  • pdts : tagCTLINITIEDIT
  • penBtnFace : CRulerBar
  • penBtnHighLight : CRulerBar
  • penBtnShadow : CRulerBar
  • penBtnText : CRulerBar
  • penFocusLine : CRulerBar
  • penWindow : CRulerBar
  • penWindowFrame : CRulerBar
  • penWindowText : CRulerBar
  • pFontHolder : CItemData
  • pFore : CItemData
  • pGroupFont : CPage5
  • pntEnd : tagRCRESULT
  • point : CLocalizeCtrl , CCircCtrl , CSpindialCtrl
  • pOldFont : CServerDC
  • pPicHolder : CItemData
  • prevButton : CBMTest3Dlg
  • propertyID : tagPROPERTYIDOFFSET
  • pStgMedium : CTestContainer98Item
  • pszConverterName : DocType
  • pszName : VARTYPE_ENTRY , INVOKEKIND_ENTRY
  • pszPrefixFrom : CMapInfo
  • pszPrefixTo : CMapInfo
  • pt : tagPDEVENT
  • pText : CItemData
  • ptOrgGrid : tagCTLINITIEDIT
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- r -

  • rectBound : tagPENDATAHEADER , tagPCMINFO , tagTARGET , tagRC
  • rectBoundInk : tagRCRESULT , tagTARGET
  • rectBoundLastInk : tagTARGET
  • rectClip : tagINKINGINFO
  • rectExclude : tagPCMINFO , tagRC
  • rectInkStop : tagINKINGINFO
  • rgb : tagPENTIP
  • rgbfAlc : tagRC
  • rgbInk : tagPENDATAHEADER , tagRC
  • rgCol : tagITEMDATA
  • rglpdf : tagRC
  • rgoempeninfo : tagPENINFO
  • rgpntHotSpots : tagSYG
  • rgSyv : tagBOXRESULTS
  • rgTarget : tagTARGINFO
  • rgwOemData : tagOEM_PENPACKET , tagPENPACKET
  • rgwReserved : tagRC , tagBOXEDITINFO , tagPENINFO
  • right : tagRECTL
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- s -

  • s_cfObjectDescriptor : CTestContainer98View
  • sec : tagABSTIME
  • startEdit : CSummInfo
  • style : tagBOXLAYOUT
  • syg : tagRCRESULT
  • syv : tagSYE
  • sz : DICTENTRY
  • szCaptureFilename : CaptureData
  • szCapturePath : CaptureData
  • szFaceName : tagBOXEDITINFO
  • szName : ColourTableEntry
  • szSig : tagVS_VERSION
  • sztCodeName : notif_tag
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- t -

  • target : tagINPPARAMS
  • tip : tagSTRKFMT , tagINKINGINFO
  • top : tagRECTL
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- u -

  • uiCmd : MSOfficeDemoKey
  • uiFlags : tagCOLUMNSTRUCT
  • uiType : tagITEMDATA
  • units : COptionSheet
  • uPeriodCB : tagANIMATEINFO
  • uSpeedPct : tagANIMATEINFO
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- v -

  • vffInfo : tagVS_VERSION
  • vt : VARTYPE_ENTRY
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- w -

  • wByteOrder : tagPROPHEADER
  • wCountry : tagRC
  • wDistinct : tagOEMPENINFO
  • wDistinctHeight : tagPENINFO , tagCALBSTRUCT
  • wDistinctWidth : tagPENINFO , tagCALBSTRUCT
  • wEventRef : tagRC
  • wFlags : tagCTLINITBEDIT , tagBOXEDITINFO , tagINKINGINFO
  • wFontHeight : tagBOXEDITINFO
  • wFormat : tagPROPHEADER
  • wHGrid : tagCTLINITIEDIT
  • wIntlPreferences : tagRC
  • wm : tagPDEVENT
  • wOffsetX : tagCALBSTRUCT
  • wOffsetY : tagCALBSTRUCT
  • wParam : tagPDEVENT
  • wPdk : tagSTROKEINFO
  • wPDK : tagPENPACKET , tagOEM_PENPACKET
  • wPdt : tagOEMPENINFO
  • wPndts : tagPENDATAHEADER
  • wPntFirst : tagSYC
  • wPntLast : tagSYC
  • wRcDirect : tagRC
  • wRcOrient : tagRC
  • wRcPreferences : tagRC
  • wResultMode : tagRC
  • wResultsType : tagRCRESULT
  • wSizeCategory : tagCTLINITBEDIT
  • wStrokeFirst : tagSYC
  • wStrokeLast : tagSYC
  • wTabletX : tagOEM_PENPACKET , tagPENPACKET
  • wTabletY : tagPENPACKET , tagOEM_PENPACKET
  • wTimeOut : tagRC
  • wTotLen : tagVS_VERSION
  • wTryDictionary : tagRC
  • wValLen : tagVS_VERSION
  • wValueMax : tagOEMPENINFO
  • wVersion : tagPENDATAHEADER
  • wVGrid : tagCTLINITIEDIT
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- x -

  • xOrigin : tagGUIDE
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- y -

  • yOrigin : tagGUIDE
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- k -

  • keys : keys.cpp , keys.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- l -

  • LAST_FAVORITE_COMMAND : FavoritesManager.h
  • lastPoint : drawtool.cpp
  • LIBID_TCPROPSLib : ExtCtl.Cpp
  • LIBID_TestContainer98 : TCDoc.Cpp
  • LibMain() : locresde.cpp , locresfr.cpp
  • line : drawtool.h
  • LINE_TO : spiroDoc.h
  • LOAD_STRING_FROM_RESOURCE : typelib.cpp , TstCon.H
  • LoadLocalizedResourceDLL() : guidgen.cpp
  • LoadLocalizedResourceDLLUsingPath() : guidgen.cpp
  • LPABSTIME : penwin.h
  • LPALC : penwin.h
  • LPANIMATEINFO : penwin.h
  • LPBOXEDITINFO : penwin.h
  • LPBOXLAYOUT : penwin.h
  • LPBOXRESULTS : penwin.h
  • LPCALBSTRUCT : penwin.h
  • LPCOLUMNSTRUCT : idataobj.h , util.h
  • LPCRECTL : penwin.h
  • LPCTLINITBEDIT : penwin.h
  • LPCTLINITHEDIT : penwin.h
  • LPCTLINITIEDIT : penwin.h
  • LPDF : penwin.h
  • LPDFNULL : penwin.h
  • LPFNRAWHOOK : penwin.h
  • LPFORMATIDOFFSET : propset.h
  • LPFUNCRESULTS : penwin.h
  • LPGUIDE : penwin.h
  • LPHINKSET : penwin.h
  • LPHPENDATA : penwin.h
  • LPHRC : penwin.h
  • LPHRCRESULT : penwin.h
  • LPHWL : penwin.h
  • LPIMECOLORS : penwin.h
  • LPINKINGINFO : penwin.h
  • LPINPPARAMS : penwin.h
  • LPINTERVAL : penwin.h
  • LPITEMDATA : idataobj.cpp
  • LPOEM : penwin.h
  • LPOEM_PENPACKET : penwin.h
  • LPOEMPENINFO : penwin.h
  • LPPCMINFO : penwin.h
  • LPPDEVENT : penwin.h
  • LPPENDATA : penwin.h
  • LPPENDATAHEADER : penwin.h
  • LPPENINFO : penwin.h
  • LPPENPACKET : penwin.h
  • LPPENTIP : penwin.h
  • LPPROPERTYIDOFFSET : propset.h
  • LPPROPHEADER : propset.h
  • LPRC : penwin.h
  • LPRCRESULT : penwin.h
  • LPRECTL : penwin.h
  • LPRECTOFS : penwin.h
  • LPSECTIONHEADER : propset.h
  • LPSTRKFMT : penwin.h
  • LPSTROKEINFO : penwin.h
  • LPSYC : penwin.h
  • LPSYE : penwin.h
  • LPSYG : penwin.h
  • LPSYV : penwin.h
  • lpszDefaultCaption : RibbonTableButton.cpp
  • lpszDisplay : SplitButtonCtrlPage.cpp , NetAddressCtrlPage.cpp , PagerCtrlPage.cpp
  • LPTARGET : penwin.h
  • LPTARGINFO : penwin.h
  • LPVOID : penwin.h
  • LRET_ABORT : penwin.h
  • LRET_DONE : penwin.h
  • LRET_HPENDATA : penwin.h
  • LRET_HRC : penwin.h
  • LRET_PRIVATE : penwin.h
  • lst1 : resource.h
  • lst10 : resource.h
  • lst11 : resource.h
  • lst12 : resource.h
  • lst13 : resource.h
  • lst14 : resource.h
  • lst15 : resource.h
  • lst16 : resource.h
  • lst2 : resource.h
  • lst3 : resource.h
  • lst4 : resource.h
  • lst5 : resource.h
  • lst6 : resource.h
  • lst7 : resource.h
  • lst8 : resource.h
  • lst9 : resource.h
  • LSTITEMSPACING : xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- m -

  • MACROCOMBOBOX_MRUSIZE : MacroCB.Cpp
  • main() : regsvr.cpp
  • MAKE_RANGE_ENTRY : util.cpp
  • MAKE_SCODE_ENTRY : util.cpp
  • MakeAbsTime : penwin.h
  • MAP_LOGHIM_TO_PIX : xlistctl.cpp
  • MapLine() : makehm.cpp
  • MapNameValue() : makehm.cpp
  • MARGIN_PIXELS : TCItem.H
  • MAX_CLASS_NAME : MailBar.cpp
  • MAX_COLORLEN : dmdoc.h
  • MAX_COLOURS : formatba.cpp
  • MAX_DIGITS : mutexdlg.cpp
  • MAX_KEYLEN : regview.cpp
  • MAX_LEVEL : svrdoc.h
  • MAX_NAMES : tlbodl.cpp , tlbtree.cpp , tree.cpp
  • MAX_POSITIONS : spinctl.cpp
  • MAX_STRING : regsvr.cpp
  • MAX_TIP_TEXT_LENGTH : Page1.cpp
  • MAX_VALLEN : regview.cpp
  • MAXDICTIONARIES : penwin.h
  • MAXHOTSPOT : penwin.h
  • MAXOEMDATAWORDS : penwin.h
  • MAXTEXTLEN : xlistctl.cpp
  • MCBN_RETURN : MacroCB.H
  • MetricScalePenData() : penwin.h
  • MGetModuleUsage : oleview.h
  • MM_SPIRO : StdAfx.h
  • move : drawtool.cpp
  • MOVE_TO : spiroDoc.h
  • MpAlcB : penwin.h
  • MpIbf : penwin.h
  • MULTIFILEOPENORD : resource.h
  • MyGetClipboardFormatName() : idataobj.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- n -

  • N_BUTTONS : bbutton.cpp
  • nBorderMarginX : RibbonListButton.cpp
  • nBorderMarginY : RibbonListButton.cpp
  • nBorderSize : OutputBar.cpp , WorkspaceBar.cpp , WorkspaceBar2.cpp , WorkspaceBar.cpp , CalendarBar.cpp
  • nCheckMargin : RibbonListButton.cpp
  • nColors : custmenu.cpp
  • nColumns : Page5.cpp
  • nDragHandle : drawtool.cpp
  • NEnumFontNameProc() : MainFrm.cpp
  • netSelect : drawtool.cpp
  • new : dmdoc.cpp , propset.cpp
  • nHorzMargin : FolderListPopupWnd.cpp , PreviewPane.cpp , LineStyleMenuItem.cpp , ToolsPalette.cpp
  • nIconMargin : CustomProperties.cpp
  • nImageMargin : RibbonListButton.cpp
  • nInfoHeight : ToolsPalette.cpp
  • none : drawtool.cpp
  • NOTIFCOUNT : notifwdw.h
  • notifDescrip : notifwdw.h
  • NPERROR_INVALID_LINENUM : resource.h
  • NPERROR_NUM_TOO_BIG : resource.h
  • NPRECTL : penwin.h
  • nRows : Page5.cpp
  • nStatusAnimation : MainFrm.h
  • nStatusIcon : MainFrm.cpp , MainFrm.h
  • nStatusInfo : MainFrm.cpp , MainFrm.h
  • nStatusLabel : MainFrm.h
  • nStatusProgress : MainFrm.cpp , MainFrm.h
  • nStyle : SplitButtonCtrlPage.cpp
  • nTextOffsetX : RibbonListButton.cpp
  • nTextOffsetY : RibbonListButton.cpp
  • NUM_COLOURS : Page2.cpp
  • NUM_COLUMNS : rlistvw.cpp
  • NUM_DOC_TYPES : doctype.h
  • NUM_EDIT : spintest.cpp
  • NUM_INVOKEKINDS : VarUtils.Cpp
  • NUM_ITEMS : rlistvw.cpp
  • NUM_PEN_ITEMS : ipframe.cpp , mainfrm.cpp
  • NUM_PEN_TOGGLE : mainfrm.cpp , ipframe.cpp
  • NUM_QAAMBIENTS : TCItem.Cpp
  • NUM_REG_ARGS : wordpad.cpp
  • NUM_TEXTCOLOR : dmdoc.h
  • NUM_VARTYPES : VarUtils.H
  • NUMVIEWS : MainFrm.h
  • nVertMargin : PreviewPane.cpp , ToolsPalette.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- o -

  • OBM_HANBTNDISABLED : penwin.h
  • OBM_HANBTNDOWN : penwin.h
  • OBM_HANBTNUP : penwin.h
  • OBM_KKCBTNDISABLED : penwin.h
  • OBM_KKCBTNDOWN : penwin.h
  • OBM_KKCBTNUP : penwin.h
  • OBM_PTYBTNDISABLED : penwin.h
  • OBM_PTYBTNDOWN : penwin.h
  • OBM_PTYBTNUP : penwin.h
  • OBM_SIPBTNDISABLED : penwin.h
  • OBM_SIPBTNDOWN : penwin.h
  • OBM_SIPBTNUP : penwin.h
  • OBM_SKBBTNDISABLED : penwin.h
  • OBM_SKBBTNDOWN : penwin.h
  • OBM_SKBBTNUP : penwin.h
  • OBM_ZENBTNDISABLED : penwin.h
  • OBM_ZENBTNDOWN : penwin.h
  • OBM_ZENBTNUP : penwin.h
  • OEM_PENPACKET : penwin.h
  • OEMPENINFO : penwin.h
  • OFFSET_FIRST : listvwex.cpp
  • OFFSET_OTHER : listvwex.cpp
  • OffsetPenData() : penwin.h
  • OFN_EXPLORER : wordpdoc.cpp
  • ON_COMMAND() : multipad.cpp
  • ON_LBN_DBLCLK() : custlist.cpp
  • ON_MESSAGE() : ThelpCtl.cpp
  • ON_WM_VSCROLL() : paredit.cpp
  • oneto8 : cubeview.cpp
  • OpAdd : calcdlg.h
  • OpDivide : calcdlg.h
  • Operator : calcdlg.h
  • operator&() : MMXWrapper.h , SSE2Wrapper.h
  • operator+() : MMXWrapper.h , SSE2Wrapper.h
  • operator-() : SSE2Wrapper.h , MMXWrapper.h
  • operator<<() : MethInfo.H , SSE2Wrapper.h , MMXWrapper.h
  • operator>>() : MMXWrapper.h , SSE2Wrapper.h
  • OpMultiply : calcdlg.h
  • OpNone : calcdlg.h
  • OpSubtract : calcdlg.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- a -

  • ABS : bounce.cpp , Surface.h , BncVw.cpp
  • ABSTIME : penwin.h
  • AddBackslash() : util.cpp , util.h
  • AddInksetInterval() : penwin.h
  • AddPath() : makehm.cpp
  • AddPenDataHRC() : penwin.h
  • AddPenInputHRC() : penwin.h
  • AddPointsPenData() : penwin.h
  • AddToMap() : makehm.cpp
  • AddWordsHWL() : penwin.h
  • AFX_DATA : testdll2.h , testdll1.h
  • AFX_IDP_PARSE_INT : resource.h
  • AFX_IDP_PARSE_INT_RANGE : resource.h
  • AFX_IDP_PARSE_REAL : resource.h
  • AFX_IDP_PARSE_REAL_RANGE : resource.h
  • AFX_IDP_PARSE_STRING_SIZE : resource.h
  • AFX_IDS_IDLEMESSAGE : resource.h
  • AFX_IDS_MDICHILD : resource.h
  • AFX_IDS_SCCLOSE : resource.h
  • AFX_IDS_SCMAXIMIZE : resource.h
  • AFX_IDS_SCMINIMIZE : resource.h
  • AFX_IDS_SCMOVE : resource.h
  • AFX_IDS_SCNEXTWINDOW : resource.h
  • AFX_IDS_SCPREVWINDOW : resource.h
  • AFX_IDS_SCRESTORE : resource.h
  • AFX_IDS_SCSIZE : resource.h
  • AFX_IDS_SCTASKLIST : resource.h
  • AfxFullPath() : wordpad.cpp , wordpdoc.cpp , wordpad.cpp , wordpdoc.cpp
  • AfxGetFileTitle() : wordpdoc.cpp
  • AfxTransferFileContent() : bmpprop.cpp
  • AI_CBSTROKE : penwin.h
  • AI_SKIPUPSTROKES : penwin.h
  • ALC : penwin.h
  • ALC_ALL : penwin.h
  • ALC_ALPHA : penwin.h
  • ALC_ALPHANUMERIC : penwin.h
  • ALC_ASCII : penwin.h
  • ALC_DBCS : penwin.h
  • ALC_DEFAULT : penwin.h
  • ALC_GESTURE : penwin.h
  • ALC_GLOBALPRIORITY : penwin.h
  • ALC_HIRAGANA : penwin.h
  • ALC_JIS1 : penwin.h
  • ALC_KANJI : penwin.h
  • ALC_KANJIALL : penwin.h
  • ALC_KANJISYSMINIMUM : penwin.h
  • ALC_KATAKANA : penwin.h
  • ALC_LCALPHA : penwin.h
  • ALC_MATH : penwin.h
  • ALC_MONETARY : penwin.h
  • ALC_NONPRINT : penwin.h
  • ALC_NOPRIORITY : penwin.h
  • ALC_NUMERIC : penwin.h
  • ALC_OEM : penwin.h
  • ALC_OTHER : penwin.h
  • ALC_PUNC : penwin.h
  • ALC_RESERVED : penwin.h
  • ALC_SYSMINIMUM : penwin.h
  • ALC_UCALPHA : penwin.h
  • ALC_USEBITMAP : penwin.h
  • ALC_WHITE : penwin.h
  • aMap : makehm.cpp
  • ANIMATEINFO : penwin.h
  • ANIMATEPROC : penwin.h
  • AQUA : Scheduler.h
  • AtomicVirtualEvent() : penwin.h
  • AutoSetColumnWidth() : PBagDg.Cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- b -

  • BEGIN_DUAL_INTERFACE_PART : mfcdual.h
  • BeginEnumStrokes() : penwin.h
  • BEI_FACESIZE : penwin.h
  • BEIF_BOXCROSS : penwin.h
  • BESC_DEFAULT : penwin.h
  • BESC_KANJIFIXED : penwin.h
  • BESC_ROMANFIXED : penwin.h
  • BESC_USERDEFINED : penwin.h
  • BITPENUP : penwin.h
  • BLACK : Scheduler.h
  • black : shapeobj.h
  • BLUE : Scheduler.h
  • blue : shapeobj.h
  • bmColorTranslate() : util.cpp , util.h
  • bmColorTranslateDC() : util.cpp , util.h
  • BMH : formatba.cpp
  • BMINDEX : oleview.h
  • bmLoadAndTranslate() : util.cpp , util.h
  • BMW : formatba.cpp
  • BOOL() : penwin.h
  • BoundingRectFromPoints() : penwin.h
  • BOXEDITINFO : penwin.h
  • BOXLAYOUT : penwin.h
  • BOXRESULTS : penwin.h
  • BROWN : Scheduler.h
  • BUFF_LEN : AddressCombo.cpp
  • BUFFSIZE : multconv.cpp
  • BUTTON_CLASS : MailBar.cpp
  • BXD_BASEHEIGHT : penwin.h
  • BXD_BASEHORZ : penwin.h
  • BXD_CELLHEIGHT : penwin.h
  • BXD_CELLWIDTH : penwin.h
  • BXD_CUSPHEIGHT : penwin.h
  • BXD_ENDCUSPHEIGHT : penwin.h
  • BXD_MIDFROMBASE : penwin.h
  • BXDK_BASEHEIGHT : penwin.h
  • BXDK_BASEHORZ : penwin.h
  • BXDK_CELLHEIGHT : penwin.h
  • BXDK_CELLWIDTH : penwin.h
  • BXDK_CUSPHEIGHT : penwin.h
  • BXDK_ENDCUSPHEIGHT : penwin.h
  • BXDK_MIDFROMBASE : penwin.h
  • BXS_BOXCROSS : penwin.h
  • BXS_MASK : penwin.h
  • BXS_NONE : penwin.h
  • BXS_RECT : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- c -

  • CALBSTRUCT : penwin.h
  • CalcError : calcdlg.h
  • CaptureScreen() : ScreenCapApi.h , Exports.cpp
  • CATCH_ALL_DUAL : mfcdual.h
  • cbDictPathMax : penwin.h
  • cbRcLanguageMax : penwin.h
  • cbRcrgbfAlcMax : penwin.h
  • cbRcUserMax : penwin.h
  • CBS_DISABLED : MSMVisualManager.cpp
  • CBS_HOT : MSMVisualManager.cpp
  • CBS_NORMAL : MSMVisualManager.cpp
  • CBS_PUSHED : MSMVisualManager.cpp
  • CCHOUTPUTMAX : idataobj.h
  • CDialog : TrayMenuDlg.h
  • CdlgHook() : HTMLEdView.cpp
  • CDrawObjList : drawobj.h
  • CELEMS : CmnCtrl1.h
  • CELLS_X : RibbonTableButton.cpp
  • CELLS_Y : RibbonTableButton.cpp
  • cfEmbeddedObject : wordpad.cpp , wordpvw.cpp , wordpad.cpp , wordpvw.cpp
  • CFrameWnd : MainFrm.h
  • cfRTF : srvritem.cpp , wordpad.cpp , srvritem.cpp , wordpad.cpp
  • cfRTO : wordpad.cpp , wordpvw.cpp , wordpad.cpp , wordpvw.cpp
  • CG_ID_VIEW_FONTDLGBAR : resource.h
  • CG_IDD_FONTDLGBAR : resource.h
  • CHANGE_COLOR : spiroDoc.h
  • CharacterToSymbol() : penwin.h
  • ChSyvToAnsi : penwin.h
  • chx1 : resource.h
  • chx10 : resource.h
  • chx11 : resource.h
  • chx12 : resource.h
  • chx13 : resource.h
  • chx14 : resource.h
  • chx15 : resource.h
  • chx16 : resource.h
  • chx2 : resource.h
  • chx3 : resource.h
  • chx4 : resource.h
  • chx5 : resource.h
  • chx6 : resource.h
  • chx7 : resource.h
  • chx8 : resource.h
  • chx9 : resource.h
  • CIB_NOACTIONHANDLE : penwin.h
  • CIB_NOFLASHCURSOR : penwin.h
  • CIB_NOGDMSG : penwin.h
  • CIH_NOACTIONHANDLE : penwin.h
  • CIH_NOEDITTEXT : penwin.h
  • CIH_NOFLASHCURSOR : penwin.h
  • CIH_NOGDMSG : penwin.h
  • CL : penwin.h
  • CL_MAXIMUM : penwin.h
  • CL_MINIMUM : penwin.h
  • CL_NULL : penwin.h
  • CLeaderArray : Swarm.h
  • CLINESMAX : idataobj.h
  • CLlamaArray : Swarm.h
  • CloseRecognizer() : penwin.h
  • clrFillDark : MSNVisualManager.cpp
  • clrFillLight : MSNVisualManager.cpp
  • CLSID_TCExtPage : TCExtPg.H
  • CMapDWordToMyStruct : colledoc.h
  • CMapStringToMyObject : colledoc.h
  • CMapVariantToVariant : inproc.h
  • cmb1 : resource.h
  • cmb10 : resource.h
  • cmb11 : resource.h
  • cmb12 : resource.h
  • cmb13 : resource.h
  • cmb14 : resource.h
  • cmb15 : resource.h
  • cmb16 : resource.h
  • cmb2 : resource.h
  • cmb3 : resource.h
  • cmb4 : resource.h
  • cmb5 : resource.h
  • cmb6 : resource.h
  • cmb7 : resource.h
  • cmb8 : resource.h
  • cmb9 : resource.h
  • CMDIChildWnd : ChildFrm.h
  • CMDIFrameWnd : MainFrm.h
  • CMMX : MMXSurface16.cpp , MMXSurface24.cpp , MMXSurface32.cpp
  • CMPD_COMPRESS : penwin.h
  • CMPD_DECOMPRESS : penwin.h
  • CMyObjectArray : colledoc.h
  • CMyStructList : colledoc.h
  • color : PagerCtrlPage.cpp
  • COLOR_BOX_HEIGHT : custmenu.cpp
  • COLOR_BOX_WIDTH : custmenu.cpp
  • COLOR_ITEM_HEIGHT : custlist.cpp
  • colorArray : mdi.h , mdi.cpp , mdi.h , mdi.cpp , mdi.h
  • COLORBASE : HTMLEdView.h
  • COLUMNSTRUCT : idataobj.h , util.h
  • ColumnTextOut() : idataobj.cpp , util.cpp , util.h , idataobj.h
  • COMBO_HEIGHT : np.h
  • COMBO_WIDTH : np.h
  • COMBOBOX_BITMAP : editbar.cpp
  • COMBOBOX_HEIGHT : editbar.cpp
  • COMBOBOX_INDEX : editbar.cpp
  • COMBOBOX_WIDTH : editbar.cpp
  • CompactPenData() : penwin.h
  • CompareLong() : spiroView.cpp
  • CompressPenData() : penwin.h
  • ConfigHREC() : penwin.h
  • ConfigRecognizer() : penwin.h
  • ConfigureCapture() : Exports.cpp , ScreenCapApi.h
  • CONVERTERS : stdafx.h
  • CopyHandle() : dibapi.cpp , dibapi.h
  • CopyPalette() : palctl.cpp
  • CorrectWriting() : penwin.h
  • CountPrefixedStringT : propset.cpp
  • cPassword : CustomProperties.cpp
  • CPD_DEFAULT : penwin.h
  • CPD_TIME : penwin.h
  • CPD_USERBYTE : penwin.h
  • CPD_USERDWORD : penwin.h
  • CPD_USERWORD : penwin.h
  • CPDR_BOX : penwin.h
  • CPDR_LASSO : penwin.h
  • CPropertyBagItemList : PropBag.H
  • CreateCompatibleHRC() : penwin.h
  • CreateDIBPalette() : dibapi.cpp , dibapi.h
  • CreateEditBar() : MainFrm.cpp
  • CreateHWL() : penwin.h
  • CreateInkset() : penwin.h
  • CreateInksetHRCRESULT() : penwin.h
  • CreateMemoryStream() : tlbodl.cpp
  • CreatePenData() : penwin.h
  • CreatePenDataEx() : penwin.h
  • CreatePenDataHRC() : penwin.h
  • CreatePenDataRegion() : penwin.h
  • CRUC_NOTIFY : penwin.h
  • CRUC_REMOVE : penwin.h
  • CSSE2 : SSE2Surface32.cpp , SSE2Surface24.cpp , SSE2Surface16.cpp
  • ctlFirst : resource.h
  • CTLINIT_BEDIT : penwin.h
  • CTLINIT_HEDIT : penwin.h
  • CTLINIT_IEDIT : penwin.h
  • CTLINIT_MAX : penwin.h
  • CTLINITBEDIT : penwin.h
  • CTLINITHEDIT : penwin.h
  • CTLINITIEDIT : penwin.h
  • ctlLast : resource.h
  • CWR_BOXES : penwin.h
  • CWR_HEDIT : penwin.h
  • CWR_INSERT : penwin.h
  • CWR_KEYBOARD : penwin.h
  • CWR_KKCONVERT : penwin.h
  • CWR_REPLACECR : penwin.h
  • CWR_REPLACETAB : penwin.h
  • CWR_SIMPLE : penwin.h
  • CWR_SINGLELINEEDIT : penwin.h
  • CWR_STRIPCR : penwin.h
  • CWR_STRIPLF : penwin.h
  • CWR_STRIPTAB : penwin.h
  • CWR_TITLE : penwin.h
  • cwRcReservedMax : penwin.h
  • CWRK_BASIC : penwin.h
  • CWRK_DEFAULT : penwin.h
  • CWRK_FULL : penwin.h
  • CWRK_NUMPAD : penwin.h
  • CWRK_TELPAD : penwin.h
  • CX_BACKDENT : svritem.h
  • CX_INDENT : svritem.h
  • CX_INSET : svritem.cpp
  • CX_MARGIN : svritem.h
  • CX_SHADOW : splash.cpp , aboutbox.cpp
  • CY_INSET : svritem.cpp
  • CY_MARGIN : svritem.h
  • CY_SEPARATOR : svritem.h
  • CY_SHADOW : splash.cpp , aboutbox.cpp , splash.cpp
  • CYCLE_ERROR : StdAfx.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- d -

  • DBStrCpy() : idataobj.cpp
  • DDV_MinMaxTwips() : ddxm.cpp , ddxm.h
  • DDX_Twips() : ddxm.cpp , ddxm.h , ddxm.cpp , ddxm.h
  • DDXM_BLANK : ddxm.h
  • DECLARE_DOCTYPE : doctype.h
  • DECLARE_DOCTYPE_NULL : doctype.h
  • DECLARE_DOCTYPE_SYN : doctype.h
  • DECLARE_DUAL_ERRORINFO : mfcdual.h
  • DECLARE_HANDLE() : dibapi.h , penwin.h
  • DECLARE_HANDLE32 : penwin.h
  • DECLARE_INTERFACE_() : iviewers.h
  • DEFAULT_INTERVAL : timectl.h
  • DEFINE_GUID() : summinfo.h , iviewers.h , summinfo.h
  • DefPenWindowProc() : penwin.h
  • DELEGATE_DUAL_INTERFACE : mfcdual.h
  • DELETE_EXCEPTION : HTMLEdDoc.h
  • DestroyHRC() : penwin.h
  • DestroyHRCRESULT() : penwin.h
  • DestroyHWL() : penwin.h
  • DestroyInkset() : penwin.h
  • DestroyPenData() : penwin.h
  • DEVICE_FONT : formatba.cpp
  • DIB_HEADER_MARKER : myfile.cpp
  • DIBHeight() : dibapi.cpp , dibapi.h
  • DIBNumColors() : dibapi.cpp , dibapi.h
  • DIBWidth() : dibapi.cpp , dibapi.h
  • DictionarySearch() : penwin.h
  • DIRQ_ADD : penwin.h
  • DIRQ_CLEANUP : penwin.h
  • DIRQ_CLOSE : penwin.h
  • DIRQ_CONFIGURE : penwin.h
  • DIRQ_COPYRIGHT : penwin.h
  • DIRQ_DELETE : penwin.h
  • DIRQ_DESCRIPTION : penwin.h
  • DIRQ_FLUSH : penwin.h
  • DIRQ_INIT : penwin.h
  • DIRQ_OPEN : penwin.h
  • DIRQ_QUERY : penwin.h
  • DIRQ_RCCHANGE : penwin.h
  • DIRQ_SETWORDLISTS : penwin.h
  • DIRQ_STRING : penwin.h
  • DIRQ_SUGGEST : penwin.h
  • DIRQ_SYMBOLGRAPH : penwin.h
  • DIRQ_USER : penwin.h
  • DISPID_DAY : SchedulerDlg.h
  • DISPID_EXT_ACTIVATE : ExtCtl.H
  • DISPID_EXT_DEACTIVATE : ExtCtl.H
  • DISPID_EXT_NAME : ExtCtl.H
  • DISPID_EXT_POSITIONX : ExtCtl.H
  • DISPID_EXT_POSITIONY : ExtCtl.H
  • DISPID_EXT_UIACTIVATE : ExtCtl.H
  • DISPID_EXT_UIDEACTIVATE : ExtCtl.H
  • DISPID_MONTH : SchedulerDlg.h
  • DISPID_YEAR : SchedulerDlg.h
  • DisplayMessage() : regsvr.cpp
  • DlgCenter() : idataobj.cpp , idataobj.h , util.cpp , util.h
  • dlgPageSetup : superpad.cpp , superpad.h
  • DllCanUnloadNow() : TCProps.cpp , DrawClientHandlers.cpp
  • DllGetClassObject() : TCProps.cpp , DrawClientHandlers.cpp
  • DllInstall() : DrawClientHandlers.cpp
  • DllMain() : testdll1.cpp , testdll2.cpp , TCProps.cpp
  • DllRegisterInterfaceViewer() : iviewers.cpp , iviewers.h
  • DllRegisterServer() : testhelp.cpp , localize.cpp , button.cpp , circ.cpp , image.cpp , licensed.cpp , pal.cpp , push.cpp , spindial.cpp , time.cpp , xlist.cpp , DrawClientHandlers.cpp
  • DllUnregisterServer() : testhelp.cpp , button.cpp , circ.cpp , image.cpp , licensed.cpp , localize.cpp , pal.cpp , push.cpp , spindial.cpp , time.cpp , xlist.cpp , DrawClientHandlers.cpp
  • DOCTYPE_DESC : doctype.h
  • DOCTYPE_DOCTYPE : doctype.h
  • DOCTYPE_EXT : doctype.h
  • DOCTYPE_PROGID : doctype.h
  • doctypes : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • DoDefaultPenInput() : penwin.h
  • DPD_DRAWSEL : penwin.h
  • DPD_HDCPEN : penwin.h
  • DPtoTP() : penwin.h
  • DRAW3D_BOTTOMLINE : shadow.h
  • DRAW3D_CREASE : shadow.h
  • DRAW3D_IN : shadow.h
  • DRAW3D_LEFTLINE : shadow.h
  • DRAW3D_OUT : shadow.h
  • DRAW3D_RIGHTLINE : shadow.h
  • DRAW3D_TOPLINE : shadow.h
  • Draw3DLine1() : shadow.cpp
  • DrawFrame() : shadow.cpp
  • DrawListBoxBitmap() : util.cpp , util.h
  • DrawPenData() : penwin.h
  • DrawPenDataEx() : penwin.h
  • DrawPenDataFmt : penwin.h
  • DrawShape : drawtool.h
  • DRV_BADPARAM1 : penwin.h
  • DRV_BADPARAM2 : penwin.h
  • DRV_BADSTRUCT : penwin.h
  • DRV_Calibrate : penwin.h
  • DRV_FAILURE : penwin.h
  • DRV_GetCalibration : penwin.h
  • DRV_GetName : penwin.h
  • DRV_GetPenInfo : penwin.h
  • DRV_GetPenSamplingRate : penwin.h
  • DRV_GetVersion : penwin.h
  • DRV_PenPlayBack : penwin.h
  • DRV_PenPlayStart : penwin.h
  • DRV_PenPlayStop : penwin.h
  • DRV_Query : penwin.h
  • DRV_RemoveEntryPoints : penwin.h
  • DRV_RemovePenDriverEntryPoints : penwin.h
  • DRV_Reserved1 : penwin.h
  • DRV_Reserved2 : penwin.h
  • DRV_SetCalibration : penwin.h
  • DRV_SetEntryPoints : penwin.h
  • DRV_SetPenDriverEntryPoints : penwin.h
  • DRV_SetPenSamplingDist : penwin.h
  • DRV_SetPenSamplingRate : penwin.h
  • DRV_SUCCESS : penwin.h
  • DS_3DLOOK : buttondi.cpp
  • DS_CONTEXTHELP : buttondi.cpp
  • DSPDxax : util.cpp
  • DUAL_ERRORINFO_PART : mfcdual.h
  • DualHandleException() : mfcdual.h , mfcdual.cpp
  • DuplicatePenData() : penwin.h
  • dwDiffAT : penwin.h
  • dwDurInterval : penwin.h
  • dwNetString : NetAddressCtrlPage.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- e -

  • edt1 : resource.h
  • edt10 : resource.h
  • edt11 : resource.h
  • edt12 : resource.h
  • edt13 : resource.h
  • edt14 : resource.h
  • edt15 : resource.h
  • edt16 : resource.h
  • edt2 : resource.h
  • edt3 : resource.h
  • edt4 : resource.h
  • edt5 : resource.h
  • edt6 : resource.h
  • edt7 : resource.h
  • edt8 : resource.h
  • edt9 : resource.h
  • elementsof : StdAfx.h
  • ellipse : shapeobj.h , drawtool.h
  • EMPTY_COMMAND : spiroDoc.h
  • EmulatePen() : penwin.h
  • EnableGestureSetHRC() : penwin.h
  • EnableSystemDictionaryHRC() : penwin.h
  • END_DUAL_INTERFACE_PART : mfcdual.h
  • EndEnumStrokes() : penwin.h
  • EndPenCollection() : penwin.h
  • EndPenInputHRC() : penwin.h
  • ENUM_MAXIMUM : penwin.h
  • ENUM_MINIMUM : penwin.h
  • ENUMPROC : penwin.h
  • EnumSymbols() : penwin.h
  • EnumWindowsProc() : Wndlist.cpp
  • EPDP_REMOVE : penwin.h
  • EPDS_EQ : penwin.h
  • EPDS_GT : penwin.h
  • EPDS_GTE : penwin.h
  • EPDS_INKSET : penwin.h
  • EPDS_LT : penwin.h
  • EPDS_LTE : penwin.h
  • EPDS_NE : penwin.h
  • EPDS_NOT : penwin.h
  • EPDS_PENTIP : penwin.h
  • EPDS_REMOVE : penwin.h
  • EPDS_SELECT : penwin.h
  • EPDS_STROKEINDEX : penwin.h
  • EPDS_TIPCOLOR : penwin.h
  • EPDS_TIPNIB : penwin.h
  • EPDS_TIPWIDTH : penwin.h
  • EPDS_USER : penwin.h
  • ErrDivideByZero : calcdlg.h
  • ErrNone : calcdlg.h
  • ErrorMessage() : util.h , util.cpp
  • ErrorReport() : OutputBar.cpp
  • ETOFLAGS : idataobj.cpp , util.cpp
  • EventRefFromWpLp : penwin.h
  • ExecuteGesture() : penwin.h
  • ExtractPenDataPoints() : penwin.h
  • ExtractPenDataStrokes() : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- f -

  • FAbsTimeInInterval : penwin.h
  • FAIL_ARGS : regsvr.cpp
  • FAIL_ENTRY : regsvr.cpp
  • FAIL_LOAD : regsvr.cpp
  • FAIL_OLE : regsvr.cpp
  • FAIL_REG : regsvr.cpp
  • FEQAbsTime : penwin.h
  • FileExists() : makehm.cpp
  • FILEOPENORD : resource.h
  • FilterDllMsg() : Exports.cpp , ScreenCapApi.h
  • FindDIBBits() : dibapi.cpp , dibapi.h
  • FINDDLGORD : resource.h
  • FindIncludeFile() : makehm.cpp
  • FindInMap() : makehm.cpp
  • FIntervalInInterval : penwin.h
  • FIntervalXInterval : penwin.h
  • FIRST_FAVORITE_COMMAND : FavoritesManager.h
  • FIRST_HISTORY_COMMAND : IEDemoDoc.h , MSMoneyDemoDoc.h
  • FirstSymbolFromGraph() : penwin.h
  • FIsAnsi : penwin.h
  • FIsAnsiGesture : penwin.h
  • FIsGesture : penwin.h
  • FIsKanji : penwin.h
  • FIsSelectGesture : penwin.h
  • FIsShape : penwin.h
  • FIsSpecial : penwin.h
  • FIsStdGesture : penwin.h
  • FIsUniCode : penwin.h
  • FIsVKey : penwin.h
  • FLTAbsTime : penwin.h
  • FLTEAbsTime : penwin.h
  • FN_GETFORMAT : formatba.h
  • FN_SETFORMAT : formatba.h
  • fnEditSubclass() : idataobj.cpp
  • fnEnumReallyEx() : util.cpp
  • fnIDataObjectDlg() : idataobj.cpp , idataobj.h
  • FONTDLGORD : resource.h
  • ForeignToRtf32() : mswd6_32.h
  • FORMATBASE : HTMLEdView.h
  • FORMATDLGORD30 : resource.h
  • FORMATDLGORD31 : resource.h
  • FORMATIDOFFSET : propset.h
  • FormatString2() : regsvr.cpp
  • FPenUpX : penwin.h
  • frm1 : resource.h
  • frm2 : resource.h
  • frm3 : resource.h
  • frm4 : resource.h
  • fSystemDC : xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- g -

  • g_pView : piece.cpp , spiroDoc.cpp , spiroView.cpp
  • GetAlphabetHRC() : penwin.h
  • GetAlphabetPriorityHRC() : penwin.h
  • GetAlternateWordsHRCRESULT() : penwin.h
  • GetApp : spiro.h
  • GetApplicationView() : mainfrm.h
  • GetBoxMappingHRCRESULT() : penwin.h
  • GetBoxResultsHRC() : penwin.h
  • GETCLASSBRBACKGROUND : oleview.h
  • GetClassServerPath() : InsCtlDg.Cpp
  • GETCLASSUINT : oleview.h
  • GetDocTypeFromName() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetExtFromType() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetFileTypes() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetFontHeight() : xlistctl.cpp
  • GetGlobalRC() : penwin.h
  • GetGuideHRC() : penwin.h
  • GetHotspotsHRCRESULT() : penwin.h
  • GetHRECFromHRC() : penwin.h
  • GetIconFromReg() : regview.cpp
  • GetIndexFromType() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetInksetInterval() : penwin.h
  • GetInksetIntervalCount() : penwin.h
  • GetInternationalHRC() : penwin.h
  • GetMaxResultsHRC() : penwin.h
  • GetPenAppFlags() : penwin.h
  • GetPenAsyncState() : penwin.h
  • GetPenDataAttributes() : penwin.h
  • GetPenDataInfo() : penwin.h
  • GetPenDataStroke() : penwin.h
  • GetPenHwData() : penwin.h
  • GetPenHwEventData() : penwin.h
  • GetPenInput() : penwin.h
  • GetPenMiscInfo() : penwin.h
  • GetPictureHeight() : xlistctl.cpp
  • GetPictureWidth() : xlistctl.cpp
  • GetPointsFromPenData() : penwin.h
  • GetProperty() : xlistctl.cpp
  • GetResultsHRC() : penwin.h
  • GetStrokeAttributes() : penwin.h
  • GetStrokeTableAttributes() : penwin.h
  • GetSymbolCount() : penwin.h
  • GetSymbolCountHRCRESULT() : penwin.h
  • GetSymbolMaxLength() : penwin.h
  • GetSymbolsHRCRESULT() : penwin.h
  • GetTextMetricsCorrectly() : util.h , idataobj.cpp , idataobj.h , util.cpp
  • GetTraceLevel() : TCTrace.Cpp , TCTrace.H
  • GetTwipSize() : MSOffice2007DemoView.cpp
  • GetTypeFromIndex() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetVersionPenWin() : penwin.h
  • GetWEventRef : penwin.h
  • GetWordlistCoercionHRC() : penwin.h
  • GetWordlistHRC() : penwin.h
  • GGRC_DICTBUFTOOSMALL : penwin.h
  • GGRC_NA : penwin.h
  • GGRC_OK : penwin.h
  • GGRC_PARAMERROR : penwin.h
  • GPA_MAXLEN : penwin.h
  • GPA_PDTS : penwin.h
  • GPA_POINTS : penwin.h
  • GPA_RATE : penwin.h
  • GPA_RECTBOUND : penwin.h
  • GPA_RECTBOUNDINK : penwin.h
  • GPA_SIZE : penwin.h
  • GPA_STROKES : penwin.h
  • GPA_TIME : penwin.h
  • GPA_USER : penwin.h
  • GPA_VERSION : penwin.h
  • green : shapeobj.h
  • GRH_ALL : penwin.h
  • GRH_GESTURE : penwin.h
  • GRH_NONGESTURE : penwin.h
  • grp1 : resource.h
  • grp2 : resource.h
  • grp3 : resource.h
  • grp4 : resource.h
  • GSA_DOWN : penwin.h
  • GSA_PENTIP : penwin.h
  • GSA_PENTIPCLASS : penwin.h
  • GSA_PENTIPTABLE : penwin.h
  • GSA_RECTBOUND : penwin.h
  • GSA_SELECT : penwin.h
  • GSA_SIZE : penwin.h
  • GSA_SIZETABLE : penwin.h
  • GSA_TIME : penwin.h
  • GSA_USER : penwin.h
  • GSA_USERCLASS : penwin.h
  • GSA_USERTABLE : penwin.h
  • GST_ALL : penwin.h
  • GST_CIRCLE : penwin.h
  • GST_CIRCLELO : penwin.h
  • GST_CIRCLEUP : penwin.h
  • GST_CLIP : penwin.h
  • GST_EDIT : penwin.h
  • GST_KKCONVERT : penwin.h
  • GST_SEL : penwin.h
  • GST_SYS : penwin.h
  • GST_WHITE : penwin.h
  • GUIDE : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- h -

  • HasServer16() : obj_vw.cpp
  • HasServer32() : obj_vw.cpp
  • hDC : xlistctl.cpp
  • HE_CANCELKKCONVERT : penwin.h
  • HE_CHAROFFSET : penwin.h
  • HE_CHARPOSITION : penwin.h
  • HE_DEFAULTFONT : penwin.h
  • HE_ENABLEALTLIST : penwin.h
  • HE_FIXKKCONVERT : penwin.h
  • HE_GETBOXLAYOUT : penwin.h
  • HE_GETIMEDEFAULT : penwin.h
  • HE_GETINFLATE : penwin.h
  • HE_GETINKHANDLE : penwin.h
  • HE_GETKKCONVERT : penwin.h
  • HE_GETKKSTATUS : penwin.h
  • HE_GETLENSTYPE : penwin.h
  • HE_GETRC : penwin.h
  • HE_GETRCRESULT : penwin.h
  • HE_GETRCRESULTCODE : penwin.h
  • HE_GETUNDERLINE : penwin.h
  • HE_HIDEALTLIST : penwin.h
  • HE_KKCONVERT : penwin.h
  • HE_KKNOCONVERT : penwin.h
  • HE_SETBOXLAYOUT : penwin.h
  • HE_SETIMEDEFAULT : penwin.h
  • HE_SETINFLATE : penwin.h
  • HE_SETINKMODE : penwin.h
  • HE_SETLENSTYPE : penwin.h
  • HE_SETRC : penwin.h
  • HE_SETUNDERLINE : penwin.h
  • HE_SHOWALTLIST : penwin.h
  • HE_STOPINKMODE : penwin.h
  • HEADER_HEIGHT : PropSheetDemoDlg.cpp
  • HEAL_DEFAULT : penwin.h
  • HEIGHT : ruler.cpp
  • HEKK_CANDIDATE : penwin.h
  • HEKK_CONVERT : penwin.h
  • HEKK_DBCSCHAR : penwin.h
  • HEKK_DEFAULT : penwin.h
  • HEKK_HIRAGANA : penwin.h
  • HEKK_KATAKANA : penwin.h
  • HEKK_SBCSCHAR : penwin.h
  • HEKKR_CONVERT : penwin.h
  • HEKKR_PRECONVERT : penwin.h
  • HEKKR_TEMPCONFIRM : penwin.h
  • HelloApp : helloapp.cpp
  • HEP_NORECOG : penwin.h
  • HEP_RECOG : penwin.h
  • HEP_WAITFORTAP : penwin.h
  • HIDC_ALLOWWINDOWLESS : popups.h
  • HIDC_ALWAYS : popups.h
  • HIDC_CATEGORIES : popups.h
  • HIDC_CHOOSECOLOR : popups.h
  • HIDC_CHOOSECOLOR_AMBIENT : popups.h
  • HIDC_CHOOSEFONT : popups.h
  • HIDC_CHOOSEFONT_AMBIENT : popups.h
  • HIDC_CLEAROUTPUTWINDOW : popups.h
  • HIDC_CONTROLS : popups.h
  • HIDC_DATE : popups.h
  • HIDC_DATE_AMBIENT : popups.h
  • HIDC_DISPID : popups.h
  • HIDC_DISPID_NEW : popups.h
  • HIDC_ENABLED : popups.h
  • HIDC_EVENTS : popups.h
  • HIDC_EXCEPTIONDESC : popups.h
  • HIDC_EXCEPTIONHELP : popups.h
  • HIDC_EXCEPTIONSOURCE : popups.h
  • HIDC_FILENAME : popups.h
  • HIDC_FILENAME_BROWSE : popups.h
  • HIDC_IADVISESINKEX : popups.h
  • HIDC_IGNOREACTIVATEWHENVISIBLE : popups.h
  • HIDC_IGNOREREQUIREDCATEGORIES : popups.h
  • HIDC_IMPLEMENTEDCATEGORIES : popups.h
  • HIDC_INVOKE : popups.h
  • HIDC_IOLEINPLACESITEEX : popups.h
  • HIDC_IOLEINPLACESITEWINDOWLESS : popups.h
  • HIDC_LOGTODEBUG : popups.h
  • HIDC_LOGTOFILE : popups.h
  • HIDC_LOGTONULL : popups.h
  • HIDC_LOGTOOUTPUT : popups.h
  • HIDC_MACROS : popups.h
  • HIDC_METHODNAME : popups.h
  • HIDC_NEVER : popups.h
  • HIDC_NEWPROPERTY : popups.h
  • HIDC_OBJECTS : popups.h
  • HIDC_OPENFILE : popups.h
  • HIDC_OUTPUT : popups.h
  • HIDC_PARAMS : popups.h
  • HIDC_PARAMTYPE : popups.h
  • HIDC_PARAMVALUE : popups.h
  • HIDC_PARAMVALUECOMBO : popups.h
  • HIDC_PROMPT : popups.h
  • HIDC_PROPERTIES : popups.h
  • HIDC_PROPERTIES_CHANGES : popups.h
  • HIDC_PROPERTIES_EDITREQUESTS : popups.h
  • HIDC_PROPNAME : popups.h
  • HIDC_PROPNAME_NEW : popups.h
  • HIDC_PROPTYPE : popups.h
  • HIDC_PROPVALUE : popups.h
  • HIDC_PROPVALUECOMBO_AMBIENT : popups.h
  • HIDC_REGISTER : popups.h
  • HIDC_REGISTEREDCONTROLS : popups.h
  • HIDC_REQUIREDCATEGORIES : popups.h
  • HIDC_REREGISTER : popups.h
  • HIDC_RETURNVALUE : popups.h
  • HIDC_SBINDHOST : popups.h
  • HIDC_SELECTALL : popups.h
  • HIDC_SELECTALL_EDITREQUESTS : popups.h
  • HIDC_SETVALUE : popups.h
  • HIDC_SETVALUE_AMBIENT : popups.h
  • HIDC_STATIC_PARAMETERVALUE : popups.h
  • HIDC_STATIC_PROPERTYVALUE : popups.h
  • HIDC_TABORDER : popups.h
  • HIDC_TWOPASSDRAWING : popups.h
  • HIDC_UNREGISTER : popups.h
  • HIDC_USEIPOINTERINACTIVE : popups.h
  • HIDC_USEQUICKACTIVATION : popups.h
  • HIMETRIC_PER_INCH : xlistctl.cpp
  • HINT_DELETE_SELECTION : drawvw.h
  • HINT_UPDATE_DRAWOBJ : drawvw.h
  • HINT_UPDATE_ITEM : TCDoc.H , contrdoc.h
  • HINT_UPDATE_OLE_ITEMS : drawvw.h
  • HINT_UPDATE_SELECTION : drawvw.h
  • HINT_UPDATE_WINDOW : contrdoc.h , drawvw.h , TCDoc.H
  • HISTORY_COUNT : np.h
  • HISTORY_LEN : MSMoneyDemoDoc.h , IEDemoDoc.h
  • HIT_NOTHING : piece.h
  • HIT_PEN_LOCATION : piece.h
  • HitTestPenData() : penwin.h
  • HITTYPE_BORDER : TCView.H
  • HITTYPE_NONE : TCView.H
  • HITTYPE_OBJECT : TCView.H
  • HKP : penwin.h
  • HKP_SETHOOK : penwin.h
  • HKP_UNHOOK : penwin.h
  • HN_BEGINDIALOG : penwin.h
  • HN_DELAYEDRECOGFAIL : penwin.h
  • HN_ENDDIALOG : penwin.h
  • HN_ENDKKCONVERT : penwin.h
  • HN_ENDREC : penwin.h
  • HN_RCRESULT : penwin.h
  • HN_RESULT : penwin.h
  • HORZ_TEXTOFFSET : stdafx.h
  • HpcmFromWpLp : penwin.h
  • HRC : penwin.h
  • HRCR_COMPLETE : penwin.h
  • HRCR_CONFLICT : penwin.h
  • HRCR_ERROR : penwin.h
  • HRCR_GESTURE : penwin.h
  • HRCR_HOOKED : penwin.h
  • HRCR_INCOMPLETE : penwin.h
  • HRCR_INVALIDGUIDE : penwin.h
  • HRCR_INVALIDPNDT : penwin.h
  • HRCR_MEMERR : penwin.h
  • HRCR_NORESULTS : penwin.h
  • HRCR_OK : penwin.h
  • HRCR_UNSUPPORTED : penwin.h
  • HRtoString() : util.cpp , util.h , util.cpp
  • HtrgFromHwnd : penwin.h
  • HWL_SYSTEM : penwin.h
  • HwndFromHtrg : penwin.h
  • HWR_APPWIDE : penwin.h
  • HWR_RESULTS : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- i -

  • I_COLUMNENTRY : idataobj.cpp
  • I_COLUMNHEAD : idataobj.cpp
  • I_LABEL : idataobj.cpp
  • I_NORMAL : idataobj.cpp
  • IBUTTON : itemtemp.h
  • ico1 : resource.h
  • ico2 : resource.h
  • ico3 : resource.h
  • ico4 : resource.h
  • ID_ABOUT : resource.h
  • ID_ADD : resource.h
  • ID_ADD_NODE : resource.h
  • ID_ADDRESS_BOOK : resource.h
  • ID_AIRBRUSH : resource.h
  • ID_APP_EXIT : resource.h
  • ID_APP_HELP_MICROSOFT : Resource.h
  • ID_APP_OPEN : resource.h
  • ID_ARRAY : resource.h
  • ID_BACKWARD_1 : Resource.h
  • ID_BACKWARD_2 : Resource.h
  • ID_BLACK : resource.h
  • ID_BLUE : resource.h
  • ID_BOGUS : Resource.h
  • ID_BORDER_1 : resource.h
  • ID_BORDER_10 : resource.h
  • ID_BORDER_11 : resource.h
  • ID_BORDER_12 : resource.h
  • ID_BORDER_13 : resource.h
  • ID_BORDER_2 : resource.h
  • ID_BORDER_3 : resource.h
  • ID_BORDER_4 : resource.h
  • ID_BORDER_5 : resource.h
  • ID_BORDER_6 : resource.h
  • ID_BORDER_7 : resource.h
  • ID_BORDER_8 : resource.h
  • ID_BORDER_9 : resource.h
  • ID_BORDER_TEAROFF : resource.h
  • ID_BORDERS_ALLBORDERS : Resource.h
  • ID_BORDERS_BORDERSANDSHADING : Resource.h
  • ID_BORDERS_BOTTOMBORDER : Resource.h
  • ID_BORDERS_DIAGONALDOWNBORDER : Resource.h
  • ID_BORDERS_DIAGONALUPBORDER : Resource.h
  • ID_BORDERS_HORIZONTALLINE : Resource.h
  • ID_BORDERS_INSIDEBORDERS : Resource.h
  • ID_BORDERS_INSIDEHORIZONTALBORDER : Resource.h
  • ID_BORDERS_INSIDEVERTICALBORDER : Resource.h
  • ID_BORDERS_LEFTBORDER : Resource.h
  • ID_BORDERS_NOBORDER : Resource.h
  • ID_BORDERS_OUTSIDEBORDERS : Resource.h
  • ID_BORDERS_RIGHTBORDER : Resource.h
  • ID_BORDERS_TOPBORDER : Resource.h
  • ID_BORDERS_VIEWGRIDLINES : Resource.h
  • ID_BROWSE_CLASSGRAPH : resource.h
  • ID_BROWSE_FILEOUTLINE : resource.h
  • ID_BROWSE_GOTODEFINITION : resource.h
  • ID_BROWSE_GOTOREFERENCE : resource.h
  • ID_BROWSE_REVERSECLASSGRAPH : resource.h
  • ID_BRUSH : resource.h
  • ID_BUTTON32777 : resource.h
  • ID_BUTTON32778 : resource.h
  • ID_BUTTON32779 : resource.h
  • ID_BUTTON32780 : resource.h
  • ID_BUTTON32781 : resource.h
  • ID_BUTTON32782 : resource.h
  • ID_BUTTON32783 : resource.h
  • ID_BUTTON32784 : resource.h
  • ID_BUTTON32785 : resource.h
  • ID_BUTTON32787 : resource.h
  • ID_BUTTON32788 : resource.h
  • ID_BUTTON32789 : resource.h
  • ID_BUTTON32810 : resource.h
  • ID_BUTTON32811 : resource.h
  • ID_BUTTON40001 : resource.h
  • ID_BUTTON40002 : resource.h
  • ID_BUTTON40003 : resource.h
  • ID_BUTTON40004 : resource.h
  • ID_BUTTON40005 : resource.h
  • ID_BUTTON_ABSOLUTE : resource.h
  • ID_BUTTON_BLOCKFMT : resource.h
  • ID_BUTTON_BOLD : resource.h
  • ID_BUTTON_BULLETLIST : resource.h
  • ID_BUTTON_CENTER : resource.h
  • ID_BUTTON_CENTERJUSTIFY : resource.h
  • ID_BUTTON_COLOR : resource.h
  • ID_BUTTON_FONTNAME : resource.h
  • ID_BUTTON_FONTSIZE : resource.h
  • ID_BUTTON_HYPERLINK : resource.h
  • ID_BUTTON_IMAGE : resource.h
  • ID_BUTTON_INDENT : resource.h
  • ID_BUTTON_ITALIC : resource.h
  • ID_BUTTON_LEFTJUSTIFY : resource.h
  • ID_BUTTON_MIN : bbutton.cpp
  • ID_BUTTON_NUMBERLIST : resource.h
  • ID_BUTTON_OUTDENT : resource.h
  • ID_BUTTON_RIGHTJUSTIFY : resource.h
  • ID_BUTTON_STATIC : resource.h
  • ID_BUTTON_UNDERLINE : resource.h
  • ID_BUTTONSTATIC : resource.h
  • ID_BUTTONSTYLE : resource.h
  • ID_BUTTONSTYLE2 : resource.h
  • ID_CANCEL_EDIT : resource.h
  • ID_CANCEL_EDIT_CNTR : resource.h , Resource.H , resource.h , Resource.h , resource.h
  • ID_CANCEL_EDIT_SRVR : resource.h
  • ID_CANCEL_INPLACE : resource.h
  • ID_CATEGORIE_1 : Resource.h
  • ID_CATEGORIE_2 : Resource.h
  • ID_CATEGORIE_3 : Resource.h
  • ID_CATEGORIE_4 : Resource.h
  • ID_CATEGORIE_5 : Resource.h
  • ID_CATEGORIE_6 : Resource.h
  • ID_CATEGORIE_7 : Resource.h
  • ID_CATEGORIE_8 : Resource.h
  • ID_CCSADJUSTABLE : resource.h
  • ID_CCSBOTTOM : resource.h
  • ID_CCSTOP : resource.h
  • ID_CHANGE_NAME : resource.h
  • ID_CHANGE_OBJECT_PROPS : resource.h
  • ID_CHAR_BOLD : resource.h
  • ID_CHAR_COLOR : resource.h
  • ID_CHAR_ITALIC : resource.h
  • ID_CHAR_UNDERLINE : resource.h
  • ID_CHART_DESIGN_DATA_EDIT : Resource.h
  • ID_CHART_DESIGN_DATA_SHOW : Resource.h
  • ID_CHART_DESIGN_DATA_SWITCH : Resource.h
  • ID_CHART_DESIGN_TYPE_CHANGE : Resource.h
  • ID_CHART_DESIGN_TYPE_SAVETEMPLATE : Resource.h
  • ID_CHART_FORMAT_CURSEL_FORMAT : Resource.h
  • ID_CHART_FORMAT_CURSEL_RESET : Resource.h
  • ID_CHART_FORMAT_SHAPES_EFFECTS : Resource.h
  • ID_CHART_FORMAT_SHAPES_FILL : Resource.h
  • ID_CHART_FORMAT_SHAPES_OUTLINE : Resource.h
  • ID_CHART_LAYOUT_AXES_AXES : Resource.h
  • ID_CHART_LAYOUT_AXES_GRIDLINES : Resource.h
  • ID_CHART_LAYOUT_LABELS_AXIS : Resource.h
  • ID_CHART_LAYOUT_LABELS_DATALABELS : Resource.h
  • ID_CHART_LAYOUT_LABELS_DATATABLE : Resource.h
  • ID_CHART_LAYOUT_LABELS_LEGEND : Resource.h
  • ID_CHART_LAYOUT_LABELS_TITLE : Resource.h
  • ID_CHART_LAYOUT_SHAPES_PICTURE : Resource.h
  • ID_CHART_LAYOUT_SHAPES_SHAPES : Resource.h
  • ID_CHART_LAYOUT_SHAPES_TEXTBOX : Resource.h
  • ID_CHOOSE_FONT : resource.h
  • ID_CHOOSE_PRINT_FONT : resource.h
  • ID_CLASS_ADD_MEMEBER_FUNCTION : Resource.h
  • ID_CLASS_ADD_MEMEBER_VARIABLE : Resource.h
  • ID_CLASS_DEFINITION : Resource.h
  • ID_CLASS_PROPERTIES : Resource.h
  • ID_CLEAR : Resource.H
  • ID_CLIST : resource.h
  • ID_CLOSE : Resource.H
  • ID_COLOR0 : resource.h
  • ID_COLOR1 : resource.h
  • ID_COLOR10 : resource.h
  • ID_COLOR11 : resource.h
  • ID_COLOR12 : resource.h
  • ID_COLOR13 : resource.h
  • ID_COLOR14 : resource.h
  • ID_COLOR15 : resource.h
  • ID_COLOR16 : resource.h
  • ID_COLOR2 : resource.h
  • ID_COLOR3 : resource.h
  • ID_COLOR4 : resource.h
  • ID_COLOR5 : resource.h
  • ID_COLOR6 : resource.h
  • ID_COLOR7 : resource.h
  • ID_COLOR8 : resource.h
  • ID_COLOR9 : resource.h
  • ID_COLOR_AUTOMATIC : resource.h
  • ID_COLOR_OPTIONS : resource.h
  • ID_COLOR_TEAROFF : resource.h
  • ID_COMMAND_1 : resource.h
  • ID_COMMAND_2 : resource.h
  • ID_COMMAND_3 : resource.h
  • ID_COMMAND_HISTORY : Resource.h
  • ID_CONTAINER_AMBIENTPROPERTIES : Resource.H
  • ID_CONTAINER_INFO : Resource.H
  • ID_CONTAINER_OPTIONS : Resource.H
  • ID_CONTAINER_TABORDER : Resource.H
  • ID_CONTEXT_BROWSE : resource.h
  • ID_CONTEXT_EXIT : resource.h
  • ID_CONTEXT_PROPERTIES : resource.h
  • ID_CONTEXTHELP : resource.h
  • ID_CONTROL_ACTIVATE : Resource.H
  • ID_CONTROL_DEACTIVATE : Resource.H
  • ID_CONTROL_DRAWMETAFILE : Resource.H
  • ID_CONTROL_EVENTLOGGING : Resource.H
  • ID_CONTROL_INVOKEMETHODS : Resource.H
  • ID_CONTROL_LOGGING : Resource.H
  • ID_CONTROL_SAVETOPROPERTYBAG : Resource.H
  • ID_CONTROL_SAVETOSTORAGE : Resource.H
  • ID_CONTROL_SAVETOSTREAM : Resource.H
  • ID_CONTROL_SAVETOSUBSTORAGE : Resource.H
  • ID_CONTROL_UIACTIVATE : Resource.H
  • ID_CONTROL_UIDEACTIVATE : Resource.H
  • ID_COPY : resource.h
  • ID_COPY_TO : Resource.h
  • ID_CPAL_CHECK : resource.h
  • ID_CUSTOM : resource.h
  • ID_CUSTOMIZE_QUICK_ACCESS_TOOLBAR : Resource.h
  • ID_CUT : resource.h
  • ID_DATE : resource.h
  • ID_DEBUG_CALLSTACK : resource.h
  • ID_DEBUG_DISASSEMBLY : resource.h
  • ID_DEBUG_LOCALS : resource.h
  • ID_DEBUG_MEMORY : resource.h
  • ID_DEBUG_QUICKWATCH : resource.h
  • ID_DEBUG_REGISTERS : resource.h
  • ID_DEBUG_RESTART : resource.h
  • ID_DEBUG_RUNTOCURSOR : resource.h
  • ID_DEBUG_STEPINTO : resource.h
  • ID_DEBUG_STEPOUT : resource.h
  • ID_DEBUG_STEPOVER : resource.h
  • ID_DEBUG_STOPDEBUGGING : resource.h
  • ID_DEBUG_WATCH : resource.h
  • ID_DEMO_DEMO1 : resource.h
  • ID_DEMO_DEMO2 : resource.h
  • ID_DERIVED_WORKER_THREAD : resource.h
  • ID_DHELP1 : Resource.h
  • ID_DHELP2 : Resource.h
  • ID_DHELP3 : Resource.h
  • ID_DIALOG_ABOUT : resource.h
  • ID_DRAW : resource.h
  • ID_DRAW_ELLIPSE : resource.h
  • ID_DRAW_LINE : resource.h
  • ID_DRAW_POLYGON : resource.h
  • ID_DRAW_RECT : resource.h
  • ID_DRAW_ROUNDRECT : resource.h
  • ID_DRAW_SELECT : resource.h
  • ID_DRAWPATTERN : resource.h
  • ID_DUMMY : Resource.h , resource.h
  • ID_DUMMY_BUILD : Resource.h
  • ID_DUMMY_CLEAN : Resource.h
  • ID_DUMMY_COMPILE : Resource.h
  • ID_DUMMY_EXECUTE : Resource.h
  • ID_DUMMY_GO : Resource.h
  • ID_DUMMY_INSERT_RESOURCE : Resource.h
  • ID_DUMMY_REBUILD_ALL : Resource.h
  • ID_DUMMY_REMOVE_ALL_BREAKPOINTS : Resource.h
  • ID_DUMMY_SELECT_ACTIVE_CONFIGURATION : Resource.h
  • ID_DUMMY_STOP_BUILD : Resource.h
  • ID_DUMP_CLASSES : resource.h
  • ID_DUMP_DLLS : resource.h
  • ID_DUMP_DOCTEMPLATES : resource.h
  • ID_DUMP_OBJECTS : resource.h
  • ID_DWORDARRAY : resource.h
  • ID_DYNAMIC_COMMANDS : resource.h
  • ID_DYNAMIC_ITEM_1 : resource.h
  • ID_DYNAMIC_ITEM_2 : resource.h
  • ID_EDIT_ALLOWINVERT : resource.h
  • ID_EDIT_AMBIENTPROPERTIES : Resource.H
  • ID_EDIT_AUTOOUTLINING : Resource.h
  • ID_EDIT_BM_CLEARALL : resource.h
  • ID_EDIT_BM_NEXT : resource.h
  • ID_EDIT_BM_PREV : resource.h
  • ID_EDIT_BM_TOGGLE : resource.h
  • ID_EDIT_BRINGTOFRONT : Resource.H
  • ID_EDIT_CHANGETEXT : resource.h
  • ID_EDIT_CLEAR_ALLBOOKMARKS : Resource.h
  • ID_EDIT_CLONE : resource.h
  • ID_EDIT_COLLAPSETODEFINITIONS : Resource.h
  • ID_EDIT_COPYFORMAT : Resource.h
  • ID_EDIT_DECREASE_IDENT : Resource.h
  • ID_EDIT_DELETE : Resource.H
  • ID_EDIT_DELETEALL : Resource.H
  • ID_EDIT_DOTTEDLINE : resource.h
  • ID_EDIT_EMBEDDEDOBJECT_ACTIVATE : Resource.H
  • ID_EDIT_EMBEDDEDOBJECTFUNCTIONS_ACTIVATE : Resource.H
  • ID_EDIT_ENABLEOUTLINING : Resource.h
  • ID_EDIT_FIND_COMBO : resource.h , Resource.h
  • ID_EDIT_FIND_NEXT : resource.h
  • ID_EDIT_FINDINFILES : resource.h
  • ID_EDIT_FINDNEXT : Resource.h
  • ID_EDIT_FINDPREV : Resource.h
  • ID_EDIT_FONT : resource.h
  • ID_EDIT_GOTO : resource.h , Resource.h
  • ID_EDIT_GOTO_LINE : Resource.h
  • ID_EDIT_HATCHEDBORDER : resource.h
  • ID_EDIT_HATCHEDINSIDE : resource.h
  • ID_EDIT_HIDESELECTION : Resource.h
  • ID_EDIT_INCREASE_IDENT : Resource.h
  • ID_EDIT_INDENT : resource.h
  • ID_EDIT_INSERTCONTROL : Resource.H
  • ID_EDIT_INSERTCONTROLFROMSTORAGE : Resource.H
  • ID_EDIT_INSERTCONTROLFROMSUBSTORAGE : Resource.H
  • ID_EDIT_INSERTFROMSTREAM : Resource.H
  • ID_EDIT_INVOKEMETHODS : Resource.H
  • ID_EDIT_LINENUMBERS : Resource.h
  • ID_EDIT_LISTMEMBERS : Resource.h
  • ID_EDIT_LOADOBJECTFROMSTREAM : Resource.H
  • ID_EDIT_MULTISELPROPERTIES : Resource.H
  • ID_EDIT_NEXT_WORD : Resource.h
  • ID_EDIT_NEXTBOOKMARK : Resource.h
  • ID_EDIT_PASTE_HYPERLINK : Resource.h
  • ID_EDIT_PREVIOUSBOOKMARK : Resource.h
  • ID_EDIT_PROPERTIES : resource.h , Resource.H
  • ID_EDIT_RESIZEINSIDE : resource.h
  • ID_EDIT_RESIZEOUTSIDE : resource.h
  • ID_EDIT_SELECTALL : resource.h , Resource.H
  • ID_EDIT_SELECTFORMAT : Resource.h
  • ID_EDIT_SELECTOBJECTS : Resource.h
  • ID_EDIT_SENDTOBACK : Resource.H
  • ID_EDIT_SHOWHINT : Resource.h
  • ID_EDIT_SOLIDLINE : resource.h
  • ID_EDIT_STOPHIDINGCURRENT : Resource.h
  • ID_EDIT_STOPOUTLINING : Resource.h
  • ID_EDIT_TEST : resource.h
  • ID_EDIT_TOGGLEALLOUTLINING : Resource.h
  • ID_EDIT_TOGGLEBOOKMARK : Resource.h
  • ID_EDIT_TOGGLEBREAKPOINT : Resource.h
  • ID_EDIT_TOGGLEOUTLINING : Resource.h
  • ID_EDIT_UNINDENT : resource.h
  • ID_EDIT_WORDWRAP : resource.h
  • ID_ELLIPSE : resource.h
  • ID_END_DRAWING : resource.h
  • ID_ENORMOUSWHEEL : resource.h
  • ID_ERASE : resource.h
  • ID_EXAMPLE_CPP : Resource.h
  • ID_EXAMPLE_WEB : Resource.h
  • ID_EXPAND : resource.h , Resource.h
  • ID_FAST : resource.h
  • ID_FAVORITES_DROPDOWN : Resource.h
  • ID_FAVORITS_DUMMY : Resource.h
  • ID_FILE_BINDTOAFILE : resource.h
  • ID_FILE_CLOSE_SOLUTION : Resource.h
  • ID_FILE_CONFIGURESCREENCAPTURE : Resource.h
  • ID_FILE_IMAGEINFO : resource.h
  • ID_FILE_LOADFROMSTREAM : Resource.H
  • ID_FILE_NEW_BLANK_SOLUTION : Resource.h
  • ID_FILE_NEW_PROJECT : Resource.h
  • ID_FILE_NEWBOUNCE : resource.h
  • ID_FILE_NEWHELLO : resource.h
  • ID_FILE_OPEN_SOLUTION : Resource.h
  • ID_FILE_OPENIMAGE : resource.h
  • ID_FILE_OPENURL : resource.h
  • ID_FILE_PLAY : resource.h
  • ID_FILE_PREPARE : Resource.h
  • ID_FILE_PREPARE_ADD_SIGNATURE : Resource.h
  • ID_FILE_PREPARE_ENCRYPT : Resource.h
  • ID_FILE_PREPARE_INSPECT : Resource.h
  • ID_FILE_PREPARE_MARK_AS_FINAL : Resource.h
  • ID_FILE_PREPARE_PROPERTIES : Resource.h
  • ID_FILE_PREPARE_RUN_CHECKER : Resource.h
  • ID_FILE_PRINTALLSECTIONS : resource.h
  • ID_FILE_PUBLISH : Resource.h
  • ID_FILE_PUBLISH_BLOG : Resource.h
  • ID_FILE_PUBLISH_CREATE_DOCWORKSPACE : Resource.h
  • ID_FILE_PUBLISH_DOCMANAGE_SERVER : Resource.h
  • ID_FILE_REGISTERCONTROLS : Resource.H
  • ID_FILE_RUNREGEDIT : resource.h
  • ID_FILE_SAVE_ALL : Resource.h
  • ID_FILE_SAVE_AS_ADDINS : Resource.h
  • ID_FILE_SAVE_AS_DOCUMENT : Resource.h
  • ID_FILE_SAVE_AS_DOCUMENT_OLD : Resource.h
  • ID_FILE_SAVE_AS_OTHER : Resource.h
  • ID_FILE_SAVE_AS_TEMPLATE : Resource.h
  • ID_FILE_SAVEIMAGE : resource.h
  • ID_FILE_SAVETOSTREAM : Resource.H
  • ID_FILE_SCREENCAPTURE : Resource.h
  • ID_FILE_SEND : Resource.h
  • ID_FILE_SEND_EMAIL : Resource.h
  • ID_FILE_SEND_FAX : Resource.h
  • ID_FILE_SHOWVERSION : resource.h
  • ID_FILE_SUMMARYINFO : resource.h
  • ID_FILE_VIEWTYPELIB : resource.h
  • ID_FILL : resource.h
  • ID_FIND_CONTACT : resource.h
  • ID_FMTBAR_FONTNAME : resource.h
  • ID_FMTBAR_FONTSIZE : resource.h
  • ID_FOLDER_UP : Resource.h
  • ID_FONT_BOLD : Resource.h
  • ID_FONT_CASE_CAPITALIZE : Resource.h
  • ID_FONT_CASE_LOWERCASE : Resource.h
  • ID_FONT_CASE_SENTENCE : Resource.h
  • ID_FONT_CASE_TOGGLECASE : Resource.h
  • ID_FONT_CASE_UPPERCASE : Resource.h
  • ID_FONT_CHANGECASE : Resource.h
  • ID_FONT_CLEARFORMAT : Resource.h
  • ID_FONT_COLOR : Resource.h
  • ID_FONT_DROPDOWN : Resource.h
  • ID_FONT_FONT : Resource.h
  • ID_FONT_FONTSIZE : Resource.h
  • ID_FONT_GROWFONT : Resource.h
  • ID_FONT_ITALIC : Resource.h
  • ID_FONT_NOT_FOUND : Resource.h
  • ID_FONT_SHRINK : Resource.h
  • ID_FONT_STRIKETHROUGH : Resource.h
  • ID_FONT_SUBSCRIPT : Resource.h
  • ID_FONT_SUPERSCRIPT : Resource.h
  • ID_FONT_TEXTHIGHLIGHT : Resource.h
  • ID_FONT_UNDERLINE : Resource.h
  • ID_FORMAT_ABSOLUTEPOSITIONELEMENT : resource.h
  • ID_FORMAT_BRINGABOVETEXT : resource.h
  • ID_FORMAT_BRINGFORWARD : resource.h
  • ID_FORMAT_BRINGTOFRONT : resource.h
  • ID_FORMAT_CONTEXT_TAB : mainfrm.h
  • ID_FORMAT_PARAGRAPH : resource.h
  • ID_FORMAT_SENDBACKWARD : resource.h
  • ID_FORMAT_SENDBELOWTEXT : resource.h
  • ID_FORMAT_SENDTOBACK : resource.h
  • ID_FORMAT_STATICELEMENT : resource.h
  • ID_FORMAT_TABS : resource.h
  • ID_FORWARD_1 : Resource.h
  • ID_FORWARD_2 : Resource.h
  • ID_FOUR_COLUMNS : resource.h
  • ID_FREE_TEAROFF1 : resource.h
  • ID_FREE_TEAROFF2 : resource.h
  • ID_FROM_PALETTE_BULLET : Resource.h
  • ID_FROM_PALETTE_MULTILEVEL : Resource.h
  • ID_FROM_PALETTE_NUMBER : Resource.h
  • ID_FROM_PALETTE_POSITION : Resource.h
  • ID_FROM_PALETTE_TABLE : Resource.h
  • ID_GO_ADDRESS : Resource.h
  • ID_GO_ADDRESS_EDIT : Resource.h
  • ID_GO_BACK : Resource.h
  • ID_GO_BEST_OF_THE_WEB : Resource.h
  • ID_GO_FORWARD : Resource.h
  • ID_GO_SEARCH_THE_WEB : Resource.h
  • ID_GO_START_PAGE : Resource.h
  • ID_GREEN : resource.h
  • ID_GROUP_SHORTCUTS : Resource.h
  • ID_HELP_ABOUT : resource.h
  • ID_HELP_BUTTONCONTROL : resource.h
  • ID_HELP_FIND : resource.h
  • ID_HELP_KEYBOARDMAP : Resource.h
  • ID_HELP_MICROSOFT : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_BEST_OF_THE_WEB : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_FREE_STUFF : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_FREQUENTLY_ASKED_QUESTIONS : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_GET_FASTER_INTERNET_ACCESS : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_INTERNET_START_PAGE : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_MICROSOFT_HOME_PAGE : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_SEARCH_THE_WEB : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_SEND_FEEDBACK : Resource.h
  • ID_HELP_ONLINE_SUPPORT : Resource.h
  • ID_HELP_SHOW_START : Resource.h
  • ID_HELP_WEB : Resource.h
  • ID_HELP_WEB_TUTORIAL : Resource.h
  • ID_HISTORY_DUMMY : Resource.h
  • ID_HUGERING : resource.h
  • ID_HUGEWHEEL : resource.h
  • ID_IFACES_USEINPROCHANDLER : resource.h
  • ID_IFACES_USEINPROCSERVER : resource.h
  • ID_IFACES_USELOCALSERVER : resource.h
  • ID_IFACEVIEW : resource.h
  • ID_IFACEVIEW_GETINTERFACES : resource.h
  • ID_IFACEVIEW_IFACEVIEWER : resource.h
  • ID_IMPORT_TEXT : resource.h
  • ID_INDICATOR_ANIMATION : resource.h
  • ID_INDICATOR_CF : resource.h
  • ID_INDICATOR_CLOCK : resource.h
  • ID_INDICATOR_FPS : Resource.h
  • ID_INDICATOR_ICON : Resource.h , resource.h
  • ID_INDICATOR_LABEL : resource.h
  • ID_INDICATOR_LINE : resource.h
  • ID_INDICATOR_PAUSE_BLIT : Resource.h
  • ID_INDICATOR_PAUSE_BLUR : Resource.h
  • ID_INDICATOR_PAUSE_SWARM : Resource.h
  • ID_INDICATOR_PROGRESS : Resource.h , resource.h
  • ID_INDICATOR_RESOLUTION : Resource.h
  • ID_INDICATOR_TIME : resource.h
  • ID_INDICATOR_UNK : resource.h
  • ID_INDICATOR_VIEW : resource.h
  • ID_INSERT_BLACKPAGE : Resource.h
  • ID_INSERT_BOOKMARK : Resource.h
  • ID_INSERT_BOTTOMOFPAGE : Resource.h
  • ID_INSERT_BULLET : resource.h
  • ID_INSERT_CHART : Resource.h
  • ID_INSERT_CITATION : Resource.h
  • ID_INSERT_CLIPART : Resource.h
  • ID_INSERT_COVERPAGE : Resource.h
  • ID_INSERT_CURRENTPOSITION : Resource.h
  • ID_INSERT_DATE_TIME : resource.h
  • ID_INSERT_DATETIME : Resource.h
  • ID_INSERT_DRAWTEXTBOX : Resource.h
  • ID_INSERT_DROPCAP : Resource.h
  • ID_INSERT_EDITFOOTER : Resource.h
  • ID_INSERT_EDITHEADER : Resource.h
  • ID_INSERT_EQUATION : Resource.h
  • ID_INSERT_FOOTER : Resource.h
  • ID_INSERT_FORMATPAGENUMBERS : Resource.h
  • ID_INSERT_HEADER : Resource.h
  • ID_INSERT_HYPERLINK : Resource.h
  • ID_INSERT_OBJECT : Resource.h
  • ID_INSERT_PAGEBREAK : Resource.h
  • ID_INSERT_PAGEMARGINS : Resource.h
  • ID_INSERT_PAGENUMBER : Resource.h
  • ID_INSERT_PICTURE : Resource.h
  • ID_INSERT_PICTUREFROMSCANER : Resource.h
  • ID_INSERT_QUICKPARTS : Resource.h
  • ID_INSERT_REFERENCE : Resource.h
  • ID_INSERT_REMOVECURRENTCOVERPAGE : Resource.h
  • ID_INSERT_REMOVEFOOTER : Resource.h
  • ID_INSERT_REMOVEHEADER : Resource.h
  • ID_INSERT_REMOVEPAGENUMBERS : Resource.h
  • ID_INSERT_SAVESELECTIONTOFOOTERGALLERY : Resource.h
  • ID_INSERT_SAVESELECTIONTOHEADERGALLERY : Resource.h
  • ID_INSERT_SAVESELECTIONTOTEXTBOXGALLERY : Resource.h
  • ID_INSERT_SAVETOCOVERPAGEGALLERY : Resource.h
  • ID_INSERT_SHAPES : Resource.h
  • ID_INSERT_SHAPESNEW : Resource.h
  • ID_INSERT_SIGNATURELINE : Resource.h
  • ID_INSERT_SMARTART : Resource.h
  • ID_INSERT_SYMBOL : Resource.h
  • ID_INSERT_TABLE : Resource.h
  • ID_INSERT_TEXTBOX : Resource.h
  • ID_INSERT_TOPOFPAGE : Resource.h
  • ID_INSERT_WORDART : Resource.h
  • ID_INTERFACES_SHOWCFI : resource.h
  • ID_INTERFACES_SHOWCLASSFACTORYOBJECTINTERFACES : resource.h
  • ID_INTERFACES_USECLSCTXINPROCHANDLER : resource.h
  • ID_INTERFACES_USECLSCTXINPROCSERVER : resource.h
  • ID_INTLIST : resource.h
  • ID_ITEM1 : resource.h
  • ID_ITEM2 : resource.h
  • ID_ITEM3 : resource.h
  • ID_ITEM4 : resource.h
  • ID_ITEM_1 : resource.h
  • ID_ITEM_2 : resource.h
  • ID_ITEM_3 : resource.h
  • ID_ITEM_4 : resource.h
  • ID_KILL_WORKER_THREAD : resource.h
  • ID_LABEL : resource.h
  • ID_LARGEWHEEL : resource.h
  • ID_LINE : resource.h
  • ID_LINE_STYLE_1 : resource.h
  • ID_LINE_STYLE_10 : resource.h
  • ID_LINE_STYLE_2 : resource.h
  • ID_LINE_STYLE_3 : resource.h
  • ID_LINE_STYLE_4 : resource.h
  • ID_LINE_STYLE_5 : resource.h
  • ID_LINE_STYLE_6 : resource.h
  • ID_LINE_STYLE_7 : resource.h
  • ID_LINE_STYLE_8 : resource.h
  • ID_LINE_STYLE_9 : resource.h
  • ID_LINE_STYLE_MENU : resource.h
  • ID_LINK_1 : Resource.h
  • ID_LINK_MICROSOFT : Resource.h
  • ID_LINK_MSDN : Resource.h
  • ID_LINK_VISUALCPP : Resource.h
  • ID_LINKS_BANKING_1 : Resource.h
  • ID_LINKS_BANKING_2 : Resource.h
  • ID_LINKS_BANKING_3 : Resource.h
  • ID_LINKS_BANKING_4 : Resource.h
  • ID_LINKS_BANKING_5 : Resource.h
  • ID_LINKS_BILLS_1 : Resource.h
  • ID_LINKS_BILLS_2 : Resource.h
  • ID_LINKS_BILLS_3 : Resource.h
  • ID_LINKS_BILLS_4 : Resource.h
  • ID_LINKS_BILLS_5 : Resource.h
  • ID_LINKS_BUDGET_1 : Resource.h
  • ID_LINKS_BUDGET_2 : Resource.h
  • ID_LINKS_HOME_1 : Resource.h
  • ID_LINKS_HOME_2 : Resource.h
  • ID_LINKS_INVESTING_1 : Resource.h
  • ID_LINKS_INVESTING_2 : Resource.h
  • ID_LINKS_INVESTING_3 : Resource.h
  • ID_LINKS_INVESTING_4 : Resource.h
  • ID_LINKS_INVESTING_5 : Resource.h
  • ID_LINKS_INVESTING_6 : Resource.h
  • ID_LINKS_INVESTING_7 : Resource.h
  • ID_LINKS_PLANNING_1 : Resource.h
  • ID_LINKS_PLANNING_2 : Resource.h
  • ID_LINKS_PLANNING_3 : Resource.h
  • ID_LINKS_PLANNING_4 : Resource.h
  • ID_LINKS_PLANNING_5 : Resource.h
  • ID_LINKS_PLANNING_6 : Resource.h
  • ID_LINKS_REPORTS_1 : Resource.h
  • ID_LINKS_REPORTS_2 : Resource.h
  • ID_LINKS_REPORTS_3 : Resource.h
  • ID_LINKS_TAXES_1 : Resource.h
  • ID_LINKS_TAXES_2 : Resource.h
  • ID_LINKS_TAXES_3 : Resource.h
  • ID_LINKS_TAXES_4 : Resource.h
  • ID_LINKS_TAXES_5 : Resource.h
  • ID_LIST : UndoBar.cpp
  • ID_LIST_1 : WatchBar.cpp
  • ID_LISTBOX : resource.h
  • ID_LISTVIEW : tlblist.cpp
  • ID_LOAD_DEBUG_CONF : resource.h
  • ID_LOAD_REGULAR_CONF : resource.h
  • ID_LOOKUP : resource.h
  • ID_MAGNIFY : resource.h
  • ID_MAIL_ATTACHMENT : resource.h
  • ID_MAIL_BAR : resource.h
  • ID_MAIL_CHECK_NAMES : resource.h
  • ID_MAIL_CLOSE : resource.h
  • ID_MAIL_COPY_TO_FOLDER : resource.h
  • ID_MAIL_DELETE : resource.h
  • ID_MAIL_FLAG : resource.h
  • ID_MAIL_FONTSIZE : resource.h
  • ID_MAIL_HIGHT_PRIORITY : resource.h
  • ID_MAIL_ITEM : resource.h
  • ID_MAIL_LOW_PRIORITY : resource.h
  • ID_MAIL_MENU : resource.h
  • ID_MAIL_MOVE_TO_FOLDER : resource.h
  • ID_MAIL_OPTIONS : resource.h
  • ID_MAIL_PRINT : resource.h
  • ID_MAIL_PROPERTIES : resource.h
  • ID_MAIL_SAVE : resource.h
  • ID_MAIL_SAVE_ATTACHMENTS : resource.h
  • ID_MAIL_SAVE_STATIONERY : resource.h
  • ID_MAIL_SEND : resource.h
  • ID_MAIL_SIGNATURE : resource.h
  • ID_MAIL_SPELL : resource.h
  • ID_MAILINGS_ADDRESSBLOCK : Resource.h
  • ID_MAILINGS_AUTOCHECHERRORS : Resource.h
  • ID_MAILINGS_CREATE : Resource.h
  • ID_MAILINGS_CREATELABELS : Resource.h
  • ID_MAILINGS_DIRECTORY : Resource.h
  • ID_MAILINGS_EDITRECIPIENTLIST : Resource.h
  • ID_MAILINGS_EMAILMESSAGES : Resource.h
  • ID_MAILINGS_ENVELOPES : Resource.h
  • ID_MAILINGS_FINDRECIPIENT : Resource.h
  • ID_MAILINGS_FINISH : Resource.h
  • ID_MAILINGS_FIRSTRECORD : Resource.h
  • ID_MAILINGS_GOTORECORD : Resource.h
  • ID_MAILINGS_GREETINGLINE : Resource.h
  • ID_MAILINGS_HIGHLIGHT : Resource.h
  • ID_MAILINGS_INSERTMERGEDFIELD : Resource.h
  • ID_MAILINGS_LABELS : Resource.h
  • ID_MAILINGS_LASTRECORD : Resource.h
  • ID_MAILINGS_LETTERS : Resource.h
  • ID_MAILINGS_MATCHFIELDS : Resource.h
  • ID_MAILINGS_NEXTRECORD : Resource.h
  • ID_MAILINGS_NORMALDOCUMENT : Resource.h
  • ID_MAILINGS_PREVIOUSRECORD : Resource.h
  • ID_MAILINGS_RULES : Resource.h
  • ID_MAILINGS_SELECTFROMCONTACTS : Resource.h
  • ID_MAILINGS_SELECTRECIPIENTS : Resource.h
  • ID_MAILINGS_STARTMAILMERGE : Resource.h
  • ID_MAILINGS_STEPBYSTEPMAILMERGEWIZARD : Resource.h
  • ID_MAILINGS_TYPENEWLIST : Resource.h
  • ID_MAILINGS_UPDATELABELS : Resource.h
  • ID_MAILINGS_USEEXISTINGLIST : Resource.h
  • ID_MAILINGS_VIEWMERGEDDATA : Resource.h
  • ID_MAIN_BUTTON : Resource.h
  • ID_MAP : resource.h
  • ID_MAPBYTETOMYSTRUCT : resource.h
  • ID_MAPDWORDTOMYSTRUCT : resource.h
  • ID_MAPSTRINGTOSTRING : resource.h
  • ID_MDI_CANCEL : resource.h , Resource.h
  • ID_MDI_MOVE_TO_NEXT_GROUP : resource.h , Resource.h
  • ID_MDI_MOVE_TO_PREV_GROUP : resource.h , Resource.h
  • ID_MDI_NEW_HORZ_TAB_GROUP : resource.h , Resource.h
  • ID_MDI_NEW_VERT_GROUP : resource.h , Resource.h
  • ID_MDI_TABBED : resource.h
  • ID_MDI_TABBED_DOCUMENT : Resource.h
  • ID_MDITABS_BOTTOM : Resource.h
  • ID_MDITABS_CLOSE : Resource.h
  • ID_MDITABS_ICONS : Resource.h
  • ID_MDITABS_TOP : Resource.h
  • ID_MEDIUMRING : resource.h
  • ID_MEDIUMWHEEL : resource.h
  • ID_Menu : resource.h
  • ID_MENU1_MENU1 : resource.h
  • ID_MENU1_MENU2 : resource.h
  • ID_MENU2_MENU2 : resource.h
  • ID_MENU2_MENU3 : resource.h
  • ID_MENU2_MENU4 : resource.h
  • ID_MENU_DIR1 : Resource.h
  • ID_MENU_DIR2 : Resource.h
  • ID_MENU_DIR3 : Resource.h
  • ID_MENU_ITEM1 : Resource.h
  • ID_MENU_ITEM2 : Resource.h
  • ID_MENU_ITEM3 : Resource.h
  • ID_MENUITEM32771 : resource.h
  • ID_MENUITEM32772 : resource.h
  • ID_MINI_FRAME_PROPERTY_SHEET : resource.h
  • ID_MINI_FRAME_WITH_PIN_BUTTON : resource.h
  • ID_MIRROR_DISPLAY_FONT : resource.h
  • ID_MIX : resource.h
  • ID_MORE_LINES : resource.h
  • ID_MOVE_TO : Resource.h
  • ID_NEW : resource.h
  • ID_NEW_ACCELERATOR : Resource.h
  • ID_NEW_APPOINTMENT : resource.h
  • ID_NEW_BITMAP : Resource.h
  • ID_NEW_CONTRACT : resource.h
  • ID_NEW_CURSOR : Resource.h
  • ID_NEW_DIALOG : Resource.h
  • ID_NEW_DISTRIBUTION_LIST : resource.h
  • ID_NEW_FAX : resource.h
  • ID_NEW_FOLDER : resource.h , Resource.h
  • ID_NEW_ICON : Resource.h
  • ID_NEW_JOURNAL_ENTRY : resource.h
  • ID_NEW_MAIL : resource.h
  • ID_NEW_MEETING : resource.h
  • ID_NEW_MENU : Resource.h
  • ID_NEW_NOTE : resource.h
  • ID_NEW_POST_FOLDER : resource.h
  • ID_NEW_SHORTCUT : resource.h
  • ID_NEW_STRING_TABLE : Resource.h
  • ID_NEW_TASK : resource.h
  • ID_NEW_TASK_REQUEST : resource.h
  • ID_NEW_TOOLBAR : Resource.h
  • ID_NEW_VERSION : Resource.h
  • ID_NEWWINDOW : resource.h
  • ID_NEXT : resource.h
  • ID_NONDERIVED_WORKER_THREAD : resource.h
  • ID_NOTHING : resource.h
  • ID_OBJECT_CHANGEICON : resource.h
  • ID_OBJECT_DELETE : resource.h
  • ID_OBJECT_DISPLAYASICON : resource.h
  • ID_OBJECT_DISPLAYCONTENT : resource.h
  • ID_OBJECT_FILLCOLOR : resource.h
  • ID_OBJECT_LINECOLOR : resource.h
  • ID_OBJECT_LINEWEIGHT : resource.h
  • ID_OBJECT_LINEWEIGHT_MORE : resource.h
  • ID_OBJECT_MOVEBACK : resource.h
  • ID_OBJECT_MOVEFORWARD : resource.h
  • ID_OBJECT_MOVETOBACK : resource.h
  • ID_OBJECT_MOVETOFRONT : resource.h
  • ID_OBJECT_NOFILL : resource.h
  • ID_OBJECT_NOLINE : resource.h
  • ID_OBJECT_POPUP_MENU : resource.h
  • ID_OBJECT_PROPERTIES : resource.h
  • ID_OBJECT_RESETSIZE : resource.h
  • ID_OBJECT_SAVETOSTREAM : Resource.H
  • ID_OBJECT_STYLES : resource.h
  • ID_OBJECT_TRACK_SIZE : resource.h
  • ID_OBJECT_VERIFY : resource.h
  • ID_OBJECTS_SHOWCONTAINERS : resource.h
  • ID_OBJECTS_SHOWCONTROLS : resource.h
  • ID_OBJECTS_SHOWINSERTABLE : resource.h
  • ID_OBJECTS_SHOWINTERNAL : resource.h
  • ID_OBJECTS_SHOWNOTINSERTABLEOBJECTS : resource.h
  • ID_OBJECTS_SHOWOLE10OBJECTS : resource.h
  • ID_OBJECTS_SHOWTYPELIBS : resource.h
  • ID_OBJECTVIEW : resource.h
  • ID_OLE_CHANGE_SOURCE : resource.h
  • ID_OLE_VERB_POPUP : resource.h
  • ID_OPEN : resource.h
  • ID_OPTION_NOW : resource.h
  • ID_OPTION_RATE : resource.h
  • ID_OPTIONS_CONTAINEROPTIONS : Resource.H
  • ID_OPTIONS_CONTAINERPROPERTIES : Resource.H
  • ID_OPTIONS_DESIGNMODE : Resource.H
  • ID_OPTIONS_FONT : resource.h
  • ID_OPTIONS_FREEZEEVENTS : Resource.H
  • ID_OPTIONS_LOGGING : Resource.H
  • ID_OPTIONS_OPTION1 : resource.h
  • ID_OPTIONS_OPTION2 : resource.h
  • ID_OPTIONS_OPTION3 : resource.h
  • ID_OPTIONS_SLOWDRAWING : Resource.H
  • ID_OPTIONS_SPEED : resource.h
  • ID_OPTIONS_TRACELEVEL_NONE : Resource.H
  • ID_OPTIONS_TRACELEVEL_NORMAL : Resource.H
  • ID_OPTIONS_TRACELEVEL_VERBOSE : Resource.H
  • ID_OPTIONS_TWOPASSDRAWING : Resource.H
  • ID_OPTIONS_USERMODE : Resource.H
  • ID_OUTLOOK_ADD_PAGE : resource.h
  • ID_OUTLOOK_ANIMATION : resource.h
  • ID_OUTLOOK_DELETE_PAGE : resource.h
  • ID_OUTLOOK_RENAME_PAGE : resource.h
  • ID_OUTLOOK_SHOW_BACKGROUND : resource.h
  • ID_OUTLOOK_SHOW_TEXT_LABELS : resource.h
  • ID_OUTPUT_GOTO_ERROR : Resource.h
  • ID_OUTPUTLOGEDIT_CLEAR : Resource.H
  • ID_OUTPUTLOGEDIT_COPY : Resource.H
  • ID_OUTPUTLOGEDIT_HIDE : Resource.H
  • ID_PAGE_SETUP : resource.h
  • ID_PAGELAYOUT_ARRANGE_ALIGN : Resource.h
  • ID_PAGELAYOUT_ARRANGE_BRINGTOFRONT : Resource.h
  • ID_PAGELAYOUT_ARRANGE_GROUP : Resource.h
  • ID_PAGELAYOUT_ARRANGE_POSITION : Resource.h
  • ID_PAGELAYOUT_ARRANGE_ROTATE : Resource.h
  • ID_PAGELAYOUT_ARRANGE_SENDTOBACK : Resource.h
  • ID_PAGELAYOUT_ARRANGE_TEXTWRAPPING : Resource.h
  • ID_PAGELAYOUT_BRINGFORWARD : Resource.h
  • ID_PAGELAYOUT_BRINGINFRONTOFTEXT : Resource.h
  • ID_PAGELAYOUT_BRINGTOFRONT : Resource.h
  • ID_PAGELAYOUT_COLORS : Resource.h
  • ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS : Resource.h
  • ID_PAGELAYOUT_COLUMNS : Resource.h
  • ID_PAGELAYOUT_COLUMNS_LEFT : Resource.h
  • ID_PAGELAYOUT_COLUMNS_MORECOLUMNS : Resource.h
  • ID_PAGELAYOUT_COLUMNS_ONE : Resource.h
  • ID_PAGELAYOUT_COLUMNS_RIGHT : Resource.h
  • ID_PAGELAYOUT_COLUMNS_THREE : Resource.h
  • ID_PAGELAYOUT_COLUMNS_TWO : Resource.h
  • ID_PAGELAYOUT_EFFECTS : Resource.h
  • ID_PAGELAYOUT_EFFECTS_ACADEMIC : Resource.h
  • ID_PAGELAYOUT_EFFECTS_ATRIUM : Resource.h
  • ID_PAGELAYOUT_EFFECTS_CIVIC : Resource.h
  • ID_PAGELAYOUT_EFFECTS_OFFICE : Resource.h
  • ID_PAGELAYOUT_FONTS : Resource.h
  • ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS : Resource.h
  • ID_PAGELAYOUT_INDENT_LEFT : Resource.h
  • ID_PAGELAYOUT_INDENT_RIGHT : Resource.h
  • ID_PAGELAYOUT_MARGINS : Resource.h
  • ID_PAGELAYOUT_MARGINS_CUSTOMMARGINS : Resource.h
  • ID_PAGELAYOUT_MARGINS_MIRRORED : Resource.h
  • ID_PAGELAYOUT_MARGINS_MODERATE : Resource.h
  • ID_PAGELAYOUT_MARGINS_NARROW : Resource.h
  • ID_PAGELAYOUT_MARGINS_NORMAL : Resource.h
  • ID_PAGELAYOUT_MARGINS_WIDE : Resource.h
  • ID_PAGELAYOUT_MORELAYOUTOPTIONS : Resource.h
  • ID_PAGELAYOUT_ORIENTATION : Resource.h
  • ID_PAGELAYOUT_ORIENTATION_LANDSCAPE : Resource.h
  • ID_PAGELAYOUT_ORIENTATION_PORTRAIT : Resource.h
  • ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS : Resource.h
  • ID_PAGELAYOUT_PAGEBACKGROUND_PAGECOLOR : Resource.h
  • ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_BREAKS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_COLUMNS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_HYPHENATION : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_LINENUMBERS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_MARGINS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_ORIENTATTION : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_SIZE : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_SIZE_MOREPAPERSIZES : Resource.h
  • ID_PAGELAYOUT_SENDBACKWARD : Resource.h
  • ID_PAGELAYOUT_SENDBEHINDTEXT : Resource.h
  • ID_PAGELAYOUT_SENDTOBACK : Resource.h
  • ID_PAGELAYOUT_SPACE_AFTER : Resource.h
  • ID_PAGELAYOUT_SPACE_BEFORE : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_BEHINDTEXT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_EDITWRAPPOINTS : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_INFRONTOFTEXT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_INLINEWITHTEXT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_SQUARE : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_THROUGH : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_TIGHT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_TOPANDBOTTOM : Resource.h
  • ID_PAGELAYOUT_THEMES : Resource.h
  • ID_PAGELAYOUT_THEMES_BROWSEFORTHEMES : Resource.h
  • ID_PAGELAYOUT_THEMES_MORETHEMES : Resource.h
  • ID_PAGELAYOUT_THEMES_RESETFROMTEMPLATE : Resource.h
  • ID_PAGELAYOUT_THEMES_SAVECURRENTTHEME : Resource.h
  • ID_PAL_AVI : resource.h
  • ID_PAL_BUTTON : resource.h
  • ID_PAL_COMBO : resource.h
  • ID_PAL_CURSOR : resource.h
  • ID_PAL_EDIT : resource.h
  • ID_PAL_FRAME : resource.h
  • ID_PAL_HSCROLL : resource.h
  • ID_PAL_KEY : resource.h
  • ID_PAL_LIST : resource.h
  • ID_PAL_LIST_CTRL : resource.h
  • ID_PAL_PICTURE : resource.h
  • ID_PAL_PROGRESS : resource.h
  • ID_PAL_RADIO : resource.h
  • ID_PAL_SLIDER : resource.h
  • ID_PAL_SPIN : resource.h
  • ID_PAL_STATIC : resource.h
  • ID_PAL_TAB : resource.h
  • ID_PAL_VSCROLL : resource.h
  • ID_PALETTE_AIRBRUSH : resource.h
  • ID_PALETTE_BASE : resource.h
  • ID_PALETTE_BRUSH : resource.h
  • ID_PALETTE_ERASE : resource.h
  • ID_PALETTE_EYEDROP : resource.h
  • ID_PALETTE_FILL : resource.h
  • ID_PALETTE_FRAME : resource.h
  • ID_PALETTE_LINE : resource.h
  • ID_PALETTE_OVAL : resource.h
  • ID_PALETTE_PEN : resource.h
  • ID_PALETTE_RECTANGLE : resource.h
  • ID_PALETTE_SELECT : resource.h
  • ID_PALETTE_ZOOM : resource.h
  • ID_PALETTEBAR : resource.h
  • ID_PALETTEBRUSH : resource.h
  • ID_PALETTEERASE : resource.h
  • ID_PALETTEEYEDROP : resource.h
  • ID_PALETTELINE : resource.h
  • ID_PALETTEMAG : resource.h
  • ID_PALETTEOVAL : resource.h
  • ID_PALETTEPAINT : resource.h
  • ID_PALETTEPEN : resource.h
  • ID_PALETTERECT : resource.h
  • ID_PALETTEROUND : resource.h
  • ID_PALETTESELECT : resource.h
  • ID_PALETTESPRAY : resource.h
  • ID_PARA_ALIGNLEFT : Resource.h
  • ID_PARA_ALIGNRIGHT : Resource.h
  • ID_PARA_BORDER : Resource.h
  • ID_PARA_BULLETS : Resource.h
  • ID_PARA_CENTER : resource.h , Resource.h , resource.h
  • ID_PARA_CHANGE_LIST_LEVEL : Resource.h
  • ID_PARA_DECREASEINDENT : Resource.h
  • ID_PARA_DEFINENEWBULLET : Resource.h
  • ID_PARA_DEFINENEWLISTSTYLE : Resource.h
  • ID_PARA_DEFINENEWMULTILEVELLIST : Resource.h
  • ID_PARA_DEFINENEWNUMBERFORMAT : Resource.h
  • ID_PARA_ENDLINEMARK : Resource.h
  • ID_PARA_INCREASEINDENT : Resource.h
  • ID_PARA_JUSTIFY : Resource.h
  • ID_PARA_LEFT : resource.h
  • ID_PARA_LINESPACING : Resource.h
  • ID_PARA_LINESPACING1 : Resource.h
  • ID_PARA_LINESPACING2 : Resource.h
  • ID_PARA_LINESPACING3 : Resource.h
  • ID_PARA_LINESPACING4 : Resource.h
  • ID_PARA_LINESPACING5 : Resource.h
  • ID_PARA_LINESPACING6 : Resource.h
  • ID_PARA_LINESPACINGAFTER : Resource.h
  • ID_PARA_LINESPACINGBEFORE : Resource.h
  • ID_PARA_LINESPACINGOPTIONS : Resource.h
  • ID_PARA_MULTILEVEL : Resource.h
  • ID_PARA_MULTYLEVEL : Resource.h
  • ID_PARA_NUMBERING : Resource.h
  • ID_PARA_PAGESETUP : Resource.h
  • ID_PARA_RIGHT : resource.h
  • ID_PARA_SETNUMBERINGVALUE : Resource.h
  • ID_PARA_SHADING : Resource.h
  • ID_PARA_SORT : Resource.h
  • ID_PASTE : resource.h
  • ID_PAUSEDRAWING : resource.h
  • ID_PEN_BACKSPACE : resource.h
  • ID_PEN_LENS : resource.h
  • ID_PEN_NEWLINE : resource.h
  • ID_PEN_PERIOD : resource.h
  • ID_PEN_SPACE : resource.h
  • ID_PEN_TAB : resource.h
  • ID_PEN_THICK_OR_THIN : resource.h
  • ID_PEN_TOGGLE : resource.h
  • ID_PEN_WIDTHS : resource.h
  • ID_PENCIL : resource.h
  • ID_PENWIDTH : resource.h
  • ID_PERCENT_DONE : resource.h
  • ID_PICTURE_FORMAT_TOOLS_BRIGHTNESS : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_CHANGE : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_COMPRESS : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_CONTRAST : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_RECOLOR : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_RESET : Resource.h
  • ID_POINTARRAY : resource.h
  • ID_POPUP_DELETEITEM : resource.h
  • ID_POPUP_DESKTOPALERTSETTINGS : resource.h
  • ID_POPUP_DISABLENEWDESKTOPALERT : resource.h
  • ID_POPUP_FLAGITEM : resource.h
  • ID_POPUP_MARKASREAD : resource.h
  • ID_POPUP_MENU : resource.h
  • ID_POPUP_OPENITEM : resource.h
  • ID_PREV : resource.h
  • ID_PRINT : resource.h
  • ID_PROGRESS_TIMER : StatusBarDemoView.cpp
  • ID_PROPERIES1 : Resource.h
  • ID_PROPERIES2 : Resource.h
  • ID_PROPERTIES : Resource.h
  • ID_PROPERTY_SHEET_WITH_PREVIEW : resource.h
  • ID_PURPLE : resource.h
  • ID_RECALC_DONE : resource.h
  • ID_RECALC_SPEED : resource.h
  • ID_RECALCULATE_NOW : resource.h
  • ID_RECTANGLE : resource.h
  • ID_RED : resource.h
  • ID_REFERENCES_ADDTEXT : Resource.h
  • ID_REFERENCES_ADDTEXT_LEVEL1 : Resource.h
  • ID_REFERENCES_ADDTEXT_LEVEL2 : Resource.h
  • ID_REFERENCES_ADDTEXT_LEVEL3 : Resource.h
  • ID_REFERENCES_ADDTEXT_NOTSHOWNIN : Resource.h
  • ID_REFERENCES_CAPTIONS_CROSSREFERENCE : Resource.h
  • ID_REFERENCES_CAPTIONS_INSERTCAPTION : Resource.h
  • ID_REFERENCES_CAPTIONS_INSERTTOF : Resource.h
  • ID_REFERENCES_CAPTIONS_UPDATETABLE : Resource.h
  • ID_REFERENCES_CB_INSERTBIBLIOGRAPHY : Resource.h
  • ID_REFERENCES_CB_MANAGESOURCES : Resource.h
  • ID_REFERENCES_ENDNOTE_NEXT : Resource.h
  • ID_REFERENCES_ENDNOTE_PREVIOUS : Resource.h
  • ID_REFERENCES_FOOTNOTE_NEXT : Resource.h
  • ID_REFERENCES_FOOTNOTE_PREVIOUS : Resource.h
  • ID_REFERENCES_FOOTNOTES_INSERTENDNOTE : Resource.h
  • ID_REFERENCES_FOOTNOTES_INSERTFOOTNOTE : Resource.h
  • ID_REFERENCES_FOOTNOTES_NEXTFOOTNOTE : Resource.h
  • ID_REFERENCES_FOOTNOTES_SHOWNOTES : Resource.h
  • ID_REFERENCES_INDEX_INSERTINDEX : Resource.h
  • ID_REFERENCES_INDEX_MARKENTRY : Resource.h
  • ID_REFERENCES_INDEX_UPDATEINDEX : Resource.h
  • ID_REFERENCES_INSERTCITATION_ADDNEWPLACEHOLDER : Resource.h
  • ID_REFERENCES_INSERTCITATION_ADDNEWSOURCE : Resource.h
  • ID_REFERENCES_INSERTCITATION_SEARCHLIBRARIES : Resource.h
  • ID_REFERENCES_STYLE : Resource.h
  • ID_REFERENCES_TA_INSERTTOA : Resource.h
  • ID_REFERENCES_TA_MARKCITATION : Resource.h
  • ID_REFERENCES_TA_UPDATETABLE : Resource.h
  • ID_REFERENCES_TC_UPDATETABLE : Resource.h
  • ID_REMOVE : resource.h
  • ID_REMOVERING : resource.h
  • ID_REMOVEWHEEL : resource.h
  • ID_RESET_PAGE : resource.h
  • ID_RESOURCE_NEWACCELERATORTABLE : resource.h
  • ID_RESOURCE_NEWBITMAP : resource.h
  • ID_RESOURCE_NEWCURSOR : resource.h
  • ID_RESOURCE_NEWICON : resource.h
  • ID_RESOURCE_NEWMENU : resource.h
  • ID_RESOURCE_NEWSTRINGTABLE : resource.h
  • ID_RESOURCE_NEWVERSION : resource.h
  • ID_RESOURCE_OPEN : Resource.h
  • ID_RESOURCE_OPEN_BINARY : Resource.h
  • ID_RETURN : resource.h
  • ID_REVIEW_CHANGES_ACCEPT : Resource.h
  • ID_REVIEW_CHANGES_ACCEPT_ALL : Resource.h
  • ID_REVIEW_CHANGES_ACCEPT_ALLSHOWN : Resource.h
  • ID_REVIEW_CHANGES_ACCEPT_CHANGE : Resource.h
  • ID_REVIEW_CHANGES_NEXT : Resource.h
  • ID_REVIEW_CHANGES_PREVIOUS : Resource.h
  • ID_REVIEW_CHANGES_REJECT : Resource.h
  • ID_REVIEW_CHANGES_REJECT_ALL : Resource.h
  • ID_REVIEW_CHANGES_REJECT_ALLSHOWN : Resource.h
  • ID_REVIEW_CHANGES_REJECT_CHANGE : Resource.h
  • ID_REVIEW_COMMENTS_DELETE : Resource.h
  • ID_REVIEW_COMMENTS_DELETE_ALL : Resource.h
  • ID_REVIEW_COMMENTS_DELETE_ALLSHOWN : Resource.h
  • ID_REVIEW_COMMENTS_NEWCOMMENT : Resource.h
  • ID_REVIEW_COMMENTS_NEXT : Resource.h
  • ID_REVIEW_COMMENTS_PREVIOUS : Resource.h
  • ID_REVIEW_COMPARE_COMPARE : Resource.h
  • ID_REVIEW_COMPARE_COMPARE_COMBINE : Resource.h
  • ID_REVIEW_COMPARE_COMPARE_COMPARE : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_HIDESOURCE : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_SHOWBOTH : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_SHOWORIGINAL : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_SHOWREVISED : Resource.h
  • ID_REVIEW_PROOFING_RESEARCH : Resource.h
  • ID_REVIEW_PROOFING_SETLANGUAGE : Resource.h
  • ID_REVIEW_PROOFING_SPELLINGGRAMMAR : Resource.h
  • ID_REVIEW_PROOFING_THESAURUS : Resource.h
  • ID_REVIEW_PROOFING_TRANSLATE : Resource.h
  • ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP : Resource.h
  • ID_REVIEW_PROOFING_WORDCOUNT : Resource.h
  • ID_REVIEW_PROTECT : Resource.h
  • ID_REVIEW_TRACKCHANGES_CHANGETRACKINGOPTIONS : Resource.h
  • ID_REVIEW_TRACKING_BALLOONS : Resource.h
  • ID_REVIEW_TRACKING_CHANGEUSERNAME : Resource.h
  • ID_REVIEW_TRACKING_DISPLAYFORREVIEW : Resource.h
  • ID_REVIEW_TRACKING_REVIEWINGPANE : Resource.h
  • ID_REVIEW_TRACKING_REVIEWINGPANE_HORIZONTAL : Resource.h
  • ID_REVIEW_TRACKING_REVIEWINGPANE_VERTICAL : Resource.h
  • ID_REVIEW_TRACKING_SHOW_ALLREVIEWERS : Resource.h
  • ID_REVIEW_TRACKING_SHOW_COMMENTS : Resource.h
  • ID_REVIEW_TRACKING_SHOW_FORMATTING : Resource.h
  • ID_REVIEW_TRACKING_SHOW_INK : Resource.h
  • ID_REVIEW_TRACKING_SHOW_INSERTIONSANDDELETIONS : Resource.h
  • ID_REVIEW_TRACKING_SHOW_MARKUP : Resource.h
  • ID_REVIEW_TRACKING_SHOW_MARKUPAREAHIGHLIGHT : Resource.h
  • ID_REVIEW_TRACKING_SHOWALLREVISIONS : Resource.h
  • ID_REVIEW_TRACKING_SHOWONLYCOOMENTS : Resource.h
  • ID_REVIEW_TRACKING_SHOWREVISIONS : Resource.h
  • ID_REVIEW_TRACKING_TRACKCHANGES : Resource.h
  • ID_RIBBON_A : resource.h
  • ID_RIBBON_BTN_1 : resource.h
  • ID_RIBBON_BTN_2 : resource.h
  • ID_RIBBON_BTN_3 : resource.h
  • ID_RIBBON_BTN_4 : resource.h
  • ID_RIBBON_BTN_5 : resource.h
  • ID_RIBBON_BTN_6 : resource.h
  • ID_RIBBON_BTN_7 : resource.h
  • ID_RIBBON_BTN_8 : resource.h
  • ID_RIBBON_BTN_9 : resource.h
  • ID_RIBBON_CBTN_1 : resource.h
  • ID_RIBBON_CBTN_10 : resource.h
  • ID_RIBBON_CBTN_2 : resource.h
  • ID_RIBBON_CBTN_3 : resource.h
  • ID_RIBBON_CBTN_4 : resource.h
  • ID_RIBBON_CBTN_5 : resource.h
  • ID_RIBBON_CBTN_6 : resource.h
  • ID_RIBBON_CBTN_7 : resource.h
  • ID_RIBBON_CBTN_8 : resource.h
  • ID_RIBBON_CBTN_9 : resource.h
  • ID_RIBBON_EBTN_1 : resource.h
  • ID_RIBBON_EBTN_2 : resource.h
  • ID_RIBBON_EBTN_3 : resource.h
  • ID_RIBBON_EBTN_4 : resource.h
  • ID_RIBBON_EBTN_5 : resource.h
  • ID_RIBBON_EBTN_6 : resource.h
  • ID_RIBBON_EBTN_7 : resource.h
  • ID_RIBBON_EBTN_8 : resource.h
  • ID_RIBBON_EBTN_9 : resource.h
  • ID_RIBBON_GBTN_1 : resource.h
  • ID_RIBBON_GBTN_10 : resource.h
  • ID_RIBBON_GBTN_11 : resource.h
  • ID_RIBBON_GBTN_2 : resource.h
  • ID_RIBBON_GBTN_3 : resource.h
  • ID_RIBBON_GBTN_4 : resource.h
  • ID_RIBBON_GBTN_5 : resource.h
  • ID_RIBBON_GBTN_6 : resource.h
  • ID_RIBBON_GBTN_7 : resource.h
  • ID_RIBBON_GBTN_8 : resource.h
  • ID_RIBBON_GBTN_9 : resource.h
  • ID_RIBBON_MBTN_1 : resource.h
  • ID_RIBBON_MBTN_2 : resource.h
  • ID_RIBBON_MENU_ITEM_1 : resource.h
  • ID_RIBBON_MENU_ITEM_2 : resource.h
  • ID_RIBBON_MENU_ITEM_3 : resource.h
  • ID_RIBBON_MENU_ITEM_4 : resource.h
  • ID_RIBBON_MENU_ITEM_5 : resource.h
  • ID_RIBBON_MENU_ITEM_6 : resource.h
  • ID_RIBBON_OBTN_1 : resource.h
  • ID_RIBBON_OBTN_10 : resource.h
  • ID_RIBBON_OBTN_11 : resource.h
  • ID_RIBBON_OBTN_2 : resource.h
  • ID_RIBBON_OBTN_3 : resource.h
  • ID_RIBBON_OBTN_4 : resource.h
  • ID_RIBBON_OBTN_5 : resource.h
  • ID_RIBBON_OBTN_6 : resource.h
  • ID_RIBBON_OBTN_7 : resource.h
  • ID_RIBBON_OBTN_8 : resource.h
  • ID_RIBBON_OBTN_9 : resource.h
  • ID_RIBBON_PBTN_1 : resource.h
  • ID_RIBBON_PBTN_2 : resource.h
  • ID_RIBBON_PBTN_3 : resource.h
  • ID_RIBBON_PBTN_4 : resource.h
  • ID_RIBBON_PBTN_5 : resource.h
  • ID_RIBBON_SOURCE_CODE_1_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_1_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_1_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_2_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_2_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_4 : resource.h
  • ID_RIBBON_SOURCE_CODE_4_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_4_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_5_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_5_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_5_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_4 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_5 : resource.h
  • ID_RIBBON_Z : resource.h
  • ID_ROOT_MENU1 : resource.h
  • ID_ROOT_MENU2 : resource.h
  • ID_ROUNDRECTANGLE : resource.h
  • ID_RULES_WIZARD : resource.h
  • ID_RUNMACRO : Resource.H
  • ID_SAVE : resource.h
  • ID_SAVE_DEBUG_CONF : resource.h
  • ID_SAVE_REGULAR_CONF : resource.h
  • ID_SECTION_FROMFILE : resource.h
  • ID_SECTION_REMOVE : resource.h
  • ID_SELECT : resource.h
  • ID_SELECTCOLOR : resource.h
  • ID_SEND_RECEIVE : resource.h
  • ID_SET_STYLE : Resource.h
  • ID_SET_TABSTOPS : resource.h
  • ID_SHORTCUT_1 : resource.h
  • ID_SHORTCUT_2 : resource.h
  • ID_SHORTCUT_3 : resource.h
  • ID_SHORTCUT_4 : resource.h
  • ID_SHORTCUTS_PANE_1 : resource.h
  • ID_SHORTCUTS_PANE_2 : resource.h
  • ID_SHORTCUTS_TREE : resource.h
  • ID_SHOW_FOLDERS_POPUP : resource.h
  • ID_SIMPLE_PROPERTY_SHEET : resource.h
  • ID_SINGLE_THREAD : resource.h
  • ID_SIZE_BASE : resource.h
  • ID_SIZE_DOUBLE : resource.h
  • ID_SIZE_FILL : resource.h
  • ID_SIZE_FULLSCREEN : resource.h
  • ID_SIZE_HALF : resource.h
  • ID_SIZE_ORIGINAL : resource.h
  • ID_SLIDER : resource.h
  • ID_SLOWDRAWING : Resource.H
  • ID_SMALLRING : resource.h
  • ID_SMALLWHEEL : resource.h
  • ID_SOLUTION_OPEN : Resource.h
  • ID_SOLUTION_OPEN_WITH : Resource.h
  • ID_SORT_MENU : Resource.h
  • ID_SORTING_GROUPBYTYPE : Resource.h
  • ID_SORTING_SORTALF : Resource.h
  • ID_SORTING_SORTBYACCESS : Resource.h
  • ID_SORTING_SORTBYTYPE : Resource.h
  • ID_SORTINGGROUP : resource.h
  • ID_SORTINGPROP : Resource.h
  • ID_SPEED_FAST : resource.h
  • ID_SPEED_SLOW : resource.h
  • ID_SPLITBUTTONMENU_VALIDATEALL : resource.h
  • ID_SPLITBUTTONMENU_VALIDATEIPV4 : resource.h
  • ID_SPLITBUTTONMENU_VALIDATEIPV6 : resource.h
  • ID_SPLITBUTTONMENU_VALIDATENAMED : resource.h
  • ID_STATUSBAR_COLUMN : Resource.h
  • ID_STATUSBAR_DRAFT : Resource.h
  • ID_STATUSBAR_FULL_SCREEN_READING : Resource.h
  • ID_STATUSBAR_LINE : Resource.h
  • ID_STATUSBAR_LINK : Resource.h
  • ID_STATUSBAR_MASTER_DOCUMENT_TOOLS : Resource.h
  • ID_STATUSBAR_PAGE : Resource.h
  • ID_STATUSBAR_PANE1 : resource.h
  • ID_STATUSBAR_PANE2 : resource.h
  • ID_STATUSBAR_PANE_OBJECTCOUNT : resource.h
  • ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT : resource.h
  • ID_STATUSBAR_PRINTLAYOUT : Resource.h
  • ID_STATUSBAR_PROGRESS : Resource.h
  • ID_STATUSBAR_REFRESH : Resource.h
  • ID_STATUSBAR_SPELL : Resource.h
  • ID_STATUSBAR_WEBLAYOUT : Resource.h
  • ID_STATUSBAR_ZOOM : Resource.h
  • ID_STATUSBAR_ZOOM_SLIDER : Resource.h
  • ID_STOP_HIGHLIGHTING : Resource.h
  • ID_STRINGLIST : resource.h
  • ID_STYLE_BASE : resource.h
  • ID_STYLE_CENTERED : resource.h
  • ID_STYLE_JUSTIFIED : resource.h
  • ID_STYLE_LEFT : resource.h
  • ID_STYLE_RIGHT : resource.h
  • ID_STYLECHANGE_COLORS : Resource.h
  • ID_STYLECHANGE_FONTS : Resource.h
  • ID_STYLECHANGE_SETDEFAULT : Resource.h
  • ID_STYLECHANGE_STYLESET : Resource.h
  • ID_TABLE_BANDEDCOLUMNS : Resource.h
  • ID_TABLE_BANDEDROWS : Resource.h
  • ID_TABLE_CONVERTTOTABLE : Resource.h
  • ID_TABLE_DELETECELLS : resource.h
  • ID_TABLE_DELETECOLUMNS : resource.h
  • ID_TABLE_DELETEROWS : resource.h
  • ID_TABLE_DRAWTABLE : Resource.h
  • ID_TABLE_EXCELSPREADSHEET : Resource.h
  • ID_TABLE_FIRSTCOLUMN : Resource.h
  • ID_TABLE_HEADERROW : Resource.h
  • ID_TABLE_INSERT : resource.h
  • ID_TABLE_INSERTCELL : resource.h
  • ID_TABLE_INSERTCOLUMN : resource.h
  • ID_TABLE_INSERTROW : resource.h
  • ID_TABLE_INSERTTABLE : resource.h
  • ID_TABLE_LASTCOLUMN : Resource.h
  • ID_TABLE_MERGECELLS : resource.h
  • ID_TABLE_OF_CONTENTS : Resource.h
  • ID_TABLE_QUICKTABLES : Resource.h
  • ID_TABLE_SPLITCELL : resource.h
  • ID_TABLE_TABLE : Resource.h
  • ID_TABLE_TOTALROW : Resource.h
  • ID_TASK1 : resource.h
  • ID_TASK2 : resource.h
  • ID_TASK3 : resource.h
  • ID_TASK4 : resource.h
  • ID_TASK5 : resource.h
  • ID_TASK6 : resource.h
  • ID_TASK7 : resource.h
  • ID_TASK8 : resource.h
  • ID_TASK9 : resource.h
  • ID_TBSTYLEBUTTON : resource.h
  • ID_TBSTYLECHECKGROUP : resource.h
  • ID_TBSTYLETOOLTIPS : resource.h
  • ID_TBSTYLETOOLTIPS2 : resource.h
  • ID_TBSTYLEWRAPABLE : resource.h
  • ID_THREAD_10NEWBALLS : resource.h
  • ID_THREAD_10NEWLINES : resource.h
  • ID_THREAD_10NEWRECTANGLES : resource.h
  • ID_THREAD_25NEWBALLS : resource.h
  • ID_THREAD_25NEWLINES : resource.h
  • ID_THREAD_25NEWRECTANGLES : resource.h
  • ID_THREAD_KILLTHREADS : resource.h
  • ID_THREAD_KILLTHREADSSLOW : resource.h
  • ID_THREAD_NEWBALL : resource.h
  • ID_THREAD_NEWLINE : resource.h
  • ID_THREAD_NEWRECTANGLE : resource.h
  • ID_THREE_COLUMNS : resource.h
  • ID_TIME : resource.h
  • ID_TIMER : timectl.cpp
  • ID_TIMERTICK : resource.h
  • ID_TINYWHEEL : resource.h
  • ID_TOGGLE_INSERT : resource.h
  • ID_TOOLBAR_CUSTOMIZE : Resource.h
  • ID_TOOLBAR_EDITING : resource.h
  • ID_TOOLBARS_BROWSE : resource.h
  • ID_TOOLBARS_DEBUG : resource.h
  • ID_TOOLBARS_EDIT : resource.h
  • ID_TOOLBARS_MAIN : resource.h
  • ID_TOOLBARS_PALETTE : resource.h
  • ID_TOOLBARS_RESOURCE : resource.h
  • ID_TOOLBARSTYLE : resource.h
  • ID_TOOLBARSTYLE2 : resource.h
  • ID_TOOLS_CONNECT_TO_DATABASE : Resource.h
  • ID_TOOLS_DEBUG_PROCESSES : Resource.h
  • ID_TOOLS_ENTRY : Resource.h , resource.h , Resource.h
  • ID_TOOLS_MACRO : Resource.h
  • ID_TOOLS_MACROS : Resource.H
  • ID_TOOLS_MAKEBW : resource.h
  • ID_TOOLS_OLEVIEW : Resource.H
  • ID_TOOLS_OPTIONS : resource.h , Resource.h , resource.h , Resource.h
  • ID_TOOLS_REGEDIT : Resource.H
  • ID_TOOLS_RUNSCRIPT : Resource.H
  • ID_TOOLS_TOOLBAR : resource.h
  • ID_TRACEWIDTH : resource.h
  • ID_TREE_COLLAPSEBRANCH : resource.h
  • ID_TREE_CTRL : resource.h
  • ID_TREE_EXPANDALL : resource.h
  • ID_TREE_EXPANDBRANCH : resource.h
  • ID_TREE_EXPANDONELEVEL : resource.h
  • ID_TREEVIEW : tlbtree.h , resource.h
  • ID_TWO_COLUMNS : resource.h
  • ID_TWOPASSDRAWING : Resource.H
  • ID_TYPEDARRAY : resource.h
  • ID_TYPEDLIST : resource.h
  • ID_TYPEDPTRARRAY : resource.h
  • ID_TYPEDPTRMAP : resource.h
  • ID_UI_THREAD : resource.h
  • ID_USER_TOOL1 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL10 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL2 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL3 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL4 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL5 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL6 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL7 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL8 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL9 : Resource.h , resource.h , Resource.h
  • ID_VERYLARGERING : resource.h
  • ID_VERYLARGEWHEEL : resource.h
  • ID_VIEW_ADDRESS_BAR : Resource.h
  • ID_VIEW_ADVANCED_TOOLBAR : resource.h
  • ID_VIEW_APP_LOOK : resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2000 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2003 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_1 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_2 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_3 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_4 : resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_SCENIC : resource.h
  • ID_VIEW_APPLOOK_VS2005 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_WIN7 : Resource.h
  • ID_VIEW_APPLOOK_WIN_XP : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_XP : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_ARRANGE : Resource.h
  • ID_VIEW_ARRANGEALL : Resource.h
  • ID_VIEW_BACK : resource.h
  • ID_VIEW_BUILD_TOOLBAR : Resource.h
  • ID_VIEW_CAPTIONBAR : resource.h
  • ID_VIEW_CB_CAPTION : Resource.h
  • ID_VIEW_CLASS : Resource.h
  • ID_VIEW_CLASSIDS : resource.h
  • ID_VIEW_CLIENTWIDTHSEL : resource.h
  • ID_VIEW_COMPARE : Resource.h
  • ID_VIEW_CONTAINERINFO : Resource.H
  • ID_VIEW_CUSTOMIZE : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_DETAILSMODE : resource.h
  • ID_VIEW_DLGBAR : resource.h
  • ID_VIEW_DLGBARTOP : resource.h
  • ID_VIEW_DOCUMENT_TAB : Resource.h
  • ID_VIEW_DOCUMENTMAP : Resource.h
  • ID_VIEW_DRAFT : Resource.h
  • ID_VIEW_DYNAMICHELP : Resource.h
  • ID_VIEW_EDIT_TOOLBAR : Resource.h
  • ID_VIEW_EDITCTRL : Resource.h
  • ID_VIEW_EDITINGTOOLBAR : resource.h
  • ID_VIEW_EVENTLOG : Resource.H
  • ID_VIEW_EXPLORERBAR : Resource.h
  • ID_VIEW_FILE : Resource.h
  • ID_VIEW_FIND_NEXT : resource.h
  • ID_VIEW_FOLDER_LIST : resource.h
  • ID_VIEW_FOLDERS : Resource.h
  • ID_VIEW_FONTS_LARGE : Resource.h
  • ID_VIEW_FONTS_LARGEST : Resource.h
  • ID_VIEW_FONTS_MEDIUM : Resource.h
  • ID_VIEW_FONTS_SMALL : Resource.h
  • ID_VIEW_FONTS_SMALLEST : Resource.h
  • ID_VIEW_FORCE_GRADIENT : Resource.h
  • ID_VIEW_FORMATBAR : resource.h
  • ID_VIEW_FORWARD : resource.h
  • ID_VIEW_FULL_SCREEN : resource.h
  • ID_VIEW_FULLSCREEN : Resource.h , resource.h
  • ID_VIEW_GOTO_CALENDAR : resource.h
  • ID_VIEW_GOTO_DRAFTS : resource.h
  • ID_VIEW_GOTO_FAVORITES : resource.h
  • ID_VIEW_GOTO_HOME : resource.h
  • ID_VIEW_GOTO_INBOX : resource.h
  • ID_VIEW_GOTO_JOURNAL : resource.h
  • ID_VIEW_GOTO_NOTES : resource.h
  • ID_VIEW_GOTO_OUTBOX : resource.h
  • ID_VIEW_GOTO_PERSONAL : resource.h
  • ID_VIEW_GOTO_SENTITEMS : resource.h
  • ID_VIEW_GOTO_TASKS : resource.h
  • ID_VIEW_GRID : resource.h
  • ID_VIEW_GRIDLINES : Resource.h
  • ID_VIEW_GROUPBYTYPEKIND : resource.h
  • ID_VIEW_HOME : resource.h
  • ID_VIEW_INFOBAR : Resource.h
  • ID_VIEW_LARGEICONS : resource.h
  • ID_VIEW_LINKS_BAR : Resource.h
  • ID_VIEW_LISTMODE : resource.h
  • ID_VIEW_LONG : resource.h
  • ID_VIEW_MACROBAR : Resource.H
  • ID_VIEW_MACROS : Resource.h
  • ID_VIEW_MAIL_TOOLBAR : resource.h
  • ID_VIEW_MDI_TABS : Resource.h
  • ID_VIEW_MESSAGEBAR : Resource.h
  • ID_VIEW_MY_COMPUTER : resource.h
  • ID_VIEW_NEWWINDOW : Resource.h
  • ID_VIEW_NOTIFICATIONLOG : Resource.H
  • ID_VIEW_OPTIONS : resource.h
  • ID_VIEW_OUTLINE : Resource.h
  • ID_VIEW_OUTLOOKBAR : resource.h
  • ID_VIEW_OUTLOOKBAR2003 : resource.h
  • ID_VIEW_OUTPUT : resource.h , Resource.h
  • ID_VIEW_OUTPUT_WINDOW : Resource.H
  • ID_VIEW_PAPERCOLOR : resource.h
  • ID_VIEW_PAUSE_BLIT : Resource.h
  • ID_VIEW_PAUSE_BLUR : Resource.h
  • ID_VIEW_PAUSE_SWARM : Resource.h
  • ID_VIEW_PREVIEW_PANE : resource.h
  • ID_VIEW_PRINTLAYOUT : Resource.h
  • ID_VIEW_PROPERTIES : Resource.h
  • ID_VIEW_REFRESH : Resource.h , resource.h , Resource.h
  • ID_VIEW_RESETWINDOW : Resource.h
  • ID_VIEW_RESOURCE : Resource.h
  • ID_VIEW_ROWDETAILS : resource.h
  • ID_VIEW_RTL : Resource.h
  • ID_VIEW_RULER : resource.h , Resource.h , resource.h
  • ID_VIEW_SETHANDLESIZE : resource.h
  • ID_VIEW_SETMINIMUMSIZE : resource.h
  • ID_VIEW_SHORT : resource.h
  • ID_VIEW_SHOWALLINTERFACES : resource.h
  • ID_VIEW_SHOWOBJECTS : resource.h
  • ID_VIEW_SMALLICONS : resource.h
  • ID_VIEW_SOURCE : resource.h
  • ID_VIEW_SPLIT : Resource.h
  • ID_VIEW_STATEICONS : resource.h
  • ID_VIEW_STATUS_BAR : resource.h
  • ID_VIEW_STOP : Resource.h
  • ID_VIEW_SWITCHWINDOW : Resource.h
  • ID_VIEW_SYNCSCROLLING : Resource.h
  • ID_VIEW_TAB_FLAT_BORDERS : Resource.h
  • ID_VIEW_TASK_PANE : Resource.h , resource.h
  • ID_VIEW_TASKPANE : resource.h
  • ID_VIEW_TEST : resource.h
  • ID_VIEW_TEXTLABELS : Resource.h
  • ID_VIEW_THEME_TOOLBAR : resource.h
  • ID_VIEW_TOOLBAR : resource.h
  • ID_VIEW_TOOLBARS : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_TOOLS_PALETTE : resource.h
  • ID_VIEW_TRUMBNAILS : Resource.h
  • ID_VIEW_UP : resource.h
  • ID_VIEW_UPDATENOW : resource.h
  • ID_VIEW_USER_TOOLBAR1 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR10 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR2 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR3 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR4 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR5 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR6 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR7 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR8 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR9 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_VIEWS : Resource.h
  • ID_VIEW_WATCH : Resource.h
  • ID_VIEW_WEB : resource.h
  • ID_VIEW_WEB_TOOLBAR : resource.h
  • ID_VIEW_WEBLAYOUT : Resource.h
  • ID_VIEW_WORKSPACE : resource.h , Resource.h , resource.h
  • ID_VIEW_WORKSPACE2 : resource.h
  • ID_VIEW_ZOOM : Resource.h
  • ID_VIEW_ZOOM100 : resource.h
  • ID_VIEW_ZOOM125 : resource.h
  • ID_VIEW_ZOOM150 : resource.h
  • ID_VIEW_ZOOM175 : resource.h
  • ID_VIEW_ZOOM200 : resource.h
  • ID_VIEW_ZOOM25 : resource.h
  • ID_VIEW_ZOOM250 : resource.h
  • ID_VIEW_ZOOM300 : resource.h
  • ID_VIEW_ZOOM50 : resource.h
  • ID_VIEW_ZOOM75 : resource.h
  • ID_VIEW_ZOOM_100 : Resource.h
  • ID_VIEW_ZOOM_ONE_PAGE : Resource.h
  • ID_VIEW_ZOOM_PAGE_WIDTH : Resource.h
  • ID_VIEW_ZOOM_TWO_PAGES : Resource.h
  • ID_VIEW_ZOOMCUSTOM : resource.h
  • ID_WEB_ADDRESS : resource.h
  • ID_WEB_BACK : resource.h
  • ID_WEB_FIND : resource.h
  • ID_WEB_FORWARD : resource.h
  • ID_WEB_REFRESH : resource.h
  • ID_WEB_START : resource.h
  • ID_WEB_STOP : resource.h
  • ID_WHITE : resource.h
  • ID_WINDOW_CLOSE_ALL : Resource.h
  • ID_WINDOW_MANAGER : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_WINDOW_WINDOWS : resource.h
  • ID_WINDOWS_MENU : resource.h
  • ID_WORD_WRAP : resource.h
  • ID_WORKER_THREAD : resource.h
  • ID_WRITE_APPLYSTYLES : Resource.h
  • ID_WRITE_CHANGESTYLES : Resource.h
  • ID_WRITE_CLEARFORMATTING : Resource.h
  • ID_WRITE_CLIPBOARD : Resource.h
  • ID_WRITE_FONT : Resource.h
  • ID_WRITE_PARAGRAPH : Resource.h
  • ID_WRITE_PASTEASHYPERLINK : resource.h
  • ID_WRITE_QUICKSTYLES : Resource.h
  • ID_WRITE_SAVESTYLE : Resource.h
  • ID_WRITE_SELECT : Resource.h
  • ID_WRITE_STYLE : Resource.h
  • ID_YELLOW : resource.h
  • ID_ZOOMIN : resource.h
  • ID_ZOOMOUT : resource.h
  • IDABOUT : resource.h
  • IDB_0 : resource.h
  • IDB_1 : resource.h
  • IDB_2 : resource.h
  • IDB_3 : resource.h
  • IDB_4 : resource.h
  • IDB_5 : resource.h
  • IDB_6 : resource.h
  • IDB_7 : resource.h
  • IDB_8 : resource.h
  • IDB_9 : resource.h
  • IDB_ADVANCED_HC : resource.h
  • IDB_ANIMATION : resource.h
  • IDB_ANIMATION_HC : resource.h
  • IDB_AUTOMATION : resource.h
  • IDB_BACK : resource.h
  • IDB_BITMAP1 : resource.h
  • IDB_BITMAP48 : resource.h
  • IDB_BITMAP_PRINTER : resource.h
  • IDB_BITMAP_TT : resource.h
  • IDB_BMTREEBIRD : resource.h
  • IDB_BMTREEBIRDSELECTED : resource.h
  • IDB_BMTREEDOG : resource.h
  • IDB_BMTREEDOGSELECTED : resource.h
  • IDB_BMTREEFIRST : resource.h
  • IDB_BMTREEFISH : resource.h
  • IDB_BMTREEFISHSELECTED : resource.h
  • IDB_BMTREELAST : resource.h
  • IDB_BREAK : Resource.h
  • IDB_BTN1 : resource.h
  • IDB_BTN1_32 : resource.h
  • IDB_BTN1_HOT : resource.h
  • IDB_BTN1_HOT_32 : resource.h
  • IDB_BUILD24 : Resource.h
  • IDB_BULLETS : Resource.h
  • IDB_BUTTON : resource.h
  • IDB_BUTTONS : Resource.h , resource.h
  • IDB_CANCEL : resource.h
  • IDB_CAPTION : resource.h
  • IDB_CHART : Resource.h
  • IDB_CHART_DESIGN : Resource.h
  • IDB_CHART_DESIGNLARGE : Resource.h
  • IDB_CHART_FORMAT : Resource.h
  • IDB_CHART_FORMATLARGE : Resource.h
  • IDB_CHART_LAYOUT : Resource.h
  • IDB_CHART_LAYOUTLARGE : Resource.h
  • IDB_CHECK : resource.h , Resource.h
  • IDB_CHECK32 : resource.h
  • IDB_CHECKNO : resource.h
  • IDB_CHECKNO32 : resource.h
  • IDB_CIRC : resource.h
  • IDB_CLASS_VIEW : Resource.h
  • IDB_CLASS_VIEW_24 : Resource.h
  • IDB_CLEAR : resource.h
  • IDB_CLOCK : resource.h
  • IDB_CLOSE : resource.h
  • IDB_COLDTOOLBAR : Resource.h
  • IDB_CONTAINER : resource.h
  • IDB_CONTAINER32 : resource.h
  • IDB_CURRENT : Resource.h
  • IDB_DELETE : resource.h
  • IDB_DISABLEDTOOLBAR : Resource.h
  • IDB_DIVIDE : resource.h
  • IDB_DOWNBITMAP : resource.h
  • IDB_DYNAMICHELP : Resource.h
  • IDB_DYNAMICHELP24 : Resource.h
  • IDB_EDIT24 : Resource.h
  • IDB_EQUAL : resource.h
  • IDB_FILE_VIEW : Resource.h
  • IDB_FILE_VIEW24 : Resource.h
  • IDB_FILELARGE : Resource.h , resource.h
  • IDB_FILESMALL : Resource.h , resource.h
  • IDB_FIRST : oleview.h
  • IDB_FLAG : resource.h
  • IDB_FONTTYPE : resource.h
  • IDB_FORMATBAR : resource.h
  • IDB_FORMATBAR_BIG : resource.h
  • IDB_GLOBE : resource.h
  • IDB_HEADER_IMAGES : resource.h
  • IDB_HEADERPAT_1 : Resource.h
  • IDB_HEADERPAT_2 : Resource.h
  • IDB_HEADERPAT_3 : Resource.h
  • IDB_HEADERPAT_4 : Resource.h
  • IDB_HELPTOOLBAR_24 : Resource.h
  • IDB_HOTTOOLBAR : Resource.h
  • IDB_ICON1 : resource.h
  • IDB_ICON2 : resource.h
  • IDB_ICONS : resource.h
  • IDB_ICONS32 : resource.h
  • IDB_ICONS_LARGE : resource.h
  • IDB_ICONS_SMALL : resource.h
  • IDB_IFACEFOLDER : resource.h
  • IDB_IMAGE : Resource.h , resource.h
  • IDB_IMAGE_COLLECTION : Resource.h
  • IDB_IMAGE_COLLECTION_SMALL : Resource.h
  • IDB_IMAGELIST : resource.h
  • IDB_IMG_INTELLISENSE : Resource.h
  • IDB_IMG_INTELLISENSE_HC : Resource.h
  • IDB_INFO : Resource.h
  • IDB_INSERT : Resource.h
  • IDB_INSERTLARGE : Resource.h
  • IDB_INTERFACE : resource.h
  • IDB_LARGEICONS : resource.h
  • IDB_LAYOUT : Resource.h
  • IDB_LICENSED : resource.h
  • IDB_LINEWEIGHT : resource.h
  • IDB_LIST_IMAGES : resource.h
  • IDB_LOCALIZE : resource.h
  • IDB_LOGO : resource.h
  • IDB_MAIL_HC : resource.h
  • IDB_MAILINGS : Resource.h
  • IDB_MAILINGSLARGE : Resource.h
  • IDB_MAIN : Resource.h , resource.h
  • IDB_MAINFRAME_HC : resource.h
  • IDB_MENU16 : Resource.h
  • IDB_MENU256 : Resource.h
  • IDB_MENU_IMAGE_HC : resource.h
  • IDB_MENU_IMAGES : Resource.h
  • IDB_MENU_IMAGES_16 : Resource.h
  • IDB_MENU_LOGO : resource.h
  • IDB_MENUIMAGES : resource.h
  • IDB_MENUIMAGES24 : Resource.h
  • IDB_MINUS : resource.h
  • IDB_MSM_VIEW_BKGND : Resource.h
  • IDB_MULTI : Resource.h
  • IDB_NUM : Resource.h
  • IDB_OBJECT : resource.h
  • IDB_OBJECT32 : resource.h
  • IDB_OBJECT_CONTROL : resource.h
  • IDB_OBJECT_CONTROL32 : resource.h
  • IDB_OBJECT_INSERTABLE : resource.h
  • IDB_OBJECT_INSERTABLE10 : resource.h
  • IDB_OBJECT_INSERTABLE1032 : resource.h
  • IDB_OBJECT_INSERTABLE32 : resource.h
  • IDB_OBJECTFOLDER : resource.h
  • IDB_OK : resource.h
  • IDB_OPTIONS : Resource.h
  • IDB_OPTIONSIMAGES : Resource.h
  • IDB_OUTLOOK_LARGE : resource.h
  • IDB_OUTLOOK_LARGE_HC : resource.h
  • IDB_OUTLOOK_SMALL : resource.h
  • IDB_OUTLOOK_SMALL_HC : resource.h
  • IDB_PAGELAYOUT : Resource.h
  • IDB_PAGELAYOUTLARGE : Resource.h
  • IDB_PAGES : resource.h
  • IDB_PAGES_HC : resource.h
  • IDB_PAGES_SMALL : resource.h
  • IDB_PAGES_SMALL_HC : resource.h
  • IDB_PAL : resource.h
  • IDB_PALETTE : resource.h
  • IDB_PENCIL : resource.h
  • IDB_PICTURE : Resource.h
  • IDB_PICTURE_FORMAT : Resource.h
  • IDB_PICTURE_FORMATLARGE : Resource.h
  • IDB_PIN : resource.h
  • IDB_PLAY : resource.h
  • IDB_PLAY_HOT : resource.h
  • IDB_PLUS : resource.h
  • IDB_POSITION_1 : Resource.h
  • IDB_POSITION_2 : Resource.h
  • IDB_PRESSEDTOOLBAR : Resource.h
  • IDB_PRINTER : resource.h
  • IDB_PROP24 : Resource.h
  • IDB_PROPICONS : resource.h
  • IDB_PUSH : resource.h
  • IDB_QUESTION : resource.h
  • IDB_QUESTION32 : resource.h
  • IDB_RADIO_OFF : resource.h
  • IDB_RADIO_OFF32 : resource.h
  • IDB_RADIO_ON : resource.h
  • IDB_RADIO_ON32 : resource.h
  • IDB_REFERENCES : Resource.h
  • IDB_REFERENCESLARGE : Resource.h
  • IDB_RESOURCE_VIEW : Resource.h
  • IDB_RESOURCE_VIEW24 : Resource.h
  • IDB_REVIEW : Resource.h
  • IDB_REVIEWLARGE : Resource.h
  • IDB_RIBBON_CATEGORY1_LARGE : resource.h
  • IDB_RIBBON_CATEGORY1_SMALL : resource.h
  • IDB_RIBBON_CATEGORY2_LARGE : resource.h
  • IDB_RIBBON_CATEGORY2_SMALL : resource.h
  • IDB_RIBBON_CATEGORY3_LARGE : resource.h
  • IDB_RIBBON_CATEGORY3_SMALL : resource.h
  • IDB_RIBBON_CATEGORY4_SMALL : resource.h
  • IDB_RIBBON_CATEGORY5_SMALL : resource.h
  • IDB_RIBBON_CATEGORY6_LARGE : resource.h
  • IDB_RIBBON_CATEGORY6_SMALL : resource.h
  • IDB_RIBBON_FILE_LARGE : resource.h
  • IDB_RIBBON_FILE_SMALL : resource.h
  • IDB_RIBBON_FILELARGE : resource.h
  • IDB_RIBBON_FILESMALL : resource.h
  • IDB_RIBBON_FORMATLARGE : resource.h
  • IDB_RIBBON_FORMATSMALL : resource.h
  • IDB_RIBBON_HOMELARGE : resource.h
  • IDB_RIBBON_HOMESMALL : resource.h
  • IDB_RIBBON_ICONS : resource.h
  • IDB_RIBBON_MAIN : resource.h
  • IDB_RIBBON_PALETTE_1 : resource.h
  • IDB_RIBBON_PALETTE_2 : resource.h
  • IDB_RIBBON_VIEWLARGE : resource.h
  • IDB_RIBBON_VIEWSMALL : resource.h
  • IDB_RULER_BLOCK : resource.h
  • IDB_RULER_BLOCKM : resource.h
  • IDB_RULER_DOWN : resource.h
  • IDB_RULER_DOWNM : resource.h
  • IDB_RULER_TAB : resource.h
  • IDB_RULER_TABM : resource.h
  • IDB_RULER_UP : resource.h
  • IDB_RULER_UPM : resource.h
  • IDB_SHAPE1 : Resource.h
  • IDB_SHAPE2 : Resource.h
  • IDB_SHAPE3 : Resource.h
  • IDB_SHAPE4 : Resource.h
  • IDB_SHAPE5 : Resource.h
  • IDB_SHAPE6 : Resource.h
  • IDB_SHAPE7 : Resource.h
  • IDB_SHORTCUTS : resource.h
  • IDB_SMALLICONS : resource.h
  • IDB_SOLUTION_EXPLORER_24 : Resource.h
  • IDB_SORT24 : Resource.h
  • IDB_SPELL : Resource.h
  • IDB_SPINDIAL : resource.h
  • IDB_STATEICONS : resource.h
  • IDB_STATUS_ANIMATION : Resource.h
  • IDB_STATUS_READY : Resource.h
  • IDB_STATUSBAR_1 : resource.h
  • IDB_STATUSBAR_2 : resource.h
  • IDB_STOP : resource.h
  • IDB_STOP_HOT : resource.h
  • IDB_STYLES : resource.h , Resource.h
  • IDB_TABLE : Resource.h
  • IDB_TASKPANE_TOOLBAR : resource.h
  • IDB_TASKS : resource.h
  • IDB_TASKS_HC : resource.h
  • IDB_TASKSPANE_TOOLBAR : resource.h
  • IDB_TEST_BITMAP : resource.h
  • IDB_TESTHELP : resource.h
  • IDB_THEME_COLORS : Resource.h
  • IDB_THEME_EFFECTS : Resource.h
  • IDB_THEME_FONTS : Resource.h
  • IDB_THEME_THEMES : Resource.h
  • IDB_TIME : resource.h
  • IDB_TIMES : resource.h
  • IDB_TOOLBAR24 : Resource.h
  • IDB_TOOLBAR256 : Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDB_TOOLBAR_HC : resource.h
  • IDB_TOOLBARCOLD256 : Resource.h
  • IDB_TOOLS_PAGE1 : Resource.h
  • IDB_TOOLS_PAGE1_HC : Resource.h
  • IDB_TOOLS_PAGE2 : Resource.h
  • IDB_TOOLS_PAGE2_HC : Resource.h
  • IDB_TOOLS_PAGE3 : Resource.h
  • IDB_TOOLS_PAGE3_HC : Resource.h
  • IDB_TOOLTIP_CLIPBOARD : Resource.h
  • IDB_TOOLTIP_FONTDLG : Resource.h
  • IDB_TOOLTIP_MAIN : Resource.h
  • IDB_TOOLTIP_PARAGRAPH : Resource.h
  • IDB_TREE_ICONS : resource.h
  • IDB_TYPELIBFOLDER : resource.h
  • IDB_UPBITMAP : resource.h
  • IDB_VIEW : Resource.h
  • IDB_VIEWLARGE : Resource.h
  • IDB_VIEWPAT_1 : Resource.h
  • IDB_VIEWPAT_2 : Resource.h
  • IDB_VIEWPAT_3 : Resource.h
  • IDB_VIEWPAT_4 : Resource.h
  • IDB_WEB_HC : resource.h
  • IDB_WORKSPACE : resource.h , Resource.h , resource.h
  • IDB_WRITE : Resource.h , resource.h
  • IDB_WRITELARGE : Resource.h , resource.h
  • IDB_XLIST : resource.h
  • IDC_ACTIVETAB_CLOSE_BUTTON : Resource.h
  • IDC_ADD : resource.h , Resource.H
  • IDC_ADD_BORDER : resource.h
  • IDC_ADD_OR_UPDATE : resource.h
  • IDC_ADDRCOMBO : resource.h
  • IDC_ADDRESS : resource.h
  • IDC_ADVISEDATA : resource.h
  • IDC_ALC_FIRST : otherids.h
  • IDC_ALIGN : resource.h
  • IDC_ALLOWEDIT_ALWAYS : Resource.H
  • IDC_ALLOWEDIT_NEVER : Resource.H
  • IDC_ALLOWEDIT_PROMPT : Resource.H
  • IDC_ALLOWWINDOWLESS : Resource.H
  • IDC_ALLRIGHTSRESERVED : resource.h
  • IDC_ALTDRAG : resource.h
  • IDC_ALTSELECT : penwin.h
  • IDC_ALWAYS : Resource.H
  • IDC_AMERICAN : resource.h
  • IDC_ANIM_SPEED : resource.h
  • IDC_ANIM_SPEED_VAL : resource.h
  • IDC_ANIMATE : resource.h
  • IDC_ANIMATE_XY : resource.h
  • IDC_ANIMATEPOS : resource.h
  • IDC_ANIMATION : resource.h
  • IDC_ANIMFRAME : resource.h
  • IDC_ANIMSTATUS : resource.h
  • IDC_APP_LOOK : Resource.h
  • IDC_APP_LOOK1 : resource.h , Resource.h , resource.h
  • IDC_APP_LOOK2 : resource.h , Resource.h , resource.h
  • IDC_APP_LOOK3 : resource.h , Resource.h , resource.h
  • IDC_APP_LOOK4 : Resource.h
  • IDC_APP_LOOK5 : Resource.h
  • IDC_APP_LOOK6 : Resource.h
  • IDC_APPLY : resource.h , Resource.h , resource.h
  • IDC_APPNAME : resource.h
  • IDC_AUTHOR : resource.h
  • IDC_AUTO_CLOSE : resource.h
  • IDC_AUTOARRANGE : resource.h
  • IDC_AUTOCLOSE_TIME : resource.h
  • IDC_AUTOCLOSE_VAL : resource.h
  • IDC_AUTOPLAY : resource.h
  • IDC_AUTOSIZE : Resource.h
  • IDC_AVAILABLECATEGORIES : Resource.H
  • IDC_BACK_COLOR : resource.h
  • IDC_BACKGROUND : resource.h
  • IDC_BANER : Resource.h
  • IDC_Basic : Resource.h
  • IDC_BEER : resource.h
  • IDC_BIGICON : resource.h
  • IDC_BITDEPTH : resource.h
  • IDC_BLACK : resource.h
  • IDC_BLUE : resource.h
  • IDC_BOLD_LABEL : resource.h
  • IDC_BORDER : resource.h
  • IDC_BORDER_LABEL : resource.h
  • IDC_BORDERCHECK : resource.h
  • IDC_BOUNCE_WND : bounce.h
  • IDC_BOX : resource.h
  • IDC_BOXT : resource.h
  • IDC_BROWSE : Resource.h , resource.h
  • IDC_BTN_SEARCH : resource.h
  • IDC_BTN_SET_HEIGHT_IN_PIXELS : resource.h
  • IDC_BTN_SET_WIDTH_IN_PIXELS : resource.h
  • IDC_BTNGO : resource.h
  • IDC_BUT_ID : Resource.h
  • IDC_BUTTON : resource.h
  • IDC_BUTTON1 : Resource.h , otherids.h , resource.h , Resource.h
  • IDC_BUTTON2 : Resource.h , otherids.h , resource.h
  • IDC_BUTTON3 : Resource.h , otherids.h
  • IDC_BUTTON4 : Resource.h , otherids.h
  • IDC_BUTTON5 : resource.h , Resource.h
  • IDC_BUTTON6 : Resource.h
  • IDC_BUTTON7 : Resource.h
  • IDC_BUTTON8 : Resource.h
  • IDC_BUTTON9 : Resource.h
  • IDC_BUTTON_CLEAR : resource.h
  • IDC_BUTTON_CLEARALL : resource.h
  • IDC_BUTTON_MAX : spintest.cpp
  • IDC_BUTTON_MENU : resource.h
  • IDC_BUTTON_MULTLINE : resource.h
  • IDC_BUTTON_NOTE : resource.h
  • IDC_BUTTON_SET : resource.h
  • IDC_BUTTON_SET_CONTAINER_SIZE : resource.h
  • IDC_BUTTON_SET_DLGBAR_SIZE : resource.h
  • IDC_BUTTON_SIZE : resource.h
  • IDC_BUTTON_URL : resource.h
  • IDC_BUTTON_VALIDATE : resource.h
  • IDC_BW : resource.h
  • IDC_CAPTION : resource.h
  • IDC_CAPTIONEDIT : resource.h
  • IDC_CATEGORIES : Resource.H
  • IDC_CENTER : resource.h
  • IDC_CHECK : Resource.h
  • IDC_CHECK1 : resource.h , Resource.h
  • IDC_CHECK10 : Resource.h
  • IDC_CHECK11 : Resource.h
  • IDC_CHECK12 : Resource.h
  • IDC_CHECK13 : Resource.h
  • IDC_CHECK2 : resource.h , Resource.h
  • IDC_CHECK3 : Resource.h
  • IDC_CHECK4 : resource.h , Resource.h
  • IDC_CHECK5 : Resource.h
  • IDC_CHECK6 : Resource.h
  • IDC_CHECK7 : Resource.h
  • IDC_CHECK8 : Resource.h
  • IDC_CHECK9 : Resource.h
  • IDC_CHECK_ADDRESS : resource.h
  • IDC_CHECK_ANIMATION : resource.h
  • IDC_CHECK_BUTTON : resource.h
  • IDC_CHECK_CAPTIONICON : resource.h
  • IDC_CHECK_COLLAPSEGROUPS : resource.h
  • IDC_CHECK_ELEV : resource.h
  • IDC_CHECK_FORMATBAR : resource.h
  • IDC_CHECK_HICOLORIMAGES : resource.h
  • IDC_CHECK_HISTBUTTONS : resource.h
  • IDC_CHECK_MARGINS : resource.h
  • IDC_CHECK_MOUSEFWD : resource.h
  • IDC_CHECK_NAVTOOLBAR : resource.h
  • IDC_CHECK_NETWORK : resource.h
  • IDC_CHECK_NOSCOPE : resource.h
  • IDC_CHECK_PAGEBREAK : resource.h
  • IDC_CHECK_RULERBAR : resource.h
  • IDC_CHECK_SCROLLBUTTONS : resource.h
  • IDC_CHECK_SERVICE : resource.h
  • IDC_CHECK_STATE : resource.h
  • IDC_CHECK_STATUSBAR : resource.h
  • IDC_CHECK_TOOLBAR : resource.h
  • IDC_CHECK_WRAPLABELS : resource.h
  • IDC_CHECK_WRAPTASKS : resource.h
  • IDC_CHECKMINUTES : resource.h
  • IDC_CHOOSECOLOR : Resource.H
  • IDC_CHOOSECOLOR_AMBIENT : Resource.H
  • IDC_CHOOSEFONT : Resource.H
  • IDC_CHOOSEFONT_AMBIENT : Resource.H
  • IDC_CIRCLEOFFSET : resource.h
  • IDC_CIRCLESHAPE : resource.h
  • IDC_CKAPPCANPARSE : resource.h
  • IDC_CKDAYSTATE : resource.h
  • IDC_CKLONGDATEFORMAT : resource.h
  • IDC_CKNOTODAY : resource.h
  • IDC_CKNOTODAYCIRCLE : resource.h
  • IDC_CKSHORTDATEFORMAT : resource.h
  • IDC_CKSHOWNONE : resource.h
  • IDC_CKTIMEFORMAT : resource.h
  • IDC_CKUPDOWN : resource.h
  • IDC_CKWEEKNUMBERS : resource.h
  • IDC_CLASS : resource.h
  • IDC_CLEAR_LOG : resource.h
  • IDC_CLEAROUTPUT : resource.h
  • IDC_CLEAROUTPUTWINDOW : Resource.H
  • IDC_CLOSE : resource.h
  • IDC_CMULTISELECT : resource.h
  • IDC_CNTRTHRDPRIORITY : resource.h
  • IDC_COFFEE : resource.h
  • IDC_COFFEE1 : resource.h
  • IDC_COLOR : resource.h
  • IDC_COLOR1 : resource.h
  • IDC_COLOR2 : resource.h
  • IDC_COLOR3 : resource.h
  • IDC_COLOR4 : resource.h
  • IDC_COLOR_AREA : resource.h
  • IDC_COLOR_DLG : resource.h
  • IDC_COLOR_GROUPTEXT : resource.h
  • IDC_COLOR_GROUPTEXTHOT : resource.h
  • IDC_COLOR_PALETTE : resource.h
  • IDC_COLOR_PICKER : resource.h
  • IDC_COLOR_ROWS : resource.h
  • IDC_COLOR_SCHEME : Resource.h
  • IDC_COLOR_TASKTEXT : resource.h
  • IDC_COLOR_TASKTEXTHOT : resource.h
  • IDC_COLORBAR : resource.h
  • IDC_COLORBAR2 : resource.h
  • IDC_COMBO1 : resource.h , Resource.h , resource.h
  • IDC_COMBO2 : resource.h
  • IDC_COMBO3 : resource.h
  • IDC_COMBO_ALIGNMENT : resource.h
  • IDC_COMBO_UNITS : resource.h
  • IDC_COMBO_WRAP : resource.h
  • IDC_COMMAND : resource.h
  • IDC_COMMENTS : resource.h
  • IDC_COMPANY_URL : Resource.h , resource.h , Resource.h , resource.h
  • IDC_CONF1 : resource.h
  • IDC_CONF2 : resource.h
  • IDC_CONF3 : resource.h
  • IDC_CONFIGURE : otherids.h
  • IDC_CONTACT : Resource.h
  • IDC_CONTINENTAL : resource.h
  • IDC_CONTINENTAL2 : resource.h
  • IDC_CONTROL_LOGGING : Resource.H
  • IDC_CONTROLS : Resource.H
  • IDC_COPYRIGHT : resource.h
  • IDC_CREATE_DLG : resource.h
  • IDC_CREATEDATE : resource.h
  • IDC_Currency : Resource.h
  • IDC_CURRENT_COUNT : resource.h
  • IDC_CURSOR : resource.h
  • IDC_CUSTOM_COLORS : resource.h
  • IDC_CUSTOM_EDIT : resource.h
  • IDC_CUSTOM_TOOLTIPS : Resource.h
  • IDC_DATABOX : resource.h
  • IDC_Date : Resource.h
  • IDC_DATE : Resource.H
  • IDC_DATE_AMBIENT : Resource.H
  • IDC_DATEDIALOG_LIST : resource.h
  • IDC_DATETIME : resource.h
  • IDC_DATETIMEFORMAT : resource.h
  • IDC_DATETIMELOCATION : resource.h
  • IDC_DATETIMEPICKER1 : resource.h
  • IDC_DATETIMEPICKER2 : resource.h
  • IDC_DEBUG : resource.h
  • IDC_DEFAULT_PEN_WIDTHS : resource.h
  • IDC_DELETE : resource.h
  • IDC_DEMOIT : resource.h
  • IDC_DESCRIPTION_AREA : resource.h
  • IDC_DEVICE : resource.h
  • IDC_DIBSECTION : resource.h
  • IDC_DIRECTION : resource.h
  • IDC_DIRECTION2 : resource.h
  • IDC_DISK_SPACE : resource.h
  • IDC_DISPID : Resource.H
  • IDC_DISPID_NEW : Resource.H
  • IDC_DIV : resource.h
  • IDC_DOCK_TAB_COLORS : Resource.h
  • IDC_DOGETDATA : resource.h
  • IDC_DOT_NET_LOOK : resource.h
  • IDC_DRAW_DESCR : resource.h
  • IDC_DRAW_ICON : resource.h
  • IDC_DRAW_SEPARATOR : resource.h
  • IDC_DRAW_USING_FONT : resource.h
  • IDC_DROPRING : resource.h
  • IDC_DROPWHEEL : resource.h
  • IDC_DSPYTHRDPRIORITY : resource.h
  • IDC_DTFRAME : resource.h
  • IDC_DWORD : resource.h
  • IDC_EDIT : resource.h
  • IDC_EDIT1 : resource.h , Resource.h
  • IDC_EDIT2 : resource.h , Resource.h
  • IDC_EDIT3 : resource.h , Resource.h
  • IDC_EDIT4 : resource.h , Resource.h
  • IDC_EDIT_AFTER : resource.h
  • IDC_EDIT_BEFORE : resource.h
  • IDC_EDIT_BM : resource.h
  • IDC_EDIT_CAPTION : resource.h
  • IDC_EDIT_CAPTIONHEIGHT : resource.h
  • IDC_EDIT_CELLATTRIBS : resource.h
  • IDC_EDIT_DESIGNMODE : resource.h
  • IDC_EDIT_EDITMODE : resource.h
  • IDC_EDIT_FIRST_LINE : resource.h
  • IDC_EDIT_GROUPSPACING : resource.h
  • IDC_EDIT_HEIGHT_IN_PIXELS : resource.h
  • IDC_EDIT_HMARGIN : resource.h
  • IDC_EDIT_ICONOFFSET : resource.h
  • IDC_EDIT_IMAGE : resource.h
  • IDC_EDIT_LEFT : resource.h
  • IDC_EDIT_LIST : resource.h
  • IDC_EDIT_LM : resource.h
  • IDC_EDIT_MIN : spintest.cpp
  • IDC_EDIT_NUMCOLS : resource.h
  • IDC_EDIT_NUMROWS : resource.h
  • IDC_EDIT_RIGHT : resource.h
  • IDC_EDIT_RM : resource.h
  • IDC_EDIT_SIZE : resource.h
  • IDC_EDIT_TABLEATTRIBS : resource.h
  • IDC_EDIT_TABS : resource.h
  • IDC_EDIT_TASKOFFSET : resource.h
  • IDC_EDIT_TASKSPACING : resource.h
  • IDC_EDIT_TM : resource.h
  • IDC_EDIT_VMARGIN : resource.h
  • IDC_EDIT_WIDTH : resource.h
  • IDC_EDIT_WIDTH_IN_PIXELS : resource.h
  • IDC_EDITBAR_SEARCHBOX : resource.h
  • IDC_EDITCONTROL : resource.h
  • IDC_EDITLABELS : resource.h
  • IDC_EDITTEXT : resource.h
  • IDC_EDITTIME : resource.h
  • IDC_EDITX : resource.h
  • IDC_EDITY : resource.h
  • IDC_EDSELRANGE : resource.h
  • IDC_EDURL : resource.h
  • IDC_ELEMENT : resource.h
  • IDC_ELLIPSE : resource.h
  • IDC_ENABLED : Resource.H
  • IDC_ENABLEDCHECK : resource.h
  • IDC_ENUM_BUTTON : resource.h
  • IDC_EVENT_POPUPS : resource.h
  • IDC_EVENTS : Resource.H
  • IDC_EXCEPTIONDESC : Resource.H
  • IDC_EXCEPTIONHELP : Resource.H
  • IDC_EXCEPTIONSOURCE : Resource.H
  • IDC_EXPLORER : resource.h
  • IDC_EXPRESSION : resource.h
  • IDC_FETCH : resource.h
  • IDC_FILE_EDIT : resource.h
  • IDC_FILENAME : Resource.H
  • IDC_FILENAME_BROWSE : Resource.H
  • IDC_FINANCE : resource.h
  • IDC_FIND : resource.h
  • IDC_FINDDIALOG_DOWNRADIO : Resource.h
  • IDC_FINDDIALOG_FINDCOMBO : Resource.h
  • IDC_FINDDIALOG_MARKALLBUTTON : Resource.h
  • IDC_FINDDIALOG_MATCHCASECHECK : Resource.h
  • IDC_FINDDIALOG_MATCHWHOLEWORDONLYCHECK : Resource.h
  • IDC_FINDDIALOG_REGULARBUTTON : Resource.h
  • IDC_FINDDIALOG_REGULAREXPRESSIONCHECK : Resource.h
  • IDC_FINDDIALOG_SEARCHALLOPENDOCUMENTSCHECK : Resource.h
  • IDC_FINDDIALOG_UPRADIO : Resource.h
  • IDC_FLAG : resource.h
  • IDC_FLOAT : resource.h
  • IDC_FOLDER_EDIT : resource.h
  • IDC_FONT : resource.h
  • IDC_FONTNAME : resource.h
  • IDC_FONTSIZE : resource.h
  • IDC_FONTSTYLE : resource.h
  • IDC_FOOTER : resource.h
  • IDC_FOOTER_FILE : resource.h
  • IDC_FOOTER_SYSTEM : resource.h
  • IDC_FORMATETC : resource.h
  • IDC_FOUR : resource.h
  • IDC_FROM : resource.h
  • IDC_FULLHELP : resource.h
  • IDC_GET_AT : resource.h
  • IDC_GETALL : resource.h
  • IDC_GETDATA : resource.h
  • IDC_GETPOS : resource.h
  • IDC_GIVE_UP : resource.h
  • IDC_GO : resource.h
  • IDC_GOTO_LINE : resource.h
  • IDC_GREASY : resource.h
  • IDC_GREASY2 : resource.h
  • IDC_GREEN : resource.h
  • IDC_GROUP : resource.h
  • IDC_GROUPBOX1 : resource.h
  • IDC_HEADER : resource.h
  • IDC_HEADER_FILE : resource.h
  • IDC_HEADER_SYSTEM : resource.h
  • IDC_HEALTHY : resource.h
  • IDC_HEIGHT : resource.h
  • IDC_HEIGHTEDIT : resource.h
  • IDC_HIDE : resource.h
  • IDC_HIDE_FONT_PROPS : resource.h
  • IDC_HOCKEY : resource.h
  • IDC_HOME : Resource.h
  • IDC_HOT_TEA : resource.h
  • IDC_HOVER : resource.h
  • IDC_IADVISESINKEX : Resource.H
  • IDC_ICON1 : resource.h
  • IDC_ICON2 : resource.h
  • IDC_ICON_LABEL : resource.h
  • IDC_ICONS : resource.h
  • IDC_IFACE_PROPS : resource.h
  • IDC_IGNOREACTIVATEWHENVISIBLE : Resource.H
  • IDC_IGNOREREQUIREDCATEGORIES : Resource.H
  • IDC_IMAGE : resource.h
  • IDC_IMAGE_AREA : resource.h
  • IDC_IMAGE_LOCATION : resource.h
  • IDC_IMAGEPATH : Resource.h
  • IDC_IMAGESIZE : resource.h
  • IDC_IMPLEMENTEDCATEGORIES : Resource.H
  • IDC_INDEXED : resource.h
  • IDC_INFO : resource.h
  • IDC_INPUT_EDIT : resource.h
  • IDC_INSERT_BEFORE : resource.h
  • IDC_INT : resource.h
  • IDC_INT1 : resource.h
  • IDC_INT2 : resource.h
  • IDC_INTEGER : resource.h
  • IDC_INTERFACE : resource.h
  • IDC_INTERFACE_ID : resource.h
  • IDC_INTERVAL : resource.h
  • IDC_INTERVALEDIT : resource.h
  • IDC_INVERTCHECK : resource.h
  • IDC_INVISIBLE_FOCUS : resource.h
  • IDC_INVOKE : Resource.H
  • IDC_IOLEINPLACESITEEX : Resource.H
  • IDC_IOLEINPLACESITEWINDOWLESS : Resource.H
  • IDC_KEY : resource.h
  • IDC_KEYWORDS : resource.h
  • IDC_LAST_ACCUM : resource.h
  • IDC_LASTPRINT : resource.h
  • IDC_LASTSAVE : resource.h
  • IDC_LBNOTIFY : resource.h
  • IDC_LEFTHANDED : otherids.h
  • IDC_LENGTHEDIT : resource.h
  • IDC_LINE : Resource.h
  • IDC_LINK : resource.h
  • IDC_LIST : resource.h
  • IDC_LIST1 : resource.h
  • IDC_LIST1LBL : resource.h
  • IDC_LIST_NETSTRINGS : resource.h
  • IDC_LIST_STYLE : resource.h
  • IDC_LISTBOX1 : resource.h
  • IDC_LISTDIALOG_LIST : resource.h
  • IDC_LISTVIEW1 : resource.h
  • IDC_LOCATION : resource.h
  • IDC_LOCATION2 : resource.h
  • IDC_LOG : resource.h
  • IDC_LOGTODEBUG : Resource.H
  • IDC_LOGTOFILE : Resource.H
  • IDC_LOGTONULL : Resource.H
  • IDC_LOGTOOUTPUT : Resource.H
  • IDC_LUM : resource.h
  • IDC_MACRO : Resource.H
  • IDC_MACROBAR : Resource.H
  • IDC_MACROS : Resource.H
  • IDC_MAIL : resource.h , Resource.h , resource.h , Resource.h
  • IDC_MAIL_CC : resource.h
  • IDC_MAIL_CC_NAME : resource.h
  • IDC_MAIL_SUBJECT_NAME : resource.h
  • IDC_MAIL_TO : resource.h
  • IDC_MAIL_TO_NAME : resource.h
  • IDC_MAIN : resource.h
  • IDC_MARK_CHANGED : resource.h
  • IDC_MARK_SORTED_COLUMN : resource.h
  • IDC_MASKEDIT1 : resource.h
  • IDC_MASKEDIT2 : resource.h
  • IDC_MASKEDIT3 : resource.h
  • IDC_MASKEDIT4 : resource.h
  • IDC_MASKEDIT5 : resource.h
  • IDC_MAX_RANGE : resource.h
  • IDC_MAX_RANGE2 : resource.h
  • IDC_MCFRAME : resource.h
  • IDC_MENU_DEFAULT_CLICK : resource.h
  • IDC_METHODNAME : Resource.H
  • IDC_MILK : resource.h
  • IDC_MIN_RANGE : resource.h
  • IDC_MODIFY_FONT : resource.h
  • IDC_MODULE : resource.h
  • IDC_MONTHCAL : resource.h
  • IDC_MultiDimensionArray : Resource.h
  • IDC_MYBUTTON : resource.h
  • IDC_MYEDITCONTROL : resource.h
  • IDC_MYHOTCUR : resource.h
  • IDC_MYSTATICTEXT : resource.h
  • IDC_NAME : Resource.H
  • IDC_NAME1 : resource.h
  • IDC_NAME2 : resource.h
  • IDC_NAME3 : resource.h
  • IDC_NEIGHBOR : resource.h
  • IDC_NERDY : resource.h
  • IDC_NETADDRESS : resource.h
  • IDC_NETADDRESS1 : resource.h
  • IDC_NEVER : Resource.H
  • IDC_NEW_BUTTON : Resource.h
  • IDC_NEWGUID : resource.h
  • IDC_NEWPROPERTY : Resource.H
  • IDC_NEWTEXT : resource.h
  • IDC_NO_BALLOON : resource.h
  • IDC_NOCOLUMNHEADER : resource.h
  • IDC_NOFILL : resource.h
  • IDC_NOLABELWRAP : resource.h
  • IDC_NOSORTHEADER : resource.h
  • IDC_NOTE : resource.h
  • IDC_NOTIFICATIONS : resource.h
  • IDC_NOTIFYLIST : resource.h
  • IDC_NUMBEROUT : resource.h
  • IDC_NUMCHARS : resource.h
  • IDC_NUMPAGES : resource.h
  • IDC_NUMWORDS : resource.h
  • IDC_OBJECTCLSID : resource.h
  • IDC_OBJECTNAME : resource.h
  • IDC_OBJECTS : Resource.H
  • IDC_OBJICON : resource.h
  • IDC_OLE2LIB : resource.h
  • IDC_OLE2LIB_LBL : resource.h
  • IDC_OleArray : Resource.h
  • IDC_ONENOTE_TABS : Resource.h
  • IDC_OPEN_FILE_DLG : resource.h
  • IDC_OPENFILE : Resource.H
  • IDC_OPTIONS : resource.h
  • IDC_ORANGE_JUICE : resource.h
  • IDC_OUTLOOKBAR2003 : resource.h
  • IDC_OUTPUT : Resource.H
  • IDC_OUTPUTWINDOW : Resource.H
  • IDC_PAGER_CTRL : resource.h
  • IDC_PALETTE : resource.h
  • IDC_PARAMS : Resource.H
  • IDC_PARAMTYPE : Resource.H
  • IDC_PARAMVALUE : Resource.H
  • IDC_PARAMVALUECOMBO : Resource.H
  • IDC_PARENT : resource.h
  • IDC_PATH : Resource.h
  • IDC_PAUSE : resource.h
  • IDC_PEN : penwin.h
  • IDC_PENCIL : resource.h
  • IDC_PERCENT_DONE : resource.h
  • IDC_PHSTATIC : resource.h
  • IDC_PHYSICAL_MEM : resource.h
  • IDC_PICTURE : resource.h
  • IDC_PITCH : resource.h
  • IDC_PLAY : resource.h
  • IDC_POPUP_SOURCE : resource.h
  • IDC_POPUP_SOURCE2 : resource.h
  • IDC_POPUPHELP : resource.h
  • IDC_POSITION : resource.h
  • IDC_POSITIONEDIT : resource.h
  • IDC_PRESSED_ON_MENU : resource.h
  • IDC_PRIMEFIRST : resource.h
  • IDC_PRIORITYCLASS : resource.h
  • IDC_PRODUCT : Resource.h
  • IDC_PROG_HORZPOS : resource.h
  • IDC_PROG_VERTPOS : resource.h
  • IDC_PROGRESS : resource.h
  • IDC_PROGRESS1 : Resource.h
  • IDC_PROGRESS_DELTA : resource.h
  • IDC_PROGRESS_FROM : resource.h
  • IDC_PROGRESS_POS : resource.h
  • IDC_PROGRESS_SETDELTA : resource.h
  • IDC_PROGRESS_STEP : resource.h
  • IDC_PROGRESS_STEPIT : resource.h
  • IDC_PROGRESS_TO : resource.h
  • IDC_PROMPT : Resource.H
  • IDC_PROMPT_TEXT : resource.h
  • IDC_PROP_SHEET1 : resource.h
  • IDC_PROP_SHEET2 : resource.h
  • IDC_PROP_SHEET3 : resource.h
  • IDC_PROP_SHEET4 : resource.h
  • IDC_PROP_SHEET5 : resource.h
  • IDC_PROPERTIES : Resource.H
  • IDC_PROPERTIES_CHANGES : Resource.H
  • IDC_PROPERTIES_EDITREQUESTS : Resource.H
  • IDC_PROPLIST_CATEGORIZED : resource.h
  • IDC_PROPLIST_CATEGORIZED2 : resource.h
  • IDC_PROPLIST_EXPAND_ALL : resource.h
  • IDC_PROPLIST_LOCATION : resource.h
  • IDC_PROPNAME : Resource.H
  • IDC_PROPNAME_NEW : Resource.H
  • IDC_PROPTYPE : Resource.H
  • IDC_PROPVALUE : Resource.H
  • IDC_PROPVALUECOMBO_AMBIENT : Resource.H
  • IDC_PRUNE_JUICE : resource.h
  • IDC_PRUNE_JUICE2 : resource.h
  • IDC_RADIO1 : resource.h , Resource.h
  • IDC_RADIO2 : Resource.h , resource.h
  • IDC_RADIO3 : Resource.h , resource.h
  • IDC_RADIO4 : resource.h , Resource.h
  • IDC_RADIO5 : resource.h , Resource.h
  • IDC_RADIO6 : resource.h
  • IDC_RADIO_ID : Resource.h
  • IDC_RADIO_OFFICE2003 : resource.h
  • IDC_RADIO_OFFICE2007 : resource.h
  • IDC_RADIO_OFFICEXP : resource.h
  • IDC_RADIO_VS2005 : resource.h
  • IDC_RADIO_WIN : resource.h
  • IDC_RADIO_WINXP : resource.h
  • IDC_RASTER : resource.h
  • IDC_RECT : resource.h
  • IDC_RECTANGLE : resource.h
  • IDC_RED : resource.h
  • IDC_REDUCE_BORDER : resource.h
  • IDC_REFRESH : resource.h
  • IDC_REGISTER : Resource.H
  • IDC_REGISTEREDCONTROLS : Resource.H
  • IDC_REMOVE : resource.h , Resource.H
  • IDC_REMOVE_ALL : resource.h
  • IDC_REMOVEALL : Resource.H
  • IDC_REPLAY_SOUND : resource.h
  • IDC_REQUIREDCATEGORIES : Resource.H
  • IDC_REREGISTER : Resource.H
  • IDC_RESET_VALUES : resource.h
  • IDC_RESOURCE : resource.h
  • IDC_RESULT : resource.h
  • IDC_RESULTS : resource.h
  • IDC_RETURNVALUE : Resource.H
  • IDC_REVNUM : resource.h
  • IDC_RGB : resource.h
  • IDC_RGB_COLOR_BAR : resource.h
  • IDC_RGB_COLOR_BAR2 : resource.h
  • IDC_RGB_COLOR_PALETTE : resource.h
  • IDC_RGB_DLG : resource.h
  • IDC_RIGHT_ARROW : resource.h
  • IDC_ROMANTIC : resource.h
  • IDC_ROUND_RECTANGLE : resource.h
  • IDC_ROUNDED_CORNERS : resource.h
  • IDC_ROUNDED_TABS : Resource.h
  • IDC_RUNTIME_LBL : resource.h
  • IDC_RUNTIMEVER : resource.h
  • IDC_SafeArray : Resource.h
  • IDC_SAVEDBY : resource.h
  • IDC_SBINDHOST : Resource.H
  • IDC_SCREEN : Resource.h
  • IDC_SCREENTIP_STYLE : Resource.h
  • IDC_SECURITY : resource.h
  • IDC_SELECT_FOLDER : resource.h
  • IDC_SELECTALL : Resource.H
  • IDC_SELECTALL_EDITREQUESTS : Resource.H
  • IDC_SELECTED_FOLDER : resource.h
  • IDC_SELECTEDITEM : resource.h
  • IDC_SELFREG : resource.h
  • IDC_SERVERPATH : Resource.H
  • IDC_SET_BUTTON_NOTE : resource.h
  • IDC_SET_BUTTON_SIZE : resource.h
  • IDC_SET_MENU1 : resource.h
  • IDC_SET_MENU2 : resource.h
  • IDC_SET_POSITION : resource.h
  • IDC_SET_RANGE : resource.h
  • IDC_SET_SIZE : resource.h
  • IDC_SET_STATE : resource.h
  • IDC_SET_TOOLTIP : resource.h
  • IDC_SETALL : resource.h
  • IDC_SETPOS : resource.h
  • IDC_SETTEXT : resource.h
  • IDC_SETUPADVISE : resource.h
  • IDC_SETVALUE : Resource.H
  • IDC_SETVALUE_AMBIENT : Resource.H
  • IDC_SETX : resource.h
  • IDC_SETY : resource.h
  • IDC_SHOW : resource.h
  • IDC_SHOW_AT_STARTUP : resource.h , Resource.h
  • IDC_SHOW_DEV_TAB : Resource.h
  • IDC_SHOW_FLOATY : Resource.h
  • IDC_SHOW_KEY_TIPS : Resource.h
  • IDC_SHOW_TOOLTIPS_IN_MENU : resource.h
  • IDC_SHOWCNTRTHRD : resource.h
  • IDC_SINGLE_STEP : resource.h
  • IDC_SINGLESEL : resource.h
  • IDC_SIX : resource.h
  • IDC_SLIDER : resource.h
  • IDC_SLIDER_AUTOTICKS : resource.h
  • IDC_SLIDER_BORDER : resource.h
  • IDC_SLIDER_ENABLESEL : resource.h
  • IDC_SLIDER_FIXED : resource.h
  • IDC_SLIDER_HORZPOS : resource.h
  • IDC_SLIDER_LINE : resource.h
  • IDC_SLIDER_NOTHUMB : resource.h
  • IDC_SLIDER_NOTICKS : resource.h
  • IDC_SLIDER_ORIENTATION : resource.h
  • IDC_SLIDER_PAGE : resource.h
  • IDC_SLIDER_POINT : resource.h
  • IDC_SLIDER_RANGEFROM : resource.h
  • IDC_SLIDER_RANGETO : resource.h
  • IDC_SLIDER_SELRANGEFROM : resource.h
  • IDC_SLIDER_SELRANGETO : resource.h
  • IDC_SLIDER_TICKFREQ : resource.h
  • IDC_SLIDER_VERTPOS : resource.h
  • IDC_SLOW : resource.h
  • IDC_SMALL_CAPTION : resource.h
  • IDC_SMOOTH : resource.h
  • IDC_SODA : resource.h
  • IDC_SORT : resource.h
  • IDC_SPEED : resource.h
  • IDC_SPIN : resource.h
  • IDC_SPIN1 : resource.h
  • IDC_SPIN2 : resource.h
  • IDC_SPIN3 : resource.h
  • IDC_SPIN4 : resource.h
  • IDC_SPIN5 : resource.h
  • IDC_SPIN6 : resource.h
  • IDC_SPIN7 : resource.h
  • IDC_SPIN8 : resource.h
  • IDC_SPIN9 : resource.h
  • IDC_SPIN_AFTER : resource.h
  • IDC_SPIN_ALIGNMENT : resource.h
  • IDC_SPIN_ARROWKEYS : resource.h
  • IDC_SPIN_AUTOBUDDY : resource.h
  • IDC_SPIN_BEFORE : resource.h
  • IDC_SPIN_EDIT : resource.h
  • IDC_SPIN_FROM : resource.h
  • IDC_SPIN_NOTHOUSANDS : resource.h
  • IDC_SPIN_ORIENTATION : resource.h
  • IDC_SPIN_POS : resource.h
  • IDC_SPIN_SETBUDDYINT : resource.h
  • IDC_SPIN_TO : resource.h
  • IDC_SPIN_WRAP : resource.h
  • IDC_SPLIT_BUTTON : resource.h
  • IDC_SPLIT_STYLE : resource.h
  • IDC_SPYGLASS : resource.h
  • IDC_START_ANIMATION : resource.h
  • IDC_START_IMAGE : StartView.cpp
  • IDC_START_PROGRESS : resource.h
  • IDC_STATIC_BORDERSIZE : resource.h
  • IDC_STATIC_HEADING : resource.h
  • IDC_STATIC_MARGINS1 : resource.h
  • IDC_STATIC_MARGINS2 : resource.h
  • IDC_STATIC_MARGINS3 : resource.h
  • IDC_STATIC_MARGINS4 : resource.h
  • IDC_STATIC_MARGINS5 : resource.h
  • IDC_STATIC_MARGINS6 : resource.h
  • IDC_STATIC_MARGINS7 : resource.h
  • IDC_STATIC_PARAMETERVALUE : Resource.H
  • IDC_STATIC_PROPERTYVALUE : Resource.H
  • IDC_STATICTEXT : resource.h
  • IDC_STATUS_FACE : resource.h
  • IDC_STDHOTCUR : resource.h
  • IDC_STOP : resource.h
  • IDC_STRING : resource.h
  • IDC_Strings : Resource.h
  • IDC_STRRANGE : resource.h
  • IDC_STRSELECTION : resource.h
  • IDC_STYLE : Resource.h , resource.h
  • IDC_STYLE2007 : resource.h
  • IDC_SUBJECT : resource.h
  • IDC_SUM : resource.h
  • IDC_SUPPORT : Resource.h
  • IDC_SYNCHRONIZE : resource.h
  • IDC_TAB : resource.h
  • IDC_TAB_ICONS : resource.h
  • IDC_TAB_STYLE : resource.h
  • IDC_TAB_SWAP : resource.h
  • IDC_TABLOID : resource.h
  • IDC_TABLOID2 : resource.h
  • IDC_TABORDER : Resource.H
  • IDC_TEMPLATE : resource.h
  • IDC_TERMINATE : resource.h
  • IDC_TEXT : resource.h
  • IDC_TEXT_ALIGNMENT : resource.h
  • IDC_TEXT_COLOR : resource.h
  • IDC_TEXT_LABEL : resource.h
  • IDC_TEXT_UNITS : resource.h
  • IDC_TEXT_WRAP : resource.h
  • IDC_THICK_PEN_WIDTH : resource.h
  • IDC_THIN_PEN_WIDTH : resource.h
  • IDC_THREE : resource.h
  • IDC_THUMBNAIL : resource.h
  • IDC_TIPCAPTION : resource.h
  • IDC_TITLE : resource.h
  • IDC_TOOLTIP : resource.h
  • IDC_TRACELEVEL : Resource.H
  • IDC_TRANSP : resource.h
  • IDC_TRANSP_VAL : resource.h
  • IDC_TRANSPARENT : resource.h
  • IDC_TREE1 : Resource.h , resource.h
  • IDC_TREESTATUS : resource.h
  • IDC_TREEVIEW : resource.h
  • IDC_TREEVIEW1 : resource.h
  • IDC_TRUETYPE : resource.h
  • IDC_TT_TYPE : resource.h
  • IDC_TT_TYPE2 : resource.h
  • IDC_TT_TYPE3 : resource.h
  • IDC_TT_TYPE4 : resource.h
  • IDC_TT_TYPE5 : resource.h
  • IDC_TVDISABLEDDRAGDROP : resource.h
  • IDC_TVEDITLABELS : resource.h
  • IDC_TVHASBUTTONS : resource.h
  • IDC_TVHASLINES : resource.h
  • IDC_TVLINESATROOT : resource.h
  • IDC_TVSHOWSELALWAYS : resource.h
  • IDC_TVSSINGELEXPAND : resource.h
  • IDC_TWO : resource.h
  • IDC_TWOPASSDRAWING : Resource.H
  • IDC_TYPEINFOCOUNT : resource.h
  • IDC_UNITS_CM : resource.h
  • IDC_UNITS_IN : resource.h
  • IDC_UNITS_PI : resource.h
  • IDC_UNITS_PT : resource.h
  • IDC_UNREGISTER : resource.h , Resource.H
  • IDC_UPDATE : resource.h
  • IDC_UPDATEDISPLAY : resource.h
  • IDC_URL : Resource.h , resource.h
  • IDC_URL_LABEL : resource.h
  • IDC_USEDISPATCH : resource.h
  • IDC_USEIPOINTERINACTIVE : Resource.H
  • IDC_USEMINE : resource.h
  • IDC_USEQUICKACTIVATION : Resource.H
  • IDC_USETOOLTIP : resource.h
  • IDC_VALUE : resource.h
  • IDC_VALUE1 : resource.h
  • IDC_VALUE2 : resource.h
  • IDC_VALUE3 : resource.h
  • IDC_VALUE4 : resource.h
  • IDC_VALUE5 : resource.h
  • IDC_VERIFY_BUTTON : resource.h
  • IDC_VERSION : resource.h , Resource.h , resource.h , Resource.h
  • IDC_VERTICAL : resource.h
  • IDC_VIEWMODE : resource.h
  • IDC_VIEWTYPEINFO : resource.h
  • IDC_VISTA_STYLE : resource.h
  • IDC_VISUAL_MNGR : resource.h
  • IDC_WEIGHT : resource.h
  • IDC_WIDTH : resource.h
  • IDC_WINDOW : Resource.h
  • IDC_WNDLIST : resource.h
  • IDC_WORDSEL : resource.h
  • IDC_WORKAREAS : resource.h
  • IDC_WRAP_NONE : resource.h
  • IDC_WRAP_RULER : resource.h
  • IDC_WRAP_WINDOW : resource.h
  • IDC_WRITTENBY : resource.h
  • IDC_X : resource.h
  • IDC_X_SIZE : resource.h
  • IDC_XP_BUTTONS : resource.h
  • IDC_XP_COLORS : Resource.h
  • IDC_XPOS : resource.h
  • IDC_Y : resource.h
  • IDC_Y_SIZE : resource.h
  • IDC_YPOS : resource.h
  • IDD_16BIT_GENERICCBLUR : Resource.h
  • IDD_16BIT_MMXINTRINSICS : Resource.h
  • IDD_16BIT_SSE2INTRINSICS : Resource.h
  • IDD_24BIT_GENERICCBLUR : Resource.h
  • IDD_24BIT_MMXINTRINSICS : Resource.h
  • IDD_24BIT_SSE2INTRINSICS : Resource.h
  • IDD_32BIT_GENERICCBLUR : Resource.h
  • IDD_32BIT_MMXINTRINSICS : Resource.h
  • IDD_32BIT_SSE2INTRINSICS : Resource.h
  • IDD_ABOUT : resource.h
  • IDD_ABOUTBOX : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.H , resource.h
  • IDD_ABOUTBOX_BUTTON : resource.h
  • IDD_ABOUTBOX_CIRC : resource.h
  • IDD_ABOUTBOX_IMAGE : Resource.h
  • IDD_ABOUTBOX_LICENSED : resource.h
  • IDD_ABOUTBOX_LOCALIZE : resource.h
  • IDD_ABOUTBOX_PAL : resource.h
  • IDD_ABOUTBOX_PUSH : resource.h
  • IDD_ABOUTBOX_SPINDIAL : resource.h
  • IDD_ABOUTBOX_TESTHELP : resource.h
  • IDD_ABOUTBOX_TIME : resource.h
  • IDD_ABOUTBOX_XLIST : resource.h
  • IDD_ADD_NODE : resource.h
  • IDD_ADDME : resource.h
  • IDD_ALERT_DIALOG : resource.h
  • IDD_AMBIENTPROPERTIES : Resource.H
  • IDD_ANIMCTRL : resource.h
  • IDD_APP_LOOK : resource.h , Resource.h , resource.h
  • IDD_AUTODRIV_DIALOG : resource.h
  • IDD_BREAKFAST : resource.h
  • IDD_CALCDRIV : resource.h
  • IDD_CATEGORIES : Resource.H
  • IDD_CHANGE_NAME : resource.h
  • IDD_CHANGE_TEXT : resource.h
  • IDD_CHANGECOLOR : resource.h
  • IDD_CHANGEDATA : resource.h
  • IDD_CIMAGE_16BIT : Resource.h
  • IDD_CIMAGE_24BIT : Resource.h
  • IDD_CIMAGE_32BIT : Resource.h
  • IDD_CMNCTRL1_DIALOG : resource.h
  • IDD_CMNCTRL2_DIALOG : resource.h
  • IDD_COLOR : resource.h
  • IDD_COMMAND_LINK_CONTROL : resource.h
  • IDD_COMPONENTCATEGORIES : Resource.H
  • IDD_CONFIG : Resource.h
  • IDD_CONTAINERINFO : Resource.H
  • IDD_CONTAINEROPTIONS_FEATURES : Resource.H
  • IDD_CONTAINEROPTIONS_INTERFACES : Resource.H
  • IDD_CONTAINEROPTIONS_SERVICES : Resource.H
  • IDD_CONTROLLOGGING_EVENTS : Resource.H
  • IDD_CONTROLLOGGING_PROPERTYCHANGES : Resource.H
  • IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS : Resource.H
  • IDD_CUST_PAGE_DLG : resource.h
  • IDD_CUSTOM_LIST : resource.h
  • IDD_CUSTZOOM : resource.h
  • IDD_DATEDIALOG : resource.h
  • IDD_DATETIME : resource.h
  • IDD_DBVLIST_FORM : resource.h
  • IDD_DELETEENTRIEDLG : resource.h
  • IDD_DELETESCHEDULEDLG : resource.h
  • IDD_DELETESCHEDULEENTRYDLG : resource.h
  • IDD_DERIVED_EDIT : resource.h
  • IDD_DHTMLEXPLORE_DIALOG : resource.h
  • IDD_DIALOG1 : resource.h
  • IDD_DIALOG2 : resource.h
  • IDD_DIALOGBAR1 : testres2.h
  • IDD_DINNER : resource.h
  • IDD_DISPATCH : resource.h
  • IDD_DLG_BAR : resource.h
  • IDD_DLGTEMP_DIALOG : resource.h
  • IDD_DLGTOOLTIPS_DIALOG : resource.h
  • IDD_DWORD_ARRAY : resource.h
  • IDD_ENTRYINFO_DLG : resource.h
  • IDD_FILE_EXIT : resource.h
  • IDD_FILE_NEW : resource.h
  • IDD_FILE_OPEN : resource.h
  • IDD_FILEDLGWATCHER_DIALOG : resource.h
  • IDD_FILENEWDIALOG : resource.h
  • IDD_FIND : resource.h
  • IDD_FINDDIALOG : Resource.h
  • IDD_FORMAT_PARA : resource.h
  • IDD_FORMAT_TAB : resource.h
  • IDD_FORMVIEW : resource.h
  • IDD_GETURL : resource.h
  • IDD_GOTO : resource.h
  • IDD_GOTO_LINE : Resource.h
  • IDD_GUIDGEN_DIALOG : resource.h
  • IDD_HANDLE_SIZE : resource.h
  • IDD_HELP_ABOUTSCHEDULER : resource.h
  • IDD_IDATAOBJDLG : resource.h
  • IDD_IFACEDIALOG : resource.h
  • IDD_INFODLG : resource.h
  • IDD_INPUTFORM : resource.h
  • IDD_INSERT_TABLE : resource.h
  • IDD_INSERTCONTROL : Resource.H
  • IDD_INT_LIST : resource.h
  • IDD_IPDRIVE_FORM : resource.h
  • IDD_LAST_OPERAND : resource.h
  • IDD_LAST_OPERATOR : resource.h
  • IDD_LINEWEIGHT : resource.h
  • IDD_LIST : resource.h
  • IDD_LISTDIALOG : resource.h
  • IDD_LISTHDR_DIALOG : resource.h
  • IDD_LOGGING : Resource.H
  • IDD_LUNCH : resource.h
  • IDD_MACRO : Resource.H
  • IDD_MACROBAR : Resource.H
  • IDD_MAILBAR : resource.h
  • IDD_MAIN_DIALOG : resource.h
  • IDD_MAP_DWORD_TO_MYSTRUCT : resource.h
  • IDD_MAP_STRING_TO_STRING : resource.h
  • IDD_MENUSUBSET_FORM : resource.h
  • IDD_METHOD : Resource.H
  • IDD_MFCCALC_DIALOG : resource.h
  • IDD_MIN_SIZE : resource.h
  • IDD_MODELESS_DIALOG : resource.h
  • IDD_MODIFYORDELETE : resource.h
  • IDD_MONTHCAL : resource.h
  • IDD_MTRECALC_FORM : resource.h
  • IDD_MUTEXES_DIALOG : resource.h
  • IDD_NETADDRVERIFIER_DIALOG : resource.h
  • IDD_NETWORK_ADDRESS_CONTROL : resource.h
  • IDD_NEWAMBIENTPROPERTY : Resource.H
  • IDD_NewControls_DIALOG : resource.h
  • IDD_NOPENDIALOG : resource.h
  • IDD_OBJECTSAFETY : Resource.H
  • IDD_OPTIONS : resource.h
  • IDD_OPTIONS_MARGINS : resource.h
  • IDD_OPTIONS_UNITS : resource.h
  • IDD_OPTIONS_WRAP : resource.h
  • IDD_OPTIONSPAGE1 : Resource.h
  • IDD_OPTIONSPAGE2 : Resource.h
  • IDD_OPTIONSPAGE3 : Resource.h
  • IDD_OPTIONSPAGE4 : Resource.h
  • IDD_OPTIONSPAGE5 : Resource.h
  • IDD_OPTIONSPAGE6 : Resource.h
  • IDD_OUTPUTWINDOW : Resource.H
  • IDD_PAGE1 : resource.h
  • IDD_PAGE2 : resource.h
  • IDD_PAGE3 : resource.h
  • IDD_PAGE4 : resource.h
  • IDD_PAGE5 : resource.h
  • IDD_PAGE6 : resource.h
  • IDD_PAGE_SETUP : resource.h
  • IDD_PAGE_SETUP_DIALOG : resource.h
  • IDD_PAGER_CONTROL : resource.h
  • IDD_PEN_WIDTHS : resource.h
  • IDD_PENDIALOG : resource.h
  • IDD_PENEDIT_CONFIGURE : otherids.h
  • IDD_PENEDIT_FEATURES : otherids.h
  • IDD_POINT_ARRAY : resource.h
  • IDD_POPULAR_PAGE : Resource.h
  • IDD_PROGCTRL : resource.h
  • IDD_PROP_RECT : resource.h
  • IDD_PROPERTIES : resource.h
  • IDD_PROPERTYBAG : Resource.H
  • IDD_PROPPAGE1 : resource.h
  • IDD_PROPPAGE2 : resource.h
  • IDD_PROPPAGE3 : resource.h
  • IDD_PROPPAGE4 : resource.h
  • IDD_PROPPAGE_BUTTON : resource.h
  • IDD_PROPPAGE_CIRC : resource.h
  • IDD_PROPPAGE_IMAGE : Resource.h
  • IDD_PROPPAGE_LICENSED : resource.h
  • IDD_PROPPAGE_LOCALIZE : resource.h
  • IDD_PROPPAGE_PAL : resource.h
  • IDD_PROPPAGE_PUSH : resource.h
  • IDD_PROPPAGE_SPINDIAL : resource.h
  • IDD_PROPPAGE_TESTHELP : resource.h
  • IDD_PROPPAGE_TIME : resource.h
  • IDD_PROPPAGE_XLIST : resource.h
  • IDD_PROPSHEETDEMO_DIALOG : resource.h
  • IDD_RATE : resource.h
  • IDD_RECALC_PROGRESS : resource.h
  • IDD_REGISTERCONTROLS : Resource.H
  • IDD_REGVIEW : resource.h
  • IDD_RES_PAGE : Resource.h
  • IDD_SCHEDULEENTRYINFODLG : resource.h
  • IDD_SCHEDULER_DIALOG : resource.h
  • IDD_SELECT_CONF : resource.h
  • IDD_SET_TABSTOPS : resource.h
  • IDD_SetPaneSize_FORM : resource.h
  • IDD_SLIDERCTRL : resource.h
  • IDD_SNAP_FORM : resource.h
  • IDD_SPEED : resource.h
  • IDD_SPIN_EDIT : otherids.h
  • IDD_SPINCTRL : resource.h
  • IDD_SPLASH : resource.h
  • IDD_SPLIT_BUTTON : resource.h
  • IDD_STAT_PAGE : resource.h
  • IDD_STATUSBARDEMO_FORM : resource.h
  • IDD_STRING_LIST : resource.h
  • IDD_STRINGLIST : resource.h
  • IDD_STYLE : resource.h
  • IDD_SUB_EDIT : resource.h
  • IDD_SUB_PENEDIT : resource.h
  • IDD_SUMM_PAGE : resource.h
  • IDD_TABCONTROL_FORM : resource.h
  • IDD_TABORDER : Resource.H
  • IDD_TASKDIALOGTEST_DIALOG : Resource.h
  • IDD_TASKSPANE_FORM : resource.h
  • IDD_TCEXTPAGE : Resource.H
  • IDD_TOOLBAR : resource.h
  • IDD_TOOLBARCTRL : resource.h
  • IDD_TOOLTIPDEMO_FORM : resource.h
  • IDD_TRAYMENU_DIALOG : resource.h
  • IDD_TREECTRL : resource.h
  • IDD_TYPED_PTR_ARRAY : resource.h
  • IDD_TYPED_PTR_LIST : resource.h
  • IDD_TYPED_PTR_MAP : resource.h
  • IDD_TYPEDLIST : resource.h
  • IDD_TYPELIB : resource.h
  • IDD_URLDIALOG : resource.h
  • IDD_VARIANTUSE_DIALOG : Resource.h
  • IDD_VERSIONINFO : resource.h
  • IDD_VIEWSELECT : resource.h
  • IDD_WNDCLASS_EDIT : otherids.h
  • IDE_ACCUM : resource.h
  • idFoldersTree : FolderListPopupWnd.cpp
  • IDH_COMM_GROUPBOX : helpids.h
  • IDH_WHATISTHISTHING : popups.h
  • IDH_WORDPAD_ALIGN : helpids.h
  • IDH_WORDPAD_BOTTOMMARGIN : helpids.h
  • IDH_WORDPAD_CENTIMETERS : helpids.h
  • IDH_WORDPAD_CHECK_FORMATBAR : helpids.h
  • IDH_WORDPAD_CHECK_RULERBAR : helpids.h
  • IDH_WORDPAD_CHECK_STATUSBAR : helpids.h
  • IDH_WORDPAD_CHECK_TOOLBAR : helpids.h
  • IDH_WORDPAD_FILENEW_DOC : helpids.h
  • IDH_WORDPAD_FORMATTED : helpids.h
  • IDH_WORDPAD_INCHES : helpids.h
  • IDH_WORDPAD_INDENT_FIRST : helpids.h
  • IDH_WORDPAD_INDENT_LEFT : helpids.h
  • IDH_WORDPAD_INDENT_RIGHT : helpids.h
  • IDH_WORDPAD_LEFTMARGIN : helpids.h
  • IDH_WORDPAD_OPTIONS_AUTOWORDSEL : helpids.h
  • IDH_WORDPAD_PAGEBREAK : helpids.h
  • IDH_WORDPAD_PICAS : helpids.h
  • IDH_WORDPAD_POINTS : helpids.h
  • IDH_WORDPAD_RIGHTMARGIN : helpids.h
  • IDH_WORDPAD_SPACE_AFTER : helpids.h
  • IDH_WORDPAD_SPACE_BEFORE : helpids.h
  • IDH_WORDPAD_TAB_CLEARALL : helpids.h
  • IDH_WORDPAD_TABCLEAR : helpids.h
  • IDH_WORDPAD_TABSET : helpids.h
  • IDH_WORDPAD_TABSTOPS : helpids.h
  • IDH_WORDPAD_TEXTFILE : helpids.h
  • IDH_WORDPAD_TIMEDATE : helpids.h
  • IDH_WORDPAD_TOPMARGIN : helpids.h
  • IDH_WORDPAD_WORD6FILE : helpids.h
  • IDH_WORDPAD_WRAP_NO : helpids.h
  • IDH_WORDPAD_WRAP_RULER : helpids.h
  • IDH_WORDPAD_WRAP_WINDOW : helpids.h
  • IDI_ABOUTDLL : resource.h , Resource.h , resource.h
  • IDI_AUTOMATION : resource.h
  • IDI_CLASS_VIEW : Resource.h
  • IDI_CLASS_VIEW_HC : Resource.h
  • IDI_DRAGDROP : resource.h
  • IDI_DYNAMICHELP_VIEW : Resource.h
  • IDI_DYNAMICHELP_VIEW_HC : Resource.h
  • IDI_FACE_HAPPIER : resource.h
  • IDI_FACE_HAPPY : resource.h
  • IDI_FACE_NEUTRAL : resource.h
  • IDI_FACE_SAD : resource.h
  • IDI_FILE_VIEW : Resource.h
  • IDI_FILE_VIEW_HC : Resource.h
  • IDI_HDRICON1 : resource.h
  • IDI_HDRICON2 : resource.h
  • IDI_HELLO : resource.h
  • IDI_ICON1 : resource.h
  • IDI_ICON_DOC : resource.h
  • IDI_ICON_TEXT : resource.h
  • IDI_ICON_WRITE : resource.h
  • IDI_ICONLIST1 : resource.h
  • IDI_ICONLIST2 : resource.h
  • IDI_ICONLIST3 : resource.h
  • IDI_ICONLIST4 : resource.h
  • IDI_INTERFACE : resource.h
  • IDI_MAGNIFY : resource.h
  • IDI_MAIL : resource.h
  • IDI_NOICON : resource.h
  • IDI_NOTE : resource.h
  • IDI_OLE2 : resource.h
  • IDI_OLE2_1 : resource.h
  • IDI_OUTPUT_BAR : Resource.h
  • IDI_OUTPUT_BAR_HC : Resource.h
  • IDI_PROP_BAR_HC : Resource.h
  • IDI_PROPERTIES_BAR : Resource.h
  • IDI_REFRESH : Resource.h
  • IDI_RES_VIEW : Resource.h
  • IDI_RES_VIEW_HC : Resource.h
  • IDI_SPELL : Resource.h
  • IDI_WATCH_BAR : Resource.h
  • IDI_WATCH_BAR_HC : Resource.h
  • IDM_ABOUTBOX : resource.h , Resource.h , resource.h
  • IDM_BLACK : resource.h , testres1.h , resource.h
  • IDM_BLUE : resource.h , testres1.h , resource.h
  • IDM_BOUNCE : resource.h
  • IDM_CHANGEDATA : resource.h
  • IDM_CUSTOM : resource.h , testres1.h , resource.h
  • IDM_FAST : resource.h
  • IDM_GREEN : resource.h , testres1.h
  • IDM_HELLO : resource.h
  • IDM_PALETTE_2COLUMN : resource.h
  • IDM_PALETTE_3COLUMN : resource.h
  • IDM_RED : resource.h , testres1.h , resource.h
  • IDM_SLOW : resource.h
  • IDM_TEST_BITMAP_BUTTON1 : resource.h
  • IDM_TEST_BITMAP_BUTTON2 : resource.h
  • IDM_TEST_BITMAP_BUTTON3 : resource.h
  • IDM_TEST_CUSTOM_LIST : resource.h
  • IDM_TEST_CUSTOM_MENU : resource.h
  • IDM_TEST_DERIVED_EDIT : resource.h
  • IDM_TEST_PENEDIT_CODE : resource.h
  • IDM_TEST_PENEDIT_FEATURES : resource.h
  • IDM_TEST_PENEDIT_TEMPLATE : resource.h
  • IDM_TEST_SPIN_EDIT : resource.h
  • IDM_TEST_SUB_EDIT : resource.h
  • IDM_TEST_WNDCLASS_EDIT : resource.h
  • IDM_VIEWPALETTE : resource.h
  • IDM_WHITE : resource.h , testres1.h , resource.h
  • IDP_AFXOLEINIT_FAILED : resource.h
  • IDP_BUSY : resource.h
  • IDP_CANNOT_CREATE_AUTOCLIK : resource.h
  • IDP_CANT_RUN_STANDALONE : resource.h
  • IDP_CLIPBOARD_COPY_FAILED : resource.h
  • IDP_CLIPBOARD_CUT_FAILED : resource.h
  • IDP_CLIPBOARD_ZERO_SIZE : resource.h
  • IDP_ERR_CREATE_GUID : resource.h
  • IDP_ERR_GET_DEVICE_DEFAULTS : resource.h
  • IDP_ERR_GET_PRINTER_DC : resource.h
  • IDP_ERR_INIT_OLE : resource.h
  • IDP_ERR_LOCAL_ONLY : resource.h
  • IDP_ERR_NO_ADDRESS : resource.h
  • IDP_ERR_NOT_OK : resource.h
  • IDP_ERR_OPEN_CLIP : resource.h
  • IDP_FAILED_OPEN_DATABASE : resource.h
  • IDP_FAILED_TO_CREATE : resource.h , Resource.H , resource.h , Resource.h , resource.h
  • IDP_GET_FROM_CLIPBOARD_FAILED : resource.h
  • IDP_INCOMPATIBLE_TYPE_VALUE : resource.h
  • IDP_NOTIMER : resource.h
  • IDP_OLE_INIT_FAILED : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , Resource.H , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDP_REST_OUTLOOK_PAGE : resource.h
  • IDP_SAVEINCOMPLETE : resource.h
  • IDP_SOCKETS_INIT_FAILED : Resource.h
  • IDP_TIMING_RESULT : resource.h
  • IDP_UNABLE_TO_CREATE : resource.h
  • IDP_UNABLE_TO_CREATE_INPROC : resource.h
  • IDP_UNABLE_TO_SHOW : resource.h
  • IDP_UNABLE_TO_SHOW_CALC : resource.h
  • idPinBtn : FolderListPopupWnd.cpp
  • IDR_ACLICKTYPE : resource.h
  • IDR_ADVANCED : resource.h
  • IDR_BACKWARD_MENU : Resource.h
  • IDR_BORDER_PALETTE : resource.h
  • IDR_BORDER_TYPE : resource.h
  • IDR_BOUNCE : resource.h
  • IDR_BOUNCETYPE : resource.h
  • IDR_BROWSEBAR : resource.h
  • IDR_BUILD : Resource.h
  • IDR_CImageTYPE : resource.h
  • IDR_CNTR_INPLACE : resource.h , Resource.h
  • IDR_CODE : resource.h
  • IDR_COLOR_BROWSEBAR : resource.h
  • IDR_COLOR_DEBUGBAR : resource.h
  • IDR_COLOR_EDITBAR : resource.h
  • IDR_COLOR_EDITBARHORZ : resource.h
  • IDR_COLOR_EDITBARVERT : resource.h
  • IDR_COLOR_MAINBAR : resource.h
  • IDR_COLOR_MENU : resource.h
  • IDR_COLOR_PALETTEBAR : resource.h
  • IDR_COLOR_RESOURCEBAR : resource.h
  • IDR_COLORTYPE : resource.h
  • IDR_CONTAINER_CONTEXT : Resource.H
  • IDR_CONTEXT_MENU : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDR_CONTROL_CONTEXT : Resource.H
  • IDR_CONTRTYPE : resource.h
  • IDR_CONTRTYPE_CNTR_IP : resource.h
  • IDR_CUSTOMTYPE : resource.h
  • IDR_DBVLISTYPE : resource.h
  • IDR_DEBUGBAR : resource.h
  • IDR_DEVTYPE0 : Resource.h
  • IDR_DEVTYPE_CPP : Resource.h
  • IDR_DIALOG_MENU : resource.h
  • IDR_DIBTYPE : resource.h
  • IDR_DRAWCLIENTHANDLERS : resource.h
  • IDR_DRAWCLILIVEICONSHANDLER : resource.h
  • IDR_DRAWCLISEARCHHANDLER : resource.h
  • IDR_DRAWCLTYPE : resource.h
  • IDR_DRAWCLTYPE_CNTR_IP : resource.h
  • IDR_DUMMY : resource.h
  • IDR_DUMMY_MENU : Resource.h
  • IDR_DYMENUTYPE : resource.h
  • IDR_DYNAMIC_HELP : Resource.h
  • IDR_DYNAMIC_MENU : resource.h
  • IDR_DYNAMITYPE : resource.h
  • IDR_EDIT : Resource.h
  • IDR_EDIT_MENU : resource.h
  • IDR_EDITBAR : resource.h
  • IDR_EDITBARHORZ : resource.h
  • IDR_EDITBARVERT : resource.h
  • IDR_EDITOR_XML_SETTINGS_CPP : Resource.h
  • IDR_EDITOR_XML_SETTINGS_WEB : Resource.h
  • IDR_EDITPOPUP : resource.h
  • IDR_EXPLORE : resource.h
  • IDR_EXPTYPE : Resource.h
  • IDR_FAVORITES_POPUP : Resource.h
  • IDR_FILEMENU : resource.h
  • IDR_FONT : Resource.h
  • IDR_FONT_POPUP : Resource.h
  • IDR_FORMATBAR : resource.h
  • IDR_FORMATBAR_BIG : resource.h
  • IDR_FORWARD_MENU : Resource.h
  • IDR_HELLO : resource.h
  • IDR_HELLOTYPE : resource.h
  • IDR_HELPMENU : resource.h
  • IDR_HIERSVRTYPE : resource.h
  • IDR_HIERSVRTYPE_SRVR_EMB : resource.h
  • IDR_HIERSVRTYPE_SRVR_IP : resource.h
  • IDR_HISTORY_POPUP : Resource.h
  • IDR_HTML1 : resource.h
  • IDR_HTML_DELETEENTRIEDLG : resource.h
  • IDR_HTML_DELETESCHEDULEDLG : resource.h
  • IDR_HTML_ENTRYINFO_DLG : resource.h
  • IDR_HTML_MODIFYORDELETE : resource.h
  • IDR_HTML_SCHEDULEENTRYINFODLG : resource.h
  • IDR_HTML_SCHEDULER_DIALOG : resource.h
  • IDR_HTMLEDTYPE : resource.h
  • IDR_IEDTYPE : Resource.h
  • IDR_INPLACEMENU : resource.h
  • IDR_INPUTTYPE : resource.h
  • IDR_INSERT_COVERPAGE_MENU : Resource.h
  • IDR_INSERT_FOOTER_MENU : Resource.h
  • IDR_INSERT_HEADER_MENU : Resource.h
  • IDR_INSERT_PAGENUMBERS_MENU : Resource.h
  • IDR_INSERT_PICTURE_MENU : Resource.h
  • IDR_INSERT_SHAPES_MENU : Resource.h
  • IDR_INSERT_TABLE_MENU : Resource.h
  • IDR_INSERT_TEXTBOX_MENU : Resource.h
  • IDR_LINE_STYLE_POPUP : resource.h
  • IDR_LISTOUTPUT : testres2.h
  • IDR_MAIL_MERGE_MENU : Resource.h
  • IDR_MAIL_RECIPIENTS_MENU : Resource.h
  • IDR_MAILFRAME : resource.h
  • IDR_MAIN : resource.h
  • IDR_MAINFRAME : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.H , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDR_MAINFRAME1 : resource.h
  • IDR_MAINFRAME1_BIG : resource.h
  • IDR_MAINFRAME2 : Resource.h
  • IDR_MAINFRAME_A : resource.h
  • IDR_MAINFRAME_BIG : resource.h
  • IDR_MAINFRAME_U : resource.h
  • IDR_MDITABTYPE : resource.h
  • IDR_MENU1 : resource.h
  • IDR_MENU_ARGS : Resource.h
  • IDR_MENU_DIRS : Resource.h
  • IDR_MENU_IMAGES : resource.h , Resource.h
  • IDR_MENUIMAGES : resource.h
  • IDR_MENUSUTYPE : resource.h
  • IDR_MFCAVI : Resource.h
  • IDR_MFCBINTYPE : resource.h
  • IDR_MFCIETYPE : Resource.h
  • IDR_MMXSwaTYPE : Resource.h
  • IDR_MONO_BROWSEBAR : resource.h
  • IDR_MONO_DEBUGBAR : resource.h
  • IDR_MONO_EDITBAR : resource.h
  • IDR_MONO_EDITBARHORZ : resource.h
  • IDR_MONO_EDITBARVERT : resource.h
  • IDR_MONO_MAINBAR : resource.h
  • IDR_MONO_PALETTEBAR : resource.h
  • IDR_MONO_RESOURCEBAR : resource.h
  • IDR_MSMONETYPE : Resource.h
  • IDR_MSTYPE : Resource.h
  • IDR_NPTYPE : resource.h
  • IDR_OCLIENTTYPE : resource.h
  • IDR_OCLIENTTYPE_CNTR_IP : resource.h
  • IDR_OUTLOOTYPE : resource.h
  • IDR_OUTPUTLOGEDIT_CONTEXT : Resource.H
  • IDR_OUTTYPE : resource.h
  • IDR_OWNERDTYPE : resource.h
  • IDR_PAGELAYOUT_BRINGTOFRONT : Resource.h
  • IDR_PAGELAYOUT_COLUMNS : Resource.h
  • IDR_PAGELAYOUT_MARGINS : Resource.h
  • IDR_PAGELAYOUT_ORIENTATION : Resource.h
  • IDR_PAGELAYOUT_SENDTOBACK : Resource.h
  • IDR_PAGELAYOUT_TEXTWRAPPING : Resource.h
  • IDR_PALETTE : resource.h
  • IDR_PALETTEBAR : resource.h
  • IDR_PALETTTYPE : resource.h
  • IDR_PARA_BULLETS_MENU : Resource.h
  • IDR_PARA_LINESPACING_MENU : Resource.h
  • IDR_PARA_MULTILIST_MENU : Resource.h
  • IDR_PARA_NUMBERING_MENU : Resource.h
  • IDR_PARAGRAPH : Resource.h
  • IDR_PASTE_MENU : resource.h
  • IDR_PIECES : resource.h
  • IDR_POPUP : resource.h
  • IDR_POPUP_CONTROLBAR : Resource.h
  • IDR_POPUP_DROP_MDITABS : Resource.h , resource.h
  • IDR_POPUP_MDITABS : resource.h , Resource.h , resource.h
  • IDR_POPUP_OLBAR : resource.h
  • IDR_POPUP_OLBAR2003 : resource.h
  • IDR_POPUP_OUTPUT : Resource.h
  • IDR_POPUP_RESOURCE : Resource.h
  • IDR_POPUP_SOLUTION : Resource.h
  • IDR_POPUP_SORT : Resource.h
  • IDR_POPUP_STYLE_20007 : resource.h
  • IDR_POPUP_TOOLBAR : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDR_POPUPMENUS : resource.h
  • IDR_POPUPS : resource.h
  • IDR_PROPERTIES : resource.h , Resource.h , resource.h
  • IDR_PROPERTY : resource.h
  • IDR_RebarTestTYPE : Resource.h
  • IDR_RECALCTYPE : resource.h
  • IDR_REFERENCES_ADDTEXT : Resource.h
  • IDR_REFERENCES_INSERTCITATION : Resource.h
  • IDR_REFERENCES_NEXTFOOTNOTE : Resource.h
  • IDR_RESOURCEBAR : resource.h
  • IDR_REVIEW_CHANGES_ACCEPT : Resource.h
  • IDR_REVIEW_CHANGES_REJECT : Resource.h
  • IDR_REVIEW_COMMENTS_DELETE : Resource.h
  • IDR_REVIEW_COMPARE_COMPARE_COMPARE : Resource.h
  • IDR_REVIEW_COMPARE_SHOWSOURCE : Resource.h
  • IDR_REVIEW_TRACKING_BALLOONS : Resource.h
  • IDR_REVIEW_TRACKING_REVIEWINGPANE : Resource.h
  • IDR_REVIEW_TRACKING_SHOW : Resource.h
  • IDR_REVIEW_TRACKING_TRACKCHANGES : Resource.h
  • IDR_RIBBON : resource.h
  • IDR_RIBBON_MENU_1 : resource.h
  • IDR_RIBBON_MENU_2 : resource.h
  • IDR_RIBBONTYPE : resource.h
  • IDR_RollupControlBaTYPE : Resource.h
  • IDR_ROWLISTYPE : resource.h
  • IDR_ScreenCapTYPE : Resource.h
  • IDR_SCRIBBTYPE : resource.h
  • IDR_SCRIBBTYPE_SRVR_EMB : resource.h
  • IDR_SCRIBBTYPE_SRVR_IP : resource.h
  • IDR_SETBARTYPE : resource.h
  • IDR_SHAPESTYPE : resource.h
  • IDR_SIZE_TOOLBAR : resource.h
  • IDR_SLIDERTYPE : resource.h
  • IDR_SNAPTYPE : resource.h
  • IDR_SOLUTION_EXPLORER : Resource.h
  • IDR_SORT : Resource.h
  • IDR_SPIROTYPE : resource.h
  • IDR_SPLIT2TYPE : resource.h
  • IDR_SPLIT3TYPE : resource.h
  • IDR_SPLIT_DROPDOWN_MENU : resource.h
  • IDR_SRVR_EMBEDDED : resource.h
  • IDR_SRVR_INPLACE : resource.h
  • IDR_SRVR_INPLACE_BIG : resource.h
  • IDR_STANDARDBAR : resource.h
  • IDR_START : Resource.h
  • IDR_STATECTYPE : resource.h
  • IDR_STATUSTYPE : resource.h
  • IDR_TABBEDTYPE : resource.h
  • IDR_TABCONTYPE : resource.h
  • IDR_TASKSPTYPE : resource.h
  • IDR_TC98TYPE : Resource.H
  • IDR_TC98TYPE_CNTR_IP : Resource.H
  • IDR_TCEXTPAGE : Resource.H
  • IDR_TEXT_POPUP : resource.h
  • IDR_TEXTTYPE : resource.h
  • IDR_TEXTTYPE_EMBEDDED : resource.h
  • IDR_TEXTTYPE_INPLACE : resource.h
  • IDR_THEME : resource.h
  • IDR_THEME_MENU : Resource.h , resource.h
  • IDR_THEME_MENU_STATIC : Resource.h
  • IDR_TOOLBAR : resource.h
  • IDR_TOOLBAR1 : resource.h
  • IDR_TOOLBAR_IMAGE_COLLECTION : Resource.h
  • IDR_TOOLBAR_IMAGES : resource.h
  • IDR_TOOLBAR_IMAGES_BIG : resource.h
  • IDR_TOOLBAR_IMAGES_HC : resource.h
  • IDR_TOOLBAR_MENU_IMAGES : resource.h
  • IDR_TOOLBAR_RESOURCE : Resource.h
  • IDR_TOOLBATYPE : resource.h
  • IDR_TOOLTITYPE : resource.h
  • IDR_TRACKETYPE : resource.h
  • IDR_TYPELIBWND : resource.h
  • IDR_VERSION1 : resource.h
  • IDR_VIEWS_POPUP : Resource.h
  • IDR_WEB : resource.h
  • IDR_WINDOWS_MENU : resource.h
  • IDR_WORKSPACE_TOOLBAR : resource.h
  • IDR_WORKSPTYPE : resource.h
  • IDR_WRITE_BORDERS_MENU : Resource.h
  • IDR_WRITE_FIND_MENU : Resource.h
  • IDR_WRITE_FONTCASE_MENU : Resource.h
  • IDR_WRITE_PASTE_MENU : Resource.h
  • IDR_WRITE_SELECT_MENU : Resource.h
  • IDR_WRITE_STYLECHANGE_MENU : Resource.h
  • IDS_ABOUT_INFO : resource.h
  • IDS_ABOUTBOX : resource.h , Resource.h , resource.h
  • IDS_ACTIVESTATE : Resource.H
  • IDS_ADDRESS : Resource.h
  • IDS_ADV_TOOLBAR : resource.h
  • IDS_ALL_DOC : resource.h
  • IDS_ALL_IMAGES : Resource.h
  • IDS_AMODENAME_SHOWGRABHANDLES : Resource.H
  • IDS_AMODENAME_SHOWHATCHING : Resource.H
  • IDS_AMODENAME_UIDEAD : Resource.H
  • IDS_AMODENAME_USERMODE : Resource.H
  • IDS_APROPNAME_BACKCOLOR : Resource.H
  • IDS_APROPNAME_DISPLAYNAME : Resource.H
  • IDS_APROPNAME_FONT : Resource.H
  • IDS_APROPNAME_FORECOLOR : Resource.H
  • IDS_APROPNAME_LOCALEID : Resource.H
  • IDS_APROPNAME_MESSAGEREFLECT : Resource.H
  • IDS_APROPNAME_SCALEUNITS : Resource.H
  • IDS_APROPNAME_SHOWGRABHANDLES : Resource.H
  • IDS_APROPNAME_SHOWHATCHING : Resource.H
  • IDS_APROPNAME_SUPPORTSMNEMONICS : Resource.H
  • IDS_APROPNAME_TEXTALIGN : Resource.H
  • IDS_APROPNAME_UIDEAD : Resource.H
  • IDS_APROPNAME_USERMODE : Resource.H
  • IDS_AUTOREGFAILED : resource.h
  • IDS_BACK : Resource.h
  • IDS_BADCOMMANDLINE : resource.h
  • IDS_BEST_OF_THE_WEB : Resource.h
  • IDS_BLACK : resource.h
  • IDS_BLANK_CHARS_NOT_ALLOWED : resource.h
  • IDS_BLUE : resource.h
  • IDS_BOUNDPROP_CHANGED : Resource.H
  • IDS_BOUNDPROP_REQUESTEDIT : Resource.H
  • IDS_BUILD_TOOLBAR : Resource.h
  • IDS_BUTTON : Resource.h , resource.h
  • IDS_BUTTON_PPG : resource.h
  • IDS_BUTTON_PPG_CAPTION : resource.h
  • IDS_CALLFAILED : resource.h
  • IDS_CALLSUCCEEDED : resource.h
  • IDS_CANNOT_LOAD_DIB : resource.h
  • IDS_CANNOT_PLAY_SOUND : resource.h
  • IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 : resource.h
  • IDS_CANNOT_SAVE_DIB : resource.h
  • IDS_CANNOTOPENFILE : resource.h
  • IDS_CANT_LOAD : resource.h
  • IDS_CAPTION : resource.h
  • IDS_CAPTION_FORMAT : resource.h
  • IDS_CAPTION_NOTHREADS : resource.h
  • IDS_CENTER : resource.h
  • IDS_CENTERED : resource.h
  • IDS_CENTIMETERS : resource.h
  • IDS_CHILDWND_TITLE : resource.h
  • IDS_CIRC : resource.h
  • IDS_CIRC_PPG : resource.h
  • IDS_CIRC_PPG_CAPTION : resource.h
  • IDS_CLIP_FILENAME : resource.h
  • IDS_CLIP_RTF : resource.h
  • IDS_CLIP_TEXT : resource.h
  • IDS_CLOSE_TEXT : resource.h
  • IDS_CM_ABBREV : resource.h
  • IDS_COLOR_NAME_BLUE : resource.h
  • IDS_COLOR_NAME_CYAN : resource.h
  • IDS_COLOR_NAME_FIRST : resource.h
  • IDS_COLOR_NAME_GREEN : resource.h
  • IDS_COLOR_NAME_MAGENTA : resource.h
  • IDS_COLOR_NAME_RED : resource.h
  • IDS_COLOR_NAME_WHITE : resource.h
  • IDS_COLOR_NAME_YELLOW : resource.h
  • IDS_COLORHELPFMT : resource.h
  • IDS_COMPLETE : resource.h
  • IDS_COMPONENT0_DESCRIPTION : resource.h
  • IDS_COMPONENT0_TITLE : resource.h
  • IDS_COMPONENT_TYPE : resource.h
  • IDS_CONFIG_CAPTION : Resource.h
  • IDS_CONTAINERINFOOBJECTHEADER : Resource.H
  • IDS_CONTAINERINFOSTATEHEADER : Resource.H
  • IDS_CONTAINERINFOWINDOWHEADER : Resource.H
  • IDS_CONTAINEROPTIONS : Resource.H
  • IDS_CONTINUE_RECALC_BEFORE_SAVE : resource.h
  • IDS_CONTROLHASNOMETHODS : Resource.H
  • IDS_CONTROLLOGGINGOPTIONS : Resource.H
  • IDS_COPYFAILED : Resource.H
  • IDS_CREATEFAILED : Resource.H
  • IDS_CUSTOMIZE : resource.h
  • IDS_DEFAULT_FONT : resource.h
  • IDS_DEFAULTFONT : resource.h
  • IDS_DEFAULTTEXTFONT : resource.h
  • IDS_DIB_TOO_BIG : resource.h
  • IDS_DIRFULL : resource.h
  • IDS_DISK_SPACE : resource.h
  • IDS_DISK_SPACE_UNAVAIL : resource.h
  • IDS_DISPATCHEXCEPTION : Resource.H
  • IDS_DOCSTRINGTCExtPage : Resource.H
  • IDS_DONE : resource.h
  • IDS_DT1 : resource.h
  • IDS_DT10 : resource.h
  • IDS_DT11 : resource.h
  • IDS_DT12 : resource.h
  • IDS_DT13 : resource.h
  • IDS_DT2 : resource.h
  • IDS_DT3 : resource.h
  • IDS_DT4 : resource.h
  • IDS_DT5 : resource.h
  • IDS_DT6 : resource.h
  • IDS_DT7 : resource.h
  • IDS_DT8 : resource.h
  • IDS_DT9 : resource.h
  • IDS_DUMMY_UNDO_ACTION : Resource.h
  • IDS_EDIT_MYITEM_1 : resource.h
  • IDS_EDIT_MYITEM_2 : resource.h
  • IDS_EDIT_TOOLBAR : Resource.h
  • IDS_EDITFAILED : Resource.h
  • IDS_EMBEDDED_OPTIONS : resource.h
  • IDS_EMPTYSTATE : Resource.H
  • IDS_END_BUTTON : Resource.h
  • IDS_END_BUTTON_1 : Resource.h
  • IDS_ENTERTITLE : resource.h
  • IDS_ERROR : resource.h
  • IDS_ERROR_GETEXPORTERFILTER : Resource.h
  • IDS_ERROR_GETPAGES : Resource.h
  • IDS_ERROR_PROPERTYFRAME : Resource.h
  • IDS_ERROR_SAVE : Resource.h
  • IDS_ERRORLOADINGSCRIPT : Resource.H
  • IDS_ERRORREADINGFROMFILE : Resource.H
  • IDS_ERRORWRITINGTOFILE : Resource.H
  • IDS_ERRSPACE : resource.h
  • IDS_EXCEP_CANTRESIZEPALETTE : resource.h
  • IDS_EXE_DOC : resource.h
  • IDS_EXTRAARGUMENT : resource.h
  • IDS_FALSE : Resource.H
  • IDS_FAVORITES : Resource.h
  • IDS_FILE_EXISTS : resource.h
  • IDS_FILE_NOT_SAVED : resource.h
  • IDS_FILETYPES : Resource.h
  • IDS_FINISHED_SEARCH : resource.h
  • IDS_FOLDER_POPUP_CAPTION : resource.h
  • IDS_FONT : Resource.h
  • IDS_FONT_NAME : resource.h
  • IDS_FORMATS : resource.h
  • IDS_FORMATTING : resource.h
  • IDS_FORWARD : Resource.h
  • IDS_FREE_STUFF : Resource.h
  • IDS_FREQUENTLY_ASKED_QUESTIONS : Resource.h
  • IDS_GET_FASTER_INTERNET_ACCESS : Resource.h
  • IDS_HELLO : resource.h
  • IDS_HELPFILETCExtPage : Resource.H
  • IDS_HOME : Resource.h
  • IDS_IDATAOBJECT : resource.h
  • IDS_IDISPATCH : resource.h
  • IDS_ILLEGAL_VALUE : resource.h
  • IDS_IMAGE : Resource.h
  • IDS_IMAGE_PPG : Resource.h
  • IDS_IMAGE_PPG_CAPTION : Resource.h
  • IDS_IMPLEMENTEDCATEGORIES : Resource.H
  • IDS_INCH1_ABBREV : resource.h
  • IDS_INCH2_ABBREV : resource.h
  • IDS_INCH3_ABBREV : resource.h
  • IDS_INCH4_ABBREV : resource.h
  • IDS_INCHES : resource.h
  • IDS_INI_CLSCTX : resource.h
  • IDS_INI_CONFIG : resource.h
  • IDS_INI_SHOWALLINTERFACES : resource.h
  • IDS_INI_SHOWCFI : resource.h
  • IDS_INI_SHOWCLASSIDS : resource.h
  • IDS_INI_SHOWCONTAINERS : resource.h
  • IDS_INI_SHOWCONTROLS : resource.h
  • IDS_INI_SHOWINSERTABLE : resource.h
  • IDS_INI_SHOWINTERNAL : resource.h
  • IDS_INI_SHOWNOTINSERTABLE : resource.h
  • IDS_INI_SHOWOLE1OBJECTS : resource.h
  • IDS_INI_SHOWTYPELIBS : resource.h
  • IDS_INI_WNDPOS : resource.h
  • IDS_INIFILE : resource.h
  • IDS_INITIAL_KEY : resource.h
  • IDS_INITIAL_STRING : resource.h
  • IDS_INITIAL_VALUE : resource.h
  • IDS_INTERNET_START_PAGE : Resource.h
  • IDS_INVALID_FONTSIZE : resource.h
  • IDS_INVALID_MEASUREMENT : resource.h
  • IDS_INVALID_NUMBER : resource.h
  • IDS_INVALIDDATE : resource.h
  • IDS_INVALIDTIME : resource.h
  • IDS_ITYPEINFO : resource.h
  • IDS_IVIEWERSNOTFOUND1 : resource.h
  • IDS_IVIEWERSNOTFOUND2 : resource.h
  • IDS_IVIEWERSNOTFOUND3 : resource.h
  • IDS_IVIEWERSNOTFOUND4 : resource.h
  • IDS_JUSTIFIED : resource.h
  • IDS_KEY_NOT_FOUND : resource.h
  • IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN : resource.h
  • IDS_LEFT : resource.h
  • IDS_LICENSED : resource.h
  • IDS_LICENSED_PPG : resource.h
  • IDS_LICENSED_PPG_CAPTION : resource.h
  • IDS_LINKS : Resource.h
  • IDS_LOADCONTROLFAILED : Resource.H
  • IDS_LOADEDSTATE : Resource.H
  • IDS_LOADLIBFAILED : resource.h
  • IDS_LOCALIZE : resource.h
  • IDS_LOCALIZE_PPG : resource.h
  • IDS_LOCALIZE_PPG_CAPTION : resource.h
  • IDS_LOGEVENTFORMAT : Resource.H
  • IDS_LOGPROPERTYCHANGEFORMAT : Resource.H
  • IDS_LOGPROPERTYREQUESTEDITFORMAT : Resource.H
  • IDS_MAIN_TOOLBAR : Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h
  • IDS_MAPI_FAIL : resource.h
  • IDS_MAPILOAD_FAILED : resource.h
  • IDS_MATH_COPR_NOTPRESENT : resource.h
  • IDS_MATH_COPR_PRESENT : resource.h
  • IDS_MEASUREMENT_RANGE : resource.h
  • IDS_MENU_TEST : resource.h
  • IDS_METAFILEWINDOWTITLE : Resource.H
  • IDS_MICROSOFT_HOME_PAGE : Resource.h
  • IDS_MULTIPLESELECTION : Resource.H
  • IDS_MUSCRL32_DLL_REQUIRED : resource.h
  • IDS_NEED_RECALC_BEFORE_SAVE : resource.h
  • IDS_NEWPROPERTY : Resource.H
  • IDS_NOBOUNCETEMPLATE : resource.h
  • IDS_NOCOMMONPROPERTIES : Resource.H
  • IDS_NODFVIEW : Resource.H
  • IDS_NODLLNAME : resource.h
  • IDS_NOENTRYPOINT : resource.h
  • IDS_NOHELLOTEMPLATE : resource.h
  • IDS_NOINFO : resource.h
  • IDS_NOMORETABS : resource.h
  • IDS_NOOLEVIEW : Resource.H
  • IDS_NOPROJECT : resource.h
  • IDS_NOPROPERTYPAGES : Resource.H
  • IDS_NOSCRIPTING : Resource.H
  • IDS_NOTDLLOROCX : resource.h
  • IDS_NOTHING : resource.h
  • IDS_NOWRAP : resource.h
  • IDS_OBJECT_PROPERTIES : resource.h
  • IDS_OEMTEXT_DOC : resource.h
  • IDS_OLEINITFAILED : resource.h
  • IDS_ONLINE_SUPPORT : Resource.h
  • IDS_OPENSTATE : Resource.H
  • IDS_OPENSTORAGEFAILED : Resource.H
  • IDS_OPTIONS : resource.h
  • IDS_OUTPUTWINDOWTITLE : Resource.H
  • IDS_PAL : resource.h
  • IDS_PAL_PPG : resource.h
  • IDS_PAL_PPG_CAPTION : resource.h
  • IDS_PALETTE : resource.h
  • IDS_PARAMETER : Resource.H
  • IDS_PATH : Resource.H
  • IDS_PGUPFAILED : Resource.h
  • IDS_PHYSICAL_MEM : resource.h
  • IDS_PICA_ABBREV : resource.h
  • IDS_PICAS : resource.h
  • IDS_PICTURE_UNAVAILABLE : resource.h
  • IDS_PLEASE_SELECT_COLOR : resource.h
  • IDS_PLEASE_WAIT : resource.h
  • IDS_POINT_ABBREV : resource.h
  • IDS_POINTS : resource.h
  • IDS_PRINT : Resource.h
  • IDS_PRIVATE_CF_DESCR : resource.h
  • IDS_PROGID : Resource.H
  • IDS_PROJNAME : Resource.H , resource.h
  • IDS_PROPERTY : Resource.H
  • IDS_PROPERTYEDITALLOWED : Resource.H
  • IDS_PROPERTYEDITDENIED : Resource.H
  • IDS_PROPERTYEDITREQUESTFORMAT : Resource.H
  • IDS_PROPERTYVALUE : Resource.H
  • IDS_PROPSHT_CAPTION : resource.h
  • IDS_PURPLE : resource.h
  • IDS_PUSH : resource.h
  • IDS_PUSH_PPG : resource.h
  • IDS_PUSH_PPG_CAPTION : resource.h
  • IDS_RADIO_END : Resource.h
  • IDS_RADIO_END_1 : Resource.h
  • IDS_RADIO_START : Resource.h
  • IDS_RECALCULATING : resource.h
  • IDS_RED : resource.h
  • IDS_REFRESH : Resource.h
  • IDS_REG_GROUPBYKIND : resource.h
  • IDS_REG_TYPELIB : resource.h
  • IDS_REG_WNDPOS : resource.h
  • IDS_REGISTRYKEY : resource.h
  • IDS_REQUIREDCATEGORIES : Resource.H
  • IDS_RESOURCE_TOOLBAR : Resource.h
  • IDS_RICHED_LOAD_FAIL : resource.h
  • IDS_RICHTEXT_DOC : resource.h
  • IDS_RIGHT : resource.h
  • IDS_RTF_DOCUMENT : resource.h
  • IDS_RTF_OPTIONS : resource.h
  • IDS_SAVE_FORMAT : resource.h
  • IDS_SAVE_FORMAT_TEXT : resource.h
  • IDS_SAVE_UNSUPPORTED : resource.h
  • IDS_SAVETOPROPERTYBAGFAILED : Resource.H
  • IDS_SAVETOSTORAGEFAILED : Resource.H
  • IDS_SAVETOSTREAMFAILED : Resource.H
  • IDS_SAVING : resource.h
  • IDS_SCRIPT_FILES : Resource.H
  • IDS_SCRIPTERRORFORMAT : Resource.H
  • IDS_SEARCH : Resource.h
  • IDS_SEARCH_THE_WEB : Resource.h
  • IDS_SELECT_DWORD_TO_REMOVE : resource.h
  • IDS_SELECT_DWORD_TO_UPDATE : resource.h
  • IDS_SELECT_ENTRY : resource.h
  • IDS_SELECT_ENTRY_TO_BE_REMOVED : resource.h
  • IDS_SELECT_ENTRY_TO_BE_UPDATED : resource.h
  • IDS_SELECT_INTEGER : resource.h
  • IDS_SELECT_POINT_TO_BE_REMOVED : resource.h
  • IDS_SELECT_POINT_TO_BE_UPDATED : resource.h
  • IDS_SELECT_STRING_FIRST : resource.h
  • IDS_SELECTED_PROMPT : resource.h
  • IDS_SEND_FEEDBACK : Resource.h
  • IDS_SERVERNOTFOUND : Resource.H
  • IDS_SHAREVIOLATION : resource.h
  • IDS_SPINDIAL : resource.h
  • IDS_SPINDIAL_PPG : resource.h
  • IDS_SPINDIAL_PPG_CAPTION : resource.h
  • IDS_STANDARD : resource.h
  • IDS_STOP : Resource.h
  • IDS_STORAGE_FILES : Resource.H
  • IDS_STREAM_FILES : Resource.H
  • IDS_STRING1001 : Resource.h
  • IDS_STRING1002 : Resource.h
  • IDS_STRING1003 : Resource.h
  • IDS_STRING105 : resource.h
  • IDS_STRING106 : resource.h
  • IDS_STRING107 : resource.h
  • IDS_STRING108 : resource.h
  • IDS_STRING109 : resource.h
  • IDS_STRING130 : Resource.h
  • IDS_STRING131 : Resource.h
  • IDS_STRING_NOT_FOUND_FMT : Resource.h
  • IDS_TESTERROR : resource.h
  • IDS_TESTHELP : resource.h
  • IDS_TESTHELP_PPG : resource.h
  • IDS_TESTHELP_PPG_CAPTION : resource.h
  • IDS_TEXT_DOC : resource.h
  • IDS_TEXT_DOCUMENT : resource.h
  • IDS_TEXT_OPTIONS : resource.h
  • IDS_TF_BUTTONS : resource.h
  • IDS_TIME : resource.h
  • IDS_TIME_PPG : resource.h
  • IDS_TIME_PPG_CAPTION : resource.h
  • IDS_TIMER : resource.h
  • IDS_TITLE_FORMATBAR : resource.h
  • IDS_TITLE_MENUBAR : resource.h
  • IDS_TITLE_TOOLBAR : resource.h
  • IDS_TITLETCExtPage : Resource.H
  • IDS_TOOMANYFILES : resource.h
  • IDS_TRUE : Resource.H
  • IDS_TRY_AGAIN : resource.h
  • IDS_TYPE : Resource.H
  • IDS_UAT_BACKSPACE : Resource.h
  • IDS_UAT_CUT : Resource.h
  • IDS_UAT_DELETE : Resource.h
  • IDS_UAT_DELETEDATA : Resource.h
  • IDS_UAT_DRAGDROP : Resource.h
  • IDS_UAT_ENTER : Resource.h
  • IDS_UAT_INDENT : Resource.h
  • IDS_UAT_INDENTDATA : Resource.h
  • IDS_UAT_INSERTDATA : Resource.h
  • IDS_UAT_PASTE : Resource.h
  • IDS_UAT_REPLACE : Resource.h
  • IDS_UAT_TAB : Resource.h
  • IDS_UAT_TYPING : Resource.h
  • IDS_UAT_UNDEFINED : Resource.h
  • IDS_UAT_UNINDENT : Resource.h
  • IDS_UAT_UNKNOWN : Resource.h
  • IDS_UIACTIVESTATE : Resource.H
  • IDS_UNABLETOREPRESENT : Resource.H
  • IDS_UNKCOLOR : resource.h
  • IDS_UNKNOWN : resource.h
  • IDS_UNKNOWNDISPIDFORMAT : Resource.H
  • IDS_UNRECOGNIZEDFLAG : resource.h
  • IDS_UNREGISTERSERVERFAILED : Resource.H
  • IDS_UNSPECIFIEDEXCEPTION : Resource.H
  • IDS_UNSPECIFIEDSOURCE : Resource.H
  • IDS_USAGE : resource.h
  • IDS_VALUE : Resource.H
  • IDS_VTBOOL : Resource.H
  • IDS_VTBSTR : Resource.H
  • IDS_VTCOLOR : Resource.H
  • IDS_VTFONT : Resource.H
  • IDS_VTI2 : Resource.H
  • IDS_VTI4 : Resource.H
  • IDS_WARNING_BITDEPTH : Resource.h
  • IDS_WARNING_DEBUG : Resource.h
  • IDS_WEB_TOOLBAR : resource.h
  • IDS_WEB_TUTORIAL : Resource.h
  • IDS_WINDOWED : Resource.H
  • IDS_WINDOWLESS : Resource.H
  • IDS_WINDOWS_MANAGER : resource.h , Resource.h , resource.h
  • IDS_WINWORD2_DOC : resource.h
  • IDS_WINWORD6_DOC : resource.h
  • IDS_WNDCLASS_NOT_REGISTERED : resource.h
  • IDS_WORD6_DOCUMENT : resource.h
  • IDS_WORD6_OPTIONS : resource.h
  • IDS_WORD6_WARNING : resource.h
  • IDS_WORD6_WARNING_BUTTONS : resource.h
  • IDS_WRAPTORULER : resource.h
  • IDS_WRAPTOWINDOW : resource.h
  • IDS_WRITE_DOC : resource.h
  • IDS_WRITE_OPTIONS : resource.h
  • IDS_WRITEPROTECT : resource.h
  • IDS_WRONG_DISPLAY_SETTINGS : resource.h , Resource.h
  • IDS_XLIST : resource.h
  • IDS_XLIST_PPG : resource.h
  • IDS_XLIST_PPG_CAPTION : resource.h
  • IDS_YOU_CHOSE : resource.h
  • IDS_YOU_PICKED_COLOR : resource.h
  • IdShowProgress1Timer : MainFrm.cpp
  • IdShowProgress2Timer : MainFrm.cpp
  • IdShowProgressTimer : MainFrm.cpp
  • IDSOUND_CORRECT : resource.h
  • IDSOUND_GIVEUP : resource.h
  • IDSOUND_GOODBYE : resource.h
  • IDSOUND_INCORRECT : resource.h
  • IDSOUND_QUESTION : resource.h
  • IDSOUND_WELCOME : resource.h
  • IdStartProgressTimer : MainFrm.cpp
  • idTabDeveloper : MainFrm.cpp
  • idTree : FolderBar.cpp , FolderListBar.cpp , ExplorerBar.cpp , DynamicHelpView.cpp
  • IDW_BROWSE_BAR : resource.h
  • IDW_COMBO : resource.h
  • IDW_DEBUG_BAR : resource.h
  • IDW_EDIT_BAR : resource.h
  • IDW_MAIN_BAR : resource.h
  • IDW_PALETTE_BAR : resource.h
  • IDW_RESOURCE_BAR : resource.h
  • IDW_STYLES : resource.h
  • IE_CANUNDO : penwin.h
  • IE_DOCOMMAND : penwin.h
  • IE_EMPTYUNDOBUFFER : penwin.h
  • IE_GETAPPDATA : penwin.h
  • IE_GETBKGND : penwin.h
  • IE_GETCOMMAND : penwin.h
  • IE_GETCOUNT : penwin.h
  • IE_GETDRAWOPTS : penwin.h
  • IE_GETERASERTIP : penwin.h
  • IE_GETFORMAT : penwin.h
  • IE_GETGESTURE : penwin.h
  • IE_GETGRIDORIGIN : penwin.h
  • IE_GETGRIDPEN : penwin.h
  • IE_GETGRIDSIZE : penwin.h
  • IE_GETINK : penwin.h
  • IE_GETINKINPUT : penwin.h
  • IE_GETINKRECT : penwin.h
  • IE_GETMENU : penwin.h
  • IE_GETMODE : penwin.h
  • IE_GETMODIFY : penwin.h
  • IE_GETNOTIFY : penwin.h
  • IE_GETPAINTDC : penwin.h
  • IE_GETPDEVENT : penwin.h
  • IE_GETPENTIP : penwin.h
  • IE_GETRECOG : penwin.h
  • IE_GETSECURITY : penwin.h
  • IE_GETSEL : penwin.h
  • IE_GETSELCOUNT : penwin.h
  • IE_GETSELITEMS : penwin.h
  • IE_GETSTYLE : penwin.h
  • IE_MSGFIRST : penwin.h
  • IE_SETAPPDATA : penwin.h
  • IE_SETBKGND : penwin.h
  • IE_SETDRAWOPTS : penwin.h
  • IE_SETERASERTIP : penwin.h
  • IE_SETFORMAT : penwin.h
  • IE_SETGRIDORIGIN : penwin.h
  • IE_SETGRIDPEN : penwin.h
  • IE_SETGRIDSIZE : penwin.h
  • IE_SETINK : penwin.h
  • IE_SETINKINPUT : penwin.h
  • IE_SETMODE : penwin.h
  • IE_SETMODIFY : penwin.h
  • IE_SETNOTIFY : penwin.h
  • IE_SETPENTIP : penwin.h
  • IE_SETRECOG : penwin.h
  • IE_SETSECURITY : penwin.h
  • IE_SETSEL : penwin.h
  • IE_UNDO : penwin.h
  • IEB_BIT_CENTER : penwin.h
  • IEB_BIT_STRETCH : penwin.h
  • IEB_BIT_TILE : penwin.h
  • IEB_BIT_UL : penwin.h
  • IEB_BRUSH : penwin.h
  • IEB_DEFAULT : penwin.h
  • IEB_OWNERDRAW : penwin.h
  • IEDITCONTROL : itemtemp.h
  • IEDO_FAST : penwin.h
  • IEDO_NONE : penwin.h
  • IEDO_RESERVED : penwin.h
  • IEDO_SAVEUPSTROKES : penwin.h
  • IEGI_ALL : penwin.h
  • IEGI_SELECTION : penwin.h
  • IEI_CROP : penwin.h
  • IEI_DISCARD : penwin.h
  • IEI_MOVE : penwin.h
  • IEI_RESERVED : penwin.h
  • IEI_RESIZE : penwin.h
  • IEM_CLEAR : penwin.h
  • IEM_COPY : penwin.h
  • IEM_CUT : penwin.h
  • IEM_ERASE : penwin.h
  • IEM_LASSO : penwin.h
  • IEM_PASTE : penwin.h
  • IEM_PROPERTIES : penwin.h
  • IEM_RESIZE : penwin.h
  • IEM_SELECTALL : penwin.h
  • IEM_UNDO : penwin.h
  • IEM_USER : penwin.h
  • IEMODE_ERASE : penwin.h
  • IEMODE_LASSO : penwin.h
  • IEMODE_READY : penwin.h
  • IEN_EDIT : penwin.h
  • IEN_FOCUS : penwin.h
  • IEN_NULL : penwin.h
  • IEN_PAINT : penwin.h
  • IEN_PDEVENT : penwin.h
  • IEN_PROPERTIES : penwin.h
  • IEN_RESERVED : penwin.h
  • IEN_SCROLL : penwin.h
  • IER_ERROR : penwin.h
  • IER_MEMERR : penwin.h
  • IER_NO : penwin.h
  • IER_NOCOMMAND : penwin.h
  • IER_NOGESTURE : penwin.h
  • IER_NOPDEVENT : penwin.h
  • IER_NOTINPAINT : penwin.h
  • IER_OK : penwin.h
  • IER_OWNERDRAW : penwin.h
  • IER_PARAMERR : penwin.h
  • IER_PENDATA : penwin.h
  • IER_SCALE : penwin.h
  • IER_SECURITY : penwin.h
  • IER_SELECTION : penwin.h
  • IER_YES : penwin.h
  • IEREC_ALL : penwin.h
  • IEREC_GESTURE : penwin.h
  • IEREC_NONE : penwin.h
  • IEREC_RESERVED : penwin.h
  • IES_BORDER : penwin.h
  • IES_HSCROLL : penwin.h
  • IES_OWNERDRAW : penwin.h
  • IES_VSCROLL : penwin.h
  • IESEC_NOCOPY : penwin.h
  • IESEC_NOCUT : penwin.h
  • IESEC_NOERASE : penwin.h
  • IESEC_NOGET : penwin.h
  • IESEC_NOINK : penwin.h
  • IESEC_NOPASTE : penwin.h
  • IESEC_NOSET : penwin.h
  • IESEC_NOUNDO : penwin.h
  • IESEC_RESERVED : penwin.h
  • IESF_ALL : penwin.h
  • IESF_PENTIP : penwin.h
  • IESF_SELECTION : penwin.h
  • IESF_STROKE : penwin.h
  • IESF_TIPCOLOR : penwin.h
  • IESF_TIPWIDTH : penwin.h
  • IESI_APPEND : penwin.h
  • IESI_REPLACE : penwin.h
  • if() : xlistctl.cpp
  • iHeightInHiMetric : xlistctl.cpp
  • IID_DButtonEvents : btnctl.cpp
  • IID_DCircEvents : circctl.cpp
  • IID_DImageEvents : ImageCtl.cpp
  • IID_DLicensedEvents : licenctl.cpp
  • IID_DLocalizeEvents : localctl.cpp
  • IID_DPalEvents : palctl.cpp
  • IID_DPushEvents : pushctl.cpp
  • IID_DSpindialEvents : spinctl.cpp
  • IID_DTesthelpEvents : ThelpCtl.cpp
  • IID_DTimeEvents : timectl.cpp
  • IID_DXlistEvents : xlistctl.cpp
  • IID_IPropertyNotifySink : TCItem.Cpp
  • IID_ITC98ExtendedControl : ExtCtl.H
  • iMaxUserToolbars : MainFrm.cpp , mainfrm.cpp , MainFrm.cpp
  • IMECOLORS : penwin.h
  • IMPLEMENT_DUAL_ERRORINFO : mfcdual.h
  • IMPLEMENT_DYNAMIC() : Log.Cpp , PropBag.Cpp , ScrMngr.Cpp , Log.Cpp
  • IMPLEMENT_DYNCREATE() : MSMCaptionBarButton.cpp
  • IMPLEMENT_OLECREATE() : strcoll.cpp , varmap.cpp , dispatch.cpp
  • IMPLEMENT_OLECREATE_EX() : pushppg.cpp , ThelpCtl.cpp , timeppg.cpp , xlistppg.cpp , licenctl.cpp , licenppg.cpp , ImageCtl.cpp , localctl.cpp , ImagePpg.cpp , palctl.cpp , pushctl.cpp , spinctl.cpp , btnctl.cpp , palppg.cpp , localppg.cpp , timectl.cpp , spinppg.cpp , btnppg.cpp , circctl.cpp , xlistctl.cpp , ThelpPpg.cpp , circppg.cpp
  • IMPLEMENT_OLECREATE_SINGLE() : calcdlg.cpp
  • IMPLEMENT_SERIAL() : svritem.cpp , AProp.Cpp
  • IMPLTYPE_DEFAULTINTERFACE : TCItem.H
  • IMPLTYPE_DEFAULTSOURCE : TCItem.H
  • IMPLTYPE_MASK : TCItem.H
  • IN_CHANGE : penwin.h
  • IN_CLOSE : penwin.h
  • IN_COMMAND : penwin.h
  • IN_ERASEBKGND : penwin.h
  • IN_GESTURE : penwin.h
  • IN_HSCROLL : penwin.h
  • IN_KILLFOCUS : penwin.h
  • IN_MEMERR : penwin.h
  • IN_MODECHANGED : penwin.h
  • IN_PAINT : penwin.h
  • IN_PDEVENT : penwin.h
  • IN_POSTPAINT : penwin.h
  • IN_PREPAINT : penwin.h
  • IN_PROPERTIES : penwin.h
  • IN_SETFOCUS : penwin.h
  • IN_UPDATE : penwin.h
  • IN_VSCROLL : penwin.h
  • Info() : regsvr.cpp
  • InitConverter32() : mswd6_32.h
  • InitRC() : penwin.h
  • InitRecognizer() : penwin.h
  • InitTestDLL1() : testdll1.cpp , testdll1.h
  • InitTestDLL2() : testdll2.h , testdll2.cpp
  • INKINGINFO : penwin.h
  • INKWIDTH_MAXIMUM : penwin.h
  • INKWIDTH_MINIMUM : penwin.h
  • INPPARAMS : penwin.h
  • InsertPenData() : penwin.h
  • InsertPenDataPoints() : penwin.h
  • InsertPenDataStroke() : penwin.h
  • InstallRecognizer() : penwin.h
  • INTERFACE_PART() : TCItem.Cpp
  • INTERVAL : penwin.h
  • InvokeKindToString() : VarUtils.Cpp , VarUtils.H
  • IS_WIN30_DIB : dibapi.h
  • IsAlcBitAnsi : penwin.h
  • IsBalloonTooltipAvailable() : TooltipDemoView.cpp
  • IsDLLInPath() : doctype.h , doctype.cpp , doctype.h
  • IsFormatCorrect32() : mswd6_32.h
  • IsMenuButtonEmpty() : MainFrm.cpp
  • IsMMX() : stdafx.cpp , stdafx.h
  • isodigit : makehm.cpp
  • IsPenAware() : penwin.h
  • IsPenEvent() : penwin.h
  • ISR_BADINDEX : penwin.h
  • ISR_BADINKSET : penwin.h
  • ISR_ERROR : penwin.h
  • IsSSE2() : stdafx.cpp , stdafx.h
  • ISTATICTEXT : itemtemp.h
  • IsTextType() : doctype.h
  • IsValidSymbol() : makehm.cpp
  • IsValidValue() : makehm.cpp
  • iSycNull : penwin.h
  • ITEM_HEIGHT : ObjView.h
  • ITEMDATA : idataobj.cpp
  • iWidthInHiMetric : xlistctl.cpp
  • iWidthInPix : xlistctl.cpp
  • IX_END : penwin.h
  • iXppli : xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- p -

  • PaintDIB() : dibapi.cpp , dibapi.h
  • PAL_E_CANTRESIZEPALETTE : palctl.h
  • PaletteSize() : dibapi.cpp , dibapi.h
  • PALVERSION : dibapi.h
  • ParseOffNumber() : util.h , util.cpp , util.h , util.cpp
  • PCM_ADDDEFAULTS : penwin.h
  • PCM_DOPOLLING : penwin.h
  • PCM_INVERT : penwin.h
  • PCM_PENUP : penwin.h
  • PCM_RANGE : penwin.h
  • PCM_RECTBOUND : penwin.h
  • PCM_RECTEXCLUDE : penwin.h
  • PCM_RGNBOUND : penwin.h
  • PCM_RGNEXCLUDE : penwin.h
  • PCM_TAPNHOLD : penwin.h
  • PCM_TIMEOUT : penwin.h
  • PCMINFO : penwin.h
  • PCMR_ALREADYCOLLECTING : penwin.h
  • PCMR_APPTERMINATED : penwin.h
  • PCMR_DISPLAYERR : penwin.h
  • PCMR_ERROR : penwin.h
  • PCMR_EVENTLOCK : penwin.h
  • PCMR_INVALID_PACKETID : penwin.h
  • PCMR_INVALIDCOLLECTION : penwin.h
  • PCMR_OK : penwin.h
  • PCMR_OVERFLOW : penwin.h
  • PCMR_SELECT : penwin.h
  • PCMR_TAP : penwin.h
  • PCMR_TERMBOUND : penwin.h
  • PCMR_TERMEX : penwin.h
  • PCMR_TERMINVERT : penwin.h
  • PCMR_TERMPENUP : penwin.h
  • PCMR_TERMRANGE : penwin.h
  • PCMR_TERMTIMEOUT : penwin.h
  • PCOLUMNSTRUCT : idataobj.h , util.h
  • PDC_BARREL1 : penwin.h
  • PDC_BARREL2 : penwin.h
  • PDC_BARREL3 : penwin.h
  • PDC_INTEGRATED : penwin.h
  • PDC_INVERT : penwin.h
  • PDC_PROXIMITY : penwin.h
  • PDC_RANGE : penwin.h
  • PDC_RELATIVE : penwin.h
  • PDEVENT : penwin.h
  • PDK_BARREL1 : penwin.h
  • PDK_BARREL2 : penwin.h
  • PDK_BARREL3 : penwin.h
  • PDK_DOWN : penwin.h
  • PDK_DRIVER : penwin.h
  • PDK_INKSTOPPED : penwin.h
  • PDK_INVERTED : penwin.h
  • PDK_NULL : penwin.h
  • PDK_OUTOFRANGE : penwin.h
  • PDK_PENIDMASK : penwin.h
  • PDK_SWITCHES : penwin.h
  • PDK_TIPMASK : penwin.h
  • PDK_TRANSITION : penwin.h
  • PDK_UNUSED10 : penwin.h
  • PDK_UNUSED1000 : penwin.h
  • PDK_UNUSED20 : penwin.h
  • PDK_UP : penwin.h
  • PDLLREGISTERSERVER : RegCtlDg.Cpp
  • PDLLUNREGISTERSERVER : RegCtlDg.Cpp
  • PDR_ABORT : penwin.h
  • PDR_CANCEL : penwin.h
  • PDR_COMPRESSED : penwin.h
  • PDR_ERROR : penwin.h
  • PDR_HIT : penwin.h
  • PDR_INKSETERR : penwin.h
  • PDR_MEMERR : penwin.h
  • PDR_NA : penwin.h
  • PDR_NOHIT : penwin.h
  • PDR_OEMDATAERR : penwin.h
  • PDR_OK : penwin.h
  • PDR_PNDTERR : penwin.h
  • PDR_PNTINDEXERR : penwin.h
  • PDR_SCALINGERR : penwin.h
  • PDR_SCTERR : penwin.h
  • PDR_STRKINDEXERR : penwin.h
  • PDR_TIMESTAMPERR : penwin.h
  • PDR_USERDATAERR : penwin.h
  • PDR_VERSIONERR : penwin.h
  • PDT_ANGLEXY : penwin.h
  • PDT_ANGLEZ : penwin.h
  • PDT_BARRELROTATION : penwin.h
  • PDT_HEIGHT : penwin.h
  • PDT_NULL : penwin.h
  • PDT_OEMSPECIFIC : penwin.h
  • PDT_PRESSURE : penwin.h
  • PDTS_ARBITRARY : penwin.h
  • PDTS_COMPRESS2NDDERIV : penwin.h
  • PDTS_COMPRESSED : penwin.h
  • PDTS_COMPRESSMETHOD : penwin.h
  • PDTS_DISPLAY : penwin.h
  • PDTS_HIENGLISH : penwin.h
  • PDTS_HIMETRIC : penwin.h
  • PDTS_LOMETRIC : penwin.h
  • PDTS_NOCOLINEAR : penwin.h
  • PDTS_NOCOLLINEAR : penwin.h
  • PDTS_NOEMPTYSTROKES : penwin.h
  • PDTS_NOOEMDATA : penwin.h
  • PDTS_NOPENINFO : penwin.h
  • PDTS_NOTICK : penwin.h
  • PDTS_NOUPPOINTS : penwin.h
  • PDTS_NOUSER : penwin.h
  • PDTS_SCALEMASK : penwin.h
  • PDTS_STANDARDSCALE : penwin.h
  • PDTT_ALL : penwin.h
  • PDTT_COLINEAR : penwin.h
  • PDTT_COLLINEAR : penwin.h
  • PDTT_COMPRESS : penwin.h
  • PDTT_DECOMPRESS : penwin.h
  • PDTT_DEFAULT : penwin.h
  • PDTT_OEMDATA : penwin.h
  • PDTT_PENINFO : penwin.h
  • PDTT_UPPOINTS : penwin.h
  • PE_BEGINDATA : penwin.h
  • PE_BEGININPUT : penwin.h
  • PE_BUFFERWARNING : penwin.h
  • PE_ENDDATA : penwin.h
  • PE_ENDINPUT : penwin.h
  • PE_GETINKINGINFO : penwin.h
  • PE_GETPCMINFO : penwin.h
  • PE_MOREDATA : penwin.h
  • PE_PENDOWN : penwin.h
  • PE_PENMOVE : penwin.h
  • PE_PENUP : penwin.h
  • PE_RESULT : penwin.h
  • PE_SETTARGETS : penwin.h
  • PE_TERMINATED : penwin.h
  • PE_TERMINATING : penwin.h
  • PeekPenInput() : penwin.h
  • PEN_ILLEGALCHAR : paredit.h
  • PenDataFromBuffer() : penwin.h
  • PENDATAHEADER : penwin.h
  • PenDataToBuffer() : penwin.h
  • PENINFO : penwin.h
  • PENMARKERSIZE : StdAfx.h
  • PENPACKET : penwin.h
  • PENREG_DEFAULT : penwin.h
  • PENREG_WILLHANDLEMOUSE : penwin.h
  • PENTIP : penwin.h
  • PENTIP_HEIGHTDEFAULT : penwin.h
  • PENTIP_HILITE : penwin.h
  • PENTIP_NIBDEFAULT : penwin.h
  • PENTIP_OPAQUE : penwin.h
  • PENTIP_TRANSPARENT : penwin.h
  • PENVER : penwin.h
  • PES_ALL : paredit.h
  • PES_LETTERS : paredit.h
  • PES_NUMBERS : paredit.h
  • PES_OTHERCHARS : paredit.h
  • PFN_RTF_CALLBACK : mswd6_32.h
  • PH_DEFAULT : penwin.h
  • PH_MAX : penwin.h
  • PH_MIN : penwin.h
  • PHW_ALL : penwin.h
  • PHW_ANGLEXY : penwin.h
  • PHW_ANGLEZ : penwin.h
  • PHW_BARRELROTATION : penwin.h
  • PHW_HEIGHT : penwin.h
  • PHW_NONE : penwin.h
  • PHW_OEMSPECIFIC : penwin.h
  • PHW_PDK : penwin.h
  • PHW_PRESSURE : penwin.h
  • PI : piece.h
  • PID_CURRENT : penwin.h
  • PII_CLIPSTOP : penwin.h
  • PII_INKCLIPRECT : penwin.h
  • PII_INKCLIPRGN : penwin.h
  • PII_INKPENTIP : penwin.h
  • PII_INKSTOPRECT : penwin.h
  • PII_INKSTOPRGN : penwin.h
  • PII_SAVEBACKGROUND : penwin.h
  • PISFORMATFUNC : doctype.h
  • PIT_RGNBOUND : penwin.h
  • PIT_RGNEXCLUDE : penwin.h
  • PIT_TAPNHOLD : penwin.h
  • PIT_TIMEOUT : penwin.h
  • PITEMDATA : idataobj.cpp
  • PLAY_VERSION_10_DATA : penwin.h
  • PLAY_VERSION_20_DATA : penwin.h
  • PMI_BEDIT : penwin.h
  • PMI_CXTABLET : penwin.h
  • PMI_CYTABLET : penwin.h
  • PMI_ENABLEFLAGS : penwin.h
  • PMI_IMECOLOR : penwin.h
  • PMI_INDEXFROMRGB : penwin.h
  • PMI_PENTIP : penwin.h
  • PMI_RCCHANGE : penwin.h
  • PMI_RGBFROMINDEX : penwin.h
  • PMI_SAVE : penwin.h
  • PMI_SYSFLAGS : penwin.h
  • PMI_SYSREC : penwin.h
  • PMI_TICKREF : penwin.h
  • PMI_TIMEOUT : penwin.h
  • PMI_TIMEOUTGEST : penwin.h
  • PMI_TIMEOUTSEL : penwin.h
  • PMIR_ERROR : penwin.h
  • PMIR_INDEX : penwin.h
  • PMIR_INIERROR : penwin.h
  • PMIR_INVALIDBOXEDITINFO : penwin.h
  • PMIR_NA : penwin.h
  • PMIR_OK : penwin.h
  • PMIR_VALUE : penwin.h
  • PMSC_BEDITCHANGE : penwin.h
  • PMSC_GETHRC : penwin.h
  • PMSC_GETINKINGINFO : penwin.h
  • PMSC_GETPCMINFO : penwin.h
  • PMSC_GETSYMBOLCOUNT : penwin.h
  • PMSC_GETSYMBOLS : penwin.h
  • PMSC_INKSTOP : penwin.h
  • PMSC_LOADPW : penwin.h
  • PMSC_SETHRC : penwin.h
  • PMSC_SETINKINGINFO : penwin.h
  • PMSC_SETPCMINFO : penwin.h
  • PMSC_SETSYMBOLS : penwin.h
  • PMSCL_LOADED : penwin.h
  • PMSCL_UNLOADED : penwin.h
  • PMSCL_UNLOADING : penwin.h
  • PointerToNthField() : util.cpp , util.h
  • poly : drawtool.h
  • PostVirtualKeyEvent() : penwin.h
  • PostVirtualMouseEvent() : penwin.h
  • PRECTL : penwin.h
  • PRINTDLGORD : resource.h
  • PRINTER_FONT : formatba.cpp
  • PRNSETUPDLGORD : resource.h
  • ProcessDllIdle() : ScreenCapApi.h , Exports.cpp
  • ProcessHRC() : penwin.h
  • ProcessWriting() : penwin.h
  • PROGRESS_MAX : StatusBarDemoView.cpp
  • PROPERTYIDOFFSET : propset.h
  • PROPHEADER : propset.h
  • PROPPAGEID() : ThelpCtl.cpp
  • psh1 : resource.h
  • psh10 : resource.h
  • psh11 : resource.h
  • psh12 : resource.h
  • psh13 : resource.h
  • psh14 : resource.h
  • psh15 : resource.h
  • psh16 : resource.h
  • psh2 : resource.h
  • psh3 : resource.h
  • psh4 : resource.h
  • psh5 : resource.h
  • psh6 : resource.h
  • psh7 : resource.h
  • psh8 : resource.h
  • psh9 : resource.h
  • PWE_ACTIONHANDLES : penwin.h
  • PWE_AUTOWRITE : penwin.h
  • PWE_INPUTCURSOR : penwin.h
  • PWE_LENS : penwin.h
  • PWF_BEDIT : penwin.h
  • PWF_ENHANCED : penwin.h
  • PWF_FULL : penwin.h
  • PWF_HEDIT : penwin.h
  • PWF_IEDIT : penwin.h
  • PWF_INKDISPLAY : penwin.h
  • PWF_PEN : penwin.h
  • PWF_RC1 : penwin.h
  • PWF_RECOGNIZER : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- r -

  • rad1 : resource.h
  • rad10 : resource.h
  • rad11 : resource.h
  • rad12 : resource.h
  • rad13 : resource.h
  • rad14 : resource.h
  • rad15 : resource.h
  • rad16 : resource.h
  • rad2 : resource.h
  • rad3 : resource.h
  • rad4 : resource.h
  • rad5 : resource.h
  • rad6 : resource.h
  • rad7 : resource.h
  • rad8 : resource.h
  • rad9 : resource.h
  • Random() : stdafx.h
  • RC : penwin.h
  • RC_LDEFAULT : penwin.h
  • RC_LDEFAULTFLAGS : penwin.h
  • RC_WDEFAULT : penwin.h
  • RC_WDEFAULTFLAGS : penwin.h
  • RCD_BT : penwin.h
  • RCD_DEFAULT : penwin.h
  • RCD_LR : penwin.h
  • RCD_RL : penwin.h
  • RCD_TB : penwin.h
  • RCF_BOLD : util.h
  • RCF_ITALIC : util.h
  • RCF_NODEFAULT : util.h
  • RCF_NORMAL : util.h
  • RCF_STRIKEOUT : util.h
  • RCF_TRUETYPEONLY : util.h
  • RCF_UNDERLINE : util.h
  • RCIP_ALLANSICHAR : penwin.h
  • RCIP_MASK : penwin.h
  • RCO_BOXCROSS : penwin.h
  • RCO_BOXED : penwin.h
  • RCO_COLDRECOG : penwin.h
  • RCO_DISABLEGESMAP : penwin.h
  • RCO_DODEFAULT : penwin.h
  • RCO_NOFLASHCURSOR : penwin.h
  • RCO_NOFLASHUNKNOWN : penwin.h
  • RCO_NOHIDECURSOR : penwin.h
  • RCO_NOHOOK : penwin.h
  • RCO_NOPOINTEREVENT : penwin.h
  • RCO_NOSPACEBREAK : penwin.h
  • RCO_SAVEALLDATA : penwin.h
  • RCO_SAVEBACKGROUND : penwin.h
  • RCO_SAVEHPENDATA : penwin.h
  • RCO_SUGGEST : penwin.h
  • RCO_TABLETCOORD : penwin.h
  • RCOR_LEFT : penwin.h
  • RCOR_NORMAL : penwin.h
  • RCOR_RIGHT : penwin.h
  • RCOR_UPSIDEDOWN : penwin.h
  • RCP_LEFTHAND : penwin.h
  • RCP_MAPCHAR : penwin.h
  • RCRESULT : penwin.h
  • RCRT_ALREADYPROCESSED : penwin.h
  • RCRT_DEFAULT : penwin.h
  • RCRT_GESTURE : penwin.h
  • RCRT_GESTURETOKEYS : penwin.h
  • RCRT_GESTURETRANSLATED : penwin.h
  • RCRT_NORECOG : penwin.h
  • RCRT_NOSYMBOLMATCH : penwin.h
  • RCRT_PRIVATE : penwin.h
  • RCRT_UNIDENTIFIED : penwin.h
  • rct1 : resource.h
  • rct2 : resource.h
  • rct3 : resource.h
  • rct4 : resource.h
  • RCYIELDPROC : penwin.h
  • RD_ALL : doctype.h
  • RD_DEFAULT : doctype.h
  • RD_EMBEDDED : doctype.h
  • RD_EXE : doctype.h
  • RD_NATIVE : doctype.h
  • RD_OEMTEXT : doctype.h
  • RD_RICHTEXT : doctype.h
  • RD_TEXT : doctype.h
  • RD_WINWORD2 : doctype.h
  • RD_WINWORD6 : doctype.h
  • RD_WORDPAD : doctype.h
  • RD_WRITE : doctype.h
  • ReadDIBFile() : dibapi.h , myfile.cpp
  • ReadHWL() : penwin.h
  • ReallyCreateFont() : util.cpp , util.h
  • REC : penwin.h
  • REC_ABORT : penwin.h
  • REC_ALC : penwin.h
  • REC_BADEVENTREF : penwin.h
  • REC_BADHPENDATA : penwin.h
  • REC_BUFFERTOOSMALL : penwin.h
  • REC_BUSY : penwin.h
  • REC_CLVERIFY : penwin.h
  • REC_DEBUG : penwin.h
  • REC_DICT : penwin.h
  • REC_DONE : penwin.h
  • REC_ERRORLEVEL : penwin.h
  • REC_GUIDE : penwin.h
  • REC_HREC : penwin.h
  • REC_HWND : penwin.h
  • REC_INVALIDREF : penwin.h
  • REC_LANGUAGE : penwin.h
  • REC_NA : penwin.h
  • REC_NOCOLLECTION : penwin.h
  • REC_NOINPUT : penwin.h
  • REC_NOTABLET : penwin.h
  • REC_OEM : penwin.h
  • REC_OK : penwin.h
  • REC_OOM : penwin.h
  • REC_OVERFLOW : penwin.h
  • REC_PARAMERROR : penwin.h
  • REC_PCM : penwin.h
  • REC_POINTEREVENT : penwin.h
  • REC_RECTBOUND : penwin.h
  • REC_RECTEXCLUDE : penwin.h
  • REC_RESULTMODE : penwin.h
  • REC_TERMBOUND : penwin.h
  • REC_TERMEX : penwin.h
  • REC_TERMOEM : penwin.h
  • REC_TERMPENUP : penwin.h
  • REC_TERMRANGE : penwin.h
  • REC_TERMTIMEOUT : penwin.h
  • RecalcThreadProc() : calcthrd.cpp , calcthrd.h
  • Recognize() : penwin.h
  • RecognizeData() : penwin.h
  • RecognizeDataInternal() : penwin.h
  • RecognizeInternal() : penwin.h
  • rect : drawtool.h
  • rectangle : shapeobj.h
  • RECTHEIGHT : dibapi.h
  • RECTL : penwin.h
  • RECTOFS : penwin.h
  • RECTWIDTH : dibapi.h
  • red : shapeobj.h
  • RED : Scheduler.h
  • RedisplayPenData() : penwin.h
  • REGENTRY : wordpad.cpp
  • REGENTRYX : wordpad.cpp
  • RegisterApp32() : mswd6_32.h
  • RegisterPenApp() : penwin.h
  • RegToListBox() : regview.cpp
  • RemovePenDataStrokes() : penwin.h
  • REPLACEDLGORD : resource.h
  • REQUESTEDIT_ALWAYS : MethInfo.H
  • REQUESTEDIT_NEVER : MethInfo.H
  • REQUESTEDIT_PROMPT : MethInfo.H
  • ResetAlcBitAnsi : penwin.h
  • ResizePenData() : penwin.h
  • RGBBLACK : shadow.h , iview.h , shadow.h
  • RGBBLUE : shadow.h , iview.h , shadow.h
  • RGBBROWN : iview.h , shadow.h
  • RGBCYAN : iview.h , shadow.h
  • RGBGRAY : iview.h , shadow.h
  • RGBGREEN : shadow.h , iview.h
  • RGBLTBLUE : shadow.h , iview.h
  • RGBLTCYAN : shadow.h , iview.h , shadow.h
  • RGBLTGRAY : iview.h , shadow.h
  • RGBLTGREEN : iview.h , shadow.h
  • RGBLTMAGENTA : shadow.h , iview.h
  • RGBLTRED : shadow.h , iview.h , shadow.h
  • RGBMAGENTA : shadow.h , iview.h
  • RGBRED : iview.h , shadow.h
  • RGBWHITE : shadow.h , iview.h , shadow.h
  • RGBYELLOW : shadow.h , iview.h
  • RHH_BOX : penwin.h
  • RHH_STD : penwin.h
  • RINGWIDTH : piece.h
  • rmj : version.h
  • rmm : version.h
  • rounded_rectangle : shapeobj.h
  • roundleast() : wordpvw.cpp
  • roundRect : drawtool.h
  • RPA_DBCSPRIORITY : penwin.h
  • RPA_DEFAULT : penwin.h
  • RPA_HEDIT : penwin.h
  • RPA_KANJIFIXEDBEDIT : penwin.h
  • RRM_COMPLETE : penwin.h
  • RRM_NEWLINE : penwin.h
  • RRM_STROKE : penwin.h
  • RRM_SYMBOL : penwin.h
  • RRM_WORD : penwin.h
  • RtfToForeign32() : mswd6_32.h
  • RULERBARHEIGHT : ruler.cpp
  • rup : version.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- s -

  • SafePutts : regsvr.cpp
  • SaveDIB() : dibapi.h , myfile.cpp
  • ScanForConverters() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • SCH_ADVISE : penwin.h
  • SCH_FORCE : penwin.h
  • SCH_NONE : penwin.h
  • SCIM_INSERT : penwin.h
  • SCIM_OVERWRITE : penwin.h
  • scr1 : resource.h
  • scr2 : resource.h
  • scr3 : resource.h
  • scr4 : resource.h
  • scr5 : resource.h
  • scr6 : resource.h
  • scr7 : resource.h
  • scr8 : resource.h
  • SECTIONHEADER : propset.h
  • SeedRandom() : stdafx.h
  • selection : drawtool.h
  • SelectMode : drawtool.cpp
  • selectMode : drawtool.cpp
  • SerializeElements() : colledoc.cpp , colledoc.h
  • SerializeElements< CMyScheduler >() : Scheduler.cpp , Scheduler.h
  • SET_PEN_WIDTH : spiroDoc.h
  • SetAlcBitAnsi : penwin.h
  • SetAlphabetHRC() : penwin.h
  • SetAlphabetPriorityHRC() : penwin.h
  • SetBoxAlphabetHRC() : penwin.h
  • SetGlobalRC() : penwin.h
  • SetGuideHRC() : penwin.h
  • SetInternationalHRC() : penwin.h
  • SetMaxResultsHRC() : penwin.h
  • SetPenAppFlags() : penwin.h
  • SetPenHook() : penwin.h
  • SetPenMiscInfo() : penwin.h
  • SetRecogHook() : penwin.h
  • SETRECT : itemtemp.cpp
  • SetResultsHookHREC() : penwin.h
  • SetStrokeAttributes() : penwin.h
  • SetStrokeTableAttributes() : penwin.h
  • SetTraceLevel() : TCTrace.Cpp , TCTrace.H
  • SetWordlistCoercionHRC() : penwin.h
  • SetWordlistHRC() : penwin.h
  • SGRC_DICTIONARY : penwin.h
  • SGRC_INIFILE : penwin.h
  • SGRC_NA : penwin.h
  • SGRC_OK : penwin.h
  • SGRC_PARAMERROR : penwin.h
  • SGRC_RC : penwin.h
  • SGRC_RECOGNIZER : penwin.h
  • SGRC_USER : penwin.h
  • SHADOWWIDTH : shadow.cpp
  • SHAPE_COLOR_ENUM : shapeobj.h
  • SHAPE_STYLE : shapeobj.h
  • SHARED_HANDLERS : stdafx.h
  • SHCNF_ACCEPT_INTERRUPTS : FolderBar.cpp , Page6.cpp
  • SHCNF_ACCEPT_NON_INTERRUPTS : FolderBar.cpp , Page6.cpp
  • ShowKeyboard() : penwin.h
  • SIGNON_REV : makehm.cpp
  • SIGNON_VER : makehm.cpp
  • SIH_ALLANSICHAR : penwin.h
  • size : drawtool.cpp
  • SIZE_DOUBLE : ChildView.h
  • SIZE_FILL : ChildView.h
  • SIZE_HALF : ChildView.h
  • SIZE_NONE : ChildView.h
  • SIZE_ORIGINAL : ChildView.h
  • SizesEnum : ChildView.h
  • SlowAdd() : slowcalc.cpp , slowcalc.h
  • SRH_HOOKALL : penwin.h
  • SSA_DOWN : penwin.h
  • SSA_PENTIP : penwin.h
  • SSA_PENTIPCLASS : penwin.h
  • SSA_PENTIPTABLE : penwin.h
  • SSA_SELECT : penwin.h
  • SSA_TIME : penwin.h
  • SSA_USER : penwin.h
  • SSA_USERCLASS : penwin.h
  • SSA_USERTABLE : penwin.h
  • SSH_DL : penwin.h
  • SSH_DR : penwin.h
  • SSH_LD : penwin.h
  • SSH_LU : penwin.h
  • SSH_RD : penwin.h
  • SSH_RU : penwin.h
  • SSH_UL : penwin.h
  • SSH_UR : penwin.h
  • StartInking() : penwin.h
  • StartPenInput() : penwin.h
  • STATIC_CLASS : MailBar.cpp
  • stc1 : resource.h
  • stc10 : resource.h
  • stc11 : resource.h
  • stc12 : resource.h
  • stc13 : resource.h
  • stc14 : resource.h
  • stc15 : resource.h
  • stc16 : resource.h
  • stc17 : resource.h
  • stc18 : resource.h
  • stc19 : resource.h
  • stc2 : resource.h
  • stc20 : resource.h
  • stc21 : resource.h
  • stc22 : resource.h
  • stc23 : resource.h
  • stc24 : resource.h
  • stc25 : resource.h
  • stc26 : resource.h
  • stc27 : resource.h
  • stc28 : resource.h
  • stc29 : resource.h
  • stc3 : resource.h
  • stc30 : resource.h
  • stc31 : resource.h
  • stc32 : resource.h
  • stc4 : resource.h
  • stc5 : resource.h
  • stc6 : resource.h
  • stc7 : resource.h
  • stc8 : resource.h
  • stc9 : resource.h
  • STDAPI_() : xlistctl.cpp , MFileWnd.Cpp
  • STDMETHODIMP_() : enumvar.cpp , iadvsink.cpp , iviewer.cpp , BindHost.Cpp , ExtCtl.Cpp , PropBag.Cpp , Script.Cpp , TCItem.Cpp
  • STEP_DISTANCE : piece.h
  • StopInking() : penwin.h
  • StopPenInput() : penwin.h
  • StringFromDword() : makehm.cpp
  • StringFromGUID2T() : tlbodl.cpp
  • StripFilespec() : util.cpp , util.h
  • STRKFMT : penwin.h
  • STROKEINFO : penwin.h
  • SubPenMsgFromWpLp : penwin.h
  • SYC : penwin.h
  • SYE : penwin.h
  • SYG : penwin.h
  • SymbolToCharacter() : penwin.h
  • SYV : penwin.h
  • SYV_APPGESTUREMASK : penwin.h
  • SYV_BACKSPACE : penwin.h
  • SYV_BEGINOR : penwin.h
  • SYV_CIRCLELOA : penwin.h
  • SYV_CIRCLELOZ : penwin.h
  • SYV_CIRCLEUPA : penwin.h
  • SYV_CIRCLEUPZ : penwin.h
  • SYV_CLEAR : penwin.h
  • SYV_CLEARCHAR : penwin.h
  • SYV_CLEARWORD : penwin.h
  • SYV_CONTEXT : penwin.h
  • SYV_COPY : penwin.h
  • SYV_CORRECT : penwin.h
  • SYV_CUT : penwin.h
  • SYV_EMPTY : penwin.h
  • SYV_ENDOR : penwin.h
  • SYV_EXTENDSELECT : penwin.h
  • SYV_HELP : penwin.h
  • SYV_INSERT : penwin.h
  • SYV_KKCONVERT : penwin.h
  • SYV_LASSO : penwin.h
  • SYV_NULL : penwin.h
  • SYV_OR : penwin.h
  • SYV_PASTE : penwin.h
  • SYV_RETURN : penwin.h
  • SYV_SELECTFIRST : penwin.h
  • SYV_SELECTLAST : penwin.h
  • SYV_SELECTLEFT : penwin.h
  • SYV_SELECTRIGHT : penwin.h
  • SYV_SHAPEELLIPSE : penwin.h
  • SYV_SHAPELINE : penwin.h
  • SYV_SHAPEMAX : penwin.h
  • SYV_SHAPEMIN : penwin.h
  • SYV_SHAPERECT : penwin.h
  • SYV_SOFTNEWLINE : penwin.h
  • SYV_SPACE : penwin.h
  • SYV_SPACENULL : penwin.h
  • SYV_TAB : penwin.h
  • SYV_UNDO : penwin.h
  • SYV_UNKNOWN : penwin.h
  • SYV_USER : penwin.h
  • SyvCharacterToSymbol : penwin.h
  • SYVHI_ANSI : penwin.h
  • SYVHI_GESTURE : penwin.h
  • SYVHI_KANJI : penwin.h
  • SYVHI_SHAPE : penwin.h
  • SYVHI_SPECIAL : penwin.h
  • SYVHI_UNICODE : penwin.h
  • SYVHI_VKEY : penwin.h
  • SyvKanjiToSymbol : penwin.h
  • szContents : strings.cpp , strings.h , strings.cpp
  • szDeleteTemp : strings.h
  • szFrameRect : strings.h , strings.cpp , strings.h
  • szIPSection : strings.cpp , strings.h , strings.cpp , strings.h
  • szLayout1 : strings.cpp , strings.h
  • szLayout2 : strings.cpp , strings.h
  • szLocalizedUIDll : guidgen.cpp
  • szMaximized : strings.cpp , strings.h , strings.cpp , strings.h
  • szPageMargin : strings.h , strings.cpp , strings.h
  • szRegKey : strings.h , strings.cpp
  • szRTFSection : strings.cpp , strings.h , strings.cpp , strings.h
  • szSection : strings.h , strings.cpp , strings.h
  • szSumInfo : strings.cpp , strings.h , strings.cpp , strings.h
  • szSummInfo : summinfo.cpp , summinfo.h , summinfo.cpp
  • szTextSection : strings.cpp , strings.h
  • szUnits : strings.cpp , strings.h , strings.cpp , strings.h
  • szVerName : version.h
  • szVerUser : version.h
  • szWordConverter : strings.h , strings.cpp , strings.h
  • szWordPadClass : strings.cpp , strings.h , strings.cpp
  • szWordSection : strings.cpp , strings.h , strings.cpp
  • szWordSel : strings.h , strings.cpp
  • szWrap : strings.h , strings.cpp , strings.h , strings.cpp
  • szWriteConverter : strings.h , strings.cpp , strings.h
  • szWriteSection : strings.cpp , strings.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- t -

  • TARGET : penwin.h
  • TargetPoints() : penwin.h
  • TARGINFO : penwin.h
  • TCControlTrace() : TCTrace.Cpp , TCTrace.H
  • TCLOG_DEBUG : TstCon.H
  • TCLOG_FILE : TstCon.H
  • TCLOG_NULL : TstCon.H
  • TCLOG_OUTPUTWINDOW : TstCon.H
  • tcstocs : summinfo.cpp
  • TCTrace() : TCTrace.Cpp , TCTrace.H
  • tdDraw3DCrease() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdDraw3DLine() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdDraw3DRect() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdDrawFaceFrame() : shadow.h
  • tdDrawRect : shadow.h
  • tdGetHighlightColor() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdGetShadowColor() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • TerminationFromWpLp : penwin.h
  • TH_FORCE : penwin.h
  • TH_QUERY : penwin.h
  • TH_SUGGEST : penwin.h
  • theApp : push.cpp , DesktopAlertDemo.h , DlgToolTips.cpp , spindial.cpp , DrawClient.cpp , DrawClient.h , testhelp.cpp , dllmain.cpp , DynamicMenu.cpp , time.cpp , WorkSpaceToolBar.h , WorkSpaceToolBar.cpp , wordpad.h , wordpad.cpp , VisualStudioDemo.h , VisualStudioDemo.cpp , TrayMenu.h , DynamicMenu.h , TooltipDemo.h , TooltipDemo.cpp , ToolbarDateTimePicker.h , ToolbarDateTimePicker.cpp , TasksPane.h , TasksPane.cpp , Explorer.cpp , xlist.cpp , TabbedView.h , TabbedView.cpp , StatusBarDemo.h , StatusBarDemo.cpp , StateCollection.h , StateCollection.cpp , Slider.h , Explorer.h , SetPaneSize.h , SetPaneSize.cpp , RollupPane.h , IEDemo.cpp , RibbonMDIDemo.h , CmnCtrl1.cpp , IEDemo.h , MDITabsDemo.cpp , RebarTest.h , RebarTest.cpp , PropSheetDemo.cpp , CmnCtrl2.cpp , PaletteDemo.cpp , OwnerDrawMenu.h , MDITabsDemo.h , MenuSubSet.cpp , OutlookMultiViews.cpp , OutlookDemo.h , OutlookDemo.cpp , CTaskDialogDemo.cpp , NewControls.cpp , MSOffice2007Demo.h , MenuSubSet.h , MSMoneyDemo.cpp , CTaskDialogDemo.h , MSMoneyDemo.h , MSOffice2007Demo.cpp , ctrlbars.cpp , DBVList.cpp , NewControls.h , diblook.cpp , Dlgcbar.cpp , OutlookMultiViews.h , OwnerDrawMenu.cpp , dlgtemp.cpp , docktool.cpp , PaletteDemo.h , dynamenu.cpp , FileDlgWatcher.cpp , RibbonGadgets.cpp , DesktopAlertDemo.cpp , CustomPages.h , CustomPages.cpp , RibbonGadgets.h , wordpad.h , wordpad.cpp , FileDlgWatcher.h , RibbonMDIDemo.cpp , superpad.cpp , oleview.h , oleview.cpp , hello.cpp , oclient.cpp , mfccalc.cpp , RollupPane.cpp , ListHdr.cpp , inproc.cpp , hiersvr.cpp , drawcli.cpp , collect.cpp , autodriv.cpp , autoclik.cpp , mdi.cpp , Slider.cpp , Scheduler.cpp , mfcie.cpp , htmledit.cpp , mdi.cpp , viewex.cpp , cube.cpp , MMXSwarm.cpp , modeless.cpp , snapvw.cpp , CImage.h , CImage.cpp , TrayMenu.cpp , rowlist.cpp , propdlg.cpp , dllhusk.cpp , multipad.cpp , TabControl.cpp , TabControl.h , np.cpp , DllScreenCap.cpp , ScreenCap.cpp , scribble.cpp , ScreenCap.h , mtgdi.cpp , spiro.cpp , trackapp.cpp , mdi.cpp , VariantUse.cpp , mtrecalc.cpp , DHtmlExplore.cpp , mutexes.cpp , speakn.cpp , autodriv.cpp , autoclik.cpp , button.cpp , circ.cpp , calcdriv.cpp , CmnCtrl3.cpp , CmnCtrl3.h , ipdrive.cpp , pal.cpp , guidgen.cpp , NetAddrVerifier.cpp , TstCon.Cpp , licensed.cpp , MFCBind.cpp , contain.cpp , image.cpp , iviewers.cpp , localize.cpp , superpad.h , NetAddrVerifier.h
  • theTestApp : ctrltest.cpp
  • threeto8 : cubeview.cpp
  • TICK_LEN : spinctl.cpp
  • TIMER_ID : np.h
  • TIP_ERASECOLOR : penwin.h
  • TOTALITEMS : itemtemp.h
  • TOTALRINGS : piece.h
  • TOTALWHEELS : piece.h
  • TPD_COLINEAR : penwin.h
  • TPD_COLLINEAR : penwin.h
  • TPD_EMPTYSTROKES : penwin.h
  • TPD_EVERYTHING : penwin.h
  • TPD_OEMDATA : penwin.h
  • TPD_PENINFO : penwin.h
  • TPD_PHW : penwin.h
  • TPD_RECALCSIZE : penwin.h
  • TPD_TIME : penwin.h
  • TPD_UPPOINTS : penwin.h
  • TPD_USER : penwin.h
  • TPT_CLOSEST : penwin.h
  • TPT_DEFAULT : penwin.h
  • TPT_INTERSECTINK : penwin.h
  • TPT_TEXTUAL : penwin.h
  • TPtoDP() : penwin.h
  • TRACE_COMMAND : spiroDoc.h
  • TRACELEVEL_NONE : TCTrace.H
  • TRACELEVEL_NORMAL : TCTrace.H
  • TRACELEVEL_VERBOSE : TCTrace.H
  • TRACES_PER_TICK_FAST : StdAfx.h
  • TRACES_PER_TICK_SLOW : StdAfx.h
  • TRAIN_BOTH : penwin.h
  • TRAIN_CUSTOM : penwin.h
  • TRAIN_DEFAULT : penwin.h
  • TRAIN_NONE : penwin.h
  • TRAIN_RESET : penwin.h
  • TRAIN_REVERT : penwin.h
  • TRAIN_SAVE : penwin.h
  • TrainContext() : penwin.h
  • TrainContextInternal() : penwin.h
  • TrainHREC() : penwin.h
  • TrainInk() : penwin.h
  • TrainInkInternal() : penwin.h
  • TrimPenData() : penwin.h
  • TRY_DUAL : mfcdual.h
  • TT_FONT : formatba.cpp
  • TTT_BUF_SIZE : CmnCtrl1.h
  • TwipsToPointString() : MSOffice2007DemoView.cpp
  • twoto8 : cubeview.cpp
  • TYPEDESCtoString() : util.h , util.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- u -

  • uiFirstUserToolBarId : MainFrm.cpp , mainfrm.cpp
  • uiLastUserToolBarId : MainFrm.cpp , mainfrm.cpp , MainFrm.cpp
  • uiMenuBarId : ipframe.cpp
  • UINT : penwin.h
  • UM_RECALCLAYOUT : MainFrm.cpp
  • UM_TRAYNOTIFY : TrayMenuDlg.cpp
  • UnhookResultsHookHREC() : penwin.h
  • UninstallRecognizer() : penwin.h
  • UPD_ALL : mainfrm.h
  • UPD_NOIFACELISTVIEW : mainfrm.h
  • UPD_NOINTERFACEVIEW : mainfrm.h
  • UPD_NOOBJECTVIEW : mainfrm.h
  • UPD_NORELOAD : mainfrm.h
  • UPDATE_HINT_SUM : recalcvw.h
  • UpdatePenInfo() : penwin.h
  • UPDF_NOLISTVIEW : typelib.h
  • UPDF_NOODLVIEW : typelib.h
  • UPDF_NOTREEVIEW : typelib.h
  • Usage() : regsvr.cpp
  • UsageErr() : makehm.cpp
  • UWM_CHANGE_SYSTEM_ICON : Page6.cpp
  • UWM_NOTIFY_RECYCLE_BIN : FolderBar.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- v -

  • VAR_FALSE : VarUtils.H
  • VAR_TRUE : VarUtils.H
  • VariantToString() : VarUtils.H , VarUtils.Cpp
  • VC_EXTRALEAN : stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.H , stdafx.h , StdAfx.h , stdafx.h
  • VERT_TEXTOFFSET : stdafx.h
  • ViewInterface() : mainfrm.cpp , mainfrm.h
  • VS_VERSION : oleview.cpp
  • VTI_BOOL : VarUtils.H
  • VTI_BSTR : VarUtils.H
  • VTI_COLOR : VarUtils.H
  • VTI_CY : VarUtils.H
  • VTI_DATE : VarUtils.H
  • VTI_EMPTY : VarUtils.H
  • VTI_ERROR : VarUtils.H
  • VTI_FONT : VarUtils.H
  • VTI_I1 : VarUtils.H
  • VTI_I2 : VarUtils.H
  • VTI_I4 : VarUtils.H
  • VTI_I8 : VarUtils.H
  • VTI_R4 : VarUtils.H
  • VTI_R8 : VarUtils.H
  • VTI_UI1 : VarUtils.H
  • VTI_UI2 : VarUtils.H
  • VTI_UI4 : VarUtils.H
  • VTI_UI8 : VarUtils.H
  • VTI_UNKNOWN : VarUtils.H
  • VTIToString() : VarUtils.H , VarUtils.Cpp
  • VTIToVT() : VarUtils.Cpp , VarUtils.H
  • VTToString() : VarUtils.H
  • VTtoString() : util.h , util.cpp
  • VTToString() : VarUtils.Cpp
  • VTToVTI() : VarUtils.H , VarUtils.Cpp
  • VWM_MOUSELEFTDOWN : penwin.h
  • VWM_MOUSELEFTUP : penwin.h
  • VWM_MOUSEMOVE : penwin.h
  • VWM_MOUSERIGHTDOWN : penwin.h
  • VWM_MOUSERIGHTUP : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- w -

  • WCR_CLOSERECOGNIZER : penwin.h
  • WCR_CONFIGDIALOG : penwin.h
  • WCR_DEFAULT : penwin.h
  • WCR_GETALCPRIORITY : penwin.h
  • WCR_GETANSISTATE : penwin.h
  • WCR_GETDIRECTION : penwin.h
  • WCR_GETHAND : penwin.h
  • WCR_INITRECOGNIZER : penwin.h
  • WCR_PRIVATE : penwin.h
  • WCR_PWVERSION : penwin.h
  • WCR_QUERY : penwin.h
  • WCR_QUERYLANGUAGE : penwin.h
  • WCR_RCCHANGE : penwin.h
  • WCR_RECOGNAME : penwin.h
  • WCR_SETALCPRIORITY : penwin.h
  • WCR_SETANSISTATE : penwin.h
  • WCR_SETDIRECTION : penwin.h
  • WCR_SETHAND : penwin.h
  • WCR_TRAIN : penwin.h
  • WCR_TRAINCUSTOM : penwin.h
  • WCR_TRAINDIRTY : penwin.h
  • WCR_TRAINMAX : penwin.h
  • WCR_TRAINSAVE : penwin.h
  • WCR_USERCHANGE : penwin.h
  • WCR_VERSION : penwin.h
  • WIDTHBYTES : dibapi.h
  • WINVER : targetver.h
  • WLT_EMPTY : penwin.h
  • WLT_STRING : penwin.h
  • WLT_STRINGTABLE : penwin.h
  • WLT_WORDLIST : penwin.h
  • WM_CTLINIT : penwin.h
  • WM_DOREALIZE : diblook.h
  • WM_GLOBALRCCHANGE : penwin.h
  • WM_HEDITCTL : penwin.h
  • WM_HOOKRCRESULT : penwin.h
  • WM_IDLEACTIVATE : ctrlbars.h
  • WM_OUTPUTBUFFERHASDATA : idataobj.h
  • WM_PENCTL : penwin.h
  • WM_PENEVENT : penwin.h
  • WM_PENMISC : penwin.h
  • WM_PENMISCINFO : penwin.h
  • WM_RCRESULT : penwin.h
  • WM_SKB : penwin.h
  • WM_USER_CHANGE_OBJECT_PROPERTIES : propdlg.h
  • WM_USER_ONCMDMSG : bounce.h
  • WM_USER_PREPARE_TO_CLOSE : bounce.h
  • WM_USER_RECALC_DONE : mtrecalc.h
  • WM_USER_RECALC_IN_PROGRESS : mtrecalc.h
  • WM_USER_RECALC_NOW : mtrecalc.h
  • WP_CLOSEBUTTON : MSMVisualManager.cpp
  • WP_MAXBUTTON : MSMVisualManager.cpp
  • WP_MINBUTTON : MSMVisualManager.cpp
  • WP_RESTOREBUTTON : MSMVisualManager.cpp
  • WPD_CHARFORMAT : MSOffice2007DemoView.cpp , stdafx.h
  • WPD_PARAFORMAT : MSOffice2007DemoView.cpp , stdafx.h
  • WPM_BARSTATE : wordpad.h
  • wPntAll : penwin.h
  • WRITE : tlbodl.cpp
  • WRITE1 : tlbodl.cpp
  • WRITE2 : tlbodl.cpp
  • WRITEBSTR : tlbodl.cpp
  • WriteBSTR() : tlbodl.cpp
  • WRITECR : tlbodl.cpp
  • WriteHWL() : penwin.h
  • WRITELINE : tlbodl.cpp
  • WriteLine() : tlbodl.cpp
  • WRITELINE2 : tlbodl.cpp
  • WRITERAW : tlbodl.cpp
  • WriteRaw() : tlbodl.cpp
  • WSyvToKanji : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all file members with links to the files they belong to:

- y -

  • YELLOW : Scheduler.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- _ -

  • __IInterfaceViewer__ : iviewers.h
  • __SCHEDULER_H : Scheduler.h
  • _AFX_ALL_WARNINGS : stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h
  • _APS_NEXT_COMMAND_VALUE : resource.h
  • _APS_NEXT_CONTROL_VALUE : resource.h
  • _APS_NEXT_RESOURCE_VALUE : resource.h
  • _APS_NEXT_SYMED_VALUE : resource.h
  • _ATL_APARTMENT_THREADED : StdAfx.h , stdafx.h
  • _ATL_CSTRING_EXPLICIT_CONSTRUCTORS : stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h
  • _ATL_NO_AUTOMATIC_NAMESPACE : stdafx.h , StdAfx.h
  • _COUNTOF : util.cpp
  • _RGB_H_ : iview.h
  • _WIN32_IE : targetver.h
  • _WIN32_WINDOWS : targetver.h
  • _WIN32_WINNT : targetver.h
  • _WRITE_TAG : tlbodl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- l -

  • LAST_FAVORITE_COMMAND : FavoritesManager.h
  • LOAD_STRING_FROM_RESOURCE : typelib.cpp , TstCon.H
  • LPDFNULL : penwin.h
  • LRET_ABORT : penwin.h
  • LRET_DONE : penwin.h
  • LRET_HPENDATA : penwin.h
  • LRET_HRC : penwin.h
  • LRET_PRIVATE : penwin.h
  • lst1 : resource.h
  • lst10 : resource.h
  • lst11 : resource.h
  • lst12 : resource.h
  • lst13 : resource.h
  • lst14 : resource.h
  • lst15 : resource.h
  • lst16 : resource.h
  • lst2 : resource.h
  • lst3 : resource.h
  • lst4 : resource.h
  • lst5 : resource.h
  • lst6 : resource.h
  • lst7 : resource.h
  • lst8 : resource.h
  • lst9 : resource.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- m -

  • MAKE_RANGE_ENTRY : util.cpp
  • MAKE_SCODE_ENTRY : util.cpp
  • MakeAbsTime : penwin.h
  • MAP_LOGHIM_TO_PIX : xlistctl.cpp
  • MAX_CLASS_NAME : MailBar.cpp
  • MAX_COLOURS : formatba.cpp
  • MAX_DIGITS : mutexdlg.cpp
  • MAX_LEVEL : svrdoc.h
  • MAX_NAMES : tlbodl.cpp , tlbtree.cpp , tree.cpp
  • MAX_STRING : regsvr.cpp
  • MAXDICTIONARIES : penwin.h
  • MAXHOTSPOT : penwin.h
  • MAXOEMDATAWORDS : penwin.h
  • MCBN_RETURN : MacroCB.H
  • MGetModuleUsage : oleview.h
  • MM_SPIRO : StdAfx.h
  • MpAlcB : penwin.h
  • MpIbf : penwin.h
  • MULTIFILEOPENORD : resource.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- n -

  • N_BUTTONS : bbutton.cpp
  • new : dmdoc.cpp , propset.cpp
  • NOTIFCOUNT : notifwdw.h
  • NPERROR_INVALID_LINENUM : resource.h
  • NPERROR_NUM_TOO_BIG : resource.h
  • NUM_COLOURS : Page2.cpp
  • NUM_COLUMNS : rlistvw.cpp
  • NUM_DOC_TYPES : doctype.h
  • NUM_EDIT : spintest.cpp
  • NUM_ITEMS : rlistvw.cpp
  • NUM_PEN_ITEMS : ipframe.cpp , mainfrm.cpp , ipframe.cpp
  • NUM_PEN_TOGGLE : mainfrm.cpp , ipframe.cpp
  • NUM_REG_ARGS : wordpad.cpp
  • NUMVIEWS : MainFrm.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- o -

  • OBM_HANBTNDISABLED : penwin.h
  • OBM_HANBTNDOWN : penwin.h
  • OBM_HANBTNUP : penwin.h
  • OBM_KKCBTNDISABLED : penwin.h
  • OBM_KKCBTNDOWN : penwin.h
  • OBM_KKCBTNUP : penwin.h
  • OBM_PTYBTNDISABLED : penwin.h
  • OBM_PTYBTNDOWN : penwin.h
  • OBM_PTYBTNUP : penwin.h
  • OBM_SIPBTNDISABLED : penwin.h
  • OBM_SIPBTNDOWN : penwin.h
  • OBM_SIPBTNUP : penwin.h
  • OBM_SKBBTNDISABLED : penwin.h
  • OBM_SKBBTNDOWN : penwin.h
  • OBM_SKBBTNUP : penwin.h
  • OBM_ZENBTNDISABLED : penwin.h
  • OBM_ZENBTNDOWN : penwin.h
  • OBM_ZENBTNUP : penwin.h
  • OFFSET_FIRST : listvwex.cpp
  • OFFSET_OTHER : listvwex.cpp
  • OFN_EXPLORER : wordpdoc.cpp
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- a -

  • ABS : bounce.cpp , BncVw.cpp
  • AFX_DATA : testdll1.h , testdll2.h
  • AFX_IDP_PARSE_INT : resource.h
  • AFX_IDP_PARSE_INT_RANGE : resource.h
  • AFX_IDP_PARSE_REAL : resource.h
  • AFX_IDP_PARSE_REAL_RANGE : resource.h
  • AFX_IDP_PARSE_STRING_SIZE : resource.h
  • AFX_IDS_IDLEMESSAGE : resource.h
  • AFX_IDS_MDICHILD : resource.h
  • AFX_IDS_SCCLOSE : resource.h
  • AFX_IDS_SCMAXIMIZE : resource.h
  • AFX_IDS_SCMINIMIZE : resource.h
  • AFX_IDS_SCMOVE : resource.h
  • AFX_IDS_SCNEXTWINDOW : resource.h
  • AFX_IDS_SCPREVWINDOW : resource.h
  • AFX_IDS_SCRESTORE : resource.h
  • AFX_IDS_SCSIZE : resource.h
  • AFX_IDS_SCTASKLIST : resource.h
  • AI_CBSTROKE : penwin.h
  • AI_SKIPUPSTROKES : penwin.h
  • ALC_ALL : penwin.h
  • ALC_ALPHA : penwin.h
  • ALC_ALPHANUMERIC : penwin.h
  • ALC_ASCII : penwin.h
  • ALC_DBCS : penwin.h
  • ALC_DEFAULT : penwin.h
  • ALC_GESTURE : penwin.h
  • ALC_GLOBALPRIORITY : penwin.h
  • ALC_HIRAGANA : penwin.h
  • ALC_JIS1 : penwin.h
  • ALC_KANJI : penwin.h
  • ALC_KANJIALL : penwin.h
  • ALC_KANJISYSMINIMUM : penwin.h
  • ALC_KATAKANA : penwin.h
  • ALC_LCALPHA : penwin.h
  • ALC_MATH : penwin.h
  • ALC_MONETARY : penwin.h
  • ALC_NONPRINT : penwin.h
  • ALC_NOPRIORITY : penwin.h
  • ALC_NUMERIC : penwin.h
  • ALC_OEM : penwin.h
  • ALC_OTHER : penwin.h
  • ALC_PUNC : penwin.h
  • ALC_RESERVED : penwin.h
  • ALC_SYSMINIMUM : penwin.h
  • ALC_UCALPHA : penwin.h
  • ALC_USEBITMAP : penwin.h
  • ALC_WHITE : penwin.h
  • AQUA : Scheduler.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- b -

  • BEGIN_DUAL_INTERFACE_PART : mfcdual.h
  • BEI_FACESIZE : penwin.h
  • BEIF_BOXCROSS : penwin.h
  • BESC_DEFAULT : penwin.h
  • BESC_KANJIFIXED : penwin.h
  • BESC_ROMANFIXED : penwin.h
  • BESC_USERDEFINED : penwin.h
  • BITPENUP : penwin.h
  • BLACK : Scheduler.h
  • BLUE : Scheduler.h
  • BMH : formatba.cpp
  • BMINDEX : oleview.h
  • BMW : formatba.cpp
  • BROWN : Scheduler.h
  • BUFF_LEN : AddressCombo.cpp
  • BUFFSIZE : multconv.cpp
  • BUTTON_CLASS : MailBar.cpp
  • BXD_BASEHEIGHT : penwin.h
  • BXD_BASEHORZ : penwin.h
  • BXD_CELLHEIGHT : penwin.h
  • BXD_CELLWIDTH : penwin.h
  • BXD_CUSPHEIGHT : penwin.h
  • BXD_ENDCUSPHEIGHT : penwin.h
  • BXD_MIDFROMBASE : penwin.h
  • BXDK_BASEHEIGHT : penwin.h
  • BXDK_BASEHORZ : penwin.h
  • BXDK_CELLHEIGHT : penwin.h
  • BXDK_CELLWIDTH : penwin.h
  • BXDK_CUSPHEIGHT : penwin.h
  • BXDK_ENDCUSPHEIGHT : penwin.h
  • BXDK_MIDFROMBASE : penwin.h
  • BXS_BOXCROSS : penwin.h
  • BXS_MASK : penwin.h
  • BXS_NONE : penwin.h
  • BXS_RECT : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- c -

  • CATCH_ALL_DUAL : mfcdual.h
  • cbDictPathMax : penwin.h
  • cbRcLanguageMax : penwin.h
  • cbRcrgbfAlcMax : penwin.h
  • cbRcUserMax : penwin.h
  • CBS_DISABLED : MSMVisualManager.cpp
  • CBS_HOT : MSMVisualManager.cpp
  • CBS_NORMAL : MSMVisualManager.cpp
  • CBS_PUSHED : MSMVisualManager.cpp
  • CCHOUTPUTMAX : idataobj.h
  • CDialog : TrayMenuDlg.h
  • CELEMS : CmnCtrl1.h
  • CELLS_X : RibbonTableButton.cpp
  • CELLS_Y : RibbonTableButton.cpp
  • CFrameWnd : MainFrm.h
  • CG_ID_VIEW_FONTDLGBAR : resource.h
  • CG_IDD_FONTDLGBAR : resource.h
  • ChSyvToAnsi : penwin.h
  • chx1 : resource.h
  • chx10 : resource.h
  • chx11 : resource.h
  • chx12 : resource.h
  • chx13 : resource.h
  • chx14 : resource.h
  • chx15 : resource.h
  • chx16 : resource.h
  • chx2 : resource.h
  • chx3 : resource.h
  • chx4 : resource.h
  • chx5 : resource.h
  • chx6 : resource.h
  • chx7 : resource.h
  • chx8 : resource.h
  • chx9 : resource.h
  • CIB_NOACTIONHANDLE : penwin.h
  • CIB_NOFLASHCURSOR : penwin.h
  • CIB_NOGDMSG : penwin.h
  • CIH_NOACTIONHANDLE : penwin.h
  • CIH_NOEDITTEXT : penwin.h
  • CIH_NOFLASHCURSOR : penwin.h
  • CIH_NOGDMSG : penwin.h
  • CL_MAXIMUM : penwin.h
  • CL_MINIMUM : penwin.h
  • CL_NULL : penwin.h
  • CLINESMAX : idataobj.h
  • cmb1 : resource.h
  • cmb10 : resource.h
  • cmb11 : resource.h
  • cmb12 : resource.h
  • cmb13 : resource.h
  • cmb14 : resource.h
  • cmb15 : resource.h
  • cmb16 : resource.h
  • cmb2 : resource.h
  • cmb3 : resource.h
  • cmb4 : resource.h
  • cmb5 : resource.h
  • cmb6 : resource.h
  • cmb7 : resource.h
  • cmb8 : resource.h
  • cmb9 : resource.h
  • CMDIChildWnd : ChildFrm.h
  • CMDIFrameWnd : MainFrm.h
  • CMPD_COMPRESS : penwin.h
  • CMPD_DECOMPRESS : penwin.h
  • COLOR_BOX_HEIGHT : custmenu.cpp
  • COLOR_BOX_WIDTH : custmenu.cpp
  • COLOR_ITEM_HEIGHT : custlist.cpp
  • COLORBASE : HTMLEdView.h
  • COMBO_HEIGHT : np.h
  • COMBO_WIDTH : np.h
  • COMBOBOX_BITMAP : editbar.cpp
  • COMBOBOX_HEIGHT : editbar.cpp
  • COMBOBOX_INDEX : editbar.cpp
  • COMBOBOX_WIDTH : editbar.cpp
  • CONVERTERS : stdafx.h
  • CountPrefixedStringT : propset.cpp
  • CPD_DEFAULT : penwin.h
  • CPD_TIME : penwin.h
  • CPD_USERBYTE : penwin.h
  • CPD_USERDWORD : penwin.h
  • CPD_USERWORD : penwin.h
  • CPDR_BOX : penwin.h
  • CPDR_LASSO : penwin.h
  • CRUC_NOTIFY : penwin.h
  • CRUC_REMOVE : penwin.h
  • ctlFirst : resource.h
  • CTLINIT_BEDIT : penwin.h
  • CTLINIT_HEDIT : penwin.h
  • CTLINIT_IEDIT : penwin.h
  • CTLINIT_MAX : penwin.h
  • ctlLast : resource.h
  • CWR_BOXES : penwin.h
  • CWR_HEDIT : penwin.h
  • CWR_INSERT : penwin.h
  • CWR_KEYBOARD : penwin.h
  • CWR_KKCONVERT : penwin.h
  • CWR_REPLACECR : penwin.h
  • CWR_REPLACETAB : penwin.h
  • CWR_SIMPLE : penwin.h
  • CWR_SINGLELINEEDIT : penwin.h
  • CWR_STRIPCR : penwin.h
  • CWR_STRIPLF : penwin.h
  • CWR_STRIPTAB : penwin.h
  • CWR_TITLE : penwin.h
  • cwRcReservedMax : penwin.h
  • CWRK_BASIC : penwin.h
  • CWRK_DEFAULT : penwin.h
  • CWRK_FULL : penwin.h
  • CWRK_NUMPAD : penwin.h
  • CWRK_TELPAD : penwin.h
  • CX_BACKDENT : svritem.h
  • CX_INDENT : svritem.h
  • CX_INSET : svritem.cpp
  • CX_MARGIN : svritem.h
  • CX_SHADOW : aboutbox.cpp , splash.cpp
  • CY_INSET : svritem.cpp
  • CY_MARGIN : svritem.h
  • CY_SEPARATOR : svritem.h
  • CY_SHADOW : splash.cpp , aboutbox.cpp
  • CYCLE_ERROR : StdAfx.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- d -

  • DDXM_BLANK : ddxm.h
  • DECLARE_DOCTYPE : doctype.h
  • DECLARE_DOCTYPE_NULL : doctype.h
  • DECLARE_DOCTYPE_SYN : doctype.h
  • DECLARE_DUAL_ERRORINFO : mfcdual.h
  • DECLARE_HANDLE32 : penwin.h
  • DELEGATE_DUAL_INTERFACE : mfcdual.h
  • DELETE_EXCEPTION : HTMLEdDoc.h
  • DEVICE_FONT : formatba.cpp
  • DIB_HEADER_MARKER : myfile.cpp
  • DIRQ_ADD : penwin.h
  • DIRQ_CLEANUP : penwin.h
  • DIRQ_CLOSE : penwin.h
  • DIRQ_CONFIGURE : penwin.h
  • DIRQ_COPYRIGHT : penwin.h
  • DIRQ_DELETE : penwin.h
  • DIRQ_DESCRIPTION : penwin.h
  • DIRQ_FLUSH : penwin.h
  • DIRQ_INIT : penwin.h
  • DIRQ_OPEN : penwin.h
  • DIRQ_QUERY : penwin.h
  • DIRQ_RCCHANGE : penwin.h
  • DIRQ_SETWORDLISTS : penwin.h
  • DIRQ_STRING : penwin.h
  • DIRQ_SUGGEST : penwin.h
  • DIRQ_SYMBOLGRAPH : penwin.h
  • DIRQ_USER : penwin.h
  • DISPID_DAY : SchedulerDlg.h
  • DISPID_EXT_ACTIVATE : ExtCtl.H
  • DISPID_EXT_DEACTIVATE : ExtCtl.H
  • DISPID_EXT_NAME : ExtCtl.H
  • DISPID_EXT_POSITIONX : ExtCtl.H
  • DISPID_EXT_POSITIONY : ExtCtl.H
  • DISPID_EXT_UIACTIVATE : ExtCtl.H
  • DISPID_EXT_UIDEACTIVATE : ExtCtl.H
  • DISPID_MONTH : SchedulerDlg.h
  • DISPID_YEAR : SchedulerDlg.h
  • DOCTYPE_DESC : doctype.h
  • DOCTYPE_DOCTYPE : doctype.h
  • DOCTYPE_EXT : doctype.h
  • DOCTYPE_PROGID : doctype.h
  • DPD_DRAWSEL : penwin.h
  • DPD_HDCPEN : penwin.h
  • DRAW3D_BOTTOMLINE : shadow.h
  • DRAW3D_CREASE : shadow.h
  • DRAW3D_IN : shadow.h
  • DRAW3D_LEFTLINE : shadow.h
  • DRAW3D_OUT : shadow.h
  • DRAW3D_RIGHTLINE : shadow.h
  • DRAW3D_TOPLINE : shadow.h
  • DrawPenDataFmt : penwin.h
  • DRV_BADPARAM1 : penwin.h
  • DRV_BADPARAM2 : penwin.h
  • DRV_BADSTRUCT : penwin.h
  • DRV_Calibrate : penwin.h
  • DRV_FAILURE : penwin.h
  • DRV_GetCalibration : penwin.h
  • DRV_GetName : penwin.h
  • DRV_GetPenInfo : penwin.h
  • DRV_GetPenSamplingRate : penwin.h
  • DRV_GetVersion : penwin.h
  • DRV_PenPlayBack : penwin.h
  • DRV_PenPlayStart : penwin.h
  • DRV_PenPlayStop : penwin.h
  • DRV_Query : penwin.h
  • DRV_RemoveEntryPoints : penwin.h
  • DRV_RemovePenDriverEntryPoints : penwin.h
  • DRV_Reserved1 : penwin.h
  • DRV_Reserved2 : penwin.h
  • DRV_SetCalibration : penwin.h
  • DRV_SetEntryPoints : penwin.h
  • DRV_SetPenDriverEntryPoints : penwin.h
  • DRV_SetPenSamplingDist : penwin.h
  • DRV_SetPenSamplingRate : penwin.h
  • DRV_SUCCESS : penwin.h
  • DS_3DLOOK : buttondi.cpp
  • DS_CONTEXTHELP : buttondi.cpp
  • DSPDxax : util.cpp
  • DUAL_ERRORINFO_PART : mfcdual.h
  • dwDiffAT : penwin.h
  • dwDurInterval : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- e -

  • edt1 : resource.h
  • edt10 : resource.h
  • edt11 : resource.h
  • edt12 : resource.h
  • edt13 : resource.h
  • edt14 : resource.h
  • edt15 : resource.h
  • edt16 : resource.h
  • edt2 : resource.h
  • edt3 : resource.h
  • edt4 : resource.h
  • edt5 : resource.h
  • edt6 : resource.h
  • edt7 : resource.h
  • edt8 : resource.h
  • edt9 : resource.h
  • elementsof : StdAfx.h
  • END_DUAL_INTERFACE_PART : mfcdual.h
  • ENUM_MAXIMUM : penwin.h
  • ENUM_MINIMUM : penwin.h
  • EPDP_REMOVE : penwin.h
  • EPDS_EQ : penwin.h
  • EPDS_GT : penwin.h
  • EPDS_GTE : penwin.h
  • EPDS_INKSET : penwin.h
  • EPDS_LT : penwin.h
  • EPDS_LTE : penwin.h
  • EPDS_NE : penwin.h
  • EPDS_NOT : penwin.h
  • EPDS_PENTIP : penwin.h
  • EPDS_REMOVE : penwin.h
  • EPDS_SELECT : penwin.h
  • EPDS_STROKEINDEX : penwin.h
  • EPDS_TIPCOLOR : penwin.h
  • EPDS_TIPNIB : penwin.h
  • EPDS_TIPWIDTH : penwin.h
  • EPDS_USER : penwin.h
  • ETOFLAGS : util.cpp , idataobj.cpp
  • EventRefFromWpLp : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- f -

  • FAbsTimeInInterval : penwin.h
  • FAIL_ARGS : regsvr.cpp
  • FAIL_ENTRY : regsvr.cpp
  • FAIL_LOAD : regsvr.cpp
  • FAIL_OLE : regsvr.cpp
  • FAIL_REG : regsvr.cpp
  • FEQAbsTime : penwin.h
  • FILEOPENORD : resource.h
  • FINDDLGORD : resource.h
  • FIntervalInInterval : penwin.h
  • FIntervalXInterval : penwin.h
  • FIRST_FAVORITE_COMMAND : FavoritesManager.h
  • FIRST_HISTORY_COMMAND : IEDemoDoc.h , MSMoneyDemoDoc.h
  • FIsAnsi : penwin.h
  • FIsAnsiGesture : penwin.h
  • FIsGesture : penwin.h
  • FIsKanji : penwin.h
  • FIsSelectGesture : penwin.h
  • FIsShape : penwin.h
  • FIsSpecial : penwin.h
  • FIsStdGesture : penwin.h
  • FIsUniCode : penwin.h
  • FIsVKey : penwin.h
  • FLTAbsTime : penwin.h
  • FLTEAbsTime : penwin.h
  • FN_GETFORMAT : formatba.h
  • FN_SETFORMAT : formatba.h
  • FONTDLGORD : resource.h
  • FORMATBASE : HTMLEdView.h
  • FORMATDLGORD30 : resource.h
  • FORMATDLGORD31 : resource.h
  • FPenUpX : penwin.h
  • frm1 : resource.h
  • frm2 : resource.h
  • frm3 : resource.h
  • frm4 : resource.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- g -

  • GetApp : spiro.h
  • GETCLASSBRBACKGROUND : oleview.h
  • GETCLASSUINT : oleview.h
  • GetWEventRef : penwin.h
  • GGRC_DICTBUFTOOSMALL : penwin.h
  • GGRC_NA : penwin.h
  • GGRC_OK : penwin.h
  • GGRC_PARAMERROR : penwin.h
  • GPA_MAXLEN : penwin.h
  • GPA_PDTS : penwin.h
  • GPA_POINTS : penwin.h
  • GPA_RATE : penwin.h
  • GPA_RECTBOUND : penwin.h
  • GPA_RECTBOUNDINK : penwin.h
  • GPA_SIZE : penwin.h
  • GPA_STROKES : penwin.h
  • GPA_TIME : penwin.h
  • GPA_USER : penwin.h
  • GPA_VERSION : penwin.h
  • GRH_ALL : penwin.h
  • GRH_GESTURE : penwin.h
  • GRH_NONGESTURE : penwin.h
  • grp1 : resource.h
  • grp2 : resource.h
  • grp3 : resource.h
  • grp4 : resource.h
  • GSA_DOWN : penwin.h
  • GSA_PENTIP : penwin.h
  • GSA_PENTIPCLASS : penwin.h
  • GSA_PENTIPTABLE : penwin.h
  • GSA_RECTBOUND : penwin.h
  • GSA_SELECT : penwin.h
  • GSA_SIZE : penwin.h
  • GSA_SIZETABLE : penwin.h
  • GSA_TIME : penwin.h
  • GSA_USER : penwin.h
  • GSA_USERCLASS : penwin.h
  • GSA_USERTABLE : penwin.h
  • GST_ALL : penwin.h
  • GST_CIRCLE : penwin.h
  • GST_CIRCLELO : penwin.h
  • GST_CIRCLEUP : penwin.h
  • GST_CLIP : penwin.h
  • GST_EDIT : penwin.h
  • GST_KKCONVERT : penwin.h
  • GST_SEL : penwin.h
  • GST_SYS : penwin.h
  • GST_WHITE : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- h -

  • HE_CANCELKKCONVERT : penwin.h
  • HE_CHAROFFSET : penwin.h
  • HE_CHARPOSITION : penwin.h
  • HE_DEFAULTFONT : penwin.h
  • HE_ENABLEALTLIST : penwin.h
  • HE_FIXKKCONVERT : penwin.h
  • HE_GETBOXLAYOUT : penwin.h
  • HE_GETIMEDEFAULT : penwin.h
  • HE_GETINFLATE : penwin.h
  • HE_GETINKHANDLE : penwin.h
  • HE_GETKKCONVERT : penwin.h
  • HE_GETKKSTATUS : penwin.h
  • HE_GETLENSTYPE : penwin.h
  • HE_GETRC : penwin.h
  • HE_GETRCRESULT : penwin.h
  • HE_GETRCRESULTCODE : penwin.h
  • HE_GETUNDERLINE : penwin.h
  • HE_HIDEALTLIST : penwin.h
  • HE_KKCONVERT : penwin.h
  • HE_KKNOCONVERT : penwin.h
  • HE_SETBOXLAYOUT : penwin.h
  • HE_SETIMEDEFAULT : penwin.h
  • HE_SETINFLATE : penwin.h
  • HE_SETINKMODE : penwin.h
  • HE_SETLENSTYPE : penwin.h
  • HE_SETRC : penwin.h
  • HE_SETUNDERLINE : penwin.h
  • HE_SHOWALTLIST : penwin.h
  • HE_STOPINKMODE : penwin.h
  • HEADER_HEIGHT : PropSheetDemoDlg.cpp
  • HEAL_DEFAULT : penwin.h
  • HEIGHT : ruler.cpp
  • HEKK_CANDIDATE : penwin.h
  • HEKK_CONVERT : penwin.h
  • HEKK_DBCSCHAR : penwin.h
  • HEKK_DEFAULT : penwin.h
  • HEKK_HIRAGANA : penwin.h
  • HEKK_KATAKANA : penwin.h
  • HEKK_SBCSCHAR : penwin.h
  • HEKKR_CONVERT : penwin.h
  • HEKKR_PRECONVERT : penwin.h
  • HEKKR_TEMPCONFIRM : penwin.h
  • HEP_NORECOG : penwin.h
  • HEP_RECOG : penwin.h
  • HEP_WAITFORTAP : penwin.h
  • HIDC_ALLOWWINDOWLESS : popups.h
  • HIDC_ALWAYS : popups.h
  • HIDC_CATEGORIES : popups.h
  • HIDC_CHOOSECOLOR : popups.h
  • HIDC_CHOOSECOLOR_AMBIENT : popups.h
  • HIDC_CHOOSEFONT : popups.h
  • HIDC_CHOOSEFONT_AMBIENT : popups.h
  • HIDC_CLEAROUTPUTWINDOW : popups.h
  • HIDC_CONTROLS : popups.h
  • HIDC_DATE : popups.h
  • HIDC_DATE_AMBIENT : popups.h
  • HIDC_DISPID : popups.h
  • HIDC_DISPID_NEW : popups.h
  • HIDC_ENABLED : popups.h
  • HIDC_EVENTS : popups.h
  • HIDC_EXCEPTIONDESC : popups.h
  • HIDC_EXCEPTIONHELP : popups.h
  • HIDC_EXCEPTIONSOURCE : popups.h
  • HIDC_FILENAME : popups.h
  • HIDC_FILENAME_BROWSE : popups.h
  • HIDC_IADVISESINKEX : popups.h
  • HIDC_IGNOREACTIVATEWHENVISIBLE : popups.h
  • HIDC_IGNOREREQUIREDCATEGORIES : popups.h
  • HIDC_IMPLEMENTEDCATEGORIES : popups.h
  • HIDC_INVOKE : popups.h
  • HIDC_IOLEINPLACESITEEX : popups.h
  • HIDC_IOLEINPLACESITEWINDOWLESS : popups.h
  • HIDC_LOGTODEBUG : popups.h
  • HIDC_LOGTOFILE : popups.h
  • HIDC_LOGTONULL : popups.h
  • HIDC_LOGTOOUTPUT : popups.h
  • HIDC_MACROS : popups.h
  • HIDC_METHODNAME : popups.h
  • HIDC_NEVER : popups.h
  • HIDC_NEWPROPERTY : popups.h
  • HIDC_OBJECTS : popups.h
  • HIDC_OPENFILE : popups.h
  • HIDC_OUTPUT : popups.h
  • HIDC_PARAMS : popups.h
  • HIDC_PARAMTYPE : popups.h
  • HIDC_PARAMVALUE : popups.h
  • HIDC_PARAMVALUECOMBO : popups.h
  • HIDC_PROMPT : popups.h
  • HIDC_PROPERTIES : popups.h
  • HIDC_PROPERTIES_CHANGES : popups.h
  • HIDC_PROPERTIES_EDITREQUESTS : popups.h
  • HIDC_PROPNAME : popups.h
  • HIDC_PROPNAME_NEW : popups.h
  • HIDC_PROPTYPE : popups.h
  • HIDC_PROPVALUE : popups.h
  • HIDC_PROPVALUECOMBO_AMBIENT : popups.h
  • HIDC_REGISTER : popups.h
  • HIDC_REGISTEREDCONTROLS : popups.h
  • HIDC_REQUIREDCATEGORIES : popups.h
  • HIDC_REREGISTER : popups.h
  • HIDC_RETURNVALUE : popups.h
  • HIDC_SBINDHOST : popups.h
  • HIDC_SELECTALL : popups.h
  • HIDC_SELECTALL_EDITREQUESTS : popups.h
  • HIDC_SETVALUE : popups.h
  • HIDC_SETVALUE_AMBIENT : popups.h
  • HIDC_STATIC_PARAMETERVALUE : popups.h
  • HIDC_STATIC_PROPERTYVALUE : popups.h
  • HIDC_TABORDER : popups.h
  • HIDC_TWOPASSDRAWING : popups.h
  • HIDC_UNREGISTER : popups.h
  • HIDC_USEIPOINTERINACTIVE : popups.h
  • HIDC_USEQUICKACTIVATION : popups.h
  • HIMETRIC_PER_INCH : xlistctl.cpp
  • HINT_DELETE_SELECTION : drawvw.h
  • HINT_UPDATE_DRAWOBJ : drawvw.h
  • HINT_UPDATE_ITEM : contrdoc.h
  • HINT_UPDATE_OLE_ITEMS : drawvw.h
  • HINT_UPDATE_SELECTION : drawvw.h
  • HINT_UPDATE_WINDOW : contrdoc.h , drawvw.h
  • HISTORY_COUNT : np.h
  • HISTORY_LEN : IEDemoDoc.h , MSMoneyDemoDoc.h
  • HIT_NOTHING : piece.h
  • HIT_PEN_LOCATION : piece.h
  • HKP_SETHOOK : penwin.h
  • HKP_UNHOOK : penwin.h
  • HN_BEGINDIALOG : penwin.h
  • HN_DELAYEDRECOGFAIL : penwin.h
  • HN_ENDDIALOG : penwin.h
  • HN_ENDKKCONVERT : penwin.h
  • HN_ENDREC : penwin.h
  • HN_RCRESULT : penwin.h
  • HN_RESULT : penwin.h
  • HORZ_TEXTOFFSET : stdafx.h
  • HpcmFromWpLp : penwin.h
  • HRCR_COMPLETE : penwin.h
  • HRCR_CONFLICT : penwin.h
  • HRCR_ERROR : penwin.h
  • HRCR_GESTURE : penwin.h
  • HRCR_HOOKED : penwin.h
  • HRCR_INCOMPLETE : penwin.h
  • HRCR_INVALIDGUIDE : penwin.h
  • HRCR_INVALIDPNDT : penwin.h
  • HRCR_MEMERR : penwin.h
  • HRCR_NORESULTS : penwin.h
  • HRCR_OK : penwin.h
  • HRCR_UNSUPPORTED : penwin.h
  • HtrgFromHwnd : penwin.h
  • HWL_SYSTEM : penwin.h
  • HwndFromHtrg : penwin.h
  • HWR_APPWIDE : penwin.h
  • HWR_RESULTS : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- i -

  • I_COLUMNENTRY : idataobj.cpp
  • I_COLUMNHEAD : idataobj.cpp
  • I_LABEL : idataobj.cpp
  • I_NORMAL : idataobj.cpp
  • IBUTTON : itemtemp.h
  • ico1 : resource.h
  • ico2 : resource.h
  • ico3 : resource.h
  • ico4 : resource.h
  • ID_ABOUT : resource.h
  • ID_ADD : resource.h
  • ID_ADD_NODE : resource.h
  • ID_ADDRESS_BOOK : resource.h
  • ID_AIRBRUSH : resource.h
  • ID_APP_EXIT : resource.h
  • ID_APP_HELP_MICROSOFT : Resource.h
  • ID_APP_OPEN : resource.h
  • ID_ARRAY : resource.h
  • ID_BACKWARD_1 : Resource.h
  • ID_BACKWARD_2 : Resource.h
  • ID_BLACK : resource.h
  • ID_BLUE : resource.h
  • ID_BOGUS : Resource.h
  • ID_BORDER_1 : resource.h
  • ID_BORDER_10 : resource.h
  • ID_BORDER_11 : resource.h
  • ID_BORDER_12 : resource.h
  • ID_BORDER_13 : resource.h
  • ID_BORDER_2 : resource.h
  • ID_BORDER_3 : resource.h
  • ID_BORDER_4 : resource.h
  • ID_BORDER_5 : resource.h
  • ID_BORDER_6 : resource.h
  • ID_BORDER_7 : resource.h
  • ID_BORDER_8 : resource.h
  • ID_BORDER_9 : resource.h
  • ID_BORDER_TEAROFF : resource.h
  • ID_BORDERS_ALLBORDERS : Resource.h
  • ID_BORDERS_BORDERSANDSHADING : Resource.h
  • ID_BORDERS_BOTTOMBORDER : Resource.h
  • ID_BORDERS_DIAGONALDOWNBORDER : Resource.h
  • ID_BORDERS_DIAGONALUPBORDER : Resource.h
  • ID_BORDERS_HORIZONTALLINE : Resource.h
  • ID_BORDERS_INSIDEBORDERS : Resource.h
  • ID_BORDERS_INSIDEHORIZONTALBORDER : Resource.h
  • ID_BORDERS_INSIDEVERTICALBORDER : Resource.h
  • ID_BORDERS_LEFTBORDER : Resource.h
  • ID_BORDERS_NOBORDER : Resource.h
  • ID_BORDERS_OUTSIDEBORDERS : Resource.h
  • ID_BORDERS_RIGHTBORDER : Resource.h
  • ID_BORDERS_TOPBORDER : Resource.h
  • ID_BORDERS_VIEWGRIDLINES : Resource.h
  • ID_BROWSE_CLASSGRAPH : resource.h
  • ID_BROWSE_FILEOUTLINE : resource.h
  • ID_BROWSE_GOTODEFINITION : resource.h
  • ID_BROWSE_GOTOREFERENCE : resource.h
  • ID_BROWSE_REVERSECLASSGRAPH : resource.h
  • ID_BRUSH : resource.h
  • ID_BUTTON32777 : resource.h
  • ID_BUTTON32778 : resource.h
  • ID_BUTTON32779 : resource.h
  • ID_BUTTON32780 : resource.h
  • ID_BUTTON32781 : resource.h
  • ID_BUTTON32782 : resource.h
  • ID_BUTTON32783 : resource.h
  • ID_BUTTON32784 : resource.h
  • ID_BUTTON32785 : resource.h
  • ID_BUTTON32787 : resource.h
  • ID_BUTTON32788 : resource.h
  • ID_BUTTON32789 : resource.h
  • ID_BUTTON32810 : resource.h
  • ID_BUTTON32811 : resource.h
  • ID_BUTTON40001 : resource.h
  • ID_BUTTON40002 : resource.h
  • ID_BUTTON40003 : resource.h
  • ID_BUTTON40004 : resource.h
  • ID_BUTTON40005 : resource.h
  • ID_BUTTON_ABSOLUTE : resource.h
  • ID_BUTTON_BLOCKFMT : resource.h
  • ID_BUTTON_BOLD : resource.h
  • ID_BUTTON_BULLETLIST : resource.h
  • ID_BUTTON_CENTER : resource.h
  • ID_BUTTON_CENTERJUSTIFY : resource.h
  • ID_BUTTON_COLOR : resource.h
  • ID_BUTTON_FONTNAME : resource.h
  • ID_BUTTON_FONTSIZE : resource.h
  • ID_BUTTON_HYPERLINK : resource.h
  • ID_BUTTON_IMAGE : resource.h
  • ID_BUTTON_INDENT : resource.h
  • ID_BUTTON_ITALIC : resource.h
  • ID_BUTTON_LEFTJUSTIFY : resource.h
  • ID_BUTTON_MIN : bbutton.cpp
  • ID_BUTTON_NUMBERLIST : resource.h
  • ID_BUTTON_OUTDENT : resource.h
  • ID_BUTTON_RIGHTJUSTIFY : resource.h
  • ID_BUTTON_STATIC : resource.h
  • ID_BUTTON_UNDERLINE : resource.h
  • ID_BUTTONSTATIC : resource.h
  • ID_BUTTONSTYLE : resource.h
  • ID_BUTTONSTYLE2 : resource.h
  • ID_CANCEL_EDIT : resource.h
  • ID_CANCEL_EDIT_CNTR : resource.h , Resource.H , resource.h , Resource.h , resource.h
  • ID_CANCEL_EDIT_SRVR : resource.h
  • ID_CANCEL_INPLACE : resource.h
  • ID_CATEGORIE_1 : Resource.h
  • ID_CATEGORIE_2 : Resource.h
  • ID_CATEGORIE_3 : Resource.h
  • ID_CATEGORIE_4 : Resource.h
  • ID_CATEGORIE_5 : Resource.h
  • ID_CATEGORIE_6 : Resource.h
  • ID_CATEGORIE_7 : Resource.h
  • ID_CATEGORIE_8 : Resource.h
  • ID_CCSADJUSTABLE : resource.h
  • ID_CCSBOTTOM : resource.h
  • ID_CCSTOP : resource.h
  • ID_CHANGE_NAME : resource.h
  • ID_CHANGE_OBJECT_PROPS : resource.h
  • ID_CHAR_BOLD : resource.h
  • ID_CHAR_COLOR : resource.h
  • ID_CHAR_ITALIC : resource.h
  • ID_CHAR_UNDERLINE : resource.h
  • ID_CHART_DESIGN_DATA_EDIT : Resource.h
  • ID_CHART_DESIGN_DATA_SHOW : Resource.h
  • ID_CHART_DESIGN_DATA_SWITCH : Resource.h
  • ID_CHART_DESIGN_TYPE_CHANGE : Resource.h
  • ID_CHART_DESIGN_TYPE_SAVETEMPLATE : Resource.h
  • ID_CHART_FORMAT_CURSEL_FORMAT : Resource.h
  • ID_CHART_FORMAT_CURSEL_RESET : Resource.h
  • ID_CHART_FORMAT_SHAPES_EFFECTS : Resource.h
  • ID_CHART_FORMAT_SHAPES_FILL : Resource.h
  • ID_CHART_FORMAT_SHAPES_OUTLINE : Resource.h
  • ID_CHART_LAYOUT_AXES_AXES : Resource.h
  • ID_CHART_LAYOUT_AXES_GRIDLINES : Resource.h
  • ID_CHART_LAYOUT_LABELS_AXIS : Resource.h
  • ID_CHART_LAYOUT_LABELS_DATALABELS : Resource.h
  • ID_CHART_LAYOUT_LABELS_DATATABLE : Resource.h
  • ID_CHART_LAYOUT_LABELS_LEGEND : Resource.h
  • ID_CHART_LAYOUT_LABELS_TITLE : Resource.h
  • ID_CHART_LAYOUT_SHAPES_PICTURE : Resource.h
  • ID_CHART_LAYOUT_SHAPES_SHAPES : Resource.h
  • ID_CHART_LAYOUT_SHAPES_TEXTBOX : Resource.h
  • ID_CHOOSE_FONT : resource.h
  • ID_CHOOSE_PRINT_FONT : resource.h
  • ID_CLASS_ADD_MEMEBER_FUNCTION : Resource.h
  • ID_CLASS_ADD_MEMEBER_VARIABLE : Resource.h
  • ID_CLASS_DEFINITION : Resource.h
  • ID_CLASS_PROPERTIES : Resource.h
  • ID_CLEAR : Resource.H
  • ID_CLIST : resource.h
  • ID_CLOSE : Resource.H
  • ID_COLOR0 : resource.h
  • ID_COLOR1 : resource.h
  • ID_COLOR10 : resource.h
  • ID_COLOR11 : resource.h
  • ID_COLOR12 : resource.h
  • ID_COLOR13 : resource.h
  • ID_COLOR14 : resource.h
  • ID_COLOR15 : resource.h
  • ID_COLOR16 : resource.h
  • ID_COLOR2 : resource.h
  • ID_COLOR3 : resource.h
  • ID_COLOR4 : resource.h
  • ID_COLOR5 : resource.h
  • ID_COLOR6 : resource.h
  • ID_COLOR7 : resource.h
  • ID_COLOR8 : resource.h
  • ID_COLOR9 : resource.h
  • ID_COLOR_AUTOMATIC : resource.h
  • ID_COLOR_OPTIONS : resource.h
  • ID_COLOR_TEAROFF : resource.h
  • ID_COMMAND_1 : resource.h
  • ID_COMMAND_2 : resource.h
  • ID_COMMAND_3 : resource.h
  • ID_COMMAND_HISTORY : Resource.h
  • ID_CONTAINER_AMBIENTPROPERTIES : Resource.H
  • ID_CONTAINER_INFO : Resource.H
  • ID_CONTAINER_OPTIONS : Resource.H
  • ID_CONTAINER_TABORDER : Resource.H
  • ID_CONTEXT_BROWSE : resource.h
  • ID_CONTEXT_EXIT : resource.h
  • ID_CONTEXT_PROPERTIES : resource.h
  • ID_CONTEXTHELP : resource.h
  • ID_CONTROL_ACTIVATE : Resource.H
  • ID_CONTROL_DEACTIVATE : Resource.H
  • ID_CONTROL_DRAWMETAFILE : Resource.H
  • ID_CONTROL_EVENTLOGGING : Resource.H
  • ID_CONTROL_INVOKEMETHODS : Resource.H
  • ID_CONTROL_LOGGING : Resource.H
  • ID_CONTROL_SAVETOPROPERTYBAG : Resource.H
  • ID_CONTROL_SAVETOSTORAGE : Resource.H
  • ID_CONTROL_SAVETOSTREAM : Resource.H
  • ID_CONTROL_SAVETOSUBSTORAGE : Resource.H
  • ID_CONTROL_UIACTIVATE : Resource.H
  • ID_CONTROL_UIDEACTIVATE : Resource.H
  • ID_COPY : resource.h
  • ID_COPY_TO : Resource.h
  • ID_CPAL_CHECK : resource.h
  • ID_CUSTOM : resource.h
  • ID_CUSTOMIZE_QUICK_ACCESS_TOOLBAR : Resource.h
  • ID_CUT : resource.h
  • ID_DATE : resource.h
  • ID_DEBUG_CALLSTACK : resource.h
  • ID_DEBUG_DISASSEMBLY : resource.h
  • ID_DEBUG_LOCALS : resource.h
  • ID_DEBUG_MEMORY : resource.h
  • ID_DEBUG_QUICKWATCH : resource.h
  • ID_DEBUG_REGISTERS : resource.h
  • ID_DEBUG_RESTART : resource.h
  • ID_DEBUG_RUNTOCURSOR : resource.h
  • ID_DEBUG_STEPINTO : resource.h
  • ID_DEBUG_STEPOUT : resource.h
  • ID_DEBUG_STEPOVER : resource.h
  • ID_DEBUG_STOPDEBUGGING : resource.h
  • ID_DEBUG_WATCH : resource.h
  • ID_DEMO_DEMO1 : resource.h
  • ID_DEMO_DEMO2 : resource.h
  • ID_DERIVED_WORKER_THREAD : resource.h
  • ID_DHELP1 : Resource.h
  • ID_DHELP2 : Resource.h
  • ID_DHELP3 : Resource.h
  • ID_DIALOG_ABOUT : resource.h
  • ID_DRAW : resource.h
  • ID_DRAW_ELLIPSE : resource.h
  • ID_DRAW_LINE : resource.h
  • ID_DRAW_POLYGON : resource.h
  • ID_DRAW_RECT : resource.h
  • ID_DRAW_ROUNDRECT : resource.h
  • ID_DRAW_SELECT : resource.h
  • ID_DRAWPATTERN : resource.h
  • ID_DUMMY : Resource.h , resource.h
  • ID_DUMMY_BUILD : Resource.h
  • ID_DUMMY_CLEAN : Resource.h
  • ID_DUMMY_COMPILE : Resource.h
  • ID_DUMMY_EXECUTE : Resource.h
  • ID_DUMMY_GO : Resource.h
  • ID_DUMMY_INSERT_RESOURCE : Resource.h
  • ID_DUMMY_REBUILD_ALL : Resource.h
  • ID_DUMMY_REMOVE_ALL_BREAKPOINTS : Resource.h
  • ID_DUMMY_SELECT_ACTIVE_CONFIGURATION : Resource.h
  • ID_DUMMY_STOP_BUILD : Resource.h
  • ID_DUMP_CLASSES : resource.h
  • ID_DUMP_DLLS : resource.h
  • ID_DUMP_DOCTEMPLATES : resource.h
  • ID_DUMP_OBJECTS : resource.h
  • ID_DWORDARRAY : resource.h
  • ID_DYNAMIC_COMMANDS : resource.h
  • ID_DYNAMIC_ITEM_1 : resource.h
  • ID_DYNAMIC_ITEM_2 : resource.h
  • ID_EDIT_ALLOWINVERT : resource.h
  • ID_EDIT_AMBIENTPROPERTIES : Resource.H
  • ID_EDIT_AUTOOUTLINING : Resource.h
  • ID_EDIT_BM_CLEARALL : resource.h
  • ID_EDIT_BM_NEXT : resource.h
  • ID_EDIT_BM_PREV : resource.h
  • ID_EDIT_BM_TOGGLE : resource.h
  • ID_EDIT_BRINGTOFRONT : Resource.H
  • ID_EDIT_CHANGETEXT : resource.h
  • ID_EDIT_CLEAR_ALLBOOKMARKS : Resource.h
  • ID_EDIT_CLONE : resource.h
  • ID_EDIT_COLLAPSETODEFINITIONS : Resource.h
  • ID_EDIT_COPYFORMAT : Resource.h
  • ID_EDIT_DECREASE_IDENT : Resource.h
  • ID_EDIT_DELETE : Resource.H
  • ID_EDIT_DELETEALL : Resource.H
  • ID_EDIT_DOTTEDLINE : resource.h
  • ID_EDIT_EMBEDDEDOBJECT_ACTIVATE : Resource.H
  • ID_EDIT_EMBEDDEDOBJECTFUNCTIONS_ACTIVATE : Resource.H
  • ID_EDIT_ENABLEOUTLINING : Resource.h
  • ID_EDIT_FIND_COMBO : resource.h , Resource.h
  • ID_EDIT_FIND_NEXT : resource.h
  • ID_EDIT_FINDINFILES : resource.h
  • ID_EDIT_FINDNEXT : Resource.h
  • ID_EDIT_FINDPREV : Resource.h
  • ID_EDIT_FONT : resource.h
  • ID_EDIT_GOTO : resource.h , Resource.h
  • ID_EDIT_GOTO_LINE : Resource.h
  • ID_EDIT_HATCHEDBORDER : resource.h
  • ID_EDIT_HATCHEDINSIDE : resource.h
  • ID_EDIT_HIDESELECTION : Resource.h
  • ID_EDIT_INCREASE_IDENT : Resource.h
  • ID_EDIT_INDENT : resource.h
  • ID_EDIT_INSERTCONTROL : Resource.H
  • ID_EDIT_INSERTCONTROLFROMSTORAGE : Resource.H
  • ID_EDIT_INSERTCONTROLFROMSUBSTORAGE : Resource.H
  • ID_EDIT_INSERTFROMSTREAM : Resource.H
  • ID_EDIT_INVOKEMETHODS : Resource.H
  • ID_EDIT_LINENUMBERS : Resource.h
  • ID_EDIT_LISTMEMBERS : Resource.h
  • ID_EDIT_LOADOBJECTFROMSTREAM : Resource.H
  • ID_EDIT_MULTISELPROPERTIES : Resource.H
  • ID_EDIT_NEXT_WORD : Resource.h
  • ID_EDIT_NEXTBOOKMARK : Resource.h
  • ID_EDIT_PASTE_HYPERLINK : Resource.h
  • ID_EDIT_PREVIOUSBOOKMARK : Resource.h
  • ID_EDIT_PROPERTIES : resource.h , Resource.H
  • ID_EDIT_RESIZEINSIDE : resource.h
  • ID_EDIT_RESIZEOUTSIDE : resource.h
  • ID_EDIT_SELECTALL : resource.h , Resource.H
  • ID_EDIT_SELECTFORMAT : Resource.h
  • ID_EDIT_SELECTOBJECTS : Resource.h
  • ID_EDIT_SENDTOBACK : Resource.H
  • ID_EDIT_SHOWHINT : Resource.h
  • ID_EDIT_SOLIDLINE : resource.h
  • ID_EDIT_STOPHIDINGCURRENT : Resource.h
  • ID_EDIT_STOPOUTLINING : Resource.h
  • ID_EDIT_TEST : resource.h
  • ID_EDIT_TOGGLEALLOUTLINING : Resource.h
  • ID_EDIT_TOGGLEBOOKMARK : Resource.h
  • ID_EDIT_TOGGLEBREAKPOINT : Resource.h
  • ID_EDIT_TOGGLEOUTLINING : Resource.h
  • ID_EDIT_UNINDENT : resource.h
  • ID_EDIT_WORDWRAP : resource.h
  • ID_ELLIPSE : resource.h
  • ID_END_DRAWING : resource.h
  • ID_ENORMOUSWHEEL : resource.h
  • ID_ERASE : resource.h
  • ID_EXAMPLE_CPP : Resource.h
  • ID_EXAMPLE_WEB : Resource.h
  • ID_EXPAND : resource.h , Resource.h
  • ID_FAST : resource.h
  • ID_FAVORITES_DROPDOWN : Resource.h
  • ID_FAVORITS_DUMMY : Resource.h
  • ID_FILE_BINDTOAFILE : resource.h
  • ID_FILE_CLOSE_SOLUTION : Resource.h
  • ID_FILE_CONFIGURESCREENCAPTURE : Resource.h
  • ID_FILE_IMAGEINFO : resource.h
  • ID_FILE_LOADFROMSTREAM : Resource.H
  • ID_FILE_NEW_BLANK_SOLUTION : Resource.h
  • ID_FILE_NEW_PROJECT : Resource.h
  • ID_FILE_NEWBOUNCE : resource.h
  • ID_FILE_NEWHELLO : resource.h
  • ID_FILE_OPEN_SOLUTION : Resource.h
  • ID_FILE_OPENIMAGE : resource.h
  • ID_FILE_OPENURL : resource.h
  • ID_FILE_PLAY : resource.h
  • ID_FILE_PREPARE : Resource.h
  • ID_FILE_PREPARE_ADD_SIGNATURE : Resource.h
  • ID_FILE_PREPARE_ENCRYPT : Resource.h
  • ID_FILE_PREPARE_INSPECT : Resource.h
  • ID_FILE_PREPARE_MARK_AS_FINAL : Resource.h
  • ID_FILE_PREPARE_PROPERTIES : Resource.h
  • ID_FILE_PREPARE_RUN_CHECKER : Resource.h
  • ID_FILE_PRINTALLSECTIONS : resource.h
  • ID_FILE_PUBLISH : Resource.h
  • ID_FILE_PUBLISH_BLOG : Resource.h
  • ID_FILE_PUBLISH_CREATE_DOCWORKSPACE : Resource.h
  • ID_FILE_PUBLISH_DOCMANAGE_SERVER : Resource.h
  • ID_FILE_REGISTERCONTROLS : Resource.H
  • ID_FILE_RUNREGEDIT : resource.h
  • ID_FILE_SAVE_ALL : Resource.h
  • ID_FILE_SAVE_AS_ADDINS : Resource.h
  • ID_FILE_SAVE_AS_DOCUMENT : Resource.h
  • ID_FILE_SAVE_AS_DOCUMENT_OLD : Resource.h
  • ID_FILE_SAVE_AS_OTHER : Resource.h
  • ID_FILE_SAVE_AS_TEMPLATE : Resource.h
  • ID_FILE_SAVEIMAGE : resource.h
  • ID_FILE_SAVETOSTREAM : Resource.H
  • ID_FILE_SCREENCAPTURE : Resource.h
  • ID_FILE_SEND : Resource.h
  • ID_FILE_SEND_EMAIL : Resource.h
  • ID_FILE_SEND_FAX : Resource.h
  • ID_FILE_SHOWVERSION : resource.h
  • ID_FILE_SUMMARYINFO : resource.h
  • ID_FILE_VIEWTYPELIB : resource.h
  • ID_FILL : resource.h
  • ID_FIND_CONTACT : resource.h
  • ID_FMTBAR_FONTNAME : resource.h
  • ID_FMTBAR_FONTSIZE : resource.h
  • ID_FOLDER_UP : Resource.h
  • ID_FONT_BOLD : Resource.h
  • ID_FONT_CASE_CAPITALIZE : Resource.h
  • ID_FONT_CASE_LOWERCASE : Resource.h
  • ID_FONT_CASE_SENTENCE : Resource.h
  • ID_FONT_CASE_TOGGLECASE : Resource.h
  • ID_FONT_CASE_UPPERCASE : Resource.h
  • ID_FONT_CHANGECASE : Resource.h
  • ID_FONT_CLEARFORMAT : Resource.h
  • ID_FONT_COLOR : Resource.h
  • ID_FONT_DROPDOWN : Resource.h
  • ID_FONT_FONT : Resource.h
  • ID_FONT_FONTSIZE : Resource.h
  • ID_FONT_GROWFONT : Resource.h
  • ID_FONT_ITALIC : Resource.h
  • ID_FONT_NOT_FOUND : Resource.h
  • ID_FONT_SHRINK : Resource.h
  • ID_FONT_STRIKETHROUGH : Resource.h
  • ID_FONT_SUBSCRIPT : Resource.h
  • ID_FONT_SUPERSCRIPT : Resource.h
  • ID_FONT_TEXTHIGHLIGHT : Resource.h
  • ID_FONT_UNDERLINE : Resource.h
  • ID_FORMAT_ABSOLUTEPOSITIONELEMENT : resource.h
  • ID_FORMAT_BRINGABOVETEXT : resource.h
  • ID_FORMAT_BRINGFORWARD : resource.h
  • ID_FORMAT_BRINGTOFRONT : resource.h
  • ID_FORMAT_CONTEXT_TAB : mainfrm.h
  • ID_FORMAT_PARAGRAPH : resource.h
  • ID_FORMAT_SENDBACKWARD : resource.h
  • ID_FORMAT_SENDBELOWTEXT : resource.h
  • ID_FORMAT_SENDTOBACK : resource.h
  • ID_FORMAT_STATICELEMENT : resource.h
  • ID_FORMAT_TABS : resource.h
  • ID_FORWARD_1 : Resource.h
  • ID_FORWARD_2 : Resource.h
  • ID_FOUR_COLUMNS : resource.h
  • ID_FREE_TEAROFF1 : resource.h
  • ID_FREE_TEAROFF2 : resource.h
  • ID_FROM_PALETTE_BULLET : Resource.h
  • ID_FROM_PALETTE_MULTILEVEL : Resource.h
  • ID_FROM_PALETTE_NUMBER : Resource.h
  • ID_FROM_PALETTE_POSITION : Resource.h
  • ID_FROM_PALETTE_TABLE : Resource.h
  • ID_GO_ADDRESS : Resource.h
  • ID_GO_ADDRESS_EDIT : Resource.h
  • ID_GO_BACK : Resource.h
  • ID_GO_BEST_OF_THE_WEB : Resource.h
  • ID_GO_FORWARD : Resource.h
  • ID_GO_SEARCH_THE_WEB : Resource.h
  • ID_GO_START_PAGE : Resource.h
  • ID_GREEN : resource.h
  • ID_GROUP_SHORTCUTS : Resource.h
  • ID_HELP_ABOUT : resource.h
  • ID_HELP_BUTTONCONTROL : resource.h
  • ID_HELP_FIND : resource.h
  • ID_HELP_KEYBOARDMAP : Resource.h
  • ID_HELP_MICROSOFT : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_BEST_OF_THE_WEB : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_FREE_STUFF : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_FREQUENTLY_ASKED_QUESTIONS : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_GET_FASTER_INTERNET_ACCESS : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_INTERNET_START_PAGE : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_MICROSOFT_HOME_PAGE : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_SEARCH_THE_WEB : Resource.h
  • ID_HELP_MICROSOFT_ON_THE_WEB_SEND_FEEDBACK : Resource.h
  • ID_HELP_ONLINE_SUPPORT : Resource.h
  • ID_HELP_SHOW_START : Resource.h
  • ID_HELP_WEB : Resource.h
  • ID_HELP_WEB_TUTORIAL : Resource.h
  • ID_HISTORY_DUMMY : Resource.h
  • ID_HUGERING : resource.h
  • ID_HUGEWHEEL : resource.h
  • ID_IFACES_USEINPROCHANDLER : resource.h
  • ID_IFACES_USEINPROCSERVER : resource.h
  • ID_IFACES_USELOCALSERVER : resource.h
  • ID_IFACEVIEW : resource.h
  • ID_IFACEVIEW_GETINTERFACES : resource.h
  • ID_IFACEVIEW_IFACEVIEWER : resource.h
  • ID_IMPORT_TEXT : resource.h
  • ID_INDICATOR_ANIMATION : resource.h
  • ID_INDICATOR_CF : resource.h
  • ID_INDICATOR_CLOCK : resource.h
  • ID_INDICATOR_FPS : Resource.h
  • ID_INDICATOR_ICON : Resource.h , resource.h
  • ID_INDICATOR_LABEL : resource.h
  • ID_INDICATOR_LINE : resource.h
  • ID_INDICATOR_PAUSE_BLIT : Resource.h
  • ID_INDICATOR_PAUSE_BLUR : Resource.h
  • ID_INDICATOR_PAUSE_SWARM : Resource.h
  • ID_INDICATOR_PROGRESS : Resource.h , resource.h
  • ID_INDICATOR_RESOLUTION : Resource.h
  • ID_INDICATOR_TIME : resource.h
  • ID_INDICATOR_UNK : resource.h
  • ID_INDICATOR_VIEW : resource.h
  • ID_INSERT_BLACKPAGE : Resource.h
  • ID_INSERT_BOOKMARK : Resource.h
  • ID_INSERT_BOTTOMOFPAGE : Resource.h
  • ID_INSERT_BULLET : resource.h
  • ID_INSERT_CHART : Resource.h
  • ID_INSERT_CITATION : Resource.h
  • ID_INSERT_CLIPART : Resource.h
  • ID_INSERT_COVERPAGE : Resource.h
  • ID_INSERT_CURRENTPOSITION : Resource.h
  • ID_INSERT_DATE_TIME : resource.h
  • ID_INSERT_DATETIME : Resource.h
  • ID_INSERT_DRAWTEXTBOX : Resource.h
  • ID_INSERT_DROPCAP : Resource.h
  • ID_INSERT_EDITFOOTER : Resource.h
  • ID_INSERT_EDITHEADER : Resource.h
  • ID_INSERT_EQUATION : Resource.h
  • ID_INSERT_FOOTER : Resource.h
  • ID_INSERT_FORMATPAGENUMBERS : Resource.h
  • ID_INSERT_HEADER : Resource.h
  • ID_INSERT_HYPERLINK : Resource.h
  • ID_INSERT_OBJECT : Resource.h
  • ID_INSERT_PAGEBREAK : Resource.h
  • ID_INSERT_PAGEMARGINS : Resource.h
  • ID_INSERT_PAGENUMBER : Resource.h
  • ID_INSERT_PICTURE : Resource.h
  • ID_INSERT_PICTUREFROMSCANER : Resource.h
  • ID_INSERT_QUICKPARTS : Resource.h
  • ID_INSERT_REFERENCE : Resource.h
  • ID_INSERT_REMOVECURRENTCOVERPAGE : Resource.h
  • ID_INSERT_REMOVEFOOTER : Resource.h
  • ID_INSERT_REMOVEHEADER : Resource.h
  • ID_INSERT_REMOVEPAGENUMBERS : Resource.h
  • ID_INSERT_SAVESELECTIONTOFOOTERGALLERY : Resource.h
  • ID_INSERT_SAVESELECTIONTOHEADERGALLERY : Resource.h
  • ID_INSERT_SAVESELECTIONTOTEXTBOXGALLERY : Resource.h
  • ID_INSERT_SAVETOCOVERPAGEGALLERY : Resource.h
  • ID_INSERT_SHAPES : Resource.h
  • ID_INSERT_SHAPESNEW : Resource.h
  • ID_INSERT_SIGNATURELINE : Resource.h
  • ID_INSERT_SMARTART : Resource.h
  • ID_INSERT_SYMBOL : Resource.h
  • ID_INSERT_TABLE : Resource.h
  • ID_INSERT_TEXTBOX : Resource.h
  • ID_INSERT_TOPOFPAGE : Resource.h
  • ID_INSERT_WORDART : Resource.h
  • ID_INTERFACES_SHOWCFI : resource.h
  • ID_INTERFACES_SHOWCLASSFACTORYOBJECTINTERFACES : resource.h
  • ID_INTERFACES_USECLSCTXINPROCHANDLER : resource.h
  • ID_INTERFACES_USECLSCTXINPROCSERVER : resource.h
  • ID_INTLIST : resource.h
  • ID_ITEM1 : resource.h
  • ID_ITEM2 : resource.h
  • ID_ITEM3 : resource.h
  • ID_ITEM4 : resource.h
  • ID_ITEM_1 : resource.h
  • ID_ITEM_2 : resource.h
  • ID_ITEM_3 : resource.h
  • ID_ITEM_4 : resource.h
  • ID_KILL_WORKER_THREAD : resource.h
  • ID_LABEL : resource.h
  • ID_LARGEWHEEL : resource.h
  • ID_LINE : resource.h
  • ID_LINE_STYLE_1 : resource.h
  • ID_LINE_STYLE_10 : resource.h
  • ID_LINE_STYLE_2 : resource.h
  • ID_LINE_STYLE_3 : resource.h
  • ID_LINE_STYLE_4 : resource.h
  • ID_LINE_STYLE_5 : resource.h
  • ID_LINE_STYLE_6 : resource.h
  • ID_LINE_STYLE_7 : resource.h
  • ID_LINE_STYLE_8 : resource.h
  • ID_LINE_STYLE_9 : resource.h
  • ID_LINE_STYLE_MENU : resource.h
  • ID_LINK_1 : Resource.h
  • ID_LINK_MICROSOFT : Resource.h
  • ID_LINK_MSDN : Resource.h
  • ID_LINK_VISUALCPP : Resource.h
  • ID_LINKS_BANKING_1 : Resource.h
  • ID_LINKS_BANKING_2 : Resource.h
  • ID_LINKS_BANKING_3 : Resource.h
  • ID_LINKS_BANKING_4 : Resource.h
  • ID_LINKS_BANKING_5 : Resource.h
  • ID_LINKS_BILLS_1 : Resource.h
  • ID_LINKS_BILLS_2 : Resource.h
  • ID_LINKS_BILLS_3 : Resource.h
  • ID_LINKS_BILLS_4 : Resource.h
  • ID_LINKS_BILLS_5 : Resource.h
  • ID_LINKS_BUDGET_1 : Resource.h
  • ID_LINKS_BUDGET_2 : Resource.h
  • ID_LINKS_HOME_1 : Resource.h
  • ID_LINKS_HOME_2 : Resource.h
  • ID_LINKS_INVESTING_1 : Resource.h
  • ID_LINKS_INVESTING_2 : Resource.h
  • ID_LINKS_INVESTING_3 : Resource.h
  • ID_LINKS_INVESTING_4 : Resource.h
  • ID_LINKS_INVESTING_5 : Resource.h
  • ID_LINKS_INVESTING_6 : Resource.h
  • ID_LINKS_INVESTING_7 : Resource.h
  • ID_LINKS_PLANNING_1 : Resource.h
  • ID_LINKS_PLANNING_2 : Resource.h
  • ID_LINKS_PLANNING_3 : Resource.h
  • ID_LINKS_PLANNING_4 : Resource.h
  • ID_LINKS_PLANNING_5 : Resource.h
  • ID_LINKS_PLANNING_6 : Resource.h
  • ID_LINKS_REPORTS_1 : Resource.h
  • ID_LINKS_REPORTS_2 : Resource.h
  • ID_LINKS_REPORTS_3 : Resource.h
  • ID_LINKS_TAXES_1 : Resource.h
  • ID_LINKS_TAXES_2 : Resource.h
  • ID_LINKS_TAXES_3 : Resource.h
  • ID_LINKS_TAXES_4 : Resource.h
  • ID_LINKS_TAXES_5 : Resource.h
  • ID_LIST_1 : WatchBar.cpp
  • ID_LISTBOX : resource.h
  • ID_LISTVIEW : tlblist.cpp
  • ID_LOAD_DEBUG_CONF : resource.h
  • ID_LOAD_REGULAR_CONF : resource.h
  • ID_LOOKUP : resource.h
  • ID_MAGNIFY : resource.h
  • ID_MAIL_ATTACHMENT : resource.h
  • ID_MAIL_BAR : resource.h
  • ID_MAIL_CHECK_NAMES : resource.h
  • ID_MAIL_CLOSE : resource.h
  • ID_MAIL_COPY_TO_FOLDER : resource.h
  • ID_MAIL_DELETE : resource.h
  • ID_MAIL_FLAG : resource.h
  • ID_MAIL_FONTSIZE : resource.h
  • ID_MAIL_HIGHT_PRIORITY : resource.h
  • ID_MAIL_ITEM : resource.h
  • ID_MAIL_LOW_PRIORITY : resource.h
  • ID_MAIL_MENU : resource.h
  • ID_MAIL_MOVE_TO_FOLDER : resource.h
  • ID_MAIL_OPTIONS : resource.h
  • ID_MAIL_PRINT : resource.h
  • ID_MAIL_PROPERTIES : resource.h
  • ID_MAIL_SAVE : resource.h
  • ID_MAIL_SAVE_ATTACHMENTS : resource.h
  • ID_MAIL_SAVE_STATIONERY : resource.h
  • ID_MAIL_SEND : resource.h
  • ID_MAIL_SIGNATURE : resource.h
  • ID_MAIL_SPELL : resource.h
  • ID_MAILINGS_ADDRESSBLOCK : Resource.h
  • ID_MAILINGS_AUTOCHECHERRORS : Resource.h
  • ID_MAILINGS_CREATE : Resource.h
  • ID_MAILINGS_CREATELABELS : Resource.h
  • ID_MAILINGS_DIRECTORY : Resource.h
  • ID_MAILINGS_EDITRECIPIENTLIST : Resource.h
  • ID_MAILINGS_EMAILMESSAGES : Resource.h
  • ID_MAILINGS_ENVELOPES : Resource.h
  • ID_MAILINGS_FINDRECIPIENT : Resource.h
  • ID_MAILINGS_FINISH : Resource.h
  • ID_MAILINGS_FIRSTRECORD : Resource.h
  • ID_MAILINGS_GOTORECORD : Resource.h
  • ID_MAILINGS_GREETINGLINE : Resource.h
  • ID_MAILINGS_HIGHLIGHT : Resource.h
  • ID_MAILINGS_INSERTMERGEDFIELD : Resource.h
  • ID_MAILINGS_LABELS : Resource.h
  • ID_MAILINGS_LASTRECORD : Resource.h
  • ID_MAILINGS_LETTERS : Resource.h
  • ID_MAILINGS_MATCHFIELDS : Resource.h
  • ID_MAILINGS_NEXTRECORD : Resource.h
  • ID_MAILINGS_NORMALDOCUMENT : Resource.h
  • ID_MAILINGS_PREVIOUSRECORD : Resource.h
  • ID_MAILINGS_RULES : Resource.h
  • ID_MAILINGS_SELECTFROMCONTACTS : Resource.h
  • ID_MAILINGS_SELECTRECIPIENTS : Resource.h
  • ID_MAILINGS_STARTMAILMERGE : Resource.h
  • ID_MAILINGS_STEPBYSTEPMAILMERGEWIZARD : Resource.h
  • ID_MAILINGS_TYPENEWLIST : Resource.h
  • ID_MAILINGS_UPDATELABELS : Resource.h
  • ID_MAILINGS_USEEXISTINGLIST : Resource.h
  • ID_MAILINGS_VIEWMERGEDDATA : Resource.h
  • ID_MAIN_BUTTON : Resource.h
  • ID_MAP : resource.h
  • ID_MAPBYTETOMYSTRUCT : resource.h
  • ID_MAPDWORDTOMYSTRUCT : resource.h
  • ID_MAPSTRINGTOSTRING : resource.h
  • ID_MDI_CANCEL : resource.h , Resource.h
  • ID_MDI_MOVE_TO_NEXT_GROUP : resource.h , Resource.h
  • ID_MDI_MOVE_TO_PREV_GROUP : resource.h , Resource.h
  • ID_MDI_NEW_HORZ_TAB_GROUP : resource.h , Resource.h
  • ID_MDI_NEW_VERT_GROUP : resource.h , Resource.h
  • ID_MDI_TABBED : resource.h
  • ID_MDI_TABBED_DOCUMENT : Resource.h
  • ID_MDITABS_BOTTOM : Resource.h
  • ID_MDITABS_CLOSE : Resource.h
  • ID_MDITABS_ICONS : Resource.h
  • ID_MDITABS_TOP : Resource.h
  • ID_MEDIUMRING : resource.h
  • ID_MEDIUMWHEEL : resource.h
  • ID_Menu : resource.h
  • ID_MENU1_MENU1 : resource.h
  • ID_MENU1_MENU2 : resource.h
  • ID_MENU2_MENU2 : resource.h
  • ID_MENU2_MENU3 : resource.h
  • ID_MENU2_MENU4 : resource.h
  • ID_MENU_DIR1 : Resource.h
  • ID_MENU_DIR2 : Resource.h
  • ID_MENU_DIR3 : Resource.h
  • ID_MENU_ITEM1 : Resource.h
  • ID_MENU_ITEM2 : Resource.h
  • ID_MENU_ITEM3 : Resource.h
  • ID_MENUITEM32771 : resource.h
  • ID_MENUITEM32772 : resource.h
  • ID_MINI_FRAME_PROPERTY_SHEET : resource.h
  • ID_MINI_FRAME_WITH_PIN_BUTTON : resource.h
  • ID_MIRROR_DISPLAY_FONT : resource.h
  • ID_MIX : resource.h
  • ID_MORE_LINES : resource.h
  • ID_MOVE_TO : Resource.h
  • ID_NEW : resource.h
  • ID_NEW_ACCELERATOR : Resource.h
  • ID_NEW_APPOINTMENT : resource.h
  • ID_NEW_BITMAP : Resource.h
  • ID_NEW_CONTRACT : resource.h
  • ID_NEW_CURSOR : Resource.h
  • ID_NEW_DIALOG : Resource.h
  • ID_NEW_DISTRIBUTION_LIST : resource.h
  • ID_NEW_FAX : resource.h
  • ID_NEW_FOLDER : resource.h , Resource.h
  • ID_NEW_ICON : Resource.h
  • ID_NEW_JOURNAL_ENTRY : resource.h
  • ID_NEW_MAIL : resource.h
  • ID_NEW_MEETING : resource.h
  • ID_NEW_MENU : Resource.h
  • ID_NEW_NOTE : resource.h
  • ID_NEW_POST_FOLDER : resource.h
  • ID_NEW_SHORTCUT : resource.h
  • ID_NEW_STRING_TABLE : Resource.h
  • ID_NEW_TASK : resource.h
  • ID_NEW_TASK_REQUEST : resource.h
  • ID_NEW_TOOLBAR : Resource.h
  • ID_NEW_VERSION : Resource.h
  • ID_NEWWINDOW : resource.h
  • ID_NEXT : resource.h
  • ID_NONDERIVED_WORKER_THREAD : resource.h
  • ID_NOTHING : resource.h
  • ID_OBJECT_CHANGEICON : resource.h
  • ID_OBJECT_DELETE : resource.h
  • ID_OBJECT_DISPLAYASICON : resource.h
  • ID_OBJECT_DISPLAYCONTENT : resource.h
  • ID_OBJECT_FILLCOLOR : resource.h
  • ID_OBJECT_LINECOLOR : resource.h
  • ID_OBJECT_LINEWEIGHT : resource.h
  • ID_OBJECT_LINEWEIGHT_MORE : resource.h
  • ID_OBJECT_MOVEBACK : resource.h
  • ID_OBJECT_MOVEFORWARD : resource.h
  • ID_OBJECT_MOVETOBACK : resource.h
  • ID_OBJECT_MOVETOFRONT : resource.h
  • ID_OBJECT_NOFILL : resource.h
  • ID_OBJECT_NOLINE : resource.h
  • ID_OBJECT_POPUP_MENU : resource.h
  • ID_OBJECT_PROPERTIES : resource.h
  • ID_OBJECT_RESETSIZE : resource.h
  • ID_OBJECT_SAVETOSTREAM : Resource.H
  • ID_OBJECT_STYLES : resource.h
  • ID_OBJECT_TRACK_SIZE : resource.h
  • ID_OBJECT_VERIFY : resource.h
  • ID_OBJECTS_SHOWCONTAINERS : resource.h
  • ID_OBJECTS_SHOWCONTROLS : resource.h
  • ID_OBJECTS_SHOWINSERTABLE : resource.h
  • ID_OBJECTS_SHOWINTERNAL : resource.h
  • ID_OBJECTS_SHOWNOTINSERTABLEOBJECTS : resource.h
  • ID_OBJECTS_SHOWOLE10OBJECTS : resource.h
  • ID_OBJECTS_SHOWTYPELIBS : resource.h
  • ID_OBJECTVIEW : resource.h
  • ID_OLE_CHANGE_SOURCE : resource.h
  • ID_OLE_VERB_POPUP : resource.h
  • ID_OPEN : resource.h
  • ID_OPTION_NOW : resource.h
  • ID_OPTION_RATE : resource.h
  • ID_OPTIONS_CONTAINEROPTIONS : Resource.H
  • ID_OPTIONS_CONTAINERPROPERTIES : Resource.H
  • ID_OPTIONS_DESIGNMODE : Resource.H
  • ID_OPTIONS_FONT : resource.h
  • ID_OPTIONS_FREEZEEVENTS : Resource.H
  • ID_OPTIONS_LOGGING : Resource.H
  • ID_OPTIONS_OPTION1 : resource.h
  • ID_OPTIONS_OPTION2 : resource.h
  • ID_OPTIONS_OPTION3 : resource.h
  • ID_OPTIONS_SLOWDRAWING : Resource.H
  • ID_OPTIONS_SPEED : resource.h
  • ID_OPTIONS_TRACELEVEL_NONE : Resource.H
  • ID_OPTIONS_TRACELEVEL_NORMAL : Resource.H
  • ID_OPTIONS_TRACELEVEL_VERBOSE : Resource.H
  • ID_OPTIONS_TWOPASSDRAWING : Resource.H
  • ID_OPTIONS_USERMODE : Resource.H
  • ID_OUTLOOK_ADD_PAGE : resource.h
  • ID_OUTLOOK_ANIMATION : resource.h
  • ID_OUTLOOK_DELETE_PAGE : resource.h
  • ID_OUTLOOK_RENAME_PAGE : resource.h
  • ID_OUTLOOK_SHOW_BACKGROUND : resource.h
  • ID_OUTLOOK_SHOW_TEXT_LABELS : resource.h
  • ID_OUTPUT_GOTO_ERROR : Resource.h
  • ID_OUTPUTLOGEDIT_CLEAR : Resource.H
  • ID_OUTPUTLOGEDIT_COPY : Resource.H
  • ID_OUTPUTLOGEDIT_HIDE : Resource.H
  • ID_PAGE_SETUP : resource.h
  • ID_PAGELAYOUT_ARRANGE_ALIGN : Resource.h
  • ID_PAGELAYOUT_ARRANGE_BRINGTOFRONT : Resource.h
  • ID_PAGELAYOUT_ARRANGE_GROUP : Resource.h
  • ID_PAGELAYOUT_ARRANGE_POSITION : Resource.h
  • ID_PAGELAYOUT_ARRANGE_ROTATE : Resource.h
  • ID_PAGELAYOUT_ARRANGE_SENDTOBACK : Resource.h
  • ID_PAGELAYOUT_ARRANGE_TEXTWRAPPING : Resource.h
  • ID_PAGELAYOUT_BRINGFORWARD : Resource.h
  • ID_PAGELAYOUT_BRINGINFRONTOFTEXT : Resource.h
  • ID_PAGELAYOUT_BRINGTOFRONT : Resource.h
  • ID_PAGELAYOUT_COLORS : Resource.h
  • ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS : Resource.h
  • ID_PAGELAYOUT_COLUMNS : Resource.h
  • ID_PAGELAYOUT_COLUMNS_LEFT : Resource.h
  • ID_PAGELAYOUT_COLUMNS_MORECOLUMNS : Resource.h
  • ID_PAGELAYOUT_COLUMNS_ONE : Resource.h
  • ID_PAGELAYOUT_COLUMNS_RIGHT : Resource.h
  • ID_PAGELAYOUT_COLUMNS_THREE : Resource.h
  • ID_PAGELAYOUT_COLUMNS_TWO : Resource.h
  • ID_PAGELAYOUT_EFFECTS : Resource.h
  • ID_PAGELAYOUT_EFFECTS_ACADEMIC : Resource.h
  • ID_PAGELAYOUT_EFFECTS_ATRIUM : Resource.h
  • ID_PAGELAYOUT_EFFECTS_CIVIC : Resource.h
  • ID_PAGELAYOUT_EFFECTS_OFFICE : Resource.h
  • ID_PAGELAYOUT_FONTS : Resource.h
  • ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS : Resource.h
  • ID_PAGELAYOUT_INDENT_LEFT : Resource.h
  • ID_PAGELAYOUT_INDENT_RIGHT : Resource.h
  • ID_PAGELAYOUT_MARGINS : Resource.h
  • ID_PAGELAYOUT_MARGINS_CUSTOMMARGINS : Resource.h
  • ID_PAGELAYOUT_MARGINS_MIRRORED : Resource.h
  • ID_PAGELAYOUT_MARGINS_MODERATE : Resource.h
  • ID_PAGELAYOUT_MARGINS_NARROW : Resource.h
  • ID_PAGELAYOUT_MARGINS_NORMAL : Resource.h
  • ID_PAGELAYOUT_MARGINS_WIDE : Resource.h
  • ID_PAGELAYOUT_MORELAYOUTOPTIONS : Resource.h
  • ID_PAGELAYOUT_ORIENTATION : Resource.h
  • ID_PAGELAYOUT_ORIENTATION_LANDSCAPE : Resource.h
  • ID_PAGELAYOUT_ORIENTATION_PORTRAIT : Resource.h
  • ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS : Resource.h
  • ID_PAGELAYOUT_PAGEBACKGROUND_PAGECOLOR : Resource.h
  • ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_BREAKS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_COLUMNS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_HYPHENATION : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_LINENUMBERS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_MARGINS : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_ORIENTATTION : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_SIZE : Resource.h
  • ID_PAGELAYOUT_PAGESETUP_SIZE_MOREPAPERSIZES : Resource.h
  • ID_PAGELAYOUT_SENDBACKWARD : Resource.h
  • ID_PAGELAYOUT_SENDBEHINDTEXT : Resource.h
  • ID_PAGELAYOUT_SENDTOBACK : Resource.h
  • ID_PAGELAYOUT_SPACE_AFTER : Resource.h
  • ID_PAGELAYOUT_SPACE_BEFORE : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_BEHINDTEXT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_EDITWRAPPOINTS : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_INFRONTOFTEXT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_INLINEWITHTEXT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_SQUARE : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_THROUGH : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_TIGHT : Resource.h
  • ID_PAGELAYOUT_TEXTWRAPPING_TOPANDBOTTOM : Resource.h
  • ID_PAGELAYOUT_THEMES : Resource.h
  • ID_PAGELAYOUT_THEMES_BROWSEFORTHEMES : Resource.h
  • ID_PAGELAYOUT_THEMES_MORETHEMES : Resource.h
  • ID_PAGELAYOUT_THEMES_RESETFROMTEMPLATE : Resource.h
  • ID_PAGELAYOUT_THEMES_SAVECURRENTTHEME : Resource.h
  • ID_PAL_AVI : resource.h
  • ID_PAL_BUTTON : resource.h
  • ID_PAL_COMBO : resource.h
  • ID_PAL_CURSOR : resource.h
  • ID_PAL_EDIT : resource.h
  • ID_PAL_FRAME : resource.h
  • ID_PAL_HSCROLL : resource.h
  • ID_PAL_KEY : resource.h
  • ID_PAL_LIST : resource.h
  • ID_PAL_LIST_CTRL : resource.h
  • ID_PAL_PICTURE : resource.h
  • ID_PAL_PROGRESS : resource.h
  • ID_PAL_RADIO : resource.h
  • ID_PAL_SLIDER : resource.h
  • ID_PAL_SPIN : resource.h
  • ID_PAL_STATIC : resource.h
  • ID_PAL_TAB : resource.h
  • ID_PAL_VSCROLL : resource.h
  • ID_PALETTE_AIRBRUSH : resource.h
  • ID_PALETTE_BASE : resource.h
  • ID_PALETTE_BRUSH : resource.h
  • ID_PALETTE_ERASE : resource.h
  • ID_PALETTE_EYEDROP : resource.h
  • ID_PALETTE_FILL : resource.h
  • ID_PALETTE_FRAME : resource.h
  • ID_PALETTE_LINE : resource.h
  • ID_PALETTE_OVAL : resource.h
  • ID_PALETTE_PEN : resource.h
  • ID_PALETTE_RECTANGLE : resource.h
  • ID_PALETTE_SELECT : resource.h
  • ID_PALETTE_ZOOM : resource.h
  • ID_PALETTEBAR : resource.h
  • ID_PALETTEBRUSH : resource.h
  • ID_PALETTEERASE : resource.h
  • ID_PALETTEEYEDROP : resource.h
  • ID_PALETTELINE : resource.h
  • ID_PALETTEMAG : resource.h
  • ID_PALETTEOVAL : resource.h
  • ID_PALETTEPAINT : resource.h
  • ID_PALETTEPEN : resource.h
  • ID_PALETTERECT : resource.h
  • ID_PALETTEROUND : resource.h
  • ID_PALETTESELECT : resource.h
  • ID_PALETTESPRAY : resource.h
  • ID_PARA_ALIGNLEFT : Resource.h
  • ID_PARA_ALIGNRIGHT : Resource.h
  • ID_PARA_BORDER : Resource.h
  • ID_PARA_BULLETS : Resource.h
  • ID_PARA_CENTER : resource.h , Resource.h , resource.h
  • ID_PARA_CHANGE_LIST_LEVEL : Resource.h
  • ID_PARA_DECREASEINDENT : Resource.h
  • ID_PARA_DEFINENEWBULLET : Resource.h
  • ID_PARA_DEFINENEWLISTSTYLE : Resource.h
  • ID_PARA_DEFINENEWMULTILEVELLIST : Resource.h
  • ID_PARA_DEFINENEWNUMBERFORMAT : Resource.h
  • ID_PARA_ENDLINEMARK : Resource.h
  • ID_PARA_INCREASEINDENT : Resource.h
  • ID_PARA_JUSTIFY : Resource.h
  • ID_PARA_LEFT : resource.h
  • ID_PARA_LINESPACING : Resource.h
  • ID_PARA_LINESPACING1 : Resource.h
  • ID_PARA_LINESPACING2 : Resource.h
  • ID_PARA_LINESPACING3 : Resource.h
  • ID_PARA_LINESPACING4 : Resource.h
  • ID_PARA_LINESPACING5 : Resource.h
  • ID_PARA_LINESPACING6 : Resource.h
  • ID_PARA_LINESPACINGAFTER : Resource.h
  • ID_PARA_LINESPACINGBEFORE : Resource.h
  • ID_PARA_LINESPACINGOPTIONS : Resource.h
  • ID_PARA_MULTILEVEL : Resource.h
  • ID_PARA_MULTYLEVEL : Resource.h
  • ID_PARA_NUMBERING : Resource.h
  • ID_PARA_PAGESETUP : Resource.h
  • ID_PARA_RIGHT : resource.h
  • ID_PARA_SETNUMBERINGVALUE : Resource.h
  • ID_PARA_SHADING : Resource.h
  • ID_PARA_SORT : Resource.h
  • ID_PASTE : resource.h
  • ID_PAUSEDRAWING : resource.h
  • ID_PEN_BACKSPACE : resource.h
  • ID_PEN_LENS : resource.h
  • ID_PEN_NEWLINE : resource.h
  • ID_PEN_PERIOD : resource.h
  • ID_PEN_SPACE : resource.h
  • ID_PEN_TAB : resource.h
  • ID_PEN_THICK_OR_THIN : resource.h
  • ID_PEN_TOGGLE : resource.h
  • ID_PEN_WIDTHS : resource.h
  • ID_PENCIL : resource.h
  • ID_PENWIDTH : resource.h
  • ID_PERCENT_DONE : resource.h
  • ID_PICTURE_FORMAT_TOOLS_BRIGHTNESS : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_CHANGE : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_COMPRESS : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_CONTRAST : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_RECOLOR : Resource.h
  • ID_PICTURE_FORMAT_TOOLS_RESET : Resource.h
  • ID_POINTARRAY : resource.h
  • ID_POPUP_DELETEITEM : resource.h
  • ID_POPUP_DESKTOPALERTSETTINGS : resource.h
  • ID_POPUP_DISABLENEWDESKTOPALERT : resource.h
  • ID_POPUP_FLAGITEM : resource.h
  • ID_POPUP_MARKASREAD : resource.h
  • ID_POPUP_MENU : resource.h
  • ID_POPUP_OPENITEM : resource.h
  • ID_PREV : resource.h
  • ID_PRINT : resource.h
  • ID_PROGRESS_TIMER : StatusBarDemoView.cpp
  • ID_PROPERIES1 : Resource.h
  • ID_PROPERIES2 : Resource.h
  • ID_PROPERTIES : Resource.h
  • ID_PROPERTY_SHEET_WITH_PREVIEW : resource.h
  • ID_PURPLE : resource.h
  • ID_RECALC_DONE : resource.h
  • ID_RECALC_SPEED : resource.h
  • ID_RECALCULATE_NOW : resource.h
  • ID_RECTANGLE : resource.h
  • ID_RED : resource.h
  • ID_REFERENCES_ADDTEXT : Resource.h
  • ID_REFERENCES_ADDTEXT_LEVEL1 : Resource.h
  • ID_REFERENCES_ADDTEXT_LEVEL2 : Resource.h
  • ID_REFERENCES_ADDTEXT_LEVEL3 : Resource.h
  • ID_REFERENCES_ADDTEXT_NOTSHOWNIN : Resource.h
  • ID_REFERENCES_CAPTIONS_CROSSREFERENCE : Resource.h
  • ID_REFERENCES_CAPTIONS_INSERTCAPTION : Resource.h
  • ID_REFERENCES_CAPTIONS_INSERTTOF : Resource.h
  • ID_REFERENCES_CAPTIONS_UPDATETABLE : Resource.h
  • ID_REFERENCES_CB_INSERTBIBLIOGRAPHY : Resource.h
  • ID_REFERENCES_CB_MANAGESOURCES : Resource.h
  • ID_REFERENCES_ENDNOTE_NEXT : Resource.h
  • ID_REFERENCES_ENDNOTE_PREVIOUS : Resource.h
  • ID_REFERENCES_FOOTNOTE_NEXT : Resource.h
  • ID_REFERENCES_FOOTNOTE_PREVIOUS : Resource.h
  • ID_REFERENCES_FOOTNOTES_INSERTENDNOTE : Resource.h
  • ID_REFERENCES_FOOTNOTES_INSERTFOOTNOTE : Resource.h
  • ID_REFERENCES_FOOTNOTES_NEXTFOOTNOTE : Resource.h
  • ID_REFERENCES_FOOTNOTES_SHOWNOTES : Resource.h
  • ID_REFERENCES_INDEX_INSERTINDEX : Resource.h
  • ID_REFERENCES_INDEX_MARKENTRY : Resource.h
  • ID_REFERENCES_INDEX_UPDATEINDEX : Resource.h
  • ID_REFERENCES_INSERTCITATION_ADDNEWPLACEHOLDER : Resource.h
  • ID_REFERENCES_INSERTCITATION_ADDNEWSOURCE : Resource.h
  • ID_REFERENCES_INSERTCITATION_SEARCHLIBRARIES : Resource.h
  • ID_REFERENCES_STYLE : Resource.h
  • ID_REFERENCES_TA_INSERTTOA : Resource.h
  • ID_REFERENCES_TA_MARKCITATION : Resource.h
  • ID_REFERENCES_TA_UPDATETABLE : Resource.h
  • ID_REFERENCES_TC_UPDATETABLE : Resource.h
  • ID_REMOVE : resource.h
  • ID_REMOVERING : resource.h
  • ID_REMOVEWHEEL : resource.h
  • ID_RESET_PAGE : resource.h
  • ID_RESOURCE_NEWACCELERATORTABLE : resource.h
  • ID_RESOURCE_NEWBITMAP : resource.h
  • ID_RESOURCE_NEWCURSOR : resource.h
  • ID_RESOURCE_NEWICON : resource.h
  • ID_RESOURCE_NEWMENU : resource.h
  • ID_RESOURCE_NEWSTRINGTABLE : resource.h
  • ID_RESOURCE_NEWVERSION : resource.h
  • ID_RESOURCE_OPEN : Resource.h
  • ID_RESOURCE_OPEN_BINARY : Resource.h
  • ID_RETURN : resource.h
  • ID_REVIEW_CHANGES_ACCEPT : Resource.h
  • ID_REVIEW_CHANGES_ACCEPT_ALL : Resource.h
  • ID_REVIEW_CHANGES_ACCEPT_ALLSHOWN : Resource.h
  • ID_REVIEW_CHANGES_ACCEPT_CHANGE : Resource.h
  • ID_REVIEW_CHANGES_NEXT : Resource.h
  • ID_REVIEW_CHANGES_PREVIOUS : Resource.h
  • ID_REVIEW_CHANGES_REJECT : Resource.h
  • ID_REVIEW_CHANGES_REJECT_ALL : Resource.h
  • ID_REVIEW_CHANGES_REJECT_ALLSHOWN : Resource.h
  • ID_REVIEW_CHANGES_REJECT_CHANGE : Resource.h
  • ID_REVIEW_COMMENTS_DELETE : Resource.h
  • ID_REVIEW_COMMENTS_DELETE_ALL : Resource.h
  • ID_REVIEW_COMMENTS_DELETE_ALLSHOWN : Resource.h
  • ID_REVIEW_COMMENTS_NEWCOMMENT : Resource.h
  • ID_REVIEW_COMMENTS_NEXT : Resource.h
  • ID_REVIEW_COMMENTS_PREVIOUS : Resource.h
  • ID_REVIEW_COMPARE_COMPARE : Resource.h
  • ID_REVIEW_COMPARE_COMPARE_COMBINE : Resource.h
  • ID_REVIEW_COMPARE_COMPARE_COMPARE : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_HIDESOURCE : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_SHOWBOTH : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_SHOWORIGINAL : Resource.h
  • ID_REVIEW_COMPARE_SHOWSOURCE_SHOWREVISED : Resource.h
  • ID_REVIEW_PROOFING_RESEARCH : Resource.h
  • ID_REVIEW_PROOFING_SETLANGUAGE : Resource.h
  • ID_REVIEW_PROOFING_SPELLINGGRAMMAR : Resource.h
  • ID_REVIEW_PROOFING_THESAURUS : Resource.h
  • ID_REVIEW_PROOFING_TRANSLATE : Resource.h
  • ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP : Resource.h
  • ID_REVIEW_PROOFING_WORDCOUNT : Resource.h
  • ID_REVIEW_PROTECT : Resource.h
  • ID_REVIEW_TRACKCHANGES_CHANGETRACKINGOPTIONS : Resource.h
  • ID_REVIEW_TRACKING_BALLOONS : Resource.h
  • ID_REVIEW_TRACKING_CHANGEUSERNAME : Resource.h
  • ID_REVIEW_TRACKING_DISPLAYFORREVIEW : Resource.h
  • ID_REVIEW_TRACKING_REVIEWINGPANE : Resource.h
  • ID_REVIEW_TRACKING_REVIEWINGPANE_HORIZONTAL : Resource.h
  • ID_REVIEW_TRACKING_REVIEWINGPANE_VERTICAL : Resource.h
  • ID_REVIEW_TRACKING_SHOW_ALLREVIEWERS : Resource.h
  • ID_REVIEW_TRACKING_SHOW_COMMENTS : Resource.h
  • ID_REVIEW_TRACKING_SHOW_FORMATTING : Resource.h
  • ID_REVIEW_TRACKING_SHOW_INK : Resource.h
  • ID_REVIEW_TRACKING_SHOW_INSERTIONSANDDELETIONS : Resource.h
  • ID_REVIEW_TRACKING_SHOW_MARKUP : Resource.h
  • ID_REVIEW_TRACKING_SHOW_MARKUPAREAHIGHLIGHT : Resource.h
  • ID_REVIEW_TRACKING_SHOWALLREVISIONS : Resource.h
  • ID_REVIEW_TRACKING_SHOWONLYCOOMENTS : Resource.h
  • ID_REVIEW_TRACKING_SHOWREVISIONS : Resource.h
  • ID_REVIEW_TRACKING_TRACKCHANGES : Resource.h
  • ID_RIBBON_A : resource.h
  • ID_RIBBON_BTN_1 : resource.h
  • ID_RIBBON_BTN_2 : resource.h
  • ID_RIBBON_BTN_3 : resource.h
  • ID_RIBBON_BTN_4 : resource.h
  • ID_RIBBON_BTN_5 : resource.h
  • ID_RIBBON_BTN_6 : resource.h
  • ID_RIBBON_BTN_7 : resource.h
  • ID_RIBBON_BTN_8 : resource.h
  • ID_RIBBON_BTN_9 : resource.h
  • ID_RIBBON_CBTN_1 : resource.h
  • ID_RIBBON_CBTN_10 : resource.h
  • ID_RIBBON_CBTN_2 : resource.h
  • ID_RIBBON_CBTN_3 : resource.h
  • ID_RIBBON_CBTN_4 : resource.h
  • ID_RIBBON_CBTN_5 : resource.h
  • ID_RIBBON_CBTN_6 : resource.h
  • ID_RIBBON_CBTN_7 : resource.h
  • ID_RIBBON_CBTN_8 : resource.h
  • ID_RIBBON_CBTN_9 : resource.h
  • ID_RIBBON_EBTN_1 : resource.h
  • ID_RIBBON_EBTN_2 : resource.h
  • ID_RIBBON_EBTN_3 : resource.h
  • ID_RIBBON_EBTN_4 : resource.h
  • ID_RIBBON_EBTN_5 : resource.h
  • ID_RIBBON_EBTN_6 : resource.h
  • ID_RIBBON_EBTN_7 : resource.h
  • ID_RIBBON_EBTN_8 : resource.h
  • ID_RIBBON_EBTN_9 : resource.h
  • ID_RIBBON_GBTN_1 : resource.h
  • ID_RIBBON_GBTN_10 : resource.h
  • ID_RIBBON_GBTN_11 : resource.h
  • ID_RIBBON_GBTN_2 : resource.h
  • ID_RIBBON_GBTN_3 : resource.h
  • ID_RIBBON_GBTN_4 : resource.h
  • ID_RIBBON_GBTN_5 : resource.h
  • ID_RIBBON_GBTN_6 : resource.h
  • ID_RIBBON_GBTN_7 : resource.h
  • ID_RIBBON_GBTN_8 : resource.h
  • ID_RIBBON_GBTN_9 : resource.h
  • ID_RIBBON_MBTN_1 : resource.h
  • ID_RIBBON_MBTN_2 : resource.h
  • ID_RIBBON_MENU_ITEM_1 : resource.h
  • ID_RIBBON_MENU_ITEM_2 : resource.h
  • ID_RIBBON_MENU_ITEM_3 : resource.h
  • ID_RIBBON_MENU_ITEM_4 : resource.h
  • ID_RIBBON_MENU_ITEM_5 : resource.h
  • ID_RIBBON_MENU_ITEM_6 : resource.h
  • ID_RIBBON_OBTN_1 : resource.h
  • ID_RIBBON_OBTN_10 : resource.h
  • ID_RIBBON_OBTN_11 : resource.h
  • ID_RIBBON_OBTN_2 : resource.h
  • ID_RIBBON_OBTN_3 : resource.h
  • ID_RIBBON_OBTN_4 : resource.h
  • ID_RIBBON_OBTN_5 : resource.h
  • ID_RIBBON_OBTN_6 : resource.h
  • ID_RIBBON_OBTN_7 : resource.h
  • ID_RIBBON_OBTN_8 : resource.h
  • ID_RIBBON_OBTN_9 : resource.h
  • ID_RIBBON_PBTN_1 : resource.h
  • ID_RIBBON_PBTN_2 : resource.h
  • ID_RIBBON_PBTN_3 : resource.h
  • ID_RIBBON_PBTN_4 : resource.h
  • ID_RIBBON_PBTN_5 : resource.h
  • ID_RIBBON_SOURCE_CODE_1_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_1_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_1_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_2_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_2_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_3_4 : resource.h
  • ID_RIBBON_SOURCE_CODE_4_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_4_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_5_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_5_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_5_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_1 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_2 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_3 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_4 : resource.h
  • ID_RIBBON_SOURCE_CODE_6_5 : resource.h
  • ID_RIBBON_Z : resource.h
  • ID_ROOT_MENU1 : resource.h
  • ID_ROOT_MENU2 : resource.h
  • ID_ROUNDRECTANGLE : resource.h
  • ID_RULES_WIZARD : resource.h
  • ID_RUNMACRO : Resource.H
  • ID_SAVE : resource.h
  • ID_SAVE_DEBUG_CONF : resource.h
  • ID_SAVE_REGULAR_CONF : resource.h
  • ID_SECTION_FROMFILE : resource.h
  • ID_SECTION_REMOVE : resource.h
  • ID_SELECT : resource.h
  • ID_SELECTCOLOR : resource.h
  • ID_SEND_RECEIVE : resource.h
  • ID_SET_STYLE : Resource.h
  • ID_SET_TABSTOPS : resource.h
  • ID_SHORTCUT_1 : resource.h
  • ID_SHORTCUT_2 : resource.h
  • ID_SHORTCUT_3 : resource.h
  • ID_SHORTCUT_4 : resource.h
  • ID_SHORTCUTS_PANE_1 : resource.h
  • ID_SHORTCUTS_PANE_2 : resource.h
  • ID_SHORTCUTS_TREE : resource.h
  • ID_SHOW_FOLDERS_POPUP : resource.h
  • ID_SIMPLE_PROPERTY_SHEET : resource.h
  • ID_SINGLE_THREAD : resource.h
  • ID_SIZE_BASE : resource.h
  • ID_SIZE_DOUBLE : resource.h
  • ID_SIZE_FILL : resource.h
  • ID_SIZE_FULLSCREEN : resource.h
  • ID_SIZE_HALF : resource.h
  • ID_SIZE_ORIGINAL : resource.h
  • ID_SLIDER : resource.h
  • ID_SLOWDRAWING : Resource.H
  • ID_SMALLRING : resource.h
  • ID_SMALLWHEEL : resource.h
  • ID_SOLUTION_OPEN : Resource.h
  • ID_SOLUTION_OPEN_WITH : Resource.h
  • ID_SORT_MENU : Resource.h
  • ID_SORTING_GROUPBYTYPE : Resource.h
  • ID_SORTING_SORTALF : Resource.h
  • ID_SORTING_SORTBYACCESS : Resource.h
  • ID_SORTING_SORTBYTYPE : Resource.h
  • ID_SORTINGGROUP : resource.h
  • ID_SORTINGPROP : Resource.h
  • ID_SPEED_FAST : resource.h
  • ID_SPEED_SLOW : resource.h
  • ID_SPLITBUTTONMENU_VALIDATEALL : resource.h
  • ID_SPLITBUTTONMENU_VALIDATEIPV4 : resource.h
  • ID_SPLITBUTTONMENU_VALIDATEIPV6 : resource.h
  • ID_SPLITBUTTONMENU_VALIDATENAMED : resource.h
  • ID_STATUSBAR_COLUMN : Resource.h
  • ID_STATUSBAR_DRAFT : Resource.h
  • ID_STATUSBAR_FULL_SCREEN_READING : Resource.h
  • ID_STATUSBAR_LINE : Resource.h
  • ID_STATUSBAR_LINK : Resource.h
  • ID_STATUSBAR_MASTER_DOCUMENT_TOOLS : Resource.h
  • ID_STATUSBAR_PAGE : Resource.h
  • ID_STATUSBAR_PANE1 : resource.h
  • ID_STATUSBAR_PANE2 : resource.h
  • ID_STATUSBAR_PANE_OBJECTCOUNT : resource.h
  • ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT : resource.h
  • ID_STATUSBAR_PRINTLAYOUT : Resource.h
  • ID_STATUSBAR_PROGRESS : Resource.h
  • ID_STATUSBAR_REFRESH : Resource.h
  • ID_STATUSBAR_SPELL : Resource.h
  • ID_STATUSBAR_WEBLAYOUT : Resource.h
  • ID_STATUSBAR_ZOOM : Resource.h
  • ID_STATUSBAR_ZOOM_SLIDER : Resource.h
  • ID_STOP_HIGHLIGHTING : Resource.h
  • ID_STRINGLIST : resource.h
  • ID_STYLE_BASE : resource.h
  • ID_STYLE_CENTERED : resource.h
  • ID_STYLE_JUSTIFIED : resource.h
  • ID_STYLE_LEFT : resource.h
  • ID_STYLE_RIGHT : resource.h
  • ID_STYLECHANGE_COLORS : Resource.h
  • ID_STYLECHANGE_FONTS : Resource.h
  • ID_STYLECHANGE_SETDEFAULT : Resource.h
  • ID_STYLECHANGE_STYLESET : Resource.h
  • ID_TABLE_BANDEDCOLUMNS : Resource.h
  • ID_TABLE_BANDEDROWS : Resource.h
  • ID_TABLE_CONVERTTOTABLE : Resource.h
  • ID_TABLE_DELETECELLS : resource.h
  • ID_TABLE_DELETECOLUMNS : resource.h
  • ID_TABLE_DELETEROWS : resource.h
  • ID_TABLE_DRAWTABLE : Resource.h
  • ID_TABLE_EXCELSPREADSHEET : Resource.h
  • ID_TABLE_FIRSTCOLUMN : Resource.h
  • ID_TABLE_HEADERROW : Resource.h
  • ID_TABLE_INSERT : resource.h
  • ID_TABLE_INSERTCELL : resource.h
  • ID_TABLE_INSERTCOLUMN : resource.h
  • ID_TABLE_INSERTROW : resource.h
  • ID_TABLE_INSERTTABLE : resource.h
  • ID_TABLE_LASTCOLUMN : Resource.h
  • ID_TABLE_MERGECELLS : resource.h
  • ID_TABLE_OF_CONTENTS : Resource.h
  • ID_TABLE_QUICKTABLES : Resource.h
  • ID_TABLE_SPLITCELL : resource.h
  • ID_TABLE_TABLE : Resource.h
  • ID_TABLE_TOTALROW : Resource.h
  • ID_TASK1 : resource.h
  • ID_TASK2 : resource.h
  • ID_TASK3 : resource.h
  • ID_TASK4 : resource.h
  • ID_TASK5 : resource.h
  • ID_TASK6 : resource.h
  • ID_TASK7 : resource.h
  • ID_TASK8 : resource.h
  • ID_TASK9 : resource.h
  • ID_TBSTYLEBUTTON : resource.h
  • ID_TBSTYLECHECKGROUP : resource.h
  • ID_TBSTYLETOOLTIPS : resource.h
  • ID_TBSTYLETOOLTIPS2 : resource.h
  • ID_TBSTYLEWRAPABLE : resource.h
  • ID_THREAD_10NEWBALLS : resource.h
  • ID_THREAD_10NEWLINES : resource.h
  • ID_THREAD_10NEWRECTANGLES : resource.h
  • ID_THREAD_25NEWBALLS : resource.h
  • ID_THREAD_25NEWLINES : resource.h
  • ID_THREAD_25NEWRECTANGLES : resource.h
  • ID_THREAD_KILLTHREADS : resource.h
  • ID_THREAD_KILLTHREADSSLOW : resource.h
  • ID_THREAD_NEWBALL : resource.h
  • ID_THREAD_NEWLINE : resource.h
  • ID_THREAD_NEWRECTANGLE : resource.h
  • ID_THREE_COLUMNS : resource.h
  • ID_TIME : resource.h
  • ID_TIMERTICK : resource.h
  • ID_TINYWHEEL : resource.h
  • ID_TOGGLE_INSERT : resource.h
  • ID_TOOLBAR_CUSTOMIZE : Resource.h
  • ID_TOOLBAR_EDITING : resource.h
  • ID_TOOLBARS_BROWSE : resource.h
  • ID_TOOLBARS_DEBUG : resource.h
  • ID_TOOLBARS_EDIT : resource.h
  • ID_TOOLBARS_MAIN : resource.h
  • ID_TOOLBARS_PALETTE : resource.h
  • ID_TOOLBARS_RESOURCE : resource.h
  • ID_TOOLBARSTYLE : resource.h
  • ID_TOOLBARSTYLE2 : resource.h
  • ID_TOOLS_CONNECT_TO_DATABASE : Resource.h
  • ID_TOOLS_DEBUG_PROCESSES : Resource.h
  • ID_TOOLS_ENTRY : Resource.h , resource.h , Resource.h
  • ID_TOOLS_MACRO : Resource.h
  • ID_TOOLS_MACROS : Resource.H
  • ID_TOOLS_MAKEBW : resource.h
  • ID_TOOLS_OLEVIEW : Resource.H
  • ID_TOOLS_OPTIONS : resource.h , Resource.h , resource.h , Resource.h
  • ID_TOOLS_REGEDIT : Resource.H
  • ID_TOOLS_RUNSCRIPT : Resource.H
  • ID_TOOLS_TOOLBAR : resource.h
  • ID_TRACEWIDTH : resource.h
  • ID_TREE_COLLAPSEBRANCH : resource.h
  • ID_TREE_CTRL : resource.h
  • ID_TREE_EXPANDALL : resource.h
  • ID_TREE_EXPANDBRANCH : resource.h
  • ID_TREE_EXPANDONELEVEL : resource.h
  • ID_TREEVIEW : tlbtree.h , resource.h
  • ID_TWO_COLUMNS : resource.h
  • ID_TWOPASSDRAWING : Resource.H
  • ID_TYPEDARRAY : resource.h
  • ID_TYPEDLIST : resource.h
  • ID_TYPEDPTRARRAY : resource.h
  • ID_TYPEDPTRMAP : resource.h
  • ID_UI_THREAD : resource.h
  • ID_USER_TOOL1 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL10 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL2 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL3 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL4 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL5 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL6 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL7 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL8 : Resource.h , resource.h , Resource.h
  • ID_USER_TOOL9 : Resource.h , resource.h , Resource.h
  • ID_VERYLARGERING : resource.h
  • ID_VERYLARGEWHEEL : resource.h
  • ID_VIEW_ADDRESS_BAR : Resource.h
  • ID_VIEW_ADVANCED_TOOLBAR : resource.h
  • ID_VIEW_APP_LOOK : resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2000 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2003 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_1 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_2 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_3 : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_2007_4 : resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_SCENIC : resource.h
  • ID_VIEW_APPLOOK_VS2005 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_WIN7 : Resource.h
  • ID_VIEW_APPLOOK_WIN_XP : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_APPLOOK_XP : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_ARRANGE : Resource.h
  • ID_VIEW_ARRANGEALL : Resource.h
  • ID_VIEW_BACK : resource.h
  • ID_VIEW_BUILD_TOOLBAR : Resource.h
  • ID_VIEW_CAPTIONBAR : resource.h
  • ID_VIEW_CB_CAPTION : Resource.h
  • ID_VIEW_CLASS : Resource.h
  • ID_VIEW_CLASSIDS : resource.h
  • ID_VIEW_CLIENTWIDTHSEL : resource.h
  • ID_VIEW_COMPARE : Resource.h
  • ID_VIEW_CONTAINERINFO : Resource.H
  • ID_VIEW_CUSTOMIZE : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_DETAILSMODE : resource.h
  • ID_VIEW_DLGBAR : resource.h
  • ID_VIEW_DLGBARTOP : resource.h
  • ID_VIEW_DOCUMENT_TAB : Resource.h
  • ID_VIEW_DOCUMENTMAP : Resource.h
  • ID_VIEW_DRAFT : Resource.h
  • ID_VIEW_DYNAMICHELP : Resource.h
  • ID_VIEW_EDIT_TOOLBAR : Resource.h
  • ID_VIEW_EDITCTRL : Resource.h
  • ID_VIEW_EDITINGTOOLBAR : resource.h
  • ID_VIEW_EVENTLOG : Resource.H
  • ID_VIEW_EXPLORERBAR : Resource.h
  • ID_VIEW_FILE : Resource.h
  • ID_VIEW_FIND_NEXT : resource.h
  • ID_VIEW_FOLDER_LIST : resource.h
  • ID_VIEW_FOLDERS : Resource.h
  • ID_VIEW_FONTS_LARGE : Resource.h
  • ID_VIEW_FONTS_LARGEST : Resource.h
  • ID_VIEW_FONTS_MEDIUM : Resource.h
  • ID_VIEW_FONTS_SMALL : Resource.h
  • ID_VIEW_FONTS_SMALLEST : Resource.h
  • ID_VIEW_FORCE_GRADIENT : Resource.h
  • ID_VIEW_FORMATBAR : resource.h
  • ID_VIEW_FORWARD : resource.h
  • ID_VIEW_FULL_SCREEN : resource.h
  • ID_VIEW_FULLSCREEN : Resource.h , resource.h
  • ID_VIEW_GOTO_CALENDAR : resource.h
  • ID_VIEW_GOTO_DRAFTS : resource.h
  • ID_VIEW_GOTO_FAVORITES : resource.h
  • ID_VIEW_GOTO_HOME : resource.h
  • ID_VIEW_GOTO_INBOX : resource.h
  • ID_VIEW_GOTO_JOURNAL : resource.h
  • ID_VIEW_GOTO_NOTES : resource.h
  • ID_VIEW_GOTO_OUTBOX : resource.h
  • ID_VIEW_GOTO_PERSONAL : resource.h
  • ID_VIEW_GOTO_SENTITEMS : resource.h
  • ID_VIEW_GOTO_TASKS : resource.h
  • ID_VIEW_GRID : resource.h
  • ID_VIEW_GRIDLINES : Resource.h
  • ID_VIEW_GROUPBYTYPEKIND : resource.h
  • ID_VIEW_HOME : resource.h
  • ID_VIEW_INFOBAR : Resource.h
  • ID_VIEW_LARGEICONS : resource.h
  • ID_VIEW_LINKS_BAR : Resource.h
  • ID_VIEW_LISTMODE : resource.h
  • ID_VIEW_LONG : resource.h
  • ID_VIEW_MACROBAR : Resource.H
  • ID_VIEW_MACROS : Resource.h
  • ID_VIEW_MAIL_TOOLBAR : resource.h
  • ID_VIEW_MDI_TABS : Resource.h
  • ID_VIEW_MESSAGEBAR : Resource.h
  • ID_VIEW_MY_COMPUTER : resource.h
  • ID_VIEW_NEWWINDOW : Resource.h
  • ID_VIEW_NOTIFICATIONLOG : Resource.H
  • ID_VIEW_OPTIONS : resource.h
  • ID_VIEW_OUTLINE : Resource.h
  • ID_VIEW_OUTLOOKBAR : resource.h
  • ID_VIEW_OUTLOOKBAR2003 : resource.h
  • ID_VIEW_OUTPUT : resource.h , Resource.h
  • ID_VIEW_OUTPUT_WINDOW : Resource.H
  • ID_VIEW_PAPERCOLOR : resource.h
  • ID_VIEW_PAUSE_BLIT : Resource.h
  • ID_VIEW_PAUSE_BLUR : Resource.h
  • ID_VIEW_PAUSE_SWARM : Resource.h
  • ID_VIEW_PREVIEW_PANE : resource.h
  • ID_VIEW_PRINTLAYOUT : Resource.h
  • ID_VIEW_PROPERTIES : Resource.h
  • ID_VIEW_REFRESH : Resource.h , resource.h , Resource.h
  • ID_VIEW_RESETWINDOW : Resource.h
  • ID_VIEW_RESOURCE : Resource.h
  • ID_VIEW_ROWDETAILS : resource.h
  • ID_VIEW_RTL : Resource.h
  • ID_VIEW_RULER : resource.h , Resource.h , resource.h
  • ID_VIEW_SETHANDLESIZE : resource.h
  • ID_VIEW_SETMINIMUMSIZE : resource.h
  • ID_VIEW_SHORT : resource.h
  • ID_VIEW_SHOWALLINTERFACES : resource.h
  • ID_VIEW_SHOWOBJECTS : resource.h
  • ID_VIEW_SMALLICONS : resource.h
  • ID_VIEW_SOURCE : resource.h
  • ID_VIEW_SPLIT : Resource.h
  • ID_VIEW_STATEICONS : resource.h
  • ID_VIEW_STATUS_BAR : resource.h
  • ID_VIEW_STOP : Resource.h
  • ID_VIEW_SWITCHWINDOW : Resource.h
  • ID_VIEW_SYNCSCROLLING : Resource.h
  • ID_VIEW_TAB_FLAT_BORDERS : Resource.h
  • ID_VIEW_TASK_PANE : Resource.h , resource.h
  • ID_VIEW_TASKPANE : resource.h
  • ID_VIEW_TEST : resource.h
  • ID_VIEW_TEXTLABELS : Resource.h
  • ID_VIEW_THEME_TOOLBAR : resource.h
  • ID_VIEW_TOOLBAR : resource.h
  • ID_VIEW_TOOLBARS : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_TOOLS_PALETTE : resource.h
  • ID_VIEW_TRUMBNAILS : Resource.h
  • ID_VIEW_UP : resource.h
  • ID_VIEW_UPDATENOW : resource.h
  • ID_VIEW_USER_TOOLBAR1 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR10 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR2 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR3 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR4 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR5 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR6 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR7 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR8 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_USER_TOOLBAR9 : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_VIEW_VIEWS : Resource.h
  • ID_VIEW_WATCH : Resource.h
  • ID_VIEW_WEB : resource.h
  • ID_VIEW_WEB_TOOLBAR : resource.h
  • ID_VIEW_WEBLAYOUT : Resource.h
  • ID_VIEW_WORKSPACE : resource.h , Resource.h , resource.h
  • ID_VIEW_WORKSPACE2 : resource.h
  • ID_VIEW_ZOOM : Resource.h
  • ID_VIEW_ZOOM100 : resource.h
  • ID_VIEW_ZOOM125 : resource.h
  • ID_VIEW_ZOOM150 : resource.h
  • ID_VIEW_ZOOM175 : resource.h
  • ID_VIEW_ZOOM200 : resource.h
  • ID_VIEW_ZOOM25 : resource.h
  • ID_VIEW_ZOOM250 : resource.h
  • ID_VIEW_ZOOM300 : resource.h
  • ID_VIEW_ZOOM50 : resource.h
  • ID_VIEW_ZOOM75 : resource.h
  • ID_VIEW_ZOOM_100 : Resource.h
  • ID_VIEW_ZOOM_ONE_PAGE : Resource.h
  • ID_VIEW_ZOOM_PAGE_WIDTH : Resource.h
  • ID_VIEW_ZOOM_TWO_PAGES : Resource.h
  • ID_VIEW_ZOOMCUSTOM : resource.h
  • ID_WEB_ADDRESS : resource.h
  • ID_WEB_BACK : resource.h
  • ID_WEB_FIND : resource.h
  • ID_WEB_FORWARD : resource.h
  • ID_WEB_REFRESH : resource.h
  • ID_WEB_START : resource.h
  • ID_WEB_STOP : resource.h
  • ID_WHITE : resource.h
  • ID_WINDOW_CLOSE_ALL : Resource.h
  • ID_WINDOW_MANAGER : resource.h , Resource.h , resource.h , Resource.h , resource.h
  • ID_WINDOW_WINDOWS : resource.h
  • ID_WINDOWS_MENU : resource.h
  • ID_WORD_WRAP : resource.h
  • ID_WORKER_THREAD : resource.h
  • ID_WRITE_APPLYSTYLES : Resource.h
  • ID_WRITE_CHANGESTYLES : Resource.h
  • ID_WRITE_CLEARFORMATTING : Resource.h
  • ID_WRITE_CLIPBOARD : Resource.h
  • ID_WRITE_FONT : Resource.h
  • ID_WRITE_PARAGRAPH : Resource.h
  • ID_WRITE_PASTEASHYPERLINK : resource.h
  • ID_WRITE_QUICKSTYLES : Resource.h
  • ID_WRITE_SAVESTYLE : Resource.h
  • ID_WRITE_SELECT : Resource.h
  • ID_WRITE_STYLE : Resource.h
  • ID_YELLOW : resource.h
  • ID_ZOOMIN : resource.h
  • ID_ZOOMOUT : resource.h
  • IDABOUT : resource.h
  • IDB_0 : resource.h
  • IDB_1 : resource.h
  • IDB_2 : resource.h
  • IDB_3 : resource.h
  • IDB_4 : resource.h
  • IDB_5 : resource.h
  • IDB_6 : resource.h
  • IDB_7 : resource.h
  • IDB_8 : resource.h
  • IDB_9 : resource.h
  • IDB_ADVANCED_HC : resource.h
  • IDB_ANIMATION : resource.h
  • IDB_ANIMATION_HC : resource.h
  • IDB_AUTOMATION : resource.h
  • IDB_BACK : resource.h
  • IDB_BITMAP1 : resource.h
  • IDB_BITMAP48 : resource.h
  • IDB_BITMAP_PRINTER : resource.h
  • IDB_BITMAP_TT : resource.h
  • IDB_BMTREEBIRD : resource.h
  • IDB_BMTREEBIRDSELECTED : resource.h
  • IDB_BMTREEDOG : resource.h
  • IDB_BMTREEDOGSELECTED : resource.h
  • IDB_BMTREEFIRST : resource.h
  • IDB_BMTREEFISH : resource.h
  • IDB_BMTREEFISHSELECTED : resource.h
  • IDB_BMTREELAST : resource.h
  • IDB_BREAK : Resource.h
  • IDB_BTN1 : resource.h
  • IDB_BTN1_32 : resource.h
  • IDB_BTN1_HOT : resource.h
  • IDB_BTN1_HOT_32 : resource.h
  • IDB_BUILD24 : Resource.h
  • IDB_BULLETS : Resource.h
  • IDB_BUTTON : resource.h
  • IDB_BUTTONS : Resource.h , resource.h
  • IDB_CANCEL : resource.h
  • IDB_CAPTION : resource.h
  • IDB_CHART : Resource.h
  • IDB_CHART_DESIGN : Resource.h
  • IDB_CHART_DESIGNLARGE : Resource.h
  • IDB_CHART_FORMAT : Resource.h
  • IDB_CHART_FORMATLARGE : Resource.h
  • IDB_CHART_LAYOUT : Resource.h
  • IDB_CHART_LAYOUTLARGE : Resource.h
  • IDB_CHECK : resource.h , Resource.h
  • IDB_CHECK32 : resource.h
  • IDB_CHECKNO : resource.h
  • IDB_CHECKNO32 : resource.h
  • IDB_CIRC : resource.h
  • IDB_CLASS_VIEW : Resource.h
  • IDB_CLASS_VIEW_24 : Resource.h
  • IDB_CLEAR : resource.h
  • IDB_CLOCK : resource.h
  • IDB_CLOSE : resource.h
  • IDB_COLDTOOLBAR : Resource.h
  • IDB_CONTAINER : resource.h
  • IDB_CONTAINER32 : resource.h
  • IDB_CURRENT : Resource.h
  • IDB_DELETE : resource.h
  • IDB_DISABLEDTOOLBAR : Resource.h
  • IDB_DIVIDE : resource.h
  • IDB_DOWNBITMAP : resource.h
  • IDB_DYNAMICHELP : Resource.h
  • IDB_DYNAMICHELP24 : Resource.h
  • IDB_EDIT24 : Resource.h
  • IDB_EQUAL : resource.h
  • IDB_FILE_VIEW : Resource.h
  • IDB_FILE_VIEW24 : Resource.h
  • IDB_FILELARGE : Resource.h , resource.h
  • IDB_FILESMALL : Resource.h , resource.h
  • IDB_FIRST : oleview.h
  • IDB_FLAG : resource.h
  • IDB_FONTTYPE : resource.h
  • IDB_FORMATBAR : resource.h
  • IDB_FORMATBAR_BIG : resource.h
  • IDB_GLOBE : resource.h
  • IDB_HEADER_IMAGES : resource.h
  • IDB_HEADERPAT_1 : Resource.h
  • IDB_HEADERPAT_2 : Resource.h
  • IDB_HEADERPAT_3 : Resource.h
  • IDB_HEADERPAT_4 : Resource.h
  • IDB_HELPTOOLBAR_24 : Resource.h
  • IDB_HOTTOOLBAR : Resource.h
  • IDB_ICON1 : resource.h
  • IDB_ICON2 : resource.h
  • IDB_ICONS : resource.h
  • IDB_ICONS32 : resource.h
  • IDB_ICONS_LARGE : resource.h
  • IDB_ICONS_SMALL : resource.h
  • IDB_IFACEFOLDER : resource.h
  • IDB_IMAGE : Resource.h , resource.h
  • IDB_IMAGE_COLLECTION : Resource.h
  • IDB_IMAGE_COLLECTION_SMALL : Resource.h
  • IDB_IMAGELIST : resource.h
  • IDB_IMG_INTELLISENSE : Resource.h
  • IDB_IMG_INTELLISENSE_HC : Resource.h
  • IDB_INFO : Resource.h
  • IDB_INSERT : Resource.h
  • IDB_INSERTLARGE : Resource.h
  • IDB_INTERFACE : resource.h
  • IDB_LARGEICONS : resource.h
  • IDB_LAYOUT : Resource.h
  • IDB_LICENSED : resource.h
  • IDB_LINEWEIGHT : resource.h
  • IDB_LIST_IMAGES : resource.h
  • IDB_LOCALIZE : resource.h
  • IDB_LOGO : resource.h
  • IDB_MAIL_HC : resource.h
  • IDB_MAILINGS : Resource.h
  • IDB_MAILINGSLARGE : Resource.h
  • IDB_MAIN : Resource.h , resource.h
  • IDB_MAINFRAME_HC : resource.h
  • IDB_MENU16 : Resource.h
  • IDB_MENU256 : Resource.h
  • IDB_MENU_IMAGE_HC : resource.h
  • IDB_MENU_IMAGES : Resource.h
  • IDB_MENU_IMAGES_16 : Resource.h
  • IDB_MENU_LOGO : resource.h
  • IDB_MENUIMAGES : resource.h
  • IDB_MENUIMAGES24 : Resource.h
  • IDB_MINUS : resource.h
  • IDB_MSM_VIEW_BKGND : Resource.h
  • IDB_MULTI : Resource.h
  • IDB_NUM : Resource.h
  • IDB_OBJECT : resource.h
  • IDB_OBJECT32 : resource.h
  • IDB_OBJECT_CONTROL : resource.h
  • IDB_OBJECT_CONTROL32 : resource.h
  • IDB_OBJECT_INSERTABLE : resource.h
  • IDB_OBJECT_INSERTABLE10 : resource.h
  • IDB_OBJECT_INSERTABLE1032 : resource.h
  • IDB_OBJECT_INSERTABLE32 : resource.h
  • IDB_OBJECTFOLDER : resource.h
  • IDB_OK : resource.h
  • IDB_OPTIONS : Resource.h
  • IDB_OPTIONSIMAGES : Resource.h
  • IDB_OUTLOOK_LARGE : resource.h
  • IDB_OUTLOOK_LARGE_HC : resource.h
  • IDB_OUTLOOK_SMALL : resource.h
  • IDB_OUTLOOK_SMALL_HC : resource.h
  • IDB_PAGELAYOUT : Resource.h
  • IDB_PAGELAYOUTLARGE : Resource.h
  • IDB_PAGES : resource.h
  • IDB_PAGES_HC : resource.h
  • IDB_PAGES_SMALL : resource.h
  • IDB_PAGES_SMALL_HC : resource.h
  • IDB_PAL : resource.h
  • IDB_PALETTE : resource.h
  • IDB_PENCIL : resource.h
  • IDB_PICTURE : Resource.h
  • IDB_PICTURE_FORMAT : Resource.h
  • IDB_PICTURE_FORMATLARGE : Resource.h
  • IDB_PIN : resource.h
  • IDB_PLAY : resource.h
  • IDB_PLAY_HOT : resource.h
  • IDB_PLUS : resource.h
  • IDB_POSITION_1 : Resource.h
  • IDB_POSITION_2 : Resource.h
  • IDB_PRESSEDTOOLBAR : Resource.h
  • IDB_PRINTER : resource.h
  • IDB_PROP24 : Resource.h
  • IDB_PROPICONS : resource.h
  • IDB_PUSH : resource.h
  • IDB_QUESTION : resource.h
  • IDB_QUESTION32 : resource.h
  • IDB_RADIO_OFF : resource.h
  • IDB_RADIO_OFF32 : resource.h
  • IDB_RADIO_ON : resource.h
  • IDB_RADIO_ON32 : resource.h
  • IDB_REFERENCES : Resource.h
  • IDB_REFERENCESLARGE : Resource.h
  • IDB_RESOURCE_VIEW : Resource.h
  • IDB_RESOURCE_VIEW24 : Resource.h
  • IDB_REVIEW : Resource.h
  • IDB_REVIEWLARGE : Resource.h
  • IDB_RIBBON_CATEGORY1_LARGE : resource.h
  • IDB_RIBBON_CATEGORY1_SMALL : resource.h
  • IDB_RIBBON_CATEGORY2_LARGE : resource.h
  • IDB_RIBBON_CATEGORY2_SMALL : resource.h
  • IDB_RIBBON_CATEGORY3_LARGE : resource.h
  • IDB_RIBBON_CATEGORY3_SMALL : resource.h
  • IDB_RIBBON_CATEGORY4_SMALL : resource.h
  • IDB_RIBBON_CATEGORY5_SMALL : resource.h
  • IDB_RIBBON_CATEGORY6_LARGE : resource.h
  • IDB_RIBBON_CATEGORY6_SMALL : resource.h
  • IDB_RIBBON_FILE_LARGE : resource.h
  • IDB_RIBBON_FILE_SMALL : resource.h
  • IDB_RIBBON_FILELARGE : resource.h
  • IDB_RIBBON_FILESMALL : resource.h
  • IDB_RIBBON_FORMATLARGE : resource.h
  • IDB_RIBBON_FORMATSMALL : resource.h
  • IDB_RIBBON_HOMELARGE : resource.h
  • IDB_RIBBON_HOMESMALL : resource.h
  • IDB_RIBBON_ICONS : resource.h
  • IDB_RIBBON_MAIN : resource.h
  • IDB_RIBBON_PALETTE_1 : resource.h
  • IDB_RIBBON_PALETTE_2 : resource.h
  • IDB_RIBBON_VIEWLARGE : resource.h
  • IDB_RIBBON_VIEWSMALL : resource.h
  • IDB_RULER_BLOCK : resource.h
  • IDB_RULER_BLOCKM : resource.h
  • IDB_RULER_DOWN : resource.h
  • IDB_RULER_DOWNM : resource.h
  • IDB_RULER_TAB : resource.h
  • IDB_RULER_TABM : resource.h
  • IDB_RULER_UP : resource.h
  • IDB_RULER_UPM : resource.h
  • IDB_SHAPE1 : Resource.h
  • IDB_SHAPE2 : Resource.h
  • IDB_SHAPE3 : Resource.h
  • IDB_SHAPE4 : Resource.h
  • IDB_SHAPE5 : Resource.h
  • IDB_SHAPE6 : Resource.h
  • IDB_SHAPE7 : Resource.h
  • IDB_SHORTCUTS : resource.h
  • IDB_SMALLICONS : resource.h
  • IDB_SOLUTION_EXPLORER_24 : Resource.h
  • IDB_SORT24 : Resource.h
  • IDB_SPELL : Resource.h
  • IDB_SPINDIAL : resource.h
  • IDB_STATEICONS : resource.h
  • IDB_STATUS_ANIMATION : Resource.h
  • IDB_STATUS_READY : Resource.h
  • IDB_STATUSBAR_1 : resource.h
  • IDB_STATUSBAR_2 : resource.h
  • IDB_STOP : resource.h
  • IDB_STOP_HOT : resource.h
  • IDB_STYLES : resource.h , Resource.h
  • IDB_TABLE : Resource.h
  • IDB_TASKPANE_TOOLBAR : resource.h
  • IDB_TASKS : resource.h
  • IDB_TASKS_HC : resource.h
  • IDB_TASKSPANE_TOOLBAR : resource.h
  • IDB_TEST_BITMAP : resource.h
  • IDB_TESTHELP : resource.h
  • IDB_THEME_COLORS : Resource.h
  • IDB_THEME_EFFECTS : Resource.h
  • IDB_THEME_FONTS : Resource.h
  • IDB_THEME_THEMES : Resource.h
  • IDB_TIME : resource.h
  • IDB_TIMES : resource.h
  • IDB_TOOLBAR24 : Resource.h
  • IDB_TOOLBAR256 : Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDB_TOOLBAR_HC : resource.h
  • IDB_TOOLBARCOLD256 : Resource.h
  • IDB_TOOLS_PAGE1 : Resource.h
  • IDB_TOOLS_PAGE1_HC : Resource.h
  • IDB_TOOLS_PAGE2 : Resource.h
  • IDB_TOOLS_PAGE2_HC : Resource.h
  • IDB_TOOLS_PAGE3 : Resource.h
  • IDB_TOOLS_PAGE3_HC : Resource.h
  • IDB_TOOLTIP_CLIPBOARD : Resource.h
  • IDB_TOOLTIP_FONTDLG : Resource.h
  • IDB_TOOLTIP_MAIN : Resource.h
  • IDB_TOOLTIP_PARAGRAPH : Resource.h
  • IDB_TREE_ICONS : resource.h
  • IDB_TYPELIBFOLDER : resource.h
  • IDB_UPBITMAP : resource.h
  • IDB_VIEW : Resource.h
  • IDB_VIEWLARGE : Resource.h
  • IDB_VIEWPAT_1 : Resource.h
  • IDB_VIEWPAT_2 : Resource.h
  • IDB_VIEWPAT_3 : Resource.h
  • IDB_VIEWPAT_4 : Resource.h
  • IDB_WEB_HC : resource.h
  • IDB_WORKSPACE : resource.h , Resource.h , resource.h
  • IDB_WRITE : Resource.h , resource.h
  • IDB_WRITELARGE : Resource.h , resource.h
  • IDB_XLIST : resource.h
  • IDC_ACTIVETAB_CLOSE_BUTTON : Resource.h
  • IDC_ADD : resource.h , Resource.H
  • IDC_ADD_BORDER : resource.h
  • IDC_ADD_OR_UPDATE : resource.h
  • IDC_ADDRCOMBO : resource.h
  • IDC_ADDRESS : resource.h
  • IDC_ADVISEDATA : resource.h
  • IDC_ALC_FIRST : otherids.h
  • IDC_ALIGN : resource.h
  • IDC_ALLOWEDIT_ALWAYS : Resource.H
  • IDC_ALLOWEDIT_NEVER : Resource.H
  • IDC_ALLOWEDIT_PROMPT : Resource.H
  • IDC_ALLOWWINDOWLESS : Resource.H
  • IDC_ALLRIGHTSRESERVED : resource.h
  • IDC_ALTDRAG : resource.h
  • IDC_ALTSELECT : penwin.h
  • IDC_ALWAYS : Resource.H
  • IDC_AMERICAN : resource.h
  • IDC_ANIM_SPEED : resource.h
  • IDC_ANIM_SPEED_VAL : resource.h
  • IDC_ANIMATE : resource.h
  • IDC_ANIMATE_XY : resource.h
  • IDC_ANIMATEPOS : resource.h
  • IDC_ANIMATION : resource.h
  • IDC_ANIMFRAME : resource.h
  • IDC_ANIMSTATUS : resource.h
  • IDC_APP_LOOK : Resource.h
  • IDC_APP_LOOK1 : resource.h , Resource.h , resource.h
  • IDC_APP_LOOK2 : resource.h , Resource.h , resource.h
  • IDC_APP_LOOK3 : resource.h , Resource.h , resource.h
  • IDC_APP_LOOK4 : Resource.h
  • IDC_APP_LOOK5 : Resource.h
  • IDC_APP_LOOK6 : Resource.h
  • IDC_APPLY : resource.h , Resource.h , resource.h
  • IDC_APPNAME : resource.h
  • IDC_AUTHOR : resource.h
  • IDC_AUTO_CLOSE : resource.h
  • IDC_AUTOARRANGE : resource.h
  • IDC_AUTOCLOSE_TIME : resource.h
  • IDC_AUTOCLOSE_VAL : resource.h
  • IDC_AUTOPLAY : resource.h
  • IDC_AUTOSIZE : Resource.h
  • IDC_AVAILABLECATEGORIES : Resource.H
  • IDC_BACK_COLOR : resource.h
  • IDC_BACKGROUND : resource.h
  • IDC_BANER : Resource.h
  • IDC_Basic : Resource.h
  • IDC_BEER : resource.h
  • IDC_BIGICON : resource.h
  • IDC_BITDEPTH : resource.h
  • IDC_BLACK : resource.h
  • IDC_BLUE : resource.h
  • IDC_BOLD_LABEL : resource.h
  • IDC_BORDER : resource.h
  • IDC_BORDER_LABEL : resource.h
  • IDC_BORDERCHECK : resource.h
  • IDC_BOUNCE_WND : bounce.h
  • IDC_BOX : resource.h
  • IDC_BOXT : resource.h
  • IDC_BROWSE : Resource.h , resource.h
  • IDC_BTN_SEARCH : resource.h
  • IDC_BTN_SET_HEIGHT_IN_PIXELS : resource.h
  • IDC_BTN_SET_WIDTH_IN_PIXELS : resource.h
  • IDC_BTNGO : resource.h
  • IDC_BUT_ID : Resource.h
  • IDC_BUTTON : resource.h
  • IDC_BUTTON1 : Resource.h , otherids.h , resource.h , Resource.h
  • IDC_BUTTON2 : Resource.h , otherids.h , resource.h
  • IDC_BUTTON3 : Resource.h , otherids.h
  • IDC_BUTTON4 : Resource.h , otherids.h
  • IDC_BUTTON5 : resource.h , Resource.h
  • IDC_BUTTON6 : Resource.h
  • IDC_BUTTON7 : Resource.h
  • IDC_BUTTON8 : Resource.h
  • IDC_BUTTON9 : Resource.h
  • IDC_BUTTON_CLEAR : resource.h
  • IDC_BUTTON_CLEARALL : resource.h
  • IDC_BUTTON_MAX : spintest.cpp
  • IDC_BUTTON_MENU : resource.h
  • IDC_BUTTON_MULTLINE : resource.h
  • IDC_BUTTON_NOTE : resource.h
  • IDC_BUTTON_SET : resource.h
  • IDC_BUTTON_SET_CONTAINER_SIZE : resource.h
  • IDC_BUTTON_SET_DLGBAR_SIZE : resource.h
  • IDC_BUTTON_SIZE : resource.h
  • IDC_BUTTON_URL : resource.h
  • IDC_BUTTON_VALIDATE : resource.h
  • IDC_BW : resource.h
  • IDC_CAPTION : resource.h
  • IDC_CAPTIONEDIT : resource.h
  • IDC_CATEGORIES : Resource.H
  • IDC_CENTER : resource.h
  • IDC_CHECK : Resource.h
  • IDC_CHECK1 : resource.h , Resource.h
  • IDC_CHECK10 : Resource.h
  • IDC_CHECK11 : Resource.h
  • IDC_CHECK12 : Resource.h
  • IDC_CHECK13 : Resource.h
  • IDC_CHECK2 : resource.h , Resource.h
  • IDC_CHECK3 : Resource.h
  • IDC_CHECK4 : resource.h , Resource.h
  • IDC_CHECK5 : Resource.h
  • IDC_CHECK6 : Resource.h
  • IDC_CHECK7 : Resource.h
  • IDC_CHECK8 : Resource.h
  • IDC_CHECK9 : Resource.h
  • IDC_CHECK_ADDRESS : resource.h
  • IDC_CHECK_ANIMATION : resource.h
  • IDC_CHECK_BUTTON : resource.h
  • IDC_CHECK_CAPTIONICON : resource.h
  • IDC_CHECK_COLLAPSEGROUPS : resource.h
  • IDC_CHECK_ELEV : resource.h
  • IDC_CHECK_FORMATBAR : resource.h
  • IDC_CHECK_HICOLORIMAGES : resource.h
  • IDC_CHECK_HISTBUTTONS : resource.h
  • IDC_CHECK_MARGINS : resource.h
  • IDC_CHECK_MOUSEFWD : resource.h
  • IDC_CHECK_NAVTOOLBAR : resource.h
  • IDC_CHECK_NETWORK : resource.h
  • IDC_CHECK_NOSCOPE : resource.h
  • IDC_CHECK_PAGEBREAK : resource.h
  • IDC_CHECK_RULERBAR : resource.h
  • IDC_CHECK_SCROLLBUTTONS : resource.h
  • IDC_CHECK_SERVICE : resource.h
  • IDC_CHECK_STATE : resource.h
  • IDC_CHECK_STATUSBAR : resource.h
  • IDC_CHECK_TOOLBAR : resource.h
  • IDC_CHECK_WRAPLABELS : resource.h
  • IDC_CHECK_WRAPTASKS : resource.h
  • IDC_CHECKMINUTES : resource.h
  • IDC_CHOOSECOLOR : Resource.H
  • IDC_CHOOSECOLOR_AMBIENT : Resource.H
  • IDC_CHOOSEFONT : Resource.H
  • IDC_CHOOSEFONT_AMBIENT : Resource.H
  • IDC_CIRCLEOFFSET : resource.h
  • IDC_CIRCLESHAPE : resource.h
  • IDC_CKAPPCANPARSE : resource.h
  • IDC_CKDAYSTATE : resource.h
  • IDC_CKLONGDATEFORMAT : resource.h
  • IDC_CKNOTODAY : resource.h
  • IDC_CKNOTODAYCIRCLE : resource.h
  • IDC_CKSHORTDATEFORMAT : resource.h
  • IDC_CKSHOWNONE : resource.h
  • IDC_CKTIMEFORMAT : resource.h
  • IDC_CKUPDOWN : resource.h
  • IDC_CKWEEKNUMBERS : resource.h
  • IDC_CLASS : resource.h
  • IDC_CLEAR_LOG : resource.h
  • IDC_CLEAROUTPUT : resource.h
  • IDC_CLEAROUTPUTWINDOW : Resource.H
  • IDC_CLOSE : resource.h
  • IDC_CMULTISELECT : resource.h
  • IDC_CNTRTHRDPRIORITY : resource.h
  • IDC_COFFEE : resource.h
  • IDC_COFFEE1 : resource.h
  • IDC_COLOR : resource.h
  • IDC_COLOR1 : resource.h
  • IDC_COLOR2 : resource.h
  • IDC_COLOR3 : resource.h
  • IDC_COLOR4 : resource.h
  • IDC_COLOR_AREA : resource.h
  • IDC_COLOR_DLG : resource.h
  • IDC_COLOR_GROUPTEXT : resource.h
  • IDC_COLOR_GROUPTEXTHOT : resource.h
  • IDC_COLOR_PALETTE : resource.h
  • IDC_COLOR_PICKER : resource.h
  • IDC_COLOR_ROWS : resource.h
  • IDC_COLOR_SCHEME : Resource.h
  • IDC_COLOR_TASKTEXT : resource.h
  • IDC_COLOR_TASKTEXTHOT : resource.h
  • IDC_COLORBAR : resource.h
  • IDC_COLORBAR2 : resource.h
  • IDC_COMBO1 : resource.h , Resource.h , resource.h
  • IDC_COMBO2 : resource.h
  • IDC_COMBO3 : resource.h
  • IDC_COMBO_ALIGNMENT : resource.h
  • IDC_COMBO_UNITS : resource.h
  • IDC_COMBO_WRAP : resource.h
  • IDC_COMMAND : resource.h
  • IDC_COMMENTS : resource.h
  • IDC_COMPANY_URL : Resource.h , resource.h , Resource.h , resource.h
  • IDC_CONF1 : resource.h
  • IDC_CONF2 : resource.h
  • IDC_CONF3 : resource.h
  • IDC_CONFIGURE : otherids.h
  • IDC_CONTACT : Resource.h
  • IDC_CONTINENTAL : resource.h
  • IDC_CONTINENTAL2 : resource.h
  • IDC_CONTROL_LOGGING : Resource.H
  • IDC_CONTROLS : Resource.H
  • IDC_COPYRIGHT : resource.h
  • IDC_CREATE_DLG : resource.h
  • IDC_CREATEDATE : resource.h
  • IDC_Currency : Resource.h
  • IDC_CURRENT_COUNT : resource.h
  • IDC_CURSOR : resource.h
  • IDC_CUSTOM_COLORS : resource.h
  • IDC_CUSTOM_EDIT : resource.h
  • IDC_CUSTOM_TOOLTIPS : Resource.h
  • IDC_DATABOX : resource.h
  • IDC_Date : Resource.h
  • IDC_DATE : Resource.H
  • IDC_DATE_AMBIENT : Resource.H
  • IDC_DATEDIALOG_LIST : resource.h
  • IDC_DATETIME : resource.h
  • IDC_DATETIMEFORMAT : resource.h
  • IDC_DATETIMELOCATION : resource.h
  • IDC_DATETIMEPICKER1 : resource.h
  • IDC_DATETIMEPICKER2 : resource.h
  • IDC_DEBUG : resource.h
  • IDC_DEFAULT_PEN_WIDTHS : resource.h
  • IDC_DELETE : resource.h
  • IDC_DEMOIT : resource.h
  • IDC_DESCRIPTION_AREA : resource.h
  • IDC_DEVICE : resource.h
  • IDC_DIBSECTION : resource.h
  • IDC_DIRECTION : resource.h
  • IDC_DIRECTION2 : resource.h
  • IDC_DISK_SPACE : resource.h
  • IDC_DISPID : Resource.H
  • IDC_DISPID_NEW : Resource.H
  • IDC_DIV : resource.h
  • IDC_DOCK_TAB_COLORS : Resource.h
  • IDC_DOGETDATA : resource.h
  • IDC_DOT_NET_LOOK : resource.h
  • IDC_DRAW_DESCR : resource.h
  • IDC_DRAW_ICON : resource.h
  • IDC_DRAW_SEPARATOR : resource.h
  • IDC_DRAW_USING_FONT : resource.h
  • IDC_DROPRING : resource.h
  • IDC_DROPWHEEL : resource.h
  • IDC_DSPYTHRDPRIORITY : resource.h
  • IDC_DTFRAME : resource.h
  • IDC_DWORD : resource.h
  • IDC_EDIT : resource.h
  • IDC_EDIT1 : Resource.h , resource.h
  • IDC_EDIT2 : resource.h , Resource.h
  • IDC_EDIT3 : resource.h , Resource.h
  • IDC_EDIT4 : resource.h , Resource.h
  • IDC_EDIT_AFTER : resource.h
  • IDC_EDIT_BEFORE : resource.h
  • IDC_EDIT_BM : resource.h
  • IDC_EDIT_CAPTION : resource.h
  • IDC_EDIT_CAPTIONHEIGHT : resource.h
  • IDC_EDIT_CELLATTRIBS : resource.h
  • IDC_EDIT_DESIGNMODE : resource.h
  • IDC_EDIT_EDITMODE : resource.h
  • IDC_EDIT_FIRST_LINE : resource.h
  • IDC_EDIT_GROUPSPACING : resource.h
  • IDC_EDIT_HEIGHT_IN_PIXELS : resource.h
  • IDC_EDIT_HMARGIN : resource.h
  • IDC_EDIT_ICONOFFSET : resource.h
  • IDC_EDIT_IMAGE : resource.h
  • IDC_EDIT_LEFT : resource.h
  • IDC_EDIT_LIST : resource.h
  • IDC_EDIT_LM : resource.h
  • IDC_EDIT_MIN : spintest.cpp
  • IDC_EDIT_NUMCOLS : resource.h
  • IDC_EDIT_NUMROWS : resource.h
  • IDC_EDIT_RIGHT : resource.h
  • IDC_EDIT_RM : resource.h
  • IDC_EDIT_SIZE : resource.h
  • IDC_EDIT_TABLEATTRIBS : resource.h
  • IDC_EDIT_TABS : resource.h
  • IDC_EDIT_TASKOFFSET : resource.h
  • IDC_EDIT_TASKSPACING : resource.h
  • IDC_EDIT_TM : resource.h
  • IDC_EDIT_VMARGIN : resource.h
  • IDC_EDIT_WIDTH : resource.h
  • IDC_EDIT_WIDTH_IN_PIXELS : resource.h
  • IDC_EDITBAR_SEARCHBOX : resource.h
  • IDC_EDITCONTROL : resource.h
  • IDC_EDITLABELS : resource.h
  • IDC_EDITTEXT : resource.h
  • IDC_EDITTIME : resource.h
  • IDC_EDITX : resource.h
  • IDC_EDITY : resource.h
  • IDC_EDSELRANGE : resource.h
  • IDC_EDURL : resource.h
  • IDC_ELEMENT : resource.h
  • IDC_ELLIPSE : resource.h
  • IDC_ENABLED : Resource.H
  • IDC_ENABLEDCHECK : resource.h
  • IDC_ENUM_BUTTON : resource.h
  • IDC_EVENT_POPUPS : resource.h
  • IDC_EVENTS : Resource.H
  • IDC_EXCEPTIONDESC : Resource.H
  • IDC_EXCEPTIONHELP : Resource.H
  • IDC_EXCEPTIONSOURCE : Resource.H
  • IDC_EXPLORER : resource.h
  • IDC_EXPRESSION : resource.h
  • IDC_FETCH : resource.h
  • IDC_FILE_EDIT : resource.h
  • IDC_FILENAME : Resource.H
  • IDC_FILENAME_BROWSE : Resource.H
  • IDC_FINANCE : resource.h
  • IDC_FIND : resource.h
  • IDC_FINDDIALOG_DOWNRADIO : Resource.h
  • IDC_FINDDIALOG_FINDCOMBO : Resource.h
  • IDC_FINDDIALOG_MARKALLBUTTON : Resource.h
  • IDC_FINDDIALOG_MATCHCASECHECK : Resource.h
  • IDC_FINDDIALOG_MATCHWHOLEWORDONLYCHECK : Resource.h
  • IDC_FINDDIALOG_REGULARBUTTON : Resource.h
  • IDC_FINDDIALOG_REGULAREXPRESSIONCHECK : Resource.h
  • IDC_FINDDIALOG_SEARCHALLOPENDOCUMENTSCHECK : Resource.h
  • IDC_FINDDIALOG_UPRADIO : Resource.h
  • IDC_FLAG : resource.h
  • IDC_FLOAT : resource.h
  • IDC_FOLDER_EDIT : resource.h
  • IDC_FONT : resource.h
  • IDC_FONTNAME : resource.h
  • IDC_FONTSIZE : resource.h
  • IDC_FONTSTYLE : resource.h
  • IDC_FOOTER : resource.h
  • IDC_FOOTER_FILE : resource.h
  • IDC_FOOTER_SYSTEM : resource.h
  • IDC_FORMATETC : resource.h
  • IDC_FOUR : resource.h
  • IDC_FROM : resource.h
  • IDC_FULLHELP : resource.h
  • IDC_GET_AT : resource.h
  • IDC_GETALL : resource.h
  • IDC_GETDATA : resource.h
  • IDC_GETPOS : resource.h
  • IDC_GIVE_UP : resource.h
  • IDC_GO : resource.h
  • IDC_GOTO_LINE : resource.h
  • IDC_GREASY : resource.h
  • IDC_GREASY2 : resource.h
  • IDC_GREEN : resource.h
  • IDC_GROUP : resource.h
  • IDC_GROUPBOX1 : resource.h
  • IDC_HEADER : resource.h
  • IDC_HEADER_FILE : resource.h
  • IDC_HEADER_SYSTEM : resource.h
  • IDC_HEALTHY : resource.h
  • IDC_HEIGHT : resource.h
  • IDC_HEIGHTEDIT : resource.h
  • IDC_HIDE : resource.h
  • IDC_HIDE_FONT_PROPS : resource.h
  • IDC_HOCKEY : resource.h
  • IDC_HOME : Resource.h
  • IDC_HOT_TEA : resource.h
  • IDC_HOVER : resource.h
  • IDC_IADVISESINKEX : Resource.H
  • IDC_ICON1 : resource.h
  • IDC_ICON2 : resource.h
  • IDC_ICON_LABEL : resource.h
  • IDC_ICONS : resource.h
  • IDC_IFACE_PROPS : resource.h
  • IDC_IGNOREACTIVATEWHENVISIBLE : Resource.H
  • IDC_IGNOREREQUIREDCATEGORIES : Resource.H
  • IDC_IMAGE : resource.h
  • IDC_IMAGE_AREA : resource.h
  • IDC_IMAGE_LOCATION : resource.h
  • IDC_IMAGEPATH : Resource.h
  • IDC_IMAGESIZE : resource.h
  • IDC_IMPLEMENTEDCATEGORIES : Resource.H
  • IDC_INDEXED : resource.h
  • IDC_INFO : resource.h
  • IDC_INPUT_EDIT : resource.h
  • IDC_INSERT_BEFORE : resource.h
  • IDC_INT : resource.h
  • IDC_INT1 : resource.h
  • IDC_INT2 : resource.h
  • IDC_INTEGER : resource.h
  • IDC_INTERFACE : resource.h
  • IDC_INTERFACE_ID : resource.h
  • IDC_INTERVAL : resource.h
  • IDC_INTERVALEDIT : resource.h
  • IDC_INVERTCHECK : resource.h
  • IDC_INVISIBLE_FOCUS : resource.h
  • IDC_INVOKE : Resource.H
  • IDC_IOLEINPLACESITEEX : Resource.H
  • IDC_IOLEINPLACESITEWINDOWLESS : Resource.H
  • IDC_KEY : resource.h
  • IDC_KEYWORDS : resource.h
  • IDC_LAST_ACCUM : resource.h
  • IDC_LASTPRINT : resource.h
  • IDC_LASTSAVE : resource.h
  • IDC_LBNOTIFY : resource.h
  • IDC_LEFTHANDED : otherids.h
  • IDC_LENGTHEDIT : resource.h
  • IDC_LINE : Resource.h
  • IDC_LINK : resource.h
  • IDC_LIST : resource.h
  • IDC_LIST1 : resource.h
  • IDC_LIST1LBL : resource.h
  • IDC_LIST_NETSTRINGS : resource.h
  • IDC_LIST_STYLE : resource.h
  • IDC_LISTBOX1 : resource.h
  • IDC_LISTDIALOG_LIST : resource.h
  • IDC_LISTVIEW1 : resource.h
  • IDC_LOCATION : resource.h
  • IDC_LOCATION2 : resource.h
  • IDC_LOG : resource.h
  • IDC_LOGTODEBUG : Resource.H
  • IDC_LOGTOFILE : Resource.H
  • IDC_LOGTONULL : Resource.H
  • IDC_LOGTOOUTPUT : Resource.H
  • IDC_LUM : resource.h
  • IDC_MACRO : Resource.H
  • IDC_MACROBAR : Resource.H
  • IDC_MACROS : Resource.H
  • IDC_MAIL : Resource.h , resource.h , Resource.h
  • IDC_MAIL_CC : resource.h
  • IDC_MAIL_CC_NAME : resource.h
  • IDC_MAIL_SUBJECT_NAME : resource.h
  • IDC_MAIL_TO : resource.h
  • IDC_MAIL_TO_NAME : resource.h
  • IDC_MAIN : resource.h
  • IDC_MARK_CHANGED : resource.h
  • IDC_MARK_SORTED_COLUMN : resource.h
  • IDC_MASKEDIT1 : resource.h
  • IDC_MASKEDIT2 : resource.h
  • IDC_MASKEDIT3 : resource.h
  • IDC_MASKEDIT4 : resource.h
  • IDC_MASKEDIT5 : resource.h
  • IDC_MAX_RANGE : resource.h
  • IDC_MAX_RANGE2 : resource.h
  • IDC_MCFRAME : resource.h
  • IDC_MENU_DEFAULT_CLICK : resource.h
  • IDC_METHODNAME : Resource.H
  • IDC_MILK : resource.h
  • IDC_MIN_RANGE : resource.h
  • IDC_MODIFY_FONT : resource.h
  • IDC_MODULE : resource.h
  • IDC_MONTHCAL : resource.h
  • IDC_MultiDimensionArray : Resource.h
  • IDC_MYBUTTON : resource.h
  • IDC_MYEDITCONTROL : resource.h
  • IDC_MYHOTCUR : resource.h
  • IDC_MYSTATICTEXT : resource.h
  • IDC_NAME : Resource.H
  • IDC_NAME1 : resource.h
  • IDC_NAME2 : resource.h
  • IDC_NAME3 : resource.h
  • IDC_NEIGHBOR : resource.h
  • IDC_NERDY : resource.h
  • IDC_NETADDRESS : resource.h
  • IDC_NETADDRESS1 : resource.h
  • IDC_NEVER : Resource.H
  • IDC_NEW_BUTTON : Resource.h
  • IDC_NEWGUID : resource.h
  • IDC_NEWPROPERTY : Resource.H
  • IDC_NEWTEXT : resource.h
  • IDC_NO_BALLOON : resource.h
  • IDC_NOCOLUMNHEADER : resource.h
  • IDC_NOFILL : resource.h
  • IDC_NOLABELWRAP : resource.h
  • IDC_NOSORTHEADER : resource.h
  • IDC_NOTE : resource.h
  • IDC_NOTIFICATIONS : resource.h
  • IDC_NOTIFYLIST : resource.h
  • IDC_NUMBEROUT : resource.h
  • IDC_NUMCHARS : resource.h
  • IDC_NUMPAGES : resource.h
  • IDC_NUMWORDS : resource.h
  • IDC_OBJECTCLSID : resource.h
  • IDC_OBJECTNAME : resource.h
  • IDC_OBJECTS : Resource.H
  • IDC_OBJICON : resource.h
  • IDC_OLE2LIB : resource.h
  • IDC_OLE2LIB_LBL : resource.h
  • IDC_OleArray : Resource.h
  • IDC_ONENOTE_TABS : Resource.h
  • IDC_OPEN_FILE_DLG : resource.h
  • IDC_OPENFILE : Resource.H
  • IDC_OPTIONS : resource.h
  • IDC_ORANGE_JUICE : resource.h
  • IDC_OUTLOOKBAR2003 : resource.h
  • IDC_OUTPUT : Resource.H
  • IDC_OUTPUTWINDOW : Resource.H
  • IDC_PAGER_CTRL : resource.h
  • IDC_PALETTE : resource.h
  • IDC_PARAMS : Resource.H
  • IDC_PARAMTYPE : Resource.H
  • IDC_PARAMVALUE : Resource.H
  • IDC_PARAMVALUECOMBO : Resource.H
  • IDC_PARENT : resource.h
  • IDC_PATH : Resource.h
  • IDC_PAUSE : resource.h
  • IDC_PEN : penwin.h
  • IDC_PENCIL : resource.h
  • IDC_PERCENT_DONE : resource.h
  • IDC_PHSTATIC : resource.h
  • IDC_PHYSICAL_MEM : resource.h
  • IDC_PICTURE : resource.h
  • IDC_PITCH : resource.h
  • IDC_PLAY : resource.h
  • IDC_POPUP_SOURCE : resource.h
  • IDC_POPUP_SOURCE2 : resource.h
  • IDC_POPUPHELP : resource.h
  • IDC_POSITION : resource.h
  • IDC_POSITIONEDIT : resource.h
  • IDC_PRESSED_ON_MENU : resource.h
  • IDC_PRIMEFIRST : resource.h
  • IDC_PRIORITYCLASS : resource.h
  • IDC_PRODUCT : Resource.h
  • IDC_PROG_HORZPOS : resource.h
  • IDC_PROG_VERTPOS : resource.h
  • IDC_PROGRESS : resource.h
  • IDC_PROGRESS1 : Resource.h
  • IDC_PROGRESS_DELTA : resource.h
  • IDC_PROGRESS_FROM : resource.h
  • IDC_PROGRESS_POS : resource.h
  • IDC_PROGRESS_SETDELTA : resource.h
  • IDC_PROGRESS_STEP : resource.h
  • IDC_PROGRESS_STEPIT : resource.h
  • IDC_PROGRESS_TO : resource.h
  • IDC_PROMPT : Resource.H
  • IDC_PROMPT_TEXT : resource.h
  • IDC_PROP_SHEET1 : resource.h
  • IDC_PROP_SHEET2 : resource.h
  • IDC_PROP_SHEET3 : resource.h
  • IDC_PROP_SHEET4 : resource.h
  • IDC_PROP_SHEET5 : resource.h
  • IDC_PROPERTIES : Resource.H
  • IDC_PROPERTIES_CHANGES : Resource.H
  • IDC_PROPERTIES_EDITREQUESTS : Resource.H
  • IDC_PROPLIST_CATEGORIZED : resource.h
  • IDC_PROPLIST_CATEGORIZED2 : resource.h
  • IDC_PROPLIST_EXPAND_ALL : resource.h
  • IDC_PROPLIST_LOCATION : resource.h
  • IDC_PROPNAME : Resource.H
  • IDC_PROPNAME_NEW : Resource.H
  • IDC_PROPTYPE : Resource.H
  • IDC_PROPVALUE : Resource.H
  • IDC_PROPVALUECOMBO_AMBIENT : Resource.H
  • IDC_PRUNE_JUICE : resource.h
  • IDC_PRUNE_JUICE2 : resource.h
  • IDC_RADIO1 : resource.h , Resource.h
  • IDC_RADIO2 : resource.h , Resource.h
  • IDC_RADIO3 : resource.h , Resource.h
  • IDC_RADIO4 : resource.h , Resource.h
  • IDC_RADIO5 : resource.h , Resource.h
  • IDC_RADIO6 : resource.h
  • IDC_RADIO_ID : Resource.h
  • IDC_RADIO_OFFICE2003 : resource.h
  • IDC_RADIO_OFFICE2007 : resource.h
  • IDC_RADIO_OFFICEXP : resource.h
  • IDC_RADIO_VS2005 : resource.h
  • IDC_RADIO_WIN : resource.h
  • IDC_RADIO_WINXP : resource.h
  • IDC_RASTER : resource.h
  • IDC_RECT : resource.h
  • IDC_RECTANGLE : resource.h
  • IDC_RED : resource.h
  • IDC_REDUCE_BORDER : resource.h
  • IDC_REFRESH : resource.h
  • IDC_REGISTER : Resource.H
  • IDC_REGISTEREDCONTROLS : Resource.H
  • IDC_REMOVE : resource.h , Resource.H
  • IDC_REMOVE_ALL : resource.h
  • IDC_REMOVEALL : Resource.H
  • IDC_REPLAY_SOUND : resource.h
  • IDC_REQUIREDCATEGORIES : Resource.H
  • IDC_REREGISTER : Resource.H
  • IDC_RESET_VALUES : resource.h
  • IDC_RESOURCE : resource.h
  • IDC_RESULT : resource.h
  • IDC_RESULTS : resource.h
  • IDC_RETURNVALUE : Resource.H
  • IDC_REVNUM : resource.h
  • IDC_RGB : resource.h
  • IDC_RGB_COLOR_BAR : resource.h
  • IDC_RGB_COLOR_BAR2 : resource.h
  • IDC_RGB_COLOR_PALETTE : resource.h
  • IDC_RGB_DLG : resource.h
  • IDC_RIGHT_ARROW : resource.h
  • IDC_ROMANTIC : resource.h
  • IDC_ROUND_RECTANGLE : resource.h
  • IDC_ROUNDED_CORNERS : resource.h
  • IDC_ROUNDED_TABS : Resource.h
  • IDC_RUNTIME_LBL : resource.h
  • IDC_RUNTIMEVER : resource.h
  • IDC_SafeArray : Resource.h
  • IDC_SAVEDBY : resource.h
  • IDC_SBINDHOST : Resource.H
  • IDC_SCREEN : Resource.h
  • IDC_SCREENTIP_STYLE : Resource.h
  • IDC_SECURITY : resource.h
  • IDC_SELECT_FOLDER : resource.h
  • IDC_SELECTALL : Resource.H
  • IDC_SELECTALL_EDITREQUESTS : Resource.H
  • IDC_SELECTED_FOLDER : resource.h
  • IDC_SELECTEDITEM : resource.h
  • IDC_SELFREG : resource.h
  • IDC_SERVERPATH : Resource.H
  • IDC_SET_BUTTON_NOTE : resource.h
  • IDC_SET_BUTTON_SIZE : resource.h
  • IDC_SET_MENU1 : resource.h
  • IDC_SET_MENU2 : resource.h
  • IDC_SET_POSITION : resource.h
  • IDC_SET_RANGE : resource.h
  • IDC_SET_SIZE : resource.h
  • IDC_SET_STATE : resource.h
  • IDC_SET_TOOLTIP : resource.h
  • IDC_SETALL : resource.h
  • IDC_SETPOS : resource.h
  • IDC_SETTEXT : resource.h
  • IDC_SETUPADVISE : resource.h
  • IDC_SETVALUE : Resource.H
  • IDC_SETVALUE_AMBIENT : Resource.H
  • IDC_SETX : resource.h
  • IDC_SETY : resource.h
  • IDC_SHOW : resource.h
  • IDC_SHOW_AT_STARTUP : Resource.h , resource.h
  • IDC_SHOW_DEV_TAB : Resource.h
  • IDC_SHOW_FLOATY : Resource.h
  • IDC_SHOW_KEY_TIPS : Resource.h
  • IDC_SHOW_TOOLTIPS_IN_MENU : resource.h
  • IDC_SHOWCNTRTHRD : resource.h
  • IDC_SINGLE_STEP : resource.h
  • IDC_SINGLESEL : resource.h
  • IDC_SIX : resource.h
  • IDC_SLIDER : resource.h
  • IDC_SLIDER_AUTOTICKS : resource.h
  • IDC_SLIDER_BORDER : resource.h
  • IDC_SLIDER_ENABLESEL : resource.h
  • IDC_SLIDER_FIXED : resource.h
  • IDC_SLIDER_HORZPOS : resource.h
  • IDC_SLIDER_LINE : resource.h
  • IDC_SLIDER_NOTHUMB : resource.h
  • IDC_SLIDER_NOTICKS : resource.h
  • IDC_SLIDER_ORIENTATION : resource.h
  • IDC_SLIDER_PAGE : resource.h
  • IDC_SLIDER_POINT : resource.h
  • IDC_SLIDER_RANGEFROM : resource.h
  • IDC_SLIDER_RANGETO : resource.h
  • IDC_SLIDER_SELRANGEFROM : resource.h
  • IDC_SLIDER_SELRANGETO : resource.h
  • IDC_SLIDER_TICKFREQ : resource.h
  • IDC_SLIDER_VERTPOS : resource.h
  • IDC_SLOW : resource.h
  • IDC_SMALL_CAPTION : resource.h
  • IDC_SMOOTH : resource.h
  • IDC_SODA : resource.h
  • IDC_SORT : resource.h
  • IDC_SPEED : resource.h
  • IDC_SPIN : resource.h
  • IDC_SPIN1 : resource.h
  • IDC_SPIN2 : resource.h
  • IDC_SPIN3 : resource.h
  • IDC_SPIN4 : resource.h
  • IDC_SPIN5 : resource.h
  • IDC_SPIN6 : resource.h
  • IDC_SPIN7 : resource.h
  • IDC_SPIN8 : resource.h
  • IDC_SPIN9 : resource.h
  • IDC_SPIN_AFTER : resource.h
  • IDC_SPIN_ALIGNMENT : resource.h
  • IDC_SPIN_ARROWKEYS : resource.h
  • IDC_SPIN_AUTOBUDDY : resource.h
  • IDC_SPIN_BEFORE : resource.h
  • IDC_SPIN_EDIT : resource.h
  • IDC_SPIN_FROM : resource.h
  • IDC_SPIN_NOTHOUSANDS : resource.h
  • IDC_SPIN_ORIENTATION : resource.h
  • IDC_SPIN_POS : resource.h
  • IDC_SPIN_SETBUDDYINT : resource.h
  • IDC_SPIN_TO : resource.h
  • IDC_SPIN_WRAP : resource.h
  • IDC_SPLIT_BUTTON : resource.h
  • IDC_SPLIT_STYLE : resource.h
  • IDC_SPYGLASS : resource.h
  • IDC_START_ANIMATION : resource.h
  • IDC_START_IMAGE : StartView.cpp
  • IDC_START_PROGRESS : resource.h
  • IDC_STATIC_BORDERSIZE : resource.h
  • IDC_STATIC_HEADING : resource.h
  • IDC_STATIC_MARGINS1 : resource.h
  • IDC_STATIC_MARGINS2 : resource.h
  • IDC_STATIC_MARGINS3 : resource.h
  • IDC_STATIC_MARGINS4 : resource.h
  • IDC_STATIC_MARGINS5 : resource.h
  • IDC_STATIC_MARGINS6 : resource.h
  • IDC_STATIC_MARGINS7 : resource.h
  • IDC_STATIC_PARAMETERVALUE : Resource.H
  • IDC_STATIC_PROPERTYVALUE : Resource.H
  • IDC_STATICTEXT : resource.h
  • IDC_STATUS_FACE : resource.h
  • IDC_STDHOTCUR : resource.h
  • IDC_STOP : resource.h
  • IDC_STRING : resource.h
  • IDC_Strings : Resource.h
  • IDC_STRRANGE : resource.h
  • IDC_STRSELECTION : resource.h
  • IDC_STYLE : resource.h , Resource.h
  • IDC_STYLE2007 : resource.h
  • IDC_SUBJECT : resource.h
  • IDC_SUM : resource.h
  • IDC_SUPPORT : Resource.h
  • IDC_SYNCHRONIZE : resource.h
  • IDC_TAB : resource.h
  • IDC_TAB_ICONS : resource.h
  • IDC_TAB_STYLE : resource.h
  • IDC_TAB_SWAP : resource.h
  • IDC_TABLOID : resource.h
  • IDC_TABLOID2 : resource.h
  • IDC_TABORDER : Resource.H
  • IDC_TEMPLATE : resource.h
  • IDC_TERMINATE : resource.h
  • IDC_TEXT : resource.h
  • IDC_TEXT_ALIGNMENT : resource.h
  • IDC_TEXT_COLOR : resource.h
  • IDC_TEXT_LABEL : resource.h
  • IDC_TEXT_UNITS : resource.h
  • IDC_TEXT_WRAP : resource.h
  • IDC_THICK_PEN_WIDTH : resource.h
  • IDC_THIN_PEN_WIDTH : resource.h
  • IDC_THREE : resource.h
  • IDC_THUMBNAIL : resource.h
  • IDC_TIPCAPTION : resource.h
  • IDC_TITLE : resource.h
  • IDC_TOOLTIP : resource.h
  • IDC_TRACELEVEL : Resource.H
  • IDC_TRANSP : resource.h
  • IDC_TRANSP_VAL : resource.h
  • IDC_TRANSPARENT : resource.h
  • IDC_TREE1 : Resource.h , resource.h
  • IDC_TREESTATUS : resource.h
  • IDC_TREEVIEW : resource.h
  • IDC_TREEVIEW1 : resource.h
  • IDC_TRUETYPE : resource.h
  • IDC_TT_TYPE : resource.h
  • IDC_TT_TYPE2 : resource.h
  • IDC_TT_TYPE3 : resource.h
  • IDC_TT_TYPE4 : resource.h
  • IDC_TT_TYPE5 : resource.h
  • IDC_TVDISABLEDDRAGDROP : resource.h
  • IDC_TVEDITLABELS : resource.h
  • IDC_TVHASBUTTONS : resource.h
  • IDC_TVHASLINES : resource.h
  • IDC_TVLINESATROOT : resource.h
  • IDC_TVSHOWSELALWAYS : resource.h
  • IDC_TVSSINGELEXPAND : resource.h
  • IDC_TWO : resource.h
  • IDC_TWOPASSDRAWING : Resource.H
  • IDC_TYPEINFOCOUNT : resource.h
  • IDC_UNITS_CM : resource.h
  • IDC_UNITS_IN : resource.h
  • IDC_UNITS_PI : resource.h
  • IDC_UNITS_PT : resource.h
  • IDC_UNREGISTER : resource.h , Resource.H
  • IDC_UPDATE : resource.h
  • IDC_UPDATEDISPLAY : resource.h
  • IDC_URL : Resource.h , resource.h , Resource.h
  • IDC_URL_LABEL : resource.h
  • IDC_USEDISPATCH : resource.h
  • IDC_USEIPOINTERINACTIVE : Resource.H
  • IDC_USEMINE : resource.h
  • IDC_USEQUICKACTIVATION : Resource.H
  • IDC_USETOOLTIP : resource.h
  • IDC_VALUE : resource.h
  • IDC_VALUE1 : resource.h
  • IDC_VALUE2 : resource.h
  • IDC_VALUE3 : resource.h
  • IDC_VALUE4 : resource.h
  • IDC_VALUE5 : resource.h
  • IDC_VERIFY_BUTTON : resource.h
  • IDC_VERSION : resource.h , Resource.h , resource.h
  • IDC_VERTICAL : resource.h
  • IDC_VIEWMODE : resource.h
  • IDC_VIEWTYPEINFO : resource.h
  • IDC_VISTA_STYLE : resource.h
  • IDC_VISUAL_MNGR : resource.h
  • IDC_WEIGHT : resource.h
  • IDC_WIDTH : resource.h
  • IDC_WINDOW : Resource.h
  • IDC_WNDLIST : resource.h
  • IDC_WORDSEL : resource.h
  • IDC_WORKAREAS : resource.h
  • IDC_WRAP_NONE : resource.h
  • IDC_WRAP_RULER : resource.h
  • IDC_WRAP_WINDOW : resource.h
  • IDC_WRITTENBY : resource.h
  • IDC_X : resource.h
  • IDC_X_SIZE : resource.h
  • IDC_XP_BUTTONS : resource.h
  • IDC_XP_COLORS : Resource.h
  • IDC_XPOS : resource.h
  • IDC_Y : resource.h
  • IDC_Y_SIZE : resource.h
  • IDC_YPOS : resource.h
  • IDD_16BIT_GENERICCBLUR : Resource.h
  • IDD_16BIT_MMXINTRINSICS : Resource.h
  • IDD_16BIT_SSE2INTRINSICS : Resource.h
  • IDD_24BIT_GENERICCBLUR : Resource.h
  • IDD_24BIT_MMXINTRINSICS : Resource.h
  • IDD_24BIT_SSE2INTRINSICS : Resource.h
  • IDD_32BIT_GENERICCBLUR : Resource.h
  • IDD_32BIT_MMXINTRINSICS : Resource.h
  • IDD_32BIT_SSE2INTRINSICS : Resource.h
  • IDD_ABOUT : resource.h
  • IDD_ABOUTBOX : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.H , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDD_ABOUTBOX_BUTTON : resource.h
  • IDD_ABOUTBOX_CIRC : resource.h
  • IDD_ABOUTBOX_IMAGE : Resource.h
  • IDD_ABOUTBOX_LICENSED : resource.h
  • IDD_ABOUTBOX_LOCALIZE : resource.h
  • IDD_ABOUTBOX_PAL : resource.h
  • IDD_ABOUTBOX_PUSH : resource.h
  • IDD_ABOUTBOX_SPINDIAL : resource.h
  • IDD_ABOUTBOX_TESTHELP : resource.h
  • IDD_ABOUTBOX_TIME : resource.h
  • IDD_ABOUTBOX_XLIST : resource.h
  • IDD_ADD_NODE : resource.h
  • IDD_ADDME : resource.h
  • IDD_ALERT_DIALOG : resource.h
  • IDD_AMBIENTPROPERTIES : Resource.H
  • IDD_ANIMCTRL : resource.h
  • IDD_APP_LOOK : resource.h , Resource.h , resource.h
  • IDD_AUTODRIV_DIALOG : resource.h
  • IDD_BREAKFAST : resource.h
  • IDD_CALCDRIV : resource.h
  • IDD_CATEGORIES : Resource.H
  • IDD_CHANGE_NAME : resource.h
  • IDD_CHANGE_TEXT : resource.h
  • IDD_CHANGECOLOR : resource.h
  • IDD_CHANGEDATA : resource.h
  • IDD_CIMAGE_16BIT : Resource.h
  • IDD_CIMAGE_24BIT : Resource.h
  • IDD_CIMAGE_32BIT : Resource.h
  • IDD_CMNCTRL1_DIALOG : resource.h
  • IDD_CMNCTRL2_DIALOG : resource.h
  • IDD_COLOR : resource.h
  • IDD_COMMAND_LINK_CONTROL : resource.h
  • IDD_COMPONENTCATEGORIES : Resource.H
  • IDD_CONFIG : Resource.h
  • IDD_CONTAINERINFO : Resource.H
  • IDD_CONTAINEROPTIONS_FEATURES : Resource.H
  • IDD_CONTAINEROPTIONS_INTERFACES : Resource.H
  • IDD_CONTAINEROPTIONS_SERVICES : Resource.H
  • IDD_CONTROLLOGGING_EVENTS : Resource.H
  • IDD_CONTROLLOGGING_PROPERTYCHANGES : Resource.H
  • IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS : Resource.H
  • IDD_CUST_PAGE_DLG : resource.h
  • IDD_CUSTOM_LIST : resource.h
  • IDD_CUSTZOOM : resource.h
  • IDD_DATEDIALOG : resource.h
  • IDD_DATETIME : resource.h
  • IDD_DBVLIST_FORM : resource.h
  • IDD_DELETEENTRIEDLG : resource.h
  • IDD_DELETESCHEDULEDLG : resource.h
  • IDD_DELETESCHEDULEENTRYDLG : resource.h
  • IDD_DERIVED_EDIT : resource.h
  • IDD_DHTMLEXPLORE_DIALOG : resource.h
  • IDD_DIALOG1 : resource.h
  • IDD_DIALOG2 : resource.h
  • IDD_DIALOGBAR1 : testres2.h
  • IDD_DINNER : resource.h
  • IDD_DISPATCH : resource.h
  • IDD_DLG_BAR : resource.h
  • IDD_DLGTEMP_DIALOG : resource.h
  • IDD_DLGTOOLTIPS_DIALOG : resource.h
  • IDD_DWORD_ARRAY : resource.h
  • IDD_ENTRYINFO_DLG : resource.h
  • IDD_FILE_EXIT : resource.h
  • IDD_FILE_NEW : resource.h
  • IDD_FILE_OPEN : resource.h
  • IDD_FILEDLGWATCHER_DIALOG : resource.h
  • IDD_FILENEWDIALOG : resource.h
  • IDD_FIND : resource.h
  • IDD_FINDDIALOG : Resource.h
  • IDD_FORMAT_PARA : resource.h
  • IDD_FORMAT_TAB : resource.h
  • IDD_FORMVIEW : resource.h
  • IDD_GETURL : resource.h
  • IDD_GOTO : resource.h
  • IDD_GOTO_LINE : Resource.h
  • IDD_GUIDGEN_DIALOG : resource.h
  • IDD_HANDLE_SIZE : resource.h
  • IDD_HELP_ABOUTSCHEDULER : resource.h
  • IDD_IDATAOBJDLG : resource.h
  • IDD_IFACEDIALOG : resource.h
  • IDD_INFODLG : resource.h
  • IDD_INPUTFORM : resource.h
  • IDD_INSERT_TABLE : resource.h
  • IDD_INSERTCONTROL : Resource.H
  • IDD_INT_LIST : resource.h
  • IDD_IPDRIVE_FORM : resource.h
  • IDD_LAST_OPERAND : resource.h
  • IDD_LAST_OPERATOR : resource.h
  • IDD_LINEWEIGHT : resource.h
  • IDD_LIST : resource.h
  • IDD_LISTDIALOG : resource.h
  • IDD_LISTHDR_DIALOG : resource.h
  • IDD_LOGGING : Resource.H
  • IDD_LUNCH : resource.h
  • IDD_MACRO : Resource.H
  • IDD_MACROBAR : Resource.H
  • IDD_MAILBAR : resource.h
  • IDD_MAIN_DIALOG : resource.h
  • IDD_MAP_DWORD_TO_MYSTRUCT : resource.h
  • IDD_MAP_STRING_TO_STRING : resource.h
  • IDD_MENUSUBSET_FORM : resource.h
  • IDD_METHOD : Resource.H
  • IDD_MFCCALC_DIALOG : resource.h
  • IDD_MIN_SIZE : resource.h
  • IDD_MODELESS_DIALOG : resource.h
  • IDD_MODIFYORDELETE : resource.h
  • IDD_MONTHCAL : resource.h
  • IDD_MTRECALC_FORM : resource.h
  • IDD_MUTEXES_DIALOG : resource.h
  • IDD_NETADDRVERIFIER_DIALOG : resource.h
  • IDD_NETWORK_ADDRESS_CONTROL : resource.h
  • IDD_NEWAMBIENTPROPERTY : Resource.H
  • IDD_NewControls_DIALOG : resource.h
  • IDD_NOPENDIALOG : resource.h
  • IDD_OBJECTSAFETY : Resource.H
  • IDD_OPTIONS : resource.h
  • IDD_OPTIONS_MARGINS : resource.h
  • IDD_OPTIONS_UNITS : resource.h
  • IDD_OPTIONS_WRAP : resource.h
  • IDD_OPTIONSPAGE1 : Resource.h
  • IDD_OPTIONSPAGE2 : Resource.h
  • IDD_OPTIONSPAGE3 : Resource.h
  • IDD_OPTIONSPAGE4 : Resource.h
  • IDD_OPTIONSPAGE5 : Resource.h
  • IDD_OPTIONSPAGE6 : Resource.h
  • IDD_OUTPUTWINDOW : Resource.H
  • IDD_PAGE1 : resource.h
  • IDD_PAGE2 : resource.h
  • IDD_PAGE3 : resource.h
  • IDD_PAGE4 : resource.h
  • IDD_PAGE5 : resource.h
  • IDD_PAGE6 : resource.h
  • IDD_PAGE_SETUP : resource.h
  • IDD_PAGE_SETUP_DIALOG : resource.h
  • IDD_PAGER_CONTROL : resource.h
  • IDD_PEN_WIDTHS : resource.h
  • IDD_PENDIALOG : resource.h
  • IDD_PENEDIT_CONFIGURE : otherids.h
  • IDD_PENEDIT_FEATURES : otherids.h
  • IDD_POINT_ARRAY : resource.h
  • IDD_POPULAR_PAGE : Resource.h
  • IDD_PROGCTRL : resource.h
  • IDD_PROP_RECT : resource.h
  • IDD_PROPERTIES : resource.h
  • IDD_PROPERTYBAG : Resource.H
  • IDD_PROPPAGE1 : resource.h
  • IDD_PROPPAGE2 : resource.h
  • IDD_PROPPAGE3 : resource.h
  • IDD_PROPPAGE4 : resource.h
  • IDD_PROPPAGE_BUTTON : resource.h
  • IDD_PROPPAGE_CIRC : resource.h
  • IDD_PROPPAGE_IMAGE : Resource.h
  • IDD_PROPPAGE_LICENSED : resource.h
  • IDD_PROPPAGE_LOCALIZE : resource.h
  • IDD_PROPPAGE_PAL : resource.h
  • IDD_PROPPAGE_PUSH : resource.h
  • IDD_PROPPAGE_SPINDIAL : resource.h
  • IDD_PROPPAGE_TESTHELP : resource.h
  • IDD_PROPPAGE_TIME : resource.h
  • IDD_PROPPAGE_XLIST : resource.h
  • IDD_PROPSHEETDEMO_DIALOG : resource.h
  • IDD_RATE : resource.h
  • IDD_RECALC_PROGRESS : resource.h
  • IDD_REGISTERCONTROLS : Resource.H
  • IDD_REGVIEW : resource.h
  • IDD_RES_PAGE : Resource.h
  • IDD_SCHEDULEENTRYINFODLG : resource.h
  • IDD_SCHEDULER_DIALOG : resource.h
  • IDD_SELECT_CONF : resource.h
  • IDD_SET_TABSTOPS : resource.h
  • IDD_SetPaneSize_FORM : resource.h
  • IDD_SLIDERCTRL : resource.h
  • IDD_SNAP_FORM : resource.h
  • IDD_SPEED : resource.h
  • IDD_SPIN_EDIT : otherids.h
  • IDD_SPINCTRL : resource.h
  • IDD_SPLASH : resource.h
  • IDD_SPLIT_BUTTON : resource.h
  • IDD_STAT_PAGE : resource.h
  • IDD_STATUSBARDEMO_FORM : resource.h
  • IDD_STRING_LIST : resource.h
  • IDD_STRINGLIST : resource.h
  • IDD_STYLE : resource.h
  • IDD_SUB_EDIT : resource.h
  • IDD_SUB_PENEDIT : resource.h
  • IDD_SUMM_PAGE : resource.h
  • IDD_TABCONTROL_FORM : resource.h
  • IDD_TABORDER : Resource.H
  • IDD_TASKDIALOGTEST_DIALOG : Resource.h
  • IDD_TASKSPANE_FORM : resource.h
  • IDD_TCEXTPAGE : Resource.H
  • IDD_TOOLBAR : resource.h
  • IDD_TOOLBARCTRL : resource.h
  • IDD_TOOLTIPDEMO_FORM : resource.h
  • IDD_TRAYMENU_DIALOG : resource.h
  • IDD_TREECTRL : resource.h
  • IDD_TYPED_PTR_ARRAY : resource.h
  • IDD_TYPED_PTR_LIST : resource.h
  • IDD_TYPED_PTR_MAP : resource.h
  • IDD_TYPEDLIST : resource.h
  • IDD_TYPELIB : resource.h
  • IDD_URLDIALOG : resource.h
  • IDD_VARIANTUSE_DIALOG : Resource.h
  • IDD_VERSIONINFO : resource.h
  • IDD_VIEWSELECT : resource.h
  • IDD_WNDCLASS_EDIT : otherids.h
  • IDE_ACCUM : resource.h
  • IDH_COMM_GROUPBOX : helpids.h
  • IDH_WHATISTHISTHING : popups.h
  • IDH_WORDPAD_ALIGN : helpids.h
  • IDH_WORDPAD_BOTTOMMARGIN : helpids.h
  • IDH_WORDPAD_CENTIMETERS : helpids.h
  • IDH_WORDPAD_CHECK_FORMATBAR : helpids.h
  • IDH_WORDPAD_CHECK_RULERBAR : helpids.h
  • IDH_WORDPAD_CHECK_STATUSBAR : helpids.h
  • IDH_WORDPAD_CHECK_TOOLBAR : helpids.h
  • IDH_WORDPAD_FILENEW_DOC : helpids.h
  • IDH_WORDPAD_FORMATTED : helpids.h
  • IDH_WORDPAD_INCHES : helpids.h
  • IDH_WORDPAD_INDENT_FIRST : helpids.h
  • IDH_WORDPAD_INDENT_LEFT : helpids.h
  • IDH_WORDPAD_INDENT_RIGHT : helpids.h
  • IDH_WORDPAD_LEFTMARGIN : helpids.h
  • IDH_WORDPAD_OPTIONS_AUTOWORDSEL : helpids.h
  • IDH_WORDPAD_PAGEBREAK : helpids.h
  • IDH_WORDPAD_PICAS : helpids.h
  • IDH_WORDPAD_POINTS : helpids.h
  • IDH_WORDPAD_RIGHTMARGIN : helpids.h
  • IDH_WORDPAD_SPACE_AFTER : helpids.h
  • IDH_WORDPAD_SPACE_BEFORE : helpids.h
  • IDH_WORDPAD_TAB_CLEARALL : helpids.h
  • IDH_WORDPAD_TABCLEAR : helpids.h
  • IDH_WORDPAD_TABSET : helpids.h
  • IDH_WORDPAD_TABSTOPS : helpids.h
  • IDH_WORDPAD_TEXTFILE : helpids.h
  • IDH_WORDPAD_TIMEDATE : helpids.h
  • IDH_WORDPAD_TOPMARGIN : helpids.h
  • IDH_WORDPAD_WORD6FILE : helpids.h
  • IDH_WORDPAD_WRAP_NO : helpids.h
  • IDH_WORDPAD_WRAP_RULER : helpids.h
  • IDH_WORDPAD_WRAP_WINDOW : helpids.h
  • IDI_ABOUTDLL : resource.h , Resource.h , resource.h
  • IDI_AUTOMATION : resource.h
  • IDI_CLASS_VIEW : Resource.h
  • IDI_CLASS_VIEW_HC : Resource.h
  • IDI_DRAGDROP : resource.h
  • IDI_DYNAMICHELP_VIEW : Resource.h
  • IDI_DYNAMICHELP_VIEW_HC : Resource.h
  • IDI_FACE_HAPPIER : resource.h
  • IDI_FACE_HAPPY : resource.h
  • IDI_FACE_NEUTRAL : resource.h
  • IDI_FACE_SAD : resource.h
  • IDI_FILE_VIEW : Resource.h
  • IDI_FILE_VIEW_HC : Resource.h
  • IDI_HDRICON1 : resource.h
  • IDI_HDRICON2 : resource.h
  • IDI_HELLO : resource.h
  • IDI_ICON1 : resource.h
  • IDI_ICON_DOC : resource.h
  • IDI_ICON_TEXT : resource.h
  • IDI_ICON_WRITE : resource.h
  • IDI_ICONLIST1 : resource.h
  • IDI_ICONLIST2 : resource.h
  • IDI_ICONLIST3 : resource.h
  • IDI_ICONLIST4 : resource.h
  • IDI_INTERFACE : resource.h
  • IDI_MAGNIFY : resource.h
  • IDI_MAIL : resource.h
  • IDI_NOICON : resource.h
  • IDI_NOTE : resource.h
  • IDI_OLE2 : resource.h
  • IDI_OLE2_1 : resource.h
  • IDI_OUTPUT_BAR : Resource.h
  • IDI_OUTPUT_BAR_HC : Resource.h
  • IDI_PROP_BAR_HC : Resource.h
  • IDI_PROPERTIES_BAR : Resource.h
  • IDI_REFRESH : Resource.h
  • IDI_RES_VIEW : Resource.h
  • IDI_RES_VIEW_HC : Resource.h
  • IDI_SPELL : Resource.h
  • IDI_WATCH_BAR : Resource.h
  • IDI_WATCH_BAR_HC : Resource.h
  • IDM_ABOUTBOX : resource.h , Resource.h , resource.h
  • IDM_BLACK : resource.h , testres1.h , resource.h
  • IDM_BLUE : resource.h , testres1.h , resource.h
  • IDM_BOUNCE : resource.h
  • IDM_CHANGEDATA : resource.h
  • IDM_CUSTOM : resource.h , testres1.h , resource.h
  • IDM_FAST : resource.h
  • IDM_GREEN : resource.h , testres1.h , resource.h
  • IDM_HELLO : resource.h
  • IDM_PALETTE_2COLUMN : resource.h
  • IDM_PALETTE_3COLUMN : resource.h
  • IDM_RED : resource.h , testres1.h , resource.h
  • IDM_SLOW : resource.h
  • IDM_TEST_BITMAP_BUTTON1 : resource.h
  • IDM_TEST_BITMAP_BUTTON2 : resource.h
  • IDM_TEST_BITMAP_BUTTON3 : resource.h
  • IDM_TEST_CUSTOM_LIST : resource.h
  • IDM_TEST_CUSTOM_MENU : resource.h
  • IDM_TEST_DERIVED_EDIT : resource.h
  • IDM_TEST_PENEDIT_CODE : resource.h
  • IDM_TEST_PENEDIT_FEATURES : resource.h
  • IDM_TEST_PENEDIT_TEMPLATE : resource.h
  • IDM_TEST_SPIN_EDIT : resource.h
  • IDM_TEST_SUB_EDIT : resource.h
  • IDM_TEST_WNDCLASS_EDIT : resource.h
  • IDM_VIEWPALETTE : resource.h
  • IDM_WHITE : testres1.h , resource.h
  • IDP_AFXOLEINIT_FAILED : resource.h
  • IDP_BUSY : resource.h
  • IDP_CANNOT_CREATE_AUTOCLIK : resource.h
  • IDP_CANT_RUN_STANDALONE : resource.h
  • IDP_CLIPBOARD_COPY_FAILED : resource.h
  • IDP_CLIPBOARD_CUT_FAILED : resource.h
  • IDP_CLIPBOARD_ZERO_SIZE : resource.h
  • IDP_ERR_CREATE_GUID : resource.h
  • IDP_ERR_GET_DEVICE_DEFAULTS : resource.h
  • IDP_ERR_GET_PRINTER_DC : resource.h
  • IDP_ERR_INIT_OLE : resource.h
  • IDP_ERR_LOCAL_ONLY : resource.h
  • IDP_ERR_NO_ADDRESS : resource.h
  • IDP_ERR_NOT_OK : resource.h
  • IDP_ERR_OPEN_CLIP : resource.h
  • IDP_FAILED_OPEN_DATABASE : resource.h
  • IDP_FAILED_TO_CREATE : resource.h , Resource.H , Resource.h , resource.h
  • IDP_GET_FROM_CLIPBOARD_FAILED : resource.h
  • IDP_INCOMPATIBLE_TYPE_VALUE : resource.h
  • IDP_NOTIMER : resource.h
  • IDP_OLE_INIT_FAILED : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.H , resource.h , Resource.h , resource.h
  • IDP_REST_OUTLOOK_PAGE : resource.h
  • IDP_SAVEINCOMPLETE : resource.h
  • IDP_SOCKETS_INIT_FAILED : Resource.h
  • IDP_TIMING_RESULT : resource.h
  • IDP_UNABLE_TO_CREATE : resource.h
  • IDP_UNABLE_TO_CREATE_INPROC : resource.h
  • IDP_UNABLE_TO_SHOW : resource.h
  • IDP_UNABLE_TO_SHOW_CALC : resource.h
  • IDR_ACLICKTYPE : resource.h
  • IDR_ADVANCED : resource.h
  • IDR_BACKWARD_MENU : Resource.h
  • IDR_BORDER_PALETTE : resource.h
  • IDR_BORDER_TYPE : resource.h
  • IDR_BOUNCE : resource.h
  • IDR_BOUNCETYPE : resource.h
  • IDR_BROWSEBAR : resource.h
  • IDR_BUILD : Resource.h
  • IDR_CImageTYPE : resource.h
  • IDR_CNTR_INPLACE : resource.h , Resource.h
  • IDR_CODE : resource.h
  • IDR_COLOR_BROWSEBAR : resource.h
  • IDR_COLOR_DEBUGBAR : resource.h
  • IDR_COLOR_EDITBAR : resource.h
  • IDR_COLOR_EDITBARHORZ : resource.h
  • IDR_COLOR_EDITBARVERT : resource.h
  • IDR_COLOR_MAINBAR : resource.h
  • IDR_COLOR_MENU : resource.h
  • IDR_COLOR_PALETTEBAR : resource.h
  • IDR_COLOR_RESOURCEBAR : resource.h
  • IDR_COLORTYPE : resource.h
  • IDR_CONTAINER_CONTEXT : Resource.H
  • IDR_CONTEXT_MENU : Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDR_CONTROL_CONTEXT : Resource.H
  • IDR_CONTRTYPE : resource.h
  • IDR_CONTRTYPE_CNTR_IP : resource.h
  • IDR_CUSTOMTYPE : resource.h
  • IDR_DBVLISTYPE : resource.h
  • IDR_DEBUGBAR : resource.h
  • IDR_DEVTYPE0 : Resource.h
  • IDR_DEVTYPE_CPP : Resource.h
  • IDR_DIALOG_MENU : resource.h
  • IDR_DIBTYPE : resource.h
  • IDR_DRAWCLIENTHANDLERS : resource.h
  • IDR_DRAWCLILIVEICONSHANDLER : resource.h
  • IDR_DRAWCLISEARCHHANDLER : resource.h
  • IDR_DRAWCLTYPE : resource.h
  • IDR_DRAWCLTYPE_CNTR_IP : resource.h
  • IDR_DUMMY : resource.h
  • IDR_DUMMY_MENU : Resource.h
  • IDR_DYMENUTYPE : resource.h
  • IDR_DYNAMIC_HELP : Resource.h
  • IDR_DYNAMIC_MENU : resource.h
  • IDR_DYNAMITYPE : resource.h
  • IDR_EDIT : Resource.h
  • IDR_EDIT_MENU : resource.h
  • IDR_EDITBAR : resource.h
  • IDR_EDITBARHORZ : resource.h
  • IDR_EDITBARVERT : resource.h
  • IDR_EDITOR_XML_SETTINGS_CPP : Resource.h
  • IDR_EDITOR_XML_SETTINGS_WEB : Resource.h
  • IDR_EDITPOPUP : resource.h
  • IDR_EXPLORE : resource.h
  • IDR_EXPTYPE : Resource.h
  • IDR_FAVORITES_POPUP : Resource.h
  • IDR_FILEMENU : resource.h
  • IDR_FONT : Resource.h
  • IDR_FONT_POPUP : Resource.h
  • IDR_FORMATBAR : resource.h
  • IDR_FORMATBAR_BIG : resource.h
  • IDR_FORWARD_MENU : Resource.h
  • IDR_HELLO : resource.h
  • IDR_HELLOTYPE : resource.h
  • IDR_HELPMENU : resource.h
  • IDR_HIERSVRTYPE : resource.h
  • IDR_HIERSVRTYPE_SRVR_EMB : resource.h
  • IDR_HIERSVRTYPE_SRVR_IP : resource.h
  • IDR_HISTORY_POPUP : Resource.h
  • IDR_HTML1 : resource.h
  • IDR_HTML_DELETEENTRIEDLG : resource.h
  • IDR_HTML_DELETESCHEDULEDLG : resource.h
  • IDR_HTML_ENTRYINFO_DLG : resource.h
  • IDR_HTML_MODIFYORDELETE : resource.h
  • IDR_HTML_SCHEDULEENTRYINFODLG : resource.h
  • IDR_HTML_SCHEDULER_DIALOG : resource.h
  • IDR_HTMLEDTYPE : resource.h
  • IDR_IEDTYPE : Resource.h
  • IDR_INPLACEMENU : resource.h
  • IDR_INPUTTYPE : resource.h
  • IDR_INSERT_COVERPAGE_MENU : Resource.h
  • IDR_INSERT_FOOTER_MENU : Resource.h
  • IDR_INSERT_HEADER_MENU : Resource.h
  • IDR_INSERT_PAGENUMBERS_MENU : Resource.h
  • IDR_INSERT_PICTURE_MENU : Resource.h
  • IDR_INSERT_SHAPES_MENU : Resource.h
  • IDR_INSERT_TABLE_MENU : Resource.h
  • IDR_INSERT_TEXTBOX_MENU : Resource.h
  • IDR_LINE_STYLE_POPUP : resource.h
  • IDR_LISTOUTPUT : testres2.h
  • IDR_MAIL_MERGE_MENU : Resource.h
  • IDR_MAIL_RECIPIENTS_MENU : Resource.h
  • IDR_MAILFRAME : resource.h
  • IDR_MAIN : resource.h
  • IDR_MAINFRAME : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.H , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDR_MAINFRAME1 : resource.h
  • IDR_MAINFRAME1_BIG : resource.h
  • IDR_MAINFRAME2 : Resource.h
  • IDR_MAINFRAME_A : resource.h
  • IDR_MAINFRAME_BIG : resource.h
  • IDR_MAINFRAME_U : resource.h
  • IDR_MDITABTYPE : resource.h
  • IDR_MENU1 : resource.h
  • IDR_MENU_ARGS : Resource.h
  • IDR_MENU_DIRS : Resource.h
  • IDR_MENU_IMAGES : Resource.h , resource.h
  • IDR_MENUIMAGES : resource.h
  • IDR_MENUSUTYPE : resource.h
  • IDR_MFCAVI : Resource.h
  • IDR_MFCBINTYPE : resource.h
  • IDR_MFCIETYPE : Resource.h
  • IDR_MMXSwaTYPE : Resource.h
  • IDR_MONO_BROWSEBAR : resource.h
  • IDR_MONO_DEBUGBAR : resource.h
  • IDR_MONO_EDITBAR : resource.h
  • IDR_MONO_EDITBARHORZ : resource.h
  • IDR_MONO_EDITBARVERT : resource.h
  • IDR_MONO_MAINBAR : resource.h
  • IDR_MONO_PALETTEBAR : resource.h
  • IDR_MONO_RESOURCEBAR : resource.h
  • IDR_MSMONETYPE : Resource.h
  • IDR_MSTYPE : Resource.h
  • IDR_NPTYPE : resource.h
  • IDR_OCLIENTTYPE : resource.h
  • IDR_OCLIENTTYPE_CNTR_IP : resource.h
  • IDR_OUTLOOTYPE : resource.h
  • IDR_OUTPUTLOGEDIT_CONTEXT : Resource.H
  • IDR_OUTTYPE : resource.h
  • IDR_OWNERDTYPE : resource.h
  • IDR_PAGELAYOUT_BRINGTOFRONT : Resource.h
  • IDR_PAGELAYOUT_COLUMNS : Resource.h
  • IDR_PAGELAYOUT_MARGINS : Resource.h
  • IDR_PAGELAYOUT_ORIENTATION : Resource.h
  • IDR_PAGELAYOUT_SENDTOBACK : Resource.h
  • IDR_PAGELAYOUT_TEXTWRAPPING : Resource.h
  • IDR_PALETTE : resource.h
  • IDR_PALETTEBAR : resource.h
  • IDR_PALETTTYPE : resource.h
  • IDR_PARA_BULLETS_MENU : Resource.h
  • IDR_PARA_LINESPACING_MENU : Resource.h
  • IDR_PARA_MULTILIST_MENU : Resource.h
  • IDR_PARA_NUMBERING_MENU : Resource.h
  • IDR_PARAGRAPH : Resource.h
  • IDR_PASTE_MENU : resource.h
  • IDR_PIECES : resource.h
  • IDR_POPUP : resource.h
  • IDR_POPUP_CONTROLBAR : Resource.h
  • IDR_POPUP_DROP_MDITABS : Resource.h , resource.h
  • IDR_POPUP_MDITABS : Resource.h , resource.h
  • IDR_POPUP_OLBAR : resource.h
  • IDR_POPUP_OLBAR2003 : resource.h
  • IDR_POPUP_OUTPUT : Resource.h
  • IDR_POPUP_RESOURCE : Resource.h
  • IDR_POPUP_SOLUTION : Resource.h
  • IDR_POPUP_SORT : Resource.h
  • IDR_POPUP_STYLE_20007 : resource.h
  • IDR_POPUP_TOOLBAR : Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDR_POPUPMENUS : resource.h
  • IDR_POPUPS : resource.h
  • IDR_PROPERTIES : Resource.h , resource.h
  • IDR_PROPERTY : resource.h
  • IDR_RebarTestTYPE : Resource.h
  • IDR_RECALCTYPE : resource.h
  • IDR_REFERENCES_ADDTEXT : Resource.h
  • IDR_REFERENCES_INSERTCITATION : Resource.h
  • IDR_REFERENCES_NEXTFOOTNOTE : Resource.h
  • IDR_RESOURCEBAR : resource.h
  • IDR_REVIEW_CHANGES_ACCEPT : Resource.h
  • IDR_REVIEW_CHANGES_REJECT : Resource.h
  • IDR_REVIEW_COMMENTS_DELETE : Resource.h
  • IDR_REVIEW_COMPARE_COMPARE_COMPARE : Resource.h
  • IDR_REVIEW_COMPARE_SHOWSOURCE : Resource.h
  • IDR_REVIEW_TRACKING_BALLOONS : Resource.h
  • IDR_REVIEW_TRACKING_REVIEWINGPANE : Resource.h
  • IDR_REVIEW_TRACKING_SHOW : Resource.h
  • IDR_REVIEW_TRACKING_TRACKCHANGES : Resource.h
  • IDR_RIBBON : resource.h
  • IDR_RIBBON_MENU_1 : resource.h
  • IDR_RIBBON_MENU_2 : resource.h
  • IDR_RIBBONTYPE : resource.h
  • IDR_RollupControlBaTYPE : Resource.h
  • IDR_ROWLISTYPE : resource.h
  • IDR_ScreenCapTYPE : Resource.h
  • IDR_SCRIBBTYPE : resource.h
  • IDR_SCRIBBTYPE_SRVR_EMB : resource.h
  • IDR_SCRIBBTYPE_SRVR_IP : resource.h
  • IDR_SETBARTYPE : resource.h
  • IDR_SHAPESTYPE : resource.h
  • IDR_SIZE_TOOLBAR : resource.h
  • IDR_SLIDERTYPE : resource.h
  • IDR_SNAPTYPE : resource.h
  • IDR_SOLUTION_EXPLORER : Resource.h
  • IDR_SORT : Resource.h
  • IDR_SPIROTYPE : resource.h
  • IDR_SPLIT2TYPE : resource.h
  • IDR_SPLIT3TYPE : resource.h
  • IDR_SPLIT_DROPDOWN_MENU : resource.h
  • IDR_SRVR_EMBEDDED : resource.h
  • IDR_SRVR_INPLACE : resource.h
  • IDR_SRVR_INPLACE_BIG : resource.h
  • IDR_STANDARDBAR : resource.h
  • IDR_START : Resource.h
  • IDR_STATECTYPE : resource.h
  • IDR_STATUSTYPE : resource.h
  • IDR_TABBEDTYPE : resource.h
  • IDR_TABCONTYPE : resource.h
  • IDR_TASKSPTYPE : resource.h
  • IDR_TC98TYPE : Resource.H
  • IDR_TC98TYPE_CNTR_IP : Resource.H
  • IDR_TCEXTPAGE : Resource.H
  • IDR_TEXT_POPUP : resource.h
  • IDR_TEXTTYPE : resource.h
  • IDR_TEXTTYPE_EMBEDDED : resource.h
  • IDR_TEXTTYPE_INPLACE : resource.h
  • IDR_THEME : resource.h
  • IDR_THEME_MENU : Resource.h , resource.h
  • IDR_THEME_MENU_STATIC : Resource.h
  • IDR_TOOLBAR : resource.h
  • IDR_TOOLBAR1 : resource.h
  • IDR_TOOLBAR_IMAGE_COLLECTION : Resource.h
  • IDR_TOOLBAR_IMAGES : resource.h
  • IDR_TOOLBAR_IMAGES_BIG : resource.h
  • IDR_TOOLBAR_IMAGES_HC : resource.h
  • IDR_TOOLBAR_MENU_IMAGES : resource.h
  • IDR_TOOLBAR_RESOURCE : Resource.h
  • IDR_TOOLBATYPE : resource.h
  • IDR_TOOLTITYPE : resource.h
  • IDR_TRACKETYPE : resource.h
  • IDR_TYPELIBWND : resource.h
  • IDR_VERSION1 : resource.h
  • IDR_VIEWS_POPUP : Resource.h
  • IDR_WEB : resource.h
  • IDR_WINDOWS_MENU : resource.h
  • IDR_WORKSPACE_TOOLBAR : resource.h
  • IDR_WORKSPTYPE : resource.h
  • IDR_WRITE_BORDERS_MENU : Resource.h
  • IDR_WRITE_FIND_MENU : Resource.h
  • IDR_WRITE_FONTCASE_MENU : Resource.h
  • IDR_WRITE_PASTE_MENU : Resource.h
  • IDR_WRITE_SELECT_MENU : Resource.h
  • IDR_WRITE_STYLECHANGE_MENU : Resource.h
  • IDS_ABOUT_INFO : resource.h
  • IDS_ABOUTBOX : resource.h , Resource.h , resource.h
  • IDS_ACTIVESTATE : Resource.H
  • IDS_ADDRESS : Resource.h
  • IDS_ADV_TOOLBAR : resource.h
  • IDS_ALL_DOC : resource.h
  • IDS_ALL_IMAGES : Resource.h
  • IDS_AMODENAME_SHOWGRABHANDLES : Resource.H
  • IDS_AMODENAME_SHOWHATCHING : Resource.H
  • IDS_AMODENAME_UIDEAD : Resource.H
  • IDS_AMODENAME_USERMODE : Resource.H
  • IDS_APROPNAME_BACKCOLOR : Resource.H
  • IDS_APROPNAME_DISPLAYNAME : Resource.H
  • IDS_APROPNAME_FONT : Resource.H
  • IDS_APROPNAME_FORECOLOR : Resource.H
  • IDS_APROPNAME_LOCALEID : Resource.H
  • IDS_APROPNAME_MESSAGEREFLECT : Resource.H
  • IDS_APROPNAME_SCALEUNITS : Resource.H
  • IDS_APROPNAME_SHOWGRABHANDLES : Resource.H
  • IDS_APROPNAME_SHOWHATCHING : Resource.H
  • IDS_APROPNAME_SUPPORTSMNEMONICS : Resource.H
  • IDS_APROPNAME_TEXTALIGN : Resource.H
  • IDS_APROPNAME_UIDEAD : Resource.H
  • IDS_APROPNAME_USERMODE : Resource.H
  • IDS_AUTOREGFAILED : resource.h
  • IDS_BACK : Resource.h
  • IDS_BADCOMMANDLINE : resource.h
  • IDS_BEST_OF_THE_WEB : Resource.h
  • IDS_BLACK : resource.h
  • IDS_BLANK_CHARS_NOT_ALLOWED : resource.h
  • IDS_BLUE : resource.h
  • IDS_BOUNDPROP_CHANGED : Resource.H
  • IDS_BOUNDPROP_REQUESTEDIT : Resource.H
  • IDS_BUILD_TOOLBAR : Resource.h
  • IDS_BUTTON : resource.h , Resource.h
  • IDS_BUTTON_PPG : resource.h
  • IDS_BUTTON_PPG_CAPTION : resource.h
  • IDS_CALLFAILED : resource.h
  • IDS_CALLSUCCEEDED : resource.h
  • IDS_CANNOT_LOAD_DIB : resource.h
  • IDS_CANNOT_PLAY_SOUND : resource.h
  • IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 : resource.h
  • IDS_CANNOT_SAVE_DIB : resource.h
  • IDS_CANNOTOPENFILE : resource.h
  • IDS_CANT_LOAD : resource.h
  • IDS_CAPTION : resource.h
  • IDS_CAPTION_FORMAT : resource.h
  • IDS_CAPTION_NOTHREADS : resource.h
  • IDS_CENTER : resource.h
  • IDS_CENTERED : resource.h
  • IDS_CENTIMETERS : resource.h
  • IDS_CHILDWND_TITLE : resource.h
  • IDS_CIRC : resource.h
  • IDS_CIRC_PPG : resource.h
  • IDS_CIRC_PPG_CAPTION : resource.h
  • IDS_CLIP_FILENAME : resource.h
  • IDS_CLIP_RTF : resource.h
  • IDS_CLIP_TEXT : resource.h
  • IDS_CLOSE_TEXT : resource.h
  • IDS_CM_ABBREV : resource.h
  • IDS_COLOR_NAME_BLUE : resource.h
  • IDS_COLOR_NAME_CYAN : resource.h
  • IDS_COLOR_NAME_FIRST : resource.h
  • IDS_COLOR_NAME_GREEN : resource.h
  • IDS_COLOR_NAME_MAGENTA : resource.h
  • IDS_COLOR_NAME_RED : resource.h
  • IDS_COLOR_NAME_WHITE : resource.h
  • IDS_COLOR_NAME_YELLOW : resource.h
  • IDS_COLORHELPFMT : resource.h
  • IDS_COMPLETE : resource.h
  • IDS_COMPONENT0_DESCRIPTION : resource.h
  • IDS_COMPONENT0_TITLE : resource.h
  • IDS_COMPONENT_TYPE : resource.h
  • IDS_CONFIG_CAPTION : Resource.h
  • IDS_CONTAINERINFOOBJECTHEADER : Resource.H
  • IDS_CONTAINERINFOSTATEHEADER : Resource.H
  • IDS_CONTAINERINFOWINDOWHEADER : Resource.H
  • IDS_CONTAINEROPTIONS : Resource.H
  • IDS_CONTINUE_RECALC_BEFORE_SAVE : resource.h
  • IDS_CONTROLHASNOMETHODS : Resource.H
  • IDS_CONTROLLOGGINGOPTIONS : Resource.H
  • IDS_COPYFAILED : Resource.H
  • IDS_CREATEFAILED : Resource.H
  • IDS_CUSTOMIZE : resource.h
  • IDS_DEFAULT_FONT : resource.h
  • IDS_DEFAULTFONT : resource.h
  • IDS_DEFAULTTEXTFONT : resource.h
  • IDS_DIB_TOO_BIG : resource.h
  • IDS_DIRFULL : resource.h
  • IDS_DISK_SPACE : resource.h
  • IDS_DISK_SPACE_UNAVAIL : resource.h
  • IDS_DISPATCHEXCEPTION : Resource.H
  • IDS_DOCSTRINGTCExtPage : Resource.H
  • IDS_DONE : resource.h
  • IDS_DT1 : resource.h
  • IDS_DT10 : resource.h
  • IDS_DT11 : resource.h
  • IDS_DT12 : resource.h
  • IDS_DT13 : resource.h
  • IDS_DT2 : resource.h
  • IDS_DT3 : resource.h
  • IDS_DT4 : resource.h
  • IDS_DT5 : resource.h
  • IDS_DT6 : resource.h
  • IDS_DT7 : resource.h
  • IDS_DT8 : resource.h
  • IDS_DT9 : resource.h
  • IDS_DUMMY_UNDO_ACTION : Resource.h
  • IDS_EDIT_MYITEM_1 : resource.h
  • IDS_EDIT_MYITEM_2 : resource.h
  • IDS_EDIT_TOOLBAR : Resource.h
  • IDS_EDITFAILED : Resource.h
  • IDS_EMBEDDED_OPTIONS : resource.h
  • IDS_EMPTYSTATE : Resource.H
  • IDS_END_BUTTON : Resource.h
  • IDS_END_BUTTON_1 : Resource.h
  • IDS_ENTERTITLE : resource.h
  • IDS_ERROR : resource.h
  • IDS_ERROR_GETEXPORTERFILTER : Resource.h
  • IDS_ERROR_GETPAGES : Resource.h
  • IDS_ERROR_PROPERTYFRAME : Resource.h
  • IDS_ERROR_SAVE : Resource.h
  • IDS_ERRORLOADINGSCRIPT : Resource.H
  • IDS_ERRORREADINGFROMFILE : Resource.H
  • IDS_ERRORWRITINGTOFILE : Resource.H
  • IDS_ERRSPACE : resource.h
  • IDS_EXCEP_CANTRESIZEPALETTE : resource.h
  • IDS_EXE_DOC : resource.h
  • IDS_EXTRAARGUMENT : resource.h
  • IDS_FALSE : Resource.H
  • IDS_FAVORITES : Resource.h
  • IDS_FILE_EXISTS : resource.h
  • IDS_FILE_NOT_SAVED : resource.h
  • IDS_FILETYPES : Resource.h
  • IDS_FINISHED_SEARCH : resource.h
  • IDS_FOLDER_POPUP_CAPTION : resource.h
  • IDS_FONT : Resource.h
  • IDS_FONT_NAME : resource.h
  • IDS_FORMATS : resource.h
  • IDS_FORMATTING : resource.h
  • IDS_FORWARD : Resource.h
  • IDS_FREE_STUFF : Resource.h
  • IDS_FREQUENTLY_ASKED_QUESTIONS : Resource.h
  • IDS_GET_FASTER_INTERNET_ACCESS : Resource.h
  • IDS_HELLO : resource.h
  • IDS_HELPFILETCExtPage : Resource.H
  • IDS_HOME : Resource.h
  • IDS_IDATAOBJECT : resource.h
  • IDS_IDISPATCH : resource.h
  • IDS_ILLEGAL_VALUE : resource.h
  • IDS_IMAGE : Resource.h
  • IDS_IMAGE_PPG : Resource.h
  • IDS_IMAGE_PPG_CAPTION : Resource.h
  • IDS_IMPLEMENTEDCATEGORIES : Resource.H
  • IDS_INCH1_ABBREV : resource.h
  • IDS_INCH2_ABBREV : resource.h
  • IDS_INCH3_ABBREV : resource.h
  • IDS_INCH4_ABBREV : resource.h
  • IDS_INCHES : resource.h
  • IDS_INI_CLSCTX : resource.h
  • IDS_INI_CONFIG : resource.h
  • IDS_INI_SHOWALLINTERFACES : resource.h
  • IDS_INI_SHOWCFI : resource.h
  • IDS_INI_SHOWCLASSIDS : resource.h
  • IDS_INI_SHOWCONTAINERS : resource.h
  • IDS_INI_SHOWCONTROLS : resource.h
  • IDS_INI_SHOWINSERTABLE : resource.h
  • IDS_INI_SHOWINTERNAL : resource.h
  • IDS_INI_SHOWNOTINSERTABLE : resource.h
  • IDS_INI_SHOWOLE1OBJECTS : resource.h
  • IDS_INI_SHOWTYPELIBS : resource.h
  • IDS_INI_WNDPOS : resource.h
  • IDS_INIFILE : resource.h
  • IDS_INITIAL_KEY : resource.h
  • IDS_INITIAL_STRING : resource.h
  • IDS_INITIAL_VALUE : resource.h
  • IDS_INTERNET_START_PAGE : Resource.h
  • IDS_INVALID_FONTSIZE : resource.h
  • IDS_INVALID_MEASUREMENT : resource.h
  • IDS_INVALID_NUMBER : resource.h
  • IDS_INVALIDDATE : resource.h
  • IDS_INVALIDTIME : resource.h
  • IDS_ITYPEINFO : resource.h
  • IDS_IVIEWERSNOTFOUND1 : resource.h
  • IDS_IVIEWERSNOTFOUND2 : resource.h
  • IDS_IVIEWERSNOTFOUND3 : resource.h
  • IDS_IVIEWERSNOTFOUND4 : resource.h
  • IDS_JUSTIFIED : resource.h
  • IDS_KEY_NOT_FOUND : resource.h
  • IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN : resource.h
  • IDS_LEFT : resource.h
  • IDS_LICENSED : resource.h
  • IDS_LICENSED_PPG : resource.h
  • IDS_LICENSED_PPG_CAPTION : resource.h
  • IDS_LINKS : Resource.h
  • IDS_LOADCONTROLFAILED : Resource.H
  • IDS_LOADEDSTATE : Resource.H
  • IDS_LOADLIBFAILED : resource.h
  • IDS_LOCALIZE : resource.h
  • IDS_LOCALIZE_PPG : resource.h
  • IDS_LOCALIZE_PPG_CAPTION : resource.h
  • IDS_LOGEVENTFORMAT : Resource.H
  • IDS_LOGPROPERTYCHANGEFORMAT : Resource.H
  • IDS_LOGPROPERTYREQUESTEDITFORMAT : Resource.H
  • IDS_MAIN_TOOLBAR : resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h , Resource.h , resource.h
  • IDS_MAPI_FAIL : resource.h
  • IDS_MAPILOAD_FAILED : resource.h
  • IDS_MATH_COPR_NOTPRESENT : resource.h
  • IDS_MATH_COPR_PRESENT : resource.h
  • IDS_MEASUREMENT_RANGE : resource.h
  • IDS_MENU_TEST : resource.h
  • IDS_METAFILEWINDOWTITLE : Resource.H
  • IDS_MICROSOFT_HOME_PAGE : Resource.h
  • IDS_MULTIPLESELECTION : Resource.H
  • IDS_MUSCRL32_DLL_REQUIRED : resource.h
  • IDS_NEED_RECALC_BEFORE_SAVE : resource.h
  • IDS_NEWPROPERTY : Resource.H
  • IDS_NOBOUNCETEMPLATE : resource.h
  • IDS_NOCOMMONPROPERTIES : Resource.H
  • IDS_NODFVIEW : Resource.H
  • IDS_NODLLNAME : resource.h
  • IDS_NOENTRYPOINT : resource.h
  • IDS_NOHELLOTEMPLATE : resource.h
  • IDS_NOINFO : resource.h
  • IDS_NOMORETABS : resource.h
  • IDS_NOOLEVIEW : Resource.H
  • IDS_NOPROJECT : resource.h
  • IDS_NOPROPERTYPAGES : Resource.H
  • IDS_NOSCRIPTING : Resource.H
  • IDS_NOTDLLOROCX : resource.h
  • IDS_NOTHING : resource.h
  • IDS_NOWRAP : resource.h
  • IDS_OBJECT_PROPERTIES : resource.h
  • IDS_OEMTEXT_DOC : resource.h
  • IDS_OLEINITFAILED : resource.h
  • IDS_ONLINE_SUPPORT : Resource.h
  • IDS_OPENSTATE : Resource.H
  • IDS_OPENSTORAGEFAILED : Resource.H
  • IDS_OPTIONS : resource.h
  • IDS_OUTPUTWINDOWTITLE : Resource.H
  • IDS_PAL : resource.h
  • IDS_PAL_PPG : resource.h
  • IDS_PAL_PPG_CAPTION : resource.h
  • IDS_PALETTE : resource.h
  • IDS_PARAMETER : Resource.H
  • IDS_PATH : Resource.H
  • IDS_PGUPFAILED : Resource.h
  • IDS_PHYSICAL_MEM : resource.h
  • IDS_PICA_ABBREV : resource.h
  • IDS_PICAS : resource.h
  • IDS_PICTURE_UNAVAILABLE : resource.h
  • IDS_PLEASE_SELECT_COLOR : resource.h
  • IDS_PLEASE_WAIT : resource.h
  • IDS_POINT_ABBREV : resource.h
  • IDS_POINTS : resource.h
  • IDS_PRINT : Resource.h
  • IDS_PRIVATE_CF_DESCR : resource.h
  • IDS_PROGID : Resource.H
  • IDS_PROJNAME : Resource.H , resource.h
  • IDS_PROPERTY : Resource.H
  • IDS_PROPERTYEDITALLOWED : Resource.H
  • IDS_PROPERTYEDITDENIED : Resource.H
  • IDS_PROPERTYEDITREQUESTFORMAT : Resource.H
  • IDS_PROPERTYVALUE : Resource.H
  • IDS_PROPSHT_CAPTION : resource.h
  • IDS_PURPLE : resource.h
  • IDS_PUSH : resource.h
  • IDS_PUSH_PPG : resource.h
  • IDS_PUSH_PPG_CAPTION : resource.h
  • IDS_RADIO_END : Resource.h
  • IDS_RADIO_END_1 : Resource.h
  • IDS_RADIO_START : Resource.h
  • IDS_RECALCULATING : resource.h
  • IDS_RED : resource.h
  • IDS_REFRESH : Resource.h
  • IDS_REG_GROUPBYKIND : resource.h
  • IDS_REG_TYPELIB : resource.h
  • IDS_REG_WNDPOS : resource.h
  • IDS_REGISTRYKEY : resource.h
  • IDS_REQUIREDCATEGORIES : Resource.H
  • IDS_RESOURCE_TOOLBAR : Resource.h
  • IDS_RICHED_LOAD_FAIL : resource.h
  • IDS_RICHTEXT_DOC : resource.h
  • IDS_RIGHT : resource.h
  • IDS_RTF_DOCUMENT : resource.h
  • IDS_RTF_OPTIONS : resource.h
  • IDS_SAVE_FORMAT : resource.h
  • IDS_SAVE_FORMAT_TEXT : resource.h
  • IDS_SAVE_UNSUPPORTED : resource.h
  • IDS_SAVETOPROPERTYBAGFAILED : Resource.H
  • IDS_SAVETOSTORAGEFAILED : Resource.H
  • IDS_SAVETOSTREAMFAILED : Resource.H
  • IDS_SAVING : resource.h
  • IDS_SCRIPT_FILES : Resource.H
  • IDS_SCRIPTERRORFORMAT : Resource.H
  • IDS_SEARCH : Resource.h
  • IDS_SEARCH_THE_WEB : Resource.h
  • IDS_SELECT_DWORD_TO_REMOVE : resource.h
  • IDS_SELECT_DWORD_TO_UPDATE : resource.h
  • IDS_SELECT_ENTRY : resource.h
  • IDS_SELECT_ENTRY_TO_BE_REMOVED : resource.h
  • IDS_SELECT_ENTRY_TO_BE_UPDATED : resource.h
  • IDS_SELECT_INTEGER : resource.h
  • IDS_SELECT_POINT_TO_BE_REMOVED : resource.h
  • IDS_SELECT_POINT_TO_BE_UPDATED : resource.h
  • IDS_SELECT_STRING_FIRST : resource.h
  • IDS_SELECTED_PROMPT : resource.h
  • IDS_SEND_FEEDBACK : Resource.h
  • IDS_SERVERNOTFOUND : Resource.H
  • IDS_SHAREVIOLATION : resource.h
  • IDS_SPINDIAL : resource.h
  • IDS_SPINDIAL_PPG : resource.h
  • IDS_SPINDIAL_PPG_CAPTION : resource.h
  • IDS_STANDARD : resource.h
  • IDS_STOP : Resource.h
  • IDS_STORAGE_FILES : Resource.H
  • IDS_STREAM_FILES : Resource.H
  • IDS_STRING1001 : Resource.h
  • IDS_STRING1002 : Resource.h
  • IDS_STRING1003 : Resource.h
  • IDS_STRING105 : resource.h
  • IDS_STRING106 : resource.h
  • IDS_STRING107 : resource.h
  • IDS_STRING108 : resource.h
  • IDS_STRING109 : resource.h
  • IDS_STRING130 : Resource.h
  • IDS_STRING131 : Resource.h
  • IDS_STRING_NOT_FOUND_FMT : Resource.h
  • IDS_TESTERROR : resource.h
  • IDS_TESTHELP : resource.h
  • IDS_TESTHELP_PPG : resource.h
  • IDS_TESTHELP_PPG_CAPTION : resource.h
  • IDS_TEXT_DOC : resource.h
  • IDS_TEXT_DOCUMENT : resource.h
  • IDS_TEXT_OPTIONS : resource.h
  • IDS_TF_BUTTONS : resource.h
  • IDS_TIME : resource.h
  • IDS_TIME_PPG : resource.h
  • IDS_TIME_PPG_CAPTION : resource.h
  • IDS_TIMER : resource.h
  • IDS_TITLE_FORMATBAR : resource.h
  • IDS_TITLE_MENUBAR : resource.h
  • IDS_TITLE_TOOLBAR : resource.h
  • IDS_TITLETCExtPage : Resource.H
  • IDS_TOOMANYFILES : resource.h
  • IDS_TRUE : Resource.H
  • IDS_TRY_AGAIN : resource.h
  • IDS_TYPE : Resource.H
  • IDS_UAT_BACKSPACE : Resource.h
  • IDS_UAT_CUT : Resource.h
  • IDS_UAT_DELETE : Resource.h
  • IDS_UAT_DELETEDATA : Resource.h
  • IDS_UAT_DRAGDROP : Resource.h
  • IDS_UAT_ENTER : Resource.h
  • IDS_UAT_INDENT : Resource.h
  • IDS_UAT_INDENTDATA : Resource.h
  • IDS_UAT_INSERTDATA : Resource.h
  • IDS_UAT_PASTE : Resource.h
  • IDS_UAT_REPLACE : Resource.h
  • IDS_UAT_TAB : Resource.h
  • IDS_UAT_TYPING : Resource.h
  • IDS_UAT_UNDEFINED : Resource.h
  • IDS_UAT_UNINDENT : Resource.h
  • IDS_UAT_UNKNOWN : Resource.h
  • IDS_UIACTIVESTATE : Resource.H
  • IDS_UNABLETOREPRESENT : Resource.H
  • IDS_UNKCOLOR : resource.h
  • IDS_UNKNOWN : resource.h
  • IDS_UNKNOWNDISPIDFORMAT : Resource.H
  • IDS_UNRECOGNIZEDFLAG : resource.h
  • IDS_UNREGISTERSERVERFAILED : Resource.H
  • IDS_UNSPECIFIEDEXCEPTION : Resource.H
  • IDS_UNSPECIFIEDSOURCE : Resource.H
  • IDS_USAGE : resource.h
  • IDS_VALUE : Resource.H
  • IDS_VTBOOL : Resource.H
  • IDS_VTBSTR : Resource.H
  • IDS_VTCOLOR : Resource.H
  • IDS_VTFONT : Resource.H
  • IDS_VTI2 : Resource.H
  • IDS_VTI4 : Resource.H
  • IDS_WARNING_BITDEPTH : Resource.h
  • IDS_WARNING_DEBUG : Resource.h
  • IDS_WEB_TOOLBAR : resource.h
  • IDS_WEB_TUTORIAL : Resource.h
  • IDS_WINDOWED : Resource.H
  • IDS_WINDOWLESS : Resource.H
  • IDS_WINDOWS_MANAGER : resource.h , Resource.h , resource.h
  • IDS_WINWORD2_DOC : resource.h
  • IDS_WINWORD6_DOC : resource.h
  • IDS_WNDCLASS_NOT_REGISTERED : resource.h
  • IDS_WORD6_DOCUMENT : resource.h
  • IDS_WORD6_OPTIONS : resource.h
  • IDS_WORD6_WARNING : resource.h
  • IDS_WORD6_WARNING_BUTTONS : resource.h
  • IDS_WRAPTORULER : resource.h
  • IDS_WRAPTOWINDOW : resource.h
  • IDS_WRITE_DOC : resource.h
  • IDS_WRITE_OPTIONS : resource.h
  • IDS_WRITEPROTECT : resource.h
  • IDS_WRONG_DISPLAY_SETTINGS : resource.h , Resource.h , resource.h
  • IDS_XLIST : resource.h
  • IDS_XLIST_PPG : resource.h
  • IDS_XLIST_PPG_CAPTION : resource.h
  • IDS_YOU_CHOSE : resource.h
  • IDS_YOU_PICKED_COLOR : resource.h
  • IDSOUND_CORRECT : resource.h
  • IDSOUND_GIVEUP : resource.h
  • IDSOUND_GOODBYE : resource.h
  • IDSOUND_INCORRECT : resource.h
  • IDSOUND_QUESTION : resource.h
  • IDSOUND_WELCOME : resource.h
  • IDW_BROWSE_BAR : resource.h
  • IDW_COMBO : resource.h
  • IDW_DEBUG_BAR : resource.h
  • IDW_EDIT_BAR : resource.h
  • IDW_MAIN_BAR : resource.h
  • IDW_PALETTE_BAR : resource.h
  • IDW_RESOURCE_BAR : resource.h
  • IDW_STYLES : resource.h
  • IE_CANUNDO : penwin.h
  • IE_DOCOMMAND : penwin.h
  • IE_EMPTYUNDOBUFFER : penwin.h
  • IE_GETAPPDATA : penwin.h
  • IE_GETBKGND : penwin.h
  • IE_GETCOMMAND : penwin.h
  • IE_GETCOUNT : penwin.h
  • IE_GETDRAWOPTS : penwin.h
  • IE_GETERASERTIP : penwin.h
  • IE_GETFORMAT : penwin.h
  • IE_GETGESTURE : penwin.h
  • IE_GETGRIDORIGIN : penwin.h
  • IE_GETGRIDPEN : penwin.h
  • IE_GETGRIDSIZE : penwin.h
  • IE_GETINK : penwin.h
  • IE_GETINKINPUT : penwin.h
  • IE_GETINKRECT : penwin.h
  • IE_GETMENU : penwin.h
  • IE_GETMODE : penwin.h
  • IE_GETMODIFY : penwin.h
  • IE_GETNOTIFY : penwin.h
  • IE_GETPAINTDC : penwin.h
  • IE_GETPDEVENT : penwin.h
  • IE_GETPENTIP : penwin.h
  • IE_GETRECOG : penwin.h
  • IE_GETSECURITY : penwin.h
  • IE_GETSEL : penwin.h
  • IE_GETSELCOUNT : penwin.h
  • IE_GETSELITEMS : penwin.h
  • IE_GETSTYLE : penwin.h
  • IE_MSGFIRST : penwin.h
  • IE_SETAPPDATA : penwin.h
  • IE_SETBKGND : penwin.h
  • IE_SETDRAWOPTS : penwin.h
  • IE_SETERASERTIP : penwin.h
  • IE_SETFORMAT : penwin.h
  • IE_SETGRIDORIGIN : penwin.h
  • IE_SETGRIDPEN : penwin.h
  • IE_SETGRIDSIZE : penwin.h
  • IE_SETINK : penwin.h
  • IE_SETINKINPUT : penwin.h
  • IE_SETMODE : penwin.h
  • IE_SETMODIFY : penwin.h
  • IE_SETNOTIFY : penwin.h
  • IE_SETPENTIP : penwin.h
  • IE_SETRECOG : penwin.h
  • IE_SETSECURITY : penwin.h
  • IE_SETSEL : penwin.h
  • IE_UNDO : penwin.h
  • IEB_BIT_CENTER : penwin.h
  • IEB_BIT_STRETCH : penwin.h
  • IEB_BIT_TILE : penwin.h
  • IEB_BIT_UL : penwin.h
  • IEB_BRUSH : penwin.h
  • IEB_DEFAULT : penwin.h
  • IEB_OWNERDRAW : penwin.h
  • IEDITCONTROL : itemtemp.h
  • IEDO_FAST : penwin.h
  • IEDO_NONE : penwin.h
  • IEDO_RESERVED : penwin.h
  • IEDO_SAVEUPSTROKES : penwin.h
  • IEGI_ALL : penwin.h
  • IEGI_SELECTION : penwin.h
  • IEI_CROP : penwin.h
  • IEI_DISCARD : penwin.h
  • IEI_MOVE : penwin.h
  • IEI_RESERVED : penwin.h
  • IEI_RESIZE : penwin.h
  • IEM_CLEAR : penwin.h
  • IEM_COPY : penwin.h
  • IEM_CUT : penwin.h
  • IEM_ERASE : penwin.h
  • IEM_LASSO : penwin.h
  • IEM_PASTE : penwin.h
  • IEM_PROPERTIES : penwin.h
  • IEM_RESIZE : penwin.h
  • IEM_SELECTALL : penwin.h
  • IEM_UNDO : penwin.h
  • IEM_USER : penwin.h
  • IEMODE_ERASE : penwin.h
  • IEMODE_LASSO : penwin.h
  • IEMODE_READY : penwin.h
  • IEN_EDIT : penwin.h
  • IEN_FOCUS : penwin.h
  • IEN_NULL : penwin.h
  • IEN_PAINT : penwin.h
  • IEN_PDEVENT : penwin.h
  • IEN_PROPERTIES : penwin.h
  • IEN_RESERVED : penwin.h
  • IEN_SCROLL : penwin.h
  • IER_ERROR : penwin.h
  • IER_MEMERR : penwin.h
  • IER_NO : penwin.h
  • IER_NOCOMMAND : penwin.h
  • IER_NOGESTURE : penwin.h
  • IER_NOPDEVENT : penwin.h
  • IER_NOTINPAINT : penwin.h
  • IER_OK : penwin.h
  • IER_OWNERDRAW : penwin.h
  • IER_PARAMERR : penwin.h
  • IER_PENDATA : penwin.h
  • IER_SCALE : penwin.h
  • IER_SECURITY : penwin.h
  • IER_SELECTION : penwin.h
  • IER_YES : penwin.h
  • IEREC_ALL : penwin.h
  • IEREC_GESTURE : penwin.h
  • IEREC_NONE : penwin.h
  • IEREC_RESERVED : penwin.h
  • IES_BORDER : penwin.h
  • IES_HSCROLL : penwin.h
  • IES_OWNERDRAW : penwin.h
  • IES_VSCROLL : penwin.h
  • IESEC_NOCOPY : penwin.h
  • IESEC_NOCUT : penwin.h
  • IESEC_NOERASE : penwin.h
  • IESEC_NOGET : penwin.h
  • IESEC_NOINK : penwin.h
  • IESEC_NOPASTE : penwin.h
  • IESEC_NOSET : penwin.h
  • IESEC_NOUNDO : penwin.h
  • IESEC_RESERVED : penwin.h
  • IESF_ALL : penwin.h
  • IESF_PENTIP : penwin.h
  • IESF_SELECTION : penwin.h
  • IESF_STROKE : penwin.h
  • IESF_TIPCOLOR : penwin.h
  • IESF_TIPWIDTH : penwin.h
  • IESI_APPEND : penwin.h
  • IESI_REPLACE : penwin.h
  • IMPLEMENT_DUAL_ERRORINFO : mfcdual.h
  • IMPLEMENT_OLECREATE_SINGLE : calcdlg.cpp
  • IMPLTYPE_DEFAULTINTERFACE : TCItem.H
  • IMPLTYPE_DEFAULTSOURCE : TCItem.H
  • IMPLTYPE_MASK : TCItem.H
  • IN_CHANGE : penwin.h
  • IN_CLOSE : penwin.h
  • IN_COMMAND : penwin.h
  • IN_ERASEBKGND : penwin.h
  • IN_GESTURE : penwin.h
  • IN_HSCROLL : penwin.h
  • IN_KILLFOCUS : penwin.h
  • IN_MEMERR : penwin.h
  • IN_MODECHANGED : penwin.h
  • IN_PAINT : penwin.h
  • IN_PDEVENT : penwin.h
  • IN_POSTPAINT : penwin.h
  • IN_PREPAINT : penwin.h
  • IN_PROPERTIES : penwin.h
  • IN_SETFOCUS : penwin.h
  • IN_UPDATE : penwin.h
  • IN_VSCROLL : penwin.h
  • INKWIDTH_MAXIMUM : penwin.h
  • INKWIDTH_MINIMUM : penwin.h
  • IS_WIN30_DIB : dibapi.h
  • IsAlcBitAnsi : penwin.h
  • isodigit : makehm.cpp
  • ISR_BADINDEX : penwin.h
  • ISR_BADINKSET : penwin.h
  • ISR_ERROR : penwin.h
  • ISTATICTEXT : itemtemp.h
  • iSycNull : penwin.h
  • ITEM_HEIGHT : ObjView.h
  • IX_END : penwin.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- p -

  • PAL_E_CANTRESIZEPALETTE : palctl.h
  • PALVERSION : dibapi.h
  • PCM_ADDDEFAULTS : penwin.h
  • PCM_DOPOLLING : penwin.h
  • PCM_INVERT : penwin.h
  • PCM_PENUP : penwin.h
  • PCM_RANGE : penwin.h
  • PCM_RECTBOUND : penwin.h
  • PCM_RECTEXCLUDE : penwin.h
  • PCM_RGNBOUND : penwin.h
  • PCM_RGNEXCLUDE : penwin.h
  • PCM_TAPNHOLD : penwin.h
  • PCM_TIMEOUT : penwin.h
  • PCMR_ALREADYCOLLECTING : penwin.h
  • PCMR_APPTERMINATED : penwin.h
  • PCMR_DISPLAYERR : penwin.h
  • PCMR_ERROR : penwin.h
  • PCMR_EVENTLOCK : penwin.h
  • PCMR_INVALID_PACKETID : penwin.h
  • PCMR_INVALIDCOLLECTION : penwin.h
  • PCMR_OK : penwin.h
  • PCMR_OVERFLOW : penwin.h
  • PCMR_SELECT : penwin.h
  • PCMR_TAP : penwin.h
  • PCMR_TERMBOUND : penwin.h
  • PCMR_TERMEX : penwin.h
  • PCMR_TERMINVERT : penwin.h
  • PCMR_TERMPENUP : penwin.h
  • PCMR_TERMRANGE : penwin.h
  • PCMR_TERMTIMEOUT : penwin.h
  • PDC_BARREL1 : penwin.h
  • PDC_BARREL2 : penwin.h
  • PDC_BARREL3 : penwin.h
  • PDC_INTEGRATED : penwin.h
  • PDC_INVERT : penwin.h
  • PDC_PROXIMITY : penwin.h
  • PDC_RANGE : penwin.h
  • PDC_RELATIVE : penwin.h
  • PDK_BARREL1 : penwin.h
  • PDK_BARREL2 : penwin.h
  • PDK_BARREL3 : penwin.h
  • PDK_DOWN : penwin.h
  • PDK_DRIVER : penwin.h
  • PDK_INKSTOPPED : penwin.h
  • PDK_INVERTED : penwin.h
  • PDK_NULL : penwin.h
  • PDK_OUTOFRANGE : penwin.h
  • PDK_PENIDMASK : penwin.h
  • PDK_SWITCHES : penwin.h
  • PDK_TIPMASK : penwin.h
  • PDK_TRANSITION : penwin.h
  • PDK_UNUSED10 : penwin.h
  • PDK_UNUSED1000 : penwin.h
  • PDK_UNUSED20 : penwin.h
  • PDK_UP : penwin.h
  • PDR_ABORT : penwin.h
  • PDR_CANCEL : penwin.h
  • PDR_COMPRESSED : penwin.h
  • PDR_ERROR : penwin.h
  • PDR_HIT : penwin.h
  • PDR_INKSETERR : penwin.h
  • PDR_MEMERR : penwin.h
  • PDR_NA : penwin.h
  • PDR_NOHIT : penwin.h
  • PDR_OEMDATAERR : penwin.h
  • PDR_OK : penwin.h
  • PDR_PNDTERR : penwin.h
  • PDR_PNTINDEXERR : penwin.h
  • PDR_SCALINGERR : penwin.h
  • PDR_SCTERR : penwin.h
  • PDR_STRKINDEXERR : penwin.h
  • PDR_TIMESTAMPERR : penwin.h
  • PDR_USERDATAERR : penwin.h
  • PDR_VERSIONERR : penwin.h
  • PDT_ANGLEXY : penwin.h
  • PDT_ANGLEZ : penwin.h
  • PDT_BARRELROTATION : penwin.h
  • PDT_HEIGHT : penwin.h
  • PDT_NULL : penwin.h
  • PDT_OEMSPECIFIC : penwin.h
  • PDT_PRESSURE : penwin.h
  • PDTS_ARBITRARY : penwin.h
  • PDTS_COMPRESS2NDDERIV : penwin.h
  • PDTS_COMPRESSED : penwin.h
  • PDTS_COMPRESSMETHOD : penwin.h
  • PDTS_DISPLAY : penwin.h
  • PDTS_HIENGLISH : penwin.h
  • PDTS_HIMETRIC : penwin.h
  • PDTS_LOMETRIC : penwin.h
  • PDTS_NOCOLINEAR : penwin.h
  • PDTS_NOCOLLINEAR : penwin.h
  • PDTS_NOEMPTYSTROKES : penwin.h
  • PDTS_NOOEMDATA : penwin.h
  • PDTS_NOPENINFO : penwin.h
  • PDTS_NOTICK : penwin.h
  • PDTS_NOUPPOINTS : penwin.h
  • PDTS_NOUSER : penwin.h
  • PDTS_SCALEMASK : penwin.h
  • PDTS_STANDARDSCALE : penwin.h
  • PDTT_ALL : penwin.h
  • PDTT_COLINEAR : penwin.h
  • PDTT_COLLINEAR : penwin.h
  • PDTT_COMPRESS : penwin.h
  • PDTT_DECOMPRESS : penwin.h
  • PDTT_DEFAULT : penwin.h
  • PDTT_OEMDATA : penwin.h
  • PDTT_PENINFO : penwin.h
  • PDTT_UPPOINTS : penwin.h
  • PE_BEGINDATA : penwin.h
  • PE_BEGININPUT : penwin.h
  • PE_BUFFERWARNING : penwin.h
  • PE_ENDDATA : penwin.h
  • PE_ENDINPUT : penwin.h
  • PE_GETINKINGINFO : penwin.h
  • PE_GETPCMINFO : penwin.h
  • PE_MOREDATA : penwin.h
  • PE_PENDOWN : penwin.h
  • PE_PENMOVE : penwin.h
  • PE_PENUP : penwin.h
  • PE_RESULT : penwin.h
  • PE_SETTARGETS : penwin.h
  • PE_TERMINATED : penwin.h
  • PE_TERMINATING : penwin.h
  • PEN_ILLEGALCHAR : paredit.h
  • PENMARKERSIZE : StdAfx.h
  • PENREG_DEFAULT : penwin.h
  • PENREG_WILLHANDLEMOUSE : penwin.h
  • PENTIP_HEIGHTDEFAULT : penwin.h
  • PENTIP_HILITE : penwin.h
  • PENTIP_NIBDEFAULT : penwin.h
  • PENTIP_OPAQUE : penwin.h
  • PENTIP_TRANSPARENT : penwin.h
  • PENVER : penwin.h
  • PES_ALL : paredit.h
  • PES_LETTERS : paredit.h
  • PES_NUMBERS : paredit.h
  • PES_OTHERCHARS : paredit.h
  • PH_DEFAULT : penwin.h
  • PH_MAX : penwin.h
  • PH_MIN : penwin.h
  • PHW_ALL : penwin.h
  • PHW_ANGLEXY : penwin.h
  • PHW_ANGLEZ : penwin.h
  • PHW_BARRELROTATION : penwin.h
  • PHW_HEIGHT : penwin.h
  • PHW_NONE : penwin.h
  • PHW_OEMSPECIFIC : penwin.h
  • PHW_PDK : penwin.h
  • PHW_PRESSURE : penwin.h
  • PI : piece.h
  • PID_CURRENT : penwin.h
  • PII_CLIPSTOP : penwin.h
  • PII_INKCLIPRECT : penwin.h
  • PII_INKCLIPRGN : penwin.h
  • PII_INKPENTIP : penwin.h
  • PII_INKSTOPRECT : penwin.h
  • PII_INKSTOPRGN : penwin.h
  • PII_SAVEBACKGROUND : penwin.h
  • PIT_RGNBOUND : penwin.h
  • PIT_RGNEXCLUDE : penwin.h
  • PIT_TAPNHOLD : penwin.h
  • PIT_TIMEOUT : penwin.h
  • PLAY_VERSION_10_DATA : penwin.h
  • PLAY_VERSION_20_DATA : penwin.h
  • PMI_BEDIT : penwin.h
  • PMI_CXTABLET : penwin.h
  • PMI_CYTABLET : penwin.h
  • PMI_ENABLEFLAGS : penwin.h
  • PMI_IMECOLOR : penwin.h
  • PMI_INDEXFROMRGB : penwin.h
  • PMI_PENTIP : penwin.h
  • PMI_RCCHANGE : penwin.h
  • PMI_RGBFROMINDEX : penwin.h
  • PMI_SAVE : penwin.h
  • PMI_SYSFLAGS : penwin.h
  • PMI_SYSREC : penwin.h
  • PMI_TICKREF : penwin.h
  • PMI_TIMEOUT : penwin.h
  • PMI_TIMEOUTGEST : penwin.h
  • PMI_TIMEOUTSEL : penwin.h
  • PMIR_ERROR : penwin.h
  • PMIR_INDEX : penwin.h
  • PMIR_INIERROR : penwin.h
  • PMIR_INVALIDBOXEDITINFO : penwin.h
  • PMIR_NA : penwin.h
  • PMIR_OK : penwin.h
  • PMIR_VALUE : penwin.h
  • PMSC_BEDITCHANGE : penwin.h
  • PMSC_GETHRC : penwin.h
  • PMSC_GETINKINGINFO : penwin.h
  • PMSC_GETPCMINFO : penwin.h
  • PMSC_GETSYMBOLCOUNT : penwin.h
  • PMSC_GETSYMBOLS : penwin.h
  • PMSC_INKSTOP : penwin.h
  • PMSC_LOADPW : penwin.h
  • PMSC_SETHRC : penwin.h
  • PMSC_SETINKINGINFO : penwin.h
  • PMSC_SETPCMINFO : penwin.h
  • PMSC_SETSYMBOLS : penwin.h
  • PMSCL_LOADED : penwin.h
  • PMSCL_UNLOADED : penwin.h
  • PMSCL_UNLOADING : penwin.h
  • PRINTDLGORD : resource.h
  • PRINTER_FONT : formatba.cpp
  • PRNSETUPDLGORD : resource.h
  • PROGRESS_MAX : StatusBarDemoView.cpp
  • psh1 : resource.h
  • psh10 : resource.h
  • psh11 : resource.h
  • psh12 : resource.h
  • psh13 : resource.h
  • psh14 : resource.h
  • psh15 : resource.h
  • psh16 : resource.h
  • psh2 : resource.h
  • psh3 : resource.h
  • psh4 : resource.h
  • psh5 : resource.h
  • psh6 : resource.h
  • psh7 : resource.h
  • psh8 : resource.h
  • psh9 : resource.h
  • PWE_ACTIONHANDLES : penwin.h
  • PWE_AUTOWRITE : penwin.h
  • PWE_INPUTCURSOR : penwin.h
  • PWE_LENS : penwin.h
  • PWF_BEDIT : penwin.h
  • PWF_ENHANCED : penwin.h
  • PWF_FULL : penwin.h
  • PWF_HEDIT : penwin.h
  • PWF_IEDIT : penwin.h
  • PWF_INKDISPLAY : penwin.h
  • PWF_PEN : penwin.h
  • PWF_RC1 : penwin.h
  • PWF_RECOGNIZER : penwin.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- r -

  • rad1 : resource.h
  • rad10 : resource.h
  • rad11 : resource.h
  • rad12 : resource.h
  • rad13 : resource.h
  • rad14 : resource.h
  • rad15 : resource.h
  • rad16 : resource.h
  • rad2 : resource.h
  • rad3 : resource.h
  • rad4 : resource.h
  • rad5 : resource.h
  • rad6 : resource.h
  • rad7 : resource.h
  • rad8 : resource.h
  • rad9 : resource.h
  • RC_LDEFAULT : penwin.h
  • RC_LDEFAULTFLAGS : penwin.h
  • RC_WDEFAULT : penwin.h
  • RC_WDEFAULTFLAGS : penwin.h
  • RCD_BT : penwin.h
  • RCD_DEFAULT : penwin.h
  • RCD_LR : penwin.h
  • RCD_RL : penwin.h
  • RCD_TB : penwin.h
  • RCF_BOLD : util.h
  • RCF_ITALIC : util.h
  • RCF_NODEFAULT : util.h
  • RCF_NORMAL : util.h
  • RCF_STRIKEOUT : util.h
  • RCF_TRUETYPEONLY : util.h
  • RCF_UNDERLINE : util.h
  • RCIP_ALLANSICHAR : penwin.h
  • RCIP_MASK : penwin.h
  • RCO_BOXCROSS : penwin.h
  • RCO_BOXED : penwin.h
  • RCO_COLDRECOG : penwin.h
  • RCO_DISABLEGESMAP : penwin.h
  • RCO_DODEFAULT : penwin.h
  • RCO_NOFLASHCURSOR : penwin.h
  • RCO_NOFLASHUNKNOWN : penwin.h
  • RCO_NOHIDECURSOR : penwin.h
  • RCO_NOHOOK : penwin.h
  • RCO_NOPOINTEREVENT : penwin.h
  • RCO_NOSPACEBREAK : penwin.h
  • RCO_SAVEALLDATA : penwin.h
  • RCO_SAVEBACKGROUND : penwin.h
  • RCO_SAVEHPENDATA : penwin.h
  • RCO_SUGGEST : penwin.h
  • RCO_TABLETCOORD : penwin.h
  • RCOR_LEFT : penwin.h
  • RCOR_NORMAL : penwin.h
  • RCOR_RIGHT : penwin.h
  • RCOR_UPSIDEDOWN : penwin.h
  • RCP_LEFTHAND : penwin.h
  • RCP_MAPCHAR : penwin.h
  • RCRT_ALREADYPROCESSED : penwin.h
  • RCRT_DEFAULT : penwin.h
  • RCRT_GESTURE : penwin.h
  • RCRT_GESTURETOKEYS : penwin.h
  • RCRT_GESTURETRANSLATED : penwin.h
  • RCRT_NORECOG : penwin.h
  • RCRT_NOSYMBOLMATCH : penwin.h
  • RCRT_PRIVATE : penwin.h
  • RCRT_UNIDENTIFIED : penwin.h
  • rct1 : resource.h
  • rct2 : resource.h
  • rct3 : resource.h
  • rct4 : resource.h
  • RD_ALL : doctype.h
  • RD_DEFAULT : doctype.h
  • RD_EMBEDDED : doctype.h
  • RD_EXE : doctype.h
  • RD_NATIVE : doctype.h
  • RD_OEMTEXT : doctype.h
  • RD_RICHTEXT : doctype.h
  • RD_TEXT : doctype.h
  • RD_WINWORD2 : doctype.h
  • RD_WINWORD6 : doctype.h
  • RD_WORDPAD : doctype.h
  • RD_WRITE : doctype.h
  • REC_ABORT : penwin.h
  • REC_ALC : penwin.h
  • REC_BADEVENTREF : penwin.h
  • REC_BADHPENDATA : penwin.h
  • REC_BUFFERTOOSMALL : penwin.h
  • REC_BUSY : penwin.h
  • REC_CLVERIFY : penwin.h
  • REC_DEBUG : penwin.h
  • REC_DICT : penwin.h
  • REC_DONE : penwin.h
  • REC_ERRORLEVEL : penwin.h
  • REC_GUIDE : penwin.h
  • REC_HREC : penwin.h
  • REC_HWND : penwin.h
  • REC_INVALIDREF : penwin.h
  • REC_LANGUAGE : penwin.h
  • REC_NA : penwin.h
  • REC_NOCOLLECTION : penwin.h
  • REC_NOINPUT : penwin.h
  • REC_NOTABLET : penwin.h
  • REC_OEM : penwin.h
  • REC_OK : penwin.h
  • REC_OOM : penwin.h
  • REC_OVERFLOW : penwin.h
  • REC_PARAMERROR : penwin.h
  • REC_PCM : penwin.h
  • REC_POINTEREVENT : penwin.h
  • REC_RECTBOUND : penwin.h
  • REC_RECTEXCLUDE : penwin.h
  • REC_RESULTMODE : penwin.h
  • REC_TERMBOUND : penwin.h
  • REC_TERMEX : penwin.h
  • REC_TERMOEM : penwin.h
  • REC_TERMPENUP : penwin.h
  • REC_TERMRANGE : penwin.h
  • REC_TERMTIMEOUT : penwin.h
  • RECTHEIGHT : dibapi.h
  • RECTWIDTH : dibapi.h
  • RED : Scheduler.h
  • REGENTRY : wordpad.cpp
  • REGENTRYX : wordpad.cpp
  • REPLACEDLGORD : resource.h
  • ResetAlcBitAnsi : penwin.h
  • RGBBLACK : shadow.h , iview.h
  • RGBBLUE : shadow.h , iview.h
  • RGBBROWN : shadow.h , iview.h , shadow.h
  • RGBCYAN : iview.h , shadow.h
  • RGBGRAY : shadow.h , iview.h
  • RGBGREEN : iview.h , shadow.h
  • RGBLTBLUE : shadow.h , iview.h
  • RGBLTCYAN : iview.h , shadow.h
  • RGBLTGRAY : shadow.h , iview.h
  • RGBLTGREEN : shadow.h , iview.h
  • RGBLTMAGENTA : iview.h , shadow.h
  • RGBLTRED : shadow.h , iview.h , shadow.h
  • RGBMAGENTA : shadow.h , iview.h , shadow.h
  • RGBRED : iview.h , shadow.h
  • RGBWHITE : iview.h , shadow.h
  • RGBYELLOW : shadow.h , iview.h , shadow.h
  • RHH_BOX : penwin.h
  • RHH_STD : penwin.h
  • RINGWIDTH : piece.h
  • rmj : version.h
  • rmm : version.h
  • RPA_DBCSPRIORITY : penwin.h
  • RPA_DEFAULT : penwin.h
  • RPA_HEDIT : penwin.h
  • RPA_KANJIFIXEDBEDIT : penwin.h
  • RRM_COMPLETE : penwin.h
  • RRM_NEWLINE : penwin.h
  • RRM_STROKE : penwin.h
  • RRM_SYMBOL : penwin.h
  • RRM_WORD : penwin.h
  • RULERBARHEIGHT : ruler.cpp
  • rup : version.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- s -

  • SafePutts : regsvr.cpp
  • SCH_ADVISE : penwin.h
  • SCH_FORCE : penwin.h
  • SCH_NONE : penwin.h
  • SCIM_INSERT : penwin.h
  • SCIM_OVERWRITE : penwin.h
  • scr1 : resource.h
  • scr2 : resource.h
  • scr3 : resource.h
  • scr4 : resource.h
  • scr5 : resource.h
  • scr6 : resource.h
  • scr7 : resource.h
  • scr8 : resource.h
  • SetAlcBitAnsi : penwin.h
  • SETRECT : itemtemp.cpp
  • SGRC_DICTIONARY : penwin.h
  • SGRC_INIFILE : penwin.h
  • SGRC_NA : penwin.h
  • SGRC_OK : penwin.h
  • SGRC_PARAMERROR : penwin.h
  • SGRC_RC : penwin.h
  • SGRC_RECOGNIZER : penwin.h
  • SGRC_USER : penwin.h
  • SHADOWWIDTH : shadow.cpp
  • SHARED_HANDLERS : stdafx.h
  • SHCNF_ACCEPT_INTERRUPTS : FolderBar.cpp , Page6.cpp
  • SHCNF_ACCEPT_NON_INTERRUPTS : FolderBar.cpp , Page6.cpp
  • SIGNON_REV : makehm.cpp
  • SIGNON_VER : makehm.cpp
  • SIH_ALLANSICHAR : penwin.h
  • SRH_HOOKALL : penwin.h
  • SSA_DOWN : penwin.h
  • SSA_PENTIP : penwin.h
  • SSA_PENTIPCLASS : penwin.h
  • SSA_PENTIPTABLE : penwin.h
  • SSA_SELECT : penwin.h
  • SSA_TIME : penwin.h
  • SSA_USER : penwin.h
  • SSA_USERCLASS : penwin.h
  • SSA_USERTABLE : penwin.h
  • SSH_DL : penwin.h
  • SSH_DR : penwin.h
  • SSH_LD : penwin.h
  • SSH_LU : penwin.h
  • SSH_RD : penwin.h
  • SSH_RU : penwin.h
  • SSH_UL : penwin.h
  • SSH_UR : penwin.h
  • STATIC_CLASS : MailBar.cpp
  • stc1 : resource.h
  • stc10 : resource.h
  • stc11 : resource.h
  • stc12 : resource.h
  • stc13 : resource.h
  • stc14 : resource.h
  • stc15 : resource.h
  • stc16 : resource.h
  • stc17 : resource.h
  • stc18 : resource.h
  • stc19 : resource.h
  • stc2 : resource.h
  • stc20 : resource.h
  • stc21 : resource.h
  • stc22 : resource.h
  • stc23 : resource.h
  • stc24 : resource.h
  • stc25 : resource.h
  • stc26 : resource.h
  • stc27 : resource.h
  • stc28 : resource.h
  • stc29 : resource.h
  • stc3 : resource.h
  • stc30 : resource.h
  • stc31 : resource.h
  • stc32 : resource.h
  • stc4 : resource.h
  • stc5 : resource.h
  • stc6 : resource.h
  • stc7 : resource.h
  • stc8 : resource.h
  • stc9 : resource.h
  • STEP_DISTANCE : piece.h
  • SubPenMsgFromWpLp : penwin.h
  • SYV_APPGESTUREMASK : penwin.h
  • SYV_BACKSPACE : penwin.h
  • SYV_BEGINOR : penwin.h
  • SYV_CIRCLELOA : penwin.h
  • SYV_CIRCLELOZ : penwin.h
  • SYV_CIRCLEUPA : penwin.h
  • SYV_CIRCLEUPZ : penwin.h
  • SYV_CLEAR : penwin.h
  • SYV_CLEARCHAR : penwin.h
  • SYV_CLEARWORD : penwin.h
  • SYV_CONTEXT : penwin.h
  • SYV_COPY : penwin.h
  • SYV_CORRECT : penwin.h
  • SYV_CUT : penwin.h
  • SYV_EMPTY : penwin.h
  • SYV_ENDOR : penwin.h
  • SYV_EXTENDSELECT : penwin.h
  • SYV_HELP : penwin.h
  • SYV_INSERT : penwin.h
  • SYV_KKCONVERT : penwin.h
  • SYV_LASSO : penwin.h
  • SYV_NULL : penwin.h
  • SYV_OR : penwin.h
  • SYV_PASTE : penwin.h
  • SYV_RETURN : penwin.h
  • SYV_SELECTFIRST : penwin.h
  • SYV_SELECTLAST : penwin.h
  • SYV_SELECTLEFT : penwin.h
  • SYV_SELECTRIGHT : penwin.h
  • SYV_SHAPEELLIPSE : penwin.h
  • SYV_SHAPELINE : penwin.h
  • SYV_SHAPEMAX : penwin.h
  • SYV_SHAPEMIN : penwin.h
  • SYV_SHAPERECT : penwin.h
  • SYV_SOFTNEWLINE : penwin.h
  • SYV_SPACE : penwin.h
  • SYV_SPACENULL : penwin.h
  • SYV_TAB : penwin.h
  • SYV_UNDO : penwin.h
  • SYV_UNKNOWN : penwin.h
  • SYV_USER : penwin.h
  • SyvCharacterToSymbol : penwin.h
  • SYVHI_ANSI : penwin.h
  • SYVHI_GESTURE : penwin.h
  • SYVHI_KANJI : penwin.h
  • SYVHI_SHAPE : penwin.h
  • SYVHI_SPECIAL : penwin.h
  • SYVHI_UNICODE : penwin.h
  • SYVHI_VKEY : penwin.h
  • SyvKanjiToSymbol : penwin.h
  • szVerName : version.h
  • szVerUser : version.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- t -

  • tcstocs : summinfo.cpp
  • tdDrawRect : shadow.h
  • TerminationFromWpLp : penwin.h
  • TH_FORCE : penwin.h
  • TH_QUERY : penwin.h
  • TH_SUGGEST : penwin.h
  • TIMER_ID : np.h
  • TIP_ERASECOLOR : penwin.h
  • TOTALITEMS : itemtemp.h
  • TOTALRINGS : piece.h
  • TOTALWHEELS : piece.h
  • TPD_COLINEAR : penwin.h
  • TPD_COLLINEAR : penwin.h
  • TPD_EMPTYSTROKES : penwin.h
  • TPD_EVERYTHING : penwin.h
  • TPD_OEMDATA : penwin.h
  • TPD_PENINFO : penwin.h
  • TPD_PHW : penwin.h
  • TPD_RECALCSIZE : penwin.h
  • TPD_TIME : penwin.h
  • TPD_UPPOINTS : penwin.h
  • TPD_USER : penwin.h
  • TPT_CLOSEST : penwin.h
  • TPT_DEFAULT : penwin.h
  • TPT_INTERSECTINK : penwin.h
  • TPT_TEXTUAL : penwin.h
  • TRACES_PER_TICK_FAST : StdAfx.h
  • TRACES_PER_TICK_SLOW : StdAfx.h
  • TRAIN_BOTH : penwin.h
  • TRAIN_CUSTOM : penwin.h
  • TRAIN_DEFAULT : penwin.h
  • TRAIN_NONE : penwin.h
  • TRAIN_RESET : penwin.h
  • TRAIN_REVERT : penwin.h
  • TRAIN_SAVE : penwin.h
  • TRY_DUAL : mfcdual.h
  • TT_FONT : formatba.cpp
  • TTT_BUF_SIZE : CmnCtrl1.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- u -

  • UM_RECALCLAYOUT : MainFrm.cpp
  • UM_TRAYNOTIFY : TrayMenuDlg.cpp
  • UPD_ALL : mainfrm.h
  • UPD_NOIFACELISTVIEW : mainfrm.h
  • UPD_NOINTERFACEVIEW : mainfrm.h
  • UPD_NOOBJECTVIEW : mainfrm.h
  • UPD_NORELOAD : mainfrm.h
  • UPDATE_HINT_SUM : recalcvw.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- v -

  • VC_EXTRALEAN : stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.H , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h , StdAfx.h , stdafx.h
  • VERT_TEXTOFFSET : stdafx.h
  • VWM_MOUSELEFTDOWN : penwin.h
  • VWM_MOUSELEFTUP : penwin.h
  • VWM_MOUSEMOVE : penwin.h
  • VWM_MOUSERIGHTDOWN : penwin.h
  • VWM_MOUSERIGHTUP : penwin.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- w -

  • WCR_CLOSERECOGNIZER : penwin.h
  • WCR_CONFIGDIALOG : penwin.h
  • WCR_DEFAULT : penwin.h
  • WCR_GETALCPRIORITY : penwin.h
  • WCR_GETANSISTATE : penwin.h
  • WCR_GETDIRECTION : penwin.h
  • WCR_GETHAND : penwin.h
  • WCR_INITRECOGNIZER : penwin.h
  • WCR_PRIVATE : penwin.h
  • WCR_PWVERSION : penwin.h
  • WCR_QUERY : penwin.h
  • WCR_QUERYLANGUAGE : penwin.h
  • WCR_RCCHANGE : penwin.h
  • WCR_RECOGNAME : penwin.h
  • WCR_SETALCPRIORITY : penwin.h
  • WCR_SETANSISTATE : penwin.h
  • WCR_SETDIRECTION : penwin.h
  • WCR_SETHAND : penwin.h
  • WCR_TRAIN : penwin.h
  • WCR_TRAINCUSTOM : penwin.h
  • WCR_TRAINDIRTY : penwin.h
  • WCR_TRAINMAX : penwin.h
  • WCR_TRAINSAVE : penwin.h
  • WCR_USERCHANGE : penwin.h
  • WCR_VERSION : penwin.h
  • WIDTHBYTES : dibapi.h
  • WINVER : targetver.h
  • WLT_EMPTY : penwin.h
  • WLT_STRING : penwin.h
  • WLT_STRINGTABLE : penwin.h
  • WLT_WORDLIST : penwin.h
  • WM_CTLINIT : penwin.h
  • WM_DOREALIZE : diblook.h
  • WM_GLOBALRCCHANGE : penwin.h
  • WM_HEDITCTL : penwin.h
  • WM_HOOKRCRESULT : penwin.h
  • WM_IDLEACTIVATE : ctrlbars.h
  • WM_OUTPUTBUFFERHASDATA : idataobj.h
  • WM_PENCTL : penwin.h
  • WM_PENEVENT : penwin.h
  • WM_PENMISC : penwin.h
  • WM_PENMISCINFO : penwin.h
  • WM_RCRESULT : penwin.h
  • WM_SKB : penwin.h
  • WM_USER_CHANGE_OBJECT_PROPERTIES : propdlg.h
  • WM_USER_ONCMDMSG : bounce.h
  • WM_USER_PREPARE_TO_CLOSE : bounce.h
  • WM_USER_RECALC_DONE : mtrecalc.h
  • WM_USER_RECALC_IN_PROGRESS : mtrecalc.h
  • WM_USER_RECALC_NOW : mtrecalc.h
  • WP_CLOSEBUTTON : MSMVisualManager.cpp
  • WP_MAXBUTTON : MSMVisualManager.cpp
  • WP_MINBUTTON : MSMVisualManager.cpp
  • WP_RESTOREBUTTON : MSMVisualManager.cpp
  • WPD_CHARFORMAT : MSOffice2007DemoView.cpp , stdafx.h
  • WPD_PARAFORMAT : MSOffice2007DemoView.cpp , stdafx.h
  • WPM_BARSTATE : wordpad.h
  • wPntAll : penwin.h
  • WRITE : tlbodl.cpp
  • WRITE1 : tlbodl.cpp
  • WRITE2 : tlbodl.cpp
  • WRITEBSTR : tlbodl.cpp
  • WRITECR : tlbodl.cpp
  • WRITELINE : tlbodl.cpp
  • WRITELINE2 : tlbodl.cpp
  • WRITERAW : tlbodl.cpp
  • WSyvToKanji : penwin.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- y -

  • YELLOW : Scheduler.h
Generated on Sat Nov 23 2024 17:01:16 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • CalcError : calcdlg.h
  • DrawShape : drawtool.h
  • Operator : calcdlg.h
  • SelectMode : drawtool.cpp
  • SHAPE_COLOR_ENUM : shapeobj.h
  • SHAPE_STYLE : shapeobj.h
  • SizesEnum : ChildView.h
  • TRACE_COMMAND : spiroDoc.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • b
  • c
  • e
  • g
  • l
  • m
  • n
  • o
  • p
  • r
  • s

- b -

  • black : shapeobj.h
  • blue : shapeobj.h

- c -

  • CHANGE_COLOR : spiroDoc.h

- e -

  • ellipse : shapeobj.h , drawtool.h
  • EMPTY_COMMAND : spiroDoc.h
  • ErrDivideByZero : calcdlg.h
  • ErrNone : calcdlg.h

- g -

  • green : shapeobj.h

- l -

  • line : drawtool.h
  • LINE_TO : spiroDoc.h

- m -

  • move : drawtool.cpp
  • MOVE_TO : spiroDoc.h

- n -

  • netSelect : drawtool.cpp
  • none : drawtool.cpp

- o -

  • OpAdd : calcdlg.h
  • OpDivide : calcdlg.h
  • OpMultiply : calcdlg.h
  • OpNone : calcdlg.h
  • OpSubtract : calcdlg.h

- p -

  • poly : drawtool.h

- r -

  • rect : drawtool.h
  • rectangle : shapeobj.h
  • red : shapeobj.h
  • rounded_rectangle : shapeobj.h
  • roundRect : drawtool.h

- s -

  • selection : drawtool.h
  • SET_PEN_WIDTH : spiroDoc.h
  • size : drawtool.cpp
  • SIZE_DOUBLE : ChildView.h
  • SIZE_FILL : ChildView.h
  • SIZE_HALF : ChildView.h
  • SIZE_NONE : ChildView.h
  • SIZE_ORIGINAL : ChildView.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- _ -

  • _COM_SMARTPTR_TYPEDEF() : TestCon.H
  • _DrawReflectedGradient() : MSMVisualManager.cpp
  • _GetFacilityString() : util.cpp
  • _GetFullScodeString() : util.cpp
  • _GetScodeRangeString() : util.cpp
  • _GetScodeString() : util.h , util.cpp
  • _GetSeverityString() : util.cpp
  • _StretchBitmap() : MSMVisualManager.cpp
  • _tmain() : makehm.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- l -

  • LibMain() : locresde.cpp , locresfr.cpp
  • LoadLocalizedResourceDLL() : guidgen.cpp
  • LoadLocalizedResourceDLLUsingPath() : guidgen.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- m -

  • main() : regsvr.cpp
  • MapLine() : makehm.cpp
  • MapNameValue() : makehm.cpp
  • MetricScalePenData() : penwin.h
  • MyGetClipboardFormatName() : idataobj.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- n -

  • NEnumFontNameProc() : MainFrm.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- o -

  • OffsetPenData() : penwin.h
  • ON_COMMAND() : multipad.cpp
  • ON_LBN_DBLCLK() : custlist.cpp
  • ON_MESSAGE() : ThelpCtl.cpp
  • ON_WM_VSCROLL() : paredit.cpp
  • operator&() : MMXWrapper.h , SSE2Wrapper.h
  • operator+() : MMXWrapper.h , SSE2Wrapper.h
  • operator-() : MMXWrapper.h , SSE2Wrapper.h
  • operator<<() : MethInfo.H , SSE2Wrapper.h , MMXWrapper.h
  • operator>>() : SSE2Wrapper.h , MMXWrapper.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • ABS() : Surface.h
  • AddBackslash() : util.cpp , util.h
  • AddInksetInterval() : penwin.h
  • AddPath() : makehm.cpp
  • AddPenDataHRC() : penwin.h
  • AddPenInputHRC() : penwin.h
  • AddPointsPenData() : penwin.h
  • AddToMap() : makehm.cpp
  • AddWordsHWL() : penwin.h
  • AfxFullPath() : wordpad.cpp , wordpdoc.cpp , wordpad.cpp , wordpdoc.cpp
  • AfxGetFileTitle() : wordpdoc.cpp
  • AfxTransferFileContent() : bmpprop.cpp
  • AtomicVirtualEvent() : penwin.h
  • AutoSetColumnWidth() : PBagDg.Cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- b -

  • BeginEnumStrokes() : penwin.h
  • bmColorTranslate() : util.cpp , util.h
  • bmColorTranslateDC() : util.cpp , util.h
  • bmLoadAndTranslate() : util.h , util.cpp
  • BOOL() : penwin.h
  • BoundingRectFromPoints() : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- c -

  • CaptureScreen() : Exports.cpp , ScreenCapApi.h
  • CdlgHook() : HTMLEdView.cpp
  • CharacterToSymbol() : penwin.h
  • CloseRecognizer() : penwin.h
  • ColumnTextOut() : util.cpp , util.h , idataobj.cpp , idataobj.h
  • CompactPenData() : penwin.h
  • CompareLong() : spiroView.cpp
  • CompressPenData() : penwin.h
  • ConfigHREC() : penwin.h
  • ConfigRecognizer() : penwin.h
  • ConfigureCapture() : ScreenCapApi.h , Exports.cpp
  • CopyHandle() : dibapi.cpp , dibapi.h
  • CopyPalette() : palctl.cpp
  • CorrectWriting() : penwin.h
  • CreateCompatibleHRC() : penwin.h
  • CreateDIBPalette() : dibapi.h , dibapi.cpp
  • CreateEditBar() : MainFrm.cpp
  • CreateHWL() : penwin.h
  • CreateInkset() : penwin.h
  • CreateInksetHRCRESULT() : penwin.h
  • CreateMemoryStream() : tlbodl.cpp
  • CreatePenData() : penwin.h
  • CreatePenDataEx() : penwin.h
  • CreatePenDataHRC() : penwin.h
  • CreatePenDataRegion() : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- d -

  • DBStrCpy() : idataobj.cpp
  • DDV_MinMaxTwips() : ddxm.cpp , ddxm.h
  • DDX_Twips() : ddxm.cpp , ddxm.h , ddxm.cpp , ddxm.h
  • DECLARE_HANDLE() : dibapi.h , penwin.h
  • DECLARE_HANDLE32() : penwin.h
  • DECLARE_INTERFACE_() : iviewers.h
  • DEFINE_GUID() : summinfo.h , iviewers.h , summinfo.h
  • DefPenWindowProc() : penwin.h
  • DestroyHRC() : penwin.h
  • DestroyHRCRESULT() : penwin.h
  • DestroyHWL() : penwin.h
  • DestroyInkset() : penwin.h
  • DestroyPenData() : penwin.h
  • DIBHeight() : dibapi.cpp , dibapi.h
  • DIBNumColors() : dibapi.cpp , dibapi.h
  • DIBWidth() : dibapi.cpp , dibapi.h
  • DictionarySearch() : penwin.h
  • DisplayMessage() : regsvr.cpp
  • DlgCenter() : idataobj.cpp , idataobj.h , util.cpp , util.h
  • DllCanUnloadNow() : TCProps.cpp , DrawClientHandlers.cpp
  • DllGetClassObject() : TCProps.cpp , DrawClientHandlers.cpp
  • DllInstall() : DrawClientHandlers.cpp
  • DllMain() : testdll1.cpp , testdll2.cpp , TCProps.cpp
  • DllRegisterInterfaceViewer() : iviewers.cpp , iviewers.h
  • DllRegisterServer() : button.cpp , time.cpp , xlist.cpp , DrawClientHandlers.cpp , localize.cpp , testhelp.cpp , circ.cpp , spindial.cpp , push.cpp , image.cpp , licensed.cpp , pal.cpp
  • DllUnregisterServer() : licensed.cpp , xlist.cpp , push.cpp , spindial.cpp , circ.cpp , image.cpp , pal.cpp , DrawClientHandlers.cpp , localize.cpp , testhelp.cpp , time.cpp , button.cpp
  • DoDefaultPenInput() : penwin.h
  • DPtoTP() : penwin.h
  • Draw3DLine1() : shadow.cpp
  • DrawFrame() : shadow.cpp
  • DrawListBoxBitmap() : util.h , util.cpp
  • DrawPenData() : penwin.h
  • DrawPenDataEx() : penwin.h
  • DualHandleException() : mfcdual.h , mfcdual.cpp
  • DuplicatePenData() : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- e -

  • EmulatePen() : penwin.h
  • EnableGestureSetHRC() : penwin.h
  • EnableSystemDictionaryHRC() : penwin.h
  • EndEnumStrokes() : penwin.h
  • EndPenCollection() : penwin.h
  • EndPenInputHRC() : penwin.h
  • EnumSymbols() : penwin.h
  • EnumWindowsProc() : Wndlist.cpp
  • ErrorMessage() : util.cpp , util.h , util.cpp , util.h
  • ErrorReport() : OutputBar.cpp
  • ExecuteGesture() : penwin.h
  • ExtractPenDataPoints() : penwin.h
  • ExtractPenDataStrokes() : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- f -

  • FileExists() : makehm.cpp
  • FilterDllMsg() : Exports.cpp , ScreenCapApi.h
  • FindDIBBits() : dibapi.cpp , dibapi.h
  • FindIncludeFile() : makehm.cpp
  • FindInMap() : makehm.cpp
  • FirstSymbolFromGraph() : penwin.h
  • fnEditSubclass() : idataobj.cpp
  • fnEnumReallyEx() : util.cpp
  • fnIDataObjectDlg() : idataobj.cpp , idataobj.h
  • ForeignToRtf32() : mswd6_32.h
  • FormatString2() : regsvr.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- g -

  • GetAlphabetHRC() : penwin.h
  • GetAlphabetPriorityHRC() : penwin.h
  • GetAlternateWordsHRCRESULT() : penwin.h
  • GetApplicationView() : mainfrm.h
  • GetBoxMappingHRCRESULT() : penwin.h
  • GetBoxResultsHRC() : penwin.h
  • GetClassServerPath() : InsCtlDg.Cpp
  • GetDocTypeFromName() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetExtFromType() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetFileTypes() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetFontHeight() : xlistctl.cpp
  • GetGlobalRC() : penwin.h
  • GetGuideHRC() : penwin.h
  • GetHotspotsHRCRESULT() : penwin.h
  • GetHRECFromHRC() : penwin.h
  • GetIconFromReg() : regview.cpp
  • GetIndexFromType() : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • GetInksetInterval() : penwin.h
  • GetInksetIntervalCount() : penwin.h
  • GetInternationalHRC() : penwin.h
  • GetMaxResultsHRC() : penwin.h
  • GetPenAppFlags() : penwin.h
  • GetPenAsyncState() : penwin.h
  • GetPenDataAttributes() : penwin.h
  • GetPenDataInfo() : penwin.h
  • GetPenDataStroke() : penwin.h
  • GetPenHwData() : penwin.h
  • GetPenHwEventData() : penwin.h
  • GetPenInput() : penwin.h
  • GetPenMiscInfo() : penwin.h
  • GetPictureHeight() : xlistctl.cpp
  • GetPictureWidth() : xlistctl.cpp
  • GetPointsFromPenData() : penwin.h
  • GetProperty() : xlistctl.cpp
  • GetResultsHRC() : penwin.h
  • GetStrokeAttributes() : penwin.h
  • GetStrokeTableAttributes() : penwin.h
  • GetSymbolCount() : penwin.h
  • GetSymbolCountHRCRESULT() : penwin.h
  • GetSymbolMaxLength() : penwin.h
  • GetSymbolsHRCRESULT() : penwin.h
  • GetTextMetricsCorrectly() : idataobj.cpp , idataobj.h , util.cpp , util.h
  • GetTraceLevel() : TCTrace.Cpp , TCTrace.H
  • GetTwipSize() : MSOffice2007DemoView.cpp
  • GetTypeFromIndex() : doctype.h , doctype.cpp
  • GetVersionPenWin() : penwin.h
  • GetWordlistCoercionHRC() : penwin.h
  • GetWordlistHRC() : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- h -

  • HasServer16() : obj_vw.cpp
  • HasServer32() : obj_vw.cpp
  • HitTestPenData() : penwin.h
  • HRtoString() : util.h , util.cpp , util.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- i -

  • if() : xlistctl.cpp
  • IMPLEMENT_DYNAMIC() : Log.Cpp , PropBag.Cpp , ScrMngr.Cpp , Log.Cpp
  • IMPLEMENT_DYNCREATE() : MSMCaptionBarButton.cpp
  • IMPLEMENT_OLECREATE() : strcoll.cpp , varmap.cpp , dispatch.cpp
  • IMPLEMENT_OLECREATE_EX() : circctl.cpp , timectl.cpp , timeppg.cpp , circppg.cpp , xlistctl.cpp , xlistppg.cpp , ImageCtl.cpp , ImagePpg.cpp , licenctl.cpp , licenppg.cpp , localctl.cpp , localppg.cpp , palctl.cpp , palppg.cpp , pushctl.cpp , pushppg.cpp , btnctl.cpp , spinctl.cpp , spinppg.cpp , btnppg.cpp , ThelpCtl.cpp , ThelpPpg.cpp
  • IMPLEMENT_OLECREATE_SINGLE() : calcdlg.cpp
  • IMPLEMENT_SERIAL() : svritem.cpp , AProp.Cpp
  • Info() : regsvr.cpp
  • InitConverter32() : mswd6_32.h
  • InitRC() : penwin.h
  • InitRecognizer() : penwin.h
  • InitTestDLL1() : testdll1.cpp , testdll1.h
  • InitTestDLL2() : testdll2.cpp , testdll2.h
  • InsertPenData() : penwin.h
  • InsertPenDataPoints() : penwin.h
  • InsertPenDataStroke() : penwin.h
  • InstallRecognizer() : penwin.h
  • INTERFACE_PART() : TCItem.Cpp
  • InvokeKindToString() : VarUtils.H , VarUtils.Cpp
  • IsBalloonTooltipAvailable() : TooltipDemoView.cpp
  • IsDLLInPath() : doctype.h , doctype.cpp , doctype.h , doctype.cpp
  • IsFormatCorrect32() : mswd6_32.h
  • IsMenuButtonEmpty() : MainFrm.cpp
  • IsMMX() : stdafx.cpp , stdafx.h
  • IsPenAware() : penwin.h
  • IsPenEvent() : penwin.h
  • IsSSE2() : stdafx.cpp , stdafx.h
  • IsTextType() : doctype.h
  • IsValidSymbol() : makehm.cpp
  • IsValidValue() : makehm.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- p -

  • PaintDIB() : dibapi.cpp , dibapi.h
  • PaletteSize() : dibapi.h , dibapi.cpp
  • ParseOffNumber() : util.h , util.cpp , util.h , util.cpp
  • PeekPenInput() : penwin.h
  • PenDataFromBuffer() : penwin.h
  • PenDataToBuffer() : penwin.h
  • PointerToNthField() : util.cpp , util.h
  • PostVirtualKeyEvent() : penwin.h
  • PostVirtualMouseEvent() : penwin.h
  • ProcessDllIdle() : Exports.cpp , ScreenCapApi.h
  • ProcessHRC() : penwin.h
  • ProcessWriting() : penwin.h
  • PROPPAGEID() : ThelpCtl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- r -

  • Random() : stdafx.h
  • ReadDIBFile() : myfile.cpp , dibapi.h
  • ReadHWL() : penwin.h
  • ReallyCreateFont() : util.cpp , util.h
  • RecalcThreadProc() : calcthrd.cpp , calcthrd.h
  • Recognize() : penwin.h
  • RecognizeData() : penwin.h
  • RecognizeDataInternal() : penwin.h
  • RecognizeInternal() : penwin.h
  • RedisplayPenData() : penwin.h
  • RegisterApp32() : mswd6_32.h
  • RegisterPenApp() : penwin.h
  • RegToListBox() : regview.cpp
  • RemovePenDataStrokes() : penwin.h
  • ResizePenData() : penwin.h
  • roundleast() : wordpvw.cpp
  • RtfToForeign32() : mswd6_32.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- s -

  • SaveDIB() : dibapi.h , myfile.cpp
  • ScanForConverters() : doctype.h , doctype.cpp , doctype.h
  • SeedRandom() : stdafx.h
  • SerializeElements() : colledoc.cpp , colledoc.h
  • SerializeElements< CMyScheduler >() : Scheduler.cpp , Scheduler.h
  • SetAlphabetHRC() : penwin.h
  • SetAlphabetPriorityHRC() : penwin.h
  • SetBoxAlphabetHRC() : penwin.h
  • SetGlobalRC() : penwin.h
  • SetGuideHRC() : penwin.h
  • SetInternationalHRC() : penwin.h
  • SetMaxResultsHRC() : penwin.h
  • SetPenAppFlags() : penwin.h
  • SetPenHook() : penwin.h
  • SetPenMiscInfo() : penwin.h
  • SetRecogHook() : penwin.h
  • SetResultsHookHREC() : penwin.h
  • SetStrokeAttributes() : penwin.h
  • SetStrokeTableAttributes() : penwin.h
  • SetTraceLevel() : TCTrace.Cpp , TCTrace.H
  • SetWordlistCoercionHRC() : penwin.h
  • SetWordlistHRC() : penwin.h
  • ShowKeyboard() : penwin.h
  • SlowAdd() : slowcalc.cpp , slowcalc.h
  • StartInking() : penwin.h
  • StartPenInput() : penwin.h
  • STDAPI_() : MFileWnd.Cpp , xlistctl.cpp
  • STDMETHODIMP_() : enumvar.cpp , PropBag.Cpp , Script.Cpp , iadvsink.cpp , BindHost.Cpp , iviewer.cpp , TCItem.Cpp , iadvsink.cpp , ExtCtl.Cpp
  • StopInking() : penwin.h
  • StopPenInput() : penwin.h
  • StringFromDword() : makehm.cpp
  • StringFromGUID2T() : tlbodl.cpp
  • StripFilespec() : util.h , util.cpp
  • SymbolToCharacter() : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- t -

  • TargetPoints() : penwin.h
  • TCControlTrace() : TCTrace.Cpp , TCTrace.H
  • TCTrace() : TCTrace.Cpp , TCTrace.H
  • tdDraw3DCrease() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdDraw3DLine() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdDraw3DRect() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdDrawFaceFrame() : shadow.h
  • tdGetHighlightColor() : shadow.cpp , shadow.h , shadow.cpp , shadow.h
  • tdGetShadowColor() : shadow.h , shadow.cpp
  • TPtoDP() : penwin.h
  • TrainContext() : penwin.h
  • TrainContextInternal() : penwin.h
  • TrainHREC() : penwin.h
  • TrainInk() : penwin.h
  • TrainInkInternal() : penwin.h
  • TrimPenData() : penwin.h
  • TwipsToPointString() : MSOffice2007DemoView.cpp
  • TYPEDESCtoString() : util.h , util.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- u -

  • UnhookResultsHookHREC() : penwin.h
  • UninstallRecognizer() : penwin.h
  • UpdatePenInfo() : penwin.h
  • Usage() : regsvr.cpp
  • UsageErr() : makehm.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- v -

  • VariantToString() : VarUtils.Cpp , VarUtils.H
  • ViewInterface() : mainfrm.h , mainfrm.cpp
  • VTIToString() : VarUtils.Cpp , VarUtils.H
  • VTIToVT() : VarUtils.H , VarUtils.Cpp
  • VTToString() : VarUtils.Cpp
  • VTtoString() : util.cpp , util.h , util.cpp
  • VTToString() : VarUtils.H
  • VTtoString() : util.h
  • VTToVTI() : VarUtils.H , VarUtils.Cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- w -

  • WriteBSTR() : tlbodl.cpp
  • WriteHWL() : penwin.h
  • WriteLine() : tlbodl.cpp
  • WriteRaw() : tlbodl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • e
  • f
  • g
  • h
  • i
  • l
  • n
  • o
  • p
  • r
  • s
  • t
  • v

- _ -

  • _T_HistotyList : IEDemoDoc.h

- a -

  • ABSTIME : penwin.h
  • ALC : penwin.h
  • ANIMATEINFO : penwin.h
  • ANIMATEPROC : penwin.h

- b -

  • BOXEDITINFO : penwin.h
  • BOXLAYOUT : penwin.h
  • BOXRESULTS : penwin.h

- c -

  • CALBSTRUCT : penwin.h
  • CDrawObjList : drawobj.h
  • CL : penwin.h
  • CLeaderArray : Swarm.h
  • CLlamaArray : Swarm.h
  • CMapDWordToMyStruct : colledoc.h
  • CMapStringToMyObject : colledoc.h
  • CMapVariantToVariant : inproc.h
  • CMMX : MMXSurface16.cpp , MMXSurface24.cpp , MMXSurface32.cpp
  • CMyObjectArray : colledoc.h
  • CMyStructList : colledoc.h
  • COLUMNSTRUCT : util.h , idataobj.h
  • CPropertyBagItemList : PropBag.H
  • CSSE2 : SSE2Surface24.cpp , SSE2Surface16.cpp , SSE2Surface32.cpp
  • CTLINITBEDIT : penwin.h
  • CTLINITHEDIT : penwin.h
  • CTLINITIEDIT : penwin.h

- e -

  • ENUMPROC : penwin.h

- f -

  • FORMATIDOFFSET : propset.h

- g -

  • GUIDE : penwin.h

- h -

  • HKP : penwin.h

- i -

  • IMECOLORS : penwin.h
  • INKINGINFO : penwin.h
  • INPPARAMS : penwin.h
  • INTERVAL : penwin.h
  • ITEMDATA : idataobj.cpp

- l -

  • LPABSTIME : penwin.h
  • LPALC : penwin.h
  • LPANIMATEINFO : penwin.h
  • LPBOXEDITINFO : penwin.h
  • LPBOXLAYOUT : penwin.h
  • LPBOXRESULTS : penwin.h
  • LPCALBSTRUCT : penwin.h
  • LPCOLUMNSTRUCT : idataobj.h , util.h
  • LPCRECTL : penwin.h
  • LPCTLINITBEDIT : penwin.h
  • LPCTLINITHEDIT : penwin.h
  • LPCTLINITIEDIT : penwin.h
  • LPDF : penwin.h
  • LPFNRAWHOOK : penwin.h
  • LPFORMATIDOFFSET : propset.h
  • LPFUNCRESULTS : penwin.h
  • LPGUIDE : penwin.h
  • LPHINKSET : penwin.h
  • LPHPENDATA : penwin.h
  • LPHRC : penwin.h
  • LPHRCRESULT : penwin.h
  • LPHWL : penwin.h
  • LPIMECOLORS : penwin.h
  • LPINKINGINFO : penwin.h
  • LPINPPARAMS : penwin.h
  • LPINTERVAL : penwin.h
  • LPITEMDATA : idataobj.cpp
  • LPOEM : penwin.h
  • LPOEM_PENPACKET : penwin.h
  • LPOEMPENINFO : penwin.h
  • LPPCMINFO : penwin.h
  • LPPDEVENT : penwin.h
  • LPPENDATA : penwin.h
  • LPPENDATAHEADER : penwin.h
  • LPPENINFO : penwin.h
  • LPPENPACKET : penwin.h
  • LPPENTIP : penwin.h
  • LPPROPERTYIDOFFSET : propset.h
  • LPPROPHEADER : propset.h
  • LPRC : penwin.h
  • LPRCRESULT : penwin.h
  • LPRECTL : penwin.h
  • LPRECTOFS : penwin.h
  • LPSECTIONHEADER : propset.h
  • LPSTRKFMT : penwin.h
  • LPSTROKEINFO : penwin.h
  • LPSYC : penwin.h
  • LPSYE : penwin.h
  • LPSYG : penwin.h
  • LPSYV : penwin.h
  • LPTARGET : penwin.h
  • LPTARGINFO : penwin.h

- n -

  • notifDescrip : notifwdw.h
  • NPRECTL : penwin.h

- o -

  • OEM_PENPACKET : penwin.h
  • OEMPENINFO : penwin.h

- p -

  • PCMINFO : penwin.h
  • PCOLUMNSTRUCT : idataobj.h , util.h
  • PDEVENT : penwin.h
  • PDLLREGISTERSERVER : RegCtlDg.Cpp
  • PDLLUNREGISTERSERVER : RegCtlDg.Cpp
  • PENDATAHEADER : penwin.h
  • PENINFO : penwin.h
  • PENPACKET : penwin.h
  • PENTIP : penwin.h
  • PFN_RTF_CALLBACK : mswd6_32.h
  • PISFORMATFUNC : doctype.h
  • PITEMDATA : idataobj.cpp
  • PRECTL : penwin.h
  • PROPERTYIDOFFSET : propset.h
  • PROPHEADER : propset.h

- r -

  • RC : penwin.h
  • RCRESULT : penwin.h
  • RCYIELDPROC : penwin.h
  • REC : penwin.h
  • RECTL : penwin.h
  • RECTOFS : penwin.h

- s -

  • SECTIONHEADER : propset.h
  • STRKFMT : penwin.h
  • STROKEINFO : penwin.h
  • SYC : penwin.h
  • SYE : penwin.h
  • SYG : penwin.h
  • SYV : penwin.h

- t -

  • TARGET : penwin.h
  • TARGINFO : penwin.h

- v -

  • VS_VERSION : oleview.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- _ -

  • _AtlModule : TCProps.cpp , dllmain.cpp , dllmain.h
  • _bConsole : regsvr.cpp
  • _bSilent : regsvr.cpp
  • _hInstance : regsvr.cpp
  • _MMX_FEATURE_BIT : stdafx.cpp
  • _SSE2_FEATURE_BIT : stdafx.cpp
  • _szAppName : regsvr.cpp
  • _szDllRegSvr : regsvr.cpp
  • _szDllUnregSvr : regsvr.cpp
  • _tlid : image.cpp , xlist.cpp , xlist.h , image.h , licensed.cpp , licensed.h , localize.cpp , localize.h , pal.cpp , pal.h , button.cpp , push.cpp , push.h , button.h , spindial.cpp , spindial.h , circ.cpp , testhelp.cpp , testhelp.h , circ.h , time.cpp , time.h
  • _wVerMajor : button.cpp , button.h , localize.h , circ.cpp , circ.h , image.cpp , image.h , licensed.cpp , licensed.h , localize.cpp , pal.cpp , pal.h , push.cpp , time.h , spindial.cpp , spindial.h , testhelp.cpp , xlist.cpp , time.cpp , xlist.h , push.h , testhelp.h
  • _wVerMinor : time.cpp , localize.cpp , spindial.cpp , circ.h , push.h , image.cpp , licensed.h , push.cpp , xlist.cpp , testhelp.cpp , testhelp.h , button.h , pal.cpp , localize.h , licensed.cpp , circ.cpp , xlist.h , button.cpp , pal.h , time.h , image.h , spindial.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- k -

  • keys : keys.cpp , keys.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- l -

  • lastPoint : drawtool.cpp
  • LIBID_TCPROPSLib : ExtCtl.Cpp
  • LIBID_TestContainer98 : TCDoc.Cpp
  • lpszDefaultCaption : RibbonTableButton.cpp
  • lpszDisplay : PagerCtrlPage.cpp , SplitButtonCtrlPage.cpp , NetAddressCtrlPage.cpp
  • LPVOID : penwin.h
  • LSTITEMSPACING : xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- m -

  • MACROCOMBOBOX_MRUSIZE : MacroCB.Cpp
  • MARGIN_PIXELS : TCItem.H
  • MAX_COLORLEN : dmdoc.h
  • MAX_KEYLEN : regview.cpp
  • MAX_POSITIONS : spinctl.cpp
  • MAX_TIP_TEXT_LENGTH : Page1.cpp
  • MAX_VALLEN : regview.cpp
  • MAXTEXTLEN : xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- n -

  • nBorderMarginX : RibbonListButton.cpp
  • nBorderMarginY : RibbonListButton.cpp
  • nBorderSize : WorkspaceBar.cpp , WorkspaceBar2.cpp , WorkspaceBar.cpp , CalendarBar.cpp , OutputBar.cpp
  • nCheckMargin : RibbonListButton.cpp
  • nColors : custmenu.cpp
  • nColumns : Page5.cpp
  • nDragHandle : drawtool.cpp
  • nHorzMargin : FolderListPopupWnd.cpp , PreviewPane.cpp , LineStyleMenuItem.cpp , ToolsPalette.cpp
  • nIconMargin : CustomProperties.cpp
  • nImageMargin : RibbonListButton.cpp
  • nInfoHeight : ToolsPalette.cpp
  • nRows : Page5.cpp
  • nStatusAnimation : MainFrm.h
  • nStatusIcon : MainFrm.cpp , MainFrm.h
  • nStatusInfo : MainFrm.cpp , MainFrm.h
  • nStatusLabel : MainFrm.h
  • nStatusProgress : MainFrm.cpp , MainFrm.h
  • nStyle : SplitButtonCtrlPage.cpp
  • nTextOffsetX : RibbonListButton.cpp
  • nTextOffsetY : RibbonListButton.cpp
  • NUM_INVOKEKINDS : VarUtils.Cpp
  • NUM_QAAMBIENTS : TCItem.Cpp
  • NUM_TEXTCOLOR : dmdoc.h
  • NUM_VARTYPES : VarUtils.H
  • nVertMargin : ToolsPalette.cpp , PreviewPane.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- o -

  • oneto8 : cubeview.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- a -

  • aMap : makehm.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- c -

  • cfEmbeddedObject : wordpad.cpp , wordpvw.cpp , wordpad.cpp
  • cfRTF : wordpad.cpp , srvritem.cpp , wordpad.cpp , srvritem.cpp
  • cfRTO : wordpad.cpp , wordpvw.cpp , wordpad.cpp , wordpvw.cpp
  • clrFillDark : MSNVisualManager.cpp
  • clrFillLight : MSNVisualManager.cpp
  • CLSID_TCExtPage : TCExtPg.H
  • color : PagerCtrlPage.cpp
  • colorArray : mdi.cpp , mdi.h , mdi.cpp
  • cPassword : CustomProperties.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- d -

  • DEFAULT_INTERVAL : timectl.h
  • dlgPageSetup : superpad.cpp , superpad.h
  • doctypes : doctype.cpp , doctype.h , doctype.cpp , doctype.h
  • dwNetString : NetAddressCtrlPage.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- f -

  • fSystemDC : xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- g -

  • g_pView : piece.cpp , spiroView.cpp , spiroDoc.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- h -

  • hDC : xlistctl.cpp
  • HelloApp : helloapp.cpp
  • HINT_UPDATE_ITEM : TCDoc.H
  • HINT_UPDATE_WINDOW : TCDoc.H
  • HITTYPE_BORDER : TCView.H
  • HITTYPE_NONE : TCView.H
  • HITTYPE_OBJECT : TCView.H
  • HRC : penwin.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- i -

  • ID_LIST : UndoBar.cpp
  • ID_TIMER : timectl.cpp
  • idFoldersTree : FolderListPopupWnd.cpp
  • idPinBtn : FolderListPopupWnd.cpp
  • IdShowProgress1Timer : MainFrm.cpp
  • IdShowProgress2Timer : MainFrm.cpp
  • IdShowProgressTimer : MainFrm.cpp
  • IdStartProgressTimer : MainFrm.cpp
  • idTabDeveloper : MainFrm.cpp
  • idTree : FolderBar.cpp , ExplorerBar.cpp , FolderListBar.cpp , DynamicHelpView.cpp
  • iHeightInHiMetric : xlistctl.cpp
  • IID_DButtonEvents : btnctl.cpp
  • IID_DCircEvents : circctl.cpp
  • IID_DImageEvents : ImageCtl.cpp
  • IID_DLicensedEvents : licenctl.cpp
  • IID_DLocalizeEvents : localctl.cpp
  • IID_DPalEvents : palctl.cpp
  • IID_DPushEvents : pushctl.cpp
  • IID_DSpindialEvents : spinctl.cpp
  • IID_DTesthelpEvents : ThelpCtl.cpp
  • IID_DTimeEvents : timectl.cpp
  • IID_DXlistEvents : xlistctl.cpp
  • IID_IPropertyNotifySink : TCItem.Cpp
  • IID_ITC98ExtendedControl : ExtCtl.H
  • iMaxUserToolbars : MainFrm.cpp , mainfrm.cpp , MainFrm.cpp
  • iWidthInHiMetric : xlistctl.cpp
  • iWidthInPix : xlistctl.cpp
  • iXppli : xlistctl.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- r -

  • REQUESTEDIT_ALWAYS : MethInfo.H
  • REQUESTEDIT_NEVER : MethInfo.H
  • REQUESTEDIT_PROMPT : MethInfo.H
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- s -

  • selectMode : drawtool.cpp
  • szContents : strings.h , strings.cpp , strings.h
  • szDeleteTemp : strings.h
  • szFrameRect : strings.cpp , strings.h , strings.cpp , strings.h
  • szIPSection : strings.h , strings.cpp , strings.h , strings.cpp
  • szLayout1 : strings.cpp , strings.h , strings.cpp , strings.h
  • szLayout2 : strings.cpp , strings.h , strings.cpp , strings.h
  • szLocalizedUIDll : guidgen.cpp
  • szMaximized : strings.cpp , strings.h , strings.cpp , strings.h
  • szPageMargin : strings.cpp , strings.h , strings.cpp , strings.h
  • szRegKey : strings.cpp , strings.h , strings.cpp , strings.h
  • szRTFSection : strings.cpp , strings.h , strings.cpp , strings.h
  • szSection : strings.cpp , strings.h , strings.cpp , strings.h
  • szSumInfo : strings.cpp , strings.h , strings.cpp , strings.h
  • szSummInfo : summinfo.cpp , summinfo.h , summinfo.cpp , summinfo.h
  • szTextSection : strings.h , strings.cpp , strings.h
  • szUnits : strings.h , strings.cpp , strings.h
  • szWordConverter : strings.cpp , strings.h , strings.cpp , strings.h
  • szWordPadClass : strings.cpp , strings.h
  • szWordSection : strings.cpp , strings.h , strings.cpp , strings.h
  • szWordSel : strings.h , strings.cpp , strings.h
  • szWrap : strings.cpp , strings.h , strings.cpp , strings.h
  • szWriteConverter : strings.cpp , strings.h , strings.cpp , strings.h
  • szWriteSection : strings.cpp , strings.h , strings.cpp , strings.h
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- t -

  • TCLOG_DEBUG : TstCon.H
  • TCLOG_FILE : TstCon.H
  • TCLOG_NULL : TstCon.H
  • TCLOG_OUTPUTWINDOW : TstCon.H
  • theApp : DllScreenCap.cpp , button.cpp , CmnCtrl1.cpp , htmledit.cpp , WorkSpaceToolBar.h , WorkSpaceToolBar.cpp , wordpad.h , wordpad.cpp , VisualStudioDemo.h , VisualStudioDemo.cpp , TrayMenu.h , TrayMenu.cpp , TooltipDemo.h , TooltipDemo.cpp , ToolbarDateTimePicker.h , ToolbarDateTimePicker.cpp , TasksPane.h , TasksPane.cpp , TabControl.h , TabControl.cpp , TabbedView.h , TabbedView.cpp , StatusBarDemo.h , StatusBarDemo.cpp , StateCollection.h , StateCollection.cpp , Slider.h , RollupPane.h , SetPaneSize.cpp , mfcie.cpp , SetPaneSize.h , RollupPane.cpp , RibbonMDIDemo.h , RibbonMDIDemo.cpp , RibbonGadgets.h , RibbonGadgets.cpp , RebarTest.h , RebarTest.cpp , PropSheetDemo.cpp , PaletteDemo.h , PaletteDemo.cpp , OwnerDrawMenu.h , OwnerDrawMenu.cpp , OutlookMultiViews.h , OutlookMultiViews.cpp , OutlookDemo.h , OutlookDemo.cpp , NewControls.h , NewControls.cpp , MSOffice2007Demo.h , MSOffice2007Demo.cpp , MSMoneyDemo.h , MSMoneyDemo.cpp , MenuSubSet.h , MenuSubSet.cpp , MDITabsDemo.h , MDITabsDemo.cpp , IEDemo.h , IEDemo.cpp , Explorer.h , Explorer.cpp , DynamicMenu.h , Slider.cpp , dllmain.cpp , DrawClient.h , DrawClient.cpp , DlgToolTips.cpp , DesktopAlertDemo.h , DesktopAlertDemo.cpp , CustomPages.h , CustomPages.cpp , guidgen.cpp , wordpad.h , wordpad.cpp , TstCon.Cpp , superpad.h , superpad.cpp , oleview.h , oleview.cpp , iviewers.cpp , oclient.cpp , mfccalc.cpp , MFCBind.cpp , ipdrive.cpp , inproc.cpp , hiersvr.cpp , drawcli.cpp , calcdriv.cpp , autodriv.cpp , autoclik.cpp , CmnCtrl2.cpp , Scheduler.cpp , autodriv.cpp , circ.cpp , DHtmlExplore.cpp , viewex.cpp , VariantUse.cpp , trackapp.cpp , spiro.cpp , snapvw.cpp , CImage.h , CImage.cpp , scribble.cpp , rowlist.cpp , propdlg.cpp , np.cpp , multipad.cpp , modeless.cpp , MMXSwarm.cpp , DynamicMenu.cpp , mdi.cpp , ListHdr.cpp , hello.cpp , FileDlgWatcher.h , FileDlgWatcher.cpp , dynamenu.cpp , docktool.cpp , dlgtemp.cpp , Dlgcbar.cpp , diblook.cpp , DBVList.cpp , ctrlbars.cpp , CTaskDialogDemo.cpp , CTaskDialogDemo.h , ScreenCap.cpp , CmnCtrl3.cpp , xlist.cpp , time.cpp , testhelp.cpp , spindial.cpp , push.cpp , pal.cpp , NetAddrVerifier.h , mdi.cpp , localize.cpp , licensed.cpp , image.cpp , contain.cpp , CmnCtrl3.h , collect.cpp , ScreenCap.h , mtgdi.cpp , speakn.cpp , mutexes.cpp , mtrecalc.cpp , NetAddrVerifier.cpp , cube.cpp , mdi.cpp , dllhusk.cpp
  • theTestApp : ctrltest.cpp
  • threeto8 : cubeview.cpp
  • TICK_LEN : spinctl.cpp
  • TRACELEVEL_NONE : TCTrace.H
  • TRACELEVEL_NORMAL : TCTrace.H
  • TRACELEVEL_VERBOSE : TCTrace.H
  • twoto8 : cubeview.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- u -

  • uiFirstUserToolBarId : MainFrm.cpp , mainfrm.cpp
  • uiLastUserToolBarId : MainFrm.cpp , mainfrm.cpp , MainFrm.cpp
  • uiMenuBarId : ipframe.cpp
  • UINT : penwin.h
  • UPDF_NOLISTVIEW : typelib.h
  • UPDF_NOODLVIEW : typelib.h
  • UPDF_NOTREEVIEW : typelib.h
  • UWM_CHANGE_SYSTEM_ICON : Page6.cpp
  • UWM_NOTIFY_RECYCLE_BIN : FolderBar.cpp
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • r
  • s
  • t
  • u
  • v

- v -

  • VAR_FALSE : VarUtils.H
  • VAR_TRUE : VarUtils.H
  • VTI_BOOL : VarUtils.H
  • VTI_BSTR : VarUtils.H
  • VTI_COLOR : VarUtils.H
  • VTI_CY : VarUtils.H
  • VTI_DATE : VarUtils.H
  • VTI_EMPTY : VarUtils.H
  • VTI_ERROR : VarUtils.H
  • VTI_FONT : VarUtils.H
  • VTI_I1 : VarUtils.H
  • VTI_I2 : VarUtils.H
  • VTI_I4 : VarUtils.H
  • VTI_I8 : VarUtils.H
  • VTI_R4 : VarUtils.H
  • VTI_R8 : VarUtils.H
  • VTI_UI1 : VarUtils.H
  • VTI_UI2 : VarUtils.H
  • VTI_UI4 : VarUtils.H
  • VTI_UI8 : VarUtils.H
  • VTI_UNKNOWN : VarUtils.H
Generated on Sat Nov 23 2024 17:01:15 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Main Page

Windows-MFC-Examples Documentation

End-User License Agreement

Introduction

This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and SIEMA ("Licensor") for the use of SIEMA-REFERENCE ("Software"). This EULA governs your use of the Software provided by the Licensor. By installing or using the Software, you agree to be bound by the terms of this EULA.

License Grant

Licensor grants you a revocable, non-exclusive, non-transferable, limited license to download, install, and use the Software solely for your personal or commercial purposes strictly in accordance with the terms of this Agreement.

Restrictions on Use

You agree not to, and you will not permit others to:

  • Modify, or create derivative works of the Software;
  • Distribute, transfer, sublicense, lease, lend, or rent the Software to any third party;
  • Reverse engineer, decompile or disassemble the Software, except to the extent expressly permitted by applicable law;
  • Remove, alter, or obscure any proprietary notices on the Software;
  • Use the Software in any manner that could damage, disable, overburden, or impair the Software;
  • Use the Software to create or distribute any malicious software or for any unlawful purpose.

Related Agreements

By agreeing to this EULA, you also agree to comply with the terms of Terms and Conditions, Privacy Policy, and any other agreements incorporated herein by reference.

Jurisdiction

This EULA and any disputes arising out of or in connection with it will be governed by and construed in accordance with the laws of Switzerland, without regard to its conflict of laws principles. Any legal actions or proceedings arising out of this EULA shall be brought exclusively in the courts of Switzerland.Intellectual Property & Copyright Infringement

The Software and all rights, title, and interest in and to the Software, including all intellectual property rights therein, are and will remain the exclusive property of the Licensor. You agree to notify the Licensor promptly if you become aware of any infringement of the Licensor’s intellectual property rights in the Software.Termination of Licensing

Licensor may terminate this EULA at any time if you fail to comply with any term(s) of this Agreement. Upon termination, you must cease all use of the Software and destroy all copies, full or partial, of the Software.

Warranty Disclaimer

THE SOFTWARE IS PROVIDED "AS IS". LICENSOR MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT. YOU BEAR THE ENTIRE RISK AS TO SELECTING THE SOFTWARE FOR YOUR PURPOSES AND AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE.

Limitations of Liability

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS OR REVENUES, WHETHER INCURRED DIRECTLY OR INDIRECTLY, OR ANY LOSS OF DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES, RESULTING FROM:

  1. YOUR USE OR INABILITY TO USE THE SOFTWARE;
  2. ANY UNAUTHORIZED ACCESS TO OR USE OF OUR SERVERS AND/OR ANY PERSONAL INFORMATION STORED THEREIN;
  3. ANY INTERRUPTION OR CESSATION OF TRANSMISSION TO OR FROM THE SOFTWARE;
  4. ANY ERRORS OR OMISSIONS IN ANY CONTENT OR FOR ANY LOSS OR DAMAGE INCURRED AS A RESULT OF YOUR USE OF ANY CONTENT POSTED, EMAILED, TRANSMITTED, OR OTHERWISE MADE AVAILABLE THROUGH THE SOFTWARE;
  5. THE DEFAMATORY, OFFENSIVE, OR ILLEGAL CONDUCT OF ANY THIRD PARTY.

Business Contact Information

If you have any questions about this EULA, please contact us at:

Siema
siema.switzerland@gmail.com

By installing or using the Software, you acknowledge that you have read this Agreement, understand it, and agree to be bound by its terms and conditions.

Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • importlib() : ButtonLib , DrawClientHandlersLib , TestContainer98 , TCPropsLib , mfccalc , inproc , AutoClik , ACDual , XlistLib , TimeLib , TESTHELPLib , SpindialLib , PushLib , PalLib , LocalizeLib , LicensedLib , IMAGELib , CircLib , ButtonLib
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/StdAfx.h Source File

  • vc2008fp
  • TrayMenu

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028 #ifndef _AFX_NO_OLE_SUPPORT
00029 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00030 #endif
00031 #ifndef _AFX_NO_AFXCMN_SUPPORT
00032 #include <afxcmn.h>     // MFC support for Windows Common Controls
00033 #endif // _AFX_NO_AFXCMN_SUPPORT
00034
00035 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00036
00037 #if defined _M_IX86
00038 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00039 #elif defined _M_X64
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #else
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestView.h Source File

  • vc2008fp
  • RebarTest

RebarTestView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013
00014 class CRebarTestView : public CView
00015 {
00016 protected: // create from serialization only
00017   CRebarTestView();
00018   DECLARE_DYNCREATE(CRebarTestView)
00019
00020 // Attributes
00021 public:
00022   CRebarTestDoc* GetDocument() const;
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   public:
00029   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00030 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031 protected:
00032   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00033   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00034   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00035
00036 // Implementation
00037 public:
00038   virtual ~CRebarTestView();
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043
00044 protected:
00045
00046 // Generated message map functions
00047 protected:
00048   afx_msg void OnFilePrintPreview();
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 #ifndef _DEBUG  // debug version in RebarTestView.cpp
00053 inline CRebarTestDoc* CRebarTestView::GetDocument() const
00054    { return reinterpret_cast<CRebarTestDoc*>(m_pDocument); }
00055 #endif
00056
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/StdAfx.cpp Source File

  • general
  • VariantUse

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  VariantUse.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
00013
00014
00015
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRollupPaneApp Member List

This is the complete list of members for CRollupPaneApp, including all inherited members.
CRollupPaneApp() | CRollupPaneApp |
ExitInstance() | CRollupPaneApp | [virtual]
InitInstance() | CRollupPaneApp | [virtual]
OnAppAbout() | CRollupPaneApp |
PreLoadState() | CRollupPaneApp | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/targetver.h Source File

  • vc2008fp
  • OutlookMultiViews

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagABSTIME Member List

This is the complete list of members for tagABSTIME, including all inherited members.
ms | tagABSTIME
sec | tagABSTIME
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mainfrm.cpp Source File

  • general
  • mdidocvw

mainfrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013
00014 #include "stdafx.h"
00015 #include "MDI.h"
00016
00017 #include "MainFrm.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainFrame
00027
00028 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00029
00030 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00031   //{{AFX_MSG_MAP(CMainFrame)
00032   ON_WM_CREATE()
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 static UINT indicators[] =
00037 {
00038   ID_SEPARATOR,           // status line indicator
00039   ID_INDICATOR_CAPS,
00040   ID_INDICATOR_NUM,
00041   ID_INDICATOR_SCRL,
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMainFrame construction/destruction
00046
00047 CMainFrame::CMainFrame()
00048 {
00049 }
00050
00051 CMainFrame::~CMainFrame()
00052 {
00053 }
00054
00055 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00056 {
00057   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00058     return -1;
00059
00060   if (!m_wndToolBar.Create(this) ||
00061     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00062   {
00063     TRACE0("Failed to create toolbar\n");
00064     return -1;      // fail to create
00065   }
00066
00067 // set button styles for colors to TBBS_CHECKBOX
00068
00069   m_wndToolBar.SetButtonStyle(6, TBBS_CHECKBOX);
00070   m_wndToolBar.SetButtonStyle(7, TBBS_CHECKBOX);
00071   m_wndToolBar.SetButtonStyle(10, TBBS_CHECKBOX);
00072   m_wndToolBar.SetButtonStyle(11, TBBS_CHECKBOX);
00073   m_wndToolBar.SetButtonStyle(12, TBBS_CHECKBOX);
00074
00075   if (!m_wndStatusBar.Create(this) ||
00076     !m_wndStatusBar.SetIndicators(indicators,
00077       sizeof(indicators)/sizeof(UINT)))
00078   {
00079     TRACE0("Failed to create status bar\n");
00080     return -1;      // fail to create
00081   }
00082
00083   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00084     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00085
00086   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00087   EnableDocking(CBRS_ALIGN_ANY);
00088   DockControlBar(&m_wndToolBar);
00089
00090 // Add title for toolbar
00091   m_wndToolBar.SetWindowText(_T("Standard"));
00092
00093   return 0;
00094 }
00095
00096 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00097 {
00098   return CMDIFrameWnd::PreCreateWindow(cs);
00099 }
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CMainFrame diagnostics
00103
00104 #ifdef _DEBUG
00105 void CMainFrame::AssertValid() const
00106 {
00107   CMDIFrameWnd::AssertValid();
00108 }
00109
00110 void CMainFrame::Dump(CDumpContext& dc) const
00111 {
00112   CMDIFrameWnd::Dump(dc);
00113 }
00114
00115 #endif //_DEBUG
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLlama Member List

This is the complete list of members for CLlama, including all inherited members.
Bounce(long &value, const int lower, const int upper, int &vel) | CRoamer | [inline]
DeltaRandom(int i) | CRoamer | [inline, static]
dx | CRoamer |
dy | CRoamer |
Init(CSwarm *pSwarm) | CLlama |
Kick() | CLlama |
m_color | CLlama | [private]
m_idxLeader | CLlama | [private]
p1 | CRoamer |
p2 | CRoamer |
Tick(CSwarm *pSwarm, const CLeaderArray &Leaders) | CLlama |
~CRoamer() | CRoamer | [inline, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CServerNode Member List

This is the complete list of members for CServerNode, including all inherited members.
CalcBounding(CDC *pDC, CPoint &ptStart, CSize &sizeMax) | CServerNode |
CalcNodeSize(CDC *pDC, CSize &sizeNode) | CServerNode |
CreateChildNode(LPCTSTR lpszDescription) | CServerNode |
CreateRootNode(CServerDoc *pDoc) | CServerNode | [static]
CServerItem class | CServerNode | [friend]
CServerNode(CServerDoc *pServerDoc=NULL) | CServerNode |
DECLARE_SERIAL(CServerNode) | CServerNode | [private]
DeleteChildNodes() | CServerNode |
Draw(CDC *pDC, CPoint pt, BOOL bSelected, CSize sizeNode) | CServerNode |
DrawTree(CDC *pDC, CPoint ptStart, CServerNode *pItemSel) | CServerNode |
EShape enum name | CServerNode |
FindAndDelete(CServerNode *pItem) | CServerNode |
FindNode(LPCTSTR pszItemName) | CServerNode |
GetDocument() const | CServerNode | [inline]
GetItemName() | CServerNode |
GetNext(CServerNode *pItem, BOOL bInit=TRUE) | CServerNode |
GetPopupMenuIndex() | CServerNode | [inline]
GetPrev(CServerNode *pItem, BOOL bInit=TRUE) | CServerNode |
HasChildren() const | CServerNode | [inline]
InitRootNode() | CServerNode |
IsChild(const CServerNode *pPotentialChild) const | CServerNode |
m_bHideChildren | CServerNode |
m_listChild | CServerNode |
m_pDocument | CServerNode |
m_pServerItem | CServerNode |
m_shape | CServerNode |
m_strDescription | CServerNode |
m_strLinkKey | CServerNode |
PromptChangeNode() | CServerNode |
PromptNewChildNode() | CServerNode |
SaveAsText(CArchive &ar, int nLevel) | CServerNode | [protected]
Serialize(CArchive &ar) | CServerNode | [virtual]
shapeMax enum value | CServerNode |
shapeOval enum value | CServerNode |
shapeRect enum value | CServerNode |
shapeRound enum value | CServerNode |
UpdateItemName() | CServerNode |
~CServerNode() | CServerNode |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/FeatPg.H Source File

  • ole
  • TstCon

FeatPg.H

Go to the documentation of this file.
00001 // File: FeatPg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_CFEATURESPAGE_H__D2C50BCF_C64C_11D0_8E02_00C04FB68D60__INCLUDED_)
00011 #define AFX_CFEATURESPAGE_H__D2C50BCF_C64C_11D0_8E02_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // CFeaturesPage.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CFeaturesPage dialog
00021
00022 class CFeaturesPage : public CPropertyPage
00023 {
00024   DECLARE_DYNCREATE(CFeaturesPage)
00025
00026 // Construction
00027 public:
00028   CFeaturesPage();
00029   ~CFeaturesPage();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CFeaturesPage)
00033   enum { IDD = IDD_CONTAINEROPTIONS_FEATURES };
00034   BOOL    m_tAllowWindowless;
00035   BOOL    m_tTwoPassDrawing;
00036   BOOL    m_tHonorIgnoreActivateWhenVisible;
00037   BOOL    m_tUseIPointerInactive;
00038   BOOL    m_tUseQuickActivation;
00039   //}}AFX_DATA
00040
00041
00042 // Overrides
00043   // ClassWizard generate virtual function overrides
00044   //{{AFX_VIRTUAL(CFeaturesPage)
00045   protected:
00046   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00047   //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 protected:
00051   // Generated message map functions
00052   //{{AFX_MSG(CFeaturesPage)
00053   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00054   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00055   //}}AFX_MSG
00056   DECLARE_MESSAGE_MAP()
00057
00058 };
00059
00060 //{{AFX_INSERT_LOCATION}}
00061 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00062
00063 #endif // !defined(AFX_CFEATURESPAGE_H__D2C50BCF_C64C_11D0_8E02_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/MainFrm.cpp Source File

  • internet
  • HTMLEdit

MainFrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014
00015 #include "MainFrm.h"
00016 #include "htmleddoc.h"
00017 #include "htmlEdView.h"
00018 #include "sourceview.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMainFrame
00028
00029 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00030
00031 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00032   ON_COMMAND_EX(CG_ID_VIEW_FONTDLGBAR, OnBarCheck)
00033   ON_UPDATE_COMMAND_UI(CG_ID_VIEW_FONTDLGBAR, OnUpdateControlBarMenu)
00034   //{{AFX_MSG_MAP(CMainFrame)
00035   ON_WM_CREATE()
00036   ON_CBN_SELCHANGE(ID_FMTBAR_FONTNAME, OnFontNameChange)
00037   ON_CBN_SELCHANGE(ID_FMTBAR_FONTSIZE, OnFontSizeChange)
00038   ON_COMMAND(ID_VIEW_EDITINGTOOLBAR, OnViewEditingtoolbar)
00039   ON_UPDATE_COMMAND_UI(ID_VIEW_EDITINGTOOLBAR, OnUpdateViewEditingtoolbar)
00040   ON_COMMAND(ID_VIEW_SOURCE, OnViewSource)
00041   ON_COMMAND(ID_VIEW_WEB, OnViewWeb)
00042   ON_UPDATE_COMMAND_UI(ID_VIEW_WEB, OnUpdateViewWeb)
00043   ON_UPDATE_COMMAND_UI(ID_VIEW_SOURCE, OnUpdateViewSource)
00044   ON_UPDATE_COMMAND_UI(ID_FMTBAR_FONTSIZE, OnUpdateFontSize)
00045   ON_UPDATE_COMMAND_UI(ID_FMTBAR_FONTNAME, OnUpdateFontName)
00046   ON_UPDATE_COMMAND_UI (ID_INDICATOR_VIEW, OnUpdatePane)
00047   //}}AFX_MSG_MAP
00048 END_MESSAGE_MAP()
00049 void CMainFrame::OnBlockFmtDropdown( NMHDR * /*pNotifyStruct*/, LRESULT * /*result*/ )
00050 {
00051
00052 }
00053 static UINT indicators[] =
00054 {
00055   ID_SEPARATOR,           // status line indicator
00056   ID_INDICATOR_VIEW,    // view indicator - Web/Source
00057   ID_INDICATOR_CAPS,
00058   ID_INDICATOR_NUM,
00059   ID_INDICATOR_SCRL,
00060 };
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CMainFrame construction/destruction
00064
00065 CMainFrame::CMainFrame():
00066   m_pSrcView(NULL),
00067   m_pWebView(NULL),
00068   m_dwCurrentView(ID_VIEW_WEB)
00069 {
00070   // TODO: add member initialization code here
00071
00072 }
00073
00074 CMainFrame::~CMainFrame()
00075 {
00076 }
00077 BOOL CreateEditBar();
00078 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00079 {
00080   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00081     return -1;
00082
00083   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00084     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00085     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00086   {
00087     TRACE0("Failed to create toolbar\n");
00088     return -1;      // fail to create
00089   }
00090
00091   if (!CreateEditBar())
00092   {
00093     TRACE0("Failed to create edit toolbar\n");
00094     return -1;      // fail to create
00095   }
00096
00097   if (!m_wndStatusBar.Create(this) ||
00098     !m_wndStatusBar.SetIndicators(indicators,
00099       sizeof(indicators)/sizeof(UINT)))
00100   {
00101     TRACE0("Failed to create status bar\n");
00102     return -1;      // fail to create
00103   }
00104
00105   // TODO: Delete these three lines if you don't want the toolbar to
00106   //  be dockable
00107   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00108   m_wndEditBar.EnableDocking(CBRS_ALIGN_ANY);
00109   EnableDocking(CBRS_ALIGN_ANY);
00110   DockControlBar(&m_wndToolBar);
00111   DockControlBar(&m_wndEditBar);
00112
00113
00114   return 0;
00115 }
00116
00117 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00118 {
00119   if( !CFrameWnd::PreCreateWindow(cs) )
00120     return FALSE;
00121   // TODO: Modify the Window class or styles here by modifying
00122   //  the CREATESTRUCT cs
00123
00124   return TRUE;
00125 }
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CMainFrame diagnostics
00129
00130 #ifdef _DEBUG
00131 void CMainFrame::AssertValid() const
00132 {
00133   CFrameWnd::AssertValid();
00134 }
00135
00136 void CMainFrame::Dump(CDumpContext& dc) const
00137 {
00138   CFrameWnd::Dump(dc);
00139 }
00140
00141 #endif //_DEBUG
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CMainFrame message handlers
00145 INT CALLBACK NEnumFontNameProc(LOGFONT *plf, TEXTMETRIC* /*ptm*/, INT /*nFontType*/, LPARAM lParam)
00146 {
00147   CComboBox* comboBox = (CComboBox*) lParam;
00148
00149   comboBox->AddString(plf->lfFaceName);
00150
00151   return TRUE;
00152 }
00153 BOOL CMainFrame::CreateEditBar()
00154 {
00155
00156   CRect rect;
00157   const int nDropHeight = 200;
00158
00159 static int nFontSizes[] =
00160   {1, 2, 3, 4, 5, 6, 7};
00161
00162
00163   if (!m_wndEditBar.Create(this) ||
00164     !m_wndEditBar.LoadToolBar(ID_TOOLBAR_EDITING))
00165   {
00166     TRACE0("Failed to create stylebar\n");
00167     return FALSE;       // fail to create
00168   }
00169
00170   CToolBarCtrl& tbCtrl = m_wndEditBar.GetToolBarCtrl();
00171   tbCtrl.ModifyStyle(0, TBSTYLE_FLAT);
00172
00173   m_wndEditBar.SetBarStyle(m_wndEditBar.GetBarStyle() |
00174     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00175
00176   // Create the font name combo box
00177   m_wndEditBar.SetButtonInfo(0, ID_FMTBAR_FONTNAME, TBBS_SEPARATOR, 150);
00178
00179   // Design guide advises 12 pixel gap between combos and buttons
00180   m_wndEditBar.GetItemRect(0, &rect);
00181   rect.top = 3;
00182   rect.bottom = rect.top + nDropHeight;
00183   if (!m_wndEditBar.m_fontNameCombo.Create(
00184       CBS_DROPDOWN|WS_VSCROLL|CBS_SORT |WS_VISIBLE|WS_TABSTOP,
00185       rect, &m_wndEditBar, ID_FMTBAR_FONTNAME))
00186   {
00187     TRACE0("Failed to create combo-box\n");
00188     return FALSE;
00189   }
00190
00191   //  Fill the combo box
00192   ::EnumFontFamilies(GetDC()->m_hDC, (LPTSTR) NULL, (FONTENUMPROC)NEnumFontNameProc, (LPARAM)&(m_wndEditBar.m_fontNameCombo));
00193
00194   // Create the fontsize combo box
00195   m_wndEditBar.SetButtonInfo(1, ID_FMTBAR_FONTSIZE, TBBS_SEPARATOR, 50);
00196
00197   m_wndEditBar.GetItemRect(1, &rect);
00198   rect.top = 3;
00199   rect.bottom = rect.top + nDropHeight;
00200   rect.left += 5;
00201   if (!m_wndEditBar.m_fontSizeCombo.Create(
00202       CBS_DROPDOWNLIST|WS_VISIBLE|WS_TABSTOP,
00203       rect, &m_wndEditBar, ID_FMTBAR_FONTSIZE))
00204   {
00205     TRACE0("Failed to create combo-box\n");
00206     return FALSE;
00207   }
00208
00209   CString str;
00210   for (int i = 0; i < sizeof(nFontSizes)/sizeof(int); i++)
00211   {
00212     str.Format(_T("%d"), nFontSizes[i]);
00213     m_wndEditBar.m_fontSizeCombo.AddString(str);
00214   }
00215
00216   // set dropdown style on tag format button and font color button
00217   m_wndEditBar.SetButtonStyle(3, TBSTYLE_DROPDOWN);
00218   m_wndEditBar.SetButtonStyle(8, TBSTYLE_DROPDOWN);
00219
00220   m_wndEditBar.m_font.Attach(GetStockObject(DEFAULT_GUI_FONT));
00221   m_wndEditBar.m_fontNameCombo.SetFont(&m_wndEditBar.m_font);
00222   m_wndEditBar.m_fontSizeCombo.SetFont(&m_wndEditBar.m_font);
00223
00224   m_wndEditBar.m_fontNameCombo.SetCurSel(-1);
00225   m_wndEditBar.m_fontSizeCombo.SetCurSel(-1);
00226
00227   return TRUE;
00228
00229 }
00230 CComboBox* CMainFrame::GetFontNameCombo()
00231 {
00232   return &m_wndEditBar.m_fontNameCombo;
00233 }
00234 CComboBox* CMainFrame::GetFontSizeCombo()
00235 {
00236   return &m_wndEditBar.m_fontSizeCombo;
00237 }
00238 void CMainFrame::OnFontNameChange()
00239 {
00240   CString szText;
00241   m_wndEditBar.m_fontNameCombo.GetLBText(
00242     m_wndEditBar.m_fontNameCombo.GetCurSel(),szText);
00243
00244   CHTMLEdView *pView = (CHTMLEdView*)GetActiveView();
00245   ASSERT_VALID(pView);
00246   pView->SetFontFace(szText);
00247
00248 }
00249
00250 void CMainFrame::OnFontSizeChange()
00251 {
00252   CString szText;
00253   m_wndEditBar.m_fontSizeCombo.GetLBText(
00254     m_wndEditBar.m_fontSizeCombo.GetCurSel(),szText);
00255
00256   CHTMLEdView *pView = (CHTMLEdView*)GetActiveView();
00257   ASSERT_VALID(pView);
00258
00259   pView->SetFontSize((short)_ttoi(szText));
00260 }
00261
00262 void CMainFrame::OnViewEditingtoolbar()
00263 {
00264   CControlBar *pBar = DYNAMIC_DOWNCAST(CControlBar,&m_wndEditBar);
00265   if(pBar)
00266   {
00267     ShowControlBar(pBar, (pBar->GetStyle() & WS_VISIBLE) == 0, FALSE);
00268   }
00269
00270 }
00271
00272 void CMainFrame::OnUpdateViewEditingtoolbar(CCmdUI* pCmdUI)
00273 {
00274   CControlBar *pBar = DYNAMIC_DOWNCAST(CControlBar,&m_wndEditBar);
00275   if (pBar != NULL)
00276   {
00277     pCmdUI->SetCheck((pBar->GetStyle() & WS_VISIBLE) != 0);
00278     return;
00279   }
00280
00281 }
00282
00283 BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
00284 {
00285   CDocument *pDoc=NULL;
00286   POSITION pos;
00287   BOOL bRet = FALSE;
00288   //create the source view for this document at this time
00289   CRuntimeClass *prc = RUNTIME_CLASS(CSourceView);
00290   ENSURE(prc);
00291   m_pSrcView = (CSourceView*)prc->CreateObject();
00292   if(m_pSrcView)
00293     VERIFY(m_pSrcView->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
00294     CRect(0,0,0,0), this, AFX_IDW_PANE_LAST, NULL));
00295
00296
00297   //create the doc-template view and save off a pointer to it
00298   bRet = CFrameWnd::OnCreateClient(lpcs, pContext);
00299   pDoc = pContext->m_pCurrentDoc;
00300   if(bRet && pDoc)
00301   {
00302     pos = pDoc->GetFirstViewPosition();
00303     pDoc->AddView(m_pSrcView);
00304   }
00305   else
00306     return FALSE;
00307
00308   CView *pView = pDoc->GetNextView(pos);
00309   ASSERT(pView->IsKindOf(RUNTIME_CLASS(CHTMLEdView)));
00310   if(pView)
00311   {
00312     m_pWebView = (CHTMLEdView*) pView;
00313   }
00314   else
00315     return FALSE;
00316
00317   return bRet;
00318 }
00319
00320 void CMainFrame::SwapView(int nCmdID)
00321 {
00322   CDocument *pDoc;
00323
00324   pDoc = GetActiveDocument();
00325   if(nCmdID == ID_VIEW_SOURCE)
00326   {
00327     //swap the view IDs
00328     m_pWebView->SetDlgCtrlID(AFX_IDW_PANE_LAST);
00329     m_pSrcView->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
00330
00331     // show/hide the right view
00332     m_pWebView->ShowWindow(SW_HIDE);
00333     m_pSrcView->ShowWindow(SW_SHOW);
00334
00335     //update the document
00336     //pDoc->AddView(m_pSrcView);
00337     //pDoc->RemoveView(m_pWebView);
00338
00339     //re-layout everything
00340     SetActiveView(m_pSrcView);
00341     RecalcLayout();
00342
00343     m_dwCurrentView = ID_VIEW_SOURCE;
00344
00345     m_wndStatusBar.SetPaneText(1, _T("SRC VIEW"), TRUE);
00346
00347     return;
00348   }
00349   else if(nCmdID == ID_VIEW_WEB)
00350   {
00351     //swap the view IDs
00352     m_pWebView->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
00353     m_pSrcView->SetDlgCtrlID(AFX_IDW_PANE_LAST);
00354
00355     // show/hide the right view
00356     m_pWebView->ShowWindow(SW_SHOW);
00357     m_pSrcView->ShowWindow(SW_HIDE);
00358
00359     //update the document
00360     //pDoc->AddView(m_pWebView);
00361     //pDoc->RemoveView(m_pSrcView);
00362
00363     //re-layout everything
00364     SetActiveView(m_pWebView);
00365     RecalcLayout();
00366
00367     m_dwCurrentView = ID_VIEW_WEB;
00368     m_wndStatusBar.SetPaneText(1, _T("WEB VIEW"), TRUE);
00369     return;
00370   }
00371
00372 }
00373 void CMainFrame::SwapView()
00374 {
00375   //if we are already showing the right view, bail, nothing to do.
00376   DWORD nCmdID = LOWORD(GetCurrentMessage()->wParam);
00377   if((nCmdID == ID_VIEW_SOURCE) && (m_dwCurrentView == ID_VIEW_SOURCE))
00378     return;
00379   if((nCmdID == ID_VIEW_WEB) && (m_dwCurrentView == ID_VIEW_WEB))
00380     return;
00381
00382   SwapView(nCmdID);
00383 }
00384
00385
00386 void CMainFrame::OnViewSource()
00387 {
00388   SwapView();
00389 }
00390
00391 void CMainFrame::OnViewWeb()
00392 {
00393   SwapView();
00394 }
00395
00396 void CMainFrame::OnUpdateViewWeb(CCmdUI* pCmdUI)
00397 {
00398   pCmdUI->SetRadio(m_dwCurrentView==ID_VIEW_WEB);
00399
00400 }
00401
00402 void CMainFrame::OnUpdateViewSource(CCmdUI* pCmdUI)
00403 {
00404   pCmdUI->SetRadio(m_dwCurrentView==ID_VIEW_SOURCE);
00405
00406 }
00407
00408 CView* CMainFrame::GetWebView()
00409 {
00410   return DYNAMIC_DOWNCAST(CView,m_pWebView);
00411 }
00412
00413 CView* CMainFrame::GetSourceView()
00414 {
00415   return DYNAMIC_DOWNCAST(CView,m_pSrcView);
00416 }
00417
00418 DWORD CMainFrame::GetCurrentView()
00419 {
00420   return m_dwCurrentView;
00421 }
00422
00423 void CMainFrame::OnUpdateFontSize(CCmdUI* /*pCmdUI*/)
00424 {
00425   CComboBox *pCombo = (CComboBox*)GetFontSizeCombo();
00426   ASSERT_VALID(pCombo);
00427
00428   //If Source View, don't display the font size combobox
00429   if(m_dwCurrentView == ID_VIEW_SOURCE)
00430   {
00431     pCombo->EnableWindow(FALSE);
00432     return;
00433   }
00434   else
00435   {
00436     if(m_pWebView->QueryStatus(IDM_BLOCKFMT) & OLECMDF_ENABLED)
00437       pCombo->EnableWindow();
00438     else
00439       pCombo->EnableWindow(FALSE);
00440   }
00441 }
00442
00443 void CMainFrame::OnUpdateFontName(CCmdUI* /*pCmdUI*/)
00444 {
00445   CComboBox *pCombo = (CComboBox*)GetFontNameCombo();
00446   ASSERT_VALID(pCombo);
00447
00448   //If Source View, don't display the font name combobox
00449   if(m_dwCurrentView == ID_VIEW_SOURCE)
00450   {
00451     pCombo->EnableWindow(FALSE);
00452     return;
00453   }
00454   else
00455   {
00456     if(m_pWebView->QueryStatus(IDM_BLOCKFMT) & OLECMDF_ENABLED)
00457       pCombo->EnableWindow();
00458     else
00459       pCombo->EnableWindow(FALSE);
00460   }
00461 }
00462
00463 void CMainFrame::OnUpdatePane(CCmdUI *pCmdUI)
00464 {
00465   pCmdUI->Enable ();
00466 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCDoc.H Source File

  • ole
  • TstCon

TCDoc.H

Go to the documentation of this file.
00001 // CTestContainer98Doc.h : interface of the CTestContainer98Doc class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #if !defined(AFX_CTESTCONTAINER98DOC_H__19818508_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
00013 #define AFX_CTESTCONTAINER98DOC_H__19818508_B837_11D0_8DF1_00C04FB68D60__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 const LPARAM HINT_UPDATE_WINDOW = 0;
00020 const LPARAM HINT_UPDATE_ITEM = 1;
00021
00022 class CTestContainer98Doc : public COleDocument
00023 {
00024 protected: // create from serialization only
00025   CTestContainer98Doc();
00026   DECLARE_DYNCREATE(CTestContainer98Doc)
00027
00028 // Attributes
00029 public:
00030    void BringToFront( CDocItem* pItem );
00031    void SendToBack( CDocItem* pItem );
00032    POSITION FindItem( CDocItem* pItem ) const;
00033    POSITION GetTailPosition() const;
00034    CDocItem* GetPrevItem( POSITION& pos ) const;
00035    BOOL GetUserMode() const;
00036    void SetUserMode( BOOL tUserMode );
00037
00038 // Operations
00039 public:
00040    int AddAmbientProperty( DISPID dispid, LPCTSTR pszName, const VARIANT& var,
00041     int vti );
00042    CTestContainer98Item* AddControl( REFCLSID clsid, LPCTSTR pszName,
00043     REFIID iidPersistanceMedium = IID_NULL, IUnknown* pPersistanceMedium =
00044     NULL );
00045    void CreateUniqueItemName( CTestContainer98Item* pItem, LPCTSTR pszBaseName,
00046     CString& strUniqueName );
00047   CAmbientProperty* FindAmbientProperty( DISPID dispid );
00048    CAmbientProperty* FindAmbientProperty( LPCOLESTR pszName );
00049    CAmbientProperty* GetAmbientProperty( int iProp );
00050    int GetNumAmbientProperties() const;
00051    CEdit* GetOutputEditControl();
00052    CTestContainer98View* GetView() const;
00053    BOOL CanWindowlessActivate() const;
00054    BOOL HonorIgnoreActivateWhenVisible() const;
00055    BOOL UseIPointerInactive() const;
00056    BOOL UseSlowDrawing() const;
00057    BOOL UseTwoPassDrawing() const;
00058    BOOL UseQuickActivation() const;
00059    BOOL SupportsInterface( REFIID iid );
00060    BOOL SupportsService( REFGUID sid );
00061    void PreCloseFrame( CFrameWnd* pFrame );
00062    CLog* GetLog() const;
00063    void SetItemTabOrder( CTestContainer98Item* pItem, int iTabOrder );
00064    CTestContainer98Item* GetNextTabItem( CTestContainer98Item* pItem ) const;
00065
00066 // Overrides
00067   // ClassWizard generated virtual function overrides
00068   //{{AFX_VIRTUAL(CTestContainer98Doc)
00069   public:
00070   virtual BOOL OnNewDocument();
00071   virtual void Serialize(CArchive& ar);
00072   virtual BOOL CanCloseFrame(CFrameWnd* pFrame);
00073   virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
00074   virtual void AddItem(CDocItem* pItem);
00075   virtual void DeleteContents();
00076   virtual void RemoveItem(CDocItem* pItem);
00077   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00078   //}}AFX_VIRTUAL
00079
00080 // Implementation
00081 public:
00082   virtual ~CTestContainer98Doc();
00083 #ifdef _DEBUG
00084   virtual void AssertValid() const;
00085   virtual void Dump(CDumpContext& dc) const;
00086 #endif
00087
00088   void RunAutomationScript(LPCTSTR szScriptFile);
00089
00090 protected:
00091    CString m_strDirectory;
00092    CTypedPtrArray< CObArray, CAmbientProperty* > m_apAmbientProperties;
00093    CFontHolder* m_pFontHolder;
00094    FONTDESC m_descFont;
00095    BOOL m_tUserMode;
00096    BOOL m_tFreezeEvents;
00097    BOOL m_tAllowWindowless;
00098    BOOL m_tTwoPassDrawing;
00099    BOOL m_tSlowDrawing;
00100    BOOL m_tHonorIgnoreActivateWhenVisible;
00101    BOOL m_tUseIPointerInactive;
00102    BOOL m_tUseQuickActivation;
00103    BOOL m_tIOleInPlaceSiteWindowless;
00104    BOOL m_tIOleInPlaceSiteEx;
00105    BOOL m_tIAdviseSinkEx;
00106    BOOL m_tSBindHost;
00107    IStreamPtr m_pStream;
00108    IStoragePtr m_pStorage;
00109    CLog* m_pLog;
00110    CTypedPtrList< CObList, CTestContainer98Item* > m_lpTabOrder;
00111    IActiveScriptPtr m_pActiveScript;
00112    IActiveScriptParsePtr m_pActiveScriptParse;
00113    CScriptManager* m_pScriptManager;
00114
00115 // Generated message map functions
00116 protected:
00117    void Cleanup();
00118    void BroadcastAmbientPropertyChange( DISPID dispid );
00119    void FireOnNewControl( IDispatch* pControl );
00120    CScriptManager* GetScriptManager( BOOL tCreate = TRUE );
00121   HRESULT InitDefaultAmbientProperties();
00122    BOOL Initialize();
00123    HRESULT InitScriptManager();
00124    BOOL GetDispatchIID( IID* piid );
00125
00126   //{{AFX_MSG(CTestContainer98Doc)
00127   afx_msg void OnOptionsFreezeEvents();
00128   afx_msg void OnUpdateOptionsFreezeEvents(CCmdUI* pCmdUI);
00129   afx_msg void OnOptionsSlowDrawing();
00130   afx_msg void OnUpdateOptionsSlowDrawing(CCmdUI* pCmdUI);
00131   afx_msg void OnOptionsTwoPassDrawing();
00132   afx_msg void OnUpdateOptionsTwoPassDrawing(CCmdUI* pCmdUI);
00133   afx_msg void OnOptionsLogging();
00134   afx_msg void OnContainerOptions();
00135   afx_msg void OnContainerAmbientProperties();
00136   afx_msg void OnContainerInfo();
00137   afx_msg void OnEditDeleteAll();
00138   afx_msg void OnUpdateEditDeleteAll(CCmdUI* pCmdUI);
00139   afx_msg void OnContainerTabOrder();
00140   afx_msg void OnToolsMacros();
00141   afx_msg void OnRunMacro();
00142   //}}AFX_MSG
00143   DECLARE_MESSAGE_MAP()
00144
00145    DECLARE_OLETYPELIB( CTestContainer98Doc )
00146
00147    BEGIN_CONNECTION_PART( CTestContainer98Doc, TC98CP )
00148     CONNECTION_IID( __uuidof( ITestContainer98Events ) )
00149    END_CONNECTION_PART( TC98CP )
00150
00151    DECLARE_CONNECTION_MAP()
00152
00153   // Generated OLE dispatch map functions
00154   //{{AFX_DISPATCH(CTestContainer98Doc)
00155   afx_msg LPDISPATCH GetPrimarySelection();
00156   afx_msg void SetPrimarySelection(LPDISPATCH newValue);
00157   afx_msg LPDISPATCH FindControl(LPCTSTR pszName);
00158   afx_msg void Log(LPCTSTR pszMessage);
00159   afx_msg LPDISPATCH InsertControl(LPCTSTR pszProgID, LPCTSTR pszName);
00160   //}}AFX_DISPATCH
00161   DECLARE_DISPATCH_MAP()
00162   DECLARE_INTERFACE_MAP()
00163
00164    friend class CTestContainer98Item;
00165    virtual BOOL SaveModified();
00166 };
00167
00168 /////////////////////////////////////////////////////////////////////////////
00169
00170 //{{AFX_INSERT_LOCATION}}
00171 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00172
00173 #endif // !defined(AFX_CTESTCONTAINER98DOC_H__19818508_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TCPropsLib::ITCExtendedControl Member List

This is the complete list of members for TCPropsLib::ITCExtendedControl, including all inherited members.
Activate() | TCPropsLib::ITCExtendedControl
Deactivate() | TCPropsLib::ITCExtendedControl
Name([in] BSTR bstrName) | TCPropsLib::ITCExtendedControl
Name([out, retval] BSTR *pbstrName) | TCPropsLib::ITCExtendedControl
PositionX([in] long x) | TCPropsLib::ITCExtendedControl
PositionX([out, retval] long *px) | TCPropsLib::ITCExtendedControl
PositionY([in] long y) | TCPropsLib::ITCExtendedControl
PositionY([out, retval] long *py) | TCPropsLib::ITCExtendedControl
SizeX([in] long x) | TCPropsLib::ITCExtendedControl
SizeX([out, retval] long *px) | TCPropsLib::ITCExtendedControl
SizeY([in] long y) | TCPropsLib::ITCExtendedControl
SizeY([out, retval] long *py) | TCPropsLib::ITCExtendedControl
UIActivate() | TCPropsLib::ITCExtendedControl
UIDeactivate() | TCPropsLib::ITCExtendedControl
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palctl.cpp Source File

  • controls
  • pal

palctl.cpp

Go to the documentation of this file.
00001 // palctl.cpp : Implementation of the CPalCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "pal.h"
00014 #include "palctl.h"
00015 #include "palppg.h"
00016
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // Forward declarations
00026
00027 HPALETTE CopyPalette(HPALETTE srcpal);
00028
00029
00030 IMPLEMENT_DYNCREATE(CPalCtrl, COleControl)
00031
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // Message map
00035
00036 BEGIN_MESSAGE_MAP(CPalCtrl, COleControl)
00037   //{{AFX_MSG_MAP(CPalCtrl)
00038   ON_WM_ERASEBKGND()
00039   //}}AFX_MSG_MAP
00040   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00041 END_MESSAGE_MAP()
00042
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // Dispatch map
00046
00047 BEGIN_DISPATCH_MAP(CPalCtrl, COleControl)
00048   //{{AFX_DISPATCH_MAP(CPalCtrl)
00049   DISP_PROPERTY_EX(CPalCtrl, "Length", GetLength, SetLength, VT_I2)
00050   DISP_PROPERTY_EX(CPalCtrl, "Picture", GetPicture, SetPicture, VT_PICTURE)
00051   DISP_PROPERTY_PARAM(CPalCtrl, "Entry", GetEntry, SetEntry, VT_COLOR, VTS_I2)
00052   DISP_DEFVALUE(CPalCtrl, "Handle")
00053   //}}AFX_DISPATCH_MAP
00054   DISP_FUNCTION_ID(CPalCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00055 END_DISPATCH_MAP()
00056
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // Event map
00060
00061 BEGIN_EVENT_MAP(CPalCtrl, COleControl)
00062   //{{AFX_EVENT_MAP(CPalCtrl)
00063   //}}AFX_EVENT_MAP
00064 END_EVENT_MAP()
00065
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // Property pages
00069
00070 // TODO: Add more property pages as needed.  Remember to increase the count!
00071 BEGIN_PROPPAGEIDS(CPalCtrl, 2)
00072   PROPPAGEID(CPalPropPage::guid)
00073   PROPPAGEID(CLSID_CPicturePropPage)
00074 END_PROPPAGEIDS(CPalCtrl)
00075
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // Initialize class factory and guid
00079
00080 IMPLEMENT_OLECREATE_EX(CPalCtrl, "PAL.PalCtrl.1",
00081   0x5733f76e, 0xbe58, 0x101a, 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f)
00082
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // Type library ID and version
00086
00087 IMPLEMENT_OLETYPELIB(CPalCtrl, _tlid, _wVerMajor, _wVerMinor)
00088
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // Interface IDs
00092
00093 const IID BASED_CODE IID_DPal =
00094     { 0x37446b83, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00095 const IID BASED_CODE IID_DPalEvents =
00096     { 0x37446b84, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00097
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // Control type information
00101
00102 static const DWORD BASED_CODE _dwPalOleMisc =
00103   OLEMISC_ACTIVATEWHENVISIBLE |
00104   OLEMISC_SETCLIENTSITEFIRST |
00105   OLEMISC_INSIDEOUT |
00106   OLEMISC_CANTLINKINSIDE |
00107   OLEMISC_RECOMPOSEONRESIZE;
00108
00109 IMPLEMENT_OLECTLTYPE(CPalCtrl, IDS_PAL, _dwPalOleMisc)
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CPalCtrl::CPalCtrlFactory::UpdateRegistry -
00114 // Adds or removes system registry entries for CPalCtrl
00115
00116 BOOL CPalCtrl::CPalCtrlFactory::UpdateRegistry(BOOL bRegister)
00117 {
00118   if (bRegister)
00119     return AfxOleRegisterControlClass(
00120       AfxGetInstanceHandle(),
00121       m_clsid,
00122       m_lpszProgID,
00123       IDS_PAL,
00124       IDB_PAL,
00125       FALSE,                      //  Not insertable
00126       _dwPalOleMisc,
00127       _tlid,
00128       _wVerMajor,
00129       _wVerMinor);
00130   else
00131     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00132 }
00133
00134
00135 /////////////////////////////////////////////////////////////////////////////
00136 // CPalCtrl::CPalCtrl - Constructor
00137
00138 CPalCtrl::CPalCtrl()
00139 {
00140   InitializeIIDs(&IID_DPal, &IID_DPalEvents);
00141
00142   m_iPalette = NULL;
00143 }
00144
00145
00146 /////////////////////////////////////////////////////////////////////////////
00147 // CPalCtrl::~CPalCtrl - Destructor
00148
00149 CPalCtrl::~CPalCtrl()
00150 {
00151   if (m_iPalette) delete m_iPalette;
00152 }
00153
00154
00155 /////////////////////////////////////////////////////////////////////////////
00156 // CPalCtrl::OnDraw - Drawing function
00157
00158 void CPalCtrl::OnDraw(
00159       CDC* pdc, const CRect& rcBounds, const CRect&)
00160 {
00161   CPalette *oldPalette;
00162   CPalette *pPalette;
00163   CPalette tempPalette;
00164   CBrush *oldBrush;
00165   CBrush *brush;
00166   int    i;
00167   int    height;
00168   int    stripeWidth;
00169   short  palNumEntries = 0;
00170
00171   if (m_iPalette)
00172     pPalette = m_iPalette;
00173   else
00174   {
00175     // Use stock palette if control palette is NULL
00176     tempPalette.CreateStockObject(DEFAULT_PALETTE);
00177     pPalette = &tempPalette;
00178   }
00179
00180   // Select and realize palette
00181   oldPalette = pdc->SelectPalette(pPalette, TRUE);
00182   pdc->RealizePalette();
00183
00184   // Get number of palettes entries
00185   pPalette->GetObject(sizeof(palNumEntries), (LPVOID)&palNumEntries);
00186
00187   height = rcBounds.Height();
00188
00189   // Calculate width of stripes
00190   stripeWidth = rcBounds.Width();
00191   stripeWidth = stripeWidth / (int)palNumEntries;
00192   ++stripeWidth;
00193
00194   pdc->IntersectClipRect(rcBounds);
00195
00196   // Draw each stripe
00197   for (i = 0; i < palNumEntries; i++)
00198   {
00199     brush = new CBrush;
00200     // A palette-relative brush is used for drawing.
00201     if (brush->CreateSolidBrush(PALETTEINDEX(i)) == TRUE)
00202     {
00203       // Setup brush
00204       oldBrush = pdc->SelectObject(brush);
00205       brush->UnrealizeObject();
00206
00207       // Draw stripe
00208       pdc->PatBlt(rcBounds.left + i*stripeWidth, rcBounds.top,
00209         stripeWidth, height, PATCOPY);
00210       pdc->SelectObject(oldBrush);
00211     }
00212     delete brush;
00213   }
00214
00215   // Back to old palette
00216   pdc->SelectPalette(oldPalette, TRUE);
00217   pdc->RealizePalette();
00218 }
00219
00220
00221 /////////////////////////////////////////////////////////////////////////////
00222 // CPalCtrl::DoPropExchange - Persistence support
00223
00224 void CPalCtrl::DoPropExchange(CPropExchange* pPX)
00225 {
00226   short nLength;
00227
00228   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00229   COleControl::DoPropExchange(pPX);
00230
00231   // Get Length if not loading
00232   if (!pPX->IsLoading())
00233     nLength = GetLength();
00234
00235   // Transfer property value to/from local variable
00236   PX_Short(pPX, _T("Length"), nLength, 20);
00237
00238   // Set Length if loading
00239   if (pPX->IsLoading())
00240     SetLength(nLength);
00241 }
00242
00243
00244 /////////////////////////////////////////////////////////////////////////////
00245 // CPalCtrl::Serialize - Persistence support
00246
00247 void CPalCtrl::Serialize(CArchive& ar)
00248 {
00249   short nLength;
00250   long lEntry;
00251   short i;
00252
00253   COleControl::Serialize(ar);
00254
00255   nLength = GetLength();
00256
00257   if (ar.IsLoading())
00258   {
00259     // Load each entry
00260     for (i = 0; i < nLength; i++)
00261     {
00262       // Load entry
00263       ar >> lEntry;
00264       SetEntry(i, lEntry);
00265     }
00266   }
00267   else
00268   {
00269     // Store each entry
00270     for (i = 0; i < nLength; i++)
00271     {
00272       // Store entry
00273       lEntry = GetEntry(i);
00274        ar << lEntry;
00275     }
00276   }
00277 }
00278
00279
00280 /////////////////////////////////////////////////////////////////////////////
00281 // CPalCtrl::OnResetState - Reset control to default state
00282
00283 void CPalCtrl::OnResetState()
00284 {
00285   if (m_iPalette) delete m_iPalette;
00286   m_iPalette = NULL;
00287
00288   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00289
00290   SetModifiedFlag(TRUE);
00291 }
00292
00293
00294 /////////////////////////////////////////////////////////////////////////////
00295 // CPalCtrl::AboutBox - Display an "About" box to the user
00296
00297 void CPalCtrl::AboutBox()
00298 {
00299   CDialog dlgAbout(IDD_ABOUTBOX_PAL);
00300   dlgAbout.DoModal();
00301 }
00302
00303
00304 /////////////////////////////////////////////////////////////////////////////
00305 // CPalCtrl::GetLength - Return the length of the palette.
00306
00307 short CPalCtrl::GetLength()
00308 {
00309   short nLength;
00310   CPalette *pPalette;
00311   CPalette tempPalette;
00312
00313   if (m_iPalette)
00314     pPalette = m_iPalette;
00315   else
00316   {
00317     // Use stock palette if control palette is NULL
00318     tempPalette.CreateStockObject(DEFAULT_PALETTE);
00319     pPalette = &tempPalette;
00320   }
00321
00322   // Get number of entries
00323   pPalette->GetObject(sizeof(nLength), LPVOID(&nLength));
00324
00325   return nLength;
00326 }
00327
00328
00329 /////////////////////////////////////////////////////////////////////////////
00330 // CPalCtrl::SetLength - Set the length of the palette.  Causes the palette
00331 // to be extended (with black entries) or truncated to the specified length.
00332
00333 void CPalCtrl::SetLength(short nNewValue)
00334 {
00335   HPALETTE hpal;
00336
00337   if (!m_iPalette)
00338   {
00339     // If control palette is NULL, set it to copy of stock palette
00340     hpal = CopyPalette((HPALETTE)GetStockObject(DEFAULT_PALETTE));
00341     if (!hpal)
00342       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00343     else
00344     {
00345       m_iPalette = new CPalette();
00346       m_iPalette->Attach(hpal);
00347     }
00348   }
00349
00350   // Resize palette
00351   if (!m_iPalette->ResizePalette(nNewValue))
00352     ThrowError(PAL_E_CANTRESIZEPALETTE, IDS_EXCEP_CANTRESIZEPALETTE);
00353
00354   SetModifiedFlag(TRUE);
00355   InvalidateControl();
00356 }
00357
00358
00359 /////////////////////////////////////////////////////////////////////////////
00360 // CPalCtrl::GetPicture - Return a picture containing the palette of the
00361 // palette control.
00362
00363 LPPICTUREDISP CPalCtrl::GetPicture()
00364 {
00365   HDC       hdcScr;
00366   HBITMAP   hbmp;
00367   HPALETTE  hpal;
00368   CPictureHolder picHolder;
00369
00370   // Create a picture using a 1x1 bitmap and a copy of our current
00371   // palette
00372
00373   // Create 1x1 bitmap
00374   hdcScr = ::GetDC(NULL);
00375   hbmp = CreateBitmap(1, 1,
00376         (BYTE)GetDeviceCaps(hdcScr, PLANES),
00377         (BYTE)GetDeviceCaps(hdcScr, BITSPIXEL),
00378         NULL);
00379   ::ReleaseDC(NULL, hdcScr);
00380   if (!hbmp)
00381     ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00382
00383   if (m_iPalette)
00384   {
00385     // Make a copy of the palette we're using
00386     hpal = CopyPalette((HPALETTE)m_iPalette->m_hObject);
00387     if (!hpal)
00388       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00389   }
00390   else
00391     hpal = NULL;
00392
00393   // Create picture using bitmap and palette
00394   picHolder.CreateFromBitmap(hbmp, hpal, TRUE);
00395
00396   return picHolder.GetPictureDispatch();
00397 }
00398
00399
00400 /////////////////////////////////////////////////////////////////////////////
00401 // CPalCtrl::SetPicture - Set the control's palette to the palette of the
00402 // passed picture.
00403
00404 void CPalCtrl::SetPicture(LPPICTUREDISP newValue)
00405 {
00406   COleDispatchDriver driver;
00407   HPALETTE hpal1, hpal2;
00408
00409   if (newValue)
00410   {
00411     // Obtain hPal property from picture
00412     driver.AttachDispatch(newValue, FALSE);
00413     driver.GetProperty(DISPID_PICT_HPAL, VT_HANDLE, (void*)&hpal1);
00414     if (hpal1)
00415     {
00416       // If palette object exists, free its HPAL
00417       if (m_iPalette)
00418         m_iPalette->Detach();
00419       // Else instantiate a new palette object
00420       else m_iPalette = new CPalette;
00421
00422       // Copy the palette from the picture
00423       hpal2 = CopyPalette(hpal1);
00424       if (!hpal2)
00425         ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00426
00427       // Attach new HPAL
00428       m_iPalette->Attach(hpal2);
00429
00430       SetModifiedFlag(TRUE);
00431       InvalidateControl();
00432       return;
00433     }
00434   }
00435
00436   // If new hPal not obtained, delete palette object so stock palette will
00437   // be used.
00438   if (m_iPalette)
00439   {
00440     delete m_iPalette;
00441     m_iPalette = NULL;
00442   }
00443   SetModifiedFlag(TRUE);
00444   InvalidateControl();
00445 }
00446
00447
00448 /////////////////////////////////////////////////////////////////////////////
00449 // CPalCtrl::GetEntry - Return a palette entry.
00450
00451 OLE_COLOR CPalCtrl::GetEntry(short nIndex)
00452 {
00453   PALETTEENTRY palentry;
00454   CPalette *pPalette;
00455   CPalette tempPalette;
00456
00457   if (m_iPalette)
00458     pPalette = m_iPalette;
00459   else
00460   {
00461     // Use stock palette if control palette is NULL
00462     tempPalette.CreateStockObject(DEFAULT_PALETTE);
00463     pPalette = &tempPalette;
00464   }
00465
00466   // Get palette entry
00467   if (!pPalette->GetPaletteEntries(nIndex, 1, &palentry))
00468     ThrowError(CTL_E_INVALIDPROPERTYARRAYINDEX, AFX_IDP_E_INVALIDPROPERTYARRAYINDEX);
00469
00470   return (OLE_COLOR)RGB(palentry.peRed, palentry.peGreen, palentry.peBlue);
00471 }
00472
00473
00474 /////////////////////////////////////////////////////////////////////////////
00475 // CPalCtrl::SetEntry - Set a palette entry.
00476
00477 void CPalCtrl::SetEntry(short nIndex, OLE_COLOR newValue)
00478 {
00479   COLORREF colorref;
00480   PALETTEENTRY    palentry;
00481   HPALETTE hpal;
00482
00483   if (!m_iPalette)
00484   {
00485     // If control palette is NULL, set it to copy of stock palette
00486     hpal = CopyPalette((HPALETTE)GetStockObject(DEFAULT_PALETTE));
00487     if (!hpal)
00488       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00489     else
00490     {
00491       m_iPalette = new CPalette();
00492       m_iPalette->Attach(hpal);
00493     }
00494   }
00495
00496   // Build an entry and set it in the palette
00497   colorref = TranslateColor(newValue);
00498   palentry.peRed   = GetRValue(colorref);
00499   palentry.peGreen = GetGValue(colorref);
00500   palentry.peBlue  = GetBValue(colorref);
00501   palentry.peFlags = 0;
00502
00503   if (!m_iPalette->SetPaletteEntries(nIndex, 1, &palentry))
00504     ThrowError(CTL_E_INVALIDPROPERTYARRAYINDEX, AFX_IDP_E_INVALIDPROPERTYARRAYINDEX);
00505
00506   SetModifiedFlag(TRUE);
00507   InvalidateControl();
00508 }
00509
00510
00511 /////////////////////////////////////////////////////////////////////////////
00512 // CPalCtrl::OnMapPropertyToPage - Map picture property to picture page.
00513
00514 BOOL CPalCtrl::OnMapPropertyToPage(DISPID dispid, LPCLSID lpclsid,
00515   BOOL* pbPageOptional)
00516 {
00517   switch(dispid)
00518   {
00519     case dispidPicture:
00520       *lpclsid = CLSID_CPicturePropPage;
00521       return TRUE;
00522   }
00523   return COleControl::OnMapPropertyToPage(dispid, lpclsid, pbPageOptional);
00524 }
00525
00526
00527 /////////////////////////////////////////////////////////////////////////////
00528 // CPalCtrl::OnEraseBkgnd - Simply return TRUE so background is not erased.
00529
00530 BOOL CPalCtrl::OnEraseBkgnd(CDC*)
00531 {
00532   return TRUE;
00533 }
00534
00535
00536 /////////////////////////////////////////////////////////////////////////////
00537 // CopyPalette - Return a copy of a GDI palette object.
00538
00539 HPALETTE CopyPalette(HPALETTE srcpal)
00540 {
00541   HGLOBAL hmem;
00542   HPALETTE destpal;
00543   PLOGPALETTE ppal;
00544   int nNumEntries;
00545
00546   if (!srcpal)
00547     return NULL;
00548
00549   GetObject(srcpal, sizeof(int), (LPSTR)&nNumEntries);
00550
00551   if (nNumEntries == 0)
00552     return NULL;
00553
00554   // Allocate buffer for palette info
00555   hmem = GlobalAlloc(LPTR, (WORD)(sizeof(LOGPALETTE) + nNumEntries * sizeof(PALETTEENTRY)));
00556   if (!hmem)
00557     return NULL;
00558
00559   ppal = (PLOGPALETTE)GlobalLock(hmem);
00560
00561   // Init palette header info
00562   ppal->palVersion  = 0x300;
00563   ppal->palNumEntries = (WORD)nNumEntries;
00564
00565   // Copy entries
00566   GetPaletteEntries(srcpal, 0, (WORD)nNumEntries, ppal->palPalEntry);
00567
00568   // Create palette
00569   destpal = CreatePalette(ppal);
00570
00571   GlobalFree(hmem);
00572   return destpal;
00573 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemo.cpp Source File

  • general
  • CTaskDialog

CTaskDialogDemo.cpp

Go to the documentation of this file.
00001 // TaskDialogTest.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 #include "stdafx.h"
00005 #include "CTaskDialogDemo.h"
00006 #include "CTaskDialogDemoDlg.h"
00007
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #endif
00011
00012
00013 // CTaskDialogTestApp
00014
00015 BEGIN_MESSAGE_MAP(CTaskDialogTestApp, CWinApp)
00016   ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
00017 END_MESSAGE_MAP()
00018
00019
00020 // CTaskDialogTestApp construction
00021
00022 CTaskDialogTestApp::CTaskDialogTestApp()
00023 {
00024   // TODO: add construction code here,
00025   // Place all significant initialization in InitInstance
00026 }
00027
00028
00029 // The one and only CTaskDialogTestApp object
00030
00031 CTaskDialogTestApp theApp;
00032
00033
00034 // CTaskDialogTestApp initialization
00035
00036 BOOL CTaskDialogTestApp::InitInstance()
00037 {
00038   // InitCommonControlsEx() is required on Windows XP if an application
00039   // manifest specifies use of ComCtl32.dll version 6 or later to enable
00040   // visual styles.  Otherwise, any window creation will fail.
00041   INITCOMMONCONTROLSEX InitCtrls;
00042   InitCtrls.dwSize = sizeof(InitCtrls);
00043   // Set this to include all the common control classes you want to use
00044   // in your application.
00045   InitCtrls.dwICC = ICC_WIN95_CLASSES;
00046   InitCommonControlsEx(&InitCtrls);
00047
00048   CWinApp::InitInstance();
00049
00050   AfxEnableControlContainer();
00051
00052   // Standard initialization
00053   // If you are not using these features and wish to reduce the size
00054   // of your final executable, you should remove from the following
00055   // the specific initialization routines you do not need
00056   // Change the registry key under which our settings are stored
00057   // TODO: You should modify this string to be something appropriate
00058   // such as the name of your company or organization
00059   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00060
00061   CTaskDialogTestDlg dlg;
00062   m_pMainWnd = &dlg;
00063   INT_PTR nResponse = dlg.DoModal();
00064   if (nResponse == IDOK)
00065   {
00066     // TODO: Place code here to handle when the dialog is
00067     //  dismissed with OK
00068   }
00069   else if (nResponse == IDCANCEL)
00070   {
00071     // TODO: Place code here to handle when the dialog is
00072     //  dismissed with Cancel
00073   }
00074
00075   // Since the dialog has been closed, return FALSE so that we exit the
00076   //  application, rather than start the application's message pump.
00077   return FALSE;
00078 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page3.cpp Source File

  • vc2008fp
  • NewControls

Page3.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "Page3.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CPage3 property page
00022
00023 IMPLEMENT_DYNCREATE(CPage3, CMFCPropertyPage)
00024
00025 CPage3::CPage3() : CMFCPropertyPage(CPage3::IDD)
00026 {
00027   m_bTrueType = TRUE;
00028   m_bRaster = TRUE;
00029   m_bDeviceFont = TRUE;
00030   m_bDrawUsingFont = FALSE;
00031 }
00032
00033 CPage3::~CPage3()
00034 {
00035 }
00036
00037 void CPage3::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CMFCPropertyPage::DoDataExchange(pDX);
00040   DDX_Control(pDX, IDC_CUSTOM_EDIT, m_wndCustomEdit);
00041   DDX_Control(pDX, IDC_FOLDER_EDIT, m_wndFolderEdit);
00042   DDX_Control(pDX, IDC_FILE_EDIT, m_wndFileEdit);
00043   DDX_Control(pDX, IDC_FONT, m_wndFont);
00044   DDX_Control(pDX, IDC_IMAGE_AREA, m_wndImageArea);
00045   DDX_Control(pDX, IDC_EDIT_IMAGE, m_btnImageEdit);
00046   DDX_Control(pDX, IDC_BUTTON_URL, m_btnLink);
00047   DDX_Control(pDX, IDC_EDIT_LIST, m_wndEditListBox);
00048   DDX_Check(pDX, IDC_TRUETYPE, m_bTrueType);
00049   DDX_Check(pDX, IDC_RASTER, m_bRaster);
00050   DDX_Check(pDX, IDC_DEVICE, m_bDeviceFont);
00051   DDX_Check(pDX, IDC_DRAW_USING_FONT, m_bDrawUsingFont);
00052 }
00053
00054 BEGIN_MESSAGE_MAP(CPage3, CMFCPropertyPage)
00055   ON_BN_CLICKED(IDC_EDIT_IMAGE, OnEditImage)
00056   ON_WM_PAINT()
00057   ON_BN_CLICKED(IDC_RASTER, OnFontType)
00058   ON_BN_CLICKED(IDC_TRUETYPE, OnFontType)
00059   ON_BN_CLICKED(IDC_DEVICE, OnFontType)
00060   ON_BN_CLICKED(IDC_DRAW_USING_FONT, OnDrawUsingFont)
00061   ON_CBN_SELCHANGE(IDC_FONT, OnSelchangeFont)
00062 END_MESSAGE_MAP()
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CPage3 message handlers
00066
00067 BOOL CPage3::OnInitDialog()
00068 {
00069   CMFCPropertyPage::OnInitDialog();
00070
00071   m_wndEditListBox.SetStandardButtons();
00072   m_wndEditListBox.EnableBrowseButton();
00073
00074   m_wndEditListBox.AddItem(_T("Item 1"));
00075   m_wndEditListBox.AddItem(_T("Item 2"));
00076   m_wndEditListBox.AddItem(_T("Item 3"));
00077
00078   m_btnLink.SetURL(_T("http://www.microsoft.com"));
00079   m_btnLink.SetTooltip(_T("Visit Microsoft site"));
00080   m_btnLink.SizeToContent();
00081
00082   m_btnImageEdit.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
00083   m_btnImageEdit.SetImage(IDB_IMAGE);
00084   m_btnImageEdit.SizeToContent();
00085   m_btnImageEdit.SetTextHotColor(RGB(0, 0, 255));
00086
00087   m_bmpImage.LoadBitmap(IDB_TEST_BITMAP);
00088
00089   BITMAP bmp;
00090   m_bmpImage.GetBitmap(&bmp);
00091
00092   m_wndImageArea.GetClientRect(m_rectImage);
00093   m_wndImageArea.MapWindowPoints(this, m_rectImage);
00094
00095   m_rectImage.right = m_rectImage.left + bmp.bmWidth;
00096   m_rectImage.bottom = m_rectImage.top + bmp.bmHeight;
00097
00098   m_wndFont.SelectFont(_T("Arial"));
00099   OnSelchangeFont();
00100
00101   m_wndFolderEdit.EnableFolderBrowseButton();
00102   m_wndFileEdit.EnableFileBrowseButton();
00103   m_wndCustomEdit.EnableBrowseButton();
00104
00105   UpdateData(FALSE);
00106
00107   return TRUE;  // return TRUE unless you set the focus to a control
00108   // EXCEPTION: OCX Property Pages should return FALSE
00109 }
00110
00111 void CPage3::OnPaint()
00112 {
00113   CPaintDC dc(this); // device context for painting
00114
00115   CRect rectFrame = m_rectImage;
00116
00117   rectFrame.InflateRect(1, 1);
00118   dc.Draw3dRect(rectFrame, GetSysColor(COLOR_3DLIGHT), GetSysColor(COLOR_3DSHADOW));
00119   rectFrame.InflateRect(1, 1);
00120   dc.Draw3dRect(rectFrame, GetSysColor(COLOR_3DHILIGHT), GetSysColor(COLOR_3DDKSHADOW));
00121
00122   dc.DrawState(m_rectImage.TopLeft(), m_rectImage.Size(), &m_bmpImage, 0);
00123 }
00124
00125 void CPage3::OnEditImage()
00126 {
00127   HBITMAP hBmpCopy = (HBITMAP) ::CopyImage(m_bmpImage.GetSafeHandle(), IMAGE_BITMAP, 0, 0, 0);
00128   ASSERT(hBmpCopy != NULL);
00129
00130   if (hBmpCopy)
00131   {
00132     CMFCImageEditorDialog dlg(CBitmap::FromHandle(hBmpCopy), this);
00133     if (dlg.DoModal() == IDOK)
00134     {
00135       m_bmpImage.DeleteObject();
00136       m_bmpImage.Attach(hBmpCopy);
00137
00138       InvalidateRect(m_rectImage);
00139       UpdateWindow();
00140     }
00141     else
00142     {
00143       ::DeleteObject(hBmpCopy);
00144     }
00145   }
00146 }
00147
00148 void CPage3::OnFontType()
00149 {
00150   UpdateData();
00151
00152   int nFontType = 0;
00153
00154   if (m_bTrueType)
00155   {
00156     nFontType |= TRUETYPE_FONTTYPE;
00157   }
00158
00159   if (m_bRaster)
00160   {
00161     nFontType |= RASTER_FONTTYPE;
00162   }
00163
00164   if (m_bDeviceFont)
00165   {
00166     nFontType |= DEVICE_FONTTYPE;
00167   }
00168
00169   CWaitCursor wait;
00170   m_wndFont.Setup(nFontType);
00171   m_wndFont.SelectFont((LPCTSTR)m_strCurFontName, m_nCurFontCharSet);
00172 }
00173
00174 void CPage3::OnDrawUsingFont()
00175 {
00176   UpdateData();
00177   CMFCFontComboBox::m_bDrawUsingFont = m_bDrawUsingFont;
00178   m_wndFont.RedrawWindow();
00179 }
00180
00181 void CPage3::OnSelchangeFont()
00182 {
00183   CMFCFontInfo* pCurFontInfo = m_wndFont.GetSelFont();
00184   if (pCurFontInfo != NULL)
00185   {
00186     ASSERT_VALID(pCurFontInfo);
00187
00188     m_strCurFontName = pCurFontInfo->m_strName;
00189     m_nCurFontCharSet = pCurFontInfo->m_nCharSet;
00190   }
00191 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/stdafx.cpp Source File

  • controls
  • push

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/gotodlg.cpp Source File

  • general
  • npp

gotodlg.cpp

Go to the documentation of this file.
00001 // gotodlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "np.h"
00015 #include "gotodlg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CGotoDlg dialog
00024
00025
00026 CGotoDlg::CGotoDlg(CWnd* pParent /*=NULL*/)
00027   : CDialog(CGotoDlg::IDD, pParent)
00028 {
00029   //{{AFX_DATA_INIT(CGotoDlg)
00030   m_nLineNum = 1;
00031   //}}AFX_DATA_INIT
00032 }
00033
00034
00035 void CGotoDlg::DoDataExchange(CDataExchange* pDX)
00036 {
00037   CDialog::DoDataExchange(pDX);
00038   //{{AFX_DATA_MAP(CGotoDlg)
00039   DDX_Text(pDX, IDC_GOTO_LINE, m_nLineNum);
00040   //}}AFX_DATA_MAP
00041 }
00042
00043
00044 BEGIN_MESSAGE_MAP(CGotoDlg, CDialog)
00045   //{{AFX_MSG_MAP(CGotoDlg)
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049 void CGotoDlg::OnCancel()
00050 {
00051   // TODO: Add extra cleanup here
00052
00053   CDialog::OnCancel();
00054 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCounterThread Member List

This is the complete list of members for CCounterThread, including all inherited members.
CCounterThread() | CCounterThread | [protected]
CExampleThread() | CExampleThread | [protected]
InitInstance() | CCounterThread | [virtual]
m_bDone | CExampleThread |
m_pOwner | CExampleThread |
Run() | CCounterThread | [virtual]
SetOwner(CMutexesDlg *pOwner) | CExampleThread | [inline]
~CCounterThread() | CCounterThread | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar1.h Source File

  • general
  • CmnCtrl1

toolbar1.h

Go to the documentation of this file.
00001 // Toolbar1.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CStandardBar window
00015 #ifndef INC_TOOLBAR1_H
00016 #define INC_TOOLBAR1_H
00017
00018 class CStandardBar : public CToolBarCtrl
00019 {
00020 private:
00021   int         m_nButtonCount;
00022   TBBUTTON    *m_pTBButtons;
00023   using CToolBarCtrl::Create;
00024
00025 // Construction
00026 public:
00027   CStandardBar();
00028
00029 // Attributes
00030 public:
00031
00032 // Operations
00033 public:
00034
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CStandardBar)
00039   public:
00040   virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
00041   virtual BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00042   //}}AFX_VIRTUAL
00043
00044
00045 // Implementation
00046 public:
00047   virtual ~CStandardBar();
00048
00049 protected:
00050   BOOL BeginAdjust(WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
00051   BOOL BeginDrag(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00052   BOOL CustomizeHelp(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00053   BOOL EndAdjust(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00054   BOOL EndDrag(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00055   BOOL GetButtonInfo(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00056   BOOL QueryDelete(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00057   BOOL QueryInsert(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00058   BOOL Reset(WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
00059   BOOL ToolBarChange(WPARAM wParam, LPARAM lParam,LRESULT* pLResult);
00060   CString NeedText(UINT nID, NMHDR * pNotifyStruct, LRESULT * lResult);
00061
00062   // Generated message map functions
00063 protected:
00064   //{{AFX_MSG(CStandardBar)
00065   afx_msg void OnNeedTextW( UINT nID, NMHDR * pNotifyStruct, LRESULT * lResult );
00066   afx_msg void OnNeedTextA( UINT nID, NMHDR * pNotifyStruct, LRESULT * lResult );
00067   //}}AFX_MSG
00068
00069   DECLARE_MESSAGE_MAP()
00070 };
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/resource.h Source File

  • vc2008fp
  • PaletteDemo

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by PaletteDemo.rc
00004 //
00005 #define IDS_MAIN_TOOLBAR                101
00006 #define IDS_PALETTE                     102
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_PALETTTYPE                  129
00009 #define IDR_POPUP_TOOLBAR               131
00010 #define IDR_PALETTE                     151
00011 #define IDD_ABOUTBOX                    999
00012 #define ID_VIEW_TOOLBARS                32771
00013 #define ID_VIEW_TOOLS_PALETTE           32818
00014 #define ID_PAL_CURSOR                   32819
00015 #define ID_PAL_PICTURE                  32820
00016 #define ID_PAL_STATIC                   32821
00017 #define ID_PAL_EDIT                     32822
00018 #define ID_PAL_FRAME                    32823
00019 #define ID_PAL_BUTTON                   32824
00020 #define ID_CPAL_CHECK                   32825
00021 #define ID_PAL_RADIO                    32826
00022 #define ID_PAL_COMBO                    32827
00023 #define ID_PAL_LIST                     32828
00024 #define ID_PAL_HSCROLL                  32829
00025 #define ID_PAL_VSCROLL                  32830
00026 #define ID_PAL_SPIN                     32831
00027 #define ID_PAL_PROGRESS                 32832
00028 #define ID_PAL_SLIDER                   32833
00029 #define ID_PAL_KEY                      32834
00030 #define ID_PAL_LIST_CTRL                32835
00031 #define ID_TREE_CTRL                    32836
00032 #define ID_PAL_TAB                      32837
00033 #define ID_PAL_AVI                      32838
00034 #define ID_TWO_COLUMNS                  32839
00035 #define ID_THREE_COLUMNS                32841
00036 #define ID_FOUR_COLUMNS                 32843
00037 #define ID_VIEW_CUSTOMIZE               32844
00038
00039 // Next default values for new objects
00040 //
00041 #ifdef APSTUDIO_INVOKED
00042 #ifndef APSTUDIO_READONLY_SYMBOLS
00043 #define _APS_3D_CONTROLS                     1
00044 #define _APS_NEXT_RESOURCE_VALUE        153
00045 #define _APS_NEXT_COMMAND_VALUE         32845
00046 #define _APS_NEXT_CONTROL_VALUE         1041
00047 #define _APS_NEXT_SYMED_VALUE           107
00048 #endif
00049 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRegEntry Member List

This is the complete list of members for CRegEntry, including all inherited members.
CRegEntry(const CString &rstrKey, const CString &rstrValue) | CRegEntry |
m_pszText | CRegEntry |
m_strKey | CRegEntry |
m_strValue | CRegEntry |
~CRegEntry() | CRegEntry | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/resource.h Source File

  • general
  • modeless

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by MODELESS.RC
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_MODELESS_DIALOG             102
00009 #define IDD_MAIN_DIALOG                 102
00010 #define IDR_MAINFRAME                   128
00011 #define IDD_ADDME                       129
00012 #define IDC_NEWTEXT                     1000
00013 #define IDC_LIST                        1001
00014
00015 // Next default values for new objects
00016 //
00017 #ifdef APSTUDIO_INVOKED
00018 #ifndef APSTUDIO_READONLY_SYMBOLS
00019 #define _APS_NEXT_RESOURCE_VALUE        130
00020 #define _APS_NEXT_COMMAND_VALUE         32771
00021 #define _APS_NEXT_CONTROL_VALUE         1002
00022 #define _APS_NEXT_SYMED_VALUE           101
00023 #endif
00024 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRebarTestView Member List

This is the complete list of members for CRebarTestView, including all inherited members.
CRebarTestView() | CRebarTestView | [protected]
GetDocument() const | CRebarTestView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CRebarTestView | [protected, virtual]
OnDraw(CDC *pDC) | CRebarTestView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CRebarTestView | [protected, virtual]
OnFilePrintPreview() | CRebarTestView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CRebarTestView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CRebarTestView | [virtual]
~CRebarTestView() | CRebarTestView | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/resource.h Source File

  • internet
  • HTMLEdit

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by htmledit.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define CG_IDD_FONTDLGBAR               102
00007 #define CG_ID_VIEW_FONTDLGBAR           103
00008 #define ID_FMTBAR_FONTNAME              104
00009 #define ID_FMTBAR_FONTSIZE              105
00010 #define IDC_ADDRCOMBO                   106
00011 #define IDR_MAINFRAME                   128
00012 #define IDR_HTMLEDTYPE                  129
00013 #define IDD_URLDIALOG                   130
00014 #define IDD_INSERT_TABLE                133
00015 #define IDR_MENU1                       136
00016 #define IDR_EDITPOPUP                   136
00017 #define IDC_EDIT                        137
00018 #define ID_Menu                         138
00019 #define ID_TOOLBAR_EDITING              144
00020 #define ID_INDICATOR_VIEW               145
00021 #define IDC_EDURL                       1000
00022 #define IDC_FONTNAME                    1001
00023 #define IDC_FONTSIZE                    1002
00024 #define IDC_FONTSTYLE                   1003
00025 #define IDC_EDIT_NUMROWS                1004
00026 #define IDC_EDIT_NUMCOLS                1005
00027 #define IDC_SPIN1                       1006
00028 #define IDC_SPIN2                       1007
00029 #define IDC_EDIT_TABLEATTRIBS           1008
00030 #define IDC_EDIT_CELLATTRIBS            1009
00031 #define IDC_EDIT_CAPTION                1010
00032 #define IDC_EXPLORER                    1013
00033 #define IDC_PHSTATIC                    1014
00034 #define IDC_BTNGO                       1015
00035 #define IDC_BTN_SEARCH                  1017
00036 #define IDC_EDIT_EDITMODE               32771
00037 #define ID_FILE_OPENURL                 32774
00038 #define IDC_EDIT_DESIGNMODE             32775
00039 #define ID_EDIT_SELECTALL               32776
00040 #define ID_EDIT_FONT                    32777
00041 #define ID_EDIT_TEST                    32778
00042 #define ID_TABLE_INSERT                 32779
00043 #define ID_TABLE_INSERTTABLE            32780
00044 #define ID_TABLE_INSERTROW              32781
00045 #define ID_TABLE_INSERTCOLUMN           32782
00046 #define ID_TABLE_DELETEROWS             32783
00047 #define ID_TABLE_DELETECOLUMNS          32784
00048 #define ID_TABLE_MERGECELLS             32785
00049 #define ID_TABLE_SPLITCELL              32786
00050 #define ID_TABLE_INSERTCELL             32787
00051 #define ID_TABLE_DELETECELLS            32788
00052 #define ID_BUTTON_IMAGE                 32791
00053 #define ID_VIEW_EDITINGTOOLBAR          32792
00054 #define ID_FORMAT_SENDTOBACK            32793
00055 #define ID_FORMAT_BRINGTOFRONT          32794
00056 #define ID_FORMAT_SENDBACKWARD          32795
00057 #define ID_FORMAT_BRINGFORWARD          32796
00058 #define ID_FORMAT_SENDBELOWTEXT         32797
00059 #define ID_FORMAT_BRINGABOVETEXT        32798
00060 #define ID_FORMAT_ABSOLUTEPOSITIONELEMENT 32799
00061 #define ID_FORMAT_STATICELEMENT         32800
00062 #define ID_BUTTON_FONTSIZE              32801
00063 #define ID_VIEW_WEB                     32802
00064 #define ID_VIEW_SOURCE                  32803
00065 #define ID_BUTTON_HYPERLINK             32804
00066 #define ID_BUTTON_CENTERJUSTIFY         32805
00067 #define ID_BUTTON_ABSOLUTE              32808
00068 #define ID_BUTTONSTATIC                 32809
00069 #define ID_BUTTON_STATIC                32809
00070 #define ID_BUTTON_BOLD                  32821
00071 #define ID_BUTTON_FONTNAME              32822
00072 #define ID_BUTTON_ITALIC                32825
00073 #define ID_BUTTON_UNDERLINE             32826
00074 #define ID_BUTTON_CENTER                32827
00075 #define ID_BUTTON_LEFTJUSTIFY           32828
00076 #define ID_BUTTON_RIGHTJUSTIFY          32829
00077 #define ID_BUTTON_BULLETLIST            32831
00078 #define ID_BUTTON_OUTDENT               32832
00079 #define ID_BUTTON_INDENT                32833
00080 #define ID_BUTTON_NUMBERLIST            32834
00081 #define ID_BUTTON_COLOR                 32945
00082 #define ID_BUTTON_BLOCKFMT              32946
00083
00084 // Next default values for new objects
00085 //
00086 #ifdef APSTUDIO_INVOKED
00087 #ifndef APSTUDIO_READONLY_SYMBOLS
00088 #define _APS_3D_CONTROLS                     1
00089 #define _APS_NEXT_RESOURCE_VALUE        139
00090 #define _APS_NEXT_COMMAND_VALUE         32810
00091 #define _APS_NEXT_CONTROL_VALUE         1018
00092 #define _APS_NEXT_SYMED_VALUE           107
00093 #endif
00094 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/ObjView.cpp Source File

  • ole
  • MFCBind

ObjView.cpp

Go to the documentation of this file.
00001 // ObjView.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "MFCBind.h"
00014
00015 #include "mainfrm.h"
00016 #include "cntritem.h"
00017 #include "BindDoc.h"
00018 #include "BindView.h"
00019 #include "ObjView.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CObjListView
00029
00030 IMPLEMENT_DYNCREATE(CObjListView, CView)
00031
00032 #pragma warning(disable: 4355)  // 'this' : used in base member initializer list
00033 CObjListView::CObjListView()
00034   : m_listbox(this), m_bFont(FALSE)
00035 {
00036 }
00037 #pragma warning(default: 4355)
00038
00039 CObjListView::~CObjListView()
00040 {
00041   // if we used a stock font, don't delete it
00042   if (!m_bFont)
00043     m_IconFont.Detach();
00044 }
00045
00046
00047 BEGIN_MESSAGE_MAP(CObjListView, CView)
00048   //{{AFX_MSG_MAP(CObjListView)
00049   ON_WM_CREATE()
00050   ON_WM_SIZE()
00051   ON_WM_DESTROY()
00052   //}}AFX_MSG_MAP
00053 END_MESSAGE_MAP()
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CObjListView drawing
00057
00058 void CObjListView::OnDraw(CDC* /*pDC*/)
00059 {
00060 }
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CObjListView diagnostics
00064
00065 #ifdef _DEBUG
00066 void CObjListView::AssertValid() const
00067 {
00068   CView::AssertValid();
00069 }
00070
00071 void CObjListView::Dump(CDumpContext& dc) const
00072 {
00073   CView::Dump(dc);
00074 }
00075 #endif //_DEBUG
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // CObjListView message handlers
00079
00080 int CObjListView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00081 {
00082   // Creates the view and creates the listbox that takes up
00083   // the view's client area.
00084   if (CView::OnCreate(lpCreateStruct) == -1)
00085     return -1;
00086
00087   // create a font to draw icon text with.
00088   LOGFONT lf;
00089   m_bFont = SystemParametersInfo(SPI_GETICONTITLELOGFONT,
00090     sizeof(lf), &lf, FALSE);
00091
00092   if (m_bFont)
00093     m_bFont = m_IconFont.CreateFontIndirect(&lf);
00094   if (!m_bFont)
00095     m_IconFont.Attach(GetStockObject(ANSI_VAR_FONT));
00096
00097   // create the listbox to fill our client area.
00098   CRect rc;
00099   GetClientRect(&rc);
00100   if (!m_listbox.Create(WS_CHILD | WS_VISIBLE | WS_VSCROLL | LBS_NOTIFY |
00101       LBS_HASSTRINGS | LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT,
00102         rc, this, ID_LISTBOX))
00103   {
00104     return -1;
00105   }
00106
00107   return 0;
00108 }
00109
00110 BOOL CObjListView::AddItem(COleClientItem *pObject, CString& name,
00111   HICON hIcon)
00112 {
00113   // Creates a CItemIcons data structure to hold item data and
00114   // adds the item to the list box.
00115
00116   #pragma warning (suppress: 6014)
00117   CItemIcons *pitem = new CItemIcons;
00118   pitem->m_Name = name;
00119   pitem->m_hIcon = hIcon;
00120   pitem->m_pObject = pObject;
00121
00122   int itemID = m_listbox.AddString(name);
00123   if (itemID != LB_ERR)
00124     m_listbox.SetItemData(itemID, (DWORD_PTR) pitem);
00125   m_listbox.SetCurSel(itemID);
00126   return TRUE;
00127 }
00128
00129 BOOL CObjListView::RemoveItem(COleClientItem *pRemove)
00130 {
00131   // Removes an item from the list box and sets focus to the previous
00132   // item in the list, if there is one.
00133   CItemIcons *pitem = NULL;
00134   CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
00135
00136   // We'll have to walk our list control and find the item to remove;
00137   int nItem;
00138   for (nItem = 0; nItem < m_listbox.GetCount(); nItem++)
00139   {
00140     pitem = (CItemIcons*) m_listbox.GetItemData(nItem);
00141     if (pitem && pitem->m_pObject == pRemove)
00142     {
00143       m_listbox.DeleteString(nItem);//delete item from listbox
00144       delete pitem; //free up the item
00145     }
00146   }
00147
00148   if (m_listbox.GetCount() == 0) //no items left
00149     return TRUE;
00150
00151   // set the previous item in the listbox as the current item
00152
00153   pitem = (CItemIcons*) m_listbox.GetItemData( m_listbox.GetCount() - 1);
00154   if (pitem != NULL)
00155   {
00156     ENSURE(pitem->m_pObject != NULL);
00157     pitem->m_pObject->Activate(OLEIVERB_SHOW, pFrame->GetDocView());
00158     pitem->m_pObject->GetInPlaceWindow()->SetFocus();
00159
00160     pFrame->GetDocView()->m_pSelection = (CMFCBindCntrItem*) pitem->m_pObject;
00161   }
00162
00163   m_listbox.SetCurSel(m_listbox.GetCount() - 1);
00164   return TRUE;
00165 }
00166
00167 void CObjListView::RemoveAllItems()
00168 {
00169   //Clears the listbox.  This also has the efect of deleting all of the CItemIcons from
00170   //the listbox.
00171
00172   CItemIcons *pItem=0;
00173   int nItems = m_listbox.GetCount();
00174   for(int i=0;i<nItems;i++)
00175   {
00176     pItem = (CItemIcons*)m_listbox.GetItemData(i);
00177     if (pItem)
00178       delete pItem;
00179   }
00180   m_listbox.ResetContent();
00181
00182 }
00183
00184 void CObjListView::OnDestroy()
00185 {
00186   // When we destroy the view, we need to make sure we loop
00187   // through all the items in the listbox and delete the CItemIcon structs
00188   // associated with each item in the listbox.
00189
00190   CView::OnDestroy();
00191
00192   // We can safely assume that all child windows still exist
00193   // so, we can go through each item in the list box and delete
00194   // the CItemIcons objects stored in item data.
00195
00196   int nItem;
00197   for (nItem = 0; nItem < m_listbox.GetCount(); nItem++)
00198   {
00199     CItemIcons *pitem = (CItemIcons*) m_listbox.GetItemData(nItem);
00200     if (DWORD_PTR(pitem) != LB_ERR)
00201       delete pitem;
00202   }
00203 }
00204
00205 void CObjListView::OnSize(UINT nType, int cx, int cy)
00206 {
00207   // re-sizes the listbox in the client area when the view gets resized.
00208   CView::OnSize(nType, cx, cy);
00209   m_listbox.SetWindowPos(this, 0, 0, cx, cy, SWP_NOMOVE | SWP_NOZORDER);
00210
00211 }
00212
00213 /////////////////////////////////////////////////////////////////////////////
00214 // CCustomList
00215
00216 CCustomList::CCustomList()
00217 {
00218 }
00219
00220 CCustomList::~CCustomList()
00221 {
00222 }
00223
00224
00225 BEGIN_MESSAGE_MAP(CCustomList, CListBox)
00226   //{{AFX_MSG_MAP(CCustomList)
00227   ON_CONTROL_REFLECT(LBN_SELCHANGE, OnSelchange)
00228   //}}AFX_MSG_MAP
00229 END_MESSAGE_MAP()
00230
00231 /////////////////////////////////////////////////////////////////////////////
00232 // CCustomList message handlers
00233
00234 void CCustomList::OnSelchange()
00235 {
00236   // This function will be called when someone clicks on an item in
00237   // the listbox. Each item's item data holds a pointer to a CItemIcons
00238   // structure, which holds pointers to the COleDocObjectItem for the embedded
00239   // item, pointers to the item's icon's metafile struct and a CString that
00240   // holds the name of the item.  When someone picks a new item from the list,
00241   // we should get the item data to get at the CItemIcon struct, check to see
00242   // if the item clicked on is the same item that is currently activated,
00243   // and, if it isn't, deactivate the currently activated item and
00244   // activate the newly selected item.
00245
00246   // Get a pointer to the view and document that is holding our objects
00247   CMainFrame *pMainFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
00248   ENSURE(pMainFrame != NULL);
00249
00250   COleDocument *pDocument = (COleDocument*) pMainFrame->GetActiveDocument();
00251   ENSURE(pDocument != NULL);
00252
00253   CView *pObjView = (CView*) pMainFrame->GetDocView();
00254
00255   // get the item data
00256   int nItem = GetCurSel();
00257   CItemIcons* pdata = (CItemIcons*) GetItemData(nItem);
00258   if (DWORD_PTR(pdata) == LB_ERR)
00259     return;
00260
00261   COleClientItem *pActiveItem = pDocument->GetInPlaceActiveItem(pObjView);
00262
00263   // check to see if we're already active
00264   if (pActiveItem == pdata->m_pObject)
00265   {
00266     pActiveItem->GetInPlaceWindow()->SetFocus();
00267     pMainFrame->GetDocView()->m_pSelection = (CMFCBindCntrItem*) pActiveItem;
00268     return; // already active, no work to do
00269   }
00270   else if (pActiveItem != NULL)
00271     pActiveItem->Deactivate(); // deactivate the already active item
00272
00273   // activate the newly selected item
00274   pActiveItem = pdata->m_pObject;
00275   pActiveItem->Activate(OLEIVERB_SHOW, pObjView);
00276   CWnd *pWndEdit = pActiveItem->GetInPlaceWindow();
00277   if (pWndEdit != NULL)
00278     pWndEdit->SetFocus();
00279   pMainFrame->GetDocView()->m_pSelection = (CMFCBindCntrItem*) pActiveItem;
00280 }
00281
00282 void CCustomList::MeasureItem(LPMEASUREITEMSTRUCT lpm)
00283 {
00284   //specify how high each listbox item will be.
00285   lpm->itemHeight = GetSystemMetrics(SM_CYICONSPACING);
00286 }
00287
00288 void CCustomList::DrawItem(LPDRAWITEMSTRUCT ldis)
00289 {
00290   ENSURE(ldis != NULL);
00291
00292   // drawing code for each item. We fill the entire rectangle
00293   // depending on whether or not we are drawing a selected item then
00294   // we draw the icon and the title held in the CItemIcons struct.
00295   COLORREF oldTextColor=0;
00296   COLORREF oldBkColor=0;
00297   CRect rc(ldis->rcItem);
00298   int cxIcon = GetSystemMetrics(SM_CXICON);
00299   int cyIcon = GetSystemMetrics(SM_CYICON);
00300
00301   CDC dc;
00302   dc.Attach(ldis->hDC);
00303
00304   // we stored a pointer to our CItemIcons struct in item data
00305
00306   CItemIcons *pItem = (CItemIcons*) GetItemData(ldis->itemID);
00307   CFont *pOldFont = dc.SelectObject(&m_pParent->m_IconFont);
00308   CRect rcText;
00309
00310   switch(ldis->itemAction)
00311   {
00312     case ODA_SELECT:
00313     case ODA_DRAWENTIRE:
00314       ASSERT(pItem->m_hIcon != NULL);
00315       // draw the background with system-wide color preference
00316       if (ldis->itemState & ODS_SELECTED)
00317       {
00318         dc.FillSolidRect(rc, ::GetSysColor(COLOR_HIGHLIGHT));
00319         oldTextColor = dc.SetTextColor(::GetSysColor(COLOR_WINDOW) );
00320         oldBkColor = dc.SetBkColor(::GetSysColor(COLOR_HIGHLIGHT) );
00321       }
00322       else
00323         dc.FillSolidRect(rc, ::GetSysColor(COLOR_WINDOW));
00324
00325       // Draw the icon
00326       dc.DrawIcon((rc.Width() / 2) - (cxIcon / 2), rc.top + 5,
00327         pItem->m_hIcon);
00328
00329       // calculate a rect to place the text centered below
00330       // the icon then draw the text
00331       rcText.SetRect(rc.left, rc.top + cyIcon + 4, rc.right, rc.bottom);
00332       dc.DrawText(pItem->m_Name, rcText, DT_CENTER | DT_TOP);
00333       if (ldis->itemState & ODS_SELECTED)
00334       {
00335         //we changed the text color in this case
00336         //so (being good GDI programmers) now we must change it back.
00337         dc.SetTextColor(oldTextColor);
00338         dc.SetBkColor(oldBkColor);
00339       }
00340
00341       break;
00342
00343     case ODA_FOCUS:
00344       break;
00345   }
00346
00347   // restore the DC
00348   dc.SelectObject(pOldFont);
00349   dc.Detach();
00350 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEditToolbar Member List

This is the complete list of members for CEditToolbar, including all inherited members.
CEditToolbar() | CEditToolbar |
m_font | CEditToolbar |
m_fontNameCombo | CEditToolbar |
m_fontSizeCombo | CEditToolbar |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CEditToolbar | [protected]
~CEditToolbar() | CEditToolbar | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPalCtrl Member List

This is the complete list of members for CPalCtrl, including all inherited members.
AboutBox() | CPalCtrl | [protected]
CPalCtrl() | CPalCtrl |
DECLARE_OLECREATE_EX(CPalCtrl) DECLARE_OLETYPELIB(CPalCtrl) DECLARE_PROPPAGEIDS(CPalCtrl) DECLARE_OLECTLTYPE(CPalCtrl) afx_msg BOOL OnEraseBkgnd(CDC *pDC) | CPalCtrl | [protected]
dispidEntry enum value | CPalCtrl |
dispidHandle enum value | CPalCtrl |
dispidLength enum value | CPalCtrl |
dispidPicture enum value | CPalCtrl |
DoPropExchange(CPropExchange *pPX) | CPalCtrl | [virtual]
GetEntry(short nIndex) | CPalCtrl | [protected]
GetLength() | CPalCtrl | [protected]
GetPicture() | CPalCtrl | [protected]
m_iPalette | CPalCtrl |
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CPalCtrl | [virtual]
OnMapPropertyToPage(DISPID dispid, LPCLSID lpclsid, BOOL *pbPageOptional) | CPalCtrl |
OnResetState() | CPalCtrl | [virtual]
Serialize(CArchive &ar) | CPalCtrl | [virtual]
SetEntry(short nIndex, OLE_COLOR newValue) | CPalCtrl | [protected]
SetLength(short nNewValue) | CPalCtrl | [protected]
SetPicture(LPPICTUREDISP newValue) | CPalCtrl | [protected]
~CPalCtrl() | CPalCtrl | [protected]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPROPHEADER Member List

This is the complete list of members for tagPROPHEADER, including all inherited members.
clsID | tagPROPHEADER
cSections | tagPROPHEADER
dwOSVer | tagPROPHEADER
wByteOrder | tagPROPHEADER
wFormat | tagPROPHEADER
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.h Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

FileDlgWatcher.h

Go to the documentation of this file.
00001 // FileDlgWatcher.h : main header file for the PROJECT_NAME application
00002 //
00003
00004 #pragma once
00005
00006 #ifndef __AFXWIN_H__
00007   #error "include 'stdafx.h' before including this file for PCH"
00008 #endif
00009
00010 #include "resource.h"   // main symbols
00011
00012
00013 // CFileDlgWatcherApp:
00014 // See FileDlgWatcher.cpp for the implementation of this class
00015 //
00016
00017 class CFileDlgWatcherApp : public CWinApp
00018 {
00019 public:
00020   CFileDlgWatcherApp();
00021
00022 // Overrides
00023   public:
00024   virtual BOOL InitInstance();
00025
00026 // Implementation
00027
00028   DECLARE_MESSAGE_MAP()
00029 };
00030
00031 extern CFileDlgWatcherApp theApp;
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/stdafx.h Source File

  • controls
  • push

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/StdAfx.h Source File

  • ole
  • TstCon
  • TCProps

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //      or project specific include files that are used frequently,
00003 //      but are changed infrequently
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #pragma once
00013
00014 #ifndef STRICT
00015 #define STRICT
00016 #endif
00017
00018 #define _ATL_APARTMENT_THREADED
00019 #define _ATL_NO_AUTOMATIC_NAMESPACE
00020
00021 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00022
00023 #include "resource.h"
00024 #include <atlbase.h>
00025 #include <atlcom.h>
00026 #include <atlctl.h>
00027
00028 using namespace ATL;
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/image.cpp Source File

  • controls
  • IMAGE

image.cpp

Go to the documentation of this file.
00001 // image.cpp : Implementation of CImageApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "image.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021
00022 CImageApp NEAR theApp;
00023
00024 const GUID CDECL BASED_CODE _tlid =
00025     { 0x346685e0, 0xc383, 0x11cf, { 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5 } };
00026 const WORD _wVerMajor = 1;
00027 const WORD _wVerMinor = 0;
00028
00029
00030 ////////////////////////////////////////////////////////////////////////////
00031 // CImageApp::InitInstance - DLL initialization
00032
00033 BOOL CImageApp::InitInstance()
00034 {
00035   BOOL bInit = COleControlModule::InitInstance();
00036   return bInit;
00037 }
00038
00039
00040 ////////////////////////////////////////////////////////////////////////////
00041 // CImageApp::ExitInstance - DLL termination
00042
00043 int CImageApp::ExitInstance()
00044 {
00045   return COleControlModule::ExitInstance();
00046 }
00047
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // DllRegisterServer - Adds entries to the system registry
00051
00052 STDAPI DllRegisterServer(void)
00053 {
00054   AFX_MANAGE_STATE(_afxModuleAddrThis);
00055
00056   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00057     return ResultFromScode(SELFREG_E_TYPELIB);
00058
00059   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00060     return ResultFromScode(SELFREG_E_CLASS);
00061
00062   return NOERROR;
00063 }
00064
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // DllUnregisterServer - Removes entries from the system registry
00068
00069 STDAPI DllUnregisterServer(void)
00070 {
00071   AFX_MANAGE_STATE(_afxModuleAddrThis);
00072
00073   if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
00074     return ResultFromScode(SELFREG_E_TYPELIB);
00075
00076   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00077     return ResultFromScode(SELFREG_E_CLASS);
00078
00079   return NOERROR;
00080 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/AllControlsSheet.cpp Source File

  • controls
  • cmnctrl

AllControlsSheet.cpp

Go to the documentation of this file.
00001 // AllControlsSheet.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014
00015 #include "AllControlsSheet.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CAllControlsSheet
00025
00026 IMPLEMENT_DYNAMIC(CAllControlsSheet, CPropertySheet)
00027
00028 CAllControlsSheet::CAllControlsSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00029   :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00030 {
00031   AddControlPages();
00032 }
00033
00034 CAllControlsSheet::CAllControlsSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00035   :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00036 {
00037   AddControlPages();
00038 }
00039
00040 CAllControlsSheet::~CAllControlsSheet()
00041 {
00042 }
00043
00044 void CAllControlsSheet::AddControlPages()
00045 {
00046   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00047   m_psh.dwFlags |= PSP_USEHICON;
00048   m_psh.dwFlags |= PSH_NOAPPLYNOW; // Eliminate the Apply button
00049   m_psh.hIcon = m_hIcon;
00050
00051   // Eliminate the Help button
00052   m_psh.dwFlags &= ~PSH_HASHELP;
00053   m_pagectrlpage.m_psp.dwFlags &= ~PSP_HASHELP;
00054   m_commandLinkpage.m_psp.dwFlags &= ~PSP_HASHELP;
00055   m_splitButtonpage.m_psp.dwFlags &= ~PSP_HASHELP;
00056   m_netaddressctrlpage.m_psp.dwFlags &= ~PSP_HASHELP;
00057
00058   AddPage(&m_pagectrlpage);
00059   AddPage(&m_commandLinkpage);
00060   AddPage(&m_splitButtonpage);
00061   AddPage(&m_netaddressctrlpage);
00062 }
00063
00064 BEGIN_MESSAGE_MAP(CAllControlsSheet, CPropertySheet)
00065   //{{AFX_MSG_MAP(CAllControlsSheet)
00066   ON_WM_QUERYDRAGICON()
00067   ON_WM_SYSCOMMAND()
00068   //}}AFX_MSG_MAP
00069 END_MESSAGE_MAP()
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CAllControlsSheet message handlers
00073
00074 BOOL CAllControlsSheet::OnInitDialog()
00075 {
00076   SetIcon(m_hIcon, TRUE);
00077   SetIcon(m_hIcon, FALSE);
00078   return CPropertySheet::OnInitDialog();
00079 }
00080 HCURSOR CAllControlsSheet::OnQueryDragIcon()
00081 {
00082   return (HCURSOR) m_hIcon;
00083 }
00084
00085 BOOL CAllControlsSheet::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00086 {
00087   return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
00088 }
00089
00090 void CAllControlsSheet::OnSysCommand(UINT nID, LPARAM lParam)
00091 {
00092   CPropertySheet::OnSysCommand(nID, lParam);
00093 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calcdriv.cpp Source File

  • ole
  • calcdriv

calcdriv.cpp

Go to the documentation of this file.
00001 // calcdriv.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "calcdriv.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CCalcDrivApp
00022
00023 BEGIN_MESSAGE_MAP(CCalcDrivApp, CWinApp)
00024   //{{AFX_MSG_MAP(CCalcDrivApp)
00025     // NOTE - the ClassWizard will add and remove mapping macros here.
00026     //    DO NOT EDIT what you see in these blocks of generated code!
00027   //}}AFX_MSG_MAP
00028   // Standard file based document commands
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CCalcDrivApp construction
00033
00034 CCalcDrivApp::CCalcDrivApp()
00035 {
00036   // TODO: add construction code here,
00037   // Place all significant initialization in InitInstance
00038 }
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // The one and only CCalcDrivApp object
00042
00043 CCalcDrivApp NEAR theApp;
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CCalcDrivApp initialization
00047
00048 BOOL CCalcDrivApp::InitInstance()
00049 {
00050 #ifdef _DEBUG
00051   // turn on extra memory tracking
00052   afxMemDF |= checkAlwaysMemDF;
00053 #endif
00054
00055   // Initialize OLE 2.0 libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   // Simple application that simply invokes a dialog
00063   CDriverDlg dlg;
00064   m_pMainWnd = &dlg;
00065   dlg.DoModal();
00066
00067   return FALSE;   // don't run after the dialog is done
00068 }
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CDriverDlg dialog
00072
00073 CDriverDlg::CDriverDlg(CWnd* pParent /*=NULL*/)
00074   : CDialog(CDriverDlg::IDD, pParent)
00075 {
00076   //{{AFX_DATA_INIT(CDriverDlg)
00077   //}}AFX_DATA_INIT
00078 }
00079
00080 CDriverDlg::~CDriverDlg()
00081 {
00082   TRY
00083   {
00084     // shut down the calculator
00085     //  (since calculator shows its user-interface, it would stay active
00086     //  if we didn't shut it down with a call to its Quit method)
00087     m_calc.Close();
00088   }
00089   END_TRY
00090 }
00091
00092 void CDriverDlg::DoDataExchange(CDataExchange* pDX)
00093 {
00094   CDialog::DoDataExchange(pDX);
00095   //{{AFX_DATA_MAP(CDriverDlg)
00096   DDX_Control(pDX, IDD_LAST_OPERATOR, m_stcOperator);
00097   DDX_Control(pDX, IDD_LAST_OPERAND, m_stcOperand);
00098   DDX_Control(pDX, IDC_LAST_ACCUM, m_stcAccum);
00099   DDX_Control(pDX, IDC_EXPRESSION, m_editExpression);
00100   //}}AFX_DATA_MAP
00101 }
00102
00103 BEGIN_MESSAGE_MAP(CDriverDlg, CDialog)
00104   //{{AFX_MSG_MAP(CDriverDlg)
00105   ON_BN_CLICKED(IDC_GO, OnGo)
00106   ON_BN_CLICKED(IDC_SINGLE_STEP, OnSingleStep)
00107   ON_BN_CLICKED(IDC_REFRESH, OnRefresh)
00108   //}}AFX_MSG_MAP
00109 END_MESSAGE_MAP()
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CDriverDlg message handlers
00114
00115 void CDriverDlg::OnGo()
00116 {
00117   // get current expression from the edit control
00118   CString strExpression;
00119   m_editExpression.GetWindowText(strExpression);
00120   LPCTSTR psz = strExpression;
00121
00122   // send all characters in the edit control from start to end
00123   int nLen = strExpression.GetLength();
00124   int nStart, nEnd;
00125   m_editExpression.GetSel(nStart, nEnd);
00126   if (nStart == nLen)
00127     nStart = 0;
00128   psz += nStart;
00129   while (*psz != '\0')
00130   {
00131     TCHAR szTemp[2];
00132     szTemp[0] = *psz;
00133     szTemp[1] = '\0';
00134     m_calc.Button(szTemp);
00135     ++psz;
00136   }
00137   m_editExpression.SetSel(nLen, nLen);
00138
00139   OnRefresh();    // refresh after all button commands sent
00140   m_calc.Evaluate();
00141   m_calc.Display();
00142 }
00143
00144 void CDriverDlg::OnSingleStep()
00145 {
00146   // get current expression from the edit control
00147   CString strExpression;
00148   m_editExpression.GetWindowText(strExpression);
00149   LPCTSTR psz = strExpression;
00150
00151   // send first character in selection, then move selection to next
00152   int nStart, nEnd;
00153   m_editExpression.GetSel(nStart, nEnd);
00154   psz += nStart;
00155   if (*psz != '\0')
00156   {
00157     TCHAR szTemp[2];
00158     szTemp[0] = *psz;
00159     szTemp[1] = '\0';
00160     m_calc.Button(szTemp);
00161
00162     OnRefresh();        // refresh after each step
00163
00164     // move to next character for next single-step
00165     m_editExpression.SetSel(nStart+1,
00166       min(strExpression.GetLength(), nStart+2));
00167   }
00168   else
00169   {
00170     m_calc.Evaluate();
00171     m_calc.Display();
00172     // stepping from end will start at beginning next time
00173     m_editExpression.SetSel(0, min(strExpression.GetLength(), 1));
00174   }
00175   OnRefresh();    // refresh after all button commands sent
00176 }
00177
00178 void CDriverDlg::OnRefresh()
00179 {
00180   TCHAR buf[64];
00181   long lResult = m_calc.GetOperand();
00182   _stprintf_s(buf, 64, _T("%ld"), lResult);
00183   m_stcOperand.SetWindowText(buf);
00184
00185   long lAccum = m_calc.GetAccum();
00186   _stprintf_s(buf, 64, _T("%ld"), lAccum);
00187   m_stcAccum.SetWindowText(buf);
00188
00189   short nOp = m_calc.GetOperation();
00190   static TCHAR operators[5] = { '?', '+', '-', '*', '/'};
00191   if (nOp < 0 || nOp > 4)
00192     nOp = 0;
00193   _stprintf_s(buf, 64, _T("%c"), operators[nOp]);
00194   m_stcOperator.SetWindowText(buf);
00195 }
00196
00197 BOOL CDriverDlg::OnInitDialog()
00198 {
00199   CDialog::OnInitDialog();
00200
00201   // create the calculator object that we'll drive through OLE automation
00202   COleException e;
00203   CLSID clsid;
00204   if (CLSIDFromProgID(OLESTR("mfccalc.calculator"), &clsid) != NOERROR)
00205   {
00206     AfxMessageBox(IDP_UNABLE_TO_CREATE);
00207     EndDialog(IDABORT);
00208     return FALSE;
00209   }
00210
00211   // try to get the active calculator before creating a new one
00212   LPUNKNOWN lpUnk;
00213   LPDISPATCH lpDispatch;
00214   if (GetActiveObject(clsid, NULL, &lpUnk) == NOERROR)
00215   {
00216     HRESULT hr = lpUnk->QueryInterface(IID_IDispatch,
00217       (LPVOID*)&lpDispatch);
00218     lpUnk->Release();
00219     if (hr == NOERROR)
00220       m_calc.AttachDispatch(lpDispatch, TRUE);
00221   }
00222
00223   // if not dispatch ptr attached yet, need to create one
00224   if (m_calc.m_lpDispatch == NULL &&
00225     !m_calc.CreateDispatch(clsid, &e))
00226   {
00227     AfxMessageBox(IDP_UNABLE_TO_CREATE);
00228     EndDialog(IDABORT);
00229     return FALSE;
00230   }
00231
00232   // attempt to make it visible
00233   m_calc.SetVisible(TRUE);
00234   if (!m_calc.GetVisible())
00235   {
00236     AfxMessageBox(IDP_UNABLE_TO_SHOW);
00237     EndDialog(IDABORT);
00238     return FALSE;
00239   }
00240
00241   // refresh display to contents of the automation calculator
00242   OnRefresh();
00243
00244   return TRUE;  // return TRUE  unless you set the focus to a control
00245 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/CntrItem.h Source File

  • vc2008fp
  • MSOffice2007Demo

CntrItem.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CMSOffice2007DemoDoc;
00015 class CMSOffice2007DemoView;
00016
00017 class CMSOffice2007DemoCntrItem : public CRichEditCntrItem
00018 {
00019   DECLARE_SERIAL(CMSOffice2007DemoCntrItem)
00020
00021 // Constructors
00022 public:
00023   CMSOffice2007DemoCntrItem(REOBJECT* preo = NULL, CMSOffice2007DemoDoc* pContainer = NULL);
00024   // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
00025   //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00026   //  zero arguments.  Normally, OLE items are constructed with a
00027   //  non-NULL document pointer.
00028
00029 // Attributes
00030 public:
00031   CMSOffice2007DemoDoc* GetDocument() { return(CMSOffice2007DemoDoc*)CRichEditCntrItem::GetDocument(); }
00032   CMSOffice2007DemoView* GetActiveView() { return(CMSOffice2007DemoView*)CRichEditCntrItem::GetActiveView(); }
00033
00034 protected:
00035   virtual BOOL OnShowPanes(CFrameWnd* pFrameWnd, BOOL bShow);
00036
00037 // Implementation
00038 public:
00039   ~CMSOffice2007DemoCntrItem();
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045   UINT m_uiCategoryID;
00046 };
00047
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdridoc.h Source File

  • ole
  • ipdrive

ipdridoc.h

Go to the documentation of this file.
00001 // ipdridoc.h : interface of the CDriverDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "ipremote.h"   // IDispatch interface for 'VariantMap' object
00013
00014 class CDriverDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CDriverDoc();
00018   DECLARE_DYNCREATE(CDriverDoc)
00019
00020 // Attributes
00021 public:
00022   CVariantMap m_map;  // "remoted" variant map
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CDriverDoc)
00030   public:
00031   virtual BOOL OnNewDocument();
00032   //}}AFX_VIRTUAL
00033
00034 // Implementation
00035 public:
00036   virtual ~CDriverDoc();
00037   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044
00045 // Generated message map functions
00046 protected:
00047   //{{AFX_MSG(CDriverDoc)
00048     // NOTE - the ClassWizard will add and remove member functions here.
00049     //    DO NOT EDIT what you see in these blocks of generated code !
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stdafx.cpp Source File

  • general
  • propdlg

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  propdlg.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/stdafx.cpp Source File

  • ole
  • oleview

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  stdafx.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/resource.h Source File

  • controls
  • netaddr

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by NetAddrVerifier.rc
00004 //
00005 #define IDD_NETADDRVERIFIER_DIALOG      102
00006 #define IDR_MAINFRAME                   128
00007 #define IDR_MENU1                       129
00008 #define IDC_ENUM_BUTTON                 1000
00009 #define IDC_LIST1                       1004
00010 #define IDC_VERIFY_BUTTON               1006
00011 #define IDC_ADDRESS                     1007
00012 #define ID_SPLITBUTTONMENU_VALIDATEALL  32771
00013 #define ID_SPLITBUTTONMENU_VALIDATEIPV4 32772
00014 #define ID_SPLITBUTTONMENU_VALIDATEIPV6 32773
00015 #define ID_SPLITBUTTONMENU_VALIDATENAMED 32774
00016
00017 // Next default values for new objects
00018 //
00019 #ifdef APSTUDIO_INVOKED
00020 #ifndef APSTUDIO_READONLY_SYMBOLS
00021 #define _APS_NEXT_RESOURCE_VALUE        132
00022 #define _APS_NEXT_COMMAND_VALUE         32783
00023 #define _APS_NEXT_CONTROL_VALUE         1011
00024 #define _APS_NEXT_SYMED_VALUE           101
00025 #endif
00026 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/oleview.cpp Source File

  • ole
  • oleview

oleview.cpp

Go to the documentation of this file.
00001 // oleview.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include <winver.h>
00015
00016 #include <initguid.h>
00017 #include "iviewers\\iviewers.h"
00018
00019 #include "OleView.h"
00020
00021 #include "mainfrm.h"
00022 #include "doc.h"
00023 #include "obj_vw.h"
00024 #include "regview.h"
00025 #include "shadow.h"
00026
00027 #ifdef _DEBUG
00028 #undef THIS_FILE
00029 static char BASED_CODE THIS_FILE[] = __FILE__;
00030 #endif
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // COle2ViewApp
00034
00035 BEGIN_MESSAGE_MAP(COle2ViewApp, CWinApp)
00036   //{{AFX_MSG_MAP(COle2ViewApp)
00037   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00038   //}}AFX_MSG_MAP
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // COle2ViewApp construction
00043
00044 COle2ViewApp::COle2ViewApp()
00045 {
00046   // TODO: add construction code here,
00047   // Place all significant initialization in InitInstance
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only COle2ViewApp object
00052
00053 COle2ViewApp theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // COle2ViewApp initialization
00057
00058 BOOL COle2ViewApp::InitInstance()
00059 {
00060   if (!AfxOleInit()) //OleInitialize(NULL)))
00061   {
00062     AfxMessageBox( _T("OleInitialize failed.  Could not initialized OLE 2; Ole2View cannot run.") ) ;
00063     return FALSE;
00064   }
00065
00066   SetRegistryKey( IDS_REGISTRYKEY );
00067
00068   m_pFont = ReallyCreateFont( NULL, _T("MS Sans Serif"), _T("Regular"), 8, 0 ) ;
00069   m_pFontBold = ReallyCreateFont( NULL, _T("MS Sans Serif"), _T("Bold"), 8, 0 ) ;
00070
00071   LoadBitmaps( FALSE ) ;
00072
00073   TEXTMETRIC  tm ;
00074   CDC dc ;
00075   HDC hdc = GetDC( NULL ) ;
00076   dc.Attach( hdc ) ;
00077
00078   m_pFont = dc.SelectObject( m_pFont ) ;
00079   dc.GetTextMetrics( &tm ) ;
00080   m_pFont = dc.SelectObject( m_pFont ) ;
00081   dc.Detach();
00082   ReleaseDC( NULL, hdc ) ;
00083
00084   m_cyFont = tm.tmHeight + tm.tmExternalLeading ;
00085
00086   // AutoRegister iviewers if not already registered
00087   //
00088 //    char szBuf[80] ; LONG cb = sizeof(szBuf) ;
00089 //    if (RegQueryValue(HKEY_CLASSES_ROOT, "Ole2View.ITypeLib.1", szBuf, &cb) != ERROR_SUCCESS)
00090 //    {
00091     CString str ;
00092     CString str2 ;
00093     HINSTANCE hinst = LoadLibrary( "iviewers.dll" ) ;
00094     if (hinst > (HINSTANCE)HINSTANCE_ERROR)
00095     {
00096       // Get DllRegisterServer function
00097       HRESULT (FAR STDAPICALLTYPE * lpDllEntryPoint)(void);
00098       (FARPROC&)lpDllEntryPoint = GetProcAddress(hinst, "DllRegisterServer");
00099       #pragma warning(suppress: 6001) //unexpected uninitialized memory prefast warning
00100       ENSURE(lpDllEntryPoint);
00101       if (lpDllEntryPoint)
00102       {
00103         HRESULT hr ;
00104         if (FAILED(hr = (*lpDllEntryPoint)()))
00105         {
00106           #pragma warning(suppress: 6031)
00107           str.LoadString( IDS_AUTOREGFAILED ) ;
00108           ASSERT(str != "");
00109           #pragma warning(suppress: 6031)
00110           str2.LoadString( IDS_IVIEWERSNOTFOUND2 ) ;
00111           ASSERT(str2 != "");
00112           str += str2 ;
00113           AfxMessageBox( str ) ;
00114         }
00115       }
00116       else
00117       {
00118         #pragma warning(suppress: 6031)
00119         str.LoadString( IDS_IVIEWERSNOTFOUND3 ) ;
00120         ASSERT(str != "");
00121         #pragma warning(suppress: 6031)
00122         str2.LoadString( IDS_IVIEWERSNOTFOUND2 ) ;
00123         ASSERT(str2 != "");
00124         str += str2 ;
00125         AfxMessageBox( str ) ;
00126       }
00127
00128       FreeLibrary( hinst ) ;
00129     }
00130     else
00131     {
00132
00133       #pragma warning(suppress: 6031)
00134       str.LoadString( IDS_IVIEWERSNOTFOUND1 ) ;
00135       ASSERT(str != "");
00136       #pragma warning(suppress: 6031)
00137       str2.LoadString( IDS_IVIEWERSNOTFOUND2 ) ;
00138       ASSERT(str2 != "");
00139       str += str2 ;
00140       #pragma warning(suppress: 6031)
00141       str2.LoadString( IDS_IVIEWERSNOTFOUND4 ) ;
00142       ASSERT(str2 != "");
00143       str += str2 ;
00144       AfxMessageBox( str ) ;
00145     }
00146 //    }
00147
00148   // Register the application's document templates.  Document templates
00149   //  serve as the connection between documents, frame windows and views.
00150   AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME,
00151       RUNTIME_CLASS(COle2ViewDoc),
00152       RUNTIME_CLASS(CMainFrame),     // main SDI frame window
00153       RUNTIME_CLASS(CObjTreeView)));
00154
00155   int nCmdShow = m_nCmdShow ;
00156   m_nCmdShow = SW_HIDE ;
00157   OnFileNew() ;
00158   ((CMainFrame*)GetMainWnd())->RestorePosition(nCmdShow) ;
00159
00160   // TODO: If there's something on the command line, try to
00161   // figure out if it's a
00162   //  - CLSID or a ProgID: CoCreateInstance the thing
00163   //  - A filename: Bind to the file, via a FileMoniker
00164   // Then enum the interfaces as normal.
00165   //
00166   if (m_lpCmdLine != NULL && *m_lpCmdLine != '\0')
00167   {
00168     AfxMessageBox( IDS_BADCOMMANDLINE ) ;
00169   }
00170
00171   return TRUE;
00172 }
00173
00174 int COle2ViewApp::ExitInstance()
00175 {
00176   if (m_pFont)
00177     delete m_pFont ;
00178
00179   if (m_pFontBold)
00180     delete m_pFontBold ;
00181
00182 //    FreeBitmaps() ;
00183
00184   return CWinApp::ExitInstance() ;
00185 }
00186
00187
00188 void COle2ViewApp::LoadBitmaps( BOOL fFree )
00189 {
00190 #if 0
00191   COLORREF    rgbNorm, rgbHigh ;
00192
00193   rgbNorm  = GetSysColor( COLOR_WINDOW ) ;
00194   rgbHigh = GetSysColor( COLOR_HIGHLIGHT ) ;
00195
00196   if (fFree)
00197     FreeBitmaps() ;
00198
00199   for (int i = IDB_FIRST ; i <= IDB_LAST ; i++)
00200   {
00201     m_rgbmNorm[BMINDEX(i)] = bmLoadAndTranslate( i, rgbNorm ) ;
00202     m_rgbmHigh[BMINDEX(i)] = bmLoadAndTranslate( i, rgbHigh ) ;
00203   }
00204 #else
00205   if (fFree)
00206     m_images.DeleteImageList() ;
00207
00208   if (0 == m_images.Create( IDB_IMAGELIST, 16, 100, RGBLTGREEN ))
00209   {
00210     AfxMessageBox("Could not load bitmaps" ) ;
00211   }
00212 #endif
00213 }
00214
00215 #if 0
00216 void FreeABitmap( CBitmap* p )
00217 {
00218   if (p)
00219     delete p ;
00220 }
00221 #endif
00222
00223 void COle2ViewApp::FreeBitmaps()
00224 {
00225 #if 0
00226   for (int i = IDB_FIRST ; i <= IDB_LAST ; i++)
00227   {
00228     FreeABitmap( m_rgbmNorm[BMINDEX(i)]) ;
00229     FreeABitmap( m_rgbmHigh[BMINDEX(i)]) ;
00230   }
00231 #else
00232   m_images.DeleteImageList() ;
00233 #endif
00234 }
00235
00236 /////////////////////////////////////////////////////////////////////////////
00237 // COle2ViewApp commands
00238 // We override OnIdle so that we can ensure the right message is on the status
00239 // bar.   Note we have to  call OnIdle alawys to make sure stuff like
00240 // CoFreeUnusedLibraries actually works.   (Bug fixed in 1.13).
00241
00242 /////////////////////////////////////////////////////////////////////////////
00243 // CAboutDlg dialog used for App About
00244
00245 class CAboutDlg : public CDialog
00246 {
00247 public:
00248   CAboutDlg();
00249
00250 // Dialog Data
00251   //{{AFX_DATA(CAboutDlg)
00252   enum { IDD = IDD_ABOUTBOX };
00253   CButton m_Cancel;
00254   CStatic m_WrittenBy;
00255   CStatic m_Group;
00256   CStatic m_Copyright;
00257   CStatic m_AppName;
00258   //}}AFX_DATA
00259
00260 // Implementation
00261 protected:
00262   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00263   //{{AFX_MSG(CAboutDlg)
00264   virtual BOOL OnInitDialog();
00265   //}}AFX_MSG
00266   DECLARE_MESSAGE_MAP()
00267 };
00268
00269 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00270 {
00271   //{{AFX_DATA_INIT(CAboutDlg)
00272   //}}AFX_DATA_INIT
00273 }
00274
00275 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00276 {
00277   CDialog::DoDataExchange(pDX);
00278   //{{AFX_DATA_MAP(CAboutDlg)
00279   DDX_Control(pDX, IDCANCEL, m_Cancel);
00280   DDX_Control(pDX, IDC_WRITTENBY, m_WrittenBy);
00281   DDX_Control(pDX, IDC_GROUP, m_Group);
00282   DDX_Control(pDX, IDC_COPYRIGHT, m_Copyright);
00283   DDX_Control(pDX, IDC_APPNAME, m_AppName);
00284   //}}AFX_DATA_MAP
00285 }
00286
00287 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00288   //{{AFX_MSG_MAP(CAboutDlg)
00289   //}}AFX_MSG_MAP
00290 END_MESSAGE_MAP()
00291
00292 // App command to run the dialog
00293 void COle2ViewApp::OnAppAbout()
00294 {
00295   CAboutDlg aboutDlg;
00296   aboutDlg.DoModal();
00297 }
00298
00299
00300
00301 typedef struct tagVS_VERSION
00302   {
00303   WORD wTotLen;
00304   WORD wValLen;
00305   TCHAR szSig[16];
00306   VS_FIXEDFILEINFO vffInfo;
00307   } VS_VERSION;
00308
00309
00310 BOOL CAboutDlg::OnInitDialog()
00311 {
00312   CDialog::OnInitDialog();
00313
00314   DlgCenter( m_hWnd, ::GetParent( m_hWnd ), FALSE ) ;
00315
00316   return TRUE;  // return TRUE  unless you set the focus to a control
00317 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemo.cpp Source File

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012
00013 #include "MainFrm.h"
00014 #include "ChildFrm.h"
00015 #include "VisualStudioDemoDoc.h"
00016 #include "VisualStudioDemoView.h"
00017 #include "StartView.h"
00018 #include "AppLookDlg.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CVisualStudioDemoApp
00028
00029 BEGIN_MESSAGE_MAP(CVisualStudioDemoApp, CWinAppEx)
00030   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00031   ON_COMMAND(ID_HELP_SHOW_START, OnHelpShowStart)
00032   ON_COMMAND(ID_VIEW_APP_LOOK, OnViewAppLook)
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00036   // Standard print setup command
00037   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CVisualStudioDemoApp construction
00042
00043 CVisualStudioDemoApp::CVisualStudioDemoApp()
00044 {
00045   m_pStartDocTemplate = NULL;
00046   m_pDocTemplateCpp = NULL;
00047
00048   m_bHiColorIcons = FALSE;
00049 }
00050
00051 CVisualStudioDemoApp::~CVisualStudioDemoApp()
00052 {
00053 }
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // The one and only CVisualStudioDemoApp object
00057
00058 CVisualStudioDemoApp theApp;
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CVisualStudioDemoApp initialization
00062
00063 BOOL CVisualStudioDemoApp::InitInstance()
00064 {
00065   // Initialize OLE libraries
00066   if (!AfxOleInit())
00067   {
00068     AfxMessageBox(IDP_OLE_INIT_FAILED);
00069     return FALSE;
00070   }
00071
00072   AfxEnableControlContainer();
00073
00074   // Standard initialization
00075   // If you are not using these features and wish to reduce the size
00076   //  of your final executable, you should remove from the following
00077   //  the specific initialization routines you do not need.
00078
00079   // Change the registry key under which our settings are stored.
00080   // TODO: You should modify this string to be something appropriate
00081   // such as the name of your company or organization.
00082   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00083
00084   LoadStdProfileSettings();  // Load standard INI file options(including MRU)
00085
00086   SetRegistryBase(_T("Settings"));
00087
00088   // Initialize all Managers for usage. They are automatically constructed
00089   // if not yet present
00090   InitContextMenuManager();
00091   InitKeyboardManager();
00092   InitTooltipManager();
00093
00094   EnableUserTools(ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10, RUNTIME_CLASS(CUserTool), IDR_MENU_ARGS, IDR_MENU_DIRS);
00095
00096   // Register the application's document templates.  Document templates
00097   //  serve as the connection between documents, frame windows and views.
00098
00099   m_pDocTemplateCpp = new CMultiDocTemplate(IDR_DEVTYPE_CPP, RUNTIME_CLASS(CVisualStudioDemoDoc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CVisualStudioDemoView));
00100   AddDocTemplate(m_pDocTemplateCpp);
00101
00102   m_pStartDocTemplate = new CMultiDocTemplate(IDR_DEVTYPE0, RUNTIME_CLASS(CVisualStudioDemoDoc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CStartView));
00103   AddDocTemplate(m_pStartDocTemplate);
00104
00105   // create main MDI Frame window
00106   CMainFrame* pMainFrame = new CMainFrame;
00107
00108   EnableLoadWindowPlacement(FALSE);
00109
00110   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00111     return FALSE;
00112   m_pMainWnd = pMainFrame;
00113
00114   // Parse command line for standard shell commands, DDE, file open
00115   CCommandLineInfo cmdInfo;
00116   ParseCommandLine(cmdInfo);
00117
00118   if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
00119   {
00120     if (!pMainFrame->LoadMDIState(GetRegSectionPath()))
00121     {
00122       m_pStartDocTemplate->OpenDocumentFile(NULL);
00123     }
00124   }
00125   else
00126   {
00127     // Dispatch commands specified on the command line
00128     if (!ProcessShellCommand(cmdInfo))
00129       return FALSE;
00130   }
00131
00132   m_pMainWnd->DragAcceptFiles();
00133
00134   // The main window has been initialized, so show and update it.
00135   if (!ReloadWindowPlacement(pMainFrame))
00136   {
00137     pMainFrame->ShowWindow(m_nCmdShow);
00138     pMainFrame->UpdateWindow();
00139   }
00140
00141   CAppLookDlg dlg(TRUE, m_pMainWnd);
00142   dlg.DoModal();
00143
00144   return TRUE;
00145 }
00146
00147 /////////////////////////////////////////////////////////////////////////////
00148 // CAboutDlg dialog used for App About
00149
00150 class CAboutDlg : public CDialog
00151 {
00152 public:
00153   CAboutDlg();
00154
00155 // Dialog Data
00156   //{{AFX_DATA(CAboutDlg)
00157   enum { IDD = IDD_ABOUTBOX };
00158   //}}AFX_DATA
00159
00160   // ClassWizard generated virtual function overrides
00161   //{{AFX_VIRTUAL(CAboutDlg)
00162   protected:
00163   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00164   //}}AFX_VIRTUAL
00165
00166 // Implementation
00167 protected:
00168   //{{AFX_MSG(CAboutDlg)
00169     // No message handlers
00170   //}}AFX_MSG
00171   DECLARE_MESSAGE_MAP()
00172 };
00173
00174 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00175 {
00176   //{{AFX_DATA_INIT(CAboutDlg)
00177   //}}AFX_DATA_INIT
00178 }
00179
00180 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00181 {
00182   CDialog::DoDataExchange(pDX);
00183   //{{AFX_DATA_MAP(CAboutDlg)
00184   //}}AFX_DATA_MAP
00185 }
00186
00187 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00188   //{{AFX_MSG_MAP(CAboutDlg)
00189     // No message handlers
00190   //}}AFX_MSG_MAP
00191 END_MESSAGE_MAP()
00192
00193 // App command to run the dialog
00194 void CVisualStudioDemoApp::OnAppAbout()
00195 {
00196   CAboutDlg aboutDlg;
00197   aboutDlg.DoModal();
00198 }
00199
00200 /////////////////////////////////////////////////////////////////////////////
00201 // Customization load/save methods
00202
00203 void CVisualStudioDemoApp::PreLoadState()
00204 {
00205   GetContextMenuManager()->AddMenu(_T("Edit Context menu"), IDR_CONTEXT_MENU);
00206   GetContextMenuManager()->AddMenu(_T("Resource"), IDR_POPUP_RESOURCE);
00207   GetContextMenuManager()->AddMenu(_T("Solution Explorer"), IDR_POPUP_SOLUTION);
00208 }
00209
00210 void CVisualStudioDemoApp::LoadCustomState()
00211 {
00212 }
00213
00214 void CVisualStudioDemoApp::SaveCustomState()
00215 {
00216 }
00217
00218 /////////////////////////////////////////////////////////////////////////////
00219 // CVisualStudioDemoApp message handlers
00220
00221 int CVisualStudioDemoApp::ExitInstance()
00222 {
00223   return CWinAppEx::ExitInstance();
00224 }
00225
00226 void CVisualStudioDemoApp::OnHelpShowStart()
00227 {
00228   ASSERT_VALID(m_pStartDocTemplate);
00229
00230   POSITION pos = m_pStartDocTemplate->GetFirstDocPosition();
00231   if (pos == NULL)
00232   {
00233     m_pStartDocTemplate->OpenDocumentFile(NULL);
00234     return;
00235   }
00236
00237   CDocument* pDoc = m_pStartDocTemplate->GetNextDoc(pos);
00238   ASSERT_VALID(pDoc);
00239
00240   pos = pDoc->GetFirstViewPosition();
00241   ASSERT(pos != NULL);
00242
00243   CView* pView = pDoc->GetNextView(pos);
00244   ASSERT_VALID(pView);
00245
00246   CFrameWnd* pFrame = pView->GetParentFrame();
00247   ASSERT_VALID(pFrame);
00248
00249   CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd();
00250   ASSERT_VALID(pMainFrame);
00251
00252   ::SendMessage(pMainFrame->m_hWndMDIClient, WM_MDIACTIVATE, (WPARAM) pFrame->GetSafeHwnd(), 0);
00253 }
00254
00255 void CVisualStudioDemoApp::OnViewAppLook()
00256 {
00257   CAppLookDlg dlg(FALSE, m_pMainWnd);
00258   dlg.DoModal();
00259 }
00260
00261 BOOL CVisualStudioDemoApp::SaveAllModified()
00262 {
00263   if (!CWinAppEx::SaveAllModified())
00264   {
00265     return FALSE;
00266   }
00267
00268   CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, m_pMainWnd);
00269   if (pMainFrame != NULL)
00270   {
00271     pMainFrame->SaveMDIState(GetRegSectionPath());
00272   }
00273
00274   return TRUE;
00275 }
00276
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBar.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMLinksBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MSMLinkssBar.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMoneyDemo.h"
00015 #include "MSMLinksBar.h"
00016 #include "MSMLinksBarButton.h"
00017
00018 #include "MSMVisualManager.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMSMLinksBar
00028
00029 IMPLEMENT_DYNCREATE(CMSMLinksBar, CMSMToolBar)
00030
00031 CMSMLinksBar::CMSMLinksBar ()
00032 {
00033   m_CurrentCommand = 0;
00034 }
00035
00036 CMSMLinksBar::~CMSMLinksBar ()
00037 {
00038 }
00039
00040 BEGIN_MESSAGE_MAP(CMSMLinksBar, CMSMToolBar)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CMSMLinksBar message handlers
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloVw.h Source File

  • general
  • mdidocvw

HelloVw.h

Go to the documentation of this file.
00001 // HelloVw.h : interface of the CHelloView class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 class CHelloView : public CView
00016 {
00017 protected: // create from serialization only
00018   CHelloView();
00019   DECLARE_DYNCREATE(CHelloView)
00020
00021 // Attributes
00022 public:
00023   CHelloDoc* GetDocument();
00024
00025 // Operations
00026 public:
00027   void MixColors();
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CHelloView)
00032   public:
00033   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00034   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00035   protected:
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 public:
00040   virtual ~CHelloView();
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:
00047
00048 // Generated message map functions
00049 protected:
00050   //{{AFX_MSG(CHelloView)
00051   afx_msg void OnUpdateBlue(CCmdUI* pCmdUI);
00052   afx_msg void OnUpdateGreen(CCmdUI* pCmdUI);
00053   afx_msg void OnUpdateRed(CCmdUI* pCmdUI);
00054   afx_msg void OnUpdateWhite(CCmdUI* pCmdUI);
00055   afx_msg void OnUpdateBlack(CCmdUI* pCmdUI);
00056   afx_msg void OnCustom();
00057   afx_msg void OnUpdateCustom(CCmdUI* pCmdUI);
00058   afx_msg void OnColor();
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 #ifndef _DEBUG  // debug version in HelloVw.cpp
00064 inline CHelloDoc* CHelloView::GetDocument()
00065    { return (CHelloDoc*)m_pDocument; }
00066 #endif
00067
00068 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/resource.h Source File

  • ole
  • inproc

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by INPROC.RC
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_CANT_RUN_STANDALONE         100
00007 #define IDP_OLE_INIT_FAILED             101
00008 #define IDR_MAINFRAME                   128
00009
00010 // Next default values for new objects
00011 //
00012 #ifdef APSTUDIO_INVOKED
00013 #ifndef APSTUDIO_READONLY_SYMBOLS
00014 #define _APS_NEXT_RESOURCE_VALUE        130
00015 #define _APS_NEXT_COMMAND_VALUE         32771
00016 #define _APS_NEXT_CONTROL_VALUE         1000
00017 #define _APS_NEXT_SYMED_VALUE           101
00018 #endif
00019 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawvw.cpp Source File

  • vc2008fp
  • DrawClient

drawvw.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include <afxpriv.h>
00014
00015 #include "DrawClient.h"
00016
00017 #include "drawdoc.h"
00018 #include "drawobj.h"
00019 #include "cntritem.h"
00020 #include "drawvw.h"
00021
00022 #include "drawobj.h"
00023 #include "drawtool.h"
00024 #include "mainfrm.h"
00025
00026 #include "LineWeightDlg.h"
00027
00028 #ifdef _DEBUG
00029 #undef THIS_FILE
00030 static char BASED_CODE THIS_FILE[] = __FILE__;
00031 #endif
00032
00033 // private clipboard format(list of Draw objects)
00034 CLIPFORMAT CDrawView::m_cfDraw = (CLIPFORMAT)
00035 ::RegisterClipboardFormat(_T("MFC Draw Sample"));
00036 CLIPFORMAT CDrawView::m_cfObjectDescriptor = NULL;
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CDrawView
00040
00041 IMPLEMENT_DYNCREATE(CDrawView, CScrollView)
00042
00043 BEGIN_MESSAGE_MAP(CDrawView, CScrollView)
00044   //{{AFX_MSG_MAP(CDrawView)
00045   ON_COMMAND(ID_OLE_INSERT_NEW, OnInsertObject)
00046   ON_COMMAND(ID_CANCEL_EDIT, OnCancelEdit)
00047   ON_WM_LBUTTONDOWN()
00048   ON_WM_LBUTTONUP()
00049   ON_WM_MOUSEMOVE()
00050   ON_WM_LBUTTONDBLCLK()
00051   ON_COMMAND(ID_DRAW_SELECT, OnDrawSelect)
00052   ON_COMMAND(ID_DRAW_ROUNDRECT, OnDrawRoundRect)
00053   ON_COMMAND(ID_DRAW_RECT, OnDrawRect)
00054   ON_COMMAND(ID_DRAW_LINE, OnDrawLine)
00055   ON_COMMAND(ID_DRAW_ELLIPSE, OnDrawEllipse)
00056   ON_UPDATE_COMMAND_UI(ID_DRAW_ELLIPSE, OnUpdateDrawEllipse)
00057   ON_UPDATE_COMMAND_UI(ID_DRAW_LINE, OnUpdateDrawLine)
00058   ON_UPDATE_COMMAND_UI(ID_DRAW_RECT, OnUpdateDrawRect)
00059   ON_UPDATE_COMMAND_UI(ID_DRAW_ROUNDRECT, OnUpdateDrawRoundRect)
00060   ON_UPDATE_COMMAND_UI(ID_DRAW_SELECT, OnUpdateDrawSelect)
00061   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVEBACK, OnUpdateSingleSelect)
00062   ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll)
00063   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00064   ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR, OnUpdateAnySelect)
00065   ON_COMMAND(ID_DRAW_POLYGON, OnDrawPolygon)
00066   ON_UPDATE_COMMAND_UI(ID_DRAW_POLYGON, OnUpdateDrawPolygon)
00067   ON_WM_SIZE()
00068   ON_COMMAND(ID_VIEW_GRID, OnViewGrid)
00069   ON_UPDATE_COMMAND_UI(ID_VIEW_GRID, OnUpdateViewGrid)
00070   ON_WM_ERASEBKGND()
00071   ON_COMMAND(ID_OBJECT_FILLCOLOR, OnObjectFillColor)
00072   ON_UPDATE_COMMAND_UI(ID_OBJECT_FILLCOLOR, OnUpdateObjectFillColor)
00073   ON_COMMAND(ID_OBJECT_NOFILL, OnObjectNoFill)
00074   ON_UPDATE_COMMAND_UI(ID_OBJECT_NOFILL, OnUpdateObjectNoFill)
00075   ON_COMMAND(ID_OBJECT_LINECOLOR, OnObjectLineColor)
00076   ON_UPDATE_COMMAND_UI(ID_OBJECT_LINECOLOR, OnUpdateObjectLineColor)
00077   ON_COMMAND(ID_OBJECT_NOLINE, OnObjectNoLine)
00078   ON_UPDATE_COMMAND_UI(ID_OBJECT_NOLINE, OnUpdateObjectNoLine)
00079   ON_COMMAND_RANGE(ID_OBJECT_LINEWEIGHT, ID_OBJECT_LINEWEIGHT_MORE, OnObjectLineWeight)
00080   ON_UPDATE_COMMAND_UI_RANGE(ID_OBJECT_LINEWEIGHT, ID_OBJECT_LINEWEIGHT_MORE, OnUpdateObjectLineWeight)
00081   ON_COMMAND(ID_OBJECT_PROPERTIES, OnObjectProperties)
00082   ON_UPDATE_COMMAND_UI(ID_OBJECT_PROPERTIES, OnUpdateObjectProperties)
00083   ON_COMMAND(ID_OBJECT_STYLES, OnObjectStyles)
00084   ON_UPDATE_COMMAND_UI(ID_OBJECT_STYLES, OnUpdateObjectStyles)
00085   ON_COMMAND(ID_OBJECT_MOVEBACK, OnObjectMoveBack)
00086   ON_COMMAND(ID_OBJECT_MOVEFORWARD, OnObjectMoveForward)
00087   ON_COMMAND(ID_OBJECT_MOVETOBACK, OnObjectMoveToBack)
00088   ON_COMMAND(ID_OBJECT_MOVETOFRONT, OnObjectMoveToFront)
00089   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00090   ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy)
00091   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00092   ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditCut)
00093   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00094   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste)
00095   ON_WM_SETFOCUS()
00096   ON_COMMAND(ID_VIEW_SHOWOBJECTS, OnViewShowObjects)
00097   ON_UPDATE_COMMAND_UI(ID_VIEW_SHOWOBJECTS, OnUpdateViewShowObjects)
00098   ON_WM_DESTROY()
00099   ON_UPDATE_COMMAND_UI(ID_EDIT_SELECT_ALL, OnUpdateEditSelectAll)
00100   ON_WM_CREATE()
00101   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVEFORWARD, OnUpdateSingleSelect)
00102   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVETOBACK, OnUpdateSingleSelect)
00103   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVETOFRONT, OnUpdateSingleSelect)
00104   ON_WM_CONTEXTMENU()
00105   // Standard printing commands
00106   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00107   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00108   ON_COMMAND(ID_FILE_PRINT_DIRECT, OnFilePrint)
00109   //}}AFX_MSG_MAP
00110 END_MESSAGE_MAP()
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CDrawView construction/destruction
00114
00115 CDrawView::CDrawView()
00116 {
00117   m_bGrid = TRUE;
00118   m_gridColor = RGB(0, 0, 128);
00119   m_bActive = FALSE;
00120   // new
00121   if ( m_cfObjectDescriptor == NULL )
00122     m_cfObjectDescriptor = (CLIPFORMAT)::RegisterClipboardFormat(_T("Object Descriptor") );
00123   m_prevDropEffect = DROPEFFECT_NONE;
00124   // end new
00125 }
00126
00127 CDrawView::~CDrawView()
00128 {
00129   ResetPreviewState();
00130 }
00131
00132 BOOL CDrawView::PreCreateWindow(CREATESTRUCT& cs)
00133 {
00134   ASSERT(cs.style & WS_CHILD);
00135   if (cs.lpszClass == NULL)
00136     cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS);
00137   return TRUE;
00138 }
00139
00140 void CDrawView::OnActivateView(BOOL bActivate, CView* pActiveView, CView* pDeactiveView)
00141 {
00142   CView::OnActivateView(bActivate, pActiveView, pDeactiveView);
00143
00144   if (!bActivate && GetDocument()->CanDeactivateInplace())
00145   {
00146     COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00147     if (pActiveItem != NULL && pActiveItem->GetItemState() == COleClientItem::activeUIState)
00148     {
00149       pActiveItem->Deactivate();
00150     }
00151   }
00152
00153   // invalidate selections when active status changes
00154   if (m_bActive != bActivate)
00155   {
00156     if (bActivate)  // if becoming active update as if active
00157       m_bActive = bActivate;
00158     if (!m_selection.IsEmpty())
00159       OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
00160     m_bActive = bActivate;
00161   }
00162
00163   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00164   ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
00165 }
00166
00167 /////////////////////////////////////////////////////////////////////////////
00168 // CDrawView drawing
00169
00170 void CDrawView::InvalObj(CDrawObj* pObj)
00171 {
00172   CRect rect = pObj->m_position;
00173   DocToClient(rect);
00174   if (m_bActive && IsSelected(pObj))
00175   {
00176     rect.left -= 4;
00177     rect.top -= 5;
00178     rect.right += 5;
00179     rect.bottom += 4;
00180   }
00181   rect.InflateRect(1, 1); // handles CDrawOleObj objects
00182
00183   InvalidateRect(rect, FALSE);
00184 }
00185
00186 void CDrawView::OnUpdate(CView* , LPARAM lHint, CObject* pHint)
00187 {
00188   switch (lHint)
00189   {
00190   case HINT_UPDATE_WINDOW:    // redraw entire window
00191     Invalidate(FALSE);
00192     break;
00193
00194   case HINT_UPDATE_DRAWOBJ:   // a single object has changed
00195     InvalObj((CDrawObj*)pHint);
00196     break;
00197
00198   case HINT_UPDATE_SELECTION: // an entire selection has changed
00199     {
00200       CDrawObjList* pList = pHint != NULL ?
00201         (CDrawObjList*)pHint : &m_selection;
00202       POSITION pos = pList->GetHeadPosition();
00203       while (pos != NULL)
00204       {
00205         InvalObj(pList->GetNext(pos));
00206       }
00207       ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00208     }
00209     break;
00210
00211   case HINT_DELETE_SELECTION: // an entire selection has been removed
00212     if (pHint != &m_selection)
00213     {
00214       CDrawObjList* pList = (CDrawObjList*)pHint;
00215       POSITION pos = pList->GetHeadPosition();
00216       while (pos != NULL)
00217       {
00218         CDrawObj* pObj = pList->GetNext(pos);
00219         InvalObj(pObj);
00220         Remove(pObj);   // remove it from this view's selection
00221       }
00222     }
00223     ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00224     break;
00225
00226   case HINT_UPDATE_OLE_ITEMS:
00227     {
00228       CDrawDoc* pDoc = GetDocument();
00229       POSITION pos = pDoc->GetObjects()->GetHeadPosition();
00230       while (pos != NULL)
00231       {
00232         CDrawObj* pObj = pDoc->GetObjects()->GetNext(pos);
00233         if (pObj->IsKindOf(RUNTIME_CLASS(CDrawOleObj)))
00234           InvalObj(pObj);
00235       }
00236     }
00237     break;
00238
00239   default:
00240     ASSERT(FALSE);
00241     break;
00242   }
00243 }
00244
00245 void CDrawView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
00246 {
00247   CScrollView::OnPrepareDC(pDC, pInfo);
00248
00249   // mapping mode is MM_ANISOTROPIC
00250   // these extents setup a mode similar to MM_LOENGLISH
00251   // MM_LOENGLISH is in .01 physical inches
00252   // these extents provide .01 logical inches
00253
00254   pDC->SetMapMode(MM_ANISOTROPIC);
00255   pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX), pDC->GetDeviceCaps(LOGPIXELSY));
00256   pDC->SetWindowExt(100, -100);
00257
00258   // set the origin of the coordinate system to the center of the page
00259   CPoint ptOrg;
00260   ptOrg.x = GetDocument()->GetSize().cx / 2;
00261   ptOrg.y = GetDocument()->GetSize().cy / 2;
00262
00263   // ptOrg is in logical coordinates
00264   pDC->OffsetWindowOrg(-ptOrg.x,ptOrg.y);
00265 }
00266
00267 BOOL CDrawView::OnScrollBy(CSize sizeScroll, BOOL bDoScroll)
00268 {
00269   // do the scroll
00270   if (!CScrollView::OnScrollBy(sizeScroll, bDoScroll))
00271     return FALSE;
00272
00273   // update the position of any in-place active item
00274   if (bDoScroll)
00275   {
00276     UpdateActiveItem();
00277     UpdateWindow();
00278   }
00279   return TRUE;
00280 }
00281
00282 void CDrawView::OnDraw(CDC* pDC)
00283 {
00284   CDrawDoc* pDoc = GetDocument();
00285   ASSERT_VALID(pDoc);
00286
00287   CDC dc;
00288   CDC* pDrawDC = pDC;
00289   CBitmap bitmap;
00290   CBitmap* pOldBitmap = 0;
00291
00292   // only paint the rect that needs repainting
00293   CRect client;
00294   pDC->GetClipBox(client);
00295   CRect rect = client;
00296   DocToClient(rect);
00297
00298   if (!pDC->IsPrinting())
00299   {
00300     // draw to offscreen bitmap for fast looking repaints
00301     if (dc.CreateCompatibleDC(pDC))
00302     {
00303       if (bitmap.CreateCompatibleBitmap(pDC, rect.Width(), rect.Height()))
00304       {
00305         OnPrepareDC(&dc, NULL);
00306         pDrawDC = &dc;
00307
00308         // offset origin more because bitmap is just piece of the whole drawing
00309         dc.OffsetViewportOrg(-rect.left, -rect.top);
00310         pOldBitmap = dc.SelectObject(&bitmap);
00311         dc.SetBrushOrg(rect.left % 8, rect.top % 8);
00312
00313         // might as well clip to the same rectangle
00314         dc.IntersectClipRect(client);
00315       }
00316     }
00317   }
00318
00319   // paint background
00320   CBrush brush;
00321   if (!brush.CreateSolidBrush(pDoc->GetPaperColor()))
00322     return;
00323
00324   brush.UnrealizeObject();
00325   pDrawDC->FillRect(client, &brush);
00326
00327   if (!pDC->IsPrinting() && m_bGrid)
00328     DrawGrid(pDrawDC);
00329
00330   pDoc->Draw(pDrawDC, this);
00331
00332   if (pDrawDC != pDC)
00333   {
00334     pDC->SetViewportOrg(0, 0);
00335     pDC->SetWindowOrg(0,0);
00336     pDC->SetMapMode(MM_TEXT);
00337     dc.SetViewportOrg(0, 0);
00338     dc.SetWindowOrg(0,0);
00339     dc.SetMapMode(MM_TEXT);
00340     pDC->BitBlt(rect.left, rect.top, rect.Width(), rect.Height(), &dc, 0, 0, SRCCOPY);
00341     dc.SelectObject(pOldBitmap);
00342   }
00343 }
00344
00345 void CDrawView::Remove(CDrawObj* pObj)
00346 {
00347   POSITION pos = m_selection.Find(pObj);
00348   if (pos != NULL)
00349   {
00350     m_selection.RemoveAt(pos);
00351     ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00352     ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
00353   }
00354 }
00355
00356 void CDrawView::PasteNative(COleDataObject& dataObject)
00357 {
00358   // get file refering to clipboard data
00359   CFile* pFile = dataObject.GetFileData(m_cfDraw);
00360   if (pFile == NULL)
00361     return;
00362
00363   // connect the file to the archive
00364   CArchive ar(pFile, CArchive::load);
00365   TRY
00366   {
00367     ar.m_pDocument = GetDocument(); // set back-pointer in archive
00368
00369     // read the selection
00370     m_selection.Serialize(ar);
00371   }
00372   CATCH_ALL(e)
00373   {
00374     ar.Close();
00375     delete pFile;
00376     THROW_LAST();
00377   }
00378   END_CATCH_ALL
00379
00380     ar.Close();
00381   delete pFile;
00382 }
00383
00384 void CDrawView::PasteEmbedded(COleDataObject& dataObject, CPoint point )
00385 {
00386   BeginWaitCursor();
00387
00388   // paste embedded
00389   CDrawOleObj* pObj = new CDrawOleObj(GetInitialPosition());
00390   ASSERT_VALID(pObj);
00391
00392 #pragma warning(suppress:6014)
00393   CDrawItem* pItem = new CDrawItem(GetDocument(), pObj);
00394   ASSERT_VALID(pItem);
00395   pObj->m_pClientItem = pItem;
00396
00397   TRY
00398   {
00399     if (!pItem->CreateFromData(&dataObject) && !pItem->CreateStaticFromData(&dataObject))
00400     {
00401       AfxThrowMemoryException();      // any exception will do
00402     }
00403
00404     // add the object to the document
00405     GetDocument()->Add(pObj);
00406     m_selection.AddTail(pObj);
00407
00408     ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00409     ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
00410
00411     ClientToDoc( point );
00412     pObj->MoveTo( CRect( point, pObj->m_extent ), this );
00413
00414     // try to get initial presentation data
00415     pItem->UpdateLink();
00416     pItem->UpdateExtent();
00417   }
00418   CATCH_ALL(e)
00419   {
00420     // clean up item
00421     pItem->Delete();
00422     pObj->m_pClientItem = NULL;
00423     GetDocument()->Remove(pObj);
00424     pObj->Remove();
00425
00426     AfxMessageBox(IDP_FAILED_TO_CREATE);
00427   }
00428   END_CATCH_ALL
00429
00430     EndWaitCursor();
00431 }
00432
00433 void CDrawView::DrawGrid(CDC* pDC)
00434 {
00435   CDrawDoc* pDoc = GetDocument();
00436
00437   COLORREF oldBkColor = pDC->SetBkColor(pDoc->GetPaperColor());
00438
00439   CRect rect;
00440   rect.left = -pDoc->GetSize().cx / 2;
00441   rect.top = -pDoc->GetSize().cy / 2;
00442   rect.right = rect.left + pDoc->GetSize().cx;
00443   rect.bottom = rect.top + pDoc->GetSize().cy;
00444
00445   // Center lines
00446   CPen penDash;
00447   penDash.CreatePen(PS_DASH, 0, m_gridColor);
00448   CPen* pOldPen = pDC->SelectObject(&penDash);
00449
00450   pDC->MoveTo(0, rect.top);
00451   pDC->LineTo(0, rect.bottom);
00452   pDC->MoveTo(rect.left, 0);
00453   pDC->LineTo(rect.right, 0);
00454
00455   // Major unit lines
00456   CPen penDot;
00457   penDot.CreatePen(PS_DOT, 0, m_gridColor);
00458   pDC->SelectObject(&penDot);
00459
00460   for (int x = rect.left / 100 * 100; x < rect.right; x += 100)
00461   {
00462     if (x != 0)
00463     {
00464       pDC->MoveTo(x, rect.top);
00465       pDC->LineTo(x, rect.bottom);
00466     }
00467   }
00468
00469   for (int y = rect.top / 100 * 100; y < rect.bottom; y += 100)
00470   {
00471     if (y != 0)
00472     {
00473       pDC->MoveTo(rect.left, y);
00474       pDC->LineTo(rect.right, y);
00475     }
00476   }
00477
00478   // Outlines
00479   CPen penSolid;
00480   penSolid.CreatePen(PS_SOLID, 0, m_gridColor);
00481   pDC->SelectObject(&penSolid);
00482   pDC->MoveTo(rect.left, rect.top);
00483   pDC->LineTo(rect.right, rect.top);
00484   pDC->LineTo(rect.right, rect.bottom);
00485   pDC->LineTo(rect.left, rect.bottom);
00486   pDC->LineTo(rect.left, rect.top);
00487
00488   pDC->SelectObject(pOldPen);
00489   pDC->SetBkColor(oldBkColor);
00490 }
00491
00492 void CDrawView::OnInitialUpdate()
00493 {
00494   CSize size = GetDocument()->GetSize();
00495   CClientDC dc(NULL);
00496   size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
00497   size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
00498   SetScrollSizes(MM_TEXT, size);
00499 }
00500
00501 void CDrawView::SetPageSize(CSize size)
00502 {
00503   CClientDC dc(NULL);
00504   size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
00505   size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
00506   SetScrollSizes(MM_TEXT, size);
00507   GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_WINDOW, NULL);
00508 }
00509
00510 /////////////////////////////////////////////////////////////////////////////
00511 // CDrawView printing
00512
00513 BOOL CDrawView::OnPreparePrinting(CPrintInfo* pInfo)
00514 {
00515   // default preparation
00516   return DoPreparePrinting(pInfo);
00517 }
00518
00519 void CDrawView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
00520 {
00521   CScrollView::OnBeginPrinting(pDC,pInfo);
00522
00523   // check page size -- user could have gone into print setup
00524   // from print dialog and changed paper or orientation
00525   GetDocument()->ComputePageSize();
00526 }
00527
00528 void CDrawView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00529 {
00530   // TODO: add cleanup after printing
00531 }
00532
00533 /////////////////////////////////////////////////////////////////////////////
00534 // OLE Client support and commands
00535
00536 BOOL CDrawView::IsSelected(const CObject* pDocItem) const
00537 {
00538   CDrawObj* pDrawObj = (CDrawObj*)pDocItem;
00539   if (pDocItem->IsKindOf(RUNTIME_CLASS(CDrawItem)))
00540     pDrawObj = ((CDrawItem*)pDocItem)->m_pDrawObj;
00541   return m_selection.Find(pDrawObj) != NULL;
00542 }
00543
00544 void CDrawView::OnInsertObject()
00545 {
00546   // Invoke the standard Insert Object dialog box to obtain information
00547   //  for new CDrawItem object.
00548   COleInsertDialog dlg;
00549   if (dlg.DoModal() != IDOK)
00550     return;
00551
00552   BeginWaitCursor();
00553
00554   // First create the C++ object
00555   CDrawOleObj* pObj = new CDrawOleObj(GetInitialPosition());
00556   ASSERT_VALID(pObj);
00557   CDrawItem* pItem = new CDrawItem(GetDocument(), pObj);
00558   ASSERT_VALID(pItem);
00559   pObj->m_pClientItem = pItem;
00560
00561   // Now create the OLE object/item
00562   TRY
00563   {
00564     if (!dlg.CreateItem(pObj->m_pClientItem))
00565       AfxThrowMemoryException();
00566
00567     // add the object to the document
00568     GetDocument()->Add(pObj);
00569
00570     // try to get initial presentation data
00571     pItem->UpdateLink();
00572     pItem->UpdateExtent();
00573
00574     // if insert new object -- initially show the object
00575     if (dlg.GetSelectionType() == COleInsertDialog::createNewItem)
00576       pItem->DoVerb(OLEIVERB_SHOW, this);
00577   }
00578   CATCH_ALL(e)
00579   {
00580     // clean up item
00581     pItem->Delete();
00582     pObj->m_pClientItem = NULL;
00583     GetDocument()->Remove(pObj);
00584     pObj->Remove();
00585
00586     AfxMessageBox(IDP_FAILED_TO_CREATE);
00587   }
00588   END_CATCH_ALL
00589
00590     EndWaitCursor();
00591 }
00592
00593 // The following command handler provides the standard keyboard
00594 //  user interface to cancel an in-place editing session.
00595 void CDrawView::OnCancelEdit()
00596 {
00597   // deactivate any in-place active item on this view!
00598   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00599   if (pActiveItem != NULL)
00600   {
00601     // if we found one, deactivate it
00602     pActiveItem->Close();
00603   }
00604   ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00605
00606   // escape also brings us back into select mode
00607   ReleaseCapture();
00608
00609   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00610   if (pTool != NULL)
00611   {
00612     pTool->OnCancel();
00613   }
00614
00615   CDrawTool::c_drawShape = selection;
00616 }
00617
00618 void CDrawView::OnSetFocus(CWnd* pOldWnd)
00619 {
00620   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00621   if (pActiveItem != NULL && pActiveItem->GetItemState() == COleClientItem::activeUIState)
00622   {
00623     // need to set focus to this item if it is in the same view
00624     CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00625     if (pWnd != NULL)
00626     {
00627       pWnd->SetFocus();
00628       return;
00629     }
00630   }
00631
00632   CScrollView::OnSetFocus(pOldWnd);
00633 }
00634
00635 CRect CDrawView::GetInitialPosition()
00636 {
00637   CRect rect(10, 10, 10, 10);
00638   ClientToDoc(rect);
00639   return rect;
00640 }
00641
00642 void CDrawView::ClientToDoc(CPoint& point)
00643 {
00644   CClientDC dc(this);
00645   OnPrepareDC(&dc, NULL);
00646   dc.DPtoLP(&point);
00647 }
00648
00649 void CDrawView::ClientToDoc(CRect& rect)
00650 {
00651   CClientDC dc(this);
00652   OnPrepareDC(&dc, NULL);
00653   dc.DPtoLP(rect);
00654   ASSERT(rect.left <= rect.right);
00655   ASSERT(rect.bottom <= rect.top);
00656 }
00657
00658 void CDrawView::DocToClient(CPoint& point)
00659 {
00660   CClientDC dc(this);
00661   OnPrepareDC(&dc, NULL);
00662   dc.LPtoDP(&point);
00663 }
00664
00665 void CDrawView::DocToClient(CRect& rect)
00666 {
00667   CClientDC dc(this);
00668   OnPrepareDC(&dc, NULL);
00669   dc.LPtoDP(rect);
00670   rect.NormalizeRect();
00671 }
00672
00673 void CDrawView::Select(CDrawObj* pObj, BOOL bAdd)
00674 {
00675   CDrawDoc* pDoc = GetDocument();
00676   if (pDoc->IsSearchAndOrganizeHandler())
00677   {
00678     return;
00679   }
00680
00681   if (!bAdd)
00682   {
00683     OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
00684     m_selection.RemoveAll();
00685     ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00686   }
00687
00688   if (pObj == NULL || IsSelected(pObj))
00689   {
00690     ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
00691     return;
00692   }
00693
00694   m_selection.AddTail(pObj);
00695   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00696   InvalObj(pObj);
00697
00698   ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
00699 }
00700
00701 // rect is in device coordinates
00702 void CDrawView::SelectWithinRect(CRect rect, BOOL bAdd)
00703 {
00704   if (!bAdd)
00705     Select(NULL);
00706
00707   ClientToDoc(rect);
00708
00709   CDrawObjList* pObList = GetDocument()->GetObjects();
00710   POSITION posObj = pObList->GetHeadPosition();
00711   while (posObj != NULL)
00712   {
00713     CDrawObj* pObj = pObList->GetNext(posObj);
00714     if (pObj->Intersects(rect))
00715       Select(pObj, TRUE);
00716   }
00717 }
00718
00719 void CDrawView::Deselect(CDrawObj* pObj)
00720 {
00721   POSITION pos = m_selection.Find(pObj);
00722   if (pos != NULL)
00723   {
00724     InvalObj(pObj);
00725     m_selection.RemoveAt(pos);
00726     ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00727     ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
00728   }
00729 }
00730
00731 void CDrawView::CloneSelection()
00732 {
00733   POSITION pos = m_selection.GetHeadPosition();
00734   while (pos != NULL)
00735   {
00736     CDrawObj* pObj = m_selection.GetNext(pos);
00737     pObj->Clone(pObj->m_pDocument);
00738     // copies object and adds it to the document
00739   }
00740 }
00741
00742 void CDrawView::UpdateActiveItem()
00743 {
00744   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00745   if (pActiveItem != NULL && pActiveItem->GetItemState() == COleClientItem::activeUIState)
00746   {
00747     // this will update the item rectangles by calling
00748     //  OnGetPosRect & OnGetClipRect.
00749     pActiveItem->SetItemRects();
00750   }
00751 }
00752
00753 /////////////////////////////////////////////////////////////////////////////
00754 // CDrawView message handlers
00755
00756 void CDrawView::OnLButtonDown(UINT nFlags, CPoint point)
00757 {
00758   if (!m_bActive)
00759     return;
00760   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00761   if (pTool != NULL)
00762   {
00763     pTool->OnLButtonDown(this, nFlags, point);
00764   }
00765 }
00766
00767 void CDrawView::OnLButtonUp(UINT nFlags, CPoint point)
00768 {
00769   if (!m_bActive)
00770     return;
00771   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00772   if (pTool != NULL)
00773     pTool->OnLButtonUp(this, nFlags, point);
00774 }
00775
00776 void CDrawView::OnMouseMove(UINT nFlags, CPoint point)
00777 {
00778   if (!m_bActive)
00779     return;
00780   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00781   if (pTool != NULL)
00782     pTool->OnMouseMove(this, nFlags, point);
00783 }
00784
00785 void CDrawView::OnLButtonDblClk(UINT nFlags, CPoint point)
00786 {
00787   if (!m_bActive)
00788     return;
00789   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00790   if (pTool != NULL)
00791     pTool->OnLButtonDblClk(this, nFlags, point);
00792 }
00793
00794 void CDrawView::OnDestroy()
00795 {
00796   CScrollView::OnDestroy();
00797
00798   // deactivate the inplace active item on this view
00799   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00800   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
00801   {
00802     pActiveItem->Deactivate();
00803     ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00804   }
00805 }
00806
00807 void CDrawView::OnDrawSelect()
00808 {
00809   CDrawTool::c_drawShape = selection;
00810 }
00811
00812 void CDrawView::OnDrawRoundRect()
00813 {
00814   CDrawTool::c_drawShape = roundRect;
00815 }
00816
00817 void CDrawView::OnDrawRect()
00818 {
00819   CDrawTool::c_drawShape = rect;
00820 }
00821
00822 void CDrawView::OnDrawLine()
00823 {
00824   CDrawTool::c_drawShape = line;
00825 }
00826
00827 void CDrawView::OnDrawEllipse()
00828 {
00829   CDrawTool::c_drawShape = ellipse;
00830 }
00831
00832 void CDrawView::OnDrawPolygon()
00833 {
00834   CDrawTool::c_drawShape = poly;
00835 }
00836
00837 void CDrawView::OnUpdateDrawEllipse(CCmdUI* pCmdUI)
00838 {
00839   pCmdUI->SetRadio(CDrawTool::c_drawShape == ellipse);
00840 }
00841
00842 void CDrawView::OnUpdateDrawLine(CCmdUI* pCmdUI)
00843 {
00844   pCmdUI->SetRadio(CDrawTool::c_drawShape == line);
00845 }
00846
00847 void CDrawView::OnUpdateDrawRect(CCmdUI* pCmdUI)
00848 {
00849   pCmdUI->SetRadio(CDrawTool::c_drawShape == rect);
00850 }
00851
00852 void CDrawView::OnUpdateDrawRoundRect(CCmdUI* pCmdUI)
00853 {
00854   pCmdUI->SetRadio(CDrawTool::c_drawShape == roundRect);
00855 }
00856
00857 void CDrawView::OnUpdateDrawSelect(CCmdUI* pCmdUI)
00858 {
00859   pCmdUI->SetRadio(CDrawTool::c_drawShape == selection);
00860 }
00861
00862 void CDrawView::OnUpdateSingleSelect(CCmdUI* pCmdUI)
00863 {
00864   pCmdUI->Enable(m_selection.GetCount() == 1);
00865 }
00866
00867 void CDrawView::OnEditSelectAll()
00868 {
00869   CDrawObjList* pObList = GetDocument()->GetObjects();
00870   POSITION pos = pObList->GetHeadPosition();
00871   while (pos != NULL)
00872     Select(pObList->GetNext(pos), TRUE);
00873 }
00874
00875 void CDrawView::OnUpdateEditSelectAll(CCmdUI* pCmdUI)
00876 {
00877   pCmdUI->Enable(GetDocument()->GetObjects()->GetCount() != 0);
00878 }
00879
00880 void CDrawView::OnEditClear()
00881 {
00882   // update all the views before the selection goes away
00883   GetDocument()->UpdateAllViews(NULL, HINT_DELETE_SELECTION, &m_selection);
00884   OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
00885
00886   // now remove the selection from the document
00887   POSITION pos = m_selection.GetHeadPosition();
00888   while (pos != NULL)
00889   {
00890     CDrawObj* pObj = m_selection.GetNext(pos);
00891     GetDocument()->Remove(pObj);
00892     pObj->Remove();
00893   }
00894   //Cleanup Tool members such as CPolyTool::m_pDrawObj, that should be NULL at this point.
00895   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00896   if (pTool != NULL)
00897   {
00898     pTool->OnCancel();
00899   }
00900   m_selection.RemoveAll();
00901   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00902   ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
00903 }
00904
00905 void CDrawView::OnUpdateAnySelect(CCmdUI* pCmdUI)
00906 {
00907   pCmdUI->Enable(!m_selection.IsEmpty());
00908 }
00909
00910 void CDrawView::OnUpdateDrawPolygon(CCmdUI* pCmdUI)
00911 {
00912   pCmdUI->SetRadio(CDrawTool::c_drawShape == poly);
00913 }
00914
00915 void CDrawView::OnSize(UINT nType, int cx, int cy)
00916 {
00917   CScrollView::OnSize(nType, cx, cy);
00918   UpdateActiveItem();
00919 }
00920
00921 void CDrawView::OnViewGrid()
00922 {
00923   m_bGrid = !m_bGrid;
00924   Invalidate(FALSE);
00925 }
00926
00927 void CDrawView::OnUpdateViewGrid(CCmdUI* pCmdUI)
00928 {
00929   pCmdUI->SetCheck(m_bGrid);
00930
00931 }
00932
00933 BOOL CDrawView::OnEraseBkgnd(CDC*)
00934 {
00935   return TRUE;
00936 }
00937
00938 void CDrawView::OnUpdateSelection(CCmdUI* pCmdUI)
00939 {
00940   pCmdUI->Enable(!m_selection.IsEmpty());
00941 }
00942
00943 void CDrawView::OnObjectFillColor()
00944 {
00945   COLORREF color = ((CMainFrame*)AfxGetMainWnd())->GetColorFromColorButton(ID_OBJECT_FILLCOLOR);
00946
00947   if (color == (COLORREF) -1)
00948   {
00949     return;
00950   }
00951
00952   POSITION pos = m_selection.GetHeadPosition();
00953   while (pos != NULL)
00954   {
00955     CDrawObj* pObj = m_selection.GetNext(pos);
00956     if (pObj->CanChangeFillColor())
00957     {
00958       pObj->EnableFill(TRUE);
00959       pObj->SetFillColor(color);
00960     }
00961   }
00962
00963   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
00964
00965   Invalidate();
00966
00967   ResetPreviewState();
00968 }
00969
00970 void CDrawView::PreviewFillColor(COLORREF color)
00971 {
00972   POSITION pos = m_selection.GetHeadPosition();
00973   while (pos != NULL)
00974   {
00975     CDrawObj* pObj = m_selection.GetNext(pos);
00976
00977     if (pObj->CanChangeFillColor())
00978     {
00979       pObj->EnableFill(TRUE);
00980       pObj->SetFillColor(color, TRUE /* Preview */);
00981     }
00982   }
00983 }
00984
00985 void CDrawView::OnUpdateObjectFillColor(CCmdUI* pCmdUI)
00986 {
00987   if (m_selection.GetCount() == 1)
00988   {
00989     pCmdUI->Enable(m_selection.GetHead()->CanChangeFillColor());
00990   }
00991   else
00992   {
00993     OnUpdateSelection(pCmdUI);
00994   }
00995 }
00996
00997 void CDrawView::OnObjectNoFill()
00998 {
00999   POSITION pos = m_selection.GetHeadPosition();
01000   while (pos != NULL)
01001   {
01002     CDrawObj* pObj = m_selection.GetNext(pos);
01003     if (pObj->CanChangeFillColor())
01004     {
01005       pObj->EnableFill(FALSE);
01006     }
01007   }
01008
01009   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
01010
01011   Invalidate();
01012 }
01013
01014 void CDrawView::OnUpdateObjectNoFill(CCmdUI* pCmdUI)
01015 {
01016   if (m_selection.GetCount() == 1)
01017   {
01018     pCmdUI->Enable(m_selection.GetHead()->CanChangeFillColor());
01019     pCmdUI->SetCheck(!m_selection.GetHead()->IsEnableFill());
01020   }
01021   else
01022   {
01023     OnUpdateSelection(pCmdUI);
01024   }
01025 }
01026
01027 void CDrawView::OnObjectLineColor()
01028 {
01029   COLORREF color = ((CMainFrame*)AfxGetMainWnd())->GetColorFromColorButton(ID_OBJECT_LINECOLOR);
01030
01031   if (color == (COLORREF) -1)
01032   {
01033     return;
01034   }
01035
01036   POSITION pos = m_selection.GetHeadPosition();
01037   while (pos != NULL)
01038   {
01039     CDrawObj* pObj = m_selection.GetNext(pos);
01040     if (pObj->CanChangeLineColor())
01041     {
01042       pObj->EnableLine(TRUE);
01043       pObj->SetLineColor(color);
01044     }
01045   }
01046
01047   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
01048
01049   Invalidate();
01050
01051   ResetPreviewState();
01052 }
01053
01054 void CDrawView::PreviewLineColor(COLORREF color)
01055 {
01056   POSITION pos = m_selection.GetHeadPosition();
01057   while (pos != NULL)
01058   {
01059     CDrawObj* pObj = m_selection.GetNext(pos);
01060     if (pObj->CanChangeLineColor())
01061     {
01062       pObj->EnableLine(TRUE);
01063       pObj->SetLineColor(color, TRUE /* Preview */);
01064     }
01065   }
01066 }
01067
01068 void CDrawView::OnUpdateObjectLineColor(CCmdUI* pCmdUI)
01069 {
01070   if (m_selection.GetCount() == 1)
01071   {
01072     pCmdUI->Enable(m_selection.GetHead()->CanChangeLineColor());
01073   }
01074   else
01075   {
01076     OnUpdateSelection(pCmdUI);
01077   }
01078 }
01079
01080 void CDrawView::OnObjectNoLine()
01081 {
01082   POSITION pos = m_selection.GetHeadPosition();
01083   while (pos != NULL)
01084   {
01085     CDrawObj* pObj = m_selection.GetNext(pos);
01086     if (pObj->CanChangeLineColor())
01087     {
01088       pObj->EnableLine(FALSE);
01089     }
01090   }
01091
01092   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
01093
01094   Invalidate();
01095
01096   ResetPreviewState();
01097 }
01098
01099 void CDrawView::OnUpdateObjectNoLine(CCmdUI* pCmdUI)
01100 {
01101   if (m_selection.GetCount() == 1)
01102   {
01103     pCmdUI->Enable(m_selection.GetHead()->CanChangeLineColor());
01104     pCmdUI->SetCheck(!m_selection.GetHead()->IsEnableLine());
01105   }
01106   else
01107   {
01108     OnUpdateSelection(pCmdUI);
01109   }
01110 }
01111
01112 void CDrawView::OnObjectLineWeight(UINT nID)
01113 {
01114   int weight = -1;
01115   if (nID == ID_OBJECT_LINEWEIGHT)
01116   {
01117     weight = ((CMainFrame*)AfxGetMainWnd())->GetWeightFromLineWeight(ID_OBJECT_LINEWEIGHT);
01118   }
01119   else if (nID == ID_OBJECT_LINEWEIGHT_MORE)
01120   {
01121     CLineWeightDlg dlg(AfxGetMainWnd());
01122
01123     if (m_selection.GetCount() == 1)
01124     {
01125       dlg.m_penSize = m_selection.GetHead()->IsEnableLine() ? m_selection.GetHead()->GetLineWeight() : 0;
01126     }
01127
01128     if (dlg.DoModal() == IDOK)
01129     {
01130       weight = dlg.m_penSize;
01131     }
01132   }
01133
01134   if (weight == -1)
01135   {
01136     return;
01137   }
01138
01139   POSITION pos = m_selection.GetHeadPosition();
01140   while (pos != NULL)
01141   {
01142     CDrawObj* pObj = m_selection.GetNext(pos);
01143     if (pObj->CanChangeLineWeight())
01144     {
01145       pObj->EnableLine(weight > 0);
01146       pObj->SetLineWeight(weight);
01147     }
01148   }
01149
01150   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
01151
01152   Invalidate();
01153
01154   ResetPreviewState();
01155 }
01156
01157 void CDrawView::PreviewLineWeight(int weight)
01158 {
01159   POSITION pos = m_selection.GetHeadPosition();
01160   while (pos != NULL)
01161   {
01162     CDrawObj* pObj = m_selection.GetNext(pos);
01163     if (pObj->CanChangeLineWeight())
01164     {
01165       pObj->EnableLine(weight > 0);
01166       pObj->SetLineWeight(weight);
01167     }
01168   }
01169 }
01170
01171 void CDrawView::OnUpdateObjectLineWeight(CCmdUI* pCmdUI)
01172 {
01173   if (m_selection.GetCount() == 1)
01174   {
01175     pCmdUI->Enable(m_selection.GetHead()->CanChangeLineWeight());
01176   }
01177   else
01178   {
01179     OnUpdateSelection(pCmdUI);
01180   }
01181 }
01182
01183 void CDrawView::OnObjectProperties()
01184 {
01185   CDrawObj* pObj = m_selection.GetHead();
01186   if (pObj != NULL)
01187   {
01188     pObj->OnEditProperties();
01189   }
01190 }
01191
01192 void CDrawView::OnUpdateObjectProperties(CCmdUI* pCmdUI)
01193 {
01194   BOOL bEnable = m_selection.GetCount() == 1;
01195   if (bEnable)
01196   {
01197     bEnable = DYNAMIC_DOWNCAST(CDrawOleObj, m_selection.GetHead()) == NULL;
01198   }
01199
01200   pCmdUI->Enable(bEnable);
01201 }
01202
01203 void CDrawView::OnObjectStyles()
01204 {
01205   CMainFrame::XStyle style;
01206
01207   if (!((CMainFrame*)AfxGetMainWnd())->GetStyleFromStyles(style))
01208   {
01209     return;
01210   }
01211
01212   POSITION pos = m_selection.GetHeadPosition();
01213   while (pos != NULL)
01214   {
01215     CDrawObj* pObj = m_selection.GetNext(pos);
01216
01217     if (pObj->CanChangeFillColor())
01218     {
01219       pObj->EnableFill(style.clrFill != (COLORREF)-1);
01220       if (style.clrFill != (COLORREF)-1)
01221       {
01222         pObj->SetFillColor(style.clrFill, TRUE);
01223       }
01224     }
01225     if (pObj->CanChangeLineColor())
01226     {
01227       pObj->EnableLine(style.clrLine != (COLORREF)-1);
01228       if (style.clrLine != (COLORREF)-1)
01229       {
01230         pObj->SetLineColor(style.clrLine, TRUE);
01231       }
01232     }
01233   }
01234
01235   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
01236
01237   Invalidate();
01238
01239   ResetPreviewState();
01240 }
01241
01242 void CDrawView::PreviewStyle(COLORREF clrFill, COLORREF clrLine)
01243 {
01244   POSITION pos = m_selection.GetHeadPosition();
01245   while (pos != NULL)
01246   {
01247     CDrawObj* pObj = m_selection.GetNext(pos);
01248
01249     if (pObj->CanChangeFillColor())
01250     {
01251       pObj->EnableFill(clrFill != (COLORREF)-1);
01252       if (clrFill != (COLORREF)-1)
01253       {
01254         pObj->SetFillColor(clrFill);
01255       }
01256     }
01257     if (pObj->CanChangeLineColor())
01258     {
01259       pObj->EnableLine(clrLine != (COLORREF)-1);
01260       if (clrLine != (COLORREF)-1)
01261       {
01262         pObj->SetLineColor(clrLine);
01263       }
01264     }
01265   }
01266 }
01267
01268 void CDrawView::OnUpdateObjectStyles(CCmdUI* pCmdUI)
01269 {
01270   if (m_selection.GetCount() == 1)
01271   {
01272     pCmdUI->Enable(m_selection.GetHead()->CanChangeFillColor());
01273   }
01274   else
01275   {
01276     OnUpdateSelection(pCmdUI);
01277   }
01278 }
01279
01280 void CDrawView::OnObjectMoveBack()
01281 {
01282   CDrawDoc* pDoc = GetDocument();
01283   CDrawObj* pObj = m_selection.GetHead();
01284   CDrawObjList* pObjects = pDoc->GetObjects();
01285   POSITION pos = pObjects->Find(pObj);
01286   ASSERT(pos != NULL);
01287   if (pos != pObjects->GetHeadPosition())
01288   {
01289     POSITION posPrev = pos;
01290     pObjects->GetPrev(posPrev);
01291     pObjects->RemoveAt(pos);
01292     pObjects->InsertBefore(posPrev, pObj);
01293     InvalObj(pObj);
01294   }
01295 }
01296
01297 void CDrawView::OnObjectMoveForward()
01298 {
01299   CDrawDoc* pDoc = GetDocument();
01300   CDrawObj* pObj = m_selection.GetHead();
01301   CDrawObjList* pObjects = pDoc->GetObjects();
01302   POSITION pos = pObjects->Find(pObj);
01303   ASSERT(pos != NULL);
01304   if (pos != pObjects->GetTailPosition())
01305   {
01306     POSITION posNext = pos;
01307     pObjects->GetNext(posNext);
01308     pObjects->RemoveAt(pos);
01309     pObjects->InsertAfter(posNext, pObj);
01310     InvalObj(pObj);
01311   }
01312 }
01313
01314 void CDrawView::OnObjectMoveToBack()
01315 {
01316   CDrawDoc* pDoc = GetDocument();
01317   CDrawObj* pObj = m_selection.GetHead();
01318   CDrawObjList* pObjects = pDoc->GetObjects();
01319   POSITION pos = pObjects->Find(pObj);
01320   ASSERT(pos != NULL);
01321   pObjects->RemoveAt(pos);
01322   pObjects->AddHead(pObj);
01323   InvalObj(pObj);
01324 }
01325
01326 void CDrawView::OnObjectMoveToFront()
01327 {
01328   CDrawDoc* pDoc = GetDocument();
01329   CDrawObj* pObj = m_selection.GetHead();
01330   CDrawObjList* pObjects = pDoc->GetObjects();
01331   POSITION pos = pObjects->Find(pObj);
01332   ASSERT(pos != NULL);
01333   pObjects->RemoveAt(pos);
01334   pObjects->AddTail(pObj);
01335   InvalObj(pObj);
01336 }
01337
01338 void CDrawView::OnEditCopy()
01339 {
01340   ASSERT_VALID(this);
01341   ASSERT(m_cfDraw != NULL);
01342
01343   // Create a shared file and associate a CArchive with it
01344   CSharedFile file;
01345   CArchive ar(&file, CArchive::store);
01346
01347   // Serialize selected objects to the archive
01348   m_selection.Serialize(ar);
01349   ar.Close();
01350
01351   COleDataSource* pDataSource = NULL;
01352   TRY
01353   {
01354     pDataSource = new COleDataSource;
01355     // put on local format instead of or in addation to
01356     pDataSource->CacheGlobalData(m_cfDraw, file.Detach());
01357
01358     // if only one item and it is a COleClientItem then also
01359     // paste in that format
01360     CDrawObj* pDrawObj = m_selection.GetHead();
01361     if (m_selection.GetCount() == 1 && pDrawObj->IsKindOf(RUNTIME_CLASS(CDrawOleObj)))
01362     {
01363       CDrawOleObj* pDrawOle = (CDrawOleObj*)pDrawObj;
01364       pDrawOle->m_pClientItem->GetClipboardData(pDataSource, FALSE);
01365     }
01366
01367     pDataSource->SetClipboard();
01368   }
01369   CATCH_ALL(e)
01370   {
01371     delete pDataSource;
01372     THROW_LAST();
01373   }
01374   END_CATCH_ALL
01375 }
01376
01377 void CDrawView::OnUpdateEditCopy(CCmdUI* pCmdUI)
01378 {
01379   pCmdUI->Enable(!m_selection.IsEmpty());
01380 }
01381
01382 void CDrawView::OnEditCut()
01383 {
01384   OnEditCopy();
01385   OnEditClear();
01386 }
01387
01388 void CDrawView::OnUpdateEditCut(CCmdUI* pCmdUI)
01389 {
01390   pCmdUI->Enable(!m_selection.IsEmpty());
01391 }
01392
01393 void CDrawView::OnEditPaste()
01394 {
01395   COleDataObject dataObject;
01396   dataObject.AttachClipboard();
01397
01398   // invalidate current selection since it will be deselected
01399   OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
01400   m_selection.RemoveAll();
01401   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
01402
01403   if (dataObject.IsDataAvailable(m_cfDraw))
01404   {
01405     PasteNative(dataObject);
01406
01407     // now add all items in m_selection to document
01408     POSITION pos = m_selection.GetHeadPosition();
01409     while (pos != NULL)
01410       GetDocument()->Add(m_selection.GetNext(pos));
01411   }
01412   else
01413     PasteEmbedded(dataObject, GetInitialPosition().TopLeft() );
01414
01415   GetDocument()->SetModifiedFlag();
01416
01417   // invalidate new pasted stuff
01418   GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_SELECTION, &m_selection);
01419
01420   ((CMainFrame*)AfxGetMainWnd())->UpdateContextTab(this);
01421 }
01422
01423 void CDrawView::OnUpdateEditPaste(CCmdUI* pCmdUI)
01424 {
01425   // determine if private or standard OLE formats are on the clipboard
01426   COleDataObject dataObject;
01427   BOOL bEnable = dataObject.AttachClipboard() &&
01428     (dataObject.IsDataAvailable(m_cfDraw) || COleClientItem::CanCreateFromData(&dataObject));
01429
01430   // enable command based on availability
01431   pCmdUI->Enable(bEnable);
01432 }
01433
01434 void CDrawView::OnFilePrint()
01435 {
01436   CScrollView::OnFilePrint();
01437   GetDocument()->ComputePageSize();
01438 }
01439
01440 void CDrawView::OnViewShowObjects()
01441 {
01442   CDrawOleObj::c_bShowItems = !CDrawOleObj::c_bShowItems;
01443   GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_OLE_ITEMS, NULL);
01444 }
01445
01446 void CDrawView::OnUpdateViewShowObjects(CCmdUI* pCmdUI)
01447 {
01448   pCmdUI->SetCheck(CDrawOleObj::c_bShowItems);
01449 }
01450
01451 /////////////////////////////////////////////////////////////////////////////
01452 // CDrawView diagnostics
01453
01454 #ifdef _DEBUG
01455 void CDrawView::AssertValid() const
01456 {
01457   CScrollView::AssertValid();
01458 }
01459
01460 void CDrawView::Dump(CDumpContext& dc) const
01461 {
01462   CScrollView::Dump(dc);
01463 }
01464 #endif //_DEBUG
01465
01466 /////////////////////////////////////////////////////////////////////////////
01467 // new
01468 // support for drag/drop
01469
01470 int CDrawView::OnCreate(LPCREATESTRUCT lpCreateStruct)
01471 {
01472   if (CScrollView::OnCreate(lpCreateStruct) == -1)
01473     return -1;
01474
01475   // register drop target
01476   if ( m_dropTarget.Register( this ) )
01477     return 0;
01478   else
01479     return -1;
01480 }
01481
01482 BOOL CDrawView::GetObjectInfo(COleDataObject* pDataObject, CSize* pSize, CSize* pOffset)
01483 {
01484   ENSURE(pSize != NULL);
01485
01486   // get object descriptor data
01487   HGLOBAL hObjDesc = pDataObject->GetGlobalData(m_cfObjectDescriptor);
01488   if (hObjDesc == NULL)
01489   {
01490     if (pOffset != NULL)
01491       *pOffset = CSize(0, 0); // fill in defaults instead
01492     *pSize = CSize(0, 0);
01493     return FALSE;
01494   }
01495   ASSERT(hObjDesc != NULL);
01496
01497   // otherwise, got CF_OBJECTDESCRIPTOR ok.  Lock it down and extract size.
01498   LPOBJECTDESCRIPTOR pObjDesc = (LPOBJECTDESCRIPTOR)GlobalLock(hObjDesc);
01499   ENSURE(pObjDesc != NULL);
01500   pSize->cx = (int)pObjDesc->sizel.cx;
01501   pSize->cy = (int)pObjDesc->sizel.cy;
01502   if (pOffset != NULL)
01503   {
01504     pOffset->cx = (int)pObjDesc->pointl.x;
01505     pOffset->cy = (int)pObjDesc->pointl.y;
01506   }
01507   GlobalUnlock(hObjDesc);
01508   GlobalFree(hObjDesc);
01509
01510   // successfully retrieved pSize & pOffset info
01511   return TRUE;
01512 }
01513
01514 DROPEFFECT CDrawView::OnDragEnter(COleDataObject* pDataObject, DWORD grfKeyState, CPoint point)
01515 {
01516   ASSERT(m_prevDropEffect == DROPEFFECT_NONE);
01517   m_bDragDataAcceptable = FALSE;
01518   if (!COleClientItem::CanCreateFromData(pDataObject))
01519     return DROPEFFECT_NONE;
01520
01521   m_bDragDataAcceptable = TRUE;
01522   GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
01523   CClientDC dc(NULL);
01524   dc.HIMETRICtoDP(&m_dragSize);
01525   dc.HIMETRICtoDP(&m_dragOffset);
01526
01527   return OnDragOver(pDataObject, grfKeyState, point);
01528 }
01529
01530 DROPEFFECT CDrawView::OnDragOver(COleDataObject*, DWORD grfKeyState, CPoint point)
01531 {
01532   if (m_bDragDataAcceptable == FALSE)
01533     return DROPEFFECT_NONE;
01534
01535   point -= m_dragOffset;  // adjust target rect by original cursor offset
01536
01537   // check for point outside logical area -- i.e. in hatched region
01538   // GetTotalSize() returns the size passed to SetScrollSizes
01539   CRect rectScroll(CPoint(0, 0), GetTotalSize());
01540
01541   CRect rectItem(point,m_dragSize);
01542   rectItem.OffsetRect(GetDeviceScrollPosition());
01543
01544   DROPEFFECT de = DROPEFFECT_NONE;
01545   CRect rectTemp;
01546   if (rectTemp.IntersectRect(rectScroll, rectItem))
01547   {
01548     // check for force link
01549     if ((grfKeyState &(MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
01550       de = DROPEFFECT_NONE; // DRAWCLI isn't a linking container
01551     // check for force copy
01552     else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
01553       de = DROPEFFECT_COPY;
01554     // check for force move
01555     else if ((grfKeyState & MK_ALT) == MK_ALT)
01556       de = DROPEFFECT_MOVE;
01557     // default -- recommended action is move
01558     else
01559       de = DROPEFFECT_MOVE;
01560   }
01561
01562   if (point == m_dragPoint)
01563     return de;
01564
01565   // otherwise, cursor has moved -- need to update the drag feedback
01566   CClientDC dc(this);
01567   if (m_prevDropEffect != DROPEFFECT_NONE)
01568   {
01569     // erase previous focus rect
01570     dc.DrawFocusRect(CRect(m_dragPoint, m_dragSize));
01571   }
01572   m_prevDropEffect = de;
01573   if (m_prevDropEffect != DROPEFFECT_NONE)
01574   {
01575     m_dragPoint = point;
01576     dc.DrawFocusRect(CRect(point, m_dragSize));
01577   }
01578   return de;
01579 }
01580
01581 BOOL CDrawView::OnDrop(COleDataObject* pDataObject, DROPEFFECT /*dropEffect*/, CPoint point)
01582 {
01583   ASSERT_VALID(this);
01584
01585   // clean up focus rect
01586   OnDragLeave();
01587
01588   // offset point as appropriate for dragging
01589   GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
01590   CClientDC dc(NULL);
01591   dc.HIMETRICtoDP(&m_dragSize);
01592   dc.HIMETRICtoDP(&m_dragOffset);
01593   point -= m_dragOffset;
01594
01595   // invalidate current selection since it will be deselected
01596   OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
01597   m_selection.RemoveAll();
01598   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(this);
01599
01600   if (m_bDragDataAcceptable)
01601     PasteEmbedded(*pDataObject, point);
01602
01603   // update the document and views
01604   GetDocument()->SetModifiedFlag();
01605   GetDocument()->UpdateAllViews(NULL, 0, NULL);      // including this view
01606
01607   return TRUE;
01608 }
01609
01610 void CDrawView::OnDragLeave()
01611 {
01612   CClientDC dc(this);
01613   if (m_prevDropEffect != DROPEFFECT_NONE)
01614   {
01615     dc.DrawFocusRect(CRect(m_dragPoint,m_dragSize)); // erase previous focus rect
01616     m_prevDropEffect = DROPEFFECT_NONE;
01617   }
01618 }
01619
01620 void CDrawView::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
01621 {
01622   if (GetDocument()->IsSearchAndOrganizeHandler())
01623   {
01624     return;
01625   }
01626
01627   // make sure window is active
01628   GetParentFrame()->ActivateFrame();
01629
01630   CPoint local = point;
01631   ScreenToClient(&local);
01632   ClientToDoc(local);
01633
01634   CDrawObj* pObj;
01635   pObj = GetDocument()->ObjectAt(local);
01636   if (pObj != NULL)
01637   {
01638     if (!IsSelected(pObj))
01639       Select( pObj, FALSE );          // reselect item if appropriate
01640     UpdateWindow();
01641
01642     CMenu menu;
01643     if (menu.LoadMenu(ID_POPUP_MENU))
01644     {
01645       CMenu* pPopup = menu.GetSubMenu(0);
01646       ENSURE(pPopup != NULL);
01647
01648       CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
01649       pPopupMenu->SetAutoDestroy(FALSE);
01650       pPopupMenu->Create(this, point.x, point.y, pPopup->GetSafeHmenu());
01651     }
01652   }
01653 }
01654
01655 void CDrawView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
01656 {
01657   if (pInfo->m_bPreview == FALSE)
01658     ((CDrawDoc*)GetDocument())->m_pSummInfo->RecordPrintDate();
01659   OnDraw(pDC);
01660 }
01661
01662 void CDrawView::OnFilePrintPreview()
01663 {
01664   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
01665   if (pActiveItem != NULL && pActiveItem->GetItemState() == COleClientItem::activeUIState)
01666   {
01667     pActiveItem->Deactivate();
01668   }
01669
01670   AFXPrintPreview(this);
01671 }
01672
01673 class CDrawObjFriend: public CDrawObj
01674 {
01675   friend struct CDrawView::XPreviewStateItem;
01676 };
01677
01678 void CDrawView::XPreviewStateItem::Store(const CDrawObj& rObj)
01679 {
01680   const CDrawObjFriend* pMyObj = (CDrawObjFriend*)(&rObj);
01681
01682   m_bPen   = pMyObj->m_bPen;
01683   memcpy(&m_logpen, &pMyObj->m_logpen, sizeof(LOGPEN));
01684   m_bBrush = pMyObj->m_bBrush;
01685   memcpy(&m_logbrush, &pMyObj->m_logbrush, sizeof(LOGBRUSH));
01686 }
01687
01688 void CDrawView::XPreviewStateItem::Restore(CDrawObj& rObj) const
01689 {
01690   CDrawObjFriend* pMyObj = (CDrawObjFriend*)(&rObj);
01691
01692   pMyObj->m_bPen   = m_bPen;
01693   memcpy(&pMyObj->m_logpen, &m_logpen, sizeof(LOGPEN));
01694   pMyObj->m_bBrush = m_bBrush;
01695   memcpy(&pMyObj->m_logbrush, &m_logbrush, sizeof(LOGBRUSH));
01696 }
01697
01698 void CDrawView::StorePreviewState()
01699 {
01700   if (m_PreviewState.GetSize() > 0)
01701   {
01702     return;
01703   }
01704
01705   POSITION pos = m_selection.GetHeadPosition();
01706   while (pos != NULL)
01707   {
01708     CDrawObj* pObj = m_selection.GetNext(pos);
01709     if (pObj != NULL)
01710     {
01711       m_PreviewState.Add(new XPreviewStateItem(*pObj));
01712     }
01713   }
01714 }
01715
01716 void CDrawView::RestorePreviewState(BOOL bReset)
01717 {
01718   if (m_PreviewState.GetSize() == 0)
01719   {
01720     return;
01721   }
01722
01723   int index = 0;
01724
01725   POSITION pos = m_selection.GetHeadPosition();
01726   while (pos != NULL)
01727   {
01728     CDrawObj* pObj = m_selection.GetNext(pos);
01729     if (pObj != NULL)
01730     {
01731       m_PreviewState[index]->Restore(*pObj);
01732     }
01733
01734     index++;
01735   }
01736
01737   if (bReset)
01738   {
01739     ResetPreviewState();
01740   }
01741
01742   Invalidate();
01743 }
01744
01745 void CDrawView::ResetPreviewState()
01746 {
01747   if (m_PreviewState.GetSize() == 0)
01748   {
01749     return;
01750   }
01751
01752   for (int i = 0; i < m_PreviewState.GetSize(); i++)
01753   {
01754     delete m_PreviewState[i];
01755   }
01756
01757   m_PreviewState.RemoveAll();
01758 }
01759
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoddlg.cpp Source File

  • ole
  • acdual
  • acdualdriv

autoddlg.cpp

Go to the documentation of this file.
00001 // autoddlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "..\autoclik_i.c"
00014
00015 #include "autodriv.h"
00016 #include "autoclik.h"
00017 #include "autoddlg.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CAutoDrivDlg dialog
00026
00027 CAutoDrivDlg::CAutoDrivDlg(CWnd* pParent /*=NULL*/)
00028   : CDialog(CAutoDrivDlg::IDD, pParent)
00029 {
00030   //{{AFX_DATA_INIT(CAutoDrivDlg)
00031   m_szText = _T("");
00032   m_x = 0;
00033   m_y = 0;
00034   m_bUseDispatch = TRUE;
00035   //}}AFX_DATA_INIT
00036   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00037   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00038
00039   m_pDualAutoClikObject = NULL;
00040 }
00041
00042
00043 void CAutoDrivDlg::DoDataExchange(CDataExchange* pDX)
00044 {
00045   CDialog::DoDataExchange(pDX);
00046   //{{AFX_DATA_MAP(CAutoDrivDlg)
00047   DDX_Text(pDX, IDC_EDITTEXT, m_szText);
00048   DDX_Text(pDX, IDC_EDITX, m_x);
00049   DDX_Text(pDX, IDC_EDITY, m_y);
00050   DDX_Check(pDX, IDC_USEDISPATCH, m_bUseDispatch);
00051   //}}AFX_DATA_MAP
00052 }
00053
00054 BEGIN_MESSAGE_MAP(CAutoDrivDlg, CDialog)
00055   //{{AFX_MSG_MAP(CAutoDrivDlg)
00056   ON_WM_PAINT()
00057   ON_WM_QUERYDRAGICON()
00058   ON_BN_CLICKED(IDC_CLOSE, OnClose)
00059   ON_WM_CREATE()
00060   ON_BN_CLICKED(IDC_ANIMATE_XY, OnAnimateXY)
00061   ON_BN_CLICKED(IDC_ANIMATEPOS, OnAnimatePos)
00062   ON_BN_CLICKED(IDC_SETALL, OnSetAll)
00063   ON_BN_CLICKED(IDC_SETPOS, OnSetPosition)
00064   ON_BN_CLICKED(IDC_SETTEXT, OnSetText)
00065   ON_BN_CLICKED(IDC_SETX, OnSetX)
00066   ON_BN_CLICKED(IDC_SETY, OnSetY)
00067   ON_BN_CLICKED(IDC_REFRESH, OnRefresh)
00068   ON_BN_CLICKED(IDC_GETALL, OnGetAll)
00069   ON_BN_CLICKED(IDC_GETPOS, OnGetPosition)
00070   ON_BN_CLICKED(IDC_USEDISPATCH, OnUseDispatch)
00071   //}}AFX_MSG_MAP
00072 END_MESSAGE_MAP()
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CAutoDrivDlg message handlers
00076
00077 BOOL CAutoDrivDlg::OnInitDialog()
00078 {
00079   if (!m_pDualAutoClikObject)
00080   {
00081     m_bUseDispatch = TRUE;
00082     GetDlgItem(IDC_USEDISPATCH)->EnableWindow(FALSE);
00083   }
00084
00085   CDialog::OnInitDialog();
00086   CenterWindow();
00087
00088   return TRUE;  // return TRUE  unless you set the focus to a control
00089 }
00090
00091 // If you add a minimize button to your dialog, you will need the code below
00092 //  to draw the icon.  For MFC applications using the document/view model,
00093 //  this is automatically done for you by the framework.
00094
00095 void CAutoDrivDlg::OnPaint()
00096 {
00097   if (IsIconic())
00098   {
00099     CPaintDC dc(this); // device context for painting
00100
00101     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00102
00103     // Center icon in client rectangle
00104     int cxIcon = GetSystemMetrics(SM_CXICON);
00105     int cyIcon = GetSystemMetrics(SM_CYICON);
00106     CRect rect;
00107     GetClientRect(&rect);
00108     int x = (rect.Width() - cxIcon + 1) / 2;
00109     int y = (rect.Height() - cyIcon + 1) / 2;
00110
00111     // Draw the icon
00112     dc.DrawIcon(x, y, m_hIcon);
00113   }
00114   else
00115   {
00116     CDialog::OnPaint();
00117   }
00118 }
00119
00120 // The system calls this to obtain the cursor to display while the user drags
00121 //  the minimized window.
00122 HCURSOR CAutoDrivDlg::OnQueryDragIcon()
00123 {
00124   return (HCURSOR) m_hIcon;
00125 }
00126
00127 int CAutoDrivDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
00128 {
00129   if (CDialog::OnCreate(lpCreateStruct) == -1)
00130     return -1;  // fail
00131
00132   if (!m_autoClikObject.CreateDispatch(_T("ACDual.Document")))
00133   {
00134     AfxMessageBox(IDP_CANNOT_CREATE_AUTOCLIK);
00135     return -1;  // fail
00136   }
00137
00138   // Get the custom interface corresponding to this dispatch object
00139   ASSERT(m_pDualAutoClikObject == NULL);
00140   m_autoClikObject.m_lpDispatch->QueryInterface(IID_IDualAClick,
00141                           (LPVOID*)&m_pDualAutoClikObject);
00142
00143   m_autoClikObject.ShowWindow();
00144
00145   return 0;   // success
00146 }
00147
00148 void CAutoDrivDlg::OnClose()
00149 {
00150   if (m_pDualAutoClikObject)
00151   {
00152     m_pDualAutoClikObject->Release();
00153     m_pDualAutoClikObject = NULL;
00154   }
00155   EndDialog(0);
00156 }
00157
00158 void CAutoDrivDlg::OnAnimateXY()
00159 {
00160   if (m_bUseDispatch)
00161   {
00162     for (short i = 10; i <= 100; i += 5)
00163     {
00164       m_autoClikObject.SetX(i);
00165       m_autoClikObject.SetY(i);
00166     }
00167   }
00168   else
00169   {
00170     ENSURE(m_pDualAutoClikObject != NULL);
00171     for (short i = 10; i <= 100; i += 5)
00172     {
00173       m_pDualAutoClikObject->put_x(i);
00174       m_pDualAutoClikObject->put_y(i);
00175     }
00176   }
00177 }
00178
00179 void CAutoDrivDlg::OnAnimatePos()
00180 {
00181   if (m_bUseDispatch)
00182   {
00183     CClikPoint point;
00184     LPDISPATCH lpPointDispatch = m_autoClikObject.GetPosition();
00185
00186     point.AttachDispatch(lpPointDispatch);
00187     for (short i = 10; i <= 100; i += 5)
00188     {
00189       point.SetX(i);
00190       point.SetY(i);
00191       m_autoClikObject.SetPosition(lpPointDispatch);
00192     }
00193   }
00194   else
00195   {
00196     ENSURE(m_pDualAutoClikObject != NULL);
00197     IDualAutoClickPoint* lpPoint = NULL;
00198     m_pDualAutoClikObject->get_Position(&lpPoint);
00199     if (lpPoint)
00200     {
00201       for (short i = 10; i <= 100; i += 5)
00202       {
00203         lpPoint->put_x(i);
00204         lpPoint->put_y(i);
00205         m_pDualAutoClikObject->put_Position(lpPoint);
00206       }
00207       lpPoint->Release();
00208     }
00209   }
00210 }
00211
00212 void CAutoDrivDlg::OnSetAll()
00213 {
00214   UpdateData(TRUE);
00215
00216   if (m_bUseDispatch)
00217   {
00218     m_autoClikObject.SetAllProps((short)m_x, (short)m_y, m_szText);
00219   }
00220   else
00221   {
00222     ASSERT(m_pDualAutoClikObject != NULL);
00223     m_pDualAutoClikObject->SetAllProps((short)m_x, (short)m_y,
00224                        m_szText.AllocSysString());
00225   }
00226
00227 }
00228
00229 void CAutoDrivDlg::OnSetPosition()
00230 {
00231   if (m_bUseDispatch)
00232   {
00233     CClikPoint point;
00234     point.AttachDispatch(m_autoClikObject.GetPosition());
00235
00236     UpdateData(TRUE);
00237     point.SetX((short)m_x);
00238     point.SetY((short)m_y);
00239     m_autoClikObject.SetPosition(point.m_lpDispatch);
00240   }
00241   else
00242   {
00243     ENSURE(m_pDualAutoClikObject != NULL);
00244     IDualAutoClickPoint* lpPoint = NULL;
00245     m_pDualAutoClikObject->get_Position(&lpPoint);
00246     if (lpPoint)
00247     {
00248       UpdateData(TRUE);
00249       lpPoint->put_x((short)m_x);
00250       lpPoint->put_y((short)m_y);
00251       m_pDualAutoClikObject->put_Position(lpPoint);
00252       lpPoint->Release();
00253     }
00254   }
00255 }
00256
00257 void CAutoDrivDlg::OnSetText()
00258 {
00259   UpdateData(TRUE);
00260
00261   if (m_bUseDispatch)
00262   {
00263     m_autoClikObject.SetText(m_szText);
00264   }
00265   else
00266   {
00267     ASSERT(m_pDualAutoClikObject != NULL);
00268     m_pDualAutoClikObject->put_text(m_szText.AllocSysString());
00269   }
00270 }
00271
00272 void CAutoDrivDlg::OnSetX()
00273 {
00274   UpdateData(TRUE);
00275
00276   if (m_bUseDispatch)
00277   {
00278     m_autoClikObject.SetX((short)m_x);
00279   }
00280   else
00281   {
00282     ASSERT(m_pDualAutoClikObject != NULL);
00283     m_pDualAutoClikObject->put_x((short)m_x);
00284   }
00285 }
00286
00287 void CAutoDrivDlg::OnSetY()
00288 {
00289   UpdateData(TRUE);
00290
00291   if (m_bUseDispatch)
00292   {
00293     m_autoClikObject.SetY((short)m_y);
00294   }
00295   else
00296   {
00297     ASSERT(m_pDualAutoClikObject != NULL);
00298     m_pDualAutoClikObject->put_y((short)m_y);
00299   }
00300 }
00301
00302 void CAutoDrivDlg::OnRefresh()
00303 {
00304   if (m_bUseDispatch)
00305   {
00306     m_autoClikObject.RefreshWindow();
00307   }
00308   else
00309   {
00310     ENSURE(m_pDualAutoClikObject != NULL);
00311     m_pDualAutoClikObject->RefreshWindow();
00312   }
00313 }
00314
00315 void CAutoDrivDlg::OnGetAll()
00316 {
00317   if (m_bUseDispatch)
00318   {
00319     m_x = m_autoClikObject.GetX();
00320     m_y = m_autoClikObject.GetY();
00321     m_szText = m_autoClikObject.GetText();
00322   }
00323   else
00324   {
00325     ENSURE(m_pDualAutoClikObject != NULL);
00326     short x, y;
00327     m_pDualAutoClikObject->get_x(&x); m_x = x;
00328     m_pDualAutoClikObject->get_y(&y); m_y = y;
00329
00330     BSTR bstrText;
00331     m_pDualAutoClikObject->get_text(&bstrText);
00332     m_szText = bstrText;
00333     ::SysFreeString(bstrText);
00334   }
00335
00336   UpdateData(FALSE);
00337 }
00338
00339 void CAutoDrivDlg::OnGetPosition()
00340 {
00341   if (m_bUseDispatch)
00342   {
00343     CClikPoint point;
00344     point.AttachDispatch(m_autoClikObject.GetPosition());
00345
00346     m_x = point.GetX();
00347     m_y = point.GetY();
00348   }
00349   else
00350   {
00351     ENSURE(m_pDualAutoClikObject != NULL);
00352     IDualAutoClickPoint* lpPoint = NULL;
00353     m_pDualAutoClikObject->get_Position(&lpPoint);
00354     if (lpPoint)
00355     {
00356       short x, y;
00357       lpPoint->get_x(&x); m_x = x;
00358       lpPoint->get_y(&y); m_y = y;
00359       lpPoint->Release();
00360     }
00361   }
00362   UpdateData(FALSE);
00363 }
00364
00365 void CAutoDrivDlg::OnUseDispatch()
00366 {
00367   UpdateData(TRUE);
00368 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CExcepInfo Member List

This is the complete list of members for CExcepInfo, including all inherited members.
CExcepInfo() | CExcepInfo
Clear() | CExcepInfo
~CExcepInfo() | CExcepInfo
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/doc.cpp Source File

  • ole
  • oleview

doc.cpp

Go to the documentation of this file.
00001 // doc.cpp : implementation of the COle2ViewDoc class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "OleView.h"
00015
00016 #include "doc.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // COle2ViewDoc
00025
00026 IMPLEMENT_DYNCREATE(COle2ViewDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(COle2ViewDoc, CDocument)
00029   //{{AFX_MSG_MAP(COle2ViewDoc)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // COle2ViewDoc construction/destruction
00037
00038 COle2ViewDoc::COle2ViewDoc()
00039 {
00040   m_clsidCur = GUID_NULL ;
00041   m_szObjectCur = "" ;
00042   m_fTypeLib = FALSE ;
00043
00044   CString szSection ;
00045   CString szKey ;
00046   #pragma warning(suppress: 6031)
00047   szSection.LoadString( IDS_INI_CONFIG ) ;
00048   ASSERT(szSection != "");
00049
00050   #pragma warning(suppress: 6031)
00051   szKey.LoadString( IDS_INI_CLSCTX ) ;
00052   ASSERT(szKey != "");
00053   m_dwClsCtx = (DWORD)theApp.GetProfileInt( szSection, szKey, CLSCTX_LOCAL_SERVER | CLSCTX_INPROC_SERVER ) ;
00054
00055 }
00056
00057 COle2ViewDoc::~COle2ViewDoc()
00058 {
00059
00060   CString szSection ;
00061   CString szKey ;
00062   #pragma warning(suppress: 6031)
00063   szSection.LoadString( IDS_INI_CONFIG ) ;
00064   ASSERT(szSection != "");
00065
00066   #pragma warning(suppress: 6031)
00067   szKey.LoadString( IDS_INI_CLSCTX ) ;
00068   ASSERT(szKey != "");
00069   theApp.WriteProfileInt( szSection, szKey, (WORD)m_dwClsCtx ) ;
00070
00071 }
00072
00073 BOOL COle2ViewDoc::OnNewDocument()
00074 {
00075 //    if (!CDocument::OnNewDocument())
00076 //        return FALSE;
00077   return TRUE;
00078 }
00079
00080 void COle2ViewDoc::OnCloseDocument()
00081 {
00082   CDocument::OnCloseDocument();
00083 }
00084
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // COle2ViewDoc diagnostics
00088
00089 #ifdef _DEBUG
00090 void COle2ViewDoc::AssertValid() const
00091 {
00092   CDocument::AssertValid();
00093 }
00094
00095 void COle2ViewDoc::Dump(CDumpContext& dc) const
00096 {
00097   CDocument::Dump(dc);
00098 }
00099
00100 #endif //_DEBUG
00101
00102 /////////////////////////////////////////////////////////////////////////////
00103 // COle2ViewDoc commands
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdView.cpp Source File

  • internet
  • HTMLEdit

HTMLEdView.cpp

Go to the documentation of this file.
00001 // HTMLEdView.cpp : implementation of the CHTMLEdView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014
00015 #include "HTMLEdDoc.h"
00016 #include "htmledview.h"
00017 #include "mainfrm.h"
00018 #include <afxpriv.h>
00019
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CHTMLEdView
00029
00030 //Arrays for context menu
00031
00032 IMPLEMENT_DYNCREATE(CHTMLEdView, CHtmlEditView)
00033 BEGIN_DHTMLEDITING_CMDMAP(CHTMLEdView)
00034   DHTMLEDITING_CMD_ENTRY(ID_EDIT_CUT, IDM_CUT)
00035   DHTMLEDITING_CMD_ENTRY(ID_EDIT_COPY, IDM_COPY)
00036   DHTMLEDITING_CMD_ENTRY(ID_EDIT_PASTE, IDM_PASTE)
00037   DHTMLEDITING_CMD_ENTRY(ID_EDIT_UNDO, IDM_UNDO)
00038   DHTMLEDITING_CMD_ENTRY(ID_EDIT_SELECT_ALL, IDM_SELECTALL)
00039   DHTMLEDITING_CMD_ENTRY(ID_EDIT_FONT, IDM_FONT)
00040   DHTMLEDITING_CMD_ENTRY(ID_BUTTON_INDENT, IDM_INDENT)
00041   DHTMLEDITING_CMD_ENTRY(ID_BUTTON_OUTDENT, IDM_OUTDENT)
00042   DHTMLEDITING_CMD_ENTRY(ID_BUTTON_IMAGE, IDM_IMAGE)
00043   DHTMLEDITING_CMD_ENTRY_FUNC(ID_FORMAT_ABSOLUTEPOSITIONELEMENT, IDM_ABSOLUTE_POSITION, &CHTMLEdView::SetAbsPos)
00044   DHTMLEDITING_CMD_ENTRY_FUNC(ID_FORMAT_STATICELEMENT, IDM_ABSOLUTE_POSITION, &CHTMLEdView::SetStaticPos)
00045   DHTMLEDITING_CMD_ENTRY_FUNC(ID_BUTTON_ABSOLUTE, IDM_ABSOLUTE_POSITION, &CHTMLEdView::SetAbsPos)
00046   DHTMLEDITING_CMD_ENTRY_FUNC(ID_BUTTON_STATIC, IDM_ABSOLUTE_POSITION, &CHTMLEdView::SetStaticPos)
00047   DHTMLEDITING_CMD_ENTRY(ID_BUTTON_HYPERLINK, IDM_HYPERLINK)
00048   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_BOLD, IDM_BOLD, AFX_UI_ELEMTYPE_CHECBOX)
00049   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_ITALIC, IDM_ITALIC, AFX_UI_ELEMTYPE_CHECBOX)
00050   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_UNDERLINE, IDM_UNDERLINE, AFX_UI_ELEMTYPE_CHECBOX)
00051   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_BULLETLIST, IDM_UNORDERLIST, AFX_UI_ELEMTYPE_CHECBOX)
00052   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_NUMBERLIST, IDM_ORDERLIST, AFX_UI_ELEMTYPE_CHECBOX)
00053   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_LEFTJUSTIFY, IDM_JUSTIFYLEFT, AFX_UI_ELEMTYPE_CHECBOX)
00054   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_CENTERJUSTIFY, IDM_JUSTIFYCENTER, AFX_UI_ELEMTYPE_CHECBOX)
00055   DHTMLEDITING_CMD_ENTRY_TYPE(ID_BUTTON_RIGHTJUSTIFY, IDM_JUSTIFYRIGHT, AFX_UI_ELEMTYPE_CHECBOX)
00056
00057 END_DHTMLEDITING_CMDMAP()
00058
00059 BEGIN_MESSAGE_MAP(CHTMLEdView, CHtmlEditView)
00060   ON_UPDATE_COMMAND_UI(ID_BUTTON_BLOCKFMT, OnUpdateBlockFmt)
00061   ON_UPDATE_COMMAND_UI(ID_BUTTON_COLOR, OnUpdateColor)
00062   ON_NOTIFY(TBN_DROPDOWN, AFX_IDW_TOOLBAR , OnEditBarNotify)
00063   ON_COMMAND_RANGE(FORMATBASE,FORMATBASE+100,OnFormatPopup)
00064 END_MESSAGE_MAP()
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CHTMLEdView construction/destruction
00068 void CHTMLEdView::OnUpdateBlockFmt(CCmdUI* pCmdUI)
00069 {
00070   pCmdUI->Enable(QueryStatus(IDM_BLOCKFMT) & OLECMDF_ENABLED);
00071 }
00072
00073 void CHTMLEdView::OnUpdateColor(CCmdUI *pCmdUI)
00074 {
00075   if (QueryStatus(IDM_FORECOLOR) & OLECMDF_ENABLED)
00076     pCmdUI->Enable();
00077 }
00078
00079 void CHTMLEdView::SetAbsPos(UINT)
00080 {
00081   SetAbsolutePosition(true);
00082 }
00083
00084 void CHTMLEdView::SetStaticPos(UINT)
00085 {
00086   SetAbsolutePosition(false);
00087 }
00088
00089 CHTMLEdView::CHTMLEdView():m_bUserMode(true),
00090   m_pClrMenu(NULL),
00091   m_pFmtMenu(NULL)
00092 {
00093 }
00094
00095 CHTMLEdView::~CHTMLEdView()
00096 {
00097   if(m_pFmtMenu) delete m_pFmtMenu;
00098   if(m_pClrMenu) delete m_pClrMenu;
00099 }
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CHTMLEdView printing
00103
00104
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CHTMLEdView diagnostics
00108
00109 #ifdef _DEBUG
00110 void CHTMLEdView::AssertValid() const
00111 {
00112   CHtmlEditView::AssertValid();
00113 }
00114
00115 void CHTMLEdView::Dump(CDumpContext& dc) const
00116 {
00117   CHtmlEditView::Dump(dc);
00118 }
00119
00120 CHTMLEdDoc* CHTMLEdView::GetDocument() // non-debug version is inline
00121 {
00122   ENSURE(m_pDocument->IsKindOf(RUNTIME_CLASS(CHTMLEdDoc)));
00123   return (CHTMLEdDoc*)m_pDocument;
00124 }
00125 #endif //_DEBUG
00126
00127 //Events from the triedit control
00128 void CHTMLEdView::OnDocumentComplete()
00129 {
00130   CStringArray sa;
00131   GetBlockFormatNames(sa);
00132   //When in Source View, calling UpdateView to update the web view, causes
00133   //OnDocumentComplete to be fired. We check if the document is waiting for
00134   //this event to save itself
00135   if(((CHTMLEdDoc*)m_pDocument)->m_bDoSaveOnDocCom)
00136   {
00137     ((CHTMLEdDoc*)m_pDocument)->m_bDoSaveOnDocCom = FALSE;
00138     ((CHTMLEdDoc*)m_pDocument)->SaveMyDocument();
00139
00140     //Since OnDocumentComplete is asynchronous, we have postponed OnNewDocument
00141     //till OnDocumentComplete is done, so that the old document gets saved before
00142     //the new one is loaded
00143     if(((CHTMLEdDoc*)m_pDocument)->m_bCallNewDocument)
00144     {
00145       ((CHTMLEdDoc*)m_pDocument)->m_bCallNewDocument = FALSE;
00146       ((CHTMLEdDoc*)m_pDocument)->OnNewDocument();
00147     }
00148
00149     //Same logic as above for OnNewDocument
00150     if(((CHTMLEdDoc*)m_pDocument)->m_bCallCloseDocument)
00151     {
00152       ((CHTMLEdDoc*)m_pDocument)->m_bCallCloseDocument = FALSE;
00153       ((CHTMLEdDoc*)m_pDocument)->OnCloseDocument();
00154     }
00155   }
00156 }
00157 HRESULT CHTMLEdView::OnUpdateUI()
00158 {
00159   long id = GetDlgCtrlID();
00160   if(id==AFX_IDW_PANE_LAST) //we change the ID if we hide this window
00161     return S_OK;
00162   if(S_OK == GetIsDirty())
00163     GetDocument()->SetModifiedFlag();
00164   UpdateFontCombos();
00165   AfxGetMainWnd()->PostMessage(WM_KICKIDLE);
00166   return S_OK;
00167 }
00168
00169 HRESULT CHTMLEdView::OnShowContextMenu(DWORD /*dwID*/,
00170               LPPOINT ppt,
00171               LPUNKNOWN /*pcmdtReserved*/,
00172               LPDISPATCH /*pdispReserved*/)
00173 {
00174   CMenu *pMenuMain = AfxGetMainWnd()->GetMenu();
00175   CMenu *pPopup = pMenuMain->GetSubMenu(1);
00176
00177   // enable/disable items based on the status of the command
00178   UINT nCount = pPopup->GetMenuItemCount();
00179   for (UINT i = 0; i<nCount; i++)
00180   {
00181     int nID = (int)pPopup->GetMenuItemID(i);
00182     if (nID != 0 && nID != -1)
00183     {
00184       BOOL bHasFunc;
00185       UINT uiElemType;
00186       UINT dhtmlCmdID = GetDHtmlCommandMapping(nID, bHasFunc, uiElemType);
00187       long nStatus = QueryStatus(dhtmlCmdID);
00188       if (!(nStatus & OLECMDF_ENABLED))
00189       {
00190         pPopup->EnableMenuItem(nID, MF_DISABLED|MF_GRAYED);
00191       }
00192       else
00193         pPopup->EnableMenuItem(nID, MF_ENABLED);
00194     }
00195   }
00196   pPopup->TrackPopupMenu(TPM_LEFTALIGN, ppt->x, ppt->y, this);
00197   return S_OK;
00198 }
00199 void CHTMLEdView::OnContextMenuAction(long itemIndex)
00200 {
00201   switch(itemIndex)
00202   {
00203   case 0:
00204     CHtmlEditView::Cut();
00205     break;
00206   case 1:
00207     CHtmlEditView::Copy();
00208     break;
00209   case 2:
00210     CHtmlEditView::Paste();
00211     break;
00212   case 4:
00213     CHtmlEditView::SelectAll();
00214     break;
00215   }
00216 }
00217
00218 void CHTMLEdView::OnInitialUpdate()
00219 {
00220   CString strCmdLine(AfxGetApp()->m_lpCmdLine);
00221   CHTMLEdDoc * pDoc = NULL;
00222   if(strCmdLine != _T(""))
00223   {
00224     pDoc =(CHTMLEdDoc * )GetDocument();
00225     ENSURE(pDoc);
00226     pDoc->OnOpenDocument((LPCTSTR)strCmdLine);
00227   }
00228   CHtmlEditView::OnInitialUpdate();
00229 }
00230
00231 void CHTMLEdView::UpdateFontCombos()
00232 {
00233   CString szResult,szCurFmt;
00234   int nSel;
00235   short nCurSize;
00236
00237   CMainFrame *pFrame = (CMainFrame*)GetParentFrame();
00238   ASSERT_VALID(pFrame);
00239
00240
00241   //Set font face
00242   CComboBox *pCombo = (CComboBox*)pFrame->GetFontNameCombo();
00243   ASSERT_VALID(pCombo);
00244   pCombo->GetWindowText(szCurFmt);
00245   GetFontFace(szResult);
00246   //only update the combo it isn't in the dropped state
00247   //and the font name has changed
00248   if(!pCombo->GetDroppedState() && szCurFmt!=szResult)
00249   {
00250
00251     nSel = pCombo->FindString(0,szResult);
00252     if(nSel != CB_ERR)
00253       pCombo->SetCurSel(nSel);
00254   }
00255
00256   //Set font size
00257   pCombo = (CComboBox*)pFrame->GetFontSizeCombo();
00258   ASSERT_VALID(pCombo);
00259   short nSize = 0;
00260   nCurSize = 0;
00261
00262   GetFontSize(nSize);
00263   //only update the size combo if it is not in the
00264   //dropped down state.
00265   if(!pCombo->GetDroppedState())
00266   {
00267     szResult.Empty();
00268     _itot_s(nSize,szResult.GetBuffer(5), 5, 10);
00269     nSel = pCombo->FindString(0,(LPCTSTR) szResult);
00270     szResult.ReleaseBuffer();
00271     if(nSel != CB_ERR)
00272       pCombo->SetCurSel(nSel);
00273   }
00274 }
00275
00276 void CHTMLEdView::OnEditBarNotify(NMHDR* pNMHDR, LRESULT* /*pResult*/)
00277 {
00278
00279   TBNOTIFY* pTBNotify = (TBNOTIFY*) pNMHDR;
00280
00281   switch(pTBNotify->iItem)
00282   {
00283   case ID_BUTTON_BLOCKFMT:
00284     PopBlockFmtMenu();
00285     break;
00286
00287   case ID_BUTTON_COLOR:
00288     PopColorMenu();
00289     break;
00290
00291   default:
00292     break;
00293   }
00294 }
00295
00296 void CHTMLEdView::PopBlockFmtMenu()
00297 {
00298   //re-create the popup menu every time through here
00299   //in case block formats change.
00300   if(!m_pFmtMenu)
00301   {
00302     m_pFmtMenu = new CFormatMenu;
00303     if(m_pFmtMenu)
00304     {
00305       if(!m_pFmtMenu->CreatePopupMenu())
00306         return;
00307     }
00308     else
00309       return;
00310
00311   }
00312   else
00313   {
00314     m_pFmtMenu->DestroyMenu();
00315     if(!m_pFmtMenu->CreatePopupMenu())
00316       return;
00317   }
00318
00319   m_pFmtMenu->ClearStringArray();
00320   CStringArray &ar = m_pFmtMenu->GetStringArray();
00321   CString curFmt;
00322
00323   if(!SUCCEEDED(GetBlockFormatNames(ar)) || !SUCCEEDED(GetBlockFormat(curFmt)) )
00324     return;
00325   int nFlags;
00326   int arSz = (int)ar.GetSize();
00327   for(int i = 0; i < arSz; i++)
00328   {
00329     nFlags = MF_STRING|MF_ENABLED;
00330     if(ar[i] == curFmt)
00331       nFlags |= MF_CHECKED;
00332     m_pFmtMenu->AppendMenu(nFlags,FORMATBASE+i,ar[i]);
00333   }
00334
00335   //get the rect for menu
00336   CMainFrame *pFrame = (CMainFrame*)GetParentFrame();
00337   ASSERT_VALID(pFrame);
00338   CRect rc;
00339   pFrame->m_wndEditBar.GetItemRect(2,rc);
00340   pFrame->m_wndEditBar.ClientToScreen(rc);
00341
00342   m_pFmtMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,
00343                 rc.left+3,rc.bottom,this);
00344
00345 }
00346 void CHTMLEdView::OnFormatPopup(UINT nCommandID)
00347 {
00348   //format popup menu was hit
00349   //calculate the index into the format menu's string array
00350   int nIndex = nCommandID-FORMATBASE;
00351   CStringArray &sa = m_pFmtMenu->GetStringArray();
00352   SetBlockFormat(sa[nIndex]);
00353 }
00354
00355
00356 UINT_PTR CALLBACK CdlgHook(  HWND hdlg,UINT uiMsg,WPARAM /*wParam*/, LPARAM lParam)
00357 {
00358   if(uiMsg == WM_INITDIALOG)
00359   {
00360     CHOOSECOLOR *pcc = (CHOOSECOLOR*)lParam;
00361     CRect *rc = (CRect*)pcc->lCustData;
00362     if(rc)
00363       SetWindowPos(hdlg,HWND_TOP,rc->right,rc->bottom,
00364       0,0,SWP_NOZORDER|SWP_NOSIZE);
00365     SetWindowText(hdlg, _T("Choose a Foreground Color"));
00366     delete rc;
00367   }
00368   return 0;
00369 }
00370 void CHTMLEdView::PopColorMenu()
00371 {
00372   //get the rect for menu
00373   CMainFrame *pFrame = (CMainFrame*)GetParentFrame();
00374   ASSERT_VALID(pFrame);
00375   CRect *prc = new CRect;
00376   if(!prc) return;
00377
00378   pFrame->m_wndEditBar.GetItemRect(6,prc);
00379   pFrame->m_wndEditBar.ClientToScreen(prc);
00380
00381   CColorDialog dlg;
00382   dlg.m_cc.Flags |= CC_ENABLEHOOK;
00383   dlg.m_cc.lpfnHook = CdlgHook;
00384   dlg.m_cc.lCustData = (LONG_PTR)prc;
00385
00386   if(dlg.DoModal()==IDOK)
00387   {
00388     CString szColor;
00389     COLORREF cr = dlg.GetColor();
00390
00391     //change the COLORREF into an RGB.
00392     szColor.Format(_T("%.2x%.2x%.2x"),GetRValue(cr),GetGValue(cr),GetBValue(cr));
00393     SetForeColor(szColor);
00394   }
00395 }
00396
00397 void CHTMLEdView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
00398 {
00399
00400   if(bActivate && pActivateView==this && pDeactiveView != this)
00401   {
00402     //we're being activated get the HTML from the WebView
00403     UpdateView();
00404   }
00405
00406   CHtmlEditView::OnActivateView(bActivate, pActivateView, pDeactiveView);
00407 }
00408
00409 void CHTMLEdView::UpdateView()
00410 {
00411   CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();
00412   ASSERT_VALID(pFrame);
00413
00414   CSourceView* pSrcView = (CSourceView*)pFrame->GetSourceView();
00415   ASSERT_VALID(pSrcView);
00416   CString szHTML;
00417   pSrcView->GetWindowText(szHTML);
00418   if(szHTML.GetLength() > 0)
00419     SetDocumentHTML(szHTML);
00420 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ButtonLib::_DButton Member List

This is the complete list of members for ButtonLib::_DButton, including all inherited members.
AboutBox() | ButtonLib::_DButton
id | ButtonLib::_DButton
id | ButtonLib::_DButton
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npdoc.h Source File

  • general
  • npp

npdoc.h

Go to the documentation of this file.
00001 // npdoc.h : interface of the CNotepadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 class CNotepadDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CNotepadDoc();
00017   DECLARE_DYNCREATE(CNotepadDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CNotepadDoc)
00028   public:
00029   virtual BOOL OnNewDocument();
00030   //}}AFX_VIRTUAL
00031
00032 // Implementation
00033 public:
00034   virtual ~CNotepadDoc();
00035   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00036 #ifdef _DEBUG
00037   virtual void AssertValid() const;
00038   virtual void Dump(CDumpContext& dc) const;
00039 #endif
00040
00041 protected:
00042
00043 // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CNotepadDoc)
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUseDlg.cpp Source File

  • general
  • VariantUse

VariantUseDlg.cpp

Go to the documentation of this file.
00001 // VariantUseDlg.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "VariantUse.h"
00013 #include "VariantUseDlg.h"
00014 #include <atlconv.h>
00015 #include <atlbase.h>
00016 #include <comdef.h>
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CAboutDlg dialog used for App About
00025
00026 class CAboutDlg : public CDialog
00027 {
00028 public:
00029   CAboutDlg();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CAboutDlg)
00033   enum { IDD = IDD_ABOUTBOX };
00034   //}}AFX_DATA
00035
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CAboutDlg)
00038   protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 protected:
00044   //{{AFX_MSG(CAboutDlg)
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00050 {
00051   //{{AFX_DATA_INIT(CAboutDlg)
00052   //}}AFX_DATA_INIT
00053 }
00054
00055 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00056 {
00057   CDialog::DoDataExchange(pDX);
00058   //{{AFX_DATA_MAP(CAboutDlg)
00059   //}}AFX_DATA_MAP
00060 }
00061
00062 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00063   //{{AFX_MSG_MAP(CAboutDlg)
00064     // No message handlers
00065   //}}AFX_MSG_MAP
00066 END_MESSAGE_MAP()
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CVarUseDlg dialog
00070
00071 CVarUseDlg::CVarUseDlg(CWnd* pParent /*=NULL*/)
00072   : CDialog(CVarUseDlg::IDD, pParent)
00073 {
00074   //{{AFX_DATA_INIT(CVarUseDlg)
00075     // NOTE: the ClassWizard will add member initialization here
00076   //}}AFX_DATA_INIT
00077   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00078   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00079 }
00080
00081 void CVarUseDlg::DoDataExchange(CDataExchange* pDX)
00082 {
00083   CDialog::DoDataExchange(pDX);
00084   //{{AFX_DATA_MAP(CVarUseDlg)
00085     // NOTE: the ClassWizard will add DDX and DDV calls here
00086   //}}AFX_DATA_MAP
00087 }
00088
00089 BEGIN_MESSAGE_MAP(CVarUseDlg, CDialog)
00090   //{{AFX_MSG_MAP(CVarUseDlg)
00091   ON_WM_SYSCOMMAND()
00092   ON_WM_PAINT()
00093   ON_WM_QUERYDRAGICON()
00094   ON_BN_CLICKED(IDC_Currency, OnCurrency)
00095   ON_BN_CLICKED(IDC_Strings, OnStrings)
00096   ON_BN_CLICKED(IDC_Basic, OnBasic)
00097   ON_BN_CLICKED(IDC_SafeArray, OnSafeArray)
00098   ON_BN_CLICKED(IDC_OleArray, OnOleArray)
00099   ON_BN_CLICKED(IDC_MultiDimensionArray, OnMultiDimensionArray)
00100   ON_BN_CLICKED(IDC_Date, OnDate)
00101   //}}AFX_MSG_MAP
00102 END_MESSAGE_MAP()
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CVarUseDlg message handlers
00106
00107 BOOL CVarUseDlg::OnInitDialog()
00108 {
00109   CDialog::OnInitDialog();
00110
00111   // Add "About..." menu item to system menu.
00112
00113   // IDM_ABOUTBOX must be in the system command range.
00114   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00115   ASSERT(IDM_ABOUTBOX < 0xF000);
00116
00117   CMenu* pSysMenu = GetSystemMenu(FALSE);
00118   if (pSysMenu != NULL)
00119   {
00120     CString strAboutMenu;
00121     strAboutMenu.LoadString(IDS_ABOUTBOX);
00122     if (!strAboutMenu.IsEmpty())
00123     {
00124       pSysMenu->AppendMenu(MF_SEPARATOR);
00125       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00126     }
00127   }
00128
00129   // Set the icon for this dialog.  The framework does this automatically
00130   //  when the application's main window is not a dialog
00131   SetIcon(m_hIcon, TRUE);     // Set big icon
00132   SetIcon(m_hIcon, FALSE);    // Set small icon
00133
00134   // TODO: Add extra initialization here
00135
00136   return TRUE;  // return TRUE  unless you set the focus to a control
00137 }
00138
00139 void CVarUseDlg::OnSysCommand(UINT nID, LPARAM lParam)
00140 {
00141   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00142   {
00143     CAboutDlg dlgAbout;
00144     dlgAbout.DoModal();
00145   }
00146   else
00147   {
00148     CDialog::OnSysCommand(nID, lParam);
00149   }
00150 }
00151
00152 // If you add a minimize button to your dialog, you will need the code below
00153 //  to draw the icon.  For MFC applications using the document/view model,
00154 //  this is automatically done for you by the framework.
00155
00156 void CVarUseDlg::OnPaint()
00157 {
00158   if (IsIconic())
00159   {
00160     CPaintDC dc(this); // device context for painting
00161
00162     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00163
00164     // Center icon in client rectangle
00165     int cxIcon = GetSystemMetrics(SM_CXICON);
00166     int cyIcon = GetSystemMetrics(SM_CYICON);
00167     CRect rect;
00168     GetClientRect(&rect);
00169     int x = (rect.Width() - cxIcon + 1) / 2;
00170     int y = (rect.Height() - cyIcon + 1) / 2;
00171
00172     // Draw the icon
00173     dc.DrawIcon(x, y, m_hIcon);
00174   }
00175   else
00176   {
00177     CDialog::OnPaint();
00178   }
00179 }
00180
00181 // The system calls this to obtain the cursor to display while the user drags
00182 //  the minimized window.
00183 HCURSOR CVarUseDlg::OnQueryDragIcon()
00184 {
00185   return (HCURSOR) m_hIcon;
00186 }
00187
00188 void CVarUseDlg::OnCurrency()
00189 {
00190   VARIANT myVar;
00191   myVar.vt = VT_CY;
00192
00193
00194   // put 15.15 into the currency variant.
00195   CURRENCY myValue;
00196   myValue.Hi = 0;
00197   myValue.Lo = (LONG)(15*10000 + 1537); // set the value to $15.15;
00198   myVar.cyVal = myValue;
00199   //or
00200   myValue.int64 = (151234);
00201   myVar.cyVal = myValue;
00202
00203
00204
00205   //Now get the value from a float and put it into the currency.
00206   float myMoney = (float)5.37;
00207   myVar.vt = VT_R4;
00208   myVar.fltVal = myMoney;
00209   //no loss of precission.
00210   ENSURE(SUCCEEDED(VariantChangeType(&myVar, &myVar, 0, VT_CY)));
00211
00212
00213   //Now get the value from a String
00214   USES_CONVERSION;
00215   myVar.bstrVal = SysAllocString(L"23.4345");
00216   myVar.vt = VT_BSTR;
00217   ENSURE(SUCCEEDED(VariantChangeType(&myVar, &myVar, 0, VT_CY)));
00218
00219   //Finally output a currency to a string.
00220   myVar.cyVal.int64 += myVar.cyVal.int64; // + myVar.cyVal;
00221   ENSURE(SUCCEEDED(VariantChangeType(&myVar, &myVar, 0, VT_BSTR)));
00222
00223 }
00224
00225 void CVarUseDlg::OnStrings()
00226 {
00227   //Create a BSTR and assign it to a Variant
00228   BSTR x = SysAllocString(L"Hello");
00229   VARIANT myVariant;
00230   myVariant.vt = VT_BSTR;
00231   myVariant.bstrVal = x;
00232   SysFreeString(x);
00233
00234   //Create a CString and change it to a variant;
00235   CString myCString(_T("My String"));
00236   CString mySecondString;
00237
00238   BSTR y = myCString.AllocSysString();
00239   myVariant.bstrVal = y;
00240   mySecondString = y;
00241   SysFreeString(y);
00242
00243
00244   //Create two BSTRs and add them.
00245   BSTR a = SysAllocString(L"One two ");
00246   BSTR b = SysAllocString(L"three four.");
00247   _bstr_t my_bstr_t(a, TRUE);
00248   my_bstr_t += b;
00249   myVariant.bstrVal = my_bstr_t;
00250   // or
00251   myVariant.bstrVal = _bstr_t(a, FALSE) + b;
00252
00253   //Change a bstr to a CString.
00254   CString ANewString(b);
00255   //or if CString already exists.
00256   myCString = b;
00257
00258
00259   //Use of CComBSTR
00260   CComBSTR myCComBSTR(L"Hello");
00261   myCComBSTR.Append(L", how are you?");
00262   VARIANT varFromCCom;
00263   varFromCCom.vt = VT_BSTR;
00264   varFromCCom.bstrVal = myCComBSTR;
00265
00266 }
00267
00268 void CVarUseDlg::OnBasic()
00269 {
00270   //create a variant of the character 'c'
00271   VARIANT varC;
00272   varC.vt=VT_UI1;
00273   varC.cVal = 'c';
00274
00275   //create a variant of the short 12
00276   VARIANT varS;
00277   varS.vt = VT_I2;
00278   varS.iVal = 12;
00279
00280   //create a variant of the long 1234567;
00281   VARIANT varL;
00282   varL.vt = VT_I4;
00283   varL.lVal = 1234567;
00284 }
00285
00286 void CVarUseDlg::OnSafeArray()
00287 {
00288
00289   //Create a standard array;
00290   int* pMyOriginalArray = new int[100];
00291   int count;
00292   for(count = 0; count < 100; count++) pMyOriginalArray[count] = count;
00293
00294
00295   //Now get ready to put it into a safe array
00296   HRESULT hr;
00297   //create an array bound
00298   SAFEARRAYBOUND rgsabound[1];
00299   rgsabound[0].lLbound = 0;   //The first (and only) collumn of our array starts at 0.
00300   rgsabound[0].cElements = 100; //and has 100 elements.
00301
00302   //create the array
00303   SAFEARRAY FAR* pMySafeArray;
00304   pMySafeArray = SafeArrayCreate(VT_I4, 1, rgsabound); //create the array of 4byte integers, one dimension
00305                              //with the bounds stored in rgsabound.
00306
00307   //now access the safe array's data.
00308   int* pData;
00309   hr = SafeArrayAccessData(  pMySafeArray, (void**)&pData); //Get a pointer to the data.
00310
00311
00312   //copy the 400 bytes of data from our old array to the new one.
00313   memcpy_s(pData, 400, pMyOriginalArray, 400);
00314
00315   //here we verify to you that the data is correct.
00316   for(count = 0; count < 100; count++) ASSERT(pData[count] == pMyOriginalArray[count]);
00317   SafeArrayUnaccessData(pMySafeArray);
00318
00319
00320   //To put the SafeArray in a Variant
00321   VARIANT myVariant;
00322   myVariant.parray = pMySafeArray;
00323   myVariant.vt = VT_ARRAY|VT_I4; // state it's an array and what type it holds.
00324
00325
00326   //pass the Variant to a function call.
00327   FunctionCallWithVariant(myVariant);
00328   //see that the original array was modified.
00329   hr = SafeArrayAccessData(myVariant.parray, (void**)&pData); //Get a pointer to the data.
00330   ASSERT(pData[0] == 1234);
00331   SafeArrayUnaccessData(pMySafeArray);
00332
00333   //Copy the variant.
00334   VARIANT NewVariant;
00335   NewVariant.vt = VT_EMPTY; // must set variant type for copy to work.
00336   hr = VariantCopy(&NewVariant, &myVariant);
00337
00338   //check array in copy of variant
00339   int* pNewData;
00340   hr = SafeArrayAccessData(NewVariant.parray, (void**) &pNewData);
00341   for(count = 0; count < 100; count++) ASSERT(pData[count] == pNewData[count]);
00342   ASSERT(pData != pNewData); //copying the varriant created a new copy of the
00343                  //array it contained too.  There is now 2 copies of the data.
00344   SafeArrayUnaccessData(NewVariant.parray);
00345
00346   //Or you could use CreateVector to create the 1 dimensional array.
00347   SAFEARRAY* pMyVector = SafeArrayCreateVector(VT_I4, -50, 100);  //Vecoor of VT_I4, starting at 0
00348                                 //with 100 elements.
00349   int* pVectorData;
00350   hr = SafeArrayAccessData(pMyVector, (void**)&pVectorData);
00351   memcpy_s(pVectorData, 400, pMyOriginalArray, 400); //copy the 400 bytes of data from our old array into the new one.
00352   int element;
00353   long location[1] = {-50};
00354   hr = SafeArrayGetElement(pMyVector, location, (void*)&element);
00355   ASSERT(element == 0); //element -50 is the first element from the original array
00356   location[0] = 0;
00357   hr = SafeArrayGetElement(pMyVector, location, (void*)&element);
00358   ASSERT(element == 50); // element 0 is the 50th element from the original array
00359   delete[] pMyOriginalArray;
00360   hr = SafeArrayDestroy(pMySafeArray);
00361   hr = SafeArrayDestroy(pMyVector);
00362   hr = SafeArrayDestroy(NewVariant.parray);
00363
00364 }
00365
00366 void CVarUseDlg::OnOleArray()
00367 {
00368   //Create and fill an array.
00369   int* pMyOriginalArray = new int[100];
00370   int* pData;
00371   int count;
00372   for(count = 0; count < 100; count++) pMyOriginalArray[count]=count;
00373
00374   //Put it into a safe array.
00375   COleSafeArray myOleSafeArray;
00376   myOleSafeArray.CreateOneDim(VT_I4, 100, pMyOriginalArray); // create one dimension array of 4-byte values
00377                                    // 100 entries w/data from pMyOriginalArray.
00378   // Access that safe array.
00379   //Get a pointer to the Data.
00380   myOleSafeArray.AccessData((void**)&pData);
00381   //verify all of the data.
00382   for(count = 0; count < 100; count++) ASSERT(pData[count] == pMyOriginalArray[count]);
00383   myOleSafeArray.UnaccessData();
00384
00385   //clean up.
00386   delete[] pMyOriginalArray;
00387 }
00388
00389 void CVarUseDlg::OnMultiDimensionArray()
00390 {
00391   short pMyOriginalData[2][3][4][5];
00392   HRESULT hr;
00393   //initialize data
00394   for(short a = 0; a < 2; a++)
00395     for(short b = 0; b < 3; b++)
00396       for(short c = 0; c < 4; c++)
00397         for(short d = 0; d < 5; d++)
00398           pMyOriginalData[a][b][c][d] = a*b*c*d;
00399
00400
00401
00402   SAFEARRAY* pMyArray;
00403   SAFEARRAYBOUND rgsabound[4];
00404   for(int count = 2; count < 6; count++)
00405   {
00406     rgsabound[count - 2].lLbound = 0;
00407     rgsabound[count - 2].cElements = count;
00408   }
00409   pMyArray = SafeArrayCreate(VT_I2, 4, rgsabound);
00410   short* pData;
00411   hr = SafeArrayAccessData(pMyArray, (void**)&pData);
00412   memcpy_s(pData, 2*3*4*5*2, pMyOriginalData, 2*3*4*5*2);
00413   short element;
00414   long location[4] = {1,2,3,4};
00415   hr = SafeArrayGetElement(pMyArray, location, (void*)&element);
00416   ASSERT(element == 1*2*3*4);
00417
00418
00419
00420   hr = SafeArrayDestroy(pMyArray);
00421   ASSERT(hr != S_OK);
00422   hr = SafeArrayUnaccessData(pMyArray);
00423   hr = SafeArrayDestroy(pMyArray);
00424   ASSERT(hr == S_OK);
00425
00426 }
00427
00428 void CVarUseDlg::OnDate()
00429 {
00430   VARIANT timeSelection;
00431   COleDateTime timeNow;
00432   DATE curDate;
00433   HRESULT hr;
00434   //Get current Time.
00435   timeNow = COleDateTime::GetCurrentTime();
00436
00437   //Put time into variant.
00438   timeSelection.vt = VT_DATE;
00439   timeSelection.date = timeNow.m_dt;
00440
00441   //Convert Variant into string using Variant Change Type.
00442   hr = VariantChangeType(&timeSelection, &timeSelection, 0, VT_BSTR);
00443   CString sCurTime(timeSelection.bstrVal);
00444
00445
00446   //Get Time as System Time.
00447   SYSTEMTIME mySysTime;
00448   timeNow.GetAsSystemTime(mySysTime);
00449
00450   //Use COleDateTime functionality to get change SYSTEMTIME into DATE.
00451   COleDateTime pastTime(mySysTime);
00452   curDate = pastTime.m_dt;
00453
00454
00455   //Use COldeDateTime Format command to get date as CString.
00456   LPCTSTR format = _T("%X %z");  //Current time and time zone.
00457   //Note see "strftime" help for valid formating strings.
00458   CString sTime = pastTime.Format(format);
00459
00460 }
00461
00462 void CVarUseDlg::FunctionCallWithVariant(VARIANT myVariant)
00463 {
00464   HRESULT hr;
00465   int* pData;
00466   int count;
00467   hr = SafeArrayAccessData(myVariant.parray, (void**)&pData); //access the array stored in the varriant.
00468   for(count = 0; count < 100; count++) ASSERT(pData[count] == count); //check data;
00469   pData[0] = 1234; //modify data
00470   SafeArrayUnaccessData(myVariant.parray);
00471 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDlgToolTipsDlg Member List

This is the complete list of members for CDlgToolTipsDlg, including all inherited members.
CDlgToolTipsDlg(CWnd *pParent=NULL) | CDlgToolTipsDlg |
DoDataExchange(CDataExchange *pDX) | CDlgToolTipsDlg | [protected, virtual]
IDD enum value | CDlgToolTipsDlg |
m_hIcon | CDlgToolTipsDlg | [protected]
m_ToolTip | CDlgToolTipsDlg | [protected]
OnInitDialog() | CDlgToolTipsDlg | [protected, virtual]
OnPaint() | CDlgToolTipsDlg | [protected]
OnQueryDragIcon() | CDlgToolTipsDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CDlgToolTipsDlg | [protected]
PreTranslateMessage(MSG *pMsg) | CDlgToolTipsDlg | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/LHdrDlg.h Source File

  • general
  • ListHdr

LHdrDlg.h

Go to the documentation of this file.
00001 // LHdrDlg.h : header file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #if !defined(AFX_ListHdrDLG_H__31281828_D350_11D0_8286_00C04FD73634__INCLUDED_)
00012 #define AFX_ListHdrDLG_H__31281828_D350_11D0_8286_00C04FD73634__INCLUDED_
00013
00014 #if _MSC_VER >= 1000
00015 #pragma once
00016 #endif // _MSC_VER >= 1000
00017
00018 #include "mlistctl.h"
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CListHdrDlg dialog
00022
00023 class CListHdrDlg : public CDialog
00024 {
00025 // Construction
00026 public:
00027   CListHdrDlg(CWnd* pParent = NULL);  // standard constructor
00028   ~CListHdrDlg();
00029
00030 // Dialog Data
00031   //{{AFX_DATA(CListHdrDlg)
00032   enum { IDD = IDD_LISTHDR_DIALOG };
00033 //  CListCtrl   m_listctrl;
00034   CMyListCtrl m_listctrl;
00035   BOOL    m_bNoLabelWrap;
00036   BOOL    m_bAutoArrange;
00037   BOOL    m_bSingleSel;
00038   BOOL    m_bEditLabels;
00039   BOOL    m_bNoColHdr;
00040   BOOL    m_bNoSortHdr;
00041   CString m_strViewMode;
00042   CString m_strAlignMode;
00043   CString m_strSortMode;
00044   BOOL    m_bHoverSelect;
00045   BOOL    m_bWorkAreas;
00046   //}}AFX_DATA
00047
00048   // ClassWizard generated virtual function overrides
00049   //{{AFX_VIRTUAL(CListHdrDlg)
00050   protected:
00051   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052   //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 protected:
00056   CImageList * m_pImageHdrSmall;
00057   CImageList * m_pImageList;
00058   CImageList * m_pImageListSmall;
00059   void ModifyHeaderItems();
00060   void FillListCtrl();
00061   void RenewListCtrl(DWORD dwStyle, BOOL bSetBits);
00062   void ChangeListCtrlStyle(DWORD dwStyle, BOOL bSetBits);
00063   BOOL m_bHotCursor;
00064   HCURSOR m_hStdHotCursor;
00065   HCURSOR m_hMyHotCursor;
00066   HICON m_hIcon;
00067
00068   // Generated message map functions
00069   //{{AFX_MSG(CListHdrDlg)
00070   virtual BOOL OnInitDialog();
00071   afx_msg void OnPaint();
00072   afx_msg HCURSOR OnQueryDragIcon();
00073   afx_msg void OnNoLabelWrap();
00074   afx_msg void OnAutoArrange();
00075   afx_msg void OnEditLabels();
00076   afx_msg void OnNoColHdr();
00077   afx_msg void OnNoSortHdr();
00078   afx_msg void OnSingleSel();
00079   afx_msg void OnChangeAlign();
00080   afx_msg void OnChangeView();
00081   afx_msg void OnHover();
00082   afx_msg void OnMyHotCur();
00083   afx_msg void OnChangeSort();
00084   afx_msg void OnWorkAreas();
00085   afx_msg void OnStdHotCur();
00086   afx_msg void OnAbout();
00087   //}}AFX_MSG
00088   DECLARE_MESSAGE_MAP()
00089 };
00090
00091 //{{AFX_INSERT_LOCATION}}
00092 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00093
00094 #endif // !defined(AFX_ListHdrDLG_H__31281828_D350_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/regview.h Source File

  • ole
  • oleview

regview.h

Go to the documentation of this file.
00001 // regview.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CRegistryView form view
00015
00016 #ifndef __REGVIEW_H__
00017 #define __REGVIEW_H__
00018
00019 #ifndef __AFXEXT_H__
00020 #include <afxext.h>
00021 #endif
00022
00023 class CRegistryView : public CFormView
00024 {
00025 protected:
00026   CRegistryView();           // protected constructor used by dynamic creation
00027   DECLARE_DYNCREATE(CRegistryView)
00028
00029 // Form Data
00030 public:
00031   COle2ViewDoc* GetDocument();
00032
00033   //{{AFX_DATA(CRegistryView)
00034   enum { IDD = IDD_REGVIEW };
00035   CStatic m_Name;
00036   CStatic m_CLSID;
00037   CStatic m_icon;
00038   CTreeCtrl   m_tree;
00039   //}}AFX_DATA
00040
00041 // Attributes
00042 public:
00043
00044 // Operations
00045 public:
00046
00047 // Overrides
00048   // ClassWizard generated virtual function overrides
00049   //{{AFX_VIRTUAL(CRegistryView)
00050   public:
00051   virtual void OnInitialUpdate();
00052   protected:
00053   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00054   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00055   //}}AFX_VIRTUAL
00056
00057 // Implementation
00058 protected:
00059   virtual ~CRegistryView();
00060 #ifdef _DEBUG
00061   virtual void AssertValid() const;
00062   virtual void Dump(CDumpContext& dc) const;
00063 #endif
00064
00065   // Generated message map functions
00066   //{{AFX_MSG(CRegistryView)
00067   afx_msg void OnSize(UINT nType, int cx, int cy);
00068   afx_msg void OnUnregister();
00069   afx_msg void OnTreeViewItemExpanding(NMHDR* pNMHDR, LRESULT* pResult);
00070   afx_msg void OnGetDispInfoTreeView(NMHDR* pNMHDR, LRESULT* pResult);
00071   afx_msg void OnSetDispInfoTreeView(NMHDR* pNMHDR, LRESULT* pResult);
00072   afx_msg void OnDeleteItemTreeView(NMHDR* pNMHDR, LRESULT* pResult);
00073   //}}AFX_MSG
00074   DECLARE_MESSAGE_MAP()
00075 };
00076
00077 #ifndef _DEBUG  // debug version in vw.cpp
00078 inline COle2ViewDoc* CRegistryView::GetDocument()
00079    { return (COle2ViewDoc*) m_pDocument; }
00080 #endif
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 #endif
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/resource.h Source File

  • ole
  • acdual

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by Autoclik.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_ACLICKTYPE                  129
00009 #define IDD_CHANGE_TEXT                 130
00010 #define IDS_TESTERROR                   130
00011 #define IDC_EDIT1                       1000
00012 #define ID_EDIT_CHANGETEXT              32771
00013
00014 // Next default values for new objects
00015 //
00016 #ifdef APSTUDIO_INVOKED
00017 #ifndef APSTUDIO_READONLY_SYMBOLS
00018 #define _APS_3D_CONTROLS                     1
00019 #define _APS_NEXT_RESOURCE_VALUE        131
00020 #define _APS_NEXT_COMMAND_VALUE         32772
00021 #define _APS_NEXT_CONTROL_VALUE         1001
00022 #define _APS_NEXT_SYMED_VALUE           101
00023 #endif
00024 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagIMECOLORS Member List

This is the complete list of members for tagIMECOLORS, including all inherited members.
cColors | tagIMECOLORS
lpnElem | tagIMECOLORS
lprgbIme | tagIMECOLORS
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/StdAfx.h Source File

  • general
  • VariantUse

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Classes Reference and related electronic
00009 // documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft C++ Libraries products.
00012
00013 #if !defined(AFX_STDAFX_H__0E9FDA49_3143_11D2_9373_00C04FD9757C__INCLUDED_)
00014 #define AFX_STDAFX_H__0E9FDA49_3143_11D2_9373_00C04FD9757C__INCLUDED_
00015
00016 #if _MSC_VER > 1000
00017 #pragma once
00018 #endif // _MSC_VER > 1000
00019
00020 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024 #include <afxdisp.h>        // MFC Automation classes
00025 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00026 #ifndef _AFX_NO_AFXCMN_SUPPORT
00027 #include <afxcmn.h>     // MFC support for Windows Common Controls
00028 #endif // _AFX_NO_AFXCMN_SUPPORT
00029
00030
00031 //{{AFX_INSERT_LOCATION}}
00032 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00033
00034 #endif // !defined(AFX_STDAFX_H__0E9FDA49_3143_11D2_9373_00C04FD9757C__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPROPERTYIDOFFSET Member List

This is the complete list of members for tagPROPERTYIDOFFSET, including all inherited members.
dwOffset | tagPROPERTYIDOFFSET
propertyID | tagPROPERTYIDOFFSET
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summinfo.h Source File

  • ole
  • drawcli

summinfo.h

Go to the documentation of this file.
00001 // summinfo.h : interface of the CSummInfo classes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "propset.h"
00014 #include <objidl.h>
00015
00016 extern const OLECHAR szSummInfo[];
00017
00018 DEFINE_GUID( FMTID_SummaryInformation, 0xF29F85E0, 0x4FF9, 0x1068,
00019   0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9 );
00020
00021 class CSummInfo
00022 {
00023 public:
00024   CSummInfo();
00025   BOOL SetTitle(LPCTSTR szTitle);
00026   CString GetTitle();
00027   BOOL SetSubject(LPCTSTR szSubject);
00028   CString GetSubject();
00029   BOOL SetAuthor(LPCTSTR szAuthor);
00030   CString GetAuthor();
00031   BOOL SetKeywords(LPCTSTR szKeywords);
00032   CString GetKeywords();
00033   BOOL SetComments(LPCTSTR szComments);
00034   CString GetComments();
00035   BOOL SetTemplate(LPCTSTR szTemplate);
00036   CString GetTemplate();
00037   BOOL SetLastAuthor(LPCTSTR szLastAuthor);
00038   CString GetLastAuthor();
00039   BOOL IncrRevNum();
00040   CString GetRevNum();
00041   void StartEditTimeCount();
00042   BOOL AddCountToEditTime();
00043   CString GetEditTime();
00044   BOOL RecordPrintDate();
00045   CString GetLastPrintDate();
00046   BOOL RecordCreateDate();
00047   CString GetCreateDate();
00048   BOOL RecordSaveDate();
00049   CString GetLastSaveDate();
00050   BOOL SetNumPages(ULONG nPages);
00051   CString GetNumPages();
00052   BOOL SetNumWords(ULONG nWords);
00053   CString GetNumWords();
00054   BOOL SetNumChars(ULONG nChars);
00055   CString GetNumChars();
00056   BOOL SetAppname(LPCTSTR szAppname);
00057   CString GetAppname();
00058   BOOL SetSecurity(ULONG nLevel);
00059   CString GetSecurity();
00060   BOOL WriteToStorage(LPSTORAGE lpRootStg);
00061   BOOL ReadFromStorage(LPSTORAGE lpRootStg);
00062 protected:
00063   CPropertySet m_propSet;
00064   CPropertySection* m_pSection;
00065   __int64 startEdit;
00066 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/stdafx.h Source File

  • controls
  • spindial

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDibLookApp Member List

This is the complete list of members for CDibLookApp, including all inherited members.
CDibLookApp() | CDibLookApp |
InitInstance() | CDibLookApp | [virtual]
OnAppAbout() | CDibLookApp |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/MainFrm.h Source File

  • vc2008fp
  • RibbonGadgets

MainFrm.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include "OutputBar.h"
00015
00016 class CMainFrame : public CFrameWndEx
00017 {
00018
00019 protected: // create from serialization only
00020   CMainFrame();
00021   DECLARE_DYNCREATE(CMainFrame)
00022
00023 // Attributes
00024 public:
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031
00032 // Implementation
00033 public:
00034   virtual ~CMainFrame();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:
00041   void CreateDocumentColors ();
00042
00043   void Add_MainPanel ();
00044   void Add_QAT ();
00045   void Add_Category1 ();
00046   void Add_Category2 ();
00047   void Add_Category3 ();
00048   void Add_Category4 ();
00049   void Add_Category5 ();
00050   void Add_Category6 ();
00051
00052   void OnLink (UINT nID);
00053
00054   int GetSliderPos (UINT nID);
00055   void SetSliderPos (int nPos, UINT nID);
00056   void SetProgressPos (int nPos, UINT nID);
00057
00058 protected:  // control bar embedded members
00059   CMFCRibbonBar     m_wndRibbonBar;
00060   CMFCRibbonApplicationButton m_MainButton;
00061   CMFCToolBarImages   m_PanelImages;
00062   CMFCRibbonStatusBar m_wndStatusBar;
00063   COutputBar        m_wndOutput;
00064
00065   // Document colors for demo:
00066   CList<COLORREF,COLORREF> m_lstMainColors;
00067   CList<COLORREF,COLORREF> m_lstAdditionalColors;
00068   CList<COLORREF,COLORREF> m_lstStandardColors;
00069
00070   BOOL m_bCheckBox1;
00071   BOOL m_bCheckBox2;
00072   BOOL m_bCheckBox3;
00073
00074   int m_nProgressValue1;
00075   int m_nProgressValue2;
00076
00077 protected:
00078   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00079   afx_msg void OnRibbonBtn7();
00080   afx_msg void OnUpdateRibbonBtn7(CCmdUI* pCmdUI);
00081   afx_msg void OnRibbonBtn8();
00082   afx_msg void OnUpdateRibbonBtn8(CCmdUI* pCmdUI);
00083   afx_msg void OnRibbonBtn9();
00084   afx_msg void OnUpdateRibbonBtn9(CCmdUI* pCmdUI);
00085   afx_msg void OnRibbonObtn2();
00086   afx_msg void OnRibbonObtn3();
00087   afx_msg void OnRibbonObtn4();
00088   afx_msg void OnRibbonObtn8();
00089   afx_msg void OnUpdateRibbonObtn8(CCmdUI* pCmdUI);
00090   afx_msg void OnRibbonObtn10();
00091   afx_msg void OnUpdateRibbonObtn10(CCmdUI* pCmdUI);
00092   afx_msg void OnTimer(UINT_PTR nIDEvent);
00093   afx_msg void OnAppLook(UINT id);
00094   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00095   afx_msg LRESULT OnRibbonCustomize (WPARAM wp, LPARAM lp);
00096   afx_msg LRESULT OnChangeRibbonCategory(WPARAM,LPARAM);
00097   afx_msg void OnToolsOptions();
00098   afx_msg void OnDummy(UINT id);
00099   afx_msg void OnFilePrint();
00100   afx_msg void OnFilePrintPreview();
00101   afx_msg void OnUpdateFilePrintPreview(CCmdUI* pCmdUI);
00102
00103   DECLARE_MESSAGE_MAP()
00104
00105   BOOL CreateRibbonBar ();
00106   void ShowOptions (int nPage);
00107
00108   UINT  m_nAppLook;
00109 };
00110
00111
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.cpp Source File

  • vc2008fp
  • DesktopAlertDemo

DesktopAlertDemoDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DesktopAlertDemo.h"
00013 #include "DesktopAlertDemoDlg.h"
00014 #include "MyAlertDlg.h"
00015 #include "MSNDlg.h"
00016 #include "MSNVisualManager.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDesktopAlertDemoDlg dialog
00026
00027 CDesktopAlertDemoDlg::CDesktopAlertDemoDlg(CWnd* pParent /*=NULL*/)
00028   : CDialogEx(CDesktopAlertDemoDlg::IDD, pParent),
00029   m_wndIcons (m_IconsSmall)
00030 {
00031   m_nVisualMngr = 2;
00032   m_nAnimation = 3;
00033   m_nAnimationSpeed = 30;
00034   m_strAnimSpeed = _T("");
00035   m_nTransparency = 200;
00036   m_strTransparency = _T("");
00037   m_bSmallCaption = TRUE;
00038   m_nPopupSource = 0;
00039   m_nIcon = 2;
00040   m_strLink = _T("Click here to open");
00041   m_strText = _T("Type your message text here");
00042   m_nAutoCloseTime = 0;
00043   m_strAutoClose = _T("");
00044   m_bAutoClose = FALSE;
00045
00046   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00047   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00048   m_ptPopup = CPoint (-1, -1);
00049 }
00050
00051 void CDesktopAlertDemoDlg::DoDataExchange(CDataExchange* pDX)
00052 {
00053   CDialogEx::DoDataExchange(pDX);
00054   DDX_Control(pDX, IDC_AUTOCLOSE_TIME, m_wndAutoCloseTime);
00055   DDX_Control(pDX, IDC_TEXT, m_wndText);
00056   DDX_Control(pDX, IDC_LINK, m_wndLink);
00057   DDX_Control(pDX, IDC_URL_LABEL, m_wndLabel3);
00058   DDX_Control(pDX, IDC_TEXT_LABEL, m_wndLabel2);
00059   DDX_Control(pDX, IDC_ICON_LABEL, m_wndLabel1);
00060   DDX_Control(pDX, IDC_ICONS, m_wndIcons);
00061   DDX_Control(pDX, IDC_TRANSP, m_wndTransparency);
00062   DDX_Control(pDX, IDC_ANIM_SPEED, m_wndANimationSpeed);
00063   DDX_CBIndex(pDX, IDC_VISUAL_MNGR, m_nVisualMngr);
00064   DDX_CBIndex(pDX, IDC_ANIMATION, m_nAnimation);
00065   DDX_Slider(pDX, IDC_ANIM_SPEED, m_nAnimationSpeed);
00066   DDX_Text(pDX, IDC_ANIM_SPEED_VAL, m_strAnimSpeed);
00067   DDX_Slider(pDX, IDC_TRANSP, m_nTransparency);
00068   DDX_Text(pDX, IDC_TRANSP_VAL, m_strTransparency);
00069   DDX_Check(pDX, IDC_SMALL_CAPTION, m_bSmallCaption);
00070   DDX_Radio(pDX, IDC_POPUP_SOURCE, m_nPopupSource);
00071   DDX_CBIndex(pDX, IDC_ICONS, m_nIcon);
00072   DDX_Text(pDX, IDC_LINK, m_strLink);
00073   DDX_Text(pDX, IDC_TEXT, m_strText);
00074   DDX_Slider(pDX, IDC_AUTOCLOSE_TIME, m_nAutoCloseTime);
00075   DDX_Text(pDX, IDC_AUTOCLOSE_VAL, m_strAutoClose);
00076   DDX_Check(pDX, IDC_AUTO_CLOSE, m_bAutoClose);
00077 }
00078
00079 BEGIN_MESSAGE_MAP(CDesktopAlertDemoDlg, CDialogEx)
00080   ON_WM_PAINT()
00081   ON_WM_QUERYDRAGICON()
00082   ON_BN_CLICKED(IDC_SHOW, OnShow)
00083   ON_CBN_SELCHANGE(IDC_VISUAL_MNGR, OnSelchangeVisualMngr)
00084   ON_CBN_SELCHANGE(IDC_ANIMATION, OnSelchangeAnimation)
00085   ON_WM_HSCROLL()
00086   ON_BN_CLICKED(IDC_SMALL_CAPTION, OnSmallCaption)
00087   ON_BN_CLICKED(IDC_POPUP_SOURCE, OnPopupSource)
00088   ON_BN_CLICKED(IDC_POPUP_SOURCE2, OnPopupSource)
00089   ON_BN_CLICKED(IDC_AUTO_CLOSE, OnAutoClose)
00090   ON_REGISTERED_MESSAGE(AFX_WM_ON_CLOSEPOPUPWINDOW, OnClosePopup)
00091 END_MESSAGE_MAP()
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CDesktopAlertDemoDlg message handlers
00095
00096 BOOL CDesktopAlertDemoDlg::OnInitDialog()
00097 {
00098   CDialogEx::OnInitDialog();
00099
00100   CMFCToolBar::AddToolBarForImageCollection (IDR_TOOLBAR1, IDB_MENUIMAGES);
00101
00102   // Set the icon for this dialog.  The framework does this automatically
00103   //  when the application's main window is not a dialog
00104   SetIcon(m_hIcon, TRUE);     // Set big icon
00105   SetIcon(m_hIcon, FALSE);    // Set small icon
00106
00107   m_wndANimationSpeed.SetRange (1, 100);
00108   m_wndTransparency.SetRange (10, 255);
00109   m_wndAutoCloseTime.SetRange (1, 5);
00110
00111   m_nVisualMngr = theApp.GetInt (_T("VisualManager"), 2);
00112   m_nAnimation = theApp.GetInt (_T("AnimationType"), 3);
00113   m_nAnimationSpeed = theApp.GetInt (_T("AnimationSpeed"), 30);
00114   m_nTransparency = theApp.GetInt (_T("Transparency"), 200);
00115   m_bSmallCaption = theApp.GetInt (_T("SmallCaption"), TRUE);
00116   m_nPopupSource = theApp.GetInt (_T("PopupSource"), 0);
00117
00118   m_strAnimSpeed.Format (_T("%d"), m_nAnimationSpeed);
00119   m_strTransparency.Format (_T("%d"), m_nTransparency);
00120
00121   m_nAutoCloseTime = theApp.GetInt (_T("AutoClose"), 3);
00122   m_bAutoClose = m_nAutoCloseTime > 0;
00123
00124   if (m_nAutoCloseTime == 0)
00125   {
00126     m_nAutoCloseTime = 3;
00127   }
00128
00129   m_strAutoClose.Format (_T("%d"), m_nAutoCloseTime);
00130
00131   m_wndAutoCloseTime.EnableWindow (m_bAutoClose);
00132
00133   m_Icons.SetImageSize (CSize (32, 32));
00134   m_Icons.Load (IDB_ICONS);
00135
00136   m_IconsSmall.SetImageSize (CSize (16, 16));
00137   m_IconsSmall.Load (IDB_ICONS_SMALL);
00138
00139   for (int i = 0; i <= m_Icons.GetCount (); i++)
00140   {
00141     CString strText;
00142
00143     if (i == 0)
00144     {
00145       strText = _T("No icon");
00146     }
00147     else
00148     {
00149       strText.Format (_T("Icon %d"), i);
00150     }
00151
00152     m_wndIcons.AddString (strText);
00153   }
00154
00155   UpdateData (FALSE);
00156
00157   OnSelchangeVisualMngr();
00158   EnableSourceControls ();
00159
00160   m_menuPopup.LoadMenu (IDR_POPUP);
00161
00162   return TRUE;  // return TRUE  unless you set the focus to a control
00163 }
00164
00165 // If you add a minimize button to your dialog, you will need the code below
00166 //  to draw the icon.  For MFC applications using the document/view model,
00167 //  this is automatically done for you by the framework.
00168
00169 void CDesktopAlertDemoDlg::OnPaint()
00170 {
00171   if (IsIconic())
00172   {
00173     CPaintDC dc(this); // device context for painting
00174
00175     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00176
00177     // Center icon in client rectangle
00178     int cxIcon = GetSystemMetrics(SM_CXICON);
00179     int cyIcon = GetSystemMetrics(SM_CYICON);
00180     CRect rect;
00181     GetClientRect(&rect);
00182     int x = (rect.Width() - cxIcon + 1) / 2;
00183     int y = (rect.Height() - cyIcon + 1) / 2;
00184
00185     // Draw the icon
00186     dc.DrawIcon(x, y, m_hIcon);
00187   }
00188   else
00189   {
00190     CDialogEx::OnPaint();
00191   }
00192 }
00193
00194 // The system calls this to obtain the cursor to display while the user drags
00195 //  the minimized window.
00196 HCURSOR CDesktopAlertDemoDlg::OnQueryDragIcon()
00197 {
00198   return (HCURSOR) m_hIcon;
00199 }
00200
00201 void CDesktopAlertDemoDlg::OnShow()
00202 {
00203   UpdateData ();
00204
00205   CMFCDesktopAlertWnd* pPopup = new CMFCDesktopAlertWnd;
00206
00207   pPopup->SetAnimationType ((CMFCPopupMenu::ANIMATION_TYPE) m_nAnimation);
00208   pPopup->SetAnimationSpeed (m_nAnimationSpeed);
00209   pPopup->SetTransparency ((BYTE)m_nTransparency);
00210   pPopup->SetSmallCaption (m_bSmallCaption);
00211   pPopup->SetAutoCloseTime (m_bAutoClose ? m_nAutoCloseTime * 1000 : 0);
00212
00213   if (m_nPopupSource == 0)
00214   {
00215     if (m_nVisualMngr == 5) // MSN-style
00216     {
00217       pPopup->Create (this, IDD_DIALOG2, NULL,
00218         m_ptPopup, RUNTIME_CLASS (CMSNDlg));
00219     }
00220     else
00221     {
00222       pPopup->Create (this, IDD_DIALOG1,
00223         m_menuPopup.GetSubMenu (0)->GetSafeHmenu (),
00224         m_ptPopup, RUNTIME_CLASS (CMyPopupDlg));
00225     }
00226   }
00227   else
00228   {
00229     // Create indirect:
00230     CMFCDesktopAlertWndInfo params;
00231
00232     if (m_nIcon > 0)
00233     {
00234       params.m_hIcon = m_Icons.ExtractIcon (m_nIcon - 1);
00235     }
00236     if(m_strText.IsEmpty() && m_strLink.IsEmpty())
00237     {
00238       m_strText = _T(" ");
00239     }
00240     params.m_strText = m_strText;
00241     params.m_strURL = m_strLink;
00242     params.m_nURLCmdID = 101;
00243
00244     pPopup->Create (this, params, NULL, m_ptPopup);
00245   }
00246
00247   HICON hIcon = (HICON) ::LoadImage (::AfxGetResourceHandle (),
00248     MAKEINTRESOURCE (IDR_MAINFRAME),
00249         IMAGE_ICON, ::GetSystemMetrics (SM_CXSMICON), ::GetSystemMetrics (SM_CYSMICON), 0);
00250
00251   pPopup->SetIcon (hIcon, FALSE);
00252   pPopup->SetWindowText (_T("Message"));
00253
00254   EnableControls (FALSE);
00255 }
00256
00257 LRESULT CDesktopAlertDemoDlg::OnClosePopup(WPARAM,LPARAM lp)
00258 {
00259   CMFCDesktopAlertWnd* pPopup = (CMFCDesktopAlertWnd*) lp;
00260   ASSERT_VALID (pPopup);
00261
00262   m_ptPopup = pPopup->GetLastPos ();
00263
00264   EnableControls ();
00265   return 0;
00266 }
00267
00268 void CDesktopAlertDemoDlg::EnableControls (BOOL bEnable)
00269 {
00270   CWnd* pWndChild = GetWindow (GW_CHILD);
00271
00272   while (pWndChild != NULL)
00273   {
00274     ASSERT_VALID (pWndChild);
00275     pWndChild->EnableWindow (bEnable);
00276     pWndChild = pWndChild->GetNextWindow ();
00277   }
00278
00279   if (bEnable)
00280   {
00281     EnableSourceControls ();
00282   }
00283 }
00284
00285 void CDesktopAlertDemoDlg::OnSelchangeVisualMngr()
00286 {
00287   int nPrevVisualMngr = m_nVisualMngr;
00288
00289   UpdateData ();
00290
00291   switch (m_nVisualMngr)
00292   {
00293   case 0:
00294     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00295     break;
00296
00297   case 1:
00298     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00299     break;
00300
00301   case 2:
00302     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00303     break;
00304
00305   case 3:
00306     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00307     break;
00308
00309   case 4:
00310     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00311     break;
00312
00313   case 5:
00314     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMSNVisualManager));
00315     break;
00316
00317   case 6:
00318     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00319     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00320     break;
00321
00322   case 7:
00323     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00324     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00325     break;
00326
00327   case 8:
00328     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00329     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00330     break;
00331
00332   case 9:
00333     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00334     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00335     break;
00336   }
00337
00338   if (nPrevVisualMngr == 5 && !m_bSmallCaption)
00339   {
00340     m_bSmallCaption = TRUE;
00341
00342     UpdateData (FALSE);
00343     OnSmallCaption();
00344   }
00345
00346   if (m_nVisualMngr == 5 && m_bSmallCaption)
00347   {
00348     m_bSmallCaption = FALSE;
00349
00350     UpdateData (FALSE);
00351     OnSmallCaption();
00352   }
00353
00354   theApp.WriteInt (_T("VisualManager"), m_nVisualMngr);
00355 }
00356
00357 void CDesktopAlertDemoDlg::OnSelchangeAnimation()
00358 {
00359   UpdateData ();
00360   theApp.WriteInt (_T("AnimationType"), m_nAnimation);
00361 }
00362
00363 void CDesktopAlertDemoDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
00364 {
00365   CDialogEx::OnHScroll(nSBCode, nPos, pScrollBar);
00366
00367   UpdateData ();
00368
00369   theApp.WriteInt (_T("AnimationSpeed"), m_nAnimationSpeed);
00370   m_strAnimSpeed.Format (_T("%d"), m_nAnimationSpeed);
00371
00372   theApp.WriteInt (_T("Transparency"), m_nTransparency);
00373   m_strTransparency.Format (_T("%d"), m_nTransparency);
00374
00375   theApp.WriteInt (_T("AutoClose"), m_bAutoClose ? m_nAutoCloseTime : 0);
00376   m_strAutoClose.Format (_T("%d"), m_nAutoCloseTime);
00377
00378   UpdateData (FALSE);
00379 }
00380
00381 void CDesktopAlertDemoDlg::OnSmallCaption()
00382 {
00383   UpdateData ();
00384   theApp.WriteInt (_T("SmallCaption"), m_bSmallCaption);
00385 }
00386
00387 void CDesktopAlertDemoDlg::OnPopupSource()
00388 {
00389   UpdateData ();
00390   theApp.WriteInt (_T("PopupSource"), m_nPopupSource);
00391
00392   EnableSourceControls ();
00393 }
00394
00395 void CDesktopAlertDemoDlg::EnableSourceControls ()
00396 {
00397   BOOL bEnable = m_nPopupSource != 0;
00398
00399   m_wndText.EnableWindow (bEnable);
00400   m_wndLink.EnableWindow (bEnable);
00401   m_wndLabel3.EnableWindow (bEnable);
00402   m_wndLabel2.EnableWindow (bEnable);
00403   m_wndLabel1.EnableWindow (bEnable);
00404   m_wndIcons.EnableWindow (bEnable);
00405 }
00406
00407 void CDesktopAlertDemoDlg::OnAutoClose()
00408 {
00409   UpdateData ();
00410
00411   m_wndAutoCloseTime.EnableWindow (m_bAutoClose);
00412   theApp.WriteInt (_T("AutoClose"), m_bAutoClose ? m_nAutoCloseTime : 0);
00413 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/stdafx.cpp Source File

  • ole
  • drawcli

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifierDlg.cpp Source File

  • controls
  • netaddr

NetAddrVerifierDlg.cpp

Go to the documentation of this file.
00001 // NetAddrVerifierDlg.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005 #include "NetAddrVerifier.h"
00006 #include "NetAddrVerifierDlg.h"
00007
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #endif
00011
00012
00013 // CNetAddrVerifierDlg dialog
00014
00015
00016 CNetAddrVerifierDlg::CNetAddrVerifierDlg(CWnd* pParent /*=NULL*/)
00017   : CDialog(CNetAddrVerifierDlg::IDD, pParent),
00018   m_pValidateBtn(NULL), m_pNetAddr(NULL), m_pEdit(NULL), m_pButton(NULL)
00019 {
00020   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00021   OSVERSIONINFO vi;
00022   ZeroMemory(&vi, sizeof(OSVERSIONINFO));
00023   vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
00024   ::GetVersionEx(&vi);
00025
00026   // check if we are running under Vista
00027   if (vi.dwMajorVersion >= 6)
00028   {
00029     m_fVista = TRUE;
00030   }
00031   else
00032   {
00033     m_fVista = FALSE;
00034   }
00035 }
00036
00037 CNetAddrVerifierDlg::~CNetAddrVerifierDlg()
00038 {
00039   delete m_pNetAddr;
00040   delete m_pValidateBtn;
00041   delete m_pEdit;
00042   delete m_pButton;
00043 }
00044
00045 void CNetAddrVerifierDlg::DoDataExchange(CDataExchange* pDX)
00046 {
00047   CDialog::DoDataExchange(pDX);
00048   DDX_Control(pDX, IDC_LIST1, m_listCtrl);
00049 }
00050
00051 BEGIN_MESSAGE_MAP(CNetAddrVerifierDlg, CDialog)
00052   ON_WM_PAINT()
00053   ON_WM_QUERYDRAGICON()
00054   //}}AFX_MSG_MAP
00055   ON_BN_CLICKED(IDC_ENUM_BUTTON, &CNetAddrVerifierDlg::OnBnClickedButton1)
00056   // Message map
00057   ON_BN_CLICKED(IDC_VERIFY_BUTTON, &CNetAddrVerifierDlg::OnVerifyAll)
00058   ON_COMMAND(ID_SPLITBUTTONMENU_VALIDATEALL, &CNetAddrVerifierDlg::OnVerifyAll)
00059   ON_COMMAND(ID_SPLITBUTTONMENU_VALIDATEIPV4, &CNetAddrVerifierDlg::OnVerifyIPv4)
00060   ON_COMMAND(ID_SPLITBUTTONMENU_VALIDATEIPV6, &CNetAddrVerifierDlg::OnVerifyIPv6)
00061   ON_COMMAND(ID_SPLITBUTTONMENU_VALIDATENAMED, &CNetAddrVerifierDlg::OnVerifyNamed)
00062 END_MESSAGE_MAP()
00063
00064
00065 // CNetAddrVerifierDlg message handlers
00066
00067 BOOL CNetAddrVerifierDlg::OnInitDialog()
00068 {
00069   CDialog::OnInitDialog();
00070
00071   // Set the icon for this dialog.  The framework does this automatically
00072   //  when the application's main window is not a dialog
00073   SetIcon(m_hIcon, TRUE);     // Set big icon
00074   SetIcon(m_hIcon, FALSE);    // Set small icon
00075
00076   // Create controls dynamically according to OS version
00077   DWORD dwStyle = WS_TABSTOP | WS_VISIBLE;
00078   DWORD dwExStyle = WS_EX_CLIENTEDGE;
00079   if (m_fVista)
00080   {
00081     // If we are running under Vista, create a CNetAddressCtrl and CSplitButton control
00082     m_pNetAddr = new CNetAddressCtrl();
00083     m_pValidateBtn = new CSplitButton();
00084     DWORD dwStyle = WS_TABSTOP | WS_VISIBLE;
00085     DWORD dwExStyle = WS_EX_CLIENTEDGE;
00086     BOOL nRet = m_pNetAddr->CreateEx(dwExStyle,
00087       dwStyle | WS_BORDER,
00088       CRect(10,10,250,40),
00089       this,
00090       IDC_ADDRESS);
00091     m_pNetAddr->SetFont(GetFont());
00092     m_pNetAddr->SetCueBanner(_T("Input address then validate"));
00093     nRet = m_pValidateBtn->Create(_T("Validate"),
00094       dwStyle,
00095       CRect(10, 50, 160, 90),
00096       this,
00097       IDC_VERIFY_BUTTON);
00098     // Attach submenu to CSplitButton
00099     m_pValidateBtn->SetDropDownMenu(IDR_MENU1, 0);
00100     m_pValidateBtn->SetFont(GetFont());
00101   }
00102   else
00103   {
00104     // If we are running under XP, create a CEdit and CButton control
00105     m_pEdit = new CEdit();
00106     m_pEdit->Create(dwStyle | WS_BORDER,
00107       CRect(10, 10, 250, 40),
00108       this,
00109       IDC_ADDRESS);
00110     m_pEdit->SetFont(GetFont());
00111     m_pEdit->SetCueBanner(_T("Input address then validate"));
00112     m_pButton = new CButton();
00113     m_pButton->Create(_T("Validate"),
00114       dwStyle | BS_TEXT | BS_PUSHBUTTON,
00115       CRect(10, 50, 160, 90),
00116       this,
00117       IDC_VERIFY_BUTTON);
00118     m_pButton->SetFont(GetFont());
00119   }
00120   // Initialize the list control
00121   CRect rect;
00122   m_listCtrl.GetClientRect(rect);
00123   m_listCtrl.InsertColumn(0, _T("Shares"), 0, rect.Width());
00124
00125   return TRUE;  // return TRUE  unless you set the focus to a control
00126 }
00127
00128 // If you add a minimize button to your dialog, you will need the code below
00129 //  to draw the icon.  For MFC applications using the document/view model,
00130 //  this is automatically done for you by the framework.
00131
00132 void CNetAddrVerifierDlg::OnPaint()
00133 {
00134   if (IsIconic())
00135   {
00136     CPaintDC dc(this); // device context for painting
00137
00138     SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
00139
00140     // Center icon in client rectangle
00141     int cxIcon = GetSystemMetrics(SM_CXICON);
00142     int cyIcon = GetSystemMetrics(SM_CYICON);
00143     CRect rect;
00144     GetClientRect(&rect);
00145     int x = (rect.Width() - cxIcon + 1) / 2;
00146     int y = (rect.Height() - cyIcon + 1) / 2;
00147
00148     // Draw the icon
00149     dc.DrawIcon(x, y, m_hIcon);
00150   }
00151   else
00152   {
00153     CDialog::OnPaint();
00154   }
00155 }
00156
00157 DWORD CNetAddrVerifierDlg::ConstructAddrMask(AddressKind kind)
00158 {
00159   DWORD dwAddrMask = 0;
00160   switch(kind) {
00161     case AllKinds:
00162       dwAddrMask |= NET_STRING_ANY_ADDRESS;
00163       dwAddrMask |= NET_STRING_ANY_SERVICE;
00164       dwAddrMask |= NET_STRING_IP_NETWORK;
00165       break;
00166
00167     case IPv4:
00168       dwAddrMask |= NET_STRING_IPV4_ADDRESS;
00169       dwAddrMask |= NET_STRING_IPV4_SERVICE;
00170       dwAddrMask |= NET_STRING_IPV4_NETWORK;
00171       break;
00172
00173     case IPv6:
00174       dwAddrMask |= NET_STRING_IPV6_ADDRESS;
00175       dwAddrMask |= NET_STRING_IPV6_SERVICE;
00176       dwAddrMask |= NET_STRING_IPV6_NETWORK;
00177       break;
00178
00179     case Named:
00180       dwAddrMask |= NET_STRING_NAMED_ADDRESS;
00181       dwAddrMask |= NET_STRING_NAMED_SERVICE;
00182       break;
00183   }
00184   return dwAddrMask;
00185 }
00186
00187 std::wstring CNetAddrVerifierDlg::Ipv4AddrToString(IN_ADDR &addr)
00188 {
00189   std::wstringstream msg;
00190   msg <<  addr.S_un.S_un_b.s_b1 << "." <<
00191       addr.S_un.S_un_b.s_b2 << "." <<
00192       addr.S_un.S_un_b.s_b3 << "." <<
00193       addr.S_un.S_un_b.s_b4;
00194   return msg.str();
00195 }
00196
00197 std::wstring CNetAddrVerifierDlg::Ipv6AddrToString(IN6_ADDR &addr)
00198 {
00199   // need to print out the address by bytes (in hex) for the correct order
00200   std::wstringstream msg;
00201   msg.flags(std::ios::hex);
00202   msg.fill('0');
00203   msg << std::setw(2) << addr.u.Byte[0];
00204   msg << std::setw(2) << addr.u.Byte[1];
00205   for (int i = 1; i < 8; i++)
00206   {
00207     msg << "::" << std::setw(2) << addr.u.Byte[i * 2];
00208     msg << std::setw(2) << addr.u.Byte[i * 2 + 1];
00209   }
00210   return msg.str();
00211 }
00212
00213 BOOL CNetAddrVerifierDlg::Verify(AddressKind kind)
00214 {
00215   // Update member variables with dialog data
00216   UpdateData(TRUE);
00217   if (m_fVista == TRUE)
00218   {
00219     // Create the structs necessary to store the address
00220     NET_ADDRESS_INFO nfo;
00221     NC_ADDRESS addr;
00222     addr.pAddrInfo = &nfo;
00223
00224     // Construct and set the proper mask from the user's settings
00225     m_pNetAddr->SetAllowType(ConstructAddrMask(kind));
00226
00227     // Verify the address entered in the form
00228     HRESULT res = m_pNetAddr->GetAddress(&addr);
00229
00230     // If the verification failed, show the error tooltip
00231     if (res != S_OK)
00232     {
00233       m_strParsedAddr = "";
00234       m_pNetAddr->DisplayErrorTip();
00235     }
00236     else
00237     {
00238       std::wstringstream msg;
00239       switch(addr.pAddrInfo->Format)
00240       {
00241         case NET_ADDRESS_DNS_NAME:
00242           msg << addr.pAddrInfo->NamedAddress.Address;
00243           break;
00244         case NET_ADDRESS_IPV4:
00245           msg << Ipv4AddrToString(
00246             addr.pAddrInfo->Ipv4Address.sin_addr);
00247           break;
00248         case NET_ADDRESS_IPV6:
00249           msg << Ipv6AddrToString(
00250             addr.pAddrInfo->Ipv6Address.sin6_addr);
00251           break;
00252       }
00253       m_strParsedAddr = msg.str().c_str();
00254       m_pNetAddr->ShowBalloonTip(_T("Verification succeeded!"), m_strParsedAddr);
00255       return TRUE;
00256     }
00257   }
00258   else // Running on XP
00259   {
00260     CString str;
00261     // Get string from EDIT contrl
00262     GetDlgItemTextW(IDC_ADDRESS, str.GetBufferSetLength(256), 256);
00263     str.ReleaseBuffer();
00264     if (!str.IsEmpty()) // Validate Address
00265     {
00266       this->m_strParsedAddr = str;
00267       m_pEdit->ShowBalloonTip(_T("Verification succeeded!"), m_strParsedAddr);
00268       return TRUE;
00269     }
00270     else
00271     {
00272       // Show a similar balloon tip as NetAddressControl
00273       m_pEdit->ShowBalloonTip(_T(""), _T("The network address entered is invalid"));
00274     }
00275   }
00276   return FALSE;
00277 }
00278
00279 void CNetAddrVerifierDlg::Enum()
00280 {
00281   m_listCtrl.DeleteAllItems();
00282   PSHARE_INFO_0 BufPtr, p;
00283   NET_API_STATUS res;
00284   DWORD er=0, tr=0, resume=0, i;
00285   do // begin do
00286   {
00287     res = NetShareEnum(m_strParsedAddr.GetBuffer(), 0, (LPBYTE *) &BufPtr, -1, &er, &tr, &resume);
00288     // If the call succeeds,
00289     if(res == ERROR_SUCCESS || res == ERROR_MORE_DATA)
00290     {
00291       p = BufPtr;
00292       // Loop through the entries;
00293       //  print retrieved data.
00294       for(i=1;i<=er;i++)
00295       {
00296         CString str(p->shi0_netname);
00297         m_listCtrl.InsertItem(0, str);
00298         p++;
00299       }
00300       // Free the allocated buffer.
00301       NetApiBufferFree(BufPtr);
00302     }
00303     else
00304     {
00305       AfxMessageBox(_T("Cannot connect to server"), MB_OK | MB_ICONEXCLAMATION);
00306     }
00307   }
00308   while (res==ERROR_MORE_DATA);// Continue to call NetShareEnum while there are more entries
00309 }
00310
00311 // The system calls this function to obtain the cursor to display while the user drags
00312 //  the minimized window.
00313 HCURSOR CNetAddrVerifierDlg::OnQueryDragIcon()
00314 {
00315   return static_cast<HCURSOR>(m_hIcon);
00316 }
00317
00318
00319 void CNetAddrVerifierDlg::OnBnClickedButton1()
00320 {
00321   // Enum Share
00322   if (Verify(AllKinds) == TRUE)
00323     Enum();
00324 }
00325
00326 void CNetAddrVerifierDlg::OnVerifyAll()
00327 {
00328   Verify(AllKinds);
00329 }
00330
00331 void CNetAddrVerifierDlg::OnVerifyIPv4()
00332 {
00333   // Verify IPv4 Address
00334   Verify(IPv4);
00335 }
00336
00337 void CNetAddrVerifierDlg::OnVerifyIPv6()
00338 {
00339   // Verify IPv6 Address
00340   Verify(IPv6);
00341 }
00342
00343 void CNetAddrVerifierDlg::OnVerifyNamed()
00344 {
00345   // Verify DNS Address
00346   Verify(Named);
00347 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/MainFrm.cpp Source File

  • vc2008fp
  • IEDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013 #include "IEDemoDoc.h"
00014 #include "IEDemoView.h"
00015 #include "MainFrm.h"
00016 #include "LinkButton.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00030   //{{AFX_MSG_MAP(CMainFrame)
00031   ON_WM_CREATE()
00032   ON_COMMAND(ID_LINK_1, OnLink1)
00033   ON_COMMAND(ID_VIEW_ADDRESS_BAR, OnViewAddressBar)
00034   ON_UPDATE_COMMAND_UI(ID_VIEW_ADDRESS_BAR, OnUpdateViewAddressBar)
00035   ON_COMMAND(ID_VIEW_LINKS_BAR, OnViewLinksBar)
00036   ON_UPDATE_COMMAND_UI(ID_VIEW_LINKS_BAR, OnUpdateViewLinksBar)
00037   ON_COMMAND(ID_VIEW_TEXTLABELS, OnViewTextlabels)
00038   ON_UPDATE_COMMAND_UI(ID_VIEW_TEXTLABELS, OnUpdateViewTextlabels)
00039   ON_COMMAND(ID_VIEW_EXPLORERBAR, OnViewExplorerbar)
00040   ON_UPDATE_COMMAND_UI(ID_VIEW_EXPLORERBAR, OnUpdateViewExplorerbar)
00041   //}}AFX_MSG_MAP
00042   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00043   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00044   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00045   ON_REGISTERED_MESSAGE(AFX_WM_CUSTOMIZEHELP, OnHelpCustomizeToolbars)
00046   ON_CBN_SELENDOK(AFX_IDW_TOOLBAR + 1,OnNewAddress)
00047   ON_COMMAND_RANGE(FIRST_FAVORITE_COMMAND, LAST_FAVORITE_COMMAND, OnFavorite)
00048   ON_COMMAND_RANGE(FIRST_HISTORY_COMMAND, FIRST_HISTORY_COMMAND + HISTORY_LEN - 1, OnHistory)
00049   ON_COMMAND(IDOK, OnNewAddressEnter)
00050   ON_COMMAND(ID_LINK_MSDN, OnLinkMSDN)
00051   ON_COMMAND(ID_LINK_MICROSOFT, OnLinkMicrosoft)
00052   ON_COMMAND(ID_LINK_VISUALCPP, OnLinkVisualCPP)
00053 END_MESSAGE_MAP()
00054
00055 static UINT indicators[] =
00056 {
00057   ID_INDICATOR_ICON,    // status icon
00058   ID_SEPARATOR,           // status line indicator
00059   ID_INDICATOR_PROGRESS,  // progress bar
00060   ID_INDICATOR_CAPS,
00061   ID_INDICATOR_NUM,
00062   ID_INDICATOR_SCRL,
00063 };
00064
00065 const int nStatusIcon = 0;
00066 const int nStatusInfo = 1;
00067 const int nStatusProgress = 2;
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CMainFrame construction/destruction
00071
00072 CMainFrame::CMainFrame()
00073 {
00074   m_bMainToolbarMenu = FALSE;
00075 }
00076
00077 CMainFrame::~CMainFrame()
00078 {
00079 }
00080
00081 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00082 {
00083   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00084     return -1;
00085
00086   CMFCToolBar::EnableQuickCustomization ();
00087   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00088
00089   ((CMFCVisualManagerWindows*)CMFCVisualManager::GetInstance ())->SetOfficeStyleMenus ();
00090
00091   //---------------------------------
00092   // Set toolbar and menu image size:
00093   //---------------------------------
00094   CMFCToolBar::SetSizes (CSize (36, 30), CSize (23, 23));
00095   CMFCToolBar::SetMenuSizes (CSize (22, 22), CSize (16, 16));
00096
00097   //--------------------
00098   // Create the menubar:
00099   //--------------------
00100   if (!m_wndMenuBar.CreateEx (this, TBSTYLE_TRANSPARENT))
00101   {
00102     TRACE0("Failed to create menubar\n");
00103     return -1;      // fail to create
00104   }
00105
00106   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00107   m_wndMenuBar.EnableCustomizeButton (TRUE, -1, _T(""));
00108
00109   //------------------------------------
00110   // Remove menubar gripper and borders:
00111   //------------------------------------
00112   m_wndMenuBar.SetPaneStyle (m_wndMenuBar.GetPaneStyle() &
00113     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00114
00115   // Detect color depth. 256 color toolbars can be used in the
00116   // high or true color modes only (bits per pixel is > 8):
00117   CClientDC dc (this);
00118   m_bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 16;
00119
00120   UINT uiToolbarHotID = m_bIsHighColor ? IDB_HOTTOOLBAR : 0;
00121   UINT uiToolbarColdID = m_bIsHighColor ? IDB_COLDTOOLBAR : 0;
00122   UINT uiMenuID = m_bIsHighColor ? IDB_MENU_IMAGES : IDB_MENU_IMAGES_16;
00123
00124   if (!m_wndToolBar.CreateEx (this, TBSTYLE_TRANSPARENT) ||
00125     !m_wndToolBar.LoadToolBar (IDR_MAINFRAME, uiToolbarColdID, uiMenuID,
00126       FALSE /* Not locked */, 0, 0, uiToolbarHotID))
00127   {
00128     TRACE0("Failed to create toolbar\n");
00129     return -1;      // fail to create
00130   }
00131
00132   m_wndToolBar.SetWindowText (_T("Standard"));
00133   m_wndToolBar.SetBorders ();
00134
00135   //------------------------------------
00136   // Remove toolbar gripper and borders:
00137   //------------------------------------
00138   m_wndToolBar.SetPaneStyle (m_wndToolBar.GetPaneStyle() &
00139     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00140
00141   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00142
00143   BOOL bValidString;
00144
00145   //----------------------------------------
00146   // Create a combo box for the address bar:
00147   //----------------------------------------
00148   CString strAddressLabel;
00149   bValidString = strAddressLabel.LoadString(IDS_ADDRESS);
00150
00151   if (!m_wndAddress.Create (CBS_DROPDOWN | WS_CHILD, CRect(0, 0, 200, 120), this, AFX_IDW_TOOLBAR + 1))
00152   {
00153     TRACE0("Failed to create combobox\n");
00154     return -1;      // fail to create
00155   }
00156
00157   //------------------
00158   // Create links bar:
00159   //------------------
00160   CString strLinksLabel;
00161   bValidString = strLinksLabel.LoadString (IDS_LINKS);
00162
00163   if (!m_wndLinksBar.CreateEx (this, TBSTYLE_TRANSPARENT,
00164     AFX_DEFAULT_TOOLBAR_STYLE, CRect(0, 0, 0, 0), AFX_IDW_TOOLBAR + 3))
00165   {
00166     TRACE0("Failed to create links bar\n");
00167   }
00168
00169   m_wndLinksBar.EnableCustomizeButton (TRUE, -1, _T(""));
00170
00171   m_wndLinksBar.SetWindowText (strLinksLabel);
00172   m_wndLinksBar.SetPaneStyle (m_wndLinksBar.GetPaneStyle() &
00173     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00174
00175   //--------------
00176   // Create rebar:
00177   //--------------
00178   if (!m_wndReBar.Create(this) ||
00179     !m_wndReBar.AddBar(&m_wndMenuBar) ||
00180     !m_wndReBar.AddBar(&m_wndToolBar, NULL, NULL,
00181         RBBS_GRIPPERALWAYS | RBBS_FIXEDBMP | RBBS_BREAK) ||
00182     !m_wndReBar.AddBar(&m_wndAddress, strAddressLabel, NULL,
00183         RBBS_GRIPPERALWAYS | RBBS_FIXEDBMP | RBBS_BREAK) ||
00184     !m_wndReBar.AddBar(&m_wndLinksBar, strLinksLabel, NULL,
00185         RBBS_GRIPPERALWAYS | RBBS_FIXEDBMP | RBBS_BREAK))
00186   {
00187     TRACE0("Failed to create rebar\n");
00188     return -1;      // fail to create
00189   }
00190
00191   m_wndMenuBar.AdjustLayout ();
00192   m_wndToolBar.AdjustLayout ();
00193   m_wndLinksBar.AdjustLayout ();
00194
00195   //--------------------------------------------------------------
00196   // Set up min/max sizes and ideal sizes for pieces of the rebar:
00197   //--------------------------------------------------------------
00198   REBARBANDINFO rbbi;
00199
00200   CRect rectToolBar;
00201   m_wndToolBar.GetItemRect(0, &rectToolBar);
00202
00203   rbbi.cbSize = sizeof(rbbi);
00204   rbbi.fMask = RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_SIZE;
00205   rbbi.cxMinChild = rectToolBar.Width();
00206   rbbi.cyMinChild = rectToolBar.Height();
00207   rbbi.cx = rbbi.cxIdeal = rectToolBar.Width() * m_wndToolBar.GetCount ();
00208   m_wndReBar.GetReBarCtrl().SetBandInfo (1, &rbbi);
00209   rbbi.cxMinChild = 0;
00210
00211   CRect rectAddress;
00212   m_wndAddress.GetEditCtrl()->GetWindowRect(&rectAddress);
00213
00214   rbbi.fMask = RBBIM_CHILDSIZE | RBBIM_IDEALSIZE;
00215   rbbi.cyMinChild = rectAddress.Height() + 10;
00216   rbbi.cxIdeal = 200;
00217   m_wndReBar.GetReBarCtrl().SetBandInfo (3, &rbbi);
00218
00219   EnableDocking(CBRS_ALIGN_ANY);
00220   m_wndReBar.EnableDocking (CBRS_TOP);
00221   DockPane (&m_wndReBar);
00222
00223   //-------------------
00224   // Create status bar:
00225   //-------------------
00226   if (!m_wndStatusBar.Create(this) ||
00227     !m_wndStatusBar.SetIndicators(indicators,
00228       sizeof(indicators)/sizeof(UINT)))
00229   {
00230     TRACE0("Failed to create status bar\n");
00231     return -1;      // fail to create
00232   }
00233
00234   //------------------------------
00235   // First pane - image/animation:
00236   //------------------------------
00237   m_wndStatusBar.SetPaneStyle (nStatusIcon, SBPS_NOBORDERS);
00238
00239   m_bmpStatus.LoadBitmap (IDB_STATUS_READY);
00240   m_imlStatusAnimation.Create (IDB_STATUS_ANIMATION, 11, 0, RGB (255, 0, 255));
00241
00242   m_wndStatusBar.SetPaneIcon (nStatusIcon, m_bmpStatus);
00243   m_wndStatusBar.SetPaneText (nStatusIcon, NULL);
00244   m_wndStatusBar.SetPaneWidth (nStatusIcon, 0);
00245
00246   m_wndStatusBar.SetPaneStyle (nStatusInfo, SBPS_STRETCH | SBPS_NOBORDERS);
00247   m_wndStatusBar.SetPaneWidth (nStatusProgress, 80);
00248
00249   CString strMainToolbarTitle;
00250   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00251   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00252   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() |
00253     CBRS_TOOLTIPS | CBRS_FLYBY);
00254   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
00255     CBRS_TOOLTIPS | CBRS_FLYBY);
00256   m_wndLinksBar.SetPaneStyle(m_wndLinksBar.GetPaneStyle() |
00257     CBRS_TOOLTIPS | CBRS_FLYBY);
00258
00259   //-----------------------
00260   // Set up Favorites menu:
00261   //-----------------------
00262   VERIFY (theApp.m_Favorites.CreateMenu (m_menuFavotites));
00263
00264   //---------------------
00265   // Create explorer bar:
00266   //---------------------
00267   if (!m_wndExplorerBar.Create (_T("Favorites"),this, CRect (0, 0, 200, 200),
00268     TRUE,
00269     ID_VIEW_EXPLORERBAR,
00270     WS_CHILD | WS_VISIBLE | CBRS_LEFT | CBRS_HIDE_INPLACE | WS_CAPTION,
00271     AFX_CBRS_OUTLOOK_TABS,
00272     AFX_CBRS_CLOSE | AFX_CBRS_RESIZE))
00273   {
00274     TRACE0("Failed to create explorerbar\n");
00275     return FALSE;   // fail to create
00276   }
00277
00278   m_wndExplorerBar.EnableDocking (CBRS_ALIGN_LEFT | CBRS_ALIGN_RIGHT);
00279   DockPane(&m_wndExplorerBar);
00280
00281   //------------------------------------------------------
00282   // Add additional images to the global image collection:
00283   //------------------------------------------------------
00284   CMFCToolBar::AddToolBarForImageCollection (
00285     IDR_TOOLBAR_IMAGE_COLLECTION,         // Toolbar (need for map "Command - Image")
00286     m_bIsHighColor ? IDB_IMAGE_COLLECTION : 0,    // "Hot" images
00287     m_bIsHighColor ? IDB_IMAGE_COLLECTION : 0,    // "Cold" images
00288     m_bIsHighColor ? IDB_IMAGE_COLLECTION_SMALL : 0); // Menu images
00289   return 0;
00290 }
00291
00292 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00293 {
00294   if( !CFrameWnd::PreCreateWindow(cs) )
00295     return FALSE;
00296   // TODO: Modify the Window class or styles here by modifying
00297   //  the CREATESTRUCT cs
00298
00299   return TRUE;
00300 }
00301
00302 /////////////////////////////////////////////////////////////////////////////
00303 // CMainFrame diagnostics
00304
00305 #ifdef _DEBUG
00306 void CMainFrame::AssertValid() const
00307 {
00308   CFrameWnd::AssertValid();
00309 }
00310
00311 void CMainFrame::Dump(CDumpContext& dc) const
00312 {
00313   CFrameWnd::Dump(dc);
00314 }
00315
00316 #endif //_DEBUG
00317
00318 /////////////////////////////////////////////////////////////////////////////
00319 // CMainFrame message handlers
00320
00321
00322 void CMainFrame::OnViewCustomize()
00323 {
00324   //------------------------------------
00325   // Create a customize toolbars dialog:
00326   //------------------------------------
00327   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00328     TRUE /* Automatic menus scaning */,
00329     AFX_CUSTOMIZE_TEXT_LABELS | AFX_CUSTOMIZE_NOTOOLS | AFX_CUSTOMIZE_NO_LARGE_ICONS);
00330
00331   CMenu menuFavorites;
00332   menuFavorites.LoadMenu (IDR_FAVORITES_POPUP);
00333
00334   BOOL bValidString;
00335   CString strFavorites;
00336   bValidString = strFavorites.LoadString (IDS_FAVORITES);
00337
00338   pDlgCust->ReplaceButton (ID_FAVORITS_DUMMY,
00339     CMFCToolBarMenuButton ((UINT)-1, menuFavorites, -1, strFavorites));
00340   pDlgCust->Create ();
00341 }
00342
00343 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM wp,LPARAM lp)
00344 {
00345   CMFCToolBar* pToolBar = DYNAMIC_DOWNCAST (CMFCToolBar,
00346                       CWnd::FromHandlePermanent ((HWND) wp));
00347   m_bMainToolbarMenu = (
00348     pToolBar != NULL && pToolBar->GetDlgCtrlID () == AFX_IDW_TOOLBAR);
00349
00350   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00351
00352   CMenu menu;
00353   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00354
00355   CMenu* pPopup = menu.GetSubMenu(0);
00356   ASSERT(pPopup != NULL);
00357
00358   if (pPopup)
00359   {
00360     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00361     if (pPopupMenu)
00362     {
00363       pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00364     }
00365   }
00366
00367   return 0;
00368 }
00369
00370 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
00371 {
00372   UINT uiToolBarId = (UINT) wp;
00373   if (uiToolBarId == IDR_MAINFRAME)
00374   {
00375     CString str;
00376
00377     // Replace "Back" and "Forward" buttons by the menu buttons
00378     // with the history lists:
00379
00380     CMenu menuHistory;
00381     menuHistory.LoadMenu (IDR_HISTORY_POPUP);
00382
00383     BOOL bValidString;
00384     bValidString = str.LoadString (IDS_BACK);
00385     m_wndToolBar.ReplaceButton (ID_GO_BACK,
00386       CMFCToolBarMenuButton (ID_GO_BACK, menuHistory,
00387             GetCmdMgr ()->GetCmdImage (ID_GO_BACK), str));
00388
00389     bValidString = str.LoadString (IDS_FORWARD);
00390     m_wndToolBar.ReplaceButton (ID_GO_FORWARD,
00391       CMFCToolBarMenuButton (ID_GO_FORWARD, menuHistory,
00392             GetCmdMgr ()->GetCmdImage (ID_GO_FORWARD), str));
00393
00394     // Setup "Favorites" menu button:
00395     CMenu menuFavorites;
00396     menuFavorites.LoadMenu (IDR_FAVORITES_POPUP);
00397
00398     bValidString = str.LoadString (IDS_FAVORITES);
00399     m_wndToolBar.ReplaceButton (ID_FAVORITS_DUMMY,
00400       CMFCToolBarMenuButton ((UINT)-1, menuFavorites,
00401             GetCmdMgr ()->GetCmdImage (ID_FAVORITS_DUMMY), str));
00402
00403     // Setup "Fonts" menu button:
00404     CMenu menuFonts;
00405     menuFonts.LoadMenu (IDR_FONT_POPUP);
00406
00407     bValidString = str.LoadString(IDS_FONT);
00408     m_wndToolBar.ReplaceButton (ID_FONT_DROPDOWN,
00409       CMFCToolBarMenuButton ((UINT)-1, *menuFonts.GetSubMenu (0),
00410             GetCmdMgr ()->GetCmdImage (ID_FONT_DROPDOWN), str));
00411     // Some buttons will appear with text by default:
00412
00413     m_wndToolBar.SetToolBarBtnText (m_wndToolBar.CommandToIndex (ID_GO_BACK));
00414     m_wndToolBar.SetToolBarBtnText (m_wndToolBar.CommandToIndex (ID_GO_SEARCH_THE_WEB));
00415   }
00416
00417   return 0;
00418 }
00419
00420 LRESULT CMainFrame::OnHelpCustomizeToolbars(WPARAM /*wp*/, LPARAM /*lp*/)
00421 {
00422 // int iPageNum = (int) wp;
00423
00424 //  CToolbarCustomize* pDlg = (CToolbarCustomize*) lp;
00425 //  ASSERT_VALID (pDlg);
00426
00427   // TODO: show help about page number iPageNum
00428
00429   return 0;
00430 }
00431
00432 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00433 {
00434     CFrameWnd::OnShowPopupMenu (pMenuPopup);
00435
00436   if (pMenuPopup == NULL)
00437   {
00438         return TRUE;
00439     }
00440
00441   CMFCPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar ();
00442   ASSERT_VALID (pMenuBar);
00443
00444   for (int i = 0; i < pMenuBar->GetCount (); i ++)
00445   {
00446     CMFCToolBarButton* pButton = pMenuBar->GetButton (i);
00447     ASSERT_VALID (pButton);
00448
00449     if (pButton->m_nID == ID_FAVORITS_DUMMY)
00450     {
00451       if (CMFCToolBar::IsCustomizeMode ())
00452       {
00453         return FALSE;
00454       }
00455
00456       pMenuBar->ImportFromMenu (m_menuFavotites);
00457       pMenuPopup->SetMaxWidth (300);
00458
00459       return TRUE;
00460     }
00461   }
00462
00463   CMFCToolBarMenuButton* pParentButton = pMenuPopup->GetParentButton ();
00464   if (pParentButton == NULL)
00465   {
00466     return TRUE;
00467   }
00468
00469   switch (pParentButton->m_nID)
00470   {
00471   case ID_GO_BACK:
00472   case ID_GO_FORWARD:
00473     {
00474       if (CMFCToolBar::IsCustomizeMode ())
00475       {
00476         return FALSE;
00477       }
00478
00479       CIEDemoView* pView = ((CIEDemoView*)GetActiveView());
00480       ASSERT_VALID (pView);
00481
00482       CIEDemoDoc* pDoc = pView->GetDocument();
00483       ASSERT_VALID(pDoc);
00484
00485       _T_HistotyList lst;
00486
00487       if (pParentButton->m_nID == ID_GO_BACK)
00488       {
00489         pDoc->GetBackList (lst);
00490       }
00491       else
00492       {
00493         pDoc->GetFrwdList (lst);
00494       }
00495
00496       if (!lst.IsEmpty ())
00497       {
00498         pMenuPopup->RemoveAllItems ();
00499
00500         for (POSITION pos = lst.GetHeadPosition (); pos != NULL;)
00501         {
00502           CHistoryObj* pObj = lst.GetNext (pos);
00503           ASSERT (pObj != NULL);
00504
00505           if (pObj)
00506           {
00507             pMenuPopup->InsertItem (CMFCToolBarMenuButton (pObj->GetCommand (), NULL, -1, pObj->GetTitle ()));
00508           }
00509         }
00510       }
00511     }
00512   }
00513
00514   return TRUE;
00515 }
00516
00517 BOOL CMainFrame::OnDrawMenuImage (CDC* pDC,
00518                 const CMFCToolBarMenuButton* pMenuButton,
00519                 const CRect& rectImage)
00520 {
00521   if (theApp.m_Favorites.GetSysImages () == NULL)
00522   {
00523     return FALSE;
00524   }
00525
00526   ASSERT_VALID (pDC);
00527   ASSERT_VALID (pMenuButton);
00528
00529   int iIcon = -1;
00530
00531   if (pMenuButton->m_nID >= FIRST_FAVORITE_COMMAND &&
00532     pMenuButton->m_nID <= LAST_FAVORITE_COMMAND)
00533   {
00534     iIcon = theApp.m_Favorites.GetIDIcon (pMenuButton->m_nID);
00535   }
00536   else if (IsFavoritesMenu (pMenuButton)) // Maybe, favorits folder?
00537   {
00538     iIcon = theApp.m_Favorites.GetFolderIcon ();
00539   }
00540
00541   if (iIcon == -1)
00542   {
00543     return FALSE; // Don't draw it!
00544   }
00545
00546   ::ImageList_Draw (theApp.m_Favorites.GetSysImages (), iIcon,
00547     pDC->GetSafeHdc (),
00548     rectImage.left + (rectImage.Width () - theApp.m_Favorites.GetSysImageSize ().cx) / 2,
00549     rectImage.top + (rectImage.Height () - theApp.m_Favorites.GetSysImageSize ().cy) / 2, ILD_TRANSPARENT);
00550
00551   return TRUE;
00552 }
00553
00554 BOOL CMainFrame::IsFavoritesMenu (const CMFCToolBarMenuButton* pMenuButton)
00555 {
00556   if (pMenuButton == NULL || pMenuButton->m_nID != (UINT) -1)
00557   {
00558     return FALSE;
00559   }
00560
00561   ASSERT_VALID (pMenuButton);
00562   const CObList& lstCommands = pMenuButton->GetCommands ();
00563
00564   for (POSITION pos = lstCommands.GetHeadPosition (); pos != NULL;)
00565   {
00566     CMFCToolBarButton* pCmd = (CMFCToolBarButton*) lstCommands.GetNext (pos);
00567     ASSERT_VALID (pCmd);
00568
00569     if ((pCmd->m_nID >= FIRST_FAVORITE_COMMAND &&
00570       pCmd->m_nID <= LAST_FAVORITE_COMMAND) ||
00571       IsFavoritesMenu (DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pCmd)))
00572     {
00573       return TRUE;
00574     }
00575   }
00576
00577   return FALSE;
00578 }
00579
00580 void CMainFrame::OnFavorite(UINT nID)
00581 {
00582   SetFocus ();
00583   ((CIEDemoView*)GetActiveView())->Navigate2(theApp.m_Favorites.GetURLofID (nID), 0, NULL);
00584 }
00585
00586 void CMainFrame::OnHistory(UINT nID)
00587 {
00588   CIEDemoView* pView = ((CIEDemoView*)GetActiveView());
00589   ASSERT_VALID (pView);
00590
00591   CIEDemoDoc* pDoc = pView->GetDocument();
00592   ASSERT_VALID(pDoc);
00593
00594   CHistoryObj* pObj = pDoc->Go (nID);
00595   ASSERT (pObj != NULL);
00596
00597   if (pObj)
00598   {
00599     pView->Navigate2 (pObj->GetURL (), 0, NULL);
00600   }
00601 }
00602
00603 void CMainFrame::SetAddress(LPCTSTR lpszUrl)
00604 {
00605   // This is called when the browser has completely loaded the new location,
00606   // so make sure the text in the address bar is up to date and stop the
00607   // animation.
00608   m_wndAddress.SetWindowText(lpszUrl);
00609   m_wndStatusBar.SetPaneIcon (nStatusIcon, m_bmpStatus);
00610 }
00611
00612 void CMainFrame::StartAnimation()
00613 {
00614   // Start the animation.  This is called when the browser begins to
00615   // navigate to a new location
00616   m_wndStatusBar.SetPaneAnimation (nStatusIcon, m_imlStatusAnimation);
00617 }
00618
00619 void CMainFrame::OnNewAddress()
00620 {
00621   // gets called when an item in the Address combo box is selected
00622   // just navigate to the newly selected location.
00623   CString str;
00624
00625   m_wndAddress.GetLBText(m_wndAddress.GetCurSel(), str);
00626   ((CIEDemoView*)GetActiveView())->Navigate2(str, 0, NULL);
00627 }
00628
00629 void CMainFrame::OnNewAddressEnter()
00630 {
00631   // gets called when an item is entered manually into the edit box portion
00632   // of the Address combo box.
00633   // navigate to the newly selected location and also add this address to the
00634   // list of addresses in the combo box.
00635   CString str;
00636
00637   m_wndAddress.GetEditCtrl()->GetWindowText(str);
00638   ((CIEDemoView*)GetActiveView())->Navigate2(str, 0, NULL);
00639
00640   COMBOBOXEXITEM item;
00641
00642   item.mask = CBEIF_TEXT;
00643   item.iItem = -1;
00644   item.pszText = (LPTSTR)(LPCTSTR)str;
00645   m_wndAddress.InsertItem(&item);
00646 }
00647
00648 void CMainFrame::OnLink1()
00649 {
00650   // TODO: Add your command handler code here
00651
00652 }
00653
00654 void CMainFrame::OnViewAddressBar()
00655 {
00656   m_wndReBar.GetReBarCtrl().ShowBand (3, !m_wndAddress.IsWindowVisible ());
00657 }
00658
00659 void CMainFrame::OnUpdateViewAddressBar(CCmdUI* pCmdUI)
00660 {
00661   pCmdUI->SetCheck (m_wndAddress.IsWindowVisible ());
00662 }
00663
00664 void CMainFrame::OnViewLinksBar()
00665 {
00666   ShowPane (&m_wndLinksBar, (m_wndLinksBar.GetStyle () & WS_VISIBLE) == 0, FALSE, TRUE);
00667 }
00668
00669 void CMainFrame::OnUpdateViewLinksBar(CCmdUI* pCmdUI)
00670 {
00671   pCmdUI->SetCheck (m_wndLinksBar.IsWindowVisible ());
00672 }
00673
00674 BOOL CMainFrame::OnMenuButtonToolHitTest (CMFCToolBarButton* pButton, TOOLINFO* pTI)
00675 {
00676   ASSERT_VALID (pButton);
00677
00678   if (pButton->m_nID < FIRST_FAVORITE_COMMAND ||
00679     pButton->m_nID > LAST_FAVORITE_COMMAND)
00680   {
00681     return FALSE;
00682   }
00683
00684   ASSERT (pTI != NULL);
00685
00686   if (pTI)
00687   {
00688     CString strText = theApp.m_Favorites.GetURLofID (pButton->m_nID);
00689     pTI->lpszText = (LPTSTR) ::calloc ((strText.GetLength () + 1), sizeof (TCHAR));
00690     if (pTI->lpszText)
00691     {
00692       lstrcpy (pTI->lpszText, strText);
00693     }
00694   }
00695
00696   return TRUE;
00697 }
00698 //***************************************************************************************
00699 void CMainFrame::OnViewTextlabels()
00700 {
00701   m_wndToolBar.EnableTextLabels (!m_wndToolBar.AreTextLabels ());
00702 }
00703 //***************************************************************************************
00704 void CMainFrame::OnUpdateViewTextlabels(CCmdUI* pCmdUI)
00705 {
00706   pCmdUI->SetCheck (m_bMainToolbarMenu && m_wndToolBar.AreTextLabels ());
00707   pCmdUI->Enable (m_bMainToolbarMenu);
00708 }
00709 //***************************************************************************************
00710 BOOL CMainFrame::GetToolbarButtonToolTipText (CMFCToolBarButton* pButton, CString& strTTText)
00711 {
00712   CLinkButton* pLinkBtn = NULL;
00713
00714   ASSERT_VALID (pButton);
00715
00716   if (pButton->m_nID == ID_LINK_1 &&
00717     (pLinkBtn = DYNAMIC_DOWNCAST (CLinkButton, pButton)) != NULL)
00718   {
00719     strTTText = pLinkBtn->GetURL ();
00720     return TRUE;
00721   }
00722
00723   return FALSE; // Default tooltip text
00724 }
00725 //********************************************************************************************
00726 BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
00727 {
00728   if (!CFrameWnd::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
00729   {
00730     return FALSE;
00731   }
00732
00733   return TRUE;
00734 }
00735 //********************************************************************************************
00736 void CMainFrame::OnViewExplorerbar()
00737 {
00738   ShowPane (&m_wndExplorerBar, (m_wndExplorerBar.GetStyle () & WS_VISIBLE) == 0, FALSE, TRUE);
00739 }
00740 //********************************************************************************************
00741 void CMainFrame::OnUpdateViewExplorerbar(CCmdUI* pCmdUI)
00742 {
00743   pCmdUI->SetCheck (m_wndExplorerBar.IsWindowVisible ());
00744 }
00745 //********************************************************************************************
00746 void CMainFrame::SetProgress (long nCurr, long nTotal)
00747 {
00748   m_wndStatusBar.EnablePaneProgressBar (nStatusProgress, nTotal);
00749
00750   if (nTotal >= 0)
00751   {
00752     m_wndStatusBar.SetPaneProgress (nStatusProgress, min (nTotal, max (0, nCurr)));
00753   }
00754   else
00755   {
00756     m_wndStatusBar.RedrawWindow ();
00757   }
00758 }
00759 //********************************************************************************************
00760 void CMainFrame::OnLinkMSDN()
00761 {
00762   ((CIEDemoView*)GetActiveView())->Navigate2 (_T("http://www.msdn.com"), 0, NULL);
00763 }
00764 //********************************************************************************************
00765 void CMainFrame::OnLinkMicrosoft()
00766 {
00767   ((CIEDemoView*)GetActiveView())->Navigate2 (_T("http://www.microsoft.com"), 0, NULL);
00768 }
00769 //********************************************************************************************
00770 void CMainFrame::OnLinkVisualCPP()
00771 {
00772   ((CIEDemoView*)GetActiveView())->Navigate2 (_T("http://msdn2.microsoft.com/visualc/"), 0, NULL);
00773 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/StdAfx.h Source File

  • internet
  • DHtmlExplore

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Classes Reference and related electronic
00009 // documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft C++ Libraries products.
00012
00013 #pragma once
00014
00015 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00016
00017 #include <afxwin.h>         // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions
00019 #include <afxdisp.h>        // MFC Automation classes
00020 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00021 #ifndef _AFX_NO_AFXCMN_SUPPORT
00022 #include <afxcmn.h>     // MFC support for Windows Common Controls
00023 #endif // _AFX_NO_AFXCMN_SUPPORT
00024 #include <afxdhtml.h>
00025
00026 //{{AFX_INSERT_LOCATION}}
00027 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paditem.h Source File

  • ole
  • superpad

paditem.h

Go to the documentation of this file.
00001 // paditem.h : interface of the CEmbeddedItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __PADITEM_H__
00014 #define __PADITEM_H__
00015
00016 class CPadDoc;
00017 class CPadView;
00018
00019 class CEmbeddedItem : public COleServerItem
00020 {
00021   DECLARE_DYNAMIC(CEmbeddedItem)
00022
00023 // Constructors
00024 public:
00025   CEmbeddedItem(CPadDoc* pContainerDoc);
00026
00027 // Attributes
00028   UINT m_nBeg, m_nEnd;
00029   CPadDoc* GetDocument() const
00030     { return (CPadDoc*) COleServerItem::GetDocument(); }
00031   CPadView* GetView() const;
00032
00033 // Implementation
00034 public:
00035   virtual BOOL OnDraw(CDC* pDC, CSize& rSize);
00036   virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize);
00037
00038 protected:
00039   virtual BOOL OnRenderFileData(LPFORMATETC lpFormatEtc, CFile* pFile);
00040   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00041
00042   void SaveToFile(CFile* pFile);
00043 };
00044
00045 #endif  // __PADITEM_H__
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/FavoritesManager.h Source File

  • vc2008fp
  • IEDemo

FavoritesManager.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define FIRST_FAVORITE_COMMAND  0xe00
00014 #define LAST_FAVORITE_COMMAND 0xfff
00015
00016 class CFavorit :  public CObject
00017 {
00018   friend class CFavoritesManager;
00019
00020 // Construction/Destruction
00021 public:
00022   CFavorit (LPCTSTR lpszName, int iIcon, LPCTSTR lpszURL, UINT uiCommand = 0);
00023   virtual ~CFavorit();
00024
00025 protected:
00026   CFavorit();
00027
00028 // Operations:
00029 public:
00030   const CFavorit* FindByID (UINT uiCommandID) const;
00031
00032 protected:
00033   void CleanUp ();
00034   BOOL Build (CString strPath);
00035   BOOL CreateMenu (CMenu& menu);
00036   void FillTree (CTreeCtrl& wndTree, HTREEITEM htreeItemParent);
00037
00038 // Attributes:
00039 public:
00040   const CString& GetName () const
00041   {
00042     return m_strName;
00043   }
00044
00045   const CString& GetURL () const
00046   {
00047     return m_strURL;
00048   }
00049
00050   int GetIcon () const
00051   {
00052     return m_iIcon;
00053   }
00054
00055   UINT GetCommand () const
00056   {
00057     return m_uiCommand;
00058   }
00059
00060   const CObList& GetSubItems () const
00061   {
00062     return m_lstSubItems;
00063   }
00064
00065 protected:
00066   CString m_strName;
00067   CString m_strURL;
00068   UINT  m_uiCommand;
00069   int   m_iIcon;
00070
00071   CObList m_lstSubItems;  // List of CFavorit objects
00072
00073   static CMap<CString, LPCTSTR, int, int> m_URLIcons;
00074   static CMap<UINT, UINT, int, int>   m_IDIcons;
00075   static UINT               m_uiNextCommand;
00076   static int                m_iFolderIcon;
00077   static int                m_iInternetShortcutIcon;
00078 };
00079
00080
00081 class CFavoritesManager : public CObject
00082 {
00083 // Construction/Destruction
00084 public:
00085   CFavoritesManager();
00086   virtual ~CFavoritesManager();
00087
00088 // Operations:
00089 public:
00090   BOOL Load ();
00091   BOOL CreateMenu (CMenu& menu);
00092   void FillTree (CTreeCtrl& wndTree);
00093
00094 // Attributes:
00095 public:
00096   HIMAGELIST  GetSysImages () const
00097   {
00098     return m_himSystem;
00099   }
00100
00101   CSize GetSysImageSize () const
00102   {
00103     return m_SysImageSize;
00104   }
00105
00106   int GetFolderIcon () const
00107   {
00108     return CFavorit::m_iFolderIcon;
00109   }
00110
00111   int GetInternetShortcutIcon () const
00112   {
00113     return CFavorit::m_iInternetShortcutIcon;
00114   }
00115
00116   int GetIDIcon (UINT uiCommandID) const;
00117
00118   CString GetURLofID (UINT uiCommandID) const;
00119
00120 protected:
00121   CFavorit  m_Root;
00122
00123   HIMAGELIST  m_himSystem;
00124   CSize   m_SysImageSize;
00125 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonGadgetsDoc Member List

This is the complete list of members for CRibbonGadgetsDoc, including all inherited members.
CRibbonGadgetsDoc() | CRibbonGadgetsDoc | [protected]
m_bStartup | CRibbonGadgetsDoc | [protected]
OnNewDocument() | CRibbonGadgetsDoc | [virtual]
Serialize(CArchive &ar) | CRibbonGadgetsDoc | [virtual]
~CRibbonGadgetsDoc() | CRibbonGadgetsDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPenWidthsDlg Member List

This is the complete list of members for CPenWidthsDlg, including all inherited members.
CPenWidthsDlg(CWnd *pParent=NULL) | CPenWidthsDlg |
DoDataExchange(CDataExchange *pDX) | CPenWidthsDlg | [protected, virtual]
IDD enum value | CPenWidthsDlg |
m_nThickWidth | CPenWidthsDlg |
m_nThinWidth | CPenWidthsDlg |
OnDefaultPenWidths() | CPenWidthsDlg | [protected]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStandardBar Member List

This is the complete list of members for CStandardBar, including all inherited members.
BeginAdjust(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
BeginDrag(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CStandardBar | [virtual]
CStandardBar() | CStandardBar |
CustomizeHelp(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
EndAdjust(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
EndDrag(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
GetButtonInfo(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
m_nButtonCount | CStandardBar | [private]
m_pTBButtons | CStandardBar | [private]
NeedText(UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult) | CStandardBar | [protected]
OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [virtual]
OnNeedTextA(UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult) | CStandardBar | [protected]
OnNeedTextW(UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult) | CStandardBar | [protected]
QueryDelete(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
QueryInsert(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
Reset(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
ToolBarChange(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CStandardBar | [protected]
~CStandardBar() | CStandardBar | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/colorpge.h Source File

  • general
  • propdlg

colorpge.h

Go to the documentation of this file.
00001 // colorpge.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CColorPage dialog
00014
00015 class CColorPage : public CPropertyPage
00016 {
00017 // Construction
00018 public:
00019   CColorPage();
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CColorPage)
00023   enum { IDD = IDD_COLOR };
00024   int     m_nColor;
00025   //}}AFX_DATA
00026
00027
00028 // Overrides
00029   // ClassWizard generate virtual function overrides
00030   //{{AFX_VIRTUAL(CColorPage)
00031   protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 protected:
00037   void OnColorClicked(UINT nCmdID);
00038   // Generated message map functions
00039   //{{AFX_MSG(CColorPage)
00040     // NOTE: the ClassWizard will add member functions here
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistvw.cpp Source File

  • general
  • rowlist

rlistvw.cpp

Go to the documentation of this file.
00001 // RListVw.cpp : implementation of the CRowListView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "RowList.h"
00014
00015 #include "RListDoc.h"
00016
00017 #include "ListVwEx.h"   // base class for CRowListView
00018 #include "RListVw.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CRowListView
00028
00029 IMPLEMENT_DYNCREATE(CRowListView, CListViewEx)
00030
00031 BEGIN_MESSAGE_MAP(CRowListView, CListViewEx)
00032   //{{AFX_MSG_MAP(CRowListView)
00033   ON_COMMAND(ID_VIEW_SMALLICONS, OnViewSmallIcons)
00034   ON_COMMAND(ID_VIEW_LARGEICONS, OnViewLargeIcons)
00035   ON_COMMAND(ID_VIEW_LIST, OnViewList)
00036   ON_COMMAND(ID_VIEW_DETAILS, OnViewDetails)
00037   ON_COMMAND(ID_VIEW_ROWDETAILS, OnViewFullRowDetails)
00038   ON_UPDATE_COMMAND_UI(ID_VIEW_SMALLICONS, OnUpdateViewSmallIcons)
00039   ON_UPDATE_COMMAND_UI(ID_VIEW_LARGEICONS, OnUpdateViewLargeIcons)
00040   ON_UPDATE_COMMAND_UI(ID_VIEW_LIST, OnUpdateViewList)
00041   ON_UPDATE_COMMAND_UI(ID_VIEW_DETAILS, OnUpdateViewDetails)
00042   ON_UPDATE_COMMAND_UI(ID_VIEW_ROWDETAILS, OnUpdateViewFullRowDetails)
00043   ON_COMMAND(ID_VIEW_STATEICONS, OnViewStateIcons)
00044   ON_UPDATE_COMMAND_UI(ID_VIEW_STATEICONS, OnUpdateViewStateIcons)
00045   ON_COMMAND(ID_VIEW_CLIENTWIDTHSEL, OnViewClientWidthSel)
00046   ON_UPDATE_COMMAND_UI(ID_VIEW_CLIENTWIDTHSEL, OnUpdateViewClientWidthSel)
00047   ON_WM_LBUTTONDOWN()
00048   ON_WM_LBUTTONDBLCLK()
00049   //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CRowListView construction/destruction
00054
00055 CRowListView::CRowListView()
00056 {
00057   m_bStateIcons = TRUE;
00058   m_nCheckedItem = -1;
00059   m_hSmallIcon = NULL;
00060   m_hLargeIcon = NULL;
00061 }
00062
00063 CRowListView::~CRowListView()
00064 {
00065 }
00066
00067 BOOL CRowListView::PreCreateWindow(CREATESTRUCT& cs)
00068 {
00069   cs.style |= LVS_SHOWSELALWAYS | LVS_REPORT;
00070
00071   return CListViewEx::PreCreateWindow(cs);
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // data for the list view control
00076
00077 #define NUM_COLUMNS 8
00078 #define NUM_ITEMS   7
00079
00080 static _TCHAR *_gszColumnLabel[NUM_COLUMNS] =
00081 {
00082   _T("Color"), _T("Red"), _T("Green"), _T("Blue"),
00083   _T("Hue"), _T("Sat"), _T("Lum"), _T("Type")
00084 };
00085
00086 static int _gnColumnFmt[NUM_COLUMNS] =
00087 {
00088   LVCFMT_LEFT, LVCFMT_RIGHT, LVCFMT_RIGHT, LVCFMT_RIGHT,
00089     LVCFMT_RIGHT, LVCFMT_RIGHT, LVCFMT_RIGHT, LVCFMT_CENTER
00090 };
00091
00092 static int _gnColumnWidth[NUM_COLUMNS] =
00093 {
00094   150, 50, 50, 50, 100, 50, 50, 150
00095 };
00096
00097 static _TCHAR *_gszItem[NUM_ITEMS][NUM_COLUMNS] =
00098 {
00099   _T("Yellow"),  _T("255"), _T("255"), _T("0"),   _T("40"),  _T("240"), _T("120"), _T("Neutral"),
00100   _T("Red"),     _T("255"), _T("0"),   _T("0"),   _T("0"),   _T("240"), _T("120"), _T("Warm"),
00101   _T("Green"),   _T("0"),   _T("255"), _T("0"),   _T("80"),  _T("240"), _T("120"), _T("Cool"),
00102   _T("Magenta"), _T("255"), _T("0"),   _T("255"), _T("200"), _T("240"), _T("120"), _T("Warm"),
00103   _T("Cyan"),    _T("0"),   _T("255"), _T("255"), _T("120"), _T("240"), _T("120"), _T("Cool"),
00104   _T("Blue"),    _T("0"),   _T("0"),   _T("255"), _T("160"), _T("240"), _T("120"), _T("Cool"),
00105   _T("Gray"),    _T("192"), _T("192"), _T("192"), _T("160"), _T("0"),   _T("181"), _T("Neutral")
00106 };
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CRowListView initialization
00110
00111 void CRowListView::OnInitialUpdate()
00112 {
00113   CListViewEx::OnInitialUpdate();
00114
00115   CListCtrl& ListCtrl = GetListCtrl();
00116
00117 // set image lists
00118
00119   m_LargeImageList.Create(IDB_LARGEICONS, 32, 1, RGB(255, 255, 255));
00120   m_SmallImageList.Create(IDB_SMALLICONS, 16, 1, RGB(255, 255, 255));
00121   m_StateImageList.Create(IDB_STATEICONS, 16, 1, RGB(255, 0, 0));
00122
00123   m_LargeImageList.SetOverlayImage(NUM_ITEMS, 1);
00124   m_SmallImageList.SetOverlayImage(NUM_ITEMS, 1);
00125
00126   ListCtrl.SetImageList(&m_LargeImageList, LVSIL_NORMAL);
00127   ListCtrl.SetImageList(&m_SmallImageList, LVSIL_SMALL);
00128   ListCtrl.SetImageList(&m_StateImageList, LVSIL_STATE);
00129
00130 // insert columns
00131
00132   int i, j;
00133   LV_COLUMN lvc;
00134
00135   lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
00136
00137   for(i = 0; i<NUM_COLUMNS; i++)
00138   {
00139     lvc.iSubItem = i;
00140     lvc.pszText = _gszColumnLabel[i];
00141     lvc.cx = _gnColumnWidth[i];
00142     lvc.fmt = _gnColumnFmt[i];
00143     ListCtrl.InsertColumn(i,&lvc);
00144   }
00145
00146 // insert items
00147
00148   LV_ITEM lvi;
00149
00150   for(i = 0; i < NUM_ITEMS; i++)
00151   {
00152     lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
00153     lvi.iItem = i;
00154     lvi.iSubItem = 0;
00155     lvi.pszText = _gszItem[i][0];
00156     lvi.iImage = i;
00157     lvi.stateMask = LVIS_STATEIMAGEMASK;
00158     lvi.state = INDEXTOSTATEIMAGEMASK(1);
00159
00160     ListCtrl.InsertItem(&lvi);
00161   }
00162
00163 // set item text for additional columns
00164
00165   for(i = 0; i<NUM_ITEMS; i++)
00166   {
00167     for(j = 1; j<NUM_COLUMNS; j++)
00168     {
00169       ListCtrl.SetItemText(i,j,_gszItem[i][j]);
00170     }
00171   }
00172 }
00173
00174 /////////////////////////////////////////////////////////////////////////////
00175 // CRowListView diagnostics
00176
00177 #ifdef _DEBUG
00178 void CRowListView::AssertValid() const
00179 {
00180   CListViewEx::AssertValid();
00181 }
00182
00183 void CRowListView::Dump(CDumpContext& dc) const
00184 {
00185   CListViewEx::Dump(dc);
00186 }
00187
00188 CRowListDoc* CRowListView::GetDocument() // non-debug version is inline
00189 {
00190   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRowListDoc)));
00191   return (CRowListDoc*)m_pDocument;
00192 }
00193 #endif //_DEBUG
00194
00195 /////////////////////////////////////////////////////////////////////////////
00196 // CRowListView helpers
00197
00198 BOOL CRowListView::SetViewType(DWORD dwViewType)
00199 {
00200   return(ModifyStyle(LVS_TYPEMASK,dwViewType & LVS_TYPEMASK));
00201 }
00202
00203 DWORD CRowListView::GetViewType()
00204 {
00205   return(GetStyle() & LVS_TYPEMASK);
00206 }
00207
00208 void CRowListView::CheckItem(int nNewCheckedItem)
00209 {
00210   CListCtrl& ListCtrl = GetListCtrl();
00211
00212 // reset if there is checked item
00213
00214   if (m_nCheckedItem != -1)
00215   {
00216     if (m_bStateIcons)
00217     {
00218       ListCtrl.SetItemState(m_nCheckedItem,
00219         INDEXTOSTATEIMAGEMASK(1), LVIS_STATEIMAGEMASK);
00220     }
00221     else
00222     {
00223       ListCtrl.SetItemState(m_nCheckedItem,
00224         INDEXTOSTATEIMAGEMASK(1),
00225         LVIS_STATEIMAGEMASK | LVIS_OVERLAYMASK);
00226     }
00227
00228     ::DestroyIcon(m_hSmallIcon);
00229     ::DestroyIcon(m_hLargeIcon);
00230   }
00231
00232 // check new item and set its icon as the app icon
00233
00234   CWnd* pMainWnd = AfxGetMainWnd();
00235
00236   if (m_nCheckedItem == nNewCheckedItem)
00237   {
00238     m_nCheckedItem = -1;
00239     pMainWnd->SetIcon(NULL, FALSE);
00240     pMainWnd->SetIcon(NULL, TRUE);
00241   }
00242   else if ((m_nCheckedItem = nNewCheckedItem) != -1)
00243   {
00244     if (m_bStateIcons)
00245     {
00246       ListCtrl.SetItemState(m_nCheckedItem,
00247         INDEXTOSTATEIMAGEMASK(2), LVIS_STATEIMAGEMASK);
00248     }
00249     else
00250     {
00251       ListCtrl.SetItemState(m_nCheckedItem,
00252         INDEXTOSTATEIMAGEMASK(2) | INDEXTOOVERLAYMASK(1),
00253         LVIS_STATEIMAGEMASK | LVIS_OVERLAYMASK);
00254     }
00255
00256     m_hSmallIcon =
00257       ListCtrl.GetImageList(LVSIL_SMALL)->ExtractIcon(nNewCheckedItem);
00258     pMainWnd->SetIcon(m_hSmallIcon,FALSE);
00259     m_hLargeIcon =
00260       ListCtrl.GetImageList(LVSIL_NORMAL)->ExtractIcon(nNewCheckedItem);
00261     pMainWnd->SetIcon(m_hLargeIcon,TRUE);
00262   }
00263 }
00264
00265 /////////////////////////////////////////////////////////////////////////////
00266 // CRowListView message handlers
00267
00268 void CRowListView::OnViewSmallIcons()
00269 {
00270   if (GetViewType() != LVS_SMALLICON)
00271     SetViewType(LVS_SMALLICON);
00272 }
00273
00274 void CRowListView::OnViewLargeIcons()
00275 {
00276   if (GetViewType() != LVS_ICON)
00277     SetViewType(LVS_ICON);
00278 }
00279
00280 void CRowListView::OnViewList()
00281 {
00282   if (GetViewType() != LVS_LIST)
00283     SetViewType(LVS_LIST);
00284 }
00285
00286 void CRowListView::OnViewDetails()
00287 {
00288   if ((GetViewType() != LVS_REPORT) || GetFullRowSel())
00289   {
00290     SetFullRowSel(FALSE);
00291     if (GetViewType() != LVS_REPORT)
00292       SetViewType(LVS_REPORT);
00293   }
00294 }
00295
00296 void CRowListView::OnViewFullRowDetails()
00297 {
00298   if ((GetViewType() != LVS_REPORT) || !GetFullRowSel())
00299   {
00300     SetFullRowSel(TRUE);
00301     if (GetViewType() != LVS_REPORT)
00302       SetViewType(LVS_REPORT);
00303   }
00304 }
00305
00306 void CRowListView::OnUpdateViewSmallIcons(CCmdUI* pCmdUI)
00307 {
00308   pCmdUI->SetCheck(GetViewType() == LVS_SMALLICON);
00309 }
00310
00311 void CRowListView::OnUpdateViewLargeIcons(CCmdUI* pCmdUI)
00312 {
00313   pCmdUI->SetCheck(GetViewType() == LVS_ICON);
00314 }
00315
00316 void CRowListView::OnUpdateViewList(CCmdUI* pCmdUI)
00317 {
00318   pCmdUI->SetCheck(GetViewType() == LVS_LIST);
00319 }
00320
00321 void CRowListView::OnUpdateViewDetails(CCmdUI* pCmdUI)
00322 {
00323   pCmdUI->SetCheck((GetViewType() == LVS_REPORT) && !GetFullRowSel());
00324 }
00325
00326 void CRowListView::OnUpdateViewFullRowDetails(CCmdUI* pCmdUI)
00327 {
00328   pCmdUI->SetCheck((GetViewType() == LVS_REPORT) && GetFullRowSel());
00329 }
00330
00331 void CRowListView::OnViewStateIcons()
00332 {
00333   m_bStateIcons =! m_bStateIcons;
00334
00335   CListCtrl& ListCtrl = GetListCtrl();
00336
00337   if (m_bStateIcons)
00338   {
00339     ListCtrl.SetImageList(&m_StateImageList, LVSIL_STATE);
00340     ListCtrl.SetItemState(m_nCheckedItem, 0, LVIS_OVERLAYMASK);
00341   }
00342   else
00343   {
00344     ListCtrl.SetImageList(NULL,LVSIL_STATE);
00345     if (m_nCheckedItem != -1)
00346     {
00347       ListCtrl.SetItemState(m_nCheckedItem,
00348         INDEXTOOVERLAYMASK(1), LVIS_OVERLAYMASK);
00349     }
00350   }
00351 }
00352
00353 void CRowListView::OnUpdateViewStateIcons(CCmdUI* pCmdUI)
00354 {
00355   pCmdUI->SetCheck(m_bStateIcons);
00356 }
00357
00358 void CRowListView::OnViewClientWidthSel()
00359 {
00360   m_bClientWidthSel = !m_bClientWidthSel;
00361
00362   Invalidate();
00363   UpdateWindow();
00364 }
00365
00366 void CRowListView::OnUpdateViewClientWidthSel(CCmdUI* pCmdUI)
00367 {
00368   pCmdUI->SetCheck(m_bClientWidthSel);
00369   pCmdUI->Enable((GetViewType() == LVS_REPORT) && GetFullRowSel());
00370 }
00371
00372 void CRowListView::OnLButtonDown(UINT nFlags, CPoint point)
00373 {
00374   UINT uFlags = 0;
00375   int nHitItem = GetListCtrl().HitTest(point, &uFlags);
00376
00377   // we need additional checking in owner-draw mode
00378   // because we only get LVHT_ONITEM
00379   BOOL bHit = FALSE;
00380   if (uFlags == LVHT_ONITEM && (GetStyle() & LVS_OWNERDRAWFIXED))
00381   {
00382     CRect rect;
00383     GetListCtrl().GetItemRect(nHitItem, rect, LVIR_ICON);
00384
00385     // check if hit was on a state icon
00386     if (m_bStateIcons && point.x < rect.left)
00387       bHit = TRUE;
00388   }
00389   else if (uFlags & LVHT_ONITEMSTATEICON)
00390     bHit = TRUE;
00391
00392   if (bHit)
00393     CheckItem(nHitItem);
00394   else
00395     CListViewEx::OnLButtonDown(nFlags, point);
00396 }
00397
00398 void CRowListView::OnLButtonDblClk(UINT nFlags, CPoint point)
00399 {
00400   UINT uFlags = 0;
00401   int nHitItem = GetListCtrl().HitTest(point, &uFlags);
00402
00403   if (uFlags & LVHT_ONITEM)
00404   {
00405     // double click works only if we don't have state icons,
00406     // or if we are in icon or small icon view
00407     if (!m_bStateIcons || GetViewType() == LVS_ICON ||
00408       GetViewType()==LVS_SMALLICON)
00409     {
00410       CheckItem(nHitItem);
00411     }
00412   }
00413
00414   CListViewEx::OnLButtonDblClk(nFlags, point);
00415 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/NewAPDg.H Source File

  • ole
  • TstCon

NewAPDg.H

Go to the documentation of this file.
00001 // File: NewAPDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_NEWAMBIENTPROPERTYDLG_H__D59AF2B5_FE12_11D0_8E2A_00C04FB68D60__INCLUDED_)
00011 #define AFX_NEWAMBIENTPROPERTYDLG_H__D59AF2B5_FE12_11D0_8E2A_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // NewAmbientPropertyDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CNewAmbientPropertyDlg dialog
00021
00022 class CNewAmbientPropertyDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CNewAmbientPropertyDlg(CWnd* pParent = NULL);   // standard constructor
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CNewAmbientPropertyDlg)
00030   enum { IDD = IDD_NEWAMBIENTPROPERTY };
00031   CEdit   m_editName;
00032   int     m_dispid;
00033   CString m_strName;
00034   //}}AFX_DATA
00035
00036
00037 // Overrides
00038   // ClassWizard generated virtual function overrides
00039   //{{AFX_VIRTUAL(CNewAmbientPropertyDlg)
00040   protected:
00041   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045 protected:
00046
00047   // Generated message map functions
00048   //{{AFX_MSG(CNewAmbientPropertyDlg)
00049   virtual BOOL OnInitDialog();
00050   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00051   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00052   //}}AFX_MSG
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
00056 //{{AFX_INSERT_LOCATION}}
00057 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00058
00059 #endif // !defined(AFX_NEWAMBIENTPROPERTYDLG_H__D59AF2B5_FE12_11D0_8E2A_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagGUIDE Member List

This is the complete list of members for tagGUIDE, including all inherited members.
cHorzBox | tagGUIDE
cVertBox | tagGUIDE
cxBase | tagGUIDE
cxBox | tagGUIDE
cyBase | tagGUIDE
cyBox | tagGUIDE
cyMid | tagGUIDE
xOrigin | tagGUIDE
yOrigin | tagGUIDE
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMenuSubSetView Member List

This is the complete list of members for CMenuSubSetView, including all inherited members.
CMenuSubSetView() | CMenuSubSetView | [protected]
DoDataExchange(CDataExchange *pDX) | CMenuSubSetView | [protected, virtual]
GetDocument() | CMenuSubSetView | [inline]
IDD enum value | CMenuSubSetView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CMenuSubSetView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CMenuSubSetView | [protected]
OnDemoDemo1() | CMenuSubSetView | [protected]
OnDemoDemo2() | CMenuSubSetView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CMenuSubSetView | [protected, virtual]
OnFilePrintPreview() | CMenuSubSetView | [protected]
OnInitialUpdate() | CMenuSubSetView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CMenuSubSetView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CMenuSubSetView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMenuSubSetView | [virtual]
~CMenuSubSetView() | CMenuSubSetView | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertyPage1.h Source File

  • vc2008fp
  • PropSheetDemo

MyPropertyPage1.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 /////////////////////////////////////////////////////////////////////////////
00004 // CMyPropertyPage1 dialog
00005
00006 class CMyPropertyPage1 : public CMFCPropertyPage
00007 {
00008   DECLARE_DYNCREATE(CMyPropertyPage1)
00009
00010 // Construction
00011 public:
00012   CMyPropertyPage1();
00013   ~CMyPropertyPage1();
00014
00015 // Dialog Data
00016   enum { IDD = IDD_PROPPAGE1 };
00017
00018 // Overrides
00019   protected:
00020   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00021
00022 // Implementation
00023 protected:
00024   DECLARE_MESSAGE_MAP()
00025 };
00026
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CMyPropertyPage2 dialog
00030
00031 class CMyPropertyPage2 : public CMFCPropertyPage
00032 {
00033   DECLARE_DYNCREATE(CMyPropertyPage2)
00034
00035 // Construction
00036 public:
00037   CMyPropertyPage2();
00038   ~CMyPropertyPage2();
00039
00040 // Dialog Data
00041   enum { IDD = IDD_PROPPAGE2 };
00042
00043 // Overrides
00044   protected:
00045   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00046
00047 // Implementation
00048 protected:
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CMyPropertyPage3 dialog
00055
00056 class CMyPropertyPage3 : public CMFCPropertyPage
00057 {
00058   DECLARE_DYNCREATE(CMyPropertyPage3)
00059
00060 // Construction
00061 public:
00062   CMyPropertyPage3();
00063   ~CMyPropertyPage3();
00064
00065 // Dialog Data
00066   enum { IDD = IDD_PROPPAGE3 };
00067
00068 // Overrides
00069   protected:
00070   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00071
00072 // Implementation
00073 protected:
00074   DECLARE_MESSAGE_MAP()
00075 };
00076
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // CMyPropertyPage4 dialog
00080
00081 class CMyPropertyPage4 : public CMFCPropertyPage
00082 {
00083   DECLARE_DYNCREATE(CMyPropertyPage4)
00084
00085 // Construction
00086 public:
00087   CMyPropertyPage4();
00088   ~CMyPropertyPage4();
00089
00090 // Dialog Data
00091   enum { IDD = IDD_PROPPAGE4 };
00092
00093 // Overrides
00094   protected:
00095   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00096
00097 // Implementation
00098 protected:
00099   DECLARE_MESSAGE_MAP()
00100 };
00101
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTrackerDoc Member List

This is the complete list of members for CTrackerDoc, including all inherited members.
CTrackerDoc() | CTrackerDoc | [protected]
m_bAllowInvert | CTrackerDoc |
m_tracker | CTrackerDoc |
OnEditAllowInvert() | CTrackerDoc | [protected]
OnEditDottedline() | CTrackerDoc | [protected]
OnEditHatchedborder() | CTrackerDoc | [protected]
OnEditHatchedinside() | CTrackerDoc | [protected]
OnEditResizeinside() | CTrackerDoc | [protected]
OnEditResizeoutside() | CTrackerDoc | [protected]
OnEditSolidline() | CTrackerDoc | [protected]
OnNewDocument() | CTrackerDoc | [protected, virtual]
OnUpdateEditAllowInvert(CCmdUI *pCmdUI) | CTrackerDoc | [protected]
OnUpdateEditDottedline(CCmdUI *pCmdUI) | CTrackerDoc | [protected]
OnUpdateEditHatchedborder(CCmdUI *pCmdUI) | CTrackerDoc | [protected]
OnUpdateEditHatchedinside(CCmdUI *pCmdUI) | CTrackerDoc | [protected]
OnUpdateEditResizeinside(CCmdUI *pCmdUI) | CTrackerDoc | [protected]
OnUpdateEditResizeoutside(CCmdUI *pCmdUI) | CTrackerDoc | [protected]
OnUpdateEditSolidline(CCmdUI *pCmdUI) | CTrackerDoc | [protected]
Serialize(CArchive &ar) | CTrackerDoc | [virtual]
~CTrackerDoc() | CTrackerDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CUndoListBox Member List

This is the complete list of members for CUndoListBox, including all inherited members.
CUndoListBox(CUndoBar &bar) | CUndoListBox |
m_Bar | CUndoListBox | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CUndoListBox | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CUndoListBox | [protected]
~CUndoListBox() | CUndoListBox | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/targetver.h Source File

  • vc2008fp
  • OutlookDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRectDlg Member List

This is the complete list of members for CRectDlg, including all inherited members.
CRectDlg(CWnd *pParent=NULL) | CRectDlg |
CRectDlg(CWnd *pParent=NULL) | CRectDlg |
DoDataExchange(CDataExchange *pDX) | CRectDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CRectDlg | [protected, virtual]
IDD enum value | CRectDlg |
m_bNoFill | CRectDlg |
m_penSize | CRectDlg |
m_SpinCtrl | CRectDlg |
OnInitDialog() | CRectDlg | [protected, virtual]
OnInitDialog() | CRectDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNVisualManager.h Source File

  • vc2008fp
  • DesktopAlertDemo

MSNVisualManager.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMSNVisualManager : public CMFCVisualManagerWindows
00014 {
00015   DECLARE_DYNCREATE(CMSNVisualManager)
00016
00017 public:
00018   CMSNVisualManager();
00019   virtual ~CMSNVisualManager();
00020
00021   virtual void OnFillPopupWindowBackground (CDC* pDC, CRect rect);
00022   virtual void OnDrawPopupWindowBorder (CDC* pDC, CRect rect);
00023   virtual COLORREF OnDrawPopupWindowCaption (CDC* pDC, CRect rectCaption, CMFCDesktopAlertWnd* pPopupWnd);
00024 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/MainFrm.cpp Source File

  • vc2008fp
  • Explorer

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Explorer.h"
00013
00014 #include "MainFrm.h"
00015 #include "ExplorerDoc.h"
00016 #include "ExplorerView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00028
00029
00030 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00031   ON_WM_CREATE()
00032   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00033   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00034   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00035   ON_COMMAND(ID_VIEW_FOLDERS, OnViewFolders)
00036   ON_UPDATE_COMMAND_UI(ID_VIEW_FOLDERS, OnUpdateViewFolders)
00037   ON_CBN_SELENDOK(AFX_IDW_TOOLBAR + 1, OnNewAddress)
00038   ON_COMMAND(IDOK, OnNewAddressEnter)
00039 END_MESSAGE_MAP()
00040
00041 static UINT indicators[] =
00042 {
00043   ID_SEPARATOR,           // status line indicator
00044   ID_INDICATOR_CAPS,
00045   ID_INDICATOR_NUM,
00046   ID_INDICATOR_SCRL,
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CMainFrame construction/destruction
00051
00052 CMainFrame::CMainFrame()
00053 {
00054   // TODO: add member initialization code here
00055
00056 }
00057
00058 CMainFrame::~CMainFrame()
00059 {
00060 }
00061
00062 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00063 {
00064   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00065     return -1;
00066
00067   // enable Windows XP look:
00068   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00069
00070   CMFCToolBar::EnableQuickCustomization ();
00071
00072   //---------------------------------
00073   // Set toolbar and menu image size:
00074   //---------------------------------
00075   CMFCToolBar::SetSizes (CSize (28, 28), CSize (22, 22));
00076   CMFCToolBar::SetMenuSizes (CSize (22, 22), CSize (16, 16));
00077
00078   // TODO: Define your own basic commands. Be sure, that each pulldown
00079   // menu have at least one basic command.
00080
00081   CList<UINT, UINT> lstBasicCommands;
00082
00083   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00084   lstBasicCommands.AddTail (ID_APP_EXIT);
00085   lstBasicCommands.AddTail (ID_APP_ABOUT);
00086   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00087   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00088   lstBasicCommands.AddTail (ID_COMMAND_HISTORY);
00089   lstBasicCommands.AddTail (ID_VIEW_LARGEICON);
00090   lstBasicCommands.AddTail (ID_VIEW_SMALLICON);
00091   lstBasicCommands.AddTail (ID_VIEW_LIST);
00092   lstBasicCommands.AddTail (ID_VIEW_DETAILS);
00093   lstBasicCommands.AddTail (ID_EDIT_CUT);
00094   lstBasicCommands.AddTail (ID_EDIT_COPY);
00095   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00096
00097   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00098
00099   if (!m_wndMenuBar.Create (this))
00100   {
00101     TRACE0("Failed to create menubar\n");
00102     return -1;      // fail to create
00103   }
00104
00105   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00106
00107   // Remove menubar gripper and borders:
00108   m_wndMenuBar.SetPaneStyle (m_wndMenuBar.GetPaneStyle() &
00109     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00110
00111   // Detect color depth. 256 color toolbars can be used in the
00112   // high or true color modes only (bits per pixel is > 8):
00113   CClientDC dc (this);
00114   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00115
00116   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00117   UINT uiToolbarColdID = bIsHighColor ? IDB_TOOLBARCOLD256 : 0;
00118   UINT uiMenuID = bIsHighColor ? IDB_MENU256 : IDB_MENU16;
00119
00120   if (!m_wndToolBar.CreateEx(this) ||
00121     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, uiToolbarColdID, uiMenuID, FALSE, 0, 0, uiToolbarHotID))
00122   {
00123     TRACE0("Failed to create toolbar\n");
00124     return -1;      // fail to create
00125   }
00126
00127   // Remove toolbar gripper and borders:
00128   m_wndToolBar.SetPaneStyle (m_wndToolBar.GetPaneStyle() &
00129     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00130
00131   //----------------------------------------
00132   // Create a combo box for the address bar:
00133   //----------------------------------------
00134   if (!m_wndAddress.Create (CBS_DROPDOWN | WS_CHILD, CRect(0, 0, 200, 120), this, AFX_IDW_TOOLBAR + 1))
00135   {
00136     TRACE0("Failed to create combobox\n");
00137     return -1;      // fail to create
00138   }
00139
00140   m_wndAddress.EnableActiveAccessibility();
00141
00142   // Each rebar pane will ocupy its own row:
00143   DWORD dwStyle = RBBS_GRIPPERALWAYS | RBBS_FIXEDBMP | RBBS_BREAK;
00144
00145   if (!m_wndReBar.Create(this) ||
00146     !m_wndReBar.AddBar (&m_wndMenuBar) ||
00147     !m_wndReBar.AddBar (&m_wndToolBar, NULL, NULL, dwStyle) ||
00148     !m_wndReBar.AddBar(&m_wndAddress, _T("Address"), NULL, dwStyle))
00149   {
00150     TRACE0("Failed to create rebar\n");
00151     return -1;      // fail to create
00152   }
00153
00154   m_wndMenuBar.AdjustLayout ();
00155   m_wndToolBar.AdjustLayout ();
00156
00157   // TODO: Remove this if you don't want chevrons:
00158   m_wndMenuBar.EnableCustomizeButton (TRUE, -1, _T(""));
00159   m_wndToolBar.EnableCustomizeButton (TRUE, -1, _T(""));
00160
00161   if (!m_wndStatusBar.Create(this) ||
00162     !m_wndStatusBar.SetIndicators(indicators,
00163       sizeof(indicators)/sizeof(UINT)))
00164   {
00165     TRACE0("Failed to create status bar\n");
00166     return -1;      // fail to create
00167   }
00168
00169   if (!m_wndFoldersBar.Create (_T("Folders"),
00170     this, CRect (0, 0, 200, 200), TRUE, ID_VIEW_FOLDERS,
00171     WS_CHILD | WS_VISIBLE | CBRS_LEFT | CBRS_HIDE_INPLACE | WS_CAPTION))
00172   {
00173     TRACE0("Failed to create folders bar\n");
00174     return -1;      // fail to create
00175   }
00176
00177   EnableDocking (CBRS_ALIGN_ANY);
00178
00179   m_wndReBar.EnableDocking (CBRS_TOP);
00180   DockPane (&m_wndReBar);
00181
00182   m_wndFoldersBar.EnableDocking (CBRS_LEFT | CBRS_RIGHT);
00183   DockPane (&m_wndFoldersBar);
00184
00185   BOOL bValidString;
00186   CString strMainToolbarTitle;
00187   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00188   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00189
00190   // TODO: Remove this if you don't want tool tips
00191   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() |
00192     CBRS_TOOLTIPS | CBRS_FLYBY);
00193   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
00194     CBRS_TOOLTIPS | CBRS_FLYBY);
00195
00196   return 0;
00197 }
00198
00199 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00200 {
00201   if( !CFrameWnd::PreCreateWindow(cs) )
00202     return FALSE;
00203   // TODO: Modify the Window class or styles here by modifying
00204   //  the CREATESTRUCT cs
00205
00206   return TRUE;
00207 }
00208
00209 /////////////////////////////////////////////////////////////////////////////
00210 // CMainFrame diagnostics
00211
00212 #ifdef _DEBUG
00213 void CMainFrame::AssertValid() const
00214 {
00215   CFrameWnd::AssertValid();
00216 }
00217
00218 void CMainFrame::Dump(CDumpContext& dc) const
00219 {
00220   CFrameWnd::Dump(dc);
00221 }
00222
00223 #endif //_DEBUG
00224
00225 /////////////////////////////////////////////////////////////////////////////
00226 // CMainFrame message handlers
00227
00228 void CMainFrame::OnViewCustomize()
00229 {
00230   //------------------------------------
00231   // Create a customize toolbars dialog:
00232   //------------------------------------
00233   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00234     TRUE /* Automatic menus scaning */
00235     );
00236
00237   pDlgCust->Create ();
00238 }
00239
00240 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00241 {
00242   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00243
00244   CMenu menu;
00245   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00246
00247   CMenu* pPopup = menu.GetSubMenu(0);
00248   ASSERT(pPopup != NULL);
00249
00250   if (pPopup)
00251   {
00252     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00253     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00254   }
00255
00256   return 0;
00257 }
00258
00259 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
00260 {
00261   UINT uiToolBarId = (UINT) wp;
00262   if (uiToolBarId != IDR_MAINFRAME)
00263   {
00264     return 0;
00265   }
00266
00267   // Replace "Back" and "Forward" buttons by the menu buttons
00268   // with the history lists:
00269
00270   CMenu menuHistory;
00271   menuHistory.LoadMenu (IDR_HISTORY_POPUP);
00272
00273   CMFCToolBarMenuButton btnBack (ID_GO_BACK, menuHistory,
00274           GetCmdMgr ()->GetCmdImage (ID_GO_BACK), _T("Back"));
00275   btnBack.m_bText = TRUE;
00276   m_wndToolBar.ReplaceButton (ID_GO_BACK, btnBack);
00277
00278   m_wndToolBar.ReplaceButton (ID_GO_FORWARD,
00279     CMFCToolBarMenuButton (ID_GO_FORWARD, menuHistory,
00280           GetCmdMgr ()->GetCmdImage (ID_GO_FORWARD), _T("Forward")));
00281
00282   // "Folders" button has a text label:
00283   m_wndToolBar.SetToolBarBtnText (m_wndToolBar.CommandToIndex (ID_VIEW_FOLDERS),
00284     _T("Folders"));
00285
00286   // Replace "Views" button by the menu button:
00287   CMenu menuViews;
00288   menuViews.LoadMenu (IDR_VIEWS_POPUP);
00289
00290   m_wndToolBar.ReplaceButton (ID_VIEW_VIEWS,
00291     CMFCToolBarMenuButton ((UINT)-1, menuViews,
00292           GetCmdMgr ()->GetCmdImage (ID_VIEW_VIEWS), _T("Views")));
00293
00294   return 0;
00295 }
00296
00297 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00298 {
00299   //---------------------------------------------------------
00300   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00301   //---------------------------------------------------------
00302   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00303
00304   if (pMenuPopup != NULL &&
00305     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00306   {
00307     if (CMFCToolBar::IsCustomizeMode ())
00308     {
00309       //----------------------------------------------------
00310       // Don't show toolbars list in the cuztomization mode!
00311       //----------------------------------------------------
00312       return FALSE;
00313     }
00314
00315     pMenuPopup->RemoveAllItems ();
00316
00317     CMenu menu;
00318     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00319
00320     CMenu* pPopup = menu.GetSubMenu(0);
00321     ASSERT(pPopup != NULL);
00322
00323     if (pPopup)
00324     {
00325       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00326     }
00327   }
00328
00329   return TRUE;
00330 }
00331
00332 void CMainFrame::OnViewFolders()
00333 {
00334   ShowPane (&m_wndFoldersBar,
00335           !(m_wndFoldersBar.GetStyle () & WS_VISIBLE),
00336           FALSE,TRUE);
00337   RecalcLayout ();
00338 }
00339
00340 void CMainFrame::OnUpdateViewFolders(CCmdUI* pCmdUI)
00341 {
00342   pCmdUI->SetCheck (m_wndFoldersBar.GetStyle () & WS_VISIBLE);
00343 }
00344
00345 CMFCShellTreeCtrl& CMainFrame::GetFolders ()
00346 {
00347   return m_wndFoldersBar.m_wndShellTree;
00348 }
00349
00350 void CMainFrame::SetCurrFolder (LPCTSTR lpszPath)
00351 {
00352   ASSERT (lpszPath != NULL);
00353   m_wndAddress.GetEditCtrl()->SetWindowText (lpszPath);
00354 }
00355
00356 void CMainFrame::OnNewAddress()
00357 {
00358   // gets called when an item in the Address combo box is selected
00359   // just navigate to the newly selected location.
00360   CString str;
00361
00362   m_wndAddress.GetLBText(m_wndAddress.GetCurSel(), str);
00363   ((CExplorerView*)GetActiveView())->m_wndList.DisplayFolder (str);
00364 }
00365
00366 void CMainFrame::OnNewAddressEnter()
00367 {
00368   CString str;
00369
00370   m_wndAddress.GetEditCtrl()->GetWindowText(str);
00371   ((CExplorerView*)GetActiveView())->m_wndList.DisplayFolder (str);
00372
00373   COMBOBOXEXITEM item;
00374
00375   item.mask = CBEIF_TEXT;
00376   item.iItem = -1;
00377   item.pszText = (LPTSTR)(LPCTSTR)str;
00378   m_wndAddress.InsertItem(&item);
00379 }
00380
00381
00382 BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
00383 {
00384   if (pMsg->message == WM_KEYUP)
00385   {
00386     if (pMsg->wParam == VK_TAB)
00387     {
00388       ActivateByTab();
00389     }
00390   }
00391   return CFrameWndEx::PreTranslateMessage(pMsg);
00392 }
00393
00394 void CMainFrame::ActivateByTab()
00395 {
00396   enum eActiveWindow { eAdressBar = 0, eFolderBar = 1, eExplorerView = 2 };
00397   int  nActiveWindow = eAdressBar;
00398
00399   CWnd *pWnd = GetFocus();
00400   if (pWnd != NULL)
00401   {
00402     ASSERT_VALID(pWnd);
00403
00404     if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCShellListCtrl)))
00405     {
00406       nActiveWindow = eExplorerView;
00407     }
00408     if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCShellTreeCtrl)))
00409     {
00410       nActiveWindow = eFolderBar;
00411     }
00412   }
00413   switch (nActiveWindow)
00414   {
00415   case eAdressBar:
00416     if (m_wndFoldersBar.IsVisible())
00417     {
00418       m_wndFoldersBar.SetFocus();
00419     }
00420     else
00421     {
00422       SetFocus();
00423     }
00424     break;
00425   case eFolderBar:
00426     SetFocus();
00427     break;
00428   case eExplorerView:
00429     m_wndAddress.SetFocus();
00430     break;
00431   default:
00432     break;
00433   }
00434 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynamicMenuView Member List

This is the complete list of members for CDynamicMenuView, including all inherited members.
CDynamicMenuView() | CDynamicMenuView | [protected]
GetDocument() | CDynamicMenuView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CDynamicMenuView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CDynamicMenuView | [protected]
OnDraw(CDC *pDC) | CDynamicMenuView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CDynamicMenuView | [protected, virtual]
OnFilePrintPreview() | CDynamicMenuView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CDynamicMenuView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CDynamicMenuView | [virtual]
~CDynamicMenuView() | CDynamicMenuView | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTextView Member List

This is the complete list of members for CTextView, including all inherited members.
CTextView() | CTextView | [protected]
GetDocument() | CTextView | [inline]
OnDraw(CDC *pDC) | CTextView | [virtual]
OnMouseActivate(CWnd *pDesktopWnd, UINT nHitTest, UINT message) | CTextView | [protected]
~CTextView() | CTextView | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/MainFrm.h Source File

  • internet
  • MFCIE

MainFrm.h

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MainFrm.h : interface of the CMainFrame class
00011 //
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_MAINFRM_H__47FF4081_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
00015 #define AFX_MAINFRM_H__47FF4081_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 class CMainFrame : public CFrameWnd
00022 {
00023 protected: // create from serialization only
00024   CMainFrame();
00025   DECLARE_DYNCREATE(CMainFrame)
00026
00027 // Attributes
00028 public:
00029   CStringArray m_astrFavoriteURLs;
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CMainFrame)
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 public:
00042   virtual ~CMainFrame();
00043 #ifdef _DEBUG
00044   virtual void AssertValid() const;
00045   virtual void Dump(CDumpContext& dc) const;
00046 #endif
00047   void SetAddress(LPCTSTR lpszUrl);
00048   void StartAnimation();
00049   int BuildFavoritesMenu(LPCTSTR pszPath, int nStartPos, CMenu* pMenu);
00050
00051 protected:  // control bar embedded members
00052   CStatusBar  m_wndStatusBar;
00053   CToolBar    m_wndToolBar;
00054   CReBar      m_wndReBar;
00055
00056 // Generated message map functions
00057 protected:
00058   CComboBoxEx m_wndAddress;
00059   CAnimateCtrl m_wndAnimate;
00060   //{{AFX_MSG(CMainFrame)
00061   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00062   //}}AFX_MSG
00063   afx_msg void DoNothing();
00064   afx_msg void OnNewAddress();
00065   afx_msg void OnNewAddressEnter();
00066   afx_msg void OnFavorite(UINT nID);
00067   afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult);
00068   DECLARE_MESSAGE_MAP()
00069 };
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072
00073 //{{AFX_INSERT_LOCATION}}
00074 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00075
00076 #endif // !defined(AFX_MAINFRM_H__47FF4081_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/resource.h Source File

  • controls
  • testhelp

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by testhelp.rc
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDI_ABOUTDLL                    1
00015 #define IDS_TESTHELP                    1
00016 #define IDB_TESTHELP                    1
00017 #define IDD_ABOUTBOX_TESTHELP           1
00018 #define IDS_TESTHELP_PPG                2
00019 #define IDS_COMPONENT_TYPE              3
00020 #define IDS_TESTHELP_PPG_CAPTION        100
00021 #define IDD_PROPPAGE_TESTHELP           100
00022 #define IDS_COMPONENT0_TITLE            101
00023 #define IDS_COMPONENT0_DESCRIPTION      102
00024 #define IDC_NAME1                       201
00025 #define IDC_NAME2                       202
00026 #define IDC_NAME3                       203
00027 #define IDC_USEMINE                     204
00028 #define IDC_USETOOLTIP                  206
00029 #define IDC_TIPCAPTION                  207
00030 #define IDC_POPUPHELP                   209
00031 #define IDC_FULLHELP                    210
00032
00033 // Next default values for new objects
00034 //
00035 #ifdef APSTUDIO_INVOKED
00036 #ifndef APSTUDIO_READONLY_SYMBOLS
00037 #define _APS_NEXT_RESOURCE_VALUE        201
00038 #define _APS_NEXT_COMMAND_VALUE         32768
00039 #define _APS_NEXT_CONTROL_VALUE         211
00040 #define _APS_NEXT_SYMED_VALUE           101
00041 #endif
00042 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mdi.h Source File

  • general
  • mdi

mdi.h

Go to the documentation of this file.
00001 // mdi.h : main header file for the MDI application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CMdiApp:
00020 // See mdi.cpp for the implementation of this class
00021 //
00022
00023 class CMdiApp : public CWinApp
00024 {
00025 public:
00026   CMdiApp();
00027
00028 // Overrides
00029   virtual BOOL InitInstance();
00030
00031 // Implementation
00032
00033   //{{AFX_MSG(CMdiApp)
00034     afx_msg void OnAppAbout();
00035   //}}AFX_MSG
00036   DECLARE_MESSAGE_MAP()
00037 };
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // other globals
00041
00042 extern COLORREF NEAR colorArray[];      // color index table
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagSECTIONHEADER Member List

This is the complete list of members for tagSECTIONHEADER, including all inherited members.
cbSection | tagSECTIONHEADER
cProperties | tagSECTIONHEADER
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/stdafx.h Source File

  • general
  • viewex

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #define VC_EXTRALEAN
00011
00012 #include <afxwin.h>
00013 #include <afxext.h>         // MFC extensions like CFormView, CSplitterWnd
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TstCon.odl Source File

  • ole
  • TstCon

TstCon.odl

Go to the documentation of this file.
00001 // TestContainer98.odl : type library source for TestContainer98.exe
00002
00003 // This file will be processed by the MIDL compiler to produce the
00004 // type library (TestContainer98.tlb).
00005
00006 [ uuid(198184FB-B837-11D0-8DF1-00C04FB68D60), version(1.0) ]
00007 library TestContainer98
00008 {
00009   importlib( "stdole32.tlb" );
00010
00011   //  Primary dispatch interface for CTestContainer98Doc
00012
00013   [ uuid(198184FC-B837-11D0-8DF1-00C04FB68D60) ]
00014   dispinterface ITestContainer98
00015   {
00016     properties:
00017       // NOTE - ClassWizard will maintain property information here.
00018       //    Use extreme caution when editing this section.
00019       //{{AFX_ODL_PROP(CTestContainer98Doc)
00020       [id(1)] IDispatch* PrimarySelection;
00021       //}}AFX_ODL_PROP
00022
00023     methods:
00024       // NOTE - ClassWizard will maintain method information here.
00025       //    Use extreme caution when editing this section.
00026       //{{AFX_ODL_METHOD(CTestContainer98Doc)
00027       [id(2)] IDispatch* FindControl(BSTR pszName);
00028       [id(3)] void Log(BSTR pszMessage);
00029       [id(4)] IDispatch* InsertControl(BSTR pszProgID, BSTR pszName);
00030       //}}AFX_ODL_METHOD
00031
00032   };
00033
00034    [ uuid( CC6568DE-0EAF-11d1-8E2F-00C04FB68D60 ) ]
00035    dispinterface ITestContainer98Events
00036    {
00037    properties:
00038
00039    methods:
00040       [id(1)] void OnNewControl( IDispatch* pControl );
00041    };
00042
00043   //  Class information for CTestContainer98Doc
00044
00045   [ uuid(198184FA-B837-11D0-8DF1-00C04FB68D60) ]
00046   coclass Document
00047   {
00048     [default] dispinterface ITestContainer98;
00049       [default, source] dispinterface ITestContainer98Events;
00050   };
00051
00052   //{{AFX_APPEND_ODL}}
00053   //}}AFX_APPEND_ODL}}
00054 };
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/resource.h Source File

  • vc2008fp
  • TabbedView

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by TabbedView.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDD_FORMVIEW                    101
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_TABBEDTYPE                  129
00010 #define IDR_CONTEXT_MENU                130
00011 #define IDR_POPUP_TOOLBAR               131
00012 #define IDD_ABOUTBOX                    999
00013 #define IDC_EDIT1                       1041
00014 #define IDC_CHECK1                      1042
00015 #define ID_VIEW_CUSTOMIZE               32770
00016 #define ID_VIEW_TOOLBARS                32771
00017
00018 // Next default values for new objects
00019 //
00020 #ifdef APSTUDIO_INVOKED
00021 #ifndef APSTUDIO_READONLY_SYMBOLS
00022 #define _APS_3D_CONTROLS                     1
00023 #define _APS_NEXT_RESOURCE_VALUE        151
00024 #define _APS_NEXT_COMMAND_VALUE         32822
00025 #define _APS_NEXT_CONTROL_VALUE         1043
00026 #define _APS_NEXT_SYMED_VALUE           107
00027 #endif
00028 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgbars.cpp Source File

  • general
  • dlgcbr32

Dlgbars.cpp

Go to the documentation of this file.
00001 // DLGBARS.cpp : Defines the class behaviors for the dialog tool bar
00002 //               and status bar.
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include <afxpriv.h>
00015
00016 #include "dlgbars.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDlgToolBar
00026
00027 BEGIN_MESSAGE_MAP(CDlgToolBar, CToolBar)
00028   //{{AFX_MSG_MAP(CDlgToolBar)
00029   ON_MESSAGE(WM_IDLEUPDATECMDUI, OnIdleUpdateCmdUI)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CDlgToolBar Construction/Destruction
00037
00038 CDlgToolBar::CDlgToolBar()
00039 {
00040 }
00041
00042 CDlgToolBar::~CDlgToolBar()
00043 {
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CDlgToolBar::OnIdleUpdateCmdUI
00048 //      OnIdleUpdateCmdUI handles the WM_IDLEUPDATECMDUI message, which is
00049 //      used to update the status of user-interface elements within the MFC
00050 //      framework.
00051 //
00052 //      We have to get a little tricky here: CToolBar::OnUpdateCmdUI
00053 //      expects a CFrameWnd pointer as its first parameter.  However, it
00054 //      doesn't do anything but pass the parameter on to another function
00055 //      which only requires a CCmdTarget pointer.  We can get a CWnd pointer
00056 //      to the parent window, which is a CCmdTarget, but may not be a
00057 //      CFrameWnd.  So, to make CToolBar::OnUpdateCmdUI happy, we will call
00058 //      our CWnd pointer a CFrameWnd pointer temporarily.
00059
00060 LRESULT CDlgToolBar::OnIdleUpdateCmdUI(WPARAM wParam, LPARAM)
00061 {
00062   if (IsWindowVisible())
00063   {
00064     CFrameWnd *pParent = (CFrameWnd *)GetParent();
00065     if (pParent)
00066       OnUpdateCmdUI(pParent, (BOOL)wParam);
00067   }
00068   return 0L;
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CDlgStatusBar
00073
00074 BEGIN_MESSAGE_MAP(CDlgStatusBar, CStatusBar)
00075   //{{AFX_MSG_MAP(CDlgStatusBar)
00076   ON_MESSAGE(WM_IDLEUPDATECMDUI, OnIdleUpdateCmdUI)
00077   //}}AFX_MSG_MAP
00078 END_MESSAGE_MAP()
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CDlgStatusBar Construction/Destruction
00082
00083 CDlgStatusBar::CDlgStatusBar()
00084 {
00085 }
00086
00087 CDlgStatusBar::~CDlgStatusBar()
00088 {
00089 }
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // CDlgStatusBar::OnIdleUpdateCmdUI
00093 //      OnIdleUpdateCmdUI handles the WM_IDLEUPDATECMDUI message, which is
00094 //      used to update the status of user-interface elements within the MFC
00095 //      framework.
00096 //
00097 //      We have to get a little tricky here: CStatusBar::OnUpdateCmdUI
00098 //      expects a CFrameWnd pointer as its first parameter.  However, it
00099 //      doesn't do anything but pass the parameter on to another function
00100 //      which only requires a CCmdTarget pointer.  We can get a CWnd pointer
00101 //      to the parent window, which is a CCmdTarget, but may not be a
00102 //      CFrameWnd.  So, to make CStatusBar::OnUpdateCmdUI happy, we will call
00103 //      our CWnd pointer a CFrameWnd pointer temporarily.
00104
00105 LRESULT CDlgStatusBar::OnIdleUpdateCmdUI(WPARAM wParam, LPARAM)
00106 {
00107   if (IsWindowVisible())
00108   {
00109     CFrameWnd *pParent = (CFrameWnd *)GetParent();
00110     if (pParent)
00111       OnUpdateCmdUI(pParent, (BOOL)wParam);
00112   }
00113   return 0L;
00114 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/AllControlsSheet.h Source File

  • controls
  • cmnctrl

AllControlsSheet.h

Go to the documentation of this file.
00001 // AllControlsSheet.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CAllControlsSheet
00015
00016 #include "CmnCtrl3.h"
00017 #include "PagerCtrlPage.h"
00018 #include "NetAddressCtrlPage.h"
00019 #include "SplitButtonCtrlPage.h"
00020 #include "CommandLinkCtrlPage.h"
00021
00022 class CAllControlsSheet : public CPropertySheet
00023 {
00024   DECLARE_DYNAMIC(CAllControlsSheet)
00025
00026 // Construction
00027 public:
00028   CAllControlsSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00029   CAllControlsSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00030
00031 protected:
00032   void AddControlPages(void);
00033
00034 // Attributes
00035 public:
00036
00037   CSplitButtonCtrlPage   m_splitButtonpage;
00038   CPagerCtrlPage         m_pagectrlpage;
00039   CNetAddressCtrlPage    m_netaddressctrlpage;
00040   CCommandLinkCtrlPage   m_commandLinkpage;
00041
00042 // Operations
00043 public:
00044
00045 // Overrides
00046   // ClassWizard generated virtual function overrides
00047   //{{AFX_VIRTUAL(CAllControlsSheet)
00048   public:
00049   virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00050   //}}AFX_VIRTUAL
00051
00052 // Implementation
00053 public:
00054   virtual ~CAllControlsSheet();
00055   virtual BOOL OnInitDialog();
00056
00057   // Generated message map functions
00058 protected:
00059
00060   HICON m_hIcon;
00061
00062   //{{AFX_MSG(CAllControlsSheet)
00063   afx_msg HCURSOR OnQueryDragIcon();
00064   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00065   //}}AFX_MSG
00066
00067   DECLARE_MESSAGE_MAP()
00068 };
00069
00070 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemo.h Source File

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #ifndef __AFXWIN_H__
00013 #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CVisualStudioDemoApp:
00020 // See VisualStudioDemo.cpp for the implementation of this class
00021 //
00022
00023 class CVisualStudioDemoApp : public CWinAppEx
00024 {
00025 public:
00026   CVisualStudioDemoApp();
00027   virtual ~CVisualStudioDemoApp();
00028
00029   BOOL m_bHiColorIcons;
00030
00031   virtual void PreLoadState();
00032   virtual void LoadCustomState();
00033   virtual void SaveCustomState();
00034
00035   CMultiDocTemplate* m_pDocTemplateCpp;
00036   CMultiDocTemplate* m_pStartDocTemplate;
00037
00038   // Overrides
00039 public:
00040   virtual BOOL InitInstance();
00041   virtual int ExitInstance();
00042   virtual BOOL SaveAllModified();
00043
00044   // Implementation
00045   afx_msg void OnAppAbout();
00046   afx_msg void OnHelpShowStart();
00047   afx_msg void OnViewAppLook();
00048
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 extern CVisualStudioDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFavoritesManager Member List

This is the complete list of members for CFavoritesManager, including all inherited members.
CFavoritesManager() | CFavoritesManager |
CreateMenu(CMenu &menu) | CFavoritesManager |
FillTree(CTreeCtrl &wndTree) | CFavoritesManager |
GetFolderIcon() const | CFavoritesManager | [inline]
GetIDIcon(UINT uiCommandID) const | CFavoritesManager |
GetInternetShortcutIcon() const | CFavoritesManager | [inline]
GetSysImages() const | CFavoritesManager | [inline]
GetSysImageSize() const | CFavoritesManager | [inline]
GetURLofID(UINT uiCommandID) const | CFavoritesManager |
Load() | CFavoritesManager |
m_himSystem | CFavoritesManager | [protected]
m_Root | CFavoritesManager | [protected]
m_SysImageSize | CFavoritesManager | [protected]
~CFavoritesManager() | CFavoritesManager | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/button.h Source File

  • controls
  • button

button.h

Go to the documentation of this file.
00001 // button.h : main header file for BUTTON.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined( __AFXCTL_H__ )
00013   #error include 'afxctl.h' before including this file
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CButtonApp : See button.cpp for implementation.
00020
00021 class CButtonApp : public COleControlModule
00022 {
00023 public:
00024   BOOL InitInstance();
00025   int ExitInstance();
00026 };
00027
00028 extern const GUID CDECL _tlid;
00029 extern const WORD _wVerMajor;
00030 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CParsedEditExported Member List

This is the complete list of members for CParsedEditExported, including all inherited members.
CParsedEdit class | CParsedEditExported | [friend]
CParsedEdit::CParsedEdit() | CParsedEdit |
CParsedEditExported() | CParsedEditExported | [inline]
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CParsedEdit |
DECLARE_MESSAGE_MAP() | CParsedEditExported | [protected]
lpfnSuperEdit | CParsedEditExported | [protected, static]
m_wParseStyle | CParsedEdit | [protected]
OnBadInput() | CParsedEdit | [virtual]
OnChar(UINT, UINT, UINT) | CParsedEdit | [protected]
OnNcCreate(LPCREATESTRUCT lpCreateStruct) | CParsedEditExported | [protected]
OnVScroll(UINT, UINT, CScrollBar *) | CParsedEdit | [protected]
PostNcDestroy() | CParsedEditExported | [protected, virtual]
RegisterControlClass() | CParsedEditExported |
SubclassEdit(UINT nID, CWnd *pParent, WORD wParseStyle) | CParsedEdit |
WndProcHook(HWND, UINT, WPARAM, LPARAM) | CParsedEditExported | [protected, static]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stylepge.cpp Source File

  • general
  • propdlg

stylepge.cpp

Go to the documentation of this file.
00001 // stylepge.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014 #include "stylepge.h"
00015 #include "colorpge.h"
00016 #include "shapeobj.h"
00017 #include "preview.h"
00018 #include "propsht.h"
00019 #include "propsht2.h"
00020
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CStylePage dialog
00029
00030 CStylePage::CStylePage() : CPropertyPage(CStylePage::IDD)
00031 {
00032   //{{AFX_DATA_INIT(CStylePage)
00033   //}}AFX_DATA_INIT
00034   m_nShapeStyle = rectangle;
00035 }
00036
00037 void CStylePage::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CPropertyPage::DoDataExchange(pDX);
00040   //{{AFX_DATA_MAP(CStylePage)
00041   DDX_Radio(pDX, IDC_RECTANGLE, m_nShapeStyle);
00042   //}}AFX_DATA_MAP
00043 }
00044
00045 void CStylePage::OnStyleClicked(UINT /*nCmdID*/)
00046 {
00047   // The CStylePage property page is used for both the
00048   // CModalShapePropSheet and the CModelessShapePropSheet.
00049   // Both these versions of the property sheet share a common
00050   // feature that they immediately update a shape.  In the
00051   // case of CModalShapePropSheet, the shape is in the preview
00052   // window.  In the case of CModelessShapePropSheet, the shape
00053   // is the currently selected shape in the view.
00054
00055   CPropertySheet* pSheet = STATIC_DOWNCAST(CPropertySheet, GetParent());
00056
00057   CModalShapePropSheet* pModalSheet =
00058     DYNAMIC_DOWNCAST(CModalShapePropSheet, pSheet);
00059   if (pModalSheet != NULL)
00060   {
00061     UpdateData();
00062     pModalSheet->UpdateShapePreview();
00063     SetModified(); // enable Apply Now button
00064   }
00065
00066   CModelessShapePropSheet* pModelessSheet =
00067     DYNAMIC_DOWNCAST(CModelessShapePropSheet, pSheet);
00068   if (pModelessSheet != NULL)
00069   {
00070     UpdateData();
00071     CFrameWnd* pFrameWnd = STATIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
00072     CView* pView = pFrameWnd->GetActiveFrame()->GetActiveView();
00073     pView->SendMessage(WM_USER_CHANGE_OBJECT_PROPERTIES, 0, 0);
00074   }
00075 }
00076
00077 BEGIN_MESSAGE_MAP(CStylePage, CPropertyPage)
00078   ON_CONTROL_RANGE(BN_CLICKED, IDC_RECTANGLE, IDC_ELLIPSE, OnStyleClicked)
00079   //{{AFX_MSG_MAP(CStylePage)
00080     // NOTE: the ClassWizard will add message map macros here
00081   //}}AFX_MSG_MAP
00082 END_MESSAGE_MAP()
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // CStylePage message handlers
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/helpids.h Source File

  • ole
  • wordpad

helpids.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #define IDH_WORDPAD_TIMEDATE        1001
00011
00012 #define IDH_WORDPAD_ALIGN           1003
00013 #define IDH_WORDPAD_TABSET          1004
00014 #define IDH_WORDPAD_TABCLEAR        1005
00015 #define IDH_WORDPAD_TAB_CLEARALL    1006
00016 #define IDH_WORDPAD_TABSTOPS        1007
00017 #define IDH_WORDPAD_TEXTFILE        1008
00018 #define IDH_WORDPAD_FORMATTED       1009
00019
00020 #define IDH_WORDPAD_WORD6FILE       1017
00021 #define IDH_WORDPAD_FILENEW_DOC     1018
00022 #define IDH_WORDPAD_OPTIONS_AUTOWORDSEL 1019
00023
00024 #define IDH_WORDPAD_INDENT_LEFT     1020
00025 #define IDH_WORDPAD_INDENT_RIGHT    1021
00026 #define IDH_WORDPAD_INDENT_FIRST    1022
00027
00028 #define IDH_WORDPAD_WRAP_NO         1023
00029 #define IDH_WORDPAD_WRAP_WINDOW     1024
00030 #define IDH_WORDPAD_WRAP_RULER      1025
00031
00032 #define IDH_COMM_GROUPBOX           1026
00033
00034 #define IDH_WORDPAD_INCHES          1027
00035 #define IDH_WORDPAD_CENTIMETERS     1028
00036 #define IDH_WORDPAD_POINTS          1029
00037 #define IDH_WORDPAD_PICAS           1030
00038
00039 #define IDH_WORDPAD_CHECK_TOOLBAR   1031
00040 #define IDH_WORDPAD_CHECK_FORMATBAR 1032
00041 #define IDH_WORDPAD_CHECK_STATUSBAR 1033
00042 #define IDH_WORDPAD_CHECK_RULERBAR  1034
00043
00044 #define IDH_WORDPAD_TOPMARGIN       1035
00045 #define IDH_WORDPAD_BOTTOMMARGIN    1036
00046 #define IDH_WORDPAD_LEFTMARGIN      1037
00047 #define IDH_WORDPAD_RIGHTMARGIN     1038
00048
00049 #define IDH_WORDPAD_SPACE_BEFORE  1039
00050 #define IDH_WORDPAD_SPACE_AFTER   1040
00051 #define IDH_WORDPAD_PAGEBREAK   1041
00052
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMutexesDlg Member List

This is the complete list of members for CMutexesDlg, including all inherited members.
AddToListBox(LPCTSTR szBuffer) | CMutexesDlg |
CMutexesDlg(CWnd *pParent=NULL) | CMutexesDlg |
DoDataExchange(CDataExchange *pDX) | CMutexesDlg | [protected, virtual]
IDD enum value | CMutexesDlg |
m_hIcon | CMutexesDlg | [protected]
m_mutex | CMutexesDlg |
m_pCounterThread | CMutexesDlg |
m_pDisplayThread | CMutexesDlg |
m_strNumber | CMutexesDlg |
OnClose() | CMutexesDlg | [protected]
OnInitDialog() | CMutexesDlg | [protected, virtual]
OnPaint() | CMutexesDlg | [protected]
OnPause() | CMutexesDlg | [protected]
OnPriorityChange(UINT nID) | CMutexesDlg |
OnPriorityChangeCntr() | CMutexesDlg | [protected]
OnPriorityChangeDisp() | CMutexesDlg | [protected]
OnPriorityClassChange() | CMutexesDlg | [protected]
OnQueryDragIcon() | CMutexesDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CMutexesDlg | [protected]
~CMutexesDlg() | CMutexesDlg |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CToolBarCtrlPage Member List

This is the complete list of members for CToolBarCtrlPage, including all inherited members.
ChangeCtrlStyle(long lStyle, BOOL bSetStyle) | CToolBarCtrlPage | [protected]
CToolBarCtrlPage() | CToolBarCtrlPage |
DoDataExchange(CDataExchange *pDX) | CToolBarCtrlPage | [protected, virtual]
IDD enum value | CToolBarCtrlPage | [protected]
m_bAltDrag | CToolBarCtrlPage | [protected]
m_PaletteBar | CToolBarCtrlPage | [protected]
m_StandardBar | CToolBarCtrlPage | [protected]
m_ToolTip | CToolBarCtrlPage | [protected]
OnAltdrag() | CToolBarCtrlPage | [protected]
OnInitDialog() | CToolBarCtrlPage | [protected, virtual]
WindowProc(UINT message, WPARAM wParam, LPARAM lParam) | CToolBarCtrlPage | [protected, virtual]
~CToolBarCtrlPage() | CToolBarCtrlPage |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAllControlsSheet Member List

This is the complete list of members for CAllControlsSheet, including all inherited members.
AddControlPages(void) | CAllControlsSheet | [protected]
AddControlPages(void) | CAllControlsSheet | [protected]
AddControlPages(void) | CAllControlsSheet | [protected]
CAllControlsSheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CAllControlsSheet |
CAllControlsSheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CAllControlsSheet |
CAllControlsSheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CAllControlsSheet |
CAllControlsSheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CAllControlsSheet |
CAllControlsSheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CAllControlsSheet |
CAllControlsSheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CAllControlsSheet |
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CAllControlsSheet | [virtual]
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CAllControlsSheet | [virtual]
m_animctrlpage | CAllControlsSheet |
m_commandLinkpage | CAllControlsSheet |
m_datetimepage | CAllControlsSheet |
m_hIcon | CAllControlsSheet | [protected]
m_monthcalpage | CAllControlsSheet |
m_netaddressctrlpage | CAllControlsSheet |
m_pagectrlpage | CAllControlsSheet |
m_progctrlpage | CAllControlsSheet |
m_sliderctrlpage | CAllControlsSheet |
m_spinctrlpage | CAllControlsSheet |
m_splitButtonpage | CAllControlsSheet |
m_toolbarpage | CAllControlsSheet |
m_treectrlpage | CAllControlsSheet |
OnInitDialog() | CAllControlsSheet | [virtual]
OnInitDialog() | CAllControlsSheet | [virtual]
OnInitDialog() | CAllControlsSheet | [virtual]
OnQueryDragIcon() | CAllControlsSheet | [protected]
OnQueryDragIcon() | CAllControlsSheet | [protected]
OnQueryDragIcon() | CAllControlsSheet | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CAllControlsSheet | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CAllControlsSheet | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CAllControlsSheet | [protected]
~CAllControlsSheet() | CAllControlsSheet | [virtual]
~CAllControlsSheet() | CAllControlsSheet | [virtual]
~CAllControlsSheet() | CAllControlsSheet | [virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonListFontButton Member List

This is the complete list of members for CRibbonListFontButton, including all inherited members.
AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems &arItems) | CRibbonListFontButton |
Clear() | CRibbonListFontButton | [virtual]
CopyFrom(const CMFCRibbonBaseElement &src) | CRibbonListFontButton | [protected, virtual]
CRibbonListFontButton() | CRibbonListFontButton |
CRibbonListFontButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex) | CRibbonListFontButton |
CRibbonListFontButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems &arItems) | CRibbonListFontButton |
GetIconSize() const | CRibbonListFontButton | [protected, virtual]
m_arItems | CRibbonListFontButton | [protected]
m_listImages | CRibbonListFontButton | [protected]
m_sizeMargins | CRibbonListFontButton | [protected]
m_sizeMaxText | CRibbonListFontButton | [protected]
OnDrawPaletteIcon(CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText) | CRibbonListFontButton | [protected, virtual]
OnShowPopupMenu() | CRibbonListFontButton | [protected, virtual]
RecalcTextSizes(CDC *pDC) | CRibbonListFontButton | [protected]
UpdateToolTips() | CRibbonListFontButton | [protected]
XItems typedef | CRibbonListFontButton |
~CRibbonListFontButton() | CRibbonListFontButton | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRollupPaneView Member List

This is the complete list of members for CRollupPaneView, including all inherited members.
CRollupPaneView() | CRollupPaneView | [protected]
GetDocument() const | CRollupPaneView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CRollupPaneView | [protected, virtual]
OnDraw(CDC *pDC) | CRollupPaneView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CRollupPaneView | [protected, virtual]
OnFilePrintPreview() | CRollupPaneView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CRollupPaneView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CRollupPaneView | [virtual]
~CRollupPaneView() | CRollupPaneView | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/cntritem.cpp Source File

  • vc2008fp
  • WordPad

cntritem.cpp

Go to the documentation of this file.
00001 //
00002 // cntritem.cpp : implementation of the CWordPadCntrItem class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016
00017 #include "wordpdoc.h"
00018 #include "wordpvw.h"
00019 #include "cntritem.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CWordPadCntrItem implementation
00028
00029 IMPLEMENT_SERIAL(CWordPadCntrItem, CRichEditCntrItem, 0)
00030
00031 CWordPadCntrItem::CWordPadCntrItem(REOBJECT *preo, CWordPadDoc* pContainer)
00032   : CRichEditCntrItem(preo, pContainer)
00033 {
00034 }
00035
00036
00037 BOOL CWordPadCntrItem::OnShowPanes(CFrameWnd* pFrameWnd, BOOL bShow)
00038 {
00039   CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST (CMDIFrameWndEx, pFrameWnd);
00040   if (pMainFrame != NULL)
00041   {
00042     return pMainFrame->OnShowPanes (bShow);
00043   }
00044   else  // Maybe, SDI frame...
00045   {
00046     CFrameWndEx* pFrame = DYNAMIC_DOWNCAST (CFrameWndEx, pFrameWnd);
00047     if (pFrame != NULL)
00048     {
00049       return pFrame->OnShowPanes (bShow);
00050     }
00051   }
00052
00053   return FALSE;
00054 }
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CWordPadCntrItem diagnostics
00058
00059 #ifdef _DEBUG
00060 void CWordPadCntrItem::AssertValid() const
00061 {
00062   CRichEditCntrItem::AssertValid();
00063 }
00064
00065 void CWordPadCntrItem::Dump(CDumpContext& dc) const
00066 {
00067   CRichEditCntrItem::Dump(dc);
00068 }
00069 #endif
00070
00071 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibapi.h Source File

  • general
  • diblook

dibapi.h

Go to the documentation of this file.
00001 // dibapi.h
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef _INC_DIBAPI
00014 #define _INC_DIBAPI
00015
00016 /* Handle to a DIB */
00017 DECLARE_HANDLE(HDIB);
00018
00019 /* DIB constants */
00020 #define PALVERSION   0x300
00021
00022 /* DIB Macros*/
00023
00024 #define IS_WIN30_DIB(lpbi)  ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
00025 #define RECTWIDTH(lpRect)     ((lpRect)->right - (lpRect)->left)
00026 #define RECTHEIGHT(lpRect)    ((lpRect)->bottom - (lpRect)->top)
00027
00028 // WIDTHBYTES performs DWORD-aligning of DIB scanlines.  The "bits"
00029 // parameter is the bit count for the scanline (biWidth * biBitCount),
00030 // and this macro returns the number of DWORD-aligned bytes needed
00031 // to hold those bits.
00032
00033 #define WIDTHBYTES(bits)    (((bits) + 31) / 32 * 4)
00034
00035 /* Function prototypes */
00036 BOOL      WINAPI  PaintDIB (HDC, LPRECT, HDIB, LPRECT, CPalette* pPal);
00037 BOOL      WINAPI  CreateDIBPalette(HDIB hDIB, CPalette* cPal);
00038 LPSTR     WINAPI  FindDIBBits (LPSTR lpbi);
00039 DWORD     WINAPI  DIBWidth (LPSTR lpDIB);
00040 DWORD     WINAPI  DIBHeight (LPSTR lpDIB);
00041 WORD      WINAPI  PaletteSize (LPSTR lpbi);
00042 WORD      WINAPI  DIBNumColors (LPSTR lpbi);
00043 HGLOBAL   WINAPI  CopyHandle (HGLOBAL h);
00044
00045 BOOL      WINAPI  SaveDIB (HDIB hDib, CFile& file);
00046 HDIB      WINAPI  ReadDIBFile(CFile& file);
00047
00048 #endif //!_INC_DIBAPI
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinppg.cpp Source File

  • controls
  • spindial

spinppg.cpp

Go to the documentation of this file.
00001 // spinppg.cpp : Implementation of the CSpindialPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "spindial.h"
00015 #include "spinppg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 IMPLEMENT_DYNCREATE(CSpindialPropPage, COlePropertyPage)
00024
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // Message map
00028
00029 BEGIN_MESSAGE_MAP(CSpindialPropPage, COlePropertyPage)
00030   //{{AFX_MSG_MAP(CSpindialPropPage)
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // Initialize class factory and guid
00037
00038 IMPLEMENT_OLECREATE_EX(CSpindialPropPage, "SPINDIAL.SpindialPropPage.1",
00039   0x37446b8b, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CSpindialPropPage::CSpindialPropPageFactory::UpdateRegistry -
00044 // Adds or removes system registry entries for CSpindialPropPage
00045
00046 BOOL CSpindialPropPage::CSpindialPropPageFactory::UpdateRegistry(BOOL bRegister)
00047 {
00048   if (bRegister)
00049     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00050       m_clsid, IDS_SPINDIAL_PPG);
00051   else
00052     return AfxOleUnregisterClass(m_clsid, NULL);
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CSpindialPropPage::CSpindialPropPage - Constructor
00058
00059 CSpindialPropPage::CSpindialPropPage() :
00060   COlePropertyPage(IDD, IDS_SPINDIAL_PPG_CAPTION)
00061 {
00062   //{{AFX_DATA_INIT(CSpindialPropPage)
00063   m_NeedlePosition = 0;
00064   //}}AFX_DATA_INIT
00065 }
00066
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CSpindialPropPage::DoDataExchange - Moves data between page and properties
00070
00071 void CSpindialPropPage::DoDataExchange(CDataExchange* pDX)
00072 {
00073   //{{AFX_DATA_MAP(CSpindialPropPage)
00074   DDP_Text(pDX, IDC_POSITIONEDIT, m_NeedlePosition, _T("NeedlePosition"));
00075   DDX_Text(pDX, IDC_POSITIONEDIT, m_NeedlePosition);
00076   DDV_MinMaxInt(pDX, m_NeedlePosition, 0, 3);
00077   //}}AFX_DATA_MAP
00078   DDP_PostProcessing(pDX);
00079 }
00080
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CSpindialPropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/TaskPane.cpp Source File

  • vc2008fp
  • WordPad

TaskPane.cpp

Go to the documentation of this file.
00001 //
00002 // TaskPane.cpp : implementation file
00003 //
00004
00005 #include "stdafx.h"
00006 #include "wordpad.h"
00007 #include "TaskPane.h"
00008
00009 #ifdef _DEBUG
00010 #define new DEBUG_NEW
00011 #undef THIS_FILE
00012 static char THIS_FILE[] = __FILE__;
00013 #endif
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CTaskPane
00017
00018 CTaskPane::CTaskPane()
00019 {
00020   m_nDocumentsGroup = -1;
00021 }
00022
00023 CTaskPane::~CTaskPane()
00024 {
00025 }
00026
00027
00028 BEGIN_MESSAGE_MAP(CTaskPane, CMFCTasksPane)
00029   //{{AFX_MSG_MAP(CTaskPane)
00030   ON_WM_CREATE()
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CTaskPane message handlers
00037
00038 int CTaskPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
00039 {
00040   if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
00041     return -1;
00042
00043   SetIconsList (IDB_TASKS, 16);
00044
00045   SetCaption (_T("Tasks Pane"));
00046   SetPageCaption (0, _T("New document"));
00047
00048   m_nDocumentsGroup = AddGroup (_T("Open a document"), FALSE, TRUE);
00049
00050   // Add MRU list
00051   AddMRUFilesList (m_nDocumentsGroup);
00052   AddTask (m_nDocumentsGroup, _T("More Documents..."), 0, ID_FILE_OPEN);
00053
00054   int nPage1Gr2 = AddGroup (_T("New"));
00055
00056   AddTask (nPage1Gr2, _T("Blank Document"), 1, ID_FILE_NEW);
00057
00058   AddTask (nPage1Gr2, _T("Blank Web Page"), 2, ID_DUMMY);
00059   AddSeparator (nPage1Gr2);
00060   AddTask (nPage1Gr2, _T("Blank E-mail message"), 3, ID_DUMMY);
00061
00062   int nPage1Gr3 = AddGroup (_T("New from existing document"));
00063
00064   AddTask (nPage1Gr3, _T("Choose document..."), 4, ID_DUMMY);
00065
00066   int nPage1Gr4 = AddGroup (_T("New from template"));
00067
00068   AddTask (nPage1Gr4, _T("General Templates..."), 5, ID_DUMMY);
00069   AddTask (nPage1Gr4, _T("Templates on my Web Sites..."), 6, ID_DUMMY);
00070   AddTask (nPage1Gr4, _T("Templates on Microsoft.com..."), 7, ID_DUMMY);
00071
00072   int nPage1Gr5 = AddGroup (_T(""), TRUE /* Group at bottom */);
00073
00074   AddTask (nPage1Gr5, _T("Add Network Place..."), 8, ID_DUMMY);
00075   AddTask (nPage1Gr5, _T("Help..."), 9, ID_DUMMY);
00076   AddLabel (nPage1Gr5, _T("Label"));
00077
00078   //--------
00079   // Page 2:
00080   //--------
00081   int nPage2 = AddPage (_T("Basic Search"));
00082
00083   int nPage2Gr1 = AddGroup (nPage2, _T("Search for:"));
00084
00085   AddTask (nPage2Gr1, _T("Search Tips..."), 9, ID_DUMMY);
00086
00087   int nPage2Gr3 = AddGroup (nPage2, _T("See also:"));
00088
00089   AddTask (nPage2Gr3, _T("Advanced Search"), 9, ID_DUMMY);
00090   AddTask (nPage2Gr3, _T("Find in this document..."), 9, ID_DUMMY);
00091
00092   //--------
00093   // Page 3:
00094   //--------
00095   int nPage3 = AddPage (_T("Custom page"));
00096
00097   int nPage3Gr1 = AddGroup (nPage3, _T("Folders"));
00098
00099   if (!CreateTreeWindow())
00100   {
00101     TRACE0("Failed to create the custom window\n");
00102     return -1;      // fail to create
00103   }
00104
00105   AddWindow (nPage3Gr1, m_wndTree.GetSafeHwnd (), 65);
00106   AddTask (nPage3Gr1, _T("My favorites..."), 0, ID_DUMMY);
00107
00108   int nPage3Gr2 = AddGroup (nPage3, _T("Enter your text"));
00109
00110   CRect rectDummy;
00111   rectDummy.SetRectEmpty ();
00112   DWORD dwEditStyle = WS_CHILD | WS_VISIBLE | WS_BORDER |
00113     ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_WANTRETURN;
00114   m_Font.CreateStockObject (DEFAULT_GUI_FONT);
00115   if (!m_wndEdit.Create (dwEditStyle, rectDummy, this, (UINT)-1))
00116   {
00117     TRACE0("Failed to create the edit window\n");
00118     return -1;      // fail to create
00119   }
00120   m_wndEdit.SetFont (&m_Font);
00121   m_wndEdit.SetWindowText(
00122     _T("This is the standard multiline Edit Box.\r\nHere you can type your text."));
00123
00124   AddWindow (nPage3Gr2, m_wndEdit.GetSafeHwnd (), 65);
00125   return 0;
00126 }
00127
00128 void CTaskPane::UpdateMRUFilesList ()
00129 {
00130   AddMRUFilesList (m_nDocumentsGroup);
00131   RedrawWindow ();
00132 }
00133
00134 BOOL CTaskPane::CreateTreeWindow()
00135 {
00136   CRect rectDummy (0, 0, 0, 0);
00137   const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;
00138
00139   if (!m_wndTree.Create (dwTreeStyle, rectDummy, this, (UINT)-1))
00140   {
00141     TRACE0("Failed to create the custom window\n");
00142     return FALSE;      // fail to create
00143   }
00144
00145   TCHAR szWinDir [MAX_PATH + 1];
00146   if (GetWindowsDirectory (szWinDir, MAX_PATH) != 0)
00147   {
00148     SHFILEINFO sfi;
00149     HIMAGELIST himSystem = (HIMAGELIST)SHGetFileInfo (szWinDir, 0, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
00150     int iIndex = sfi.iIcon;
00151
00152     m_wndTree.SetImageList (CImageList::FromHandle (himSystem), TVSIL_NORMAL);
00153
00154     HTREEITEM hRoot = m_wndTree.InsertItem (_T("Folders"), iIndex, iIndex);
00155     m_wndTree.InsertItem (_T("Folder 1"), iIndex, iIndex, hRoot);
00156     m_wndTree.InsertItem (_T("Folder 2"), iIndex, iIndex, hRoot);
00157     m_wndTree.InsertItem (_T("Folder 3"), iIndex, iIndex, hRoot);
00158     m_wndTree.InsertItem (_T("Folder 4"), iIndex, iIndex, hRoot);
00159     m_wndTree.Expand (hRoot, TVE_EXPAND);
00160
00161     m_wndTree.RedrawWindow ();
00162   }
00163
00164   return TRUE;
00165 }
00166
00167 void CTaskPane::UpdateIcons ()
00168 {
00169   SetIconsList (theApp.m_bHiColorIcons ? IDB_TASKS_HC : IDB_TASKS, 16);
00170 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CaptureData Member List

This is the complete list of members for CaptureData, including all inherited members.
bCaptureFullScreen | CaptureData
szCaptureFilename | CaptureData
szCapturePath | CaptureData
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/Resource.H Source File

  • ole
  • TstCon
  • TCProps

Resource.H

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by TCProps.rc
00004 //
00005 #define IDS_PROJNAME                    100
00006 #define IDS_TITLETCExtPage              101
00007 #define IDS_HELPFILETCExtPage           102
00008 #define IDS_DOCSTRINGTCExtPage          103
00009 #define IDR_TCEXTPAGE                   104
00010 #define IDD_TCEXTPAGE                   105
00011 #define IDC_NAME                        201
00012
00013 // Next default values for new objects
00014 //
00015 #ifdef APSTUDIO_INVOKED
00016 #ifndef APSTUDIO_READONLY_SYMBOLS
00017 #define _APS_NEXT_RESOURCE_VALUE        201
00018 #define _APS_NEXT_COMMAND_VALUE         32768
00019 #define _APS_NEXT_CONTROL_VALUE         202
00020 #define _APS_NEXT_SYMED_VALUE           106
00021 #endif
00022 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/mainfrm.h Source File

  • general
  • rowlist

mainfrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CFrameWnd
00013 {
00014 protected: // create from serialization only
00015   CMainFrame();
00016   DECLARE_DYNCREATE(CMainFrame)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CMainFrame)
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028   //}}AFX_VIRTUAL
00029
00030 // Implementation
00031 public:
00032   virtual ~CMainFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:  // control bar embedded members
00039   CStatusBar  m_wndStatusBar;
00040   CToolBar    m_wndToolBar;
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CMainFrame)
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046     // NOTE - the ClassWizard will add and remove member functions here.
00047     //    DO NOT EDIT what you see in these blocks of generated code!
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/resource.h Source File

  • controls
  • localize

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by localize.rc
00004 //
00005 #define IDS_LOCALIZE                    1
00006 #define IDB_LOCALIZE                    1
00007 #define IDS_LOCALIZE_PPG                2
00008 #define IDI_ABOUTDLL                    10
00009 #define IDD_ABOUTBOX_LOCALIZE           100
00010 #define IDS_LOCALIZE_PPG_CAPTION        101
00011 #define IDD_PROPPAGE_LOCALIZE           101
00012 #define IDC_CHECK1                      201
00013 #define IDS_CAPTION                     201
00014
00015 // Next default values for new objects
00016 //
00017 #ifdef APSTUDIO_INVOKED
00018 #ifndef APSTUDIO_READONLY_SYMBOLS
00019 #define _APS_NEXT_RESOURCE_VALUE        201
00020 #define _APS_NEXT_COMMAND_VALUE         32768
00021 #define _APS_NEXT_CONTROL_VALUE         202
00022 #define _APS_NEXT_SYMED_VALUE           101
00023 #endif
00024 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMethodParamInfo Member List

This is the complete list of members for CMethodParamInfo, including all inherited members.
CMethodParamInfo() | CMethodParamInfo
GetName() const | CMethodParamInfo
GetType() const | CMethodParamInfo
Init(LPCOLESTR pszName, const ELEMDESC *pElemDesc) | CMethodParamInfo
m_strName | CMethodParamInfo
m_vt | CMethodParamInfo
~CMethodParamInfo() | CMethodParamInfo
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatpa.cpp Source File

  • ole
  • wordpad

formatpa.cpp

Go to the documentation of this file.
00001 // formatpa.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "formatpa.h"
00015 #include "ddxm.h"
00016 #include "helpids.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 const DWORD CFormatParaDlg::m_nHelpIDs[] =
00024 {
00025   IDC_EDIT_LEFT, IDH_WORDPAD_INDENT_LEFT,
00026   IDC_EDIT_RIGHT, IDH_WORDPAD_INDENT_RIGHT,
00027   IDC_EDIT_FIRST_LINE, IDH_WORDPAD_INDENT_FIRST,
00028   IDC_BOX, IDH_COMM_GROUPBOX,
00029   IDC_COMBO_ALIGNMENT, IDH_WORDPAD_ALIGN,
00030   IDC_TEXT_ALIGNMENT, IDH_WORDPAD_ALIGN,
00031   IDC_EDIT_BEFORE, IDH_WORDPAD_SPACE_BEFORE,
00032   IDC_EDIT_AFTER, IDH_WORDPAD_SPACE_AFTER,
00033   IDC_CHECK_PAGEBREAK, IDH_WORDPAD_PAGEBREAK,
00034   0, 0
00035 };
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CFormatParaDlg dialog
00039
00040 static CString FormatAsPoints(int nPoints)
00041 {
00042   CString str;
00043   str.Format(_T("%d pt"), nPoints);
00044   return str;
00045 }
00046
00047 CFormatParaDlg::CFormatParaDlg(PARAFORMAT2& pf, CWnd* pParent /*=NULL*/)
00048   : CCSDialog(CFormatParaDlg::IDD, pParent)
00049 {
00050   m_pf = pf;
00051   if (m_pf.dwMask & PFM_ALIGNMENT)
00052   {
00053     if (m_pf.wAlignment & PFA_LEFT && m_pf.wAlignment & PFA_RIGHT)
00054       m_nAlignment = 2;
00055     else
00056       m_nAlignment = (m_pf.wAlignment & PFA_LEFT) ? 0 : 1;
00057   }
00058   else
00059     m_nAlignment = -1;
00060
00061   m_nAfter = m_pf.dySpaceAfter;
00062   m_nBefore = m_pf.dySpaceBefore;
00063
00064   //{{AFX_DATA_INIT(CFormatParaDlg)
00065   m_nFirst = 0;
00066   m_nLeft = 0;
00067   m_nRight = 0;
00068   m_bPageBreak = FALSE;
00069   //}}AFX_DATA_INIT
00070 }
00071
00072 void CFormatParaDlg::DoDataExchange(CDataExchange* pDX)
00073 {
00074   CCSDialog::DoDataExchange(pDX);
00075
00076   // semi-custom formatting for "pt" in the value for
00077   // before- and after-paragraph spacing
00078
00079   CString strBefore;
00080   CString strAfter;
00081
00082   if (pDX->m_bSaveAndValidate)
00083   {
00084     GetDlgItemText(IDC_EDIT_BEFORE, strBefore);
00085     m_nBefore = _ttoi(strBefore);
00086
00087     GetDlgItemText(IDC_EDIT_AFTER, strAfter);
00088     m_nAfter = _ttoi(strAfter);
00089   }
00090
00091   strBefore = FormatAsPoints(m_nBefore);
00092   strAfter = FormatAsPoints(m_nAfter);
00093
00094   DDX_Text(pDX, IDC_EDIT_AFTER, strAfter);
00095   DDX_Text(pDX, IDC_EDIT_BEFORE, strBefore);
00096
00097   //{{AFX_DATA_MAP(CFormatParaDlg)
00098   DDX_CBIndex(pDX, IDC_COMBO_ALIGNMENT, m_nAlignment);
00099   DDX_Twips(pDX, IDC_EDIT_FIRST_LINE, m_nFirst);
00100   DDV_MinMaxTwips(pDX, m_nFirst, -31680, 31680);
00101   DDX_Twips(pDX, IDC_EDIT_LEFT, m_nLeft);
00102   DDV_MinMaxTwips(pDX, m_nLeft, -31680, 31680);
00103   DDX_Twips(pDX, IDC_EDIT_RIGHT, m_nRight);
00104   DDV_MinMaxTwips(pDX, m_nRight, -31680, 31680);
00105   DDX_Check(pDX, IDC_CHECK_PAGEBREAK, m_bPageBreak);
00106   //}}AFX_DATA_MAP
00107 }
00108
00109 BEGIN_MESSAGE_MAP(CFormatParaDlg, CCSDialog)
00110   //{{AFX_MSG_MAP(CFormatParaDlg)
00111   ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_BEFORE, OnDeltaposSpinBefore)
00112   ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_AFTER, OnDeltaposSpinAfter)
00113   //}}AFX_MSG_MAP
00114 END_MESSAGE_MAP()
00115
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CFormatParaDlg message handlers
00119
00120 void CFormatParaDlg::OnOK()
00121 {
00122   CCSDialog::OnOK();
00123   m_pf.dwMask = 0;
00124   if (m_nAlignment >= 0)
00125   {
00126     ASSERT(m_nAlignment < 3);
00127     m_pf.dwMask |= PFM_ALIGNMENT;
00128     m_pf.wAlignment = (WORD)((m_nAlignment == 0) ? PFA_LEFT :
00129       (m_nAlignment == 1) ? PFA_RIGHT : PFA_CENTER);
00130   }
00131   if (m_nRight != DDXM_BLANK)
00132     m_pf.dwMask |= PFM_RIGHTINDENT;
00133   if (m_nLeft != DDXM_BLANK && m_nFirst != DDXM_BLANK)
00134     m_pf.dwMask |= PFM_STARTINDENT;
00135   if (m_nFirst != DDXM_BLANK)
00136     m_pf.dwMask |= PFM_OFFSET;
00137
00138   if (m_bPageBreak)
00139   {
00140     m_pf.dwMask |= PFM_PAGEBREAKBEFORE;
00141     m_pf.wEffects |= PFE_PAGEBREAKBEFORE;
00142   }
00143
00144   m_pf.dxRightIndent = m_nRight;
00145   m_pf.dxOffset = -m_nFirst;
00146   m_pf.dxStartIndent = m_nLeft + m_nFirst;
00147
00148   m_pf.dwMask |= PFM_SPACEAFTER | PFM_SPACEBEFORE;
00149   m_pf.dySpaceBefore = m_nBefore * 20;
00150   m_pf.dySpaceAfter = m_nAfter * 20;
00151 }
00152
00153 BOOL CFormatParaDlg::OnInitDialog()
00154 {
00155   CComboBox* pBox = (CComboBox*)GetDlgItem(IDC_COMBO_ALIGNMENT);
00156   CString str;
00157   str.LoadString(IDS_LEFT);
00158   pBox->AddString(str);
00159   str.LoadString(IDS_RIGHT);
00160   pBox->AddString(str);
00161   str.LoadString(IDS_CENTER);
00162   pBox->AddString(str);
00163
00164   if (m_nWordWrap == 0)
00165   {
00166     GetDlgItem(IDC_COMBO_ALIGNMENT)->EnableWindow(FALSE);
00167     GetDlgItem(IDC_TEXT_ALIGNMENT)->EnableWindow(FALSE);
00168   }
00169
00170   m_bPageBreak = (m_pf.dwMask & PFM_PAGEBREAKBEFORE) &&
00171            (m_pf.wEffects & PFE_PAGEBREAKBEFORE);
00172
00173   m_nRight = (m_pf.dwMask & PFM_RIGHTINDENT) ? m_pf.dxRightIndent : DDXM_BLANK;
00174   if (m_pf.dwMask & PFM_OFFSET)
00175   {
00176     m_nFirst = -m_pf.dxOffset;
00177     m_nLeft = (m_pf.dwMask & PFM_STARTINDENT) ?
00178       m_pf.dxStartIndent + m_pf.dxOffset : DDXM_BLANK;
00179   }
00180   else
00181     m_nLeft = m_nFirst = DDXM_BLANK;
00182
00183   if (m_pf.dwMask & PFM_SPACEBEFORE)
00184     m_nBefore = m_pf.dySpaceBefore / 20;
00185   if (m_pf.dwMask & PFM_SPACEAFTER)
00186     m_nAfter = m_pf.dySpaceAfter / 20;
00187
00188   CCSDialog::OnInitDialog();
00189   return TRUE;  // return TRUE unless you set the focus to a control
00190           // EXCEPTION: OCX Property Pages should return FALSE
00191 }
00192
00193 void CFormatParaDlg::OnDeltaposSpinBefore(NMHDR* pNMHDR, LRESULT* pResult)
00194 {
00195   NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00196   m_nBefore = pNMUpDown->iPos;
00197   *pResult = 0;
00198   UpdateData(FALSE);
00199 }
00200
00201 void CFormatParaDlg::OnDeltaposSpinAfter(NMHDR* pNMHDR, LRESULT* pResult)
00202 {
00203   NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00204   m_nAfter = pNMUpDown->iPos;
00205   *pResult = 0;
00206   UpdateData(FALSE);
00207 }
00208
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUseDlg.h Source File

  • general
  • VariantUse

VariantUseDlg.h

Go to the documentation of this file.
00001 // VariantUseDlg.h : header file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #if !defined(AFX_VARIANTUSEDLG_H__0E9FDA47_3143_11D2_9373_00C04FD9757C__INCLUDED_)
00012 #define AFX_VARIANTUSEDLG_H__0E9FDA47_3143_11D2_9373_00C04FD9757C__INCLUDED_
00013
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif // _MSC_VER > 1000
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CVarUseDlg dialog
00020
00021 class CVarUseDlg : public CDialog
00022 {
00023 // Construction
00024 public:
00025   void FunctionCallWithVariant(VARIANT myVariant);
00026   CVarUseDlg(CWnd* pParent = NULL); // standard constructor
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CVarUseDlg)
00030   enum { IDD = IDD_VARIANTUSE_DIALOG };
00031     // NOTE: the ClassWizard will add data members here
00032   //}}AFX_DATA
00033
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CVarUseDlg)
00036   protected:
00037   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 protected:
00042   HICON m_hIcon;
00043
00044   // Generated message map functions
00045   //{{AFX_MSG(CVarUseDlg)
00046   virtual BOOL OnInitDialog();
00047   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00048   afx_msg void OnPaint();
00049   afx_msg HCURSOR OnQueryDragIcon();
00050   afx_msg void OnCurrency();
00051   afx_msg void OnStrings();
00052   afx_msg void OnBasic();
00053   afx_msg void OnSafeArray();
00054   afx_msg void OnOleArray();
00055   afx_msg void OnMultiDimensionArray();
00056   afx_msg void OnDate();
00057   //}}AFX_MSG
00058   DECLARE_MESSAGE_MAP()
00059 };
00060
00061 //{{AFX_INSERT_LOCATION}}
00062 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00063
00064 #endif // !defined(AFX_VARIANTUSEDLG_H__0E9FDA47_3143_11D2_9373_00C04FD9757C__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/inproc.cpp Source File

  • ole
  • inproc

inproc.cpp

Go to the documentation of this file.
00001 // inproc.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "inproc.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CInProcApp
00022
00023 BEGIN_MESSAGE_MAP(CInProcApp, CWinApp)
00024   //{{AFX_MSG_MAP(CInProcApp)
00025     // NOTE - the ClassWizard will add and remove mapping macros here.
00026     //    DO NOT EDIT what you see in these blocks of generated code!
00027   //}}AFX_MSG_MAP
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CInProcApp construction
00032
00033 CInProcApp::CInProcApp()
00034 {
00035   // TODO: add construction code here,
00036   // Place all significant initialization in InitInstance
00037 }
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // The one and only CInProcApp object
00041
00042 CInProcApp NEAR theApp;
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CInProcApp initialization
00046
00047 BOOL CInProcApp::InitInstance()
00048 {
00049 #ifndef _USRDLL
00050   if (!RunEmbedded() && !RunAutomated())
00051   {
00052     COleObjectFactory::UpdateRegistryAll();
00053     AfxMessageBox(IDP_CANT_RUN_STANDALONE);
00054     return FALSE;
00055   }
00056
00057   // Initialize OLE libraries
00058   if (!AfxOleInit())
00059   {
00060     AfxMessageBox(IDP_OLE_INIT_FAILED);
00061     return FALSE;
00062   }
00063 #endif
00064
00065   // Register all OLE server (factories) as running.  This enables the
00066   //  OLE libraries to create objects from other applications.
00067   COleObjectFactory::RegisterAll();
00068
00069   return TRUE;
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // Special entry points required for inproc servers
00074
00075 #ifdef _USRDLL
00076 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
00077 {
00078   AFX_MANAGE_STATE(AfxGetStaticModuleState());
00079   return AfxDllGetClassObject(rclsid, riid, ppv);
00080 }
00081
00082 STDAPI DllCanUnloadNow(void)
00083 {
00084   AFX_MANAGE_STATE(AfxGetStaticModuleState());
00085   return AfxDllCanUnloadNow();
00086 }
00087
00088 // by exporting DllRegisterServer, you can use regsvr.exe
00089 STDAPI DllRegisterServer(void)
00090 {
00091   AFX_MANAGE_STATE(AfxGetStaticModuleState());
00092   COleObjectFactory::UpdateRegistryAll();
00093   return S_OK;
00094 }
00095 #endif //_USRDLL
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CInProcApp commands
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMMenuBar Member List

This is the complete list of members for CMSMMenuBar, including all inherited members.
CMSMMenuBar() | CMSMMenuBar |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMSMMenuBar | [protected]
~CMSMMenuBar() | CMSMMenuBar | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timeppg.cpp Source File

  • controls
  • time

timeppg.cpp

Go to the documentation of this file.
00001 // timeppg.cpp : Implementation of the CTimePropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "time.h"
00015 #include "timeppg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 IMPLEMENT_DYNCREATE(CTimePropPage, COlePropertyPage)
00024
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // Message map
00028
00029 BEGIN_MESSAGE_MAP(CTimePropPage, COlePropertyPage)
00030   //{{AFX_MSG_MAP(CTimePropPage)
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // Initialize class factory and guid
00037
00038 IMPLEMENT_OLECREATE_EX(CTimePropPage, "TIME.TimePropPage.1",
00039   0x37446b93, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CTimePropPage::CTimePropPageFactory::UpdateRegistry -
00044 // Adds or removes system registry entries for CTimePropPage
00045
00046 BOOL CTimePropPage::CTimePropPageFactory::UpdateRegistry(BOOL bRegister)
00047 {
00048   if (bRegister)
00049     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00050       m_clsid, IDS_TIME_PPG);
00051   else
00052     return AfxOleUnregisterClass(m_clsid, NULL);
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CTimePropPage::CTimePropPage - Constructor
00058
00059 CTimePropPage::CTimePropPage() :
00060   COlePropertyPage(IDD, IDS_TIME_PPG_CAPTION)
00061 {
00062   //{{AFX_DATA_INIT(CTimePropPage)
00063   m_Enabled = FALSE;
00064   m_Interval = 0;
00065   //}}AFX_DATA_INIT
00066 }
00067
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CTimePropPage::DoDataExchange - Moves data between page and properties
00071
00072 void CTimePropPage::DoDataExchange(CDataExchange* pDX)
00073 {
00074   //{{AFX_DATA_MAP(CTimePropPage)
00075   DDP_Check(pDX, IDC_ENABLEDCHECK, m_Enabled, _T("Enabled"));
00076   DDX_Check(pDX, IDC_ENABLEDCHECK, m_Enabled);
00077   DDP_Text(pDX, IDC_INTERVALEDIT, m_Interval, _T("Interval"));
00078   DDX_Text(pDX, IDC_INTERVALEDIT, m_Interval);
00079   DDV_MinMaxInt(pDX, m_Interval, 1, 32767);
00080   //}}AFX_DATA_MAP
00081   DDP_PostProcessing(pDX);
00082 }
00083
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CTimePropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagBOXRESULTS Member List

This is the complete list of members for tagBOXRESULTS, including all inherited members.
hinksetBox | tagBOXRESULTS
indxBox | tagBOXRESULTS
rgSyv | tagBOXRESULTS
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TestContainer98::ITestContainer98Events Member List

This is the complete list of members for TestContainer98::ITestContainer98Events, including all inherited members.
OnNewControl(IDispatch *pControl) TestContainer98::ITestContainer98Events
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailBar.cpp Source File

  • vc2008fp
  • OutlookDemo

MailBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "MailBar.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMailBar dialog
00022
00023 CMailBar::CMailBar()
00024 {
00025 }
00026
00027 void CMailBar::DoDataExchange(CDataExchange* pDX)
00028 {
00029   CPaneDialog::DoDataExchange(pDX);
00030 }
00031
00032 BEGIN_MESSAGE_MAP(CMailBar, CPaneDialog)
00033   ON_WM_SIZE()
00034   ON_WM_ERASEBKGND()
00035   ON_WM_CTLCOLOR()
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CMailBar message handlers
00040
00041 void CMailBar::AdjustWidth(int cx, UINT uiCtrlID)
00042 {
00043   const int nMargin = 10;
00044
00045   CWnd* pWnd = GetDlgItem(uiCtrlID);
00046   if (pWnd == NULL)
00047   {
00048     return;
00049   }
00050
00051   CRect rect;
00052   pWnd->GetWindowRect(rect);
00053   ScreenToClient(rect);
00054
00055   rect.right = cx - nMargin;
00056
00057   pWnd->SetWindowPos(NULL, -1, -1, rect.Width(), rect.Height(), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
00058 }
00059
00060 void CMailBar::OnSize(UINT nType, int cx, int cy)
00061 {
00062   CPaneDialog::OnSize(nType, cx, cy);
00063
00064   AdjustWidth(cx, IDC_MAIL_TO_NAME);
00065   AdjustWidth(cx, IDC_MAIL_CC_NAME);
00066   AdjustWidth(cx, IDC_MAIL_SUBJECT_NAME);
00067
00068 }
00069
00070 BOOL CMailBar::OnEraseBkgnd(CDC* pDC)
00071 {
00072   CRect rectClient;
00073   GetClientRect(rectClient);
00074
00075   CMFCVisualManager::GetInstance()->OnFillBarBackground(pDC, this, rectClient, rectClient);
00076
00077   return TRUE;
00078 }
00079
00080 HBRUSH CMailBar::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
00081 {
00082 #define MAX_CLASS_NAME 255
00083 #define STATIC_CLASS _T("Static")
00084 #define BUTTON_CLASS _T("Button")
00085
00086   if (nCtlColor == CTLCOLOR_STATIC || nCtlColor == CTLCOLOR_BTN)
00087   {
00088     TCHAR lpszClassName [MAX_CLASS_NAME + 1];
00089
00090     ::GetClassName(pWnd->GetSafeHwnd(), lpszClassName, MAX_CLASS_NAME);
00091     CString strClass = lpszClassName;
00092
00093     if (strClass == STATIC_CLASS || strClass == BUTTON_CLASS)
00094     {
00095       pDC->SetBkMode(TRANSPARENT);
00096       return(HBRUSH) ::GetStockObject(HOLLOW_BRUSH);
00097     }
00098   }
00099
00100   return CPaneDialog::OnCtlColor(pDC, pWnd, nCtlColor);
00101 }
00102
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloFrm.cpp Source File

  • general
  • mdidocvw

HelloFrm.cpp

Go to the documentation of this file.
00001 // HelloFrm.cpp : implementation of the CHelloFrame class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "MDI.h"
00015
00016 #include "HelloFrm.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CHelloFrame
00026
00027 IMPLEMENT_DYNCREATE(CHelloFrame, CMDIChildWnd)
00028
00029 BEGIN_MESSAGE_MAP(CHelloFrame, CMDIChildWnd)
00030   //{{AFX_MSG_MAP(CHelloFrame)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code !
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CHelloFrame construction/destruction
00038
00039 CHelloFrame::CHelloFrame()
00040 {
00041 }
00042
00043 CHelloFrame::~CHelloFrame()
00044 {
00045 }
00046
00047 BOOL CHelloFrame::PreCreateWindow(CREATESTRUCT& cs)
00048 {
00049   return CMDIChildWnd::PreCreateWindow(cs);
00050 }
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CHelloFrame diagnostics
00054
00055 #ifdef _DEBUG
00056 void CHelloFrame::AssertValid() const
00057 {
00058   CMDIChildWnd::AssertValid();
00059 }
00060
00061 void CHelloFrame::Dump(CDumpContext& dc) const
00062 {
00063   CMDIChildWnd::Dump(dc);
00064 }
00065
00066 #endif //_DEBUG
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CHelloFrame message handlers
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDBVListDoc Member List

This is the complete list of members for CDBVListDoc, including all inherited members.
CDBVListDoc() | CDBVListDoc | [protected]
m_dBVListSet | CDBVListDoc |
OnNewDocument() | CDBVListDoc | [virtual]
~CDBVListDoc() | CDBVListDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgets.h Source File

  • vc2008fp
  • RibbonGadgets

RibbonGadgets.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #ifndef __AFXWIN_H__
00015   #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 #include "resource.h"       // main symbols
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CRibbonGadgetsApp:
00022 // See RibbonGadgets.cpp for the implementation of this class
00023 //
00024
00025 class CRibbonGadgetsApp : public CWinAppEx
00026 {
00027 public:
00028   CRibbonGadgetsApp();
00029
00030   virtual void PreLoadState ();
00031
00032 // Overrides
00033   public:
00034   virtual BOOL InitInstance();
00035   virtual int ExitInstance();
00036
00037 // Implementation
00038   afx_msg void OnAppAbout();
00039
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043
00044 extern CRibbonGadgetsApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MSOfficeDemoKey Member List

This is the complete list of members for MSOfficeDemoKey, including all inherited members.
lpszKey | MSOfficeDemoKey
uiCmd | MSOfficeDemoKey
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Ratedlg.h Source File

  • general
  • dlgcbr32

Ratedlg.h

Go to the documentation of this file.
00001 // RateDlg.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014   Purpose:
00015   Interface to CRateDlg, which allows the user to specify how often to
00016   update the main dialog display.
00017
00018   Functions:
00019   CRateDlg::CRateDlg()            -- constructor
00020   CRateDlg::DoDataExchange()      -- dialog data exchange/validation
00021   CRateDlg::GetRate()             -- retrieve update rate
00022   CRateDlg::OnInitDialog()        -- initialize dialog
00023
00024   Development Team:
00025   Mary Kirtland
00026   Ported to 32-bit by:
00027   Mike Hedley
00028   Created by Microsoft Product Support Services, Premier ISV Support
00029   Copyright (c) Microsoft Corporation.  All rights reserved.
00030 \****************************************************************************/
00031
00032 #ifndef __RATEDLG_H__
00033 #define __RATEDLG_H__
00034
00035 class CRateDlg : public CDialog
00036 {
00037 // Construction
00038 public:
00039   CRateDlg(UINT iRate, CWnd* pParent = NULL);
00040
00041 // Attributes
00042   UINT GetRate() const { return m_iRate; }
00043
00044 // Dialog Data
00045 protected:
00046   //{{AFX_DATA(CRateDlg)
00047   enum { IDD = IDD_RATE };
00048   UINT    m_iRate;
00049   //}}AFX_DATA
00050
00051   // ClassWizard generated virtual function overrides
00052   //{{AFX_VIRTUAL(CRateDlg)
00053   protected:
00054   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00055   virtual BOOL OnInitDialog();
00056   //}}AFX_VIRTUAL
00057
00058 // Implementation
00059 protected:
00060   // Generated message map functions
00061   //{{AFX_MSG(CRateDlg)
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
00066 #endif //__RATEDLG_H__
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBar.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMCaptionBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMCaptionBar.h : header file
00013 //
00014
00015 #include "MSMCaptionBarButton.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CMSMCaptionBar window
00019
00020 static const UINT uiCaprionBarID = AFX_IDW_DIALOGBAR + 1;
00021
00022 class CMSMCaptionBar : public CPane
00023 {
00024   DECLARE_DYNCREATE(CMSMCaptionBar)
00025
00026 // Construction
00027 public:
00028   CMSMCaptionBar ();
00029
00030   virtual ~CMSMCaptionBar ();
00031
00032   virtual void SetIcon (HICON hIcon);
00033
00034   void SetCaptionHeight (int nHeight);
00035
00036   int GetCaptionHeight () const;
00037
00038   void SetCaptionFont (const LOGFONT& lf);
00039
00040   HFONT GetCaptionFont () const;
00041
00042   virtual COLORREF GetCaptionTextColor () const;
00043
00044   void SetParentActive (BOOL bParentActive = true);
00045
00046   BOOL IsParentActive () const;
00047
00048   void SetParentMaximize (BOOL bParentMaximize = true);
00049
00050   BOOL IsParentMaximize () const;
00051
00052 // Attributes
00053 public:
00054
00055 // Operations
00056 public:
00057
00058 // Overrides
00059 public:
00060   virtual BOOL Create(CWnd* pParentWnd, UINT nID = uiCaprionBarID);
00061   virtual BOOL CreateEx(CWnd* pParentWnd, UINT nID = uiCaprionBarID);
00062   virtual CSize CalcFixedLayout(BOOL, BOOL);
00063 protected:
00064   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00065   virtual void DoPaint(CDC* pDCPaint);
00066   virtual BOOL PreTranslateMessage(MSG* pMsg);
00067   virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00068
00069 protected:
00070   afx_msg LRESULT OnSetText(WPARAM, LPARAM lParam);
00071   afx_msg void OnSize(UINT nType, int cx, int cy);
00072   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00073   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00074
00075   DECLARE_MESSAGE_MAP()
00076
00077   virtual UINT HitTest (const CPoint& pt) const;
00078   virtual void ShowSysMenu (const CPoint& point);
00079
00080 public:
00081   CString          m_strCaption;
00082
00083   HICON          m_hIcon;
00084   CSize          m_szIcon;
00085
00086   BOOL           m_bParentActive;
00087   BOOL           m_bParentMaximize;
00088
00089   int            m_SystemHeight;
00090   int            m_CaptionHeight;
00091   CFont          m_CaptionFont;
00092
00093   CMSMCaptionBarButton m_BtnMinimize;
00094   CMSMCaptionBarButton m_BtnMaximize;
00095   CMSMCaptionBarButton m_BtnClose;
00096 };
00097
00098
00099 inline
00100 int CMSMCaptionBar::GetCaptionHeight () const
00101 {
00102   return m_CaptionHeight;
00103 }
00104
00105
00106 inline
00107 HFONT CMSMCaptionBar::GetCaptionFont () const
00108 {
00109   return (HFONT)m_CaptionFont.GetSafeHandle ();
00110 }
00111
00112
00113 inline
00114 BOOL CMSMCaptionBar::IsParentActive () const
00115 {
00116   return m_bParentActive;
00117 }
00118
00119
00120 inline
00121 BOOL CMSMCaptionBar::IsParentMaximize () const
00122 {
00123   return m_bParentMaximize;
00124 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindView.cpp Source File

  • ole
  • MFCBind

BindView.cpp

Go to the documentation of this file.
00001 // BindView.cpp : implementation of the CMFCBindView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "MFCBind.h"
00014
00015 #include "BindDoc.h"
00016 #include "CntrItem.h"
00017 #include "BindView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMFCBindView
00027 //Hi Mike
00028 IMPLEMENT_DYNCREATE(CMFCBindView, CView)
00029
00030 BEGIN_MESSAGE_MAP(CMFCBindView, CView)
00031   //{{AFX_MSG_MAP(CMFCBindView)
00032     // NOTE - the ClassWizard will add and remove mapping macros here.
00033     //    DO NOT EDIT what you see in these blocks of generated code!
00034   ON_WM_DESTROY()
00035   ON_WM_SETFOCUS()
00036   ON_WM_SIZE()
00037   ON_COMMAND(ID_CANCEL_EDIT_CNTR, OnCancelEditCntr)
00038   //}}AFX_MSG_MAP
00039   // Standard printing commands
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CMFCBindView construction/destruction
00044
00045 CMFCBindView::CMFCBindView()
00046 {
00047   m_pSelection = NULL;
00048   // TODO: add construction code here
00049
00050 }
00051
00052 CMFCBindView::~CMFCBindView()
00053 {
00054 }
00055
00056 BOOL CMFCBindView::PreCreateWindow(CREATESTRUCT& cs)
00057 {
00058   // TODO: Modify the Window class or styles here by modifying
00059   //  the CREATESTRUCT cs
00060
00061   return CView::PreCreateWindow(cs);
00062 }
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CMFCBindView drawing
00066
00067 void CMFCBindView::OnDraw(CDC* /*pDC*/)
00068 {
00069   CMFCBindDoc* pDoc = GetDocument();
00070   ASSERT_VALID(pDoc);
00071
00072   // DocObjects don't require any drawing
00073 }
00074
00075 void CMFCBindView::OnInitialUpdate()
00076 {
00077   CView::OnInitialUpdate();
00078
00079   // TODO: remove this code when final selection model code is written
00080   m_pSelection = NULL;    // initialize selection
00081
00082 }
00083
00084
00085 void CMFCBindView::OnDestroy()
00086 {
00087   // Deactivate the item on destruction; this is important
00088   // when a splitter view is being used.
00089    CView::OnDestroy();
00090    COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00091    if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
00092    {
00093     pActiveItem->Deactivate();
00094     ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00095    }
00096 }
00097
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // OLE Client support and commands
00101
00102 BOOL CMFCBindView::IsSelected(const CObject* pDocItem) const
00103 {
00104   // The implementation below is adequate if your selection consists of
00105   //  only CMFCBindCntrItem objects.  To handle different selection
00106   //  mechanisms, the implementation here should be replaced.
00107
00108   // TODO: implement this function that tests for a selected OLE client item
00109
00110   return pDocItem == m_pSelection;
00111 }
00112
00113 // The following command handler provides the standard keyboard
00114 //  user interface to cancel an in-place editing session.  Here,
00115 //  the container (not the server) causes the deactivation.
00116 void CMFCBindView::OnCancelEditCntr()
00117 {
00118   // Close any in-place active item on this view.
00119   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00120   if (pActiveItem != NULL)
00121   {
00122     pActiveItem->Close();
00123   }
00124   ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00125 }
00126
00127 // Special handling of OnSetFocus and OnSize are required for a container
00128 //  when an object is being edited in-place.
00129 void CMFCBindView::OnSetFocus(CWnd* pOldWnd)
00130 {
00131   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00132   if (pActiveItem != NULL &&
00133     pActiveItem->GetItemState() == COleClientItem::activeUIState)
00134   {
00135     // need to set focus to this item if it is in the same view
00136     CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00137     if (pWnd != NULL)
00138     {
00139       pWnd->SetFocus();   // don't call the base class
00140       return;
00141     }
00142   }
00143
00144   CView::OnSetFocus(pOldWnd);
00145 }
00146
00147 void CMFCBindView::OnSize(UINT nType, int cx, int cy)
00148 {
00149   CView::OnSize(nType, cx, cy);
00150   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00151   if (pActiveItem != NULL)
00152     pActiveItem->SetItemRects();
00153 }
00154
00155 /////////////////////////////////////////////////////////////////////////////
00156 // CMFCBindView diagnostics
00157
00158 #ifdef _DEBUG
00159 void CMFCBindView::AssertValid() const
00160 {
00161   CView::AssertValid();
00162 }
00163
00164 void CMFCBindView::Dump(CDumpContext& dc) const
00165 {
00166   CView::Dump(dc);
00167 }
00168
00169 CMFCBindDoc* CMFCBindView::GetDocument() // non-debug version is inline
00170 {
00171   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMFCBindDoc)));
00172   return (CMFCBindDoc*)m_pDocument;
00173 }
00174 #endif //_DEBUG
00175
00176 /////////////////////////////////////////////////////////////////////////////
00177 // CMFCBindView message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/IconComboBox.h Source File

  • vc2008fp
  • DesktopAlertDemo

IconComboBox.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CIconComboBox window
00015
00016 class CIconComboBox : public CComboBox
00017 {
00018 // Construction
00019 public:
00020   CIconComboBox(CMFCToolBarImages& Icons);
00021
00022 // Attributes
00023 protected:
00024   CMFCToolBarImages&  m_Icons;
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   public:
00031   virtual int CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct);
00032   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00033   virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00034
00035 // Implementation
00036 public:
00037   virtual ~CIconComboBox();
00038
00039 protected:
00040   DECLARE_MESSAGE_MAP()
00041 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View2.h Source File

  • vc2008fp
  • TabbedView

View2.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CView2 view
00015
00016 class CView2 : public CListView
00017 {
00018 protected:
00019   CView2();           // protected constructor used by dynamic creation
00020   DECLARE_DYNCREATE(CView2)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   public:
00030   virtual void OnInitialUpdate();
00031   protected:
00032   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00033   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00034
00035 // Implementation
00036 protected:
00037   virtual ~CView2();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00045   afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00046   afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00047
00048   DECLARE_MESSAGE_MAP()
00049 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/targetver.h Source File

  • controls
  • cmnctrl

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
00012
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/stdafx.cpp Source File

  • internet
  • Scheduler

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // Scheduler.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ACDual::IAClick Member List

This is the complete list of members for ACDual::IAClick, including all inherited members.
id | ACDual::IAClick
id | ACDual::IAClick
RefreshWindow() | ACDual::IAClick
SetAllProps(short x, short y, BSTR text) | ACDual::IAClick
ShowWindow() | ACDual::IAClick
TestError(short wCode) | ACDual::IAClick
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/Resource.h Source File

  • vc2008fp
  • VisualStudioDemo

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by VisualStudioDemo.rc
00004 //
00005 #define IDC_APPLY                       3
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDS_MAIN_TOOLBAR                101
00008 #define IDS_STRING_NOT_FOUND_FMT        102
00009 #define IDS_BUILD_TOOLBAR               103
00010 #define IDS_RESOURCE_TOOLBAR            104
00011 #define IDS_EDIT_TOOLBAR                106
00012 #define ID_EDIT_FINDNEXT                108
00013 #define ID_VIEW_EDITCTRL                112
00014 #define ID_EDIT_FINDPREV                113
00015 #define ID_EDIT_SHOWHINT                116
00016 #define IDS_EDITFAILED                  121
00017 #define IDS_PGUPFAILED                  122
00018 #define IDR_MAINFRAME                   128
00019 #define IDR_DEVTYPE0                    129
00020 #define IDR_DEVTYPE_CPP                 130
00021 #define IDR_CONTEXT_MENU                132
00022 #define IDI_CLASS_VIEW                  132
00023 #define IDR_POPUP_TOOLBAR               133
00024 #define IDI_RES_VIEW                    133
00025 #define IDB_WORKSPACE                   134
00026 #define IDI_FILE_VIEW                   134
00027 #define IDB_CLASS_VIEW                  135
00028 #define IDI_OUTPUT_BAR                  135
00029 #define IDB_RESOURCE_VIEW               136
00030 #define IDI_WATCH_BAR                   136
00031 #define IDB_FILE_VIEW                   137
00032 #define IDR_BUILD                       138
00033 #define IDR_POPUP_SORT                  139
00034 #define IDR_MENU_IMAGES                 142
00035 #define IDB_CHECK                       143
00036 #define IDR_POPUP_OUTPUT                144
00037 #define IDR_TOOLBAR_RESOURCE            145
00038 #define IDR_SORT                        146
00039 #define IDR_MENU_DIRS                   147
00040 #define IDI_DYNAMICHELP_VIEW            148
00041 #define IDR_DYNAMIC_HELP                149
00042 #define IDD_OPTIONSPAGE2                149
00043 #define IDB_DYNAMICHELP                 150
00044 #define IDD_OPTIONSPAGE3                150
00045 #define IDR_PROPERTIES                  151
00046 #define IDD_OPTIONSPAGE4                151
00047 #define IDD_OPTIONSPAGE5                152
00048 #define IDI_PROPERTIES_BAR              153
00049 #define IDD_OPTIONSPAGE6                153
00050 #define IDR_SOLUTION_EXPLORER           154
00051 #define IDD_OPTIONSPAGE1                154
00052 #define IDR_EDIT                        155
00053 #define IDI_CLASS_VIEW_HC               158
00054 #define IDR_MENU_ARGS                   161
00055 #define IDR_POPUP_SOLUTION              162
00056 #define IDR_POPUP_RESOURCE              163
00057 #define IDR_POPUP_CONTROLBAR            164
00058 #define IDB_TOOLS_PAGE1                 168
00059 #define IDB_TOOLS_PAGE2                 169
00060 #define IDD_FINDDIALOG                  169
00061 #define IDB_TOOLS_PAGE3                 170
00062 #define IDB_IMG_INTELLISENSE            173
00063 #define IDB_OPTIONSIMAGES               174
00064 #define ID_EXAMPLE_CPP                  177
00065 #define IDR_POPUP_MDITABS               177
00066 #define ID_EXAMPLE_WEB                  178
00067 #define IDR_POPUP_DROP_MDITABS          178
00068 #define IDD_APP_LOOK                    180
00069 #define IDR_EDITOR_XML_SETTINGS_WEB     182
00070 #define IDR_EDITOR_XML_SETTINGS_CPP     183
00071 #define IDB_MENUIMAGES24                185
00072 #define IDB_TOOLBAR24                   186
00073 #define IDB_BUILD24                     187
00074 #define IDB_EDIT24                      188
00075 #define IDI_FILE_VIEW_HC                189
00076 #define IDB_IMG_INTELLISENSE_HC         189
00077 #define IDI_RES_VIEW_HC                 190
00078 #define IDI_PROP_BAR_HC                 192
00079 #define IDI_DYNAMICHELP_VIEW_HC         193
00080 #define IDI_WATCH_BAR_HC                194
00081 #define IDI_OUTPUT_BAR_HC               195
00082 #define IDB_SOLUTION_EXPLORER_24        195
00083 #define IDB_PROP24                      196
00084 #define IDB_CLASS_VIEW_24               197
00085 #define IDB_SORT24                      198
00086 #define IDB_TOOLS_PAGE1_HC              200
00087 #define IDD_GOTO_LINE                   201
00088 #define IDB_TOOLS_PAGE2_HC              201
00089 #define IDB_TOOLS_PAGE3_HC              202
00090 #define IDB_FILE_VIEW24                 203
00091 #define IDB_HELPTOOLBAR_24              204
00092 #define IDB_DYNAMICHELP24               205
00093 #define IDB_RESOURCE_VIEW24             206
00094 #define IDB_BREAK                       207
00095 #define IDB_CURRENT                     208
00096 #define IDR_START                       209
00097 #define IDD_ABOUTBOX                    999
00098 #define IDC_MAIL                        1000
00099 #define IDC_URL                         1001
00100 #define IDC_FINDDIALOG_MATCHWHOLEWORDONLYCHECK 1001
00101 #define IDC_VERSION                     1002
00102 #define IDC_FINDDIALOG_MATCHCASECHECK   1002
00103 #define IDC_FINDDIALOG_REGULAREXPRESSIONCHECK 1003
00104 #define IDC_FINDDIALOG_SEARCHALLOPENDOCUMENTSCHECK 1004
00105 #define IDC_FINDDIALOG_UPRADIO          1005
00106 #define IDC_FINDDIALOG_DOWNRADIO        1006
00107 #define IDC_FINDDIALOG_MARKALLBUTTON    1007
00108 #define IDC_RADIO1                      1007
00109 #define IDC_FINDDIALOG_REGULARBUTTON    1008
00110 #define IDC_RADIO2                      1008
00111 #define IDC_BUTTON1                     1009
00112 #define IDC_RADIO3                      1009
00113 #define IDC_COMBO1                      1010
00114 #define IDC_FINDDIALOG_FINDCOMBO        1011
00115 #define IDC_CHECK1                      1011
00116 #define IDC_EDIT2                       1012
00117 #define IDC_CHECK5                      1012
00118 #define IDC_APP_LOOK1                   1012
00119 #define IDC_EDIT3                       1013
00120 #define IDC_CHECK8                      1013
00121 #define IDC_APP_LOOK2                   1013
00122 #define IDC_CHECK2                      1014
00123 #define IDC_CHECK9                      1014
00124 #define IDC_APP_LOOK3                   1014
00125 #define IDC_CHECK3                      1015
00126 #define IDC_CHECK10                     1015
00127 #define IDC_SHOW_AT_STARTUP             1015
00128 #define IDC_CHECK4                      1016
00129 #define IDC_CHECK11                     1016
00130 #define IDC_ONENOTE_TABS                1016
00131 #define IDC_CHECK6                      1017
00132 #define IDC_EDIT1                       1017
00133 #define IDC_CHECK12                     1017
00134 #define IDC_DOCK_TAB_COLORS             1017
00135 #define IDC_CHECK7                      1018
00136 #define IDC_CHECK13                     1018
00137 #define IDC_EDIT4                       1018
00138 #define IDC_XP_COLORS                   1018
00139 #define IDC_APP_LOOK4                   1018
00140 #define IDC_LINE                        1018
00141 #define IDC_ACTIVETAB_CLOSE_BUTTON      1018
00142 #define IDC_RADIO4                      1019
00143 #define IDC_APP_LOOK5                   1019
00144 #define IDC_RADIO5                      1020
00145 #define IDC_ROUNDED_TABS                1020
00146 #define IDC_CUSTOM_TOOLTIPS             1021
00147 #define IDC_APP_LOOK6                   1022
00148 #define IDC_APP_LOOK                    1023
00149 #define IDC_STYLE                       1024
00150 #define ID_VIEW_CUSTOMIZE               32770
00151 #define ID_VIEW_USER_TOOLBAR1           32771
00152 #define ID_VIEW_USER_TOOLBAR2           32772
00153 #define ID_VIEW_USER_TOOLBAR3           32773
00154 #define ID_VIEW_USER_TOOLBAR4           32774
00155 #define ID_VIEW_USER_TOOLBAR5           32775
00156 #define ID_VIEW_USER_TOOLBAR6           32776
00157 #define ID_VIEW_USER_TOOLBAR7           32777
00158 #define ID_VIEW_USER_TOOLBAR8           32778
00159 #define ID_VIEW_USER_TOOLBAR9           32779
00160 #define ID_VIEW_USER_TOOLBAR10          32780
00161 #define ID_VIEW_TOOLBARS                32781
00162 #define ID_VIEW_WORKSPACE               32782
00163 #define ID_VIEW_OUTPUT                  32783
00164 #define ID_WINDOW_MANAGER               32784
00165 #define ID_VIEW_DYNAMICHELP             32785
00166 #define ID_DUMMY_COMPILE                32787
00167 #define ID_DUMMY_BUILD                  32788
00168 #define ID_DUMMY_STOP_BUILD             32789
00169 #define ID_SORT_MENU                    32789
00170 #define ID_DUMMY_EXECUTE                32790
00171 #define ID_DUMMY_GO                     32791
00172 #define ID_DUMMY_SELECT_ACTIVE_CONFIGURATION 32794
00173 #define ID_DUMMY_REMOVE_ALL_BREAKPOINTS 32796
00174 #define ID_VIEW_BUILD_TOOLBAR           32797
00175 #define ID_DUMMY_REBUILD_ALL            32798
00176 #define ID_DUMMY_CLEAN                  32799
00177 #define IDS_DUMMY_UNDO_ACTION           32800
00178 #define ID_VIEW_CB_CAPTION              32804
00179 #define ID_VIEW_FORCE_GRADIENT          32805
00180 #define ID_USER_TOOL1                   32806
00181 #define ID_USER_TOOL2                   32807
00182 #define ID_USER_TOOL3                   32808
00183 #define ID_USER_TOOL4                   32809
00184 #define ID_USER_TOOL5                   32810
00185 #define ID_USER_TOOL6                   32811
00186 #define ID_USER_TOOL7                   32812
00187 #define ID_USER_TOOL8                   32813
00188 #define ID_USER_TOOL9                   32814
00189 #define ID_USER_TOOL10                  32815
00190 #define ID_TOOLS_MACRO                  32816
00191 #define ID_TOOLS_ENTRY                  32819
00192 #define ID_NEW_DIALOG                   32823
00193 #define ID_NEW_MENU                     32824
00194 #define ID_NEW_CURSOR                   32825
00195 #define ID_NEW_ICON                     32826
00196 #define ID_NEW_BITMAP                   32827
00197 #define ID_NEW_TOOLBAR                  32828
00198 #define ID_NEW_ACCELERATOR              32829
00199 #define ID_NEW_STRING_TABLE             32830
00200 #define ID_NEW_VERSION                  32831
00201 #define ID_OUTPUT_GOTO_ERROR            32833
00202 #define ID_CLASS_DEFINITION             32836
00203 #define ID_CLASS_ADD_MEMEBER_FUNCTION   32837
00204 #define ID_CLASS_ADD_MEMEBER_VARIABLE   32838
00205 #define ID_CLASS_PROPERTIES             32839
00206 #define ID_RESOURCE_OPEN                32840
00207 #define ID_RESOURCE_OPEN_BINARY         32841
00208 #define ID_DUMMY_INSERT_RESOURCE        32842
00209 #define ID_VIEW_TAB_FLAT_BORDERS        32844
00210 #define ID_HELP_KEYBOARDMAP             32845
00211 #define ID_VIEW_DOCUMENT_TAB            32845
00212 #define ID_MENU_DIR1                    32847
00213 #define ID_MENU_DIR2                    32848
00214 #define ID_MENU_DIR3                    32849
00215 #define ID_MDITABS_ICONS                32850
00216 #define ID_MDITABS_TOP                  32851
00217 #define ID_MDITABS_BOTTOM               32852
00218 #define ID_VIEW_MDI_TABS                32853
00219 #define ID_MDITABS_CLOSE                32855
00220 #define ID_VIEW_CLASS                   32856
00221 #define ID_VIEW_RESOURCE                32857
00222 #define ID_VIEW_FILE                    32858
00223 #define ID_MENU_ITEM1                   32866
00224 #define ID_MENU_ITEM2                   32867
00225 #define ID_MENU_ITEM3                   32868
00226 #define ID_SORTING_GROUPBYTYPE          32869
00227 #define ID_SORTING_SORTALF              32870
00228 #define ID_SORTING_SORTBYTYPE           32871
00229 #define ID_SORTING_SORTBYACCESS         32872
00230 #define ID_DHELP1                       32873
00231 #define ID_DHELP2                       32874
00232 #define ID_DHELP3                       32875
00233 #define ID_EXPAND                       32878
00234 #define ID_SORTINGPROP                  32879
00235 #define ID_PROPERIES1                   32880
00236 #define ID_PROPERIES2                   32881
00237 #define ID_NEW_FOLDER                   32882
00238 #define ID_PROPERTIES                   32883
00239 #define ID_SOLUTION_OPEN                32884
00240 #define ID_SOLUTION_OPEN_WITH           32885
00241 #define ID_FILE_NEW_PROJECT             32886
00242 #define ID_FILE_NEW_BLANK_SOLUTION      32887
00243 #define ID_FILE_OPEN_SOLUTION           32888
00244 #define ID_FILE_CLOSE_SOLUTION          32889
00245 #define ID_FILE_SAVE_ALL                32892
00246 #define ID_TOOLS_DEBUG_PROCESSES        32893
00247 #define ID_TOOLS_CONNECT_TO_DATABASE    32894
00248 #define ID_WINDOW_CLOSE_ALL             32895
00249 #define ID_HELP_SHOW_START              32896
00250 #define ID_VIEW_REFRESH                 32897
00251 #define ID_VIEW_PROPERTIES              32900
00252 #define ID_VIEW_WATCH                   32901
00253 #define ID_VIEW_FULLSCREEN              32902
00254 #define ID_EDIT_TOGGLEBOOKMARK          32925
00255 #define ID_EDIT_NEXTBOOKMARK            32926
00256 #define ID_EDIT_PREVIOUSBOOKMARK        32927
00257 #define ID_EDIT_TOGGLEBREAKPOINT        32928
00258 #define ID_EDIT_CLEAR_ALLBOOKMARKS      32930
00259 #define ID_EDIT_INCREASE_IDENT          32931
00260 #define ID_EDIT_DECREASE_IDENT          32932
00261 #define ID_VIEW_EDIT_TOOLBAR            32933
00262 #define ID_EDIT_LISTMEMBERS             32935
00263 #define IDS_UAT_UNDEFINED               32936
00264 #define IDS_UAT_INSERTDATA              32937
00265 #define IDS_UAT_TYPING                  32937
00266 #define IDS_UAT_DELETEDATA              32938
00267 #define IDS_UAT_DELETE                  32938
00268 #define IDS_UAT_INDENTDATA              32939
00269 #define IDS_UAT_INDENT                  32939
00270 #define IDS_UAT_UNKNOWN                 32940
00271 #define IDS_UAT_CUT                     32941
00272 #define IDS_UAT_PASTE                   32942
00273 #define IDS_UAT_BACKSPACE               32943
00274 #define IDS_UAT_UNINDENT                32944
00275 #define IDS_UAT_DRAGDROP                32945
00276 #define IDS_UAT_TAB                     32946
00277 #define IDS_UAT_ENTER                   32947
00278 #define ID_EDIT_FIND_COMBO              32948
00279 #define ID_TOOLS_OPTIONS                32949
00280 #define ID_VIEW_APP_LOOK                32950
00281 #define ID_HELP_WEB                     32951
00282 #define ID_EDIT_HIDESELECTION           32952
00283 #define ID_EDIT_TOGGLEOUTLINING         32953
00284 #define ID_EDIT_STOPHIDINGCURRENT       32954
00285 #define ID_EDIT_TOGGLEALLOUTLINING      32955
00286 #define ID_EDIT_COLLAPSETODEFINITIONS   32956
00287 #define ID_EDIT_STOPOUTLINING           32957
00288 #define ID_EDIT_AUTOOUTLINING           32958
00289 #define ID_EDIT_ENABLEOUTLINING         32959
00290 #define ID_EDIT_NEXT_WORD               32960
00291 #define ID_EDIT_LINENUMBERS             32961
00292 #define IDS_UAT_REPLACE                 32962
00293 #define ID_EDIT_GOTO_LINE               32963
00294 #define ID_MDI_NEW_VERT_GROUP           32965
00295 #define ID_MDI_NEW_HORZ_TAB_GROUP       32966
00296 #define ID_MDI_MOVE_TO_PREV_GROUP       32967
00297 #define ID_MDI_CANCEL                   32968
00298 #define ID_MDI_MOVE_TO_NEXT_GROUP       32969
00299 #define ID_MDI_TABBED_DOCUMENT          32974
00300
00301 // Next default values for new objects
00302 //
00303 #ifdef APSTUDIO_INVOKED
00304 #ifndef APSTUDIO_READONLY_SYMBOLS
00305 #define _APS_3D_CONTROLS                     1
00306 #define _APS_NEXT_RESOURCE_VALUE        210
00307 #define _APS_NEXT_COMMAND_VALUE         32975
00308 #define _APS_NEXT_CONTROL_VALUE         1025
00309 #define _APS_NEXT_SYMED_VALUE           123
00310 #endif
00311 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDlgtempDlg Member List

This is the complete list of members for CDlgtempDlg, including all inherited members.
CDlgtempDlg(CWnd *pParent=NULL) | CDlgtempDlg |
DoDataExchange(CDataExchange *pDX) | CDlgtempDlg | [protected, virtual]
IDD enum value | CDlgtempDlg |
InfoToDialogHelper(int nItem, LPCTSTR lpszSelectedItem) | CDlgtempDlg | [protected]
m_dlgTemplate | CDlgtempDlg | [protected]
m_hIcon | CDlgtempDlg | [protected]
m_nActiveItem | CDlgtempDlg |
m_nHeight | CDlgtempDlg |
m_nItem | CDlgtempDlg |
m_nWidth | CDlgtempDlg |
m_strCaption | CDlgtempDlg |
m_strSelectedItem | CDlgtempDlg |
m_x | CDlgtempDlg |
m_y | CDlgtempDlg |
OnButtonInformation() | CDlgtempDlg | [protected]
OnDemoIt() | CDlgtempDlg | [protected]
OnEditControlInformation() | CDlgtempDlg | [protected]
OnInitDialog() | CDlgtempDlg | [protected, virtual]
OnPaint() | CDlgtempDlg | [protected]
OnStaticTextInformation() | CDlgtempDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CDlgtempDlg | [protected]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonGadgetsApp Member List

This is the complete list of members for CRibbonGadgetsApp, including all inherited members.
CRibbonGadgetsApp() | CRibbonGadgetsApp |
ExitInstance() | CRibbonGadgetsApp | [virtual]
InitInstance() | CRibbonGadgetsApp | [virtual]
OnAppAbout() | CRibbonGadgetsApp |
PreLoadState() | CRibbonGadgetsApp | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertiesToolBar Member List

This is the complete list of members for CPropertiesToolBar, including all inherited members.
AllowShowOnList() const | CPropertiesToolBar | [inline, virtual]
AllowShowOnList() const | CPropertiesToolBar | [inline, virtual]
OnUpdateCmdUI(CFrameWnd *, BOOL bDisableIfNoHndler) | CPropertiesToolBar | [inline, virtual]
OnUpdateCmdUI(CFrameWnd *, BOOL bDisableIfNoHndler) | CPropertiesToolBar | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/pendlg.cpp Source File

  • general
  • Scribble

pendlg.cpp

Go to the documentation of this file.
00001 // PenDlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014 #include "PenDlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CPenWidthsDlg dialog
00023
00024
00025 CPenWidthsDlg::CPenWidthsDlg(CWnd* pParent /*=NULL*/)
00026   : CDialog(CPenWidthsDlg::IDD, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CPenWidthsDlg)
00029   m_nThinWidth = 0;
00030   m_nThickWidth = 0;
00031   //}}AFX_DATA_INIT
00032 }
00033
00034
00035 void CPenWidthsDlg::DoDataExchange(CDataExchange* pDX)
00036 {
00037   CDialog::DoDataExchange(pDX);
00038   //{{AFX_DATA_MAP(CPenWidthsDlg)
00039   DDX_Text(pDX, IDC_THIN_PEN_WIDTH, m_nThinWidth);
00040   DDV_MinMaxInt(pDX, m_nThinWidth, 1, 20);
00041   DDX_Text(pDX, IDC_THICK_PEN_WIDTH, m_nThickWidth);
00042   DDV_MinMaxInt(pDX, m_nThickWidth, 1, 20);
00043   //}}AFX_DATA_MAP
00044 }
00045
00046
00047 BEGIN_MESSAGE_MAP(CPenWidthsDlg, CDialog)
00048   //{{AFX_MSG_MAP(CPenWidthsDlg)
00049   ON_BN_CLICKED(IDC_DEFAULT_PEN_WIDTHS, OnDefaultPenWidths)
00050   //}}AFX_MSG_MAP
00051 END_MESSAGE_MAP()
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CPenWidthsDlg message handlers
00055
00056 void CPenWidthsDlg::OnDefaultPenWidths()
00057 {
00058   m_nThinWidth = 2;
00059   m_nThickWidth = 5;
00060   UpdateData(FALSE);  // causes DoDataExchange()
00061     // bSave=FALSE means don't save from screen,
00062     // rather, write to screen
00063 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/splitfrm.cpp Source File

  • ole
  • drawcli

splitfrm.cpp

Go to the documentation of this file.
00001 // splitfrm.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "drawcli.h"
00015 #include "splitfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CSplitFrame
00024
00025 IMPLEMENT_DYNCREATE(CSplitFrame, CMDIChildWnd)
00026
00027 CSplitFrame::CSplitFrame()
00028 {
00029 }
00030
00031 CSplitFrame::~CSplitFrame()
00032 {
00033 }
00034
00035 BOOL CSplitFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
00036 {
00037   return m_wndSplitter.Create(this,
00038     2, 2,       // TODO: adjust the number of rows, columns
00039     CSize(10, 10),  // TODO: adjust the minimum pane size
00040     pContext);
00041 }
00042
00043 BEGIN_MESSAGE_MAP(CSplitFrame, CMDIChildWnd)
00044   //{{AFX_MSG_MAP(CSplitFrame)
00045     // NOTE - the ClassWizard will add and remove mapping macros here.
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CSplitFrame message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsDlg.h Source File

  • vc2008fp
  • VisualStudioDemo

OptionsDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "OptionsPages.h"
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // COptionsDlg
00016
00017 class COptionsDlg : public CMFCPropertySheet
00018 {
00019   DECLARE_DYNAMIC(COptionsDlg)
00020
00021 // Construction
00022 public:
00023   COptionsDlg(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00024
00025 // Attributes
00026 public:
00027   COptionsPage1  m_Page11;
00028   COptionsPage12 m_Page12;
00029   COptionsPage21 m_Page21;
00030   COptionsPage22 m_Page22;
00031   COptionsPage31 m_Page31;
00032   COptionsPage32 m_Page32;
00033
00034 // Implementation
00035 public:
00036   virtual ~COptionsDlg();
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/stdafx.cpp Source File

  • advanced
  • speakn

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : pre-compiled header and types file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliSearchHandler.cpp Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawCliSearchHandler.cpp

Go to the documentation of this file.
00001 // DrawCliSearchHandler.cpp : Implementation of CDrawCliSearchHandler
00002
00003 #include "stdafx.h"
00004 #include "DrawCliSearchHandler.h"
00005
00006
00007 // CDrawCliSearchHandler
00008
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDockApp Member List

This is the complete list of members for CDockApp, including all inherited members.
CDockApp() | CDockApp |
InitInstance() | CDockApp | [virtual]
OnAppAbout() | CDockApp |
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/Resource.h Source File

  • vc2008fp
  • MSOffice2007Demo

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by MSOffice2007Demo.rc
00004 //
00005 #define IDB_BUTTONS                     100
00006 #define IDB_INSERT                      101
00007 #define IDB_INSERTLARGE                 102
00008 #define IDB_MAILINGS                    106
00009 #define IDD_POPULAR_PAGE                106
00010 #define IDB_MAILINGSLARGE               107
00011 #define IDD_RES_PAGE                    107
00012 #define IDB_MAIN                        108
00013 #define IDB_PAGELAYOUT                  109
00014 #define IDB_PAGELAYOUTLARGE             110
00015 #define IDB_REFERENCES                  111
00016 #define IDB_REFERENCESLARGE             112
00017 #define IDB_VIEW                        114
00018 #define IDB_VIEWLARGE                   115
00019 #define IDB_WRITE                       116
00020 #define IDB_WRITELARGE                  117
00021 #define IDP_FAILED_TO_CREATE            119
00022 #define IDP_OLE_INIT_FAILED             120
00023 #define IDR_CNTR_INPLACE                122
00024 #define IDR_CONTEXT_MENU                123
00025 #define IDR_FONT                        125
00026 #define IDR_WRITE_FONTCASE_MENU         126
00027 #define IDR_INSERT_COVERPAGE_MENU       127
00028 #define IDR_MAINFRAME                   128
00029 #define IDR_INSERT_FOOTER_MENU          129
00030 #define IDR_INSERT_HEADER_MENU          130
00031 #define IDR_INSERT_PAGENUMBERS_MENU     131
00032 #define IDR_INSERT_PICTURE_MENU         132
00033 #define IDR_INSERT_SHAPES_MENU          133
00034 #define IDR_MAIL_MERGE_MENU             134
00035 #define IDR_MAIL_RECIPIENTS_MENU        135
00036 #define IDR_PAGELAYOUT_BRINGTOFRONT     137
00037 #define IDR_PAGELAYOUT_COLUMNS          139
00038 #define IDR_PAGELAYOUT_MARGINS          141
00039 #define IDR_PAGELAYOUT_ORIENTATION      142
00040 #define IDR_PAGELAYOUT_SENDTOBACK       143
00041 #define IDR_PAGELAYOUT_TEXTWRAPPING     144
00042 #define IDR_PARA_BULLETS_MENU           146
00043 #define IDR_PARA_LINESPACING_MENU       147
00044 #define IDR_PARA_MULTILIST_MENU         148
00045 #define IDR_PARA_NUMBERING_MENU         149
00046 #define IDR_PARAGRAPH                   150
00047 #define IDR_WRITE_PASTE_MENU            151
00048 #define IDR_REFERENCES_ADDTEXT          153
00049 #define IDR_REFERENCES_INSERTCITATION   154
00050 #define IDB_VIEWPAT_1                   154
00051 #define IDR_REFERENCES_NEXTFOOTNOTE     155
00052 #define IDB_VIEWPAT_2                   155
00053 #define IDB_VIEWPAT_3                   156
00054 #define IDR_WRITE_SELECT_MENU           157
00055 #define IDB_VIEWPAT_4                   157
00056 #define IDR_WRITE_STYLECHANGE_MENU      161
00057 #define IDR_INSERT_TABLE_MENU           162
00058 #define IDB_SHAPE7                      162
00059 #define IDR_THEME_MENU                  163
00060 #define IDB_SHAPE1                      163
00061 #define IDB_SHAPE2                      164
00062 #define IDR_THEME_MENU_STATIC           164
00063 #define IDB_TOOLTIP_FONTDLG             165
00064 #define IDR_DUMMY_MENU                  165
00065 #define IDB_TOOLTIP_PARAGRAPH           166
00066 #define IDB_TOOLTIP_CLIPBOARD           167
00067 #define IDR_MSTYPE                      168
00068 #define IDB_SHAPE6                      168
00069 #define IDB_FILELARGE                   169
00070 #define IDB_FILESMALL                   170
00071 #define IDB_STYLES                      171
00072 #define IDB_SHAPE3                      172
00073 #define IDB_SHAPE4                      173
00074 #define IDB_SHAPE5                      174
00075 #define IDB_PICTURE                     175
00076 #define IDB_CHART                       176
00077 #define IDB_TABLE                       177
00078 #define IDB_PICTURE_FORMAT              178
00079 #define IDB_PICTURE_FORMATLARGE         179
00080 #define IDB_CHART_DESIGN                180
00081 #define IDB_CHART_DESIGNLARGE           181
00082 #define IDB_CHART_LAYOUT                182
00083 #define IDB_CHART_LAYOUTLARGE           183
00084 #define IDB_CHART_FORMAT                184
00085 #define IDB_CHART_FORMATLARGE           185
00086 #define IDB_LAYOUT                      186
00087 #define IDI_REFRESH                     186
00088 #define IDB_SPELL                       187
00089 #define IDI_SPELL                       187
00090 #define IDB_TOOLTIP_MAIN                188
00091 #define IDB_BULLETS                     189
00092 #define IDB_NUM                         190
00093 #define IDB_OPTIONS                     192
00094 #define IDB_HEADERPAT_1                 200
00095 #define IDB_HEADERPAT_2                 201
00096 #define IDB_HEADERPAT_3                 202
00097 #define IDB_HEADERPAT_4                 203
00098 #define IDB_INFO                        204
00099 #define IDR_WRITE_BORDERS_MENU          205
00100 #define IDR_WRITE_FIND_MENU             206
00101 #define IDR_INSERT_TEXTBOX_MENU         207
00102 #define IDB_MULTI                       208
00103 #define IDB_POSITION_1                  209
00104 #define IDB_POSITION_2                  210
00105 #define IDB_REVIEW                      211
00106 #define IDB_REVIEWLARGE                 212
00107 #define IDR_REVIEW_COMMENTS_DELETE      213
00108 #define IDR_REVIEW_TRACKING_TRACKCHANGES 214
00109 #define IDR_REVIEW_TRACKING_BALLOONS    215
00110 #define IDR_REVIEW_TRACKING_SHOW        216
00111 #define IDR_REVIEW_TRACKING_REVIEWINGPANE 217
00112 #define IDR_REVIEW_CHANGES_ACCEPT       218
00113 #define IDR_REVIEW_CHANGES_REJECT       219
00114 #define IDR_REVIEW_COMPARE_SHOWSOURCE   220
00115 #define IDR_REVIEW_COMPARE_COMPARE_COMPARE 221
00116 #define IDB_THEME_COLORS                222
00117 #define IDB_THEME_THEMES                224
00118 #define IDB_THEME_EFFECTS               225
00119 #define IDB_THEME_FONTS                 227
00120 #define IDD_ABOUTBOX                    999
00121 #define IDC_SHOW_FLOATY                 1005
00122 #define IDC_SHOW_DEV_TAB                1006
00123 #define IDC_COLOR_SCHEME                1007
00124 #define IDC_SCREENTIP_STYLE             1008
00125 #define IDC_HOME                        1008
00126 #define IDC_CONTACT                     1009
00127 #define IDC_SHOW_KEY_TIPS               1009
00128 #define IDC_PRODUCT                     1010
00129 #define IDC_BANER                       1010
00130 #define IDC_SUPPORT                     1011
00131 #define ID_PAGELAYOUT_EFFECTS_ACADEMIC  32770
00132 #define ID_REFERENCES_INSERTCITATION_ADDNEWPLACEHOLDER 32771
00133 #define ID_REFERENCES_INSERTCITATION_ADDNEWSOURCE 32772
00134 #define ID_PAGELAYOUT_EFFECTS_ATRIUM    32773
00135 #define ID_PAGELAYOUT_TEXTWRAPPING_BEHINDTEXT 32774
00136 #define ID_PAGELAYOUT_BRINGFORWARD      32775
00137 #define ID_PAGELAYOUT_BRINGINFRONTOFTEXT 32776
00138 #define ID_PAGELAYOUT_BRINGTOFRONT      32777
00139 #define ID_FILE_SEND_EMAIL              32778
00140 #define ID_CANCEL_EDIT_CNTR             32779
00141 #define ID_STOP_HIGHLIGHTING            32779
00142 #define ID_STATUSBAR_LINE               32780
00143 #define ID_STATUSBAR_COLUMN             32781
00144 #define ID_STATUSBAR_PROGRESS           32782
00145 #define ID_FILE_SEND_FAX                32783
00146 #define ID_EDIT_COPYFORMAT              32784
00147 #define ID_FILE_PUBLISH_DOCMANAGE_SERVER 32785
00148 #define ID_FONT_BOLD                    32786
00149 #define ID_FONT_CHANGECASE              32787
00150 #define ID_FONT_CLEARFORMAT             32788
00151 #define ID_FONT_COLOR                   32789
00152 #define ID_FONT_FONT                    32790
00153 #define ID_FONT_FONTSIZE                32791
00154 #define ID_FONT_GROWFONT                32792
00155 #define ID_FONT_ITALIC                  32793
00156 #define ID_FONT_SHRINK                  32794
00157 #define ID_FONT_STRIKETHROUGH           32795
00158 #define ID_FONT_SUBSCRIPT               32796
00159 #define ID_FONT_SUPERSCRIPT             32797
00160 #define ID_FONT_TEXTHIGHLIGHT           32798
00161 #define ID_FONT_UNDERLINE               32799
00162 #define ID_FILE_PUBLISH_CREATE_DOCWORKSPACE 32800
00163 #define ID_FILE_PREPARE                 32801
00164 #define ID_INSERT_BLACKPAGE             32802
00165 #define ID_INSERT_BOOKMARK              32803
00166 #define ID_INSERT_BOTTOMOFPAGE          32804
00167 #define ID_INSERT_CHART                 32805
00168 #define ID_INSERT_CLIPART               32806
00169 #define ID_FILE_SEND                    32807
00170 #define ID_INSERT_COVERPAGE             32808
00171 #define ID_INSERT_DATETIME              32809
00172 #define ID_INSERT_SMARTART              32810
00173 #define ID_GROUP_SHORTCUTS              32811
00174 #define ID_INSERT_DROPCAP               32812
00175 #define ID_INSERT_EDITFOOTER            32813
00176 #define ID_INSERT_EDITHEADER            32814
00177 #define ID_INSERT_EQUATION              32815
00178 #define ID_STATUSBAR_PRINTLAYOUT        32816
00179 #define ID_INSERT_FOOTER                32817
00180 #define ID_INSERT_FORMATPAGENUMBERS     32818
00181 #define ID_INSERT_HEADER                32819
00182 #define ID_INSERT_HYPERLINK             32820
00183 #define ID_INSERT_OBJECT                32821
00184 #define ID_INSERT_PAGEBREAK             32822
00185 #define ID_INSERT_PAGEMARGINS           32823
00186 #define ID_INSERT_PAGENUMBER            32824
00187 #define ID_INSERT_PICTURE               32825
00188 #define ID_INSERT_PICTUREFROMSCANER     32826
00189 #define ID_INSERT_QUICKPARTS            32827
00190 #define ID_STATUSBAR_FULL_SCREEN_READING 32828
00191 #define ID_INSERT_REFERENCE             32829
00192 #define ID_INSERT_REMOVECURRENTCOVERPAGE 32830
00193 #define ID_INSERT_REMOVEFOOTER          32831
00194 #define ID_INSERT_REMOVEHEADER          32832
00195 #define ID_INSERT_REMOVEPAGENUMBERS     32833
00196 #define ID_INSERT_SAVESELECTIONTOFOOTERGALLERY 32834
00197 #define ID_INSERT_SAVESELECTIONTOHEADERGALLERY 32835
00198 #define ID_INSERT_SAVETOCOVERPAGEGALLERY 32836
00199 #define ID_INSERT_SHAPES                32837
00200 #define ID_INSERT_SHAPESNEW             32838
00201 #define ID_INSERT_SIGNATURELINE         32839
00202 #define ID_INSERT_SYMBOL                32840
00203 #define ID_INSERT_TABLE                 32841
00204 #define ID_INSERT_TEXTBOX               32842
00205 #define ID_INSERT_TOPOFPAGE             32843
00206 #define ID_INSERT_WORDART               32844
00207 #define ID_STATUSBAR_WEBLAYOUT          32845
00208 #define ID_STATUSBAR_DRAFT              32846
00209 #define ID_STATUSBAR_MASTER_DOCUMENT_TOOLS 32847
00210 #define ID_STATUSBAR_ZOOM_SLIDER        32848
00211 #define ID_STATUSBAR_ZOOM               32849
00212 #define ID_SET_STYLE                    32850
00213 #define ID_MAILINGS_ADDRESSBLOCK        32851
00214 #define ID_MAILINGS_AUTOCHECHERRORS     32852
00215 #define ID_MAILINGS_CREATE              32853
00216 #define ID_MAILINGS_CREATELABELS        32854
00217 #define ID_MAILINGS_DIRECTORY           32855
00218 #define ID_MAILINGS_EDITRECIPIENTLIST   32856
00219 #define ID_MAILINGS_EMAILMESSAGES       32857
00220 #define ID_MAILINGS_ENVELOPES           32858
00221 #define ID_MAILINGS_FINDRECIPIENT       32860
00222 #define ID_MAILINGS_FINISH              32861
00223 #define ID_MAILINGS_FIRSTRECORD         32862
00224 #define ID_MAILINGS_GOTORECORD          32863
00225 #define ID_MAILINGS_GREETINGLINE        32864
00226 #define ID_MAILINGS_HIGHLIGHT           32865
00227 #define ID_MAILINGS_INSERTMERGEDFIELD   32866
00228 #define ID_MAILINGS_LABELS              32867
00229 #define ID_MAILINGS_LASTRECORD          32868
00230 #define ID_MAILINGS_LETTERS             32869
00231 #define ID_MAILINGS_MATCHFIELDS         32870
00232 #define ID_MAILINGS_NEXTRECORD          32871
00233 #define ID_MAILINGS_NORMALDOCUMENT      32872
00234 #define ID_MAILINGS_PREVIOUSRECORD      32873
00235 #define ID_MAILINGS_RULES               32874
00236 #define ID_MAILINGS_SELECTFROMCONTACTS  32875
00237 #define ID_MAILINGS_SELECTRECIPIENTS    32877
00238 #define ID_MAILINGS_STARTMAILMERGE      32878
00239 #define ID_MAILINGS_STEPBYSTEPMAILMERGEWIZARD 32879
00240 #define ID_MAILINGS_TYPENEWLIST         32880
00241 #define ID_MAILINGS_UPDATELABELS        32881
00242 #define ID_MAILINGS_USEEXISTINGLIST     32883
00243 #define ID_MAILINGS_VIEWMERGEDDATA      32884
00244 #define ID_PAGELAYOUT_MARGINS_MIRRORED  32885
00245 #define ID_PAGELAYOUT_COLUMNS_MORECOLUMNS 32886
00246 #define ID_PAGELAYOUT_MARGINS_NARROW    32887
00247 #define ID_REFERENCES_ENDNOTE_NEXT      32888
00248 #define ID_REFERENCES_FOOTNOTE_NEXT     32889
00249 #define ID_PAGELAYOUT_MARGINS_NORMAL    32890
00250 #define ID_REFERENCES_ADDTEXT_NOTSHOWNIN 32891
00251 #define ID_PAGELAYOUT_EFFECTS_OFFICE    32892
00252 #define ID_PAGELAYOUT_COLUMNS_ONE       32893
00253 #define ID_PAGELAYOUT_ARRANGE_ALIGN     32894
00254 #define ID_PAGELAYOUT_ARRANGE_BRINGTOFRONT 32895
00255 #define ID_PAGELAYOUT_ARRANGE_GROUP     32896
00256 #define ID_PAGELAYOUT_ARRANGE_POSITION  32897
00257 #define ID_PAGELAYOUT_ARRANGE_ROTATE    32898
00258 #define ID_PAGELAYOUT_ARRANGE_SENDTOBACK 32899
00259 #define ID_PAGELAYOUT_ARRANGE_TEXTWRAPPING 32900
00260 #define ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS 32901
00261 #define ID_PAGELAYOUT_PAGEBACKGROUND_PAGECOLOR 32902
00262 #define ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK 32903
00263 #define ID_PAGELAYOUT_PAGESETUP_BREAKS  32904
00264 #define ID_PAGELAYOUT_PAGESETUP_COLUMNS 32905
00265 #define ID_PAGELAYOUT_PAGESETUP_HYPHENATION 32906
00266 #define ID_PAGELAYOUT_PAGESETUP_LINENUMBERS 32907
00267 #define ID_PAGELAYOUT_PAGESETUP_MARGINS 32908
00268 #define ID_PAGELAYOUT_PAGESETUP_ORIENTATTION 32909
00269 #define ID_PAGELAYOUT_PAGESETUP_SIZE    32910
00270 #define ID_PAGELAYOUT_FONTS             32913
00271 #define ID_PARA_ALIGNLEFT               32915
00272 #define ID_PARA_ALIGNRIGHT              32916
00273 #define ID_PARA_BORDER                  32917
00274 #define ID_PARA_BULLETS                 32918
00275 #define ID_PARA_CENTER                  32919
00276 #define ID_PARA_DECREASEINDENT          32920
00277 #define ID_PARA_DEFINENEWBULLET         32921
00278 #define ID_PARA_DEFINENEWLISTSTYLE      32922
00279 #define ID_PARA_DEFINENEWMULTILEVELLIST 32923
00280 #define ID_PARA_DEFINENEWNUMBERFORMAT   32924
00281 #define ID_PARA_ENDLINEMARK             32925
00282 #define ID_PARA_INCREASEINDENT          32926
00283 #define ID_PARA_JUSTIFY                 32927
00284 #define ID_PARA_LINESPACING             32928
00285 #define ID_PARA_LINESPACING1            32929
00286 #define ID_PARA_LINESPACING2            32930
00287 #define ID_PARA_LINESPACING3            32931
00288 #define ID_PARA_LINESPACING4            32932
00289 #define ID_PARA_LINESPACING5            32933
00290 #define ID_PARA_LINESPACINGAFTER        32934
00291 #define ID_PARA_LINESPACINGBEFORE       32935
00292 #define ID_PARA_LINESPACINGOPTIONS      32936
00293 #define ID_PARA_MULTILEVEL              32937
00294 #define ID_PARA_MULTYLEVEL              32938
00295 #define ID_PARA_NUMBERING               32939
00296 #define ID_PARA_SETNUMBERINGVALUE       32940
00297 #define ID_PARA_SHADING                 32941
00298 #define ID_PARA_SORT                    32942
00299 #define ID_PAGELAYOUT_ORIENTATION_PORTRAIT 32943
00300 #define ID_REFERENCES_ENDNOTE_PREVIOUS  32944
00301 #define ID_REFERENCES_FOOTNOTE_PREVIOUS 32945
00302 #define ID_REFERENCES_CAPTIONS_CROSSREFERENCE 32946
00303 #define ID_REFERENCES_CAPTIONS_INSERTCAPTION 32947
00304 #define ID_REFERENCES_CAPTIONS_INSERTTOF 32948
00305 #define ID_REFERENCES_CAPTIONS_UPDATETABLE 32949
00306 #define ID_REFERENCES_CB_INSERTBIBLIOGRAPHY 32950
00307 #define ID_REFERENCES_STYLE             32951
00308 #define ID_REFERENCES_FOOTNOTES_INSERTENDNOTE 32952
00309 #define ID_REFERENCES_FOOTNOTES_INSERTFOOTNOTE 32953
00310 #define ID_REFERENCES_FOOTNOTES_NEXTFOOTNOTE 32954
00311 #define ID_REFERENCES_FOOTNOTES_SHOWNOTES 32955
00312 #define ID_REFERENCES_INDEX_INSERTINDEX 32956
00313 #define ID_REFERENCES_INDEX_MARKENTRY   32957
00314 #define ID_REFERENCES_INDEX_UPDATEINDEX 32958
00315 #define ID_REFERENCES_TA_INSERTTOA      32959
00316 #define ID_REFERENCES_TA_MARKCITATION   32960
00317 #define ID_REFERENCES_TA_UPDATETABLE    32961
00318 #define ID_REFERENCES_TC_UPDATETABLE    32962
00319 #define ID_PAGELAYOUT_COLUMNS_RIGHT     32963
00320 #define ID_PAGELAYOUT_THEMES_SAVECURRENTTHEME 32964
00321 #define ID_REFERENCES_INSERTCITATION_SEARCHLIBRARIES 32965
00322 #define ID_EDIT_SELECTFORMAT            32966
00323 #define ID_EDIT_SELECTOBJECTS           32967
00324 #define ID_PAGELAYOUT_SENDBACKWARD      32968
00325 #define ID_PAGELAYOUT_SENDBEHINDTEXT    32969
00326 #define ID_PAGELAYOUT_SENDTOBACK        32970
00327 #define ID_FONT_CASE_SENTENCE           32971
00328 #define ID_PAGELAYOUT_TEXTWRAPPING_SQUARE 32972
00329 #define ID_PAGELAYOUT_THEMES_BROWSEFORTHEMES 32973
00330 #define ID_FONT_CASE_CAPITALIZE         32974
00331 #define ID_VIEW_TASK_PANE               32975
00332 #define ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS 32976
00333 #define ID_PAGELAYOUT_COLUMNS_THREE     32977
00334 #define ID_PAGELAYOUT_TEXTWRAPPING_THROUGH 32978
00335 #define ID_PAGELAYOUT_TEXTWRAPPING_TIGHT 32979
00336 #define ID_FONT_CASE_TOGGLECASE         32980
00337 #define ID_PAGELAYOUT_TEXTWRAPPING_TOPANDBOTTOM 32981
00338 #define ID_PAGELAYOUT_COLUMNS_TWO       32982
00339 #define ID_FONT_CASE_UPPERCASE          32983
00340 #define ID_VIEW_MESSAGEBAR              32984
00341 #define ID_VIEW_APPLOOK_2003            32985
00342 #define ID_VIEW_APPLOOK_2007_1          32986
00343 #define ID_VIEW_APPLOOK_2007_2          32987
00344 #define ID_VIEW_APPLOOK_2007_3          32988
00345 #define ID_VIEW_APPLOOK_2007_4          32989
00346 #define ID_VIEW_APPLOOK_WIN7            32990
00347 #define ID_VIEW_COMPARE                 32991
00348 #define ID_VIEW_CUSTOMIZE               32992
00349 #define ID_VIEW_DOCUMENTMAP             32993
00350 #define ID_VIEW_DRAFT                   32994
00351 #define ID_VIEW_FULLSCREEN              32995
00352 #define ID_VIEW_GRIDLINES               32996
00353 #define ID_VIEW_NEWWINDOW               32997
00354 #define ID_VIEW_OUTLINE                 32998
00355 #define ID_VIEW_PRINTLAYOUT             32999
00356 #define ID_VIEW_PROPERTIES              33000
00357 #define ID_VIEW_RESETWINDOW             33001
00358 #define ID_VIEW_RULER                   33002
00359 #define ID_VIEW_SPLIT                   33003
00360 #define ID_VIEW_SWITCHWINDOW            33004
00361 #define ID_VIEW_SYNCSCROLLING           33005
00362 #define ID_VIEW_TOOLBARS                33006
00363 #define ID_VIEW_TRUMBNAILS              33007
00364 #define ID_VIEW_WEBLAYOUT               33008
00365 #define ID_VIEW_ZOOM                    33009
00366 #define ID_PAGELAYOUT_MARGINS_WIDE      33010
00367 #define ID_WRITE_APPLYSTYLES            33011
00368 #define ID_WRITE_CHANGESTYLES           33012
00369 #define ID_WRITE_CLEARFORMATTING        33013
00370 #define ID_EDIT_GOTO                    33014
00371 #define ID_EDIT_PASTE_HYPERLINK         33015
00372 #define ID_WRITE_QUICKSTYLES            33016
00373 #define ID_WRITE_SAVESTYLE              33020
00374 #define ID_WRITE_SELECT                 33022
00375 #define ID_PAGELAYOUT_MARGINS_CUSTOMMARGINS 33023
00376 #define ID_PAGELAYOUT_TEXTWRAPPING_EDITWRAPPOINTS 33024
00377 #define ID_WRITE_CLIPBOARD              33025
00378 #define ID_WRITE_FONT                   33026
00379 #define ID_WRITE_PARAGRAPH              33027
00380 #define ID_WRITE_STYLE                  33028
00381 #define ID_PARA_PAGESETUP               33029
00382 #define ID_CUSTOMIZE_QUICK_ACCESS_TOOLBAR 33032
00383 #define ID_PICTURE_FORMAT_TOOLS_BRIGHTNESS 33033
00384 #define ID_PICTURE_FORMAT_TOOLS_CONTRAST 33034
00385 #define ID_PICTURE_FORMAT_TOOLS_RECOLOR 33035
00386 #define ID_PICTURE_FORMAT_TOOLS_COMPRESS 33036
00387 #define ID_PICTURE_FORMAT_TOOLS_CHANGE  33037
00388 #define ID_PICTURE_FORMAT_TOOLS_RESET   33038
00389 #define ID_CHART_DESIGN_TYPE_CHANGE     33039
00390 #define ID_CHART_DESIGN_TYPE_SAVETEMPLATE 33040
00391 #define ID_CHART_DESIGN_DATA_SWITCH     33041
00392 #define ID_CHART_DESIGN_DATA_EDIT       33042
00393 #define ID_CHART_DESIGN_DATA_SHOW       33043
00394 #define ID_CHART_LAYOUT_SHAPES_PICTURE  33044
00395 #define ID_CHART_LAYOUT_SHAPES_SHAPES   33045
00396 #define ID_CHART_LAYOUT_SHAPES_TEXTBOX  33046
00397 #define ID_CHART_LAYOUT_LABELS_TITLE    33047
00398 #define ID_CHART_LAYOUT_LABELS_AXIS     33048
00399 #define ID_CHART_LAYOUT_LABELS_LEGEND   33049
00400 #define ID_CHART_LAYOUT_LABELS_DATALABELS 33050
00401 #define ID_CHART_LAYOUT_LABELS_DATATABLE 33051
00402 #define ID_CHART_LAYOUT_AXES_AXES       33052
00403 #define ID_CHART_LAYOUT_AXES_GRIDLINES  33053
00404 #define ID_CHART_FORMAT_CURSEL_FORMAT   33054
00405 #define ID_CHART_FORMAT_CURSEL_RESET    33055
00406 #define ID_CHART_FORMAT_SHAPES_FILL     33056
00407 #define ID_CHART_FORMAT_SHAPES_OUTLINE  33057
00408 #define ID_CHART_FORMAT_SHAPES_EFFECTS  33058
00409 #define ID_STATUSBAR_PAGE               33059
00410 #define ID_STATUSBAR_REFRESH            33060
00411 #define ID_STATUSBAR_SPELL              33061
00412 #define ID_PAGELAYOUT_INDENT_LEFT       33062
00413 #define ID_PAGELAYOUT_INDENT_RIGHT      33063
00414 #define ID_PAGELAYOUT_SPACE_BEFORE      33064
00415 #define ID_PAGELAYOUT_SPACE_AFTER       33065
00416 #define ID_MAIN_BUTTON                  33066
00417 #define ID_FROM_PALETTE_BULLET          33067
00418 #define ID_PARA_CHANGE_LIST_LEVEL       33068
00419 #define ID_FROM_PALETTE_NUMBER          33069
00420 #define ID_TOOLS_OPTIONS                33070
00421 #define ID_TABLE_DRAWTABLE              33071
00422 #define ID_VIEW_RTL                     33072
00423 #define ID_STATUSBAR_LINK               33073
00424 #define ID_FROM_PALETTE_TABLE           33074
00425 #define ID_VIEW_ZOOM_100                33075
00426 #define ID_VIEW_ZOOM_ONE_PAGE           33076
00427 #define ID_VIEW_ZOOM_TWO_PAGES          33077
00428 #define ID_VIEW_ZOOM_PAGE_WIDTH         33078
00429 #define ID_VIEW_MACROS                  33079
00430 #define ID_DUMMY                        33080
00431 #define ID_PAGELAYOUT_THEMES            33081
00432 #define ID_PAGELAYOUT_COLORS            33082
00433 #define ID_PAGELAYOUT_EFFECTS           33083
00434 #define ID_PAGELAYOUT_MARGINS           33084
00435 #define ID_PAGELAYOUT_ORIENTATION       33085
00436 #define ID_PAGELAYOUT_COLUMNS           33086
00437 #define ID_TABLE_OF_CONTENTS            33087
00438 #define ID_REFERENCES_ADDTEXT           33088
00439 #define ID_INSERT_CITATION              33089
00440 #define ID_PAGELAYOUT_TEXTWRAPPING      33090
00441 #define ID_FONT_CASE_LOWERCASE          33091
00442 #define ID_PAGELAYOUT_COLUMNS_LEFT      33092
00443 #define ID_PAGELAYOUT_EFFECTS_CIVIC     33093
00444 #define ID_PAGELAYOUT_ORIENTATION_LANDSCAPE 33094
00445 #define ID_PAGELAYOUT_TEXTWRAPPING_INFRONTOFTEXT 33095
00446 #define ID_PAGELAYOUT_TEXTWRAPPING_INLINEWITHTEXT 33096
00447 #define ID_REFERENCES_ADDTEXT_LEVEL1    33097
00448 #define ID_REFERENCES_ADDTEXT_LEVEL2    33098
00449 #define ID_REFERENCES_ADDTEXT_LEVEL3    33099
00450 #define ID_REFERENCES_CB_MANAGESOURCES  33100
00451 #define ID_TABLE_CONVERTTOTABLE         33101
00452 #define ID_TABLE_EXCELSPREADSHEET       33102
00453 #define ID_TABLE_QUICKTABLES            33103
00454 #define ID_BORDERS_ALLBORDERS           33104
00455 #define ID_BORDERS_BORDERSANDSHADING    33105
00456 #define ID_BORDERS_BOTTOMBORDER         33106
00457 #define ID_BORDERS_DIAGONALDOWNBORDER   33107
00458 #define ID_BORDERS_DIAGONALUPBORDER     33108
00459 #define ID_BORDERS_HORIZONTALLINE       33109
00460 #define ID_BORDERS_INSIDEBORDERS        33110
00461 #define ID_BORDERS_INSIDEHORIZONTALBORDER 33111
00462 #define ID_BORDERS_INSIDEVERTICALBORDER 33112
00463 #define ID_BORDERS_LEFTBORDER           33113
00464 #define ID_BORDERS_NOBORDER             33114
00465 #define ID_BORDERS_OUTSIDEBORDERS       33115
00466 #define ID_BORDERS_RIGHTBORDER          33116
00467 #define ID_BORDERS_TOPBORDER            33117
00468 #define ID_BORDERS_VIEWGRIDLINES        33118
00469 #define ID_FROM_PALETTE_MULTILEVEL      33119
00470 #define ID_FROM_PALETTE_POSITION        33120
00471 #define ID_INSERT_CURRENTPOSITION       33121
00472 #define ID_INSERT_DRAWTEXTBOX           33122
00473 #define ID_INSERT_SAVESELECTIONTOTEXTBOXGALLERY 33123
00474 #define ID_PAGELAYOUT_MARGINS_MODERATE  33124
00475 #define ID_PAGELAYOUT_MORELAYOUTOPTIONS 33125
00476 #define ID_PARA_LINESPACING6            33126
00477 #define ID_STYLECHANGE_COLORS           33127
00478 #define ID_STYLECHANGE_FONTS            33128
00479 #define ID_STYLECHANGE_SETDEFAULT       33129
00480 #define ID_STYLECHANGE_STYLESET         33130
00481 #define ID_TABLE_TABLE                  33131
00482 #define ID_FILE_PUBLISH                 33133
00483 #define ID_FILE_PUBLISH_BLOG            33134
00484 #define ID_FILE_SAVE_AS_DOCUMENT        33135
00485 #define ID_FILE_SAVE_AS_TEMPLATE        33136
00486 #define ID_FILE_SAVE_AS_DOCUMENT_OLD    33137
00487 #define ID_FILE_SAVE_AS_ADDINS          33138
00488 #define ID_FILE_SAVE_AS_OTHER           33139
00489 #define ID_FILE_PREPARE_PROPERTIES      33140
00490 #define ID_FILE_PREPARE_INSPECT         33141
00491 #define ID_FILE_PREPARE_ENCRYPT         33142
00492 #define ID_FILE_PREPARE_ADD_SIGNATURE   33143
00493 #define ID_FILE_PREPARE_MARK_AS_FINAL   33144
00494 #define ID_FILE_PREPARE_RUN_CHECKER     33145
00495 #define ID_REVIEW_PROOFING_SPELLINGGRAMMAR 33152
00496 #define ID_REVIEW_PROOFING_RESEARCH     33153
00497 #define ID_REVIEW_PROOFING_THESAURUS    33154
00498 #define ID_REVIEW_PROOFING_TRANSLATE    33155
00499 #define ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP 33156
00500 #define ID_REVIEW_PROOFING_SETLANGUAGE  33157
00501 #define ID_REVIEW_PROOFING_WORDCOUNT    33158
00502 #define ID_REVIEW_COMMENTS_NEWCOMMENT   33159
00503 #define ID_REVIEW_COMMENTS_DELETE_ALLSHOWN 33161
00504 #define ID_REVIEW_COMMENTS_DELETE_ALL   33162
00505 #define ID_REVIEW_COMMENTS_DELETE       33164
00506 #define ID_REVIEW_COMMENTS_PREVIOUS     33165
00507 #define ID_REVIEW_COMMENTS_NEXT         33166
00508 #define ID_REVIEW_TRACKING_TRACKCHANGES 33167
00509 #define ID_REVIEW_TRACKCHANGES_CHANGETRACKINGOPTIONS 33168
00510 #define ID_REVIEW_TRACKING_CHANGEUSERNAME 33169
00511 #define ID_REVIEW_TRACKING_BALLOONS     33170
00512 #define ID_REVIEW_TRACKING_SHOWREVISIONS 33171
00513 #define ID_REVIEW_TRACKING_SHOWALLREVISIONS 33172
00514 #define ID_REVIEW_TRACKING_SHOWONLYCOOMENTS 33173
00515 #define ID_REVIEW_TRACKING_DISPLAYFORREVIEW 33174
00516 #define ID_REVIEW_TRACKING_SHOW_MARKUP  33175
00517 #define ID_REVIEW_TRACKING_SHOW_COMMENTS 33176
00518 #define ID_REVIEW_TRACKING_SHOW_INK     33177
00519 #define ID_REVIEW_TRACKING_SHOW_INSERTIONSANDDELETIONS 33178
00520 #define ID_REVIEW_TRACKING_SHOW_FORMATTING 33179
00521 #define ID_REVIEW_TRACKING_SHOW_MARKUPAREAHIGHLIGHT 33180
00522 #define ID_REVIEW_TRACKING_SHOW_ALLREVIEWERS 33181
00523 #define ID_REVIEW_TRACKING_REVIEWINGPANE 33182
00524 #define ID_REVIEW_TRACKING_REVIEWINGPANE_VERTICAL 33183
00525 #define ID_REVIEW_TRACKING_REVIEWINGPANE_HORIZONTAL 33184
00526 #define ID_REVIEW_CHANGES_ACCEPT        33185
00527 #define ID_REVIEW_CHANGES_ACCEPT_CHANGE 33186
00528 #define ID_REVIEW_CHANGES_ACCEPT_ALLSHOWN 33187
00529 #define ID_REVIEW_CHANGES_ACCEPT_ALL    33188
00530 #define ID_REVIEW_CHANGES_REJECT        33189
00531 #define ID_REVIEW_CHANGES_REJECT_CHANGE 33190
00532 #define ID_REVIEW_CHANGES_REJECT_ALLSHOWN 33191
00533 #define ID_REVIEW_CHANGES_REJECT_ALL    33192
00534 #define ID_REVIEW_CHANGES_PREVIOUS      33193
00535 #define ID_REVIEW_CHANGES_NEXT          33194
00536 #define ID_REVIEW_PROTECT               33195
00537 #define ID_REVIEW_COMPARE_COMPARE       33196
00538 #define ID_REVIEW_COMPARE_COMPARE_COMPARE 33197
00539 #define ID_REVIEW_COMPARE_COMPARE_COMBINE 33198
00540 #define ID_REVIEW_COMPARE_SHOWSOURCE    33199
00541 #define ID_REVIEW_COMPARE_SHOWSOURCE_HIDESOURCE 33200
00542 #define ID_REVIEW_COMPARE_SHOWSOURCE_SHOWORIGINAL 33201
00543 #define ID_REVIEW_COMPARE_SHOWSOURCE_SHOWREVISED 33202
00544 #define ID_REVIEW_COMPARE_SHOWSOURCE_SHOWBOTH 33203
00545 #define ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS 33206
00546 #define ID_PAGELAYOUT_THEMES_RESETFROMTEMPLATE 33207
00547 #define ID_PAGELAYOUT_THEMES_MORETHEMES 33208
00548 #define ID_PAGELAYOUT_PAGESETUP_SIZE_MOREPAPERSIZES 33210
00549 #define ID_TABLE_HEADERROW              33211
00550 #define ID_TABLE_TOTALROW               33212
00551 #define ID_TABLE_BANDEDROWS             33213
00552 #define ID_TABLE_FIRSTCOLUMN            33214
00553 #define ID_TABLE_LASTCOLUMN             33215
00554 #define ID_TABLE_BANDEDCOLUMNS          33216
00555 #define ID_FONT_NOT_FOUND       32217
00556 #define ID_VIEW_ARRANGEALL              32218
00557
00558
00559 // Next default values for new objects
00560 //
00561 #ifdef APSTUDIO_INVOKED
00562 #ifndef APSTUDIO_READONLY_SYMBOLS
00563 #define _APS_3D_CONTROLS                     1
00564 #define _APS_NEXT_RESOURCE_VALUE        228
00565 #define _APS_NEXT_COMMAND_VALUE         33212
00566 #define _APS_NEXT_CONTROL_VALUE         1011
00567 #define _APS_NEXT_SYMED_VALUE           1101
00568 #endif
00569 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawdoc.h Source File

  • ole
  • drawcli

drawdoc.h

Go to the documentation of this file.
00001 // drawdoc.h : interface of the CDrawDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "drawobj.h"
00013 #include "summinfo.h"
00014
00015 class CDrawView;
00016
00017 class CDrawDoc : public COleDocument
00018 {
00019 protected: // create from serialization only
00020   CDrawDoc();
00021   DECLARE_DYNCREATE(CDrawDoc)
00022
00023 // Attributes
00024 public:
00025   CDrawObjList* GetObjects() { return &m_objects; }
00026   const CSize& GetSize() const { return m_size; }
00027   void ComputePageSize();
00028   int GetMapMode() const { return m_nMapMode; }
00029   COLORREF GetPaperColor() const { return m_paperColor; }
00030   CSummInfo *m_pSummInfo;
00031
00032 // Operations
00033 public:
00034   CDrawObj* ObjectAt(const CPoint& point);
00035   void Draw(CDC* pDC, CDrawView* pView);
00036   void Add(CDrawObj* pObj);
00037   void Remove(CDrawObj* pObj);
00038
00039 // Implementation
00040 public:
00041   virtual ~CDrawDoc();
00042   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00043 #ifdef _DEBUG
00044   virtual void AssertValid() const;
00045   virtual void Dump(CDumpContext& dc) const;
00046 #endif
00047
00048 protected:
00049   virtual BOOL OnNewDocument();
00050   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00051   virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
00052
00053   CDrawObjList m_objects;
00054   CSize m_size;
00055   int m_nMapMode;
00056   COLORREF m_paperColor;
00057
00058 // Generated message map functions
00059 protected:
00060   //{{AFX_MSG(CDrawDoc)
00061   afx_msg void OnViewPaperColor();
00062   afx_msg void OnFileSummaryInfo();
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065 };
00066
00067 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMfcieDoc Member List

This is the complete list of members for CMfcieDoc, including all inherited members.
CMfcieDoc() | CMfcieDoc | [protected]
OnNewDocument() | CMfcieDoc | [virtual]
Serialize(CArchive &ar) | CMfcieDoc | [virtual]
~CMfcieDoc() | CMfcieDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/mainfrm.h Source File

  • ole
  • wordpad

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "formatba.h"
00013 #include "ruler.h"
00014
00015 class CMainFrame : public CFrameWnd
00016 {
00017 protected: // create from serialization only
00018   CMainFrame();
00019   DECLARE_DYNCREATE(CMainFrame)
00020
00021 // Attributes
00022 public:
00023   HICON m_hIconDoc;
00024   HICON m_hIconText;
00025   HICON m_hIconWrite;
00026   HICON GetIcon(int nDocType);
00027
00028 // Operations
00029 public:
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CMainFrame)
00034   public:
00035   virtual void ActivateFrame(int nCmdShow = -1);
00036   protected:
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 public:
00042   virtual ~CMainFrame();
00043 #ifdef _DEBUG
00044   virtual void AssertValid() const;
00045   virtual void Dump(CDumpContext& dc) const;
00046 #endif
00047
00048 public:
00049   CToolBar    m_wndToolBar;
00050   CStatusBar  m_wndStatusBar;
00051   CFormatBar  m_wndFormatBar;
00052   CRulerBar   m_wndRulerBar;
00053 protected:  // control bar embedded members
00054   BOOL CreateToolBar();
00055   BOOL CreateFormatBar();
00056   BOOL CreateStatusBar();
00057   BOOL CreateRulerBar();
00058 // Generated message map functions
00059 protected:
00060   //{{AFX_MSG(CMainFrame)
00061   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00062   afx_msg void OnSysColorChange();
00063   afx_msg void OnSize(UINT nType, int cx, int cy);
00064   afx_msg void OnMove(int x, int y);
00065   afx_msg void OnHelpFinder();
00066   afx_msg void OnDropFiles(HDROP hDropInfo);
00067   afx_msg void OnCharColor();
00068   afx_msg void OnPenToggle();
00069   afx_msg void OnFontChange();
00070   afx_msg BOOL OnQueryNewPalette();
00071   afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00072   afx_msg void OnDevModeChange(LPTSTR lpDeviceName);
00073   //}}AFX_MSG
00074   afx_msg LONG_PTR OnBarState(UINT_PTR wParam, LONG_PTR lParam);
00075   afx_msg LONG_PTR OnOpenMsg(UINT_PTR wParam, LONG_PTR lParam);
00076   DECLARE_MESSAGE_MAP()
00077 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/MainFrm.h Source File

  • general
  • DBVList

MainFrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_MAINFRM_H__13CCB747_ED59_11D0_8286_00C04FD73634__INCLUDED_)
00013 #define AFX_MAINFRM_H__13CCB747_ED59_11D0_8286_00C04FD73634__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 class CMainFrame : public CFrameWnd
00020 {
00021 protected: // create from serialization only
00022   CMainFrame();
00023   DECLARE_DYNCREATE(CMainFrame)
00024
00025 // Attributes
00026 public:
00027   CSplitterWnd m_wndSplitter;
00028 public:
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CMainFrame)
00036   public:
00037   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00038   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 public:
00043   virtual ~CMainFrame();
00044 #ifdef _DEBUG
00045   virtual void AssertValid() const;
00046   virtual void Dump(CDumpContext& dc) const;
00047 #endif
00048
00049 protected:  // control bar embedded members
00050   CStatusBar  m_wndStatusBar;
00051   CToolBar    m_wndToolBar;
00052
00053 // Generated message map functions
00054 protected:
00055   //{{AFX_MSG(CMainFrame)
00056   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00057   //}}AFX_MSG
00058   DECLARE_MESSAGE_MAP()
00059 };
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062
00063 //{{AFX_INSERT_LOCATION}}
00064 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00065
00066 #endif // !defined(AFX_MAINFRM_H__13CCB747_ED59_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/childfrm.cpp Source File

  • general
  • snapvw

childfrm.cpp

Go to the documentation of this file.
00001 // ChildFrm.cpp : implementation of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "SnapVw.h"
00014
00015 #include "ChildFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CChildFrame
00025
00026 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
00027
00028 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
00029   //{{AFX_MSG_MAP(CChildFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CChildFrame construction/destruction
00037
00038 CChildFrame::CChildFrame()
00039 {
00040   // TODO: add member initialization code here
00041
00042 }
00043
00044 CChildFrame::~CChildFrame()
00045 {
00046 }
00047
00048 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00049 {
00050   cs.style &= ~WS_THICKFRAME;
00051   cs.style |= WS_BORDER;
00052
00053 // remove the minimize and maximize buttons
00054 // so that the MDI child frame "snaps" to the property pages.
00055
00056   cs.style &= ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
00057
00058   return CMDIChildWnd::PreCreateWindow(cs);
00059 }
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CChildFrame diagnostics
00063
00064 #ifdef _DEBUG
00065 void CChildFrame::AssertValid() const
00066 {
00067   CMDIChildWnd::AssertValid();
00068 }
00069
00070 void CChildFrame::Dump(CDumpContext& dc) const
00071 {
00072   CMDIChildWnd::Dump(dc);
00073 }
00074
00075 #endif //_DEBUG
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFeaturesPage Member List

This is the complete list of members for CFeaturesPage, including all inherited members.
CFeaturesPage() | CFeaturesPage |
DoDataExchange(CDataExchange *pDX) | CFeaturesPage | [protected, virtual]
IDD enum value | CFeaturesPage |
m_tAllowWindowless | CFeaturesPage |
m_tHonorIgnoreActivateWhenVisible | CFeaturesPage |
m_tTwoPassDrawing | CFeaturesPage |
m_tUseIPointerInactive | CFeaturesPage |
m_tUseQuickActivation | CFeaturesPage |
OnContextMenu(CWnd *pWnd, CPoint point) | CFeaturesPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CFeaturesPage | [protected]
~CFeaturesPage() | CFeaturesPage |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypedPtrArrayView Member List

This is the complete list of members for CTypedPtrArrayView, including all inherited members.
AddMyObjectToListBox(CMyObject *pMyObject, int nSel=-1) | CTypedPtrArrayView | [protected]
CTypedPtrArrayView() | CTypedPtrArrayView |
DoDataExchange(CDataExchange *pDX) | CTypedPtrArrayView | [protected, virtual]
GetDocument() | CTypedPtrArrayView | [inline]
IDD enum value | CTypedPtrArrayView |
m_ctlList | CTypedPtrArrayView |
m_float | CTypedPtrArrayView |
m_int | CTypedPtrArrayView |
m_str | CTypedPtrArrayView |
OnAdd() | CTypedPtrArrayView | [protected]
OnInitialUpdate() | CTypedPtrArrayView |
OnRemove() | CTypedPtrArrayView | [protected]
OnRemoveAll() | CTypedPtrArrayView | [protected]
OnSelChangeList() | CTypedPtrArrayView | [protected]
OnUpdateButton() | CTypedPtrArrayView | [protected]
~CTypedPtrArrayView() | CTypedPtrArrayView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTestWindow Member List

This is the complete list of members for CTestWindow, including all inherited members.
AttachCustomMenu() | CTestWindow | [protected]
m_colorMenu | CTestWindow | [protected]
OnCommand(WPARAM wParam, LPARAM lParam) | CTestWindow | [protected, virtual]
OnTestBitmapButton1() | CTestWindow | [protected]
OnTestBitmapButton2() | CTestWindow | [protected]
OnTestBitmapButton3() | CTestWindow | [protected]
OnTestCustomList() | CTestWindow | [protected]
OnTestDerivedEdit() | CTestWindow | [protected]
OnTestSpinEdit() | CTestWindow | [protected]
OnTestSubclassedEdit() | CTestWindow | [protected]
OnTestWndClassEdit() | CTestWindow | [protected]
SetupMenus() | CTestWindow |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneDoc.h Source File

  • vc2008fp
  • TasksPane

TasksPaneDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTasksPaneDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CTasksPaneDoc();
00017   DECLARE_DYNCREATE(CTasksPaneDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE);
00029   virtual void Serialize(CArchive& ar);
00030
00031 // Implementation
00032 public:
00033   virtual ~CTasksPaneDoc();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:
00040   DECLARE_MESSAGE_MAP()
00041 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localppg.h Source File

  • controls
  • localize

localppg.h

Go to the documentation of this file.
00001 // localppg.h : Declaration of the CLocalizePropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 ////////////////////////////////////////////////////////////////////////////
00013 // CLocalizePropPage : See localppg.cpp for implementation.
00014
00015 class CLocalizePropPage : public COlePropertyPage
00016 {
00017   DECLARE_DYNCREATE(CLocalizePropPage)
00018   DECLARE_OLECREATE_EX(CLocalizePropPage)
00019
00020 // Constructor
00021 public:
00022   CLocalizePropPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CLocalizePropPage)
00026   enum { IDD = IDD_PROPPAGE_LOCALIZE };
00027   BOOL    m_Invert;
00028   //}}AFX_DATA
00029
00030 // Implementation
00031 protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033
00034   virtual void OnSetPageSite();
00035   virtual void OnFinalRelease();
00036   virtual HINSTANCE GetResourceHandle(LCID lcid);
00037
00038 // Message maps
00039 protected:
00040   //{{AFX_MSG(CLocalizePropPage)
00041     // NOTE - ClassWizard will add and remove member functions here.
00042     //    DO NOT EDIT what you see in these blocks of generated code !
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045
00046   HINSTANCE hResHandle;
00047 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTesthelpApp Member List

This is the complete list of members for CTesthelpApp, including all inherited members.
CTesthelpApp() | CTesthelpApp
ExitInstance() | CTesthelpApp
InitInstance() | CTesthelpApp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFormatMenu Member List

This is the complete list of members for CFormatMenu, including all inherited members.
ClearStringArray() | CFormatMenu | [inline]
GetStringArray() | CFormatMenu | [inline]
m_sa | CFormatMenu | [private]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/MainFrm.h Source File

  • vc2008fp
  • RibbonMDI

MainFrm.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include "WorkspaceBar.h"
00015 #include "WorkspaceBar2.h"
00016 #include "OutputBar.h"
00017
00018 #define CMDIFrameWnd CMDIFrameWndEx
00019
00020 class CMainFrame : public CMDIFrameWnd
00021 {
00022   DECLARE_DYNAMIC(CMainFrame)
00023 public:
00024   CMainFrame();
00025
00026 // Attributes
00027 public:
00028   BOOL IsPrintPreviewMode ();
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034   public:
00035   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00036
00037 // Implementation
00038 public:
00039   virtual ~CMainFrame();
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045 protected:  // control bar embedded members
00046   CMFCRibbonBar     m_wndRibbonBar;
00047   CMFCRibbonApplicationButton m_MainButton;
00048   CMFCStatusBar m_wndStatusBar;
00049   CWorkspaceBar   m_wndWorkSpace;
00050   CWorkspaceBar2    m_wndWorkSpace2;
00051   COutputBar      m_wndOutput;
00052   CMFCToolBarImages   m_PanelImages;
00053
00054 protected:
00055   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00056   afx_msg void OnWindowManager();
00057   afx_msg void OnUpdateWindowManager(CCmdUI* pCmdUI);
00058   afx_msg void OnMdiMoveToNextGroup();
00059   afx_msg void OnMdiMoveToPrevGroup();
00060   afx_msg void OnMdiNewHorzTabGroup();
00061   afx_msg void OnMdiNewVertGroup();
00062   afx_msg void OnMdiCancel();
00063   afx_msg void OnViewWorkspace();
00064   afx_msg void OnUpdateViewWorkspace(CCmdUI* pCmdUI);
00065   afx_msg void OnViewWorkspace2();
00066   afx_msg void OnUpdateViewWorkspace2(CCmdUI* pCmdUI);
00067   afx_msg void OnViewOutput();
00068   afx_msg void OnUpdateViewOutput(CCmdUI* pCmdUI);
00069
00070   DECLARE_MESSAGE_MAP()
00071
00072   virtual BOOL OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop);
00073   virtual CMDIChildWndEx* CreateDocumentWindow (LPCTSTR lpcszDocName, CObject* /*pObj*/);
00074
00075   void InitRibbon ();
00076 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/Slider.h Source File

  • vc2008fp
  • Slider

Slider.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CSliderApp:
00021 // See Slider.cpp for the implementation of this class
00022 //
00023
00024 class CSliderApp : public CWinAppEx
00025 {
00026 public:
00027   CSliderApp();
00028
00029 // Overrides
00030   public:
00031   virtual BOOL InitInstance();
00032   virtual int ExitInstance();
00033
00034 // Implementation
00035   afx_msg void OnAppAbout();
00036
00037   DECLARE_MESSAGE_MAP()
00038 };
00039
00040
00041 extern CSliderApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControl.cpp Source File

  • vc2008fp
  • TabControl

TabControl.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabControl.h"
00013
00014 #include "MainFrm.h"
00015 #include "TabControlDoc.h"
00016 #include "TabControlView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CTabControlApp
00026
00027 BEGIN_MESSAGE_MAP(CTabControlApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CTabControlApp construction
00038
00039 CTabControlApp::CTabControlApp() :
00040   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00041 {
00042   // TODO: add construction code here,
00043   // Place all significant initialization in InitInstance
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CTabControlApp object
00048
00049 CTabControlApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CTabControlApp initialization
00053
00054 BOOL CTabControlApp::InitInstance()
00055 {
00056   // Initialize OLE libraries
00057   if (!AfxOleInit())
00058   {
00059     AfxMessageBox(IDP_OLE_INIT_FAILED);
00060     return FALSE;
00061   }
00062
00063   AfxEnableControlContainer();
00064
00065   // Standard initialization
00066   // If you are not using these features and wish to reduce the size
00067   //  of your final executable, you should remove from the following
00068   //  the specific initialization routines you do not need.
00069
00070   // Change the registry key under which our settings are stored.
00071   // TODO: You should modify this string to be something appropriate
00072   // such as the name of your company or organization.
00073   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075   SetRegistryBase (_T("Settings"));
00076
00077   // Initialize all Managers for usage. They are automatically constructed
00078   // if not yet present
00079   InitContextMenuManager();
00080   InitKeyboardManager();
00081
00082   // Register the application's document templates.  Document templates
00083   //  serve as the connection between documents, frame windows and views.
00084
00085   CSingleDocTemplate* pDocTemplate;
00086   pDocTemplate = new CSingleDocTemplate(
00087     IDR_MAINFRAME,
00088     RUNTIME_CLASS(CTabControlDoc),
00089     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00090     RUNTIME_CLASS(CTabControlView));
00091   AddDocTemplate(pDocTemplate);
00092
00093   // Parse command line for standard shell commands, DDE, file open
00094   CCommandLineInfo cmdInfo;
00095   ParseCommandLine(cmdInfo);
00096
00097   // Dispatch commands specified on the command line
00098   if (!ProcessShellCommand(cmdInfo))
00099     return FALSE;
00100
00101   // The one and only window has been initialized, so show and update it.
00102   m_pMainWnd->ShowWindow(SW_SHOW);
00103   m_pMainWnd->UpdateWindow();
00104
00105   if (afxGlobalData.m_nBitsPerPixel < 16)
00106   {
00107     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00108   }
00109
00110   return TRUE;
00111 }
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CAboutDlg dialog used for App About
00115
00116 class CAboutDlg : public CDialog
00117 {
00118 public:
00119   CAboutDlg();
00120
00121 // Dialog Data
00122   //{{AFX_DATA(CAboutDlg)
00123   enum { IDD = IDD_ABOUTBOX };
00124   //}}AFX_DATA
00125
00126   // ClassWizard generated virtual function overrides
00127   //{{AFX_VIRTUAL(CAboutDlg)
00128   protected:
00129   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00130   //}}AFX_VIRTUAL
00131
00132 // Implementation
00133 protected:
00134   //{{AFX_MSG(CAboutDlg)
00135     // No message handlers
00136   //}}AFX_MSG
00137   DECLARE_MESSAGE_MAP()
00138 };
00139
00140 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00141 {
00142   //{{AFX_DATA_INIT(CAboutDlg)
00143   //}}AFX_DATA_INIT
00144 }
00145
00146 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00147 {
00148   CDialog::DoDataExchange(pDX);
00149   //{{AFX_DATA_MAP(CAboutDlg)
00150   //}}AFX_DATA_MAP
00151 }
00152
00153 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00154   //{{AFX_MSG_MAP(CAboutDlg)
00155     // No message handlers
00156   //}}AFX_MSG_MAP
00157 END_MESSAGE_MAP()
00158
00159 // App command to run the dialog
00160 void CTabControlApp::OnAppAbout()
00161 {
00162   CAboutDlg aboutDlg;
00163   aboutDlg.DoModal();
00164 }
00165
00166 /////////////////////////////////////////////////////////////////////////////
00167 // CTabControlApp message handlers
00168
00169 int CTabControlApp::ExitInstance()
00170 {
00171
00172
00173   return CWinAppEx::ExitInstance();
00174 }
00175
00176 void CTabControlApp::PreLoadState ()
00177 {
00178
00179   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00180
00181   // TODO: add another context menus here
00182 }
00183
00184
00185 /////////////////////////////////////////////////////////////////////////////
00186 // CTabControlApp message handlers
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCircApp Member List

This is the complete list of members for CCircApp, including all inherited members.
ExitInstance() | CCircApp
InitInstance() | CCircApp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/resource.h Source File

  • vc2008fp
  • WordPad

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by wordpad.rc
00004 //
00005 #define IDC_APPLY                       3
00006 #define IDR_SRVR_INPLACE                4
00007 #define IDR_SRVR_EMBEDDED               5
00008 #define IDR_CNTR_INPLACE                6
00009 #define IDP_OLE_INIT_FAILED             100
00010 #define IDP_FAILED_TO_CREATE            102
00011 #define IDS_INVALID_MEASUREMENT         103
00012 #define IDS_PLEASE_WAIT                 104
00013 #define IDS_COMPLETE                    105
00014 #define IDS_SAVE_UNSUPPORTED            106
00015 #define IDS_CLOSE_TEXT                  107
00016 #define IDS_RICHED_LOAD_FAIL            108
00017 #define IDS_DEFAULTFONT                 109
00018 #define IDS_TF_BUTTONS                  110
00019 #define IDC_COMBO_ALIGNMENT             111
00020 #define IDS_DEFAULTTEXTFONT             111
00021 #define IDS_SAVE_FORMAT_TEXT            112
00022 #define IDS_SAVE_FORMAT                 113
00023 #define IDS_SAVING                      113
00024 #define IDS_CLIP_RTF                    114
00025 #define IDS_FORMATTING                  115
00026 #define IDS_LEFT                        116
00027 #define IDS_CENTER                      117
00028 #define IDS_RIGHT                       118
00029 #define IDS_NOWRAP                      119
00030 #define IDS_MEASUREMENT_RANGE           119
00031 #define IDS_WRAPTOWINDOW                120
00032 #define IDS_INVALID_NUMBER              120
00033 #define IDS_WRAPTORULER                 121
00034 #define IDS_INVALID_FONTSIZE            121
00035 #define IDS_INCHES                      122
00036 #define IDS_CENTIMETERS                 123
00037 #define IDS_POINTS                      124
00038 #define IDS_PICAS                       125
00039 #define IDS_WORD6_WARNING               126
00040 #define IDS_WORD6_WARNING_BUTTONS       127
00041 #define IDR_MAINFRAME                   128
00042 #define IDS_TEXT_DOC                    129
00043 #define IDS_RICHTEXT_DOC                130
00044 #define IDB_BITMAP_TT                   130
00045 #define IDS_WRITE_DOC                   131
00046 #define IDB_RULER_BLOCK                 131
00047 #define IDS_ALL_DOC                     132
00048 #define IDB_RULER_BLOCKM                132
00049 #define IDS_WINWORD6_DOC                133
00050 #define IDB_RULER_DOWN                  133
00051 #define IDS_WINWORD2_DOC                134
00052 #define IDB_RULER_DOWNM                 134
00053 #define IDB_RULER_TAB                   135
00054 #define IDS_EXE_DOC                     135
00055 #define IDB_RULER_TABM                  136
00056 #define IDS_FILE_EXISTS                 136
00057 #define IDB_RULER_UP                    137
00058 #define IDS_MAPILOAD_FAILED             137
00059 #define IDS_OEMTEXT_DOC                 137
00060 #define IDB_RULER_UPM                   138
00061 #define IDS_CLIP_TEXT                   138
00062 #define IDB_FORMATBAR                   139
00063 #define IDS_CLIP_FILENAME               139
00064 #define IDR_FORMATBAR                   139
00065 #define IDR_MAINFRAME1                  140
00066 #define IDB_FORMATBAR_BIG               141
00067 #define IDR_FORMATBAR_BIG               141
00068 #define IDR_MAINFRAME_BIG               142
00069 #define IDD_FORMAT_PARA                 143
00070 #define IDR_MAINFRAME1_BIG              143
00071 #define IDR_SRVR_INPLACE_BIG            144
00072 #define IDD_FORMAT_TAB                  145
00073 #define IDD_LISTDIALOG                  147
00074 #define IDD_OPTIONS                     148
00075 #define IDS_DT1                         149
00076 #define IDD_PAGE_SETUP_DIALOG           150
00077 #define IDS_DT2                         150
00078 #define IDR_MENU1                       151
00079 #define IDS_DT3                         151
00080 #define IDD_DATEDIALOG                  151
00081 #define IDS_DT4                         152
00082 #define IDR_TEXT_POPUP                  152
00083 #define IDS_DT5                         153
00084 #define IDS_DT6                         154
00085 #define IDI_ICON_DOC                    154
00086 #define IDS_DT7                         155
00087 #define IDI_ICON_WRITE                  155
00088 #define IDS_DT8                         156
00089 #define IDS_DT9                         157
00090 #define IDD_SPLASH                      157
00091 #define IDS_DT10                        158
00092 #define IDD_OPTIONS_UNITS               158
00093 #define IDS_DT11                        159
00094 #define IDD_OPTIONS_WRAP                159
00095 #define IDS_DT12                        160
00096 #define IDD_OPTIONS_MARGINS             160
00097 #define IDD_FILENEWDIALOG               160
00098 #define IDS_DT13                        161
00099 #define IDB_BITMAP48                    162
00100 #define IDB_BITMAP_PRINTER              163
00101 #define IDS_FINISHED_SEARCH             164
00102 #define IDC_FONTNAME                    165
00103 #define IDI_ICON_TEXT                   165
00104 #define IDC_FONTSIZE                    166
00105 #define IDS_TITLE_FORMATBAR             167
00106 #define IDB_PRINTER                     167
00107 #define IDB_FONTTYPE                    167
00108 #define IDS_TITLE_TOOLBAR               168
00109 #define IDS_INCH1_ABBREV                169
00110 #define IDS_INCH2_ABBREV                170
00111 #define IDS_INCH3_ABBREV                171
00112 #define IDS_INCH4_ABBREV                172
00113 #define IDR_TOOLBAR_IMAGES              172
00114 #define IDS_CM_ABBREV                   173
00115 #define IDR_TOOLBAR_IMAGES_BIG          173
00116 #define IDS_POINT_ABBREV                174
00117 #define IDS_PICA_ABBREV                 175
00118 #define IDS_NOMORETABS                  176
00119 #define IDS_MAPI_FAIL                   177
00120 #define IDS_ERRSPACE                    178
00121 #define IDS_CANT_LOAD                   179
00122 #define IDS_TOOMANYFILES                180
00123 #define IDD_APP_LOOK                    180
00124 #define IDS_DIRFULL                     181
00125 #define IDS_SHAREVIOLATION              182
00126 #define IDB_TASKS                       182
00127 #define IDS_TEXT_OPTIONS                183
00128 #define IDS_RTF_OPTIONS                 184
00129 #define IDS_WORD6_OPTIONS               185
00130 #define IDS_OPTIONS                     186
00131 #define IDR_TOOLBAR_IMAGES_HC           186
00132 #define IDS_WRITE_OPTIONS               187
00133 #define IDB_MAINFRAME_HC                187
00134 #define IDS_EMBEDDED_OPTIONS            188
00135 #define IDB_TASKS_HC                    188
00136 #define IDS_TEXT_DOCUMENT               189
00137 #define IDB_TASKSPANE_TOOLBAR           189
00138 #define IDS_RTF_DOCUMENT                190
00139 #define IDR_BORDER_TYPE                 190
00140 #define IDS_WORD6_DOCUMENT              191
00141 #define IDS_WRITEPROTECT                192
00142 #define IDR_BORDER_PALETTE              192
00143 #define IDS_TITLE_MENUBAR               193
00144 #define IDS_ABOUT_INFO                  194
00145 #define IDS_WRONG_DISPLAY_SETTINGS      195
00146 #define IDC_EDIT_LEFT                   1000
00147 #define IDC_EDIT_RIGHT                  1001
00148 #define IDC_EDIT_FIRST_LINE             1002
00149 #define IDC_BUTTON_SET                  1005
00150 #define IDC_EDIT_BM                     1005
00151 #define IDC_BUTTON_CLEAR                1006
00152 #define IDC_EDIT_LM                     1006
00153 #define IDC_BUTTON_CLEARALL             1007
00154 #define IDC_EDIT_RM                     1007
00155 #define IDC_STATIC_HEADING              1009
00156 #define IDC_COMBO_WRAP                  1011
00157 #define IDC_COMBO_UNITS                 1012
00158 #define IDC_APP_LOOK1                   1012
00159 #define IDC_APP_LOOK2                   1013
00160 #define IDC_APP_LOOK3                   1014
00161 #define IDC_SHOW_AT_STARTUP             1015
00162 #define IDC_EDIT_TM                     1016
00163 #define IDC_TEXT_ALIGNMENT              1017
00164 #define IDC_LISTDIALOG_LIST             1018
00165 #define IDC_DATEDIALOG_LIST             1018
00166 #define IDC_COMBO1                      1019
00167 #define IDC_TEXT_WRAP                   1020
00168 #define IDC_TEXT_UNITS                  1021
00169 #define IDC_BOX                         1022
00170 #define IDC_BIGICON                     1023
00171 #define IDC_UNITS_IN                    1024
00172 #define IDC_UNITS_CM                    1025
00173 #define IDC_WRAP_RULER                  1025
00174 #define IDC_UNITS_PT                    1026
00175 #define IDC_WRAP_WINDOW                 1026
00176 #define IDC_UNITS_PI                    1027
00177 #define IDC_WRAP_NONE                   1027
00178 #define IDC_CHECK_TOOLBAR               1028
00179 #define IDC_CHECK_FORMATBAR             1029
00180 #define IDC_WORDSEL                     1029
00181 #define IDC_CHECK_RULERBAR              1030
00182 #define IDC_CHECK_STATUSBAR             1031
00183 #define IDC_BOXT                        1032
00184 #define IDC_STYLE2007                   1033
00185 #define ID_CANCEL_EDIT_CNTR             32768
00186 #define ID_CANCEL_EDIT_SRVR             32769
00187 #define ID_PAGE_SETUP                   32771
00188 #define ID_COLOR_TEAROFF                32772
00189 #define ID_FREE_TEAROFF1                32773
00190 #define ID_FREE_TEAROFF2                32774
00191 #define ID_BORDER_TEAROFF               32775
00192 #define ID_VIEW_OPTIONS                 32776
00193 #define ID_INSERT_BULLET                32777
00194 #define ID_INSERT_DATE_TIME             32778
00195 #define ID_FORMAT_PARAGRAPH             32780
00196 #define ID_FORMAT_TABS                  32781
00197 #define ID_CHAR_BOLD                    32799
00198 #define ID_CHAR_ITALIC                  32800
00199 #define ID_CHAR_COLOR                   32801
00200 #define ID_CHAR_UNDERLINE               32802
00201 #define ID_PARA_LEFT                    32803
00202 #define ID_PARA_CENTER                  32804
00203 #define ID_PARA_RIGHT                   32805
00204 #define ID_PEN_PERIOD                   32807
00205 #define ID_PEN_SPACE                    32808
00206 #define ID_PEN_BACKSPACE                32809
00207 #define ID_PEN_NEWLINE                  32810
00208 #define ID_OLE_VERB_POPUP               32811
00209 #define ID_PEN_TOGGLE                   32812
00210 #define ID_PEN_LENS                     32813
00211 #define ID_PEN_TAB                      32814
00212 #define ID_VIEW_CUSTOMIZE               32816
00213 #define ID_VIEW_USER_TOOLBAR1           32819
00214 #define ID_VIEW_USER_TOOLBAR2           32820
00215 #define ID_VIEW_USER_TOOLBAR3           32821
00216 #define ID_VIEW_USER_TOOLBAR4           32822
00217 #define ID_VIEW_USER_TOOLBAR5           32823
00218 #define ID_VIEW_USER_TOOLBAR6           32824
00219 #define ID_VIEW_USER_TOOLBAR7           32825
00220 #define ID_VIEW_USER_TOOLBAR8           32826
00221 #define ID_VIEW_USER_TOOLBAR9           32827
00222 #define ID_VIEW_USER_TOOLBAR10          32828
00223 #define ID_VIEW_FULLSCREEN              32883
00224 #define ID_VIEW_TOOLBARS                32885
00225 #define ID_VIEW_TASK_PANE               32886
00226 #define ID_VIEW_APP_LOOK                32950
00227 #define ID_BORDER_1                     32952
00228 #define ID_BORDER_2                     32953
00229 #define ID_BORDER_3                     32954
00230 #define ID_BORDER_4                     32955
00231 #define ID_BORDER_5                     32956
00232 #define ID_BORDER_6                     32957
00233 #define ID_BORDER_7                     32958
00234 #define ID_BORDER_8                     32959
00235 #define ID_BORDER_9                     32960
00236 #define ID_BORDER_10                    32961
00237 #define ID_BORDER_11                    32962
00238 #define ID_BORDER_12                    32963
00239 #define ID_BORDER_13                    32964
00240 #define ID_VIEW_FULL_SCREEN             32965
00241 #define ID_HELP_FIND                    32968
00242 #define ID_COLOR_AUTOMATIC              57876
00243 #define ID_VIEW_FORMATBAR               59396
00244 #define ID_VIEW_RULER                   59397
00245 #define ID_DUMMY                        59398
00246
00247 // Next default values for new objects
00248 //
00249 #ifdef APSTUDIO_INVOKED
00250 #ifndef APSTUDIO_READONLY_SYMBOLS
00251 #define _APS_3D_CONTROLS                     1
00252 #define _APS_NEXT_RESOURCE_VALUE        196
00253 #define _APS_NEXT_COMMAND_VALUE         32969
00254 #define _APS_NEXT_CONTROL_VALUE         1034
00255 #define _APS_NEXT_SYMED_VALUE           111
00256 #endif
00257 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dataobj.h Source File

  • ole
  • oleview
  • iviewers

dataobj.h

Go to the documentation of this file.
00001 // dataobj.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef __DATAOBJ_H__
00014 #define __DATAOBJ_H__
00015
00016 #include "iviewer.h"
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CDataObjectViewer command target
00019
00020 class CDataObjectViewer : public CInterfaceViewer
00021 {
00022   DECLARE_DYNCREATE(CDataObjectViewer)
00023 protected:
00024   CDataObjectViewer();           // protected constructor used by dynamic creation
00025
00026 // Attributes
00027 public:
00028
00029 // Operations
00030 public:
00031
00032 // Overrides
00033   // ClassWizard generated virtual function overrides
00034   //{{AFX_VIRTUAL(CDataObjectViewer)
00035   //}}AFX_VIRTUAL
00036   virtual HRESULT OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk);
00037
00038 // Implementation
00039 protected:
00040   virtual ~CDataObjectViewer();
00041
00042   // Generated message map functions
00043   //{{AFX_MSG(CDataObjectViewer)
00044     // NOTE - the ClassWizard will add and remove member functions here.
00045   //}}AFX_MSG
00046
00047   DECLARE_MESSAGE_MAP()
00048   DECLARE_OLECREATE(CDataObjectViewer)
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CDataObjectDlg dialog
00054
00055 class CDataObjectDlg : public CDialog
00056 {
00057 // Construction
00058 public:
00059   CDataObjectDlg(CWnd* pParent = NULL);   // standard constructor
00060
00061 // Dialog Data
00062   //{{AFX_DATA(CDataObjectDlg)
00063   enum { IDD = IDD_IDATAOBJDLG };
00064     // NOTE: the ClassWizard will add data members here
00065   //}}AFX_DATA
00066
00067
00068 // Overrides
00069   // ClassWizard generated virtual function overrides
00070   //{{AFX_VIRTUAL(CDataObjectDlg)
00071   protected:
00072   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00073   //}}AFX_VIRTUAL
00074
00075 // Implementation
00076 protected:
00077
00078   // Generated message map functions
00079   //{{AFX_MSG(CDataObjectDlg)
00080     // NOTE: the ClassWizard will add member functions here
00081   //}}AFX_MSG
00082   DECLARE_MESSAGE_MAP()
00083 };
00084 #endif // __DATAOBJ_H__
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/LogDg.Cpp Source File

  • ole
  • TstCon

LogDg.Cpp

Go to the documentation of this file.
00001 // LoggingDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CLoggingDlg dialog
00022
00023
00024 CLoggingDlg::CLoggingDlg(CWnd* pParent /*=NULL*/)
00025   : CDialog(CLoggingDlg::IDD, pParent)
00026 {
00027   //{{AFX_DATA_INIT(CLoggingDlg)
00028   m_strFileName = _T("");
00029   m_iLogType = -1;
00030   //}}AFX_DATA_INIT
00031 }
00032
00033
00034 void CLoggingDlg::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CLoggingDlg)
00038   DDX_Control(pDX, IDC_FILENAME_BROWSE, m_butFileNameBrowse);
00039   DDX_Control(pDX, IDC_FILENAME, m_eboxFileName);
00040   DDX_Text(pDX, IDC_FILENAME, m_strFileName);
00041   DDX_Radio(pDX, IDC_LOGTONULL, m_iLogType);
00042   //}}AFX_DATA_MAP
00043 }
00044
00045
00046 BEGIN_MESSAGE_MAP(CLoggingDlg, CDialog)
00047   //{{AFX_MSG_MAP(CLoggingDlg)
00048   ON_BN_CLICKED(IDC_LOGTODEBUG, OnLogToDebug)
00049   ON_BN_CLICKED(IDC_LOGTOFILE, OnLogToFile)
00050   ON_BN_CLICKED(IDC_FILENAME_BROWSE, OnFileNameBrowse)
00051   ON_BN_CLICKED(IDC_LOGTONULL, OnLogToNull)
00052   ON_BN_CLICKED(IDC_LOGTOOUTPUT, OnLogToOutput)
00053   ON_WM_HELPINFO()
00054   ON_WM_CONTEXTMENU()
00055   //}}AFX_MSG_MAP
00056 END_MESSAGE_MAP()
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CLoggingDlg message handlers
00060
00061 BOOL CLoggingDlg::OnInitDialog()
00062 {
00063   CDialog::OnInitDialog();
00064
00065    m_eboxFileName.EnableWindow( m_iLogType == 3 );
00066    m_butFileNameBrowse.EnableWindow( m_iLogType == 3 );
00067
00068   return TRUE;  // return TRUE unless you set the focus to a control
00069           // EXCEPTION: OCX Property Pages should return FALSE
00070 }
00071
00072 void CLoggingDlg::OnLogToDebug()
00073 {
00074    m_eboxFileName.EnableWindow( FALSE );
00075    m_butFileNameBrowse.EnableWindow( FALSE );
00076 }
00077
00078 void CLoggingDlg::OnLogToFile()
00079 {
00080    m_eboxFileName.EnableWindow( TRUE );
00081    m_butFileNameBrowse.EnableWindow( TRUE );
00082 }
00083
00084 void CLoggingDlg::OnFileNameBrowse()
00085 {
00086    int nResult;
00087
00088    CFileDialog dlg( FALSE, _T( "Log" ) );
00089
00090    nResult = (int)dlg.DoModal();
00091    if( nResult != IDOK )
00092    {
00093     return;
00094    }
00095
00096    m_strFileName = dlg.GetPathName();
00097    m_eboxFileName.SetWindowText( m_strFileName );
00098 }
00099
00100 void CLoggingDlg::OnLogToNull()
00101 {
00102    m_eboxFileName.EnableWindow( FALSE );
00103    m_butFileNameBrowse.EnableWindow( FALSE );
00104 }
00105
00106 void CLoggingDlg::OnLogToOutput()
00107 {
00108    m_eboxFileName.EnableWindow( FALSE );
00109    m_butFileNameBrowse.EnableWindow( FALSE );
00110 }
00111
00112
00113 static DWORD rgmapCHID[] =
00114 {
00115    IDC_FILENAME_BROWSE, HIDC_FILENAME_BROWSE,
00116    IDC_FILENAME, HIDC_FILENAME,
00117    IDC_LOGTOFILE, HIDC_LOGTOFILE,
00118    IDC_LOGTODEBUG, HIDC_LOGTODEBUG,
00119    IDC_LOGTOOUTPUT, HIDC_LOGTOOUTPUT,
00120    IDC_LOGTONULL, HIDC_LOGTONULL,
00121    0, 0
00122 };
00123
00124 BOOL CLoggingDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00125 {
00126   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00127   strPath += _T("::/popups.txt");
00128
00129   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00130 }
00131
00132 void CLoggingDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00133 {
00134   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00135   strPath += _T("::/popups.txt");
00136
00137   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00138 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTest.cpp Source File

  • vc2008fp
  • RebarTest

RebarTest.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RebarTest.h"
00013 #include "MainFrm.h"
00014
00015 #include "ChildFrm.h"
00016 #include "RebarTestDoc.h"
00017 #include "RebarTestView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #endif
00022
00023
00024 // CRebarTestApp
00025
00026 BEGIN_MESSAGE_MAP(CRebarTestApp, CWinApp)
00027   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00028   // Standard file based document commands
00029   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00030   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00031   // Standard print setup command
00032   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00033 END_MESSAGE_MAP()
00034
00035
00036 // CRebarTestApp construction
00037
00038 CRebarTestApp::CRebarTestApp() :
00039   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045
00046 // The one and only CRebarTestApp object
00047
00048 CRebarTestApp theApp;
00049
00050
00051 // CRebarTestApp initialization
00052
00053 BOOL CRebarTestApp::InitInstance()
00054 {
00055   // InitCommonControlsEx() is required on Windows XP if an application
00056   // manifest specifies use of ComCtl32.dll version 6 or later to enable
00057   // visual styles.  Otherwise, any window creation will fail.
00058   INITCOMMONCONTROLSEX InitCtrls;
00059   InitCtrls.dwSize = sizeof(InitCtrls);
00060   // Set this to include all the common control classes you want to use
00061   // in your application.
00062   InitCtrls.dwICC = ICC_WIN95_CLASSES;
00063   InitCommonControlsEx(&InitCtrls);
00064
00065   CWinApp::InitInstance();
00066
00067   // Initialize OLE libraries
00068   if (!AfxOleInit())
00069   {
00070     AfxMessageBox(IDP_OLE_INIT_FAILED);
00071     return FALSE;
00072   }
00073   AfxEnableControlContainer();
00074   // Standard initialization
00075   // If you are not using these features and wish to reduce the size
00076   // of your final executable, you should remove from the following
00077   // the specific initialization routines you do not need
00078   // Change the registry key under which our settings are stored
00079   // TODO: You should modify this string to be something appropriate
00080   // such as the name of your company or organization
00081   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00082   LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)
00083
00084   SetRegistryBase (_T("Settings"));
00085
00086   // Initialize all Managers for usage. They are automatically constructed
00087   // if not yet present
00088   InitContextMenuManager();
00089   InitKeyboardManager();
00090
00091   // TODO: Remove this if you don't want extended tooltips:
00092   InitTooltipManager();
00093
00094   CMFCToolTipInfo params;
00095   params.m_bVislManagerTheme = TRUE;
00096
00097   theApp.GetTooltipManager ()->SetTooltipParams (
00098     AFX_TOOLTIP_TYPE_ALL,
00099     RUNTIME_CLASS (CMFCToolTipCtrl),
00100     &params);
00101
00102   // Register the application's document templates.  Document templates
00103   //  serve as the connection between documents, frame windows and views
00104   CMultiDocTemplate* pDocTemplate;
00105   pDocTemplate = new CMultiDocTemplate(IDR_RebarTestTYPE,
00106     RUNTIME_CLASS(CRebarTestDoc),
00107     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00108     RUNTIME_CLASS(CRebarTestView));
00109   if (!pDocTemplate)
00110     return FALSE;
00111   AddDocTemplate(pDocTemplate);
00112
00113   // create main MDI Frame window
00114   CMainFrame* pMainFrame = new CMainFrame;
00115   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00116     return FALSE;
00117   m_pMainWnd = pMainFrame;
00118   // call DragAcceptFiles only if there's a suffix
00119   //  In an MDI app, this should occur immediately after setting m_pMainWnd
00120
00121
00122   // Parse command line for standard shell commands, DDE, file open
00123   CCommandLineInfo cmdInfo;
00124   ParseCommandLine(cmdInfo);
00125
00126
00127   if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
00128   {
00129     if (!pMainFrame->LoadMDIState (GetRegSectionPath ()))
00130     {
00131       if (!ProcessShellCommand(cmdInfo))
00132         return FALSE;
00133     }
00134   }
00135   else
00136   {
00137     // Dispatch commands specified on the command line
00138     if (!ProcessShellCommand(cmdInfo))
00139       return FALSE;
00140   }
00141   // The main window has been initialized, so show and update it
00142   pMainFrame->ShowWindow(m_nCmdShow);
00143   pMainFrame->UpdateWindow();
00144
00145   return TRUE;
00146 }
00147
00148 // CRebarTestApp message handlers
00149
00150 int CRebarTestApp::ExitInstance()
00151 {
00152
00153
00154   return CWinAppEx::ExitInstance();
00155 }
00156
00157 // CAboutDlg dialog used for App About
00158
00159 class CAboutDlg : public CDialog
00160 {
00161 public:
00162   CAboutDlg();
00163
00164 // Dialog Data
00165   enum { IDD = IDD_ABOUTBOX };
00166
00167 protected:
00168   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00169
00170 // Implementation
00171 protected:
00172   DECLARE_MESSAGE_MAP()
00173 };
00174
00175 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00176 {
00177 }
00178
00179 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00180 {
00181   CDialog::DoDataExchange(pDX);
00182 }
00183
00184 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00185 END_MESSAGE_MAP()
00186
00187 // App command to run the dialog
00188 void CRebarTestApp::OnAppAbout()
00189 {
00190   CAboutDlg aboutDlg;
00191   aboutDlg.DoModal();
00192 }
00193
00194
00195 // CRebarTestApp message handlers
00196
00197
00198 void CRebarTestApp::PreLoadState ()
00199 {
00200
00201   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00202
00203   // TODO: add another context menus here
00204 }
00205
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagCTLINITBEDIT Member List

This is the complete list of members for tagCTLINITBEDIT, including all inherited members.
cbSize | tagCTLINITBEDIT
dwReserved | tagCTLINITBEDIT
hwnd | tagCTLINITBEDIT
id | tagCTLINITBEDIT
wFlags | tagCTLINITBEDIT
wSizeCategory | tagCTLINITBEDIT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Wndlist.cpp Source File

  • general
  • dlgcbr32

Wndlist.cpp

Go to the documentation of this file.
00001 // WndList.cpp : Implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014   Purpose:
00015   Implements CWndListDlg, the main dialog window for the application.
00016
00017   Functions:
00018   CWndListDlg::CWndListDlg()          -- constructor
00019   CWndListDlg::Create()               -- create dialog window
00020   CWndListDlg::DoDataExchange()       -- dialog data exchange/validation
00021   CWndListDlg::OnClose()              -- WM_CLOSE handler
00022   CWndListDlg::OnInitDialog()         -- initialize dialog
00023   CWndListDlg::OnOptionNow()          -- handle "Options!Update Now"
00024   CWndListDlg::OnOptionRate()         -- handle "Options!Update Interval"
00025   CWndListDlg::OnSelChangeWndList()   -- update dlg on list selection change
00026   CWndListDlg::OnTimer()              -- WM_TIMER handler
00027   CWndListDlg::OnUpdateOptionRate()   -- set "Options!Update Interval" status
00028   CWndListDlg::OnUpdateTime()         -- update status bar clock
00029   CWndListDlg::WalkWindowList()       -- enumerate windows
00030
00031   Development Team:
00032   Mary Kirtland
00033   Ported to 32-bit by:
00034   Mike Hedley
00035   Created by Microsoft Product Support Services, Premier ISV Support
00036   Copyright (c) Microsoft Corporation.  All rights reserved.
00037 \****************************************************************************/
00038
00039 #include "stdafx.h"
00040 #include <afxpriv.h>
00041 #include "resource.h"
00042 #include "wndlist.h"
00043 #include "ratedlg.h"
00044
00045 #ifdef _DEBUG
00046 #define new DEBUG_NEW
00047 #undef THIS_FILE
00048 static char THIS_FILE[] = __FILE__;
00049 #endif
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CWndListDlg control bar data
00053
00054 static UINT auIDStatusBar[] = {
00055    ID_SEPARATOR,
00056    ID_INDICATOR_TIME
00057 };
00058
00059 static UINT auIDToolBar[] = {
00060    ID_APP_EXIT,
00061    ID_SEPARATOR,
00062    ID_OPTION_NOW,
00063    ID_OPTION_RATE,
00064    ID_SEPARATOR,
00065    ID_HELP_ABOUT
00066 };
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CWndListDlg dialog
00070
00071 CWndListDlg::CWndListDlg()
00072 {
00073   //{{AFX_DATA_INIT(CWndListDlg)
00074   //}}AFX_DATA_INIT
00075   m_nIDTimer = 0;
00076   m_iRate = m_iTicks = 0;
00077 }
00078
00079 BOOL CWndListDlg::Create()
00080 {
00081   return CModelessMain::Create(CWndListDlg::IDD,
00082                  auIDStatusBar,
00083                  sizeof(auIDStatusBar)/sizeof(UINT),
00084                  auIDToolBar,
00085                  sizeof(auIDToolBar)/sizeof(UINT),
00086                  IDR_MAIN);
00087 }
00088
00089 void CWndListDlg::DoDataExchange(CDataExchange* pDX)
00090 {
00091   CModelessMain::DoDataExchange(pDX);
00092   //{{AFX_DATA_MAP(CWndListDlg)
00093   DDX_Control(pDX, IDC_WNDLIST, m_lbWindows);
00094   //}}AFX_DATA_MAP
00095 }
00096
00097 BEGIN_MESSAGE_MAP(CWndListDlg, CModelessMain)
00098   //{{AFX_MSG_MAP(CWndListDlg)
00099   ON_WM_CLOSE()
00100   ON_WM_TIMER()
00101   ON_LBN_SELCHANGE(IDC_WNDLIST, OnSelChangeWndList)
00102   ON_COMMAND(ID_OPTION_NOW, OnOptionNow)
00103   ON_COMMAND(ID_OPTION_RATE, OnOptionRate)
00104   ON_UPDATE_COMMAND_UI(ID_OPTION_RATE, OnUpdateOptionRate)
00105   //}}AFX_MSG_MAP
00106   ON_UPDATE_COMMAND_UI(ID_INDICATOR_TIME, OnUpdateTime)
00107 END_MESSAGE_MAP()
00108
00109
00110 /////////////////////////////////////////////////////////////////////////////
00111 // CWndListDlg::OnInitDialog
00112 //      OnInitDialog fills the listbox with information about the parent
00113 //      windows which exist.  It also sets up a 1sec timer, which is used
00114 //      to automatically update the listbox contents and/or to update the
00115 //      status bar clock.
00116
00117 BOOL CWndListDlg::OnInitDialog()
00118 {
00119   CModelessMain::OnInitDialog();
00120
00121   // Initialize windows listbox contents
00122   WalkWindowList();
00123   OnSelChangeWndList();
00124
00125   // Set up a 1 second timer
00126   m_nIDTimer = (UINT)SetTimer(1, 1000, NULL);
00127   if (!m_nIDTimer)
00128     AfxMessageBox(IDP_NOTIMER);
00129
00130   return TRUE;
00131 }
00132
00133 /////////////////////////////////////////////////////////////////////////////
00134 // CWndListDlg::OnClose
00135 //      OnClose makes sure the 1sec timer is destroyed when the dialog
00136 //      is closed.
00137
00138 void CWndListDlg::OnClose()
00139 {
00140   if (m_nIDTimer)
00141   {
00142     KillTimer(m_nIDTimer);
00143     m_nIDTimer = NULL;
00144   }
00145   CModelessMain::OnClose();
00146 }
00147
00148 /////////////////////////////////////////////////////////////////////////////
00149 // CWndListDlg::WalkWindowList
00150 //      WalkWindowList enumerates all parent windows on the screen.
00151 //      It adds a string containing the window handle and caption to
00152 //      the listbox for each window, using the helper function
00153 //      EnumWindowsProc().
00154
00155 BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
00156 {
00157   static TCHAR szBuffer[90];
00158   static TCHAR szTemp[80];
00159
00160   static TCHAR szFormat[] = _T("%08lX: %s");
00161   HWND hwndListBox = (HWND)lParam;
00162   CListBox* plb = (CListBox*)CWnd::FromHandle(hwndListBox);
00163
00164   GetWindowText(hwnd, szTemp, sizeof(szTemp));
00165   _stprintf_s(szBuffer, 90, szFormat, hwnd, szTemp);
00166
00167   return (plb->AddString(szBuffer) >= 0) ? TRUE : FALSE;
00168 }
00169
00170 void CWndListDlg::WalkWindowList()
00171 {
00172   // don't assume that m_lbWindows has been initialized yet
00173   CListBox* plb = (CListBox*)GetDlgItem(IDC_WNDLIST);
00174
00175   plb->SetRedraw(FALSE);
00176   plb->ResetContent();
00177
00178   EnumWindows(EnumWindowsProc, (LPARAM)plb->GetSafeHwnd());
00179
00180   plb->SetRedraw(TRUE);
00181 }
00182
00183 /////////////////////////////////////////////////////////////////////////////
00184 // CWndListDlg::OnSelChangeWndList
00185 //      OnSelChangeWndList updates the static dialog fields when the
00186 //      window listbox selection is changed.
00187
00188 void CWndListDlg::OnSelChangeWndList()
00189 {
00190   static TCHAR szBuffer[256];
00191   static TCHAR szTemp[80];
00192
00193   static TCHAR szParse[]  = _T("%08lX");
00194   static TCHAR szFormat[] = _T("%08lX: %s");
00195
00196   HWND hwnd = 0;
00197   BOOL bValid = FALSE;
00198
00199   int iSel = m_lbWindows.GetCurSel();
00200   if (iSel >= 0)
00201   {
00202     m_lbWindows.GetText(iSel, szBuffer);
00203     if( _stscanf_s(szBuffer, szParse, &hwnd) == 1 )
00204       bValid = ::IsWindow(hwnd);
00205     else
00206       bValid = FALSE;
00207   }
00208
00209   if (bValid)
00210   {
00211     ::GetClassName(hwnd, szBuffer, sizeof(szBuffer));
00212     GetDlgItem(IDC_CLASS)->SetWindowText(szBuffer);
00213
00214     HINSTANCE hInstance = (HINSTANCE)::GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
00215     ::GetModuleFileName(hInstance, szBuffer, sizeof(szBuffer));
00216     GetDlgItem(IDC_MODULE)->SetWindowText(szBuffer);
00217
00218     HWND hwndParent = ::GetParent(hwnd);
00219     ::GetWindowText(hwndParent, szTemp, sizeof(szTemp));
00220     _stprintf_s(szBuffer, 256, szFormat, hwndParent, szTemp);
00221     GetDlgItem(IDC_PARENT)->SetWindowText(szBuffer);
00222
00223     RECT rect;
00224     ::GetWindowRect(hwnd, &rect);
00225     _stprintf_s(szBuffer, 256, _T("(%d,%d) - (%d,%d)"), rect.left, rect.top,
00226         rect.right, rect.bottom);
00227     GetDlgItem(IDC_RECT)->SetWindowText(szBuffer);
00228
00229     LONG lStyle = ::GetWindowLong(hwnd, GWL_STYLE);
00230     _stprintf_s(szBuffer, 256, _T("%08lX"), lStyle);
00231     GetDlgItem(IDC_STYLE)->SetWindowText(szBuffer);
00232   }
00233   else
00234   {
00235     szBuffer[0] = '\0';
00236     GetDlgItem(IDC_CLASS)->SetWindowText(szBuffer);
00237     GetDlgItem(IDC_MODULE)->SetWindowText(szBuffer);
00238     GetDlgItem(IDC_PARENT)->SetWindowText(szBuffer);
00239     GetDlgItem(IDC_RECT)->SetWindowText(szBuffer);
00240     GetDlgItem(IDC_STYLE)->SetWindowText(szBuffer);
00241   }
00242
00243 }
00244
00245 /////////////////////////////////////////////////////////////////////////////
00246 // CWndListDlg::OnTimer()
00247 //      OnTimer handles messages from the 1sec interval timer.  The variable
00248 //      m_iRate indicates how many timer messages must be received before
00249 //      the window list is updated.  The variable m_iTicks indicates how
00250 //      many timer messages have been received since the last time the
00251 //      window list was updated.
00252
00253 void CWndListDlg::OnTimer(UINT_PTR /*nIDEvent*/)
00254 {
00255   if (m_iRate)
00256   {
00257     m_iTicks++;
00258     if (m_iTicks == m_iRate)
00259       OnOptionNow();
00260   }
00261 }
00262
00263 /////////////////////////////////////////////////////////////////////////////
00264 // CWndListDlg::OnOptionNow()
00265 //      OnOptionNow resets the update interval counter, refills the window
00266 //      list, and resets the selection, if possible.
00267
00268 void CWndListDlg::OnOptionNow()
00269 {
00270   m_iTicks = 0;
00271
00272   int iTopIndex = m_lbWindows.GetTopIndex();
00273
00274   CString strSelect;
00275   int iSel = m_lbWindows.GetCurSel();
00276   if (iSel >= 0)
00277     m_lbWindows.GetText(iSel, strSelect);
00278
00279   WalkWindowList();
00280
00281   if (m_lbWindows.SelectString(-1, strSelect) <= 0)
00282     m_lbWindows.SetCurSel(iSel);
00283
00284   m_lbWindows.SetTopIndex(iTopIndex);
00285
00286 }
00287
00288 /////////////////////////////////////////////////////////////////////////////
00289 // CWndListDlg::OnOptionRate()
00290 //      OnOptionRate allows the user to specify the rate at which the
00291 //      window list should be updated.
00292
00293 void CWndListDlg::OnOptionRate()
00294 {
00295   CRateDlg dlg(m_iRate, this);
00296   if (dlg.DoModal() == IDOK)
00297     m_iRate = dlg.GetRate();
00298 }
00299
00300 /////////////////////////////////////////////////////////////////////////////
00301 // CWndListDlg::OnUpdateOptionRate()
00302 //      OnUpdateOptionRate enables or disables the Option Update Rate...
00303 //      command, depending on whether or not a timer has been created.
00304
00305 void CWndListDlg::OnUpdateOptionRate(CCmdUI* pCmdUI)
00306 {
00307   pCmdUI->Enable(m_nIDTimer != 0);
00308 }
00309
00310 /////////////////////////////////////////////////////////////////////////////
00311 // CWndListDlg::OnUpdateTime()
00312 //      OnUpdateTime updates the status bar clock.
00313
00314 void CWndListDlg::OnUpdateTime(CCmdUI* pCmdUI)
00315 {
00316   CTime t = CTime::GetCurrentTime();
00317   TCHAR  szTime[6];
00318   SYSTEMTIME sysTime;
00319   t.GetAsSystemTime(sysTime);
00320
00321   // Localize to user locale, strip seconds and time marker
00322   int nLen;
00323   nLen = GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS|TIME_NOTIMEMARKER,
00324       &sysTime, NULL, szTime, sizeof(szTime));
00325   // Now set the text of the pane
00326   CStatusBar* pStatusBar = GetStatusBar();
00327   pStatusBar->SetPaneText(pStatusBar->CommandToIndex(ID_INDICATOR_TIME),
00328               szTime);
00329   pCmdUI->Enable();
00330 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemo.cpp Source File

  • vc2008fp
  • IEDemo

IEDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013 #include "MainFrm.h"
00014
00015 #include "IEDemoDoc.h"
00016 #include "IEDemoView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #endif
00021
00022
00023 // CIEDemoApp
00024
00025 BEGIN_MESSAGE_MAP(CIEDemoApp, CWinApp)
00026   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00027   // Standard file based document commands
00028   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00029   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00030   // Standard print setup command
00031   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00032 END_MESSAGE_MAP()
00033
00034
00035 // CIEDemoApp construction
00036
00037 CIEDemoApp::CIEDemoApp() :
00038   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00039 {
00040   // TODO: add construction code here,
00041   // Place all significant initialization in InitInstance
00042 }
00043
00044
00045 // The one and only CIEDemoApp object
00046
00047 CIEDemoApp theApp;
00048
00049
00050 // CIEDemoApp initialization
00051
00052 BOOL CIEDemoApp::InitInstance()
00053 {
00054   // InitCommonControlsEx() is required on Windows XP if an application
00055   // manifest specifies use of ComCtl32.dll version 6 or later to enable
00056   // visual styles.  Otherwise, any window creation will fail.
00057   INITCOMMONCONTROLSEX InitCtrls;
00058   InitCtrls.dwSize = sizeof(InitCtrls);
00059   // Set this to include all the common control classes you want to use
00060   // in your application.
00061   InitCtrls.dwICC = ICC_WIN95_CLASSES;
00062   InitCommonControlsEx(&InitCtrls);
00063
00064   CWinApp::InitInstance();
00065
00066   // Initialize OLE libraries
00067   if (!AfxOleInit())
00068   {
00069     AfxMessageBox(IDP_OLE_INIT_FAILED);
00070     return FALSE;
00071   }
00072   AfxEnableControlContainer();
00073   // Standard initialization
00074   // If you are not using these features and wish to reduce the size
00075   // of your final executable, you should remove from the following
00076   // the specific initialization routines you do not need
00077   // Change the registry key under which our settings are stored
00078   // TODO: You should modify this string to be something appropriate
00079   // such as the name of your company or organization
00080   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00081   LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)
00082
00083   SetRegistryBase (_T("Settings"));
00084
00085   // Initialize all Managers for usage. They are automatically constructed
00086   // if not yet present
00087   InitKeyboardManager();
00088
00089   // Initialize favorites:
00090   m_Favorites.Load ();
00091
00092   // Register the application's document templates.  Document templates
00093   //  serve as the connection between documents, frame windows and views
00094   CSingleDocTemplate* pDocTemplate;
00095   pDocTemplate = new CSingleDocTemplate(
00096     IDR_MAINFRAME,
00097     RUNTIME_CLASS(CIEDemoDoc),
00098     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00099     RUNTIME_CLASS(CIEDemoView));
00100   if (!pDocTemplate)
00101     return FALSE;
00102   AddDocTemplate(pDocTemplate);
00103
00104   // Parse command line for standard shell commands, DDE, file open
00105   CCommandLineInfo cmdInfo;
00106   ParseCommandLine(cmdInfo);
00107
00108   // Dispatch commands specified on the command line
00109   if (!ProcessShellCommand(cmdInfo))
00110     return FALSE;
00111
00112   // The one and only window has been initialized, so show and update it
00113   m_pMainWnd->ShowWindow(SW_SHOW);
00114   m_pMainWnd->UpdateWindow();
00115   // call DragAcceptFiles only if there's a suffix
00116   //  In an SDI app, this should occur after ProcessShellCommand
00117   return TRUE;
00118 }
00119
00120 // CIEDemoApp message handlers
00121
00122 int CIEDemoApp::ExitInstance()
00123 {
00124   return CWinAppEx::ExitInstance();
00125 }
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CAboutDlg dialog used for App About
00129
00130 class CAboutDlg : public CDialog
00131 {
00132 public:
00133   CAboutDlg();
00134
00135 // Dialog Data
00136   //{{AFX_DATA(CAboutDlg)
00137   enum { IDD = IDD_ABOUTBOX };
00138   //}}AFX_DATA
00139
00140   // ClassWizard generated virtual function overrides
00141   //{{AFX_VIRTUAL(CAboutDlg)
00142   protected:
00143   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00144   //}}AFX_VIRTUAL
00145
00146 // Implementation
00147 protected:
00148   //{{AFX_MSG(CAboutDlg)
00149     // No message handlers
00150   //}}AFX_MSG
00151   DECLARE_MESSAGE_MAP()
00152 };
00153
00154 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00155 {
00156   //{{AFX_DATA_INIT(CAboutDlg)
00157   //}}AFX_DATA_INIT
00158 }
00159
00160 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00161 {
00162   CDialog::DoDataExchange(pDX);
00163   //{{AFX_DATA_MAP(CAboutDlg)
00164   //}}AFX_DATA_MAP
00165 }
00166
00167 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00168   //{{AFX_MSG_MAP(CAboutDlg)
00169     // No message handlers
00170   //}}AFX_MSG_MAP
00171 END_MESSAGE_MAP()
00172
00173 // App command to run the dialog
00174 void CIEDemoApp::OnAppAbout()
00175 {
00176   CAboutDlg aboutDlg;
00177   aboutDlg.DoModal();
00178 }
00179
00180 // CIEDemoApp message handlers
00181
00182
00183 void CIEDemoApp::PreLoadState ()
00184 {
00185 }
00186
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionView.cpp Source File

  • vc2008fp
  • StateCollection

StateCollectionView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StateCollection.h"
00013
00014 #include "StateCollectionDoc.h"
00015 #include "StateCollectionView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const CString strInfo =
00024   _T("This sample illustrates how to save/load the current configuration on the fly.\r\n")
00025   _T("You can configure two 'environments' - Regular and Debug.\r\n")
00026   _T("Just customize the toolbar/menu/docking bars and select 'Project|Save Debug' or 'Project|Save Regular'.\r\n")
00027   _T("When you want to switch between configurations select 'Project|Load Debug' or 'Project|Load Regular'.\r\n")
00028   _T("When the application is starting up, it loads the default configuration.\r\n\r\n")
00029   _T("Note the use of CWinAppEx::LoadState/SaveState.");
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CStateCollectionView
00033
00034 IMPLEMENT_DYNCREATE(CStateCollectionView, CView)
00035
00036 BEGIN_MESSAGE_MAP(CStateCollectionView, CView)
00037   ON_WM_LBUTTONDBLCLK()
00038   ON_WM_CONTEXTMENU()
00039   // Standard printing commands
00040   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00041   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00042   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CStateCollectionView construction/destruction
00047
00048 CStateCollectionView::CStateCollectionView()
00049 {
00050   // TODO: add construction code here
00051
00052 }
00053
00054 CStateCollectionView::~CStateCollectionView()
00055 {
00056 }
00057
00058 BOOL CStateCollectionView::PreCreateWindow(CREATESTRUCT& cs)
00059 {
00060   // TODO: Modify the Window class or styles here by modifying
00061   //  the CREATESTRUCT cs
00062
00063   return CView::PreCreateWindow(cs);
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CStateCollectionView drawing
00068
00069 void CStateCollectionView::OnDraw(CDC* pDC)
00070 {
00071 //  CStateCollectionDoc* pDoc = GetDocument();
00072 //  ASSERT_VALID(pDoc);
00073
00074   const int iOffset = 20;
00075
00076   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00077   ASSERT (pFontOld != NULL);
00078
00079   CRect rectClient;
00080   GetClientRect (&rectClient);
00081
00082   CRect rectText = rectClient;
00083   rectText.DeflateRect (iOffset, iOffset);
00084   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00085
00086   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00087               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00088
00089   CRect rectFrame = rectText;
00090   rectFrame.InflateRect (iOffset, iOffset);
00091
00092   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00093
00094   rectFrame.DeflateRect (1, 1);
00095   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00096           ::GetSysColor (COLOR_3DLIGHT));
00097
00098   rectFrame.DeflateRect (2, 2);
00099   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00100           ::GetSysColor (COLOR_3DLIGHT));
00101
00102   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00103   pDC->SetBkMode (TRANSPARENT);
00104
00105   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00106
00107   pDC->SelectObject (pFontOld);
00108 }
00109
00110 /////////////////////////////////////////////////////////////////////////////
00111 // CStateCollectionView printing
00112
00113 void CStateCollectionView::OnFilePrintPreview()
00114 {
00115   AFXPrintPreview (this);
00116 }
00117
00118 BOOL CStateCollectionView::OnPreparePrinting(CPrintInfo* pInfo)
00119 {
00120   // default preparation
00121   return DoPreparePrinting(pInfo);
00122 }
00123
00124 void CStateCollectionView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00125 {
00126   // TODO: add extra initialization before printing
00127 }
00128
00129 void CStateCollectionView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00130 {
00131   // TODO: add cleanup after printing
00132 }
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CStateCollectionView diagnostics
00136
00137 #ifdef _DEBUG
00138 void CStateCollectionView::AssertValid() const
00139 {
00140   CView::AssertValid();
00141 }
00142
00143 void CStateCollectionView::Dump(CDumpContext& dc) const
00144 {
00145   CView::Dump(dc);
00146 }
00147
00148 CStateCollectionDoc* CStateCollectionView::GetDocument() // non-debug version is inline
00149 {
00150   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CStateCollectionDoc)));
00151   return (CStateCollectionDoc*)m_pDocument;
00152 }
00153 #endif //_DEBUG
00154
00155 /////////////////////////////////////////////////////////////////////////////
00156 // CStateCollectionView message handlers
00157
00158 void CStateCollectionView::OnLButtonDblClk(UINT /*nFlags*/, CPoint /*point*/)
00159 {
00160   theApp.OnViewDoubleClick (this, IDR_MAINFRAME);
00161 }
00162
00163 void CStateCollectionView::OnContextMenu(CWnd*, CPoint point)
00164 {
00165   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00166 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPane.cpp Source File

  • vc2008fp
  • TasksPane

TasksPane.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TasksPane.h"
00013
00014 #include "MainFrm.h"
00015 #include "TasksPaneDoc.h"
00016 #include "TasksPaneView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CTasksPaneApp
00026
00027 BEGIN_MESSAGE_MAP(CTasksPaneApp, CWinAppEx)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CTasksPaneApp construction
00038
00039 CTasksPaneApp::CTasksPaneApp()
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CTasksPaneApp object
00047
00048 CTasksPaneApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CTasksPaneApp initialization
00052
00053 BOOL CTasksPaneApp::InitInstance()
00054 {
00055   // Initialize OLE libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   AfxEnableControlContainer();
00063
00064   // Standard initialization
00065   // If you are not using these features and wish to reduce the size
00066   //  of your final executable, you should remove from the following
00067   //  the specific initialization routines you do not need.
00068
00069   // Change the registry key under which our settings are stored.
00070   // TODO: You should modify this string to be something appropriate
00071   // such as the name of your company or organization.
00072   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   SetRegistryBase (_T("Settings"));
00077
00078   // Initialize all Managers for usage. They are automatically constructed
00079   // if not yet present
00080   InitContextMenuManager();
00081   InitKeyboardManager();
00082
00083   // Register the application's document templates.  Document templates
00084   //  serve as the connection between documents, frame windows and views.
00085
00086   CSingleDocTemplate* pDocTemplate;
00087   pDocTemplate = new CSingleDocTemplate(
00088     IDR_MAINFRAME,
00089     RUNTIME_CLASS(CTasksPaneDoc),
00090     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00091     RUNTIME_CLASS(CTasksPaneView));
00092   AddDocTemplate(pDocTemplate);
00093
00094   // Parse command line for standard shell commands, DDE, file open
00095   CCommandLineInfo cmdInfo;
00096   ParseCommandLine(cmdInfo);
00097
00098   // Dispatch commands specified on the command line
00099   if (!ProcessShellCommand(cmdInfo))
00100     return FALSE;
00101
00102   // The one and only window has been initialized, so show and update it.
00103   m_pMainWnd->ShowWindow(SW_SHOW);
00104   m_pMainWnd->UpdateWindow();
00105
00106   if (afxGlobalData.m_nBitsPerPixel < 16)
00107   {
00108     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00109   }
00110
00111   return TRUE;
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CAboutDlg dialog used for App About
00116
00117 class CAboutDlg : public CDialog
00118 {
00119 public:
00120   CAboutDlg();
00121
00122 // Dialog Data
00123   //{{AFX_DATA(CAboutDlg)
00124   enum { IDD = IDD_ABOUTBOX };
00125   //}}AFX_DATA
00126
00127   // ClassWizard generated virtual function overrides
00128   //{{AFX_VIRTUAL(CAboutDlg)
00129   protected:
00130   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00131   //}}AFX_VIRTUAL
00132
00133 // Implementation
00134 protected:
00135   //{{AFX_MSG(CAboutDlg)
00136     // No message handlers
00137   //}}AFX_MSG
00138   DECLARE_MESSAGE_MAP()
00139 };
00140
00141 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00142 {
00143   //{{AFX_DATA_INIT(CAboutDlg)
00144   //}}AFX_DATA_INIT
00145 }
00146
00147 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00148 {
00149   CDialog::DoDataExchange(pDX);
00150   //{{AFX_DATA_MAP(CAboutDlg)
00151   //}}AFX_DATA_MAP
00152 }
00153
00154 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00155   //{{AFX_MSG_MAP(CAboutDlg)
00156     // No message handlers
00157   //}}AFX_MSG_MAP
00158 END_MESSAGE_MAP()
00159
00160 // App command to run the dialog
00161 void CTasksPaneApp::OnAppAbout()
00162 {
00163   CAboutDlg aboutDlg;
00164   aboutDlg.DoModal();
00165 }
00166
00167 /////////////////////////////////////////////////////////////////////////////
00168 // CTasksPaneApp message handlers
00169
00170 int CTasksPaneApp::ExitInstance()
00171 {
00172   return CWinAppEx::ExitInstance();
00173 }
00174
00175 void CTasksPaneApp::PreLoadState ()
00176 {
00177
00178   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00179
00180   // TODO: add another context menus here
00181 }
00182
00183
00184 /////////////////////////////////////////////////////////////////////////////
00185 // CTasksPaneApp message handlers
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/colorpge.cpp Source File

  • general
  • propdlg

colorpge.cpp

Go to the documentation of this file.
00001 // colorpge.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014 #include "stylepge.h"
00015 #include "colorpge.h"
00016 #include "shapeobj.h"
00017 #include "preview.h"
00018 #include "propsht.h"
00019 #include "propsht2.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CColorPage property page
00028
00029 CColorPage::CColorPage()
00030   : CPropertyPage(CColorPage::IDD)
00031 {
00032   //{{AFX_DATA_INIT(CColorPage)
00033   //}}AFX_DATA_INIT
00034   m_nColor = black;
00035 }
00036
00037 void CColorPage::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CPropertyPage::DoDataExchange(pDX);
00040   //{{AFX_DATA_MAP(CColorPage)
00041   DDX_Radio(pDX, IDC_BLACK, m_nColor);
00042   //}}AFX_DATA_MAP
00043 }
00044
00045 void CColorPage::OnColorClicked(UINT /*nCmdID*/)
00046 {
00047   // The CColorPage property page is used for both the
00048   // CModalShapePropSheet and the CModelessShapePropSheet.
00049   // Both these versions of the property sheet share a common
00050   // feature that they immediately update a shape.  In the
00051   // case of CModalShapePropSheet, the shape is in the preview
00052   // window.  In the case of CModelessShapePropSheet, the shape
00053   // is the currently selected shape in the view.
00054
00055   CPropertySheet* pSheet = STATIC_DOWNCAST(CPropertySheet, GetParent());
00056
00057   CModalShapePropSheet* pModalSheet =
00058     DYNAMIC_DOWNCAST(CModalShapePropSheet, pSheet);
00059   if (pModalSheet != NULL)
00060   {
00061     UpdateData();
00062     pModalSheet->UpdateShapePreview();
00063     SetModified(); // enable Apply Now button
00064   }
00065
00066   CModelessShapePropSheet* pModelessSheet =
00067     DYNAMIC_DOWNCAST(CModelessShapePropSheet, pSheet);
00068   if (pModelessSheet != NULL)
00069   {
00070     UpdateData();
00071     CFrameWnd* pFrameWnd = STATIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
00072     CView* pView = pFrameWnd->GetActiveFrame()->GetActiveView();
00073     pView->SendMessage(WM_USER_CHANGE_OBJECT_PROPERTIES, 0, 0);
00074   }
00075 }
00076
00077 BEGIN_MESSAGE_MAP(CColorPage, CPropertyPage)
00078   ON_CONTROL_RANGE(BN_CLICKED, IDC_BLACK, IDC_BLUE, OnColorClicked)
00079   //{{AFX_MSG_MAP(CColorPage)
00080     // NOTE: the ClassWizard will add message map macros here
00081   //}}AFX_MSG_MAP
00082 END_MESSAGE_MAP()
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // CColorPage message handlers
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListBar.h Source File

  • vc2008fp
  • OutlookDemo

FolderListBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "FoldersTree.h"
00013
00014 class CWorkspaceObj;
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CFolderListBar window
00018
00019 class CFolderListBar : public CDockablePane
00020 {
00021 // Construction
00022 public:
00023   CFolderListBar(const CObList& lstWorkspaces, CImageList& images);
00024
00025 // Attributes
00026 protected:
00027   CFoldersTree m_wndFolders;
00028   BOOL m_bNotifyFrame;
00029
00030 // Operations
00031 public:
00032   BOOL SelectWorkspace(CWorkspaceObj* pWS);
00033   virtual BOOL CanAcceptPane(const CBasePane* /*pBar*/) const
00034   {
00035     return FALSE;
00036   }
00037   virtual BOOL DoesAllowDynInsertBefore() const
00038   {
00039     return FALSE;
00040   }
00041
00042 // Overrides
00043 protected:
00044   virtual void OnEraseWorkArea(CDC* pDC, CRect rectWorkArea);
00045
00046 // Implementation
00047 public:
00048   virtual ~CFolderListBar();
00049
00050 protected:
00051   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00052   afx_msg void OnSize(UINT nType, int cx, int cy);
00053   afx_msg void OnSelectTree(NMHDR* pNMHDR, LRESULT* pResult);
00054
00055   DECLARE_MESSAGE_MAP()
00056 };
00057
00058
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MainFrm.h Source File

  • vc2008fp
  • CustomPages

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CFrameWnd CFrameWndEx
00014
00015 class CMainFrame : public CFrameWnd
00016 {
00017
00018 protected: // create from serialization only
00019   CMainFrame();
00020   DECLARE_DYNCREATE(CMainFrame)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CMFCMenuBar   m_wndMenuBar;
00041   CMFCStatusBar m_wndStatusBar;
00042   CMFCToolBar m_wndToolBar;
00043
00044 protected:
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   afx_msg void OnViewCustomize();
00047   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00048   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00049
00050   DECLARE_MESSAGE_MAP()
00051
00052   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00053 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpdoc.cpp Source File

  • ole
  • wordpad

wordpdoc.cpp

Go to the documentation of this file.
00001 // wordpdoc.cpp : implementation of the CWordPadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #include "wordpad.h"
00015 #include "wordpdoc.h"
00016 #include "wordpvw.h"
00017 #include "cntritem.h"
00018 #include "srvritem.h"
00019 #include "formatba.h"
00020
00021 #include "mainfrm.h"
00022 #include "ipframe.h"
00023 #include "buttondi.h"
00024 #include "helpids.h"
00025 #include "strings.h"
00026 #include "unitspag.h"
00027 #include "docopt.h"
00028 #include "optionsh.h"
00029
00030 #include "multconv.h"
00031
00032 #ifdef _DEBUG
00033 #undef THIS_FILE
00034 static char BASED_CODE THIS_FILE[] = __FILE__;
00035 #endif
00036
00037 extern BOOL AFXAPI AfxFullPath(LPTSTR lpszPathOut, LPCTSTR lpszFileIn);
00038 extern UINT AFXAPI AfxGetFileTitle(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
00039
00040 #ifndef OFN_EXPLORER
00041 #define OFN_EXPLORER 0x00080000L
00042 #endif
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CWordPadDoc
00045 IMPLEMENT_DYNCREATE(CWordPadDoc, CRichEditDoc)
00046
00047 BEGIN_MESSAGE_MAP(CWordPadDoc, CRichEditDoc)
00048   //{{AFX_MSG_MAP(CWordPadDoc)
00049   ON_COMMAND(ID_VIEW_OPTIONS, OnViewOptions)
00050   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_POPUP, OnUpdateOleVerbPopup)
00051   ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00052   ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateIfEmbedded)
00053   ON_UPDATE_COMMAND_UI(ID_FILE_OPEN, OnUpdateIfEmbedded)
00054   ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnUpdateIfEmbedded)
00055   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT, OnUpdateIfEmbedded)
00056   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_DIRECT, OnUpdateIfEmbedded)
00057   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, OnUpdateIfEmbedded)
00058   //}}AFX_MSG_MAP
00059   ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00060   ON_COMMAND(ID_OLE_EDIT_LINKS, CRichEditDoc::OnEditLinks)
00061   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, CRichEditDoc::OnUpdateObjectVerbMenu)
00062   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_CONVERT, CRichEditDoc::OnUpdateObjectVerbMenu)
00063   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, CRichEditDoc::OnUpdateEditLinksMenu)
00064 END_MESSAGE_MAP()
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CWordPadDoc construction/destruction
00068
00069 CWordPadDoc::CWordPadDoc()
00070 {
00071   m_nDocType = -1;
00072   m_nNewDocType = -1;
00073 }
00074
00075 BOOL CWordPadDoc::OnNewDocument()
00076 {
00077   if (!CRichEditDoc::OnNewDocument())
00078     return FALSE;
00079
00080   //correct type already set in theApp.m_nNewDocType;
00081   int nDocType = (IsEmbedded()) ? RD_EMBEDDED : theApp.m_nNewDocType;
00082
00083   GetView()->SetDefaultFont(IsTextType(nDocType));
00084   SetDocType(nDocType);
00085
00086   return TRUE;
00087 }
00088
00089 void CWordPadDoc::ReportSaveLoadException(LPCTSTR lpszPathName,
00090   CException* e, BOOL bSaving, UINT nIDP)
00091 {
00092   if (!m_bDeferErrors && e != NULL)
00093   {
00094     ASSERT_VALID(e);
00095     if (e->IsKindOf(RUNTIME_CLASS(CFileException)))
00096     {
00097       switch (((CFileException*)e)->m_cause)
00098       {
00099       case CFileException::fileNotFound:
00100       case CFileException::badPath:
00101         nIDP = AFX_IDP_FAILED_INVALID_PATH;
00102         break;
00103       case CFileException::diskFull:
00104         nIDP = AFX_IDP_FAILED_DISK_FULL;
00105         break;
00106       case CFileException::accessDenied:
00107         nIDP = bSaving ? AFX_IDP_FAILED_ACCESS_WRITE :
00108             AFX_IDP_FAILED_ACCESS_READ;
00109         if (((CFileException*)e)->m_lOsError == ERROR_WRITE_PROTECT)
00110           nIDP = IDS_WRITEPROTECT;
00111         break;
00112       case CFileException::tooManyOpenFiles:
00113         nIDP = IDS_TOOMANYFILES;
00114         break;
00115       case CFileException::directoryFull:
00116         nIDP = IDS_DIRFULL;
00117         break;
00118       case CFileException::sharingViolation:
00119         nIDP = IDS_SHAREVIOLATION;
00120         break;
00121       case CFileException::lockViolation:
00122       case CFileException::badSeek:
00123       case CFileException::genericException:
00124       case CFileException::invalidFile:
00125       case CFileException::hardIO:
00126         nIDP = bSaving ? AFX_IDP_FAILED_IO_ERROR_WRITE :
00127             AFX_IDP_FAILED_IO_ERROR_READ;
00128         break;
00129       default:
00130         break;
00131       }
00132       CString prompt;
00133       AfxFormatString1(prompt, nIDP, lpszPathName);
00134       AfxMessageBox(prompt, MB_ICONEXCLAMATION, nIDP);
00135       return;
00136     }
00137   }
00138   CRichEditDoc::ReportSaveLoadException(lpszPathName, e, bSaving, nIDP);
00139   return;
00140 }
00141
00142 BOOL CWordPadDoc::OnOpenDocument(LPCTSTR lpszPathName)
00143 {
00144   if (m_lpRootStg != NULL) // we are embedded
00145   {
00146     // we really want to use the converter on this storage
00147     m_nNewDocType = RD_EMBEDDED;
00148   }
00149   else
00150   {
00151     if (theApp.cmdInfo.m_bForceTextMode)
00152       m_nNewDocType = RD_TEXT;
00153     else
00154     {
00155       CFileException fe;
00156       m_nNewDocType = GetDocTypeFromName(lpszPathName, fe);
00157       if (m_nNewDocType == -1)
00158       {
00159         ReportSaveLoadException(lpszPathName, &fe, FALSE,
00160           AFX_IDP_FAILED_TO_OPEN_DOC);
00161         return FALSE;
00162       }
00163       if (m_nNewDocType == RD_TEXT && theApp.m_bForceOEM)
00164         m_nNewDocType = RD_OEMTEXT;
00165     }
00166     ScanForConverters();
00167     if (!doctypes[m_nNewDocType].bRead)
00168     {
00169       CString str;
00170       CString strName = doctypes[m_nNewDocType].GetString(DOCTYPE_DOCTYPE);
00171       AfxFormatString1(str, IDS_CANT_LOAD, strName);
00172       AfxMessageBox(str, MB_OK|MB_ICONINFORMATION);
00173       return FALSE;
00174     }
00175   }
00176
00177 //  SetDocType(nNewDocType);
00178   if (!CRichEditDoc::OnOpenDocument(lpszPathName))
00179     return FALSE;
00180   return TRUE;
00181 }
00182
00183 void CWordPadDoc::Serialize(CArchive& ar)
00184 {
00185   COleMessageFilter* pFilter = AfxOleGetMessageFilter();
00186   ENSURE(pFilter != NULL);
00187   pFilter->EnableBusyDialog(FALSE);
00188   if (ar.IsLoading())
00189     SetDocType(m_nNewDocType);
00190   CRichEditDoc::Serialize(ar);
00191   pFilter->EnableBusyDialog(TRUE);
00192 }
00193
00194 BOOL CWordPadDoc::DoSave(LPCTSTR pszPathName, BOOL bReplace /*=TRUE*/)
00195   // Save the document data to a file
00196   // pszPathName = path name where to save document file
00197   // if pszPathName is NULL then the user will be prompted (SaveAs)
00198   // note: pszPathName can be different than 'm_strPathName'
00199   // if 'bReplace' is TRUE will change file name if successful (SaveAs)
00200   // if 'bReplace' is FALSE will not change path name (SaveCopyAs)
00201 {
00202   CString newName = pszPathName;
00203   int nOrigDocType = m_nDocType;  //saved in case of SaveCopyAs or failure
00204
00205   //  newName     bWrite  type    result
00206   //  empty       TRUE    -       SaveAs dialog
00207   //  empty       FALSE   -       SaveAs dialog
00208   //  notempty    TRUE    -       nothing
00209   //  notempty    FALSE   W6      warn (change to wordpad, save as, cancel)
00210   //  notempty    FALSE   other   warn (save as, cancel)
00211
00212   BOOL bModified = IsModified();
00213
00214   ScanForConverters();
00215
00216   BOOL bSaveAs = FALSE;
00217   if (newName.IsEmpty())
00218     bSaveAs = TRUE;
00219   else if (!doctypes[m_nDocType].bWrite)
00220   {
00221     if (m_nDocType == RD_WINWORD6)
00222     {
00223       //      DWORD nHelpIDs[] =
00224       //      {
00225       //          0, 0
00226       //      };
00227       INT_PTR nRes = CButtonDialog::DisplayMessageBox(
00228         MAKEINTRESOURCE(IDS_WORD6_WARNING), AfxGetAppName(),
00229         MAKEINTRESOURCE(IDS_WORD6_WARNING_BUTTONS),
00230         MB_ICONEXCLAMATION, 1, 2);
00231       if (nRes == 0) // Save
00232         SetDocType(RD_WORDPAD, TRUE);
00233       else if (nRes == 2) // Cancel
00234         return FALSE;
00235       else
00236         bSaveAs = TRUE;
00237       // else save as
00238     }
00239     else //
00240     {
00241       if (AfxMessageBox(IDS_SAVE_UNSUPPORTED,
00242         MB_YESNO | MB_ICONEXCLAMATION) != IDYES)
00243       {
00244         return FALSE;
00245       }
00246       else
00247         bSaveAs = TRUE;
00248     }
00249   }
00250
00251   if (m_lpRootStg == NULL && IsTextType(m_nDocType) &&
00252     !GetView()->IsFormatText())
00253   {
00254     // formatting changed in plain old text file
00255     DWORD nHelpIDs[] =
00256     {
00257       0, IDH_WORDPAD_WORD6FILE,
00258       0, IDH_WORDPAD_FORMATTED,
00259       0, IDH_WORDPAD_TEXTFILE,
00260       0, 0
00261     };
00262     CString str;
00263     AfxFormatString1(str, IDS_SAVE_FORMAT_TEXT, GetTitle());
00264     INT_PTR nRes = CButtonDialog::DisplayMessageBox(str,
00265       MAKEINTRESOURCE(AFX_IDS_APP_TITLE),
00266       MAKEINTRESOURCE(IDS_TF_BUTTONS), MB_ICONEXCLAMATION, 0, 3, nHelpIDs);
00267     if (nRes == 3)
00268       return FALSE;
00269     int nDocType = (nRes == 0) ? RD_DEFAULT:    //Word 6
00270           (nRes == 1) ? RD_RICHTEXT : //RTF
00271           RD_TEXT;                    //text
00272     if (IsTextType(m_nDocType) && nDocType != RD_TEXT)
00273       SetDocType(nDocType, TRUE);
00274     if (nDocType != RD_TEXT)
00275       bSaveAs = TRUE;
00276   }
00277
00278   GetView()->GetParentFrame()->RecalcLayout();
00279   if (bSaveAs)
00280   {
00281     newName = m_strPathName;
00282     if (bReplace && newName.IsEmpty())
00283     {
00284       newName = m_strTitle;
00285       int iBad = newName.FindOneOf(_T(" #%;/\\"));    // dubious filename
00286       if (iBad != -1)
00287         newName.ReleaseBuffer(iBad);
00288
00289       // append the default suffix if there is one
00290       newName += GetExtFromType(m_nDocType);
00291     }
00292
00293     int nDocType = m_nDocType;
00294     if (!theApp.PromptForFileName(newName,
00295       bReplace ? AFX_IDS_SAVEFILE : AFX_IDS_SAVEFILECOPY,
00296       OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, FALSE, &nDocType))
00297     {
00298       SetDocType(nOrigDocType, TRUE);
00299       return FALSE;       // don't even try to save
00300     }
00301     SetDocType(nDocType, TRUE);
00302   }
00303
00304   BeginWaitCursor();
00305   if (!OnSaveDocument(newName))
00306   {
00307     if (pszPathName == NULL)
00308     {
00309       // be sure to delete the file
00310       TRY
00311       {
00312         CFile::Remove(newName);
00313       }
00314       CATCH_ALL(e)
00315       {
00316         TRACE0("Warning: failed to delete file after failed SaveAs\n");
00317       }
00318       END_CATCH_ALL
00319     }
00320     // restore orginal document type
00321     SetDocType(nOrigDocType, TRUE);
00322     EndWaitCursor();
00323     return FALSE;
00324   }
00325
00326   EndWaitCursor();
00327   if (bReplace)
00328   {
00329     int nType = m_nDocType;
00330     SetDocType(nOrigDocType, TRUE);
00331     SetDocType(nType);
00332     // Reset the title and change the document name
00333     SetPathName(newName, TRUE);
00334     ASSERT(m_strPathName == newName);       // must be set
00335   }
00336   else // SaveCopyAs
00337   {
00338     SetDocType(nOrigDocType, TRUE);
00339     SetModifiedFlag(bModified);
00340   }
00341   return TRUE;        // success
00342 }
00343
00344 class COIPF : public COleIPFrameWnd
00345 {
00346 public:
00347   CFrameWnd* GetMainFrame() { return m_pMainFrame;}
00348   CFrameWnd* GetDocFrame() { return m_pDocFrame;}
00349 };
00350
00351 void CWordPadDoc::OnDeactivateUI(BOOL bUndoable)
00352 {
00353   if (GetView()->m_bDelayUpdateItems)
00354     UpdateAllItems(NULL);
00355   SaveState(m_nDocType);
00356   CRichEditDoc::OnDeactivateUI(bUndoable);
00357   COIPF* pFrame = (COIPF*)m_pInPlaceFrame;
00358   if (pFrame != NULL)
00359   {
00360     if (pFrame->GetMainFrame() != NULL)
00361       ForceDelayed(pFrame->GetMainFrame());
00362     if (pFrame->GetDocFrame() != NULL)
00363       ForceDelayed(pFrame->GetDocFrame());
00364   }
00365 }
00366
00367 void CWordPadDoc::ForceDelayed(CFrameWnd* pFrameWnd)
00368 {
00369   ASSERT_VALID(this);
00370   ASSERT_VALID(pFrameWnd);
00371
00372   POSITION pos = pFrameWnd->m_listControlBars.GetHeadPosition();
00373   while (pos != NULL)
00374   {
00375     // show/hide the next control bar
00376     CControlBar* pBar =
00377       (CControlBar*)pFrameWnd->m_listControlBars.GetNext(pos);
00378
00379     BOOL bVis = pBar->GetStyle() & WS_VISIBLE;
00380     UINT swpFlags = 0;
00381     if ((pBar->m_nStateFlags & CControlBar::delayHide) && bVis)
00382       swpFlags = SWP_HIDEWINDOW;
00383     else if ((pBar->m_nStateFlags & CControlBar::delayShow) && !bVis)
00384       swpFlags = SWP_SHOWWINDOW;
00385     pBar->m_nStateFlags &= ~(CControlBar::delayShow|CControlBar::delayHide);
00386     if (swpFlags != 0)
00387     {
00388       pBar->SetWindowPos(NULL, 0, 0, 0, 0, swpFlags|
00389         SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
00390     }
00391   }
00392 }
00393
00394 /////////////////////////////////////////////////////////////////////////////
00395 // CWordPadDoc Attributes
00396 CLSID CWordPadDoc::GetClassID()
00397 {
00398   return (m_pFactory == NULL) ? CLSID_NULL : m_pFactory->GetClassID();
00399 }
00400
00401 void CWordPadDoc::SetDocType(int nNewDocType, BOOL bNoOptionChange)
00402 {
00403   ASSERT(nNewDocType != -1);
00404   if (nNewDocType == m_nDocType)
00405     return;
00406
00407   m_bRTF = !IsTextType(nNewDocType);
00408   if (bNoOptionChange)
00409     m_nDocType = nNewDocType;
00410   else
00411   {
00412     SaveState(m_nDocType);
00413     m_nDocType = nNewDocType;
00414     RestoreState(m_nDocType);
00415   }
00416 }
00417
00418 CWordPadView* CWordPadDoc::GetView()
00419 {
00420   POSITION pos = GetFirstViewPosition();
00421   return (CWordPadView* )GetNextView( pos );
00422 }
00423
00424 /////////////////////////////////////////////////////////////////////////////
00425 // CWordPadDoc Operations
00426
00427 CFile* CWordPadDoc::GetFile(LPCTSTR pszPathName, UINT nOpenFlags, CFileException* pException)
00428 {
00429   CTrackFile* pFile = NULL;
00430   CFrameWnd* pWnd = GetView()->GetParentFrame();
00431 #ifdef CONVERTERS
00432   ScanForConverters();
00433
00434   // if writing use current doc type otherwise use new doc type
00435   int nType = (nOpenFlags & CFile::modeReadWrite) ? m_nDocType : m_nNewDocType;
00436   // m_nNewDocType will be same as m_nDocType except when opening a new file
00437   if (doctypes[nType].pszConverterName != NULL)
00438     pFile = new CConverter(doctypes[nType].pszConverterName, pWnd);
00439   else
00440 #endif
00441   if (nType == RD_OEMTEXT)
00442     pFile = new COEMFile(pWnd);
00443   else
00444     pFile = new CTrackFile(pWnd);
00445   if (!pFile->Open(pszPathName, nOpenFlags, pException))
00446   {
00447     delete pFile;
00448     return NULL;
00449   }
00450   if (nOpenFlags & (CFile::modeWrite | CFile::modeReadWrite))
00451     pFile->m_dwLength = 0; // can't estimate this
00452   else
00453     pFile->m_dwLength = (DWORD)pFile->GetLength();
00454   return pFile;
00455 }
00456
00457 CRichEditCntrItem* CWordPadDoc::CreateClientItem(REOBJECT* preo) const
00458 {
00459   // cast away constness of this
00460   return new CWordPadCntrItem(preo, (CWordPadDoc*)this);
00461 }
00462
00463 /////////////////////////////////////////////////////////////////////////////
00464 // CWordPadDoc server implementation
00465
00466 COleServerItem* CWordPadDoc::OnGetEmbeddedItem()
00467 {
00468   // OnGetEmbeddedItem is called by the framework to get the COleServerItem
00469   //  that is associated with the document.  It is only called when necessary.
00470
00471   CEmbeddedItem* pItem = new CEmbeddedItem(this);
00472   ASSERT_VALID(pItem);
00473   return pItem;
00474 }
00475
00476 /////////////////////////////////////////////////////////////////////////////
00477 // CWordPadDoc serialization
00478
00479 /////////////////////////////////////////////////////////////////////////////
00480 // CWordPadDoc diagnostics
00481
00482 #ifdef _DEBUG
00483 void CWordPadDoc::AssertValid() const
00484 {
00485   CRichEditDoc::AssertValid();
00486 }
00487
00488 void CWordPadDoc::Dump(CDumpContext& dc) const
00489 {
00490   CRichEditDoc::Dump(dc);
00491 }
00492 #endif //_DEBUG
00493
00494 /////////////////////////////////////////////////////////////////////////////
00495 // CWordPadDoc commands
00496
00497 int CWordPadDoc::MapType(int nType)
00498 {
00499   if (nType == RD_OEMTEXT)
00500     nType = RD_TEXT;
00501   else if (!IsInPlaceActive() && nType == RD_EMBEDDED)
00502     nType = RD_RICHTEXT;
00503   return nType;
00504 }
00505
00506 void CWordPadDoc::OnViewOptions()
00507 {
00508   int nType = MapType(m_nDocType);
00509   int nFirstPage = 3;
00510   if (nType == RD_TEXT)
00511     nFirstPage = 1;
00512   else if (nType == RD_RICHTEXT)
00513     nFirstPage = 2;
00514   else if (nType == RD_WRITE)
00515     nFirstPage = 4;
00516   else if (nType == RD_EMBEDDED)
00517     nFirstPage = 5;
00518
00519   SaveState(nType);
00520
00521   COptionSheet sheet(IDS_OPTIONS, NULL, nFirstPage);
00522
00523   if (sheet.DoModal() == IDOK)
00524   {
00525     CWordPadView* pView = GetView();
00526     if (theApp.m_bWordSel)
00527       pView->GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_AUTOWORDSELECTION);
00528     else
00529     {
00530       pView->GetRichEditCtrl().SetOptions(ECOOP_AND,
00531         ~(DWORD)ECO_AUTOWORDSELECTION);
00532     }
00533     RestoreState(nType);
00534   }
00535 }
00536
00537 void CWordPadDoc::OnUpdateOleVerbPopup(CCmdUI* pCmdUI)
00538 {
00539   pCmdUI->m_pParentMenu = pCmdUI->m_pMenu;
00540   CRichEditDoc::OnUpdateObjectVerbMenu(pCmdUI);
00541 }
00542
00543 BOOL CWordPadDoc::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00544 {
00545   if (nCode == CN_COMMAND && nID == ID_OLE_VERB_POPUP)
00546     nID = ID_OLE_VERB_FIRST;
00547   return CRichEditDoc::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00548 }
00549
00550 void CWordPadDoc::SaveState(int nType)
00551 {
00552   if (nType == -1)
00553     return;
00554   nType = MapType(nType);
00555   CWordPadView* pView = GetView();
00556   if (pView != NULL)
00557   {
00558     CFrameWnd* pFrame = pView->GetParentFrame();
00559     ENSURE(pFrame != NULL);
00560     // save current state
00561     pFrame->SendMessage(WPM_BARSTATE, 0, nType);
00562     theApp.GetDocOptions(nType).m_nWordWrap = pView->m_nWordWrap;
00563   }
00564 }
00565
00566 void CWordPadDoc::RestoreState(int nType)
00567 {
00568   if (nType == -1)
00569     return;
00570   nType = MapType(nType);
00571   CWordPadView* pView = GetView();
00572   if (pView != NULL)
00573   {
00574     CFrameWnd* pFrame = pView->GetParentFrame();
00575     ENSURE(pFrame != NULL);
00576     // set new state
00577     pFrame->SendMessage(WPM_BARSTATE, 1, nType);
00578     int nWrapNew = theApp.GetDocOptions(nType).m_nWordWrap;
00579     if (pView->m_nWordWrap != nWrapNew)
00580     {
00581       pView->m_nWordWrap = nWrapNew;
00582       pView->WrapChanged();
00583     }
00584   }
00585 }
00586
00587 void CWordPadDoc::OnCloseDocument()
00588 {
00589   SaveState(m_nDocType);
00590   CRichEditDoc::OnCloseDocument();
00591 }
00592
00593 void CWordPadDoc::PreCloseFrame(CFrameWnd* pFrameArg)
00594 {
00595   CRichEditDoc::PreCloseFrame(pFrameArg);
00596   SaveState(m_nDocType);
00597 }
00598
00599 void CWordPadDoc::OnFileSendMail()
00600 {
00601   if (m_strTitle.Find('.') == -1)
00602   {
00603     // add the extension because the default extension will be wrong
00604     CString strOldTitle = m_strTitle;
00605     m_strTitle += GetExtFromType(m_nDocType);
00606     CRichEditDoc::OnFileSendMail();
00607     m_strTitle = strOldTitle;
00608   }
00609   else
00610     CRichEditDoc::OnFileSendMail();
00611 }
00612
00613 void CWordPadDoc::OnUpdateIfEmbedded(CCmdUI* pCmdUI)
00614 {
00615   pCmdUI->Enable(!IsEmbedded());
00616 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewDoc.cpp Source File

  • vc2008fp
  • TabbedView

TabbedViewDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013
00014 #include "TabbedViewDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CTabbedViewDoc
00024
00025 IMPLEMENT_DYNCREATE(CTabbedViewDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CTabbedViewDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CTabbedViewDoc construction/destruction
00032
00033 CTabbedViewDoc::CTabbedViewDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CTabbedViewDoc::~CTabbedViewDoc()
00040 {
00041 }
00042
00043 BOOL CTabbedViewDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CTabbedViewDoc serialization
00058
00059 void CTabbedViewDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CTabbedViewDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CTabbedViewDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CTabbedViewDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CTabbedViewDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAboutBox Member List

This is the complete list of members for CAboutBox, including all inherited members.
CAboutBox(CWnd *pParent=NULL) | CAboutBox |
DoDataExchange(CDataExchange *pDX) | CAboutBox | [protected, virtual]
IDD enum value | CAboutBox |
m_icon | CAboutBox | [protected]
OnInitDialog() | CAboutBox | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/stdafx.h Source File

  • controls
  • cmnctrl

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>                     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036 #include <afxdlgs.h>
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifdef _UNICODE
00047 #if defined _M_IX86
00048 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00049 #elif defined _M_X64
00050 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00051 #else
00052 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00053 #endif
00054 #endif
00055
00056
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/hiersvr.cpp Source File

  • ole
  • hiersvr

hiersvr.cpp

Go to the documentation of this file.
00001 // hiersvr.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "hiersvr.h"
00015
00016 #include "mainfrm.h"
00017 #include "ipframe.h"
00018 #include "svrdoc.h"
00019 #include "svrview.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CServerApp
00028
00029 BEGIN_MESSAGE_MAP(CServerApp, CWinApp)
00030   //{{AFX_MSG_MAP(CServerApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032   //}}AFX_MSG_MAP
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CServerApp construction
00040 // Place all significant initialization in InitInstance
00041
00042 CServerApp::CServerApp()
00043 {
00044     EnableHtmlHelp();
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CServerApp object
00049
00050 CServerApp theApp;
00051
00052 // this is the GUID for HIERSVR documents
00053 static const GUID BASED_CODE clsid =
00054   { 0x00021841, 0, 0, { 0xC0, 0, 0, 0, 0, 0, 0, 0x46 } };
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 //
00058
00059 CHierSvrDocTemplate::CHierSvrDocTemplate()
00060 : CMultiDocTemplate(IDR_HIERSVRTYPE,
00061   RUNTIME_CLASS(CServerDoc),
00062   RUNTIME_CLASS(CMDIChildWnd), // standard MDI child frame
00063   RUNTIME_CLASS(CServerView))
00064 {
00065 }
00066
00067 CDocTemplate::Confidence CHierSvrDocTemplate::MatchDocType(LPCTSTR lpszPathName,
00068   CDocument*& rpDocMatch)
00069 {
00070   CDocTemplate::Confidence ret;
00071
00072   ret = CMultiDocTemplate::MatchDocType(lpszPathName, rpDocMatch);
00073
00074   if (ret == CDocTemplate::yesAttemptForeign)
00075     ret = CDocTemplate::noAttempt;
00076
00077   return ret;
00078 }
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CServerApp initialization
00082
00083 BOOL CServerApp::InitInstance()
00084 {
00085 #ifdef _DEBUG
00086   // turn on extra memory tracking
00087   afxMemDF |= checkAlwaysMemDF;
00088 #endif
00089
00090   // OLE 2.0 initialization
00091   if (!AfxOleInit())
00092   {
00093     AfxMessageBox(IDP_AFXOLEINIT_FAILED);
00094     return FALSE;
00095   }
00096
00097   // Standard initialization
00098   LoadStdProfileSettings();
00099
00100   // Register document templates
00101   CDocTemplate* pDocTemplate;
00102   pDocTemplate = new CHierSvrDocTemplate;
00103   pDocTemplate->SetServerInfo(
00104     IDR_HIERSVRTYPE_SRVR_EMB, IDR_HIERSVRTYPE_SRVR_IP,
00105     RUNTIME_CLASS(CInPlaceFrame), RUNTIME_CLASS(CServerView));
00106   AddDocTemplate(pDocTemplate);
00107
00108   // create main MDI Frame window
00109   CMainFrame* pMainFrame = new CMainFrame;
00110   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00111   {
00112     delete pMainFrame;
00113     return FALSE;
00114   }
00115   m_pMainWnd = pMainFrame;
00116
00117   // enable file manager drag/drop and DDE Execute open
00118   m_pMainWnd->DragAcceptFiles();
00119   EnableShellOpen();
00120
00121   // connect the COleTemplate server to the document template
00122   m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
00123   COleTemplateServer::RegisterAll();
00124     // Note: MDI applications register all class objects regardless of
00125     //  the /Embedding on the command line.
00126
00127   // Parse command line for standard shell commands, DDE, file open
00128   CCommandLineInfo cmdInfo;
00129   ParseCommandLine(cmdInfo);
00130
00131   // try to launch as an OLE server
00132   if (cmdInfo.m_bRunEmbedded)
00133   {
00134     // application was run with /Embedding flag.  Instead of showing
00135     //  the window, the application waits to receive OLE requests.
00136     return TRUE;
00137   }
00138
00139   m_server.UpdateRegistry();
00140   RegisterShellFileTypes(TRUE);
00141   COleObjectFactory::UpdateRegistryAll();
00142
00143   // Dispatch commands specified on the command line
00144   if (!ProcessShellCommand(cmdInfo))
00145     return FALSE;
00146
00147   pMainFrame->ShowWindow(m_nCmdShow);
00148   pMainFrame->UpdateWindow();
00149
00150   return TRUE;
00151 }
00152
00153 int CServerApp::ExitInstance()
00154 {
00155   return CWinApp::ExitInstance();
00156 }
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CAboutDlg dialog used for App About
00160
00161 class CAboutDlg : public CDialog
00162 {
00163 public:
00164   CAboutDlg() : CDialog(CAboutDlg::IDD)
00165   {
00166   //{{AFX_DATA_INIT(CAboutDlg)
00167   //}}AFX_DATA_INIT
00168   }
00169
00170 // Dialog Data
00171   //{{AFX_DATA(CAboutDlg)
00172   enum { IDD = IDD_ABOUTBOX };
00173   //}}AFX_DATA
00174
00175 // Implementation
00176 protected:
00177   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00178   //{{AFX_MSG(CAboutDlg)
00179     // No message handlers
00180   //}}AFX_MSG
00181   DECLARE_MESSAGE_MAP()
00182 };
00183
00184 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00185 {
00186   CDialog::DoDataExchange(pDX);
00187   //{{AFX_DATA_MAP(CAboutDlg)
00188   //}}AFX_DATA_MAP
00189 }
00190
00191 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00192   //{{AFX_MSG_MAP(CAboutDlg)
00193     // No message handlers
00194   //}}AFX_MSG_MAP
00195 END_MESSAGE_MAP()
00196
00197 // App command to run the dialog
00198 void CServerApp::OnAppAbout()
00199 {
00200   CAboutDlg aboutDlg;
00201   aboutDlg.DoModal();
00202 }
00203
00204 /////////////////////////////////////////////////////////////////////////////
00205 // CServerApp commands
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWizardDialog Member List

This is the complete list of members for CWizardDialog, including all inherited members.
CWizardDialog() | CWizardDialog | [inline]
m_endWizardDialog | CWizardDialog | [private]
m_nextWizardDialog | CWizardDialog | [private]
OnCommandControlClick(int iButtonId) | CWizardDialog | [inline, protected]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexdlg.h Source File

  • advanced
  • mutexes

mutexdlg.h

Go to the documentation of this file.
00001 // mutexesDlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // This sample application is derived from the Mutex application
00013 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00014 // (Microsoft Press).  See the book for more information about Win32
00015 // programming topics, including thread synchronization.
00016
00017 class CCounterThread;
00018 class CDisplayThread;
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMutexesDlg dialog
00022
00023 class CMutexesDlg : public CDialog
00024 {
00025 // Construction
00026 public:
00027   CMutexesDlg(CWnd* pParent = NULL);  // standard constructor
00028   ~CMutexesDlg();
00029 // Dialog Data
00030   //{{AFX_DATA(CMutexesDlg)
00031   enum { IDD = IDD_MUTEXES_DIALOG };
00032     // NOTE: the ClassWizard will add data members here
00033   //}}AFX_DATA
00034
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CMutexesDlg)
00037   protected:
00038   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00039   //}}AFX_VIRTUAL
00040
00041 public:
00042   CString m_strNumber;
00043
00044   CMutex m_mutex;
00045
00046   CCounterThread* m_pCounterThread;
00047   CDisplayThread* m_pDisplayThread;
00048
00049   void AddToListBox(LPCTSTR szBuffer);
00050
00051   void OnPriorityChange(UINT nID);
00052
00053 // Implementation
00054 protected:
00055   HICON m_hIcon;
00056
00057   // Generated message map functions
00058   //{{AFX_MSG(CMutexesDlg)
00059   virtual BOOL OnInitDialog();
00060   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00061   afx_msg void OnPaint();
00062   afx_msg HCURSOR OnQueryDragIcon();
00063   afx_msg void OnPriorityClassChange();
00064   afx_msg void OnPriorityChangeCntr();
00065   afx_msg void OnPriorityChangeDisp();
00066   afx_msg void OnClose();
00067   afx_msg void OnPause();
00068   //}}AFX_MSG
00069   DECLARE_MESSAGE_MAP()
00070 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawOleObj Member List

This is the complete list of members for CDrawOleObj, including all inherited members.
active enum value | CDrawObj |
c_bShowItems | CDrawOleObj | [static]
CanChangeFillColor() const | CDrawOleObj | [inline, virtual]
CanChangeLineColor() const | CDrawOleObj | [inline, virtual]
CanChangeLineWeight() const | CDrawOleObj | [inline, virtual]
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawOleObj() | CDrawOleObj | [protected]
CDrawOleObj(const CRect &position) | CDrawOleObj |
CDrawOleObj() | CDrawOleObj | [protected]
CDrawOleObj(const CRect &position) | CDrawOleObj |
Clone(CDrawDoc *pDoc) | CDrawOleObj | [virtual]
Clone(CDrawDoc *pDoc) | CDrawOleObj | [virtual]
DECLARE_SERIAL(CDrawOleObj) | CDrawOleObj | [protected]
DECLARE_SERIAL(CDrawOleObj) | CDrawOleObj | [protected]
CDrawObj::DECLARE_SERIAL(CDrawObj) | CDrawObj | [protected]
Draw(CDC *pDC) | CDrawOleObj | [virtual]
Draw(CDC *pDC) | CDrawOleObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
EnableFill(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
EnableLine(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
GetFillColor() const | CDrawObj | [inline]
GetHandle(int nHandle) | CDrawObj | [virtual]
GetHandle(int nHandle) | CDrawObj | [virtual]
GetHandleCount() | CDrawObj | [virtual]
GetHandleCount() | CDrawObj | [virtual]
GetHandleCursor(int nHandle) | CDrawObj | [virtual]
GetHandleCursor(int nHandle) | CDrawObj | [virtual]
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetLineColor() const | CDrawObj | [inline]
GetLineWeight() const | CDrawObj | [inline]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawObj | [virtual]
Invalidate() | CDrawObj |
Invalidate() | CDrawObj |
IsEnableFill() const | CDrawObj | [inline]
IsEnableLine() const | CDrawObj | [inline]
m_bBrush | CDrawObj | [protected]
m_bPen | CDrawObj | [protected]
m_extent | CDrawOleObj |
m_logbrush | CDrawObj | [protected]
m_logpen | CDrawObj | [protected]
m_pClientItem | CDrawOleObj |
m_pDocument | CDrawObj |
m_position | CDrawObj |
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawOleObj | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawOleObj | [virtual]
CDrawObj::MoveTo(const CPoint &position) | CDrawObj | [virtual]
normal enum value | CDrawObj |
OnEditProperties() | CDrawOleObj | [virtual]
OnEditProperties() | CDrawOleObj | [virtual]
OnOpen(CDrawView *pView) | CDrawOleObj | [virtual]
OnOpen(CDrawView *pView) | CDrawOleObj | [virtual]
Remove() | CDrawOleObj | [virtual]
Remove() | CDrawOleObj | [virtual]
selected enum value | CDrawObj |
Serialize(CArchive &ar) | CDrawOleObj | [virtual]
Serialize(CArchive &ar) | CDrawOleObj | [virtual]
SetFillColor(COLORREF color) | CDrawObj | [virtual]
SetFillColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineColor(COLORREF color) | CDrawObj | [virtual]
SetLineColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineWeight(int nWidth, BOOL bPreview=FALSE) | CDrawObj |
TrackerState enum name | CDrawObj |
TrackerState enum name | CDrawObj |
~CDrawObj() | CDrawObj | [virtual]
~CDrawObj() | CDrawObj | [virtual]
~CDrawOleObj() | CDrawOleObj | [virtual]
~CDrawOleObj() | CDrawOleObj | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/StdAfx.h Source File

  • vc2008fp
  • ToolTipDemo

StdAfx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef _SECURE_ATL
00014 #define _SECURE_ATL 1
00015 #endif
00016
00017 #ifndef VC_EXTRALEAN
00018 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00019 #endif
00020
00021 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00022
00023 // turns off MFC's hiding of some common and often safely ignored warning messages
00024 #define _AFX_ALL_WARNINGS
00025
00026 #include <afxwin.h>         // MFC core and standard components
00027 #include <afxext.h>         // MFC extensions
00028
00029 #include <afxhtml.h>
00030 #include <afxdisp.h>        // MFC Automation classes
00031
00032
00033
00034 #ifndef _AFX_NO_OLE_SUPPORT
00035 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00036 #endif
00037 #ifndef _AFX_NO_AFXCMN_SUPPORT
00038 #include <afxcmn.h>     // MFC support for Windows Common Controls
00039 #endif // _AFX_NO_AFXCMN_SUPPORT
00040
00041 #include <afxcontrolbars.h> // MFC support for ribbons and control bars
00042
00043 #if defined _M_IX86
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #elif defined _M_X64
00046 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00047 #else
00048 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00049 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeView.cpp Source File

  • vc2008fp
  • SetPaneSize

SetPaneSizeView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "SetPaneSize.h"
00013
00014 #include "SetPaneSizeDoc.h"
00015 #include "SetPaneSizeView.h"
00016 #include "MainFrm.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CSetPaneSizeView
00026
00027 IMPLEMENT_DYNCREATE(CSetPaneSizeView, CFormView)
00028
00029 BEGIN_MESSAGE_MAP(CSetPaneSizeView, CFormView)
00030   ON_BN_CLICKED(IDC_BUTTON_SET_DLGBAR_SIZE, OnButtonSetDlgBarSize)
00031   ON_BN_CLICKED(IDC_BUTTON_SET_CONTAINER_SIZE, OnButtonSetContainerSize)
00032   ON_BN_CLICKED(IDC_BTN_SET_HEIGHT_IN_PIXELS, OnBtnSetHeightInPixels)
00033   ON_BN_CLICKED(IDC_BTN_SET_WIDTH_IN_PIXELS, OnBtnSetWidthInPixels)
00034   ON_WM_CONTEXTMENU()
00035   // Standard printing commands
00036   ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
00037   ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
00038   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CSetPaneSizeView construction/destruction
00043
00044 CSetPaneSizeView::CSetPaneSizeView()
00045   : CFormView(CSetPaneSizeView::IDD)
00046 {
00047   m_nSizePercent = 50;
00048   m_nContainerSize = 100;
00049   m_nHeightInPixels = 100;
00050   m_nWidthInPixels = 100;
00051 }
00052
00053 CSetPaneSizeView::~CSetPaneSizeView()
00054 {
00055 }
00056
00057 void CSetPaneSizeView::DoDataExchange(CDataExchange* pDX)
00058 {
00059   CFormView::DoDataExchange(pDX);
00060   DDX_Text(pDX, IDC_EDIT_SIZE, m_nSizePercent);
00061   DDV_MinMaxUInt(pDX, m_nSizePercent, 1, 99);
00062   DDX_Text(pDX, IDC_EDIT_WIDTH, m_nContainerSize);
00063   DDV_MinMaxUInt(pDX, m_nContainerSize, 1, 2056);
00064   DDX_Text(pDX, IDC_EDIT_HEIGHT_IN_PIXELS, m_nHeightInPixels);
00065   DDV_MinMaxUInt(pDX, m_nHeightInPixels, 1, 2056);
00066   DDX_Text(pDX, IDC_EDIT_WIDTH_IN_PIXELS, m_nWidthInPixels);
00067   DDV_MinMaxUInt(pDX, m_nWidthInPixels, 1, 2056);
00068 }
00069
00070 BOOL CSetPaneSizeView::PreCreateWindow(CREATESTRUCT& cs)
00071 {
00072   // TODO: Modify the Window class or styles here by modifying
00073   //  the CREATESTRUCT cs
00074
00075   return CFormView::PreCreateWindow(cs);
00076 }
00077
00078 void CSetPaneSizeView::OnInitialUpdate()
00079 {
00080   // There is only one view ever, so it only needs to do the initial
00081   // update once--otherwise the application is  resized needlessly.
00082   static BOOL bUpdatedOnce = FALSE;
00083   if (bUpdatedOnce)
00084     return;
00085   bUpdatedOnce = TRUE;
00086
00087   CFormView::OnInitialUpdate();
00088   GetParentFrame()->RecalcLayout();
00089   ResizeParentToFit();
00090
00091 }
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CSetPaneSizeView printing
00095
00096 void CSetPaneSizeView::OnFilePrintPreview()
00097 {
00098   AFXPrintPreview (this);
00099 }
00100
00101 BOOL CSetPaneSizeView::OnPreparePrinting(CPrintInfo* pInfo)
00102 {
00103   // default preparation
00104   return DoPreparePrinting(pInfo);
00105 }
00106
00107 void CSetPaneSizeView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00108 {
00109   // TODO: add extra initialization before printing
00110 }
00111
00112 void CSetPaneSizeView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00113 {
00114   // TODO: add cleanup after printing
00115 }
00116
00117 void CSetPaneSizeView::OnPrint(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00118 {
00119   // TODO: add customized printing code here
00120 }
00121
00122 /////////////////////////////////////////////////////////////////////////////
00123 // CSetPaneSizeView diagnostics
00124
00125 #ifdef _DEBUG
00126 void CSetPaneSizeView::AssertValid() const
00127 {
00128   CFormView::AssertValid();
00129 }
00130
00131 void CSetPaneSizeView::Dump(CDumpContext& dc) const
00132 {
00133   CFormView::Dump(dc);
00134 }
00135
00136 CSetPaneSizeDoc* CSetPaneSizeView::GetDocument() // non-debug version is inline
00137 {
00138   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSetPaneSizeDoc)));
00139   return (CSetPaneSizeDoc*)m_pDocument;
00140 }
00141 #endif //_DEBUG
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CSetPaneSizeView message handlers
00145
00146 void CSetPaneSizeView::OnContextMenu(CWnd*, CPoint point)
00147 {
00148   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00149 }
00150
00151 void CSetPaneSizeView::OnButtonSetDlgBarSize()
00152 {
00153   UpdateData ();
00154   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
00155   if (pMainFrame != NULL)
00156   {
00157     pMainFrame->SetDlgBarSizeInContainer (m_nSizePercent);
00158   }
00159 }
00160
00161 void CSetPaneSizeView::OnButtonSetContainerSize()
00162 {
00163   UpdateData ();
00164   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
00165   if (pMainFrame != NULL)
00166   {
00167     pMainFrame->SetContainerSize (m_nContainerSize);
00168   }
00169 }
00170
00171 void CSetPaneSizeView::OnBtnSetHeightInPixels()
00172 {
00173   UpdateData ();
00174   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
00175   if (pMainFrame != NULL)
00176   {
00177     pMainFrame->SetDlgBarHeightInPixels (m_nHeightInPixels);
00178   }
00179 }
00180
00181 void CSetPaneSizeView::OnBtnSetWidthInPixels()
00182 {
00183   UpdateData ();
00184   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
00185   if (pMainFrame != NULL)
00186   {
00187     pMainFrame->SetDlgBarWidthInPixels (m_nWidthInPixels);
00188   }
00189 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroDoc.h Source File

  • general
  • spiro

spiroDoc.h

Go to the documentation of this file.
00001 // spiroDoc.h : interface of the CSpiroDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_SPIRODOC_H__4417CF8C_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
00015 #define AFX_SPIRODOC_H__4417CF8C_AFA9_11D1_AB61_D9B80632F018__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 class CSpiroDoc;
00022
00023 enum TRACE_COMMAND
00024 {
00025   EMPTY_COMMAND = -1,
00026   SET_PEN_WIDTH,
00027   CHANGE_COLOR,
00028   MOVE_TO,
00029   LINE_TO
00030 };
00031
00032 class CFigCommand
00033 {
00034 public:
00035   TRACE_COMMAND m_type;
00036
00037   union
00038   {
00039     int     m_nPenWidth;
00040     COLORREF  m_co;
00041   };
00042
00043   CPoint  m_point;  // cannot be in the union  because the compiler chokes
00044   CPoint  m_ptWheelPos;  // wheel position for drawing
00045   double  m_dWheelData;  // used to store any information the wheel wants to store
00046   double  m_dAnchorData;  // used to stroe any information the anchor wants to store (angle?)
00047
00048 public:
00049   // constructors and destructors
00050   CFigCommand() : m_point(0, 0) , m_ptWheelPos(0, 0)
00051   {
00052     m_type = EMPTY_COMMAND;
00053     m_dWheelData = 0.0;
00054     m_dAnchorData = 0.0;
00055   }
00056
00057   virtual void Serialize(CArchive& ar);
00058 };
00059
00060 class CFigure  // a complete figure created with an anchor and a wheel
00061 {
00062 public:
00063
00064   CSpiroRect  m_rectBound;  // may be improved to store a region instead
00065   long    m_nTotalTraces;  // number of traces in the figure.
00066   long    m_nTotalDrawn;   // number of traces already drawn
00067
00068   CArray<CFigCommand, CFigCommand&>  m_arrCommands;
00069
00070   long  m_nTracesPerColor;   // how many traces with each color
00071   long  m_nTracesThisColor;  // trace counter for the current color
00072
00073 public:
00074   // constructors and destructors
00075   CFigure();
00076   CFigure(CFigure* pFigure);
00077   ~CFigure();
00078
00079   //operations
00080   void AddCommand(TRACE_COMMAND com, int nWidth);
00081   void AddCommand(TRACE_COMMAND com, COLORREF co);
00082   void AddCommand(TRACE_COMMAND com, CPoint point, CPoint ptWheelPos,
00083                       double dWheelData, double dAnchorData);
00084
00085   void Clean();
00086   void Draw(CDC* pDC, long nZoomNumer, long nZoomDenom
00087                       , CRgn* prgnWheel, CSpiroRect* prectClip) const;
00088
00089   void GetBoundingRect(CRect* lpRect) const;
00090
00091   // MoveFigure returns false if the figure is off the document (deleted)
00092   bool MoveFigure(CPoint ptCorner, CSpiroDoc* pDoc);  // new upper left corner for  the bounding rectangle
00093
00094   void Serialize(CArchive& ar);
00095 };
00096
00097 class CSpiroDoc : public CDocument
00098 {
00099 protected: // create from serialization only
00100   CSpiroDoc();
00101   DECLARE_DYNCREATE(CSpiroDoc)
00102
00103 // Attributes
00104 public:
00105   CSize   m_sizeExtent;   // size of the drawing
00106   CFigure*  m_pFigureCurrent;  // figure being drawn
00107   CPtrArray m_arrPFigures;    // array of figures in the document
00108
00109 // Operations
00110 public:
00111   void  TransferCurrentFigure(); // move current figure to permanent array
00112
00113 // Overrides
00114   // ClassWizard generated virtual function overrides
00115   //{{AFX_VIRTUAL(CSpiroDoc)
00116   public:
00117   virtual BOOL OnNewDocument();
00118   virtual void Serialize(CArchive& ar);
00119   virtual void DeleteContents();
00120   //}}AFX_VIRTUAL
00121
00122 // Implementation
00123 public:
00124   bool m_bThickPen;
00125   virtual ~CSpiroDoc();
00126 #ifdef _DEBUG
00127   virtual void AssertValid() const;
00128   virtual void Dump(CDumpContext& dc) const;
00129 #endif
00130
00131 protected:
00132
00133 // Generated message map functions
00134 protected:
00135   //{{AFX_MSG(CSpiroDoc)
00136     // NOTE - the ClassWizard will add and remove member functions here.
00137     //    DO NOT EDIT what you see in these blocks of generated code !
00138   //}}AFX_MSG
00139   DECLARE_MESSAGE_MAP()
00140 };
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143
00144 //{{AFX_INSERT_LOCATION}}
00145 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00146
00147 #endif // !defined(AFX_SPIRODOC_H__4417CF8C_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenu.h Source File

  • vc2008fp
  • TrayMenu

TrayMenu.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"   // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTrayMenuApp:
00021 // See TrayMenu.cpp for the implementation of this class
00022 //
00023
00024 class CTrayMenuApp : public CWinAppEx
00025 {
00026 public:
00027   CTrayMenuApp();
00028
00029 // Overrides
00030   public:
00031   virtual BOOL InitInstance();
00032
00033 // Implementation
00034   DECLARE_MESSAGE_MAP()
00035 };
00036
00037 extern CTrayMenuApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CExplorerView Member List

This is the complete list of members for CExplorerView, including all inherited members.
CExplorerView() | CExplorerView | [protected]
GetDocument() | CExplorerView | [inline]
m_wndList | CExplorerView |
OnActivateView(BOOL bActivate, CView *pActivateView, CView *pDeactiveView) | CExplorerView | [protected, virtual]
OnChangeFolder(WPARAM, LPARAM) | CExplorerView | [protected]
OnCopyTo() | CExplorerView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CExplorerView | [protected]
OnDraw(CDC *pDC) | CExplorerView | [virtual]
OnEraseBkgnd(CDC *pDC) | CExplorerView | [protected]
OnFolderUp() | CExplorerView | [protected]
OnInitialUpdate() | CExplorerView | [protected, virtual]
OnMoveTo() | CExplorerView | [protected]
OnSetFocus(CWnd *pOldWnd) | CExplorerView | [protected]
OnSize(UINT nType, int cx, int cy) | CExplorerView | [protected]
OnUpdateFolderUp(CCmdUI *pCmdUI) | CExplorerView | [protected]
OnUpdateViewDetails(CCmdUI *pCmdUI) | CExplorerView | [protected]
OnUpdateViewLargeicon(CCmdUI *pCmdUI) | CExplorerView | [protected]
OnUpdateViewList(CCmdUI *pCmdUI) | CExplorerView | [protected]
OnUpdateViewSmallicon(CCmdUI *pCmdUI) | CExplorerView | [protected]
OnViewDetails() | CExplorerView | [protected]
OnViewLargeicon() | CExplorerView | [protected]
OnViewList() | CExplorerView | [protected]
OnViewRefresh() | CExplorerView | [protected]
OnViewSmallicon() | CExplorerView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CExplorerView | [virtual]
~CExplorerView() | CExplorerView | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMFCBindDoc Member List

This is the complete list of members for CMFCBindDoc, including all inherited members.
CMFCBindDoc() | CMFCBindDoc | [protected]
OnCloseDocument() | CMFCBindDoc | [virtual]
OnFilePrint() | CMFCBindDoc | [protected]
OnFilePrintAll() | CMFCBindDoc | [protected]
OnNewDocument() | CMFCBindDoc | [virtual]
OnOleInsertNew() | CMFCBindDoc | [protected]
OnOpenDocument(LPCTSTR lpszPathName) | CMFCBindDoc | [virtual]
OnSectionRemove() | CMFCBindDoc | [protected]
OnUpdateSectionRemove(CCmdUI *pCmdUI) | CMFCBindDoc | [protected]
Serialize(CArchive &ar) | CMFCBindDoc | [virtual]
~CMFCBindDoc() | CMFCBindDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTrackerView Member List

This is the complete list of members for CTrackerView, including all inherited members.
CTrackerView() | CTrackerView | [protected]
GetDocument() | CTrackerView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CTrackerView | [protected, virtual]
OnDraw(CDC *pDC) | CTrackerView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CTrackerView | [protected, virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CTrackerView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CTrackerView | [protected, virtual]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CTrackerView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CTrackerView | [virtual]
OnViewSethandlesize() | CTrackerView | [protected]
OnViewSetminimumsize() | CTrackerView | [protected]
~CTrackerView() | CTrackerView | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWatchBar Member List

This is the complete list of members for CWatchBar, including all inherited members.
CWatchBar() | CWatchBar |
m_Font | CWatchBar | [protected]
m_wndWatch | CWatchBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWatchBar | [protected]
OnPaint() | CWatchBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CWatchBar | [protected]
OnSize(UINT nType, int cx, int cy) | CWatchBar | [protected]
~CWatchBar() | CWatchBar | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/DlgBanner.h Source File

  • vc2008fp
  • MSOffice2007Demo

DlgBanner.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CDlgBanner window
00016
00017 class CDlgBanner : public CStatic
00018 {
00019 // Construction
00020 public:
00021   CDlgBanner();
00022
00023 // Implementation
00024 public:
00025   virtual ~CDlgBanner();
00026
00027 // Generated message map functions
00028 protected:
00029   //{{AFX_MSG(CDlgBanner)
00030   afx_msg void OnPaint();
00031   //}}AFX_MSG
00032
00033   DECLARE_MESSAGE_MAP()
00034 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPane.h Source File

  • vc2008fp
  • RollupPane

RollupPane.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019
00020 // CRollupPaneApp:
00021 // See RollupPane.cpp for the implementation of this class
00022 //
00023
00024 class CRollupPaneApp : public CWinAppEx
00025 {
00026 public:
00027   CRollupPaneApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032 public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038   DECLARE_MESSAGE_MAP()
00039 };
00040
00041 extern CRollupPaneApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CServerView Member List

This is the complete list of members for CServerView, including all inherited members.
CalcActualItemSize(CServerNode *pItem, CDC *pDC) | CServerView |
CalcActualViewSize(CDC *pDC) | CServerView |
CalcScaledItemSize(CServerNode *pItem) | CServerView |
CalcScaledViewSize() | CServerView |
CServerView() | CServerView | [protected]
CServerViewDC class | CServerView | [friend]
DoBranch(CServerNode *pItem, BOOL bHide) | CServerView | [protected]
DoImportText(CArchive &ar) | CServerView |
DoPasteItem(COleDataObject *pDataObject) | CServerView |
DoPasteNative(COleDataObject *pDataObject) | CServerView |
DoPasteText(COleDataObject *pDataObject) | CServerView |
GetDocument() | CServerView | [inline]
InvalidateItem(CServerNode *pItem, CDC *pDC) | CServerView |
InvalidateItem(CServerNode *pItem) | CServerView |
Locate(int cnt, BOOL bScrollUp) | CServerView |
m_dropTarget | CServerView | [protected]
m_pDragNode | CServerView | [protected, static]
m_prevDropEffect | CServerView | [protected]
m_pSelectedNode | CServerView | [protected]
m_ptStart | CServerView | [protected]
m_zoomDenom | CServerView | [protected]
m_zoomNum | CServerView | [protected]
OnAddNode() | CServerView | [protected]
OnChangeName() | CServerView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CServerView | [protected]
OnDragEnter(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CServerView | [protected, virtual]
OnDragLeave() | CServerView | [protected, virtual]
OnDragOver(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CServerView | [protected, virtual]
OnDraw(CDC *pDC) | CServerView | [virtual]
OnDrop(COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point) | CServerView | [protected, virtual]
OnEditClear() | CServerView | [protected]
OnEditCopy() | CServerView | [protected]
OnEditCut() | CServerView | [protected]
OnEditPaste() | CServerView | [protected]
OnImportText() | CServerView | [protected]
OnInitialUpdate() | CServerView | [virtual]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CServerView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CServerView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CServerView | [protected]
OnPrepareDC(CDC *pDC, CPrintInfo *pInfo=NULL) | CServerView | [virtual]
OnRButtonDown(UINT nFlags, CPoint point) | CServerView | [protected]
OnSize(UINT nType, int cx, int cy) | CServerView | [protected]
OnTreeCollapsebranch() | CServerView | [protected]
OnTreeExpandall() | CServerView | [protected]
OnTreeExpandbranch() | CServerView | [protected]
OnTreeExpandonelevel() | CServerView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CServerView | [virtual]
OnUpdateEditPaste(CCmdUI *pCmdUI) | CServerView | [protected]
OnUpdateHasSel(CCmdUI *pCmdUI) | CServerView | [protected]
OnUpdateTreeCollapsebranch(CCmdUI *pCmdUI) | CServerView | [protected]
OnUpdateTreeExpandall(CCmdUI *pCmdUI) | CServerView | [protected]
OnUpdateTreeExpandbranch(CCmdUI *pCmdUI) | CServerView | [protected]
OnUpdateTreeExpandonelevel(CCmdUI *pCmdUI) | CServerView | [protected]
OnUpdateZoom(CCmdUI *pCmdUI) | CServerView | [protected]
OnViewZoomCustom() | CServerView | [protected]
OnZoom(UINT nID) | CServerView | [protected]
ScrollToItem(CServerNode *pItem, BOOL bScrollUp) | CServerView |
SelectAtPoint(CPoint point, CPoint &pointHit) | CServerView | [protected]
SetScrollInfo() | CServerView |
SetSelection(CServerNode *pNewSel, CDC *pDC) | CServerView |
SetSelection(CServerNode *pNewSel) | CServerView |
SetZoomFactor(CSize zoomNum, CSize zoomDenom) | CServerView |
ToggleSelectedItem() | CServerView |
UpdateServerView() | CServerView |
~CServerView() | CServerView | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/StdAfx.h Source File

  • ole
  • MFCBind

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #if !defined(AFX_STDAFX_H__C3B18224_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
00015 #define AFX_STDAFX_H__C3B18224_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_
00016
00017 #if _MSC_VER > 1000
00018 #pragma once
00019 #endif // _MSC_VER > 1000
00020
00021 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #include <afxole.h>         // MFC OLE classes
00026 #include <afxodlgs.h>       // MFC OLE dialog classes
00027 #include <afxcmn.h>         // MFC support for Windows Common Controls
00028 #include <afxcview.h>       // MFC common-control views
00029
00030 #include <afxpriv.h>        // USES_CONVERSION macros
00031
00032 //{{AFX_INSERT_LOCATION}}
00033 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00034
00035 #endif // !defined(AFX_STDAFX_H__C3B18224_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/stdafx.h Source File

  • general
  • dlgtempl

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00016
00017 #include <afxwin.h>         // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions
00019 #ifndef _AFX_NO_AFXCMN_SUPPORT
00020 #include <afxcmn.h>         // MFC support for Windows 95 Common Controls
00021 #endif // _AFX_NO_AFXCMN_SUPPORT
00022
00023 #include <winnls.h> // definition of MultiByteToWideChar API
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palctl.h Source File

  • controls
  • pal

palctl.h

Go to the documentation of this file.
00001 // palctl.h : Declaration of the CPalCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // Error codes
00014
00015 #define PAL_E_CANTRESIZEPALETTE CUSTOM_CTL_SCODE(32002) // Can't resize palette
00016
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CPalCtrl : See palctl.cpp for implementation.
00020
00021 class CPalCtrl : public COleControl
00022 {
00023   DECLARE_DYNCREATE(CPalCtrl)
00024
00025 // Constructor
00026 public:
00027   CPalCtrl();
00028
00029 // Overrides
00030
00031   // Drawing function
00032   virtual void OnDraw(
00033         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00034
00035   // Persistence
00036   virtual void DoPropExchange(CPropExchange* pPX);
00037
00038   // Reset control state
00039   virtual void OnResetState();
00040
00041   // Serialization
00042   virtual void Serialize(CArchive& ar);
00043
00044   BOOL OnMapPropertyToPage(DISPID dispid, LPCLSID lpclsid, BOOL* pbPageOptional);
00045
00046 // Implementation
00047 protected:
00048   ~CPalCtrl();
00049
00050   DECLARE_OLECREATE_EX(CPalCtrl)  // Class factory and guid
00051   DECLARE_OLETYPELIB(CPalCtrl)        // GetTypeInfo
00052   DECLARE_PROPPAGEIDS(CPalCtrl)       // Property page IDs
00053   DECLARE_OLECTLTYPE(CPalCtrl)        // Type name and misc status
00054
00055 // Message maps
00056   //{{AFX_MSG(CPalCtrl)
00057   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00058   //}}AFX_MSG
00059   DECLARE_MESSAGE_MAP()
00060
00061 // Dispatch maps
00062   //{{AFX_DISPATCH(CPalCtrl)
00063   afx_msg short GetLength();
00064   afx_msg void SetLength(short nNewValue);
00065   afx_msg LPPICTUREDISP GetPicture();
00066   afx_msg void SetPicture(LPPICTUREDISP newValue);
00067   afx_msg OLE_COLOR GetEntry(short nIndex);
00068   afx_msg void SetEntry(short nIndex, OLE_COLOR newValue);
00069   //}}AFX_DISPATCH
00070   DECLARE_DISPATCH_MAP()
00071
00072   afx_msg void AboutBox();
00073
00074 // Event maps
00075   //{{AFX_EVENT(CPalCtrl)
00076   //}}AFX_EVENT
00077   DECLARE_EVENT_MAP()
00078
00079 // Dispatch and event IDs
00080 public:
00081   enum {
00082   //{{AFX_DISP_ID(CPalCtrl)
00083   dispidLength = 1L,
00084   dispidHandle = 2L,
00085   dispidPicture = 3L,
00086   dispidEntry = 4L,
00087   //}}AFX_DISP_ID
00088   };
00089
00090 // Data Members
00091   CPalette *m_iPalette;
00092 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/stdafx.h Source File

  • advanced
  • mtgdi

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define VC_EXTRALEAN
00013
00014 #include <afxwin.h>      // MFC core and standard components
00015 #include <afxext.h>         // MFC extensions
00016 #include <afxtempl.h>       // MFC templates
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagRECTOFS Member List

This is the complete list of members for tagRECTOFS, including all inherited members.
dBottom | tagRECTOFS
dLeft | tagRECTOFS
dRight | tagRECTOFS
dTop | tagRECTOFS
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrdoc.cpp Source File

  • controls
  • contain

contrdoc.cpp

Go to the documentation of this file.
00001 // ContrDoc.cpp : implementation of the CContainerDoc class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Contain.h"
00013
00014 #include "ContrDoc.h"
00015 #include "CntrItem.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CContainerDoc
00025
00026 IMPLEMENT_DYNCREATE(CContainerDoc, COleDocument)
00027
00028 BEGIN_MESSAGE_MAP(CContainerDoc, COleDocument)
00029   //{{AFX_MSG_MAP(CContainerDoc)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033   // Enable default OLE container implementation
00034   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, COleDocument::OnUpdatePasteMenu)
00035   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE_LINK, COleDocument::OnUpdatePasteLinkMenu)
00036   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_CONVERT, COleDocument::OnUpdateObjectVerbMenu)
00037   ON_COMMAND(ID_OLE_EDIT_CONVERT, COleDocument::OnEditConvert)
00038   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, COleDocument::OnUpdateEditLinksMenu)
00039   ON_COMMAND(ID_OLE_EDIT_LINKS, COleDocument::OnEditLinks)
00040   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, COleDocument::OnUpdateObjectVerbMenu)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CContainerDoc construction/destruction
00045
00046 CContainerDoc::CContainerDoc()
00047 {
00048   // Use OLE compound files
00049   EnableCompoundFile();
00050
00051   // TODO: add one-time construction code here
00052
00053 }
00054
00055 CContainerDoc::~CContainerDoc()
00056 {
00057 }
00058
00059 BOOL CContainerDoc::OnNewDocument()
00060 {
00061   if (!COleDocument::OnNewDocument())
00062     return FALSE;
00063
00064   // TODO: add reinitialization code here
00065   // (SDI documents will reuse this document)
00066
00067   return TRUE;
00068 }
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CContainerDoc serialization
00072
00073 void CContainerDoc::Serialize(CArchive& ar)
00074 {
00075   if (ar.IsStoring())
00076   {
00077     // TODO: add storing code here
00078   }
00079   else
00080   {
00081     // TODO: add loading code here
00082   }
00083
00084   // Calling the base class COleDocument enables serialization
00085   //  of the container document's COleClientItem objects.
00086   COleDocument::Serialize(ar);
00087 }
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CContainerDoc diagnostics
00091
00092 #ifdef _DEBUG
00093 void CContainerDoc::AssertValid() const
00094 {
00095   COleDocument::AssertValid();
00096 }
00097
00098 void CContainerDoc::Dump(CDumpContext& dc) const
00099 {
00100   COleDocument::Dump(dc);
00101 }
00102 #endif //_DEBUG
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CContainerDoc commands
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/obj_vw.cpp Source File

  • ole
  • oleview

obj_vw.cpp

Go to the documentation of this file.
00001 // obj_vw.cpp
00002 //
00003 // Implementation of the CObjTreeView class
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #include "stdafx.h"
00016 #include "OleView.h"
00017 #include "shadow.h"
00018 #include "obj_vw.h"
00019 #include <winnls.h>
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CObjectData
00028
00029 IMPLEMENT_DYNCREATE(CObjectData, CObject)
00030
00031 CObjectData::CObjectData()
00032 {
00033   m_nType = typeUnknown ;
00034   m_pcf = NULL ;
00035   m_punk = NULL ;
00036   m_uiBitmap = NULL ;
00037
00038 }
00039
00040 CObjectData::~CObjectData()
00041 {
00042 }
00043
00044 BOOL CObjectData::Release()
00045 {
00046   if (m_pcf)
00047     m_pcf->Release() ;
00048
00049   if (m_punk)
00050     m_punk->Release() ;
00051
00052   m_pcf = NULL ;
00053   m_punk = NULL ;
00054
00055   CoFreeUnusedLibraries();
00056
00057   return TRUE ;
00058 }
00059
00060 HRESULT CObjectData::CreateInstance( DWORD clsctx )
00061 {
00062   Release() ;
00063
00064   HRESULT hr = NOERROR ;
00065   CString strError ;
00066   IUnknown* punk = NULL ;
00067   TRY
00068   {
00069     hr = CoGetClassObject( m_clsid, clsctx, NULL, IID_IUnknown, (void**)&punk ) ;
00070     if (FAILED(hr))
00071     {
00072       strError = "CoGetClassObject failed." ;
00073       AfxThrowOleException(hr) ;
00074     }
00075     ENSURE(punk) ;
00076
00077     hr = punk->QueryInterface( IID_IClassFactory, (void**)&m_pcf ) ;
00078     if (FAILED(hr))
00079     {
00080       strError = "QueryInterface on class factory for IClassFactory failed." ;
00081       AfxThrowOleException(hr) ;
00082     }
00083     ASSERT(m_pcf) ;
00084
00085     punk->Release() ;
00086     punk = NULL ;
00087
00088     hr = m_pcf->CreateInstance( NULL, IID_IUnknown, (void**)&m_punk ) ;
00089     if (FAILED(hr))
00090     {
00091       strError = "IClassFactory::CreateInstance failed." ;
00092       AfxThrowOleException(hr) ;
00093     }
00094
00095     m_pcf->Release() ;
00096     m_pcf = NULL ;
00097   }
00098   CATCH(COleException, pException)
00099   {
00100     if (punk)
00101       punk->Release() ;
00102     Release() ;
00103
00104     ErrorMessage( strError, hr ) ;
00105   }
00106   END_CATCH ;
00107
00108   return hr ;
00109 }
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CObjTreeView
00113
00114 IMPLEMENT_DYNCREATE(CObjTreeView, CTreeView)
00115
00116 BEGIN_MESSAGE_MAP(CObjTreeView, CTreeView)
00117   //{{AFX_MSG_MAP(CObjTreeView)
00118   ON_WM_CREATE()
00119   ON_WM_DESTROY()
00120   ON_WM_LBUTTONDBLCLK()
00121   ON_COMMAND(ID_OBJECT_DELETE, OnObjectDelete)
00122   ON_COMMAND(ID_OBJECT_VERIFY, OnObjectVerify)
00123   //}}AFX_MSG_MAP
00124   ON_NOTIFY_REFLECT(TVN_SELCHANGED,OnTreeSelchanged)
00125   ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnTreeItemExpanding)
00126   ON_NOTIFY_REFLECT(TVN_ITEMEXPANDED,OnTreeItemExpanded)
00127   ON_NOTIFY_REFLECT(TVN_DELETEITEM,OnTreeDeleteItem)
00128   ON_MESSAGE( WM_COMMANDHELP, OnCommandHelp)
00129   ON_NOTIFY_REFLECT(NM_RETURN, OnTreeReturn)
00130 END_MESSAGE_MAP()
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CObjTreeView construction/destruction
00134
00135 CObjTreeView::CObjTreeView()
00136 {
00137   m_hObjects = NULL ;
00138   m_hTypeLibs= NULL ;
00139   m_hInterfaces = NULL ;
00140
00141   m_hInsertable = NULL ;
00142   m_hControls= NULL ;
00143   m_hInternal= NULL ;
00144 #ifdef SHOW_CONTAINERS
00145   m_hContainers= NULL ;
00146 #endif
00147   m_hOLE1= NULL ;
00148   m_hUnclassified= NULL ;
00149 }
00150
00151 CObjTreeView::~CObjTreeView()
00152 {
00153 }
00154
00155 LRESULT CObjTreeView::OnCommandHelp(WPARAM, LPARAM lParam)
00156 {
00157   theApp.WinHelp( lParam, HELP_CONTEXT ) ;
00158   return TRUE ;
00159 }
00160
00161 BOOL CObjTreeView::PreCreateWindow(CREATESTRUCT& cs)
00162 {
00163   if (!CTreeView::PreCreateWindow(cs))
00164     return FALSE;
00165
00166   cs.style = WS_CHILD | WS_VISIBLE | WS_BORDER | TVS_LINESATROOT |
00167     TVS_HASLINES | TVS_HASBUTTONS | TVS_DISABLEDRAGDROP;
00168   return TRUE;
00169 }
00170
00171
00172 int CObjTreeView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00173 {
00174   if (CTreeView::OnCreate(lpCreateStruct) == -1)
00175     return -1;
00176 #ifdef _MARCOC_OLD
00177   RECT rect ;
00178   rect.top = lpCreateStruct->y ;
00179   rect.left = lpCreateStruct->x ;
00180   rect.bottom = lpCreateStruct->cy ;
00181   rect.right = lpCreateStruct->cx ;
00182
00183   if (!GetTreeCtrl().Create( WS_CHILD | WS_VISIBLE |
00184                 WS_BORDER |
00185                 TVS_LINESATROOT |
00186                 TVS_HASLINES |
00187 //                                TVS_SHOWSELALWAYS |
00188                 TVS_HASBUTTONS |
00189                 TVS_DISABLEDRAGDROP,
00190                 rect, this, ID_TREEVIEW ))
00191   {
00192     TRACE( _T("Tree control failed to create!") ) ;
00193     return -1 ;
00194   }
00195 #endif
00196   return 0;
00197 }
00198
00199 void CObjTreeView::OnInitialUpdate()
00200 {
00201   GetTreeCtrl().SetImageList( &theApp.m_images, TVSIL_NORMAL ) ;
00202
00203   TV_INSERTSTRUCT tvis ;
00204   tvis.hParent = TVI_ROOT ;
00205   tvis.hInsertAfter = TVI_LAST ;
00206   tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
00207   tvis.item.lParam = 0 ;
00208   tvis.item.cChildren = 1 ;
00209
00210   tvis.item.pszText = "Objects" ;
00211   tvis.item.iImage = BMINDEX(IDB_OBJECTFOLDER) ;
00212   tvis.item.iSelectedImage = BMINDEX(IDB_OBJECTFOLDER) ;
00213   m_hObjects = GetTreeCtrl().InsertItem( &tvis ) ;
00214
00215   tvis.hParent = m_hObjects ;
00216   tvis.item.pszText = "OLE Document Objects" ;
00217   tvis.item.iImage = BMINDEX(IDB_OBJECT_INSERTABLE) ;
00218   tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT_INSERTABLE) ;
00219   m_hInsertable = GetTreeCtrl().InsertItem( &tvis ) ;
00220
00221   tvis.item.pszText = "OLE Controls" ;
00222   tvis.item.iImage = BMINDEX(IDB_OBJECT_CONTROL) ;
00223   tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT_CONTROL) ;
00224   m_hControls = GetTreeCtrl().InsertItem( &tvis ) ;
00225
00226   tvis.item.pszText = "Unclassified Objects" ;
00227   tvis.item.iImage = BMINDEX(IDB_OBJECT) ;
00228   tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT) ;
00229   m_hUnclassified = GetTreeCtrl().InsertItem( &tvis ) ;
00230
00231 #ifdef SHOW_CONTAINERS
00232   tvis.item.pszText = "Containers" ;
00233   tvis.item.iImage = BMINDEX(IDB_CONTAINER) ;
00234   tvis.item.iSelectedImage = BMINDEX(IDB_CONTAINER) ;
00235   m_hContainers = GetTreeCtrl().InsertItem( &tvis ) ;
00236 #endif
00237
00238   tvis.item.pszText = "OLE 1.0 Objects" ;
00239   tvis.item.iImage = BMINDEX(IDB_OBJECT_INSERTABLE10) ;
00240   tvis.item.iSelectedImage = BMINDEX(IDB_OBJECT_INSERTABLE10) ;
00241   m_hOLE1 = GetTreeCtrl().InsertItem( &tvis ) ;
00242
00243   tvis.item.pszText = "Internal OLE Objects" ;
00244   tvis.item.iImage = BMINDEX(IDB_QUESTION) ;
00245   tvis.item.iSelectedImage = BMINDEX(IDB_QUESTION) ;
00246   m_hInternal = GetTreeCtrl().InsertItem( &tvis ) ;
00247
00248   GetTreeCtrl().Expand( m_hObjects, TVE_EXPAND ) ;
00249
00250   tvis.hParent = TVI_ROOT ;
00251   tvis.item.pszText = "Type Libraries" ;
00252   tvis.item.iImage = BMINDEX(IDB_TYPELIBFOLDER) ;
00253   tvis.item.iSelectedImage = BMINDEX(IDB_TYPELIBFOLDER) ;
00254   m_hTypeLibs = GetTreeCtrl().InsertItem( &tvis ) ;
00255
00256   tvis.item.pszText = "Interfaces" ;
00257   tvis.item.iImage = BMINDEX(IDB_IFACEFOLDER) ;
00258   tvis.item.iSelectedImage = BMINDEX(IDB_IFACEFOLDER) ;
00259   m_hInterfaces = GetTreeCtrl().InsertItem( &tvis ) ;
00260 }
00261
00262 void CObjTreeView::OnDestroy()
00263 {
00264   DeleteTreeContents() ;
00265   CTreeView::OnDestroy();
00266 }
00267
00268
00269 void CObjTreeView::OnLButtonDblClk(UINT nFlags, CPoint point)
00270 {
00271   UINT hitflags ;
00272   HTREEITEM hitem ;
00273
00274   hitem = GetTreeCtrl().HitTest( point, &hitflags ) ;
00275   if (hitflags & (TVHT_ONITEM | TVHT_ONITEMBUTTON))
00276   {
00277     NM_TREEVIEW nm ;
00278     nm.itemNew.mask = TVIF_PARAM  ;
00279     nm.itemNew.hItem = hitem ;
00280     if (GetTreeCtrl().GetItem( &nm.itemNew ))
00281     {
00282       CObjectData* pObjectData = (CObjectData*)nm.itemNew.lParam;
00283       CallInterfaceViewer(pObjectData, nm.itemNew.hItem);
00284     }
00285   }
00286   CTreeView::OnLButtonDblClk(nFlags, point);
00287 }
00288
00289
00290 /////////////////////////////////////////////////////////////////////////////
00291 // CObjTreeView drawing
00292
00293 BOOL HasServer32( HKEY hkCLSID )
00294 {
00295   HKEY hkTemp ;
00296   if ((RegOpenKey( hkCLSID, _T("InprocServer32"), &hkTemp ) == ERROR_SUCCESS) ||
00297     (RegOpenKey( hkCLSID, _T("InprocHandler32"), &hkTemp ) == ERROR_SUCCESS) ||
00298     (RegOpenKey( hkCLSID, _T("LocalServer32"), &hkTemp ) == ERROR_SUCCESS))
00299   {
00300     RegCloseKey( hkTemp ) ;
00301     return TRUE ;
00302   }
00303
00304   return FALSE ;
00305 }
00306
00307 BOOL HasServer16( HKEY hkCLSID )
00308 {
00309   HKEY hkTemp ;
00310   if ((RegOpenKey( hkCLSID, _T("InprocServer"), &hkTemp ) == ERROR_SUCCESS) ||
00311     (RegOpenKey( hkCLSID, _T("InprocHandler"), &hkTemp ) == ERROR_SUCCESS) ||
00312     (RegOpenKey( hkCLSID, _T("LocalServer"), &hkTemp ) == ERROR_SUCCESS))
00313   {
00314     RegCloseKey( hkTemp ) ;
00315     return TRUE ;
00316   }
00317
00318   return FALSE ;
00319 }
00320
00321 void CObjTreeView::DeleteTreeItems( HTREEITEM htree )
00322 {
00323   HTREEITEM       hItem, hItemNext ;
00324
00325   hItem = GetTreeCtrl().GetChildItem( htree ) ;
00326   while( hItem )
00327   {
00328     hItemNext = GetTreeCtrl().GetNextSiblingItem( hItem ) ;
00329     GetTreeCtrl().DeleteItem( hItem ) ;
00330     hItem = hItemNext ;
00331   }
00332 }
00333
00334 void CObjTreeView::DeleteTreeContents()
00335 {
00336   // Delete current contents
00337   //
00338   if ((int)GetTreeCtrl().GetCount() > 0)
00339   {
00340     DeleteTreeItems( m_hInsertable ) ;
00341     DeleteTreeItems( m_hControls ) ;
00342     DeleteTreeItems( m_hInternal ) ;
00343 #ifdef SHOW_CONTAINERS
00344     DeleteTreeItems( m_hContainers ) ;
00345 #endif
00346     DeleteTreeItems( m_hOLE1 ) ;
00347     DeleteTreeItems( m_hUnclassified ) ;
00348
00349     DeleteTreeItems( m_hTypeLibs ) ;
00350     DeleteTreeItems( m_hInterfaces ) ;
00351   }
00352 }
00353
00354 void CObjTreeView::OnDraw( CDC* /*pdc */ )
00355 {
00356 }
00357
00358 void CObjTreeView::OnUpdate( CView* pSender, LPARAM lHint, CObject* pHint )
00359 {
00360   pSender; pHint ;
00361   if (lHint & UPD_NOOBJECTVIEW)
00362     return ;
00363
00364   BeginWaitCursor() ;
00365   GetTreeCtrl().SetRedraw( FALSE ) ;
00366   GetTreeCtrl().SelectItem( NULL ) ;
00367
00368   if ((int)GetTreeCtrl().GetCount() > 0)
00369   {
00370     BOOL fExpanded = FALSE ;
00371     TV_ITEM tvi ;
00372     tvi.mask = TVIF_STATE ;
00373
00374     tvi.hItem = m_hInsertable ;
00375     if (GetTreeCtrl().GetItem( &tvi ))
00376     {
00377       fExpanded = (tvi.state & TVIS_EXPANDED) ;
00378       GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
00379       DeleteTreeItems( tvi.hItem ) ;
00380       tvi.state &= ~TVIS_EXPANDEDONCE ;
00381       GetTreeCtrl().SetItem( &tvi ) ;
00382       if (fExpanded)
00383         GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
00384     }
00385
00386     tvi.hItem = m_hControls ;
00387     if (GetTreeCtrl().GetItem( &tvi ))
00388     {
00389       fExpanded = (tvi.state & TVIS_EXPANDED) ;
00390       GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
00391       DeleteTreeItems( tvi.hItem ) ;
00392       tvi.state &= ~TVIS_EXPANDEDONCE ;
00393       GetTreeCtrl().SetItem( &tvi ) ;
00394       if (fExpanded)
00395         GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
00396     }
00397
00398     tvi.hItem = m_hInternal ;
00399     if (GetTreeCtrl().GetItem( &tvi ))
00400     {
00401       fExpanded = (tvi.state & TVIS_EXPANDED) ;
00402       GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
00403       DeleteTreeItems( tvi.hItem ) ;
00404       tvi.state &= ~TVIS_EXPANDEDONCE ;
00405       GetTreeCtrl().SetItem( &tvi ) ;
00406       if (fExpanded)
00407         GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
00408     }
00409
00410     tvi.hItem = m_hOLE1 ;
00411     if (GetTreeCtrl().GetItem( &tvi ))
00412     {
00413       fExpanded = (tvi.state & TVIS_EXPANDED) ;
00414       GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
00415       DeleteTreeItems( tvi.hItem ) ;
00416       tvi.state &= ~TVIS_EXPANDEDONCE ;
00417       GetTreeCtrl().SetItem( &tvi ) ;
00418       if (fExpanded)
00419         GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
00420     }
00421
00422     tvi.hItem = m_hUnclassified ;
00423     if (GetTreeCtrl().GetItem( &tvi ))
00424     {
00425       fExpanded = (tvi.state & TVIS_EXPANDED) ;
00426       GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
00427       DeleteTreeItems( tvi.hItem ) ;
00428       tvi.state &= ~TVIS_EXPANDEDONCE ;
00429       GetTreeCtrl().SetItem( &tvi ) ;
00430       if (fExpanded)
00431         GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
00432     }
00433
00434     tvi.hItem = m_hTypeLibs ;
00435     if (GetTreeCtrl().GetItem( &tvi ))
00436     {
00437       fExpanded = (tvi.state & TVIS_EXPANDED) ;
00438       GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
00439       DeleteTreeItems( tvi.hItem ) ;
00440       tvi.state &= ~TVIS_EXPANDEDONCE ;
00441       GetTreeCtrl().SetItem( &tvi ) ;
00442       if (fExpanded)
00443         GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
00444     }
00445
00446     tvi.hItem = m_hInterfaces ;
00447     if (GetTreeCtrl().GetItem( &tvi ))
00448     {
00449       fExpanded = (tvi.state & TVIS_EXPANDED) ;
00450       GetTreeCtrl().Expand( tvi.hItem, TVE_COLLAPSE ) ;
00451       DeleteTreeItems( tvi.hItem ) ;
00452       tvi.state &= ~TVIS_EXPANDEDONCE ;
00453       GetTreeCtrl().SetItem( &tvi ) ;
00454       if (fExpanded)
00455         GetTreeCtrl().Expand( tvi.hItem, TVE_EXPAND ) ;
00456     }
00457   }
00458
00459   GetTreeCtrl().SetRedraw( TRUE ) ;
00460   EndWaitCursor() ;
00461 }
00462
00463
00464 /////////////////////////////////////////////////////////////////////////////
00465 // CObjTreeView diagnostics
00466
00467 #ifdef _DEBUG
00468 void CObjTreeView::AssertValid() const
00469 {
00470   CTreeView::AssertValid();
00471 }
00472
00473 void CObjTreeView::Dump(CDumpContext& dc) const
00474 {
00475   CTreeView::Dump(dc);
00476 }
00477
00478 #endif //_DEBUG
00479
00480 /////////////////////////////////////////////////////////////////////////////
00481 // CObjTreeView message handlers
00482
00483 void CObjTreeView::OnTreeSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
00484 {
00485   COle2ViewDoc*   pDoc = GetDocument() ;
00486   NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
00487   CObjectData*    lpOD ;
00488
00489   lpOD = (CObjectData*)pnmtv->itemNew.lParam ;
00490
00491   // special case typelibs because there may be multiple entries (versions)
00492   // for a given TYPELIBID
00493   //
00494   if (lpOD && (!IsEqualCLSID( lpOD->m_clsid, pDoc->m_clsidCur ) || pDoc->m_fTypeLib))
00495   {
00496     pDoc->m_fTypeLib = (lpOD->m_uiBitmap == BMINDEX(IDB_AUTOMATION)) ;
00497     pDoc->m_fInterface = (lpOD->m_uiBitmap == BMINDEX(IDB_INTERFACE)) ;
00498     pDoc->m_clsidCur = lpOD->m_clsid ;
00499
00500     TV_ITEM tvi ;
00501     tvi.hItem = pnmtv->itemNew.hItem ;
00502     tvi.mask = TVIF_TEXT ;
00503     tvi.cchTextMax = 256 ;
00504     tvi.pszText = new TCHAR[256] ;
00505     if (GetTreeCtrl().GetItem( &tvi ))
00506     {
00507       pDoc->m_szObjectCur = tvi.pszText ;
00508     }
00509     else
00510       pDoc->m_szObjectCur = "ERROR" ;
00511     delete tvi.pszText ;
00512   }
00513   else
00514   {
00515     pDoc->m_fTypeLib = FALSE ;
00516     pDoc->m_fInterface = FALSE ;
00517     pDoc->m_clsidCur =  GUID_NULL;
00518     pDoc->m_szObjectCur = "" ;
00519   }
00520   pDoc->UpdateAllViews( this, UPD_NOOBJECTVIEW ) ;
00521   *pResult = 0;
00522 }
00523
00524 void CObjTreeView::OnTreeItemExpanding(NMHDR* pNMHDR, LRESULT* pResult)
00525 {
00526   *pResult = 0;
00527   NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
00528   if (pnmtv->action == TVE_EXPAND && pnmtv->itemNew.hItem != m_hObjects)
00529   {
00530     if (pnmtv->itemNew.state & TVIS_EXPANDEDONCE)
00531       return ;
00532
00533     BeginWaitCursor() ;
00534     GetTreeCtrl().SetRedraw( FALSE ) ;
00535
00536     if (pnmtv->itemNew.hItem == m_hInterfaces)
00537       ExpandInterfaces( pnmtv ) ;
00538     else if (pnmtv->itemNew.hItem == m_hTypeLibs)
00539       ExpandTypeLibs( pnmtv ) ;
00540     else if (pnmtv->itemNew.lParam != NULL)
00541       ExpandObject( pnmtv ) ;
00542     else
00543       ExpandClassification( pnmtv ) ;
00544
00545     GetTreeCtrl().SetRedraw( TRUE ) ;
00546     EndWaitCursor() ;
00547   }
00548 }
00549
00550 void CObjTreeView::ExpandClassification( NM_TREEVIEW* pnmtv )
00551 {
00552   HKEY    hkCLSID ;
00553
00554   if (RegOpenKey( HKEY_CLASSES_ROOT, _T("CLSID"), &hkCLSID) == ERROR_SUCCESS)
00555   {
00556     CObjectData* lpOD ;
00557     LONG     cb ;
00558     TCHAR    szBuf[_MAX_PATH + 1] ;
00559     TCHAR    szName[64] ;
00560     TCHAR    szCLSID[64] ;
00561     DWORD   dwIndex ;
00562
00563     for ( dwIndex = 0 ;
00564         RegEnumKey( hkCLSID, dwIndex, szCLSID, sizeof(szCLSID)) == ERROR_SUCCESS ;
00565         ++dwIndex )
00566     {
00567       lpOD = NULL ;
00568       cb = sizeof(szName);
00569       if (RegQueryValue( hkCLSID, (LPTSTR)szCLSID, szName, &cb) == ERROR_SUCCESS)
00570       {
00571         lpOD = new CObjectData ;
00572         lpOD->m_nType = CObjectData::typeObject ;
00573         ASSERT(lpOD) ;
00574         ::CLSIDFromString( CT2OLE(szCLSID), &lpOD->m_clsid);
00575         lpOD->m_szProgID[0] = '\0' ;
00576
00577         // Assume it's an object
00578         lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT) ;
00579
00580
00581         // Now find out more about it.
00582         //
00583         // #1 Look in CLSID\{clsid} for the \Control key
00584         // #2 Assume it is an 'non-embeddable' OLE 2.0 object
00585         // #3 If <progid>\NotInsertable exists we're done
00586         // #4 if !#2 then if <progid>\Insertable it's an insertable OLE 2.0 object
00587         //    and we're done
00588         // #5 if !#3 see if it's an OLE 1.0 object by checking Ole1Class
00589         //
00590         HKEY    hkClass, hkTemp ;
00591
00592         if (RegOpenKey( hkCLSID, szCLSID, &hkClass ) == ERROR_SUCCESS)
00593         {
00594           BOOL    fHasServer32 = HasServer32( hkClass ) ;
00595
00596           if (fHasServer32)
00597             lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT32) ;
00598           else
00599             lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT) ;
00600
00601           // First determine if it is a system component
00602           //
00603           cb = sizeof(szBuf) ;
00604           LONG cb2 = sizeof(szBuf) ;
00605           if (RegQueryValue( hkClass, (LPTSTR)_T("InprocServer32"), szBuf, &cb ) == ERROR_SUCCESS)
00606           {
00607              // RegQueryValue may not return a null terminated string.
00608              szBuf[_MAX_PATH] = '\0';
00609              if ((0 == _stricmp( szBuf, _T("ole32.dll") )) ||
00610               (0 == _stricmp( szBuf, _T("oleprx32.dll") )) ||
00611               (0 == _stricmp( szBuf, _T("ole2pr32.dll") )) ||
00612               (0 == _stricmp( szBuf, _T("olecnv32.dll") )) ||
00613               (0 == _stricmp( szBuf, _T("oleaut32.dll") )))
00614             {
00615               lpOD->m_uiBitmap = BMINDEX(IDB_QUESTION32) ;
00616             }
00617           } // Query InprocServer
00618           else if (RegQueryValue( hkClass, (LPTSTR)_T("InprocServer"), szBuf, &cb2 ) == ERROR_SUCCESS)
00619           {
00620             if ((0 == _stricmp( szBuf, _T("ole2prox.dll") )) ||
00621               (0 == _stricmp( szBuf, _T("ole2.dll") )) ||
00622               (0 == _stricmp( szBuf, _T("ole2disp.dll") )))
00623             {
00624               lpOD->m_uiBitmap = BMINDEX(IDB_QUESTION) ;
00625             }
00626           }
00627
00628           // If it has "Ole1Class" then it's an OLE 1.0 object
00629           //
00630           _stprintf_s( szBuf, _MAX_PATH, _T("CLSID\\%s\\Ole1Class"), (LPTSTR)szCLSID) ;
00631           if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkTemp ) == ERROR_SUCCESS)
00632           {
00633             // Is it 32 bit or 16 bit?
00634             if (fHasServer32)
00635               lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE1032) ;   // that succeeded.  This means we're insertable
00636             else
00637               lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE10) ;   // that succeeded.  This means we're insertable
00638             RegCloseKey( hkTemp ) ;
00639             goto lblInsertInList ;
00640           }
00641                     // We now recognize the "Control" key which indicates it's
00642           // an OLE Custom Control.
00643           //
00644           _stprintf_s( szBuf, _MAX_PATH, _T("CLSID\\%s\\Control"), (LPTSTR)szCLSID) ;
00645           if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkTemp ) == ERROR_SUCCESS)
00646           {
00647             // Is it 32 bit or 16 bit?
00648             if (fHasServer32)
00649               lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_CONTROL32) ;
00650             else
00651               lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_CONTROL) ;
00652             RegCloseKey( hkTemp ) ;
00653             goto lblInsertInList ;
00654           }
00655
00656           // If it's not a control, but it's insertable it must be a CD object
00657           //
00658           _stprintf_s( szBuf, _MAX_PATH, _T("CLSID\\%s\\Insertable"), (LPTSTR)szCLSID) ;
00659           if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkTemp ) == ERROR_SUCCESS)
00660           {
00661             // Is it 32 bit or 16 bit?
00662             if (fHasServer32)
00663               lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE32) ;   // that succeeded.  This means we're insertable
00664             else
00665               lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE) ;   // that succeeded.  This means we're insertable
00666             RegCloseKey( hkTemp ) ;
00667             goto lblInsertInList ;
00668           }
00669
00670
00671           cb = sizeof(lpOD->m_szProgID) ;
00672           if (RegQueryValue( hkClass, (LPTSTR)_T("ProgID"), lpOD->m_szProgID, &cb) == ERROR_SUCCESS)
00673           {
00674             HKEY    hkInsertable ;
00675
00676             // Is it an OLE 1.0 object?
00677             //
00678             cb = 64 ;
00679             if (RegQueryValue( hkClass, (LPTSTR)"Ole1Class", szBuf, &cb ) == ERROR_SUCCESS)
00680             {
00681               if (fHasServer32)
00682                 lpOD->m_uiBitmap = BMINDEX( IDB_OBJECT_INSERTABLE1032 ) ;
00683               else
00684                 lpOD->m_uiBitmap = BMINDEX( IDB_OBJECT_INSERTABLE10 ) ;
00685               goto lblInsertInList ;
00686             }
00687
00688             // Does the object force "NotInsertable"?
00689             //
00690             _stprintf_s( szBuf, _MAX_PATH, _T("%s\\NotInsertable"), (LPTSTR)lpOD->m_szProgID ) ;
00691             if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkInsertable ) == ERROR_SUCCESS)
00692             {
00693               if (fHasServer32)
00694                 lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT32) ;
00695               else
00696                 lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT) ;
00697
00698               RegCloseKey( hkInsertable ) ;
00699               goto lblInsertInList ;
00700             }
00701
00702             // Is it insertable?
00703             //
00704             _stprintf_s( szBuf, _MAX_PATH, _T("%s\\Insertable"), (LPTSTR)lpOD->m_szProgID ) ;
00705             if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkInsertable ) == ERROR_SUCCESS)
00706             {
00707               if (fHasServer32)
00708                 lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE32) ;   // that succeeded.  This means we're insertable
00709               else
00710                 lpOD->m_uiBitmap = BMINDEX(IDB_OBJECT_INSERTABLE) ;   // that succeeded.  This means we're insertable
00711               RegCloseKey( hkInsertable ) ;
00712               goto lblInsertInList ;
00713             }
00714
00715 #ifdef SHOW_CONTAINERS
00716             // Try HKEY_CLASSES_ROOT\szProgID\shell\open to see if it's
00717             // a container.
00718             //
00719             wsprintf( szBuf, _T("%s\\shell\\open"), (LPTSTR)lpOD->m_szProgID ) ;
00720             if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkInsertable ) == ERROR_SUCCESS)
00721             {
00722               if (fHasServer32)
00723                 lpOD->m_uiBitmap = BMINDEX(IDB_CONTAINER32) ;
00724               else
00725                 lpOD->m_uiBitmap = BMINDEX(IDB_CONTAINER) ;
00726               RegCloseKey( hkInsertable ) ;
00727               goto lblInsertInList ;
00728             }
00729 #endif
00730           }
00731           RegCloseKey( hkClass ) ;
00732
00733         }  // if RegOpenKey( ... &hkClass )
00734
00735 lblInsertInList:
00736         HTREEITEM htree = NULL ;
00737         switch( lpOD->m_uiBitmap )
00738         {
00739           case BMINDEX(IDB_QUESTION):
00740           case BMINDEX(IDB_QUESTION32):
00741             htree = m_hInternal ;
00742           break ;
00743
00744           case BMINDEX(IDB_OBJECT_INSERTABLE10):
00745           case BMINDEX(IDB_OBJECT_INSERTABLE1032):
00746             htree = m_hOLE1 ;
00747           break ;
00748
00749           case BMINDEX(IDB_OBJECT_INSERTABLE):
00750           case BMINDEX(IDB_OBJECT_INSERTABLE32):
00751             htree = m_hInsertable ;
00752           break ;
00753
00754 #ifdef SHOW_CONTAINERS
00755           case BMINDEX(IDB_CONTAINER):
00756           case BMINDEX(IDB_CONTAINER32):
00757             htree = m_hContainers ;
00758           break ;
00759 #endif
00760
00761           case BMINDEX(IDB_OBJECT_CONTROL):
00762           case BMINDEX(IDB_OBJECT_CONTROL32):
00763             htree = m_hControls ;
00764           break ;
00765
00766           case BMINDEX(IDB_OBJECT):
00767           case BMINDEX(IDB_OBJECT32):
00768           default:
00769             htree = m_hUnclassified ;
00770           break ;
00771
00772         }
00773
00774         if (htree && htree == pnmtv->itemNew.hItem)
00775         {
00776           RegOpenKey( hkCLSID, szCLSID, &hkClass ) ;
00777           cb = sizeof(szBuf) ;
00778           if (RegQueryValue( hkClass, (LPTSTR)"ToolboxBitmap32", szBuf, &cb ) == ERROR_SUCCESS ||
00779             RegQueryValue( hkClass, (LPTSTR)"ToolboxBitmap", szBuf, &cb ) == ERROR_SUCCESS)
00780           {
00781             TCHAR * nextTok;
00782             TCHAR * pszBitmapModule = _tcstok_s(szBuf, _T(","), &nextTok);
00783             TCHAR * pszBitmapId = _tcstok_s(NULL, _T(","), &nextTok);
00784             HINSTANCE hinstBitmap;
00785             int nBitmapId;
00786             if ((pszBitmapModule != NULL) && (pszBitmapId != NULL))
00787             {
00788               LPTSTR p ;
00789               if (*pszBitmapModule == '"')
00790               {
00791                 _tcscpy_s( pszBitmapModule, _MAX_PATH - (pszBitmapModule - szBuf), pszBitmapModule+1 ) ;
00792                 p = strrchr( pszBitmapModule, '"' ) ;
00793                 if (p) *p = '\0' ;
00794               }
00795               nBitmapId = _ttoi(pszBitmapId);
00796               hinstBitmap = LoadLibraryEx(pszBitmapModule, NULL, LOAD_LIBRARY_AS_DATAFILE);
00797               if (hinstBitmap && (nBitmapId > 0))
00798               {
00799                 HBITMAP hbmGlyph = ::LoadBitmap(hinstBitmap, MAKEINTRESOURCE(nBitmapId));
00800                 if (hbmGlyph)
00801                 {
00802                   lpOD->m_uiBitmap = theApp.m_images.Add( CBitmap::FromHandle(hbmGlyph), RGBLTGRAY ) ;
00803                   ::DeleteObject(hbmGlyph) ;
00804                 }
00805                 FreeLibrary( hinstBitmap ) ;
00806               }
00807             }
00808           }
00809           RegCloseKey( hkClass ) ;
00810           ASSERT(lpOD) ;
00811
00812           TV_INSERTSTRUCT tvis ;
00813           tvis.hParent = htree ;
00814           tvis.hInsertAfter = TVI_SORT ;
00815           tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE |TVIF_CHILDREN ;
00816           tvis.item.cChildren = 1 ;
00817           tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
00818           tvis.item.pszText = szName ;
00819           tvis.item.iImage = tvis.item.iSelectedImage = lpOD->m_uiBitmap ;
00820           GetTreeCtrl().InsertItem( &tvis ) ;
00821         }
00822         else
00823           delete lpOD ;
00824       }
00825     }
00826     RegCloseKey( hkCLSID ) ;
00827   }
00828 }
00829
00830 void CObjTreeView::ExpandTypeLibs( NM_TREEVIEW* /* pnmtv */ )
00831 {
00832   HKEY    hkTypeLib ;
00833   if (RegOpenKey( HKEY_CLASSES_ROOT, _T("TypeLib"), &hkTypeLib) == ERROR_SUCCESS)
00834   {
00835     LONG    cb ;
00836     TCHAR    szVer[65] ;
00837     TCHAR    szName[64] ;
00838     TCHAR    szGUID[64] ;
00839     TCHAR    szBuf[256] ;
00840     DWORD   dwIndex, dwIndex2 ;
00841     HKEY    hkGUID ;
00842
00843     // Enum \TypeInfo
00844     for ( dwIndex = 0 ;
00845         RegEnumKey( hkTypeLib, dwIndex, szGUID, sizeof(szGUID)) == ERROR_SUCCESS ;
00846         ++dwIndex )
00847     {
00848       // Gotta open \TypeInfo\szGUID
00849       if (RegOpenKey( hkTypeLib, szGUID, &hkGUID ) == ERROR_SUCCESS)
00850       {
00851         // Enum all at this level (major.minor = name)
00852         for (dwIndex2 = 0 ;
00853           RegEnumKey( hkGUID, dwIndex2, szVer, sizeof(szVer)) == ERROR_SUCCESS ;
00854           ++dwIndex2 )
00855         {
00856           cb = sizeof(szName);
00857           if (RegQueryValue( hkGUID, (LPTSTR)szVer, szName, &cb) == ERROR_SUCCESS)
00858           {
00859             // RegQueryValue may not return a null terminated string
00860             szVer[64] = '\0';
00861             _stprintf_s( szBuf, 256, _T("%s (Ver %s)"), (LPTSTR)szName, (LPTSTR)szVer ) ;
00862
00863             CObjectData* lpOD = new CObjectData ;
00864             lpOD->m_nType = CObjectData::typeTypeLib ;
00865             ::CLSIDFromString(CT2OLE(szGUID), &lpOD->m_clsid);
00866             lpOD->m_szProgID[0] = '\0' ;
00867
00868             lpOD->m_uiBitmap = BMINDEX(IDB_AUTOMATION) ;
00869             lpOD->m_wMajorVer = (WORD)atoi( szVer ) ;
00870             PTSTR p = strrchr( szVer, '.' ) ;
00871             if (p)
00872               lpOD->m_wMinorVer = (WORD)atoi( p+1 ) ;
00873             else
00874               lpOD->m_wMinorVer = 0 ;
00875
00876             TV_INSERTSTRUCT tvis ;
00877             tvis.hParent = m_hTypeLibs ;
00878             tvis.hInsertAfter = TVI_SORT ;
00879             tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
00880             tvis.item.iImage = tvis.item.iSelectedImage = lpOD->m_uiBitmap ;
00881             tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
00882             tvis.item.pszText = szBuf ;
00883             GetTreeCtrl().InsertItem( &tvis ) ;
00884           }
00885         }
00886         RegCloseKey( hkGUID ) ;
00887       }
00888     }
00889     RegCloseKey( hkTypeLib ) ;
00890   }
00891 }
00892
00893 void CObjTreeView::ExpandObject( NM_TREEVIEW* pnmtv )
00894 {
00895   COle2ViewDoc*   pDoc = GetDocument() ;
00896   TV_INSERTSTRUCT tvis ;
00897   CObjectData* pod = (CObjectData*)pnmtv->itemNew.lParam ;
00898
00899   if (pod->m_nType == CObjectData::typeObject)
00900   {
00901     HRESULT hr = pod->CreateInstance( pDoc->m_dwClsCtx ) ;
00902     if (FAILED(hr))
00903       return ;
00904
00905     tvis.hParent = pnmtv->itemNew.hItem  ;
00906     tvis.hInsertAfter = TVI_SORT ;
00907     tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
00908     tvis.item.iImage = tvis.item.iSelectedImage = BMINDEX(IDB_INTERFACE) ;
00909
00910     HKEY hk ;
00911     TCHAR szIID[80] ;
00912     IID  iid ;
00913     IUnknown* pfoo = NULL ;
00914     TCHAR szValue[256] ;
00915     if (RegOpenKey( HKEY_CLASSES_ROOT, _T("Interface"), &hk) == ERROR_SUCCESS)
00916     {
00917       for ( DWORD dwIndex = 0 ;
00918           RegEnumKey( hk, dwIndex, szIID, sizeof(szIID)) == ERROR_SUCCESS ;
00919           ++dwIndex )
00920       {
00921         LONG cb = sizeof(szValue);
00922         if (RegQueryValue( hk, (LPTSTR)szIID, szValue, &cb) == ERROR_SUCCESS)
00923         {
00924           ::CLSIDFromString(CT2OLE(szIID), &iid ) ;
00925           if (SUCCEEDED(pod->m_punk->QueryInterface( iid, (void**)&pfoo )))
00926           {
00927             pfoo->Release() ;
00928             pfoo = NULL ;
00929
00930             CObjectData* lpOD = new CObjectData ;
00931             lpOD->m_nType = CObjectData::typeInterface ;
00932             lpOD->m_clsid = iid ;
00933             lpOD->m_szProgID[0] = '\0' ;
00934             lpOD->m_uiBitmap = BMINDEX(IDB_INTERFACE) ;
00935             lpOD->m_wMajorVer =  lpOD->m_wMajorVer  = 0 ;
00936             tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
00937             tvis.item.pszText = szValue ;
00938             GetTreeCtrl().InsertItem( &tvis ) ;
00939           }
00940         }
00941       }
00942       RegCloseKey( hk ) ;
00943     }
00944   }
00945 }
00946
00947 void CObjTreeView::ExpandInterfaces( NM_TREEVIEW* pnmtv )
00948 {
00949   if (pnmtv->itemNew.hItem == m_hInterfaces)
00950   {
00951     TV_INSERTSTRUCT tvis ;
00952     tvis.hParent = pnmtv->itemNew.hItem  ;
00953     tvis.hInsertAfter = TVI_SORT ;
00954     tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
00955     tvis.item.iImage = tvis.item.iSelectedImage = BMINDEX(IDB_INTERFACE) ;
00956
00957     HKEY hk ;
00958     TCHAR szTypeLibID[80] ;
00959     TCHAR szValue[256] ;
00960     if (RegOpenKey( HKEY_CLASSES_ROOT, _T("Interface"), &hk) == ERROR_SUCCESS)
00961     {
00962       for ( DWORD dwIndex = 0 ;
00963           RegEnumKey( hk, dwIndex, szTypeLibID, sizeof(szTypeLibID)) == ERROR_SUCCESS ;
00964           ++dwIndex )
00965       {
00966         LONG cb = sizeof(szValue);
00967         if (RegQueryValue( hk, (LPTSTR)szTypeLibID, szValue, &cb) == ERROR_SUCCESS)
00968         {
00969           CObjectData* lpOD = new CObjectData ;
00970           lpOD->m_nType = CObjectData::typeStaticInterface ;
00971           ::CLSIDFromString(CT2OLE(szTypeLibID), &lpOD->m_clsid );
00972           lpOD->m_szProgID[0] = '\0' ;
00973           lpOD->m_uiBitmap = BMINDEX(IDB_INTERFACE) ;
00974           lpOD->m_wMajorVer =  lpOD->m_wMajorVer  = 0 ;
00975
00976           tvis.item.lParam = (LPARAM)(LPVOID)lpOD ;
00977           tvis.item.pszText = szValue ;
00978           GetTreeCtrl().InsertItem( &tvis ) ;
00979         }
00980       }
00981       RegCloseKey( hk ) ;
00982     }
00983     return ;
00984   }
00985 }
00986
00987 void CObjTreeView::OnTreeItemExpanded(NMHDR* pNMHDR, LRESULT* pResult)
00988 {
00989   *pResult = 0;
00990   NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
00991   if ( pnmtv->itemNew.lParam != NULL &&
00992      pnmtv->action == TVE_COLLAPSE)
00993   {
00994 //        TV_INSERTSTRUCT tvis ;
00995     CObjectData* pod = (CObjectData*)pnmtv->itemNew.lParam ;
00996
00997     switch(pod->m_nType)
00998     {
00999     case CObjectData::typeObject:
01000     {
01001       pod->Release() ;
01002       GetTreeCtrl().Expand( pnmtv->itemNew.hItem, TVE_COLLAPSERESET ) ;
01003     }
01004     break ;
01005     }
01006   }
01007  }
01008
01009 void CObjTreeView::CallInterfaceViewer(CObjectData* pObjectData, HTREEITEM hItem)
01010 {
01011   if (pObjectData != NULL)
01012   {
01013     ASSERT_KINDOF(CObjectData,pObjectData);
01014
01015     switch(pObjectData->m_nType)
01016     {
01017     case CObjectData::typeInterface:
01018     {
01019       CObjectData* podParent = NULL ;
01020       TV_ITEM tviParent ;
01021       tviParent.hItem = GetTreeCtrl().GetParentItem(hItem);
01022       ASSERT(tviParent.hItem) ;
01023       tviParent.mask = TVIF_PARAM ;
01024       GetTreeCtrl().GetItem( &tviParent ) ;
01025       if (tviParent.lParam)
01026       {
01027         podParent = (CObjectData*)tviParent.lParam ;
01028
01029         ASSERT(podParent->m_punk) ;
01030         if (podParent->m_punk)
01031           ViewInterface( theApp.m_pMainWnd->GetSafeHwnd(), pObjectData->m_clsid, podParent->m_punk ) ;
01032       }
01033     }
01034     break ;
01035
01036     case CObjectData::typeTypeLib:
01037     {
01038       ITypeLib* pTypeLib ;
01039       LCID      lcid = GetUserDefaultLCID() ;
01040       HRESULT hr = ::LoadRegTypeLib( pObjectData->m_clsid, pObjectData->m_wMajorVer,
01041                  pObjectData->m_wMinorVer, lcid, &pTypeLib ) ;
01042       if (FAILED(hr))
01043       {
01044         TCHAR szTemp[256] ;
01045         LPOLESTR lpStr;
01046         StringFromCLSID(pObjectData->m_clsid, &lpStr);
01047         _stprintf_s(szTemp, 256, _T("LoadRegTypeLib(%s, %u, %u, %lu, ...) failed."),
01048             (LPSTR)COLE2CT(lpStr), pObjectData->m_wMajorVer, pObjectData->m_wMinorVer,
01049             lcid);
01050         CoTaskMemFree(lpStr);
01051         ErrorMessage( szTemp, hr ) ;
01052       }
01053       else
01054       {
01055         ViewInterface( theApp.m_pMainWnd->GetSafeHwnd(), IID_ITypeLib, pTypeLib ) ;
01056         #ifdef _DEBUG
01057         ASSERT( 0 == pTypeLib->Release() ) ;
01058         #else
01059         pTypeLib->Release() ;
01060         #endif
01061       }
01062     }
01063     break ;
01064     }
01065   }
01066 }
01067
01068 void CObjTreeView::OnTreeReturn(NMHDR* /*pNMHDR */, LRESULT* pResult)
01069 {
01070   *pResult = (LRESULT)TRUE ;
01071   HTREEITEM hTreeItemSel = GetTreeCtrl().GetSelectedItem() ;
01072
01073   if (hTreeItemSel)
01074     GetTreeCtrl().Expand( hTreeItemSel, TVE_TOGGLE ) ;
01075 }
01076
01077 void CObjTreeView::OnTreeDeleteItem(NMHDR* pNMHDR, LRESULT*)
01078 {
01079   NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
01080
01081   if (pnmtv->itemOld.lParam)
01082   {
01083     CObjectData* pod = (CObjectData*)pnmtv->itemOld.lParam ;
01084     ASSERT(pod->IsKindOf(RUNTIME_CLASS(CObjectData)));
01085     delete (CObjectData*)pnmtv->itemOld.lParam ;
01086     pnmtv->itemOld.lParam = NULL ;
01087   }
01088 }
01089
01090 void CObjTreeView::OnObjectDelete()
01091 {
01092   AfxMessageBox("Not implemented yet" ) ;
01093
01094 }
01095
01096 void CObjTreeView::OnObjectVerify()
01097 {
01098   AfxMessageBox("Not implemented yet" ) ;
01099
01100 }
01101
01102 BOOL CObjTreeView::IsValidSel()
01103 {
01104   return (GetTreeCtrl().GetSelectedItem() != NULL) ;
01105 }
01106
01107 #ifdef _DEBUG
01108
01109 COle2ViewDoc* CObjTreeView::GetDocument() // non-debug version is inline
01110 {
01111   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COle2ViewDoc)));
01112   return (COle2ViewDoc*) m_pDocument;
01113 }
01114
01115 #endif //_DEBUG
01116
01117 void CObjTreeView::OnUseInProcServer()
01118 {
01119   COle2ViewDoc*   pDoc = GetDocument() ;
01120
01121   if (pDoc->m_dwClsCtx & CLSCTX_INPROC_SERVER)
01122     pDoc->m_dwClsCtx &= ~CLSCTX_INPROC_SERVER ;
01123   else
01124     pDoc->m_dwClsCtx |= CLSCTX_INPROC_SERVER ;
01125   if (pDoc->m_dwClsCtx == NULL)
01126     pDoc->m_dwClsCtx = CLSCTX_INPROC_SERVER ;
01127 //    OnUpdate( this, NULL, NULL ) ;
01128 }
01129
01130 void CObjTreeView::OnUpdateUseInProcServer(CCmdUI* pCmdUI)
01131 {
01132   COle2ViewDoc*   pDoc = GetDocument() ;
01133   pCmdUI->SetCheck( pDoc->m_dwClsCtx & CLSCTX_INPROC_SERVER ? TRUE : FALSE  ) ;
01134 }
01135
01136 void CObjTreeView::OnUseInProcHandler()
01137 {
01138   COle2ViewDoc*   pDoc = GetDocument() ;
01139   if (pDoc->m_dwClsCtx & CLSCTX_INPROC_HANDLER)
01140     pDoc->m_dwClsCtx &= ~CLSCTX_INPROC_HANDLER ;
01141   else
01142     pDoc->m_dwClsCtx |= CLSCTX_INPROC_HANDLER ;
01143   if (pDoc->m_dwClsCtx == NULL)
01144     pDoc->m_dwClsCtx = CLSCTX_INPROC_HANDLER ;
01145 //    OnUpdate( this, NULL, NULL ) ;
01146 }
01147
01148 void CObjTreeView::OnUpdateUseInProcHandler(CCmdUI* pCmdUI)
01149 {
01150   COle2ViewDoc*   pDoc = GetDocument() ;
01151   pCmdUI->SetCheck( pDoc->m_dwClsCtx & CLSCTX_INPROC_HANDLER ? TRUE : FALSE ) ;
01152 }
01153
01154 void CObjTreeView::OnUseLocalServer()
01155 {
01156   COle2ViewDoc*   pDoc = GetDocument() ;
01157   if (pDoc->m_dwClsCtx & CLSCTX_LOCAL_SERVER)
01158     pDoc->m_dwClsCtx &= ~CLSCTX_LOCAL_SERVER ;
01159   else
01160     pDoc->m_dwClsCtx |= CLSCTX_LOCAL_SERVER ;
01161
01162   if (pDoc->m_dwClsCtx == NULL)
01163     pDoc->m_dwClsCtx = CLSCTX_LOCAL_SERVER ;
01164
01165 //    OnUpdate( this, NULL, NULL ) ;
01166 }
01167
01168 void CObjTreeView::OnUpdateUseLocalServer(CCmdUI* pCmdUI)
01169 {
01170   COle2ViewDoc*   pDoc = GetDocument() ;
01171   pCmdUI->SetCheck( pDoc->m_dwClsCtx & CLSCTX_LOCAL_SERVER ? TRUE : FALSE ) ;
01172 }
01173
01174
01175 void CObjTreeView::OnFileBind()
01176 {
01177 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFileViewBar Member List

This is the complete list of members for CFileViewBar, including all inherited members.
AdjustLayout() | CFileViewBar |
CFileViewBar() | CFileViewBar |
FillFileView() | CFileViewBar | [protected]
m_FileViewImages | CFileViewBar | [protected]
m_wndFileView | CFileViewBar | [protected]
m_wndToolBar | CFileViewBar | [protected]
OnChangeVisualStyle() | CFileViewBar |
OnContextMenu(CWnd *pWnd, CPoint point) | CFileViewBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CFileViewBar | [protected]
OnDummyCompile() | CFileViewBar | [protected]
OnEditClear() | CFileViewBar | [protected]
OnEditCopy() | CFileViewBar | [protected]
OnEditCut() | CFileViewBar | [protected]
OnPaint() | CFileViewBar | [protected]
OnProperties() | CFileViewBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CFileViewBar | [protected]
OnSize(UINT nType, int cx, int cy) | CFileViewBar | [protected]
OnSolutionOpen() | CFileViewBar | [protected]
OnSolutionOpenWith() | CFileViewBar | [protected]
~CFileViewBar() | CFileViewBar | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListDoc.cpp Source File

  • general
  • DBVList

DBVListDoc.cpp

Go to the documentation of this file.
00001 // DBVListDoc.cpp : implementation of the CDBVListDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "DBVList.h"
00014
00015 #include "DBVListSet.h"
00016 #include "DBVListDoc.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDBVListDoc
00026
00027 IMPLEMENT_DYNCREATE(CDBVListDoc, CDocument)
00028
00029 BEGIN_MESSAGE_MAP(CDBVListDoc, CDocument)
00030   //{{AFX_MSG_MAP(CDBVListDoc)
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CDBVListDoc construction/destruction
00036
00037 CDBVListDoc::CDBVListDoc()
00038 {
00039 }
00040
00041 CDBVListDoc::~CDBVListDoc()
00042 {
00043 }
00044
00045 BOOL CDBVListDoc::OnNewDocument()
00046 {
00047   if (!CDocument::OnNewDocument())
00048     return FALSE;
00049
00050   return TRUE;
00051 }
00052
00053
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CDBVListDoc diagnostics
00057
00058 #ifdef _DEBUG
00059 void CDBVListDoc::AssertValid() const
00060 {
00061   CDocument::AssertValid();
00062 }
00063
00064 void CDBVListDoc::Dump(CDumpContext& dc) const
00065 {
00066   CDocument::Dump(dc);
00067 }
00068 #endif //_DEBUG
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CDBVListDoc commands
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWorkSpaceToolBarView Member List

This is the complete list of members for CWorkSpaceToolBarView, including all inherited members.
CWorkSpaceToolBarView() | CWorkSpaceToolBarView | [protected]
GetDocument() | CWorkSpaceToolBarView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CWorkSpaceToolBarView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CWorkSpaceToolBarView | [protected]
OnDraw(CDC *pDC) | CWorkSpaceToolBarView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CWorkSpaceToolBarView | [protected, virtual]
OnFilePrintPreview() | CWorkSpaceToolBarView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CWorkSpaceToolBarView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CWorkSpaceToolBarView | [virtual]
~CWorkSpaceToolBarView() | CWorkSpaceToolBarView | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/targetver.h Source File

  • vc2008fp
  • Slider

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CChildFrame Member List

This is the complete list of members for CChildFrame, including all inherited members.
ActivateFrame(int nCmdShow) | CChildFrame | [virtual]
ActivateFrame(int nCmdShow) | CChildFrame | [virtual]
ActivateFrame(int nCmdShow=-1) | CChildFrame | [virtual]
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
CChildFrame() | CChildFrame |
GetDocumentName(CObject **pObj) | CChildFrame | [virtual]
IsReadOnly() | CChildFrame | [virtual]
m_wndSplitter | CChildFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CChildFrame | [protected]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CChildFrame | [protected, virtual]
OnEditCopy() | CChildFrame | [protected]
OnEditCut() | CChildFrame | [protected]
OnEditPaste() | CChildFrame | [protected]
OnEditPasteSpecial() | CChildFrame | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
~CChildFrame() | CChildFrame | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/stdafx.cpp Source File

  • general
  • multipad

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/Snapdoc.cpp Source File

  • general
  • snapvw

Snapdoc.cpp

Go to the documentation of this file.
00001 // SnapDoc.cpp : implementation of the CSnapDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "SnapVw.h"
00014
00015 #include "SnapDoc.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CSnapDoc
00025
00026 IMPLEMENT_DYNCREATE(CSnapDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CSnapDoc, CDocument)
00029   //{{AFX_MSG_MAP(CSnapDoc)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CSnapDoc construction/destruction
00037
00038 CSnapDoc::CSnapDoc()
00039 {
00040   // TODO: add one-time construction code here
00041
00042 }
00043
00044 CSnapDoc::~CSnapDoc()
00045 {
00046 }
00047
00048 BOOL CSnapDoc::OnNewDocument()
00049 {
00050   if (!CDocument::OnNewDocument())
00051     return FALSE;
00052
00053   // TODO: add reinitialization code here
00054   // (SDI documents will reuse this document)
00055
00056   return TRUE;
00057 }
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CSnapDoc serialization
00061
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CSnapDoc diagnostics
00065
00066 #ifdef _DEBUG
00067 void CSnapDoc::AssertValid() const
00068 {
00069   CDocument::AssertValid();
00070 }
00071
00072 void CSnapDoc::Dump(CDumpContext& dc) const
00073 {
00074   CDocument::Dump(dc);
00075 }
00076 #endif //_DEBUG
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // CSnapDoc commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IMAGELib::_DImage Member List

This is the complete list of members for IMAGELib::_DImage, including all inherited members.
id | IMAGELib::_DImage
id | IMAGELib::_DImage
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/strings.h Source File

  • vc2008fp
  • WordPad

strings.h

Go to the documentation of this file.
00001 //
00002 // strings.h : defines all extern const strings
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #ifndef __AFXWIN_H__
00015   #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 extern const TCHAR szWordPadClass[];
00019 extern const TCHAR szLayout1[];
00020 extern const TCHAR szLayout2[];
00021 extern const TCHAR szRegKey[];
00022
00023 extern const TCHAR szTextSection[];
00024 extern const TCHAR szRTFSection[];
00025 extern const TCHAR szWordSection[];
00026 extern const TCHAR szWriteSection[];
00027 extern const TCHAR szIPSection[];
00028 extern const TCHAR szWrap[];
00029 extern const TCHAR szPageMargin[];
00030
00031 extern const TCHAR szSection[];
00032 extern const TCHAR szWordSel[];
00033 extern const TCHAR szUnits[];
00034 extern const TCHAR szFrameRect[];
00035 extern const TCHAR szMaximized[];
00036 extern const TCHAR szDeleteTemp[];
00037
00038 extern const TCHAR szSumInfo[];
00039
00040 extern const char szWordConverter[];
00041 extern const char szWriteConverter[];
00042
00043 extern const TCHAR szContents[];
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutputToolBar Member List

This is the complete list of members for COutputToolBar, including all inherited members.
AllowShowOnList() const | COutputToolBar | [inline, virtual]
OnUpdateCmdUI(CFrameWnd *, BOOL bDisableIfNoHndler) | COutputToolBar | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CShape Member List

This is the complete list of members for CShape, including all inherited members.
CShape() | CShape |
CShape(SHAPE_COLOR_ENUM colorenum, SHAPE_STYLE shapestyle, CRect &rect) | CShape |
Draw(CDC *pDC, BOOL bSelected) | CShape |
m_rect | CShape |
m_shapecolor | CShape |
m_shapestyle | CShape |
Serialize(CArchive &ar) | CShape | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/np.h Source File

  • general
  • npp

np.h

Go to the documentation of this file.
00001 // np.h : main header file for the NP application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 // application defines
00020 #define COMBO_HEIGHT 100    // width of edit control for combobox
00021 #define COMBO_WIDTH  160    // drop down height
00022 #define HISTORY_COUNT 10    // number of entries for the last search selections
00023 #define TIMER_ID 2          // timer ID for clock on status bar
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CNotepadApp:
00027 // See np.cpp for the implementation of this class
00028 //
00029
00030 class CNotepadApp : public CWinApp
00031 {
00032 public:
00033   CNotepadApp();
00034
00035 // Overrides
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CNotepadApp)
00038   public:
00039   virtual BOOL InitInstance();
00040   virtual BOOL OnIdle(LONG lCount);
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044
00045   //{{AFX_MSG(CNotepadApp)
00046   afx_msg void OnAppAbout();
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/LineWeightDlg.cpp Source File

  • vc2008fp
  • DrawClient

LineWeightDlg.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014 #include "LineWeightDlg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 CLineWeightDlg::CLineWeightDlg(CWnd* pParent /*=NULL*/) :
00023   CDialog(CLineWeightDlg::IDD, pParent)
00024 {
00025   //{{AFX_DATA_INIT(CLineWeightDlg)
00026   m_penSize = 0;
00027   //}}AFX_DATA_INIT
00028 }
00029
00030 void CLineWeightDlg::DoDataExchange(CDataExchange* pDX)
00031 {
00032   CDialog::DoDataExchange(pDX);
00033   //{{AFX_DATA_MAP(CLineWeightDlg)
00034   DDX_Control(pDX, IDC_SPIN1, m_SpinCtrl);
00035   DDX_Text(pDX, IDC_WEIGHT, m_penSize);
00036   DDV_MinMaxUInt(pDX, m_penSize, 0, 100);
00037   //}}AFX_DATA_MAP
00038 }
00039
00040 BOOL CLineWeightDlg::OnInitDialog()
00041 {
00042   CDialog::OnInitDialog();
00043
00044   m_SpinCtrl.SetRange(0, 100);
00045   m_SpinCtrl.SetBase(10);
00046   m_SpinCtrl.SetPos(max(m_penSize, 0));
00047   return TRUE;
00048 }
00049
00050 BEGIN_MESSAGE_MAP(CLineWeightDlg, CDialog)
00051   //{{AFX_MSG_MAP(CLineWeightDlg)
00052   //}}AFX_MSG_MAP
00053 END_MESSAGE_MAP()
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAddressBox Member List

This is the complete list of members for CAddressBox, including all inherited members.
get_accName(VARIANT, BSTR *pszName) CAddressBox [inline, private, virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpindialPropPage Member List

This is the complete list of members for CSpindialPropPage, including all inherited members.
CSpindialPropPage() | CSpindialPropPage |
DoDataExchange(CDataExchange *pDX) | CSpindialPropPage | [protected, virtual]
IDD enum value | CSpindialPropPage |
m_NeedlePosition | CSpindialPropPage |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.h Source File

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenuDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class COwnerDrawMenuDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   COwnerDrawMenuDoc();
00017   DECLARE_DYNCREATE(COwnerDrawMenuDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~COwnerDrawMenuDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ScreenCap.cpp Source File

  • advanced
  • DllScreenCap
  • ScreenCap

ScreenCap.cpp

Go to the documentation of this file.
00001 // ScreenCap.cpp : Defines the class behaviors for the application.
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "ScreenCap.h"
00013 #include "MainFrm.h"
00014
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 // CScreenCapApp
00024
00025 BEGIN_MESSAGE_MAP(CScreenCapApp, CWinApp)
00026   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00027 END_MESSAGE_MAP()
00028
00029
00030 // CScreenCapApp construction
00031
00032 CScreenCapApp::CScreenCapApp()
00033 {
00034   // TODO: add construction code here,
00035   // Place all significant initialization in InitInstance
00036 }
00037
00038
00039 // The one and only CScreenCapApp object
00040
00041 CScreenCapApp theApp;
00042
00043 // CScreenCapApp initialization
00044
00045 BOOL CScreenCapApp::InitInstance()
00046 {
00047   CWinApp::InitInstance();
00048
00049   // Standard initialization
00050   // If you are not using these features and wish to reduce the size
00051   // of your final executable, you should remove from the following
00052   // the specific initialization routines you do not need
00053   // Change the registry key under which our settings are stored
00054   // TODO: You should modify this string to be something appropriate
00055   // such as the name of your company or organization
00056   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00057   // To create the main window, this code creates a new frame window
00058   // object and then sets it as the application's main window object
00059   CMainFrame* pFrame = new CMainFrame;
00060   m_pMainWnd = pFrame;
00061   // create and load the frame with its resources
00062   pFrame->LoadFrame(IDR_MAINFRAME,
00063     WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
00064     NULL);
00065   // The one and only window has been initialized, so show and update it
00066   pFrame->ShowWindow(SW_SHOW);
00067   pFrame->UpdateWindow();
00068   // call DragAcceptFiles only if there's a suffix
00069   //  In an SDI app, this should occur after ProcessShellCommand
00070   return TRUE;
00071 }
00072
00073
00074 // CScreenCapApp message handlers
00075
00076
00077
00078 // CAboutDlg dialog used for App About
00079
00080 class CAboutDlg : public CDialog
00081 {
00082 public:
00083   CAboutDlg();
00084
00085 // Dialog Data
00086   enum { IDD = IDD_ABOUTBOX };
00087
00088 protected:
00089   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00090
00091 // Implementation
00092 protected:
00093   DECLARE_MESSAGE_MAP()
00094 };
00095
00096 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00097 {
00098 }
00099
00100 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00101 {
00102   CDialog::DoDataExchange(pDX);
00103 }
00104
00105 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00106 END_MESSAGE_MAP()
00107
00108 // App command to run the dialog
00109 void CScreenCapApp::OnAppAbout()
00110 {
00111   CAboutDlg aboutDlg;
00112   aboutDlg.DoModal();
00113 }
00114
00115
00116 // CScreenCapApp message handlers
00117
00118
00119 BOOL CScreenCapApp::PreTranslateMessage(MSG* pMsg)
00120 {
00121   if (CWinApp::PreTranslateMessage(pMsg))
00122     return(TRUE);
00123
00124   return(FilterDllMsg(pMsg));
00125 }
00126
00127 BOOL CScreenCapApp::OnIdle(LONG lCount)
00128 {
00129   if (CWinApp::OnIdle(lCount))
00130     return(TRUE);
00131
00132   ProcessDllIdle();
00133   return(FALSE);
00134 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll2.cpp Source File

  • advanced
  • dllhusk

testdll2.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011
00012 #include "resource.h"       // main symbols
00013 #include "testres2.h"       // symbols unique to this DLL
00014
00015 #include "testdll2.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // Initialization of MFC Extension DLL
00024
00025 #include "afxdllx.h"    // standard MFC Extension DLL routines
00026
00027 static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
00028
00029 extern "C" int APIENTRY
00030 DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
00031 {
00032   if (dwReason == DLL_PROCESS_ATTACH)
00033   {
00034     // Extension DLL one-time initialization - do not allocate memory here,
00035     //   use the TRACE or ASSERT macros or call MessageBox
00036     if (!AfxInitExtensionModule(extensionDLL, hInstance))
00037       return 0;
00038
00039     // Other initialization could be done here, as long as
00040     // it doesn't result in direct or indirect calls to AfxGetApp.
00041     // This extension DLL doesn't need to access the app object
00042     // but to be consistent with testdll1.dll, this DLL requires
00043     // explicit initialization as well (see below).
00044
00045     // This allows for greater flexibility later in development.
00046   }
00047   return 1;   // ok
00048 }
00049
00050 // Exported DLL initialization is run in context of running application
00051 extern "C" void WINAPI InitTestDLL2()
00052 {
00053   // create a new CDynLinkLibrary for this app
00054   #pragma warning(push)
00055   #pragma warning(disable:6014) //silence prefast warning because CDynLinkLibrary is cleaned up elsewhere
00056   new CDynLinkLibrary(extensionDLL);
00057   #pragma warning(pop)
00058   // nothing more to do
00059 }
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // class CListOutputFrame
00063
00064 IMPLEMENT_DYNAMIC(CListOutputFrame, CMDIChildWnd)
00065
00066 BEGIN_MESSAGE_MAP(CListOutputFrame, CMDIChildWnd)
00067   //{{AFX_MSG_MAP(CListOutputFrame)
00068   ON_WM_CREATE()
00069   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00070   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00071   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00072   //}}AFX_MSG_MAP
00073 END_MESSAGE_MAP()
00074
00075 CListOutputFrame::CListOutputFrame()
00076 {
00077   m_ppThis = NULL;        // backpointer
00078   // do nothing now (two-phase create)
00079 }
00080
00081 CListOutputFrame::~CListOutputFrame()
00082 {
00083   // clear backpointer
00084   if (m_ppThis != NULL)
00085   {
00086     ASSERT(*m_ppThis == this);
00087     *m_ppThis = NULL;
00088   }
00089 }
00090
00091 BOOL CListOutputFrame::Create(LPCTSTR lpszWindowName,
00092   DWORD dwStyle, const RECT& rect, CMDIFrameWnd* pParentWnd)
00093 {
00094   // we want to load a specific menu from this DLL
00095   HINSTANCE hInstOld = AfxGetResourceHandle();
00096   AfxSetResourceHandle(extensionDLL.hModule);
00097   if (!m_menu.LoadMenu(IDR_LISTOUTPUT))
00098   {
00099     // restore the old resource chain and return error
00100     AfxSetResourceHandle(hInstOld);
00101     return FALSE;
00102   }
00103   AfxSetResourceHandle(hInstOld); // restore the old resource chain
00104
00105   // when the list output frame window is active, use this menu
00106   m_hMenuShared = m_menu.m_hMenu;
00107
00108   // create the CMDIChildWnd, listbox created in OnCreate
00109   return CMDIChildWnd::Create(NULL, lpszWindowName,
00110     dwStyle, rect, pParentWnd);
00111 }
00112
00113
00114 int CListOutputFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00115 {
00116   if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
00117     return -1;
00118
00119   // create dialog bar at top of the frame window (it is a toolbar)
00120   if (!m_dlgBar.Create(this, IDD_DIALOGBAR1, WS_CHILD|CBRS_TOP,
00121       AFX_IDW_TOOLBAR))
00122   {
00123     TRACE(_T("Failed to create toolbar for CListOutputFrame\n"));
00124     return -1;
00125   }
00126
00127   // create listbox as main pane (will fill rest of frame window)
00128   if (!m_listBox.Create(WS_CHILD | WS_VISIBLE|
00129     LBS_NOTIFY | LBS_NOINTEGRALHEIGHT |
00130     WS_VSCROLL | LBS_DISABLENOSCROLL | WS_BORDER,
00131     CRect(0,0,0,0), this, AFX_IDW_PANE_FIRST))
00132   {
00133     TRACE(_T("Failed to create listbox for CListOutputFrame\n"));
00134     return -1;
00135   }
00136   m_listBox.SetFont(m_dlgBar.GetFont());
00137   ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_DRAWFRAME);
00138   m_listBox.ModifyStyle(0, WS_EX_CLIENTEDGE, SWP_DRAWFRAME);
00139
00140   return 0; // creation ok
00141 }
00142
00143 void CListOutputFrame::Clear()
00144 {
00145   ASSERT(m_listBox.m_hWnd != NULL);       // must be created
00146   m_listBox.ResetContent();
00147 }
00148
00149 void CListOutputFrame::AddString(LPCTSTR lpszItem)
00150 {
00151   ASSERT(m_listBox.m_hWnd != NULL);       // must be created
00152   int nIndex;
00153   if ((nIndex = m_listBox.AddString(lpszItem)) < 0)
00154     AfxThrowMemoryException();
00155   m_listBox.SetCurSel(nIndex);    // make last line visible
00156 }
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // Edit commands
00160
00161 void CListOutputFrame::OnEditClear()
00162 {
00163   Clear();
00164 }
00165
00166 void CListOutputFrame::OnEditCut()
00167 {
00168   OnEditCopy();
00169   Clear();
00170 }
00171
00172 void CListOutputFrame::OnEditCopy()
00173 {
00174   if (!OpenClipboard())
00175   {
00176     AfxMessageBox(_T("Failed to open clipboard"));
00177     return;
00178   }
00179   if (!::EmptyClipboard())
00180   {
00181     AfxMessageBox(_T("Failed to empty clipboard"));
00182     ::CloseClipboard();
00183     return;
00184   }
00185
00186   // copy the current listbox contents to the clipboard as text
00187   HGLOBAL hTextData = GetTextData();
00188   if (hTextData == NULL ||
00189 #ifndef _UNICODE
00190     ::SetClipboardData(CF_TEXT, hTextData) == NULL)
00191 #else
00192     ::SetClipboardData(CF_UNICODETEXT, hTextData) == NULL)
00193 #endif
00194   {
00195     AfxMessageBox(_T("Failed to set clipboard data"));
00196     ::CloseClipboard();
00197     return;
00198   }
00199   if (!::CloseClipboard())
00200     AfxMessageBox(_T("Failed to close clipboard"));
00201 }
00202
00203 HGLOBAL CListOutputFrame::GetTextData()
00204 {
00205   // first find out how much space we need
00206   int nLines = m_listBox.GetCount();
00207   long cbTotal = 0;
00208   int i;
00209   for (i = 0; i < nLines; i++)
00210     cbTotal += m_listBox.GetTextLen(i) + 2;     // CR/LF for each line
00211   cbTotal += 1;   // for end '\0'
00212
00213   // allocate a (shared) global memory block for the data
00214   HGLOBAL hData = ::GlobalAlloc(GMEM_DDESHARE, cbTotal*sizeof(TCHAR));
00215   if (hData == NULL)
00216     return NULL;        // NULL for memory failure
00217
00218   // now copy the strings, terminate each with CR/LF
00219   LPTSTR lpOut = (LPTSTR)::GlobalLock(hData);
00220   ENSURE(lpOut != NULL);
00221   for (i = 0; i < nLines; i++)
00222   {
00223     m_listBox.GetText(i, lpOut);
00224     lpOut += lstrlen(lpOut)*sizeof(TCHAR);   // skip new string
00225     *lpOut++ = 0xD; // CR
00226     *lpOut++ = 0xA; // LF
00227   }
00228   *lpOut = '\0';
00229   ASSERT(lpOut + 1 == (LPCTSTR)GlobalLock(hData) + cbTotal);
00230
00231   return hData;
00232 }
00233
00234 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSize.h Source File

  • vc2008fp
  • SetPaneSize

SetPaneSize.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CSetPaneSizeApp:
00021 // See SetPaneSize.cpp for the implementation of this class
00022 //
00023
00024 class CSetPaneSizeApp : public CWinAppEx
00025 {
00026 public:
00027   CSetPaneSizeApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern CSetPaneSizeApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCollectView Member List

This is the complete list of members for CCollectView, including all inherited members.
CCollectView() | CCollectView | [protected]
GetDocument() | CCollectView | [inline]
m_stringList | CCollectView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CCollectView | [protected, virtual]
OnDraw(CDC *pDC) | CCollectView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CCollectView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CCollectView | [protected, virtual]
~CCollectView() | CCollectView | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemo.h Source File

  • vc2008fp
  • PropSheetDemo

PropSheetDemo.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #ifndef __AFXWIN_H__
00004   #error include 'stdafx.h' before including this file for PCH
00005 #endif
00006
00007 #include "resource.h"   // main symbols
00008
00009 /////////////////////////////////////////////////////////////////////////////
00010 // CPropSheetDemoApp:
00011 // See PropSheetDemo.cpp for the implementation of this class
00012 //
00013
00014 class CPropSheetDemoApp : public CWinAppEx
00015 {
00016 public:
00017   CPropSheetDemoApp();
00018
00019 // Overrides
00020   public:
00021   virtual BOOL InitInstance();
00022
00023 // Implementation
00024   DECLARE_MESSAGE_MAP()
00025 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSetPaneSizeView Member List

This is the complete list of members for CSetPaneSizeView, including all inherited members.
CSetPaneSizeView() | CSetPaneSizeView | [protected]
DoDataExchange(CDataExchange *pDX) | CSetPaneSizeView | [protected, virtual]
GetDocument() | CSetPaneSizeView | [inline]
IDD enum value | CSetPaneSizeView |
m_nContainerSize | CSetPaneSizeView |
m_nHeightInPixels | CSetPaneSizeView |
m_nSizePercent | CSetPaneSizeView |
m_nWidthInPixels | CSetPaneSizeView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CSetPaneSizeView | [protected, virtual]
OnBtnSetHeightInPixels() | CSetPaneSizeView | [protected]
OnBtnSetWidthInPixels() | CSetPaneSizeView | [protected]
OnButtonSetContainerSize() | CSetPaneSizeView | [protected]
OnButtonSetDlgBarSize() | CSetPaneSizeView | [protected]
OnContextMenu(CWnd *, CPoint point) | CSetPaneSizeView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CSetPaneSizeView | [protected, virtual]
OnFilePrintPreview() | CSetPaneSizeView | [protected]
OnInitialUpdate() | CSetPaneSizeView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CSetPaneSizeView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CSetPaneSizeView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CSetPaneSizeView | [virtual]
~CSetPaneSizeView() | CSetPaneSizeView | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/RegCtlDg.Cpp Source File

  • ole
  • TstCon

RegCtlDg.Cpp

Go to the documentation of this file.
00001 // RegisterControlsDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CRegisterControlsDlg dialog
00022
00023
00024 CRegisterControlsDlg::CRegisterControlsDlg( CWnd* pParent ) :
00025    CDialog( CRegisterControlsDlg::IDD, pParent )
00026 {
00027   //{{AFX_DATA_INIT(CRegisterControlsDlg)
00028     // NOTE: the ClassWizard will add member initialization here
00029   //}}AFX_DATA_INIT
00030 }
00031
00032
00033 void CRegisterControlsDlg::DoDataExchange( CDataExchange* pDX )
00034 {
00035   CDialog::DoDataExchange( pDX );
00036
00037   //{{AFX_DATA_MAP(CRegisterControlsDlg)
00038   DDX_Control(pDX, IDC_REREGISTER, m_butReregister);
00039   DDX_Control(pDX, IDC_UNREGISTER, m_butUnregister);
00040   DDX_Control(pDX, IDC_REGISTEREDCONTROLS, m_lvRegisteredControls);
00041   //}}AFX_DATA_MAP
00042 }
00043
00044
00045 BEGIN_MESSAGE_MAP(CRegisterControlsDlg, CDialog)
00046   //{{AFX_MSG_MAP(CRegisterControlsDlg)
00047   ON_BN_CLICKED(IDC_UNREGISTER, OnUnregister)
00048   ON_NOTIFY(LVN_ITEMCHANGED, IDC_REGISTEREDCONTROLS, OnRegisteredControlsItemChanged)
00049   ON_BN_CLICKED(IDC_REREGISTER, OnReregister)
00050   ON_BN_CLICKED(IDC_REGISTER, OnRegister)
00051   ON_WM_HELPINFO()
00052   ON_WM_CONTEXTMENU()
00053   //}}AFX_MSG_MAP
00054 END_MESSAGE_MAP()
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CRegisterControlsDlg message handlers
00058
00059 BOOL CRegisterControlsDlg::OnInitDialog()
00060 {
00061    CWaitCursor wait;
00062
00063    CString strColumnTitle;
00064
00065    CDialog::OnInitDialog();
00066
00067    LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_PROGID);
00068    m_lvRegisteredControls.InsertColumn( 0, strColumnTitle, LVCFMT_LEFT, 200 );
00069    LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_PATH);
00070    m_lvRegisteredControls.InsertColumn( 1, strColumnTitle, LVCFMT_LEFT, 250 );
00071
00072    RefreshRegisteredControls();
00073
00074    return TRUE;  // return TRUE unless you set the focus to a control
00075           // EXCEPTION: OCX Property Pages should return FALSE
00076 }
00077
00078 static BOOL IsAControl( HKEY hkClass )
00079 {
00080    LONG lResult;
00081    HKEY hk;
00082
00083    ASSERT( hkClass != NULL );
00084
00085    lResult = RegOpenKeyEx( hkClass, _T( "InprocServer32" ), 0, KEY_READ, &hk );
00086    if( lResult != ERROR_SUCCESS )
00087    {
00088     // It doesn't have an inproc server, so it's probably not a control.
00089     return( FALSE );
00090    }
00091    RegCloseKey( hk );
00092
00093    lResult = RegOpenKeyEx( hkClass, _T( "ProgID" ), 0, KEY_READ, &hk );
00094    if( lResult != ERROR_SUCCESS )
00095    {
00096     // It doesn't have a ProgID, so it's not a control.
00097     return( FALSE );
00098    }
00099    RegCloseKey( hk );
00100
00101    lResult = RegOpenKeyEx( hkClass, _T( "Control" ), 0, KEY_READ, &hk );
00102    if( lResult == ERROR_SUCCESS )
00103    {
00104     // It's definitely a control.
00105     RegCloseKey( hk );
00106     return( TRUE );
00107    }
00108
00109    lResult = RegOpenKeyEx( hkClass, _T( "ToolboxBitmap32" ), 0, KEY_READ,
00110     &hk );
00111    if( lResult == ERROR_SUCCESS )
00112    {
00113     // It's definitely a control.
00114     RegCloseKey( hk );
00115     return( TRUE );
00116    }
00117
00118    return( FALSE );
00119 }
00120
00121 void CRegisterControlsDlg::RefreshRegisteredControls()
00122 {
00123    HKEY hkCLSID;
00124    LONG lResult;
00125    DWORD iIndex;
00126    DWORD nSubkeyLength;
00127    FILETIME time;
00128    BOOL tStopEnumerating;
00129    DWORD dwType;
00130    DWORD nDataLength;
00131    TCHAR szProgID[80];
00132    TCHAR szInprocServer32[MAX_PATH];
00133    TCHAR szSubkey[MAX_PATH];
00134    HKEY hkSubkey;
00135    HKEY hkInprocServer32;
00136    HKEY hkProgID;
00137    int iItem;
00138
00139    m_lvRegisteredControls.SetRedraw(FALSE);
00140    m_lvRegisteredControls.DeleteAllItems();
00141
00142    lResult = RegOpenKeyEx( HKEY_CLASSES_ROOT, _T( "CLSID" ), 0, KEY_READ,
00143     &hkCLSID );
00144    if( lResult != ERROR_SUCCESS )
00145    {
00146     return;
00147    }
00148
00149    iIndex = 0;
00150    tStopEnumerating = FALSE;
00151    while( !tStopEnumerating )
00152    {
00153     nSubkeyLength = sizeof( szSubkey )/sizeof( szSubkey[0] );
00154     lResult = RegEnumKeyEx( hkCLSID, iIndex, szSubkey, &nSubkeyLength, NULL,
00155      NULL, NULL, &time );
00156     if( lResult == ERROR_SUCCESS )
00157     {
00158      lResult = RegOpenKeyEx( hkCLSID, szSubkey, 0, KEY_READ, &hkSubkey );
00159      if( lResult == ERROR_SUCCESS )
00160      {
00161       if( IsAControl( hkSubkey ) )
00162       {
00163          lResult = RegOpenKeyEx( hkSubkey, _T( "InprocServer32" ), 0,
00164           KEY_READ, &hkInprocServer32 );
00165          if( lResult == ERROR_SUCCESS )
00166          {
00167           nDataLength = sizeof( szInprocServer32 );
00168           lResult = RegQueryValueEx( hkInprocServer32, NULL, NULL,
00169            &dwType, LPBYTE( szInprocServer32 ), &nDataLength );
00170           RegCloseKey( hkInprocServer32 );
00171           if( (lResult == ERROR_SUCCESS) && (dwType == REG_SZ) )
00172           {
00173            lResult = RegOpenKeyEx( hkSubkey, _T( "ProgID" ), 0,
00174             KEY_READ, &hkProgID );
00175            if( lResult == ERROR_SUCCESS )
00176            {
00177             nDataLength = sizeof( szProgID );
00178             lResult = RegQueryValueEx( hkProgID, NULL, NULL,
00179                &dwType, LPBYTE( szProgID ), &nDataLength );
00180             RegCloseKey( hkProgID );
00181             if( (lResult == ERROR_SUCCESS) && (dwType == REG_SZ) )
00182             {
00183                iItem = m_lvRegisteredControls.InsertItem( 0,
00184                 szProgID );
00185                m_lvRegisteredControls.SetItemText( iItem, 0,
00186                 szProgID );
00187                m_lvRegisteredControls.SetItemText( iItem, 1,
00188                 szInprocServer32 );
00189             }
00190            }
00191           }
00192          }
00193       }
00194      }
00195     }
00196     else
00197     {
00198      tStopEnumerating = TRUE;
00199     }
00200     iIndex++;
00201    }
00202
00203    m_lvRegisteredControls.SetRedraw(TRUE);
00204    m_lvRegisteredControls.Invalidate();
00205    UpdateButtons();
00206 }
00207
00208 typedef HRESULT (STDAPICALLTYPE* PDLLREGISTERSERVER)( void );
00209 typedef HRESULT (STDAPICALLTYPE* PDLLUNREGISTERSERVER)( void );
00210
00211 void CRegisterControlsDlg::OnUnregister()
00212 {
00213    CWaitCursor wait;
00214
00215    UINT nSelectedItems;
00216    int iItem;
00217    CString strPath;
00218    HINSTANCE hLibrary;
00219    PDLLUNREGISTERSERVER pDllUnregisterServer;
00220    HRESULT hResult;
00221    int nResult;
00222
00223    iItem = -1;
00224    nSelectedItems = m_lvRegisteredControls.GetSelectedCount();
00225    while( nSelectedItems > 0 )
00226    {
00227     iItem = m_lvRegisteredControls.GetNextItem( iItem, LVNI_SELECTED );
00228     ASSERT( iItem != -1 );
00229
00230     strPath = m_lvRegisteredControls.GetItemText( iItem, 1 );
00231     TCTrace( TRACELEVEL_NORMAL, "Unregistering %s\n", LPCTSTR( strPath ) );
00232
00233     hResult = S_OK;
00234
00235     hLibrary = LoadLibrary( strPath );
00236     if( hLibrary == NULL )
00237     {
00238      TCTrace( TRACELEVEL_NORMAL, "Failed to load library %s.\n", LPCTSTR(
00239       strPath ) );
00240      hResult = E_FAIL;
00241     }
00242     else
00243     {
00244      pDllUnregisterServer = PDLLUNREGISTERSERVER( GetProcAddress( hLibrary,
00245       _T( "DllUnregisterServer" ) ) );
00246      if( pDllUnregisterServer == NULL )
00247      {
00248       TCTrace( TRACELEVEL_NORMAL,
00249          "Failed to get address of DllUnregisterServer.\n" );
00250       hResult = E_FAIL;
00251      }
00252      else
00253      {
00254       hResult = pDllUnregisterServer();
00255       if( FAILED( hResult ) )
00256       {
00257          TCTrace( TRACELEVEL_NORMAL,
00258           "DllUnregisterServer failed hResult = 0x%x.\n", hResult );
00259       }
00260      }
00261      FreeLibrary( hLibrary );
00262     }
00263
00264     if( FAILED( hResult ) )
00265     {
00266      nResult = AfxMessageBox( IDS_UNREGISTERSERVERFAILED, MB_YESNO );
00267      if( nResult == IDYES )
00268      {
00269      }
00270     }
00271
00272     nSelectedItems--;
00273    }
00274
00275    RefreshRegisteredControls();
00276 }
00277
00278 void CRegisterControlsDlg::UpdateButtons()
00279 {
00280    if( m_lvRegisteredControls.GetSelectedCount() > 0 )
00281    {
00282     m_butReregister.EnableWindow( TRUE );
00283     m_butUnregister.EnableWindow( TRUE );
00284    }
00285    else
00286    {
00287     m_butReregister.EnableWindow( FALSE );
00288     m_butUnregister.EnableWindow( FALSE );
00289    }
00290 }
00291
00292 void CRegisterControlsDlg::OnRegisteredControlsItemChanged( NMHDR* pNMHDR,
00293    LRESULT* pResult )
00294 {
00295    (void)pNMHDR;
00296
00297    UpdateButtons();
00298
00299   *pResult = 0;
00300 }
00301
00302 static void RegisterServer( LPCTSTR pszPathName )
00303 {
00304    HINSTANCE hLibrary;
00305    PDLLREGISTERSERVER pDllRegisterServer;
00306    HRESULT hResult;
00307
00308    TCTrace( TRACELEVEL_NORMAL, "Registering %s\n", pszPathName );
00309    hLibrary = LoadLibrary( pszPathName );
00310    if( hLibrary == NULL )
00311    {
00312     TCTrace( TRACELEVEL_NORMAL, "Failed to load library %s.\n",
00313      pszPathName );
00314    }
00315    else
00316    {
00317     pDllRegisterServer = PDLLREGISTERSERVER( GetProcAddress( hLibrary, _T(
00318      "DllRegisterServer" ) ) );
00319     if( pDllRegisterServer == NULL )
00320     {
00321      TCTrace( TRACELEVEL_NORMAL,
00322       "Failed to get address of DllRegisterServer.\n" );
00323     }
00324     else
00325     {
00326      hResult = pDllRegisterServer();
00327      if( FAILED( hResult ) )
00328      {
00329       TCTrace( TRACELEVEL_NORMAL,
00330          "DllRegisterServer failed hResult = 0x%x.\n", hResult );
00331      }
00332     }
00333     FreeLibrary( hLibrary );
00334    }
00335 }
00336
00337 void CRegisterControlsDlg::OnReregister()
00338 {
00339    CWaitCursor wait;
00340
00341    UINT nSelectedItems;
00342    int iItem;
00343    CString strPath;
00344
00345    iItem = -1;
00346    nSelectedItems = m_lvRegisteredControls.GetSelectedCount();
00347    while( nSelectedItems > 0 )
00348    {
00349     iItem = m_lvRegisteredControls.GetNextItem( iItem, LVNI_SELECTED );
00350     ASSERT( iItem != -1 );
00351     strPath = m_lvRegisteredControls.GetItemText( iItem, 1 );
00352     RegisterServer( strPath );
00353     nSelectedItems--;
00354    }
00355
00356    RefreshRegisteredControls();
00357 }
00358
00359 void CRegisterControlsDlg::OnRegister()
00360 {
00361    POSITION posPathName;
00362    CString strPathName;
00363    int nResult;
00364
00365    CFileDialog dlg( TRUE, _T( "dll" ), NULL, OFN_HIDEREADONLY|
00366     OFN_FILEMUSTEXIST|OFN_ALLOWMULTISELECT, _T(
00367     "ActiveX Controls|*.dll;*.ocx;*.ax||" ) );
00368
00369    nResult = (int)dlg.DoModal();
00370    if( nResult != IDOK )
00371    {
00372     return;
00373    }
00374
00375    CWaitCursor wait;
00376
00377    posPathName = dlg.GetStartPosition();
00378    while( posPathName != NULL )
00379    {
00380     strPathName = dlg.GetNextPathName( posPathName );
00381     RegisterServer( strPathName );
00382    }
00383
00384    RefreshRegisteredControls();
00385 }
00386
00387
00388 static DWORD rgmapCHID[] =
00389 {
00390    IDC_REGISTEREDCONTROLS, HIDC_REGISTEREDCONTROLS,
00391    IDC_UNREGISTER, HIDC_UNREGISTER,
00392    IDC_REGISTER, HIDC_REGISTER,
00393    IDC_REREGISTER, HIDC_REREGISTER,
00394    0, 0
00395 };
00396
00397 BOOL CRegisterControlsDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00398 {
00399   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00400   strPath += _T("::/popups.txt");
00401
00402   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00403 }
00404
00405 void CRegisterControlsDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00406 {
00407   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00408   strPath += _T("::/popups.txt");
00409
00410   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00411 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyStruct Member List

This is the complete list of members for CMyStruct, including all inherited members.
FormatMyStruct(CString &str) | CMyStruct
m_float | CMyStruct
m_int | CMyStruct
m_str | CMyStruct
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spindial.cpp Source File

  • controls
  • spindial

spindial.cpp

Go to the documentation of this file.
00001 // spindial.cpp : Implementation of CSpindialApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "spindial.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021
00022 CSpindialApp NEAR theApp;
00023
00024 const GUID CDECL BASED_CODE _tlid =
00025     { 0x6889608, 0xb8d0, 0x101a, { 0x91, 0xf1, 0x0, 0x60, 0x8c, 0xea, 0xd5, 0xb3 } };
00026 const WORD _wVerMajor = 1;
00027 const WORD _wVerMinor = 0;
00028
00029
00030 ////////////////////////////////////////////////////////////////////////////
00031 // CSpindialApp::InitInstance - DLL initialization
00032
00033 BOOL CSpindialApp::InitInstance()
00034 {
00035   BOOL bInit = COleControlModule::InitInstance();
00036
00037   if (bInit)
00038   {
00039     // TODO: Add your own module initialization code here.
00040   }
00041
00042   return bInit;
00043 }
00044
00045
00046 ////////////////////////////////////////////////////////////////////////////
00047 // CSpindialApp::ExitInstance - DLL termination
00048
00049 int CSpindialApp::ExitInstance()
00050 {
00051   // TODO: Add your own module termination code here.
00052
00053   return COleControlModule::ExitInstance();
00054 }
00055
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // DllRegisterServer - Adds entries to the system registry
00059
00060 STDAPI DllRegisterServer(void)
00061 {
00062   AFX_MANAGE_STATE(_afxModuleAddrThis);
00063
00064   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00065     return ResultFromScode(SELFREG_E_TYPELIB);
00066
00067   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00068     return ResultFromScode(SELFREG_E_CLASS);
00069
00070   return NOERROR;
00071 }
00072
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // DllUnregisterServer - Removes entries from the system registry
00076
00077 STDAPI DllUnregisterServer(void)
00078 {
00079   AFX_MANAGE_STATE(_afxModuleAddrThis);
00080
00081   if (!AfxOleUnregisterTypeLib(_tlid))
00082     return ResultFromScode(SELFREG_E_TYPELIB);
00083
00084   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00085     return ResultFromScode(SELFREG_E_CLASS);
00086
00087   return NOERROR;
00088 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionView.h Source File

  • vc2008fp
  • StateCollection

StateCollectionView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CStateCollectionView : public CView
00014 {
00015 protected: // create from serialization only
00016   CStateCollectionView();
00017   DECLARE_DYNCREATE(CStateCollectionView)
00018
00019 // Attributes
00020 public:
00021   CStateCollectionDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CStateCollectionView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00045   afx_msg void OnContextMenu(CWnd*, CPoint point);
00046   afx_msg void OnFilePrintPreview();
00047
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 #ifndef _DEBUG  // debug version in StateCollectionView.cpp
00052 inline CStateCollectionDoc* CStateCollectionView::GetDocument()
00053    { return (CStateCollectionDoc*)m_pDocument; }
00054 #endif
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/ipframe.h Source File

  • general
  • Scribble

ipframe.h

Go to the documentation of this file.
00001 // IpFrame.h : interface of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CInPlaceFrame : public COleIPFrameWnd
00013 {
00014   DECLARE_DYNCREATE(CInPlaceFrame)
00015 public:
00016   CInPlaceFrame();
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CInPlaceFrame)
00027   public:
00028   virtual BOOL OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* pWndDoc);
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   //}}AFX_VIRTUAL
00031
00032 // Implementation
00033 public:
00034   virtual ~CInPlaceFrame();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:
00041   CToolBar    m_wndToolBar;
00042   COleResizeBar   m_wndResizeBar;
00043   COleDropTarget m_dropTarget;
00044
00045 // Generated message map functions
00046 protected:
00047   //{{AFX_MSG(CInPlaceFrame)
00048   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00049     // NOTE - the ClassWizard will add and remove member functions here.
00050     //    DO NOT EDIT what you see in these blocks of generated code!
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/ScreenCapApi.h Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

ScreenCapApi.h

Go to the documentation of this file.
00001 // ScreenCapApi.h: Defines DllScreenCap.DLL application interface
00002 // This interface can be included by C or C++ code
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif  /* __cplusplus */
00016
00017 struct CaptureData
00018 {
00019   BOOL    bCaptureFullScreen;
00020   char  szCapturePath[MAX_PATH]; // no unicode path support
00021   char  szCaptureFilename[MAX_PATH];
00022 };
00023
00024 BOOL WINAPI ConfigureCapture(HWND hWndParent, CaptureData* lpData);
00025 void WINAPI CaptureScreen(CaptureData* lpData);
00026 BOOL WINAPI FilterDllMsg(LPMSG lpMsg);
00027 void WINAPI ProcessDllIdle();
00028
00029 #ifdef __cplusplus
00030 }
00031 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Wndlist.h Source File

  • general
  • dlgcbr32

Wndlist.h

Go to the documentation of this file.
00001 // WndList.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014   Purpose:
00015   Interface of CWndListDlg, the main dialog window for the application.
00016
00017   Functions:
00018   CWndListDlg::CWndListDlg()          -- constructor
00019   CWndListDlg::Create()               -- create dialog window
00020   CWndListDlg::DoDataExchange()       -- dialog data exchange/validation
00021   CWndListDlg::OnClose()              -- WM_CLOSE handler
00022   CWndListDlg::OnInitDialog()         -- initialize dialog
00023   CWndListDlg::OnOptionNow()          -- handle "Options!Update Now"
00024   CWndListDlg::OnOptionRate()         -- handle "Options!Update Interval"
00025   CWndListDlg::OnSelChangeWndList()   -- update dlg on list selection change
00026   CWndListDlg::OnTimer()              -- WM_TIMER handler
00027   CWndListDlg::OnUpdateOptionRate()   -- set "Options!Update Interval" status
00028   CWndListDlg::OnUpdateTime()         -- update status bar clock
00029   CWndListDlg::WalkWindowList()       -- enumerate windows
00030
00031   Development Team:
00032   Mary Kirtland
00033   Ported to 32-bit by:
00034   Mike Hedley
00035   Created by Microsoft Product Support Services, Premier ISV Support
00036   Copyright (c) Microsoft Corporation.  All rights reserved.
00037 \****************************************************************************/
00038
00039 #ifndef __WNDLIST_H__
00040 #define __WNDLIST_H__
00041
00042 #include "mdlsmain.h"
00043
00044 class CWndListDlg : public CModelessMain
00045 {
00046 private:
00047   using CModelessMain::Create;
00048
00049 // Construction
00050 public:
00051   CWndListDlg();
00052   BOOL Create();
00053
00054 // Dialog Data
00055 protected:
00056   //{{AFX_DATA(CWndListDlg)
00057   enum { IDD = IDR_MAIN };
00058   CListBox    m_lbWindows;
00059   //}}AFX_DATA
00060
00061   UINT    m_nIDTimer;
00062   UINT    m_iRate;
00063   UINT    m_iTicks;
00064
00065 // Overrides
00066 protected:
00067   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00068   virtual BOOL OnInitDialog();
00069
00070 // Implementation
00071 protected:
00072   void WalkWindowList();
00073
00074   // Generated message map functions
00075   //{{AFX_MSG(CWndListDlg)
00076   afx_msg void OnClose();
00077   afx_msg void OnTimer(UINT_PTR nIDEvent);
00078   afx_msg void OnSelChangeWndList();
00079   afx_msg void OnOptionNow();
00080   afx_msg void OnOptionRate();
00081   afx_msg void OnUpdateOptionRate(CCmdUI* pCmdUI);
00082   //}}AFX_MSG
00083   afx_msg void OnUpdateTime(CCmdUI* pCmdUI);
00084   DECLARE_MESSAGE_MAP()
00085 };
00086
00087 #endif //__WNDLIST_H__
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/ToolsPalette.h Source File

  • vc2008fp
  • PaletteDemo

ToolsPalette.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CToolsPalette window
00015
00016 class CToolsPalette : public CMFCToolBar
00017 {
00018 // Construction
00019 public:
00020   CToolsPalette();
00021
00022 // Attributes
00023 public:
00024   int GetColumns () const
00025   {
00026     return m_nColumns;
00027   }
00028
00029 protected:
00030   int   m_nColumns;   // Number of palette columns
00031   CRect m_rectInfo;   // Additional information area
00032
00033 // Operations
00034 public:
00035   void SetColumns (int nColumns);
00036
00037 // Overrides
00038   virtual CSize CalcSize (BOOL bVertDock);
00039   virtual void AdjustLocations ();
00040   virtual void DoPaint(CDC* pDC);
00041   virtual BOOL AllowShowOnList () const
00042   {
00043     return FALSE; // Don't show me on the toolbars list
00044   }
00045
00046 // Implementation
00047 public:
00048   virtual ~CToolsPalette();
00049
00050 protected:
00051   DECLARE_MESSAGE_MAP()
00052 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLineStyleMenuItem Member List

This is the complete list of members for CLineStyleMenuItem, including all inherited members.
CLineStyleMenuItem(int nWidth=1, UINT uiCmdID=0, LPCTSTR lpszText=NULL, BOOL bIsChecked=FALSE) | CLineStyleMenuItem |
CopyFrom(const CMFCToolBarButton &src) | CLineStyleMenuItem | [protected, virtual]
m_nWidth | CLineStyleMenuItem | [protected]
OnCalculateSize(CDC *pDC, const CSize &sizeDefault, BOOL bHorz) | CLineStyleMenuItem | [protected, virtual]
OnDraw(CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE) | CLineStyleMenuItem | [protected, virtual]
~CLineStyleMenuItem() | CLineStyleMenuItem | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CKey Member List

This is the complete list of members for CKey, including all inherited members.
CKey() | CKey | [inline]
CKey() | CKey | [inline]
Close() | CKey |
Close() | CKey |
Create(HKEY hKey, LPCTSTR lpszKeyName) | CKey |
Create(HKEY hKey, LPCTSTR lpszKeyName) | CKey |
GetStringValue(CString &str, LPCTSTR lpszValueName=NULL) | CKey |
GetStringValue(CString &str, LPCTSTR lpszValueName=NULL) | CKey |
m_hKey | CKey |
Open(HKEY hKey, LPCTSTR lpszKeyName) | CKey |
Open(HKEY hKey, LPCTSTR lpszKeyName) | CKey |
SetStringValue(LPCTSTR lpszValue, LPCTSTR lpszValueName=NULL) | CKey |
SetStringValue(LPCTSTR lpszValue, LPCTSTR lpszValueName=NULL) | CKey |
~CKey() | CKey | [inline]
~CKey() | CKey | [inline]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/Resource.h Source File

  • general
  • CTaskDialog

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by CTaskDialogDemo.rc
00004 //
00005 #define IDD_TASKDIALOGTEST_DIALOG       102
00006 #define IDR_MAINFRAME                   128
00007 #define IDS_BUTTON                      129
00008 #define IDS_STRING130                   130
00009 #define IDS_STRING131                   131
00010 #define IDS_END_BUTTON                  132
00011 #define IDS_END_BUTTON_1                132
00012 #define IDC_BUTTON1                     1000
00013 #define IDS_RADIO_START                 1000
00014 #define IDC_BUTTON2                     1001
00015 #define IDS_STRING1001                  1001
00016 #define IDC_BUTTON3                     1002
00017 #define IDS_STRING1002                  1002
00018 #define IDS_RADIO_END                   1002
00019 #define IDC_BUTTON4                     1003
00020 #define IDS_STRING1003                  1003
00021 #define IDC_BUTTON5                     1004
00022 #define IDS_RADIO_END_1                 1004
00023 #define IDC_BUTTON6                     1005
00024 #define IDC_BUTTON7                     1006
00025 #define IDC_BUTTON8                     1007
00026 #define IDC_CHECK                       1009
00027 #define IDC_BUT_ID                      1010
00028 #define IDC_RADIO_ID                    1011
00029 #define IDC_NEW_BUTTON                  1012
00030 #define IDC_PROGRESS1                   1013
00031 #define IDC_BUTTON9                     1014
00032
00033 // Next default values for new objects
00034 //
00035 #ifdef APSTUDIO_INVOKED
00036 #ifndef APSTUDIO_READONLY_SYMBOLS
00037 #define _APS_NEXT_RESOURCE_VALUE        130
00038 #define _APS_NEXT_COMMAND_VALUE         32771
00039 #define _APS_NEXT_CONTROL_VALUE         1015
00040 #define _APS_NEXT_SYMED_VALUE           101
00041 #endif
00042 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COwnerDrawMenuDoc Member List

This is the complete list of members for COwnerDrawMenuDoc, including all inherited members.
COwnerDrawMenuDoc() | COwnerDrawMenuDoc | [protected]
OnNewDocument() | COwnerDrawMenuDoc | [virtual]
Serialize(CArchive &ar) | COwnerDrawMenuDoc | [virtual]
~COwnerDrawMenuDoc() | COwnerDrawMenuDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/superpad.cpp Source File

  • ole
  • superpad

superpad.cpp

Go to the documentation of this file.
00001 // superpad.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "superpad.h"
00014 #include "mainfrm.h"
00015 #include "padview.h"
00016 #include "paddoc.h"
00017 #include "padframe.h"
00018 #include "ipframe.h"
00019
00020 #include <locale.h>
00021
00022 BEGIN_MESSAGE_MAP(CTheApp, CWinApp)
00023   //{{AFX_MSG_MAP(CTheApp)
00024   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00025   ON_COMMAND(ID_PAGE_SETUP, OnPageSetup)
00026   //}}AFX_MSG_MAP
00027   // Standard file based document commands
00028   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00029   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00030   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // Superpad global data
00035
00036 CTheApp NEAR theApp;
00037
00038 // this is the GUID for OCLIENT documents
00039 static const GUID BASED_CODE clsid =
00040   { 0x00021844, 0, 0, { 0xC0, 0, 0, 0, 0, 0, 0, 0x46 } };
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CTheApp initialization
00044
00045 CTheApp::CTheApp()
00046 {
00047   // initialize locale to system default
00048   _tsetlocale(LC_ALL, _T(""));
00049 }
00050
00051 BOOL CTheApp::InitInstance()
00052 {
00053   // initialized OLE 2.0 libraries
00054   if (!AfxOleInit())
00055   {
00056     AfxMessageBox(IDP_OLE_INIT_FAILED);
00057     return FALSE;
00058   }
00059
00060   // initialization that must be done before splash dialog is shown
00061   CPadFrame::Initialize();
00062
00063   // add doc template
00064   CDocTemplate* pDocTemplate;
00065   pDocTemplate = new CMultiDocTemplate(IDR_TEXTTYPE,
00066     RUNTIME_CLASS(CPadDoc),
00067     RUNTIME_CLASS(CPadFrame),
00068     RUNTIME_CLASS(CPadView));
00069   pDocTemplate->SetServerInfo(
00070     IDR_TEXTTYPE_EMBEDDED, IDR_TEXTTYPE_INPLACE,
00071     RUNTIME_CLASS(CInPlaceFrame));
00072   AddDocTemplate(pDocTemplate);
00073
00074   // connect the server to the document template
00075   m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
00076
00077   // create main window
00078   CMainFrame* pMainFrame = new CMainFrame;
00079   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00080   {
00081     delete pMainFrame;
00082     return FALSE;
00083   }
00084   m_pMainWnd = pMainFrame;
00085   int nCmdShow = m_nCmdShow;
00086
00087   // Parse command line for standard shell commands, DDE, file open
00088   CCommandLineInfo cmdInfo;
00089   ParseCommandLine(cmdInfo);
00090
00091   // setup main window
00092   nCmdShow = !cmdInfo.m_bRunEmbedded ? m_nCmdShow : SW_HIDE;
00093   m_nCmdShow = SW_HIDE;
00094   ((CMainFrame*)m_pMainWnd)->InitialShowWindow(nCmdShow);
00095
00096   if (!cmdInfo.m_bRunEmbedded)
00097   {
00098     m_pMainWnd->UpdateWindow();
00099
00100     if (!m_pMainWnd->IsIconic() && cmdInfo.m_bShowSplash &&
00101       m_splash.Create(m_pMainWnd))
00102     {
00103       m_splash.ShowWindow(SW_SHOW);
00104       m_splash.UpdateWindow();
00105       m_splash.SetTimer(1, 500, NULL);
00106     }
00107     m_dwSplashTime = ::GetCurrentTime();
00108
00109     // update the registry now that the splash dialog is visible
00110     m_server.UpdateRegistry();
00111     RegisterShellFileTypes(TRUE);
00112   }
00113
00114   // do other initialization after (possibly) creating the splash window
00115   EnableShellOpen();
00116   m_pMainWnd->DragAcceptFiles();
00117
00118   LoadStdProfileSettings();
00119   CPadView::Initialize();
00120   dlgPageSetup.Initialize();
00121
00122   // register any class objects we may have (for automation & OLE)
00123   COleTemplateServer::RegisterAll();
00124
00125   // open default file if command line doesn't have /Embedding
00126   if (!cmdInfo.m_bRunEmbedded)
00127   {
00128     // Dispatch commands specified on the command line
00129     if (!ProcessShellCommand(cmdInfo))
00130       return FALSE;
00131
00132     m_nCmdShow = nCmdShow;
00133     m_pMainWnd->UpdateWindow();
00134   }
00135
00136   return TRUE;
00137 }
00138
00139 BOOL CTheApp::OnIdle(LONG lCount)
00140 {
00141   // call base class idle first
00142   BOOL bResult = CWinApp::OnIdle(lCount);
00143
00144   // then do our work
00145   if (m_splash.m_hWnd != NULL)
00146   {
00147     if (::GetCurrentTime() - m_dwSplashTime > 2500)
00148     {
00149       // timeout expired, destroy the splash window
00150       m_splash.DestroyWindow();
00151       m_pMainWnd->UpdateWindow();
00152
00153       // NOTE: don't set bResult to FALSE,
00154       //  CWinApp::OnIdle may have returned TRUE
00155     }
00156     else
00157     {
00158       // check again later...
00159       bResult = TRUE;
00160     }
00161   }
00162
00163   return bResult;
00164 }
00165
00166 BOOL CTheApp::PreTranslateMessage(MSG* pMsg)
00167 {
00168   BOOL bResult = CWinApp::PreTranslateMessage(pMsg);
00169
00170   if (m_splash.m_hWnd != NULL &&
00171     (pMsg->message == WM_KEYDOWN ||
00172      pMsg->message == WM_SYSKEYDOWN ||
00173      pMsg->message == WM_LBUTTONDOWN ||
00174      pMsg->message == WM_RBUTTONDOWN ||
00175      pMsg->message == WM_MBUTTONDOWN ||
00176      pMsg->message == WM_NCLBUTTONDOWN ||
00177      pMsg->message == WM_NCRBUTTONDOWN ||
00178      pMsg->message == WM_NCMBUTTONDOWN))
00179   {
00180     m_splash.DestroyWindow();
00181     m_pMainWnd->UpdateWindow();
00182   }
00183
00184   return bResult;
00185 }
00186
00187 int CTheApp::ExitInstance()
00188 {
00189   dlgPageSetup.Terminate();
00190   CPadView::Terminate();
00191   CPadFrame::Terminate();
00192
00193   return CWinApp::ExitInstance();
00194 }
00195
00196 CTheApp::~CTheApp()
00197 {
00198 }
00199
00200 /////////////////////////////////////////////////////////////////////////////
00201 // CTheApp message handlers
00202
00203 void CTheApp::OnAppAbout()
00204 {
00205   CAboutBox about;
00206   about.DoModal();
00207 }
00208
00209 CPageSetupDlg NEAR dlgPageSetup;
00210 void CTheApp::OnPageSetup()
00211 {
00212   dlgPageSetup.DoModal();
00213 }
00214
00215 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/resource.h Source File

  • vc2008fp
  • MDITabsDemo

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by MDITabsDemo.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDS_WINDOWS_MANAGER             107
00008 #define IDS_WRONG_DISPLAY_SETTINGS  108
00009 #define IDR_MAINFRAME                   128
00010 #define IDR_MDITABTYPE                  129
00011 #define IDR_CONTEXT_MENU                130
00012 #define IDR_POPUP_TOOLBAR               131
00013 #define IDR_POPUP_MDITABS               132
00014 #define IDR_POPUP_STYLE_20007           133
00015 #define IDB_WORKSPACE                   147
00016 #define IDB_TOOLBAR256                  151
00017 #define IDR_THEME                       154
00018 #define IDC_COMPANY_URL                 1041
00019 #define ID_VIEW_CUSTOMIZE               32770
00020 #define ID_VIEW_TOOLBARS                32771
00021 #define ID_VIEW_WORKSPACE               32803
00022 #define ID_WINDOW_MANAGER               32823
00023 #define ID_VIEW_APPLOOK_2000            32832
00024 #define ID_VIEW_APPLOOK_XP              32833
00025 #define ID_VIEW_APPLOOK_2003            32834
00026 #define ID_VIEW_APPLOOK_WIN_XP          32835
00027 #define ID_VIEW_APPLOOK_VS2005          32836
00028 #define ID_VIEW_APPLOOK_2007_1          32837
00029 #define ID_VIEW_APPLOOK_2007_2          32838
00030 #define ID_VIEW_APPLOOK_2007_3          32839
00031 #define ID_VIEW_APPLOOK_2007_4          32840
00032 #define ID_VIEW_THEME_TOOLBAR           32841
00033 #define ID_LABEL                        32842
00034 #define ID_MDI_TABBED                   32843
00035
00036 // Next default values for new objects
00037 //
00038 #ifdef APSTUDIO_INVOKED
00039 #ifndef APSTUDIO_READONLY_SYMBOLS
00040 #define _APS_3D_CONTROLS                     1
00041 #define _APS_NEXT_RESOURCE_VALUE        156
00042 #define _APS_NEXT_COMMAND_VALUE         32844
00043 #define _APS_NEXT_CONTROL_VALUE         1042
00044 #define _APS_NEXT_SYMED_VALUE           109
00045 #endif
00046 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSnapPropertySheet Member List

This is the complete list of members for CSnapPropertySheet, including all inherited members.
CSnapPropertySheet() | CSnapPropertySheet | [inline]
CSnapPropertySheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CSnapPropertySheet |
CSnapPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CSnapPropertySheet |
PreTranslateMessage(MSG *pMsg) | CSnapPropertySheet | [virtual]
~CSnapPropertySheet() | CSnapPropertySheet | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/propsht.h Source File

  • general
  • CmnCtrl1

propsht.h

Go to the documentation of this file.
00001 // AllControlsSheet.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CAllControlsSheet
00015
00016 #include "treecpg.h"
00017 #include "animctrl.h"
00018 #include "toolpage.h"
00019 #include "datetime.h"
00020 #include "monthcal.h"
00021
00022 class CAllControlsSheet : public CPropertySheet
00023 {
00024   DECLARE_DYNAMIC(CAllControlsSheet)
00025
00026 // Construction
00027 public:
00028   CAllControlsSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00029   CAllControlsSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00030
00031 protected:
00032   void AddControlPages(void);
00033
00034 // Attributes
00035 public:
00036
00037   CTreeCtrlPage       m_treectrlpage;
00038   CAnimateCtrlPage    m_animctrlpage;
00039   CToolBarCtrlPage    m_toolbarpage;
00040   CDateTimePage       m_datetimepage;
00041   CMonthCalPage       m_monthcalpage;
00042 // Operations
00043 public:
00044
00045 // Overrides
00046   // ClassWizard generated virtual function overrides
00047   //{{AFX_VIRTUAL(CAllControlsSheet)
00048   //}}AFX_VIRTUAL
00049
00050 // Implementation
00051 public:
00052   virtual ~CAllControlsSheet();
00053   virtual BOOL OnInitDialog();
00054
00055   // Generated message map functions
00056 protected:
00057
00058   HICON m_hIcon;
00059
00060   //{{AFX_MSG(CAllControlsSheet)
00061   afx_msg HCURSOR OnQueryDragIcon();
00062   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065 };
00066
00067 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoView.cpp Source File

  • vc2008fp
  • ToolTipDemo

TooltipDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TooltipDemo.h"
00013
00014 #include "TooltipDemoDoc.h"
00015 #include "TooltipDemoView.h"
00016
00017 #include "MyToolTipCtrl.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CTooltipDemoView
00027
00028 IMPLEMENT_DYNCREATE(CTooltipDemoView, CFormView)
00029
00030 BEGIN_MESSAGE_MAP(CTooltipDemoView, CFormView)
00031   ON_BN_CLICKED(IDC_BOLD_LABEL, OnApplyParams)
00032   ON_BN_CLICKED(IDC_CUSTOM_COLORS, OnApplyParams)
00033   ON_BN_CLICKED(IDC_DRAW_DESCR, OnApplyParams)
00034   ON_BN_CLICKED(IDC_DRAW_ICON, OnApplyParams)
00035   ON_BN_CLICKED(IDC_ROUNDED_CORNERS, OnApplyParams)
00036   ON_BN_CLICKED(IDC_TT_TYPE, OnApplyParams)
00037   ON_BN_CLICKED(IDC_TT_TYPE2, OnApplyParams)
00038   ON_BN_CLICKED(IDC_TT_TYPE3, OnApplyParams)
00039   ON_BN_CLICKED(IDC_DRAW_SEPARATOR, OnApplyParams)
00040   ON_BN_CLICKED(IDC_SHOW_TOOLTIPS_IN_MENU, OnApplyParams)
00041   ON_BN_CLICKED(IDC_TT_TYPE4, OnApplyParams)
00042   ON_BN_CLICKED(IDC_TT_TYPE5, OnApplyParams)
00043   ON_WM_CONTEXTMENU()
00044   // Standard printing commands
00045   ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
00046   ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
00047   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CTooltipDemoView construction/destruction
00052
00053 CTooltipDemoView::CTooltipDemoView()
00054   : CFormView(CTooltipDemoView::IDD)
00055 {
00056   m_nTTType = 0;
00057   m_bBoldLabel = FALSE;
00058   m_bCustomColors = FALSE;
00059   m_bDrawDescription = FALSE;
00060   m_bDrawIcon = FALSE;
00061   m_bRoundedCorners = FALSE;
00062   m_bDrawSeparator = FALSE;
00063   m_bTTInPopupMenus = FALSE;
00064
00065   m_nTTType = theApp.GetInt (_T("TTType"), 0);
00066   m_bBoldLabel = theApp.GetInt (_T("BoldLabel"), TRUE);
00067   m_bCustomColors = theApp.GetInt (_T("CustomColors"), TRUE);
00068   m_bDrawDescription = theApp.GetInt (_T("DrawDescription"), TRUE);
00069   m_bDrawIcon = theApp.GetInt (_T("DrawIcon"), TRUE);
00070   m_bRoundedCorners = theApp.GetInt (_T("RoundedCorners"), TRUE);
00071   m_bDrawSeparator = theApp.GetInt (_T("DrawSeparator"), TRUE);
00072   m_bTTInPopupMenus = theApp.GetInt (_T("TTInPopupMenus"), TRUE);
00073 }
00074
00075 CTooltipDemoView::~CTooltipDemoView()
00076 {
00077 }
00078
00079 void CTooltipDemoView::DoDataExchange(CDataExchange* pDX)
00080 {
00081   CFormView::DoDataExchange(pDX);
00082   DDX_Radio(pDX, IDC_TT_TYPE, m_nTTType);
00083   DDX_Check(pDX, IDC_BOLD_LABEL, m_bBoldLabel);
00084   DDX_Check(pDX, IDC_CUSTOM_COLORS, m_bCustomColors);
00085   DDX_Check(pDX, IDC_DRAW_DESCR, m_bDrawDescription);
00086   DDX_Check(pDX, IDC_DRAW_ICON, m_bDrawIcon);
00087   DDX_Check(pDX, IDC_ROUNDED_CORNERS, m_bRoundedCorners);
00088   DDX_Check(pDX, IDC_DRAW_SEPARATOR, m_bDrawSeparator);
00089   DDX_Check(pDX, IDC_SHOW_TOOLTIPS_IN_MENU, m_bTTInPopupMenus);
00090 }
00091
00092 BOOL CTooltipDemoView::PreCreateWindow(CREATESTRUCT& cs)
00093 {
00094   // TODO: Modify the Window class or styles here by modifying
00095   //  the CREATESTRUCT cs
00096
00097   return CFormView::PreCreateWindow(cs);
00098 }
00099
00100 BOOL IsBalloonTooltipAvailable ()
00101 {
00102   CSettingsStore reg (FALSE, TRUE);
00103   DWORD dwEnableBalloonTips = 1;
00104
00105   if (reg.Open (_T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced")) &&
00106     reg.Read (_T("EnableBalloonTips"), dwEnableBalloonTips))
00107   {
00108     return dwEnableBalloonTips == 1;
00109   }
00110
00111   return TRUE;
00112 }
00113
00114 void CTooltipDemoView::OnInitialUpdate()
00115 {
00116   // There is only one view ever, so it only needs to do the initial
00117   // update once--otherwise the application is  resized needlessly.
00118   static BOOL bUpdatedOnce = FALSE;
00119   if (bUpdatedOnce)
00120     return;
00121   bUpdatedOnce = TRUE;
00122
00123   CFormView::OnInitialUpdate();
00124   GetParentFrame()->RecalcLayout();
00125   ResizeParentToFit();
00126
00127   // Check for balloon tooltips:
00128   if (!IsBalloonTooltipAvailable ())
00129   {
00130     if (m_nTTType == 1)
00131     {
00132       m_nTTType = 0;
00133       UpdateData (FALSE);
00134     }
00135
00136     GetDlgItem (IDC_TT_TYPE4)->EnableWindow (FALSE);
00137   }
00138   else
00139   {
00140     GetDlgItem (IDC_NO_BALLOON)->ShowWindow (SW_HIDE);
00141   }
00142
00143   OnApplyParams ();
00144 }
00145
00146 /////////////////////////////////////////////////////////////////////////////
00147 // CTooltipDemoView printing
00148
00149 void CTooltipDemoView::OnFilePrintPreview()
00150 {
00151   AFXPrintPreview (this);
00152 }
00153
00154 BOOL CTooltipDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00155 {
00156   // default preparation
00157   return DoPreparePrinting(pInfo);
00158 }
00159
00160 void CTooltipDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00161 {
00162   // TODO: add extra initialization before printing
00163 }
00164
00165 void CTooltipDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00166 {
00167   // TODO: add cleanup after printing
00168 }
00169
00170 void CTooltipDemoView::OnPrint(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00171 {
00172   // TODO: add customized printing code here
00173 }
00174
00175 /////////////////////////////////////////////////////////////////////////////
00176 // CTooltipDemoView diagnostics
00177
00178 #ifdef _DEBUG
00179 void CTooltipDemoView::AssertValid() const
00180 {
00181   CFormView::AssertValid();
00182 }
00183
00184 void CTooltipDemoView::Dump(CDumpContext& dc) const
00185 {
00186   CFormView::Dump(dc);
00187 }
00188
00189 CTooltipDemoDoc* CTooltipDemoView::GetDocument() // non-debug version is inline
00190 {
00191   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTooltipDemoDoc)));
00192   return (CTooltipDemoDoc*)m_pDocument;
00193 }
00194 #endif //_DEBUG
00195
00196 /////////////////////////////////////////////////////////////////////////////
00197 // CTooltipDemoView message handlers
00198
00199 void CTooltipDemoView::OnContextMenu(CWnd*, CPoint point)
00200 {
00201   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00202 }
00203
00204 void CTooltipDemoView::OnApplyParams()
00205 {
00206   UpdateData ();
00207
00208   EnableControls ();
00209
00210   afxGlobalData.m_nMaxToolTipWidth = 200;
00211
00212   theApp.WriteInt (_T("TTType"), m_nTTType);
00213   theApp.WriteInt (_T("BoldLabel"), m_bBoldLabel);
00214   theApp.WriteInt (_T("CustomColors"), m_bCustomColors);
00215   theApp.WriteInt (_T("DrawDescription"), m_bDrawDescription);
00216   theApp.WriteInt (_T("DrawIcon"), m_bDrawIcon);
00217   theApp.WriteInt (_T("RoundedCorners"), m_bRoundedCorners);
00218   theApp.WriteInt (_T("DrawSeparator"), m_bDrawSeparator);
00219   theApp.WriteInt (_T("TTInPopupMenus"), m_bTTInPopupMenus);
00220
00221   theApp.m_bTTInPopupMenus = m_bTTInPopupMenus;
00222
00223   if (m_nTTType == 0) // Standard tooltip
00224   {
00225     theApp.GetTooltipManager ()->SetTooltipParams (
00226       AFX_TOOLTIP_TYPE_ALL,
00227       NULL,
00228       NULL);
00229     return;
00230   }
00231
00232   if (m_nTTType == 1) // Balloon tooltip
00233   {
00234     CMFCToolTipInfo paramsBalloon;
00235     paramsBalloon.m_bBalloonTooltip = TRUE;
00236
00237     theApp.GetTooltipManager ()->SetTooltipParams (
00238       AFX_TOOLTIP_TYPE_ALL,
00239       RUNTIME_CLASS (CMFCToolTipCtrl),
00240       &paramsBalloon);
00241     return;
00242   }
00243
00244   if (m_nTTType == 3) // Visual Manager-based tooltip
00245   {
00246     CMFCToolTipInfo params;
00247     params.m_bVislManagerTheme = TRUE;
00248
00249     theApp.GetTooltipManager ()->SetTooltipParams (
00250       AFX_TOOLTIP_TYPE_ALL,
00251       RUNTIME_CLASS (CMFCToolTipCtrl),
00252       &params);
00253     return;
00254   }
00255
00256   if (m_nTTType == 4) // Custom tooltip
00257   {
00258     theApp.GetTooltipManager ()->SetTooltipParams (
00259       AFX_TOOLTIP_TYPE_ALL,
00260       RUNTIME_CLASS (CMyToolTipCtrl));
00261     return;
00262   }
00263
00264   // Custom tooltip with parameters:
00265   CMFCToolTipInfo params;
00266
00267   params.m_bBoldLabel = m_bBoldLabel;
00268   params.m_bDrawDescription = m_bDrawDescription;
00269   params.m_bDrawIcon = m_bDrawIcon;
00270   params.m_bRoundedCorners = m_bRoundedCorners;
00271   params.m_bDrawSeparator = m_bDrawSeparator;
00272
00273   if (m_bCustomColors)
00274   {
00275     params.m_clrFill = RGB (255, 255, 255);
00276     params.m_clrFillGradient = RGB (228, 228, 240);
00277     params.m_clrText = RGB (61, 83, 80);
00278     params.m_clrBorder = RGB (144, 149, 168);
00279   }
00280
00281   theApp.GetTooltipManager ()->SetTooltipParams (
00282     AFX_TOOLTIP_TYPE_ALL,
00283     RUNTIME_CLASS (CMFCToolTipCtrl),
00284     &params);
00285 }
00286
00287 void CTooltipDemoView::EnableControls ()
00288 {
00289   BOOL bEnableParams = m_nTTType == 2;
00290
00291   GetDlgItem (IDC_DRAW_ICON)->EnableWindow (bEnableParams);
00292   GetDlgItem (IDC_DRAW_DESCR)->EnableWindow (bEnableParams);
00293   GetDlgItem (IDC_ROUNDED_CORNERS)->EnableWindow (bEnableParams);
00294   GetDlgItem (IDC_BOLD_LABEL)->EnableWindow (bEnableParams && m_bDrawDescription);
00295   GetDlgItem (IDC_CUSTOM_COLORS)->EnableWindow (bEnableParams);
00296   GetDlgItem (IDC_DRAW_SEPARATOR)->EnableWindow (bEnableParams && m_bDrawDescription);
00297 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CComboToolBar Member List

This is the complete list of members for CComboToolBar, including all inherited members.
GetView() | CComboToolBar |
m_toolBarCombo | CComboToolBar |
OnSelectEndOk() | CComboToolBar | [protected]
OnSetFocus() | CComboToolBar | [protected]
PreTranslateMessage(MSG *pMsg) | CComboToolBar | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNetAddressCtrlPage Member List

This is the complete list of members for CNetAddressCtrlPage, including all inherited members.
CNetAddressCtrlPage() | CNetAddressCtrlPage |
DoDataExchange(CDataExchange *pDX) | CNetAddressCtrlPage | [protected, virtual]
IDD enum value | CNetAddressCtrlPage |
m_listbox | CNetAddressCtrlPage | [private]
m_netaddrctrl | CNetAddressCtrlPage | [private]
OnBnClickedButtonValidate() | CNetAddressCtrlPage |
OnEnChangeNetaddress() | CNetAddressCtrlPage |
OnInitDialog() | CNetAddressCtrlPage | [virtual]
~CNetAddressCtrlPage() | CNetAddressCtrlPage | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IMAGELib::_DImageEvents Member List

This is the complete list of members for IMAGELib::_DImageEvents, including all inherited members.
ReadyStateChange() IMAGELib::_DImageEvents
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBar.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMCaptionBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MSMCaptionBar.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMCaptionBar.h"
00015 #include "MSMVisualManager.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMSMCaptionBar
00025
00026 IMPLEMENT_DYNCREATE(CMSMCaptionBar, CPane)
00027
00028 CMSMCaptionBar::CMSMCaptionBar ()
00029   : CPane   ()
00030   , m_hIcon           (NULL)
00031   , m_szIcon          (0, 0)
00032   , m_bParentActive   (false)
00033   , m_bParentMaximize (false)
00034 {
00035 }
00036
00037 CMSMCaptionBar::~CMSMCaptionBar ()
00038 {
00039 }
00040
00041 BOOL CMSMCaptionBar::PreCreateWindow (CREATESTRUCT& cs)
00042 {
00043   // in Win4, status bars do not have a border at all, since it is
00044   //  provided by the client area.
00045   if ((m_dwStyle & (CBRS_ALIGN_ANY | CBRS_BORDER_ANY)) == CBRS_TOP)
00046   {
00047     m_dwStyle &= ~(CBRS_BORDER_ANY | CBRS_BORDER_3D);
00048   }
00049
00050   return CPane::PreCreateWindow(cs);
00051 }
00052
00053 BOOL CMSMCaptionBar::Create (CWnd* pParentWnd, UINT nID)
00054 {
00055   return CreateEx(pParentWnd, nID);
00056 }
00057
00058 BOOL CMSMCaptionBar::CreateEx (CWnd* pParentWnd, UINT nID)
00059 {
00060     ASSERT_VALID(pParentWnd);   // must have a parent
00061
00062   DWORD dwStyle = WS_VISIBLE | WS_CHILD | CBRS_TOP;
00063
00064   // save the style
00065   SetPaneAlignment (dwStyle & CBRS_ALL);
00066
00067   // create the HWND
00068   CRect rect(0, 0, 0, 0);
00069
00070   LPCTSTR lpszClass = AfxRegisterWndClass(CS_DBLCLKS, ::LoadCursor(NULL, IDC_ARROW),
00071     (HBRUSH)(COLOR_BTNFACE+1), NULL);
00072
00073   m_dwControlBarStyle = 0; // can't float, resize, close, slide
00074
00075   BOOL bSystemSmall = (pParentWnd->GetExStyle() & WS_EX_TOOLWINDOW) != 0;
00076
00077   if (!CWnd::Create(lpszClass, NULL, dwStyle | WS_CLIPSIBLINGS, rect, pParentWnd, nID))
00078   {
00079     return FALSE;
00080   }
00081
00082   if (pParentWnd->IsKindOf (RUNTIME_CLASS (CFrameWndEx)))
00083   {
00084     ((CFrameWndEx*) pParentWnd)->AddPane (this);
00085   }
00086   else
00087   {
00088     ASSERT (FALSE);
00089     return FALSE;
00090   }
00091
00092   HINSTANCE hInstance = AfxFindResourceHandle (MAKEINTRESOURCE (nID), RT_GROUP_ICON);
00093
00094   if (hInstance != NULL)
00095   {
00096     CSize szIcon (::GetSystemMetrics (SM_CXSMICON), ::GetSystemMetrics (SM_CYSMICON));
00097
00098     HICON hIcon = (HICON)::LoadImage (hInstance, MAKEINTRESOURCE (nID), IMAGE_ICON,
00099       szIcon.cx, szIcon.cy, LR_DEFAULTCOLOR);
00100
00101     if (hIcon != NULL)
00102     {
00103       SetIcon (hIcon);
00104     }
00105   }
00106
00107   CString strCaption;
00108
00109   pParentWnd->GetWindowText (strCaption);
00110
00111   if (strCaption.IsEmpty ())
00112   {
00113     BOOL bValidString;
00114     bValidString = strCaption.LoadString (nID);
00115   }
00116
00117   if (!strCaption.IsEmpty ())
00118   {
00119     SetWindowText (strCaption);
00120   }
00121
00122   NONCLIENTMETRICS ncm;
00123   ZeroMemory (&ncm, sizeof (NONCLIENTMETRICS));
00124   ncm.cbSize = sizeof (NONCLIENTMETRICS);
00125
00126   SystemParametersInfo (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
00127
00128   m_SystemHeight  = ::GetSystemMetrics (bSystemSmall ? SM_CYSMCAPTION : SM_CYCAPTION);
00129   m_CaptionHeight = m_SystemHeight;
00130
00131   SetCaptionFont (bSystemSmall ? ncm.lfSmCaptionFont : ncm.lfCaptionFont);
00132
00133   CRect rt (0, 0, bSystemSmall ? ncm.iSmCaptionWidth : ncm.iCaptionWidth,
00134                 bSystemSmall ? ncm.iSmCaptionHeight : ncm.iCaptionHeight);
00135
00136
00137   CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
00138     CMFCVisualManager::GetInstance ());
00139
00140   if (pManager != NULL)
00141   {
00142     if (pManager->LoadMSMCaptionButtonsIcons (_T("IDB_MSM_CAPTION_BTNS")))
00143     {
00144       rt.right  = pManager->GetMSMCaptionButtonsSize ().cx;
00145       rt.bottom = pManager->GetMSMCaptionButtonsSize ().cx;
00146     };
00147
00148     m_CaptionHeight = rt.bottom + 2;
00149   }
00150
00151
00152   m_BtnClose.Create (_T(""), BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
00153                    rt, this, SC_CLOSE);
00154   m_BtnClose.SetTooltip (_T("Close"));
00155
00156   m_BtnMaximize.Create (_T(""), BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
00157                    rt, this, SC_MAXIMIZE);
00158   m_BtnMaximize.SetTooltip (_T("Maximize"));
00159
00160   m_BtnMinimize.Create (_T(""), BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
00161                    rt, this, SC_MINIMIZE);
00162   m_BtnMinimize.SetTooltip (_T("Minimize"));
00163
00164   return TRUE;
00165 }
00166
00167 void CMSMCaptionBar::SetCaptionHeight (int nHeight)
00168 {
00169   if (m_CaptionHeight != nHeight)
00170   {
00171     m_CaptionHeight = nHeight;
00172
00173     RecalcLayout ();
00174   }
00175 }
00176
00177 CSize CMSMCaptionBar::CalcFixedLayout (BOOL, BOOL)
00178 {
00179   ASSERT_VALID(this);
00180
00181   // recalculate based on font height + icon height + borders
00182   TEXTMETRIC tm;
00183   {
00184     CClientDC dcScreen(NULL);
00185     HFONT hFont = GetCaptionFont ();
00186
00187     HGDIOBJ hOldFont = dcScreen.SelectObject(hFont);
00188     VERIFY(dcScreen.GetTextMetrics(&tm));
00189     dcScreen.SelectObject(hOldFont);
00190   }
00191
00192   int nHeight = max ( max (tm.tmHeight, m_szIcon.cy), GetCaptionHeight ());
00193
00194   return CSize (32767, nHeight);// + CY_BORDER * 4 - rectSize.Height());
00195 }
00196
00197 void CMSMCaptionBar::SetCaptionFont (const LOGFONT& lf)
00198 {
00199   if (m_CaptionFont.GetSafeHandle () != NULL)
00200   {
00201     m_CaptionFont.DeleteObject ();
00202   }
00203
00204   m_CaptionFont.CreateFontIndirect (&lf);
00205 }
00206
00207 void CMSMCaptionBar::SetIcon (HICON hIcon)
00208 {
00209   m_szIcon = CSize (0, 0);
00210
00211   if (m_hIcon != NULL)
00212   {
00213     ::DestroyIcon(m_hIcon);
00214   }
00215
00216   m_hIcon = hIcon;
00217
00218   if (m_hIcon != NULL)
00219   {
00220     ICONINFO ii;
00221     ZeroMemory (&ii, sizeof (ICONINFO));
00222
00223     ::GetIconInfo (m_hIcon, &ii);
00224
00225     if (ii.hbmColor != NULL)
00226     {
00227       BITMAP bm;
00228       ZeroMemory (&bm, sizeof (BITMAP));
00229
00230       if (::GetObject (ii.hbmColor, sizeof (BITMAP), &bm) != 0)
00231       {
00232         m_szIcon.cx = bm.bmWidth;
00233         m_szIcon.cy = bm.bmHeight;
00234       }
00235     }
00236   }
00237 }
00238
00239 void CMSMCaptionBar::SetParentActive (BOOL bParentActive)
00240 {
00241   if (m_bParentActive != bParentActive)
00242   {
00243     m_bParentActive = bParentActive;
00244     Invalidate ();
00245   }
00246 }
00247
00248 void CMSMCaptionBar::SetParentMaximize (BOOL bParentMaximize)
00249 {
00250   if (m_BtnMaximize.GetSafeHwnd () != NULL)
00251   {
00252     m_BtnMaximize.SetSysCommand (bParentMaximize ? SC_RESTORE : SC_MAXIMIZE);
00253     m_BtnMaximize.SetTooltip (bParentMaximize ? _T("Restore down") : _T("Maximize"));
00254   }
00255
00256   if (m_bParentMaximize != bParentMaximize)
00257   {
00258     m_bParentMaximize = bParentMaximize;
00259
00260     Invalidate ();
00261   }
00262 }
00263
00264 COLORREF CMSMCaptionBar::GetCaptionTextColor () const
00265 {
00266   return IsParentActive () ? afxGlobalData.clrCaptionText : afxGlobalData.clrInactiveCaptionText;
00267 }
00268
00269 void CMSMCaptionBar::DoPaint (CDC* pDCPaint)
00270 {
00271   ASSERT_VALID(this);
00272   ASSERT_VALID(pDCPaint);
00273
00274   CRect rectClip;
00275   pDCPaint->GetClipBox (rectClip);
00276
00277   CRect rect;
00278   GetClientRect(rect);
00279
00280   CMemDC memDC (*pDCPaint, this);
00281   CDC* pDC = &memDC.GetDC ();
00282
00283   CMFCVisualManager::GetInstance ()->OnFillBarBackground (pDC, this,
00284     rect, rectClip);
00285
00286   HGDIOBJ  hOldFont    = pDC->SelectObject (GetCaptionFont());
00287
00288   int      nOldMode    = pDC->SetBkMode    (TRANSPARENT);
00289   COLORREF crTextColor = pDC->SetTextColor (GetCaptionTextColor());
00290   COLORREF crBkColor   = pDC->SetBkColor   (afxGlobalData.clrBtnFace);
00291
00292   if (m_hIcon != NULL && m_szIcon != CSize (0, 0))
00293   {
00294     CRect rectIcon (0, 0, m_SystemHeight, rect.Height ());
00295
00296     int x = max (0, (rectIcon.Width ()  - m_szIcon.cx) / 2);
00297     int y = max (0, (rectIcon.Height () - m_szIcon.cy) / 2);
00298
00299     ::DrawIconEx (pDC->GetSafeHdc (), x, y, m_hIcon, m_szIcon.cx, m_szIcon.cy,
00300             0, NULL, DI_NORMAL);
00301
00302     rect.left  += m_SystemHeight;
00303
00304     CRect rt;
00305     m_BtnMinimize.GetWindowRect (rt);
00306     ScreenToClient (rt);
00307
00308     rect.right = rt.left - 1;
00309   }
00310
00311   if (!m_strCaption.IsEmpty ())
00312   {
00313     pDC->DrawText (m_strCaption, rect, DT_END_ELLIPSIS | DT_SINGLELINE | DT_VCENTER);
00314   }
00315
00316   pDC->SetTextColor (crTextColor);
00317   pDC->SetBkColor   (crBkColor);
00318   pDC->SetBkMode    (nOldMode);
00319
00320   pDC->SelectObject (hOldFont);
00321 }
00322
00323 BEGIN_MESSAGE_MAP(CMSMCaptionBar, CPane)
00324   ON_MESSAGE(WM_SETTEXT, OnSetText)
00325   ON_WM_SIZE()
00326   ON_WM_CONTEXTMENU()
00327   ON_WM_SYSCOMMAND()
00328 END_MESSAGE_MAP()
00329
00330 /////////////////////////////////////////////////////////////////////////////
00331 // CMSMCaptionBar message handlers
00332
00333 LRESULT CMSMCaptionBar::OnSetText (WPARAM, LPARAM lParam)
00334 {
00335   TRY
00336   {
00337     m_strCaption.Empty();
00338     if (lParam != NULL)
00339     {
00340       m_strCaption = (LPCTSTR)lParam;
00341     }
00342
00343     Invalidate ();
00344   }
00345   CATCH_ALL(e)
00346   {
00347     // Note: DELETE_EXCEPTION(e) not required
00348     return FALSE;
00349   }
00350   END_CATCH_ALL
00351
00352   return TRUE;
00353 }
00354
00355 void CMSMCaptionBar::OnSize (UINT nType, int cx, int cy)
00356 {
00357   CPane::OnSize(nType, cx, cy);
00358
00359   if (m_BtnClose.GetSafeHwnd () != NULL && m_BtnMaximize.GetSafeHwnd () != NULL &&
00360     m_BtnMinimize.GetSafeHwnd () != NULL)
00361   {
00362     int nHeight = cy;
00363
00364     DWORD dwFlag = SWP_NOOWNERZORDER | SWP_NOZORDER;
00365
00366     CRect rt;
00367     m_BtnClose.GetWindowRect (rt);
00368     rt.OffsetRect (-rt.TopLeft ());
00369
00370     CSize szBtnSize (0, 0);
00371
00372     CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
00373       CMFCVisualManager::GetInstance ());
00374
00375     if (pManager != NULL)
00376     {
00377       szBtnSize = pManager->GetMSMCaptionButtonsSize ();
00378     }
00379
00380     if (szBtnSize == CSize (0, 0))
00381     {
00382       szBtnSize = rt.Size ();
00383     }
00384
00385     if (szBtnSize.cy > nHeight)
00386     {
00387       rt.right   = szBtnSize.cy;
00388       rt.bottom  = szBtnSize.cy;
00389       rt.DeflateRect (1, 1);
00390     }
00391     else
00392     {
00393       rt.right   = szBtnSize.cx;
00394       rt.top     = (nHeight - szBtnSize.cy) / 2;
00395       rt.bottom  = rt.top + szBtnSize.cy;
00396     }
00397
00398     rt.OffsetRect (cx - rt.Width (), 0);
00399     m_BtnClose.SetWindowPos(&wndTop, rt.left, rt.top, rt.Width(), rt.Height(), dwFlag);
00400
00401     rt.OffsetRect(-rt.Width()-1, 0);
00402     m_BtnMaximize.SetWindowPos(&wndTop, rt.left, rt.top, rt.Width(), rt.Height(), dwFlag);
00403
00404     rt.OffsetRect(-rt.Width()-1, 0);
00405     m_BtnMinimize.SetWindowPos(&wndTop, rt.left, rt.top, rt.Width(), rt.Height(), dwFlag);
00406   }
00407 }
00408
00409 BOOL CMSMCaptionBar::PreTranslateMessage (MSG* pMsg)
00410 {
00411   if (!CPane::PreTranslateMessage (pMsg))
00412   {
00413     return FALSE;
00414   }
00415
00416   CWnd* pParentWnd = GetParent ();
00417
00418   if (pParentWnd != NULL)
00419   {
00420     CPoint pt;
00421     ::GetCursorPos (&pt);
00422
00423     UINT uiHit = HitTest (pt);
00424
00425     if (uiHit == HTCAPTION || uiHit == HTSYSMENU)
00426     {
00427       UINT   message = 0;
00428       WPARAM wParam  = uiHit;
00429       LPARAM lParam  = MAKELPARAM (pt.x, pt.y);
00430
00431       switch (pMsg->message)
00432       {
00433       case WM_LBUTTONDOWN:
00434         message = WM_NCLBUTTONDOWN;
00435         break;
00436       case WM_LBUTTONUP:
00437         message = WM_NCLBUTTONUP;
00438         break;
00439       case WM_LBUTTONDBLCLK:
00440         message = WM_NCLBUTTONDBLCLK;
00441         break;
00442       }
00443
00444       if (message != 0)
00445       {
00446         if (message == WM_NCLBUTTONDOWN && uiHit == HTSYSMENU)
00447         {
00448           CRect rt;
00449           GetWindowRect (rt);
00450
00451           ShowSysMenu (CPoint (rt.left, rt.bottom));
00452         }
00453         else
00454         {
00455           pParentWnd->SendMessage (message, wParam, lParam);
00456         }
00457       }
00458     }
00459   }
00460
00461   return TRUE;
00462 }
00463
00464 UINT CMSMCaptionBar::HitTest (const CPoint& pt) const
00465 {
00466   UINT uiHit = HTNOWHERE;
00467
00468   CPoint ptHit  (pt);
00469   ScreenToClient (&ptHit);
00470
00471   CRect rtClient;
00472   GetClientRect (rtClient);
00473
00474   if (rtClient.PtInRect (ptHit))
00475   {
00476     uiHit = HTCAPTION;
00477
00478     CRect rt (0, 0, m_SystemHeight, GetCaptionHeight ());
00479
00480     if (m_hIcon != NULL && m_szIcon != CSize (0, 0))
00481     {
00482       if (rt.PtInRect (ptHit))
00483       {
00484         uiHit = HTSYSMENU;
00485       }
00486     }
00487
00488     if (uiHit == HTCAPTION)
00489     {
00490       const CWnd* pCapture = GetCapture ();
00491
00492       const CMSMCaptionBarButton* pBtns[3] =
00493         {
00494           &m_BtnClose, &m_BtnMaximize, &m_BtnMinimize
00495         };
00496
00497       for (long i = 0; i < 3; i++)
00498       {
00499         const CMSMCaptionBarButton* pBtn = pBtns[i];
00500
00501         if (pBtn != NULL && pBtn->GetSafeHwnd () != NULL &&
00502           pBtn->IsWindowVisible ())
00503         {
00504           pBtn->GetWindowRect (rt);
00505           if (rt.PtInRect (pt) || pCapture == pBtn)
00506           {
00507             switch (pBtn->GetSysCommand ())
00508             {
00509             case SC_CLOSE:
00510               uiHit = HTCLOSE;
00511               break;
00512             case SC_MINIMIZE:
00513               uiHit = HTMINBUTTON; // or HTREDUCE
00514               break;
00515             case SC_RESTORE:
00516             case SC_MAXIMIZE:
00517               uiHit = HTMAXBUTTON; // or HTZOOM
00518               break;
00519             case SC_CONTEXTHELP:
00520               uiHit = HTHELP;
00521               break;
00522             default:
00523               ASSERT (FALSE);
00524             }
00525             break;
00526           }
00527         }
00528       }
00529     }
00530   }
00531
00532   return uiHit;
00533 }
00534
00535 void CMSMCaptionBar::ShowSysMenu (const CPoint& point)
00536 {
00537   CWnd* pParentWnd = GetParent ();
00538
00539   if (pParentWnd != NULL)
00540   {
00541     CMenu* pMenu = pParentWnd->GetSystemMenu (FALSE);
00542
00543     if (pMenu == NULL || pMenu->GetSafeHmenu () == NULL)
00544     {
00545       return;
00546     }
00547
00548     pMenu->SetDefaultItem (SC_CLOSE);
00549
00550     if (m_bParentMaximize)
00551     {
00552       pMenu->EnableMenuItem (SC_SIZE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
00553       pMenu->EnableMenuItem (SC_MOVE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
00554       pMenu->EnableMenuItem (SC_MAXIMIZE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
00555
00556       pMenu->EnableMenuItem (SC_RESTORE, MF_BYCOMMAND | MF_ENABLED);
00557     }
00558     else
00559     {
00560       pMenu->EnableMenuItem (SC_RESTORE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
00561
00562       pMenu->EnableMenuItem (SC_SIZE, MF_BYCOMMAND | MF_ENABLED);
00563       pMenu->EnableMenuItem (SC_MOVE, MF_BYCOMMAND | MF_ENABLED);
00564       pMenu->EnableMenuItem (SC_MAXIMIZE, MF_BYCOMMAND | MF_ENABLED);
00565     }
00566
00567     ((CWinAppEx*)AfxGetApp ())->GetContextMenuManager ()->ShowPopupMenu
00568       (pMenu->GetSafeHmenu(), point.x, point.y, this, TRUE, TRUE, FALSE);
00569   }
00570 }
00571
00572 void CMSMCaptionBar::OnContextMenu (CWnd* /*pWnd*/, CPoint point)
00573 {
00574   UINT uiHit = HitTest (point);
00575
00576   if (uiHit == HTCAPTION || uiHit == HTSYSMENU)
00577   {
00578     ShowSysMenu (point);
00579   }
00580 }
00581
00582 BOOL CMSMCaptionBar::OnCommand (WPARAM wParam, LPARAM lParam)
00583 {
00584   UINT nID = LOWORD (wParam);
00585
00586   if (SC_SIZE <= nID && nID <= SC_CONTEXTHELP)
00587   {
00588     OnSysCommand (nID, 0);
00589     return TRUE;
00590   }
00591
00592   return CPane::OnCommand(wParam, lParam);
00593 }
00594
00595 void CMSMCaptionBar::OnSysCommand(UINT nID, LPARAM lParam)
00596 {
00597   CWnd* pParentWnd = GetParent ();
00598
00599   if (pParentWnd != NULL)
00600   {
00601     pParentWnd->PostMessage (WM_SYSCOMMAND, nID, lParam);
00602   }
00603 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/MainFrm.cpp Source File

  • vc2008fp
  • VisualStudioDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "FindComboBox.h"
00013 #include "OptionsDlg.h"
00014 #include "MainFrm.h"
00015
00016 #include "ChildFrm.h"
00017 #include "UndoBar.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainFrame
00027
00028 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWndEx)
00029
00030 const int  iMaxUserToolbars = 10;
00031 const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
00032 const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1;
00033
00034 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWndEx)
00035   ON_WM_CREATE()
00036   ON_COMMAND(ID_WINDOW_MANAGER, OnWindowManager)
00037   ON_COMMAND(ID_HELP_KEYBOARDMAP, OnHelpKeyboardmap)
00038   ON_COMMAND(ID_FILE_NEW_PROJECT, OnFileNewProject)
00039   ON_COMMAND(ID_FILE_NEW_BLANK_SOLUTION, OnFileNewBlankSolution)
00040   ON_COMMAND(ID_FILE_OPEN_SOLUTION, OnFileOpenSolution)
00041   ON_COMMAND(ID_FILE_CLOSE_SOLUTION, OnFileCloseSolution)
00042   ON_COMMAND(ID_FILE_SAVE_ALL, OnFileSaveAll)
00043   ON_COMMAND(ID_VIEW_REFRESH, OnViewRefresh)
00044   ON_COMMAND(ID_TOOLS_CONNECT_TO_DATABASE, OnToolsConnectToDatabase)
00045   ON_COMMAND(ID_TOOLS_DEBUG_PROCESSES, OnToolsDebugProcesses)
00046   ON_COMMAND(ID_VIEW_FULLSCREEN, OnViewFullScreen)
00047   ON_COMMAND(ID_TOOLS_OPTIONS, OnToolsOptions)
00048   ON_COMMAND(ID_HELP_WEB, OnHelpWeb)
00049   ON_COMMAND(ID_MDI_MOVE_TO_NEXT_GROUP, OnMdiMoveToNextGroup)
00050   ON_COMMAND(ID_MDI_MOVE_TO_PREV_GROUP, OnMdiMoveToPrevGroup)
00051   ON_COMMAND(ID_MDI_NEW_HORZ_TAB_GROUP, OnMdiNewHorzTabGroup)
00052   ON_COMMAND(ID_MDI_NEW_VERT_GROUP, OnMdiNewVertGroup)
00053   ON_COMMAND(ID_MDI_CANCEL, OnMdiCancel)
00054   ON_WM_CLOSE()
00055   ON_COMMAND(ID_VIEW_CLASS, OnViewClass)
00056   ON_UPDATE_COMMAND_UI(ID_VIEW_CLASS, OnUpdateViewClass)
00057   ON_COMMAND(ID_VIEW_FILE, OnViewFile)
00058   ON_UPDATE_COMMAND_UI(ID_VIEW_FILE, OnUpdateViewFile)
00059   ON_COMMAND(ID_VIEW_RESOURCE, OnViewResource)
00060   ON_UPDATE_COMMAND_UI(ID_VIEW_RESOURCE, OnUpdateViewResource)
00061   ON_COMMAND(ID_VIEW_PROPERTIES, OnViewProperties)
00062   ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTIES, OnUpdateViewProperties)
00063   ON_COMMAND(ID_VIEW_OUTPUT, OnViewOutput)
00064   ON_UPDATE_COMMAND_UI(ID_VIEW_OUTPUT, OnUpdateViewOutput)
00065   ON_COMMAND(ID_VIEW_WATCH, OnViewWatch)
00066   ON_UPDATE_COMMAND_UI(ID_VIEW_WATCH, OnUpdateViewWatch)
00067   ON_COMMAND(ID_VIEW_DYNAMICHELP, OnViewDynamichelp)
00068   ON_UPDATE_COMMAND_UI(ID_VIEW_DYNAMICHELP, OnUpdateViewDynamichelp)
00069   ON_COMMAND(ID_MDI_TABBED_DOCUMENT, OnMdiTabbedDocument)
00070   ON_UPDATE_COMMAND_UI(ID_MDI_TABBED_DOCUMENT, OnUpdateMdiTabbedDocument)
00071   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00072   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00073   ON_REGISTERED_MESSAGE(AFX_WM_ON_GET_TAB_TOOLTIP, OnGetTabToolTip)
00074   ON_REGISTERED_MESSAGE(AFX_WM_CUSTOMIZEHELP, OnHelpCustomizeToolbars)
00075   ON_REGISTERED_MESSAGE(AFX_WM_CREATETOOLBAR, OnToolbarCreateNew)
00076   ON_WM_SETTINGCHANGE()
00077 END_MESSAGE_MAP()
00078
00079 static UINT indicators[] =
00080 {
00081   ID_SEPARATOR,           // status line indicator
00082   ID_INDICATOR_CAPS,
00083   ID_INDICATOR_NUM,
00084   ID_INDICATOR_SCRL,
00085 };
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CMainFrame construction/destruction
00089
00090 CMainFrame::CMainFrame()
00091 {
00092   CMFCPopupMenu::SetForceShadow(TRUE);
00093
00094   m_bCanConvertControlBarToMDIChild = TRUE;
00095 }
00096
00097 CMainFrame::~CMainFrame()
00098 {
00099 }
00100
00101 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00102 {
00103   if (CMDIFrameWndEx::OnCreate(lpCreateStruct) == -1)
00104     return -1;
00105
00106   CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerVS2005));
00107
00108   CMFCToolBarComboBoxButton::SetFlatMode();
00109
00110   // Load toolbar user images:
00111   if (m_UserImages.Load(_T(".\\UserImages.bmp")))
00112   {
00113     CMFCToolBar::SetUserImages(&m_UserImages);
00114   }
00115
00116   CMFCToolBar::EnableQuickCustomization();
00117
00118   // Create menu bar:
00119   if (!m_wndMenuBar.Create(this))
00120   {
00121     TRACE0("Failed to create menubar\n");
00122     return -1;      // fail to create
00123   }
00124
00125   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC | CBRS_TOOLTIPS | CBRS_FLYBY);
00126
00127   // Menu will not take the focus on activation:
00128   CMFCPopupMenu::SetForceMenuFocus(FALSE);
00129
00130   // Create Resource toolbar:
00131   if (!m_wndToolbarResource.Create(this, WS_CHILD|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC| CBRS_GRIPPER | CBRS_BORDER_3D, IDR_TOOLBAR_RESOURCE) || !m_wndToolbarResource.LoadToolBar(IDR_TOOLBAR_RESOURCE))
00132   {
00133     TRACE0("Failed to create build toolbar\n");
00134     return FALSE;      // fail to create
00135   }
00136
00137   // Create main toolbar:
00138   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00139   {
00140     TRACE0("Failed to create toolbar\n");
00141     return -1;      // fail to create
00142   }
00143
00144   BOOL bValidString;
00145   CString strMainToolbarTitle;
00146   bValidString = strMainToolbarTitle.LoadString(IDS_MAIN_TOOLBAR);
00147   m_wndToolBar.SetWindowText(strMainToolbarTitle);
00148
00149   // Create Build toolbar:
00150   if (!m_wndToolbarBuild.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC| CBRS_GRIPPER | CBRS_BORDER_3D, ID_VIEW_BUILD_TOOLBAR) || !m_wndToolbarBuild.LoadToolBar(IDR_BUILD))
00151   {
00152     TRACE0("Failed to create build toolbar\n");
00153     return FALSE;      // fail to create
00154   }
00155
00156   CString strBuildToolbarTitle;
00157   bValidString = strBuildToolbarTitle.LoadString(IDS_BUILD_TOOLBAR);
00158   m_wndToolbarBuild.SetWindowText(strBuildToolbarTitle);
00159
00160   // Create Edit toolbar:
00161   if (!m_wndToolbarEdit.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC| CBRS_GRIPPER | CBRS_BORDER_3D, ID_VIEW_EDIT_TOOLBAR) || !m_wndToolbarEdit.LoadToolBar(IDR_EDIT))
00162   {
00163     TRACE0("Failed to create edit toolbar\n");
00164     return FALSE;      // fail to create
00165   }
00166
00167   CString strEditToolbarTitle;
00168   bValidString = strEditToolbarTitle.LoadString(IDS_EDIT_TOOLBAR);
00169   m_wndToolbarEdit.SetWindowText(strEditToolbarTitle);
00170
00171   // Load menu items images(not placed on the standard toolbars):
00172   CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES);
00173
00174   // Create status bar:
00175   if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
00176   {
00177     TRACE0("Failed to create status bar\n");
00178     return -1;      // fail to create
00179   }
00180
00181   m_wndStatusBar.SetPaneStyle(0, SBPS_STRETCH);
00182
00183   // Create docking control windows:
00184   if (!CreateDockingBars())
00185   {
00186     return -1;
00187   }
00188
00189   m_wndToolBar.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00190   m_wndToolbarBuild.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00191   m_wndToolbarEdit.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00192
00193   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00194   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00195   m_wndToolbarBuild.EnableDocking(CBRS_ALIGN_ANY);
00196   m_wndToolbarEdit.EnableDocking(CBRS_ALIGN_ANY);
00197   m_wndToolbarResource.EnableDocking(CBRS_ALIGN_ANY);
00198   m_wndClassView.EnableDocking(CBRS_ALIGN_ANY);
00199   m_wndResourceView.EnableDocking(CBRS_ALIGN_ANY);
00200   m_wndFileView.EnableDocking(CBRS_ALIGN_ANY);
00201   m_wndOutputView.EnableDocking(CBRS_ALIGN_ANY);
00202   m_wndDynamicHelpView.EnableDocking(CBRS_ALIGN_ANY);
00203   m_wndPropertiesBar.EnableDocking(CBRS_ALIGN_ANY);
00204
00205   m_wndWatchBar.EnableDocking(CBRS_ALIGN_ANY);
00206
00207   EnableDocking(CBRS_ALIGN_ANY);
00208
00209   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00210
00211   DockPane(&m_wndMenuBar);
00212   DockPane(&m_wndToolBar);
00213   DockPane(&m_wndPropertiesBar);
00214
00215   DockPane(&m_wndToolbarBuild);
00216   DockPaneLeftOf(&m_wndToolbarEdit, &m_wndToolbarBuild);
00217
00218   DockPane(&m_wndClassView);
00219
00220   CDockablePane* pTabbedBar = NULL;
00221   m_wndResourceView.AttachToTabWnd(&m_wndClassView, DM_SHOW, TRUE, &pTabbedBar);
00222   m_wndFileView.AttachToTabWnd(pTabbedBar, DM_SHOW, TRUE, &pTabbedBar);
00223
00224   DockPane(&m_wndOutputView);
00225
00226   m_wndDynamicHelpView.DockToWindow(&m_wndPropertiesBar, CBRS_ALIGN_BOTTOM);
00227   m_wndWatchBar.DockToWindow(&m_wndOutputView, CBRS_ALIGN_LEFT);
00228
00229   CRect rectMainToolBar;
00230   m_wndToolBar.GetWindowRect(&rectMainToolBar);
00231
00232   // Allow user-defined toolbars operations:
00233   InitUserToolbars(NULL, uiFirstUserToolBarId, uiLastUserToolBarId);
00234
00235   // Enable windows manager:
00236   EnableWindowsDialog(ID_WINDOW_MANAGER, _T("&Windows..."), TRUE);
00237
00238   // Enable conttol bar context menu(list of bars + customize command):
00239   EnablePaneMenu( TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."), ID_VIEW_TOOLBARS, FALSE, TRUE);
00240
00241   EnableFullScreenMode(ID_VIEW_FULLSCREEN);
00242   return 0;
00243 }
00244
00245 /////////////////////////////////////////////////////////////////////////////
00246 // CMainFrame diagnostics
00247
00248 #ifdef _DEBUG
00249 void CMainFrame::AssertValid() const
00250 {
00251   CMDIFrameWndEx::AssertValid();
00252 }
00253
00254 void CMainFrame::Dump(CDumpContext& dc) const
00255 {
00256   CMDIFrameWndEx::Dump(dc);
00257 }
00258
00259 #endif //_DEBUG
00260
00261 /////////////////////////////////////////////////////////////////////////////
00262 // CMainFrame message handlers
00263
00264 void CMainFrame::OnViewCustomize()
00265 {
00266   // Create a customize toolbars dialog:
00267   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog(this, TRUE /* Automatic menus scaning */, AFX_CUSTOMIZE_MENU_SHADOWS | AFX_CUSTOMIZE_TEXT_LABELS | AFX_CUSTOMIZE_MENU_ANIMATIONS);
00268
00269   pDlgCust->EnableUserDefinedToolbars();
00270
00271   // Setup combboxes:
00272   pDlgCust->ReplaceButton(ID_EDIT_FIND, CFindComboButton());
00273
00274   CMFCToolBarComboBoxButton comboButtonConfig(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, GetCmdMgr()->GetCmdImage(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, FALSE), CBS_DROPDOWNLIST);
00275   comboButtonConfig.AddItem(_T("Win32 Debug"));
00276   comboButtonConfig.AddItem(_T("Win32 Release"));
00277   comboButtonConfig.SelectItem(0);
00278
00279   pDlgCust->ReplaceButton(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, comboButtonConfig);
00280
00281   // Add dropdown resources button:
00282   pDlgCust->AddButton(_T("Build"), CMFCDropDownToolbarButton(_T("Add Resource"), &m_wndToolbarResource));
00283
00284   // Setup undo/redo buttons:
00285   pDlgCust->ReplaceButton(ID_EDIT_UNDO, CUndoButton(ID_EDIT_UNDO, _T("&Undo")));
00286   pDlgCust->ReplaceButton(ID_EDIT_REDO, CUndoButton(ID_EDIT_REDO, _T("&Redo")));
00287
00288   pDlgCust->Create();
00289 }
00290
00291 LRESULT CMainFrame::OnToolbarReset(WPARAM wp,LPARAM)
00292 {
00293   UINT uiToolBarId = (UINT) wp;
00294
00295   switch (uiToolBarId)
00296   {
00297   case IDR_MAINFRAME:
00298     {
00299       ASSERT(m_wndToolbarResource.GetSafeHwnd() != NULL);
00300
00301       // Replace dropdown resources button:
00302       m_wndToolBar.ReplaceButton(ID_DUMMY_INSERT_RESOURCE, CMFCDropDownToolbarButton(_T("Add Resource"), &m_wndToolbarResource));
00303
00304       // Replace "Find..." button by combobox:
00305       m_wndToolBar.ReplaceButton(ID_EDIT_FIND, CFindComboButton());
00306
00307       // Replace "Undo" button by menubutton:
00308       m_wndToolBar.ReplaceButton(ID_EDIT_UNDO, CUndoButton(ID_EDIT_UNDO, _T("&Undo")));
00309       m_wndToolBar.ReplaceButton(ID_EDIT_REDO, CUndoButton(ID_EDIT_REDO, _T("&Redo")));
00310     }
00311     break;
00312
00313   case IDR_BUILD:
00314     {
00315       // Replace "Confoguration..." button by combobox:
00316       CMFCToolBarComboBoxButton comboButton(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, GetCmdMgr()->GetCmdImage(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, FALSE), CBS_DROPDOWNLIST);
00317       comboButton.AddItem(_T("Win32 Debug"));
00318       comboButton.AddItem(_T("Win32 Release"));
00319       comboButton.SelectItem(0);
00320
00321       m_wndToolbarBuild.ReplaceButton(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, comboButton);
00322     }
00323     break;
00324   }
00325
00326   return 0;
00327 }
00328
00329 LRESULT CMainFrame::OnHelpCustomizeToolbars(WPARAM /*wp*/, LPARAM /*lp*/)
00330 {
00331   // int iPageNum = (int) wp;
00332
00333   // CMFCToolBarsCustomizeDialog* pDlg = (CMFCToolBarsCustomizeDialog*) lp;
00334   // ASSERT_VALID(pDlg);
00335
00336   // TODO: show help about page number iPageNum
00337
00338   return 0;
00339 }
00340
00341 BOOL CMainFrame::OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop)
00342 {
00343   CMenu menu;
00344   VERIFY(menu.LoadMenu(bDrop ? IDR_POPUP_DROP_MDITABS : IDR_POPUP_MDITABS));
00345
00346   CMenu* pPopup = menu.GetSubMenu(0);
00347   ASSERT(pPopup != NULL);
00348
00349   if (pPopup)
00350   {
00351     if ((dwAllowedItems & AFX_MDI_CREATE_HORZ_GROUP) == 0)
00352     {
00353       pPopup->DeleteMenu(ID_MDI_NEW_HORZ_TAB_GROUP, MF_BYCOMMAND);
00354     }
00355
00356     if ((dwAllowedItems & AFX_MDI_CREATE_VERT_GROUP) == 0)
00357     {
00358       pPopup->DeleteMenu(ID_MDI_NEW_VERT_GROUP, MF_BYCOMMAND);
00359     }
00360
00361     if ((dwAllowedItems & AFX_MDI_CAN_MOVE_NEXT) == 0)
00362     {
00363       pPopup->DeleteMenu(ID_MDI_MOVE_TO_NEXT_GROUP, MF_BYCOMMAND);
00364     }
00365
00366     if ((dwAllowedItems & AFX_MDI_CAN_MOVE_PREV) == 0)
00367     {
00368       pPopup->DeleteMenu(ID_MDI_MOVE_TO_PREV_GROUP, MF_BYCOMMAND);
00369     }
00370
00371     if ((dwAllowedItems & AFX_MDI_CAN_BE_DOCKED) == 0)
00372     {
00373       pPopup->DeleteMenu(ID_MDI_TABBED_DOCUMENT, MF_BYCOMMAND);
00374     }
00375
00376     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00377     if (pPopupMenu)
00378     {
00379       pPopupMenu->SetAutoDestroy(FALSE);
00380       pPopupMenu->Create(this, point.x, point.y, pPopup->GetSafeHmenu());
00381     }
00382   }
00383
00384   return TRUE;
00385 }
00386
00387 void CMainFrame::OnWindowManager()
00388 {
00389   ShowWindowsDialog();
00390 }
00391
00392 BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
00393 {
00394   if (!CMDIFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
00395   {
00396     return FALSE;
00397   }
00398
00399   // Add some tools for example....
00400   CUserToolsManager* pUserToolsManager = theApp.GetUserToolsManager();
00401   if (pUserToolsManager != NULL && pUserToolsManager->GetUserTools().IsEmpty())
00402   {
00403     CUserTool* pTool1 = pUserToolsManager->CreateNewTool();
00404     pTool1->m_strLabel = _T("&Notepad");
00405     pTool1->SetCommand(_T("notepad.exe"));
00406
00407     CUserTool* pTool2 = pUserToolsManager->CreateNewTool();
00408     pTool2->m_strLabel = _T("Paint &Brush");
00409     pTool2->SetCommand(_T("mspaint.exe"));
00410
00411     CUserTool* pTool3 = pUserToolsManager->CreateNewTool();
00412     pTool3->m_strLabel = _T("&Windows Explorer");
00413     pTool3->SetCommand(_T("explorer.exe"));
00414
00415     CUserTool* pTool4 = pUserToolsManager->CreateNewTool();
00416     pTool4->m_strLabel = _T("Microsoft On-&Line");
00417     pTool4->SetCommand(_T("http://www.microsoft.com"));
00418   }
00419
00420   CMDITabInfo mdiTabParams;
00421   mdiTabParams.m_bTabCustomTooltips = TRUE;
00422
00423   EnableMDITabbedGroups(TRUE, mdiTabParams);
00424
00425   // Enable customization button fore all user toolbars:
00426   for (int i = 0; i < iMaxUserToolbars; i ++)
00427   {
00428     CMFCToolBar* pUserToolbar = GetUserToolBarByIndex(i);
00429     if (pUserToolbar != NULL)
00430     {
00431       pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00432     }
00433   }
00434
00435   return TRUE;
00436 }
00437
00438 BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
00439 {
00440   // If control located on toolbar has focus, we should
00441   // redirect clipboard commands to this control:
00442   if (CFindComboButton::HasFocus() && HIWORD(wParam) == 1) // Command from accelerator
00443   {
00444     UINT uiCmd = LOWORD(wParam);
00445     switch (uiCmd)
00446     {
00447     case ID_EDIT_PASTE:
00448       ::SendMessage(::GetFocus(), WM_PASTE, 0, 0);
00449       return TRUE;
00450
00451     case ID_EDIT_COPY:
00452       ::SendMessage(::GetFocus(), WM_COPY, 0, 0);
00453       return TRUE;
00454
00455     case ID_EDIT_CUT:
00456       ::SendMessage(::GetFocus(), WM_CUT, 0, 0);
00457       return TRUE;
00458     }
00459   }
00460
00461   return CMDIFrameWndEx::OnCommand(wParam, lParam);
00462 }
00463
00464 void CMainFrame::OnHelpKeyboardmap()
00465 {
00466   CMFCKeyMapDialog dlg(this, TRUE /* Enable Print */);
00467   dlg.DoModal();
00468 }
00469
00470 LRESULT CMainFrame::OnToolbarCreateNew(WPARAM wp,LPARAM lp)
00471 {
00472   LRESULT lres = CMDIFrameWndEx::OnToolbarCreateNew(wp,lp);
00473   if (lres == 0)
00474   {
00475     return 0;
00476   }
00477
00478   CMFCToolBar* pUserToolbar = (CMFCToolBar*) lres;
00479   ASSERT_VALID(pUserToolbar);
00480
00481   pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00482   return lres;
00483 }
00484
00485 BOOL CMainFrame::CreateDockingBars()
00486 {
00487   // Crate class view:
00488   if (!m_wndClassView.Create(_T("Class View"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_CLASS, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
00489   {
00490     TRACE0("Failed to create Class View bar\n");
00491     return FALSE;      // fail to create
00492   }
00493
00494   // Create resource view:
00495   if (!m_wndResourceView.Create(_T("Resource View"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_RESOURCE, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
00496   {
00497     TRACE0("Failed to create Resource View bar\n");
00498     return FALSE;      // fail to create
00499   }
00500
00501   // Create file view:
00502   if (!m_wndFileView.Create(_T("Solution Explorer"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_FILE, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT| CBRS_FLOAT_MULTI))
00503   {
00504     TRACE0("Failed to create Solution Explorer bar\n");
00505     return FALSE;      // fail to create
00506   }
00507
00508   //////////////////////////////////New Output////////////////////////////////////////
00509   if (!m_wndOutputView.Create(_T("Output"), this, CRect(0, 0, 100, 100), TRUE, ID_VIEW_OUTPUT, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
00510   {
00511     TRACE0("Failed to create output bar\n");
00512     return FALSE;      // fail to create
00513   }
00514
00515   if (!m_wndDynamicHelpView.Create(_T("Dynamic Help"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_DYNAMICHELP, WS_CHILD | WS_VISIBLE | CBRS_RIGHT | CBRS_FLOAT_MULTI))
00516   {
00517     TRACE0("Failed to create Dynamic Help Bar\n");
00518     return FALSE; // fail to create
00519   }
00520
00521   // Create watch bar:
00522   if (!m_wndWatchBar.Create(_T("Watch"), this, CRect(0, 0, 100, 100), TRUE, ID_VIEW_WATCH, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
00523   {
00524     TRACE0("Failed to create watch bar\n");
00525     return FALSE;      // fail to create
00526   }
00527
00528   if (!m_wndPropertiesBar.Create(_T("Properties"), this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_PROPERTIES, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT | CBRS_FLOAT_MULTI))
00529   {
00530     TRACE0("Failed to create Properties Bar\n");
00531     return FALSE; // fail to create
00532   }
00533
00534   SetDockingBarsIcons(FALSE);
00535
00536   return TRUE;
00537 }
00538
00539 void CMainFrame::SetDockingBarsIcons(BOOL bHiColorIcons)
00540 {
00541   HICON hClassViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_CLASS_VIEW_HC : IDI_CLASS_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
00542   m_wndClassView.SetIcon(hClassViewIcon, FALSE);
00543
00544   HICON hResViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_RES_VIEW_HC : IDI_RES_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
00545   m_wndResourceView.SetIcon(hResViewIcon, FALSE);
00546
00547   HICON hFileViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_FILE_VIEW_HC : IDI_FILE_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
00548   m_wndFileView.SetIcon(hFileViewIcon, FALSE);
00549
00550   HICON hOutputBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_OUTPUT_BAR_HC : IDI_OUTPUT_BAR), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
00551   m_wndOutputView.SetIcon(hOutputBarIcon, FALSE);
00552
00553   HICON hDynamicHelpIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_DYNAMICHELP_VIEW_HC : IDI_DYNAMICHELP_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
00554   m_wndDynamicHelpView.SetIcon(hDynamicHelpIcon, FALSE);
00555
00556   HICON hWatchBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_WATCH_BAR_HC : IDI_WATCH_BAR), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
00557   m_wndWatchBar.SetIcon(hWatchBarIcon, FALSE);
00558
00559   HICON hPropertiesBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_PROP_BAR_HC : IDI_PROPERTIES_BAR), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
00560   m_wndPropertiesBar.SetIcon(hPropertiesBarIcon, FALSE);
00561
00562   UpdateMDITabbedBarsIcons();
00563 }
00564
00565 void CMainFrame::OnFileNewProject()
00566 {
00567   // TODO: Add your command handler code here
00568 }
00569
00570 void CMainFrame::OnFileNewBlankSolution()
00571 {
00572   // TODO: Add your command handler code here
00573 }
00574
00575 void CMainFrame::OnFileOpenSolution()
00576 {
00577   // TODO: Add your command handler code here
00578 }
00579
00580 void CMainFrame::OnFileCloseSolution()
00581 {
00582   // TODO: Add your command handler code here
00583 }
00584
00585 void CMainFrame::OnFileSaveAll()
00586 {
00587   // TODO: Add your command handler code here
00588 }
00589
00590 void CMainFrame::OnViewRefresh()
00591 {
00592   // TODO: Add your command handler code here
00593 }
00594
00595 void CMainFrame::OnToolsConnectToDatabase()
00596 {
00597   // TODO: Add your command handler code here
00598 }
00599
00600 void CMainFrame::OnToolsDebugProcesses()
00601 {
00602   // TODO: Add your command handler code here
00603 }
00604
00605 void CMainFrame::OnViewFullScreen()
00606 {
00607   ShowFullScreen();
00608 }
00609
00610 CMFCToolBarComboBoxButton* CMainFrame::GetFindCombo()
00611 {
00612   CMFCToolBarComboBoxButton* pFindCombo = NULL;
00613
00614   CObList listButtons;
00615   if (CMFCToolBar::GetCommandButtons(ID_EDIT_FIND_COMBO, listButtons) > 0)
00616   {
00617     for (POSITION posCombo = listButtons.GetHeadPosition();
00618       pFindCombo == NULL && posCombo != NULL;)
00619     {
00620       CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));
00621
00622       if (pCombo != NULL && pCombo->GetEditCtrl()->GetSafeHwnd() == ::GetFocus())
00623       {
00624         pFindCombo = pCombo;
00625       }
00626     }
00627   }
00628
00629   return pFindCombo;
00630 }
00631
00632 void CMainFrame::OnToolsOptions()
00633 {
00634   COptionsDlg *pDlgOptions = new COptionsDlg(_T("Options"), this);
00635   pDlgOptions->DoModal();
00636   delete pDlgOptions;
00637 }
00638
00639 void CMainFrame::OnChangeLook(BOOL bOneNoteTabs, BOOL bMDITabColors, BOOL bIsVSDotNetLook, BOOL bDockTabColors, BOOL bMDITabsVS2005Look, BOOL bActiveTabCloseButton)
00640 {
00641   CMDITabInfo mdiTabParams;
00642   mdiTabParams.m_bTabCustomTooltips = TRUE;
00643
00644   if (bMDITabsVS2005Look)
00645   {
00646     mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_VS2005;
00647     mdiTabParams.m_bDocumentMenu = TRUE;
00648   }
00649   else if (bOneNoteTabs)
00650   {
00651     mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_ONENOTE;
00652     mdiTabParams.m_bAutoColor = bMDITabColors;
00653   }
00654
00655   if (bActiveTabCloseButton)
00656   {
00657     mdiTabParams.m_bTabCloseButton = FALSE;
00658     mdiTabParams.m_bActiveTabCloseButton = TRUE;
00659   }
00660
00661   EnableMDITabbedGroups(TRUE, mdiTabParams);
00662
00663   m_wndPropertiesBar.SetVSDotNetLook(bIsVSDotNetLook);
00664
00665   m_wndPropertiesBar.OnChangeVisualStyle();
00666   m_wndDynamicHelpView.OnChangeVisualStyle();
00667   m_wndClassView.OnChangeVisualStyle();
00668   m_wndFileView.OnChangeVisualStyle();
00669   m_wndResourceView.OnChangeVisualStyle();
00670
00671   CTabbedPane::EnableTabAutoColor(bDockTabColors);
00672
00673   // Reload toolbar images:
00674   CMFCToolBar::ResetAllImages();
00675
00676   m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_TOOLBAR24 : IDR_MAINFRAME);
00677   m_wndToolbarBuild.LoadBitmap(theApp.m_bHiColorIcons ? IDB_BUILD24 : IDR_BUILD);
00678   m_wndToolbarEdit.LoadBitmap(theApp.m_bHiColorIcons ? IDB_EDIT24 : IDR_EDIT);
00679
00680   CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES, theApp.m_bHiColorIcons ? IDB_MENUIMAGES24 : 0);
00681
00682   CDockingManager* pDockManager = GetDockingManager();
00683   ASSERT_VALID(pDockManager);
00684
00685   SetDockingBarsIcons(theApp.m_bHiColorIcons);
00686
00687   pDockManager->AdjustPaneFrames();
00688
00689   RecalcLayout();
00690   RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00691 }
00692
00693 void CMainFrame::OnHelpWeb()
00694 {
00695   ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
00696 }
00697
00698 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00699 {
00700   return CMDIFrameWndEx::PreCreateWindow(cs);
00701 }
00702
00703 BOOL CMainFrame::DestroyWindow()
00704 {
00705   return CMDIFrameWndEx::DestroyWindow();
00706 }
00707
00708 void CMainFrame::OnMdiMoveToNextGroup()
00709 {
00710   MDITabMoveToNextGroup();
00711 }
00712
00713 void CMainFrame::OnMdiMoveToPrevGroup()
00714 {
00715   MDITabMoveToNextGroup(FALSE);
00716 }
00717
00718 void CMainFrame::OnMdiNewHorzTabGroup()
00719 {
00720   MDITabNewGroup(FALSE);
00721 }
00722
00723 void CMainFrame::OnMdiNewVertGroup()
00724 {
00725   MDITabNewGroup();
00726 }
00727
00728 void CMainFrame::OnMdiCancel()
00729 {
00730   // TODO: Add your command handler code here
00731 }
00732
00733 CMDIChildWndEx* CMainFrame::CreateDocumentWindow(LPCTSTR lpcszDocName, CObject* /*pObj*/)
00734 {
00735   if (lpcszDocName != NULL && lpcszDocName [0] != '\0')
00736   {
00737     CDocument* pDoc = NULL;
00738     if (g_strStartViewName.Compare(lpcszDocName) == 0)
00739     {
00740       pDoc = theApp.m_pStartDocTemplate->OpenDocumentFile(NULL);
00741     }
00742     else
00743     {
00744       pDoc = AfxGetApp()->OpenDocumentFile(lpcszDocName);
00745     }
00746
00747     if (pDoc != NULL)
00748     {
00749       POSITION pos = pDoc->GetFirstViewPosition();
00750
00751       if (pos != NULL)
00752       {
00753         CView* pView = pDoc->GetNextView(pos);
00754         return DYNAMIC_DOWNCAST(CMDIChildWndEx, pView->GetParent());
00755       }
00756     }
00757
00758   }
00759
00760   return NULL;
00761 }
00762
00763 void CMainFrame::OnClose()
00764 {
00765   SaveMDIState(theApp.GetRegSectionPath());
00766   CMDIFrameWndEx::OnClose();
00767 }
00768
00769 LRESULT CMainFrame::OnGetTabToolTip(WPARAM /*wp*/, LPARAM lp)
00770 {
00771   CMFCTabToolTipInfo* pInfo = (CMFCTabToolTipInfo*) lp;
00772   ASSERT(pInfo != NULL);
00773   if (!pInfo)
00774   {
00775     return 0;
00776   }
00777
00778   ASSERT_VALID(pInfo->m_pTabWnd);
00779
00780   if (!pInfo->m_pTabWnd->IsMDITab())
00781   {
00782     return 0;
00783   }
00784
00785   CFrameWnd* pFrame = DYNAMIC_DOWNCAST(CFrameWnd, pInfo->m_pTabWnd->GetTabWnd(pInfo->m_nTabIndex));
00786   if (pFrame == NULL)
00787   {
00788     return 0;
00789   }
00790
00791   CDocument* pDoc = pFrame->GetActiveDocument();
00792   if (pDoc == NULL)
00793   {
00794     return 0;
00795   }
00796
00797   pInfo->m_strText = pDoc->GetPathName();
00798   return 0;
00799 }
00800
00801 void CMainFrame::OnViewClass()
00802 {
00803   m_wndClassView.ShowPane(!m_wndClassView.IsVisible(), FALSE, TRUE);
00804 }
00805
00806 void CMainFrame::OnUpdateViewClass(CCmdUI* pCmdUI)
00807 {
00808   pCmdUI->SetCheck(m_wndClassView.IsVisible());
00809 }
00810
00811 void CMainFrame::OnViewFile()
00812 {
00813   m_wndFileView.ShowPane(!m_wndFileView.IsVisible(), FALSE, TRUE);
00814 }
00815
00816 void CMainFrame::OnUpdateViewFile(CCmdUI* pCmdUI)
00817 {
00818   pCmdUI->SetCheck(m_wndFileView.IsVisible());
00819 }
00820
00821 void CMainFrame::OnViewResource()
00822 {
00823   m_wndResourceView.ShowPane(!m_wndResourceView.IsVisible(), FALSE, TRUE);
00824 }
00825
00826 void CMainFrame::OnUpdateViewResource(CCmdUI* pCmdUI)
00827 {
00828   pCmdUI->SetCheck(m_wndResourceView.IsVisible());
00829 }
00830
00831 void CMainFrame::OnViewProperties()
00832 {
00833   m_wndPropertiesBar.ShowPane(!m_wndPropertiesBar.IsVisible(), FALSE, TRUE);
00834 }
00835
00836 void CMainFrame::OnUpdateViewProperties(CCmdUI* pCmdUI)
00837 {
00838   pCmdUI->SetCheck(m_wndPropertiesBar.IsVisible());
00839 }
00840
00841 void CMainFrame::OnViewOutput()
00842 {
00843   m_wndOutputView.ShowPane(!m_wndOutputView.IsVisible(), FALSE, TRUE);
00844 }
00845
00846 void CMainFrame::OnUpdateViewOutput(CCmdUI* pCmdUI)
00847 {
00848   pCmdUI->SetCheck(m_wndOutputView.IsVisible());
00849 }
00850
00851 void CMainFrame::OnViewWatch()
00852 {
00853   m_wndWatchBar.ShowPane(!m_wndWatchBar.IsVisible(), FALSE, TRUE);
00854 }
00855
00856 void CMainFrame::OnUpdateViewWatch(CCmdUI* pCmdUI)
00857 {
00858   pCmdUI->SetCheck(m_wndWatchBar.IsVisible());
00859 }
00860
00861 void CMainFrame::OnViewDynamichelp()
00862 {
00863   m_wndDynamicHelpView.ShowPane(!m_wndDynamicHelpView.IsVisible(), FALSE, TRUE);
00864 }
00865
00866 void CMainFrame::OnUpdateViewDynamichelp(CCmdUI* pCmdUI)
00867 {
00868   pCmdUI->SetCheck(m_wndDynamicHelpView.IsVisible());
00869 }
00870
00871 void CMainFrame::OnMdiTabbedDocument()
00872 {
00873   CMDIChildWndEx* pMDIChild = DYNAMIC_DOWNCAST(CMDIChildWndEx, MDIGetActive());
00874   if (pMDIChild == NULL)
00875   {
00876     ASSERT(FALSE);
00877     return;
00878   }
00879
00880   TabbedDocumentToControlBar(pMDIChild);
00881 }
00882
00883 void CMainFrame::OnUpdateMdiTabbedDocument(CCmdUI* pCmdUI)
00884 {
00885   pCmdUI->SetCheck();
00886 }
00887
00888 void CMainFrame::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
00889 {
00890   CMDIFrameWndEx::OnSettingChange(uFlags, lpszSection);
00891   m_wndOutputView.UpdateFonts();
00892 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PropBag.H Source File

  • ole
  • TstCon

PropBag.H

Go to the documentation of this file.
00001 // File: PropBag.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CPropertyBagItem :
00011    public CObject
00012 {
00013    DECLARE_DYNAMIC( CPropertyBagItem );
00014
00015 public:
00016    CPropertyBagItem( LPCOLESTR pszName, VARIANT* pvarValue );
00017
00018 public:
00019    CString m_strName;
00020    COleVariant m_varValue;
00021 };
00022
00023 typedef CTypedPtrList< CObList, CPropertyBagItem* > CPropertyBagItemList;
00024
00025 class CPropertyBag :
00026    public IPropertyBag
00027 {
00028 public:
00029    CPropertyBag();
00030    ~CPropertyBag();
00031
00032    POSITION GetFirstItemPosition() const;
00033    CPropertyBagItem* GetNextItem( POSITION& posItem ) const;
00034
00035 // IUnknown
00036 public:
00037    STDMETHOD_( ULONG, AddRef )();
00038    STDMETHOD_( ULONG, Release )();
00039    STDMETHOD( QueryInterface )( REFIID iid, void** ppInterface );
00040
00041 // IPropertyBag
00042 public:
00043    STDMETHOD( Read )( LPCOLESTR pszPropName, VARIANT* pvarValue,
00044     IErrorLog* pErrorLog );
00045    STDMETHOD( Write )( LPCOLESTR pszPropName, VARIANT* pvarValue );
00046
00047 protected:
00048    ULONG m_nRefCount;
00049    CPropertyBagItemList m_lpItems;
00050 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/MainFrm.cpp Source File

  • vc2008fp
  • TabbedView

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00029   ON_WM_CREATE()
00030   ON_WM_CLOSE()
00031   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00032   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00033   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00034 END_MESSAGE_MAP()
00035
00036 static UINT indicators[] =
00037 {
00038   ID_SEPARATOR,           // status line indicator
00039   ID_INDICATOR_CAPS,
00040   ID_INDICATOR_NUM,
00041   ID_INDICATOR_SCRL,
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMainFrame construction/destruction
00046
00047 CMainFrame::CMainFrame()
00048 {
00049   // TODO: add member initialization code here
00050
00051 }
00052
00053 CMainFrame::~CMainFrame()
00054 {
00055 }
00056
00057 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00058 {
00059   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00060     return -1;
00061
00062   CMFCToolBar::EnableQuickCustomization ();
00063
00064   // enable Office XP look:
00065   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00066
00067   // TODO: Define your own basic commands. Be sure, that each pulldown
00068   // menu have at least one basic command.
00069
00070   CList<UINT, UINT> lstBasicCommands;
00071
00072   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00073   lstBasicCommands.AddTail (ID_FILE_NEW);
00074   lstBasicCommands.AddTail (ID_FILE_OPEN);
00075   lstBasicCommands.AddTail (ID_FILE_SAVE);
00076   lstBasicCommands.AddTail (ID_FILE_PRINT);
00077   lstBasicCommands.AddTail (ID_APP_EXIT);
00078   lstBasicCommands.AddTail (ID_EDIT_CUT);
00079   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00080   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00081   lstBasicCommands.AddTail (ID_APP_ABOUT);
00082   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00083   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00084   lstBasicCommands.AddTail (ID_WINDOW_TILE_HORZ);
00085
00086   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00087
00088   if (!m_wndMenuBar.Create (this))
00089   {
00090     TRACE0("Failed to create menubar\n");
00091     return -1;      // fail to create
00092   }
00093
00094   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00095
00096   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00097     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00098     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00099   {
00100     TRACE0("Failed to create toolbar\n");
00101     return -1;      // fail to create
00102   }
00103   if (!m_wndStatusBar.Create(this) ||
00104     !m_wndStatusBar.SetIndicators(indicators,
00105       sizeof(indicators)/sizeof(UINT)))
00106   {
00107     TRACE0("Failed to create status bar\n");
00108     return -1;      // fail to create
00109   }
00110
00111   BOOL bValidString;
00112   CString strMainToolbarTitle;
00113   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00114   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00115   // TODO: Delete these three lines if you don't want the toolbar to
00116   //  be dockable
00117   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00118   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00119   EnableDocking(CBRS_ALIGN_ANY);
00120   DockPane(&m_wndMenuBar);
00121   DockPane(&m_wndToolBar);
00122
00123   return 0;
00124 }
00125
00126 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00127 {
00128   if( !CMDIFrameWnd::PreCreateWindow(cs) )
00129     return FALSE;
00130   // TODO: Modify the Window class or styles here by modifying
00131   //  the CREATESTRUCT cs
00132
00133   return TRUE;
00134 }
00135
00136 /////////////////////////////////////////////////////////////////////////////
00137 // CMainFrame diagnostics
00138
00139 #ifdef _DEBUG
00140 void CMainFrame::AssertValid() const
00141 {
00142   CMDIFrameWnd::AssertValid();
00143 }
00144
00145 void CMainFrame::Dump(CDumpContext& dc) const
00146 {
00147   CMDIFrameWnd::Dump(dc);
00148 }
00149
00150 #endif //_DEBUG
00151
00152 /////////////////////////////////////////////////////////////////////////////
00153 // CMainFrame message handlers
00154
00155
00156 void CMainFrame::OnViewCustomize()
00157 {
00158   //------------------------------------
00159   // Create a customize toolbars dialog:
00160   //------------------------------------
00161   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00162     TRUE /* Automatic menus scaning */);
00163
00164   pDlgCust->Create ();
00165 }
00166
00167 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00168 {
00169   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00170
00171   CMenu menu;
00172   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00173
00174   CMenu* pPopup = menu.GetSubMenu(0);
00175   ASSERT(pPopup != NULL);
00176
00177   if (pPopup)
00178   {
00179     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00180     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00181   }
00182
00183   return 0;
00184 }
00185
00186 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00187 {
00188   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00189   //
00190   // UINT uiToolBarId = (UINT) wp;
00191   // if (uiToolBarId == IDR_MAINFRAME)
00192   // {
00193   //    do something with m_wndToolBar
00194   // }
00195
00196   return 0;
00197 }
00198
00199 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00200 {
00201   //---------------------------------------------------------
00202   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00203   //---------------------------------------------------------
00204   CMDIFrameWnd::OnShowPopupMenu (pMenuPopup);
00205
00206   if (pMenuPopup != NULL &&
00207     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00208   {
00209     if (CMFCToolBar::IsCustomizeMode ())
00210     {
00211       //----------------------------------------------------
00212       // Don't show toolbars list in the cuztomization mode!
00213       //----------------------------------------------------
00214       return FALSE;
00215     }
00216
00217     pMenuPopup->RemoveAllItems ();
00218
00219     CMenu menu;
00220     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00221
00222     CMenu* pPopup = menu.GetSubMenu(0);
00223     ASSERT(pPopup != NULL);
00224
00225     if (pPopup)
00226     {
00227       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00228     }
00229   }
00230
00231   return TRUE;
00232 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemoDlg.h Source File

  • vc2008fp
  • PropSheetDemo

PropSheetDemoDlg.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 /////////////////////////////////////////////////////////////////////////////
00004 // CPropSheetDemoDlg dialog
00005
00006 class CPropSheetDemoDlg : public CDialogEx
00007 {
00008 // Construction
00009 public:
00010   CPropSheetDemoDlg(CWnd* pParent = NULL);  // standard constructor
00011
00012 // Dialog Data
00013   enum { IDD = IDD_PROPSHEETDEMO_DIALOG };
00014   BOOL  m_bHeader;
00015
00016   protected:
00017   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00018
00019 // Implementation
00020 protected:
00021   HICON m_hIcon;
00022
00023   virtual BOOL OnInitDialog();
00024
00025   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00026   afx_msg void OnPaint();
00027   afx_msg HCURSOR OnQueryDragIcon();
00028   afx_msg void OnPropSheet1();
00029   afx_msg void OnPropSheet2();
00030   afx_msg void OnPropSheet3();
00031   afx_msg void OnPropSheet4();
00032   afx_msg void OnPropSheet5();
00033
00034   DECLARE_MESSAGE_MAP()
00035 };
00036
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/shadow.h Source File

  • ole
  • oleview
  • iviewers

shadow.h

Go to the documentation of this file.
00001 /*
00002  * These defines are used in the uiFlags and uiStyle parameters to
00003  * the TDUTIL functions.
00004  */
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #define DRAW3D_IN           0x0100     // effect looks indented
00016 #define DRAW3D_OUT          0x0200     // effect 'sticks out'
00017 #define DRAW3D_CREASE       0x0400     // for that 'creased' look
00018
00019 #define DRAW3D_TOPLINE      0x0800
00020 #define DRAW3D_BOTTOMLINE   0x1000
00021 #define DRAW3D_LEFTLINE     0x2000
00022 #define DRAW3D_RIGHTLINE    0x4000
00023
00024 /*
00025  * Very useful set of macros for dealing with the 'base' 16 colors
00026  */
00027 #ifndef _RGB_H_
00028 #define _RGB_H_
00029    #define RGBBLACK     RGB(0,0,0)
00030    #define RGBRED       RGB(128,0,0)
00031    #define RGBGREEN     RGB(0,128,0)
00032    #define RGBBLUE      RGB(0,0,128)
00033    #define RGBBROWN     RGB(128,128,0)
00034    #define RGBMAGENTA   RGB(128,0,128)
00035    #define RGBCYAN      RGB(0,128,128)
00036    #define RGBLTGRAY    RGB(192,192,192)
00037    #define RGBGRAY      RGB(128,128,128)
00038    #define RGBLTRED     RGB(255,0,0)
00039    #define RGBLTGREEN   RGB(0,255,0)
00040    #define RGBLTBLUE    RGB(0,0,255)
00041    #define RGBYELLOW    RGB(255,255,0)
00042    #define RGBLTMAGENTA RGB(255,0,255)
00043    #define RGBLTCYAN    RGB(0,255,255)
00044    #define RGBWHITE     RGB(255,255,255)
00045 #endif
00046
00047 /* tdDraw3DRect()
00048  *
00049  * Draws a rectangle (non-filled) that has 3D effects.
00050  *
00051  *    lprc     Defines the rectangle in client coordinates
00052  *    uiWidth  Specifies the width of the lines that make up the rectangle.
00053  *    wFlags   Either DRAW3D_IN or DRAW3D_OUT.  May be combined with
00054  *             DRAW3D_CREASED (uiWidth is ignored).
00055  */
00056 VOID WINAPI tdDraw3DRect( HDC hdc, LPRECT lprc, UINT uiWidth, UINT wFlags );
00057
00058 /* tdDraw3DLine()
00059  *
00060  * Draws a component of a 3D rectangle.  The tdDraw3DRect() function uses
00061  * this function to draw the rectangles.  This function is optimized
00062  * for speed.  For one pixel wide lines it uses ExtTextOut(), for others
00063  * it use Polygon() ('cause line ends are not square).
00064  *
00065  *    x, y     Defines the line in client coordinates
00066  *    uiWidth   Specifies the width of the lines that make up the rectangle.
00067  *    wFlags   May be a combination of either DRAW3D_IN or DRAW3D_OUT and
00068  *             DRAW3D_TOP, DRAW3D_LEFT, DRAW3D_BOTTOM, or DRAW3D_RIGHT.
00069  */
00070 VOID WINAPI tdDraw3DLine( HDC hdc, UINT x, UINT y, UINT nLen, UINT uiWidth, UINT wFlags );
00071
00072
00073 /* tdDrawFaceFrame()
00074  *
00075  * Draws a rectangle using the current background color.  This function
00076  * is useful for drawing fast rectangles (it' uses ExtTextOut() for speed).
00077  *
00078  * Restrictions are that it does not do patterned lines, or fill the
00079  * rectangle.  But it's a great deal faster than Rectangle().
00080  *
00081  * tdDrawRect() is really a macro that calls tdDrawFaceFrame() which
00082  * is mis-named.
00083  */
00084 #define tdDrawRect tdDrawFaceFrame
00085 VOID WINAPI tdDrawFaceFrame( HDC hdc, LPRECT lprc, UINT uiWidth );
00086
00087
00088 /* tdDraw3DCrease()
00089  *
00090  * Draws a 3D 'crease' effect using the specified rectangle.  This
00091  * effect is often used for 3d group boxes.  uiFlags dictates whether
00092  * the crease is indented (DRAW3D_IN) or sticks out (DRAW_3DOUT).
00093  */
00094 VOID WINAPI tdDraw3DCrease( HDC hdc, LPRECT lprc, UINT uiFlags ) ;
00095
00096 /* tdGetHighlightColor()
00097  *
00098  * TDUTIL uses the concept of a normal color, highlight color, and shadow
00099  * color to do it's drawing.  Both the highlight color and shadow colors
00100  * are derived from the normal color.  This function takes a 'normal'
00101  * color, and returns the appropriate highlight color.
00102  *
00103  * For example if RGBLTGRAY is passed in as rgb, RGBWHITE will be returned.
00104  */
00105 COLORREF WINAPI tdGetHighlightColor( COLORREF rgb ) ;
00106
00107 /* tdGetShadowColor()
00108  *
00109  * TDUTIL uses the concept of a normal color, highlight color, and shadow
00110  * color to do it's drawing.  Both the highlight color and shadow colors
00111  * are derived from the normal color.  This function takes a 'normal'
00112  * color, and returns the appropriate shadow color.
00113  *
00114  * For example if RGBLTGRAY is passed in as rgb, RGBGRAY will be returned.
00115  */
00116 COLORREF WINAPI tdGetShadowColor( COLORREF rgb ) ;
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemo.cpp Source File

  • vc2008fp
  • OutlookDemo

OutlookDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012
00013 #include "MainFrm.h"
00014 #include "OutlookDemoDoc.h"
00015 #include "OutlookDemoView.h"
00016
00017 #include "AppLookDlg.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // COutlookDemoApp
00027
00028 BEGIN_MESSAGE_MAP(COutlookDemoApp, CWinAppEx)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   ON_COMMAND(ID_VIEW_APP_LOOK, OnViewAppLook)
00031   // Standard file based document commands
00032   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00033   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00034   // Standard print setup command
00035   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // COutlookDemoApp construction
00040
00041 COutlookDemoApp::COutlookDemoApp()
00042 {
00043   m_bLoadSaveFrameBarsOnly = TRUE;
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only COutlookDemoApp object
00048
00049 COutlookDemoApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // COutlookDemoApp initialization
00053
00054 BOOL COutlookDemoApp::InitInstance()
00055 {
00056   // Initialize OLE libraries
00057   if (!AfxOleInit())
00058   {
00059     AfxMessageBox(IDP_OLE_INIT_FAILED);
00060     return FALSE;
00061   }
00062
00063   AfxEnableControlContainer();
00064
00065   // Standard initialization
00066   // If you are not using these features and wish to reduce the size
00067   //  of your final executable, you should remove from the following
00068   //  the specific initialization routines you do not need.
00069
00070   // Change the registry key under which our settings are stored.
00071   // TODO: You should modify this string to be something appropriate
00072   // such as the name of your company or organization.
00073   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00074
00075   LoadStdProfileSettings();  // Load standard INI file options(including MRU)
00076
00077   SetActiveFrame(MainFrame);
00078
00079   // Initialize all Managers for usage. They are automatically constructed
00080   // if not yet present
00081   InitContextMenuManager();
00082   InitKeyboardManager();
00083   InitShellManager();
00084
00085   InitTooltipManager();
00086
00087   CMFCToolTipInfo params;
00088   params.m_bVislManagerTheme = TRUE;
00089
00090   theApp.GetTooltipManager()->SetTooltipParams(0xFFFF, RUNTIME_CLASS(CMFCToolTipCtrl), &params);
00091
00092   // Enable user-defined tools. If you want allow more than 10 tools, // add tools entry to resources(ID_USER_TOOL11, ID_USER_TOOL12,...)
00093   EnableUserTools(ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10);
00094
00095   // Register the application's document templates.  Document templates
00096   //  serve as the connection between documents, frame windows and views.
00097
00098   CSingleDocTemplate* pDocTemplate;
00099   pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME, RUNTIME_CLASS(COutlookDemoDoc), RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00100     RUNTIME_CLASS(COutlookDemoView));
00101   AddDocTemplate(pDocTemplate);
00102
00103   // Parse command line for standard shell commands, DDE, file open
00104   CCommandLineInfo cmdInfo;
00105   ParseCommandLine(cmdInfo);
00106
00107   // Dispatch commands specified on the command line
00108   if (!ProcessShellCommand(cmdInfo))
00109     return FALSE;
00110
00111   LoadCustomState();
00112
00113   // The one and only window has been initialized, so show and update it.
00114   m_pMainWnd->ShowWindow(SW_SHOW);
00115   m_pMainWnd->UpdateWindow();
00116
00117   if (afxGlobalData.m_nBitsPerPixel < 16)
00118   {
00119     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00120   }
00121
00122   // Set application general look:
00123   CAppLookDlg dlg(TRUE);
00124   dlg.DoModal();
00125
00126   return TRUE;
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // COutlookDemoApp message handlers
00131
00132 int COutlookDemoApp::ExitInstance()
00133 {
00134   return CWinAppEx::ExitInstance();
00135 }
00136
00137 void COutlookDemoApp::PreLoadState()
00138 {
00139
00140   GetContextMenuManager()->AddMenu(_T("My menu"), IDR_CONTEXT_MENU);
00141
00142   // TODO: add another context menus here
00143 }
00144
00145 void COutlookDemoApp::SetActiveFrame(OUTLOOK_FRAME frame)
00146 {
00147   CString strOldRegPath = GetRegSectionPath();
00148
00149   // Save user tools:
00150   if (GetUserToolsManager() != NULL)
00151   {
00152     GetUserToolsManager()->SaveState(GetRegSectionPath());
00153   }
00154
00155   switch (frame)
00156   {
00157   case MainFrame:
00158     SetRegistryBase(_T("Main Frame Settings"));
00159     break;
00160
00161   case MailFrame:
00162     SetRegistryBase(_T("Mail Settings"));
00163     break;
00164
00165   default:
00166     ASSERT(FALSE);
00167   }
00168
00169   // Load user tools:
00170   if (GetUserToolsManager() != NULL)
00171   {
00172     GetUserToolsManager()->LoadState(strOldRegPath);
00173   }
00174 }
00175
00176 /////////////////////////////////////////////////////////////////////////////
00177 // CAboutDlg dialog used for App About
00178
00179 class CAboutDlg : public CDialog
00180 {
00181 public:
00182   CAboutDlg();
00183
00184 // Dialog Data
00185   //{{AFX_DATA(CAboutDlg)
00186   enum { IDD = IDD_ABOUTBOX };
00187   //}}AFX_DATA
00188
00189   // ClassWizard generated virtual function overrides
00190   //{{AFX_VIRTUAL(CAboutDlg)
00191   protected:
00192   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00193   //}}AFX_VIRTUAL
00194
00195 // Implementation
00196 protected:
00197   //{{AFX_MSG(CAboutDlg)
00198     // No message handlers
00199   //}}AFX_MSG
00200   DECLARE_MESSAGE_MAP()
00201 };
00202
00203 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00204 {
00205   //{{AFX_DATA_INIT(CAboutDlg)
00206   //}}AFX_DATA_INIT
00207 }
00208
00209 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00210 {
00211   CDialog::DoDataExchange(pDX);
00212   //{{AFX_DATA_MAP(CAboutDlg)
00213   //}}AFX_DATA_MAP
00214 }
00215
00216 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00217   //{{AFX_MSG_MAP(CAboutDlg)
00218     // No message handlers
00219   //}}AFX_MSG_MAP
00220 END_MESSAGE_MAP()
00221
00222 // App command to run the dialog
00223 void COutlookDemoApp::OnAppAbout()
00224 {
00225   CAboutDlg aboutDlg;
00226   aboutDlg.DoModal();
00227 }
00228
00229 /////////////////////////////////////////////////////////////////////////////
00230 // COutlookDemoApp message handlers
00231
00232 void COutlookDemoApp::OnViewAppLook()
00233 {
00234   CAppLookDlg dlg(FALSE);
00235   dlg.DoModal();
00236 }
00237
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/DateTime.h Source File

  • general
  • CmnCtrl1

DateTime.h

Go to the documentation of this file.
00001 // DateTime.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 #if !defined(AFX_DATETIME_H__39010224_ECB6_11D0_8FEA_00A0C9034892__INCLUDED_)
00012 #define AFX_DATETIME_H__39010224_ECB6_11D0_8FEA_00A0C9034892__INCLUDED_
00013
00014 #if _MSC_VER >= 1000
00015 #pragma once
00016 #endif // _MSC_VER >= 1000
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CDateTimePage dialog
00020
00021 class CDateTimePage : public CPropertyPage
00022 {
00023   DECLARE_DYNCREATE(CDateTimePage)
00024
00025 // Construction
00026 public:
00027   void OnDTNotify(NMHDR *pHdr, LRESULT *pRes);
00028   CListBox m_lbNotifyList;
00029   UINT m_nPrevStyle;
00030   void SetCheck(UINT idBtn);
00031   CDateTimeCtrl m_DateTime;
00032   CDateTimePage();
00033   ~CDateTimePage();
00034
00035 // Dialog Data
00036   //{{AFX_DATA(CDateTimePage)
00037   enum { IDD = IDD_DATETIME };
00038   BOOL    m_bAppCanParse;
00039   BOOL    m_bShowNone;
00040   BOOL    m_bUpDown;
00041   //}}AFX_DATA
00042
00043
00044 // Overrides
00045   // ClassWizard generate virtual function overrides
00046   //{{AFX_VIRTUAL(CDateTimePage)
00047   public:
00048   protected:
00049   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00050   //}}AFX_VIRTUAL
00051
00052 // Implementation
00053 protected:
00054   // Generated message map functions
00055   //{{AFX_MSG(CDateTimePage)
00056   virtual BOOL OnInitDialog();
00057   afx_msg void OnCkupdown();
00058   afx_msg void OnCktimeformat();
00059   afx_msg void OnCkshortdateformat();
00060   afx_msg void OnCkshownone();
00061   afx_msg void OnCklongdateformat();
00062   afx_msg void OnCkappcanparse();
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065
00066 };
00067
00068 //{{AFX_INSERT_LOCATION}}
00069 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00070
00071 #endif // !defined(AFX_DATETIME_H__39010224_ECB6_11D0_8FEA_00A0C9034892__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/CustomProperties.cpp Source File

  • vc2008fp
  • NewControls

CustomProperties.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "CustomProperties.h"
00013
00014 #ifdef _DEBUG
00015 #undef THIS_FILE
00016 static char THIS_FILE[]=__FILE__;
00017 #define new DEBUG_NEW
00018 #endif
00019
00020 ////////////////////////////////////////////////////////////////////////////////
00021 // CCheckBoxProp class
00022
00023 CCheckBoxProp::CCheckBoxProp(const CString& strName, BOOL bCheck, LPCTSTR lpszDescr, DWORD dwData) :
00024   CMFCPropertyGridProperty(strName, COleVariant((long)bCheck), lpszDescr, dwData)
00025 {
00026   m_rectCheck.SetRectEmpty();
00027 }
00028
00029 void CCheckBoxProp::OnDrawName(CDC* pDC, CRect rect)
00030 {
00031   m_rectCheck = rect;
00032   m_rectCheck.DeflateRect(1, 1);
00033
00034   m_rectCheck.right = m_rectCheck.left + m_rectCheck.Height();
00035
00036   rect.left = m_rectCheck.right + 1;
00037
00038   CMFCPropertyGridProperty::OnDrawName(pDC, rect);
00039
00040   OnDrawCheckBox(pDC, m_rectCheck, (m_varValue.boolVal));
00041 }
00042
00043 void CCheckBoxProp::OnClickName(CPoint point)
00044 {
00045   if (m_bEnabled && m_rectCheck.PtInRect(point))
00046   {
00047     m_varValue.boolVal = !(m_varValue.boolVal);
00048     m_pWndList->InvalidateRect(m_rectCheck);
00049   }
00050 }
00051
00052 BOOL CCheckBoxProp::OnDblClk(CPoint point)
00053 {
00054   if (m_bEnabled && m_rectCheck.PtInRect(point))
00055   {
00056     return TRUE;
00057   }
00058
00059   m_varValue.boolVal = !(m_varValue.boolVal);
00060   m_pWndList->InvalidateRect(m_rectCheck);
00061   return TRUE;
00062 }
00063
00064 void CCheckBoxProp::OnDrawCheckBox(CDC * pDC, CRect rect, BOOL bChecked)
00065 {
00066   COLORREF clrTextOld = pDC->GetTextColor();
00067
00068   CMFCVisualManager::GetInstance()->OnDrawCheckBox(pDC, rect, FALSE, bChecked, m_bEnabled);
00069
00070   pDC->SetTextColor(clrTextOld);
00071 }
00072
00073 BOOL CCheckBoxProp::PushChar(UINT nChar)
00074 {
00075   if (nChar == VK_SPACE)
00076   {
00077     OnDblClk(CPoint(-1, -1));
00078   }
00079
00080   return TRUE;
00081 }
00082
00083 ////////////////////////////////////////////////////////////////////////////////
00084 // CPasswordProp class
00085
00086 const TCHAR cPassword = _T('*');
00087
00088 CPasswordProp::CPasswordProp(const CString& strName, const CString& strPassword, LPCTSTR lpszDescr, DWORD dwData)
00089 : CMFCPropertyGridProperty(strName, (LPCTSTR) strPassword, lpszDescr, dwData)
00090 {
00091 }
00092
00093 CWnd* CPasswordProp::CreateInPlaceEdit(CRect rectEdit, BOOL& bDefaultFormat)
00094 {
00095   CEdit* pWndEdit = new CEdit;
00096
00097   DWORD dwStyle = WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL | ES_PASSWORD;
00098
00099   if (!m_bEnabled || !m_bAllowEdit)
00100   {
00101     dwStyle |= ES_READONLY;
00102   }
00103
00104   pWndEdit->Create(dwStyle, rectEdit, m_pWndList, AFX_PROPLIST_ID_INPLACE);
00105   pWndEdit->SetPasswordChar(cPassword);
00106
00107   bDefaultFormat = TRUE;
00108   return pWndEdit;
00109 }
00110
00111 CString CPasswordProp::FormatProperty()
00112 {
00113   CString strVal = (LPCTSTR)(_bstr_t)m_varValue;
00114
00115   for (int i = 0; i < strVal.GetLength(); i++)
00116   {
00117     strVal.SetAt(i, cPassword);
00118   }
00119
00120   return strVal;
00121 }
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // CPropSliderCtrl
00125
00126 CPropSliderCtrl::CPropSliderCtrl(CSliderProp* pProp, COLORREF clrBack)
00127 {
00128   m_clrBack = clrBack;
00129   m_brBackground.CreateSolidBrush(m_clrBack);
00130   m_pProp = pProp;
00131 }
00132
00133 CPropSliderCtrl::~CPropSliderCtrl()
00134 {
00135 }
00136
00137 BEGIN_MESSAGE_MAP(CPropSliderCtrl, CSliderCtrl)
00138   //{{AFX_MSG_MAP(CPropSliderCtrl)
00139   ON_WM_CTLCOLOR_REFLECT()
00140   ON_WM_HSCROLL_REFLECT()
00141   //}}AFX_MSG_MAP
00142 END_MESSAGE_MAP()
00143
00144 /////////////////////////////////////////////////////////////////////////////
00145 // CPropSliderCtrl message handlers
00146
00147 HBRUSH CPropSliderCtrl::CtlColor(CDC* pDC, UINT /*nCtlColor*/)
00148 {
00149   pDC->SetBkColor(m_clrBack);
00150   return m_brBackground;
00151 }
00152
00153 void CPropSliderCtrl::HScroll(UINT /*nSBCode*/, UINT /*nPos*/)
00154 {
00155   ASSERT_VALID(m_pProp);
00156
00157   m_pProp->OnUpdateValue();
00158   m_pProp->Redraw();
00159 }
00160
00161 ////////////////////////////////////////////////////////////////////////////////
00162 // CSliderProp class
00163
00164 CSliderProp::CSliderProp(const CString& strName, long nValue, LPCTSTR lpszDescr, DWORD dwData) :
00165   CMFCPropertyGridProperty(strName, nValue, lpszDescr, dwData)
00166 {
00167 }
00168
00169 CWnd* CSliderProp::CreateInPlaceEdit(CRect rectEdit, BOOL& bDefaultFormat)
00170 {
00171   CPropSliderCtrl* pWndSlider = new CPropSliderCtrl(this, m_pWndList->GetBkColor());
00172
00173   rectEdit.left += rectEdit.Height() + 5;
00174
00175   pWndSlider->Create(WS_VISIBLE | WS_CHILD, rectEdit, m_pWndList, AFX_PROPLIST_ID_INPLACE);
00176   pWndSlider->SetPos(m_varValue.lVal);
00177
00178   bDefaultFormat = TRUE;
00179   return pWndSlider;
00180 }
00181
00182 BOOL CSliderProp::OnUpdateValue()
00183 {
00184   ASSERT_VALID(this);
00185   ASSERT_VALID(m_pWndInPlace);
00186   ASSERT_VALID(m_pWndList);
00187   ASSERT(::IsWindow(m_pWndInPlace->GetSafeHwnd()));
00188
00189   long lCurrValue = m_varValue.lVal;
00190
00191   CSliderCtrl* pSlider = (CSliderCtrl*) m_pWndInPlace;
00192
00193   m_varValue = (long) pSlider->GetPos();
00194
00195   if (lCurrValue != m_varValue.lVal)
00196   {
00197     m_pWndList->OnPropertyChanged(this);
00198   }
00199
00200   return TRUE;
00201 }
00202
00203 ////////////////////////////////////////////////////////////////////////////////
00204 // CBoundedNumberPairProp class
00205
00206 CBoundedNumberPairProp::CBoundedNumberPairProp(const CString& strGroupName, int nMinValue1, int nMaxValue1, int nMinValue2, int nMaxValue2, DWORD_PTR dwData, BOOL bIsValueList) :
00207   CMFCPropertyGridProperty(strGroupName, dwData, bIsValueList)
00208 {
00209   m_nMinValue1 = nMinValue1;
00210   m_nMaxValue1 = nMaxValue1;
00211   m_nMinValue2 = nMinValue2;
00212   m_nMaxValue2 = nMaxValue2;
00213 }
00214
00215 BOOL CBoundedNumberPairProp::OnUpdateValue()
00216 {
00217   ASSERT_VALID(this);
00218   ASSERT_VALID(m_pWndInPlace);
00219   ASSERT_VALID(m_pWndList);
00220   ASSERT(::IsWindow(m_pWndInPlace->GetSafeHwnd()));
00221
00222   CString strText;
00223   m_pWndInPlace->GetWindowText(strText);
00224
00225   BOOL bIsChanged = FormatProperty() != strText;
00226
00227   if (bIsChanged)
00228   {
00229     CString strDelimeter(_T(","));
00230
00231     for (int i = 0; !strText.IsEmpty() && i < GetSubItemsCount(); i++)
00232     {
00233       CString strItem = strText.SpanExcluding(strDelimeter);
00234       if (strItem.GetLength() + 1 > strText.GetLength())
00235       {
00236         strText.Empty();
00237       }
00238       else
00239       {
00240         strText = strText.Mid(strItem.GetLength() + 1);
00241       }
00242       strItem.TrimLeft();
00243       strItem.TrimRight();
00244
00245       int nItem = _ttoi(strItem);
00246       if ((i == 0) && ((nItem < m_nMinValue1) || (nItem > m_nMaxValue1)))
00247       {
00248         static BOOL bRecursedHere = FALSE;
00249         if (bRecursedHere)
00250           return TRUE;
00251         bRecursedHere = TRUE;
00252
00253         CString strMessage;
00254         strMessage.Format(_T("Height value must be between %d and %d."), m_nMinValue1, m_nMaxValue1);
00255         AfxMessageBox(strMessage);
00256
00257         bRecursedHere = FALSE;
00258         return FALSE;
00259       }
00260       else if ((i == 1) && ((nItem < m_nMinValue2) || (nItem > m_nMaxValue2)))
00261       {
00262         static BOOL bRecursedHere = FALSE;
00263         if (bRecursedHere)
00264           return TRUE;
00265         bRecursedHere = TRUE;
00266
00267         CString strMessage;
00268         strMessage.Format(_T("Width value must be between %d and %d."), m_nMinValue2, m_nMaxValue2);
00269         AfxMessageBox(strMessage);
00270
00271         bRecursedHere = FALSE;
00272         return FALSE;
00273       }
00274     }
00275
00276     return CMFCPropertyGridProperty::OnUpdateValue();
00277   }
00278
00279   return TRUE;
00280 }
00281
00282 ////////////////////////////////////////////////////////////////////////////////
00283 // CBoundedNumberSubProp class
00284
00285 CBoundedNumberSubProp::CBoundedNumberSubProp(const CString& strName, const COleVariant& varValue, int nMinValue, int nMaxValue, LPCTSTR lpszDescr) :
00286   CMFCPropertyGridProperty(strName, varValue, lpszDescr)
00287 {
00288   m_nMinValue = nMinValue;
00289   m_nMaxValue = nMaxValue;
00290 }
00291
00292 BOOL CBoundedNumberSubProp::OnUpdateValue()
00293 {
00294   ASSERT_VALID(this);
00295   ASSERT_VALID(m_pWndInPlace);
00296   ASSERT_VALID(m_pWndList);
00297   ASSERT(::IsWindow(m_pWndInPlace->GetSafeHwnd()));
00298
00299   BOOL bRet = TRUE;
00300   CString strText;
00301   m_pWndInPlace->GetWindowText(strText);
00302
00303   BOOL bIsChanged = FormatProperty() != strText;
00304   if (bIsChanged)
00305   {
00306     int nItem = _ttoi(strText);
00307     if ((nItem < m_nMinValue) || (nItem > m_nMaxValue))
00308     {
00309       static BOOL bRecursedHere = FALSE;
00310       if (bRecursedHere)
00311         return TRUE;
00312       bRecursedHere = TRUE;
00313
00314       CString strMessage;
00315       strMessage.Format(_T("Value must be between %d and %d."), m_nMinValue, m_nMaxValue);
00316       AfxMessageBox(strMessage);
00317
00318       bRecursedHere = FALSE;
00319       return FALSE;
00320     }
00321
00322     bRet = CMFCPropertyGridProperty::OnUpdateValue();
00323
00324     if (m_pParent != NULL)
00325     {
00326       m_pWndList->OnPropertyChanged(m_pParent);
00327     }
00328   }
00329
00330   return bRet;
00331 }
00332
00333 ////////////////////////////////////////////////////////////////////////////////
00334 // CIconListProp class
00335
00336 const int nIconMargin = 3;
00337
00338 CIconListProp::CIconListProp(const CString& strName, const CImageList& imageListIcons, int nSelectedIcon, CStringList* plstIconNames, LPCTSTR lpszDescr, DWORD dwData) :
00339   CMFCPropertyGridProperty(strName, (long) nSelectedIcon, lpszDescr, dwData)
00340 {
00341   m_imageListIcons.CreateFromImageList(imageListIcons);
00342   m_imageListIcons.SetTransparentColor(::GetSysColor(COLOR_3DFACE));
00343
00344   if (plstIconNames != NULL)
00345   {
00346     m_lstIconNames.AddTail(plstIconNames);
00347     ASSERT(m_lstIconNames.GetCount() == m_imageListIcons.GetCount());
00348   }
00349
00350   for (int i = 0; i < m_imageListIcons.GetCount(); i++)
00351   {
00352     CString strItem;
00353     strItem.Format(_T("%d"), i);
00354
00355     AddOption(strItem);
00356   }
00357
00358   AllowEdit(FALSE);
00359 }
00360
00361 CComboBox* CIconListProp::CreateCombo(CWnd* pWndParent, CRect rect)
00362 {
00363   rect.bottom = rect.top + 400;
00364
00365   CIconCombo* pWndCombo = new CIconCombo(m_imageListIcons, m_lstIconNames);
00366   if (!pWndCombo->Create(WS_CHILD | CBS_NOINTEGRALHEIGHT | CBS_DROPDOWNLIST | WS_VSCROLL | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS, rect, pWndParent, AFX_PROPLIST_ID_INPLACE))
00367   {
00368     delete pWndCombo;
00369     return NULL;
00370   }
00371
00372   return pWndCombo;
00373 }
00374
00375 void CIconListProp::OnDrawValue(CDC* pDC, CRect rect)
00376 {
00377   ASSERT_VALID(m_pWndList);
00378   ASSERT_VALID(pDC);
00379
00380   CString strVal = (LPCTSTR)(_bstr_t) m_varValue;
00381   if (strVal.IsEmpty() || m_imageListIcons.GetCount() == 0)
00382   {
00383     return;
00384   }
00385
00386   int nIndex = _ttoi(strVal);
00387
00388   if (nIndex < 0)
00389   {
00390     return;
00391   }
00392
00393   COLORREF clrTextOld = pDC->GetTextColor();
00394
00395   CFont* pOldFont = pDC->SelectObject(IsModified() && m_pWndList->IsMarkModifiedProperties() ? &m_pWndList->GetBoldFont() : m_pWndList->GetFont());
00396
00397   CRect rectImage = rect;
00398   rectImage.right = rectImage.left + rectImage.Height();
00399   rectImage.DeflateRect(1, 1);
00400
00401   CAfxDrawState ds;
00402   m_imageListIcons.PrepareDrawImage(ds, rectImage.Size());
00403   m_imageListIcons.Draw(pDC, rectImage.left, rectImage.top, nIndex);
00404   m_imageListIcons.EndDrawImage(ds);
00405
00406   if (!m_lstIconNames.IsEmpty())
00407   {
00408     CString str = m_lstIconNames.GetAt(m_lstIconNames.FindIndex(nIndex));
00409
00410     rect.left = rectImage.right + 2 * nIconMargin;
00411
00412     pDC->DrawText(str, rect, DT_SINGLELINE | DT_VCENTER);
00413   }
00414
00415   pDC->SetTextColor(clrTextOld);
00416   pDC->SelectObject(pOldFont);
00417
00418   m_bValueIsTruncated = FALSE;
00419 }
00420
00421 CWnd* CIconListProp::CreateInPlaceEdit(CRect rectEdit, BOOL& bDefaultFormat)
00422 {
00423   CWnd* pWnd = CMFCPropertyGridProperty::CreateInPlaceEdit(rectEdit, bDefaultFormat);
00424   if (pWnd != NULL)
00425   {
00426     pWnd->ShowWindow(SW_HIDE);
00427   }
00428
00429   return pWnd;
00430 }
00431
00432 /////////////////////////////////////////////////////////////////////////////
00433 // CIconCombo
00434
00435 CIconCombo::CIconCombo(CMFCToolBarImages& imageListIcons, CStringList& lstIconNames) :
00436   m_imageListIcons(imageListIcons), m_lstIconNames(lstIconNames)
00437 {
00438 }
00439
00440 CIconCombo::~CIconCombo()
00441 {
00442 }
00443
00444 BEGIN_MESSAGE_MAP(CIconCombo, CComboBox)
00445   //{{AFX_MSG_MAP(CIconCombo)
00446   ON_WM_DRAWITEM()
00447   ON_WM_MEASUREITEM()
00448   //}}AFX_MSG_MAP
00449 END_MESSAGE_MAP()
00450
00451 /////////////////////////////////////////////////////////////////////////////
00452 // CIconCombo message handlers
00453
00454 void CIconCombo::OnDrawItem(int /*nIDCtl*/, LPDRAWITEMSTRUCT lpDIS)
00455 {
00456   CDC* pDC = CDC::FromHandle(lpDIS->hDC);
00457   ASSERT_VALID(pDC);
00458
00459   CRect rect = lpDIS->rcItem;
00460   int nIcon = lpDIS->itemID;
00461
00462   HBRUSH brBackground;
00463   COLORREF clText;
00464
00465   if (lpDIS->itemState & ODS_SELECTED)
00466   {
00467     brBackground = GetSysColorBrush(COLOR_HIGHLIGHT);
00468     clText = afxGlobalData.clrTextHilite;
00469   }
00470   else
00471   {
00472     brBackground = GetSysColorBrush(COLOR_WINDOW);
00473     clText = afxGlobalData.clrWindowText;
00474   }
00475
00476   if (lpDIS->itemAction &(ODA_DRAWENTIRE | ODA_SELECT))
00477   {
00478     ::FillRect(lpDIS->hDC, &rect, brBackground);
00479   }
00480
00481   if (nIcon < 0)
00482   {
00483     return;
00484   }
00485
00486   CAfxDrawState ds;
00487   m_imageListIcons.PrepareDrawImage(ds);
00488   m_imageListIcons.Draw(pDC, rect.left + nIconMargin, rect.top + nIconMargin, nIcon);
00489   m_imageListIcons.EndDrawImage(ds);
00490
00491   if (!m_lstIconNames.IsEmpty())
00492   {
00493     CString str = m_lstIconNames.GetAt(m_lstIconNames.FindIndex(nIcon));
00494     CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontRegular);
00495
00496     pDC->SetBkMode(TRANSPARENT);
00497     pDC->SetTextColor(clText);
00498
00499     CRect rectText = rect;
00500     rectText.left += m_imageListIcons.GetImageSize().cx + 2 * nIconMargin;
00501
00502     pDC->DrawText(str, rectText, DT_SINGLELINE | DT_VCENTER);
00503
00504     pDC->SelectObject(pOldFont);
00505   }
00506 }
00507
00508 void CIconCombo::OnMeasureItem(int /*nIDCtl*/, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00509 {
00510   int nTextWidth = 0;
00511   int nTextHeight = 0;
00512
00513   if (!m_lstIconNames.IsEmpty())
00514   {
00515     nTextHeight = afxGlobalData.GetTextHeight();
00516
00517     CClientDC dc(this);
00518     CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);
00519
00520     for (POSITION pos = m_lstIconNames.GetHeadPosition(); pos != NULL;)
00521     {
00522       CString str = m_lstIconNames.GetNext(pos);
00523
00524       nTextWidth = max(nTextWidth, dc.GetTextExtent(str).cx + nIconMargin);
00525     }
00526
00527     dc.SelectObject(pOldFont);
00528   }
00529
00530   lpMeasureItemStruct->itemWidth = m_imageListIcons.GetImageSize().cx + nTextWidth + 2 * nIconMargin;
00531   lpMeasureItemStruct->itemHeight = max(nTextHeight, m_imageListIcons.GetImageSize().cy + 2 * nIconMargin);
00532 }
00533
00534 ////////////////////////////////////////////////////////////////////////////////
00535 // CComboBoxExProp class
00536
00537 CComboBoxExProp::CComboBoxExProp(const CString& strName, const CString& strValue, LPCTSTR lpszDescr, DWORD dwData, CImageList* pImageList) :
00538   CMFCPropertyGridProperty(strName, (LPCTSTR) strValue, lpszDescr, dwData), m_pImageList(pImageList)
00539 {
00540 }
00541
00542 CComboBox* CComboBoxExProp::CreateCombo(CWnd* pWndParent, CRect rect)
00543 {
00544   rect.bottom = rect.top + 400;
00545
00546   CComboBoxEx* pWndCombo = new CComboBoxEx;
00547
00548   if (!pWndCombo->Create(WS_CHILD | CBS_DROPDOWNLIST | WS_VSCROLL, rect, pWndParent, AFX_PROPLIST_ID_INPLACE))
00549   {
00550     delete pWndCombo;
00551     return NULL;
00552   }
00553
00554   if (m_pImageList != NULL)
00555   {
00556     pWndCombo->SetImageList(m_pImageList);
00557   }
00558
00559   return pWndCombo;
00560 }
00561
00562 BOOL CComboBoxExProp::OnEdit(LPPOINT lptClick)
00563 {
00564   if (!CMFCPropertyGridProperty::OnEdit(lptClick))
00565   {
00566     return FALSE;
00567   }
00568
00569   CComboBoxEx* pWndComboEx = DYNAMIC_DOWNCAST(CComboBoxEx, m_pWndCombo);
00570   if (pWndComboEx == NULL)
00571   {
00572     ASSERT(FALSE);
00573     return FALSE;
00574   }
00575
00576   pWndComboEx->ResetContent();
00577
00578   int i = 0;
00579
00580   COMBOBOXEXITEM item;
00581   memset(&item, 0, sizeof(item));
00582
00583   item.mask = CBEIF_IMAGE | CBEIF_INDENT | CBEIF_SELECTEDIMAGE | CBEIF_TEXT;
00584
00585   for (POSITION pos = m_lstOptions.GetHeadPosition(); pos != NULL; i++)
00586   {
00587     CString strItem = m_lstOptions.GetNext(pos);
00588
00589     item.iItem = i;
00590     item.iSelectedImage = item.iImage = m_lstIcons [i];
00591     item.iIndent = m_lstIndents [i];
00592     item.pszText = (LPTSTR)(LPCTSTR) strItem;
00593     item.cchTextMax = strItem.GetLength();
00594
00595     pWndComboEx->InsertItem(&item);
00596   }
00597
00598   return TRUE;
00599 }
00600
00601 BOOL CComboBoxExProp::AddOption(LPCTSTR lpszOption, int nIcon, int nIndent)
00602 {
00603   if (!CMFCPropertyGridProperty::AddOption(lpszOption))
00604   {
00605     return FALSE;
00606   }
00607
00608   m_lstIcons.Add(nIcon);
00609   m_lstIndents.Add(nIndent);
00610
00611   return TRUE;
00612 }
00613
00614 COwnerDrawDescrProp::COwnerDrawDescrProp(const CString& strName, const COleVariant& varValue) : CMFCPropertyGridProperty(strName, varValue)
00615 {
00616 }
00617
00618 void COwnerDrawDescrProp::OnDrawDescription(CDC* pDC, CRect rect)
00619 {
00620   CDrawingManager dm(*pDC);
00621   dm.FillGradient2(rect, RGB(102, 200, 238), RGB(0, 129, 185), 45);
00622
00623   CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontBold);
00624
00625   CString strText = _T("Custom Text");
00626
00627   pDC->SetTextColor(RGB(0, 65, 117));
00628   pDC->DrawText(strText, rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
00629
00630   rect.OffsetRect(-2, -2);
00631
00632   pDC->SetTextColor(RGB(155, 251, 255));
00633   pDC->DrawText(strText, rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
00634
00635   pDC->SelectObject(pOldFont);
00636 }
00637
00638 CTwoButtonsProp::CTwoButtonsProp(const CString& strName, const COleVariant& varValue) : CMFCPropertyGridProperty(strName, varValue)
00639 {
00640   CBitmap bmp;
00641   bmp.LoadBitmap(IDB_BUTTONS);
00642
00643   m_images.Create(14, 14, ILC_MASK | ILC_COLOR8, 0, 0);
00644   m_images.Add(&bmp, RGB(255, 0, 255));
00645 }
00646
00647 void CTwoButtonsProp::AdjustButtonRect()
00648 {
00649   CMFCPropertyGridProperty::AdjustButtonRect();
00650   m_rectButton.left -= m_rectButton.Width();
00651 }
00652
00653 void CTwoButtonsProp::OnClickButton(CPoint point)
00654 {
00655   BOOL bIsLeft = point.x < m_rectButton.CenterPoint().x;
00656   AfxMessageBox(bIsLeft ? _T("Left button clicked") : _T("Right button clicked"));
00657 }
00658
00659 void CTwoButtonsProp::OnDrawButton(CDC* pDC, CRect rectButton)
00660 {
00661   for (int i = 0; i < 2; i++)
00662   {
00663     CMFCToolBarButton button;
00664
00665     CRect rect = rectButton;
00666
00667     if (i == 0)
00668     {
00669       rect.right = rect.left + rect.Width() / 2;
00670     }
00671     else
00672     {
00673       rect.left = rect.right - rect.Width() / 2;
00674     }
00675
00676     CMFCVisualManager::AFX_BUTTON_STATE state = CMFCVisualManager::ButtonsIsHighlighted;
00677
00678     CMFCVisualManager::GetInstance()->OnFillButtonInterior(pDC, &button, rect, state);
00679
00680     m_images.Draw(pDC, i, CPoint(rect.left, rect.top), ILD_NORMAL);
00681
00682     CMFCVisualManager::GetInstance()->OnDrawButtonBorder(pDC, &button, rect, state);
00683   }
00684 }
00685
00686 CCustomDlgProp::CCustomDlgProp(const CString& strName, const COleVariant& varValue) : CMFCPropertyGridProperty(strName, varValue)
00687 {
00688 }
00689
00690 void CCustomDlgProp::OnClickButton(CPoint /*point*/)
00691 {
00692   AfxMessageBox(_T("Show your dialog here..."));
00693   SetValue(_T("New value"));
00694 }
00695
00696
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBar.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMCategoryBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MSMCategoriesBar.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMoneyDemo.h"
00015 #include "MSMCategoryBar.h"
00016 #include "MSMCategoryBarButton.h"
00017
00018 #include "MSMVisualManager.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMSMCategoryBar
00028
00029 IMPLEMENT_DYNCREATE(CMSMCategoryBar, CMSMToolBar)
00030
00031 CMSMCategoryBar::CMSMCategoryBar ()
00032 {
00033 }
00034
00035 CMSMCategoryBar::~CMSMCategoryBar ()
00036 {
00037 }
00038
00039 BEGIN_MESSAGE_MAP(CMSMCategoryBar, CMSMToolBar)
00040   ON_WM_CREATE()
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CMSMCategoryBar message handlers
00045
00046 int CMSMCategoryBar::OnCreate (LPCREATESTRUCT lpCreateStruct)
00047 {
00048   if (CMSMToolBar::OnCreate (lpCreateStruct) == -1)
00049     return -1;
00050
00051   RestoreOriginalstate ();
00052
00053   return 0;
00054 }
00055
00056 BOOL CMSMCategoryBar::RestoreOriginalstate ()
00057 {
00058   RemoveAllButtons ();
00059
00060   InsertButton (CMSMCategoryBarButton (_T("Home")     , ID_CATEGORIE_1));
00061   InsertButton (CMSMCategoryBarButton (_T("Banking")  , ID_CATEGORIE_2));
00062   InsertButton (CMSMCategoryBarButton (_T("Bills")    , ID_CATEGORIE_3));
00063   InsertButton (CMSMCategoryBarButton (_T("Reports")  , ID_CATEGORIE_4));
00064   InsertButton (CMSMCategoryBarButton (_T("Budget")   , ID_CATEGORIE_5));
00065   InsertButton (CMSMCategoryBarButton (_T("Investing"), ID_CATEGORIE_6));
00066   InsertButton (CMSMCategoryBarButton (_T("Planning") , ID_CATEGORIE_7));
00067   InsertButton (CMSMCategoryBarButton (_T("Taxes")    , ID_CATEGORIE_8));
00068
00069 //  EnableCustomizeButton (TRUE, -1, _T(""));
00070
00071   AdjustLayout ();
00072   Invalidate ();
00073
00074   return TRUE;
00075 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/ExplorerBar.h Source File

  • vc2008fp
  • IEDemo

ExplorerBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 // ExplorerBar.h : header file
00014 //
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CExplorerBar window
00018
00019 class CExplorerBar : public CMFCTasksPane
00020 {
00021 // Construction
00022 public:
00023   CExplorerBar();
00024
00025 // Attributes
00026 protected:
00027   CTreeCtrl   m_wndFavorites;
00028
00029 // Operations
00030 protected:
00031
00032 // Overrides
00033   // ClassWizard generated virtual function overrides
00034   //{{AFX_VIRTUAL(CExplorerBar)
00035   //}}AFX_VIRTUAL
00036
00037 protected:
00038
00039 // Implementation
00040 public:
00041   virtual ~CExplorerBar();
00042
00043   // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CExplorerBar)
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047   //}}AFX_MSG
00048   afx_msg void OnSelectTree(NMHDR* pNMHDR, LRESULT* pResult);
00049   DECLARE_MESSAGE_MAP()
00050 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpiroDoc Member List

This is the complete list of members for CSpiroDoc, including all inherited members.
CSpiroDoc() | CSpiroDoc | [protected]
DeleteContents() | CSpiroDoc | [virtual]
m_arrPFigures | CSpiroDoc |
m_bThickPen | CSpiroDoc |
m_pFigureCurrent | CSpiroDoc |
m_sizeExtent | CSpiroDoc |
OnNewDocument() | CSpiroDoc | [virtual]
Serialize(CArchive &ar) | CSpiroDoc | [virtual]
TransferCurrentFigure() | CSpiroDoc |
~CSpiroDoc() | CSpiroDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDateTimePage Member List

This is the complete list of members for CDateTimePage, including all inherited members.
CDateTimePage() | CDateTimePage |
DoDataExchange(CDataExchange *pDX) | CDateTimePage | [protected, virtual]
IDD enum value | CDateTimePage |
m_bAppCanParse | CDateTimePage |
m_bShowNone | CDateTimePage |
m_bUpDown | CDateTimePage |
m_DateTime | CDateTimePage |
m_lbNotifyList | CDateTimePage |
m_nPrevStyle | CDateTimePage |
OnCkappcanparse() | CDateTimePage | [protected]
OnCklongdateformat() | CDateTimePage | [protected]
OnCkshortdateformat() | CDateTimePage | [protected]
OnCkshownone() | CDateTimePage | [protected]
OnCktimeformat() | CDateTimePage | [protected]
OnCkupdown() | CDateTimePage | [protected]
OnDTNotify(NMHDR *pHdr, LRESULT *pRes) | CDateTimePage |
OnInitDialog() | CDateTimePage | [protected, virtual]
SetCheck(UINT idBtn) | CDateTimePage |
~CDateTimePage() | CDateTimePage |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface16.cpp Source File

  • general
  • MMXSwarm

MMXSurface16.cpp

Go to the documentation of this file.
00001 // MMXSurface16.cpp : implementation of the CMMXSurface16Intrinsic
00002 // class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012 //
00013 #include "stdafx.h"
00014 #include "MMXSurface.h"
00015 #include "MMXWrapper.h"
00016
00017 typedef CMMXUnsigned16Saturated CMMX;
00018
00019 // Optimized for a 4 pixel processing 16 bit buffer
00020 void CMMXSurface16Intrinsic::AdjustWidth(int *pWidth)
00021 {
00022   ASSERT(pWidth != NULL);
00023   ASSERT(m_kDeltaX <= 3);
00024   // to avoid special casing the end of the loop,
00025   // our visible pixel width needs to be a multiple of 4
00026
00027   *pWidth = (*pWidth+3-m_kDeltaX)& ~0x3;
00028 }
00029
00030 void CMMXSurface16Intrinsic::OnCreated()
00031 {
00032   ASSERT(GetBitDepth() == 16);
00033   ASSERT((GetPitch() & 0x7) == 0);
00034   ASSERT(GetVisibleWidth() && GetVisibleHeight());
00035
00036   int width = GetVisibleWidth();
00037     m_qwpl  = GetPitch()/8; // qwords Per Line
00038     m_width = (width+3)/4; // 4 pixels at a time
00039 }
00040
00041 // Note: It's still faster than the brute force approach,
00042 // However, it's slower than choosing 24 bit and blitting to
00043 // a 16 bit screen. breaking out the bits into MMX friendly sizes
00044 // doesn't work out well.
00045 void CMMXSurface16Intrinsic::BlurBits()
00046 {
00047     int height = GetVisibleHeight();
00048     ULONGLONG *pCur  = (ULONGLONG *)GetPixelAddress(0,0);
00049
00050   CMMX cUpBase, cDownBase, cCurBase, cLeftBase, cRightBase;
00051   CMMX cUp, cDown, cCur, cLeft, cRight;
00052   CMMX cDest;
00053   CMMX cMask(0x001f001f001f001fu); // colorspace mask - 5 bits per color
00054
00055   do {
00056     int width = m_width;
00057     do {
00058       // Load pixels and do the mmx unpack
00059       // Note: pwCur is used to do non-aligned
00060       // data reads - which is not normally recommended.
00061       // on X86, it is faster than loading aligned and
00062       // shift-oring.
00063       WORD *pwCur = (WORD *)pCur;
00064       cLeftBase = *(ULONGLONG*)(pwCur-1);
00065       cCurBase = pCur[0];
00066       cRightBase = *(ULONGLONG*)(pwCur+1);
00067       cUpBase = pCur[-m_qwpl];
00068       cDownBase = pCur[+m_qwpl];
00069
00070       cLeft = cLeftBase & cMask;
00071       cCur = cCurBase & cMask;
00072       cRight = cRightBase & cMask;
00073       cUp = cUpBase & cMask;
00074       cDown = cDownBase & cMask;
00075
00076       // Actual math. Don't step on current, or right.
00077       // Sum the 4 around and double the middle
00078       // Do current pixel in this line
00079       cDest = ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
00080       cMask <<= 5;
00081
00082       cLeft = cLeftBase & cMask;
00083       cCur = cCurBase & cMask;
00084       cRight = cRightBase & cMask;
00085       cUp = cUpBase & cMask;
00086       cDown = cDownBase & cMask;
00087
00088       // Actual math for next color space
00089       cDest |= cMask & ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
00090       cMask <<= 5;
00091
00092       cLeft = (cLeftBase & cMask) >> 3;
00093       cCur = (cCurBase & cMask) >> 3;
00094       cRight = (cRightBase & cMask) >> 3;
00095       cUp = (cUpBase & cMask) >> 3;
00096       cDown = (cDownBase & cMask) >> 3;
00097
00098       // Actual math for next color space
00099       cDest |= cMask & (cDown+cUp+cLeft+cRight+(cCur<<2));
00100       *pCur++ = cDest;
00101       cMask >>= 10;
00102     } while (--width > 0);
00103   } while (--height > 0);
00104 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistvw.h Source File

  • general
  • rowlist

rlistvw.h

Go to the documentation of this file.
00001 // RListVw.h : interface of the CRowListView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CRowListView : public CListViewEx
00013 {
00014 protected: // create from serialization only
00015   CRowListView();
00016   DECLARE_DYNCREATE(CRowListView)
00017
00018 // Attributes
00019 public:
00020   CRowListDoc* GetDocument();
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CRowListView)
00028   public:
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual void OnInitialUpdate(); // called first time after construct
00032   //}}AFX_VIRTUAL
00033
00034 // Implementation
00035 public:
00036   virtual ~CRowListView();
00037 #ifdef _DEBUG
00038   virtual void AssertValid() const;
00039   virtual void Dump(CDumpContext& dc) const;
00040 #endif
00041
00042 protected:
00043
00044 // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CRowListView)
00047   afx_msg void OnViewSmallIcons();
00048   afx_msg void OnViewLargeIcons();
00049   afx_msg void OnViewList();
00050   afx_msg void OnViewDetails();
00051   afx_msg void OnViewFullRowDetails();
00052   afx_msg void OnUpdateViewSmallIcons(CCmdUI* pCmdUI);
00053   afx_msg void OnUpdateViewLargeIcons(CCmdUI* pCmdUI);
00054   afx_msg void OnUpdateViewList(CCmdUI* pCmdUI);
00055   afx_msg void OnUpdateViewDetails(CCmdUI* pCmdUI);
00056   afx_msg void OnUpdateViewFullRowDetails(CCmdUI* pCmdUI);
00057   afx_msg void OnViewStateIcons();
00058   afx_msg void OnUpdateViewStateIcons(CCmdUI* pCmdUI);
00059   afx_msg void OnViewClientWidthSel();
00060   afx_msg void OnUpdateViewClientWidthSel(CCmdUI* pCmdUI);
00061   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00062   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065
00066 // list view image lists
00067 protected:
00068   CImageList m_LargeImageList;
00069   CImageList m_SmallImageList;
00070   CImageList m_StateImageList;
00071
00072 // view type helpers
00073 public:
00074   BOOL SetViewType(DWORD dwViewType);
00075   DWORD GetViewType();
00076
00077 // flags and states
00078 protected:
00079   BOOL m_bStateIcons;
00080   int m_nCheckedItem;
00081   HICON m_hSmallIcon;
00082   HICON m_hLargeIcon;
00083
00084   void CheckItem(int nNewCheckedItem);
00085 };
00086
00087 #ifndef _DEBUG  // debug version in RListVw.cpp
00088 inline CRowListDoc* CRowListView::GetDocument()
00089    { return (CRowListDoc*)m_pDocument; }
00090 #endif
00091
00092 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/resource.h Source File

  • ole
  • autoclik
  • autodriv

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by AUTODRIV.RC
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDP_CANNOT_CREATE_AUTOCLIK      101
00007 #define IDD_AUTODRIV_DIALOG             102
00008 #define IDR_MAINFRAME                   128
00009 #define IDC_CLOSE                       1000
00010 #define IDC_REFRESH                     1001
00011 #define IDC_ANIMATE_XY                  1002
00012 #define IDC_ANIMATEPOS                  1003
00013 #define IDC_SETX                        1004
00014 #define IDC_SETY                        1005
00015 #define IDC_SETPOS                      1006
00016 #define IDC_GETPOS                      1007
00017 #define IDC_SETTEXT                     1008
00018 #define IDC_SETALL                      1009
00019 #define IDC_GETALL                      1010
00020 #define IDC_EDITX                       1011
00021 #define IDC_EDITY                       1012
00022 #define IDC_EDITTEXT                    1013
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028 #define _APS_NEXT_RESOURCE_VALUE        129
00029 #define _APS_NEXT_COMMAND_VALUE         32771
00030 #define _APS_NEXT_CONTROL_VALUE         1014
00031 #define _APS_NEXT_SYMED_VALUE           101
00032 #endif
00033 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/stdafx.cpp Source File

  • ole
  • oclient

stdafx.cpp

Go to the documentation of this file.
00001
00002 // stdafx.cpp : pre-compiled header and types file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/MainFrm.h Source File

  • vc2008fp
  • VisualStudioDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "WatchBar.h"
00013 #include "ClassViewBar.h"
00014 #include "ResourceView.h"
00015 #include "FileViewBar.h"
00016 #include "OutputView.h"
00017 #include "DynamicHelpView.h"
00018 #include "PropertiesViewBar.h"
00019
00020 class CMainFrame : public CMDIFrameWndEx
00021 {
00022   DECLARE_DYNAMIC(CMainFrame)
00023 public:
00024   CMainFrame();
00025
00026 // Operations
00027 public:
00028   void OnChangeLook(BOOL bOneNoteTabs, BOOL bMDITabColors, BOOL bIsVSDotNetLook, BOOL bDockTabColors, BOOL bMDITabsVS2005Look, BOOL bActiveTabCloseButton);
00029
00030 // Overrides
00031 public:
00032   virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
00033   virtual BOOL DestroyWindow();
00034
00035 protected:
00036   virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038
00039   virtual CMDIChildWndEx* CreateDocumentWindow(LPCTSTR lpcszDocName, CObject* pObj);
00040   virtual BOOL OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop);
00041
00042 // Implementation
00043 public:
00044   static CMFCToolBarComboBoxButton* GetFindCombo();
00045   virtual ~CMainFrame();
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050
00051 protected:  // control bar embedded members
00052   CMFCMenuBar m_wndMenuBar;
00053   CMFCStatusBar m_wndStatusBar;
00054   CMFCToolBar m_wndToolBar;
00055   CMFCToolBar m_wndToolbarBuild;
00056   CMFCToolBar m_wndToolbarEdit;
00057   CMFCDropDownToolBar m_wndToolbarResource;
00058
00059   CClassViewBar m_wndClassView;
00060   CResourceViewBar m_wndResourceView;
00061   CFileViewBar m_wndFileView;
00062
00063   CDynamicHelpViewBar m_wndDynamicHelpView;
00064   COutputViewBar m_wndOutputView;
00065   CPropertiesViewBar m_wndPropertiesBar;
00066
00067   CWatchBar m_wndWatchBar;
00068
00069   CMFCToolBarImages m_UserImages;
00070
00071 private:
00072   BOOL IsEditViewActive();
00073
00074 protected:
00075   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00076   afx_msg void OnWindowManager();
00077   afx_msg void OnHelpKeyboardmap();
00078   afx_msg void OnFileNewProject();
00079   afx_msg void OnFileNewBlankSolution();
00080   afx_msg void OnFileOpenSolution();
00081   afx_msg void OnFileCloseSolution();
00082   afx_msg void OnFileSaveAll();
00083   afx_msg void OnViewRefresh();
00084   afx_msg void OnToolsConnectToDatabase();
00085   afx_msg void OnToolsDebugProcesses();
00086   afx_msg void OnViewFullScreen();
00087   afx_msg void OnToolsOptions();
00088   afx_msg void OnHelpWeb();
00089   afx_msg void OnMdiMoveToNextGroup();
00090   afx_msg void OnMdiMoveToPrevGroup();
00091   afx_msg void OnMdiNewHorzTabGroup();
00092   afx_msg void OnMdiNewVertGroup();
00093   afx_msg void OnMdiCancel();
00094   afx_msg void OnClose();
00095   afx_msg void OnViewClass();
00096   afx_msg void OnUpdateViewClass(CCmdUI* pCmdUI);
00097   afx_msg void OnViewFile();
00098   afx_msg void OnUpdateViewFile(CCmdUI* pCmdUI);
00099   afx_msg void OnViewResource();
00100   afx_msg void OnUpdateViewResource(CCmdUI* pCmdUI);
00101   afx_msg void OnViewProperties();
00102   afx_msg void OnUpdateViewProperties(CCmdUI* pCmdUI);
00103   afx_msg void OnViewOutput();
00104   afx_msg void OnUpdateViewOutput(CCmdUI* pCmdUI);
00105   afx_msg void OnViewWatch();
00106   afx_msg void OnUpdateViewWatch(CCmdUI* pCmdUI);
00107   afx_msg void OnViewDynamichelp();
00108   afx_msg void OnUpdateViewDynamichelp(CCmdUI* pCmdUI);
00109   afx_msg void OnMdiTabbedDocument();
00110   afx_msg void OnUpdateMdiTabbedDocument(CCmdUI* pCmdUI);
00111   afx_msg void OnViewCustomize();
00112   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00113   afx_msg LRESULT OnGetTabToolTip(WPARAM wp, LPARAM lp);
00114   afx_msg LRESULT OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp);
00115   LRESULT OnToolbarCreateNew(WPARAM wp,LPARAM lp);
00116   afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
00117
00118   DECLARE_MESSAGE_MAP()
00119
00120   BOOL CreateDockingBars();
00121   void SetDockingBarsIcons(BOOL bHiColorIcons);
00122 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawobj.h Source File

  • ole
  • drawcli

drawobj.h

Go to the documentation of this file.
00001 // drawobj.h - interface for CDrawObj and derivatives
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __DRAWOBJ_H__
00014 #define __DRAWOBJ_H__
00015
00016 class CDrawView;
00017 class CDrawDoc;
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDrawObj - base class for all 'drawable objects'
00021
00022 class CDrawObj : public CObject
00023 {
00024 protected:
00025   DECLARE_SERIAL(CDrawObj);
00026   CDrawObj();
00027
00028 // Constructors
00029 public:
00030   CDrawObj(const CRect& position);
00031
00032 // Attributes
00033   CRect m_position;
00034   CDrawDoc* m_pDocument;
00035
00036   virtual int GetHandleCount();
00037   virtual CPoint GetHandle(int nHandle);
00038   CRect GetHandleRect(int nHandleID, CDrawView* pView);
00039   virtual HCURSOR GetHandleCursor(int nHandle);
00040   virtual void SetLineColor(COLORREF color);
00041   virtual void SetFillColor(COLORREF color);
00042
00043 // Operations
00044   virtual void Draw(CDC* pDC);
00045   enum TrackerState { normal, selected, active };
00046   virtual void DrawTracker(CDC* pDC, TrackerState state);
00047   virtual void MoveTo(const CRect& positon, CDrawView* pView = NULL);
00048   virtual int HitTest(CPoint point, CDrawView* pView, BOOL bSelected);
00049   virtual BOOL Intersects(const CRect& rect);
00050   virtual void MoveHandleTo(int nHandle, CPoint point, CDrawView* pView = NULL);
00051   virtual void OnOpen(CDrawView* pView);
00052   virtual void OnEditProperties();
00053   virtual CDrawObj* Clone(CDrawDoc* pDoc = NULL);
00054   virtual void Remove();
00055   void Invalidate();
00056
00057 // Implementation
00058 public:
00059   virtual ~CDrawObj();
00060   virtual void Serialize(CArchive& ar);
00061 #ifdef _DEBUG
00062   void AssertValid();
00063 #endif
00064
00065   // implementation data
00066 protected:
00067   BOOL m_bPen;
00068   LOGPEN m_logpen;
00069   BOOL m_bBrush;
00070   LOGBRUSH m_logbrush;
00071 };
00072
00073 // special 'list' class for this application (requires afxtempl.h)
00074 typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList;
00075
00076 ////////////////////////////////////////////////////////////////////////
00077 // specialized draw objects
00078
00079 class CDrawRect : public CDrawObj
00080 {
00081 protected:
00082   DECLARE_SERIAL(CDrawRect);
00083   CDrawRect();
00084
00085 public:
00086   CDrawRect(const CRect& position);
00087
00088 // Implementation
00089 public:
00090   virtual void Serialize(CArchive& ar);
00091   virtual void Draw(CDC* pDC);
00092   virtual int GetHandleCount();
00093   virtual CPoint GetHandle(int nHandle);
00094   virtual HCURSOR GetHandleCursor(int nHandle);
00095   virtual void MoveHandleTo(int nHandle, CPoint point, CDrawView* pView = NULL);
00096   virtual BOOL Intersects(const CRect& rect);
00097   virtual CDrawObj* Clone(CDrawDoc* pDoc);
00098
00099 protected:
00100   enum Shape { rectangle, roundRectangle, ellipse, line };
00101   Shape m_nShape;
00102   CPoint m_roundness; // for roundRect corners
00103
00104   friend class CRectTool;
00105 };
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108
00109 class CDrawPoly;
00110
00111 class CDrawPoly : public CDrawObj
00112 {
00113 protected:
00114   DECLARE_SERIAL(CDrawPoly);
00115   CDrawPoly();
00116
00117 public:
00118   CDrawPoly(const CRect& position);
00119
00120 // Operations
00121   void AddPoint(const CPoint& point, CDrawView* pView = NULL);
00122   BOOL RecalcBounds(CDrawView* pView = NULL);
00123
00124 // Implementation
00125 public:
00126   virtual ~CDrawPoly();
00127   virtual void Serialize(CArchive& ar);
00128   virtual void Draw(CDC* pDC);
00129   virtual void MoveTo(const CRect& position, CDrawView* pView = NULL);
00130   virtual int GetHandleCount();
00131   virtual CPoint GetHandle(int nHandle);
00132   virtual HCURSOR GetHandleCursor(int nHandle);
00133   virtual void MoveHandleTo(int nHandle, CPoint point, CDrawView* pView = NULL);
00134   virtual BOOL Intersects(const CRect& rect);
00135   virtual CDrawObj* Clone(CDrawDoc* pDoc);
00136
00137 protected:
00138   int m_nPoints;
00139   int m_nAllocPoints;
00140   CPoint* m_points;
00141   CDrawPoly* m_pDrawObj;
00142
00143   friend class CPolyTool;
00144 };
00145
00146 class CDrawItem;    // COleClientItem derived class
00147
00148 class CDrawOleObj : public CDrawObj
00149 {
00150 protected:
00151   DECLARE_SERIAL(CDrawOleObj);
00152   CDrawOleObj();
00153
00154 public:
00155   CDrawOleObj(const CRect& position);
00156
00157 // Implementation
00158 public:
00159   virtual void Serialize(CArchive& ar);
00160   virtual void Draw(CDC* pDC);
00161   virtual CDrawObj* Clone(CDrawDoc* pDoc);
00162   virtual void OnOpen(CDrawView* pView);
00163   virtual void MoveTo(const CRect& positon, CDrawView* pView = NULL);
00164   virtual void OnEditProperties();
00165   virtual void Remove();
00166   virtual ~CDrawOleObj();
00167
00168   static BOOL c_bShowItems;
00169
00170   CDrawItem* m_pClientItem;
00171   CSize m_extent; // current extent is tracked separate from scaled position
00172 };
00173
00174 #endif // __DRAWOBJ_H__
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSOffice2007DemoView Member List

This is the complete list of members for CMSOffice2007DemoView, including all inherited members.
CMSOffice2007DemoView() | CMSOffice2007DemoView | [protected]
GetDefaultFont(CCharFormat &cf) | CMSOffice2007DemoView | [protected]
GetDocument() | CMSOffice2007DemoView | [inline]
InitFloaty(CMFCRibbonMiniToolBar *pFloaty) | CMSOffice2007DemoView | [protected]
InsertBitmap(UINT uiBmpResID) | CMSOffice2007DemoView | [protected]
m_bForceReloadBmps | CMSOffice2007DemoView | [static]
m_bIsEndOfPrint | CMSOffice2007DemoView | [protected]
m_bViewDocMap | CMSOffice2007DemoView | [protected]
m_bViewGridLines | CMSOffice2007DemoView | [protected]
m_bViewProps | CMSOffice2007DemoView | [protected]
m_bViewRuler | CMSOffice2007DemoView | [protected]
m_bViewThumb | CMSOffice2007DemoView | [protected]
m_ptMouseDown | CMSOffice2007DemoView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CMSOffice2007DemoView | [protected, virtual]
OnCharStrikeThrough() | CMSOffice2007DemoView | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CMSOffice2007DemoView | [protected]
OnDestroy() | CMSOffice2007DemoView | [protected]
OnEditChange() | CMSOffice2007DemoView | [protected]
OnEditUndo() | CMSOffice2007DemoView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CMSOffice2007DemoView | [protected, virtual]
OnFilePrintPreview() | CMSOffice2007DemoView | [protected]
OnFontColor() | CMSOffice2007DemoView | [protected]
OnFontDialog() | CMSOffice2007DemoView | [protected]
OnFontname() | CMSOffice2007DemoView | [protected]
OnFontsize() | CMSOffice2007DemoView | [protected]
OnIndentLeft() | CMSOffice2007DemoView | [protected]
OnIndentRight() | CMSOffice2007DemoView | [protected]
OnInitialUpdate() | CMSOffice2007DemoView | [protected, virtual]
OnInsertBulletFromPalette() | CMSOffice2007DemoView | [protected]
OnInsertChart() | CMSOffice2007DemoView | [protected]
OnInsertMultilevelFromPalette() | CMSOffice2007DemoView | [protected]
OnInsertNumberFromPalette() | CMSOffice2007DemoView | [protected]
OnInsertPicture() | CMSOffice2007DemoView | [protected]
OnInsertShape() | CMSOffice2007DemoView | [protected]
OnInsertTable() | CMSOffice2007DemoView | [protected]
OnInsertTableGallery() | CMSOffice2007DemoView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CMSOffice2007DemoView | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CMSOffice2007DemoView | [protected]
OnPagelayoutIndentLeft() | CMSOffice2007DemoView | [protected]
OnPagelayoutIndentRight() | CMSOffice2007DemoView | [protected]
OnPageLayoutTheme() | CMSOffice2007DemoView | [protected]
OnPagesetupDialog() | CMSOffice2007DemoView | [protected]
OnParagraphDialog() | CMSOffice2007DemoView | [protected]
OnPrepareDC(CDC *pDC, CPrintInfo *pInfo) | CMSOffice2007DemoView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CMSOffice2007DemoView | [protected, virtual]
OnQuickStyle() | CMSOffice2007DemoView | [protected]
OnRButtonUp(UINT nFlags, CPoint point) | CMSOffice2007DemoView | [protected]
OnSelChange(NMHDR *pNMHDR, LRESULT *pResult) | CMSOffice2007DemoView | [protected]
OnSpaceAfter() | CMSOffice2007DemoView | [protected]
OnSpaceBefore() | CMSOffice2007DemoView | [protected]
OnStyleDialog() | CMSOffice2007DemoView | [protected]
OnUpdateCharStrikeThrough(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdateEditFind(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdateEditReplace(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdatePrintLayout(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdateViewDocMap(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdateViewGridLines(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdateViewProps(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdateViewRuler(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnUpdateViewThumb(CCmdUI *pCmdUI) | CMSOffice2007DemoView | [protected]
OnViewDocMap() | CMSOffice2007DemoView | [protected]
OnViewGridLines() | CMSOffice2007DemoView | [protected]
OnViewProps() | CMSOffice2007DemoView | [protected]
OnViewRuler() | CMSOffice2007DemoView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CMSOffice2007DemoView | [virtual]
ShowContextMenu(CPoint pt) | CMSOffice2007DemoView | [protected]
SyncFont() | CMSOffice2007DemoView | [protected, virtual]
~CMSOffice2007DemoView() | CMSOffice2007DemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CChildView Member List

This is the complete list of members for CChildView, including all inherited members.
CChildView() | CChildView |
CChildView() | CChildView |
CChildView() | CChildView |
CreateSurface() | CChildView | [private]
e16BitGeneric enum value | CChildView | [private]
e16BitMMXIntrin enum value | CChildView | [private]
e16BitSSE2Intrin enum value | CChildView | [private]
e24BitGeneric enum value | CChildView | [private]
e24BitMMXIntrin enum value | CChildView | [private]
e24BitSSE2Intrin enum value | CChildView | [private]
e32BitGeneric enum value | CChildView | [private]
e32BitMMXIntrin enum value | CChildView | [private]
e32BitSSE2Intrin enum value | CChildView | [private]
eNone enum value | CChildView | [private]
ESurface enum name | CChildView | [private]
GetSurface() const | CChildView | [inline]
imgOriginal | CChildView | [private]
m_bPauseBlit | CChildView | [private]
m_bPauseBlur | CChildView | [private]
m_bPauseSwarm | CChildView | [private]
m_bSizeChanged | CChildView | [private]
m_bTimerPopped | CChildView | [private]
m_dwTickStart | CChildView | [private]
m_eSurf | CChildView | [private]
m_image | CChildView | [private]
m_kTimerDelay | CChildView | [private, static]
m_kTimerID | CChildView | [private, static]
m_nFilterLoad | CChildView | [private]
m_nFilterSave | CChildView | [private]
m_nFrameCounter | CChildView | [private]
m_nImageSize | CChildView | [private]
m_pSurface | CChildView | [private]
m_swarm | CChildView | [private]
OnChangeSize(UINT nID) | CChildView |
OnDestroy(void) | CChildView |
OnEraseBkgnd(CDC *pDC) | CChildView |
OnEraseBkgnd(CDC *pDC) | CChildView | [protected]
OnFileOpen() | CChildView | [protected]
OnFileOpenimage(void) | CChildView |
OnFileSave() | CChildView | [protected]
OnFileSaveImage(void) | CChildView |
OnIdle(LONG lCount) | CChildView |
OnImageFormats(UINT nID) | CChildView | [protected]
OnImageInfo(void) | CChildView |
OnPaint() | CChildView | [protected]
OnPaint() | CChildView | [protected]
OnPaint() | CChildView | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CChildView | [protected]
OnSize(UINT nType, int cx, int cy) | CChildView | [protected]
OnTimer(UINT_PTR nIDEvent) | CChildView | [protected]
OnToolsMakeBW(void) | CChildView |
OnUpdateFPS(CCmdUI *pCmdUI) | CChildView | [protected]
OnUpdateImage(CCmdUI *pCmdUI) | CChildView |
OnUpdateImageFormats(CCmdUI *pCmdUI) | CChildView | [protected]
OnUpdatePauseBlit(CCmdUI *pCmdUI) | CChildView | [protected]
OnUpdatePauseBlur(CCmdUI *pCmdUI) | CChildView | [protected]
OnUpdatePauseSwarm(CCmdUI *pCmdUI) | CChildView | [protected]
OnUpdateResolution(CCmdUI *pCmdUI) | CChildView | [protected]
OnUpdateSizeDouble(CCmdUI *pCmdUI) | CChildView |
OnUpdateSizeFill(CCmdUI *pCmdUI) | CChildView |
OnUpdateSizeHalf(CCmdUI *pCmdUI) | CChildView |
OnUpdateSizeOriginal(CCmdUI *pCmdUI) | CChildView |
OnViewPauseBlit() | CChildView | [protected]
OnViewPauseBlur() | CChildView | [protected]
OnViewPauseSwarm() | CChildView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CChildView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CChildView | [protected, virtual]
SetImage(const CString &strPath) | CChildView |
~CChildView() | CChildView | [virtual]
~CChildView() | CChildView | [virtual]
~CChildView() | CChildView | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CScribbleItem Member List

This is the complete list of members for CScribbleItem, including all inherited members.
CScribbleItem(CScribbleDoc *pContainerDoc) | CScribbleItem |
GetDocument() const | CScribbleItem | [inline]
OnDraw(CDC *pDC, CSize &rSize) | CScribbleItem | [virtual]
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CScribbleItem | [virtual]
Serialize(CArchive &ar) | CScribbleItem | [protected, virtual]
~CScribbleItem() | CScribbleItem |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncVw.h Source File

  • general
  • mdidocvw

BncVw.h

Go to the documentation of this file.
00001 // BounceVw.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CBounceView view
00015
00016 class CBounceView : public CView
00017 {
00018 protected:
00019   CBounceView();           // protected constructor used by dynamic creation
00020   DECLARE_DYNCREATE(CBounceView)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027   void MakeNewBall();
00028   void ChangeSpeed();
00029   CBounceDoc* GetDocument();
00030   void MixColors();
00031
00032 // Overrides
00033   // ClassWizard generated virtual function overrides
00034   //{{AFX_VIRTUAL(CBounceView)
00035   public:
00036   virtual void OnInitialUpdate();
00037   protected:
00038   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00039   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 protected:
00044   virtual ~CBounceView();
00045 #ifdef _DEBUG
00046   virtual void AssertValid() const;
00047   virtual void Dump(CDumpContext& dc) const;
00048 #endif
00049
00050   // Generated message map functions
00051 protected:
00052   //{{AFX_MSG(CBounceView)
00053   afx_msg void OnCustomColor();
00054   afx_msg void OnFast();
00055   afx_msg void OnSlow();
00056   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00057   afx_msg void OnSize(UINT nType, int cx, int cy);
00058   afx_msg void OnTimer(UINT_PTR nIDEvent);
00059   afx_msg void OnUpdateFast(CCmdUI* pCmdUI);
00060   afx_msg void OnUpdateSlow(CCmdUI* pCmdUI);
00061   afx_msg void OnUpdateCustom(CCmdUI* pCmdUI);
00062   afx_msg void OnUpdateBlack(CCmdUI* pCmdUI);
00063   afx_msg void OnUpdateBlue(CCmdUI* pCmdUI);
00064   afx_msg void OnUpdateGreen(CCmdUI* pCmdUI);
00065   afx_msg void OnUpdateRed(CCmdUI* pCmdUI);
00066   afx_msg void OnUpdateWhite(CCmdUI* pCmdUI);
00067   afx_msg void OnColor();
00068   //}}AFX_MSG
00069   DECLARE_MESSAGE_MAP()
00070 };
00071
00072 #ifndef _DEBUG  // debug version in HelloVw.cpp
00073 inline CBounceDoc* CBounceView::GetDocument()
00074    { return (CBounceDoc*)m_pDocument; }
00075 #endif
00076
00077 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliLiveIconsHandler.h Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawCliLiveIconsHandler.h

Go to the documentation of this file.
00001 // DrawCliLiveIconsHandler.h : Declaration of the CDrawCliLiveIconsHandler
00002
00003 #pragma once
00004 #include "resource.h"       // main symbols
00005
00006 #include <atlhandler.h>
00007 #include <atlhandlerimpl.h>
00008 #include "..\drawdoc.h"
00009
00010 #include "DrawClientHandlers_i.h"
00011
00012
00013 #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
00014 #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
00015 #endif
00016
00017
00018
00019 // CDrawCliLiveIconsHandler
00020
00021 class ATL_NO_VTABLE CDrawCliLiveIconsHandler :
00022   public CComObjectRootEx<CComSingleThreadModel>,
00023   public CComCoClass<CDrawCliLiveIconsHandler, &CLSID_DrawCliLiveIconsHandler>,
00024   public CThumbnailProviderImpl
00025 {
00026 public:
00027   CDrawCliLiveIconsHandler()
00028   {
00029   }
00030
00031 DECLARE_REGISTRY_RESOURCEID(IDR_DRAWCLILIVEICONSHANDLER)
00032
00033 DECLARE_NOT_AGGREGATABLE(CDrawCliLiveIconsHandler)
00034
00035 BEGIN_COM_MAP(CDrawCliLiveIconsHandler)
00036   COM_INTERFACE_ENTRY(IInitializeWithStream)
00037   COM_INTERFACE_ENTRY(IThumbnailProvider)
00038 END_COM_MAP()
00039
00040
00041
00042   DECLARE_PROTECT_FINAL_CONSTRUCT()
00043
00044   HRESULT FinalConstruct()
00045   {
00046     return S_OK;
00047   }
00048
00049   void FinalRelease()
00050   {
00051     CThumbnailProviderImpl::FinalRelease ();
00052   }
00053
00054 public:
00055
00056 protected:
00057   virtual HRESULT GetBitmap(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE *pdwAlpha)
00058   {
00059     CDrawDoc* pDocument = DYNAMIC_DOWNCAST (CDrawDoc, (CObject*) m_pDocument->GetContainer ());
00060
00061     HDC hdc = ::GetDC(NULL);
00062     CDC* pDC = CDC::FromHandle(hdc);
00063     CDC dc;
00064     CDC* pDrawDC = pDC;
00065     CBitmap* pOldBitmap = NULL;
00066     CBitmap bitmap;
00067
00068     pDocument->FixUpObjectPositions();
00069     CRect rectDocBounds = pDocument->m_rectDocumentBounds;
00070
00071     if (dc.CreateCompatibleDC(pDC))
00072     {
00073       if (bitmap.CreateCompatibleBitmap(pDC, rectDocBounds.Width(), rectDocBounds.Height()))
00074       {
00075         pDrawDC = &dc;
00076         pOldBitmap = dc.SelectObject(&bitmap);
00077       }
00078     }
00079     else
00080     {
00081       ::ReleaseDC(NULL, hdc);
00082       return E_FAIL;
00083     }
00084
00085     dc.SelectObject(&bitmap);
00086     pDocument->Draw(pDrawDC);
00087
00088     if (pDrawDC != pDC)
00089     {
00090       dc.SelectObject(pOldBitmap);
00091     }
00092
00093     ::ReleaseDC (NULL, hdc);
00094     *phbmp = (HBITMAP)bitmap.Detach ();
00095
00096     return S_OK;
00097   }
00098   DECLARE_DOCUMENT(CDrawDoc)
00099 };
00100
00101 OBJECT_ENTRY_AUTO(__uuidof(DrawCliLiveIconsHandler), CDrawCliLiveIconsHandler)
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/WorkspaceBar.h Source File

  • vc2008fp
  • MDITabsDemo

WorkspaceBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CWorkspaceBar : public CDockablePane
00014 {
00015 public:
00016   CWorkspaceBar();
00017
00018 // Attributes
00019 protected:
00020   CMFCPropertyGridCtrl  m_wndPropList;
00021
00022   enum
00023   {
00024     idShowMDITabs,
00025     idTabsOnTop,
00026     idActiveTabCloseButton,
00027     idTabsStyle,
00028     idTabsAutoColor,
00029     idMDITabsIcons,
00030     idMDITabsDocMenu,
00031     idDragMDITabs,
00032     idMDITabsContextMenu,
00033     idMDITabsBorderSize,
00034     idDisableMDIChildRedraw,
00035     idFlatFrame,
00036     idCustomTooltips
00037   };
00038
00039 // Operations
00040 public:
00041   void SetPropState ();
00042
00043 // Overrides
00044
00045 // Implementation
00046 public:
00047   virtual ~CWorkspaceBar();
00048
00049 protected:
00050   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00051   afx_msg void OnSize(UINT nType, int cx, int cy);
00052   afx_msg void OnPaint();
00053   afx_msg LRESULT OnPropertyChanged (WPARAM,LPARAM);
00054
00055   DECLARE_MESSAGE_MAP()
00056 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackapp.cpp Source File

  • general
  • tracker

trackapp.cpp

Go to the documentation of this file.
00001 // tracker.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "trackapp.h"
00015
00016 #include "mainfrm.h"
00017 #include "trackdoc.h"
00018 #include "trackvw.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CTrackerApp
00027
00028 BEGIN_MESSAGE_MAP(CTrackerApp, CWinApp)
00029   //{{AFX_MSG_MAP(CTrackerApp)
00030   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code !
00033   //}}AFX_MSG_MAP
00034   // Standard file based document commands
00035   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00036   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00037   // Standard print setup command
00038   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CTrackerApp construction
00043
00044 CTrackerApp::CTrackerApp()
00045 {
00046   // TODO: add construction code here,
00047   // Place all significant initialization in InitInstance
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only CTrackerApp object
00052
00053 CTrackerApp NEAR theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CTrackerApp initialization
00057
00058 BOOL CTrackerApp::InitInstance()
00059 {
00060   // Standard initialization
00061   // If you are not using these features and wish to reduce the size
00062   //  of your final executable, you should remove from the following
00063   //  the specific initialization routines you do not need.
00064
00065   LoadStdProfileSettings();  // Load standard INI options (including MRU)
00066
00067   // Register the application's document templates.  Document templates
00068   //  serve as the connection between documents, frame windows and views.
00069
00070   AddDocTemplate(new CMultiDocTemplate(IDR_TRACKETYPE,
00071       RUNTIME_CLASS(CTrackerDoc),
00072       RUNTIME_CLASS(CMDIChildWnd),        // standard MDI child frame
00073       RUNTIME_CLASS(CTrackerView)));
00074
00075   // create main MDI Frame window
00076   CMainFrame* pMainFrame = new CMainFrame;
00077   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00078   {
00079     delete pMainFrame;
00080     return FALSE;
00081   }
00082   pMainFrame->ShowWindow(m_nCmdShow);
00083   pMainFrame->UpdateWindow();
00084   m_pMainWnd = pMainFrame;
00085
00086   // create a new (empty) document
00087   OnFileNew();
00088
00089   if (m_lpCmdLine[0] != '\0')
00090   {
00091     // TODO: add command line processing here
00092   }
00093
00094   return TRUE;
00095 }
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CAboutDlg dialog used for App About
00099
00100 class CAboutDlg : public CDialog
00101 {
00102 public:
00103   CAboutDlg();
00104
00105 // Dialog Data
00106   //{{AFX_DATA(CAboutDlg)
00107   enum { IDD = IDD_ABOUTBOX };
00108   //}}AFX_DATA
00109
00110 // Implementation
00111 protected:
00112   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00113   //{{AFX_MSG(CAboutDlg)
00114     // No message handlers
00115   //}}AFX_MSG
00116   DECLARE_MESSAGE_MAP()
00117 };
00118
00119 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00120 {
00121   //{{AFX_DATA_INIT(CAboutDlg)
00122   //}}AFX_DATA_INIT
00123 }
00124
00125 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00126 {
00127   CDialog::DoDataExchange(pDX);
00128   //{{AFX_DATA_MAP(CAboutDlg)
00129   //}}AFX_DATA_MAP
00130 }
00131
00132 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00133   //{{AFX_MSG_MAP(CAboutDlg)
00134     // No message handlers
00135   //}}AFX_MSG_MAP
00136 END_MESSAGE_MAP()
00137
00138 // App command to run the dialog
00139 void CTrackerApp::OnAppAbout()
00140 {
00141   CAboutDlg aboutDlg;
00142   aboutDlg.DoModal();
00143 }
00144
00145 /////////////////////////////////////////////////////////////////////////////
00146 // CTrackerApp commands
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCalcApp Member List

This is the complete list of members for CCalcApp, including all inherited members.
CCalcApp() | CCalcApp |
InitInstance() | CCalcApp | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CGuidGenDlg Member List

This is the complete list of members for CGuidGenDlg, including all inherited members.
CGuidGenDlg(CWnd *pParent=NULL) | CGuidGenDlg |
DoDataExchange(CDataExchange *pDX) | CGuidGenDlg | [protected, virtual]
GetFormattedGuid(CString &rString) | CGuidGenDlg | [protected]
IDD enum value | CGuidGenDlg |
m_guid | CGuidGenDlg | [protected]
m_hIcon | CGuidGenDlg | [protected]
m_nGuidType | CGuidGenDlg |
OnChangedSel(UINT nID) | CGuidGenDlg | [protected]
OnInitDialog() | CGuidGenDlg | [protected, virtual]
OnNewguid() | CGuidGenDlg | [protected]
OnOK() | CGuidGenDlg | [protected, virtual]
OnPaint() | CGuidGenDlg | [protected]
OnQueryDragIcon() | CGuidGenDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CGuidGenDlg | [protected]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/typelib.cpp Source File

  • ole
  • oleview
  • iviewers

typelib.cpp

Go to the documentation of this file.
00001 // typelib.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "iviewers.h"
00015 #include "typelib.h"
00016 #include "iview.h"
00017 #include "iviewer.h"
00018 #include "util.h"
00019 #include "tlbtree.h"
00020 #include "tlblist.h"
00021 #include "tlbodl.h"
00022 #include "util.h"
00023
00024 #ifdef _DEBUG
00025 #undef THIS_FILE
00026 static char BASED_CODE THIS_FILE[] = __FILE__;
00027 #endif
00028
00029 #define LOAD_STRING_FROM_RESOURCE(s, r) \
00030 if(s.LoadString(r) == FALSE) { AfxThrowResourceException(); }
00031
00032
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CTypeLibViewer
00036
00037 IMPLEMENT_DYNCREATE(CTypeLibViewer, CInterfaceViewer)
00038
00039 CTypeLibViewer::CTypeLibViewer()
00040 {
00041 }
00042
00043 CTypeLibViewer::~CTypeLibViewer()
00044 {
00045 }
00046
00047 BEGIN_MESSAGE_MAP(CTypeLibViewer, CInterfaceViewer)
00048   //{{AFX_MSG_MAP(CTypeLibViewer)
00049     // NOTE - the ClassWizard will add and remove mapping macros here.
00050   //}}AFX_MSG_MAP
00051 END_MESSAGE_MAP()
00052
00053 IMPLEMENT_OLECREATE(CTypeLibViewer, "Ole2View.ITypeLib.1", 0x57efbf49, 0x4a8b, 0x11ce, 0x87, 0xb, 0x8, 0x0, 0x36, 0x8d, 0x23, 0x2)
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CTypeLibViewer View imp.
00057 HRESULT CTypeLibViewer::OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk)
00058 {
00059   SCODE sc = NOERROR ;
00060
00061   ASSERT(punk);
00062
00063   if (riid != IID_ITypeLib)
00064   {
00065     AfxMessageBox( _T("ITypeLib interface viewer only supports IID_ITypeLib") ) ;
00066     return E_INVALIDARG ;
00067   }
00068
00069   CTypeLibWnd wnd(CWnd::FromHandle(hwndParent)) ;
00070   if (punk)
00071   {
00072     sc = punk->QueryInterface( riid, (void**)&wnd.m_ptlb ) ;
00073     if (FAILED(sc))
00074     {
00075       AfxMessageBox( _T("Object does not support ITypeLib") ) ;
00076       return E_UNEXPECTED ;
00077     }
00078   }
00079
00080   if (wnd.LoadFrame(IDR_TYPELIBWND, WS_OVERLAPPEDWINDOW, CWnd::FromHandle(hwndParent), NULL ) == FALSE)
00081   {
00082     TRACE(_T("LoadFrame failed\n") );
00083     return E_UNEXPECTED ;
00084   }
00085   ASSERT(wnd.m_hWnd);
00086   if (hwndParent)
00087     ::EnableWindow( hwndParent, FALSE ) ;
00088
00089   wnd.InitialUpdateFrame( NULL, FALSE ) ;
00090   wnd.RestorePosition() ;
00091   wnd.UpdateWindow() ;
00092
00093   // Go into a wait/peekmessage loop
00094   MSG msg ;
00095   for (;;)
00096   {
00097     while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
00098     {
00099       // We post a WM_CLOSE to force us out of the loop
00100       if (msg.hwnd == wnd.m_hWnd && msg.message == WM_CLOSE)
00101         goto done ;
00102       TranslateMessage(&msg) ;
00103       DispatchMessage(&msg) ;
00104     }
00105     WaitMessage() ;
00106   }
00107 done:
00108   TRACE(_T("Exit from waitmessage loop\n") ) ;
00109
00110   if (hwndParent)
00111     ::EnableWindow( hwndParent, TRUE ) ;
00112   wnd.DestroyWindow() ;
00113
00114   return sc ;
00115 }
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CTypeLibWnd dialog
00119
00120 IMPLEMENT_DYNCREATE(CTypeLibWnd, CFrameWnd)
00121 BEGIN_MESSAGE_MAP(CTypeLibWnd, CFrameWnd)
00122   //{{AFX_MSG_MAP(CTypeLibWnd)
00123   ON_WM_CREATE()
00124   ON_WM_DESTROY()
00125   ON_WM_SIZE()
00126   ON_WM_CLOSE()
00127   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00128   ON_COMMAND(ID_FILE_CLOSE, OnFileClose)
00129   ON_COMMAND(ID_VIEW_GROUPBYTYPEKIND, OnViewGroupKind)
00130   ON_UPDATE_COMMAND_UI(ID_VIEW_GROUPBYTYPEKIND, OnUpdateViewGroupByKind)
00131   //}}AFX_MSG_MAP
00132 END_MESSAGE_MAP()
00133
00134 CTypeLibWnd::CTypeLibWnd(CWnd* /*pParent =NULL*/)
00135 {
00136   m_pSelectedItem = NULL ;
00137   m_ptlb = NULL ;
00138
00139   CString szSection ;
00140   CString szKey ;
00141
00142   LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
00143   LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_GROUPBYKIND ) ;
00144   m_fGroupByKind = AfxGetApp()->GetProfileInt(szSection, szKey, FALSE ) ;
00145
00146 }
00147
00148 CTypeLibWnd::~CTypeLibWnd()
00149 {
00150   if (m_ptlb)
00151     m_ptlb->Release() ;
00152   m_ptlb = NULL ;
00153
00154   CString szSection ;
00155   CString szKey ;
00156   LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
00157   LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_GROUPBYKIND ) ;
00158   AfxGetApp()->WriteProfileInt(szSection, szKey, m_fGroupByKind ) ;
00159
00160 }
00161
00162 void CTypeLibViewer::OnFinalRelease()
00163 {
00164
00165
00166   CInterfaceViewer::OnFinalRelease();
00167 }
00168
00169 /////////////////////////////////////////////////////////////////////////////
00170 // CTypeLibWnd message handlers
00171
00172 // toolbar buttons - IDs are command buttons
00173 static UINT BASED_CODE buttons[] =
00174 {
00175   // same order as in the bitmap 'toolbar.bmp'
00176   ID_VIEW_GROUPBYTYPEKIND,
00177   ID_SEPARATOR,
00178   ID_APP_ABOUT
00179 };
00180
00181 static UINT BASED_CODE indicators[] =
00182 {
00183     ID_SEPARATOR,             // status line indicator
00184 };
00185
00186 int CTypeLibWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
00187 {
00188   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00189     return -1;
00190
00191   if (!m_wndToolBar.Create(this) ||
00192     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00193     !m_wndToolBar.SetButtons(buttons, sizeof(buttons)/sizeof(UINT)))
00194   {
00195     TRACE(_T("Failed to create toolbar\n"));
00196     return -1;      // fail to create
00197   }
00198
00199   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00200     CBRS_TOOLTIPS | CBRS_FLYBY);
00201
00202   if (!m_wndStatusBar.Create(this) ||
00203     !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)) )
00204   {
00205     TRACE(_T("Failed to create status bar\n"));
00206     return -1;      // fail to create
00207   }
00208
00209   m_wndStatusBar.ShowWindow(SW_SHOWNORMAL) ;
00210   m_wndToolBar.ShowWindow(SW_SHOWNORMAL) ;
00211
00212   return 0;
00213 }
00214
00215 BOOL CTypeLibWnd::OnCreateClient( LPCREATESTRUCT /*lpcs*/, CCreateContext* pcc )
00216 {
00217
00218   CCreateContext context ;
00219   context.m_pNewViewClass = NULL ;
00220   context.m_pCurrentDoc = NULL ;
00221   context.m_pNewDocTemplate = NULL ;
00222   context.m_pLastView = NULL ;
00223   context.m_pCurrentFrame = NULL ;
00224
00225   // create a splitter with 1 row, 2 columns
00226   if (!m_wndSplitter.CreateStatic(this, 1, 2))
00227   {
00228     TRACE(_T("Failed to CreateStaticSplitter\n"));
00229     return FALSE;
00230   }
00231
00232   // add the first splitter pane - the default view in column 0
00233   if (!m_wndSplitter.CreateView(0, 0,
00234     RUNTIME_CLASS(CTypeLibTreeView), CSize(240, 0), &context))
00235   {
00236     TRACE(_T("Failed to create first pane\n"));
00237     return FALSE;
00238   }
00239 #ifdef _LIST_VIEW
00240   if (!m_wndSplitter.CreateView(0, 1,
00241     RUNTIME_CLASS(CTypeLibListView), CSize(0, 0), &context))
00242   {
00243     TRACE(_T("Failed to create second pane\n"));
00244     return FALSE;
00245   }
00246 #else
00247   if (!m_wndSplitter.CreateView(0, 1,
00248     RUNTIME_CLASS(CTypeLibODLView), CSize(0, 0), &context))
00249   {
00250     TRACE(_T("Failed to create second pane\n"));
00251     return FALSE;
00252   }
00253 #endif
00254
00255   m_pTreeView = (CTypeLibTreeView*)m_wndSplitter.GetPane(0, 0) ;
00256 #ifdef _LIST_VIEW
00257   m_pListView = (CTypeLibListView*)m_wndSplitter.GetPane(0,1) ;
00258 #else
00259   m_pODLView = (CTypeLibODLView*)m_wndSplitter.GetPane(0,1) ;
00260 #endif
00261
00262   SetActiveView(m_pTreeView);
00263   m_wndSplitter.SetColumnInfo( 0, 240, 0 ) ;
00264
00265   CRect rc ;
00266   GetWindowRect( &rc) ;
00267   SetWindowPos( NULL, 0, 0, rc.Width()+1, rc.Height()+1, SWP_NOZORDER |
00268           SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOREDRAW) ;
00269
00270   return TRUE ;
00271 }
00272
00273 void CTypeLibWnd::OnDestroy()
00274 {
00275   CString szSection ;
00276   CString szKey ;
00277
00278   LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
00279   LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_WNDPOS ) ;
00280
00281   WINDOWPLACEMENT wp;
00282   CString szValue ;
00283   wp.length = sizeof( WINDOWPLACEMENT );
00284   GetWindowPlacement( &wp );
00285   int nWidth, n ;
00286   m_wndSplitter.GetColumnInfo( 0, nWidth, n ) ;
00287   szValue.Format( _T("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d"),
00288     wp.showCmd, wp.ptMinPosition.x, wp.ptMinPosition.y,
00289     wp.ptMaxPosition.x, wp.ptMaxPosition.y,
00290     wp.rcNormalPosition.left, wp.rcNormalPosition.top,
00291     wp.rcNormalPosition.right, wp.rcNormalPosition.bottom,
00292     nWidth,
00293     (m_wndToolBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE,
00294     (m_wndStatusBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE ) ;
00295   AfxGetApp()->WriteProfileString( szSection, szKey, szValue );
00296
00297   CFrameWnd::OnDestroy();
00298 }
00299
00300 void CTypeLibWnd::RestorePosition()
00301 {
00302   CString sz ;
00303   CString szSection ;
00304   CString szKey ;
00305   BOOL fToolBar = TRUE ;
00306   BOOL fStatusBar = TRUE ;
00307
00308   LOAD_STRING_FROM_RESOURCE( szSection, IDS_REG_TYPELIB ) ;
00309   LOAD_STRING_FROM_RESOURCE( szKey, IDS_REG_WNDPOS ) ;
00310
00311   WINDOWPLACEMENT wp;
00312   memset(&wp, 0, sizeof(wp) ) ;
00313   int     nConv;
00314   wp.length = sizeof( WINDOWPLACEMENT );
00315   wp.flags = 0 ;
00316
00317   TRY
00318   {
00319     sz = AfxGetApp()->GetProfileString(szSection, szKey, _T("") ) ;
00320     if (sz.IsEmpty())
00321       AfxThrowMemoryException();
00322
00323     LPTSTR   lp = (LPTSTR)sz.GetBuffer( 255 );
00324     wp.showCmd = (WORD)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00325     if (!nConv)
00326       AfxThrowMemoryException();
00327
00328     wp.ptMinPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00329     if (!nConv)
00330       AfxThrowMemoryException();
00331
00332     wp.ptMinPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00333     if (!nConv)
00334       AfxThrowMemoryException();
00335
00336     wp.ptMaxPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00337     if (!nConv)
00338       AfxThrowMemoryException();
00339
00340     wp.ptMaxPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00341     if (!nConv)
00342       AfxThrowMemoryException();
00343
00344     wp.rcNormalPosition.left = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00345     if (!nConv)
00346       AfxThrowMemoryException();
00347
00348     wp.rcNormalPosition.top = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00349     if (!nConv)
00350       AfxThrowMemoryException();
00351
00352     wp.rcNormalPosition.right = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00353     if (!nConv)
00354       AfxThrowMemoryException();
00355
00356     wp.rcNormalPosition.bottom = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00357     if (!nConv)
00358       AfxThrowMemoryException();
00359
00360     int nWidth = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00361     if (!nConv)
00362       AfxThrowMemoryException();
00363
00364     m_wndSplitter.SetColumnInfo( 0, nWidth, 0 ) ;
00365
00366     fToolBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00367     if (!nConv)
00368       AfxThrowMemoryException();
00369
00370     fStatusBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00371     if (!nConv)
00372       AfxThrowMemoryException();
00373
00374     if (!nConv)
00375       AfxThrowMemoryException();
00376     // Always strip off minimize.
00377     //
00378     if (wp.showCmd == SW_SHOWMINIMIZED)
00379       wp.showCmd = SW_SHOWNORMAL ;
00380   }
00381   CATCH(CException, pException)
00382   {
00383     fToolBar = TRUE ;
00384     fStatusBar = TRUE ;
00385     ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
00386     ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
00387     ShowWindow( SW_SHOWNORMAL );
00388     m_pTreeView->SetFocus() ;
00389     return ;
00390   }
00391   END_CATCH
00392   ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
00393   ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
00394   SetWindowPlacement( &wp ) ;
00395   m_pTreeView->SetFocus() ;
00396 }
00397
00398
00399 void CTypeLibWnd::PostNcDestroy()
00400 {
00401   #if (defined(_USRDLL) || defined(_AFXDLL))
00402   // do nothing
00403   #else
00404   delete this ;
00405   #endif
00406 }
00407
00408 void CTypeLibWnd::OnSize(UINT nType, int cx, int cy)
00409 {
00410   CFrameWnd::OnSize(nType, cx, cy);
00411
00412 //    if (m_wndSplitter.GetSafeHwnd())
00413 //        m_wndSplitter.SetWindowPos( NULL, 0, 0, cx, cy, SWP_NOZORDER ) ;
00414 }
00415
00416
00417 void CTypeLibWnd::OnClose()
00418 {
00419   #if (defined(_USRDLL) || defined(_AFXDLL))
00420   // Post WM_CLOSE which will drop us out of our modal loop
00421   //
00422   PostMessage( WM_CLOSE ) ;
00423   #else
00424   PostQuitMessage(0) ;
00425   DestroyWindow() ;
00426   #endif
00427 }
00428
00429 BOOL CTypeLibWnd::PreCreateWindow(CREATESTRUCT& cs)
00430 {
00431   return CFrameWnd::PreCreateWindow(cs);
00432 }
00433
00434
00435 void CTypeLibWnd::OnAppAbout()
00436 {
00437   AfxMessageBox(_T("TypeLib viewer by Charlie Kindel") ) ;
00438
00439 }
00440
00441 void CTypeLibWnd::OnFileClose()
00442 {
00443   SendMessage( WM_CLOSE ) ;
00444 }
00445
00446 void CTypeLibWnd::OnViewGroupKind()
00447 {
00448   m_fGroupByKind = !m_fGroupByKind ;
00449   UpdateAllViews( NULL ) ;
00450 }
00451
00452 void CTypeLibWnd::OnUpdateViewGroupByKind(CCmdUI* pCmdUI)
00453 {
00454   pCmdUI->SetCheck( m_fGroupByKind ) ;
00455 }
00456
00457
00458 void CTypeLibWnd::UpdateAllViews( CView* pSender, LPARAM lHint, CObject* pHint )
00459 {
00460   if (m_pTreeView)
00461     m_pTreeView->OnUpdate( pSender, lHint, pHint ) ;
00462 #ifdef _LIST_VIEW
00463   if (m_pListView)
00464     m_pListView->OnUpdate( pSender, lHint, pHint  ) ;
00465 #else
00466   if (m_pODLView)
00467     m_pODLView->OnUpdate( pSender, lHint, pHint  ) ;
00468 #endif
00469 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/splitfra.h Source File

  • ole
  • oclient

splitfra.h

Go to the documentation of this file.
00001 // splitfra.h : main header file for the CSplitFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CSplitFrame frame with splitter
00015
00016 #ifndef __AFXEXT_H__
00017 #include <afxext.h>
00018 #endif
00019
00020 class CSplitFrame : public CMDIChildWnd
00021 {
00022   DECLARE_DYNCREATE(CSplitFrame)
00023 protected:
00024   CSplitFrame();          // protected constructor used by dynamic creation
00025
00026 // Attributes
00027 protected:
00028   CSplitterWnd    m_wndSplitter;
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Implementation
00035 public:
00036   virtual ~CSplitFrame();
00037   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00038
00039   // Generated message map functions
00040   //{{AFX_MSG(CSplitFrame)
00041     // NOTE - the ClassWizard will add and remove member functions here.
00042   //}}AFX_MSG
00043   DECLARE_MESSAGE_MAP()
00044 };
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3Dlg.cpp Source File

  • controls
  • cmnctrl

CmnCtrl3Dlg.cpp

Go to the documentation of this file.
00001 // CmnCtrl3Dlg.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005 #include "CmnCtrl3.h"
00006 #include "CmnCtrl3Dlg.h"
00007
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #endif
00011
00012
00013 // CCmnCtrl3Dlg dialog
00014
00015
00016
00017
00018 CCmnCtrl3Dlg::CCmnCtrl3Dlg(CWnd* pParent /*=NULL*/)
00019   : CDialog(CCmnCtrl3Dlg::IDD, pParent)
00020 {
00021   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00022 }
00023
00024 void CCmnCtrl3Dlg::DoDataExchange(CDataExchange* pDX)
00025 {
00026   CDialog::DoDataExchange(pDX);
00027 }
00028
00029 BEGIN_MESSAGE_MAP(CCmnCtrl3Dlg, CDialog)
00030   ON_WM_PAINT()
00031   ON_WM_QUERYDRAGICON()
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035
00036 // CCmnCtrl3Dlg message handlers
00037
00038 BOOL CCmnCtrl3Dlg::OnInitDialog()
00039 {
00040   CDialog::OnInitDialog();
00041
00042   // Set the icon for this dialog.  The framework does this automatically
00043   //  when the application's main window is not a dialog
00044   SetIcon(m_hIcon, TRUE);     // Set big icon
00045   SetIcon(m_hIcon, FALSE);    // Set small icon
00046
00047   // TODO: Add extra initialization here
00048
00049   return TRUE;  // return TRUE  unless you set the focus to a control
00050 }
00051
00052 // If you add a minimize button to your dialog, you will need the code below
00053 //  to draw the icon.  For MFC applications using the document/view model,
00054 //  this is automatically done for you by the framework.
00055
00056 void CCmnCtrl3Dlg::OnPaint()
00057 {
00058   if (IsIconic())
00059   {
00060     CPaintDC dc(this); // device context for painting
00061
00062     SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
00063
00064     // Center icon in client rectangle
00065     int cxIcon = GetSystemMetrics(SM_CXICON);
00066     int cyIcon = GetSystemMetrics(SM_CYICON);
00067     CRect rect;
00068     GetClientRect(&rect);
00069     int x = (rect.Width() - cxIcon + 1) / 2;
00070     int y = (rect.Height() - cyIcon + 1) / 2;
00071
00072     // Draw the icon
00073     dc.DrawIcon(x, y, m_hIcon);
00074   }
00075   else
00076   {
00077     CDialog::OnPaint();
00078   }
00079 }
00080
00081 // The system calls this function to obtain the cursor to display while the user drags
00082 //  the minimized window.
00083 HCURSOR CCmnCtrl3Dlg::OnQueryDragIcon()
00084 {
00085   return static_cast<HCURSOR>(m_hIcon);
00086 }
00087
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mdi.h Source File

  • advanced
  • mtmdi

mdi.h

Go to the documentation of this file.
00001 // mdi.h : main header file for the MDI application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CMdiApp:
00020 // See mdi.cpp for the implementation of this class
00021 //
00022
00023 class CMdiApp : public CWinApp
00024 {
00025 public:
00026   CMdiApp();
00027
00028 // Overrides
00029   virtual BOOL InitInstance();
00030   virtual int ExitInstance();
00031
00032 // Implementation
00033
00034   //{{AFX_MSG(CMdiApp)
00035     afx_msg void OnAppAbout();
00036   //}}AFX_MSG
00037   DECLARE_MESSAGE_MAP()
00038 };
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // other globals
00042
00043 extern COLORREF NEAR colorArray[];      // color index table
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/colorlis.cpp Source File

  • ole
  • wordpad

colorlis.cpp

Go to the documentation of this file.
00001 // colorlis.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "colorlis.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CColorMenu
00023
00024 /*
00025 int BASED_CODE CColorMenu::indexMap[17] = {
00026   0,      //black
00027   19,     //white
00028   13,     //red
00029   14,     //green
00030   16,     //blue
00031   15,     //yellow
00032   17,     //magenta
00033   18,     //cyan
00034   1,      //dark red
00035   2,      //dark green
00036   4,      //dark blue
00037   3,      //light brown
00038   5,      //purple
00039   6,      //dark cyan
00040   7,      //light gray
00041   12,     //gray
00042   0};     //automatic
00043 */
00044
00045 int BASED_CODE CColorMenu::indexMap[17] = {
00046   0,      //black
00047   1,      //dark red
00048   2,      //dark green
00049   3,      //light brown
00050   4,      //dark blue
00051   5,      //purple
00052   6,      //dark cyan
00053   12,     //gray
00054   7,      //light gray
00055   13,     //red
00056   14,     //green
00057   15,     //yellow
00058   16,     //blue
00059   17,     //magenta
00060   18,     //cyan
00061   19,     //white
00062   0};     //automatic
00063
00064 CColorMenu::CColorMenu()
00065 {
00066   VERIFY(CreatePopupMenu());
00067   ASSERT(GetMenuItemCount()==0);
00068   for (int i=0; i<=16;i++)
00069     VERIFY(AppendMenu(MF_OWNERDRAW, ID_COLOR0+i, (LPCTSTR)(INT_PTR)(ID_COLOR0+i)));
00070 }
00071
00072 COLORREF CColorMenu::GetColor(UINT id)
00073 {
00074   ENSURE(id >= ID_COLOR0);
00075   ENSURE(id <= ID_COLOR16);
00076   if (id == ID_COLOR16) // autocolor
00077     return ::GetSysColor(COLOR_WINDOWTEXT);
00078   else
00079   {
00080     CPalette* pPal = CPalette::FromHandle( (HPALETTE) GetStockObject(DEFAULT_PALETTE));
00081     ENSURE(pPal != NULL);
00082     PALETTEENTRY pe;
00083     if (pPal->GetPaletteEntries(indexMap[id-ID_COLOR0], 1, &pe) == 0)
00084       return ::GetSysColor(COLOR_WINDOWTEXT);
00085     else
00086       return RGB(pe.peRed,pe.peGreen,pe.peBlue);
00087 //      return PALETTEINDEX(CColorMenu::indexMap[id-ID_COLOR0]);
00088   }
00089 }
00090
00091 void CColorMenu::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00092 {
00093   ASSERT(lpDIS->CtlType == ODT_MENU);
00094   UINT id = (UINT)(WORD)lpDIS->itemID;
00095   ASSERT(id == lpDIS->itemData);
00096   ASSERT(id >= ID_COLOR0);
00097   ASSERT(id <= ID_COLOR16);
00098   CDC dc;
00099   dc.Attach(lpDIS->hDC);
00100
00101   CRect rc(lpDIS->rcItem);
00102   ASSERT(rc.Width() < 500);
00103   if (lpDIS->itemState & ODS_FOCUS)
00104     dc.DrawFocusRect(&rc);
00105
00106   COLORREF cr = (lpDIS->itemState & ODS_SELECTED) ?
00107     ::GetSysColor(COLOR_HIGHLIGHT) :
00108     dc.GetBkColor();
00109
00110   CBrush brushFill(cr);
00111   cr = dc.GetTextColor();
00112
00113   if (lpDIS->itemState & ODS_SELECTED)
00114     dc.SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));
00115
00116   int nBkMode = dc.SetBkMode(TRANSPARENT);
00117   dc.FillRect(&rc, &brushFill);
00118
00119   rc.left += 50;
00120   CString strColor;
00121   strColor.LoadString(id);
00122   dc.TextOut(rc.left,rc.top,strColor,strColor.GetLength());
00123   rc.left -= 45;
00124   rc.top += 2;
00125   rc.bottom -= 2;
00126   rc.right = rc.left + 40;
00127   CBrush brush(GetColor(id));
00128   CBrush* pOldBrush = dc.SelectObject(&brush);
00129   dc.Rectangle(rc);
00130
00131   dc.SelectObject(pOldBrush);
00132   dc.SetTextColor(cr);
00133   dc.SetBkMode(nBkMode);
00134
00135   dc.Detach();
00136 }
00137
00138 void CColorMenu::MeasureItem(LPMEASUREITEMSTRUCT lpMIS)
00139 {
00140   ASSERT(lpMIS->CtlType == ODT_MENU);
00141   UINT id = (UINT)(WORD)lpMIS->itemID;
00142   ASSERT(id == lpMIS->itemData);
00143   ASSERT(id >= ID_COLOR0);
00144   ASSERT(id <= ID_COLOR16);
00145   CDisplayIC dc;
00146   CString strColor;
00147   strColor.LoadString(id);
00148   CSize sizeText = dc.GetTextExtent(strColor,strColor.GetLength());
00149   ASSERT(sizeText.cx < 500);
00150   lpMIS->itemWidth = sizeText.cx + 50;
00151   lpMIS->itemHeight = sizeText.cy;
00152 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawDoc Member List

This is the complete list of members for CDrawDoc, including all inherited members.
Add(CDrawObj *pObj) | CDrawDoc |
Add(CDrawObj *pObj) | CDrawDoc |
CanCloseFrame(CFrameWnd *pFrame) | CDrawDoc | [protected, virtual]
CanDeactivateInplace() const | CDrawDoc | [inline]
CDrawDoc() | CDrawDoc | [protected]
CDrawDoc() | CDrawDoc | [protected]
ComputePageSize() | CDrawDoc |
ComputePageSize() | CDrawDoc |
Draw(CDC *pDC, CDrawView *pView) | CDrawDoc |
Draw(CDC *pDC, CDrawView *pView) | CDrawDoc |
Draw(CDC *pDC) | CDrawDoc |
FixUpObjectPositions() | CDrawDoc |
GetMapMode() const | CDrawDoc | [inline]
GetMapMode() const | CDrawDoc | [inline]
GetObjects() | CDrawDoc | [inline]
GetObjects() | CDrawDoc | [inline]
GetPaperColor() const | CDrawDoc | [inline]
GetPaperColor() const | CDrawDoc | [inline]
GetSize() const | CDrawDoc | [inline]
GetSize() const | CDrawDoc | [inline]
m_bCanDeactivateInplace | CDrawDoc | [protected]
m_nMapMode | CDrawDoc | [protected]
m_objects | CDrawDoc | [protected]
m_paperColor | CDrawDoc | [protected]
m_paperColorLast | CDrawDoc | [protected]
m_pSummInfo | CDrawDoc |
m_rectDocumentBounds | CDrawDoc |
m_size | CDrawDoc | [protected]
ObjectAt(const CPoint &point) | CDrawDoc |
ObjectAt(const CPoint &point) | CDrawDoc |
OnFileSummaryInfo() | CDrawDoc | [protected]
OnFileSummaryInfo() | CDrawDoc | [protected]
OnNewDocument() | CDrawDoc | [protected, virtual]
OnNewDocument() | CDrawDoc | [protected, virtual]
OnOpenDocument(LPCTSTR lpszPathName) | CDrawDoc | [protected, virtual]
OnOpenDocument(LPCTSTR lpszPathName) | CDrawDoc | [protected, virtual]
OnSaveDocument(LPCTSTR lpszPathName) | CDrawDoc | [protected, virtual]
OnSaveDocument(LPCTSTR lpszPathName) | CDrawDoc | [protected, virtual]
OnUnloadHandler() | CDrawDoc | [protected, virtual]
OnViewPaperColor() | CDrawDoc | [protected]
OnViewPaperColor() | CDrawDoc | [protected]
Remove(CDrawObj *pObj) | CDrawDoc |
Remove(CDrawObj *pObj) | CDrawDoc |
Serialize(CArchive &ar) | CDrawDoc | [virtual]
Serialize(CArchive &ar) | CDrawDoc | [virtual]
SetPreviewColor(COLORREF clr) | CDrawDoc |
~CDrawDoc() | CDrawDoc | [virtual]
~CDrawDoc() | CDrawDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npview.cpp Source File

  • general
  • npp

npview.cpp

Go to the documentation of this file.
00001 // npview.cpp : implementation of the CNotepadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "np.h"
00015 #include "combobar.h"
00016 #include "mainfrm.h"
00017 #include "npdoc.h"
00018 #include "npview.h"
00019 #include "gotodlg.h"
00020 #include "finddlg.h"
00021
00022 #include <afxcoll.h>
00023
00024 #ifdef _DEBUG
00025 #undef THIS_FILE
00026 static char BASED_CODE THIS_FILE[] = __FILE__;
00027 #endif
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CNotepadView
00031
00032 IMPLEMENT_DYNCREATE(CNotepadView, CEditView)
00033
00034 BEGIN_MESSAGE_MAP(CNotepadView, CEditView)
00035   //{{AFX_MSG_MAP(CNotepadView)
00036   ON_COMMAND(ID_EDIT_GOTO, OnEditGoto)
00037   ON_UPDATE_COMMAND_UI(ID_EDIT_GOTO, OnUpdateEditGoto)
00038   ON_COMMAND(ID_EDIT_FIND, OnEditFind)
00039   ON_UPDATE_COMMAND_UI(ID_EDIT_FIND, OnUpdateEditFind)
00040   ON_COMMAND(ID_VIEW_FIND_NEXT, OnViewFindNext)
00041   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00042   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00043   //}}AFX_MSG_MAP
00044   // Standard printing commands
00045   ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
00046   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
00047 END_MESSAGE_MAP()
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CNotepadView construction/destruction
00051
00052 CNotepadView::CNotepadView()
00053 {
00054   m_pFindDialog = new CFindDlg;
00055   m_pGotoDialog = new CGotoDlg;
00056 }
00057
00058 CNotepadView::~CNotepadView()
00059 {
00060   delete  m_pGotoDialog;
00061   delete  m_pFindDialog;
00062 }
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CNotepadView drawing
00066
00067 void CNotepadView::OnDraw(CDC* /*pDC*/)
00068 {
00069   CNotepadDoc* pDoc = GetDocument();
00070   ASSERT_VALID(pDoc);
00071 }
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CNotepadView printing
00075
00076 BOOL CNotepadView::OnPreparePrinting(CPrintInfo* pInfo)
00077 {
00078   // default CEditView preparation
00079   return CEditView::OnPreparePrinting(pInfo);
00080 }
00081
00082 void CNotepadView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
00083 {
00084   CEditView::OnBeginPrinting(pDC, pInfo);
00085 }
00086
00087 void CNotepadView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
00088 {
00089   CEditView::OnEndPrinting(pDC, pInfo);
00090 }
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // CNotepadView diagnostics
00094
00095 #ifdef _DEBUG
00096 void CNotepadView::AssertValid() const
00097 {
00098   CEditView::AssertValid();
00099 }
00100
00101 void CNotepadView::Dump(CDumpContext& dc) const
00102 {
00103   CEditView::Dump(dc);
00104 }
00105
00106 CNotepadDoc* CNotepadView::GetDocument() // non-debug version is inline
00107 {
00108   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CNotepadDoc)));
00109   return (CNotepadDoc*)m_pDocument;
00110 }
00111 #endif //_DEBUG
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CNotepadView message handlers
00115
00116
00117 void CNotepadView::OnEditGoto()
00118 {
00119   if(m_pGotoDialog->DoModal() != IDOK)
00120     return;
00121
00122   if(m_pGotoDialog->m_nLineNum < 1)
00123   {
00124     CString s1;
00125     s1.LoadString(NPERROR_INVALID_LINENUM);
00126     AfxMessageBox(s1);
00127     return;
00128   }
00129
00130   CEdit &edit = GetEditCtrl();
00131   int i = edit.LineFromChar();            // this is the current line the cursor is on
00132   int nLine = m_pGotoDialog->m_nLineNum;  // line number to go to
00133
00134   if(nLine > (edit.GetLineCount()))
00135   {
00136     CString s1;
00137
00138     s1.LoadString(NPERROR_NUM_TOO_BIG);
00139     AfxMessageBox(s1);
00140     return;
00141   }
00142
00143   // move window and caret
00144   --nLine;                    // edit control is zero based
00145   edit.LineScroll(nLine-i);   // new line number - the current line
00146
00147   int idx;
00148   idx = edit.LineIndex(nLine);
00149   edit.SetSel(idx, idx);
00150 }
00151
00152 void CNotepadView::OnUpdateEditGoto(CCmdUI* pCmdUI)
00153 {
00154   pCmdUI->Enable(GetWindowTextLength());
00155 }
00156
00157 void CNotepadView::OnEditFind()
00158 {
00159   CString s1, s2;
00160   CComboBox& comboBox = ((CMainFrame*)AfxGetMainWnd())->m_wndToolBar.m_toolBarCombo;
00161
00162   // add user selected text from CEditView to the buffer
00163   GetSelectedText(s1);
00164   s2 = m_pFindDialog->m_szText; // save old string if user cancels
00165
00166   if(s1.GetLength())
00167     m_pFindDialog->m_szText = s1;
00168
00169   if(m_pFindDialog->DoModal() != IDOK)
00170   {
00171     m_pFindDialog->m_szText = s2; // restore old string.  user selected cancel
00172     return;
00173   }
00174
00175   ASSERT(m_pFindDialog->m_szText.GetLength());
00176
00177   // add it to the combo control on the toolbar
00178   comboBox.SetWindowText(m_pFindDialog->m_szText);
00179   m_searchHistory.AddString(m_pFindDialog->m_szText);
00180
00181   if(m_pFindDialog->m_szText.GetLength())
00182     OnFindNext(m_pFindDialog->m_szText, m_pFindDialog->m_nDirection, m_pFindDialog->m_bMatchCase);
00183 }
00184
00185 void CNotepadView::OnUpdateEditFind(CCmdUI* pCmdUI)
00186 {
00187   pCmdUI->Enable(GetWindowTextLength());
00188 }
00189
00190 void CNotepadView::OnViewFindNext(CString &s1)
00191 {
00192   OnFindNext(s1, m_pFindDialog->m_nDirection, m_pFindDialog->m_bMatchCase);
00193 }
00194
00195 void CNotepadView::OnViewFindNext()
00196 {
00197   CString s1;
00198
00199   // if the user presses F3, see if there is a search pattern. if not, ask for one
00200   if (m_pFindDialog->m_szText.GetLength())
00201     OnFindNext(m_pFindDialog->m_szText, m_pFindDialog->m_nDirection, m_pFindDialog->m_bMatchCase);
00202   else
00203     PostMessage(WM_COMMAND, ID_EDIT_FIND);
00204 }
00205
00206 BOOL CNotepadView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00207 {
00208   // change the view's font to SYSTEM_FIXED_FONT
00209   CFont *font = CFont::FromHandle((HFONT)::GetStockObject(SYSTEM_FIXED_FONT));
00210   BOOL bResult = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
00211   SetFont(font);
00212
00213   return bResult;
00214 }
00215
00216 void CNotepadView::OnEditPaste()
00217 {
00218   CWnd* pComboWnd;
00219   CWnd* pFocusWnd;
00220   CComboBox& comboBox = ((CMainFrame*)AfxGetMainWnd())->m_wndToolBar.m_toolBarCombo;
00221
00222   // Note: this is the handler for the accelerator (CTRL+V).  Since the accelerator goes to the
00223   // frame, find who has the focus to determine where to paste to.
00224
00225   pFocusWnd = GetFocus();
00226   pComboWnd = comboBox.GetDlgItem(1001);
00227
00228   ENSURE(pFocusWnd);
00229   ENSURE(pComboWnd);
00230
00231   // if the focus is in the combobox edit control, do the paste in the control
00232   if(pFocusWnd->m_hWnd == pComboWnd->m_hWnd)
00233     comboBox.Paste();
00234   else
00235     GetEditCtrl().Paste();
00236 }
00237
00238 void CNotepadView::OnEditCopy()
00239 {
00240   CWnd* pComboWnd;
00241   CWnd* pFocusWnd;
00242   CComboBox& comboBox = ((CMainFrame*)AfxGetMainWnd())->m_wndToolBar.m_toolBarCombo;
00243
00244   // Note: this is the handler for the accelerator (CTRL+C).  Since the accelerator goes to the
00245   // frame, find who has the focus to determine where to copy from.
00246
00247   pFocusWnd = GetFocus();
00248   pComboWnd = comboBox.GetDlgItem(1001);
00249
00250   ENSURE(pFocusWnd);
00251   ENSURE(pComboWnd);
00252
00253   // if the focus is in the combobox edit control, do the copy from the control
00254   if(pFocusWnd->m_hWnd == pComboWnd->m_hWnd)
00255     comboBox.Copy();
00256   else
00257     GetEditCtrl().Copy();
00258 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/resource.h Source File

  • ole
  • MFCBind

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by MFCBind.rc
00004 //
00005 #define IDR_CNTR_INPLACE                6
00006 #define IDD_ABOUTBOX                    100
00007 #define IDP_OLE_INIT_FAILED             100
00008 #define ID_LISTBOX                      101
00009 #define IDP_FAILED_TO_CREATE            102
00010 #define IDR_MAINFRAME                   128
00011 #define IDR_MFCBINTYPE                  129
00012 #define IDD_GETURL                      132
00013 #define IDC_EDIT1                       1002
00014 #define ID_CANCEL_EDIT_CNTR             32768
00015 #define ID_MENUITEM32771                32771
00016 #define ID_MENUITEM32772                32772
00017 #define ID_SECTION_REMOVE               32773
00018 #define ID_SECTION_FROMFILE             32774
00019 #define ID_FILE_PRINTALLSECTIONS        32775
00020
00021 // Next default values for new objects
00022 //
00023 #ifdef APSTUDIO_INVOKED
00024 #ifndef APSTUDIO_READONLY_SYMBOLS
00025 #define _APS_3D_CONTROLS                     1
00026 #define _APS_NEXT_RESOURCE_VALUE        130
00027 #define _APS_NEXT_COMMAND_VALUE         32776
00028 #define _APS_NEXT_CONTROL_VALUE         1000
00029 #define _APS_NEXT_SYMED_VALUE           102
00030 #endif
00031 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpvw.cpp Source File

  • ole
  • wordpad

wordpvw.cpp

Go to the documentation of this file.
00001 // wordpvw.cpp : implementation of the CWordPadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "cntritem.h"
00015 #include "srvritem.h"
00016
00017 #include "wordpdoc.h"
00018 #include "wordpvw.h"
00019 #include "formatta.h"
00020 #include "datedial.h"
00021 #include "formatpa.h"
00022 #include "formatba.h"
00023 #include "ruler.h"
00024 #include "strings.h"
00025 #include "colorlis.h"
00026 #include "pageset.h"
00027
00028 extern CLIPFORMAT cfEmbeddedObject;
00029 extern CLIPFORMAT cfRTO;
00030
00031 #ifdef _DEBUG
00032 #undef THIS_FILE
00033 static char BASED_CODE THIS_FILE[] = __FILE__;
00034 #endif
00035
00036 BOOL CCharFormat::operator==(CCharFormat& cf)
00037 {
00038   return
00039   dwMask == cf.dwMask
00040   && dwEffects == cf.dwEffects
00041   && yHeight == cf.yHeight
00042   && yOffset == cf.yOffset
00043   && crTextColor == cf.crTextColor
00044   && bPitchAndFamily == cf.bPitchAndFamily
00045   && (lstrcmp(szFaceName, cf.szFaceName) == 0);
00046 }
00047
00048 BOOL CParaFormat::operator==(PARAFORMAT2& pf)
00049 {
00050   if(
00051     dwMask != pf.dwMask
00052     || wNumbering != pf.wNumbering
00053     || wEffects != pf.wEffects
00054     || dxStartIndent != pf.dxStartIndent
00055     || dxRightIndent != pf.dxRightIndent
00056     || dxOffset != pf.dxOffset
00057     || cTabCount != pf.cTabCount
00058     || dySpaceBefore != pf.dySpaceBefore
00059     || dySpaceAfter != pf.dySpaceAfter
00060     || dyLineSpacing != pf.dyLineSpacing
00061     || sStyle != pf.sStyle
00062     || bLineSpacingRule != pf.bLineSpacingRule
00063     || bOutlineLevel != pf.bOutlineLevel
00064     || wShadingWeight != pf.wShadingWeight
00065     || wShadingStyle != pf.wShadingStyle
00066     || wNumberingStart != pf.wNumberingStart
00067     || wNumberingStyle != pf.wNumberingStyle
00068     || wNumberingTab != pf.wNumberingTab
00069     || wBorderSpace != pf.wBorderSpace
00070     || wBorderWidth != pf.wBorderWidth
00071     || wBorders != pf.wBorders
00072     )
00073   {
00074     return FALSE;
00075   }
00076   for (int i=0;i<pf.cTabCount;i++)
00077   {
00078     if (rgxTabs[i] != pf.rgxTabs[i])
00079       return FALSE;
00080   }
00081   return TRUE;
00082 }
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // CWordPadView
00086
00087 IMPLEMENT_DYNCREATE(CWordPadView, CRichEditView)
00088
00089 //WM_SETTINGCHANGE -- default printer might have changed
00090 //WM_FONTCHANGE -- pool of fonts changed
00091 //WM_DEVMODECHANGE -- printer settings changes
00092
00093 BEGIN_MESSAGE_MAP(CWordPadView, CRichEditView)
00094   ON_COMMAND(ID_CANCEL_EDIT_CNTR, OnCancelEditCntr)
00095   ON_COMMAND(ID_CANCEL_EDIT_SRVR, OnCancelEditSrvr)
00096   //{{AFX_MSG_MAP(CWordPadView)
00097   ON_COMMAND(ID_PAGE_SETUP, OnPageSetup)
00098   ON_COMMAND(ID_CHAR_BOLD, OnCharBold)
00099   ON_UPDATE_COMMAND_UI(ID_CHAR_BOLD, OnUpdateCharBold)
00100   ON_COMMAND(ID_CHAR_ITALIC, OnCharItalic)
00101   ON_UPDATE_COMMAND_UI(ID_CHAR_ITALIC, OnUpdateCharItalic)
00102   ON_COMMAND(ID_CHAR_UNDERLINE, OnCharUnderline)
00103   ON_UPDATE_COMMAND_UI(ID_CHAR_UNDERLINE, OnUpdateCharUnderline)
00104   ON_COMMAND(ID_PARA_CENTER, OnParaCenter)
00105   ON_UPDATE_COMMAND_UI(ID_PARA_CENTER, OnUpdateParaCenter)
00106   ON_COMMAND(ID_PARA_LEFT, OnParaLeft)
00107   ON_UPDATE_COMMAND_UI(ID_PARA_LEFT, OnUpdateParaLeft)
00108   ON_COMMAND(ID_PARA_RIGHT, OnParaRight)
00109   ON_UPDATE_COMMAND_UI(ID_PARA_RIGHT, OnUpdateParaRight)
00110   ON_WM_CREATE()
00111   ON_COMMAND(ID_INSERT_DATE_TIME, OnInsertDateTime)
00112   ON_COMMAND(ID_FORMAT_PARAGRAPH, OnFormatParagraph)
00113   ON_COMMAND(ID_FORMAT_TABS, OnFormatTabs)
00114   ON_COMMAND(ID_COLOR16, OnColorDefault)
00115   ON_WM_TIMER()
00116   ON_WM_DESTROY()
00117   ON_WM_MEASUREITEM()
00118   ON_WM_SIZE()
00119   ON_WM_KEYDOWN()
00120   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00121   ON_COMMAND(ID_FILE_PRINT_DIRECT, OnFilePrint)
00122   ON_WM_DROPFILES()
00123   ON_WM_PALETTECHANGED()
00124   ON_WM_QUERYNEWPALETTE()
00125   ON_WM_SETTINGCHANGE()
00126   //}}AFX_MSG_MAP
00127   // Standard printing commands
00128   ON_COMMAND(ID_INSERT_BULLET, CRichEditView::OnBullet)
00129   ON_UPDATE_COMMAND_UI(ID_INSERT_BULLET, CRichEditView::OnUpdateBullet)
00130   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRichEditView::OnFilePrintPreview)
00131   ON_COMMAND_RANGE(ID_COLOR0, ID_COLOR16, OnColorPick)
00132   ON_EN_CHANGE(AFX_IDW_PANE_FIRST, OnEditChange)
00133   ON_WM_MOUSEACTIVATE()
00134   ON_REGISTERED_MESSAGE(CWordPadApp::m_nPrinterChangedMsg, OnPrinterChangedMsg)
00135   ON_NOTIFY(FN_GETFORMAT, ID_VIEW_FORMATBAR, OnGetCharFormat)
00136   ON_NOTIFY(FN_SETFORMAT, ID_VIEW_FORMATBAR, OnSetCharFormat)
00137   ON_NOTIFY(NM_SETFOCUS, ID_VIEW_FORMATBAR, OnBarSetFocus)
00138   ON_NOTIFY(NM_KILLFOCUS, ID_VIEW_FORMATBAR, OnBarKillFocus)
00139   ON_NOTIFY(NM_RETURN, ID_VIEW_FORMATBAR, OnBarReturn)
00140 END_MESSAGE_MAP()
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CWordPadView construction/destruction
00144
00145 CWordPadView::CWordPadView()
00146 {
00147   m_bSyncCharFormat = m_bSyncParaFormat = TRUE;
00148   m_uTimerID = 0;
00149   m_bDelayUpdateItems = FALSE;
00150   m_bOnBar = FALSE;
00151   m_bInPrint = FALSE;
00152   m_nPasteType = 0;
00153   m_rectMargin = theApp.m_rectPageMargin;
00154 }
00155
00156 BOOL CWordPadView::PreCreateWindow(CREATESTRUCT& cs)
00157 {
00158   BOOL bRes = CRichEditView::PreCreateWindow(cs);
00159   cs.style |= ES_SELECTIONBAR;
00160   return bRes;
00161 }
00162
00163 /////////////////////////////////////////////////////////////////////////////
00164 // CWordPadView attributes
00165
00166 BOOL CWordPadView::IsFormatText()
00167 {
00168   // this function checks to see if any formatting is not default text
00169   BOOL bRes = FALSE;
00170   CHARRANGE cr;
00171   CCharFormat cf;
00172   CParaFormat pf;
00173   GetRichEditCtrl().GetSel(cr);
00174   GetRichEditCtrl().HideSelection(TRUE, FALSE);
00175   GetRichEditCtrl().SetSel(0,-1);
00176
00177   if (!(GetRichEditCtrl().GetSelectionType() & (SEL_OBJECT|SEL_MULTIOBJECT)))
00178   {
00179     GetRichEditCtrl().GetSelectionCharFormat(cf);
00180     if (cf == m_defTextCharFormat)
00181     {
00182       GetRichEditCtrl().GetParaFormat(pf);
00183       if (pf == m_defParaFormat) //compared using CParaFormat::operator==
00184         bRes = TRUE;
00185     }
00186   }
00187
00188   GetRichEditCtrl().SetSel(cr);
00189   GetRichEditCtrl().HideSelection(FALSE, FALSE);
00190   return bRes;
00191 }
00192
00193 HMENU CWordPadView::GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE* )
00194 {
00195   CRichEditCntrItem* pItem = GetSelectedItem();
00196   if (pItem == NULL || !pItem->IsInPlaceActive())
00197   {
00198     CMenu menuText;
00199     menuText.LoadMenu(IDR_TEXT_POPUP);
00200     CMenu* pMenuPopup = menuText.GetSubMenu(0);
00201     menuText.RemoveMenu(0, MF_BYPOSITION);
00202     if (!GetSystemMetrics(SM_PENWINDOWS))
00203     {
00204       //delete pen specific stuff
00205       // remove Insert Keystrokes
00206       pMenuPopup->DeleteMenu(ID_PEN_LENS, MF_BYCOMMAND);
00207       int nIndex = pMenuPopup->GetMenuItemCount()-1; //index of last item
00208       // remove Edit Text...
00209       pMenuPopup->DeleteMenu(nIndex, MF_BYPOSITION);
00210       // remove separator
00211       pMenuPopup->DeleteMenu(nIndex-1, MF_BYPOSITION);
00212     }
00213     return pMenuPopup->Detach();
00214   }
00215   return NULL;
00216 }
00217
00218 /////////////////////////////////////////////////////////////////////////////
00219 // CWordPadView operations
00220
00221 void CWordPadView::WrapChanged()
00222 {
00223   CWaitCursor wait;
00224   CFrameWnd* pFrameWnd = GetParentFrame();
00225   ENSURE(pFrameWnd != NULL);
00226   pFrameWnd->SetMessageText(IDS_FORMATTING);
00227   CWnd* pBarWnd = pFrameWnd->GetMessageBar();
00228   if (pBarWnd != NULL)
00229     pBarWnd->UpdateWindow();
00230
00231   CRichEditView::WrapChanged();
00232
00233   pFrameWnd->SetMessageText(AFX_IDS_IDLEMESSAGE);
00234   if (pBarWnd != NULL)
00235     pBarWnd->UpdateWindow();
00236 }
00237
00238 void CWordPadView::SetUpdateTimer()
00239 {
00240   if (m_uTimerID != 0) // if outstanding timer kill it
00241     KillTimer(m_uTimerID);
00242   m_uTimerID = SetTimer(1, 1000, NULL); //set a timer for 1000 milliseconds
00243   if (m_uTimerID == 0) // no timer available so force update now
00244     GetDocument()->UpdateAllItems(NULL);
00245   else
00246     m_bDelayUpdateItems = TRUE;
00247 }
00248
00249 void CWordPadView::DeleteContents()
00250 {
00251   ASSERT_VALID(this);
00252   ASSERT(m_hWnd != NULL);
00253   CRichEditView::DeleteContents();
00254   SetDefaultFont(IsTextType(GetDocument()->m_nNewDocType));
00255 }
00256
00257 void CWordPadView::SetDefaultFont(BOOL bText)
00258 {
00259   ASSERT_VALID(this);
00260   ASSERT(m_hWnd != NULL);
00261   m_bSyncCharFormat = m_bSyncParaFormat = TRUE;
00262   CHARFORMAT* pCharFormat = bText ? &m_defTextCharFormat : &m_defCharFormat;
00263   // set the default character format -- the FALSE makes it the default
00264   GetRichEditCtrl().SetSel(0,-1);
00265   GetRichEditCtrl().SetDefaultCharFormat(*pCharFormat);
00266   GetRichEditCtrl().SetSelectionCharFormat(*pCharFormat);
00267
00268   GetRichEditCtrl().SetParaFormat(m_defParaFormat);
00269
00270   GetRichEditCtrl().SetSel(0,0);
00271   GetRichEditCtrl().EmptyUndoBuffer();
00272   GetRichEditCtrl().SetModify(FALSE);
00273   ASSERT_VALID(this);
00274 }
00275
00276 /////////////////////////////////////////////////////////////////////////////
00277 // CWordPadView drawing
00278
00279 /////////////////////////////////////////////////////////////////////////////
00280 // CWordPadView printing
00281
00282 void CWordPadView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
00283 {
00284   CRichEditView::OnPrint(pDC, pInfo);
00285   if (pInfo != NULL && pInfo->m_bPreview)
00286     DrawMargins(pDC);
00287 }
00288
00289 void CWordPadView::DrawMargins(CDC* pDC)
00290 {
00291   if (pDC->m_hAttribDC != NULL)
00292   {
00293     CRect rect;
00294     rect.left = m_rectMargin.left;
00295     rect.right = m_sizePaper.cx - m_rectMargin.right;
00296     rect.top = m_rectMargin.top;
00297     rect.bottom = m_sizePaper.cy - m_rectMargin.bottom;
00298     //rect in twips
00299     int logx = ::GetDeviceCaps(pDC->m_hDC, LOGPIXELSX);
00300     int logy = ::GetDeviceCaps(pDC->m_hDC, LOGPIXELSY);
00301     rect.left = MulDiv(rect.left, logx, 1440);
00302     rect.right = MulDiv(rect.right, logx, 1440);
00303     rect.top = MulDiv(rect.top, logy, 1440);
00304     rect.bottom = MulDiv(rect.bottom, logy, 1440);
00305     CPen pen(PS_DOT, 0, pDC->GetTextColor());
00306     CPen* ppen = pDC->SelectObject(&pen);
00307     pDC->MoveTo(0, rect.top);
00308     pDC->LineTo(10000, rect.top);
00309     pDC->MoveTo(rect.left, 0);
00310     pDC->LineTo(rect.left, 10000);
00311     pDC->MoveTo(0, rect.bottom);
00312     pDC->LineTo(10000, rect.bottom);
00313     pDC->MoveTo(rect.right, 0);
00314     pDC->LineTo(rect.right, 10000);
00315     pDC->SelectObject(ppen);
00316   }
00317 }
00318
00319 BOOL CWordPadView::OnPreparePrinting(CPrintInfo* pInfo)
00320 {
00321   return DoPreparePrinting(pInfo);
00322 }
00323
00324 /////////////////////////////////////////////////////////////////////////////
00325 // OLE Client support and commands
00326
00327 inline int roundleast(int n)
00328 {
00329   int mod = n%10;
00330   n -= mod;
00331   if (mod >= 5)
00332     n += 10;
00333   else if (mod <= -5)
00334     n -= 10;
00335   return n;
00336 }
00337
00338 static void RoundRect(LPRECT r1)
00339 {
00340   r1->left = roundleast(r1->left);
00341   r1->right = roundleast(r1->right);
00342   r1->top = roundleast(r1->top);
00343   r1->bottom = roundleast(r1->bottom);
00344 }
00345
00346 static void MulDivRect(LPRECT r1, LPRECT r2, int num, int div)
00347 {
00348   r1->left = MulDiv(r2->left, num, div);
00349   r1->top = MulDiv(r2->top, num, div);
00350   r1->right = MulDiv(r2->right, num, div);
00351   r1->bottom = MulDiv(r2->bottom, num, div);
00352 }
00353
00354 void CWordPadView::OnPageSetup()
00355 {
00356   CPageSetupDialog dlg;
00357   PAGESETUPDLG& psd = dlg.m_psd;
00358   BOOL bMetric = theApp.GetUnits() == 1; //centimeters
00359   psd.Flags |= PSD_MARGINS | (bMetric ? PSD_INHUNDREDTHSOFMILLIMETERS :
00360     PSD_INTHOUSANDTHSOFINCHES);
00361   int nUnitsPerInch = bMetric ? 2540 : 1000;
00362   MulDivRect(&psd.rtMargin, m_rectMargin, nUnitsPerInch, 1440);
00363   RoundRect(&psd.rtMargin);
00364   // get the current device from the app
00365   PRINTDLG pd;
00366   pd.hDevNames = NULL;
00367   pd.hDevMode = NULL;
00368   theApp.GetPrinterDeviceDefaults(&pd);
00369   psd.hDevNames = pd.hDevNames;
00370   psd.hDevMode = pd.hDevMode;
00371   if (dlg.DoModal() == IDOK)
00372   {
00373     RoundRect(&psd.rtMargin);
00374     MulDivRect(m_rectMargin, &psd.rtMargin, 1440, nUnitsPerInch);
00375     theApp.m_rectPageMargin = m_rectMargin;
00376     theApp.SelectPrinter(psd.hDevNames, psd.hDevMode);
00377     theApp.NotifyPrinterChanged();
00378   }
00379   // PageSetupDlg failed
00380   if (CommDlgExtendedError() != 0)
00381   {
00382     CPageSetupDlg pageDlg;
00383     pageDlg.m_nBottomMargin = m_rectMargin.bottom;
00384     pageDlg.m_nLeftMargin = m_rectMargin.left;
00385     pageDlg.m_nRightMargin = m_rectMargin.right;
00386     pageDlg.m_nTopMargin = m_rectMargin.top;
00387     if (pageDlg.DoModal() == IDOK)
00388     {
00389       m_rectMargin.SetRect(pageDlg.m_nLeftMargin, pageDlg.m_nTopMargin,
00390         pageDlg.m_nRightMargin, pageDlg.m_nBottomMargin);
00391       // m_page will be changed at this point
00392       theApp.m_rectPageMargin = m_rectMargin;
00393       theApp.NotifyPrinterChanged();
00394     }
00395   }
00396 }
00397
00398 /////////////////////////////////////////////////////////////////////////////
00399 // OLE Server support
00400
00401 // The following command handler provides the standard keyboard
00402 //  user interface to cancel an in-place editing session.  Here,
00403 //  the server (not the container) causes the deactivation.
00404 void CWordPadView::OnCancelEditSrvr()
00405 {
00406   GetDocument()->OnDeactivateUI(FALSE);
00407 }
00408
00409 /////////////////////////////////////////////////////////////////////////////
00410 // CWordPadView diagnostics
00411
00412 #ifdef _DEBUG
00413 void CWordPadView::AssertValid() const
00414 {
00415   CRichEditView::AssertValid();
00416 }
00417
00418 void CWordPadView::Dump(CDumpContext& dc) const
00419 {
00420   CRichEditView::Dump(dc);
00421 }
00422
00423 CWordPadDoc* CWordPadView::GetDocument() // non-debug version is inline
00424 {
00425   return (CWordPadDoc*)m_pDocument;
00426 }
00427 #endif //_DEBUG
00428
00429 /////////////////////////////////////////////////////////////////////////////
00430 // CWordPadView message helpers
00431
00432 /////////////////////////////////////////////////////////////////////////////
00433 // CWordPadView message handlers
00434
00435 int CWordPadView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00436 {
00437   if (CRichEditView::OnCreate(lpCreateStruct) == -1)
00438     return -1;
00439   theApp.m_listPrinterNotify.AddTail(m_hWnd);
00440
00441   if (theApp.m_bWordSel)
00442     GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_AUTOWORDSELECTION);
00443   else
00444     GetRichEditCtrl().SetOptions(ECOOP_AND, ~(DWORD)ECO_AUTOWORDSELECTION);
00445 //  GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_SELECTIONBAR);
00446
00447   GetDefaultFont(m_defTextCharFormat, IDS_DEFAULTTEXTFONT);
00448   GetDefaultFont(m_defCharFormat, IDS_DEFAULTFONT);
00449
00450   GetRichEditCtrl().GetParaFormat(m_defParaFormat);
00451   m_defParaFormat.cTabCount = 0;
00452
00453   return 0;
00454 }
00455
00456 void CWordPadView::GetDefaultFont(CCharFormat& cf, UINT nFontNameID)
00457 {
00458   USES_CONVERSION;
00459   CString strDefFont;
00460   VERIFY(strDefFont.LoadString(nFontNameID));
00461   ASSERT(cf.cbSize == sizeof(CHARFORMAT2));
00462   cf.dwMask = CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT|CFM_SIZE|
00463     CFM_COLOR|CFM_OFFSET|CFM_PROTECTED;
00464   cf.dwEffects = CFE_AUTOCOLOR;
00465   cf.yHeight = 200; //10pt
00466   cf.yOffset = 0;
00467   cf.crTextColor = RGB(0, 0, 0);
00468   cf.bCharSet = 0;
00469   cf.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
00470   ASSERT(strDefFont.GetLength() < LF_FACESIZE);
00471   _tcsncpy_s(cf.szFaceName, LF_FACESIZE, strDefFont, _TRUNCATE);
00472   cf.dwMask |= CFM_FACE;
00473 }
00474
00475 void CWordPadView::OnInsertDateTime()
00476 {
00477   CDateDialog dlg;
00478   if (dlg.DoModal() == IDOK)
00479     GetRichEditCtrl().ReplaceSel(dlg.m_strSel);;
00480 }
00481
00482 void CWordPadView::OnFormatParagraph()
00483 {
00484   CFormatParaDlg dlg(GetParaFormatSelection());
00485   dlg.m_nWordWrap = m_nWordWrap;
00486   if (dlg.DoModal() == IDOK)
00487     SetParaFormat(dlg.m_pf);
00488 }
00489
00490 void CWordPadView::OnFormatTabs()
00491 {
00492   CFormatTabDlg dlg(GetParaFormatSelection());
00493   if (dlg.DoModal() == IDOK)
00494     SetParaFormat(dlg.m_pf);
00495 }
00496
00497 void CWordPadView::OnTextNotFound(LPCTSTR lpStr)
00498 {
00499   ASSERT_VALID(this);
00500   MessageBeep(0);
00501   AfxMessageBox(IDS_FINISHED_SEARCH,MB_OK|MB_ICONINFORMATION);
00502   CRichEditView::OnTextNotFound(lpStr);
00503 }
00504
00505 void CWordPadView::OnColorPick(UINT nID)
00506 {
00507   CRichEditView::OnColorPick(CColorMenu::GetColor(nID));
00508 }
00509
00510 void CWordPadView::OnTimer(UINT_PTR nIDEvent)
00511 {
00512   if (m_uTimerID != nIDEvent) // not our timer
00513     CRichEditView::OnTimer(nIDEvent);
00514   else
00515   {
00516     KillTimer(m_uTimerID); // kill one-shot timer
00517     m_uTimerID = 0;
00518     if (m_bDelayUpdateItems)
00519       GetDocument()->UpdateAllItems(NULL);
00520     m_bDelayUpdateItems = FALSE;
00521   }
00522 }
00523
00524 void CWordPadView::OnEditChange()
00525 {
00526   SetUpdateTimer();
00527 }
00528
00529 void CWordPadView::OnDestroy()
00530 {
00531   POSITION pos = theApp.m_listPrinterNotify.Find(m_hWnd);
00532   ASSERT(pos != NULL);
00533   theApp.m_listPrinterNotify.RemoveAt(pos);
00534
00535   CRichEditView::OnDestroy();
00536
00537   if (m_uTimerID != 0) // if outstanding timer kill it
00538     OnTimer((UINT)m_uTimerID);
00539   ASSERT(m_uTimerID == 0);
00540 }
00541
00542 void CWordPadView::CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType)
00543 {
00544   CRichEditView::CalcWindowRect(lpClientRect, nAdjustType);
00545
00546   if (theApp.m_bWin4 && nAdjustType != 0 && (GetStyle() & WS_VSCROLL))
00547     lpClientRect->right--;
00548
00549   // if the ruler is visible then slide the view up under the ruler to avoid
00550   // showing the top border of the view
00551   if (GetExStyle() & WS_EX_CLIENTEDGE)
00552   {
00553     CFrameWnd* pFrame = GetParentFrame();
00554     if (pFrame != NULL)
00555     {
00556       CRulerBar* pBar = (CRulerBar*)pFrame->GetControlBar(ID_VIEW_RULER);
00557       if (pBar != NULL)
00558       {
00559         BOOL bVis = pBar->IsVisible();
00560         if (pBar->m_bDeferInProgress)
00561           bVis = !bVis;
00562         if (bVis)
00563           lpClientRect->top -= 2;
00564       }
00565     }
00566   }
00567 }
00568
00569 void CWordPadView::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMIS)
00570 {
00571   lpMIS->itemID = (UINT)(WORD)lpMIS->itemID;
00572   CRichEditView::OnMeasureItem(nIDCtl, lpMIS);
00573 }
00574
00575 void CWordPadView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00576 {
00577   if (nChar == VK_F10 && GetKeyState(VK_SHIFT) < 0)
00578   {
00579     long nStart, nEnd;
00580     GetRichEditCtrl().GetSel(nStart, nEnd);
00581     CPoint pt = GetRichEditCtrl().GetCharPos(nEnd);
00582     SendMessage(WM_CONTEXTMENU, (WPARAM)m_hWnd, MAKELPARAM(pt.x, pt.y));
00583   }
00584
00585   CRichEditView::OnKeyDown(nChar, nRepCnt, nFlags);
00586 }
00587
00588 HRESULT CWordPadView::GetClipboardData(CHARRANGE* lpchrg, DWORD /*reco*/,
00589   LPDATAOBJECT lpRichDataObj, LPDATAOBJECT* lplpdataobj)
00590 {
00591   CHARRANGE& cr = *lpchrg;
00592
00593   if ((cr.cpMax - cr.cpMin == 1) &&
00594     GetRichEditCtrl().GetSelectionType() == SEL_OBJECT)
00595   {
00596     return E_NOTIMPL;
00597   }
00598
00599   BeginWaitCursor();
00600   //create the data source
00601   COleDataSource* pDataSource = new COleDataSource;
00602
00603   // put the formats into the data source
00604   LPENUMFORMATETC lpEnumFormatEtc;
00605   lpRichDataObj->EnumFormatEtc(DATADIR_SET, &lpEnumFormatEtc);
00606   if (lpEnumFormatEtc != NULL)
00607   {
00608     FORMATETC etc;
00609     while (lpEnumFormatEtc->Next(1, &etc, NULL) == S_OK)
00610     {
00611       STGMEDIUM stgMedium;
00612       lpRichDataObj->GetData(&etc, &stgMedium);
00613       pDataSource->CacheData(etc.cfFormat, &stgMedium, &etc);
00614     }
00615     lpEnumFormatEtc->Release();
00616   }
00617
00618   CEmbeddedItem item(GetDocument(), cr.cpMin, cr.cpMax);
00619   item.m_lpRichDataObj = lpRichDataObj;
00620   // get wordpad formats
00621   item.GetClipboardData(pDataSource);
00622
00623   // get the IDataObject from the data source
00624   *lplpdataobj =  (LPDATAOBJECT)pDataSource->GetInterface(&IID_IDataObject);
00625
00626   EndWaitCursor();
00627   return S_OK;
00628 }
00629
00630 HRESULT CWordPadView::QueryAcceptData(LPDATAOBJECT lpdataobj,
00631   CLIPFORMAT* lpcfFormat, DWORD reco, BOOL bReally,
00632   HGLOBAL hMetaPict)
00633 {
00634   if (bReally && *lpcfFormat == 0 && (m_nPasteType == 0))
00635   {
00636     COleDataObject dataobj;
00637     dataobj.Attach(lpdataobj, FALSE);
00638     if (!dataobj.IsDataAvailable(cfRTO)) // native avail, let richedit do as it wants
00639     {
00640       if (dataobj.IsDataAvailable(cfEmbeddedObject))
00641       {
00642         if (PasteNative(lpdataobj))
00643           return S_FALSE;
00644       }
00645     }
00646   }
00647   return CRichEditView::QueryAcceptData(lpdataobj, lpcfFormat, reco, bReally,
00648     hMetaPict);
00649 }
00650
00651 BOOL CWordPadView::PasteNative(LPDATAOBJECT lpdataobj)
00652 {
00653   // check data object for wordpad object
00654   // if true, suck out RTF directly
00655   FORMATETC etc = {NULL, NULL, DVASPECT_CONTENT, -1, TYMED_ISTORAGE};
00656   etc.cfFormat = (CLIPFORMAT)cfEmbeddedObject;
00657   STGMEDIUM stgMedium = {TYMED_ISTORAGE, 0, NULL};
00658
00659   // create an IStorage to transfer the data in
00660   LPLOCKBYTES lpLockBytes;
00661   if (FAILED(::CreateILockBytesOnHGlobal(NULL, TRUE, &lpLockBytes)))
00662     return FALSE;
00663   ENSURE(lpLockBytes != NULL);
00664
00665   HRESULT hr = ::StgCreateDocfileOnILockBytes(lpLockBytes,
00666     STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE, 0, &stgMedium.pstg);
00667   lpLockBytes->Release(); //storage addref'd
00668   if (FAILED(hr))
00669     return FALSE;
00670
00671   ASSERT(stgMedium.pstg != NULL);
00672   CLSID clsid;
00673   BOOL bRes = FALSE; //let richedit do what it wants
00674   if (SUCCEEDED(lpdataobj->GetDataHere(&etc, &stgMedium)) &&
00675     SUCCEEDED(ReadClassStg(stgMedium.pstg, &clsid)) &&
00676     clsid == GetDocument()->GetClassID())
00677   {
00678     //suck out RTF now
00679     // open Contents stream
00680     COleStreamFile file;
00681     CFileException fe;
00682     if (file.OpenStream(stgMedium.pstg, szContents,
00683       CFile::modeReadWrite|CFile::shareExclusive, &fe))
00684     {
00685
00686       // load it with CArchive (loads from Contents stream)
00687       CArchive loadArchive(&file, CArchive::load |
00688         CArchive::bNoFlushOnDelete);
00689       Stream(loadArchive, TRUE); //stream in selection
00690       bRes = TRUE; // don't let richedit do anything
00691     }
00692   }
00693   ::ReleaseStgMedium(&stgMedium);
00694   return bRes;
00695 }
00696
00697 // things to fix
00698 // if format==0 we are doing a straight EM_PASTE
00699 //  look for native formats
00700 //      richedit specific -- allow richedit to handle (these will be first)
00701 //      look for RTF, CF_TEXT.  If there paste special as these
00702 //  Do standard OLE scenario
00703
00704 // if pasting a particular format (format != 0)
00705 //  if richedit specific, allow through
00706 //  if RTF, CF_TEXT. paste special
00707 //  if OLE format, do standard OLE scenario
00708
00709
00710 void CWordPadView::OnFilePrint()
00711 {
00712   // don't allow winini changes to occur while printing
00713   m_bInPrint = TRUE;
00714   CRichEditView::OnFilePrint();
00715   // printer may have changed
00716   theApp.NotifyPrinterChanged(); // this will cause a GetDocument()->PrinterChanged();
00717   m_bInPrint = FALSE;
00718 }
00719
00720 int CWordPadView::OnMouseActivate(CWnd* pWnd, UINT nHitTest, UINT message)
00721 {
00722   if (m_bOnBar)
00723   {
00724     SetFocus();
00725     return MA_ACTIVATEANDEAT;
00726   }
00727   else
00728     return CRichEditView::OnMouseActivate(pWnd, nHitTest, message);
00729 }
00730
00731 LONG_PTR CWordPadView::OnPrinterChangedMsg(UINT_PTR, LONG_PTR)
00732 {
00733   CDC dc;
00734   AfxGetApp()->CreatePrinterDC(dc);
00735   OnPrinterChanged(dc);
00736   return 0;
00737 }
00738
00739 static void ForwardPaletteChanged(HWND hWndParent, HWND hWndFocus)
00740 {
00741   // Fix to send the WM_QUERYNEWPALETTE to a window that is interested
00742   HWND hWnd = NULL;
00743   for (hWnd = ::GetWindow(hWndParent, GW_CHILD); hWnd != NULL; hWnd = ::GetWindow(hWnd, GW_HWNDNEXT))
00744   {
00745     if (hWnd != hWndFocus)
00746     {
00747       ::SendMessage(hWnd, WM_PALETTECHANGED, (WPARAM)hWndFocus, 0L);
00748       ForwardPaletteChanged(hWnd, hWndFocus);
00749     }
00750   }
00751 }
00752
00753 void CWordPadView::OnPaletteChanged(CWnd* pFocusWnd)
00754 {
00755   ForwardPaletteChanged(m_hWnd, pFocusWnd->GetSafeHwnd());
00756   // allow the richedit control to realize its palette
00757   // remove this if if richedit fixes their code so that
00758   // they don't realize their palette into foreground
00759   if (::GetWindow(m_hWnd, GW_CHILD) == NULL)
00760     CRichEditView::OnPaletteChanged(pFocusWnd);
00761 }
00762
00763 static BOOL FindQueryPalette(HWND hWndParent)
00764 {
00765   //Fix to send the WM_QUERYNEWPALETTE to a window that is interested
00766   HWND hWnd = NULL;
00767   for (hWnd = ::GetWindow(hWndParent, GW_CHILD); hWnd != NULL; hWnd = ::GetWindow(hWnd, GW_HWNDNEXT))
00768   {
00769     if (::SendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0L))
00770       return TRUE;
00771     else if (FindQueryPalette(hWnd))
00772       return TRUE;
00773   }
00774   return FALSE;
00775 }
00776
00777 BOOL CWordPadView::OnQueryNewPalette()
00778 {
00779   if(FindQueryPalette(m_hWnd))
00780     return TRUE;
00781   return CRichEditView::OnQueryNewPalette();
00782 }
00783
00784 void CWordPadView::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
00785 {
00786   CRichEditView::OnSettingChange(uFlags, lpszSection);
00787   //printer might have changed
00788   if (!m_bInPrint)
00789   {
00790 #pragma warning(suppress:6400)
00791     if (lstrcmpi(lpszSection, _T("windows")) == 0)
00792       theApp.NotifyPrinterChanged(TRUE); // force update to defaults
00793   }
00794 }
00795
00796 void CWordPadView::OnSize(UINT nType, int cx, int cy)
00797 {
00798   CRichEditView::OnSize(nType, cx, cy);
00799   CRect rect(HORZ_TEXTOFFSET, VERT_TEXTOFFSET, cx, cy);
00800   GetRichEditCtrl().SetRect(rect);
00801 }
00802
00803 void CWordPadView::OnGetCharFormat(NMHDR* pNMHDR, LRESULT* pRes)
00804 {
00805   ENSURE(pNMHDR != NULL);
00806   ENSURE(pRes != NULL);
00807   ((CHARHDR*)pNMHDR)->cf = GetCharFormatSelection();
00808   *pRes = 1;
00809 }
00810
00811 void CWordPadView::OnSetCharFormat(NMHDR* pNMHDR, LRESULT* pRes)
00812 {
00813   ENSURE(pNMHDR != NULL);
00814   ENSURE(pRes != NULL);
00815   SetCharFormat(((CHARHDR*)pNMHDR)->cf);
00816   *pRes = 1;
00817 }
00818
00819 void CWordPadView::OnBarSetFocus(NMHDR*, LRESULT*)
00820 {
00821   m_bOnBar = TRUE;
00822 }
00823
00824 void CWordPadView::OnBarKillFocus(NMHDR*, LRESULT*)
00825 {
00826   m_bOnBar = FALSE;
00827 }
00828
00829 void CWordPadView::OnBarReturn(NMHDR*, LRESULT* )
00830 {
00831   SetFocus();
00832 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTaskDialogTestDlg Member List

This is the complete list of members for CTaskDialogTestDlg, including all inherited members.
CTaskDialogTestDlg(CWnd *pParent=NULL) | CTaskDialogTestDlg |
DoDataExchange(CDataExchange *pDX) | CTaskDialogTestDlg | [protected, virtual]
IDD enum value | CTaskDialogTestDlg |
m_hIcon | CTaskDialogTestDlg | [protected]
OnBnClickedButton1() | CTaskDialogTestDlg |
OnBnClickedButton2() | CTaskDialogTestDlg |
OnBnClickedButton3() | CTaskDialogTestDlg |
OnBnClickedButton4() | CTaskDialogTestDlg |
OnBnClickedButton5() | CTaskDialogTestDlg |
OnBnClickedButton6() | CTaskDialogTestDlg |
OnBnClickedButton7() | CTaskDialogTestDlg |
OnBnClickedButton8() | CTaskDialogTestDlg |
OnInitDialog() | CTaskDialogTestDlg | [protected, virtual]
OnPaint() | CTaskDialogTestDlg | [protected]
OnQueryDragIcon() | CTaskDialogTestDlg | [protected]
OnStnClickedRadioId() | CTaskDialogTestDlg |
SetControls(INT_PTR nResult, int nRadioButtonId, BOOL bChecked) | CTaskDialogTestDlg | [protected]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/MainFrm.h Source File

  • vc2008fp
  • ToolbarDateTimePicker

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #if !defined(AFX_MAINFRM_H__301D021A_120B_40D3_944D_8AEBC3BF7EDD__INCLUDED_)
00012 #define AFX_MAINFRM_H__301D021A_120B_40D3_944D_8AEBC3BF7EDD__INCLUDED_
00013
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif // _MSC_VER > 1000
00017
00018 #define CFrameWnd CFrameWndEx
00019
00020 class CMainFrame : public CFrameWnd
00021 {
00022
00023 protected: // create from serialization only
00024   CMainFrame();
00025   DECLARE_DYNCREATE(CMainFrame)
00026
00027 // Attributes
00028 public:
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CMainFrame)
00036   public:
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 public:
00042   virtual ~CMainFrame();
00043 #ifdef _DEBUG
00044   virtual void AssertValid() const;
00045   virtual void Dump(CDumpContext& dc) const;
00046 #endif
00047
00048 protected:  // control bar embedded members
00049   CMFCMenuBar   m_wndMenuBar;
00050   CMFCStatusBar m_wndStatusBar;
00051   CMFCToolBar   m_wndToolBar;
00052
00053 // Generated message map functions
00054 protected:
00055   //{{AFX_MSG(CMainFrame)
00056   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00057   afx_msg void OnDate();
00058   afx_msg void OnTime();
00059   //}}AFX_MSG
00060   afx_msg void OnViewCustomize();
00061   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00062   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00063   DECLARE_MESSAGE_MAP()
00064
00065   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00066 };
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069
00070 //{{AFX_INSERT_LOCATION}}
00071 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00072
00073 #endif // !defined(AFX_MAINFRM_H__301D021A_120B_40D3_944D_8AEBC3BF7EDD__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenppg.h Source File

  • controls
  • licensed

licenppg.h

Go to the documentation of this file.
00001 // licenppg.h : Declaration of the CLicensedPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 ////////////////////////////////////////////////////////////////////////////
00013 // CLicensedPropPage : See licenppg.cpp for implementation.
00014
00015 class CLicensedPropPage : public COlePropertyPage
00016 {
00017   DECLARE_DYNCREATE(CLicensedPropPage)
00018   DECLARE_OLECREATE_EX(CLicensedPropPage)
00019
00020 // Constructor
00021 public:
00022   CLicensedPropPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CLicensedPropPage)
00026   enum { IDD = IDD_PROPPAGE_LICENSED };
00027   //}}AFX_DATA
00028
00029 // Implementation
00030 protected:
00031   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00032
00033 // Message maps
00034 protected:
00035   //{{AFX_MSG(CLicensedPropPage)
00036   //}}AFX_MSG
00037   DECLARE_MESSAGE_MAP()
00038
00039 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/AppLookDlg.cpp Source File

  • vc2008fp
  • VisualStudioDemo

AppLookDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "AppLookDlg.h"
00013 #include "MainFrm.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CAppLookDlg dialog
00023
00024 CAppLookDlg::CAppLookDlg(BOOL bStartup, CWnd* pParent /*=NULL*/) :
00025   CDialog(CAppLookDlg::IDD, pParent), m_bStartup(bStartup)
00026 {
00027   m_bShowAtStartup = FALSE;
00028   m_bOneNoteTabs = TRUE;
00029   m_bDockTabColors = FALSE;
00030   m_bRoundedTabs = FALSE;
00031   m_bCustomTooltips = TRUE;
00032   m_nAppLook = 3;
00033   m_nStyle = 0;
00034   m_bActiveTabCloseButton = FALSE;
00035
00036   m_nAppLook = theApp.GetInt(_T("AppLook"), 3);
00037   m_nStyle = theApp.GetInt(_T("AppStyle"), 0);;
00038   m_bShowAtStartup = theApp.GetInt(_T("ShowAppLookAtStartup"), TRUE);
00039   m_bOneNoteTabs = theApp.GetInt(_T("OneNoteTabs"), TRUE);
00040   m_bDockTabColors = theApp.GetInt(_T("DockTabColors"), FALSE);
00041   m_bRoundedTabs = theApp.GetInt(_T("RoundedTabs"), FALSE);
00042   m_bCustomTooltips = theApp.GetInt(_T("CustomTooltips"), TRUE);
00043   m_bActiveTabCloseButton = theApp.GetInt(_T("ActiveTabCloseButton"), FALSE);
00044 }
00045
00046 void CAppLookDlg::DoDataExchange(CDataExchange* pDX)
00047 {
00048   CDialog::DoDataExchange(pDX);
00049   DDX_Control(pDX, IDC_STYLE, m_wndStyle);
00050   DDX_Control(pDX, IDC_ROUNDED_TABS, m_wndRoundedTabs);
00051   DDX_Control(pDX, IDC_DOCK_TAB_COLORS, m_wndDockTabColors);
00052   DDX_Control(pDX, IDC_ONENOTE_TABS, m_wndOneNoteTabs);
00053   DDX_Control(pDX, IDOK, m_wndOK);
00054   DDX_Control(pDX, IDCANCEL, m_wndCancel);
00055   DDX_Check(pDX, IDC_SHOW_AT_STARTUP, m_bShowAtStartup);
00056   DDX_Check(pDX, IDC_ONENOTE_TABS, m_bOneNoteTabs);
00057   DDX_Check(pDX, IDC_DOCK_TAB_COLORS, m_bDockTabColors);
00058   DDX_Check(pDX, IDC_ROUNDED_TABS, m_bRoundedTabs);
00059   DDX_Check(pDX, IDC_CUSTOM_TOOLTIPS, m_bCustomTooltips);
00060   DDX_CBIndex(pDX, IDC_APP_LOOK, m_nAppLook);
00061   DDX_CBIndex(pDX, IDC_STYLE, m_nStyle);
00062   DDX_Check(pDX, IDC_ACTIVETAB_CLOSE_BUTTON, m_bActiveTabCloseButton);
00063 }
00064
00065 BEGIN_MESSAGE_MAP(CAppLookDlg, CDialog)
00066   ON_BN_CLICKED(IDC_APPLY, OnApply)
00067   ON_CBN_SELENDOK(IDC_APP_LOOK, OnAppLook)
00068 END_MESSAGE_MAP()
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CAppLookDlg message handlers
00072
00073 BOOL CAppLookDlg::OnInitDialog()
00074 {
00075   CDialog::OnInitDialog();
00076   UpdateData(FALSE);
00077   OnAppLook();
00078
00079   if (m_bStartup)
00080   {
00081     SetLook();
00082
00083     if (!m_bShowAtStartup)
00084     {
00085       EndDialog(IDCANCEL);
00086       return TRUE;
00087     }
00088
00089     CRect rectBtn;
00090
00091     // Hide "Cancel" button:
00092     m_wndCancel.GetWindowRect(rectBtn);
00093     ScreenToClient(rectBtn);
00094
00095     m_wndOK.MoveWindow(rectBtn);
00096
00097     m_wndCancel.ShowWindow(SW_HIDE);
00098   }
00099
00100   return TRUE;  // return TRUE unless you set the focus to a control
00101 }
00102
00103 void CAppLookDlg::OnOK()
00104 {
00105   SetLook();
00106   CDialog::OnOK();
00107 }
00108
00109 void CAppLookDlg::SetLook()
00110 {
00111   CWaitCursor wait;
00112
00113   UpdateData();
00114
00115   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
00116   if (pMainFrame != NULL)
00117   {
00118     pMainFrame->LockWindowUpdate();
00119   }
00120
00121   CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;
00122
00123   switch (m_nAppLook)
00124   {
00125   case 0:
00126     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManager));
00127     break;
00128
00129   case 1:
00130     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOfficeXP));
00131     break;
00132
00133   case 2:
00134     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
00135     break;
00136
00137   case 3:
00138     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerVS2005));
00139
00140     if (m_bRoundedTabs)
00141     {
00142       CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D_ROUNDED;
00143     }
00144
00145     CMFCVisualManagerVS2005::m_bRoundedAutohideButtons = m_bRoundedTabs;
00146     break;
00147
00148   case 4:
00149     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
00150     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00151     break;
00152
00153   case 5:
00154     switch (m_nStyle)
00155     {
00156     case 0:
00157       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00158       break;
00159
00160     case 1:
00161       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00162       break;
00163
00164     case 2:
00165       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);
00166       break;
00167
00168     case 3:
00169       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);
00170       break;
00171     }
00172
00173     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));
00174     break;
00175
00176   case 6:
00177     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerVS2008));
00178         break;
00179   }
00180
00181   theApp.WriteInt(_T("AppLook"), m_nAppLook);
00182   theApp.WriteInt(_T("ShowAppLookAtStartup"), m_bShowAtStartup);
00183   theApp.WriteInt(_T("OneNoteTabs"), m_bOneNoteTabs);
00184   theApp.WriteInt(_T("DockTabColors"), m_bDockTabColors);
00185   theApp.WriteInt(_T("RoundedTabs"), m_bRoundedTabs);
00186   theApp.WriteInt(_T("CustomTooltips"), m_bCustomTooltips);
00187   theApp.WriteInt(_T("AppStyle"), m_nStyle);
00188   theApp.WriteInt(_T("ActiveTabCloseButton"), m_bActiveTabCloseButton);
00189
00190   switch (m_nAppLook)
00191   {
00192   case 2: // Office 2003
00193   case 3: // VS.NET 2005
00194   case 4: // Windows XP
00195   case 5: // Office 2007
00196   case 6: // VS 2008
00197     {
00198       CWindowDC dc(NULL);
00199       theApp.m_bHiColorIcons = dc.GetDeviceCaps(BITSPIXEL) >= 16;
00200
00201       CDockingManager::SetDockingMode(DT_SMART);
00202     }
00203     break;
00204
00205   default:
00206     theApp.m_bHiColorIcons = FALSE;
00207   }
00208
00209   CTabbedPane::ResetTabs();
00210
00211   if (m_bCustomTooltips)
00212   {
00213     CMFCToolTipInfo params;
00214     params.m_bVislManagerTheme = TRUE;
00215
00216     theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, RUNTIME_CLASS(CMFCToolTipCtrl), &params);
00217   }
00218   else
00219   {
00220     theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, NULL, NULL);
00221   }
00222
00223   if (pMainFrame != NULL)
00224   {
00225     pMainFrame->OnChangeLook(m_bOneNoteTabs/* OneNote tabs */, m_bOneNoteTabs /* MDI tab colors*/, m_nAppLook != 0 /* VS.NET look */, m_bDockTabColors /* Dock tab colors*/, m_nAppLook == 3 || m_nAppLook == 6 /* VS 2005/2008 MDI tabs */, m_bActiveTabCloseButton);
00226
00227     pMainFrame->UnlockWindowUpdate();
00228     pMainFrame->RedrawWindow();
00229   }
00230 }
00231
00232 void CAppLookDlg::OnApply()
00233 {
00234   SetLook();
00235
00236   if (!m_bStartup)
00237   {
00238     m_wndCancel.SetWindowText(_T("Close"));
00239   }
00240 }
00241
00242 void CAppLookDlg::OnAppLook()
00243 {
00244   UpdateData();
00245
00246   m_wndRoundedTabs.EnableWindow(m_nAppLook == 3);
00247   m_wndStyle.EnableWindow(m_nAppLook == 5);
00248 }
00249
00250
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrdoc.h Source File

  • controls
  • contain

contrdoc.h

Go to the documentation of this file.
00001 // ContrDoc.h : interface of the CContainerDoc class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #define HINT_UPDATE_WINDOW  0
00013 #define HINT_UPDATE_ITEM    1
00014
00015 class CContainerDoc : public COleDocument
00016 {
00017 protected: // create from serialization only
00018   CContainerDoc();
00019   DECLARE_DYNCREATE(CContainerDoc)
00020
00021 // Attributes
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CContainerDoc)
00030   public:
00031   virtual BOOL OnNewDocument();
00032   virtual void Serialize(CArchive& ar);
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 public:
00037   virtual ~CContainerDoc();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044
00045 // Generated message map functions
00046 protected:
00047   //{{AFX_MSG(CContainerDoc)
00048     // NOTE - the ClassWizard will add and remove member functions here.
00049     //    DO NOT EDIT what you see in these blocks of generated code !
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDropTargetView Member List

This is the complete list of members for CDropTargetView, including all inherited members.
CDropTargetView() | CDropTargetView |
GetDocument() | CDropTargetView | [inline]
m_lb | CDropTargetView |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CDropTargetView | [protected]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/mainfrm.cpp Source File

  • general
  • Scribble

mainfrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   ON_WM_CREATE()
00033   //}}AFX_MSG_MAP
00034   ON_COMMAND(ID_HELP_FINDER, CMDIFrameWnd::OnHelpFinder)
00035   ON_COMMAND(ID_HELP, CMDIFrameWnd::OnHelp)
00036   ON_COMMAND(ID_CONTEXT_HELP, CMDIFrameWnd::OnContextHelp)
00037   ON_COMMAND(ID_DEFAULT_HELP, CMDIFrameWnd::OnHelpFinder)
00038 END_MESSAGE_MAP()
00039
00040 static UINT indicators[] =
00041 {
00042   ID_SEPARATOR,           // status line indicator
00043   ID_INDICATOR_CAPS,
00044   ID_INDICATOR_NUM,
00045   ID_INDICATOR_SCRL,
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CMainFrame construction/destruction
00050
00051 CMainFrame::CMainFrame()
00052 {
00053   // TODO: add member initialization code here
00054
00055 }
00056
00057 CMainFrame::~CMainFrame()
00058 {
00059 }
00060
00061 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00062 {
00063   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00064     return -1;
00065
00066   if (!m_wndToolBar.Create(this) ||
00067     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00068   {
00069     TRACE0("Failed to create toolbar\n");
00070     return -1;      // fail to create
00071   }
00072
00073   if (!m_wndStatusBar.Create(this) ||
00074     !m_wndStatusBar.SetIndicators(indicators,
00075       sizeof(indicators)/sizeof(UINT)))
00076   {
00077     TRACE0("Failed to create status bar\n");
00078     return -1;      // fail to create
00079   }
00080
00081   // Set the main app icon
00082   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00083   SetIcon(m_hIcon, FALSE);
00084
00085
00086   // TODO: Remove this if you don't want tool tips
00087   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00088     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00089
00090   // TODO: Delete these three lines if you don't want the toolbar to
00091   //  be dockable
00092   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00093   EnableDocking(CBRS_ALIGN_ANY);
00094   DockControlBar(&m_wndToolBar);
00095
00096
00097   return 0;
00098 }
00099
00100 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00101 {
00102   // TODO: Modify the Window class or styles here by modifying
00103   //  the CREATESTRUCT cs
00104
00105   return CMDIFrameWnd::PreCreateWindow(cs);
00106 }
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CMainFrame diagnostics
00110
00111 #ifdef _DEBUG
00112 void CMainFrame::AssertValid() const
00113 {
00114   CMDIFrameWnd::AssertValid();
00115 }
00116
00117 void CMainFrame::Dump(CDumpContext& dc) const
00118 {
00119   CMDIFrameWnd::Dump(dc);
00120 }
00121
00122 #endif //_DEBUG
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/stdafx.cpp Source File

  • advanced
  • collect

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  collect.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/SourceView.h Source File

  • internet
  • HTMLEdit

SourceView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #if !defined(AFX_SOURCEVIEW_H__0D4EF336_E1DD_11D1_AD76_0060083E86DF__INCLUDED_)
00011 #define AFX_SOURCEVIEW_H__0D4EF336_E1DD_11D1_AD76_0060083E86DF__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // SourceView.h : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CSourceView view
00021
00022 class CSourceView : public CEditView
00023 {
00024 protected:
00025   CSourceView();           // protected constructor used by dynamic creation
00026   DECLARE_DYNCREATE(CSourceView)
00027   CFont m_font;
00028 // Attributes
00029 public:
00030
00031   void NewDocument()
00032   {
00033     this->DeleteContents();
00034   }
00035   void UpdateView();
00036 // Operations
00037 public:
00038
00039 // Overrides
00040   // ClassWizard generated virtual function overrides
00041   //{{AFX_VIRTUAL(CSourceView)
00042   protected:
00043   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00044   virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 protected:
00049   virtual ~CSourceView();
00050 #ifdef _DEBUG
00051   virtual void AssertValid() const;
00052   virtual void Dump(CDumpContext& dc) const;
00053 #endif
00054
00055   // Generated message map functions
00056 protected:
00057   //{{AFX_MSG(CSourceView)
00058   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061 private:
00062
00063 };
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066
00067 //{{AFX_INSERT_LOCATION}}
00068 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00069
00070 #endif // !defined(AFX_SOURCEVIEW_H__0D4EF336_E1DD_11D1_AD76_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNotepadView Member List

This is the complete list of members for CNotepadView, including all inherited members.
CNotepadView() | CNotepadView | [protected]
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CNotepadView | [virtual]
GetDocument() | CNotepadView | [inline]
m_pFindDialog | CNotepadView |
m_pGotoDialog | CNotepadView |
m_searchHistory | CNotepadView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CNotepadView | [protected, virtual]
OnDraw(CDC *pDC) | CNotepadView | [virtual]
OnEditCopy() | CNotepadView | [protected]
OnEditFind() | CNotepadView | [protected]
OnEditGoto() | CNotepadView | [protected]
OnEditPaste() | CNotepadView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CNotepadView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CNotepadView | [protected, virtual]
OnUpdateEditFind(CCmdUI *pCmdUI) | CNotepadView | [protected]
OnUpdateEditGoto(CCmdUI *pCmdUI) | CNotepadView | [protected]
OnViewFindNext(CString &s1) | CNotepadView |
OnViewFindNext() | CNotepadView | [protected]
~CNotepadView() | CNotepadView | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/MainFrm.cpp Source File

  • vc2008fp
  • TasksPane

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TasksPane.h"
00013
00014 #include "MainFrm.h"
00015 #include "TasksPaneDoc.h"
00016 #include "TasksPaneView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00028
00029
00030 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00031   ON_WM_CREATE()
00032   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00033   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00034   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00035   ON_COMMAND(ID_VIEW_TASKPANE, OnViewTaskpane)
00036   ON_UPDATE_COMMAND_UI(ID_VIEW_TASKPANE, OnUpdateViewTaskpane)
00037   ON_COMMAND(ID_TASK1, OnTask)
00038   ON_COMMAND(ID_TASK2, OnTask)
00039   ON_COMMAND(ID_TASK3, OnTask)
00040   ON_COMMAND(ID_TASK4, OnTask)
00041   ON_COMMAND(ID_TASK5, OnTask)
00042   ON_COMMAND(ID_TASK6, OnTask)
00043   ON_COMMAND(ID_TASK7, OnTask)
00044   ON_COMMAND(ID_TASK8, OnTask)
00045   ON_COMMAND(ID_TASK9, OnTask)
00046   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007, OnAppLook)
00047   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007, OnUpdateAppLook)
00048 END_MESSAGE_MAP()
00049
00050 static UINT indicators[] =
00051 {
00052   ID_SEPARATOR,           // status line indicator
00053   ID_INDICATOR_CAPS,
00054   ID_INDICATOR_NUM,
00055   ID_INDICATOR_SCRL,
00056 };
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CMainFrame construction/destruction
00060
00061 CMainFrame::CMainFrame()
00062 {
00063   m_nAppLook = ID_VIEW_APPLOOK_2000;
00064   // TODO: add member initialization code here
00065
00066   CMFCButton::EnableWindowsTheming ();
00067 }
00068
00069 CMainFrame::~CMainFrame()
00070 {
00071 }
00072
00073 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00074 {
00075   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00076     return -1;
00077
00078   m_nAppLook = ID_VIEW_APPLOOK_2000 + theApp.GetInt (_T("VisualManager"), 3);
00079
00080   switch (m_nAppLook)
00081   {
00082   case ID_VIEW_APPLOOK_2000:
00083     // enable Office 2000 look:
00084     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00085     break;
00086
00087   case ID_VIEW_APPLOOK_XP:
00088     // enable Office XP look:
00089     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00090     break;
00091
00092   case ID_VIEW_APPLOOK_2003:
00093     // enable Office 2003 look:
00094     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00095     break;
00096
00097   case ID_VIEW_APPLOOK_WIN_XP:
00098   // enable Windows XP look (in other OS Office XP look will be used):
00099     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00100     break;
00101
00102   case ID_VIEW_APPLOOK_VS2005:
00103     // enable VS.NET 2005 look:
00104     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00105     CDockingManager::SetDockingMode (DT_SMART);
00106     break;
00107
00108   case ID_VIEW_APPLOOK_2007:
00109     // enable Office 2007 look:
00110     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00111     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00112     break;
00113   }
00114
00115   CMFCToolBar::EnableQuickCustomization ();
00116
00117   if (!m_wndMenuBar.Create (this))
00118   {
00119     TRACE0("Failed to create menubar\n");
00120     return -1;      // fail to create
00121   }
00122
00123   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00124
00125   // Detect color depth. 256 color toolbars can be used in the
00126   // high or true color modes only (bits per pixel is > 8):
00127   CClientDC dc (this);
00128   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00129
00130   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00131
00132   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00133     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00134     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00135   {
00136     TRACE0("Failed to create toolbar\n");
00137     return -1;      // fail to create
00138   }
00139   if (!m_wndStatusBar.Create(this) ||
00140     !m_wndStatusBar.SetIndicators(indicators,
00141       sizeof(indicators)/sizeof(UINT)))
00142   {
00143     TRACE0("Failed to create status bar\n");
00144     return -1;      // fail to create
00145   }
00146
00147   if (!CreateTaskPane ())
00148   {
00149     TRACE0("Failed to create tasks pane\n");
00150     return -1;      // fail to create
00151   }
00152
00153   BOOL bValidString;
00154   CString strMainToolbarTitle;
00155   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00156   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00157   // TODO: Delete these three lines if you don't want the toolbar to
00158   //  be dockable
00159   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00160   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00161   m_wndTaskPane.EnableDocking(CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT);
00162   EnableDocking(CBRS_ALIGN_ANY);
00163   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00164   DockPane(&m_wndMenuBar);
00165   DockPane(&m_wndToolBar);
00166   DockPane(&m_wndTaskPane);
00167
00168
00169   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00170   return 0;
00171 }
00172
00173 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00174 {
00175   if( !CFrameWnd::PreCreateWindow(cs) )
00176     return FALSE;
00177   // TODO: Modify the Window class or styles here by modifying
00178   //  the CREATESTRUCT cs
00179
00180   return TRUE;
00181 }
00182
00183 /////////////////////////////////////////////////////////////////////////////
00184 // CMainFrame diagnostics
00185
00186 #ifdef _DEBUG
00187 void CMainFrame::AssertValid() const
00188 {
00189   CFrameWnd::AssertValid();
00190 }
00191
00192 void CMainFrame::Dump(CDumpContext& dc) const
00193 {
00194   CFrameWnd::Dump(dc);
00195 }
00196
00197 #endif //_DEBUG
00198
00199 /////////////////////////////////////////////////////////////////////////////
00200 // CMainFrame message handlers
00201
00202
00203 void CMainFrame::OnViewCustomize()
00204 {
00205   //------------------------------------
00206   // Create a customize toolbars dialog:
00207   //------------------------------------
00208   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00209     TRUE /* Automatic menus scaning */
00210     );
00211
00212   pDlgCust->Create ();
00213 }
00214
00215 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00216 {
00217   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00218
00219   CMenu menu;
00220   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00221
00222   CMenu* pPopup = menu.GetSubMenu(0);
00223   ASSERT(pPopup != NULL);
00224
00225   if (pPopup)
00226   {
00227     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00228     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00229   }
00230
00231   return 0;
00232 }
00233
00234 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00235 {
00236   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00237   //
00238   // UINT uiToolBarId = (UINT) wp;
00239   // if (uiToolBarId == IDR_MAINFRAME)
00240   // {
00241   //    do something with m_wndToolBar
00242   // }
00243
00244   return 0;
00245 }
00246
00247 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00248 {
00249   //---------------------------------------------------------
00250   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00251   //---------------------------------------------------------
00252   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00253
00254   if (pMenuPopup != NULL &&
00255     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00256   {
00257     if (CMFCToolBar::IsCustomizeMode ())
00258     {
00259       //----------------------------------------------------
00260       // Don't show toolbars list in the cuztomization mode!
00261       //----------------------------------------------------
00262       return FALSE;
00263     }
00264
00265     pMenuPopup->RemoveAllItems ();
00266
00267     CMenu menu;
00268     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00269
00270     CMenu* pPopup = menu.GetSubMenu(0);
00271     ASSERT(pPopup != NULL);
00272
00273     if (pPopup)
00274     {
00275       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00276     }
00277   }
00278
00279   return TRUE;
00280 }
00281
00282 void CMainFrame::OnViewTaskpane()
00283 {
00284   ShowPane (&m_wndTaskPane,
00285           !(m_wndTaskPane.IsVisible ()),
00286           FALSE, TRUE);
00287   RecalcLayout ();
00288 }
00289
00290 void CMainFrame::OnUpdateViewTaskpane(CCmdUI* pCmdUI)
00291 {
00292   pCmdUI->SetCheck (m_wndTaskPane.IsVisible ());
00293 }
00294
00295 BOOL CMainFrame::CreateTaskPane ()
00296 {
00297   CRect rectDummy(0, 0, 200, 400);
00298   if (!m_wndTaskPane.Create(_T("Tasks Pane"), this, rectDummy, TRUE, ID_VIEW_TASKPANE,
00299     WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT | AFX_CBRS_CLOSE | AFX_CBRS_FLOAT))
00300   {
00301     TRACE0("Failed to create task pane\n");
00302     return FALSE;      // fail to create
00303   }
00304
00305   return TRUE;
00306 }
00307
00308 void CMainFrame::OnTask()
00309 {
00310   MessageBox (_T("TODO: Task"));
00311 }
00312
00313 void CMainFrame::OnAppLook(UINT id)
00314 {
00315   m_nAppLook = id;
00316
00317   switch (m_nAppLook)
00318   {
00319   case ID_VIEW_APPLOOK_2000:
00320     // enable Office 2000 look:
00321     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00322     break;
00323
00324   case ID_VIEW_APPLOOK_XP:
00325     // enable Office XP look:
00326     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00327     break;
00328
00329   case ID_VIEW_APPLOOK_2003:
00330     // enable Office 2003 look:
00331     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00332     break;
00333
00334   case ID_VIEW_APPLOOK_WIN_XP:
00335   // enable Windows XP look (in other OS Office XP look will be used):
00336     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00337     break;
00338
00339   case ID_VIEW_APPLOOK_VS2005:
00340     // enable VS.NET 2005 look:
00341     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00342     CDockingManager::SetDockingMode (DT_SMART);
00343     break;
00344
00345   case ID_VIEW_APPLOOK_2007:
00346     // enable Office 2007 look:
00347     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00348     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00349     break;
00350
00351   default:
00352     ASSERT (FALSE);
00353   }
00354
00355   m_wndTaskPane.RecalcLayout ();
00356
00357   // update form-view:
00358   CTasksPaneView* pView = (CTasksPaneView*) GetActiveView ();
00359   ASSERT_VALID (pView);
00360
00361   pView->m_nVisualManager = m_nAppLook - ID_VIEW_APPLOOK_2000;
00362   pView->UpdateData (FALSE);
00363 }
00364
00365 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00366 {
00367   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00368 }
00369
00370
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/targetver.h Source File

  • vc2008fp
  • TasksPane

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/EditToolbar.h Source File

  • internet
  • HTMLEdit

EditToolbar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #if !defined(AFX_EDITTOOLBAR_H__EB9EA714_DB7E_11D1_AD69_0060083E86DF__INCLUDED_)
00011 #define AFX_EDITTOOLBAR_H__EB9EA714_DB7E_11D1_AD69_0060083E86DF__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // EditToolbar.h : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CEditToolbar window
00021
00022 class CEditToolbar : public CToolBar
00023 {
00024 // Construction
00025 public:
00026   CEditToolbar();
00027   CComboBox m_fontNameCombo;
00028   CComboBox m_fontSizeCombo;
00029   CFont m_font;
00030
00031 // Attributes
00032 public:
00033
00034 // Operations
00035 public:
00036
00037 // Overrides
00038   // ClassWizard generated virtual function overrides
00039   //{{AFX_VIRTUAL(CEditToolbar)
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 public:
00044   virtual ~CEditToolbar();
00045
00046   // Generated message map functions
00047 protected:
00048   //{{AFX_MSG(CEditToolbar)
00049   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00050   //}}AFX_MSG
00051
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056
00057 //{{AFX_INSERT_LOCATION}}
00058 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00059
00060 #endif // !defined(AFX_EDITTOOLBAR_H__EB9EA714_DB7E_11D1_AD69_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.h Source File

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePickerDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #if !defined(AFX_TOOLBARDATETIMEPICKERDOC_H__59449EAA_D51E_42FC_8364_38B835B1AC28__INCLUDED_)
00012 #define AFX_TOOLBARDATETIMEPICKERDOC_H__59449EAA_D51E_42FC_8364_38B835B1AC28__INCLUDED_
00013
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif // _MSC_VER > 1000
00017
00018
00019 class CToolbarDateTimePickerDoc : public CDocument
00020 {
00021 protected: // create from serialization only
00022   CToolbarDateTimePickerDoc();
00023   DECLARE_DYNCREATE(CToolbarDateTimePickerDoc)
00024
00025 // Attributes
00026 public:
00027
00028 // Operations
00029 public:
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CToolbarDateTimePickerDoc)
00034   public:
00035   virtual BOOL OnNewDocument();
00036   virtual void Serialize(CArchive& ar);
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 public:
00041   virtual ~CToolbarDateTimePickerDoc();
00042 #ifdef _DEBUG
00043   virtual void AssertValid() const;
00044   virtual void Dump(CDumpContext& dc) const;
00045 #endif
00046
00047 protected:
00048
00049 // Generated message map functions
00050 protected:
00051   //{{AFX_MSG(CToolbarDateTimePickerDoc)
00052     // NOTE - the ClassWizard will add and remove member functions here.
00053     //    DO NOT EDIT what you see in these blocks of generated code !
00054   //}}AFX_MSG
00055   DECLARE_MESSAGE_MAP()
00056 };
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059
00060 //{{AFX_INSERT_LOCATION}}
00061 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00062
00063 #endif // !defined(AFX_TOOLBARDATETIMEPICKERDOC_H__59449EAA_D51E_42FC_8364_38B835B1AC28__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/mainfrm.cpp Source File

  • general
  • docktool

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "docktool.h"
00014 #include "tooldlg.h"
00015
00016 #include "mainfrm.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030   ON_WM_CREATE()
00031   ON_COMMAND(ID_TOOLS_TOOLBAR, OnToolsToolbar)
00032   ON_COMMAND(ID_BROWSE_CLASSGRAPH, OnMenuSelection)
00033   ON_WM_CLOSE()
00034   ON_COMMAND(ID_BROWSE_FILEOUTLINE, OnMenuSelection)
00035   ON_COMMAND(ID_BROWSE_GOTODEFINITION, OnMenuSelection)
00036   ON_COMMAND(ID_BROWSE_GOTOREFERENCE, OnMenuSelection)
00037   ON_COMMAND(ID_BROWSE_REVERSECLASSGRAPH, OnMenuSelection)
00038   ON_COMMAND(ID_DEBUG_CALLSTACK, OnMenuSelection)
00039   ON_COMMAND(ID_DEBUG_DISASSEMBLY, OnMenuSelection)
00040   ON_COMMAND(ID_DEBUG_LOCALS, OnMenuSelection)
00041   ON_COMMAND(ID_DEBUG_MEMORY, OnMenuSelection)
00042   ON_COMMAND(ID_DEBUG_QUICKWATCH, OnMenuSelection)
00043   ON_COMMAND(ID_DEBUG_REGISTERS, OnMenuSelection)
00044   ON_COMMAND(ID_DEBUG_RESTART, OnMenuSelection)
00045   ON_COMMAND(ID_DEBUG_RUNTOCURSOR, OnMenuSelection)
00046   ON_COMMAND(ID_DEBUG_STEPINTO, OnMenuSelection)
00047   ON_COMMAND(ID_DEBUG_STEPOUT, OnMenuSelection)
00048   ON_COMMAND(ID_DEBUG_STEPOVER, OnMenuSelection)
00049   ON_COMMAND(ID_DEBUG_STOPDEBUGGING, OnMenuSelection)
00050   ON_COMMAND(ID_DEBUG_WATCH, OnMenuSelection)
00051   ON_COMMAND(ID_EDIT_BM_CLEARALL, OnMenuSelection)
00052   ON_COMMAND(ID_EDIT_BM_NEXT, OnMenuSelection)
00053   ON_COMMAND(ID_EDIT_BM_PREV, OnMenuSelection)
00054   ON_COMMAND(ID_EDIT_BM_TOGGLE, OnMenuSelection)
00055   ON_COMMAND(ID_EDIT_COPY, OnMenuSelection)
00056   ON_COMMAND(ID_EDIT_CUT, OnMenuSelection)
00057   ON_COMMAND(ID_EDIT_FINDINFILES, OnMenuSelection)
00058   ON_COMMAND(ID_EDIT_INDENT, OnMenuSelection)
00059   ON_COMMAND(ID_EDIT_PASTE, OnMenuSelection)
00060   ON_COMMAND(ID_EDIT_UNDO, OnMenuSelection)
00061   ON_COMMAND(ID_EDIT_UNINDENT, OnMenuSelection)
00062   ON_COMMAND(ID_PALETTE_AIRBRUSH, OnMenuSelection)
00063   ON_COMMAND(ID_PALETTE_BRUSH, OnMenuSelection)
00064   ON_COMMAND(ID_PALETTE_ERASE, OnMenuSelection)
00065   ON_COMMAND(ID_PALETTE_EYEDROP, OnMenuSelection)
00066   ON_COMMAND(ID_PALETTE_FILL, OnMenuSelection)
00067   ON_COMMAND(ID_PALETTE_FRAME, OnMenuSelection)
00068   ON_COMMAND(ID_PALETTE_LINE, OnMenuSelection)
00069   ON_COMMAND(ID_PALETTE_OVAL, OnMenuSelection)
00070   ON_COMMAND(ID_PALETTE_PEN, OnMenuSelection)
00071   ON_COMMAND(ID_PALETTE_RECTANGLE, OnMenuSelection)
00072   ON_COMMAND(ID_PALETTE_SELECT, OnMenuSelection)
00073   ON_COMMAND(ID_PALETTE_ZOOM, OnMenuSelection)
00074   ON_COMMAND(ID_RESOURCE_NEWACCELERATORTABLE, OnMenuSelection)
00075   ON_COMMAND(ID_RESOURCE_NEWBITMAP, OnMenuSelection)
00076   ON_COMMAND(ID_RESOURCE_NEWCURSOR, OnMenuSelection)
00077   ON_COMMAND(ID_RESOURCE_NEWICON, OnMenuSelection)
00078   ON_COMMAND(ID_RESOURCE_NEWMENU, OnMenuSelection)
00079   ON_COMMAND(ID_RESOURCE_NEWSTRINGTABLE, OnMenuSelection)
00080   ON_COMMAND(ID_RESOURCE_NEWVERSION, OnMenuSelection)
00081   ON_COMMAND(ID_EDIT_FIND, OnMenuSelection)
00082   //}}AFX_MSG_MAP
00083   // By making the Menu IDs that same as the ToolBar IDs
00084   // we can leverage off of code that is already provided
00085   // in MFCs implementation of CFrameWnd to check, uncheck
00086   // show and hide toolbars.
00087   ON_UPDATE_COMMAND_UI(IDW_BROWSE_BAR, OnUpdateControlBarMenu)
00088   ON_COMMAND_EX(IDW_BROWSE_BAR, OnBarCheck)
00089   ON_UPDATE_COMMAND_UI(IDW_DEBUG_BAR, OnUpdateControlBarMenu)
00090   ON_COMMAND_EX(IDW_DEBUG_BAR, OnBarCheck)
00091   ON_UPDATE_COMMAND_UI(IDW_EDIT_BAR, OnUpdateControlBarMenu)
00092   ON_COMMAND_EX(IDW_EDIT_BAR, OnBarCheck)
00093   ON_UPDATE_COMMAND_UI(IDW_PALETTE_BAR, OnUpdateControlBarMenu)
00094   ON_COMMAND_EX(IDW_PALETTE_BAR, OnBarCheck)
00095   ON_UPDATE_COMMAND_UI(IDW_RESOURCE_BAR, OnUpdateControlBarMenu)
00096   ON_COMMAND_EX(IDW_RESOURCE_BAR, OnBarCheck)
00097 END_MESSAGE_MAP()
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // arrays of IDs used to initialize control bars
00101
00102 // toolbar buttons - IDs are command buttons
00103 static UINT BASED_CODE MainButtons[] =
00104 {
00105   // same order as in the bitmap 'toolbar.bmp'
00106   ID_FILE_NEW,
00107   ID_FILE_OPEN,
00108   ID_FILE_SAVE,
00109     ID_SEPARATOR,
00110   ID_EDIT_CUT,
00111   ID_EDIT_COPY,
00112   ID_EDIT_PASTE,
00113 };
00114 static UINT BASED_CODE ResourceButtons[] =
00115 {
00116   // same order as in the bitmap 'toolbar.bmp'
00117   ID_RESOURCE_NEWMENU,
00118   ID_RESOURCE_NEWCURSOR,
00119   ID_RESOURCE_NEWICON,
00120   ID_RESOURCE_NEWBITMAP,
00121   ID_RESOURCE_NEWSTRINGTABLE,
00122   ID_RESOURCE_NEWACCELERATORTABLE,
00123   ID_RESOURCE_NEWVERSION,
00124 };
00125 static UINT BASED_CODE DebugButtons[] =
00126 {
00127   // same order as in the bitmap 'toolbar.bmp'
00128   ID_DEBUG_RESTART,
00129   ID_DEBUG_STOPDEBUGGING,
00130   ID_DEBUG_STEPINTO,
00131   ID_DEBUG_STEPOUT,
00132   ID_DEBUG_STEPOVER,
00133   ID_DEBUG_RUNTOCURSOR,
00134   ID_DEBUG_QUICKWATCH,
00135   ID_DEBUG_WATCH,
00136   ID_DEBUG_LOCALS,
00137   ID_DEBUG_REGISTERS,
00138   ID_DEBUG_MEMORY,
00139   ID_DEBUG_CALLSTACK,
00140   ID_DEBUG_DISASSEMBLY,
00141 };
00142 static UINT BASED_CODE BrowseButtons[] =
00143 {
00144   // same order as in the bitmap 'toolbar.bmp'
00145   ID_BROWSE_GOTODEFINITION,
00146   ID_BROWSE_GOTOREFERENCE,
00147   ID_BROWSE_FILEOUTLINE,
00148   ID_BROWSE_CLASSGRAPH,
00149   ID_BROWSE_REVERSECLASSGRAPH,
00150 };
00151
00152 static UINT BASED_CODE PaletteButtons[] =
00153 {
00154   // same order as in the bitmap 'toolbar.bmp'
00155   ID_PALETTE_ERASE,
00156   ID_PALETTE_PEN,
00157   ID_PALETTE_SELECT,
00158   ID_PALETTE_BRUSH,
00159   ID_PALETTE_AIRBRUSH,
00160   ID_PALETTE_FILL,
00161   ID_PALETTE_LINE,
00162   ID_PALETTE_EYEDROP,
00163   ID_PALETTE_ZOOM,
00164   ID_PALETTE_RECTANGLE,
00165   ID_PALETTE_FRAME,
00166   ID_PALETTE_OVAL,
00167 };
00168
00169 static UINT BASED_CODE indicators[] =
00170 {
00171   ID_SEPARATOR,           // status line indicator
00172   ID_INDICATOR_CAPS,
00173   ID_INDICATOR_NUM,
00174   ID_INDICATOR_SCRL,
00175 };
00176
00177 /////////////////////////////////////////////////////////////////////////////
00178 // Helpers for saving/restoring window state
00179
00180 static TCHAR BASED_CODE szSection[] = _T("Settings");
00181 static TCHAR BASED_CODE szWindowPos[] = _T("WindowPos");
00182 static TCHAR szFormat[] = _T("%u,%u,%d,%d,%d,%d,%d,%d,%d,%d");
00183
00184 static BOOL PASCAL NEAR ReadWindowPlacement(LPWINDOWPLACEMENT pwp)
00185 {
00186   CString strBuffer = AfxGetApp()->GetProfileString(szSection, szWindowPos);
00187   if (strBuffer.IsEmpty())
00188     return FALSE;
00189
00190   WINDOWPLACEMENT wp;
00191   int nRead = _stscanf_s(strBuffer, szFormat,
00192     &wp.flags, &wp.showCmd,
00193     &wp.ptMinPosition.x, &wp.ptMinPosition.y,
00194     &wp.ptMaxPosition.x, &wp.ptMaxPosition.y,
00195     &wp.rcNormalPosition.left, &wp.rcNormalPosition.top,
00196     &wp.rcNormalPosition.right, &wp.rcNormalPosition.bottom);
00197
00198   if (nRead != 10)
00199     return FALSE;
00200
00201   wp.length = sizeof wp;
00202   *pwp = wp;
00203   return TRUE;
00204 }
00205
00206 static void PASCAL NEAR WriteWindowPlacement(LPWINDOWPLACEMENT pwp)
00207   // write a window placement to settings section of app's ini file
00208 {
00209     CString strBuffer;
00210
00211     strBuffer.Format(szFormat,
00212         pwp->flags, pwp->showCmd,
00213         pwp->ptMinPosition.x, pwp->ptMinPosition.y,
00214         pwp->ptMaxPosition.x, pwp->ptMaxPosition.y,
00215         pwp->rcNormalPosition.left, pwp->rcNormalPosition.top,
00216         pwp->rcNormalPosition.right, pwp->rcNormalPosition.bottom);
00217
00218     AfxGetApp()->WriteProfileString(szSection, szWindowPos, strBuffer);
00219 }
00220
00221 /////////////////////////////////////////////////////////////////////////////
00222 // CMainFrame construction/destruction
00223
00224 CMainFrame::CMainFrame()
00225 {
00226 }
00227
00228 CMainFrame::~CMainFrame()
00229 {
00230 }
00231
00232 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00233 {
00234   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00235     return -1;
00236
00237   WINDOWPLACEMENT wp;
00238   if (ReadWindowPlacement(&wp))
00239     SetWindowPlacement(&wp);
00240
00241   m_bColor = (AfxGetApp()->GetProfileInt(_T("General"),_T("Color"),1)!=0);
00242   m_bToolTips = (AfxGetApp()->GetProfileInt(_T("General"),_T("ToolTips"),1)!=0);
00243
00244   if (!m_wndMainBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_DYNAMIC |
00245       CBRS_TOP | ((m_bToolTips)?(CBRS_TOOLTIPS | CBRS_FLYBY):0), IDW_MAIN_BAR) ||
00246     !m_wndMainBar.LoadBitmap(
00247       (m_bColor)?IDR_COLOR_MAINBAR:IDR_MONO_MAINBAR) ||
00248     !m_wndMainBar.SetButtons(MainButtons, sizeof(MainButtons)/sizeof(UINT)))
00249   {
00250     TRACE0("Failed to create mainbar\n");
00251     return -1;      // fail to create
00252   }
00253   if (!m_wndResourceBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_DYNAMIC |
00254       CBRS_TOP | ((m_bToolTips)?(CBRS_TOOLTIPS | CBRS_FLYBY):0), IDW_RESOURCE_BAR) ||
00255     !m_wndResourceBar.LoadBitmap(
00256       (m_bColor)?IDR_COLOR_RESOURCEBAR:IDR_MONO_RESOURCEBAR) ||
00257     !m_wndResourceBar.SetButtons(ResourceButtons, sizeof(ResourceButtons)/sizeof(UINT)))
00258   {
00259     TRACE0("Failed to create resourcebar\n");
00260     return -1;      // fail to create
00261   }
00262   if (!m_wndDebugBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_DYNAMIC |
00263       CBRS_TOP | ((m_bToolTips)?(CBRS_TOOLTIPS | CBRS_FLYBY):0), IDW_DEBUG_BAR) ||
00264     !m_wndDebugBar.LoadBitmap(
00265       (m_bColor)?IDR_COLOR_DEBUGBAR:IDR_MONO_DEBUGBAR) ||
00266     !m_wndDebugBar.SetButtons(DebugButtons, sizeof(DebugButtons)/sizeof(UINT)))
00267   {
00268     TRACE0("Failed to create debugbar\n");
00269     return -1;      // fail to create
00270   }
00271   if (!m_wndEditBar.Init(this,m_bColor,m_bToolTips))
00272   {
00273     TRACE0("Failed to create editbar\n");
00274     return -1;      // fail to create
00275   }
00276   if (!m_wndBrowseBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_DYNAMIC |
00277       CBRS_TOP | ((m_bToolTips)?(CBRS_TOOLTIPS | CBRS_FLYBY):0), IDW_BROWSE_BAR) ||
00278     !m_wndBrowseBar.LoadBitmap(
00279       (m_bColor)?IDR_COLOR_BROWSEBAR:IDR_MONO_BROWSEBAR) ||
00280     !m_wndBrowseBar.SetButtons(BrowseButtons, sizeof(BrowseButtons)/sizeof(UINT)))
00281   {
00282     TRACE0("Failed to create browsebar\n");
00283     return -1;      // fail to create
00284   }
00285
00286   if (!m_wndPaletteBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_FIXED |
00287       CBRS_TOP | ((m_bToolTips)?(CBRS_TOOLTIPS | CBRS_FLYBY):0), IDW_PALETTE_BAR) ||
00288     !m_wndPaletteBar.LoadBitmap(
00289       (m_bColor)?IDR_COLOR_PALETTEBAR:IDR_MONO_PALETTEBAR) ||
00290     !m_wndPaletteBar.SetButtons(PaletteButtons, sizeof(PaletteButtons)/sizeof(UINT)))
00291   {
00292     TRACE0("Failed to create palettebar\n");
00293     return -1;      // fail to create
00294   }
00295
00296   if (!m_wndStatusBar.Create(this) ||
00297     !m_wndStatusBar.SetIndicators(indicators,
00298       sizeof(indicators)/sizeof(UINT)))
00299   {
00300     TRACE0("Failed to create status bar\n");
00301     return -1;      // fail to create
00302   }
00303
00304   m_wndMainBar.SetWindowText(_T("Standard"));
00305   m_wndMainBar.EnableDocking(CBRS_ALIGN_ANY);
00306
00307   m_wndResourceBar.SetWindowText(_T("Resource"));
00308   m_wndResourceBar.EnableDocking(CBRS_ALIGN_ANY);
00309
00310   m_wndDebugBar.SetWindowText(_T("Debug"));
00311   m_wndDebugBar.EnableDocking(CBRS_ALIGN_ANY);
00312
00313   m_wndEditBar.SetWindowText(_T("Edit"));
00314   m_wndEditBar.EnableDocking(CBRS_ALIGN_ANY);
00315
00316   m_wndBrowseBar.SetWindowText(_T("Browse"));
00317   m_wndBrowseBar.EnableDocking(CBRS_ALIGN_ANY);
00318
00319   m_wndPaletteBar.SetWindowText(_T("Palette"));
00320   m_wndPaletteBar.EnableDocking(CBRS_ALIGN_ANY);
00321
00322   EnableDocking(CBRS_ALIGN_ANY);
00323
00324   DockControlBar(&m_wndMainBar,AFX_IDW_DOCKBAR_TOP);
00325   DockControlBarLeftOf(&m_wndEditBar,&m_wndMainBar);
00326   DockControlBarLeftOf(&m_wndBrowseBar,&m_wndEditBar);
00327
00328   DockControlBar(&m_wndResourceBar,AFX_IDW_DOCKBAR_BOTTOM);
00329   DockControlBarLeftOf(&m_wndDebugBar,&m_wndResourceBar);
00330
00331   DockControlBar(&m_wndPaletteBar,AFX_IDW_DOCKBAR_RIGHT);
00332
00333   // LoadBarState loads everything but the number of Columns in the Palette
00334   // we need to do that ourseleves.
00335   m_wndPaletteBar.SetColumns(AfxGetApp()->GetProfileInt(_T("General"),_T("Columns"),3));
00336   LoadBarState(_T("General"));
00337
00338   return 0;
00339 }
00340
00341 void CMainFrame::DockControlBarLeftOf(CToolBar* Bar,CToolBar* LeftOf)
00342 {
00343   CRect rect;
00344   DWORD dw;
00345   UINT n;
00346
00347   // get MFC to adjust the dimensions of all docked ToolBars
00348   // so that GetWindowRect will be accurate
00349   RecalcLayout();
00350   LeftOf->GetWindowRect(&rect);
00351   rect.OffsetRect(1,0);
00352   dw=LeftOf->GetBarStyle();
00353   n = 0;
00354   n = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n;
00355   n = (dw&CBRS_ALIGN_BOTTOM && n==0) ? AFX_IDW_DOCKBAR_BOTTOM : n;
00356   n = (dw&CBRS_ALIGN_LEFT && n==0) ? AFX_IDW_DOCKBAR_LEFT : n;
00357   n = (dw&CBRS_ALIGN_RIGHT && n==0) ? AFX_IDW_DOCKBAR_RIGHT : n;
00358
00359   // When we take the default parameters on rect, DockControlBar will dock
00360   // each Toolbar on a seperate line.  By calculating a rectangle, we in effect
00361   // are simulating a Toolbar being dragged to that location and docked.
00362   DockControlBar(Bar,n,&rect);
00363 }
00364
00365 /////////////////////////////////////////////////////////////////////////////
00366 // CMainFrame diagnostics
00367
00368 #ifdef _DEBUG
00369 void CMainFrame::AssertValid() const
00370 {
00371   CFrameWnd::AssertValid();
00372 }
00373
00374 void CMainFrame::Dump(CDumpContext& dc) const
00375 {
00376   CFrameWnd::Dump(dc);
00377 }
00378
00379 #endif //_DEBUG
00380
00381 /////////////////////////////////////////////////////////////////////////////
00382 // CMainFrame message handlers
00383
00384 void CMainFrame::OnToolsToolbar()
00385 {
00386   CToolDlg ToolDlg;
00387   UINT nColumns = m_wndPaletteBar.GetColumns();
00388   nColumns = (nColumns < 4) ? nColumns - 2: 3;
00389
00390   // If the style says the ToolBar is visible then it is visible.
00391   ToolDlg.m_bMain = ((m_wndMainBar.GetStyle() & WS_VISIBLE) != 0);
00392   ToolDlg.m_bResource = ((m_wndResourceBar.GetStyle() & WS_VISIBLE) != 0);
00393   ToolDlg.m_bDebug = ((m_wndDebugBar.GetStyle() & WS_VISIBLE) != 0);
00394   ToolDlg.m_bEdit = ((m_wndEditBar.GetStyle() & WS_VISIBLE) != 0);
00395   ToolDlg.m_bBrowse = ((m_wndBrowseBar.GetStyle() & WS_VISIBLE) != 0);
00396   ToolDlg.m_bPalette = ((m_wndPaletteBar.GetStyle() & WS_VISIBLE) != 0);
00397
00398   ToolDlg.m_nColumns = nColumns;
00399
00400   ToolDlg.m_nColor = (m_bColor) ? 0 : 1;
00401   ToolDlg.m_nToolTips = (m_bToolTips) ? 0 : 1;
00402
00403   if (IDOK == ToolDlg.DoModal())
00404   {
00405     ShowControlBar(&m_wndMainBar, ToolDlg.m_bMain, FALSE);
00406     ShowControlBar(&m_wndResourceBar, ToolDlg.m_bResource, FALSE);
00407     ShowControlBar(&m_wndDebugBar, ToolDlg.m_bDebug, FALSE);
00408     ShowControlBar(&m_wndEditBar, ToolDlg.m_bEdit, FALSE);
00409     ShowControlBar(&m_wndBrowseBar, ToolDlg.m_bBrowse, FALSE);
00410     ShowControlBar(&m_wndPaletteBar, ToolDlg.m_bPalette, FALSE);
00411     m_bToolTips = (ToolDlg.m_nToolTips==0);
00412     if (m_bToolTips)
00413     {
00414       m_wndMainBar.SetBarStyle(m_wndMainBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00415       m_wndResourceBar.SetBarStyle(m_wndResourceBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00416       m_wndDebugBar.SetBarStyle(m_wndDebugBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00417       m_wndEditBar.SetBarStyle(m_wndEditBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00418       m_wndBrowseBar.SetBarStyle(m_wndBrowseBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00419       m_wndPaletteBar.SetBarStyle(m_wndPaletteBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00420     }
00421     else
00422     {
00423       m_wndMainBar.SetBarStyle(m_wndMainBar.GetBarStyle() & ~(CBRS_TOOLTIPS | CBRS_FLYBY));
00424       m_wndResourceBar.SetBarStyle(m_wndResourceBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
00425       m_wndDebugBar.SetBarStyle(m_wndDebugBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
00426       m_wndEditBar.SetBarStyle(m_wndEditBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
00427       m_wndBrowseBar.SetBarStyle(m_wndBrowseBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
00428       m_wndPaletteBar.SetBarStyle(m_wndPaletteBar.GetBarStyle() & ~( CBRS_TOOLTIPS | CBRS_FLYBY));
00429     }
00430     nColumns = (ToolDlg.m_nColumns < 3) ? ToolDlg.m_nColumns + 2 : 6;
00431     m_wndPaletteBar.SetColumns(nColumns);
00432
00433     m_bColor = (ToolDlg.m_nColor==0);
00434
00435     if (m_bColor)
00436     {
00437       m_wndMainBar.LoadBitmap(IDR_COLOR_MAINBAR);
00438       m_wndResourceBar.LoadBitmap(IDR_COLOR_RESOURCEBAR);
00439       m_wndDebugBar.LoadBitmap(IDR_COLOR_DEBUGBAR);
00440       m_wndBrowseBar.LoadBitmap(IDR_COLOR_BROWSEBAR);
00441       m_wndPaletteBar.LoadBitmap(IDR_COLOR_PALETTEBAR);
00442     }
00443     else
00444     {
00445       m_wndMainBar.LoadBitmap(IDR_MONO_MAINBAR);
00446       m_wndResourceBar.LoadBitmap(IDR_MONO_RESOURCEBAR);
00447       m_wndDebugBar.LoadBitmap(IDR_MONO_DEBUGBAR);
00448       m_wndBrowseBar.LoadBitmap(IDR_MONO_BROWSEBAR);
00449       m_wndPaletteBar.LoadBitmap(IDR_MONO_PALETTEBAR);
00450     }
00451     m_wndEditBar.SetColor(m_bColor);
00452
00453     m_wndMainBar.Invalidate();
00454     m_wndResourceBar.Invalidate();
00455     m_wndDebugBar.Invalidate();
00456     m_wndBrowseBar.Invalidate();
00457     m_wndPaletteBar.Invalidate();
00458     m_wndEditBar.Invalidate();
00459   }
00460 }
00461
00462 void CMainFrame::OnMenuSelection()
00463 {
00464   // This sample doesn't do anything with button presses but a command handler
00465   // needs to be present for MFC to enable the buttons
00466 }
00467
00468 void CMainFrame::OnClose()
00469 {
00470   // SaveBarState saves everything but the number of Columns in the Palette
00471   // we need to do that ourseleves.
00472   SaveBarState(_T("General"));
00473   AfxGetApp()->WriteProfileInt(
00474     _T("General"),_T("Columns"),m_wndPaletteBar.GetColumns());
00475   AfxGetApp()->WriteProfileInt(
00476     _T("General"),_T("Color"),(m_bColor!=0));
00477   AfxGetApp()->WriteProfileInt(
00478     _T("General"),_T("ToolTips"),(m_bToolTips!=0));
00479
00480   WINDOWPLACEMENT wp;
00481   wp.length = sizeof wp;
00482   if (GetWindowPlacement(&wp))
00483   {
00484     wp.flags = 0;
00485     if (IsZoomed())
00486       wp.flags |= WPF_RESTORETOMAXIMIZED;
00487     // and write it to the .INI file
00488     WriteWindowPlacement(&wp);
00489   }
00490   CFrameWnd::OnClose();
00491 }
00492
00493 BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
00494 {
00495   if (pMsg->message == WM_RBUTTONDOWN)
00496   {
00497     CWnd* pWnd = CWnd::FromHandlePermanent(pMsg->hwnd);
00498     CControlBar* pBar = DYNAMIC_DOWNCAST(CControlBar, pWnd);
00499
00500     if (pBar != NULL)
00501      {
00502       CMenu Menu;
00503       CPoint pt;
00504
00505       pt.x = LOWORD(pMsg->lParam);
00506       pt.y = HIWORD(pMsg->lParam);
00507       pBar->ClientToScreen(&pt);
00508
00509       if (Menu.LoadMenu(IDR_TOOLBAR))
00510       {
00511         CMenu* pSubMenu = Menu.GetSubMenu(0);
00512
00513         if (pSubMenu!=NULL)
00514         {
00515           pSubMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,pt.x,pt.y,this);
00516         }
00517       }
00518     }
00519   }
00520   return CFrameWnd::PreTranslateMessage(pMsg);
00521 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/CImage.h Source File

  • general
  • SimpleImage

CImage.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // CImage.h : main header file for the CImage application
00011 //
00012 #pragma once
00013
00014 #ifndef __AFXWIN_H__
00015   #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 #include "resource.h"       // main symbols
00019
00020
00021 // CCImageApp:
00022 // See CImage.cpp for the implementation of this class
00023 //
00024
00025 class CCImageApp : public CWinApp
00026 {
00027 public:
00028   CCImageApp();
00029
00030
00031 // Overrides
00032 public:
00033   virtual BOOL InitInstance();
00034
00035 // Implementation
00036
00037 public:
00038   afx_msg void OnAppAbout();
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042 extern CCImageApp theApp;
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CircLib::_DCircEvents Member List

This is the complete list of members for CircLib::_DCircEvents, including all inherited members.
ClickIn(OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) | CircLib::_DCircEvents
ClickOut() | CircLib::_DCircEvents
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View1.cpp Source File

  • vc2008fp
  • TabbedView

View1.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013 #include "View1.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 static const CString strInfo =
00022   _T("This sample illustrates usage of CTabbedView class. To create a tabbed view, you need to:\r\n\r\n")
00023   _T("* Derive your view class from CTabbedView\r\n")
00024   _T("* Add OnCreate handler\r\n")
00025   _T("* Call AddView for each view\r\n\r\n")
00026   _T("Please note that you cannot add an existing view to the tabbed view, the framework creates all tabbed views.");
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CView1
00030
00031 IMPLEMENT_DYNCREATE(CView1, CScrollView)
00032
00033 CView1::CView1()
00034 {
00035 }
00036
00037 CView1::~CView1()
00038 {
00039 }
00040
00041
00042 BEGIN_MESSAGE_MAP(CView1, CScrollView)
00043   ON_WM_WINDOWPOSCHANGING()
00044   ON_WM_HSCROLL()
00045   ON_WM_ERASEBKGND()
00046 END_MESSAGE_MAP()
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CView1 drawing
00050
00051 void CView1::OnDraw(CDC* pDC)
00052 {
00053   const int iOffset = 20;
00054
00055   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00056   ASSERT (pFontOld != NULL);
00057
00058   CRect rectClient;
00059   GetClientRect (&rectClient);
00060
00061   CRect rectFill = rectClient;
00062   pDC->DPtoLP (&rectFill);
00063
00064   pDC->FillSolidRect (rectFill, ::GetSysColor (COLOR_WINDOW));
00065
00066   CRect rectText = rectClient;
00067   rectText.DeflateRect (iOffset, iOffset);
00068   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00069
00070   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00071               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00072
00073   CRect rectFrame = rectText;
00074   rectFrame.InflateRect (iOffset, iOffset);
00075
00076   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00077
00078   rectFrame.DeflateRect (1, 1);
00079   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00080           ::GetSysColor (COLOR_3DLIGHT));
00081
00082   rectFrame.DeflateRect (2, 2);
00083   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00084           ::GetSysColor (COLOR_3DLIGHT));
00085
00086   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00087   pDC->SetBkMode (TRANSPARENT);
00088
00089   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00090
00091   pDC->SelectObject (pFontOld);
00092 }
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // CView1 diagnostics
00096
00097 #ifdef _DEBUG
00098 void CView1::AssertValid() const
00099 {
00100   CScrollView::AssertValid();
00101 }
00102
00103 void CView1::Dump(CDumpContext& dc) const
00104 {
00105   CScrollView::Dump(dc);
00106 }
00107 #endif //_DEBUG
00108
00109 /////////////////////////////////////////////////////////////////////////////
00110 // CView1 message handlers
00111
00112 void CView1::OnInitialUpdate()
00113 {
00114   CScrollView::OnInitialUpdate();
00115
00116   SetScrollSizes (MM_TEXT, CSize (1000, 1000));
00117
00118   CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
00119   ASSERT_VALID (pTabWnd);
00120
00121   pTabWnd->SynchronizeScrollBar ();
00122 }
00123
00124 void CView1::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
00125 {
00126   CScrollView::OnWindowPosChanging(lpwndpos);
00127
00128   // Hide horizontal scrollbar:
00129   ShowScrollBar (SB_HORZ, FALSE);
00130   ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
00131 }
00132
00133 void CView1::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* /*pScrollBar*/)
00134 {
00135   CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
00136   ASSERT_VALID (pTabWnd);
00137
00138   CScrollView::OnHScroll(nSBCode, nPos, pTabWnd->GetScrollBar ());
00139 }
00140
00141 CScrollBar* CView1::GetScrollBarCtrl(int nBar) const
00142 {
00143   if (nBar == SB_HORZ)
00144   {
00145     CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
00146     ASSERT_VALID (pTabWnd);
00147
00148     return pTabWnd->GetScrollBar ();
00149   }
00150
00151   return CScrollView::GetScrollBarCtrl(nBar);
00152 }
00153
00154 BOOL CView1::OnEraseBkgnd(CDC* /*pDC*/)
00155 {
00156   return TRUE;
00157 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/BkfstPg.h Source File

  • general
  • snapvw

BkfstPg.h

Go to the documentation of this file.
00001 // BkfstPg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CBkfstPage dialog
00014
00015 class CBkfstPage : public CPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CBkfstPage)
00018
00019 // Construction
00020 public:
00021   CBkfstPage();
00022   ~CBkfstPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CBkfstPage)
00026   enum { IDD = IDD_BREAKFAST };
00027     // NOTE - ClassWizard will add data members here.
00028     //    DO NOT EDIT what you see in these blocks of generated code !
00029   //}}AFX_DATA
00030
00031
00032 // Overrides
00033   // ClassWizard generate virtual function overrides
00034   //{{AFX_VIRTUAL(CBkfstPage)
00035   protected:
00036   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 protected:
00041   // Generated message map functions
00042   //{{AFX_MSG(CBkfstPage)
00043   virtual BOOL OnInitDialog();
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046
00047 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page5.h Source File

  • vc2008fp
  • NewControls

Page5.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CMyListCtrl : public CMFCListCtrl
00013 {
00014   virtual COLORREF OnGetCellTextColor(int nRow, int nColum);
00015   virtual COLORREF OnGetCellBkColor(int nRow, int nColum);
00016   virtual HFONT OnGetCellFont(int nRow, int nColum, DWORD dwData = 0);
00017
00018   virtual int OnCompareItems(LPARAM lParam1, LPARAM lParam2, int iColumn);
00019
00020 public:
00021   BOOL m_bColor;
00022   BOOL m_bModifyFont;
00023 };
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CPage5 dialog
00027
00028 class CPage5 : public CMFCPropertyPage
00029 {
00030   friend class CMyListCtrl;
00031
00032   DECLARE_DYNCREATE(CPage5)
00033
00034 // Construction
00035 public:
00036   CPage5();
00037   ~CPage5();
00038
00039 // Dialog Data
00040   enum { IDD = IDD_PAGE5 };
00041   CButton m_btnExpandAll;
00042   CStatic m_wndPropListLocation;
00043   CMyListCtrl m_wndList;
00044   BOOL m_bDescrArea;
00045   BOOL m_bDotNetLook;
00046   BOOL m_bHeader;
00047   BOOL m_bMarkSortedColumn;
00048   BOOL m_bColor;
00049   BOOL m_bModifyFont;
00050   BOOL m_bPropListCustomColors;
00051   BOOL m_bPropListCategorized;
00052   BOOL m_bShowDragContext;
00053   BOOL m_bMarkChanged;
00054   BOOL m_bHideFontProps;
00055
00056 // Overrides
00057 protected:
00058   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00059
00060 // Implementation
00061 protected:
00062   virtual BOOL OnInitDialog();
00063
00064   afx_msg void OnHeader();
00065   afx_msg void OnDotNetLook();
00066   afx_msg void OnDescriptionArea();
00067   afx_msg void OnMarkSortedColumn();
00068   afx_msg void OnColorRows();
00069   afx_msg void OnModifyFont();
00070   afx_msg void OnPropListCustomColors();
00071   afx_msg void OnProplistExpandAll();
00072   afx_msg void OnProplistCategorized();
00073   afx_msg void OnProplistCategorized2();
00074   afx_msg void OnResetValues();
00075   afx_msg void OnMarkChanged();
00076   afx_msg void OnHideFontProps();
00077
00078   DECLARE_MESSAGE_MAP()
00079
00080   CMFCPropertyGridCtrl m_wndPropList;
00081   CImageList m_imageList;
00082
00083   CMFCPropertyGridProperty* pGroupFont;
00084 };
00085
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpindialCtrl Member List

This is the complete list of members for CSpindialCtrl, including all inherited members.
AboutBox() | CSpindialCtrl | [protected]
CSpindialCtrl() | CSpindialCtrl |
DECLARE_OLECREATE_EX(CSpindialCtrl) DECLARE_OLETYPELIB(CSpindialCtrl) DECLARE_PROPPAGEIDS(CSpindialCtrl) DECLARE_OLECTLTYPE(CSpindialCtrl) afx_msg void OnLButtonDown(UINT nFlags | CSpindialCtrl | [protected]
dispidNeedlePosition enum value | CSpindialCtrl |
DoPropExchange(CPropExchange *pPX) | CSpindialCtrl | [virtual]
eventidSpinPositive enum value | CSpindialCtrl |
FireSpinPositive() | CSpindialCtrl | [inline, protected]
GetNeedlePosition() | CSpindialCtrl | [protected]
m_needlePosition | CSpindialCtrl | [protected]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CSpindialCtrl | [virtual]
OnResetState() | CSpindialCtrl | [virtual]
point | CSpindialCtrl | [protected]
SetNeedlePosition(short nNewValue) | CSpindialCtrl | [protected]
SpinNeedlePosition() | CSpindialCtrl | [virtual]
~CSpindialCtrl() | CSpindialCtrl | [protected]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CModelessDialog Member List

This is the complete list of members for CModelessDialog, including all inherited members.
CModelessDialog() | CModelessDialog |
OnCancel() | CModelessDialog | [virtual]
OnOK() | CModelessDialog | [virtual]
PostNcDestroy() | CModelessDialog | [virtual]
~CModelessDialog() | CModelessDialog | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/targetver.h Source File

  • vc2008fp
  • PaletteDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/ToolsPalette.cpp Source File

  • vc2008fp
  • PaletteDemo

ToolsPalette.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "PaletteDemo.h"
00013 #include "ToolsPalette.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 const int nInfoHeight = 50; // Information area height
00022 const int nHorzMargin = 5;
00023 const int nVertMargin = 5;
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CToolsPalette
00027
00028 CToolsPalette::CToolsPalette()
00029 {
00030   m_nColumns = 2;
00031 }
00032
00033 CToolsPalette::~CToolsPalette()
00034 {
00035 }
00036
00037
00038 BEGIN_MESSAGE_MAP(CToolsPalette, CMFCToolBar)
00039 END_MESSAGE_MAP()
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CToolsPalette message handlers
00044
00045 CSize CToolsPalette::CalcSize (BOOL /*bVertDock*/)
00046 {
00047   // Calculate palette bar size. First, calculate bar width
00048   // according to the number of columns:
00049   int cx = GetColumnWidth () * m_nColumns;
00050
00051   // Now, wrap bar by width and calculate its height:
00052   int cy = WrapToolBar (cx) * GetRowHeight ();
00053
00054   // Add vertical and horizontal margins:
00055   return CSize (cx + nHorzMargin * 2, cy + nInfoHeight + nVertMargin * 2);
00056 }
00057 //**********************************************************************************
00058 void CToolsPalette::AdjustLocations ()
00059 {
00060   CRect rectClient;
00061   GetClientRect (rectClient);
00062
00063   int x = rectClient.left + nHorzMargin;
00064   int y = rectClient.top + nVertMargin;
00065
00066   // Set buttons locations:
00067   for (POSITION pos = m_Buttons.GetHeadPosition (); pos != NULL;)
00068   {
00069     CMFCToolBarButton* pButton = (CMFCToolBarButton*) m_Buttons.GetNext (pos);
00070     ASSERT_VALID (pButton);
00071
00072     pButton->SetRect (CRect (CPoint (x, y), CSize (GetColumnWidth (), GetRowHeight ())));
00073
00074     if (pButton->m_bWrap && pos != NULL)
00075     {
00076       // Start next row:
00077       y += GetRowHeight ();
00078       x = rectClient.left + nHorzMargin;
00079     }
00080     else
00081     {
00082       // Move to the next column:
00083       x += GetColumnWidth ();
00084     }
00085   }
00086
00087   // Set info. area rectangle (at the bottom of bar):
00088   if (y + GetRowHeight () < rectClient.bottom)
00089   {
00090     m_rectInfo = rectClient;
00091     m_rectInfo.top = y + GetRowHeight ();
00092     m_rectInfo.DeflateRect (nHorzMargin, nVertMargin);
00093   }
00094   else
00095   {
00096     m_rectInfo.SetRectEmpty ();
00097   }
00098 }
00099 //**********************************************************************************
00100 void CToolsPalette::SetColumns (int nColumns)
00101 {
00102   m_nColumns = nColumns;
00103
00104   if (GetSafeHwnd () != NULL && GetParentFrame () != NULL)
00105   {
00106     GetParentFrame ()->RecalcLayout ();
00107   }
00108 }
00109 //**********************************************************************************
00110 void CToolsPalette::DoPaint(CDC* pDC)
00111 {
00112   CMFCToolBar::DoPaint (pDC);
00113
00114   //-----------------------
00115   // Draw information area:
00116   //-----------------------
00117   if (m_rectInfo.Height () > 10)
00118   {
00119     pDC->Draw3dRect (m_rectInfo,  afxGlobalData.clrBarShadow,
00120                     afxGlobalData.clrBarHilite);
00121
00122     CFont* pOldFont = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00123     pDC->SetBkMode (TRANSPARENT);
00124
00125     pDC->DrawText (CString (_T("Info")), m_rectInfo, DT_VCENTER | DT_CENTER | DT_SINGLELINE);
00126
00127     pDC->SelectObject (pOldFont);
00128   }
00129 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.cpp Source File

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePickerView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "ToolbarDateTimePicker.h"
00013
00014 #include "ToolbarDateTimePickerDoc.h"
00015 #include "ToolbarDateTimePickerView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const CString strInfo =
00024   _T("This sample illustrates how to use a date/time picker integrated with the toolbar control.\r\n\r\n")
00025   _T("The project was generated by Application Wizard\r\n")
00026   _T("Please note //----Example----// comments in the example source code\r\n");
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CToolbarDateTimePickerView
00030
00031 IMPLEMENT_DYNCREATE(CToolbarDateTimePickerView, CView)
00032
00033 BEGIN_MESSAGE_MAP(CToolbarDateTimePickerView, CView)
00034   //{{AFX_MSG_MAP(CToolbarDateTimePickerView)
00035     // NOTE - the ClassWizard will add and remove mapping macros here.
00036     //    DO NOT EDIT what you see in these blocks of generated code!
00037   //}}AFX_MSG_MAP
00038   ON_WM_CONTEXTMENU()
00039   // Standard printing commands
00040   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00041   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00042   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CToolbarDateTimePickerView construction/destruction
00047
00048 CToolbarDateTimePickerView::CToolbarDateTimePickerView()
00049 {
00050   // TODO: add construction code here
00051
00052 }
00053
00054 CToolbarDateTimePickerView::~CToolbarDateTimePickerView()
00055 {
00056 }
00057
00058 BOOL CToolbarDateTimePickerView::PreCreateWindow(CREATESTRUCT& cs)
00059 {
00060   // TODO: Modify the Window class or styles here by modifying
00061   //  the CREATESTRUCT cs
00062
00063   return CView::PreCreateWindow(cs);
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CToolbarDateTimePickerView drawing
00068
00069 void CToolbarDateTimePickerView::OnDraw(CDC* pDC)
00070 {
00071   CToolbarDateTimePickerDoc* pDoc = GetDocument();
00072   ASSERT_VALID(pDoc);
00073
00074   const int iOffset = 20;
00075
00076   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00077   ASSERT (pFontOld != NULL);
00078
00079   CRect rectClient;
00080   GetClientRect (&rectClient);
00081
00082   CRect rectText = rectClient;
00083   rectText.DeflateRect (iOffset, iOffset);
00084   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00085
00086   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00087               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00088
00089   CRect rectFrame = rectText;
00090   rectFrame.InflateRect (iOffset, iOffset);
00091
00092   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00093
00094   rectFrame.DeflateRect (1, 1);
00095   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00096           ::GetSysColor (COLOR_3DLIGHT));
00097
00098   rectFrame.DeflateRect (2, 2);
00099   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00100           ::GetSysColor (COLOR_3DLIGHT));
00101
00102   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00103   pDC->SetBkMode (TRANSPARENT);
00104
00105   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00106
00107   pDC->SelectObject (pFontOld);
00108 }
00109
00110 /////////////////////////////////////////////////////////////////////////////
00111 // CToolbarDateTimePickerView printing
00112
00113 void CToolbarDateTimePickerView::OnFilePrintPreview()
00114 {
00115   AFXPrintPreview (this);
00116 }
00117
00118 BOOL CToolbarDateTimePickerView::OnPreparePrinting(CPrintInfo* pInfo)
00119 {
00120   // default preparation
00121   return DoPreparePrinting(pInfo);
00122 }
00123
00124 void CToolbarDateTimePickerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00125 {
00126   // TODO: add extra initialization before printing
00127 }
00128
00129 void CToolbarDateTimePickerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00130 {
00131   // TODO: add cleanup after printing
00132 }
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CToolbarDateTimePickerView diagnostics
00136
00137 #ifdef _DEBUG
00138 void CToolbarDateTimePickerView::AssertValid() const
00139 {
00140   CView::AssertValid();
00141 }
00142
00143 void CToolbarDateTimePickerView::Dump(CDumpContext& dc) const
00144 {
00145   CView::Dump(dc);
00146 }
00147
00148 CToolbarDateTimePickerDoc* CToolbarDateTimePickerView::GetDocument() // non-debug version is inline
00149 {
00150   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CToolbarDateTimePickerDoc)));
00151   return (CToolbarDateTimePickerDoc*)m_pDocument;
00152 }
00153 #endif //_DEBUG
00154
00155 /////////////////////////////////////////////////////////////////////////////
00156 // CToolbarDateTimePickerView message handlers
00157
00158 void CToolbarDateTimePickerView::OnContextMenu(CWnd*, CPoint point)
00159 {
00160   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00161 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeDoc.cpp Source File

  • vc2008fp
  • SetPaneSize

SetPaneSizeDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "SetPaneSize.h"
00013
00014 #include "SetPaneSizeDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CSetPaneSizeDoc
00024
00025 IMPLEMENT_DYNCREATE(CSetPaneSizeDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CSetPaneSizeDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CSetPaneSizeDoc construction/destruction
00032
00033 CSetPaneSizeDoc::CSetPaneSizeDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CSetPaneSizeDoc::~CSetPaneSizeDoc()
00040 {
00041 }
00042
00043 BOOL CSetPaneSizeDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CSetPaneSizeDoc serialization
00058
00059 void CSetPaneSizeDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CSetPaneSizeDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CSetPaneSizeDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CSetPaneSizeDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CSetPaneSizeDoc commands
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNullLog Member List

This is the complete list of members for CNullLog, including all inherited members.
CLog() | CLog |
CNullLog() | CNullLog |
DECLARE_DYNAMIC(CNullLog) | CNullLog | [private]
operator<<(LPCTSTR pszString) | CNullLog | [virtual]
CLog::operator<<(COleVariant &var) | CLog |
CLog::operator<<(int n) | CLog |
~CLog() | CLog |
~CNullLog() | CNullLog |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/Resource.h Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by DllScreenCap.rc
00004 //
00005 #define IDD_CONFIG                      1000
00006 #define IDC_SCREEN                      1000
00007 #define IDC_WINDOW                      1001
00008 #define IDS_CONFIG_CAPTION              1001
00009 #define IDC_PATH                        1002
00010 #define IDC_BROWSE                      1003
00011
00012 // Next default values for new objects
00013 //
00014 #ifdef APSTUDIO_INVOKED
00015 #ifndef APSTUDIO_READONLY_SYMBOLS
00016 #define _APS_NEXT_RESOURCE_VALUE        1002
00017 #define _APS_NEXT_COMMAND_VALUE         32771
00018 #define _APS_NEXT_CONTROL_VALUE         1005
00019 #define _APS_NEXT_SYMED_VALUE           1000
00020 #endif
00021 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertySheet.h Source File

  • vc2008fp
  • PropSheetDemo

MyPropertySheet.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include "MyPropertyPage1.h"
00004
00005 /////////////////////////////////////////////////////////////////////////////
00006 // CMyPropertySheet
00007
00008 class CMyPropertySheet : public CMFCPropertySheet
00009 {
00010   DECLARE_DYNAMIC(CMyPropertySheet)
00011
00012 // Construction
00013 public:
00014   CMyPropertySheet(CMFCPropertySheet::PropSheetLook look,
00015           UINT uiIconsResID = 0, int cxIcon = 0);
00016
00017 // Attributes
00018 public:
00019   CMyPropertyPage1 m_Page1;
00020   CMyPropertyPage2 m_Page2;
00021   CMyPropertyPage3 m_Page3;
00022   CMyPropertyPage4 m_Page4;
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   virtual void OnDrawPageHeader (CDC* pDC, int nPage, CRect rectHeader);
00029
00030 // Implementation
00031 public:
00032   virtual ~CMyPropertySheet();
00033
00034 protected:
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/StdAfx.cpp Source File

  • general
  • DBVList

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  DBVList.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStyleBar Member List

This is the complete list of members for CStyleBar, including all inherited members.
m_comboBox | CStyleBar
m_font | CStyleBar
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderView.cpp Source File

  • vc2008fp
  • Slider

SliderView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Slider.h"
00013
00014 #include "SliderDoc.h"
00015 #include "SliderView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const CString strInfo =
00024   _T("This sample illustrates how to put an external control on a CMFCToolBar.\r\n\r\n")
00025   _T("The following features are available:\r\n")
00026   _T("* Change control size and location in customization mode;\r\n")
00027   _T("* Ability to drag and drop control;\r\n")
00028   _T("* Context synchronization between different control copies");
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CSliderView
00032
00033 IMPLEMENT_DYNCREATE(CSliderView, CView)
00034
00035 BEGIN_MESSAGE_MAP(CSliderView, CView)
00036   // Standard printing commands
00037   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00038   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00039   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CSliderView construction/destruction
00044
00045 CSliderView::CSliderView()
00046 {
00047 }
00048
00049 CSliderView::~CSliderView()
00050 {
00051 }
00052
00053 BOOL CSliderView::PreCreateWindow(CREATESTRUCT& cs)
00054 {
00055   // TODO: Modify the Window class or styles here by modifying
00056   //  the CREATESTRUCT cs
00057
00058   return CView::PreCreateWindow(cs);
00059 }
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CSliderView drawing
00063
00064 void CSliderView::OnDraw(CDC* pDC)
00065 {
00066 //  CSliderDoc* pDoc = GetDocument();
00067 //  ASSERT_VALID(pDoc);
00068
00069   const int iOffset = 20;
00070
00071   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00072   ASSERT (pFontOld != NULL);
00073
00074   CRect rectClient;
00075   GetClientRect (&rectClient);
00076
00077   CRect rectText = rectClient;
00078   rectText.DeflateRect (iOffset, iOffset);
00079   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00080
00081   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00082               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00083
00084   CRect rectFrame = rectText;
00085   rectFrame.InflateRect (iOffset, iOffset);
00086
00087   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00088
00089   rectFrame.DeflateRect (1, 1);
00090   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00091           ::GetSysColor (COLOR_3DLIGHT));
00092
00093   rectFrame.DeflateRect (2, 2);
00094   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00095           ::GetSysColor (COLOR_3DLIGHT));
00096
00097   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00098   pDC->SetBkMode (TRANSPARENT);
00099
00100   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00101
00102   pDC->SelectObject (pFontOld);
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CSliderView printing
00107
00108 void CSliderView::OnFilePrintPreview()
00109 {
00110   AFXPrintPreview (this);
00111 }
00112
00113 BOOL CSliderView::OnPreparePrinting(CPrintInfo* pInfo)
00114 {
00115   // default preparation
00116   return DoPreparePrinting(pInfo);
00117 }
00118
00119 void CSliderView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00120 {
00121   // TODO: add extra initialization before printing
00122 }
00123
00124 void CSliderView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00125 {
00126   // TODO: add cleanup after printing
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CSliderView diagnostics
00131
00132 #ifdef _DEBUG
00133 void CSliderView::AssertValid() const
00134 {
00135   CView::AssertValid();
00136 }
00137
00138 void CSliderView::Dump(CDumpContext& dc) const
00139 {
00140   CView::Dump(dc);
00141 }
00142
00143 CSliderDoc* CSliderView::GetDocument() // non-debug version is inline
00144 {
00145   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSliderDoc)));
00146   return (CSliderDoc*)m_pDocument;
00147 }
00148 #endif //_DEBUG
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CSliderView message handlers
00152
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIEDemoView Member List

This is the complete list of members for CIEDemoView, including all inherited members.
CIEDemoView() | CIEDemoView | [protected]
GetDocument() | CIEDemoView | [inline]
OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray &baPostedData, LPCTSTR lpszHeaders, BOOL *pbCancel) | CIEDemoView | [virtual]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CIEDemoView | [protected, virtual]
OnDestroy() | CIEDemoView | [protected]
OnDocumentComplete(LPCTSTR lpszURL) | CIEDemoView | [virtual]
OnDraw(CDC *pDC) | CIEDemoView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CIEDemoView | [protected, virtual]
OnFileOpen() | CIEDemoView | [protected]
OnGoBack() | CIEDemoView | [protected]
OnGoForward() | CIEDemoView | [protected]
OnGoSearchTheWeb() | CIEDemoView | [protected]
OnGoStartPage() | CIEDemoView | [protected]
OnInitialUpdate() | CIEDemoView | [virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CIEDemoView | [protected, virtual]
OnProgressChange(long nProgress, long nProgressMax) | CIEDemoView | [virtual]
OnTitleChange(LPCTSTR lpszText) | CIEDemoView | [virtual]
OnUpdateGoBack(CCmdUI *pCmdUI) | CIEDemoView | [protected]
OnUpdateGoForward(CCmdUI *pCmdUI) | CIEDemoView | [protected]
OnViewFontsLarge() | CIEDemoView | [protected]
OnViewFontsLargest() | CIEDemoView | [protected]
OnViewFontsMedium() | CIEDemoView | [protected]
OnViewFontsSmall() | CIEDemoView | [protected]
OnViewFontsSmallest() | CIEDemoView | [protected]
OnViewRefresh() | CIEDemoView | [protected]
OnViewStop() | CIEDemoView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CIEDemoView | [virtual]
~CIEDemoView() | CIEDemoView | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CObjectData Member List

This is the complete list of members for CObjectData, including all inherited members.
CObjectData() | CObjectData |
CreateInstance(DWORD clsctx) | CObjectData |
m_clsid | CObjectData |
m_nType | CObjectData |
m_pcf | CObjectData |
m_punk | CObjectData |
m_szProgID | CObjectData |
m_uiBitmap | CObjectData |
m_wMajorVer | CObjectData |
m_wMinorVer | CObjectData |
Release() | CObjectData |
typeInterface enum value | CObjectData |
typeObject enum value | CObjectData |
typeStaticInterface enum value | CObjectData |
typeTypeLib enum value | CObjectData |
typeUnknown enum value | CObjectData |
~CObjectData() | CObjectData | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCTrace.Cpp Source File

  • ole
  • TstCon

TCTrace.Cpp

Go to the documentation of this file.
00001 // File: TCTrace.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 static int g_nTraceLevel = TRACELEVEL_NORMAL;
00020
00021 int GetTraceLevel()
00022 {
00023    return( g_nTraceLevel );
00024 }
00025
00026 void SetTraceLevel( int nLevel )
00027 {
00028    g_nTraceLevel = nLevel;
00029 }
00030
00031 void __cdecl TCControlTrace( int nLevel, CTestContainer98Item* pItem,
00032    LPCTSTR pszFormat, ... )
00033 {
00034    va_list args;
00035    va_start( args, pszFormat );
00036
00037    int nBuf;
00038    TCHAR szBuffer[512];
00039    CString strItemName;
00040
00041    if( g_nTraceLevel < nLevel )
00042    {
00043     return;
00044    }
00045
00046    strItemName = pItem->GetDisplayName();
00047    sprintf_s( szBuffer, 512, "TestCon: %s: ", LPCTSTR( strItemName ) );
00048    OutputDebugString( szBuffer );
00049
00050    nBuf = _vstprintf_s( szBuffer, 512, pszFormat, args );
00051    ASSERT( nBuf < sizeof( szBuffer ) );
00052
00053    OutputDebugString( szBuffer );
00054
00055    va_end( args );
00056 }
00057
00058 void __cdecl TCTrace( int nLevel, LPCTSTR pszFormat, ... )
00059 {
00060    va_list args;
00061    va_start( args, pszFormat );
00062
00063    int nBuf;
00064    TCHAR szBuffer[512];
00065
00066    if( g_nTraceLevel < nLevel )
00067    {
00068     return;
00069    }
00070
00071    nBuf = _vstprintf_s( szBuffer, 512, pszFormat, args );
00072    ASSERT( nBuf < sizeof( szBuffer ) );
00073
00074    OutputDebugString( _T( "TestCon: " ) );
00075    OutputDebugString( szBuffer );
00076
00077    va_end( args );
00078 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar2.cpp Source File

  • vc2008fp
  • RibbonMDI

WorkspaceBar2.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014 #include "WorkspaceBar2.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 const int nBorderSize = 1;
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CWorkspaceBar2
00026
00027 BEGIN_MESSAGE_MAP(CWorkspaceBar2, CDockablePane)
00028   ON_WM_CREATE()
00029   ON_WM_SIZE()
00030   ON_WM_PAINT()
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CWorkspaceBar2 construction/destruction
00035
00036 CWorkspaceBar2::CWorkspaceBar2()
00037 {
00038   // TODO: add one-time construction code here
00039
00040 }
00041
00042 CWorkspaceBar2::~CWorkspaceBar2()
00043 {
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CWorkspaceBar2 message handlers
00048
00049 int CWorkspaceBar2::OnCreate(LPCREATESTRUCT lpCreateStruct)
00050 {
00051   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00052     return -1;
00053
00054   CRect rectDummy;
00055   rectDummy.SetRectEmpty ();
00056
00057   // Create tree windows.
00058   // TODO: create your own tab windows here:
00059   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
00060                 TVS_LINESATROOT | TVS_HASBUTTONS;
00061
00062   if (!m_wndTree.Create (dwViewStyle, rectDummy, this, 1))
00063   {
00064     TRACE0("Failed to create workspace view\n");
00065     return -1;      // fail to create
00066   }
00067
00068   // Setup trees content:
00069   HTREEITEM hRoot1 = m_wndTree.InsertItem (_T("Root 2"));
00070   m_wndTree.InsertItem (_T("Item 1"), hRoot1);
00071   m_wndTree.InsertItem (_T("Item 2"), hRoot1);
00072
00073   return 0;
00074 }
00075
00076 void CWorkspaceBar2::OnSize(UINT nType, int cx, int cy)
00077 {
00078   CDockablePane::OnSize(nType, cx, cy);
00079
00080   // Tab control should cover a whole client area:
00081   m_wndTree.SetWindowPos (NULL, nBorderSize, nBorderSize,
00082     cx - 2 * nBorderSize, cy - 2 * nBorderSize,
00083     SWP_NOACTIVATE | SWP_NOZORDER);
00084 }
00085
00086 void CWorkspaceBar2::OnPaint()
00087 {
00088   CPaintDC dc(this); // device context for painting
00089
00090   CRect rectTree;
00091   m_wndTree.GetWindowRect (rectTree);
00092   ScreenToClient (rectTree);
00093
00094   rectTree.InflateRect (nBorderSize, nBorderSize);
00095   dc.Draw3dRect (rectTree,  ::GetSysColor (COLOR_3DSHADOW),
00096                 ::GetSysColor (COLOR_3DSHADOW));
00097 }
00098
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerDoc.h Source File

  • vc2008fp
  • Explorer

ExplorerDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CExplorerDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CExplorerDoc();
00017   DECLARE_DYNCREATE(CExplorerDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CExplorerDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039
00040 protected:
00041   afx_msg void OnCommandHistory();
00042   afx_msg void OnGoBack();
00043   afx_msg void OnGoForward();
00044
00045   DECLARE_MESSAGE_MAP()
00046 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSwarm.h Source File

  • general
  • MMXSwarm

MMXSwarm.h

Go to the documentation of this file.
00001 // MMXSwarm.h : main header file for the MMXSwarm application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013
00014 #ifndef __AFXWIN_H__
00015   #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 #include "resource.h"       // main symbols
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMMXSwarmApp:
00022
00023 // See MMXSwarm.cpp for the implementation of this class
00024 //
00025 class CChildView;
00026
00027 class CMMXSwarmApp : public CWinApp
00028 {
00029 public:
00030   CMMXSwarmApp();
00031
00032 // Overrides
00033 public:
00034   virtual BOOL InitInstance();
00035   virtual BOOL OnIdle(LONG lCount);
00036
00037 // Implementation
00038 public:
00039   afx_msg void OnAppAbout();
00040   DECLARE_MESSAGE_MAP()
00041
00042 private:
00043   CChildView *m_pView; // For forwarding OnIdle()
00044 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CListHdrApp Member List

This is the complete list of members for CListHdrApp, including all inherited members.
CListHdrApp() | CListHdrApp |
InitInstance() | CListHdrApp | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRecalcView Member List

This is the complete list of members for CRecalcView, including all inherited members.
CRecalcView() | CRecalcView | [protected]
DoDataExchange(CDataExchange *pDX) | CRecalcView | [protected, virtual]
GetDocument() | CRecalcView | [inline]
IDD enum value | CRecalcView |
m_bFirstKillFocus | CRecalcView | [protected]
m_ctlSum | CRecalcView |
m_nInt1 | CRecalcView |
m_nInt2 | CRecalcView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CRecalcView | [protected, virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CRecalcView | [protected, virtual]
OnKillFocus() | CRecalcView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CRecalcView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *) | CRecalcView | [protected, virtual]
OnRecalcDone(WPARAM wParam, LPARAM lParam) | CRecalcView | [protected]
OnRecalcNowMsg(WPARAM wParam, LPARAM lParam) | CRecalcView | [protected]
OnRecalculateNow() | CRecalcView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CRecalcView | [protected, virtual]
~CRecalcView() | CRecalcView | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoView.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MSMoneyDemoView.cpp : implementation of the CMSMoneyDemoView class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMoneyDemo.h"
00015
00016 #include "MSMoneyDemoDoc.h"
00017 #include "MSMoneyDemoView.h"
00018
00019 #include "MainFrm.h"
00020
00021 #include "MSMVisualManager.h"
00022
00023 #ifdef _DEBUG
00024 #define new DEBUG_NEW
00025 #undef THIS_FILE
00026 static char THIS_FILE[] = __FILE__;
00027 #endif
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CMSMoneyDemoView
00031
00032 IMPLEMENT_DYNCREATE(CMSMoneyDemoView, CView)
00033
00034 BEGIN_MESSAGE_MAP(CMSMoneyDemoView, CView)
00035   ON_WM_ERASEBKGND()
00036   ON_WM_CREATE()
00037   // Standard printing commands
00038   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00039   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00040   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CMSMoneyDemoView construction/destruction
00045
00046 CMSMoneyDemoView::CMSMoneyDemoView()
00047 {
00048   // TODO: add construction code here
00049
00050 }
00051
00052 CMSMoneyDemoView::~CMSMoneyDemoView()
00053 {
00054   m_sizeImage = CSize (0, 0);
00055 }
00056
00057 BOOL CMSMoneyDemoView::PreCreateWindow(CREATESTRUCT& cs)
00058 {
00059   // TODO: Modify the Window class or styles here by modifying
00060   //  the CREATESTRUCT cs
00061   cs.style &= ~WS_BORDER;
00062   return CView::PreCreateWindow(cs);
00063 }
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CMSMoneyDemoView drawing
00067
00068 void CMSMoneyDemoView::OnDraw(CDC* pDCView)
00069 {
00070   CMemDC memDC (*pDCView, this);
00071   CDC* pDC = &memDC.GetDC ();
00072
00073   CRect rectClient;
00074   GetClientRect (rectClient);
00075
00076   pDC->FillSolidRect (rectClient, RGB (255, 255, 255));
00077
00078   pDC->DrawState (CPoint (20, 20), m_sizeImage, &m_Image, DSS_NORMAL);
00079 }
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CMSMoneyDemoView printing
00083
00084 BOOL CMSMoneyDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00085 {
00086   // default preparation
00087   return DoPreparePrinting(pInfo);
00088 }
00089
00090 void CMSMoneyDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00091 {
00092   // TODO: add extra initialization before printing
00093 }
00094
00095 void CMSMoneyDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00096 {
00097   // TODO: add cleanup after printing
00098 }
00099
00100 /////////////////////////////////////////////////////////////////////////////
00101 // CMSMoneyDemoView diagnostics
00102
00103 #ifdef _DEBUG
00104 void CMSMoneyDemoView::AssertValid() const
00105 {
00106   CView::AssertValid();
00107 }
00108
00109 void CMSMoneyDemoView::Dump(CDumpContext& dc) const
00110 {
00111   CView::Dump(dc);
00112 }
00113
00114 CMSMoneyDemoDoc* CMSMoneyDemoView::GetDocument() // non-debug version is inline
00115 {
00116   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMSMoneyDemoDoc)));
00117   return (CMSMoneyDemoDoc*)m_pDocument;
00118 }
00119 #endif //_DEBUG
00120
00121 /////////////////////////////////////////////////////////////////////////////
00122 // CMSMoneyDemoView message handlers
00123 // these are all simple one-liners to do simple controlling of the browser
00124
00125 BOOL CMSMoneyDemoView::OnEraseBkgnd(CDC* /*pDC*/)
00126 {
00127   return TRUE;
00128 }
00129
00130 int CMSMoneyDemoView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00131 {
00132   if (CView::OnCreate(lpCreateStruct) == -1)
00133     return -1;
00134
00135   m_Image.LoadBitmap (IDB_MSM_VIEW_BKGND);
00136
00137   BITMAP bitmap;
00138   m_Image.GetBitmap (&bitmap);
00139
00140   m_sizeImage = CSize (bitmap.bmWidth, bitmap.bmHeight);
00141   return 0;
00142 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTrayMenuDlg Member List

This is the complete list of members for CTrayMenuDlg, including all inherited members.
CTrayMenuDlg(CWnd *pParent=NULL) | CTrayMenuDlg |
DoDataExchange(CDataExchange *pDX) | CTrayMenuDlg | [protected, virtual]
IDD enum value | CTrayMenuDlg |
m_hIcon | CTrayMenuDlg | [protected]
m_nid | CTrayMenuDlg | [protected]
OnAppAbout() | CTrayMenuDlg | [protected]
OnAppExit() | CTrayMenuDlg | [protected]
OnAppOpen() | CTrayMenuDlg | [protected]
OnInitDialog() | CTrayMenuDlg | [protected, virtual]
OnItem1() | CTrayMenuDlg | [protected]
OnItem2() | CTrayMenuDlg | [protected]
OnItem3() | CTrayMenuDlg | [protected]
OnItem4() | CTrayMenuDlg | [protected]
OnPaint() | CTrayMenuDlg | [protected]
OnQueryDragIcon() | CTrayMenuDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CTrayMenuDlg | [protected]
OnTrayContextMenu() | CTrayMenuDlg | [protected]
OnTrayNotify(WPARAM wp, LPARAM lp) | CTrayMenuDlg | [protected]
OnUpdateItem4(CCmdUI *pCmdUI) | CTrayMenuDlg | [protected]
~CTrayMenuDlg() | CTrayMenuDlg | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRegistryView Member List

This is the complete list of members for CRegistryView, including all inherited members.
CRegistryView() | CRegistryView | [protected]
DoDataExchange(CDataExchange *pDX) | CRegistryView | [protected, virtual]
GetDocument() | CRegistryView | [inline]
IDD enum value | CRegistryView |
m_CLSID | CRegistryView |
m_icon | CRegistryView |
m_Name | CRegistryView |
m_tree | CRegistryView |
OnDeleteItemTreeView(NMHDR *pNMHDR, LRESULT *pResult) | CRegistryView | [protected]
OnGetDispInfoTreeView(NMHDR *pNMHDR, LRESULT *pResult) | CRegistryView | [protected]
OnInitialUpdate() | CRegistryView | [virtual]
OnSetDispInfoTreeView(NMHDR *pNMHDR, LRESULT *pResult) | CRegistryView | [protected]
OnSize(UINT nType, int cx, int cy) | CRegistryView | [protected]
OnTreeViewItemExpanding(NMHDR *pNMHDR, LRESULT *pResult) | CRegistryView | [protected]
OnUnregister() | CRegistryView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CRegistryView | [protected, virtual]
~CRegistryView() | CRegistryView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/StdAfx.h Source File

  • vc2008fp
  • SetPaneSize

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recalcvw.h Source File

  • advanced
  • mtrecalc

recalcvw.h

Go to the documentation of this file.
00001 // recalcvw.h : interface of the CRecalcView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define UPDATE_HINT_SUM 1
00013
00014 class CRecalcView : public CFormView
00015 {
00016 protected: // create from serialization only
00017   CRecalcView();
00018   DECLARE_DYNCREATE(CRecalcView)
00019
00020 public:
00021   //{{AFX_DATA(CRecalcView)
00022   enum { IDD = IDD_MTRECALC_FORM };
00023   CEdit   m_ctlSum;
00024   int     m_nInt1;
00025   int     m_nInt2;
00026   //}}AFX_DATA
00027
00028 // Attributes
00029 public:
00030   CRecalcDoc* GetDocument();
00031 protected:
00032   BOOL    m_bFirstKillFocus;  // to avoid multiple (infinite) validations on kill focus
00033
00034 // Operations
00035 public:
00036
00037   // ClassWizard generate virtual function overrides
00038   //{{AFX_VIRTUAL(CRecalcView)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00042   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00043   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00044   virtual void OnPrint(CDC* pDC, CPrintInfo*);
00045   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00046   //}}AFX_VIRTUAL
00047
00048 // Implementation
00049 public:
00050
00051   virtual ~CRecalcView();
00052 #ifdef _DEBUG
00053   virtual void AssertValid() const;
00054   virtual void Dump(CDumpContext& dc) const;
00055 #endif
00056
00057 protected:
00058
00059 // Generated message map functions
00060 protected:
00061   LRESULT OnRecalcDone(WPARAM wParam, LPARAM lParam);
00062   LRESULT OnRecalcNowMsg(WPARAM wParam, LPARAM lParam);
00063   //{{AFX_MSG(CRecalcView)
00064   afx_msg void OnKillFocus();
00065   afx_msg void OnRecalculateNow();
00066   //}}AFX_MSG
00067   DECLARE_MESSAGE_MAP()
00068 };
00069
00070 #ifndef _DEBUG  // debug version in recalcvw.cpp
00071 inline CRecalcDoc* CRecalcView::GetDocument()
00072    { return (CRecalcDoc*)m_pDocument; }
00073 #endif
00074
00075 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/stdafx.cpp Source File

  • general
  • ctrltest

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : pre-compiled header and types file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/CImage.cpp Source File

  • general
  • SimpleImage

CImage.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // CImage.cpp : Defines the class behaviors for the application.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "CImage.h"
00015 #include "MainFrm.h"
00016
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 // CCImageApp
00026
00027 BEGIN_MESSAGE_MAP(CCImageApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029 END_MESSAGE_MAP()
00030
00031
00032 // CCImageApp construction
00033
00034 CCImageApp::CCImageApp()
00035 {
00036   // TODO: add construction code here,
00037   // Place all significant initialization in InitInstance
00038 }
00039
00040
00041 // The one and only CCImageApp object
00042
00043 CCImageApp theApp;
00044
00045 // CCImageApp initialization
00046
00047 BOOL CCImageApp::InitInstance()
00048 {
00049   CWinApp::InitInstance();
00050
00051   // Initialize OLE libraries
00052   if (!AfxOleInit())
00053   {
00054     AfxMessageBox(IDP_OLE_INIT_FAILED);
00055     return FALSE;
00056   }
00057   AfxEnableControlContainer();
00058   // Standard initialization
00059   // If you are not using these features and wish to reduce the size
00060   // of your final executable, you should remove from the following
00061   // the specific initialization routines you do not need
00062   // Change the registry key under which our settings are stored
00063   // TODO: You should modify this string to be something appropriate
00064   // such as the name of your company or organization
00065   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00066   // To create the main window, this code creates a new frame window
00067   // object and then sets it as the application's main window object
00068   CMainFrame* pFrame = new CMainFrame;
00069   m_pMainWnd = pFrame;
00070   // create and load the frame with its resources
00071   pFrame->LoadFrame(IDR_MAINFRAME,
00072     WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
00073     NULL);
00074   // The one and only window has been initialized, so show and update it
00075   pFrame->ShowWindow(SW_SHOW);
00076   pFrame->UpdateWindow();
00077   // call DragAcceptFiles only if there's a suffix
00078   //  In an SDI app, this should occur after ProcessShellCommand
00079   return TRUE;
00080 }
00081
00082
00083 // CCImageApp message handlers
00084
00085
00086
00087 // CAboutDlg dialog used for App About
00088
00089 class CAboutDlg : public CDialog
00090 {
00091 public:
00092   CAboutDlg();
00093
00094 // Dialog Data
00095   enum { IDD = IDD_ABOUTBOX };
00096
00097 protected:
00098   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00099
00100 // Implementation
00101 protected:
00102   DECLARE_MESSAGE_MAP()
00103 };
00104
00105 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00106 {
00107 }
00108
00109 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00110 {
00111   CDialog::DoDataExchange(pDX);
00112 }
00113
00114 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00115 END_MESSAGE_MAP()
00116
00117 // App command to run the dialog
00118 void CCImageApp::OnAppAbout()
00119 {
00120   CAboutDlg aboutDlg;
00121   aboutDlg.DoModal();
00122 }
00123
00124
00125
00126 // CCImageApp message handlers
00127
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mainfrm.h Source File

  • general
  • dynamenu

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: interface of the CMainFrame class
00013 //
00014 // Functions:
00015 //   Most of this file was generated by AppWizard.  The functions
00016 //   which contain code specific to this sample are:
00017 //
00018 //      CMainFrame::OnSetMessageString()     -- update status bar text
00019 //
00020 //   These functions are implemented in mainfrm.cpp.
00021
00022 class CMainFrame : public CMDIFrameWnd
00023 {
00024   DECLARE_DYNAMIC(CMainFrame)
00025 public:
00026   CMainFrame();
00027
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035 protected:
00036   virtual void GetMessageString(UINT nID, CString& rMessage) const;
00037
00038 // Implementation
00039 public:
00040   virtual ~CMainFrame();
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:  // control bar embedded members
00047   CStatusBar  m_wndStatusBar;
00048   CToolBar    m_wndToolBar;
00049
00050 // Generated message map functions
00051 protected:
00052   //{{AFX_MSG(CMainFrame)
00053   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00054   afx_msg LRESULT OnSetMessageString(WPARAM wParam, LPARAM lParam);
00055   //}}AFX_MSG
00056   DECLARE_MESSAGE_MAP()
00057 };
00058
00059 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/bmpprop.cpp Source File

  • controls
  • IMAGE

bmpprop.cpp

Go to the documentation of this file.
00001 // BmpProp.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "image.h"
00014 #include "BmpProp.h"
00015 #include "ImageCtl.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 IMPLEMENT_DYNAMIC(CBitmapProperty, CDataPathProperty)
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CBitmapProperty
00027
00028 CBitmapProperty::CBitmapProperty(COleControl* pControl) : CDataPathProperty(pControl),
00029   m_dlState(dlNone)
00030 {
00031 }
00032
00033 CBitmapProperty::~CBitmapProperty()
00034 {
00035 }
00036
00037
00038 // Do not edit the following lines, which are needed by ClassWizard.
00039 #if 0
00040 BEGIN_MESSAGE_MAP(CBitmapProperty, CDataPathProperty)
00041   //{{AFX_MSG_MAP(CBitmapProperty)
00042   //}}AFX_MSG_MAP
00043 END_MESSAGE_MAP()
00044 #endif  // 0
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CBitmapProperty member functions
00048
00049 void CBitmapProperty::OnDataAvailable(DWORD dwSize, DWORD bscfFlag)
00050 {
00051   if (bscfFlag & BSCF_FIRSTDATANOTIFICATION)
00052     ResetData();
00053
00054   CDataPathProperty::OnDataAvailable(dwSize, bscfFlag);
00055
00056   if (dwSize <= m_cbRead)
00057     return;
00058   else
00059     dwSize -= m_cbRead;
00060   m_cbRead += dwSize;
00061
00062   BOOL bContinue = m_dlState != dlDone;
00063   while (bContinue)
00064   {
00065     switch (m_dlState)
00066     {
00067     case dlNone:
00068       // Try to read the bitmapfileheader.
00069       {
00070         BITMAPFILEHEADER bmfh;
00071         if (ReadStruct(dwSize, &bmfh, sizeof(bmfh)))
00072         {
00073           ASSERT(bmfh.bfType == ('B' | ('M' << 8)));
00074           m_dlState = dlFileHeader;
00075         }
00076         else
00077         {
00078           bContinue = FALSE;
00079           break;
00080         }
00081       }
00082       break;
00083
00084     case dlFileHeader:
00085       // Try to read the bitmapinfoheader.
00086       if (ReadStruct(dwSize, &m_bmInfo.bmiHeader, sizeof(m_bmInfo.bmiHeader)))
00087       {
00088         // Now we know the image size.
00089         m_BitmapSize.cx = m_bmInfo.bmiHeader.biWidth;
00090         m_BitmapSize.cy = m_bmInfo.bmiHeader.biHeight;
00091         ASSERT_KINDOF(CImageCtrl, GetControl());
00092         ((CImageCtrl*)GetControl())->InformSize();
00093
00094         m_dlState = dlInfoHeader;
00095       }
00096       else
00097       {
00098         bContinue = FALSE;
00099         break;
00100       }
00101       break;
00102
00103     case dlInfoHeader:
00104       // Read the color table.
00105       if (ReadStruct(dwSize, &m_bmInfo.bmiColors,
00106         sizeof(RGBQUAD) * ((int)(1 << m_bmInfo.bmiHeader.biBitCount))))
00107       {
00108         // Create the bitmap.
00109         CWindowDC screenDC(NULL);
00110         m_Bitmap.CreateCompatibleBitmap(&screenDC, m_BitmapSize.cx, m_BitmapSize.cy);
00111
00112         m_dlState =  dlColorTable;
00113       }
00114       else
00115       {
00116         bContinue = FALSE;
00117         break;
00118       }
00119       break;
00120
00121     case dlColorTable:
00122       // Read some pels.
00123       {
00124         BYTE* pb = NULL;
00125         int nLines = ReadArray(dwSize, (void **)&pb,
00126           ((((m_bmInfo.bmiHeader.biBitCount * m_BitmapSize.cx) + 31) / 32) * 4),
00127             m_BitmapSize.cy - m_nScanLine);
00128         if (nLines > 0)
00129         {
00130           CWindowDC screenDC(NULL);
00131           CDC dc;
00132           dc.CreateCompatibleDC(&screenDC);
00133           CBitmap* pBitmap;
00134
00135           pBitmap = dc.SelectObject(&m_Bitmap);
00136           SetDIBits(dc.m_hDC, (HBITMAP)m_Bitmap.m_hObject, m_nScanLine, nLines,
00137                  pb, &m_bmInfo, DIB_RGB_COLORS);
00138
00139           m_nScanLine += nLines;
00140           GetControl()->InvalidateControl(NULL);
00141         }
00142         else
00143         {
00144           bContinue = FALSE;
00145           break;
00146         }
00147
00148         delete [] pb;
00149
00150         if (m_nScanLine == m_BitmapSize.cy)
00151           m_dlState = dlDone;
00152       }
00153       break;
00154     }; //switch
00155
00156     bContinue = bContinue && (m_dlState != dlDone);
00157   } //while
00158
00159   ASSERT_KINDOF(CImageCtrl, GetControl());
00160   ((CImageCtrl*)GetControl())->InformDlStatus(m_dlState);
00161 }
00162
00163 void CBitmapProperty::ResetData()
00164 {
00165   CDataPathProperty::ResetData();
00166   m_dlState = dlNone;
00167   if (m_Bitmap.m_hObject != NULL)
00168     m_Bitmap.DeleteObject();
00169
00170   m_CacheFile.SetLength(0);
00171   m_nScanLine = 0;
00172   m_cbRead = 0;
00173 }
00174
00175 DWORD AfxTransferFileContent(CFile* pFrom, CFile* pTo, DWORD dwAmount)
00176 {
00177   BYTE buff[1024];
00178   DWORD dwRead = 0;
00179   DWORD dwActual = 1; // bogus value to enter the loop
00180   while ((dwAmount > 0) && (dwActual > 0))
00181   {
00182     dwActual = pFrom->Read(buff, min(dwAmount, 1024));
00183     pTo->Write(buff, dwActual);
00184
00185     dwAmount -= dwActual;
00186     dwRead += dwActual;
00187   }
00188   return dwRead;
00189 }
00190
00191 BOOL CBitmapProperty::ReadStruct(DWORD& rdwSize, void* pb, int cLen)
00192 {
00193   // Cache contents.
00194   AfxTransferFileContent(this, &m_CacheFile, rdwSize);
00195   rdwSize = 0;
00196
00197   // Do we have enough data yet?
00198 #pragma warning(disable:4244)
00199   int cCache = m_CacheFile.GetLength();
00200   if (cCache >= cLen)
00201   {
00202     m_CacheFile.SeekToBegin();
00203     VERIFY(m_CacheFile.Read(pb, cLen) == (UINT)cLen);
00204
00205     // Is there more?
00206     if (cCache > cLen)
00207     {
00208       CMemFile memFile;
00209       AfxTransferFileContent(&m_CacheFile, &memFile, cCache - cLen);
00210       m_CacheFile.SetLength(0);
00211       memFile.SeekToBegin();
00212       AfxTransferFileContent(&memFile, &m_CacheFile, cCache - cLen);
00213     }
00214     else
00215     {
00216       m_CacheFile.SetLength(0);
00217     }
00218
00219     return TRUE;
00220   }
00221   else
00222   {
00223     return FALSE;
00224   }
00225 #pragma warning(default:4244)
00226 }
00227
00228 int CBitmapProperty::ReadArray(DWORD& rdwSize, void** pb, int cElem, int cMax)
00229 {
00230   // Cache contents.
00231   AfxTransferFileContent(this, &m_CacheFile, rdwSize);
00232   rdwSize = 0;
00233   int nElems = 0;
00234
00235   // Do we have enough data yet?
00236 #pragma warning(disable:4244)
00237   int cCache = m_CacheFile.GetLength();
00238 #pragma warning(default:4244)
00239   if (cCache >= cElem)
00240   {
00241     m_CacheFile.SeekToBegin();
00242
00243     nElems = min(cCache / cElem, cMax);
00244     int cSize = nElems * cElem;
00245     ASSERT(cSize <= cCache);
00246
00247     *pb = new BYTE[cSize];
00248     ASSERT(m_CacheFile.Read(*pb, cSize) == (UINT)cSize);
00249
00250     // Is there more?
00251     if (cCache > cSize)
00252     {
00253       CMemFile memFile;
00254       AfxTransferFileContent(&m_CacheFile, &memFile, cCache - cSize);
00255       m_CacheFile.SetLength(0);
00256       memFile.SeekToBegin();
00257       AfxTransferFileContent(&memFile, &m_CacheFile, cCache - cSize);
00258     }
00259     else
00260     {
00261       m_CacheFile.SetLength(0);
00262     }
00263   }
00264
00265   return nElems;
00266 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPENTIP Member List

This is the complete list of members for tagPENTIP, including all inherited members.
bheight | tagPENTIP
bOpacity | tagPENTIP
btype | tagPENTIP
bwidth | tagPENTIP
cbSize | tagPENTIP
dwFlags | tagPENTIP
dwReserved | tagPENTIP
rgb | tagPENTIP
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/StdAfx.cpp Source File

  • vc2008fp
  • TabControl

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  TabControl.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/stdafx.h Source File

  • controls
  • netaddr

stdafx.h

Go to the documentation of this file.
00001 // but are changed infrequently
00002
00003 #pragma once
00004
00005 #ifndef _SECURE_ATL
00006 #define _SECURE_ATL 1
00007 #endif
00008
00009 #ifndef VC_EXTRALEAN
00010 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00011 #endif
00012
00013 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00014
00015 // turns off MFC's hiding of some common and often safely ignored warning messages
00016 #define _AFX_ALL_WARNINGS
00017
00018 #include <afxwin.h>         // MFC core and standard components
00019 #include <afxext.h>         // MFC extensions
00020
00021
00022 #include <afxdisp.h>        // MFC Automation classes
00023
00024
00025
00026 #ifndef _AFX_NO_OLE_SUPPORT
00027 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00028 #endif
00029 #ifndef _AFX_NO_AFXCMN_SUPPORT
00030 #include <afxcmn.h>     // MFC support for Windows Common Controls
00031 #endif // _AFX_NO_AFXCMN_SUPPORT
00032
00033 #include <sstream>      // For string processing
00034 #include <iomanip>
00035 #include <lm.h>
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifdef _UNICODE
00047 #if defined _M_IX86
00048 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00049 #elif defined _M_X64
00050 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00051 #else
00052 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00053 #endif
00054 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summpage.h Source File

  • vc2008fp
  • DrawClient

summpage.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 class CSummPage : public CPropertyPage
00013 {
00014   DECLARE_DYNCREATE(CSummPage)
00015
00016 // Construction
00017 public:
00018   CSummPage();
00019   ~CSummPage();
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CSummPage)
00023   enum { IDD = IDD_SUMM_PAGE };
00024   CString m_strAuthor;
00025   CString m_strKeywd;
00026   CString m_strSubj;
00027   CString m_strCmt;
00028   CString m_strTempl;
00029   CString m_strTitle;
00030   CString m_strAppname;
00031   //}}AFX_DATA
00032
00033 // Overrides
00034 protected:
00035   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00036
00037 // Implementation
00038 protected:
00039   //{{AFX_MSG(CSummPage)
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CServicesPage Member List

This is the complete list of members for CServicesPage, including all inherited members.
CServicesPage() | CServicesPage |
DoDataExchange(CDataExchange *pDX) | CServicesPage | [protected, virtual]
IDD enum value | CServicesPage |
m_tSBindHost | CServicesPage |
OnContextMenu(CWnd *pWnd, CPoint point) | CServicesPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CServicesPage | [protected]
~CServicesPage() | CServicesPage |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnppg.cpp Source File

  • controls
  • button

btnppg.cpp

Go to the documentation of this file.
00001 // btnppg.cpp : Implementation of the CButtonPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "button.h"
00014 #include "btnppg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021
00022 IMPLEMENT_DYNCREATE(CButtonPropPage, COlePropertyPage)
00023
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // Message map
00027
00028 BEGIN_MESSAGE_MAP(CButtonPropPage, COlePropertyPage)
00029   //{{AFX_MSG_MAP(CButtonPropPage)
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // Initialize class factory and guid
00036
00037 IMPLEMENT_OLECREATE_EX(CButtonPropPage, "BUTTON.ButtonPropPage.1",
00038   0x4a8c9993, 0x7713, 0x101b, 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2)
00039
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CButtonPropPage::CButtonPropPageFactory::UpdateRegistry -
00043 // Adds or removes system registry entries for CButtonPropPage
00044
00045 BOOL CButtonPropPage::CButtonPropPageFactory::UpdateRegistry(BOOL bRegister)
00046 {
00047   if (bRegister)
00048     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00049       m_clsid, IDS_BUTTON_PPG);
00050   else
00051     return AfxOleUnregisterClass(m_clsid, NULL);
00052 }
00053
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CButtonPropPage::CButtonPropPage - Constructor
00057
00058 CButtonPropPage::CButtonPropPage() :
00059   COlePropertyPage(IDD, IDS_BUTTON_PPG_CAPTION)
00060 {
00061   //{{AFX_DATA_INIT(CButtonPropPage)
00062   m_Caption = _T("");
00063   //}}AFX_DATA_INIT
00064 }
00065
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CButtonPropPage::DoDataExchange - Moves data between page and properties
00069
00070 void CButtonPropPage::DoDataExchange(CDataExchange* pDX)
00071 {
00072   //{{AFX_DATA_MAP(CButtonPropPage)
00073   DDP_Text(pDX, IDC_CAPTIONEDIT, m_Caption, _T("Caption") );
00074   DDX_Text(pDX, IDC_CAPTIONEDIT, m_Caption);
00075   //}}AFX_DATA_MAP
00076   DDP_PostProcessing(pDX);
00077 }
00078
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CButtonPropPage message handlers
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/maindoc.h Source File

  • ole
  • oclient

maindoc.h

Go to the documentation of this file.
00001 // maindoc.h : interface of the CMainDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 class CRectItem;
00014
00015 class CMainDoc : public COleLinkingDoc
00016 {
00017 protected: // create from serialization only
00018   CMainDoc();
00019   DECLARE_DYNCREATE(CMainDoc)
00020
00021 // Attributes
00022 public:
00023   static CLIPFORMAT m_cfPrivate;
00024   CSize m_sizeDoc;
00025   CSize& GetDocumentSize();
00026   BOOL m_bNeedUpdate;
00027
00028 // Operations
00029 public:
00030   CRectItem* CreateItem();    // this document only stores CRectItems
00031   void DeleteItem(CRectItem* pItem);
00032   void AdjustItemPosition(CRectItem* pItem);
00033
00034 // Implementation
00035 public:
00036   virtual ~CMainDoc();
00037   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00038   virtual void OnShowViews(BOOL bVisible);
00039
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045 // Generated message map functions
00046 protected:
00047   //{{AFX_MSG(CMainDoc)
00048   afx_msg void OnEditClearAll();
00049   afx_msg void OnUpdateEditClearAll(CCmdUI* pCmdUI);
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VARTYPE_ENTRY Member List

This is the complete list of members for VARTYPE_ENTRY, including all inherited members.
pszName | VARTYPE_ENTRY
vt | VARTYPE_ENTRY
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/ChildFrm.h Source File

  • vc2008fp
  • RibbonMDI

ChildFrm.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CChildFrame : public CMDIChildWndEx
00015 {
00016   DECLARE_DYNCREATE(CChildFrame)
00017 public:
00018   CChildFrame();
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028   virtual void ActivateFrame(int nCmdShow);
00029
00030 // Implementation
00031 public:
00032   virtual ~CChildFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   afx_msg void OnEditCopy();
00040   afx_msg void OnEditCut();
00041   afx_msg void OnEditPaste();
00042   afx_msg void OnEditPasteSpecial();
00043
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolpage.h Source File

  • general
  • CmnCtrl1

toolpage.h

Go to the documentation of this file.
00001 // ToolPage.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CToolBarCtrlPage dialog
00015 #ifndef INC_TOOLPAGE_H
00016 #define INC_TOOLPAGE_H
00017
00018 #include "toolbar1.h"
00019 #include "toolbar2.h"
00020
00021 class CToolBarCtrlPage : public CPropertyPage
00022 {
00023   DECLARE_DYNCREATE(CToolBarCtrlPage)
00024
00025 // Construction
00026 public:
00027   CToolBarCtrlPage();
00028   ~CToolBarCtrlPage();
00029
00030 // Overrides
00031   // ClassWizard generated virtual function overrides
00032   //{{AFX_VIRTUAL(CMyToolBarCtrlPage)
00033   //}}AFX_VIRTUAL
00034
00035 // Attributes
00036 protected:
00037   CStandardBar    m_StandardBar;
00038   CPaletteBar     m_PaletteBar;
00039   CToolTipCtrl    m_ToolTip;
00040 // Dialog Data
00041   //{{AFX_DATA(CToolBarCtrlPage)
00042   enum { IDD = IDD_TOOLBARCTRL };
00043   BOOL    m_bAltDrag;
00044   //}}AFX_DATA
00045
00046
00047 // Overrides
00048   // ClassWizard generate virtual function overrides
00049   //{{AFX_VIRTUAL(CToolBarCtrlPage)
00050   protected:
00051   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052   virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
00053   //}}AFX_VIRTUAL
00054
00055 // Implementation
00056 protected:
00057   void ChangeCtrlStyle(long lStyle, BOOL bSetStyle);
00058
00059   // Generated message map functions
00060   //{{AFX_MSG(CToolBarCtrlPage)
00061   virtual BOOL OnInitDialog();
00062   afx_msg void OnAltdrag();
00063   //}}AFX_MSG
00064 #ifdef FWC
00065   afx_msg void OnToolbarCommand(UINT nID);
00066 #endif
00067   DECLARE_MESSAGE_MAP()
00068
00069 };
00070
00071 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiro.h Source File

  • general
  • spiro

spiro.h

Go to the documentation of this file.
00001 // spiro.h : main header file for the SPIRO application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_SPIRO_H__4417CF86_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
00013 #define AFX_SPIRO_H__4417CF86_AFA9_11D1_AB61_D9B80632F018__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 #ifndef __AFXWIN_H__
00020   #error include 'stdafx.h' before including this file for PCH
00021 #endif
00022
00023 #include "resource.h"       // main symbols
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CSpiroApp:
00027 // See spiro.cpp for the implementation of this class
00028 //
00029
00030 class CSpiroApp : public CWinApp
00031 {
00032 public:
00033   HCURSOR m_cursorWheel;
00034   HCURSOR m_cursorRing;
00035   CImageList  m_imageList;  // use for drag operations
00036
00037   CSpiroApp();
00038
00039 // Overrides
00040   // ClassWizard generated virtual function overrides
00041   //{{AFX_VIRTUAL(CSpiroApp)
00042   public:
00043   virtual BOOL InitInstance();
00044   //}}AFX_VIRTUAL
00045
00046 // Implementation
00047   void  SetLandscape();
00048
00049   //{{AFX_MSG(CSpiroApp)
00050   afx_msg void OnAppAbout();
00051     // NOTE - the ClassWizard will add and remove member functions here.
00052     //    DO NOT EDIT what you see in these blocks of generated code !
00053   //}}AFX_MSG
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 #define GetApp() ((CSpiroApp*)AfxGetApp())
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060
00061 //{{AFX_INSERT_LOCATION}}
00062 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00063
00064 #endif // !defined(AFX_SPIRO_H__4417CF86_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ConInfDg.H Source File

  • ole
  • TstCon

ConInfDg.H

Go to the documentation of this file.
00001 // File: ConInfDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_CCONTAINERINFODLG_H__D2C50BD1_C64C_11D0_8E02_00C04FB68D60__INCLUDED_)
00011 #define AFX_CCONTAINERINFODLG_H__D2C50BD1_C64C_11D0_8E02_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // CContainerInfoDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CContainerInfoDlg dialog
00021
00022 class CContainerInfoDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CContainerInfoDlg( CWnd* pParent, CTestContainer98Doc* pDoc );
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CContainerInfoDlg)
00030   enum { IDD = IDD_CONTAINERINFO };
00031   CListCtrl   m_listObjects;
00032   //}}AFX_DATA
00033
00034
00035 // Overrides
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CContainerInfoDlg)
00038   protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 protected:
00044    CTestContainer98Doc* m_pDoc;
00045
00046   // Generated message map functions
00047   //{{AFX_MSG(CContainerInfoDlg)
00048   virtual BOOL OnInitDialog();
00049   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00050   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 //{{AFX_INSERT_LOCATION}}
00056 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00057
00058 #endif // !defined(AFX_CCONTAINERINFODLG_H__D2C50BD1_C64C_11D0_8E02_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dynamenu.cpp Source File

  • general
  • dynamenu

dynamenu.cpp

Go to the documentation of this file.
00001 // dynamenu.cpp
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: implementation of the CDynaMenuApp class
00013 //
00014 // Functions:
00015 //      Most of this file was generated by AppWizard.  The functions
00016 //      which contain code specific to this sample are:
00017 //
00018 //      CDynaMenuApp::InitInstance()         -- per-instance initialization
00019
00020 #include "stdafx.h"
00021 #include "dynamenu.h"
00022
00023 #include "mainfrm.h"
00024 #include "dmdoc.h"
00025 #include "dmview.h"
00026
00027 #include "mdichild.h" // Our private CMDIChildWnd class
00028
00029 #ifdef _DEBUG
00030 #undef THIS_FILE
00031 static char BASED_CODE THIS_FILE[] = __FILE__;
00032 #endif
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CDynaMenuApp
00036
00037 BEGIN_MESSAGE_MAP(CDynaMenuApp, CWinApp)
00038   //{{AFX_MSG_MAP(CDynaMenuApp)
00039   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00040     // NOTE - the ClassWizard will add and remove mapping macros here.
00041     //    DO NOT EDIT what you see in these blocks of generated code!
00042   //}}AFX_MSG_MAP
00043   // Standard file based document commands
00044   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00045   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00046   // Standard print setup command
00047   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CDynaMenuApp construction
00052
00053 CDynaMenuApp::CDynaMenuApp()
00054 {
00055   // TODO: add construction code here,
00056   // Place all significant initialization in InitInstance
00057 }
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // The one and only CDynaMenuApp object
00061
00062 CDynaMenuApp NEAR theApp;
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CDynaMenuApp initialization
00066
00067 //***********************************************************************
00068 // Function: CDynaMenuApp::InitInstance()
00069 //
00070 // Purpose:
00071 //      InitInstance is called by the framework to perform per-instance
00072 //      initialization of the application.
00073 //
00074 //      This function is the code generated by AppWizard with one
00075 //      exception - we use our own class for the frame window attached
00076 //      to a document template, instead of using CMDIChildWnd.
00077 //
00078 // Parameters:
00079 //      none
00080 //
00081 // Returns:
00082 //      nonzero if successful, otherwise 0
00083 //
00084 // Comments:
00085 //      see the CWinApp::InitInstance() documentation for further info.
00086 //
00087 //***********************************************************************
00088 BOOL CDynaMenuApp::InitInstance()
00089 {
00090   // Standard initialization
00091   // If you are not using these features and wish to reduce the size
00092   //  of your final executable, you should remove from the following
00093   //  the specific initialization routines you do not need.
00094
00095   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00096
00097   // Register the application's document templates.  Document templates
00098   //  serve as the connection between documents, frame windows and views.
00099
00100   CMultiDocTemplate* pDocTemplate;
00101   pDocTemplate = new CMultiDocTemplate(
00102     IDR_DYMENUTYPE,
00103     RUNTIME_CLASS(CDynaMenuDoc),
00104     RUNTIME_CLASS(CDynaMDIChildWnd),        // our private MDI child class!!
00105     RUNTIME_CLASS(CDynaMenuView));
00106   AddDocTemplate(pDocTemplate);
00107
00108   // create main MDI Frame window
00109   CMainFrame* pMainFrame = new CMainFrame;
00110   if (!pMainFrame->LoadFrame(IDR_MAINFRAME)){
00111     delete pMainFrame;
00112     return FALSE;
00113   }
00114   m_pMainWnd = pMainFrame;
00115
00116   // enable file manager drag/drop and DDE Execute open
00117   EnableShellOpen();
00118   RegisterShellFileTypes(TRUE);
00119
00120   // Parse command line for standard shell commands, DDE, file open
00121   CCommandLineInfo cmdInfo;
00122   ParseCommandLine(cmdInfo);
00123
00124   // Dispatch commands specified on the command line
00125   if (!ProcessShellCommand(cmdInfo))
00126     return FALSE;
00127
00128   m_pMainWnd->DragAcceptFiles();
00129   // The main window has been initialized, so show and update it.
00130   pMainFrame->ShowWindow(m_nCmdShow);
00131   pMainFrame->UpdateWindow();
00132
00133   return TRUE;
00134 }
00135
00136 /////////////////////////////////////////////////////////////////////////////
00137 // CAboutDlg dialog used for App About
00138
00139 class CAboutDlg : public CDialog
00140 {
00141 public:
00142   CAboutDlg();
00143
00144 // Dialog Data
00145   //{{AFX_DATA(CAboutDlg)
00146   enum { IDD = IDD_ABOUTBOX };
00147   //}}AFX_DATA
00148
00149 // Implementation
00150 protected:
00151   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00152   //{{AFX_MSG(CAboutDlg)
00153     // No message handlers
00154   //}}AFX_MSG
00155   DECLARE_MESSAGE_MAP()
00156 };
00157
00158 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00159 {
00160   //{{AFX_DATA_INIT(CAboutDlg)
00161   //}}AFX_DATA_INIT
00162 }
00163
00164 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00165 {
00166   CDialog::DoDataExchange(pDX);
00167   //{{AFX_DATA_MAP(CAboutDlg)
00168   //}}AFX_DATA_MAP
00169 }
00170
00171 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00172   //{{AFX_MSG_MAP(CAboutDlg)
00173     // No message handlers
00174   //}}AFX_MSG_MAP
00175 END_MESSAGE_MAP()
00176
00177 // App command to run the dialog
00178 void CDynaMenuApp::OnAppAbout()
00179 {
00180   CAboutDlg aboutDlg;
00181   aboutDlg.DoModal();
00182 }
00183
00184 /////////////////////////////////////////////////////////////////////////////
00185 // CDynaMenuApp commands
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMinSize Member List

This is the complete list of members for CMinSize, including all inherited members.
CMinSize(CWnd *pParent=NULL) | CMinSize |
DoDataExchange(CDataExchange *pDX) | CMinSize | [protected, virtual]
IDD enum value | CMinSize |
m_nMinX | CMinSize |
m_nMinY | CMinSize |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsView.cpp Source File

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViewsView.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "OutlookMultiViews.h"
00003
00004 #include "OutlookMultiViewsDoc.h"
00005 #include "OutlookMultiViewsView.h"
00006
00007 #ifdef _DEBUG
00008 #define new DEBUG_NEW
00009 #undef THIS_FILE
00010 static char THIS_FILE[] = __FILE__;
00011 #endif
00012
00013 static const CString strInfo =
00014   _T("This sample illustrates how to switch between multiple views on a single document in a SDI application\r\n\r\nView 1");
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // COutlookMultiViewsView
00018
00019 IMPLEMENT_DYNCREATE(COutlookMultiViewsView, CView)
00020
00021 BEGIN_MESSAGE_MAP(COutlookMultiViewsView, CView)
00022   ON_WM_CONTEXTMENU()
00023   // Standard printing commands
00024   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00025   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00026   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00027 END_MESSAGE_MAP()
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // COutlookMultiViewsView construction/destruction
00031
00032 COutlookMultiViewsView::COutlookMultiViewsView()
00033 {
00034   // TODO: add construction code here
00035
00036 }
00037
00038 COutlookMultiViewsView::~COutlookMultiViewsView()
00039 {
00040 }
00041
00042 BOOL COutlookMultiViewsView::PreCreateWindow(CREATESTRUCT& cs)
00043 {
00044   // TODO: Modify the Window class or styles here by modifying
00045   //  the CREATESTRUCT cs
00046
00047   return CView::PreCreateWindow(cs);
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // COutlookMultiViewsView drawing
00052
00053 void COutlookMultiViewsView::OnDraw(CDC* pDC)
00054 {
00055 //  COutlookMultiViewsDoc* pDoc = GetDocument();
00056 //  ASSERT_VALID(pDoc);
00057
00058   const int iOffset = 20;
00059
00060   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00061   ASSERT (pFontOld != NULL);
00062
00063   CRect rectClient;
00064   GetClientRect (&rectClient);
00065
00066   CRect rectText = rectClient;
00067   rectText.DeflateRect (iOffset, iOffset);
00068   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00069
00070   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00071               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00072
00073   CRect rectFrame = rectText;
00074   rectFrame.InflateRect (iOffset, iOffset);
00075
00076   CDrawingManager dm (*pDC);
00077
00078   dm.FillGradient2 (rectFrame, RGB (246, 241, 178), RGB (234, 223, 67), 35);
00079
00080   pDC->Draw3dRect (rectFrame, RGB (168, 158, 18), RGB (168, 158, 18));
00081
00082   pDC->SetBkMode (TRANSPARENT);
00083   pDC->SetTextColor (0);
00084   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00085   pDC->SelectObject (pFontOld);
00086 }
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // COutlookMultiViewsView printing
00090
00091 void COutlookMultiViewsView::OnFilePrintPreview()
00092 {
00093   AFXPrintPreview (this);
00094 }
00095
00096 BOOL COutlookMultiViewsView::OnPreparePrinting(CPrintInfo* pInfo)
00097 {
00098   // default preparation
00099   return DoPreparePrinting(pInfo);
00100 }
00101
00102 void COutlookMultiViewsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00103 {
00104   // TODO: add extra initialization before printing
00105 }
00106
00107 void COutlookMultiViewsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00108 {
00109   // TODO: add cleanup after printing
00110 }
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // COutlookMultiViewsView diagnostics
00114
00115 #ifdef _DEBUG
00116 void COutlookMultiViewsView::AssertValid() const
00117 {
00118   CView::AssertValid();
00119 }
00120
00121 void COutlookMultiViewsView::Dump(CDumpContext& dc) const
00122 {
00123   CView::Dump(dc);
00124 }
00125
00126 COutlookMultiViewsDoc* COutlookMultiViewsView::GetDocument() // non-debug version is inline
00127 {
00128   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COutlookMultiViewsDoc)));
00129   return (COutlookMultiViewsDoc*)m_pDocument;
00130 }
00131 #endif //_DEBUG
00132
00133 /////////////////////////////////////////////////////////////////////////////
00134 // COutlookMultiViewsView message handlers
00135
00136 void COutlookMultiViewsView::OnContextMenu(CWnd*, CPoint point)
00137 {
00138   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00139 }
00140
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View3.h Source File

  • vc2008fp
  • OutlookMultiViews

View3.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 class CView3 : public CView
00004 {
00005 public:
00006   CView3();           // protected constructor used by dynamic creation
00007   virtual ~CView3();
00008
00009   DECLARE_DYNCREATE(CView3)
00010
00011 // Attributes
00012 public:
00013
00014 // Operations
00015 public:
00016
00017 // Overrides
00018   protected:
00019   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00020   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00021   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00022   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00023
00024 // Implementation
00025 protected:
00026 #ifdef _DEBUG
00027   virtual void AssertValid() const;
00028   virtual void Dump(CDumpContext& dc) const;
00029 #endif
00030
00031 protected:
00032   afx_msg void OnContextMenu(CWnd*, CPoint point);
00033   afx_msg void OnFilePrintPreview();
00034
00035   DECLARE_MESSAGE_MAP()
00036 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenppg.cpp Source File

  • controls
  • licensed

licenppg.cpp

Go to the documentation of this file.
00001 // licenppg.cpp : Implementation of the CLicensedPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "licensed.h"
00014 #include "licenppg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021
00022 IMPLEMENT_DYNCREATE(CLicensedPropPage, COlePropertyPage)
00023
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // Message map
00027
00028 BEGIN_MESSAGE_MAP(CLicensedPropPage, COlePropertyPage)
00029   //{{AFX_MSG_MAP(CLicensedPropPage)
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // Initialize class factory and guid
00036
00037 IMPLEMENT_OLECREATE_EX(CLicensedPropPage, "LICENSED.LicensedPropPage.1",
00038   0x37446b82, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00039
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CLicensedPropPage::CLicensedPropPageFactory::UpdateRegistry -
00043 // Adds or removes system registry entries for CLicensedPropPage
00044
00045 BOOL CLicensedPropPage::CLicensedPropPageFactory::UpdateRegistry(BOOL bRegister)
00046 {
00047   if (bRegister)
00048     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00049       m_clsid, IDS_LICENSED_PPG);
00050   else
00051     return AfxOleUnregisterClass(m_clsid, NULL);
00052 }
00053
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CLicensedPropPage::CLicensedPropPage - Constructor
00057
00058 CLicensedPropPage::CLicensedPropPage() :
00059   COlePropertyPage(IDD, IDS_LICENSED_PPG_CAPTION)
00060 {
00061   //{{AFX_DATA_INIT(CLicensedPropPage)
00062   //}}AFX_DATA_INIT
00063 }
00064
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CLicensedPropPage::DoDataExchange - Moves data between page and properties
00068
00069 void CLicensedPropPage::DoDataExchange(CDataExchange* pDX)
00070 {
00071   //{{AFX_DATA_MAP(CLicensedPropPage)
00072   //}}AFX_DATA_MAP
00073   DDP_PostProcessing(pDX);
00074 }
00075
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // CLicensedPropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/htmledit.cpp Source File

  • internet
  • HTMLEdit

htmledit.cpp

Go to the documentation of this file.
00001 // HTMLEdit.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014
00015 #include "MainFrm.h"
00016 #include "HTMLEdDoc.h"
00017 #include "HTMLEdView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CHTMLEditApp
00027
00028 BEGIN_MESSAGE_MAP(CHTMLEditApp, CWinApp)
00029   //{{AFX_MSG_MAP(CHTMLEditApp)
00030   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code!
00033   //}}AFX_MSG_MAP
00034   // Standard file based document commands
00035   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00036   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00037   // Standard print setup command
00038   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CHTMLEditApp construction
00043
00044 CHTMLEditApp::CHTMLEditApp()
00045 {
00046   // TODO: add construction code here,
00047   // Place all significant initialization in InitInstance
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only CHTMLEditApp object
00052
00053 CHTMLEditApp theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CHTMLEdApp initialization
00057
00058 BOOL CHTMLEditApp::InitInstance()
00059 {
00060   AfxEnableControlContainer();
00061
00062   // Standard initialization
00063   // If you are not using these features and wish to reduce the size
00064   //  of your final executable, you should remove from the following
00065   //  the specific initialization routines you do not need.
00066
00067
00068
00069   // Change the registry key under which our settings are stored.
00070   // TODO: You should modify this string to be something appropriate
00071   // such as the name of your company or organization.
00072   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   // Register the application's document templates.  Document templates
00077   //  serve as the connection between documents, frame windows and views.
00078
00079   CSingleDocTemplate* pDocTemplate;
00080   pDocTemplate = new CSingleDocTemplate(
00081     IDR_MAINFRAME,
00082     RUNTIME_CLASS(CHTMLEdDoc),
00083     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00084     RUNTIME_CLASS(CHTMLEdView));
00085   AddDocTemplate(pDocTemplate);
00086
00087   // Parse command line for standard shell commands, DDE, file open
00088   CCommandLineInfo cmdInfo;
00089   ParseCommandLine(cmdInfo);
00090
00091   if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileOpen)
00092   {
00093     cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;
00094   }
00095
00096   // Dispatch commands specified on the command line
00097   if (!ProcessShellCommand(cmdInfo))
00098     return FALSE;
00099
00100   // The one and only window has been initialized, so show and update it.
00101   m_pMainWnd->ShowWindow(SW_SHOW);
00102   m_pMainWnd->UpdateWindow();
00103
00104   return TRUE;
00105 }
00106
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CAboutDlg dialog used for App About
00110
00111 class CAboutDlg : public CDialog
00112 {
00113 public:
00114   CAboutDlg();
00115
00116 // Dialog Data
00117   //{{AFX_DATA(CAboutDlg)
00118   enum { IDD = IDD_ABOUTBOX };
00119   //}}AFX_DATA
00120
00121   // ClassWizard generated virtual function overrides
00122   //{{AFX_VIRTUAL(CAboutDlg)
00123   protected:
00124   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00125   //}}AFX_VIRTUAL
00126
00127 // Implementation
00128 protected:
00129   //{{AFX_MSG(CAboutDlg)
00130   //}}AFX_MSG
00131   DECLARE_MESSAGE_MAP()
00132 };
00133
00134 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00135 {
00136   //{{AFX_DATA_INIT(CAboutDlg)
00137   //}}AFX_DATA_INIT
00138 }
00139
00140 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00141 {
00142   CDialog::DoDataExchange(pDX);
00143   //{{AFX_DATA_MAP(CAboutDlg)
00144   //}}AFX_DATA_MAP
00145 }
00146
00147 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00148   //{{AFX_MSG_MAP(CAboutDlg)
00149   //}}AFX_MSG_MAP
00150 END_MESSAGE_MAP()
00151
00152 // App command to run the dialog
00153 void CHTMLEditApp::OnAppAbout()
00154 {
00155   CAboutDlg aboutDlg;
00156   aboutDlg.DoModal();
00157 }
00158
00159 /////////////////////////////////////////////////////////////////////////////
00160 // CHTMLEditApp message handlers
00161
00162
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varmap.h Source File

  • ole
  • inproc

varmap.h

Go to the documentation of this file.
00001 // varmap.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CVariantMap command target
00014
00015 class CVariantMap : public CCmdTarget
00016 {
00017   DECLARE_DYNCREATE(CVariantMap)
00018 protected:
00019   CVariantMap();           // protected constructor used by dynamic creation
00020
00021 // Attributes
00022 public:
00023   CString m_str2;
00024   long m_i2;
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CVariantMap)
00032   public:
00033   virtual void OnFinalRelease();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 protected:
00038   virtual ~CVariantMap();
00039   CMapVariantToVariant m_map;
00040
00041   // Generated message map functions
00042   //{{AFX_MSG(CVariantMap)
00043     // NOTE - the ClassWizard will add and remove member functions here.
00044   //}}AFX_MSG
00045
00046   DECLARE_MESSAGE_MAP()
00047   DECLARE_OLECREATE(CVariantMap)
00048
00049   // Generated OLE dispatch map functions
00050   //{{AFX_DISPATCH(CVariantMap)
00051   CString m_str1;
00052   long m_i1;
00053   afx_msg BSTR GetStr2();
00054   afx_msg void SetStr2(LPCTSTR lpszNewValue);
00055   afx_msg long GetI2();
00056   afx_msg void SetI2(long nNewValue);
00057   afx_msg long GetCount();
00058   afx_msg void SetAt(const VARIANT FAR& from, const VARIANT FAR& to);
00059   afx_msg void RemoveAll();
00060   afx_msg void RemoveKey(const VARIANT FAR& key);
00061   afx_msg BOOL IsEmpty();
00062   afx_msg VARIANT GetItem(const VARIANT FAR& from);
00063   //}}AFX_DISPATCH
00064   DECLARE_DISPATCH_MAP()
00065   afx_msg LPUNKNOWN GetNewEnum();
00066
00067   DECLARE_INTERFACE_MAP()
00068 };
00069
00070 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetView.cpp Source File

  • vc2008fp
  • MenuSubSet

MenuSubSetView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MenuSubSet.h"
00013
00014 #include "MenuSubSetDoc.h"
00015 #include "MenuSubSetView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMenuSubSetView
00025
00026 IMPLEMENT_DYNCREATE(CMenuSubSetView, CFormView)
00027
00028 BEGIN_MESSAGE_MAP(CMenuSubSetView, CFormView)
00029   ON_COMMAND(ID_DEMO_DEMO1, OnDemoDemo1)
00030   ON_COMMAND(ID_DEMO_DEMO2, OnDemoDemo2)
00031   ON_WM_CONTEXTMENU()
00032   // Standard printing commands
00033   ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
00034   ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
00035   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CMenuSubSetView construction/destruction
00040
00041 CMenuSubSetView::CMenuSubSetView()
00042   : CFormView(CMenuSubSetView::IDD)
00043 {
00044   // TODO: add construction code here
00045
00046 }
00047
00048 CMenuSubSetView::~CMenuSubSetView()
00049 {
00050 }
00051
00052 void CMenuSubSetView::DoDataExchange(CDataExchange* pDX)
00053 {
00054   CFormView::DoDataExchange(pDX);
00055 }
00056
00057 BOOL CMenuSubSetView::PreCreateWindow(CREATESTRUCT& cs)
00058 {
00059   // TODO: Modify the Window class or styles here by modifying
00060   //  the CREATESTRUCT cs
00061
00062   return CFormView::PreCreateWindow(cs);
00063 }
00064
00065 void CMenuSubSetView::OnInitialUpdate()
00066 {
00067   // There is only one view ever, so it only needs to do the initial
00068   // update once--otherwise the application is  resized needlessly.
00069   static BOOL bUpdatedOnce = FALSE;
00070   if (bUpdatedOnce)
00071     return;
00072   bUpdatedOnce = TRUE;
00073
00074   CFormView::OnInitialUpdate();
00075   ResizeParentToFit();
00076
00077 }
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CMenuSubSetView printing
00081
00082 void CMenuSubSetView::OnFilePrintPreview()
00083 {
00084   AFXPrintPreview (this);
00085 }
00086
00087 BOOL CMenuSubSetView::OnPreparePrinting(CPrintInfo* pInfo)
00088 {
00089   // default preparation
00090   return DoPreparePrinting(pInfo);
00091 }
00092
00093 void CMenuSubSetView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00094 {
00095   // TODO: add extra initialization before printing
00096 }
00097
00098 void CMenuSubSetView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00099 {
00100   // TODO: add cleanup after printing
00101 }
00102
00103 void CMenuSubSetView::OnPrint(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00104 {
00105   // TODO: add customized printing code here
00106 }
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CMenuSubSetView diagnostics
00110
00111 #ifdef _DEBUG
00112 void CMenuSubSetView::AssertValid() const
00113 {
00114   CFormView::AssertValid();
00115 }
00116
00117 void CMenuSubSetView::Dump(CDumpContext& dc) const
00118 {
00119   CFormView::Dump(dc);
00120 }
00121
00122 CMenuSubSetDoc* CMenuSubSetView::GetDocument() // non-debug version is inline
00123 {
00124   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMenuSubSetDoc)));
00125   return (CMenuSubSetDoc*)m_pDocument;
00126 }
00127 #endif //_DEBUG
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CMenuSubSetView message handlers
00131
00132 void CMenuSubSetView::OnContextMenu(CWnd*, CPoint point)
00133 {
00134   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00135 }
00136
00137 void CMenuSubSetView::OnDemoDemo1()
00138 {
00139   MessageBox (_T("Demo 1"));
00140 }
00141
00142 void CMenuSubSetView::OnDemoDemo2()
00143 {
00144   MessageBox (_T("Demo 2"));
00145 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/PropertiesDlg.h Source File

  • internet
  • DHtmlExplore

PropertiesDlg.h

Go to the documentation of this file.
00001 // File: PropertiesDlg.h
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_PROPERTIESDLG_H__AABFFA2A_818A_11D2_AA8F_00C04F990180__INCLUDED_)
00011 #define AFX_PROPERTIESDLG_H__AABFFA2A_818A_11D2_AA8F_00C04F990180__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // PropertiesDlg.h : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CPropertiesDlg dialog
00021
00022 class CPropertiesDlg : public CDHtmlDialog
00023 {
00024 // Construction
00025 public:
00026   CPropertiesDlg(CWnd* pParent = NULL);   // standard constructor
00027
00028 // Dialog Data
00029   CString m_strFileName;
00030   CString m_strType;
00031   CString m_strFileSize;
00032   CString m_strCreationTime;
00033   CString m_strModificationTime;
00034   CString m_strAccessTime;
00035   DWORD m_dwFileAttributes;
00036   int m_nReadOnly;
00037   int m_nArchive;
00038   int m_nHidden;
00039   int m_nSystem;
00040   //{{AFX_DATA(CPropertiesDlg)
00041   enum { IDD = IDD_PROPERTIES };
00042     // NOTE: the ClassWizard will add data members here
00043   //}}AFX_DATA
00044
00045
00046 // Overrides
00047   // ClassWizard generated virtual function overrides
00048   //{{AFX_VIRTUAL(CPropertiesDlg)
00049   protected:
00050   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00051   //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 protected:
00055
00056   // Generated message map functions
00057   //{{AFX_MSG(CPropertiesDlg)
00058   virtual BOOL OnInitDialog();
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 //{{AFX_INSERT_LOCATION}}
00064 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00065
00066 #endif // !defined(AFX_PROPERTIESDLG_H__AABFFA2A_818A_11D2_AA8F_00C04F990180__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/calcthrd.cpp Source File

  • advanced
  • mtrecalc

calcthrd.cpp

Go to the documentation of this file.
00001 // calcthrd.cpp : implementation of the worker thread
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "calcthrd.h"
00014 #include "recaldoc.h"
00015 #include "slowcalc.h"
00016 #include "mtrecalc.h"
00017
00018 UINT RecalcThreadProc(LPVOID pParam)
00019 {
00020   CRecalcThreadInfo* pRecalcInfo = (CRecalcThreadInfo*)pParam;
00021
00022   // This recalc thread runs in an infinite loop, waiting to recalculate the
00023   // result whenever the main application thread sets the "start recalc" event.
00024   // The recalc thread exits the loop only when the main application sets the
00025   // "kill recalc" event.
00026
00027   BOOL bRecalcCompleted = FALSE;
00028   while (TRUE)
00029   {
00030     bRecalcCompleted = FALSE;
00031
00032     // Wait until the main application thread asks this thread to do
00033     //      another calculation.
00034     if (WaitForSingleObject(pRecalcInfo->m_hEventStartRecalc, INFINITE)
00035       != WAIT_OBJECT_0)
00036       break;
00037
00038     // Exit the thread if the main application sets the "kill recalc"
00039     // event. The main application will set the "start recalc" event
00040     // before setting the "kill recalc" event.
00041
00042     if (WaitForSingleObject(pRecalcInfo->m_hEventKillRecalcThread, 0)
00043       == WAIT_OBJECT_0)
00044       break; // Terminate this thread by existing the proc.
00045
00046     // Reset event to indicate "not done", that is, recalculation is in progress.
00047     ResetEvent(pRecalcInfo->m_hEventRecalcDone);
00048
00049     bRecalcCompleted = SlowAdd(pRecalcInfo->m_nInt1,
00050       pRecalcInfo->m_nInt2,
00051       pRecalcInfo->m_nSum,
00052       pRecalcInfo,
00053       pRecalcInfo->m_nRecalcSpeedSeconds,
00054       pRecalcInfo->m_hwndNotifyProgress);
00055
00056     // Set event to indicate that recalculation is done (i.e., no longer in progres),
00057     // even if perhaps interrupted by "kill recalc" event detected in the SlowAdd function.
00058     SetEvent(pRecalcInfo->m_hEventRecalcDone);
00059
00060     if (!bRecalcCompleted)  // If interrupted by kill then...
00061       break; // terminate this thread by exiting the proc.
00062
00063     ::PostMessage(pRecalcInfo->m_hwndNotifyRecalcDone,
00064       WM_USER_RECALC_DONE, 0, 0);
00065   }
00066
00067   if (!bRecalcCompleted)
00068     SetEvent(pRecalcInfo->m_hEventRecalcThreadKilled);
00069
00070   return 0;
00071 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonListButton.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

RibbonListButton.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonListButton.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 #pragma warning(disable:4100)
00022
00023 const int nImageMargin = 4;
00024 const int nCheckMargin = 2;
00025 const int nTextOffsetX = 11;
00026 const int nTextOffsetY = 2;
00027
00028 const int nBorderMarginX = 1;
00029 const int nBorderMarginY = 3;
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CRibbonListButton
00033
00034 IMPLEMENT_DYNCREATE(CRibbonListButton, CMFCRibbonGallery)
00035
00036 CRibbonListButton::CRibbonListButton()
00037 {
00038   m_sizeMargins = CSize(2, 2);
00039 }
00040
00041 CRibbonListButton::CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL bRightAlignedText) :
00042   CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
00043 {
00044   SetButtonMode(TRUE);
00045   SetRightAlignedText(bRightAlignedText);
00046
00047   m_sizeMargins = CSize(2, 2);
00048   m_sizeMaxText = CSize(0, 0);
00049 }
00050
00051 CRibbonListButton::CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID,
00052     int cxPaletteImage, const CStringArray& arLabels, BOOL bRightAlignedText) :
00053   CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
00054 {
00055   SetButtonMode(TRUE);
00056   SetRightAlignedText(bRightAlignedText);
00057
00058   m_listImages.Load(uiImagesPaletteResID);
00059
00060   BITMAP bmp;
00061   GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);
00062
00063   m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
00064   m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
00065   m_arLabels.Copy(arLabels);
00066
00067   m_nIcons = (int) m_arLabels.GetSize();
00068
00069   UpdateToolTips();
00070
00071   m_sizeMargins = CSize(2, 2);
00072   m_sizeMaxText = CSize(0, 0);
00073 }
00074
00075 CRibbonListButton::~CRibbonListButton()
00076 {
00077 }
00078
00079 void CRibbonListButton::SetRightAlignedText(BOOL bSet)
00080 {
00081   if (m_bRightAlignedText != bSet)
00082   {
00083     m_bRightAlignedText = bSet;
00084
00085     if (m_bRightAlignedText)
00086     {
00087       SetIconsInRow(1);
00088     }
00089   }
00090 }
00091
00092 void CRibbonListButton::AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray& arLabels)
00093 {
00094   CMFCRibbonGallery::AddGroup(lpszGroupName, (int) arLabels.GetSize());
00095   for (int i = 0; i < arLabels.GetSize(); i++)
00096   {
00097     CMFCRibbonGallery::SetItemToolTip(i, arLabels[i]);
00098   }
00099
00100   if (uiImagesPaletteResID != 0)
00101   {
00102     if (m_listImages.GetCount() == 0)
00103     {
00104       m_listImages.Load(uiImagesPaletteResID);
00105
00106       BITMAP bmp;
00107       GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);
00108
00109       m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
00110       m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
00111     }
00112     else
00113     {
00114       ASSERT(cxPaletteImage == m_listImages.GetImageSize().cx);
00115       m_listImages.Load(uiImagesPaletteResID, NULL, TRUE);
00116     }
00117   }
00118
00119   if (m_arLabels.GetSize() == 0)
00120   {
00121     m_arLabels.Copy(arLabels);
00122   }
00123   else
00124   {
00125     m_arLabels.Append(arLabels);
00126   }
00127
00128   m_nIcons = (int) m_arLabels.GetSize();
00129
00130   UpdateToolTips();
00131
00132   RemoveAll();
00133   m_sizeMaxText = CSize(0, 0);
00134 }
00135
00136 void CRibbonListButton::Clear()
00137 {
00138   CMFCRibbonGallery::Clear();
00139
00140   m_arLabels.RemoveAll();
00141   m_sizeMaxText = CSize(0, 0);
00142 }
00143
00144 void CRibbonListButton::OnShowPopupMenu()
00145 {
00146   ASSERT_VALID(this);
00147
00148   CMFCRibbonBaseElement::OnShowPopupMenu();
00149
00150   if (m_sizeMaxText == CSize(0, 0))
00151   {
00152     CMFCRibbonBar* pRibbonBar = GetTopLevelRibbonBar();
00153     ASSERT_VALID(pRibbonBar);
00154
00155     CClientDC dc(pRibbonBar);
00156
00157     CFont* pOldFont = dc.SelectObject(pRibbonBar->GetFont());
00158     ASSERT(pOldFont != NULL);
00159
00160     int i = 0;
00161
00162     for (i = 0; i < m_arLabels.GetSize(); i++)
00163     {
00164       CSize szText = dc.GetTextExtent(m_arLabels [i]);
00165
00166       m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx);
00167       m_sizeMaxText.cy = max(m_sizeMaxText.cy, szText.cy);
00168     }
00169
00170     const int cxImage = m_listImages.GetImageSize().cx;
00171
00172     for (i = 0; i < m_arSubItems.GetSize(); i++)
00173     {
00174       CMFCRibbonBaseElement* pButton = m_arSubItems [i];
00175       ASSERT_VALID(pButton);
00176
00177       CString strText = pButton->GetText();
00178       CSize szText = dc.GetTextExtent(strText);
00179
00180       m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx - cxImage);
00181     }
00182
00183     dc.SelectObject(pOldFont);
00184   }
00185
00186   CMFCRibbonGallery::OnShowPopupMenu();
00187 }
00188
00189 CSize CRibbonListButton::GetIconSize() const
00190 {
00191   CSize size = CMFCRibbonGallery::GetIconSize();
00192
00193   if (m_bRightAlignedText)
00194   {
00195     if (size.cx > 0)
00196     {
00197       size.cx += 2 *(m_sizeMargins.cx + nCheckMargin) - nImageMargin + nTextOffsetX + m_sizeMaxText.cx;
00198     }
00199     else
00200     {
00201       size.cx = m_sizeMaxText.cx + 2 *(m_sizeMargins.cy + nCheckMargin + nTextOffsetX);
00202     }
00203
00204     if (size.cy > 0)
00205     {
00206       size.cy += 2 *(m_sizeMargins.cy - nImageMargin + nCheckMargin);
00207     }
00208     else
00209     {
00210       size.cy = m_sizeMaxText.cy + 2 * m_sizeMargins.cy;
00211     }
00212   }
00213   else
00214   {
00215     size.cy += nTextOffsetY + m_sizeMaxText.cy;
00216   }
00217
00218   return size;
00219 }
00220
00221 void CRibbonListButton::OnDrawPaletteIcon( CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* pIcon, COLORREF clrText)
00222 {
00223   ASSERT_VALID(this);
00224   ASSERT_VALID(pDC);
00225   ASSERT_VALID(pIcon);
00226   ASSERT(nIconIndex >= 0);
00227   ASSERT(nIconIndex < m_nIcons);
00228
00229   BOOL bChecked     = pIcon->IsChecked();
00230   BOOL bHighlighted = pIcon->IsHighlighted();
00231
00232   CRect rectText(0, 0, 0, 0);
00233
00234   if (m_bRightAlignedText)
00235   {
00236     if (!m_bSmallIcons)
00237     {
00238       rectIcon.DeflateRect(nCheckMargin, nCheckMargin, nImageMargin, nCheckMargin);
00239     }
00240
00241     CRect rect(rectIcon);
00242     rect.right  = rect.left + m_listImages.GetImageSize().cx + m_sizeMargins.cx * 2;
00243
00244     if (bChecked)
00245     {
00246       CMFCVisualManager::GetInstance()->OnDrawRibbonMenuCheckFrame(pDC, this, rect);
00247     }
00248
00249     if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
00250     {
00251       m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertCenter);
00252     }
00253     else if (bChecked)
00254     {
00255       CMFCToolBarMenuButton dummy;
00256       CMFCVisualManager::GetInstance()->OnDrawMenuCheck(pDC, &dummy, rect, bHighlighted, FALSE);
00257     }
00258
00259     rectText = rect;
00260     rectText.left  = rectText.right + nTextOffsetX;
00261     rectText.right = rectIcon.right;
00262   }
00263   else
00264   {
00265     if (!m_bSmallIcons)
00266     {
00267       rectIcon.DeflateRect(nImageMargin, nImageMargin);
00268     }
00269
00270     CRect rect(rectIcon);
00271     rect.bottom = rect.top + m_listImages.GetImageSize().cy;
00272
00273     if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
00274     {
00275       m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertTop);
00276     }
00277
00278     rectText = rect;
00279     rectText.top    = rectText.bottom + nTextOffsetY;
00280     rectText.bottom = rectIcon.bottom;
00281   }
00282
00283   if (!rectText.IsRectEmpty())
00284   {
00285     COLORREF clrOld = (COLORREF)-1;
00286     if (clrText != (COLORREF)-1)
00287     {
00288       clrOld = pDC->SetTextColor(clrText);
00289     }
00290
00291     CString strText = m_arLabels[nIconIndex];
00292     pDC->DrawText(strText, rectText, m_bRightAlignedText ? DT_VCENTER | DT_SINGLELINE | DT_LEFT : DT_TOP | DT_SINGLELINE | DT_CENTER | DT_END_ELLIPSIS);
00293
00294     if (clrText != (COLORREF)-1)
00295     {
00296       pDC->SetTextColor(clrOld);
00297     }
00298   }
00299 }
00300
00301 void CRibbonListButton::CopyFrom(const CMFCRibbonBaseElement& s)
00302 {
00303   ASSERT_VALID(this);
00304
00305   CMFCRibbonGallery::CopyFrom(s);
00306   CRibbonListButton& src = (CRibbonListButton&) s;
00307
00308   src.m_listImages.CopyTo(m_listImages);
00309   m_imagesPalette.SetImageSize (m_listImages.GetImageSize ());
00310
00311   m_arLabels.RemoveAll();
00312   m_arLabels.Copy(src.m_arLabels);
00313
00314   m_sizeMargins = src.m_sizeMargins;
00315   m_bRightAlignedText = src.m_bRightAlignedText;
00316   m_sizeMaxText = src.m_sizeMaxText;
00317 }
00318
00319 void CRibbonListButton::UpdateToolTips()
00320 {
00321   m_arToolTips.RemoveAll();
00322
00323   for (int i = 0; i < m_arLabels.GetSize(); i++)
00324   {
00325     SetItemToolTip(i, m_arLabels[i]);
00326   }
00327 }
00328
00329 IMPLEMENT_DYNCREATE(CRibbonListFontButton, CMFCRibbonGallery)
00330
00331 CRibbonListFontButton::CRibbonListFontButton()
00332 {
00333   m_sizeMargins = CSize(2, 2);
00334 }
00335
00336 CRibbonListFontButton::CRibbonListFontButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex) :
00337   CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
00338 {
00339   SetButtonMode(TRUE);
00340   SetIconsInRow(1);
00341
00342   m_sizeMargins = CSize(2, 2);
00343   m_sizeMaxText = CSize(0, 0);
00344 }
00345
00346 CRibbonListFontButton::CRibbonListFontButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems& arItems) :
00347   CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
00348 {
00349   SetButtonMode(TRUE);
00350   SetIconsInRow(1);
00351
00352   m_listImages.Load(uiImagesPaletteResID);
00353
00354   BITMAP bmp;
00355   GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);
00356
00357   m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
00358   m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
00359
00360   m_arItems.Copy(arItems);
00361   m_nIcons = (int) m_arItems.GetSize();
00362
00363   m_sizeMargins = CSize(2, 2);
00364   m_sizeMaxText = CSize(0, 0);
00365
00366   UpdateToolTips();
00367 }
00368
00369 CRibbonListFontButton::~CRibbonListFontButton()
00370 {
00371 }
00372
00373 void CRibbonListFontButton::AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems& arItems)
00374 {
00375   CMFCRibbonGallery::AddGroup(lpszGroupName, (int) arItems.GetSize());
00376   for (int i = 0; i < arItems.GetSize(); i++)
00377   {
00378     CMFCRibbonGallery::SetItemToolTip(i, arItems[i].m_Caption);
00379   }
00380
00381   if (m_listImages.GetCount() == 0)
00382   {
00383     m_listImages.Load(uiImagesPaletteResID);
00384
00385     BITMAP bmp;
00386     GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);
00387
00388     m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
00389     m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
00390   }
00391   else
00392   {
00393     ASSERT(cxPaletteImage == m_listImages.GetImageSize().cx);
00394     m_listImages.Load(uiImagesPaletteResID, NULL, TRUE);
00395   }
00396
00397   if (m_arItems.GetSize() == 0)
00398   {
00399     m_arItems.Copy(arItems);
00400   }
00401   else
00402   {
00403     m_arItems.Append(arItems);
00404   }
00405
00406   m_nIcons = (int) m_arItems.GetSize();
00407
00408   RemoveAll();
00409   m_sizeMaxText = CSize(0, 0);
00410
00411   UpdateToolTips();
00412 }
00413
00414 void CRibbonListFontButton::Clear()
00415 {
00416   CMFCRibbonGallery::Clear();
00417
00418   m_arItems.RemoveAll();
00419   m_sizeMaxText = CSize(0, 0);
00420 }
00421
00422 void CRibbonListFontButton::OnShowPopupMenu()
00423 {
00424   ASSERT_VALID(this);
00425
00426   CMFCRibbonBaseElement::OnShowPopupMenu();
00427
00428   if (m_sizeMaxText == CSize(0, 0))
00429   {
00430     CMFCRibbonBar* pRibbonBar = GetTopLevelRibbonBar();
00431     ASSERT_VALID(pRibbonBar);
00432
00433     CClientDC dc(pRibbonBar);
00434     CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontBold);
00435
00436     for (int i = 0; i < m_arItems.GetSize(); i++)
00437     {
00438       CSize szText = dc.GetTextExtent(m_arItems [i].m_Caption);
00439
00440       for (int j = 0; j < 2; j++)
00441       {
00442         LOGFONT& lf = m_arItems [i].m_Font[j];
00443
00444         CFont font;
00445         font.CreateFontIndirect(&lf);
00446         dc.SelectObject(&font);
00447
00448         CSize szText2 = dc.GetTextExtent(lf.lfFaceName);
00449
00450         szText.cx = max(szText.cx, szText2.cx);
00451         szText.cy += szText2.cy;
00452       }
00453
00454       m_arItems [i].m_Height = szText.cy;
00455
00456       m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx);
00457       m_sizeMaxText.cy = max(m_sizeMaxText.cy, szText.cy);
00458     }
00459
00460     dc.SelectObject(pOldFont);
00461   }
00462
00463   CMFCRibbonGallery::OnShowPopupMenu();
00464 }
00465
00466 CSize CRibbonListFontButton::GetIconSize() const
00467 {
00468   CSize size = CMFCRibbonGallery::GetIconSize();
00469
00470   size.cx += 2 *(m_sizeMargins.cx + nCheckMargin) - nImageMargin + nTextOffsetX + m_sizeMaxText.cx;
00471   size.cy += 2 *(m_sizeMargins.cy - nImageMargin + nCheckMargin);
00472
00473   return size;
00474 }
00475
00476 void CRibbonListFontButton::OnDrawPaletteIcon( CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* pIcon, COLORREF clrText)
00477 {
00478   ASSERT_VALID(this);
00479   ASSERT_VALID(pDC);
00480   ASSERT_VALID(pIcon);
00481   ASSERT(nIconIndex >= 0);
00482   ASSERT(nIconIndex < m_nIcons);
00483
00484   CRect rectText(0, 0, 0, 0);
00485
00486   if (!m_bSmallIcons)
00487   {
00488     rectIcon.DeflateRect(nCheckMargin, nCheckMargin, nImageMargin, nCheckMargin);
00489   }
00490
00491   CRect rect(rectIcon);
00492   rect.right  = rect.left + m_listImages.GetImageSize().cx + m_sizeMargins.cx * 2;
00493
00494   if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
00495   {
00496     m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertCenter);
00497   }
00498
00499   rectText = rect;
00500   rectText.left  = rectText.right + nTextOffsetX;
00501   rectText.right = rectIcon.right;
00502
00503   if (!rectText.IsRectEmpty())
00504   {
00505     COLORREF clrOld = (COLORREF)-1;
00506     if (clrText != (COLORREF)-1)
00507     {
00508       clrOld = pDC->SetTextColor(clrText);
00509     }
00510
00511     rectText.OffsetRect(0, (rectText.Height() - m_arItems [nIconIndex].m_Height) / 2);
00512
00513     CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontBold);
00514
00515     int nHeight = pDC->DrawText(m_arItems [nIconIndex].m_Caption, rectText, DT_TOP | DT_SINGLELINE | DT_LEFT);
00516     rectText.OffsetRect(0, nHeight);
00517
00518     for (int j = 0; j < 2; j++)
00519     {
00520       LOGFONT& lf = m_arItems [nIconIndex].m_Font[j];
00521
00522       CFont font;
00523       font.CreateFontIndirect(&lf);
00524       pDC->SelectObject(&font);
00525
00526       nHeight = pDC->DrawText(lf.lfFaceName, rectText, DT_TOP | DT_SINGLELINE | DT_LEFT);
00527       rectText.OffsetRect(0, nHeight);
00528     }
00529
00530     pDC->SelectObject(pOldFont);
00531
00532     if (clrText != (COLORREF)-1)
00533     {
00534       pDC->SetTextColor(clrOld);
00535     }
00536   }
00537 }
00538
00539 void CRibbonListFontButton::CopyFrom(const CMFCRibbonBaseElement& s)
00540 {
00541   ASSERT_VALID(this);
00542
00543   CMFCRibbonGallery::CopyFrom(s);
00544
00545   CRibbonListFontButton& src = (CRibbonListFontButton&) s;
00546
00547   src.m_listImages.CopyTo(m_listImages);
00548   m_imagesPalette.SetImageSize (m_listImages.GetImageSize ());
00549
00550
00551   m_arItems.RemoveAll();
00552   m_arItems.Copy(src.m_arItems);
00553
00554   m_sizeMargins = src.m_sizeMargins;
00555   m_sizeMaxText = src.m_sizeMaxText;
00556 }
00557
00558 void CRibbonListFontButton::UpdateToolTips()
00559 {
00560   m_arToolTips.RemoveAll();
00561
00562   for (int i = 0; i < m_arItems.GetSize(); i++)
00563   {
00564     SetItemToolTip(i, m_arItems [i].m_Caption);
00565   }
00566 }
00567
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/resource.h Source File

  • vc2008fp
  • DrawClient

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DrawClient.rc
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDR_DRAWCLTYPE                  3
00007 #define IDR_DRAWCLTYPE_CNTR_IP          6
00008 #define IDP_BUSY                        100
00009 #define IDP_OLE_INIT_FAILED             101
00010 #define IDD_PROP_RECT                   101
00011 #define IDP_FAILED_TO_CREATE            102
00012 #define IDC_WEIGHT                      102
00013 #define IDC_PENCIL                      102
00014 #define IDC_NOFILL                      103
00015 #define ID_POPUP_MENU                   103
00016 #define IDC_SPIN1                       104
00017 #define IDD_SUMM_PAGE                   104
00018 #define IDC_AUTHOR                      105
00019 #define IDD_STAT_PAGE                   105
00020 #define IDC_KEYWORDS                    106
00021 #define IDC_COMMENTS                    107
00022 #define IDC_TITLE                       108
00023 #define IDC_SUBJECT                     109
00024 #define IDC_TEMPLATE                    110
00025 #define IDB_RIBBON_MAIN                 110
00026 #define IDC_SAVEDBY                     111
00027 #define IDC_REVNUM                      112
00028 #define IDB_RIBBON_FILELARGE            112
00029 #define IDC_EDITTIME                    113
00030 #define IDB_RIBBON_FILESMALL            113
00031 #define IDC_LASTPRINT                   114
00032 #define IDC_CREATEDATE                  115
00033 #define IDC_LASTSAVE                    116
00034 #define IDR_THEME_MENU                  116
00035 #define IDC_NUMPAGES                    117
00036 #define IDB_RIBBON_ICONS                117
00037 #define IDC_NUMWORDS                    118
00038 #define IDR_WINDOWS_MENU                118
00039 #define IDC_NUMCHARS                    119
00040 #define IDR_POPUP_MDITABS               119
00041 #define IDC_APPNAME                     120
00042 #define IDR_POPUP_DROP_MDITABS          120
00043 #define IDC_SECURITY                    122
00044 #define IDC_THUMBNAIL                   123
00045 #define IDR_PROPERTY                    123
00046 #define IDR_PROPERTIES                  123
00047 #define IDB_RIBBON_HOMELARGE            126
00048 #define IDB_RIBBON_HOMESMALL            127
00049 #define IDB_RIBBON_VIEWSMALL            128
00050 #define IDB_RIBBON_VIEWLARGE            129
00051 #define IDB_STATUSBAR_1                 130
00052 #define IDB_STATUSBAR_2                 131
00053 #define IDB_RIBBON_FORMATLARGE          132
00054 #define IDB_RIBBON_FORMATSMALL          133
00055 #define IDB_LINEWEIGHT                  134
00056 #define IDD_LINEWEIGHT                  135
00057 #define IDB_STYLES                      136
00058 #define IDD_ABOUTBOX                    999
00059 #define ID_CANCEL_EDIT                  32768
00060 #define ID_VIEW_GRID                    32769
00061 #define ID_DRAW_SELECT                  32770
00062 #define ID_DRAW_LINE                    32771
00063 #define ID_DRAW_RECT                    32772
00064 #define ID_DRAW_ROUNDRECT               32773
00065 #define ID_DRAW_ELLIPSE                 32774
00066 #define ID_OBJECT_LINECOLOR             32775
00067 #define ID_OBJECT_FILLCOLOR             32776
00068 #define ID_OBJECT_MOVETOFRONT           32777
00069 #define ID_OBJECT_MOVETOBACK            32778
00070 #define ID_OBJECT_MOVEFORWARD           32779
00071 #define ID_OBJECT_MOVEBACK              32780
00072 #define ID_VIEW_PAPERCOLOR              32781
00073 #define ID_DRAW_POLYGON                 32782
00074 #define ID_VIEW_SHOWOBJECTS             32784
00075 #define ID_FILE_SUMMARYINFO             32792
00076 #define ID_WINDOWS_MENU                 32793
00077 #define ID_WINDOW_WINDOWS               32812
00078 #define ID_WINDOW_MANAGER               32813
00079 #define ID_VIEW_APPLOOK_2007            32818
00080 #define ID_VIEW_APPLOOK_2007_1          32819
00081 #define ID_VIEW_APPLOOK_2007_2          32820
00082 #define ID_VIEW_APPLOOK_2007_3          32821
00083 #define ID_VIEW_APPLOOK_SCENIC          32822
00084 #define ID_NEWWINDOW                    32823
00085 #define ID_MDI_NEW_HORZ_TAB_GROUP       32824
00086 #define ID_MDI_NEW_VERT_GROUP           32825
00087 #define ID_MDI_MOVE_TO_NEXT_GROUP       32826
00088 #define ID_MDI_MOVE_TO_PREV_GROUP       32827
00089 #define ID_MDI_CANCEL                   32828
00090 #define ID_EXPAND                       32829
00091 #define ID_SORTINGGROUP                 32830
00092 #define ID_STATUSBAR_PANE_OBJECTCOUNT   32831
00093 #define ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT 32832
00094 #define ID_TOOLS_OPTIONS                32833
00095 #define ID_OBJECT_NOFILL                32834
00096 #define ID_OBJECT_LINEWEIGHT            32835
00097 #define ID_OBJECT_LINEWEIGHT_MORE       32836
00098 #define ID_OBJECT_PROPERTIES            32838
00099 #define ID_OBJECT_NOLINE                32839
00100 #define ID_OBJECT_STYLES                32840
00101
00102 // Next default values for new objects
00103 //
00104 #ifdef APSTUDIO_INVOKED
00105 #ifndef APSTUDIO_READONLY_SYMBOLS
00106 #define _APS_NEXT_RESOURCE_VALUE        137
00107 #define _APS_NEXT_COMMAND_VALUE         32841
00108 #define _APS_NEXT_CONTROL_VALUE         124
00109 #define _APS_NEXT_SYMED_VALUE           101
00110 #endif
00111 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenctl.cpp Source File

  • controls
  • licensed

licenctl.cpp

Go to the documentation of this file.
00001 // licenctl.cpp : Implementation of the CLicensedCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "licensed.h"
00014 #include "licenctl.h"
00015 #include "licenppg.h"
00016
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023
00024 IMPLEMENT_DYNCREATE(CLicensedCtrl, COleControl)
00025
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // Message map
00029
00030 BEGIN_MESSAGE_MAP(CLicensedCtrl, COleControl)
00031   //{{AFX_MSG_MAP(CLicensedCtrl)
00032   //}}AFX_MSG_MAP
00033   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00034 END_MESSAGE_MAP()
00035
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // Dispatch map
00039
00040 BEGIN_DISPATCH_MAP(CLicensedCtrl, COleControl)
00041   //{{AFX_DISPATCH_MAP(CLicensedCtrl)
00042   //}}AFX_DISPATCH_MAP
00043   DISP_FUNCTION_ID(CLicensedCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00044 END_DISPATCH_MAP()
00045
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // Event map
00049
00050 BEGIN_EVENT_MAP(CLicensedCtrl, COleControl)
00051   //{{AFX_EVENT_MAP(CLicensedCtrl)
00052   //}}AFX_EVENT_MAP
00053 END_EVENT_MAP()
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // Property pages
00058
00059 // TODO: Add more property pages as needed.  Remember to increase the count!
00060 BEGIN_PROPPAGEIDS(CLicensedCtrl, 1)
00061   PROPPAGEID(CLicensedPropPage::guid)
00062 END_PROPPAGEIDS(CLicensedCtrl)
00063
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // Initialize class factory and guid
00067
00068 IMPLEMENT_OLECREATE_EX(CLicensedCtrl, "LICENSED.LicensedCtrl.1",
00069   0x973b27a3, 0xf232, 0x101a, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00070
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // Type library ID and version
00074
00075 IMPLEMENT_OLETYPELIB(CLicensedCtrl, _tlid, _wVerMajor, _wVerMinor)
00076
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // Interface IDs
00080
00081 const IID BASED_CODE IID_DLicensed =
00082     { 0x37446b80, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00083 const IID BASED_CODE IID_DLicensedEvents =
00084     { 0x37446b81, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00085
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // Control type information
00089
00090 static const DWORD BASED_CODE _dwLicensedOleMisc =
00091   OLEMISC_ACTIVATEWHENVISIBLE |
00092   OLEMISC_SETCLIENTSITEFIRST |
00093   OLEMISC_INSIDEOUT |
00094   OLEMISC_CANTLINKINSIDE |
00095   OLEMISC_RECOMPOSEONRESIZE;
00096
00097 IMPLEMENT_OLECTLTYPE(CLicensedCtrl, IDS_LICENSED, _dwLicensedOleMisc)
00098
00099
00100 /////////////////////////////////////////////////////////////////////////////
00101 // CLicensedCtrl::CLicensedCtrlFactory::UpdateRegistry -
00102 // Adds or removes system registry entries for CLicensedCtrl
00103
00104 BOOL CLicensedCtrl::CLicensedCtrlFactory::UpdateRegistry(BOOL bRegister)
00105 {
00106   if (bRegister)
00107     return AfxOleRegisterControlClass(
00108       AfxGetInstanceHandle(),
00109       m_clsid,
00110       m_lpszProgID,
00111       IDS_LICENSED,
00112       IDB_LICENSED,
00113       FALSE,                      //  Not insertable
00114       _dwLicensedOleMisc,
00115       _tlid,
00116       _wVerMajor,
00117       _wVerMinor);
00118   else
00119     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00120 }
00121
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // Licensing strings
00125
00126 static const TCHAR BASED_CODE _szLicFileName[] = _T("licensed.lic");
00127
00128 static const OLECHAR BASED_CODE _szLicString[] =
00129   OLESTR("Licensed Control Copyright (c) Microsoft Corporation");
00130
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CLicensedCtrl::CLicensedCtrlFactory::VerifyUserLicense -
00134 // Checks for existence of a user license
00135
00136 //Looks for "licensed.lic" file in the current output directory (Release or Debug)
00137
00138 BOOL CLicensedCtrl::CLicensedCtrlFactory::VerifyUserLicense()
00139 {
00140   BOOL foundLicFile = AfxVerifyLicFile(AfxGetInstanceHandle(), _szLicFileName,
00141     _szLicString);
00142
00143   // Display message box reporting whether or not license file was found
00144   if (foundLicFile)
00145     ::MessageBox(0, _T("Found license file !"), _T("VerifyUserLicense"), MB_OK | MB_ICONINFORMATION);
00146   else
00147     ::MessageBox(0, _T("Couldn't find license file !"), _T("VerifyUserLicense"), MB_OK | MB_ICONSTOP);
00148
00149   return (foundLicFile);
00150 }
00151
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 // CLicensedCtrl::CLicensedCtrlFactory::GetLicenseKey -
00155 // Returns a runtime licensing key
00156
00157 BOOL CLicensedCtrl::CLicensedCtrlFactory::GetLicenseKey(DWORD,
00158   BSTR FAR* pbstrKey)
00159 {
00160   if (pbstrKey == NULL)
00161     return FALSE;
00162
00163   *pbstrKey = SysAllocString(_szLicString);
00164   return (*pbstrKey != NULL);
00165 }
00166
00167
00168 /////////////////////////////////////////////////////////////////////////////
00169 // CLicensedCtrl::CLicensedCtrl - Constructor
00170
00171 CLicensedCtrl::CLicensedCtrl()
00172 {
00173   InitializeIIDs(&IID_DLicensed, &IID_DLicensedEvents);
00174 }
00175
00176
00177 /////////////////////////////////////////////////////////////////////////////
00178 // CLicensedCtrl::~CLicensedCtrl - Destructor
00179
00180 CLicensedCtrl::~CLicensedCtrl()
00181 {
00182 }
00183
00184
00185 /////////////////////////////////////////////////////////////////////////////
00186 // CLicensedCtrl::OnDraw - Drawing function
00187
00188 void CLicensedCtrl::OnDraw(
00189       CDC* pdc, const CRect& rcBounds, const CRect&)
00190 {
00191   TEXTMETRIC tm;
00192   CString line1("Licensed");
00193   CString line2("Control");
00194
00195   // Draw caption
00196
00197   CFont* pOldFont = SelectStockFont(pdc);
00198   GetStockTextMetrics(&tm);
00199
00200   pdc->SetTextAlign(TA_CENTER | TA_TOP);
00201   pdc->ExtTextOut((rcBounds.left + rcBounds.right) / 2, rcBounds.top, ETO_CLIPPED | ETO_OPAQUE, rcBounds, line1,
00202     line1.GetLength(), NULL);
00203   pdc->ExtTextOut((rcBounds.left + rcBounds.right) / 2, rcBounds.top + tm.tmHeight, ETO_CLIPPED, rcBounds,
00204     line2, line2.GetLength(), NULL);
00205   pdc->SelectObject(pOldFont);
00206 }
00207
00208
00209 /////////////////////////////////////////////////////////////////////////////
00210 // CLicensedCtrl::DoPropExchange - Persistence support
00211
00212 void CLicensedCtrl::DoPropExchange(CPropExchange* pPX)
00213 {
00214   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00215   COleControl::DoPropExchange(pPX);
00216
00217   if (pPX->IsLoading())
00218   {
00219     CFontHolder& stockFont = InternalGetFont();
00220     stockFont.InitializeFont();
00221   }
00222 }
00223
00224
00225 /////////////////////////////////////////////////////////////////////////////
00226 // CLicensedCtrl::OnResetState - Reset control to default state
00227
00228 void CLicensedCtrl::OnResetState()
00229 {
00230   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00231 }
00232
00233
00234 /////////////////////////////////////////////////////////////////////////////
00235 // CLicensedCtrl::AboutBox - Display an "About" box to the user
00236
00237 void CLicensedCtrl::AboutBox()
00238 {
00239   CDialog dlgAbout(IDD_ABOUTBOX_LICENSED);
00240   dlgAbout.DoModal();
00241 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapdoc.h Source File

  • general
  • snapvw

snapdoc.h

Go to the documentation of this file.
00001 // SnapDoc.h : interface of the CSnapDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 class CSnapDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CSnapDoc();
00018   DECLARE_DYNCREATE(CSnapDoc)
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CSnapDoc)
00029   public:
00030   virtual BOOL OnNewDocument();
00031   //}}AFX_VIRTUAL
00032
00033 // Implementation
00034 public:
00035   virtual ~CSnapDoc();
00036 #ifdef _DEBUG
00037   virtual void AssertValid() const;
00038   virtual void Dump(CDumpContext& dc) const;
00039 #endif
00040
00041 protected:
00042
00043 // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CSnapDoc)
00046     // NOTE - the ClassWizard will add and remove member functions here.
00047     //    DO NOT EDIT what you see in these blocks of generated code !
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmview.cpp Source File

  • general
  • dynamenu

dmview.cpp

Go to the documentation of this file.
00001 // dmview.cpp
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: implementation of the CDynaMenuView class
00013 //
00014 // Functions:
00015 //   Most of this file was generated by AppWizard.  The functions
00016 //   which contain code specific to this sample are:
00017 //
00018 //      CDynaMenuView::OnDraw()             -- draw the view contents
00019
00020 #include "stdafx.h"
00021 #include "dynamenu.h"
00022
00023 #include "dmdoc.h"
00024 #include "dmview.h"
00025
00026 #ifdef _DEBUG
00027 #undef THIS_FILE
00028 static char BASED_CODE THIS_FILE[] = __FILE__;
00029 #endif
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CDynaMenuView
00033
00034 IMPLEMENT_DYNCREATE(CDynaMenuView, CView)
00035
00036 BEGIN_MESSAGE_MAP(CDynaMenuView, CView)
00037   //{{AFX_MSG_MAP(CDynaMenuView)
00038     // NOTE - the ClassWizard will add and remove mapping macros here.
00039     //    DO NOT EDIT what you see in these blocks of generated code!
00040   //}}AFX_MSG_MAP
00041   // Standard printing commands
00042   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00043   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00044 END_MESSAGE_MAP()
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CDynaMenuView construction/destruction
00048
00049 CDynaMenuView::CDynaMenuView()
00050 {
00051   // TODO: add construction code here
00052 }
00053
00054 CDynaMenuView::~CDynaMenuView()
00055 {
00056 }
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CDynaMenuView drawing
00060
00061 //***********************************************************************
00062 // Function: CDynaMenuView::OnDraw()
00063 //
00064 // Purpose:
00065 //    OnDraw is called by the framework to render an image of the
00066 //    document.
00067 //
00068 //    We'll just put a string in the center of the client area for
00069 //    demonstration purposes.  The string is drawn in the current
00070 //    color selected for the associated document.
00071 //
00072 // Parameters:
00073 //    none
00074 //
00075 // Returns:
00076 //    none.
00077 //
00078 // Comments:
00079 //    see the CView::OnDraw() documentation for further information
00080 //
00081 //***********************************************************************
00082 void CDynaMenuView::OnDraw(CDC* pDC)
00083 {
00084   CDynaMenuDoc* pDoc = GetDocument();
00085   ASSERT_VALID(pDoc);
00086
00087   // set color to use for text
00088   int iColor   = pDoc->m_iColor;
00089   COLORREF crf = CDynaMenuDoc::m_aColorDef[iColor].m_crf;
00090
00091   pDC->SetTextColor(crf);
00092   pDC->SetBkMode(TRANSPARENT);
00093
00094   // output a string to the center of the client area
00095   CRect rc;
00096   GetClientRect(rc);
00097   pDC->DrawText(_T("This text is displayed in the current color."), -1,
00098           rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
00099
00100 }
00101
00102 /////////////////////////////////////////////////////////////////////////////
00103 // CDynaMenuView printing
00104
00105 BOOL CDynaMenuView::OnPreparePrinting(CPrintInfo* pInfo)
00106 {
00107   // default preparation
00108   return DoPreparePrinting(pInfo);
00109 }
00110
00111 void CDynaMenuView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00112 {
00113   // TODO: add extra initialization before printing
00114 }
00115
00116 void CDynaMenuView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00117 {
00118   // TODO: add cleanup after printing
00119 }
00120
00121 /////////////////////////////////////////////////////////////////////////////
00122 // CDynaMenuView diagnostics
00123
00124 #ifdef _DEBUG
00125 void CDynaMenuView::AssertValid() const
00126 {
00127   CView::AssertValid();
00128 }
00129
00130 void CDynaMenuView::Dump(CDumpContext& dc) const
00131 {
00132   CView::Dump(dc);
00133 }
00134
00135 CDynaMenuDoc* CDynaMenuView::GetDocument() // non-debug version is inline
00136 {
00137   return STATIC_DOWNCAST(CDynaMenuDoc, m_pDocument);
00138 }
00139 #endif //_DEBUG
00140
00141 /////////////////////////////////////////////////////////////////////////////
00142 // CDynaMenuView message handlers
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackvw.cpp Source File

  • general
  • tracker

trackvw.cpp

Go to the documentation of this file.
00001 // trackvw.cpp : implementation of the CTrackerView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "trackapp.h"
00015
00016 #include "trackdoc.h"
00017 #include "trackvw.h"
00018 #include "dialogs.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CTrackerView
00027
00028 IMPLEMENT_DYNCREATE(CTrackerView, CView)
00029
00030 BEGIN_MESSAGE_MAP(CTrackerView, CView)
00031   //{{AFX_MSG_MAP(CTrackerView)
00032   ON_WM_LBUTTONDOWN()
00033   ON_WM_SETCURSOR()
00034   ON_COMMAND(ID_VIEW_SETHANDLESIZE, OnViewSethandlesize)
00035   ON_COMMAND(ID_VIEW_SETMINIMUMSIZE, OnViewSetminimumsize)
00036   //}}AFX_MSG_MAP
00037   // Standard printing commands
00038   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00039   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CTrackerView construction/destruction
00044
00045 CTrackerView::CTrackerView()
00046 {
00047   // TODO: add construction code here
00048 }
00049
00050 CTrackerView::~CTrackerView()
00051 {
00052 }
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CTrackerView drawing
00056
00057 static void SetNormalRect(CRect& rect, int left, int top, int width, int height)
00058 {
00059   // set it
00060   rect.left = left;
00061   rect.top = top;
00062   rect.right = left + width;
00063   rect.bottom = top + height;
00064
00065   // normalize it
00066   int nTemp;
00067   if (rect.left > rect.right)
00068   {
00069     nTemp = rect.left;
00070     rect.left = rect.right;
00071     rect.right = nTemp;
00072   }
00073   if (rect.top > rect.bottom)
00074   {
00075     nTemp = rect.top;
00076     rect.top = rect.bottom;
00077     rect.bottom = nTemp;
00078   }
00079 }
00080
00081 void CTrackerView::OnDraw(CDC* pDC)
00082 {
00083   CTrackerDoc* pDoc = GetDocument();
00084
00085   CBrush* pOldBrush = NULL;
00086   TRY
00087   {
00088     // draw inside in various colors
00089     CBrush brush1, brush2;
00090     CRect rect;
00091     int nWidth = pDoc->m_tracker.m_rect.Width();
00092     int nHeight = pDoc->m_tracker.m_rect.Height();
00093     int nSgnX = nWidth != 0 ? nWidth / abs(nWidth) : 1;
00094     int nSgnY = nHeight != 0 ? nHeight / abs(nHeight) : 1;
00095     pDC->SetTextAlign(TA_CENTER);
00096     pDC->SetBkMode(TRANSPARENT);
00097     int nCenterX, nCenterY;
00098
00099     TEXTMETRIC tm;
00100     pDC->GetTextMetrics(&tm);
00101
00102     brush1.CreateSolidBrush(RGB(255, 0, 0));
00103     pOldBrush = pDC->SelectObject(&brush1);
00104     SetNormalRect(rect, pDoc->m_tracker.m_rect.left,
00105       pDoc->m_tracker.m_rect.top, nWidth/2, nHeight/2);
00106     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
00107     nCenterX = rect.left + rect.Width()/2;
00108     nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
00109     pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("1"), 1, NULL);
00110
00111     brush2.CreateSolidBrush(RGB(0, 255, 0));
00112     pDC->SelectObject(&brush2);
00113     brush1.DeleteObject();
00114     SetNormalRect(rect, pDoc->m_tracker.m_rect.left+nWidth/2,
00115       pDoc->m_tracker.m_rect.top, (nWidth+nSgnX)/2, nHeight/2);
00116     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
00117     nCenterX = rect.left + rect.Width()/2;
00118     nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
00119     pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("2"), 1, NULL);
00120
00121     brush1.CreateSolidBrush(RGB(0, 0, 255));
00122     pDC->SelectObject(&brush1);
00123     brush2.DeleteObject();
00124     SetNormalRect(rect, pDoc->m_tracker.m_rect.left,
00125       pDoc->m_tracker.m_rect.top+nHeight/2, nWidth/2, (nHeight+nSgnY)/2);
00126     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
00127     nCenterX = rect.left + rect.Width()/2;
00128     nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
00129     pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("3"), 1, NULL);
00130
00131     brush2.CreateSolidBrush(RGB(192, 192, 192));
00132     pDC->SelectObject(&brush2);
00133     brush1.DeleteObject();
00134     SetNormalRect(rect, pDoc->m_tracker.m_rect.left+nWidth/2,
00135       pDoc->m_tracker.m_rect.top+nHeight/2,
00136       (nWidth+nSgnX)/2, (nHeight+nSgnY)/2);
00137     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
00138     nCenterX = rect.left + rect.Width()/2;
00139     nCenterY = rect.top + rect.Height()/2 - tm.tmHeight/2;
00140     pDC->ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, rect, _T("4"), 1, NULL);
00141
00142     // cleanup DC
00143     if (pOldBrush != NULL)
00144       pDC->SelectObject(pOldBrush);
00145     brush2.DeleteObject();
00146
00147     // draw tracker on outside
00148     pDoc->m_tracker.Draw(pDC);
00149   }
00150   CATCH_ALL(e)
00151   {
00152     if (pOldBrush != NULL)
00153       pDC->SelectObject(pOldBrush);
00154   }
00155   END_CATCH_ALL
00156 }
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CTrackerView printing
00160
00161 BOOL CTrackerView::OnPreparePrinting(CPrintInfo* pInfo)
00162 {
00163   // default preparation
00164   return DoPreparePrinting(pInfo);
00165 }
00166
00167 void CTrackerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00168 {
00169   // TODO: add extra initialization before printing
00170 }
00171
00172 void CTrackerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00173 {
00174   // TODO: add cleanup after printing
00175 }
00176
00177
00178
00179
00180 /////////////////////////////////////////////////////////////////////////////
00181 // CTrackerView diagnostics
00182
00183 #ifdef _DEBUG
00184 void CTrackerView::AssertValid() const
00185 {
00186   CView::AssertValid();
00187 }
00188
00189 void CTrackerView::Dump(CDumpContext& dc) const
00190 {
00191   CView::Dump(dc);
00192 }
00193
00194 CTrackerDoc* CTrackerView::GetDocument() // non-debug version is inline
00195 {
00196   return STATIC_DOWNCAST(CTrackerDoc, m_pDocument);
00197 }
00198
00199 #endif //_DEBUG
00200
00201 /////////////////////////////////////////////////////////////////////////////
00202 // CTrackerView update
00203
00204 void CTrackerView::OnUpdate(CView* /*pSender*/, LPARAM lHint, CObject* /*pHint*/)
00205 {
00206   if (lHint == 0)
00207   {
00208     CRect rectTrue;
00209     CTrackerDoc* pDoc = GetDocument();
00210     pDoc->m_tracker.GetTrueRect(&rectTrue);
00211     InvalidateRect(rectTrue);
00212   }
00213   else
00214   {
00215     InvalidateRect((CRect*)lHint);
00216   }
00217 }
00218
00219 /////////////////////////////////////////////////////////////////////////////
00220 // CTrackerView message handlers
00221
00222 void CTrackerView::OnLButtonDown(UINT nFlags, CPoint point)
00223 {
00224   CTrackerDoc* pDoc = GetDocument();
00225   CRect rectSave;
00226   pDoc->m_tracker.GetTrueRect(rectSave);
00227   if (pDoc->m_tracker.HitTest(point) < 0)
00228   {
00229     // just to demonstrate CRectTracker::TrackRubberBand
00230     CRectTracker tracker;
00231     if (tracker.TrackRubberBand(this, point, pDoc->m_bAllowInvert))
00232     {
00233       MessageBeep(0); // beep indicates TRUE
00234
00235       // see if rubber band intersects with the doc's tracker
00236       CRect rectT;
00237       tracker.m_rect.NormalizeRect(); // so intersect rect works
00238       if (rectT.IntersectRect(tracker.m_rect, pDoc->m_tracker.m_rect))
00239       {
00240         // if so, put resize handles on it (ie. select it)
00241         if (pDoc->m_tracker.m_nStyle & CRectTracker::resizeInside)
00242         {
00243           // swap from resize inside to resize outside for effect
00244           pDoc->m_tracker.m_nStyle &= ~CRectTracker::resizeInside;
00245           pDoc->m_tracker.m_nStyle |= CRectTracker::resizeOutside;
00246         }
00247         else
00248         {
00249           // just use inside resize handles on first time
00250           pDoc->m_tracker.m_nStyle &= ~CRectTracker::resizeOutside;
00251           pDoc->m_tracker.m_nStyle |= CRectTracker::resizeInside;
00252         }
00253         pDoc->SetModifiedFlag();
00254         pDoc->UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectSave);
00255         pDoc->UpdateAllViews(NULL);
00256       }
00257     }
00258   }
00259   else if (pDoc->m_tracker.Track(this, point, pDoc->m_bAllowInvert))
00260   {
00261     // normal tracking action, when tracker is "hit"
00262     pDoc->SetModifiedFlag();
00263     pDoc->UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectSave);
00264     pDoc->UpdateAllViews(NULL);
00265   }
00266   CView::OnLButtonDown(nFlags, point);
00267 }
00268
00269
00270 BOOL CTrackerView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00271 {
00272   // forward to tracker
00273   CTrackerDoc* pDoc = GetDocument();
00274   if (pWnd == this && pDoc->m_tracker.SetCursor(this, nHitTest))
00275     return TRUE;
00276
00277   return CView::OnSetCursor(pWnd, nHitTest, message);
00278 }
00279
00280
00281 void CTrackerView::OnViewSethandlesize()
00282 {
00283   CTrackerDoc* pDoc = GetDocument();
00284   CHandleSize dlg;
00285   dlg.m_nHandleSize = pDoc->m_tracker.m_nHandleSize;
00286   if (dlg.DoModal() == IDOK)
00287   {
00288     pDoc->m_tracker.m_nHandleSize = dlg.m_nHandleSize;
00289     pDoc->UpdateAllViews(NULL);
00290   }
00291 }
00292
00293 void CTrackerView::OnViewSetminimumsize()
00294 {
00295   CTrackerDoc* pDoc = GetDocument();
00296   CMinSize dlg;
00297   dlg.m_nMinX = pDoc->m_tracker.m_sizeMin.cx;
00298   dlg.m_nMinY = pDoc->m_tracker.m_sizeMin.cy;
00299   if (dlg.DoModal() == IDOK)
00300   {
00301     pDoc->m_tracker.m_sizeMin.cx = dlg.m_nMinX;
00302     pDoc->m_tracker.m_sizeMin.cy = dlg.m_nMinY;
00303     pDoc->UpdateAllViews(NULL);
00304   }
00305 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLocalComboBox Member List

This is the complete list of members for CLocalComboBox, including all inherited members.
GetTheText(CString &str) | CLocalComboBox |
HasFocus() | CLocalComboBox | [inline]
LimitText(int nMaxChars) | CLocalComboBox |
m_arrayFontDesc | CLocalComboBox |
m_nFontHeight | CLocalComboBox | [static]
m_nLimitText | CLocalComboBox |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CLocalComboBox |
PreTranslateMessage(MSG *pMsg) | CLocalComboBox | [virtual]
SetTheText(LPCTSTR lpszText, BOOL bMatchExact=FALSE) | CLocalComboBox |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/cntritem.h Source File

  • ole
  • drawcli

cntritem.h

Go to the documentation of this file.
00001 // cntritem.h : interface of the CDrawItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CDrawDoc;
00013 class CDrawView;
00014
00015 class CDrawItem : public COleClientItem
00016 {
00017   DECLARE_SERIAL(CDrawItem)
00018
00019 // Constructors
00020 public:
00021   CDrawItem(CDrawDoc* pContainer = NULL, CDrawOleObj* pDrawObj = NULL);
00022     // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE
00023     //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00024     //  zero arguments.  Normally, OLE items are constructed with a
00025     //  non-NULL document pointer.
00026
00027 // Attributes
00028 public:
00029   CDrawDoc* GetDocument()
00030     { return (CDrawDoc*)COleClientItem::GetDocument(); }
00031   CDrawView* GetActiveView()
00032     { return (CDrawView*)COleClientItem::GetActiveView(); }
00033
00034   CDrawOleObj* m_pDrawObj;    // back pointer to OLE draw object
00035
00036 // Operations
00037   BOOL UpdateExtent();
00038
00039 // Implementation
00040 public:
00041   ~CDrawItem();
00042 #ifdef _DEBUG
00043   virtual void AssertValid() const;
00044   virtual void Dump(CDumpContext& dc) const;
00045 #endif
00046   virtual void Serialize(CArchive& ar);
00047   virtual void OnGetItemPosition(CRect& rPosition);
00048
00049 protected:
00050   virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
00051   virtual BOOL OnChangeItemPosition(const CRect& rectPos);
00052   virtual void OnDeactivateUI(BOOL bUndoable);
00053   virtual void OnActivate();
00054 };
00055
00056 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/resource.h Source File

  • vc2008fp
  • WorkSpaceToolBar

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by WorkSpaceToolBar.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDS_WINDOWS_MANAGER             107
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_WORKSPTYPE                  129
00010 #define IDR_CONTEXT_MENU                130
00011 #define IDR_POPUP_TOOLBAR               131
00012 #define IDB_WORKSPACE                   147
00013 #define IDR_WORKSPACE_TOOLBAR           153
00014 #define IDD_ABOUTBOX                    999
00015 #define IDC_COMPANY_URL                 1041
00016 #define ID_VIEW_CUSTOMIZE               32770
00017 #define ID_VIEW_TOOLBARS                32771
00018 #define ID_VIEW_WORKSPACE               32803
00019 #define ID_WINDOW_MANAGER               32823
00020 #define ID_COMMAND_1                    32824
00021 #define ID_COMMAND_2                    32825
00022 #define ID_COMMAND_3                    32826
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028 #define _APS_3D_CONTROLS                     1
00029 #define _APS_NEXT_RESOURCE_VALUE        155
00030 #define _APS_NEXT_COMMAND_VALUE         32827
00031 #define _APS_NEXT_CONTROL_VALUE         1042
00032 #define _APS_NEXT_SYMED_VALUE           108
00033 #endif
00034 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/animctrl.cpp Source File

  • general
  • CmnCtrl1

animctrl.cpp

Go to the documentation of this file.
00001 // animctrl.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "CmnCtrl1.h"
00014 #include "animctrl.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CAnimateCtrlPage property page
00023
00024 CAnimateCtrlPage::CAnimateCtrlPage()
00025   : CPropertyPage(CAnimateCtrlPage::IDD),
00026   m_dwStyle(WS_CHILD|WS_VISIBLE|ACS_CENTER)
00027 {
00028   //{{AFX_DATA_INIT(CAnimateCtrlPage)
00029   m_cstrFileName = _T("");
00030   m_bCentered = TRUE;
00031   m_bTransparent = FALSE;
00032   m_bAutoplay = FALSE;
00033   //}}AFX_DATA_INIT
00034   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00035 }
00036
00037 void CAnimateCtrlPage::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CPropertyPage::DoDataExchange(pDX);
00040   //{{AFX_DATA_MAP(CAnimateCtrlPage)
00041   DDX_Check(pDX, IDC_CENTER, m_bCentered);
00042   DDX_Check(pDX, IDC_TRANSPARENT, m_bTransparent);
00043   DDX_Check(pDX, IDC_AUTOPLAY, m_bAutoplay);
00044   DDX_Text(pDX, IDC_EDIT1, m_cstrFileName);
00045   //}}AFX_DATA_MAP
00046 }
00047
00048 BEGIN_MESSAGE_MAP(CAnimateCtrlPage, CPropertyPage)
00049   //{{AFX_MSG_MAP(CAnimateCtrlPage)
00050   ON_EN_KILLFOCUS(IDC_EDIT1, OnFileChange)
00051   ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
00052   ON_BN_CLICKED(IDC_CENTER, OnCenter)
00053   ON_BN_CLICKED(IDC_TRANSPARENT, OnTransparent)
00054   ON_BN_CLICKED(IDC_AUTOPLAY, OnAutoplay)
00055   ON_BN_CLICKED(IDC_PLAY, OnPlay)
00056   ON_BN_CLICKED(IDC_STOP, OnStop)
00057   //}}AFX_MSG_MAP
00058 END_MESSAGE_MAP()
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CAnimateCtrlPage message handlers
00062 BOOL CAnimateCtrlPage::OnInitDialog()
00063 {
00064   if(!CPropertyPage::OnInitDialog())
00065     return FALSE;
00066
00067   // Create animation control inside static frame.
00068   // This is necessary to avoid having the animation control
00069   // "overflow" the rectangle assigned to it when the
00070   // ACS_CENTER style is removed.
00071
00072   CWnd* pFrame = GetDlgItem(IDC_ANIMFRAME);
00073   pFrame->GetClientRect(&m_rectAnimateCtrl);
00074   m_AnimateCtrl.Create(m_dwStyle, m_rectAnimateCtrl, pFrame, IDC_ANIMATE);
00075
00076   return TRUE;
00077 }
00078
00079 void CAnimateCtrlPage::OnFileChange()
00080 {
00081   UpdateData();
00082   CFileStatus filestatus;
00083   if(CFile::GetStatus(m_cstrFileName, filestatus))
00084     ApplyChanges();
00085 }
00086
00087 void CAnimateCtrlPage::OnBrowse()
00088 {
00089   CFileDialog dlg( TRUE,_T("AVI"),_T("*.AVI"),
00090            OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
00091            _T("Animation (*.AVI)|*.AVI|"));
00092
00093   if( dlg.DoModal()==IDOK )
00094   {
00095     m_cstrFileName = dlg.GetPathName();
00096     UpdateData(FALSE);
00097     ApplyChanges();
00098   }
00099 }
00100
00101 void CAnimateCtrlPage::OnCenter()
00102 {
00103   UpdateData();
00104   if( m_bCentered )
00105     m_dwStyle |= ACS_CENTER;
00106   else
00107     m_dwStyle &= ~ACS_CENTER;
00108   ApplyChanges();
00109 }
00110
00111 void CAnimateCtrlPage::OnTransparent()
00112 {
00113   UpdateData();
00114   if( m_bTransparent )
00115     m_dwStyle |= ACS_TRANSPARENT;
00116   else
00117     m_dwStyle &= ~ACS_TRANSPARENT;
00118   ApplyChanges();
00119 }
00120
00121 void CAnimateCtrlPage::OnAutoplay()
00122 {
00123   UpdateData();
00124   if( m_bAutoplay )
00125     m_dwStyle |= ACS_AUTOPLAY;
00126   else
00127     m_dwStyle &= ~ACS_AUTOPLAY;
00128   ApplyChanges();
00129 }
00130
00131 void CAnimateCtrlPage::OnPlay()
00132 {
00133   // From frame: 1, To frame: end (0xFFFF, or -1),
00134   // Play once (1)
00135   m_AnimateCtrl.Play(0,0xFFFF,1);
00136 }
00137
00138 void CAnimateCtrlPage::OnStop()
00139 {
00140   m_AnimateCtrl.Stop();
00141 }
00142
00143 void CAnimateCtrlPage::ApplyChanges()
00144 {
00145   // Stop any current animation and close the animation file
00146   m_AnimateCtrl.Stop();
00147   m_AnimateCtrl.Close();
00148
00149   // Set the new style
00150   ::SetWindowLong(m_AnimateCtrl.GetSafeHwnd(), GWL_STYLE, m_dwStyle);
00151   // A call to SetWindowPos forces the window to re-read its style
00152   m_AnimateCtrl.SetWindowPos(NULL, 0, 0, m_rectAnimateCtrl.Width(), m_rectAnimateCtrl.Height(),
00153                  SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
00154
00155   m_AnimateCtrl.Open(m_cstrFileName);
00156   // force repaint of the portion of the property page occupied by the control
00157   InvalidateRect(&m_rectAnimateCtrl);
00158   UpdateWindow();
00159 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/resource.h Source File

  • general
  • ctrltest

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by ctrltest.rc
00004 //
00005 #define IDS_YOU_CHOSE                   1
00006 #define IDS_PLEASE_SELECT_COLOR         2
00007 #define IDM_TEST_BITMAP_BUTTON1         400
00008 #define IDM_TEST_BITMAP_BUTTON2         401
00009 #define IDM_TEST_BITMAP_BUTTON3         402
00010 #define IDM_TEST_CUSTOM_LIST            403
00011 #define IDM_TEST_CUSTOM_MENU            405
00012 #define IDM_TEST_DERIVED_EDIT           406
00013 #define IDM_TEST_PENEDIT_CODE           407
00014 #define IDM_TEST_PENEDIT_FEATURES       408
00015 #define IDM_TEST_PENEDIT_TEMPLATE       409
00016 #define IDM_TEST_SPIN_EDIT              410
00017 #define IDM_TEST_SUB_EDIT               411
00018 #define IDM_TEST_WNDCLASS_EDIT          412
00019 #define IDD_CUSTOM_LIST                 500
00020 #define IDD_DERIVED_EDIT                501
00021 #define IDD_SUB_EDIT                    505
00022 #define IDD_SUB_PENEDIT                 506
00023 #define IDC_NUMBEROUT                   1000
00024 #define IDS_COLOR_NAME_FIRST            2000
00025 #define IDS_COLOR_NAME_BLUE             2001
00026 #define IDS_COLOR_NAME_GREEN            2002
00027 #define IDS_COLOR_NAME_CYAN             2003
00028 #define IDS_COLOR_NAME_RED              2004
00029 #define IDS_COLOR_NAME_MAGENTA          2005
00030 #define IDS_COLOR_NAME_YELLOW           2006
00031 #define IDS_COLOR_NAME_WHITE            2007
00032 #define IDS_YOU_PICKED_COLOR            2008
00033 #define IDS_MENU_TEST                   2009
00034 #define IDS_ILLEGAL_VALUE               2010
00035 #define IDS_MUSCRL32_DLL_REQUIRED       2011
00036 #define IDS_WNDCLASS_NOT_REGISTERED     2012
00037 #define IDC_EDIT1                       2101
00038 #define IDC_EDIT2                       2102
00039 #define IDC_EDIT3                       2103
00040 #define IDC_EDIT4                       2104
00041 #define IDC_LISTBOX1                    2301
00042 #define ID_PREV                         0x8000
00043 #define ID_NEXT                         0x8001
00044
00045 // Next default values for new objects
00046 //
00047 #ifdef APSTUDIO_INVOKED
00048 #ifndef APSTUDIO_READONLY_SYMBOLS
00049 #define _APS_NEXT_RESOURCE_VALUE        103
00050 #define _APS_NEXT_COMMAND_VALUE         57667
00051 #define _APS_NEXT_CONTROL_VALUE         1004
00052 #define _APS_NEXT_SYMED_VALUE           101
00053 #endif
00054 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll1.h Source File

  • advanced
  • dllhusk

testdll1.h

Go to the documentation of this file.
00001 // TESTDLL1.H Public API exported from 'TESTDLL1.DLL'
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 // Note: This sample uses AFX_EXT_CLASS to export an entire class.
00013 // This avoids creating a .DEF file with all the decorated names for
00014 // the class.  Creating a .DEF file is more efficient since the names
00015 // can be exported by ordinal.  To use that method of exporting, much
00016 // like MFC does itself, uncomment the following two lines and add
00017 // the appropriate lines to your .DEF file.
00018
00019 //#undef AFX_DATA
00020 //#define AFX_DATA AFX_EXT_DATA
00021
00022 // Initialize the DLL, register the classes etc
00023 extern "C" AFX_EXT_API void WINAPI InitTestDLL1();
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // Simple Text document
00027
00028 class AFX_EXT_CLASS CTextDoc : public CDocument
00029 {
00030   DECLARE_DYNCREATE(CTextDoc)
00031 protected:
00032   void Serialize(CArchive& ar);
00033   //{{AFX_MSG(CTextDoc)
00034   //}}AFX_MSG
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // Simple output view
00040
00041 class AFX_EXT_CLASS CHelloView : public CView
00042 {
00043   DECLARE_DYNCREATE(CHelloView)
00044 public:
00045   CHelloView();
00046
00047 // Implementation
00048 protected:
00049   UINT m_nIDColor;        // last color command
00050   COLORREF m_clrText;
00051
00052   virtual void OnDraw(CDC* pDC);
00053   // message handlers
00054   //{{AFX_MSG(CHelloView)
00055   afx_msg void OnColor();
00056   afx_msg void OnCustomColor();
00057   afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
00058   //}}AFX_MSG
00059
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // Simple do-nothing document
00065
00066 class AFX_EXT_CLASS CDummyDoc : public CDocument
00067 {
00068   DECLARE_DYNCREATE(CDummyDoc)
00069 protected:
00070   //{{AFX_MSG(CDummyDoc)
00071   //}}AFX_MSG
00072   DECLARE_MESSAGE_MAP()
00073 };
00074
00075 #undef AFX_DATA
00076 #define AFX_DATA
00077
00078 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynamicHelpViewBar Member List

This is the complete list of members for CDynamicHelpViewBar, including all inherited members.
AdjustLayout() | CDynamicHelpViewBar |
CDynamicHelpViewBar() | CDynamicHelpViewBar |
FillHelp() | CDynamicHelpViewBar | [protected]
m_DynamicHelpImages | CDynamicHelpViewBar | [protected]
m_wndArticles | CDynamicHelpViewBar | [protected]
m_wndToolBar | CDynamicHelpViewBar | [protected]
OnChangeVisualStyle() | CDynamicHelpViewBar |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CDynamicHelpViewBar | [protected]
OnDhelp1() | CDynamicHelpViewBar | [protected]
OnDhelp2() | CDynamicHelpViewBar | [protected]
OnDhelp3() | CDynamicHelpViewBar | [protected]
OnEraseWorkArea(CDC *pDC, CRect rectWorkArea) | CDynamicHelpViewBar | [protected, virtual]
OnPaint() | CDynamicHelpViewBar | [protected]
OnSelectTree(NMHDR *pNMHDR, LRESULT *pResult) | CDynamicHelpViewBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CDynamicHelpViewBar | [protected]
OnSize(UINT nType, int cx, int cy) | CDynamicHelpViewBar | [protected]
OnUpdateDhelp1(CCmdUI *pCmdUI) | CDynamicHelpViewBar | [protected]
OnUpdateDhelp2(CCmdUI *pCmdUI) | CDynamicHelpViewBar | [protected]
OnUpdateDhelp3(CCmdUI *pCmdUI) | CDynamicHelpViewBar | [protected]
~CDynamicHelpViewBar() | CDynamicHelpViewBar | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIconListProp Member List

This is the complete list of members for CIconListProp, including all inherited members.
CIconListProp(const CString &strName, const CImageList &imageListIcons, int nSelectedIcon, CStringList *plstIconNames=NULL, LPCTSTR lpszDescr=NULL, DWORD dwData=0) | CIconListProp |
CreateCombo(CWnd *pWndParent, CRect rect) | CIconListProp | [protected, virtual]
CreateInPlaceEdit(CRect rectEdit, BOOL &bDefaultFormat) | CIconListProp | [protected, virtual]
m_imageListIcons | CIconListProp | [protected]
m_lstIconNames | CIconListProp | [protected]
OnDrawValue(CDC *pDC, CRect rect) | CIconListProp | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/stdafx.cpp Source File

  • controls
  • circ

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/bounce.cpp Source File

  • advanced
  • mtmdi

bounce.cpp

Go to the documentation of this file.
00001 // bounce.cpp : Defines the class behaviors for the Bounce child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mdi.h"
00014 #include "bounce.h"
00015 #include "mtbounce.h"
00016
00017 #define ABS(x) ((x) < 0? -(x) : (x) > 0? (x) : 0)
00018
00019 BEGIN_MESSAGE_MAP(CBounceMDIChildWnd, CMDIChildWnd)
00020   //{{AFX_MSG_MAP(CBounceMDIChildWnd)
00021   ON_WM_SIZE()
00022   //}}AFX_MSG_MAP
00023   ON_MESSAGE(WM_USER_PREPARE_TO_CLOSE, OnPrepareToClose)
00024 END_MESSAGE_MAP()
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CBounceMDIChildWnd
00028
00029 CMenu CBounceMDIChildWnd::menu;        // menu for all BOUNCE windows
00030
00031 CBounceMDIChildWnd::CBounceMDIChildWnd()
00032 {
00033 }
00034
00035 BOOL CBounceMDIChildWnd::Create(LPCTSTR szTitle, LONG style /* = 0 */,
00036   const RECT& rect /* = rectDefault */,
00037   CMDIFrameWnd* parent /* = NULL */)
00038 {
00039   // Setup the shared menu
00040   if (menu.m_hMenu == NULL)
00041     menu.LoadMenu(IDR_BOUNCE);
00042   m_hMenuShared = menu.m_hMenu;
00043
00044   if (!CMDIChildWnd::Create(NULL, szTitle, style, rect, parent))
00045     return FALSE;
00046
00047   // The default PostNcDestroy handler will delete this CBounceMDIChildWnd
00048   // object when destroyed.  When Windows destroys the CBounceMDIChildWnd
00049   // window, it will also destroy the CBounceWnd, which is the child
00050   // window of the MDI child window, executing in the separate thread.
00051   // Finally, when the child CBounceWnd window is destroyed, the
00052   // CWinThread object will be automatically destroyed, as explained
00053   // in the comment for CBounceThread::InitInstance in mtbounce.cpp.
00054
00055 #pragma warning(push)
00056 #pragma warning(disable:6014)
00057   CBounceThread* pBounceThread = new CBounceThread(m_hWnd);
00058 #pragma warning(pop)
00059
00060   pBounceThread->CreateThread();
00061
00062   return TRUE;
00063 }
00064
00065
00066 BOOL CBounceMDIChildWnd::OnCmdMsg(UINT nID, int nCode, void* pExtra,
00067     AFX_CMDHANDLERINFO* pHandlerInfo)
00068 {
00069   // The default CFrameWnd::OnCmdMsg function is responsible for
00070   // dispatching menu commands to ON_COMMAND handlers and for
00071   // initializing menus and toolbars via ON_UPDATE_COMMAND_UI
00072   // handlers.  For the MDI child window, all such dispatching
00073   // and command user interface initialization are done in the
00074   // main application thread.  The CBounceWnd object processes
00075   // user interface events in a separate thread.  This override,
00076   // CBounceMDIChildWnd::OnCmdMsg, delegates command handling to
00077   // the child CBounceWnd window.  It cannot do this delegation
00078   // by simply calling CBounceWnd::OnCmdMsg, because doing so
00079   // would defeat the design of handling CBounceWnd user interface
00080   // events in the separate thread.  If CBounceMDIChildWnd::OnCmdMsg
00081   // simply called CBounceWnd::OnCmdMsg, then the command handling
00082   // would be processed in the same main application thread as that
00083   // of the MDI child window.
00084   //
00085   // A common and safe way to make a call from one thread to another
00086   // is to call SendMessage for a window whose message pump runs in
00087   // a second thread.  That is how CBounceMDIChildWnd::OnCmdMsg is
00088   // implemented.  All of the OnCmdMsg parameters are gathered into
00089   // an application-defined (but re-usable) COnCmdMsg structure,
00090   // that is sent by reference to the CBounceWnd window via the
00091   // lParam of SendMessage.
00092
00093
00094   CWnd* pBounceWnd = (CBounceWnd*)GetDlgItem(IDC_BOUNCE_WND);
00095   if (pBounceWnd == NULL)
00096     return FALSE; // child CBounceWnd not created yet.
00097
00098   // It is safe to create the COnCmdMsg on the stack because
00099   // it will not be deleted until the SendMessage call has
00100   // synchronously executed.
00101
00102   COnCmdMsg oncmdmsg;
00103   oncmdmsg.m_nID =    nID;
00104   oncmdmsg.m_nCode = nCode;
00105   oncmdmsg.m_pExtra = pExtra;
00106   oncmdmsg.m_pHandlerInfo = pHandlerInfo;
00107
00108   // In addition to passing all of the OnCmdMsg parameters to
00109   // the CBounceWnd window via the SendMessage lParam, it is also
00110   // necessary to forward the implicit wParam originally passed
00111   // in the WM_COMMAND message for the menu command.  The original
00112   // WM_COMMAND wParam is not a parameter of OnCmdMsg, but it can
00113   // be obtained by calling GetCurrentMessage.  The wParam is needed by
00114   // the CBounceWnd::OnColor command handler to distinguish which
00115   // menu item, i.e., which color, was selected from the Color menu.
00116   //
00117   // The original single thread MDI sample application, the
00118   // CBounceWnd::OnColor command handler calls GetCurrentMessage
00119   // to retrieve the wParam from the WM_COMMAND message.  To satisfy
00120   // that implementation of CBounceWnd::OnColor, we call
00121   // GetCurrentMessage() and forward the wParam in the user-defined
00122   // WM_USER_ONCMDMSG message.  Alternatively, we could have
00123   // called GetMessageMsg and passed the wParam as an additional
00124   // member of the COnCmdMsg structure.
00125
00126   return (BOOL)pBounceWnd->SendMessage(WM_USER_ONCMDMSG,
00127     GetCurrentMessage()->wParam, (LPARAM)&oncmdmsg);
00128 }
00129
00130 BOOL CBounceMDIChildWnd::DestroyWindow()
00131 {
00132   OnPrepareToClose();
00133
00134   return CMDIChildWnd::DestroyWindow();
00135 }
00136
00137 LRESULT CBounceMDIChildWnd::OnPrepareToClose(WPARAM, LPARAM)
00138 {
00139   // Wait for the bounce thread to auto-destroy its CWinThread object
00140   // before continuing.  This avoids a possible false memory leak
00141   // detection in debug mode when exiting the application.  The false
00142   // memory leak might be reported if the main application thread
00143   // terminates sooner than the bounce thread auto-destroys its own
00144   // CWinThread object.  See also comments for CBounceWnd::OnNcDestroy.
00145
00146   CWnd* pBounceWnd = (CBounceWnd*)GetDlgItem(IDC_BOUNCE_WND);
00147   pBounceWnd->SendMessage(WM_USER_PREPARE_TO_CLOSE);
00148
00149   WaitForSingleObject(CBounceThread::m_hEventBounceThreadKilled, INFINITE);
00150
00151   return 0;
00152 }
00153
00154 /////////////////////////////////////////////////////////////////////////////
00155 // CBounceWnd
00156
00157 BEGIN_MESSAGE_MAP(CBounceWnd, CWnd)
00158   //{{AFX_MSG_MAP(CBounceWnd)
00159   ON_WM_CREATE()
00160   ON_WM_SIZE()
00161   ON_WM_TIMER()
00162   ON_UPDATE_COMMAND_UI(IDM_RED, OnUpdateColor)
00163   ON_COMMAND(IDM_BLACK, OnColor)
00164   ON_COMMAND(IDM_CUSTOM, OnCustomColor)
00165   ON_UPDATE_COMMAND_UI(IDM_SLOW, OnUpdateSlow)
00166   ON_COMMAND(IDM_SLOW, OnSlow)
00167   ON_UPDATE_COMMAND_UI(IDM_FAST, OnUpdateFast)
00168   ON_COMMAND(IDM_FAST, OnFast)
00169   ON_WM_LBUTTONDOWN()
00170   ON_COMMAND(IDM_RED, OnColor)
00171   ON_COMMAND(IDM_GREEN, OnColor)
00172   ON_COMMAND(IDM_BLUE, OnColor)
00173   ON_COMMAND(IDM_WHITE, OnColor)
00174   ON_UPDATE_COMMAND_UI(IDM_WHITE, OnUpdateColor)
00175   ON_UPDATE_COMMAND_UI(IDM_GREEN, OnUpdateColor)
00176   ON_UPDATE_COMMAND_UI(IDM_CUSTOM, OnUpdateColor)
00177   ON_UPDATE_COMMAND_UI(IDM_BLUE, OnUpdateColor)
00178   ON_UPDATE_COMMAND_UI(IDM_BLACK, OnUpdateColor)
00179   ON_WM_DESTROY()
00180   //}}AFX_MSG_MAP
00181   ON_MESSAGE(WM_USER_ONCMDMSG, OnDelegatedCmdMsg)
00182   ON_MESSAGE(WM_USER_PREPARE_TO_CLOSE, OnPrepareToClose)
00183 END_MESSAGE_MAP()
00184
00185 IMPLEMENT_DYNAMIC(CBounceWnd, CWnd)
00186
00187 /////////////////////////////////////////////////////////////////////////////
00188 // CBounceWnd creation
00189
00190 BOOL CBounceWnd::Create(LPCTSTR szTitle, LONG style, const RECT& rect, CWnd* parent)
00191 {
00192   // Register a custom WndClass and create a window.
00193   // This must be done because CBounceWnd has a custom cursor, and
00194   //  no icon.
00195   LPCTSTR lpszBounceClass =
00196     AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
00197       LoadCursor(NULL, IDC_UPARROW),
00198       (HBRUSH)(COLOR_WINDOW+1),
00199       NULL);
00200
00201   return CWnd::Create(lpszBounceClass, szTitle, style, rect, parent,
00202     IDC_BOUNCE_WND);
00203 }
00204
00205 CBounceWnd::CBounceWnd()
00206 {
00207   m_nIDColor = IDM_BLACK;
00208   m_clrBall = RGB(0,0,0);
00209   m_bFastSpeed = FALSE;
00210 }
00211
00212 void CBounceWnd::OnDestroy()
00213 {
00214   // The following code forces a condition where the exiting application will
00215   // report a memory leak of the bounce CWinThread object if the application
00216   // does not wait for the bounce thread to auto-destroy its CWinThread object.
00217   // See also CMDIChildBounceWnd::OnNcDestroy.
00218
00219 #ifdef _DEBUG
00220   TRACE0("This is an intentional 1-second delay in terminating the bounce thread\n");
00221   Sleep(1000);
00222 #endif
00223   CWnd::OnDestroy();
00224 }
00225
00226 // Set up the ball parameters and start a timer.
00227 int CBounceWnd::OnCreate(LPCREATESTRUCT /* p */)
00228 {
00229   if (!SetTimer(1, 100 /*start slow*/, NULL))
00230   {
00231     MessageBox(_T("Not enough timers available for this window."),
00232         _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);
00233
00234     // signal creation failure...
00235     return -1;
00236   }
00237
00238   CDC* pDC = GetDC();
00239   m_ptPixel.x = pDC->GetDeviceCaps(ASPECTX);
00240   m_ptPixel.y = pDC->GetDeviceCaps(ASPECTY);
00241   ReleaseDC(pDC);
00242
00243   // Note that we could call MakeNewBall here (which should be called
00244   // whenever the ball's speed, color or size has been changed), but the
00245   // OnSize member function is always called after the OnCreate. Since
00246   // the OnSize member has to call MakeNewBall anyway, we don't here.
00247
00248   return 0;
00249 }
00250
00251 // MakeNewBall:
00252 // Whenever a parameter changes which would affect the speed or appearance
00253 // of the ball, call this to regenerate the ball bitmap.
00254 //
00255 void CBounceWnd::MakeNewBall()
00256 {
00257   m_sizeTotal.cx = (m_sizeRadius.cx + ABS(m_sizeMove.cx)) << 1;
00258   m_sizeTotal.cy = (m_sizeRadius.cy + ABS(m_sizeMove.cy)) << 1;
00259
00260   if (m_bmBall.m_hObject != NULL)
00261     m_bmBall.DeleteObject();        // get rid of old bitmap
00262
00263   CClientDC dc(this);
00264   CDC dcMem;
00265   dcMem.CreateCompatibleDC(&dc);
00266
00267   m_bmBall.CreateCompatibleBitmap(&dc, m_sizeTotal.cx, m_sizeTotal.cy);
00268   ASSERT(m_bmBall.m_hObject != NULL);
00269
00270   CBitmap* pOldBitmap = dcMem.SelectObject(&m_bmBall);
00271
00272   // draw a rectangle in the background (window) color
00273   CRect rect(0, 0, m_sizeTotal.cx, m_sizeTotal.cy);
00274   CBrush brBackground(::GetSysColor(COLOR_WINDOW));
00275   dcMem.FillRect(rect, &brBackground);
00276
00277   CBrush brCross(HS_DIAGCROSS, 0L);
00278   CBrush* pOldBrush = dcMem.SelectObject(&brCross);
00279
00280   dcMem.SetBkColor(m_clrBall);
00281   dcMem.Ellipse(ABS(m_sizeMove.cx), ABS(m_sizeMove.cy),
00282     m_sizeTotal.cx - ABS(m_sizeMove.cx),
00283     m_sizeTotal.cy - ABS(m_sizeMove.cy));
00284
00285   dcMem.SelectObject(pOldBrush);
00286   dcMem.SelectObject(pOldBitmap);
00287   dcMem.DeleteDC();
00288 }
00289
00290 // The ball's size and displacement change according to the window size.
00291 void CBounceWnd::OnSize(UINT nType, int cx, int cy)
00292 {
00293   LONG lScale;
00294
00295   m_ptCenter.x = cx >> 1;
00296   m_ptCenter.y = cy >> 1;
00297   m_ptCenter.x += cx >> 3; // make the ball a little off-center
00298
00299   lScale = min((LONG)cx * m_ptPixel.x,
00300     (LONG)cy * m_ptPixel.y) >> 4;
00301   m_sizeRadius.cx = (int)(lScale / m_ptPixel.x);
00302   m_sizeRadius.cy = (int)(lScale / m_ptPixel.y);
00303   m_sizeMove.cx = max(1, m_sizeRadius.cy >> 2);
00304   m_sizeMove.cy = max(1, m_sizeRadius.cy >> 2);
00305
00306   MakeNewBall();
00307
00308   CWnd::OnSize(nType, cx, cy);
00309 }
00310
00311 /////////////////////////////////////////////////////////////////////////////
00312 // CBounceWnd commands
00313
00314 LRESULT CBounceWnd::OnDelegatedCmdMsg(WPARAM, LPARAM lParam)
00315 {
00316   COnCmdMsg* pOnCmdMsg = (COnCmdMsg*)lParam;
00317   return CWnd::OnCmdMsg(pOnCmdMsg->m_nID, pOnCmdMsg->m_nCode, pOnCmdMsg->m_pExtra,
00318       pOnCmdMsg->m_pHandlerInfo);
00319 }
00320
00321 LRESULT CBounceWnd::OnPrepareToClose(WPARAM, LPARAM)
00322 {
00323   DestroyWindow();
00324   return 0;
00325 }
00326
00327 void CBounceWnd::OnUpdateColor(CCmdUI* pCmdUI)
00328 {
00329   pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
00330 }
00331
00332 void CBounceWnd::OnColor()
00333 {
00334   m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
00335   m_clrBall = colorArray[m_nIDColor - IDM_BLACK];
00336
00337   // Force the client area text to be repainted in the new color
00338   MakeNewBall();
00339   Invalidate();
00340 }
00341
00342 void CBounceWnd::OnCustomColor()
00343 {
00344   CColorDialog dlgColor(m_clrBall);
00345   if (dlgColor.DoModal() == IDOK)
00346   {
00347     m_clrBall = dlgColor.GetColor();
00348     m_nIDColor = IDM_CUSTOM;
00349     MakeNewBall();
00350     Invalidate();
00351   }
00352 }
00353
00354 // Change the ball's speed
00355 void CBounceWnd::ChangeSpeed()
00356 {
00357   // re-create the timer
00358   KillTimer(1);
00359   if (!SetTimer(1, m_bFastSpeed ? 0 : 100, NULL))
00360   {
00361     MessageBox(_T("Not enough timers available for this window."),
00362         _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);
00363     DestroyWindow();
00364   }
00365 }
00366
00367 // Animate the ball.
00368 void CBounceWnd::OnTimer(UINT_PTR /* wParam */)
00369 {
00370   if (m_bmBall.m_hObject == NULL)
00371     return;     // no bitmap for the ball
00372
00373   CRect rcClient;
00374   GetClientRect(rcClient);
00375
00376   CClientDC dc(this);
00377   CBitmap* pbmOld = NULL;
00378
00379   CDC dcMem;
00380   dcMem.CreateCompatibleDC(&dc);
00381   pbmOld = dcMem.SelectObject(&m_bmBall);
00382
00383   dc.BitBlt(m_ptCenter.x - m_sizeTotal.cx / 2,
00384       m_ptCenter.y - m_sizeTotal.cy / 2,
00385       m_sizeTotal.cx, m_sizeTotal.cy,
00386       &dcMem, 0, 0, SRCCOPY);
00387
00388   m_ptCenter += m_sizeMove;
00389
00390   if ((m_ptCenter.x + m_sizeRadius.cx >= rcClient.right) ||
00391     (m_ptCenter.x - m_sizeRadius.cx <= 0))
00392   {
00393     m_sizeMove.cx = -m_sizeMove.cx;
00394   }
00395
00396   if ((m_ptCenter.y + m_sizeRadius.cy >= rcClient.bottom) ||
00397     (m_ptCenter.y - m_sizeRadius.cy <= 0))
00398   {
00399     m_sizeMove.cy = -m_sizeMove.cy;
00400   }
00401
00402   dcMem.SelectObject(pbmOld);
00403   dcMem.DeleteDC();
00404 }
00405
00406 void CBounceWnd::OnUpdateSlow(CCmdUI* pCmdUI)
00407 {
00408   pCmdUI->SetCheck(!m_bFastSpeed);
00409 }
00410
00411 void CBounceWnd::OnSlow()
00412 {
00413   m_bFastSpeed = FALSE;
00414   ChangeSpeed();
00415 }
00416
00417 void CBounceWnd::OnUpdateFast(CCmdUI* pCmdUI)
00418 {
00419   pCmdUI->SetCheck(m_bFastSpeed);
00420 }
00421
00422 void CBounceWnd::OnFast()
00423 {
00424   m_bFastSpeed = TRUE;
00425   ChangeSpeed();
00426 }
00427
00428 void CBounceMDIChildWnd::OnSize(UINT nType, int cx, int cy)
00429 {
00430   CMDIChildWnd::OnSize(nType, cx, cy);
00431
00432   CWnd* pBounceWnd = GetDlgItem(IDC_BOUNCE_WND);
00433   if (pBounceWnd == NULL)
00434     return; // child CBounceWnd not created yet
00435
00436   CRect rect;
00437   GetClientRect(&rect);
00438   pBounceWnd->SetWindowPos(NULL, 0, 0, rect.Width(), rect.Height(),
00439     SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);
00440 }
00441
00442 void CBounceWnd::OnLButtonDown(UINT, CPoint point)
00443 {
00444   Invalidate();
00445
00446   CRect rcClient;
00447   GetClientRect(rcClient);
00448
00449   point.x = min(point.x, rcClient.right - 2*m_sizeRadius.cx);
00450   point.x = max(point.x, 2*m_sizeRadius.cx);
00451   point.y = min(point.y, rcClient.bottom - 2*m_sizeRadius.cx);
00452   point.y = max(point.y, 2*m_sizeRadius.cy);
00453
00454   m_ptCenter = point;
00455 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/APropDg.H Source File

  • ole
  • TstCon

APropDg.H

Go to the documentation of this file.
00001 // File: APropDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_CAMBIENTPROPERTIESDLG_H__4D06A27D_C318_11D0_8DFF_00C04FB68D60__INCLUDED_)
00011 #define AFX_CAMBIENTPROPERTIESDLG_H__4D06A27D_C318_11D0_8DFF_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // CAmbientPropertiesDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CAmbientPropertiesDlg dialog
00021
00022 class CAmbientPropertiesDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CAmbientPropertiesDlg( CWnd* pParent, CTestContainer98Doc* pDoc );
00027
00028    BOOL GetChangedPropertyID( DISPID* pdispid ) const;
00029
00030 // Dialog Data
00031   //{{AFX_DATA(CAmbientPropertiesDlg)
00032   enum { IDD = IDD_AMBIENTPROPERTIES };
00033   CComboBox m_cboxPropValue;
00034   CDateTimeCtrl m_date;
00035   CStatic m_staticPropertyValue;
00036   CEdit   m_editDISPID;
00037   CButton m_butChooseFont;
00038   CButton m_butChooseColor;
00039   CComboBox   m_cboxPropName;
00040   CButton m_butSetValue;
00041   CEdit   m_editPropValue;
00042   CComboBox   m_cboxPropType;
00043   CButton m_checkEnabled;
00044   //}}AFX_DATA
00045
00046
00047 // Overrides
00048   // ClassWizard generated virtual function overrides
00049   //{{AFX_VIRTUAL(CAmbientPropertiesDlg)
00050   protected:
00051   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052   //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 protected:
00056    void DisplayPropValues( int iType );
00057    void OnPropertyChanged( DISPID id );
00058
00059 protected:
00060    CTestContainer98Doc* m_pDoc;
00061    CAmbientProperty* m_pProp;
00062    BOOL m_tChanged;
00063    DISPID m_dispidChanged;
00064
00065   // Generated message map functions
00066   //{{AFX_MSG(CAmbientPropertiesDlg)
00067   virtual BOOL OnInitDialog();
00068   afx_msg void OnPropNameSelChange();
00069   afx_msg void OnPropTypeSelChange();
00070   afx_msg void OnSetValue();
00071   afx_msg void OnEnabled();
00072   afx_msg void OnChooseColor();
00073   afx_msg void OnChooseFont();
00074   afx_msg void OnNewProperty();
00075   afx_msg void OnPropValueSetFocus();
00076   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00077   afx_msg void OnContextMenu(CWnd* , CPoint);
00078   //}}AFX_MSG
00079   DECLARE_MESSAGE_MAP()
00080 };
00081
00082 //{{AFX_INSERT_LOCATION}}
00083 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00084
00085 #endif // !defined(AFX_CAMBIENTPROPERTIESDLG_H__4D06A27D_C318_11D0_8DFF_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calcdriv.h Source File

  • ole
  • calcdriv

calcdriv.h

Go to the documentation of this file.
00001 // calcdriv.h : main header file for the CALCDRIV application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CCalcDrivApp:
00020 // See calcdriv.cpp for the implementation of this class
00021
00022 class CCalcDrivApp : public CWinApp
00023 {
00024 public:
00025   CCalcDrivApp();
00026
00027 // Overrides
00028   virtual BOOL InitInstance();
00029
00030 // Implementation
00031   //{{AFX_MSG(CCalcDrivApp)
00032     // NOTE - the ClassWizard will add and remove member functions here.
00033     //    DO NOT EDIT what you see in these blocks of generated code !
00034   //}}AFX_MSG
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CDriverDlg dialog
00040
00041 // Include the type-safe class generated from ClassWizard's "Read Type Library"
00042 //  button to interface with the IDispatch enabled calculator object.
00043 #include "calctype.h"
00044
00045 class CDriverDlg : public CDialog
00046 {
00047 // Construction
00048 public:
00049   CDriverDlg(CWnd* pParent = NULL);   // standard constructor
00050
00051 // Dialog Data
00052   //{{AFX_DATA(CDriverDlg)
00053   enum { IDD = IDD_CALCDRIV };
00054   CStatic m_stcOperator;
00055   CStatic m_stcOperand;
00056   CStatic m_stcAccum;
00057   CEdit   m_editExpression;
00058   //}}AFX_DATA
00059
00060   // an instance of the IDispatch enabled calculator
00061   CRemoteCalcDlg m_calc;
00062
00063 // Implementation
00064 public:
00065   virtual ~CDriverDlg();
00066
00067 protected:
00068   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00069
00070   // Generated message map functions
00071   //{{AFX_MSG(CDriverDlg)
00072   afx_msg void OnGo();
00073   afx_msg void OnSingleStep();
00074   virtual BOOL OnInitDialog();
00075   afx_msg void OnRefresh();
00076   //}}AFX_MSG
00077   DECLARE_MESSAGE_MAP()
00078 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/resource.h Source File

  • vc2008fp
  • CustomPages

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by CustomPages.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_CUSTOMTYPE                  129
00009 #define IDR_CONTEXT_MENU                130
00010 #define IDR_POPUP_TOOLBAR               131
00011 #define IDD_CUST_PAGE_DLG               151
00012 #define IDD_ABOUTBOX                    1000
00013 #define IDC_CHECK1                      1041
00014 #define IDC_CHECK2                      1042
00015 #define ID_VIEW_CUSTOMIZE               32770
00016 #define ID_VIEW_TOOLBARS                32771
00017
00018 // Next default values for new objects
00019 //
00020 #ifdef APSTUDIO_INVOKED
00021 #ifndef APSTUDIO_READONLY_SYMBOLS
00022 #define _APS_3D_CONTROLS                     1
00023 #define _APS_NEXT_RESOURCE_VALUE        152
00024 #define _APS_NEXT_COMMAND_VALUE         32822
00025 #define _APS_NEXT_CONTROL_VALUE         1043
00026 #define _APS_NEXT_SYMED_VALUE           107
00027 #endif
00028 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/simpvw.h Source File

  • general
  • viewex

simpvw.h

Go to the documentation of this file.
00001 // simpvw.h : interface of the simple view classes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 // CTextView - text output
00013 // CColorView - color output
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016
00017 class CTextView : public CView
00018 {
00019 protected: // create from serialization only
00020   CTextView();
00021   DECLARE_DYNCREATE(CTextView)
00022
00023 // Attributes
00024 public:
00025   CMainDoc* GetDocument()
00026       {
00027         ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
00028         return (CMainDoc*) m_pDocument;
00029       }
00030
00031 // Operations
00032 public:
00033
00034 // Implementation
00035 public:
00036   virtual ~CTextView();
00037   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00038
00039 // Generated message map functions
00040 protected:
00041   //{{AFX_MSG(CTextView)
00042   afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048
00049 class CColorView : public CView
00050 {
00051 protected: // create from serialization only
00052   CColorView();
00053   DECLARE_DYNCREATE(CColorView)
00054
00055 // Attributes
00056 public:
00057   CMainDoc* GetDocument()
00058       {
00059         ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
00060         return (CMainDoc*) m_pDocument;
00061       }
00062
00063 // Operations
00064 public:
00065
00066 // Implementation
00067 public:
00068   virtual ~CColorView();
00069   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00070   virtual void OnActivateView(BOOL bActivate, CView* pActivateView,
00071           CView* pDeactiveView);
00072
00073 // Generated message map functions
00074 protected:
00075   //{{AFX_MSG(CColorView)
00076   afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
00077   //}}AFX_MSG
00078   DECLARE_MESSAGE_MAP()
00079 };
00080
00081 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWndListDlg Member List

This is the complete list of members for CWndListDlg, including all inherited members.
CModelessDialog() | CModelessDialog |
CModelessMain() | CModelessMain |
Create() | CWndListDlg |
CModelessMain::Create(LPCTSTR lpszTemplateName, const UINT FAR *lpaIDStatus, int cIDStatus, const UINT FAR *lpaIDToolbar, int cIDToolbar, UINT nIDBitmap) | CModelessMain |
CModelessMain::Create(UINT nIDTemplate, const UINT FAR *lpaIDStatus, int cIDStatus, const UINT FAR *lpaIDToolbar, int cIDToolbar, UINT nIDBitmap) | CModelessMain |
CWndListDlg() | CWndListDlg |
DoDataExchange(CDataExchange *pDX) | CWndListDlg | [protected, virtual]
GetStatusBar() | CModelessMain | [inline]
GetToolBar() | CModelessMain | [inline]
IDD enum value | CWndListDlg | [protected]
m_cIDStatusBar | CModelessMain | [protected]
m_cIDToolBar | CModelessMain | [protected]
m_hIcon | CModelessMain | [protected]
m_iRate | CWndListDlg | [protected]
m_iTicks | CWndListDlg | [protected]
m_lbWindows | CWndListDlg | [protected]
m_lpaIDStatusBar | CModelessMain | [protected]
m_lpaIDToolBar | CModelessMain | [protected]
m_nIDBitmap | CModelessMain | [protected]
m_nIDLastMessage | CModelessMain | [protected]
m_nIDTimer | CWndListDlg | [protected]
m_nIDTracking | CModelessMain | [protected]
m_statusBar | CModelessMain | [protected]
m_toolBar | CModelessMain | [protected]
OnCancel() | CModelessDialog | [virtual]
OnClose() | CWndListDlg | [protected]
OnEnterIdle(UINT nWhy, CWnd *pWho) | CModelessMain | [protected]
OnEraseBkgnd(CDC *pDC) | CModelessMain | [protected]
OnInitDialog() | CWndListDlg | [protected, virtual]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CModelessMain | [protected]
OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu) | CModelessMain | [protected]
OnOK() | CModelessDialog | [virtual]
OnOptionNow() | CWndListDlg | [protected]
OnOptionRate() | CWndListDlg | [protected]
OnPaint() | CModelessMain | [protected]
OnPopMessageString(WPARAM wParam, LPARAM lParam) | CModelessMain | [protected]
OnQueryDragIcon() | CModelessMain | [protected]
OnSelChangeWndList() | CWndListDlg | [protected]
OnSetMessageString(WPARAM wParam, LPARAM lParam=0L) | CModelessMain | [protected]
OnStatusBarCheck() | CModelessMain | [protected]
OnTimer(UINT_PTR nIDEvent) | CWndListDlg | [protected]
OnToolBarCheck() | CModelessMain | [protected]
OnToolTipText(UINT, NMHDR *pNMHDR, LRESULT *pResult) | CModelessMain | [protected]
OnUpdateKeyIndicator(CCmdUI *pCmdUI) | CModelessMain | [protected]
OnUpdateOptionRate(CCmdUI *pCmdUI) | CWndListDlg | [protected]
OnUpdateStatusBarMenu(CCmdUI *pCmdUI) | CModelessMain | [protected]
OnUpdateTime(CCmdUI *pCmdUI) | CWndListDlg | [protected]
OnUpdateToolBarMenu(CCmdUI *pCmdUI) | CModelessMain | [protected]
PostNcDestroy() | CModelessDialog | [virtual]
WalkWindowList() | CWndListDlg | [protected]
~CModelessDialog() | CModelessDialog | [virtual]
~CModelessMain() | CModelessMain | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MainFrm.cpp Source File

  • vc2008fp
  • MenuSubSet

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MenuSubSet.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 // -EXAMPLE-
00023
00024 BOOL IsMenuButtonEmpty (CMFCToolBarButton* pButton)
00025 {
00026   ASSERT_VALID (pButton);
00027
00028   if (pButton->m_nID != 0 && pButton->m_nID != (UINT)-1)
00029   {
00030     return FALSE;
00031   }
00032
00033   CMFCToolBarMenuButton* pMenuButton = DYNAMIC_DOWNCAST(
00034     CMFCToolBarMenuButton, pButton);
00035   if (pMenuButton == NULL)
00036   {
00037     return FALSE;
00038   }
00039
00040   const CObList& lstCommands = pMenuButton->GetCommands ();
00041
00042   for (POSITION pos = lstCommands.GetHeadPosition (); pos != NULL;)
00043   {
00044     CMFCToolBarButton* pSubButton = (CMFCToolBarButton*) lstCommands.GetNext (pos);
00045     ASSERT_VALID (pSubButton);
00046
00047     if (CMFCToolBar::IsCommandPermitted (pSubButton->m_nID))
00048     {
00049       return FALSE;
00050     }
00051   }
00052
00053   return TRUE;
00054 }
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CMyMenuBar
00058
00059 void CMyMenuBar::CreateFromMenu (HMENU hMenu, BOOL bDefaultMenu, BOOL bForceUpdate)
00060 {
00061   CMFCMenuBar::CreateFromMenu (hMenu, bDefaultMenu, bForceUpdate);
00062
00063   int nIndex = 0;
00064   BOOL bAdjustLayout = FALSE;
00065
00066   for (POSITION pos = m_Buttons.GetHeadPosition (); pos != NULL;)
00067   {
00068     CMFCToolBarButton* pButton = (CMFCToolBarButton*) m_Buttons.GetNext (pos);
00069     ASSERT_VALID (pButton);
00070
00071     if (IsMenuButtonEmpty (pButton))
00072     {
00073       RemoveButton (nIndex);
00074       bAdjustLayout = TRUE;
00075     }
00076     else
00077     {
00078       nIndex++;
00079     }
00080   }
00081
00082   if (bAdjustLayout)
00083   {
00084     AdjustLayout ();
00085   }
00086 }
00087
00088 // --
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CMainFrame
00092
00093 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00094
00095
00096 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00097   ON_WM_CREATE()
00098   ON_COMMAND(ID_WINDOW_MANAGER, OnWindowManager)
00099   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00100   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00101   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007, OnAppLook)
00102   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007, OnUpdateAppLook)
00103 END_MESSAGE_MAP()
00104
00105 static UINT indicators[] =
00106 {
00107   ID_SEPARATOR,           // status line indicator
00108   ID_INDICATOR_CAPS,
00109   ID_INDICATOR_NUM,
00110   ID_INDICATOR_SCRL,
00111 };
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CMainFrame construction/destruction
00115
00116 CMainFrame::CMainFrame()
00117 {
00118   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_2003);
00119
00120   // TODO: add member initialization code here
00121
00122 }
00123
00124 CMainFrame::~CMainFrame()
00125 {
00126 }
00127
00128 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00129 {
00130   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00131     return -1;
00132
00133   OnAppLook (m_nAppLook);
00134
00135   CMFCToolBar::EnableQuickCustomization ();
00136
00137   if (!m_wndMenuBar.Create (this))
00138   {
00139     TRACE0("Failed to create menubar\n");
00140     return -1;      // fail to create
00141   }
00142
00143   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00144
00145   // Detect color depth. 256 color toolbars can be used in the
00146   // high or true color modes only (bits per pixel is > 8):
00147   CClientDC dc (this);
00148   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00149
00150   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00151
00152   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00153     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00154     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00155   {
00156     TRACE0("Failed to create toolbar\n");
00157     return -1;      // fail to create
00158   }
00159   if (!m_wndStatusBar.Create(this) ||
00160     !m_wndStatusBar.SetIndicators(indicators,
00161       sizeof(indicators)/sizeof(UINT)))
00162   {
00163     TRACE0("Failed to create status bar\n");
00164     return -1;      // fail to create
00165   }
00166
00167   m_wndToolBar.SetWindowText (_T("Standard"));
00168   // TODO: Delete these three lines if you don't want the toolbar to
00169   //  be dockable
00170   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00171   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00172   EnableDocking(CBRS_ALIGN_ANY);
00173   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00174   DockPane(&m_wndMenuBar);
00175   DockPane(&m_wndToolBar);
00176
00177   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00178
00179   // Enable windows manager:
00180   EnableWindowsDialog (ID_WINDOW_MANAGER, IDS_WINDOWS_MANAGER, TRUE);
00181
00182   // Enable conttol bar context menu (list of bars + customize command):
00183   EnablePaneMenu (
00184     TRUE,       // Enable
00185     ID_VIEW_CUSTOMIZE,  // Customize command ID
00186     _T("Customize..."), // Customize command text
00187     ID_VIEW_TOOLBARS);  // Menu items with this ID will be replaced by
00188               // toolbars menu
00189
00190   return 0;
00191 }
00192
00193 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00194 {
00195   if( !CMDIFrameWnd::PreCreateWindow(cs) )
00196     return FALSE;
00197   // TODO: Modify the Window class or styles here by modifying
00198   //  the CREATESTRUCT cs
00199
00200   return TRUE;
00201 }
00202
00203 /////////////////////////////////////////////////////////////////////////////
00204 // CMainFrame diagnostics
00205
00206 #ifdef _DEBUG
00207 void CMainFrame::AssertValid() const
00208 {
00209   CMDIFrameWnd::AssertValid();
00210 }
00211
00212 void CMainFrame::Dump(CDumpContext& dc) const
00213 {
00214   CMDIFrameWnd::Dump(dc);
00215 }
00216
00217 #endif //_DEBUG
00218
00219 /////////////////////////////////////////////////////////////////////////////
00220 // CMainFrame message handlers
00221
00222
00223 void CMainFrame::OnViewCustomize()
00224 {
00225   //------------------------------------
00226   // Create a customize toolbars dialog:
00227   //------------------------------------
00228   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00229     TRUE /* Automatic menus scaning */
00230     );
00231
00232   pDlgCust->Create ();
00233 }
00234
00235 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00236 {
00237   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00238   //
00239   // UINT uiToolBarId = (UINT) wp;
00240   // if (uiToolBarId == IDR_MAINFRAME)
00241   // {
00242   //    do something with m_wndToolBar
00243   // }
00244
00245   return 0;
00246 }
00247
00248 void CMainFrame::OnWindowManager()
00249 {
00250   ShowWindowsDialog ();
00251 }
00252
00253 void CMainFrame::OnAppLook(UINT id)
00254 {
00255   CDockingManager::SetDockingMode (DT_SMART);
00256
00257   m_nAppLook = id;
00258
00259   CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;
00260
00261   switch (m_nAppLook)
00262   {
00263   case ID_VIEW_APPLOOK_2000:
00264     // enable Office 2000 look:
00265     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00266     break;
00267
00268   case ID_VIEW_APPLOOK_XP:
00269     // enable Office XP look:
00270     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00271     break;
00272
00273   case ID_VIEW_APPLOOK_WIN_XP:
00274     // enable Windows XP look (in other OS Office XP look will be used):
00275     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00276     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00277     break;
00278
00279   case ID_VIEW_APPLOOK_2003:
00280     // enable Office 2003 look:
00281     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00282     CDockingManager::SetDockingMode (DT_SMART);
00283     break;
00284
00285   case ID_VIEW_APPLOOK_VS2005:
00286     // enable VS.NET 2005 look:
00287     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00288     CDockingManager::SetDockingMode (DT_SMART);
00289     break;
00290
00291   case ID_VIEW_APPLOOK_2007:
00292     // enable Office 2007 look:
00293     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00294     CDockingManager::SetDockingMode (DT_SMART);
00295     break;
00296
00297   default:
00298     ASSERT (FALSE);
00299   }
00300
00301   CDockingManager* pDockManager = GetDockingManager ();
00302   if (pDockManager != NULL)
00303   {
00304     ASSERT_VALID (pDockManager);
00305     pDockManager->AdjustPaneFrames ();
00306   }
00307
00308   CTabbedPane::ResetTabs ();
00309
00310   RecalcLayout ();
00311   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00312
00313   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00314 }
00315
00316 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00317 {
00318   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00319 }
00320
00321 CMDIChildWndEx* CMainFrame::CreateDocumentWindow (LPCTSTR lpcszDocName, CObject* /*pObj*/)
00322 {
00323   if (lpcszDocName != NULL && lpcszDocName [0] != '\0')
00324   {
00325     CDocument* pDoc = AfxGetApp()->OpenDocumentFile (lpcszDocName);
00326
00327     if (pDoc != NULL)
00328     {
00329       POSITION pos = pDoc->GetFirstViewPosition();
00330
00331       if (pos != NULL)
00332       {
00333         CView* pView = pDoc->GetNextView (pos);
00334         if (pView == NULL)
00335         {
00336           return NULL;
00337         }
00338
00339         return DYNAMIC_DOWNCAST (CMDIChildWndEx, pView->GetParent ());
00340       }
00341     }
00342   }
00343
00344   return NULL;
00345 }
00346
00347 // -EXAMPLE-
00348
00349 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00350 {
00351   if (!CMDIFrameWndEx::OnShowPopupMenu (pMenuPopup))
00352   {
00353     return FALSE;
00354   }
00355
00356   if (pMenuPopup == NULL)
00357   {
00358     return TRUE;
00359   }
00360
00361   ASSERT_VALID (pMenuPopup);
00362
00363   // Remove all empty menu items:
00364   for (int i = 0; i < pMenuPopup->GetMenuItemCount ();)
00365   {
00366     CMFCToolBarMenuButton* pItem = pMenuPopup->GetMenuItem (i);
00367
00368     if (pItem != NULL && IsMenuButtonEmpty (pItem))
00369     {
00370       pMenuPopup->RemoveItem (i);
00371     }
00372     else
00373     {
00374       i++;
00375     }
00376   }
00377
00378   return TRUE;
00379 }
00380
00381 // ----
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/mainfrm.h Source File

  • ole
  • oleview

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #ifndef _MAINFRM_H_
00015 #define _MAINFRM_H_
00016
00017 // OnUpdate( lHint ) flags
00018 #define UPD_ALL                0x00000000
00019 #define UPD_NOOBJECTVIEW       0x00000001
00020 #define UPD_NOINTERFACEVIEW    0x00000002
00021 #define UPD_NOIFACELISTVIEW    0x00000004
00022 #define UPD_NORELOAD           0x00000008
00023
00024 void WINAPI ViewInterface( HWND hwnd, REFIID riid, IUnknown *punk );
00025
00026 class CObjTreeView ;
00027 class CRegistryView ;
00028
00029 class CMainFrame : public CFrameWnd
00030 {
00031 friend class COle2ViewApp ;
00032 protected: // create from serialization only
00033   CMainFrame();
00034   DECLARE_DYNCREATE(CMainFrame)
00035   BOOL SavePosition() ;
00036   BOOL RestorePosition(int nCmdShow) ;
00037
00038 // Implementation
00039 public:
00040   virtual ~CMainFrame();
00041   virtual BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE,
00042         CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
00043   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00044 #ifdef _DEBUG
00045   virtual void AssertValid() const;
00046   virtual void Dump(CDumpContext& dc) const;
00047 #endif
00048
00049
00050 public:
00051   CSplitterWnd    m_wndSplitter ;
00052   CStatusBar      m_wndStatusBar;
00053   CToolBar        m_wndToolBar;
00054
00055   CObjTreeView*   m_pObjTreeView ;
00056   CRegistryView*  m_pObjectView ;
00057
00058 // Generated message map functions
00059 protected:
00060   //{{AFX_MSG(CMainFrame)
00061   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00062   afx_msg void OnDestroy();
00063   afx_msg void OnFileRunREGEDIT();
00064   afx_msg void OnViewRefresh();
00065   afx_msg void OnUpdateViewRefresh(CCmdUI* pCmdUI);
00066   afx_msg void OnSysColorChange();
00067   afx_msg void OnObjectDelete();
00068   afx_msg void OnUpdateObjectDelete(CCmdUI* pCmdUI);
00069   afx_msg void OnObjectVerify();
00070   afx_msg void OnUpdateObjectVerify(CCmdUI* pCmdUI);
00071   afx_msg void OnFileViewTypeLib();
00072   afx_msg void OnUseInProcServer();
00073   afx_msg void OnUpdateUseInProcServer(CCmdUI* pCmdUI);
00074   afx_msg void OnUseInProcHandler();
00075   afx_msg void OnUpdateUseInProcHandler(CCmdUI* pCmdUI);
00076   afx_msg void OnUseLocalServer();
00077   afx_msg void OnUpdateUseLocalServer(CCmdUI* pCmdUI);
00078   afx_msg void OnFileBind();
00079   //}}AFX_MSG
00080   DECLARE_MESSAGE_MAP()
00081 };
00082
00083
00084 #endif // _MAINFRM_H_
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.h Source File

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007DemoView.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CMSOffice2007DemoCntrItem;
00015 struct CCharFormat;
00016
00017 class CMSOffice2007DemoView : public CRichEditView
00018 {
00019 protected: // create from serialization only
00020   CMSOffice2007DemoView();
00021   DECLARE_DYNCREATE(CMSOffice2007DemoView)
00022
00023 // Attributes
00024 public:
00025   CMSOffice2007DemoDoc* GetDocument();
00026   static BOOL m_bForceReloadBmps;
00027
00028 // Overrides
00029 public:
00030   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031 protected:
00032   virtual void OnInitialUpdate(); // called first time after construct
00033   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00034
00035   virtual void SyncFont();
00036
00037 // Implementation
00038 public:
00039   virtual ~CMSOffice2007DemoView();
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045 protected:
00046   //{{AFX_MSG(CMSOffice2007DemoView)
00047   afx_msg void OnDestroy();
00048   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00049   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00050   afx_msg void OnFontDialog();
00051   afx_msg void OnParagraphDialog();
00052   afx_msg void OnStyleDialog();
00053   afx_msg void OnPagesetupDialog();
00054   afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00055   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00056   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00057   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00058   virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo);
00059   afx_msg void OnEditUndo();
00060   afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI);
00061   afx_msg void OnUpdateEditReplace(CCmdUI* pCmdUI);
00062   afx_msg void OnPagelayoutIndentLeft();
00063   afx_msg void OnPagelayoutIndentRight();
00064   afx_msg void OnFilePrintPreview();
00065   afx_msg void OnFontColor();
00066   afx_msg void OnFontname();
00067   afx_msg void OnFontsize();
00068   afx_msg void OnEditChange();
00069   afx_msg void OnInsertPicture();
00070   afx_msg void OnInsertChart();
00071   afx_msg void OnInsertTable();
00072   afx_msg void OnSelChange(NMHDR* pNMHDR, LRESULT* pResult);
00073   afx_msg void OnUpdatePrintLayout(CCmdUI* pCmdUI);
00074   afx_msg void OnIndentLeft();
00075   afx_msg void OnIndentRight();
00076   afx_msg void OnSpaceAfter();
00077   afx_msg void OnSpaceBefore();
00078   afx_msg void OnViewRuler();
00079   afx_msg void OnViewGridLines();
00080   afx_msg void OnViewProps();
00081   afx_msg void OnViewDocMap();
00082   afx_msg void OnUpdateViewRuler(CCmdUI* pCmdUI);
00083   afx_msg void OnUpdateViewGridLines(CCmdUI* pCmdUI);
00084   afx_msg void OnUpdateViewProps(CCmdUI* pCmdUI);
00085   afx_msg void OnUpdateViewDocMap(CCmdUI* pCmdUI);
00086   afx_msg void OnUpdateViewThumb(CCmdUI* pCmdUI);
00087   afx_msg void OnInsertBulletFromPalette();
00088   afx_msg void OnInsertNumberFromPalette();
00089   afx_msg void OnInsertMultilevelFromPalette();
00090   afx_msg void OnCharStrikeThrough();
00091   afx_msg void OnUpdateCharStrikeThrough(CCmdUI* pCmdUI);
00092   afx_msg void OnInsertTableGallery();
00093   afx_msg void OnInsertShape();
00094   afx_msg void OnQuickStyle();
00095   afx_msg void OnPageLayoutTheme();
00096   //}}AFX_MSG
00097
00098   DECLARE_MESSAGE_MAP()
00099
00100   BOOL ShowContextMenu(CPoint pt);
00101   void GetDefaultFont(CCharFormat& cf);
00102   BOOL InsertBitmap(UINT uiBmpResID);
00103
00104   void InitFloaty(CMFCRibbonMiniToolBar* pFloaty);
00105
00106 protected:
00107   BOOL m_bIsEndOfPrint;
00108   BOOL m_bViewRuler;
00109   BOOL m_bViewGridLines;
00110   BOOL m_bViewProps;
00111   BOOL m_bViewDocMap;
00112   BOOL m_bViewThumb;
00113   CPoint m_ptMouseDown;
00114 };
00115
00116 #ifndef _DEBUG  // debug version in MSOffice2007DemoView.cpp
00117 inline CMSOffice2007DemoDoc* CMSOffice2007DemoView::GetDocument() { return(CMSOffice2007DemoDoc*)m_pDocument; }
00118 #endif
00119
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWorkSpaceToolBarDoc Member List

This is the complete list of members for CWorkSpaceToolBarDoc, including all inherited members.
CWorkSpaceToolBarDoc() | CWorkSpaceToolBarDoc | [protected]
OnNewDocument() | CWorkSpaceToolBarDoc | [virtual]
Serialize(CArchive &ar) | CWorkSpaceToolBarDoc | [virtual]
~CWorkSpaceToolBarDoc() | CWorkSpaceToolBarDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typlstvw.h Source File

  • advanced
  • collect

typlstvw.h

Go to the documentation of this file.
00001 // typlstvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CTypedPtrListView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CTypedPtrListView : public CFormView
00020 {
00021 public:
00022   CTypedPtrListView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CTypedPtrListView)
00024
00025 // Attributes
00026 public:
00027   CCollectDoc* GetDocument();
00028
00029 // Overrides
00030 public:
00031   void OnInitialUpdate();
00032
00033 // Form Data
00034 public:
00035   //{{AFX_DATA(CTypedPtrListView)
00036   enum { IDD = IDD_TYPED_PTR_LIST };
00037   CListBox    m_ctlList;
00038   float   m_float;
00039   int     m_int;
00040   CString m_str;
00041   //}}AFX_DATA
00042
00043 // Implementation
00044 protected:
00045   CMyStruct* FindMyStruct(int& nSel, POSITION& pos);
00046   void AddMyStructToListBox(CMyStruct* pMyStruct, int nSel = -1);
00047
00048 // Overrides
00049   // ClassWizard generate virtual function overrides
00050   //{{AFX_VIRTUAL(CTypedPtrListView)
00051   protected:
00052   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00053   //}}AFX_VIRTUAL
00054
00055 // Implementation
00056 protected:
00057   virtual ~CTypedPtrListView();
00058 #ifdef _DEBUG
00059   virtual void AssertValid() const;
00060   virtual void Dump(CDumpContext& dc) const;
00061 #endif
00062
00063   // Generated message map functions
00064   //{{AFX_MSG(CTypedPtrListView)
00065   afx_msg void OnAdd();
00066   afx_msg void OnUpdateButton();
00067   afx_msg void OnRemove();
00068   afx_msg void OnRemoveAll();
00069   afx_msg void OnSelChangeList();
00070   afx_msg void OnInsertBefore();
00071   //}}AFX_MSG
00072   DECLARE_MESSAGE_MAP()
00073 };
00074
00075 #ifndef _DEBUG
00076 inline CCollectDoc* CTypedPtrListView::GetDocument()
00077    { return (CCollectDoc*)m_pDocument; }
00078 #endif
00079
00080 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/resource.h Source File

  • controls
  • cmnctrl

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by CmnCtrl3.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDS_ABOUTBOX                    101
00007 #define IDD_COMMAND_LINK_CONTROL        103
00008 #define IDR_MAINFRAME                   128
00009 #define IDD_SPLIT_BUTTON                129
00010 #define IDD_PAGER_CONTROL               130
00011 #define IDD_NETWORK_ADDRESS_CONTROL     131
00012 #define IDR_SPLIT_DROPDOWN_MENU         134
00013 #define IDR_TOOLBAR1                    135
00014 #define IDB_BITMAP1                     138
00015 #define IDC_PAGER_CTRL                  201
00016 #define IDC_SPLIT_BUTTON                1000
00017 #define IDC_SET_MENU1                   1002
00018 #define IDC_SET_MENU2                   1003
00019 #define IDC_SET_STATE                   1004
00020 #define IDC_Y_SIZE                      1005
00021 #define IDC_X_SIZE                      1006
00022 #define IDC_SET_SIZE                    1007
00023 #define IDC_BUTTON5                     1008
00024 #define IDC_COMBO2                      1009
00025 #define IDC_SPLIT_STYLE                 1009
00026 #define IDC_DIRECTION                   1009
00027 #define IDC_DIRECTION2                  1010
00028 #define IDC_ADD_BORDER                  1012
00029 #define IDC_REDUCE_BORDER               1013
00030 #define IDC_BACK_COLOR                  1014
00031 #define IDC_SET_RANGE                   1015
00032 #define IDC_MIN_RANGE                   1016
00033 #define IDC_MAX_RANGE2                  1017
00034 #define IDC_MAX_RANGE                   1017
00035 #define IDC_SET_POSITION                1018
00036 #define IDC_POSITION                    1019
00037 #define IDC_SET_BUTTON_SIZE             1020
00038 #define IDC_BUTTON_SIZE                 1021
00039 #define IDC_NETADDRESS1                 1022
00040 #define IDC_NETADDRESS                  1022
00041 #define IDC_CHECK_ADDRESS               1023
00042 #define IDC_CHECK_SERVICE               1024
00043 #define IDC_CHECK_NETWORK               1025
00044 #define IDC_CHECK4                      1026
00045 #define IDC_CHECK_NOSCOPE               1027
00046 #define IDC_BUTTON_VALIDATE             1028
00047 #define IDC_LIST1                       1029
00048 #define IDC_LIST_STYLE                  1029
00049 #define IDC_LIST_NETSTRINGS             1030
00050 #define IDC_BUTTON_NOTE                 1031
00051 #define IDC_SET_BUTTON_NOTE             1032
00052 #define IDC_CHECK_ELEV                  1033
00053 #define IDC_CHECK_STATE                 1034
00054 #define IDC_COMMAND                     1037
00055 #define IDC_SLIDER_BORDER               1038
00056 #define IDC_STATIC_BORDERSIZE           1039
00057 #define IDC_CHECK1                      1040
00058 #define IDC_CHECK_MOUSEFWD              1040
00059 #define ID_ROOT_MENU1                   32771
00060 #define ID_ROOT_MENU2                   32772
00061 #define ID_MENU1_MENU1                  32773
00062 #define ID_MENU1_MENU2                  32774
00063 #define ID_MENU2_MENU2                  32775
00064 #define ID_MENU2_MENU3                  32776
00065 #define ID_BUTTON32777                  32777
00066 #define ID_BUTTON32778                  32778
00067 #define ID_BUTTON32779                  32779
00068 #define ID_BUTTON32780                  32780
00069 #define ID_BUTTON32781                  32781
00070 #define ID_BUTTON32782                  32782
00071 #define ID_BUTTON32783                  32783
00072 #define ID_BUTTON32784                  32784
00073 #define ID_BUTTON32785                  32785
00074 #define ID_MENU2_MENU4                  32786
00075 #define ID_BUTTON32787                  32787
00076 #define ID_BUTTON32788                  32788
00077 #define ID_BUTTON32789                  32789
00078
00079 // Next default values for new objects
00080 //
00081 #ifdef APSTUDIO_INVOKED
00082 #ifndef APSTUDIO_READONLY_SYMBOLS
00083 #define _APS_NEXT_RESOURCE_VALUE        139
00084 #define _APS_NEXT_COMMAND_VALUE         32790
00085 #define _APS_NEXT_CONTROL_VALUE         1041
00086 #define _APS_NEXT_SYMED_VALUE           104
00087 #endif
00088 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summinfo.h Source File

  • vc2008fp
  • DrawClient

summinfo.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "propset.h"
00013 #include <objidl.h>
00014
00015 extern const OLECHAR szSummInfo[];
00016
00017 DEFINE_GUID( FMTID_SummaryInformation, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9 );
00018
00019 class CSummInfo
00020 {
00021 public:
00022   CSummInfo();
00023   BOOL SetTitle(LPCTSTR szTitle);
00024   CString GetTitle();
00025   BOOL SetSubject(LPCTSTR szSubject);
00026   CString GetSubject();
00027   BOOL SetAuthor(LPCTSTR szAuthor);
00028   CString GetAuthor();
00029   BOOL SetKeywords(LPCTSTR szKeywords);
00030   CString GetKeywords();
00031   BOOL SetComments(LPCTSTR szComments);
00032   CString GetComments();
00033   BOOL SetTemplate(LPCTSTR szTemplate);
00034   CString GetTemplate();
00035   BOOL SetLastAuthor(LPCTSTR szLastAuthor);
00036   CString GetLastAuthor();
00037   BOOL IncrRevNum();
00038   CString GetRevNum();
00039   void StartEditTimeCount();
00040   BOOL AddCountToEditTime();
00041   CString GetEditTime();
00042   BOOL RecordPrintDate();
00043   CString GetLastPrintDate();
00044   BOOL RecordCreateDate();
00045   CString GetCreateDate();
00046   BOOL RecordSaveDate();
00047   CString GetLastSaveDate();
00048   BOOL SetNumPages(ULONG nPages);
00049   CString GetNumPages();
00050   BOOL SetNumWords(ULONG nWords);
00051   CString GetNumWords();
00052   BOOL SetNumChars(ULONG nChars);
00053   CString GetNumChars();
00054   BOOL SetAppname(LPCTSTR szAppname);
00055   CString GetAppname();
00056   BOOL SetSecurity(ULONG nLevel);
00057   CString GetSecurity();
00058   BOOL WriteToStorage(LPSTORAGE lpRootStg);
00059   BOOL ReadFromStorage(LPSTORAGE lpRootStg);
00060
00061 protected:
00062   CPropertySet m_propSet;
00063   CPropertySection* m_pSection;
00064   __int64 startEdit;
00065 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/multipad.h Source File

  • general
  • multipad

multipad.h

Go to the documentation of this file.
00001 // multipad.h : main header file for the Multipad application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include <afxext.h>
00014 #include "resource.h"
00015
00016 class CMultiPadApp : public CWinApp
00017 {
00018   BOOL InitInstance();
00019   //{{AFX_MSG(CMultiPadApp)
00020   afx_msg void OnAppAbout();
00021   //}}AFX_MSG
00022   DECLARE_MESSAGE_MAP()
00023 };
00024
00025 class CMainFrame : public CMDIFrameWnd
00026 {
00027   DECLARE_DYNCREATE(CMainFrame)
00028   CStatusBar  m_StatusBar;
00029   CToolBar    m_ToolBar;
00030   //{{AFX_MSG(CMainFrame)
00031   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00032   //}}AFX_MSG
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 class CPadDoc : public CDocument
00037 {
00038   DECLARE_DYNCREATE(CPadDoc)
00039   void Serialize(CArchive& ar);
00040   //{{AFX_MSG(CPadDoc)
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View2.cpp Source File

  • vc2008fp
  • TabbedView

View2.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013 #include "View2.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CView2
00023
00024 IMPLEMENT_DYNCREATE(CView2, CListView)
00025
00026 CView2::CView2()
00027 {
00028 }
00029
00030 CView2::~CView2()
00031 {
00032 }
00033
00034
00035 BEGIN_MESSAGE_MAP(CView2, CListView)
00036   ON_WM_CONTEXTMENU()
00037   ON_WM_WINDOWPOSCHANGING()
00038   ON_WM_KEYDOWN()
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CView2 drawing
00043
00044 void CView2::OnDraw(CDC* /*pDC*/)
00045 {
00046 }
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CView2 diagnostics
00050
00051 #ifdef _DEBUG
00052 void CView2::AssertValid() const
00053 {
00054   CListView::AssertValid();
00055 }
00056
00057 void CView2::Dump(CDumpContext& dc) const
00058 {
00059   CListView::Dump(dc);
00060 }
00061 #endif //_DEBUG
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CView2 message handlers
00065
00066 BOOL CView2::PreCreateWindow(CREATESTRUCT& cs)
00067 {
00068   cs.style |= LVS_REPORT;
00069   return CListView::PreCreateWindow(cs);
00070 }
00071
00072 void CView2::OnInitialUpdate()
00073 {
00074   CListView::OnInitialUpdate();
00075
00076   CListCtrl& wndList = GetListCtrl ();
00077
00078   wndList.SetExtendedStyle (LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
00079
00080   const int nColumns = 15;
00081   int iColumn = 0;
00082
00083   // Insert columns:
00084   for (iColumn = 0; iColumn < nColumns; iColumn++)
00085   {
00086     CString strColumn;
00087     strColumn.Format (_T("Column %d"), iColumn + 1);
00088
00089     wndList.InsertColumn (iColumn, strColumn, LVCFMT_LEFT, 70);
00090   }
00091
00092   // Insert items:
00093   for (int i = 0; i < 100; i++)
00094   {
00095     const CString strItemFmt = _T("Item (%d, %d)");
00096
00097     CString strItem;
00098     strItem.Format (strItemFmt, 1, i + 1);
00099
00100     int iItem = wndList.InsertItem (i, strItem, 0);
00101
00102     for (iColumn = 1; iColumn < nColumns; iColumn++)
00103     {
00104       strItem.Format (strItemFmt, iColumn + 1, i + 1);
00105       wndList.SetItemText (iItem, iColumn, strItem);
00106     }
00107   }
00108 }
00109
00110 void CView2::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
00111 {
00112   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00113 }
00114
00115 void CView2::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
00116 {
00117   CListView::OnWindowPosChanging(lpwndpos);
00118
00119   // Hide horizontal scrollbar:
00120   ShowScrollBar (SB_HORZ, FALSE);
00121   ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
00122 }
00123
00124 void CView2::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00125 {
00126   CListView::OnKeyDown(nChar, nRepCnt, nFlags);
00127
00128   if (nChar == VK_LEFT || nChar == VK_RIGHT)
00129   {
00130     // Assume scroll left or right. Synchronize scorll bars:
00131     CMFCTabCtrl* pTabWnd = DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
00132     ASSERT_VALID (pTabWnd);
00133
00134     pTabWnd->SynchronizeScrollBar ();
00135   }
00136 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/resource.h Source File

  • vc2008fp
  • SetPaneSize

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by SetPaneSize.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDD_SetPaneSize_FORM             101
00007 #define IDS_MAIN_TOOLBAR                101
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_SETBARTYPE                  129
00010 #define IDR_CONTEXT_MENU                130
00011 #define IDR_POPUP_TOOLBAR               131
00012 #define IDB_WORKSPACE                   147
00013 #define IDB_TOOLBAR256                  151
00014 #define IDD_DLG_BAR                     154
00015 #define IDD_ABOUTBOX                    999
00016 #define IDC_COMPANY_URL                 1041
00017 #define IDC_EDIT_SIZE                   1042
00018 #define IDC_EDIT_WIDTH                  1043
00019 #define IDC_BUTTON_SET_DLGBAR_SIZE      1044
00020 #define IDC_BUTTON_SET_CONTAINER_SIZE   1045
00021 #define IDC_EDIT_WIDTH_IN_PIXELS        1047
00022 #define IDC_EDIT_HEIGHT_IN_PIXELS       1048
00023 #define IDC_BTN_SET_WIDTH_IN_PIXELS   1049
00024 #define IDC_BTN_SET_HEIGHT_IN_PIXELS  1050
00025 #define ID_VIEW_CUSTOMIZE               32770
00026 #define ID_VIEW_TOOLBARS                32771
00027 #define ID_VIEW_DLGBAR                  32792
00028 #define ID_VIEW_WORKSPACE               32803
00029
00030 // Next default values for new objects
00031 //
00032 #ifdef APSTUDIO_INVOKED
00033 #ifndef APSTUDIO_READONLY_SYMBOLS
00034 #define _APS_3D_CONTROLS                     1
00035 #define _APS_NEXT_RESOURCE_VALUE        155
00036 #define _APS_NEXT_COMMAND_VALUE         32833
00037 #define _APS_NEXT_CONTROL_VALUE         1051
00038 #define _APS_NEXT_SYMED_VALUE           108
00039 #endif
00040 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.h Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

CustomFileDialog.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 // CCustomFileDialog
00004 // A CCustomFileDialog implements CFileDialog's virtual overrides for event
00005 // handling and displays when those callbacks are triggered.
00006 class CCustomFileDialog : public CFileDialog
00007 {
00008   DECLARE_DYNAMIC(CCustomFileDialog)
00009
00010 public:
00011   CCustomFileDialog(BOOL bOpenFileDialog, // TRUE for FileOpen, FALSE for FileSaveAs
00012             BOOL bVistaStyle,
00013             BOOL bEventPopups,
00014             CString &strLog);
00015   virtual ~CCustomFileDialog();
00016
00017 private:
00018   // Helper method that logs the given event message as specified by the user
00019   void LogEvent(LPCWSTR eventMsg);
00020
00021   BOOL  m_bEventPopups;
00022   CString &m_strLog;
00023
00024 protected:
00025   // virtual event overrides
00026   DECLARE_MESSAGE_MAP()
00027   // CFileDialog overrides
00028   virtual void OnFileNameChange();
00029   virtual BOOL OnFileNameOK();
00030   virtual void OnFolderChange();
00031   virtual void OnInitDone();
00032   virtual void OnLBSelChangedNotify(UINT nIDBox, UINT iCurSel, UINT nCode);
00033   virtual UINT OnShareViolation(LPCTSTR lpszPathName);
00034   virtual void OnTypeChange();
00035
00036   // CDialog overrides
00037   virtual BOOL OnInitDialog();
00038   virtual void OnOK();
00039   virtual void OnCancel();
00040   virtual void OnSetFont(CFont *pFont);
00041 };
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CToolbarLabel Member List

This is the complete list of members for CToolbarLabel, including all inherited members.
CToolbarLabel(UINT nID=0, LPCTSTR lpszText=NULL) | CToolbarLabel |
CToolbarLabel(UINT nID=0, LPCTSTR lpszText=NULL) | CToolbarLabel |
OnDraw(CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE) | CToolbarLabel | [virtual]
OnDraw(CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE) | CToolbarLabel | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyListCtrl Member List

This is the complete list of members for CMyListCtrl, including all inherited members.
CMyListCtrl() | CMyListCtrl |
m_bColor | CMyListCtrl |
m_bDragging | CMyListCtrl |
m_bModifyFont | CMyListCtrl |
m_iItemDrag | CMyListCtrl |
m_iItemDrop | CMyListCtrl |
m_oldDNDStyle | CMyListCtrl |
m_pimageListDrag | CMyListCtrl |
m_ptHotSpot | CMyListCtrl |
m_ptOrigin | CMyListCtrl |
m_sizeDelta | CMyListCtrl |
OnBeginDrag(LPNMHDR pnmhdr, LRESULT *pResult) | CMyListCtrl | [protected]
OnButtonUp(CPoint point) | CMyListCtrl |
OnCompareItems(LPARAM lParam1, LPARAM lParam2, int iColumn) | CMyListCtrl | [private, virtual]
OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pResult) | CMyListCtrl | [protected]
OnGetCellBkColor(int nRow, int nColum) | CMyListCtrl | [private, virtual]
OnGetCellFont(int nRow, int nColum, DWORD dwData=0) | CMyListCtrl | [private, virtual]
OnGetCellTextColor(int nRow, int nColum) | CMyListCtrl | [private, virtual]
OnLButtonUp(UINT nFlags, CPoint point) | CMyListCtrl | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CMyListCtrl | [protected]
OnRButtonUp(UINT nFlags, CPoint point) | CMyListCtrl | [protected]
~CMyListCtrl() | CMyListCtrl | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTooltipDemoApp Member List

This is the complete list of members for CTooltipDemoApp, including all inherited members.
CTooltipDemoApp() | CTooltipDemoApp |
ExitInstance() | CTooltipDemoApp | [virtual]
InitInstance() | CTooltipDemoApp | [virtual]
m_bTTInPopupMenus | CTooltipDemoApp |
OnAppAbout() | CTooltipDemoApp |
PreLoadState() | CTooltipDemoApp | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackdoc.cpp Source File

  • general
  • tracker

trackdoc.cpp

Go to the documentation of this file.
00001 // trackdoc.cpp : implementation of the CTrackerDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "trackapp.h"
00015
00016 #include "trackdoc.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CTrackerDoc
00025
00026 IMPLEMENT_DYNCREATE(CTrackerDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CTrackerDoc, CDocument)
00029   //{{AFX_MSG_MAP(CTrackerDoc)
00030   ON_COMMAND(ID_EDIT_DOTTEDLINE, OnEditDottedline)
00031   ON_UPDATE_COMMAND_UI(ID_EDIT_DOTTEDLINE, OnUpdateEditDottedline)
00032   ON_COMMAND(ID_EDIT_HATCHEDBORDER, OnEditHatchedborder)
00033   ON_UPDATE_COMMAND_UI(ID_EDIT_HATCHEDBORDER, OnUpdateEditHatchedborder)
00034   ON_UPDATE_COMMAND_UI(ID_EDIT_HATCHEDINSIDE, OnUpdateEditHatchedinside)
00035   ON_COMMAND(ID_EDIT_HATCHEDINSIDE, OnEditHatchedinside)
00036   ON_COMMAND(ID_EDIT_RESIZEINSIDE, OnEditResizeinside)
00037   ON_UPDATE_COMMAND_UI(ID_EDIT_RESIZEINSIDE, OnUpdateEditResizeinside)
00038   ON_COMMAND(ID_EDIT_RESIZEOUTSIDE, OnEditResizeoutside)
00039   ON_UPDATE_COMMAND_UI(ID_EDIT_RESIZEOUTSIDE, OnUpdateEditResizeoutside)
00040   ON_COMMAND(ID_EDIT_SOLIDLINE, OnEditSolidline)
00041   ON_UPDATE_COMMAND_UI(ID_EDIT_SOLIDLINE, OnUpdateEditSolidline)
00042   ON_COMMAND(ID_EDIT_ALLOWINVERT, OnEditAllowInvert)
00043   ON_UPDATE_COMMAND_UI(ID_EDIT_ALLOWINVERT, OnUpdateEditAllowInvert)
00044   //}}AFX_MSG_MAP
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CTrackerDoc construction/destruction
00049
00050 CTrackerDoc::CTrackerDoc()
00051 {
00052   m_tracker.m_rect.left = 10;
00053   m_tracker.m_rect.top = 10;
00054   m_tracker.m_rect.right = 101;
00055   m_tracker.m_rect.bottom = 101;
00056   m_bAllowInvert = FALSE;
00057 }
00058
00059 CTrackerDoc::~CTrackerDoc()
00060 {
00061 }
00062
00063 BOOL CTrackerDoc::OnNewDocument()
00064 {
00065   if (!CDocument::OnNewDocument())
00066     return FALSE;
00067   // TODO: add reinitialization code here
00068   // (SDI documents will reuse this document)
00069   return TRUE;
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CTrackerDoc serialization
00074
00075 void CTrackerDoc::Serialize(CArchive& ar)
00076 {
00077   if (ar.IsStoring())
00078   {
00079     DWORD dw = m_tracker.m_nStyle;
00080     WORD w = (WORD)m_bAllowInvert;
00081     ar << m_tracker.m_rect << dw << w;
00082   }
00083   else
00084   {
00085     DWORD dw;
00086     WORD w;
00087     ar >> m_tracker.m_rect >> dw >> w;
00088     m_tracker.m_nStyle = (UINT)dw;
00089     m_bAllowInvert = w;
00090   }
00091 }
00092
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // CTrackerDoc diagnostics
00096
00097 #ifdef _DEBUG
00098 void CTrackerDoc::AssertValid() const
00099 {
00100   CDocument::AssertValid();
00101 }
00102
00103 void CTrackerDoc::Dump(CDumpContext& dc) const
00104 {
00105   CDocument::Dump(dc);
00106 }
00107
00108 #endif //_DEBUG
00109
00110 /////////////////////////////////////////////////////////////////////////////
00111 // CTrackerDoc commands
00112
00113 void CTrackerDoc::OnEditSolidline()
00114 {
00115   CRect rectTrue;
00116   m_tracker.GetTrueRect(&rectTrue);
00117   m_tracker.m_nStyle &= ~CRectTracker::dottedLine;
00118   m_tracker.m_nStyle ^= CRectTracker::solidLine;
00119   SetModifiedFlag();
00120   UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
00121   UpdateAllViews(NULL);
00122 }
00123
00124 void CTrackerDoc::OnUpdateEditSolidline(CCmdUI* pCmdUI)
00125 {
00126   pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::solidLine));
00127 }
00128
00129 void CTrackerDoc::OnEditDottedline()
00130 {
00131   CRect rectTrue;
00132   m_tracker.GetTrueRect(&rectTrue);
00133   m_tracker.m_nStyle &= ~CRectTracker::solidLine;
00134   m_tracker.m_nStyle ^= CRectTracker::dottedLine;
00135   SetModifiedFlag();
00136   UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
00137   UpdateAllViews(NULL);
00138 }
00139
00140 void CTrackerDoc::OnUpdateEditDottedline(CCmdUI* pCmdUI)
00141 {
00142   pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::dottedLine));
00143 }
00144
00145 void CTrackerDoc::OnEditHatchedborder()
00146 {
00147   CRect rectTrue;
00148   m_tracker.GetTrueRect(&rectTrue);
00149   m_tracker.m_nStyle ^= CRectTracker::hatchedBorder;
00150   SetModifiedFlag();
00151   UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
00152   UpdateAllViews(NULL);
00153 }
00154
00155 void CTrackerDoc::OnUpdateEditHatchedborder(CCmdUI* pCmdUI)
00156 {
00157   pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::hatchedBorder));
00158 }
00159
00160 void CTrackerDoc::OnEditHatchedinside()
00161 {
00162   CRect rectTrue;
00163   m_tracker.GetTrueRect(&rectTrue);
00164   m_tracker.m_nStyle ^= CRectTracker::hatchInside;
00165   SetModifiedFlag();
00166   UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
00167   UpdateAllViews(NULL);
00168 }
00169
00170 void CTrackerDoc::OnUpdateEditHatchedinside(CCmdUI* pCmdUI)
00171 {
00172   pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::hatchInside));
00173 }
00174
00175 void CTrackerDoc::OnEditResizeinside()
00176 {
00177   CRect rectTrue;
00178   m_tracker.GetTrueRect(&rectTrue);
00179   m_tracker.m_nStyle &= ~CRectTracker::resizeOutside;
00180   m_tracker.m_nStyle ^= CRectTracker::resizeInside;
00181   SetModifiedFlag();
00182   UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
00183   UpdateAllViews(NULL);
00184 }
00185
00186 void CTrackerDoc::OnUpdateEditResizeinside(CCmdUI* pCmdUI)
00187 {
00188   pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::resizeInside));
00189 }
00190
00191 void CTrackerDoc::OnEditResizeoutside()
00192 {
00193   CRect rectTrue;
00194   m_tracker.GetTrueRect(&rectTrue);
00195   m_tracker.m_nStyle &= ~CRectTracker::resizeInside;
00196   m_tracker.m_nStyle ^= CRectTracker::resizeOutside;
00197   SetModifiedFlag();
00198   UpdateAllViews(NULL, (LPARAM)(LPCRECT)rectTrue);
00199   UpdateAllViews(NULL);
00200 }
00201
00202 void CTrackerDoc::OnUpdateEditResizeoutside(CCmdUI* pCmdUI)
00203 {
00204   pCmdUI->SetCheck(!!(m_tracker.m_nStyle & CRectTracker::resizeOutside));
00205 }
00206
00207 void CTrackerDoc::OnEditAllowInvert()
00208 {
00209   m_bAllowInvert = !m_bAllowInvert;
00210   SetModifiedFlag();
00211 }
00212
00213 void CTrackerDoc::OnUpdateEditAllowInvert(CCmdUI* pCmdUI)
00214 {
00215   pCmdUI->SetCheck(m_bAllowInvert);
00216 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpindialLib::_DSpindial Member List

This is the complete list of members for SpindialLib::_DSpindial, including all inherited members.
id SpindialLib::_DSpindial
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MainFrm.h Source File

  • general
  • MMXSwarm

MainFrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013 #include "ChildView.h"
00014
00015 class CMainFrame : public CFrameWnd
00016 {
00017 public:
00018   CMainFrame();
00019 protected:
00020   DECLARE_DYNAMIC(CMainFrame)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027   CChildView *GetView()
00028   { return(&m_wndView); }
00029
00030 // Overrides
00031 public:
00032   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00033   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00034 // Implementation
00035 public:
00036   virtual ~CMainFrame();
00037
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:  // control bar embedded members
00044   CStatusBar  m_wndStatusBar;
00045   CToolBar    m_wndToolBar;
00046   CChildView  m_wndView;
00047
00048 // Generated message map functions
00049 protected:
00050
00051   //{{AFX_MSG(CMainFrame)
00052   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00053   afx_msg void OnSetFocus(CWnd *pOldWnd);
00054   afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
00055   //}}AFX_MSG
00056
00057   DECLARE_MESSAGE_MAP()
00058 private:
00059 };
00060
00061
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CProperty Member List

This is the complete list of members for CProperty, including all inherited members.
AllocValue(ULONG cb) | CProperty | [private]
AllocValue(ULONG cb) | CProperty | [private]
CProperty(void) | CProperty |
CProperty(DWORD dwID, const LPVOID pValue, DWORD dwType) | CProperty |
CProperty(void) | CProperty |
CProperty(DWORD dwID, const LPVOID pValue, DWORD dwType) | CProperty |
CPropertySection class | CProperty | [friend]
CPropertySet class | CProperty | [friend]
FreeValue() | CProperty | [private]
FreeValue() | CProperty | [private]
Get(DWORD *pcb) | CProperty |
Get(void) | CProperty |
Get(DWORD *pcb) | CProperty |
Get(void) | CProperty |
GetID(void) | CProperty |
GetID(void) | CProperty |
GetRawValue(void) | CProperty |
GetRawValue(void) | CProperty |
GetType(void) | CProperty |
GetType(void) | CProperty |
m_dwPropID | CProperty | [private]
m_dwType | CProperty | [private]
m_pValue | CProperty | [private]
ReadFromStream(IStream *pIStream) | CProperty |
ReadFromStream(IStream *pIStream) | CProperty |
Set(DWORD dwID, const LPVOID pValue, DWORD dwType) | CProperty |
Set(const LPVOID pValue, DWORD dwType) | CProperty |
Set(const LPVOID pValue) | CProperty |
Set(DWORD dwID, const LPVOID pValue, DWORD dwType) | CProperty |
Set(const LPVOID pValue, DWORD dwType) | CProperty |
Set(const LPVOID pValue) | CProperty |
SetID(DWORD dwPropID) | CProperty |
SetID(DWORD dwPropID) | CProperty |
SetType(DWORD dwType) | CProperty |
SetType(DWORD dwType) | CProperty |
WriteToStream(IStream *pIStream) | CProperty |
WriteToStream(IStream *pIStream) | CProperty |
~CProperty() | CProperty |
~CProperty() | CProperty |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/StdAfx.cpp Source File

  • vc2008fp
  • Explorer

StdAfx.cpp

Go to the documentation of this file.
00001 //*******************************************************************************
00002 //
00003 // stdafx.cpp : source file that includes just the standard includes
00004 //  Explorer.pch will be the pre-compiled header
00005 //  stdafx.obj will contain the pre-compiled type information
00006
00007 #include "stdafx.h"
00008
00009
00010
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/tooldlg.h Source File

  • general
  • docktool

tooldlg.h

Go to the documentation of this file.
00001 // tooldlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CToolDlg dialog
00014
00015 class CToolDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CToolDlg(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CToolDlg)
00023   enum { IDD = IDD_TOOLBAR };
00024   BOOL    m_bBrowse;
00025   BOOL    m_bDebug;
00026   BOOL    m_bEdit;
00027   BOOL    m_bMain;
00028   BOOL    m_bResource;
00029   int     m_nToolTips;
00030   BOOL    m_bPalette;
00031   int     m_nColumns;
00032   int     m_nColor;
00033   //}}AFX_DATA
00034
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CToolDlg)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 protected:
00045
00046   // Generated message map functions
00047   //{{AFX_MSG(CToolDlg)
00048     // NOTE: the ClassWizard will add member functions here
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapedoc.h Source File

  • general
  • propdlg

shapedoc.h

Go to the documentation of this file.
00001 // shapesdoc.h : interface of the CShapesDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <afxtempl.h>
00013
00014 class CShapesDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CShapesDoc();
00018   DECLARE_DYNCREATE(CShapesDoc)
00019
00020 // Attributes
00021 public:
00022   CTypedPtrList<CObList, CShape*> m_shapeList;
00023
00024 // Operations
00025 public:
00026   void AddShape(CShape* pShapeNew);
00027   CShape* HitTest(CPoint pt);
00028
00029 // Overrides
00030   // ClassWizard generate virtual function overrides
00031   //{{AFX_VIRTUAL(CShapesDoc)
00032   protected:
00033   virtual BOOL OnNewDocument();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 public:
00038   virtual ~CShapesDoc();
00039   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045 protected:
00046
00047 // Generated message map functions
00048 protected:
00049   //{{AFX_MSG(CShapesDoc)
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWorkSpaceToolBarApp Member List

This is the complete list of members for CWorkSpaceToolBarApp, including all inherited members.
CWorkSpaceToolBarApp() | CWorkSpaceToolBarApp |
ExitInstance() | CWorkSpaceToolBarApp | [virtual]
InitInstance() | CWorkSpaceToolBarApp | [virtual]
OnAppAbout() | CWorkSpaceToolBarApp |
PreLoadState() | CWorkSpaceToolBarApp | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagANIMATEINFO Member List

This is the complete list of members for tagANIMATEINFO, including all inherited members.
cbSize | tagANIMATEINFO
dwReserved | tagANIMATEINFO
fuFlags | tagANIMATEINFO
lParam | tagANIMATEINFO
uPeriodCB | tagANIMATEINFO
uSpeedPct | tagANIMATEINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CGetURL Member List

This is the complete list of members for CGetURL, including all inherited members.
CGetURL(CWnd *pParent=NULL) | CGetURL |
DoDataExchange(CDataExchange *pDX) | CGetURL | [protected, virtual]
IDD enum value | CGetURL |
m_AddrCombo | CGetURL | [protected]
m_spBrowser | CGetURL | [protected]
m_szCurAddr | CGetURL | [protected]
m_URL | CGetURL |
OnCloseup() | CGetURL | [protected]
OnDocumentComplete(LPDISPATCH pDisp, LPVARIANT pURL) | CGetURL | [protected]
OnGo() | CGetURL | [protected]
OnInitDialog() | CGetURL | [protected, virtual]
OnOK() | CGetURL | [protected, virtual]
OnSearch() | CGetURL | [protected]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CGotoDlg Member List

This is the complete list of members for CGotoDlg, including all inherited members.
CGotoDlg(CWnd *pParent=NULL) | CGotoDlg |
DoDataExchange(CDataExchange *pDX) | CGotoDlg | [protected, virtual]
IDD enum value | CGotoDlg |
m_nLineNum | CGotoDlg |
OnCancel() | CGotoDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/IconComboBox.cpp Source File

  • vc2008fp
  • DesktopAlertDemo

IconComboBox.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DesktopAlertDemo.h"
00013 #include "IconComboBox.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CIconComboBox
00023
00024 CIconComboBox::CIconComboBox(CMFCToolBarImages& Icons) :
00025   m_Icons (Icons)
00026 {
00027 }
00028
00029 CIconComboBox::~CIconComboBox()
00030 {
00031 }
00032
00033
00034 BEGIN_MESSAGE_MAP(CIconComboBox, CComboBox)
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CIconComboBox message handlers
00039
00040 int CIconComboBox::CompareItem(LPCOMPAREITEMSTRUCT /*lpCompareItemStruct*/)
00041 {
00042   // TODO: Add your code to determine the sorting order of the specified items
00043   // return -1 = item 1 sorts before item 2
00044   // return 0 = item 1 and item 2 sort the same
00045   // return 1 = item 1 sorts after item 2
00046
00047   return 0;
00048 }
00049
00050 void CIconComboBox::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00051 {
00052   CDC* pDC= CDC::FromHandle (lpDIS->hDC);
00053   ASSERT_VALID (pDC);
00054
00055   HBRUSH    brBackground;
00056   COLORREF  clText;
00057
00058   if (lpDIS->itemState & ODS_SELECTED)
00059   {
00060     brBackground = GetSysColorBrush (COLOR_HIGHLIGHT);
00061     clText = afxGlobalData.clrTextHilite;
00062   }
00063   else
00064   {
00065     brBackground = GetSysColorBrush (COLOR_WINDOW);
00066     clText = afxGlobalData.clrWindowText;
00067   }
00068
00069   CRect rectItem = lpDIS->rcItem;
00070   ::FillRect (lpDIS->hDC, &rectItem, brBackground);
00071
00072   int nIndex = lpDIS->itemID;
00073
00074   if (nIndex > 0)
00075   {
00076     CAfxDrawState ds;
00077     m_Icons.SetTransparentColor (afxGlobalData.clrBarFace);
00078     m_Icons.PrepareDrawImage (ds);
00079     m_Icons.Draw (pDC, rectItem.left + 1, rectItem.top + 1, nIndex - 1);
00080     m_Icons.EndDrawImage (ds);
00081   }
00082
00083   CString strText;
00084   GetLBText (nIndex, strText);
00085
00086   CRect rectText = rectItem;
00087   rectText.left += 20;
00088
00089   CFont* pOldFont = pDC->SelectObject (&afxGlobalData.fontRegular);
00090
00091   pDC->SetBkMode (TRANSPARENT);
00092   pDC->SetTextColor (clText);
00093
00094   pDC->DrawText (strText, rectText, DT_SINGLELINE | DT_VCENTER);
00095
00096   pDC->SelectObject (pOldFont);
00097 }
00098
00099 void CIconComboBox::MeasureItem(LPMEASUREITEMSTRUCT lpMIS)
00100 {
00101   lpMIS->itemHeight = 18;
00102   lpMIS->itemWidth = 18;
00103 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/targetver.h Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
00012
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCubeDoc Member List

This is the complete list of members for CCubeDoc, including all inherited members.
CCubeDoc() | CCubeDoc | [protected]
OnNewDocument() | CCubeDoc | [virtual]
Serialize(CArchive &ar) | CCubeDoc | [virtual]
~CCubeDoc() | CCubeDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/LunchPg.cpp Source File

  • general
  • snapvw

LunchPg.cpp

Go to the documentation of this file.
00001 // LunchPg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "snapvw.h"
00014 #include "LunchPg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CLunchPage property page
00024
00025 IMPLEMENT_DYNCREATE(CLunchPage, CPropertyPage)
00026
00027 CLunchPage::CLunchPage() : CPropertyPage(CLunchPage::IDD)
00028 {
00029   //{{AFX_DATA_INIT(CLunchPage)
00030     // NOTE: the ClassWizard will add member initialization here
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 CLunchPage::~CLunchPage()
00035 {
00036 }
00037
00038 void CLunchPage::DoDataExchange(CDataExchange* pDX)
00039 {
00040   CPropertyPage::DoDataExchange(pDX);
00041   //{{AFX_DATA_MAP(CLunchPage)
00042     // NOTE: the ClassWizard will add DDX and DDV calls here
00043   //}}AFX_DATA_MAP
00044 }
00045
00046
00047 BEGIN_MESSAGE_MAP(CLunchPage, CPropertyPage)
00048   //{{AFX_MSG_MAP(CLunchPage)
00049   //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CLunchPage message handlers
00054
00055 BOOL CLunchPage::OnInitDialog()
00056 {
00057   CPropertyPage::OnInitDialog();
00058
00059   CButton* pBevButton;
00060   pBevButton = (CButton*) GetDlgItem(IDC_SODA);
00061   pBevButton->SetCheck(1);
00062
00063   CButton* pFoodButton;
00064   pFoodButton = (CButton*) GetDlgItem(IDC_GREASY);
00065   pFoodButton->SetCheck(1);
00066
00067   CButton* pMagButton;
00068   pMagButton = (CButton*) GetDlgItem(IDC_TABLOID);
00069   pMagButton->SetCheck(1);
00070
00071   // TODO: Add extra initialization here
00072
00073   return TRUE;  // return TRUE unless you set the focus to a control
00074           // EXCEPTION: OCX Property Pages should return FALSE
00075 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrivw.cpp Source File

  • ole
  • ipdrive

ipdrivw.cpp

Go to the documentation of this file.
00001 // ipdrivw.cpp : implementation of the CDriverView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ipdrive.h"
00014
00015 #include "ipdridoc.h"
00016 #include "ipdrivw.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CDriverView
00025
00026 IMPLEMENT_DYNCREATE(CDriverView, CFormView)
00027
00028 BEGIN_MESSAGE_MAP(CDriverView, CFormView)
00029   //{{AFX_MSG_MAP(CDriverView)
00030   ON_BN_CLICKED(ID_LOOKUP, OnLookup)
00031   ON_BN_CLICKED(ID_REMOVE, OnRemove)
00032   ON_BN_CLICKED(ID_ADD, OnAdd)
00033   ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
00034   ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CDriverView construction/destruction
00040
00041 CDriverView::CDriverView()
00042   : CFormView(CDriverView::IDD)
00043 {
00044   //{{AFX_DATA_INIT(CDriverView)
00045     // NOTE: the ClassWizard will add member initialization here
00046   //}}AFX_DATA_INIT
00047
00048   m_bInitialized = FALSE;
00049 }
00050
00051 CDriverView::~CDriverView()
00052 {
00053 }
00054
00055 void CDriverView::DoDataExchange(CDataExchange* pDX)
00056 {
00057   CFormView::DoDataExchange(pDX);
00058   //{{AFX_DATA_MAP(CDriverView)
00059   DDX_Control(pDX, IDC_EDIT2, m_toValue);
00060   DDX_Control(pDX, IDC_COMBO3, m_toType);
00061   DDX_Control(pDX, IDC_EDIT1, m_ctrlValue);
00062   DDX_Control(pDX, IDC_COMBO2, m_ctrlType);
00063   //}}AFX_DATA_MAP
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CDriverView diagnostics
00068
00069 #ifdef _DEBUG
00070 void CDriverView::AssertValid() const
00071 {
00072   CFormView::AssertValid();
00073 }
00074
00075 void CDriverView::Dump(CDumpContext& dc) const
00076 {
00077   CFormView::Dump(dc);
00078 }
00079
00080 CDriverDoc* CDriverView::GetDocument() // non-debug version is inline
00081 {
00082   return STATIC_DOWNCAST(CDriverDoc, m_pDocument);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CDriverView message handlers
00088
00089 void CDriverView::OnInitialUpdate()
00090 {
00091   GetParentFrame()->RecalcLayout();
00092   ResizeParentToFit(FALSE);
00093
00094   CFormView::OnInitialUpdate();
00095
00096   if (!m_bInitialized)
00097   {
00098     m_bInitialized = TRUE;
00099     GetDlgItem(IDC_CURRENT_COUNT)->GetWindowText(m_strCurrentCount);
00100   }
00101
00102   // initialize the form
00103   m_ctrlType.SetCurSel(0);
00104   UpdateToNothing();
00105 }
00106
00107 void CDriverView::UpdateToNothing()
00108 {
00109   UpdateCurrentCount();
00110   m_toType.SetCurSel(-1);
00111
00112   CString str;
00113   str.LoadString(IDS_NOTHING);
00114   m_toValue.SetWindowText(str);
00115 }
00116
00117 void CDriverView::UpdateCurrentCount()
00118 {
00119   CDriverDoc* pDoc = GetDocument();
00120   ASSERT_VALID(pDoc);
00121
00122   CString str;
00123 #if (_MFC_VER > 0x300)
00124   str.Format(m_strCurrentCount, pDoc->m_map.GetCount());
00125 #else
00126   wsprintf(str.GetBuffer(256), m_strCurrentCount,
00127     pDoc->m_map.GetCount());
00128   str.ReleaseBuffer();
00129 #endif
00130   SetDlgItemText(IDC_CURRENT_COUNT, str);
00131 }
00132
00133 VARIANT CDriverView::GetFromVariant()
00134 {
00135   CString strValue;
00136   m_ctrlValue.GetWindowText(strValue);
00137
00138   // we can just throw it in as a string, then coerce to chosen type
00139   VARIANT va;
00140   VariantInit(&va);
00141   va.vt = VT_BSTR;
00142   va.bstrVal = strValue.AllocSysString();
00143 #pragma warning(disable : 4244)
00144   VARTYPE vt = max(0, m_ctrlType.GetCurSel());
00145 #pragma warning(default : 4244)
00146   VARIANT vaTemp;
00147   VariantInit(&vaTemp);
00148   if (FAILED(VariantChangeType(&vaTemp, &va, 0, vt)))
00149   {
00150     AfxMessageBox(IDP_INCOMPATIBLE_TYPE_VALUE);
00151     AfxThrowUserException();
00152   }
00153   VariantClear(&va);
00154   return vaTemp;
00155 }
00156
00157 VARIANT CDriverView::GetToVariant()
00158 {
00159   CString strValue;
00160   m_toValue.GetWindowText(strValue);
00161
00162   // we can just throw it in as a string, then coerce to chosen type
00163   VARIANT va;
00164   VariantInit(&va);
00165   va.vt = VT_BSTR;
00166   va.bstrVal = strValue.AllocSysString();
00167
00168 #pragma warning(disable : 4244)
00169   VARTYPE vt = max(0, m_toType.GetCurSel());
00170 #pragma warning(default : 4244)
00171   VARIANT vaTemp;
00172   VariantInit(&vaTemp);
00173   if (FAILED(VariantChangeType(&vaTemp, &va, 0, vt)))
00174   {
00175     AfxMessageBox(IDP_INCOMPATIBLE_TYPE_VALUE);
00176     AfxThrowUserException();
00177   }
00178   VariantClear(&va);
00179   return vaTemp;
00180 }
00181
00182 void CDriverView::UpdateCurrentVariant(VARIANT& va)
00183 {
00184   m_toType.SetCurSel(va.vt);
00185
00186   VARIANT vaTemp;
00187   VariantInit(&vaTemp);
00188   CString str;
00189   if (FAILED(VariantChangeType(&vaTemp, &va, 0, VT_BSTR)))
00190     str.LoadString(IDS_UNKNOWN);
00191   else
00192     str = vaTemp.bstrVal;
00193   m_toValue.SetWindowText(str);
00194   VariantClear(&vaTemp);
00195 }
00196
00197 void CDriverView::OnLookup()
00198 {
00199   CDriverDoc* pDoc = GetDocument();
00200   ASSERT_VALID(pDoc);
00201
00202   VARIANT vaFrom = GetFromVariant();
00203   VARIANT vaTo = pDoc->m_map.GetItem(vaFrom);
00204   UpdateCurrentVariant(vaTo);
00205
00206   VariantClear(&vaTo);
00207   VariantClear(&vaFrom);
00208 }
00209
00210 void CDriverView::OnRemove()
00211 {
00212   CDriverDoc* pDoc = GetDocument();
00213   ASSERT_VALID(pDoc);
00214
00215   VARIANT vaFrom = GetFromVariant();
00216   pDoc->m_map.RemoveKey(vaFrom);
00217   VariantClear(&vaFrom);
00218
00219   UpdateToNothing();
00220   UpdateCurrentCount();
00221 }
00222
00223 void CDriverView::OnAdd()
00224 {
00225   CDriverDoc* pDoc = GetDocument();
00226   ASSERT_VALID(pDoc);
00227
00228   VARIANT vaFrom = GetFromVariant();
00229   VARIANT vaTo = GetToVariant();
00230   pDoc->m_map.SetAt(vaFrom, vaTo);
00231   VariantClear(&vaFrom);
00232   VariantClear(&vaTo);
00233
00234   OnLookup();
00235   UpdateCurrentCount();
00236 }
00237
00238 void CDriverView::OnButton1()
00239 {
00240   CDriverDoc* pDoc = GetDocument();
00241   ASSERT_VALID(pDoc);
00242
00243   long nCount = 0;
00244   DWORD dwThen = GetTickCount();
00245
00246   if (GetKeyState(VK_CONTROL) >= 0)
00247   {
00248     while (GetTickCount() - dwThen < 5000)
00249     {
00250       pDoc->m_map.SetStr1(_T("Hello, World"));
00251       ++nCount;
00252     }
00253   }
00254   else
00255   {
00256     while (GetTickCount() - dwThen < 5000)
00257     {
00258       pDoc->m_map.SetI1(1);
00259       ++nCount;
00260     }
00261   }
00262   CString str, strFormat;
00263   strFormat.LoadString(IDP_TIMING_RESULT);
00264 #if (_MFC_VER > 0x300)
00265   str.Format(strFormat, nCount);
00266 #else
00267   wsprintf(str.GetBuffer(256), strFormat, nCount);
00268   str.ReleaseBuffer();
00269 #endif
00270   AfxMessageBox(str);
00271 }
00272
00273 void CDriverView::OnButton2()
00274 {
00275   CDriverDoc* pDoc = GetDocument();
00276   ASSERT_VALID(pDoc);
00277
00278   long nCount = 0;
00279   DWORD dwThen = GetTickCount();
00280
00281   if (GetKeyState(VK_CONTROL) >= 0)
00282   {
00283     while (GetTickCount() - dwThen < 5000)
00284     {
00285       pDoc->m_map.SetStr2(_T("Hello, World"));
00286       ++nCount;
00287     }
00288   }
00289   else
00290   {
00291     while (GetTickCount() - dwThen < 5000)
00292     {
00293       pDoc->m_map.SetI2(1);
00294       ++nCount;
00295     }
00296   }
00297   CString str, strFormat;
00298   strFormat.LoadString(IDP_TIMING_RESULT);
00299 #if (_MFC_VER > 0x300)
00300   str.Format(strFormat, nCount);
00301 #else
00302   wsprintf(str.GetBuffer(256), strFormat, nCount);
00303   str.ReleaseBuffer();
00304 #endif
00305   AfxMessageBox(str);
00306 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padframe.h Source File

  • ole
  • superpad

padframe.h

Go to the documentation of this file.
00001 // padframe.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CPadFrame frame
00016
00017 class CPadFrame : public CMDIChildWnd
00018 {
00019   DECLARE_DYNCREATE(CPadFrame)
00020 protected:
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027   static void Initialize();
00028   static void Terminate();
00029
00030 // Implementation
00031 protected:
00032   void ActivateFrame(int nCmdShow);
00033
00034   // Generated message map functions
00035   //{{AFX_MSG(CPadFrame)
00036   afx_msg void OnSize(UINT nType, int cx, int cy);
00037   //}}AFX_MSG
00038   DECLARE_MESSAGE_MAP()
00039
00040   static int m_nDefCmdShow;
00041   static int m_nDefCmdShowOld;
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPage5 Member List

This is the complete list of members for CPage5, including all inherited members.
CMyListCtrl class | CPage5 | [friend]
CPage5() | CPage5 |
DoDataExchange(CDataExchange *pDX) | CPage5 | [protected, virtual]
IDD enum value | CPage5 |
m_bColor | CPage5 |
m_bDescrArea | CPage5 |
m_bDotNetLook | CPage5 |
m_bHeader | CPage5 |
m_bHideFontProps | CPage5 |
m_bMarkChanged | CPage5 |
m_bMarkSortedColumn | CPage5 |
m_bModifyFont | CPage5 |
m_bPropListCategorized | CPage5 |
m_bPropListCustomColors | CPage5 |
m_bShowDragContext | CPage5 |
m_btnExpandAll | CPage5 |
m_imageList | CPage5 | [protected]
m_wndList | CPage5 |
m_wndPropList | CPage5 | [protected]
m_wndPropListLocation | CPage5 |
OnColorRows() | CPage5 | [protected]
OnDescriptionArea() | CPage5 | [protected]
OnDotNetLook() | CPage5 | [protected]
OnHeader() | CPage5 | [protected]
OnHideFontProps() | CPage5 | [protected]
OnInitDialog() | CPage5 | [protected, virtual]
OnMarkChanged() | CPage5 | [protected]
OnMarkSortedColumn() | CPage5 | [protected]
OnModifyFont() | CPage5 | [protected]
OnProplistCategorized() | CPage5 | [protected]
OnProplistCategorized2() | CPage5 | [protected]
OnPropListCustomColors() | CPage5 | [protected]
OnProplistExpandAll() | CPage5 | [protected]
OnResetValues() | CPage5 | [protected]
pGroupFont | CPage5 | [protected]
~CPage5() | CPage5 |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ConfigDlg.h Source File

  • vc2008fp
  • MenuSubSet

ConfigDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CConfigDlg dialog
00015
00016 class CConfigDlg : public CDialog
00017 {
00018 // Construction
00019 public:
00020   CConfigDlg(BOOL bIsStartup = FALSE);
00021
00022 // Dialog Data
00023   enum { IDD = IDD_SELECT_CONF };
00024   CButton m_btnCancel;
00025   int   m_nConfig;
00026
00027
00028 // Overrides
00029   protected:
00030   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00031
00032 // Implementation
00033 protected:
00034   virtual BOOL OnInitDialog();
00035
00036   DECLARE_MESSAGE_MAP()
00037
00038   BOOL m_bIsStartup;
00039 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomEditListBox Member List

This is the complete list of members for CCustomEditListBox, including all inherited members.
OnBrowse() CCustomEditListBox [inline, private, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRulerBar Member List

This is the complete list of members for CRulerBar, including all inherited members.
brushBtnFace | CRulerBar |
brushWindow | CRulerBar |
CalcFixedLayout(BOOL bStretch, BOOL bHorz) | CRulerBar | [virtual]
CalcFixedLayout(BOOL bStretch, BOOL bHorz) | CRulerBar | [virtual]
ClientToRuler(CPoint &pt) | CRulerBar | [inline]
ClientToRuler(CRect &rect) | CRulerBar | [inline]
ClientToRuler(CPoint &pt) | CRulerBar | [inline]
ClientToRuler(CRect &rect) | CRulerBar | [inline]
Create(CWnd *pParentWnd, DWORD dwStyle, UINT nID) | CRulerBar | [virtual]
Create(CWnd *pParentWnd, DWORD dwStyle, UINT nID) | CRulerBar | [virtual]
CreateGDIObjects() | CRulerBar | [protected]
CreateGDIObjects() | CRulerBar |
CRulerBar(BOOL b3DExt=TRUE) | CRulerBar |
CRulerBar(BOOL b3DExt=TRUE) | CRulerBar |
CRulerItem class | CRulerBar | [friend]
DoPaint(CDC *pDC) | CRulerBar | [virtual]
DoPaint(CDC *pDC) | CRulerBar | [virtual]
DrawDiv(CDC &dc, int nInc, int nLargeDiv, int nLength) | CRulerBar | [protected]
DrawDiv(CDC &dc, int nInc, int nLargeDiv, int nLength) | CRulerBar | [protected]
DrawFace(CDC &dc) | CRulerBar | [protected]
DrawFace(CDC &dc) | CRulerBar | [protected]
DrawNumbers(CDC &dc, int nInc, int nTPU) | CRulerBar | [protected]
DrawNumbers(CDC &dc, int nInc, int nTPU) | CRulerBar | [protected]
DrawTabs(CDC &dc) | CRulerBar | [protected]
DrawTabs(CDC &dc) | CRulerBar | [protected]
DrawTickMarks(CDC &dC) | CRulerBar | [protected]
DrawTickMarks(CDC &dC) | CRulerBar | [protected]
FillInParaFormat(PARAFORMAT &pf) | CRulerBar | [protected]
FillInParaFormat(WPD_PARAFORMAT &pf) | CRulerBar | [protected]
fnt | CRulerBar |
GetBaseUnits() | CRulerBar |
GetBaseUnits() | CRulerBar |
GetDocument() | CRulerBar | [inline, protected]
GetDocument() | CRulerBar | [inline, protected]
GetFreeTab() | CRulerBar | [protected]
GetFreeTab() | CRulerBar | [protected]
GetHitTabPix(CPoint pt) | CRulerBar | [protected]
GetHitTabPix(CPoint pt) | CRulerBar | [protected]
GetView() | CRulerBar | [inline, protected]
GetView() | CRulerBar | [inline, protected]
m_bDeferInProgress | CRulerBar |
m_bDraw3DExt | CRulerBar |
m_indent | CRulerBar |
m_leftmargin | CRulerBar |
m_logx | CRulerBar |
m_nLinePos | CRulerBar |
m_nScroll | CRulerBar |
m_nTabs | CRulerBar |
m_pSelItem | CRulerBar |
m_pTabItems | CRulerBar |
m_rectMargin | CRulerBar |
m_rightmargin | CRulerBar |
m_sizePaper | CRulerBar |
m_tabItem | CRulerBar |
m_unit | CRulerBar |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CRulerBar | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CRulerBar | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CRulerBar | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CRulerBar | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CRulerBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CRulerBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CRulerBar | [protected]
OnShowWindow(BOOL bShow, UINT nStatus) | CRulerBar | [protected]
OnShowWindow(BOOL bShow, UINT nStatus) | CRulerBar | [protected]
OnSizeParent(WPARAM wParam, LPARAM lParam) | CRulerBar | [protected]
OnSizeParent(WPARAM wParam, LPARAM lParam) | CRulerBar | [protected]
OnSysColorChange() | CRulerBar | [protected]
OnSysColorChange() | CRulerBar | [protected]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CRulerBar | [protected, virtual]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CRulerBar | [protected, virtual]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CRulerBar | [protected]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CRulerBar | [protected]
OnWindowPosChanging(WINDOWPOS FAR *lpwndpos) | CRulerBar | [protected]
OnWindowPosChanging(WINDOWPOS FAR *lpwndpos) | CRulerBar | [protected]
penBtnFace | CRulerBar |
penBtnHighLight | CRulerBar |
penBtnShadow | CRulerBar |
penBtnText | CRulerBar |
penFocusLine | CRulerBar |
penWindow | CRulerBar |
penWindowFrame | CRulerBar |
penWindowText | CRulerBar |
PrintWidth() | CRulerBar | [inline]
PrintWidth() | CRulerBar | [inline]
RulerToClient(CPoint &pt) | CRulerBar | [inline]
RulerToClient(CRect &rect) | CRulerBar | [inline]
RulerToClient(CPoint &pt) | CRulerBar | [inline]
RulerToClient(CRect &rect) | CRulerBar | [inline]
SetMarginBounds() | CRulerBar | [protected]
SetMarginBounds() | CRulerBar | [protected]
SortTabs() | CRulerBar | [protected]
SortTabs() | CRulerBar | [protected]
Update(const PARAFORMAT &pf) | CRulerBar | [protected]
Update(CSize sizePaper, const CRect &rectMargins) | CRulerBar | [protected]
Update(const WPD_PARAFORMAT &pf) | CRulerBar | [protected]
Update(CSize sizePaper, const CRect &rectMargins) | CRulerBar | [protected]
XClientToRuler(int nC) | CRulerBar | [inline]
XClientToRuler(int nC) | CRulerBar | [inline]
XClientToTwips(int nC) | CRulerBar | [inline]
XClientToTwips(int nC) | CRulerBar | [inline]
XRulerToClient(int nR) | CRulerBar | [inline]
XRulerToClient(int nR) | CRulerBar | [inline]
XRulerToTwips(int nR) | CRulerBar | [inline]
XRulerToTwips(int nR) | CRulerBar | [inline]
XTwipsToClient(int nT) | CRulerBar | [inline]
XTwipsToClient(int nT) | CRulerBar | [inline]
XTwipsToRuler(int nT) | CRulerBar | [inline]
XTwipsToRuler(int nT) | CRulerBar | [inline]
~CRulerBar() | CRulerBar |
~CRulerBar() | CRulerBar |
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/ChildFrm.cpp Source File

  • vc2008fp
  • TabbedView

ChildFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013
00014 #include "ChildFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CChildFrame
00024
00025 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
00026
00027 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CChildFrame construction/destruction
00032
00033 CChildFrame::CChildFrame()
00034 {
00035   // TODO: add member initialization code here
00036
00037 }
00038
00039 CChildFrame::~CChildFrame()
00040 {
00041 }
00042
00043 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00044 {
00045   // TODO: Modify the Window class or styles here by modifying
00046   //  the CREATESTRUCT cs
00047
00048   if( !CMDIChildWnd::PreCreateWindow(cs) )
00049     return FALSE;
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CChildFrame diagnostics
00058
00059 #ifdef _DEBUG
00060 void CChildFrame::AssertValid() const
00061 {
00062   CMDIChildWnd::AssertValid();
00063 }
00064
00065 void CChildFrame::Dump(CDumpContext& dc) const
00066 {
00067   CMDIChildWnd::Dump(dc);
00068 }
00069
00070 #endif //_DEBUG
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ruler.cpp Source File

  • ole
  • wordpad

ruler.cpp

Go to the documentation of this file.
00001 // ruler.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "ruler.h"
00015 #include "wordpvw.h"
00016 #include "wordpdoc.h"
00017 #include "strings.h"
00018 #include <memory.h>
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 #define HEIGHT 17
00026 #define RULERBARHEIGHT 17
00027
00028 CRulerItem::CRulerItem(UINT nBitmapID)
00029 {
00030   m_nAlignment = TA_CENTER;
00031   m_pDC = NULL;
00032   m_bTrack = FALSE;
00033   m_hbm = NULL;
00034   m_hbmMask = NULL;
00035   if (nBitmapID != 0)
00036   {
00037     m_hbmMask = ::LoadBitmap(
00038       AfxFindResourceHandle(MAKEINTRESOURCE(nBitmapID+1), RT_BITMAP),
00039       MAKEINTRESOURCE(nBitmapID+1));
00040     ASSERT(m_hbmMask != NULL);
00041     VERIFY(LoadMaskedBitmap(MAKEINTRESOURCE(nBitmapID)));
00042     BITMAP bm;
00043     ::GetObject(m_hbm, sizeof(BITMAP), &bm);
00044     m_size = CSize(bm.bmWidth, bm.bmHeight);
00045   }
00046 }
00047
00048 CRulerItem::~CRulerItem()
00049 {
00050   if (m_hbm != NULL)
00051     ::DeleteObject(m_hbm);
00052   if (m_hbmMask != NULL)
00053     ::DeleteObject(m_hbmMask);
00054 }
00055
00056 BOOL CRulerItem::LoadMaskedBitmap(LPCTSTR lpszResourceName)
00057 {
00058   ASSERT(lpszResourceName != NULL);
00059
00060   if (m_hbm != NULL)
00061     ::DeleteObject(m_hbm);
00062
00063   HINSTANCE hInst = AfxFindResourceHandle(lpszResourceName, RT_BITMAP);
00064   HRSRC hRsrc = ::FindResource(hInst, lpszResourceName, RT_BITMAP);
00065   if (hRsrc == NULL)
00066     return FALSE;
00067
00068   m_hbm = AfxLoadSysColorBitmap(hInst, hRsrc);
00069   return (m_hbm != NULL);
00070 }
00071
00072 void CRulerItem::SetHorzPosTwips(int nXPos)
00073 {
00074   if (GetHorzPosTwips() != nXPos)
00075   {
00076     if (m_bTrack)
00077       DrawFocusLine();
00078     Invalidate();
00079     m_nXPosTwips = nXPos;
00080     Invalidate();
00081     if (m_bTrack)
00082       DrawFocusLine();
00083   }
00084 }
00085
00086 void CRulerItem::TrackHorzPosTwips(int nXPos, BOOL /*bOnRuler*/)
00087 {
00088   int nMin = GetMin();
00089   int nMax = GetMax();
00090   if (nXPos < nMin)
00091     nXPos = nMin;
00092   if (nXPos > nMax)
00093     nXPos = nMax;
00094   SetHorzPosTwips(nXPos);
00095 }
00096
00097 void CRulerItem::DrawFocusLine()
00098 {
00099   if (GetHorzPosTwips() != 0)
00100   {
00101     m_rcTrack.left = m_rcTrack.right = GetHorzPosPix();
00102     ASSERT(m_pDC != NULL);
00103     int nLeft = m_pRuler->XRulerToClient(m_rcTrack.left);
00104     m_pDC->MoveTo(nLeft, m_rcTrack.top);
00105     m_pDC->LineTo(nLeft, m_rcTrack.bottom);
00106   }
00107 }
00108
00109 void CRulerItem::SetTrack(BOOL b)
00110 {
00111   m_bTrack = b;
00112
00113   if (m_pDC != NULL) // just in case we lost focus Capture somewhere
00114   {
00115     DrawFocusLine();
00116     m_pDC->RestoreDC(-1);
00117     delete m_pDC ;
00118     m_pDC = NULL;
00119   }
00120   if (m_bTrack)
00121   {
00122     CWordPadView* pView = (CWordPadView*)m_pRuler->GetView();
00123     ENSURE(pView != NULL);
00124     pView->GetClientRect(&m_rcTrack);
00125     m_pDC = new CWindowDC(pView);
00126     m_pDC->SaveDC();
00127     m_pDC->SelectObject(&m_pRuler->penFocusLine);
00128     m_pDC->SetROP2(R2_XORPEN);
00129     DrawFocusLine();
00130   }
00131 }
00132
00133 void CRulerItem::Invalidate()
00134 {
00135   CRect rc = GetHitRectPix();
00136   m_pRuler->RulerToClient(rc.TopLeft());
00137   m_pRuler->RulerToClient(rc.BottomRight());
00138   m_pRuler->InvalidateRect(rc);
00139 }
00140
00141 CRect CRulerItem::GetHitRectPix()
00142 {
00143   int nx = GetHorzPosPix();
00144   return CRect(
00145     CPoint(
00146       (m_nAlignment == TA_CENTER) ? (nx - m_size.cx/2) :
00147       (m_nAlignment == TA_LEFT) ? nx : nx - m_size.cx
00148       , m_nYPosPix
00149       ),
00150     m_size);
00151 }
00152
00153 void CRulerItem::Draw(CDC& dc)
00154 {
00155   CDC dcBitmap;
00156   dcBitmap.CreateCompatibleDC(&dc);
00157   CPoint pt(GetHorzPosPix(), GetVertPosPix());
00158
00159   HGDIOBJ hbm = ::SelectObject(dcBitmap.m_hDC, m_hbmMask);
00160
00161   // do mask part
00162   if (m_nAlignment == TA_CENTER)
00163     dc.BitBlt(pt.x - m_size.cx/2, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
00164   else if (m_nAlignment == TA_LEFT)
00165     dc.BitBlt(pt.x, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
00166   else // TA_RIGHT
00167     dc.BitBlt(pt.x - m_size.cx, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
00168
00169   // do image part
00170   ::SelectObject(dcBitmap.m_hDC, m_hbm);
00171
00172   if (m_nAlignment == TA_CENTER)
00173     dc.BitBlt(pt.x - m_size.cx/2, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
00174   else if (m_nAlignment == TA_LEFT)
00175     dc.BitBlt(pt.x, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
00176   else // TA_RIGHT
00177     dc.BitBlt(pt.x - m_size.cx, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
00178
00179   ::SelectObject(dcBitmap.m_hDC, hbm);
00180 }
00181
00182 CComboRulerItem::CComboRulerItem(UINT nBitmapID1, UINT nBitmapID2, CRulerItem& item)
00183   : CRulerItem(nBitmapID1), m_secondary(nBitmapID2) , m_link(item)
00184 {
00185   m_bHitPrimary = TRUE;
00186 }
00187
00188 BOOL CComboRulerItem::HitTestPix(CPoint pt)
00189 {
00190   m_bHitPrimary = FALSE;
00191   if (CRulerItem::GetHitRectPix().PtInRect(pt))
00192     m_bHitPrimary = TRUE;
00193   else
00194     return m_secondary.HitTestPix(pt);
00195   return TRUE;
00196 }
00197
00198 void CComboRulerItem::Draw(CDC& dc)
00199 {
00200   CRulerItem::Draw(dc);
00201   m_secondary.Draw(dc);
00202 }
00203
00204 void CComboRulerItem::SetHorzPosTwips(int nXPos)
00205 {
00206   if (m_bHitPrimary) // only change linked items by delta
00207     m_link.SetHorzPosTwips(m_link.GetHorzPosTwips() + nXPos - GetHorzPosTwips());
00208   CRulerItem::SetHorzPosTwips(nXPos);
00209   m_secondary.SetHorzPosTwips(nXPos);
00210 }
00211
00212 void CComboRulerItem::TrackHorzPosTwips(int nXPos, BOOL /*bOnRuler*/)
00213 {
00214   int nMin = GetMin();
00215   int nMax = GetMax();
00216   if (nXPos < nMin)
00217     nXPos = nMin;
00218   if (nXPos > nMax)
00219     nXPos = nMax;
00220   SetHorzPosTwips(nXPos);
00221 }
00222
00223 void CComboRulerItem::SetVertPos(int nYPos)
00224 {
00225   m_secondary.SetVertPos(nYPos);
00226   nYPos += m_secondary.GetHitRectPix().Height();
00227   CRulerItem::SetVertPos(nYPos);
00228 }
00229
00230 void CComboRulerItem::SetAlignment(int nAlign)
00231 {
00232   CRulerItem::SetAlignment(nAlign);
00233   m_secondary.SetAlignment(nAlign);
00234 }
00235
00236 void CComboRulerItem::SetRuler(CRulerBar* pRuler)
00237 {
00238   m_pRuler = pRuler;
00239   m_secondary.SetRuler(pRuler);
00240 }
00241
00242 void CComboRulerItem::SetBounds(int nMin, int nMax)
00243 {
00244   CRulerItem::SetBounds(nMin, nMax);
00245   m_secondary.SetBounds(nMin, nMax);
00246 }
00247
00248 int CComboRulerItem::GetMin()
00249 {
00250   if (m_bHitPrimary)
00251   {
00252     int nPDist = GetHorzPosTwips() - CRulerItem::GetMin();
00253     int nLDist = m_link.GetHorzPosTwips() - m_link.GetMin();
00254     return GetHorzPosTwips() - min(nPDist, nLDist);
00255   }
00256   else
00257     return CRulerItem::GetMin();
00258 }
00259
00260 int CComboRulerItem::GetMax()
00261 {
00262   if (m_bHitPrimary)
00263   {
00264     int nPDist = CRulerItem::GetMax() - GetHorzPosTwips();
00265     int nLDist = m_link.GetMax() - m_link.GetHorzPosTwips();
00266     int nMinDist = (nPDist < nLDist) ? nPDist : nLDist;
00267     return GetHorzPosTwips() + nMinDist;
00268   }
00269   else
00270     return CRulerItem::GetMax();
00271 }
00272
00273 void CTabRulerItem::TrackHorzPosTwips(int nXPos, BOOL bOnRuler)
00274 {
00275   if (bOnRuler)
00276     CRulerItem::TrackHorzPosTwips(nXPos, bOnRuler);
00277   else
00278     CRulerItem::TrackHorzPosTwips(0, bOnRuler);
00279 }
00280
00281
00282 BEGIN_MESSAGE_MAP(CRulerBar, CControlBar)
00283   //{{AFX_MSG_MAP(CRulerBar)
00284   ON_WM_LBUTTONDOWN()
00285   ON_WM_LBUTTONUP()
00286   ON_WM_MOUSEMOVE()
00287   ON_WM_SYSCOLORCHANGE()
00288   ON_WM_WINDOWPOSCHANGING()
00289   ON_WM_SHOWWINDOW()
00290   ON_WM_WINDOWPOSCHANGED()
00291   //}}AFX_MSG_MAP
00292   ON_MESSAGE(WM_SIZEPARENT, OnSizeParent)
00293   // Global help commands
00294 END_MESSAGE_MAP()
00295
00296 CRulerBar::CRulerBar(BOOL b3DExt) :
00297   m_leftmargin(IDB_RULER_BLOCK, IDB_RULER_UP, m_indent),
00298   m_indent(IDB_RULER_DOWN),
00299   m_rightmargin(IDB_RULER_UP),
00300   m_tabItem(IDB_RULER_TAB)
00301 {
00302   m_bDeferInProgress = FALSE;
00303   m_leftmargin.SetRuler(this);
00304   m_indent.SetRuler(this);
00305   m_rightmargin.SetRuler(this);
00306
00307   // all of the tab stops share handles
00308   for (int i=0;i<MAX_TAB_STOPS;i++)
00309   {
00310     m_pTabItems[i].m_hbm = m_tabItem.m_hbm;
00311     m_pTabItems[i].m_hbmMask = m_tabItem.m_hbmMask;
00312     m_pTabItems[i].m_size = m_tabItem.m_size;
00313   }
00314
00315   m_unit.m_nTPU = 0;
00316   m_nScroll = 0;
00317
00318   LOGFONT lf;
00319   memcpy_s(&lf, sizeof(LOGFONT), &theApp.m_lf, sizeof(LOGFONT));
00320   lf.lfHeight = -8;
00321   lf.lfWidth = 0;
00322   VERIFY(fnt.CreateFontIndirect(&lf));
00323
00324   m_nTabs = 0;
00325   m_leftmargin.SetVertPos(9);
00326   m_indent.SetVertPos(-1);
00327   m_rightmargin.SetVertPos(9);
00328
00329   m_cxLeftBorder = 0;
00330   if (!theApp.m_bWin4)
00331     m_bDraw3DExt = FALSE;
00332   else
00333     m_bDraw3DExt = b3DExt;
00334
00335   m_cyTopBorder = 4;
00336   m_cyBottomBorder = 6;
00337
00338   m_pSelItem = NULL;
00339
00340   m_logx = theApp.m_dcScreen.GetDeviceCaps(LOGPIXELSX);
00341
00342   CreateGDIObjects();
00343 }
00344
00345 CRulerBar::~CRulerBar()
00346 {
00347   // set handles to NULL to avoid deleting twice
00348   for (int i=0;i<MAX_TAB_STOPS;i++)
00349   {
00350     m_pTabItems[i].m_hbm = NULL;
00351     m_pTabItems[i].m_hbmMask = NULL;
00352   }
00353 }
00354
00355 void CRulerBar::CreateGDIObjects()
00356 {
00357   penFocusLine.DeleteObject();
00358   penBtnHighLight.DeleteObject();
00359   penBtnShadow.DeleteObject();
00360   penWindowFrame.DeleteObject();
00361   penBtnText.DeleteObject();
00362   penBtnFace.DeleteObject();
00363   penWindowText.DeleteObject();
00364   penWindow.DeleteObject();
00365   brushWindow.DeleteObject();
00366   brushBtnFace.DeleteObject();
00367
00368   penFocusLine.CreatePen(PS_DOT, 1,GetSysColor(COLOR_WINDOWTEXT));
00369   penBtnHighLight.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHIGHLIGHT));
00370   penBtnShadow.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
00371   penWindowFrame.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWFRAME));
00372   penBtnText.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNTEXT));
00373   penBtnFace.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNFACE));
00374   penWindowText.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWTEXT));
00375   penWindow.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOW));
00376   brushWindow.CreateSolidBrush(GetSysColor(COLOR_WINDOW));
00377   brushBtnFace.CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
00378 }
00379
00380 void CRulerBar::OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL /*bDisableIfNoHndler*/)
00381 {
00382   ASSERT_VALID(this);
00383   //Get the page size and see if changed -- from document
00384   //get margins and tabs and see if changed -- from view
00385   if (m_pSelItem == NULL) // only update if not in middle of dragging
00386   {
00387     CWordPadView* pView = (CWordPadView*)GetView();
00388     ENSURE(pView != NULL);
00389     Update(pView->GetPaperSize(), pView->GetMargins());
00390     Update(pView->GetParaFormatSelection());
00391     CRect rect;
00392     pView->GetRichEditCtrl().GetRect(&rect);
00393     CPoint pt = rect.TopLeft();
00394     pView->ClientToScreen(&pt);
00395     ScreenToClient(&pt);
00396     if (m_cxLeftBorder != pt.x)
00397     {
00398       m_cxLeftBorder = pt.x;
00399       Invalidate();
00400     }
00401     int nScroll = pView->GetScrollPos(SB_HORZ);
00402     if (nScroll != m_nScroll)
00403     {
00404       m_nScroll = nScroll;
00405       Invalidate();
00406     }
00407   }
00408 }
00409
00410 CSize CRulerBar::GetBaseUnits()
00411 {
00412   ASSERT(fnt.GetSafeHandle() != NULL);
00413   CFont* pFont = theApp.m_dcScreen.SelectObject(&fnt);
00414   TEXTMETRIC tm;
00415   VERIFY(theApp.m_dcScreen.GetTextMetrics(&tm) == TRUE);
00416   theApp.m_dcScreen.SelectObject(pFont);
00417 //  return CSize(tm.tmAveCharWidth, tm.tmHeight+tm.tmDescent);
00418   return CSize(tm.tmAveCharWidth, tm.tmHeight);
00419 }
00420
00421 BOOL CRulerBar::Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID)
00422 {
00423   ASSERT_VALID(pParentWnd);   // must have a parent
00424
00425   dwStyle |= WS_CLIPSIBLINGS;
00426   // force WS_CLIPSIBLINGS (avoids SetWindowPos bugs)
00427   m_dwStyle = (dwStyle & CBRS_ALL);
00428
00429   // create the HWND
00430   CRect rect;
00431   rect.SetRectEmpty();
00432   LPCTSTR lpszClass = AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW),
00433     (HBRUSH)(COLOR_BTNFACE+1), NULL);
00434
00435   if (!CWnd::Create(lpszClass, NULL, dwStyle, rect, pParentWnd, nID))
00436     return FALSE;
00437   // NOTE: Parent must resize itself for control bar to be resized
00438
00439   int i;
00440   int nMax = 100;
00441   for (i=0;i<MAX_TAB_STOPS;i++)
00442   {
00443     m_pTabItems[i].SetRuler(this);
00444     m_pTabItems[i].SetVertPos(8);
00445     m_pTabItems[i].SetHorzPosTwips(0);
00446     m_pTabItems[i].SetBounds(0, nMax);
00447   }
00448   return TRUE;
00449 }
00450
00451 CSize CRulerBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
00452 {
00453   ASSERT(bHorz);
00454   CSize m_size = CControlBar::CalcFixedLayout(bStretch, bHorz);
00455   CRect rectSize;
00456   rectSize.SetRectEmpty();
00457   CalcInsideRect(rectSize, bHorz);       // will be negative size
00458   m_size.cy = RULERBARHEIGHT - rectSize.Height();
00459   return m_size;
00460 }
00461
00462 void CRulerBar::Update(const PARAFORMAT& pf)
00463 {
00464   ASSERT(pf.cTabCount <= MAX_TAB_STOPS);
00465
00466   m_leftmargin.SetHorzPosTwips((int)(pf.dxStartIndent + pf.dxOffset));
00467   m_indent.SetHorzPosTwips((int)pf.dxStartIndent);
00468   m_rightmargin.SetHorzPosTwips(PrintWidth() - (int) pf.dxRightIndent);
00469
00470   int i = 0;
00471   for (i=0;i<pf.cTabCount;i++)
00472     m_pTabItems[i].SetHorzPosTwips((int)pf.rgxTabs[i]);
00473   for ( ;i<MAX_TAB_STOPS; i++)
00474     m_pTabItems[i].SetHorzPosTwips(0);
00475 }
00476
00477 void CRulerBar::Update(CSize sizePaper, const CRect& rectMargins)
00478 {
00479   if ((sizePaper != m_sizePaper) || (rectMargins != m_rectMargin))
00480   {
00481     m_sizePaper = sizePaper;
00482     m_rectMargin = rectMargins;
00483     Invalidate();
00484   }
00485   if (m_unit.m_nTPU != theApp.GetTPU())
00486   {
00487     m_unit = theApp.GetUnit();
00488     Invalidate();
00489   }
00490 }
00491
00492 void CRulerBar::FillInParaFormat(PARAFORMAT& pf)
00493 {
00494   pf.dwMask = PFM_STARTINDENT | PFM_RIGHTINDENT | PFM_OFFSET | PFM_TABSTOPS;
00495   pf.dxStartIndent = m_indent.GetHorzPosTwips();
00496   pf.dxOffset = m_leftmargin.GetHorzPosTwips() - pf.dxStartIndent;
00497   pf.dxRightIndent = PrintWidth() - m_rightmargin.GetHorzPosTwips();
00498   pf.cTabCount = 0L;
00499   SortTabs();
00500   int i, nPos = 0;
00501   for (i=0;i<MAX_TAB_STOPS;i++)
00502   {
00503     // get rid of zeroes and multiples
00504     // i.e. if we have 0,0,0,1,2,3,4,4,5
00505     // we will get tabs at 1,2,3,4,5
00506     if (nPos != m_pTabItems[i].GetHorzPosTwips())
00507     {
00508       nPos = m_pTabItems[i].GetHorzPosTwips();
00509       pf.rgxTabs[pf.cTabCount++] = nPos;
00510     }
00511   }
00512 }
00513
00514 // simple bubble sort is adequate for small number of tabs
00515 void CRulerBar::SortTabs()
00516 {
00517   int i,j, nPos;
00518   for (i=0;i<MAX_TAB_STOPS - 1;i++)
00519   {
00520     for (j=i+1; j < MAX_TAB_STOPS;j++)
00521     {
00522       if (m_pTabItems[j].GetHorzPosTwips() < m_pTabItems[i].GetHorzPosTwips())
00523       {
00524         nPos = m_pTabItems[j].GetHorzPosTwips();
00525         m_pTabItems[j].SetHorzPosTwips(m_pTabItems[i].GetHorzPosTwips());
00526         m_pTabItems[i].SetHorzPosTwips(nPos);
00527       }
00528     }
00529   }
00530 }
00531
00532 void CRulerBar::DoPaint(CDC* pDC)
00533 {
00534   CControlBar::DoPaint(pDC); // CControlBar::DoPaint -- draws border
00535   if (m_unit.m_nTPU != 0)
00536   {
00537     pDC->SaveDC();
00538     // offset coordinate system
00539     CPoint pointOffset(0,0);
00540     RulerToClient(pointOffset);
00541     pDC->SetViewportOrg(pointOffset);
00542
00543     DrawFace(*pDC);
00544     DrawTickMarks(*pDC);
00545
00546     DrawTabs(*pDC);
00547     m_leftmargin.Draw(*pDC);
00548     m_indent.Draw(*pDC);
00549     m_rightmargin.Draw(*pDC);
00550
00551     pDC->RestoreDC(-1);
00552   }
00553   // Do not call CControlBar::OnPaint() for painting messages
00554 }
00555
00556 void CRulerBar::DrawTabs(CDC& dc)
00557 {
00558   int i;
00559   int nPos = 0;
00560   for (i=0;i<MAX_TAB_STOPS;i++)
00561   {
00562     if (m_pTabItems[i].GetHorzPosTwips() > nPos)
00563       nPos = (m_pTabItems[i].GetHorzPosTwips());
00564     m_pTabItems[i].Draw(dc);
00565   }
00566   int nPageWidth = PrintWidth();
00567   nPos = nPos - nPos%720 + 720;
00568   dc.SelectObject(&penBtnShadow);
00569   for ( ; nPos < nPageWidth; nPos += 720)
00570   {
00571     int nx = XTwipsToRuler(nPos);
00572     dc.MoveTo(nx, HEIGHT - 1);
00573     dc.LineTo(nx, HEIGHT + 1);
00574   }
00575 }
00576
00577 void CRulerBar::DrawFace(CDC& dc)
00578 {
00579   int nPageWidth = XTwipsToRuler(PrintWidth());
00580   int nPageEdge = XTwipsToRuler(PrintWidth() + m_rectMargin.right);
00581
00582   dc.SaveDC();
00583
00584   dc.SelectObject(&penBtnShadow);
00585   dc.MoveTo(0,0);
00586   dc.LineTo(nPageEdge - 1, 0);
00587   dc.LineTo(nPageEdge - 1, HEIGHT - 2);
00588   dc.LineTo(nPageWidth - 1, HEIGHT - 2);
00589   dc.LineTo(nPageWidth - 1, 1);
00590   dc.LineTo(nPageWidth, 1);
00591   dc.LineTo(nPageWidth, HEIGHT -2);
00592
00593   dc.SelectObject(&penBtnHighLight);
00594   dc.MoveTo(nPageWidth, HEIGHT - 1);
00595   dc.LineTo(nPageEdge, HEIGHT -1);
00596   dc.MoveTo(nPageWidth + 1, HEIGHT - 3);
00597   dc.LineTo(nPageWidth + 1, 1);
00598   dc.LineTo(nPageEdge - 1, 1);
00599
00600   dc.SelectObject(&penWindow);
00601   dc.MoveTo(0, HEIGHT - 1);
00602   dc.LineTo(nPageWidth, HEIGHT -1);
00603
00604   dc.SelectObject(&penBtnFace);
00605   dc.MoveTo(1, HEIGHT - 2);
00606   dc.LineTo(nPageWidth - 1, HEIGHT - 2);
00607
00608   dc.SelectObject(&penWindowFrame);
00609   dc.MoveTo(0, HEIGHT - 2);
00610   dc.LineTo(0, 1);
00611   dc.LineTo(nPageWidth - 1, 1);
00612
00613   dc.FillRect(CRect(1, 2, nPageWidth - 1, HEIGHT-2), &brushWindow);
00614   dc.FillRect(CRect(nPageWidth + 2, 2, nPageEdge - 1, HEIGHT-2), &brushBtnFace);
00615
00616   CRect rcClient;
00617   GetClientRect(&rcClient);
00618   ClientToRuler(rcClient);
00619   rcClient.top = HEIGHT;
00620   rcClient.bottom = HEIGHT + 2;
00621   dc.FillRect(rcClient, &brushBtnFace);
00622
00623   CRect rectFill(rcClient.left, HEIGHT+4, rcClient.right, HEIGHT+9);
00624   dc.FillRect(rectFill, &brushWindow);
00625
00626   if (m_bDraw3DExt)  // draws the 3D extension into the view
00627   {
00628     dc.SelectObject(&penBtnShadow);
00629     dc.MoveTo(rcClient.left, HEIGHT+8);
00630     dc.LineTo(rcClient.left, HEIGHT+2);
00631     dc.LineTo(rcClient.right-1, HEIGHT+2);
00632
00633     dc.SelectObject(&penWindowFrame);
00634     dc.MoveTo(rcClient.left+1, HEIGHT+8);
00635     dc.LineTo(rcClient.left+1, HEIGHT+3);
00636     dc.LineTo(rcClient.right-2, HEIGHT+3);
00637
00638     dc.SelectObject(&penBtnHighLight);
00639     dc.MoveTo(rcClient.right-1, HEIGHT+2);
00640     dc.LineTo(rcClient.right-1, HEIGHT+8);
00641
00642     dc.SelectObject(&penBtnFace);
00643     dc.MoveTo(rcClient.right-2, HEIGHT+3);
00644     dc.LineTo(rcClient.right-2, HEIGHT+8);
00645   }
00646   else
00647   {
00648     dc.SelectObject(&penBtnShadow);
00649     dc.MoveTo(rcClient.left, HEIGHT+2);
00650     dc.LineTo(rcClient.right, HEIGHT+2);
00651
00652     dc.SelectObject(&penWindowFrame);
00653     dc.MoveTo(rcClient.left, HEIGHT+3);
00654     dc.LineTo(rcClient.right, HEIGHT+3);
00655   }
00656
00657   dc.RestoreDC(-1);
00658 }
00659
00660 void CRulerBar::DrawTickMarks(CDC& dc)
00661 {
00662   dc.SaveDC();
00663
00664   dc.SelectObject(&penWindowText);
00665   dc.SelectObject(&fnt);
00666   dc.SetTextColor(GetSysColor(COLOR_WINDOWTEXT));
00667   dc.SetBkMode(TRANSPARENT);
00668
00669   DrawDiv(dc, m_unit.m_nSmallDiv, m_unit.m_nLargeDiv, 2);
00670   DrawDiv(dc, m_unit.m_nMediumDiv, m_unit.m_nLargeDiv, 5);
00671   DrawNumbers(dc, m_unit.m_nLargeDiv, m_unit.m_nTPU);
00672
00673   dc.RestoreDC(-1);
00674 }
00675
00676 void CRulerBar::DrawNumbers(CDC& dc, int nInc, int nTPU)
00677 {
00678   int nPageWidth = PrintWidth();
00679   int nPageEdge = nPageWidth + m_rectMargin.right;
00680   TCHAR buf[10];
00681
00682   int nTwips, nPixel, nLen;
00683
00684   for (nTwips = nInc; nTwips < nPageEdge; nTwips += nInc)
00685   {
00686     if (nTwips == nPageWidth)
00687       continue;
00688     nPixel = XTwipsToRuler(nTwips);
00689     _stprintf_s(buf, 10, _T("%d"), nTwips/nTPU);
00690     nLen = lstrlen(buf);
00691     CSize sz = dc.GetTextExtent(buf, nLen);
00692     dc.ExtTextOut(nPixel - sz.cx/2, HEIGHT/2 - sz.cy/2, 0, NULL, buf, nLen, NULL);
00693   }
00694 }
00695
00696 void CRulerBar::DrawDiv(CDC& dc, int nInc, int nLargeDiv, int nLength)
00697 {
00698   int nPageWidth = PrintWidth();
00699   int nPageEdge = nPageWidth + m_rectMargin.right;
00700
00701   int nTwips, nPixel;
00702
00703   for (nTwips = nInc; nTwips < nPageEdge; nTwips += nInc)
00704   {
00705     if (nTwips == nPageWidth || nTwips%nLargeDiv == 0)
00706       continue;
00707     nPixel = XTwipsToRuler(nTwips);
00708     dc.MoveTo(nPixel, HEIGHT/2 - nLength/2);
00709     dc.LineTo(nPixel, HEIGHT/2 - nLength/2 + nLength);
00710   }
00711 }
00712
00713 void CRulerBar::OnLButtonDown(UINT nFlags, CPoint point)
00714 {
00715   CPoint pt = point;
00716   ClientToRuler(pt);
00717
00718   m_pSelItem = NULL;
00719   if (m_leftmargin.HitTestPix(pt))
00720     m_pSelItem = &m_leftmargin;
00721   else if (m_indent.HitTestPix(pt))
00722     m_pSelItem = &m_indent;
00723   else if (m_rightmargin.HitTestPix(pt))
00724     m_pSelItem = &m_rightmargin;
00725   else
00726     m_pSelItem = GetHitTabPix(pt);
00727   if (m_pSelItem == NULL)
00728     m_pSelItem = GetFreeTab();
00729   if (m_pSelItem == NULL)
00730     return;
00731   SetCapture();
00732
00733   m_pSelItem->SetTrack(TRUE);
00734   SetMarginBounds();
00735   OnMouseMove(nFlags, point);
00736 }
00737
00738 void CRulerBar::SetMarginBounds()
00739 {
00740   m_leftmargin.SetBounds(0, m_rightmargin.GetHorzPosTwips());
00741   m_indent.SetBounds(0, m_rightmargin.GetHorzPosTwips());
00742
00743   int nMin = (m_leftmargin.GetHorzPosTwips() > m_indent.GetHorzPosTwips()) ?
00744     m_leftmargin.GetHorzPosTwips() : m_indent.GetHorzPosTwips();
00745   int nMax = PrintWidth() + m_rectMargin.right;
00746   m_rightmargin.SetBounds(nMin, nMax);
00747
00748   // tabs can go from zero to the right page edge
00749   for (int i=0;i<MAX_TAB_STOPS;i++)
00750     m_pTabItems[i].SetBounds(0, nMax);
00751 }
00752
00753 CRulerItem* CRulerBar::GetFreeTab()
00754 {
00755   int i;
00756   for (i=0;i<MAX_TAB_STOPS;i++)
00757   {
00758     if (m_pTabItems[i].GetHorzPosTwips() == 0)
00759       return &m_pTabItems[i];
00760   }
00761   return NULL;
00762 }
00763
00764 CTabRulerItem* CRulerBar::GetHitTabPix(CPoint point)
00765 {
00766   int i;
00767   for (i=0;i<MAX_TAB_STOPS;i++)
00768   {
00769     if (m_pTabItems[i].HitTestPix(point))
00770       return &m_pTabItems[i];
00771   }
00772   return NULL;
00773 }
00774
00775 void CRulerBar::OnLButtonUp(UINT nFlags, CPoint point)
00776 {
00777   if (::GetCapture() != m_hWnd)
00778     return;
00779   OnMouseMove(nFlags, point);
00780   m_pSelItem->SetTrack(FALSE);
00781   ReleaseCapture();
00782   CWordPadView* pView = (CWordPadView*)GetView();
00783   ENSURE(pView != NULL);
00784   PARAFORMAT2& pf = pView->GetParaFormatSelection();
00785   FillInParaFormat(pf);
00786   pView->SetParaFormat(pf);
00787   m_pSelItem = NULL;
00788 }
00789
00790 void CRulerBar::OnMouseMove(UINT nFlags, CPoint point)
00791 {
00792   CControlBar::OnMouseMove(nFlags, point);
00793 // use ::GetCapture to avoid creating temporaries
00794   if (::GetCapture() != m_hWnd)
00795     return;
00796   ASSERT(m_pSelItem != NULL);
00797   CRect rc(0,0, XTwipsToRuler(PrintWidth() + m_rectMargin.right), HEIGHT);
00798   RulerToClient(rc);
00799   BOOL bOnRuler = rc.PtInRect(point);
00800
00801 // snap to minimum movement
00802   point.x = XClientToTwips(point.x);
00803   point.x += m_unit.m_nMinMove/2;
00804   point.x -= point.x%m_unit.m_nMinMove;
00805
00806   m_pSelItem->TrackHorzPosTwips(point.x, bOnRuler);
00807   UpdateWindow();
00808 }
00809
00810 void CRulerBar::OnSysColorChange()
00811 {
00812   CControlBar::OnSysColorChange();
00813   CreateGDIObjects();
00814   Invalidate();
00815 }
00816
00817 void CRulerBar::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
00818 {
00819   CControlBar::OnWindowPosChanging(lpwndpos);
00820   CRect rect;
00821   GetClientRect(rect);
00822   int minx = min(rect.Width(), lpwndpos->cx);
00823   int maxx = max(rect.Width(), lpwndpos->cx);
00824   rect.SetRect(minx-2, rect.bottom - 6, minx, rect.bottom);
00825   InvalidateRect(rect);
00826   rect.SetRect(maxx-2, rect.bottom - 6, maxx, rect.bottom);
00827   InvalidateRect(rect);
00828 }
00829
00830 void CRulerBar::OnShowWindow(BOOL bShow, UINT nStatus)
00831 {
00832   CControlBar::OnShowWindow(bShow, nStatus);
00833   m_bDeferInProgress = FALSE;
00834 }
00835
00836 void CRulerBar::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
00837 {
00838   CControlBar::OnWindowPosChanged(lpwndpos);
00839   m_bDeferInProgress = FALSE;
00840 }
00841
00842 LRESULT CRulerBar::OnSizeParent(WPARAM wParam, LPARAM lParam)
00843 {
00844   BOOL bVis = GetStyle() & WS_VISIBLE;
00845   if ((bVis && (m_nStateFlags & delayHide)) ||
00846     (!bVis && (m_nStateFlags & delayShow)))
00847   {
00848     m_bDeferInProgress = TRUE;
00849   }
00850   return CControlBar::OnSizeParent(wParam, lParam);
00851 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/targetver.h Source File

  • vc2008fp
  • TabControl

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagSTRKFMT Member List

This is the complete list of members for tagSTRKFMT, including all inherited members.
cbSize | tagSTRKFMT
dwReserved | tagSTRKFMT
dwUser | tagSTRKFMT
iesf | tagSTRKFMT
iStrk | tagSTRKFMT
tip | tagSTRKFMT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PushLib::_DPush Member List

This is the complete list of members for PushLib::_DPush, including all inherited members.
id | PushLib::_DPush
id | PushLib::_DPush
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMailFrame Member List

This is the complete list of members for CMailFrame, including all inherited members.
CMailFrame() | CMailFrame |
LoadFrame(UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL) | CMailFrame | [virtual]
m_lstMailFrames | CMailFrame | [protected, static]
m_pMainWnd | CMailFrame | [protected]
m_wndMailBar | CMailFrame | [protected]
m_wndMenuBar | CMailFrame | [protected]
m_wndStatusBar | CMailFrame | [protected]
m_wndToolBar | CMailFrame | [protected]
OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized) | CMailFrame | [protected]
OnChangeLook() | CMailFrame | [static]
OnClose() | CMailFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMailFrame | [protected]
OnEnable(BOOL bEnable) | CMailFrame | [protected]
OnMailClose() | CMailFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMailFrame | [protected]
OnViewCustomize() | CMailFrame | [protected]
~CMailFrame() | CMailFrame | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCTrace.H Source File

  • ole
  • TstCon

TCTrace.H

Go to the documentation of this file.
00001 // File: TCTrace.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 const int TRACELEVEL_NONE = 0;
00011 const int TRACELEVEL_NORMAL = 1;
00012 const int TRACELEVEL_VERBOSE = 2;
00013
00014 class CTestContainer98Item;
00015
00016 int GetTraceLevel();
00017 void SetTraceLevel( int nLevel );
00018 void __cdecl TCTrace( int nLevel, LPCTSTR pszFormat, ... );
00019 void __cdecl TCControlTrace( int nLevel, CTestContainer98Item* pItem,
00020    LPCTSTR pszFormat, ... );
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MainFrm.cpp Source File

  • vc2008fp
  • ToolTipDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TooltipDemo.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
00026
00027 const int  iMaxUserToolbars   = 10;
00028 const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
00029 const UINT uiLastUserToolBarId  = uiFirstUserToolBarId + iMaxUserToolbars - 1;
00030
00031 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
00032   ON_WM_CREATE()
00033   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00034   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00035   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnAppLook)
00036   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnUpdateAppLook)
00037 END_MESSAGE_MAP()
00038
00039 static UINT indicators[] =
00040 {
00041   ID_SEPARATOR,           // status line indicator
00042   ID_INDICATOR_CAPS,
00043   ID_INDICATOR_NUM,
00044   ID_INDICATOR_SCRL,
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CMainFrame construction/destruction
00049
00050 CMainFrame::CMainFrame()
00051 {
00052   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_2003);
00053
00054   // TODO: add member initialization code here
00055
00056 }
00057
00058 CMainFrame::~CMainFrame()
00059 {
00060 }
00061
00062 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00063 {
00064   if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
00065     return -1;
00066
00067   OnAppLook (m_nAppLook);
00068
00069   // Load toolbar user images:
00070   if (m_UserImages.Load (_T(".\\UserImages.bmp")))
00071   {
00072     CMFCToolBar::SetUserImages (&m_UserImages);
00073   }
00074
00075   CMFCToolBar::EnableQuickCustomization ();
00076
00077
00078   // TODO: Define your own basic commands. Be sure, that each pulldown
00079   // menu have at least one basic command.
00080
00081   CList<UINT, UINT> lstBasicCommands;
00082
00083   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00084   lstBasicCommands.AddTail (ID_FILE_NEW);
00085   lstBasicCommands.AddTail (ID_FILE_OPEN);
00086   lstBasicCommands.AddTail (ID_FILE_SAVE);
00087   lstBasicCommands.AddTail (ID_FILE_PRINT);
00088   lstBasicCommands.AddTail (ID_APP_EXIT);
00089   lstBasicCommands.AddTail (ID_EDIT_CUT);
00090   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00091   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00092   lstBasicCommands.AddTail (ID_APP_ABOUT);
00093   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00094   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00095   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2000);
00096   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_XP);
00097   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2003);
00098   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_VS2005);
00099   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_WIN_XP);
00100   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_1);
00101   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_2);
00102   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_3);
00103   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_4);
00104
00105   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00106
00107   if (!m_wndMenuBar.Create (this))
00108   {
00109     TRACE0("Failed to create menubar\n");
00110     return -1;      // fail to create
00111   }
00112
00113   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00114
00115   // Detect color depth. 256 color toolbars can be used in the
00116   // high or true color modes only (bits per pixel is > 8):
00117   CClientDC dc (this);
00118   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00119
00120   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00121
00122   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00123     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00124     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00125   {
00126     TRACE0("Failed to create toolbar\n");
00127     return -1;      // fail to create
00128   }
00129   if (!m_wndStatusBar.Create(this) ||
00130     !m_wndStatusBar.SetIndicators(indicators,
00131       sizeof(indicators)/sizeof(UINT)))
00132   {
00133     TRACE0("Failed to create status bar\n");
00134     return -1;      // fail to create
00135   }
00136
00137   m_wndToolBar.SetWindowText (_T("Standard"));
00138   // TODO: Delete these three lines if you don't want the toolbar to
00139   //  be dockable
00140   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00141   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00142   EnableDocking(CBRS_ALIGN_ANY);
00143   DockPane(&m_wndMenuBar);
00144   DockPane(&m_wndToolBar);
00145
00146
00147   // Allow user-defined toolbars operations:
00148   InitUserToolbars (NULL,
00149           uiFirstUserToolBarId,
00150           uiLastUserToolBarId);
00151
00152   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00153
00154   // Enable conttol bar context menu (list of bars + customize command):
00155   EnablePaneMenu (
00156     TRUE,       // Enable
00157     ID_VIEW_CUSTOMIZE,  // Customize command ID
00158     _T("Customize..."), // Customize command text
00159     ID_VIEW_TOOLBARS);  // Menu items with this ID will be replaced by
00160               // toolbars menu
00161
00162   return 0;
00163 }
00164
00165 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00166 {
00167   if( !CFrameWndEx::PreCreateWindow(cs) )
00168     return FALSE;
00169   // TODO: Modify the Window class or styles here by modifying
00170   //  the CREATESTRUCT cs
00171
00172   return TRUE;
00173 }
00174
00175 /////////////////////////////////////////////////////////////////////////////
00176 // CMainFrame diagnostics
00177
00178 #ifdef _DEBUG
00179 void CMainFrame::AssertValid() const
00180 {
00181   CFrameWndEx::AssertValid();
00182 }
00183
00184 void CMainFrame::Dump(CDumpContext& dc) const
00185 {
00186   CFrameWndEx::Dump(dc);
00187 }
00188
00189 #endif //_DEBUG
00190
00191 /////////////////////////////////////////////////////////////////////////////
00192 // CMainFrame message handlers
00193
00194
00195 void CMainFrame::OnViewCustomize()
00196 {
00197   //------------------------------------
00198   // Create a customize toolbars dialog:
00199   //------------------------------------
00200   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00201     TRUE /* Automatic menus scaning */
00202     );
00203
00204   pDlgCust->EnableUserDefinedToolbars ();
00205   pDlgCust->Create ();
00206 }
00207
00208 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00209 {
00210   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00211   //
00212   // UINT uiToolBarId = (UINT) wp;
00213   // if (uiToolBarId == IDR_MAINFRAME)
00214   // {
00215   //    do something with m_wndToolBar
00216   // }
00217
00218   return 0;
00219 }
00220
00221 void CMainFrame::OnAppLook(UINT id)
00222 {
00223   CDockingManager::SetDockingMode (DT_SMART);
00224
00225   m_nAppLook = id;
00226
00227   CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;
00228
00229   switch (m_nAppLook)
00230   {
00231   case ID_VIEW_APPLOOK_2000:
00232     // enable Office 2000 look:
00233     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00234     break;
00235
00236   case ID_VIEW_APPLOOK_XP:
00237     // enable Office XP look:
00238     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00239     break;
00240
00241   case ID_VIEW_APPLOOK_WIN_XP:
00242     // enable Windows XP look (in other OS Office XP look will be used):
00243     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00244     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00245     break;
00246
00247   case ID_VIEW_APPLOOK_2003:
00248     // enable Office 2003 look:
00249     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00250     CDockingManager::SetDockingMode (DT_SMART);
00251     break;
00252
00253   case ID_VIEW_APPLOOK_VS2005:
00254     // enable VS.NET 2005 look:
00255     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00256     CDockingManager::SetDockingMode (DT_SMART);
00257     break;
00258
00259   case ID_VIEW_APPLOOK_2007_1:
00260     // enable Office 2007 look:
00261     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00262     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00263     CDockingManager::SetDockingMode (DT_SMART);
00264     break;
00265
00266   case ID_VIEW_APPLOOK_2007_2:
00267     // enable Office 2007 look:
00268     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00269     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00270     CDockingManager::SetDockingMode (DT_SMART);
00271     break;
00272
00273   case ID_VIEW_APPLOOK_2007_3:
00274     // enable Office 2007 look:
00275     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00276     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00277     CDockingManager::SetDockingMode (DT_SMART);
00278     break;
00279
00280   case ID_VIEW_APPLOOK_2007_4:
00281     // enable Office 2007 look:
00282     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00283     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00284     CDockingManager::SetDockingMode (DT_SMART);
00285     break;
00286
00287   default:
00288     ASSERT (FALSE);
00289   }
00290
00291   CDockingManager* pDockManager = GetDockingManager ();
00292   if (pDockManager != NULL)
00293   {
00294     ASSERT_VALID (pDockManager);
00295     pDockManager->AdjustPaneFrames ();
00296   }
00297
00298   CTabbedPane::ResetTabs ();
00299
00300   RecalcLayout ();
00301   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00302
00303   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00304 }
00305
00306 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00307 {
00308   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00309 }
00310
00311 BOOL CMainFrame::OnMenuButtonToolHitTest (CMFCToolBarButton* pButton, TOOLINFO* pTI)
00312 {
00313   ASSERT_VALID (pButton);
00314   ASSERT (pTI != NULL);
00315
00316   if (!theApp.m_bTTInPopupMenus ||
00317     pButton->m_nID == 0 ||
00318     pButton->m_nID == (UINT)-1)
00319   {
00320     return FALSE;
00321   }
00322
00323   CString strText = pButton->m_strText;
00324   strText.Remove (_T('&'));
00325
00326   if (strText.IsEmpty ())
00327   {
00328     return FALSE;
00329   }
00330
00331   if (pTI)
00332   {
00333     pTI->lpszText = (LPTSTR) ::calloc ((strText.GetLength () + 1), sizeof (TCHAR));
00334     if (pTI->lpszText)
00335     {
00336       lstrcpy (pTI->lpszText, strText);
00337     }
00338   }
00339
00340   return TRUE;
00341 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/STDAFX.H Source File

  • general
  • dlgcbr32

STDAFX.H

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #include <afxwin.h>         // MFC core and standard components
00016 #include <afxext.h>         // MFC extensions (including VB)
00017
00018 #include <atlbase.h>
00019 #include <atlwin.h>
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinkButton.h Source File

  • vc2008fp
  • IEDemo

LinkButton.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CLinkButton : public CMFCToolBarButton
00014 {
00015   DECLARE_SERIAL(CLinkButton)
00016
00017 public:
00018   CLinkButton();
00019   CLinkButton(LPCTSTR lpszLabel, LPCTSTR lpszURL);
00020
00021   virtual ~CLinkButton();
00022
00023   LPCTSTR GetURL () const
00024   {
00025     return m_strURL;
00026   }
00027
00028 protected:
00029   void Initialize ();
00030   virtual void CopyFrom (const CMFCToolBarButton& src);
00031   virtual void Serialize (CArchive& ar);
00032
00033   CString m_strURL;
00034
00035   virtual BOOL IsEditable () const
00036   {
00037     return FALSE;
00038   }
00039 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertyBagDlg Member List

This is the complete list of members for CPropertyBagDlg, including all inherited members.
CPropertyBagDlg(CPropertyBag *pPropertyBag, CWnd *pParent=NULL) | CPropertyBagDlg |
DoDataExchange(CDataExchange *pDX) | CPropertyBagDlg | [protected, virtual]
IDD enum value | CPropertyBagDlg |
m_lvProperties | CPropertyBagDlg |
m_pPropertyBag | CPropertyBagDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CPropertyBagDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CPropertyBagDlg | [protected]
OnInitDialog() | CPropertyBagDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/image.odl Source File

  • controls
  • IMAGE

image.odl

Go to the documentation of this file.
00001 // image.odl : type library source for OLE Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (image.tlb) that will become a resource in
00005 // image.ocx.
00006
00007 #include <olectl.h>
00008 #include <idispids.h>
00009
00010 [ uuid(346685E0-C383-11CF-A5A4-00AA00A45705), version(1.0),
00011   helpstring("image OLE Control module"), control ]
00012 library IMAGELib
00013 {
00014   importlib(STDOLE_TLB);
00015   importlib(STDTYPE_TLB);
00016
00017   //  Primary dispatch interface for CImageCtrl
00018
00019   [ uuid(346685E1-C383-11CF-A5A4-00AA00A45705),
00020     helpstring("Dispatch interface for Image Control"), hidden ]
00021   dispinterface _DImage
00022   {
00023     properties:
00024       // NOTE - ClassWizard will maintain property information here.
00025       //    Use extreme caution when editing this section.
00026       //{{AFX_ODL_PROP(CImageCtrl)
00027       [id(DISPID_READYSTATE), readonly] long ReadyState;
00028       [id(1)] boolean AutoSize;
00029       [id(2)] BSTR ImagePath;
00030       //}}AFX_ODL_PROP
00031
00032     methods:
00033       // NOTE - ClassWizard will maintain method information here.
00034       //    Use extreme caution when editing this section.
00035       //{{AFX_ODL_METHOD(CImageCtrl)
00036       //}}AFX_ODL_METHOD
00037
00038       [id(DISPID_ABOUTBOX)] void AboutBox();
00039   };
00040
00041   //  Event dispatch interface for CImageCtrl
00042
00043   [ uuid(346685E2-C383-11CF-A5A4-00AA00A45705),
00044     helpstring("Event interface for Image Control") ]
00045   dispinterface _DImageEvents
00046   {
00047     properties:
00048       //  Event interface has no properties
00049
00050     methods:
00051       // NOTE - ClassWizard will maintain event information here.
00052       //    Use extreme caution when editing this section.
00053       //{{AFX_ODL_EVENT(CImageCtrl)
00054       [id(DISPID_READYSTATECHANGE)] void ReadyStateChange();
00055       //}}AFX_ODL_EVENT
00056   };
00057
00058   //  Class information for CImageCtrl
00059
00060   [ uuid(346685E3-C383-11CF-A5A4-00AA00A45705),
00061     helpstring("Image Control"), control ]
00062   coclass Image
00063   {
00064     [default] dispinterface _DImage;
00065     [default, source] dispinterface _DImageEvents;
00066   };
00067
00068
00069   //{{AFX_APPEND_ODL}}
00070 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBarButton.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMCaptionBarButton.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMCaptionBarButton.h : header file
00013 //
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CMSMCaptionBarButton window
00017
00018 class CMSMCaptionBarButton : public CMFCButton
00019 {
00020   DECLARE_DYNCREATE(CMSMCaptionBarButton);
00021
00022 public:
00023   CMSMCaptionBarButton ();
00024
00025   virtual ~CMSMCaptionBarButton ();
00026
00027   UINT GetSysCommand () const;
00028
00029   void SetSysCommand (UINT uiSysCommand);
00030
00031 protected:
00032   virtual void OnDraw (CDC* pDC, const CRect& rect, UINT uiState);
00033
00034 protected:
00035   DECLARE_MESSAGE_MAP()
00036 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMCategoryBarButton Member List

This is the complete list of members for CMSMCategoryBarButton, including all inherited members.
CMSMCategoryBarButton() | CMSMCategoryBarButton |
CMSMCategoryBarButton(LPCTSTR lpszLabel, UINT nID) | CMSMCategoryBarButton |
Initialize() | CMSMCategoryBarButton | [protected]
IsEditable() const | CMSMCategoryBarButton | [inline, protected, virtual]
OnCalculateSize(CDC *pDC, const CSize &sizeDefault, BOOL bHorz) | CMSMCategoryBarButton | [protected, virtual]
OnDraw(CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE) | CMSMCategoryBarButton | [virtual]
~CMSMCategoryBarButton() | CMSMCategoryBarButton | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/MainFrm.h Source File

  • advanced
  • DllScreenCap
  • ScreenCap

MainFrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #pragma once
00012
00013 #include "../DllScreenCap/ScreenCapApi.h"
00014 #include "ChildView.h"
00015
00016 class CMainFrame : public CFrameWnd
00017 {
00018
00019 public:
00020   CMainFrame();
00021 protected:
00022   DECLARE_DYNAMIC(CMainFrame)
00023
00024 // Attributes
00025 public:
00026
00027 // Operations
00028 public:
00029
00030 // Overrides
00031 public:
00032   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00033   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CMainFrame();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:  // control bar embedded members
00044   CStatusBar  m_wndStatusBar;
00045   CToolBar    m_wndToolBar;
00046   CChildView    m_wndView;
00047
00048 // Generated message map functions
00049 protected:
00050   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00051   afx_msg void OnSetFocus(CWnd *pOldWnd);
00052   DECLARE_MESSAGE_MAP()
00053
00054 public:
00055   void OnFileConfigureScreenCapture(void);
00056 private:
00057   CaptureData m_CapData;
00058 public:
00059   void OnFileScreencapture(void);
00060 };
00061
00062
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/OutputBar.h Source File

  • vc2008fp
  • RibbonGadgets

OutputBar.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class COutputToolBar : public CMFCToolBar
00015 {
00016 public:
00017   virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
00018   {
00019     CMFCToolBar::OnUpdateCmdUI ((CFrameWnd*) GetOwner (), bDisableIfNoHndler);
00020   }
00021
00022   virtual BOOL AllowShowOnList () const   { return FALSE; }
00023 };
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // COutputBar window
00027
00028 class COutputBar : public CDockablePane
00029 {
00030 // Construction
00031 public:
00032   COutputBar();
00033
00034 // Attributes
00035 protected:
00036   CMFCTabCtrl   m_wndTabs;
00037   COutputToolBar  m_wndToolBar;
00038   CFont     m_Font;
00039
00040 // Operations
00041 public:
00042   void ClearTabs ();
00043   void AddTab (LPCTSTR lpszName, UINT nID);
00044
00045 // Overrides
00046
00047 // Implementation
00048 public:
00049   virtual ~COutputBar();
00050
00051 protected:
00052   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00053   afx_msg void OnSize(UINT nType, int cx, int cy);
00054   afx_msg void OnDestroy();
00055   afx_msg void OnEditCopy();
00056   afx_msg void OnFileSaveAs();
00057   afx_msg void OnFilePrint();
00058
00059   DECLARE_MESSAGE_MAP()
00060 };
00061
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/MainFrm.cpp Source File

  • vc2008fp
  • TabControl

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabControl.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 class CToolbarLabel : public CMFCToolBarButton
00023 {
00024   DECLARE_SERIAL(CToolbarLabel)
00025
00026 public:
00027   CToolbarLabel (UINT nID = 0, LPCTSTR lpszText = NULL);
00028
00029   virtual void OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00030              BOOL bHorz = TRUE, BOOL bCustomizeMode = FALSE,
00031              BOOL bHighlight = FALSE,
00032              BOOL bDrawBorder = TRUE,
00033              BOOL bGrayDisabledButtons = TRUE);
00034 };
00035
00036 IMPLEMENT_SERIAL(CToolbarLabel, CMFCToolBarButton, 1)
00037
00038 //////////////////////////////////////////////////////////////////////
00039 // Construction/Destruction
00040 //////////////////////////////////////////////////////////////////////
00041
00042 CToolbarLabel::CToolbarLabel (UINT nID, LPCTSTR lpszText)
00043 {
00044   if (lpszText != NULL)
00045   {
00046     m_strText = lpszText;
00047   }
00048
00049   m_bText = TRUE;
00050   m_nID = nID;
00051   m_iImage = -1;
00052 }
00053
00054 void CToolbarLabel::OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00055                 BOOL bHorz, BOOL /*bCustomizeMode*/, BOOL /*bHighlight*/,
00056                 BOOL /*bDrawBorder*/, BOOL /*bGrayDisabledButtons*/)
00057 {
00058   UINT nStyle = m_nStyle;
00059   m_nStyle &= ~TBBS_DISABLED;
00060
00061   CMFCToolBarButton::OnDraw (pDC, rect, pImages, bHorz, FALSE,
00062                 FALSE, FALSE, FALSE);
00063
00064   m_nStyle = nStyle;
00065 }
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CMainFrame
00069
00070 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00071
00072
00073 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00074   ON_COMMAND(ID_VIEW_THEME_TOOLBAR, OnViewThemeToolbar)
00075   ON_UPDATE_COMMAND_UI(ID_VIEW_THEME_TOOLBAR, OnUpdateViewThemeToolbar)
00076   ON_WM_CREATE()
00077   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00078   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00079   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00080   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnAppLook)
00081   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnUpdateAppLook)
00082 END_MESSAGE_MAP()
00083
00084 static UINT indicators[] =
00085 {
00086   ID_SEPARATOR,           // status line indicator
00087   ID_INDICATOR_CAPS,
00088   ID_INDICATOR_NUM,
00089   ID_INDICATOR_SCRL,
00090 };
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // CMainFrame construction/destruction
00094
00095 CMainFrame::CMainFrame()
00096 {
00097   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_2003);
00098
00099   // TODO: add member initialization code here
00100
00101 }
00102
00103 CMainFrame::~CMainFrame()
00104 {
00105 }
00106
00107 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00108 {
00109   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00110     return -1;
00111
00112   OnAppLook (m_nAppLook);
00113
00114   CMFCToolBar::EnableQuickCustomization ();
00115
00116
00117   // TODO: Define your own basic commands. Be sure, that each pulldown
00118   // menu have at least one basic command.
00119
00120   CList<UINT, UINT> lstBasicCommands;
00121
00122   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00123   lstBasicCommands.AddTail (ID_FILE_NEW);
00124   lstBasicCommands.AddTail (ID_FILE_OPEN);
00125   lstBasicCommands.AddTail (ID_FILE_SAVE);
00126   lstBasicCommands.AddTail (ID_FILE_PRINT);
00127   lstBasicCommands.AddTail (ID_APP_EXIT);
00128   lstBasicCommands.AddTail (ID_EDIT_CUT);
00129   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00130   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00131   lstBasicCommands.AddTail (ID_APP_ABOUT);
00132   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00133   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00134   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2000);
00135   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_XP);
00136   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2003);
00137   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_VS2005);
00138   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_WIN_XP);
00139   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_1);
00140   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_2);
00141   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_3);
00142   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_4);
00143
00144   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00145
00146   if (!m_wndMenuBar.Create (this))
00147   {
00148     TRACE0("Failed to create menubar\n");
00149     return -1;      // fail to create
00150   }
00151
00152   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00153
00154   // Detect color depth. 256 color toolbars can be used in the
00155   // high or true color modes only (bits per pixel is > 8):
00156   CClientDC dc (this);
00157   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00158
00159   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00160
00161   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00162     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00163     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00164   {
00165     TRACE0("Failed to create toolbar\n");
00166     return -1;      // fail to create
00167   }
00168
00169   if (!m_wndToolBarTheme.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP
00170     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, ID_VIEW_THEME_TOOLBAR) ||
00171     !m_wndToolBarTheme.LoadToolBar (IDR_THEME, 0, 0, TRUE /* Locked */))
00172   {
00173     TRACE0("Failed to create toolbar\n");
00174     return -1;      // fail to create
00175   }
00176
00177   if (!m_wndStatusBar.Create(this) ||
00178     !m_wndStatusBar.SetIndicators(indicators,
00179       sizeof(indicators)/sizeof(UINT)))
00180   {
00181     TRACE0("Failed to create status bar\n");
00182     return -1;      // fail to create
00183   }
00184
00185   m_wndToolBar.SetWindowText (_T("Standard"));
00186   m_wndToolBarTheme.SetWindowText (_T("Visual Style"));
00187
00188   // TODO: Delete these three lines if you don't want the toolbar to
00189   //  be dockable
00190   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00191   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00192   m_wndToolBarTheme.EnableDocking(CBRS_ALIGN_ANY);
00193
00194   EnableDocking(CBRS_ALIGN_ANY);
00195   DockPane(&m_wndMenuBar);
00196   DockPane(&m_wndToolBar);
00197   DockPane(&m_wndToolBarTheme);
00198
00199   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00200   m_wndToolBarTheme.EnableCustomizeButton (TRUE, -1, _T(""), FALSE);
00201
00202   return 0;
00203 }
00204
00205 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00206 {
00207   if( !CFrameWnd::PreCreateWindow(cs) )
00208     return FALSE;
00209   // TODO: Modify the Window class or styles here by modifying
00210   //  the CREATESTRUCT cs
00211
00212   return TRUE;
00213 }
00214
00215 /////////////////////////////////////////////////////////////////////////////
00216 // CMainFrame diagnostics
00217
00218 #ifdef _DEBUG
00219 void CMainFrame::AssertValid() const
00220 {
00221   CFrameWnd::AssertValid();
00222 }
00223
00224 void CMainFrame::Dump(CDumpContext& dc) const
00225 {
00226   CFrameWnd::Dump(dc);
00227 }
00228
00229 #endif //_DEBUG
00230
00231 /////////////////////////////////////////////////////////////////////////////
00232 // CMainFrame message handlers
00233
00234
00235 void CMainFrame::OnViewCustomize()
00236 {
00237   //------------------------------------
00238   // Create a customize toolbars dialog:
00239   //------------------------------------
00240   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00241     TRUE /* Automatic menus scaning */
00242     );
00243
00244   pDlgCust->Create ();
00245 }
00246
00247 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00248 {
00249   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00250
00251   CMenu menu;
00252   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00253
00254   CMenu* pPopup = menu.GetSubMenu(0);
00255   ASSERT(pPopup != NULL);
00256
00257   if (pPopup)
00258   {
00259     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00260     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00261   }
00262
00263   return 0;
00264 }
00265
00266 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM wp,LPARAM)
00267 {
00268   UINT uiToolBarId = (UINT) wp;
00269
00270   if (uiToolBarId == IDR_THEME)
00271   {
00272     CMenu menu2007;
00273     menu2007.LoadMenu (IDR_POPUP_STYLE_20007);
00274
00275     UINT uiCmd2007 = ID_VIEW_APPLOOK_2007_1;
00276
00277     if (m_nAppLook >= ID_VIEW_APPLOOK_2007_1 &&
00278       m_nAppLook <= ID_VIEW_APPLOOK_2007_4)
00279     {
00280       uiCmd2007 = m_nAppLook;
00281     }
00282
00283     CMFCToolBarMenuButton menuButton (uiCmd2007, menu2007.Detach (), -1);
00284
00285     for (UINT uiCmd = ID_VIEW_APPLOOK_2007_1; uiCmd <= ID_VIEW_APPLOOK_2007_4; uiCmd++)
00286     {
00287       if (m_wndToolBarTheme.ReplaceButton (ID_VIEW_APPLOOK_2007_1, menuButton) > 0)
00288       {
00289         break;
00290       }
00291     }
00292
00293     for (int i = 0; i < m_wndToolBarTheme.GetCount (); i++)
00294     {
00295       m_wndToolBarTheme.SetToolBarBtnText (i, NULL, TRUE, FALSE);
00296     }
00297
00298     m_wndToolBarTheme.ReplaceButton (ID_LABEL,
00299       CToolbarLabel (ID_LABEL, _T("Visual style: ")));
00300   }
00301
00302   return 0;
00303 }
00304
00305 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00306 {
00307   //---------------------------------------------------------
00308   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00309   //---------------------------------------------------------
00310   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00311
00312   if (pMenuPopup != NULL &&
00313     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00314   {
00315     if (CMFCToolBar::IsCustomizeMode ())
00316     {
00317       //----------------------------------------------------
00318       // Don't show toolbars list in the cuztomization mode!
00319       //----------------------------------------------------
00320       return FALSE;
00321     }
00322
00323     pMenuPopup->RemoveAllItems ();
00324
00325     CMenu menu;
00326     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00327
00328     CMenu* pPopup = menu.GetSubMenu(0);
00329     ASSERT(pPopup != NULL);
00330
00331     if (pPopup)
00332     {
00333       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00334     }
00335   }
00336
00337   return TRUE;
00338 }
00339
00340 void CMainFrame::OnAppLook(UINT id)
00341 {
00342   CDockingManager::SetDockingMode (DT_SMART);
00343
00344   m_nAppLook = id;
00345
00346   switch (m_nAppLook)
00347   {
00348   case ID_VIEW_APPLOOK_2000:
00349     // enable Office 2000 look:
00350     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00351     break;
00352
00353   case ID_VIEW_APPLOOK_XP:
00354     // enable Office XP look:
00355     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00356     break;
00357
00358   case ID_VIEW_APPLOOK_WIN_XP:
00359     // enable Windows XP look (in other OS Office XP look will be used):
00360     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00361     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00362     break;
00363
00364   case ID_VIEW_APPLOOK_2003:
00365     // enable Office 2003 look:
00366     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00367     CDockingManager::SetDockingMode (DT_SMART);
00368     break;
00369
00370   case ID_VIEW_APPLOOK_VS2005:
00371     // enable VS.NET 2005 look:
00372     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00373     CMFCVisualManager::GetInstance ();
00374     CDockingManager::SetDockingMode (DT_SMART);
00375     break;
00376
00377   case ID_VIEW_APPLOOK_2007_1:
00378     // enable Office 2007 look:
00379     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00380     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00381     CDockingManager::SetDockingMode (DT_SMART);
00382     SetupOffice2007Button ();
00383     break;
00384
00385   case ID_VIEW_APPLOOK_2007_2:
00386     // enable Office 2007 look:
00387     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00388     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00389     CDockingManager::SetDockingMode (DT_SMART);
00390     SetupOffice2007Button ();
00391     break;
00392
00393   case ID_VIEW_APPLOOK_2007_3:
00394     // enable Office 2007 look:
00395     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00396     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00397     CDockingManager::SetDockingMode (DT_SMART);
00398     SetupOffice2007Button ();
00399     break;
00400
00401   case ID_VIEW_APPLOOK_2007_4:
00402     // enable Office 2007 look:
00403     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00404     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00405     CDockingManager::SetDockingMode (DT_SMART);
00406     SetupOffice2007Button ();
00407     break;
00408
00409   default:
00410     ASSERT (FALSE);
00411   }
00412
00413   CDockingManager* pDockManager = GetDockingManager ();
00414   if (pDockManager != NULL)
00415   {
00416     ASSERT_VALID (pDockManager);
00417     pDockManager->AdjustPaneFrames ();
00418   }
00419
00420   RecalcLayout ();
00421   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00422
00423   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00424 }
00425
00426 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00427 {
00428   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00429 }
00430
00431 void CMainFrame::OnViewThemeToolbar()
00432 {
00433   ShowPane (&m_wndToolBarTheme,
00434           !(m_wndToolBarTheme.IsVisible ()),
00435           FALSE, TRUE);
00436   RecalcLayout ();
00437 }
00438
00439 void CMainFrame::OnUpdateViewThemeToolbar(CCmdUI* pCmdUI)
00440 {
00441   pCmdUI->SetCheck (m_wndToolBarTheme.IsVisible ());
00442 }
00443
00444 void CMainFrame::SetupOffice2007Button ()
00445 {
00446   CMFCToolBarButton* pOffice2007 = NULL;
00447   int nIndex = -1;
00448
00449   for (UINT uiCmd = ID_VIEW_APPLOOK_2007_1; uiCmd <= ID_VIEW_APPLOOK_2007_4; uiCmd++)
00450   {
00451     nIndex = m_wndToolBarTheme.CommandToIndex (uiCmd);
00452
00453     CMFCToolBarButton* pButton = m_wndToolBarTheme.GetButton (nIndex);
00454     if (pButton != NULL)
00455     {
00456       pOffice2007 = pButton;
00457       break;
00458     }
00459   }
00460
00461   if (pOffice2007 == NULL)
00462   {
00463     return;
00464   }
00465
00466   ASSERT_VALID (pOffice2007);
00467
00468   pOffice2007->m_nID = m_nAppLook;
00469   m_wndToolBarTheme.SetToolBarBtnText (nIndex, NULL, TRUE, FALSE);
00470   m_wndToolBarTheme.AdjustSizeImmediate ();
00471 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImageCtl.cpp Source File

  • controls
  • IMAGE

ImageCtl.cpp

Go to the documentation of this file.
00001 // ImageCtl.cpp : Implementation of the CImageCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "image.h"
00014 #include "BmpProp.h"
00015 #include "ImageCtl.h"
00016 #include "ImagePpg.h"
00017
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025
00026 IMPLEMENT_DYNCREATE(CImageCtrl, COleControl)
00027
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // Message map
00031
00032 BEGIN_MESSAGE_MAP(CImageCtrl, COleControl)
00033   //{{AFX_MSG_MAP(CImageCtrl)
00034   // NOTE - ClassWizard will add and remove message map entries
00035   //    DO NOT EDIT what you see in these blocks of generated code !
00036   //}}AFX_MSG_MAP
00037   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00038 END_MESSAGE_MAP()
00039
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // Dispatch map
00043
00044 BEGIN_DISPATCH_MAP(CImageCtrl, COleControl)
00045   //{{AFX_DISPATCH_MAP(CImageCtrl)
00046   DISP_PROPERTY_NOTIFY(CImageCtrl, "AutoSize", m_bAutoSize, OnAutoSizeChanged, VT_BOOL)
00047   DISP_PROPERTY_EX(CImageCtrl, "ImagePath", GetImagePath, SetImagePath, VT_BSTR)
00048   DISP_STOCKPROP_READYSTATE()
00049   //}}AFX_DISPATCH_MAP
00050   DISP_FUNCTION_ID(CImageCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00051 END_DISPATCH_MAP()
00052
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // Event map
00056
00057 BEGIN_EVENT_MAP(CImageCtrl, COleControl)
00058   //{{AFX_EVENT_MAP(CImageCtrl)
00059   // NOTE - ClassWizard will add and remove event map entries
00060   //    DO NOT EDIT what you see in these blocks of generated code !
00061   EVENT_STOCK_READYSTATECHANGE()
00062   //}}AFX_EVENT_MAP
00063 END_EVENT_MAP()
00064
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // Property pages
00068
00069 BEGIN_PROPPAGEIDS(CImageCtrl, 1)
00070   PROPPAGEID(CImagePropPage::guid)
00071 END_PROPPAGEIDS(CImageCtrl)
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // Initialize class factory and guid
00075
00076 IMPLEMENT_OLECREATE_EX(CImageCtrl, "IMAGE.ImageCtrl.1",
00077   0x346685e3, 0xc383, 0x11cf, 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5)
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // Type library ID and version
00081
00082 IMPLEMENT_OLETYPELIB(CImageCtrl, _tlid, _wVerMajor, _wVerMinor)
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // Interface IDs
00086
00087 const IID BASED_CODE IID_DImage =
00088     { 0x346685e1, 0xc383, 0x11cf, { 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5 } };
00089 const IID BASED_CODE IID_DImageEvents =
00090     { 0x346685e2, 0xc383, 0x11cf, { 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5 } };
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // Control type information
00094
00095 static const DWORD BASED_CODE _dwImageOleMisc =
00096   OLEMISC_ACTIVATEWHENVISIBLE |
00097   OLEMISC_SETCLIENTSITEFIRST |
00098   OLEMISC_INSIDEOUT |
00099   OLEMISC_CANTLINKINSIDE |
00100   OLEMISC_RECOMPOSEONRESIZE;
00101
00102 IMPLEMENT_OLECTLTYPE(CImageCtrl, IDS_IMAGE, _dwImageOleMisc)
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CImageCtrl::CImageCtrlFactory::UpdateRegistry -
00106 // Adds or removes system registry entries for CImageCtrl
00107
00108 BOOL CImageCtrl::CImageCtrlFactory::UpdateRegistry(BOOL bRegister)
00109 {
00110   if (bRegister)
00111     return AfxOleRegisterControlClass(
00112       AfxGetInstanceHandle(),
00113       m_clsid,
00114       m_lpszProgID,
00115       IDS_IMAGE,
00116       IDB_IMAGE,
00117       afxRegInsertable | afxRegApartmentThreading,
00118       _dwImageOleMisc,
00119       _tlid,
00120       _wVerMajor,
00121       _wVerMinor);
00122   else
00123     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00124 }
00125
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CImageCtrl::CImageCtrl - Constructor
00129
00130 #pragma warning(disable : 4355)
00131
00132 CImageCtrl::CImageCtrl() : m_bitprop(this), m_bAutoSize(TRUE)
00133 {
00134   InitializeIIDs(&IID_DImage, &IID_DImageEvents);
00135
00136   m_lReadyState = READYSTATE_UNINITIALIZED;
00137 }
00138
00139 #pragma warning(default : 4355)
00140
00141 /////////////////////////////////////////////////////////////////////////////
00142 // CImageCtrl::~CImageCtrl - Destructor
00143
00144 CImageCtrl::~CImageCtrl()
00145 {
00146 }
00147
00148
00149 /////////////////////////////////////////////////////////////////////////////
00150 // CImageCtrl::OnDraw - Drawing function
00151
00152 void CImageCtrl::OnDraw(
00153       CDC* pDC, const CRect& rcBounds, const CRect& /*rcInvalid*/)
00154 {
00155   if (m_bitprop.m_Bitmap.m_hObject != NULL)
00156   {
00157     CWindowDC screenDC(NULL);
00158     CDC dc;
00159     dc.CreateCompatibleDC(&screenDC);
00160     CBitmap* pBitmap = dc.SelectObject(&m_bitprop.m_Bitmap);
00161
00162     int cx(min(rcBounds.Width(), m_bitprop.m_BitmapSize.cx));
00163     int cy(min(rcBounds.Height(), m_bitprop.m_BitmapSize.cy));
00164
00165     pDC->BitBlt(rcBounds.left, rcBounds.top, cx, cy, &dc, 0, 0, SRCCOPY);
00166     if (cx < rcBounds.Width())
00167       pDC->PatBlt(cx, rcBounds.top, rcBounds.Width() - cx, rcBounds.Height(), BLACKNESS);
00168     if (cy < rcBounds.Height())
00169       pDC->PatBlt(rcBounds.left, cy, rcBounds.Width(), rcBounds.Height() - cy, BLACKNESS);
00170
00171     if (!IsOptimizedDraw())
00172     {
00173       // The container does not support optimized drawing.
00174       // So, we'll have to clean up what we did to the DC
00175
00176       dc.SelectObject(pBitmap);
00177     }
00178   }
00179   else
00180   {
00181     pDC->PatBlt(rcBounds.left, rcBounds.top,
00182           rcBounds.Width(), rcBounds.Height(), BLACKNESS);
00183   }
00184
00185 }
00186
00187 /////////////////////////////////////////////////////////////////////////////
00188 // CImageCtrl::DoPropExchange - Persistence support
00189
00190 void CImageCtrl::DoPropExchange(CPropExchange* pPX)
00191 {
00192   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00193   COleControl::DoPropExchange(pPX);
00194
00195   if (pPX->IsLoading())
00196     InternalSetReadyState(READYSTATE_LOADING);
00197
00198   PX_DataPath(pPX, _T("ImagePath"), m_bitprop);
00199   PX_Bool(pPX, _T("AutoSize"), m_bAutoSize, TRUE);
00200 }
00201
00202
00203 /////////////////////////////////////////////////////////////////////////////
00204 // CImageCtrl::GetControlFlags -
00205 // Flags to customize MFC's implementation of ActiveX controls.
00206 //
00207 // For information on using these flags, please see MFC technical note
00208 // #nnn, "Optimizing an ActiveX Control".
00209 DWORD CImageCtrl::GetControlFlags()
00210 {
00211   DWORD dwFlags = COleControl::GetControlFlags();
00212
00213   // The control can activate without creating a window.
00214   dwFlags |= windowlessActivate;
00215
00216   // The control can optimize its OnDraw method, by not restoring
00217   // the original GDI objects in the device context.
00218   dwFlags |= canOptimizeDraw;
00219   return dwFlags;
00220 }
00221
00222 /////////////////////////////////////////////////////////////////////////////
00223 // CImageCtrl::OnResetState - Reset control to default state
00224
00225 void CImageCtrl::OnResetState()
00226 {
00227   m_bitprop.ResetData();
00228   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00229 }
00230
00231
00232 /////////////////////////////////////////////////////////////////////////////
00233 // CImageCtrl::AboutBox - Display an "About" box to the user
00234
00235 void CImageCtrl::AboutBox()
00236 {
00237   CDialog dlgAbout(IDD_ABOUTBOX_IMAGE);
00238   dlgAbout.DoModal();
00239 }
00240
00241 /////////////////////////////////////////////////////////////////////////////
00242 // CImageCtrl message handlers
00243
00244 void CImageCtrl::InformDlStatus(CBitmapProperty::DLState dlState)
00245 {
00246   InvalidateControl(NULL);
00247   if (dlState == CBitmapProperty::dlDone)
00248     InternalSetReadyState(READYSTATE_COMPLETE);
00249 }
00250
00251 void CImageCtrl::AutoSize()
00252 {
00253   ASSERT(m_bAutoSize);
00254
00255   SetControlSize(m_bitprop.m_BitmapSize.cx, m_bitprop.m_BitmapSize.cy);
00256 }
00257
00258 void CImageCtrl::OnAutoSizeChanged()
00259 {
00260   if (m_bAutoSize)
00261     AutoSize();
00262
00263   SetModifiedFlag();
00264 }
00265
00266 void CImageCtrl::InformSize()
00267 {
00268   if (m_bAutoSize)
00269     AutoSize();
00270   InternalSetReadyState(READYSTATE_INTERACTIVE);
00271 }
00272
00273 BSTR CImageCtrl::GetImagePath()
00274 {
00275   return m_bitprop.GetPath().AllocSysString();
00276 }
00277
00278 void CImageCtrl::SetImagePath(LPCTSTR lpszNewValue)
00279 {
00280   Load(lpszNewValue, m_bitprop);
00281   InvalidateControl(NULL);
00282   SetModifiedFlag();
00283 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStylePage Member List

This is the complete list of members for CStylePage, including all inherited members.
CStylePage() | CStylePage |
DoDataExchange(CDataExchange *pDX) | CStylePage | [protected, virtual]
IDD enum value | CStylePage |
m_nShapeStyle | CStylePage |
OnStyleClicked(UINT nCmdID) | CStylePage | [protected]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/targetver.h Source File

  • vc2008fp
  • SetPaneSize

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/stdafx.h Source File

  • controls
  • contain

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Classes Reference and related electronic
00009 // documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft C++ Libraries products.
00012
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014
00015 #include <afxwin.h>         // MFC core and standard components
00016 #include <afxext.h>         // MFC extensions
00017 #include <afxole.h>         // MFC OLE classes
00018 #include <afxodlgs.h>       // MFC OLE dialog classes
00019 #ifndef _AFX_NO_AFXCMN_SUPPORT
00020 #include <afxcmn.h>     // MFC support for Windows 95 Common Controls
00021 #endif // _AFX_NO_AFXCMN_SUPPORT
00022
00023
00024
00025
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/MainFrm.cpp Source File

  • vc2008fp
  • RebarTest

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RebarTest.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #endif
00019
00020
00021 // CMainFrame
00022
00023 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWndEx)
00024
00025 const int  iMaxUserToolbars   = 10;
00026 const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
00027 const UINT uiLastUserToolBarId  = uiFirstUserToolBarId + iMaxUserToolbars - 1;
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWndEx)
00030   ON_WM_CREATE()
00031   ON_WM_CLOSE()
00032   ON_COMMAND(ID_WINDOW_MANAGER, OnWindowManager)
00033   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00034   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00035   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_3, OnAppLook)
00036   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_3, OnUpdateAppLook)
00037 END_MESSAGE_MAP()
00038
00039 static UINT indicators[] =
00040 {
00041   ID_SEPARATOR,           // status line indicator
00042   ID_INDICATOR_CAPS,
00043   ID_INDICATOR_NUM,
00044   ID_INDICATOR_SCRL,
00045 };
00046
00047 // CMainFrame construction/destruction
00048
00049 CMainFrame::CMainFrame()
00050 {
00051
00052   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_WIN_XP);
00053   // TODO: add member initialization code here
00054 }
00055
00056 CMainFrame::~CMainFrame()
00057 {
00058 }
00059
00060 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00061 {
00062   if (CMDIFrameWndEx::OnCreate(lpCreateStruct) == -1)
00063     return -1;
00064   OnAppLook (m_nAppLook);
00065
00066   // VISUAL_MANAGER
00067
00068   if (CMFCToolBar::GetUserImages () == NULL)
00069   {
00070     // Load toolbar user images:
00071     if (!m_UserImages.Load (_T(".\\UserImages.bmp")))
00072     {
00073       TRACE(_T("Failed to load user images\n"));
00074     }
00075     else
00076     {
00077       CMFCToolBar::SetUserImages (&m_UserImages);
00078     }
00079   }
00080
00081   CMFCToolBar::EnableQuickCustomization ();
00082
00083
00084   // TODO: Define your own basic commands. Be sure, that each pulldown
00085   // menu have at least one basic command.
00086
00087   CList<UINT, UINT> lstBasicCommands;
00088
00089   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00090   lstBasicCommands.AddTail (ID_FILE_NEW);
00091   lstBasicCommands.AddTail (ID_FILE_OPEN);
00092   lstBasicCommands.AddTail (ID_FILE_SAVE);
00093   lstBasicCommands.AddTail (ID_FILE_PRINT);
00094   lstBasicCommands.AddTail (ID_APP_EXIT);
00095   lstBasicCommands.AddTail (ID_EDIT_CUT);
00096   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00097   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00098   lstBasicCommands.AddTail (ID_RECORD_NEXT);
00099   lstBasicCommands.AddTail (ID_RECORD_LAST);
00100   lstBasicCommands.AddTail (ID_APP_ABOUT);
00101   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00102   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00103   lstBasicCommands.AddTail (ID_WINDOW_TILE_HORZ);
00104   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2000);
00105   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_XP);
00106   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2003);
00107   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007);
00108   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_VS2005);
00109   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_WIN_XP);
00110   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_1);
00111   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_2);
00112   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_3);
00113
00114   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00115
00116   if (!m_wndMenuBar.Create (this))
00117   {
00118     TRACE0("Failed to create menubar\n");
00119     return -1;      // fail to create
00120   }
00121
00122   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00123
00124   // Remove menubar gripper and borders:
00125   m_wndMenuBar.SetPaneStyle (m_wndMenuBar.GetPaneStyle() &
00126     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00127
00128   // Detect color depth. 256 color toolbars can be used in the
00129   // high or true color modes only (bits per pixel is > 8):
00130   CClientDC dc (this);
00131   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00132
00133   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00134
00135   if (!m_wndToolBar.CreateEx(this) ||
00136     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00137   {
00138     TRACE0("Failed to create toolbar\n");
00139     return -1;      // fail to create
00140   }
00141
00142   // Each rebar pane will ocupy its own row:
00143   DWORD dwStyle = RBBS_GRIPPERALWAYS | RBBS_FIXEDBMP | RBBS_BREAK;
00144
00145   if (!m_wndReBar.Create(this) ||
00146     !m_wndReBar.AddBar (&m_wndMenuBar) ||
00147     !m_wndReBar.AddBar (&m_wndToolBar, NULL, NULL, dwStyle))
00148   {
00149     TRACE0("Failed to create rebar\n");
00150     return -1;      // fail to create
00151   }
00152
00153   m_wndMenuBar.AdjustLayout ();
00154   m_wndToolBar.AdjustLayout ();
00155
00156   // TODO: Remove this if you don't want chevrons:
00157   m_wndMenuBar.EnableCustomizeButton (TRUE, -1, _T(""));
00158   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00159
00160   EnableDocking(CBRS_ALIGN_ANY);
00161   m_wndReBar.EnableDocking (CBRS_TOP);
00162   DockPane (&m_wndReBar);
00163
00164   if (!m_wndStatusBar.Create(this) ||
00165     !m_wndStatusBar.SetIndicators(indicators,
00166       sizeof(indicators)/sizeof(UINT)))
00167   {
00168     TRACE0("Failed to create status bar\n");
00169     return -1;      // fail to create
00170   }
00171
00172   BOOL bValidString;
00173   CString strMainToolbarTitle;
00174   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00175   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00176
00177   // TODO: Remove this if you don't want tool tips
00178   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() |
00179     CBRS_TOOLTIPS | CBRS_FLYBY);
00180   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
00181     CBRS_TOOLTIPS | CBRS_FLYBY);
00182
00183   // Enable windows manager:
00184   EnableWindowsDialog (ID_WINDOW_MANAGER, IDS_WINDOWS_MANAGER, TRUE);
00185
00186   // Enable control bar context menu (list of bars + customize command):
00187   EnablePaneMenu (
00188     TRUE,       // Enable
00189     ID_VIEW_CUSTOMIZE,  // Customize command ID
00190     _T("Customize..."), // Customize command text
00191     ID_VIEW_TOOLBARS);  // Menu items with this ID will be replaced by
00192               // toolbars menu
00193
00194   return 0;
00195 }
00196
00197 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00198 {
00199   if( !CMDIFrameWndEx::PreCreateWindow(cs) )
00200     return FALSE;
00201   // TODO: Modify the Window class or styles here by modifying
00202   //  the CREATESTRUCT cs
00203
00204   return TRUE;
00205 }
00206
00207
00208 // CMainFrame diagnostics
00209
00210 #ifdef _DEBUG
00211 void CMainFrame::AssertValid() const
00212 {
00213   CMDIFrameWndEx::AssertValid();
00214 }
00215
00216 void CMainFrame::Dump(CDumpContext& dc) const
00217 {
00218   CMDIFrameWndEx::Dump(dc);
00219 }
00220
00221 #endif //_DEBUG
00222
00223
00224 // CMainFrame message handlers
00225
00226
00227
00228
00229 void CMainFrame::OnViewCustomize()
00230 {
00231   //------------------------------------
00232   // Create a customize toolbars dialog:
00233   //------------------------------------
00234   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00235     TRUE /* Automatic menus scaning */);
00236
00237   pDlgCust->EnableUserDefinedToolbars ();
00238   pDlgCust->Create ();
00239 }
00240
00241 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00242 {
00243   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00244   //
00245   // UINT uiToolBarId = (UINT) wp;
00246   // if (uiToolBarId == IDR_MAINFRAME)
00247   // {
00248   //    do something with m_wndToolBar
00249   // }
00250
00251   return 0;
00252 }
00253
00254 void CMainFrame::OnWindowManager()
00255 {
00256   ShowWindowsDialog ();
00257 }
00258
00259 void CMainFrame::OnAppLook(UINT id)
00260 {
00261   CDockingManager::SetDockingMode (DT_SMART);
00262
00263   m_nAppLook = id;
00264
00265   CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;
00266
00267   switch (m_nAppLook)
00268   {
00269   case ID_VIEW_APPLOOK_2000:
00270     // enable Office 2000 look:
00271     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00272     break;
00273
00274   case ID_VIEW_APPLOOK_XP:
00275     // enable Office XP look:
00276     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00277     break;
00278
00279   case ID_VIEW_APPLOOK_WIN_XP:
00280     // enable Windows XP look (in other OS Office XP look will be used):
00281     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00282     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00283     break;
00284
00285   case ID_VIEW_APPLOOK_2003:
00286     // enable Office 2003 look:
00287     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00288     CDockingManager::SetDockingMode (DT_SMART);
00289     break;
00290
00291   case ID_VIEW_APPLOOK_2007:
00292   case ID_VIEW_APPLOOK_2007_1:
00293   case ID_VIEW_APPLOOK_2007_2:
00294   case ID_VIEW_APPLOOK_2007_3:
00295     // enable Office 2007 look:
00296     switch (m_nAppLook)
00297     {
00298     case ID_VIEW_APPLOOK_2007:
00299       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00300       break;
00301
00302     case ID_VIEW_APPLOOK_2007_1:
00303       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00304       break;
00305
00306     case ID_VIEW_APPLOOK_2007_2:
00307       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00308       break;
00309
00310     case ID_VIEW_APPLOOK_2007_3:
00311       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00312       break;
00313     }
00314
00315     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00316     CDockingManager::SetDockingMode (DT_SMART);
00317     break;
00318
00319   case ID_VIEW_APPLOOK_VS2005:
00320     // enable VS 2005 look:
00321     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00322     CDockingManager::SetDockingMode (DT_SMART);
00323     break;
00324   }
00325
00326   CDockingManager* pDockManager = GetDockingManager ();
00327   if (pDockManager != NULL)
00328   {
00329     ASSERT_VALID (pDockManager);
00330     pDockManager->AdjustPaneFrames ();
00331   }
00332
00333   CTabbedPane::ResetTabs ();
00334
00335   RecalcLayout ();
00336   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00337
00338   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00339 }
00340
00341 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00342 {
00343   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00344 }
00345
00346 CMDIChildWndEx* CMainFrame::CreateDocumentWindow (LPCTSTR lpcszDocName, CObject* /*pObj*/)
00347 {
00348   if (lpcszDocName != NULL && lpcszDocName [0] != '\0')
00349   {
00350     CDocument* pDoc = AfxGetApp()->OpenDocumentFile (lpcszDocName);
00351
00352     if (pDoc != NULL)
00353     {
00354       POSITION pos = pDoc->GetFirstViewPosition();
00355
00356       if (pos != NULL)
00357       {
00358         CView* pView = pDoc->GetNextView (pos);
00359         if (pView == NULL)
00360         {
00361           return NULL;
00362         }
00363
00364         return DYNAMIC_DOWNCAST (CMDIChildWndEx, pView->GetParent ());
00365       }
00366     }
00367   }
00368
00369   return NULL;
00370 }
00371
00372 void CMainFrame::OnClose()
00373 {
00374   SaveMDIState (theApp.GetRegSectionPath ());
00375   CMDIFrameWndEx::OnClose();
00376 }
00377
00378  // RIBBON_APP
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/resource.h Source File

  • vc2008fp
  • StateCollection

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by StateCollection.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_STATECTYPE                  129
00009 #define IDR_CONTEXT_MENU                130
00010 #define IDR_POPUP_TOOLBAR               131
00011 #define IDB_WORKSPACE                   147
00012 #define IDC_COMPANY_URL                 1041
00013 #define IDD_ABOUTBOX                    999
00014 #define ID_VIEW_CUSTOMIZE               32770
00015 #define ID_VIEW_TOOLBARS                32771
00016 #define ID_VIEW_WORKSPACE               32803
00017 #define ID_VIEW_OUTPUT                  32804
00018 #define ID_TOOLS_ENTRY                  32805
00019 #define ID_USER_TOOL1                   32806
00020 #define ID_USER_TOOL2                   32807
00021 #define ID_USER_TOOL3                   32808
00022 #define ID_USER_TOOL4                   32809
00023 #define ID_USER_TOOL5                   32810
00024 #define ID_USER_TOOL6                   32811
00025 #define ID_USER_TOOL7                   32812
00026 #define ID_USER_TOOL8                   32813
00027 #define ID_USER_TOOL9                   32814
00028 #define ID_USER_TOOL10                  32815
00029 #define ID_SAVE_DEBUG_CONF              32822
00030 #define ID_SAVE_REGULAR_CONF            32823
00031 #define ID_LOAD_DEBUG_CONF              32824
00032 #define ID_LOAD_REGULAR_CONF            32825
00033
00034 // Next default values for new objects
00035 //
00036 #ifdef APSTUDIO_INVOKED
00037 #ifndef APSTUDIO_READONLY_SYMBOLS
00038 #define _APS_3D_CONTROLS                     1
00039 #define _APS_NEXT_RESOURCE_VALUE        153
00040 #define _APS_NEXT_COMMAND_VALUE         32826
00041 #define _APS_NEXT_CONTROL_VALUE         1042
00042 #define _APS_NEXT_SYMED_VALUE           107
00043 #endif
00044 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawobj.cpp Source File

  • ole
  • drawcli

drawobj.cpp

Go to the documentation of this file.
00001 // drawobj.cpp - implementation for drawing objects
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "drawcli.h"
00015
00016 #include "drawdoc.h"
00017 #include "drawvw.h"
00018 #include "drawobj.h"
00019
00020 #include "cntritem.h"
00021 #include "rectdlg.h"
00022
00023 IMPLEMENT_SERIAL(CDrawObj, CObject, 0)
00024
00025 CDrawObj::CDrawObj()
00026 {
00027 }
00028
00029 CDrawObj::~CDrawObj()
00030 {
00031 }
00032
00033 CDrawObj::CDrawObj(const CRect& position)
00034 {
00035   m_position = position;
00036   m_pDocument = NULL;
00037
00038   m_bPen = TRUE;
00039   m_logpen.lopnStyle = PS_INSIDEFRAME;
00040   m_logpen.lopnWidth.x = 1;
00041   m_logpen.lopnWidth.y = 1;
00042   m_logpen.lopnColor = RGB(0, 0, 0);
00043
00044   m_bBrush = TRUE;
00045   m_logbrush.lbStyle = BS_SOLID;
00046   m_logbrush.lbColor = RGB(192, 192, 192);
00047   m_logbrush.lbHatch = HS_HORIZONTAL;
00048 }
00049
00050 void CDrawObj::Serialize(CArchive& ar)
00051 {
00052   CObject::Serialize(ar);
00053   if (ar.IsStoring())
00054   {
00055     ar << m_position;
00056     ar << (WORD)m_bPen;
00057     ar.Write(&m_logpen, sizeof(LOGPEN));
00058     ar << (WORD)m_bBrush;
00059     ar.Write(&m_logbrush, sizeof(LOGBRUSH));
00060   }
00061   else
00062   {
00063     // get the document back pointer from the archive
00064     m_pDocument = (CDrawDoc*)ar.m_pDocument;
00065     ASSERT_VALID(m_pDocument);
00066     ASSERT_KINDOF(CDrawDoc, m_pDocument);
00067
00068     WORD wTemp;
00069     ar >> m_position;
00070     ar >> wTemp; m_bPen = (BOOL)wTemp;
00071     ar.Read(&m_logpen,sizeof(LOGPEN));
00072     ar >> wTemp; m_bBrush = (BOOL)wTemp;
00073     ar.Read(&m_logbrush, sizeof(LOGBRUSH));
00074   }
00075 }
00076
00077 void CDrawObj::Remove()
00078 {
00079   delete this;
00080 }
00081
00082 void CDrawObj::Draw(CDC*)
00083 {
00084 }
00085
00086 void CDrawObj::DrawTracker(CDC* pDC, TrackerState state)
00087 {
00088   ASSERT_VALID(this);
00089
00090   switch (state)
00091   {
00092   case normal:
00093     break;
00094
00095   case selected:
00096   case active:
00097     {
00098       int nHandleCount = GetHandleCount();
00099       for (int nHandle = 1; nHandle <= nHandleCount; nHandle += 1)
00100       {
00101         CPoint handle = GetHandle(nHandle);
00102         pDC->PatBlt(handle.x - 3, handle.y - 3, 7, 7, DSTINVERT);
00103       }
00104     }
00105     break;
00106   }
00107 }
00108
00109 // position is in logical
00110 void CDrawObj::MoveTo(const CRect& position, CDrawView* pView)
00111 {
00112   ASSERT_VALID(this);
00113
00114   if (position == m_position)
00115     return;
00116
00117   if (pView == NULL)
00118   {
00119     Invalidate();
00120     m_position = position;
00121     Invalidate();
00122   }
00123   else
00124   {
00125     pView->InvalObj(this);
00126     m_position = position;
00127     pView->InvalObj(this);
00128   }
00129   m_pDocument->SetModifiedFlag();
00130 }
00131
00132 // Note: if bSelected, hit-codes start at one for the top-left
00133 // and increment clockwise, 0 means no hit.
00134 // If !bSelected, 0 = no hit, 1 = hit (anywhere)
00135
00136 // point is in logical coordinates
00137 int CDrawObj::HitTest(CPoint point, CDrawView* pView, BOOL bSelected)
00138 {
00139   ASSERT_VALID(this);
00140   ASSERT(pView != NULL);
00141
00142   if (bSelected)
00143   {
00144     int nHandleCount = GetHandleCount();
00145     for (int nHandle = 1; nHandle <= nHandleCount; nHandle += 1)
00146     {
00147       // GetHandleRect returns in logical coords
00148       CRect rc = GetHandleRect(nHandle,pView);
00149       if (point.x >= rc.left && point.x < rc.right &&
00150         point.y <= rc.top && point.y > rc.bottom)
00151         return nHandle;
00152     }
00153   }
00154   else
00155   {
00156     if (point.x >= m_position.left && point.x < m_position.right &&
00157       point.y <= m_position.top && point.y > m_position.bottom)
00158       return 1;
00159   }
00160   return 0;
00161 }
00162
00163 // rect must be in logical coordinates
00164 BOOL CDrawObj::Intersects(const CRect& rect)
00165 {
00166   ASSERT_VALID(this);
00167
00168   CRect fixed = m_position;
00169   fixed.NormalizeRect();
00170   CRect rectT = rect;
00171   rectT.NormalizeRect();
00172   return !(rectT & fixed).IsRectEmpty();
00173 }
00174
00175 int CDrawObj::GetHandleCount()
00176 {
00177   ASSERT_VALID(this);
00178   return 8;
00179 }
00180
00181 // returns logical coords of center of handle
00182 CPoint CDrawObj::GetHandle(int nHandle)
00183 {
00184   ASSERT_VALID(this);
00185   int x, y, xCenter, yCenter;
00186
00187   // this gets the center regardless of left/right and top/bottom ordering
00188   xCenter = m_position.left + m_position.Width() / 2;
00189   yCenter = m_position.top + m_position.Height() / 2;
00190
00191   switch (nHandle)
00192   {
00193   default:
00194     ASSERT(FALSE);
00195
00196   case 1:
00197     x = m_position.left;
00198     y = m_position.top;
00199     break;
00200
00201   case 2:
00202     x = xCenter;
00203     y = m_position.top;
00204     break;
00205
00206   case 3:
00207     x = m_position.right;
00208     y = m_position.top;
00209     break;
00210
00211   case 4:
00212     x = m_position.right;
00213     y = yCenter;
00214     break;
00215
00216   case 5:
00217     x = m_position.right;
00218     y = m_position.bottom;
00219     break;
00220
00221   case 6:
00222     x = xCenter;
00223     y = m_position.bottom;
00224     break;
00225
00226   case 7:
00227     x = m_position.left;
00228     y = m_position.bottom;
00229     break;
00230
00231   case 8:
00232     x = m_position.left;
00233     y = yCenter;
00234     break;
00235   }
00236
00237   return CPoint(x, y);
00238 }
00239
00240 // return rectange of handle in logical coords
00241 CRect CDrawObj::GetHandleRect(int nHandleID, CDrawView* pView)
00242 {
00243   ASSERT_VALID(this);
00244   ENSURE(pView != NULL);
00245
00246   CRect rect;
00247   // get the center of the handle in logical coords
00248   CPoint point = GetHandle(nHandleID);
00249   // convert to client/device coords
00250   pView->DocToClient(point);
00251   // return CRect of handle in device coords
00252   rect.SetRect(point.x-3, point.y-3, point.x+3, point.y+3);
00253   pView->ClientToDoc(rect);
00254
00255   return rect;
00256 }
00257
00258 HCURSOR CDrawObj::GetHandleCursor(int nHandle)
00259 {
00260   ASSERT_VALID(this);
00261
00262   LPCTSTR id;
00263   switch (nHandle)
00264   {
00265   default:
00266     ASSERT(FALSE);
00267
00268   case 1:
00269   case 5:
00270     id = IDC_SIZENWSE;
00271     break;
00272
00273   case 2:
00274   case 6:
00275     id = IDC_SIZENS;
00276     break;
00277
00278   case 3:
00279   case 7:
00280     id = IDC_SIZENESW;
00281     break;
00282
00283   case 4:
00284   case 8:
00285     id = IDC_SIZEWE;
00286     break;
00287   }
00288
00289   return AfxGetApp()->LoadStandardCursor(id);
00290 }
00291
00292 // point must be in logical
00293 void CDrawObj::MoveHandleTo(int nHandle, CPoint point, CDrawView* pView)
00294 {
00295   ASSERT_VALID(this);
00296
00297   CRect position = m_position;
00298   switch (nHandle)
00299   {
00300   default:
00301     ASSERT(FALSE);
00302
00303   case 1:
00304     position.left = point.x;
00305     position.top = point.y;
00306     break;
00307
00308   case 2:
00309     position.top = point.y;
00310     break;
00311
00312   case 3:
00313     position.right = point.x;
00314     position.top = point.y;
00315     break;
00316
00317   case 4:
00318     position.right = point.x;
00319     break;
00320
00321   case 5:
00322     position.right = point.x;
00323     position.bottom = point.y;
00324     break;
00325
00326   case 6:
00327     position.bottom = point.y;
00328     break;
00329
00330   case 7:
00331     position.left = point.x;
00332     position.bottom = point.y;
00333     break;
00334
00335   case 8:
00336     position.left = point.x;
00337     break;
00338   }
00339
00340   MoveTo(position, pView);
00341 }
00342
00343 void CDrawObj::Invalidate()
00344 {
00345   ASSERT_VALID(this);
00346   m_pDocument->UpdateAllViews(NULL, HINT_UPDATE_DRAWOBJ, this);
00347 }
00348
00349 CDrawObj* CDrawObj::Clone(CDrawDoc* pDoc)
00350 {
00351   ASSERT_VALID(this);
00352
00353   CDrawObj* pClone = new CDrawObj(m_position);
00354   pClone->m_bPen = m_bPen;
00355   pClone->m_logpen = m_logpen;
00356   pClone->m_bBrush = m_bBrush;
00357   pClone->m_logbrush = m_logbrush;
00358   ASSERT_VALID(pClone);
00359
00360   if (pDoc != NULL)
00361     pDoc->Add(pClone);
00362
00363   return pClone;
00364 }
00365
00366 void CDrawObj::OnEditProperties()
00367 {
00368   ASSERT_VALID(this);
00369
00370   CPropertySheet sheet( _T("Shape Properties") );
00371   CRectDlg dlg;
00372   dlg.m_bNoFill = !m_bBrush;
00373   dlg.m_penSize = m_bPen ? m_logpen.lopnWidth.x : 0;
00374   sheet.AddPage( &dlg );
00375
00376   if (sheet.DoModal() != IDOK)
00377     return;
00378
00379   m_bBrush = !dlg.m_bNoFill;
00380   m_bPen = dlg.m_penSize > 0;
00381   if (m_bPen)
00382   {
00383     m_logpen.lopnWidth.x = dlg.m_penSize;
00384     m_logpen.lopnWidth.y = dlg.m_penSize;
00385   }
00386
00387   Invalidate();
00388   m_pDocument->SetModifiedFlag();
00389 }
00390
00391 void CDrawObj::OnOpen(CDrawView* /*pView*/ )
00392 {
00393   OnEditProperties();
00394 }
00395
00396 void CDrawObj::SetLineColor(COLORREF color)
00397 {
00398   ASSERT_VALID(this);
00399
00400   m_logpen.lopnColor = color;
00401   Invalidate();
00402   m_pDocument->SetModifiedFlag();
00403 }
00404
00405 void CDrawObj::SetFillColor(COLORREF color)
00406 {
00407   ASSERT_VALID(this);
00408
00409   m_logbrush.lbColor = color;
00410   Invalidate();
00411   m_pDocument->SetModifiedFlag();
00412 }
00413
00414 #ifdef _DEBUG
00415 void CDrawObj::AssertValid()
00416 {
00417   ASSERT(m_position.left <= m_position.right);
00418   ASSERT(m_position.bottom <= m_position.top);
00419 }
00420 #endif
00421
00422 ////////////////////////////////////////////////////////////////////////////
00423 // CDrawRect
00424
00425 IMPLEMENT_SERIAL(CDrawRect, CDrawObj, 0)
00426
00427 CDrawRect::CDrawRect()
00428 {
00429 }
00430
00431 CDrawRect::CDrawRect(const CRect& position)
00432   : CDrawObj(position)
00433 {
00434   ASSERT_VALID(this);
00435
00436   m_nShape = rectangle;
00437   m_roundness.x = 16;
00438   m_roundness.y = 16;
00439 }
00440
00441 void CDrawRect::Serialize(CArchive& ar)
00442 {
00443   ASSERT_VALID(this);
00444
00445   CDrawObj::Serialize(ar);
00446   if (ar.IsStoring())
00447   {
00448     ar << (WORD) m_nShape;
00449     ar << m_roundness;
00450   }
00451   else
00452   {
00453     WORD wTemp;
00454     ar >> wTemp; m_nShape = (Shape)wTemp;
00455     ar >> m_roundness;
00456   }
00457 }
00458
00459 void CDrawRect::Draw(CDC* pDC)
00460 {
00461   ASSERT_VALID(this);
00462
00463   CBrush brush;
00464   if (!brush.CreateBrushIndirect(&m_logbrush))
00465     return;
00466   CPen pen;
00467   if (!pen.CreatePenIndirect(&m_logpen))
00468     return;
00469
00470   CBrush* pOldBrush;
00471   CPen* pOldPen;
00472
00473   if (m_bBrush)
00474     pOldBrush = pDC->SelectObject(&brush);
00475   else
00476     pOldBrush = (CBrush*)pDC->SelectStockObject(NULL_BRUSH);
00477
00478   if (m_bPen)
00479     pOldPen = pDC->SelectObject(&pen);
00480   else
00481     pOldPen = (CPen*)pDC->SelectStockObject(NULL_PEN);
00482
00483   CRect rect = m_position;
00484   switch (m_nShape)
00485   {
00486   case rectangle:
00487     pDC->Rectangle(rect);
00488     break;
00489
00490   case roundRectangle:
00491     pDC->RoundRect(rect, m_roundness);
00492     break;
00493
00494   case ellipse:
00495     pDC->Ellipse(rect);
00496     break;
00497
00498   case line:
00499     if (rect.top > rect.bottom)
00500     {
00501       rect.top -= m_logpen.lopnWidth.y / 2;
00502       rect.bottom += (m_logpen.lopnWidth.y + 1) / 2;
00503     }
00504     else
00505     {
00506       rect.top += (m_logpen.lopnWidth.y + 1) / 2;
00507       rect.bottom -= m_logpen.lopnWidth.y / 2;
00508     }
00509
00510     if (rect.left > rect.right)
00511     {
00512       rect.left -= m_logpen.lopnWidth.x / 2;
00513       rect.right += (m_logpen.lopnWidth.x + 1) / 2;
00514     }
00515     else
00516     {
00517       rect.left += (m_logpen.lopnWidth.x + 1) / 2;
00518       rect.right -= m_logpen.lopnWidth.x / 2;
00519     }
00520
00521     pDC->MoveTo(rect.TopLeft());
00522     pDC->LineTo(rect.BottomRight());
00523     break;
00524   }
00525
00526   pDC->SelectObject(pOldBrush);
00527   pDC->SelectObject(pOldPen);
00528 }
00529
00530
00531 int CDrawRect::GetHandleCount()
00532 {
00533   ASSERT_VALID(this);
00534
00535   return m_nShape == line ? 2 :
00536     CDrawObj::GetHandleCount() + (m_nShape == roundRectangle);
00537 }
00538
00539 // returns center of handle in logical coordinates
00540 CPoint CDrawRect::GetHandle(int nHandle)
00541 {
00542   ASSERT_VALID(this);
00543
00544   if (m_nShape == line && nHandle == 2)
00545     nHandle = 5;
00546   else if (m_nShape == roundRectangle && nHandle == 9)
00547   {
00548     CRect rect = m_position;
00549     rect.NormalizeRect();
00550     CPoint point = rect.BottomRight();
00551     point.x -= m_roundness.x / 2;
00552     point.y -= m_roundness.y / 2;
00553     return point;
00554   }
00555
00556   return CDrawObj::GetHandle(nHandle);
00557 }
00558
00559 HCURSOR CDrawRect::GetHandleCursor(int nHandle)
00560 {
00561   ASSERT_VALID(this);
00562
00563   if (m_nShape == line && nHandle == 2)
00564     nHandle = 5;
00565   else if (m_nShape == roundRectangle && nHandle == 9)
00566     return AfxGetApp()->LoadStandardCursor(IDC_SIZEALL);
00567   return CDrawObj::GetHandleCursor(nHandle);
00568 }
00569
00570 // point is in logical coordinates
00571 void CDrawRect::MoveHandleTo(int nHandle, CPoint point, CDrawView* pView)
00572 {
00573   ASSERT_VALID(this);
00574
00575   if (m_nShape == line && nHandle == 2)
00576     nHandle = 5;
00577   else if (m_nShape == roundRectangle && nHandle == 9)
00578   {
00579     CRect rect = m_position;
00580     rect.NormalizeRect();
00581     if (point.x > rect.right - 1)
00582       point.x = rect.right - 1;
00583     else if (point.x < rect.left + rect.Width() / 2)
00584       point.x = rect.left + rect.Width() / 2;
00585     if (point.y > rect.bottom - 1)
00586       point.y = rect.bottom - 1;
00587     else if (point.y < rect.top + rect.Height() / 2)
00588       point.y = rect.top + rect.Height() / 2;
00589     m_roundness.x = 2 * (rect.right - point.x);
00590     m_roundness.y = 2 * (rect.bottom - point.y);
00591     m_pDocument->SetModifiedFlag();
00592     if (pView == NULL)
00593       Invalidate();
00594     else
00595       pView->InvalObj(this);
00596     return;
00597   }
00598
00599   CDrawObj::MoveHandleTo(nHandle, point, pView);
00600 }
00601
00602 // rect must be in logical coordinates
00603 BOOL CDrawRect::Intersects(const CRect& rect)
00604 {
00605   ASSERT_VALID(this);
00606
00607   CRect rectT = rect;
00608   rectT.NormalizeRect();
00609
00610   CRect fixed = m_position;
00611   fixed.NormalizeRect();
00612   if ((rectT & fixed).IsRectEmpty())
00613     return FALSE;
00614
00615   CRgn rgn;
00616   switch (m_nShape)
00617   {
00618   case rectangle:
00619     return TRUE;
00620
00621   case roundRectangle:
00622     rgn.CreateRoundRectRgn(fixed.left, fixed.top, fixed.right, fixed.bottom,
00623       m_roundness.x, m_roundness.y);
00624     break;
00625
00626   case ellipse:
00627     rgn.CreateEllipticRgnIndirect(fixed);
00628     break;
00629
00630   case line:
00631     {
00632       int x = (m_logpen.lopnWidth.x + 5) / 2;
00633       int y = (m_logpen.lopnWidth.y + 5) / 2;
00634       POINT points[4];
00635       points[0].x = fixed.left;
00636       points[0].y = fixed.top;
00637       points[1].x = fixed.left;
00638       points[1].y = fixed.top;
00639       points[2].x = fixed.right;
00640       points[2].y = fixed.bottom;
00641       points[3].x = fixed.right;
00642       points[3].y = fixed.bottom;
00643
00644       if (fixed.left < fixed.right)
00645       {
00646         points[0].x -= x;
00647         points[1].x += x;
00648         points[2].x += x;
00649         points[3].x -= x;
00650       }
00651       else
00652       {
00653         points[0].x += x;
00654         points[1].x -= x;
00655         points[2].x -= x;
00656         points[3].x += x;
00657       }
00658
00659       if (fixed.top < fixed.bottom)
00660       {
00661         points[0].y -= y;
00662         points[1].y += y;
00663         points[2].y += y;
00664         points[3].y -= y;
00665       }
00666       else
00667       {
00668         points[0].y += y;
00669         points[1].y -= y;
00670         points[2].y -= y;
00671         points[3].y += y;
00672       }
00673       rgn.CreatePolygonRgn(points, 4, ALTERNATE);
00674     }
00675     break;
00676   }
00677   return rgn.RectInRegion(fixed);
00678 }
00679
00680 CDrawObj* CDrawRect::Clone(CDrawDoc* pDoc)
00681 {
00682   ASSERT_VALID(this);
00683
00684   CDrawRect* pClone = new CDrawRect(m_position);
00685   pClone->m_bPen = m_bPen;
00686   pClone->m_logpen = m_logpen;
00687   pClone->m_bBrush = m_bBrush;
00688   pClone->m_logbrush = m_logbrush;
00689   pClone->m_nShape = m_nShape;
00690   pClone->m_roundness = m_roundness;
00691   ASSERT_VALID(pClone);
00692
00693   if (pDoc != NULL)
00694     pDoc->Add(pClone);
00695
00696   ASSERT_VALID(pClone);
00697   return pClone;
00698 }
00699
00700 ////////////////////////////////////////////////////////////////////////////
00701 // CDrawPoly
00702
00703 IMPLEMENT_SERIAL(CDrawPoly, CDrawObj, 0)
00704
00705 CDrawPoly::CDrawPoly()
00706 {
00707   m_points = NULL;
00708   m_nPoints = 0;
00709   m_nAllocPoints = 0;
00710 }
00711
00712 CDrawPoly::CDrawPoly(const CRect& position)
00713   : CDrawObj(position)
00714 {
00715   m_points = NULL;
00716   m_nPoints = 0;
00717   m_nAllocPoints = 0;
00718   m_bPen = TRUE;
00719   m_bBrush = FALSE;
00720 }
00721
00722 CDrawPoly::~CDrawPoly()
00723 {
00724   if (m_points != NULL)
00725     delete[] m_points;
00726 }
00727
00728 void CDrawPoly::Serialize( CArchive& ar )
00729 {
00730   int i;
00731   CDrawObj::Serialize( ar );
00732   if( ar.IsStoring() )
00733   {
00734     ar << (WORD) m_nPoints;
00735     ar << (WORD) m_nAllocPoints;
00736     for (i = 0;i< m_nPoints; i++)
00737       ar << m_points[i];
00738   }
00739   else
00740   {
00741     WORD wTemp;
00742     ar >> wTemp; m_nPoints = wTemp;
00743     ar >> wTemp; m_nAllocPoints = wTemp;
00744     m_points = new CPoint[m_nAllocPoints];
00745     for (i = 0;i < m_nPoints; i++)
00746       ar >> m_points[i];
00747   }
00748 }
00749
00750 void CDrawPoly::Draw(CDC* pDC)
00751 {
00752   ASSERT_VALID(this);
00753
00754   CBrush brush;
00755   if (!brush.CreateBrushIndirect(&m_logbrush))
00756     return;
00757   CPen pen;
00758   if (!pen.CreatePenIndirect(&m_logpen))
00759     return;
00760
00761   CBrush* pOldBrush;
00762   CPen* pOldPen;
00763
00764   if (m_bBrush)
00765     pOldBrush = pDC->SelectObject(&brush);
00766   else
00767     pOldBrush = (CBrush*)pDC->SelectStockObject(NULL_BRUSH);
00768
00769   if (m_bPen)
00770     pOldPen = pDC->SelectObject(&pen);
00771   else
00772     pOldPen = (CPen*)pDC->SelectStockObject(NULL_PEN);
00773
00774   pDC->Polygon(m_points, m_nPoints);
00775
00776   pDC->SelectObject(pOldBrush);
00777   pDC->SelectObject(pOldPen);
00778 }
00779
00780 // position must be in logical coordinates
00781 void CDrawPoly::MoveTo(const CRect& position, CDrawView* pView)
00782 {
00783   ASSERT_VALID(this);
00784   if (position == m_position)
00785     return;
00786
00787   if (pView == NULL)
00788     Invalidate();
00789   else
00790     pView->InvalObj(this);
00791
00792   for (int i = 0; i < m_nPoints; i += 1)
00793   {
00794     m_points[i].x += position.left - m_position.left;
00795     m_points[i].y += position.top - m_position.top;
00796   }
00797
00798   m_position = position;
00799
00800   if (pView == NULL)
00801     Invalidate();
00802   else
00803     pView->InvalObj(this);
00804   m_pDocument->SetModifiedFlag();
00805 }
00806
00807 int CDrawPoly::GetHandleCount()
00808 {
00809   return m_nPoints;
00810 }
00811
00812 CPoint CDrawPoly::GetHandle(int nHandle)
00813 {
00814   ASSERT_VALID(this);
00815
00816   ASSERT(nHandle >= 1 && nHandle <= m_nPoints);
00817   return m_points[nHandle - 1];
00818 }
00819
00820 HCURSOR CDrawPoly::GetHandleCursor(int )
00821 {
00822   return AfxGetApp()->LoadStandardCursor(IDC_ARROW);
00823 }
00824
00825 // point is in logical coordinates
00826 void CDrawPoly::MoveHandleTo(int nHandle, CPoint point, CDrawView* pView)
00827 {
00828   ASSERT_VALID(this);
00829   ASSERT(nHandle >= 1 && nHandle <= m_nPoints);
00830   if (m_points[nHandle - 1] == point)
00831     return;
00832
00833   m_points[nHandle - 1] = point;
00834   RecalcBounds(pView);
00835
00836   if (pView == NULL)
00837     Invalidate();
00838   else
00839     pView->InvalObj(this);
00840   m_pDocument->SetModifiedFlag();
00841 }
00842
00843 // rect must be in logical coordinates
00844 BOOL CDrawPoly::Intersects(const CRect& rect)
00845 {
00846   ASSERT_VALID(this);
00847   CRgn rgn;
00848   rgn.CreatePolygonRgn(m_points, m_nPoints, ALTERNATE);
00849   return rgn.RectInRegion(rect);
00850 }
00851
00852 CDrawObj* CDrawPoly::Clone(CDrawDoc* pDoc)
00853 {
00854   ASSERT_VALID(this);
00855
00856 #pragma warning(suppress:6211)
00857   CDrawPoly* pClone = new CDrawPoly(m_position);
00858   pClone->m_bPen = m_bPen;
00859   pClone->m_logpen = m_logpen;
00860   pClone->m_bBrush = m_bBrush;
00861   pClone->m_logbrush = m_logbrush;
00862   pClone->m_points = new CPoint[m_nAllocPoints];
00863
00864   memcpy_s(pClone->m_points, sizeof(CPoint) * m_nAllocPoints, m_points, sizeof(CPoint) * m_nPoints);
00865   pClone->m_nAllocPoints = m_nAllocPoints;
00866   pClone->m_nPoints = m_nPoints;
00867   ASSERT_VALID(pClone);
00868
00869   if (pDoc != NULL)
00870     pDoc->Add(pClone);
00871
00872   ASSERT_VALID(pClone);
00873   return pClone;
00874 }
00875
00876 // point is in logical coordinates
00877 void CDrawPoly::AddPoint(const CPoint& point, CDrawView* pView)
00878 {
00879   ASSERT_VALID(this);
00880   if (m_nPoints == m_nAllocPoints)
00881   {
00882     CPoint* newPoints = new CPoint[m_nAllocPoints + 10];
00883     if (m_points != NULL)
00884     {
00885       memcpy_s(newPoints, sizeof(CPoint) * (m_nAllocPoints + 10), m_points, sizeof(CPoint) * m_nAllocPoints);
00886       delete[] m_points;
00887     }
00888     m_points = newPoints;
00889     m_nAllocPoints += 10;
00890   }
00891
00892   if (m_nPoints == 0 || m_points[m_nPoints - 1] != point)
00893   {
00894     m_points[m_nPoints++] = point;
00895     if (!RecalcBounds(pView))
00896     {
00897       if (pView == NULL)
00898         Invalidate();
00899       else
00900         pView->InvalObj(this);
00901     }
00902     m_pDocument->SetModifiedFlag();
00903   }
00904 }
00905
00906 BOOL CDrawPoly::RecalcBounds(CDrawView* pView)
00907 {
00908   ASSERT_VALID(this);
00909
00910   if (m_nPoints == 0)
00911     return FALSE;
00912
00913   CRect bounds(m_points[0], CSize(0, 0));
00914   for (int i = 1; i < m_nPoints; ++i)
00915   {
00916     if (m_points[i].x < bounds.left)
00917       bounds.left = m_points[i].x;
00918     if (m_points[i].x > bounds.right)
00919       bounds.right = m_points[i].x;
00920     if (m_points[i].y < bounds.top)
00921       bounds.top = m_points[i].y;
00922     if (m_points[i].y > bounds.bottom)
00923       bounds.bottom = m_points[i].y;
00924   }
00925
00926   if (bounds == m_position)
00927     return FALSE;
00928
00929   if (pView == NULL)
00930     Invalidate();
00931   else
00932     pView->InvalObj(this);
00933
00934   m_position = bounds;
00935
00936   if (pView == NULL)
00937     Invalidate();
00938   else
00939     pView->InvalObj(this);
00940
00941   return TRUE;
00942 }
00943
00944 ////////////////////////////////////////////////////////////////////////////
00945
00946 IMPLEMENT_SERIAL(CDrawOleObj, CDrawObj, 0)
00947
00948 BOOL CDrawOleObj::c_bShowItems = TRUE;
00949
00950 CDrawOleObj::CDrawOleObj() : m_extent(0,0)
00951 {
00952   m_pClientItem = NULL;
00953 }
00954
00955 CDrawOleObj::CDrawOleObj(const CRect& position)
00956   : CDrawObj(position), m_extent(0, 0)
00957 {
00958   m_pClientItem = NULL;
00959 }
00960
00961 CDrawOleObj::~CDrawOleObj()
00962 {
00963   if (m_pClientItem != NULL)
00964   {
00965     m_pClientItem->Release();
00966     m_pClientItem = NULL;
00967   }
00968 }
00969
00970 void CDrawOleObj::Remove()
00971 {
00972   if (m_pClientItem != NULL)
00973   {
00974     m_pClientItem->Delete();
00975     m_pClientItem = NULL;
00976   }
00977   CDrawObj::Remove();
00978 }
00979
00980 void CDrawOleObj::Serialize( CArchive& ar )
00981 {
00982   ASSERT_VALID(this);
00983
00984   CDrawObj::Serialize(ar);
00985
00986   if (ar.IsStoring())
00987   {
00988     ar << m_extent;
00989     ar << m_pClientItem;
00990   }
00991   else
00992   {
00993     ar >> m_extent;
00994     ar >> m_pClientItem;
00995     m_pClientItem->m_pDrawObj = this;
00996   }
00997 }
00998
00999 CDrawObj* CDrawOleObj::Clone(CDrawDoc* pDoc)
01000 {
01001   ASSERT_VALID(this);
01002
01003   AfxGetApp()->BeginWaitCursor();
01004
01005   CDrawOleObj* pClone = NULL;
01006   CDrawItem* pItem = NULL;
01007   TRY
01008   {
01009     // perform a "deep copy" -- need to copy CDrawOleObj and the CDrawItem
01010     //  that it points to.
01011     pClone = new CDrawOleObj(m_position);
01012 #pragma warning(suppress:6014)
01013     pItem = new CDrawItem(m_pDocument, pClone);
01014     if (!pItem->CreateCloneFrom(m_pClientItem))
01015     {
01016       AfxThrowMemoryException();
01017     }
01018
01019     pClone->m_pClientItem = pItem;
01020     pClone->m_bPen = m_bPen;
01021     pClone->m_logpen = m_logpen;
01022     pClone->m_bBrush = m_bBrush;
01023     pClone->m_logbrush = m_logbrush;
01024     ASSERT_VALID(pClone);
01025
01026     if (pDoc != NULL)
01027       pDoc->Add(pClone);
01028   }
01029   CATCH_ALL(e)
01030   {
01031     if(pItem)
01032       pItem->Delete();
01033
01034     if(pClone)
01035     {
01036       pClone->m_pClientItem = NULL;
01037       pClone->Remove();
01038     }
01039     AfxGetApp()->EndWaitCursor();
01040
01041     THROW_LAST();
01042   }
01043   END_CATCH_ALL
01044
01045   AfxGetApp()->EndWaitCursor();
01046   return pClone;
01047 }
01048
01049 void CDrawOleObj::Draw(CDC* pDC)
01050 {
01051   ASSERT_VALID(this);
01052
01053   CDrawItem* pItem = m_pClientItem;
01054   if (pItem != NULL)
01055   {
01056     // draw the OLE item itself
01057     pItem->Draw(pDC, m_position);
01058
01059     // don't draw tracker in print preview or on printer
01060     if (!pDC->IsPrinting())
01061     {
01062       // use a CRectTracker to draw the standard effects
01063       CRectTracker tracker;
01064       tracker.m_rect = m_position;
01065       pDC->LPtoDP(tracker.m_rect);
01066
01067       if (c_bShowItems)
01068       {
01069         // put correct border depending on item type
01070         if (pItem->GetType() == OT_LINK)
01071           tracker.m_nStyle |= CRectTracker::dottedLine;
01072         else
01073           tracker.m_nStyle |= CRectTracker::solidLine;
01074       }
01075
01076       // put hatching over the item if it is currently open
01077       if (pItem->GetItemState() == COleClientItem::openState ||
01078         pItem->GetItemState() == COleClientItem::activeUIState)
01079       {
01080         tracker.m_nStyle |= CRectTracker::hatchInside;
01081       }
01082       tracker.Draw(pDC);
01083     }
01084   }
01085 }
01086
01087 void CDrawOleObj::OnOpen(CDrawView* pView)
01088 {
01089   AfxGetApp()->BeginWaitCursor();
01090   m_pClientItem->DoVerb(
01091     GetKeyState(VK_CONTROL) < 0 ? OLEIVERB_OPEN : OLEIVERB_PRIMARY,
01092     pView);
01093   AfxGetApp()->EndWaitCursor();
01094 }
01095
01096 void CDrawOleObj::OnEditProperties()
01097 {
01098   // using COlePropertiesDialog directly means no scaling
01099   COlePropertiesDialog dlg(m_pClientItem, 100, 100, NULL);
01100
01101   dlg.DoModal();
01102 }
01103
01104 // position is in logical
01105 void CDrawOleObj::MoveTo(const CRect& position, CDrawView* pView)
01106 {
01107   ASSERT_VALID(this);
01108
01109   if (position == m_position)
01110     return;
01111
01112   // call base class to update position
01113   CDrawObj::MoveTo(position, pView);
01114
01115   // update position of in-place editing session on position change
01116   if (m_pClientItem->IsInPlaceActive())
01117     m_pClientItem->SetItemRects();
01118 }
01119
01120 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVisualStudioDemoDoc Member List

This is the complete list of members for CVisualStudioDemoDoc, including all inherited members.
CVisualStudioDemoDoc() | CVisualStudioDemoDoc | [protected]
OnDummyBuild() | CVisualStudioDemoDoc | [protected]
OnDummyClean() | CVisualStudioDemoDoc | [protected]
OnDummyCompile() | CVisualStudioDemoDoc | [protected]
OnDummyExecute() | CVisualStudioDemoDoc | [protected]
OnDummyGo() | CVisualStudioDemoDoc | [protected]
OnDummyRebuildAll() | CVisualStudioDemoDoc | [protected]
OnDummyRemoveAllBreakpoints() | CVisualStudioDemoDoc | [protected]
OnDummySelectActiveConfiguration() | CVisualStudioDemoDoc | [protected]
OnNewAccelerator() | CVisualStudioDemoDoc | [protected]
OnNewBitmap() | CVisualStudioDemoDoc | [protected]
OnNewCursor() | CVisualStudioDemoDoc | [protected]
OnNewDialog() | CVisualStudioDemoDoc | [protected]
OnNewDocument() | CVisualStudioDemoDoc | [virtual]
OnNewIcon() | CVisualStudioDemoDoc | [protected]
OnNewMenu() | CVisualStudioDemoDoc | [protected]
OnNewStringTable() | CVisualStudioDemoDoc | [protected]
OnNewToolbar() | CVisualStudioDemoDoc | [protected]
OnNewVersion() | CVisualStudioDemoDoc | [protected]
Serialize(CArchive &ar) | CVisualStudioDemoDoc | [virtual]
~CVisualStudioDemoDoc() | CVisualStudioDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBMTest3Dlg Member List

This is the complete list of members for CBMTest3Dlg, including all inherited members.
CBMTest3Dlg() | CBMTest3Dlg | [inline]
IDD enum value | CBMTest3Dlg |
m_nNumber | CBMTest3Dlg |
nextButton | CBMTest3Dlg | [protected]
okButton | CBMTest3Dlg | [protected]
OnInitDialog() | CBMTest3Dlg |
OnNextNumber() | CBMTest3Dlg |
OnPrevNumber() | CBMTest3Dlg |
prevButton | CBMTest3Dlg | [protected]
Update() | CBMTest3Dlg |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/viewex.cpp Source File

  • general
  • viewex

viewex.cpp

Go to the documentation of this file.
00001 // viewex.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "viewex.h"
00014
00015 #include "splitter.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CViewExApp
00024
00025 BEGIN_MESSAGE_MAP(CViewExApp, CWinApp)
00026   //{{AFX_MSG_MAP(CViewExApp)
00027   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00028   //}}AFX_MSG_MAP
00029   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00030   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CViewExApp construction
00035 // Place all significant initialization in InitInstance
00036
00037 CViewExApp::CViewExApp()
00038 {
00039 }
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // The one and only CViewExApp object
00043
00044 CViewExApp NEAR theApp;
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CViewExApp initialization
00048
00049 BOOL CViewExApp::InitInstance()
00050 {
00051   // This VIEWEX sample shows several techniques for creating CView
00052   //  derived classes.   All the views in this sample use the same
00053   //  CMainDoc class.  For simplicity the CMainDoc class does not
00054   //  support serialization, but has a very simple data model of
00055   //  a single string and an RGB color.  We register different
00056   //  document templates for each of the interesting view types.
00057
00058   // simple text output view
00059   AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
00060       RUNTIME_CLASS(CMainDoc),
00061       RUNTIME_CLASS(CMDIChildWnd),
00062       RUNTIME_CLASS(CTextView)));
00063
00064   // simple color output view
00065   //   a doc template with no 'fileNewName' so it is not a choice for FileNew
00066   AddDocTemplate(new CMultiDocTemplate(IDR_COLORTYPE,
00067       RUNTIME_CLASS(CMainDoc),
00068       RUNTIME_CLASS(CMDIChildWnd),
00069       RUNTIME_CLASS(CColorView)));
00070
00071   // form view with input
00072   AddDocTemplate(new CMultiDocTemplate(IDR_INPUTTYPE,
00073       RUNTIME_CLASS(CMainDoc),
00074       RUNTIME_CLASS(CMDIChildWnd),
00075       RUNTIME_CLASS(CInputView)));
00076
00077   // splitter frame with both simple text output and form input view
00078   AddDocTemplate(new CMultiDocTemplate(IDR_SPLIT2TYPE,
00079       RUNTIME_CLASS(CMainDoc),
00080       RUNTIME_CLASS(CSplitterFrame),
00081       RUNTIME_CLASS(CTextView)));
00082
00083   // 3-way splitter frame with form input, text output and color output views
00084   AddDocTemplate(new CMultiDocTemplate(IDR_SPLIT3TYPE,
00085       RUNTIME_CLASS(CMainDoc),
00086       RUNTIME_CLASS(C3WaySplitterFrame),
00087       RUNTIME_CLASS(CInputView)));
00088
00089   // create main MDI Frame window
00090   // Please note that for simple MDI Frame windows with no toolbar,
00091   //   status bar or other special behavior, the CMDIFrameWnd class
00092   //   can be used directly for the main frame window just as the
00093   //   CMDIChildWnd can be use for a document frame window.
00094
00095   CMDIFrameWnd* pMainFrame = new CMDIFrameWnd;
00096   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00097   {
00098     // free the memory
00099     delete pMainFrame;
00100     return FALSE;
00101   }
00102
00103   // Also in this example, there is only one menubar shared between
00104   //  all the views.  The automatic menu enabling support of MFC
00105   //  will disable the menu items that don't apply based on the
00106   //  currently active view.  The one MenuBar is used for all
00107   //  document types, including when there are no open documents.
00108
00109   // Now finally show the main menu
00110   pMainFrame->ShowWindow(m_nCmdShow);
00111   pMainFrame->UpdateWindow();
00112   m_pMainWnd = pMainFrame;
00113
00114   // command line arguments are ignored, create a new (empty) document
00115   OnFileNew();
00116
00117   return TRUE;
00118 }
00119
00120 /////////////////////////////////////////////////////////////////////////////
00121 // CViewExApp commands
00122
00123 void CViewExApp::OnAppAbout()
00124 {
00125   CDialog(IDD_ABOUTBOX).DoModal();
00126 }
00127
00128 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/LogDg.H Source File

  • ole
  • TstCon

LogDg.H

Go to the documentation of this file.
00001 // File: LogDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_LOGGINGDLG_H__FB7E06FB_DD1D_11D0_8E12_00C04FB68D60__INCLUDED_)
00011 #define AFX_LOGGINGDLG_H__FB7E06FB_DD1D_11D0_8E12_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // LoggingDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CLoggingDlg dialog
00021
00022 class CLoggingDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CLoggingDlg(CWnd* pParent = NULL);   // standard constructor
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CLoggingDlg)
00030   enum { IDD = IDD_LOGGING };
00031   CButton m_butFileNameBrowse;
00032   CEdit   m_eboxFileName;
00033   CString m_strFileName;
00034   int     m_iLogType;
00035   //}}AFX_DATA
00036
00037
00038 // Overrides
00039   // ClassWizard generated virtual function overrides
00040   //{{AFX_VIRTUAL(CLoggingDlg)
00041   protected:
00042   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046 protected:
00047
00048   // Generated message map functions
00049   //{{AFX_MSG(CLoggingDlg)
00050   virtual BOOL OnInitDialog();
00051   afx_msg void OnLogToDebug();
00052   afx_msg void OnLogToFile();
00053   afx_msg void OnFileNameBrowse();
00054   afx_msg void OnLogToNull();
00055   afx_msg void OnLogToOutput();
00056   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00057   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00058   //}}AFX_MSG
00059   DECLARE_MESSAGE_MAP()
00060 };
00061
00062 //{{AFX_INSERT_LOCATION}}
00063 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00064
00065 #endif // !defined(AFX_LOGGINGDLG_H__FB7E06FB_DD1D_11D0_8E12_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/animctrl.h Source File

  • general
  • CmnCtrl1

animctrl.h

Go to the documentation of this file.
00001 // animctrl.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef _ANIMCTRL_H
00014 #define _ANIMCTRL_H
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CAnimateCtrlPage dialog
00018
00019 class CAnimateCtrlPage : public CPropertyPage
00020 {
00021 // Construction
00022 public:
00023   CAnimateCtrlPage();   // standard constructor
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CAnimateCtrlPage)
00027   enum { IDD = IDD_ANIMCTRL };
00028   CString m_cstrFileName;
00029   BOOL m_bCentered;
00030   BOOL m_bTransparent;
00031   BOOL m_bAutoplay;
00032   //}}AFX_DATA
00033   CAnimateCtrl m_AnimateCtrl;
00034   CRect m_rectAnimateCtrl;
00035   DWORD m_dwStyle;   // control styles
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CAnimateCtrlPage)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   virtual BOOL OnInitDialog();
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045 protected:
00046
00047   void ApplyChanges();
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CAnimateCtrlPage)
00051   afx_msg void OnFileChange();
00052   afx_msg void OnBrowse();
00053   afx_msg void OnCenter();
00054   afx_msg void OnTransparent();
00055   afx_msg void OnAutoplay();
00056   afx_msg void OnPlay();
00057   afx_msg void OnStop();
00058   //}}AFX_MSG
00059   DECLARE_MESSAGE_MAP()
00060 };
00061
00062 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrvw.h Source File

  • controls
  • contain

contrvw.h

Go to the documentation of this file.
00001 // ContrVw.h : interface of the CContainerView class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 class CContainerItem;
00013
00014 class CContainerView : public CView
00015 {
00016 protected: // create from serialization only
00017   CContainerView();
00018   DECLARE_DYNCREATE(CContainerView)
00019
00020 // Attributes
00021 public:
00022   CContainerDoc* GetDocument();
00023   // m_pSelection holds the selection to the current CContainerItem.
00024   // For many applications, such a member variable isn't adequate to
00025   //  represent a selection, such as a multiple selection or a selection
00026   //  of objects that are not CContainerItem objects.  This selection
00027   //  mechanism is provided just to help you get started.
00028
00029   // TODO: replace this selection mechanism with one appropriate to your app.
00030   CContainerItem* m_pSelection;
00031
00032 // Operations
00033 public:
00034   CContainerItem* HitTestItems(CPoint point);
00035   void SetSelection(CContainerItem* pItem);
00036   void SetupTracker(CContainerItem* pItem, CRectTracker* pTracker);
00037
00038 // Overrides
00039   // ClassWizard generated virtual function overrides
00040   //{{AFX_VIRTUAL(CContainerView)
00041   public:
00042   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00043   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00044   protected:
00045   virtual void OnInitialUpdate(); // called first time after construct
00046   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00047   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00048   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00049   virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
00050   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00051   //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 public:
00055   virtual ~CContainerView();
00056 #ifdef _DEBUG
00057   virtual void AssertValid() const;
00058   virtual void Dump(CDumpContext& dc) const;
00059 #endif
00060
00061 protected:
00062
00063 // Generated message map functions
00064 protected:
00065   //{{AFX_MSG(CContainerView)
00066     // NOTE - the ClassWizard will add and remove member functions here.
00067     //    DO NOT EDIT what you see in these blocks of generated code !
00068   afx_msg void OnSetFocus(CWnd* pOldWnd);
00069   afx_msg void OnSize(UINT nType, int cx, int cy);
00070   afx_msg void OnInsertObject();
00071   afx_msg void OnCancelEditCntr();
00072   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00073   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00074   afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00075   afx_msg void OnEditClear();
00076   afx_msg void OnUpdateEditClear(CCmdUI* pCmdUI);
00077   afx_msg void OnEditCopy();
00078   afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
00079   afx_msg void OnEditPaste();
00080   //}}AFX_MSG
00081   DECLARE_MESSAGE_MAP()
00082 };
00083
00084 #ifndef _DEBUG  // debug version in ContrVw.cpp
00085 inline CContainerDoc* CContainerView::GetDocument()
00086    { return (CContainerDoc*)m_pDocument; }
00087 #endif
00088
00089 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/MainFrm.cpp Source File

  • general
  • SimpleImage

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MainFrm.cpp : implementation of the CMainFrame class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "CImage.h"
00015
00016 #include "MainFrm.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNAMIC(CMainFrame, CFrameWnd)
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00030   ON_WM_CREATE()
00031   ON_WM_SETFOCUS()
00032 END_MESSAGE_MAP()
00033
00034
00035 static UINT indicators[] =
00036 {
00037   ID_SEPARATOR,           // status line indicator
00038   ID_INDICATOR_CAPS,
00039   ID_INDICATOR_NUM,
00040   ID_INDICATOR_SCRL,
00041 };
00042
00043 static UINT BASED_CODE sizes[]=   // this is used to create the 'Size' toolbar
00044 {
00045   ID_SIZE_HALF,
00046   ID_SIZE_ORIGINAL,
00047   ID_SIZE_DOUBLE,
00048   ID_SIZE_FILL
00049 };
00050
00051
00052 // CMainFrame construction/destruction
00053
00054 CMainFrame::CMainFrame()
00055 {
00056   // TODO: add member initialization code here
00057   m_bIsFullScreen=FALSE;
00058 }
00059
00060 CMainFrame::~CMainFrame()
00061 {
00062 }
00063
00064
00065 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00066 {
00067   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00068     return -1;
00069   // create a view to occupy the client area of the frame
00070   if (!m_wndView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
00071     CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
00072   {
00073     TRACE0("Failed to create view window\n");
00074     return -1;
00075   }
00076
00077   // Create the size toolbar
00078   if (!m_wndSizeToolBar.CreateEx(this,TBSTYLE_FLAT,WS_CHILD|WS_VISIBLE|CBRS_TOP
00079     |CBRS_GRIPPER|CBRS_SIZE_DYNAMIC| CBRS_TOOLTIPS | CBRS_FLYBY) ||
00080     !m_wndSizeToolBar.LoadToolBar(IDR_SIZE_TOOLBAR) ||
00081     !m_wndSizeToolBar.SetButtons(sizes,4))
00082   {
00083     TRACE0("Failed to create Size toolbar\n");
00084     return -1;
00085   }
00086
00087   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00088     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00089     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00090   {
00091     TRACE0("Failed to create toolbar\n");
00092     return -1;      // fail to create
00093   }
00094
00095
00096   if (!m_wndStatusBar.Create(this) ||
00097     !m_wndStatusBar.SetIndicators(indicators,
00098       sizeof(indicators)/sizeof(UINT)))
00099   {
00100     TRACE0("Failed to create status bar\n");
00101     return -1;      // fail to create
00102   }
00103   // TODO: Delete these three lines if you don't want the toolbar to be dockable
00104   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00105   m_wndSizeToolBar.EnableDocking(CBRS_ALIGN_ANY);
00106   EnableDocking(CBRS_ALIGN_ANY);
00107   DockControlBar(&m_wndToolBar);
00108   DockControlBar(&m_wndSizeToolBar,AFX_IDW_DOCKBAR_TOP);
00109
00110   return 0;
00111 }
00112
00113 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00114 {
00115   if( !CFrameWnd::PreCreateWindow(cs) )
00116     return FALSE;
00117   // TODO: Modify the Window class or styles here by modifying
00118   //  the CREATESTRUCT cs
00119
00120   cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
00121   cs.lpszClass = AfxRegisterWndClass(0);
00122   return TRUE;
00123 }
00124
00125
00126 // CMainFrame diagnostics
00127
00128 #ifdef _DEBUG
00129 void CMainFrame::AssertValid() const
00130 {
00131   CFrameWnd::AssertValid();
00132 }
00133
00134 void CMainFrame::Dump(CDumpContext& dc) const
00135 {
00136   CFrameWnd::Dump(dc);
00137 }
00138
00139 #endif //_DEBUG
00140
00141
00142 // CMainFrame message handlers
00143
00144 void CMainFrame::OnSetFocus(CWnd* /*pOldWnd*/)
00145 {
00146   // forward focus to the view window
00147   m_wndView.SetFocus();
00148 }
00149
00150
00151 BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00152 {
00153   // let the view have first crack at the command
00154   if (m_wndView.OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
00155     return TRUE;
00156
00157   // otherwise, do default handling
00158   return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00159 }
00160
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/CustomFileDialog.cpp Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

CustomFileDialog.cpp

Go to the documentation of this file.
00001 // CustomFileDialog.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005 #include "FileDlgWatcher.h"
00006 #include "CustomFileDialog.h"
00007
00008
00009 // CCustomFileDialog
00010
00011 IMPLEMENT_DYNAMIC(CCustomFileDialog, CFileDialog)
00012
00013 CCustomFileDialog::CCustomFileDialog(BOOL bOpenFileDialog,
00014                    BOOL bVistaStyle,
00015                    BOOL bEventPopups,
00016                    CString &strLog) :
00017   CFileDialog(bOpenFileDialog, NULL, NULL,
00018         OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, NULL, NULL, 0,
00019         bVistaStyle),
00020   m_bEventPopups(bEventPopups),
00021   m_strLog(strLog)
00022 {
00023 }
00024
00025 CCustomFileDialog::~CCustomFileDialog() { }
00026
00027 void CCustomFileDialog::LogEvent(LPCWSTR eventMsg)
00028 {
00029   if (m_bEventPopups)
00030   {
00031     ::MessageBox(this->m_hWnd, eventMsg, _T("Event Triggered"), 0);
00032   }
00033   m_strLog += _T("Event: ");
00034   m_strLog += eventMsg;
00035   m_strLog += _T("\r\n");
00036 }
00037
00038 BEGIN_MESSAGE_MAP(CCustomFileDialog, CFileDialog)
00039 END_MESSAGE_MAP()
00040
00041 void CCustomFileDialog::OnFileNameChange()
00042 {
00043   LogEvent(_T("OnFileNameChange"));
00044   CFileDialog::OnFileNameChange();
00045 }
00046
00047 BOOL CCustomFileDialog::OnFileNameOK()
00048 {
00049   LogEvent(_T("OnFileNameOK"));
00050   return CFileDialog::OnFileNameOK();
00051 }
00052
00053 void CCustomFileDialog::OnFolderChange()
00054 {
00055   LogEvent(_T("OnFolderChange"));
00056   CFileDialog::OnFolderChange();
00057 }
00058
00059 void CCustomFileDialog::OnInitDone()
00060 {
00061   LogEvent(_T("OnInitDone"));
00062   CFileDialog::OnInitDone();
00063 }
00064
00065 void CCustomFileDialog::OnLBSelChangedNotify(UINT nIDBox, UINT iCurSel,
00066                        UINT nCode)
00067 {
00068   LogEvent(_T("OnLBSelChangedNotify"));
00069   CFileDialog::OnLBSelChangedNotify(nIDBox, iCurSel, nCode);
00070 }
00071
00072 UINT CCustomFileDialog::OnShareViolation(LPCTSTR lpszPathName)
00073 {
00074   LogEvent(_T("OnShareViolation"));
00075   return CFileDialog::OnShareViolation(lpszPathName);
00076 }
00077
00078 void CCustomFileDialog::OnTypeChange()
00079 {
00080   LogEvent(_T("OnTypeChange"));
00081   CFileDialog::OnTypeChange();
00082 }
00083
00084 BOOL CCustomFileDialog::OnInitDialog()
00085 {
00086   LogEvent(_T("OnInitDialog"));
00087   return CFileDialog::OnInitDialog();
00088 }
00089 void CCustomFileDialog::OnOK()
00090 {
00091   LogEvent(_T("OnOK"));
00092   CFileDialog::OnOK();
00093 }
00094
00095 void CCustomFileDialog::OnCancel()
00096 {
00097   LogEvent(_T("OnCancel"));
00098   CFileDialog::OnCancel();
00099 }
00100
00101 void CCustomFileDialog::OnSetFont(CFont *pFont)
00102 {
00103   LogEvent(_T("OnSetFont"));
00104   CFileDialog::OnSetFont(pFont);
00105 }
00106
00107 // CCustomFileDialog message handlers
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassTreeWnd.cpp Source File

  • vc2008fp
  • VisualStudioDemo

ClassTreeWnd.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "ClassTreeWnd.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CClassTreeWnd
00022
00023 CClassTreeWnd::CClassTreeWnd()
00024 {
00025 }
00026
00027 CClassTreeWnd::~CClassTreeWnd()
00028 {
00029 }
00030
00031 BEGIN_MESSAGE_MAP(CClassTreeWnd, CTreeCtrl)
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CClassTreeWnd message handlers
00036
00037 BOOL CClassTreeWnd::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
00038 {
00039   BOOL bRes = CTreeCtrl::OnNotify(wParam, lParam, pResult);
00040
00041   NMHDR* pNMHDR = (NMHDR*)lParam;
00042   ASSERT(pNMHDR != NULL);
00043
00044   if (pNMHDR && pNMHDR->code == TTN_SHOW && GetToolTips() != NULL)
00045   {
00046     GetToolTips()->SetWindowPos(&wndTop, -1, -1, -1, -1, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE);
00047   }
00048
00049   return bRes;
00050 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListDoc.h Source File

  • general
  • DBVList

DBVListDoc.h

Go to the documentation of this file.
00001 // DBVListDoc.h : interface of the CDBVListDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_DBVLISTDOC_H__13CCB749_ED59_11D0_8286_00C04FD73634__INCLUDED_)
00013 #define AFX_DBVLISTDOC_H__13CCB749_ED59_11D0_8286_00C04FD73634__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019
00020 class CDBVListDoc : public CDocument
00021 {
00022 protected: // create from serialization only
00023   CDBVListDoc();
00024   DECLARE_DYNCREATE(CDBVListDoc)
00025
00026 // Attributes
00027 public:
00028   CDBVListSet m_dBVListSet;
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CDBVListDoc)
00036   public:
00037   virtual BOOL OnNewDocument();
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 public:
00042   virtual ~CDBVListDoc();
00043 #ifdef _DEBUG
00044   virtual void AssertValid() const;
00045   virtual void Dump(CDumpContext& dc) const;
00046 #endif
00047
00048 protected:
00049
00050 // Generated message map functions
00051 protected:
00052   //{{AFX_MSG(CDBVListDoc)
00053   //}}AFX_MSG
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058
00059 //{{AFX_INSERT_LOCATION}}
00060 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00061
00062 #endif // !defined(AFX_DBVLISTDOC_H__13CCB749_ED59_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPENDATAHEADER Member List

This is the complete list of members for tagPENDATAHEADER, including all inherited members.
cbSizeUsed | tagPENDATAHEADER
cPnt | tagPENDATAHEADER
cPntStrokeMax | tagPENDATAHEADER
cStrokes | tagPENDATAHEADER
nInkWidth | tagPENDATAHEADER
rectBound | tagPENDATAHEADER
rgbInk | tagPENDATAHEADER
wPndts | tagPENDATAHEADER
wVersion | tagPENDATAHEADER
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CThreadApp Member List

This is the complete list of members for CThreadApp, including all inherited members.
CThreadApp() | CThreadApp |
ExitInstance() | CThreadApp | [virtual]
InitInstance() | CThreadApp | [virtual]
OnAppAbout() | CThreadApp |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/StdAfx.cpp Source File

  • vc2008fp
  • RibbonMDI

StdAfx.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNDlg.h Source File

  • vc2008fp
  • DesktopAlertDemo

MSNDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CMSNDlg dialog
00015
00016 class CMSNDlg : public CMFCDesktopAlertDialog
00017 {
00018   DECLARE_DYNCREATE(CMSNDlg)
00019
00020 // Construction
00021 public:
00022   CMSNDlg();
00023
00024 // Dialog Data
00025   enum { IDD = IDD_DIALOG2 };
00026   CMFCLinkCtrl  m_Options;
00027   CMFCLinkCtrl  m_btnRL;
00028
00029 // Overrides
00030   protected:
00031   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00032
00033   virtual void OnDraw (CDC* pDC);
00034
00035 // Implementation
00036 protected:
00037   virtual BOOL OnInitDialog();
00038
00039   afx_msg void OnButton1();
00040   afx_msg void OnOptions();
00041
00042   DECLARE_MESSAGE_MAP()
00043
00044   CMFCToolBarImages m_imgLogo;
00045 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/resource.h Source File

  • general
  • Scribble

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by scribble.rc
00004 //
00005 #define IDR_SCRIBBTYPE_SRVR_IP          4
00006 #define IDR_SCRIBBTYPE_SRVR_EMB         5
00007 #define IDD_ABOUTBOX                    100
00008 #define IDP_OLE_INIT_FAILED             100
00009 #define IDR_MAINFRAME                   128
00010 #define IDR_SCRIBBTYPE                  129
00011 #define IDD_PEN_WIDTHS                  131
00012 #define IDC_THIN_PEN_WIDTH              1000
00013 #define IDC_THICK_PEN_WIDTH             1001
00014 #define IDC_DEFAULT_PEN_WIDTHS          1002
00015 #define ID_PEN_THICK_OR_THIN            32772
00016 #define ID_PEN_WIDTHS                   32773
00017 #define ID_CANCEL_EDIT_SRVR             32774
00018
00019 // Next default values for new objects
00020 //
00021 #ifdef APSTUDIO_INVOKED
00022 #ifndef APSTUDIO_READONLY_SYMBOLS
00023 #define _APS_3D_CONTROLS                     1
00024 #define _APS_NEXT_RESOURCE_VALUE        132
00025 #define _APS_NEXT_COMMAND_VALUE         32774
00026 #define _APS_NEXT_CONTROL_VALUE         1003
00027 #define _APS_NEXT_SYMED_VALUE           101
00028 #endif
00029 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AutoClik::IAutoClickPoint Member List

This is the complete list of members for AutoClik::IAutoClickPoint, including all inherited members.
id AutoClik::IAutoClickPoint
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/stdafx.cpp Source File

  • general
  • MMXSwarm

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // MMXSwarm.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004 // Also includes utility functions that rarely change.
00005 //
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014 //
00015 #include "stdafx.h"
00016 #include <windows.h>
00017 #include <stdio.h>
00018
00019 // Note: See the CPUID sample for a more complete
00020 // implentation
00021
00022 const DWORD _MMX_FEATURE_BIT = 0x00800000;
00023 const DWORD _SSE2_FEATURE_BIT = 0x04000000;
00024
00025 static bool _IsFeature(DWORD nFeature);
00026
00027
00028 bool IsMMX()
00029 {
00030   static bool bMMX = _IsFeature(_MMX_FEATURE_BIT);
00031   return(bMMX);
00032 }
00033
00034 bool IsSSE2()
00035 {
00036   static bool bSSE2 = _IsFeature(_SSE2_FEATURE_BIT);
00037   return(bSSE2);
00038 }
00039
00040 static bool _IsFeature(DWORD dwRequestFeature)
00041 {
00042   // This bit flag can get set on calling cpuid
00043   // with register eax set to 1
00044   DWORD dwFeature = 0;
00045   __try {
00046       _asm {
00047         mov eax,1
00048         cpuid
00049         mov dwFeature,edx
00050       }
00051   } __except ( EXCEPTION_EXECUTE_HANDLER) {
00052       return false;
00053   }
00054   if ((dwRequestFeature == _MMX_FEATURE_BIT) &&
00055     (dwFeature & _MMX_FEATURE_BIT)) {
00056     __try {
00057       __asm {
00058         pxor mm0, mm0
00059         emms
00060       }
00061     } __except (EXCEPTION_EXECUTE_HANDLER) {
00062       return (0);
00063     }
00064     return(true);
00065   }
00066   else if ((dwRequestFeature == _SSE2_FEATURE_BIT) &&
00067     (dwFeature & _SSE2_FEATURE_BIT)) {
00068     __try {
00069       __asm {
00070         xorpd xmm0, xmm0
00071       }
00072     } __except (EXCEPTION_EXECUTE_HANDLER) {
00073       return (0);
00074     }
00075     return(true);
00076   }
00077
00078   return false;
00079 }
00080
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikdoc.h Source File

  • ole
  • acdual

aclikdoc.h

Go to the documentation of this file.
00001 // AClikDoc.h : interface of the CAutoClickDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CAutoClickDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CAutoClickDoc();
00017   DECLARE_DYNCREATE(CAutoClickDoc)
00018
00019 // Attributes
00020 public:
00021   CPoint m_pt;
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CAutoClickDoc)
00029   public:
00030   virtual BOOL OnNewDocument();
00031   virtual void Serialize(CArchive& ar);
00032   //}}AFX_VIRTUAL
00033
00034 // Implementation
00035 public:
00036   virtual ~CAutoClickDoc();
00037 #ifdef _DEBUG
00038   virtual void AssertValid() const;
00039   virtual void Dump(CDumpContext& dc) const;
00040 #endif
00041
00042 protected:
00043
00044 // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CAutoClickDoc)
00047   afx_msg void OnEditChangetext();
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050
00051   // Generated OLE dispatch map functions
00052 public:
00053   //{{AFX_DISPATCH(CAutoClickDoc)
00054   CString m_str;
00055   afx_msg short GetX();
00056   afx_msg void SetX(short nNewValue);
00057   afx_msg short GetY();
00058   afx_msg void SetY(short nNewValue);
00059   afx_msg LPDISPATCH GetPosition();
00060   afx_msg void SetPosition(LPDISPATCH newValue);
00061   afx_msg void Refresh();
00062   afx_msg void SetAllProps(short x, short y, LPCTSTR text);
00063   afx_msg void ShowWindow();
00064   afx_msg void TestErrorHandler(short wCode);
00065   //}}AFX_DISPATCH
00066   DECLARE_DISPATCH_MAP()
00067   DECLARE_INTERFACE_MAP()
00068
00069   // DUAL_SUPPORT_START
00070   //    add declaration of IDualAClick implementation
00071   //    You need one entry here for each entry in the
00072   //    interface statement of the ODL, plus the entries for a
00073   //    dispatch interface. The BEGIN_DUAL_INTERFACE_PART
00074   //    macro in mfcdual.h automatically generates the IDispatch
00075   //    entries for you.
00076   //    Each entry with the "propput" attribute needs a function
00077   //    named "put_<property name>". Each entry with the "propget"
00078   //    attribute needs a function named "get_<property name>".
00079   //    You can pull these function prototypes from the header file
00080   //    generated by MKTYPLIB.
00081   BEGIN_DUAL_INTERFACE_PART(DualAClick, IDualAClick)
00082     STDMETHOD(put_text)(THIS_ BSTR newText);
00083     STDMETHOD(get_text)(THIS_ BSTR FAR* retval);
00084     STDMETHOD(put_x)(THIS_ short newX);
00085     STDMETHOD(get_x)(THIS_ short FAR* retval);
00086     STDMETHOD(put_y)(THIS_ short newY);
00087     STDMETHOD(get_y)(THIS_ short FAR* retval);
00088     STDMETHOD(put_Position)(THIS_ IDualAutoClickPoint FAR* newPosition);
00089     STDMETHOD(get_Position)(THIS_ IDualAutoClickPoint FAR* FAR* retval);
00090     STDMETHOD(putref_Position)(THIS_ IDualAutoClickPoint FAR* newPosition);
00091     STDMETHOD(RefreshWindow)(THIS);
00092     STDMETHOD(SetAllProps)(THIS_ short x, short y, BSTR text);
00093     STDMETHOD(ShowWindow)(THIS);
00094     STDMETHOD(TestError)(THIS_ short wCode);
00095   END_DUAL_INTERFACE_PART(DualAClick)
00096
00097   //     add declaration of ISupportErrorInfo implementation
00098   //     to indicate we support the OLE Automation error object
00099   DECLARE_DUAL_ERRORINFO()
00100   // DUAL_SUPPORT_END
00101 };
00102
00103 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/util.h Source File

  • ole
  • oleview
  • iviewers

util.h

Go to the documentation of this file.
00001 // util.h
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef _UTIL_H_
00013 #define _UTIL_H_
00014 LPCTSTR AFXAPI _GetScodeString(SCODE sc);
00015 void ErrorMessage( const CString& str, HRESULT hr ) ;
00016 LPTSTR HRtoString( HRESULT hr ) ;
00017 LONG WINAPI ParseOffNumber( LPTSTR FAR *lplp, LPINT lpConv ) ;
00018 CString TYPEDESCtoString( ITypeInfo* pti, TYPEDESC* ptdesc );
00019 CString  VTtoString( VARTYPE vt ) ;
00020
00021 #endif
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuView.cpp Source File

  • vc2008fp
  • DynamicMenu

DynamicMenuView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DynamicMenu.h"
00013
00014 #include "DynamicMenuDoc.h"
00015 #include "DynamicMenuView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const CString strInfo =
00024   _T("This sample illustrates how a popup menu and a menu bar can be changed on the fly.\r\n\r\n")
00025   _T("The following features are available:\r\n")
00026   _T("* Insert two dynamic menu items under the 'Edit' menu (see CMainFrame::OnShowPopupMenu)\r\n")
00027   _T("* Insert a dynamic popup menu 'DynamicMenu' into the top-level menu bar\r\n")
00028   _T("* Draw an image on a dynamic menu item\r\n\r\n")
00029   _T("The project was generated by Application Wizard\r\n")
00030   _T("Please note //----Example----// comments in the example source code\r\n")
00031   _T("CMyMenuBar class was added in order to demonstrate how to change the top-level menu bar");
00032
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CDynamicMenuView
00036
00037 IMPLEMENT_DYNCREATE(CDynamicMenuView, CView)
00038
00039 BEGIN_MESSAGE_MAP(CDynamicMenuView, CView)
00040   ON_WM_CONTEXTMENU()
00041   // Standard printing commands
00042   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00043   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00044   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CDynamicMenuView construction/destruction
00049
00050 CDynamicMenuView::CDynamicMenuView()
00051 {
00052   // TODO: add construction code here
00053
00054 }
00055
00056 CDynamicMenuView::~CDynamicMenuView()
00057 {
00058 }
00059
00060 BOOL CDynamicMenuView::PreCreateWindow(CREATESTRUCT& cs)
00061 {
00062   // TODO: Modify the Window class or styles here by modifying
00063   //  the CREATESTRUCT cs
00064
00065   return CView::PreCreateWindow(cs);
00066 }
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CDynamicMenuView drawing
00070
00071 void CDynamicMenuView::OnDraw(CDC* pDC)
00072 {
00073 //  CDynamicMenuDoc* pDoc = GetDocument();
00074 //  ASSERT_VALID(pDoc);
00075
00076   const int iOffset = 20;
00077
00078   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00079   ASSERT (pFontOld != NULL);
00080
00081   CRect rectClient;
00082   GetClientRect (&rectClient);
00083
00084   CRect rectText = rectClient;
00085   rectText.DeflateRect (iOffset, iOffset);
00086   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00087
00088   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00089               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00090
00091   CRect rectFrame = rectText;
00092   rectFrame.InflateRect (iOffset, iOffset);
00093
00094   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00095
00096   rectFrame.DeflateRect (1, 1);
00097   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00098           ::GetSysColor (COLOR_3DLIGHT));
00099
00100   rectFrame.DeflateRect (2, 2);
00101   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00102           ::GetSysColor (COLOR_3DLIGHT));
00103
00104   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00105   pDC->SetBkMode (TRANSPARENT);
00106
00107   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00108
00109   pDC->SelectObject (pFontOld);
00110
00111 }
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CDynamicMenuView printing
00115
00116 void CDynamicMenuView::OnFilePrintPreview()
00117 {
00118   AFXPrintPreview (this);
00119 }
00120
00121 BOOL CDynamicMenuView::OnPreparePrinting(CPrintInfo* pInfo)
00122 {
00123   // default preparation
00124   return DoPreparePrinting(pInfo);
00125 }
00126
00127 void CDynamicMenuView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00128 {
00129   // TODO: add extra initialization before printing
00130 }
00131
00132 void CDynamicMenuView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00133 {
00134   // TODO: add cleanup after printing
00135 }
00136
00137 /////////////////////////////////////////////////////////////////////////////
00138 // CDynamicMenuView diagnostics
00139
00140 #ifdef _DEBUG
00141 void CDynamicMenuView::AssertValid() const
00142 {
00143   CView::AssertValid();
00144 }
00145
00146 void CDynamicMenuView::Dump(CDumpContext& dc) const
00147 {
00148   CView::Dump(dc);
00149 }
00150
00151 CDynamicMenuDoc* CDynamicMenuView::GetDocument() // non-debug version is inline
00152 {
00153   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDynamicMenuDoc)));
00154   return (CDynamicMenuDoc*)m_pDocument;
00155 }
00156 #endif //_DEBUG
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CDynamicMenuView message handlers
00160
00161 void CDynamicMenuView::OnContextMenu(CWnd*, CPoint point)
00162 {
00163   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00164 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEmpView Member List

This is the complete list of members for CEmpView, including all inherited members.
CEmpView() | CEmpView | [protected]
FindItem(int iStart, LVFINDINFO *plvfi) | CEmpView | [protected]
GetDispInfo(LVITEM *pItem) | CEmpView | [protected]
GetDocument() | CEmpView | [inline]
OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CEmpView | [virtual]
OnColumnClick(UINT id, NMHDR *pNotifyStruct, LRESULT *pResult) | CEmpView | [protected]
OnInitialUpdate() | CEmpView | [virtual]
PrepareCache(int iFrom, int iTo) | CEmpView | [protected]
UpdateFilter(CString strCurQuery) | CEmpView |
~CEmpView() | CEmpView | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/resource.h Source File

  • controls
  • xlist

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by XLIST.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_XLIST                       1
00015 #define IDB_XLIST                       1
00016 #define IDS_XLIST_PPG                   2
00017 #define IDI_ABOUTDLL                    10
00018 #define IDD_ABOUTBOX_XLIST              100
00019 #define IDS_XLIST_PPG_CAPTION           101
00020 #define IDD_PROPPAGE_XLIST              101
00021 #define IDC_HEIGHTEDIT                  201
00022 #define IDC_INVERTCHECK                 202
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028
00029 #define _APS_NEXT_RESOURCE_VALUE        201
00030 #define _APS_NEXT_COMMAND_VALUE         32768
00031 #define _APS_NEXT_CONTROL_VALUE         203
00032 #define _APS_NEXT_SYMED_VALUE           101
00033 #endif
00034 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ComCatDg.H Source File

  • ole
  • TstCon

ComCatDg.H

Go to the documentation of this file.
00001 // File: ComCatDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_COMPONENTCATEGORIESDLG_H__B1590DF0_0783_11D1_8E2E_00C04FB68D60__INCLUDED_)
00011 #define AFX_COMPONENTCATEGORIESDLG_H__B1590DF0_0783_11D1_8E2E_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // ComponentCategoriesDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CComponentCategoriesDlg dialog
00021
00022 class CComponentCategoriesDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CComponentCategoriesDlg( UINT idCaption, CWnd* pParent = NULL );
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CComponentCategoriesDlg)
00030   enum { IDD = IDD_COMPONENTCATEGORIES };
00031   CCheckListBox   m_lbCategories;
00032   //}}AFX_DATA
00033
00034    UINT m_idCaption;
00035    CList< CATID, CATID& > m_lSelectedCategories;
00036
00037 // Overrides
00038   // ClassWizard generated virtual function overrides
00039   //{{AFX_VIRTUAL(CComponentCategoriesDlg)
00040   protected:
00041   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045 protected:
00046    ICatInformationPtr m_pCatInfo;
00047    CArray< CATID, CATID& > m_aAvailableCategories;
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CComponentCategoriesDlg)
00051   virtual BOOL OnInitDialog();
00052   afx_msg void OnSelectAll();
00053   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00054   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00055   //}}AFX_MSG
00056   DECLARE_MESSAGE_MAP()
00057 };
00058
00059 //{{AFX_INSERT_LOCATION}}
00060 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00061
00062 #endif // !defined(AFX_COMPONENTCATEGORIESDLG_H__B1590DF0_0783_11D1_8E2E_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewView.h Source File

  • vc2008fp
  • TabbedView

TabbedViewView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTabbedViewView : public CTabView
00014 {
00015 protected: // create from serialization only
00016   CTabbedViewView();
00017   DECLARE_DYNCREATE(CTabbedViewView)
00018
00019 // Attributes
00020 public:
00021   CTabbedViewDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035   BOOL IsScrollBar () const
00036   {
00037     return TRUE;
00038   }
00039
00040 // Implementation
00041 public:
00042   virtual ~CTabbedViewView();
00043 #ifdef _DEBUG
00044   virtual void AssertValid() const;
00045   virtual void Dump(CDumpContext& dc) const;
00046 #endif
00047
00048 protected:
00049   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00050   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00051   afx_msg void OnContextMenu(CWnd*, CPoint point);
00052   afx_msg void OnFilePrintPreview();
00053
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 #ifndef _DEBUG  // debug version in TabbedViewView.cpp
00058 inline CTabbedViewDoc* CTabbedViewView::GetDocument()
00059    { return (CTabbedViewDoc*)m_pDocument; }
00060 #endif
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/pal.cpp Source File

  • controls
  • pal

pal.cpp

Go to the documentation of this file.
00001 // pal.cpp : Implementation of CPalApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "pal.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020
00021 CPalApp NEAR theApp;
00022
00023 const GUID CDECL BASED_CODE _tlid =
00024     { 0x5733f771, 0xbe58, 0x101a, { 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f } };
00025 const WORD _wVerMajor = 1;
00026 const WORD _wVerMinor = 0;
00027
00028
00029 ////////////////////////////////////////////////////////////////////////////
00030 // CPalApp::InitInstance - DLL initialization
00031
00032 BOOL CPalApp::InitInstance()
00033 {
00034   BOOL bInit = COleControlModule::InitInstance();
00035
00036   if (bInit)
00037   {
00038     // TODO: Add your own module initialization code here.
00039   }
00040
00041   return bInit;
00042 }
00043
00044
00045 ////////////////////////////////////////////////////////////////////////////
00046 // CPalApp::ExitInstance - DLL termination
00047
00048 int CPalApp::ExitInstance()
00049 {
00050   // TODO: Add your own module termination code here.
00051
00052   return COleControlModule::ExitInstance();
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // DllRegisterServer - Adds entries to the system registry
00058
00059 STDAPI DllRegisterServer(void)
00060 {
00061   AFX_MANAGE_STATE(_afxModuleAddrThis);
00062
00063   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00064     return ResultFromScode(SELFREG_E_TYPELIB);
00065
00066   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00067     return ResultFromScode(SELFREG_E_CLASS);
00068
00069   return NOERROR;
00070 }
00071
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // DllUnregisterServer - Removes entries from the system registry
00075
00076 STDAPI DllUnregisterServer(void)
00077 {
00078   AFX_MANAGE_STATE(_afxModuleAddrThis);
00079
00080   if (!AfxOleUnregisterTypeLib(_tlid))
00081     return ResultFromScode(SELFREG_E_TYPELIB);
00082
00083   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00084     return ResultFromScode(SELFREG_E_CLASS);
00085
00086   return NOERROR;
00087 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/WatchBar.h Source File

  • vc2008fp
  • VisualStudioDemo

WatchBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CWatchBar window
00014
00015 class CWatchBar : public CDockablePane
00016 {
00017 // Construction
00018 public:
00019   CWatchBar();
00020
00021 // Attributes
00022 protected:
00023   CFont m_Font;
00024   CMFCListCtrl m_wndWatch;
00025
00026 // Implementation
00027 public:
00028   virtual ~CWatchBar();
00029
00030 protected:
00031   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00032   afx_msg void OnSize(UINT nType, int cx, int cy);
00033   afx_msg void OnPaint();
00034   afx_msg void OnSetFocus(CWnd* pOldWnd);
00035
00036   DECLARE_MESSAGE_MAP()
00037 };
00038
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CObjListView Member List

This is the complete list of members for CObjListView, including all inherited members.
AddItem(COleClientItem *pObject, CString &name, HICON hIcon) | CObjListView | [protected]
CObjListView() | CObjListView | [protected]
m_bFont | CObjListView |
m_IconFont | CObjListView |
m_listbox | CObjListView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CObjListView | [protected]
OnDestroy() | CObjListView | [protected]
OnDraw(CDC *pDC) | CObjListView | [protected, virtual]
OnSize(UINT nType, int cx, int cy) | CObjListView | [protected]
RemoveAllItems() | CObjListView | [protected]
RemoveItem(COleClientItem *pItem) | CObjListView | [protected]
~CObjListView() | CObjListView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/aboutbox.h Source File

  • ole
  • superpad

aboutbox.h

Go to the documentation of this file.
00001 // aboutbox.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CBigIcon window
00016
00017 class CBigIcon : public CButton
00018 {
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024   void SizeToContent();
00025
00026 // Implementation
00027 protected:
00028   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00029
00030   //{{AFX_MSG(CBigIcon)
00031   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00032   //}}AFX_MSG
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CAboutBox dialog
00038
00039 class CAboutBox : public CDialog
00040 {
00041 private:
00042   using CDialog::Create;
00043
00044 // Construction
00045 public:
00046   CAboutBox(CWnd* pParent = NULL);    // standard constructor
00047
00048 // Dialog Data
00049   //{{AFX_DATA(CAboutBox)
00050   enum { IDD = IDD_ABOUTBOX };
00051     // NOTE: the ClassWizard will add data members here
00052   //}}AFX_DATA
00053
00054 // Implementation
00055 protected:
00056   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00057
00058   CBigIcon m_icon; // self-draw button
00059
00060   // Generated message map functions
00061   //{{AFX_MSG(CAboutBox)
00062   virtual BOOL OnInitDialog();
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065 };
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CSplashWnd dialog
00069
00070 class CSplashWnd : public CDialog
00071 {
00072 private:
00073   using CDialog::Create;
00074
00075 // Construction
00076 public:
00077   BOOL Create(CWnd* pParent);
00078
00079 // Dialog Data
00080   //{{AFX_DATA(CSplashWnd)
00081   enum { IDD = IDD_SPLASH };
00082     // NOTE: the ClassWizard will add data members here
00083   //}}AFX_DATA
00084
00085 // Implementation
00086 protected:
00087   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00088
00089   CBigIcon m_icon; // self-draw button
00090   CFont m_font;   // light version of dialog font
00091
00092   // Generated message map functions
00093   //{{AFX_MSG(CSplashWnd)
00094   virtual BOOL OnInitDialog();
00095   //}}AFX_MSG
00096   DECLARE_MESSAGE_MAP()
00097 };
00098
00099 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CXlistPropPage Member List

This is the complete list of members for CXlistPropPage, including all inherited members.
CXlistPropPage() | CXlistPropPage |
DoDataExchange(CDataExchange *pDX) | CXlistPropPage | [protected, virtual]
IDD enum value | CXlistPropPage |
m_InvertFlag | CXlistPropPage |
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertyChangesPage Member List

This is the complete list of members for CPropertyChangesPage, including all inherited members.
CPropertyChangesPage() | CPropertyChangesPage |
DoDataExchange(CDataExchange *pDX) | CPropertyChangesPage | [protected, virtual]
IDD enum value | CPropertyChangesPage |
m_astrPropertyNames | CPropertyChangesPage |
m_atLogFlags | CPropertyChangesPage |
m_lbProperties | CPropertyChangesPage |
OnContextMenu(CWnd *pWnd, CPoint point) | CPropertyChangesPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CPropertyChangesPage | [protected]
OnInitDialog() | CPropertyChangesPage | [protected, virtual]
~CPropertyChangesPage() | CPropertyChangesPage |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionsDlg Member List

This is the complete list of members for COptionsDlg, including all inherited members.
COptionsDlg(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | COptionsDlg |
m_Page11 | COptionsDlg |
m_Page12 | COptionsDlg |
m_Page21 | COptionsDlg |
m_Page22 | COptionsDlg |
m_Page31 | COptionsDlg |
m_Page32 | COptionsDlg |
~COptionsDlg() | COptionsDlg | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/stdafx.cpp Source File

  • controls
  • netaddr

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // NetAddrVerifier.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyMenuBar Member List

This is the complete list of members for CMyMenuBar, including all inherited members.
AddSubMenu() | CMyMenuBar |
CMyMenuBar() | CMyMenuBar |
CreateFromMenu(HMENU hMenu, BOOL bDefaultMenu=FALSE, BOOL bForceUpdate=FALSE) | CMyMenuBar | [private, virtual]
RestoreOriginalstate() | CMyMenuBar | [protected, virtual]
~CMyMenuBar() | CMyMenuBar | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CommandLinkCtrlPage.h Source File

  • controls
  • cmnctrl

CommandLinkCtrlPage.h

Go to the documentation of this file.
00001 #pragma once
00002 #include "afxwin.h"
00003
00004
00005 // CCommandLinkCtrlPage dialog
00006
00007 class CCommandLinkCtrlPage : public CPropertyPage
00008 {
00009   DECLARE_DYNAMIC(CCommandLinkCtrlPage)
00010
00011 public:
00012   CCommandLinkCtrlPage();
00013   virtual ~CCommandLinkCtrlPage();
00014
00015 // Dialog Data
00016   enum { IDD = IDD_COMMAND_LINK_CONTROL };
00017 public:
00018   virtual BOOL OnInitDialog();
00019
00020   afx_msg void OnBnClickedSetButtonNote();
00021   afx_msg void OnBnClickedCheckElev();
00022
00023 protected:
00024   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00025
00026   DECLARE_MESSAGE_MAP()
00027
00028 private:
00029   CButton m_cmdbtn;
00030   CEdit m_editNote;
00031   CButton m_checkShowElev;
00032 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/LineStyleMenuItem.cpp Source File

  • vc2008fp
  • OwnerDrawMenu

LineStyleMenuItem.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "LineStyleMenuItem.h"
00013
00014 #ifdef _DEBUG
00015 #undef THIS_FILE
00016 static char THIS_FILE[]=__FILE__;
00017 #define new DEBUG_NEW
00018 #endif
00019
00020 IMPLEMENT_DYNCREATE(CLineStyleMenuItem, CMFCToolBarMenuButton)
00021
00022 const int nHorzMargin = 5;
00023
00024 //////////////////////////////////////////////////////////////////////
00025 // Construction/Destruction
00026 //////////////////////////////////////////////////////////////////////
00027
00028 CLineStyleMenuItem::CLineStyleMenuItem(int nWidth, UINT uiCmdID, LPCTSTR lpszText,
00029                      BOOL bIsChecked) :
00030   CMFCToolBarMenuButton (uiCmdID, NULL /* HMENU */, -1 /*iImage*/, lpszText)
00031 {
00032   m_nWidth = nWidth;
00033
00034   if (bIsChecked)
00035   {
00036     m_nStyle |= TBBS_CHECKED;
00037   }
00038 }
00039 //*****************************************************************************************
00040 CLineStyleMenuItem::~CLineStyleMenuItem()
00041 {
00042 }
00043 //*****************************************************************************************
00044 void CLineStyleMenuItem::OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* /*pImages*/,
00045       BOOL /*bHorz*/, BOOL /*bCustomizeMode*/, BOOL bHighlight,
00046       BOOL /*bDrawBorder*/, BOOL /*bGrayDisabledButtons*/)
00047 {
00048   ASSERT_VALID (pDC);
00049
00050   CRect rectItem = rect;
00051   rectItem.DeflateRect (1, 1);
00052
00053   //--------------------
00054   // Fill item interior:
00055   //--------------------
00056   FillInterior (pDC, rectItem, bHighlight);
00057
00058   //-----------------
00059   // Draw text label:
00060   //-----------------
00061   CRect rectText = rectItem;
00062   rectText.DeflateRect (nHorzMargin, 0);
00063   rectText.right = rectText.left + afxGlobalData.GetTextWidth () * 4;
00064
00065   pDC->DrawText (m_strText, rectText, DT_SINGLELINE | DT_VCENTER);
00066
00067   //-----------
00068   // Draw line:
00069   //-----------
00070   CRect rectLine = rectItem;
00071   rectLine.left = rectText.right;
00072   rectLine.DeflateRect (nHorzMargin, 0);
00073
00074   rectLine.top = (rect.top + rect.bottom - m_nWidth) / 2;
00075   rectLine.bottom = rectLine.top + m_nWidth;
00076
00077   pDC->FillSolidRect (rectLine, GetSysColor (COLOR_WINDOWTEXT));
00078
00079   //-------------
00080   // Draw border:
00081   //-------------
00082   if (m_nStyle & TBBS_CHECKED)
00083   {
00084     pDC->Draw3dRect (rectItem, GetSysColor (COLOR_3DSHADOW), GetSysColor (COLOR_3DHILIGHT));
00085   }
00086   else if (bHighlight)
00087   {
00088     pDC->Draw3dRect (rectItem, GetSysColor (COLOR_3DHILIGHT), GetSysColor (COLOR_3DSHADOW));
00089   }
00090 }
00091 //**************************************************************************************
00092 void CLineStyleMenuItem::CopyFrom (const CMFCToolBarButton& s)
00093 {
00094   CMFCToolBarButton::CopyFrom (s);
00095
00096   const CLineStyleMenuItem& src = (const CLineStyleMenuItem&) s;
00097   m_nWidth = src.m_nWidth;
00098 }
00099 //**************************************************************************************
00100 SIZE CLineStyleMenuItem::OnCalculateSize (CDC* pDC, const CSize& /*sizeDefault*/, BOOL /*bHorz*/)
00101 {
00102   TEXTMETRIC tm;
00103   pDC->GetTextMetrics (&tm);
00104
00105   return CSize (
00106     afxGlobalData.GetTextWidth () * 4 + 50, // Text + line
00107     max (m_nWidth, tm.tmHeight) + 4);
00108 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CThreadView Member List

This is the complete list of members for CThreadView, including all inherited members.
CThreadView() | CThreadView | [protected]
GetDocument() | CThreadView | [inline]
m_pDC | CThreadView |
m_threadList | CThreadView |
On10newballs() | CThreadView | [protected]
On10newlines() | CThreadView | [protected]
On10newrectangles() | CThreadView | [protected]
On25newballs() | CThreadView | [protected]
On25newlines() | CThreadView | [protected]
On25newrectangles() | CThreadView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CThreadView | [protected]
OnDestroy() | CThreadView | [protected]
OnDraw(CDC *pDC) | CThreadView | [virtual]
OnKillThreads() | CThreadView | [protected]
OnNewball() | CThreadView | [protected]
OnNewline() | CThreadView | [protected]
OnNewrectangle() | CThreadView | [protected]
OnSize(UINT nType, int cx, int cy) | CThreadView | [protected]
OnThreadKillThreadsSlow() | CThreadView | [protected]
StartThread(int ThreadID) | CThreadView |
UpdateTitle(int nThreads=-1) | CThreadView |
~CThreadView() | CThreadView | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnctl.cpp Source File

  • controls
  • button

btnctl.cpp

Go to the documentation of this file.
00001 // btnctl.cpp : Implementation of the CButtonCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "button.h"
00014 #include "btnctl.h"
00015 #include "btnppg.h"
00016 #include <msstkppg.h>
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023
00024 IMPLEMENT_DYNCREATE(CButtonCtrl, COleControl)
00025
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // Message map
00029
00030 BEGIN_MESSAGE_MAP(CButtonCtrl, COleControl)
00031   //{{AFX_MSG_MAP(CButtonCtrl)
00032   ON_COMMAND(ID_HELP_BUTTONCONTROL, CmdAbout)
00033   ON_MESSAGE(OCM_COMMAND, OnOcmCommand)
00034   ON_COMMAND(ID_OPTIONS_OPTION1, OnOptionsOption1)
00035   ON_COMMAND(ID_OPTIONS_OPTION2, OnOptionsOption2)
00036   ON_COMMAND(ID_OPTIONS_OPTION3, OnOptionsOption3)
00037   //}}AFX_MSG_MAP
00038   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00039 END_MESSAGE_MAP()
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // Dispatch map
00044
00045 BEGIN_DISPATCH_MAP(CButtonCtrl, COleControl)
00046   //{{AFX_DISPATCH_MAP(CButtonCtrl)
00047   DISP_STOCKPROP_BORDERSTYLE()
00048   DISP_STOCKPROP_CAPTION()
00049   DISP_STOCKPROP_ENABLED()
00050   DISP_STOCKPROP_FONT()
00051   //}}AFX_DISPATCH_MAP
00052   DISP_FUNCTION_ID(CButtonCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00053 END_DISPATCH_MAP()
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // Event map
00058
00059 BEGIN_EVENT_MAP(CButtonCtrl, COleControl)
00060   //{{AFX_EVENT_MAP(CButtonCtrl)
00061   EVENT_CUSTOM_ID("Click", DISPID_CLICK, FireClick, VTS_NONE)
00062   //}}AFX_EVENT_MAP
00063 END_EVENT_MAP()
00064
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // Property pages
00068
00069 BEGIN_PROPPAGEIDS(CButtonCtrl, 2)
00070   PROPPAGEID(CButtonPropPage::guid)
00071   PROPPAGEID(CLSID_StockFontPage)
00072 END_PROPPAGEIDS(CButtonCtrl)
00073
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // Initialize class factory and guid
00077
00078 IMPLEMENT_OLECREATE_EX(CButtonCtrl, "BUTTON.ButtonCtrl.1",
00079   0x4a8c998f, 0x7713, 0x101b, 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2)
00080
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // Type library ID and version
00084
00085 IMPLEMENT_OLETYPELIB(CButtonCtrl, _tlid, _wVerMajor, _wVerMinor)
00086
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // Interface IDs
00090
00091 const IID BASED_CODE IID_DButton =
00092     { 0x4a8c9990, 0x7713, 0x101b, { 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2 } };
00093 const IID BASED_CODE IID_DButtonEvents =
00094     { 0x4a8c9991, 0x7713, 0x101b, { 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2 } };
00095
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // Control type information
00099
00100 static const DWORD BASED_CODE _dwButtonOleMisc =
00101   OLEMISC_ACTIVATEWHENVISIBLE |
00102   OLEMISC_SETCLIENTSITEFIRST |
00103   OLEMISC_INSIDEOUT |
00104   OLEMISC_CANTLINKINSIDE |
00105   OLEMISC_RECOMPOSEONRESIZE |
00106   OLEMISC_ACTSLIKEBUTTON;
00107
00108 IMPLEMENT_OLECTLTYPE(CButtonCtrl, IDS_BUTTON, _dwButtonOleMisc)
00109
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CButtonCtrl::CButtonCtrlFactory::UpdateRegistry -
00113 // Adds or removes system registry entries for CButtonCtrl
00114
00115 BOOL CButtonCtrl::CButtonCtrlFactory::UpdateRegistry(BOOL bRegister)
00116 {
00117   if (bRegister)
00118     return AfxOleRegisterControlClass(
00119       AfxGetInstanceHandle(),
00120       m_clsid,
00121       m_lpszProgID,
00122       IDS_BUTTON,
00123       IDB_BUTTON,
00124       FALSE,                      //  Not insertable
00125       _dwButtonOleMisc,
00126       _tlid,
00127       _wVerMajor,
00128       _wVerMinor);
00129   else
00130     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00131 }
00132
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CButtonCtrl::CButtonCtrl - Constructor
00136
00137 CButtonCtrl::CButtonCtrl()
00138 {
00139   InitializeIIDs(&IID_DButton, &IID_DButtonEvents);
00140 }
00141
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CButtonCtrl::~CButtonCtrl - Destructor
00145
00146 CButtonCtrl::~CButtonCtrl()
00147 {
00148 }
00149
00150
00151 /////////////////////////////////////////////////////////////////////////////
00152 // CButtonCtrl::OnDraw - Drawing function
00153
00154 void CButtonCtrl::OnDraw(
00155       CDC* pdc, const CRect& rcBounds, const CRect& /*rcInvalid*/)
00156 {
00157   DoSuperclassPaint(pdc, rcBounds);
00158 }
00159
00160
00161 /////////////////////////////////////////////////////////////////////////////
00162 // CButtonCtrl::DoPropExchange - Persistence support
00163
00164 void CButtonCtrl::DoPropExchange(CPropExchange* pPX)
00165 {
00166   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00167   COleControl::DoPropExchange(pPX);
00168 }
00169
00170
00171 /////////////////////////////////////////////////////////////////////////////
00172 // CButtonCtrl::OnResetState - Reset control to default state
00173
00174 void CButtonCtrl::OnResetState()
00175 {
00176   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00177 }
00178
00179
00180 /////////////////////////////////////////////////////////////////////////////
00181 // CButtonCtrl::AboutBox - Display an "About" box to the user
00182
00183 void CButtonCtrl::AboutBox()
00184 {
00185   CDialog dlgAbout(IDD_ABOUTBOX_BUTTON);
00186   dlgAbout.DoModal();
00187 }
00188
00189
00190 /////////////////////////////////////////////////////////////////////////////
00191 // CButtonCtrl::PreCreateWindow - Modify parameters for CreateWindowEx
00192
00193 BOOL CButtonCtrl::PreCreateWindow(CREATESTRUCT& cs)
00194 {
00195   cs.lpszClass = _T("BUTTON");
00196   return COleControl::PreCreateWindow(cs);
00197 }
00198
00199
00200 /////////////////////////////////////////////////////////////////////////////
00201 // CButtonCtrl::IsSubclassedControl - This is a subclassed control
00202
00203 BOOL CButtonCtrl::IsSubclassedControl()
00204 {
00205   return TRUE;
00206 }
00207
00208 /////////////////////////////////////////////////////////////////////////////
00209 // CButtonCtrl::PreTranslateMessage - Translate accelerator keys
00210
00211 BOOL CButtonCtrl::PreTranslateMessage(MSG* pMsg)
00212 {
00213   // give container a shot at processing accelerators
00214   if (pMsg->message >= WM_KEYFIRST && pMsg->message <= WM_KEYLAST)
00215     if (::OleTranslateAccelerator(m_pInPlaceFrame,&m_frameInfo,pMsg)==S_OK)
00216       return TRUE;
00217
00218   return COleControl::PreTranslateMessage(pMsg);
00219 }
00220 /////////////////////////////////////////////////////////////////////////////
00221 // CButtonCtrl::OnOcmCommand - Handle command messages
00222
00223 LRESULT CButtonCtrl::OnOcmCommand(WPARAM wParam, LPARAM lParam)
00224 {
00225 #ifdef _WIN32
00226   WORD wNotifyCode = HIWORD(wParam);
00227   lParam;
00228 #else
00229   WORD wNotifyCode = HIWORD(lParam);
00230   wParam;
00231 #endif
00232   switch (wNotifyCode)
00233   {
00234   case BN_CLICKED:
00235     // Fire click event when button is clicked
00236     FireClick();
00237     break;
00238   }
00239   return 0;
00240 }
00241
00242
00243 /////////////////////////////////////////////////////////////////////////////
00244 // CButtonCtrl message handlers
00245
00246
00247 /////////////////////////////////////////////////////////////////////////////
00248 // CButtonCtrl::CmdAbout - Displays About box in response to selection of
00249 // menu item.
00250
00251 void CButtonCtrl::CmdAbout()
00252 {
00253   AboutBox();
00254 }
00255
00256
00257 /////////////////////////////////////////////////////////////////////////////
00258 // CButtonCtrl::OnGetInPlaceMenu - Return in-place menu
00259
00260 HMENU CButtonCtrl::OnGetInPlaceMenu(void)
00261 {
00262   if (m_menuInPlace.m_hMenu == NULL)
00263     m_menuInPlace.LoadMenu(IDR_INPLACEMENU);
00264
00265   return m_menuInPlace.m_hMenu;
00266 }
00267
00268 void CButtonCtrl::OnOptionsOption1()
00269 {
00270   // TODO: Add your command handler code here
00271
00272 }
00273
00274 void CButtonCtrl::OnOptionsOption2()
00275 {
00276   // TODO: Add your command handler code here
00277
00278 }
00279
00280 void CButtonCtrl::OnOptionsOption3()
00281 {
00282   // TODO: Add your command handler code here
00283
00284 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MyMenuBar.cpp Source File

  • vc2008fp
  • DynamicMenu

MyMenuBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DynamicMenu.h"
00013 #include "MyMenuBar.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char THIS_FILE[]=__FILE__;
00018 #define new DEBUG_NEW
00019 #endif
00020
00021 //////////////////////////////////////////////////////////////////////
00022 // Construction/Destruction
00023 //////////////////////////////////////////////////////////////////////
00024
00025 CMyMenuBar::CMyMenuBar()
00026 {
00027
00028 }
00029
00030 CMyMenuBar::~CMyMenuBar()
00031 {
00032
00033 }
00034
00035 BOOL CMyMenuBar::RestoreOriginalstate ()
00036 {
00037   if (!CMFCMenuBar::RestoreOriginalstate ())
00038   {
00039     return FALSE;
00040   }
00041
00042   AddSubMenu ();
00043   return TRUE;
00044 }
00045
00046 void CMyMenuBar::AddSubMenu ()
00047 {
00048   CMenu menu;
00049   menu.LoadMenu (IDR_DYNAMIC_MENU);
00050
00051   InsertButton (CMFCToolBarMenuButton (0, menu, -1, _T ("&DynamicMenu")));
00052
00053   AdjustLayout();
00054   AdjustSizeImmediate ();
00055 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/stdafx.h Source File

  • ole
  • drawcli

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013 //
00014
00015 #ifndef _UNICODE
00016 #define VC_EXTRALEAN
00017 #endif
00018
00019 #include <afxwin.h>         // MFC core and standard components
00020 #include <afxext.h>         // MFC extensions (including VB)
00021 #include <afxole.h>         // MFC OLE 2.0 support
00022 #include <afxodlgs.h>       // MFC OLE 2.0 dialog support
00023 #include <afxcmn.h>         // MFC common control support
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubedoc.h Source File

  • advanced
  • cube

cubedoc.h

Go to the documentation of this file.
00001 // cubedoc.h : interface of the CCubeDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CCubeDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   CCubeDoc();
00016   DECLARE_DYNCREATE(CCubeDoc)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CCubeDoc)
00027   public:
00028   virtual BOOL OnNewDocument();
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CCubeDoc();
00034   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CCubeDoc)
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046     //    DO NOT EDIT what you see in these blocks of generated code !
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/resource.h Source File

  • ole
  • drawcli

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DRAWCLI.RC
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDR_DRAWCLTYPE                  3
00007 #define IDR_DRAWCLTYPE_CNTR_IP          6
00008 #define IDD_ABOUTBOX                    100
00009 #define IDP_BUSY                        100
00010 #define IDP_OLE_INIT_FAILED             101
00011 #define IDD_PROP_RECT                   101
00012 #define IDP_FAILED_TO_CREATE            102
00013 #define IDC_WEIGHT                      102
00014 #define IDC_PENCIL                      102
00015 #define IDC_NOFILL                      103
00016 #define ID_POPUP_MENU                   103
00017 #define IDC_SPIN1                       104
00018 #define IDD_SUMM_PAGE                   104
00019 #define IDC_AUTHOR                      105
00020 #define IDD_STAT_PAGE                   105
00021 #define IDC_KEYWORDS                    106
00022 #define IDC_COMMENTS                    107
00023 #define IDC_TITLE                       108
00024 #define IDC_SUBJECT                     109
00025 #define IDC_TEMPLATE                    110
00026 #define IDC_SAVEDBY                     111
00027 #define IDC_REVNUM                      112
00028 #define IDC_EDITTIME                    113
00029 #define IDC_LASTPRINT                   114
00030 #define IDC_CREATEDATE                  115
00031 #define IDC_LASTSAVE                    116
00032 #define IDC_NUMPAGES                    117
00033 #define IDC_NUMWORDS                    118
00034 #define IDC_NUMCHARS                    119
00035 #define IDC_APPNAME                     120
00036 #define IDC_SECURITY                    122
00037 #define IDC_THUMBNAIL                   123
00038 #define ID_CANCEL_EDIT                  32768
00039 #define ID_VIEW_GRID                    32769
00040 #define ID_DRAW_SELECT                  32770
00041 #define ID_DRAW_LINE                    32771
00042 #define ID_DRAW_RECT                    32772
00043 #define ID_DRAW_ROUNDRECT               32773
00044 #define ID_DRAW_ELLIPSE                 32774
00045 #define ID_OBJECT_LINECOLOR             32775
00046 #define ID_OBJECT_FILLCOLOR             32776
00047 #define ID_OBJECT_MOVETOFRONT           32777
00048 #define ID_OBJECT_MOVETOBACK            32778
00049 #define ID_OBJECT_MOVEFORWARD           32779
00050 #define ID_OBJECT_MOVEBACK              32780
00051 #define ID_VIEW_PAPERCOLOR              32781
00052 #define ID_DRAW_POLYGON                 32782
00053 #define ID_VIEW_SHOWOBJECTS             32784
00054 #define ID_EDIT_PROPERTIES              32785
00055 #define ID_FILE_SUMMARYINFO             32792
00056 #define ID_BUTTON32810                  -32726
00057 #define ID_BUTTON32811                  -32725
00058
00059 // Next default values for new objects
00060 //
00061 #ifdef APSTUDIO_INVOKED
00062 #ifndef APSTUDIO_READONLY_SYMBOLS
00063 #define _APS_NEXT_RESOURCE_VALUE        110
00064 #define _APS_NEXT_COMMAND_VALUE         32812
00065 #define _APS_NEXT_CONTROL_VALUE         124
00066 #define _APS_NEXT_SYMED_VALUE           101
00067 #endif
00068 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoDoc.cpp Source File

  • vc2008fp
  • IEDemo

IEDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013
00014 #include "IEDemoDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CIEDemoDoc
00024
00025 IMPLEMENT_DYNCREATE(CIEDemoDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CIEDemoDoc, CDocument)
00028   //{{AFX_MSG_MAP(CIEDemoDoc)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code!
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CIEDemoDoc construction/destruction
00036
00037 CIEDemoDoc::CIEDemoDoc()
00038 {
00039   m_iHistoryOffset = 0;
00040   m_arHistory.SetSize (0, 1);
00041 }
00042
00043 CIEDemoDoc::~CIEDemoDoc()
00044 {
00045   for (int i = 0; i < m_arHistory.GetSize (); i ++)
00046   {
00047     ASSERT (m_arHistory [i] != NULL);
00048     delete m_arHistory [i];
00049   }
00050 }
00051
00052 BOOL CIEDemoDoc::OnNewDocument()
00053 {
00054   if (!CDocument::OnNewDocument())
00055     return FALSE;
00056
00057   // TODO: add reinitialization code here
00058   // (SDI documents will reuse this document)
00059
00060   return TRUE;
00061 }
00062
00063
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CIEDemoDoc serialization
00067
00068 void CIEDemoDoc::Serialize(CArchive& ar)
00069 {
00070   if (ar.IsStoring())
00071   {
00072     // TODO: add storing code here
00073   }
00074   else
00075   {
00076     // TODO: add loading code here
00077   }
00078 }
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CIEDemoDoc diagnostics
00082
00083 #ifdef _DEBUG
00084 void CIEDemoDoc::AssertValid() const
00085 {
00086   CDocument::AssertValid();
00087 }
00088
00089 void CIEDemoDoc::Dump(CDumpContext& dc) const
00090 {
00091   CDocument::Dump(dc);
00092 }
00093 #endif //_DEBUG
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CIEDemoDoc commands
00097
00098 CHistoryObj* CIEDemoDoc::AddURLToHistory (const CString& strTitle, const CString& strURL)
00099 {
00100   ASSERT (m_arHistory.GetSize () <= HISTORY_LEN);
00101
00102   for (int i = 0; i < m_arHistory.GetSize (); i ++)
00103   {
00104     CHistoryObj* pObj = m_arHistory [i];
00105     ASSERT (pObj != NULL);
00106
00107     if (pObj && pObj->GetTitle () == strTitle && pObj->GetURL () == strURL)
00108     {
00109       return pObj;
00110     }
00111   }
00112
00113   if (m_arHistory.GetSize () == HISTORY_LEN)
00114   {
00115     delete m_arHistory [0];
00116     m_arHistory.RemoveAt (0);
00117   }
00118
00119   CHistoryObj* pObj = new CHistoryObj (strTitle, strURL,
00120     FIRST_HISTORY_COMMAND + (UINT)m_arHistory.GetSize ());
00121   m_arHistory.InsertAt (0, pObj);
00122
00123   m_iHistoryOffset = 0;
00124   return pObj;
00125 }
00126 //****************************************************************************************
00127 void CIEDemoDoc::GetBackList (_T_HistotyList& lst) const
00128 {
00129   lst.RemoveAll ();
00130   for (int i = m_iHistoryOffset + 1; i < m_arHistory.GetSize () ; i ++)
00131   {
00132     lst.AddTail (m_arHistory [i]);
00133   }
00134 }
00135 //****************************************************************************************
00136 void CIEDemoDoc::GetFrwdList (_T_HistotyList& lst) const
00137 {
00138   lst.RemoveAll ();
00139   for (int i = m_iHistoryOffset - 1; i >= 0; i --)
00140   {
00141     ASSERT (i < m_arHistory.GetSize ());
00142     lst.AddTail (m_arHistory [i]);
00143   }
00144 }
00145 //****************************************************************************************
00146 CHistoryObj* CIEDemoDoc::Go (UINT uiCmd)
00147 {
00148   for (int i = 0; i < m_arHistory.GetSize (); i ++)
00149   {
00150     CHistoryObj* pObj = m_arHistory [i];
00151     ASSERT (pObj != NULL);
00152
00153     if (pObj && pObj->GetCommand () == uiCmd)
00154     {
00155       m_arHistory.RemoveAt (i);
00156       m_arHistory.Add (pObj);
00157
00158       m_iHistoryOffset = 0;
00159       return pObj;
00160     }
00161   }
00162
00163   return NULL;
00164 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneDoc.h Source File

  • vc2008fp
  • RollupPane

RollupPaneDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CRollupPaneDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CRollupPaneDoc();
00017   DECLARE_DYNCREATE(CRollupPaneDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CRollupPaneDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039
00040 // Generated message map functions
00041 protected:
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/stdafx.h Source File

  • ole
  • wordpad

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 //
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #ifndef _UNICODE
00016 #define VC_EXTRALEAN        // use stripped down Win32 headers
00017 #endif
00018
00019 #define CONVERTERS
00020
00021 #include <afxwin.h>         // MFC core and standard components
00022 #include <afxext.h>         // MFC extensions
00023 #include <afxole.h>         // MFC OLE classes
00024 #include <afxodlgs.h>       // MFC OLE dialog classes
00025 #include <afxcmn.h>
00026 #include <afxrich.h>
00027 #include <afxpriv.h>
00028
00029 #define HORZ_TEXTOFFSET 15
00030 #define VERT_TEXTOFFSET 5
00031
00032 class CDisplayIC : public CDC
00033 {
00034 public:
00035   CDisplayIC() { CreateIC(_T("DISPLAY"), NULL, NULL, NULL); }
00036 };
00037
00038 struct CCharFormat : public CHARFORMAT2
00039 {
00040   CCharFormat() {cbSize = sizeof(CHARFORMAT2);}
00041   BOOL operator==(CCharFormat& cf);
00042 };
00043
00044 struct CParaFormat : public PARAFORMAT2
00045 {
00046   CParaFormat() {cbSize = sizeof(_paraformat);}
00047   BOOL operator==(PARAFORMAT2& pf);
00048 };
00049
00050 #include "doctype.h"
00051 #include "chicdial.h"
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagINKINGINFO Member List

This is the complete list of members for tagINKINGINFO, including all inherited members.
cbSize | tagINKINGINFO
hrgnClip | tagINKINGINFO
hrgnInkStop | tagINKINGINFO
rectClip | tagINKINGINFO
rectInkStop | tagINKINGINFO
tip | tagINKINGINFO
wFlags | tagINKINGINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/helpids.h Source File

  • vc2008fp
  • WordPad

helpids.h

Go to the documentation of this file.
00001 //
00002 // This is a part of the Microsoft Foundation Classes C++ library.
00003 // Copyright (C) 1992-1998 Microsoft Corporation
00004 // All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define IDH_WORDPAD_TIMEDATE        1001
00013
00014 #define IDH_WORDPAD_ALIGN           1003
00015 #define IDH_WORDPAD_TABSET          1004
00016 #define IDH_WORDPAD_TABCLEAR        1005
00017 #define IDH_WORDPAD_TAB_CLEARALL    1006
00018 #define IDH_WORDPAD_TABSTOPS        1007
00019 #define IDH_WORDPAD_TEXTFILE        1008
00020 #define IDH_WORDPAD_FORMATTED       1009
00021
00022 #define IDH_WORDPAD_WORD6FILE       1017
00023 #define IDH_WORDPAD_FILENEW_DOC     1018
00024 #define IDH_WORDPAD_OPTIONS_AUTOWORDSEL 1019
00025
00026 #define IDH_WORDPAD_INDENT_LEFT     1020
00027 #define IDH_WORDPAD_INDENT_RIGHT    1021
00028 #define IDH_WORDPAD_INDENT_FIRST    1022
00029
00030 #define IDH_WORDPAD_WRAP_NO         1023
00031 #define IDH_WORDPAD_WRAP_WINDOW     1024
00032 #define IDH_WORDPAD_WRAP_RULER      1025
00033
00034 #define IDH_COMM_GROUPBOX           1026
00035
00036 #define IDH_WORDPAD_INCHES          1027
00037 #define IDH_WORDPAD_CENTIMETERS     1028
00038 #define IDH_WORDPAD_POINTS          1029
00039 #define IDH_WORDPAD_PICAS           1030
00040
00041 #define IDH_WORDPAD_CHECK_TOOLBAR   1031
00042 #define IDH_WORDPAD_CHECK_FORMATBAR 1032
00043 #define IDH_WORDPAD_CHECK_STATUSBAR 1033
00044 #define IDH_WORDPAD_CHECK_RULERBAR  1034
00045
00046 #define IDH_WORDPAD_TOPMARGIN       1035
00047 #define IDH_WORDPAD_BOTTOMMARGIN    1036
00048 #define IDH_WORDPAD_LEFTMARGIN      1037
00049 #define IDH_WORDPAD_RIGHTMARGIN     1038
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/stdafx.h Source File

  • controls
  • button

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/penwin.h Source File

  • ole
  • wordpad

penwin.h

Go to the documentation of this file.
00001 /****************************************************************************\
00002 *                                                                            *
00003 * PENWIN.H -  Pen Windows functions, types, and definitions                  *
00004 *                                                                            *
00005 *             Version 2.0                                                    *
00006 *                                                                            *
00007 *             Copyright (c) Microsoft Corp. All rights reserved.             *
00008 *                                                                            *
00009 *******************************************************************************
00010 *
00011 * The following symbols control inclusion of various parts of this file;
00012 * (indented identifiers are included by the previous main identifier):
00013 *
00014 * #define:         To prevent inclusion of:
00015 *
00016 * PENVER           Pen Windows version number (0x0200).  To exclude
00017 *                   definitions introduced in version 2.0 (or above)
00018 *                   #define PENVER 0x0100 before #including <penwin.h>
00019 *
00020 * NOPENALC         Alphabet Code definitions and macros
00021 * NOPENAPPS        Pen Applications: Screen Keyboard
00022 * NOPENCTL         H/BEDIT, IEDIT, and pen-enabled USER controls, including:
00023 *   NOPENBEDIT      : Boxed Edit Control
00024 *   NOPENIEDIT      : Ink Edit Control
00025 *   NOPENHEDIT      : (H)Edit control
00026 * NOPENDATA        PenData APIs and definitions
00027 * NOPENDICT        Dictionary support
00028 * NOPENDRIVER      Pen Driver definitions, incl OEM
00029 * NOPENHRC         Handwriting Recognizer APIs and definitions
00030 * NOPENINKPUT      Inking and Input APIs and definitions
00031 * NOPENMISC        Miscellaneous Info and Utility APIs and definitions
00032 * NOPENMSGS        Pen Messages and definitions
00033 * NOPENNLS         National Language Support
00034 * NOPENRC1         Recognition Context APIs and definitions (1.0)
00035 * NOPENRES         Pen resources, including:
00036 *   NOPENBMP        : Pen-related bitmaps
00037 *   NOPENCURS       : Pen-related cursors
00038 * NOPENTARGET      Targeting APIs and definitions
00039 * NOPENVIRTEVENT   Virtual Event layer APIs
00040 *
00041 * _WIN32           non-Win32 components, subincludes:
00042 *                   : NOPENAPPS, NOPENDICT, NOPENRC1, NOPENVIRTEVENT
00043 *
00044 * "FBC" in the comments means that the feature exists only for
00045 * backward compatibility. It should not be used by new applications.
00046 \****************************************************************************/
00047
00048 #ifndef _INC_PENWIN
00049 #define _INC_PENWIN
00050
00051 #include <windows.h>
00052
00053 #ifndef _WIN32
00054 #ifndef RC_INVOKED
00055 #pragma pack(1)
00056 #endif /* RC_INVOKED */
00057 #endif //!_WIN32
00058
00059 #ifdef __cplusplus
00060 extern "C" {
00061 #endif /* __cplusplus */
00062
00063 #ifndef PENVER      /* may be pre-defined; otherwise assume version 2.0 */
00064     #define PENVER  0x0200
00065 #endif //!PENVER
00066
00067 #ifdef _WIN32
00068     #define NOPENAPPS
00069     #define NOPENDICT
00070     #define NOPENRC1
00071     #define NOPENVIRTEVENT
00072     #define NOPENAPIFUN
00073 #endif //_WIN32
00074
00075 #ifndef NOPENAPPS   // not available in WIN32
00076 #ifndef RC_INVOKED
00077     #include <skbapi.h>
00078 #endif /* !RC_INVOKED */
00079 #endif /*!NOPENAPPS */
00080
00081 // other subsets:
00082
00083 #ifdef NOPENCTL
00084     #define NOPENBEDIT
00085     #define NOPENIEDIT
00086 #endif /* NOPENCTL */
00087
00088 #ifdef NOPENRES
00089     #define NOPENBMP
00090     #define NOPENCURS
00091 #endif /* NOPENRES */
00092
00093 //////////////////////////////////////////////////////////////////////////////
00094 /****** Definitions 1: for everything including RC compiler *****************/
00095
00096 //---------------------------------------------------------------------------
00097 #ifndef NOPENALC
00098
00099 // Enabled Alphabet:
00100 #define ALC_DEFAULT          0x00000000L // nothing
00101 #define ALC_LCALPHA          0x00000001L // a..z
00102 #define ALC_UCALPHA          0x00000002L // A..Z
00103 #define ALC_NUMERIC          0x00000004L // 0..9
00104 #define ALC_PUNC             0x00000008L // !-;`"?()&.,; and backslash
00105 #define ALC_MATH             0x00000010L // %^*()-+={}<>,/.
00106 #define ALC_MONETARY         0x00000020L // ,.$ or local
00107 #define ALC_OTHER            0x00000040L // @#|_~[]
00108 #define ALC_ASCII            0x00000080L // restrict to 7-bit chars 20..7f
00109 #define ALC_WHITE            0x00000100L // white space
00110 #define ALC_NONPRINT         0x00000200L // sp tab ret ctrl glyphs
00111 #define ALC_DBCS             0x00000400L // allow DBCS variety of SBCS
00112 #define ALC_JIS1             0x00000800L // kanji JPN, ShiftJIS 1 only
00113 #define ALC_GESTURE          0x00004000L // gestures
00114 #define ALC_USEBITMAP        0x00008000L // use rc.rgbfAlc to enable chars
00115 #define ALC_HIRAGANA         0x00010000L // hiragana JPN
00116 #define ALC_KATAKANA         0x00020000L // katakana JPN
00117 #define ALC_KANJI            0x00040000L // kanji JPN, ShiftJIS 1+2+3
00118 #define ALC_GLOBALPRIORITY   0x10000000L
00119 #define ALC_OEM              0x0FF80000L // OEM recognizer-specific
00120 #define ALC_RESERVED         0xE0003000L // avail for future use
00121 #define ALC_NOPRIORITY       0x00000000L // for alcPriority == none
00122
00123 #define ALC_ALPHA\
00124     (ALC_LCALPHA | ALC_UCALPHA)                                // 0x00000003L
00125
00126 #define ALC_ALPHANUMERIC\
00127     (ALC_ALPHA | ALC_NUMERIC)                                  // 0x00000007L
00128
00129 #define ALC_SYSMINIMUM\
00130     (ALC_ALPHANUMERIC | ALC_PUNC | ALC_WHITE | ALC_GESTURE)    // 0x0000410FL
00131
00132 #define ALC_ALL\
00133     (ALC_SYSMINIMUM | ALC_MATH | ALC_MONETARY\
00134     | ALC_OTHER | ALC_NONPRINT)                                // 0x0000437FL
00135
00136 #define ALC_KANJISYSMINIMUM\
00137     (ALC_SYSMINIMUM | ALC_HIRAGANA | ALC_KATAKANA | ALC_JIS1)  // 0x0003490FL
00138
00139 #define ALC_KANJIALL\
00140     (ALC_ALL | ALC_HIRAGANA | ALC_KATAKANA | ALC_KANJI)        // 0x0007437FL
00141
00142 #endif /*!NOPENALC */
00143
00144 //---------------------------------------------------------------------------
00145 #ifndef NOPENBEDIT
00146 // box edit styles:
00147 #define BXS_NONE             0x0000U // none
00148 #define BXS_RECT             0x0001U // use rectangle instead of cusp
00149 #define BXS_BOXCROSS         0x0004U // use cross at box center
00150 #define BXS_MASK             0x0007U // mask for above
00151
00152 #endif /*!NOPENBEDIT */
00153
00154 //---------------------------------------------------------------------------
00155 #ifndef NOPENBMP
00156
00157 // Public Bitmaps :
00158 #define OBM_SKBBTNUP            32767
00159 #define OBM_SKBBTNDOWN          32766
00160 #define OBM_SKBBTNDISABLED      32765
00161
00162 #define OBM_ZENBTNUP            32764
00163 #define OBM_ZENBTNDOWN          32763
00164 #define OBM_ZENBTNDISABLED      32762
00165
00166 #define OBM_HANBTNUP            32761
00167 #define OBM_HANBTNDOWN          32760
00168 #define OBM_HANBTNDISABLED      32759
00169
00170 #define OBM_KKCBTNUP            32758
00171 #define OBM_KKCBTNDOWN          32757
00172 #define OBM_KKCBTNDISABLED      32756
00173
00174 #define OBM_SIPBTNUP            32755
00175 #define OBM_SIPBTNDOWN          32754
00176 #define OBM_SIPBTNDISABLED      32753
00177
00178 #define OBM_PTYBTNUP            32752
00179 #define OBM_PTYBTNDOWN          32751
00180 #define OBM_PTYBTNDISABLED      32750
00181 #endif /*!NOPENBMP */
00182
00183 //---------------------------------------------------------------------------
00184 #ifndef NOPENCURS
00185 // Default pen cursor to indicate writing, points northwest
00186 #define IDC_PEN         MAKEINTRESOURCE(32631)
00187
00188 // alternate select cursor: upsidedown standard arrow, points southeast
00189 #define IDC_ALTSELECT   MAKEINTRESOURCE(32501)
00190
00191 #endif /*!NOPENCURS */
00192
00193 //---------------------------------------------------------------------------
00194 #ifndef NOPENHRC
00195 // special SYV values:
00196 #define SYV_NULL                0x00000000L
00197 #define SYV_UNKNOWN             0x00000001L
00198 #define SYV_EMPTY               0x00000003L
00199 #define SYV_BEGINOR             0x00000010L
00200 #define SYV_ENDOR               0x00000011L
00201 #define SYV_OR                  0x00000012L
00202 #define SYV_SOFTNEWLINE         0x00000020L
00203 #define SYV_SPACENULL           0x00010000L   // SyvCharacterToSymbol('\0')
00204
00205 // SYV values for gestures:
00206 #define SYV_SELECTFIRST         0x0002FFC0L   // . means circle in following
00207 #define SYV_LASSO               0x0002FFC1L   // lasso o-tap
00208 #define SYV_SELECTLEFT          0x0002FFC2L   // no glyph
00209 #define SYV_SELECTRIGHT         0x0002FFC3L   // no glyph
00210 #define SYV_SELECTLAST          0x0002FFCFL   // 16 SYVs reserved for selection
00211
00212 #define SYV_CLEARCHAR           0x0002FFD2L   // d.
00213 #define SYV_HELP                0x0002FFD3L   // no glyph
00214 #define SYV_KKCONVERT           0x0002FFD4L   // k.
00215 #define SYV_CLEAR               0x0002FFD5L   // d.
00216 #define SYV_INSERT              0x0002FFD6L   // ^.
00217 #define SYV_CONTEXT             0x0002FFD7L   // m.
00218 #define SYV_EXTENDSELECT        0x0002FFD8L   // no glyph
00219 #define SYV_UNDO                0x0002FFD9L   // u.
00220 #define SYV_COPY                0x0002FFDAL   // c.
00221 #define SYV_CUT                 0x0002FFDBL   // x.
00222 #define SYV_PASTE               0x0002FFDCL   // p.
00223 #define SYV_CLEARWORD           0x0002FFDDL   // no glyph
00224 #define SYV_USER                0x0002FFDEL   // reserved
00225 #define SYV_CORRECT             0x0002FFDFL   // check.
00226
00227 #define SYV_BACKSPACE           0x00020008L   // no glyph
00228 #define SYV_TAB                 0x00020009L   // t.
00229 #define SYV_RETURN              0x0002000DL   // n.
00230 #define SYV_SPACE               0x00020020L   // s.
00231
00232 // Application specific gestures, Circle a-z and Circle A-Z:
00233 #define SYV_APPGESTUREMASK      0x00020000L
00234 #define SYV_CIRCLEUPA           0x000224B6L   // map into Unicode space
00235 #define SYV_CIRCLEUPZ           0x000224CFL   //  for circled letters
00236 #define SYV_CIRCLELOA           0x000224D0L
00237 #define SYV_CIRCLELOZ           0x000224E9L
00238
00239 // SYV definitions for shapes:
00240 #define SYV_SHAPELINE           0x00040001L
00241 #define SYV_SHAPEELLIPSE        0x00040002L
00242 #define SYV_SHAPERECT           0x00040003L
00243 #define SYV_SHAPEMIN            SYV_SHAPELINE // alias
00244 #define SYV_SHAPEMAX            SYV_SHAPERECT // alias
00245
00246 // SYV classes:
00247 #define SYVHI_SPECIAL           0
00248 #define SYVHI_ANSI              1
00249 #define SYVHI_GESTURE           2
00250 #define SYVHI_KANJI             3
00251 #define SYVHI_SHAPE             4
00252 #define SYVHI_UNICODE           5
00253 #define SYVHI_VKEY              6
00254 #endif //!NOPENHRC
00255
00256 //---------------------------------------------------------------------------
00257 #ifndef NOPENIEDIT
00258
00259 // IEdit Pop-up Menu Command Items
00260 #define IEM_UNDO                1          // Undo
00261 #define IEM_CUT                 2          // Cut
00262 #define IEM_COPY                3          // Copy
00263 #define IEM_PASTE               4          // Paste
00264 #define IEM_CLEAR               5          // Clear
00265 #define IEM_SELECTALL           6          // Select All Strokes
00266 #define IEM_ERASE               7          // Use Eraser
00267 #define IEM_PROPERTIES          8          // DoProperties
00268 #define IEM_LASSO               9          // Use Lasso
00269 #define IEM_RESIZE              10         // Resize
00270
00271 #define IEM_USER                    100    // first menu item# available to app
00272
00273 // IEdit Style Attributes
00274 #define IES_BORDER              0x0001   // ctl has a border
00275 #define IES_HSCROLL             0x0002   // ctl is horizontally scrollable
00276 #define IES_VSCROLL             0x0004   // ctl is vertically scrollable
00277 #define IES_OWNERDRAW           0x0008   // ctl will be drawn by parent window
00278
00279 #endif /*!NOPENIEDIT */
00280
00281 #ifndef RC_INVOKED  // ... rest of file of no interest to rc compiler
00282 //////////////////////////////////////////////////////////////////////////////
00283
00284 /****** Definitions 2: RC compiler excluded ********************************/
00285
00286 //---------------------------------------------------------------------------
00287 #ifndef NOPENDATA
00288
00289 // PenData API constants:
00290
00291 // ANIMATEINFO callback options:
00292 #define AI_CBSTROKE             0xFFFF  // Animate callback after every stroke
00293
00294 // ANIMATEINFO options:
00295 #define AI_SKIPUPSTROKES        0x0001  // ignore upstrokes in animation
00296
00297 // CompressPenData() API options:
00298 #define CMPD_COMPRESS           0x0001
00299 #define CMPD_DECOMPRESS         0x0002
00300
00301 // CreatePenDataRegion types:
00302 #define CPDR_BOX                1       // bounding box
00303 #define CPDR_LASSO              2       // lasso
00304
00305 // CreatePenData (CPD) and Pen Hardware (PHW) Flags;
00306 // The order of PHW flags is important:
00307 #define CPD_DEFAULT             0x047F  // CPD_TIME | PHW_ALL
00308 #define CPD_USERBYTE            0x0100  // alloc 8 bits/stroke
00309 #define CPD_USERWORD            0x0200  // alloc 16 bits/stroke
00310 #define CPD_USERDWORD           0x0300  // alloc 32 bits/stroke
00311 #define CPD_TIME                0x0400  // maintain abs time info per stroke
00312
00313 // DrawPenDataEx() flags/options:
00314 #define DPD_HDCPEN              0x0001  // use pen selected in HDC
00315 #define DPD_DRAWSEL             0x0002  // draw the selection
00316
00317 // ExtractPenDataPoints options (EPDP_xx):
00318 #define EPDP_REMOVE             0x0001  // Remove points from the pendata
00319
00320 // ExtractPenDataStrokes options and modifiers (EPDS_xx):
00321 #define EPDS_SELECT             1       // selected strokes
00322 #define EPDS_STROKEINDEX        2       // index
00323 #define EPDS_USER               3       // user-specific value
00324 #define EPDS_PENTIP             4       // complete pentip
00325 #define EPDS_TIPCOLOR           5       // pentip color
00326 #define EPDS_TIPWIDTH           6       // pentip width
00327 #define EPDS_TIPNIB             7       // pentip nib style
00328 #define EPDS_INKSET             8       // inkset match
00329
00330 #define EPDS_EQ                 0x0000  // default: same as
00331 #define EPDS_LT                 0x0010  // all strokes less than
00332 #define EPDS_GT                 0x0020  // all strokes greater than
00333 #define EPDS_NOT                0x0040  // all strokes not matching
00334 #define EPDS_NE                 0x0040  // alias
00335 #define EPDS_GTE                0x0050  // alias for NOT LT
00336 #define EPDS_LTE                0x0060  // alias for NOT GT
00337
00338 #define EPDS_REMOVE             0x8000  // remove matching strokes from source
00339
00340 // GetPenDataAttributes options (GPA_xx):
00341 #define GPA_MAXLEN              1   // length of longest stroke
00342 #define GPA_POINTS              2   // total number of points
00343 #define GPA_PDTS                3   // PDTS_xx bits
00344 #define GPA_RATE                4   // get sampling rate
00345 #define GPA_RECTBOUND           5   // bounding rect of all points
00346 #define GPA_RECTBOUNDINK        6   // ditto, adj for fat ink
00347 #define GPA_SIZE                7   // size of pendata in bytes
00348 #define GPA_STROKES             8   // total number of strokes
00349 #define GPA_TIME                9   // absolute time at creation of pendata
00350 #define GPA_USER                10  // number of user bytes available: 0, 1, 2, 4
00351 #define GPA_VERSION             11  // version number of pendata
00352
00353 // GetStrokeAttributes options (GSA_xx):
00354 #define GSA_PENTIP              1   // get stroke pentip (color, width, nib)
00355 #define GSA_PENTIPCLASS         2   // same as GSA_PENTIP
00356 #define GSA_USER                3   // get stroke user value
00357 #define GSA_USERCLASS           4   // get stroke's class user value
00358 #define GSA_TIME                5   // get time of stroke
00359 #define GSA_SIZE                6   // get size of stroke in points and bytes
00360 #define GSA_SELECT              7   // get selection status of stroke
00361 #define GSA_DOWN                8   // get up/down state of stroke
00362 #define GSA_RECTBOUND           9   // get the bounding rectangle of the stroke
00363
00364 // GetStrokeTableAttributes options (GSA_xx):
00365 #define GSA_PENTIPTABLE         10  // get table-indexed pentip
00366 #define GSA_SIZETABLE           11  // get count of Stroke Class Table entries
00367 #define GSA_USERTABLE           12  // get table-indexed user value
00368
00369 #ifndef IX_END
00370 #define IX_END                  0xFFFF  // to or past last available index
00371 #endif //!IX_END
00372
00373 // PenTip:
00374 #define PENTIP_NIBDEFAULT       ((BYTE)0)       // default pen tip nib style
00375 #define PENTIP_HEIGHTDEFAULT    ((BYTE)0)       // default pen tip nib height
00376 #define PENTIP_OPAQUE           ((BYTE)0xFF)    // default opaque ink
00377 #define PENTIP_HILITE           ((BYTE)0x80)
00378 #define PENTIP_TRANSPARENT      ((BYTE)0)
00379
00380 // General PenData API return values (PDR_xx):
00381 #define PDR_NOHIT               3       // hit test failed
00382 #define PDR_HIT                 2       // hit test succeeded
00383 #define PDR_OK                  1       // success
00384 #define PDR_CANCEL              0       // callback cancel or impasse
00385
00386 #define PDR_ERROR               (-1)    // parameter or unspecified error
00387 #define PDR_PNDTERR             (-2)    // bad pendata
00388 #define PDR_VERSIONERR          (-3)    // pendata version error
00389 #define PDR_COMPRESSED          (-4)    // pendata is compressed
00390 #define PDR_STRKINDEXERR        (-5)    // stroke index error
00391 #define PDR_PNTINDEXERR         (-6)    // point index error
00392 #define PDR_MEMERR              (-7)    // memory error
00393 #define PDR_INKSETERR           (-8)    // bad inkset
00394 #define PDR_ABORT               (-9)    // pendata has become invalid, e.g.
00395 #define PDR_NA                  (-10)   // option not available (pw kernel)
00396
00397 #define PDR_USERDATAERR         (-16)   // user data error
00398 #define PDR_SCALINGERR          (-17)   // scale error
00399 #define PDR_TIMESTAMPERR        (-18)   // timestamp error
00400 #define PDR_OEMDATAERR          (-19)   // OEM data error
00401 #define PDR_SCTERR              (-20)   // SCT error (full)
00402
00403 // PenData Scaling (PDTS):
00404 #define PDTS_LOMETRIC           0       // 0.01mm
00405 #define PDTS_HIMETRIC           1       // 0.001mm
00406 #define PDTS_HIENGLISH          2       // 0.001"
00407 #define PDTS_STANDARDSCALE      2       // PDTS_HIENGLISH   alias
00408 #define PDTS_DISPLAY            3       // display pixel
00409 #define PDTS_ARBITRARY          4       // app-specific scaling
00410 #define PDTS_SCALEMASK          0x000F  // scaling values in low nibble
00411
00412 // CompactPenData() API trim options:
00413 #define PDTT_DEFAULT            0x0000
00414 #define PDTT_PENINFO            0x0100
00415 #define PDTT_UPPOINTS           0x0200
00416 #define PDTT_OEMDATA            0x0400
00417 #define PDTT_COLLINEAR          0x0800
00418 #define PDTT_COLINEAR           0x0800  // alt sp alias
00419 #define PDTT_DECOMPRESS         0x4000  // decompress the data
00420 #define PDTT_COMPRESS           0x8000
00421 #define PDTT_ALL                0x0F00  // PENINFO|UPPOINTS|OEMDATA|COLLINEAR
00422
00423 #define PHW_NONE                0x0000  // no OEMdata
00424 #define PHW_PRESSURE            0x0001  // report pressure in OEMdata if avail
00425 #define PHW_HEIGHT              0x0002  // ditto height
00426 #define PHW_ANGLEXY             0x0004  // ditto xy angle
00427 #define PHW_ANGLEZ              0x0008  // ditto z angle
00428 #define PHW_BARRELROTATION      0x0010  // ditto barrel rotation
00429 #define PHW_OEMSPECIFIC         0x0020  // ditto OEM-specific value
00430 #define PHW_PDK                 0x0040  // report per-point PDK_xx in OEM data
00431 #define PHW_ALL                 0x007F  // report everything
00432
00433 // compact pen data trim options: matches PDTT_values (see above)
00434 #define PDTS_COMPRESS2NDDERIV   0x0010  // compress using 2nd deriv
00435 #define PDTS_COMPRESSMETHOD     0x00F0  // sum of compress method flags
00436 #define PDTS_NOPENINFO          0x0100  // removes PENINFO struct from header
00437 #define PDTS_NOUPPOINTS         0x0200  // remove up pts
00438 #define PDTS_NOOEMDATA          0x0400  // remove OEM data
00439 #define PDTS_NOCOLLINEAR        0x0800  // remove successive identical pts
00440 #define PDTS_NOCOLINEAR         0x0800  // alt sp alias
00441 #define PDTS_NOTICK             0x1000  // remove timing info (2.0)
00442 #define PDTS_NOUSER             0x2000  // remove user info (2.0)
00443 #define PDTS_NOEMPTYSTROKES     0x4000  // remove empty strokes (2.0)
00444 #define PDTS_COMPRESSED         0x8000  // perform lossless compression
00445
00446 // SetStrokeAttributes options (SSA_xx):
00447 #define SSA_PENTIP              1       // set stroke tip (color, width, nib)
00448 #define SSA_PENTIPCLASS         2       // set stroke's class pentip
00449 #define SSA_USER                3       // set stroke user value
00450 #define SSA_USERCLASS           4       // set stroke's class user value
00451 #define SSA_TIME                5       // set time of stroke
00452 #define SSA_SELECT              6       // set selection status of stroke
00453 #define SSA_DOWN                7       // set up/down state of stroke
00454
00455 // SetStrokeTableAttributes options (SSA_xx):
00456 #define SSA_PENTIPTABLE         8       // set table-indexed pentip
00457 #define SSA_USERTABLE           9       // set table-indexed user value
00458
00459 // PenTip flag bits:
00460 #define TIP_ERASECOLOR          1       // erase specific color pentip.rgb
00461
00462 // TrimPenData() API options:
00463 #define TPD_RECALCSIZE          0x0000  // no trim, used for resize calc
00464 #define TPD_USER                0x0080  // per-stroke user info
00465 #define TPD_TIME                0x0100  // per-stroke timing info
00466 #define TPD_UPPOINTS            0x0200  // x-y data up points
00467 #define TPD_COLLINEAR           0x0400  // colinear and coincident points
00468 #define TPD_COLINEAR            0x0400  // alt sp alias
00469 #define TPD_PENINFO             0x0800  // PenInfo struct and all OEM
00470 #define TPD_PHW                 0x1000  // OEM & pdk except stroke tick or user
00471 #define TPD_OEMDATA             0x1000  // ditto
00472 #define TPD_EMPTYSTROKES        0x2000  // strokes with zero points
00473 #define TPD_EVERYTHING          0x3FFF  // everything (incl PHW_xx) except down pts
00474
00475 #endif /*!NOPENDATA */
00476
00477 //---------------------------------------------------------------------------
00478 #ifndef NOPENDICT   // not available in WIN32
00479
00480 // Dictionary:
00481 #define cbDictPathMax           255
00482 #define DIRQ_QUERY              1
00483 #define DIRQ_DESCRIPTION        2
00484 #define DIRQ_CONFIGURE          3
00485 #define DIRQ_OPEN               4
00486 #define DIRQ_CLOSE              5
00487 #define DIRQ_SETWORDLISTS       6
00488 #define DIRQ_STRING             7
00489 #define DIRQ_SUGGEST            8
00490 #define DIRQ_ADD                9
00491 #define DIRQ_DELETE             10
00492 #define DIRQ_FLUSH              11
00493 #define DIRQ_RCCHANGE           12
00494 #define DIRQ_SYMBOLGRAPH        13
00495 #define DIRQ_INIT               14
00496 #define DIRQ_CLEANUP            15
00497 #define DIRQ_COPYRIGHT          16
00498 #define DIRQ_USER               4096
00499 #endif /*!NOPENDICT */
00500
00501 //---------------------------------------------------------------------------
00502 #ifndef NOPENDRIVER
00503
00504 // Pen driver:
00505 #define BITPENUP                0x8000
00506
00507 // Pen Driver messages:
00508 #define DRV_SetPenDriverEntryPoints     DRV_RESERVED+1
00509 #define DRV_SetEntryPoints              DRV_RESERVED+1  // alias
00510 #define DRV_RemovePenDriverEntryPoints  DRV_RESERVED+2
00511 #define DRV_RemoveEntryPoints           DRV_RESERVED+2  // alias
00512 #define DRV_SetPenSamplingRate          DRV_RESERVED+3
00513 #define DRV_SetPenSamplingDist          DRV_RESERVED+4
00514 #define DRV_GetName                     DRV_RESERVED+5
00515 #define DRV_GetVersion                  DRV_RESERVED+6
00516 #define DRV_GetPenInfo                  DRV_RESERVED+7
00517 #define DRV_PenPlayStart                DRV_RESERVED+8
00518 #define DRV_PenPlayBack                 DRV_RESERVED+9
00519 #define DRV_PenPlayStop                 DRV_RESERVED+10
00520 #define DRV_GetCalibration              DRV_RESERVED+11
00521 #define DRV_SetCalibration              DRV_RESERVED+12
00522 #define DRV_Reserved1                   DRV_RESERVED+13
00523 #define DRV_Reserved2                   DRV_RESERVED+14
00524 #define DRV_Query                       DRV_RESERVED+15
00525 #define DRV_GetPenSamplingRate          DRV_RESERVED+16
00526 #define DRV_Calibrate                   DRV_RESERVED+17
00527
00528 // Pen Driver Playback constants:
00529 #define PLAY_VERSION_10_DATA 0
00530 #define PLAY_VERSION_20_DATA 1
00531
00532 // Pen Driver return values:
00533 #define DRV_FAILURE             0x00000000
00534 #define DRV_SUCCESS             0x00000001
00535 #define DRV_BADPARAM1           0xFFFFFFFF
00536 #define DRV_BADPARAM2           0xFFFFFFFE
00537 #define DRV_BADSTRUCT           0xFFFFFFFD
00538
00539 // Pen Driver register messages flags:
00540 #define PENREG_DEFAULT          0x00000002
00541 #define PENREG_WILLHANDLEMOUSE  0x00000001
00542
00543 #define MAXOEMDATAWORDS         6             // rgwOemData[MAXOEMDATAWORDS]
00544
00545 // Pen Collection Mode termination conditions:
00546 // (note update doc for PCMINFO struct if change these)
00547 #define PCM_PENUP               0x00000001L   // stop on penup
00548 #define PCM_RANGE               0x00000002L   // stop on leaving range
00549 #define PCM_INVERT              0x00000020L   // stop on tap of opposite end
00550 #define PCM_RECTEXCLUDE         0x00002000L   // click in exclude rect
00551 #define PCM_RECTBOUND           0x00004000L   // click outside bounds rect
00552 #define PCM_TIMEOUT             0x00008000L   // no activity for timeout ms
00553 // new for 2.0:
00554 #define PCM_RGNBOUND            0x00010000L   // click outside bounding region
00555 #define PCM_RGNEXCLUDE          0x00020000L   // click in exclude region
00556 #define PCM_DOPOLLING           0x00040000L   // polling mode
00557 #define PCM_TAPNHOLD            0x00080000L   // check for Tap And Hold
00558 #define PCM_ADDDEFAULTS         RC_LDEFAULTFLAGS /* 0x80000000L */
00559
00560 // Pen Device Capabilities:
00561 #define PDC_INTEGRATED          0x00000001L   // display==digitizer
00562 #define PDC_PROXIMITY           0x00000002L   // detect non-contacting pen
00563 #define PDC_RANGE               0x00000004L   // event on out-of-range
00564 #define PDC_INVERT              0x00000008L   // pen opposite end detect
00565 #define PDC_RELATIVE            0x00000010L   // pen driver coords
00566 #define PDC_BARREL1             0x00000020L   // barrel button 1 present
00567 #define PDC_BARREL2             0x00000040L   // ditto 2
00568 #define PDC_BARREL3             0x00000080L   // ditto 3
00569
00570 // Pen Driver Kit states:
00571 #define PDK_NULL                0x0000  // default to no flags set
00572 #define PDK_UP                  0x0000  // PDK_NULL alias
00573 #define PDK_DOWN                0x0001  // pentip switch ON due to contact
00574 #define PDK_BARREL1             0x0002  // barrel1 switch depressed
00575 #define PDK_BARREL2             0x0004  // ditto 2
00576 #define PDK_BARREL3             0x0008  // ditto 3
00577 #define PDK_SWITCHES            0x000f  // sum of down + barrels 1,2,3
00578 #define PDK_TRANSITION          0x0010  // set by GetPenHwData
00579 #define PDK_UNUSED10            0x0020
00580 #define PDK_UNUSED20            0x0040
00581 #define PDK_INVERTED            0x0080  // other end of pen used as tip
00582 #define PDK_PENIDMASK           0x0F00  // bits 8..11 physical pen id (0..15)
00583 #define PDK_UNUSED1000          0x1000
00584 #define PDK_INKSTOPPED          0x2000  // Inking stopped
00585 #define PDK_OUTOFRANGE          0x4000  // pen left range (OEM data invalid)
00586 #define PDK_DRIVER              0x8000  // pen (not mouse) event
00587
00588 #define PDK_TIPMASK             0x0001  // mask for testing PDK_DOWN
00589
00590 // OEM-specific values for Pen Driver:
00591 #define PDT_NULL                0
00592 #define PDT_PRESSURE            1       // pressure supported
00593 #define PDT_HEIGHT              2       // height above tablet
00594 #define PDT_ANGLEXY             3       // xy (horiz) angle supported
00595 #define PDT_ANGLEZ              4       // z (vert) angle supported
00596 #define PDT_BARRELROTATION      5       // barrel is rotated
00597 #define PDT_OEMSPECIFIC         16      // max
00598
00599 // Denotes the ID of the current packet
00600 #define PID_CURRENT             (UINT)(-1)
00601
00602 // Recognition and GetPenHwData Returns:
00603 #define REC_OEM                 (-1024) // first recognizer-specific debug val
00604 #define REC_LANGUAGE            (-48)   // unsupported language field
00605 #define REC_GUIDE               (-47)   // invalid GUIDE struct
00606 #define REC_PARAMERROR          (-46)   // bad param
00607 #define REC_INVALIDREF          (-45)   // invalid data ref param
00608 #define REC_RECTEXCLUDE         (-44)   // invalid rect
00609 #define REC_RECTBOUND           (-43)   // invalid rect
00610 #define REC_PCM                 (-42)   // invalid lPcm parameter
00611 #define REC_RESULTMODE          (-41)
00612 #define REC_HWND                (-40)   // invalid window to send results to
00613 #define REC_ALC                 (-39)   // invalid enabled alphabet
00614 #define REC_ERRORLEVEL          (-38)   // invalid errorlevel
00615 #define REC_CLVERIFY            (-37)   // invalid verification level
00616 #define REC_DICT                (-36)   // invalid dict params
00617 #define REC_HREC                (-35)   // invalid recognition handle
00618 #define REC_BADEVENTREF         (-33)   // invalid wEventRef
00619 #define REC_NOCOLLECTION        (-32)   // collection mode not set
00620 #define REC_DEBUG               (-32)   // beginning of debug values
00621 #define REC_POINTEREVENT        (-31)   // tap or tap&hold event
00622 #define REC_BADHPENDATA         (-9)    // invalid hpendata header or locking
00623 #define REC_OOM                 (-8)    // out of memory error
00624 #define REC_NOINPUT             (-7)    // no data collected before termination
00625 #define REC_NOTABLET            (-6)    // tablet not physically present
00626 #define REC_BUSY                (-5)    // another task is using recognizer
00627 #define REC_BUFFERTOOSMALL      (-4)    // ret by GetPenHwEventData()
00628 #define REC_ABORT               (-3)    // recog stopped by EndPenCollection()
00629 #define REC_NA                  (-2)    // function not available
00630 #define REC_OVERFLOW            (-1)    // data overflow
00631 #define REC_OK                  0       // interrim completion
00632 #define REC_TERMBOUND           1       // hit outside bounding rect
00633 #define REC_TERMEX              2       // hit inside exclusion rect
00634 #define REC_TERMPENUP           3       // pen up
00635 #define REC_TERMRANGE           4       // pen left proximity
00636 #define REC_TERMTIMEOUT         5       // no writing for timeout ms
00637 #define REC_DONE                6       // normal completion
00638 #define REC_TERMOEM             512     // first recognizer-specific retval
00639
00640 #endif /*!NOPENDRIVER */
00641
00642 //---------------------------------------------------------------------------
00643 #ifndef NOPENHRC
00644
00645 // Handwriting Recognizer:
00646
00647 // GetResultsHRC options:
00648 #define GRH_ALL                 0       // get all results
00649 #define GRH_GESTURE             1       // get only gesture results
00650 #define GRH_NONGESTURE          2       // get all but gesture results
00651
00652 // Gesture sets for EnableGestureSetHRC (bit flags):
00653 #define GST_SEL                 0x00000001L   // sel & lasso
00654 #define GST_CLIP                0x00000002L   // cut copy paste
00655 #define GST_WHITE               0x00000004L   // sp tab ret
00656 #define GST_KKCONVERT           0x00000008L   // kkconvert
00657 #define GST_EDIT                0x00000010L   // insert correct undo clear
00658 #define GST_SYS                 0x00000017L   // all of the above
00659 #define GST_CIRCLELO            0x00000100L   // lowercase circle
00660 #define GST_CIRCLEUP            0x00000200L   // uppercase circle
00661 #define GST_CIRCLE              0x00000300L   // all circle
00662 #define GST_ALL                 0x00000317L   // all of the above
00663
00664 // General HRC API return values (HRCR_xx):
00665 #define HRCR_NORESULTS          4       // No possible results  to be found
00666 #define HRCR_COMPLETE           3       // finished recognition
00667 #define HRCR_GESTURE            2       // recognized gesture
00668 #define HRCR_OK                 1       // success
00669 #define HRCR_INCOMPLETE         0       // recognizer is processing input
00670 #define HRCR_ERROR              (-1)    // invalid param or unspecified error
00671 #define HRCR_MEMERR             (-2)    // memory error
00672 #define HRCR_INVALIDGUIDE       (-3)    // invalid GUIDE struct
00673 #define HRCR_INVALIDPNDT        (-4)    // invalid pendata
00674 #define HRCR_UNSUPPORTED        (-5)    // recognizer does not support feature
00675 #define HRCR_CONFLICT           (-6)    // training conflict
00676 #define HRCR_HOOKED             (-8)    // hookasaurus ate the result
00677
00678 // system wordlist for AddWordsHWL:
00679 #define HWL_SYSTEM              ((HWL)1)   // magic value means system wordlist
00680
00681 // inkset returns:
00682 #define ISR_ERROR               (-1)    // Memory or other error
00683 #define ISR_BADINKSET           (-2)    // bad source inkset
00684 #define ISR_BADINDEX            (-3)    // bad inkset index
00685
00686 #ifndef IX_END
00687 #define IX_END                  0xFFFF  // to or past last available index
00688 #endif //!IX_END
00689
00690 #define MAXHOTSPOT              8       // max number of hotspots possible
00691
00692 // ProcessHRC time constants:
00693 #define PH_MAX                  0xFFFFFFFFL   // recognize rest of ink
00694 #define PH_DEFAULT              0xFFFFFFFEL   // reasonable time
00695 #define PH_MIN                  0xFFFFFFFDL   // minimum time
00696
00697 // ResultsHookHRC options:
00698 #define RHH_STD                 0       // GetResultsHRC
00699 #define RHH_BOX                 1       // GetBoxResultsHRC
00700
00701 // SetWordlistCoercionHRC options:
00702 #define SCH_NONE                0       // turn off coercion
00703 #define SCH_ADVISE              1       // macro is hint only
00704 #define SCH_FORCE               2       // some result is forced from macro
00705
00706 // Symbol Context Insert Modes
00707 #define SCIM_INSERT             0       // insert
00708 #define SCIM_OVERWRITE          1       // overwrite
00709
00710 // SetResultsHookHREC options:
00711 #define SRH_HOOKALL             (HREC)1 // hook all recognizers
00712
00713 // SetInternationalHRC options:
00714 #define SSH_RD                  1       // to right and down (English)
00715 #define SSH_RU                  2       // to right and up
00716 #define SSH_LD                  3       // to left and down (Hebrew)
00717 #define SSH_LU                  4       // to left and up
00718 #define SSH_DL                  5       // down and to the left (Chinese)
00719 #define SSH_DR                  6       // down and to the right (Chinese)
00720 #define SSH_UL                  7       // up and to the left
00721 #define SSH_UR                  8       // up and to the right
00722
00723 #define SIH_ALLANSICHAR         1       // use all ANSI
00724
00725 // TrainHREC options:
00726 #define TH_QUERY                0       // query the user if conflict
00727 #define TH_FORCE                1       // ditto no query
00728 #define TH_SUGGEST              2       // abandon training if conflict
00729
00730 // Return values for WCR_TRAIN Function
00731 #define TRAIN_NONE              0x0000
00732 #define TRAIN_DEFAULT           0x0001
00733 #define TRAIN_CUSTOM            0x0002
00734 #define TRAIN_BOTH              (TRAIN_DEFAULT | TRAIN_CUSTOM)
00735
00736 // Control values for TRAINSAVE
00737 #define TRAIN_SAVE              0       // save changes that have been made
00738 #define TRAIN_REVERT            1       // discard changes that have been made
00739 #define TRAIN_RESET             2       // use factory settings
00740
00741 // ConfigRecognizer and ConfigHREC options:
00742 #define WCR_RECOGNAME           0       // ConfigRecognizer 1.0
00743 #define WCR_QUERY               1
00744 #define WCR_CONFIGDIALOG        2
00745 #define WCR_DEFAULT             3
00746 #define WCR_RCCHANGE            4
00747 #define WCR_VERSION             5
00748 #define WCR_TRAIN               6
00749 #define WCR_TRAINSAVE           7
00750 #define WCR_TRAINMAX            8
00751 #define WCR_TRAINDIRTY          9
00752 #define WCR_TRAINCUSTOM         10
00753 #define WCR_QUERYLANGUAGE       11
00754 #define WCR_USERCHANGE          12
00755
00756 // ConfigHREC options:
00757 #define WCR_PWVERSION           13      // ver of PenWin recognizer supports
00758 #define WCR_GETALCPRIORITY      14      // get recognizer's ALC priority
00759 #define WCR_SETALCPRIORITY      15      // set recognizer's ALC priority
00760 #define WCR_GETANSISTATE        16      // get ALLANSICHAR state
00761 #define WCR_SETANSISTATE        17      // set ALLANSICHAR if T
00762 #define WCR_GETHAND             18      // get writing hand
00763 #define WCR_SETHAND             19      // set writing hand
00764 #define WCR_GETDIRECTION        20      // get writing direction
00765 #define WCR_SETDIRECTION        21      // set writing direction
00766 #define WCR_INITRECOGNIZER      22      // init recognizer and set user name
00767 #define WCR_CLOSERECOGNIZER     23      // close recognizer
00768
00769 #define WCR_PRIVATE             1024
00770
00771 // sub-functions of WCR_USERCHANGE
00772 #define CRUC_NOTIFY             0       // user name change
00773 #define CRUC_REMOVE             1       // user name deleted
00774
00775 // Word List Types:
00776 #define WLT_STRING              0       // one string
00777 #define WLT_STRINGTABLE         1       // array of strings
00778 #define WLT_EMPTY               2       // empty wordlist
00779 #define WLT_WORDLIST            3       // handle to a wordlist
00780
00781 #endif /*!NOPENHRC */
00782
00783 //---------------------------------------------------------------------------
00784 #ifndef NOPENIEDIT
00785
00786 // IEdit Background Options
00787 #define IEB_DEFAULT             0       // default (use COLOR_WINDOW)
00788 #define IEB_BRUSH               1       // paint background with brush
00789 #define IEB_BIT_UL              2       // bitmap, upper-left aligned
00790 #define IEB_BIT_CENTER          3       // bitmap, centered in control
00791 #define IEB_BIT_TILE            4       // bitmap, tiled repeatedly in ctl
00792 #define IEB_BIT_STRETCH         5       // bitmap, stretched to fit ctl
00793 #define IEB_OWNERDRAW           6       // parent window will draw background
00794
00795 // IEdit Drawing Options
00796 #define IEDO_NONE               0x0000  // no drawing
00797 #define IEDO_FAST               0x0001  // ink drawn as fast as possible (def)
00798 #define IEDO_SAVEUPSTROKES      0x0002  // save upstrokes
00799 #define IEDO_RESERVED           0xFFFC  // reserved bits
00800
00801 // IEdit Input Options
00802 #define IEI_MOVE                0x0001  // move ink into ctl
00803 #define IEI_RESIZE              0x0002  // resize ink to fit within ctl
00804 #define IEI_CROP                0x0004  // discard ink outside of ctl
00805 #define IEI_DISCARD             0x0008  // discard all ink if any outside ctl
00806 #define IEI_RESERVED            0xFFF0  // reserved
00807
00808 // IEdit IE_GETINK options
00809 #define IEGI_ALL                0x0000  // get all ink from control
00810 #define IEGI_SELECTION          0x0001  // get selected ink from control
00811
00812 // IEdit IE_SETMODE/IE_GETMODE (mode) options
00813 #define IEMODE_READY            0       // default inking, moving, sizing mode
00814 #define IEMODE_ERASE            1       // erasing Mode
00815 #define IEMODE_LASSO            2       // lasso selection mode
00816
00817 // IEdit    Notification Bits
00818 #define IEN_NULL                0x0000  // null notification
00819 #define IEN_PDEVENT             0x0001  // notify about pointing device events
00820 #define IEN_PAINT               0x0002  // send painting-related notifications
00821 #define IEN_FOCUS               0x0004  // send focus-related notifications
00822 #define IEN_SCROLL              0x0008  // send scrolling notifications
00823 #define IEN_EDIT                0x0010  // send editing/change notifications
00824 #define IEN_PROPERTIES          0x0020  // send properties dialog notification
00825 #define IEN_RESERVED            0xFF80  // reserved
00826
00827 // IEdit Return Values
00828 #define IER_OK                  0       // success
00829 #define IER_NO                  0       // ctl cannot do request
00830 #define IER_YES                 1       // ctl can do request
00831 #define IER_ERROR               (-1)    // unspecified error; operation failed
00832 #define IER_PARAMERR            (-2)    // bogus lParam value, bad handle, etc
00833 #define IER_OWNERDRAW           (-3)    // can't set drawopts in ownerdraw ctl
00834 #define IER_SECURITY            (-4)    // security protection disallows action
00835 #define IER_SELECTION           (-5)    // nothing selected in control
00836 #define IER_SCALE               (-6)    // merge:  incompatible scaling factors
00837 #define IER_MEMERR              (-7)    // memory error
00838 #define IER_NOCOMMAND           (-8)    // tried IE_GETCOMMAND w/no command
00839 #define IER_NOGESTURE           (-9)    // tried IE_GETGESTURE w/no gesture
00840 #define IER_NOPDEVENT           (-10)   // tried IE_GETPDEVENT but no event
00841 #define IER_NOTINPAINT          (-11)   // tried IE_GETPAINTSTRUCT but no paint
00842 #define IER_PENDATA             (-12)   // can't do request with NULL hpd in ctl
00843
00844 // IEdit Recognition Options
00845 #define IEREC_NONE              0x0000  // No recognition
00846 #define IEREC_GESTURE           0x0001  // Gesture recognition
00847 #define IEREC_ALL               (IEREC_GESTURE)
00848 #define IEREC_RESERVED          0xFFFE  // Reserved
00849
00850 // IEdit Security Options
00851 #define IESEC_NOCOPY            0x0001  // copying disallowed
00852 #define IESEC_NOCUT             0x0002  // cutting disallowed
00853 #define IESEC_NOPASTE           0x0004  // pasting disallowed
00854 #define IESEC_NOUNDO            0x0008  // undoing disallowed
00855 #define IESEC_NOINK             0x0010  // inking  disallowed
00856 #define IESEC_NOERASE           0x0020  // erasing disallowed
00857 #define IESEC_NOGET             0x0040  // IE_GETINK message verboten
00858 #define IESEC_NOSET             0x0080  // IE_SETINK message verboten
00859 #define IESEC_RESERVED          0xFF00  // reserved
00860
00861 // IEdit IE_SETFORMAT/IE_GETFORMAT options
00862 #define IESF_ALL                0x0001  // set/get stk fmt of all ink
00863 #define IESF_SELECTION          0x0002  // set/get stk fmt of selected ink
00864 #define IESF_STROKE             0x0004  // set/get stk fmt of specified stroke
00865 //
00866 #define IESF_TIPCOLOR           0x0008  // set color
00867 #define IESF_TIPWIDTH           0x0010  // set width
00868 #define IESF_PENTIP             (IESF_TIPCOLOR|IESF_TIPWIDTH)
00869 //
00870
00871 // IEdit IE_SETINK options
00872 #define IESI_REPLACE            0x0000  // replace ink in control
00873 #define IESI_APPEND             0x0001  // append ink to existing control ink
00874
00875 // Ink Edit Control (IEdit) definitions
00876 // IEdit Notifications
00877 #define IN_PDEVENT      ((IEN_PDEVENT<<8)|0)   // pointing device event occurred
00878 #define IN_ERASEBKGND   ((IEN_NULL<<8)|1)      // control needs bkgnd erased
00879 #define IN_PREPAINT     ((IEN_PAINT<<8)|2)     // before control paints its ink
00880 #define IN_PAINT        ((IEN_NULL<<8)|3)      // control needs to be painted
00881 #define IN_POSTPAINT    ((IEN_PAINT<<8)|4)     // after control has painted
00882 #define IN_MODECHANGED  ((IEN_EDIT<<8)|5)      // mode changed
00883 #define IN_CHANGE       ((IEN_EDIT<<8)|6)      // contents changed & painted
00884 #define IN_UPDATE       ((IEN_EDIT<<8)|7)      // contents changed & !painted
00885 #define IN_SETFOCUS     ((IEN_FOCUS<<8)|8)     // IEdit is getting focus
00886 #define IN_KILLFOCUS    ((IEN_FOCUS<<8)|9)     // IEdit is losing focus
00887 #define IN_MEMERR       ((IEN_NULL<<8)|10)     // memory error
00888 #define IN_HSCROLL      ((IEN_SCROLL<<8)|11)   // horz scrolled, not painted
00889 #define IN_VSCROLL      ((IEN_SCROLL<<8)|12)   // vert scrolled, not painted
00890 #define IN_GESTURE      ((IEN_EDIT<<8)|13)     // user has gestured on control
00891 #define IN_COMMAND      ((IEN_EDIT<<8)|14)     // command selected from menu
00892 #define IN_CLOSE        ((IEN_NULL<<8)|15)     // I-Edit is being closed
00893 #define IN_PROPERTIES   ((IEN_PROPERTIES<<8)|16) // properties dialog
00894
00895 #endif /*!NOPENIEDIT */
00896
00897 //---------------------------------------------------------------------------
00898 #ifndef NOPENINKPUT
00899
00900 // PenIn[k]put API constants
00901
00902 // Default Processing
00903 #define LRET_DONE               1L
00904 #define LRET_ABORT              (-1L)
00905 #define LRET_HRC                (-2L)
00906 #define LRET_HPENDATA           (-3L)
00907 #define LRET_PRIVATE            (-4L)
00908
00909 // Inkput:
00910 #define PCMR_OK                 0
00911 #define PCMR_ALREADYCOLLECTING  (-1)
00912 #define PCMR_INVALIDCOLLECTION  (-2)
00913 #define PCMR_EVENTLOCK          (-3)
00914 #define PCMR_INVALID_PACKETID   (-4)
00915 #define PCMR_TERMTIMEOUT        (-5)
00916 #define PCMR_TERMRANGE          (-6)
00917 #define PCMR_TERMPENUP          (-7)
00918 #define PCMR_TERMEX             (-8)
00919 #define PCMR_TERMBOUND          (-9)
00920 #define PCMR_APPTERMINATED      (-10)
00921 #define PCMR_TAP                (-11)   // alias PCMR_TAPNHOLD_LAST
00922 #define PCMR_SELECT             (-12)   // ret because of tap & hold
00923 #define PCMR_OVERFLOW           (-13)
00924 #define PCMR_ERROR              (-14)   // parameter or unspecified error
00925 #define PCMR_DISPLAYERR         (-15)   // inking only
00926 #define PCMR_TERMINVERT         (-16)   // termination due to tapping opposite end of pen
00927
00928 #define PII_INKCLIPRECT         0x0001
00929 #define PII_INKSTOPRECT         0x0002
00930 #define PII_INKCLIPRGN          0x0004
00931 #define PII_INKSTOPRGN          0x0008
00932 #define PII_INKPENTIP           0x0010
00933 #define PII_SAVEBACKGROUND      0x0020
00934 #define PII_CLIPSTOP            0x0040
00935
00936 #define PIT_RGNBOUND            0x0001
00937 #define PIT_RGNEXCLUDE          0x0002
00938 #define PIT_TIMEOUT             0x0004
00939 #define PIT_TAPNHOLD            0x0008
00940
00941 #endif /*!NOPENINKPUT */
00942
00943 //---------------------------------------------------------------------------
00944 #ifndef NOPENMISC
00945
00946 // Misc RC Definitions:
00947 #define CL_NULL                 0
00948 #define CL_MINIMUM              1       // minimum confidence level
00949 #define CL_MAXIMUM              100     // max (require perfect recog)
00950 #define cwRcReservedMax         8       // rc.rgwReserved[cwRcReservedMax]
00951 #define ENUM_MINIMUM            1
00952 #define ENUM_MAXIMUM            4096
00953
00954 #define HKP_SETHOOK             0       // SetRecogHook()
00955 #define HKP_UNHOOK              0xFFFF
00956
00957 #define HWR_RESULTS             0
00958 #define HWR_APPWIDE             1
00959
00960 #define iSycNull                (-1)
00961 #define LPDFNULL                ((LPDF)NULL)
00962 #define MAXDICTIONARIES         16      // rc.rglpdf[MAXDICTIONARIES]
00963 #define wPntAll                 (UINT)0xFFFF
00964 #define cbRcLanguageMax         44      // rc.lpLanguage[cbRcLanguageMax]
00965 #define cbRcUserMax             32      // rc.lpUser[cbRcUserMax]
00966 #define cbRcrgbfAlcMax          32      // rc.rgbfAlc[cbRcrgbfAlcMax]
00967 #define RC_WDEFAULT             0xffff
00968 #define RC_LDEFAULT             0xffffffffL
00969 #define RC_WDEFAULTFLAGS        0x8000
00970 #define RC_LDEFAULTFLAGS        0x80000000L
00971
00972 // CorrectWriting() API constants:
00973 // LOWORD values:
00974 #define CWR_REPLACECR           0x0001  // replace carriage ret (\r) with space
00975 #define CWR_STRIPCR             CWR_REPLACECR  // alias for backward compatibility
00976 #define CWR_STRIPLF             0x0002  // strip linefeed (\n)
00977 #define CWR_REPLACETAB          0x0004  // replace tab with space (\t)
00978 #define CWR_STRIPTAB            CWR_REPLACETAB // alias for backward compatibility
00979 #define CWR_SINGLELINEEDIT      (CWR_REPLACECR|CWR_STRIPLF|CWR_REPLACETAB)  // all of the above
00980 #define CWR_INSERT              0x0008  // use "Insert Text" instead of "Edit Text" in the title
00981 #define CWR_TITLE               0x0010  // interpret dwParam as title string
00982 #define CWR_KKCONVERT           0x0020  // JPN initiate IME
00983 #define CWR_SIMPLE              0x0040  // simple dialog (lens)
00984 #define CWR_HEDIT               0x0080  // HEDIT CorrectWriting
00985 #define CWR_KEYBOARD            0x0100  // keyboard lens
00986 #define CWR_BOXES               0x0200  // bedit lens
00987
00988 // HIWORD values: keyboard types
00989 #define CWRK_DEFAULT            0       // default keyboard type
00990 #define CWRK_BASIC              1       // basic keyboard
00991 #define CWRK_FULL               2       // full keyboard
00992 #define CWRK_NUMPAD             3       // numeric keyboard
00993 #define CWRK_TELPAD             4       // Telephone type keyboard
00994
00995 #ifdef JAPAN
00996 #define GPMI_OK                 0L
00997 #define GPMI_INVALIDPMI         0x8000L
00998 #endif // JAPAN
00999
01000 // inkwidth limits
01001 #define INKWIDTH_MINIMUM        0           // 0 invisible, 1..15 pixel widths
01002 #define INKWIDTH_MAXIMUM        15          // max width in pixels
01003
01004 // Get/SetPenMiscInfo:
01005 // PMI_RCCHANGE is for WM_GLOBALRCCHANGE compatability only:
01006 #define PMI_RCCHANGE            0       // invalid for Get/SetPenMiscInfo
01007
01008 #define PMI_BEDIT               1       // boxed edit info
01009 #define PMI_IMECOLOR            2       // input method editor color
01010 #define PMI_CXTABLET            3       // tablet width
01011 #define PMI_CYTABLET            4       // tablet height
01012 #define PMI_PENTIP              6       // pen tip: color, width, nib
01013 #define PMI_ENABLEFLAGS         7       // PWE_xx enablements
01014 #define PMI_TIMEOUT             8       // handwriting timeout
01015 #define PMI_TIMEOUTGEST         9       // gesture timeout
01016 #define PMI_TIMEOUTSEL          10      // select (press&hold) timeout
01017 #define PMI_SYSFLAGS            11      // component load configuration
01018 #define PMI_INDEXFROMRGB        12      // color table index from RGB
01019 #define PMI_RGBFROMINDEX        13      // RGB from color table index
01020 #define PMI_SYSREC              14      // handle to system recognizer
01021 #define PMI_TICKREF             15      // reference absolute time
01022
01023 #define PMI_SAVE                0x1000  // save setting to file
01024
01025 // Set/GetPenMiscInfo/PMI_ENABLEFLAGS flags:
01026 #define PWE_AUTOWRITE           0x0001  // pen functionality where IBeam
01027 #define PWE_ACTIONHANDLES       0x0002  // action handles in controls
01028 #define PWE_INPUTCURSOR         0x0004  // show cursor while writing
01029 #define PWE_LENS                0x0008  // allow lens popup
01030
01031 // GetPenMiscInfo/PMI_SYSFLAGS flags:
01032 #define PWF_RC1                 0x0001  // Windows for Pen 1.0 RC support
01033 #define PWF_PEN                 0x0004  // pen drv loaded & hdwe init'd
01034 #define PWF_INKDISPLAY          0x0008  // ink-compatible display drv loaded
01035 #define PWF_RECOGNIZER          0x0010  // system recognizer installed
01036 #define PWF_BEDIT               0x0100  // boxed edit support
01037 #define PWF_HEDIT               0x0200  // free input edit support
01038 #define PWF_IEDIT               0x0400  // ink edit support
01039 #define PWF_ENHANCED            0x1000  // enh features (gest, 1ms timing)
01040 #define PWF_FULL\
01041         PWF_RC1|PWF_PEN|PWF_INKDISPLAY|PWF_RECOGNIZER|\
01042         PWF_BEDIT|PWF_HEDIT |PWF_IEDIT|PWF_ENHANCED
01043
01044 // SetPenAppFlags() / RegisterPenApp() API constants:
01045 #define RPA_DEFAULT             0x0001  // == RPA_HEDIT
01046 #define RPA_HEDIT               0x0001  // convert EDIT to HEDIT
01047 #define RPA_KANJIFIXEDBEDIT     0x0002
01048 #define RPA_DBCSPRIORITY        0x0004  // assume DBCS has priority (Japan)
01049
01050 #define PMIR_OK                 0L
01051 #define PMIR_INDEX              (-1L)
01052 #define PMIR_VALUE              (-2L)
01053 #define PMIR_INVALIDBOXEDITINFO (-3L)
01054 #define PMIR_INIERROR           (-4L)
01055 #define PMIR_ERROR              (-5L)
01056 #define PMIR_NA                 (-6L)
01057
01058 #ifdef JAPAN
01059 #define SPMI_OK                 0L
01060 #define SPMI_INVALIDBOXEDITINFO 1L
01061 #define SPMI_INIERROR           2L
01062 #define SPMI_INVALIDPMI         0x8000L
01063 #endif //JAPAN
01064
01065 #endif /*!NOPENMISC */
01066
01067 //---------------------------------------------------------------------------
01068 #ifndef NOPENRC1    // not available in WIN32
01069
01070 // RC Options and Flags:
01071 // GetGlobalRC() API return codes:
01072 #define GGRC_OK                 0       // no err
01073 #define GGRC_DICTBUFTOOSMALL    1       // lpDefDict buffer too small for path
01074 #define GGRC_PARAMERROR         2       // invalid params: call ignored
01075 #define GGRC_NA                 3       // function not available
01076
01077 // RC Direction:
01078 #define RCD_DEFAULT             0       // def none
01079 #define RCD_LR                  1       // left to right like English
01080 #define RCD_RL                  2       // right to left like Arabic
01081 #define RCD_TB                  3       // top to bottom like Japanese
01082 #define RCD_BT                  4       // bottom to top like some Chinese
01083
01084 // RC International Preferences:
01085 #define RCIP_ALLANSICHAR        0x0001  // all ANSI chars
01086 #define RCIP_MASK               0x0001
01087
01088 // RC Options:
01089 #define RCO_NOPOINTEREVENT      0x00000001L   // no recog tap, tap/hold
01090 #define RCO_SAVEALLDATA         0x00000002L   // save pen data like upstrokes
01091 #define RCO_SAVEHPENDATA        0x00000004L   // save pen data for app
01092 #define RCO_NOFLASHUNKNOWN      0x00000008L   // no ? cursor on unknown
01093 #define RCO_TABLETCOORD         0x00000010L   // tablet coords used in RC
01094 #define RCO_NOSPACEBREAK        0x00000020L   // no space break recog -> dict
01095 #define RCO_NOHIDECURSOR        0x00000040L   // display cursor during inking
01096 #define RCO_NOHOOK              0x00000080L   // disallow ink hook (passwords)
01097 #define RCO_BOXED               0x00000100L   // valid rc.guide provided
01098 #define RCO_SUGGEST             0x00000200L   // for dict suggest
01099 #define RCO_DISABLEGESMAP       0x00000400L   // disable gesture mapping
01100 #define RCO_NOFLASHCURSOR       0x00000800L   // no cursor feedback
01101 #define RCO_BOXCROSS            0x00001000L   // show + at boxedit center
01102 #define RCO_COLDRECOG           0x00008000L   // result is from cold recog
01103 #define RCO_SAVEBACKGROUND      0x00010000L   // Save background from ink
01104 #define RCO_DODEFAULT           0x00020000L   // do default gesture processing
01105
01106 // RC Orientation of Tablet:
01107 #define RCOR_NORMAL             1       // tablet not rotated
01108 #define RCOR_RIGHT              2       // rotated 90 deg anticlockwise
01109 #define RCOR_UPSIDEDOWN         3       // rotated 180 deg
01110 #define RCOR_LEFT               4       // rotated 90 deg clockwise
01111
01112 // RC Preferences:
01113 #define RCP_LEFTHAND            0x0001  // left handed input
01114 #define RCP_MAPCHAR             0x0004  // fill in syg.lpsyc (ink) for training
01115
01116 // RCRESULT wResultsType values:
01117 #define RCRT_DEFAULT            0x0000  // normal ret
01118 #define RCRT_UNIDENTIFIED       0x0001  // result contains unidentified results
01119 #define RCRT_GESTURE            0x0002  // result is a gesture
01120 #define RCRT_NOSYMBOLMATCH      0x0004  // nothing recognized (no ink match)
01121 #define RCRT_PRIVATE            0x4000  // recognizer-specific symbol
01122 #define RCRT_NORECOG            0x8000  // no recog attempted, only data ret
01123 #define RCRT_ALREADYPROCESSED   0x0008  // GestMgr hooked it
01124 #define RCRT_GESTURETRANSLATED  0x0010  // GestMgr translated it to ANSI value
01125 #define RCRT_GESTURETOKEYS      0x0020  // ditto to set of virtual keys
01126
01127 // RC Result Return Mode specification:
01128 #define RRM_STROKE              0       // return results after each stroke
01129 #define RRM_SYMBOL              1       // per symbol (e.g. boxed edits)
01130 #define RRM_WORD                2       // on recog of a word
01131 #define RRM_NEWLINE             3       // on recog of a line break
01132 #define RRM_COMPLETE            16      // on PCM_xx specified completion
01133
01134 // SetGlobalRC() API return code flags:
01135 #define SGRC_OK                 0x0000  // no err
01136 #define SGRC_USER               0x0001  // invalid User name
01137 #define SGRC_PARAMERROR         0x0002  // param error: call ignored
01138 #define SGRC_RC                 0x0004  // supplied RC has errors
01139 #define SGRC_RECOGNIZER         0x0008  // DefRecog name invalid
01140 #define SGRC_DICTIONARY         0x0010  // lpDefDict path invalid
01141 #define SGRC_INIFILE            0x0020  // error saving to penwin.ini
01142 #define SGRC_NA                 0x8000  // function not available
01143
01144 #endif /*!NOPENRC1 */
01145
01146 //---------------------------------------------------------------------------
01147
01148 #ifndef NOPENTARGET
01149
01150 #define TPT_CLOSEST             0x0001   // Assign to the closest target
01151 #define TPT_INTERSECTINK        0x0002   // target with intersecting ink
01152 #define TPT_TEXTUAL             0x0004   // apply textual heuristics
01153 #define TPT_DEFAULT             (TPT_TEXTUAL | TPT_INTERSECTINK | TPT_CLOSEST)
01154
01155 #endif /*!NOPENTARGET */
01156
01157 //---------------------------------------------------------------------------
01158 #ifndef NOPENVIRTEVENT
01159
01160 // Virtual Event Layer:
01161 #define VWM_MOUSEMOVE           0x0001
01162 #define VWM_MOUSELEFTDOWN       0x0002
01163 #define VWM_MOUSELEFTUP         0x0004
01164 #define VWM_MOUSERIGHTDOWN      0x0008
01165 #define VWM_MOUSERIGHTUP        0x0010
01166 #endif /*!NOPENVIRTEVENT */
01167
01168 #endif /* RC_INVOKED */  // ... all the way back from definitions:2
01169
01170 /****** Messages and Defines ************************************************/
01171
01172 // Windows Messages WM_PENWINFIRST (0x0380) and WM_PENWINLAST (0x038F)
01173 // are defined in WINDOWS.H and WINMIN.H
01174
01175 //---------------------------------------------------------------------------
01176 #ifndef NOPENMSGS
01177
01178 #ifndef NOPENRC1    // not available in WIN32
01179 #define WM_RCRESULT             (WM_PENWINFIRST+1)  // 0x381
01180 #define WM_HOOKRCRESULT         (WM_PENWINFIRST+2)  // 0x382
01181 #endif /*!NOPENRC1*/
01182
01183 #define WM_PENMISCINFO          (WM_PENWINFIRST+3)  // 0x383
01184 #define WM_GLOBALRCCHANGE       (WM_PENWINFIRST+3)  // alias
01185
01186 #ifndef NOPENAPPS   // not available in WIN32
01187 #define WM_SKB                  (WM_PENWINFIRST+4)  // 0x384
01188 #endif /*!NOPENAPPS */
01189
01190 #define WM_PENCTL               (WM_PENWINFIRST+5)  // 0x385
01191 #define WM_HEDITCTL             (WM_PENWINFIRST+5)  // FBC: alias
01192
01193 // WM_HEDITCTL (WM_PENCTL) wParam options:
01194 #ifndef _WIN32
01195 #define HE_GETRC                3       // FBC: get RC from HEDIT/BEDIT control
01196 #define HE_SETRC                4       // FBC: ditto set
01197 #define HE_GETINFLATE           5       // FBC: get inflate rect
01198 #define HE_SETINFLATE           6       // FBC: ditto set
01199 #endif //!_WIN32
01200 #define HE_GETUNDERLINE         7       // get underline mode
01201 #define HE_SETUNDERLINE         8       // ditto set
01202 #define HE_GETINKHANDLE         9       // get handle to captured ink
01203 #define HE_SETINKMODE           10      // begin HEDIT cold recog mode
01204 #define HE_STOPINKMODE          11      // end cold recog mode
01205 #ifndef _WIN32
01206 #define HE_GETRCRESULTCODE      12      // FBC: result of recog after HN_ENDREC
01207 #endif //!_WIN32
01208 #define HE_DEFAULTFONT          13      // switch BEDIT to def font
01209 #define HE_CHARPOSITION         14      // BEDIT byte offset -> char position
01210 #define HE_CHAROFFSET           15      // BEDIT char position -> byte offset
01211 #define HE_GETBOXLAYOUT         20      // get BEDIT layout
01212 #define HE_SETBOXLAYOUT         21      // ditto set
01213 #ifndef _WIN32
01214 #define HE_GETRCRESULT          22      // FBC: get RCRESULT after HN_RCRESULT
01215 #define HE_KKCONVERT            30      // JPN start kana-kanji conversion
01216 #define HE_GETKKCONVERT         31      // JPN get KK state
01217 #define HE_CANCELKKCONVERT      32      // JPN cancel KK conversion
01218 #define HE_FIXKKCONVERT         33      // JPN force KK result
01219 #define HE_GETKKSTATUS          34      // JPN get KK UI state
01220 #define HE_KKNOCONVERT          35      // JPN revert conversion
01221 #define HE_SETIMEDEFAULT        36      // JPN set a range of DCS
01222 #define HE_GETIMEDEFAULT        37      // JPN get a range of DCS
01223 #endif //!_WIN32
01224 #define HE_ENABLEALTLIST        40      // en/disable dropdown recog alt's
01225 #define HE_SHOWALTLIST          41      // show dropdown (assume enabled)
01226 #define HE_HIDEALTLIST          42      // hide dropdown alternatives
01227 #define HE_GETLENSTYPE          43      // get lens type: CWR_ and CWRK_ flags
01228 #define HE_SETLENSTYPE          44      // set lens type: CWR_ and CWRK_ flags
01229
01230 //------------------------------
01231 // JPN Kana-to-Kanji conversion subfunctions:
01232 #define HEKK_DEFAULT            0       // def
01233 #define HEKK_CONVERT            1       // convert in place
01234 #define HEKK_CANDIDATE          2       // start conversion dialog
01235 #define HEKK_DBCSCHAR           3       // convert to DBCS
01236 #define HEKK_SBCSCHAR           4       // convert to SBCS
01237 #define HEKK_HIRAGANA           5       // convert to hiragana
01238 #define HEKK_KATAKANA           6       // convert to katakana
01239
01240 //------------------------------
01241 // JPN Return value of HE_GETKKSTATUS
01242 #define HEKKR_PRECONVERT        1       // in pre conversion mode
01243 #define HEKKR_CONVERT           2       // in mid conversion mode
01244 #define HEKKR_TEMPCONFIRM       3       // in post conversion mode
01245
01246 // HE_STOPINKMODE (stop cold recog) options:
01247 #define HEP_NORECOG             0       // don't recog ink
01248 #define HEP_RECOG               1       // recog ink
01249 #define HEP_WAITFORTAP          2       // recog after tap in window
01250
01251 // WM_PENCTL notifications:
01252 #define HN_ENDREC               4       // recog complete
01253 #define HN_DELAYEDRECOGFAIL     5       // HE_STOPINKMODE (cold recog) failed
01254 #define HN_RESULT               20      // HEDIT/BEDIT has received new ink/recognition result
01255 #ifndef _WIN32
01256 #define HN_RCRESULT             HN_RESULT
01257 #endif //!_WIN32
01258 #define HN_ENDKKCONVERT         30      // JPN KK conversion complete
01259 #define HN_BEGINDIALOG          40      // Lens/EditText/garbage detection dialog
01260                                         //  is about to come up on this hedit/bedit
01261 #define HN_ENDDIALOG            41      // Lens/EditText/garbage detection dialog
01262                                         //  has just been destroyed
01263
01264 //------------------------------
01265 #ifndef NOPENIEDIT
01266
01267 // Messages common with other controls:
01268 #define IE_GETMODIFY          (EM_GETMODIFY)    // gets the mod'n (dirty) bit
01269 #define IE_SETMODIFY          (EM_SETMODIFY)    // sets the mod'n (dirty) bit
01270 #define IE_CANUNDO            (EM_CANUNDO)      // queries whether can undo
01271 #define IE_UNDO               (EM_UNDO)         // undo
01272 #define IE_EMPTYUNDOBUFFER    (EM_EMPTYUNDOBUFFER) // clears IEDIT undo buffer
01273
01274 #define IE_MSGFIRST           (WM_USER+150)     // 0x496 == 1174
01275
01276 // IEdit common messages:
01277 #define IE_GETINK             (IE_MSGFIRST+0)   // gets ink from the control
01278 #define IE_SETINK             (IE_MSGFIRST+1)   // sets ink into the control
01279 #define IE_GETPENTIP          (IE_MSGFIRST+2)   // gets the cur def ink pentip
01280 #define IE_SETPENTIP          (IE_MSGFIRST+3)   // sets the cur def ink pentip
01281 #define IE_GETERASERTIP       (IE_MSGFIRST+4)   // gets the cur eraser pentip
01282 #define IE_SETERASERTIP       (IE_MSGFIRST+5)   // sets the cur eraser pentip
01283 #define IE_GETBKGND           (IE_MSGFIRST+6)   // gets the bkgnd options
01284 #define IE_SETBKGND           (IE_MSGFIRST+7)   // sets the bkgnd options
01285 #define IE_GETGRIDORIGIN      (IE_MSGFIRST+8)   // gets the bkgnd grid origin
01286 #define IE_SETGRIDORIGIN      (IE_MSGFIRST+9)   // sets the bkgnd grid origin
01287 #define IE_GETGRIDPEN         (IE_MSGFIRST+10)  // gets the bkgnd grid pen
01288 #define IE_SETGRIDPEN         (IE_MSGFIRST+11)  // sets the bkgnd grid pen
01289 #define IE_GETGRIDSIZE        (IE_MSGFIRST+12)  // gets the bkgnd grid size
01290 #define IE_SETGRIDSIZE        (IE_MSGFIRST+13)  // sets the bkgnd grid size
01291 #define IE_GETMODE            (IE_MSGFIRST+14)  // gets the current pen mode
01292 #define IE_SETMODE            (IE_MSGFIRST+15)  // sets the current pen mode
01293 #define IE_GETINKRECT         (IE_MSGFIRST+16)  // gets the rectbound of the ink
01294
01295 // IEdit-specific messages:
01296 #define IE_GETAPPDATA         (IE_MSGFIRST+34)  // gets the user-defined datum
01297 #define IE_SETAPPDATA         (IE_MSGFIRST+35)  // sets the user-defined data
01298 #define IE_GETDRAWOPTS        (IE_MSGFIRST+36)  // gets the ink draw options
01299 #define IE_SETDRAWOPTS        (IE_MSGFIRST+37)  // sets the ink options
01300 #define IE_GETFORMAT          (IE_MSGFIRST+38)  // gets format of stroke(s)
01301 #define IE_SETFORMAT          (IE_MSGFIRST+39)  // sets format of stroke(s)
01302 #define IE_GETINKINPUT        (IE_MSGFIRST+40)  // gets the ink input option
01303 #define IE_SETINKINPUT        (IE_MSGFIRST+41)  // sets the ink input option
01304 #define IE_GETNOTIFY          (IE_MSGFIRST+42)  // gets the notification bits
01305 #define IE_SETNOTIFY          (IE_MSGFIRST+43)  // sets the notification bits
01306 #define IE_GETRECOG           (IE_MSGFIRST+44)  // gets recognition options
01307 #define IE_SETRECOG           (IE_MSGFIRST+45)  // sets recognition options
01308 #define IE_GETSECURITY        (IE_MSGFIRST+46)  // gets the security options
01309 #define IE_SETSECURITY        (IE_MSGFIRST+47)  // sets the security options
01310 #define IE_GETSEL             (IE_MSGFIRST+48)  // gets sel status of a stroke
01311 #define IE_SETSEL             (IE_MSGFIRST+49)  // sets sel status of a stroke
01312 #define IE_DOCOMMAND          (IE_MSGFIRST+50)  // send command to IEdit
01313 #define IE_GETCOMMAND         (IE_MSGFIRST+51)  // gets user command
01314 #define IE_GETCOUNT           (IE_MSGFIRST+52)  // gets count of strks in I-Edit
01315 #define IE_GETGESTURE         (IE_MSGFIRST+53)  // gets details on user gesture
01316 #define IE_GETMENU            (IE_MSGFIRST+54)  // gets handle to pop-up menu
01317 #define IE_GETPAINTDC         (IE_MSGFIRST+55)  // gets the HDC for painting
01318 #define IE_GETPDEVENT         (IE_MSGFIRST+56)  // gets details of last pd event
01319 #define IE_GETSELCOUNT        (IE_MSGFIRST+57)  // gets count of selected strks
01320 #define IE_GETSELITEMS        (IE_MSGFIRST+58)  // gets indices of all sel strks
01321 #define IE_GETSTYLE           (IE_MSGFIRST+59)  // gets IEdit control styles
01322
01323 #endif /*!NOPENIEDIT */
01324
01325 //------------------------------
01326 #ifndef NOPENHEDIT
01327
01328 // (H)Edit Control:
01329 // CTLINITHEDIT.dwFlags values
01330 #define CIH_NOGDMSG           0x0001  // disable garbage detection message box for this edit
01331 #define CIH_NOACTIONHANDLE    0x0002  // disable action handles for this edit
01332 #define CIH_NOEDITTEXT        0x0004  // disable Lens/Edit/Insert text for this edit
01333 #define CIH_NOFLASHCURSOR     0x0008  // don't flash cursor on tap-n-hold in this (h)edit
01334
01335 #endif /* !NOPENHEDIT */
01336
01337 //------------------------------
01338 #ifndef NOPENBEDIT
01339
01340 // Boxed Edit Control:
01341 // box edit alternative list:
01342 #define HEAL_DEFAULT            -1L     // AltList def value for lParam
01343
01344 // box edit Info:
01345 #define BEI_FACESIZE            32      // max size of font name, = LF_FACESIZE
01346 #define BEIF_BOXCROSS           0x0001
01347
01348 // box edit size:
01349 #define BESC_DEFAULT            0
01350 #define BESC_ROMANFIXED         1
01351 #define BESC_KANJIFIXED         2
01352 #define BESC_USERDEFINED        3
01353
01354 // CTLINITBEDIT.wFlags values
01355 #define CIB_NOGDMSG           0x0001  // disable garbage detection message box for this bedit
01356 #define CIB_NOACTIONHANDLE    0x0002  // disable action handles for this bedit
01357 #define CIB_NOFLASHCURSOR     0x0004  // don't flash cursor on tap-n-hold in this bedit
01358 #ifdef JAPAN
01359 #define CIB_NOWRITING         0x0010  // disallow pen input into control
01360 #endif // JAPAN
01361
01362 #define BXD_CELLWIDTH           12
01363 #define BXD_CELLHEIGHT          16
01364 #define BXD_BASEHEIGHT          13
01365 #define BXD_BASEHORZ            0
01366 #define BXD_MIDFROMBASE         0
01367 #define BXD_CUSPHEIGHT          2
01368 #define BXD_ENDCUSPHEIGHT       4
01369
01370 #define BXDK_CELLWIDTH          32
01371 #define BXDK_CELLHEIGHT         32
01372 #define BXDK_BASEHEIGHT         28
01373 #define BXDK_BASEHORZ           0
01374 #define BXDK_MIDFROMBASE        0
01375 #define BXDK_CUSPHEIGHT         28
01376 #define BXDK_ENDCUSPHEIGHT      10
01377
01378 #ifdef JAPAN
01379 // IME colors for bedit
01380 #define COLOR_BE_INPUT             0
01381 #define COLOR_BE_INPUT_TEXT        1
01382 #define COLOR_BE_CONVERT           2
01383 #define COLOR_BE_CONVERT_TEXT      3
01384 #define COLOR_BE_CONVERTED         4
01385 #define COLOR_BE_CONVERTED_TEXT    5
01386 #define COLOR_BE_UNCONVERT         6
01387 #define COLOR_BE_UNCONVERT_TEXT    7
01388 #define COLOR_BE_CURSOR            8
01389 #define COLOR_BE_CURSOR_TEXT       9
01390 #define COLOR_BE_PRECONVERT        10
01391 #define COLOR_BE_PRECONVERT_TEXT   11
01392 #define MAXIMECOLORS               12
01393 #endif
01394
01395 #endif /*!NOPENBEDIT */
01396
01397 #define WM_PENMISC              (WM_PENWINFIRST+6)  // 0x386
01398
01399 // WM_PENMISC message constants:
01400 #define PMSC_BEDITCHANGE        1       // broadcast when BEDIT changes
01401 #ifndef _WIN32
01402 //#define PMSC_PENUICHANGE      2       // JPN broadcast when PENUI changes
01403 //#define PMSC_SUBINPCHANGE     3       // JPN broadcast when SUBINPUT changes
01404 //#define PMSC_KKCTLENABLE      4       // JPN
01405 #endif //!_WIN32
01406 #define PMSC_GETPCMINFO         5       // query the window's PCMINFO
01407 #define PMSC_SETPCMINFO         6       // set the window's PCMINFO
01408 #define PMSC_GETINKINGINFO      7       // query the window's INKINGINFO
01409 #define PMSC_SETINKINGINFO      8       // set the window's INKINGINFO
01410 #define PMSC_GETHRC             9       // query the window's HRC
01411 #define PMSC_SETHRC             10      // set the window's HRC
01412 #define PMSC_GETSYMBOLCOUNT     11      // count of symbols in result recd by window
01413 #define PMSC_GETSYMBOLS         12      // ditto symbols
01414 #define PMSC_SETSYMBOLS         13      // ditto set symbols
01415 #define PMSC_LOADPW             15      // broadcast load state on penwin
01416 #define PMSC_INKSTOP            16
01417
01418 // PMSCL_xx lParam values for PMSC_xx:
01419 #define PMSCL_UNLOADED          0L      // penwin just unloaded
01420 #define PMSCL_LOADED            1L      // penwin just loaded
01421 #define PMSCL_UNLOADING         2L      // penwin about to unload
01422
01423 #define WM_CTLINIT              (WM_PENWINFIRST+7)  // 0x387
01424
01425 // WM_CTLINIT message constants:
01426 #define CTLINIT_HEDIT           1
01427 #define CTLINIT_BEDIT           7
01428 #define CTLINIT_IEDIT           9
01429 #define CTLINIT_MAX             10
01430
01431 #define WM_PENEVENT             (WM_PENWINFIRST+8)  // 0x388
01432
01433 // WM_PENEVENT message values for wParam:
01434 #define PE_PENDOWN              1       // pen tip down
01435 #define PE_PENUP                2       // pen tip went from down to up
01436 #define PE_PENMOVE              3       // pen moved without a tip transition
01437 #define PE_TERMINATING          4       // Peninput about to terminate
01438 #define PE_TERMINATED           5       // Peninput terminated
01439 #define PE_BUFFERWARNING        6       // Buffer half full.
01440 #define PE_BEGININPUT           7       // begin default input
01441 #define PE_SETTARGETS           8       // set target data structure (TARGINFO)
01442 #define PE_BEGINDATA            9       // init message to all targets
01443 #define PE_MOREDATA             10      // target gets more data
01444 #define PE_ENDDATA              11      // termination message to all targets
01445 #define PE_GETPCMINFO           12      // get input collection info
01446 #define PE_GETINKINGINFO        13      // get inking info
01447 #define PE_ENDINPUT             14      // Input termination message to window
01448                                         //  starting default input
01449 #define PE_RESULT               15      // sent after ProcessHRC but before GetResultsHRC
01450
01451 #endif /*!NOPENMSGS */
01452
01453 /****** Definitions 3: RC compiler excluded ********************************/
01454
01455 #ifndef RC_INVOKED  // ... rest of file of no interest to rc compiler
01456
01457 //////////////////////////////////////////////////////////////////////////////
01458 /****** Macros **************************************************************/
01459
01460 // misc macros:
01461 //---------------------------------------------------------------------------
01462 #ifndef NOPENDRIVER
01463
01464 #define FPenUpX(x)              ((BOOL)(((x) & BITPENUP) != 0))
01465 #define GetWEventRef()          (LOWORD(GetMessageExtraInfo()))
01466 #endif /*!NOPENDRIVER */
01467
01468 //---------------------------------------------------------------------------
01469 #ifndef NOPENALC
01470
01471 // ALC macros:
01472
01473 #define MpAlcB(lprc,i)          ((lprc)->rgbfAlc[((i) & 0xff) >> 3])
01474 #define MpIbf(i)                ((BYTE)(1 << ((i) & 7)))
01475 #define SetAlcBitAnsi(lprc,i)   do {MpAlcB(lprc,i) |= MpIbf(i);} while (0)
01476 #define ResetAlcBitAnsi(lprc,i) do {MpAlcB(lprc,i) &= ~MpIbf(i);} while (0)
01477 #define IsAlcBitAnsi(lprc, i)   ((MpAlcB(lprc,i) & MpIbf(i)) != 0)
01478 #endif /*!NOPENALC */
01479
01480 //---------------------------------------------------------------------------
01481 #ifndef NOPENDATA
01482
01483 // draw 2.0 pendata using internal stroke formats:
01484 #define DrawPenDataFmt(hdc, lprect, hpndt)\
01485     DrawPenDataEx(hdc, lprect, hpndt, 0, IX_END, 0, IX_END, NULL, NULL, 0)
01486
01487 #endif /*!NOPENDATA */
01488
01489 //---------------------------------------------------------------------------
01490 #ifndef NOPENHRC
01491
01492 // Handwriting Recognizer:
01493
01494 // Intervals:
01495 // difference of two absolute times (at2 > at1 for positive result):
01496 #define dwDiffAT(at1, at2)\
01497     (1000L*((at2).sec - (at1).sec) - (DWORD)(at1).ms + (DWORD)(at2).ms)
01498
01499 // comparison of two absolute times (TRUE if at1 < at2):
01500 #define FLTAbsTime(at1, at2)\
01501     ((at1).sec < (at2).sec || ((at1).sec == (at2).sec && (at1).ms < (at2).ms))
01502
01503 #define FLTEAbsTime(at1, at2)\
01504     ((at1).sec < (at2).sec || ((at1).sec == (at2).sec && (at1).ms <= (at2).ms))
01505
01506 #define FEQAbsTime(at1, at2)\
01507     ((at1).sec == (at2).sec && (at1).ms == (at2).ms)
01508
01509 // test if abstime is within an interval:
01510 #define FAbsTimeInInterval(at, lpi)\
01511     (FLTEAbsTime((lpi)->atBegin, at) && FLTEAbsTime(at, (lpi)->atEnd))
01512
01513 // test if interval (lpiT) is within an another interval (lpiS):
01514 #define FIntervalInInterval(lpiT, lpiS)\
01515     (FLTEAbsTime((lpiS)->atBegin, (lpiT)->atBegin)\
01516     && FLTEAbsTime((lpiT)->atEnd, (lpiS)->atEnd))
01517
01518 // test if interval (lpiT) intersects another interval (lpiS):
01519 #define FIntervalXInterval(lpiT, lpiS)\
01520     (!(FLTAbsTime((lpiT)->atEnd, (lpiS)->atBegin)\
01521     || FLTAbsTime((lpiS)->atEnd, (lpiT)->atBegin)))
01522
01523 // duration of an LPINTERVAL in ms:
01524 #define dwDurInterval(lpi)  dwDiffAT((lpi)->atBegin, (lpi)->atEnd)
01525
01526 // fill a pointer to an ABSTIME structure from a count of seconds and ms:
01527 #define MakeAbsTime(lpat, sec, ms) do {\
01528     (lpat)->sec = sec + ((ms) / 1000);\
01529     (lpat)->ms = (ms) % 1000;\
01530     } while (0)
01531
01532 // SYV macros:
01533 #define FIsSpecial(syv)         (HIWORD((syv))==SYVHI_SPECIAL)
01534 #define FIsAnsi(syv)            (HIWORD((syv))==SYVHI_ANSI)
01535 #define FIsGesture(syv)         (HIWORD((syv))==SYVHI_GESTURE)
01536 #define FIsKanji(syv)           (HIWORD((syv))==SYVHI_KANJI)
01537 #define FIsShape(syv)           (HIWORD((syv))==SYVHI_SHAPE)
01538 #define FIsUniCode(syv)         (HIWORD((syv))==SYVHI_UNICODE)
01539 #define FIsVKey(syv)            (HIWORD((syv))==SYVHI_VKEY)
01540
01541 #define ChSyvToAnsi(syv)        ((BYTE) (LOBYTE(LOWORD((syv)))))
01542 #define WSyvToKanji(syv)        ((WORD) (LOWORD((syv))))
01543 #define SyvCharacterToSymbol(c) ((LONG)(unsigned char)(c) | 0x00010000)
01544 #define SyvKanjiToSymbol(c)     ((LONG)(UINT)(c) | 0x00030000)
01545
01546 #define FIsSelectGesture(syv)   \
01547    ((syv) >= SYVSELECTFIRST && (syv) <= SYVSELECTLAST)
01548
01549 #define FIsStdGesture(syv)      \
01550    (                            \
01551    FIsSelectGesture(syv)        \
01552    || (syv)==SYV_CLEAR          \
01553    || (syv)==SYV_HELP           \
01554    || (syv)==SYV_EXTENDSELECT   \
01555    || (syv)==SYV_UNDO           \
01556    || (syv)==SYV_COPY           \
01557    || (syv)==SYV_CUT            \
01558    || (syv)==SYV_PASTE          \
01559    || (syv)==SYV_CLEARWORD      \
01560    || (syv)==SYV_KKCONVERT      \
01561    || (syv)==SYV_USER           \
01562    || (syv)==SYV_CORRECT        \
01563    )
01564
01565 #define FIsAnsiGesture(syv) \
01566    (                            \
01567    (syv) == SYV_BACKSPACE       \
01568    || (syv) == SYV_TAB          \
01569    || (syv) == SYV_RETURN       \
01570    || (syv) == SYV_SPACE        \
01571    )
01572
01573 #endif /*!NOPENHRC */
01574
01575 //---------------------------------------------------------------------------
01576 #ifndef NOPENINKPUT
01577
01578 #define SubPenMsgFromWpLp(wp, lp)       (LOWORD(wp))
01579 #ifdef _WIN32
01580 #define EventRefFromWpLp(wp, lp)        (HIWORD(wp))
01581 #define TerminationFromWpLp(wp, lp)     ((int)HIWORD(wp))
01582 #define HpcmFromWpLp(wp, lp)            ((HPCM)(lp))
01583 #else
01584 #define EventRefFromWpLp(wp, lp)        (LOWORD(lp))
01585 #define TerminationFromWpLp(wp, lp)     ((int)LOWORD(lp))
01586 #define HpcmFromWpLp(wp, lp)            ((HPCM)HIWORD(lp))
01587 #endif //_WIN32
01588
01589 #endif   /*!NOPENINKPUT*/
01590
01591 //---------------------------------------------------------------------------
01592 #ifndef NOPENTARGET
01593 #define HwndFromHtrg(htrg)      ((HWND)(DWORD)(htrg))
01594 #define HtrgFromHwnd(hwnd)      ((HTRG)(UINT)(hwnd))
01595 #endif /*!NOPENTARGET*/
01596
01597 //////////////////////////////////////////////////////////////////////////////
01598 /****** Typedefs ************************************************************/
01599
01600 // Simple:
01601 typedef LONG                    ALC;    // Enabled Alphabet
01602 typedef int                     CL;     // Confidence Level
01603 typedef UINT                    HKP;    // Hook Parameter
01604 typedef int                     REC;    // recognition result
01605 typedef LONG                    SYV;    // Symbol Value
01606
01607 #ifndef DECLARE_HANDLE32
01608 #define DECLARE_HANDLE32(name)\
01609     struct name##__ { int unused; };\
01610     typedef const struct name##__ FAR* name
01611 #endif //!DECLARE_HANDLE32
01612
01613 DECLARE_HANDLE32(HTRG);                 // Handle to target
01614 DECLARE_HANDLE(HPCM);                   // Handle to Pen Collection Info
01615 DECLARE_HANDLE(HPENDATA);               // handle to ink
01616 DECLARE_HANDLE(HREC);                   // handle to recognizer
01617
01618 // Pointer Types:
01619 typedef ALC FAR*                LPALC;        // ptr to ALC
01620 typedef LPVOID                  LPOEM;        // alias
01621 typedef SYV FAR*                LPSYV;        // ptr to SYV
01622 typedef HPENDATA FAR*           LPHPENDATA;   // ptr to HPENDATA
01623
01624 // Function Prototypes:
01625 typedef int         (CALLBACK *ENUMPROC)(LPSYV, int, VOID FAR*);
01626 typedef int         (CALLBACK *LPDF)(int, LPVOID, LPVOID, int, DWORD, DWORD);
01627 typedef BOOL        (CALLBACK *RCYIELDPROC)(VOID);
01628
01629 // Structures:
01630
01631 typedef struct tagABSTIME       // 2.0 absolute date/time
01632    {
01633    DWORD sec;      // number of seconds since 1/1/1970, ret by CRTlib time() fn
01634    UINT ms;        // additional offset in ms, 0..999
01635    }
01636    ABSTIME, FAR *LPABSTIME;
01637
01638 //---------------------------------------------------------------------------
01639 #ifndef NOPENHEDIT
01640
01641 typedef struct tagCTLINITHEDIT  // 2.0 init struct for (h)edit
01642    {
01643    DWORD cbSize;                // sizeof(CTLINITHEDIT)
01644    HWND hwnd;                   // (h)edit window handle
01645    int id;                      // its id
01646    DWORD dwFlags;               // CIE_xx
01647    DWORD dwReserved;            // for future use
01648    }
01649    CTLINITHEDIT, FAR *LPCTLINITHEDIT;
01650 #endif /* !NOPENHEDIT */
01651
01652 //---------------------------------------------------------------------------
01653 #ifndef NOPENBEDIT
01654
01655 typedef struct tagBOXLAYOUT     // 1.0 box edit layout
01656    {
01657    int cyCusp;                  // pixel height of box (BXS_RECT) or cusp
01658    int cyEndCusp;               // pixel height of cusps at extreme ends
01659    UINT style;                  // BXS_xx style
01660    DWORD dwReserved1;           // reserved
01661    DWORD dwReserved2;           // reserved
01662    DWORD dwReserved3;           // reserved
01663    }
01664    BOXLAYOUT, FAR *LPBOXLAYOUT;
01665
01666 typedef struct tagIMECOLORS     // 2.0 IME undetermined string color info.
01667    {
01668    int cColors;                 // count of colors to be set/get
01669    LPINT lpnElem;               // address of array of elements
01670    COLORREF FAR *lprgbIme;      // address of array of RGB values
01671    }
01672    IMECOLORS, FAR *LPIMECOLORS;
01673
01674 typedef struct tagCTLINITBEDIT  // 2.0 init struct for box edit
01675    {
01676    DWORD cbSize;                // sizeof(CTLINITBEDIT)
01677    HWND hwnd;                   // box edit window handle
01678    int id;                      // its id
01679    WORD wSizeCategory;          // BESC_xx
01680    WORD wFlags;                 // CIB_xx
01681    DWORD dwReserved;            // for future use
01682    }
01683    CTLINITBEDIT, FAR *LPCTLINITBEDIT;
01684
01685 typedef struct tagBOXEDITINFO   // 1.1 box edit Size Info
01686    {
01687    int cxBox;                   // width of a single box
01688    int cyBox;                   // ditto height
01689    int cxBase;                  // in-box x-margin to guideline
01690    int cyBase;                  // in-box y offset from top to baseline
01691    int cyMid;                   // 0 or distance from baseline to midline
01692    BOXLAYOUT boxlayout;         // embedded BOXLAYOUT structure
01693    UINT wFlags;                 // BEIF_xx
01694    BYTE szFaceName[BEI_FACESIZE];   // font face name
01695    UINT wFontHeight;            // font height
01696    UINT rgwReserved[8];         // for future use
01697    }
01698    BOXEDITINFO, FAR *LPBOXEDITINFO;
01699 #endif /*!NOPENBEDIT */
01700
01701 //---------------------------------------------------------------------------
01702 #ifndef NOPENCTL
01703
01704 typedef struct tagRECTOFS       // 1.0 rectangle offset for nonisometric inflation
01705    {
01706    int dLeft;                   // inflation leftwards from left side
01707    int dTop;                    // ditto upwards from top
01708    int dRight;                  // ditto rightwards from right
01709    int dBottom;                 // ditto downwards from bottom
01710    }
01711    RECTOFS, FAR *LPRECTOFS;
01712 #endif /*!NOPENCTL */
01713
01714 //---------------------------------------------------------------------------
01715 #ifndef NOPENDATA
01716
01717 typedef struct tagPENDATAHEADER // 1.0 main pen data header
01718    {
01719    UINT wVersion;               // pen data format version
01720    UINT cbSizeUsed;             // size of pendata mem block in bytes
01721    UINT cStrokes;               // number of strokes (incl up-strokes)
01722    UINT cPnt;                   // count of all points
01723    UINT cPntStrokeMax;          // length (in points) of longest stroke
01724    RECT rectBound;              // bounding rect of all down points
01725    UINT wPndts;                 // PDTS_xx bits
01726    int  nInkWidth;              // ink width in pixels
01727    DWORD rgbInk;                // ink color
01728    }
01729    PENDATAHEADER, FAR *LPPENDATAHEADER, FAR *LPPENDATA;
01730
01731 typedef struct tagSTROKEINFO    // 1.0 stroke header
01732    {
01733    UINT cPnt;                   // count of points in stroke
01734    UINT cbPnts;                 // size of stroke in bytes
01735    UINT wPdk;                   // state of stroke
01736    DWORD dwTick;                // time at beginning of stroke
01737    }
01738    STROKEINFO, FAR *LPSTROKEINFO;
01739
01740 typedef struct tagPENTIP        // 2.0 Pen Tip characteristics
01741     {
01742     DWORD cbSize;               // sizeof(PENTIP)
01743     BYTE btype;                 // pen type/nib (calligraphic nib, etc.)
01744     BYTE bwidth;                // width of Nib (typically == nInkWidth)
01745     BYTE bheight;               // height of Nib
01746     BYTE bOpacity;              // 0=transparent, 0x80=hilite, 0xFF=opaque
01747     COLORREF rgb;               // pen color
01748     DWORD dwFlags;              // TIP_xx flags
01749     DWORD dwReserved;           // for future expansion
01750     }
01751     PENTIP, FAR *LPPENTIP;
01752
01753 typedef BOOL (CALLBACK *ANIMATEPROC)(HPENDATA, UINT, UINT, UINT FAR*, LPARAM);
01754
01755 typedef struct tagANIMATEINFO   // 2.0 Animation parameters
01756     {
01757     DWORD cbSize;               // sizeof(ANIMATEINFO)
01758     UINT uSpeedPct;             // speed percent to animate at
01759     UINT uPeriodCB;             // time between calls to callback in ms
01760     UINT fuFlags;               // animation flags
01761     LPARAM lParam;              // value to pass to callback
01762     DWORD dwReserved;           // reserved
01763     }
01764     ANIMATEINFO, FAR *LPANIMATEINFO;
01765 #endif /*!NOPENDATA */
01766
01767 //---------------------------------------------------------------------------
01768 #ifndef NOPENDRIVER
01769
01770 typedef struct tagOEMPENINFO    // 1.0 OEM pen/tablet hdwe info
01771    {
01772    UINT wPdt;                   // pen data type
01773    UINT wValueMax;              // largest val ret by device
01774    UINT wDistinct;              // number of distinct readings possible
01775    }
01776    OEMPENINFO, FAR *LPOEMPENINFO;
01777
01778 typedef struct tagPENPACKET     // 1.0 pen packet
01779    {
01780    UINT wTabletX;               // x in raw coords
01781    UINT wTabletY;               // ditto y
01782    UINT wPDK;                   // state bits
01783    UINT rgwOemData[MAXOEMDATAWORDS]; // OEM-specific data
01784    }
01785    PENPACKET, FAR *LPPENPACKET;
01786
01787 typedef struct tagOEM_PENPACKET // 2.0
01788    {
01789    UINT wTabletX;               // x in raw coords
01790    UINT wTabletY;               // ditto y
01791    UINT wPDK;                   // state bits
01792    UINT rgwOemData[MAXOEMDATAWORDS];  // OEM-specific data
01793    DWORD dwTime;
01794    }
01795     OEM_PENPACKET, FAR *LPOEM_PENPACKET;
01796
01797 typedef struct tagPENINFO       // 1.0 pen/tablet hdwe info
01798    {
01799    UINT cxRawWidth;             // max x coord and tablet width in 0.001"
01800    UINT cyRawHeight;            // ditto y, height
01801    UINT wDistinctWidth;         // number of distinct x values tablet ret
01802    UINT wDistinctHeight;        // ditto y
01803    int nSamplingRate;           // samples / second
01804    int nSamplingDist;           // min distance to move before generating event
01805    LONG lPdc;                   // Pen Device Capabilities
01806    int cPens;                   // number of pens supported
01807    int cbOemData;               // width of OEM data packet
01808    OEMPENINFO rgoempeninfo[MAXOEMDATAWORDS]; // supported OEM data types
01809    UINT rgwReserved[7];         // for internal use
01810    UINT fuOEM;                  // which OEM data, timing, PDK_xx to report
01811    }
01812    PENINFO, FAR *LPPENINFO;
01813
01814 typedef struct tagCALBSTRUCT    // 1.0 pen calibration
01815    {
01816    int wOffsetX;
01817    int wOffsetY;
01818    int wDistinctWidth;
01819    int wDistinctHeight;
01820    }
01821    CALBSTRUCT, FAR *LPCALBSTRUCT;
01822
01823 typedef BOOL (CALLBACK *LPFNRAWHOOK)(LPPENPACKET);
01824 #endif /*!NOPENDRIVER */
01825
01826 //---------------------------------------------------------------------------
01827 #ifndef NOPENHRC
01828
01829 // Handwriting Recognizer:
01830
01831 DECLARE_HANDLE32(HRC);          // Handwriting Recognition Context
01832 DECLARE_HANDLE32(HRCRESULT);    // HRC result
01833 DECLARE_HANDLE32(HWL);          // Handwriting wordlist
01834 DECLARE_HANDLE32(HRECHOOK);     // Recognition Result hook handle
01835
01836 typedef HRC                     FAR *LPHRC;
01837 typedef HRCRESULT               FAR *LPHRCRESULT;
01838 typedef HWL                     FAR *LPHWL;
01839
01840 typedef BOOL (CALLBACK *HRCRESULTHOOKPROC)
01841     (HREC, HRC, UINT, UINT, UINT, LPVOID);
01842
01843 // Inksets:
01844 DECLARE_HANDLE(HINKSET);        // handle to an inkset
01845 typedef HINKSET                 FAR* LPHINKSET; // ptr to HINKSET
01846
01847 typedef struct tagINTERVAL      // 2.0 interval structure for inksets
01848     {
01849     ABSTIME atBegin;            // begining of 1-ms granularity interval
01850     ABSTIME atEnd;              // 1 ms past end of interval
01851     }
01852     INTERVAL, FAR *LPINTERVAL;
01853
01854 typedef struct tagBOXRESULTS    // 2.0
01855     {
01856     UINT indxBox;
01857     HINKSET hinksetBox;
01858     SYV rgSyv[1];
01859     }
01860     BOXRESULTS, FAR *LPBOXRESULTS;
01861
01862 typedef struct tagGUIDE         // 1.0 guide structure
01863    {
01864    int xOrigin;                 // left edge of first box (screen coord))
01865    int yOrigin;                 // ditto top edge
01866    int cxBox;                   // width of a single box
01867    int cyBox;                   // ditto height
01868    int cxBase;                  // in-box x-margin to guideline
01869    int cyBase;                  // in-box y offset from top to baseline
01870    int cHorzBox;                // count of boxed columns
01871    int cVertBox;                // ditto rows
01872    int cyMid;                   // 0 or distance from baseline to midline
01873    }
01874    GUIDE, FAR *LPGUIDE;
01875
01876 #endif /*!NOPENHRC */
01877
01878 //---------------------------------------------------------------------------
01879 #ifndef NOPENIEDIT
01880
01881 typedef struct tagCTLINITIEDIT  // 2.0 init struct for Ink Edit
01882     {
01883     DWORD cbSize;               // sizeof(CTLINITIEDIT)
01884     HWND hwnd;                  // IEdit window handle
01885     int id;                     // its ID
01886     WORD ieb;                   // IEB_* (background) bits
01887     WORD iedo;                  // IEDO_* (draw options) bits
01888     WORD iei;                   // IEI_* (ink input) bits
01889     WORD ien;                   // IEN_* (notification) bits
01890     WORD ierec;                 // IEREC_* (recognition) bits
01891     WORD ies;                   // IES_* (style) bits
01892     WORD iesec;                 // IESEC_* (security) bits
01893     WORD pdts;                  // initial pendata scale factor (PDTS_*)
01894     HPENDATA hpndt;             // initial pendata (or NULL if none)
01895     HGDIOBJ hgdiobj;            // background brush or bitmap handle
01896     HPEN hpenGrid;              // pen to use in drawing grid
01897     POINT ptOrgGrid;            // grid lines point of origin
01898     WORD wVGrid;                // vertical gridline spacing
01899     WORD wHGrid;                // horizontal gridline spacing
01900     DWORD dwApp;                // application-defined data
01901     DWORD dwReserved;           // reserved for future use
01902     }
01903     CTLINITIEDIT, FAR *LPCTLINITIEDIT;
01904
01905 typedef struct tagPDEVENT       // 2.0
01906     {
01907     DWORD cbSize;               // sizeof(PDEVENT)
01908     HWND hwnd;                  // window handle of I-Edit
01909     UINT wm;                    // WM_* (window message) of event
01910     WPARAM wParam;              // wParam of message
01911     LPARAM lParam;              // lParam of message
01912     POINT pt;                   // event pt in I-Edit client co-ords
01913     BOOL fPen;                  // TRUE if pen (or other inking device)
01914     LONG lExInfo;               // GetMessageExtraInfo() return value
01915     DWORD dwReserved;           // for future use
01916     }
01917     PDEVENT, FAR *LPPDEVENT;
01918
01919 typedef struct tagSTRKFMT       // 2.0
01920     {
01921     DWORD cbSize;               // sizeof(STRKFMT)
01922     UINT iesf;                  // stroke format flags and return bits
01923     UINT iStrk;                 // stroke index if IESF_STROKE
01924     PENTIP tip;                 // ink tip attributes
01925     DWORD dwUser;               // user data for strokes
01926     DWORD dwReserved;           // for future use
01927     }
01928     STRKFMT, FAR *LPSTRKFMT;
01929 #endif /*!NOPENIEDIT */
01930
01931 //---------------------------------------------------------------------------
01932 #ifndef NOPENINKPUT
01933
01934 typedef struct tagPCMINFO       // 2.0 Pen Collection Mode Information
01935    {
01936    DWORD cbSize;                // sizeof(PCMINFO)
01937    DWORD dwPcm;                 // PCM_xxx flags
01938    RECT rectBound;              // if finish on pendown outside this rect
01939    RECT rectExclude;            // if finish on pendown inside this rect
01940    HRGN hrgnBound;              // if finish on pendown outside this region
01941    HRGN hrgnExclude;            // if finish on pendown inside this region
01942    DWORD dwTimeout;             // if finish after timeout, this many ms
01943    }
01944     PCMINFO, FAR *LPPCMINFO;
01945
01946 typedef struct tagINKINGINFO    // 2.0 Pen Inking Information
01947    {
01948    DWORD cbSize;                // sizeof(INKINGINFO)
01949    UINT wFlags;                 // One of the PII_xx flags
01950    PENTIP tip;                  // Pen type, size and color
01951    RECT rectClip;               // Clipping rect for the ink
01952    RECT rectInkStop;            // Rect in which a pen down stops inking
01953    HRGN hrgnClip;               // Clipping region for the ink
01954    HRGN hrgnInkStop;            // Region in which a pen down stops inking
01955    }
01956     INKINGINFO, FAR *LPINKINGINFO;
01957 #endif /*!NOPENINKPUT */
01958
01959 //---------------------------------------------------------------------------
01960 #ifndef NOPENRC1    // not available in WIN32
01961
01962 typedef struct tagSYC           // 1.0 Symbol Correspondence for Ink
01963    {
01964    UINT wStrokeFirst;           // first stroke, inclusive
01965    UINT wPntFirst;              // first point in first stroke, inclusive
01966    UINT wStrokeLast;            // last stroke, inclusive
01967    UINT wPntLast;               // last point in last stroke, inclusive
01968    BOOL fLastSyc;               // T: no more SYCs follow for current SYE
01969    }
01970    SYC, FAR *LPSYC;
01971
01972 typedef struct tagSYE           // 1.0 Symbol Element
01973    {
01974    SYV syv;                     // symbol value
01975    LONG lRecogVal;              // for internal use by recognizer
01976    CL cl;                       // confidence level
01977    int iSyc;                    // SYC index
01978    }
01979    SYE, FAR *LPSYE;
01980
01981 typedef struct tagSYG           // 1.0 Symbol Graph
01982    {
01983    POINT rgpntHotSpots[MAXHOTSPOT]; // hot spots (max 8)
01984    int cHotSpot;                // number of valid hot spots in rgpntHotSpots
01985    int nFirstBox;               // row-major index to box of 1st char in result
01986    LONG lRecogVal;              // reserved for use by recoognizer
01987    LPSYE lpsye;                 // nodes of symbol graph
01988    int cSye;                    // number of SYEs in symbol graph
01989    LPSYC lpsyc;                 // ptr to corresp symbol ink
01990    int cSyc;                    // ditto count
01991    }
01992    SYG, FAR *LPSYG;
01993
01994 typedef struct tagRC            // 1.0 Recognition Context (RC)
01995    {
01996    HREC hrec;                   // handle of recognizer to use
01997    HWND hwnd;                   // window to send results to
01998    UINT wEventRef;              // index into ink buffer
01999    UINT wRcPreferences;         // flags: RCP_xx Preferences
02000    LONG lRcOptions;             // RCO_xx options
02001    RCYIELDPROC lpfnYield;       // procedure called during Yield()
02002    BYTE lpUser[cbRcUserMax];    // current writer
02003    UINT wCountry;               // country code
02004    UINT wIntlPreferences;       // flags: RCIP_xx
02005    char lpLanguage[cbRcLanguageMax]; // language strings
02006    LPDF rglpdf[MAXDICTIONARIES];   // list of dictionary functions
02007    UINT wTryDictionary;         // max enumerations to search
02008    CL clErrorLevel;             // level where recognizer should reject input
02009    ALC alc;                     // enabled alphabet
02010    ALC alcPriority;             // prioritizes the ALC_ codes
02011    BYTE rgbfAlc[cbRcrgbfAlcMax];   // bit field for enabled characters
02012    UINT wResultMode;            // RRM_xx when to send (asap or when complete)
02013    UINT wTimeOut;               // recognition timeout in ms
02014    LONG lPcm;                   // flags: PCM_xx for ending recognition
02015    RECT rectBound;              // bounding rect for inking (def:screen coords)
02016    RECT rectExclude;            // pen down inside this terminates recognition
02017    GUIDE guide;                 // struct: defines guidelines for recognizer
02018    UINT wRcOrient;              // RCOR_xx orientation of writing wrt tablet
02019    UINT wRcDirect;              // RCD_xx direction of writing
02020    int nInkWidth;               // ink width 0 (none) or 1..15 pixels
02021    COLORREF rgbInk;             // ink color
02022    DWORD dwAppParam;            // for application use
02023    DWORD dwDictParam;           // for app use to be passed on to dictionaries
02024    DWORD dwRecognizer;          // for app use to be passed on to recognizer
02025    UINT rgwReserved[cwRcReservedMax]; // reserved for future use by Windows
02026    }
02027    RC, FAR *LPRC;
02028
02029 typedef struct tagRCRESULT      // 1.0 Recognition Result
02030    {
02031    SYG syg;                     // symbol graph
02032    UINT wResultsType;           // see RCRT_xx
02033    int cSyv;                    // count of symbol values
02034    LPSYV lpsyv;                 // NULL-term ptr to recog's best guess
02035    HANDLE hSyv;                 // globally-shared handle to lpsyv mem
02036    int nBaseLine;               // 0 or baseline of input writing
02037    int nMidLine;                // ditto midline
02038    HPENDATA hpendata;           // pen data mem
02039    RECT rectBoundInk;           // ink data bounds
02040    POINT pntEnd;                // pt that terminated recog
02041    LPRC lprc;                   // recog context used
02042    }
02043    RCRESULT, FAR *LPRCRESULT;
02044
02045 typedef int         (CALLBACK *LPFUNCRESULTS)(LPRCRESULT, REC);
02046
02047 #endif /*!NOPENRC1 */
02048
02049 //---------------------------------------------------------------------------
02050 #ifndef NOPENTARGET
02051
02052 #ifndef _WIN32
02053 #if (WINVER < 0x0400)
02054 #ifndef _OLE2_H_
02055 typedef struct tagRECTL
02056 {
02057    LONG     left;
02058    LONG     top;
02059    LONG     right;
02060    LONG     bottom;
02061 } RECTL;
02062 typedef RECTL*       PRECTL;
02063 typedef RECTL NEAR*  NPRECTL;
02064 typedef RECTL FAR*   LPRECTL;
02065 typedef const RECTL FAR* LPCRECTL;
02066 #endif // !_OLE2_H_
02067 #endif // WINVER
02068 #endif // !WIN32
02069
02070 typedef struct tagTARGET        // 2.0 Geometry for a single target.
02071    {
02072    DWORD dwFlags;               // individual target flags
02073    DWORD idTarget;              // TARGINFO.rgTarget[] index
02074    HTRG  htrgTarget;            // HANDLE32 equiv
02075    RECTL rectBound;             // Bounding rect of the target
02076    DWORD dwData;                // data collection info per target
02077    RECTL rectBoundInk;          // Reserved for internal use, must be zero
02078    RECTL rectBoundLastInk;      // Reserved for internal use, must be zero
02079    }
02080    TARGET, FAR *LPTARGET;
02081
02082 typedef struct tagTARGINFO      // 2.0 A set of targets
02083    {
02084    DWORD cbSize;                // sizeof(TARGINFO)
02085    DWORD dwFlags;               // flags
02086    HTRG htrgOwner;              // HANDLE32 equiv
02087    WORD cTargets;               // count of targets
02088    WORD iTargetLast;            // last target, used by TargetPoints API
02089                                 // if TPT_TEXTUAL flag is set
02090    TARGET rgTarget[1];          // variable-length array of targets
02091    }
02092    TARGINFO, FAR *LPTARGINFO;
02093
02094 typedef struct tagINPPARAMS     // 2.0
02095    {
02096    DWORD cbSize;                // sizeof(INPPARAMS)
02097    DWORD dwFlags;
02098    HPENDATA hpndt;
02099    TARGET target;               // target structure
02100    }
02101     INPPARAMS, FAR *LPINPPARAMS;
02102 #endif /*!NOPENTARGET */
02103
02104 //////////////////////////////////////////////////////////////////////////////
02105 /****** APIs and Prototypes *************************************************/
02106
02107 LRESULT CALLBACK    DefPenWindowProc(HWND, UINT, WPARAM, LPARAM);
02108
02109 //---------------------------------------------------------------------------
02110 #ifndef NOPENAPPS   // not available in WIN32
02111
02112 // Pen System Applications:
02113 BOOL      WINAPI ShowKeyboard(HWND, UINT, LPPOINT, LPSKBINFO);
02114
02115 #endif /*!NOPENAPPS */
02116
02117 //---------------------------------------------------------------------------
02118 #ifndef NOPENDATA   // these APIs are implemented in PKPD.DLL
02119
02120 // PenData:
02121 #ifndef NOPENAPIFUN
02122 LPPENDATA WINAPI BeginEnumStrokes(HPENDATA);
02123 LPPENDATA WINAPI EndEnumStrokes(HPENDATA);
02124 HPENDATA  WINAPI CompactPenData(HPENDATA, UINT);
02125 HPENDATA  WINAPI CreatePenData(LPPENINFO, int, UINT, UINT);
02126 VOID      WINAPI DrawPenData(HDC, LPRECT, HPENDATA);
02127 BOOL      WINAPI GetPenDataStroke(LPPENDATA, UINT, LPPOINT FAR*,
02128                                   LPVOID FAR*, LPSTROKEINFO);
02129 #endif //!NOPENAPIFUN
02130 HPENDATA  WINAPI AddPointsPenData(HPENDATA, LPPOINT, LPVOID, LPSTROKEINFO);
02131 int       WINAPI CompressPenData(HPENDATA, UINT, DWORD);
02132 HPENDATA  WINAPI CreatePenDataEx(LPPENINFO, UINT, UINT, UINT);
02133 HRGN      WINAPI CreatePenDataRegion(HPENDATA, UINT);
02134 BOOL      WINAPI DestroyPenData(HPENDATA);
02135 int       WINAPI DrawPenDataEx(HDC, LPRECT, HPENDATA, UINT, UINT, UINT, UINT,
02136                                ANIMATEPROC, LPANIMATEINFO, UINT);
02137 HPENDATA  WINAPI DuplicatePenData(HPENDATA, UINT);
02138 int       WINAPI ExtractPenDataPoints(HPENDATA, UINT, UINT, UINT, LPPOINT,
02139                                       LPVOID, UINT);
02140 int       WINAPI ExtractPenDataStrokes(HPENDATA, UINT, LPARAM,
02141                                        LPHPENDATA, UINT);
02142 int       WINAPI GetPenDataAttributes(HPENDATA, LPVOID, UINT);
02143 BOOL      WINAPI GetPenDataInfo(HPENDATA, LPPENDATAHEADER, LPPENINFO, DWORD);
02144 BOOL      WINAPI GetPointsFromPenData(HPENDATA, UINT, UINT, UINT, LPPOINT);
02145 int       WINAPI GetStrokeAttributes(HPENDATA, UINT, LPVOID, UINT);
02146 int       WINAPI GetStrokeTableAttributes(HPENDATA, UINT, LPVOID, UINT);
02147 int       WINAPI HitTestPenData(HPENDATA, LPPOINT, UINT, UINT FAR*, UINT FAR*);
02148 int       WINAPI InsertPenData(HPENDATA, HPENDATA, UINT);
02149 int       WINAPI InsertPenDataPoints(HPENDATA, UINT, UINT, UINT,
02150                                      LPPOINT, LPVOID);
02151 int       WINAPI InsertPenDataStroke(HPENDATA, UINT, LPPOINT, LPVOID,
02152                                      LPSTROKEINFO);
02153 BOOL      WINAPI MetricScalePenData(HPENDATA, UINT);
02154 BOOL      WINAPI OffsetPenData(HPENDATA, int, int);
02155 LONG      WINAPI PenDataFromBuffer(LPHPENDATA, UINT, LPBYTE, LONG, LPDWORD);
02156 LONG      WINAPI PenDataToBuffer(HPENDATA, LPBYTE, LONG, LPDWORD);
02157 BOOL      WINAPI RedisplayPenData(HDC, HPENDATA, LPPOINT, LPPOINT,
02158                                   int, DWORD);
02159 int       WINAPI RemovePenDataStrokes(HPENDATA, UINT, UINT);
02160 BOOL      WINAPI ResizePenData(HPENDATA, LPRECT);
02161 int       WINAPI SetStrokeAttributes(HPENDATA, UINT, LPARAM, UINT);
02162 int       WINAPI SetStrokeTableAttributes(HPENDATA, UINT, LPARAM, UINT);
02163 int       WINAPI TrimPenData(HPENDATA, DWORD, DWORD);
02164
02165 #endif /*!NOPENDATA */
02166
02167 //---------------------------------------------------------------------------
02168 #ifndef NOPENDICT   // not available in WIN32
02169
02170 // Dictionary:
02171 BOOL      WINAPI DictionarySearch(LPRC, LPSYE, int, LPSYV, int);
02172 #endif /*!NOPENDICT */
02173
02174 //---------------------------------------------------------------------------
02175 #ifndef NOPENDRIVER
02176
02177 // Pen Hardware/Driver:
02178 #ifndef NOPENAPIFUN
02179 BOOL      WINAPI EndPenCollection(REC);
02180 REC       WINAPI GetPenHwData(LPPOINT, LPVOID, int, UINT, LPSTROKEINFO);
02181 REC       WINAPI GetPenHwEventData(UINT, UINT, LPPOINT, LPVOID,
02182                                    int, LPSTROKEINFO);
02183 BOOL      WINAPI SetPenHook(HKP, LPFNRAWHOOK);
02184 VOID      WINAPI UpdatePenInfo(LPPENINFO);
02185 #endif //!NOPENAPIFUN
02186 BOOL      WINAPI GetPenAsyncState(UINT);
02187 BOOL      WINAPI IsPenEvent(UINT, LONG);
02188 #endif /*!NOPENDRIVER */
02189
02190 //---------------------------------------------------------------------------
02191 #ifndef NOPENHRC
02192
02193 // Handwriting Recognizer:
02194 int       WINAPI AddPenDataHRC(HRC, HPENDATA);
02195 int       WINAPI AddPenInputHRC(HRC, LPPOINT, LPVOID, UINT, LPSTROKEINFO);
02196 int       WINAPI AddWordsHWL(HWL, LPSTR, UINT);
02197 int       WINAPI ConfigHREC(HREC, UINT, WPARAM, LPARAM);
02198 HRC       WINAPI CreateCompatibleHRC(HRC, HREC);
02199 HWL       WINAPI CreateHWL(HREC, LPSTR, UINT, DWORD);
02200 HINKSET   WINAPI CreateInksetHRCRESULT(HRCRESULT, UINT, UINT);
02201 HPENDATA  WINAPI CreatePenDataHRC(HRC);
02202 int       WINAPI DestroyHRC(HRC);
02203 int       WINAPI DestroyHRCRESULT(HRCRESULT);
02204 int       WINAPI DestroyHWL(HWL);
02205 int       WINAPI EnableGestureSetHRC(HRC, SYV, BOOL);
02206 int       WINAPI EnableSystemDictionaryHRC(HRC, BOOL);
02207 int       WINAPI EndPenInputHRC(HRC);
02208 int       WINAPI GetAlphabetHRC(HRC, LPALC, LPBYTE);
02209 int       WINAPI GetAlphabetPriorityHRC(HRC, LPALC, LPBYTE);
02210 int       WINAPI GetAlternateWordsHRCRESULT(HRCRESULT, UINT, UINT,
02211                                             LPHRCRESULT, UINT);
02212 int       WINAPI GetBoxMappingHRCRESULT(HRCRESULT, UINT, UINT, UINT FAR*);
02213 int       WINAPI GetBoxResultsHRC(HRC, UINT, UINT, UINT, LPBOXRESULTS, BOOL);
02214 int       WINAPI GetGuideHRC(HRC, LPGUIDE, UINT FAR*);
02215 int       WINAPI GetHotspotsHRCRESULT(HRCRESULT, UINT, LPPOINT, UINT);
02216 HREC      WINAPI GetHRECFromHRC(HRC);
02217 int       WINAPI GetInternationalHRC(HRC, UINT FAR*, LPSTR, UINT FAR*,
02218                                      UINT FAR*);
02219 int       WINAPI GetMaxResultsHRC(HRC);
02220 int       WINAPI GetResultsHRC(HRC, UINT, LPHRCRESULT, UINT);
02221 int       WINAPI GetSymbolCountHRCRESULT(HRCRESULT);
02222 int       WINAPI GetSymbolsHRCRESULT(HRCRESULT, UINT, LPSYV, UINT);
02223 int       WINAPI GetWordlistHRC(HRC, LPHWL);
02224 int       WINAPI GetWordlistCoercionHRC(HRC);
02225 int       WINAPI ProcessHRC(HRC, DWORD);
02226 int       WINAPI ReadHWL(HWL, HFILE);
02227 int       WINAPI SetAlphabetHRC(HRC, ALC, LPBYTE);
02228 int       WINAPI SetAlphabetPriorityHRC(HRC, ALC, LPBYTE);
02229 int       WINAPI SetBoxAlphabetHRC(HRC, LPALC, UINT);
02230 int       WINAPI SetGuideHRC(HRC, LPGUIDE, UINT);
02231 int       WINAPI SetInternationalHRC(HRC, UINT, LPCSTR, UINT, UINT);
02232 int       WINAPI SetMaxResultsHRC(HRC, UINT);
02233 HRECHOOK  WINAPI SetResultsHookHREC(HREC, HRCRESULTHOOKPROC);
02234 int       WINAPI SetWordlistCoercionHRC(HRC, UINT);
02235 int       WINAPI SetWordlistHRC(HRC, HWL);
02236 int       WINAPI TrainHREC(HREC, LPSYV, UINT, HPENDATA, UINT);
02237 int       WINAPI UnhookResultsHookHREC(HREC, HRECHOOK);
02238 int       WINAPI WriteHWL(HWL, HFILE);
02239
02240 // Recognizer Installation:
02241 HREC      WINAPI InstallRecognizer(LPSTR);
02242 VOID      WINAPI UninstallRecognizer(HREC);
02243
02244 // Inksets:
02245 BOOL      WINAPI AddInksetInterval(HINKSET, LPINTERVAL);
02246 HINKSET   WINAPI CreateInkset(UINT);
02247 BOOL      WINAPI DestroyInkset(HINKSET);
02248 int       WINAPI GetInksetInterval(HINKSET, UINT, LPINTERVAL);
02249 int       WINAPI GetInksetIntervalCount(HINKSET);
02250
02251 // Symbol Values:
02252 int       WINAPI CharacterToSymbol(LPSTR, int, LPSYV);
02253 BOOL      WINAPI SymbolToCharacter(LPSYV, int, LPSTR, LPINT);
02254 #endif /*!NOPENHRC */
02255
02256 //---------------------------------------------------------------------------
02257 #ifndef NOPENINKPUT
02258
02259 // Pen Input/Inking:
02260 int       WINAPI DoDefaultPenInput(HWND, UINT);
02261 int       WINAPI GetPenInput(HPCM, LPPOINT, LPVOID, UINT, UINT, LPSTROKEINFO);
02262 int       WINAPI PeekPenInput(HPCM, UINT, LPPOINT, LPVOID, UINT);
02263 int       WINAPI StartInking(HPCM, UINT, LPINKINGINFO);
02264 HPCM      WINAPI StartPenInput(HWND, UINT, LPPCMINFO, LPINT);
02265 int       WINAPI StopInking(HPCM);
02266 int       WINAPI StopPenInput(HPCM, UINT, int);
02267 #endif /*!NOPENINKPUT */
02268
02269 //---------------------------------------------------------------------------
02270 #ifndef NOPENMISC
02271
02272 // Miscellaneous/Utilities:
02273 VOID      WINAPI BoundingRectFromPoints(LPPOINT, UINT, LPRECT);
02274 BOOL      WINAPI DPtoTP(LPPOINT, int);
02275 UINT      WINAPI GetPenAppFlags(VOID);
02276 VOID      WINAPI SetPenAppFlags(UINT, UINT);
02277 LONG      WINAPI GetPenMiscInfo(WPARAM, LPARAM);
02278 UINT      WINAPI GetVersionPenWin(VOID);
02279 LONG      WINAPI SetPenMiscInfo(WPARAM, LPARAM);
02280 BOOL      WINAPI TPtoDP(LPPOINT, int);
02281 BOOL      WINAPI CorrectWriting(HWND, LPSTR, UINT, LPVOID, DWORD, DWORD);
02282 #ifndef _WIN32
02283 UINT      WINAPI IsPenAware(VOID);
02284 VOID      WINAPI RegisterPenApp(UINT, UINT);
02285 #endif //!_WIN32
02286
02287 #endif /*!NOPENMISC */
02288
02289 //---------------------------------------------------------------------------
02290 #ifndef NOPENRC1    // not available in WIN32
02291
02292 // RC1:
02293 VOID      WINAPI EmulatePen(BOOL);
02294 UINT      WINAPI EnumSymbols(LPSYG, UINT, ENUMPROC, LPVOID);
02295 BOOL      WINAPI ExecuteGesture(HWND, SYV, LPRCRESULT);
02296 VOID      WINAPI FirstSymbolFromGraph(LPSYG, LPSYV, int, LPINT);
02297 UINT      WINAPI GetGlobalRC(LPRC, LPSTR, LPSTR, int);
02298 int       WINAPI GetSymbolCount(LPSYG);
02299 int       WINAPI GetSymbolMaxLength(LPSYG);
02300 VOID      WINAPI InitRC(HWND, LPRC);
02301 REC       WINAPI ProcessWriting(HWND, LPRC);
02302 REC       WINAPI Recognize(LPRC);
02303 REC       WINAPI RecognizeData(LPRC, HPENDATA);
02304 UINT      WINAPI SetGlobalRC(LPRC, LPSTR, LPSTR);
02305 BOOL      WINAPI SetRecogHook(UINT, UINT, HWND);
02306 BOOL      WINAPI TrainContext(LPRCRESULT, LPSYE, int, LPSYC, int);
02307 BOOL      WINAPI TrainInk(LPRC, HPENDATA, LPSYV);
02308
02309 // Custom Recognizer functions - not PenWin APIs (formerly in penwoem.h):
02310 VOID      WINAPI CloseRecognizer(VOID);
02311 UINT      WINAPI ConfigRecognizer(UINT, WPARAM, LPARAM);
02312 BOOL      WINAPI InitRecognizer(LPRC);
02313 REC       WINAPI RecognizeDataInternal(LPRC, HPENDATA, LPFUNCRESULTS);
02314 REC       WINAPI RecognizeInternal(LPRC, LPFUNCRESULTS);
02315 BOOL      WINAPI TrainContextInternal(LPRCRESULT, LPSYE, int, LPSYC, int);
02316 BOOL      WINAPI TrainInkInternal(LPRC, HPENDATA, LPSYV);
02317 #endif /*!NOPENRC1 */
02318
02319 //---------------------------------------------------------------------------
02320 #ifndef NOPENTARGET
02321
02322 // Ink Targeting:
02323 int       WINAPI TargetPoints(LPTARGINFO, LPPOINT, DWORD, UINT, LPSTROKEINFO);
02324
02325 #endif /*!NOPENTARGET */
02326
02327 //---------------------------------------------------------------------------
02328 #ifndef NOPENVIRTEVENT
02329
02330 // Virtual Event Layer:
02331 VOID      WINAPI AtomicVirtualEvent(BOOL);
02332 VOID      WINAPI PostVirtualKeyEvent(UINT, BOOL);
02333 VOID      WINAPI PostVirtualMouseEvent(UINT, int, int);
02334 #endif /*!NOPENVIRTEVENT */
02335
02336 //---------------------------------------------------------------------------
02337
02338 #ifdef  JAPAN
02339 // Kanji
02340 BOOL      WINAPI KKConvert(HWND hwndConvert, HWND hwndCaller,
02341                            LPSTR lpBuf, UINT cbBuf, LPPOINT lpPnt);
02342
02343 #endif //  JAPAN
02344
02345 #endif /* RC_INVOKED */ // ... all the way back from definitions:3
02346
02347 /****** End of Header Info *************************************************/
02348
02349 #ifdef __cplusplus
02350 }
02351 #endif /* __cplusplus */
02352
02353 #ifndef _WIN32
02354 #ifndef RC_INVOKED
02355 #pragma pack()
02356 #endif /* RC_INVOKED */
02357 #endif //!_WIN32
02358
02359 #endif /* #define _INC_PENWIN */
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar.h Source File

  • vc2008fp
  • RibbonMDI

WorkspaceBar.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CWorkspaceBar : public CDockablePane
00015 {
00016 public:
00017   CWorkspaceBar();
00018
00019 // Attributes
00020 protected:
00021   CTreeCtrl m_wndTree;
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027
00028 // Implementation
00029 public:
00030   virtual ~CWorkspaceBar();
00031
00032 protected:
00033   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00034   afx_msg void OnSize(UINT nType, int cx, int cy);
00035   afx_msg void OnPaint();
00036
00037   DECLARE_MESSAGE_MAP()
00038 };
00039
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/mainfrm.cpp Source File

  • general
  • rowlist

mainfrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "RowList.h"
00014
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   ON_WM_CREATE()
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 static UINT indicators[] =
00037 {
00038   ID_SEPARATOR,           // status line indicator
00039   ID_INDICATOR_CAPS,
00040   ID_INDICATOR_NUM,
00041   ID_INDICATOR_SCRL,
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMainFrame construction/destruction
00046
00047 CMainFrame::CMainFrame()
00048 {
00049   // TODO: add member initialization code here
00050
00051 }
00052
00053 CMainFrame::~CMainFrame()
00054 {
00055 }
00056
00057 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00058 {
00059   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00060     return -1;
00061
00062   if (!m_wndToolBar.Create(this) ||
00063     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00064   {
00065     TRACE0("Failed to create toolbar\n");
00066     return -1;      // fail to create
00067   }
00068
00069   if (!m_wndStatusBar.Create(this) ||
00070     !m_wndStatusBar.SetIndicators(indicators,
00071       sizeof(indicators)/sizeof(UINT)))
00072   {
00073     TRACE0("Failed to create status bar\n");
00074     return -1;      // fail to create
00075   }
00076
00077   // TODO: Remove this if you don't want tool tips or a resizeable toolbar
00078   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00079     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00080
00081   // TODO: Delete these three lines if you don't want the toolbar to
00082   //  be dockable
00083   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00084   EnableDocking(CBRS_ALIGN_ANY);
00085   DockControlBar(&m_wndToolBar);
00086
00087   return 0;
00088 }
00089
00090 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00091 {
00092   // TODO: Modify the Window class or styles here by modifying
00093   //  the CREATESTRUCT cs
00094   cs.style&=~FWS_ADDTOTITLE;
00095
00096   return CFrameWnd::PreCreateWindow(cs);
00097 }
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CMainFrame diagnostics
00101
00102 #ifdef _DEBUG
00103 void CMainFrame::AssertValid() const
00104 {
00105   CFrameWnd::AssertValid();
00106 }
00107
00108 void CMainFrame::Dump(CDumpContext& dc) const
00109 {
00110   CFrameWnd::Dump(dc);
00111 }
00112
00113 #endif //_DEBUG
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExplore.h Source File

  • internet
  • DHtmlExplore

DHtmlExplore.h

Go to the documentation of this file.
00001 // DHtmlExplore.h : main header file for the DHTMLEXPLORE application
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"   // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDHtmlExploreApp:
00021 // See DHtmlExplore.cpp for the implementation of this class
00022 //
00023
00024 class CDHtmlExploreApp : public CWinApp
00025 {
00026 public:
00027   CDHtmlExploreApp();
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CDHtmlExploreApp)
00032   public:
00033   virtual BOOL InitInstance();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037
00038   //{{AFX_MSG(CDHtmlExploreApp)
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047
00048 //{{AFX_INSERT_LOCATION}}
00049 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViews.cpp Source File

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViews.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "OutlookMultiViews.h"
00003
00004 #include "MainFrm.h"
00005 #include "OutlookMultiViewsDoc.h"
00006 #include "OutlookMultiViewsView.h"
00007
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #undef THIS_FILE
00011 static char THIS_FILE[] = __FILE__;
00012 #endif
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // COutlookMultiViewsApp
00016
00017 BEGIN_MESSAGE_MAP(COutlookMultiViewsApp, CWinAppEx)
00018   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00019   // Standard file based document commands
00020   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00021   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00022   // Standard print setup command
00023   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00024 END_MESSAGE_MAP()
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // COutlookMultiViewsApp construction
00028
00029 COutlookMultiViewsApp::COutlookMultiViewsApp() : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00030 {
00031   // TODO: add construction code here,
00032   // Place all significant initialization in InitInstance
00033 }
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // The one and only COutlookMultiViewsApp object
00037
00038 COutlookMultiViewsApp theApp;
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // COutlookMultiViewsApp initialization
00042
00043 BOOL COutlookMultiViewsApp::InitInstance()
00044 {
00045   // Initialize OLE libraries
00046   if (!AfxOleInit())
00047   {
00048     AfxMessageBox(IDP_OLE_INIT_FAILED);
00049     return FALSE;
00050   }
00051
00052   AfxEnableControlContainer();
00053
00054   // Standard initialization
00055   // If you are not using these features and wish to reduce the size
00056   //  of your final executable, you should remove from the following
00057   //  the specific initialization routines you do not need.
00058
00059   // Change the registry key under which our settings are stored.
00060   // TODO: You should modify this string to be something appropriate
00061   // such as the name of your company or organization.
00062   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00063
00064   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00065
00066   SetRegistryBase (_T("Settings"));
00067
00068   // Initialize all Managers for usage. They are automatically constructed
00069   // if not yet present
00070   InitContextMenuManager();
00071   InitKeyboardManager();
00072
00073   // Register the application's document templates.  Document templates
00074   //  serve as the connection between documents, frame windows and views.
00075
00076   CSingleDocTemplate* pDocTemplate;
00077   pDocTemplate = new CSingleDocTemplate(
00078     IDR_MAINFRAME,
00079     RUNTIME_CLASS(COutlookMultiViewsDoc),
00080     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00081     RUNTIME_CLASS(COutlookMultiViewsView));
00082   AddDocTemplate(pDocTemplate);
00083
00084   // Parse command line for standard shell commands, DDE, file open
00085   CCommandLineInfo cmdInfo;
00086   ParseCommandLine(cmdInfo);
00087
00088   // Dispatch commands specified on the command line
00089   if (!ProcessShellCommand(cmdInfo))
00090     return FALSE;
00091
00092   ((CMainFrame*)m_pMainWnd)->InitViews ();
00093
00094   // The one and only window has been initialized, so show and update it.
00095   m_pMainWnd->ShowWindow(SW_SHOW);
00096   m_pMainWnd->UpdateWindow();
00097
00098   return TRUE;
00099 }
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CAboutDlg dialog used for App About
00103
00104 class CAboutDlg : public CDialog
00105 {
00106 public:
00107   CAboutDlg();
00108
00109 // Dialog Data
00110   //{{AFX_DATA(CAboutDlg)
00111   enum { IDD = IDD_ABOUTBOX };
00112   //}}AFX_DATA
00113
00114   // ClassWizard generated virtual function overrides
00115   //{{AFX_VIRTUAL(CAboutDlg)
00116   protected:
00117   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00118   //}}AFX_VIRTUAL
00119
00120 // Implementation
00121 protected:
00122   //{{AFX_MSG(CAboutDlg)
00123     // No message handlers
00124   //}}AFX_MSG
00125   DECLARE_MESSAGE_MAP()
00126 };
00127
00128 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00129 {
00130   //{{AFX_DATA_INIT(CAboutDlg)
00131   //}}AFX_DATA_INIT
00132 }
00133
00134 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00135 {
00136   CDialog::DoDataExchange(pDX);
00137   //{{AFX_DATA_MAP(CAboutDlg)
00138   //}}AFX_DATA_MAP
00139 }
00140
00141 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00142   //{{AFX_MSG_MAP(CAboutDlg)
00143     // No message handlers
00144   //}}AFX_MSG_MAP
00145 END_MESSAGE_MAP()
00146
00147 // App command to run the dialog
00148 void COutlookMultiViewsApp::OnAppAbout()
00149 {
00150   CAboutDlg aboutDlg;
00151   aboutDlg.DoModal();
00152 }
00153
00154 /////////////////////////////////////////////////////////////////////////////
00155 // COutlookMultiViewsApp message handlers
00156
00157 int COutlookMultiViewsApp::ExitInstance()
00158 {
00159   return CWinAppEx::ExitInstance();
00160 }
00161
00162 void COutlookMultiViewsApp::PreLoadState ()
00163 {
00164
00165   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00166
00167   // TODO: add another context menus here
00168 }
00169
00170
00171 /////////////////////////////////////////////////////////////////////////////
00172 // COutlookMultiViewsApp message handlers
00173
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIDataObjectDlg Member List

This is the complete list of members for CIDataObjectDlg, including all inherited members.
AddItem(UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType, int cColumns, LPCOLUMNSTRUCT rgCol) | CIDataObjectDlg | [protected]
AddItem(UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType) | CIDataObjectDlg | [protected]
AddItem(UINT nLevel, LPTSTR sz, LPVOID lpData) | CIDataObjectDlg | [protected]
CIDataObjectDlg(HWND hwnd, LPDATAOBJECT lpDO, REFIID riid, LPTSTR lpszName) | CIDataObjectDlg |
CImpIAdviseSink class | CIDataObjectDlg | [friend]
DoIDataObject(UINT nLevel, LPDATAOBJECT pI) | CIDataObjectDlg | [protected]
DoIEnumFormatEtc(UINT nLevel, LPENUMFORMATETC pI) | CIDataObjectDlg | [protected]
DoModal(void) | CIDataObjectDlg |
fnIDataObjectDlg(HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) | CIDataObjectDlg | [friend]
GotData(LPFORMATETC lpfetc, LPSTGMEDIUM lpstm) | CIDataObjectDlg | [protected]
m_advf | CIDataObjectDlg |
m_btnDoGetData | CIDataObjectDlg |
m_btnSetupAdvise | CIDataObjectDlg |
m_cchOutput | CIDataObjectDlg |
m_chkDump | CIDataObjectDlg |
m_chkPrimeFirst | CIDataObjectDlg |
m_chkUpdateDisplay | CIDataObjectDlg |
m_cLinesOutput | CIDataObjectDlg |
m_cOnDataChanges | CIDataObjectDlg |
m_dwConn | CIDataObjectDlg |
m_dwTime | CIDataObjectDlg |
m_edtAdvise | CIDataObjectDlg |
m_fDoOnGetDataPosted | CIDataObjectDlg |
m_fetc | CIDataObjectDlg |
m_fUpdateDisplay | CIDataObjectDlg |
m_hDlg | CIDataObjectDlg |
m_hWndParent | CIDataObjectDlg |
m_lbFmtEtc | CIDataObjectDlg |
m_lbGetData | CIDataObjectDlg |
m_lpDO | CIDataObjectDlg |
m_lpszName | CIDataObjectDlg |
m_MetaFile | CIDataObjectDlg |
m_pSink | CIDataObjectDlg |
m_szOutput | CIDataObjectDlg |
OnDblClkFormatEtc() | CIDataObjectDlg | [protected]
OnDestroy() | CIDataObjectDlg | [protected]
OnDoGetData() | CIDataObjectDlg | [protected]
OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct) | CIDataObjectDlg | [protected]
OnInitDialog() | CIDataObjectDlg | [protected]
OnKillAdvise() | CIDataObjectDlg | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CIDataObjectDlg | [protected]
OnOutputBufferHasData() | CIDataObjectDlg | [protected]
OnSelChangeFormatEtc() | CIDataObjectDlg | [protected]
OnSetupAdvise() | CIDataObjectDlg | [protected]
OnSize(UINT nType, int cx, int cy) | CIDataObjectDlg | [protected]
WriteToOutput(LPTSTR lpsz) | CIDataObjectDlg | [protected]
~CIDataObjectDlg() | CIDataObjectDlg |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/time.odl Source File

  • controls
  • time

time.odl

Go to the documentation of this file.
00001 // time.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (time.tlb) that will become a resource in
00005 // time.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(DCF07690-BA7A-101A-B57A-0000C0C3ED5F), version(1.0),
00019   helpstring("Time OLE Custom Control module"), control ]
00020 library TimeLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CTimeCtrl
00026
00027   [ uuid(37446B91-5870-101B-B57B-00608CC96AFA),
00028     helpstring("Dispatch interface for Time Control"), hidden ]
00029   dispinterface _DTime
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CTimeCtrl)
00035       [id(1)] short Interval;
00036       [id(DISPID_ENABLED), bindable, requestedit] boolean Enabled;
00037       //}}AFX_ODL_PROP
00038
00039     methods:
00040       // NOTE - ClassWizard will maintain method information here.
00041       //    Use extreme caution when editing this section.
00042       //{{AFX_ODL_METHOD(CTimeCtrl)
00043       //}}AFX_ODL_METHOD
00044
00045       [id(DISPID_ABOUTBOX)] void AboutBox();
00046   };
00047
00048   //  Event dispatch interface for CTimeCtrl
00049
00050   [ uuid(37446B92-5870-101B-B57B-00608CC96AFA),
00051     helpstring("Event interface for Time Control") ]
00052   dispinterface _DTimeEvents
00053   {
00054     properties:
00055       //  Event interface has no properties
00056
00057     methods:
00058       // NOTE - ClassWizard will maintain event information here.
00059       //    Use extreme caution when editing this section.
00060       //{{AFX_ODL_EVENT(CTimeCtrl)
00061       [id(1)] void Timer();
00062       //}}AFX_ODL_EVENT
00063   };
00064
00065   //  Class information for CTimeCtrl
00066
00067   [ uuid(AD44EB81-9E76-4a90-A10D-738EA3D21360),
00068     helpstring("Time Control"), control ]
00069   coclass Time
00070   {
00071     [default] dispinterface _DTime;
00072     [default, source] dispinterface _DTimeEvents;
00073   };
00074
00075   //{{AFX_APPEND_ODL}}
00076 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikvw.h Source File

  • ole
  • acdual

aclikvw.h

Go to the documentation of this file.
00001 // AClikVw.h : interface of the CAutoClickView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CAutoClickView : public CView
00014 {
00015 protected: // create from serialization only
00016   CAutoClickView();
00017   DECLARE_DYNCREATE(CAutoClickView)
00018
00019 // Attributes
00020 public:
00021   CAutoClickDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CAutoClickView)
00029   public:
00030   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00031   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00032   protected:
00033   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00034   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00035   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 public:
00040   virtual ~CAutoClickView();
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:
00047
00048 // Generated message map functions
00049 protected:
00050   //{{AFX_MSG(CAutoClickView)
00051   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00052   //}}AFX_MSG
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
00056 #ifndef _DEBUG  // debug version in ClikView.cpp
00057 inline CAutoClickDoc* CAutoClickView::GetDocument()
00058    { return (CAutoClickDoc*)m_pDocument; }
00059 #endif
00060
00061 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSplitterFrame Member List

This is the complete list of members for CSplitterFrame, including all inherited members.
CSplitterFrame() | CSplitterFrame | [protected]
m_wndSplitter | CSplitterFrame | [protected]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CSplitterFrame | [virtual]
~CSplitterFrame() | CSplitterFrame | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExtCtl.H Source File

  • ole
  • TstCon

ExtCtl.H

Go to the documentation of this file.
00001 // File: ExtCtl.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CTestContainer98Item;
00011 class CTestContainer98View;
00012
00013 extern const IID IID_ITC98ExtendedControl;
00014
00015 #define DISPID_EXT_NAME 0x80010000
00016 #define DISPID_EXT_POSITIONX 0x80010001
00017 #define DISPID_EXT_POSITIONY 0x80010002
00018 #define DISPID_EXT_ACTIVATE 0x80010100
00019 #define DISPID_EXT_DEACTIVATE 0x80010101
00020 #define DISPID_EXT_UIACTIVATE 0x80010102
00021 #define DISPID_EXT_UIDEACTIVATE 0x80010103
00022
00023 class CExtendedControl :
00024    public ITCExtendedControl
00025 {
00026 public:
00027    CExtendedControl();
00028    ~CExtendedControl();
00029
00030    HRESULT Init( REFCLSID clsidControl, CTestContainer98Item* pItem );
00031
00032    static HRESULT CreateInstance( REFCLSID clsidControl,
00033     CTestContainer98Item* pItem, IUnknown* pOuterUnknown, REFIID iid,
00034     void** ppInterface );
00035
00036 public:
00037    STDMETHOD_( ULONG, AddRef )();
00038    STDMETHOD_( ULONG, Release )();
00039    STDMETHOD( QueryInterface )( REFIID iid, void** ppInterface );
00040
00041 public:
00042    STDMETHOD( GetIDsOfNames )( REFIID iid, LPOLESTR* ppszNames, UINT nNames,
00043     LCID lcid, DISPID* pDispIDs );
00044    STDMETHOD( GetTypeInfo )( UINT iTypeInfo, LCID lcid,
00045     ITypeInfo** ppTypeInfo );
00046    STDMETHOD( GetTypeInfoCount )( UINT* pnInfoCount );
00047    STDMETHOD( Invoke )( DISPID dispidMember, REFIID iid, LCID lcid,
00048     WORD wFlags, DISPPARAMS* pdpParams, VARIANT* pvarResult,
00049     EXCEPINFO* pExceptionInfo, UINT* piArgError );
00050
00051    STDMETHOD( get_Name )( BSTR* pbstrName );
00052    STDMETHOD( put_Name )( BSTR bstrName );
00053    STDMETHOD( get_PositionX )( long* px );
00054    STDMETHOD( put_PositionX )( long x );
00055    STDMETHOD( get_PositionY )( long* py );
00056    STDMETHOD( put_PositionY )( long y );
00057    STDMETHOD( get_SizeX )( long* px );
00058    STDMETHOD( put_SizeX )( long x );
00059    STDMETHOD( get_SizeY )( long* py );
00060    STDMETHOD( put_SizeY )( long y );
00061
00062    STDMETHOD( raw_Activate )();
00063    STDMETHOD( raw_Deactivate )();
00064    STDMETHOD( raw_UIActivate )();
00065    STDMETHOD( raw_UIDeactivate )();
00066
00067 protected:
00068    HRESULT InternalInvoke( DISPID dispidMember, REFIID iid, LCID lcid,
00069     WORD wFlags, DISPPARAMS* pdpParams, VARIANT* pvarResult,
00070     EXCEPINFO* pExceptionInfo, UINT* piArgError );
00071
00072 protected:
00073    ULONG m_nRefCount;
00074    IUnknown* m_pControl;
00075    IDispatchPtr m_pInnerDispatch;
00076    ITypeInfoPtr m_pTypeInfo;
00077    CTestContainer98Item* m_pItem;
00078    CTestContainer98View* m_pView;
00079    VARIANT_BOOL m_tVisible;
00080    _bstr_t m_bstrName;
00081    CPoint m_ptPosition;
00082    CSize m_size;
00083 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/itemtemp.cpp Source File

  • general
  • dlgtempl

itemtemp.cpp

Go to the documentation of this file.
00001 // itemtemp.cpp
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014
00015 #include "itemtemp.h"
00016 #include "resource.h"
00017
00018 #define SETRECT(rect, l, t, r, b) \
00019   rect.left = l; \
00020   rect.top = t; \
00021   rect.right = r; \
00022   rect.bottom = b;
00023
00024
00025 CMyDialogTemplate::CMyDialogTemplate()
00026 {
00027   // initialize the 3 dialog items
00028
00029   CRect   rect(10, 10, 80, 35);  // Set default postions for the buttons
00030   m_rgDlgItem[IBUTTON].Initialize(CDialogItem::BUTTON, IDC_MYBUTTON, &rect, _T("Dummy Button"));
00031   SETRECT(rect, 100, 10, 250, 35);
00032   m_rgDlgItem[ISTATICTEXT].Initialize(CDialogItem::STATICTEXT, IDC_MYSTATICTEXT, &rect, _T("Static Text of your choice here."));
00033   SETRECT(rect, 70, 50, 250, 135);
00034   m_rgDlgItem[IEDITCONTROL].Initialize(CDialogItem::EDITCONTROL, IDC_MYEDITCONTROL, &rect,
00035     _T("This is a multiline edit control.  CMyDialogItem::DemoIt holds the essential code of this sample."));
00036
00037   // now initialize the DLGTEMPLATE structure
00038   m_dlgTempl.cx = 280;  // 4 horizontal units are the width of one character
00039   m_dlgTempl.cy = 160;  // 8 vertical units are the height of one character
00040   m_dlgTempl.style = WS_CAPTION | WS_VISIBLE | WS_DLGFRAME | WS_POPUP | DS_MODALFRAME | DS_SETFONT;
00041   m_dlgTempl.dwExtendedStyle = 0;
00042   m_dlgTempl.x = 0;
00043   m_dlgTempl.y = 0;
00044   m_dlgTempl.cdit = 3;  // 3 dialog items in the dialog
00045 }
00046
00047 void CMyDialogTemplate::DemoIt()
00048 {
00049   // The first step is to allocate memory to define the dialog.  The information to be
00050   // stored in the allocated buffer is the following:
00051   //
00052   // 1.  DLGTEMPLATE structure
00053   // 2.    0x0000 (Word) indicating the dialog has no menu
00054   // 3.    0x0000 (Word) Let windows assign default class to the dialog
00055   // 4.    (Caption)  Null terminated unicode string
00056   // 5.    0x000B  (size of the font to be used)
00057   // 6.    "Arial"  (name of the typeface to be used)
00058   // 7.  DLGITEMTEMPLATE structure for the button  (HAS TO BE DWORD ALIGNED)
00059   // 8.    0x0080  to indicate the control is a button
00060   // 9.    (Title). Unicode null terminated string with the caption
00061   // 10.    0x0000   0 extra bytes of data for this control
00062   // 11.  DLGITEMTEMPLATE structure for the Static Text  (HAS TO BE DWORD ALIGNED)
00063   // 12.    0x0081 to indicate the control is static text
00064   // 13.   (Title). Unicode null terminated string with the text
00065   // 14     0x0000.  0 extra bytes of data for this control
00066   // 15. DLGITEMTEMPLATE structure for the Edit Control (HAS TO BE DWORD ALIGNED)
00067   // 16.   0x0082 to indicate an Edit control
00068   // 17.   (Text) - Null terminated unicode string to appear in the edit control
00069   // 18.   0x0000. 0 extra bytes of data for this control
00070
00071   WCHAR szBoxCaption[] = L"Dialog Template Sample -  PRESS <ESC> TO CLOSE THIS DIALOG";
00072   WCHAR szFontName[] = L"ARIAL";
00073
00074   // will first convert the control captions to UNICODE
00075   int     i;
00076
00077   TRY  // catch memory exceptions and don't worry about allocation failures
00078   {
00079     // The following expressions have unnecessary parenthesis trying to make the
00080     // comments more clear.
00081     int nBufferSize =  sizeof(DLGTEMPLATE) + (2 * sizeof(WORD))/*menu and class*/ + sizeof(szBoxCaption);
00082     nBufferSize += sizeof(WORD) + sizeof(szFontName); /* font information*/
00083
00084     nBufferSize = (nBufferSize + 3) & ~3;  // adjust size to make first control DWORD aligned
00085
00086     for (i = 0; i < TOTALITEMS; i++)
00087     {
00088       int nItemLength = sizeof(DLGITEMTEMPLATE) + 3 * sizeof(WORD);
00089       nItemLength += (m_rgDlgItem[i].m_strCaption.GetLength() + 1) * sizeof(WCHAR);
00090
00091       if (i != TOTALITEMS -1 )   // the last control does not need extra bytes
00092         nItemLength = (nItemLength + 3) & ~3;  // take into account gap so next control is DWORD aligned
00093
00094       nBufferSize += nItemLength;
00095     }
00096
00097
00098     HLOCAL hLocal = LocalAlloc(LHND, nBufferSize);
00099     if (hLocal == NULL)
00100       AfxThrowMemoryException();
00101
00102     BYTE*   pBuffer = (BYTE*)LocalLock(hLocal);
00103     if (pBuffer == NULL)
00104     {
00105       LocalFree(hLocal);
00106       AfxThrowMemoryException();
00107     }
00108
00109     BYTE*   pdest = pBuffer;
00110     BYTE* pdestEnd = pdest + nBufferSize;
00111     // transfer DLGTEMPLATE structure to the buffer
00112     memcpy_s(pdest, pdestEnd - pdest, &m_dlgTempl, sizeof(DLGTEMPLATE));
00113     pdest += sizeof(DLGTEMPLATE);
00114     *(WORD*)pdest = 0; // no menu
00115     *(WORD*)(pdest + sizeof(WORD)) = 0;  // use default window class
00116     pdest += 2 * sizeof(WORD);
00117     memcpy_s(pdest, pdestEnd - pdest, szBoxCaption, sizeof(szBoxCaption));
00118     pdest += sizeof(szBoxCaption);
00119     *(WORD*)pdest = 11;  // font size
00120     pdest += sizeof(WORD);
00121     memcpy_s(pdest, pdestEnd - pdest, szFontName, sizeof(szFontName));
00122     pdest += sizeof(szFontName);
00123
00124     // will now transfer the information for each one of the item templates
00125     for (i = 0; i < TOTALITEMS; i++)
00126     {
00127       pdest = (BYTE*)(((DWORD_PTR)pdest + 3) & ~3);  // make the pointer DWORD aligned
00128       memcpy_s(pdest, pdestEnd - pdest, (void *)&m_rgDlgItem[i].m_dlgItemTemplate, sizeof(DLGITEMTEMPLATE));
00129       pdest += sizeof(DLGITEMTEMPLATE);
00130       *(WORD*)pdest = 0xFFFF;  // indicating atom value
00131       pdest += sizeof(WORD);
00132       *(WORD*)pdest = (WORD)m_rgDlgItem[i].m_controltype;    // atom value for the control
00133       pdest += sizeof(WORD);
00134
00135       // transfer the caption even when it is an empty string
00136       WCHAR*  pchCaption;
00137       int     nChars, nActualChars;
00138
00139       nChars = m_rgDlgItem[i].m_strCaption.GetLength() + 1;
00140       pchCaption = new WCHAR[nChars];
00141       nActualChars = MultiByteToWideChar(CP_ACP, 0, m_rgDlgItem[i].m_strCaption, -1, pchCaption, nChars);
00142       ASSERT(nActualChars > 0);
00143       memcpy_s(pdest, pdestEnd - pdest, pchCaption, nActualChars * sizeof(WCHAR));
00144       pdest += nActualChars * sizeof(WCHAR);
00145       delete [] pchCaption;
00146
00147       *(WORD*)pdest = 0;  // How many bytes in data for control
00148       pdest += sizeof(WORD);
00149     }
00150     ASSERT(pdest - pBuffer == nBufferSize); // just make sure we did not overrun the heap
00151
00152     CDialog dlg;
00153     dlg.InitModalIndirect((DLGTEMPLATE*)pBuffer);
00154     dlg.DoModal();  // tadaaa!  this is the line everyone's been waiting for!!!
00155
00156     LocalUnlock(hLocal);
00157     LocalFree(hLocal);
00158   }
00159   CATCH(CMemoryException, e)
00160   {
00161     MessageBox(NULL, _T("Memory allocation for dialog template failed.  Demo aborted!"),
00162       _T("Allocation Failure"), MB_ICONEXCLAMATION | MB_OK);
00163   }
00164   END_CATCH
00165 }
00166
00167 CDialogItem::CDialogItem(enum CDialogItem::controltype ctrlType)
00168 {
00169   m_controltype = ctrlType;
00170 }
00171
00172
00173 void CDialogItem::Initialize(enum controltype ctrltype, UINT nID, CRect* prect, LPCTSTR lpszCaption)
00174 {
00175   // first fill in the type, location and size of the control
00176   m_controltype = ctrltype;
00177   if (prect != NULL)
00178   {
00179     // disable warning on conversion from long to short
00180 #pragma warning(disable : 4244)
00181     m_dlgItemTemplate.x = prect->left;
00182     m_dlgItemTemplate.y = prect->top;
00183     m_dlgItemTemplate.cx = prect->Width();
00184     m_dlgItemTemplate.cy = prect->Height();
00185 #pragma warning(default : 4244)
00186   }
00187   else
00188   {
00189     m_dlgItemTemplate.x = 0;
00190     m_dlgItemTemplate.y = 0;
00191     m_dlgItemTemplate.cx = 10;  // some useless default
00192     m_dlgItemTemplate.cy = 10;
00193   }
00194 #pragma warning(disable : 4244)
00195   m_dlgItemTemplate.dwExtendedStyle = 0;
00196   m_dlgItemTemplate.id = nID;
00197 #pragma warning(default : 4244)
00198
00199   // the styles below are hard coded.  In a real life application you might want to use variables to
00200   // define the sytle.
00201   switch(m_controltype)
00202   {
00203   case BUTTON:
00204     m_dlgItemTemplate.style = WS_CAPTION | WS_VISIBLE | WS_CHILD | WS_TABSTOP | BS_PUSHBUTTON;
00205     break;
00206   case EDITCONTROL:
00207     m_dlgItemTemplate.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | ES_LEFT;
00208     break;
00209   case STATICTEXT:
00210     m_dlgItemTemplate.style = WS_CHILD | WS_VISIBLE | SS_LEFT;
00211     break;
00212   default:
00213     ASSERT(FALSE);  // should never get here, anyway.
00214   }
00215
00216   m_strCaption = (lpszCaption != NULL)? lpszCaption : _T("");
00217 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/notifwdw.cpp Source File

  • general
  • CmnCtrl2

notifwdw.cpp

Go to the documentation of this file.
00001 // NotifyShowCase.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl2.h"
00015 #include "notifwdw.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CNotifyShowCase
00025
00026 CNotifyShowCase::CNotifyShowCase()
00027 {
00028   m_totalLines = 200;  // use this default
00029 }
00030
00031 CNotifyShowCase::~CNotifyShowCase()
00032 {
00033 }
00034
00035 BEGIN_MESSAGE_MAP(CNotifyShowCase, CEdit)
00036   //{{AFX_MSG_MAP(CNotifyShowCase)
00037     // NOTE - the ClassWizard will add and remove mapping macros here.
00038   //}}AFX_MSG_MAP
00039 END_MESSAGE_MAP()
00040
00041 notifDescrip CNotifyShowCase::m_rgNotifDescrip[NOTIFCOUNT] =
00042 {
00043     // list control notifications
00044   {LVN_ITEMCHANGING, _T("LVN_ITEMCHANGING")},
00045   {LVN_ITEMCHANGED, _T("LVN_ITEMCHANGED")},
00046   {LVN_INSERTITEM, _T("LVN_INSERTITEM")},
00047   {LVN_DELETEITEM, _T("LVN_DELETEITEM")},
00048   {LVN_DELETEALLITEMS, _T("LVN_DELETEALLITEMS")},
00049   {LVN_BEGINLABELEDIT, _T("LVN_BEGINLABELEDIT")},
00050   {LVN_ENDLABELEDIT, _T("LVN_ENDLABELEDIT")},
00051   {LVN_BEGINDRAG, _T("LVN_BEGINDRAG")},
00052   {LVN_BEGINRDRAG, _T("LVN_BEGINRDRAG")},
00053   {LVN_COLUMNCLICK, _T("LVN_COLUMNCLICK")},
00054   {LVN_GETDISPINFO, _T("LVN_GETDISPINFO")},
00055   {LVN_SETDISPINFO, _T("LVN_SETDISPINFO")},
00056     // tree control notifications
00057   {TVN_ITEMEXPANDING, _T("TVN_ITEMEXPANDING")},
00058   {TVN_BEGINLABELEDIT, _T("TVN_BEGINLABELEDIT")},
00059   {TVN_ENDLABELEDIT, _T("TVN_ENDLABELEDIT")},
00060   {TVN_SELCHANGING, _T("TVN_SELCHANGING")},
00061   {TVN_SELCHANGED, _T("TVN_SELCHANGED")},
00062   {TVN_GETDISPINFO, _T("TVN_GETDISPINFO")},
00063   {TVN_SETDISPINFO, _T("TVN_SETDISPINFO")},
00064   {TVN_BEGINDRAG, _T("TVN_BEGINDRAG")},
00065   {TVN_KEYDOWN, _T("TVN_KEYDOWN")},
00066   {TVN_DELETEITEM, _T("TVN_DELETEITEM")},
00067   {TVN_ITEMEXPANDED, _T("TVN_ITEMEXPANDED")},
00068 };
00069
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CNotifyShowCase message handlers
00073 void CNotifyShowCase::AddLine(LPCTSTR lpsz)
00074 {
00075   TCHAR   szt[50];
00076   int     nLastChar;
00077   int     cLines;
00078
00079   if (GetLineCount() >= m_totalLines)
00080   {
00081     SetSel(0, LineLength(0), TRUE/*bNoScroll*/);  // select the first line
00082     Clear();  // and remove it
00083   }
00084
00085   nLastChar = LineIndex((cLines = GetLineCount() - 1)) + LineLength(cLines);
00086   _stprintf_s(szt, 50, _T("%s\x0D\x0A"), lpsz);
00087   SetSel(nLastChar, nLastChar, TRUE/*bNoScroll*/);
00088   ReplaceSel(szt);
00089 }
00090
00091 void CNotifyShowCase::ShowNotification(UINT nCode)
00092 {
00093   int i;
00094
00095   for (i = 0; i < NOTIFCOUNT; i++)    // linear search for few items is OK
00096     if (m_rgNotifDescrip[i].nCode == nCode)
00097       break;
00098
00099   if (i == NOTIFCOUNT)
00100   {
00101     TCHAR szt[30];
00102
00103     _stprintf_s(szt, 30, _T("UNKNOWN CODE (%d)"), nCode);
00104     AddLine(szt);
00105   }
00106   else
00107     AddLine(m_rgNotifDescrip[i]. sztCodeName);
00108 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PBagDg.Cpp Source File

  • ole
  • TstCon

PBagDg.Cpp

Go to the documentation of this file.
00001 // CPropertyBagDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 void AutoSetColumnWidth( CListCtrl& list, int iColumn )
00021 {
00022    int nAutoWidth;
00023    int nAutoHeaderWidth;
00024
00025    list.SetColumnWidth( iColumn, LVSCW_AUTOSIZE );
00026    nAutoWidth = list.GetColumnWidth( iColumn );
00027    list.SetColumnWidth( iColumn, LVSCW_AUTOSIZE_USEHEADER );
00028    nAutoHeaderWidth = list.GetColumnWidth( iColumn );
00029    list.SetColumnWidth( iColumn, max( nAutoWidth, nAutoHeaderWidth ) );
00030 }
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CPropertyBagDlg dialog
00034
00035
00036 CPropertyBagDlg::CPropertyBagDlg( CPropertyBag* pPropertyBag, CWnd* pParent ) :
00037    CDialog( CPropertyBagDlg::IDD, pParent ),
00038    m_pPropertyBag( pPropertyBag )
00039 {
00040    ASSERT( m_pPropertyBag != NULL );
00041
00042   //{{AFX_DATA_INIT(CPropertyBagDlg)
00043     // NOTE: the ClassWizard will add member initialization here
00044   //}}AFX_DATA_INIT
00045 }
00046
00047
00048 void CPropertyBagDlg::DoDataExchange(CDataExchange* pDX)
00049 {
00050   CDialog::DoDataExchange(pDX);
00051   //{{AFX_DATA_MAP(CPropertyBagDlg)
00052   DDX_Control(pDX, IDC_PROPERTIES, m_lvProperties);
00053   //}}AFX_DATA_MAP
00054 }
00055
00056
00057 BEGIN_MESSAGE_MAP(CPropertyBagDlg, CDialog)
00058   //{{AFX_MSG_MAP(CPropertyBagDlg)
00059   ON_WM_HELPINFO()
00060   ON_WM_CONTEXTMENU()
00061   //}}AFX_MSG_MAP
00062 END_MESSAGE_MAP()
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CPropertyBagDlg message handlers
00066
00067 BOOL CPropertyBagDlg::OnInitDialog()
00068 {
00069    POSITION posItem;
00070    CPropertyBagItem* pItem;
00071    int iItem;
00072    int iLVItem;
00073    COleVariant varString;
00074    CString strColumnTitle;
00075    CString str;
00076
00077    CDialog::OnInitDialog();
00078
00079    // Add the appropriate columns to the parameter list control.
00080    LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_PROPERTY);
00081    m_lvProperties.InsertColumn( 0, strColumnTitle, LVCFMT_LEFT, 100 );
00082    LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_VALUE);
00083    m_lvProperties.InsertColumn( 1, strColumnTitle, LVCFMT_LEFT, 100 );
00084    LOAD_STRING_FROM_RESOURCE(strColumnTitle, IDS_TYPE);
00085    m_lvProperties.InsertColumn( 2, strColumnTitle, LVCFMT_LEFT, 100 );
00086
00087    iItem = 0;
00088    posItem = m_pPropertyBag->GetFirstItemPosition();
00089    while( posItem != NULL )
00090    {
00091     pItem = m_pPropertyBag->GetNextItem( posItem );
00092     iLVItem = m_lvProperties.InsertItem( iItem, pItem->m_strName );
00093     m_lvProperties.SetItemText( iLVItem, 0, pItem->m_strName );
00094
00095     TRY
00096     {
00097      varString.ChangeType( VT_BSTR, pItem->m_varValue );
00098      str = varString.bstrVal;
00099     }
00100     CATCH( COleException, e )
00101     {
00102     LOAD_STRING_FROM_RESOURCE(str, IDS_UNABLETOREPRESENT);
00103     }
00104     END_CATCH
00105
00106     m_lvProperties.SetItemText( iLVItem, 1, str );
00107     m_lvProperties.SetItemText( iLVItem, 2, VTToString(
00108      pItem->m_varValue.vt ) );
00109
00110     iItem++;
00111    }
00112
00113    AutoSetColumnWidth( m_lvProperties, 0 );
00114    AutoSetColumnWidth( m_lvProperties, 1 );
00115    AutoSetColumnWidth( m_lvProperties, 2 );
00116
00117   return( TRUE );
00118 }
00119
00120
00121 static DWORD rgmapCHID[] =
00122 {
00123    IDC_PROPERTIES, HIDC_PROPERTIES,
00124    0, 0
00125 };
00126
00127 BOOL CPropertyBagDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00128 {
00129   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00130   strPath += _T("::/popups.txt");
00131
00132   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00133 }
00134
00135 void CPropertyBagDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00136 {
00137   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00138   strPath += _T("::/popups.txt");
00139
00140   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00141 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAutoDrivApp Member List

This is the complete list of members for CAutoDrivApp, including all inherited members.
CAutoDrivApp() | CAutoDrivApp |
CAutoDrivApp() | CAutoDrivApp |
InitInstance() | CAutoDrivApp | [virtual]
InitInstance() | CAutoDrivApp | [virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailView.h Source File

  • vc2008fp
  • OutlookDemo

MailView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CMailView view
00014
00015 class CMailView : public CEditView
00016 {
00017 protected:
00018   CMailView();           // protected constructor used by dynamic creation
00019   DECLARE_DYNCREATE(CMailView)
00020
00021 // Attributes
00022 public:
00023   int m_nPriority;
00024
00025 // Overrides
00026 public:
00027   virtual void OnInitialUpdate();
00028
00029 // Implementation
00030 protected:
00031   virtual ~CMailView();
00032 #ifdef _DEBUG
00033   virtual void AssertValid() const;
00034   virtual void Dump(CDumpContext& dc) const;
00035 #endif
00036
00037 protected:
00038   afx_msg void OnMailAttachment();
00039   afx_msg void OnMailCheckNames();
00040   afx_msg void OnMailCopyToFolder();
00041   afx_msg void OnMailDelete();
00042   afx_msg void OnMailFlag();
00043   afx_msg void OnMailFontsize();
00044   afx_msg void OnMailHightPriority();
00045   afx_msg void OnUpdateMailHightPriority(CCmdUI* pCmdUI);
00046   afx_msg void OnMailItem();
00047   afx_msg void OnMailLowPriority();
00048   afx_msg void OnUpdateMailLowPriority(CCmdUI* pCmdUI);
00049   afx_msg void OnMailMoveToFolder();
00050   afx_msg void OnMailOptions();
00051   afx_msg void OnMailProperties();
00052   afx_msg void OnMailSave();
00053   afx_msg void OnMailSaveAttachments();
00054   afx_msg void OnMailSaveStationery();
00055   afx_msg void OnMailSend();
00056   afx_msg void OnMailSignature();
00057   afx_msg void OnMailSpell();
00058   afx_msg void OnMailTo();
00059   afx_msg void OnMailCc();
00060
00061   DECLARE_MESSAGE_MAP()
00062 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCSplit.H Source File

  • ole
  • TstCon

TCSplit.H

Go to the documentation of this file.
00001 // File: TCSplit.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_TCSPLITTER_H__5808BFE0_5166_11D1_8E54_00C04FB68D60__INCLUDED_)
00011 #define AFX_TCSPLITTER_H__5808BFE0_5166_11D1_8E54_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // TCSplitter.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTCSplitter class
00021
00022 #ifndef __AFXEXT_H__
00023 #include <afxext.h>
00024 #endif
00025
00026 class CTCSplitter : public CSplitterWnd
00027 {
00028   DECLARE_DYNAMIC( CTCSplitter )
00029
00030 public:
00031   CTCSplitter();           // protected constructor used by dynamic creation
00032
00033 // Attributes
00034 protected:
00035 public:
00036
00037 // Operations
00038 public:
00039
00040 // Overrides
00041   // ClassWizard generated virtual function overrides
00042   //{{AFX_VIRTUAL(CTCSplitter)
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046 public:
00047   virtual ~CTCSplitter();
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CTCSplitter)
00051     // NOTE - the ClassWizard will add and remove member functions here.
00052   //}}AFX_MSG
00053
00054    afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor );
00055
00056   DECLARE_MESSAGE_MAP()
00057 };
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060
00061 //{{AFX_INSERT_LOCATION}}
00062 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00063
00064 #endif // !defined(AFX_TCSPLITTER_H__5808BFE0_5166_11D1_8E54_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/MainFrm.h Source File

  • vc2008fp
  • WorkSpaceToolBar

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "WorkspaceBar.h"
00014
00015 #define CMDIFrameWnd CMDIFrameWndEx
00016
00017 class CMainFrame : public CMDIFrameWnd
00018 {
00019   DECLARE_DYNAMIC(CMainFrame)
00020 public:
00021   CMainFrame();
00022
00023 // Attributes
00024 public:
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031
00032 // Implementation
00033 public:
00034   virtual ~CMainFrame();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:  // control bar embedded members
00041   CMFCMenuBar   m_wndMenuBar;
00042   CMFCStatusBar m_wndStatusBar;
00043   CMFCToolBar   m_wndToolBar;
00044   CWorkspaceBar m_wndWorkSpace;
00045
00046 protected:
00047   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00048   afx_msg void OnViewCustomize();
00049   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00050   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00051   afx_msg void OnViewWorkspace();
00052   afx_msg void OnUpdateViewWorkspace(CCmdUI* pCmdUI);
00053   afx_msg void OnWindowManager();
00054
00055   DECLARE_MESSAGE_MAP()
00056
00057   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00058 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/palette.h Source File

  • general
  • docktool

palette.h

Go to the documentation of this file.
00001 // palette.h : interface of the CPaletteBar class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CPaletteBar : public CToolBar
00013 {
00014 // Constructor
00015 public:
00016   CPaletteBar();
00017   void SetColumns(UINT nColumns);
00018   UINT GetColumns() { return m_nColumns; };
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Implementation
00027 public:
00028   virtual ~CPaletteBar();
00029 #ifdef _DEBUG
00030   virtual void AssertValid() const;
00031   virtual void Dump(CDumpContext& dc) const;
00032 #endif
00033
00034 protected:
00035   UINT    m_nColumns;
00036
00037 // Generated message map functions
00038 protected:
00039   //{{AFX_MSG(CPaletteBar)
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListSet.h Source File

  • general
  • DBVList

DBVListSet.h

Go to the documentation of this file.
00001 // DBVListSet.h : interface of the CDBVListSet class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_DBVLISTSET_H__13CCB74D_ED59_11D0_8286_00C04FD73634__INCLUDED_)
00013 #define AFX_DBVLISTSET_H__13CCB74D_ED59_11D0_8286_00C04FD73634__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 class CDBVListSet : public CDaoRecordset
00020 {
00021 public:
00022   CDBVListSet(CDaoDatabase* pDatabase = NULL);
00023   DECLARE_DYNAMIC(CDBVListSet)
00024   void SetFilter(CString strCurQuery);
00025   void SetSort(LPCTSTR pszSortField);
00026 // Field/Param Data
00027   //{{AFX_FIELD(CDBVListSet, CDaoRecordset)
00028   CString m_Email;
00029   CString m_Name;
00030   CString m_Phone;
00031   CString m_Location;
00032   CString m_Title;
00033   CString m_Department;
00034   CString m_Division;
00035   //}}AFX_FIELD
00036
00037 // Overrides
00038   // ClassWizard generated virtual function overrides
00039   //{{AFX_VIRTUAL(CDBVListSet)
00040   public:
00041   virtual CString GetDefaultDBName();     // default Database Name
00042   virtual CString GetDefaultSQL();    // default SQL for Recordset
00043   virtual void DoFieldExchange(CDaoFieldExchange* pFX);   // RFX support
00044   //}}AFX_VIRTUAL
00045
00046 // Implementation
00047 #ifdef _DEBUG
00048   virtual void AssertValid() const;
00049   virtual void Dump(CDumpContext& dc) const;
00050 #endif
00051
00052 };
00053
00054 //{{AFX_INSERT_LOCATION}}
00055 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00056
00057 #endif // !defined(AFX_DBVLISTSET_H__13CCB74D_ED59_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/stdafx.cpp Source File

  • vc2008fp
  • VisualStudioDemo

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 // VisualStudioDemo.pch will be the pre-compiled header
00012 // stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

C3WaySplitterFrame Member List

This is the complete list of members for C3WaySplitterFrame, including all inherited members.
C3WaySplitterFrame() | C3WaySplitterFrame | [protected]
m_wndSplitter | C3WaySplitterFrame | [protected]
m_wndSplitter2 | C3WaySplitterFrame | [protected]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | C3WaySplitterFrame | [virtual]
~C3WaySplitterFrame() | C3WaySplitterFrame | [virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibapi.cpp Source File

  • general
  • diblook

dibapi.cpp

Go to the documentation of this file.
00001 //  dibapi.cpp
00002 //
00003 //  Source file for Device-Independent Bitmap (DIB) API.  Provides
00004 //  the following functions:
00005 //
00006 //  PaintDIB()          - Painting routine for a DIB
00007 //  CreateDIBPalette()  - Creates a palette from a DIB
00008 //  FindDIBBits()       - Returns a pointer to the DIB bits
00009 //  DIBWidth()          - Gets the width of the DIB
00010 //  DIBHeight()         - Gets the height of the DIB
00011 //  PaletteSize()       - Gets the size required to store the DIB's palette
00012 //  DIBNumColors()      - Calculates the number of colors
00013 //                        in the DIB's color table
00014 //  CopyHandle()        - Makes a copy of the given global memory block
00015 //
00016 // This is a part of the Microsoft Foundation Classes C++ library.
00017 // Copyright (c) Microsoft Corporation.  All rights reserved.
00018 //
00019 // This source code is only intended as a supplement to the
00020 // Microsoft Foundation Classes Reference and related
00021 // electronic documentation provided with the library.
00022 // See these sources for detailed information regarding the
00023 // Microsoft Foundation Classes product.
00024
00025 #include "stdafx.h"
00026 #include "dibapi.h"
00027 #include <io.h>
00028 #include <errno.h>
00029
00030 /*************************************************************************
00031  *
00032  * PaintDIB()
00033  *
00034  * Parameters:
00035  *
00036  * HDC hDC          - DC to do output to
00037  *
00038  * LPRECT lpDCRect  - rectangle on DC to do output to
00039  *
00040  * HDIB hDIB        - handle to global memory with a DIB spec
00041  *                    in it followed by the DIB bits
00042  *
00043  * LPRECT lpDIBRect - rectangle of DIB to output into lpDCRect
00044  *
00045  * CPalette* pPal   - pointer to CPalette containing DIB's palette
00046  *
00047  * Return Value:
00048  *
00049  * BOOL             - TRUE if DIB was drawn, FALSE otherwise
00050  *
00051  * Description:
00052  *   Painting routine for a DIB.  Calls StretchDIBits() or
00053  *   SetDIBitsToDevice() to paint the DIB.  The DIB is
00054  *   output to the specified DC, at the coordinates given
00055  *   in lpDCRect.  The area of the DIB to be output is
00056  *   given by lpDIBRect.
00057  *
00058  ************************************************************************/
00059
00060 BOOL WINAPI PaintDIB(HDC     hDC,
00061           LPRECT  lpDCRect,
00062           HDIB    hDIB,
00063           LPRECT  lpDIBRect,
00064           CPalette* pPal)
00065 {
00066   LPSTR    lpDIBHdr;            // Pointer to BITMAPINFOHEADER
00067   LPSTR    lpDIBBits;           // Pointer to DIB bits
00068   BOOL     bSuccess=FALSE;      // Success/fail flag
00069   HPALETTE hPal=NULL;           // Our DIB's palette
00070   HPALETTE hOldPal=NULL;        // Previous palette
00071
00072   /* Check for valid DIB handle */
00073   if (hDIB == NULL)
00074     return FALSE;
00075
00076   /* Lock down the DIB, and get a pointer to the beginning of the bit
00077    *  buffer
00078    */
00079   lpDIBHdr  = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
00080   lpDIBBits = ::FindDIBBits(lpDIBHdr);
00081
00082   // Get the DIB's palette, then select it into DC
00083   if (pPal != NULL)
00084   {
00085     hPal = (HPALETTE) pPal->m_hObject;
00086
00087     // Select as background since we have
00088     // already realized in forground if needed
00089     hOldPal = ::SelectPalette(hDC, hPal, TRUE);
00090   }
00091
00092   /* Make sure to use the stretching mode best for color pictures */
00093   ::SetStretchBltMode(hDC, COLORONCOLOR);
00094
00095   /* Determine whether to call StretchDIBits() or SetDIBitsToDevice() */
00096   if ((RECTWIDTH(lpDCRect)  == RECTWIDTH(lpDIBRect)) &&
00097      (RECTHEIGHT(lpDCRect) == RECTHEIGHT(lpDIBRect)))
00098     bSuccess = ::SetDIBitsToDevice(hDC,                    // hDC
00099                    lpDCRect->left,             // DestX
00100                    lpDCRect->top,              // DestY
00101                    RECTWIDTH(lpDCRect),        // nDestWidth
00102                    RECTHEIGHT(lpDCRect),       // nDestHeight
00103                    lpDIBRect->left,            // SrcX
00104                    (int)DIBHeight(lpDIBHdr) -
00105                     lpDIBRect->top -
00106                     RECTHEIGHT(lpDIBRect),   // SrcY
00107                    0,                          // nStartScan
00108                    (WORD)DIBHeight(lpDIBHdr),  // nNumScans
00109                    lpDIBBits,                  // lpBits
00110                    (LPBITMAPINFO)lpDIBHdr,     // lpBitsInfo
00111                    DIB_RGB_COLORS);            // wUsage
00112    else
00113     bSuccess = ::StretchDIBits(hDC,                          // hDC
00114                  lpDCRect->left,                 // DestX
00115                  lpDCRect->top,                  // DestY
00116                  RECTWIDTH(lpDCRect),            // nDestWidth
00117                  RECTHEIGHT(lpDCRect),           // nDestHeight
00118                  lpDIBRect->left,                // SrcX
00119                  lpDIBRect->top,                 // SrcY
00120                  RECTWIDTH(lpDIBRect),           // wSrcWidth
00121                  RECTHEIGHT(lpDIBRect),          // wSrcHeight
00122                  lpDIBBits,                      // lpBits
00123                  (LPBITMAPINFO)lpDIBHdr,         // lpBitsInfo
00124                  DIB_RGB_COLORS,                 // wUsage
00125                  SRCCOPY);                       // dwROP
00126
00127    ::GlobalUnlock((HGLOBAL) hDIB);
00128
00129   /* Reselect old palette */
00130   if (hOldPal != NULL)
00131   {
00132     ::SelectPalette(hDC, hOldPal, TRUE);
00133   }
00134
00135    return bSuccess;
00136 }
00137
00138 /*************************************************************************
00139  *
00140  * CreateDIBPalette()
00141  *
00142  * Parameter:
00143  *
00144  * HDIB hDIB        - specifies the DIB
00145  *
00146  * Return Value:
00147  *
00148  * HPALETTE         - specifies the palette
00149  *
00150  * Description:
00151  *
00152  * This function creates a palette from a DIB by allocating memory for the
00153  * logical palette, reading and storing the colors from the DIB's color table
00154  * into the logical palette, creating a palette from this logical palette,
00155  * and then returning the palette's handle. This allows the DIB to be
00156  * displayed using the best possible colors (important for DIBs with 256 or
00157  * more colors).
00158  *
00159  ************************************************************************/
00160
00161
00162 BOOL WINAPI CreateDIBPalette(HDIB hDIB, CPalette* pPal)
00163 {
00164   LPLOGPALETTE lpPal;      // pointer to a logical palette
00165   HANDLE hLogPal;          // handle to a logical palette
00166   int i;                   // loop index
00167   WORD wNumColors;         // number of colors in color table
00168   LPSTR lpbi;              // pointer to packed-DIB
00169   LPBITMAPINFO lpbmi;      // pointer to BITMAPINFO structure (Win3.0)
00170   LPBITMAPCOREINFO lpbmc;  // pointer to BITMAPCOREINFO structure (old)
00171   BOOL bWinStyleDIB;       // flag which signifies whether this is a Win3.0 DIB
00172   BOOL bResult = FALSE;
00173
00174   /* if handle to DIB is invalid, return FALSE */
00175
00176   if (hDIB == NULL)
00177     return FALSE;
00178
00179    lpbi = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
00180
00181    /* get pointer to BITMAPINFO (Win 3.0) */
00182    lpbmi = (LPBITMAPINFO)lpbi;
00183
00184    /* get pointer to BITMAPCOREINFO (old 1.x) */
00185    lpbmc = (LPBITMAPCOREINFO)lpbi;
00186
00187    /* get the number of colors in the DIB */
00188    wNumColors = ::DIBNumColors(lpbi);
00189
00190    if (wNumColors != 0)
00191    {
00192     /* allocate memory block for logical palette */
00193     hLogPal = ::GlobalAlloc(GHND, sizeof(LOGPALETTE)
00194                   + sizeof(PALETTEENTRY)
00195                   * wNumColors);
00196
00197     /* if not enough memory, clean up and return NULL */
00198     if (hLogPal == 0)
00199     {
00200       ::GlobalUnlock((HGLOBAL) hDIB);
00201       return FALSE;
00202     }
00203
00204     lpPal = (LPLOGPALETTE) ::GlobalLock((HGLOBAL) hLogPal);
00205
00206     /* set version and number of palette entries */
00207     lpPal->palVersion = PALVERSION;
00208     lpPal->palNumEntries = (WORD)wNumColors;
00209
00210     /* is this a Win 3.0 DIB? */
00211     bWinStyleDIB = IS_WIN30_DIB(lpbi);
00212     for (i = 0; i < (int)wNumColors; i++)
00213     {
00214       if (bWinStyleDIB)
00215       {
00216         lpPal->palPalEntry[i].peRed = lpbmi->bmiColors[i].rgbRed;
00217         lpPal->palPalEntry[i].peGreen = lpbmi->bmiColors[i].rgbGreen;
00218         lpPal->palPalEntry[i].peBlue = lpbmi->bmiColors[i].rgbBlue;
00219         lpPal->palPalEntry[i].peFlags = 0;
00220       }
00221       else
00222       {
00223         lpPal->palPalEntry[i].peRed = lpbmc->bmciColors[i].rgbtRed;
00224         lpPal->palPalEntry[i].peGreen = lpbmc->bmciColors[i].rgbtGreen;
00225         lpPal->palPalEntry[i].peBlue = lpbmc->bmciColors[i].rgbtBlue;
00226         lpPal->palPalEntry[i].peFlags = 0;
00227       }
00228     }
00229
00230     /* create the palette and get handle to it */
00231     bResult = pPal->CreatePalette(lpPal);
00232     ::GlobalUnlock((HGLOBAL) hLogPal);
00233     ::GlobalFree((HGLOBAL) hLogPal);
00234   }
00235
00236   ::GlobalUnlock((HGLOBAL) hDIB);
00237
00238   return bResult;
00239 }
00240
00241 /*************************************************************************
00242  *
00243  * FindDIBBits()
00244  *
00245  * Parameter:
00246  *
00247  * LPSTR lpbi       - pointer to packed-DIB memory block
00248  *
00249  * Return Value:
00250  *
00251  * LPSTR            - pointer to the DIB bits
00252  *
00253  * Description:
00254  *
00255  * This function calculates the address of the DIB's bits and returns a
00256  * pointer to the DIB bits.
00257  *
00258  ************************************************************************/
00259
00260
00261 LPSTR WINAPI FindDIBBits(LPSTR lpbi)
00262 {
00263   return (lpbi + *(LPDWORD)lpbi + ::PaletteSize(lpbi));
00264 }
00265
00266
00267 /*************************************************************************
00268  *
00269  * DIBWidth()
00270  *
00271  * Parameter:
00272  *
00273  * LPSTR lpbi       - pointer to packed-DIB memory block
00274  *
00275  * Return Value:
00276  *
00277  * DWORD            - width of the DIB
00278  *
00279  * Description:
00280  *
00281  * This function gets the width of the DIB from the BITMAPINFOHEADER
00282  * width field if it is a Windows 3.0-style DIB or from the BITMAPCOREHEADER
00283  * width field if it is an other-style DIB.
00284  *
00285  ************************************************************************/
00286
00287
00288 DWORD WINAPI DIBWidth(LPSTR lpDIB)
00289 {
00290   LPBITMAPINFOHEADER lpbmi;  // pointer to a Win 3.0-style DIB
00291   LPBITMAPCOREHEADER lpbmc;  // pointer to an other-style DIB
00292
00293   /* point to the header (whether Win 3.0 and old) */
00294
00295   lpbmi = (LPBITMAPINFOHEADER)lpDIB;
00296   lpbmc = (LPBITMAPCOREHEADER)lpDIB;
00297
00298   /* return the DIB width if it is a Win 3.0 DIB */
00299   if (IS_WIN30_DIB(lpDIB))
00300     return lpbmi->biWidth;
00301   else  /* it is an other-style DIB, so return its width */
00302     return (DWORD)lpbmc->bcWidth;
00303 }
00304
00305
00306 /*************************************************************************
00307  *
00308  * DIBHeight()
00309  *
00310  * Parameter:
00311  *
00312  * LPSTR lpbi       - pointer to packed-DIB memory block
00313  *
00314  * Return Value:
00315  *
00316  * DWORD            - height of the DIB
00317  *
00318  * Description:
00319  *
00320  * This function gets the height of the DIB from the BITMAPINFOHEADER
00321  * height field if it is a Windows 3.0-style DIB or from the BITMAPCOREHEADER
00322  * height field if it is an other-style DIB.
00323  *
00324  ************************************************************************/
00325
00326
00327 DWORD WINAPI DIBHeight(LPSTR lpDIB)
00328 {
00329   LPBITMAPINFOHEADER lpbmi;  // pointer to a Win 3.0-style DIB
00330   LPBITMAPCOREHEADER lpbmc;  // pointer to an other-style DIB
00331
00332   /* point to the header (whether old or Win 3.0 */
00333
00334   lpbmi = (LPBITMAPINFOHEADER)lpDIB;
00335   lpbmc = (LPBITMAPCOREHEADER)lpDIB;
00336
00337   /* return the DIB height if it is a Win 3.0 DIB */
00338   if (IS_WIN30_DIB(lpDIB))
00339     return lpbmi->biHeight;
00340   else  /* it is an other-style DIB, so return its height */
00341     return (DWORD)lpbmc->bcHeight;
00342 }
00343
00344
00345 /*************************************************************************
00346  *
00347  * PaletteSize()
00348  *
00349  * Parameter:
00350  *
00351  * LPSTR lpbi       - pointer to packed-DIB memory block
00352  *
00353  * Return Value:
00354  *
00355  * WORD             - size of the color palette of the DIB
00356  *
00357  * Description:
00358  *
00359  * This function gets the size required to store the DIB's palette by
00360  * multiplying the number of colors by the size of an RGBQUAD (for a
00361  * Windows 3.0-style DIB) or by the size of an RGBTRIPLE (for an other-
00362  * style DIB).
00363  *
00364  ************************************************************************/
00365
00366
00367 WORD WINAPI PaletteSize(LPSTR lpbi)
00368 {
00369    /* calculate the size required by the palette */
00370    if (IS_WIN30_DIB (lpbi))
00371     return (WORD)(::DIBNumColors(lpbi) * sizeof(RGBQUAD));
00372    else
00373     return (WORD)(::DIBNumColors(lpbi) * sizeof(RGBTRIPLE));
00374 }
00375
00376
00377 /*************************************************************************
00378  *
00379  * DIBNumColors()
00380  *
00381  * Parameter:
00382  *
00383  * LPSTR lpbi       - pointer to packed-DIB memory block
00384  *
00385  * Return Value:
00386  *
00387  * WORD             - number of colors in the color table
00388  *
00389  * Description:
00390  *
00391  * This function calculates the number of colors in the DIB's color table
00392  * by finding the bits per pixel for the DIB (whether Win3.0 or other-style
00393  * DIB). If bits per pixel is 1: colors=2, if 4: colors=16, if 8: colors=256,
00394  * if 24, no colors in color table.
00395  *
00396  ************************************************************************/
00397
00398
00399 WORD WINAPI DIBNumColors(LPSTR lpbi)
00400 {
00401   WORD wBitCount;  // DIB bit count
00402
00403   /*  If this is a Windows-style DIB, the number of colors in the
00404    *  color table can be less than the number of bits per pixel
00405    *  allows for (i.e. lpbi->biClrUsed can be set to some value).
00406    *  If this is the case, return the appropriate value.
00407    */
00408
00409   if (IS_WIN30_DIB(lpbi))
00410   {
00411     DWORD dwClrUsed;
00412
00413     dwClrUsed = ((LPBITMAPINFOHEADER)lpbi)->biClrUsed;
00414     if (dwClrUsed != 0)
00415       return (WORD)dwClrUsed;
00416   }
00417
00418   /*  Calculate the number of colors in the color table based on
00419    *  the number of bits per pixel for the DIB.
00420    */
00421   if (IS_WIN30_DIB(lpbi))
00422     wBitCount = ((LPBITMAPINFOHEADER)lpbi)->biBitCount;
00423   else
00424     wBitCount = ((LPBITMAPCOREHEADER)lpbi)->bcBitCount;
00425
00426   /* return number of colors based on bits per pixel */
00427   switch (wBitCount)
00428   {
00429     case 1:
00430       return 2;
00431
00432     case 4:
00433       return 16;
00434
00435     case 8:
00436       return 256;
00437
00438     default:
00439       return 0;
00440   }
00441 }
00442
00443
00444 //////////////////////////////////////////////////////////////////////////
00445 //// Clipboard support
00446
00447 //---------------------------------------------------------------------
00448 //
00449 // Function:   CopyHandle (from SDK DibView sample clipbrd.c)
00450 //
00451 // Purpose:    Makes a copy of the given global memory block.  Returns
00452 //             a handle to the new memory block (NULL on error).
00453 //
00454 //             Routine stolen verbatim out of ShowDIB.
00455 //
00456 // Parms:      h == Handle to global memory to duplicate.
00457 //
00458 // Returns:    Handle to new global memory block.
00459 //
00460 //---------------------------------------------------------------------
00461
00462 HGLOBAL WINAPI CopyHandle (HGLOBAL h)
00463 {
00464   if (h == NULL)
00465     return NULL;
00466
00467   DWORD dwLen = (DWORD)::GlobalSize((HGLOBAL) h);
00468   HGLOBAL hCopy = ::GlobalAlloc(GHND, dwLen);
00469
00470   if (hCopy != NULL)
00471   {
00472     void* lpCopy = ::GlobalLock((HGLOBAL) hCopy);
00473     void* lp     = ::GlobalLock((HGLOBAL) h);
00474     memcpy_s(lpCopy, dwLen, lp, dwLen);
00475     ::GlobalUnlock(hCopy);
00476     ::GlobalUnlock(h);
00477   }
00478
00479   return hCopy;
00480 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawtool.cpp Source File

  • ole
  • drawcli

drawtool.cpp

Go to the documentation of this file.
00001 // drawtool.cpp - implementation for drawing tools
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "drawcli.h"
00015 #include "drawdoc.h"
00016 #include "drawvw.h"
00017 #include "drawobj.h"
00018 #include "drawtool.h"
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CDrawTool implementation
00022
00023 CPtrList CDrawTool::c_tools;
00024
00025 static CSelectTool selectTool;
00026 static CRectTool lineTool(line);
00027 static CRectTool rectTool(rect);
00028 static CRectTool roundRectTool(roundRect);
00029 static CRectTool ellipseTool(ellipse);
00030 static CPolyTool polyTool;
00031
00032 CPoint CDrawTool::c_down;
00033 UINT CDrawTool::c_nDownFlags;
00034 CPoint CDrawTool::c_last;
00035 DrawShape CDrawTool::c_drawShape = selection;
00036
00037 CDrawTool::CDrawTool(DrawShape drawShape)
00038 {
00039   m_drawShape = drawShape;
00040   c_tools.AddTail(this);
00041 }
00042
00043 CDrawTool* CDrawTool::FindTool(DrawShape drawShape)
00044 {
00045   POSITION pos = c_tools.GetHeadPosition();
00046   while (pos != NULL)
00047   {
00048     CDrawTool* pTool = (CDrawTool*)c_tools.GetNext(pos);
00049     if (pTool->m_drawShape == drawShape)
00050       return pTool;
00051   }
00052
00053   return NULL;
00054 }
00055
00056 void CDrawTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00057 {
00058   // deactivate any in-place active item on this view!
00059   COleClientItem* pActiveItem = pView->GetDocument()->GetInPlaceActiveItem(pView);
00060   if (pActiveItem != NULL)
00061   {
00062     pActiveItem->Close();
00063     ASSERT(pView->GetDocument()->GetInPlaceActiveItem(pView) == NULL);
00064   }
00065
00066   pView->SetCapture();
00067   c_nDownFlags = nFlags;
00068   c_down = point;
00069   c_last = point;
00070 }
00071
00072 void CDrawTool::OnLButtonDblClk(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& /*point*/)
00073 {
00074 }
00075
00076 void CDrawTool::OnLButtonUp(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& point)
00077 {
00078   ReleaseCapture();
00079
00080   if (point == c_down)
00081     c_drawShape = selection;
00082 }
00083
00084 void CDrawTool::OnMouseMove(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& point)
00085 {
00086   c_last = point;
00087   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
00088 }
00089
00090 void CDrawTool::OnEditProperties(CDrawView* /*pView*/)
00091 {
00092 }
00093
00094 void CDrawTool::OnCancel()
00095 {
00096   c_drawShape = selection;
00097 }
00098
00099 ////////////////////////////////////////////////////////////////////////////
00100 // CResizeTool
00101
00102 enum SelectMode
00103 {
00104   none,
00105   netSelect,
00106   move,
00107   size
00108 };
00109
00110 SelectMode selectMode = none;
00111 int nDragHandle;
00112
00113 CPoint lastPoint;
00114
00115 CSelectTool::CSelectTool()
00116   : CDrawTool(selection)
00117 {
00118 }
00119
00120 void CSelectTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00121 {
00122   CPoint local = point;
00123   pView->ClientToDoc(local);
00124
00125   CDrawObj* pObj;
00126   selectMode = none;
00127
00128   // Check for resizing (only allowed on single selections)
00129   if (pView->m_selection.GetCount() == 1)
00130   {
00131     pObj = pView->m_selection.GetHead();
00132     nDragHandle = pObj->HitTest(local, pView, TRUE);
00133     if (nDragHandle != 0)
00134       selectMode = size;
00135   }
00136
00137   // See if the click was on an object, select and start move if so
00138   if (selectMode == none)
00139   {
00140     pObj = pView->GetDocument()->ObjectAt(local);
00141
00142     if (pObj != NULL)
00143     {
00144       selectMode = move;
00145
00146       if (!pView->IsSelected(pObj))
00147         pView->Select(pObj, (nFlags & MK_SHIFT) != 0);
00148
00149       // Ctrl+Click clones the selection...
00150       if ((nFlags & MK_CONTROL) != 0)
00151         pView->CloneSelection();
00152     }
00153   }
00154
00155   // Click on background, start a net-selection
00156   if (selectMode == none)
00157   {
00158     if ((nFlags & MK_SHIFT) == 0)
00159       pView->Select(NULL);
00160
00161     selectMode = netSelect;
00162
00163     CClientDC dc(pView);
00164     CRect rect(point.x, point.y, point.x, point.y);
00165     rect.NormalizeRect();
00166     dc.DrawFocusRect(rect);
00167   }
00168
00169   lastPoint = local;
00170   CDrawTool::OnLButtonDown(pView, nFlags, point);
00171 }
00172
00173 void CSelectTool::OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point)
00174 {
00175   if ((nFlags & MK_SHIFT) != 0)
00176   {
00177     // Shift+DblClk deselects object...
00178     CPoint local = point;
00179     pView->ClientToDoc(local);
00180     CDrawObj* pObj = pView->GetDocument()->ObjectAt(local);
00181     if (pObj != NULL)
00182       pView->Deselect(pObj);
00183   }
00184   else
00185   {
00186     // "Normal" DblClk opens properties, or OLE server...
00187     if (pView->m_selection.GetCount() == 1)
00188       pView->m_selection.GetHead()->OnOpen(pView);
00189   }
00190
00191   CDrawTool::OnLButtonDblClk(pView, nFlags, point);
00192 }
00193
00194 void CSelectTool::OnEditProperties(CDrawView* pView)
00195 {
00196   if (pView->m_selection.GetCount() == 1)
00197     pView->m_selection.GetHead()->OnEditProperties();
00198 }
00199
00200 void CSelectTool::OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point)
00201 {
00202   if (pView->GetCapture() == pView)
00203   {
00204     if (selectMode == netSelect)
00205     {
00206       CClientDC dc(pView);
00207       CRect rect(c_down.x, c_down.y, c_last.x, c_last.y);
00208       rect.NormalizeRect();
00209       dc.DrawFocusRect(rect);
00210
00211       pView->SelectWithinRect(rect, TRUE);
00212     }
00213     else if (selectMode != none)
00214     {
00215       pView->GetDocument()->UpdateAllViews(pView);
00216     }
00217   }
00218
00219   CDrawTool::OnLButtonUp(pView, nFlags, point);
00220 }
00221
00222 void CSelectTool::OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point)
00223 {
00224   if (pView->GetCapture() != pView)
00225   {
00226     if (c_drawShape == selection && pView->m_selection.GetCount() == 1)
00227     {
00228       CDrawObj* pObj = pView->m_selection.GetHead();
00229       CPoint local = point;
00230       pView->ClientToDoc(local);
00231       int nHandle = pObj->HitTest(local, pView, TRUE);
00232       if (nHandle != 0)
00233       {
00234         SetCursor(pObj->GetHandleCursor(nHandle));
00235         return; // bypass CDrawTool
00236       }
00237     }
00238     if (c_drawShape == selection)
00239       CDrawTool::OnMouseMove(pView, nFlags, point);
00240     return;
00241   }
00242
00243   if (selectMode == netSelect)
00244   {
00245     CClientDC dc(pView);
00246     CRect rect(c_down.x, c_down.y, c_last.x, c_last.y);
00247     rect.NormalizeRect();
00248     dc.DrawFocusRect(rect);
00249     rect.SetRect(c_down.x, c_down.y, point.x, point.y);
00250     rect.NormalizeRect();
00251     dc.DrawFocusRect(rect);
00252
00253     CDrawTool::OnMouseMove(pView, nFlags, point);
00254     return;
00255   }
00256
00257   CPoint local = point;
00258   pView->ClientToDoc(local);
00259   CPoint delta = (CPoint)(local - lastPoint);
00260
00261   POSITION pos = pView->m_selection.GetHeadPosition();
00262   while (pos != NULL)
00263   {
00264     CDrawObj* pObj = pView->m_selection.GetNext(pos);
00265     CRect position = pObj->m_position;
00266
00267     if (selectMode == move)
00268     {
00269       position += delta;
00270       pObj->MoveTo(position, pView);
00271     }
00272     else if (nDragHandle != 0)
00273     {
00274       pObj->MoveHandleTo(nDragHandle, local, pView);
00275     }
00276   }
00277
00278   lastPoint = local;
00279
00280   if (selectMode == size && c_drawShape == selection)
00281   {
00282     c_last = point;
00283     SetCursor(pView->m_selection.GetHead()->GetHandleCursor(nDragHandle));
00284     return; // bypass CDrawTool
00285   }
00286
00287   c_last = point;
00288
00289   if (c_drawShape == selection)
00290     CDrawTool::OnMouseMove(pView, nFlags, point);
00291 }
00292
00293 ////////////////////////////////////////////////////////////////////////////
00294 // CRectTool (does rectangles, round-rectangles, and ellipses)
00295
00296 CRectTool::CRectTool(DrawShape drawShape)
00297   : CDrawTool(drawShape)
00298 {
00299 }
00300
00301 void CRectTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00302 {
00303   CDrawTool::OnLButtonDown(pView, nFlags, point);
00304
00305   CPoint local = point;
00306   pView->ClientToDoc(local);
00307
00308   CDrawRect* pObj = new CDrawRect(CRect(local, CSize(0, 0)));
00309   switch (m_drawShape)
00310   {
00311   default:
00312     ASSERT(FALSE); // unsuported shape!
00313
00314   case rect:
00315     pObj->m_nShape = CDrawRect::rectangle;
00316     break;
00317
00318   case roundRect:
00319     pObj->m_nShape = CDrawRect::roundRectangle;
00320     break;
00321
00322   case ellipse:
00323     pObj->m_nShape = CDrawRect::ellipse;
00324     break;
00325
00326   case line:
00327     pObj->m_nShape = CDrawRect::line;
00328     break;
00329   }
00330   pView->GetDocument()->Add(pObj);
00331   pView->Select(pObj);
00332
00333   selectMode = size;
00334   nDragHandle = 1;
00335   lastPoint = local;
00336 }
00337
00338 void CRectTool::OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point)
00339 {
00340   CDrawTool::OnLButtonDblClk(pView, nFlags, point);
00341 }
00342
00343 void CRectTool::OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point)
00344 {
00345   if (point == c_down)
00346   {
00347     // Don't create empty objects...
00348     CDrawObj *pObj = pView->m_selection.GetTail();
00349     pView->GetDocument()->Remove(pObj);
00350     pObj->Remove();
00351     selectTool.OnLButtonDown(pView, nFlags, point); // try a select!
00352   }
00353
00354   selectTool.OnLButtonUp(pView, nFlags, point);
00355 }
00356
00357 void CRectTool::OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point)
00358 {
00359   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));
00360   selectTool.OnMouseMove(pView, nFlags, point);
00361 }
00362
00363
00364 ////////////////////////////////////////////////////////////////////////////
00365 // CPolyTool
00366
00367 CPolyTool::CPolyTool()
00368   : CDrawTool(poly)
00369 {
00370   m_pDrawObj = NULL;
00371 }
00372
00373 void CPolyTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00374 {
00375   CDrawTool::OnLButtonDown(pView, nFlags, point);
00376
00377   CPoint local = point;
00378   pView->ClientToDoc(local);
00379
00380   if (m_pDrawObj == NULL)
00381   {
00382     pView->SetCapture();
00383
00384     m_pDrawObj = new CDrawPoly(CRect(local, CSize(0, 0)));
00385     pView->GetDocument()->Add(m_pDrawObj);
00386     pView->Select(m_pDrawObj);
00387     m_pDrawObj->AddPoint(local, pView);
00388   }
00389   else if (local == m_pDrawObj->m_points[0])
00390   {
00391     // Stop when the first point is repeated...
00392     ReleaseCapture();
00393     m_pDrawObj->m_nPoints -= 1;
00394     if (m_pDrawObj->m_nPoints < 2)
00395     {
00396       m_pDrawObj->Remove();
00397     }
00398     else
00399     {
00400       pView->InvalObj(m_pDrawObj);
00401     }
00402     m_pDrawObj = NULL;
00403     c_drawShape = selection;
00404     return;
00405   }
00406
00407   local.x += 1; // adjacent points can't be the same!
00408   m_pDrawObj->AddPoint(local, pView);
00409
00410   selectMode = size;
00411   nDragHandle = m_pDrawObj->GetHandleCount();
00412   lastPoint = local;
00413 }
00414
00415 void CPolyTool::OnLButtonUp(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& /*point*/)
00416 {
00417   // Don't release capture yet!
00418 }
00419
00420 void CPolyTool::OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point)
00421 {
00422   if (m_pDrawObj != NULL && (nFlags & MK_LBUTTON) != 0)
00423   {
00424     CPoint local = point;
00425     pView->ClientToDoc(local);
00426     m_pDrawObj->AddPoint(local);
00427     nDragHandle = m_pDrawObj->GetHandleCount();
00428     lastPoint = local;
00429     c_last = point;
00430     SetCursor(AfxGetApp()->LoadCursor(IDC_PENCIL));
00431   }
00432   else
00433   {
00434     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));
00435     selectTool.OnMouseMove(pView, nFlags, point);
00436   }
00437 }
00438
00439 void CPolyTool::OnLButtonDblClk(CDrawView* pView, UINT , const CPoint& )
00440 {
00441   ReleaseCapture();
00442
00443   int nPoints = m_pDrawObj->m_nPoints;
00444   if (nPoints > 2 &&
00445     (m_pDrawObj->m_points[nPoints - 1] == m_pDrawObj->m_points[nPoints - 2] ||
00446     m_pDrawObj->m_points[nPoints - 1].x - 1 == m_pDrawObj->m_points[nPoints - 2].x &&
00447     m_pDrawObj->m_points[nPoints - 1].y == m_pDrawObj->m_points[nPoints - 2].y))
00448
00449   {
00450     // Remove the last point if it's the same as the next to last...
00451     m_pDrawObj->m_nPoints -= 1;
00452     pView->InvalObj(m_pDrawObj);
00453   }
00454
00455   m_pDrawObj = NULL;
00456   c_drawShape = selection;
00457 }
00458
00459 void CPolyTool::OnCancel()
00460 {
00461   CDrawTool::OnCancel();
00462
00463   m_pDrawObj = NULL;
00464 }
00465
00466 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTreeCtrlPage Member List

This is the complete list of members for CTreeCtrlPage, including all inherited members.
CTreeCtrlPage() | CTreeCtrlPage |
DoDataExchange(CDataExchange *pDX) | CTreeCtrlPage | [protected, virtual]
IDD enum value | CTreeCtrlPage |
m_bDisableDragDrop | CTreeCtrlPage |
m_bEditLabels | CTreeCtrlPage |
m_bHasButtons | CTreeCtrlPage |
m_bHasLines | CTreeCtrlPage |
m_bLinesAtRoot | CTreeCtrlPage |
m_bShowSelAlways | CTreeCtrlPage |
m_bSingleExpand | CTreeCtrlPage |
m_cstrStatus | CTreeCtrlPage |
m_hitemDrag | CTreeCtrlPage |
m_hitemDrop | CTreeCtrlPage |
m_mytreectrl | CTreeCtrlPage |
m_notifshowcase | CTreeCtrlPage |
m_rghItem | CTreeCtrlPage |
OnDisabledDragDrop() | CTreeCtrlPage |
OnEditLabels() | CTreeCtrlPage |
OnHasButtons() | CTreeCtrlPage |
OnHasLines() | CTreeCtrlPage |
OnInitDialog() | CTreeCtrlPage | [protected, virtual]
OnLinesAtRoot() | CTreeCtrlPage |
OnShowSelAlways() | CTreeCtrlPage |
OnSingleExpand() | CTreeCtrlPage |
ShowNotification(LPNMHDR pnmhdr, LRESULT *pLResult) | CTreeCtrlPage |
~CTreeCtrlPage() | CTreeCtrlPage |
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetDoc.cpp Source File

  • vc2008fp
  • MenuSubSet

MenuSubSetDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MenuSubSet.h"
00013
00014 #include "MenuSubSetDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMenuSubSetDoc
00024
00025 IMPLEMENT_DYNCREATE(CMenuSubSetDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CMenuSubSetDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CMenuSubSetDoc construction/destruction
00032
00033 CMenuSubSetDoc::CMenuSubSetDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CMenuSubSetDoc::~CMenuSubSetDoc()
00040 {
00041 }
00042
00043 BOOL CMenuSubSetDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CMenuSubSetDoc serialization
00058
00059 void CMenuSubSetDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CMenuSubSetDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CMenuSubSetDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CMenuSubSetDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CMenuSubSetDoc commands
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/frame.h Source File

  • ole
  • oclient

frame.h

Go to the documentation of this file.
00001 // frame.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CMDIFrameWnd
00013 {
00014   DECLARE_DYNAMIC(CMainFrame)
00015 public:
00016   CMainFrame();
00017
00018 // Attributes
00019 public:
00020   CPalette m_palette;
00021
00022 // Operations
00023 public:
00024   BOOL SelectPalette(BOOL bBackground);
00025
00026 // Implementation
00027 public:
00028   virtual ~CMainFrame();
00029 #ifdef _DEBUG
00030   virtual void AssertValid() const;
00031   virtual void Dump(CDumpContext& dc) const;
00032 #endif
00033
00034 // Control bar embedded members
00035 protected:
00036   CStatusBar  m_wndStatusBar;
00037   CToolBar    m_wndToolBar;
00038
00039 // Generated message map functions
00040 protected:
00041   //{{AFX_MSG(CMainFrame)
00042   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00043   afx_msg void OnWindowTileHorz();
00044   afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00045   afx_msg BOOL OnQueryNewPalette();
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgdlg.cpp Source File

  • utility
  • guidgen

guidgdlg.cpp

Go to the documentation of this file.
00001 // guidgdlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "guidgen.h"
00014 #include "guidgdlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CAboutDlg dialog used for App About
00023
00024 class CAboutDlg : public CDialog
00025 {
00026 public:
00027   CAboutDlg();
00028
00029 // Dialog Data
00030   //{{AFX_DATA(CAboutDlg)
00031   enum { IDD = IDD_ABOUTBOX };
00032   //}}AFX_DATA
00033
00034 // Implementation
00035 protected:
00036   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00037   //{{AFX_MSG(CAboutDlg)
00038   virtual BOOL OnInitDialog();
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00044 {
00045   //{{AFX_DATA_INIT(CAboutDlg)
00046   //}}AFX_DATA_INIT
00047 }
00048
00049 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00050 {
00051   CDialog::DoDataExchange(pDX);
00052   //{{AFX_DATA_MAP(CAboutDlg)
00053   //}}AFX_DATA_MAP
00054 }
00055
00056 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00057   //{{AFX_MSG_MAP(CAboutDlg)
00058     // No message handlers
00059   //}}AFX_MSG_MAP
00060 END_MESSAGE_MAP()
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CAboutDlg message handlers
00064
00065 BOOL CAboutDlg::OnInitDialog()
00066 {
00067   CDialog::OnInitDialog();
00068   CenterWindow();
00069
00070   return TRUE;  // return TRUE  unless you set the focus to a control
00071 }
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CGuidGenDlg dialog
00075
00076 CGuidGenDlg::CGuidGenDlg(CWnd* pParent /*=NULL*/)
00077   : CDialog(CGuidGenDlg::IDD, pParent)
00078 {
00079   //{{AFX_DATA_INIT(CGuidGenDlg)
00080   m_nGuidType = -1;
00081   //}}AFX_DATA_INIT
00082   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00083   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00084 }
00085
00086 void CGuidGenDlg::DoDataExchange(CDataExchange* pDX)
00087 {
00088   CDialog::DoDataExchange(pDX);
00089   //{{AFX_DATA_MAP(CGuidGenDlg)
00090   DDX_Radio(pDX, IDC_RADIO1, m_nGuidType);
00091   //}}AFX_DATA_MAP
00092 }
00093
00094 BEGIN_MESSAGE_MAP(CGuidGenDlg, CDialog)
00095   //{{AFX_MSG_MAP(CGuidGenDlg)
00096   ON_WM_SYSCOMMAND()
00097   ON_WM_PAINT()
00098   ON_WM_QUERYDRAGICON()
00099   ON_BN_CLICKED(IDC_NEWGUID, OnNewguid)
00100   //}}AFX_MSG_MAP
00101   ON_CONTROL_RANGE(BN_CLICKED, IDC_RADIO1, IDC_RADIO6, OnChangedSel)
00102 END_MESSAGE_MAP()
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CGuidGenDlg message handlers
00106
00107 static const TCHAR szOptions[] = _T("Options");
00108 static const TCHAR szGuidType[] = _T("GuidType");
00109
00110 BOOL CGuidGenDlg::OnInitDialog()
00111 {
00112   // start with guid type selected last time
00113   m_nGuidType = AfxGetApp()->GetProfileInt(szOptions, szGuidType, 0);
00114
00115   // create random GUID
00116   m_guid = GUID_NULL;
00117   ::CoCreateGuid(&m_guid);
00118   if (m_guid == GUID_NULL)
00119   {
00120     AfxMessageBox(IDP_ERR_CREATE_GUID);
00121     EndDialog(IDABORT);
00122   }
00123
00124   CDialog::OnInitDialog();
00125   OnChangedSel(IDC_RADIO1+m_nGuidType);
00126
00127   if (GetParent() != NULL)
00128     CenterWindow();
00129
00130   // Add "About..." menu item to system menu.
00131
00132   // IDM_ABOUTBOX must be in the system command range.
00133   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00134   ASSERT(IDM_ABOUTBOX < 0xF000);
00135
00136   CMenu* pSysMenu = GetSystemMenu(FALSE);
00137   CString strAboutMenu;
00138   ENSURE(strAboutMenu.LoadString(IDS_ABOUTBOX));
00139   if (!strAboutMenu.IsEmpty())
00140   {
00141     pSysMenu->AppendMenu(MF_SEPARATOR);
00142     pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00143   }
00144
00145   // TODO: Add extra initialization here
00146
00147   return TRUE;  // return TRUE  unless you set the focus to a control
00148 }
00149
00150 void CGuidGenDlg::OnSysCommand(UINT nID, LPARAM lParam)
00151 {
00152   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00153   {
00154     CAboutDlg dlgAbout;
00155     dlgAbout.DoModal();
00156   }
00157   else
00158   {
00159     CDialog::OnSysCommand(nID, lParam);
00160   }
00161 }
00162
00163 // If you add a minimize button to your dialog, you will need the code below
00164 //  to draw the icon.  For MFC applications using the document/view model,
00165 //  this is automatically done for you by the framework.
00166
00167 void CGuidGenDlg::OnPaint()
00168 {
00169   if (IsIconic())
00170   {
00171     CPaintDC dc(this); // device context for painting
00172
00173     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00174
00175     // Center icon in client rectangle
00176     int cxIcon = GetSystemMetrics(SM_CXICON);
00177     int cyIcon = GetSystemMetrics(SM_CYICON);
00178     CRect rect;
00179     GetClientRect(&rect);
00180     int x = (rect.Width() - cxIcon + 1) / 2;
00181     int y = (rect.Height() - cyIcon + 1) / 2;
00182
00183     // Draw the icon
00184     dc.DrawIcon(x, y, m_hIcon);
00185   }
00186   else
00187   {
00188     CDialog::OnPaint();
00189   }
00190 }
00191
00192 // The system calls this to obtain the cursor to display while the user drags
00193 //  the minimized window.
00194 HCURSOR CGuidGenDlg::OnQueryDragIcon()
00195 {
00196   return (HCURSOR)m_hIcon;
00197 }
00198
00199 void CGuidGenDlg::OnChangedSel(UINT /*nID*/)
00200 {
00201   // update m_nGuidType
00202   UpdateData(TRUE);
00203   ASSERT(m_nGuidType >= 0 && m_nGuidType <= 5);
00204
00205   // update the result text
00206   CString strResult;
00207   GetFormattedGuid(strResult);
00208   SetDlgItemText(IDC_RESULTS, strResult);
00209 }
00210
00211 void CGuidGenDlg::OnOK()
00212 {
00213   UpdateData(TRUE);
00214
00215   // save current type selected
00216   AfxGetApp()->WriteProfileInt(szOptions, szGuidType, m_nGuidType);
00217
00218   // copy the string to the clipboard
00219   if (!OpenClipboard())
00220   {
00221     AfxMessageBox(IDP_ERR_OPEN_CLIP);
00222     return;
00223   }
00224
00225   CString strResult;
00226   GetFormattedGuid(strResult);
00227   int nTextLen = (strResult.GetLength()+1)*sizeof(TCHAR);
00228   HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, nTextLen);
00229   if (hGlobal != NULL)
00230   {
00231     LPVOID lpText = GlobalLock(hGlobal);
00232     memcpy_s(lpText, nTextLen, strResult, nTextLen);
00233
00234     EmptyClipboard();
00235     GlobalUnlock(hGlobal);
00236 #ifdef _UNICODE
00237     SetClipboardData(CF_UNICODETEXT, hGlobal);
00238 #else
00239     SetClipboardData(CF_TEXT, hGlobal);
00240 #endif
00241   }
00242   CloseClipboard();
00243 }
00244
00245 void CGuidGenDlg::GetFormattedGuid(CString& rString)
00246 {
00247   // load appropriate formatting string
00248   CString strFormat;
00249   ENSURE(strFormat.LoadString(IDS_FORMATS+m_nGuidType));
00250
00251   // then format into destination
00252   rString.Format(strFormat,
00253     // first copy...
00254     m_guid.Data1, m_guid.Data2, m_guid.Data3,
00255     m_guid.Data4[0], m_guid.Data4[1], m_guid.Data4[2], m_guid.Data4[3],
00256     m_guid.Data4[4], m_guid.Data4[5], m_guid.Data4[6], m_guid.Data4[7],
00257     // second copy...
00258     m_guid.Data1, m_guid.Data2, m_guid.Data3,
00259     m_guid.Data4[0], m_guid.Data4[1], m_guid.Data4[2], m_guid.Data4[3],
00260     m_guid.Data4[4], m_guid.Data4[5], m_guid.Data4[6], m_guid.Data4[7]);
00261 }
00262
00263 void CGuidGenDlg::OnNewguid()
00264 {
00265   // create random GUID using UuidCreate so that we
00266   // can check for more error codes
00267   m_guid = GUID_NULL;
00268   HRESULT hr = ::UuidCreate(&m_guid);
00269
00270   // Errors
00271   if (HRESULT_CODE(hr) != RPC_S_OK)
00272   {
00273     AfxMessageBox(IDP_ERR_NOT_OK);
00274     return;
00275   }
00276
00277   if (m_guid == GUID_NULL)
00278   {
00279     AfxMessageBox(IDP_ERR_CREATE_GUID);
00280     return;
00281   }
00282
00283   // Warnings
00284   if (HRESULT_CODE(hr) == RPC_S_UUID_NO_ADDRESS)
00285     AfxMessageBox(IDP_ERR_NO_ADDRESS);
00286
00287   if (HRESULT_CODE(hr) == RPC_S_UUID_LOCAL_ONLY)
00288     AfxMessageBox(IDP_ERR_LOCAL_ONLY);
00289
00290   // update dialog to match m_guid
00291   OnChangedSel(IDC_RADIO1+m_nGuidType);
00292 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/clikpnt.cpp Source File

  • ole
  • autoclik

clikpnt.cpp

Go to the documentation of this file.
00001 // ClikPnt.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014 #include "ClikPnt.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CAutoClickPoint
00023
00024 IMPLEMENT_DYNCREATE(CAutoClickPoint, CCmdTarget)
00025
00026 CAutoClickPoint::CAutoClickPoint()
00027 {
00028   EnableAutomation();
00029
00030   // To keep the application running as long as an OLE automation
00031   //  object is active, the constructor calls AfxOleLockApp.
00032
00033   AfxOleLockApp();
00034 }
00035
00036 CAutoClickPoint::~CAutoClickPoint()
00037 {
00038   // To terminate the application when all objects created with
00039   //  with OLE automation, the destructor calls AfxOleUnlockApp.
00040
00041   AfxOleUnlockApp();
00042 }
00043
00044 void CAutoClickPoint::OnFinalRelease()
00045 {
00046   // When the last reference for an automation object is released
00047   //  OnFinalRelease is called.  This implementation deletes the
00048   //  object.  Add additional cleanup required for your object before
00049   //  deleting it from memory.
00050
00051   delete this;
00052 }
00053
00054
00055 BEGIN_MESSAGE_MAP(CAutoClickPoint, CCmdTarget)
00056   //{{AFX_MSG_MAP(CAutoClickPoint)
00057     // NOTE - the ClassWizard will add and remove mapping macros here.
00058   //}}AFX_MSG_MAP
00059 END_MESSAGE_MAP()
00060
00061 BEGIN_DISPATCH_MAP(CAutoClickPoint, CCmdTarget)
00062   //{{AFX_DISPATCH_MAP(CAutoClickPoint)
00063   DISP_PROPERTY(CAutoClickPoint, "x", m_x, VT_I2)
00064   DISP_PROPERTY(CAutoClickPoint, "y", m_y, VT_I2)
00065   //}}AFX_DISPATCH_MAP
00066 END_DISPATCH_MAP()
00067
00068 // Note: we add support for IID_IAutoClickPoint to support typesafe binding
00069 //  from VBA.  This IID must match the GUID that is attached to the
00070 //  dispinterface in the .ODL file.
00071
00072 // {0368D830-A050-11CE-B0F3-00AA006C28B3}
00073 static const IID IID_IAutoClickPoint =
00074 { 0x368d830, 0xa050, 0x11ce, { 0xb0, 0xf3, 0x0, 0xaa, 0x0, 0x6c, 0x28, 0xb3 } };
00075
00076 BEGIN_INTERFACE_MAP(CAutoClickPoint, CCmdTarget)
00077   INTERFACE_PART(CAutoClickPoint, IID_IAutoClickPoint, Dispatch)
00078 END_INTERFACE_MAP()
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CAutoClickPoint message handlers
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInputView Member List

This is the complete list of members for CInputView, including all inherited members.
CInputView() | CInputView | [protected]
DoDataExchange(CDataExchange *pDX) | CInputView | [protected, virtual]
GetDocument() | CInputView | [inline]
IDD enum value | CInputView |
m_iColor | CInputView |
m_strData | CInputView |
OnDataChange() | CInputView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CInputView | [protected, virtual]
~CInputView() | CInputView | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgcbar.h Source File

  • general
  • dlgcbr32

Dlgcbar.h

Go to the documentation of this file.
00001 // DlgCbar.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014   Purpose:
00015   Interface for CTheApp.  This class encapsulates the initialization,
00016   running, and termination of the DLGCBAR application.  There must be
00017   exactly one object of class CTheApp in the application.  The object
00018   must be declared at the global level.
00019
00020   Functions:
00021   CTheApp::CTheApp()          -- constructor
00022   CTheApp::~CTheApp()         -- destructor
00023   CTheApp::FirstInstance()    -- locate first instance of app
00024   CTheApp::InitInstance()     -- initialize app-instance
00025   CTheApp::OnHelpAbout()      -- display About box
00026
00027   Development Team:
00028   Mary Kirtland
00029   Ported to 32-bit by:
00030   Mike Hedley
00031   Created by Microsoft Product Support Services, Premier ISV Support
00032   Copyright (c) Microsoft Corporation.  All rights reserved.
00033 \****************************************************************************/
00034
00035 #ifndef __DLGCBAR_H__
00036 #define __DLGCBAR_H__
00037
00038 class CTheApp : public CWinApp
00039 {
00040 public:
00041   CTheApp();
00042
00043 // Overrides
00044   // ClassWizard generated virtual function overrides
00045   //{{AFX_VIRTUAL(CTheApp)
00046   public:
00047   virtual BOOL InitInstance();
00048   //}}AFX_VIRTUAL
00049
00050 // Implementation
00051 public:
00052   virtual ~CTheApp();
00053
00054 protected:
00055   BOOL FirstInstance();
00056
00057   // Generated message map functions
00058   //{{AFX_MSG(CTheApp)
00059   afx_msg void OnHelpAbout();
00060   //}}AFX_MSG
00061   DECLARE_MESSAGE_MAP()
00062 };
00063
00064 #endif //__DLGCBAR_H__
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoView.cpp Source File

  • vc2008fp
  • RibbonMDI

RibbonMDIDemoView.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014
00015 #include "RibbonMDIDemoDoc.h"
00016 #include "RibbonMDIDemoView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CRibbonMDIDemoView
00026
00027 IMPLEMENT_DYNCREATE(CRibbonMDIDemoView, CView)
00028
00029 BEGIN_MESSAGE_MAP(CRibbonMDIDemoView, CView)
00030   ON_WM_CONTEXTMENU()
00031   // Standard printing commands
00032   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00033   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00034   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CRibbonMDIDemoView construction/destruction
00039
00040 CRibbonMDIDemoView::CRibbonMDIDemoView()
00041 {
00042   // TODO: add construction code here
00043
00044 }
00045
00046 CRibbonMDIDemoView::~CRibbonMDIDemoView()
00047 {
00048 }
00049
00050 BOOL CRibbonMDIDemoView::PreCreateWindow(CREATESTRUCT& cs)
00051 {
00052   // TODO: Modify the Window class or styles here by modifying
00053   //  the CREATESTRUCT cs
00054
00055   return CView::PreCreateWindow(cs);
00056 }
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CRibbonMDIDemoView drawing
00060
00061 void CRibbonMDIDemoView::OnDraw(CDC* /*pDC*/)
00062 {
00063 //  CRibbonMDIDemoDoc* pDoc = GetDocument();
00064 //  ASSERT_VALID(pDoc);
00065   // TODO: add draw code for native data here
00066 }
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CRibbonMDIDemoView printing
00070
00071 void CRibbonMDIDemoView::OnFilePrintPreview()
00072 {
00073   AFXPrintPreview (this);
00074 }
00075
00076 BOOL CRibbonMDIDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00077 {
00078   // default preparation
00079   return DoPreparePrinting(pInfo);
00080 }
00081
00082 void CRibbonMDIDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00083 {
00084   // TODO: add extra initialization before printing
00085 }
00086
00087 void CRibbonMDIDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00088 {
00089   // TODO: add cleanup after printing
00090 }
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // CRibbonMDIDemoView diagnostics
00094
00095 #ifdef _DEBUG
00096 void CRibbonMDIDemoView::AssertValid() const
00097 {
00098   CView::AssertValid();
00099 }
00100
00101 void CRibbonMDIDemoView::Dump(CDumpContext& dc) const
00102 {
00103   CView::Dump(dc);
00104 }
00105
00106 CRibbonMDIDemoDoc* CRibbonMDIDemoView::GetDocument() // non-debug version is inline
00107 {
00108   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRibbonMDIDemoDoc)));
00109   return (CRibbonMDIDemoDoc*)m_pDocument;
00110 }
00111 #endif //_DEBUG
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CRibbonMDIDemoView message handlers
00115
00116 void CRibbonMDIDemoView::OnContextMenu(CWnd*, CPoint point)
00117 {
00118   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00119 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/Resource.h Source File

  • vc2008fp
  • RebarTest

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by RebarTest.rc
00004 //
00005 #define IDD_ABOUTBOX        100
00006 #define IDP_OLE_INIT_FAILED     100
00007 #define IDR_MAINFRAME       128
00008 #define IDR_RebarTestTYPE       129
00009 #define IDR_CONTEXT_MENU      130
00010 #define IDR_POPUP_TOOLBAR     131
00011 #define IDB_TOOLBAR256        151
00012 #define IDS_MAIN_TOOLBAR      101
00013 #define ID_VIEW_TOOLBARS      32771
00014 #define IDS_WINDOWS_MANAGER     107
00015 #define IDC_COMPANY_URL             1041
00016 #define ID_VIEW_CUSTOMIZE     32770
00017 #define ID_VIEW_USER_TOOLBAR1   32793
00018 #define ID_VIEW_USER_TOOLBAR2   32794
00019 #define ID_VIEW_USER_TOOLBAR3   32795
00020 #define ID_VIEW_USER_TOOLBAR4   32796
00021 #define ID_VIEW_USER_TOOLBAR5   32797
00022 #define ID_VIEW_USER_TOOLBAR6   32798
00023 #define ID_VIEW_USER_TOOLBAR7   32799
00024 #define ID_VIEW_USER_TOOLBAR8   32800
00025 #define ID_VIEW_USER_TOOLBAR9   32801
00026 #define ID_VIEW_USER_TOOLBAR10    32802
00027 #define ID_WINDOW_MANAGER     32825
00028 #define ID_VIEW_APPLOOK_2000    32826
00029 #define ID_VIEW_APPLOOK_XP      32827
00030 #define ID_VIEW_APPLOOK_2003    32828
00031 #define ID_VIEW_APPLOOK_WIN_XP    32829
00032 #define ID_VIEW_APPLOOK_VS2005    32830
00033 #define ID_VIEW_APPLOOK_2007    32831
00034 #define ID_VIEW_APPLOOK_2007_1    32832
00035 #define ID_VIEW_APPLOOK_2007_2    32833
00036 #define ID_VIEW_APPLOOK_2007_3    32834
00037
00038
00039 // Next default values for new objects
00040 //
00041 #ifdef APSTUDIO_INVOKED
00042 #ifndef APSTUDIO_READONLY_SYMBOLS
00043 #define _APS_NEXT_RESOURCE_VALUE  160
00044 #define _APS_NEXT_CONTROL_VALUE   1042
00045 #define _APS_NEXT_SYMED_VALUE   108
00046 #define _APS_NEXT_COMMAND_VALUE   32850
00047 #endif
00048 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/StdAfx.h Source File

  • vc2008fp
  • RibbonMDI

StdAfx.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // stdafx.h : include file for standard system include files,
00013 // or project specific include files that are used frequently,
00014 // but are changed infrequently
00015
00016 #pragma once
00017
00018 #ifndef _SECURE_ATL
00019 #define _SECURE_ATL 1
00020 #endif
00021
00022 #ifndef VC_EXTRALEAN
00023 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00024 #endif
00025
00026 #include "targetver.h"
00027
00028 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00029
00030 // turns off MFC's hiding of some common and often safely ignored warning messages
00031 #define _AFX_ALL_WARNINGS
00032
00033 #include <afxwin.h>         // MFC core and standard components
00034 #include <afxext.h>         // MFC extensions
00035
00036 #include <afxhtml.h>
00037 #include <afxdisp.h>        // MFC Automation classes
00038
00039 #ifndef _AFX_NO_OLE_SUPPORT
00040 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00041 #endif
00042 #ifndef _AFX_NO_AFXCMN_SUPPORT
00043 #include <afxcmn.h>     // MFC support for Windows Common Controls
00044 #endif // _AFX_NO_AFXCMN_SUPPORT
00045
00046 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00047
00048 #if defined _M_IX86
00049 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00050 #elif defined _M_X64
00051 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00052 #else
00053 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00054 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertyEditRequestsPage Member List

This is the complete list of members for CPropertyEditRequestsPage, including all inherited members.
CPropertyEditRequestsPage() | CPropertyEditRequestsPage |
DoDataExchange(CDataExchange *pDX) | CPropertyEditRequestsPage | [protected, virtual]
GetSelectionResponse() | CPropertyEditRequestsPage | [protected]
IDD enum value | CPropertyEditRequestsPage |
m_aProperties | CPropertyEditRequestsPage |
m_iAllowEdit | CPropertyEditRequestsPage |
m_lbProperties | CPropertyEditRequestsPage |
OnAlways() | CPropertyEditRequestsPage | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CPropertyEditRequestsPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CPropertyEditRequestsPage | [protected]
OnInitDialog() | CPropertyEditRequestsPage | [protected, virtual]
OnNever() | CPropertyEditRequestsPage | [protected]
OnPrompt() | CPropertyEditRequestsPage | [protected]
OnPropertiesSelChange() | CPropertyEditRequestsPage | [protected]
OnSelectAll() | CPropertyEditRequestsPage | [protected]
SetSelectionResponse(int iResponse) | CPropertyEditRequestsPage | [protected]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/pageset.cpp Source File

  • ole
  • wordpad

pageset.cpp

Go to the documentation of this file.
00001 // pageset.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "resource.h"
00015 #include "pageset.h"
00016 #include "ruler.h"
00017 #include "ddxm.h"
00018 #include "helpids.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CPageSetupDlg dialog
00027
00028 const DWORD CPageSetupDlg::m_nHelpIDs[] =
00029 {
00030   IDC_EDIT_TM, IDH_WORDPAD_TOPMARGIN,
00031   IDC_EDIT_BM, IDH_WORDPAD_BOTTOMMARGIN,
00032   IDC_EDIT_LM, IDH_WORDPAD_LEFTMARGIN,
00033   IDC_EDIT_RM, IDH_WORDPAD_RIGHTMARGIN,
00034   IDC_BOX, IDH_COMM_GROUPBOX,
00035   0, 0
00036 };
00037
00038 CPageSetupDlg::CPageSetupDlg(CWnd* pParent /*=NULL*/)
00039   : CCSDialog(CPageSetupDlg::IDD, pParent)
00040 {
00041   //{{AFX_DATA_INIT(CPageSetupDlg)
00042   m_nTopMargin = 0;
00043   m_nRightMargin = 0;
00044   m_nLeftMargin = 0;
00045   m_nBottomMargin = 0;
00046   //}}AFX_DATA_INIT
00047 }
00048
00049 void CPageSetupDlg::DoDataExchange(CDataExchange* pDX)
00050 {
00051   CCSDialog::DoDataExchange(pDX);
00052   //{{AFX_DATA_MAP(CPageSetupDlg)
00053   DDX_Twips(pDX, IDC_EDIT_TM, m_nTopMargin);
00054   DDV_MinMaxTwips(pDX, m_nTopMargin, -31680, 31680);
00055   DDX_Twips(pDX, IDC_EDIT_RM, m_nRightMargin);
00056   DDV_MinMaxTwips(pDX, m_nRightMargin, -31680, 31680);
00057   DDX_Twips(pDX, IDC_EDIT_LM, m_nLeftMargin);
00058   DDV_MinMaxTwips(pDX, m_nLeftMargin, -31680, 31680);
00059   DDX_Twips(pDX, IDC_EDIT_BM, m_nBottomMargin);
00060   DDV_MinMaxTwips(pDX, m_nBottomMargin, -31680, 31680);
00061   //}}AFX_DATA_MAP
00062 }
00063
00064 BEGIN_MESSAGE_MAP(CPageSetupDlg, CCSDialog)
00065   //{{AFX_MSG_MAP(CPageSetupDlg)
00066   //}}AFX_MSG_MAP
00067 END_MESSAGE_MAP()
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CPageSetupDlg message handlers
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/testhelp.cpp Source File

  • controls
  • testhelp

testhelp.cpp

Go to the documentation of this file.
00001 // testhelp.cpp : Implementation of CTesthelpApp and DLL registration.
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "testhelp.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 CTesthelpApp NEAR theApp;
00024
00025 const GUID CDECL BASED_CODE _tlid =
00026     { 0x31a2b280, 0x8c11, 0x11cf, { 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50 } };
00027 const WORD _wVerMajor = 1;
00028 const WORD _wVerMinor = 0;
00029
00030
00031 CTesthelpApp::CTesthelpApp()
00032 {
00033   EnableHtmlHelp();
00034 }
00035
00036 ////////////////////////////////////////////////////////////////////////////
00037 // CTesthelpApp::InitInstance - DLL initialization
00038
00039 BOOL CTesthelpApp::InitInstance()
00040 {
00041   BOOL bInit = COleControlModule::InitInstance();
00042
00043   if (bInit)
00044   {
00045     // TODO: Add your own module initialization code here.
00046   }
00047
00048   return bInit;
00049 }
00050
00051
00052 ////////////////////////////////////////////////////////////////////////////
00053 // CTesthelpApp::ExitInstance - DLL termination
00054
00055 int CTesthelpApp::ExitInstance()
00056 {
00057   // TODO: Add your own module termination code here.
00058
00059   return COleControlModule::ExitInstance();
00060 }
00061
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // DllRegisterServer - Adds entries to the system registry
00065
00066 STDAPI DllRegisterServer(void)
00067 {
00068   AFX_MANAGE_STATE(_afxModuleAddrThis);
00069
00070   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00071     return ResultFromScode(SELFREG_E_TYPELIB);
00072
00073   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00074     return ResultFromScode(SELFREG_E_CLASS);
00075
00076   return NOERROR;
00077 }
00078
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // DllUnregisterServer - Removes entries from the system registry
00082
00083 STDAPI DllUnregisterServer(void)
00084 {
00085   AFX_MANAGE_STATE(_afxModuleAddrThis);
00086
00087   if (!AfxOleUnregisterTypeLib(_tlid))
00088     return ResultFromScode(SELFREG_E_TYPELIB);
00089
00090   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00091     return ResultFromScode(SELFREG_E_CLASS);
00092
00093   return NOERROR;
00094 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/adderdlg.cpp Source File

  • general
  • modeless

adderdlg.cpp

Go to the documentation of this file.
00001 // AdderDlg.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "modeless.h"
00015 #include "AdderDlg.h"
00016 #include "modeldlg.h"
00017
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CAdderDialog dialog
00026
00027
00028 CAdderDialog::CAdderDialog(CWnd* pParent)
00029   : CDialog(CAdderDialog::IDD, pParent)
00030 {
00031   //{{AFX_DATA_INIT(CAdderDialog)
00032     // NOTE: the ClassWizard will add member initialization here
00033   //}}AFX_DATA_INIT
00034   ASSERT(pParent != NULL);
00035
00036   m_pParent = pParent;
00037   m_nID = CAdderDialog::IDD;
00038 }
00039
00040 void CAdderDialog::DoDataExchange(CDataExchange* pDX)
00041 {
00042   CDialog::DoDataExchange(pDX);
00043   //{{AFX_DATA_MAP(CAdderDialog)
00044     // NOTE: the ClassWizard will add DDX and DDV calls here
00045   //}}AFX_DATA_MAP
00046 }
00047
00048
00049 BEGIN_MESSAGE_MAP(CAdderDialog, CDialog)
00050   //{{AFX_MSG_MAP(CAdderDialog)
00051   //}}AFX_MSG_MAP
00052 END_MESSAGE_MAP()
00053
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CAdderDialog message handlers
00057
00058 void CAdderDialog::OnOK()
00059 {
00060   CEdit* pEdit = (CEdit*) GetDlgItem(IDC_NEWTEXT);
00061   CListBox* pList = (CListBox*) (m_pParent->GetDlgItem(IDC_LIST));
00062
00063   ASSERT(pList != NULL);
00064   ASSERT(pEdit != NULL);
00065
00066   if (pList != NULL && pEdit != NULL)
00067   {
00068     CString str;
00069     pEdit->GetWindowText(str);
00070     pList->AddString(str);
00071   }
00072 }
00073
00074 BOOL CAdderDialog::Create()
00075 {
00076   return CDialog::Create(m_nID, m_pParent);
00077 }
00078
00079 void CAdderDialog::OnCancel()
00080 {
00081   ((CMainDlg*)m_pParent)->BoxDone();
00082   DestroyWindow();
00083 }
00084
00085 void CAdderDialog::PostNcDestroy()
00086 {
00087   delete this;
00088 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/strcoll.h Source File

  • ole
  • inproc

strcoll.h

Go to the documentation of this file.
00001 // strcoll.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CStringCollect command target
00014
00015 class CStringCollect : public CCmdTarget
00016 {
00017   DECLARE_DYNCREATE(CStringCollect)
00018 protected:
00019   CStringCollect();           // protected constructor used by dynamic creation
00020
00021 // Attributes
00022 public:
00023   CStringArray m_strArray;
00024
00025 // Operations
00026 public:
00027   void CheckIndex(long nIndex);
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CStringCollect)
00032   public:
00033   virtual void OnFinalRelease();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 protected:
00038   virtual ~CStringCollect();
00039
00040   // Generated message map functions
00041   //{{AFX_MSG(CStringCollect)
00042     // NOTE - the ClassWizard will add and remove member functions here.
00043   //}}AFX_MSG
00044
00045   DECLARE_MESSAGE_MAP()
00046   DECLARE_OLECREATE(CStringCollect)
00047
00048   // Generated OLE dispatch map functions
00049   //{{AFX_DISPATCH(CStringCollect)
00050   afx_msg long GetCount();
00051   afx_msg long Add(LPCTSTR newValue);
00052   afx_msg long Find(LPCTSTR findValue);
00053   afx_msg long Remove(const VARIANT FAR& removeValue);
00054   afx_msg void RemoveAll();
00055   afx_msg BSTR GetItem(long nIndex);
00056   afx_msg void SetItem(long nIndex, LPCTSTR lpszNewValue);
00057   //}}AFX_DISPATCH
00058   afx_msg LPUNKNOWN GetNewEnum();
00059
00060   DECLARE_DISPATCH_MAP()
00061
00062   DECLARE_INTERFACE_MAP()
00063 };
00064
00065 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindDoc.cpp Source File

  • ole
  • MFCBind

BindDoc.cpp

Go to the documentation of this file.
00001 // BindDoc.cpp : implementation of the CMFCBindDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "MFCBind.h"
00014
00015 #include "BindDoc.h"
00016 #include "BindView.h"
00017 #include "CntrItem.h"
00018 #include "MainFrm.h"
00019 #include "ObjView.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CMFCBindDoc
00029
00030 IMPLEMENT_DYNCREATE(CMFCBindDoc, COleDocument)
00031
00032 BEGIN_MESSAGE_MAP(CMFCBindDoc, COleDocument)
00033   //{{AFX_MSG_MAP(CMFCBindDoc)
00034   ON_COMMAND(ID_OLE_INSERT_NEW, OnOleInsertNew)
00035   ON_COMMAND(ID_SECTION_REMOVE, OnSectionRemove)
00036   ON_UPDATE_COMMAND_UI(ID_SECTION_REMOVE, OnUpdateSectionRemove)
00037   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00038   ON_COMMAND(ID_FILE_PRINTALLSECTIONS, OnFilePrintAll)
00039   //}}AFX_MSG_MAP
00040   // Enable default OLE container implementation
00041   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, COleDocument::OnUpdatePasteMenu)
00042   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE_LINK, COleDocument::OnUpdatePasteLinkMenu)
00043   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_CONVERT, COleDocument::OnUpdateObjectVerbMenu)
00044   ON_COMMAND(ID_OLE_EDIT_CONVERT, COleDocument::OnEditConvert)
00045   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, COleDocument::OnUpdateEditLinksMenu)
00046   ON_COMMAND(ID_OLE_EDIT_LINKS, COleDocument::OnEditLinks)
00047   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, COleDocument::OnUpdateObjectVerbMenu)
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CMFCBindDoc construction/destruction
00052
00053 CMFCBindDoc::CMFCBindDoc()
00054 {
00055   // Use OLE compound files
00056   EnableCompoundFile();
00057 }
00058
00059 CMFCBindDoc::~CMFCBindDoc()
00060 {
00061 }
00062
00063 BOOL CMFCBindDoc::OnNewDocument()
00064 {
00065   if (!COleDocument::OnNewDocument())
00066     return FALSE;
00067   CMainFrame *pFrame = NULL;
00068   CObjListView* pView = NULL;
00069   pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
00070   if(!pFrame)
00071     return TRUE;
00072
00073   pView = pFrame->GetObjListView();
00074   ASSERT(pView != NULL);
00075
00076   if(pView)
00077     pView->RemoveAllItems();
00078   CMFCBindCntrItem::m_nDocID=1;
00079
00080   return TRUE;
00081 }
00082
00083
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CMFCBindDoc serialization
00087
00088 void CMFCBindDoc::Serialize(CArchive& ar)
00089 {
00090   if (ar.IsStoring())
00091   {
00092     // TODO: add storing code here
00093   }
00094   else
00095   {
00096     // TODO: add loading code here
00097   }
00098
00099   // Calling the base class COleDocument enables serialization
00100   //  of the container document's COleClientItem objects.
00101   COleDocument::Serialize(ar);
00102 }
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CMFCBindDoc diagnostics
00106
00107 #ifdef _DEBUG
00108 void CMFCBindDoc::AssertValid() const
00109 {
00110   COleDocument::AssertValid();
00111 }
00112
00113 void CMFCBindDoc::Dump(CDumpContext& dc) const
00114 {
00115   COleDocument::Dump(dc);
00116 }
00117 #endif //_DEBUG
00118
00119 /////////////////////////////////////////////////////////////////////////////
00120 // CMFCBindDoc commands
00121
00122 void CMFCBindDoc::OnOleInsertNew()
00123 {
00124   // Invoke the standard Insert Object dialog box to obtain information
00125   //  for new CMFCBindCntrItem object.
00126   COleInsertDialog dlg;
00127   if (dlg.DoModal(COleInsertDialog::DocObjectsOnly) != IDOK)
00128     return;
00129
00130   CMainFrame* pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
00131   ENSURE(pFrame != NULL);
00132
00133   CMFCBindView* pViewObjCont = (CMFCBindView*) pFrame->GetDocView();
00134   ENSURE(pViewObjCont != NULL);
00135
00136   pViewObjCont->BeginWaitCursor();
00137
00138   CMFCBindCntrItem* pItem = NULL;
00139   TRY
00140   {
00141     // Create new item connected to this document.
00142     pItem = new CMFCBindCntrItem(this);
00143     ASSERT_VALID(pItem);
00144
00145     //have the dialog create the item
00146     if (!dlg.CreateItem(pItem))
00147     {
00148       delete pItem;
00149       return;
00150     }
00151     ASSERT_VALID(pItem);
00152
00153     // make sure we deactivate any active items first.
00154     COleClientItem* pActiveItem = GetInPlaceActiveItem(pViewObjCont);
00155     if (pActiveItem != NULL)
00156       pActiveItem->Deactivate();
00157
00158     // If item created from class list (not from file) then launch
00159     //  the server to edit the item.
00160     pItem->Activate(OLEIVERB_SHOW, pViewObjCont);
00161     ASSERT_VALID(pItem);
00162
00163     // As an arbitrary user interface design, this sets the selection
00164     //  to the last item inserted.
00165
00166     // TODO: reimplement selection as appropriate for your application
00167
00168     // set selection to last inserted item
00169     pViewObjCont->m_pSelection = (CMFCBindCntrItem*) pItem;
00170     UpdateAllViews(NULL);
00171   }
00172   CATCH(CException, e)
00173   {
00174     if (pItem != NULL)
00175     {
00176       ASSERT_VALID(pItem);
00177       pItem->Delete();
00178
00179       pFrame->GetObjListView()->RemoveItem(pItem);
00180     }
00181     AfxMessageBox(IDP_FAILED_TO_CREATE);
00182   }
00183   END_CATCH
00184
00185   pViewObjCont->EndWaitCursor();
00186 }
00187
00188 void CMFCBindDoc::OnSectionRemove()
00189 {
00190   // This is the menu handler for the Remove menu item.  We get
00191   // the currently selected item, close it, remove it from the document's
00192   // list of items and remove it's icon from the list box.
00193
00194   CMainFrame *pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
00195   ENSURE(pFrame != NULL);
00196
00197   CView *pViewObjCont = (CView*) pFrame->GetDocView();
00198   ENSURE(pViewObjCont != NULL);
00199
00200   COleClientItem* pItem = GetPrimarySelectedItem(pViewObjCont);
00201
00202   if (pItem != NULL)
00203   {
00204     // remove the item from the list box.
00205     pItem->Delete();
00206     pFrame->GetObjListView()->RemoveItem(pItem);
00207   }
00208 }
00209
00210 void CMFCBindDoc::OnUpdateSectionRemove(CCmdUI* pCmdUI)
00211 {
00212   // we'll only enable the Remove menu item if there is a selected object
00213   CMainFrame *pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
00214   ENSURE(pFrame != NULL);
00215
00216   CView *pObjCont = (CView*) pFrame->GetDocView();
00217
00218   if (pObjCont != NULL)
00219     pCmdUI->Enable(); //we have an object selected
00220   else
00221     pCmdUI->Enable(FALSE);
00222
00223 }
00224
00225
00226 void CMFCBindDoc::OnFilePrint()
00227 {
00228   CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
00229   ENSURE(pFrame != NULL);
00230
00231   CMFCBindView *pView = pFrame->GetDocView();
00232   ENSURE(pView != NULL);
00233
00234   CPrintInfo pi;
00235   pView->DoPreparePrinting(&pi);
00236   if( COleDocObjectItem::OnPreparePrinting(pView,&pi) )
00237   {
00238     COleDocObjectItem::OnPrint(pView,&pi);
00239   }
00240 }
00241
00242 void CMFCBindDoc::OnFilePrintAll()
00243 {
00244   CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
00245   ENSURE(pFrame != NULL);
00246
00247   CMFCBindView *pView = pFrame->GetDocView();
00248   ENSURE(pView != NULL);
00249
00250   CPrintInfo pi;
00251   pView->DoPreparePrinting(&pi);
00252   if( COleDocObjectItem::OnPreparePrinting(pView,&pi,TRUE) )
00253   {
00254     COleDocObjectItem::OnPrint(pView,&pi,TRUE);
00255   }
00256
00257
00258 }
00259
00260 BOOL CMFCBindDoc::OnOpenDocument(LPCTSTR lpszPathName)
00261 {
00262   //Make sure all items are removed from the object list view.
00263   CMainFrame *pFrame = NULL;
00264   CObjListView *pObjView=NULL;
00265   pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
00266   if(pFrame)
00267     pObjView = pFrame->GetObjListView();
00268   if(pObjView)
00269     pObjView->RemoveAllItems();
00270
00271   //Open the new document
00272   if (!COleDocument::OnOpenDocument(lpszPathName))
00273     return FALSE;
00274
00275   POSITION pos = GetStartPosition();
00276   //activate and set focus to the first item.
00277   COleClientItem *pActiveItem = GetNextClientItem(pos);
00278   if(pActiveItem)
00279   {
00280     ENSURE(pFrame);
00281     pActiveItem->Activate(OLEIVERB_SHOW,pFrame->GetDocView());
00282     pActiveItem->GetInPlaceWindow()->SetFocus();
00283     CMFCBindView *pView = pFrame->GetDocView();
00284     pView->m_pSelection = (CMFCBindCntrItem*)pActiveItem;
00285     pFrame->GetObjListView()->m_listbox.SetCurSel(0);
00286   }
00287   CMFCBindCntrItem::m_nDocID=1;
00288
00289   return TRUE;
00290 }
00291
00292 void CMFCBindDoc::OnCloseDocument()
00293 {
00294   CMainFrame *pFrame = NULL;
00295   CObjListView* pView = NULL;
00296   pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
00297   ENSURE(pFrame != NULL);
00298
00299   pView = pFrame->GetObjListView();
00300   ENSURE(pView != NULL);
00301
00302   if(pView)
00303     pView->RemoveAllItems();
00304
00305   COleDocument::OnCloseDocument();
00306 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/MainFrm.cpp Source File

  • vc2008fp
  • WorkSpaceToolBar

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "WorkSpaceToolBar.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00029   ON_WM_CREATE()
00030   ON_COMMAND(ID_WINDOW_MANAGER, OnWindowManager)
00031   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00032   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00033   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00034   ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace)
00035   ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, OnUpdateViewWorkspace)
00036 END_MESSAGE_MAP()
00037
00038 static UINT indicators[] =
00039 {
00040   ID_SEPARATOR,           // status line indicator
00041   ID_INDICATOR_CAPS,
00042   ID_INDICATOR_NUM,
00043   ID_INDICATOR_SCRL,
00044 };
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMainFrame construction/destruction
00048
00049 CMainFrame::CMainFrame()
00050 {
00051   // TODO: add member initialization code here
00052
00053 }
00054
00055 CMainFrame::~CMainFrame()
00056 {
00057 }
00058
00059 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00060 {
00061   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00062     return -1;
00063
00064   // enable Office XP look:
00065   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00066
00067   CMFCToolBar::EnableQuickCustomization ();
00068
00069
00070   // TODO: Define your own basic commands. Be sure, that each pulldown
00071   // menu have at least one basic command.
00072
00073   CList<UINT, UINT> lstBasicCommands;
00074
00075   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00076   lstBasicCommands.AddTail (ID_FILE_NEW);
00077   lstBasicCommands.AddTail (ID_FILE_OPEN);
00078   lstBasicCommands.AddTail (ID_FILE_SAVE);
00079   lstBasicCommands.AddTail (ID_FILE_PRINT);
00080   lstBasicCommands.AddTail (ID_APP_EXIT);
00081   lstBasicCommands.AddTail (ID_EDIT_CUT);
00082   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00083   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00084   lstBasicCommands.AddTail (ID_APP_ABOUT);
00085   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00086   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00087   lstBasicCommands.AddTail (ID_WINDOW_TILE_HORZ);
00088
00089   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00090
00091   if (!m_wndMenuBar.Create (this))
00092   {
00093     TRACE0("Failed to create menubar\n");
00094     return -1;      // fail to create
00095   }
00096
00097   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00098
00099   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00100     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00101     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00102   {
00103     TRACE0("Failed to create toolbar\n");
00104     return -1;      // fail to create
00105   }
00106   if (!m_wndStatusBar.Create(this) ||
00107     !m_wndStatusBar.SetIndicators(indicators,
00108       sizeof(indicators)/sizeof(UINT)))
00109   {
00110     TRACE0("Failed to create status bar\n");
00111     return -1;      // fail to create
00112   }
00113
00114   if (!m_wndWorkSpace.Create (_T("Workspace"), this, CSize (200, 200),
00115     TRUE /* Has gripper */, ID_VIEW_WORKSPACE,
00116     WS_CHILD | WS_VISIBLE | CBRS_LEFT))
00117   {
00118     TRACE0("Failed to create workspace bar\n");
00119     return -1;      // fail to create
00120   }
00121
00122   BOOL bValidString;
00123   CString strMainToolbarTitle;
00124   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00125   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00126   // TODO: Delete these three lines if you don't want the toolbar to
00127   //  be dockable
00128   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00129   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00130   m_wndWorkSpace.EnableDocking(CBRS_ALIGN_ANY);
00131   EnableDocking(CBRS_ALIGN_ANY);
00132   DockPane(&m_wndMenuBar);
00133   DockPane(&m_wndToolBar);
00134   DockPane(&m_wndWorkSpace);
00135
00136   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00137
00138   // Enable windows manager:
00139   EnableWindowsDialog (ID_WINDOW_MANAGER, IDS_WINDOWS_MANAGER, TRUE);
00140   return 0;
00141 }
00142
00143 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00144 {
00145   if( !CMDIFrameWnd::PreCreateWindow(cs) )
00146     return FALSE;
00147   // TODO: Modify the Window class or styles here by modifying
00148   //  the CREATESTRUCT cs
00149
00150   return TRUE;
00151 }
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 // CMainFrame diagnostics
00155
00156 #ifdef _DEBUG
00157 void CMainFrame::AssertValid() const
00158 {
00159   CMDIFrameWnd::AssertValid();
00160 }
00161
00162 void CMainFrame::Dump(CDumpContext& dc) const
00163 {
00164   CMDIFrameWnd::Dump(dc);
00165 }
00166
00167 #endif //_DEBUG
00168
00169 /////////////////////////////////////////////////////////////////////////////
00170 // CMainFrame message handlers
00171
00172
00173 void CMainFrame::OnViewCustomize()
00174 {
00175   //------------------------------------
00176   // Create a customize toolbars dialog:
00177   //------------------------------------
00178   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00179     TRUE /* Automatic menus scaning */
00180     );
00181
00182   pDlgCust->Create ();
00183 }
00184
00185 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00186 {
00187   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00188
00189   CMenu menu;
00190   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00191
00192   CMenu* pPopup = menu.GetSubMenu(0);
00193   ASSERT(pPopup != NULL);
00194
00195   if (pPopup)
00196   {
00197     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00198     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00199   }
00200
00201   return 0;
00202 }
00203
00204 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00205 {
00206   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00207   //
00208   // UINT uiToolBarId = (UINT) wp;
00209   // if (uiToolBarId == IDR_MAINFRAME)
00210   // {
00211   //    do something with m_wndToolBar
00212   // }
00213
00214   return 0;
00215 }
00216
00217 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00218 {
00219   //---------------------------------------------------------
00220   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00221   //---------------------------------------------------------
00222   CMDIFrameWnd::OnShowPopupMenu (pMenuPopup);
00223
00224   if (pMenuPopup != NULL &&
00225     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00226   {
00227     if (CMFCToolBar::IsCustomizeMode ())
00228     {
00229       //----------------------------------------------------
00230       // Don't show toolbars list in the cuztomization mode!
00231       //----------------------------------------------------
00232       return FALSE;
00233     }
00234
00235     pMenuPopup->RemoveAllItems ();
00236
00237     CMenu menu;
00238     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00239
00240     CMenu* pPopup = menu.GetSubMenu(0);
00241     ASSERT(pPopup != NULL);
00242
00243     if (pPopup)
00244     {
00245       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00246     }
00247   }
00248
00249   return TRUE;
00250 }
00251
00252 void CMainFrame::OnViewWorkspace()
00253 {
00254   ShowPane (&m_wndWorkSpace,
00255           !(m_wndWorkSpace.IsVisible ()),
00256           FALSE, TRUE);
00257   RecalcLayout ();
00258 }
00259
00260 void CMainFrame::OnUpdateViewWorkspace(CCmdUI* pCmdUI)
00261 {
00262   pCmdUI->SetCheck (m_wndWorkSpace.IsVisible ());
00263 }
00264
00265 void CMainFrame::OnWindowManager()
00266 {
00267   ShowWindowsDialog ();
00268 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/StdAfx.h Source File

  • vc2008fp
  • MenuSubSet

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
00047
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/stdafx.h Source File

  • vc2008fp
  • IEDemo

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbons and control bars
00038
00039 #include <afxhtml.h>      // MFC HTML view support
00040
00041 #if defined _M_IX86
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #elif defined _M_X64
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #else
00046 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00047 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMToolBar.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMToolBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMToolBar.h : header file
00013 //
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CMSMToolBar window
00017
00018 class CMSMToolBar : public CMFCToolBar
00019 {
00020   DECLARE_DYNCREATE(CMSMToolBar)
00021
00022 // Construction
00023 public:
00024   CMSMToolBar();
00025
00026   virtual ~CMSMToolBar ();
00027
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Implementation
00035 public:
00036
00037   virtual BOOL LoadToolBar (UINT uiResID, UINT uiColdResID = 0,
00038           UINT uiMenuResID = 0, BOOL bLocked = FALSE,
00039           UINT uiDisabledResID = 0, UINT uiMenuDisabledResID = 0,
00040               UINT uiHotResID = 0, UINT uiPressedResID = 0);
00041
00042 protected:
00043   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00044   afx_msg void OnSysColorChange();
00045
00046   DECLARE_MESSAGE_MAP()
00047
00048   virtual BOOL DrawButton (CDC* pDC, CMFCToolBarButton* pButton,
00049     CMFCToolBarImages* pImages, BOOL bHighlighted,
00050     BOOL bDrawDisabledImages);
00051
00052 protected:
00053
00054   static CMFCToolBarImages m_PressedImages; // Shared pressed images
00055 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomList Member List

This is the complete list of members for CCustomList, including all inherited members.
CCustomList() | CCustomList |
CCustomList(CObjListView *pParent) | CCustomList | [inline]
DrawItem(LPDRAWITEMSTRUCT ldis) | CCustomList |
m_pParent | CCustomList |
MeasureItem(LPMEASUREITEMSTRUCT lpm) | CCustomList |
OnSelchange() | CCustomList | [protected]
~CCustomList() | CCustomList | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabControlView Member List

This is the complete list of members for CTabControlView, including all inherited members.
AddNotification(LPCTSTR lpszText) | CTabControlView | [protected]
CTabControlView() | CTabControlView | [protected]
DoDataExchange(CDataExchange *pDX) | CTabControlView | [protected, virtual]
GetDocument() | CTabControlView | [inline]
IDD enum value | CTabControlView |
m_bTabIcons | CTabControlView |
m_bTabsSwap | CTabControlView |
m_nColor | CTabControlView |
m_nTabLocation | CTabControlView |
m_nTabStyle | CTabControlView |
m_wnd1 | CTabControlView | [protected]
m_wnd2 | CTabControlView | [protected]
m_wnd3 | CTabControlView | [protected]
m_wnd4 | CTabControlView | [protected]
m_wndNotifications | CTabControlView |
m_wndTab | CTabControlView | [protected]
m_wndTabIcons | CTabControlView |
m_wndTabLoc | CTabControlView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CTabControlView | [protected, virtual]
OnChangeActiveTab(WPARAM wp, LPARAM lp) | CTabControlView | [protected]
OnChangingActiveTab(WPARAM wp, LPARAM lp) | CTabControlView | [protected]
OnColor() | CTabControlView | [protected]
OnContextMenu(CWnd *, CPoint point) | CTabControlView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CTabControlView | [protected, virtual]
OnFilePrintPreview() | CTabControlView | [protected]
OnInitialUpdate() | CTabControlView | [protected, virtual]
OnLocation() | CTabControlView | [protected]
OnMoveTab(WPARAM wp, LPARAM lp) | CTabControlView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CTabControlView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CTabControlView | [protected, virtual]
OnSelchangeTabStyle() | CTabControlView | [protected]
OnTabIcons() | CTabControlView | [protected]
OnTabSwap() | CTabControlView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CTabControlView | [virtual]
~CTabControlView() | CTabControlView | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWordPadApp Member List

This is the complete list of members for CWordPadApp, including all inherited members.
cmdInfo | CWordPadApp |
CreateDevNames() | CWordPadApp |
CWordPadApp() | CWordPadApp |
CWordPadApp() | CWordPadApp |
ExitInstance() | CWordPadApp | [virtual]
ExitInstance() | CWordPadApp | [virtual]
GetAbbrev() | CWordPadApp | [inline]
GetAbbrev(int n) | CWordPadApp | [inline]
GetAbbrev() | CWordPadApp | [inline]
GetAbbrev(int n) | CWordPadApp | [inline]
GetDockState(LONG_PTR nDocType, BOOL bPrimary=TRUE) | CWordPadApp |
GetDockState(int nDocType, BOOL bPrimary=TRUE) | CWordPadApp |
GetDocOptions(LONG_PTR nDocType) | CWordPadApp |
GetDocOptions(int nDocType) | CWordPadApp |
GetTPU() | CWordPadApp | [inline]
GetTPU(int n) | CWordPadApp | [inline]
GetTPU() | CWordPadApp | [inline]
GetTPU(int n) | CWordPadApp | [inline]
GetUnit() | CWordPadApp | [inline]
GetUnit() | CWordPadApp | [inline]
GetUnits() | CWordPadApp | [inline]
GetUnits() | CWordPadApp | [inline]
InitInstance() | CWordPadApp | [virtual]
InitInstance() | CWordPadApp | [virtual]
IsDocOpen(LPCTSTR lpszFileName) | CWordPadApp |
IsDocOpen(LPCTSTR lpszFileName) | CWordPadApp |
IsIdleMessage(MSG *pMsg) | CWordPadApp |
IsIdleMessage(MSG *pMsg) | CWordPadApp |
LoadAbbrevStrings() | CWordPadApp |
LoadAbbrevStrings() | CWordPadApp |
LoadOptions() | CWordPadApp |
LoadOptions() | CWordPadApp |
m_bForceOEM | CWordPadApp |
m_bForceTextMode | CWordPadApp |
m_bHiColorIcons | CWordPadApp |
m_bLargeIcons | CWordPadApp |
m_bMaximized | CWordPadApp |
m_bPromptForType | CWordPadApp |
m_bWin31 | CWordPadApp |
m_bWin4 | CWordPadApp |
m_bWordSel | CWordPadApp |
m_dcScreen | CWordPadApp |
m_lf | CWordPadApp |
m_listPrinterNotify | CWordPadApp |
m_nDefFont | CWordPadApp |
m_nFilterIndex | CWordPadApp |
m_nNewDocType | CWordPadApp |
m_nNumUnits | CWordPadApp | [private, static]
m_nOpenMsg | CWordPadApp | [static]
m_nPrimaryNumUnits | CWordPadApp | [private, static]
m_nPrinterChangedMsg | CWordPadApp | [static]
m_nUnits | CWordPadApp | [private]
m_optionsIP | CWordPadApp |
m_optionsNull | CWordPadApp |
m_optionsRTF | CWordPadApp |
m_optionsText | CWordPadApp |
m_optionsWord | CWordPadApp |
m_optionsWrite | CWordPadApp |
m_rectInitialFrame | CWordPadApp |
m_rectPageMargin | CWordPadApp |
m_server | CWordPadApp |
m_units | CWordPadApp | [private, static]
NotifyPrinterChanged(BOOL bUpdatePrinterSelection=FALSE) | CWordPadApp |
NotifyPrinterChanged(BOOL bUpdatePrinterSelection=FALSE) | CWordPadApp |
OnAppAbout() | CWordPadApp |
OnAppAbout() | CWordPadApp |
OnDDECommand(LPTSTR lpszCommand) | CWordPadApp | [virtual]
OnDDECommand(LPTSTR lpszCommand) | CWordPadApp | [virtual]
OnFileNew() | CWordPadApp |
OnFileNew() | CWordPadApp |
OnFileOpen() | CWordPadApp |
OnFileOpen() | CWordPadApp |
OnViewAppLook() | CWordPadApp |
ParseMeasurement(TCHAR *buf, int &lVal) | CWordPadApp |
ParseMeasurement(TCHAR *buf, int &lVal) | CWordPadApp |
PreLoadState() | CWordPadApp | [virtual]
PreTranslateMessage(MSG *pMsg) | CWordPadApp | [virtual]
PreTranslateMessage(MSG *pMsg) | CWordPadApp | [virtual]
PrintTwips(TCHAR *buf, int nSize, int nValue, int nDecimal) | CWordPadApp |
PrintTwips(TCHAR *buf, int nValue, int nDecimal) | CWordPadApp |
PromptForFileName(CString &fileName, UINT nIDSTitle, DWORD dwFlags, BOOL bOpenFileDialog, int *pType=NULL) | CWordPadApp |
PromptForFileName(CString &fileName, UINT nIDSTitle, DWORD dwFlags, BOOL bOpenFileDialog, int *pType=NULL) | CWordPadApp |
RegisterFormats() | CWordPadApp |
RegisterFormats() | CWordPadApp |
SaveOptions() | CWordPadApp |
SaveOptions() | CWordPadApp |
SetUnits(int n) | CWordPadApp | [inline]
SetUnits(int n) | CWordPadApp | [inline]
StaticEnumProc(HWND hWnd, LPARAM lParam) | CWordPadApp | [static]
StaticEnumProc(HWND hWnd, LPARAM lParam) | CWordPadApp | [static]
UpdateRegistry() | CWordPadApp |
UpdateRegistry() | CWordPadApp |
WinHelp(DWORD dwData, UINT nCmd=HELP_CONTEXT) | CWordPadApp | [virtual]
WinHelp(DWORD dwData, UINT nCmd=HELP_CONTEXT) | CWordPadApp | [virtual]
~CWordPadApp() | CWordPadApp |
~CWordPadApp() | CWordPadApp |
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEmbeddedItem Member List

This is the complete list of members for CEmbeddedItem, including all inherited members.
CEmbeddedItem(CPadDoc *pContainerDoc) | CEmbeddedItem |
CEmbeddedItem(CWordPadDoc *pContainerDoc, int nBeg=0, int nEnd=-1) | CEmbeddedItem |
CEmbeddedItem(CWordPadDoc *pContainerDoc, int nBeg=0, int nEnd=-1) | CEmbeddedItem |
GetDocument() const | CEmbeddedItem | [inline]
GetDocument() const | CEmbeddedItem | [inline]
GetDocument() const | CEmbeddedItem | [inline]
GetView() const | CEmbeddedItem |
GetView() const | CEmbeddedItem |
GetView() const | CEmbeddedItem |
m_lpRichDataObj | CEmbeddedItem |
m_nBeg | CEmbeddedItem |
m_nBeg | CEmbeddedItem |
m_nEnd | CEmbeddedItem |
m_nEnd | CEmbeddedItem |
OnDraw(CDC *pDC, CSize &rSize) | CEmbeddedItem | [virtual]
OnDraw(CDC *pDC, CSize &rSize) | CEmbeddedItem | [virtual]
OnDraw(CDC *pDC, CSize &rSize) | CEmbeddedItem | [virtual]
OnDrawEx(CDC *pDC, CSize &rSize, BOOL bOutput) | CEmbeddedItem |
OnDrawEx(CDC *pDC, CSize &rSize, BOOL bOutput) | CEmbeddedItem |
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CEmbeddedItem | [virtual]
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CEmbeddedItem | [virtual]
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CEmbeddedItem | [virtual]
OnRenderFileData(LPFORMATETC lpFormatEtc, CFile *pFile) | CEmbeddedItem | [protected, virtual]
SaveToFile(CFile *pFile) | CEmbeddedItem | [protected]
Serialize(CArchive &ar) | CEmbeddedItem | [protected, virtual]
Serialize(CArchive &ar) | CEmbeddedItem | [protected, virtual]
Serialize(CArchive &ar) | CEmbeddedItem | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/PropertiesViewBar.cpp Source File

  • vc2008fp
  • DrawClient

PropertiesViewBar.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014 #include "PropertiesViewBar.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[]=__FILE__;
00019 #define new DEBUG_NEW
00020 #endif
00021
00022
00023 CPropertiesViewBar::CPropertiesViewBar(void)
00024 {
00025 }
00026
00027 CPropertiesViewBar::~CPropertiesViewBar(void)
00028 {
00029 }
00030
00031 BEGIN_MESSAGE_MAP(CPropertiesViewBar, CDockablePane)
00032   ON_WM_CREATE()
00033   ON_WM_SIZE()
00034   ON_WM_SETFOCUS()
00035   ON_COMMAND (ID_EXPAND, OnPropListTreeMode)
00036   ON_UPDATE_COMMAND_UI (ID_EXPAND, OnUpdatePropListTreeMode)
00037   ON_COMMAND (ID_SORTINGGROUP, OnPropListAlphabetMode)
00038   ON_UPDATE_COMMAND_UI (ID_SORTINGGROUP, OnUpdatePropListAlphabetMode)
00039 END_MESSAGE_MAP()
00040
00041 void CPropertiesViewBar::AdjustLayout ()
00042 {
00043   if (GetSafeHwnd () == NULL)
00044   {
00045     return;
00046   }
00047
00048   CRect rectClient;
00049   GetClientRect (rectClient);
00050
00051   int cyTlb = m_wndToolBar.CalcFixedLayout (FALSE, TRUE).cy;
00052
00053   m_wndToolBar.SetWindowPos (NULL,
00054                  rectClient.left,
00055                  rectClient.top,
00056                  rectClient.Width (),
00057                  cyTlb,
00058                  SWP_NOACTIVATE | SWP_NOZORDER);
00059
00060
00061   m_wndPropList.SetWindowPos (NULL,
00062                   rectClient.left,
00063                   rectClient.top + cyTlb,
00064                   rectClient.Width (),
00065                   rectClient.Height () - cyTlb,
00066                   SWP_NOACTIVATE | SWP_NOZORDER);
00067 }
00068 int CPropertiesViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00069 {
00070   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00071     return -1;
00072
00073   CRect rectDummy;
00074   rectDummy.SetRectEmpty ();
00075
00076   if (!m_wndPropList.Create (WS_VISIBLE | WS_CHILD, rectDummy, this, 2))
00077   {
00078     TRACE0("Failed to create Properies Grid \n");
00079     return -1;      // fail to create
00080   }
00081
00082   m_wndToolBar.Create (this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_PROPERTIES);
00083   m_wndToolBar.LoadToolBar (IDR_PROPERTIES, 0, 0, TRUE /* Is locked */);
00084
00085   m_wndPropList.SetVSDotNetLook (TRUE);
00086   m_wndPropList.SetGroupNameFullWidth (TRUE);
00087   m_wndPropList.EnableDescriptionArea (TRUE);
00088
00089   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
00090     CBRS_TOOLTIPS | CBRS_FLYBY);
00091
00092   m_wndToolBar.SetPaneStyle (
00093     m_wndToolBar.GetPaneStyle () &
00094       ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00095
00096   m_wndToolBar.SetOwner (this);
00097
00098   // All commands will be routed via this control , not via the parent frame:
00099   m_wndToolBar.SetRouteCommandsViaFrame (FALSE);
00100
00101   AdjustLayout ();
00102   return 0;
00103 }
00104
00105 void CPropertiesViewBar::OnSize(UINT nType, int cx, int cy)
00106 {
00107   CDockablePane::OnSize(nType, cx, cy);
00108   AdjustLayout ();
00109 }
00110
00111 void CPropertiesViewBar::OnSetFocus(CWnd* pOldWnd)
00112 {
00113   CDockablePane::OnSetFocus(pOldWnd);
00114   m_wndPropList.SetFocus ();
00115 }
00116 void CPropertiesViewBar::OnPropListTreeMode ()
00117 {
00118   m_wndPropList.SetAlphabeticMode (FALSE);
00119 }
00120 void CPropertiesViewBar::OnPropListAlphabetMode ()
00121 {
00122   m_wndPropList.SetAlphabeticMode (TRUE);
00123 }
00124 void CPropertiesViewBar::OnUpdatePropListTreeMode (CCmdUI* pCmdUI)
00125 {
00126   pCmdUI->SetCheck (!m_wndPropList.IsAlphabeticMode ());
00127 }
00128 void CPropertiesViewBar::OnUpdatePropListAlphabetMode (CCmdUI* pCmdUI)
00129 {
00130   pCmdUI->SetCheck (m_wndPropList.IsAlphabeticMode ());
00131 }
00132
00133
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/enumvar.h Source File

  • ole
  • inproc

enumvar.h

Go to the documentation of this file.
00001 // enumvar.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CEnumVariant command target
00014
00015 class CEnumVariant : public CCmdTarget
00016 {
00017   DECLARE_DYNCREATE(CEnumVariant)
00018 public:
00019   CEnumVariant();         // protected constructor used by dynamic creation
00020
00021 // Attributes
00022 public:
00023   int m_nIndex;           // next/current position w/in m_rgContents
00024   int m_nCount;           // total count of variants
00025   VARIANT* m_pContents;   // contents of collection
00026
00027 // Operations
00028 public:
00029   void SetContents(VARIANT* pContents, int nCount, int nIndex = 0);
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CEnumVariant)
00034   public:
00035   virtual void OnFinalRelease();
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 protected:
00040   virtual ~CEnumVariant();
00041   CEnumVariant* m_pClonedFrom;
00042
00043   // Generated message map functions
00044   //{{AFX_MSG(CEnumVariant)
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048
00049 public:
00050   // Implementation of IEnumVARIANT
00051   BEGIN_INTERFACE_PART(EnumVARIANT, IEnumVARIANT)
00052     STDMETHOD(Next)(ULONG celt, VARIANT* rgvar, ULONG* pceltFetched);
00053     STDMETHOD(Skip)(ULONG celt) ;
00054     STDMETHOD(Reset)() ;
00055     STDMETHOD(Clone)(IEnumVARIANT** ppenum);
00056   END_INTERFACE_PART(EnumVARIANT)
00057   DECLARE_INTERFACE_MAP()
00058 };
00059
00060 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/rectitem.cpp Source File

  • ole
  • oclient

rectitem.cpp

Go to the documentation of this file.
00001 // rectitem.cpp : implementation of the CRectItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include <afxpriv.h>
00015 #include "oclient.h"
00016
00017 #include "maindoc.h"
00018 #include "mainview.h"
00019 #include "rectitem.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027
00028 IMPLEMENT_SERIAL(CRectItem, COleClientItem, 0)
00029
00030 CRectItem::CRectItem(COleDocument* pContainer) : COleClientItem(pContainer) ,
00031   m_ptPos(10, -10), m_sizeContent(0,0), m_sizeIcon(0,0),
00032   m_sizeContentExtent(0, 0), m_sizeIconExtent(0, 0)
00033 {
00034 }
00035
00036 CRectItem::CRectItem() : m_ptPos(10, -10), m_sizeContent(0,0), m_sizeIcon(0,0),
00037   m_sizeContentExtent(0, 0), m_sizeIconExtent(0, 0)
00038 {
00039 }
00040
00041 CRectItem::~CRectItem()
00042 {
00043 }
00044
00045 void CRectItem::Invalidate(CView* pNotThisView)
00046 {
00047   GetDocument()->UpdateAllViews(pNotThisView, 0, this);
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051
00052 CSize CRectItem::GetSize()
00053 {
00054   DVASPECT dv = GetDrawAspect();
00055   if (dv == DVASPECT_ICON)
00056     return m_sizeIcon;
00057   else
00058     return m_sizeContent;
00059 }
00060
00061 CSize CRectItem::GetBaseSize()
00062 {
00063   DVASPECT dv = GetDrawAspect();
00064   if (dv == DVASPECT_ICON)
00065     return m_sizeIconExtent;
00066   else
00067     return m_sizeContentExtent;
00068 }
00069
00070 void CRectItem::SetSize(CSize size)
00071 {
00072   DVASPECT dv = GetDrawAspect();
00073   if (dv == DVASPECT_ICON)
00074     m_sizeIcon = size;
00075   else
00076     m_sizeContent = size;
00077 }
00078
00079 void CRectItem::SetBaseSize(CSize size)
00080 {
00081   DVASPECT dv = GetDrawAspect();
00082   if (dv == DVASPECT_ICON)
00083     m_sizeIconExtent = size;
00084   else
00085     m_sizeContentExtent = size;
00086 }
00087
00088 void CRectItem::SetRect(CRect& rect)
00089 {
00090   m_ptPos = rect.TopLeft();
00091   SetSize(rect.Size());
00092 }
00093
00094 BOOL CRectItem::UpdateExtent()
00095 {
00096   // get size in pixels
00097   CSize size;
00098   if (!GetCachedExtent(&size))
00099     return FALSE;       // blank
00100   Invalidate();   // invalidate the old size/position
00101   CSize sizeBase = GetBaseSize();
00102   if (size == sizeBase) // no change
00103     return FALSE;
00104   // if new object (i.e. m_extent is empty) setup position
00105   if (sizeBase == CSize(0,0))
00106   {
00107     // convert to document coords
00108     CSize sizeNew(MulDiv(size.cx, 10, 254), - MulDiv(size.cy, 10, 254));
00109     SetSize(sizeNew);
00110   }
00111   else
00112   {
00113     if (!IsInPlaceActive() && size != sizeBase)
00114     {
00115       // data changed and not inplace, so scale up rect as well
00116       CSize sizeCur = GetSize();
00117       sizeCur.cx = MulDiv(sizeCur.cx, size.cx, sizeBase.cx);
00118       sizeCur.cy = - MulDiv(-sizeCur.cy, size.cy, sizeBase.cy);
00119       SetSize(sizeCur);
00120     }
00121   }
00122   SetBaseSize(size);
00123   Invalidate();   // as well as the new size/position
00124   return TRUE;
00125 }
00126
00127 BOOL CRectItem::OnChangeItemPosition(const CRect& rectPos)
00128 {
00129   CMainView* pView = GetActiveView();
00130   if (pView == NULL)
00131     return FALSE;
00132   ASSERT_VALID(pView);
00133
00134   CRect rc = rectPos;
00135   pView->ClientToDoc(rc);
00136
00137   if (rc != GetRect())
00138   {
00139     // The following lines were commented out because of a bug
00140     // in Microsoft Equation Editor 3.0.  The rc keeps growing
00141     // when activated/deactivated.
00142     // Uncomment them if necessary for other objects.
00143
00144     /*
00145     // invalidate old item
00146     Invalidate();
00147     // update to new rectangle
00148     SetRect(rc);
00149     */
00150
00151     GetDocument()->SetModifiedFlag();
00152
00153     /*
00154     CSize sizeExtent;
00155     GetCachedExtent(&sizeExtent);
00156     SetBaseSize(sizeExtent);
00157     */
00158
00159     // and invalidate new
00160     Invalidate();
00161   }
00162   return COleClientItem::OnChangeItemPosition(rectPos);
00163 }
00164
00165 void CRectItem::OnActivate()
00166 {
00167   // allow only one inplace active item per frame
00168   CMainView* pView = GetActiveView();
00169   ASSERT_VALID(pView);
00170   COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
00171   if (pItem != NULL && pItem != this)
00172     pItem->Close();
00173
00174   COleClientItem::OnActivate();
00175
00176   // set selection to an item when it becomes active
00177   pView->SetSelection(this);
00178 }
00179
00180 void CRectItem::OnDeactivateUI(BOOL bUndoable)
00181 {
00182   COleClientItem::OnDeactivateUI(bUndoable);
00183
00184   // hide the object if it is not an outside-in object
00185   DWORD dwMisc = 0;
00186   m_lpObject->GetMiscStatus(GetDrawAspect(), &dwMisc);
00187   if (dwMisc & OLEMISC_INSIDEOUT)
00188     DoVerb(OLEIVERB_HIDE, NULL);
00189 }
00190
00191 void CRectItem::OnChange(OLE_NOTIFICATION nCode, DWORD dwParam)
00192 {
00193   COleClientItem::OnChange(nCode, dwParam);
00194   switch(nCode)
00195   {
00196     case OLE_CHANGED:
00197       UpdateExtent();
00198       Invalidate();
00199       break;
00200     case OLE_CHANGED_ASPECT:
00201     case OLE_CHANGED_STATE:
00202       Invalidate();
00203       break;
00204   }
00205 }
00206
00207 void CRectItem::OnGetItemPosition(CRect& rPosition)
00208 {
00209   ASSERT_VALID(this);
00210
00211   if (GetSize() == CSize(0,0))
00212     UpdateExtent();
00213
00214   // copy m_rect, which is in document coordinates
00215   rPosition = GetRect();
00216   CMainView* pView = GetActiveView();
00217   ASSERT_VALID(pView);
00218   pView->DocToClient(rPosition);
00219 }
00220
00221 void CRectItem::Move(CRect &rc)
00222 {
00223   // invalidate old rect
00224   Invalidate();
00225   // invalidate new
00226   SetRect(rc);
00227   Invalidate();
00228
00229   // update item rect when in-place active
00230   if (IsInPlaceActive())
00231     SetItemRects();
00232 }
00233
00234 void CRectItem::Serialize(CArchive& ar)
00235 {
00236   CRect rect;
00237
00238   // IMPORTANT: when using "easy" serialize -- call base class FIRST!
00239   //  (not strictly necessary, but a good idea)
00240   COleClientItem::Serialize(ar);
00241
00242   // now store/retrieve data specific to CRectItem
00243   if (ar.IsStoring())
00244   {
00245     WORD w = 0x5500;        // magic value
00246     ar << w << m_ptPos << m_sizeIcon << m_sizeIconExtent <<
00247       m_sizeContent << m_sizeContentExtent;
00248   }
00249   else
00250   {
00251     WORD w;
00252     ar >> w >> m_ptPos >> m_sizeIcon >> m_sizeIconExtent >>
00253       m_sizeContent >> m_sizeContentExtent;
00254     if (w != 0x5500)
00255     {
00256       TRACE0("Bad magic number in front of an item wnd\n");
00257       AfxThrowArchiveException(CArchiveException::genericException);
00258     }
00259   }
00260 }
00261
00262 void CRectItem::ResetSize()
00263 {
00264   ASSERT_VALID(this);
00265   Invalidate();
00266   SetBaseSize(CSize(0, 0));
00267   UpdateExtent();
00268 }
00269
00270 // OnGetClipboardData is used by CopyToClipboard and DoDragDrop
00271 COleDataSource* CRectItem::OnGetClipboardData(
00272   BOOL bIncludeLink, LPPOINT lpOffset, LPSIZE lpSize)
00273 {
00274   ASSERT_VALID(this);
00275
00276   COleDataSource* pDataSource = new COleDataSource;
00277   TRY
00278   {
00279     GetNativeClipboardData(pDataSource);
00280     GetClipboardData(pDataSource, bIncludeLink, lpOffset, lpSize);
00281   }
00282   CATCH_ALL(e)
00283   {
00284     delete pDataSource;
00285     THROW_LAST();
00286   }
00287   END_CATCH_ALL
00288
00289   ASSERT_VALID(pDataSource);
00290   return pDataSource;
00291 }
00292
00293 void CRectItem::GetNativeClipboardData(COleDataSource* pDataSource)
00294 {
00295   ASSERT_VALID(this);
00296   ASSERT_VALID(GetDocument());
00297
00298   // Create a shared file and associate a CArchive with it
00299   CSharedFile file;
00300   CArchive ar(&file, CArchive::store);
00301
00302   // Serialize selected objects to the archive
00303   Serialize(ar);
00304   ar.Close();
00305   pDataSource->CacheGlobalData(CMainDoc::m_cfPrivate, file.Detach());
00306 }
00307
00308 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIEDemoDoc Member List

This is the complete list of members for CIEDemoDoc, including all inherited members.
AddURLToHistory(const CString &strTitle, const CString &strURL) | CIEDemoDoc |
CIEDemoDoc() | CIEDemoDoc | [protected]
GetBackList(_T_HistotyList &lst) const | CIEDemoDoc |
GetFrwdList(_T_HistotyList &lst) const | CIEDemoDoc |
Go(UINT uiCmd) | CIEDemoDoc |
GoBack() | CIEDemoDoc | [inline]
GoForward() | CIEDemoDoc | [inline]
IsBackAvailable() const | CIEDemoDoc | [inline]
IsFrwdAvailable() | CIEDemoDoc | [inline]
m_arHistory | CIEDemoDoc |
m_iHistoryOffset | CIEDemoDoc |
OnNewDocument() | CIEDemoDoc | [virtual]
Serialize(CArchive &ar) | CIEDemoDoc | [virtual]
~CIEDemoDoc() | CIEDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CView2 Member List

This is the complete list of members for CView2, including all inherited members.
CView2() | CView2 |
CView2() | CView2 | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CView2 | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CView2 | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CView2 | [protected]
OnDraw(CDC *pDC) | CView2 | [protected, virtual]
OnDraw(CDC *pDC) | CView2 | [protected, virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CView2 | [protected, virtual]
OnFilePrintPreview() | CView2 | [protected]
OnInitialUpdate() | CView2 | [virtual]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CView2 | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CView2 | [protected, virtual]
OnWindowPosChanging(WINDOWPOS FAR *lpwndpos) | CView2 | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CView2 | [protected, virtual]
~CView2() | CView2 | [virtual]
~CView2() | CView2 | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/adderdlg.h Source File

  • general
  • modeless

adderdlg.h

Go to the documentation of this file.
00001 // AdderDlg.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CAdderDialog dialog
00015
00016 class CAdderDialog : public CDialog
00017 {
00018 private:
00019   using CDialog::Create;
00020
00021 // Construction
00022 public:
00023   CAdderDialog(CWnd* pParent);   // standard constructor
00024   BOOL Create();
00025
00026 // Dialog Data
00027   //{{AFX_DATA(CAdderDialog)
00028   enum { IDD = IDD_ADDME };
00029     // NOTE: the ClassWizard will add data members here
00030   //}}AFX_DATA
00031
00032
00033 // Overrides
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CAdderDialog)
00036   protected:
00037   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00038   virtual void PostNcDestroy();
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 protected:
00043
00044   CWnd* m_pParent;
00045   int m_nID;
00046
00047   // Generated message map functions
00048   //{{AFX_MSG(CAdderDialog)
00049   virtual void OnOK();
00050   virtual void OnCancel();
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mainfrm.cpp Source File

  • advanced
  • collect

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014
00015 #include "mainfrm.h"
00016
00017 #include "colledoc.h"
00018 #include "strlstvw.h"
00019 #include "typlstvw.h"
00020 #include "intlstvw.h"
00021 #include "dwarryvw.h"
00022 #include "typaryvw.h"
00023 #include "ptarryvw.h"
00024 #include "mapssvw.h"
00025 #include "typtrmap.h"
00026 #include "mapdwvw.h"
00027
00028 #ifdef _DEBUG
00029 #undef THIS_FILE
00030 static char BASED_CODE THIS_FILE[] = __FILE__;
00031 #endif
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CMainFrame
00035
00036 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00037
00038 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00039   ON_COMMAND_RANGE(ID_STRINGLIST, ID_MAP, OnExample)
00040   ON_UPDATE_COMMAND_UI_RANGE(ID_STRINGLIST, ID_MAP, OnUpdateExampleUI)
00041   //{{AFX_MSG_MAP(CMainFrame)
00042   ON_WM_CREATE()
00043   //}}AFX_MSG_MAP
00044 END_MESSAGE_MAP()
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // arrays of IDs used to initialize control bars
00048
00049 // toolbar buttons - IDs are command buttons
00050 static UINT BASED_CODE buttons[] =
00051 {
00052   // same order as in the bitmap 'toolbar.bmp'
00053   ID_FILE_NEW,
00054   ID_FILE_OPEN,
00055   ID_FILE_SAVE,
00056     ID_SEPARATOR,
00057   ID_EDIT_CUT,
00058   ID_EDIT_COPY,
00059   ID_EDIT_PASTE,
00060     ID_SEPARATOR,
00061   ID_FILE_PRINT,
00062   ID_APP_ABOUT,
00063 };
00064
00065 static UINT BASED_CODE indicators[] =
00066 {
00067   ID_SEPARATOR,           // status line indicator
00068   ID_INDICATOR_CAPS,
00069   ID_INDICATOR_NUM,
00070   ID_INDICATOR_SCRL,
00071 };
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CMainFrame construction/destruction
00075
00076 CMainFrame::CMainFrame()
00077 {
00078   m_nCurrentExample = ID_STRINGLIST;
00079 }
00080
00081 CMainFrame::~CMainFrame()
00082 {
00083 }
00084
00085 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00086 {
00087   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00088     return -1;
00089
00090   if (!m_wndToolBar.Create(this) ||
00091     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00092     !m_wndToolBar.SetButtons(buttons,
00093       sizeof(buttons)/sizeof(UINT)))
00094   {
00095     TRACE0("Failed to create toolbar\n");
00096     return -1;      // fail to create
00097   }
00098
00099   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00100   EnableDocking(CBRS_ALIGN_ANY);
00101   DockControlBar(&m_wndToolBar);
00102
00103   if (!m_wndStatusBar.Create(this) ||
00104     !m_wndStatusBar.SetIndicators(indicators,
00105       sizeof(indicators)/sizeof(UINT)))
00106   {
00107     TRACE0("Failed to create status bar\n");
00108     return -1;      // fail to create
00109   }
00110
00111   return 0;
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CMainFrame diagnostics
00116
00117 #ifdef _DEBUG
00118 void CMainFrame::AssertValid() const
00119 {
00120   CFrameWnd::AssertValid();
00121 }
00122
00123 void CMainFrame::Dump(CDumpContext& dc) const
00124 {
00125   CFrameWnd::Dump(dc);
00126 }
00127
00128 #endif //_DEBUG
00129
00130 /////////////////////////////////////////////////////////////////////////////
00131 // CMainFrame message handlers
00132
00133 void CMainFrame::OnExample(UINT nCmdID)
00134 {
00135   if (nCmdID == m_nCurrentExample)
00136     return;  // already selected
00137
00138   // Set the child window ID of the active view to AFX_IDW_PANE_FIRST.
00139   // This is necessary so that CFrameWnd::RecalcLayout will allocate
00140   // this "first pane" to that portion of the frame window's client
00141   // area not allocated to control bars.  Set the child ID of
00142   // the previously active view to some other ID; we will use the
00143   // command ID as the child ID.
00144   CView* pOldActiveView = GetActiveView();
00145     ::SetWindowLong(pOldActiveView->m_hWnd, GWL_ID, m_nCurrentExample);
00146
00147   CRuntimeClass* pNewViewClass;
00148   switch (nCmdID)
00149   {
00150     case ID_STRINGLIST:
00151       pNewViewClass = RUNTIME_CLASS(CStringListView);
00152       break;
00153     case ID_TYPEDLIST:
00154       pNewViewClass = RUNTIME_CLASS(CTypedPtrListView);
00155       break;
00156     case ID_INTLIST:
00157       pNewViewClass = RUNTIME_CLASS(CIntListView);
00158       break;
00159     case ID_DWORDARRAY:
00160       pNewViewClass = RUNTIME_CLASS(CDWordArrayView);
00161       break;
00162     case ID_TYPEDPTRARRAY:
00163       pNewViewClass = RUNTIME_CLASS(CTypedPtrArrayView);
00164       break;
00165     case ID_POINTARRAY:
00166       pNewViewClass = RUNTIME_CLASS(CPointArrayView);
00167       break;
00168     case ID_MAPSTRINGTOSTRING:
00169       pNewViewClass = RUNTIME_CLASS(CMapStringToStringView);
00170       break;
00171     case ID_TYPEDPTRMAP:
00172       pNewViewClass = RUNTIME_CLASS(CTypedPtrMapView);
00173       break;
00174     case ID_MAPDWORDTOMYSTRUCT:
00175       pNewViewClass = RUNTIME_CLASS(CMapDWordToMyStructView);
00176       break;
00177     default:
00178       ASSERT(0);
00179       return;
00180   }
00181
00182   // create the new view
00183   CCreateContext context;
00184   context.m_pNewViewClass = pNewViewClass;
00185   context.m_pCurrentDoc = GetActiveDocument();
00186   CView* pNewView = STATIC_DOWNCAST(CView, CreateView(&context));
00187   if (pNewView != NULL)
00188   {
00189     // the new view is there, but invisible and not active...
00190     pNewView->ShowWindow(SW_SHOW);
00191     pNewView->OnInitialUpdate();
00192     SetActiveView(pNewView);
00193     RecalcLayout();
00194     m_nCurrentExample = nCmdID;
00195
00196     // finally destroy the old view...
00197     pOldActiveView->DestroyWindow();
00198   }
00199 }
00200
00201 void CMainFrame::OnUpdateExampleUI(CCmdUI* pCmdUI)
00202 {
00203   pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrentExample);
00204 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/docopt.cpp Source File

  • vc2008fp
  • WordPad

docopt.cpp

Go to the documentation of this file.
00001 //
00002 // docopt.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "docopt.h"
00017 #include "helpids.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDocOptPage property page
00026
00027 const DWORD CDocOptPage::m_nHelpIDs[] =
00028 {
00029   IDC_BOX, IDH_COMM_GROUPBOX,
00030   IDC_WRAP_NONE, IDH_WORDPAD_WRAP_NO,
00031   IDC_WRAP_WINDOW, IDH_WORDPAD_WRAP_WINDOW,
00032   IDC_WRAP_RULER, IDH_WORDPAD_WRAP_RULER,
00033   IDC_BOXT, IDH_COMM_GROUPBOX,
00034   IDC_CHECK_TOOLBAR, IDH_WORDPAD_CHECK_TOOLBAR,
00035   IDC_CHECK_FORMATBAR, IDH_WORDPAD_CHECK_FORMATBAR,
00036   IDC_CHECK_STATUSBAR, IDH_WORDPAD_CHECK_STATUSBAR,
00037   IDC_CHECK_RULERBAR, IDH_WORDPAD_CHECK_RULERBAR,
00038   0, 0
00039 };
00040
00041 CDocOptPage::CDocOptPage() : CCSPropertyPage(CDocOptPage::IDD)
00042 {
00043   //{{AFX_DATA_INIT(CDocOptPage)
00044   m_nWordWrap = -1;
00045   m_bFormatBar = FALSE;
00046   m_bRulerBar = FALSE;
00047   m_bStatusBar = FALSE;
00048   m_bToolBar = FALSE;
00049   //}}AFX_DATA_INIT
00050 }
00051
00052 CDocOptPage::CDocOptPage(UINT nIDCaption) :
00053   CCSPropertyPage(CDocOptPage::IDD, nIDCaption)
00054 {
00055   m_nWordWrap = -1;
00056   m_bFormatBar = FALSE;
00057   m_bRulerBar = FALSE;
00058   m_bStatusBar = FALSE;
00059   m_bToolBar = FALSE;
00060 }
00061
00062 CDocOptPage::~CDocOptPage()
00063 {
00064 }
00065
00066 void CDocOptPage::DoDataExchange(CDataExchange* pDX)
00067 {
00068   CCSPropertyPage::DoDataExchange(pDX);
00069   //{{AFX_DATA_MAP(CDocOptPage)
00070   DDX_Radio(pDX, IDC_WRAP_NONE, m_nWordWrap);
00071   DDX_Check(pDX, IDC_CHECK_FORMATBAR, m_bFormatBar);
00072   DDX_Check(pDX, IDC_CHECK_RULERBAR, m_bRulerBar);
00073   DDX_Check(pDX, IDC_CHECK_STATUSBAR, m_bStatusBar);
00074   DDX_Check(pDX, IDC_CHECK_TOOLBAR, m_bToolBar);
00075   //}}AFX_DATA_MAP
00076 }
00077
00078
00079 BEGIN_MESSAGE_MAP(CDocOptPage, CCSPropertyPage)
00080   //{{AFX_MSG_MAP(CDocOptPage)
00081     // NOTE: the ClassWizard will add message map macros here
00082   //}}AFX_MSG_MAP
00083 END_MESSAGE_MAP()
00084
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CDocOptPage message handlers
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CEmbeddedOptPage property page
00091
00092 CEmbeddedOptPage::CEmbeddedOptPage() : CDocOptPage(IDS_EMBEDDED_OPTIONS)
00093 {
00094 }
00095
00096 BOOL CEmbeddedOptPage::OnInitDialog()
00097 {
00098   BOOL b = CDocOptPage::OnInitDialog();
00099   GetDlgItem(IDC_CHECK_STATUSBAR)->ShowWindow(SW_HIDE);
00100   return b;
00101 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/keys.h Source File

  • vc2008fp
  • MSOffice2007Demo

keys.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 struct MSOfficeDemoKey
00015 {
00016   UINT   uiCmd;
00017   LPTSTR lpszKey;
00018 };
00019
00020 extern MSOfficeDemoKey keys [];
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

inproc::IVariantMap Member List

This is the complete list of members for inproc::IVariantMap, including all inherited members.
id | inproc::IVariantMap
id | inproc::IVariantMap
id | inproc::IVariantMap
IsEmpty | inproc::IVariantMap
Item | inproc::IVariantMap
RemoveAll | inproc::IVariantMap
RemoveKey | inproc::IVariantMap
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summpage.cpp Source File

  • ole
  • drawcli

summpage.cpp

Go to the documentation of this file.
00001 // summpage.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "drawcli.h"
00013 #include "summpage.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CSummPage property page
00022
00023 IMPLEMENT_DYNCREATE(CSummPage, CPropertyPage)
00024
00025 CSummPage::CSummPage() : CPropertyPage(CSummPage::IDD)
00026 {
00027     //{{AFX_DATA_INIT(CSummPage)
00028   m_strAuthor = _T("");
00029   m_strKeywd = _T("");
00030   m_strSubj = _T("");
00031   m_strCmt = _T("");
00032   m_strTempl = _T("");
00033   m_strTitle = _T("");
00034   m_strAppname = _T("");
00035   //}}AFX_DATA_INIT
00036 }
00037
00038 CSummPage::~CSummPage()
00039 {
00040 }
00041
00042 void CSummPage::DoDataExchange(CDataExchange* pDX)
00043 {
00044   CPropertyPage::DoDataExchange(pDX);
00045     //{{AFX_DATA_MAP(CSummPage)
00046   DDX_Text(pDX, IDC_AUTHOR, m_strAuthor);
00047   DDX_Text(pDX, IDC_KEYWORDS, m_strKeywd);
00048   DDX_Text(pDX, IDC_SUBJECT, m_strSubj);
00049   DDX_Text(pDX, IDC_COMMENTS, m_strCmt);
00050   DDX_Text(pDX, IDC_TEMPLATE, m_strTempl);
00051   DDX_Text(pDX, IDC_TITLE, m_strTitle);
00052   DDX_Text(pDX, IDC_APPNAME, m_strAppname);
00053   //}}AFX_DATA_MAP
00054 }
00055
00056
00057 BEGIN_MESSAGE_MAP(CSummPage, CPropertyPage)
00058     //{{AFX_MSG_MAP(CSummPage)
00059     // NOTE: the ClassWizard will add message map macros here
00060   //}}AFX_MSG_MAP
00061 END_MESSAGE_MAP()
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CSummPage message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CXlistApp Member List

This is the complete list of members for CXlistApp, including all inherited members.
ExitInstance() | CXlistApp
InitInstance() | CXlistApp
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mainfrm.cpp Source File

  • ole
  • acdual

mainfrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "stdafx.h"
00014 #include "AutoClik.h"
00015
00016 #include "MainFrm.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00030   //{{AFX_MSG_MAP(CMainFrame)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code !
00033   ON_WM_CREATE()
00034   //}}AFX_MSG_MAP
00035 END_MESSAGE_MAP()
00036
00037 static UINT indicators[] =
00038 {
00039   ID_SEPARATOR,           // status line indicator
00040   ID_INDICATOR_CAPS,
00041   ID_INDICATOR_NUM,
00042   ID_INDICATOR_SCRL,
00043 };
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CMainFrame construction/destruction
00047
00048 CMainFrame::CMainFrame()
00049 {
00050   // TODO: add member initialization code here
00051
00052 }
00053
00054 CMainFrame::~CMainFrame()
00055 {
00056 }
00057
00058 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00059 {
00060   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00061     return -1;
00062
00063   if (!m_wndToolBar.Create(this) ||
00064     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00065   {
00066     TRACE0("Failed to create toolbar\n");
00067     return -1;      // fail to create
00068   }
00069
00070   if (!m_wndStatusBar.Create(this) ||
00071     !m_wndStatusBar.SetIndicators(indicators,
00072       sizeof(indicators)/sizeof(UINT)))
00073   {
00074     TRACE0("Failed to create status bar\n");
00075     return -1;      // fail to create
00076   }
00077
00078   // TODO: Remove this if you don't want tool tips
00079   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00080     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00081
00082   // TODO: Delete these three lines if you don't want the toolbar to
00083   //  be dockable
00084   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00085   EnableDocking(CBRS_ALIGN_ANY);
00086   DockControlBar(&m_wndToolBar);
00087
00088   return 0;
00089 }
00090
00091 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00092 {
00093   // TODO: Modify the Window class or styles here by modifying
00094   //  the CREATESTRUCT cs
00095
00096   return CMDIFrameWnd::PreCreateWindow(cs);
00097 }
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CMainFrame diagnostics
00101
00102 #ifdef _DEBUG
00103 void CMainFrame::AssertValid() const
00104 {
00105   CMDIFrameWnd::AssertValid();
00106 }
00107
00108 void CMainFrame::Dump(CDumpContext& dc) const
00109 {
00110   CMDIFrameWnd::Dump(dc);
00111 }
00112
00113 #endif //_DEBUG
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FoldersTree.cpp Source File

  • vc2008fp
  • OutlookDemo

FoldersTree.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "FoldersTree.h"
00013 #include "WorkspaceObj.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CFoldersTree
00023
00024 CFoldersTree::CFoldersTree(const CObList& lstWorkspaces, CImageList& images) : m_lstWorkspaces(lstWorkspaces), m_images(images)
00025 {
00026 }
00027
00028 CFoldersTree::~CFoldersTree()
00029 {
00030 }
00031
00032 BEGIN_MESSAGE_MAP(CFoldersTree, CTreeCtrl)
00033   ON_WM_CREATE()
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CFoldersTree message handlers
00038
00039 BOOL CFoldersTree::PreCreateWindow(CREATESTRUCT& cs)
00040 {
00041   cs.style |= WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | TVS_HASLINES | TVS_HASBUTTONS | TVS_DISABLEDRAGDROP | TVS_LINESATROOT | TVS_SHOWSELALWAYS;
00042   return CTreeCtrl::PreCreateWindow(cs);
00043 }
00044
00045 int CFoldersTree::OnCreate(LPCREATESTRUCT lpCreateStruct)
00046 {
00047   if (CTreeCtrl::OnCreate(lpCreateStruct) == -1)
00048     return -1;
00049
00050   SetImageList(&m_images, TVSIL_NORMAL);
00051
00052   // Fill folders tree:
00053   HTREEITEM htreeRoot = NULL;
00054
00055   for (POSITION pos = m_lstWorkspaces.GetHeadPosition(); pos != NULL;)
00056   {
00057     CWorkspaceObj* pWS = (CWorkspaceObj*) m_lstWorkspaces.GetNext(pos);
00058     ASSERT_VALID(pWS);
00059
00060     HTREEITEM hItem = InsertItem(pWS->m_strName, pWS->m_iIconIndex, pWS->m_iIconIndex);
00061     SetItemData(hItem, (DWORD_PTR) pWS);
00062
00063     m_Items.SetAt(pWS, hItem);
00064
00065     if (htreeRoot == NULL)
00066     {
00067       htreeRoot = hItem;
00068     }
00069   }
00070
00071   if (htreeRoot)
00072   {
00073     Expand(htreeRoot, TVE_EXPAND);
00074   }
00075
00076   return 0;
00077 }
00078
00079 BOOL CFoldersTree::SelectWorkspace(CWorkspaceObj* pWS)
00080 {
00081   ASSERT_VALID(pWS);
00082
00083   HTREEITEM hItem;
00084   if (!m_Items.Lookup(pWS, hItem))
00085   {
00086     ASSERT(FALSE);
00087     return FALSE;
00088   }
00089
00090   SelectItem(hItem);
00091   EnsureVisible(hItem);
00092   return TRUE;
00093 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesDoc.cpp Source File

  • vc2008fp
  • CustomPages

CustomPagesDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "CustomPages.h"
00013
00014 #include "CustomPagesDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CCustomPagesDoc
00024
00025 IMPLEMENT_DYNCREATE(CCustomPagesDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CCustomPagesDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CCustomPagesDoc construction/destruction
00032
00033 CCustomPagesDoc::CCustomPagesDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CCustomPagesDoc::~CCustomPagesDoc()
00040 {
00041 }
00042
00043 BOOL CCustomPagesDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CCustomPagesDoc serialization
00058
00059 void CCustomPagesDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CCustomPagesDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CCustomPagesDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CCustomPagesDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CCustomPagesDoc commands
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ACDual::IDualAClick Member List

This is the complete list of members for ACDual::IDualAClick, including all inherited members.
Position([in] IDualAutoClickPoint *newPosition) | ACDual::IDualAClick
Position([out, retval] IDualAutoClickPoint **retval) | ACDual::IDualAClick
Position([in] IDualAutoClickPoint *newPosition) | ACDual::IDualAClick
RefreshWindow() | ACDual::IDualAClick
SetAllProps([in] short x,[in] short y,[in] BSTR text) | ACDual::IDualAClick
ShowWindow() | ACDual::IDualAClick
TestError([in] short wCode) | ACDual::IDualAClick
text([in] BSTR newText) | ACDual::IDualAClick
text([out, retval] BSTR *retval) | ACDual::IDualAClick
x([in] short newX) | ACDual::IDualAClick
x([out, retval] short *retval) | ACDual::IDualAClick
y([in] short newY) | ACDual::IDualAClick
y([out, retval] short *retval) | ACDual::IDualAClick
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieDoc.cpp Source File

  • internet
  • MFCIE

mfcieDoc.cpp

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // mfcieDoc.cpp : implementation of the CMfcieDoc class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "mfcie.h"
00015
00016 #include "mfcieDoc.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMfcieDoc
00026
00027 IMPLEMENT_DYNCREATE(CMfcieDoc, CDocument)
00028
00029 BEGIN_MESSAGE_MAP(CMfcieDoc, CDocument)
00030   //{{AFX_MSG_MAP(CMfcieDoc)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code!
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CMfcieDoc construction/destruction
00038
00039 CMfcieDoc::CMfcieDoc()
00040 {
00041 }
00042
00043 CMfcieDoc::~CMfcieDoc()
00044 {
00045 }
00046
00047 BOOL CMfcieDoc::OnNewDocument()
00048 {
00049   if (!CDocument::OnNewDocument())
00050     return FALSE;
00051
00052   // TODO: add reinitialization code here
00053   // (SDI documents will reuse this document)
00054
00055   return TRUE;
00056 }
00057
00058
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CMfcieDoc serialization
00062
00063 void CMfcieDoc::Serialize(CArchive& ar)
00064 {
00065   if (ar.IsStoring())
00066   {
00067     // TODO: add storing code here
00068   }
00069   else
00070   {
00071     // TODO: add loading code here
00072   }
00073 }
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CMfcieDoc diagnostics
00077
00078 #ifdef _DEBUG
00079 void CMfcieDoc::AssertValid() const
00080 {
00081   CDocument::AssertValid();
00082 }
00083
00084 void CMfcieDoc::Dump(CDumpContext& dc) const
00085 {
00086   CDocument::Dump(dc);
00087 }
00088 #endif //_DEBUG
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CMfcieDoc commands
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/custmenu.cpp Source File

  • general
  • ctrltest

custmenu.cpp

Go to the documentation of this file.
00001 // custmenu.cpp : custom menu
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 #pragma warning( disable : 4312)
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018
00019 // for owner draw menus, the CMenu object is embedded in the main frame window
00020 //  the CMenu stays attached to the HMENU while it is running so that
00021 //  owner draw messages are delegated to this class.
00022 //  Since we attach the HMENU to a menu bar (with ModifyMenu below), we
00023 //  don't want to delete the menu twice - so we detach on the destructor.
00024
00025 CColorMenu::CColorMenu()
00026 {
00027   VERIFY(CreateMenu());
00028 }
00029
00030 CColorMenu::~CColorMenu()
00031 {
00032   Detach();
00033   ASSERT(m_hMenu == NULL);    // defaul CMenu::~CMenu will destroy
00034 }
00035
00036 void CColorMenu::AppendColorMenuItem(UINT nID, COLORREF color)
00037 {
00038   VERIFY(AppendMenu(MF_ENABLED | MF_OWNERDRAW, nID, (LPCTSTR)color));
00039 }
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042
00043 #define COLOR_BOX_WIDTH     20
00044 #define COLOR_BOX_HEIGHT    20
00045
00046
00047 void CColorMenu::MeasureItem(LPMEASUREITEMSTRUCT lpMIS)
00048 {
00049   // all items are of fixed size
00050   lpMIS->itemWidth = COLOR_BOX_WIDTH;
00051   lpMIS->itemHeight = COLOR_BOX_HEIGHT;
00052 }
00053
00054 void CColorMenu::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00055 {
00056   CDC* pDC = CDC::FromHandle(lpDIS->hDC);
00057   COLORREF cr = (COLORREF)lpDIS->itemData; // RGB in item data
00058
00059   if (lpDIS->itemAction & ODA_DRAWENTIRE)
00060   {
00061     // Paint the color item in the color requested
00062     CBrush br(cr);
00063     pDC->FillRect(&lpDIS->rcItem, &br);
00064   }
00065
00066   if ((lpDIS->itemState & ODS_SELECTED) &&
00067     (lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)))
00068   {
00069     // item has been selected - hilite frame
00070     COLORREF crHilite = RGB(255-GetRValue(cr),
00071             255-GetGValue(cr), 255-GetBValue(cr));
00072     CBrush br(crHilite);
00073     pDC->FrameRect(&lpDIS->rcItem, &br);
00074   }
00075
00076   if (!(lpDIS->itemState & ODS_SELECTED) &&
00077     (lpDIS->itemAction & ODA_SELECT))
00078   {
00079     // Item has been de-selected -- remove frame
00080     CBrush br(cr);
00081     pDC->FrameRect(&lpDIS->rcItem, &br);
00082   }
00083 }
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // custom menu test - menu ids: index of color.
00087
00088 static COLORREF colors[] = {
00089   0x00000000,     // black
00090   0x00FF0000,     // blue
00091   0x0000FF00,     // green
00092   0x00FFFF00,     // cyan
00093   0x000000FF,     // red
00094   0x00FF00FF,     // magenta
00095   0x0000FFFF,     // yellow
00096   0x00FFFFFF      // white
00097 };
00098 const int nColors = sizeof(colors)/sizeof(colors[0]);
00099
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102
00103 // Call AttachCustomMenu once
00104 //   it will replace the menu item with the ID  'IDM_TEST_CUSTOM_MENU'
00105 //   with a color menu popup
00106 // Replace the specified menu item with a color popup
00107 void CTestWindow::AttachCustomMenu()
00108 {
00109   // now add a few new menu items
00110
00111   for (int iColor = 0; iColor < nColors; iColor++)
00112     m_colorMenu.AppendColorMenuItem(IDS_COLOR_NAME_FIRST + iColor, colors[iColor]);
00113
00114   // Replace the specified menu item with a color popup
00115   //  (note: will only work once)
00116   CMenu* pMenuBar = GetMenu();
00117   ENSURE(pMenuBar != NULL);
00118   TCHAR szString[256];     // don't change the string
00119
00120   pMenuBar->GetMenuString(IDM_TEST_CUSTOM_MENU, szString, sizeof(szString),
00121     MF_BYCOMMAND);
00122   VERIFY(GetMenu()->ModifyMenu(IDM_TEST_CUSTOM_MENU, MF_BYCOMMAND | MF_POPUP,
00123     (UINT_PTR)m_colorMenu.m_hMenu, szString));
00124 }
00125
00126 /////////////////////////////////////////////////////////////////////////////
00127
00128
00129 BOOL CTestWindow::OnCommand(WPARAM wParam, LPARAM lParam)
00130 {
00131   if (wParam < IDS_COLOR_NAME_FIRST || wParam >= IDS_COLOR_NAME_FIRST + nColors)
00132     return CFrameWnd::OnCommand(wParam, lParam);        // default
00133
00134   // special color selected
00135   CString strYouPicked;
00136   strYouPicked.LoadString(IDS_YOU_PICKED_COLOR);
00137
00138   CString strColor;
00139   strColor.LoadString((UINT)wParam);
00140
00141   CString strMsg;
00142   strMsg.Format(strYouPicked, (LPCTSTR)strColor);
00143
00144   CString strMenuTest;
00145   strMenuTest.LoadString(IDS_MENU_TEST);
00146
00147   MessageBox(strMsg, strMenuTest);
00148
00149   return TRUE;
00150 }
00151
00152 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/BindHost.H Source File

  • ole
  • TstCon

BindHost.H

Go to the documentation of this file.
00001 // File: BindHost.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CTCBindHost :
00011    public IBindHost
00012 {
00013 public:
00014    CTCBindHost();
00015    ~CTCBindHost();
00016
00017    static HRESULT CreateInstance( REFIID iid, void** ppObject );
00018
00019 public:
00020    STDMETHOD_( ULONG, AddRef )();
00021    STDMETHOD_( ULONG, Release )();
00022    STDMETHOD( QueryInterface )( REFIID iid, void** ppInterface );
00023    STDMETHOD( CreateMoniker )( LPOLESTR pszName, IBindCtx* pBindCtx,
00024     IMoniker** ppMoniker, DWORD dwReserved );
00025    STDMETHOD( MonikerBindToObject )( IMoniker* pMoniker, IBindCtx* pBindCtx,
00026     IBindStatusCallback* pBSC, REFIID iid, void** ppObject );
00027    STDMETHOD( MonikerBindToStorage )( IMoniker* pMoniker, IBindCtx* pBindCtx,
00028     IBindStatusCallback* pBSC, REFIID iid, void** ppObject );
00029
00030 protected:
00031    ULONG m_nRefCount;
00032 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/resource.h Source File

  • general
  • diblook

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by DIBLOOK.RC
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDR_DIBTYPE                     3
00007 #define IDS_DIB_TOO_BIG                 4
00008 #define IDS_CANNOT_LOAD_DIB             5
00009 #define IDS_CANNOT_SAVE_DIB             6
00010 #define IDD_ABOUTBOX                    100
00011
00012 // Next default values for new objects
00013 //
00014 #ifdef APSTUDIO_INVOKED
00015 #ifndef APSTUDIO_READONLY_SYMBOLS
00016 #define _APS_NEXT_RESOURCE_VALUE        103
00017 #define _APS_NEXT_COMMAND_VALUE         32770
00018 #define _APS_NEXT_CONTROL_VALUE         101
00019 #define _APS_NEXT_SYMED_VALUE           102
00020 #endif
00021 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/stdafx.h Source File

  • ole
  • oleview

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>         // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions (including VB)
00019 #include <afxole.h>
00020 #include <afxcmn.h>
00021 #include <afxcview.h>
00022 #include <afxpriv.h>
00023 #include <ole2ver.h>
00024 #include <winreg.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/SourceView.cpp Source File

  • internet
  • HTMLEdit

SourceView.cpp

Go to the documentation of this file.
00001 // SourceView.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014 #include "SourceView.h"
00015 #include "htmleddoc.h"
00016 #include "mainfrm.h"
00017 #include "htmledview.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CSourceView
00027
00028 IMPLEMENT_DYNCREATE(CSourceView, CEditView)
00029
00030 CSourceView::CSourceView()
00031 {
00032 }
00033
00034 CSourceView::~CSourceView()
00035 {
00036 }
00037
00038
00039 BEGIN_MESSAGE_MAP(CSourceView, CEditView)
00040   //{{AFX_MSG_MAP(CSourceView)
00041   ON_WM_CREATE()
00042   //}}AFX_MSG_MAP
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CSourceView drawing
00047
00048 void CSourceView::OnDraw(CDC* /*pDC*/)
00049 {
00050 }
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CSourceView diagnostics
00054
00055 #ifdef _DEBUG
00056 void CSourceView::AssertValid() const
00057 {
00058   CEditView::AssertValid();
00059 }
00060
00061 void CSourceView::Dump(CDumpContext& dc) const
00062 {
00063   CEditView::Dump(dc);
00064 }
00065 #endif //_DEBUG
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CSourceView message handlers
00069
00070 int CSourceView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00071 {
00072   if (CEditView::OnCreate(lpCreateStruct) == -1)
00073     return -1;
00074   CEdit &edit = GetEditCtrl();
00075
00076   //try for courier, if that fails, go for the ANSI fixed font
00077   if(!m_font.CreateFont(-MulDiv(10, GetDeviceCaps(edit.GetDC()->m_hDC, LOGPIXELSY), 72)
00078       ,0,0,0,FW_DONTCARE,0,0,0,ANSI_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS
00079       ,DEFAULT_QUALITY,DEFAULT_PITCH,_T("COURIER")))
00080   {
00081     m_font.CreateStockObject(ANSI_FIXED_FONT);
00082   }
00083   edit.SetFont(&m_font);
00084
00085   return 0;
00086 }
00087
00088 void CSourceView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
00089 {
00090   if(bActivate && pActivateView==this && pDeactiveView != this)
00091   {
00092     //we're being activated get the HTML from the WebView
00093     UpdateView();
00094   }
00095
00096   CEditView::OnActivateView(bActivate, pActivateView, pDeactiveView);
00097 }
00098
00099 void CSourceView::UpdateView()
00100 {
00101   CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();
00102   ASSERT_VALID(pFrame);
00103
00104   CHTMLEdView* pWebView = (CHTMLEdView*)pFrame->GetWebView();
00105   ASSERT_VALID(pWebView);
00106   CString strHTML;
00107   pWebView->GetDocumentHTML(strHTML);
00108   SetWindowText(strHTML);
00109 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDateDialog Member List

This is the complete list of members for CDateDialog, including all inherited members.
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CDateDialog(CWnd *pParent=NULL) | CDateDialog |
CDateDialog(CWnd *pParent=NULL) | CDateDialog |
DateFmtEnumProc(LPTSTR lpszFormatString) | CDateDialog | [static]
DateFmtEnumProc(LPTSTR lpszFormatString) | CDateDialog | [static]
DoDataExchange(CDataExchange *pDX) | CDateDialog | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CDateDialog | [protected, virtual]
GetHelpIDs() | CDateDialog | [inline, protected, virtual]
GetHelpIDs() | CDateDialog | [inline, protected, virtual]
IDD enum value | CDateDialog |
m_id | CDateDialog | [static]
m_listBox | CDateDialog |
m_nHelpIDs | CDateDialog | [protected, static]
m_pListBox | CDateDialog | [static]
m_strSel | CDateDialog |
m_time | CDateDialog | [static]
OnDblclkDatedialogList() | CDateDialog | [protected]
OnDblclkDatedialogList() | CDateDialog | [protected]
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnInitDialog() | CDateDialog | [protected, virtual]
OnInitDialog() | CDateDialog | [protected, virtual]
TimeFmtEnumProc(LPTSTR lpszFormatString) | CDateDialog | [static]
TimeFmtEnumProc(LPTSTR lpszFormatString) | CDateDialog | [static]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionDoc.h Source File

  • vc2008fp
  • StateCollection

StateCollectionDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CStateCollectionDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CStateCollectionDoc();
00017   DECLARE_DYNCREATE(CStateCollectionDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CStateCollectionDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/CustomToolTipCtrl.cpp Source File

  • vc2008fp
  • DlgToolTips

CustomToolTipCtrl.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DlgToolTips.h"
00013 #include "CustomToolTipCtrl.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CCustomToolTipCtrl
00023
00024 CCustomToolTipCtrl::CCustomToolTipCtrl()
00025 {
00026   m_nCurrID = 0;
00027 }
00028
00029 CCustomToolTipCtrl::~CCustomToolTipCtrl()
00030 {
00031 }
00032
00033
00034 BEGIN_MESSAGE_MAP(CCustomToolTipCtrl, CMFCToolTipCtrl)
00035   ON_NOTIFY_REFLECT(TTN_SHOW, OnShow)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CCustomToolTipCtrl message handlers
00040
00041 void CCustomToolTipCtrl::OnShow(NMHDR* pNMHDR, LRESULT* pResult)
00042 {
00043   m_nCurrID = CWnd::FromHandle ((HWND)pNMHDR->idFrom)->GetDlgCtrlID ();
00044
00045   switch (m_nCurrID)
00046   {
00047   case IDOK:
00048     SetDescription (_T("OK Button description..."));
00049     break;
00050
00051   case IDCANCEL:
00052     SetDescription (_T("Cancel Button description..."));
00053     break;
00054
00055   default:
00056     SetDescription (_T (""));
00057   }
00058
00059   CMFCToolTipCtrl::OnShow (pNMHDR, pResult);
00060 }
00061
00062 BOOL CCustomToolTipCtrl::OnDrawIcon (CDC* pDC, CRect rectImage)
00063 {
00064   UINT uiBmpResID = 0;
00065
00066   switch (m_nCurrID)
00067   {
00068   case IDOK:
00069     uiBmpResID = IDB_OK;
00070     break;
00071
00072   case IDCANCEL:
00073     uiBmpResID = IDB_CANCEL;
00074     break;
00075   }
00076
00077   if (uiBmpResID == 0)
00078   {
00079     return FALSE;
00080   }
00081
00082   CMFCToolBarImages image;
00083   image.Load (uiBmpResID);
00084   image.SetSingleImage ();
00085   image.DrawEx (pDC, rectImage, 0);
00086
00087   return TRUE;
00088 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawPoly Member List

This is the complete list of members for CDrawPoly, including all inherited members.
active enum value | CDrawObj |
AddPoint(const CPoint &point, CDrawView *pView=NULL) | CDrawPoly |
AddPoint(const CPoint &point, CDrawView *pView=NULL) | CDrawPoly |
CanChangeFillColor() const | CDrawObj | [inline, virtual]
CanChangeLineColor() const | CDrawObj | [inline, virtual]
CanChangeLineWeight() const | CDrawObj | [inline, virtual]
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawPoly() | CDrawPoly | [protected]
CDrawPoly(const CRect &position) | CDrawPoly |
CDrawPoly() | CDrawPoly | [protected]
CDrawPoly(const CRect &position) | CDrawPoly |
Clone(CDrawDoc *pDoc) | CDrawPoly | [virtual]
Clone(CDrawDoc *pDoc) | CDrawPoly | [virtual]
CPolyTool class | CDrawPoly | [friend]
DECLARE_SERIAL(CDrawPoly) | CDrawPoly | [protected]
DECLARE_SERIAL(CDrawPoly) | CDrawPoly | [protected]
CDrawObj::DECLARE_SERIAL(CDrawObj) | CDrawObj | [protected]
Draw(CDC *pDC) | CDrawPoly | [virtual]
Draw(CDC *pDC) | CDrawPoly | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
EnableFill(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
EnableLine(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
GetFillColor() const | CDrawObj | [inline]
GetHandle(int nHandle) | CDrawPoly | [virtual]
GetHandle(int nHandle) | CDrawPoly | [virtual]
GetHandleCount() | CDrawPoly | [virtual]
GetHandleCount() | CDrawPoly | [virtual]
GetHandleCursor(int nHandle) | CDrawPoly | [virtual]
GetHandleCursor(int nHandle) | CDrawPoly | [virtual]
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetLineColor() const | CDrawObj | [inline]
GetLineWeight() const | CDrawObj | [inline]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawPoly | [virtual]
Intersects(const CRect &rect) | CDrawPoly | [virtual]
Invalidate() | CDrawObj |
Invalidate() | CDrawObj |
IsEnableFill() const | CDrawObj | [inline]
IsEnableLine() const | CDrawObj | [inline]
m_bBrush | CDrawObj | [protected]
m_bPen | CDrawObj | [protected]
m_logbrush | CDrawObj | [protected]
m_logpen | CDrawObj | [protected]
m_nAllocPoints | CDrawPoly | [protected]
m_nPoints | CDrawPoly | [protected]
m_pDocument | CDrawObj |
m_pDrawObj | CDrawPoly | [protected]
m_points | CDrawPoly | [protected]
m_position | CDrawObj |
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawPoly | [virtual]
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawPoly | [virtual]
MoveTo(const CRect &position, CDrawView *pView=NULL) | CDrawPoly | [virtual]
MoveTo(const CPoint &position) | CDrawPoly | [virtual]
MoveTo(const CRect &position, CDrawView *pView=NULL) | CDrawPoly | [virtual]
normal enum value | CDrawObj |
OnEditProperties() | CDrawObj | [virtual]
OnEditProperties() | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
RecalcBounds(CDrawView *pView=NULL) | CDrawPoly |
RecalcBounds(CDrawView *pView=NULL) | CDrawPoly |
Remove() | CDrawObj | [virtual]
Remove() | CDrawObj | [virtual]
selected enum value | CDrawObj |
Serialize(CArchive &ar) | CDrawPoly | [virtual]
Serialize(CArchive &ar) | CDrawPoly | [virtual]
SetFillColor(COLORREF color) | CDrawObj | [virtual]
SetFillColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineColor(COLORREF color) | CDrawObj | [virtual]
SetLineColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineWeight(int nWidth, BOOL bPreview=FALSE) | CDrawObj |
TrackerState enum name | CDrawObj |
TrackerState enum name | CDrawObj |
~CDrawObj() | CDrawObj | [virtual]
~CDrawObj() | CDrawObj | [virtual]
~CDrawPoly() | CDrawPoly | [virtual]
~CDrawPoly() | CDrawPoly | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/mainfrm.h Source File

  • general
  • npp

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 class CMainFrame : public CFrameWnd
00014 {
00015 protected: // create from serialization only
00016   CMainFrame();
00017   DECLARE_DYNCREATE(CMainFrame)
00018
00019 // Attributes
00020 public:
00021   CComboToolBar    m_wndToolBar;
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CMainFrame)
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CStatusBar  m_wndStatusBar;
00041   BOOL CreateComboBox();
00042
00043 // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CMainFrame)
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047   afx_msg void OnClose();
00048   afx_msg void OnViewStatusBar();
00049   afx_msg void OnEditFindCombo();
00050   //}}AFX_MSG
00051   afx_msg void OnUpdateViewStatusBar(CCmdUI* pCmdUI);
00052   afx_msg void OnUpdateLineNumber(CCmdUI* pCmdUI);
00053   afx_msg void OnUpdateClock(CCmdUI* pCmdUI);
00054
00055   // timer call back function
00056   static void CALLBACK EXPORT UpdateTime(HWND hWnd,UINT nMsg, UINT_PTR nIDEvent, DWORD dwTime);
00057   DECLARE_MESSAGE_MAP()
00058 };
00059
00060 inline CNotepadView* GetApplicationView()
00061 {
00062   CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd();
00063   ENSURE(pFrame);
00064   return (CNotepadView*)(pFrame)->GetActiveView();
00065 }
00066
00067 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMCategoryBar Member List

This is the complete list of members for CMSMCategoryBar, including all inherited members.
CMSMCategoryBar() | CMSMCategoryBar |
CMSMToolBar() | CMSMToolBar |
DrawButton(CDC *pDC, CMFCToolBarButton *pButton, CMFCToolBarImages *pImages, BOOL bHighlighted, BOOL bDrawDisabledImages) | CMSMToolBar | [protected, virtual]
GetRowHeight() const | CMSMCategoryBar | [inline, virtual]
LoadToolBar(UINT uiResID, UINT uiColdResID=0, UINT uiMenuResID=0, BOOL bLocked=FALSE, UINT uiDisabledResID=0, UINT uiMenuDisabledResID=0, UINT uiHotResID=0, UINT uiPressedResID=0) | CMSMToolBar | [virtual]
m_PressedImages | CMSMToolBar | [protected, static]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMSMCategoryBar | [protected]
OnSysColorChange() | CMSMToolBar | [protected]
RestoreOriginalstate() | CMSMCategoryBar | [virtual]
~CMSMCategoryBar() | CMSMCategoryBar | [virtual]
~CMSMToolBar() | CMSMToolBar | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/docopt.cpp Source File

  • ole
  • wordpad

docopt.cpp

Go to the documentation of this file.
00001 // docopt.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "docopt.h"
00015 #include "helpids.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDocOptPage property page
00024
00025 const DWORD CDocOptPage::m_nHelpIDs[] =
00026 {
00027   IDC_BOX, IDH_COMM_GROUPBOX,
00028   IDC_WRAP_NONE, IDH_WORDPAD_WRAP_NO,
00029   IDC_WRAP_WINDOW, IDH_WORDPAD_WRAP_WINDOW,
00030   IDC_WRAP_RULER, IDH_WORDPAD_WRAP_RULER,
00031   IDC_BOXT, IDH_COMM_GROUPBOX,
00032   IDC_CHECK_TOOLBAR, IDH_WORDPAD_CHECK_TOOLBAR,
00033   IDC_CHECK_FORMATBAR, IDH_WORDPAD_CHECK_FORMATBAR,
00034   IDC_CHECK_STATUSBAR, IDH_WORDPAD_CHECK_STATUSBAR,
00035   IDC_CHECK_RULERBAR, IDH_WORDPAD_CHECK_RULERBAR,
00036   0, 0
00037 };
00038
00039 CDocOptPage::CDocOptPage() : CCSPropertyPage(CDocOptPage::IDD)
00040 {
00041   //{{AFX_DATA_INIT(CDocOptPage)
00042   m_nWordWrap = -1;
00043   m_bFormatBar = FALSE;
00044   m_bRulerBar = FALSE;
00045   m_bStatusBar = FALSE;
00046   m_bToolBar = FALSE;
00047   //}}AFX_DATA_INIT
00048 }
00049
00050 CDocOptPage::CDocOptPage(UINT nIDCaption) :
00051   CCSPropertyPage(CDocOptPage::IDD, nIDCaption)
00052 {
00053   m_nWordWrap = -1;
00054   m_bFormatBar = FALSE;
00055   m_bRulerBar = FALSE;
00056   m_bStatusBar = FALSE;
00057   m_bToolBar = FALSE;
00058 }
00059
00060 CDocOptPage::~CDocOptPage()
00061 {
00062 }
00063
00064 void CDocOptPage::DoDataExchange(CDataExchange* pDX)
00065 {
00066   CCSPropertyPage::DoDataExchange(pDX);
00067   //{{AFX_DATA_MAP(CDocOptPage)
00068   DDX_Radio(pDX, IDC_WRAP_NONE, m_nWordWrap);
00069   DDX_Check(pDX, IDC_CHECK_FORMATBAR, m_bFormatBar);
00070   DDX_Check(pDX, IDC_CHECK_RULERBAR, m_bRulerBar);
00071   DDX_Check(pDX, IDC_CHECK_STATUSBAR, m_bStatusBar);
00072   DDX_Check(pDX, IDC_CHECK_TOOLBAR, m_bToolBar);
00073   //}}AFX_DATA_MAP
00074 }
00075
00076
00077 BEGIN_MESSAGE_MAP(CDocOptPage, CCSPropertyPage)
00078   //{{AFX_MSG_MAP(CDocOptPage)
00079     // NOTE: the ClassWizard will add message map macros here
00080   //}}AFX_MSG_MAP
00081 END_MESSAGE_MAP()
00082
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // CDocOptPage message handlers
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CEmbeddedOptPage property page
00089
00090 CEmbeddedOptPage::CEmbeddedOptPage() : CDocOptPage(IDS_EMBEDDED_OPTIONS)
00091 {
00092 }
00093
00094 BOOL CEmbeddedOptPage::OnInitDialog()
00095 {
00096   BOOL b = CDocOptPage::OnInitDialog();
00097   GetDlgItem(IDC_CHECK_STATUSBAR)->ShowWindow(SW_HIDE);
00098   return b;
00099 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMacroComboBox Member List

This is the complete list of members for CMacroComboBox, including all inherited members.
AddMRUEntry(LPCTSTR pszMacroName) | CMacroComboBox | [protected]
CMacroComboBox() | CMacroComboBox |
PreTranslateMessage(MSG *pMsg) | CMacroComboBox | [virtual]
~CMacroComboBox() | CMacroComboBox | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ddxm.h Source File

  • vc2008fp
  • WordPad

ddxm.h

Go to the documentation of this file.
00001 //
00002 // This is a part of the Microsoft Foundation Classes C++ library.
00003 // Copyright (C) 1992-1998 Microsoft Corporation
00004 // All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <limits.h>
00013 void PASCAL DDX_Twips(CDataExchange* pDX, int nIDC, int& value);
00014 void PASCAL DDV_MinMaxTwips(CDataExchange* pDX, int value, int minVal, int maxVal);
00015 #define DDXM_BLANK INT_MAX
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3Dlg.h Source File

  • controls
  • cmnctrl

CmnCtrl3Dlg.h

Go to the documentation of this file.
00001 // CmnCtrl3Dlg.h : header file
00002 //
00003
00004 #pragma once
00005
00006
00007 // CCmnCtrl3Dlg dialog
00008 class CCmnCtrl3Dlg : public CDialog
00009 {
00010 // Construction
00011 public:
00012   CCmnCtrl3Dlg(CWnd* pParent = NULL); // standard constructor
00013
00014 // Dialog Data
00015   enum { IDD = IDD_CMNCTRL3_DIALOG };
00016
00017   protected:
00018   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00019
00020
00021 // Implementation
00022 protected:
00023   HICON m_hIcon;
00024
00025   // Generated message map functions
00026   virtual BOOL OnInitDialog();
00027   afx_msg void OnPaint();
00028   afx_msg HCURSOR OnQueryDragIcon();
00029   DECLARE_MESSAGE_MAP()
00030 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/DinnerPg.cpp Source File

  • general
  • snapvw

DinnerPg.cpp

Go to the documentation of this file.
00001 // DinnerPg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "snapvw.h"
00014 #include "DinnerPg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDinnerPage property page
00024
00025 IMPLEMENT_DYNCREATE(CDinnerPage, CPropertyPage)
00026
00027 CDinnerPage::CDinnerPage() : CPropertyPage(CDinnerPage::IDD)
00028 {
00029   //{{AFX_DATA_INIT(CDinnerPage)
00030     // NOTE: the ClassWizard will add member initialization here
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 CDinnerPage::~CDinnerPage()
00035 {
00036 }
00037
00038 void CDinnerPage::DoDataExchange(CDataExchange* pDX)
00039 {
00040   CPropertyPage::DoDataExchange(pDX);
00041   //{{AFX_DATA_MAP(CDinnerPage)
00042     // NOTE: the ClassWizard will add DDX and DDV calls here
00043   //}}AFX_DATA_MAP
00044 }
00045
00046
00047 BEGIN_MESSAGE_MAP(CDinnerPage, CPropertyPage)
00048   //{{AFX_MSG_MAP(CDinnerPage)
00049   //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CDinnerPage message handlers
00054
00055 BOOL CDinnerPage::OnInitDialog()
00056 {
00057   CPropertyPage::OnInitDialog();
00058
00059   // TODO: Add extra initialization here
00060
00061   CButton* pBevButton;
00062   pBevButton = (CButton*) GetDlgItem(IDC_COFFEE1);
00063   pBevButton->SetCheck(1);
00064
00065   CButton* pFoodButton;
00066   pFoodButton = (CButton*) GetDlgItem(IDC_ROMANTIC);
00067   pFoodButton->SetCheck(1);
00068
00069   CButton* pCompButton;
00070   pCompButton = (CButton*) GetDlgItem(IDC_NEIGHBOR);
00071   pCompButton->SetCheck(1);
00072
00073   return TRUE;  // return TRUE unless you set the focus to a control
00074           // EXCEPTION: OCX Property Pages should return FALSE
00075 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/targetver.h Source File

  • vc2008fp
  • ToolbarDateTimePicker

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLoggingDlg Member List

This is the complete list of members for CLoggingDlg, including all inherited members.
CLoggingDlg(CWnd *pParent=NULL) | CLoggingDlg |
DoDataExchange(CDataExchange *pDX) | CLoggingDlg | [protected, virtual]
IDD enum value | CLoggingDlg |
m_butFileNameBrowse | CLoggingDlg |
m_eboxFileName | CLoggingDlg |
m_iLogType | CLoggingDlg |
m_strFileName | CLoggingDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CLoggingDlg | [protected]
OnFileNameBrowse() | CLoggingDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CLoggingDlg | [protected]
OnInitDialog() | CLoggingDlg | [protected, virtual]
OnLogToDebug() | CLoggingDlg | [protected]
OnLogToFile() | CLoggingDlg | [protected]
OnLogToNull() | CLoggingDlg | [protected]
OnLogToOutput() | CLoggingDlg | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoView.cpp Source File

  • vc2008fp
  • IEDemo

IEDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013
00014 #include "IEDemoDoc.h"
00015 #include "IEDemoView.h"
00016
00017 #include "MainFrm.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CIEDemoView
00027
00028 IMPLEMENT_DYNCREATE(CIEDemoView, CHtmlView)
00029
00030 BEGIN_MESSAGE_MAP(CIEDemoView, CHtmlView)
00031   //{{AFX_MSG_MAP(CIEDemoView)
00032   ON_COMMAND(ID_GO_BACK, OnGoBack)
00033   ON_COMMAND(ID_GO_FORWARD, OnGoForward)
00034   ON_COMMAND(ID_GO_SEARCH_THE_WEB, OnGoSearchTheWeb)
00035   ON_COMMAND(ID_GO_START_PAGE, OnGoStartPage)
00036   ON_COMMAND(ID_VIEW_STOP, OnViewStop)
00037   ON_COMMAND(ID_VIEW_REFRESH, OnViewRefresh)
00038   ON_COMMAND(ID_VIEW_FONTS_LARGEST, OnViewFontsLargest)
00039   ON_COMMAND(ID_VIEW_FONTS_LARGE, OnViewFontsLarge)
00040   ON_COMMAND(ID_VIEW_FONTS_MEDIUM, OnViewFontsMedium)
00041   ON_COMMAND(ID_VIEW_FONTS_SMALL, OnViewFontsSmall)
00042   ON_COMMAND(ID_VIEW_FONTS_SMALLEST, OnViewFontsSmallest)
00043   ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
00044   ON_UPDATE_COMMAND_UI(ID_GO_FORWARD, OnUpdateGoForward)
00045   ON_UPDATE_COMMAND_UI(ID_GO_BACK, OnUpdateGoBack)
00046   ON_WM_DESTROY()
00047   //}}AFX_MSG_MAP
00048   // Standard printing commands
00049   ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
00050   ON_COMMAND(ID_FILE_PRINT_DIRECT, CHtmlView::OnFilePrint)
00051   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CHtmlView::OnFilePrintPreview)
00052 END_MESSAGE_MAP()
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CIEDemoView construction/destruction
00056
00057 CIEDemoView::CIEDemoView()
00058 {
00059   // TODO: add construction code here
00060
00061 }
00062
00063 CIEDemoView::~CIEDemoView()
00064 {
00065 }
00066
00067 BOOL CIEDemoView::PreCreateWindow(CREATESTRUCT& cs)
00068 {
00069   // TODO: Modify the Window class or styles here by modifying
00070   //  the CREATESTRUCT cs
00071
00072   return CHtmlView::PreCreateWindow(cs);
00073 }
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CIEDemoView drawing
00077
00078 void CIEDemoView::OnDraw(CDC* /*pDC*/)
00079 {
00080 //  CIEDemoDoc* pDoc = GetDocument();
00081 //  ASSERT_VALID(pDoc);
00082   // TODO: add draw code for native data here
00083 }
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CIEDemoView printing
00087
00088 BOOL CIEDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00089 {
00090   // default preparation
00091   return DoPreparePrinting(pInfo);
00092 }
00093
00094 void CIEDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00095 {
00096   // TODO: add extra initialization before printing
00097 }
00098
00099 void CIEDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00100 {
00101   // TODO: add cleanup after printing
00102 }
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CIEDemoView diagnostics
00106
00107 #ifdef _DEBUG
00108 void CIEDemoView::AssertValid() const
00109 {
00110   CHtmlView::AssertValid();
00111 }
00112
00113 void CIEDemoView::Dump(CDumpContext& dc) const
00114 {
00115   CHtmlView::Dump(dc);
00116 }
00117
00118 CIEDemoDoc* CIEDemoView::GetDocument() // non-debug version is inline
00119 {
00120   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CIEDemoDoc)));
00121   return (CIEDemoDoc*)m_pDocument;
00122 }
00123 #endif //_DEBUG
00124
00125 /////////////////////////////////////////////////////////////////////////////
00126 // CIEDemoView message handlers
00127 // these are all simple one-liners to do simple controlling of the browser
00128 void CIEDemoView::OnGoBack()
00129 {
00130   CIEDemoDoc* pDoc = GetDocument();
00131   ASSERT_VALID(pDoc);
00132
00133   CHistoryObj* pHistoryObj = pDoc->GoBack ();
00134   if (pHistoryObj != NULL)
00135   {
00136     Navigate2 (pHistoryObj->GetURL (), 0, NULL);
00137   }
00138 }
00139
00140 void CIEDemoView::OnGoForward()
00141 {
00142 //  GoForward();
00143   CIEDemoDoc* pDoc = GetDocument();
00144   ASSERT_VALID(pDoc);
00145
00146   CHistoryObj* pHistoryObj = pDoc->GoForward ();
00147   if (pHistoryObj != NULL)
00148   {
00149     Navigate2 (pHistoryObj->GetURL (), 0, NULL);
00150   }
00151 }
00152
00153 void CIEDemoView::OnGoSearchTheWeb()
00154 {
00155   GoSearch();
00156 }
00157
00158 void CIEDemoView::OnGoStartPage()
00159 {
00160   GoHome();
00161 }
00162
00163 void CIEDemoView::OnViewStop()
00164 {
00165   Stop();
00166 }
00167
00168 void CIEDemoView::OnViewRefresh()
00169 {
00170   Refresh();
00171 }
00172
00173 // these functions control the font size.  There is no explicit command in the
00174 // CHtmlView class to do this, but we can do it by using the ExecWB() function.
00175 void CIEDemoView::OnViewFontsLargest()
00176 {
00177   COleVariant vaZoomFactor(4l);
00178
00179   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00180        &vaZoomFactor, NULL);
00181 }
00182
00183 void CIEDemoView::OnViewFontsLarge()
00184 {
00185   COleVariant vaZoomFactor(3l);
00186
00187   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00188        &vaZoomFactor, NULL);
00189 }
00190
00191 void CIEDemoView::OnViewFontsMedium()
00192 {
00193   COleVariant vaZoomFactor(2l);
00194
00195   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00196        &vaZoomFactor, NULL);
00197 }
00198
00199 void CIEDemoView::OnViewFontsSmall()
00200 {
00201   COleVariant vaZoomFactor(1l);
00202
00203   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00204        &vaZoomFactor, NULL);
00205 }
00206
00207 void CIEDemoView::OnViewFontsSmallest()
00208 {
00209   COleVariant vaZoomFactor(0l);
00210
00211   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00212        &vaZoomFactor, NULL);
00213 }
00214
00215 // This demonstrates how we can use the Navigate2() function to load local files
00216 // including local HTML pages, GIFs, AIFF files, etc.
00217 void CIEDemoView::OnFileOpen()
00218 {
00219   BOOL bValidString;
00220   CString str;
00221   bValidString = str.LoadString(IDS_FILETYPES);
00222
00223   CFileDialog fileDlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, str);
00224
00225   if(fileDlg.DoModal() == IDOK)
00226     Navigate2(fileDlg.GetPathName(), 0, NULL);
00227 }
00228
00229 void CIEDemoView::OnUpdateGoForward(CCmdUI* pCmdUI)
00230 {
00231   CIEDemoDoc* pDoc = GetDocument();
00232   ASSERT_VALID(pDoc);
00233
00234   pCmdUI->Enable (pDoc->IsFrwdAvailable ());
00235 }
00236
00237 void CIEDemoView::OnUpdateGoBack(CCmdUI* pCmdUI)
00238 {
00239   CIEDemoDoc* pDoc = GetDocument();
00240   ASSERT_VALID(pDoc);
00241
00242   pCmdUI->Enable (pDoc->IsBackAvailable ());
00243 }
00244
00245 void CIEDemoView::OnDocumentComplete(LPCTSTR lpszURL)
00246 {
00247   // make sure the main frame has the new URL.  This call also stops the animation
00248   ((CMainFrame*)GetParentFrame())->SetAddress(lpszURL);
00249
00250   CIEDemoDoc* pDoc = GetDocument();
00251   ASSERT_VALID(pDoc);
00252
00253   pDoc->AddURLToHistory (GetLocationName (), lpszURL);
00254   ((CMainFrame*)GetParentFrame())->SetProgress (0, -1);
00255
00256   CHtmlView::OnDocumentComplete(lpszURL);
00257 }
00258
00259 void CIEDemoView::OnTitleChange(LPCTSTR lpszText)
00260 {
00261   // this will change the main frame's title bar
00262   if (m_pDocument != NULL)
00263     m_pDocument->SetTitle(lpszText);
00264 }
00265
00266 void CIEDemoView::OnBeforeNavigate2(LPCTSTR /*lpszURL*/, DWORD /*nFlags*/, LPCTSTR /*lpszTargetFrameName*/, CByteArray& /*baPostedData*/, LPCTSTR /*lpszHeaders*/, BOOL* /*pbCancel*/)
00267 {
00268   // start the animation so that is plays while the new page is being loaded
00269   ((CMainFrame*)GetParentFrame())->StartAnimation();
00270 }
00271
00272 void CIEDemoView::OnInitialUpdate()
00273 {
00274   GoHome();
00275 }
00276
00277 void CIEDemoView::OnProgressChange(long nProgress, long nProgressMax)
00278 {
00279   ((CMainFrame*)GetParentFrame())->SetProgress(nProgress, nProgressMax);
00280
00281   CHtmlView::OnProgressChange(nProgress, nProgressMax);
00282 }
00283
00284 void CIEDemoView::OnDestroy()
00285 {
00286   CHtmlView::OnDestroy();
00287   CView::OnDestroy();   // Fixes CHtmlView bug
00288 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTestContainer98Doc Member List

This is the complete list of members for CTestContainer98Doc, including all inherited members.
AddAmbientProperty(DISPID dispid, LPCTSTR pszName, const VARIANT &var, int vti) | CTestContainer98Doc |
AddControl(REFCLSID clsid, LPCTSTR pszName, REFIID iidPersistanceMedium=IID_NULL, IUnknown *pPersistanceMedium=NULL) | CTestContainer98Doc |
AddItem(CDocItem *pItem) | CTestContainer98Doc | [virtual]
BringToFront(CDocItem *pItem) | CTestContainer98Doc |
BroadcastAmbientPropertyChange(DISPID dispid) | CTestContainer98Doc | [protected]
CanCloseFrame(CFrameWnd *pFrame) | CTestContainer98Doc | [virtual]
CanWindowlessActivate() const | CTestContainer98Doc |
Cleanup() | CTestContainer98Doc | [protected]
CreateUniqueItemName(CTestContainer98Item *pItem, LPCTSTR pszBaseName, CString &strUniqueName) | CTestContainer98Doc |
CTestContainer98Doc() | CTestContainer98Doc | [protected]
CTestContainer98Item class | CTestContainer98Doc | [friend]
DeleteContents() | CTestContainer98Doc | [virtual]
FindAmbientProperty(DISPID dispid) | CTestContainer98Doc |
FindAmbientProperty(LPCOLESTR pszName) | CTestContainer98Doc |
FindControl(LPCTSTR pszName) | CTestContainer98Doc | [protected]
FindItem(CDocItem *pItem) const | CTestContainer98Doc |
FireOnNewControl(IDispatch *pControl) | CTestContainer98Doc | [protected]
GetAmbientProperty(int iProp) | CTestContainer98Doc |
GetDispatchIID(IID *piid) | CTestContainer98Doc | [protected]
GetLog() const | CTestContainer98Doc |
GetNextTabItem(CTestContainer98Item *pItem) const | CTestContainer98Doc |
GetNumAmbientProperties() const | CTestContainer98Doc |
GetOutputEditControl() | CTestContainer98Doc |
GetPrevItem(POSITION &pos) const | CTestContainer98Doc |
GetPrimarySelection() | CTestContainer98Doc | [protected]
GetScriptManager(BOOL tCreate=TRUE) | CTestContainer98Doc | [protected]
GetTailPosition() const | CTestContainer98Doc |
GetUserMode() const | CTestContainer98Doc |
GetView() const | CTestContainer98Doc |
HonorIgnoreActivateWhenVisible() const | CTestContainer98Doc |
InitDefaultAmbientProperties() | CTestContainer98Doc | [protected]
Initialize() | CTestContainer98Doc | [protected]
InitScriptManager() | CTestContainer98Doc | [protected]
InsertControl(LPCTSTR pszProgID, LPCTSTR pszName) | CTestContainer98Doc | [protected]
Log(LPCTSTR pszMessage) | CTestContainer98Doc | [protected]
m_apAmbientProperties | CTestContainer98Doc | [protected]
m_descFont | CTestContainer98Doc | [protected]
m_lpTabOrder | CTestContainer98Doc | [protected]
m_pActiveScript | CTestContainer98Doc | [protected]
m_pActiveScriptParse | CTestContainer98Doc | [protected]
m_pFontHolder | CTestContainer98Doc | [protected]
m_pLog | CTestContainer98Doc | [protected]
m_pScriptManager | CTestContainer98Doc | [protected]
m_pStorage | CTestContainer98Doc | [protected]
m_pStream | CTestContainer98Doc | [protected]
m_strDirectory | CTestContainer98Doc | [protected]
m_tAllowWindowless | CTestContainer98Doc | [protected]
m_tFreezeEvents | CTestContainer98Doc | [protected]
m_tHonorIgnoreActivateWhenVisible | CTestContainer98Doc | [protected]
m_tIAdviseSinkEx | CTestContainer98Doc | [protected]
m_tIOleInPlaceSiteEx | CTestContainer98Doc | [protected]
m_tIOleInPlaceSiteWindowless | CTestContainer98Doc | [protected]
m_tSBindHost | CTestContainer98Doc | [protected]
m_tSlowDrawing | CTestContainer98Doc | [protected]
m_tTwoPassDrawing | CTestContainer98Doc | [protected]
m_tUseIPointerInactive | CTestContainer98Doc | [protected]
m_tUseQuickActivation | CTestContainer98Doc | [protected]
m_tUserMode | CTestContainer98Doc | [protected]
OnContainerAmbientProperties() | CTestContainer98Doc | [protected]
OnContainerInfo() | CTestContainer98Doc | [protected]
OnContainerOptions() | CTestContainer98Doc | [protected]
OnContainerTabOrder() | CTestContainer98Doc | [protected]
OnEditDeleteAll() | CTestContainer98Doc | [protected]
OnNewDocument() | CTestContainer98Doc | [virtual]
OnOpenDocument(LPCTSTR lpszPathName) | CTestContainer98Doc | [virtual]
OnOptionsFreezeEvents() | CTestContainer98Doc | [protected]
OnOptionsLogging() | CTestContainer98Doc | [protected]
OnOptionsSlowDrawing() | CTestContainer98Doc | [protected]
OnOptionsTwoPassDrawing() | CTestContainer98Doc | [protected]
OnRunMacro() | CTestContainer98Doc | [protected]
OnSaveDocument(LPCTSTR lpszPathName) | CTestContainer98Doc | [virtual]
OnToolsMacros() | CTestContainer98Doc | [protected]
OnUpdateEditDeleteAll(CCmdUI *pCmdUI) | CTestContainer98Doc | [protected]
OnUpdateOptionsFreezeEvents(CCmdUI *pCmdUI) | CTestContainer98Doc | [protected]
OnUpdateOptionsSlowDrawing(CCmdUI *pCmdUI) | CTestContainer98Doc | [protected]
OnUpdateOptionsTwoPassDrawing(CCmdUI *pCmdUI) | CTestContainer98Doc | [protected]
PreCloseFrame(CFrameWnd *pFrame) | CTestContainer98Doc |
RemoveItem(CDocItem *pItem) | CTestContainer98Doc | [virtual]
RunAutomationScript(LPCTSTR szScriptFile) | CTestContainer98Doc |
SaveModified() | CTestContainer98Doc | [protected, virtual]
SendToBack(CDocItem *pItem) | CTestContainer98Doc |
Serialize(CArchive &ar) | CTestContainer98Doc | [virtual]
SetItemTabOrder(CTestContainer98Item *pItem, int iTabOrder) | CTestContainer98Doc |
SetPrimarySelection(LPDISPATCH newValue) | CTestContainer98Doc | [protected]
SetUserMode(BOOL tUserMode) | CTestContainer98Doc |
SupportsInterface(REFIID iid) | CTestContainer98Doc |
SupportsService(REFGUID sid) | CTestContainer98Doc |
UseIPointerInactive() const | CTestContainer98Doc |
UseQuickActivation() const | CTestContainer98Doc |
UseSlowDrawing() const | CTestContainer98Doc |
UseTwoPassDrawing() const | CTestContainer98Doc |
~CTestContainer98Doc() | CTestContainer98Doc | [virtual]
Generated on Sat Nov 23 2024 17:01:10 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/paredit.cpp Source File

  • general
  • ctrltest

paredit.cpp

Go to the documentation of this file.
00001 // paredit.cpp: C++ derived edit control for numbers/letters etc
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 #include "paredit.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // ParsedEdit
00019
00020 CParsedEdit::CParsedEdit()
00021 {
00022   m_wParseStyle = 0;
00023 }
00024
00025 BEGIN_MESSAGE_MAP(CParsedEdit, CEdit)
00026   //{{AFX_MSG_MAP(CParsedEdit)
00027   ON_WM_CHAR()
00028   ON_WM_VSCROLL()     // for associated spin controls
00029   //}}AFX_MSG_MAP
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // Creating from C++ code
00034
00035 BOOL CParsedEdit::Create(DWORD dwStyle, const RECT& rect,
00036     CWnd* pParentWnd, UINT nID)
00037 {
00038   m_wParseStyle = LOWORD(dwStyle);
00039   // figure out edit control style
00040   DWORD dwEditStyle = MAKELONG(ES_LEFT, HIWORD(dwStyle));
00041   return CWnd::Create(_T("EDIT"), NULL, dwEditStyle, rect, pParentWnd, nID);
00042 }
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // Aliasing on top of an existing Edit control
00046
00047 BOOL CParsedEdit::SubclassEdit(UINT nID, CWnd* pParent, WORD wParseStyle)
00048 {
00049   m_wParseStyle = wParseStyle;
00050   return SubclassDlgItem(nID, pParent);
00051 }
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // Input character filter
00055
00056 void CParsedEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
00057 {
00058   WORD type;
00059
00060   if (nChar < 0x20)
00061     type = PES_ALL;                         // always allow control chars
00062   else if (IsCharAlphaNumeric((TCHAR)nChar) && !IsCharAlpha((TCHAR)nChar))
00063     type = PES_NUMBERS;
00064   else if (IsCharAlpha((TCHAR)nChar))
00065     type = PES_LETTERS;
00066   else
00067     type = PES_OTHERCHARS;
00068
00069   if (m_wParseStyle & type)
00070   {
00071     CEdit::OnChar(nChar, nRepCnt, nFlags);  // permitted
00072   }
00073   else
00074   {
00075     // illegal character - inform parent
00076     OnBadInput();
00077   }
00078 }
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // Spin controls will send scroll messages
00082
00083 void CParsedEdit::OnVScroll(UINT nSBCode, UINT, CScrollBar*)
00084 {
00085   int nDelta = 0;
00086   if (nSBCode == SB_LINEDOWN)
00087     nDelta = -1;
00088   else if (nSBCode == SB_LINEUP)
00089     nDelta = +1;
00090   else
00091     return; // nothing special
00092
00093   // set the focus to this edit item and select it all
00094   SetFocus();
00095
00096   //Get the number in the control.
00097   BOOL bOk;
00098   int nOld = GetParent()->GetDlgItemInt(GetDlgCtrlID(), &bOk);
00099   if (bOk)
00100   {
00101     // The MuScrl32 control also supports range checking
00102     // for this example, we just prevent overflow
00103     int nNew = nOld + nDelta;
00104     if (nNew >= 0 && nNew <= 32767)
00105       GetParent()->SetDlgItemInt(GetDlgCtrlID(), nNew);
00106     else
00107       bOk = FALSE;
00108   }
00109
00110   if (!bOk)
00111     OnBadInput();
00112   SetSel(0, -1);
00113 }
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // default bad input handler, beep (unless parent notification
00117 //    returns -1.  Most parent dialogs will return 0 or 1 for command
00118 //    handlers (i.e. Beep is the default)
00119
00120 void CParsedEdit::OnBadInput()
00121 {
00122   if (GetParent()->SendMessage(WM_COMMAND,
00123     MAKELONG(GetDlgCtrlID(), PEN_ILLEGALCHAR), (LPARAM)m_hWnd) != -1)
00124   {
00125     MessageBeep((UINT)-1);
00126   }
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ChildFrm.cpp Source File

  • vc2008fp
  • VisualStudioDemo

ChildFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "StartView.h"
00013
00014 #include "ChildFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CChildFrame
00024
00025 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWndEx)
00026
00027 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWndEx)
00028   ON_WM_CREATE()
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CChildFrame construction/destruction
00033
00034 CChildFrame::CChildFrame()
00035 {
00036   // TODO: add member initialization code here
00037
00038 }
00039
00040 CChildFrame::~CChildFrame()
00041 {
00042 }
00043
00044 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00045 {
00046   cs.style &= ~WS_SYSMENU;
00047
00048   if (!CMDIChildWndEx::PreCreateWindow(cs))
00049     return FALSE;
00050
00051   return TRUE;
00052 }
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CChildFrame diagnostics
00056
00057 #ifdef _DEBUG
00058 void CChildFrame::AssertValid() const
00059 {
00060   CMDIChildWndEx::AssertValid();
00061 }
00062
00063 void CChildFrame::Dump(CDumpContext& dc) const
00064 {
00065   CMDIChildWndEx::Dump(dc);
00066 }
00067
00068 #endif //_DEBUG
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CChildFrame message handlers
00072
00073 int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00074 {
00075   if (CMDIChildWndEx::OnCreate(lpCreateStruct) == -1)
00076     return -1;
00077
00078   return 0;
00079 }
00080
00081 void CChildFrame::ActivateFrame(int nCmdShow)
00082 {
00083   nCmdShow = SW_MAXIMIZE;
00084   CMDIChildWndEx::ActivateFrame(nCmdShow);
00085 }
00086
00087 BOOL CChildFrame::IsReadOnly()
00088 {
00089   return DYNAMIC_DOWNCAST(CStartView, GetActiveView()) != NULL;
00090 }
00091
00092 LPCTSTR CChildFrame::GetDocumentName(CObject** pObj)
00093 {
00094   if (DYNAMIC_DOWNCAST(CStartView, GetActiveView()) != NULL)
00095   {
00096     return g_strStartViewName;
00097   }
00098   return CMDIChildWndEx::GetDocumentName(pObj);
00099 }
00100
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/hello.cpp Source File

  • general
  • hello

hello.cpp

Go to the documentation of this file.
00001 // hello.cpp : Defines the class behaviors for the application.
00002 //           Hello is a simple program which consists of a main window
00003 //           and an "About" dialog which can be invoked by a menu choice.
00004 //           It is intended to serve as a starting-point for new
00005 //           applications.
00006 //
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and related
00012 // electronic documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include "stdafx.h"
00017 #include "resource.h"
00018
00019 #include "hello.h"
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022
00023 // theApp:
00024 // Just creating this application object runs the whole application.
00025 //
00026 CTheApp NEAR theApp;
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029
00030 // CMainWindow constructor:
00031 // Create the window with the appropriate style, size, menu, etc.
00032 //
00033 CMainWindow::CMainWindow()
00034 {
00035   LoadFrame(IDR_MAINFRAME);
00036 }
00037
00038 // OnPaint:
00039 // This routine draws the string "Hello, Windows!" in the center of the
00040 // client area.  It is called whenever Windows sends a WM_PAINT message.
00041 // Note that creating a CPaintDC automatically does a BeginPaint and
00042 // an EndPaint call is done when it is destroyed at the end of this
00043 // function.  CPaintDC's constructor needs the window (this).
00044 //
00045 void CMainWindow::OnPaint()
00046 {
00047   CRect rect;
00048   GetClientRect(rect);
00049
00050   CPaintDC dc(this);
00051   dc.SetTextAlign(TA_BASELINE | TA_CENTER);
00052   dc.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
00053   dc.SetBkMode(TRANSPARENT);
00054   CString s;
00055   s.LoadString(IDS_HELLO);
00056   dc.TextOut((rect.right / 2), (rect.bottom / 2), s);
00057 }
00058
00059 // OnAbout:
00060 // This member function is called when a WM_COMMAND message with an
00061 // ID_APP_ABOUT code is received by the CMainWindow class object.   The
00062 // message map below is responsible for this routing.
00063 //
00064 // We create a ClDialog object using the "AboutBox" resource (see
00065 // hello.rc), and invoke it.
00066 //
00067 void CMainWindow::OnAbout()
00068 {
00069   CDialog about(IDD_ABOUTBOX);
00070   about.DoModal();
00071 }
00072
00073 // CMainWindow message map:
00074 // Associate messages with member functions.
00075 //
00076 // It is implied that the ON_WM_PAINT macro expects a member function
00077 // "void OnPaint()".
00078 //
00079 // It is implied that members connected with the ON_COMMAND macro
00080 // receive no arguments and are void of return type, e.g., "void OnAbout()".
00081 //
00082 BEGIN_MESSAGE_MAP( CMainWindow, CFrameWnd )
00083   //{{AFX_MSG_MAP( CMainWindow )
00084   ON_WM_PAINT()
00085   ON_COMMAND(ID_APP_ABOUT, OnAbout)
00086   //}}AFX_MSG_MAP
00087 END_MESSAGE_MAP()
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CTheApp
00091
00092 // InitInstance:
00093 // When any CTheApp object is created, this member function is automatically
00094 // called.  Any data may be set up at this point.
00095 //
00096 // Also, the main window of the application should be created and shown here.
00097 // Return TRUE if the initialization is successful.
00098 //
00099 BOOL CTheApp::InitInstance()
00100 {
00101   TRACE0("CTheApp::InitInstance\n");
00102
00103   m_pMainWnd = new CMainWindow;
00104   m_pMainWnd->ShowWindow(m_nCmdShow);
00105   m_pMainWnd->UpdateWindow();
00106
00107   return TRUE;
00108 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/resource.h Source File

  • controls
  • push

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by PUSH.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_PUSH                        1
00015 #define IDB_PUSH                        1
00016 #define IDS_PUSH_PPG                    2
00017 #define IDI_ABOUTDLL                    10
00018 #define IDD_ABOUTBOX_PUSH               100
00019 #define IDS_PUSH_PPG_CAPTION            101
00020 #define IDD_PROPPAGE_PUSH               101
00021 #define IDC_CAPTIONEDIT                 201
00022 #define IDC_BORDERCHECK                 202
00023 #define IDB_DOWNBITMAP                  202
00024 #define IDC_ENABLEDCHECK                203
00025 #define IDB_UPBITMAP                    204
00026
00027 // Next default values for new objects
00028 //
00029 #ifdef APSTUDIO_INVOKED
00030 #ifndef APSTUDIO_READONLY_SYMBOLS
00031
00032 #define _APS_NEXT_RESOURCE_VALUE        205
00033 #define _APS_NEXT_COMMAND_VALUE         32768
00034 #define _APS_NEXT_CONTROL_VALUE         204
00035 #define _APS_NEXT_SYMED_VALUE           101
00036 #endif
00037 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemo.h Source File

  • general
  • CTaskDialog

CTaskDialogDemo.h

Go to the documentation of this file.
00001 // TaskDialogTest.h : main header file for the PROJECT_NAME application
00002 //
00003
00004 #pragma once
00005
00006 #ifndef __AFXWIN_H__
00007   #error "include 'stdafx.h' before including this file for PCH"
00008 #endif
00009
00010 #include "resource.h"   // main symbols
00011
00012
00013 // CTaskDialogTestApp:
00014 // See TaskDialogTest.cpp for the implementation of this class
00015 //
00016
00017 class CTaskDialogTestApp : public CWinApp
00018 {
00019 public:
00020   CTaskDialogTestApp();
00021
00022 // Overrides
00023   public:
00024   virtual BOOL InitInstance();
00025
00026 // Implementation
00027
00028   DECLARE_MESSAGE_MAP()
00029 };
00030
00031 extern CTaskDialogTestApp theApp;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawTool Member List

This is the complete list of members for CDrawTool, including all inherited members.
c_down | CDrawTool | [static]
c_drawShape | CDrawTool | [static]
c_last | CDrawTool | [static]
c_nDownFlags | CDrawTool | [static]
c_tools | CDrawTool | [static]
CDrawTool(DrawShape nDrawShape) | CDrawTool |
CDrawTool(DrawShape nDrawShape) | CDrawTool |
FindTool(DrawShape drawShape) | CDrawTool | [static]
FindTool(DrawShape drawShape) | CDrawTool | [static]
m_drawShape | CDrawTool |
OnCancel() | CDrawTool | [virtual]
OnCancel() | CDrawTool | [virtual]
OnEditProperties(CDrawView *pView) | CDrawTool | [virtual]
OnEditProperties(CDrawView *pView) | CDrawTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CDrawTool | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

mfccalc::ICalcDlg Member List

This is the complete list of members for mfccalc::ICalcDlg, including all inherited members.
Button(BSTR szButton) | mfccalc::ICalcDlg
Clear() | mfccalc::ICalcDlg
Close() | mfccalc::ICalcDlg
Display() | mfccalc::ICalcDlg
Evaluate() | mfccalc::ICalcDlg
id | mfccalc::ICalcDlg
id | mfccalc::ICalcDlg
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Script.H Source File

  • ole
  • TstCon

Script.H

Go to the documentation of this file.
00001 // File: Script.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_SCRIPT_H__5783EE7E_0DC5_11D1_8E2F_00C04FB68D60__INCLUDED_)
00011 #define AFX_SCRIPT_H__5783EE7E_0DC5_11D1_8E2F_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // Script.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CScript command target
00021
00022 class CScriptManager;
00023
00024 class CScript :
00025    public CCmdTarget
00026 {
00027   DECLARE_DYNAMIC( CScript )
00028
00029 // Attributes
00030 public:
00031    CScript( CScriptManager* pManager );
00032    ~CScript();
00033
00034 // Operations
00035 public:
00036    HRESULT AddNamedItem( LPCTSTR pszItemName );
00037    BOOL FindMacro( LPCTSTR pszMacroName );
00038    POSITION GetFirstMacroPosition();
00039    CString GetName();
00040    CString GetNextMacroName( POSITION& posMacro );
00041    HRESULT LoadScript( LPCTSTR pszFileName, LPCTSTR pszScriptName );
00042    HRESULT RunMacro( LPCTSTR pszMacroName );
00043    void Unload();
00044
00045 // Overrides
00046   // ClassWizard generated virtual function overrides
00047   //{{AFX_VIRTUAL(CScript)
00048   //}}AFX_VIRTUAL
00049
00050 // Implementation
00051 protected:
00052    CScriptManager* m_pManager;
00053    IDispatchPtr m_pDispatch;
00054    IActiveScriptPtr m_pActiveScript;
00055    IActiveScriptParsePtr m_pActiveScriptParse;
00056    CString m_strScriptText;
00057    CString m_strScriptName;
00058    CMap< CString, LPCTSTR, DISPID, DISPID > m_mapMacros;
00059
00060   // Generated message map functions
00061   //{{AFX_MSG(CScript)
00062     // NOTE - the ClassWizard will add and remove member functions here.
00063   //}}AFX_MSG
00064
00065   DECLARE_MESSAGE_MAP()
00066
00067    BEGIN_INTERFACE_PART( ActiveScriptSite, IActiveScriptSite )
00068     STDMETHOD( GetDocVersionString )( BSTR* pbstrVersion );
00069     STDMETHOD( GetItemInfo )( LPCOLESTR pszName, DWORD dwReturnMask,
00070      IUnknown** ppItem, ITypeInfo** ppTypeInfo );
00071     STDMETHOD( GetLCID )( LCID* plcid );
00072     STDMETHOD( OnEnterScript )();
00073     STDMETHOD( OnLeaveScript )();
00074     STDMETHOD( OnScriptError )( IActiveScriptError* pError );
00075     STDMETHOD( OnScriptTerminate )( const VARIANT* pvarResult,
00076      const EXCEPINFO* pExcepInfo );
00077     STDMETHOD( OnStateChange )( SCRIPTSTATE eState );
00078    END_INTERFACE_PART( ActiveScriptSite )
00079
00080    BEGIN_INTERFACE_PART( ActiveScriptSiteWindow, IActiveScriptSiteWindow )
00081     STDMETHOD( EnableModeless )( BOOL tEnable );
00082     STDMETHOD( GetWindow )( HWND* phWindow );
00083    END_INTERFACE_PART( ActiveScriptSiteWindow )
00084
00085    DECLARE_INTERFACE_MAP()
00086 };
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089
00090 //{{AFX_INSERT_LOCATION}}
00091 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00092
00093 #endif // !defined(AFX_SCRIPT_H__5783EE7E_0DC5_11D1_8E2F_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Resource.h Source File

  • general
  • MMXSwarm

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by MMXSwarm.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define IDR_MMXSwaTYPE                  129
00008 #define IDD_CIMAGE_16BIT                140
00009 #define IDD_CIMAGE_24BIT                141
00010 #define IDD_CIMAGE_32BIT                142
00011 #define IDD_16BIT_MMXINTRINSICS         150
00012 #define IDD_24BIT_MMXINTRINSICS         151
00013 #define IDD_32BIT_MMXINTRINSICS         152
00014 #define IDD_16BIT_SSE2INTRINSICS        153
00015 #define IDD_24BIT_SSE2INTRINSICS        154
00016 #define IDD_32BIT_SSE2INTRINSICS        155
00017 #define IDD_16BIT_GENERICCBLUR          156
00018 #define IDD_24BIT_GENERICCBLUR          157
00019 #define IDD_32BIT_GENERICCBLUR          158
00020 #define IDS_ERROR_GETEXPORTERFILTER     170
00021 #define IDS_ERROR_PROPERTYFRAME         171
00022 #define IDS_ERROR_GETPAGES              172
00023 #define IDS_WARNING_BITDEPTH            173
00024 #define IDS_WARNING_DEBUG               174
00025 #define IDS_ERROR_SAVE                  175
00026 #define IDS_ALL_IMAGES                  176
00027 #define ID_INDICATOR_FPS                59142
00028 #define ID_INDICATOR_RESOLUTION         59143
00029 #define ID_INDICATOR_PAUSE_SWARM        59144
00030 #define ID_INDICATOR_PAUSE_BLUR         59145
00031 #define ID_INDICATOR_PAUSE_BLIT         59146
00032 #define ID_VIEW_PAUSE_SWARM             59394
00033 #define ID_VIEW_PAUSE_BLUR              59395
00034 #define ID_VIEW_PAUSE_BLIT              59396
00035
00036 // Next default values for new objects
00037 //
00038 #ifdef APSTUDIO_INVOKED
00039 #ifndef APSTUDIO_READONLY_SYMBOLS
00040 #define _APS_NEXT_RESOURCE_VALUE        177
00041 #define _APS_NEXT_COMMAND_VALUE         59397
00042 #define _APS_NEXT_CONTROL_VALUE         1000
00043 #define _APS_NEXT_SYMED_VALUE           101
00044 #endif
00045 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht.cpp Source File

  • general
  • propdlg

propsht.cpp

Go to the documentation of this file.
00001 // propsht.cpp : implementation of the CModalShapePropSheet class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014 #include "resource.h"
00015 #include "shapeobj.h"
00016 #include "colorpge.h"
00017 #include "stylepge.h"
00018 #include "preview.h"
00019 #include "propsht.h"
00020
00021 IMPLEMENT_DYNAMIC(CModalShapePropSheet, CPropertySheet)
00022
00023 BEGIN_MESSAGE_MAP(CModalShapePropSheet, CPropertySheet)
00024   //{{AFX_MSG_MAP(CModalShapePropSheet)
00025   ON_COMMAND(ID_APPLY_NOW, OnApplyNow)
00026   //}}AFX_MSG_MAP
00027 END_MESSAGE_MAP()
00028
00029 CModalShapePropSheet::CModalShapePropSheet(CWnd* pWndParent)
00030   : CPropertySheet(AFX_IDS_APP_TITLE, pWndParent)
00031 {
00032   AddPage(&m_stylePage);
00033   AddPage(&m_colorPage);
00034 }
00035
00036 BOOL CModalShapePropSheet::OnInitDialog()
00037 {
00038   BOOL bResult = CPropertySheet::OnInitDialog();
00039
00040   // add the preview window to the property sheet.
00041   CRect rectWnd;
00042   GetWindowRect(rectWnd);
00043   SetWindowPos(NULL, 0, 0,
00044     rectWnd.Width() + 100,
00045     rectWnd.Height(),
00046     SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
00047   CRect rectPreview(rectWnd.Width() + 25, 25,
00048     rectWnd.Width()+75, 75);
00049   m_wndPreview.Create(NULL, NULL, WS_CHILD|WS_VISIBLE,
00050     rectPreview, this, 0x1000);
00051
00052   CenterWindow();
00053   return bResult;
00054 }
00055
00056 void CModalShapePropSheet::SetSheetPropsFromShape(CShape* pShape)
00057 {
00058   m_stylePage.m_nShapeStyle = pShape->m_shapestyle;
00059   m_stylePage.SetModified(FALSE);
00060
00061   m_colorPage.m_nColor = pShape->m_shapecolor;
00062   m_colorPage.SetModified(FALSE);
00063
00064   // Reflect the new shape properties in the controls of the
00065   // currently active property page.
00066   GetActivePage()->UpdateData(FALSE);
00067
00068   UpdateShapePreview();
00069 }
00070
00071 void CModalShapePropSheet::SetShapePropsFromSheet(CShape* pShape)
00072 {
00073   pShape->m_shapecolor = m_colorPage.m_nColor;
00074   pShape->m_shapestyle = (SHAPE_STYLE)m_stylePage.m_nShapeStyle;
00075
00076   m_colorPage.SetModified(FALSE);
00077   m_stylePage.SetModified(FALSE);
00078 }
00079
00080 void CModalShapePropSheet::UpdateShapePreview()
00081 {
00082   m_wndPreview.Invalidate();
00083   m_wndPreview.UpdateWindow();
00084 }
00085
00086 void CModalShapePropSheet::OnApplyNow()
00087 {
00088   Default();
00089
00090   CFrameWnd* pFrameWnd = STATIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
00091   CView* pView = pFrameWnd->GetActiveFrame()->GetActiveView();
00092   pView->SendMessage(WM_USER_CHANGE_OBJECT_PROPERTIES, 0, 0);
00093   m_stylePage.SetModified(FALSE);
00094   m_colorPage.SetModified(FALSE);
00095   SendMessage(PSM_CANCELTOCLOSE);
00096 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMCaptionBar Member List

This is the complete list of members for CMSMCaptionBar, including all inherited members.
CalcFixedLayout(BOOL, BOOL) | CMSMCaptionBar | [virtual]
CMSMCaptionBar() | CMSMCaptionBar |
Create(CWnd *pParentWnd, UINT nID=uiCaprionBarID) | CMSMCaptionBar | [virtual]
CreateEx(CWnd *pParentWnd, UINT nID=uiCaprionBarID) | CMSMCaptionBar | [virtual]
DoPaint(CDC *pDCPaint) | CMSMCaptionBar | [protected, virtual]
GetCaptionFont() const | CMSMCaptionBar | [inline]
GetCaptionHeight() const | CMSMCaptionBar | [inline]
GetCaptionTextColor() const | CMSMCaptionBar | [virtual]
HitTest(const CPoint &pt) const | CMSMCaptionBar | [protected, virtual]
IsParentActive() const | CMSMCaptionBar | [inline]
IsParentMaximize() const | CMSMCaptionBar | [inline]
m_bParentActive | CMSMCaptionBar |
m_bParentMaximize | CMSMCaptionBar |
m_BtnClose | CMSMCaptionBar |
m_BtnMaximize | CMSMCaptionBar |
m_BtnMinimize | CMSMCaptionBar |
m_CaptionFont | CMSMCaptionBar |
m_CaptionHeight | CMSMCaptionBar |
m_hIcon | CMSMCaptionBar |
m_strCaption | CMSMCaptionBar |
m_SystemHeight | CMSMCaptionBar |
m_szIcon | CMSMCaptionBar |
OnCommand(WPARAM wParam, LPARAM lParam) | CMSMCaptionBar | [protected, virtual]
OnContextMenu(CWnd *pWnd, CPoint point) | CMSMCaptionBar | [protected]
OnSetText(WPARAM, LPARAM lParam) | CMSMCaptionBar | [protected]
OnSize(UINT nType, int cx, int cy) | CMSMCaptionBar | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CMSMCaptionBar | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CMSMCaptionBar | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CMSMCaptionBar | [protected, virtual]
SetCaptionFont(const LOGFONT &lf) | CMSMCaptionBar |
SetCaptionHeight(int nHeight) | CMSMCaptionBar |
SetIcon(HICON hIcon) | CMSMCaptionBar | [virtual]
SetParentActive(BOOL bParentActive=true) | CMSMCaptionBar |
SetParentMaximize(BOOL bParentMaximize=true) | CMSMCaptionBar |
ShowSysMenu(const CPoint &point) | CMSMCaptionBar | [protected, virtual]
~CMSMCaptionBar() | CMSMCaptionBar | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/ipframe.h Source File

  • ole
  • superpad

ipframe.h

Go to the documentation of this file.
00001 // ipframe.h : interface of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 class CInPlaceFrame : public COleIPFrameWnd
00014 {
00015 private:
00016   using COleIPFrameWnd::OnCreateControlBars;
00017
00018   DECLARE_DYNCREATE(CInPlaceFrame)
00019 public:
00020   CInPlaceFrame();
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Implementation
00029 public:
00030   virtual ~CInPlaceFrame();
00031 #ifdef _DEBUG
00032   virtual void AssertValid() const;
00033   virtual void Dump(CDumpContext& dc) const;
00034 #endif
00035   BOOL OnCreateControlBars(CWnd* pWndFrame, CWnd* pWndDoc);
00036
00037 protected:  // control bar embedded members
00038   CToolBar    m_wndToolBar;
00039   COleResizeBar   m_wndResizeBar;
00040
00041 // Generated message map functions
00042 protected:
00043   //{{AFX_MSG(CInPlaceFrame)
00044   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDlgToolTipsApp Member List

This is the complete list of members for CDlgToolTipsApp, including all inherited members.
CDlgToolTipsApp() | CDlgToolTipsApp |
InitInstance() | CDlgToolTipsApp | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/MainFrm.cpp Source File

  • vc2008fp
  • RibbonMDI

MainFrm.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014
00015 #include "MainFrm.h"
00016
00017 #include <memory>
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainFrame
00027
00028 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00029
00030
00031 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00032   ON_WM_CREATE()
00033   ON_COMMAND(ID_WINDOW_MANAGER, OnWindowManager)
00034   ON_UPDATE_COMMAND_UI(ID_WINDOW_MANAGER, OnUpdateWindowManager)
00035   ON_COMMAND(ID_MDI_MOVE_TO_NEXT_GROUP, OnMdiMoveToNextGroup)
00036   ON_COMMAND(ID_MDI_MOVE_TO_PREV_GROUP, OnMdiMoveToPrevGroup)
00037   ON_COMMAND(ID_MDI_NEW_HORZ_TAB_GROUP, OnMdiNewHorzTabGroup)
00038   ON_COMMAND(ID_MDI_NEW_VERT_GROUP, OnMdiNewVertGroup)
00039   ON_COMMAND(ID_MDI_CANCEL, OnMdiCancel)
00040   ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace)
00041   ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, OnUpdateViewWorkspace)
00042   ON_COMMAND(ID_VIEW_WORKSPACE2, OnViewWorkspace2)
00043   ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE2, OnUpdateViewWorkspace2)
00044   ON_COMMAND(ID_VIEW_OUTPUT, OnViewOutput)
00045   ON_UPDATE_COMMAND_UI(ID_VIEW_OUTPUT, OnUpdateViewOutput)
00046 END_MESSAGE_MAP()
00047
00048 static UINT indicators[] =
00049 {
00050   ID_SEPARATOR,           // status line indicator
00051   ID_INDICATOR_CAPS,
00052   ID_INDICATOR_NUM,
00053   ID_INDICATOR_SCRL,
00054 };
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CMainFrame construction/destruction
00058
00059 CMainFrame::CMainFrame()
00060 {
00061   // TODO: add member initialization code here
00062
00063 }
00064
00065 CMainFrame::~CMainFrame()
00066 {
00067 }
00068
00069 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00070 {
00071   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00072     return -1;
00073
00074   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00075
00076   CMDITabInfo mdiTabParams;
00077   mdiTabParams.m_bTabIcons = TRUE;
00078   mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_ONENOTE;
00079   mdiTabParams.m_bAutoColor = TRUE;
00080
00081   EnableMDITabbedGroups (TRUE, mdiTabParams);
00082
00083   CDockingManager::SetDockingMode (DT_SMART);
00084
00085   m_wndRibbonBar.Create (this);
00086
00087   InitRibbon ();
00088
00089   if (!m_wndStatusBar.Create(this) ||
00090     !m_wndStatusBar.SetIndicators(indicators,
00091       sizeof(indicators)/sizeof(UINT)))
00092   {
00093     TRACE0("Failed to create status bar\n");
00094     return -1;      // fail to create
00095   }
00096
00097   // Load control bar icons:
00098   CMFCToolBarImages imagesWorkspace;
00099   imagesWorkspace.SetImageSize (CSize (16, 16));
00100   imagesWorkspace.SetTransparentColor (RGB (255, 0, 255));
00101   imagesWorkspace.Load (IDB_WORKSPACE);
00102
00103   if (!m_wndWorkSpace.Create (_T("View  1"), this, CRect (0, 0, 200, 200),
00104     TRUE, ID_VIEW_WORKSPACE,
00105     WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
00106   {
00107     TRACE0("Failed to create Workspace bar\n");
00108     return FALSE;      // fail to create
00109   }
00110
00111   m_wndWorkSpace.SetIcon (imagesWorkspace.ExtractIcon (0), FALSE);
00112
00113   if (!m_wndWorkSpace2.Create (_T("View 2"), this, CRect (0, 0, 200, 200),
00114     TRUE, ID_VIEW_WORKSPACE2,
00115     WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
00116   {
00117     TRACE0("Failed to create Workspace bar 2\n");
00118     return FALSE;      // fail to create
00119   }
00120
00121   m_wndWorkSpace2.SetIcon (imagesWorkspace.ExtractIcon (1), FALSE);
00122
00123   if (!m_wndOutput.Create (_T("Output"), this, CRect (0, 0, 150, 150),
00124     TRUE /* Has gripper */, ID_VIEW_OUTPUT,
00125     WS_CHILD | WS_VISIBLE | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
00126   {
00127     TRACE0("Failed to create output bar\n");
00128     return -1;      // fail to create
00129   }
00130
00131   m_wndOutput.SetIcon (imagesWorkspace.ExtractIcon (2), FALSE);
00132
00133   m_wndWorkSpace.EnableDocking(CBRS_ALIGN_ANY);
00134   m_wndWorkSpace2.EnableDocking(CBRS_ALIGN_ANY);
00135   m_wndOutput.EnableDocking(CBRS_ALIGN_ANY);
00136   EnableDocking(CBRS_ALIGN_ANY);
00137   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00138   DockPane (&m_wndWorkSpace);
00139   m_wndWorkSpace2.AttachToTabWnd (&m_wndWorkSpace, DM_STANDARD, FALSE, NULL);
00140   DockPane(&m_wndOutput);
00141
00142   // Enable windows manager:
00143   EnableWindowsDialog (ID_WINDOW_MANAGER, IDS_WINDOWS_MANAGER, TRUE);
00144
00145   return 0;
00146 }
00147
00148 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00149 {
00150   if( !CMDIFrameWnd::PreCreateWindow(cs) )
00151     return FALSE;
00152   // TODO: Modify the Window class or styles here by modifying
00153   //  the CREATESTRUCT cs
00154
00155   return TRUE;
00156 }
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CMainFrame diagnostics
00160
00161 #ifdef _DEBUG
00162 void CMainFrame::AssertValid() const
00163 {
00164   CMDIFrameWnd::AssertValid();
00165 }
00166
00167 void CMainFrame::Dump(CDumpContext& dc) const
00168 {
00169   CMDIFrameWnd::Dump(dc);
00170 }
00171
00172 #endif //_DEBUG
00173
00174 /////////////////////////////////////////////////////////////////////////////
00175 // CMainFrame message handlers
00176
00177
00178 void CMainFrame::OnWindowManager()
00179 {
00180   ShowWindowsDialog ();
00181 }
00182
00183 void CMainFrame::OnUpdateWindowManager(CCmdUI* pCmdUI)
00184 {
00185   pCmdUI->Enable (!IsPrintPreviewMode ());
00186 }
00187
00188 BOOL CMainFrame::OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop)
00189 {
00190   CMenu menu;
00191   VERIFY(menu.LoadMenu (bDrop ? IDR_POPUP_DROP_MDITABS : IDR_POPUP_MDITABS));
00192
00193   CMenu* pPopup = menu.GetSubMenu(0);
00194   ASSERT(pPopup != NULL);
00195
00196   if (pPopup)
00197   {
00198     if ((dwAllowedItems & AFX_MDI_CREATE_HORZ_GROUP) == 0)
00199     {
00200       pPopup->DeleteMenu (ID_MDI_NEW_HORZ_TAB_GROUP, MF_BYCOMMAND);
00201     }
00202
00203     if ((dwAllowedItems & AFX_MDI_CREATE_VERT_GROUP) == 0)
00204     {
00205       pPopup->DeleteMenu (ID_MDI_NEW_VERT_GROUP, MF_BYCOMMAND);
00206     }
00207
00208     if ((dwAllowedItems & AFX_MDI_CAN_MOVE_NEXT) == 0)
00209     {
00210       pPopup->DeleteMenu (ID_MDI_MOVE_TO_NEXT_GROUP, MF_BYCOMMAND);
00211     }
00212
00213     if ((dwAllowedItems & AFX_MDI_CAN_MOVE_PREV) == 0)
00214     {
00215       pPopup->DeleteMenu (ID_MDI_MOVE_TO_PREV_GROUP, MF_BYCOMMAND);
00216     }
00217
00218     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00219     if (pPopupMenu)
00220     {
00221       pPopupMenu->SetAutoDestroy (FALSE);
00222       pPopupMenu->Create (this, point.x, point.y, pPopup->GetSafeHmenu ());
00223     }
00224   }
00225   return TRUE;
00226 }
00227
00228 void CMainFrame::OnMdiMoveToNextGroup()
00229 {
00230   MDITabMoveToNextGroup ();
00231 }
00232
00233 void CMainFrame::OnMdiMoveToPrevGroup()
00234 {
00235   MDITabMoveToNextGroup (FALSE);
00236 }
00237
00238 void CMainFrame::OnMdiNewHorzTabGroup()
00239 {
00240   MDITabNewGroup (FALSE);
00241 }
00242
00243 void CMainFrame::OnMdiNewVertGroup()
00244 {
00245   MDITabNewGroup ();
00246 }
00247
00248 void CMainFrame::OnMdiCancel()
00249 {
00250   // TODO: Add your command handler code here
00251
00252 }
00253
00254 CMDIChildWndEx* CMainFrame::CreateDocumentWindow (LPCTSTR lpcszDocName, CObject* /*pObj*/)
00255 {
00256   if (lpcszDocName != NULL && lpcszDocName [0] != '\0')
00257   {
00258     CDocument* pDoc = AfxGetApp()->OpenDocumentFile (lpcszDocName);
00259
00260     if (pDoc != NULL)
00261     {
00262       POSITION pos = pDoc->GetFirstViewPosition();
00263
00264       if (pos != NULL)
00265       {
00266         CView* pView = pDoc->GetNextView (pos);
00267         if (pView == NULL)
00268         {
00269           return NULL;
00270         }
00271
00272         return DYNAMIC_DOWNCAST (CMDIChildWndEx, pView->GetParent ());
00273       }
00274     }
00275   }
00276
00277   return NULL;
00278 }
00279
00280 void CMainFrame::OnViewWorkspace()
00281 {
00282   ShowPane (&m_wndWorkSpace,
00283           !(m_wndWorkSpace.IsVisible ()),
00284           FALSE, TRUE);
00285   RecalcLayout ();
00286 }
00287
00288 void CMainFrame::OnUpdateViewWorkspace(CCmdUI* pCmdUI)
00289 {
00290   pCmdUI->SetCheck (m_wndWorkSpace.IsVisible ());
00291   pCmdUI->Enable (!IsPrintPreviewMode ());
00292 }
00293
00294 void CMainFrame::OnViewWorkspace2()
00295 {
00296   ShowPane (&m_wndWorkSpace2,
00297           !(m_wndWorkSpace2.IsVisible ()),
00298           FALSE, TRUE);
00299   RecalcLayout ();
00300 }
00301
00302 void CMainFrame::OnUpdateViewWorkspace2(CCmdUI* pCmdUI)
00303 {
00304   pCmdUI->SetCheck (m_wndWorkSpace2.IsVisible ());
00305   pCmdUI->Enable (!IsPrintPreviewMode ());
00306 }
00307
00308 void CMainFrame::OnViewOutput()
00309 {
00310   ShowPane (&m_wndOutput,
00311           !(m_wndOutput.IsVisible ()),
00312           FALSE, TRUE);
00313   RecalcLayout ();
00314 }
00315
00316 void CMainFrame::OnUpdateViewOutput(CCmdUI* pCmdUI)
00317 {
00318   pCmdUI->SetCheck (m_wndOutput.IsVisible ());
00319   pCmdUI->Enable (!IsPrintPreviewMode ());
00320 }
00321
00322 void CMainFrame::InitRibbon ()
00323 {
00324   //-------------------
00325   // Load panel images:
00326   //-------------------
00327   m_PanelImages.SetImageSize (CSize (16, 16));
00328   m_PanelImages.Load (IDB_BUTTONS);
00329
00330   //------------------
00331   // Init main button:
00332   //------------------
00333   m_MainButton.SetImage (IDB_MAIN);
00334   m_MainButton.SetText (_T("\nf"));
00335   m_MainButton.SetToolTipText (_T("File"));
00336
00337   m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));
00338
00339   m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));
00340
00341   CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory (
00342     _T("File"), IDB_FILESMALL, IDB_FILELARGE);
00343
00344   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_NEW, _T("&New"), 0, 0));
00345   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_OPEN, _T("&Open..."), 1, 1));
00346
00347   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE, _T("&Save"), 2, 2));
00348
00349   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));
00350
00351   std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton (ID_FILE_PRINT, _T("Print"), 6, 6));
00352   apBtnPrint->SetKeys (_T("p"), _T("w"));
00353
00354   apBtnPrint->AddSubItem (new CMFCRibbonLabel (_T("Preview and print the document")));
00355   apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 7, 7, TRUE));
00356   apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 8, 8, TRUE));
00357
00358   pMainPanel->Add (apBtnPrint.release());
00359
00360   pMainPanel->Add (new CMFCRibbonSeparator (TRUE));
00361   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_CLOSE, _T("&Close"), 9, 9));
00362
00363   pMainPanel->AddRecentFilesList (_T("Recent Documents"));
00364
00365   pMainPanel->AddToBottom (new CMFCRibbonMainPanelButton (ID_APP_EXIT, _T("E&xit"), 15));
00366
00367   //--------------------------------------------
00368   // Add "Home" category with "Clipboard" panel:
00369   //--------------------------------------------
00370   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory (
00371     _T("&Home"),
00372     IDB_WRITE,
00373     IDB_WRITELARGE);
00374
00375   //--------------------------
00376   // Create "Clipboard" panel:
00377   //--------------------------
00378   CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel (
00379     _T("Clipboard\nd"),
00380     m_PanelImages.ExtractIcon (27));
00381
00382   CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton (ID_EDIT_PASTE, _T("Paste\nv"), 0, 0);
00383   pBtnPaste->SetMenu (IDR_PASTE_MENU, TRUE);
00384   pPanelClipboard->Add (pBtnPaste);
00385
00386   pPanelClipboard->Add (new CMFCRibbonButton (ID_EDIT_CUT, _T("Cut\nx"), 1));
00387   pPanelClipboard->Add (new CMFCRibbonButton (ID_EDIT_COPY, _T("Copy\nc"), 2));
00388   pPanelClipboard->Add (new CMFCRibbonButton (0, _T("Paint\np"), 3));
00389
00390   //-----------------------
00391   // Create "Window" panel:
00392   //-----------------------
00393   CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel (
00394     _T("Window\nw"),
00395     m_PanelImages.ExtractIcon (7));
00396
00397   pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_WORKSPACE, _T("View 1\n1")));
00398   pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_WORKSPACE2, _T("View 2\n2")));
00399   pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_OUTPUT, _T("Output\no")));
00400   pPanelWindow->Add (new CMFCRibbonSeparator);
00401
00402   CMFCRibbonButton* pBtnWindows = new CMFCRibbonButton (0, _T("Windows\ni"), -1, 1);
00403   pBtnWindows->SetMenu (IDR_WINDOWS_MENU, TRUE);
00404   pPanelWindow->Add (pBtnWindows);
00405
00406   //-----------------------------------
00407   // Add quick access toolbar commands:
00408   //-----------------------------------
00409   CList<UINT, UINT> lstQATCmds;
00410
00411   lstQATCmds.AddTail (ID_FILE_SAVE);
00412   lstQATCmds.AddTail (ID_FILE_PRINT_DIRECT);
00413
00414   m_wndRibbonBar.SetQuickAccessCommands (lstQATCmds);
00415
00416   m_wndRibbonBar.AddToTabs (new CMFCRibbonButton (ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon (0)));
00417 }
00418
00419 BOOL CMainFrame::IsPrintPreviewMode ()
00420 {
00421   return GetDockingManager()->IsPrintPreviewValid();
00422 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mainfrm.cpp Source File

  • advanced
  • mtmdi

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "bounce.h"
00014 #include "hello.h"
00015 #include "mdi.h"
00016
00017 #include "mainfrm.h"
00018 #include "mtbounce.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainFrame
00027
00028 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00029
00030 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00031   //{{AFX_MSG_MAP(CMainFrame)
00032   ON_COMMAND(IDM_BOUNCE, OnBounce)
00033   ON_COMMAND(IDM_HELLO, OnHello)
00034   //}}AFX_MSG_MAP
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CMainFrame construction/destruction
00039
00040 CMainFrame::CMainFrame()
00041 {
00042 }
00043
00044 CMainFrame::~CMainFrame()
00045 {
00046 }
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CMainFrame commands
00050
00051 void CMainFrame::OnBounce()
00052 {
00053 #pragma warning(push)
00054 #pragma warning(disable:6014)
00055   CBounceMDIChildWnd *pBounceMDIChildWnd = new CBounceMDIChildWnd;
00056 #pragma warning(pop)
00057   if (!pBounceMDIChildWnd->Create( _T("Bounce"),
00058     WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW, rectDefault, this))
00059     return;
00060 }
00061
00062 void CMainFrame::OnHello()
00063 {
00064 #pragma warning(push)
00065 #pragma warning(disable:6014)
00066   CHelloWnd *pHelloWnd = new CHelloWnd;
00067 #pragma warning(pop)
00068
00069   if (!pHelloWnd->Create(_T("Hello"),
00070     WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW,
00071     rectDefault, this))
00072     return;
00073
00074   // the default PostNcDestroy handler will delete this object when destroyed
00075 }
00076
00077 static BOOL CALLBACK SendPrepareToClose(HWND hWnd, LPARAM)
00078 {
00079   CWnd* pWnd = CWnd::FromHandlePermanent(hWnd);
00080   if (pWnd != NULL)
00081   {
00082     pWnd->SendMessage(WM_USER_PREPARE_TO_CLOSE);
00083     if (pWnd->GetWindow(GW_CHILD) != NULL)
00084       ::EnumChildWindows(pWnd->m_hWnd, SendPrepareToClose, 0);
00085   }
00086   return TRUE;
00087 }
00088
00089 BOOL CMainFrame::DestroyWindow()
00090 {
00091   ::EnumChildWindows(m_hWnd, SendPrepareToClose, 0);
00092
00093   return CMDIFrameWnd::DestroyWindow();
00094 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/frame.cpp Source File

  • ole
  • oclient

frame.cpp

Go to the documentation of this file.
00001 // frame.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 #include "stdafx.h"
00015 #include "oclient.h"
00016
00017 #include "frame.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00030   //{{AFX_MSG_MAP(CMainFrame)
00031   ON_WM_CREATE()
00032   ON_COMMAND(ID_WINDOW_TILE_HORZ, OnWindowTileHorz)
00033   ON_WM_PALETTECHANGED()
00034   ON_WM_QUERYNEWPALETTE()
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // arrays of IDs used to initialize control bars
00040
00041 // toolbar buttons - IDs are command buttons
00042 static UINT BASED_CODE buttons[] =
00043 {
00044   // same order as in the bitmap 'toolbar.bmp'
00045   ID_FILE_NEW,
00046   ID_FILE_OPEN,
00047   ID_FILE_SAVE,
00048     ID_SEPARATOR,
00049   ID_EDIT_CUT,
00050   ID_EDIT_COPY,
00051   ID_EDIT_PASTE,
00052     ID_SEPARATOR,
00053   ID_FILE_PRINT,
00054   ID_APP_ABOUT,
00055   ID_CONTEXT_HELP,
00056 };
00057
00058 static UINT BASED_CODE indicators[] =
00059 {
00060   ID_SEPARATOR,           // status line indicator
00061   ID_INDICATOR_CAPS,
00062   ID_INDICATOR_NUM,
00063   ID_INDICATOR_SCRL,
00064 };
00065
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CMainFrame construction/destruction
00069
00070 CMainFrame::CMainFrame()
00071 {
00072 }
00073
00074 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00075 {
00076   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00077     return -1;
00078
00079   if (!m_wndToolBar.Create(this) ||
00080     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00081     !m_wndToolBar.SetButtons(buttons,
00082       sizeof(buttons)/sizeof(UINT)))
00083   {
00084     TRACE0("Failed to create toolbar\n");
00085     return -1;      // fail to create
00086   }
00087
00088   if (!m_wndStatusBar.Create(this) ||
00089     !m_wndStatusBar.SetIndicators(indicators,
00090       sizeof(indicators)/sizeof(UINT)))
00091   {
00092     TRACE0("Failed to create status bar\n");
00093     return -1;      // fail to create
00094   }
00095   EnableDocking(CBRS_ALIGN_ANY);
00096   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00097   DockControlBar(&m_wndToolBar);
00098   CDC* pDC = GetDC();
00099   m_palette.CreateHalftonePalette(pDC);
00100   ReleaseDC(pDC);
00101   return 0;
00102 }
00103
00104 CMainFrame::~CMainFrame()
00105 {
00106 }
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CMainFrame diagnostics
00110
00111 #ifdef _DEBUG
00112 void CMainFrame::AssertValid() const
00113 {
00114   CMDIFrameWnd::AssertValid();
00115 }
00116
00117 void CMainFrame::Dump(CDumpContext& dc) const
00118 {
00119   CMDIFrameWnd::Dump(dc);
00120 }
00121
00122 #endif //_DEBUG
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // CMainFrame commands
00126
00127 void CMainFrame::OnWindowTileHorz()
00128 {
00129   if (GetKeyState(VK_SHIFT) < 0)
00130     OnMDIWindowCmd(ID_WINDOW_TILE_VERT);
00131   else
00132     OnMDIWindowCmd(ID_WINDOW_TILE_HORZ);
00133 }
00134
00135 /////////////////////////////////////////////////////////////////////////////
00136 // CMainFrame message handlers
00137
00138 void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd)
00139 {
00140   CMDIFrameWnd::OnPaletteChanged(pFocusWnd);
00141   if (pFocusWnd != this)
00142     SelectPalette(TRUE);
00143 }
00144
00145 BOOL CMainFrame::OnQueryNewPalette()
00146 {
00147   if (CMDIFrameWnd::OnQueryNewPalette())
00148     return TRUE;
00149   return SelectPalette(FALSE);
00150 }
00151
00152 BOOL CMainFrame::SelectPalette(BOOL bBackground)
00153 {
00154   if (m_palette.m_hObject == NULL)
00155     return FALSE;
00156
00157   CDC* pDC = GetDC();
00158   CPalette* pOldPal = pDC->SelectPalette(&m_palette, bBackground);
00159   UINT nPalChg = pDC->RealizePalette();
00160   pDC->SelectPalette(pOldPal, TRUE); // background
00161   ReleaseDC(pDC);
00162
00163   if (nPalChg > 0)
00164     InvalidateRect(NULL, TRUE);
00165
00166   return TRUE;
00167 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/ChildFrm.cpp Source File

  • vc2008fp
  • WorkSpaceToolBar

ChildFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "WorkSpaceToolBar.h"
00013
00014 #include "ChildFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CChildFrame
00024
00025 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
00026
00027 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CChildFrame construction/destruction
00032
00033 CChildFrame::CChildFrame()
00034 {
00035   // TODO: add member initialization code here
00036
00037 }
00038
00039 CChildFrame::~CChildFrame()
00040 {
00041 }
00042
00043 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00044 {
00045   // TODO: Modify the Window class or styles here by modifying
00046   //  the CREATESTRUCT cs
00047
00048   if( !CMDIChildWnd::PreCreateWindow(cs) )
00049     return FALSE;
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CChildFrame diagnostics
00058
00059 #ifdef _DEBUG
00060 void CChildFrame::AssertValid() const
00061 {
00062   CMDIChildWnd::AssertValid();
00063 }
00064
00065 void CChildFrame::Dump(CDumpContext& dc) const
00066 {
00067   CMDIChildWnd::Dump(dc);
00068 }
00069
00070 #endif //_DEBUG
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/stdafx.cpp Source File

  • general
  • dlgtempl

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  dlgtemp.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutputViewBar Member List

This is the complete list of members for COutputViewBar, including all inherited members.
AdjusrHorzScroll(CListBox &wndListBox) | COutputViewBar | [protected]
COutputViewBar() | COutputViewBar |
FillBuildWindow() | COutputViewBar | [protected]
FillDebugWindow() | COutputViewBar | [protected]
m_wndOutput | COutputViewBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | COutputViewBar | [protected]
OnPaint() | COutputViewBar | [protected]
OnSetFocus(CWnd *pOldWnd) | COutputViewBar | [protected]
OnSize(UINT nType, int cx, int cy) | COutputViewBar | [protected]
UpdateFonts() | COutputViewBar |
~COutputViewBar() | COutputViewBar | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht2.cpp Source File

  • general
  • propdlg

propsht2.cpp

Go to the documentation of this file.
00001 // shapesht.cpp : implementation of the CModelessShapePropSheet class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014 #include "resource.h"
00015 #include "shapeobj.h"
00016 #include "colorpge.h"
00017 #include "stylepge.h"
00018 #include "propsht2.h"
00019
00020 IMPLEMENT_DYNAMIC(CModelessShapePropSheet, CPropertySheet)
00021
00022 BEGIN_MESSAGE_MAP(CModelessShapePropSheet, CPropertySheet)
00023   //{{AFX_MSG_MAP(CModelessShapePropSheet)
00024   //}}AFX_MSG_MAP
00025 END_MESSAGE_MAP()
00026
00027 CModelessShapePropSheet::CModelessShapePropSheet(CWnd* pWndParent)
00028   : CPropertySheet(AFX_IDS_APP_TITLE, pWndParent)
00029 {
00030   AddPage(&m_stylePage);
00031   AddPage(&m_colorPage);
00032 }
00033
00034 void CModelessShapePropSheet::PostNcDestroy()
00035 {
00036   CPropertySheet::PostNcDestroy();
00037   delete this;
00038 }
00039
00040 void CModelessShapePropSheet::SetSheetPropsFromShape(CShape* pShape)
00041 {
00042   m_stylePage.m_nShapeStyle = pShape->m_shapestyle;
00043   m_stylePage.SetModified(FALSE);
00044
00045   m_colorPage.m_nColor = pShape->m_shapecolor;
00046   m_colorPage.SetModified(FALSE);
00047
00048   // Reflect the new shape properties in the controls of the
00049   // currently active property page.
00050   GetActivePage()->UpdateData(FALSE);
00051 }
00052
00053 void CModelessShapePropSheet::SetShapePropsFromSheet(CShape* pShape)
00054 {
00055   pShape->m_shapecolor = m_colorPage.m_nColor;
00056   pShape->m_shapestyle = (SHAPE_STYLE)m_stylePage.m_nShapeStyle;
00057
00058   m_colorPage.SetModified(FALSE);
00059   m_stylePage.SetModified(FALSE);
00060 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagRCRESULT Member List

This is the complete list of members for tagRCRESULT, including all inherited members.
cSyv | tagRCRESULT
hpendata | tagRCRESULT
hSyv | tagRCRESULT
lprc | tagRCRESULT
lpsyv | tagRCRESULT
nBaseLine | tagRCRESULT
nMidLine | tagRCRESULT
pntEnd | tagRCRESULT
rectBoundInk | tagRCRESULT
syg | tagRCRESULT
wResultsType | tagRCRESULT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/StdAfx.cpp Source File

  • controls
  • testhelp

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  stdafx.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014
00015 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipremote.h Source File

  • ole
  • ipdrive

ipremote.h

Go to the documentation of this file.
00001 // Machine generated IDispatch driver class(es) created with ClassWizard
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CVariantMap wrapper class
00014
00015 class CVariantMap : public COleDispatchDriver
00016 {
00017 // Attributes
00018 public:
00019   CString GetStr1();
00020   void SetStr1(LPCTSTR);
00021   CString GetStr2();
00022   void SetStr2(LPCTSTR);
00023   long GetI1();
00024   void SetI1(long);
00025   long GetI2();
00026   void SetI2(long);
00027   long GetCount();
00028   void SetCount(long);
00029
00030 // Operations
00031 public:
00032   void SetAt(const VARIANT& from, const VARIANT& to);
00033   void RemoveAll();
00034   void RemoveKey(const VARIANT& key);
00035   BOOL IsEmpty();
00036   VARIANT GetItem(const VARIANT& from);
00037   LPUNKNOWN Get_NewEnum();
00038 };
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CStringCollect wrapper class
00042
00043 class CStringCollect : public COleDispatchDriver
00044 {
00045 // Attributes
00046 public:
00047   long GetCount();
00048   void SetCount(long);
00049
00050 // Operations
00051 public:
00052   CString GetItem(long nIndex);
00053   void SetItem(long nIndex, LPCTSTR lpszNewValue);
00054   long Add(LPCTSTR newValue);
00055   long Find(LPCTSTR findValue);
00056   long Remove(const VARIANT& removeValue);
00057   void RemoveAll();
00058   LPUNKNOWN Get_NewEnum();
00059 };
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CVariantAssoc wrapper class
00063
00064 class CVariantAssoc : public COleDispatchDriver
00065 {
00066 // Attributes
00067 public:
00068   VARIANT GetKey();
00069   void SetKey(const VARIANT&);
00070   VARIANT GetValue();
00071   void SetValue(const VARIANT&);
00072
00073 // Operations
00074 public:
00075 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/RibbonListButton.cpp Source File

  • vc2008fp
  • DrawClient

RibbonListButton.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonListButton.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 const int nImageMargin = 4;
00022 const int nCheckMargin = 2;
00023 const int nTextOffsetX = 11;
00024 const int nTextOffsetY = 2;
00025
00026 const int nBorderMarginX = 1;
00027 const int nBorderMarginY = 3;
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CRibbonListButton
00031
00032 IMPLEMENT_DYNCREATE(CRibbonListButton, CMFCRibbonGallery)
00033
00034 CRibbonListButton::CRibbonListButton()
00035 {
00036   m_sizeMargins = CSize(2, 2);
00037 }
00038
00039 CRibbonListButton::CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL    bRightAlignedText) : CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
00040 {
00041   SetButtonMode(TRUE);
00042   SetRightAlignedText(bRightAlignedText);
00043
00044   m_sizeMargins = CSize(2, 2);
00045   m_sizeMaxText = CSize(0, 0);
00046 }
00047
00048 CRibbonListButton::CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray& arLabels, BOOL    bRightAlignedText) : CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(0, 0), 0, TRUE)
00049 {
00050   SetButtonMode(TRUE);
00051   SetRightAlignedText(bRightAlignedText);
00052
00053   m_listImages.Load(uiImagesPaletteResID);
00054
00055   BITMAP bmp;
00056   GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);
00057
00058   m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
00059   m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
00060
00061   m_arLabels.Copy(arLabels);
00062   m_nIcons = (int) m_arLabels.GetSize();
00063
00064   m_sizeMargins = CSize(2, 2);
00065   m_sizeMaxText = CSize(0, 0);
00066 }
00067
00068 CRibbonListButton::~CRibbonListButton()
00069 {
00070 }
00071
00072 void CRibbonListButton::SetRightAlignedText(BOOL bSet)
00073 {
00074   if (m_bRightAlignedText != bSet)
00075   {
00076     m_bRightAlignedText = bSet;
00077
00078     if (m_bRightAlignedText)
00079     {
00080       SetIconsInRow(1);
00081     }
00082   }
00083 }
00084
00085 void CRibbonListButton::AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray& arLabels)
00086 {
00087   CMFCRibbonGallery::AddGroup(lpszGroupName, (int) arLabels.GetSize());
00088
00089   if (uiImagesPaletteResID != 0)
00090   {
00091     if (m_listImages.GetCount() == 0)
00092     {
00093       m_listImages.Load(uiImagesPaletteResID);
00094
00095       BITMAP bmp;
00096       GetObject(m_listImages.GetImageWell(), sizeof(BITMAP), &bmp);
00097
00098       m_listImages.SetImageSize(CSize(cxPaletteImage, bmp.bmHeight), TRUE);
00099
00100       m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
00101     }
00102     else
00103     {
00104       ASSERT(cxPaletteImage == m_listImages.GetImageSize().cx);
00105       m_listImages.Load(uiImagesPaletteResID, NULL, TRUE);
00106     }
00107   }
00108
00109   if (m_arLabels.GetSize() == 0)
00110   {
00111     m_arLabels.Copy(arLabels);
00112   }
00113   else
00114   {
00115     m_arLabels.Append(arLabels);
00116   }
00117
00118   m_nIcons = (int) m_arLabels.GetSize();
00119
00120   RemoveAll();
00121   m_sizeMaxText = CSize(0, 0);
00122 }
00123
00124 void CRibbonListButton::Clear()
00125 {
00126   CMFCRibbonGallery::Clear();
00127
00128   m_arLabels.RemoveAll();
00129   m_sizeMaxText = CSize(0, 0);
00130 }
00131
00132 void CRibbonListButton::OnShowPopupMenu()
00133 {
00134   ASSERT_VALID(this);
00135
00136   CMFCRibbonBaseElement::OnShowPopupMenu();
00137
00138   if (m_sizeMaxText == CSize(0, 0))
00139   {
00140     CMFCRibbonBar* pRibbonBar = GetTopLevelRibbonBar();
00141     ASSERT_VALID(pRibbonBar);
00142
00143     CClientDC dc(pRibbonBar);
00144
00145     CFont* pOldFont = dc.SelectObject(pRibbonBar->GetFont());
00146     ASSERT(pOldFont != NULL);
00147
00148     int i = 0;
00149
00150     for (i = 0; i < m_arLabels.GetSize(); i++)
00151     {
00152       CSize szText = dc.GetTextExtent(m_arLabels [i]);
00153
00154       m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx);
00155       m_sizeMaxText.cy = max(m_sizeMaxText.cy, szText.cy);
00156     }
00157
00158     const int cxImage = m_listImages.GetImageSize().cx;
00159
00160     for (i = 0; i < m_arSubItems.GetSize(); i++)
00161     {
00162       CMFCRibbonBaseElement* pButton = m_arSubItems [i];
00163       ASSERT_VALID(pButton);
00164
00165       CString strText = pButton->GetText();
00166       CSize szText = dc.GetTextExtent(strText);
00167
00168       m_sizeMaxText.cx = max(m_sizeMaxText.cx, szText.cx - cxImage);
00169     }
00170
00171     dc.SelectObject(pOldFont);
00172   }
00173
00174   CMFCRibbonGallery::OnShowPopupMenu();
00175 }
00176
00177 CSize CRibbonListButton::GetIconSize() const
00178 {
00179   CSize size = CMFCRibbonGallery::GetIconSize();
00180
00181   if (m_bRightAlignedText)
00182   {
00183     if (size.cx > 0)
00184     {
00185       size.cx += 2 *(m_sizeMargins.cx + nCheckMargin) - nImageMargin + nTextOffsetX + m_sizeMaxText.cx;
00186     }
00187     else
00188     {
00189       size.cx = m_sizeMaxText.cx + 2 *(m_sizeMargins.cy + nCheckMargin + nTextOffsetX);
00190     }
00191
00192     if (size.cy > 0)
00193     {
00194       size.cy += 2 *(m_sizeMargins.cy - nImageMargin + nCheckMargin);
00195     }
00196     else
00197     {
00198       size.cy = m_sizeMaxText.cy + 2 * m_sizeMargins.cy;
00199     }
00200   }
00201   else
00202   {
00203     size.cy += nTextOffsetY + m_sizeMaxText.cy;
00204   }
00205
00206   return size;
00207 }
00208
00209 void CRibbonListButton::OnDrawPaletteIcon( CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* pIcon, COLORREF clrText)
00210 {
00211   ASSERT_VALID(this);
00212   ASSERT_VALID(pDC);
00213   ASSERT_VALID(pIcon);
00214   ASSERT(nIconIndex >= 0);
00215   ASSERT(nIconIndex < m_nIcons);
00216
00217   BOOL bChecked     = pIcon->IsChecked();
00218   BOOL bHighlighted = pIcon->IsHighlighted();
00219
00220   CRect rectText(0, 0, 0, 0);
00221
00222   if (m_bRightAlignedText)
00223   {
00224     if (!m_bSmallIcons)
00225     {
00226       rectIcon.DeflateRect(nCheckMargin, nCheckMargin, nImageMargin, nCheckMargin);
00227     }
00228
00229     CRect rect(rectIcon);
00230     rect.right  = rect.left + m_listImages.GetImageSize().cx + m_sizeMargins.cx * 2;
00231
00232     if (bChecked)
00233     {
00234       CMFCVisualManager::GetInstance()->OnDrawRibbonMenuCheckFrame(pDC, this, rect);
00235     }
00236
00237     if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
00238     {
00239       m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertCenter);
00240     }
00241     else if (bChecked)
00242     {
00243       CMFCToolBarMenuButton dummy;
00244       CMFCVisualManager::GetInstance()->OnDrawMenuCheck(pDC, &dummy, rect, bHighlighted, FALSE);
00245     }
00246
00247     rectText = rect;
00248     rectText.left  = rectText.right + nTextOffsetX;
00249     rectText.right = rectIcon.right;
00250   }
00251   else
00252   {
00253     if (!m_bSmallIcons)
00254     {
00255       rectIcon.DeflateRect(nImageMargin, nImageMargin);
00256     }
00257
00258     CRect rect(rectIcon);
00259     rect.bottom = rect.top + m_listImages.GetImageSize().cy;
00260
00261     if (0 <= nIconIndex && nIconIndex < m_listImages.GetCount())
00262     {
00263       m_listImages.DrawEx(pDC, rect, nIconIndex, CMFCToolBarImages::ImageAlignHorzCenter, CMFCToolBarImages::ImageAlignVertTop);
00264     }
00265
00266     rectText = rect;
00267     rectText.top    = rectText.bottom + nTextOffsetY;
00268     rectText.bottom = rectIcon.bottom;
00269   }
00270
00271   if (!rectText.IsRectEmpty())
00272   {
00273     COLORREF clrOld = (COLORREF)-1;
00274     if (clrText != (COLORREF)-1)
00275     {
00276       clrOld = pDC->SetTextColor(clrText);
00277     }
00278
00279     CString strText = m_arLabels[nIconIndex];
00280
00281     pDC->DrawText(strText, rectText, m_bRightAlignedText
00282       ? DT_VCENTER | DT_SINGLELINE | DT_LEFT
00283       : DT_TOP | DT_SINGLELINE | DT_CENTER | DT_END_ELLIPSIS);
00284
00285     if (clrText != (COLORREF)-1)
00286     {
00287       pDC->SetTextColor(clrOld);
00288     }
00289   }
00290 }
00291
00292 void CRibbonListButton::CopyFrom(const CMFCRibbonBaseElement& s)
00293 {
00294   ASSERT_VALID(this);
00295
00296   CMFCRibbonGallery::CopyFrom(s);
00297
00298   CRibbonListButton& src = (CRibbonListButton&) s;
00299
00300   src.m_listImages.CopyTo(m_listImages);
00301   m_imagesPalette.SetImageSize(m_listImages.GetImageSize());
00302
00303   m_arLabels.RemoveAll();
00304   m_arLabels.Copy(src.m_arLabels);
00305
00306   m_sizeMargins = src.m_sizeMargins;
00307   m_bRightAlignedText = src.m_bRightAlignedText;
00308   m_sizeMaxText = src.m_sizeMaxText;
00309 }
00310
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/StdAfx.cpp Source File

  • vc2008fp
  • TabbedView

StdAfx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  TabbedView.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005
00006 #include "stdafx.h"
00007
00008
00009
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/resource.h Source File

  • advanced
  • collect

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by collect.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define IDD_STRINGLIST                  130
00008 #define IDD_STRING_LIST                 130
00009 #define IDD_TYPEDLIST                   131
00010 #define IDD_TYPED_PTR_LIST              131
00011 #define IDD_LIST                        132
00012 #define IDD_INT_LIST                    132
00013 #define IDD_DWORD_ARRAY                 133
00014 #define IDD_TYPED_PTR_ARRAY             134
00015 #define IDD_POINT_ARRAY                 135
00016 #define IDD_MAP_STRING_TO_STRING        136
00017 #define IDD_TYPED_PTR_MAP               137
00018 #define IDD_MAP_DWORD_TO_MYSTRUCT       138
00019 #define IDC_LIST                        1000
00020 #define IDC_ELEMENT                     1001
00021 #define IDC_ADD                         1003
00022 #define IDC_REMOVE                      1004
00023 #define IDC_REMOVE_ALL                  1005
00024 #define IDC_FIND                        1006
00025 #define IDC_GET_AT                      1008
00026 #define IDC_UPDATE                      1009
00027 #define IDC_INT                         1010
00028 #define IDC_FLOAT                       1012
00029 #define IDC_STRING                      1013
00030 #define IDC_DWORD                       1015
00031 #define IDC_X                           1016
00032 #define IDC_Y                           1017
00033 #define IDC_INSERT_BEFORE               1018
00034 #define IDC_ADD_OR_UPDATE               1019
00035 #define IDC_KEY                         1020
00036 #define IDC_VALUE                       1021
00037 #define ID_STRINGLIST                   32774
00038 #define ID_TYPEDLIST                    32775
00039 #define ID_CLIST                        32776
00040 #define ID_INTLIST                      32776
00041 #define ID_DWORDARRAY                   32777
00042 #define ID_TYPEDARRAY                   32778
00043 #define ID_TYPEDPTRARRAY                32778
00044 #define ID_ARRAY                        32779
00045 #define ID_POINTARRAY                   32779
00046 #define ID_MAPSTRINGTOSTRING            32780
00047 #define ID_TYPEDPTRMAP                  32781
00048 #define ID_MAP                          32782
00049 #define ID_MAPBYTETOMYSTRUCT            32782
00050 #define ID_MAPDWORDTOMYSTRUCT           32782
00051 #define IDS_INITIAL_STRING              57645
00052 #define IDS_INITIAL_KEY                 57646
00053 #define IDS_INITIAL_VALUE               57647
00054 #define IDS_SELECT_DWORD_TO_UPDATE      57648
00055 #define IDS_SELECT_DWORD_TO_REMOVE      57649
00056 #define IDS_SELECT_INTEGER              57650
00057 #define IDS_KEY_NOT_FOUND               57651
00058 #define IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN 57652
00059 #define IDS_SELECT_POINT_TO_BE_UPDATED  57653
00060 #define IDS_SELECT_POINT_TO_BE_REMOVED  57654
00061 #define IDS_SELECT_STRING_FIRST         57655
00062 #define IDS_SELECT_ENTRY_TO_BE_UPDATED  57656
00063 #define IDS_SELECT_ENTRY_TO_BE_REMOVED  57657
00064 #define IDS_BLANK_CHARS_NOT_ALLOWED     57658
00065 #define IDS_SELECT_ENTRY                57659
00066
00067 // Next default values for new objects
00068 //
00069 #ifdef APSTUDIO_INVOKED
00070 #ifndef APSTUDIO_READONLY_SYMBOLS
00071 #define _APS_NEXT_RESOURCE_VALUE        131
00072 #define _APS_NEXT_COMMAND_VALUE         32783
00073 #define _APS_NEXT_CONTROL_VALUE         1024
00074 #define _APS_NEXT_SYMED_VALUE           101
00075 #endif
00076 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CScreenCapApp Member List

This is the complete list of members for CScreenCapApp, including all inherited members.
CScreenCapApp() | CScreenCapApp |
InitInstance() | CScreenCapApp | [virtual]
OnAppAbout() | CScreenCapApp |
OnIdle(LONG lCount) | CScreenCapApp |
PreTranslateMessage(MSG *pMsg) | CScreenCapApp |
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/listdlg.h Source File

  • vc2008fp
  • WordPad

listdlg.h

Go to the documentation of this file.
00001 //
00002 // This is a part of the Microsoft Foundation Classes C++ library.
00003 // Copyright (C) 1992-1998 Microsoft Corporation
00004 // All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CListDlg : public CDialog
00013 {
00014 public:
00015   //{{AFX_DATA(CListDlg)
00016   enum { IDD = IDD_LISTDIALOG };
00017   //}}AFX_DATA
00018   CListDlg::CListDlg(UINT idStrDlgTitle, UINT idStrListTitle,
00019     const CStringList& listItems, int nDefSel=0);
00020   CString m_strDlgTitle,m_strListTitle;
00021   const CStringList& m_listItems;
00022   int m_nSelection;
00023
00024 protected:
00025   BOOL OnInitDialog();
00026   //{{AFX_MSG(CListDlg)
00027   afx_msg void OnOK();
00028   //}}AFX_MSG
00029   DECLARE_MESSAGE_MAP()
00030 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MFCBind.h Source File

  • ole
  • MFCBind

MFCBind.h

Go to the documentation of this file.
00001 // MFCBind.h : main header file for the MFCBIND application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 #if !defined(AFX_MFCBIND_H__C3B18222_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
00012 #define AFX_MFCBIND_H__C3B18222_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_
00013
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif // _MSC_VER > 1000
00017
00018 #ifndef __AFXWIN_H__
00019   #error include 'stdafx.h' before including this file for PCH
00020 #endif
00021
00022 #include "resource.h"       // main symbols
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMFCBindApp:
00026 // See MFCBind.cpp for the implementation of this class
00027 //
00028
00029 class CMFCBindApp : public CWinApp
00030 {
00031 public:
00032   CMFCBindApp();
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CMFCBindApp)
00037   public:
00038   virtual BOOL InitInstance();
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042
00043   //{{AFX_MSG(CMFCBindApp)
00044   afx_msg void OnAppAbout();
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046     //    DO NOT EDIT what you see in these blocks of generated code !
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053
00054 //{{AFX_INSERT_LOCATION}}
00055 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00056
00057 #endif // !defined(AFX_MFCBIND_H__C3B18222_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/resource.h Source File

  • controls
  • circ

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by CIRC.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_CIRC                       1
00015 #define IDB_CIRC                       1
00016 #define IDS_CIRC_PPG                   2
00017 #define IDI_ABOUTDLL                    10
00018 #define IDD_ABOUTBOX_CIRC              100
00019 #define IDS_CIRC_PPG_CAPTION           101
00020 #define IDD_PROPPAGE_CIRC              101
00021 #define IDC_CAPTION                     201
00022 #define IDC_CIRCLEOFFSET                202
00023 #define IDC_CIRCLESHAPE                 203
00024 #define IDC_NOTE                        204
00025
00026 // Next default values for new objects
00027 //
00028 #ifdef APSTUDIO_INVOKED
00029 #ifndef APSTUDIO_READONLY_SYMBOLS
00030
00031 #define _APS_NEXT_RESOURCE_VALUE        201
00032 #define _APS_NEXT_COMMAND_VALUE         32768
00033 #define _APS_NEXT_CONTROL_VALUE         205
00034 #define _APS_NEXT_SYMED_VALUE           101
00035 #endif
00036 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdDoc.h Source File

  • internet
  • HTMLEdit

HTMLEdDoc.h

Go to the documentation of this file.
00001 // HTMLEdDoc.h : interface of the CHTMLEdDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_HTMLEDDOC_H__2BCEEF8B_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
00015 #define AFX_HTMLEDDOC_H__2BCEEF8B_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_
00016
00017 #if _MSC_VER > 1000
00018 #pragma once
00019 #endif // _MSC_VER > 1000
00020
00021 #define DELETE_EXCEPTION(e) do { e->Delete(); } while (0)
00022
00023 class CHTMLEdDoc : public CHtmlEditDoc
00024 {
00025 protected: // create from serialization only
00026   CHTMLEdDoc();
00027   DECLARE_DYNCREATE(CHTMLEdDoc)
00028
00029 // Attributes
00030 private:
00031   CString m_sSaveFileName;
00032 public:
00033   BOOL m_bDoSaveOnDocCom;
00034   BOOL m_bCallNewDocument;
00035   BOOL m_bCallCloseDocument;
00036   BOOL SaveMyDocument();
00037   BOOL OnSaveDocument(LPCTSTR lpszFileName);
00038   BOOL OnNewDocument();
00039   void OnCloseDocument();
00040   BOOL OnOpenDocument(LPCTSTR lpszFileName);
00041   BOOL IsModified();
00042 // Operations
00043 public:
00044
00045 // Overrides
00046   // ClassWizard generated virtual function overrides
00047   //{{AFX_VIRTUAL(CHTMLEdDoc)
00048   //}}AFX_VIRTUAL
00049
00050 // Implementation
00051 public:
00052   virtual ~CHTMLEdDoc();
00053 #ifdef _DEBUG
00054   virtual void AssertValid() const;
00055   virtual void Dump(CDumpContext& dc) const;
00056 #endif
00057
00058 protected:
00059 // Generated message map functions
00060 protected:
00061   //{{AFX_MSG(CHTMLEdDoc)
00062   afx_msg void OnFileOpenurl();
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065 };
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068
00069 //{{AFX_INSERT_LOCATION}}
00070 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00071
00072 #endif // !defined(AFX_HTMLEDDOC_H__2BCEEF8B_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/hiersvr.h Source File

  • ole
  • hiersvr

hiersvr.h

Go to the documentation of this file.
00001 // hiersvr.h : main header file for the HIERSVR application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CServerApp:
00021 // See hiersvr.cpp for the implementation of this class
00022 //
00023
00024 class CServerApp : public CWinApp
00025 {
00026 public:
00027   CServerApp();
00028
00029 // Overrides
00030   virtual BOOL InitInstance();
00031   virtual int ExitInstance();
00032
00033 // Implementation
00034 protected:
00035   COleTemplateServer m_server;
00036
00037   //{{AFX_MSG(CServerApp)
00038   afx_msg void OnAppAbout();
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043 class CHierSvrDocTemplate : public CMultiDocTemplate
00044 {
00045 public:
00046   CHierSvrDocTemplate();
00047
00048   CDocTemplate::Confidence MatchDocType(LPCTSTR lpszPathName,
00049     CDocument*& rpDocMatch);
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenu.cpp Source File

  • vc2008fp
  • TrayMenu

TrayMenu.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TrayMenu.h"
00013 #include "TrayMenuDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CTrayMenuApp
00023
00024 BEGIN_MESSAGE_MAP(CTrayMenuApp, CWinAppEx)
00025   ON_COMMAND(ID_HELP, CWinAppEx::OnHelp)
00026 END_MESSAGE_MAP()
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CTrayMenuApp construction
00030
00031 CTrayMenuApp::CTrayMenuApp()
00032 {
00033   // TODO: add construction code here,
00034   // Place all significant initialization in InitInstance
00035 }
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // The one and only CTrayMenuApp object
00039
00040 CTrayMenuApp theApp;
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CTrayMenuApp initialization
00044
00045 BOOL CTrayMenuApp::InitInstance()
00046 {
00047   AfxEnableControlContainer();
00048
00049   InitContextMenuManager ();
00050
00051   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00052
00053   // Standard initialization
00054   // If you are not using these features and wish to reduce the size
00055   //  of your final executable, you should remove from the following
00056   //  the specific initialization routines you do not need.
00057
00058   CTrayMenuDlg dlg;
00059   m_pMainWnd = &dlg;
00060   int nResponse = (int) dlg.DoModal();
00061   if (nResponse == IDOK)
00062   {
00063     // TODO: Place code here to handle when the dialog is
00064     //  dismissed with OK
00065   }
00066   else if (nResponse == IDCANCEL)
00067   {
00068     // TODO: Place code here to handle when the dialog is
00069     //  dismissed with Cancel
00070   }
00071
00072   // Since the dialog has been closed, return FALSE so that we exit the
00073   //  application, rather than start the application's message pump.
00074   return FALSE;
00075 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CScribbleDoc Member List

This is the complete list of members for CScribbleDoc, including all inherited members.
CScribbleDoc() | CScribbleDoc | [protected]
DeleteContents() | CScribbleDoc | [virtual]
GetCurrentPen() | CScribbleDoc | [inline]
GetDocSize() | CScribbleDoc | [inline]
GetEmbeddedItem() | CScribbleDoc | [inline]
InitDocument() | CScribbleDoc | [protected]
m_bThickPen | CScribbleDoc | [protected]
m_nPenWidth | CScribbleDoc | [protected]
m_nThickWidth | CScribbleDoc | [protected]
m_nThinWidth | CScribbleDoc | [protected]
m_penCur | CScribbleDoc | [protected]
m_sizeDoc | CScribbleDoc | [protected]
m_strokeList | CScribbleDoc |
NewStroke() | CScribbleDoc |
OnEditClearAll() | CScribbleDoc | [protected]
OnEditCopy() | CScribbleDoc | [protected]
OnGetEmbeddedItem() | CScribbleDoc | [protected, virtual]
OnNewDocument() | CScribbleDoc | [virtual]
OnOpenDocument(LPCTSTR lpszPathName) | CScribbleDoc | [virtual]
OnPenThickOrThin() | CScribbleDoc | [protected]
OnPenWidths() | CScribbleDoc | [protected]
OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect) | CScribbleDoc | [protected]
OnUpdateEditClearAll(CCmdUI *pCmdUI) | CScribbleDoc | [protected]
OnUpdatePenThickOrThin(CCmdUI *pCmdUI) | CScribbleDoc | [protected]
ReplacePen() | CScribbleDoc | [protected]
Serialize(CArchive &ar) | CScribbleDoc | [virtual]
~CScribbleDoc() | CScribbleDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MainFrm.h Source File

  • ole
  • MFCBind

MainFrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_MAINFRM_H__C3B18226_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
00013 #define AFX_MAINFRM_H__C3B18226_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_
00014
00015 #if _MSC_VER > 1000
00016 #pragma once
00017 #endif // _MSC_VER > 1000
00018
00019 class CObjListView;
00020 class CMFCBindView;
00021
00022 class CMainFrame : public CFrameWnd
00023 {
00024 protected: // create from serialization only
00025   CMainFrame();
00026   DECLARE_DYNCREATE(CMainFrame)
00027
00028 // Attributes
00029 public:
00030   CObjListView* GetObjListView();
00031   CMFCBindView* GetDocView();
00032
00033 // Operations
00034 public:
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CMainFrame)
00039   public:
00040   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00041   protected:
00042   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046 public:
00047   CSplitterWnd m_wndSplitter;
00048   virtual ~CMainFrame();
00049 #ifdef _DEBUG
00050   virtual void AssertValid() const;
00051   virtual void Dump(CDumpContext& dc) const;
00052 #endif
00053
00054 protected:  // control bar embedded members
00055   CStatusBar  m_wndStatusBar;
00056   CToolBar    m_wndToolBar;
00057
00058 // Generated message map functions
00059 protected:
00060   //{{AFX_MSG(CMainFrame)
00061   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00062   afx_msg void OnOleInsertNew();
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065 };
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068
00069 //{{AFX_INSERT_LOCATION}}
00070 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00071
00072 #endif // !defined(AFX_MAINFRM_H__C3B18226_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/stdafx.h Source File

  • advanced
  • mtmdi

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
00017 #include <afxdlgs.h>        // CommDlg Wrappers
00018 #include <afxext.h>         // needed by afxpriv.h
00019 #include <afxpriv.h>        // for WM_IDLEUPDATECMDUI definition
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonListButton Member List

This is the complete list of members for CRibbonListButton, including all inherited members.
AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels) | CRibbonListButton |
AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels) | CRibbonListButton |
Clear() | CRibbonListButton | [virtual]
Clear() | CRibbonListButton | [virtual]
CopyFrom(const CMFCRibbonBaseElement &src) | CRibbonListButton | [protected, virtual]
CopyFrom(const CMFCRibbonBaseElement &src) | CRibbonListButton | [protected, virtual]
CRibbonListButton() | CRibbonListButton |
CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL bRightAlignedText=TRUE) | CRibbonListButton |
CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels, BOOL bRightAlignedText=TRUE) | CRibbonListButton |
CRibbonListButton() | CRibbonListButton |
CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL bRightAlignedText=TRUE) | CRibbonListButton |
CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray &arLabels, BOOL bRightAlignedText=TRUE) | CRibbonListButton |
GetIconSize() const | CRibbonListButton | [protected, virtual]
GetIconSize() const | CRibbonListButton | [protected, virtual]
IsItemMenuLook() const | CRibbonListButton | [inline, protected, virtual]
IsItemMenuLook() const | CRibbonListButton | [inline, protected, virtual]
m_arLabels | CRibbonListButton | [protected]
m_bRightAlignedText | CRibbonListButton | [protected]
m_listImages | CRibbonListButton | [protected]
m_sizeMargins | CRibbonListButton | [protected]
m_sizeMaxText | CRibbonListButton | [protected]
OnDrawPaletteIcon(CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText) | CRibbonListButton | [protected, virtual]
OnDrawPaletteIcon(CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText) | CRibbonListButton | [protected, virtual]
OnShowPopupMenu() | CRibbonListButton | [protected, virtual]
OnShowPopupMenu() | CRibbonListButton | [protected, virtual]
RecalcTextSizes(CDC *pDC) | CRibbonListButton | [protected]
RecalcTextSizes(CDC *pDC) | CRibbonListButton | [protected]
SetRightAlignedText(BOOL bSet=TRUE) | CRibbonListButton |
SetRightAlignedText(BOOL bSet=TRUE) | CRibbonListButton |
UpdateToolTips() | CRibbonListButton | [protected]
~CRibbonListButton() | CRibbonListButton | [virtual]
~CRibbonListButton() | CRibbonListButton | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MFCBind.cpp Source File

  • ole
  • MFCBind

MFCBind.cpp

Go to the documentation of this file.
00001 // MFCBind.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "MFCBind.h"
00014
00015 #include "MainFrm.h"
00016 #include "BindDoc.h"
00017 #include "BindView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMFCBindApp
00027
00028 BEGIN_MESSAGE_MAP(CMFCBindApp, CWinApp)
00029   //{{AFX_MSG_MAP(CMFCBindApp)
00030   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code!
00033   //}}AFX_MSG_MAP
00034   // Standard file based document commands
00035   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00036   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00037   // Standard print setup command
00038   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CMFCBindApp construction
00043
00044 CMFCBindApp::CMFCBindApp()
00045 {
00046   // TODO: add construction code here,
00047   // Place all significant initialization in InitInstance
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only CMFCBindApp object
00052
00053 CMFCBindApp theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CMFCBindApp initialization
00057
00058 BOOL CMFCBindApp::InitInstance()
00059 {
00060   // Initialize OLE libraries
00061   if (!AfxOleInit())
00062   {
00063     AfxMessageBox(IDP_OLE_INIT_FAILED);
00064     return FALSE;
00065   }
00066
00067   // Change the registry key under which our settings are stored.
00068   // You should modify this string to be something appropriate
00069   // such as the name of your company or organization.
00070   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00071
00072   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00073
00074   // Register the application's document templates.  Document templates
00075   //  serve as the connection between documents, frame windows and views.
00076
00077   CSingleDocTemplate* pDocTemplate;
00078   pDocTemplate = new CSingleDocTemplate(
00079     IDR_MAINFRAME,
00080     RUNTIME_CLASS(CMFCBindDoc),
00081     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00082     RUNTIME_CLASS(CMFCBindView));
00083   pDocTemplate->SetContainerInfo(IDR_CNTR_INPLACE);
00084   AddDocTemplate(pDocTemplate);
00085
00086   // Parse command line for standard shell commands, DDE, file open
00087   CCommandLineInfo cmdInfo;
00088   ParseCommandLine(cmdInfo);
00089
00090   // Dispatch commands specified on the command line
00091   if (!ProcessShellCommand(cmdInfo))
00092     return FALSE;
00093
00094   // The one and only window has been initialized, so show and update it.
00095   m_pMainWnd->ShowWindow(SW_SHOW);
00096   m_pMainWnd->UpdateWindow();
00097
00098   return TRUE;
00099 }
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CAboutDlg dialog used for App About
00103
00104 class CAboutDlg : public CDialog
00105 {
00106 public:
00107   CAboutDlg();
00108
00109 // Dialog Data
00110   //{{AFX_DATA(CAboutDlg)
00111   enum { IDD = IDD_ABOUTBOX };
00112   //}}AFX_DATA
00113
00114   // ClassWizard generated virtual function overrides
00115   //{{AFX_VIRTUAL(CAboutDlg)
00116   protected:
00117   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00118   //}}AFX_VIRTUAL
00119
00120 // Implementation
00121 protected:
00122   //{{AFX_MSG(CAboutDlg)
00123     // No message handlers
00124   //}}AFX_MSG
00125   DECLARE_MESSAGE_MAP()
00126 };
00127
00128 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00129 {
00130   //{{AFX_DATA_INIT(CAboutDlg)
00131   //}}AFX_DATA_INIT
00132 }
00133
00134 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00135 {
00136   CDialog::DoDataExchange(pDX);
00137   //{{AFX_DATA_MAP(CAboutDlg)
00138   //}}AFX_DATA_MAP
00139 }
00140
00141 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00142   //{{AFX_MSG_MAP(CAboutDlg)
00143     // No message handlers
00144   //}}AFX_MSG_MAP
00145 END_MESSAGE_MAP()
00146
00147 // App command to run the dialog
00148 void CMFCBindApp::OnAppAbout()
00149 {
00150   CAboutDlg aboutDlg;
00151   aboutDlg.DoModal();
00152 }
00153
00154 /////////////////////////////////////////////////////////////////////////////
00155 // CMFCBindApp commands
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgen.h Source File

  • utility
  • guidgen

guidgen.h

Go to the documentation of this file.
00001 // guidgen.h : main header file for the GUIDGEN application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CGuidGenApp:
00020 // See guidgen.cpp for the implementation of this class
00021 //
00022
00023 class CGuidGenApp : public CWinApp
00024 {
00025 public:
00026   CGuidGenApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CGuidGenApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   virtual int ExitInstance();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037
00038   //{{AFX_MSG(CGuidGenApp)
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/stdafx.cpp Source File

  • ole
  • wordpad

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  wordpad.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/stdafx.cpp Source File

  • general
  • npp

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  np.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013 //
00014
00015 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMargueeTaskDialog Member List

This is the complete list of members for CMargueeTaskDialog, including all inherited members.
CMargueeTaskDialog() CMargueeTaskDialog [inline]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/LineStyleMenuItem.h Source File

  • vc2008fp
  • OwnerDrawMenu

LineStyleMenuItem.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CLineStyleMenuItem : public CMFCToolBarMenuButton
00014 {
00015   DECLARE_DYNCREATE(CLineStyleMenuItem)
00016
00017 public:
00018   CLineStyleMenuItem(int nWidth = 1, UINT uiCmdID = 0, LPCTSTR lpszText = NULL,
00019             BOOL bIsChecked = FALSE);
00020   virtual ~CLineStyleMenuItem();
00021
00022 protected:
00023   virtual void OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00024             BOOL bHorz = TRUE, BOOL bCustomizeMode = FALSE,
00025             BOOL bHighlight = FALSE,
00026             BOOL bDrawBorder = TRUE,
00027             BOOL bGrayDisabledButtons = TRUE);
00028
00029   virtual void CopyFrom (const CMFCToolBarButton& src);
00030   virtual SIZE OnCalculateSize (CDC* pDC, const CSize& sizeDefault, BOOL bHorz);
00031
00032   int m_nWidth; // Line width
00033 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/resource.h Source File

  • advanced
  • dllhusk

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by DLLHUSK.RC
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDR_TEXTTYPE                    3
00007 #define IDR_HELLOTYPE                   4
00008 #define IDD_ABOUTBOX                    100
00009 #define IDR_POPUPMENUS                  101
00010 #define ID_DUMP_CLASSES                 32768
00011 #define ID_DUMP_OBJECTS                 32769
00012 #define ID_DUMP_DOCTEMPLATES            32770
00013 #define ID_DUMP_DLLS                    32771
00014
00015 // Next default values for new objects
00016 //
00017 #ifdef APSTUDIO_INVOKED
00018 #ifndef APSTUDIO_READONLY_SYMBOLS
00019
00020 #define _APS_NEXT_RESOURCE_VALUE        102
00021 #define _APS_NEXT_COMMAND_VALUE         32772
00022 #define _APS_NEXT_CONTROL_VALUE         102
00023 #define _APS_NEXT_SYMED_VALUE           102
00024 #endif
00025 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnppg.h Source File

  • controls
  • button

btnppg.h

Go to the documentation of this file.
00001 // btnppg.h : Declaration of the CButtonPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 ////////////////////////////////////////////////////////////////////////////
00013 // CButtonPropPage : See btnppg.cpp for implementation.
00014
00015 class CButtonPropPage : public COlePropertyPage
00016 {
00017   DECLARE_DYNCREATE(CButtonPropPage)
00018   DECLARE_OLECREATE_EX(CButtonPropPage)
00019
00020 // Constructor
00021 public:
00022   CButtonPropPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CButtonPropPage)
00026   enum { IDD = IDD_PROPPAGE_BUTTON };
00027   CString m_Caption;
00028   //}}AFX_DATA
00029
00030 // Implementation
00031 protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033
00034 // Message maps
00035 protected:
00036   //{{AFX_MSG(CButtonPropPage)
00037   //}}AFX_MSG
00038   DECLARE_MESSAGE_MAP()
00039
00040 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tree.h Source File

  • ole
  • oleview
  • iviewers

tree.h

Go to the documentation of this file.
00001 // tree.h
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __TREE_H__
00013 #define __TREE_H__
00014
00015 // base class
00016 class CTreeItem : public CObject
00017 {
00018 public:
00019   CTreeItem( CTreeCtrl* pTree = NULL) ;
00020   virtual ~CTreeItem();
00021   DECLARE_DYNCREATE(CTreeItem)
00022
00023 // Attributes
00024 public:
00025   IUnknown*       m_punk ;
00026   CTreeCtrl*      m_pTree ;
00027
00028   // enum of entry types.
00029   //
00030   typedef enum {
00031     typeUnknown         ,
00032     typeUnknown2        ,
00033     typeTypeLib         ,
00034     typeTypeLib2        ,
00035     typeTypeInfo        ,
00036     typeTypeInfo2       ,
00037     typeMethods         ,
00038     typeMethods2        ,
00039     typeProperties      ,
00040     typeProperties2     ,
00041     typeConstants       ,
00042     typeConstants2      ,
00043     typeImplTypes       ,
00044     typeImplTypes2      ,
00045     typeMethod          ,
00046     typeProperty        ,
00047     typeConstant        ,
00048     typeEnum            ,       // TKIND_ENUM
00049     typeRecord          ,       // TKIND_RECORD
00050     typeModule          ,       // TKIND_MODULE
00051     typeInterface       ,       // TKIND_INTERFACE
00052     typeDispinterface   ,       // TKIND_DISPATCH
00053     typeCoClass         ,       // TKIND_COCLASS
00054     typeAlias           ,       // TKIND_ALIAS
00055     typeUnion           ,       // TKIND_UNION
00056     typeEnums           ,
00057     typeRecords         ,
00058     typeModules         ,
00059     typeInterfaces      ,
00060     typeDispinterfaces  ,
00061     typeCoClasses       ,
00062     typeAliases         ,
00063     typeUnions          ,
00064   } ITEM_TYPE ;
00065
00066   ITEM_TYPE       m_Type ;
00067   MEMBERID        m_uiMemid ;    // memid of the func/var/const
00068
00069 // Operations:
00070 public:
00071   CString         TYPEDESCtoString( TYPEDESC* lptdesc ) ;
00072   TYPEKIND        GetTypeKind() ;
00073   ITEM_TYPE       TypeKindToItemType( TYPEKIND tkind) ;
00074   void            GetName(CString& szReturn, BOOL fIDLStyle = FALSE ) ;
00075
00076   virtual ITypeLib* GetTypeLib()
00077     {return (ITypeLib*)m_punk;}
00078   virtual void SetTypeLib(ITypeLib* punk)
00079     {ASSERT(punk); m_punk = (IUnknown*)punk;}
00080
00081   virtual ITypeInfo* GetTypeInfo()
00082     {return (ITypeInfo*)m_punk;}
00083   virtual void SetTypeInfo(ITypeInfo* punk)
00084     {ASSERT(punk); m_punk = (IUnknown*)punk;}
00085
00086   virtual BOOL Expand( HTREEITEM hitem ) ;
00087   virtual BOOL ExpandTypeLib( HTREEITEM hitem ) ;
00088   virtual BOOL ExpandTypeInfo( HTREEITEM hitem ) ;
00089   virtual BOOL ExpandFuncs( HTREEITEM hitem ) ;
00090   virtual BOOL ExpandVars( HTREEITEM hitem ) ;
00091   virtual BOOL ExpandImplTypes( HTREEITEM hitem ) ;
00092 };
00093 #endif
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circppg.cpp Source File

  • controls
  • circ

circppg.cpp

Go to the documentation of this file.
00001 // circppg.cpp : Implementation of the CCircPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "circ.h"
00014 #include "circppg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021
00022 IMPLEMENT_DYNCREATE(CCircPropPage, COlePropertyPage)
00023
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // Message map
00027
00028 BEGIN_MESSAGE_MAP(CCircPropPage, COlePropertyPage)
00029   //{{AFX_MSG_MAP(CCircPropPage)
00030   // NOTE - ClassWizard will add and remove message map entries
00031   //    DO NOT EDIT what you see in these blocks of generated code !
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // Initialize class factory and guid
00038
00039 IMPLEMENT_OLECREATE_EX(CCircPropPage, "CIRC.CircPropPage.1",
00040   0x9dbafcd3, 0x592f, 0x101b, 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b)
00041
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CCircPropPage::CCircPropPageFactory::UpdateRegistry -
00045 // Adds or removes system registry entries for CCircPropPage
00046
00047 BOOL CCircPropPage::CCircPropPageFactory::UpdateRegistry(BOOL bRegister)
00048 {
00049   if (bRegister)
00050     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00051       m_clsid, IDS_CIRC_PPG);
00052   else
00053     return AfxOleUnregisterClass(m_clsid, NULL);
00054 }
00055
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CCircPropPage::CCircPropPage - Constructor
00059
00060 CCircPropPage::CCircPropPage() :
00061   COlePropertyPage(IDD, IDS_CIRC_PPG_CAPTION)
00062 {
00063   //{{AFX_DATA_INIT(CCircPropPage)
00064   m_caption = _T("");
00065   m_circleOffset = 0;
00066   m_circleShape = FALSE;
00067   m_note = _T("");
00068   //}}AFX_DATA_INIT
00069 }
00070
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CCircPropPage::DoDataExchange - Moves data between page and properties
00074
00075 void CCircPropPage::DoDataExchange(CDataExchange* pDX)
00076 {
00077   //{{AFX_DATA_MAP(CCircPropPage)
00078   DDP_Text(pDX, IDC_CAPTION, m_caption, _T("Caption") );
00079   DDX_Text(pDX, IDC_CAPTION, m_caption);
00080   DDP_Text(pDX, IDC_CIRCLEOFFSET, m_circleOffset, _T("CircleOffset") );
00081   DDX_Text(pDX, IDC_CIRCLEOFFSET, m_circleOffset);
00082   DDP_Check(pDX, IDC_CIRCLESHAPE, m_circleShape, _T("CircleShape") );
00083   DDX_Check(pDX, IDC_CIRCLESHAPE, m_circleShape);
00084   DDP_Text(pDX, IDC_NOTE, m_note, _T("Note") );
00085   DDX_Text(pDX, IDC_NOTE, m_note);
00086   //}}AFX_DATA_MAP
00087   DDP_PostProcessing(pDX);
00088 }
00089
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // CCircPropPage message handlers
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/wclstest.cpp Source File

  • general
  • ctrltest

wclstest.cpp

Go to the documentation of this file.
00001 // wclsedit.cpp : registered WNDCLASS Edit control example
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 #include "paredit.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // Dialog class
00019
00020 class CWclsEditDlg : public CDialog
00021 {
00022 public:
00023   //{{AFX_DATA(CWclsEditDlg)
00024     enum { IDD = IDD_WNDCLASS_EDIT };
00025   //}}AFX_DATA
00026   CWclsEditDlg()
00027     : CDialog(CWclsEditDlg::IDD)
00028     { }
00029
00030   // access to controls is through inline helpers
00031   CEdit&  Edit1()
00032         { return *(CEdit*)GetDlgItem(IDC_EDIT1); }
00033   CEdit&  Edit2()
00034         { return *(CEdit*)GetDlgItem(IDC_EDIT2); }
00035   CEdit&  Edit3()
00036         { return *(CEdit*)GetDlgItem(IDC_EDIT3); }
00037   CEdit&  Edit4()
00038         { return *(CEdit*)GetDlgItem(IDC_EDIT4); }
00039
00040   BOOL OnInitDialog();
00041   //{{AFX_MSG(CWclsEditDlg)
00042   virtual void OnOK();
00043   afx_msg void OnIllegalChar();
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP();
00046 };
00047
00048 BOOL CWclsEditDlg::OnInitDialog()
00049 {
00050   // nothing special to do
00051   return TRUE;
00052 }
00053
00054 void CWclsEditDlg::OnOK()
00055 {
00056 #ifdef _DEBUG
00057   // dump results, normally you would do something with these
00058   CString s;
00059   Edit1().GetWindowText(s);
00060   TRACE1("edit1 = '%s'\n", s);
00061   Edit2().GetWindowText(s);
00062   TRACE1("edit2 = '%s'\n", s);
00063   Edit3().GetWindowText(s);
00064   TRACE1("edit3 = '%s'\n", s);
00065   Edit4().GetWindowText(s);
00066   TRACE1("edit4 = '%s'\n", s);
00067 #endif
00068
00069   EndDialog(IDOK);
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // Handle custom control notification here
00074
00075 BEGIN_MESSAGE_MAP(CWclsEditDlg, CDialog)
00076   //{{AFX_MSG_MAP(CWclsEditDlg)
00077   ON_CONTROL(PEN_ILLEGALCHAR, IDC_EDIT1, OnIllegalChar)
00078   ON_CONTROL(PEN_ILLEGALCHAR, IDC_EDIT2, OnIllegalChar)
00079   ON_CONTROL(PEN_ILLEGALCHAR, IDC_EDIT3, OnIllegalChar)
00080   ON_CONTROL(PEN_ILLEGALCHAR, IDC_EDIT4, OnIllegalChar)
00081   //}}AFX_MSG_MAP
00082 END_MESSAGE_MAP()
00083
00084
00085 void  CWclsEditDlg::OnIllegalChar()
00086 {
00087   TRACE0("Don't do that!\n");
00088   // add extra reporting here...
00089 }
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // Run the test
00093
00094 void CTestWindow::OnTestWndClassEdit()
00095 {
00096   TRACE0("running dialog containing WNDCLASS special edit items\n");
00097   if (!CParsedEdit::RegisterControlClass())
00098   {
00099     CString strMsg;
00100     strMsg.LoadString(IDS_WNDCLASS_NOT_REGISTERED);
00101     MessageBox(strMsg);
00102     return;
00103   }
00104   CWclsEditDlg dlg;
00105   dlg.DoModal();
00106 }
00107
00108
00109 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/resource.h Source File

  • ole
  • calcdriv

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by calcdriv.rc
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDP_UNABLE_TO_CREATE            3
00007 #define IDP_UNABLE_TO_SHOW              4
00008 #define IDP_OLE_INIT_FAILED             100
00009 #define IDC_EXPRESSION                  101
00010 #define IDD_CALCDRIV                    102
00011 #define IDC_GO                          103
00012 #define IDC_SINGLE_STEP                 104
00013 #define IDC_LAST_ACCUM                  105
00014 #define IDD_LAST_OPERAND                106
00015 #define IDC_REFRESH                     107
00016 #define IDD_LAST_OPERATOR               108
00017
00018 // Next default values for new objects
00019 //
00020 #ifdef APSTUDIO_INVOKED
00021 #ifndef APSTUDIO_READONLY_SYMBOLS
00022 #define _APS_NEXT_RESOURCE_VALUE        103
00023 #define _APS_NEXT_COMMAND_VALUE         32771
00024 #define _APS_NEXT_CONTROL_VALUE         108
00025 #define _APS_NEXT_SYMED_VALUE           101
00026 #endif
00027 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFindDlg Member List

This is the complete list of members for CFindDlg, including all inherited members.
CFindDlg(CWnd *pParent=NULL) | CFindDlg |
DoDataExchange(CDataExchange *pDX) | CFindDlg | [protected, virtual]
IDD enum value | CFindDlg |
m_bMatchCase | CFindDlg |
m_nDirection | CFindDlg |
m_szText | CFindDlg |
OnEditFindNext() | CFindDlg | [protected]
OnInitDialog() | CFindDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrive.cpp Source File

  • ole
  • ipdrive

ipdrive.cpp

Go to the documentation of this file.
00001 // ipdrive.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ipdrive.h"
00014
00015 #include "mainfrm.h"
00016 #include "ipdridoc.h"
00017 #include "ipdrivw.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDriveApp
00026
00027 BEGIN_MESSAGE_MAP(CDriveApp, CWinApp)
00028   //{{AFX_MSG_MAP(CDriveApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CDriveApp construction
00040
00041 CDriveApp::CDriveApp()
00042 {
00043   // TODO: add construction code here,
00044   // Place all significant initialization in InitInstance
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CDriveApp object
00049
00050 CDriveApp NEAR theApp;
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CDriveApp initialization
00054
00055 BOOL CDriveApp::InitInstance()
00056 {
00057   // Initialize OLE libraries
00058   if (!AfxOleInit())
00059   {
00060     AfxMessageBox(IDP_OLE_INIT_FAILED);
00061     return FALSE;
00062   }
00063
00064   // Standard initialization
00065   // If you are not using these features and wish to reduce the size
00066   //  of your final executable, you should remove from the following
00067   //  the specific initialization routines you do not need.
00068
00069   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00070
00071   // Register the application's document templates.  Document templates
00072   //  serve as the connection between documents, frame windows and views.
00073
00074   CSingleDocTemplate* pDocTemplate;
00075   pDocTemplate = new CSingleDocTemplate(
00076     IDR_MAINFRAME,
00077     RUNTIME_CLASS(CDriverDoc),
00078     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00079     RUNTIME_CLASS(CDriverView));
00080   AddDocTemplate(pDocTemplate);
00081
00082   // create a new (empty) document
00083   OnFileNew();
00084
00085   if (m_lpCmdLine[0] != '\0')
00086   {
00087     // TODO: add command line processing here
00088   }
00089
00090   return TRUE;
00091 }
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CAboutDlg dialog used for App About
00095
00096 class CAboutDlg : public CDialog
00097 {
00098 public:
00099   CAboutDlg();
00100
00101 // Dialog Data
00102   //{{AFX_DATA(CAboutDlg)
00103   enum { IDD = IDD_ABOUTBOX };
00104   //}}AFX_DATA
00105
00106 // Implementation
00107 protected:
00108   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00109   //{{AFX_MSG(CAboutDlg)
00110     // No message handlers
00111   //}}AFX_MSG
00112   DECLARE_MESSAGE_MAP()
00113 };
00114
00115 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00116 {
00117   //{{AFX_DATA_INIT(CAboutDlg)
00118   //}}AFX_DATA_INIT
00119 }
00120
00121 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00122 {
00123   CDialog::DoDataExchange(pDX);
00124   //{{AFX_DATA_MAP(CAboutDlg)
00125   //}}AFX_DATA_MAP
00126 }
00127
00128 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00129   //{{AFX_MSG_MAP(CAboutDlg)
00130     // No message handlers
00131   //}}AFX_MSG_MAP
00132 END_MESSAGE_MAP()
00133
00134 // App command to run the dialog
00135 void CDriveApp::OnAppAbout()
00136 {
00137   CAboutDlg aboutDlg;
00138   aboutDlg.DoModal();
00139 }
00140
00141 /////////////////////////////////////////////////////////////////////////////
00142 // CDriveApp commands
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemoDlg.cpp Source File

  • vc2008fp
  • PropSheetDemo

PropSheetDemoDlg.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "PropSheetDemo.h"
00003 #include "PropSheetDemoDlg.h"
00004 #include "MyPropertySheet.h"
00005
00006 #ifdef _DEBUG
00007 #define new DEBUG_NEW
00008 #undef THIS_FILE
00009 static char THIS_FILE[] = __FILE__;
00010 #endif
00011
00012 #define HEADER_HEIGHT 30
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CPropSheetDemoDlg dialog
00016
00017 CPropSheetDemoDlg::CPropSheetDemoDlg(CWnd* pParent /*=NULL*/)
00018   : CDialogEx(CPropSheetDemoDlg::IDD, pParent)
00019 {
00020   m_bHeader = FALSE;
00021
00022   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00023   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00024 }
00025
00026 void CPropSheetDemoDlg::DoDataExchange(CDataExchange* pDX)
00027 {
00028   CDialogEx::DoDataExchange(pDX);
00029   DDX_Check(pDX, IDC_HEADER, m_bHeader);
00030 }
00031
00032 BEGIN_MESSAGE_MAP(CPropSheetDemoDlg, CDialogEx)
00033   ON_WM_SYSCOMMAND()
00034   ON_WM_PAINT()
00035   ON_WM_QUERYDRAGICON()
00036   ON_BN_CLICKED(IDC_PROP_SHEET1, OnPropSheet1)
00037   ON_BN_CLICKED(IDC_PROP_SHEET2, OnPropSheet2)
00038   ON_BN_CLICKED(IDC_PROP_SHEET3, OnPropSheet3)
00039   ON_BN_CLICKED(IDC_PROP_SHEET4, OnPropSheet4)
00040   ON_BN_CLICKED(IDC_PROP_SHEET5, OnPropSheet5)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CPropSheetDemoDlg message handlers
00045
00046 BOOL CPropSheetDemoDlg::OnInitDialog()
00047 {
00048   CDialogEx::OnInitDialog();
00049
00050   // Add "About..." menu item to system menu.
00051
00052   // IDM_ABOUTBOX must be in the system command range.
00053   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00054   ASSERT(IDM_ABOUTBOX < 0xF000);
00055
00056   CMenu* pSysMenu = GetSystemMenu(FALSE);
00057   if (pSysMenu != NULL)
00058   {
00059     BOOL bValidString;
00060     CString strAboutMenu;
00061     bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
00062     if (!strAboutMenu.IsEmpty())
00063     {
00064       pSysMenu->AppendMenu(MF_SEPARATOR);
00065       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00066     }
00067   }
00068
00069   // Set the icon for this dialog.  The framework does this automatically
00070   //  when the application's main window is not a dialog
00071   SetIcon(m_hIcon, TRUE);     // Set big icon
00072   SetIcon(m_hIcon, FALSE);    // Set small icon
00073
00074   // TODO: Add extra initialization here
00075
00076   return TRUE;  // return TRUE  unless you set the focus to a control
00077 }
00078
00079 void CPropSheetDemoDlg::OnSysCommand(UINT nID, LPARAM lParam)
00080 {
00081   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00082   {
00083   }
00084   else
00085   {
00086     CDialogEx::OnSysCommand(nID, lParam);
00087   }
00088 }
00089
00090 // If you add a minimize button to your dialog, you will need the code below
00091 //  to draw the icon.  For MFC applications using the document/view model,
00092 //  this is automatically done for you by the framework.
00093
00094 void CPropSheetDemoDlg::OnPaint()
00095 {
00096   if (IsIconic())
00097   {
00098     CPaintDC dc(this); // device context for painting
00099
00100     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00101
00102     // Center icon in client rectangle
00103     int cxIcon = GetSystemMetrics(SM_CXICON);
00104     int cyIcon = GetSystemMetrics(SM_CYICON);
00105     CRect rect;
00106     GetClientRect(&rect);
00107     int x = (rect.Width() - cxIcon + 1) / 2;
00108     int y = (rect.Height() - cyIcon + 1) / 2;
00109
00110     // Draw the icon
00111     dc.DrawIcon(x, y, m_hIcon);
00112   }
00113   else
00114   {
00115     CDialogEx::OnPaint();
00116   }
00117 }
00118
00119 // The system calls this to obtain the cursor to display while the user drags
00120 //  the minimized window.
00121 HCURSOR CPropSheetDemoDlg::OnQueryDragIcon()
00122 {
00123   return (HCURSOR) m_hIcon;
00124 }
00125
00126 void CPropSheetDemoDlg::OnPropSheet1()
00127 {
00128   UpdateData();
00129
00130   CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_Tabs);
00131
00132   pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
00133   pPropSheet->DoModal();
00134
00135   delete pPropSheet;
00136 }
00137
00138 void CPropSheetDemoDlg::OnPropSheet2()
00139 {
00140   UpdateData();
00141
00142   CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_OutlookBar, IDB_ICONS_LARGE, 32);
00143
00144   pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
00145   pPropSheet->DoModal();
00146
00147   delete pPropSheet;
00148 }
00149
00150 void CPropSheetDemoDlg::OnPropSheet3()
00151 {
00152   UpdateData();
00153
00154   CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_Tree, IDB_TREE_ICONS, 16);
00155
00156   pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
00157   pPropSheet->DoModal();
00158
00159   delete pPropSheet;
00160 }
00161
00162 void CPropSheetDemoDlg::OnPropSheet4()
00163 {
00164   UpdateData();
00165
00166   CMyPropertySheet *pPropSheet = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_OneNoteTabs, IDB_ICONS_SMALL, 16);
00167
00168   pPropSheet->GetTab().EnableAutoColor();
00169   pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
00170   pPropSheet->DoModal();
00171
00172   delete pPropSheet;
00173 }
00174
00175 void CPropSheetDemoDlg::OnPropSheet5()
00176 {
00177   UpdateData();
00178
00179   CMyPropertySheet *pPropSheet  = new CMyPropertySheet(CMFCPropertySheet::PropSheetLook_List);
00180
00181   pPropSheet->EnablePageHeader(m_bHeader ? HEADER_HEIGHT : 0);
00182   pPropSheet->DoModal();
00183
00184   delete pPropSheet;
00185 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynaMenuView Member List

This is the complete list of members for CDynaMenuView, including all inherited members.
CDynaMenuView() | CDynaMenuView | [protected]
GetDocument() | CDynaMenuView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CDynaMenuView | [protected, virtual]
OnDraw(CDC *pDC) | CDynaMenuView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CDynaMenuView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CDynaMenuView | [protected, virtual]
~CDynaMenuView() | CDynaMenuView | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/rectdlg.cpp Source File

  • ole
  • drawcli

rectdlg.cpp

Go to the documentation of this file.
00001 // rectdlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "drawcli.h"
00015 #include "rectdlg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CRectDlg dialog
00024
00025 CRectDlg::CRectDlg(CWnd* /*pParent = NULL*/)
00026   : CPropertyPage(CRectDlg::IDD)
00027 {
00028   //{{AFX_DATA_INIT(CRectDlg)
00029   m_bNoFill = FALSE;
00030   m_penSize = 0;
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 void CRectDlg::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CRectDlg)
00038   DDX_Control(pDX, IDC_SPIN1, m_SpinCtrl);
00039   DDX_Check(pDX, IDC_NOFILL, m_bNoFill);
00040   DDX_Text(pDX, IDC_WEIGHT, m_penSize);
00041   DDV_MinMaxUInt(pDX, m_penSize, 0, 100);
00042   //}}AFX_DATA_MAP
00043 }
00044
00045 BEGIN_MESSAGE_MAP(CRectDlg, CDialog)
00046   //{{AFX_MSG_MAP(CRectDlg)
00047   //}}AFX_MSG_MAP
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CRectDlg message handlers
00052
00053 BOOL CRectDlg::OnInitDialog()
00054 {
00055   CDialog::OnInitDialog();
00056
00057   m_SpinCtrl.SetRange(0, 100);
00058   m_SpinCtrl.SetBase(10);
00059   m_SpinCtrl.SetPos(1);
00060   return TRUE;
00061 }
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/regview.cpp Source File

  • ole
  • oleview

regview.cpp

Go to the documentation of this file.
00001 // regview.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "oleview.h"
00015 #include "regview.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 BOOL RegToListBox( CTreeCtrl* pTree, const CString& strKey, HKEY hk, HTREEITEM htreeParent ) ;
00023 HICON GetIconFromReg( HKEY hk, LPTSTR szKey ) ;
00024
00025 int const MAX_KEYLEN    =   256 ;
00026 int const MAX_VALLEN    =   (_MAX_PATH + MAX_KEYLEN) ;
00027
00028 class CRegEntry
00029 {
00030 public:
00031   CRegEntry( const CString& rstrKey,  const CString& rstrValue ) ;
00032   virtual ~CRegEntry() ;
00033
00034 public:
00035   CString     m_strKey ;
00036   CString     m_strValue ;
00037   TCHAR*      m_pszText ;
00038 } ;
00039
00040 CRegEntry::CRegEntry( const CString& rstrKey,  const CString& rstrValue )
00041 {
00042   m_strKey = rstrKey ;
00043   m_strValue = rstrValue ;
00044   m_pszText = NULL ;
00045 }
00046
00047 CRegEntry::~CRegEntry( )
00048 {
00049   if (m_pszText != NULL)
00050     delete []m_pszText ;
00051   m_pszText = NULL ;
00052 }
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CRegistryView
00056
00057 IMPLEMENT_DYNCREATE(CRegistryView, CFormView)
00058
00059 CRegistryView::CRegistryView()
00060   : CFormView(CRegistryView::IDD)
00061 {
00062   //{{AFX_DATA_INIT(CRegistryView)
00063   //}}AFX_DATA_INIT
00064 }
00065
00066 #ifdef _DEBUG
00067
00068 COle2ViewDoc* CRegistryView::GetDocument() // non-debug version is inline
00069 {
00070   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COle2ViewDoc)));
00071   return (COle2ViewDoc*) m_pDocument;
00072 }
00073
00074 #endif //_DEBUG
00075
00076
00077 CRegistryView::~CRegistryView()
00078 {
00079 }
00080
00081 void CRegistryView::DoDataExchange(CDataExchange* pDX)
00082 {
00083   CFormView::DoDataExchange(pDX);
00084   //{{AFX_DATA_MAP(CRegistryView)
00085   DDX_Control(pDX, IDC_OBJECTNAME, m_Name);
00086   DDX_Control(pDX, IDC_OBJECTCLSID, m_CLSID);
00087   DDX_Control(pDX, IDC_OBJICON, m_icon);
00088   DDX_Control(pDX, IDC_TREEVIEW, m_tree);
00089   //}}AFX_DATA_MAP
00090 }
00091
00092
00093 BEGIN_MESSAGE_MAP(CRegistryView, CFormView)
00094   //{{AFX_MSG_MAP(CRegistryView)
00095   ON_WM_SIZE()
00096   ON_BN_CLICKED(IDC_UNREGISTER, OnUnregister)
00097   ON_NOTIFY(TVN_ITEMEXPANDING, IDC_TREEVIEW, OnTreeViewItemExpanding)
00098   ON_NOTIFY(TVN_GETDISPINFO, IDC_TREEVIEW, OnGetDispInfoTreeView)
00099   ON_NOTIFY(TVN_SETDISPINFO, IDC_TREEVIEW, OnSetDispInfoTreeView)
00100   ON_NOTIFY(TVN_DELETEITEM, IDC_TREEVIEW, OnDeleteItemTreeView)
00101   //}}AFX_MSG_MAP
00102 END_MESSAGE_MAP()
00103
00104
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CRegistryView diagnostics
00108
00109 #ifdef _DEBUG
00110 void CRegistryView::AssertValid() const
00111 {
00112   CFormView::AssertValid();
00113 }
00114
00115 void CRegistryView::Dump(CDumpContext& dc) const
00116 {
00117   CFormView::Dump(dc);
00118 }
00119 #endif //_DEBUG
00120
00121 /////////////////////////////////////////////////////////////////////////////
00122 // CRegistryView message handlers
00123
00124 void CRegistryView::OnSize(UINT nType, int cx, int cy)
00125 {
00126   CFormView::OnSize(nType, cx, cy);
00127
00128   if (m_tree.GetSafeHwnd())
00129   {
00130     CRect rc ;
00131     m_tree.GetWindowRect( &rc ) ;
00132     ScreenToClient( &rc ) ;
00133     m_tree.SetWindowPos( NULL, 4, rc.top, cx-8, cy - rc.top - 4,
00134               SWP_NOACTIVATE|SWP_NOZORDER ) ;
00135   }
00136 }
00137
00138 void CRegistryView::OnUnregister()
00139 {
00140   // TODO: Add your control notification handler code here
00141
00142 }
00143
00144 void CRegistryView::OnInitialUpdate()
00145 {
00146   CFormView::OnInitialUpdate();
00147
00148   CRect rc ;
00149   CRect rcClient ;
00150   GetWindowRect( &rcClient ) ;
00151   //GetParent()->ScreenToClient( &rcClient ) ;
00152   m_tree.GetWindowRect( &rc ) ;
00153   ScreenToClient( &rc ) ;
00154
00155   m_tree.SetWindowPos( NULL, 4, rc.top, rcClient.Width() - 8,
00156              rcClient.Height() - rc.top - 4,
00157              SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOZORDER ) ;
00158
00159   m_tree.SetFocus() ;
00160
00161   m_tree.SetIndent( 0 ) ;
00162
00163   SetScrollSizes( MM_TEXT, CSize(1,1) ) ;
00164 }
00165
00166 void CRegistryView::OnUpdate(CView* /* pSender */, LPARAM lHint, CObject* /*pHint*/)
00167 {
00168   if (lHint & UPD_NOINTERFACEVIEW || lHint & UPD_NOOBJECTVIEW)
00169     return ;
00170
00171   COle2ViewDoc* pDoc = GetDocument() ;
00172
00173   BeginWaitCursor() ;
00174   m_tree.SetRedraw(FALSE) ;
00175   m_tree.DeleteAllItems() ;
00176   if (IsEqualCLSID( pDoc->m_clsidCur, CLSID_NULL ))
00177   {
00178     m_Name.SetWindowText("") ;
00179     m_CLSID.SetWindowText("") ;
00180     m_icon.SetIcon( theApp.LoadIcon( IDR_MAINFRAME ) ) ;
00181     m_tree.SetRedraw(TRUE) ;
00182     EndWaitCursor() ;
00183     return ;
00184   }
00185
00186   // Fill the listbox with useful info about the class
00187   //
00188   HICON   hicon = NULL ;
00189   HKEY    hk ;
00190
00191   OLECHAR szOleCLSID[64];
00192   ::StringFromGUID2( pDoc->m_clsidCur, szOleCLSID,
00193     sizeof(szOleCLSID)/sizeof(OLECHAR) ) ;
00194   COLE2T lpszCLSID(szOleCLSID);
00195   m_CLSID.SetWindowText( lpszCLSID ) ;
00196   m_Name.SetWindowText( pDoc->m_szObjectCur ) ;
00197
00198   TCHAR           szKey[MAX_VALLEN] ;
00199   TCHAR           szBuf[MAX_VALLEN] ;
00200
00201   TV_INSERTSTRUCT tvis ;
00202   tvis.hParent = TVI_ROOT ;
00203   tvis.hInsertAfter = TVI_LAST ;
00204   tvis.item.mask = TVIF_TEXT | TVIF_PARAM ;
00205
00206   if (pDoc->m_fTypeLib)
00207   {
00208     // HKEY_CLASSES_ROOT\TypeLib
00209     _stprintf_s( szBuf, MAX_VALLEN, _T("TypeLib\\%s"), lpszCLSID ) ;
00210     if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hk) == ERROR_SUCCESS)
00211     {
00212       LONG cb ;
00213       cb = sizeof(szBuf) ;
00214       RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)_T("TypeLib"), szBuf, &cb) ;
00215       tvis.hParent = TVI_ROOT ;
00216       _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("TypeLib"), (LPCTSTR)szBuf ) ;
00217       tvis.item.pszText = szKey ;
00218       #pragma warning(suppress: 6014) // unexpected prefast leaking memory warning
00219       tvis.item.lParam = (LPARAM)new CRegEntry( _T("TypeLib"), szBuf ) ;
00220       HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
00221       RegToListBox( &m_tree, (LPTSTR)lpszCLSID, hk, htree ) ;
00222       m_tree.Expand( htree, TVE_EXPAND ) ;
00223       m_icon.SetIcon( theApp.LoadIcon( IDI_AUTOMATION ) ) ;
00224
00225       RegCloseKey( hk ) ;
00226     }
00227     else
00228       m_icon.SetIcon( theApp.LoadIcon( IDI_NOICON ) ) ;
00229   }
00230   else if (pDoc->m_fInterface)
00231   {
00232     // HKEY_CLASSES_ROOT\Interface
00233     _stprintf_s( szBuf, MAX_VALLEN, _T("Interface\\%s"), lpszCLSID ) ;
00234     if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hk) == ERROR_SUCCESS)
00235     {
00236       LONG cb = sizeof(szBuf) ;
00237       RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)_T("Interface"), szBuf, &cb) ;
00238
00239       tvis.hParent = TVI_ROOT ;
00240       _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("Interface"), (LPCTSTR)szBuf ) ;
00241       tvis.item.pszText = szKey ;
00242       tvis.item.lParam = (LPARAM)new CRegEntry( _T("Interface"), szBuf ) ;
00243       HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
00244       RegToListBox( &m_tree, (LPTSTR) lpszCLSID, hk, htree ) ;
00245       m_tree.Expand( htree, TVE_EXPAND ) ;
00246
00247       cb = sizeof(szBuf) ;
00248       if (RegQueryValue( hk, (LPTSTR)_T("BaseInterface"), szBuf, &cb) == ERROR_SUCCESS &&
00249         *szBuf != '\0')
00250       {
00251         HKEY hk2 ;
00252         if (RegOpenKey( HKEY_CLASSES_ROOT, CString("Interface\\") + szBuf, &hk2) == ERROR_SUCCESS)
00253         {
00254           RegToListBox( &m_tree, szBuf, hk2, htree ) ;
00255           RegCloseKey( hk2 ) ;
00256         }
00257       }
00258
00259       cb = sizeof(szBuf) ;
00260       LONG cb2 = sizeof(szBuf) ;
00261       if (RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid32"), szBuf, &cb) == ERROR_SUCCESS ||
00262         RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid"), szBuf, &cb2) == ERROR_SUCCESS)
00263       {
00264         cb = sizeof(szBuf) ;
00265         *szBuf = '\0' ;
00266         RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"CLSID", szBuf, &cb) ;
00267         _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("CLSID"), (LPCTSTR)szBuf ) ;
00268         tvis.item.pszText = szKey ;
00269         tvis.item.lParam = (LPARAM)new CRegEntry( "CLSID", szBuf ) ;
00270         HTREEITEM htreeCLSID = m_tree.InsertItem( &tvis ) ;
00271         HKEY hk2 ;
00272         if (RegOpenKey( HKEY_CLASSES_ROOT, "CLSID", &hk2) == ERROR_SUCCESS)
00273         {
00274           cb = sizeof(szBuf) ;
00275           if (RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid32"), szBuf, &cb) == ERROR_SUCCESS)
00276           {
00277             HKEY hk3 ;
00278             if (RegOpenKey( hk2, szBuf, &hk3) == ERROR_SUCCESS)
00279               RegToListBox( &m_tree, szBuf, hk3, htreeCLSID ) ;
00280             RegCloseKey( hk3 ) ;
00281           }
00282
00283           cb = sizeof(szKey) ;
00284           if (RegQueryValue( hk, (LPTSTR)_T("ProxyStubClsid"), szKey, &cb) == ERROR_SUCCESS)
00285           {
00286             if (lstrcmpi(szKey,szBuf) != 0)
00287             {
00288               HKEY hk3 ;
00289               if (RegOpenKey( hk2, szKey, &hk3) == ERROR_SUCCESS)
00290                 RegToListBox( &m_tree, szKey, hk3, htreeCLSID ) ;
00291               RegCloseKey( hk3 ) ;
00292             }
00293           }
00294
00295           RegCloseKey( hk2 ) ;
00296         }
00297         m_tree.Expand( htreeCLSID, TVE_EXPAND ) ;
00298       }
00299
00300       cb = sizeof(szBuf) ;
00301       if (RegQueryValue( hk, (LPTSTR)_T("TypeLib"), szBuf, &cb) == ERROR_SUCCESS)
00302       {
00303         _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("TypeLib"), (LPCTSTR)szBuf ) ;
00304         tvis.item.pszText = szKey ;
00305         tvis.item.lParam = (LPARAM)new CRegEntry( "TypeLib", szBuf ) ;
00306         htree = m_tree.InsertItem( &tvis ) ;
00307
00308         HKEY hk2 ;
00309         if (RegOpenKey( HKEY_CLASSES_ROOT, CString("TypeLib\\") + szBuf, &hk2) == ERROR_SUCCESS)
00310         {
00311           RegToListBox( &m_tree, szBuf, hk2, htree ) ;
00312           RegCloseKey( hk2 ) ;
00313         }
00314         m_tree.Expand( htree, TVE_EXPAND ) ;
00315       }
00316
00317       RegCloseKey( hk ) ;
00318
00319       m_icon.SetIcon( theApp.LoadIcon( IDI_INTERFACE ) ) ;
00320     }
00321     else
00322       m_icon.SetIcon( theApp.LoadIcon( IDI_NOICON ) ) ;
00323   }
00324   else
00325   {
00326     LONG cb = sizeof( szBuf );
00327     *szBuf = '\0' ;
00328     RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"CLSID", szBuf, &cb) ;
00329     _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("CLSID"), (LPCTSTR)szBuf ) ;
00330     tvis.item.pszText = szKey ;
00331     tvis.item.lParam = (LPARAM)new CRegEntry( "CLSID", szBuf) ;
00332     HTREEITEM htreeCLSID = m_tree.InsertItem( &tvis ) ;
00333
00334     _stprintf_s(szKey, MAX_VALLEN, _T("CLSID\\%s"), lpszCLSID ) ;
00335     if (RegOpenKey( HKEY_CLASSES_ROOT, szKey, &hk) == ERROR_SUCCESS)
00336     {
00337       TCHAR    szValue[MAX_VALLEN] ;
00338
00339       cb = sizeof( szBuf );
00340       if (RegQueryValue( hk, (LPTSTR)_T("DefaultIcon"), szValue, &cb) == ERROR_SUCCESS)
00341       {
00342         LPTSTR p ;
00343         int   nIndex = 0 ;
00344
00345         p = PointerToNthField( szValue, 2, ',' ) ;
00346         if (p && *p)
00347         {
00348           *(p-1) = '\0' ;
00349           nIndex = (int)*p - (int)'0' ;
00350         }
00351         if (*szValue == '"')
00352         {
00353           _tcscpy_s( szValue, MAX_VALLEN, szValue+1 ) ;
00354           p = strrchr( szValue, '"' ) ;
00355           if (p) *p = '\0' ;
00356         }
00357         hicon = ExtractIcon( AfxGetInstanceHandle(), szValue, nIndex ) ;
00358       }
00359
00360       if ((INT_PTR)hicon <= 1)
00361       {
00362         // try local server
00363         hicon = GetIconFromReg( hk, _T("LocalServer32") ) ;
00364         if ((INT_PTR)hicon <= 1)
00365           hicon = GetIconFromReg( hk, _T("LocalServer") ) ;
00366       }
00367
00368       if ((INT_PTR)hicon <= 1)
00369       {
00370         // try inproc server
00371         hicon = GetIconFromReg( hk, _T("InprocServer32") ) ;
00372         if ((INT_PTR)hicon <= 1)
00373           hicon = GetIconFromReg( hk, _T("InprocServer") ) ;
00374       }
00375
00376       if ((INT_PTR)hicon <= 1)
00377       {
00378         // try inproc handler
00379         hicon = GetIconFromReg( hk, _T("InprocHandler32") ) ;
00380         if ((INT_PTR)hicon <= 1)
00381           hicon = GetIconFromReg( hk, _T("InprocHandler") ) ;
00382       }
00383
00384       // Now fill list box with all other stuff in the HKEY_CLASSES_ROOT\CLSID key
00385       //
00386       RegToListBox( &m_tree, (LPTSTR) lpszCLSID, hk, htreeCLSID ) ;
00387       m_tree.Expand( htreeCLSID, TVE_EXPAND ) ;
00388
00389       HKEY hkNext ;
00390
00391       // HKEY_CLASSES_ROOT\ProgID\ key
00392       cb = sizeof( szValue ) ;
00393       if (RegQueryValue( hk, (LPTSTR)_T("ProgID"), szValue, &cb) != ERROR_SUCCESS)
00394         *szValue = '\0' ;
00395       if (*szValue && (RegOpenKey( HKEY_CLASSES_ROOT, szValue, &hkNext) == ERROR_SUCCESS))
00396       {
00397         cb = sizeof(szKey) ;
00398         RegToListBox( &m_tree, szValue, hkNext, TVI_ROOT ) ;
00399
00400         if ((INT_PTR)hicon <= 1)
00401         {
00402           szBuf[0] = '\0' ;
00403           cb = sizeof(szBuf) ;
00404           if (RegQueryValue( hkNext, (LPTSTR)_T("Protocol\\StdFileEditing\\Server"), szBuf, &cb ) == ERROR_SUCCESS)
00405           {
00406             LPTSTR p ;
00407             if (*szBuf == '"')
00408             {
00409               _tcscpy_s( szBuf, MAX_VALLEN, szBuf+1 ) ;
00410               p = strrchr( szBuf, '"' ) ;
00411               if (p) *p = '\0' ;
00412             }
00413
00414             hicon = ExtractIcon( AfxGetInstanceHandle(), szBuf, 0 ) ;
00415           }
00416
00417         }
00418
00419         RegCloseKey( hkNext ) ;
00420       }
00421
00422       _stprintf_s(szBuf, MAX_VALLEN, _T("FileType\\%s"), lpszCLSID ) ;
00423       if (lpszCLSID && (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkNext) == ERROR_SUCCESS))
00424       {
00425         tvis.hParent = TVI_ROOT ;
00426         *szBuf = '\0' ;
00427         cb = sizeof(szBuf) ;
00428         RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"FileType", szBuf, &cb) ;
00429         _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("FileType"), (LPCTSTR)szBuf ) ;
00430         tvis.item.pszText = szKey ;
00431         tvis.item.lParam = (LPARAM)new CRegEntry( "FileType", szBuf) ;
00432         HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
00433         RegToListBox( &m_tree, (LPTSTR) lpszCLSID, hkNext, htree ) ;
00434         m_tree.Expand( htree, TVE_EXPAND ) ;
00435         RegCloseKey( hkNext ) ;
00436       }
00437
00438       // HKEY_CLASSES_ROOT\TypeLib
00439       cb = sizeof( szValue ) ;
00440       if (RegQueryValue( hk, (LPTSTR)_T("TypeLib"), szValue, &cb) == ERROR_SUCCESS)
00441       {
00442         _stprintf_s(szBuf, MAX_VALLEN, _T("TypeLib\\%s"), szValue ) ;
00443         if (RegOpenKey( HKEY_CLASSES_ROOT, szBuf, &hkNext) == ERROR_SUCCESS)
00444         {
00445           tvis.hParent = TVI_ROOT ;
00446           *szBuf = '\0' ;
00447           cb = sizeof(szBuf) ;
00448           RegQueryValue( HKEY_CLASSES_ROOT, (LPTSTR)"TypeLib", szBuf, &cb) ;
00449
00450           _stprintf_s(szKey, MAX_VALLEN, _T("%s = %s"), (LPCTSTR)_T("TypeLib"), (LPCTSTR)szBuf ) ;
00451           tvis.item.pszText = szKey ;
00452           tvis.item.lParam = (LPARAM)new CRegEntry( "TypeLib", szBuf) ;
00453           HTREEITEM htree = m_tree.InsertItem( &tvis ) ;
00454           RegToListBox( &m_tree, szValue, hkNext, htree ) ;
00455           m_tree.Expand( htree, TVE_EXPAND ) ;
00456           RegCloseKey( hkNext ) ;
00457         }
00458       }
00459
00460       RegCloseKey( hk ) ;
00461
00462       if ((INT_PTR)hicon > 1)
00463         m_icon.SetIcon( hicon ) ;
00464       else
00465         m_icon.SetIcon( theApp.LoadIcon( IDI_NOICON ) ) ;
00466
00467       m_tree.EnsureVisible( htreeCLSID ) ;
00468     }
00469   }
00470
00471   m_tree.SetRedraw(TRUE) ;
00472   EndWaitCursor() ;
00473
00474 }
00475
00476 BOOL RegToListBox( CTreeCtrl* pTree, const CString& strKey, HKEY hk, HTREEITEM htreeParent )
00477 {
00478   TCHAR szKey[MAX_KEYLEN];
00479   TCHAR szValue[MAX_VALLEN];
00480   TCHAR szBuf[MAX_VALLEN + 4];
00481   LONG  cb ;
00482   DWORD dwIndex ;
00483
00484   TRY
00485   {
00486     TV_INSERTSTRUCT tvis ;
00487     tvis.hParent = htreeParent ;
00488     tvis.hInsertAfter = TVI_LAST ;
00489     tvis.item.mask = TVIF_TEXT | TVIF_PARAM ;
00490
00491     cb = MAX_KEYLEN ;
00492     RegQueryValue( hk, NULL, szValue, &cb) ;
00493     _stprintf_s( szBuf, MAX_VALLEN + 4, _T("%s = %s"), (LPCTSTR)strKey, (LPCTSTR)szValue ) ;
00494     tvis.item.pszText = szBuf ;
00495     #pragma warning(suppress: 6014)
00496     tvis.item.lParam = (LPARAM)new CRegEntry( strKey, szValue ) ;
00497     HTREEITEM htree = pTree->InsertItem( &tvis ) ;
00498
00499     for ( dwIndex = 0 ;
00500         RegEnumKey( hk, dwIndex, szKey, MAX_KEYLEN) == ERROR_SUCCESS ;
00501         ++dwIndex )
00502     {
00503       cb = MAX_KEYLEN ;
00504       *szValue = '\0' ;
00505       RegQueryValue( hk, (LPTSTR)szKey, szValue, &cb) ;
00506       HKEY hkNext ;
00507       if (RegOpenKey( hk, szKey, &hkNext) == ERROR_SUCCESS)
00508       {
00509         RegToListBox( pTree, szKey, hkNext, htree ) ;
00510         RegCloseKey( hkNext ) ;
00511       }
00512     }
00513
00514     pTree->Expand( htree, TVE_EXPAND ) ;
00515   }
00516   CATCH(CException, pException)
00517   {
00518     return FALSE ;
00519   }
00520   END_CATCH;
00521
00522   return TRUE ;
00523 }
00524
00525 HICON GetIconFromReg( HKEY hk, LPTSTR szKey )
00526 {
00527   TCHAR szValue[MAX_VALLEN] ;
00528   LONG cb = MAX_VALLEN ;
00529   if (RegQueryValue( hk, szKey, szValue, &cb) == ERROR_SUCCESS)
00530   {
00531     LPTSTR p = szValue + lstrlen( szValue ) - 1 ;
00532     if (p && *p == ' ')
00533       *p = '\0' ;
00534     if (*szValue == '"')
00535     {
00536       _tcscpy_s( szValue, MAX_VALLEN, szValue+1 ) ;
00537       p = strrchr( szValue, '"' ) ;
00538       if (p) *p = '\0' ;
00539     }
00540
00541     return ExtractIcon( AfxGetInstanceHandle(), szValue, 0 ) ;
00542   }
00543   else
00544     return (HICON)-1 ;
00545 }
00546
00547 void CRegistryView::OnTreeViewItemExpanding(NMHDR* pNMHDR, LRESULT* pResult)
00548 {
00549   NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00550
00551   if (pNMTreeView->action == TVE_COLLAPSE)
00552     *pResult = 1 ; // prevent collapse
00553   else
00554     *pResult = 0 ;
00555 }
00556
00557 void CRegistryView::OnGetDispInfoTreeView(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00558 {
00559 /*
00560   TV_DISPINFO * pdispinfo = (TV_DISPINFO*)pNMHDR;
00561   CRegEntry* pentry = (CRegEntry*)pdispinfo->item.lParam ;
00562   if (pentry)
00563   {
00564     //if (pentry->m_pszText)
00565     //{
00566     //    delete []pentry->m_pszText ;
00567     //    pentry->m_pszText = NULL ;
00568     //}
00569     if (pdispinfo->item.mask & TVIF_TEXT)
00570     {
00571       if (pentry->m_pszText)
00572         pdispinfo->item.pszText = pentry->m_pszText ;
00573       else
00574       {
00575         pentry->m_pszText = new TCHAR[pentry->m_strKey.GetLength() + pentry->m_strKey.GetLength() + 4] ;
00576         wsprintf( pentry->m_pszText, _T("%s = %s"), (LPCTSTR)pentry->m_strKey, (LPCTSTR)pentry->m_strValue ) ;
00577         pdispinfo->item.pszText = pentry->m_pszText ;
00578         pdispinfo->item.mask = TVIF_TEXT ;
00579       }
00580     }
00581   }
00582 */
00583   *pResult = 0;
00584 }
00585
00586 void CRegistryView::OnSetDispInfoTreeView(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00587 {
00588   // TV_DISPINFO * pdispinfo = (TV_DISPINFO*)pNMHDR;
00589   // TODO: Add your control notification handler code here
00590
00591   *pResult = 0;
00592 }
00593
00594 void CRegistryView::OnDeleteItemTreeView(NMHDR* pNMHDR, LRESULT* pResult)
00595 {
00596   NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00597
00598   if (pNMTreeView->itemOld.lParam)
00599   {
00600     delete (CRegEntry*)pNMTreeView->itemOld.lParam;
00601   }
00602
00603   *pResult = 0;
00604 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapps.h Source File

  • general
  • snapvw

snapps.h

Go to the documentation of this file.
00001 // File: snapps.h
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_SNAPPS_H__E2FD70FC_605F_11D1_A346_00C04FD91807__INCLUDED_)
00011 #define AFX_SNAPPS_H__E2FD70FC_605F_11D1_A346_00C04FD91807__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // SnapPs.h : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CSnapPropertySheet
00021
00022 class CSnapPropertySheet : public CPropertySheet
00023 {
00024   DECLARE_DYNAMIC(CSnapPropertySheet)
00025
00026 // Construction
00027 public:
00028   CSnapPropertySheet() : CPropertySheet() { }
00029   CSnapPropertySheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00030   CSnapPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00031
00032 // Attributes
00033 public:
00034
00035 // Operations
00036 public:
00037
00038 // Overrides
00039   // ClassWizard generated virtual function overrides
00040   //{{AFX_VIRTUAL(CSnapPropertySheet)
00041   public:
00042   virtual BOOL PreTranslateMessage(MSG* pMsg);
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046 public:
00047   virtual ~CSnapPropertySheet();
00048
00049   // Generated message map functions
00050 protected:
00051   //{{AFX_MSG(CSnapPropertySheet)
00052     // NOTE - the ClassWizard will add and remove member functions here.
00053   //}}AFX_MSG
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058
00059 //{{AFX_INSERT_LOCATION}}
00060 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00061
00062 #endif // !defined(AFX_SNAPPS_H__E2FD70FC_605F_11D1_A346_00C04FD91807__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CZoomDlg Member List

This is the complete list of members for CZoomDlg, including all inherited members.
CZoomDlg(CWnd *pParent=NULL) | CZoomDlg |
DoDataExchange(CDataExchange *pDX) | CZoomDlg | [protected, virtual]
IDD enum value | CZoomDlg |
m_zoomX | CZoomDlg |
m_zoomY | CZoomDlg |
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoDoc.h Source File

  • vc2008fp
  • StatusBarDemo

StatusBarDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CStatusBarDemoDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CStatusBarDemoDoc();
00017   DECLARE_DYNCREATE(CStatusBarDemoDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CStatusBarDemoDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMFCBindView Member List

This is the complete list of members for CMFCBindView, including all inherited members.
CMFCBindView() | CMFCBindView | [protected]
GetDocument() | CMFCBindView | [inline]
IsSelected(const CObject *pDocItem) const | CMFCBindView | [protected, virtual]
m_pSelection | CMFCBindView |
OnCancelEditCntr() | CMFCBindView | [protected]
OnDestroy() | CMFCBindView | [protected]
OnDraw(CDC *pDC) | CMFCBindView | [virtual]
OnInitialUpdate() | CMFCBindView |
OnInsertObject() | CMFCBindView | [protected]
OnSetFocus(CWnd *pOldWnd) | CMFCBindView | [protected]
OnSize(UINT nType, int cx, int cy) | CMFCBindView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CMFCBindView | [virtual]
~CMFCBindView() | CMFCBindView | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

inproc::IVariantAssoc Member List

This is the complete list of members for inproc::IVariantAssoc, including all inherited members.
id inproc::IVariantAssoc
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVariantMap Member List

This is the complete list of members for CVariantMap, including all inherited members.
CVariantMap() | CVariantMap | [protected]
Get_NewEnum() | CVariantMap |
GetCount() | CVariantMap | [protected]
GetCount() | CVariantMap |
GetI1() | CVariantMap |
GetI2() | CVariantMap | [protected]
GetI2() | CVariantMap |
GetItem(const VARIANT FAR &from) | CVariantMap | [protected]
GetItem(const VARIANT &from) | CVariantMap |
GetNewEnum() | CVariantMap | [protected]
GetStr1() | CVariantMap |
GetStr2() | CVariantMap | [protected]
GetStr2() | CVariantMap |
IsEmpty() | CVariantMap | [protected]
IsEmpty() | CVariantMap |
m_i1 | CVariantMap | [protected]
m_i2 | CVariantMap |
m_map | CVariantMap | [protected]
m_str1 | CVariantMap | [protected]
m_str2 | CVariantMap |
OnFinalRelease() | CVariantMap | [virtual]
RemoveAll() | CVariantMap | [protected]
RemoveAll() | CVariantMap |
RemoveKey(const VARIANT FAR &key) | CVariantMap | [protected]
RemoveKey(const VARIANT &key) | CVariantMap |
SetAt(const VARIANT FAR &from, const VARIANT FAR &to) | CVariantMap | [protected]
SetAt(const VARIANT &from, const VARIANT &to) | CVariantMap |
SetCount(long) | CVariantMap |
SetI1(long) | CVariantMap |
SetI2(long nNewValue) | CVariantMap | [protected]
SetI2(long) | CVariantMap |
SetStr1(LPCTSTR) | CVariantMap |
SetStr2(LPCTSTR lpszNewValue) | CVariantMap | [protected]
SetStr2(LPCTSTR) | CVariantMap |
~CVariantMap() | CVariantMap | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/threads.cpp Source File

  • advanced
  • mutexes

threads.cpp

Go to the documentation of this file.
00001 // threads.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // This sample application is derived from the Mutex application
00013 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00014 // (Microsoft Press).  See the book for more information about Win32
00015 // programming topics, including thread synchronization.
00016
00017 #include "stdafx.h"
00018 #include "mutexes.h"
00019 #include "mutexdlg.h"
00020 #include "threads.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 IMPLEMENT_DYNCREATE(CExampleThread, CWinThread)
00028
00029 CExampleThread::CExampleThread()
00030 {
00031   m_bDone = FALSE;
00032   m_pOwner = NULL;
00033   m_bAutoDelete = FALSE;
00034 }
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CCounterThread
00038
00039 IMPLEMENT_DYNCREATE(CCounterThread, CExampleThread)
00040
00041 CCounterThread::CCounterThread()
00042 {
00043 }
00044
00045 CCounterThread::~CCounterThread()
00046 {
00047 }
00048
00049 BOOL CCounterThread::InitInstance()
00050 {
00051   // TODO:  perform and per-thread initialization here
00052   return TRUE;
00053 }
00054
00055 int CCounterThread::Run()
00056 {
00057   BOOL fSyncChecked;
00058   unsigned int nNumber;
00059
00060   if (m_pOwner == NULL)
00061     return -1;
00062
00063   CSingleLock sLock(&(m_pOwner->m_mutex));
00064
00065   while (!m_bDone)
00066   {
00067     // Get the status of the Synchronize
00068     // check box and save it.
00069
00070     fSyncChecked = m_pOwner->IsDlgButtonChecked(IDC_SYNCHRONIZE);
00071
00072     // If the user wants us synchronized, do it!
00073     if (fSyncChecked)
00074       sLock.Lock();
00075
00076     VERIFY( _stscanf_s((LPCTSTR) m_pOwner->m_strNumber, _T("%d"), &nNumber) == 1 );
00077     nNumber++;
00078
00079     m_pOwner->m_strNumber.SetAt(0,L'\0');
00080     int nCurrentDigitPos=0;
00081     while (nNumber != 0)
00082     {
00083       m_pOwner->m_strNumber.ReleaseBufferSetLength(nCurrentDigitPos+1);
00084       m_pOwner->m_strNumber.SetAt(nCurrentDigitPos,(TCHAR) ('0' + nNumber%10));
00085
00086       // A call to Sleep() here tells the system that we want
00087       // to relinquis the remainder of our time slice to
00088       // another thread.  this call is needed for
00089       // single-CPU systems so that the results of the
00090       // synchronization or lack thereof are obvious.
00091       // Normally, your programs would NOT call Sleep() here.
00092
00093       Sleep(0);
00094
00095       // get ready to get the next digit.
00096       nNumber /= 10;
00097       ++nCurrentDigitPos;
00098     }
00099
00100     // Characters were generated in reverse order,
00101     // reverse the string
00102     m_pOwner->m_strNumber.MakeReverse();
00103
00104     if (fSyncChecked)
00105     {
00106     // If the user wants synchronization, do it.
00107       sLock.Unlock();
00108     }
00109
00110     // If the user wants to display something
00111     // after each iteration, do it.
00112
00113     if (m_pOwner->IsDlgButtonChecked(IDC_SHOWCNTRTHRD))
00114       m_pOwner->AddToListBox(_T("Cntr: Increment"));
00115   }
00116
00117   m_pOwner->PostMessage(WM_CLOSE, 0, 0L);
00118   return 0;
00119 }
00120
00121 BEGIN_MESSAGE_MAP(CCounterThread, CWinThread)
00122   //{{AFX_MSG_MAP(CCounterThread)
00123     // NOTE - the ClassWizard will add and remove mapping macros here.
00124   //}}AFX_MSG_MAP
00125 END_MESSAGE_MAP()
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CCounterThread message handlers
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CDisplayThread
00131
00132 IMPLEMENT_DYNCREATE(CDisplayThread, CExampleThread)
00133
00134 CDisplayThread::CDisplayThread()
00135 {
00136 }
00137
00138 CDisplayThread::~CDisplayThread()
00139 {
00140 }
00141
00142 BOOL CDisplayThread::InitInstance()
00143 {
00144   // TODO:  perform and per-thread initialization here
00145   return TRUE;
00146 }
00147
00148 int CDisplayThread::Run()
00149 {
00150   BOOL fSyncChecked;
00151   CString strBuffer;
00152
00153   ASSERT(m_pOwner != NULL);
00154   if (m_pOwner == NULL)
00155     return -1;
00156
00157   CSingleLock sLock(&(m_pOwner->m_mutex));
00158
00159   while (!m_bDone)
00160   {
00161     // Determine whether the user wants the threads
00162     // to be synchronized.
00163
00164     fSyncChecked = m_pOwner->IsDlgButtonChecked(IDC_SYNCHRONIZE);
00165
00166     if (fSyncChecked)
00167       sLock.Lock();
00168
00169     // Construct a string with the string form of the number.
00170
00171     strBuffer = _T("Dspy: ");
00172     strBuffer += m_pOwner->m_strNumber;
00173
00174     if (fSyncChecked)
00175       sLock.Unlock();
00176
00177     // Add the string form of the number to the list box.
00178     m_pOwner->AddToListBox(strBuffer);
00179   }
00180
00181   m_pOwner->PostMessage(WM_CLOSE, 0, 0L);
00182   return 0;
00183 }
00184
00185 BEGIN_MESSAGE_MAP(CDisplayThread, CWinThread)
00186   //{{AFX_MSG_MAP(CDisplayThread)
00187     // NOTE - the ClassWizard will add and remove mapping macros here.
00188   //}}AFX_MSG_MAP
00189 END_MESSAGE_MAP()
00190
00191 /////////////////////////////////////////////////////////////////////////////
00192 // CDisplayThread message handlers
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHistoryList Member List

This is the complete list of members for CHistoryList, including all inherited members.
AddString(CString &s1) | CHistoryList |
FillCombobox() | CHistoryList |
SwapStrings(CWnd *pWnd, CString &s1) | CHistoryList | [protected]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/clikpnt.h Source File

  • ole
  • autoclik

clikpnt.h

Go to the documentation of this file.
00001 // ClikPnt.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CAutoClickPoint command target
00016
00017 class CAutoClickPoint : public CCmdTarget
00018 {
00019   DECLARE_DYNCREATE(CAutoClickPoint)
00020
00021   CAutoClickPoint();           // protected constructor used by dynamic creation
00022
00023 // Attributes
00024 public:
00025
00026 // Operations
00027 public:
00028   CPoint GetClickPoint() { return CPoint(m_x, m_y); }
00029   void SetClickPoint(CPoint point) { m_x = (short)point.x; m_y = (short)point.y; }
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CAutoClickPoint)
00034   public:
00035   virtual void OnFinalRelease();
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 protected:
00040   virtual ~CAutoClickPoint();
00041
00042   // Generated message map functions
00043   //{{AFX_MSG(CAutoClickPoint)
00044     // NOTE - the ClassWizard will add and remove member functions here.
00045   //}}AFX_MSG
00046
00047 public:
00048   DECLARE_MESSAGE_MAP()
00049   // Generated OLE dispatch map functions
00050   //{{AFX_DISPATCH(CAutoClickPoint)
00051   short m_x;
00052   short m_y;
00053   //}}AFX_DISPATCH
00054   DECLARE_DISPATCH_MAP()
00055   DECLARE_INTERFACE_MAP()
00056 };
00057
00058 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View2.h Source File

  • vc2008fp
  • OutlookMultiViews

View2.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 class CView2 : public CView
00004 {
00005 public:
00006   CView2();           // protected constructor used by dynamic creation
00007   virtual ~CView2();
00008
00009   DECLARE_DYNCREATE(CView2)
00010
00011 // Attributes
00012 public:
00013
00014 // Operations
00015 public:
00016
00017 // Overrides
00018   protected:
00019   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00020   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00021   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00022   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00023
00024 // Implementation
00025 protected:
00026 #ifdef _DEBUG
00027   virtual void AssertValid() const;
00028   virtual void Dump(CDumpContext& dc) const;
00029 #endif
00030
00031 protected:
00032   afx_msg void OnContextMenu(CWnd*, CPoint point);
00033   afx_msg void OnFilePrintPreview();
00034
00035   DECLARE_MESSAGE_MAP()
00036 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikvw.cpp Source File

  • ole
  • acdual

aclikvw.cpp

Go to the documentation of this file.
00001 // AClikVw.cpp : implementation of the CAutoClickView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "AClikDoc.h"
00016 #include "AClikVw.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CAutoClickView
00026
00027 IMPLEMENT_DYNCREATE(CAutoClickView, CView)
00028
00029 BEGIN_MESSAGE_MAP(CAutoClickView, CView)
00030   //{{AFX_MSG_MAP(CAutoClickView)
00031   ON_WM_LBUTTONDOWN()
00032   //}}AFX_MSG_MAP
00033   // Standard printing commands
00034   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00035   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00036   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CAutoClickView construction/destruction
00041
00042 CAutoClickView::CAutoClickView()
00043 {
00044   // TODO: add construction code here
00045
00046 }
00047
00048 CAutoClickView::~CAutoClickView()
00049 {
00050 }
00051
00052 BOOL CAutoClickView::PreCreateWindow(CREATESTRUCT& cs)
00053 {
00054   // TODO: Modify the Window class or styles here by modifying
00055   //  the CREATESTRUCT cs
00056
00057   return CView::PreCreateWindow(cs);
00058 }
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CAutoClickView drawing
00062
00063 void CAutoClickView::OnDraw(CDC* pDC)
00064 {
00065   CAutoClickDoc* pDoc = GetDocument();
00066   ASSERT_VALID(pDoc);
00067
00068   pDC->TextOut(pDoc->m_pt.x, pDoc->m_pt.y, pDoc->m_str);
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CAutoClickView printing
00073
00074 BOOL CAutoClickView::OnPreparePrinting(CPrintInfo* pInfo)
00075 {
00076   // default preparation
00077   return DoPreparePrinting(pInfo);
00078 }
00079
00080 void CAutoClickView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00081 {
00082   // TODO: add extra initialization before printing
00083 }
00084
00085 void CAutoClickView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00086 {
00087   // TODO: add cleanup after printing
00088 }
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CAutoClickView diagnostics
00092
00093 #ifdef _DEBUG
00094 void CAutoClickView::AssertValid() const
00095 {
00096   CView::AssertValid();
00097 }
00098
00099 void CAutoClickView::Dump(CDumpContext& dc) const
00100 {
00101   CView::Dump(dc);
00102 }
00103
00104 CAutoClickDoc* CAutoClickView::GetDocument() // non-debug version is inline
00105 {
00106   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAutoClickDoc)));
00107   return (CAutoClickDoc*)m_pDocument;
00108 }
00109 #endif //_DEBUG
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CAutoClickView message handlers
00113
00114 void CAutoClickView::OnLButtonDown(UINT nFlags, CPoint point)
00115 {
00116   CAutoClickDoc* pDoc = GetDocument();
00117   pDoc->m_pt = point;
00118   pDoc->Refresh();
00119
00120   CView::OnLButtonDown(nFlags, point);
00121 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/StdAfx.h Source File

  • vc2008fp
  • PropSheetDemo

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h>
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/stdafx.h Source File

  • controls
  • pal

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/StdAfx.h Source File

  • vc2008fp
  • Slider

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrive.h Source File

  • ole
  • ipdrive

ipdrive.h

Go to the documentation of this file.
00001 // ipdrive.h : main header file for the IPDRIVE application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CDriveApp:
00020 // See ipdrive.cpp for the implementation of this class
00021 //
00022
00023 class CDriveApp : public CWinApp
00024 {
00025 public:
00026   CDriveApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CDriveApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036   //{{AFX_MSG(CDriveApp)
00037   afx_msg void OnAppAbout();
00038     // NOTE - the ClassWizard will add and remove member functions here.
00039     //    DO NOT EDIT what you see in these blocks of generated code !
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/mainfrm.h Source File

  • ole
  • autoclik

mainfrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CMainFrame : public CMDIFrameWnd
00014 {
00015   DECLARE_DYNAMIC(CMainFrame)
00016 public:
00017   CMainFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CMainFrame)
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CStatusBar  m_wndStatusBar;
00041   CToolBar    m_wndToolBar;
00042
00043 // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CMainFrame)
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047     // NOTE - the ClassWizard will add and remove member functions here.
00048     //    DO NOT EDIT what you see in these blocks of generated code!
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdView.h Source File

  • internet
  • HTMLEdit

HTMLEdView.h

Go to the documentation of this file.
00001 // HTMLEdView.h : interface of the CHTMLEdView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_HTMLEDVIEW_H__2BCEEF8D_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
00015 #define AFX_HTMLEDVIEW_H__2BCEEF8D_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_
00016
00017 #if _MSC_VER > 1000
00018 #pragma once
00019 #endif // _MSC_VER > 1000
00020 interface IDHTMLEdit;
00021
00022 #define FORMATBASE 200
00023 #define COLORBASE 300
00024 class CFormatMenu : public CMenu
00025 {
00026 public:
00027   void ClearStringArray()
00028   {
00029     m_sa.RemoveAll();
00030   }
00031   CStringArray& GetStringArray(){ return m_sa; }
00032 private:
00033   CStringArray m_sa;
00034 };
00035
00036 class CHTMLEdView : public CHtmlEditView
00037 {
00038 protected: // create from serialization only
00039   CHTMLEdView();
00040   void OnEditBarNotify(NMHDR* pNMHDR, LRESULT* pResult);
00041   DECLARE_DYNCREATE(CHTMLEdView)
00042   DECLARE_DHTMLEDITING_CMDMAP(CHTMLEdView);
00043   bool m_bUserMode;
00044 // Attributes
00045 public:
00046   CHTMLEdDoc* GetDocument();
00047 // Operations
00048 public:
00049
00050 // Overrides
00051   // ClassWizard generated virtual function overrides
00052   //{{AFX_VIRTUAL(CHTMLEdView)
00053   public:
00054   virtual void OnInitialUpdate();
00055   protected:
00056   virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
00057   //}}AFX_VIRTUAL
00058
00059 // Implementation
00060 public:
00061   void OnUpdateBlockFmt(CCmdUI* pCmdUI);
00062   void OnUpdateColor(CCmdUI *pCmdUI);
00063   CFormatMenu* m_pFmtMenu;
00064   void OnDocumentComplete();
00065   void OnDisplayChanged();
00066   virtual HRESULT OnShowContextMenu(DWORD dwID,
00067                 LPPOINT ppt,
00068                 LPUNKNOWN pcmdtReserved,
00069                 LPDISPATCH pdispReserved);
00070   virtual HRESULT OnUpdateUI();
00071   void OnContextMenuAction(long itemIndex);
00072   void UpdateView();
00073   virtual ~CHTMLEdView();
00074 #ifdef _DEBUG
00075   virtual void AssertValid() const;
00076   virtual void Dump(CDumpContext& dc) const;
00077 #endif
00078
00079 protected:
00080
00081 // Generated message map functions
00082 protected:
00083   void SetAbsPos(UINT);
00084   void SetStaticPos(UINT);
00085   void OnFormatPopup(UINT);
00086   CMenu* m_pClrMenu;
00087   CString m_prevFormat;
00088   void PopColorMenu();
00089   void PopBlockFmtMenu();
00090   void UpdateFontCombos();
00091   //{{AFX_MSG(CHTMLEdView)
00092
00093   //}}AFX_MSG
00094   void OnUpdateToolbarButtons(CCmdUI* pCmdUI);
00095   DECLARE_MESSAGE_MAP()
00096 };
00097
00098 #ifndef _DEBUG  // debug version in HTMLEdView.cpp
00099 inline CHTMLEdDoc* CHTMLEdView::GetDocument()
00100    { return (CHTMLEdDoc*)m_pDocument; }
00101 #endif
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104
00105 //{{AFX_INSERT_LOCATION}}
00106 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00107
00108 #endif // !defined(AFX_HTMLEDVIEW_H__2BCEEF8D_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/stdafx.cpp Source File

  • vc2008fp
  • RebarTest

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // RebarTest.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COle2ViewDoc Member List

This is the complete list of members for COle2ViewDoc, including all inherited members.
CMainFrame class | COle2ViewDoc | [friend]
CObjTreeView class | COle2ViewDoc | [friend]
COle2ViewDoc() | COle2ViewDoc | [protected]
CRegistryView class | COle2ViewDoc | [friend]
m_clsidCur | COle2ViewDoc |
m_dwClsCtx | COle2ViewDoc |
m_fInterface | COle2ViewDoc |
m_fTypeLib | COle2ViewDoc |
m_szObjectCur | COle2ViewDoc |
OnCloseDocument() | COle2ViewDoc | [protected, virtual]
OnNewDocument() | COle2ViewDoc | [protected, virtual]
~COle2ViewDoc() | COle2ViewDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuDoc.h Source File

  • vc2008fp
  • DynamicMenu

DynamicMenuDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CDynamicMenuDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CDynamicMenuDoc();
00017   DECLARE_DYNCREATE(CDynamicMenuDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CDynamicMenuDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDB.Cpp Source File

  • ole
  • TstCon

MacroDB.Cpp

Go to the documentation of this file.
00001 // File: MacroDB.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 IMPLEMENT_DYNAMIC( CMacroDialogBar, CDialogBar )
00020
00021 BEGIN_MESSAGE_MAP( CMacroDialogBar, CDialogBar )
00022    ON_WM_CREATE()
00023 END_MESSAGE_MAP()
00024
00025 CSize CMacroDialogBar::CalcFixedLayout( BOOL tStretch, BOOL tHorz )
00026 {
00027    CSize size;
00028
00029    size = CDialogBar::CalcFixedLayout( tStretch, tHorz );
00030
00031    size.cy = 23;
00032
00033    return( size );
00034 }
00035
00036 BOOL CMacroDialogBar::Create( CWnd* pParent, UINT nStyle, UINT nID )
00037 {
00038    HWND hControl;
00039
00040    if( !CDialogBar::Create( pParent, IDD_MACROBAR, nStyle, nID ) )
00041    {
00042     return( FALSE );
00043    }
00044
00045    hControl = NULL;
00046    GetDlgItem( IDC_MACRO, &hControl );
00047    ASSERT( hControl != NULL );
00048
00049    if( !m_cboxMacroName.SubclassWindow( hControl ) )
00050    {
00051     ASSERT( FALSE );
00052    }
00053
00054    return( TRUE );
00055 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/targetver.h Source File

  • ole
  • TstCon

targetver.h

Go to the documentation of this file.
00001
00002 #pragma once
00003
00004 // The following macros define the minimum required platform.  The minimum required platform
00005 // is the earliest version of Windows, Internet Explorer etc. that has the necessary features
00006 // to run your application.  The macros work by enabling all features available on platform
00007 // versions up to and including the version specified.
00008
00009 // Modify the following defines if you have to target a platform prior to the ones specified below.
00010 // Refer to MSDN for the latest info on corresponding values for different platforms.
00011
00012 #include <WinSDKVer.h>
00013
00014 #ifndef _WIN32_WINNT
00015 #define _WIN32_WINNT _WIN32_WINNT_MAXVER      // Change this to the appropriate value to target other versions of Windows.
00016 #endif
00017
00018 #include <SDKDDKVer.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonMDIDemoApp Member List

This is the complete list of members for CRibbonMDIDemoApp, including all inherited members.
CRibbonMDIDemoApp() | CRibbonMDIDemoApp |
ExitInstance() | CRibbonMDIDemoApp | [virtual]
InitInstance() | CRibbonMDIDemoApp | [virtual]
OnAppAbout() | CRibbonMDIDemoApp |
PreLoadState() | CRibbonMDIDemoApp | [virtual]
SaveAllModified() | CRibbonMDIDemoApp | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTasksPaneView Member List

This is the complete list of members for CTasksPaneView, including all inherited members.
CTasksPaneView() | CTasksPaneView | [protected]
DoDataExchange(CDataExchange *pDX) | CTasksPaneView | [protected, virtual]
GetDocument() | CTasksPaneView | [inline]
GetTasksPane() | CTasksPaneView |
IDD enum value | CTasksPaneView |
m_bAnimation | CTasksPaneView |
m_bCaptionIcon | CTasksPaneView |
m_bCollapseGroups | CTasksPaneView |
m_bCustomizeMargins | CTasksPaneView |
m_bHicolorImages | CTasksPaneView |
m_bMenuButtons | CTasksPaneView |
m_bNavToolbar | CTasksPaneView |
m_bScrollButtons | CTasksPaneView |
m_bWrapLabels | CTasksPaneView |
m_bWrapTasks | CTasksPaneView |
m_CaptionHeight | CTasksPaneView |
m_ColorGroupText | CTasksPaneView |
m_ColorGroupTextHot | CTasksPaneView |
m_ColorTaskText | CTasksPaneView |
m_ColorTaskTextHot | CTasksPaneView |
m_GroupSpacing | CTasksPaneView |
m_HMargin | CTasksPaneView |
m_IconOffset | CTasksPaneView |
m_nCaptionHeight | CTasksPaneView |
m_nGroupSpacing | CTasksPaneView |
m_nHMargin | CTasksPaneView |
m_nIconOffset | CTasksPaneView |
m_nTaskOffset | CTasksPaneView |
m_nTaskSpacing | CTasksPaneView |
m_nVisualManager | CTasksPaneView |
m_nVMargin | CTasksPaneView |
m_TaskOffset | CTasksPaneView |
m_TaskSpacing | CTasksPaneView |
m_VMargin | CTasksPaneView |
OnAnimation() | CTasksPaneView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CTasksPaneView | [protected, virtual]
OnCaptionicon() | CTasksPaneView | [protected]
OnChangeMargins() | CTasksPaneView | [protected]
OnCollapsegroups() | CTasksPaneView | [protected]
OnColorGrouptext() | CTasksPaneView | [protected]
OnColorGrouptexthot() | CTasksPaneView | [protected]
OnColorTasktext() | CTasksPaneView | [protected]
OnColorTasktexthot() | CTasksPaneView | [protected]
OnContextMenu(CWnd *, CPoint point) | CTasksPaneView | [protected]
OnDestroy() | CTasksPaneView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CTasksPaneView | [protected, virtual]
OnFilePrintPreview() | CTasksPaneView | [protected]
OnHicolorimages() | CTasksPaneView | [protected]
OnHistbuttons() | CTasksPaneView | [protected]
OnInitialUpdate() | CTasksPaneView | [protected, virtual]
OnMargins() | CTasksPaneView | [protected]
OnNavtoolbar() | CTasksPaneView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CTasksPaneView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CTasksPaneView | [protected, virtual]
OnScrollbuttons() | CTasksPaneView | [protected]
OnVisualManager() | CTasksPaneView | [protected]
OnWraplabels() | CTasksPaneView | [protected]
OnWraptasks() | CTasksPaneView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CTasksPaneView | [virtual]
~CTasksPaneView() | CTasksPaneView | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTheApp Member List

This is the complete list of members for CTheApp, including all inherited members.
CTheApp() | CTheApp |
CTheApp() | CTheApp |
ExitInstance() | CTheApp | [private, virtual]
FirstInstance() | CTheApp | [protected]
InitInstance() | CTheApp | [virtual]
InitInstance() | CTheApp | [virtual]
InitInstance() | CTheApp | [private, virtual]
m_dwSplashTime | CTheApp | [private]
m_server | CTheApp | [private]
m_splash | CTheApp | [private]
OnAppAbout() | CTheApp | [private]
OnHelpAbout() | CTheApp | [protected]
OnIdle(LONG lCount) | CTheApp | [private, virtual]
OnPageSetup() | CTheApp | [private]
PreTranslateMessage(MSG *pMsg) | CTheApp | [private, virtual]
~CTheApp() | CTheApp | [virtual]
~CTheApp() | CTheApp |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/MainFrm.h Source File

  • general
  • SimpleImage

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010
00011 // MainFrm.h : interface of the CMainFrame class
00012 //
00013
00014
00015 #pragma once
00016
00017 #include "ChildView.h"
00018 class CMainFrame : public CFrameWnd
00019 {
00020
00021 public:
00022   CMainFrame();
00023 protected:
00024   DECLARE_DYNAMIC(CMainFrame)
00025
00026 // Attributes
00027 public:
00028
00029 // Operations
00030 public:
00031
00032 // Overrides
00033 public:
00034   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00035   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00036
00037 // Implementation
00038 public:
00039   virtual ~CMainFrame();
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045 protected:  // control bar embedded members
00046   CStatusBar    m_wndStatusBar;
00047   CToolBar    m_wndToolBar;
00048   CChildView    m_wndView;
00049   CToolBar    m_wndSizeToolBar; // this toolbar contains the image 'Size' buttons
00050   BOOL  m_bIsFullScreen;
00051   WINDOWPLACEMENT m_wpPrev;  // to store the window placement when we switch to fullscreen
00052
00053 // Generated message map functions
00054 protected:
00055   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00056   afx_msg void OnSetFocus(CWnd *pOldWnd);
00057   DECLARE_MESSAGE_MAP()
00058 };
00059
00060
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTestContainer98App Member List

This is the complete list of members for CTestContainer98App, including all inherited members.
CTestContainer98App() | CTestContainer98App |
InitInstance() | CTestContainer98App | [virtual]
LoadRegistrySettings() | CTestContainer98App |
m_options | CTestContainer98App |
m_server | CTestContainer98App |
OnAppAbout() | CTestContainer98App |
OnFileRegisterControls() | CTestContainer98App |
OnOptionsTraceLevelNone() | CTestContainer98App |
OnOptionsTraceLevelNormal() | CTestContainer98App |
OnOptionsTraceLevelVerbose() | CTestContainer98App |
OnUpdateOptionsTraceLevelNone(CCmdUI *pCmdUI) | CTestContainer98App |
OnUpdateOptionsTraceLevelNormal(CCmdUI *pCmdUI) | CTestContainer98App |
OnUpdateOptionsTraceLevelVerbose(CCmdUI *pCmdUI) | CTestContainer98App |
SaveRegistrySettings() | CTestContainer98App |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/targetver.h Source File

  • vc2008fp
  • OwnerDrawMenu

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/resource.h Source File

  • general
  • dlgcbr32

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DLGCBAR.RC
00004 //
00005 #define IDP_NOTIMER                     1
00006 #define IDR_MAIN                        102
00007 #define IDD_ABOUT                       105
00008 #define IDR_TOOLBAR1                    105
00009 #define IDD_RATE                        106
00010 #define IDC_WNDLIST                     1000
00011 #define IDC_CLASS                       1001
00012 #define IDC_MODULE                      1002
00013 #define IDC_PARENT                      1003
00014 #define IDC_RECT                        1004
00015 #define IDC_STYLE                       1005
00016 #define IDC_INTERVAL                    1014
00017 #define ID_OPTION_NOW                   40001
00018 #define ID_BUTTON40001                  40001
00019 #define ID_OPTION_RATE                  40002
00020 #define ID_BUTTON40002                  40002
00021 #define ID_HELP_ABOUT                   40003
00022 #define ID_BUTTON40003                  40003
00023 #define ID_BUTTON40004                  40004
00024 #define ID_BUTTON40005                  40005
00025 #define AFX_IDS_IDLEMESSAGE             0xE001
00026 #define ID_APP_EXIT                     0xE141
00027 #define ID_INDICATOR_TIME               59142
00028 #define ID_VIEW_TOOLBAR                 0xE800
00029 #define ID_VIEW_STATUS_BAR              0xE801
00030 #define AFX_IDS_SCSIZE                  0xEF00
00031 #define AFX_IDS_SCMOVE                  0xEF01
00032 #define AFX_IDS_SCMINIMIZE              0xEF02
00033 #define AFX_IDS_SCMAXIMIZE              0xEF03
00034 #define AFX_IDS_SCNEXTWINDOW            0xEF04
00035 #define AFX_IDS_SCPREVWINDOW            0xEF05
00036 #define AFX_IDS_SCCLOSE                 0xEF06
00037 #define AFX_IDS_SCRESTORE               0xEF12
00038 #define AFX_IDS_SCTASKLIST              0xEF13
00039 #define AFX_IDS_MDICHILD                0xEF1F
00040 #define AFX_IDP_PARSE_INT               0xF110
00041 #define AFX_IDP_PARSE_REAL              0xF111
00042 #define AFX_IDP_PARSE_INT_RANGE         0xF112
00043 #define AFX_IDP_PARSE_REAL_RANGE        0xF113
00044 #define AFX_IDP_PARSE_STRING_SIZE       0xF114
00045
00046 // Next default values for new objects
00047 //
00048 #ifdef APSTUDIO_INVOKED
00049 #ifndef APSTUDIO_READONLY_SYMBOLS
00050 #define _APS_NEXT_RESOURCE_VALUE        107
00051 #define _APS_NEXT_COMMAND_VALUE         40007
00052 #define _APS_NEXT_CONTROL_VALUE         1006
00053 #define _APS_NEXT_SYMED_VALUE           101
00054 #endif
00055 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoView.h Source File

  • vc2008fp
  • MDITabsDemo

MDITabsDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMDITabsDemoView : public CView
00014 {
00015 protected: // create from serialization only
00016   CMDITabsDemoView();
00017   DECLARE_DYNCREATE(CMDITabsDemoView)
00018
00019 // Attributes
00020 public:
00021   CMDITabsDemoDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CMDITabsDemoView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnContextMenu(CWnd*, CPoint point);
00045   afx_msg void OnFilePrintPreview();
00046
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 #ifndef _DEBUG  // debug version in MDITabsDemoView.cpp
00051 inline CMDITabsDemoDoc* CMDITabsDemoView::GetDocument()
00052    { return (CMDITabsDemoDoc*)m_pDocument; }
00053 #endif
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/stdafx.h Source File

  • ole
  • superpad

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>
00017 #include <afxext.h>
00018 #include <afxole.h>
00019 #include <atlbase.h>
00020 #include <atlwin.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/propset.cpp Source File

  • vc2008fp
  • DrawClient

propset.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013
00014 #include <malloc.h>
00015 #include <ole2.h>
00016 #include <oleauto.h>
00017 #include "propset.h"
00018
00019 #pragma warning( disable : 4311 4312 )
00020
00021 #ifdef AFXCTL_PROP_SEG
00022 #pragma code_seg(AFXCTL_PROP_SEG)
00023 #endif
00024
00025 #ifdef _DEBUG
00026 #undef THIS_FILE
00027 static char THIS_FILE[] = __FILE__;
00028 #endif
00029
00030 #define new DEBUG_NEW
00031
00032 static LPVOID CountPrefixedStringA(LPCSTR lpsz)
00033 {
00034   DWORD cb = (lstrlenA( lpsz ) + 1);
00035   LPDWORD lp = (LPDWORD)malloc((int)cb + sizeof(DWORD) );
00036   if (lp)
00037   {
00038     *lp = cb;
00039     strcpy_s((LPSTR)(lp+1), (int)cb, lpsz );
00040   }
00041
00042   return(LPVOID)lp;
00043 }
00044
00045 static LPVOID CountPrefixedStringW(LPCWSTR lpsz)
00046 {
00047   DWORD cb = (DWORD)(wcslen( lpsz ) + 1);
00048   LPDWORD lp = (LPDWORD)malloc((int)cb * sizeof(WCHAR) + sizeof(DWORD) );
00049   if (lp)
00050   {
00051     *lp = cb;
00052     wcscpy_s((LPWSTR)(lp+1), (int)cb, lpsz );
00053   }
00054
00055   return(LPVOID)lp;
00056 }
00057
00058 #ifdef _UNICODE
00059 #define CountPrefixedStringT CountPrefixedStringW
00060 #else
00061 #define CountPrefixedStringT CountPrefixedStringA
00062 #endif
00063
00064 #ifdef _UNICODE
00065
00066 #define MAX_STRLEN 1024
00067
00068 static LPBYTE ConvertStringProp(LPBYTE pbProp, DWORD dwType, ULONG nReps, size_t cbCharSize)
00069 {
00070   LPBYTE pbResult = NULL; // Return value
00071   ULONG cbResult = 0;     // Number of bytes in pbResult
00072   LPBYTE pbBuffer;        // Temporary holding space
00073   ULONG cchOrig;          // Number of characters in original string
00074   ULONG cchCopy;          // Number of characters to copy
00075   ULONG cbCopy;           // Number of bytes to copy
00076   LPBYTE pbResultNew;     // Used for realloc of pbResult
00077
00078   pbBuffer = (LPBYTE)malloc(MAX_STRLEN * cbCharSize);
00079   if (pbBuffer == NULL)
00080     return NULL;
00081
00082   // If it's a vector, the count goes first.
00083   if (dwType & VT_VECTOR)
00084   {
00085     pbResult = (LPBYTE)malloc(sizeof(DWORD));
00086     if (pbResult == NULL)
00087     {
00088       free(pbBuffer);
00089       return NULL;
00090     }
00091     *(LPDWORD)pbResult = nReps;
00092     cbResult = sizeof(DWORD);
00093   }
00094
00095   while (nReps--)
00096   {
00097     cchOrig = *(LPDWORD)pbProp;
00098     pbProp += sizeof(DWORD);
00099
00100     // Convert multibyte string to Unicode.
00101     if (cbCharSize == sizeof(WCHAR))
00102     {
00103       cchCopy = MultiByteToWideChar(CP_ACP, 0, (LPSTR)pbProp, -1,
00104         (LPWSTR)pbBuffer, min(cchOrig, MAX_STRLEN));
00105     }
00106     else
00107     {
00108       cchCopy = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)pbProp, -1,
00109         (LPSTR)pbBuffer, min(cchOrig, MAX_STRLEN), NULL, NULL);
00110     }
00111
00112     // Allocate space to append string.
00113     cbCopy = cchCopy *(ULONG)cbCharSize;
00114     pbResultNew = (LPBYTE)realloc(pbResult, cbResult + sizeof(DWORD) + cbCopy);
00115
00116     // If allocation failed, cleanup and return NULL;
00117     if (pbResultNew == NULL)
00118     {
00119       free(pbResult);
00120       free(pbBuffer);
00121       return NULL;
00122     }
00123
00124     pbResult = pbResultNew;
00125
00126     // Copy character count and converted string into place, // then update the total size.
00127     memcpy(pbResult + cbResult, (LPBYTE)&cchCopy, sizeof(DWORD));
00128     memcpy(pbResult + cbResult + sizeof(DWORD), pbBuffer, cbCopy);
00129     cbResult += sizeof(DWORD) + cbCopy;
00130
00131     // Advance to the next vector element
00132     pbProp += (cchOrig * cbCharSize);
00133   }
00134
00135   free(pbBuffer);
00136   return pbResult;
00137 }
00138
00139 #endif // _UNICODE
00140
00141 /////////////////////////////////////////////////////////////////////////////
00142 //Implementation of the CProperty class
00143
00144 CProperty::CProperty( void )
00145 {
00146   m_dwPropID = 0;
00147
00148   m_dwType = VT_EMPTY;
00149   m_pValue = NULL;       // must init to NULL
00150 }
00151
00152 CProperty::CProperty( DWORD dwID, const LPVOID pValue, DWORD dwType )
00153 {
00154   m_dwPropID = dwID;
00155   m_dwType = dwType;
00156   m_pValue = NULL;       // must init to NULL
00157   Set( dwID, pValue, dwType );
00158 }
00159
00160 CProperty::~CProperty()
00161 {
00162   FreeValue();
00163 }
00164
00165 BOOL CProperty::Set( DWORD dwID, const LPVOID pValue, DWORD dwType )
00166 {
00167   m_dwType = dwType;
00168   m_dwPropID = dwID;
00169
00170   return Set( pValue );
00171 }
00172
00173 BOOL CProperty::Set( const LPVOID pValue, DWORD dwType )
00174 {
00175   m_dwType = dwType;
00176   return Set( pValue );
00177 }
00178
00179 BOOL CProperty::Set( const  LPVOID pVal )
00180 {
00181   ULONG           cb;
00182   ULONG           cbItem;
00183   ULONG           cbValue;
00184   ULONG           nReps;
00185   LPBYTE          pCur;
00186   LPVOID          pValue = pVal;
00187   DWORD           dwType = m_dwType;
00188   LPVOID          pValueOrig = NULL;
00189
00190   if (m_pValue != NULL)
00191   {
00192     FreeValue();
00193   }
00194
00195   if (pValue == NULL || m_dwType == 0)
00196     return TRUE;
00197
00198   // Given pValue, determine how big it is
00199   // Then allocate a new buffer for m_pValue and copy...
00200   nReps = 1;
00201   cbValue = 0;
00202   pCur = (LPBYTE)pValue;
00203   if (m_dwType & VT_VECTOR)
00204   {
00205     // The next DWORD is a count of the elements
00206     nReps = *(LPDWORD)pValue;
00207     cb = sizeof( nReps );
00208     pCur += cb;
00209     cbValue += cb;
00210     dwType &= ~VT_VECTOR;
00211   }
00212   else
00213   {
00214     // If we get any of the string-like types, // and we are not a vector create a count-prefixed
00215     // buffer.
00216     switch (dwType )
00217     {
00218     case VT_LPSTR:          // null terminated string
00219       pValueOrig = pValue;
00220       pValue = CountPrefixedStringA((LPSTR)pValueOrig );
00221       pCur = (LPBYTE)pValue;
00222       break;
00223
00224     case VT_BSTR:           // binary string
00225     case VT_STREAM:         // Name of the stream follows
00226     case VT_STORAGE:        // Name of the storage follows
00227     case VT_STREAMED_OBJECT:// Stream contains an object
00228     case VT_STORED_OBJECT:  // Storage contains an object
00229       pValueOrig = pValue;
00230       pValue = CountPrefixedStringT((LPTSTR)pValueOrig );
00231       pCur = (LPBYTE)pValue;
00232       break;
00233
00234     case VT_LPWSTR:         // UNICODE string
00235       pValueOrig = pValue;
00236       pValue = CountPrefixedStringW((LPWSTR)pValueOrig );
00237       pCur = (LPBYTE)pValue;
00238       break;
00239     }
00240   }
00241
00242   // Since a value can be made up of a vector(VT_VECTOR) of
00243   // items, we first seek through the value, picking out
00244   // each item, getting it's size.
00245   //
00246   cbItem = 0;        // Size of the current item
00247   while (nReps--)
00248   {
00249     switch (dwType)
00250     {
00251     case VT_EMPTY:          // nothing
00252       cbItem = 0;
00253       break;
00254
00255     case VT_I2:             // 2 byte signed int
00256     case VT_BOOL:           // True=-1, False=0
00257       cbItem = 2;
00258       break;
00259
00260     case VT_I4:             // 4 byte signed int
00261     case VT_R4:             // 4 byte real
00262       cbItem = 4;
00263       break;
00264
00265     case VT_R8:             // 8 byte real
00266     case VT_CY:             // currency
00267     case VT_DATE:           // date
00268     case VT_I8:             // signed 64-bit int
00269     case VT_FILETIME:       // FILETIME
00270       cbItem = 8;
00271       break;
00272
00273     case VT_CLSID:          // A Class ID
00274       cbItem = sizeof(CLSID);
00275       break;
00276
00277 #ifndef _UNICODE
00278     case VT_BSTR:           // binary string
00279     case VT_STREAM:         // Name of the stream follows
00280     case VT_STORAGE:        // Name of the storage follows
00281     case VT_STREAMED_OBJECT:// Stream contains an object
00282     case VT_STORED_OBJECT:  // Storage contains an object
00283     case VT_STREAMED_PROPSET:// Stream contains a propset
00284     case VT_STORED_PROPSET: // Storage contains a propset
00285 #endif // _UNICODE
00286     case VT_LPSTR:          // null terminated string
00287     case VT_BLOB_OBJECT:    // Blob contains an object
00288     case VT_BLOB_PROPSET:   // Blob contains a propset
00289     case VT_BLOB:           // Length prefixed bytes
00290     case VT_CF:             // Clipboard format
00291       // Get the DWORD that gives us the size, making
00292       // sure we increment cbValue.
00293       cbItem = *(LPDWORD)pCur;
00294       cb = sizeof(cbItem);
00295       pCur += cb;
00296       cbValue += cb;
00297       break;
00298
00299 #ifdef _UNICODE
00300     case VT_BSTR:           // binary string
00301     case VT_STREAM:         // Name of the stream follows
00302     case VT_STORAGE:        // Name of the storage follows
00303     case VT_STREAMED_OBJECT:// Stream contains an object
00304     case VT_STORED_OBJECT:  // Storage contains an object
00305     case VT_STREAMED_PROPSET:// Stream contains a propset
00306     case VT_STORED_PROPSET: // Storage contains a propset
00307 #endif // _UNICODE
00308     case VT_LPWSTR:         // UNICODE string
00309       cbItem = *(LPDWORD)pCur * sizeof(WCHAR);
00310       cb = sizeof( cbItem );
00311       pCur += cb;
00312       cbValue += cb;
00313       break;
00314     case VT_VARIANT:        // VARIANT*
00315       break;
00316
00317     default:
00318       if (pValueOrig)
00319         free( pValue );
00320       return FALSE;
00321     }
00322
00323     // Add 'cb' to cbItem before seeking...
00324     //
00325     // Seek to the next item
00326     pCur += cbItem;
00327     cbValue += cbItem;
00328   }
00329
00330   if (NULL == AllocValue(cbValue))
00331   {
00332     TRACE0("CProperty::AllocValue failed");
00333     return FALSE;
00334   }
00335   memcpy_s( m_pValue, (int)cbValue, pValue, (int)cbValue );
00336
00337   if (pValueOrig)
00338     free( pValue );
00339
00340   return TRUE;
00341 }
00342
00343 LPVOID CProperty::Get( void )
00344 {   return Get((DWORD*)NULL );   }
00345
00346 LPVOID CProperty::Get( DWORD* pcb )
00347 {
00348   DWORD   cb = 0;
00349   LPBYTE  p = NULL;
00350
00351   p = (LPBYTE)m_pValue;
00352
00353   // m_pValue points to a Property "Value" which may
00354   // have size information included...
00355   switch ( m_dwType )
00356   {
00357   case VT_EMPTY:          // nothing
00358     cb = 0;
00359     break;
00360
00361   case VT_I2:             // 2 byte signed int
00362   case VT_BOOL:           // True=-1, False=0
00363     cb = 2;
00364     break;
00365
00366   case VT_I4:             // 4 byte signed int
00367   case VT_R4:             // 4 byte real
00368     cb = 4;
00369     break;
00370
00371   case VT_R8:             // 8 byte real
00372   case VT_CY:             // currency
00373   case VT_DATE:           // date
00374   case VT_I8:             // signed 64-bit int
00375   case VT_FILETIME:       // FILETIME
00376     cb = 8;
00377     break;
00378
00379 #ifndef _UNICODE
00380   case VT_BSTR:           // binary string
00381   case VT_STREAM:         // Name of the stream follows
00382   case VT_STORAGE:        // Name of the storage follows
00383   case VT_STREAMED_OBJECT:// Stream contains an object
00384   case VT_STORED_OBJECT:  // Storage contains an object
00385   case VT_STREAMED_PROPSET:// Stream contains a propset
00386   case VT_STORED_PROPSET: // Storage contains a propset
00387 #endif // UNICODE
00388   case VT_LPSTR:          // null terminated string
00389   case VT_CF:             // Clipboard format
00390     // Read the DWORD that gives us the size, making
00391     // sure we increment cbValue.
00392     cb = *(LPDWORD)p;
00393     p += sizeof( DWORD );
00394     break;
00395
00396   case VT_BLOB:           // Length prefixed bytes
00397   case VT_BLOB_OBJECT:    // Blob contains an object
00398   case VT_BLOB_PROPSET:   // Blob contains a propset
00399     // Read the DWORD that gives us the size.
00400     cb = *(LPDWORD)p;
00401     break;
00402
00403 #ifdef _UNICODE
00404   case VT_BSTR:           // binary string
00405   case VT_STREAM:         // Name of the stream follows
00406   case VT_STORAGE:        // Name of the storage follows
00407   case VT_STREAMED_OBJECT:// Stream contains an object
00408   case VT_STORED_OBJECT:  // Storage contains an object
00409   case VT_STREAMED_PROPSET:// Stream contains a propset
00410   case VT_STORED_PROPSET: // Storage contains a propset
00411 #endif // _UNICODE
00412   case VT_LPWSTR:         // UNICODE string
00413     cb = *(LPDWORD)p * sizeof(WCHAR);
00414     p += sizeof( DWORD );
00415     break;
00416
00417   case VT_CLSID:          // A Class ID
00418     cb = sizeof(CLSID);
00419     break;
00420
00421   case VT_VARIANT:        // VARIANT*
00422     break;
00423
00424   default:
00425     return NULL;
00426   }
00427   if (pcb != NULL)
00428     *pcb = cb;
00429
00430   return p;
00431 }
00432
00433 DWORD  CProperty::GetType( void )
00434 {   return m_dwType;  }
00435
00436 void   CProperty::SetType( DWORD dwType )
00437 {   m_dwType = dwType; }
00438
00439 DWORD CProperty::GetID( void )
00440 {   return m_dwPropID;   }
00441
00442 void CProperty::SetID( DWORD dwPropID )
00443 {    m_dwPropID = dwPropID;   }
00444
00445 LPVOID CProperty::GetRawValue( void )
00446 {   return m_pValue; }
00447
00448 BOOL CProperty::WriteToStream( IStream* pIStream )
00449 {
00450   ULONG           cb = 0;
00451   ULONG           cbTotal; // Total size of the whole value
00452   DWORD           dwType = m_dwType;
00453   DWORD           nReps;
00454   LPBYTE          pValue;
00455   LPBYTE          pCur;
00456   BOOL            bSuccess = FALSE;
00457   BYTE            b = 0;
00458
00459   nReps = 1;
00460   pValue = (LPBYTE)m_pValue;
00461   pCur = pValue;
00462   cbTotal = 0;
00463   if (m_dwType & VT_VECTOR)
00464   {
00465     // Value is a DWORD count of elements followed by
00466     // that many repititions of the value.
00467     //
00468     nReps = *(LPDWORD)pCur;
00469     cbTotal = sizeof(DWORD);
00470     pCur += cbTotal;
00471     dwType &= ~VT_VECTOR;
00472   }
00473
00474 #ifdef _UNICODE
00475   switch (dwType)
00476   {
00477   case VT_BSTR:           // binary string
00478   case VT_STREAM:         // Name of the stream follows
00479   case VT_STORAGE:        // Name of the storage follows
00480   case VT_STREAMED_OBJECT:// Stream contains an object
00481   case VT_STORED_OBJECT:  // Storage contains an object
00482   case VT_STREAMED_PROPSET:// Stream contains a propset
00483   case VT_STORED_PROPSET: // Storage contains a propset
00484     pValue = ConvertStringProp(pCur, m_dwType, nReps, sizeof(char));
00485     if (m_dwType & VT_VECTOR)
00486       pCur = pValue + sizeof(DWORD);
00487     break;
00488   }
00489 #endif // _UNICODE
00490
00491   // Figure out how big the data is.
00492   while (nReps--)
00493   {
00494     switch (dwType)
00495     {
00496     case VT_EMPTY:          // nothing
00497       cb = 0;
00498       break;
00499
00500     case VT_I2:             // 2 byte signed int
00501     case VT_BOOL:           // True=-1, False=0
00502       cb = 2;
00503       break;
00504
00505     case VT_I4:             // 4 byte signed int
00506     case VT_R4:             // 4 byte real
00507       cb = 4;
00508       break;
00509
00510     case VT_R8:             // 8 byte real
00511     case VT_CY:             // currency
00512     case VT_DATE:           // date
00513     case VT_I8:             // signed 64-bit int
00514     case VT_FILETIME:       // FILETIME
00515       cb = 8;
00516       break;
00517
00518     case VT_LPSTR:          // null terminated string
00519     case VT_BSTR:           // binary string
00520     case VT_STREAM:         // Name of the stream follows
00521     case VT_STORAGE:        // Name of the storage follows
00522     case VT_STREAMED_OBJECT:// Stream contains an object
00523     case VT_STORED_OBJECT:  // Storage contains an object
00524     case VT_STREAMED_PROPSET:// Stream contains a propset
00525     case VT_STORED_PROPSET: // Storage contains a propset
00526     case VT_BLOB:           // Length prefixed bytes
00527     case VT_BLOB_OBJECT:    // Blob contains an object
00528     case VT_BLOB_PROPSET:   // Blob contains a propset
00529     case VT_CF:             // Clipboard format
00530       cb = sizeof(DWORD) + *(LPDWORD)pCur;
00531       break;
00532
00533     case VT_LPWSTR:         // UNICODE string
00534       cb = sizeof(DWORD) +(*(LPDWORD)pCur * sizeof(WCHAR));
00535       break;
00536
00537     case VT_CLSID:          // A Class ID
00538       cb = sizeof(CLSID);
00539       break;
00540
00541     case VT_VARIANT:        // VARIANT*
00542       break;
00543
00544     default:
00545       return FALSE;
00546     }
00547
00548     pCur += cb;
00549     cbTotal+= cb;
00550   }
00551
00552   // Write the type
00553   pIStream->Write((LPVOID)&m_dwType, sizeof(m_dwType), &cb);
00554   if (cb != sizeof(m_dwType))
00555     goto Cleanup;
00556
00557   // Write the value
00558   pIStream->Write((LPVOID)pValue, cbTotal, &cb);
00559   if (cb != cbTotal)
00560     goto Cleanup;
00561
00562   // Make sure we are 32 bit aligned
00563   cbTotal = (((cbTotal + 3) >> 2) << 2) - cbTotal;
00564   while (cbTotal--)
00565   {
00566     pIStream->Write((LPVOID)&b, 1, &cb);
00567     if (cb != sizeof(BYTE))
00568       goto Cleanup;
00569   }
00570
00571   bSuccess = TRUE;
00572
00573 Cleanup:
00574   if (pValue != m_pValue)
00575     free(pValue);
00576
00577   return bSuccess;
00578 }
00579
00580 BOOL CProperty::ReadFromStream( IStream* pIStream )
00581 {
00582   ULONG           cb;
00583   ULONG           cbItem;
00584   ULONG           cbValue;
00585   DWORD           dwType;
00586   ULONG           nReps;
00587   ULONG           iReps;
00588   LPSTREAM        pIStrItem;
00589   LARGE_INTEGER   li;
00590
00591   // All properties are made up of a type/value pair.
00592   // The obvious first thing to do is to get the type...
00593   pIStream->Read((LPVOID)&m_dwType, sizeof(m_dwType), &cb );
00594   if (cb != sizeof(m_dwType))
00595     return FALSE;
00596
00597   dwType = m_dwType;
00598   nReps = 1;
00599   cbValue = 0;
00600   if (m_dwType & VT_VECTOR)
00601   {
00602     // The next DWORD in the stream is a count of the
00603     // elements
00604     pIStream->Read((LPVOID)&nReps, sizeof(nReps), &cb );
00605     if (cb != sizeof(nReps))
00606       return FALSE;
00607     cbValue += cb;
00608     dwType &= ~VT_VECTOR;
00609   }
00610
00611   // Since a value can be made up of a vector(VT_VECTOR) of
00612   // items, we first seek through the value, picking out
00613   // each item, getting it's size.  We use a cloned
00614   // stream for this(pIStrItem).
00615   // We then use our pIStream to read the entire 'blob' into
00616   // the allocated buffer.
00617   //
00618   cbItem = 0;        // Size of the current item
00619   pIStream->Clone( &pIStrItem );
00620   ENSURE(pIStrItem != NULL);
00621   iReps = nReps;
00622   while (iReps--)
00623   {
00624     switch (dwType)
00625     {
00626     case VT_EMPTY:          // nothing
00627       cbItem = 0;
00628       break;
00629
00630     case VT_I2:             // 2 byte signed int
00631     case VT_BOOL:           // True=-1, False=0
00632       cbItem = 2;
00633       break;
00634
00635     case VT_I4:             // 4 byte signed int
00636     case VT_R4:             // 4 byte real
00637       cbItem = 4;
00638       break;
00639
00640     case VT_R8:             // 8 byte real
00641     case VT_CY:             // currency
00642     case VT_DATE:           // date
00643     case VT_I8:             // signed 64-bit int
00644     case VT_FILETIME:       // FILETIME
00645       cbItem = 8;
00646       break;
00647
00648     case VT_LPSTR:          // null terminated string
00649     case VT_BSTR:           // binary string
00650     case VT_STREAM:         // Name of the stream follows
00651     case VT_STORAGE:        // Name of the storage follows
00652     case VT_STREAMED_OBJECT:// Stream contains an object
00653     case VT_STORED_OBJECT:  // Storage contains an object
00654     case VT_STREAMED_PROPSET:// Stream contains a propset
00655     case VT_STORED_PROPSET: // Storage contains a propset
00656     case VT_BLOB:           // Length prefixed bytes
00657     case VT_BLOB_OBJECT:    // Blob contains an object
00658     case VT_BLOB_PROPSET:   // Blob contains a propset
00659     case VT_CF:             // Clipboard format
00660       // Read the DWORD that gives us the size, making
00661       // sure we increment cbValue.
00662       pIStream->Read((LPVOID)&cbItem, sizeof(cbItem), &cb );
00663       if (cb != sizeof(cbItem))
00664         return FALSE;
00665       LISet32( li, -(LONG)cb );
00666       pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
00667       cbValue += cb;
00668       break;
00669
00670     case VT_LPWSTR:         // UNICODE string
00671       pIStream->Read((LPVOID)&cbItem, sizeof(cbItem), &cb );
00672       if (cb != sizeof(cbItem))
00673         return FALSE;
00674       LISet32( li, -(LONG)cb );
00675       pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
00676       cbValue += cb;
00677       cbItem *= sizeof(WCHAR);
00678       break;
00679
00680     case VT_CLSID:          // A Class ID
00681       cbItem = sizeof(CLSID);
00682       break;
00683
00684     case VT_VARIANT:        // VARIANT*
00685       break;
00686
00687     default:
00688       pIStrItem->Release();
00689       return FALSE;
00690     }
00691
00692     // Add 'cb' to cbItem before seeking...
00693     //
00694     // Seek to the next item
00695     LISet32( li, cbItem );
00696     pIStrItem->Seek( li, STREAM_SEEK_CUR, NULL);
00697     cbValue += cbItem;
00698   }
00699
00700   pIStrItem->Release();
00701
00702 #ifdef _UNICODE
00703   LPBYTE pTmp;
00704
00705   switch (dwType)
00706   {
00707   case VT_BSTR:           // binary string
00708   case VT_STREAM:         // Name of the stream follows
00709   case VT_STORAGE:        // Name of the storage follows
00710   case VT_STREAMED_OBJECT:// Stream contains an object
00711   case VT_STORED_OBJECT:  // Storage contains an object
00712   case VT_STREAMED_PROPSET:// Stream contains a propset
00713   case VT_STORED_PROPSET: // Storage contains a propset
00714     pTmp = (LPBYTE)malloc((int)cbValue);
00715     pIStream->Read( pTmp, cbValue, &cb );
00716     m_pValue = ConvertStringProp(pTmp, m_dwType, nReps, sizeof(WCHAR));
00717     free(pTmp);
00718     break;
00719
00720   default:
00721 #endif // _UNICODE
00722     // Allocate cbValue bytes
00723     if (NULL == AllocValue(cbValue))
00724       return FALSE;
00725
00726     // Read the buffer from pIStream
00727     pIStream->Read( m_pValue, cbValue, &cb );
00728     if (cb != cbValue)
00729       return FALSE;
00730 #ifdef _UNICODE
00731     break;
00732   }
00733 #endif // _UNICODE
00734
00735   // Done!
00736   return TRUE;
00737 }
00738
00739 LPVOID CProperty::AllocValue(ULONG cb)
00740 {
00741   return m_pValue = malloc((int)cb);
00742 }
00743
00744 void CProperty::FreeValue()
00745 {
00746   if (m_pValue != NULL)
00747   {
00748     free(m_pValue);
00749     m_pValue = NULL;
00750   }
00751 }
00752
00753 /////////////////////////////////////////////////////////////////////////////
00754 // Implementation of the CPropertySection Class
00755
00756 CPropertySection::CPropertySection( void )
00757 {
00758   m_FormatID = GUID_NULL;
00759   m_SH.cbSection = 0;
00760   m_SH.cProperties = 0;
00761 }
00762
00763 CPropertySection::CPropertySection( CLSID FormatID )
00764 {
00765   m_FormatID = FormatID;
00766   m_SH.cbSection = 0;
00767   m_SH.cProperties = 0;
00768 }
00769
00770 CPropertySection::~CPropertySection( void )
00771 {
00772   RemoveAll();
00773   return;
00774 }
00775
00776 CLSID CPropertySection::GetFormatID( void )
00777 {   return m_FormatID; }
00778
00779 void CPropertySection::SetFormatID( CLSID FormatID )
00780 {   m_FormatID = FormatID; }
00781
00782 BOOL CPropertySection::Set( DWORD dwPropID, LPVOID pValue, DWORD dwType )
00783 {
00784   CProperty* pProp = GetProperty( dwPropID );
00785   if (pProp == NULL)
00786   {
00787     if ((pProp = new CProperty( dwPropID, pValue, dwType )) != NULL)
00788       AddProperty( pProp );
00789     return(pProp != NULL);
00790   }
00791
00792   pProp->Set( dwPropID, pValue, dwType );
00793   return TRUE;
00794 }
00795
00796 BOOL CPropertySection::Set( DWORD dwPropID, LPVOID pValue )
00797 {
00798   // Since no dwType was specified, the property is assumed
00799   // to exist.   Fail if it does not.
00800   CProperty* pProp = GetProperty( dwPropID );
00801   if (pProp != NULL && pProp->m_dwType)
00802   {
00803     pProp->Set( dwPropID, pValue, pProp->m_dwType );
00804     return TRUE;
00805   }
00806   else
00807     return FALSE;
00808 }
00809
00810 LPVOID CPropertySection::Get( DWORD dwPropID )
00811 {   return Get( dwPropID, (DWORD*)NULL );  }
00812
00813 LPVOID CPropertySection::Get( DWORD dwPropID, DWORD* pcb )
00814 {
00815   CProperty* pProp = GetProperty(dwPropID);
00816   if (pProp)
00817   {
00818     ASSERT_VALID(pProp);
00819     return pProp->Get(pcb);
00820   }
00821   else
00822     return NULL;
00823 }
00824
00825 void CPropertySection::Remove( DWORD dwID )
00826 {
00827   POSITION pos = m_PropList.GetHeadPosition();
00828   CProperty*  pProp;
00829   while ( pos != NULL )
00830   {
00831     POSITION posRemove = pos;
00832     pProp = (CProperty*)m_PropList.GetNext( pos );
00833     if (pProp->m_dwPropID == dwID)
00834     {
00835       m_PropList.RemoveAt( posRemove );
00836       delete pProp;
00837       m_SH.cProperties--;
00838       return;
00839     }
00840   }
00841 }
00842
00843 void CPropertySection::RemoveAll( )
00844 {
00845   POSITION pos = m_PropList.GetHeadPosition();
00846   while ( pos != NULL )
00847     delete(CProperty*)m_PropList.GetNext( pos );
00848   m_PropList.RemoveAll();
00849   m_SH.cProperties = 0;
00850 }
00851
00852 CProperty* CPropertySection::GetProperty( DWORD dwPropID )
00853 {
00854   POSITION pos = m_PropList.GetHeadPosition();
00855   ASSERT_VALID(&m_PropList);
00856   CProperty* pProp;
00857   while (pos != NULL)
00858   {
00859     pProp= (CProperty*)m_PropList.GetNext( pos );
00860     ASSERT_VALID(pProp);
00861     if (pProp->m_dwPropID == dwPropID)
00862       return pProp;
00863   }
00864   return NULL;
00865 }
00866
00867 void CPropertySection::AddProperty( CProperty* pProp )
00868 {
00869   m_PropList.AddTail( pProp );
00870   m_SH.cProperties++;
00871 }
00872
00873 DWORD CPropertySection::GetSize( void )
00874 {   return m_SH.cbSection; }
00875
00876 DWORD CPropertySection::GetCount( void )
00877 {   return(DWORD)m_PropList.GetCount();  }
00878
00879 CObList* CPropertySection::GetList( void )
00880 {   return &m_PropList;  }
00881
00882 BOOL CPropertySection::WriteToStream( IStream* pIStream )
00883 {
00884   // Create a dummy property entry for the name dictionary(ID == 0).
00885   Set(0, NULL, VT_EMPTY);
00886
00887   ULONG           cb;
00888   ULARGE_INTEGER  ulSeekOld;
00889   ULARGE_INTEGER  ulSeek;
00890   LPSTREAM        pIStrPIDO;
00891   PROPERTYIDOFFSET  pido;
00892   LARGE_INTEGER   li;
00893
00894   // The Section header contains the number of bytes in the
00895   // section.  Thus we need  to go back to where we should
00896   // write the count of bytes
00897   // after we write all the property sets..
00898   // We accomplish this by saving the seek pointer to where
00899   // the size should be written in ulSeekOld
00900   m_SH.cbSection = 0;
00901   m_SH.cProperties = (DWORD)m_PropList.GetCount();
00902   LISet32( li, 0 );
00903   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeekOld);
00904
00905   pIStream->Write((LPVOID)&m_SH, sizeof(m_SH), &cb);
00906   if (sizeof(m_SH) != cb)
00907   {
00908     TRACE0("Write of section header failed(1).\n");
00909     return FALSE;
00910   }
00911
00912   if (m_PropList.IsEmpty())
00913   {
00914     TRACE0("Warning: Wrote empty property section.\n");
00915     return TRUE;
00916   }
00917
00918   // After the section header is the list of property ID/Offset pairs
00919   // Since there is an ID/Offset pair for each property and we
00920   // need to write the ID/Offset pair as we write each property
00921   // we clone the stream and use the clone to access the
00922   // table of ID/offset pairs(PIDO)...
00923   //
00924   pIStream->Clone( &pIStrPIDO );
00925
00926   // Now seek pIStream past the PIDO list
00927   //
00928   LISet32( li,  m_SH.cProperties * sizeof( PROPERTYIDOFFSET ) );
00929   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek);
00930
00931   // Now write each section to pIStream.
00932   CProperty* pProp = NULL;
00933   POSITION pos = m_PropList.GetHeadPosition();
00934   while ( pos != NULL )
00935   {
00936     // Get next element(note cast)
00937     pProp = (CProperty*)m_PropList.GetNext( pos );
00938
00939     if (pProp->m_dwPropID != 0)
00940     {
00941       // Write it
00942       if (!pProp->WriteToStream( pIStream ))
00943       {
00944         pIStrPIDO->Release();
00945         return FALSE;
00946       }
00947     }
00948     else
00949     {
00950       if (!WriteNameDictToStream( pIStream ))
00951       {
00952         pIStrPIDO->Release();
00953         return FALSE;
00954       }
00955     }
00956
00957     // Using our cloned stream write the Format ID / Offset pair
00958     // The offset to this property is the current seek pointer
00959     // minus the pointer to the beginning of the section
00960     pido.dwOffset = ulSeek.LowPart - ulSeekOld.LowPart;
00961     pido.propertyID = pProp->m_dwPropID;
00962     pIStrPIDO->Write((LPVOID)&pido, sizeof(pido), &cb);
00963     if (sizeof(pido) != cb)
00964     {
00965       TRACE0("Write of 'pido' failed\n");
00966       pIStrPIDO->Release();
00967       return FALSE;
00968     }
00969
00970     // Get the seek offset after the write
00971     LISet32( li, 0 );
00972     pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek );
00973   }
00974
00975   pIStrPIDO->Release();
00976
00977   // Now go back to ulSeekOld and write the section header.
00978   // Size of section is current seek point minus old seek point
00979   //
00980   m_SH.cbSection = ulSeek.LowPart - ulSeekOld.LowPart;
00981
00982   // Seek to beginning of this section and write the section header.
00983   LISet32( li, ulSeekOld.LowPart );
00984   pIStream->Seek( li, STREAM_SEEK_SET, NULL );
00985   pIStream->Write((LPVOID)&m_SH, sizeof(m_SH), &cb);
00986   if (sizeof(m_SH) != cb)
00987   {
00988     TRACE0("Write of section header failed(2).\n");
00989     return FALSE;
00990   }
00991
00992   // Now seek to end of of the now written section
00993   LISet32(li, ulSeek.LowPart);
00994   pIStream->Seek(li, STREAM_SEEK_SET, NULL);
00995
00996   return TRUE;
00997 }
00998
00999 BOOL CPropertySection::ReadFromStream( IStream* pIStream, LARGE_INTEGER liPropSet )
01000 {
01001   ULONG               cb;
01002   PROPERTYIDOFFSET    pido;
01003   ULONG               cProperties;
01004   LPSTREAM            pIStrPIDO;
01005   ULARGE_INTEGER      ulSectionStart;
01006   LARGE_INTEGER       li;
01007   CProperty*          pProp;
01008
01009   if (m_SH.cProperties || !m_PropList.IsEmpty())
01010     RemoveAll();
01011
01012   // pIStream is pointing to the beginning of the section we
01013   // are to read.  First there is a DWORD that is the count
01014   // of bytes in this section, then there is a count
01015   // of properties, followed by a list of propertyID/offset pairs, // followed by type/value pairs.
01016   //
01017   LISet32( li, 0 );
01018   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSectionStart );
01019   pIStream->Read((LPVOID)&m_SH, sizeof(m_SH), &cb );
01020   if (cb != sizeof(m_SH))
01021     return FALSE;
01022
01023   // Now we're pointing at the first of the PropID/Offset pairs
01024   //(PIDOs).   To get to each property we use a cloned stream
01025   // to stay back and point at the PIDOs(pIStrPIDO).  We seek
01026   // pIStream to each of the Type/Value pairs, creating CProperites
01027   // and so forth as we go...
01028   //
01029   pIStream->Clone( &pIStrPIDO );
01030
01031   cProperties = m_SH.cProperties;
01032   while (cProperties--)
01033   {
01034     pIStrPIDO->Read((LPVOID)&pido, sizeof( pido ), &cb );
01035     if (cb != sizeof(pido))
01036     {
01037       pIStrPIDO->Release();
01038       return FALSE;
01039     }
01040
01041     // Do a seek from the beginning of the property set.
01042     LISet32( li, ulSectionStart.LowPart + pido.dwOffset );
01043     pIStream->Seek( liPropSet, STREAM_SEEK_SET, NULL );
01044     pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
01045
01046     // Now pIStream is at the type/value pair
01047     if (pido.propertyID != 0)
01048     {
01049       pProp = new CProperty( pido.propertyID, NULL, 0 );
01050       pProp->ReadFromStream( pIStream );
01051       ASSERT_VALID(pProp);
01052       m_PropList.AddTail( pProp );
01053       ASSERT_VALID(&m_PropList);
01054     }
01055     else
01056     {
01057       ReadNameDictFromStream( pIStream );
01058     }
01059   }
01060
01061   pIStrPIDO->Release();
01062
01063   return TRUE;
01064 }
01065
01066 BOOL CPropertySection::GetID( LPCTSTR pszName, DWORD* pdwPropID )
01067 {
01068   CString strName(pszName);
01069   strName.MakeLower();        // Dictionary stores all names in lowercase
01070
01071   void* pvID;
01072   if (m_NameDict.Lookup(strName, pvID))
01073   {
01074     *pdwPropID = (DWORD)pvID;
01075     return TRUE;
01076   }
01077
01078   // Failed to find entry in dictionary
01079   return FALSE;
01080 }
01081
01082 BOOL CPropertySection::SetName( DWORD dwPropID, LPCTSTR pszName )
01083 {
01084   BOOL bSuccess = TRUE;
01085   CString strName(pszName);
01086   strName.MakeLower();        // Dictionary stores all names in lowercase
01087
01088   TRY
01089   {
01090     void* pDummy;
01091     BOOL bNameExists = m_NameDict.Lookup(strName, pDummy);
01092
01093     ASSERT(! bNameExists);  // Property names must be unique.
01094
01095     if (bNameExists)
01096       bSuccess = FALSE;
01097     else
01098       m_NameDict.SetAt(strName, (void*)dwPropID);
01099   }
01100   CATCH(CException, e)
01101   {
01102     TRACE0("Failed to add entry to dictionary.\n");
01103     bSuccess = FALSE;
01104   }
01105   END_CATCH
01106
01107     return bSuccess;
01108 }
01109
01110 struct DICTENTRYHEADER
01111 {
01112   DWORD dwPropID;
01113   DWORD cb;
01114 };
01115
01116 struct DICTENTRY
01117 {
01118   DICTENTRYHEADER hdr;
01119   char sz[256];
01120 };
01121
01122 BOOL CPropertySection::ReadNameDictFromStream( IStream* pIStream )
01123 {
01124   ULONG cb;
01125   ULONG cbRead = 0;
01126
01127   // Read dictionary header(count).
01128   ULONG cProperties = 0;
01129   pIStream->Read((LPVOID)&cProperties, sizeof(cProperties), &cb);
01130   if (sizeof(cProperties) != cb)
01131   {
01132     TRACE0("Read of dictionary header failed.\n");
01133     return FALSE;
01134   }
01135
01136   ULONG iProp;
01137   DICTENTRY entry;
01138
01139   for (iProp = 0; iProp < cProperties; iProp++)
01140   {
01141     // Read entry header(dwPropID, cch).
01142     if (FAILED(pIStream->Read((LPVOID)&entry, sizeof(DICTENTRYHEADER), &cbRead)) ||
01143       (sizeof(DICTENTRYHEADER) != cbRead))
01144     {
01145       TRACE0("Read of dictionary entry failed.\n");
01146       return FALSE;
01147     }
01148
01149     // Read entry data(name).
01150
01151     cb = entry.hdr.cb;
01152
01153     if (FAILED(pIStream->Read((LPVOID)entry.sz, cb, &cbRead)) ||
01154       (cbRead != cb))
01155     {
01156       TRACE0("Read of dictionary entry failed.\n");
01157       return FALSE;
01158     }
01159
01160     LPTSTR pszName;
01161
01162 #ifdef _UNICODE
01163     // Persistent form is always ANSI/DBCS.  Convert to Unicode.
01164     WCHAR wszName[256];
01165     MultiByteToWideChar(CP_ACP, 0, entry.sz, -1, wszName, 256);
01166     pszName = wszName;
01167 #else // _UNICODE
01168     pszName = entry.sz;
01169 #endif // _UNICODE
01170
01171     // Section's "name" appears first in list and has dwPropID == 0.
01172     if ((iProp == 0) &&(entry.hdr.dwPropID == 0))
01173       m_strSectionName = pszName;             // Section name
01174     else
01175       SetName(entry.hdr.dwPropID, pszName);   // Some other property
01176   }
01177
01178   return TRUE;
01179 }
01180
01181 static BOOL WriteNameDictEntry(IStream* pIStream, DWORD dwPropID, CString& strName)
01182 {
01183   ULONG cb;
01184   ULONG cbWritten = 0;
01185   DICTENTRY entry;
01186
01187   entry.hdr.dwPropID = dwPropID;
01188   entry.hdr.cb = min(strName.GetLength() + 1, 255);
01189 #ifdef _UNICODE
01190   // Persistent form is always ANSI/DBCS.  Convert from Unicode.
01191   WideCharToMultiByte(CP_ACP, 0, strName, -1, entry.sz, 256, NULL, NULL);
01192 #else // _UNICODE
01193   memcpy_s(entry.sz, 256, (LPCSTR)strName, (size_t)entry.hdr.cb);
01194 #endif // _UNICODE
01195
01196   cb = sizeof(DICTENTRYHEADER) + entry.hdr.cb;
01197
01198   if (FAILED(pIStream->Write((LPVOID)&entry, cb, &cbWritten)) ||
01199     (cbWritten != cb))
01200   {
01201     TRACE0("Write of dictionary entry failed.\n");
01202     return FALSE;
01203   }
01204
01205   return TRUE;
01206 }
01207
01208 BOOL CPropertySection::WriteNameDictToStream( IStream* pIStream )
01209 {
01210   ULONG cb;
01211
01212   // Write dictionary header(count).
01213   ULONG cProperties = (ULONG)(m_NameDict.GetCount() + 1);
01214   pIStream->Write((LPVOID)&cProperties, sizeof(cProperties), &cb);
01215   if (sizeof(cProperties) != cb)
01216   {
01217     TRACE0("Write of dictionary header failed.\n");
01218     return FALSE;
01219   }
01220
01221   POSITION pos;
01222   CString strName;
01223   void* pvID;
01224
01225   // Write out section's "name" with dwPropID == 0 first
01226   if (! WriteNameDictEntry(pIStream, 0, m_strSectionName))
01227     return FALSE;
01228
01229   // Enumerate contents of dictionary and write out(dwPropID, cb, name).
01230   pos = m_NameDict.GetStartPosition();
01231   while (pos != NULL)
01232   {
01233     m_NameDict.GetNextAssoc( pos, strName, pvID );
01234     if (! WriteNameDictEntry(pIStream, (DWORD)pvID, strName))
01235       return FALSE;
01236   }
01237
01238   return TRUE;
01239 }
01240
01241 BOOL CPropertySection::SetSectionName( LPCTSTR pszName )
01242 {
01243   m_strSectionName = pszName;
01244   return TRUE;
01245 }
01246
01247 LPCTSTR CPropertySection::GetSectionName( void )
01248 {
01249   return(LPCTSTR)m_strSectionName;
01250 }
01251
01252 /////////////////////////////////////////////////////////////////////////////
01253 // Implementation of the CPropertySet class
01254
01255 CPropertySet::CPropertySet( void )
01256 {
01257   m_PH.wByteOrder = 0xFFFE;
01258   m_PH.wFormat = 0;
01259   m_PH.dwOSVer = (DWORD)MAKELONG( LOWORD(GetVersion()), 2 );
01260   m_PH.clsID =  GUID_NULL;
01261   m_PH.cSections = 0;
01262
01263 }
01264
01265 CPropertySet::CPropertySet( CLSID clsID )
01266 {
01267   m_PH.wByteOrder = 0xFFFE;
01268   m_PH.wFormat = 0;
01269   m_PH.dwOSVer = (DWORD)MAKELONG( LOWORD(GetVersion()), 2 );
01270   m_PH.clsID = clsID;
01271   m_PH.cSections = 0;
01272 }
01273
01274 CPropertySet::~CPropertySet()
01275 {   RemoveAll();  }
01276
01277 BOOL CPropertySet::Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType )
01278 {
01279   CPropertySection* pSect = GetSection( FormatID );
01280   if (pSect == NULL)
01281   {
01282     if ((pSect = new CPropertySection( FormatID )) != NULL)
01283       AddSection( pSect );
01284   }
01285   pSect->Set( dwPropID, pValue, dwType );
01286   return TRUE;
01287 }
01288
01289 BOOL CPropertySet::Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue )
01290 {
01291   // Since there is no dwType, we have to assume that the property
01292   // already exists.  If it doesn't, fail.
01293   CPropertySection* pSect = GetSection( FormatID );
01294   if (pSect != NULL)
01295     return pSect->Set( dwPropID, pValue );
01296   else
01297     return FALSE;
01298 }
01299
01300 LPVOID CPropertySet::Get( CLSID FormatID, DWORD dwPropID, DWORD* pcb )
01301 {
01302   CPropertySection* pSect = GetSection( FormatID );
01303   if (pSect)
01304     return pSect->Get( dwPropID, pcb );
01305   else
01306     return NULL;
01307 }
01308
01309 LPVOID CPropertySet::Get( CLSID FormatID, DWORD dwPropID )
01310 {   return Get( FormatID, dwPropID, (DWORD*)NULL ); }
01311
01312 void CPropertySet::Remove( CLSID FormatID, DWORD dwPropID )
01313 {
01314   CPropertySection*  pSect = GetSection( FormatID );
01315   if (pSect)
01316     pSect->Remove( dwPropID );
01317 }
01318
01319 void CPropertySet::Remove( CLSID FormatID )
01320 {
01321   CPropertySection* pSect;
01322   POSITION posRemove = m_SectionList.GetHeadPosition();
01323   POSITION pos = posRemove;
01324   while ( posRemove != NULL )
01325   {
01326     pSect = (CPropertySection*)m_SectionList.GetNext( pos );
01327     if (IsEqualCLSID( pSect->m_FormatID, FormatID ))
01328     {
01329       m_SectionList.RemoveAt( posRemove );
01330       delete pSect;
01331       m_PH.cSections--;
01332       return;
01333     }
01334     posRemove = pos;
01335   }
01336 }
01337
01338 void CPropertySet::RemoveAll( )
01339 {
01340   POSITION pos = m_SectionList.GetHeadPosition();
01341   while ( pos != NULL )
01342   {
01343     delete(CPropertySection*)m_SectionList.GetNext( pos );
01344   }
01345   m_SectionList.RemoveAll();
01346   m_PH.cSections = 0;
01347 }
01348
01349 CPropertySection* CPropertySet::GetSection( CLSID FormatID )
01350 {
01351   POSITION pos = m_SectionList.GetHeadPosition();
01352   CPropertySection* pSect;
01353   while (pos != NULL)
01354   {
01355     pSect = (CPropertySection*)m_SectionList.GetNext( pos );
01356     if (IsEqualCLSID( pSect->m_FormatID, FormatID ))
01357       return pSect;
01358   }
01359   return NULL;
01360 }
01361
01362 CPropertySection* CPropertySet::AddSection( CLSID FormatID )
01363 {
01364   CPropertySection* pSect = GetSection( FormatID );
01365   if (pSect)
01366     return pSect;
01367
01368   pSect = new CPropertySection( FormatID ) ;
01369   if (pSect)
01370     AddSection( pSect );
01371   return pSect;
01372 }
01373
01374 void CPropertySet::AddSection( CPropertySection* pSect )
01375 {
01376   m_SectionList.AddTail( pSect );
01377   m_PH.cSections++;
01378 }
01379
01380 CProperty* CPropertySet::GetProperty( CLSID FormatID, DWORD dwPropID )
01381 {
01382   CPropertySection* pSect = GetSection( FormatID );
01383   if (pSect)
01384     return pSect->GetProperty( dwPropID );
01385   else
01386     return NULL;
01387 }
01388
01389 void CPropertySet::AddProperty( CLSID FormatID, CProperty* pProp )
01390 {
01391   CPropertySection* pSect = GetSection( FormatID );
01392   if (pSect)
01393     pSect->AddProperty( pProp );
01394 }
01395
01396 WORD CPropertySet::GetByteOrder( void )
01397 {   return m_PH.wByteOrder;  }
01398
01399 WORD CPropertySet::GetFormatVersion( void )
01400 {   return m_PH.wFormat;  }
01401
01402 void CPropertySet::SetFormatVersion( WORD wFmtVersion )
01403 {   m_PH.wFormat = wFmtVersion;  }
01404
01405 DWORD CPropertySet::GetOSVersion( void )
01406 {   return m_PH.dwOSVer;  }
01407
01408 void CPropertySet::SetOSVersion( DWORD dwOSVer )
01409 {   m_PH.dwOSVer = dwOSVer;  }
01410
01411 CLSID CPropertySet::GetClassID( void )
01412 {   return m_PH.clsID;  }
01413
01414 void CPropertySet::SetClassID( CLSID clsID )
01415 {   m_PH.clsID = clsID;  }
01416
01417 DWORD CPropertySet::GetCount( void )
01418 {   return(DWORD)m_SectionList.GetCount();  }
01419
01420 CObList* CPropertySet::GetList( void )
01421 {   return &m_SectionList;  }
01422
01423 BOOL CPropertySet::WriteToStream( IStream* pIStream )
01424 {
01425   LPSTREAM        pIStrFIDO;
01426   FORMATIDOFFSET  fido;
01427   ULONG           cb;
01428   ULARGE_INTEGER  ulSeek;
01429   LARGE_INTEGER   li;
01430
01431   // Write the Property List Header
01432   m_PH.cSections = (DWORD)m_SectionList.GetCount();
01433   pIStream->Write((LPVOID)&m_PH, sizeof(m_PH), &cb);
01434   if (sizeof(m_PH) != cb)
01435   {
01436     TRACE0("Write of Property Set Header failed.\n");
01437     return FALSE;
01438   }
01439
01440   if (m_SectionList.IsEmpty())
01441   {
01442     TRACE0("Warning: Wrote empty property set.\n");
01443     return TRUE;
01444   }
01445
01446   // After the header is the list of Format ID/Offset pairs
01447   // Since there is an ID/Offset pair for each section and we
01448   // need to write the ID/Offset pair as we write each section
01449   // we clone the stream and use the clone to access the
01450   // table of ID/offset pairs(FIDO)...
01451   //
01452   pIStream->Clone( &pIStrFIDO );
01453
01454   // Now seek pIStream past the FIDO list
01455   //
01456   LISet32( li, m_PH.cSections * sizeof( FORMATIDOFFSET ) );
01457   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek);
01458
01459   // Write each section.
01460   CPropertySection*   pSect = NULL;
01461   POSITION            pos = m_SectionList.GetHeadPosition();
01462   while ( pos != NULL )
01463   {
01464     // Get next element(note cast)
01465     pSect = (CPropertySection*)m_SectionList.GetNext( pos );
01466
01467     // Write it
01468     if (!pSect->WriteToStream( pIStream ))
01469     {
01470       pIStrFIDO->Release();
01471       return FALSE;
01472     }
01473
01474     // Using our cloned stream write the Format ID / Offset pair
01475     fido.formatID = pSect->m_FormatID;
01476     fido.dwOffset = ulSeek.LowPart;
01477     pIStrFIDO->Write((LPVOID)&fido, sizeof(fido), &cb);
01478     if (sizeof(fido) != cb)
01479     {
01480       TRACE0("Write of 'fido' failed.\n");
01481       pIStrFIDO->Release();
01482       return FALSE;
01483     }
01484
01485     // Get the seek offset(for pIStream) after the write
01486     LISet32( li, 0 );
01487     pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek );
01488   }
01489
01490   pIStrFIDO->Release();
01491
01492   return TRUE;
01493 }
01494
01495 BOOL CPropertySet::ReadFromStream( IStream* pIStream )
01496 {
01497   ULONG               cb;
01498   FORMATIDOFFSET      fido;
01499   ULONG               cSections;
01500   LPSTREAM            pIStrFIDO;
01501   CPropertySection*   pSect;
01502   LARGE_INTEGER       li;
01503   LARGE_INTEGER       liPropSet;
01504
01505   // Save the stream position at which the property set starts.
01506   LARGE_INTEGER liZero = {0,0};
01507   pIStream->Seek( liZero, STREAM_SEEK_CUR, (ULARGE_INTEGER*)&liPropSet );
01508
01509   if (m_PH.cSections || !m_SectionList.IsEmpty())
01510     RemoveAll();
01511
01512   // The stream starts like this:
01513   //  wByteOrder   wFmtVer   dwOSVer   clsID  cSections
01514   // Which is nice, because our PROPHEADER is the same!
01515   pIStream->Read((LPVOID)&m_PH, sizeof( m_PH ), &cb );
01516   if (cb != sizeof(m_PH))
01517     return FALSE;
01518
01519   // Now we're pointing at the first of the FormatID/Offset pairs
01520   //(FIDOs).   To get to each section we use a cloned stream
01521   // to stay back and point at the FIDOs(pIStrFIDO).  We seek
01522   // pIStream to each of the sections, creating CProperitySection
01523   // and so forth as we go...
01524   //
01525   pIStream->Clone( &pIStrFIDO );
01526
01527   cSections = m_PH.cSections;
01528   while (cSections--)
01529   {
01530     pIStrFIDO->Read((LPVOID)&fido, sizeof( fido ), &cb );
01531     if (cb != sizeof(fido))
01532     {
01533       pIStrFIDO->Release();
01534       return FALSE;
01535     }
01536
01537     // Do a seek from the beginning of the property set.
01538     LISet32( li, fido.dwOffset );
01539     pIStream->Seek( liPropSet, STREAM_SEEK_SET, NULL );
01540     pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
01541
01542     // Now pIStream is at the type/value pair
01543     pSect = new CPropertySection;
01544     pSect->SetFormatID( fido.formatID );
01545     pSect->ReadFromStream( pIStream, liPropSet );
01546     m_SectionList.AddTail( pSect );
01547   }
01548
01549   pIStrFIDO->Release();
01550   return TRUE;
01551 }
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncVw.cpp Source File

  • general
  • mdidocvw

BncVw.cpp

Go to the documentation of this file.
00001 // BounceVw.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "MDI.h"
00015
00016 #include "BncDoc.h"
00017 #include "BncVw.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 #define ABS(x) ((x) < 0? -(x) : (x) > 0? (x) : 0)
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CBounceView
00029
00030 IMPLEMENT_DYNCREATE(CBounceView, CView)
00031
00032 CBounceView::CBounceView()
00033 {
00034 }
00035
00036 CBounceView::~CBounceView()
00037 {
00038 }
00039
00040
00041 BEGIN_MESSAGE_MAP(CBounceView, CView)
00042   //{{AFX_MSG_MAP(CBounceView)
00043   ON_COMMAND(ID_CUSTOM, OnCustomColor)
00044   ON_COMMAND(ID_SPEED_FAST, OnFast)
00045   ON_COMMAND(ID_SPEED_SLOW, OnSlow)
00046   ON_WM_CREATE()
00047   ON_WM_SIZE()
00048   ON_WM_TIMER()
00049   ON_UPDATE_COMMAND_UI(ID_SPEED_FAST, OnUpdateFast)
00050   ON_UPDATE_COMMAND_UI(ID_SPEED_SLOW, OnUpdateSlow)
00051   ON_UPDATE_COMMAND_UI(ID_CUSTOM, OnUpdateCustom)
00052   ON_UPDATE_COMMAND_UI(ID_BLACK, OnUpdateBlack)
00053   ON_UPDATE_COMMAND_UI(ID_BLUE, OnUpdateBlue)
00054   ON_UPDATE_COMMAND_UI(ID_GREEN, OnUpdateGreen)
00055   ON_UPDATE_COMMAND_UI(ID_RED, OnUpdateRed)
00056   ON_UPDATE_COMMAND_UI(ID_WHITE, OnUpdateWhite)
00057   ON_COMMAND(ID_BLACK, OnColor)
00058   ON_COMMAND(ID_BLUE, OnColor)
00059   ON_COMMAND(ID_GREEN, OnColor)
00060   ON_COMMAND(ID_RED, OnColor)
00061   ON_COMMAND(ID_WHITE, OnColor)
00062   //}}AFX_MSG_MAP
00063 END_MESSAGE_MAP()
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CBounceView drawing
00067 #pragma warning(disable : 4189)
00068 void CBounceView::OnDraw(CDC* /*pDC*/)
00069 {
00070   CDocument* pDoc = GetDocument();
00071
00072 // NOTE: Because the animation depends on timer events
00073 // and resizing of the window, the rendering code is
00074 // mostly found in the MakeNewBall function; called by handlers
00075 // for WM_TIMER and WM_SIZE commands. These handlers make the code easier
00076 // to read. However, the side-effect is that the ball will not be
00077 // rendered when the document is printed because there is no rendering
00078 // code in the OnDraw override.
00079
00080 }
00081 #pragma warning(default : 4189)
00082
00083 /////////////////////////////////////////////////////////////////////////////
00084 // CBounceView diagnostics
00085
00086 #ifdef _DEBUG
00087 void CBounceView::AssertValid() const
00088 {
00089   CView::AssertValid();
00090 }
00091
00092 void CBounceView::Dump(CDumpContext& dc) const
00093 {
00094   CView::Dump(dc);
00095 }
00096
00097 CBounceDoc* CBounceView::GetDocument() // non-debug version is inline
00098 {
00099   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBounceDoc)));
00100   return (CBounceDoc*)m_pDocument;
00101 }
00102 #endif //_DEBUG
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CBounceView message handlers
00106
00107 void CBounceView::ChangeSpeed()
00108 {
00109   CBounceDoc* pDoc = GetDocument();
00110   ASSERT_VALID(pDoc);
00111
00112 // re-create the timer
00113   KillTimer(1);
00114   if (!SetTimer(1, pDoc->m_bFastSpeed ? 0 : 100, NULL))
00115   {
00116     AfxMessageBox(_T("Not enough timers available for this window"),
00117       MB_ICONEXCLAMATION | MB_OK);
00118     DestroyWindow();
00119   }
00120 }
00121
00122 void CBounceView::MakeNewBall()
00123 {
00124
00125 // Computes the attributes of the ball bitmap using
00126 // aspect and window size
00127
00128   CBounceDoc* pDoc = GetDocument();
00129   ASSERT_VALID(pDoc);
00130
00131   CSize radius, move, total;
00132   CBitmap* pbmBall;
00133
00134   pbmBall = &(pDoc->m_bmBall);
00135   radius = pDoc->m_sizeRadius;
00136   move = pDoc->m_sizeMove;
00137
00138   total.cx = (radius.cx + ABS(move.cx)) << 1;
00139   total.cy = (radius.cy + ABS(move.cy)) << 1;
00140   pDoc->m_sizeTotal = total;
00141
00142   if (pbmBall->m_hObject != NULL)
00143     pbmBall->DeleteObject();        //get rid of old bitmap
00144
00145   CClientDC dc(this);
00146   CDC dcMem;
00147   dcMem.CreateCompatibleDC(&dc);
00148
00149   pbmBall->CreateCompatibleBitmap(&dc, total.cx, total.cy);
00150   ASSERT(pbmBall->m_hObject != NULL);
00151
00152   CBitmap* pOldBitmap = dcMem.SelectObject(pbmBall);
00153
00154   // draw a rectangle in the background (window) color
00155
00156   CRect rect(0, 0, total.cx, total.cy);
00157   CBrush brBackground(::GetSysColor(COLOR_WINDOW));
00158   dcMem.FillRect(rect, &brBackground);
00159
00160   CBrush brCross(HS_DIAGCROSS, 0L);
00161   CBrush* pOldBrush = dcMem.SelectObject(&brCross);
00162
00163   dcMem.SetBkColor(pDoc->m_clrBall);
00164   dcMem.Ellipse(ABS(move.cx), ABS(move.cy),
00165     total.cx - ABS(move.cx),
00166     total.cy - ABS(move.cy));
00167
00168   dcMem.SelectObject(pOldBrush);
00169   dcMem.SelectObject(pOldBitmap);
00170   dcMem.DeleteDC();
00171 }
00172
00173 void CBounceView::OnFast()
00174 {
00175   CBounceDoc* pDoc = GetDocument();
00176   ASSERT_VALID(pDoc);
00177
00178   pDoc->m_bFastSpeed = TRUE;
00179   ChangeSpeed();
00180 }
00181
00182 void CBounceView::OnSlow()
00183 {
00184   CBounceDoc* pDoc = GetDocument();
00185   ASSERT_VALID(pDoc);
00186
00187   pDoc->m_bFastSpeed = FALSE;
00188   ChangeSpeed();
00189 }
00190
00191 int CBounceView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00192 {
00193   if (CView::OnCreate(lpCreateStruct) == -1)
00194     return -1;
00195
00196   CBounceDoc* pDoc = GetDocument();
00197   ASSERT_VALID(pDoc);
00198
00199   if (!SetTimer(1, 100 /* start slow */, NULL))
00200   {
00201     MessageBox(_T("Not enough timers available for this window."),
00202         _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);
00203
00204     // signal creation failure...
00205     return -1;
00206   }
00207
00208   // Get the aspect ratio of the device the ball will be drawn
00209   // on and then update the document data with the correct value.
00210
00211   CDC* pDC = GetDC();
00212   CPoint aspect;
00213   aspect.x = pDC->GetDeviceCaps(ASPECTX);
00214   aspect.y = pDC->GetDeviceCaps(ASPECTY);
00215   ReleaseDC(pDC);
00216   pDoc->m_ptPixel = aspect;
00217
00218   // Note that we could call MakeNewBall here (which should be called
00219   // whenever the ball's speed, color or size has been changed), but the
00220   // OnSize member function is always called after the OnCreate. Since
00221   // the OnSize member has to call MakeNewBall anyway, we don't here.
00222
00223   return 0;
00224 }
00225
00226 void CBounceView::OnSize(UINT nType, int cx, int cy)
00227 {
00228   CView::OnSize(nType, cx, cy);
00229
00230   CBounceDoc* pDoc = GetDocument();
00231   ASSERT_VALID(pDoc);
00232
00233   LONG lScale;
00234   CPoint center, ptPixel;
00235
00236   center.x = cx >> 1;
00237   center.y = cy >> 1;
00238   center.x += cx >> 3; // make the ball a little off-center
00239   pDoc->m_ptCenter = center;
00240
00241   CSize radius, move;
00242
00243   // Because the window size has changed, re-calculate
00244   // the ball's dimensions.
00245
00246   ptPixel = pDoc->m_ptPixel;
00247
00248   lScale = min((LONG)cx * ptPixel.x,
00249     (LONG)cy * ptPixel.y) >> 4;
00250
00251   radius.cx = (int)(lScale / ptPixel.x);
00252   radius.cy = (int)(lScale / ptPixel.y);
00253   pDoc->m_sizeRadius = radius;
00254
00255   //Re-calculate the ball's rate of movement.
00256
00257   move.cx = max(1, radius.cy >> 2);
00258   move.cy = max(1, radius.cy >> 2);
00259   pDoc->m_sizeMove = move;
00260
00261   // Redraw ball.
00262
00263   MakeNewBall();
00264 }
00265
00266 void CBounceView::OnTimer(UINT_PTR /*nIDEvent*/)
00267 {
00268   //Time to redraw the ball.
00269
00270   CBounceDoc* pDoc = GetDocument();
00271   ASSERT_VALID(pDoc);
00272
00273   CBitmap* pbmBall;
00274   pbmBall = &(pDoc->m_bmBall);
00275
00276   if (pbmBall->m_hObject == NULL)
00277     return;     // no bitmap for the ball
00278
00279   // Get the current dimensions and create
00280   // a compatible DC to work with.
00281
00282   CRect rcClient;
00283   GetClientRect(rcClient);
00284
00285   CClientDC dc(this);
00286   CBitmap* pbmOld = NULL;
00287
00288   CDC dcMem;
00289   dcMem.CreateCompatibleDC(&dc);
00290   pbmOld = dcMem.SelectObject(pbmBall);
00291
00292   CPoint center;
00293   CSize total, move, radius;
00294
00295   // Get the current dimensions and create
00296   // a compatible DC to work with.
00297
00298   center = pDoc->m_ptCenter;
00299   radius = pDoc->m_sizeRadius;
00300   total = pDoc->m_sizeTotal;
00301   move = pDoc->m_sizeMove;
00302
00303   // Now that the ball has been updated, draw it
00304   // by BitBlt'ing to the view.
00305
00306   dc.BitBlt(center.x - total.cx / 2, center.y - total.cy / 2,
00307       total.cx, total.cy, &dcMem, 0, 0, SRCCOPY);
00308
00309   // Move ball and check for collisions
00310
00311   center += move;
00312   pDoc->m_ptCenter = center;
00313
00314   if ((center.x + radius.cx >= rcClient.right) ||
00315     (center.x - radius.cx <= 0))
00316   {
00317     move.cx = -move.cx;
00318   }
00319
00320   if ((center.y + radius.cy >= rcClient.bottom) ||
00321     (center.y - radius.cy <= 0))
00322   {
00323     move.cy = -move.cy;
00324   }
00325   pDoc->m_sizeMove = move;
00326
00327   dcMem.SelectObject(pbmOld);
00328   dcMem.DeleteDC();
00329 }
00330
00331 void CBounceView::OnUpdateFast(CCmdUI* pCmdUI)
00332 {
00333   CBounceDoc* pDoc = GetDocument();
00334   ASSERT_VALID(pDoc);
00335
00336   pCmdUI->SetCheck(pDoc->m_bFastSpeed);
00337
00338 }
00339
00340 void CBounceView::OnUpdateSlow(CCmdUI* pCmdUI)
00341 {
00342   CBounceDoc* pDoc = GetDocument();
00343   ASSERT_VALID(pDoc);
00344
00345   pCmdUI->SetCheck(!pDoc->m_bFastSpeed);
00346 }
00347
00348 void CBounceView::OnCustomColor()
00349 {
00350   CBounceDoc* pDoc = GetDocument();
00351   ASSERT_VALID(pDoc);
00352
00353   CColorDialog dlgColor(pDoc->m_clrBall);
00354   if (dlgColor.DoModal() == IDOK)
00355   {
00356     pDoc->SetCustomBallColor(dlgColor.GetColor());
00357     pDoc->ClearAllColors();
00358     pDoc->m_bCustom = TRUE;
00359     MakeNewBall();
00360   }
00361 }
00362
00363 void CBounceView::OnUpdateCustom(CCmdUI* pCmdUI)
00364 {
00365   CBounceDoc* pDoc = GetDocument();
00366   ASSERT_VALID(pDoc);
00367
00368   pCmdUI->SetCheck(pDoc->m_bCustom);
00369 }
00370
00371 void CBounceView::MixColors()
00372 {
00373 // This function will take the current color selections, mix
00374 // them, and use the result as the current color of the ball.
00375
00376   CBounceDoc* pDoc = GetDocument();
00377   ASSERT_VALID(pDoc);
00378
00379   COLORREF tmpClr;
00380   int r, g, b;
00381   BOOL bSetColor;
00382
00383   bSetColor = pDoc->m_bRed || pDoc->m_bGreen || pDoc->m_bBlue
00384     || pDoc->m_bWhite || pDoc->m_bBlack;
00385   if(!bSetColor && pDoc->m_bCustom)
00386     return;
00387
00388   r = g = b = 0;
00389
00390   if(pDoc->m_bRed)
00391     r = 255;
00392   if(pDoc->m_bGreen)
00393     g = 255;
00394   if(pDoc->m_bBlue)
00395     b = 255;
00396   tmpClr = RGB(r, g, b);
00397
00398 // NOTE: Because a simple algorithm is used to mix colors
00399 // if the current selection contains black or white, the
00400 // result will be black or white; respectively. This is due
00401 // to the additive method for mixing the colors
00402
00403   if(pDoc->m_bWhite)
00404     tmpClr = RGB(255, 255, 255);
00405
00406   if((pDoc->m_bBlack))
00407     tmpClr = RGB(0, 0, 0);
00408
00409   // Once the color has been determined, update document
00410   // data, and force repaint of all views.
00411
00412   if(!bSetColor)
00413     pDoc->m_bBlack = TRUE;
00414    pDoc->m_clrBall = tmpClr;
00415    pDoc->m_bCustom = FALSE;
00416    MakeNewBall();
00417 }
00418 void CBounceView::OnUpdateBlack(CCmdUI* pCmdUI)
00419 {
00420   CBounceDoc* pDoc = GetDocument();
00421   ASSERT_VALID(pDoc);
00422
00423   pCmdUI->SetCheck(pDoc->m_bBlack);
00424 }
00425
00426 void CBounceView::OnUpdateWhite(CCmdUI* pCmdUI)
00427 {
00428   CBounceDoc* pDoc = GetDocument();
00429   ASSERT_VALID(pDoc);
00430
00431   pCmdUI->SetCheck(pDoc->m_bWhite);
00432 }
00433
00434 void CBounceView::OnUpdateBlue(CCmdUI* pCmdUI)
00435 {
00436   CBounceDoc* pDoc = GetDocument();
00437   ASSERT_VALID(pDoc);
00438
00439   pCmdUI->SetCheck(pDoc->m_bBlue);
00440 }
00441
00442 void CBounceView::OnUpdateGreen(CCmdUI* pCmdUI)
00443 {
00444   CBounceDoc* pDoc = GetDocument();
00445   ASSERT_VALID(pDoc);
00446
00447   pCmdUI->SetCheck(pDoc->m_bGreen);
00448 }
00449
00450 void CBounceView::OnUpdateRed(CCmdUI* pCmdUI)
00451 {
00452   CBounceDoc* pDoc = GetDocument();
00453   ASSERT_VALID(pDoc);
00454
00455   pCmdUI->SetCheck(pDoc->m_bRed);
00456 }
00457
00458 void CBounceView::OnColor()
00459 {
00460   CBounceDoc* pDoc = GetDocument();
00461   ASSERT_VALID(pDoc);
00462
00463   UINT m_nIDColor;
00464
00465   m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
00466
00467 // Determines the color being modified
00468 // and then updates the color state
00469
00470   switch(m_nIDColor)
00471   {
00472    case ID_BLACK:
00473     pDoc->ClearAllColors();
00474     pDoc->m_bBlack = !(pDoc->m_bBlack);
00475     break;
00476    case ID_WHITE:
00477     pDoc->ClearAllColors();
00478     pDoc->m_bWhite = !(pDoc->m_bWhite);
00479     break;
00480    case ID_RED:
00481     pDoc->m_bRed = !(pDoc->m_bRed);
00482     pDoc->m_bBlack = FALSE;
00483     pDoc->m_bWhite = FALSE;
00484     break;
00485    case ID_GREEN:
00486     pDoc->m_bGreen = !(pDoc->m_bGreen);
00487     pDoc->m_bBlack = FALSE;
00488     pDoc->m_bWhite = FALSE;
00489     break;
00490    case ID_BLUE:
00491     pDoc->m_bBlue = !(pDoc->m_bBlue);
00492     pDoc->m_bBlack = FALSE;
00493     pDoc->m_bWhite = FALSE;
00494     break;
00495    default:
00496      AfxMessageBox(IDS_UNKCOLOR);
00497      return;
00498   }
00499   MixColors();
00500 }
00501
00502 BOOL CBounceView::PreCreateWindow(CREATESTRUCT& cs)
00503 {
00504   if (!CView::PreCreateWindow(cs))
00505     return FALSE;
00506
00507   cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW,
00508       AfxGetApp()->LoadStandardCursor(IDC_SIZENS),
00509       (HBRUSH)(COLOR_WINDOW+1));
00510
00511   if (cs.lpszClass != NULL)
00512     return TRUE;
00513   else
00514     return FALSE;
00515 }
00516
00517 void CBounceView::OnInitialUpdate()
00518 {
00519   CView::OnInitialUpdate();
00520
00521   MixColors();
00522 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/dialogs.cpp Source File

  • ole
  • acdual

dialogs.cpp

Go to the documentation of this file.
00001 // Dialogs.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014 #include "Dialogs.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CChangeText dialog
00023
00024
00025 CChangeText::CChangeText(CWnd* pParent /*=NULL*/)
00026   : CDialog(CChangeText::IDD, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CChangeText)
00029   m_str = _T("");
00030   //}}AFX_DATA_INIT
00031 }
00032
00033
00034 void CChangeText::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CChangeText)
00038   DDX_Text(pDX, IDC_EDIT1, m_str);
00039   //}}AFX_DATA_MAP
00040 }
00041
00042
00043 BEGIN_MESSAGE_MAP(CChangeText, CDialog)
00044   //{{AFX_MSG_MAP(CChangeText)
00045     // NOTE: the ClassWizard will add message map macros here
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CChangeText message handlers
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ResourceView.h Source File

  • vc2008fp
  • VisualStudioDemo

ResourceView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "ClassTreeWnd.h"
00013
00014 class CResourceViewBar : public CDockablePane
00015 {
00016 // Construction
00017 public:
00018   CResourceViewBar();
00019
00020 // Attributes
00021 protected:
00022   CClassTreeWnd m_wndResourceView;
00023   CImageList m_ResourceViewImages;
00024
00025 public:
00026   void OnChangeVisualStyle();
00027
00028 protected:
00029   void FillResourceView();
00030
00031 // Implementation
00032 public:
00033   virtual ~CResourceViewBar();
00034
00035 protected:
00036   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00037   afx_msg void OnSize(UINT nType, int cx, int cy);
00038   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00039   afx_msg void OnEditCut();
00040   afx_msg void OnEditCopy();
00041   afx_msg void OnEditPaste();
00042   afx_msg void OnEditClear();
00043   afx_msg void OnPaint();
00044   afx_msg void OnSetFocus(CWnd* pOldWnd);
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMfcieView Member List

This is the complete list of members for CMfcieView, including all inherited members.
CMfcieView() | CMfcieView | [protected]
GetDocument() | CMfcieView | [inline]
OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray &baPostedData, LPCTSTR lpszHeaders, BOOL *pbCancel) | CMfcieView |
OnDocumentComplete(LPCTSTR lpszUrl) | CMfcieView |
OnDraw(CDC *pDC) | CMfcieView | [virtual]
OnFileOpen() | CMfcieView | [protected]
OnGoBack() | CMfcieView | [protected]
OnGoForward() | CMfcieView | [protected]
OnGoSearchTheWeb() | CMfcieView | [protected]
OnGoStartPage() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebBestOfTheWeb() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebFreeStuff() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebGetFasterInternetAccess() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebInternetStartPage() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebMicrosoftHomePage() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebSearchTheWeb() | CMfcieView | [protected]
OnHelpMicrosoftOnTheWebSendFeedback() | CMfcieView | [protected]
OnHelpOnlineSupport() | CMfcieView | [protected]
OnHelpWebTutorial() | CMfcieView | [protected]
OnInitialUpdate() | CMfcieView | [virtual]
OnTitleChange(LPCTSTR lpszText) | CMfcieView |
OnViewFontsLarge() | CMfcieView | [protected]
OnViewFontsLargest() | CMfcieView | [protected]
OnViewFontsMedium() | CMfcieView | [protected]
OnViewFontsSmall() | CMfcieView | [protected]
OnViewFontsSmallest() | CMfcieView | [protected]
OnViewRefresh() | CMfcieView | [protected]
OnViewStop() | CMfcieView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CMfcieView | [virtual]
~CMfcieView() | CMfcieView | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ScreenCap.h Source File

  • advanced
  • DllScreenCap
  • ScreenCap

ScreenCap.h

Go to the documentation of this file.
00001 // ScreenCap.h : main header file for the ScreenCap application
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019
00020 // CScreenCapApp:
00021 // See ScreenCap.cpp for the implementation of this class
00022 //
00023
00024 class CScreenCapApp : public CWinApp
00025 {
00026 public:
00027   CScreenCapApp();
00028
00029
00030 // Overrides
00031 public:
00032   virtual BOOL InitInstance();
00033
00034 // Implementation
00035
00036 public:
00037   afx_msg void OnAppAbout();
00038   DECLARE_MESSAGE_MAP()
00039   BOOL PreTranslateMessage(MSG* pMsg);
00040   BOOL OnIdle(LONG lCount);
00041 };
00042
00043 extern CScreenCapApp theApp;
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/propsht.cpp Source File

  • general
  • CmnCtrl1

propsht.cpp

Go to the documentation of this file.
00001 // AllControlsSheet.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl1.h"
00015 #include "propsht.h"
00016 #include "mtreectl.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 class CAboutDlg : public CDialog
00025 {
00026 public:
00027   CAboutDlg();
00028
00029 // Dialog Data
00030   //{{AFX_DATA(CAboutDlg)
00031   enum { IDD = IDD_ABOUTBOX };
00032   //}}AFX_DATA
00033
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CAboutDlg)
00036   protected:
00037   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 protected:
00042   //{{AFX_MSG(CAboutDlg)
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00048 {
00049   //{{AFX_DATA_INIT(CAboutDlg)
00050   //}}AFX_DATA_INIT
00051 }
00052
00053 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00054 {
00055   CDialog::DoDataExchange(pDX);
00056   //{{AFX_DATA_MAP(CAboutDlg)
00057   //}}AFX_DATA_MAP
00058 }
00059
00060 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00061   //{{AFX_MSG_MAP(CAboutDlg)
00062     // No message handlers
00063   //}}AFX_MSG_MAP
00064 END_MESSAGE_MAP()
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CAllControlsSheet
00068
00069 IMPLEMENT_DYNAMIC(CAllControlsSheet, CPropertySheet)
00070
00071 CAllControlsSheet::CAllControlsSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00072   :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00073 {
00074   AddControlPages();
00075
00076   // TODO :: Add the pages for the rest of the controls here.
00077 }
00078
00079 CAllControlsSheet::CAllControlsSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00080   :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00081 {
00082   AddControlPages();
00083 }
00084
00085 CAllControlsSheet::~CAllControlsSheet()
00086 {
00087 }
00088
00089 void CAllControlsSheet::AddControlPages()
00090 {
00091   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00092   m_psh.dwFlags |= PSP_USEHICON;
00093   m_psh.hIcon = m_hIcon;
00094   m_psh.dwFlags |= PSH_NOAPPLYNOW;    // Lose the Apply Now button
00095   m_psh.dwFlags &= ~PSH_HASHELP;  // Lose the Help button
00096
00097   AddPage(&m_treectrlpage);
00098   AddPage(&m_animctrlpage);
00099   AddPage(&m_toolbarpage);
00100   AddPage(&m_datetimepage);
00101   AddPage(&m_monthcalpage);
00102 }
00103
00104 BEGIN_MESSAGE_MAP(CAllControlsSheet, CPropertySheet)
00105   //{{AFX_MSG_MAP(CAllControlsSheet)
00106   ON_WM_QUERYDRAGICON()
00107   ON_WM_SYSCOMMAND()
00108   //}}AFX_MSG_MAP
00109 END_MESSAGE_MAP()
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CAllControlsSheet message handlers
00113
00114 BOOL CAllControlsSheet::OnInitDialog()
00115 {
00116   // Add "About..." menu item to system menu.
00117
00118   // IDM_ABOUTBOX must be in the system command range.
00119   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00120   ASSERT(IDM_ABOUTBOX < 0xF000);
00121
00122   CMenu* pSysMenu = GetSystemMenu(FALSE);
00123   if (pSysMenu != NULL)
00124   {
00125     CString strAboutMenu;
00126     strAboutMenu.LoadString(IDS_ABOUTBOX);
00127     if (!strAboutMenu.IsEmpty())
00128     {
00129       pSysMenu->AppendMenu(MF_SEPARATOR);
00130       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00131     }
00132   }
00133
00134   SetIcon(m_hIcon, TRUE);
00135   SetIcon(m_hIcon, FALSE);
00136   return CPropertySheet::OnInitDialog();
00137 }
00138 HCURSOR CAllControlsSheet::OnQueryDragIcon()
00139 {
00140   return (HCURSOR) m_hIcon;
00141 }
00142
00143 void CAllControlsSheet::OnSysCommand(UINT nID, LPARAM lParam)
00144 {
00145   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00146   {
00147     CAboutDlg dlgAbout;
00148     dlgAbout.DoModal();
00149   }
00150   else
00151   {
00152     CPropertySheet::OnSysCommand(nID, lParam);
00153   }
00154 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

RibbonTooltipCtrl.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "RibbonTooltipCtrl.h"
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CRibbonTooltipCtrl
00025
00026 IMPLEMENT_DYNCREATE(CRibbonTooltipCtrl, CMFCToolTipCtrl)
00027
00028 CRibbonTooltipCtrl::CRibbonTooltipCtrl()
00029 {
00030   m_pParentMenuBar = NULL;
00031   m_pParentRibbon = NULL;
00032 }
00033
00034 CRibbonTooltipCtrl::~CRibbonTooltipCtrl()
00035 {
00036 }
00037
00038 BEGIN_MESSAGE_MAP(CRibbonTooltipCtrl, CMFCToolTipCtrl)
00039   //{{AFX_MSG_MAP(CRibbonTooltipCtrl)
00040   ON_WM_CREATE()
00041   ON_NOTIFY_REFLECT(TTN_SHOW, OnShow)
00042   //}}AFX_MSG_MAP
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CRibbonTooltipCtrl message handlers
00047
00048 void CRibbonTooltipCtrl::OnShow(NMHDR* pNMHDR, LRESULT* pResult)
00049 {
00050   m_nID = 0;
00051
00052   CPoint point;
00053   ::GetCursorPos(&point);
00054
00055   if (m_pParentRibbon != NULL)
00056   {
00057     ASSERT_VALID(m_pParentRibbon);
00058
00059     m_pParentRibbon->ScreenToClient(&point);
00060
00061     CMFCRibbonBaseElement* pHit = m_pParentRibbon->HitTest(point, TRUE);
00062
00063     if (pHit != NULL)
00064     {
00065       ASSERT_VALID(pHit);
00066       m_nID = pHit->GetID();
00067     }
00068   }
00069   else if (m_pParentMenuBar != NULL)
00070   {
00071     ASSERT_VALID(m_pParentMenuBar);
00072
00073     m_pParentMenuBar->ScreenToClient(&point);
00074
00075     CMFCRibbonBaseElement* pHit = m_pParentMenuBar->HitTest(point);
00076
00077     if (pHit != NULL)
00078     {
00079       ASSERT_VALID(pHit);
00080       m_nID = pHit->GetID();
00081     }
00082   }
00083
00084   CMFCToolTipCtrl::OnShow(pNMHDR, pResult);
00085 }
00086
00087 int CRibbonTooltipCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
00088 {
00089   if (CMFCToolTipCtrl::OnCreate(lpCreateStruct) == -1)
00090     return -1;
00091
00092   m_pParentRibbon = DYNAMIC_DOWNCAST(CMFCRibbonBar, CWnd::FromHandlePermanent(lpCreateStruct->hwndParent));
00093   m_pParentMenuBar = DYNAMIC_DOWNCAST(CMFCRibbonPanelMenuBar, CWnd::FromHandlePermanent(lpCreateStruct->hwndParent));
00094
00095   return 0;
00096 }
00097
00098 CSize CRibbonTooltipCtrl::GetIconSize()
00099 {
00100   CMFCToolBarImages* pBmp = ((CMainFrame*) GetTopLevelFrame())->GetTooltipImage(m_nID);
00101   if (pBmp != NULL)
00102   {
00103     ASSERT_VALID(pBmp);
00104     return pBmp->GetImageSize();
00105   }
00106
00107   return CSize(0, 0);
00108 }
00109
00110 BOOL CRibbonTooltipCtrl::OnDrawIcon(CDC* pDC, CRect rectImage)
00111 {
00112   ASSERT_VALID(pDC);
00113
00114   CMFCToolBarImages* pBmp = ((CMainFrame*) GetTopLevelFrame())->GetTooltipImage(m_nID);
00115   if (pBmp != NULL)
00116   {
00117     ASSERT_VALID(pBmp);
00118
00119     pBmp->SetTransparentColor(afxGlobalData.clrBtnFace);
00120     pBmp->DrawEx(pDC, rectImage, 0);
00121
00122     return TRUE;
00123   }
00124
00125   return FALSE;
00126 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/oleview.h Source File

  • ole
  • oleview

oleview.h

Go to the documentation of this file.
00001 // oleview.h : main header file for the Ole2View application
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #ifndef _Ole2View_H_
00018 #define _Ole2View_H_
00019
00020 #include "iviewers\\iviewers.h"
00021
00022 #include "resource.h"       // main symbols
00023 #include "util.h"
00024 #include "mainfrm.h"
00025 #include "doc.h"
00026
00027 #ifdef WIN32
00028   #define GETCLASSUINT(hwnd, index)       (UINT)GetClassLong(hwnd, index)
00029   #define GETCLASSBRBACKGROUND(hwnd)      (HBRUSH)GETCLASSUINT(hwnd, GCL_HBRBACKGROUND)
00030   #define MGetModuleUsage(h)                  ((h), 2)
00031 #else
00032   #define GETCLASSUINT(hwnd, index)       (UINT)GetClassWord(hwnd, index)
00033   #define GETCLASSBRBACKGROUND(hwnd)      (HBRUSH)GETCLASSUINT(hwnd, GCW_HBRBACKGROUND)
00034   #define MGetModuleUsage          GetModuleUsage
00035 #endif
00036
00037 // override CListBox so we pass WM_COMMANDHELP on
00038 //
00039 class CMyListBox : public CListBox
00040 {
00041 public:
00042   DECLARE_DYNCREATE(CMyListBox)
00043
00044 protected:
00045   afx_msg LRESULT OnCommandHelp(WPARAM, LPARAM lParam) ;
00046
00047   DECLARE_MESSAGE_MAP()
00048 } ;
00049
00050 #include "regview.h"
00051 #include "obj_vw.h"
00052
00053 #define IDB_FIRST       IDB_QUESTION
00054 #define BMINDEX(x)      (x - IDB_FIRST)
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // COle2ViewApp:
00058 // See Ole2View.cpp for the implementation of this class
00059 //
00060
00061 class COle2ViewApp : public CWinApp
00062 {
00063 public:
00064   COle2ViewApp();
00065
00066   CFont*   m_pFont ;
00067   CFont*   m_pFontBold ;
00068   UINT     m_cyFont ;
00069
00070   CImageList    m_images ;
00071
00072   CString     m_szStatusText ;
00073
00074   void        LoadBitmaps(BOOL fFree);
00075   void        FreeBitmaps();
00076 // Overrides
00077   virtual BOOL InitInstance();
00078   virtual int ExitInstance();
00079 // Implementation
00080
00081   //{{AFX_MSG(COle2ViewApp)
00082   afx_msg void OnAppAbout();
00083   //}}AFX_MSG
00084   DECLARE_MESSAGE_MAP()
00085 };
00086
00087 extern COle2ViewApp theApp ;
00088
00089
00090 #endif // _Ole2View_H_
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoDoc.h Source File

  • vc2008fp
  • IEDemo

IEDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define FIRST_HISTORY_COMMAND 0x1000
00014 #define HISTORY_LEN 10
00015
00016 #include "HistoryObj.h"
00017
00018 typedef CList<CHistoryObj*, CHistoryObj*> _T_HistotyList;
00019
00020 class CIEDemoDoc : public CDocument
00021 {
00022 protected: // create from serialization only
00023   CIEDemoDoc();
00024   DECLARE_DYNCREATE(CIEDemoDoc)
00025
00026 // Attributes
00027 public:
00028   CArray<CHistoryObj*, CHistoryObj*>  m_arHistory;
00029   int m_iHistoryOffset;
00030
00031 // Operations
00032 public:
00033   void GetBackList (_T_HistotyList& lst) const;
00034   void GetFrwdList (_T_HistotyList& lst) const;
00035
00036   BOOL IsBackAvailable () const
00037   {
00038     return m_iHistoryOffset < m_arHistory.GetSize () - 1;
00039   }
00040
00041   BOOL IsFrwdAvailable ()
00042   {
00043     return m_iHistoryOffset > 0;
00044   }
00045
00046   CHistoryObj* GoBack ()
00047   {
00048     if (m_iHistoryOffset >= m_arHistory.GetSize ())
00049     {
00050       ASSERT (FALSE);
00051       return NULL;
00052     }
00053
00054     return m_arHistory [++ m_iHistoryOffset];
00055   }
00056
00057   CHistoryObj* GoForward ()
00058   {
00059     if (m_iHistoryOffset < 1)
00060     {
00061       ASSERT (FALSE);
00062       return NULL;
00063     }
00064
00065     return m_arHistory [--m_iHistoryOffset];
00066   }
00067
00068   CHistoryObj* Go (UINT uiCmd);
00069   CHistoryObj* AddURLToHistory (const CString& strTitle, const CString& strURL);
00070
00071 // Overrides
00072   // ClassWizard generated virtual function overrides
00073   //{{AFX_VIRTUAL(CIEDemoDoc)
00074   public:
00075   virtual BOOL OnNewDocument();
00076   virtual void Serialize(CArchive& ar);
00077   //}}AFX_VIRTUAL
00078
00079 // Implementation
00080 public:
00081   virtual ~CIEDemoDoc();
00082 #ifdef _DEBUG
00083   virtual void AssertValid() const;
00084   virtual void Dump(CDumpContext& dc) const;
00085 #endif
00086
00087 protected:
00088
00089 // Generated message map functions
00090 protected:
00091   //{{AFX_MSG(CIEDemoDoc)
00092     // NOTE - the ClassWizard will add and remove member functions here.
00093     //    DO NOT EDIT what you see in these blocks of generated code !
00094   //}}AFX_MSG
00095   DECLARE_MESSAGE_MAP()
00096 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMainDoc Member List

This is the complete list of members for CMainDoc, including all inherited members.
AdjustItemPosition(CRectItem *pItem) | CMainDoc |
CMainDoc() | CMainDoc | [protected]
CMainDoc() | CMainDoc | [protected]
CreateItem() | CMainDoc |
DeleteItem(CRectItem *pItem) | CMainDoc |
GetDocumentSize() | CMainDoc |
m_bNeedUpdate | CMainDoc |
m_cfPrivate | CMainDoc | [static]
m_colorData | CMainDoc |
m_sizeDoc | CMainDoc |
m_strData | CMainDoc |
OnChangeData() | CMainDoc | [protected]
OnEditClearAll() | CMainDoc | [protected]
OnNewDocument() | CMainDoc | [protected, virtual]
OnShowViews(BOOL bVisible) | CMainDoc | [virtual]
OnUpdateEditClearAll(CCmdUI *pCmdUI) | CMainDoc | [protected]
Serialize(CArchive &ar) | CMainDoc | [virtual]
Serialize(CArchive &ar) | CMainDoc | [virtual]
~CMainDoc() | CMainDoc | [virtual]
~CMainDoc() | CMainDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cube.cpp Source File

  • advanced
  • cube

cube.cpp

Go to the documentation of this file.
00001 // cube.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "cube.h"
00014
00015 #include "mainfrm.h"
00016 #include "cubedoc.h"
00017 #include "cubeview.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CCubeApp
00026
00027 BEGIN_MESSAGE_MAP(CCubeApp, CWinApp)
00028   //{{AFX_MSG_MAP(CCubeApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CCubeApp construction
00040
00041 CCubeApp::CCubeApp()
00042 {
00043   // TODO: add construction code here,
00044   // Place all significant initialization in InitInstance
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CCubeApp object
00049
00050 CCubeApp theApp;
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CCubeApp initialization
00054
00055 BOOL CCubeApp::InitInstance()
00056 {
00057   // Standard initialization
00058   // If you are not using these features and wish to reduce the size
00059   //  of your final executable, you should remove from the following
00060   //  the specific initialization routines you do not need.
00061
00062   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00063
00064   // Register the application's document templates.  Document templates
00065   //  serve as the connection between documents, frame windows and views.
00066
00067   CSingleDocTemplate* pDocTemplate;
00068   pDocTemplate = new CSingleDocTemplate(
00069     IDR_MAINFRAME,
00070     RUNTIME_CLASS(CCubeDoc),
00071     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00072     RUNTIME_CLASS(CCubeView));
00073   AddDocTemplate(pDocTemplate);
00074
00075   // create a new (empty) document
00076   OnFileNew();
00077
00078   if (m_lpCmdLine[0] != '\0')
00079   {
00080     // TODO: add command line processing here
00081   }
00082
00083   return TRUE;
00084 }
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CAboutDlg dialog used for App About
00088
00089 class CAboutDlg : public CDialog
00090 {
00091 public:
00092   CAboutDlg();
00093
00094 // Dialog Data
00095   //{{AFX_DATA(CAboutDlg)
00096   enum { IDD = IDD_ABOUTBOX };
00097   //}}AFX_DATA
00098
00099 // Implementation
00100 protected:
00101   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00102   //{{AFX_MSG(CAboutDlg)
00103     // No message handlers
00104   //}}AFX_MSG
00105   DECLARE_MESSAGE_MAP()
00106 };
00107
00108 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00109 {
00110   //{{AFX_DATA_INIT(CAboutDlg)
00111   //}}AFX_DATA_INIT
00112 }
00113
00114 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00115 {
00116   CDialog::DoDataExchange(pDX);
00117   //{{AFX_DATA_MAP(CAboutDlg)
00118   //}}AFX_DATA_MAP
00119 }
00120
00121 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00122   //{{AFX_MSG_MAP(CAboutDlg)
00123     // No message handlers
00124   //}}AFX_MSG_MAP
00125 END_MESSAGE_MAP()
00126
00127 // App command to run the dialog
00128 void CCubeApp::OnAppAbout()
00129 {
00130   CAboutDlg aboutDlg;
00131   aboutDlg.DoModal();
00132 }
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CCubeApp commands
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/bmpprop.h Source File

  • controls
  • IMAGE

bmpprop.h

Go to the documentation of this file.
00001 // BmpProp.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 struct BITMAPINFO256 : public BITMAPINFO
00013 {
00014   RGBQUAD bmiOtherColors[255];
00015 };
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CBitmapProperty command target
00019
00020 class CBitmapProperty : public CDataPathProperty
00021 {
00022   DECLARE_DYNAMIC(CBitmapProperty)
00023 //Constructor
00024 public:
00025   CBitmapProperty(COleControl* pControl = NULL);
00026
00027 // Attributes
00028 public:
00029   CBitmap m_Bitmap;
00030   CSize m_BitmapSize;
00031   BITMAPINFO256 m_bmInfo;
00032   CMemFile m_CacheFile;
00033   enum DLState
00034   {
00035     dlNone,
00036     dlFileHeader,
00037     dlInfoHeader,
00038     dlColorTable,
00039     dlDone
00040   } m_dlState;
00041   int m_nScanLine;
00042   DWORD m_cbRead;
00043
00044 // Operations
00045 public:
00046   BOOL ReadStruct(DWORD& rdwSize, void* pb, int cLen);
00047   int ReadArray(DWORD& rdwSize, void** pb, int cElem, int cMax);
00048
00049
00050 // Overrides
00051 public:
00052   // ClassWizard generated virtual function overrides
00053   //{{AFX_VIRTUAL(CBitmapProperty)
00054   public:
00055   virtual void ResetData();
00056   protected:
00057   virtual void OnDataAvailable(DWORD dwSize, DWORD bscfFlag);
00058   //}}AFX_VIRTUAL
00059
00060   // Generated message map functions
00061   //{{AFX_MSG(CBitmapProperty)
00062     // NOTE - the ClassWizard will add and remove member functions here.
00063   //}}AFX_MSG
00064
00065 // Implementation
00066 public:
00067   virtual ~CBitmapProperty();
00068 protected:
00069 };
00070
00071 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMDITabsDemoView Member List

This is the complete list of members for CMDITabsDemoView, including all inherited members.
CMDITabsDemoView() | CMDITabsDemoView | [protected]
GetDocument() | CMDITabsDemoView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CMDITabsDemoView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CMDITabsDemoView | [protected]
OnDraw(CDC *pDC) | CMDITabsDemoView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CMDITabsDemoView | [protected, virtual]
OnFilePrintPreview() | CMDITabsDemoView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CMDITabsDemoView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMDITabsDemoView | [virtual]
~CMDITabsDemoView() | CMDITabsDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/targetver.h Source File

  • vc2008fp
  • NewControls

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/tooldlg.cpp Source File

  • general
  • docktool

tooldlg.cpp

Go to the documentation of this file.
00001 // tooldlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "docktool.h"
00014 #include "tooldlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CToolDlg dialog
00023
00024
00025 CToolDlg::CToolDlg(CWnd* pParent /*=NULL*/)
00026   : CDialog(CToolDlg::IDD, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CToolDlg)
00029   m_bBrowse = FALSE;
00030   m_bDebug = FALSE;
00031   m_bEdit = FALSE;
00032   m_bMain = FALSE;
00033   m_bResource = FALSE;
00034   m_nToolTips = -1;
00035   m_bPalette = FALSE;
00036   m_nColumns = -1;
00037   m_nColor = -1;
00038   //}}AFX_DATA_INIT
00039 }
00040
00041
00042 void CToolDlg::DoDataExchange(CDataExchange* pDX)
00043 {
00044   CDialog::DoDataExchange(pDX);
00045   //{{AFX_DATA_MAP(CToolDlg)
00046   DDX_Check(pDX, IDC_BROWSE, m_bBrowse);
00047   DDX_Check(pDX, IDC_DEBUG, m_bDebug);
00048   DDX_Check(pDX, IDC_EDIT, m_bEdit);
00049   DDX_Check(pDX, IDC_MAIN, m_bMain);
00050   DDX_Check(pDX, IDC_RESOURCE, m_bResource);
00051   DDX_Radio(pDX, IDC_SHOW, m_nToolTips);
00052   DDX_Check(pDX, IDC_PALETTE, m_bPalette);
00053   DDX_Radio(pDX, IDC_TWO, m_nColumns);
00054   DDX_Radio(pDX, IDC_COLOR, m_nColor);
00055   //}}AFX_DATA_MAP
00056 }
00057
00058
00059 BEGIN_MESSAGE_MAP(CToolDlg, CDialog)
00060   //{{AFX_MSG_MAP(CToolDlg)
00061     // NOTE: the ClassWizard will add message map macros here
00062   //}}AFX_MSG_MAP
00063 END_MESSAGE_MAP()
00064
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CToolDlg message handlers
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemoDlg.h Source File

  • general
  • CTaskDialog

CTaskDialogDemoDlg.h

Go to the documentation of this file.
00001 // TaskDialogTestDlg.h : header file
00002 //
00003
00004 #pragma once
00005
00006 #include <afxtaskdialog.h>
00007
00008 // CTaskDialogTestDlg dialog
00009 class CTaskDialogTestDlg : public CDialog
00010 {
00011 // Construction
00012 public:
00013   CTaskDialogTestDlg(CWnd* pParent = NULL); // standard constructor
00014
00015 // Dialog Data
00016   enum { IDD = IDD_TASKDIALOGTEST_DIALOG };
00017
00018   protected:
00019   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00020
00021
00022 // Implementation
00023 protected:
00024   HICON m_hIcon;
00025
00026   void SetControls(INT_PTR nResult, int nRadioButtonId, BOOL bChecked);
00027
00028   // Generated message map functions
00029   virtual BOOL OnInitDialog();
00030   afx_msg void OnPaint();
00031   afx_msg HCURSOR OnQueryDragIcon();
00032   DECLARE_MESSAGE_MAP()
00033 public:
00034   afx_msg void OnStnClickedRadioId();
00035   afx_msg void OnBnClickedButton1();
00036   afx_msg void OnBnClickedButton2();
00037   afx_msg void OnBnClickedButton3();
00038   afx_msg void OnBnClickedButton6();
00039   afx_msg void OnBnClickedButton4();
00040   afx_msg void OnBnClickedButton5();
00041   afx_msg void OnBnClickedButton7();
00042   afx_msg void OnBnClickedButton8();
00043
00044 };
00045
00046
00047 class CProgressBarTaskDialog : public CTaskDialog {
00048 public:
00049   CProgressBarTaskDialog() : CTaskDialog(_T("A CTaskDialog presents information in a clear and consistent way."),
00050       _T("How much do you like CTaskDialog?"),
00051       _T("Sample Progress Bar"),
00052     TDCBF_YES_BUTTON | TDCBF_NO_BUTTON ,
00053     TDF_ENABLE_HYPERLINKS  | TDF_USE_COMMAND_LINKS | TDF_CALLBACK_TIMER | TDF_SHOW_PROGRESS_BAR, _T(""))
00054   {
00055       SetProgressBarRange(0, 300);
00056   }
00057 protected:
00058   virtual HRESULT OnTimer(long /*lTick */) {
00059     static int iCounter = 0;
00060
00061     if( iCounter == 260) {
00062       SetProgressBarState(PBST_NORMAL);
00063     }
00064
00065     if (iCounter > 80 && iCounter < 120) {
00066       SetProgressBarState(PBST_ERROR);
00067     }
00068     else if (iCounter > 190 && iCounter < 220) {
00069       SetProgressBarState(PBST_PAUSED);
00070     }
00071     else {
00072       SetProgressBarPosition(iCounter);
00073     }
00074
00075     if (iCounter >= 300) {
00076       iCounter = 0;
00077     }
00078     else iCounter+=5;
00079
00080     return S_OK;
00081   }
00082 };
00083
00084 class CMargueeTaskDialog : public CTaskDialog {
00085 public:
00086   CMargueeTaskDialog() : CTaskDialog(_T("A CTaskDialog presents information in a clear and consistent way."),
00087     _T("How much do you like CTaskDialog?"), _T("Sample Marquee"), TDCBF_YES_BUTTON | TDCBF_NO_BUTTON,
00088     TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_CALLBACK_TIMER | TDF_SHOW_PROGRESS_BAR  | TDF_SHOW_MARQUEE_PROGRESS_BAR)
00089   {
00090     SetExpansionArea(_T("How long do I have to wait?"), _T("Get some additional information."), _T("I don't need this information!"));
00091     SetVerificationCheckboxText(_T("Don't show this dialog again!"));
00092     SetVerificationCheckbox(true);
00093     SetProgressBarMarquee( TRUE , 2);
00094   }
00095 };
00096
00097 class CNextWizardDialog : public CTaskDialog
00098   {
00099   private:
00100     CTaskDialog *m_next;
00101     CTaskDialog *m_prev;
00102   public:
00103     CNextWizardDialog() : CTaskDialog(_T("Just in the middle"),
00104       _T("Where am I?"), _T("Second window!"), TDCBF_YES_BUTTON | TDCBF_NO_BUTTON,
00105       TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_ALLOW_DIALOG_CANCELLATION)
00106     {
00107       SetMainIcon(TD_INFORMATION_ICON);
00108       AddCommandControl(101 ,_T("Is there something more?\nIt's a mistery."));
00109     }
00110
00111     void SetDialog(CTaskDialog *next, CTaskDialog *prev) { m_next = next; m_prev = prev; }
00112   protected:
00113     HRESULT OnCommandControlClick(int iButtonId) {
00114       if (iButtonId == 100) {
00115         NavigateTo(*m_prev);
00116         return S_FALSE;
00117       }
00118       else if (iButtonId == 101) {
00119         NavigateTo(*m_next);
00120         return S_FALSE;
00121       }
00122
00123       return S_OK;
00124     }
00125 };
00126
00127 class CEndWizardDialog : public CTaskDialog
00128   {
00129   private:
00130     CTaskDialog *m_prev;
00131   public:
00132     CEndWizardDialog() : CTaskDialog(_T("There is nothing more to see!"),
00133       _T("This is the end!"), _T("Third window!"), TDCBF_OK_BUTTON,
00134       TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_ALLOW_DIALOG_CANCELLATION)
00135     {
00136       SetMainIcon(TD_WARNING_ICON);
00137     }
00138
00139     void SetDialog(CTaskDialog *prev) { m_prev = prev; }
00140 };
00141
00142 class CWizardDialog : public CTaskDialog
00143 {
00144 public:
00145   CWizardDialog() : CTaskDialog(_T("Introduce the wizard option."),
00146     _T("Let's begin"), _T("First window!"), TDCBF_YES_BUTTON | TDCBF_NO_BUTTON,
00147     TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS | TDF_ALLOW_DIALOG_CANCELLATION)
00148   {
00149     SetExpansionArea(_T("If you click Go! You will be redirected to another CTaskDialog window."),
00150         _T("Say more!"), _T("I don't want details!"));
00151
00152     AddCommandControl(100 , _T("Go next!\nThere is nothing interesting to see."));
00153     m_nextWizardDialog.SetDialog(&m_endWizardDialog, this);
00154     m_endWizardDialog.SetDialog(&m_nextWizardDialog);
00155   }
00156 protected:
00157   HRESULT OnCommandControlClick(int iButtonId) {
00158     if (iButtonId == 100) {
00159       NavigateTo(m_nextWizardDialog);
00160       return S_FALSE;
00161     }
00162
00163     return S_OK;
00164   }
00165
00166 private:
00167   CNextWizardDialog m_nextWizardDialog;
00168   CEndWizardDialog m_endWizardDialog;
00169 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/stdafx.h Source File

  • vc2008fp
  • NewControls

stdafx.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #ifndef _SECURE_ATL
00004 #define _SECURE_ATL 1
00005 #endif
00006
00007 #ifndef VC_EXTRALEAN
00008 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
00009 #endif
00010
00011 #include "targetver.h"
00012
00013 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
00014
00015 // turns off MFC's hiding of some common and often safely ignored warning messages
00016 #define _AFX_ALL_WARNINGS
00017
00018 #include <afxwin.h>         // MFC core and standard components
00019 #include <afxext.h>         // MFC extensions
00020
00021 #include <afxhtml.h>
00022 #include <afxdisp.h>        // MFC Automation classes
00023
00024 #ifndef _AFX_NO_OLE_SUPPORT
00025 #include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
00026 #endif
00027 #ifndef _AFX_NO_AFXCMN_SUPPORT
00028 #include <afxcmn.h>         // MFC support for Windows Common Controls
00029 #endif // _AFX_NO_AFXCMN_SUPPORT
00030
00031 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00032
00033 #if defined _M_IX86
00034 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00035 #elif defined _M_X64
00036 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00037 #else
00038 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00039 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockdoc.cpp Source File

  • general
  • docktool

dockdoc.cpp

Go to the documentation of this file.
00001 // dockdoc.cpp : implementation of the CDockDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "docktool.h"
00014
00015 #include "dockdoc.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDockDoc
00024
00025 IMPLEMENT_DYNCREATE(CDockDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CDockDoc, CDocument)
00028   //{{AFX_MSG_MAP(CDockDoc)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code!
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CDockDoc construction/destruction
00036
00037 CDockDoc::CDockDoc()
00038 {
00039   // TODO: add one-time construction code here
00040
00041 }
00042
00043 CDockDoc::~CDockDoc()
00044 {
00045 }
00046
00047 BOOL CDockDoc::OnNewDocument()
00048 {
00049   if (!CDocument::OnNewDocument())
00050     return FALSE;
00051
00052   // TODO: add reinitialization code here
00053   // (SDI documents will reuse this document)
00054
00055   return TRUE;
00056 }
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CDockDoc serialization
00060
00061 void CDockDoc::Serialize(CArchive& ar)
00062 {
00063   if (ar.IsStoring())
00064   {
00065     // TODO: add storing code here
00066   }
00067   else
00068   {
00069     // TODO: add loading code here
00070   }
00071 }
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CDockDoc diagnostics
00075
00076 #ifdef _DEBUG
00077 void CDockDoc::AssertValid() const
00078 {
00079   CDocument::AssertValid();
00080 }
00081
00082 void CDockDoc::Dump(CDumpContext& dc) const
00083 {
00084   CDocument::Dump(dc);
00085 }
00086 #endif //_DEBUG
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CDockDoc commands
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoView.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007DemoView.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "MainFrm.h"
00015
00016 #include "MSOffice2007DemoDoc.h"
00017 #include "CntrItem.h"
00018 #include "MSOffice2007DemoView.h"
00019 #include "RibbonTableButton.h"
00020
00021 #include <memory>
00022
00023 #ifdef _DEBUG
00024 #define new DEBUG_NEW
00025 #undef THIS_FILE
00026 static char THIS_FILE[] = __FILE__;
00027 #endif
00028
00029 #pragma warning(disable:4100)
00030
00031 #if _MSC_VER >= 1300
00032 #define WPD_CHARFORMAT CHARFORMAT2
00033 #define WPD_PARAFORMAT PARAFORMAT2
00034 #else
00035 #define WPD_CHARFORMAT CHARFORMAT
00036 #define WPD_PARAFORMAT PARAFORMAT
00037 #endif
00038
00039 struct CCharFormat : public WPD_CHARFORMAT
00040 {
00041   CCharFormat() {cbSize = sizeof(WPD_CHARFORMAT);}
00042   BOOL operator== (CCharFormat& cf);
00043 };
00044
00045 int GetTwipSize(CString str)
00046 {
00047   LPCTSTR lpszText = str;
00048
00049   while (*lpszText == ' ' || *lpszText == '\t')
00050     lpszText++;
00051
00052   if (lpszText[0] == NULL)
00053     return -1; // no text in control
00054
00055   double d = _tcstod(lpszText, (LPTSTR*)&lpszText);
00056   while (*lpszText == ' ' || *lpszText == '\t')
00057     lpszText++;
00058
00059   if (*lpszText != NULL)
00060     return -2;   // not terminated properly
00061
00062   return(d < 0.) ? 0 :(int)(d * 20.);
00063 }
00064
00065 CString TwipsToPointString (int nTwips)
00066 {
00067   CString str;
00068   if (nTwips >= 0)
00069   {
00070     // round to nearest half point
00071     nTwips = (nTwips + 5) / 10;
00072
00073     if ((nTwips % 2) == 0)
00074     {
00075       str.Format (_T("%ld"), nTwips/2);
00076     }
00077     else
00078     {
00079       str.Format (_T("%.1f"), (float) nTwips / 2.F);
00080     }
00081   }
00082
00083   return str;
00084 }
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CMSOffice2007DemoView
00088
00089 BOOL CMSOffice2007DemoView::m_bForceReloadBmps = FALSE;
00090
00091 IMPLEMENT_DYNCREATE(CMSOffice2007DemoView, CRichEditView)
00092
00093 BEGIN_MESSAGE_MAP(CMSOffice2007DemoView, CRichEditView)
00094   //{{AFX_MSG_MAP(CMSOffice2007DemoView)
00095   ON_WM_DESTROY()
00096   ON_WM_LBUTTONUP()
00097   ON_WM_LBUTTONDOWN()
00098   ON_COMMAND(ID_WRITE_FONT, OnFontDialog)
00099   ON_COMMAND(ID_WRITE_PARAGRAPH, OnParagraphDialog)
00100   ON_COMMAND(ID_WRITE_STYLE, OnStyleDialog)
00101   ON_COMMAND(ID_PARA_PAGESETUP, OnPagesetupDialog)
00102   ON_WM_RBUTTONUP()
00103   ON_WM_CONTEXTMENU()
00104   ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
00105   ON_COMMAND(ID_PAGELAYOUT_INDENT_LEFT, OnPagelayoutIndentLeft)
00106   ON_COMMAND(ID_PAGELAYOUT_INDENT_RIGHT, OnPagelayoutIndentRight)
00107   ON_COMMAND(ID_INSERT_SHAPES, OnInsertShape)
00108   ON_COMMAND(ID_WRITE_QUICKSTYLES, OnQuickStyle)
00109   ON_COMMAND(ID_PAGELAYOUT_INDENT_LEFT, OnIndentLeft)
00110   ON_COMMAND(ID_PAGELAYOUT_INDENT_RIGHT, OnIndentRight)
00111   ON_COMMAND(ID_PAGELAYOUT_SPACE_AFTER, OnSpaceAfter)
00112   ON_COMMAND(ID_PAGELAYOUT_SPACE_BEFORE, OnSpaceBefore)
00113   ON_COMMAND(ID_VIEW_RULER, OnViewRuler)
00114   ON_COMMAND(ID_VIEW_GRIDLINES, OnViewGridLines)
00115   ON_COMMAND(ID_VIEW_PROPERTIES, OnViewProps)
00116   ON_COMMAND(ID_VIEW_DOCUMENTMAP, OnViewDocMap)
00117   ON_UPDATE_COMMAND_UI(ID_VIEW_RULER, OnUpdateViewRuler)
00118   ON_UPDATE_COMMAND_UI(ID_VIEW_GRIDLINES, OnUpdateViewGridLines)
00119   ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTIES, OnUpdateViewProps)
00120   ON_UPDATE_COMMAND_UI(ID_VIEW_DOCUMENTMAP, OnUpdateViewDocMap)
00121   ON_UPDATE_COMMAND_UI(ID_VIEW_TRUMBNAILS, OnUpdateViewThumb)
00122   ON_COMMAND(ID_INSERT_PICTURE, OnInsertPicture)
00123   ON_COMMAND(ID_INSERT_CHART, OnInsertChart)
00124   ON_COMMAND(ID_TABLE_TABLE, OnInsertTable)
00125   ON_COMMAND(ID_TABLE_DRAWTABLE, OnInsertTable)
00126   ON_WM_CREATE()
00127   ON_COMMAND(ID_FONT_COLOR, OnFontColor)
00128   ON_COMMAND(ID_FONT_FONT, OnFontname)
00129   ON_COMMAND(ID_FONT_FONTSIZE, OnFontsize)
00130   ON_COMMAND(ID_FONT_BOLD, OnCharBold)
00131   ON_UPDATE_COMMAND_UI(ID_FONT_BOLD, OnUpdateCharBold)
00132   ON_COMMAND(ID_FONT_STRIKETHROUGH, OnCharStrikeThrough)
00133   ON_UPDATE_COMMAND_UI(ID_FONT_STRIKETHROUGH, OnUpdateCharStrikeThrough)
00134   ON_COMMAND(ID_FONT_ITALIC, OnCharItalic)
00135   ON_UPDATE_COMMAND_UI(ID_FONT_ITALIC, OnUpdateCharItalic)
00136   ON_COMMAND(ID_FONT_UNDERLINE, OnCharUnderline)
00137   ON_UPDATE_COMMAND_UI(ID_FONT_UNDERLINE, OnUpdateCharUnderline)
00138   ON_COMMAND(ID_PARA_CENTER, OnParaCenter)
00139   ON_UPDATE_COMMAND_UI(ID_PARA_CENTER, OnUpdateParaCenter)
00140   ON_COMMAND(ID_PARA_ALIGNLEFT, OnParaLeft)
00141   ON_UPDATE_COMMAND_UI(ID_PARA_ALIGNLEFT, OnUpdateParaLeft)
00142   ON_COMMAND(ID_PARA_ALIGNRIGHT, OnParaRight)
00143   ON_UPDATE_COMMAND_UI(ID_PARA_ALIGNRIGHT, OnUpdateParaRight)
00144   ON_WM_DROPFILES()
00145   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00146   ON_COMMAND(ID_FILE_PRINT_DIRECT, OnFilePrint)
00147   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00148   ON_COMMAND(ID_PARA_BULLETS, CRichEditView::OnBullet)
00149   ON_UPDATE_COMMAND_UI(ID_PARA_BULLETS, CRichEditView::OnUpdateBullet)
00150   ON_EN_CHANGE(AFX_IDW_PANE_FIRST, OnEditChange)
00151   ON_NOTIFY_REFLECT(EN_SELCHANGE, OnSelChange)
00152   ON_UPDATE_COMMAND_UI(ID_STATUSBAR_PRINTLAYOUT, OnUpdatePrintLayout)
00153   ON_UPDATE_COMMAND_UI(ID_VIEW_PRINTLAYOUT, OnUpdatePrintLayout)
00154   ON_COMMAND(ID_FROM_PALETTE_BULLET, OnInsertBulletFromPalette)
00155   ON_COMMAND(ID_FROM_PALETTE_NUMBER, OnInsertNumberFromPalette)
00156   ON_COMMAND(ID_FROM_PALETTE_MULTILEVEL, OnInsertMultilevelFromPalette)
00157   ON_COMMAND(ID_FROM_PALETTE_TABLE, OnInsertTableGallery)
00158   ON_UPDATE_COMMAND_UI(ID_EDIT_FIND, OnUpdateEditFind)
00159   ON_UPDATE_COMMAND_UI(ID_EDIT_REPLACE, OnUpdateEditReplace)
00160   ON_COMMAND(ID_PAGELAYOUT_THEMES, OnPageLayoutTheme)
00161   //}}AFX_MSG_MAP
00162 END_MESSAGE_MAP()
00163
00164 /////////////////////////////////////////////////////////////////////////////
00165 // CMSOffice2007DemoView construction/destruction
00166
00167 CMSOffice2007DemoView::CMSOffice2007DemoView()
00168 {
00169   m_bIsEndOfPrint = FALSE;
00170   m_bViewRuler = TRUE;
00171   m_bViewGridLines = TRUE;
00172   m_bViewProps = FALSE;
00173   m_bViewDocMap = FALSE;
00174   m_bViewThumb = FALSE;
00175
00176   m_ptMouseDown = CPoint(-1, -1);
00177 }
00178
00179 CMSOffice2007DemoView::~CMSOffice2007DemoView()
00180 {
00181 }
00182
00183 BOOL CMSOffice2007DemoView::PreCreateWindow(CREATESTRUCT& cs)
00184 {
00185   return CRichEditView::PreCreateWindow(cs);
00186 }
00187
00188 void CMSOffice2007DemoView::OnInitialUpdate()
00189 {
00190   CRichEditView::OnInitialUpdate();
00191
00192   // Set the printing margins(720 twips = 1/2 inch).
00193   SetMargins(CRect(720, 720, 720, 720));
00194
00195   CCharFormat cf;
00196   GetDefaultFont(cf);
00197
00198   SetCharFormat(cf);
00199   SyncFont();
00200 }
00201
00202 /////////////////////////////////////////////////////////////////////////////
00203 // CMSOffice2007DemoView printing
00204
00205 void CMSOffice2007DemoView::OnFilePrintPreview()
00206 {
00207   AFXPrintPreview(this);
00208 }
00209
00210 BOOL CMSOffice2007DemoView::OnPreparePrinting(CPrintInfo* pInfo)
00211 {
00212   // default preparation
00213   return DoPreparePrinting(pInfo);
00214 }
00215
00216 void CMSOffice2007DemoView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
00217 {
00218   if (m_bIsEndOfPrint)
00219   {
00220     pInfo->m_bContinuePrinting = FALSE;
00221     return;
00222   }
00223
00224   CRichEditView::OnPrepareDC(pDC, pInfo);
00225 }
00226
00227 void CMSOffice2007DemoView::OnDestroy()
00228 {
00229   // Deactivate the item on destruction; this is important
00230   // when a splitter view is being used.
00231   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00232   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
00233   {
00234     pActiveItem->Deactivate();
00235     ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00236   }
00237
00238   CRichEditView::OnDestroy();
00239 }
00240
00241 /////////////////////////////////////////////////////////////////////////////
00242 // CMSOffice2007DemoView diagnostics
00243
00244 #ifdef _DEBUG
00245 void CMSOffice2007DemoView::AssertValid() const
00246 {
00247   CRichEditView::AssertValid();
00248 }
00249
00250 void CMSOffice2007DemoView::Dump(CDumpContext& dc) const
00251 {
00252   CRichEditView::Dump(dc);
00253 }
00254
00255 CMSOffice2007DemoDoc* CMSOffice2007DemoView::GetDocument() // non-debug version is inline
00256 {
00257   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMSOffice2007DemoDoc)));
00258   return(CMSOffice2007DemoDoc*)m_pDocument;
00259 }
00260 #endif //_DEBUG
00261
00262 /////////////////////////////////////////////////////////////////////////////
00263 // CMSOffice2007DemoView message handlers
00264
00265 void CMSOffice2007DemoView::OnEditChange()
00266 {
00267 }
00268
00269 void CMSOffice2007DemoView::OnFontColor()
00270 {
00271   CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
00272   ASSERT_VALID(pRibbon);
00273
00274   CMFCRibbonColorButton* pFontColorBtn = DYNAMIC_DOWNCAST(CMFCRibbonColorButton, pRibbon->FindByID(ID_FONT_COLOR));
00275
00276   if (pFontColorBtn != NULL)
00277   {
00278     COLORREF color = pFontColorBtn->GetColor();
00279     CRichEditView::OnColorPick(color == -1 ? ::GetSysColor(COLOR_WINDOWTEXT) : color);
00280   }
00281 }
00282
00283 void CMSOffice2007DemoView::OnFontname()
00284 {
00285   USES_CONVERSION;
00286
00287   CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
00288   ASSERT_VALID(pRibbon);
00289
00290   CMFCRibbonFontComboBox* pFontCombo = DYNAMIC_DOWNCAST(CMFCRibbonFontComboBox, pRibbon->FindByID(ID_FONT_FONT));
00291   if (pFontCombo == NULL)
00292   {
00293     return;
00294   }
00295
00296   CString strWarning;
00297   CString strFontName = pFontCombo->GetEditText();
00298   if (pFontCombo->FindItem(strFontName) == -1)
00299   {
00300     // Restore current name:
00301     pFontCombo->SetEditText (GetCharFormatSelection ().szFaceName);
00302     strWarning.Format(CString((LPCTSTR)ID_FONT_NOT_FOUND), strFontName);
00303     AfxMessageBox(strWarning, MB_OK | MB_ICONWARNING);
00304     return;
00305   }
00306
00307   CCharFormat cf;
00308   cf.szFaceName[0] = NULL;
00309   cf.dwMask = CFM_FACE | CFM_CHARSET;
00310
00311   const CMFCFontInfo* pDesc = pFontCombo->GetFontDesc();
00312   ASSERT_VALID(pDesc);
00313   ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);
00314
00315 #if _MSC_VER >= 1300
00316   lstrcpyn(cf.szFaceName, pDesc->m_strName, LF_FACESIZE);
00317 #else
00318   lstrcpynA(cf.szFaceName, T2A((LPTSTR)(LPCTSTR) pDesc->m_strName), LF_FACESIZE);
00319 #endif
00320
00321   cf.bCharSet = pDesc->m_nCharSet;
00322   cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;
00323
00324   SetCharFormat(cf);
00325 }
00326
00327 void CMSOffice2007DemoView::OnFontsize()
00328 {
00329   CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
00330   ASSERT_VALID(pRibbon);
00331
00332   CMFCRibbonComboBox* pSizeCombo = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_FONT_FONTSIZE));
00333   if (pSizeCombo == NULL)
00334   {
00335     return;
00336   }
00337
00338   int nSize = GetTwipSize(pSizeCombo->GetEditText());
00339
00340   if (nSize == -2 || (nSize >= 0 && nSize < 20) || nSize > 32760)
00341   {
00342     // Restore current size:
00343     pSizeCombo->SetEditText (TwipsToPointString (GetCharFormatSelection ().yHeight));
00344
00345     MessageBox (_T("The number must be between 1 and 1638."));
00346     return;
00347   }
00348
00349   if (nSize > 0)
00350   {
00351     CCharFormat cf;
00352     cf.dwMask = CFM_SIZE;
00353     cf.yHeight = nSize;
00354
00355     SetCharFormat(cf);
00356   }
00357 }
00358
00359 void CMSOffice2007DemoView::OnLButtonDown(UINT nFlags, CPoint point)
00360 {
00361   m_ptMouseDown = point;
00362
00363   CRichEditView::OnLButtonUp(nFlags, point);
00364 }
00365
00366 void CMSOffice2007DemoView::OnLButtonUp(UINT nFlags, CPoint point)
00367 {
00368   CRichEditView::OnLButtonUp(nFlags, point);
00369
00370   if (m_ptMouseDown == CPoint (-1, -1))
00371   {
00372     return;
00373   }
00374
00375   m_ptMouseDown = CPoint (-1, -1);
00376
00377   if (GetSelectedItem() != NULL || CMFCPopupMenu::GetActiveMenu() != NULL || GetRichEditCtrl().GetSelText().IsEmpty())
00378   {
00379     return;
00380   }
00381
00382   if (!theApp.m_bShowFloaty)
00383   {
00384     return;
00385   }
00386
00387   CMFCRibbonMiniToolBar* pFloaty = new CMFCRibbonMiniToolBar;
00388
00389   InitFloaty(pFloaty);
00390
00391   ClientToScreen(&point);
00392   pFloaty->Show(point.x, point.y);
00393 }
00394
00395 void CMSOffice2007DemoView::OnFontDialog()
00396 {
00397   CRichEditView::OnFormatFont();
00398
00399   SyncFont();
00400 }
00401
00402 void CMSOffice2007DemoView::OnParagraphDialog()
00403 {
00404   AfxMessageBox(_T("Show your Paragraph dialog here."));
00405 }
00406
00407 void CMSOffice2007DemoView::OnStyleDialog()
00408 {
00409   AfxMessageBox(_T("Show your Style dialog here."));
00410 }
00411
00412 void CMSOffice2007DemoView::OnPagesetupDialog()
00413 {
00414   AfxMessageBox(_T("Show your page setup dialog here."));
00415 }
00416
00417 BOOL CMSOffice2007DemoView::ShowContextMenu(CPoint point)
00418 {
00419   if (DYNAMIC_DOWNCAST(CFrameWndEx, GetParentFrame()) == NULL)
00420   {
00421     // Maybe, server mode, show the regular menu!
00422     return FALSE;
00423   }
00424
00425   CRichEditCntrItem* pItem = GetSelectedItem();
00426   if (pItem == NULL || !pItem->IsInPlaceActive())
00427   {
00428     CMFCRibbonMiniToolBar* pFloaty = new CMFCRibbonMiniToolBar;
00429
00430     InitFloaty(pFloaty);
00431
00432     pFloaty->ShowWithContextMenu(point.x, point.y, IDR_CONTEXT_MENU, this);
00433     return TRUE;
00434   }
00435
00436   return FALSE;
00437 }
00438
00439 void CMSOffice2007DemoView::OnRButtonUp(UINT nFlags, CPoint point)
00440 {
00441   long nStartChar, nEndChar;
00442   GetRichEditCtrl().GetSel(nStartChar, nEndChar);
00443   if (nEndChar - nStartChar <= 1)
00444   {
00445     SendMessage(WM_LBUTTONDOWN, nFlags, MAKELPARAM(point.x, point.y));
00446     ReleaseCapture ();
00447   }
00448
00449   CPoint ptScreen = point;
00450   ClientToScreen(&ptScreen);
00451
00452   if (!ShowContextMenu(ptScreen))
00453   {
00454     Default();
00455   }
00456 }
00457
00458 void CMSOffice2007DemoView::OnContextMenu(CWnd* pWnd, CPoint point)
00459 {
00460   if (!ShowContextMenu(point))
00461   {
00462     Default();
00463   }
00464 }
00465 void CMSOffice2007DemoView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
00466 {
00467   m_bIsEndOfPrint = FALSE;
00468
00469   CRichEditView::OnBeginPrinting(pDC, pInfo);
00470 }
00471
00472 void CMSOffice2007DemoView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
00473 {
00474   m_bIsEndOfPrint = TRUE;
00475
00476   CRichEditView::OnEndPrinting(pDC, pInfo);
00477 }
00478
00479 void CMSOffice2007DemoView::OnInsertPicture()
00480 {
00481   WPD_CHARFORMAT cf = GetCharFormatSelection();
00482   InsertBitmap(IDB_PICTURE);
00483   SetCharFormat (cf);
00484   SyncFont ();
00485 }
00486
00487 void CMSOffice2007DemoView::OnInsertChart()
00488 {
00489   WPD_CHARFORMAT cf = GetCharFormatSelection();
00490   InsertBitmap(IDB_CHART);
00491   SetCharFormat (cf);
00492   SyncFont ();
00493 }
00494
00495 void CMSOffice2007DemoView::OnInsertTable()
00496 {
00497   WPD_CHARFORMAT cf = GetCharFormatSelection();
00498   InsertBitmap(IDB_TABLE);
00499   SetCharFormat (cf);
00500   SyncFont ();
00501 }
00502
00503 BOOL CMSOffice2007DemoView::InsertBitmap(UINT uiBmpResID)
00504 {
00505   CWaitCursor wait;
00506
00507   CBitmap bmp;
00508   if (!bmp.LoadBitmap(uiBmpResID))
00509   {
00510     return FALSE;
00511   }
00512
00513   std::auto_ptr<COleDataSource> apDataSrc(new COleDataSource);
00514   std::auto_ptr<COleDataObject> apData(new COleDataObject);
00515
00516   TRY
00517   {
00518     STGMEDIUM stgm;
00519     stgm.hGlobal = bmp.GetSafeHandle();
00520     stgm.tymed = TYMED_GDI;
00521     stgm.pUnkForRelease = NULL;
00522
00523     apDataSrc->CacheData(CF_BITMAP, &stgm);
00524
00525     LPDATAOBJECT lpdata;
00526
00527     if (FAILED(apDataSrc->m_xDataObject.QueryInterface(IID_IDataObject,
00528       (LPVOID FAR*) &lpdata)))
00529     {
00530       AfxThrowUserException();
00531     }
00532
00533     apData->Attach(lpdata);
00534     lpdata->Release();
00535
00536     CMSOffice2007DemoDoc* pDoc = GetDocument();
00537     ASSERT_VALID(pDoc);
00538
00539     std::auto_ptr<CMSOffice2007DemoCntrItem> apItem(new CMSOffice2007DemoCntrItem(NULL, pDoc));
00540     ASSERT_VALID(apItem.get());
00541
00542     if (!apItem->CreateStaticFromData(apData.release()))
00543     {
00544       AfxThrowUserException();
00545     }
00546
00547     apItem->m_uiCategoryID = uiBmpResID;
00548     InsertItem(apItem.release());
00549
00550     pDoc->UpdateAllViews(this);
00551   }
00552   CATCH(CException, e)
00553   {
00554     return FALSE;
00555   }
00556   END_CATCH
00557
00558   CMainFrame* pMainFrame = ((CMainFrame*) GetTopLevelFrame());
00559   ASSERT_VALID(pMainFrame);
00560
00561   pMainFrame->ActivateRibbonContextCategory(uiBmpResID);
00562
00563   return TRUE;
00564 }
00565
00566 void CMSOffice2007DemoView::OnSelChange(NMHDR* pNMHDR, LRESULT* pResult)
00567 {
00568   CRichEditView::OnSelChange(pNMHDR, pResult);
00569
00570   if (GetFocus ()->GetSafeHwnd () != GetSafeHwnd())
00571   {
00572     return;
00573   }
00574
00575   CMainFrame* pMainFrame = ((CMainFrame*) GetTopLevelFrame());
00576   ASSERT_VALID(pMainFrame);
00577
00578   UINT uiCategoryID = 0;
00579
00580   CMSOffice2007DemoCntrItem* pItem = (CMSOffice2007DemoCntrItem*) GetSelectedItem();
00581
00582   if (pItem != NULL)
00583   {
00584     uiCategoryID = pItem->m_uiCategoryID;
00585   }
00586
00587   pMainFrame->SetRibbonContextCategory(uiCategoryID);
00588
00589   SyncFont();
00590 }
00591
00592 void CMSOffice2007DemoView::OnUpdatePrintLayout(CCmdUI* pCmdUI)
00593 {
00594   pCmdUI->SetCheck();
00595 }
00596
00597 void CMSOffice2007DemoView::OnIndentLeft()
00598 {
00599 }
00600
00601 void CMSOffice2007DemoView::OnIndentRight()
00602 {
00603 }
00604
00605 void CMSOffice2007DemoView::OnSpaceAfter()
00606 {
00607 }
00608
00609 void CMSOffice2007DemoView::OnSpaceBefore()
00610 {
00611 }
00612
00613 void CMSOffice2007DemoView::SyncFont()
00614 {
00615   USES_CONVERSION;
00616
00617   CString strFontName;
00618
00619
00620   // get the current font from the view and update
00621   WPD_CHARFORMAT cf = GetCharFormatSelection();
00622
00623   CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
00624   ASSERT_VALID(pRibbon);
00625
00626   CMFCRibbonFontComboBox* pFontCombo = DYNAMIC_DOWNCAST(CMFCRibbonFontComboBox, pRibbon->FindByID(ID_FONT_FONT));
00627
00628   if (pFontCombo != NULL && !pFontCombo->HasFocus())
00629   {
00630     if ((cf.dwMask &(CFM_FACE|CFM_CHARSET)) == (CFM_FACE|CFM_CHARSET))
00631     {
00632 #if _MSC_VER >= 1300
00633       strFontName = cf.szFaceName;
00634 #else
00635       strFontName = A2T(cf.szFaceName);
00636 #endif
00637       pFontCombo->SetFont(strFontName, DEFAULT_CHARSET, TRUE);
00638     }
00639     else
00640     {
00641       pFontCombo->SetText(_T(""));
00642     }
00643   }
00644
00645   CMFCRibbonComboBox* pFontSizeCombo = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_FONT_FONTSIZE));
00646   if (pFontSizeCombo != NULL)
00647   {
00648     pFontSizeCombo->SetEditText(TwipsToPointString(cf.yHeight));
00649   }
00650
00651   SetFocus();
00652 }
00653
00654 void CMSOffice2007DemoView::GetDefaultFont(CCharFormat& cf)
00655 {
00656   USES_CONVERSION;
00657
00658   CString strDefFont = _T("Tahoma");
00659
00660   ASSERT(cf.cbSize == sizeof(WPD_CHARFORMAT));
00661   cf.dwMask = CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT|CFM_SIZE| CFM_COLOR|CFM_OFFSET|CFM_PROTECTED;
00662   cf.dwEffects = CFE_AUTOCOLOR;
00663   cf.yHeight = 200; //10pt
00664   cf.yOffset = 0;
00665   cf.crTextColor = RGB(0, 0, 0);
00666   cf.bCharSet = 0;
00667   cf.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
00668   ASSERT(strDefFont.GetLength() < LF_FACESIZE);
00669 #if _MSC_VER >= 1300
00670   lstrcpyn(cf.szFaceName, strDefFont, LF_FACESIZE);
00671 #else
00672   lstrcpynA(cf.szFaceName, T2A((LPTSTR)(LPCTSTR) strDefFont), LF_FACESIZE);
00673 #endif
00674   cf.dwMask |= CFM_FACE;
00675 }
00676
00677 void CMSOffice2007DemoView::OnViewRuler()
00678 {
00679   m_bViewRuler = !m_bViewRuler;
00680 }
00681
00682 void CMSOffice2007DemoView::OnViewGridLines()
00683 {
00684   m_bViewGridLines = !m_bViewGridLines;
00685 }
00686
00687 void CMSOffice2007DemoView::OnViewProps()
00688 {
00689   m_bViewProps = !m_bViewProps;
00690 }
00691
00692 void CMSOffice2007DemoView::OnViewDocMap()
00693 {
00694   m_bViewDocMap = !m_bViewDocMap;
00695 }
00696
00697 void CMSOffice2007DemoView::OnUpdateViewRuler(CCmdUI* pCmdUI)
00698 {
00699   pCmdUI->SetCheck(m_bViewRuler);
00700 }
00701
00702 void CMSOffice2007DemoView::OnUpdateViewGridLines(CCmdUI* pCmdUI)
00703 {
00704   pCmdUI->SetCheck(m_bViewGridLines);
00705 }
00706
00707 void CMSOffice2007DemoView::OnUpdateViewProps(CCmdUI* pCmdUI)
00708 {
00709   pCmdUI->SetCheck(m_bViewProps);
00710 }
00711
00712 void CMSOffice2007DemoView::OnUpdateViewDocMap(CCmdUI* pCmdUI)
00713 {
00714   pCmdUI->SetCheck(m_bViewDocMap);
00715 }
00716
00717 void CMSOffice2007DemoView::OnUpdateViewThumb(CCmdUI* pCmdUI)
00718 {
00719   pCmdUI->Enable(FALSE);
00720 }
00721
00722 void CMSOffice2007DemoView::OnInsertBulletFromPalette()
00723 {
00724   CString str;
00725   str.Format(_T("Insert Bullet from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_FROM_PALETTE_BULLET));
00726
00727   MessageBox(str);
00728 }
00729
00730 void CMSOffice2007DemoView::OnInsertNumberFromPalette()
00731 {
00732   CString str;
00733   str.Format(_T("Insert Number from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_FROM_PALETTE_NUMBER));
00734
00735   MessageBox(str);
00736 }
00737
00738 void CMSOffice2007DemoView::OnInsertMultilevelFromPalette()
00739 {
00740   CString str;
00741   str.Format(_T("Insert Multilevel List from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_FROM_PALETTE_MULTILEVEL));
00742
00743   MessageBox(str);
00744 }
00745
00746 void CMSOffice2007DemoView::InitFloaty(CMFCRibbonMiniToolBar* pFloaty)
00747 {
00748   ASSERT_VALID(pFloaty);
00749
00750   CList<UINT, UINT> lstCmds;
00751
00752   lstCmds.AddTail(ID_FONT_FONT);
00753   lstCmds.AddTail(ID_FONT_FONTSIZE);
00754   lstCmds.AddTail(ID_FONT_GROWFONT);
00755   lstCmds.AddTail(ID_FONT_SHRINK);
00756   lstCmds.AddTail(ID_WRITE_CHANGESTYLES);
00757   lstCmds.AddTail(ID_EDIT_COPYFORMAT);
00758   lstCmds.AddTail(ID_FONT_BOLD);
00759   lstCmds.AddTail(ID_FONT_ITALIC);
00760   lstCmds.AddTail(ID_PARA_CENTER);
00761   lstCmds.AddTail(ID_FONT_TEXTHIGHLIGHT);
00762   lstCmds.AddTail(ID_FONT_COLOR);
00763   lstCmds.AddTail(ID_PARA_DECREASEINDENT);
00764   lstCmds.AddTail(ID_PARA_INCREASEINDENT);
00765   lstCmds.AddTail(ID_PARA_BULLETS);
00766
00767   pFloaty->SetCommands(((CMainFrame*) GetTopLevelFrame())->GetRibbonBar(), lstCmds);
00768 }
00769
00770 void CMSOffice2007DemoView::OnCharStrikeThrough()
00771 {
00772   OnCharEffect(CFM_STRIKEOUT, CFE_STRIKEOUT);
00773 }
00774
00775 void CMSOffice2007DemoView::OnUpdateCharStrikeThrough(CCmdUI* pCmdUI)
00776 {
00777   OnUpdateCharEffect(pCmdUI, CFM_STRIKEOUT, CFE_STRIKEOUT);
00778 }
00779
00780 void CMSOffice2007DemoView::OnEditUndo()
00781 {
00782   CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
00783   ASSERT_VALID(pRibbon);
00784
00785   CMFCRibbonUndoButton* pUndoBtn = DYNAMIC_DOWNCAST(CMFCRibbonUndoButton, pRibbon->FindByID(ID_EDIT_UNDO));
00786
00787   if (pUndoBtn != NULL && pUndoBtn->GetActionNumber() > 0)
00788   {
00789     CString str;
00790     str.Format(_T("Demo: undo %d action(s)"), pUndoBtn->GetActionNumber());
00791
00792     MessageBox(str);
00793     return;
00794   }
00795
00796   CRichEditView::OnEditUndo();
00797 }
00798
00799 void CMSOffice2007DemoView::OnInsertTableGallery()
00800 {
00801   if (CRibbonTableButton::GetRows() > 0 && CRibbonTableButton::GetColumns() > 0)
00802   {
00803     CString str;
00804     str.Format(_T("Demo: insert %dx%d table"), CRibbonTableButton::GetColumns(), CRibbonTableButton::GetRows());
00805
00806     MessageBox(str);
00807
00808     WPD_CHARFORMAT cf = GetCharFormatSelection();
00809     InsertBitmap(IDB_TABLE);
00810     SetCharFormat (cf);
00811     SyncFont ();
00812   }
00813 }
00814
00815 void CMSOffice2007DemoView::OnInsertShape()
00816 {
00817   CString str;
00818   str.Format(_T("Insert Shape from Palette %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_INSERT_SHAPES));
00819
00820   MessageBox(str);
00821 }
00822
00823 void CMSOffice2007DemoView::OnQuickStyle()
00824 {
00825   CString str;
00826   str.Format(_T("Change Style %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_WRITE_QUICKSTYLES));
00827
00828   MessageBox(str);
00829 }
00830
00831 void CMSOffice2007DemoView::OnUpdateEditFind(CCmdUI* pCmdUI)
00832 {
00833   pCmdUI->Enable(TRUE);
00834 }
00835
00836 void CMSOffice2007DemoView::OnUpdateEditReplace(CCmdUI* pCmdUI)
00837 {
00838   pCmdUI->Enable(TRUE);
00839 }
00840
00841 void CMSOffice2007DemoView::OnPagelayoutIndentLeft()
00842 {
00843   CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
00844   ASSERT_VALID(pRibbon);
00845
00846   CMFCRibbonEdit* pEdit = DYNAMIC_DOWNCAST(CMFCRibbonEdit, pRibbon->FindByID(ID_PAGELAYOUT_INDENT_LEFT));
00847
00848   WPD_PARAFORMAT pf;
00849   pf.cbSize = sizeof(PARAFORMAT);
00850   pf.dwMask = PFM_STARTINDENT;
00851   pf.dxStartIndent = _ttol(pEdit->GetEditText()) * 10;
00852
00853   SetParaFormat(pf);
00854 }
00855
00856 void CMSOffice2007DemoView::OnPagelayoutIndentRight()
00857 {
00858   CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
00859   ASSERT_VALID(pRibbon);
00860
00861   CMFCRibbonEdit* pEdit = DYNAMIC_DOWNCAST(CMFCRibbonEdit, pRibbon->FindByID(ID_PAGELAYOUT_INDENT_RIGHT));
00862
00863   WPD_PARAFORMAT pf;
00864   pf.cbSize = sizeof(PARAFORMAT);
00865   pf.dwMask = PFM_RIGHTINDENT;
00866   pf.dxRightIndent = _ttol(pEdit->GetEditText()) * 10;
00867
00868   SetParaFormat(pf);
00869 }
00870
00871 void CMSOffice2007DemoView::OnPageLayoutTheme()
00872 {
00873   CString str;
00874   str.Format(_T("Change Theme: %d"), CMFCRibbonGallery::GetLastSelectedItem(ID_PAGELAYOUT_THEMES));
00875
00876   MessageBox(str);
00877 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/HistoryObj.cpp Source File

  • vc2008fp
  • IEDemo

HistoryObj.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013 #include "HistoryObj.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char THIS_FILE[]=__FILE__;
00018 #define new DEBUG_NEW
00019 #endif
00020
00021 //////////////////////////////////////////////////////////////////////
00022 // Construction/Destruction
00023 //////////////////////////////////////////////////////////////////////
00024
00025 CHistoryObj::CHistoryObj(const CString& strTitle, const CString& strURL,
00026             const UINT uiCommand) :
00027   m_strTitle (strTitle),
00028   m_strURL (strURL),
00029   m_uiCommand (uiCommand)
00030 {
00031 }
00032
00033 CHistoryObj::~CHistoryObj()
00034 {
00035 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRegisterControlsDlg Member List

This is the complete list of members for CRegisterControlsDlg, including all inherited members.
CRegisterControlsDlg(CWnd *pParent=NULL) | CRegisterControlsDlg |
DoDataExchange(CDataExchange *pDX) | CRegisterControlsDlg | [protected, virtual]
IDD enum value | CRegisterControlsDlg |
m_butReregister | CRegisterControlsDlg |
m_butUnregister | CRegisterControlsDlg |
m_lvRegisteredControls | CRegisterControlsDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CRegisterControlsDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CRegisterControlsDlg | [protected]
OnInitDialog() | CRegisterControlsDlg | [protected, virtual]
OnRegister() | CRegisterControlsDlg | [protected]
OnRegisteredControlsItemChanged(NMHDR *pNMHDR, LRESULT *pResult) | CRegisterControlsDlg | [protected]
OnReregister() | CRegisterControlsDlg | [protected]
OnUnregister() | CRegisterControlsDlg | [protected]
RefreshRegisteredControls() | CRegisterControlsDlg | [protected]
UpdateButtons() | CRegisterControlsDlg | [protected]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutlookDemoApp Member List

This is the complete list of members for COutlookDemoApp, including all inherited members.
COutlookDemoApp() | COutlookDemoApp |
ExitInstance() | COutlookDemoApp | [virtual]
InitInstance() | COutlookDemoApp | [virtual]
MailFrame enum value | COutlookDemoApp |
MainFrame enum value | COutlookDemoApp |
OnAppAbout() | COutlookDemoApp |
OnViewAppLook() | COutlookDemoApp |
OUTLOOK_FRAME enum name | COutlookDemoApp |
PreLoadState() | COutlookDemoApp | [virtual]
SetActiveFrame(OUTLOOK_FRAME frame) | COutlookDemoApp |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/resource.h Source File

  • internet
  • Scheduler

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by Scheduler.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_SCHEDULER_DIALOG            102
00009 #define IDD_SCHEDULEENTRYINFODLG        103
00010 #define IDD_ENTRYINFO_DLG               103
00011 #define IDR_HTML_SCHEDULER_DIALOG       104
00012 #define IDR_HTML_SCHEDULEENTRYINFODLG   105
00013 #define IDR_HTML_ENTRYINFO_DLG          105
00014 #define IDD_DELETEENTRIEDLG             106
00015 #define IDR_HTML_DELETEENTRIEDLG        107
00016 #define IDD_DELETESCHEDULEDLG           108
00017 #define IDR_HTML_DELETESCHEDULEDLG      109
00018 #define IDD_MODIFYORDELETE              110
00019 #define IDR_HTML_MODIFYORDELETE         111
00020 #define IDR_MAINFRAME                   128
00021 #define IDD_DELETESCHEDULEENTRYDLG      134
00022 #define IDR_FILEMENU                    143
00023 #define IDR_HELPMENU                    143
00024 #define IDD_FILE_NEW                    144
00025 #define IDD_FILE_OPEN                   145
00026 #define IDD_FILE_EXIT                   146
00027 #define IDR_HTML1                       149
00028 #define IDD_HELP_ABOUTSCHEDULER         154
00029 #define IDS_ENTERTITLE                  156
00030 #define IDS_INVALIDTIME                 158
00031 #define IDS_INVALIDDATE                 160
00032 #define IDS_CANNOTOPENFILE              162
00033
00034 // Next default values for new objects
00035 //
00036 #ifdef APSTUDIO_INVOKED
00037 #ifndef APSTUDIO_READONLY_SYMBOLS
00038 #define _APS_NEXT_RESOURCE_VALUE        166
00039 #define _APS_NEXT_COMMAND_VALUE         32773
00040 #define _APS_NEXT_CONTROL_VALUE         1008
00041 #define _APS_NEXT_SYMED_VALUE           112
00042 #endif
00043 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTesthelpCtrl Member List

This is the complete list of members for CTesthelpCtrl, including all inherited members.
AboutBox() | CTesthelpCtrl | [protected]
CTesthelpCtrl() | CTesthelpCtrl |
DECLARE_OLECREATE_EX(CTesthelpCtrl) DECLARE_OLETYPELIB(CTesthelpCtrl) DECLARE_PROPPAGEIDS(CTesthelpCtrl) DECLARE_OLECTLTYPE(CTesthelpCtrl) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct) | CTesthelpCtrl | [protected]
dispidName1 enum value | CTesthelpCtrl |
dispidName2 enum value | CTesthelpCtrl |
dispidName3 enum value | CTesthelpCtrl |
dispidShowToolTip enum value | CTesthelpCtrl |
dispidToolTipText enum value | CTesthelpCtrl |
dispidUseMyHelp enum value | CTesthelpCtrl |
dispidUsePopupHelp enum value | CTesthelpCtrl |
DoPropExchange(CPropExchange *pPX) | CTesthelpCtrl | [virtual]
m_bShowToolTip | CTesthelpCtrl | [protected]
m_bUseMyHelp | CTesthelpCtrl | [protected]
m_nUsePopupHelp | CTesthelpCtrl | [protected]
m_szName1 | CTesthelpCtrl | [protected]
m_szName2 | CTesthelpCtrl | [protected]
m_szName3 | CTesthelpCtrl | [protected]
m_szToolTipText | CTesthelpCtrl | [protected]
m_ttip | CTesthelpCtrl |
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CTesthelpCtrl | [virtual]
OnHelpCommand(UINT_PTR wParam, LONG_PTR lParam) | CTesthelpCtrl |
OnLButtonDown(UINT nFlags, CPoint point) | CTesthelpCtrl | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CTesthelpCtrl | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CTesthelpCtrl | [protected]
OnName1Changed() | CTesthelpCtrl | [protected]
OnName2Changed() | CTesthelpCtrl | [protected]
OnName3Changed() | CTesthelpCtrl | [protected]
OnResetState() | CTesthelpCtrl | [virtual]
OnShowToolTipChanged() | CTesthelpCtrl | [protected]
OnToolTipTextChanged() | CTesthelpCtrl | [protected]
OnUseMyHelpChanged() | CTesthelpCtrl | [protected]
OnUsePopupHelpChanged() | CTesthelpCtrl | [protected]
RelayEvent(UINT message, WPARAM wParam, LPARAM lParam) | CTesthelpCtrl |
~CTesthelpCtrl() | CTesthelpCtrl | [protected]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COIPF Member List

This is the complete list of members for COIPF, including all inherited members.
GetDocFrame() | COIPF | [inline]
GetDocFrame() | COIPF | [inline]
GetMainFrame() | COIPF | [inline]
GetMainFrame() | COIPF | [inline]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpad.h Source File

  • vc2008fp
  • WordPad

wordpad.h

Go to the documentation of this file.
00001 //
00002 // wordpad.h : main header file for the WORDPAD application
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #ifndef __AFXWIN_H__
00015   #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 #include "resource.h"       // main symbols
00019 #include "splash.h"
00020 #include "options.h"
00021 #include "afxtempl.h"
00022
00023 #define WPM_BARSTATE WM_USER
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CWordPadApp:
00027 // See wordpad.cpp for the implementation of this class
00028 //
00029
00030 class CWordPadCommandLineInfo : public CCommandLineInfo
00031 {
00032 public:
00033   CWordPadCommandLineInfo() {m_bForceTextMode = FALSE;}
00034   BOOL m_bForceTextMode;
00035   virtual void ParseParam(const char* pszParam,BOOL bFlag,BOOL bLast);
00036 };
00037
00038 class CWordPadApp : public CWinAppEx
00039 {
00040 public:
00041   CWordPadApp();
00042   ~CWordPadApp();
00043
00044   virtual void PreLoadState ();
00045
00046 //Attributes
00047   CWordPadCommandLineInfo cmdInfo;
00048   CDC m_dcScreen;
00049   LOGFONT m_lf;
00050   int m_nDefFont;
00051   static int m_nOpenMsg;
00052   static int m_nPrinterChangedMsg;
00053   CRect m_rectPageMargin;
00054   CRect m_rectInitialFrame;
00055   BOOL m_bMaximized;
00056   BOOL m_bPromptForType;
00057   BOOL m_bWin4;
00058   BOOL m_bHiColorIcons;
00059
00060 #ifndef _UNICODE
00061   BOOL m_bWin31;
00062 #endif
00063   BOOL m_bForceTextMode;
00064   BOOL m_bWordSel;
00065   BOOL m_bForceOEM;
00066   int m_nFilterIndex;
00067   int m_nNewDocType;
00068   CDocOptions m_optionsText;
00069   CDocOptions m_optionsRTF;
00070   CDocOptions m_optionsWord; //wrap to ruler
00071   CDocOptions m_optionsWrite; //wrap to ruler
00072   CDocOptions m_optionsIP;    //wrap to ruler
00073   CDocOptions m_optionsNull;
00074   CList<HWND, HWND> m_listPrinterNotify;
00075
00076   BOOL IsDocOpen(LPCTSTR lpszFileName);
00077
00078 // Get
00079   int GetUnits() {return m_nUnits;}
00080   int GetTPU() { return GetTPU(m_nUnits);}
00081   int GetTPU(int n) { return m_units[n].m_nTPU;}
00082   LPCTSTR GetAbbrev() { return m_units[m_nUnits].m_strAbbrev;}
00083   LPCTSTR GetAbbrev(int n) { return m_units[n].m_strAbbrev;}
00084   const CUnit& GetUnit() {return m_units[m_nUnits];}
00085   CDockState& GetDockState(int nDocType, BOOL bPrimary = TRUE);
00086   CDocOptions& GetDocOptions(int nDocType);
00087
00088 // Set
00089   void SetUnits(int n)
00090   { ASSERT(n>=0 && n <m_nPrimaryNumUnits); m_nUnits = n; }
00091
00092 // Operations
00093   void RegisterFormats();
00094   static BOOL CALLBACK StaticEnumProc(HWND hWnd, LPARAM lParam);
00095   void UpdateRegistry();
00096   void NotifyPrinterChanged(BOOL bUpdatePrinterSelection = FALSE);
00097   BOOL PromptForFileName(CString& fileName, UINT nIDSTitle, DWORD dwFlags,
00098     BOOL bOpenFileDialog, int* pType = NULL);
00099
00100   BOOL ParseMeasurement(TCHAR* buf, int& lVal);
00101   void PrintTwips(TCHAR* buf, int nValue, int nDecimal);
00102   void SaveOptions();
00103   void LoadOptions();
00104   void LoadAbbrevStrings();
00105 #ifdef CREATE_DEV_NAMES
00106   HGLOBAL CreateDevNames();
00107 #endif
00108
00109 // Overrides
00110   BOOL IsIdleMessage(MSG* pMsg);
00111   // ClassWizard generated virtual function overrides
00112   //{{AFX_VIRTUAL(CWordPadApp)
00113   public:
00114   virtual BOOL InitInstance();
00115   virtual int ExitInstance();
00116   virtual BOOL OnDDECommand(LPTSTR lpszCommand);
00117   virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);
00118   virtual BOOL PreTranslateMessage(MSG* pMsg);
00119   //}}AFX_VIRTUAL
00120
00121 // Implementation
00122   COleTemplateServer m_server;
00123     // Server object for document creation
00124
00125   //{{AFX_MSG(CWordPadApp)
00126   afx_msg void OnAppAbout();
00127   afx_msg void OnFileNew();
00128   afx_msg void OnFileOpen();
00129   afx_msg void OnViewAppLook();
00130   //}}AFX_MSG
00131   DECLARE_MESSAGE_MAP()
00132 private:
00133   int m_nUnits;
00134   static const int m_nPrimaryNumUnits;
00135   static const int m_nNumUnits;
00136   static CUnit m_units[7];
00137 };
00138
00139 /////////////////////////////////////////////////////////////////////////////
00140
00141 extern CWordPadApp theApp;
00142 //inline CWordPadApp* GetWordPadApp() {return (CWordPadApp*)AfxGetApp();}
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLunchPage Member List

This is the complete list of members for CLunchPage, including all inherited members.
CLunchPage() | CLunchPage |
DoDataExchange(CDataExchange *pDX) | CLunchPage | [protected, virtual]
IDD enum value | CLunchPage |
OnInitDialog() | CLunchPage | [protected, virtual]
~CLunchPage() | CLunchPage |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/DllScreenCap.cpp Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

DllScreenCap.cpp

Go to the documentation of this file.
00001 // DllScreenCap.cpp : Defines the initialization routines for the DLL.
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "DllScreenCap.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 //
00021 //  Note!
00022 //
00023 //    If this DLL is dynamically linked against the MFC
00024 //    DLLs, any functions exported from this DLL which
00025 //    call into MFC must have the AFX_MANAGE_STATE macro
00026 //    added at the very beginning of the function.
00027 //
00028 //    For example:
00029 //
00030 //    extern "C" BOOL PASCAL EXPORT ExportedFunction()
00031 //    {
00032 //      AFX_MANAGE_STATE(AfxGetStaticModuleState());
00033 //      // normal function body here
00034 //    }
00035 //
00036 //    It is very important that this macro appear in each
00037 //    function, prior to any calls into MFC.  This means that
00038 //    it must appear as the first statement within the
00039 //    function, even before any object variable declarations
00040 //    as their constructors may generate calls into the MFC
00041 //    DLL.
00042 //
00043 //    Please see MFC Technical Notes 33 and 58 for additional
00044 //    details.
00045 //
00046
00047 // CDllScreenCapApp
00048
00049 BEGIN_MESSAGE_MAP(CDllScreenCapApp, CWinApp)
00050 END_MESSAGE_MAP()
00051
00052
00053 // CDllScreenCapApp construction
00054
00055 CDllScreenCapApp::CDllScreenCapApp()
00056 {
00057   // TODO: add construction code here,
00058   // Place all significant initialization in InitInstance
00059 }
00060
00061
00062 // The one and only CDllScreenCapApp object
00063
00064 CDllScreenCapApp theApp;
00065
00066
00067 // CDllScreenCapApp initialization
00068
00069 BOOL CDllScreenCapApp::InitInstance()
00070 {
00071   CWinApp::InitInstance();
00072
00073   return TRUE;
00074 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/CmnCtrl2.h Source File

  • general
  • CmnCtrl2

CmnCtrl2.h

Go to the documentation of this file.
00001 // CmnCtrl2.h : main header file for the CMNCTRL2 application
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #if !defined(AFX_CMNCTRL2_H__A14ECE90_E24D_11D0_8286_00C04FD73634__INCLUDED_)
00014 #define AFX_CMNCTRL2_H__A14ECE90_E24D_11D0_8286_00C04FD73634__INCLUDED_
00015
00016 #if _MSC_VER >= 1000
00017 #pragma once
00018 #endif // _MSC_VER >= 1000
00019
00020 #ifndef __AFXWIN_H__
00021   #error include 'stdafx.h' before including this file for PCH
00022 #endif
00023
00024 #include "resource.h"       // main symbols
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CCmnCtrl2App:
00028 // See CmnCtrl2.cpp for the implementation of this class
00029 //
00030
00031 class CCmnCtrl2App : public CWinApp
00032 {
00033 public:
00034   CCmnCtrl2App();
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CCmnCtrl2App)
00039   public:
00040   virtual BOOL InitInstance();
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044
00045   //{{AFX_MSG(CCmnCtrl2App)
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052
00053 //{{AFX_INSERT_LOCATION}}
00054 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00055
00056 #endif // !defined(AFX_CMNCTRL2_H__A14ECE90_E24D_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgcbar.cpp Source File

  • general
  • dlgcbr32

Dlgcbar.cpp

Go to the documentation of this file.
00001 // Dlgcbar.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #include "resource.h"
00015 #include "dlgcbar.h"
00016 #include "aboutdlg.h"
00017 #include "wndlist.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CTheApp
00027
00028 CTheApp theApp;
00029
00030 BEGIN_MESSAGE_MAP(CTheApp, CWinApp)
00031   //{{AFX_MSG_MAP(CTheApp)
00032   ON_COMMAND(ID_HELP_ABOUT, OnHelpAbout)
00033     // NOTE - the ClassWizard will add and remove mapping macros here.
00034     //    DO NOT EDIT what you see in these blocks of generated code!
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CTheApp Constructors/Destructors
00040
00041 CTheApp::CTheApp()
00042 {
00043 }
00044
00045 CTheApp::~CTheApp()
00046 {
00047 }
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CTheApp::FirstInstance
00051 //      FirstInstance checks for an existing instance of the application.
00052 //      If one is found, it is activated.
00053 //
00054 //      This function uses a technique similar to that described in KB
00055 //      article Q109175 to locate the previous instance of the application.
00056 //      However, instead of searching for a matching class name, it searches
00057 //      for a matching caption.  This allows us to use the normal dialog
00058 //      class for our main window.  It assumes that the AFX_IDS_APP_TITLE
00059 //      string resource matches the caption specified in the dialog template.
00060
00061 BOOL CTheApp::FirstInstance()
00062 {
00063   CString strCaption;
00064   strCaption.LoadString(AFX_IDS_APP_TITLE);
00065
00066   CWnd* pwndFirst = CWnd::FindWindow((LPCTSTR)(DWORD_PTR)WC_DIALOG,
00067                      strCaption);
00068   if (pwndFirst)
00069   {
00070     // another instance is already running - activate it
00071     CWnd* pwndPopup = pwndFirst->GetLastActivePopup();
00072     pwndFirst->SetForegroundWindow();
00073     if (pwndFirst->IsIconic())
00074       pwndFirst->ShowWindow(SW_SHOWNORMAL);
00075     if (pwndFirst != pwndPopup)
00076       pwndPopup->SetForegroundWindow();
00077     return FALSE;
00078   }
00079   else
00080   {
00081     // this is the first instance
00082     return TRUE;
00083   }
00084 }
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CTheApp::InitInstance
00088 //      InitInstance performs per-instance initialization of the DLGCBAR
00089 //      application.  If an instance of the application is already running,
00090 //      it activates that instance.  Otherwise, it creates the modeless
00091 //      dialog which serves as the application's interface.
00092
00093 BOOL CTheApp::InitInstance()
00094 {
00095   if (!FirstInstance())
00096     return FALSE;
00097
00098   // Create main window
00099   TRY
00100   {
00101     CWndListDlg* pMainWnd = new CWndListDlg;
00102     m_pMainWnd = pMainWnd;
00103     return pMainWnd->Create();
00104   }
00105   CATCH_ALL(e)
00106   {
00107     TRACE0("Failed to create main dialog\n");
00108     return FALSE;
00109   }
00110   END_CATCH_ALL
00111
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CTheApp::OnHelpAbout
00116 //      OnHelpAbout displays the application's about box.
00117
00118 void CTheApp::OnHelpAbout()
00119 {
00120   CAboutDlg dlg(m_pMainWnd);
00121   dlg.DoModal();
00122 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/makehm/makehm.cpp Source File

  • utility
  • makehm

makehm.cpp

Go to the documentation of this file.
00001 // makehm.cpp : A simple utility to create .HM (Help Map) files from
00002 //              .H (resource header files).
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 //  This utility creates a .HM file from a header file (usually
00014 //  resource.h) which allows one to maintain the help mappings
00015 //  without a lot of manual effort on the part of the programmer
00016 //  or help author.
00017 //
00018 //  This is done by naming convention, the naming convention used
00019 //  being that normally accepted as standard Windows and MFC
00020 //  programming practices.
00021
00022 #include <ctype.h>
00023 #include <afxcoll.h>    // also includes <afx.h>
00024
00025 #ifdef _DEBUG
00026 #undef THIS_FILE
00027 static char BASED_CODE THIS_FILE[] = __FILE__;
00028 #endif
00029
00030 #define SIGNON_VER 10
00031 #define SIGNON_REV 0
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034
00035 void UsageErr(const TCHAR* szErrorMessage = NULL,
00036         const TCHAR* szErrorParam = NULL)
00037 {
00038   _ftprintf(stderr,
00039     _T("\nMicrosoft (R) Help Maintenance Utility   Version %d.%02d\n")
00040     _T("Copyright (c) Microsoft Corporation.  All rights reserved.\n\n"),
00041     SIGNON_VER, SIGNON_REV);
00042
00043   if (szErrorMessage != NULL)
00044   {
00045     _ftprintf(stderr, _T("makehm: error: "));
00046     _ftprintf(stderr, szErrorMessage, szErrorParam);
00047     _ftprintf(stderr, _T(".\n\n"));
00048   }
00049
00050   _ftprintf(stderr, _T("makehm usage:\n\n")
00051   _T("  makehm [/h [/a <file.h> [/I <path>]]] <from>,<to>,<add>... <resource.h> [output.hm]\n")
00052   _T("\n")
00053   _T("    /h     - generates an include file (.h) for HTML help instead of\n")
00054   _T("             a normal (.hm) WinHelp map file.\n")
00055   _T("    /a     - copies the contents of the specified <file.h> file to the\n")
00056   _T("             output.\n")
00057   _T("    /I     - additional path to search for the file.h file.  The program will\n")
00058   _T("             first look in the current directory, then the path specified by the\n")
00059   _T("             /I option and then in the path specified by the INCLUDE\n")
00060   _T("             environment variable.\n")
00061   _T("\n")
00062   _T("    <from>,<to>,<add> fields must appear as one argument and\n")
00063   _T("       are separated by commas.  A set of these arguments may\n")
00064   _T("       appear more than once.\n")
00065   _T("    <from> - identifies the symbol prefix to map from (e.g., ID_)\n")
00066   _T("    <to>   - identifies the symbol prefix to map to (e.g., HID_)\n")
00067   _T("    <add>  - identifies a numeric offset to be used (e.g., 0x10000)\n")
00068   _T("\n")
00069   _T("    <resource.h> - identifies the input header file (e.g., resource.h).\n")
00070   _T("    [output.hm] - identifies the output help map file.  If not\n")
00071   _T("       supplied, output is written to stdout.\n"));
00072
00073   exit(1);
00074 }
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077
00078 class CLineFile : public CStdioFile
00079 {
00080 public:
00081   BOOL ReadLine(CString& stringLine);
00082   void WriteLine(const CString& stringLine);
00083   void SafeOpen(const CString& string, UINT nStyleFlags);
00084 };
00085
00086 BOOL CLineFile::ReadLine(CString& str)
00087 {
00088   UINT nMax = 512;
00089   for (;;)
00090   {
00091     ULONGLONG pos = GetPosition();
00092     if (!ReadString(str.GetBuffer(nMax), nMax))
00093       return FALSE;
00094     str.ReleaseBuffer();
00095     if (str.GetLength() < (int)nMax-1)
00096       return TRUE;
00097     nMax += 128;
00098     Seek(pos, CFile::begin);
00099   }
00100 }
00101
00102 void CLineFile::WriteLine(const CString& str)
00103 {
00104   ASSERT(str[str.GetLength()-1] == _T('\n'));
00105   WriteString(str);
00106 }
00107
00108 void CLineFile::SafeOpen(const CString& name, UINT nStyleFlags)
00109 {
00110   BOOL fSuccess = Open(name, nStyleFlags);
00111   if (!fSuccess)
00112     UsageErr(_T("unable to open file \"%s\""), name);
00113 }
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116
00117 BOOL IsValidSymbol(const TCHAR* psz)
00118 {
00119 #ifdef UNICODE
00120   if (!__iswcsymf(*psz))
00121 #else
00122   if (!__iscsymf(*psz))
00123 #endif
00124     return FALSE;
00125
00126   ASSERT(*psz != 0);
00127   ++psz;
00128   while (*psz)
00129   {
00130 #ifdef UNICODE
00131     if (!__iswcsym(*psz))
00132 #else
00133     if (!__iscsym(*psz))
00134 #endif
00135       return FALSE;
00136     ++psz;
00137   }
00138   return TRUE;
00139 }
00140
00141 #define isodigit(i) (_T('0') <= (i) && (i) <= _T('7'))
00142
00143 BOOL IsValidValue(const TCHAR* psz, DWORD& dwValue)
00144 {
00145   if (*psz == 0 || !_istdigit(*psz))
00146     return FALSE;
00147
00148   DWORD dw = 0;
00149   if (psz[0] == '0' && (psz[1] == 'x' || psz[1] == 'X'))
00150   {
00151     if (psz[1] == 0)
00152       return FALSE;
00153     psz += 2;
00154     while (_istxdigit(*psz))
00155     {
00156       dw *= 16;
00157       dw += _istdigit(*psz) ? *psz - '0' : 10 + (*psz|0x20) - 'a';
00158       ++psz;
00159     }
00160   }
00161   else if (psz[0] == '0')
00162   {
00163     while (isodigit(*psz))
00164     {
00165       dw *= 8;
00166       dw += *psz - '0';
00167       ++psz;
00168     }
00169   }
00170   else
00171   {
00172     while (_istdigit(*psz))
00173     {
00174       dw *= 10;
00175       dw += *psz - '0';
00176       ++psz;
00177     }
00178   }
00179
00180   if (*psz != 0)
00181     return FALSE;
00182
00183   dwValue = dw;
00184   return TRUE;
00185 }
00186
00187 /////////////////////////////////////////////////////////////////////////////
00188
00189 CPtrArray aMap;
00190
00191 struct CMapInfo
00192 {
00193   TCHAR* pszPrefixFrom;
00194   TCHAR* pszPrefixTo;
00195   DWORD dwAddTo;
00196 };
00197
00198 void AddToMap(TCHAR* pszArg)
00199 {
00200   ENSURE(pszArg != NULL);
00201   TCHAR* psz = _tcsdup(pszArg);
00202   if (psz == NULL)
00203   {
00204     AfxThrowMemoryException();
00205   }
00206   ASSERT(_tcschr(psz, _T(',')) != NULL);
00207
00208   TCHAR* pszPrefixFrom;
00209   TCHAR* pszPrefixTo;
00210   TCHAR* pszAddTo;
00211   DWORD dwAddTo;
00212   CMapInfo* pInfo;
00213   TCHAR* pContext=NULL;
00214
00215   // parse each field out of the argument.
00216   pszPrefixFrom = _tcstok_s(psz, _T(","), &pContext);
00217   pszPrefixTo = _tcstok_s(NULL, _T(","), &pContext);
00218   if (pszPrefixTo == NULL)
00219     goto ParmError;
00220   pszAddTo = _tcstok_s(NULL, _T(","), &pContext);
00221   if (pszAddTo == NULL)
00222     goto ParmError;
00223
00224   // make sure they are valid symbols/values.
00225   if (!IsValidSymbol(pszPrefixFrom) || !IsValidSymbol(pszPrefixTo))
00226     goto ParmError;
00227   if (!IsValidValue(pszAddTo, dwAddTo))
00228     goto ParmError;
00229
00230   // add them to the map.
00231   pInfo = new CMapInfo;
00232   ASSERT(pInfo);
00233   pInfo->pszPrefixFrom = pszPrefixFrom;
00234   pInfo->pszPrefixTo = pszPrefixTo;
00235   pInfo->dwAddTo = dwAddTo;
00236   aMap.Add(pInfo);
00237   return;
00238
00239 ParmError:
00240   UsageErr(_T("parameter \"%s\" not correctly formed."), pszArg);
00241   ASSERT(FALSE);
00242 }
00243
00244 CMapInfo* FindInMap(const TCHAR* psz)
00245 {
00246   ENSURE(psz != NULL);
00247   ENSURE(*psz != 0);
00248   int nMax = (int)aMap.GetSize();
00249   for (int i = 0; i < nMax; i++)
00250   {
00251     CMapInfo* pInfo = (CMapInfo*)aMap.GetAt(i);
00252     size_t nLen = _tcslen(pInfo->pszPrefixFrom);
00253     if (_tcsncmp(pInfo->pszPrefixFrom, psz, nLen) == 0)
00254       return pInfo;
00255   }
00256   return NULL;
00257 }
00258
00259 /////////////////////////////////////////////////////////////////////////////
00260
00261 BOOL
00262 MapNameValue(const TCHAR* pszName, CString& strNewName, DWORD& dwValue)
00263 {
00264   CMapInfo* pInfo = FindInMap(pszName);
00265   if (pInfo == NULL)
00266     return FALSE;
00267
00268   CString strName = pszName;
00269   strNewName = (CString)pInfo->pszPrefixTo +
00270     strName.Right(strName.GetLength()-(int)_tcslen(pInfo->pszPrefixFrom));
00271   dwValue += pInfo->dwAddTo;
00272   return TRUE;
00273 }
00274
00275 CString StringFromDword(DWORD dwValue)
00276 {
00277   TCHAR buf[sizeof _T("0x12345678")];
00278   _stprintf_s(buf, sizeof _T("0x12345678"), _T("0x%lX"), dwValue);
00279   return CString(buf);
00280 }
00281
00282 BOOL MapLine(CString& strLine, BOOL fHTMLFormat )
00283 {
00284   static TCHAR szWhiteSpace1[] = _T("\t ");
00285   static TCHAR szWhiteSpace2[] = _T("\t\n ");
00286   static TCHAR szDefine[] = _T("#define");
00287
00288   TCHAR* pszCopy = _tcsdup(strLine);
00289   if (pszCopy == NULL)
00290   {
00291     AfxThrowMemoryException();
00292   }
00293
00294   TCHAR* psz;
00295   TCHAR* pszSymbol;
00296   TCHAR* pszValue;
00297   DWORD dwValue;
00298   CString strNewName;
00299   TCHAR* pContext=NULL;
00300
00301   // '//{{NOHELP}}' can be placed on the line and it will not be included
00302   if (_tcsstr(strLine, _T("//{{NOHELP}}")) != NULL)
00303     goto RetFalse;
00304
00305   psz = _tcstok_s(pszCopy, szWhiteSpace1, &pContext);
00306   if (psz == NULL)
00307     goto RetFalse;
00308   if (_tcscmp(psz, szDefine) != 0)
00309     goto RetFalse;
00310   pszSymbol = _tcstok_s(NULL, szWhiteSpace1, &pContext);
00311   if (pszSymbol == NULL)
00312     goto RetFalse;
00313   pszValue = _tcstok_s(NULL, szWhiteSpace2, &pContext);
00314   if (pszValue == NULL)
00315     goto RetFalse;
00316
00317   if (!IsValidSymbol(pszSymbol))
00318     goto RetFalse;
00319   if (!IsValidValue(pszValue, dwValue))
00320     goto RetFalse;
00321   if (!MapNameValue(pszSymbol, strNewName, dwValue))
00322     goto RetFalse;
00323
00324   //BLOCK: format output line
00325   {
00326     CString strPad(_T(' '), 40-strNewName.GetLength());
00327     if (strPad.IsEmpty())
00328       strPad = _T('\t');
00329     if( fHTMLFormat )
00330       strLine = _T("#define ") + strNewName + strPad + StringFromDword(dwValue) + _T("\n");
00331     else
00332       strLine = strNewName + strPad + StringFromDword(dwValue) + _T("\n");
00333   }
00334
00335   ASSERT(pszCopy != NULL);
00336   free(pszCopy);
00337   return TRUE;
00338
00339 RetFalse:
00340   ASSERT(pszCopy != NULL);
00341   free(pszCopy);
00342   return FALSE;
00343 }
00344
00345 void AddPath( CStringList& strrgPathList, const CString& strIncludePath )
00346 {
00347   CString strPath;
00348   int curPos = 0;
00349
00350   strPath = strIncludePath.Tokenize(_T(";"), curPos );
00351
00352   while( ! strPath.IsEmpty() )
00353   {
00354     strPath.TrimLeft();
00355     strPath.TrimRight();
00356     strrgPathList.AddTail( strPath );
00357     strPath = strIncludePath.Tokenize(_T(";"), curPos );
00358   }
00359 }
00360
00361 BOOL FileExists( const TCHAR *pszFileName )
00362 {
00363   BOOL r = FALSE;
00364   CStdioFile file;
00365   if( file.Open( pszFileName, CLineFile::modeRead ) )
00366   {
00367     file.Close();
00368     r = TRUE;
00369   }
00370
00371   return r;
00372 }
00373
00374 CString FindIncludeFile( const TCHAR *pszIncludeFilename, const TCHAR *pszIncludePath )
00375 {
00376   CString strEnvInclude;
00377   CStringList strrgPathList;
00378
00379   if( FileExists( pszIncludeFilename ) )
00380     return CString(pszIncludeFilename);
00381
00382   // add current directory to path list;
00383   strrgPathList.AddTail( ".\\" );
00384
00385   // add path specified in the command line (/I option)
00386   if( pszIncludePath )
00387     AddPath( strrgPathList, pszIncludePath );
00388
00389   // add path specified in the INCLUDE variable
00390   if( strEnvInclude.GetEnvironmentVariable( _T("INCLUDE") ) )
00391     AddPath( strrgPathList, strEnvInclude );
00392
00393   POSITION pos = strrgPathList.GetHeadPosition();
00394   for (int i=0;i < strrgPathList.GetCount();i++)
00395   {
00396     CString strPath = strrgPathList.GetNext(pos);
00397     CString tmp = strPath.Right(1);
00398     if( tmp != ":" && tmp != "\\" )
00399       strPath += '\\';
00400
00401     strPath += pszIncludeFilename;
00402
00403     if( FileExists( strPath ) )
00404       return CString(strPath);
00405   }
00406
00407   return CString("");
00408 }
00409
00410 /////////////////////////////////////////////////////////////////////////////
00411
00412 int _tmain(int argc, TCHAR** argv)
00413 {
00414   int iFirstParam = 1;
00415
00416   // Turn on the "termination on heap corruption" flag.
00417   (void)HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
00418
00419   // generate output for HTML Help format
00420   BOOL fHTMLFormat = FALSE;
00421
00422   // <include.h> filename to be copied
00423   const TCHAR *pszIncludeFilename = NULL;
00424
00425   // additional include path
00426   const TCHAR *pszIncludePath = NULL;
00427
00428   if( argc > 1 && _tcsicmp(argv[1], _T("/h")) == 0 )
00429   {
00430     fHTMLFormat = TRUE;
00431     iFirstParam++;
00432
00433     if( ( argc > 3 ) && _tcsicmp(argv[2], _T("/a")) == 0 ) // copy file operation
00434     {
00435       pszIncludeFilename = argv[3];
00436       iFirstParam += 2;
00437
00438       if( argc > 5 && _tcsicmp(argv[4], _T("/i")) == 0 )
00439       {
00440         pszIncludePath = argv[5];
00441         iFirstParam += 2;
00442       }
00443     }
00444   }
00445
00446   // add symbol mappings to the map.
00447   BOOL fAddedToMap = FALSE;
00448   int i;
00449   for (i = iFirstParam; i < argc && _tcschr(argv[i], _T(',')) != NULL; i++)
00450   {
00451     AddToMap(argv[i]);
00452     fAddedToMap = TRUE;
00453   }
00454
00455   // must only have 1-2 parms left on command line.
00456   if (!fAddedToMap || i < argc-2 || i > argc-1)
00457   {
00458     UsageErr(NULL, NULL);
00459     ASSERT(FALSE);
00460   }
00461
00462   // open input file.
00463   CLineFile fileIn;
00464   fileIn.SafeOpen(argv[i], CLineFile::modeRead);
00465
00466   // open/hook up output file.
00467   CLineFile fileOut;
00468   if (i+1 < argc)
00469     fileOut.SafeOpen(argv[i+1], CLineFile::modeWrite | CLineFile::modeCreate);
00470   else
00471     fileOut.m_pStream = stdout;
00472
00473   // process the file.
00474   CString strLine;
00475   while (fileIn.ReadLine(strLine))
00476   {
00477     if (MapLine(strLine, fHTMLFormat))
00478     {
00479       fileOut.WriteLine(strLine);
00480     }
00481   }
00482
00483   // close input file.
00484   fileIn.Close();
00485
00486   if( pszIncludeFilename != NULL )
00487   {
00488     CString strIncludeFilePath = FindIncludeFile( pszIncludeFilename, pszIncludePath );
00489     if( strIncludeFilePath.IsEmpty() )
00490     {
00491       _ftprintf(stderr, _T("Error: Additional include file %s not found\n\n"), pszIncludeFilename );
00492       fileOut.Close();
00493       exit(1);
00494     }
00495
00496     fileIn.SafeOpen(strIncludeFilePath, CLineFile::modeRead);
00497
00498     while (fileIn.ReadLine(strLine))
00499     {
00500       fileOut.WriteLine(strLine);
00501     }
00502   }
00503
00504   // close output file.
00505   fileOut.Close();
00506
00507   return 0;
00508 }
00509
00510 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palppg.cpp Source File

  • controls
  • pal

palppg.cpp

Go to the documentation of this file.
00001 // palppg.cpp : Implementation of the CPalPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "pal.h"
00015 #include "palppg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 IMPLEMENT_DYNCREATE(CPalPropPage, COlePropertyPage)
00024
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // Message map
00028
00029 BEGIN_MESSAGE_MAP(CPalPropPage, COlePropertyPage)
00030   //{{AFX_MSG_MAP(CPalPropPage)
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // Initialize class factory and guid
00037
00038 IMPLEMENT_OLECREATE_EX(CPalPropPage, "PAL.PalPropPage.1",
00039   0x37446b85, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CPalPropPage::CPalPropPageFactory::UpdateRegistry -
00044 // Adds or removes system registry entries for CPalPropPage
00045
00046 BOOL CPalPropPage::CPalPropPageFactory::UpdateRegistry(BOOL bRegister)
00047 {
00048   if (bRegister)
00049     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00050       m_clsid, IDS_PAL_PPG);
00051   else
00052     return AfxOleUnregisterClass(m_clsid, NULL);
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CPalPropPage::CPalPropPage - Constructor
00058
00059 CPalPropPage::CPalPropPage() :
00060   COlePropertyPage(IDD, IDS_PAL_PPG_CAPTION)
00061 {
00062   //{{AFX_DATA_INIT(CPalPropPage)
00063   m_Length = 0;
00064   //}}AFX_DATA_INIT
00065 }
00066
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CPalPropPage::DoDataExchange - Moves data between page and properties
00070
00071 void CPalPropPage::DoDataExchange(CDataExchange* pDX)
00072 {
00073   //{{AFX_DATA_MAP(CPalPropPage)
00074   DDP_Text(pDX, IDC_LENGTHEDIT, m_Length, _T("Length"));
00075   DDX_Text(pDX, IDC_LENGTHEDIT, m_Length);
00076   DDV_MinMaxInt(pDX, m_Length, 1, 255);
00077   //}}AFX_DATA_MAP
00078   DDP_PostProcessing(pDX);
00079 }
00080
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CPalPropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/options.cpp Source File

  • ole
  • wordpad

options.cpp

Go to the documentation of this file.
00001 // options.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "strings.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CDocOptions
00023
00024 void CDocOptions::SaveDockState(CDockState& ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
00025 {
00026   CMemFile file;
00027   CArchive ar(&file, CArchive::store);
00028   ds.Serialize(ar);
00029   ar.Close();
00030   int nSize = (int)file.GetLength();
00031   ASSERT(nSize < 4096);
00032   BYTE* p = new BYTE[nSize];
00033   file.SeekToBegin();
00034   file.Read(p, nSize);
00035   theApp.WriteProfileBinary(lpszProfileName, lpszLayout, p, nSize);
00036   delete [] p;
00037 }
00038
00039 void CDocOptions::SaveOptions(LPCTSTR lpszProfileName)
00040 {
00041   SaveDockState(m_ds1, lpszProfileName, szLayout1);
00042   SaveDockState(m_ds2, lpszProfileName, szLayout2);
00043   theApp.WriteProfileInt(lpszProfileName, szWrap, m_nWordWrap);
00044 }
00045
00046 void CDocOptions::LoadDockState(CDockState& ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
00047 {
00048   BYTE* p;
00049   UINT nLen = 0;
00050   if (theApp.GetProfileBinary(lpszProfileName, lpszLayout, &p, &nLen))
00051   {
00052     ASSERT(nLen < 4096);
00053     CMemFile file;
00054     file.Write(p, nLen);
00055     file.SeekToBegin();
00056     CArchive ar(&file, CArchive::load);
00057     ds.Serialize(ar);
00058     ar.Close();
00059     delete p;
00060   }
00061 }
00062
00063 void CDocOptions::LoadOptions(LPCTSTR lpszProfileName)
00064 {
00065   LoadDockState(m_ds1, lpszProfileName, szLayout1);
00066   LoadDockState(m_ds2, lpszProfileName, szLayout2);
00067   m_nWordWrap = theApp.GetProfileInt(lpszProfileName, szWrap, m_nDefWrap);
00068 }
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CUnit
00072
00073 const CUnit& CUnit::operator=(const CUnit& unit)
00074 {
00075   m_nTPU = unit.m_nTPU;
00076   m_nSmallDiv = unit.m_nSmallDiv;
00077   m_nMediumDiv = unit.m_nMediumDiv;
00078   m_nLargeDiv = unit.m_nLargeDiv;
00079   m_nMinMove = unit.m_nMinMove;
00080   m_nAbbrevID = unit.m_nAbbrevID;
00081   m_bSpaceAbbrev = unit.m_bSpaceAbbrev;
00082   m_strAbbrev = unit.m_strAbbrev;
00083   return *this;
00084 }
00085
00086 CUnit::CUnit(int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv,
00087     int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev)
00088 {
00089   m_nTPU = nTPU;
00090   m_nSmallDiv = nSmallDiv;
00091   m_nMediumDiv = nMediumDiv;
00092   m_nLargeDiv = nLargeDiv;
00093   m_nMinMove = nMinMove;
00094   m_nAbbrevID = nAbbrevID;
00095   m_bSpaceAbbrev = bSpaceAbbrev;
00096 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/resource.h Source File

  • vc2008fp
  • MenuSubSet

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by MenuSubSet.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDD_MENUSUBSET_FORM             101
00008 #define IDS_WINDOWS_MANAGER             107
00009 #define IDR_MAINFRAME                   128
00010 #define IDR_MENUSUTYPE                  129
00011 #define IDR_CONTEXT_MENU                130
00012 #define IDR_POPUP_TOOLBAR               131
00013 #define IDB_TOOLBAR256                  151
00014 #define IDD_SELECT_CONF                 154
00015 #define IDC_COMPANY_URL                 1041
00016 #define IDC_CONF1                       1042
00017 #define IDC_CONF2                       1043
00018 #define IDC_CONF3                       1044
00019 #define ID_VIEW_CUSTOMIZE               32770
00020 #define ID_VIEW_TOOLBARS                32771
00021 #define ID_WINDOW_MANAGER               32823
00022 #define ID_VIEW_APPLOOK_2000            32833
00023 #define ID_VIEW_APPLOOK_XP              32834
00024 #define ID_VIEW_APPLOOK_2003            32835
00025 #define ID_VIEW_APPLOOK_WIN_XP          32836
00026 #define ID_VIEW_APPLOOK_VS2005          32837
00027 #define ID_VIEW_APPLOOK_2007            32838
00028 #define ID_DEMO_DEMO1                   32844
00029 #define ID_DEMO_DEMO2                   32845
00030
00031 // Next default values for new objects
00032 //
00033 #ifdef APSTUDIO_INVOKED
00034 #ifndef APSTUDIO_READONLY_SYMBOLS
00035 #define _APS_3D_CONTROLS                     1
00036 #define _APS_NEXT_RESOURCE_VALUE        155
00037 #define _APS_NEXT_COMMAND_VALUE         32846
00038 #define _APS_NEXT_CONTROL_VALUE         1043
00039 #define _APS_NEXT_SYMED_VALUE           108
00040 #endif
00041 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/dialogs.cpp Source File

  • ole
  • autoclik

dialogs.cpp

Go to the documentation of this file.
00001 // Dialogs.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014 #include "Dialogs.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CChangeText dialog
00023
00024
00025 CChangeText::CChangeText(CWnd* pParent /*=NULL*/)
00026   : CDialog(CChangeText::IDD, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CChangeText)
00029   m_str = _T("");
00030   //}}AFX_DATA_INIT
00031 }
00032
00033
00034 void CChangeText::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CChangeText)
00038   DDX_Text(pDX, IDC_EDIT1, m_str);
00039   //}}AFX_DATA_MAP
00040 }
00041
00042
00043 BEGIN_MESSAGE_MAP(CChangeText, CDialog)
00044   //{{AFX_MSG_MAP(CChangeText)
00045     // NOTE: the ClassWizard will add message map macros here
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CChangeText message handlers
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHelloFrame Member List

This is the complete list of members for CHelloFrame, including all inherited members.
CHelloFrame() | CHelloFrame |
PreCreateWindow(CREATESTRUCT &cs) | CHelloFrame | [virtual]
~CHelloFrame() | CHelloFrame | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ACDual::IDualAutoClickPoint Member List

This is the complete list of members for ACDual::IDualAutoClickPoint, including all inherited members.
x([in] short newX) | ACDual::IDualAutoClickPoint
x([out, retval] short *retval) | ACDual::IDualAutoClickPoint
y([in] short newY) | ACDual::IDualAutoClickPoint
y([out, retval] short *retval) | ACDual::IDualAutoClickPoint
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/srvritem.h Source File

  • vc2008fp
  • WordPad

srvritem.h

Go to the documentation of this file.
00001 //
00002 // srvritem.h : interface of the CWordPadSrvrItem class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 class CWordPadDoc;
00015 class CWordPadView;
00016
00017 class CEmbeddedItem : public COleServerItem
00018 {
00019   DECLARE_DYNAMIC(CEmbeddedItem)
00020
00021 // Constructors
00022 public:
00023   CEmbeddedItem(CWordPadDoc* pContainerDoc, int nBeg = 0, int nEnd = -1);
00024
00025 // Attributes
00026   int m_nBeg;
00027   int m_nEnd;
00028   LPDATAOBJECT m_lpRichDataObj;
00029   CWordPadDoc* GetDocument() const
00030     { return (CWordPadDoc*) COleServerItem::GetDocument(); }
00031   CWordPadView* GetView() const;
00032
00033 // Implementation
00034 public:
00035   BOOL OnDrawEx(CDC* pDC, CSize& rSize, BOOL bOutput);
00036   virtual BOOL OnDraw(CDC* pDC, CSize& rSize);
00037   virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize);
00038
00039 protected:
00040   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00041 };
00042
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/stdafx.h Source File

  • controls
  • xlist

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCView.Cpp Source File

  • ole
  • TstCon

TCView.Cpp

Go to the documentation of this file.
00001 // CTestContainer98View.cpp : implementation of the CTestContainer98View class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 #pragma warning ( disable : 4244 )
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CTestContainer98View
00024
00025 IMPLEMENT_DYNCREATE( CTestContainer98View, CView )
00026
00027 BEGIN_MESSAGE_MAP( CTestContainer98View, CView )
00028    //{{AFX_MSG_MAP(CTestContainer98View)
00029    ON_WM_DESTROY()
00030    ON_WM_SETFOCUS()
00031    ON_WM_SIZE()
00032    ON_COMMAND(ID_OLE_INSERT_NEW, OnInsertObject)
00033    ON_COMMAND(ID_CANCEL_EDIT_CNTR, OnCancelEditCntr)
00034    ON_WM_LBUTTONDOWN()
00035    ON_WM_LBUTTONDBLCLK()
00036    ON_WM_SETCURSOR()
00037    ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00038    ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR, OnUpdateEditClear)
00039    ON_WM_RBUTTONDOWN()
00040    ON_COMMAND(ID_OPTIONS_DESIGNMODE, OnOptionsDesignMode)
00041    ON_UPDATE_COMMAND_UI(ID_OPTIONS_DESIGNMODE, OnUpdateOptionsDesignMode)
00042    ON_WM_CREATE()
00043    ON_WM_LBUTTONUP()
00044    ON_WM_MOUSEMOVE()
00045    ON_WM_RBUTTONDBLCLK()
00046    ON_WM_RBUTTONUP()
00047    ON_WM_CAPTURECHANGED()
00048    ON_WM_KILLFOCUS()
00049    ON_WM_KEYDOWN()
00050    ON_WM_KEYUP()
00051    ON_WM_CHAR()
00052    ON_WM_CANCELMODE()
00053    ON_COMMAND(ID_CONTROL_SAVETOSTREAM, OnControlSaveToStream)
00054    ON_COMMAND(ID_EDIT_INSERTFROMSTREAM, OnEditInsertFromStream)
00055   ON_COMMAND(ID_CONTROL_SAVETOPROPERTYBAG, OnControlSaveToPropertyBag)
00056   ON_UPDATE_COMMAND_UI(ID_CONTROL_SAVETOPROPERTYBAG, OnUpdateControlSaveToPropertyBag)
00057   ON_UPDATE_COMMAND_UI(ID_CONTROL_SAVETOSTREAM, OnUpdateControlSaveToStream)
00058   ON_COMMAND(ID_CONTROL_INVOKEMETHODS, OnControlInvokeMethods)
00059   ON_UPDATE_COMMAND_UI(ID_CONTROL_INVOKEMETHODS, OnUpdateControlInvokeMethods)
00060   ON_COMMAND(ID_CONTROL_LOGGING, OnControlLogging)
00061   ON_UPDATE_COMMAND_UI(ID_CONTROL_LOGGING, OnUpdateControlLogging)
00062   ON_COMMAND(ID_CONTROL_ACTIVATE, OnControlActivate)
00063   ON_COMMAND(ID_CONTROL_DEACTIVATE, OnControlDeactivate)
00064   ON_COMMAND(ID_CONTROL_UIACTIVATE, OnControlUIActivate)
00065   ON_COMMAND(ID_CONTROL_UIDEACTIVATE, OnControlUIDeactivate)
00066   ON_UPDATE_COMMAND_UI(ID_CONTROL_UIDEACTIVATE, OnUpdateControlUIDeactivate)
00067   ON_UPDATE_COMMAND_UI(ID_CONTROL_UIACTIVATE, OnUpdateControlUIActivate)
00068   ON_UPDATE_COMMAND_UI(ID_CONTROL_ACTIVATE, OnUpdateControlActivate)
00069   ON_UPDATE_COMMAND_UI(ID_CONTROL_DEACTIVATE, OnUpdateControlDeactivate)
00070   ON_COMMAND(ID_EDIT_BRINGTOFRONT, OnEditBringToFront)
00071   ON_UPDATE_COMMAND_UI(ID_EDIT_BRINGTOFRONT, OnUpdateEditBringToFront)
00072   ON_COMMAND(ID_EDIT_SENDTOBACK, OnEditSendToBack)
00073   ON_UPDATE_COMMAND_UI(ID_EDIT_SENDTOBACK, OnUpdateEditSendToBack)
00074   ON_WM_CONTEXTMENU()
00075   ON_COMMAND(ID_EDIT_PROPERTIES, OnEditProperties)
00076   ON_UPDATE_COMMAND_UI(ID_EDIT_PROPERTIES, OnUpdateEditProperties)
00077   ON_COMMAND(ID_EDIT_SELECTALL, OnEditSelectAll)
00078   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00079   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00080   ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy)
00081   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste)
00082   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00083   ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditCut)
00084   ON_COMMAND(ID_CONTROL_SAVETOSTORAGE, OnControlSaveToStorage)
00085   ON_UPDATE_COMMAND_UI(ID_CONTROL_SAVETOSTORAGE, OnUpdateControlSaveToStorage)
00086   ON_COMMAND(ID_EDIT_INSERTCONTROLFROMSTORAGE, OnEditInsertControlFromStorage)
00087   ON_UPDATE_COMMAND_UI(ID_EDIT_SELECTALL, OnUpdateEditSelectAll)
00088   ON_COMMAND(ID_CONTROL_DRAWMETAFILE, OnControlDrawMetaFile)
00089   ON_UPDATE_COMMAND_UI(ID_CONTROL_DRAWMETAFILE, OnUpdateControlDrawMetaFile)
00090   //}}AFX_MSG_MAP
00091 END_MESSAGE_MAP()
00092
00093 CLIPFORMAT CTestContainer98View::s_cfObjectDescriptor = NULL;
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CTestContainer98View construction/destruction
00097
00098 CTestContainer98View::CTestContainer98View() :
00099    m_pSelection( NULL ),
00100 //   m_tDoingDrag( FALSE ),
00101    m_pItemWithCapture( NULL ),
00102    m_pItemWithFocus( NULL ),
00103    m_pItemToDeactivateOnLeave( NULL ),
00104    m_pInactiveDropTarget( NULL ),
00105    m_pWindowlessDropTarget( NULL ),
00106    m_dwLastDropKeyState( 0 )
00107 {
00108    if( s_cfObjectDescriptor == NULL )
00109    {
00110     s_cfObjectDescriptor = CLIPFORMAT( ::RegisterClipboardFormat( _T(
00111      "Object Descriptor" ) ) );
00112    }
00113 }
00114
00115 CTestContainer98View::~CTestContainer98View()
00116 {
00117 }
00118
00119 BOOL CTestContainer98View::PreCreateWindow( CREATESTRUCT& cs )
00120 {
00121   WNDCLASS wc;
00122
00123   if( !CView::PreCreateWindow( cs ) )
00124   {
00125     return( FALSE );
00126   }
00127
00128   GetClassInfo( AfxGetInstanceHandle(), cs.lpszClass, &wc );
00129   cs.lpszClass = AfxRegisterWndClass( 0, wc.hCursor, wc.hbrBackground,
00130     wc.hIcon );
00131
00132   cs.style |= WS_CLIPCHILDREN;
00133
00134   return( TRUE );
00135 }
00136
00137 void CTestContainer98View::ClearSelection()
00138 {
00139    m_pSelection = NULL;
00140    m_lpSelectedItems.RemoveAll();
00141 }
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CTestContainer98View drawing
00145
00146 void CTestContainer98View::OnDraw( CDC* pDC )
00147 {
00148    POSITION posItem;
00149    CTestContainer98Doc* pDoc;
00150    CTestContainer98Item* pItem;
00151
00152    pDoc = GetDocument();
00153    ASSERT_VALID( pDoc );
00154
00155    if( pDoc->UseTwoPassDrawing() )
00156    {
00157     // Draw the opaque parts of the controls from front to back.
00158     TCTrace( TRACELEVEL_VERBOSE, "Starting drawing pass 1.\n" );
00159     posItem = pDoc->GetStartPosition();
00160     while( posItem != NULL )
00161     {
00162      pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
00163
00164      // Push the state of the DC onto the stack.  This is to save the
00165      // current clip region for when we do the second pass.
00166      pDC->SaveDC();
00167
00168      // The item will exclude any opaque areas from the clip region of the
00169      // DC.
00170      pItem->DrawFrontToBack( pDC, pItem->m_rect );
00171
00172      if( pDoc->UseSlowDrawing() )
00173      {
00174       Sleep( 1000 );
00175      }
00176     }
00177
00178     // Draw the rest of each control from back to front, clipping out opaque
00179     // regions of any controls in front.
00180     TCTrace( TRACELEVEL_VERBOSE, "Starting drawing pass 2.\n" );
00181     posItem = pDoc->GetTailPosition();
00182     while( posItem != NULL )
00183     {
00184      pItem = (CTestContainer98Item*)pDoc->GetPrevItem( posItem );
00185
00186      // Draw the tracker for the item.
00187      CRectTracker tracker;
00188      SetupTracker( pItem, &tracker );
00189      tracker.Draw( pDC );
00190
00191      // Pop the state of the DC off the stack.  This makes sure the
00192      // clipping region excludes only the opaque regions of all the
00193      // controls in front of this one.
00194      pDC->RestoreDC( -1 );
00195
00196      pItem->DrawBackToFront( pDC, pItem->m_rect );
00197
00198      if( pDoc->UseSlowDrawing() )
00199      {
00200       Sleep( 1000 );
00201      }
00202     }
00203    }
00204    else
00205    {
00206     // Draw the OLE items from the list.
00207     posItem = pDoc->GetTailPosition();
00208     while( posItem != NULL )
00209     {
00210      pItem = (CTestContainer98Item*)pDoc->GetPrevItem( posItem );
00211
00212      // Draw the tracker for the item.
00213      CRectTracker tracker;
00214      SetupTracker( pItem, &tracker );
00215      tracker.Draw( pDC );
00216
00217      // Draw the item.
00218      pItem->Draw( pDC, pItem->m_rect );
00219
00220      if( pDoc->UseSlowDrawing() )
00221      {
00222       Sleep( 1000 );
00223      }
00224     }
00225    }
00226 }
00227
00228 void CTestContainer98View::OnInitialUpdate()
00229 {
00230    CView::OnInitialUpdate();
00231
00232    m_pSelection = NULL;
00233    m_lpSelectedItems.RemoveAll();
00234
00235    CTestContainer98App * pApp = (CTestContainer98App * )AfxGetApp();
00236    ENSURE(pApp);
00237
00238    if(pApp->m_options.m_strDSMFile != _T(""))
00239    {
00240      CTestContainer98Doc * pDoc = GetDocument();
00241      ENSURE(pDoc);
00242      pDoc->RunAutomationScript(pApp->m_options.m_strDSMFile);
00243    }
00244 }
00245
00246 /////////////////////////////////////////////////////////////////////////////
00247 // CTestContainer98View printing
00248
00249 void CTestContainer98View::OnDestroy()
00250 {
00251    // Deactivate the item on destruction; this is important
00252    // when a splitter view is being used.
00253    CView::OnDestroy();
00254
00255    COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
00256    if( (pActiveItem != NULL) && (pActiveItem->GetActiveView() == this) )
00257    {
00258     pActiveItem->Deactivate();
00259     ASSERT( GetDocument()->GetInPlaceActiveItem( this ) == NULL );
00260    }
00261 }
00262
00263
00264 /////////////////////////////////////////////////////////////////////////////
00265 // OLE Client support and commands
00266
00267 BOOL CTestContainer98View::IsSelected( const CObject* pDocItem ) const
00268 {
00269    // The implementation below is adequate if your selection consists of
00270    //  only CTestContainer98Item objects.  To handle different selection
00271    //  mechanisms, the implementation here should be replaced.
00272
00273    // TODO: implement this function that tests for a selected OLE client item
00274
00275    return( pDocItem == m_pSelection );
00276 }
00277
00278 void CTestContainer98View::OnInsertObject()
00279 {
00280    CTestContainer98Item* pItem;
00281    CTestContainer98Doc* pDoc;
00282    CInsertControlDlg dlg;
00283    int nResult;
00284
00285    nResult = (int)dlg.DoModal();
00286    if( nResult != IDOK )
00287    {
00288     return;
00289    }
00290
00291    BeginWaitCursor();
00292
00293    pItem = NULL;
00294    try
00295    {
00296     // Create new item connected to this document.
00297     pDoc = GetDocument();
00298
00299     pItem = pDoc->AddControl( dlg.m_clsid, NULL );
00300     ASSERT_VALID( pItem );
00301
00302     // As an arbitrary user interface design, this sets the selection to the
00303     // last item inserted.
00304
00305     SetSelection( pItem );
00306
00307     pItem->InvalidateItem();
00308    }
00309    catch( COleException* pException )
00310    {
00311     CString strErrorMessage;
00312     _com_error error( pException->m_sc );
00313
00314     pException->Delete();
00315
00316     if( pItem != NULL )
00317     {
00318      ASSERT_VALID( pItem );
00319      pItem->Delete();
00320     }
00321
00322     AfxFormatString1( strErrorMessage, IDS_CREATEFAILED,
00323      error.ErrorMessage() );
00324
00325     AfxMessageBox( strErrorMessage );
00326    }
00327    catch( CException* pException )
00328    {
00329     pException->Delete();
00330
00331     if( pItem != NULL )
00332     {
00333      ASSERT_VALID( pItem );
00334      pItem->Delete();
00335     }
00336
00337     AfxMessageBox( IDP_FAILED_TO_CREATE );
00338    }
00339
00340    EndWaitCursor();
00341 }
00342
00343 // The following command handler provides the standard keyboard
00344 //  user interface to cancel an in-place editing session.  Here,
00345 //  the container (not the server) causes the deactivation.
00346 void CTestContainer98View::OnCancelEditCntr()
00347 {
00348    // Close any in-place active item on this view.
00349    COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
00350    if( pActiveItem != NULL )
00351    {
00352     pActiveItem->Close();
00353    }
00354    ASSERT( GetDocument()->GetInPlaceActiveItem( this ) == NULL );
00355 }
00356
00357 // Special handling of OnSetFocus and OnSize are required for a container
00358 //  when an object is being edited in-place.
00359 void CTestContainer98View::OnSetFocus( CWnd* pOldWnd )
00360 {
00361    COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
00362    if( (pActiveItem != NULL) && (pActiveItem->GetItemState() ==
00363     COleClientItem::activeUIState) )
00364    {
00365     // need to set focus to this item if it is in the same view
00366     CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00367     if( pWnd != NULL )
00368     {
00369      pWnd->SetFocus();   // don't call the base class
00370      return;
00371     }
00372    }
00373
00374    CView::OnSetFocus( pOldWnd );
00375 }
00376
00377 void CTestContainer98View::OnSize( UINT nType, int cx, int cy )
00378 {
00379    COleClientItem* pActiveItem;
00380
00381    CView::OnSize( nType, cx, cy );
00382
00383    pActiveItem = GetDocument()->GetInPlaceActiveItem( this );
00384    if( pActiveItem != NULL )
00385    {
00386     pActiveItem->SetItemRects();
00387    }
00388 }
00389
00390 /////////////////////////////////////////////////////////////////////////////
00391 // CTestContainer98View diagnostics
00392
00393 #ifdef _DEBUG
00394 void CTestContainer98View::AssertValid() const
00395 {
00396    CView::AssertValid();
00397 }
00398
00399 void CTestContainer98View::Dump( CDumpContext& dc ) const
00400 {
00401    CView::Dump( dc );
00402 }
00403
00404 // non-debug version is inline.
00405 CTestContainer98Doc* CTestContainer98View::GetDocument()
00406 {
00407    ASSERT( m_pDocument->IsKindOf( RUNTIME_CLASS( CTestContainer98Doc ) ) );
00408    return( (CTestContainer98Doc*)m_pDocument );
00409 }
00410 #endif //_DEBUG
00411
00412 /////////////////////////////////////////////////////////////////////////////
00413 // CTestContainer98View message handlers
00414
00415 // Method: HitTestItems
00416 // Description: Determines the topmost item that contains the given point.
00417 // Parameters:
00418 //    point - (IN) The point to hit test.
00419 //    pdwHitType - (OUT) Which part of the item was hit.  Possible values are:
00420 //       HITTYPE_NONE - No item was hit.
00421 //       HITTYPE_OBJECT - The item itself was hit.
00422 //       HITTYPE_BORDER - The grab border of the item was hit.
00423 // Return Value: Topmost item containing the point, or NULL if the point is not
00424 //    inside any of the items.
00425 CTestContainer98Item* CTestContainer98View::HitTestItems( CPoint point,
00426    DWORD* pdwHitType )
00427 {
00428    CTestContainer98Doc* pDoc;
00429    CTestContainer98Item* pItem;
00430    POSITION posItem;
00431    CRect rectBorder;
00432    DWORD dwHitResult;
00433
00434    pDoc = GetDocument();
00435
00436    *pdwHitType = HITTYPE_NONE;  // Assume that we don't hit anything.
00437
00438    // Traverse the list of controls from front to back.
00439    posItem = pDoc->GetStartPosition();
00440    while( posItem != NULL )
00441    {
00442     pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
00443     dwHitResult = pItem->HitTest( point );
00444     if( dwHitResult == HITRESULT_HIT )
00445     {
00446      // We hit the control itself.
00447      *pdwHitType = HITTYPE_OBJECT;
00448      return( pItem );
00449     }
00450     else
00451     {
00452      // We missed the control, so check the grab border that we added to
00453      // it.
00454      rectBorder = pItem->m_rect;
00455      rectBorder.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
00456      if( rectBorder.PtInRect( point ) && !pItem->m_rect.PtInRect( point ) )
00457      {
00458       // The point is outside the item's bounding rectangle, but inside
00459       // the border rect.
00460       *pdwHitType = HITTYPE_BORDER;
00461       return( pItem );
00462      }
00463     }
00464    }
00465
00466    return( NULL );
00467 }
00468
00469 void CTestContainer98View::SetMultiSelect( CTestContainer98Item* pItem,
00470    BOOL tSelect )
00471 {
00472    POSITION posItem;
00473
00474    ENSURE( pItem != NULL );
00475
00476    posItem = m_lpSelectedItems.Find( pItem );
00477    if( tSelect )
00478    {
00479     if( posItem != NULL )
00480     {
00481      // Already selected
00482      return;
00483     }
00484     else
00485     {
00486      m_lpSelectedItems.AddHead( pItem );
00487      if( m_lpSelectedItems.GetCount() == 1 )
00488      {
00489       ASSERT( m_pSelection == NULL );
00490       m_pSelection = pItem;
00491       ENSURE( m_pSelection != NULL );
00492       m_pSelection->OnSelect();
00493      }
00494      else
00495      {
00496       if( m_pSelection != NULL )
00497       {
00498          OnUpdate( NULL, HINT_UPDATE_ITEM, m_pSelection );
00499          m_pSelection->OnDeselect();
00500          m_pSelection = NULL;
00501       }
00502      }
00503      OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
00504     }
00505    }
00506    else
00507    {
00508     if( posItem == NULL )
00509     {
00510      // Already not selected
00511      return;
00512     }
00513     else
00514     {
00515      if( m_pSelection == pItem )
00516      {
00517       ASSERT( m_lpSelectedItems.GetCount() == 1 );
00518       m_pSelection->OnDeselect();
00519       m_pSelection = NULL;
00520      }
00521      m_lpSelectedItems.RemoveAt( posItem );
00522      if( m_lpSelectedItems.GetCount() == 1 )
00523      {
00524       ASSERT( m_pSelection == NULL );
00525       m_pSelection = m_lpSelectedItems.GetHead();
00526       m_pSelection->OnSelect();
00527       OnUpdate( NULL, HINT_UPDATE_ITEM, m_pSelection );
00528      }
00529      OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
00530     }
00531    }
00532 }
00533
00534 void CTestContainer98View::ToggleMultiSelect( CTestContainer98Item* pItem )
00535 {
00536    POSITION posItem;
00537
00538    ENSURE( pItem != NULL );
00539
00540    posItem = m_lpSelectedItems.Find( pItem );
00541    if( posItem == NULL )
00542    {
00543     m_lpSelectedItems.AddHead( pItem );
00544     if( m_lpSelectedItems.GetCount() == 1 )
00545     {
00546      ASSERT( m_pSelection == NULL );
00547      m_pSelection = pItem;
00548      m_pSelection->OnSelect();
00549     }
00550     else
00551     {
00552      if( m_pSelection != NULL )
00553      {
00554       m_pSelection->OnDeselect();
00555       m_pSelection = NULL;
00556      }
00557     }
00558    }
00559    else
00560    {
00561     if( m_pSelection == pItem )
00562     {
00563      ASSERT( m_lpSelectedItems.GetCount() == 1 );
00564      m_pSelection->OnDeselect();
00565      m_pSelection = NULL;
00566     }
00567     m_lpSelectedItems.RemoveAt( posItem );
00568     if( m_lpSelectedItems.GetCount() == 1 )
00569     {
00570      ASSERT( m_pSelection == NULL );
00571      m_pSelection = m_lpSelectedItems.GetHead();
00572      m_pSelection->OnSelect();
00573     }
00574    }
00575    OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
00576 }
00577
00578 void CTestContainer98View::SetSelection( CTestContainer98Item* pItem )
00579 {
00580    CTestContainer98Item* pSelectedItem;
00581
00582    if( (pItem != NULL ) && (m_pSelection == pItem) )
00583    {
00584     // No change in selection
00585     return;
00586    }
00587
00588    if( m_pSelection != NULL )
00589    {
00590     m_pSelection->OnDeselect();
00591     m_pSelection = NULL;
00592    }
00593
00594    while( !m_lpSelectedItems.IsEmpty() )
00595    {
00596     pSelectedItem = m_lpSelectedItems.RemoveHead();
00597     if( pSelectedItem != pItem )
00598     {
00599      OnUpdate( NULL, HINT_UPDATE_ITEM, pSelectedItem );
00600     }
00601    }
00602
00603    if( pItem != NULL )
00604    {
00605     m_lpSelectedItems.AddHead( pItem );
00606     m_pSelection = pItem;
00607     m_pSelection->OnSelect();
00608     OnUpdate( NULL, HINT_UPDATE_ITEM, pItem );
00609    }
00610 }
00611
00612 BOOL CTestContainer98View::HandleWindowlessKeyboardMessage()
00613 {
00614    if( m_pItemWithFocus != NULL )
00615    {
00616     if( m_pItemWithFocus->IsWindowless() )
00617     {
00618      m_pItemWithFocus->OnWindowMessage( GetCurrentMessage() );
00619      return( TRUE );
00620     }
00621    }
00622
00623    return( FALSE );
00624 }
00625
00626 BOOL CTestContainer98View::HandlePointerInactiveMove( CPoint point,
00627    DWORD dwKeyState )
00628 {
00629    CTestContainer98Item* pItemHit;
00630    CRect rect;
00631    BOOL tHandled;
00632    DWORD dwPolicy;
00633    MSG msg;
00634    DWORD dwHitType;
00635
00636    if( !GetDocument()->UseIPointerInactive() )
00637    {
00638     return( FALSE );
00639    }
00640
00641    tHandled = FALSE;
00642
00643    pItemHit = HitTestItems( point, &dwHitType );
00644    if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->SupportsIPointerInactive() )
00645    {
00646     pItemHit = NULL;
00647    }
00648
00649    if( m_pItemToDeactivateOnLeave != NULL )
00650    {
00651     // We have an active object that wants to be deactivated as soon as the
00652     // mouse leaves its extents.
00653     if( m_pItemToDeactivateOnLeave != pItemHit )
00654     {
00655      TCTrace( TRACELEVEL_NORMAL,
00656       "Deactivating item because of POINTERINACTIVE_DEACTIVATEONLEAVE.\n" );
00657      m_pItemToDeactivateOnLeave->Deactivate();
00658      m_pItemToDeactivateOnLeave = NULL;
00659     }
00660    }
00661
00662    if( pItemHit != NULL )
00663    {
00664     if( !pItemHit->IsInPlaceActive() )
00665     {
00666      // The mouse was over an inactive control that wants to receive mouse
00667      // pointer messages, so send the message to that control first.
00668      dwPolicy = pItemHit->OnPointerInactiveMove( point, dwKeyState );
00669      if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
00670      {
00671       msg = *GetCurrentMessage();
00672       TCTrace( TRACELEVEL_NORMAL,
00673          "Activating item because of POINTERINACTIVE_ACTIVATEONENTRY.\n" );
00674       pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
00675       if( dwPolicy&POINTERINACTIVE_DEACTIVATEONLEAVE )
00676       {
00677          // The control wants to be deactivated as soon as the mouse
00678          // leaves its extents.
00679          m_pItemToDeactivateOnLeave = pItemHit;
00680       }
00681      }
00682      tHandled = TRUE;
00683     }
00684    }
00685    else
00686    {
00687     tHandled = FALSE;
00688    }
00689
00690    return( tHandled );
00691 }
00692
00693 BOOL CTestContainer98View::HandlePointerInactiveSetCursor(
00694    DWORD dwMouseMessage )
00695 {
00696    CTestContainer98Item* pItemHit;
00697    CRect rect;
00698    BOOL tHandled;
00699    DWORD dwPolicy;
00700    MSG msg;
00701    CPoint point;
00702    DWORD dwHitType;
00703
00704    if( !GetDocument()->UseIPointerInactive() )
00705    {
00706     return( FALSE );
00707    }
00708
00709    point = m_ptLastMousePosition;
00710    pItemHit = HitTestItems( point, &dwHitType );
00711    if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->SupportsIPointerInactive() )
00712    {
00713     pItemHit = NULL;
00714    }
00715
00716    if( m_pItemToDeactivateOnLeave != NULL )
00717    {
00718     // If the pointer is still over the same control, then we really haven't
00719     // left it.
00720     if( m_pItemToDeactivateOnLeave != pItemHit )
00721     {
00722      TCTrace( TRACELEVEL_NORMAL,
00723       "Deactivating item because of POINTERINACTIVE_DEACTIVATEONLEAVE.\n" );
00724      m_pItemToDeactivateOnLeave->Deactivate();
00725      m_pItemToDeactivateOnLeave = NULL;
00726     }
00727    }
00728
00729    tHandled = FALSE;
00730    if( pItemHit != NULL )
00731    {
00732     if( !pItemHit->IsInPlaceActive() )
00733     {
00734      // The mouse was over an inactive control that wants to receive mouse
00735      // pointer messages, so send the message to that control first.
00736      dwPolicy = pItemHit->OnPointerInactiveSetCursor( point,
00737       dwMouseMessage, &tHandled );
00738      if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
00739      {
00740       msg = *GetCurrentMessage();
00741       TCTrace( TRACELEVEL_NORMAL,
00742          "Activating item because of POINTERINACTIVE_ACTIVATEONENTRY.\n" );
00743       pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
00744       if( dwPolicy&POINTERINACTIVE_DEACTIVATEONLEAVE )
00745       {
00746          m_pItemToDeactivateOnLeave = pItemHit;
00747       }
00748       tHandled = TRUE;
00749      }
00750     }
00751    }
00752
00753    return( tHandled );
00754 }
00755
00756 BOOL CTestContainer98View::HandlePointerInactiveDragOver( CPoint point )
00757 {
00758    CTestContainer98Item* pItemHit;
00759    DWORD dwHitType;
00760    DWORD dwPolicy;
00761    BOOL tHandled;
00762
00763    if( !GetDocument()->UseIPointerInactive() )
00764    {
00765     return( FALSE );
00766    }
00767
00768    pItemHit = HitTestItems( point, &dwHitType );
00769    if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->SupportsIPointerInactive() )
00770    {
00771     pItemHit = NULL;
00772    }
00773
00774    tHandled = FALSE;
00775    if( pItemHit != NULL )
00776    {
00777     if( !pItemHit->IsInPlaceActive() )
00778     {
00779      dwPolicy = pItemHit->GetActivationPolicy();
00780      if( dwPolicy&POINTERINACTIVE_ACTIVATEONDRAG )
00781      {
00782       TCTrace( TRACELEVEL_NORMAL,
00783          "Activating item because of POINTERINACTIVE_ACTIVATEONDRAG.\n" );
00784       pItemHit->Activate( OLEIVERB_SHOW, this );
00785      }
00786     }
00787    }
00788
00789    return( tHandled );
00790 }
00791
00792 BOOL CTestContainer98View::HandleWindowlessDragEnter(
00793    COleDataObject* pDataObject, DWORD dwKeyState, CPoint point,
00794    DWORD* pdwDropEffect )
00795 {
00796    CTestContainer98Item* pItemHit;
00797    DWORD dwHitType;
00798    BOOL tHandled;
00799
00800    ASSERT( m_pWindowlessDropTarget == NULL );
00801
00802    pItemHit = HitTestItems( point, &dwHitType );
00803    if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->IsWindowless() )
00804    {
00805     pItemHit = NULL;
00806    }
00807
00808    tHandled = FALSE;
00809    if( pItemHit != NULL )
00810    {
00811     tHandled = pItemHit->OnWindowlessDragEnter( pDataObject, dwKeyState,
00812      point, pdwDropEffect );
00813     if( tHandled )
00814     {
00815      // Remember which item we're over.
00816      m_pWindowlessDropTarget = pItemHit;
00817     }
00818    }
00819
00820    return( tHandled );
00821 }
00822
00823 BOOL CTestContainer98View::HandleWindowlessDragOver(
00824    COleDataObject* pDataObject, DWORD dwKeyState, CPoint point,
00825    DWORD* pdwDropEffect )
00826 {
00827    CTestContainer98Item* pItemHit;
00828    DWORD dwHitType;
00829    BOOL tHandled;
00830
00831    pItemHit = HitTestItems( point, &dwHitType );
00832    if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->IsWindowless() )
00833    {
00834     pItemHit = NULL;
00835    }
00836
00837    tHandled = FALSE;
00838    if( m_pWindowlessDropTarget != NULL )
00839    {
00840     // The cursor was previously over a windowless control.
00841     if( m_pWindowlessDropTarget != pItemHit )
00842     {
00843      // The cursor left that windowless control.
00844      m_pWindowlessDropTarget->OnWindowlessDragLeave();
00845      m_pWindowlessDropTarget = NULL;
00846     }
00847    }
00848
00849    if( pItemHit != NULL )
00850    {
00851     // The cursor is now over a windowless control.
00852     if( pItemHit != m_pWindowlessDropTarget )
00853     {
00854      // The cursor entered a new windowless control.
00855      ASSERT( m_pWindowlessDropTarget == NULL );
00856      tHandled = pItemHit->OnWindowlessDragEnter( pDataObject, dwKeyState,
00857       point, pdwDropEffect );
00858      if( tHandled )
00859      {
00860       m_pWindowlessDropTarget = pItemHit;
00861      }
00862     }
00863     else
00864     {
00865      // The cursor is still over the same windowless control.
00866      pItemHit->OnWindowlessDragOver( dwKeyState, point, pdwDropEffect );
00867      tHandled = TRUE;
00868     }
00869    }
00870
00871    return( tHandled );
00872 }
00873
00874 void CTestContainer98View::HandleWindowlessDragLeave()
00875 {
00876    if( m_pWindowlessDropTarget != NULL )
00877    {
00878     m_pWindowlessDropTarget->OnWindowlessDragLeave();
00879     m_pWindowlessDropTarget = NULL;
00880    }
00881 }
00882
00883 BOOL CTestContainer98View::HandleWindowlessDrop( COleDataObject* pDataObject,
00884    DWORD dwKeyState, CPoint point, DWORD* pdwEffect )
00885 {
00886    if( m_pWindowlessDropTarget != NULL )
00887    {
00888     m_pWindowlessDropTarget->OnWindowlessDrop( pDataObject, dwKeyState,
00889      point, pdwEffect );
00890     m_pWindowlessDropTarget = NULL;
00891     return( TRUE );
00892    }
00893    else
00894    {
00895     return( FALSE );
00896    }
00897 }
00898
00899 BOOL CTestContainer98View::HandleWindowlessMouseMessage( CPoint point )
00900 {
00901    CTestContainer98Item* pItemHit;
00902    DWORD dwHitType;
00903    BOOL tHandled;
00904    CRect rect;
00905
00906    // First, see if a windowless control has mouse capture.
00907    if( m_pItemWithCapture != NULL )
00908    {
00909     m_pItemWithCapture->OnWindowMessage( GetCurrentMessage() );
00910     return( TRUE );
00911    }
00912
00913    // Now, see if we hit a windowless control.
00914    pItemHit = HitTestItems( point, &dwHitType );
00915    if( (dwHitType != HITTYPE_OBJECT) || !pItemHit->IsWindowless() )
00916    {
00917     pItemHit = NULL;
00918    }
00919
00920    if( pItemHit != NULL )
00921    {
00922     // The mouse was over a windowless control, so send the message to that
00923     // control first.
00924     tHandled = pItemHit->OnWindowMessage( GetCurrentMessage() );
00925     if( !tHandled )
00926     {
00927      // The windowless control didn't do anything, but we don't want the
00928      // container to do anything either.
00929      {
00930       Default();
00931      }
00932     }
00933     return( TRUE );
00934    }
00935
00936    return( FALSE );
00937 }
00938
00939 void CTestContainer98View::OnLButtonDown( UINT nFlags, CPoint point )
00940 {
00941    BOOL tHandled;
00942    CTestContainer98Item* pItemHit;
00943    CTestContainer98Item* pItem;
00944    POSITION posItem;
00945    DWORD dwHitType;
00946    int eHitType;
00947    MSG msg;
00948
00949    tHandled = HandleWindowlessMouseMessage( point );
00950    if( tHandled )
00951    {
00952     return;
00953    }
00954
00955    pItemHit = HitTestItems( point, &dwHitType );
00956    if( nFlags&MK_CONTROL )
00957    {
00958     if( pItemHit != NULL )
00959     {
00960      ToggleMultiSelect( pItemHit );
00961     }
00962    }
00963    else
00964    {
00965     if( m_lpSelectedItems.Find( pItemHit ) == NULL )
00966     {
00967      SetSelection( pItemHit );
00968     }
00969    }
00970
00971    if( (pItemHit != NULL) && (dwHitType != HITTYPE_BORDER) )
00972    {
00973     if( !pItemHit->IsInPlaceActive() )
00974     {
00975      msg = *GetCurrentMessage();
00976      pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
00977     }
00978    }
00979
00980    if( !m_lpSelectedItems.IsEmpty() )
00981    {
00982     if( dwHitType == HITTYPE_BORDER )
00983     {
00984      CRectTracker tracker;
00985      CPoint ptStart;
00986      CSize sizeDisplacement;
00987      CRect rectItem;
00988
00989      SetupSelectionTracker( &tracker );
00990      ptStart = tracker.m_rect.TopLeft();
00991      eHitType = tracker.HitTest( point );
00992      if( eHitType == CRectTracker::hitMiddle )
00993      {
00994       // Drag the selection
00995       if( tracker.Track( this, point ) )
00996       {
00997          posItem = m_lpSelectedItems.GetHeadPosition();
00998          while( posItem != NULL )
00999          {
01000           pItem = m_lpSelectedItems.GetNext( posItem );
01001           pItem->InvalidateItem();
01002          }
01003
01004          sizeDisplacement = tracker.m_rect.TopLeft()-ptStart;
01005
01006          posItem = m_lpSelectedItems.GetHeadPosition();
01007          while( posItem != NULL )
01008          {
01009           pItem = m_lpSelectedItems.GetNext( posItem );
01010           rectItem = pItem->m_rect;
01011           rectItem.OffsetRect( sizeDisplacement );
01012           pItem->Move( rectItem );
01013           pItem->InvalidateItem();
01014          }
01015
01016          GetDocument()->SetModifiedFlag();
01017       }
01018      }
01019      else
01020      {
01021       if( (eHitType != CRectTracker::hitNothing) && (m_pSelection !=
01022          NULL) )
01023       {
01024          // Resize the item.
01025          if( tracker.Track( this, point ) )
01026          {
01027           m_pSelection->InvalidateItem();
01028          }
01029
01030          tracker.m_rect.DeflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
01031          m_pSelection->Move( tracker.m_rect );
01032          m_pSelection->InvalidateItem();
01033
01034          GetDocument()->SetModifiedFlag();
01035       }
01036      }
01037     }
01038    }
01039    else
01040    {
01041     CRectTracker tracker;
01042     CRect rectIntersection;
01043     CTestContainer98Doc* pDoc;
01044
01045     if( tracker.TrackRubberBand( this, point, TRUE ) )
01046     {
01047      tracker.m_rect.NormalizeRect();
01048
01049      pDoc = GetDocument();
01050      posItem = pDoc->GetStartPosition();
01051      while( posItem != NULL )
01052      {
01053       pItem = STATIC_DOWNCAST( CTestContainer98Item, pDoc->GetNextItem(
01054          posItem ) );
01055       if( rectIntersection.IntersectRect( tracker.m_rect,
01056          pItem->m_rect ) )
01057       {
01058          SetMultiSelect( pItem, TRUE );
01059       }
01060      }
01061     }
01062    }
01063 }
01064
01065 void CTestContainer98View::SetupSelectionTracker( CRectTracker* pTracker )
01066 {
01067    POSITION posItem;
01068    CTestContainer98Item* pItem;
01069
01070    ASSERT( !m_lpSelectedItems.IsEmpty() );
01071    if( m_pSelection != NULL )
01072    {
01073     // Only one item is selected, so use its tracker.
01074     SetupTracker( m_pSelection, pTracker );
01075    }
01076    else
01077    {
01078     pTracker->m_rect.SetRectEmpty();
01079     posItem = m_lpSelectedItems.GetHeadPosition();
01080     while( posItem != NULL )
01081     {
01082      pItem = m_lpSelectedItems.GetNext( posItem );
01083      pTracker->m_rect.UnionRect( pTracker->m_rect, pItem->m_rect );
01084     }
01085     pTracker->m_rect.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
01086     pTracker->m_nHandleSize = MARGIN_PIXELS+1;
01087     pTracker->m_sizeMin.cx = 8;
01088     pTracker->m_sizeMin.cy = 8;
01089     pTracker->m_nStyle = CRectTracker::solidLine;
01090    }
01091 }
01092
01093 void CTestContainer98View::SetupTracker( CTestContainer98Item* pItem,
01094    CRectTracker* pTracker )
01095 {
01096    pTracker->m_rect = pItem->m_rect;
01097    pTracker->m_rect.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
01098    pTracker->m_nHandleSize = MARGIN_PIXELS+1;
01099    pTracker->m_sizeMin.cx = 8;
01100    pTracker->m_sizeMin.cy = 8;
01101
01102    pTracker->m_nStyle = 0;
01103
01104    if( m_lpSelectedItems.Find( pItem ) != NULL )
01105    {
01106     pTracker->m_nStyle |= CRectTracker::resizeInside;
01107    }
01108
01109    pTracker->m_nStyle |= CRectTracker::solidLine;
01110
01111    if( (pItem->GetItemState() == COleClientItem::openState) ||
01112     (pItem->GetItemState() == COleClientItem::activeUIState) )
01113    {
01114     pTracker->m_nStyle |= CRectTracker::hatchInside;
01115    }
01116 }
01117
01118 void CTestContainer98View::OnLButtonDblClk( UINT nFlags, CPoint point )
01119 {
01120    LONG iVerb;
01121    BOOL tHandled;
01122    CTestContainer98Item* pItemHit;
01123    MSG msg;
01124    DWORD dwHitType;
01125
01126    tHandled = HandleWindowlessMouseMessage( point );
01127    if( tHandled )
01128    {
01129     return;
01130    }
01131
01132    pItemHit = HitTestItems( point, &dwHitType );
01133
01134    SetSelection( pItemHit );
01135
01136    if( pItemHit != NULL )
01137    {
01138     if( !GetDocument()->GetUserMode() && pItemHit->IsInsideOut() &&
01139      !pItemHit->IsUIActive() )
01140     {
01141      // UIActivate the selected object.
01142      msg = *GetCurrentMessage();
01143      pItemHit->DoVerb( OLEIVERB_UIACTIVATE, this, &msg );
01144     }
01145    }
01146
01147    Invalidate();
01148
01149    if( m_pSelection != NULL )
01150    {
01151     if( GetKeyState( VK_CONTROL ) < 0 )
01152     {
01153      iVerb = OLEIVERB_OPEN;
01154     }
01155     else
01156     {
01157      iVerb = OLEIVERB_PRIMARY;
01158     }
01159
01160     m_pSelection->DoVerb( iVerb, this );
01161    }
01162
01163    CView::OnLButtonDblClk( nFlags, point );
01164 }
01165
01166 HRESULT CTestContainer98View::OnWindowlessDefWindowMessage( UINT nMessage,
01167    WPARAM wParam, LPARAM lParam, LRESULT* plResult )
01168 {
01169    const MSG* pMessage;
01170
01171    (void)nMessage;
01172    (void)wParam;
01173    (void)lParam;
01174
01175    pMessage = GetCurrentMessage();
01176    ASSERT( pMessage->message == nMessage );
01177    ASSERT( pMessage->wParam == wParam );
01178    ASSERT( pMessage->lParam == lParam );
01179
01180    *plResult = Default();
01181
01182    return( S_OK );
01183 }
01184
01185 BOOL CTestContainer98View::OnSetCursor( CWnd* pWnd, UINT nHitTest,
01186    UINT message )
01187 {
01188    CPoint pt;
01189    DWORD dwHitType;
01190    CRectTracker tracker;
01191    BOOL tHandled;
01192    CTestContainer98Item* pItemHit;
01193
01194    // First, give the any inactive objects underneath the cursor a chance to
01195    // set the cursor and/or activate.
01196    tHandled = HandlePointerInactiveSetCursor( message );
01197    if( tHandled )
01198    {
01199     return( TRUE );
01200    }
01201
01202    // Now, see if a windowless control should be handling this message.
01203    tHandled = HandleWindowlessMouseMessage( m_ptLastMousePosition );
01204    if( tHandled )
01205    {
01206     return( FALSE );
01207    }
01208
01209    // None of the controls handled the message, so set the cursor ourselves.
01210    // The only interesting thing we do is let the tracker for the current
01211    // selection set the cursor to show resize/move arrows.
01212    if( pWnd == this )
01213    {
01214     GetCursorPos( &pt );
01215     ScreenToClient( &pt );
01216     pItemHit = HitTestItems( pt, &dwHitType );
01217     if( (pItemHit != NULL) && (dwHitType == HITTYPE_BORDER) &&
01218      (m_lpSelectedItems.Find( pItemHit ) != NULL) )
01219     {
01220      SetupTracker( pItemHit, &tracker );
01221      if( tracker.SetCursor( this, nHitTest ) )
01222      {
01223       return( TRUE );
01224      }
01225     }
01226    }
01227
01228    return( CView::OnSetCursor( pWnd, nHitTest, message ) );
01229 }
01230
01231 void CTestContainer98View::OnEditClear()
01232 {
01233    POSITION posItem;
01234    CTestContainer98Item* pItem;
01235
01236    ASSERT( !m_lpSelectedItems.IsEmpty() );
01237
01238    posItem = m_lpSelectedItems.GetHeadPosition();
01239    while( posItem != NULL )
01240    {
01241     pItem = m_lpSelectedItems.GetNext( posItem );
01242     pItem->Delete();
01243    }
01244    ClearSelection();
01245    GetDocument()->UpdateAllViews( NULL );
01246 }
01247
01248 void CTestContainer98View::OnUpdateEditClear( CCmdUI* pCmdUI )
01249 {
01250    pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
01251 }
01252
01253 void CTestContainer98View::OnUpdate( CView* pSender, LPARAM lHint,
01254    CObject* pHint )
01255 {
01256    (void)pSender;
01257
01258    switch( lHint )
01259    {
01260    case HINT_UPDATE_WINDOW:
01261     Invalidate();
01262     break;
01263
01264    case HINT_UPDATE_ITEM:
01265     {
01266      CRectTracker tracker;
01267      CRect rect;
01268
01269      SetupTracker( (CTestContainer98Item*)pHint, &tracker );
01270      tracker.GetTrueRect( &rect );
01271      InvalidateRect( rect );
01272     }
01273     break;
01274    }
01275 }
01276
01277 void CTestContainer98View::OnRButtonDown( UINT nFlags, CPoint point )
01278 {
01279    CTestContainer98Item* pItemHit;
01280    BOOL tHandled;
01281    DWORD dwHitType;
01282    MSG msg;
01283
01284    tHandled = HandleWindowlessMouseMessage( point );
01285    if( tHandled )
01286    {
01287     return;
01288    }
01289
01290    pItemHit = HitTestItems( point, &dwHitType );
01291
01292    if( !(nFlags&MK_CONTROL) )
01293    {
01294     if( (pItemHit != NULL) && (m_lpSelectedItems.Find( pItemHit ) == NULL) )
01295     {
01296      SetSelection( pItemHit );
01297     }
01298    }
01299
01300    if( (pItemHit != NULL) && (dwHitType != HITTYPE_BORDER) )
01301    {
01302     if( !pItemHit->IsInPlaceActive() )
01303     {
01304      msg = *GetCurrentMessage();
01305      pItemHit->Activate( OLEIVERB_SHOW, this, &msg );
01306     }
01307    }
01308 }
01309
01310 BOOL CTestContainer98View::PreTranslateMessage( MSG* pMsg )
01311 {
01312    CTestContainer98Item* pItem;
01313    CTestContainer98Doc* pDoc;
01314    MSG msg;
01315    IOleInPlaceActiveObjectPtr pInPlaceActiveObject;
01316    HRESULT hResult;
01317    POSITION posItem;
01318    CTestContainer98Item* pCurrentItem;
01319
01320    pDoc = GetDocument();
01321
01322    pCurrentItem = NULL;
01323    if( m_pItemWithFocus != NULL )
01324    {
01325     pCurrentItem = m_pItemWithFocus;
01326    }
01327    else
01328    {
01329     // Try the UI active control
01330     posItem = pDoc->GetStartPosition();
01331     while( (posItem != NULL) && (pCurrentItem == NULL) )
01332     {
01333      pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
01334      if( pItem->IsUIActive() )
01335      {
01336       pCurrentItem = pItem;
01337      }
01338     }
01339    }
01340
01341    if( ((pMsg->message >= WM_KEYFIRST) && (pMsg->message <= WM_KEYLAST)) ||
01342     ((pMsg->message >= WM_MOUSEFIRST) && (pMsg->message <= WM_MOUSELAST)) )
01343    {
01344     // Give the item with focus first crack at keyboard and mouse messages
01345     if( pCurrentItem != NULL )
01346     {
01347      pInPlaceActiveObject = pCurrentItem->m_lpObject;
01348      if( pInPlaceActiveObject != NULL )
01349      {
01350       hResult = pInPlaceActiveObject->TranslateAccelerator( pMsg );
01351       if( hResult == S_OK )
01352       {
01353          return( TRUE );
01354       }
01355      }
01356     }
01357    }
01358
01359    if( pMsg->message == WM_KEYDOWN )
01360    {
01361     if( LOWORD( pMsg->wParam ) == VK_TAB )
01362     {
01363      pItem = pDoc->GetNextTabItem( pCurrentItem );
01364      if( pItem != NULL )
01365      {
01366       if( pItem->HasUIActiveState() )
01367       {
01368          if( !pItem->IsUIActive() )
01369          {
01370           msg = *pMsg;
01371           pItem->DoVerb( OLEIVERB_UIACTIVATE, this, &msg );
01372          }
01373       }
01374       if( pItem->ActsLikeButton() )
01375       {
01376          pItem->DisplayAsDefault( TRUE );
01377       }
01378      }
01379
01380      return( TRUE );
01381     }
01382    }
01383    else if( pMsg->message == WM_KEYUP )
01384    {
01385     if( LOWORD( pMsg->wParam ) == VK_TAB )
01386     {
01387      return( TRUE );
01388     }
01389    }
01390
01391    return( CView::PreTranslateMessage( pMsg ) );
01392 }
01393
01394 void CTestContainer98View::OnOptionsDesignMode()
01395 {
01396    CTestContainer98Doc* pDoc;
01397
01398    pDoc = GetDocument();
01399    pDoc->SetUserMode( !pDoc->GetUserMode() );
01400 }
01401
01402 void CTestContainer98View::OnUpdateOptionsDesignMode( CCmdUI* pCmdUI )
01403 {
01404    if( GetDocument()->GetUserMode() )
01405    {
01406     pCmdUI->SetCheck( 0 );
01407    }
01408    else
01409    {
01410     pCmdUI->SetCheck( 1 );
01411    }
01412 }
01413
01414 BOOL CTestContainer98View::OnDrop( COleDataObject* pDataObject,
01415    DROPEFFECT dropEffect, CPoint point )
01416 {
01417    DWORD dwDropEffect;
01418    BOOL tHandled;
01419
01420    TRACE( "OnDrop()\n" );
01421
01422    dwDropEffect = dropEffect;
01423    tHandled = HandleWindowlessDrop( pDataObject, m_dwLastDropKeyState, point,
01424     &dwDropEffect );
01425    if( tHandled )
01426    {
01427     return( CView::OnDrop( pDataObject, dropEffect, point ) );
01428    }
01429
01430    return( CView::OnDrop( pDataObject, dropEffect, point ) );
01431 }
01432
01433 CTestContainer98Item* CTestContainer98View::GetItemWithCapture() const
01434 {
01435    return( m_pItemWithCapture );
01436 }
01437
01438 CTestContainer98Item* CTestContainer98View::GetItemWithFocus() const
01439 {
01440    return( m_pItemWithFocus );
01441 }
01442
01443 HRESULT CTestContainer98View::OnWindowlessReleaseCapture(
01444    CTestContainer98Item* pItem )
01445 {
01446    if( m_pItemWithCapture == pItem )
01447    {
01448     m_pItemWithCapture = NULL;
01449     ReleaseCapture();
01450    }
01451
01452    return( S_OK );
01453 }
01454
01455 HRESULT CTestContainer98View::OnWindowlessReleaseFocus()
01456 {
01457    ASSERT( m_pItemWithFocus != NULL );
01458
01459    m_pItemWithFocus = NULL;
01460
01461    return( S_OK );
01462 }
01463
01464 HRESULT CTestContainer98View::OnWindowlessSetCapture(
01465    CTestContainer98Item* pItem )
01466 {
01467    ASSERT( pItem != NULL );
01468 //   ASSERT( m_pItemWithCapture == NULL );
01469
01470    SetCapture();
01471    m_pItemWithCapture = pItem;
01472
01473    return( S_OK );
01474 }
01475
01476 HRESULT CTestContainer98View::OnWindowlessSetFocus(
01477    CTestContainer98Item* pItem )
01478 {
01479    ASSERT( pItem != NULL );
01480
01481    TCTrace( TRACELEVEL_NORMAL, "Setting focus to windowless control.\n" );
01482
01483    SetFocus();
01484    m_pItemWithFocus = pItem;
01485
01486    return( S_OK );
01487 }
01488
01489 DROPEFFECT CTestContainer98View::OnDragEnter( COleDataObject* pDataObject,
01490    DWORD dwKeyState, CPoint point )
01491 {
01492    BOOL tHandled;
01493    DWORD dwDropEffect;
01494
01495    TRACE( "OnDragEnter()\n" );
01496
01497    HandlePointerInactiveDragOver( point );
01498
01499    dwDropEffect = DROPEFFECT_COPY|DROPEFFECT_MOVE|DROPEFFECT_LINK;
01500    tHandled = HandleWindowlessDragEnter( pDataObject, dwKeyState, point,
01501     &dwDropEffect );
01502    if( tHandled )
01503    {
01504     return( dwDropEffect );
01505    }
01506
01507   return( DROPEFFECT_NONE );
01508 }
01509
01510 DROPEFFECT CTestContainer98View::OnDragOver( COleDataObject* pDataObject,
01511    DWORD dwKeyState, CPoint point )
01512 {
01513    DWORD dwDropEffect;
01514    BOOL tHandled;
01515
01516    m_dwLastDropKeyState = dwKeyState;
01517
01518    HandlePointerInactiveDragOver( point );
01519
01520    dwDropEffect = DROPEFFECT_COPY|DROPEFFECT_MOVE|DROPEFFECT_LINK;
01521    tHandled = HandleWindowlessDragOver( pDataObject, dwKeyState, point,
01522     &dwDropEffect );
01523    if( tHandled )
01524    {
01525     return( dwDropEffect );
01526    }
01527
01528    return( DROPEFFECT_NONE );
01529 }
01530
01531 int CTestContainer98View::OnCreate(LPCREATESTRUCT lpCreateStruct)
01532 {
01533    if( CView::OnCreate( lpCreateStruct ) == -1 )
01534    {
01535     return( -1 );
01536    }
01537
01538    // Register drop target.
01539    m_dropTarget.Register( this );
01540
01541    return( 0 );
01542 }
01543
01544 void CTestContainer98View::OnLButtonUp( UINT nFlags, CPoint point )
01545 {
01546    BOOL tHandled;
01547
01548    tHandled = HandleWindowlessMouseMessage( point );
01549    if( tHandled )
01550    {
01551     return;
01552    }
01553
01554    CView::OnLButtonUp( nFlags, point );
01555 }
01556
01557 void CTestContainer98View::OnMouseMove( UINT nFlags, CPoint point )
01558 {
01559    BOOL tHandled;
01560
01561    m_ptLastMousePosition = point;
01562
01563    tHandled = HandlePointerInactiveMove( point, nFlags );
01564    if( tHandled )
01565    {
01566     return;
01567    }
01568
01569    tHandled = HandleWindowlessMouseMessage( point );
01570    if( tHandled )
01571    {
01572     return;
01573    }
01574
01575    CView::OnMouseMove( nFlags, point );
01576 }
01577
01578 void CTestContainer98View::OnRButtonDblClk( UINT nFlags, CPoint point )
01579 {
01580    BOOL tHandled;
01581
01582    tHandled = HandleWindowlessMouseMessage( point );
01583    if( tHandled )
01584    {
01585     return;
01586    }
01587
01588    CView::OnRButtonDblClk( nFlags, point );
01589 }
01590
01591 void CTestContainer98View::OnRButtonUp( UINT nFlags, CPoint point )
01592 {
01593    BOOL tHandled;
01594
01595    tHandled = HandleWindowlessMouseMessage( point );
01596    if( tHandled )
01597    {
01598     return;
01599    }
01600
01601    CView::OnRButtonUp( nFlags, point );
01602 }
01603
01604 void CTestContainer98View::OnCaptureChanged( CWnd *pWnd )
01605 {
01606    // We're losing the capture, so the windowless item that has the capture
01607    // loses it, too.
01608    m_pItemWithCapture = NULL;
01609
01610   CView::OnCaptureChanged( pWnd );
01611 }
01612
01613 void CTestContainer98View::OnFocus( CTestContainer98Item* pItem,
01614    BOOL tGotFocus )
01615 {
01616    ASSERT( pItem != NULL );
01617
01618    if( tGotFocus )
01619    {
01620     m_pItemWithFocus = pItem;
01621    }
01622    else
01623    {
01624     if( m_pItemWithFocus == pItem )
01625     {
01626      m_pItemWithFocus = NULL;
01627     }
01628    }
01629 }
01630
01631 void CTestContainer98View::OnKillFocus( CWnd* pNewWnd )
01632 {
01633   CView ::OnKillFocus( pNewWnd );
01634 }
01635
01636 void CTestContainer98View::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags )
01637 {
01638    BOOL tHandled;
01639
01640    tHandled = HandleWindowlessKeyboardMessage();
01641    if( tHandled )
01642    {
01643     return;
01644    }
01645
01646    CView::OnKeyDown( nChar, nRepCnt, nFlags );
01647 }
01648
01649 void CTestContainer98View::OnKeyUp( UINT nChar, UINT nRepCnt, UINT nFlags )
01650 {
01651    BOOL tHandled;
01652
01653    tHandled = HandleWindowlessKeyboardMessage();
01654    if( tHandled )
01655    {
01656     return;
01657    }
01658
01659    CView::OnKeyUp( nChar, nRepCnt, nFlags );
01660 }
01661
01662 void CTestContainer98View::OnChar( UINT nChar, UINT nRepCnt, UINT nFlags )
01663 {
01664    BOOL tHandled;
01665
01666    tHandled = HandleWindowlessKeyboardMessage();
01667    if( tHandled )
01668    {
01669     return;
01670    }
01671
01672    CView::OnChar( nChar, nRepCnt, nFlags );
01673 }
01674
01675 void CTestContainer98View::OnCancelMode()
01676 {
01677    BOOL tHandled;
01678
01679    CView::OnCancelMode();
01680
01681    tHandled = HandleWindowlessKeyboardMessage();
01682    if( tHandled )
01683    {
01684     return;
01685    }
01686 }
01687
01688 void CTestContainer98View::OnControlSaveToStream()
01689 {
01690    int nResult;
01691
01692    CString strFilter;
01693    LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STREAM_FILES);
01694    CFileDialog dlg( FALSE, _T( "TSM" ), NULL, OFN_HIDEREADONLY|
01695     OFN_OVERWRITEPROMPT, strFilter);
01696    HRESULT hResult;
01697    IStreamPtr pStream;
01698    LARGE_INTEGER nDisplacement;
01699    ULARGE_INTEGER iSeekPtr;
01700    ULONG nBytesLeft;
01701    ULONG nBytesRead;
01702    BYTE abData[512];
01703
01704    ENSURE( m_pSelection != NULL );
01705
01706    nResult = (int)dlg.DoModal();
01707    if( nResult != IDOK )
01708    {
01709     return;
01710    }
01711
01712    hResult = CreateStreamOnHGlobal( NULL, TRUE, &pStream );
01713    if( FAILED( hResult ) )
01714    {
01715     TRACE( "CreateStreamOnHGlobal() failed.\n" );
01716     return;
01717    }
01718
01719    hResult = m_pSelection->SaveToStream( pStream );
01720    if( FAILED( hResult ) )
01721    {
01722     CString strErrorMessage;
01723     _com_error e( hResult );
01724
01725     LOAD_STRING_FROM_RESOURCE(strErrorMessage, IDS_SAVETOSTREAMFAILED);
01726     strErrorMessage += e.ErrorMessage();
01727     AfxMessageBox( strErrorMessage );
01728     return;
01729    }
01730
01731    try
01732    {
01733     CFile file( dlg.GetPathName(), CFile::modeCreate|CFile::modeWrite|
01734      CFile::shareExclusive );
01735
01736     nDisplacement.QuadPart = 0;
01737     pStream->Seek( nDisplacement, STREAM_SEEK_CUR, &iSeekPtr );
01738     nBytesLeft = ULONG( iSeekPtr.QuadPart );
01739     pStream->Seek( nDisplacement, STREAM_SEEK_SET, NULL );
01740     while( nBytesLeft > 0 )
01741     {
01742      pStream->Read( abData, min( nBytesLeft, sizeof( abData ) ),
01743       &nBytesRead );
01744      ASSERT( nBytesRead > 0 );
01745      file.Write( abData, nBytesRead );
01746      nBytesLeft -= nBytesRead;
01747     }
01748    }
01749    catch( CFileException* pException )
01750    {
01751     pException->Delete();
01752
01753     AfxMessageBox( IDS_ERRORWRITINGTOFILE );
01754    }
01755 }
01756
01757 void CTestContainer98View::OnEditInsertFromStream()
01758 {
01759    int nResult;
01760    HRESULT hResult;
01761    IStreamPtr pStream;
01762    LARGE_INTEGER nDisplacement;
01763    ULONG nBytesLeft;
01764    ULONG nBytesToRead;
01765    ULONGLONG nFileLength;
01766    CTestContainer98Doc* pDoc;
01767    CTestContainer98Item* pItem;
01768    CLSID clsid;
01769    BYTE abData[512];
01770
01771    CString strFilter;
01772    LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STREAM_FILES);
01773    CFileDialog dlg( TRUE, _T( "TSM" ), NULL, OFN_HIDEREADONLY|
01774     OFN_OVERWRITEPROMPT, strFilter );
01775
01776    nResult = (int)dlg.DoModal();
01777    if( nResult != IDOK )
01778    {
01779     return;
01780    }
01781
01782    hResult = CreateStreamOnHGlobal( NULL, TRUE, &pStream );
01783    if( FAILED( hResult ) )
01784    {
01785     TRACE( "CreateStreamOnHGlobal() failed.\n" );
01786     return;
01787    }
01788
01789    try
01790    {
01791     CFile file( dlg.GetPathName(), CFile::modeRead|CFile::shareDenyWrite );
01792
01793      nFileLength = file.GetLength();
01794      if( nFileLength > INT_MAX )
01795      {
01796         AfxThrowOleException( E_FAIL );
01797      }
01798      nBytesLeft = ULONG( nFileLength );
01799     while( nBytesLeft > 0 )
01800     {
01801      nBytesToRead = min( nBytesLeft, sizeof( abData ) );
01802      file.Read( abData, nBytesToRead );
01803      pStream->Write( abData, nBytesToRead, NULL );
01804      nBytesLeft -= nBytesToRead;
01805     }
01806    }
01807    catch( CException* pException )
01808    {
01809     pException->Delete();
01810     AfxMessageBox( IDS_ERRORREADINGFROMFILE );
01811     return;
01812    }
01813
01814    nDisplacement.QuadPart = 0;
01815    pStream->Seek( nDisplacement, STREAM_SEEK_SET, NULL );
01816
01817    BeginWaitCursor();
01818
01819    pItem = NULL;
01820    try
01821    {
01822     hResult = ReadClassStm( pStream, &clsid );
01823     if( FAILED( hResult ) )
01824     {
01825      AfxThrowOleException( hResult );
01826     }
01827
01828     pDoc = GetDocument();
01829     pItem = pDoc->AddControl( clsid, NULL, IID_IStream, pStream );
01830    }
01831    catch( COleException* pException )
01832    {
01833     CString strErrorMessage;
01834     _com_error error( pException->m_sc );
01835
01836     pException->Delete();
01837
01838     if( pItem != NULL )
01839     {
01840      ASSERT_VALID( pItem );
01841      pItem->Delete();
01842     }
01843
01844     AfxFormatString1( strErrorMessage, IDS_CREATEFAILED,
01845      error.ErrorMessage() );
01846
01847     AfxMessageBox( strErrorMessage );
01848    }
01849    catch( CException* pException )
01850    {
01851     pException->Delete();
01852
01853     AfxMessageBox( IDP_FAILED_TO_CREATE );
01854    }
01855
01856    EndWaitCursor();
01857 }
01858
01859 void CTestContainer98View::OnDragLeave()
01860 {
01861    TRACE( "OnDragLeave()\n" );
01862
01863    HandleWindowlessDragLeave();
01864
01865   CView::OnDragLeave();
01866 }
01867
01868 void CTestContainer98View::OnControlSaveToPropertyBag()
01869 {
01870    CPropertyBag* pPropertyBagObject;
01871    IPropertyBagPtr pPropertyBag;
01872    HRESULT hResult;
01873
01874    #pragma warning(suppress: 6014) // unexpected prefast memory leak warning
01875    pPropertyBagObject = new CPropertyBag;
01876    if( pPropertyBagObject == NULL )
01877    {
01878     return;
01879    }
01880
01881    hResult = pPropertyBagObject->QueryInterface( IID_IPropertyBag,
01882     (void**)&pPropertyBag );
01883    ASSERT( SUCCEEDED( hResult ) );
01884
01885    hResult = m_pSelection->SaveToPropertyBag( pPropertyBag );
01886    if( FAILED( hResult ) )
01887    {
01888     CString strErrorMessage;
01889     _com_error e( hResult );
01890
01891     LOAD_STRING_FROM_RESOURCE(strErrorMessage, IDS_SAVETOPROPERTYBAGFAILED);
01892
01893     strErrorMessage += e.ErrorMessage();
01894     AfxMessageBox( strErrorMessage );
01895     return;
01896    }
01897
01898    CPropertyBagDlg dlg( pPropertyBagObject );
01899
01900    dlg.DoModal();
01901 }
01902
01903 void CTestContainer98View::OnUpdateControlSaveToPropertyBag( CCmdUI* pCmdUI )
01904 {
01905    pCmdUI->Enable( m_pSelection != NULL );
01906 }
01907
01908 void CTestContainer98View::OnUpdateControlSaveToStream( CCmdUI* pCmdUI )
01909 {
01910    pCmdUI->Enable( m_pSelection != NULL );
01911 }
01912
01913 void CTestContainer98View::OnControlInvokeMethods()
01914 {
01915    ENSURE( m_pSelection != NULL );
01916
01917    m_pSelection->InvokeMethods();
01918 }
01919
01920 void CTestContainer98View::OnUpdateControlInvokeMethods( CCmdUI* pCmdUI )
01921 {
01922    pCmdUI->Enable( m_pSelection != NULL );
01923 }
01924
01925 void CTestContainer98View::OnControlLogging()
01926 {
01927    ENSURE( m_pSelection != NULL );
01928
01929    m_pSelection->SetLoggingOptions();
01930 }
01931
01932 void CTestContainer98View::OnUpdateControlLogging( CCmdUI* pCmdUI )
01933 {
01934    pCmdUI->Enable( m_pSelection != NULL );
01935 }
01936
01937 void CTestContainer98View::OnControlActivate()
01938 {
01939    ENSURE( m_pSelection != NULL );
01940
01941    m_pSelection->Activate( OLEIVERB_INPLACEACTIVATE, this );
01942 }
01943
01944 void CTestContainer98View::OnControlDeactivate()
01945 {
01946    ENSURE( m_pSelection != NULL );
01947
01948    m_pSelection->Deactivate();
01949 }
01950
01951 void CTestContainer98View::OnControlUIActivate()
01952 {
01953    ENSURE( m_pSelection != NULL );
01954
01955    m_pSelection->Activate( OLEIVERB_UIACTIVATE, this );
01956 }
01957
01958 void CTestContainer98View::OnControlUIDeactivate()
01959 {
01960    ENSURE( m_pSelection != NULL );
01961
01962    m_pSelection->DeactivateUI();
01963 }
01964
01965 void CTestContainer98View::OnUpdateControlUIDeactivate( CCmdUI* pCmdUI )
01966 {
01967    pCmdUI->Enable( (m_pSelection != NULL)   && (m_pSelection->IsUIActive()) );
01968 }
01969
01970 void CTestContainer98View::OnUpdateControlUIActivate( CCmdUI* pCmdUI )
01971 {
01972    pCmdUI->Enable( (m_pSelection != NULL) && (!m_pSelection->IsUIActive()) );
01973 }
01974
01975 void CTestContainer98View::OnUpdateControlActivate( CCmdUI* pCmdUI )
01976 {
01977    pCmdUI->Enable( (m_pSelection != NULL) &&
01978     (!m_pSelection->IsInPlaceActive()) );
01979 }
01980
01981 void CTestContainer98View::OnUpdateControlDeactivate( CCmdUI* pCmdUI )
01982 {
01983    pCmdUI->Enable( (m_pSelection != NULL) &&
01984     (m_pSelection->IsInPlaceActive()) );
01985 }
01986
01987 void CTestContainer98View::OnEditBringToFront()
01988 {
01989    POSITION posItem;
01990    CTestContainer98Item* pItem;
01991
01992    ASSERT( !m_lpSelectedItems.IsEmpty() );
01993
01994    posItem = m_lpSelectedItems.GetHeadPosition();
01995    while( posItem != NULL )
01996    {
01997     pItem = m_lpSelectedItems.GetNext( posItem );
01998     GetDocument()->BringToFront( pItem );
01999    }
02000
02001    Invalidate();
02002 }
02003
02004 void CTestContainer98View::OnUpdateEditBringToFront( CCmdUI* pCmdUI )
02005 {
02006    pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
02007 }
02008
02009 void CTestContainer98View::OnEditSendToBack()
02010 {
02011    POSITION posItem;
02012    CTestContainer98Item* pItem;
02013
02014    ASSERT( !m_lpSelectedItems.IsEmpty() );
02015
02016    posItem = m_lpSelectedItems.GetHeadPosition();
02017    while( posItem != NULL )
02018    {
02019     pItem = m_lpSelectedItems.GetNext( posItem );
02020     GetDocument()->SendToBack( pItem );
02021    }
02022
02023    Invalidate();
02024 }
02025
02026 void CTestContainer98View::OnUpdateEditSendToBack( CCmdUI* pCmdUI )
02027 {
02028    pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
02029 }
02030
02031 void CTestContainer98View::OnContextMenu( CWnd* pWnd, CPoint point )
02032 {
02033    CTestContainer98Item* pItemHit;
02034    CPoint ptClient;
02035    CMenu menu;
02036    CMenu* pPopupMenu;
02037    DWORD dwHitType;
02038
02039    if( pWnd->m_hWnd != m_hWnd )
02040    {
02041     return;
02042    }
02043
02044    GetParentFrame()->ActivateFrame();
02045
02046    ptClient = point;
02047    ScreenToClient( &ptClient );
02048
02049    pItemHit = HitTestItems( ptClient, &dwHitType );
02050
02051    if( pItemHit == NULL )
02052    {
02053     menu.LoadMenu( IDR_CONTAINER_CONTEXT );
02054     pPopupMenu = menu.GetSubMenu( 0 );
02055     pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x,
02056      point.y, AfxGetMainWnd(), NULL );
02057     menu.DestroyMenu();
02058    }
02059    else
02060    {
02061     if( m_lpSelectedItems.Find( pItemHit ) != NULL )
02062     {
02063      // The item is selected.  Create a popup menu at the current mouse
02064      // location, and fill it with the appropriate verbs for the object.
02065      menu.LoadMenu( IDR_CONTROL_CONTEXT );
02066      pPopupMenu = menu.GetSubMenu( 0 );
02067      pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x,
02068       point.y, AfxGetMainWnd(), NULL );
02069      menu.DestroyMenu();
02070     }
02071    }
02072 }
02073
02074 void CTestContainer98View::OnEditProperties()
02075 {
02076    POSITION posItem;
02077    CTestContainer98Item* pItem;
02078    CArray< CLSID, CLSID& > aclsidCommonPages;
02079    CArray< CLSID, CLSID& > aclsidPages;
02080    BOOL tSuccess;
02081    int iPage;
02082    int iCommonPage;
02083    BOOL tFound;
02084    CLSID clsidPage;
02085
02086    posItem = m_lpSelectedItems.GetHeadPosition();
02087    pItem = m_lpSelectedItems.GetNext( posItem );
02088    tSuccess = pItem->GetPropertyPageCLSIDs( aclsidCommonPages );
02089    if( !tSuccess )
02090    {
02091     return;
02092    }
02093    while( posItem != NULL )
02094    {
02095     pItem = m_lpSelectedItems.GetNext( posItem );
02096     aclsidPages.RemoveAll();
02097     tSuccess = pItem->GetPropertyPageCLSIDs( aclsidPages );
02098     if( !tSuccess )
02099     {
02100      return;
02101     }
02102
02103     for( iCommonPage = (int)aclsidCommonPages.GetSize()-1; iCommonPage >= 0;
02104      iCommonPage-- )
02105     {
02106      clsidPage = aclsidCommonPages[iCommonPage];
02107      tFound = FALSE;
02108      for( iPage = 0; iPage < aclsidPages.GetSize(); iPage++ )
02109      {
02110       if( IsEqualCLSID( clsidPage, aclsidPages[iPage] ) )
02111       {
02112          tFound = TRUE;
02113       }
02114      }
02115      if( !tFound )
02116      {
02117       aclsidCommonPages.RemoveAt( iCommonPage );
02118      }
02119     }
02120    }
02121
02122    if( m_lpSelectedItems.GetCount() > 1 )
02123    {
02124     // Don't display the extended properties page if multiple items are
02125     // selected.
02126     for( iCommonPage = 0; iCommonPage < aclsidCommonPages.GetSize();
02127      iCommonPage++ )
02128     {
02129      if( IsEqualCLSID( aclsidCommonPages[iCommonPage], __uuidof(
02130       TCExtPage ) ) )
02131      {
02132       aclsidCommonPages.RemoveAt( iCommonPage );
02133      }
02134     }
02135    }
02136
02137    if( aclsidCommonPages.GetSize() == 0 )
02138    {
02139       if( m_lpSelectedItems.GetCount() > 1 )
02140       {
02141         AfxMessageBox( IDS_NOCOMMONPROPERTIES );
02142       }
02143       else
02144       {
02145          AfxMessageBox( IDS_NOPROPERTYPAGES );
02146       }
02147    }
02148    else
02149    {
02150
02151     int iObject;
02152     CString strCaption;
02153
02154     ::ATL::CAutoStackPtr<IUnknown *> ppObjects((IUnknown**)_malloca( m_lpSelectedItems.GetCount()*sizeof( IUnknown* ) ));
02155     ENSURE(ppObjects);
02156     iObject = 0;
02157     posItem = m_lpSelectedItems.GetHeadPosition();
02158     while( posItem != NULL )
02159     {
02160      pItem = m_lpSelectedItems.GetNext( posItem );
02161      ppObjects[iObject] = pItem->m_lpObject;
02162      iObject++;
02163     }
02164
02165     if (aclsidCommonPages.GetSize() < 0 || aclsidCommonPages.GetSize() > (INT_MAX / sizeof(CLSID)))
02166     {
02167       return;
02168     }
02169
02170     ::ATL::CAutoStackPtr<CLSID> pclsidCommonPages( (CLSID*)_malloca( aclsidCommonPages.GetSize()*sizeof( CLSID ) ));
02171     ENSURE(pclsidCommonPages);
02172     for( iPage = 0; iPage < aclsidCommonPages.GetSize(); iPage++ )
02173     {
02174      pclsidCommonPages[iPage] = aclsidCommonPages[iPage];
02175     }
02176
02177     if( m_lpSelectedItems.GetCount() > 1 )
02178     {
02179     LOAD_STRING_FROM_RESOURCE( strCaption, IDS_MULTIPLESELECTION );
02180     }
02181     else
02182     {
02183      strCaption = m_pSelection->GetDisplayName();
02184     }
02185     OleCreatePropertyFrame( m_hWnd, 0, 0, CT2COLE( strCaption ),
02186      m_lpSelectedItems.GetCount(), ppObjects, aclsidCommonPages.GetSize(),
02187      pclsidCommonPages, GetUserDefaultLCID(), 0, NULL );
02188
02189     //WINBUG: OleCreatePropertyFrame doesn't return focus to its parent when
02190     // it closes
02191     SetFocus();
02192    }
02193 }
02194
02195 void CTestContainer98View::OnUpdateEditProperties( CCmdUI* pCmdUI )
02196 {
02197    pCmdUI->Enable( !m_lpSelectedItems.IsEmpty() );
02198 }
02199
02200 void CTestContainer98View::OnEditSelectAll()
02201 {
02202    POSITION posItem;
02203    CTestContainer98Item* pItem;
02204    CTestContainer98Doc* pDoc;
02205
02206    pDoc = GetDocument();
02207    posItem = pDoc->GetStartPosition();
02208    while( posItem != NULL )
02209    {
02210     pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
02211     SetMultiSelect( pItem, TRUE );
02212    }
02213 }
02214
02215 void CTestContainer98View::OnEditCopy()
02216 {
02217    IStoragePtr pStorage;
02218    HRESULT hResult;
02219    POSITION posItem;
02220    CTestContainer98Item* pItem;
02221    COleStreamFile file;
02222    ULONG iItem;
02223    CString strStorageName;
02224    BSTR bstrStorageName;
02225    IStoragePtr pSubStorage;
02226    COleDataSource* pDataSource;
02227    CLIPFORMAT cf;
02228    STGMEDIUM stgmedium;
02229    int nSelectedItems;
02230
02231    ASSERT( m_lpSelectedItems.GetCount() > 0 );
02232
02233    pDataSource = new COleDataSource;
02234    try
02235    {
02236     hResult = StgCreateDocfile( NULL, STGM_CREATE|STGM_READWRITE|
02237      STGM_DELETEONRELEASE|STGM_SHARE_EXCLUSIVE, 0, &pStorage );
02238     if( FAILED( hResult ) )
02239     {
02240      AfxThrowOleException( hResult );
02241     }
02242
02243     if( !file.CreateStream( pStorage, _T( "Contents" ), CFile::modeReadWrite|
02244      CFile::shareExclusive|CFile::modeCreate ) )
02245     {
02246      AfxThrowOleException( E_FAIL );
02247     }
02248
02249     CArchive ar( &file, CArchive::store );
02250
02251     nSelectedItems = (int)m_lpSelectedItems.GetCount();
02252     ar<<nSelectedItems;
02253
02254     posItem = m_lpSelectedItems.GetHeadPosition();
02255     iItem = 0;
02256     while( posItem != NULL )
02257     {
02258      pItem = m_lpSelectedItems.GetNext( posItem );
02259      strStorageName.Format( "Control%d", iItem );
02260      bstrStorageName = strStorageName.AllocSysString();
02261
02262      hResult = pStorage->CreateStorage( bstrStorageName, STGM_READWRITE|
02263       STGM_CREATE|STGM_SHARE_EXCLUSIVE, 0, 0, &pSubStorage );
02264      SysFreeString( bstrStorageName );
02265      if( FAILED( hResult ) )
02266      {
02267       AfxThrowOleException( hResult );
02268      }
02269
02270      pItem->CopyToClipboard( ar, pSubStorage );
02271
02272      pSubStorage.Release();
02273      iItem++;
02274     }
02275
02276     stgmedium.tymed = TYMED_ISTORAGE;
02277     stgmedium.pstg = pStorage;
02278     stgmedium.pstg->AddRef();
02279     stgmedium.pUnkForRelease = NULL;
02280
02281     cf = CLIPFORMAT( ::RegisterClipboardFormat( _T( "TC98 Controls" ) ) );
02282     pDataSource->CacheData( cf, &stgmedium );
02283    }
02284    catch( COleException* pException )
02285    {
02286     CString strErrorMessage;
02287     _com_error error( pException->m_sc );
02288
02289     pException->Delete();
02290     delete pDataSource;
02291
02292     AfxFormatString1( strErrorMessage, IDS_COPYFAILED,
02293      error.ErrorMessage() );
02294     AfxMessageBox( strErrorMessage );
02295     return;
02296    }
02297
02298    file.Close();
02299
02300    pDataSource->SetClipboard();
02301    // Don't need to delete the object. The object was cached, when this object is removed from clipboard it will be destroyed.
02302    // delete pDataSource;
02303 }
02304
02305 void CTestContainer98View::OnEditPaste()
02306 {
02307    CTestContainer98Item* pItem;
02308    CTestContainer98Doc* pDoc;
02309    COleDataObject data;
02310    CLIPFORMAT cf;
02311    STGMEDIUM stgmedium;
02312    IStoragePtr pStorage;
02313    IStoragePtr pSubStorage;
02314    int iItem;
02315    int nItems;
02316    CString strItemName;
02317    BSTR bstrItemName;
02318    HRESULT hResult;
02319    COleStreamFile file;
02320
02321    pDoc = GetDocument();
02322
02323    if( !data.AttachClipboard() )
02324    {
02325     return;
02326    }
02327
02328    cf = CLIPFORMAT( ::RegisterClipboardFormat( _T( "TC98 Controls" ) ) );
02329    if( !data.GetData( cf, &stgmedium ) )
02330    {
02331     return;
02332    }
02333
02334    ASSERT( stgmedium.tymed == TYMED_ISTORAGE );
02335
02336    pStorage = stgmedium.pstg;
02337    ReleaseStgMedium( &stgmedium );
02338
02339    if( !file.OpenStream( pStorage, _T( "Contents" ), STGM_READ|
02340     STGM_SHARE_EXCLUSIVE ) )
02341    {
02342     return;
02343    }
02344
02345    CArchive ar( &file, CArchive::load|CArchive::bNoFlushOnDelete );
02346
02347    ClearSelection();
02348
02349    ar>>nItems;
02350
02351    for( iItem = 0; iItem < nItems; iItem++ )
02352    {
02353     pItem = NULL;
02354     try
02355     {
02356      strItemName.Format( "Control%d", iItem );
02357      bstrItemName = strItemName.AllocSysString();
02358      hResult = pStorage->OpenStorage( bstrItemName, NULL, STGM_READWRITE|
02359       STGM_SHARE_EXCLUSIVE, NULL, 0, &pSubStorage );
02360      SysFreeString( bstrItemName );
02361      if( FAILED( hResult ) )
02362      {
02363       AfxThrowOleException( hResult );
02364      }
02365
02366      pItem = new CTestContainer98Item( pDoc );
02367      if( !pItem->CreateFromClipboard( ar, pSubStorage ) )
02368      {
02369       AfxThrowOleException( E_FAIL );
02370      }
02371
02372      pItem->UpdateLink();
02373      pItem->InvalidateItem();
02374
02375      // Activate the item if it wants to be active all the time.
02376      if( pItem->ShouldActivateWhenVisible() )
02377      {
02378       if( pDoc->GetUserMode() && pItem->IsInvisibleAtRuntime() )
02379       {
02380          pItem->DoVerb( OLEIVERB_HIDE, this );
02381       }
02382       else
02383       {
02384          pItem->DoVerb( OLEIVERB_SHOW, this );
02385       }
02386      }
02387
02388      SetMultiSelect( pItem, TRUE );
02389
02390      ASSERT_VALID( pItem );
02391     }
02392     catch( CException* pException )
02393     {
02394      pException->Delete();
02395
02396      delete pItem;
02397     }
02398    }
02399
02400    ar.Flush();
02401    file.Close();
02402
02403    pDoc->SetModifiedFlag();
02404
02405    Invalidate();
02406 }
02407
02408 void CTestContainer98View::OnUpdateEditCopy( CCmdUI* pCmdUI )
02409 {
02410    pCmdUI->Enable( m_lpSelectedItems.GetCount() > 0 );
02411 }
02412
02413 void CTestContainer98View::OnUpdateEditPaste( CCmdUI* pCmdUI )
02414 {
02415    pCmdUI->Enable( IsClipboardFormatAvailable( ::RegisterClipboardFormat( _T(
02416     "TC98 Controls" ) ) ) );
02417 }
02418
02419 void CTestContainer98View::OnEditCut()
02420 {
02421    OnEditCopy();
02422    OnEditClear();
02423 }
02424
02425 void CTestContainer98View::OnUpdateEditCut( CCmdUI* pCmdUI )
02426 {
02427    pCmdUI->Enable( m_lpSelectedItems.GetCount() > 0 );
02428 }
02429
02430 void CTestContainer98View::OnControlSaveToStorage()
02431 {
02432
02433    LONG nResult;
02434    HRESULT hResult;
02435    IStoragePtr pStorage;
02436
02437    CString strFilter;
02438    LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STORAGE_FILES);
02439    CFileDialog dlg( FALSE, _T( "TSG" ), NULL, OFN_HIDEREADONLY|
02440     OFN_OVERWRITEPROMPT, strFilter);
02441
02442    ENSURE( m_pSelection != NULL );
02443
02444    nResult = (LONG)dlg.DoModal();
02445    if( nResult != IDOK )
02446    {
02447     return;
02448    }
02449
02450    hResult = StgCreateDocfile( CT2COLE( dlg.GetPathName() ), STGM_READWRITE|
02451     STGM_SHARE_EXCLUSIVE|STGM_CREATE, 0, &pStorage );
02452    if( FAILED( hResult ) )
02453    {
02454     return;
02455    }
02456
02457    hResult = m_pSelection->SaveToStorage( pStorage );
02458    if( FAILED( hResult ) )
02459    {
02460     CString strErrorMessage;
02461     _com_error e( hResult );
02462
02463     LOAD_STRING_FROM_RESOURCE( strErrorMessage, IDS_SAVETOSTORAGEFAILED );
02464     strErrorMessage += e.ErrorMessage();
02465     AfxMessageBox( strErrorMessage );
02466     return;
02467    }
02468 }
02469
02470 void CTestContainer98View::OnUpdateControlSaveToStorage( CCmdUI* pCmdUI )
02471 {
02472    pCmdUI->Enable( m_lpSelectedItems.GetCount() == 1 );
02473 }
02474
02475 void CTestContainer98View::OnEditInsertControlFromStorage()
02476 {
02477
02478    CTestContainer98Item* pItem;
02479    CTestContainer98Doc* pDoc;
02480    int nResult;
02481    IStoragePtr pStorage;
02482    HRESULT hResult;
02483    CLSID clsid;
02484    CString strMessage;
02485
02486    CString strFilter;
02487    LOAD_STRING_FROM_RESOURCE(strFilter, IDS_STORAGE_FILES);
02488    CFileDialog dlg( TRUE, _T( "TSG" ), NULL, OFN_HIDEREADONLY|
02489     OFN_OVERWRITEPROMPT, strFilter);
02490
02491    nResult = (int)dlg.DoModal();
02492    if( nResult != IDOK )
02493    {
02494     return;
02495    }
02496
02497    hResult = StgOpenStorage( CT2COLE( dlg.GetPathName() ), NULL, STGM_READ|
02498     STGM_SHARE_DENY_WRITE, NULL, 0, &pStorage );
02499    if( FAILED( hResult ) )
02500    {
02501     _com_error error( hResult );
02502
02503     AfxFormatString1( strMessage, IDS_OPENSTORAGEFAILED,
02504      error.ErrorMessage() );
02505     AfxMessageBox( strMessage );
02506     return;
02507    }
02508
02509    ReadClassStg( pStorage, &clsid );
02510
02511    pDoc = GetDocument();
02512
02513    pItem = NULL;
02514    try
02515    {
02516     pItem = pDoc->AddControl( clsid, NULL, IID_IStorage, pStorage );
02517    }
02518    catch( COleException* pException )
02519    {
02520     _com_error error( pException->m_sc );
02521
02522     pException->Delete();
02523
02524     AfxFormatString1( strMessage, IDS_LOADCONTROLFAILED,
02525      error.ErrorMessage() );
02526
02527     AfxMessageBox( strMessage );
02528    }
02529    catch( CException* pException )
02530    {
02531     _com_error error( E_FAIL );
02532
02533     pException->Delete();
02534
02535     AfxFormatString1( strMessage, IDS_LOADCONTROLFAILED,
02536      error.ErrorMessage() );
02537
02538     AfxMessageBox( strMessage );
02539    }
02540 }
02541
02542 void CTestContainer98View::OnUpdateEditSelectAll( CCmdUI* pCmdUI )
02543 {
02544    CTestContainer98Doc* pDoc;
02545
02546    pDoc = GetDocument();
02547    pCmdUI->Enable( pDoc->GetStartPosition() != NULL );
02548 }
02549
02550 void CTestContainer98View::OnControlDrawMetaFile()
02551 {
02552    IUnknownPtr pObject;
02553    CMetaFileWnd* pWnd;
02554    CString strWindowTitle;
02555
02556    ASSERT( m_lpSelectedItems.GetCount() == 1 );
02557    ENSURE( m_pSelection != NULL );
02558
02559    pObject = m_pSelection->m_lpObject;
02560
02561    LOAD_STRING_FROM_RESOURCE( strWindowTitle, IDS_METAFILEWINDOWTITLE );
02562    #pragma warning(suppress: 6014) // pWnd will be freed when the window is closed.
02563    pWnd = new CMetaFileWnd;
02564    pWnd->Create( NULL, strWindowTitle );
02565    pWnd->SetObject( pObject );
02566    pWnd->ShowWindow( SW_SHOW );
02567 }
02568
02569 void CTestContainer98View::OnUpdateControlDrawMetaFile( CCmdUI* pCmdUI )
02570 {
02571    pCmdUI->Enable( m_lpSelectedItems.GetCount() == 1 );
02572 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/mainfrm.cpp Source File

  • ole
  • hiersvr

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "hiersvr.h"
00015
00016 #include "mainfrm.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030   ON_WM_CREATE()
00031   //}}AFX_MSG_MAP
00032   // Global help commands
00033   ON_COMMAND(ID_HELP_INDEX, CMDIFrameWnd::OnHelpIndex)
00034   ON_COMMAND(ID_HELP, CMDIFrameWnd::OnHelp)
00035   ON_COMMAND(ID_DEFAULT_HELP, CMDIFrameWnd::OnHelpIndex)
00036   ON_COMMAND(ID_CONTEXT_HELP, CMDIFrameWnd::OnContextHelp)
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // arrays of IDs used to initialize control bars
00041
00042 // toolbar buttons - IDs are command buttons
00043 static UINT BASED_CODE buttons[] =
00044 {
00045   // same order as in the bitmap 'toolbar.bmp'
00046   ID_FILE_NEW,
00047   ID_FILE_OPEN,
00048   ID_FILE_SAVE,
00049     ID_SEPARATOR,
00050   ID_EDIT_CUT,
00051   ID_EDIT_COPY,
00052   ID_EDIT_PASTE,
00053     ID_SEPARATOR,
00054   ID_FILE_PRINT,
00055   ID_APP_ABOUT,
00056   ID_CONTEXT_HELP,
00057 };
00058
00059 static UINT BASED_CODE indicators[] =
00060 {
00061   ID_SEPARATOR,           // status line indicator
00062   ID_INDICATOR_CAPS,
00063   ID_INDICATOR_NUM,
00064   ID_INDICATOR_SCRL,
00065 };
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CMainFrame construction/destruction
00069
00070 CMainFrame::CMainFrame()
00071 {
00072 }
00073
00074 CMainFrame::~CMainFrame()
00075 {
00076 }
00077
00078 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00079 {
00080   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00081     return -1;
00082
00083   if (!m_wndToolBar.Create(this) ||
00084     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00085     !m_wndToolBar.SetButtons(buttons,
00086       sizeof(buttons)/sizeof(UINT)))
00087   {
00088     TRACE0("Failed to create toolbar\n");
00089     return -1;      // fail to create
00090   }
00091
00092   if (!m_wndStatusBar.Create(this) ||
00093     !m_wndStatusBar.SetIndicators(indicators,
00094       sizeof(indicators)/sizeof(UINT)))
00095   {
00096     TRACE0("Failed to create status bar\n");
00097     return -1;      // fail to create
00098   }
00099
00100   EnableDocking(CBRS_ALIGN_ANY);
00101   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00102   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_SIZE_DYNAMIC);
00103   DockControlBar(&m_wndToolBar);
00104   return 0;
00105 }
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // CMainFrame diagnostics
00109
00110 #ifdef _DEBUG
00111 void CMainFrame::AssertValid() const
00112 {
00113   CMDIFrameWnd::AssertValid();
00114 }
00115
00116 void CMainFrame::Dump(CDumpContext& dc) const
00117 {
00118   CMDIFrameWnd::Dump(dc);
00119 }
00120
00121 #endif //_DEBUG
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // CMainFrame commands
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.cpp Source File

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePicker.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "ToolbarDateTimePicker.h"
00013
00014 #include "MainFrm.h"
00015 #include "ToolbarDateTimePickerDoc.h"
00016 #include "ToolbarDateTimePickerView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CToolbarDateTimePickerApp
00026
00027 BEGIN_MESSAGE_MAP(CToolbarDateTimePickerApp, CWinApp)
00028   //{{AFX_MSG_MAP(CToolbarDateTimePickerApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00036   // Standard print setup command
00037   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CToolbarDateTimePickerApp construction
00042
00043 CToolbarDateTimePickerApp::CToolbarDateTimePickerApp() :
00044   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00045 {
00046   // TODO: add construction code here,
00047   // Place all significant initialization in InitInstance
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only CToolbarDateTimePickerApp object
00052
00053 CToolbarDateTimePickerApp theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CToolbarDateTimePickerApp initialization
00057
00058 BOOL CToolbarDateTimePickerApp::InitInstance()
00059 {
00060   // Initialize OLE libraries
00061   if (!AfxOleInit())
00062   {
00063     AfxMessageBox(IDP_OLE_INIT_FAILED);
00064     return FALSE;
00065   }
00066
00067   AfxEnableControlContainer();
00068
00069   // Standard initialization
00070   // If you are not using these features and wish to reduce the size
00071   //  of your final executable, you should remove from the following
00072   //  the specific initialization routines you do not need.
00073
00074 #if _MSC_VER < 1400
00075 #ifdef _AFXDLL
00076   Enable3dControls();     // Call this when using MFC in a shared DLL
00077 #else
00078   Enable3dControlsStatic(); // Call this when linking to MFC statically
00079 #endif
00080 #endif
00081
00082   // Change the registry key under which our settings are stored.
00083   // TODO: You should modify this string to be something appropriate
00084   // such as the name of your company or organization.
00085   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00086
00087   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00088
00089   SetRegistryBase (_T("Settings"));
00090
00091   // Initialize all Managers for usage. They are automatically constructed
00092   // if not yet present
00093   InitContextMenuManager();
00094   InitKeyboardManager();
00095
00096   // Register the application's document templates.  Document templates
00097   //  serve as the connection between documents, frame windows and views.
00098
00099   CSingleDocTemplate* pDocTemplate;
00100   pDocTemplate = new CSingleDocTemplate(
00101     IDR_MAINFRAME,
00102     RUNTIME_CLASS(CToolbarDateTimePickerDoc),
00103     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00104     RUNTIME_CLASS(CToolbarDateTimePickerView));
00105   AddDocTemplate(pDocTemplate);
00106
00107   // Parse command line for standard shell commands, DDE, file open
00108   CCommandLineInfo cmdInfo;
00109   ParseCommandLine(cmdInfo);
00110
00111   // Dispatch commands specified on the command line
00112   if (!ProcessShellCommand(cmdInfo))
00113     return FALSE;
00114
00115   // The one and only window has been initialized, so show and update it.
00116   m_pMainWnd->ShowWindow(SW_SHOW);
00117   m_pMainWnd->UpdateWindow();
00118
00119   return TRUE;
00120 }
00121
00122 /////////////////////////////////////////////////////////////////////////////
00123 // CAboutDlg dialog used for App About
00124
00125 class CAboutDlg : public CDialog
00126 {
00127 public:
00128   CAboutDlg();
00129
00130 // Dialog Data
00131   //{{AFX_DATA(CAboutDlg)
00132   enum { IDD = IDD_ABOUTBOX };
00133   //}}AFX_DATA
00134
00135   // ClassWizard generated virtual function overrides
00136   //{{AFX_VIRTUAL(CAboutDlg)
00137   protected:
00138   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00139   //}}AFX_VIRTUAL
00140
00141 // Implementation
00142 protected:
00143   //{{AFX_MSG(CAboutDlg)
00144     // No message handlers
00145   //}}AFX_MSG
00146   DECLARE_MESSAGE_MAP()
00147 };
00148
00149 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00150 {
00151   //{{AFX_DATA_INIT(CAboutDlg)
00152   //}}AFX_DATA_INIT
00153 }
00154
00155 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00156 {
00157   CDialog::DoDataExchange(pDX);
00158   //{{AFX_DATA_MAP(CAboutDlg)
00159   //}}AFX_DATA_MAP
00160 }
00161
00162 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00163   //{{AFX_MSG_MAP(CAboutDlg)
00164     // No message handlers
00165   //}}AFX_MSG_MAP
00166 END_MESSAGE_MAP()
00167
00168 // App command to run the dialog
00169 void CToolbarDateTimePickerApp::OnAppAbout()
00170 {
00171   CAboutDlg aboutDlg;
00172   aboutDlg.DoModal();
00173 }
00174
00175 /////////////////////////////////////////////////////////////////////////////
00176 // CToolbarDateTimePickerApp message handlers
00177
00178 int CToolbarDateTimePickerApp::ExitInstance()
00179 {
00180
00181
00182   return CWinAppEx::ExitInstance();
00183 }
00184
00185 void CToolbarDateTimePickerApp::PreLoadState ()
00186 {
00187
00188   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00189
00190   // TODO: add another context menus here
00191 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinctl.cpp Source File

  • controls
  • spindial

spinctl.cpp

Go to the documentation of this file.
00001 // spinctl.cpp : Implementation of the CSpindialCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "spindial.h"
00015 #include "spinctl.h"
00016 #include "spinppg.h"
00017
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // Numeric constants
00027
00028 const int MAX_POSITIONS = 4;
00029 const int TICK_LEN = 6;
00030
00031
00032 IMPLEMENT_DYNCREATE(CSpindialCtrl, COleControl)
00033
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // Message map
00037
00038 BEGIN_MESSAGE_MAP(CSpindialCtrl, COleControl)
00039   //{{AFX_MSG_MAP(CSpindialCtrl)
00040   ON_WM_LBUTTONDOWN()
00041   //}}AFX_MSG_MAP
00042   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00043 END_MESSAGE_MAP()
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // Dispatch map
00048
00049 BEGIN_DISPATCH_MAP(CSpindialCtrl, COleControl)
00050   //{{AFX_DISPATCH_MAP(CSpindialCtrl)
00051   DISP_PROPERTY_EX(CSpindialCtrl, "NeedlePosition", GetNeedlePosition, SetNeedlePosition, VT_I2)
00052   DISP_DEFVALUE(CSpindialCtrl, "NeedlePosition")
00053   //}}AFX_DISPATCH_MAP
00054   DISP_FUNCTION_ID(CSpindialCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00055 END_DISPATCH_MAP()
00056
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // Event map
00060
00061 BEGIN_EVENT_MAP(CSpindialCtrl, COleControl)
00062   //{{AFX_EVENT_MAP(CSpindialCtrl)
00063   EVENT_CUSTOM("SpinPositive", FireSpinPositive, VTS_NONE)
00064   //}}AFX_EVENT_MAP
00065 END_EVENT_MAP()
00066
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // Property pages
00070
00071 // TODO: Add more property pages as needed.  Remember to increase the count!
00072 BEGIN_PROPPAGEIDS(CSpindialCtrl, 1)
00073   PROPPAGEID(CSpindialPropPage::guid)
00074 END_PROPPAGEIDS(CSpindialCtrl)
00075
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // Initialize class factory and guid
00079
00080 IMPLEMENT_OLECREATE_EX(CSpindialCtrl, "SPINDIAL.SpindialCtrl.1",
00081   0x6889605, 0xb8d0, 0x101a, 0x91, 0xf1, 0x0, 0x60, 0x8c, 0xea, 0xd5, 0xb3)
00082
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // Type library ID and version
00086
00087 IMPLEMENT_OLETYPELIB(CSpindialCtrl, _tlid, _wVerMajor, _wVerMinor)
00088
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // Interface IDs
00092
00093 const IID BASED_CODE IID_DSpindial =
00094     { 0x37446b89, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00095 const IID BASED_CODE IID_DSpindialEvents =
00096     { 0x37446b8a, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00097
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // Control type information
00101
00102 static const DWORD BASED_CODE _dwSpindialOleMisc =
00103   OLEMISC_ACTIVATEWHENVISIBLE |
00104   OLEMISC_SETCLIENTSITEFIRST |
00105   OLEMISC_INSIDEOUT |
00106   OLEMISC_CANTLINKINSIDE |
00107   OLEMISC_RECOMPOSEONRESIZE;
00108
00109 IMPLEMENT_OLECTLTYPE(CSpindialCtrl, IDS_SPINDIAL, _dwSpindialOleMisc)
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CSpindialCtrl::CSpindialCtrlFactory::UpdateRegistry -
00114 // Adds or removes system registry entries for CSpindialCtrl
00115
00116 BOOL CSpindialCtrl::CSpindialCtrlFactory::UpdateRegistry(BOOL bRegister)
00117 {
00118   if (bRegister)
00119     return AfxOleRegisterControlClass(
00120       AfxGetInstanceHandle(),
00121       m_clsid,
00122       m_lpszProgID,
00123       IDS_SPINDIAL,
00124       IDB_SPINDIAL,
00125       FALSE,                      //  Not insertable
00126       _dwSpindialOleMisc,
00127       _tlid,
00128       _wVerMajor,
00129       _wVerMinor);
00130   else
00131     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00132 }
00133
00134
00135 /////////////////////////////////////////////////////////////////////////////
00136 // CSpindialCtrl::CSpindialCtrl - Constructor
00137
00138 CSpindialCtrl::CSpindialCtrl()
00139 {
00140   InitializeIIDs(&IID_DSpindial, &IID_DSpindialEvents);
00141 }
00142
00143
00144 /////////////////////////////////////////////////////////////////////////////
00145 // CSpindialCtrl::~CSpindialCtrl - Destructor
00146
00147 CSpindialCtrl::~CSpindialCtrl()
00148 {
00149 }
00150
00151
00152 /////////////////////////////////////////////////////////////////////////////
00153 // CSpindialCtrl::OnDraw - Drawing function
00154
00155 void CSpindialCtrl::OnDraw(
00156       CDC* pdc, const CRect& rcBounds, const CRect&)
00157 {
00158   LPRECT      lpr;
00159   OLE_COLOR   color;
00160   CBrush      br;
00161   POINT       centerPt;
00162   POINT       tickpos[MAX_POSITIONS];
00163   CPen* pOldPen;
00164
00165   lpr = (LPRECT)(LPCRECT)rcBounds;
00166
00167   // Paint background using the ambient background color
00168   color = AmbientBackColor();
00169   br.CreateSolidBrush(TranslateColor(color));
00170   pdc->FillRect(lpr, &br);
00171
00172   // Draw the dial using a black pen
00173   pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
00174   pdc->Ellipse(lpr);
00175
00176   // Determine coordinates of center point
00177   centerPt.x = lpr->left + ((lpr->right - lpr->left) / 2);
00178   centerPt.y = lpr->top + ((lpr->bottom - lpr->top) / 2);
00179
00180   // Determine coordinates of intersections of tick marks and dial
00181   tickpos[0].x = centerPt.x;
00182   tickpos[0].y = lpr->top;
00183   tickpos[1].x = lpr->right;
00184   tickpos[1].y = centerPt.y;
00185   tickpos[2].x = centerPt.x;
00186   tickpos[2].y = lpr->bottom;
00187   tickpos[3].x = lpr->left;
00188   tickpos[3].y = centerPt.y;
00189
00190   // Draw each tick mark
00191   pdc->MoveTo(tickpos[0]);
00192   pdc->LineTo(tickpos[0].x, tickpos[0].y+TICK_LEN);
00193   pdc->MoveTo(tickpos[1]);
00194   pdc->LineTo(tickpos[1].x-TICK_LEN, tickpos[1].y);
00195   pdc->MoveTo(tickpos[2]);
00196   pdc->LineTo(tickpos[2].x,tickpos[2].y-TICK_LEN);
00197   pdc->MoveTo(tickpos[3]);
00198   pdc->LineTo(tickpos[3].x+TICK_LEN, tickpos[3].y);
00199
00200   // Draw pointer of dial
00201   pdc->MoveTo(centerPt);
00202   pdc->LineTo(tickpos[m_needlePosition]);
00203
00204   pdc->SelectObject(pOldPen);
00205
00206   return;
00207 }
00208
00209
00210 /////////////////////////////////////////////////////////////////////////////
00211 // CSpindialCtrl::DoPropExchange - Persistence support
00212
00213 void CSpindialCtrl::DoPropExchange(CPropExchange* pPX)
00214 {
00215   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00216   COleControl::DoPropExchange(pPX);
00217
00218   PX_Short(pPX, _T("NeedlePosition"), m_needlePosition, 0);
00219 }
00220
00221
00222 /////////////////////////////////////////////////////////////////////////////
00223 // CSpindialCtrl::OnResetState - Reset control to default state
00224
00225 void CSpindialCtrl::OnResetState()
00226 {
00227   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00228 }
00229
00230
00231 /////////////////////////////////////////////////////////////////////////////
00232 // CSpindialCtrl::AboutBox - Display an "About" box to the user
00233
00234 void CSpindialCtrl::AboutBox()
00235 {
00236   CDialog dlgAbout(IDD_ABOUTBOX_SPINDIAL);
00237   dlgAbout.DoModal();
00238 }
00239
00240
00241 /////////////////////////////////////////////////////////////////////////////
00242 // CSpindialCtrl::GetNeedlePosition - Return needle position.
00243
00244 short CSpindialCtrl::GetNeedlePosition()
00245 {
00246   return m_needlePosition;
00247 }
00248
00249
00250 /////////////////////////////////////////////////////////////////////////////
00251 // CSpindialCtrl::SetNeedlePosition - Set needle position.
00252
00253 void CSpindialCtrl::SetNeedlePosition(short nNewValue)
00254 {
00255   // Constrain value to 0..3 range
00256   if ( (nNewValue > 3) || (nNewValue < 0) )
00257     m_needlePosition = 0;
00258   else
00259     m_needlePosition = nNewValue;
00260
00261   SetModifiedFlag(TRUE);
00262
00263   InvalidateControl();
00264 }
00265
00266
00267 /////////////////////////////////////////////////////////////////////////////
00268 // CSpindialCtrl::OnLButtonDown - Spin needle and fire event.
00269
00270 void CSpindialCtrl::OnLButtonDown(UINT nFlags, CPoint point)
00271 {
00272   //  Spin needle position
00273   SpinNeedlePosition();
00274
00275   // Fire "spin positive" event
00276   FireSpinPositive();
00277
00278   COleControl::OnLButtonDown(nFlags, point);
00279 }
00280
00281
00282 /////////////////////////////////////////////////////////////////////////////
00283 // CSpindialCtrl::SpinNeedlePosition - Spin needle to next position.
00284
00285 void CSpindialCtrl::SpinNeedlePosition()
00286 {
00287    short np = GetNeedlePosition();
00288    if (np == 3) np = 0;
00289      else np++;
00290    SetNeedlePosition(np);
00291 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/datedial.h Source File

  • vc2008fp
  • WordPad

datedial.h

Go to the documentation of this file.
00001 //
00002 // datedial.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CDateDialog dialog
00016
00017 class CDateDialog : public CCSDialog
00018 {
00019 // Construction
00020 public:
00021   CDateDialog(CWnd* pParent = NULL);   // standard constructor
00022
00023 // Attributes
00024   static SYSTEMTIME m_time;
00025   static LCID m_id;
00026   static CListBox* m_pListBox;
00027   static BOOL CALLBACK DateFmtEnumProc(LPTSTR lpszFormatString);
00028   static BOOL CALLBACK TimeFmtEnumProc(LPTSTR lpszFormatString);
00029
00030 // Dialog Data
00031   //{{AFX_DATA(CDateDialog)
00032   enum { IDD = IDD_DATEDIALOG };
00033   CListBox    m_listBox;
00034   CString m_strSel;
00035   //}}AFX_DATA
00036
00037
00038 // Overrides
00039   // ClassWizard generated virtual function overrides
00040   //{{AFX_VIRTUAL(CDateDialog)
00041   protected:
00042   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046 protected:
00047   static const DWORD m_nHelpIDs[];
00048   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00049
00050   // Generated message map functions
00051   //{{AFX_MSG(CDateDialog)
00052   virtual BOOL OnInitDialog();
00053   afx_msg void OnDblclkDatedialogList();
00054   //}}AFX_MSG
00055   DECLARE_MESSAGE_MAP()
00056 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typtrmap.cpp Source File

  • advanced
  • collect

typtrmap.cpp

Go to the documentation of this file.
00001 // typtrmap.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "typtrmap.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CTypedPtrMapView
00024
00025 IMPLEMENT_DYNCREATE(CTypedPtrMapView, CFormView)
00026
00027 CTypedPtrMapView::CTypedPtrMapView()
00028   : CFormView(CTypedPtrMapView::IDD)
00029 {
00030   //{{AFX_DATA_INIT(CTypedPtrMapView)
00031   m_strKey = "";
00032   m_int = 0;
00033   m_float = 0.0f;
00034   m_str = "";
00035   //}}AFX_DATA_INIT
00036 }
00037
00038 CTypedPtrMapView::~CTypedPtrMapView()
00039 {
00040 }
00041
00042 void CTypedPtrMapView::OnInitialUpdate()
00043 {
00044   CFormView::OnInitialUpdate();
00045
00046   // Copy all of the assocations from the document's CTypedPtrMap
00047   // to the listbox.
00048   CString strKey;
00049   CMyObject* pMyObject;
00050   m_ctlList.ResetContent();
00051   CMapStringToMyObject& map = GetDocument()->m_mapStringToMyObject;
00052   POSITION pos = map.GetStartPosition();
00053   while (pos != NULL)
00054   {
00055     map.GetNextAssoc(pos, strKey, pMyObject);
00056     AddMapEntryToListBox(strKey, pMyObject);
00057   }
00058 }
00059
00060 void CTypedPtrMapView::DoDataExchange(CDataExchange* pDX)
00061 {
00062   CFormView::DoDataExchange(pDX);
00063   //{{AFX_DATA_MAP(CTypedPtrMapView)
00064   DDX_Control(pDX, IDC_LIST, m_ctlList);
00065   DDX_Text(pDX, IDC_KEY, m_strKey);
00066   DDX_Text(pDX, IDC_INT, m_int);
00067   DDX_Text(pDX, IDC_FLOAT, m_float);
00068   DDX_Text(pDX, IDC_STRING, m_str);
00069   //}}AFX_DATA_MAP
00070 }
00071
00072
00073 BEGIN_MESSAGE_MAP(CTypedPtrMapView, CFormView)
00074   //{{AFX_MSG_MAP(CTypedPtrMapView)
00075   ON_BN_CLICKED(IDC_ADD_OR_UPDATE, OnAddOrUpdate)
00076   ON_BN_CLICKED(IDC_FIND, OnFind)
00077   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00078   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00079   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00080   //}}AFX_MSG_MAP
00081 END_MESSAGE_MAP()
00082
00083
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CTypedPtrMapView diagnostics
00087
00088 #ifdef _DEBUG
00089 void CTypedPtrMapView::AssertValid() const
00090 {
00091   CFormView::AssertValid();
00092 }
00093
00094 void CTypedPtrMapView::Dump(CDumpContext& dc) const
00095 {
00096   CFormView::Dump(dc);
00097 }
00098
00099 CCollectDoc* CTypedPtrMapView::GetDocument() // non-debug version is inline
00100 {
00101   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00102 }
00103 #endif //_DEBUG
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CTypedPtrMapView internal implementation
00107
00108 CString CTypedPtrMapView::FormatListBoxEntry(CString& strKey, CMyObject* pMyObject)
00109 {
00110   CString strListBoxEntry = strKey;
00111   strListBoxEntry += _T(" >> ");
00112   CString strMyObject;
00113   pMyObject->FormatMyObject(strMyObject);
00114   strListBoxEntry += strMyObject;
00115   return strListBoxEntry;
00116 }
00117
00118 int CTypedPtrMapView::FindKeyInListBox(CString& strKey)
00119 {
00120   CMyObject* pMyObject;
00121   if (GetDocument()->m_mapStringToMyObject.Lookup(strKey, pMyObject) != TRUE)
00122     return LB_ERR;
00123   CString strListBoxEntry = FormatListBoxEntry(strKey, pMyObject);
00124   return m_ctlList.FindString(-1, strListBoxEntry);
00125 }
00126
00127 void CTypedPtrMapView::AddMapEntryToListBox(CString& strKey, CMyObject* pMyObject)
00128 {
00129   CString strListBoxEntry = FormatListBoxEntry(strKey, pMyObject);
00130   m_ctlList.AddString(strListBoxEntry);
00131 }
00132
00133 CMyObject* CTypedPtrMapView::ConstructMyObjectFromView()
00134 {
00135   CMyObject* pMyObject = new CMyObject;
00136   pMyObject->m_int = m_int;
00137   pMyObject->m_float = m_float;
00138   pMyObject->m_str = m_str;
00139   return pMyObject;
00140 }
00141
00142 void CTypedPtrMapView::UpdateViewFromMyObject(CMyObject* pMyObject)
00143 {
00144   m_int = pMyObject->m_int;
00145   m_float = pMyObject->m_float;
00146   m_str = pMyObject->m_str;
00147   UpdateData(FALSE);  // update the value found in the map lookup
00148 }
00149
00150
00151 /////////////////////////////////////////////////////////////////////////////
00152 // CTypedPtrMapView message handlers
00153
00154 void CTypedPtrMapView::OnAddOrUpdate()
00155 {
00156   if (UpdateData() != TRUE)
00157     return;
00158
00159   // Add or replace entry in the listbox
00160   int nSel = FindKeyInListBox(m_strKey);
00161   if (nSel != LB_ERR)
00162     m_ctlList.DeleteString(nSel);
00163   CMyObject* pMyObject = ConstructMyObjectFromView();
00164   AddMapEntryToListBox(m_strKey, pMyObject);
00165
00166   // Add or update association in the CTypedPtrMap
00167   CMyObject* pTemp = GetDocument()->m_mapStringToMyObject[m_strKey];
00168   delete pTemp; // delete old value
00169   GetDocument()->m_mapStringToMyObject[m_strKey] = pMyObject;
00170 }
00171
00172 void CTypedPtrMapView::OnFind()
00173 {
00174   if (UpdateData() != TRUE)
00175     return;
00176
00177   CMyObject* pMyObject;
00178   if (GetDocument()->m_mapStringToMyObject.Lookup(m_strKey, pMyObject) != TRUE)
00179   {
00180     AfxMessageBox(IDS_KEY_NOT_FOUND);
00181     return;
00182   }
00183
00184   UpdateViewFromMyObject(pMyObject);
00185 }
00186
00187 void CTypedPtrMapView::OnRemove()
00188 {
00189   if (UpdateData() != TRUE)
00190     return;
00191
00192   CMyObject* pMyObject;
00193   CMapStringToMyObject& map = GetDocument()->m_mapStringToMyObject;
00194   if (map.Lookup(m_strKey, pMyObject) != TRUE)
00195   {
00196     AfxMessageBox(IDS_KEY_NOT_FOUND);
00197     return;
00198   }
00199
00200   if (m_int != pMyObject->m_int
00201     || m_float != pMyObject->m_float
00202     || m_str != pMyObject->m_str)
00203   {
00204     UpdateViewFromMyObject(pMyObject);
00205     AfxMessageBox(IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN);
00206     return;
00207   }
00208
00209   // Remove assocation from the listbox
00210   int nSel = FindKeyInListBox(m_strKey);
00211   ASSERT(nSel != LB_ERR);
00212   m_ctlList.DeleteString(nSel);
00213
00214   // Remove the association from the CTypedPtrMap
00215   map.RemoveKey(m_strKey);
00216
00217   // Delete the CMyObject
00218   delete pMyObject;
00219 }
00220
00221 void CTypedPtrMapView::OnRemoveAll()
00222 {
00223   CCollectDoc* pDoc = GetDocument();
00224   POSITION pos = pDoc->m_mapStringToMyObject.GetStartPosition();
00225   while (pos != NULL)
00226   {
00227     CString str;
00228     CMyObject* pMyObject;
00229     pDoc->m_mapStringToMyObject.GetNextAssoc(pos, str, pMyObject);
00230     delete pMyObject;
00231   }
00232   pDoc->m_mapStringToMyObject.RemoveAll();
00233
00234   m_ctlList.ResetContent();
00235 }
00236
00237 void CTypedPtrMapView::OnSelChangeList()
00238 {
00239   // Update the "key" field to reflect the new selection in the listbox.
00240   CString str;
00241   m_ctlList.GetText(m_ctlList.GetCurSel(), str);
00242   m_strKey.Empty();
00243   LPCTSTR lpsz = str;
00244   while (*lpsz != ' ' || *(lpsz+1) != '>' || *(lpsz+2) != '>')
00245   {
00246     m_strKey += *lpsz;
00247     lpsz++;
00248   }
00249   UpdateData(FALSE);
00250
00251   // Now that the key field has been updated to reflect the listbox selection,
00252   // find the string in the map as though the user had hit the Find button.
00253   OnFind();
00254 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethInfo.H Source File

  • ole
  • TstCon

MethInfo.H

Go to the documentation of this file.
00001 // File: MethInfo.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CMethodParamInfo
00011 {
00012 public:
00013    CMethodParamInfo();
00014    ~CMethodParamInfo();
00015
00016    CString GetName() const;
00017    VARTYPE GetType() const;
00018    HRESULT Init( LPCOLESTR pszName, const ELEMDESC* pElemDesc );
00019
00020 public:
00021    CString m_strName;
00022    VARTYPE m_vt;
00023 };
00024
00025
00026 const int REQUESTEDIT_ALWAYS = 0;
00027 const int REQUESTEDIT_NEVER = 1;
00028 const int REQUESTEDIT_PROMPT = 2;
00029
00030 class CMethodInfo
00031 {
00032 public:
00033    CMethodInfo();
00034    ~CMethodInfo();
00035
00036    friend CLog& operator<<( CLog& log, CMethodInfo* pMethodInfo );
00037
00038    void EnableEditRequestLogging( BOOL tEnable );
00039    void EnableLogging( BOOL tEnable );
00040    DISPID GetID() const;
00041    INVOKEKIND GetInvokeKind() const;
00042    CString GetName() const;
00043    int GetNumParams() const;
00044    CMethodParamInfo* GetParam( int iParam ) const;
00045    int GetRequestEditResponse() const;
00046    HRESULT Init( ITypeInfo* pTypeInfo, const FUNCDESC* pFuncDesc );
00047    HRESULT InitPropertyGet( ITypeInfo* pTypeInfo, const VARDESC* pVarDesc );
00048    HRESULT InitPropertyPut( ITypeInfo* pTypeInfo, const VARDESC* pVarDesc );
00049    BOOL IsBindable() const;
00050    BOOL IsLogged() const;
00051    BOOL LogEditRequests() const;
00052    void LogEvent( CLog& log, DISPPARAMS* pdpParams );
00053    BOOL RequestsEdit() const;
00054    void SetRequestEditResponse( int eResponse );
00055
00056 public:
00057    CString m_strName;
00058    DISPID m_dispid;
00059    INVOKEKIND m_invkind;
00060    CTypedPtrArray< CPtrArray, CMethodParamInfo* > m_apParamInfo;
00061    BOOL m_tLog;
00062    BOOL m_tBindable;
00063    BOOL m_tRequestEdit;
00064    BOOL m_tLogEditRequests;
00065    int m_eRequestEditResponse;
00066 };
00067
00068 CLog& operator<<( CLog& log, CMethodInfo* pMethodInfo );
00069
00070 class CInterfaceInfo
00071 {
00072 public:
00073    CInterfaceInfo();
00074    ~CInterfaceInfo();
00075
00076    CMethodInfo* FindMethod( DISPID dispid ) const;
00077    CMethodInfo* FindPropertyGet( DISPID dispid ) const;
00078    IID GetIID() const;
00079    CMethodInfo* GetMethod( int iMethod ) const;
00080    int GetNumMethods() const;
00081    HRESULT Init( ITypeInfo* pTypeInfo );
00082
00083 public:
00084    CTypedPtrArray< CPtrArray, CMethodInfo* > m_apMethodInfo;
00085    IID m_iid;
00086 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFormatBar Member List

This is the complete list of members for CFormatBar, including all inherited members.
CFormatBar() | CFormatBar |
CFormatBar() | CFormatBar |
CreateBorderTypeButton() | CFormatBar |
CreateColorButton() | CFormatBar |
CreateFontComboButton() | CFormatBar |
m_comboFontName | CFormatBar |
m_comboFontSize | CFormatBar |
m_dcPrinter | CFormatBar |
m_nNumColours | CFormatBar | [protected]
m_palColorPicker | CFormatBar | [protected]
m_szBaseUnits | CFormatBar |
NotifyOwner(UINT nCode) | CFormatBar |
OnComboCloseUp() | CFormatBar | [protected]
OnComboSetFocus() | CFormatBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CFormatBar | [protected]
OnDestroy() | CFormatBar | [protected]
OnFontNameKillFocus() | CFormatBar | [protected]
OnFontSizeDropDown() | CFormatBar | [protected]
OnFontSizeKillFocus() | CFormatBar | [protected]
OnPrinterChanged(UINT_PTR, LONG_PTR) | CFormatBar | [protected]
OnReset() | CFormatBar | [protected, virtual]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CFormatBar | [protected, virtual]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CFormatBar | [virtual]
PositionCombos() | CFormatBar |
SetCharFormat(CCharFormat &cf) | CFormatBar | [protected]
SyncToView() | CFormatBar |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CModelessApp Member List

This is the complete list of members for CModelessApp, including all inherited members.
CModelessApp() | CModelessApp |
InitInstance() | CModelessApp | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPaletteDemoView Member List

This is the complete list of members for CPaletteDemoView, including all inherited members.
CPaletteDemoView() | CPaletteDemoView | [protected]
GetDocument() | CPaletteDemoView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CPaletteDemoView | [protected, virtual]
OnDraw(CDC *pDC) | CPaletteDemoView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CPaletteDemoView | [protected, virtual]
OnFilePrintPreview() | CPaletteDemoView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CPaletteDemoView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CPaletteDemoView | [virtual]
~CPaletteDemoView() | CPaletteDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagCOLUMNSTRUCT Member List

This is the complete list of members for tagCOLUMNSTRUCT, including all inherited members.
nLeft | tagCOLUMNSTRUCT
nRight | tagCOLUMNSTRUCT
uiFlags | tagCOLUMNSTRUCT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlDoc.h Source File

  • vc2008fp
  • TabControl

TabControlDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTabControlDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CTabControlDoc();
00017   DECLARE_DYNCREATE(CTabControlDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CTabControlDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDemoOptionsPage Member List

This is the complete list of members for CDemoOptionsPage, including all inherited members.
CDemoOptionsPage() | CDemoOptionsPage |
DoDataExchange(CDataExchange *pDX) | CDemoOptionsPage | [protected, virtual]
IDD enum value | CDemoOptionsPage |
m_bShowDevTab | CDemoOptionsPage |
m_bShowFloaty | CDemoOptionsPage |
m_bShowKeyTips | CDemoOptionsPage |
m_nColorScheme | CDemoOptionsPage |
m_nTooltipStyle | CDemoOptionsPage |
m_wndBanner | CDemoOptionsPage |
m_wndColorScheme | CDemoOptionsPage |
OnInitDialog() | CDemoOptionsPage | [protected, virtual]
OnOK() | CDemoOptionsPage | [virtual]
OnSize(UINT nType, int cx, int cy) | CDemoOptionsPage | [protected]
~CDemoOptionsPage() | CDemoOptionsPage |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViews.h Source File

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViews.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #ifndef __AFXWIN_H__
00004   #error include 'stdafx.h' before including this file for PCH
00005 #endif
00006
00007 #include "resource.h"       // main symbols
00008
00009 /////////////////////////////////////////////////////////////////////////////
00010 // COutlookMultiViewsApp:
00011 // See OutlookMultiViews.cpp for the implementation of this class
00012 //
00013
00014 class COutlookMultiViewsApp : public CWinAppEx
00015 {
00016 public:
00017   COutlookMultiViewsApp();
00018
00019   // Override from CWinAppEx
00020   virtual void PreLoadState ();
00021
00022
00023 // Overrides
00024   public:
00025   virtual BOOL InitInstance();
00026   virtual int ExitInstance();
00027
00028 // Implementation
00029   afx_msg void OnAppAbout();
00030
00031   DECLARE_MESSAGE_MAP()
00032 };
00033
00034
00035 extern COutlookMultiViewsApp theApp;
00036
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribvw.cpp Source File

  • general
  • Scribble

scribvw.cpp

Go to the documentation of this file.
00001 // ScribVw.cpp : implementation of the CScribbleView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014
00015 #include "ScribDoc.h"
00016 #include "ScribVw.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CScribbleView
00026
00027 IMPLEMENT_DYNCREATE(CScribbleView, CScrollView)
00028
00029 BEGIN_MESSAGE_MAP(CScribbleView, CScrollView)
00030   //{{AFX_MSG_MAP(CScribbleView)
00031   ON_WM_LBUTTONDOWN()
00032   ON_WM_LBUTTONUP()
00033   ON_WM_MOUSEMOVE()
00034   ON_COMMAND(ID_CANCEL_EDIT_SRVR, OnCancelEditSrvr)
00035   ON_WM_SIZE()
00036   //}}AFX_MSG_MAP
00037   // Standard printing commands
00038   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00039   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00040   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CScribbleView construction/destruction
00045
00046 CScribbleView::CScribbleView()
00047 {
00048   SetScrollSizes(MM_TEXT, CSize(0, 0));
00049 }
00050
00051 CScribbleView::~CScribbleView()
00052 {
00053 }
00054
00055 BOOL CScribbleView::PreCreateWindow(CREATESTRUCT& cs)
00056 {
00057   // TODO: Modify the Window class or styles here by modifying
00058   //  the CREATESTRUCT cs
00059
00060   return CView::PreCreateWindow(cs);
00061 }
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CScribbleView drawing
00065
00066 void CScribbleView::OnDraw(CDC* pDC)
00067 {
00068   CScribbleDoc* pDoc = GetDocument();
00069   ASSERT_VALID(pDoc);
00070
00071   // Get the invalidated rectangle of the view, or in the case
00072   // of printing, the clipping region of the printer dc.
00073   CRect rectClip;
00074   CRect rectStroke;
00075   pDC->GetClipBox(&rectClip);
00076   pDC->LPtoDP(&rectClip);
00077   rectClip.InflateRect(1, 1); // avoid rounding to nothing
00078
00079   // Note: CScrollView::OnPaint() will have already adjusted the
00080   // viewport origin before calling OnDraw(), to reflect the
00081   // currently scrolled position.
00082
00083   // The view delegates the drawing of individual strokes to
00084   // CStroke::DrawStroke().
00085   CTypedPtrList<CObList,CStroke*>& strokeList = pDoc->m_strokeList;
00086   POSITION pos = strokeList.GetHeadPosition();
00087   while (pos != NULL)
00088   {
00089     CStroke* pStroke = strokeList.GetNext(pos);
00090     rectStroke = pStroke->GetBoundingRect();
00091     pDC->LPtoDP(&rectStroke);
00092     rectStroke.InflateRect(1, 1); // avoid rounding to nothing
00093     if (!rectStroke.IntersectRect(&rectStroke, &rectClip))
00094       continue;
00095     pStroke->DrawStroke(pDC);
00096   }
00097 }
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CScribbleView printing
00101
00102 BOOL CScribbleView::OnPreparePrinting(CPrintInfo* pInfo)
00103 {
00104   pInfo->SetMaxPage(2);   // the document is two pages long:
00105               // the first page is the title page
00106               // the second is the drawing
00107   BOOL bRet = DoPreparePrinting(pInfo); // default preparation
00108   pInfo->m_nNumPreviewPages = 2;  // Preview 2 pages at a time
00109   // Set this value after calling DoPreparePrinting to override
00110   // value read from .INI file
00111   return bRet;
00112 }
00113
00114 void CScribbleView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00115 {
00116   // TODO: add extra initialization before printing
00117 }
00118
00119 void CScribbleView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00120 {
00121   // TODO: add cleanup after printing
00122 }
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // CScribbleView diagnostics
00126
00127 #ifdef _DEBUG
00128 void CScribbleView::AssertValid() const
00129 {
00130   CScrollView::AssertValid();
00131 }
00132
00133 void CScribbleView::Dump(CDumpContext& dc) const
00134 {
00135   CScrollView::Dump(dc);
00136 }
00137
00138 CScribbleDoc* CScribbleView::GetDocument() // non-debug version is inline
00139 {
00140   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CScribbleDoc)));
00141   return (CScribbleDoc*)m_pDocument;
00142 }
00143 #endif //_DEBUG
00144
00145 /////////////////////////////////////////////////////////////////////////////
00146 // CScribbleView message handlers
00147
00148 void CScribbleView::OnLButtonDown(UINT, CPoint point)
00149 {
00150     // Pressing the mouse button in the view window starts a new stroke
00151
00152   // CScrollView changes the viewport origin and mapping mode.
00153   // It's necessary to convert the point from device coordinates
00154   // to logical coordinates, such as are stored in the document.
00155   CClientDC dc(this);
00156   OnPrepareDC(&dc);
00157   dc.DPtoLP(&point);
00158
00159   m_pStrokeCur = GetDocument()->NewStroke();
00160   // Add first point to the new stroke
00161   m_pStrokeCur->m_pointArray.Add(point);
00162
00163   SetCapture();       // Capture the mouse until button up.
00164   m_ptPrev = point;   // Serves as the MoveTo() anchor point for the
00165             // LineTo() the next point, as the user drags the
00166             // mouse.
00167
00168   return;
00169 }
00170
00171 void CScribbleView::OnLButtonUp(UINT, CPoint point)
00172 {
00173   // Mouse button up is interesting in the Scribble application
00174   // only if the user is currently drawing a new stroke by dragging
00175   // the captured mouse.
00176
00177   if (GetCapture() != this)
00178     return; // If this window (view) didn't capture the mouse,
00179         // then the user isn't drawing in this window.
00180
00181   CScribbleDoc* pDoc = GetDocument();
00182
00183   CClientDC dc(this);
00184
00185   // CScrollView changes the viewport origin and mapping mode.
00186   // It's necessary to convert the point from device coordinates
00187   // to logical coordinates, such as are stored in the document.
00188   OnPrepareDC(&dc);  // set up mapping mode and viewport origin
00189   dc.DPtoLP(&point);
00190
00191   CPen* pOldPen = dc.SelectObject(pDoc->GetCurrentPen());
00192   dc.MoveTo(m_ptPrev);
00193   dc.LineTo(point);
00194   dc.SelectObject(pOldPen);
00195   m_pStrokeCur->m_pointArray.Add(point);
00196
00197   // Tell the stroke item that we're done adding points to it.
00198   // This is so it can finish computing its bounding rectangle.
00199   m_pStrokeCur->FinishStroke();
00200
00201   // Tell the other views that this stroke has been added
00202   // so that they can invalidate this stroke's area in their
00203   // client area.
00204   pDoc->UpdateAllViews(this, 0L, m_pStrokeCur);
00205
00206   ReleaseCapture();   // Release the mouse capture established at
00207             // the beginning of the mouse drag.
00208   pDoc->NotifyChanged();
00209   return;
00210 }
00211
00212 void CScribbleView::OnMouseMove(UINT, CPoint point)
00213 {
00214   // Mouse movement is interesting in the Scribble application
00215   // only if the user is currently drawing a new stroke by dragging
00216   // the captured mouse.
00217
00218   if (GetCapture() != this)
00219     return; // If this window (view) didn't capture the mouse,
00220         // then the user isn't drawing in this window.
00221
00222   CClientDC dc(this);
00223   // CScrollView changes the viewport origin and mapping mode.
00224   // It's necessary to convert the point from device coordinates
00225   // to logical coordinates, such as are stored in the document.
00226   OnPrepareDC(&dc);
00227   dc.DPtoLP(&point);
00228
00229   m_pStrokeCur->m_pointArray.Add(point);
00230
00231   // Draw a line from the previous detected point in the mouse
00232   // drag to the current point.
00233   CPen* pOldPen = dc.SelectObject(GetDocument()->GetCurrentPen());
00234   dc.MoveTo(m_ptPrev);
00235   dc.LineTo(point);
00236   dc.SelectObject(pOldPen);
00237   m_ptPrev = point;
00238   return;
00239 }
00240
00241 void CScribbleView::OnUpdate(CView* /* pSender */, LPARAM /* lHint */,
00242   CObject* pHint)
00243 {
00244   // The document has informed this view that some data has changed.
00245
00246   if (pHint != NULL)
00247   {
00248     if (pHint->IsKindOf(RUNTIME_CLASS(CStroke)))
00249     {
00250       // The hint is that a stroke as been added (or changed).
00251       // So, invalidate its rectangle.
00252       CStroke* pStroke = (CStroke*)pHint;
00253       CClientDC dc(this);
00254       OnPrepareDC(&dc);
00255       CRect rectInvalid = pStroke->GetBoundingRect();
00256       dc.LPtoDP(&rectInvalid);
00257       InvalidateRect(&rectInvalid);
00258       return;
00259     }
00260   }
00261   // We can't interpret the hint, so assume that anything might
00262   // have been updated.
00263   Invalidate(TRUE);
00264   return;
00265 }
00266
00267 void CScribbleView::OnInitialUpdate()
00268 {
00269         ResyncScrollSizes();
00270   CScrollView::OnInitialUpdate();
00271 }
00272
00273 void CScribbleView::ResyncScrollSizes()
00274 {
00275   CClientDC dc(NULL);
00276   OnPrepareDC(&dc);
00277   CSize sizeDoc = GetDocument()->GetDocSize();
00278   dc.LPtoDP(&sizeDoc);
00279   SetScrollSizes(MM_TEXT, sizeDoc);
00280 }
00281
00282 void CScribbleView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
00283 {
00284   if (pInfo->m_nCurPage == 1)  // page no. 1 is the title page
00285   {
00286     PrintTitlePage(pDC, pInfo);
00287     return; // nothing else to print on page 1 but the page title
00288   }
00289   CString strHeader = GetDocument()->GetTitle();
00290
00291   PrintPageHeader(pDC, pInfo, strHeader);
00292   // PrintPageHeader() subtracts out from the pInfo->m_rectDraw the
00293   // amount of the page used for the header.
00294
00295   pDC->SetWindowOrg(pInfo->m_rectDraw.left,-pInfo->m_rectDraw.top);
00296
00297   // Now print the rest of the page
00298   OnDraw(pDC);
00299 }
00300
00301 void CScribbleView::PrintTitlePage(CDC* pDC, CPrintInfo* pInfo)
00302 {
00303   // Prepare a font size for displaying the file name
00304   LOGFONT logFont;
00305   memset(&logFont, 0, sizeof(LOGFONT));
00306   logFont.lfHeight = 75;  //  3/4th inch high in MM_LOENGLISH
00307               // (1/100th inch)
00308   CFont font;
00309   CFont* pOldFont = NULL;
00310   if (font.CreateFontIndirect(&logFont))
00311     pOldFont = pDC->SelectObject(&font);
00312
00313   // Get the file name, to be displayed on title page
00314   CString strPageTitle = GetDocument()->GetTitle();
00315
00316   // Display the file name 1 inch below top of the page,
00317   // centered horizontally
00318   pDC->SetTextAlign(TA_CENTER);
00319   pDC->TextOut(pInfo->m_rectDraw.right/2, -100, strPageTitle);
00320
00321   if (pOldFont != NULL)
00322     pDC->SelectObject(pOldFont);
00323 }
00324
00325 void CScribbleView::PrintPageHeader(CDC* pDC, CPrintInfo* pInfo,
00326   CString& strHeader)
00327 {
00328   // Print a page header consisting of the name of
00329   // the document and a horizontal line
00330   pDC->SetTextAlign(TA_LEFT);
00331   pDC->TextOut(0,-25, strHeader);  // 1/4 inch down
00332
00333   // Draw a line across the page, below the header
00334   TEXTMETRIC textMetric;
00335   pDC->GetTextMetrics(&textMetric);
00336   int y = -35 - textMetric.tmHeight;          // line 1/10th inch below text
00337   pDC->MoveTo(0, y);                          // from left margin
00338   pDC->LineTo(pInfo->m_rectDraw.right, y);    // to right margin
00339
00340   // Subtract out from the drawing rectange the space used by the header.
00341   y -= 25;    // space 1/4 inch below (top of) line
00342   pInfo->m_rectDraw.top += y;
00343 }
00344
00345 // The following command handler provides the standard keyboard
00346 //  user interface to cancel an in-place editing session.  Here,
00347 //  the server (not the container) causes the deactivation.
00348 void CScribbleView::OnCancelEditSrvr()
00349 {
00350   GetDocument()->OnDeactivateUI(FALSE);
00351 }
00352
00353 void CScribbleView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
00354 {
00355   CScribbleDoc* pDoc = GetDocument();
00356   CScrollView::OnPrepareDC(pDC, pInfo);
00357
00358   pDC->SetMapMode(MM_ANISOTROPIC);
00359   CSize sizeDoc = pDoc->GetDocSize();
00360   sizeDoc.cy = -sizeDoc.cy;
00361   pDC->SetWindowExt(sizeDoc);
00362
00363   CSize sizeNum, sizeDenom;
00364   pDoc->GetZoomFactor(&sizeNum, &sizeDenom);
00365
00366   int xLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSX);
00367   int yLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSY);
00368
00369   long xExt = (long)sizeDoc.cx * xLogPixPerInch * sizeNum.cx;
00370   xExt /= 100 * (long)sizeDenom.cx;
00371   long yExt = (long)sizeDoc.cy * yLogPixPerInch * sizeNum.cy;
00372   yExt /= 100 * (long)sizeDenom.cy;
00373   pDC->SetViewportExt((int)xExt, (int)-yExt);
00374 }
00375
00376 void CScribbleView::OnSize(UINT nType, int cx, int cy)
00377 {
00378         ResyncScrollSizes();        // ensure that scroll info is up-to-date
00379   CScrollView::OnSize(nType, cx, cy);
00380 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoListBox.cpp Source File

  • vc2008fp
  • VisualStudioDemo

UndoListBox.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "UndoListBox.h"
00012 #include "UndoBar.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CUndoListBox
00022
00023 CUndoListBox::CUndoListBox(CUndoBar& bar) : m_Bar(bar)
00024 {
00025 }
00026
00027 CUndoListBox::~CUndoListBox()
00028 {
00029 }
00030
00031 BEGIN_MESSAGE_MAP(CUndoListBox, CListBox)
00032   ON_WM_MOUSEMOVE()
00033   ON_WM_LBUTTONUP()
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CUndoListBox message handlers
00038
00039 void CUndoListBox::OnLButtonUp(UINT nFlags, CPoint point)
00040 {
00041   BOOL bOutside;
00042   ItemFromPoint(point, bOutside);
00043
00044   if (!bOutside)
00045   {
00046     m_Bar.DoUndo();
00047   }
00048
00049   if (IsWindow(GetSafeHwnd()))
00050   {
00051     CListBox::OnLButtonUp(nFlags, point);
00052   }
00053 }
00054
00055 void CUndoListBox::OnMouseMove(UINT nFlags, CPoint point)
00056 {
00057   CListBox::OnMouseMove(nFlags, point);
00058
00059   BOOL bOutside;
00060   int iItem = ItemFromPoint(point, bOutside);
00061
00062   if (!bOutside)
00063   {
00064     SelItemRange(FALSE, iItem + 1, GetCount() - 1);
00065
00066     if (iItem == 0)
00067     {
00068       SetSel(0);
00069     }
00070     else
00071     {
00072       SelItemRange(TRUE, 0, iItem);
00073     }
00074
00075     CString strLabel;
00076     strLabel.Format(_T("Undo %d Actions"), iItem + 1);
00077
00078     m_Bar.SetLabel(strLabel);
00079   }
00080 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/HTMLEdDoc.cpp Source File

  • internet
  • HTMLEdit

HTMLEdDoc.cpp

Go to the documentation of this file.
00001 // HTMLEdDoc.cpp : implementation of the CHTMLEdDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014
00015 #include "HTMLEdDoc.h"
00016 #include "htmledview.h"
00017 #include "geturl.h"
00018 #include "mainfrm.h"
00019 #include "sourceview.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CHTMLEdDoc
00029
00030 IMPLEMENT_DYNCREATE(CHTMLEdDoc, CHtmlEditDoc)
00031
00032 BEGIN_MESSAGE_MAP(CHTMLEdDoc, CHtmlEditDoc)
00033   //{{AFX_MSG_MAP(CHTMLEdDoc)
00034   ON_COMMAND(ID_FILE_OPENURL, OnFileOpenurl)
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CHTMLEdDoc construction/destruction
00040
00041 CHTMLEdDoc::CHTMLEdDoc()
00042 {
00043   m_bDoSaveOnDocCom = FALSE;
00044   m_bCallNewDocument = FALSE;
00045   m_bCallCloseDocument = FALSE;
00046 }
00047
00048 CHTMLEdDoc::~CHTMLEdDoc()
00049 {
00050 }
00051
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CHTMLEdDoc diagnostics
00055
00056 #ifdef _DEBUG
00057 void CHTMLEdDoc::AssertValid() const
00058 {
00059   CHtmlEditDoc::AssertValid();
00060 }
00061
00062 void CHTMLEdDoc::Dump(CDumpContext& dc) const
00063 {
00064   CHtmlEditDoc::Dump(dc);
00065 }
00066 #endif //_DEBUG
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CHTMLEdDoc commands
00070
00071 //We want the default functionality of CHtmlEditDoc::OnNewDocument(), but just need to update
00072 //the view with the new document contents
00073 BOOL CHTMLEdDoc::OnNewDocument()
00074 {
00075   //If the old document needs to be saved, and is waiting for a OnDocumentComplete,
00076   //OnNewDocument waits for it to gets done
00077   if(m_bDoSaveOnDocCom)
00078   {
00079     m_bCallNewDocument = TRUE;
00080     return FALSE;
00081   }
00082
00083   BOOL bRet = CHtmlEditDoc::OnNewDocument();
00084   if (bRet)
00085   {
00086     // have to clear the source view too!
00087     CMainFrame *pFrm = (CMainFrame*)AfxGetMainWnd();
00088     if (pFrm)
00089     {
00090       CSourceView *pView = (CSourceView*)pFrm->GetSourceView();
00091       if (pView)
00092       {
00093         pView->NewDocument();
00094         pFrm->SwapView(ID_VIEW_WEB);
00095       }
00096     }
00097   }
00098   return bRet;
00099 }
00100
00101 void CHTMLEdDoc::OnCloseDocument()
00102 {
00103   //If the old document needs to be saved, and is waiting for a OnDocumentComplete,
00104   //OnCloseDocument waits for it to gets done
00105   if(m_bDoSaveOnDocCom)
00106   {
00107     m_bCallCloseDocument = TRUE;
00108     return;
00109   }
00110
00111   CDocument::OnCloseDocument();
00112 }
00113
00114 //We want the default functionality of CHtmlEditDoc::OnOpenDocument(lpszFileName), but just
00115 //need to update the view with the opened document contents
00116 BOOL CHTMLEdDoc::OnOpenDocument(LPCTSTR lpszFileName)
00117 {
00118   BOOL bRet = CHtmlEditDoc::OnOpenDocument(lpszFileName);
00119   if (bRet)
00120   {
00121     // have to clear the source view too!
00122     CMainFrame *pFrm = (CMainFrame*)AfxGetMainWnd();
00123     if (pFrm)
00124     {
00125       CSourceView *pView = (CSourceView*)pFrm->GetSourceView();
00126       if (pView)
00127       {
00128         pView->NewDocument();
00129         pFrm->SwapView(ID_VIEW_WEB);
00130       }
00131     }
00132   }
00133
00134   return bRet;
00135 }
00136
00137 void CHTMLEdDoc::OnFileOpenurl()
00138 {
00139   CGetURL dlg;
00140   if(IDOK==dlg.DoModal())
00141     OpenURL(dlg.m_URL);
00142 }
00143
00144 BOOL CHTMLEdDoc::IsModified()
00145 {
00146   //Whether in Source or Web view, whenever we edit, CDocument::SetModified get's called.
00147   return CDocument::IsModified();
00148 }
00149
00150 //We want the default functionality of CHtmlEditDoc::OnSaveDocument(), but need to update
00151 //the web view with the contents of the source view before saving
00152 BOOL CHTMLEdDoc::OnSaveDocument(LPCTSTR lpszFileName)
00153 {
00154   CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();
00155   ASSERT_VALID(pFrame);
00156
00157   if(pFrame->GetCurrentView()==ID_VIEW_SOURCE)
00158   {
00159     //UpdateView is asynchronous, so we wait for the CHTMLEdView::OnDocumentComplete event
00160     //to occur which indicates that the view has been updated, before saving the document
00161     CHTMLEdView* pWebView = (CHTMLEdView*)pFrame->GetWebView();
00162     ASSERT_VALID(pWebView);
00163     pWebView->UpdateView();
00164     m_sSaveFileName = lpszFileName;
00165     m_bDoSaveOnDocCom = TRUE;
00166   }
00167   else
00168   {
00169     //For web view, the document already contains the changes, so we directly save it
00170     m_sSaveFileName = lpszFileName;
00171     return SaveMyDocument();
00172   }
00173   return TRUE;
00174 }
00175
00176 BOOL CHTMLEdDoc::SaveMyDocument()
00177 {
00178   return CHtmlEditDoc::OnSaveDocument(m_sSaveFileName);
00179 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListBar.cpp Source File

  • vc2008fp
  • OutlookDemo

FolderListBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "FolderListBar.h"
00013 #include "WorkspaceObj.h"
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 const int idTree = 5;
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CFolderListBar
00026
00027 CFolderListBar::CFolderListBar(const CObList& lstWorkspaces, CImageList& images) : m_wndFolders(lstWorkspaces, images)
00028 {
00029   // m_nSize = 200; // Initial width
00030   m_bNotifyFrame = TRUE;
00031 }
00032
00033 CFolderListBar::~CFolderListBar()
00034 {
00035 }
00036
00037 BEGIN_MESSAGE_MAP(CFolderListBar, CDockablePane)
00038   ON_WM_CREATE()
00039   ON_WM_SIZE()
00040   ON_NOTIFY(TVN_SELCHANGED, idTree, OnSelectTree)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CFolderListBar message handlers
00045
00046 int CFolderListBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00047 {
00048   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00049     return -1;
00050
00051   CRect rectDummy(0, 0, 0, 0);
00052   m_wndFolders.Create(0, rectDummy, this, idTree);
00053
00054   return 0;
00055 }
00056
00057 void CFolderListBar::OnSize(UINT nType, int cx, int cy)
00058 {
00059   CDockablePane::OnSize(nType, cx, cy);
00060   if (CanAdjustLayout())
00061   {
00062     m_wndFolders.SetWindowPos(NULL, 0, 0, cx , cy , SWP_NOACTIVATE | SWP_NOZORDER);
00063   }
00064 }
00065
00066 void CFolderListBar::OnEraseWorkArea(CDC* pDC, CRect rectWorkArea)
00067 {
00068   ASSERT_VALID(pDC);
00069   pDC->FillSolidRect(rectWorkArea, GetSysColor(COLOR_WINDOW));
00070 }
00071
00072 void CFolderListBar::OnSelectTree(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00073 {
00074   HTREEITEM hTreeItem = m_wndFolders.GetSelectedItem();
00075   if (hTreeItem != NULL)
00076   {
00077     CWorkspaceObj* pWS = (CWorkspaceObj*) m_wndFolders.GetItemData(hTreeItem);
00078     ASSERT_VALID(pWS);
00079
00080     CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetParentFrame());
00081     if (pMainFrame != NULL && m_bNotifyFrame)
00082     {
00083       pMainFrame->SetWorkSpace(pWS);
00084     }
00085   }
00086
00087   *pResult = 0;
00088 }
00089
00090 BOOL CFolderListBar::SelectWorkspace(CWorkspaceObj* pWS)
00091 {
00092   ASSERT_VALID(pWS);
00093
00094   m_bNotifyFrame = FALSE;
00095   m_wndFolders.SelectWorkspace(pWS);
00096   m_bNotifyFrame = TRUE;
00097
00098   return TRUE;
00099 }
00100
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoDoc.h Source File

  • vc2008fp
  • OutlookDemo

OutlookDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class COutlookDemoDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   COutlookDemoDoc();
00016   DECLARE_DYNCREATE(COutlookDemoDoc)
00017
00018 // Overrides
00019 public:
00020   virtual BOOL OnNewDocument();
00021   virtual void Serialize(CArchive& ar);
00022
00023 // Implementation
00024 public:
00025   virtual ~COutlookDemoDoc();
00026 #ifdef _DEBUG
00027   virtual void AssertValid() const;
00028   virtual void Dump(CDumpContext& dc) const;
00029 #endif
00030
00031 protected:
00032   afx_msg void OnNewAppointment();
00033   afx_msg void OnNewContract();
00034   afx_msg void OnNewDistributionList();
00035   afx_msg void OnNewFax();
00036   afx_msg void OnNewFolder();
00037   afx_msg void OnNewJournalEntry();
00038   afx_msg void OnNewMail();
00039   afx_msg void OnNewMeeting();
00040   afx_msg void OnNewNote();
00041   afx_msg void OnNewPostFolder();
00042   afx_msg void OnNewShortcut();
00043   afx_msg void OnNewTask();
00044   afx_msg void OnNewTaskRequest();
00045   afx_msg void OnSendReceive();
00046   afx_msg void OnAddressBook();
00047   afx_msg void OnFindContact();
00048   afx_msg void OnWebAddress();
00049   afx_msg void OnWebBack();
00050   afx_msg void OnWebFind();
00051   afx_msg void OnWebRefresh();
00052   afx_msg void OnWebStart();
00053   afx_msg void OnViewUp();
00054   afx_msg void OnViewBack();
00055   afx_msg void OnRulesWizard();
00056
00057   DECLARE_MESSAGE_MAP()
00058 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TESTHELPLib::_DTesthelp Member List

This is the complete list of members for TESTHELPLib::_DTesthelp, including all inherited members.
id | TESTHELPLib::_DTesthelp
id | TESTHELPLib::_DTesthelp
id | TESTHELPLib::_DTesthelp
id | TESTHELPLib::_DTesthelp
id | TESTHELPLib::_DTesthelp
id | TESTHELPLib::_DTesthelp
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/resource.h Source File

  • vc2008fp
  • ToolbarDateTimePicker

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by ToolbarDateTimePicker.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_TOOLBATYPE                  129
00009 #define IDR_CONTEXT_MENU                130
00010 #define IDR_POPUP_TOOLBAR               131
00011 #define IDD_ABOUTBOX                    999
00012 #define IDC_COMPANY_URL                 1041
00013 #define IDC_DATETIMEPICKER1             1042
00014 #define ID_VIEW_CUSTOMIZE               32770
00015 #define ID_VIEW_TOOLBARS                32771
00016 #define ID_DATE                         32833
00017 #define ID_TIME                         32834
00018
00019 // Next default values for new objects
00020 //
00021 #ifdef APSTUDIO_INVOKED
00022 #ifndef APSTUDIO_READONLY_SYMBOLS
00023 #define _APS_3D_CONTROLS                     1
00024 #define _APS_NEXT_RESOURCE_VALUE        154
00025 #define _APS_NEXT_COMMAND_VALUE         32835
00026 #define _APS_NEXT_CONTROL_VALUE         1043
00027 #define _APS_NEXT_SYMED_VALUE           108
00028 #endif
00029 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/dllmain.cpp Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

dllmain.cpp

Go to the documentation of this file.
00001 // dllmain.cpp : Implementation of DllMain.
00002
00003 #include "stdafx.h"
00004 #include "resource.h"
00005 #include "DrawClientHandlers_i.h"
00006 #include "dllmain.h"
00007
00008 CDrawClientHandlersModule _AtlModule;
00009
00010 class CDrawClientHandlersApp : public CWinApp
00011 {
00012 public:
00013
00014 // Overrides
00015   virtual BOOL InitInstance();
00016   virtual int ExitInstance();
00017
00018   DECLARE_MESSAGE_MAP()
00019 };
00020
00021 BEGIN_MESSAGE_MAP(CDrawClientHandlersApp, CWinApp)
00022 END_MESSAGE_MAP()
00023
00024 CDrawClientHandlersApp theApp;
00025
00026 BOOL CDrawClientHandlersApp::InitInstance()
00027 {
00028   return CWinApp::InitInstance();
00029 }
00030
00031 int CDrawClientHandlersApp::ExitInstance()
00032 {
00033   return CWinApp::ExitInstance();
00034 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSet.h Source File

  • vc2008fp
  • MenuSubSet

MenuSubSet.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CMenuSubSetApp:
00021 // See MenuSubSet.cpp for the implementation of this class
00022 //
00023
00024 class CMenuSubSetApp : public CWinAppEx
00025 {
00026 public:
00027   CMenuSubSetApp();
00028
00029   BOOL ChooseConfig (BOOL bIsStartup = FALSE);
00030
00031   virtual void PreLoadState ();
00032
00033
00034 // Overrides
00035   public:
00036   virtual BOOL InitInstance();
00037   virtual int ExitInstance();
00038   virtual BOOL SaveAllModified();
00039
00040 // Implementation
00041   afx_msg void OnAppAbout();
00042
00043   DECLARE_MESSAGE_MAP()
00044
00045   int m_nCurrConfig;
00046 };
00047
00048
00049 extern CMenuSubSetApp theApp;
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/mlistctl.cpp Source File

  • general
  • ListHdr

mlistctl.cpp

Go to the documentation of this file.
00001 // MyListCtrl.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "listhdr.h"
00015 #include "mlistctl.h"
00016 //#include "listcpg.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMyListCtrl
00026
00027 CMyListCtrl::CMyListCtrl()
00028 {
00029   m_bDragging = FALSE;
00030   m_pimageListDrag = NULL;
00031   m_oldDNDStyle = NULL;
00032 }
00033
00034 CMyListCtrl::~CMyListCtrl()
00035 {
00036 }
00037
00038
00039 BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
00040   //{{AFX_MSG_MAP(CMyListCtrl)
00041   ON_NOTIFY_REFLECT(LVN_BEGINDRAG, OnBeginDrag)
00042   ON_NOTIFY_REFLECT(LVN_BEGINRDRAG, OnBeginDrag)
00043   ON_NOTIFY_REFLECT(LVN_ENDLABELEDIT, OnEndLabelEdit)
00044   ON_WM_MOUSEMOVE()
00045   ON_WM_LBUTTONUP()
00046   ON_WM_RBUTTONUP()
00047   //}}AFX_MSG_MAP
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CMyListCtrl message handlers
00052 void CMyListCtrl::OnBeginDrag(LPNMHDR pnmhdr, LRESULT* /*pResult*/)
00053 {
00054   CPoint          ptItem, ptAction, ptImage;
00055   NM_LISTVIEW     *pnmListView = (NM_LISTVIEW *)pnmhdr;
00056
00057   m_oldDNDStyle = GetExtendedStyle();
00058   if (m_oldDNDStyle != 0) SetExtendedStyle(0);  // styles model original icon DND behavior
00059
00060   ASSERT(!m_bDragging);
00061   m_bDragging = TRUE;
00062   m_iItemDrag = pnmListView->iItem;
00063   ptAction = pnmListView->ptAction;
00064   GetItemPosition(m_iItemDrag, &ptItem);  // ptItem is relative to (0,0) and not the view origin
00065   GetOrigin(&m_ptOrigin);
00066
00067   ASSERT(m_pimageListDrag == NULL);
00068   m_pimageListDrag = CreateDragImage(m_iItemDrag, &ptImage);
00069   m_sizeDelta = ptAction - ptImage;   // difference between cursor pos and image pos
00070   m_ptHotSpot = ptAction - ptItem + m_ptOrigin;  // calculate hotspot for the cursor
00071   m_pimageListDrag->DragShowNolock(TRUE);  // lock updates and show drag image
00072   m_pimageListDrag->SetDragCursorImage(0, CPoint(0, 0));// define the hot spot for the new cursor image
00073   m_pimageListDrag->BeginDrag(0, CPoint(0, 0));
00074
00075   ptAction -= m_sizeDelta;
00076   m_pimageListDrag->DragEnter(this, ptAction);
00077   m_pimageListDrag->DragMove(ptAction);  // move image to overlap original icon
00078   m_iItemDrop = -1;// no drop target
00079   SetCapture();
00080 }
00081
00082 void CMyListCtrl::OnMouseMove(UINT nFlags, CPoint point)
00083 {
00084   long        lStyle;
00085   int         iItem;
00086   LV_ITEM     lvitem;
00087
00088   lStyle = GetWindowLong(m_hWnd, GWL_STYLE);
00089   lStyle &= LVS_TYPEMASK;  // drag will do different things in list and report mode
00090
00091   if (m_bDragging)
00092   {
00093     ASSERT(m_pimageListDrag != NULL);
00094     m_pimageListDrag->DragMove(point - m_sizeDelta);  // move the image
00095     if ((iItem = HitTest(point)) != -1)
00096     {
00097       lvitem.mask = LVIF_STATE;
00098       lvitem.stateMask = LVIS_DROPHILITED;  // highlight the drop target
00099       if (m_iItemDrop != -1)  // remove the drophighlighted from previous item
00100       {
00101         m_pimageListDrag->DragLeave(this);
00102         lvitem.iItem = m_iItemDrop;
00103         lvitem.iSubItem = 0;
00104         lvitem.state = 0; // sets drophighlighted to FALSE
00105
00106         SetItem(&lvitem);
00107       }
00108
00109       m_iItemDrop = iItem;
00110       m_pimageListDrag->DragLeave(this); // unlock the window and hide drag image
00111
00112       if (lStyle == LVS_REPORT || lStyle == LVS_LIST)
00113       {
00114         lvitem.iItem = iItem;
00115         lvitem.iSubItem = 0;
00116         lvitem.state = LVIS_DROPHILITED;  // sets the drophighlighted
00117
00118         SetItem(&lvitem);
00119         UpdateWindow();
00120       }
00121       point -= m_sizeDelta;
00122       m_pimageListDrag->DragEnter(this, point);  // lock updates and show drag image
00123     }
00124   }
00125   CListCtrl::OnMouseMove(nFlags, point);
00126 }
00127
00128
00129 void CMyListCtrl::OnButtonUp(CPoint point)
00130 {
00131   if (m_bDragging)  // end of the drag operation
00132   {
00133     long        lStyle;
00134     CString     cstr;
00135
00136     lStyle = GetWindowLong(m_hWnd, GWL_STYLE) & LVS_TYPEMASK;
00137     if (m_oldDNDStyle != 0) SetExtendedStyle(m_oldDNDStyle);
00138
00139     m_bDragging = FALSE;
00140     ASSERT(m_pimageListDrag != NULL);
00141     m_pimageListDrag->DragLeave(this);
00142
00143     SetItemState(m_iItemDrop, 0, LVIS_DROPHILITED); // remove the drophighlighted from last highlighted target
00144
00145     m_pimageListDrag->EndDrag();
00146     delete m_pimageListDrag;
00147     m_pimageListDrag = NULL;
00148
00149     // The drop target's sub-item text is replaced by the dragged item's
00150     // main text
00151     if (lStyle == LVS_REPORT && m_iItemDrop != m_iItemDrag)
00152     {
00153       cstr = GetItemText(m_iItemDrag, 0);
00154       SetItemText(m_iItemDrop, 1, cstr);
00155     }
00156
00157     //the character string "**" is added to the end of the drop target's main text
00158     if (lStyle == LVS_LIST && m_iItemDrop != m_iItemDrag)
00159     {
00160       cstr = GetItemText(m_iItemDrop, 0);
00161       cstr += _T("**");
00162       SetItemText(m_iItemDrop, 0, cstr);
00163     }
00164
00165       // move the icon
00166     if (lStyle == LVS_ICON || lStyle == LVS_SMALLICON)
00167     {
00168       point -= m_ptHotSpot;  // the icon should be drawn exactly where the image is
00169       point += m_ptOrigin;
00170       SetItemPosition(m_iItemDrag, point);  // just move the dragged item
00171     }
00172
00173     ::ReleaseCapture();
00174   }
00175 }
00176
00177 void CMyListCtrl::OnLButtonUp(UINT nFlags, CPoint point)
00178 {
00179   OnButtonUp(point);
00180   CListCtrl::OnLButtonUp(nFlags, point);
00181 }
00182
00183 void CMyListCtrl::OnRButtonUp(UINT nFlags, CPoint point)
00184 {
00185   OnButtonUp(point);
00186   CListCtrl::OnRButtonUp(nFlags, point);
00187 }
00188
00189 void CMyListCtrl::OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT* /*pLResult*/)
00190 {
00191   LV_DISPINFO  *plvDispInfo = (LV_DISPINFO *)pnmhdr;
00192   LV_ITEM      *plvItem = &plvDispInfo->item;
00193
00194   if (plvItem->pszText != NULL)
00195     SetItemText(plvItem->iItem, plvItem->iSubItem, plvItem->pszText);
00196 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/simpvw.cpp Source File

  • general
  • viewex

simpvw.cpp

Go to the documentation of this file.
00001 // simpvw.cpp : implementation of the simple view classes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 #include "stdafx.h"
00015 #include "viewex.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CTextView
00024
00025 IMPLEMENT_DYNCREATE(CTextView, CView)
00026
00027 BEGIN_MESSAGE_MAP(CTextView, CView)
00028   //{{AFX_MSG_MAP(CTextView)
00029   ON_WM_MOUSEACTIVATE()
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CTextView construction/destruction
00035
00036 CTextView::CTextView()
00037 {
00038 }
00039
00040 CTextView::~CTextView()
00041 {
00042 }
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CTextView drawing
00046
00047 void CTextView::OnDraw(CDC* pDC)
00048 {
00049   CMainDoc* pDoc = GetDocument();
00050
00051   CRect rect;
00052   GetClientRect(rect);
00053   pDC->SetTextAlign(TA_BASELINE | TA_CENTER);
00054   pDC->SetTextColor(pDoc->m_colorData);
00055   pDC->SetBkMode(TRANSPARENT);
00056   // center in the window
00057   pDC->TextOut(rect.Width() / 2, rect.Height() / 2,
00058     pDoc->m_strData, pDoc->m_strData.GetLength());
00059 }
00060
00061
00062 int CTextView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
00063 {
00064   // side-step CView's implementation since we don't want to activate
00065   //  this view
00066   return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
00067 }
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CColorView
00071
00072 IMPLEMENT_DYNCREATE(CColorView, CView)
00073
00074 BEGIN_MESSAGE_MAP(CColorView, CView)
00075   //{{AFX_MSG_MAP(CColorView)
00076   ON_WM_MOUSEACTIVATE()
00077   //}}AFX_MSG_MAP
00078 END_MESSAGE_MAP()
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CColorView construction/destruction
00082
00083 CColorView::CColorView()
00084 {
00085 }
00086
00087 CColorView::~CColorView()
00088 {
00089 }
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // CColorView drawing
00093
00094 void CColorView::OnDraw(CDC* pDC)
00095 {
00096   CMainDoc* pDoc = GetDocument();
00097
00098   CRect rect;
00099   GetClientRect(rect);
00100
00101   // fill the view with the specified color
00102   CBrush br(pDoc->m_colorData);
00103   pDC->FillRect(rect, &br);
00104 }
00105
00106 int CColorView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
00107 {
00108   // side-step CView's implementation since we don't want to activate
00109   //  this view
00110   return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
00111 }
00112
00113 void CColorView::OnActivateView(BOOL, CView*, CView*)
00114 {
00115   ASSERT(FALSE);      // output only view - should never be active
00116 }
00117
00118
00119 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COnCmdMsg Member List

This is the complete list of members for COnCmdMsg, including all inherited members.
m_nCode | COnCmdMsg
m_nID | COnCmdMsg
m_pExtra | COnCmdMsg
m_pHandlerInfo | COnCmdMsg
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CXlistCtrl Member List

This is the complete list of members for CXlistCtrl, including all inherited members.
AboutBox() | CXlistCtrl | [protected]
AddItem(short nIndex, LPCTSTR lpstrText, LPFONTDISP lpFontDisp, LPPICTUREDISP lpPicDisp) | CXlistCtrl | [protected, virtual]
AddPicItem(short nIndex, LPPICTUREDISP pic) | CXlistCtrl | [protected]
AddTextFontItem(short nIndex, LPCTSTR lpstrText, LPFONTDISP font) | CXlistCtrl | [protected]
AddTextItem(short nIndex, LPCTSTR lpstrText) | CXlistCtrl | [protected]
Clear() | CXlistCtrl | [protected]
CXlistCtrl() | CXlistCtrl |
DECLARE_OLECREATE_EX(CXlistCtrl) DECLARE_OLETYPELIB(CXlistCtrl) DECLARE_PROPPAGEIDS(CXlistCtrl) DECLARE_OLECTLTYPE(CXlistCtrl) BOOL PreCreateWindow(CREATESTRUCT &cs) | CXlistCtrl | [protected]
dispidAddPicItem enum value | CXlistCtrl |
dispidAddTextFontItem enum value | CXlistCtrl |
dispidAddTextItem enum value | CXlistCtrl |
dispidClear enum value | CXlistCtrl |
dispidInvertFlag enum value | CXlistCtrl |
dispidItemBackColor enum value | CXlistCtrl |
dispidItemFont enum value | CXlistCtrl |
dispidItemForeColor enum value | CXlistCtrl |
dispidItemPicture enum value | CXlistCtrl |
dispidItemText enum value | CXlistCtrl |
dispidRemoveItem enum value | CXlistCtrl |
DoPropExchange(CPropExchange *pPX) | CXlistCtrl | [virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CXlistCtrl | [protected, virtual]
DrawItemPicture(CItemData *pItemData, LPRECT rect, CDC *pdc) | CXlistCtrl | [protected, virtual]
DrawItemText(CItemData *pItemData, LPRECT rect, CDC *pdc) | CXlistCtrl | [protected, virtual]
GetItemBackColor(short nIndex) | CXlistCtrl | [protected]
GetItemFont(short nIndex) | CXlistCtrl | [protected]
GetItemForeColor(short nIndex) | CXlistCtrl | [protected]
GetItemPicture(short nIndex) | CXlistCtrl | [protected]
GetItemPictureHeight(CItemData *pItemData) | CXlistCtrl | [protected, virtual]
GetItemText(short nIndex) | CXlistCtrl | [protected]
GetItemTextHeight(CItemData *pItemData) | CXlistCtrl | [protected, virtual]
IsSubclassedControl() | CXlistCtrl | [protected]
m_invertFlag | CXlistCtrl | [protected]
m_itemData | CXlistCtrl | [protected]
m_itemDefHeight | CXlistCtrl | [protected]
MeasureItem(LPMEASUREITEMSTRUCT lpMI) | CXlistCtrl | [protected, virtual]
OnAmbientPropertyChange(DISPID dispid) | CXlistCtrl | [protected, virtual]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CXlistCtrl | [virtual]
OnEraseBkgnd(CDC *pDC) | CXlistCtrl | [protected]
OnInvertFlagChanged() | CXlistCtrl | [protected]
OnOcmCommand(WPARAM wParam, LPARAM lParam) | CXlistCtrl | [protected]
OnOcmDrawItem(WPARAM wParam, LPARAM lParam) | CXlistCtrl | [protected]
OnOcmMeasureItem(WPARAM wParam, LPARAM lParam) | CXlistCtrl | [protected]
OnResetState() | CXlistCtrl | [virtual]
OnSetClientSite() | CXlistCtrl | [virtual]
PreTranslateMessage(MSG *pMsg) | CXlistCtrl | [virtual]
RemoveItem(short nIndex) | CXlistCtrl | [protected]
SelectItemBackColor(CItemData *pItemData, LPRECT rect, CDC *pdc) | CXlistCtrl | [protected, virtual]
SelectItemFont(CItemData *pItemData, CDC *pdc, CFontHolder &fontHolder) | CXlistCtrl | [protected, virtual]
SelectItemForeColor(CItemData *pItemData, CDC *pdc) | CXlistCtrl | [protected, virtual]
SetItemBackColor(short nIndex, OLE_COLOR newValue) | CXlistCtrl | [protected]
SetItemFont(short nIndex, LPFONTDISP newValue) | CXlistCtrl | [protected]
SetItemForeColor(short nIndex, OLE_COLOR newValue) | CXlistCtrl | [protected]
SetItemPicture(short nIndex, LPPICTUREDISP newValue) | CXlistCtrl | [protected]
SetItemText(short nIndex, LPCTSTR lpszNewValue) | CXlistCtrl | [protected]
UpdateDefHeight() | CXlistCtrl | [protected, virtual]
UpdateItems() | CXlistCtrl | [protected, virtual]
~CXlistCtrl() | CXlistCtrl | [protected]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summinfo.cpp Source File

  • vc2008fp
  • DrawClient

summinfo.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include <winnls.h>
00014
00015 #ifndef SHARED_HANDLERS
00016 #include "DrawClient.h"
00017 #endif
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 #include <objbase.h>
00025
00026 // the following header redefines
00027 // the DEFINE_GUID macro to actually allocate data
00028
00029 #include <initguid.h>
00030 #ifndef INITGUID
00031 #define INITGUID
00032 #endif
00033
00034 // the DEFINE_GUID macro in the following header now allocates data
00035 #include "summinfo.h"
00036
00037 const OLECHAR szSummInfo[] = OLESTR("\005SummaryInformation");
00038
00039 #if defined(_UNICODE)
00040 LPCSTR tcstocs(LPCTSTR lpctStr) {                       // typed char(WCHAR) to CHAR
00041   size_t numConv = 0;
00042   static CHAR strTemp[1024];
00043   wcstombs_s(&numConv, strTemp, 1024, lpctStr, 1024);
00044   return strTemp;
00045 }
00046 #else // !defined(_UNICODE)
00047 #define tcstocs(lpctStr)(LPCSTR)(lpctStr)
00048 #endif
00049
00050 CSummInfo::CSummInfo()
00051 {
00052   m_propSet.SetFormatVersion(0);
00053   DWORD dwOSVer;
00054   dwOSVer = (DWORD)MAKELONG(LOWORD(GetVersion()), 2);
00055   m_propSet.SetOSVersion(dwOSVer);
00056   m_propSet.SetClassID(FMTID_SummaryInformation);
00057   m_pSection = m_propSet.AddSection(FMTID_SummaryInformation);
00058   UINT cp = GetACP();
00059   m_pSection->Set(PID_CODEPAGE, (void*)&cp, VT_I2);
00060   SetTitle(_T(""));
00061   SetSubject(_T(""));
00062   SetAuthor(_T(""));
00063   SetKeywords(_T(""));
00064   SetComments(_T(""));
00065   SetTemplate(_T(""));
00066   SetLastAuthor(_T(""));
00067   m_pSection->Set(PIDSI_REVNUMBER, (void*)_T("0"), VT_LPSTR);
00068   FILETIME zeroTime = {0L, 0L};
00069   m_pSection->Set(PIDSI_EDITTIME, (void*)&zeroTime, VT_FILETIME);
00070   m_pSection->Set(PIDSI_LASTPRINTED, (void*)&zeroTime, VT_FILETIME);
00071   m_pSection->Set(PIDSI_LASTSAVE_DTM, (void*)&zeroTime, VT_FILETIME);
00072   m_pSection->Set(PIDSI_CREATE_DTM, (void*)&zeroTime, VT_FILETIME);
00073   SetNumPages(0);
00074   SetNumWords(0);
00075   SetNumChars(0);
00076   SetAppname(_T(""));
00077   SetSecurity(0);
00078 }
00079
00080 BOOL CSummInfo::SetTitle(LPCTSTR szTitle)
00081 {
00082   return m_pSection->Set(PIDSI_TITLE, (void*)tcstocs(szTitle), VT_LPSTR);
00083 }
00084
00085 CString CSummInfo::GetTitle()
00086 {
00087   return CString((LPCSTR)m_pSection->Get(PIDSI_TITLE));
00088 }
00089
00090 BOOL CSummInfo::SetSubject(LPCTSTR szSubject)
00091 {
00092   return m_pSection->Set(PIDSI_SUBJECT, (void*)tcstocs(szSubject), VT_LPSTR);
00093 }
00094
00095 CString CSummInfo::GetSubject()
00096 {
00097   return CString((LPCSTR)m_pSection->Get(PIDSI_SUBJECT));
00098 }
00099
00100 BOOL CSummInfo::SetAuthor(LPCTSTR szAuthor)
00101 {
00102   return m_pSection->Set(PIDSI_AUTHOR, (void*)tcstocs(szAuthor), VT_LPSTR);
00103 }
00104
00105 CString CSummInfo::GetAuthor()
00106 {
00107   return CString((LPCSTR)m_pSection->Get(PIDSI_AUTHOR));
00108 }
00109
00110 BOOL CSummInfo::SetKeywords(LPCTSTR szKeywords)
00111 {
00112   return m_pSection->Set(PIDSI_KEYWORDS, (void*)tcstocs(szKeywords), VT_LPSTR);
00113 }
00114
00115 CString CSummInfo::GetKeywords()
00116 {
00117   return CString((LPCSTR)m_pSection->Get(PIDSI_KEYWORDS));
00118 }
00119
00120 BOOL CSummInfo::SetComments(LPCTSTR szComments)
00121 {
00122   return m_pSection->Set(PIDSI_COMMENTS, (void*)tcstocs(szComments), VT_LPSTR);
00123 }
00124
00125 CString CSummInfo::GetComments()
00126 {
00127   return CString((LPCSTR)m_pSection->Get(PIDSI_COMMENTS));
00128 }
00129
00130 BOOL CSummInfo::SetTemplate(LPCTSTR szTemplate)
00131 {
00132   return m_pSection->Set(PIDSI_TEMPLATE, (void*)tcstocs(szTemplate), VT_LPSTR);
00133 }
00134
00135 CString CSummInfo::GetTemplate()
00136 {
00137   return CString((LPCSTR)m_pSection->Get(PIDSI_TEMPLATE));
00138 }
00139
00140 BOOL CSummInfo::SetLastAuthor(LPCTSTR szLastAuthor)
00141 {
00142   return m_pSection->Set(PIDSI_LASTAUTHOR, (void*)tcstocs(szLastAuthor), VT_LPSTR);
00143 }
00144
00145 CString CSummInfo::GetLastAuthor()
00146 {
00147   return CString((LPCSTR)m_pSection->Get(PIDSI_LASTAUTHOR));
00148 }
00149
00150 BOOL CSummInfo::IncrRevNum()
00151 {
00152   ULONG count;
00153   _stscanf_s((LPCTSTR)GetRevNum(), _T("%lu"), &count);
00154   count++;
00155   TCHAR buff[20];
00156   _stprintf_s(buff, 20, _T("%lu"), count);
00157   return m_pSection->Set(PIDSI_REVNUMBER, (void*)buff, VT_LPSTR);
00158 }
00159
00160 CString CSummInfo::GetRevNum()
00161 {
00162   return CString((LPCSTR)m_pSection->Get(PIDSI_REVNUMBER));
00163 }
00164
00165 void CSummInfo::StartEditTimeCount()
00166 {
00167   FILETIME now;
00168   CoFileTimeNow(&now);
00169   startEdit = *(__int64*)&now;
00170 }
00171
00172 BOOL CSummInfo::AddCountToEditTime()
00173 {
00174   FILETIME now;
00175   CoFileTimeNow(&now);
00176   __int64 currTime = *(__int64*)&now;
00177   __int64 thisSession = currTime - startEdit;
00178   __int64 lastTotal = *(__int64*)m_pSection->Get(PIDSI_EDITTIME);
00179   __int64 newTotal = lastTotal + thisSession;
00180   return m_pSection->Set(PIDSI_EDITTIME, (void*)&newTotal, VT_FILETIME);
00181 }
00182
00183 CString CSummInfo::GetEditTime()
00184 {
00185   FILETIME now;
00186   CoFileTimeNow(&now);
00187   __int64 currTime = *(__int64*)&now;
00188   __int64 thisSession = currTime - startEdit;
00189   __int64 lastTotal = *(__int64*)m_pSection->Get(PIDSI_EDITTIME);
00190   __int64 newTotal = lastTotal + thisSession;
00191   ULONG editMinutes = (ULONG)(newTotal/600000000);
00192
00193   TCHAR buff[20];
00194   _stprintf_s(buff, 20, _T("%lu min"), editMinutes);
00195   return CString(buff);
00196 }
00197
00198 BOOL CSummInfo::RecordPrintDate()
00199 {
00200   FILETIME printDate;
00201   CoFileTimeNow(&printDate);
00202   return m_pSection->Set(PIDSI_LASTPRINTED,
00203     (void*)&printDate, VT_FILETIME);
00204 }
00205
00206 CString CSummInfo::GetLastPrintDate()
00207 {
00208   FILETIME* pPrintDate = (FILETIME*)m_pSection->Get(PIDSI_LASTPRINTED);
00209   if ((pPrintDate == NULL) || ((pPrintDate->dwLowDateTime == 0L) && (pPrintDate->dwHighDateTime == 0L)))
00210     return CString(_T(""));
00211   else
00212   {
00213     COleDateTime tempDate = *pPrintDate;
00214     return tempDate.Format();
00215   }
00216 }
00217
00218 BOOL CSummInfo::RecordCreateDate()
00219 {
00220   FILETIME createDate;
00221   CoFileTimeNow(&createDate);
00222   return m_pSection->Set(PIDSI_CREATE_DTM, (void*)&createDate, VT_FILETIME);
00223 }
00224
00225 CString CSummInfo::GetCreateDate()
00226 {
00227   FILETIME* pCreateDate = (FILETIME*)m_pSection->Get(PIDSI_CREATE_DTM);
00228   if ((pCreateDate == NULL) || ((pCreateDate->dwLowDateTime == 0L) && (pCreateDate->dwHighDateTime == 0L)  ))
00229     return CString(_T(""));
00230   else
00231   {
00232     COleDateTime tempDate = *pCreateDate;
00233     return tempDate.Format();
00234   }
00235 }
00236
00237 BOOL CSummInfo::RecordSaveDate()
00238 {
00239   FILETIME saveDate;
00240   CoFileTimeNow(&saveDate);
00241   return m_pSection->Set(PIDSI_LASTSAVE_DTM, (void*)&saveDate, VT_FILETIME);
00242 }
00243
00244 CString CSummInfo::GetLastSaveDate()
00245 {
00246   FILETIME *pSaveDate = (FILETIME*)m_pSection->Get(PIDSI_LASTSAVE_DTM);
00247   if ((pSaveDate == NULL) || ((pSaveDate->dwLowDateTime == 0L) && (pSaveDate->dwHighDateTime == 0L)  ))
00248     return CString(_T(""));
00249   else
00250   {
00251     COleDateTime tempDate = *pSaveDate;
00252     return tempDate.Format();
00253   }
00254 }
00255
00256 BOOL CSummInfo::SetNumPages(ULONG nPages)
00257 {
00258   return m_pSection->Set(PIDSI_PAGECOUNT, (void*)&nPages, VT_I4);
00259 }
00260
00261 CString CSummInfo::GetNumPages()
00262 {
00263   TCHAR buff[20];
00264   ULONG* pNumPages = (ULONG*)m_pSection->Get(PIDSI_PAGECOUNT);
00265   if (pNumPages != NULL)
00266   {
00267     _stprintf_s(buff,20, _T("%lu"), *pNumPages);
00268     return CString(buff);
00269   }
00270   else
00271     return CString(_T(""));
00272 }
00273
00274 BOOL CSummInfo::SetNumWords(ULONG nWords)
00275 {
00276   return m_pSection->Set(PIDSI_WORDCOUNT, (void*)&nWords, VT_I4);
00277 }
00278
00279 CString CSummInfo::GetNumWords()
00280 {
00281   TCHAR buff[20];
00282   ULONG* pNumWords = (ULONG*)m_pSection->Get(PIDSI_WORDCOUNT);
00283   if (pNumWords != NULL)
00284   {
00285     _stprintf_s(buff, 20,_T("%lu"), *pNumWords);
00286     return CString(buff);
00287   }
00288   else
00289     return CString(_T(""));
00290 }
00291
00292 BOOL CSummInfo::SetNumChars(ULONG nChars)
00293 {
00294   return m_pSection->Set(PIDSI_CHARCOUNT, (void*)&nChars, VT_I4);
00295 }
00296
00297 CString CSummInfo::GetNumChars()
00298 {
00299   TCHAR buff[20];
00300   ULONG* pNumChars = (ULONG*)m_pSection->Get(PIDSI_CHARCOUNT);
00301   if (pNumChars != NULL)
00302   {
00303     _stprintf_s(buff, 20,_T("%lu"), *pNumChars);
00304     return CString(buff);
00305   }
00306   else
00307     return CString(_T(""));
00308 }
00309
00310 BOOL CSummInfo::SetAppname(LPCTSTR szAppname)
00311 {
00312   return m_pSection->Set(PIDSI_APPNAME, (void*)tcstocs(szAppname), VT_LPSTR);
00313 }
00314
00315 CString CSummInfo::GetAppname()
00316 {
00317   return CString((LPCSTR)m_pSection->Get(PIDSI_APPNAME));
00318 }
00319
00320 BOOL CSummInfo::SetSecurity(ULONG nLevel)
00321 {
00322   return m_pSection->Set(PID_SECURITY, (void*)&nLevel, VT_I4);
00323 }
00324
00325 CString CSummInfo::GetSecurity()
00326 {
00327   TCHAR buff[20];
00328   ULONG* pSecurity = (ULONG*)m_pSection->Get(PID_SECURITY);
00329   if (pSecurity != NULL)
00330   {
00331     _stprintf_s(buff, 20,_T("%lu"), *pSecurity);
00332     return CString(buff);
00333   }
00334   else
00335     return CString(_T(""));
00336 }
00337
00338 BOOL CSummInfo::WriteToStorage(LPSTORAGE lpRootStg)
00339 {
00340   if (lpRootStg != NULL)
00341   {
00342     LPSTREAM lpStream = NULL;
00343     if (FAILED(lpRootStg->CreateStream(szSummInfo, STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE, 0, 0, &lpStream)))
00344     {
00345       TRACE(_T("CreateStream failed\n"));
00346       return FALSE;
00347     }
00348     else
00349     {
00350       if (!m_propSet.WriteToStream(lpStream))
00351       {
00352         TRACE(_T("WriteToStream failed\n"));
00353         return FALSE;
00354       }
00355       lpRootStg->Commit(STGC_DEFAULT);
00356       lpStream->Release();
00357       return TRUE;
00358     }
00359   }
00360   return FALSE;
00361 }
00362
00363 BOOL CSummInfo::ReadFromStorage(LPSTORAGE lpRootStg)
00364 {
00365   if (lpRootStg != NULL)
00366   {
00367     LPSTREAM lpStream = NULL;
00368
00369     if (FAILED(lpRootStg->OpenStream(szSummInfo, NULL, STGM_SHARE_EXCLUSIVE|STGM_READ, 0, &lpStream)))
00370     {
00371       TRACE(_T("OpenStream failed\n"));
00372       return FALSE;
00373     }
00374     else
00375     {
00376       if (!m_propSet.ReadFromStream(lpStream))
00377       {
00378         TRACE(_T("ReadFromStream failed\n"));
00379         return FALSE;
00380       }
00381       m_pSection = m_propSet.GetSection(FMTID_SummaryInformation);
00382       lpStream->Release();
00383       return TRUE;
00384     }
00385   }
00386   return FALSE;
00387 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/resource.h Source File

  • controls
  • contain

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by CONTAIN.RC
00004 //
00005 #define IDR_MAINFRAME       128
00006 #define IDR_CONTRTYPE       129
00007 #define IDR_CONTRTYPE_CNTR_IP   6
00008 #define IDD_ABOUTBOX        100
00009 #define IDP_OLE_INIT_FAILED     100
00010 #define IDP_FAILED_TO_CREATE    102
00011 #define ID_CANCEL_EDIT_CNTR     32768
00012
00013 // Next default values for new objects
00014 //
00015 #ifdef APSTUDIO_INVOKED
00016 #ifndef APSTUDIO_READONLY_SYMBOLS
00017 #define _APS_3D_CONTROLS      1
00018 #define _APS_NEXT_RESOURCE_VALUE  130
00019 #define _APS_NEXT_CONTROL_VALUE   1000
00020 #define _APS_NEXT_SYMED_VALUE   101
00021 #define _APS_NEXT_COMMAND_VALUE   32771
00022 #endif
00023 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/resource.h Source File

  • general
  • docktool

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by docktool.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDC_EDITBAR_SEARCHBOX           101
00007 #define IDB_PALETTE                     106
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_TEXTTYPE                    129
00010 #define IDR_RESOURCEBAR                 131
00011 #define IDR_COLOR_RESOURCEBAR           131
00012 #define IDR_EDITBAR                     132
00013 #define IDR_EDITBARVERT                 132
00014 #define IDR_COLOR_EDITBARVERT           132
00015 #define IDR_COLOR_EDITBAR               132
00016 #define IDR_BROWSEBAR                   133
00017 #define IDR_COLOR_BROWSEBAR             133
00018 #define IDR_DEBUGBAR                    134
00019 #define IDR_COLOR_DEBUGBAR              134
00020 #define IDD_TOOLBAR                     135
00021 #define IDB_BITMAP1                     136
00022 #define IDR_EDITBARHORZ                 136
00023 #define IDR_MONO_EDITBARHORZ            136
00024 #define IDR_COLOR_MAINBAR               137
00025 #define IDR_TOOLBAR                     138
00026 #define IDR_MONO_DEBUGBAR               140
00027 #define IDR_COLOR_EDITBARHORZ           141
00028 #define IDR_MONO_EDITBARVERT            142
00029 #define IDR_MONO_EDITBAR                142
00030 #define IDR_MONO_MAINBAR                143
00031 #define IDR_MONO_RESOURCEBAR            144
00032 #define IDR_MONO_BROWSEBAR              147
00033 #define IDR_COLOR_PALETTEBAR            148
00034 #define IDR_MONO_PALETTEBAR             149
00035 #define IDC_MAIN                        1000
00036 #define IDC_DEBUG                       1001
00037 #define IDC_RESOURCE                    1002
00038 #define IDC_EDIT                        1003
00039 #define IDC_BROWSE                      1004
00040 #define IDC_PALETTE                     1005
00041 #define IDC_SHOW                        1006
00042 #define IDC_HIDE                        1007
00043 #define IDC_FOUR                        1011
00044 #define IDC_SIX                         1012
00045 #define IDC_COLOR                       1013
00046 #define IDC_TWO                         1014
00047 #define IDC_BW                          1015
00048 #define IDC_THREE                       1016
00049 #define ID_EDIT_BM_TOGGLE               32774
00050 #define ID_EDIT_BM_NEXT                 32775
00051 #define ID_EDIT_BM_PREV                 32776
00052 #define ID_EDIT_BM_CLEARALL             32777
00053 #define ID_EDIT_FINDINFILES             32778
00054 #define ID_EDIT_INDENT                  32779
00055 #define ID_EDIT_UNINDENT                32780
00056 #define ID_RESOURCE_NEWMENU             32781
00057 #define ID_RESOURCE_NEWCURSOR           32782
00058 #define ID_RESOURCE_NEWICON             32783
00059 #define ID_RESOURCE_NEWBITMAP           32784
00060 #define ID_RESOURCE_NEWSTRINGTABLE      32785
00061 #define ID_RESOURCE_NEWACCELERATORTABLE 32786
00062 #define ID_RESOURCE_NEWVERSION          32787
00063 #define ID_DEBUG_RESTART                32788
00064 #define ID_DEBUG_STOPDEBUGGING          32789
00065 #define ID_DEBUG_STEPINTO               32790
00066 #define ID_DEBUG_STEPOUT                32791
00067 #define ID_DEBUG_STEPOVER               32792
00068 #define ID_DEBUG_RUNTOCURSOR            32793
00069 #define ID_DEBUG_QUICKWATCH             32794
00070 #define ID_DEBUG_WATCH                  32795
00071 #define ID_DEBUG_LOCALS                 32796
00072 #define ID_DEBUG_REGISTERS              32797
00073 #define ID_DEBUG_MEMORY                 32798
00074 #define ID_DEBUG_CALLSTACK              32799
00075 #define ID_DEBUG_DISASSEMBLY            32800
00076 #define ID_BROWSE_GOTODEFINITION        32801
00077 #define ID_BROWSE_GOTOREFERENCE         32802
00078 #define ID_BROWSE_FILEOUTLINE           32803
00079 #define ID_BROWSE_CLASSGRAPH            32804
00080 #define ID_BROWSE_REVERSECLASSGRAPH     32805
00081 #define ID_TOOLS_TOOLBAR                32806
00082 #define ID_PALETTE_ERASE                32808
00083 #define ID_PALETTE_PEN                  32809
00084 #define ID_PALETTE_SELECT               32810
00085 #define ID_PALETTE_BRUSH                32811
00086 #define ID_PALETTE_AIRBRUSH             32813
00087 #define ID_PALETTE_FILL                 32814
00088 #define ID_PALETTE_LINE                 32815
00089 #define ID_PALETTE_EYEDROP              32816
00090 #define ID_PALETTE_ZOOM                 32817
00091 #define ID_PALETTE_RECTANGLE            32818
00092 #define ID_PALETTE_FRAME                32819
00093 #define ID_PALETTE_OVAL                 32820
00094 #define ID_RETURN                       32821
00095 #define ID_TOOLBARS_MAIN                32822
00096 #define ID_TOOLBARS_BROWSE              32823
00097 #define ID_TOOLBARS_DEBUG               32824
00098 #define ID_TOOLBARS_EDIT                32825
00099 #define ID_TOOLBARS_PALETTE             32826
00100 #define ID_TOOLBARS_RESOURCE            32827
00101 #define IDW_MAIN_BAR                    0xE800
00102 #define IDW_RESOURCE_BAR                0xE804
00103 #define IDW_DEBUG_BAR                   0xE805
00104 #define IDW_EDIT_BAR                    0xE806
00105 #define IDW_BROWSE_BAR                  0xE807
00106 #define IDW_PALETTE_BAR                 0xE808
00107
00108 // Next default values for new objects
00109 //
00110 #ifdef APSTUDIO_INVOKED
00111 #ifndef APSTUDIO_READONLY_SYMBOLS
00112 #define _APS_3D_CONTROLS                     1
00113 #define _APS_NEXT_RESOURCE_VALUE        139
00114 #define _APS_NEXT_COMMAND_VALUE         32829
00115 #define _APS_NEXT_CONTROL_VALUE         1016
00116 #define _APS_NEXT_SYMED_VALUE           108
00117 #endif
00118 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawView Member List

This is the complete list of members for CDrawView, including all inherited members.
CDrawObjFriend class | CDrawView | [friend]
CDrawView() | CDrawView | [protected]
CDrawView() | CDrawView | [protected]
ClientToDoc(CPoint &point) | CDrawView |
ClientToDoc(CRect &rect) | CDrawView |
ClientToDoc(CPoint &point) | CDrawView |
ClientToDoc(CRect &rect) | CDrawView |
CloneSelection() | CDrawView |
CloneSelection() | CDrawView |
Deselect(CDrawObj *pObj) | CDrawView |
Deselect(CDrawObj *pObj) | CDrawView |
DocToClient(CRect &rect) | CDrawView |
DocToClient(CPoint &point) | CDrawView |
DocToClient(CRect &rect) | CDrawView |
DocToClient(CPoint &point) | CDrawView |
DrawGrid(CDC *pDC) | CDrawView |
DrawGrid(CDC *pDC) | CDrawView |
GetColorFromColorButton(int nButtonID) | CDrawView | [private]
GetDocument() | CDrawView | [inline]
GetDocument() | CDrawView | [inline]
GetInitialPosition() | CDrawView |
GetInitialPosition() | CDrawView |
GetObjectInfo(COleDataObject *pDataObject, CSize *pSize, CSize *pOffset) | CDrawView | [protected]
GetObjectInfo(COleDataObject *pDataObject, CSize *pSize, CSize *pOffset) | CDrawView | [protected]
InvalObj(CDrawObj *pObj) | CDrawView |
InvalObj(CDrawObj *pObj) | CDrawView |
IsSelected(const CObject *pDocItem) const | CDrawView | [virtual]
IsSelected(const CObject *pDocItem) const | CDrawView | [virtual]
m_bActive | CDrawView |
m_bDragDataAcceptable | CDrawView | [protected]
m_bGrid | CDrawView |
m_cfDraw | CDrawView | [static]
m_cfObjectDescriptor | CDrawView | [static]
m_dragOffset | CDrawView | [protected]
m_dragPoint | CDrawView | [protected]
m_dragSize | CDrawView | [protected]
m_dropTarget | CDrawView | [protected]
m_gridColor | CDrawView |
m_prevDropEffect | CDrawView | [protected]
m_PreviewState | CDrawView | [protected]
m_selection | CDrawView |
OnActivateView(BOOL bActivate, CView *pActiveView, CView *pDeactiveView) | CDrawView | [virtual]
OnActivateView(BOOL bActivate, CView *pActiveView, CView *pDeactiveView) | CDrawView | [virtual]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [protected, virtual]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [protected, virtual]
OnCancelEdit() | CDrawView | [protected]
OnCancelEdit() | CDrawView | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CDrawView | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CDrawView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CDrawView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CDrawView | [protected]
OnDestroy() | CDrawView | [protected]
OnDestroy() | CDrawView | [protected]
OnDragEnter(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CDrawView | [virtual]
OnDragEnter(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CDrawView | [virtual]
OnDragLeave() | CDrawView | [virtual]
OnDragLeave() | CDrawView | [virtual]
OnDragOver(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CDrawView | [virtual]
OnDragOver(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CDrawView | [virtual]
OnDraw(CDC *pDC) | CDrawView | [virtual]
OnDraw(CDC *pDC) | CDrawView | [virtual]
OnDrawEllipse() | CDrawView | [protected]
OnDrawEllipse() | CDrawView | [protected]
OnDrawLine() | CDrawView | [protected]
OnDrawLine() | CDrawView | [protected]
OnDrawPolygon() | CDrawView | [protected]
OnDrawPolygon() | CDrawView | [protected]
OnDrawRect() | CDrawView | [protected]
OnDrawRect() | CDrawView | [protected]
OnDrawRoundRect() | CDrawView | [protected]
OnDrawRoundRect() | CDrawView | [protected]
OnDrawSelect() | CDrawView | [protected]
OnDrawSelect() | CDrawView | [protected]
OnDrop(COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point) | CDrawView | [virtual]
OnDrop(COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point) | CDrawView | [virtual]
OnEditClear() | CDrawView | [protected]
OnEditClear() | CDrawView | [protected]
OnEditCopy() | CDrawView | [protected]
OnEditCopy() | CDrawView | [protected]
OnEditCut() | CDrawView | [protected]
OnEditCut() | CDrawView | [protected]
OnEditPaste() | CDrawView | [protected]
OnEditPaste() | CDrawView | [protected]
OnEditProperties() | CDrawView | [protected]
OnEditSelectAll() | CDrawView | [protected]
OnEditSelectAll() | CDrawView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [protected, virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CDrawView | [protected]
OnEraseBkgnd(CDC *pDC) | CDrawView | [protected]
OnFilePrint() | CDrawView | [protected]
OnFilePrint() | CDrawView | [protected]
OnFilePrintPreview() | CDrawView | [protected]
OnInitialUpdate() | CDrawView | [protected, virtual]
OnInitialUpdate() | CDrawView | [protected, virtual]
OnInsertObject() | CDrawView | [protected]
OnInsertObject() | CDrawView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CDrawView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CDrawView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CDrawView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CDrawView | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CDrawView | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CDrawView | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CDrawView | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CDrawView | [protected]
OnObjectFillColor() | CDrawView | [protected]
OnObjectFillColor() | CDrawView | [protected]
OnObjectLineColor() | CDrawView | [protected]
OnObjectLineColor() | CDrawView | [protected]
OnObjectLineWeight(UINT nID) | CDrawView | [protected]
OnObjectMoveBack() | CDrawView | [protected]
OnObjectMoveBack() | CDrawView | [protected]
OnObjectMoveForward() | CDrawView | [protected]
OnObjectMoveForward() | CDrawView | [protected]
OnObjectMoveToBack() | CDrawView | [protected]
OnObjectMoveToBack() | CDrawView | [protected]
OnObjectMoveToFront() | CDrawView | [protected]
OnObjectMoveToFront() | CDrawView | [protected]
OnObjectNoFill() | CDrawView | [protected]
OnObjectNoLine() | CDrawView | [protected]
OnObjectProperties() | CDrawView | [protected]
OnObjectStyles() | CDrawView | [protected]
OnPrepareDC(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [virtual]
OnPrepareDC(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CDrawView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CDrawView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CDrawView | [virtual]
OnScrollBy(CSize sizeScroll, BOOL bDoScroll) | CDrawView | [virtual]
OnScrollBy(CSize sizeScroll, BOOL bDoScroll) | CDrawView | [virtual]
OnSetFocus(CWnd *pOldWnd) | CDrawView | [protected]
OnSetFocus(CWnd *pOldWnd) | CDrawView | [protected]
OnSize(UINT nType, int cx, int cy) | CDrawView | [protected]
OnSize(UINT nType, int cx, int cy) | CDrawView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CDrawView | [virtual]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CDrawView | [virtual]
OnUpdateAnySelect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateAnySelect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawEllipse(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawEllipse(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawLine(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawLine(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawPolygon(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawPolygon(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawRect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawRect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawRoundRect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawRoundRect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawSelect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateDrawSelect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditCopy(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditCopy(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditCut(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditCut(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditPaste(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditPaste(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditProperties(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditSelectAll(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateEditSelectAll(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateObjectFillColor(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateObjectLineColor(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateObjectLineWeight(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateObjectNoFill(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateObjectNoLine(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateObjectProperties(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateObjectStyles(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateSelection(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateSingleSelect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateSingleSelect(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateViewGrid(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateViewGrid(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateViewShowObjects(CCmdUI *pCmdUI) | CDrawView | [protected]
OnUpdateViewShowObjects(CCmdUI *pCmdUI) | CDrawView | [protected]
OnViewGrid() | CDrawView | [protected]
OnViewGrid() | CDrawView | [protected]
OnViewShowObjects() | CDrawView | [protected]
OnViewShowObjects() | CDrawView | [protected]
PasteEmbedded(COleDataObject &dataObject, CPoint point) | CDrawView |
PasteEmbedded(COleDataObject &dataObject, CPoint point) | CDrawView |
PasteNative(COleDataObject &dataObject) | CDrawView |
PasteNative(COleDataObject &dataObject) | CDrawView |
PreCreateWindow(CREATESTRUCT &cs) | CDrawView | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CDrawView | [virtual]
PreviewFillColor(COLORREF color) | CDrawView |
PreviewLineColor(COLORREF color) | CDrawView |
PreviewLineWeight(int nWeight) | CDrawView |
PreviewStyle(COLORREF clrFill, COLORREF clrLine) | CDrawView |
Remove(CDrawObj *pObj) | CDrawView |
Remove(CDrawObj *pObj) | CDrawView |
ResetPreviewState() | CDrawView |
RestorePreviewState(BOOL bReset=TRUE) | CDrawView |
Select(CDrawObj *pObj, BOOL bAdd=FALSE) | CDrawView |
Select(CDrawObj *pObj, BOOL bAdd=FALSE) | CDrawView |
SelectWithinRect(CRect rect, BOOL bAdd=FALSE) | CDrawView |
SelectWithinRect(CRect rect, BOOL bAdd=FALSE) | CDrawView |
SetPageSize(CSize size) | CDrawView |
SetPageSize(CSize size) | CDrawView |
StorePreviewState() | CDrawView |
UpdateActiveItem() | CDrawView |
UpdateActiveItem() | CDrawView |
XPreviewState typedef | CDrawView | [protected]
~CDrawView() | CDrawView | [virtual]
~CDrawView() | CDrawView | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/childfrm.h Source File

  • ole
  • autoclik

childfrm.h

Go to the documentation of this file.
00001 // ChildFrm.h : interface of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CChildFrame : public CMDIChildWnd
00014 {
00015   DECLARE_DYNCREATE(CChildFrame)
00016 public:
00017   CChildFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CChildFrame)
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CChildFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 // Generated message map functions
00040 protected:
00041   //{{AFX_MSG(CChildFrame)
00042     // NOTE - the ClassWizard will add and remove member functions here.
00043     //    DO NOT EDIT what you see in these blocks of generated code!
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/diblook.cpp Source File

  • general
  • diblook

diblook.cpp

Go to the documentation of this file.
00001 // diblook.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "diblook.h"
00014
00015 #include "mainfrm.h"
00016 #include "dibdoc.h"
00017 #include "dibview.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDibLookApp
00026
00027 BEGIN_MESSAGE_MAP(CDibLookApp, CWinApp)
00028   //{{AFX_MSG_MAP(CDibLookApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   //}}AFX_MSG_MAP
00031   // Standard file based document commands
00032   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00033   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00034   // Standard print setup command
00035   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CDibLookApp construction
00040 // Place all significant initialization in InitInstance
00041
00042 CDibLookApp::CDibLookApp()
00043 {
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CDibLookApp object
00048
00049 CDibLookApp NEAR theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CDibLookApp initialization
00053
00054 BOOL CDibLookApp::InitInstance()
00055 {
00056   // Standard initialization
00057   //  (if you are not using these features and wish to reduce the size
00058   // of your final executable, you should remove the following initialization
00059
00060   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00061
00062   // Register document templates which serve as connection between
00063   //  documents and views.  Views are contained in the specified view
00064
00065   AddDocTemplate(new CMultiDocTemplate(IDR_DIBTYPE,
00066       RUNTIME_CLASS(CDibDoc),
00067       RUNTIME_CLASS(CMDIChildWnd),        // standard MDI child frame
00068       RUNTIME_CLASS(CDibView)));
00069
00070   // create main MDI Frame window
00071   CMainFrame* pMainFrame = new CMainFrame;
00072   if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
00073     delete pMainFrame;
00074     return FALSE;
00075   }
00076   pMainFrame->ShowWindow(m_nCmdShow);
00077   pMainFrame->UpdateWindow();
00078   m_pMainWnd = pMainFrame;
00079
00080   // enable file manager drag/drop and DDE Execute open
00081   m_pMainWnd->DragAcceptFiles();
00082
00083   EnableShellOpen();
00084   RegisterShellFileTypes(TRUE);
00085
00086   // Parse command line for standard shell commands, DDE, file open
00087   CCommandLineInfo cmdInfo;
00088   ParseCommandLine(cmdInfo);
00089
00090   // Dispatch commands specified on the command line
00091   if (!ProcessShellCommand(cmdInfo))
00092     return FALSE;
00093
00094   return TRUE;
00095 }
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CAboutDlg dialog used for App About
00099
00100 class CAboutDlg : public CDialog
00101 {
00102 public:
00103   CAboutDlg() : CDialog(CAboutDlg::IDD)
00104     {
00105       //{{AFX_DATA_INIT(CAboutDlg)
00106       //}}AFX_DATA_INIT
00107     }
00108
00109 // Dialog Data
00110   //{{AFX_DATA(CAboutDlg)
00111     enum { IDD = IDD_ABOUTBOX };
00112   //}}AFX_DATA
00113
00114 // Implementation
00115 protected:
00116   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00117   //{{AFX_MSG(CAboutDlg)
00118     // No message handlers
00119   //}}AFX_MSG
00120   DECLARE_MESSAGE_MAP()
00121 };
00122
00123 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00124 {
00125   CDialog::DoDataExchange(pDX);
00126   //{{AFX_DATA_MAP(CAboutDlg)
00127   //}}AFX_DATA_MAP
00128 }
00129
00130 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00131   //{{AFX_MSG_MAP(CAboutDlg)
00132     // No message handlers
00133   //}}AFX_MSG_MAP
00134 END_MESSAGE_MAP()
00135
00136 // App command to run the dialog
00137 void CDibLookApp::OnAppAbout()
00138 {
00139   CAboutDlg aboutDlg;
00140   aboutDlg.DoModal();
00141 }
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CDibLookApp commands
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbtree.h Source File

  • ole
  • oleview
  • iviewers

tlbtree.h

Go to the documentation of this file.
00001 // tlbtree.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef __TLBTREE_H__
00014 #define __TLBTREE_H__
00015
00016 #include "tree.h"
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CTypeLibTreeView view
00020 #define ID_TREEVIEW 42
00021 class CTypeLibTreeView : public CView
00022 {
00023 friend class CTypeLibWnd ;
00024 public:
00025   CTypeLibTreeView();           // protected constructor used by dynamic creation
00026   virtual ~CTypeLibTreeView();
00027   DECLARE_DYNCREATE(CTypeLibTreeView)
00028
00029 // Attributes
00030 public:
00031   CTreeCtrl       m_tree ;
00032
00033   ITypeLib*       m_ptlb ;
00034
00035   enum {IMGID_TYPELIB = 0,
00036       IMGID_TYPEINFO_C,
00037       IMGID_TYPEINFO_O };
00038   CImageList      m_images ;
00039   HTREEITEM       m_hTypeInfos ;
00040
00041 // Operations
00042 public:
00043   void DeleteTreeItems( HTREEITEM htree ) ;
00044
00045 // Overrides
00046   // ClassWizard generated virtual function overrides
00047   //{{AFX_VIRTUAL(CTypeLibTreeView)
00048   public:
00049   virtual void OnInitialUpdate();
00050   protected:
00051   virtual void OnDraw(CDC* pDC);
00052   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00053   //}}AFX_VIRTUAL
00054
00055 // Implementation
00056 protected:
00057 #ifdef _DEBUG
00058   virtual void AssertValid() const;
00059   virtual void Dump(CDumpContext& dc) const;
00060 #endif
00061
00062   // Generated message map functions
00063 protected:
00064   //{{AFX_MSG(CTypeLibTreeView)
00065   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00066   afx_msg void OnDestroy();
00067   afx_msg void OnSize(UINT nType, int cx, int cy);
00068   //}}AFX_MSG
00069   afx_msg void OnTreeSelchanged(NMHDR* pNMHDR, LRESULT* pResult) ;
00070   afx_msg void OnTreeItemExpanding(NMHDR* pNMHDR, LRESULT* pResult) ;
00071   afx_msg void OnTreeItemExpanded(NMHDR* pNMHDR, LRESULT* pResult) ;
00072   afx_msg void OnTreeItemReturn(NMHDR* pNMHDR, LRESULT* pResult) ;
00073   afx_msg void OnTreeDeleteItem(NMHDR* pNMHDR, LRESULT* pResult) ;
00074   DECLARE_MESSAGE_MAP()
00075 };
00076 #endif // __TLBTREE_H__
00077
00078 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/VarUtils.H Source File

  • ole
  • TstCon

VarUtils.H

Go to the documentation of this file.
00001 // File: VarUtils.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 const int VTI_EMPTY = 0;
00011 const int VTI_BOOL = 1;
00012 const int VTI_UI1 = 2;
00013 const int VTI_UI2 = 3;
00014 const int VTI_UI4 = 4;
00015 const int VTI_UI8 = 5;
00016 const int VTI_I1 = 6;
00017 const int VTI_I2 = 7;
00018 const int VTI_I4 = 8;
00019 const int VTI_I8 = 9;
00020 const int VTI_R4 = 10;
00021 const int VTI_R8 = 11;
00022 const int VTI_BSTR = 12;
00023 const int VTI_CY = 13;
00024 const int VTI_DATE = 14;
00025 const int VTI_ERROR = 15;
00026 const int VTI_COLOR = 16;
00027 const int VTI_FONT = 17;
00028 const int VTI_UNKNOWN = 18;
00029 const int NUM_VARTYPES = 19;
00030
00031 const VARIANT_BOOL VAR_TRUE = ~VARIANT_FALSE;
00032 const VARIANT_BOOL VAR_FALSE = VARIANT_FALSE;
00033
00034 LPCTSTR InvokeKindToString( INVOKEKIND invokekind );
00035 LPCTSTR VTIToString( int iType );
00036 VARTYPE VTIToVT( int iType );
00037 LPCTSTR VTToString( VARTYPE vt );
00038 int VTToVTI( VARTYPE vt );
00039
00040 CString VariantToString( const VARIANT& var );
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSSE2Unsigned16Saturated Member List

This is the complete list of members for CSSE2Unsigned16Saturated, including all inherited members.
AndNot(const CSSE2Unsigned16Saturated &m) | CSSE2Unsigned16Saturated | [inline]
Clear() | CSSE2Unsigned16Saturated | [inline]
CSSE2Unsigned16Saturated() | CSSE2Unsigned16Saturated | [inline]
CSSE2Unsigned16Saturated(__m128i m128i) | CSSE2Unsigned16Saturated | [inline]
CSSE2Unsigned16Saturated(ULONGLONG qw) | CSSE2Unsigned16Saturated | [inline]
Fill(const ULONGLONG &qw) | CSSE2Unsigned16Saturated | [inline]
Load(void *pAddr) | CSSE2Unsigned16Saturated | [inline]
LoadU(void *pAddr) | CSSE2Unsigned16Saturated | [inline]
m_m128i | CSSE2Unsigned16Saturated |
operator __m128i() const | CSSE2Unsigned16Saturated | [inline]
operator ULONGLONG() const | CSSE2Unsigned16Saturated | [inline]
operator&=(const CSSE2Unsigned16Saturated &m) | CSSE2Unsigned16Saturated | [inline]
operator+=(const CSSE2Unsigned16Saturated &m) | CSSE2Unsigned16Saturated | [inline]
operator-=(const CSSE2Unsigned16Saturated &m) | CSSE2Unsigned16Saturated | [inline]
operator<<=(int nBits) | CSSE2Unsigned16Saturated | [inline]
operator=(const CSSE2Unsigned16Saturated &m) | CSSE2Unsigned16Saturated | [inline]
operator=(const ULONGLONG &qw) | CSSE2Unsigned16Saturated | [inline]
operator>>=(int nBits) | CSSE2Unsigned16Saturated | [inline]
operator|=(const CSSE2Unsigned16Saturated &m) | CSSE2Unsigned16Saturated | [inline]
PackBytes() const | CSSE2Unsigned16Saturated | [inline]
PackBytes(void *pAddr, const CSSE2Unsigned16Saturated &mUpper) const | CSSE2Unsigned16Saturated | [inline]
PackBytesU(void *pAddr, const CSSE2Unsigned16Saturated &mUpper) const | CSSE2Unsigned16Saturated | [inline]
Store(void *pAddr) | CSSE2Unsigned16Saturated | [inline]
StoreU(void *pAddr) | CSSE2Unsigned16Saturated | [inline]
UnpackBytes(CSSE2Unsigned16Saturated &mmLeft) | CSSE2Unsigned16Saturated | [inline]
UnpackBytesHi(ULONGLONG qw) | CSSE2Unsigned16Saturated | [inline]
UnpackBytesLo(const ULONGLONG &qw) | CSSE2Unsigned16Saturated | [inline]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAutoClickView Member List

This is the complete list of members for CAutoClickView, including all inherited members.
CAutoClickView() | CAutoClickView | [protected]
CAutoClickView() | CAutoClickView | [protected]
GetDocument() | CAutoClickView | [inline]
GetDocument() | CAutoClickView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CAutoClickView | [protected, virtual]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CAutoClickView | [protected, virtual]
OnDraw(CDC *pDC) | CAutoClickView | [virtual]
OnDraw(CDC *pDC) | CAutoClickView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CAutoClickView | [protected, virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CAutoClickView | [protected, virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CAutoClickView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CAutoClickView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CAutoClickView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CAutoClickView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CAutoClickView | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CAutoClickView | [virtual]
~CAutoClickView() | CAutoClickView | [virtual]
~CAutoClickView() | CAutoClickView | [virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CButtonDialog Member List

This is the complete list of members for CButtonDialog, including all inherited members.
AddButton(CString &strButton) | CButtonDialog | [inline]
AddButton(CString &strButton) | CButtonDialog | [inline]
AddButtons(LPCTSTR lpszButton) | CButtonDialog |
AddButtons(LPCTSTR lpszButton) | CButtonDialog |
CButtonDialog(LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL) | CButtonDialog |
CButtonDialog(LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL) | CButtonDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
DisplayMessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, int nDef=0, int nCancel=-1, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL) | CButtonDialog | [static]
DisplayMessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons, WORD wStyle, int nDef=0, int nCancel=-1, DWORD *pHelpIDs=NULL, CWnd *pParentWnd=NULL) | CButtonDialog | [static]
DoModal() | CButtonDialog | [virtual]
DoModal() | CButtonDialog | [virtual]
FillInHeader(LPDLGTEMPLATE lpDlgTmp) | CButtonDialog |
FillInHeader(LPDLGTEMPLATE lpDlgTmp) | CButtonDialog |
GetBaseUnits() | CButtonDialog | [protected]
GetBaseUnits() | CButtonDialog | [protected]
GetHelpIDs() | CButtonDialog | [inline, protected, virtual]
GetHelpIDs() | CButtonDialog | [inline, protected, virtual]
GetIconID(WORD wFlags) | CButtonDialog | [protected]
GetIconID(WORD wFlags) | CButtonDialog | [protected]
m_font | CButtonDialog |
m_hDlgTmp | CButtonDialog | [protected]
m_nBaseID | CButtonDialog | [protected]
m_nCancel | CButtonDialog | [protected]
m_nDefButton | CButtonDialog | [protected]
m_pButtons | CButtonDialog | [protected]
m_pHelpIDs | CButtonDialog | [protected]
m_staticIcon | CButtonDialog | [protected]
m_staticText | CButtonDialog | [protected]
m_strArray | CButtonDialog | [protected]
m_strCaption | CButtonDialog | [protected]
m_strText | CButtonDialog | [protected]
m_wStyle | CButtonDialog | [protected]
OnCommand(WPARAM wParam, LPARAM lParam) | CButtonDialog | [virtual]
OnCommand(WPARAM wParam, LPARAM lParam) | CButtonDialog | [virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CButtonDialog | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CButtonDialog | [protected]
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnInitDialog() | CButtonDialog | [protected, virtual]
OnInitDialog() | CButtonDialog | [protected, virtual]
PositionControls() | CButtonDialog | [protected]
PositionControls() | CButtonDialog | [protected]
SetCancel(int nCancel) | CButtonDialog | [inline]
SetCancel(int nCancel) | CButtonDialog | [inline]
SetDefault(int nDef) | CButtonDialog | [inline]
SetDefault(int nDef) | CButtonDialog | [inline]
~CButtonDialog() | CButtonDialog |
~CButtonDialog() | CButtonDialog |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneView.h Source File

  • vc2008fp
  • TasksPane

TasksPaneView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "TaskPane.h"
00014
00015 class CTasksPaneView : public CFormView
00016 {
00017 protected: // create from serialization only
00018   CTasksPaneView();
00019   DECLARE_DYNCREATE(CTasksPaneView)
00020
00021 public:
00022   enum { IDD = IDD_TASKSPANE_FORM };
00023   CMFCColorButton m_ColorTaskTextHot;
00024   CMFCColorButton m_ColorTaskText;
00025   CMFCColorButton m_ColorGroupTextHot;
00026   CMFCColorButton m_ColorGroupText;
00027
00028   CSpinButtonCtrl m_VMargin;
00029   CSpinButtonCtrl m_HMargin;
00030   CSpinButtonCtrl m_GroupSpacing;
00031   CSpinButtonCtrl m_TaskSpacing;
00032   CSpinButtonCtrl m_CaptionHeight;
00033   CSpinButtonCtrl m_TaskOffset;
00034   CSpinButtonCtrl m_IconOffset;
00035
00036   int   m_nVisualManager;
00037
00038   BOOL  m_bWrapTasks;
00039   BOOL  m_bWrapLabels;
00040   BOOL  m_bNavToolbar;
00041   BOOL  m_bMenuButtons;
00042   BOOL  m_bHicolorImages;
00043   BOOL  m_bCollapseGroups;
00044   BOOL  m_bCustomizeMargins;
00045   BOOL  m_bScrollButtons;
00046   BOOL  m_bAnimation;
00047   BOOL  m_bCaptionIcon;
00048
00049   int   m_nVMargin;
00050   int   m_nHMargin;
00051   int   m_nGroupSpacing;
00052   int   m_nTaskSpacing;
00053   int   m_nCaptionHeight;
00054   int   m_nTaskOffset;
00055   int   m_nIconOffset;
00056
00057 // Attributes
00058 public:
00059   CTasksPaneDoc* GetDocument();
00060   CTaskPane* GetTasksPane();
00061
00062 // Operations
00063 public:
00064
00065 // Overrides
00066   public:
00067   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00068   protected:
00069   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00070   virtual void OnInitialUpdate(); // called first time after construct
00071   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00072   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00073   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00074   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00075
00076 // Implementation
00077 public:
00078   virtual ~CTasksPaneView();
00079 #ifdef _DEBUG
00080   virtual void AssertValid() const;
00081   virtual void Dump(CDumpContext& dc) const;
00082 #endif
00083
00084 protected:
00085   afx_msg void OnVisualManager();
00086   afx_msg void OnWraptasks();
00087   afx_msg void OnWraplabels();
00088   afx_msg void OnNavtoolbar();
00089   afx_msg void OnHistbuttons();
00090   afx_msg void OnHicolorimages();
00091   afx_msg void OnDestroy();
00092   afx_msg void OnScrollbuttons();
00093   afx_msg void OnAnimation();
00094   afx_msg void OnCollapsegroups();
00095   afx_msg void OnMargins();
00096   afx_msg void OnColorGrouptext();
00097   afx_msg void OnColorGrouptexthot();
00098   afx_msg void OnColorTasktext();
00099   afx_msg void OnColorTasktexthot();
00100   afx_msg void OnChangeMargins();
00101   afx_msg void OnCaptionicon();
00102   afx_msg void OnContextMenu(CWnd*, CPoint point);
00103   afx_msg void OnFilePrintPreview();
00104
00105   DECLARE_MESSAGE_MAP()
00106 };
00107
00108 #ifndef _DEBUG  // debug version in TasksPaneView.cpp
00109 inline CTasksPaneDoc* CTasksPaneView::GetDocument()
00110    { return (CTasksPaneDoc*)m_pDocument; }
00111 #endif
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/strlstvw.h Source File

  • advanced
  • collect

strlstvw.h

Go to the documentation of this file.
00001 // strlstvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CStringListView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CStringListView : public CFormView
00020 {
00021 public:
00022   CStringListView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CStringListView)
00024
00025 // Attributes
00026 public:
00027   CCollectDoc* GetDocument();
00028
00029 // Overrides
00030 public:
00031   void OnInitialUpdate();
00032
00033 // Form Data
00034 public:
00035   //{{AFX_DATA(CStringListView)
00036   enum { IDD = IDD_STRING_LIST };
00037   CListBox    m_ctlList;
00038   CString m_strElement;
00039   //}}AFX_DATA
00040
00041 // Attributes
00042 public:
00043
00044 // Operations
00045 public:
00046
00047 // Overrides
00048   // ClassWizard generate virtual function overrides
00049   //{{AFX_VIRTUAL(CStringListView)
00050   protected:
00051   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052   //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 protected:
00056   BOOL FindString(int& nSel, POSITION& pos);
00057
00058   virtual ~CStringListView();
00059 #ifdef _DEBUG
00060   virtual void AssertValid() const;
00061   virtual void Dump(CDumpContext& dc) const;
00062 #endif
00063
00064   // Generated message map functions
00065   //{{AFX_MSG(CStringListView)
00066   afx_msg void OnAdd();
00067   afx_msg void OnRemove();
00068   afx_msg void OnRemoveAll();
00069   afx_msg void OnUpdateElement();
00070   afx_msg void OnSelChangeList();
00071   afx_msg void OnInsertBefore();
00072   //}}AFX_MSG
00073   DECLARE_MESSAGE_MAP()
00074 };
00075
00076 #ifndef _DEBUG
00077 inline CCollectDoc* CStringListView::GetDocument()
00078    { return (CCollectDoc*)m_pDocument; }
00079 #endif
00080
00081 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CContainerItem Member List

This is the complete list of members for CContainerItem, including all inherited members.
CContainerItem(CContainerDoc *pContainer=NULL) | CContainerItem |
GetActiveView() | CContainerItem | [inline]
GetDocument() | CContainerItem | [inline]
InvalidateItem() | CContainerItem |
m_rect | CContainerItem |
OnActivate() | CContainerItem | [protected, virtual]
OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam) | CContainerItem | [virtual]
OnChangeItemPosition(const CRect &rectPos) | CContainerItem | [protected, virtual]
OnDeactivateUI(BOOL bUndoable) | CContainerItem | [protected, virtual]
OnGetItemPosition(CRect &rPosition) | CContainerItem | [protected, virtual]
Serialize(CArchive &ar) | CContainerItem | [virtual]
UpdateFromServerExtent() | CContainerItem |
~CContainerItem() | CContainerItem |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StdAfx.cpp Source File

  • vc2008fp
  • StateCollection

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  StateCollection.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/stdafx.cpp Source File

  • general
  • dynamenu

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListPopupWnd.cpp Source File

  • vc2008fp
  • OutlookDemo

FolderListPopupWnd.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "FolderListPopupWnd.h"
00013 #include "MainFrm.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 const UINT idFoldersTree = 1;
00022 const UINT idPinBtn = 2;
00023 const int nHorzMargin = 2;
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CFolderListPopupWnd
00027
00028 CString CFolderListPopupWnd::m_strClassName;
00029
00030 CFolderListPopupWnd::CFolderListPopupWnd(const CObList& lstWorkspaces, CImageList& images, CWorkspaceObj* pSelWorkSpace) : m_wndFolders(lstWorkspaces, images), m_pSelWorkSpace(pSelWorkSpace), m_bNotify(FALSE)
00031 {
00032 }
00033
00034 CFolderListPopupWnd::~CFolderListPopupWnd()
00035 {
00036 }
00037
00038 BEGIN_MESSAGE_MAP(CFolderListPopupWnd, CWnd)
00039   ON_WM_SIZE()
00040   ON_WM_PAINT()
00041   ON_WM_ERASEBKGND()
00042   ON_WM_CREATE()
00043   ON_WM_CANCELMODE()
00044   ON_WM_NCDESTROY()
00045   ON_WM_ACTIVATE()
00046   ON_WM_ACTIVATEAPP()
00047   ON_NOTIFY(TVN_SELCHANGED, idFoldersTree, OnSelectTree)
00048   ON_COMMAND(idPinBtn, OnKeepVisible)
00049 END_MESSAGE_MAP()
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CFolderListPopupWnd message handlers
00053
00054 BOOL CFolderListPopupWnd::Create(const RECT& rect)
00055 {
00056   if (m_strClassName.IsEmpty())
00057   {
00058     m_strClassName = ::AfxRegisterWndClass(CS_SAVEBITS, ::LoadCursor(NULL, IDC_ARROW),
00059       (HBRUSH)(COLOR_BTNFACE + 1), NULL);
00060   }
00061
00062   return CWnd::CreateEx(WS_EX_TOPMOST | WS_EX_DLGMODALFRAME, m_strClassName, _T(""), WS_POPUP | WS_VISIBLE | WS_BORDER, rect, AfxGetMainWnd(), NULL);
00063 }
00064
00065 void CFolderListPopupWnd::OnSize(UINT nType, int cx, int cy)
00066 {
00067   CWnd::OnSize(nType, cx, cy);
00068
00069   CRect rectBtn;
00070   m_btnPin.GetClientRect(rectBtn);
00071
00072   m_rectCaption = CRect(0, 0, cx, rectBtn.Height() + 2);
00073
00074   m_btnPin.SetWindowPos(NULL, cx - rectBtn.Width() - nHorzMargin, (m_rectCaption.Height() - rectBtn.Height()) / 2, -1, -1, SWP_NOSIZE | SWP_NOZORDER);
00075   m_wndFolders.MoveWindow(0, m_rectCaption.bottom, cx, cy - m_rectCaption.Height());
00076 }
00077
00078 void CFolderListPopupWnd::OnPaint()
00079 {
00080   CPaintDC dc(this); // device context for painting
00081
00082   dc.FillRect(m_rectCaption, &afxGlobalData.brBarFace);
00083
00084   int nOldBkMode = dc.SetBkMode(TRANSPARENT);
00085   COLORREF clrOldText = dc.SetTextColor(afxGlobalData.clrBarText);
00086   CFont* pOldFont = (CFont*) dc.SelectObject(&afxGlobalData.fontRegular);
00087
00088   CRect rectText = m_rectCaption;
00089   rectText.left += 2 * nHorzMargin;
00090   rectText.right -= 2 * nHorzMargin + rectText.Height();
00091
00092   dc.DrawText(m_strCaption, rectText, DT_END_ELLIPSIS | DT_SINGLELINE | DT_VCENTER);
00093
00094   dc.SelectObject(pOldFont);
00095   dc.SetTextColor(clrOldText);
00096   dc.SetBkMode(nOldBkMode);
00097 }
00098
00099 BOOL CFolderListPopupWnd::OnEraseBkgnd(CDC* /*pDC*/)
00100 {
00101   return TRUE;
00102 }
00103
00104 BOOL CFolderListPopupWnd::PreTranslateMessage(MSG* pMsg)
00105 {
00106   switch (pMsg->message)
00107   {
00108   case WM_KEYDOWN:
00109     if (pMsg->wParam == VK_ESCAPE)
00110     {
00111       CloseMe();
00112       return TRUE;
00113     }
00114     break;
00115   }
00116
00117   return CWnd::PreTranslateMessage(pMsg);
00118 }
00119
00120 int CFolderListPopupWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
00121 {
00122   if (CWnd::OnCreate(lpCreateStruct) == -1)
00123     return -1;
00124
00125   CRect rect;
00126   rect.SetRectEmpty();
00127
00128   // Create folders tree:
00129   m_wndFolders.Create(0, rect, this, idFoldersTree);
00130
00131   m_wndFolders.SelectWorkspace(m_pSelWorkSpace);
00132
00133   m_wndFolders.SetFocus();
00134
00135   // Create "Pin" button:
00136   m_btnPin.Create(_T(""), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rect, this, idPinBtn);
00137   m_btnPin.m_bDrawFocus = FALSE;
00138   m_btnPin.m_nFlatStyle = CMFCButton::BUTTONSTYLE_FLAT;
00139   m_btnPin.SetImage(IDB_PIN);
00140   m_btnPin.SizeToContent();
00141
00142   BOOL bValidString;
00143   bValidString = m_strCaption.LoadString(IDS_FOLDER_POPUP_CAPTION);
00144
00145   m_bNotify = TRUE;
00146
00147   return 0;
00148 }
00149
00150 void CFolderListPopupWnd::OnCancelMode()
00151 {
00152   CWnd::OnCancelMode();
00153   CloseMe();
00154 }
00155
00156 void CFolderListPopupWnd::OnNcDestroy()
00157 {
00158   CWnd::OnNcDestroy();
00159   delete this;
00160 }
00161
00162 void CFolderListPopupWnd::OnActivateApp(BOOL bActive, DWORD dwThreadID)
00163 {
00164   CWnd::OnActivateApp(bActive, dwThreadID);
00165
00166   if (!bActive)
00167   {
00168     CloseMe();
00169   }
00170 }
00171
00172 void CFolderListPopupWnd::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
00173 {
00174   CWnd::OnActivate(nState, pWndOther, bMinimized);
00175
00176   if (nState == WA_INACTIVE)
00177   {
00178     CloseMe();
00179   }
00180 }
00181
00182 void CFolderListPopupWnd::OnSelectTree(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00183 {
00184   HTREEITEM hTreeItem = m_wndFolders.GetSelectedItem();
00185   if (m_bNotify && hTreeItem != NULL)
00186   {
00187     CWorkspaceObj* pWS = (CWorkspaceObj*) m_wndFolders.GetItemData(hTreeItem);
00188
00189     CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetParentFrame());
00190     if (pMainFrame != NULL)
00191     {
00192       pMainFrame->SetWorkSpace(pWS);
00193     }
00194
00195     CloseMe();
00196   }
00197
00198   *pResult = 0;
00199 }
00200
00201 void CFolderListPopupWnd::CloseMe(BOOL bKeep)
00202 {
00203   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetParentFrame());
00204   if (pMainFrame != NULL)
00205   {
00206     pMainFrame->OnCloseFoldersPopup(bKeep);
00207   }
00208
00209   PostMessage(WM_CLOSE);
00210 }
00211
00212 void CFolderListPopupWnd::OnKeepVisible()
00213 {
00214   CloseMe(TRUE);
00215 }
00216
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padview.h Source File

  • ole
  • superpad

padview.h

Go to the documentation of this file.
00001 // padview.h : interface of the CPadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __PADVIEW_H__
00013 #define __PADVIEW_H__
00014
00015 #include <afxdlgs.h>
00016 #include <afxext.h>
00017 #include "paddoc.h"
00018
00019 class CPadView : public CEditView
00020 {
00021   DECLARE_DYNCREATE(CPadView)
00022
00023 // Construction
00024   CPadView();
00025   BOOL PreCreateWindow(CREATESTRUCT& cs);
00026
00027 // Attributes
00028 public:
00029   // static init/term...
00030   static void Initialize();
00031   static void Terminate();
00032
00033   CPadDoc* GetDocument()
00034     { return (CPadDoc*)m_pDocument; }
00035
00036 // Operations
00037 public:
00038   // Word wrap...
00039   BOOL IsWordWrap() const;
00040   BOOL SetWordWrap(BOOL bWordWrap);
00041
00042   // Printing...
00043   virtual void OnPrint(CDC* pDC, CPrintInfo *pInfo);
00044   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00045   virtual void OnScrollTo(CDC* pDC, CPrintInfo* pInfo, POINT point);
00046
00047   // Buffer access...
00048   LPCTSTR LockBuffer() const
00049     { return CEditView::LockBuffer(); }
00050   void UnlockBuffer() const
00051     { CEditView::UnlockBuffer(); }
00052
00053 // Implementation
00054 public:
00055   BOOL IsUpdatePending() {return (m_uTimerID != NULL);}
00056
00057 #ifdef _DEBUG
00058   virtual void AssertValid() const;
00059   virtual void Dump(CDumpContext& dc) const;
00060 #endif
00061
00062 protected:
00063   UINT_PTR m_uTimerID; // ==0 when no outstanding
00064
00065   static LOGFONT NEAR m_lfDefFont;
00066   static LOGFONT NEAR m_lfDefFontOld;
00067   CFont m_font;
00068
00069   static LOGFONT NEAR m_lfDefPrintFont;
00070   static LOGFONT NEAR m_lfDefPrintFontOld;
00071   CFont m_fontPrint;
00072
00073   static UINT m_nDefTabStops;
00074   static UINT m_nDefTabStopsOld;
00075   static BOOL m_bDefWordWrap;
00076   static BOOL m_bDefWordWrapOld;
00077
00078   UINT m_nPreviewPage;
00079   CTime m_timeHeader;
00080   CTime m_timeFooter;
00081
00082   //{{AFX_MSG(CPadView)
00083   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00084   afx_msg void OnChooseFont();
00085   afx_msg void OnWordWrap();
00086   afx_msg void OnUpdateWordWrap(CCmdUI* pCmdUI);
00087   afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00088   afx_msg void OnChoosePrintFont();
00089   afx_msg void OnMirrorDisplayFont();
00090   afx_msg void OnUpdateMirrorDisplayFont(CCmdUI* pCmdUI);
00091   afx_msg void OnUpdateChoosePrintFont(CCmdUI* pCmdUI);
00092   afx_msg void OnSize(UINT nType, int cx, int cy);
00093   afx_msg void OnEditChange();
00094   afx_msg void OnEditCopy();
00095   afx_msg void OnEditCut();
00096   afx_msg void OnTimer(UINT_PTR nIDEvent);
00097   //}}AFX_MSG
00098   afx_msg void OnSetTabStops();
00099
00100   DECLARE_MESSAGE_MAP()
00101 };
00102
00103 #endif  // __PADVIEW_H__
00104
00105 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mdi.h Source File

  • general
  • mdidocvw

mdi.h

Go to the documentation of this file.
00001 // MDI.h : main header file for the MDI application
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013
00014 #ifndef __AFXWIN_H__
00015   #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 #include "resource.h"       // main symbols
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMDIApp:
00022 // See MDI.cpp for the implementation of this class
00023 //
00024
00025 class CMDIApp : public CWinApp
00026 {
00027 public:
00028   CMDIApp();
00029
00030 // Overrides
00031   // ClassWizard generated virtual function overrides
00032   //{{AFX_VIRTUAL(CMDIApp)
00033   public:
00034   virtual BOOL InitInstance();
00035   //}}AFX_VIRTUAL
00036
00037 // Implementation
00038
00039   //{{AFX_MSG(CMDIApp)
00040   afx_msg void OnAppAbout();
00041   afx_msg void OnNewHello();
00042   afx_msg void OnNewBounce();
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047 extern COLORREF  colorArray[]; //used to store the 5 basic colors
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTableButton.h Source File

  • vc2008fp
  • MSOffice2007Demo

RibbonTableButton.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CRibbonTableButton : public CMFCRibbonGallery
00015 {
00016   DECLARE_DYNCREATE(CRibbonTableButton)
00017
00018 // Construction:
00019 public:
00020   CRibbonTableButton() {}
00021   CRibbonTableButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex);
00022
00023   virtual ~CRibbonTableButton();
00024
00025 // Attributes:
00026 public:
00027   static int GetRows() { return m_nRows; }
00028   static int GetColumns() { return m_nColumns; }
00029
00030 protected:
00031   static int m_nRows;
00032   static int m_nColumns;
00033
00034 // Overrides:
00035 protected:
00036   virtual void OnDrawPaletteIcon(CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* pIcon, COLORREF clrText);
00037   virtual void NotifyHighlightListItem(int nIndex);
00038   virtual void OnShowPopupMenu();
00039 };
00040
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertySheet.cpp Source File

  • vc2008fp
  • PropSheetDemo

MyPropertySheet.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "resource.h"
00003 #include "MyPropertySheet.h"
00004
00005 #ifdef _DEBUG
00006 #undef THIS_FILE
00007 static char BASED_CODE THIS_FILE[] = __FILE__;
00008 #endif
00009
00010 /////////////////////////////////////////////////////////////////////////////
00011 // CMyPropertySheet
00012
00013 IMPLEMENT_DYNAMIC(CMyPropertySheet, CMFCPropertySheet)
00014
00015 CMyPropertySheet::CMyPropertySheet(CMFCPropertySheet::PropSheetLook look,
00016                    UINT uiIconsResID, int cxIcon)
00017    : CMFCPropertySheet(IDS_PROPSHT_CAPTION, NULL)
00018 {
00019   SetLook (look);
00020
00021   if (uiIconsResID != 0)
00022   {
00023     SetIconsList (uiIconsResID, cxIcon);
00024   }
00025
00026   if (look == PropSheetLook_Tree)
00027   {
00028     CMFCPropertySheetCategoryInfo* pCategory1 = AddTreeCategory (
00029       _T("Category 1"), 0, 1);
00030     AddPageToTree (pCategory1, &m_Page1, -1, 2);
00031     AddPageToTree (pCategory1, &m_Page2, -1, 2);
00032
00033     CMFCPropertySheetCategoryInfo* pCategory2 = AddTreeCategory (
00034       _T("Category 2"), 0, 1);
00035
00036     AddPageToTree (pCategory2, &m_Page3, -1, 2);
00037     AddPageToTree (pCategory2, &m_Page4, -1, 2);
00038   }
00039   else
00040   {
00041     AddPage(&m_Page1);
00042     AddPage(&m_Page2);
00043     AddPage(&m_Page3);
00044     AddPage(&m_Page4);
00045   }
00046 }
00047
00048 CMyPropertySheet::~CMyPropertySheet()
00049 {
00050 }
00051
00052
00053 BEGIN_MESSAGE_MAP(CMyPropertySheet, CMFCPropertySheet)
00054 END_MESSAGE_MAP()
00055
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CMyPropertySheet message handlers
00059
00060
00061 void CMyPropertySheet::OnDrawPageHeader (CDC* pDC, int nPage, CRect rectHeader)
00062 {
00063   rectHeader.top += 2;
00064   rectHeader.right -= 2;
00065   rectHeader.bottom -= 2;
00066
00067   pDC->FillRect (rectHeader, &afxGlobalData.brBtnFace);
00068   pDC->Draw3dRect (rectHeader, afxGlobalData.clrBtnShadow, afxGlobalData.clrBtnShadow);
00069
00070   CDrawingManager dm (*pDC);
00071   dm.DrawShadow (rectHeader, 2);
00072
00073   CString strText;
00074   strText.Format (_T("Page %d description..."), nPage + 1);
00075
00076   CRect rectText = rectHeader;
00077   rectText.DeflateRect (10, 0);
00078
00079   CFont* pOldFont = pDC->SelectObject (&afxGlobalData.fontBold);
00080   pDC->SetBkMode (TRANSPARENT);
00081   pDC->SetTextColor (afxGlobalData.clrBtnText);
00082
00083   pDC->DrawText (strText, rectText, DT_SINGLELINE | DT_VCENTER);
00084
00085   pDC->SelectObject (pOldFont);
00086 }
00087
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindView.h Source File

  • ole
  • MFCBind

BindView.h

Go to the documentation of this file.
00001 // BindView.h : interface of the CMFCBindView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_BINDVIEW_H__C3B1822A_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
00013 #define AFX_BINDVIEW_H__C3B1822A_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_
00014
00015 #if _MSC_VER > 1000
00016 #pragma once
00017 #endif // _MSC_VER > 1000
00018
00019 class CMFCBindCntrItem;
00020 class CMFCBindDoc;
00021
00022 class CMFCBindView : public CView
00023 {
00024 protected: // create from serialization only
00025   CMFCBindView();
00026   DECLARE_DYNCREATE(CMFCBindView)
00027
00028 // Attributes
00029 public:
00030   CMFCBindDoc* GetDocument();
00031   // m_pSelection holds the selection to the current CMFCBindCntrItem.
00032   // For many applications, such a member variable isn't adequate to
00033   //  represent a selection, such as a multiple selection or a selection
00034   //  of objects that are not CMFCBindCntrItem objects.  This selection
00035   //  mechanism is provided just to help you get started.
00036
00037   // TODO: replace this selection mechanism with one appropriate to your app.
00038   CMFCBindCntrItem* m_pSelection;
00039   void OnInitialUpdate();
00040 // Operations
00041 public:
00042
00043 // Overrides
00044   // ClassWizard generated virtual function overrides
00045   //{{AFX_VIRTUAL(CMFCBindView)
00046   public:
00047   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00048   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00049   protected:
00050   virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
00051   //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 public:
00055   virtual ~CMFCBindView();
00056 #ifdef _DEBUG
00057   virtual void AssertValid() const;
00058   virtual void Dump(CDumpContext& dc) const;
00059 #endif
00060
00061 protected:
00062
00063 // Generated message map functions
00064 protected:
00065   //{{AFX_MSG(CMFCBindView)
00066     // NOTE - the ClassWizard will add and remove member functions here.
00067     //    DO NOT EDIT what you see in these blocks of generated code !
00068   afx_msg void OnDestroy();
00069   afx_msg void OnSetFocus(CWnd* pOldWnd);
00070   afx_msg void OnSize(UINT nType, int cx, int cy);
00071   afx_msg void OnInsertObject();
00072   afx_msg void OnCancelEditCntr();
00073   //}}AFX_MSG
00074   DECLARE_MESSAGE_MAP()
00075 };
00076
00077 #ifndef _DEBUG  // debug version in BindView.cpp
00078 inline CMFCBindDoc* CMFCBindView::GetDocument()
00079    { return (CMFCBindDoc*)m_pDocument; }
00080 #endif
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083
00084 //{{AFX_INSERT_LOCATION}}
00085 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00086
00087 #endif // !defined(AFX_BINDVIEW_H__C3B1822A_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneView.cpp Source File

  • vc2008fp
  • RollupPane

RollupPaneView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RollupPane.h"
00013
00014 #include "RollupPaneDoc.h"
00015 #include "RollupPaneView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #endif
00020
00021
00022 // CRollupPaneView
00023
00024 IMPLEMENT_DYNCREATE(CRollupPaneView, CView)
00025
00026 BEGIN_MESSAGE_MAP(CRollupPaneView, CView)
00027   // Standard printing commands
00028   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00029   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00030   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00031 END_MESSAGE_MAP()
00032
00033 // CRollupPaneView construction/destruction
00034
00035 CRollupPaneView::CRollupPaneView()
00036 {
00037   // TODO: add construction code here
00038
00039 }
00040
00041 CRollupPaneView::~CRollupPaneView()
00042 {
00043 }
00044
00045 BOOL CRollupPaneView::PreCreateWindow(CREATESTRUCT& cs)
00046 {
00047   // TODO: Modify the Window class or styles here by modifying
00048   //  the CREATESTRUCT cs
00049
00050   return CView::PreCreateWindow(cs);
00051 }
00052
00053 // CRollupPaneView drawing
00054
00055 void CRollupPaneView::OnDraw(CDC* /*pDC*/)
00056 {
00057 //  CRollupPaneDoc* pDoc = GetDocument();
00058 //  ASSERT_VALID(pDoc);
00059
00060   // TODO: add draw code for native data here
00061 }
00062
00063
00064 // CRollupPaneView printing
00065
00066 void CRollupPaneView::OnFilePrintPreview()
00067 {
00068   AFXPrintPreview (this);
00069 }
00070
00071 BOOL CRollupPaneView::OnPreparePrinting(CPrintInfo* pInfo)
00072 {
00073   // default preparation
00074   return DoPreparePrinting(pInfo);
00075 }
00076
00077 void CRollupPaneView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00078 {
00079   // TODO: add extra initialization before printing
00080 }
00081
00082 void CRollupPaneView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00083 {
00084   // TODO: add cleanup after printing
00085 }
00086
00087
00088 // CRollupPaneView diagnostics
00089
00090 #ifdef _DEBUG
00091 void CRollupPaneView::AssertValid() const
00092 {
00093   CView::AssertValid();
00094 }
00095
00096 void CRollupPaneView::Dump(CDumpContext& dc) const
00097 {
00098   CView::Dump(dc);
00099 }
00100
00101 CRollupPaneDoc* CRollupPaneView::GetDocument() const // non-debug version is inline
00102 {
00103   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRollupPaneDoc)));
00104   return (CRollupPaneDoc*)m_pDocument;
00105 }
00106 #endif //_DEBUG
00107
00108
00109 // CRollupPaneView message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/OutputBar.h Source File

  • vc2008fp
  • RibbonMDI

OutputBar.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class COutputBar : public CDockablePane
00015 {
00016 public:
00017   COutputBar();
00018
00019 // Attributes
00020 protected:
00021   CMFCTabCtrl m_wndTabs;
00022
00023   CListCtrl m_wndList1;
00024   CListCtrl m_wndList2;
00025   CListCtrl m_wndList3;
00026
00027 // Operations
00028 public:
00029
00030 // Overrides
00031
00032 // Implementation
00033 public:
00034   virtual ~COutputBar();
00035
00036 protected:
00037   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00038   afx_msg void OnSize(UINT nType, int cx, int cy);
00039
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CItemIcons Member List

This is the complete list of members for CItemIcons, including all inherited members.
CItemIcons() | CItemIcons | [inline]
m_hIcon | CItemIcons |
m_Name | CItemIcons |
m_pObject | CItemIcons |
~CItemIcons() | CItemIcons | [inline]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/IFacesPg.H Source File

  • ole
  • TstCon

IFacesPg.H

Go to the documentation of this file.
00001 // File: IFacesPg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_CINTERFACESPAGE_H__D2C50BD0_C64C_11D0_8E02_00C04FB68D60__INCLUDED_)
00011 #define AFX_CINTERFACESPAGE_H__D2C50BD0_C64C_11D0_8E02_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // CInterfacesPage.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CInterfacesPage dialog
00021
00022 class CInterfacesPage : public CPropertyPage
00023 {
00024   DECLARE_DYNCREATE(CInterfacesPage)
00025
00026 // Construction
00027 public:
00028   CInterfacesPage();
00029   ~CInterfacesPage();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CInterfacesPage)
00033   enum { IDD = IDD_CONTAINEROPTIONS_INTERFACES };
00034   BOOL    m_tIOleInPlaceSiteWindowless;
00035   BOOL    m_tIOleInPlaceSiteEx;
00036   BOOL    m_tIAdviseSinkEx;
00037   //}}AFX_DATA
00038
00039
00040 // Overrides
00041   // ClassWizard generate virtual function overrides
00042   //{{AFX_VIRTUAL(CInterfacesPage)
00043   protected:
00044   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 protected:
00049   // Generated message map functions
00050   //{{AFX_MSG(CInterfacesPage)
00051   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00052   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00053   //}}AFX_MSG
00054   DECLARE_MESSAGE_MAP()
00055
00056 };
00057
00058 //{{AFX_INSERT_LOCATION}}
00059 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00060
00061 #endif // !defined(AFX_CINTERFACESPAGE_H__D2C50BD0_C64C_11D0_8E02_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/resource.h Source File

  • vc2008fp
  • DynamicMenu

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DynamicMenu.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_DYNAMITYPE                  129
00009 #define IDR_CONTEXT_MENU                130
00010 #define IDR_POPUP_TOOLBAR               131
00011 #define IDB_MENU_LOGO                   151
00012 #define IDR_DYNAMIC_MENU                152
00013 #define IDD_ABOUTBOX                    999
00014 #define ID_VIEW_CUSTOMIZE               32770
00015 #define ID_VIEW_TOOLBARS                32771
00016 #define ID_DYNAMIC_COMMANDS             32822
00017 #define ID_DYNAMIC_ITEM_1               32823
00018 #define ID_DYNAMIC_ITEM_2               32824
00019 #define IDS_EDIT_MYITEM_1               57645
00020 #define IDS_EDIT_MYITEM_2               57646
00021
00022 // Next default values for new objects
00023 //
00024 #ifdef APSTUDIO_INVOKED
00025 #ifndef APSTUDIO_READONLY_SYMBOLS
00026 #define _APS_3D_CONTROLS                     1
00027 #define _APS_NEXT_RESOURCE_VALUE        153
00028 #define _APS_NEXT_COMMAND_VALUE         32825
00029 #define _APS_NEXT_CONTROL_VALUE         1041
00030 #define _APS_NEXT_SYMED_VALUE           107
00031 #endif
00032 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMainView Member List

This is the complete list of members for CMainView, including all inherited members.
ClientToDoc(CRect &rc) | CMainView |
ClientToDoc(CPoint &pt) | CMainView |
ClientToDoc(CSize &sz) | CMainView |
CMainView() | CMainView | [protected]
DoCopySelection() | CMainView | [protected]
DocToClient(CRect &rc) | CMainView |
DocToClient(CPoint &pt) | CMainView |
DocToClient(CSize &sz) | CMainView |
DoPasteItem(BOOL bLink, COleDataObject *pDataObject, CPoint *pPoint, CLIPFORMAT cfFormat=0) | CMainView |
DoPasteNative(COleDataObject *pDataObject, CPoint *pPoint, CRectItem *pItem) | CMainView | [protected]
DoPasteStandard(BOOL bLink, COleDataObject *pDataObject, CPoint *pPoint, CRectItem *pItem, CLIPFORMAT cfFormat=0) | CMainView | [protected]
GetDocument() | CMainView | [inline]
GetHitItem(CPoint point) | CMainView | [protected]
GetObjectInfo(COleDataObject *pDataObject, CSize *pSize, CSize *pOffset) | CMainView | [protected]
GetSelection() const | CMainView | [inline]
InvalidateItem(CRectItem *pItem) | CMainView | [protected]
IsSelected(const CObject *pDocItem) const | CMainView | [protected, virtual]
m_bInDrag | CMainView | [protected]
m_brHatch | CMainView | [protected, static]
m_cfObjectDescriptor | CMainView | [protected, static]
m_dragOffset | CMainView | [protected]
m_dragPoint | CMainView | [protected]
m_dragSize | CMainView | [protected]
m_dropTarget | CMainView | [protected]
m_prevDropEffect | CMainView | [protected]
m_pSelection | CMainView | [protected]
OnCancelInplace() | CMainView | [protected]
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CMainView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainView | [protected]
OnDestroy() | CMainView | [protected]
OnDragEnter(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CMainView | [virtual]
OnDragLeave() | CMainView | [virtual]
OnDragOver(COleDataObject *pDataObject, DWORD grfKeyState, CPoint point) | CMainView | [virtual]
OnDraw(CDC *pDC) | CMainView | [virtual]
OnDrop(COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point) | CMainView | [virtual]
OnEditClear() | CMainView | [protected]
OnEditClone() | CMainView | [protected]
OnEditCopy() | CMainView | [protected]
OnEditCut() | CMainView | [protected]
OnInitialUpdate() | CMainView | [virtual]
OnInsertObject() | CMainView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CMainView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CMainView | [protected]
OnObjectDisplayAsIcon() | CMainView | [protected]
OnObjectDisplayContent() | CMainView | [protected]
OnObjectResetsize() | CMainView | [protected]
OnOleChangeSource() | CMainView | [protected]
OnOleEditProperties() | CMainView | [protected]
OnPaste() | CMainView | [protected]
OnPasteLink() | CMainView | [protected]
OnPasteSpecial() | CMainView | [protected]
OnPrepareDC(CDC *pDC, CPrintInfo *pInfo=NULL) | CMainView | [virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CMainView | [protected, virtual]
OnRButtonDown(UINT nFlags, CPoint point) | CMainView | [protected]
OnScrollBy(CSize sizeScroll, BOOL bDoScroll=TRUE) | CMainView | [virtual]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CMainView | [protected]
OnSetFocus(CWnd *pOldWnd) | CMainView | [protected]
OnSize(UINT nType, int cx, int cy) | CMainView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CMainView | [virtual]
OnUpdateEditClone(CCmdUI *pCmdUI) | CMainView | [protected]
OnUpdateEditMenu(CCmdUI *pCmdUI) | CMainView | [protected]
OnUpdateEditPaste(CCmdUI *pCmdUI) | CMainView | [protected]
OnUpdateObjectDisplayAsIcon(CCmdUI *pCmdUI) | CMainView | [protected]
OnUpdateObjectDisplayContent(CCmdUI *pCmdUI) | CMainView | [protected]
OnUpdateOleChangeSource(CCmdUI *pCmdUI) | CMainView | [protected]
OnUpdateOleEditProperties(CCmdUI *pCmdUI) | CMainView | [protected]
SetSelection(CRectItem *pNewSel, BOOL bSafeSelect=FALSE) | CMainView |
SetupTracker(CRectTracker *pTracker, CRectItem *pItem, CRect *pTrueRect=NULL) | CMainView | [protected]
UpdateActiveItem() | CMainView |
~CMainView() | CMainView | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRing Member List

This is the complete list of members for CRing, including all inherited members.
AdvanceTrace(CPoint &ptContact, double &dAngle, double &dAngleExtra, bool bMove=true) | CRing | [virtual]
CBasePiece(COLORREF co, bool bIsWheel=false) | CBasePiece |
CRing(long nRadiusIn, long nRadiusOut, COLORREF co, COLORREF coPattern=0) | CRing |
CWheel(long nRadius, COLORREF co, COLORREF coPattern) | CWheel |
Draw(CDC *pDC, long nZoomNumer, long nZoomDenom) const | CRing | [virtual]
GetBoundingRect(CSpiroRect *prect, long nZoomNumer, long nZoomDenom) const | CWheel | [virtual]
GetContactPosition(CPoint point, long nZoomNumer, long nZoomDenom, CPoint &ptContact, double &dAngle) | CRing | [virtual]
GetCycleError() const | CRing | [virtual]
GetDevPieceRgn(CDC *pDC, CRgn *pRgn, long nZoomNumer, long nZoomDenom, bool bInflate) const | CRing | [virtual]
GetFigData() const | CWheel | [virtual]
GetInnerRect(CSpiroRect *pRect, long nZoomNumer, long nZoomDenom) const | CRing |
GetLogPieceRgn(CRgn *pRgn, long nZoomNumer, long nZoomDenom) const | CRing | [virtual]
GetPenLocation(CPoint *pPoint) const | CWheel | [virtual]
GetPenRect(CRect *prect) const | CWheel | [virtual]
GetPerimeter() const | CRing | [virtual]
HitTest(CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom) const | CWheel | [virtual]
IsWheel() const | CBasePiece | [inline, virtual]
m_angleCurrent | CWheel |
m_angleDelta | CWheel |
m_anglePen | CWheel |
m_bIsWheel | CBasePiece |
m_bWheelInside | CRing |
m_co | CBasePiece |
m_coPattern | CWheel |
m_dAngleCorrection | CWheel |
m_icoCurrent | CBasePiece |
m_nColorCount | CBasePiece |
m_nPenRadius | CWheel |
m_nRadius | CWheel |
m_nRadiusInt | CRing |
m_ptPos | CBasePiece |
m_rgCo | CBasePiece |
m_rgco | CRing | [static]
m_rgcoPattern | CWheel | [static]
m_rgnRads | CRing | [static]
MovePiece(CSpiroView *pView, CPoint point, double dWheelData, long nZoomNumer, long nZoomDenom) | CWheel | [virtual]
ReverseWheelDirection() const | CRing | [virtual]
SetAngleDelta(long nDistance, bool bReverse) | CRing | [virtual]
SetFigData(double dData) | CWheel | [virtual]
SetPenLocation(CSpiroView *pView, CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom) | CWheel | [virtual]
SetPosition(CPoint pt) | CWheel | [virtual]
SetPosition(CPoint pt, double dAngle) | CWheel | [virtual]
SetWheelMode(bool bWheel=true) | CWheel | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/optionsh.h Source File

  • vc2008fp
  • WordPad

optionsh.h

Go to the documentation of this file.
00001 //
00002 // optionsh.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // COptionSheet
00016
00017 class COptionSheet : public CCSPropertySheet
00018 {
00019 // Construction
00020 public:
00021   COptionSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00022
00023 // Attributes
00024 public:
00025   CUnitsPage units;
00026   CDocOptPage pageText;
00027   CDocOptPage pageRTF;
00028   CDocOptPage pageWord;
00029   CDocOptPage pageWrite;
00030   CEmbeddedOptPage pageEmbedded;
00031
00032 // Operations
00033 public:
00034   INT_PTR DoModal();
00035   void SetPageButtons(CDocOptPage& page, CDockState& ds);
00036   void SetState(CDocOptPage& page, CDockState& ds);
00037
00038 // Overrides
00039   // ClassWizard generated virtual function overrides
00040   //{{AFX_VIRTUAL(COptionSheet)
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 public:
00045
00046   // Generated message map functions
00047 protected:
00048   //{{AFX_MSG(COptionSheet)
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/resource.h Source File

  • ole
  • oclient

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by oclient.rc
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDR_OCLIENTTYPE                 3
00007 #define IDD_ABOUTBOX                    100
00008 #define IDP_BUSY                        101
00009 #define ID_OBJECT_POPUP_MENU            102
00010 #define IDS_PRIVATE_CF_DESCR            102
00011 #define IDR_OCLIENTTYPE_CNTR_IP         104
00012 #define IDP_CLIPBOARD_CUT_FAILED        0x201
00013 #define IDP_CLIPBOARD_COPY_FAILED       0x202
00014 #define IDP_GET_FROM_CLIPBOARD_FAILED   0x203
00015 #define IDP_FAILED_TO_CREATE            0x204
00016 #define IDP_SAVEINCOMPLETE              0x205
00017 #define IDP_CLIPBOARD_ZERO_SIZE         0x206
00018 #define IDP_AFXOLEINIT_FAILED           519
00019 #define ID_OBJECT_TRACK_SIZE            2000
00020 #define ID_CANCEL_INPLACE               2002
00021 #define ID_OBJECT_DISPLAYCONTENT        2003
00022 #define ID_OBJECT_DISPLAYASICON         2004
00023 #define ID_OBJECT_CHANGEICON            2005
00024 #define ID_EDIT_CLONE                   2006
00025 #define ID_OBJECT_RESETSIZE             2009
00026 #define ID_OLE_CHANGE_SOURCE            2012
00027
00028 // Next default values for new objects
00029 //
00030 #ifdef APSTUDIO_INVOKED
00031 #ifndef APSTUDIO_READONLY_SYMBOLS
00032 #define _APS_NEXT_RESOURCE_VALUE        106
00033 #define _APS_NEXT_COMMAND_VALUE         2013
00034 #define _APS_NEXT_CONTROL_VALUE         1000
00035 #define _APS_NEXT_SYMED_VALUE           200
00036 #endif
00037 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/stdafx.cpp Source File

  • general
  • snapvw

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // Snap.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/InfoDlg.h Source File

  • general
  • SimpleImage

InfoDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010
00011 #ifndef __INFODLG_H__
00012 #define __INFODLG_H__
00013
00014 #include "resource.h"
00015 #include <afxstr.h>
00016 #include <atlimage.h>
00017
00018 // CInfoDlg class
00019
00020 class CInfoDlg : public CDialog
00021 {
00022 // Implementation
00023 public:
00024   CInfoDlg(CImage &image);
00025   // Dialog data
00026   enum { IDD = IDD_INFODLG };
00027 protected:
00028   DECLARE_MESSAGE_MAP()
00029 public:
00030   virtual BOOL OnInitDialog();
00031 private:
00032   CImage* m_pImage;
00033 };
00034
00035 #endif
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyOutlookBar Member List

This is the complete list of members for CMyOutlookBar, including all inherited members.
AllowShowOnPaneMenu() const | CMyOutlookBar | [private, virtual]
GetPaneName(CString &strName) const | CMyOutlookBar | [inline, private, virtual]
OnShowControlBarMenu(CPoint point) | CMyOutlookBar | [inline, private, virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTCExtPage Member List

This is the complete list of members for CTCExtPage, including all inherited members.
Apply() | CTCExtPage |
CTCExtPage() | CTCExtPage | [inline]
IDD enum value | CTCExtPage |
OnInitDialog(UINT nMessage, WPARAM wParam, LPARAM lParam, BOOL &bHandled) | CTCExtPage | [protected]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagBOXEDITINFO Member List

This is the complete list of members for tagBOXEDITINFO, including all inherited members.
boxlayout | tagBOXEDITINFO
cxBase | tagBOXEDITINFO
cxBox | tagBOXEDITINFO
cyBase | tagBOXEDITINFO
cyBox | tagBOXEDITINFO
cyMid | tagBOXEDITINFO
rgwReserved | tagBOXEDITINFO
szFaceName | tagBOXEDITINFO
wFlags | tagBOXEDITINFO
wFontHeight | tagBOXEDITINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBarButton.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMCategoryBarButton.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CMSMCategoryBarButton : public CMFCToolBarButton
00013 {
00014   DECLARE_SERIAL(CMSMCategoryBarButton)
00015
00016 public:
00017   CMSMCategoryBarButton ();
00018   CMSMCategoryBarButton (LPCTSTR lpszLabel, UINT nID);
00019
00020   virtual ~CMSMCategoryBarButton ();
00021
00022   virtual void OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00023            BOOL bHorz = TRUE, BOOL bCustomizeMode = FALSE,
00024            BOOL bHighlight = FALSE,
00025            BOOL bDrawBorder = TRUE,
00026            BOOL bGrayDisabledButtons = TRUE);
00027
00028 protected:
00029   void Initialize ();
00030
00031   virtual BOOL IsEditable () const
00032          {
00033            return FALSE;
00034          }
00035
00036   virtual SIZE OnCalculateSize (CDC* pDC, const CSize& sizeDefault, BOOL bHorz);
00037 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/resource.h Source File

  • general
  • mdi

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by MDI.RC
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDI_HELLO                       4
00007 #define IDM_BOUNCE                      10
00008 #define IDM_HELLO                       11
00009 #define IDM_BLACK                       20
00010 #define IDM_RED                         21
00011 #define IDM_GREEN                       22
00012 #define IDM_BLUE                        23
00013 #define IDM_WHITE                       24
00014 #define IDM_CUSTOM                      25
00015 #define IDM_FAST                        30
00016 #define IDM_SLOW                        31
00017 #define IDD_ABOUTBOX                    100
00018 #define IDR_BOUNCE                      101
00019 #define IDR_HELLO                       102
00020
00021 // Next default values for new objects
00022 //
00023 #ifdef APSTUDIO_INVOKED
00024 #ifndef APSTUDIO_READONLY_SYMBOLS
00025 #define _APS_NEXT_RESOURCE_VALUE        103
00026 #define _APS_NEXT_COMMAND_VALUE         57666
00027 #define _APS_NEXT_CONTROL_VALUE         1000
00028 #define _APS_NEXT_SYMED_VALUE           101
00029 #endif
00030 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/threads.cpp Source File

  • advanced
  • mtgdi

threads.cpp

Go to the documentation of this file.
00001 // threads.cpp : contains all the different GDI thread classes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtgdi.h"
00014 #include "threads.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 // critical section to protect while drawing to the DC
00022 CRITICAL_SECTION CGDIThread::m_csGDILock;
00023
00024 // m_hAnotherDead is used to signal that one or more threads have ended
00025 //  (it is an auto-reset event; and starts out not signaled)
00026 HANDLE CGDIThread::m_hAnotherDead = CreateEvent(NULL, FALSE, FALSE, NULL);
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CGDIThread
00030
00031 IMPLEMENT_DYNAMIC(CGDIThread, CWinThread)
00032
00033 BEGIN_MESSAGE_MAP(CGDIThread, CWinThread)
00034   //{{AFX_MSG_MAP(CGDIThread)
00035     // NOTE - the ClassWizard will add and remove mapping macros here.
00036   //}}AFX_MSG_MAP
00037 END_MESSAGE_MAP()
00038
00039 CGDIThread::CGDIThread(CWnd* pWnd, HDC hDC)
00040 {
00041   m_bAutoDelete = FALSE;
00042   m_pMainWnd = pWnd;
00043   m_pMainWnd->GetClientRect(&m_rectBorder);
00044   m_hDC = hDC;
00045
00046   // kill event starts out in the signaled state
00047   m_hEventKill = CreateEvent(NULL, TRUE, FALSE, NULL);
00048   m_hEventDead = CreateEvent(NULL, TRUE, FALSE, NULL);
00049 }
00050
00051 // The reason we don't just get a CDC from our owner and simply use it is because
00052 // MFC GDI objects can't be passed between threads.  So we must instead pass a
00053 // handle and then reconvert them back to MFC objects.  The reason  for this is
00054 // because MFC maintains a list of all GDI objects on a per thread basis.  So if
00055 // you pass a GDI object to another thread, it won't be in the correct list
00056 // and MFC will assert.
00057
00058 BOOL CGDIThread::InitInstance()
00059 {
00060   // thread setup
00061   m_dc.Attach(m_hDC);
00062
00063   // loop but check for kill notification
00064   while (WaitForSingleObject(m_hEventKill, 0) == WAIT_TIMEOUT)
00065     SingleStep();
00066
00067   // thread cleanup
00068   m_dc.Detach();
00069
00070   // avoid entering standard message loop by returning FALSE
00071   return FALSE;
00072 }
00073
00074 void CGDIThread::Delete()
00075 {
00076   // calling the base here won't do anything but it is a good habit
00077   CWinThread::Delete();
00078
00079   // acknowledge receipt of kill notification
00080   VERIFY(SetEvent(m_hEventDead));
00081   VERIFY(SetEvent(m_hAnotherDead));
00082 }
00083
00084 CGDIThread::~CGDIThread()
00085 {
00086   CloseHandle(m_hEventKill);
00087   CloseHandle(m_hEventDead);
00088 }
00089
00090 void CGDIThread::KillThread()
00091 {
00092   // Note: this function is called in the context of other threads,
00093   //  not the thread itself.
00094
00095   // reset the m_hEventKill which signals the thread to shutdown
00096   VERIFY(SetEvent(m_hEventKill));
00097
00098   // allow thread to run at higher priority during kill process
00099   SetThreadPriority(THREAD_PRIORITY_ABOVE_NORMAL);
00100   WaitForSingleObject(m_hEventDead, INFINITE);
00101   WaitForSingleObject(m_hThread, INFINITE);
00102
00103   // now delete CWinThread object since no longer necessary
00104   delete this;
00105 }
00106
00107 void CGDIThread::UpdateBorder()
00108 {
00109   // Since another thread can access this variable, we block them when we write
00110   // it. In this case, it is overkill since the other thread would just animate
00111   // in the wrong direction while reading intermediate values and finally adjust
00112   // itself when the new value is valid.  It is a good idea to avoid such
00113   // anomalies, however.
00114
00115   EnterCriticalSection(&CGDIThread::m_csGDILock);
00116   {
00117     m_pMainWnd->GetClientRect(&m_rectBorder);
00118   }
00119   LeaveCriticalSection(&CGDIThread::m_csGDILock);
00120 }
00121
00122 /////////////////////////////////////////////////////////////////////////////
00123 // CBallThread
00124
00125 IMPLEMENT_DYNAMIC(CBallThread, CGDIThread)
00126
00127 BEGIN_MESSAGE_MAP(CBallThread, CGDIThread)
00128   //{{AFX_MSG_MAP(CBallThread)
00129     // NOTE - the ClassWizard will add and remove mapping macros here.
00130   //}}AFX_MSG_MAP
00131 END_MESSAGE_MAP()
00132
00133 CBallThread::CBallThread(CWnd* pWnd, HDC hDC, CPoint ptPos, CPoint ptVel,
00134   CSize Size, COLORREF color)
00135   : CGDIThread(pWnd,hDC)
00136 {
00137   m_rectPosition.SetRect(ptPos.x,ptPos.y,ptPos.x+Size.cx,ptPos.y+Size.cx);
00138   m_ptVelocity = ptVel;
00139
00140   CBrush brush(color);
00141   m_hBrush = (HBRUSH)brush.Detach();
00142 }
00143
00144 // The reason we don't just store the CBrush from our owner and simply use it is
00145 // because MFC GDI objects can't be passed between threads.  So we must instead
00146 // pass a handle and then reconvert them back to MFC objects.  The reason for
00147 // this is because MFC maintains a list of all GDI objects on a per thread basis.
00148 // So if you pass a GDI object to another thread, it won't be in the correct
00149 // list and MFC will assert.
00150
00151 BOOL CBallThread::InitInstance()
00152 {
00153   m_brush.Attach(m_hBrush);
00154
00155   return CGDIThread::InitInstance();
00156 }
00157
00158 void CBallThread::SingleStep()
00159 {
00160   m_rectPosition.OffsetRect(m_ptVelocity);
00161
00162   if (m_rectPosition.top<m_rectBorder.top)
00163     m_ptVelocity.y = (m_ptVelocity.y>0) ? m_ptVelocity.y : -m_ptVelocity.y;
00164
00165   if (m_rectPosition.bottom>m_rectBorder.bottom)
00166     m_ptVelocity.y = (m_ptVelocity.y>0) ? -m_ptVelocity.y : m_ptVelocity.y;
00167
00168   if (m_rectPosition.left<m_rectBorder.left)
00169     m_ptVelocity.x = (m_ptVelocity.x>0) ? m_ptVelocity.x : -m_ptVelocity.x;
00170
00171   if (m_rectPosition.right>m_rectBorder.right)
00172     m_ptVelocity.x = (m_ptVelocity.x>0) ? -m_ptVelocity.x : m_ptVelocity.x;
00173
00174   // Since all threads share the same HDC it is necessary
00175   // to block all other threads while we render in the HDC
00176   EnterCriticalSection(&CGDIThread::m_csGDILock);
00177   {
00178     CBrush* oldbrush;
00179
00180     oldbrush = m_dc.SelectObject(&m_brush);
00181     m_dc.Ellipse(m_rectPosition);
00182     m_dc.SelectObject(oldbrush);
00183
00184     // Win32 optimizes GDI calls by collecting them in a batch
00185     // and then thunking the whole batch at once on a per
00186     // thread basis.  Since we share an HDC with multiple
00187     // threads, we must flush the batch before yielding to
00188     // other threads that will adjust the HDC.  To see what
00189     // I mean, comment out the GdiFlush() function call and
00190     // watch the results.
00191     GdiFlush();
00192   }
00193   LeaveCriticalSection(&CGDIThread::m_csGDILock);
00194 }
00195
00196 /////////////////////////////////////////////////////////////////////////////
00197 //
00198 // CRectThread
00199 //
00200 /////////////////////////////////////////////////////////////////////////////
00201
00202 IMPLEMENT_DYNAMIC(CRectThread, CGDIThread)
00203
00204 BEGIN_MESSAGE_MAP(CRectThread, CCmdTarget)
00205   //{{AFX_MSG_MAP(CRectThread)
00206     // NOTE - the ClassWizard will add and remove mapping macros here.
00207   //}}AFX_MSG_MAP
00208 END_MESSAGE_MAP()
00209
00210 CRectThread::CRectThread(CWnd* pWnd, HDC hDC, CPoint ptPos, CPoint ptVel,
00211   CSize Size, COLORREF color) : CGDIThread(pWnd, hDC)
00212 {
00213   m_rectPosition.SetRect(ptPos.x ,ptPos.y, ptPos.x+Size.cx, ptPos.y+Size.cy);
00214   m_ptVelocity = ptVel;
00215
00216   CBrush brush(color);
00217   m_hBrush = (HBRUSH)brush.Detach();
00218 }
00219
00220 BOOL CRectThread::InitInstance()
00221 {
00222   m_brush.Attach(m_hBrush);
00223
00224   return CGDIThread::InitInstance();
00225 }
00226
00227 void CRectThread::SingleStep()
00228 {
00229   m_rectPosition.OffsetRect(m_ptVelocity);
00230
00231   if (m_rectPosition.top<m_rectBorder.top)
00232     m_ptVelocity.y = (m_ptVelocity.y>0) ? m_ptVelocity.y : -m_ptVelocity.y;
00233
00234   if (m_rectPosition.bottom>m_rectBorder.bottom)
00235     m_ptVelocity.y = (m_ptVelocity.y>0) ? -m_ptVelocity.y : m_ptVelocity.y;
00236
00237   if (m_rectPosition.left<m_rectBorder.left)
00238     m_ptVelocity.x = (m_ptVelocity.x>0) ? m_ptVelocity.x : -m_ptVelocity.x;
00239
00240   if (m_rectPosition.right>m_rectBorder.right)
00241     m_ptVelocity.x = (m_ptVelocity.x>0) ? -m_ptVelocity.x : m_ptVelocity.x;
00242
00243   // Since all threads share the same HDC it is necessary
00244   // to block all other threads while we render in the HDC
00245   EnterCriticalSection(&CGDIThread::m_csGDILock);
00246   {
00247     CBrush* oldbrush;
00248
00249     oldbrush = m_dc.SelectObject(&m_brush);
00250     m_dc.Rectangle(m_rectPosition);
00251     m_dc.SelectObject(oldbrush);
00252
00253     // Win32 optimizes GDI calls by collecting them in a batch
00254     // and then thunking the whole batch at once on a per
00255     // thread basis.  Since we share an HDC with multiple
00256     // threads, we must flush the batch before yielding to
00257     // other threads that will adjust the HDC.  To see what
00258     // I mean, comment out the GdiFlush() function call and
00259     // watch the results.
00260     GdiFlush();
00261   }
00262   LeaveCriticalSection(&CGDIThread::m_csGDILock);
00263 }
00264
00265 /////////////////////////////////////////////////////////////////////////////
00266 // CLineThread
00267
00268 IMPLEMENT_DYNAMIC(CLineThread, CGDIThread)
00269
00270 BEGIN_MESSAGE_MAP(CLineThread, CCmdTarget)
00271   //{{AFX_MSG_MAP(CLineThread)
00272     // NOTE - the ClassWizard will add and remove mapping macros here.
00273   //}}AFX_MSG_MAP
00274 END_MESSAGE_MAP()
00275
00276 CLineThread::CLineThread(CWnd* pWnd, HDC hDC, CPoint ptPos1, CPoint ptVel1,
00277   CPoint ptVel2, CSize Size, COLORREF color) : CGDIThread(pWnd, hDC)
00278 {
00279   m_ptPosition1 = ptPos1;
00280   m_ptPosition2 = ptPos1 + Size;
00281   m_ptVelocity1 = ptVel1;
00282   m_ptVelocity2 = ptVel2;
00283
00284   CPen pen(PS_SOLID, 1, color);
00285   m_hPen = (HPEN)pen.Detach();
00286 }
00287
00288 BOOL CLineThread::InitInstance()
00289 {
00290   m_pen.Attach(m_hPen);
00291
00292   return CGDIThread::InitInstance();
00293 }
00294
00295 void CLineThread::SingleStep()
00296 {
00297   m_ptPosition1.Offset(m_ptVelocity1);
00298   m_ptPosition2.Offset(m_ptVelocity2);
00299
00300   if (m_ptPosition1.y<m_rectBorder.top)
00301     m_ptVelocity1.y = (m_ptVelocity1.y>0) ? m_ptVelocity1.y : -m_ptVelocity1.y;
00302   else if (m_ptPosition1.y>m_rectBorder.bottom)
00303     m_ptVelocity1.y = (m_ptVelocity1.y>0) ? -m_ptVelocity1.y : m_ptVelocity1.y;
00304
00305   if (m_ptPosition2.y<m_rectBorder.top)
00306     m_ptVelocity2.y = (m_ptVelocity2.y>0) ? m_ptVelocity2.y : -m_ptVelocity2.y;
00307   else if (m_ptPosition2.y>m_rectBorder.bottom)
00308     m_ptVelocity2.y = (m_ptVelocity2.y>0) ? -m_ptVelocity2.y : m_ptVelocity2.y;
00309
00310   if (m_ptPosition1.x<m_rectBorder.left)
00311     m_ptVelocity1.x = (m_ptVelocity1.x>0) ? m_ptVelocity1.x : -m_ptVelocity1.x;
00312   else if (m_ptPosition1.x>m_rectBorder.right)
00313     m_ptVelocity1.x = (m_ptVelocity1.x>0) ? -m_ptVelocity1.x : m_ptVelocity1.x;
00314
00315   if (m_ptPosition2.x<m_rectBorder.left)
00316     m_ptVelocity2.x = (m_ptVelocity2.x>0) ? m_ptVelocity2.x : -m_ptVelocity2.x;
00317   else if (m_ptPosition2.x>m_rectBorder.right)
00318     m_ptVelocity2.x = (m_ptVelocity2.x>0) ? -m_ptVelocity2.x : m_ptVelocity2.x;
00319
00320   // Since all threads share the same HDC it is necessary
00321   // to block all other threads while we render in the HDC
00322   EnterCriticalSection(&CGDIThread::m_csGDILock);
00323   {
00324     CPen* oldpen;
00325
00326     oldpen = m_dc.SelectObject(&m_pen);
00327     m_dc.MoveTo(m_ptPosition1);
00328     m_dc.LineTo(m_ptPosition2);
00329     m_dc.SelectObject(oldpen);
00330     // Win32 optimizes GDI calls by collecting them in a batch
00331     // and then thunking the whole batch at once on a per
00332     // thread basis.  Since we share an HDC with multiple
00333     // threads, we must flush the batch before yielding to
00334     // other threads that will adjust the HDC.  To see what
00335     // I mean, comment out the GdiFlush() function call and
00336     // watch the results.
00337     GdiFlush();
00338   }
00339   LeaveCriticalSection(&CGDIThread::m_csGDILock);
00340 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/DinnerPg.h Source File

  • general
  • snapvw

DinnerPg.h

Go to the documentation of this file.
00001 // DinnerPg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CDinnerPage dialog
00014
00015 class CDinnerPage : public CPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CDinnerPage)
00018
00019 // Construction
00020 public:
00021   CDinnerPage();
00022   ~CDinnerPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CDinnerPage)
00026   enum { IDD = IDD_DINNER };
00027     // NOTE - ClassWizard will add data members here.
00028     //    DO NOT EDIT what you see in these blocks of generated code !
00029   //}}AFX_DATA
00030
00031
00032 // Overrides
00033   // ClassWizard generate virtual function overrides
00034   //{{AFX_VIRTUAL(CDinnerPage)
00035   protected:
00036   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 protected:
00041   // Generated message map functions
00042   //{{AFX_MSG(CDinnerPage)
00043   virtual BOOL OnInitDialog();
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046
00047 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/setupdlg.cpp Source File

  • general
  • dlgtempl

setupdlg.cpp

Go to the documentation of this file.
00001 // dlgtempDlg.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "dlgtemp.h"
00015 #include "setupdlg.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CAboutDlg dialog used for App About
00025
00026 class CAboutDlg : public CDialog
00027 {
00028 public:
00029   CAboutDlg();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CAboutDlg)
00033   enum { IDD = IDD_ABOUTBOX };
00034   //}}AFX_DATA
00035
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CAboutDlg)
00038   protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 protected:
00044   //{{AFX_MSG(CAboutDlg)
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00050 {
00051   //{{AFX_DATA_INIT(CAboutDlg)
00052   //}}AFX_DATA_INIT
00053 }
00054
00055 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00056 {
00057   CDialog::DoDataExchange(pDX);
00058   //{{AFX_DATA_MAP(CAboutDlg)
00059   //}}AFX_DATA_MAP
00060 }
00061
00062 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00063   //{{AFX_MSG_MAP(CAboutDlg)
00064     // No message handlers
00065   //}}AFX_MSG_MAP
00066 END_MESSAGE_MAP()
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CDlgtempDlg dialog
00070
00071 CDlgtempDlg::CDlgtempDlg(CWnd* pParent /*=NULL*/)
00072   : CDialog(CDlgtempDlg::IDD, pParent)
00073 {
00074   m_nActiveItem = -1;
00075
00076   //{{AFX_DATA_INIT(CDlgtempDlg)
00077   m_strCaption = _T("");
00078   m_x = 0;
00079   m_y = 0;
00080   m_nWidth = 0;
00081   m_nHeight = 0;
00082   m_nItem = -1;
00083   m_strSelectedItem = _T("");
00084   //}}AFX_DATA_INIT
00085   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00086   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00087 }
00088
00089 void CDlgtempDlg::DoDataExchange(CDataExchange* pDX)
00090 {
00091   CDialog::DoDataExchange(pDX);
00092   //{{AFX_DATA_MAP(CDlgtempDlg)
00093   DDX_Text(pDX, IDC_CAPTION, m_strCaption);
00094   DDX_Text(pDX, IDC_XPOS, m_x);
00095   DDV_MinMaxUInt(pDX, m_x, 0, 300);
00096   DDX_Text(pDX, IDC_YPOS, m_y);
00097   DDV_MinMaxUInt(pDX, m_y, 0, 200);
00098   DDX_Text(pDX, IDC_WIDTH, m_nWidth);
00099   DDX_Text(pDX, IDC_HEIGHT, m_nHeight);
00100   DDX_Radio(pDX, IDC_BUTTON, m_nItem);
00101   DDX_Text(pDX, IDC_SELECTEDITEM, m_strSelectedItem);
00102   //}}AFX_DATA_MAP
00103 }
00104
00105 BEGIN_MESSAGE_MAP(CDlgtempDlg, CDialog)
00106   //{{AFX_MSG_MAP(CDlgtempDlg)
00107   ON_WM_SYSCOMMAND()
00108   ON_WM_PAINT()
00109   ON_BN_CLICKED(IDC_DEMOIT, OnDemoIt)
00110   ON_BN_CLICKED(IDC_BUTTON, OnButtonInformation)
00111   ON_BN_CLICKED(IDC_STATICTEXT, OnStaticTextInformation)
00112   ON_BN_CLICKED(IDC_EDITCONTROL, OnEditControlInformation)
00113   //}}AFX_MSG_MAP
00114 END_MESSAGE_MAP()
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // CDlgtempDlg message handlers
00118
00119 BOOL CDlgtempDlg::OnInitDialog()
00120 {
00121   CDialog::OnInitDialog();
00122
00123   // Add "About..." menu item to system menu.
00124
00125   // IDM_ABOUTBOX must be in the system command range.
00126   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00127   ASSERT(IDM_ABOUTBOX < 0xF000);
00128
00129   CMenu* pSysMenu = GetSystemMenu(FALSE);
00130   CString strAboutMenu;
00131   strAboutMenu.LoadString(IDS_ABOUTBOX);
00132   if (!strAboutMenu.IsEmpty())
00133   {
00134     pSysMenu->AppendMenu(MF_SEPARATOR);
00135     pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00136   }
00137
00138   // Set the icon for this dialog.  The framework does this automatically
00139   //  when the application's main window is not a dialog
00140   SetIcon(m_hIcon, TRUE);         // Set big icon
00141   SetIcon(m_hIcon, FALSE);        // Set small icon
00142
00143   m_nItem = 0;        // select the BUTTON option
00144   OnButtonInformation();  // fill the edit fields with corresponding values
00145
00146   return TRUE;  // return TRUE  unless you set the focus to a control
00147 }
00148
00149 void CDlgtempDlg::OnSysCommand(UINT nID, LPARAM lParam)
00150 {
00151   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00152   {
00153     CAboutDlg dlgAbout;
00154     dlgAbout.DoModal();
00155   }
00156   else
00157   {
00158     CDialog::OnSysCommand(nID, lParam);
00159   }
00160 }
00161
00162 // If you add a minimize button to your dialog, you will need the code below
00163 //  to draw the icon.  For MFC applications using the document/view model,
00164 //  this is automatically done for you by the framework.
00165
00166 void CDlgtempDlg::OnPaint()
00167 {
00168   if (IsIconic())
00169   {
00170     CPaintDC dc(this); // device context for painting
00171
00172     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00173
00174     // Center icon in client rectangle
00175     int cxIcon = GetSystemMetrics(SM_CXICON);
00176     int cyIcon = GetSystemMetrics(SM_CYICON);
00177     CRect rect;
00178     GetClientRect(&rect);
00179     int x = (rect.Width() - cxIcon + 1) / 2;
00180     int y = (rect.Height() - cyIcon + 1) / 2;
00181
00182     // Draw the icon
00183     dc.DrawIcon(x, y, m_hIcon);
00184   }
00185   else
00186   {
00187     CDialog::OnPaint();
00188   }
00189 }
00190
00191 void CDlgtempDlg::OnDemoIt()
00192 {
00193   InfoToDialogHelper(m_nActiveItem, NULL);
00194   m_dlgTemplate.DemoIt();
00195 }
00196
00197 void CDlgtempDlg::OnButtonInformation()
00198 {
00199   // take the information about the button and send it to the edit
00200   // controls in the dialog.
00201   InfoToDialogHelper(IBUTTON, _T("BUTTON"));
00202 }
00203
00204 void CDlgtempDlg::OnStaticTextInformation()
00205 {
00206   InfoToDialogHelper(ISTATICTEXT, _T("STATIC TEXT"));
00207 }
00208
00209 void CDlgtempDlg::OnEditControlInformation()
00210 {
00211   InfoToDialogHelper(IEDITCONTROL, _T("EDIT CONTROL"));
00212 }
00213
00214 void CDlgtempDlg::InfoToDialogHelper(int nItem, LPCTSTR lpszSelection)
00215 {
00216   // first bring data from edit field and store in proper item
00217   if (m_nActiveItem != -1)
00218   {
00219     UpdateData(TRUE/*bSaveAndValidate*/);
00220 #pragma warning(disable : 4244)
00221     m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.x = m_x;
00222     m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.y = m_y;
00223     m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.cx = m_nWidth;
00224     m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_dlgItemTemplate.cy = m_nHeight;
00225     m_dlgTemplate.m_rgDlgItem[m_nActiveItem].m_strCaption = m_strCaption;
00226 #pragma warning(default : 4244)
00227
00228   }
00229
00230   // now bring data from item and send to edit fields
00231   if (m_nActiveItem != nItem)
00232   {
00233     ENSURE(nItem >= 0 && nItem < 3);
00234     m_x = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.x;
00235     m_y = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.y;
00236     m_nWidth = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.cx;
00237     m_nHeight = m_dlgTemplate.m_rgDlgItem[nItem].m_dlgItemTemplate.cy;
00238     m_strCaption = m_dlgTemplate.m_rgDlgItem[nItem].m_strCaption;
00239     ASSERT(lpszSelection != NULL);
00240     m_strSelectedItem = lpszSelection;
00241     m_nItem = nItem;
00242     m_nActiveItem = nItem;
00243     UpdateData(FALSE/*bSaveAndValidate*/);
00244   }
00245
00246   CWnd*   pwnd = GetDlgItem(IDC_CAPTION);
00247   pwnd->EnableWindow(nItem != IEDITCONTROL);
00248 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/stdafx.h Source File

  • ole
  • ipdrive

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define VC_EXTRALEAN
00013
00014 #include <afxwin.h>         // MFC core and standard components
00015 #include <afxext.h>         // MFC extensions
00016 #include <afxdisp.h>        // MFC OLE automation classes
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NewControlsPropSheet Member List

This is the complete list of members for NewControlsPropSheet, including all inherited members.
m_hIcon | NewControlsPropSheet |
m_Page1 | NewControlsPropSheet |
m_Page2 | NewControlsPropSheet |
m_Page3 | NewControlsPropSheet |
m_Page4 | NewControlsPropSheet |
m_Page5 | NewControlsPropSheet |
m_Page6 | NewControlsPropSheet |
NewControlsPropSheet(CWnd *pParentWnd=NULL) | NewControlsPropSheet |
OnInitDialog() | NewControlsPropSheet | [virtual]
OnQueryDragIcon() | NewControlsPropSheet | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | NewControlsPropSheet | [protected]
~NewControlsPropSheet() | NewControlsPropSheet | [virtual]
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MainFrm.H Source File

  • ole
  • TstCon

MainFrm.H

Go to the documentation of this file.
00001 // CMainFrame.h : interface of the CMainFrame class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #if !defined(AFX_CMAINFRAME_H__19818504_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
00013 #define AFX_CMAINFRAME_H__19818504_B837_11D0_8DF1_00C04FB68D60__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 class CMainFrame : public CFrameWnd
00020 {
00021 protected:
00022   DECLARE_DYNCREATE(CMainFrame)
00023   CMainFrame();
00024
00025 // Attributes
00026 public:
00027    CMacroDialogBar m_wndMacroBar;
00028    CTCSplitter m_wndSplitter;
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CMainFrame)
00036   public:
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00039   protected:
00040   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 public:
00045   virtual ~CMainFrame();
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050
00051 protected:  // control bar embedded members
00052   CStatusBar  m_wndStatusBar;
00053   CToolBar    m_wndToolBar;
00054    CReBar m_wndReBar;
00055
00056 // Generated message map functions
00057 protected:
00058   //{{AFX_MSG(CMainFrame)
00059   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00060   afx_msg void OnDestroy();
00061   afx_msg void OnViewMacroBar();
00062   afx_msg void OnUpdateViewMacroBar(CCmdUI* pCmdUI);
00063   //}}AFX_MSG
00064
00065   DECLARE_MESSAGE_MAP()
00066 };
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069
00070 //{{AFX_INSERT_LOCATION}}
00071 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00072
00073 #endif // !defined(AFX_CMAINFRAME_H__19818504_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tree.cpp Source File

  • ole
  • oleview
  • iviewers

tree.cpp

Go to the documentation of this file.
00001 // tree.cpp
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "tree.h"
00015 #include "util.h"
00016
00017 #define MAX_NAMES   64
00018
00019 IMPLEMENT_DYNCREATE(CTreeItem, CObject)
00020 CTreeItem::CTreeItem(CTreeCtrl* pTree )
00021 {
00022   ASSERT(pTree) ;
00023   m_pTree = pTree ;
00024   m_punk = NULL ;
00025   m_Type = typeUnknown ;
00026   m_uiMemid = 0 ;
00027 }
00028
00029 CTreeItem::~CTreeItem()
00030 {
00031   if (m_punk )
00032     m_punk->Release()  ;
00033 }
00034
00035 BOOL CTreeItem::Expand( HTREEITEM hitem )
00036 {
00037   BOOL fExpand = FALSE ;
00038
00039   switch(m_Type)
00040   {
00041   case typeUnknown:
00042   case typeUnknown2:
00043   break ;
00044
00045   case typeTypeLib:
00046     fExpand = ExpandTypeLib( hitem );
00047   break ;
00048
00049   case typeTypeLib2:
00050   {
00051     // CTypeLibWnd::m_fGroupByType == TRUE
00052     CTreeItem* pItem ;
00053
00054     TV_INSERTSTRUCT tvis ;
00055     tvis.hParent = hitem ;
00056     tvis.hInsertAfter = TVI_LAST ;
00057     tvis.item.mask = TVIF_TEXT | TVIF_CHILDREN | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
00058     tvis.item.iImage = CTreeItem::typeUnknown ;
00059     tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00060     tvis.item.cChildren = 1 ;
00061
00062     #pragma warning (suppress: 6211) // Not Leaking. pItem is inserted into m_pTree
00063     pItem = new CTreeItem(m_pTree) ;
00064     pItem->SetTypeLib( GetTypeLib() ) ;
00065     GetTypeLib()->AddRef() ;
00066     pItem->m_Type = CTreeItem::typeEnums ;
00067     tvis.item.lParam = (LPARAM)pItem ;
00068     tvis.item.pszText = _T("Enums") ;
00069     m_pTree->InsertItem(&tvis) ;
00070
00071     pItem = new CTreeItem(m_pTree) ;
00072     pItem->SetTypeLib( GetTypeLib() ) ;
00073     GetTypeLib()->AddRef() ;
00074     pItem->m_Type = CTreeItem::typeRecords ;
00075     tvis.item.lParam = (LPARAM)pItem ;
00076     tvis.item.pszText = _T("Structs") ;
00077     m_pTree->InsertItem(&tvis) ;
00078
00079     pItem = new CTreeItem(m_pTree) ;
00080     pItem->SetTypeLib( GetTypeLib() ) ;
00081     GetTypeLib()->AddRef() ;
00082     pItem->m_Type = CTreeItem::typeModules ;
00083     tvis.item.lParam = (LPARAM)pItem ;
00084     tvis.item.pszText = _T("Modules") ;
00085     m_pTree->InsertItem(&tvis) ;
00086
00087     pItem = new CTreeItem(m_pTree) ;
00088     pItem->SetTypeLib( GetTypeLib() ) ;
00089     GetTypeLib()->AddRef() ;
00090     pItem->m_Type = CTreeItem::typeInterfaces ;
00091     tvis.item.lParam = (LPARAM)pItem ;
00092     tvis.item.pszText = _T("Interfaces") ;
00093     m_pTree->InsertItem(&tvis) ;
00094
00095     pItem = new CTreeItem(m_pTree) ;
00096     pItem->SetTypeLib( GetTypeLib() ) ;
00097     GetTypeLib()->AddRef() ;
00098     pItem->m_Type = CTreeItem::typeDispinterfaces ;
00099     tvis.item.lParam = (LPARAM)pItem ;
00100     tvis.item.pszText = _T("Dispinterfaces") ;
00101     m_pTree->InsertItem(&tvis) ;
00102
00103     pItem = new CTreeItem(m_pTree) ;
00104     pItem->SetTypeLib( GetTypeLib() ) ;
00105     GetTypeLib()->AddRef() ;
00106     pItem->m_Type = CTreeItem::typeCoClasses ;
00107     tvis.item.lParam = (LPARAM)pItem ;
00108     tvis.item.pszText = _T("CoClasses") ;
00109     m_pTree->InsertItem(&tvis) ;
00110
00111     pItem = new CTreeItem(m_pTree) ;
00112     pItem->SetTypeLib( GetTypeLib() ) ;
00113     GetTypeLib()->AddRef() ;
00114     pItem->m_Type = CTreeItem::typeAliases ;
00115     tvis.item.lParam = (LPARAM)pItem ;
00116     tvis.item.pszText = _T("Typedefs") ;
00117     m_pTree->InsertItem(&tvis) ;
00118
00119     pItem = new CTreeItem(m_pTree) ;
00120     pItem->SetTypeLib( GetTypeLib() ) ;
00121     GetTypeLib()->AddRef() ;
00122     pItem->m_Type = CTreeItem::typeUnions ;
00123     tvis.item.lParam = (LPARAM)pItem ;
00124     tvis.item.pszText = _T("Unions") ;
00125     m_pTree->InsertItem(&tvis) ;
00126
00127     fExpand = TRUE ;
00128   }
00129   break ;
00130
00131   case typeEnums:
00132   case typeRecords:
00133   case typeModules:
00134   case typeInterfaces:
00135   case typeDispinterfaces:
00136   case typeCoClasses:
00137   case typeAliases:
00138   case typeUnions:
00139     fExpand = ExpandTypeLib( hitem ) ;
00140   break ;
00141
00142   case typeTypeInfo:
00143   case typeTypeInfo2:
00144   case typeEnum:
00145   case typeRecord:
00146   case typeModule:
00147   case typeInterface:
00148   case typeDispinterface:
00149   case typeCoClass:
00150   case typeAlias:
00151   case typeUnion:
00152     fExpand = ExpandTypeInfo( hitem ) ;
00153   break ;
00154
00155   case typeMethods:
00156   case typeMethods2:
00157     fExpand = ExpandFuncs( hitem ) ;
00158   break ;
00159
00160   case typeProperties:
00161   case typeProperties2:
00162   case typeConstants:
00163   case typeConstants2:
00164     fExpand = ExpandVars( hitem ) ;
00165   break ;
00166
00167   case typeImplTypes:
00168   case typeImplTypes2:
00169     fExpand = ExpandImplTypes( hitem ) ;
00170   break ;
00171
00172   case typeMethod:
00173   case typeProperty:
00174   case typeConstant:
00175   default:
00176   break ;
00177   }
00178
00179   return fExpand ;
00180 }
00181
00182 BOOL CTreeItem::ExpandTypeLib( HTREEITEM hitem )
00183 {
00184   ASSERT(hitem) ;
00185   CTreeItem*  pNewItem = NULL ;
00186
00187   UINT            uiTypeInfoCount = GetTypeLib()->GetTypeInfoCount() ;
00188   HRESULT         hr = S_OK ;
00189   TV_INSERTSTRUCT tvis ;
00190   CString         strError = "Enumerating typeinfos";
00191   TYPEATTR*       pattr = NULL ;
00192   BOOL            fExpand = FALSE ;
00193
00194   tvis.hParent = hitem  ;
00195   tvis.hInsertAfter = TVI_LAST ;
00196   tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
00197   tvis.item.cChildren = 1 ;
00198   TRY
00199   {
00200     for (UINT n = 0 ; n < uiTypeInfoCount ; n++)
00201     {
00202       #pragma warning (suppress: 6014)
00203       pNewItem = new CTreeItem( m_pTree ) ;
00204       pNewItem->m_Type = typeTypeInfo ;
00205       ASSERT(pNewItem) ;
00206
00207       tvis.item.lParam = (LPARAM)pNewItem ;
00208       hr = GetTypeLib()->GetTypeInfo( n, (ITypeInfo**)&pNewItem->m_punk ) ;
00209       if (FAILED(hr))
00210       {
00211         strError.Format(_T("Could not get TypeInfo #%u"), n ) ;
00212         AfxThrowOleException(hr) ;
00213       }
00214       ASSERT(pNewItem->m_punk) ;
00215
00216       hr = pNewItem->GetTypeInfo()->GetTypeAttr(&pattr) ;
00217       if FAILED(hr)
00218       {
00219         strError.Format(_T("ITypeInfo::GetTypeAttr() failed") ) ;
00220         AfxThrowOleException(hr) ;
00221       }
00222
00223       if ((m_Type == typeTypeLib) ||
00224         (m_Type == (TypeKindToItemType(pattr->typekind) + 8)))
00225       {
00226         tvis.item.iImage = pattr->typekind + typeEnum ;
00227         tvis.item.iSelectedImage = tvis.item.iImage ;
00228         CString sName;
00229         pNewItem->GetName(sName, TRUE );
00230         tvis.item.pszText = sName.GetBuffer(0);
00231         m_pTree->InsertItem( &tvis ) ;
00232         sName.ReleaseBuffer();
00233         pNewItem->GetTypeInfo()->ReleaseTypeAttr( pattr ) ;
00234         fExpand = TRUE ;
00235       }
00236       else
00237       {
00238         pNewItem->GetTypeInfo()->ReleaseTypeAttr( pattr ) ;
00239         delete pNewItem ;
00240       }
00241      }
00242   }
00243   CATCH(CException, pException)
00244   {
00245     if (pException->IsKindOf(RUNTIME_CLASS(COleException)))
00246       ErrorMessage( strError, ((COleException*)pException)->m_sc ) ;
00247     else
00248       ErrorMessage( strError, hr ) ;
00249
00250     if (pNewItem)
00251       delete pNewItem ;
00252     return FALSE ;
00253   }
00254   END_CATCH
00255
00256   return fExpand ;
00257 }
00258
00259
00260 BOOL CTreeItem::ExpandTypeInfo( HTREEITEM hitem )
00261 {
00262   ASSERT(m_pTree) ;
00263   ASSERT(hitem) ;
00264
00265   CTreeItem*  pNewItem = NULL ;
00266   HRESULT         hr = S_OK ;
00267   TV_INSERTSTRUCT tvis ;
00268   CString         strError = "Enumerating TypeInfo" ;
00269   TYPEATTR*       pattr = NULL ;
00270   ITypeInfo*      pti = GetTypeInfo() ;
00271   ASSERT(pti) ;
00272   BOOL            fExpand = FALSE ;
00273
00274   tvis.hParent = hitem  ;
00275   tvis.hInsertAfter = TVI_LAST ;
00276   tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
00277   tvis.item.iImage = typeUnknown ;
00278   tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00279
00280   TRY
00281   {
00282     ENSURE(pti);
00283     hr = pti->GetTypeAttr(&pattr) ;
00284     if FAILED(hr)
00285     {
00286       strError.Format(_T("ITypeInfo::GetTypeAttr() failed"), hr ) ;
00287       AfxThrowMemoryException() ;
00288     }
00289
00290     switch(pattr->typekind)
00291     {
00292     // typedef [attributes] enum [tag] {
00293     //      enumlist
00294     // } enumname;
00295     //
00296     // "typedef enum enumname"
00297     case TKIND_ENUM:
00298       fExpand = ExpandVars( hitem ) ;
00299     break ;
00300
00301     // typedef [attributes]
00302     //  struct [tag] {
00303     //      memberlist
00304     //  } structname;
00305     //
00306     // "typedef struct structname"
00307     case TKIND_RECORD:
00308       fExpand = ExpandVars( hitem ) ;
00309     break ;
00310
00311     // [attributes]
00312     //  module modulename {
00313     //      elementlist
00314     // };
00315     case TKIND_MODULE:
00316       if (pattr->cVars)
00317       {
00318         // Add "Constants" folder
00319         //
00320         #pragma warning (suppress: 6211)
00321         #pragma warning (suppress: 6014)
00322         pNewItem = new CTreeItem(m_pTree) ;
00323         pNewItem->m_Type = typeProperties ;
00324         pNewItem->SetTypeInfo(pti) ;
00325         pti->AddRef() ;
00326         tvis.item.cChildren = pattr->cVars ;
00327         tvis.item.lParam = (LPARAM)pNewItem ;
00328         tvis.item.pszText = _T("Constants") ;
00329         tvis.item.iImage = typeConstants ;
00330         tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00331         m_pTree->InsertItem( &tvis ) ;
00332         fExpand = TRUE ;
00333       }
00334       if (pattr->cFuncs)
00335       {
00336         pNewItem = new CTreeItem(m_pTree) ;
00337         pNewItem->m_Type = typeMethods ;
00338         pNewItem->SetTypeInfo(pti) ;
00339         pti->AddRef() ;
00340         tvis.item.cChildren = pattr->cFuncs ;
00341         tvis.item.lParam = (LPARAM)pNewItem ;
00342         tvis.item.pszText = _T("Functions") ;
00343         tvis.item.iImage = typeMethods ;
00344         tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00345         m_pTree->InsertItem( &tvis ) ;
00346         fExpand = TRUE ;
00347       }
00348     break ;
00349
00350     // [attributes]
00351     //  interface interfacename  [:baseinterface] {
00352     //      functionlist
00353     // };
00354     case TKIND_INTERFACE:
00355       fExpand = ExpandFuncs( hitem) ;
00356       if (pattr->cImplTypes)
00357       {
00358         pNewItem = new CTreeItem(m_pTree) ;
00359         pNewItem->m_Type = typeImplTypes ;
00360         pNewItem->SetTypeInfo(pti) ;
00361         pti->AddRef() ;
00362         tvis.item.pszText = _T("Inherited Interfaces") ;
00363         tvis.item.iImage = typeInterface ;
00364         tvis.item.cChildren = pattr->cImplTypes ;
00365         tvis.item.lParam = (LPARAM)pNewItem ;
00366         tvis.item.iSelectedImage = tvis.item.iImage ;
00367         m_pTree->InsertItem( &tvis ) ;
00368         fExpand = TRUE ;
00369       }
00370     break ;
00371
00372     // [attributes]
00373     //  dispinterface intfname {
00374     //      interface interfacename
00375     // };
00376     case TKIND_DISPATCH :
00377       if (pattr->cVars)
00378       {
00379         // Add "Constants" folder
00380         //
00381         pNewItem = new CTreeItem(m_pTree) ;
00382         pNewItem->m_Type = typeConstants ;
00383         pNewItem->SetTypeInfo(pti) ;
00384         pti->AddRef() ;
00385         tvis.item.cChildren = pattr->cVars ;
00386         tvis.item.lParam = (LPARAM)pNewItem ;
00387         tvis.item.pszText = _T("Constants") ;
00388         tvis.item.iImage = typeConstants ;
00389         tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00390         m_pTree->InsertItem( &tvis ) ;
00391
00392         // Add "Properties" folder
00393         //
00394         pNewItem = new CTreeItem(m_pTree) ;
00395         pNewItem->m_Type = typeProperties ;
00396         pNewItem->SetTypeInfo(pti) ;
00397         pti->AddRef() ;
00398         tvis.item.cChildren = pattr->cVars ;
00399         tvis.item.lParam = (LPARAM)pNewItem ;
00400         tvis.item.pszText = _T("Properties") ;
00401         tvis.item.iImage = typeProperties ;
00402         tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00403         m_pTree->InsertItem( &tvis ) ;
00404         fExpand = TRUE ;
00405        }
00406       if (pattr->cFuncs)
00407       {
00408         pNewItem = new CTreeItem(m_pTree) ;
00409         pNewItem->m_Type = typeMethods ;
00410         pNewItem->SetTypeInfo(pti) ;
00411         pti->AddRef() ;
00412         tvis.item.cChildren = pattr->cFuncs ;
00413         tvis.item.lParam = (LPARAM)pNewItem ;
00414         tvis.item.pszText = _T("Methods") ;
00415         tvis.item.iImage = typeMethods ;
00416         tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00417         m_pTree->InsertItem( &tvis ) ;
00418         fExpand = TRUE ;
00419       }
00420       if (pattr->cImplTypes)
00421       {
00422         pNewItem = new CTreeItem(m_pTree) ;
00423         pNewItem->m_Type = typeImplTypes ;
00424         pNewItem->SetTypeInfo(pti) ;
00425         pti->AddRef() ;
00426         tvis.item.pszText = _T("Inherited Interfaces") ;
00427         tvis.item.iImage = typeInterface ;
00428         tvis.item.cChildren = pattr->cImplTypes ;
00429         tvis.item.lParam = (LPARAM)pNewItem ;
00430         tvis.item.iSelectedImage = tvis.item.iImage ;
00431         m_pTree->InsertItem( &tvis ) ;
00432         fExpand = TRUE ;
00433       }
00434     break ;
00435
00436     // [attributes]
00437     //  coclass classname {
00438     //      [attributes2] [interface | dispinterface] interfacename;
00439     //      ...
00440     // };
00441     case TKIND_COCLASS:
00442       fExpand = ExpandImplTypes( hitem ) ;
00443     break ;
00444
00445     // typedef [attributes] basetype aliasname;
00446     case TKIND_ALIAS:
00447       if (pattr->tdescAlias.vt == VT_USERDEFINED)
00448       {
00449         ITypeInfo* ptiRefType = NULL ;
00450
00451         #pragma warning (suppress: 6246)
00452         HRESULT hr = pti->GetRefTypeInfo( pattr->tdescAlias.hreftype, &ptiRefType ) ;
00453         if (FAILED(hr))
00454           AfxThrowOleException( hr ) ;
00455
00456         pNewItem = new CTreeItem(m_pTree) ;
00457         pNewItem->SetTypeInfo( ptiRefType ) ;
00458         pNewItem->m_Type = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
00459         tvis.item.iImage = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
00460         tvis.item.cChildren = 1 ;
00461         tvis.item.lParam = (LPARAM)pNewItem ;
00462         tvis.item.iSelectedImage = tvis.item.iImage ;
00463         CString sName;
00464         pNewItem->GetName(sName, TRUE );
00465         tvis.item.pszText = sName.GetBuffer(0) ;
00466         m_pTree->InsertItem( &tvis ) ;
00467         sName.ReleaseBuffer();
00468         fExpand = TRUE ;
00469       }
00470     break ;
00471
00472     // typedef [attributes] union [tag] {
00473     //      memberlist
00474     // } unionname;
00475     case TKIND_UNION:
00476       fExpand = ExpandVars( hitem ) ;
00477     break ;
00478
00479     default:
00480     break ;
00481     }
00482
00483     if (pattr)
00484       pti->ReleaseTypeAttr( pattr ) ;
00485   }
00486   CATCH(CException, pException)
00487   {
00488     ErrorMessage( strError, hr ) ;
00489     if (pNewItem)
00490       delete pNewItem ;
00491
00492     if (pattr)
00493       pti->ReleaseTypeAttr( pattr ) ;
00494
00495     return FALSE ;
00496   }
00497   END_CATCH
00498   return fExpand ;
00499 }
00500
00501 BOOL CTreeItem::ExpandFuncs( HTREEITEM hitem )
00502 {
00503   ASSERT(hitem) ;
00504
00505   CTreeItem*  pNewItem = NULL ;
00506   HRESULT         hr = S_OK ;
00507   TV_INSERTSTRUCT tvis ;
00508   CString         strError ;
00509   TYPEATTR*       pattr = NULL ;
00510   ITypeInfo*      pti = GetTypeInfo() ;
00511   ASSERT(pti) ;
00512   FUNCDESC*       pfuncdesc = NULL ;
00513   BSTR            bstrParams = NULL ;
00514   BOOL            fExpand = FALSE ;
00515
00516   tvis.hParent = hitem  ;
00517   tvis.hInsertAfter = TVI_LAST ;
00518   tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
00519
00520   TRY
00521   {
00522     ENSURE(pti);
00523     hr = pti->GetTypeAttr(&pattr) ;
00524     if FAILED(hr)
00525     {
00526       strError.Format(_T("ITypeInfo::GetTypeAttr() failed: %x"), hr);
00527       AfxThrowMemoryException() ;
00528     }
00529
00530     BSTR  rgbstrNames[MAX_NAMES] ;
00531     int   cNames ;
00532
00533     //
00534     // Enumerate through all FUNCDESCS
00535     for ( int iIndex = 0 ; iIndex < pattr->cFuncs ; iIndex++)
00536     {
00537       hr = pti->GetFuncDesc( iIndex, &pfuncdesc ) ;
00538       if (FAILED(hr))
00539       {
00540         strError.Format(_T("GetVarDesc failed for function #%u"), iIndex) ;
00541         AfxThrowMemoryException() ;
00542       }
00543
00544       //int cParams = pfuncdesc->cParams ;
00545       //int cParamsOpt = abs(pfuncdesc->cParamsOpt) ;
00546
00547       // Get the names of the function and it's parameters into rgbstrNames.
00548       // cNames gets the number of parameters + 1.
00549       //
00550       hr = pti->GetNames( pfuncdesc->memid, rgbstrNames, 1, (UINT*)&cNames) ; //MAX_NAMES, (UINT FAR*)&cNames );
00551       if (FAILED(hr))
00552       {
00553         strError.Format(_T("GetNames failed for function #%u"), iIndex) ;
00554         AfxThrowMemoryException() ;
00555       }
00556
00557       // rgbstrNames[0] is the name of the function
00558       if (cNames > 0)
00559       {
00560         #pragma warning (suppress: 6014)
00561         pNewItem = new CTreeItem(m_pTree) ;
00562         pNewItem->SetTypeInfo(pti) ;
00563         pti->AddRef() ;
00564         pNewItem->m_Type = typeMethod ;
00565         pNewItem->m_uiMemid = iIndex ;
00566         tvis.item.lParam = (LPARAM)pNewItem ;
00567         tvis.item.iImage = typeMethod ;
00568         tvis.item.iSelectedImage = tvis.item.iImage ;
00569         tvis.item.cChildren = 0 ;
00570         COLE2T lpszText(rgbstrNames[0]);
00571         tvis.item.pszText = lpszText;
00572         m_pTree->InsertItem( &tvis ) ;
00573         SysFreeString( rgbstrNames[0] ) ;
00574       }
00575
00576       SysFreeString( bstrParams ) ;
00577
00578       pti->ReleaseFuncDesc( pfuncdesc ) ;
00579       fExpand = TRUE ;
00580     }
00581     if (pattr)
00582       pti->ReleaseTypeAttr( pattr ) ;
00583   }
00584   CATCH(CException, pException)
00585   {
00586     ErrorMessage( strError, hr ) ;
00587     if (pNewItem)
00588       delete pNewItem ;
00589
00590     if (pattr)
00591       pti->ReleaseTypeAttr( pattr ) ;
00592
00593     if (pfuncdesc)
00594       pti->ReleaseFuncDesc( pfuncdesc ) ;
00595
00596     if (bstrParams)
00597       SysFreeString(bstrParams) ;
00598
00599     return FALSE ;
00600   }
00601   END_CATCH
00602   return fExpand ;
00603 }
00604
00605 BOOL CTreeItem::ExpandVars( HTREEITEM hitem )
00606 {
00607   ASSERT(hitem) ;
00608   CTreeItem*  pNewItem = NULL ;
00609   HRESULT         hr = S_OK ;
00610   TV_INSERTSTRUCT tvis ;
00611   CString         strError ;
00612   TYPEATTR*       pattr = NULL ;
00613   ITypeInfo*      pti = GetTypeInfo() ;
00614   ASSERT(pti) ;
00615   LPVARDESC pvardesc = NULL ;
00616   BSTR            rgbstrNames[MAX_NAMES] ;
00617   int             cNames ;
00618   BOOL            fProperties = FALSE ;
00619   BOOL            fExpand = FALSE ;
00620   tvis.hParent = hitem  ;
00621   tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
00622   tvis.item.cChildren = 0 ;
00623
00624   TRY
00625   {
00626     ENSURE(pti);
00627     hr = pti->GetTypeAttr(&pattr) ;
00628     if FAILED(hr)
00629     {
00630       strError.Format(_T("ITypeInfo::GetTypeAttr() failed"), hr ) ;
00631       AfxThrowMemoryException() ;
00632     }
00633
00634     // if it's a struct or an enum, order is important
00635     //
00636     if (pattr->typekind == TKIND_RECORD || pattr->typekind == TKIND_ENUM || pattr->typekind == TKIND_UNION)
00637       tvis.hInsertAfter = TVI_LAST ;
00638     else
00639     {
00640       tvis.hInsertAfter = TVI_LAST ;
00641
00642       // are we doing constants or properties?
00643       TV_ITEM tvi ;
00644       TCHAR szBuf[80] ;
00645       tvi.hItem = hitem ;
00646       tvi.mask = TVIF_TEXT ;
00647       tvi.cchTextMax = 80 ;
00648       tvi.pszText = szBuf ;
00649       m_pTree->GetItem(&tvi) ;
00650       #pragma warning(suppress: 6054) // tvi.pszText will always be null terminated.
00651       if (_stricmp(tvi.pszText, _T("Properties")) == 0)
00652         fProperties = TRUE ;
00653     }
00654
00655     for (int iIndex = 0 ; iIndex < pattr->cVars ; iIndex++)
00656     {
00657       hr = pti->GetVarDesc( iIndex, &pvardesc ) ;
00658       if (FAILED(hr))
00659       {
00660         strError.Format(_T("GetVarDesc failed for variable #%u"), iIndex) ;
00661         AfxThrowMemoryException() ;
00662       }
00663       hr = pti->GetNames( pvardesc->memid, rgbstrNames, 1, (UINT FAR*)&cNames );
00664       if (FAILED(hr))
00665       {
00666         strError.Format(_T("GetNames failed for variable #%u"), iIndex) ;
00667         AfxThrowMemoryException() ;
00668       }
00669       if (pvardesc->varkind == VAR_CONST && fProperties == FALSE)
00670       {
00671 //        #pragma warning (suppress: 6263)
00672         CString str = TYPEDESCtoString( &pvardesc->elemdescVar.tdesc ) ;
00673
00674         VARIANT varValue ;
00675         VariantInit( &varValue ) ;
00676         if (FAILED(hr = VariantChangeType( &varValue, pvardesc->lpvarValue, 0, VT_BSTR )))
00677         {
00678           if (pvardesc->lpvarValue->vt == VT_ERROR || pvardesc->lpvarValue->vt == VT_HRESULT)
00679           {
00680             varValue.vt = VT_BSTR ;
00681             varValue.bstrVal = SysAllocString(CT2OLE(_GetScodeString(pvardesc->lpvarValue->scode))) ;
00682             hr = S_OK ;
00683           }
00684           else
00685             AfxThrowOleException( hr ) ;
00686         }
00687
00688         // const type name = expression
00689         UINT len = SysStringLen( varValue.bstrVal ) ;
00690         COLE2T lpszSource(varValue.bstrVal);
00691         TCHAR* pstrExpand = new TCHAR[(len+1) * sizeof(TCHAR) * 2] ;
00692         LPTSTR lpD, lpS = lpszSource ;
00693         lpD = pstrExpand;
00694         for (UINT n = 0 ; n < len ; n++)
00695         {
00696           #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
00697           if (!isprint(*lpS) || (*lpS) == '\"' || (*lpS) == '\\')
00698           {
00699             // \"  \\ \a  \b  \f  \n  \r  \t  \v
00700             *lpD++ = '\\' ;
00701             switch(*lpS)
00702             {
00703             case '\"':
00704               *lpD++ = '\"' ;
00705             break ;
00706             case '\\':
00707               *lpD++ = '\\' ;
00708             break ;
00709             case '\a':
00710               *lpD++ = 'a' ;
00711             break ;
00712             case '\b':
00713               *lpD++ = 'b' ;
00714             break ;
00715             case '\f':
00716               *lpD++ = 'f' ;
00717             break ;
00718             case '\n':
00719               *lpD++ = 'n' ;
00720             break ;
00721             case '\r':
00722               *lpD++ = 'r' ;
00723             break ;
00724             case '\t':
00725               *lpD++ = 't' ;
00726             break ;
00727             case '\v':
00728               *lpD++ = 'v' ;
00729             break ;
00730             case '\0':
00731               *lpD++ = '0' ;
00732             break ;
00733             default:
00734               lpD += _stprintf_s( lpD, (len+1) * sizeof(TCHAR) * 2, _T("x%02X"), (UINT)*lpS );
00735             break ;
00736             }
00737             lpS++;
00738           }
00739           else
00740             *lpD++ = *lpS++;
00741         }
00742         *lpD = '\0';
00743
00744         if (pvardesc->lpvarValue->vt == VT_BSTR)
00745           strError.Format(_T("const %s %s = \"%s\""), (LPCTSTR)str, COLE2CT(rgbstrNames[0]), pstrExpand) ;
00746         else
00747           strError.Format(_T("const %s %s = %s"), (LPCTSTR)str, COLE2CT(rgbstrNames[0]), pstrExpand);
00748         //#pragma warning (suppress: 6211)
00749         delete []pstrExpand ;
00750         VariantClear( &varValue ) ;
00751         tvis.item.iImage = typeConstant ;
00752         tvis.item.iSelectedImage = tvis.item.iImage ;
00753         #pragma warning (suppress: 6211)
00754         pNewItem = new CTreeItem(m_pTree) ;
00755         pNewItem->SetTypeInfo(pti) ;
00756         pti->AddRef() ;
00757         pNewItem->m_Type = typeConstant ;
00758         pNewItem->m_uiMemid = iIndex ;
00759         tvis.item.lParam = (LPARAM)pNewItem ;
00760         tvis.item.pszText = strError.GetBuffer(0) ;
00761         m_pTree->InsertItem( &tvis ) ;
00762         strError.ReleaseBuffer(-1) ;
00763         fExpand = TRUE ;
00764       }
00765       else if (fProperties == TRUE ||
00766           (pattr->typekind == TKIND_RECORD ||
00767            pattr->typekind == TKIND_UNION  ))
00768       {
00769         CString str ;
00770         static TCHAR szNameless[] = _T("(nameless)");
00771         if ((pvardesc->elemdescVar.tdesc.vt & 0x0FFF) == VT_CARRAY)
00772         {
00773           // type name[n]
00774           strError.Format(_T("%s "), TYPEDESCtoString( &pvardesc->elemdescVar.tdesc.lpadesc->tdescElem) );
00775           if (rgbstrNames[0])
00776           {
00777             COLE2CT tName (rgbstrNames[0]);
00778             strError += tName;
00779           }
00780           else
00781             strError += szNameless;
00782           // Allocate cDims * lstrlen("[123456]")
00783           for (USHORT n = 0 ; n < pvardesc->elemdescVar.tdesc.lpadesc->cDims ; n++)
00784           {
00785             str.Format( _T("[%d]"), pvardesc->elemdescVar.tdesc.lpadesc->rgbounds[n].cElements ) ;
00786             strError += str ;
00787           }
00788         }
00789         else
00790         {
00791           // type name
00792           strError.Format(_T("%s "),strError = TYPEDESCtoString( &pvardesc->elemdescVar.tdesc ));
00793           if (rgbstrNames[0]) {
00794             COLE2CT tName (rgbstrNames[0]);
00795             strError += tName;
00796           }
00797           else
00798             strError += szNameless;
00799         }
00800         tvis.item.iImage = typeProperty ;
00801         tvis.item.iSelectedImage = tvis.item.iImage ;
00802         pNewItem = new CTreeItem(m_pTree) ;
00803         pNewItem->SetTypeInfo(pti) ;
00804         pti->AddRef() ;
00805         pNewItem->m_Type = typeProperty ;
00806         pNewItem->m_uiMemid = iIndex ;
00807         tvis.item.lParam = (LPARAM)pNewItem ;
00808         tvis.item.pszText = strError.GetBuffer(0) ;
00809         m_pTree->InsertItem( &tvis ) ;
00810         strError.ReleaseBuffer(-1) ;
00811         fExpand = TRUE ;
00812       }
00813       SysFreeString( rgbstrNames[0] ) ;
00814       pti->ReleaseVarDesc( pvardesc ) ;
00815     }
00816
00817     if (pattr)
00818       pti->ReleaseTypeAttr( pattr ) ;
00819   }
00820   CATCH(CException, pException)
00821   {
00822     ErrorMessage( strError, hr ) ;
00823     if (pNewItem)
00824       delete pNewItem ;
00825
00826     if (pattr)
00827       pti->ReleaseTypeAttr( pattr ) ;
00828
00829     if (pvardesc)
00830       pti->ReleaseVarDesc( pvardesc ) ;
00831
00832     return FALSE ;
00833   }
00834   END_CATCH
00835   return fExpand ;
00836 }
00837
00838 BOOL CTreeItem::ExpandImplTypes( HTREEITEM hitem )
00839 {
00840   ASSERT(hitem) ;
00841
00842   BOOL fExpand = FALSE ;
00843   CTreeItem*  pNewItem = NULL ;
00844   HRESULT         hr = S_OK ;
00845   BSTR            bstrName = NULL ;
00846   BSTR            bstrDoc = NULL ;
00847   BSTR            bstrHelp = NULL ;
00848   DWORD           dwHelpID ;
00849   TV_INSERTSTRUCT tvis ;
00850   CString         strError ;
00851   TYPEATTR*       pattr = NULL ;
00852   ITypeInfo*      pti = GetTypeInfo() ;
00853
00854   tvis.hParent = hitem  ;
00855   tvis.hInsertAfter = TVI_LAST ;
00856   tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN ;
00857   tvis.item.cChildren = 1 ;
00858   TRY
00859   {
00860     hr = pti->GetTypeAttr(&pattr) ;
00861     if FAILED(hr)
00862     {
00863       //#pragma warning (suppress: 6014)
00864       strError.Format(_T("ITypeInfo::GetTypeAttr() failed (0x%x)"), hr ) ;
00865       AfxThrowMemoryException() ;
00866     }
00867
00868     for (UINT n = 0 ; n <  pattr->cImplTypes; n++)
00869     {
00870       #pragma warning (suppress: 6014)
00871       pNewItem = new CTreeItem( m_pTree ) ;
00872       pNewItem->m_uiMemid = n ;
00873       ASSERT(pNewItem) ;
00874
00875       tvis.item.lParam = (LPARAM)pNewItem ;
00876       HREFTYPE href = NULL ;
00877       hr = pti->GetRefTypeOfImplType(n, &href) ;
00878       if (FAILED(hr))
00879       {
00880         strError.Format(_T("Could not get RefTypeOfImplType #%u"), n ) ;
00881         AfxThrowMemoryException() ;
00882       }
00883       hr = pti->GetRefTypeInfo( href, (ITypeInfo**)&pNewItem->m_punk ) ;
00884       if (FAILED(hr))
00885       {
00886         strError.Format(_T("Could not get RefTypeInfo") ) ;
00887         AfxThrowMemoryException() ;
00888       }
00889
00890       ASSERT(pNewItem->m_punk) ;
00891
00892       TYPEATTR* pattrNew ;
00893       hr = pNewItem->GetTypeInfo()->GetTypeAttr(&pattrNew) ;
00894       if FAILED(hr)
00895       {
00896         strError.Format(_T("ITypeInfo::GetTypeAttr() failed") ) ;
00897         AfxThrowMemoryException() ;
00898       }
00899       pNewItem->m_Type = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
00900       tvis.item.iImage = TypeKindToItemType( pNewItem->GetTypeKind() ) ;
00901       tvis.item.iSelectedImage = tvis.item.iImage ;
00902       pNewItem->GetTypeInfo()->ReleaseTypeAttr( pattrNew ) ;
00903
00904       hr = pNewItem->GetTypeInfo()->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
00905       if (FAILED(hr))
00906       {
00907         strError.Format(_T("ITypeInfo::GetDocumentation() failed")) ;
00908         AfxThrowMemoryException() ;
00909       }
00910       COLE2T lpszName(bstrName);
00911       tvis.item.pszText = lpszName  ;
00912       m_pTree->InsertItem( &tvis ) ;
00913
00914       SysFreeString( bstrName ) ;
00915       bstrName = NULL ;
00916       SysFreeString( bstrDoc ) ;
00917       bstrDoc = NULL ;
00918       SysFreeString( bstrHelp ) ;
00919       bstrHelp = NULL ;
00920
00921       fExpand = TRUE ;
00922     }
00923   }
00924   CATCH(CException, pException)
00925   {
00926     ErrorMessage( strError, hr ) ;
00927     if (pNewItem)
00928       delete pNewItem ;
00929     if (bstrName)
00930       SysFreeString( bstrName ) ;
00931     if (bstrDoc)
00932       SysFreeString( bstrDoc ) ;
00933     if (bstrHelp)
00934       SysFreeString( bstrHelp ) ;
00935     return FALSE ;
00936   }
00937   END_CATCH
00938
00939   if (pti && pattr)
00940     pti->ReleaseTypeAttr( pattr );
00941   return fExpand ;
00942 }
00943
00944 CString CTreeItem::TYPEDESCtoString( TYPEDESC* ptdesc )
00945 {
00946   ASSERT(GetTypeInfo()) ;
00947   return ::TYPEDESCtoString( GetTypeInfo(), ptdesc ) ;
00948 }
00949
00950 void CTreeItem::GetName(CString& szReturn, BOOL fIDLStyle /*= FALSE*/)
00951 {
00952   BSTR    bstrName = NULL ;
00953   BSTR    bstrDoc = NULL ;
00954   BSTR    bstrHelp = NULL ;
00955   DWORD   dwHelpID ;
00956   HRESULT hr ;
00957
00958   TRY
00959   {
00960     hr = GetTypeInfo()->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
00961     if (FAILED(hr))
00962       AfxThrowOleException( hr ) ;
00963
00964     SysFreeString( bstrDoc ) ;
00965     bstrDoc = NULL ;
00966     SysFreeString( bstrHelp ) ;
00967     bstrHelp = NULL ;
00968     LPCTSTR lpszName = COLE2CT(bstrName);
00969     ::SysFreeString(bstrName);
00970     bstrName = NULL;
00971     if (fIDLStyle)
00972     {
00973       TYPEATTR* pattr ;
00974       hr = GetTypeInfo()->GetTypeAttr(&pattr) ;
00975       if FAILED(hr)
00976         AfxThrowOleException(hr) ;
00977
00978       switch(pattr->typekind)
00979       {
00980       // typedef [attributes] enum [tag] {
00981       //      enumlist
00982       // } enumname;
00983       //
00984       // "typedef enum enumname"
00985       case TKIND_ENUM:
00986         szReturn.Format(_T("typedef enum %s"), lpszName ) ;
00987       break ;
00988
00989       // typedef [attributes]
00990       //  struct [tag] {
00991       //      memberlist
00992       //  } structname;
00993       //
00994       // "typedef struct structname"
00995       case TKIND_RECORD:
00996         szReturn.Format(_T("typedef struct %s"), lpszName ) ;
00997       break ;
00998
00999       // [attributes]
01000       //  module modulename {
01001       //      elementlist
01002       // };
01003       case TKIND_MODULE:
01004         szReturn.Format(_T("module %s"), lpszName ) ;
01005       break ;
01006
01007       // [attributes]
01008       //  interface interfacename  [:baseinterface] {
01009       //      functionlist
01010       // };
01011       case TKIND_INTERFACE:
01012         // TODO:  enum base interfaces and append
01013         szReturn.Format(_T("interface %s"), lpszName ) ;
01014       break ;
01015
01016       // [attributes]
01017       //  dispinterface intfname {
01018       //      interface interfacename
01019       // };
01020       case TKIND_DISPATCH :
01021         szReturn.Format(_T("dispinterface %s"), lpszName ) ;
01022       break ;
01023
01024       // [attributes]
01025       //  coclass classname {
01026       //      [attributes2] [interface | dispinterface] interfacename;
01027       //      ...
01028       // };
01029       case TKIND_COCLASS:
01030         szReturn.Format(_T("coclass %s"), lpszName ) ;
01031       break ;
01032
01033       // typedef [attributes] basetype aliasname;
01034       case TKIND_ALIAS:
01035         szReturn.Format(_T("typedef %s %s"),
01036           ::TYPEDESCtoString(GetTypeInfo(), &pattr->tdescAlias), lpszName);
01037       break ;
01038
01039       // typedef [attributes] union [tag] {
01040       //      memberlist
01041       // } unionname;
01042       case TKIND_UNION:
01043         szReturn.Format(_T("typedef union %s"), lpszName ) ;
01044       break ;
01045
01046       default:
01047       break ;
01048       }
01049       GetTypeInfo()->ReleaseTypeAttr( pattr ) ;
01050     }
01051   }
01052   CATCH(CException, pException)
01053   {
01054     if (bstrName)
01055       SysFreeString( bstrName ) ;
01056     if (bstrDoc)
01057       SysFreeString( bstrDoc ) ;
01058     if (bstrHelp)
01059       SysFreeString( bstrHelp ) ;
01060     THROW_LAST();
01061   }
01062   END_CATCH
01063
01064 }
01065
01066 TYPEKIND CTreeItem::GetTypeKind()
01067 {
01068   TYPEATTR* pattr ;
01069   TYPEKIND kind ;
01070
01071   HRESULT hr = GetTypeInfo()->GetTypeAttr(&pattr) ;
01072   if FAILED(hr)
01073     AfxThrowOleException(hr) ;
01074   kind = pattr->typekind ;
01075   GetTypeInfo()->ReleaseTypeAttr(pattr) ;
01076
01077   return kind ;
01078 }
01079
01080 CTreeItem::ITEM_TYPE CTreeItem::TypeKindToItemType( TYPEKIND tkind )
01081 {
01082   ITEM_TYPE t ;
01083
01084   switch(tkind)
01085   {
01086   case TKIND_ENUM:        t = typeEnum ; break ;
01087   case TKIND_RECORD:      t = typeRecord ; break ;
01088   case TKIND_MODULE:      t = typeModule ;break ;
01089   case TKIND_INTERFACE:   t = typeInterface ;break ;
01090   case TKIND_DISPATCH :   t = typeDispinterface ; break ;
01091   case TKIND_COCLASS:     t = typeCoClass ; break ;
01092   case TKIND_ALIAS:       t = typeAlias ; break ;
01093   case TKIND_UNION:       t = typeUnion ; break ;
01094   default:                t = typeUnknown ; break ;
01095   }
01096
01097   return t ;
01098 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page1.cpp Source File

  • vc2008fp
  • NewControls

Page1.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "Page1.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 const size_t MAX_TIP_TEXT_LENGTH = 1024;
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CPage1 property page
00024
00025 IMPLEMENT_DYNCREATE(CPage1, CMFCPropertyPage)
00026
00027 CPage1::CPage1() : CMFCPropertyPage(CPage1::IDD)
00028 {
00029   m_bXPButtons = TRUE;
00030   m_bCheck = TRUE;
00031   m_strToolTip = _T("ToolTip");
00032   m_iImage = 2;
00033   m_iBorderStyle = 0;
00034   m_iCursor = 0;
00035   m_bMenuStayPressed = FALSE;
00036   m_bRightArrow = FALSE;
00037   m_nImageLocation = 0;
00038   m_bMenuDefaultClick = FALSE;
00039 }
00040
00041 CPage1::~CPage1()
00042 {
00043 }
00044
00045 void CPage1::DoDataExchange(CDataExchange* pDX)
00046 {
00047   CMFCPropertyPage::DoDataExchange(pDX);
00048   DDX_Control(pDX, IDC_BUTTON_MULTLINE, m_btnMultiLine);
00049   DDX_Control(pDX, IDC_BORDER, m_wndBorder);
00050   DDX_Control(pDX, IDC_BORDER_LABEL, m_wndBorderLabel);
00051   DDX_Control(pDX, IDC_CHECK_BUTTON, m_btnCheck);
00052   DDX_Control(pDX, IDC_XP_BUTTONS, m_wndXPButtons);
00053   DDX_Check(pDX, IDC_XP_BUTTONS, m_bXPButtons);
00054   DDX_Check(pDX, IDC_CHECK_BUTTON, m_bCheck);
00055   DDX_Control(pDX, IDC_BUTTON, m_Button);
00056   DDX_Text(pDX, IDC_TOOLTIP, m_strToolTip);
00057   DDX_Control(pDX, IDC_TOOLTIP, m_wndToolTip);
00058   DDX_CBIndex(pDX, IDC_IMAGE, m_iImage);
00059   DDX_CBIndex(pDX, IDC_BORDER, m_iBorderStyle);
00060   DDX_CBIndex(pDX, IDC_CURSOR, m_iCursor);
00061   DDX_Control(pDX, IDC_BUTTON_MENU, m_btnMenu);
00062   DDX_Check(pDX, IDC_PRESSED_ON_MENU, m_bMenuStayPressed);
00063   DDX_Check(pDX, IDC_RIGHT_ARROW, m_bRightArrow);
00064   DDX_CBIndex(pDX, IDC_IMAGE_LOCATION, m_nImageLocation);
00065   DDX_Check(pDX, IDC_MENU_DEFAULT_CLICK, m_bMenuDefaultClick);
00066
00067   DDX_Control(pDX, IDC_RADIO1, m_btnRadio1);
00068   DDX_Control(pDX, IDC_RADIO2, m_btnRadio2);
00069   DDX_Control(pDX, IDC_RADIO3, m_btnRadio3);
00070   DDX_Control(pDX, IDC_RADIO4, m_btnRadio4);
00071 }
00072
00073 BEGIN_MESSAGE_MAP(CPage1, CMFCPropertyPage)
00074   ON_BN_CLICKED(IDC_XP_BUTTONS, OnXpButtons)
00075   ON_BN_CLICKED(IDC_SET_TOOLTIP, OnSetTooltip)
00076   ON_CBN_SELCHANGE(IDC_CURSOR, OnSetCursor)
00077   ON_BN_CLICKED(IDC_BUTTON, OnButton)
00078   ON_BN_CLICKED(IDC_RIGHT_ARROW, OnRightArrow)
00079   ON_BN_CLICKED(IDC_BUTTON_MENU, OnButtonMenu)
00080   ON_BN_CLICKED(IDC_PRESSED_ON_MENU, OnPressedOnMenu)
00081   ON_COMMAND(ID_DIALOG_ABOUT, OnDialogAbout)
00082   ON_UPDATE_COMMAND_UI(ID_ITEM_2, OnUpdateItem2)
00083   ON_CBN_SELCHANGE(IDC_IMAGE, OnResetButton)
00084   ON_CBN_SELCHANGE(IDC_BORDER, OnResetButton)
00085   ON_CBN_SELCHANGE(IDC_IMAGE, OnResetButton)
00086   ON_CBN_SELCHANGE(IDC_BORDER, OnResetButton)
00087   ON_CBN_SELCHANGE(IDC_IMAGE_LOCATION, OnResetButton)
00088   ON_BN_CLICKED(IDC_MENU_DEFAULT_CLICK, OnMenuDefaultClick)
00089 END_MESSAGE_MAP()
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // CPage1 message handlers
00093
00094 void CPage1::OnXpButtons()
00095 {
00096   UpdateData();
00097
00098   CMFCButton::EnableWindowsTheming(m_bXPButtons);
00099
00100   m_wndBorder.EnableWindow(!m_bXPButtons);
00101   m_wndBorderLabel.EnableWindow(!m_bXPButtons);
00102
00103   RedrawWindow();
00104 }
00105
00106 BOOL CPage1::OnInitDialog()
00107 {
00108   CMFCPropertyPage::OnInitDialog();
00109
00110   if (!CMFCVisualManagerWindows::IsWinXPThemeAvailable())
00111   {
00112     m_bXPButtons = FALSE;
00113     m_wndXPButtons.EnableWindow(FALSE);
00114   }
00115   else
00116   {
00117     m_wndBorder.EnableWindow(FALSE);
00118     m_wndBorderLabel.EnableWindow(FALSE);
00119   }
00120
00121   m_Button.m_bTransparent = TRUE;
00122
00123   OnResetButton();
00124   OnSetCursor();
00125   OnSetTooltip();
00126
00127   m_menu.LoadMenu(IDR_MENU1);
00128   m_btnMenu.m_hMenu = m_menu.GetSubMenu(0)->GetSafeHmenu();
00129   m_btnMenu.SizeToContent();
00130   m_btnMenu.m_bOSMenu = FALSE;
00131
00132   m_wndToolTip.SetLimitText(MAX_TIP_TEXT_LENGTH);
00133
00134   BOOL b32BitIcons = afxGlobalData.m_nBitsPerPixel >= 16;
00135   m_btnCheck.SetImage(b32BitIcons ? IDB_CHECKNO32 : IDB_CHECKNO);
00136   m_btnCheck.SetCheckedImage(b32BitIcons ? IDB_CHECK32 : IDB_CHECK);
00137   m_btnCheck.SizeToContent();
00138   m_btnCheck.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
00139
00140   m_btnRadio1.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
00141   m_btnRadio2.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
00142   m_btnRadio3.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
00143   m_btnRadio4.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
00144
00145   m_btnRadio1.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);
00146   m_btnRadio2.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);
00147   m_btnRadio3.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);
00148   m_btnRadio4.SetImage(b32BitIcons ? IDB_RADIO_OFF32 : IDB_RADIO_OFF);
00149
00150   m_btnRadio1.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);
00151   m_btnRadio2.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);
00152   m_btnRadio3.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);
00153   m_btnRadio4.SetCheckedImage(b32BitIcons ? IDB_RADIO_ON32 : IDB_RADIO_ON);
00154
00155   m_btnRadio1.SizeToContent();
00156   m_btnRadio2.SizeToContent();
00157   m_btnRadio3.SizeToContent();
00158   m_btnRadio4.SizeToContent();
00159
00160   m_btnRadio1.SetCheck(TRUE);
00161
00162   m_btnMultiLine.SizeToContent();
00163
00164   CMFCToolBar::AddToolBarForImageCollection(IDR_TOOLBAR_MENU_IMAGES);
00165
00166   UpdateData(FALSE);
00167
00168   return TRUE;  // return TRUE unless you set the focus to a control
00169 }
00170 void CPage1::OnResetButton()
00171 {
00172   UpdateData();
00173
00174   switch (m_iBorderStyle)
00175   {
00176   case 0:
00177     m_Button.m_nFlatStyle = CMFCButton::BUTTONSTYLE_FLAT;
00178     break;
00179
00180   case 1:
00181     m_Button.m_nFlatStyle = CMFCButton::BUTTONSTYLE_SEMIFLAT;
00182     break;
00183
00184   case 2:
00185     m_Button.m_nFlatStyle = CMFCButton::BUTTONSTYLE_3D;
00186   }
00187
00188   if (m_iImage == 1) // Text only
00189   {
00190     m_Button.SetImage((HBITMAP) NULL);
00191   }
00192   else
00193   {
00194     BOOL b32BitIcons = afxGlobalData.m_nBitsPerPixel >= 16;
00195
00196     if (b32BitIcons)
00197     {
00198       m_Button.SetImage(IDB_BTN1_32, IDB_BTN1_HOT_32);
00199     }
00200     else
00201     {
00202       m_Button.SetImage(IDB_BTN1, IDB_BTN1_HOT);
00203     }
00204   }
00205
00206   if (m_iImage == 0)
00207   {
00208     m_Button.SetWindowText(_T(""));
00209   }
00210   else
00211   {
00212     m_Button.SetWindowText(_T("Button"));
00213   }
00214
00215   switch (m_nImageLocation)
00216   {
00217   case 0:
00218     m_Button.m_bRightImage = FALSE;
00219     m_Button.m_bTopImage = FALSE;
00220     break;
00221
00222   case 1:
00223     m_Button.m_bRightImage = TRUE;
00224     m_Button.m_bTopImage = FALSE;
00225     break;
00226
00227   case 2:
00228     m_Button.m_bRightImage = FALSE;
00229     m_Button.m_bTopImage = TRUE;
00230     break;
00231   }
00232
00233   m_Button.SizeToContent();
00234   m_Button.Invalidate();
00235 }
00236
00237 void CPage1::OnSetCursor()
00238 {
00239   UpdateData();
00240
00241   switch (m_iCursor)
00242   {
00243   case 0:
00244     m_Button.SetMouseCursor(NULL);
00245     break;
00246
00247   case 1:
00248     m_Button.SetMouseCursorHand();
00249     break;
00250
00251   case 2:
00252     m_Button.SetMouseCursor(AfxGetApp()->LoadCursor(IDC_CURSOR));
00253     break;
00254   }
00255 }
00256
00257 void CPage1::OnButton()
00258 {
00259   MessageBox(_T("Button Clicked!"));
00260 }
00261
00262 void CPage1::OnSetTooltip()
00263 {
00264   UpdateData();
00265   m_Button.SetTooltip(m_strToolTip);
00266 }
00267
00268 void CPage1::OnPressedOnMenu()
00269 {
00270   UpdateData();
00271   m_btnMenu.m_bStayPressed = m_bMenuStayPressed;
00272 }
00273
00274 void CPage1::OnRightArrow()
00275 {
00276   UpdateData();
00277   m_btnMenu.m_bRightArrow = m_bRightArrow;
00278   m_btnMenu.Invalidate();
00279 }
00280
00281 void CPage1::OnButtonMenu()
00282 {
00283   CString strItem;
00284
00285   switch (m_btnMenu.m_nMenuResult)
00286   {
00287   case ID_ITEM_1:
00288     strItem = _T("Item 1");
00289     break;
00290
00291   case ID_ITEM_2:
00292     strItem = _T("Item 2");
00293     break;
00294
00295   case ID_ITEM_3:
00296     strItem = _T("Item 3");
00297     break;
00298
00299   case ID_ITEM_4:
00300     strItem = _T("Item 4");
00301     break;
00302
00303   default:
00304     if (!m_bMenuDefaultClick)
00305     {
00306       return;
00307     }
00308
00309     strItem = _T("Default Menu Button Action");
00310     break;
00311   }
00312
00313   MessageBox(strItem);
00314 }
00315
00316 void CPage1::OnDialogAbout()
00317 {
00318   CAboutDlg aboutDlg;
00319   aboutDlg.DoModal();
00320 }
00321
00322 void CPage1::OnUpdateItem2(CCmdUI* pCmdUI)
00323 {
00324   pCmdUI->SetCheck();
00325 }
00326
00327 void CPage1::OnMenuDefaultClick()
00328 {
00329   UpdateData();
00330
00331   m_btnMenu.m_bDefaultClick = m_bMenuDefaultClick;
00332   m_btnMenu.RedrawWindow();
00333 }
00334
00335
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExtCtl.Cpp Source File

  • ole
  • TstCon

ExtCtl.Cpp

Go to the documentation of this file.
00001 // File: ExtCtl.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 // {FFC3C462-18DE-11d1-8E2F-00C04FB68D60}
00020 const GUID LIBID_TCPROPSLib =
00021 { 0xffc3c462, 0x18de, 0x11d1, { 0x8e, 0x2f, 0x0, 0xc0, 0x4f, 0xb6, 0x8d, 0x60 } };
00022
00023 CExtendedControl::CExtendedControl() :
00024    m_nRefCount( 0 ),
00025    m_pControl( NULL ),
00026    m_tVisible( TRUE )
00027 {
00028 }
00029
00030 CExtendedControl::~CExtendedControl()
00031 {
00032    if( m_pInnerDispatch != NULL )
00033    {
00034     AddRef();  // Undo the artificial Release
00035     m_pInnerDispatch.Release();
00036    }
00037
00038    if( m_pControl != NULL )
00039    {
00040     m_pControl->Release();
00041     m_pControl = NULL;
00042    }
00043 }
00044
00045 HRESULT CExtendedControl::Init( REFCLSID clsidControl,
00046    CTestContainer98Item* pItem )
00047 {
00048    HRESULT hResult;
00049    ITypeLibPtr pTypeLib;
00050    LPOLESTR pszModuleO;
00051    TCHAR szModule[MAX_PATH];
00052    CString strTLBPath;
00053
00054    ASSERT( m_pItem != NULL );
00055    ASSERT( m_pControl == NULL );
00056
00057    hResult = CoCreateInstance( clsidControl, (IUnknown*)this,
00058     CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, IID_IUnknown, (void**)&m_pControl );
00059    if( FAILED( hResult ) )
00060    {
00061     return( hResult );
00062    }
00063
00064    m_pInnerDispatch = m_pControl;
00065    if( m_pInnerDispatch == NULL )
00066    {
00067     return( E_NOINTERFACE );
00068    }
00069    Release();  // Artificially release because we QI'd the aggregate.
00070
00071    GetModuleFileName( NULL, szModule, MAX_PATH );
00072    strTLBPath = szModule;
00073    strTLBPath += _T( "\\2" );  // Load the second TLB from the executable
00074
00075    pszModuleO = strTLBPath.AllocSysString();
00076    hResult = LoadTypeLib( pszModuleO, &pTypeLib );
00077    if( FAILED( hResult ) )
00078    {
00079     TCTrace( TRACELEVEL_NORMAL,
00080      "Failed to load typelib for extended control\n" );
00081     return( hResult );
00082    }
00083
00084    hResult = pTypeLib->GetTypeInfoOfGuid( __uuidof( ITCExtendedControl ),
00085     &m_pTypeInfo );
00086    if( FAILED( hResult ) )
00087    {
00088     return( hResult );
00089    }
00090
00091    m_pItem = pItem;
00092    m_pView = m_pItem->GetDocument()->GetView();
00093
00094    return( S_OK );
00095 }
00096
00097 HRESULT CExtendedControl::CreateInstance( REFCLSID clsidControl,
00098    CTestContainer98Item* pItem, IUnknown* pOuterUnknown, REFIID iid,
00099    void** ppInterface )
00100 {
00101    CExtendedControl* pObject;
00102    HRESULT hResult;
00103
00104    (void)pOuterUnknown;
00105
00106    ENSURE( pOuterUnknown == NULL );
00107    ENSURE( ppInterface != NULL );
00108    *ppInterface = NULL;
00109
00110 #pragma warning(push)
00111 #pragma warning(disable: 6014)
00112    /* prefast noise VSW 489981 */
00113    pObject = new CExtendedControl;
00114
00115    pObject->m_nRefCount++;  // Protect ourselves while we create the aggregate
00116
00117    hResult = pObject->Init( clsidControl, pItem );
00118    if( FAILED( hResult ) )
00119    {
00120     delete pObject;
00121     return( hResult );
00122    }
00123
00124    hResult = pObject->QueryInterface( iid, ppInterface );
00125    if( FAILED( hResult ) )
00126    {
00127     delete pObject;
00128     return( hResult );
00129    }
00130
00131    pObject->m_nRefCount--;  // Undo the extra refcount we added to protect ourself
00132    ASSERT( pObject->m_nRefCount > 0 );
00133
00134    return( S_OK );
00135 #pragma warning(pop)
00136 }
00137
00138 STDMETHODIMP_( ULONG ) CExtendedControl::AddRef()
00139 {
00140    m_nRefCount++;
00141
00142    return( m_nRefCount );
00143 }
00144
00145 STDMETHODIMP_( ULONG ) CExtendedControl::Release()
00146 {
00147    m_nRefCount--;
00148    if( m_nRefCount == 0 )
00149    {
00150     m_nRefCount++;
00151     delete this;
00152     return( 0 );
00153    }
00154
00155    return( m_nRefCount );
00156 }
00157
00158 STDMETHODIMP CExtendedControl::QueryInterface( REFIID iid, void** ppInterface )
00159 {
00160    HRESULT hResult;
00161
00162    ENSURE( ppInterface != NULL );
00163    *ppInterface = NULL;
00164
00165
00166    if( iid == IID_IUnknown || iid == IID_IDispatch )
00167    {
00168     *ppInterface = (IDispatch*)this;
00169     AddRef();
00170    }
00171    else if( iid == __uuidof( ITCExtendedControl ) )
00172    {
00173     *ppInterface = (ITCExtendedControl*)this;
00174     AddRef();
00175    }
00176    else
00177    {
00178     ASSERT( m_pControl != NULL );
00179     if (m_pControl == NULL)
00180     {
00181      hResult = E_UNEXPECTED;
00182     }
00183     else
00184     {
00185      hResult = m_pControl->QueryInterface( iid, ppInterface );
00186     }
00187
00188     if( FAILED( hResult ) )
00189     {
00190      return( hResult );
00191     }
00192    }
00193
00194    return( S_OK );
00195 }
00196
00197 STDMETHODIMP CExtendedControl::GetIDsOfNames( REFIID iid, LPOLESTR* ppszNames,
00198    UINT nNames, LCID lcid, DISPID* pDispIDs )
00199 {
00200    HRESULT hResult;
00201
00202    hResult = m_pTypeInfo->GetIDsOfNames( ppszNames, nNames, pDispIDs );
00203    if( FAILED( hResult ) )
00204    {
00205     hResult = m_pInnerDispatch->GetIDsOfNames( iid, ppszNames, nNames, lcid,
00206      pDispIDs );
00207    }
00208
00209    return( hResult );
00210 }
00211
00212 STDMETHODIMP CExtendedControl::GetTypeInfo( UINT iTypeInfo, LCID lcid,
00213    ITypeInfo** ppTypeInfo )
00214 {
00215    return( m_pInnerDispatch->GetTypeInfo( iTypeInfo, lcid, ppTypeInfo ) );
00216 }
00217
00218 STDMETHODIMP CExtendedControl::GetTypeInfoCount( UINT* pnInfoCount )
00219 {
00220    return( m_pInnerDispatch->GetTypeInfoCount( pnInfoCount ) );
00221 }
00222
00223 HRESULT CExtendedControl::InternalInvoke( DISPID dispidMember, REFIID iid,
00224    LCID lcid, WORD wFlags, DISPPARAMS* pdpParams, VARIANT* pvarResult,
00225    EXCEPINFO* pExceptionInfo, UINT* piArgError )
00226 {
00227    (void)iid;
00228    (void)lcid;
00229
00230    return( m_pTypeInfo->Invoke( this, dispidMember, wFlags, pdpParams,
00231     pvarResult, pExceptionInfo, piArgError ) );
00232 }
00233
00234 STDMETHODIMP CExtendedControl::Invoke( DISPID dispidMember, REFIID iid,
00235    LCID lcid, WORD wFlags, DISPPARAMS* pdpParams, VARIANT* pvarResult,
00236    EXCEPINFO* pExceptionInfo, UINT* piArgError )
00237 {
00238    HRESULT hResult;
00239
00240    if( pdpParams == NULL )
00241    {
00242     return( E_INVALIDARG );
00243    }
00244
00245    hResult = DISP_E_MEMBERNOTFOUND;
00246    if( iid == IID_NULL )
00247    {
00248     hResult = InternalInvoke( dispidMember, iid, lcid, wFlags, pdpParams,
00249      pvarResult, pExceptionInfo, piArgError );
00250    }
00251    if( hResult == DISP_E_MEMBERNOTFOUND )
00252    {
00253     hResult = m_pInnerDispatch->Invoke( dispidMember, iid, lcid, wFlags,
00254      pdpParams, pvarResult, pExceptionInfo, piArgError );
00255    }
00256
00257    return( hResult );
00258 }
00259
00260 STDMETHODIMP CExtendedControl::get_Name( BSTR* pbstrName )
00261 {
00262    ENSURE( pbstrName != NULL );
00263
00264    *pbstrName = m_bstrName.copy();
00265    if( *pbstrName == NULL )
00266    {
00267     return( E_OUTOFMEMORY );
00268    }
00269
00270    return( S_OK );
00271 }
00272
00273 STDMETHODIMP CExtendedControl::put_Name( BSTR bstrName )
00274 {
00275    m_bstrName = bstrName;
00276
00277    return( S_OK );
00278 }
00279
00280 STDMETHODIMP CExtendedControl::get_PositionX( long* px )
00281 {
00282    if( px == NULL )
00283    {
00284     return( E_POINTER );
00285    }
00286
00287    *px = m_ptPosition.x;
00288
00289    return( S_OK );
00290 }
00291
00292 STDMETHODIMP CExtendedControl::put_PositionX( long x )
00293 {
00294    m_ptPosition.x = x;
00295
00296    return( S_OK );
00297 }
00298
00299 STDMETHODIMP CExtendedControl::get_PositionY( long* py )
00300 {
00301    if( py == NULL )
00302    {
00303     return( E_POINTER );
00304    }
00305
00306    *py = m_ptPosition.y;
00307
00308    return( S_OK );
00309 }
00310
00311 STDMETHODIMP CExtendedControl::put_PositionY( long y )
00312 {
00313    m_ptPosition.y = y;
00314
00315    return( S_OK );
00316 }
00317
00318 STDMETHODIMP CExtendedControl::get_SizeX( long* px )
00319 {
00320    if( px == NULL )
00321    {
00322     return( E_POINTER );
00323    }
00324
00325    *px = m_size.cx;
00326
00327    return( S_OK );
00328 }
00329
00330 STDMETHODIMP CExtendedControl::put_SizeX( long x )
00331 {
00332    m_size.cx = x;
00333
00334    return( S_OK );
00335 }
00336
00337 STDMETHODIMP CExtendedControl::get_SizeY( long* py )
00338 {
00339    if( py == NULL )
00340    {
00341     return( E_POINTER );
00342    }
00343
00344    *py = m_size.cy;
00345
00346    return( S_OK );
00347 }
00348
00349 STDMETHODIMP CExtendedControl::put_SizeY( long y )
00350 {
00351    m_size.cy = y;
00352
00353    return( S_OK );
00354 }
00355
00356 STDMETHODIMP CExtendedControl::raw_Activate()
00357 {
00358    if( !m_pItem->IsInPlaceActive() )
00359    {
00360     m_pItem->Activate( OLEIVERB_SHOW, m_pView );
00361    }
00362
00363    return( S_OK );
00364 }
00365
00366 STDMETHODIMP CExtendedControl::raw_Deactivate()
00367 {
00368    if( m_pItem->IsInPlaceActive() )
00369    {
00370     m_pItem->Deactivate();
00371    }
00372
00373    return( S_OK );
00374 }
00375
00376 STDMETHODIMP CExtendedControl::raw_UIActivate()
00377 {
00378    if( !m_pItem->IsUIActive() )
00379    {
00380     m_pItem->DoVerb( OLEIVERB_UIACTIVATE, m_pView );
00381    }
00382
00383    return( S_OK );
00384 }
00385
00386 STDMETHODIMP CExtendedControl::raw_UIDeactivate()
00387 {
00388    if( m_pItem->IsUIActive() )
00389    {
00390     m_pItem->DeactivateUI();
00391    }
00392
00393    return( S_OK );
00394 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyScheduler Member List

This is the complete list of members for CMyScheduler, including all inherited members.
CMyScheduler() | CMyScheduler |
m_iDay | CMyScheduler |
m_iEndHour | CMyScheduler |
m_iEndMinutes | CMyScheduler |
m_iId | CMyScheduler |
m_iMonth | CMyScheduler |
m_iStartHour | CMyScheduler |
m_iStartMinutes | CMyScheduler |
m_iYear | CMyScheduler |
m_szDescription | CMyScheduler |
m_szTitle | CMyScheduler |
operator=(const CMyScheduler &scheduler) | CMyScheduler |
Serialize(CArchive &ar) | CMyScheduler | [virtual]
~CMyScheduler() | CMyScheduler | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MyCustomizationPage.cpp Source File

  • vc2008fp
  • CustomPages

MyCustomizationPage.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "CustomPages.h"
00013 #include "MyCustomizationPage.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 IMPLEMENT_DYNCREATE(CMyCustomizationPage, CPropertyPage)
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMyCustomizationPage dialog
00025
00026
00027 CMyCustomizationPage::CMyCustomizationPage(CWnd* /*pParent*/ /*=NULL*/)
00028   : CPropertyPage(CMyCustomizationPage::IDD)
00029 {
00030 }
00031
00032
00033 void CMyCustomizationPage::DoDataExchange(CDataExchange* pDX)
00034 {
00035   CDialog::DoDataExchange(pDX);
00036 }
00037
00038
00039 BEGIN_MESSAGE_MAP(CMyCustomizationPage, CDialog)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CMyCustomizationPage message handlers
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/hello.h Source File

  • advanced
  • mtmdi

hello.h

Go to the documentation of this file.
00001 // hello.h : Declares the class interfaces for the Hello child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #ifndef __HELLO_H__
00014 #define __HELLO_H__
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017
00018 // class CHelloWnd
00019
00020 class CHelloWnd : public CMDIChildWnd
00021 {
00022 private:
00023   using CMDIChildWnd::Create;
00024
00025 public:
00026   CHelloWnd();
00027   BOOL Create(LPCTSTR szTitle, LONG style = 0,
00028         const RECT& rect = rectDefault,
00029         CMDIFrameWnd* pParent = NULL);
00030
00031 // Implementation
00032 protected:
00033   static CMenu NEAR menu;     // menu for all HELLO windows
00034
00035   UINT m_nIDColor;
00036   COLORREF m_clrText;
00037
00038   // message handlers
00039   //{{AFX_MSG(CHelloWnd)
00040   afx_msg void OnPaint();
00041   afx_msg void OnColor();
00042   afx_msg void OnCustomColor();
00043   afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
00044   //}}AFX_MSG
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050
00051 #endif // __HELLO_H__
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View3.cpp Source File

  • vc2008fp
  • OutlookMultiViews

View3.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "OutlookMultiViews.h"
00003 #include "View3.h"
00004
00005 #ifdef _DEBUG
00006 #define new DEBUG_NEW
00007 #undef THIS_FILE
00008 static char THIS_FILE[] = __FILE__;
00009 #endif
00010
00011 static const CString strInfo =
00012   _T("This sample illustrates how to switch between multiple views on a single document in a SDI application\r\n\r\nView 4");
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CView3
00016
00017 IMPLEMENT_DYNCREATE(CView3, CView)
00018
00019 CView3::CView3()
00020 {
00021 }
00022
00023 CView3::~CView3()
00024 {
00025 }
00026
00027
00028 BEGIN_MESSAGE_MAP(CView3, CView)
00029   ON_WM_CONTEXTMENU()
00030   // Standard printing commands
00031   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00032   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00033   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CView3 drawing
00038
00039 void CView3::OnDraw(CDC* pDC)
00040 {
00041   const int iOffset = 20;
00042
00043   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00044   ASSERT (pFontOld != NULL);
00045
00046   CRect rectClient;
00047   GetClientRect (&rectClient);
00048
00049   CRect rectText = rectClient;
00050   rectText.DeflateRect (iOffset, iOffset);
00051   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00052
00053   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00054               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00055
00056   CRect rectFrame = rectText;
00057   rectFrame.InflateRect (iOffset, iOffset);
00058
00059   CDrawingManager dm (*pDC);
00060
00061   dm.FillGradient2 (rectFrame, RGB (219, 227, 251), RGB (167, 186, 247), 35);
00062
00063   pDC->Draw3dRect (rectFrame, RGB (94, 128, 240), RGB (94, 128, 240));
00064
00065   pDC->SetBkMode (TRANSPARENT);
00066   pDC->SetTextColor (0);
00067   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00068   pDC->SelectObject (pFontOld);
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CView3 diagnostics
00073
00074 #ifdef _DEBUG
00075 void CView3::AssertValid() const
00076 {
00077   CView::AssertValid();
00078 }
00079
00080 void CView3::Dump(CDumpContext& dc) const
00081 {
00082   CView::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CView3 message handlers
00088
00089 void CView3::OnFilePrintPreview()
00090 {
00091   AFXPrintPreview (this);
00092 }
00093
00094 BOOL CView3::OnPreparePrinting(CPrintInfo* pInfo)
00095 {
00096   // default preparation
00097   return DoPreparePrinting(pInfo);
00098 }
00099
00100 void CView3::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00101 {
00102   // TODO: add extra initialization before printing
00103 }
00104
00105 void CView3::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00106 {
00107   // TODO: add cleanup after printing
00108 }
00109
00110 void CView3::OnContextMenu(CWnd*, CPoint point)
00111 {
00112   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00113 }
00114
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/statpage.h Source File

  • ole
  • drawcli

statpage.h

Go to the documentation of this file.
00001 // statpage.h : header file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 /////////////////////////////////////////////////////////////////////////////
00012 // CStatPage dialog
00013
00014 class CStatPage : public CPropertyPage
00015 {
00016     DECLARE_DYNCREATE(CStatPage)
00017
00018 // Construction
00019 public:
00020     CStatPage();
00021     ~CStatPage();
00022
00023 // Dialog Data
00024     //{{AFX_DATA(CStatPage)
00025   enum { IDD = IDD_STAT_PAGE };
00026   CString m_strSavedBy;
00027   CString m_strRevNum;
00028   CString m_strEditTime;
00029   CString m_strLastPrint;
00030   CString m_strCreateDate;
00031   CString m_strLastSave;
00032   CString m_strNumPages;
00033   CString m_strNumWords;
00034   CString m_strNumChars;
00035   CString m_strSecurity;
00036   //}}AFX_DATA
00037
00038
00039 // Overrides
00040   // ClassWizard generate virtual function overrides
00041     //{{AFX_VIRTUAL(CStatPage)
00042   protected:
00043   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00044   //}}AFX_VIRTUAL
00045
00046 // Implementation
00047 protected:
00048   // Generated message map functions
00049     //{{AFX_MSG(CStatPage)
00050     // NOTE: the ClassWizard will add member functions here
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053
00054 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNewControlsApp Member List

This is the complete list of members for CNewControlsApp, including all inherited members.
CNewControlsApp() | CNewControlsApp |
InitInstance() | CNewControlsApp | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutlookDemoDoc Member List

This is the complete list of members for COutlookDemoDoc, including all inherited members.
COutlookDemoDoc() | COutlookDemoDoc | [protected]
OnAddressBook() | COutlookDemoDoc | [protected]
OnFindContact() | COutlookDemoDoc | [protected]
OnNewAppointment() | COutlookDemoDoc | [protected]
OnNewContract() | COutlookDemoDoc | [protected]
OnNewDistributionList() | COutlookDemoDoc | [protected]
OnNewDocument() | COutlookDemoDoc | [virtual]
OnNewFax() | COutlookDemoDoc | [protected]
OnNewFolder() | COutlookDemoDoc | [protected]
OnNewJournalEntry() | COutlookDemoDoc | [protected]
OnNewMail() | COutlookDemoDoc | [protected]
OnNewMeeting() | COutlookDemoDoc | [protected]
OnNewNote() | COutlookDemoDoc | [protected]
OnNewPostFolder() | COutlookDemoDoc | [protected]
OnNewShortcut() | COutlookDemoDoc | [protected]
OnNewTask() | COutlookDemoDoc | [protected]
OnNewTaskRequest() | COutlookDemoDoc | [protected]
OnRulesWizard() | COutlookDemoDoc | [protected]
OnSendReceive() | COutlookDemoDoc | [protected]
OnViewBack() | COutlookDemoDoc | [protected]
OnViewUp() | COutlookDemoDoc | [protected]
OnWebAddress() | COutlookDemoDoc | [protected]
OnWebBack() | COutlookDemoDoc | [protected]
OnWebFind() | COutlookDemoDoc | [protected]
OnWebRefresh() | COutlookDemoDoc | [protected]
OnWebStart() | COutlookDemoDoc | [protected]
Serialize(CArchive &ar) | COutlookDemoDoc | [virtual]
~COutlookDemoDoc() | COutlookDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExplore.cpp Source File

  • internet
  • DHtmlExplore

DHtmlExplore.cpp

Go to the documentation of this file.
00001 // DHtmlExplore.cpp : Defines the class behaviors for the application.
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "DHtmlExplore.h"
00013 #include "DHtmlExploreDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CDHtmlExploreApp
00023
00024 BEGIN_MESSAGE_MAP(CDHtmlExploreApp, CWinApp)
00025   //{{AFX_MSG_MAP(CDHtmlExploreApp)
00026     // NOTE - the ClassWizard will add and remove mapping macros here.
00027     //    DO NOT EDIT what you see in these blocks of generated code!
00028   //}}AFX_MSG
00029   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CDHtmlExploreApp construction
00034
00035 CDHtmlExploreApp::CDHtmlExploreApp()
00036 {
00037   // TODO: add construction code here,
00038   // Place all significant initialization in InitInstance
00039 }
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // The one and only CDHtmlExploreApp object
00043
00044 CDHtmlExploreApp theApp;
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CDHtmlExploreApp initialization
00048
00049 BOOL CDHtmlExploreApp::InitInstance()
00050 {
00051   AfxEnableControlContainer();
00052
00053   CDHtmlExploreDlg dlg;
00054   m_pMainWnd = &dlg;
00055   int nResponse = (int)dlg.DoModal();
00056   if (nResponse == IDOK)
00057   {
00058     // TODO: Place code here to handle when the dialog is
00059     //  dismissed with OK
00060   }
00061   else if (nResponse == IDCANCEL)
00062   {
00063     // TODO: Place code here to handle when the dialog is
00064     //  dismissed with Cancel
00065   }
00066
00067   // Since the dialog has been closed, return FALSE so that we exit the
00068   //  application, rather than start the application's message pump.
00069   return FALSE;
00070 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface16.cpp Source File

  • general
  • MMXSwarm

SSE2Surface16.cpp

Go to the documentation of this file.
00001 // SSE2Surface16.cpp : implementation of the CSSE2Surface16Intrinsic
00002 // class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012 //
00013 #include "stdafx.h"
00014 #include "SSE2Surface.h"
00015 #include "SSE2Wrapper.h"
00016
00017 typedef CSSE2Unsigned16Saturated CSSE2;
00018
00019 // Optimized for a 8 pixel processing 16 bit buffer
00020 void CSSE2Surface16Intrinsic::AdjustWidth(int *pWidth)
00021 {
00022   ASSERT(pWidth != NULL);
00023   ASSERT(m_kDeltaX <= 7);
00024
00025   // need to align/round-up to 128-bits/16-bytes
00026   // so that each line starts on an aligned boundary.
00027
00028   // Since a pixel is 2 bytes wide, this means rounding
00029   // the nearest 8 pixels.
00030   *pWidth = (*pWidth+7-m_kDeltaX)& ~0x7;
00031 }
00032
00033 void CSSE2Surface16Intrinsic::OnCreated()
00034 {
00035   ASSERT(GetBitDepth() == 16);
00036   ASSERT((GetPitch() & 0xF) == 0);
00037   ASSERT(GetVisibleWidth() && GetVisibleHeight());
00038
00039   int width = GetVisibleWidth();
00040     m_qqwpl  = GetPitch()/16; // qwords Per Line
00041     m_width = (width+7)/8; // 8 pixels at a time
00042 }
00043
00044 // Note: It's still faster than the brute force approach,
00045 // However, it's slower than choosing 24 bit and blitting to
00046 // a 16 bit screen. breaking out the bits into MMX friendly sizes
00047 // doesn't work out well.
00048 void CSSE2Surface16Intrinsic::BlurBits()
00049 {
00050     int height = GetVisibleHeight();
00051     __m128i *pCur  = (__m128i *)GetPixelAddress(0,0);
00052
00053   CSSE2 cUpBase, cDownBase, cCurBase, cLeftBase, cRightBase;
00054   CSSE2 cUp, cDown, cCur, cLeft, cRight;
00055   CSSE2 cDest;
00056   CSSE2 cMask;
00057   cMask.Fill(0x001f001f001f001fu); // colorspace mask - 5 bits per color
00058
00059   do {
00060     int width = m_width;
00061     do {
00062       // Load pixels and do the mmx unpack
00063       // Note: pwCur is used to do non-aligned
00064       // data reads - which is not normally recommended.
00065       // on X86, it is faster than loading aligned and
00066       // shift-oring.
00067       WORD *pwCur = (WORD *)pCur;
00068       cLeftBase.LoadU(pwCur-1);
00069       cCurBase.Load(pCur);
00070       cRightBase.LoadU(pwCur+1);
00071       cUpBase.Load(pCur-m_qqwpl);
00072       cDownBase.Load(pCur+m_qqwpl);
00073
00074       cLeft = cLeftBase & cMask;
00075       cCur = cCurBase & cMask;
00076       cRight = cRightBase & cMask;
00077       cUp = cUpBase & cMask;
00078       cDown = cDownBase & cMask;
00079
00080       // Actual math. Don't step on current, or right.
00081       // Sum the 4 around and double the middle
00082       // Do current pixel in this line
00083       cDest = ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
00084       cMask <<= 5;
00085
00086       cLeft = cLeftBase & cMask;
00087       cCur = cCurBase & cMask;
00088       cRight = cRightBase & cMask;
00089       cUp = cUpBase & cMask;
00090       cDown = cDownBase & cMask;
00091
00092       // Actual math for next color space
00093       cDest |= cMask & ((cDown+cUp+cLeft+cRight+(cCur<<2))>>3);
00094       cMask <<= 5;
00095
00096       cLeft = (cLeftBase & cMask) >> 3;
00097       cCur = (cCurBase & cMask) >> 3;
00098       cRight = (cRightBase & cMask) >> 3;
00099       cUp = (cUpBase & cMask) >> 3;
00100       cDown = (cDownBase & cMask) >> 3;
00101
00102       // Actual math for next color space
00103       cDest |= cMask & (cDown+cUp+cLeft+cRight+(cCur<<2));
00104       cDest.Store(pCur++);
00105       cMask >>= 10;
00106     } while (--width > 0);
00107   } while (--height > 0);
00108 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinksBar.h Source File

  • vc2008fp
  • IEDemo

LinksBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CLinksBar window
00015
00016 class CLinksBar : public CMFCToolBar
00017 {
00018   DECLARE_SERIAL(CLinksBar)
00019
00020 // Construction
00021 public:
00022   CLinksBar();
00023
00024 // Attributes
00025 public:
00026
00027 // Operations
00028 public:
00029
00030 // Overrides
00031   // ClassWizard generated virtual function overrides
00032   //{{AFX_VIRTUAL(CLinksBar)
00033   //}}AFX_VIRTUAL
00034
00035   virtual BOOL OnSendCommand (const CMFCToolBarButton* pButton);
00036   virtual BOOL CanBeRestored () const
00037   {
00038     return TRUE;
00039   }
00040   virtual BOOL RestoreOriginalstate ();
00041
00042   virtual BOOL AllowChangeTextLabels () const
00043   {
00044     return FALSE;
00045   }
00046
00047 // Implementation
00048 public:
00049   virtual ~CLinksBar();
00050
00051   // Generated message map functions
00052 protected:
00053   //{{AFX_MSG(CLinksBar)
00054   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00055   //}}AFX_MSG
00056   DECLARE_MESSAGE_MAP()
00057 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/colledoc.cpp Source File

  • advanced
  • collect

colledoc.cpp

Go to the documentation of this file.
00001 // colledoc.cpp : implementation of the CCollectDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014
00015 #include "colledoc.h"
00016 #include "resource.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMyStruct
00025
00026 void CMyStruct::FormatMyStruct(CString& str)
00027 {
00028   str.Format(_T("{%i, %.4f, %s}"), m_int, m_float, (LPCTSTR)m_str);
00029 }
00030
00031 #if _MSC_VER > 1020
00032 template <> void AFXAPI SerializeElements<CMyStruct*>(CArchive& ar, CMyStruct** ppElements, INT_PTR nCount)
00033 #else
00034 void SerializeElements(CArchive& ar, CMyStruct** ppElements, int nCount)
00035 #endif
00036 {
00037   // Since SerializeElements is always called by the framework with nCount=1
00038   // for a CMap<>, it is a good idea to implement SerializeElement to handle
00039   // nCount>1, in case you decide to reuse it for a CArray<> with the same
00040   // element type.
00041   if (ar.IsStoring())
00042   {
00043     for (int i = 0; i < nCount; i++)
00044     {
00045       CMyStruct* pMyStruct = *(ppElements + i);
00046       WORD w = (WORD)pMyStruct->m_int;
00047       ar << w;
00048       ar << pMyStruct->m_float;
00049       ar << pMyStruct->m_str;
00050       nCount--;
00051     }
00052   }
00053   else
00054   {
00055     for (int i = 0; i < nCount; i++)
00056     {
00057       CMyStruct* pMyStruct = new CMyStruct;
00058       *(ppElements + i) = pMyStruct;
00059       WORD w;
00060       ar >> w;
00061       pMyStruct->m_int = w;
00062       ar >> pMyStruct->m_float;
00063       ar >> pMyStruct->m_str;
00064     }
00065   }
00066 }
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CMyObject
00070
00071 IMPLEMENT_SERIAL(CMyObject, CObject, 0)
00072
00073 CMyObject::CMyObject()
00074 {
00075 }
00076
00077 CMyObject::~CMyObject()
00078 {
00079 }
00080
00081 void CMyObject::FormatMyObject(CString& str)
00082 {
00083   str.Format(_T("{%i, %.4f, %s}"), m_int, m_float, (LPCTSTR)m_str);
00084 }
00085
00086 void CMyObject::Serialize(CArchive& ar)
00087 {
00088   WORD w;
00089   if (ar.IsStoring())
00090   {
00091     w = (WORD)m_int;
00092     ar << w;
00093     ar << m_float;
00094     ar << m_str;
00095   }
00096   else
00097   {
00098     ar >> w;
00099     m_int = w;
00100     ar >> m_float;
00101     ar >> m_str;
00102   }
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CCollectDoc
00107
00108 IMPLEMENT_DYNCREATE(CCollectDoc, CDocument)
00109
00110 BEGIN_MESSAGE_MAP(CCollectDoc, CDocument)
00111   //{{AFX_MSG_MAP(CCollectDoc)
00112   //}}AFX_MSG_MAP
00113 END_MESSAGE_MAP()
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // CCollectDoc construction/destruction
00117
00118 CCollectDoc::CCollectDoc()
00119 {
00120 }
00121
00122 CCollectDoc::~CCollectDoc()
00123 {
00124 }
00125
00126 BOOL CCollectDoc::OnNewDocument()
00127 {
00128   if (!CDocument::OnNewDocument())
00129     return FALSE;
00130
00131   CString strFirst;
00132   strFirst.LoadString(IDS_INITIAL_STRING);
00133   m_stringList.AddTail(strFirst);
00134
00135   CMyStruct* pMyStruct = new CMyStruct();
00136   pMyStruct->m_int = 1234;
00137   pMyStruct->m_float = 12.34f;
00138   pMyStruct->m_str.LoadString(IDS_INITIAL_STRING);
00139   m_mystructList.AddTail(pMyStruct);
00140
00141   m_intList.AddTail(100);
00142
00143   m_dwArray.Add(100000);
00144
00145   CMyObject* pMyObject = new CMyObject();
00146   pMyObject->m_int = 5678;
00147   pMyObject->m_float = 56.78f;
00148   pMyObject->m_str.LoadString(IDS_INITIAL_STRING);
00149   m_myobArray.Add(pMyObject);
00150
00151   CPoint pt(10,10);
00152   m_ptArray.Add(pt);
00153
00154   CString strKey, strValue;
00155   strKey.LoadString(IDS_INITIAL_KEY);
00156   strValue.LoadString(IDS_INITIAL_VALUE);
00157   m_mapStringToString[strKey] = strValue;
00158
00159
00160   CMyObject* pMyObject2 = new CMyObject();
00161   pMyObject2->m_int = 1357;
00162   pMyObject2->m_float = 13.57f;
00163   pMyObject2->m_str.LoadString(IDS_INITIAL_STRING);
00164   m_mapStringToMyObject[strKey] = pMyObject2;
00165
00166   CMyStruct* pMyStruct2 = new CMyStruct();
00167   pMyStruct2->m_int = 2468;
00168   pMyStruct2->m_float = 24.68f;
00169   pMyStruct2->m_str.LoadString(IDS_INITIAL_STRING);
00170   m_mapDWordToMyStruct[100] = pMyStruct2;
00171
00172   return TRUE;
00173 }
00174
00175 void CCollectDoc::DeleteContents()
00176 {
00177   m_stringList.RemoveAll();
00178
00179   POSITION pos = m_mystructList.GetHeadPosition();
00180   while (pos != NULL)
00181   {
00182     delete m_mystructList.GetNext(pos);
00183   }
00184   m_mystructList.RemoveAll();
00185
00186   m_intList.RemoveAll();
00187
00188   m_dwArray.RemoveAll();
00189
00190   for (int n = 0; n < m_myobArray.GetSize(); n++)
00191   {
00192     delete m_myobArray[n];
00193   }
00194   m_myobArray.RemoveAll();
00195
00196   m_mapStringToString.RemoveAll();
00197
00198   m_ptArray.RemoveAll();
00199
00200   pos = m_mapStringToMyObject.GetStartPosition();
00201   while (pos != NULL)
00202   {
00203     CString str;
00204     CMyObject* pMyObject;
00205     m_mapStringToMyObject.GetNextAssoc(pos, str, pMyObject);
00206     delete pMyObject;
00207   }
00208   m_mapStringToMyObject.RemoveAll();
00209
00210   pos = m_mapDWordToMyStruct.GetStartPosition();
00211   while (pos != NULL)
00212   {
00213     DWORD dwKey;
00214     CMyStruct* pMyStruct;
00215     m_mapDWordToMyStruct.GetNextAssoc(pos, dwKey, pMyStruct);
00216     delete pMyStruct;
00217   }
00218   m_mapDWordToMyStruct.RemoveAll();
00219 }
00220
00221 /////////////////////////////////////////////////////////////////////////////
00222 // CCollectDoc serialization
00223
00224 void CCollectDoc::Serialize(CArchive& ar)
00225 {
00226   POSITION pos;
00227   WORD nCount;
00228   WORD w;
00229
00230   m_stringList.Serialize(ar);
00231
00232   if (ar.IsStoring())
00233   {
00234     nCount = (WORD)m_mystructList.GetCount();
00235     ar << nCount;
00236     pos = m_mystructList.GetHeadPosition();
00237     while (pos != NULL)
00238     {
00239       CMyStruct* pMyStruct = m_mystructList.GetNext(pos);
00240       w = (WORD)pMyStruct->m_int;
00241       ar << w;
00242       ar << pMyStruct->m_float;
00243       ar << pMyStruct->m_str;
00244       nCount--;
00245     }
00246     ASSERT(nCount == 0);
00247   }
00248   else
00249   {
00250     ar >> nCount;
00251     while (nCount-- > 0)
00252     {
00253       CMyStruct* pMyStruct = new CMyStruct;
00254       ar >> w;
00255       pMyStruct->m_int = w;
00256       ar >> pMyStruct->m_float;
00257       ar >> pMyStruct->m_str;
00258       m_mystructList.AddTail(pMyStruct);
00259     }
00260   }
00261
00262   m_intList.Serialize(ar);
00263
00264   m_dwArray.Serialize(ar);
00265
00266   m_myobArray.Serialize(ar);
00267
00268   m_ptArray.Serialize(ar);
00269
00270   m_mapStringToString.Serialize(ar);
00271
00272   m_mapStringToMyObject.Serialize(ar);
00273
00274   m_mapDWordToMyStruct.Serialize(ar);
00275 }
00276
00277 /////////////////////////////////////////////////////////////////////////////
00278 // CCollectDoc diagnostics
00279
00280 #ifdef _DEBUG
00281 void CCollectDoc::AssertValid() const
00282 {
00283   CDocument::AssertValid();
00284 }
00285
00286 void CCollectDoc::Dump(CDumpContext& dc) const
00287 {
00288   CDocument::Dump(dc);
00289 }
00290 #endif //_DEBUG
00291
00292 /////////////////////////////////////////////////////////////////////////////
00293 // CCollectDoc commands
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/cntritem.cpp Source File

  • ole
  • drawcli

cntritem.cpp

Go to the documentation of this file.
00001 // cntritem.h : interface of the CDrawItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "drawcli.h"
00014
00015 #include "drawdoc.h"
00016 #include "drawobj.h"
00017 #include "drawvw.h"
00018 #include "cntritem.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CDrawItem implementation
00027
00028 IMPLEMENT_SERIAL(CDrawItem, COleClientItem, 0)
00029
00030 CDrawItem::CDrawItem(CDrawDoc* pContainer, CDrawOleObj* pDrawObj)
00031   : COleClientItem(pContainer)
00032 {
00033   m_pDrawObj = pDrawObj;
00034 }
00035
00036 CDrawItem::~CDrawItem()
00037 {
00038   if (m_pDrawObj != NULL)
00039     m_pDrawObj->m_pClientItem = NULL;
00040 }
00041
00042 void CDrawItem::OnChange(OLE_NOTIFICATION nCode, DWORD dwParam)
00043 {
00044   ASSERT_VALID(this);
00045
00046   COleClientItem::OnChange(nCode, dwParam);
00047
00048   switch(nCode)
00049   {
00050   case OLE_CHANGED_STATE:
00051   case OLE_CHANGED_ASPECT:
00052     m_pDrawObj->Invalidate();
00053     break;
00054   case OLE_CHANGED:
00055     UpdateExtent(); // extent may have changed
00056     m_pDrawObj->Invalidate();
00057     break;
00058   }
00059 }
00060
00061 BOOL CDrawItem::OnChangeItemPosition(const CRect& rectPos)
00062 {
00063   ASSERT_VALID(this);
00064
00065   CDrawView* pView = GetActiveView();
00066   ASSERT_VALID(pView);
00067   CRect rect = rectPos;
00068   pView->ClientToDoc(rect);
00069
00070   if (rect != m_pDrawObj->m_position)
00071   {
00072     // invalidate old rectangle
00073     m_pDrawObj->Invalidate();
00074
00075     // update to new rectangle
00076     m_pDrawObj->m_position = rect;
00077     GetExtent(&m_pDrawObj->m_extent);
00078
00079     // and invalidate new rectangle
00080     m_pDrawObj->Invalidate();
00081
00082     // mark document as dirty
00083     GetDocument()->SetModifiedFlag();
00084   }
00085   return COleClientItem::OnChangeItemPosition(rectPos);
00086 }
00087
00088 void CDrawItem::OnGetItemPosition(CRect& rPosition)
00089 {
00090   ASSERT_VALID(this);
00091
00092   // update to extent of item if m_position is not initialized
00093   if (m_pDrawObj->m_position.IsRectEmpty())
00094     UpdateExtent();
00095
00096   // copy m_position, which is in document coordinates
00097   CDrawView* pView = GetActiveView();
00098   ASSERT_VALID(pView);
00099   rPosition = m_pDrawObj->m_position;
00100   pView->DocToClient(rPosition);
00101 }
00102
00103 void CDrawItem::Serialize(CArchive& ar)
00104 {
00105   ASSERT_VALID(this);
00106
00107   // Call base class first to read in COleClientItem data.
00108   // Note: this sets up the m_pDocument pointer returned from
00109   //  CDrawItem::GetDocument, therefore it is a good idea
00110   //  to call the base class Serialize first.
00111   COleClientItem::Serialize(ar);
00112
00113   // now store/retrieve data specific to CDrawItem
00114   if (ar.IsStoring())
00115   {
00116     // TODO: add storing code here
00117   }
00118   else
00119   {
00120     // TODO: add loading code here
00121   }
00122 }
00123
00124 BOOL CDrawItem::UpdateExtent()
00125 {
00126   CSize size;
00127   if (!GetExtent(&size) || size == m_pDrawObj->m_extent)
00128     return FALSE;       // blank
00129
00130   // if new object (i.e. m_extent is empty) setup position
00131   if (m_pDrawObj->m_extent == CSize(0, 0))
00132   {
00133     m_pDrawObj->m_position.right =
00134       m_pDrawObj->m_position.left + MulDiv(size.cx, 10, 254);
00135     m_pDrawObj->m_position.bottom =
00136       m_pDrawObj->m_position.top - MulDiv(size.cy, 10, 254);
00137   }
00138   // else data changed so scale up rect as well
00139   else if (!IsInPlaceActive() && size != m_pDrawObj->m_extent)
00140   {
00141     m_pDrawObj->m_position.right = m_pDrawObj->m_position.left +
00142       MulDiv(m_pDrawObj->m_position.Width(), size.cx, m_pDrawObj->m_extent.cx);
00143     m_pDrawObj->m_position.bottom = m_pDrawObj->m_position.top +
00144       MulDiv(m_pDrawObj->m_position.Height(), size.cy, m_pDrawObj->m_extent.cy);
00145   }
00146
00147   m_pDrawObj->m_extent = size;
00148   m_pDrawObj->Invalidate();   // redraw to the new size/position
00149   return TRUE;
00150 }
00151
00152 void CDrawItem::OnActivate()
00153 {
00154   // allow only one inplace active item per frame
00155   CView* pView = GetActiveView();
00156   ASSERT_VALID(pView);
00157   COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
00158   if (pItem != NULL && pItem != this)
00159     pItem->Close();
00160
00161   COleClientItem::OnActivate();
00162 }
00163
00164 void CDrawItem::OnDeactivateUI(BOOL bUndoable)
00165 {
00166   COleClientItem::OnDeactivateUI(bUndoable);
00167
00168   // hide the object if it is not an outside-in object
00169   DWORD dwMisc = 0;
00170   m_lpObject->GetMiscStatus(GetDrawAspect(), &dwMisc);
00171   if (dwMisc & OLEMISC_INSIDEOUT)
00172     DoVerb(OLEIVERB_HIDE, NULL);
00173 }
00174
00175 /////////////////////////////////////////////////////////////////////////////
00176 // CDrawItem diagnostics
00177
00178 #ifdef _DEBUG
00179 void CDrawItem::AssertValid() const
00180 {
00181   COleClientItem::AssertValid();
00182 }
00183
00184 void CDrawItem::Dump(CDumpContext& dc) const
00185 {
00186   COleClientItem::Dump(dc);
00187 }
00188 #endif
00189
00190 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/ipframe.cpp Source File

  • general
  • Scribble

ipframe.cpp

Go to the documentation of this file.
00001 // IpFrame.cpp : implementation of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014
00015 #include "IpFrame.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CInPlaceFrame
00024
00025 IMPLEMENT_DYNCREATE(CInPlaceFrame, COleIPFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CInPlaceFrame, COleIPFrameWnd)
00028   //{{AFX_MSG_MAP(CInPlaceFrame)
00029   ON_WM_CREATE()
00030   //}}AFX_MSG_MAP
00031   // Global help commands
00032   ON_COMMAND(ID_HELP_FINDER, COleIPFrameWnd::OnHelpFinder)
00033   ON_COMMAND(ID_HELP, COleIPFrameWnd::OnHelp)
00034   ON_COMMAND(ID_DEFAULT_HELP, COleIPFrameWnd::OnHelpFinder)
00035   ON_COMMAND(ID_CONTEXT_HELP, COleIPFrameWnd::OnContextHelp)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CInPlaceFrame construction/destruction
00040
00041 CInPlaceFrame::CInPlaceFrame()
00042 {
00043 }
00044
00045 CInPlaceFrame::~CInPlaceFrame()
00046 {
00047 }
00048
00049 int CInPlaceFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00050 {
00051   if (COleIPFrameWnd::OnCreate(lpCreateStruct) == -1)
00052     return -1;
00053
00054   // CResizeBar implements in-place resizing.
00055   if (!m_wndResizeBar.Create(this))
00056   {
00057     TRACE0("Failed to create resize bar\n");
00058     return -1;      // fail to create
00059   }
00060
00061   // By default, it is a good idea to register a drop-target that does
00062   //  nothing with your frame window.  This prevents drops from
00063   //  "falling through" to a container that supports drag-drop.
00064   m_dropTarget.Register(this);
00065
00066   return 0;
00067 }
00068
00069 // OnCreateControlBars is called by the framework to create control bars on the
00070 //  container application's windows.  pWndFrame is the top level frame window of
00071 //  the container and is always non-NULL.  pWndDoc is the doc level frame window
00072 //  and will be NULL when the container is an SDI application.  A server
00073 //  application can place MFC control bars on either window.
00074 BOOL CInPlaceFrame::OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* /*pWndDoc*/)
00075 {
00076   // Set owner to this window, so messages are delivered to correct app
00077   m_wndToolBar.SetOwner(this);
00078
00079   // Create toolbar on client's frame window
00080   if (!m_wndToolBar.Create(pWndFrame) ||
00081     !m_wndToolBar.LoadToolBar(IDR_SCRIBBTYPE_SRVR_IP))
00082   {
00083     TRACE0("Failed to create toolbar\n");
00084     return FALSE;
00085   }
00086
00087   // TODO: Remove this if you don't want tool tips
00088   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00089     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00090
00091   // TODO: Delete these three lines if you don't want the toolbar to
00092   //  be dockable
00093   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00094   pWndFrame->EnableDocking(CBRS_ALIGN_ANY);
00095   pWndFrame->DockControlBar(&m_wndToolBar);
00096
00097
00098   return TRUE;
00099 }
00100
00101 BOOL CInPlaceFrame::PreCreateWindow(CREATESTRUCT& cs)
00102 {
00103   // TODO: Modify the Window class or styles here by modifying
00104   //  the CREATESTRUCT cs
00105
00106   return COleIPFrameWnd::PreCreateWindow(cs);
00107 }
00108
00109 /////////////////////////////////////////////////////////////////////////////
00110 // CInPlaceFrame diagnostics
00111
00112 #ifdef _DEBUG
00113 void CInPlaceFrame::AssertValid() const
00114 {
00115   COleIPFrameWnd::AssertValid();
00116 }
00117
00118 void CInPlaceFrame::Dump(CDumpContext& dc) const
00119 {
00120   COleIPFrameWnd::Dump(dc);
00121 }
00122 #endif //_DEBUG
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // CInPlaceFrame commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBitmapProperty Member List

This is the complete list of members for CBitmapProperty, including all inherited members.
CBitmapProperty(COleControl *pControl=NULL) | CBitmapProperty |
dlColorTable enum value | CBitmapProperty |
dlDone enum value | CBitmapProperty |
dlFileHeader enum value | CBitmapProperty |
dlInfoHeader enum value | CBitmapProperty |
dlNone enum value | CBitmapProperty |
DLState enum name | CBitmapProperty |
m_Bitmap | CBitmapProperty |
m_BitmapSize | CBitmapProperty |
m_bmInfo | CBitmapProperty |
m_CacheFile | CBitmapProperty |
m_cbRead | CBitmapProperty |
m_dlState | CBitmapProperty |
m_nScanLine | CBitmapProperty |
OnDataAvailable(DWORD dwSize, DWORD bscfFlag) | CBitmapProperty | [protected, virtual]
ReadArray(DWORD &rdwSize, void **pb, int cElem, int cMax) | CBitmapProperty |
ReadStruct(DWORD &rdwSize, void *pb, int cLen) | CBitmapProperty |
ResetData() | CBitmapProperty | [virtual]
~CBitmapProperty() | CBitmapProperty | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/clikpnt.cpp Source File

  • ole
  • acdual

clikpnt.cpp

Go to the documentation of this file.
00001 // ClikPnt.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014 #include "ClikPnt.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CAutoClickPoint
00023
00024 IMPLEMENT_DYNCREATE(CAutoClickPoint, CCmdTarget)
00025
00026 CAutoClickPoint::CAutoClickPoint()
00027 {
00028   EnableAutomation();
00029
00030   // To keep the application running as long as an OLE automation
00031   //  object is active, the constructor calls AfxOleLockApp.
00032
00033   AfxOleLockApp();
00034 }
00035
00036 CAutoClickPoint::~CAutoClickPoint()
00037 {
00038   // To terminate the application when all objects created with
00039   //  with OLE automation, the destructor calls AfxOleUnlockApp.
00040
00041   AfxOleUnlockApp();
00042 }
00043
00044 void CAutoClickPoint::OnFinalRelease()
00045 {
00046   // When the last reference for an automation object is released
00047   //  OnFinalRelease is called.  This implementation deletes the
00048   //  object.  Add additional cleanup required for your object before
00049   //  deleting it from memory.
00050
00051   delete this;
00052 }
00053
00054
00055 BEGIN_MESSAGE_MAP(CAutoClickPoint, CCmdTarget)
00056   //{{AFX_MSG_MAP(CAutoClickPoint)
00057     // NOTE - the ClassWizard will add and remove mapping macros here.
00058   //}}AFX_MSG_MAP
00059 END_MESSAGE_MAP()
00060
00061 BEGIN_DISPATCH_MAP(CAutoClickPoint, CCmdTarget)
00062   //{{AFX_DISPATCH_MAP(CAutoClickPoint)
00063   DISP_PROPERTY(CAutoClickPoint, "x", m_x, VT_I2)
00064   DISP_PROPERTY(CAutoClickPoint, "y", m_y, VT_I2)
00065   //}}AFX_DISPATCH_MAP
00066 END_DISPATCH_MAP()
00067
00068 // DUAL_SUPPORT_START
00069 // Original Code:
00070 //     // Note: we add support for IID_IAutoClickPoint to support typesafe binding
00071 //     //  from VBA.  This IID must match the GUID that is attached to the
00072 //     //  dispinterface in the .ODL file.
00073 //
00074 //     // {0368D830-A050-11CE-B0F3-00AA006C28B3}
00075 //     static const IID IID_IAutoClickPoint =
00076 //     { 0x368d830, 0xa050, 0x11ce, { 0xb0, 0xf3, 0x0, 0xaa, 0x0, 0x6c, 0x28, 0xb3 } };
00077 //
00078 //     BEGIN_INTERFACE_MAP(CAutoClickPoint, CCmdTarget)
00079 //          INTERFACE_PART(CAutoClickPoint, IID_IAutoClickPoint, Dispatch)
00080 //     END_INTERFACE_MAP()
00081
00082 // Note: we add support for DIID_IAutoClickPoint to support typesafe binding
00083 // from VBA.  We add support for IID_IDualAutoClickPoint to support our
00084 // dual interface. See ACDual.H for the definition of DIID_IAutoClickPoint
00085 // and IID_IDualAutoClickPoint.
00086 //
00087 // DUAL_ERRORINFO_PART indicates we support OLE Automation
00088 // error handling.
00089 //
00090
00091 BEGIN_INTERFACE_MAP(CAutoClickPoint, CCmdTarget)
00092   INTERFACE_PART(CAutoClickPoint, DIID_IAutoClickPoint, Dispatch)
00093   INTERFACE_PART(CAutoClickPoint, IID_IDualAutoClickPoint, DualAutoClickPoint)
00094   DUAL_ERRORINFO_PART(CAutoClickPoint)
00095 END_INTERFACE_MAP()
00096 // DUAL_SUPPORT_END
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CAutoClickPoint message handlers
00100
00101 // DUAL_SUPPORT_START
00102
00103 // delegate standard IDispatch methods to MFC IDispatch implementation
00104 DELEGATE_DUAL_INTERFACE(CAutoClickPoint, DualAutoClickPoint)
00105
00106 // Our method and property functions can generally just
00107 // delegate back to the methods we generated using
00108 // ClassWizard. However, if we set up properties to
00109 // access variables directly, we will need to write the
00110 // code to get/put the value into the variable.
00111
00112 STDMETHODIMP CAutoClickPoint::XDualAutoClickPoint::put_x(short newX)
00113 {
00114   METHOD_PROLOGUE(CAutoClickPoint, DualAutoClickPoint)
00115
00116   TRY_DUAL(IID_IDualAutoClickPoint)
00117   {
00118     pThis->m_x = newX;
00119     return NOERROR;
00120   }
00121   CATCH_ALL_DUAL
00122 }
00123
00124 STDMETHODIMP CAutoClickPoint::XDualAutoClickPoint::get_x(short FAR* retval)
00125 {
00126   METHOD_PROLOGUE(CAutoClickPoint, DualAutoClickPoint)
00127
00128   TRY_DUAL(IID_IDualAutoClickPoint)
00129   {
00130     *retval = pThis->m_x;
00131     return NOERROR;
00132   }
00133   CATCH_ALL_DUAL
00134 }
00135
00136 STDMETHODIMP CAutoClickPoint::XDualAutoClickPoint::put_y(short newY)
00137 {
00138   METHOD_PROLOGUE(CAutoClickPoint, DualAutoClickPoint)
00139
00140   TRY_DUAL(IID_IDualAutoClickPoint)
00141   {
00142     pThis->m_y = newY;
00143     return NOERROR;
00144   }
00145   CATCH_ALL_DUAL
00146 }
00147
00148 STDMETHODIMP CAutoClickPoint::XDualAutoClickPoint::get_y(short FAR* retval)
00149 {
00150   METHOD_PROLOGUE(CAutoClickPoint, DualAutoClickPoint)
00151
00152   TRY_DUAL(IID_IDualAutoClickPoint)
00153   {
00154     *retval = pThis->m_y;
00155     return NOERROR;
00156   }
00157   CATCH_ALL_DUAL
00158 }
00159
00160 // Implement ISupportErrorInfo to indicate we support the
00161 // OLE Automation error handler.
00162 IMPLEMENT_DUAL_ERRORINFO(CAutoClickPoint, IID_IDualAutoClickPoint)
00163
00164 // DUAL_SUPPORT_END
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CClassViewMenuButton Member List

This is the complete list of members for CClassViewMenuButton, including all inherited members.
CClassViewBar class | CClassViewMenuButton | [friend]
CClassViewMenuButton(HMENU hMenu=NULL) | CClassViewMenuButton | [inline]
OnDraw(CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE) | CClassViewMenuButton | [inline, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page4.cpp Source File

  • vc2008fp
  • NewControls

Page4.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "Page4.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CPage4 property page
00022
00023 IMPLEMENT_DYNCREATE(CPage4, CMFCPropertyPage)
00024
00025 CPage4::CPage4() : CMFCPropertyPage(CPage4::IDD)
00026 {
00027   m_strValue1 = _T("");
00028   m_strValue2 = _T("");
00029   m_strValue3 = _T("");
00030   m_strValue4 = _T("");
00031   m_strValue5 = _T("");
00032 }
00033
00034 CPage4::~CPage4()
00035 {
00036 }
00037
00038 void CPage4::DoDataExchange(CDataExchange* pDX)
00039 {
00040   CMFCPropertyPage::DoDataExchange(pDX);
00041   DDX_Control(pDX, IDC_MASKEDIT5, m_wndMaskEdit5);
00042   DDX_Control(pDX, IDC_MASKEDIT4, m_wndMaskEdit4);
00043   DDX_Control(pDX, IDC_MASKEDIT3, m_wndMaskEdit3);
00044   DDX_Control(pDX, IDC_MASKEDIT2, m_wndMaskEdit2);
00045   DDX_Control(pDX, IDC_MASKEDIT1, m_wndMaskEdit1);
00046   DDX_Text(pDX, IDC_VALUE1, m_strValue1);
00047   DDX_Text(pDX, IDC_VALUE2, m_strValue2);
00048   DDX_Text(pDX, IDC_VALUE3, m_strValue3);
00049   DDX_Text(pDX, IDC_VALUE4, m_strValue4);
00050   DDX_Text(pDX, IDC_VALUE5, m_strValue5);
00051 }
00052
00053 BEGIN_MESSAGE_MAP(CPage4, CMFCPropertyPage)
00054   ON_BN_CLICKED(IDC_BUTTON1, OnButtonGet)
00055 END_MESSAGE_MAP()
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CPage4 message handlers
00059
00060 BOOL CPage4::OnInitDialog()
00061 {
00062   CMFCPropertyPage::OnInitDialog();
00063
00064   // Mask 1: phone number
00065   m_wndMaskEdit1.EnableMask(_T(" ddd  ddd dddd"), // The mask string
00066     _T("(___) ___-____"), // Literal, "_" char = character entry
00067     _T(' ')); // Default char
00068   m_wndMaskEdit1.SetValidChars(NULL); // Valid string characters
00069   m_wndMaskEdit1.SetWindowText(_T("(123) 123-1212"));
00070
00071   // Mask 2: State, Zip Code
00072   m_wndMaskEdit2.EnableMask(_T("       cc       ddddd-dddd"), // The mask string
00073     _T("State: __, Zip: _____-____"), // Literal, "_" char = character entry
00074     _T(' ')); // Backspace replace char
00075   m_wndMaskEdit2.SetValidChars(NULL); // Valid string characters
00076   m_wndMaskEdit2.SetWindowText(_T("State: NY, Zip: 12345-6789"));
00077   // Mask 3: serial code
00078   m_wndMaskEdit3.EnableMask(_T("     AAAA AAAA AAAA AAAA"), // The mask string
00079     _T("S/N: ____-____-____-____"), // Literal, "_" char = character entry
00080     _T('_')); // Backspace replace char
00081   m_wndMaskEdit3.SetValidChars(NULL); // Valid string characters
00082   m_wndMaskEdit3.SetWindowText(_T("S/N: FPR5-5678-1234-8765"));
00083
00084   // Mask 4: 0xFFFF
00085   m_wndMaskEdit4.EnableMask(_T("  AAAA"), // The mask string
00086     _T("0x____"), // Literal, "_" char = character entry
00087     _T('_')); // Backspace replace char
00088   m_wndMaskEdit4.SetValidChars(_T("1234567890ABCDEFabcdef")); // Valid string characters
00089   m_wndMaskEdit4.SetWindowText(_T("0x01AF"));
00090
00091   // Mask 5: digits only
00092   m_wndMaskEdit5.DisableMask(); // Don't use the mask
00093   m_wndMaskEdit5.SetValidChars(_T("1234567890")); // Valid string characters
00094   m_wndMaskEdit5.SetWindowText(_T("1234567890"));
00095
00096   return TRUE;  // return TRUE unless you set the focus to a control
00097 }
00098
00099 void CPage4::OnButtonGet()
00100 {
00101   m_wndMaskEdit1.GetWindowText(m_strValue1);
00102   m_wndMaskEdit2.GetWindowText(m_strValue2);
00103   m_wndMaskEdit3.GetWindowText(m_strValue3);
00104   m_wndMaskEdit4.GetWindowText(m_strValue4);
00105   m_wndMaskEdit5.GetWindowText(m_strValue5);
00106   UpdateData(FALSE);
00107 }
00108
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTrayMenuApp Member List

This is the complete list of members for CTrayMenuApp, including all inherited members.
CTrayMenuApp() | CTrayMenuApp |
InitInstance() | CTrayMenuApp | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licensed.odl Source File

  • controls
  • licensed

licensed.odl

Go to the documentation of this file.
00001 // licensed.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (licensed.tlb) that will become a resource in
00005 // licensed.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(973B27A6-F232-101A-B57B-00608CC96AFA), version(1.0),
00019   helpstring("Licensed OLE Custom Control module"), control ]
00020 library LicensedLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CLicensedCtrl
00026
00027   [ uuid(37446B80-5870-101B-B57B-00608CC96AFA),
00028     helpstring("Dispatch interface for Licensed Control"), hidden ]
00029   dispinterface _DLicensed
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CLicensedCtrl)
00035       //}}AFX_ODL_PROP
00036
00037     methods:
00038       // NOTE - ClassWizard will maintain method information here.
00039       //    Use extreme caution when editing this section.
00040       //{{AFX_ODL_METHOD(CLicensedCtrl)
00041       //}}AFX_ODL_METHOD
00042
00043       [id(DISPID_ABOUTBOX)] void AboutBox();
00044   };
00045
00046   //  Event dispatch interface for CLicensedCtrl
00047
00048   [ uuid(37446B81-5870-101B-B57B-00608CC96AFA),
00049     helpstring("Event interface for Licensed Control") ]
00050   dispinterface _DLicensedEvents
00051   {
00052     properties:
00053       //  Event interface has no properties
00054
00055     methods:
00056       // NOTE - ClassWizard will maintain event information here.
00057       //    Use extreme caution when editing this section.
00058       //{{AFX_ODL_EVENT(CLicensedCtrl)
00059       //}}AFX_ODL_EVENT
00060   };
00061
00062   //  Class information for CLicensedCtrl
00063
00064   [ uuid(973B27A3-F232-101A-B57B-00608CC96AFA), licensed,
00065     helpstring("Licensed Control"), control ]
00066   coclass Licensed
00067   {
00068     [default] dispinterface _DLicensed;
00069     [default, source] dispinterface _DLicensedEvents;
00070   };
00071
00072   //{{AFX_APPEND_ODL}}
00073 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabControlApp Member List

This is the complete list of members for CTabControlApp, including all inherited members.
CTabControlApp() | CTabControlApp |
ExitInstance() | CTabControlApp | [virtual]
InitInstance() | CTabControlApp | [virtual]
OnAppAbout() | CTabControlApp |
PreLoadState() | CTabControlApp | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/notifwdw.cpp Source File

  • general
  • CmnCtrl1

notifwdw.cpp

Go to the documentation of this file.
00001 // NotifySowCase.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl1.h"
00015 #include "notifwdw.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CNotifyShowCase
00025
00026 CNotifyShowCase::CNotifyShowCase()
00027 {
00028   m_totalLines = 200;  // use this default
00029 }
00030
00031 CNotifyShowCase::~CNotifyShowCase()
00032 {
00033 }
00034
00035 BEGIN_MESSAGE_MAP(CNotifyShowCase, CEdit)
00036   //{{AFX_MSG_MAP(CNotifyShowCase)
00037     // NOTE - the ClassWizard will add and remove mapping macros here.
00038   //}}AFX_MSG_MAP
00039 END_MESSAGE_MAP()
00040
00041 notifDescrip CNotifyShowCase::m_rgNotifDescrip[NOTIFCOUNT] =
00042 {
00043     // list control notifications
00044   {LVN_ITEMCHANGING, _T("LVN_ITEMCHANGING")},
00045   {LVN_ITEMCHANGED, _T("LVN_ITEMCHANGED")},
00046   {LVN_INSERTITEM, _T("LVN_INSERTITEM")},
00047   {LVN_DELETEITEM, _T("LVN_DELETEITEM")},
00048   {LVN_DELETEALLITEMS, _T("LVN_DELETEALLITEMS")},
00049   {LVN_BEGINLABELEDIT, _T("LVN_BEGINLABELEDIT")},
00050   {LVN_ENDLABELEDIT, _T("LVN_ENDLABELEDIT")},
00051   {LVN_BEGINDRAG, _T("LVN_BEGINDRAG")},
00052   {LVN_BEGINRDRAG, _T("LVN_BEGINRDRAG")},
00053   {LVN_COLUMNCLICK, _T("LVN_COLUMNCLICK")},
00054   {LVN_GETDISPINFO, _T("LVN_GETDISPINFO")},
00055   {LVN_SETDISPINFO, _T("LVN_SETDISPINFO")},
00056     // tree control notifications
00057   {TVN_ITEMEXPANDING, _T("TVN_ITEMEXPANDING")},
00058   {TVN_BEGINLABELEDIT, _T("TVN_BEGINLABELEDIT")},
00059   {TVN_ENDLABELEDIT, _T("TVN_ENDLABELEDIT")},
00060   {TVN_SELCHANGING, _T("TVN_SELCHANGING")},
00061   {TVN_SELCHANGED, _T("TVN_SELCHANGED")},
00062   {TVN_GETDISPINFO, _T("TVN_GETDISPINFO")},
00063   {TVN_SETDISPINFO, _T("TVN_SETDISPINFO")},
00064   {TVN_BEGINDRAG, _T("TVN_BEGINDRAG")},
00065   {TVN_KEYDOWN, _T("TVN_KEYDOWN")},
00066   {TVN_DELETEITEM, _T("TVN_DELETEITEM")},
00067   {TVN_ITEMEXPANDED, _T("TVN_ITEMEXPANDED")},
00068 };
00069
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CNotifyShowCase message handlers
00073 void CNotifyShowCase::AddLine(LPCTSTR lpsz)
00074 {
00075   TCHAR   szt[50];
00076   int     nLastChar;
00077   int     cLines;
00078
00079   if (GetLineCount() >= m_totalLines)
00080   {
00081     SetSel(0, LineLength(0), TRUE/*bNoScroll*/);  // select the first line
00082     Clear();  // and remove it
00083   }
00084
00085   nLastChar = LineIndex((cLines = GetLineCount() - 1)) + LineLength(cLines);
00086   _stprintf_s(szt, 50, _T("%s\x0D\x0A"), lpsz);
00087   SetSel(nLastChar, nLastChar, TRUE/*bNoScroll*/);
00088   ReplaceSel(szt);
00089 }
00090
00091 void CNotifyShowCase::ShowNotification(UINT nCode)
00092 {
00093   int i;
00094
00095   for (i = 0; i < NOTIFCOUNT; i++)    // linear search for few items is OK
00096     if (m_rgNotifDescrip[i].nCode == nCode)
00097       break;
00098
00099   if (i == NOTIFCOUNT)
00100   {
00101     TCHAR szt[30];
00102
00103     _stprintf_s(szt, 30, _T("UNKNOWN CODE (%d)"), nCode);
00104     AddLine(szt);
00105   }
00106   else
00107     AddLine(m_rgNotifDescrip[i]. sztCodeName);
00108 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/np.cpp Source File

  • general
  • npp

np.cpp

Go to the documentation of this file.
00001 // np.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "np.h"
00015 #include "combobar.h"
00016 #include "mainfrm.h"
00017 #include "npdoc.h"
00018 #include "npview.h"
00019 #include <locale.h>
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CNotepadApp
00028
00029 BEGIN_MESSAGE_MAP(CNotepadApp, CWinApp)
00030   //{{AFX_MSG_MAP(CNotepadApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032   //}}AFX_MSG_MAP
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00036   // Standard print setup command
00037   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CNotepadApp construction
00042
00043 CNotepadApp::CNotepadApp()
00044 {
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CNotepadApp object
00049
00050 CNotepadApp theApp;
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CNotepadApp initialization
00054
00055 BOOL CNotepadApp::InitInstance()
00056 {
00057   _tsetlocale(LC_ALL, _T(""));
00058
00059   // Standard initialization
00060
00061   LoadStdProfileSettings(8);  // Load standard INI file options (including MRU)
00062
00063   // Register document templates
00064
00065   CSingleDocTemplate* pDocTemplate;
00066   pDocTemplate = new CSingleDocTemplate(
00067     IDR_MAINFRAME,
00068     RUNTIME_CLASS(CNotepadDoc),
00069     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00070     RUNTIME_CLASS(CNotepadView));
00071   AddDocTemplate(pDocTemplate);
00072
00073   // open file specified on command line
00074   if (m_lpCmdLine[0] == 0)
00075     OnFileNew();
00076   else
00077     OpenDocumentFile(m_lpCmdLine);
00078
00079   return TRUE;
00080 }
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CAboutDlg dialog used for App About
00084
00085 class CAboutDlg : public CDialog
00086 {
00087 public:
00088   CAboutDlg();
00089
00090 // Dialog Data
00091   //{{AFX_DATA(CAboutDlg)
00092   enum { IDD = IDD_ABOUTBOX };
00093   //}}AFX_DATA
00094
00095 // Implementation
00096 protected:
00097   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00098   //{{AFX_MSG(CAboutDlg)
00099     // No message handlers
00100   //}}AFX_MSG
00101   DECLARE_MESSAGE_MAP()
00102 };
00103
00104 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00105 {
00106   //{{AFX_DATA_INIT(CAboutDlg)
00107   //}}AFX_DATA_INIT
00108 }
00109
00110 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00111 {
00112   CDialog::DoDataExchange(pDX);
00113   //{{AFX_DATA_MAP(CAboutDlg)
00114   //}}AFX_DATA_MAP
00115 }
00116
00117 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00118   //{{AFX_MSG_MAP(CAboutDlg)
00119     // No message handlers
00120   //}}AFX_MSG_MAP
00121 END_MESSAGE_MAP()
00122
00123 // App command to run the dialog
00124 void CNotepadApp::OnAppAbout()
00125 {
00126   CAboutDlg aboutDlg;
00127   aboutDlg.DoModal();
00128 }
00129
00130 /////////////////////////////////////////////////////////////////////////////
00131 // CNotepadApp commands
00132
00133 BOOL CNotepadApp::OnIdle(LONG lCount)
00134 {
00135   CMainFrame* pFrame = (CMainFrame*) AfxGetMainWnd();
00136   CStatusBar* pStatusBar = (CStatusBar*) pFrame->GetDescendantWindow(AFX_IDW_STATUS_BAR);
00137
00138   if(pStatusBar)
00139   {
00140     CEdit &edit = ((CEditView*)pFrame->GetActiveView())->GetEditCtrl();
00141     CString s1;
00142     UINT i = edit.LineFromChar();
00143     s1.Format(_T("Ln %u"), ++i);
00144     pStatusBar->SetPaneText(pStatusBar->CommandToIndex(ID_INDICATOR_LINE), s1);
00145   }
00146
00147   return CWinApp::OnIdle(lCount);
00148 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007Demo.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007Demo.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014
00015 #include "MainFrm.h"
00016 #include "MSOffice2007DemoDoc.h"
00017 #include "MSOffice2007DemoView.h"
00018 #include "RibbonTooltipCtrl.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMSOffice2007DemoApp
00028
00029 BEGIN_MESSAGE_MAP(CMSOffice2007DemoApp, CWinAppEx)
00030   //{{AFX_MSG_MAP(CMSOffice2007DemoApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032   // Standard file based document commands
00033   ON_COMMAND(ID_FILE_NEW, OnFileNew)
00034   ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
00035   ON_COMMAND_EX_RANGE(ID_FILE_MRU_FILE1, ID_FILE_MRU_FILE16, OnOpenRecentFile)
00036   // Standard print setup command
00037   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00038   //}}AFX_MSG_MAP
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CMSOffice2007DemoApp construction
00043
00044 CMSOffice2007DemoApp::CMSOffice2007DemoApp()
00045 {
00046   m_bShowFloaty = TRUE;
00047   m_bShowDevTab = FALSE;
00048   m_nAppLook = ID_VIEW_APPLOOK_2007_1;
00049   m_bShowToolTips = TRUE;
00050   m_bShowKeyTips = TRUE;
00051   m_bShowToolTipDescr = TRUE;
00052
00053   // support Restart Manager
00054   m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;
00055 }
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // The one and only CMSOffice2007DemoApp object
00059
00060 CMSOffice2007DemoApp theApp;
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CMSOffice2007DemoApp initialization
00064
00065 BOOL CMSOffice2007DemoApp::InitInstance()
00066 {
00067   // Initialize OLE libraries
00068   if (!AfxOleInit())
00069   {
00070     AfxMessageBox(IDP_OLE_INIT_FAILED);
00071     return FALSE;
00072   }
00073
00074   AfxEnableControlContainer();
00075   CWinApp::InitInstance();
00076
00077   // Change the registry key under which our settings are stored.
00078   // TODO: You should modify this string to be something appropriate
00079   // such as the name of your company or organization.
00080   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00081
00082   LoadStdProfileSettings();  // Load standard INI file options(including MRU)
00083
00084   SetRegistryBase(_T("Settings"));
00085
00086   // Initialize all Managers for usage. They are automatically constructed
00087   // if not yet present
00088   InitContextMenuManager();
00089   InitKeyboardManager();
00090   InitTooltipManager();
00091
00092   // Load options:
00093   m_bShowFloaty = GetInt(_T("ShowFloaty"), TRUE);
00094   m_bShowDevTab = GetInt(_T("ShowDevTab"), FALSE);
00095   m_nAppLook = GetInt(_T("ApplicationLook"), ID_VIEW_APPLOOK_2007_1);
00096   m_bShowToolTips = GetInt(_T("ShowToolTips"), TRUE);
00097   m_bShowKeyTips = GetInt(_T("ShowKeyTips"), TRUE);
00098   m_bShowToolTipDescr = GetInt(_T("bShowToolTipDescr"), TRUE);
00099   m_bIsRTL = GetInt(_T("IsRTL"), FALSE);
00100
00101   CMFCToolTipInfo params;
00102   params.m_bVislManagerTheme = TRUE;
00103
00104   theApp.GetTooltipManager()->SetTooltipParams(0xFFFF, RUNTIME_CLASS(CRibbonTooltipCtrl), &params);
00105
00106   // Register the application's document templates.  Document templates
00107   //  serve as the connection between documents, frame windows and views.
00108
00109   CSingleDocTemplate* pDocTemplate;
00110   pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME, RUNTIME_CLASS(CMSOffice2007DemoDoc), RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00111     RUNTIME_CLASS(CMSOffice2007DemoView));
00112   pDocTemplate->SetContainerInfo(IDR_CNTR_INPLACE);
00113   AddDocTemplate(pDocTemplate);
00114
00115   // Parse command line for standard shell commands, DDE, file open
00116   CCommandLineInfo cmdInfo;
00117   ParseCommandLine(cmdInfo);
00118
00119   // Dispatch commands specified on the command line
00120   if (!ProcessShellCommand(cmdInfo))
00121     return FALSE;
00122
00123   GetContextMenuManager()->AddMenu(_T("Context menu"), IDR_CONTEXT_MENU);
00124
00125   // The one and only window has been initialized, so show and update it.
00126   m_pMainWnd->ShowWindow(SW_SHOW);
00127
00128   CRect rect;
00129   m_pMainWnd->GetWindowRect(rect);
00130
00131   m_pMainWnd->SetWindowPos(NULL, -1, -1, rect.Width(), rect.Height(), SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
00132   m_pMainWnd->UpdateWindow();
00133
00134   return TRUE;
00135 }
00136
00137 /////////////////////////////////////////////////////////////////////////////
00138 // CAboutDlg dialog used for App About
00139
00140 class CAboutDlg : public CDialog
00141 {
00142 public:
00143   CAboutDlg();
00144
00145 // Dialog Data
00146   //{{AFX_DATA(CAboutDlg)
00147   enum { IDD = IDD_ABOUTBOX };
00148   //}}AFX_DATA
00149
00150   // ClassWizard generated virtual function overrides
00151   //{{AFX_VIRTUAL(CAboutDlg)
00152   protected:
00153   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00154   //}}AFX_VIRTUAL
00155
00156 // Implementation
00157 protected:
00158   //{{AFX_MSG(CAboutDlg)
00159     // No message handlers
00160   //}}AFX_MSG
00161   DECLARE_MESSAGE_MAP()
00162 };
00163
00164 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00165 {
00166   //{{AFX_DATA_INIT(CAboutDlg)
00167   //}}AFX_DATA_INIT
00168 }
00169
00170 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00171 {
00172   CDialog::DoDataExchange(pDX);
00173   //{{AFX_DATA_MAP(CAboutDlg)
00174   //}}AFX_DATA_MAP
00175 }
00176
00177 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00178   //{{AFX_MSG_MAP(CAboutDlg)
00179     // No message handlers
00180   //}}AFX_MSG_MAP
00181 END_MESSAGE_MAP()
00182
00183 // App command to run the dialog
00184 void CMSOffice2007DemoApp::OnAppAbout()
00185 {
00186   CAboutDlg aboutDlg;
00187   aboutDlg.DoModal();
00188 }
00189
00190 void CMSOffice2007DemoApp::OnFileNew()
00191 {
00192   if (m_pMainWnd && ((CMainFrame *)m_pMainWnd)->IsPrintPreview())
00193   {
00194     m_pMainWnd->SendMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
00195   }
00196   CWinAppEx::OnFileNew();
00197 }
00198
00199 void CMSOffice2007DemoApp::OnFileOpen()
00200 {
00201   if (m_pMainWnd && ((CMainFrame *)m_pMainWnd)->IsPrintPreview())
00202   {
00203     m_pMainWnd->SendMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
00204   }
00205   CWinAppEx::OnFileOpen();
00206 }
00207
00208 BOOL CMSOffice2007DemoApp::OnOpenRecentFile(UINT nID)
00209 {
00210   if (m_pMainWnd && ((CMainFrame *)m_pMainWnd)->IsPrintPreview())
00211   {
00212     m_pMainWnd->SendMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
00213   }
00214   return CWinAppEx::OnOpenRecentFile(nID);
00215 }
00216
00217 /////////////////////////////////////////////////////////////////////////////
00218 // CMSOffice2007DemoApp message handlers
00219
00220 int CMSOffice2007DemoApp::ExitInstance()
00221 {
00222   // Save options:
00223   WriteInt(_T("ShowFloaty"), m_bShowFloaty);
00224   WriteInt(_T("ShowDevTab"), m_bShowDevTab);
00225   WriteInt(_T("ApplicationLook"), m_nAppLook);
00226   WriteInt(_T("ShowToolTips"), m_bShowToolTips);
00227   WriteInt(_T("ShowKeyTips"), m_bShowKeyTips);
00228   WriteInt(_T("bShowToolTipDescr"), m_bShowToolTipDescr);
00229   WriteInt(_T("IsRTL"), m_bIsRTL);
00230
00231   return CWinAppEx::ExitInstance();
00232 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/LunchPg.h Source File

  • general
  • snapvw

LunchPg.h

Go to the documentation of this file.
00001 // LunchPg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CLunchPage dialog
00014
00015 class CLunchPage : public CPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CLunchPage)
00018
00019 // Construction
00020 public:
00021   CLunchPage();
00022   ~CLunchPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CLunchPage)
00026   enum { IDD = IDD_LUNCH };
00027     // NOTE - ClassWizard will add data members here.
00028     //    DO NOT EDIT what you see in these blocks of generated code !
00029   //}}AFX_DATA
00030
00031
00032 // Overrides
00033   // ClassWizard generate virtual function overrides
00034   //{{AFX_VIRTUAL(CLunchPage)
00035   protected:
00036   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 protected:
00041   // Generated message map functions
00042   //{{AFX_MSG(CLunchPage)
00043   virtual BOOL OnInitDialog();
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046
00047 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapeobj.cpp Source File

  • general
  • propdlg

shapeobj.cpp

Go to the documentation of this file.
00001 // shapeobj.cpp
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014
00015 #include "shapeobj.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 IMPLEMENT_SERIAL(CShape, CObject, 0)
00023
00024 CShape::CShape()
00025 {
00026   m_shapecolor = black;
00027   m_shapestyle = rectangle;
00028   m_rect = CRect(0,0,0,0);
00029 }
00030
00031 CShape::CShape(SHAPE_COLOR_ENUM colorenum, SHAPE_STYLE shapestyle,
00032   CRect& rect)
00033   : m_shapestyle(shapestyle), m_rect(rect)
00034 {
00035   m_shapecolor.e = colorenum;
00036 }
00037
00038 void CShape::Draw(CDC* pDC, BOOL bSelected)
00039 {
00040   CPen* pPenOld = NULL;
00041   CPen penNew;
00042   if (bSelected)
00043   {
00044     penNew.CreatePen(PS_DOT, 1, RGB(0,0,0));
00045     pPenOld = pDC->SelectObject(&penNew);
00046   }
00047
00048   CBrush brushNew((COLORREF)m_shapecolor);
00049   CBrush* pBrushOld = pDC->SelectObject(&brushNew);
00050   switch (m_shapestyle)
00051   {
00052     case rectangle:
00053       pDC->Rectangle(m_rect);
00054       break;
00055     case rounded_rectangle:
00056       pDC->RoundRect(m_rect,
00057         CPoint(m_rect.Width()/8, m_rect.Height()/8));
00058       break;
00059     case ellipse:
00060       pDC->Ellipse(m_rect);
00061       break;
00062   }
00063
00064   pDC->SelectObject(pBrushOld);
00065   if (pPenOld != NULL)
00066     pDC->SelectObject(pPenOld);
00067 }
00068
00069 void CShape::Serialize(CArchive& ar)
00070 {
00071   if (ar.IsStoring())
00072   {
00073     ar << (WORD)m_shapecolor.e;
00074     ar << (WORD)m_shapestyle;
00075     ar << m_rect;
00076   }
00077   else
00078   {
00079     WORD n;
00080     ar >> n;
00081     m_shapecolor.e = (SHAPE_COLOR_ENUM)n;
00082     ar >> n;
00083     m_shapestyle = (SHAPE_STYLE)n;
00084     ar >> m_rect;
00085   }
00086 }
00087
00088
00089 SHAPE_COLOR::operator COLORREF() const
00090 {
00091   switch (e)
00092   {
00093     case black: return RGB(0,0,0);
00094     case red: return RGB(255,0,0);
00095     case green: return RGB(0,255,0);
00096     case blue: return RGB(0,0,255);
00097   }
00098   ASSERT(FALSE);
00099   return 0;
00100 }
00101
00102 const SHAPE_COLOR& SHAPE_COLOR::operator = (COLORREF colorref)
00103 {
00104   switch (colorref)
00105   {
00106     case RGB(0,0,0): e = black; break;
00107     case RGB(255,0,0): e =  red; break;
00108     case RGB(0,255,0): e = green; break;
00109     case RGB(0,0,255): e = blue; break;
00110   }
00111   ASSERT(FALSE);
00112   e = black;
00113   return *this;
00114 }
00115
00116 SHAPE_COLOR::operator int() const
00117 {
00118   return (int)e;
00119 };
00120
00121 const SHAPE_COLOR& SHAPE_COLOR::operator = (int n)
00122 {
00123   e = (SHAPE_COLOR_ENUM)n;
00124   return *this;
00125 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/pageset.h Source File

  • ole
  • superpad

pageset.h

Go to the documentation of this file.
00001 // pageset.h : page setup dialog interface
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef _PAGESET_H_
00014 #define _PAGESET_H_
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CPageSetupDlg dialog
00018
00019 class CPageSetupDlg : public CDialog
00020 {
00021   DECLARE_DYNAMIC(CPageSetupDlg)
00022 // Construction
00023 public:
00024   CPageSetupDlg(CWnd* pParent = NULL);    // standard constructor
00025   void Initialize();
00026   void Terminate();
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CPageSetupDlg)
00030   enum { IDD = IDD_PAGE_SETUP };
00031   CString m_strFooter;
00032   CString m_strHeader;
00033   int     m_iFooterTime;
00034   int     m_iHeaderTime;
00035   //}}AFX_DATA
00036
00037   CString m_strFooterOld;
00038   CString m_strHeaderOld;
00039   int     m_iFooterTimeOld;
00040   int     m_iHeaderTimeOld;
00041
00042 // Operations
00043   void FormatHeader(CString& strHeader, CTime& time,
00044     LPCTSTR pszFileName, UINT nPage);
00045   void FormatFooter(CString& strFooter, CTime& time,
00046     LPCTSTR pszFileName, UINT nPage);
00047
00048 // Implementation
00049 protected:
00050   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00051
00052   static void FormatFilePage(
00053     CString& strFormat, LPCTSTR pszFileName, UINT nPage);
00054
00055   // Generated message map functions
00056   //{{AFX_MSG(CPageSetupDlg)
00057   //}}AFX_MSG
00058   DECLARE_MESSAGE_MAP()
00059 };
00060
00061 #endif // _PAGESET_H_
00062
00063 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/resource.h Source File

  • vc2008fp
  • TabControl

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by TabControl.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDD_TABCONTROL_FORM             101
00007 #define IDS_WRONG_DISPLAY_SETTINGS      102
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_TABCONTYPE                  129
00010 #define IDR_CONTEXT_MENU                130
00011 #define IDR_POPUP_TOOLBAR               131
00012 #define IDR_POPUP_STYLE_20007           132
00013 #define IDB_TOOLBAR256                  151
00014 #define IDR_THEME                       154
00015 #define IDB_ICONS                       155
00016 #define IDD_ABOUTBOX                    999
00017 #define IDC_COMPANY_URL                 1041
00018 #define IDC_TAB                         1042
00019 #define IDC_TAB_STYLE                   1043
00020 #define IDC_LOCATION                    1044
00021 #define IDC_LOCATION2                   1045
00022 #define IDC_COLOR                       1046
00023 #define IDC_COLOR1                      1047
00024 #define IDC_COLOR2                      1048
00025 #define IDC_TAB_ICONS                   1049
00026 #define IDC_NOTIFICATIONS               1050
00027 #define IDC_TAB_SWAP                    1051
00028 #define ID_VIEW_CUSTOMIZE               32770
00029 #define ID_VIEW_TOOLBARS                32771
00030 #define ID_VIEW_APPLOOK_2000            32832
00031 #define ID_VIEW_APPLOOK_XP              32833
00032 #define ID_VIEW_APPLOOK_2003            32834
00033 #define ID_VIEW_APPLOOK_WIN_XP          32835
00034 #define ID_VIEW_APPLOOK_VS2005          32836
00035 #define ID_VIEW_APPLOOK_2007_1          32837
00036 #define ID_VIEW_APPLOOK_2007_2          32838
00037 #define ID_VIEW_APPLOOK_2007_3          32839
00038 #define ID_VIEW_APPLOOK_2007_4          32840
00039 #define ID_VIEW_THEME_TOOLBAR           32841
00040 #define ID_LABEL                        32842
00041
00042 // Next default values for new objects
00043 //
00044 #ifdef APSTUDIO_INVOKED
00045 #ifndef APSTUDIO_READONLY_SYMBOLS
00046 #define _APS_3D_CONTROLS                     1
00047 #define _APS_NEXT_RESOURCE_VALUE        156
00048 #define _APS_NEXT_COMMAND_VALUE         32843
00049 #define _APS_NEXT_CONTROL_VALUE         1051
00050 #define _APS_NEXT_SYMED_VALUE           108
00051 #endif
00052 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/stdafx.cpp Source File

  • vc2008fp
  • MSMoneyDemo

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // stdafx.cpp : source file that includes just the standard includes
00011 // MSMoneyDemo.pch will be the pre-compiled header
00012 // stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
00015
00016
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/stdafx.cpp Source File

  • general
  • diblook

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/zoomdlg.h Source File

  • ole
  • hiersvr

zoomdlg.h

Go to the documentation of this file.
00001 // zoomdlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CZoomDlg dialog
00014
00015 class CZoomDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CZoomDlg(CWnd* pParent = NULL); // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CZoomDlg)
00023   enum { IDD = IDD_CUSTZOOM };
00024   int     m_zoomX;
00025   int     m_zoomY;
00026   //}}AFX_DATA
00027
00028 // Implementation
00029 protected:
00030   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00031
00032   // Generated message map functions
00033   //{{AFX_MSG(CZoomDlg)
00034     // NOTE: the ClassWizard will add member functions here
00035   //}}AFX_MSG
00036   DECLARE_MESSAGE_MAP()
00037 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/HistoryObj.h Source File

  • vc2008fp
  • IEDemo

HistoryObj.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CHistoryObj
00014 {
00015 public:
00016   CHistoryObj(const CString& strTitle, const CString& strURL, const UINT uiCommand);
00017   virtual ~CHistoryObj();
00018
00019   LPCTSTR GetTitle () const
00020   {
00021     return m_strTitle;
00022   }
00023
00024   LPCTSTR GetURL () const
00025   {
00026     return m_strURL;
00027   }
00028
00029   UINT GetCommand () const
00030   {
00031     return m_uiCommand;
00032   }
00033
00034 protected:
00035   const CString m_strTitle;
00036   const CString m_strURL;
00037   const UINT    m_uiCommand;
00038 };
00039
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CImageApp Member List

This is the complete list of members for CImageApp, including all inherited members.
ExitInstance() | CImageApp
InitInstance() | CImageApp
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRowListDoc Member List

This is the complete list of members for CRowListDoc, including all inherited members.
CRowListDoc() | CRowListDoc | [protected]
OnNewDocument() | CRowListDoc | [virtual]
Serialize(CArchive &ar) | CRowListDoc | [virtual]
~CRowListDoc() | CRowListDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CResourceViewBar Member List

This is the complete list of members for CResourceViewBar, including all inherited members.
CResourceViewBar() | CResourceViewBar |
FillResourceView() | CResourceViewBar | [protected]
m_ResourceViewImages | CResourceViewBar | [protected]
m_wndResourceView | CResourceViewBar | [protected]
OnChangeVisualStyle() | CResourceViewBar |
OnContextMenu(CWnd *pWnd, CPoint point) | CResourceViewBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CResourceViewBar | [protected]
OnEditClear() | CResourceViewBar | [protected]
OnEditCopy() | CResourceViewBar | [protected]
OnEditCut() | CResourceViewBar | [protected]
OnEditPaste() | CResourceViewBar | [protected]
OnPaint() | CResourceViewBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CResourceViewBar | [protected]
OnSize(UINT nType, int cx, int cy) | CResourceViewBar | [protected]
~CResourceViewBar() | CResourceViewBar | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethInfo.Cpp Source File

  • ole
  • TstCon

MethInfo.Cpp

Go to the documentation of this file.
00001 // File: MethInfo.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 CMethodParamInfo::CMethodParamInfo() :
00020    m_vt( VT_EMPTY )
00021 {
00022 }
00023
00024 CMethodParamInfo::~CMethodParamInfo()
00025 {
00026 }
00027
00028 CString CMethodParamInfo::GetName() const
00029 {
00030    return( m_strName );
00031 }
00032
00033 VARTYPE CMethodParamInfo::GetType() const
00034 {
00035    return( m_vt );
00036 }
00037
00038 HRESULT CMethodParamInfo::Init( LPCOLESTR pszName, const ELEMDESC* pElemDesc )
00039 {
00040    m_strName = pszName;
00041    m_vt = pElemDesc->tdesc.vt;
00042
00043    return( S_OK );
00044 }
00045
00046
00047 CMethodInfo::CMethodInfo() :
00048    m_tLog( TRUE ),
00049    m_tLogEditRequests( TRUE ),
00050    m_eRequestEditResponse( REQUESTEDIT_ALWAYS )
00051 {
00052 }
00053
00054 CMethodInfo::~CMethodInfo()
00055 {
00056    int iParam;
00057
00058    for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
00059    {
00060     delete m_apParamInfo[iParam];
00061    }
00062 }
00063
00064 void CMethodInfo::EnableEditRequestLogging( BOOL tEnable )
00065 {
00066    m_tLogEditRequests = tEnable;
00067 }
00068
00069 void CMethodInfo::EnableLogging( BOOL tEnable )
00070 {
00071    m_tLog = tEnable;
00072 }
00073
00074 DISPID CMethodInfo::GetID() const
00075 {
00076    return( m_dispid );
00077 }
00078
00079 INVOKEKIND CMethodInfo::GetInvokeKind() const
00080 {
00081    return( m_invkind );
00082 }
00083
00084 CString CMethodInfo::GetName() const
00085 {
00086    return( m_strName );
00087 }
00088
00089 int CMethodInfo::GetNumParams() const
00090 {
00091    return( (int)m_apParamInfo.GetSize() );
00092 }
00093
00094 CMethodParamInfo* CMethodInfo::GetParam( int iParam ) const
00095 {
00096    return( m_apParamInfo[iParam] );
00097 }
00098
00099 int CMethodInfo::GetRequestEditResponse() const
00100 {
00101    return( m_eRequestEditResponse );
00102 }
00103
00104 HRESULT CMethodInfo::Init( ITypeInfo* pTypeInfo, const FUNCDESC* pFuncDesc )
00105 {
00106
00107    USES_CONVERSION_EX;
00108    HRESULT hResult;
00109    UINT nNames;
00110    int iParam;
00111    UINT iName;
00112    LPCOLESTR pszParamName;
00113    CString strPropertyValue;
00114
00115    ENSURE( pTypeInfo != NULL );
00116    ENSURE( pFuncDesc != NULL );
00117
00118    m_dispid = pFuncDesc->memid;
00119    m_invkind = pFuncDesc->invkind;
00120    m_tBindable = pFuncDesc->wFuncFlags&FUNCFLAG_FBINDABLE;
00121    m_tRequestEdit = pFuncDesc->wFuncFlags&FUNCFLAG_FREQUESTEDIT;
00122
00123    m_apParamInfo.SetSize( pFuncDesc->cParams );
00124    for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
00125    {
00126     m_apParamInfo[iParam] = new CMethodParamInfo;
00127     if( m_apParamInfo[iParam] == NULL )
00128     {
00129      return( E_OUTOFMEMORY );
00130     }
00131    }
00132
00133    ::ATL::CAutoStackPtr<BSTR> pbstrNames((BSTR*)_malloca( (pFuncDesc->cParams+1)*sizeof( BSTR ) ));
00134    for( iName = 0; iName < UINT( pFuncDesc->cParams+1 ); iName++ )
00135    {
00136     pbstrNames[iName] = NULL;
00137    }
00138
00139    hResult = pTypeInfo->GetNames( m_dispid, pbstrNames, pFuncDesc->cParams+1,
00140     &nNames );
00141     if( FAILED( hResult ) )
00142    {
00143   return( hResult );
00144    }
00145    ASSERT( nNames > 0 );
00146
00147    m_strName = pbstrNames[0];
00148    TRACE( "  Method: %s ", LPCTSTR( m_strName ) );
00149    switch( m_invkind )
00150    {
00151    case INVOKE_FUNC:
00152     ASSERT( nNames == UINT( pFuncDesc->cParams+1 ) );
00153     break;
00154
00155    case INVOKE_PROPERTYGET:
00156     ASSERT( nNames == UINT( pFuncDesc->cParams+1 ) );
00157     break;
00158
00159    case INVOKE_PROPERTYPUT:
00160     ASSERT( nNames == UINT( pFuncDesc->cParams ) );
00161     break;
00162
00163    case INVOKE_PROPERTYPUTREF:
00164     ASSERT( nNames == UINT( pFuncDesc->cParams ) );
00165     break;
00166
00167    default:
00168     ASSERT( FALSE );
00169     break;
00170    }
00171    for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
00172    {
00173     if( pbstrNames[iParam+1] == NULL )
00174     {
00175      // This must be the right-hand side of a property put or putref.
00176      LOAD_STRING_FROM_RESOURCE( strPropertyValue, IDS_PROPERTYVALUE );
00177      pszParamName = T2OLE_EX_DEF( LPCTSTR( strPropertyValue ) );
00178     }
00179     else
00180     {
00181      pszParamName = pbstrNames[iParam+1];
00182     }
00183     m_apParamInfo[iParam]->Init( pszParamName,
00184      &pFuncDesc->lprgelemdescParam[iParam] );
00185    }
00186
00187    for( iName = 0; iName < UINT( pFuncDesc->cParams+1 ); iName++ )
00188    {
00189     if( pbstrNames[iName] != NULL )
00190     {
00191      ::SysFreeString( pbstrNames[iName] );
00192     }
00193    }
00194    return( S_OK );
00195 }
00196
00197 HRESULT CMethodInfo::InitPropertyGet( ITypeInfo* pTypeInfo,
00198    const VARDESC* pVarDesc )
00199 {
00200    HRESULT hResult;
00201    BSTR bstrName;
00202    UINT nNames;
00203
00204    ENSURE( pTypeInfo != NULL );
00205    ENSURE( pVarDesc != NULL );
00206
00207    m_dispid = pVarDesc->memid;
00208    m_invkind = INVOKE_PROPERTYGET;
00209    m_tBindable = pVarDesc->wVarFlags&VARFLAG_FBINDABLE;
00210    m_tRequestEdit = pVarDesc->wVarFlags&FUNCFLAG_FREQUESTEDIT;
00211
00212    bstrName = NULL;
00213    hResult = pTypeInfo->GetNames( m_dispid, &bstrName, 1, &nNames );
00214    if( FAILED( hResult ) )
00215    {
00216     return( hResult );
00217    }
00218    ASSERT( nNames == 1 );
00219
00220    m_strName = bstrName;
00221    SysFreeString( bstrName );
00222
00223    return( S_OK );
00224 }
00225
00226 HRESULT CMethodInfo::InitPropertyPut( ITypeInfo* pTypeInfo,
00227    const VARDESC* pVarDesc )
00228 {
00229
00230    CString strPropertyValue;
00231    HRESULT hResult;
00232    BSTR bstrName;
00233    UINT nNames;
00234
00235    ENSURE( pTypeInfo != NULL );
00236    ENSURE( pVarDesc != NULL );
00237
00238    m_dispid = pVarDesc->memid;
00239    m_invkind = INVOKE_PROPERTYPUT;
00240    m_tBindable = pVarDesc->wVarFlags&VARFLAG_FBINDABLE;
00241    m_tRequestEdit = pVarDesc->wVarFlags&FUNCFLAG_FREQUESTEDIT;
00242
00243    bstrName = NULL;
00244    hResult = pTypeInfo->GetNames( m_dispid, &bstrName, 1, &nNames );
00245    if( FAILED( hResult ) )
00246    {
00247     return( hResult );
00248    }
00249    ASSERT( nNames == 1 );
00250
00251    m_strName = bstrName;
00252    SysFreeString( bstrName );
00253
00254    m_apParamInfo.SetSize( 1 );
00255    m_apParamInfo[0] = new CMethodParamInfo;
00256    if( m_apParamInfo[0] == NULL )
00257    {
00258     return( E_OUTOFMEMORY );
00259    }
00260
00261    LOAD_STRING_FROM_RESOURCE( strPropertyValue, IDS_PROPERTYVALUE );
00262
00263    m_apParamInfo[0]->Init( CT2COLE( LPCTSTR( strPropertyValue ) ),
00264     &pVarDesc->elemdescVar );
00265
00266    return( S_OK );
00267 }
00268
00269 BOOL CMethodInfo::IsBindable() const
00270 {
00271    return( m_tBindable );
00272 }
00273
00274 BOOL CMethodInfo::IsLogged() const
00275 {
00276    return( m_tLog );
00277 }
00278
00279 BOOL CMethodInfo::LogEditRequests() const
00280 {
00281    return( m_tLogEditRequests );
00282 }
00283
00284 void CMethodInfo::LogEvent( CLog& log, DISPPARAMS* pdpParams )
00285 {
00286    int iParam;
00287    CMethodParamInfo* pParamInfo;
00288    COleVariant varParamValue;
00289
00290    log<<m_strName<<_T( " " );
00291
00292    if( pdpParams->cArgs != UINT( m_apParamInfo.GetSize() ) )
00293    {
00294     log<<_T( "(Wrong number of arguments)\n" );
00295    }
00296    else
00297    {
00298     for( iParam = 0; iParam < m_apParamInfo.GetSize(); iParam++ )
00299     {
00300      pParamInfo = m_apParamInfo[iParam];
00301      log<<_T( "{" )<<pParamInfo->GetName()<<_T( "=" );
00302      try
00303      {
00304        varParamValue = pdpParams->rgvarg[pdpParams->cArgs-iParam-1];
00305      log<<varParamValue;
00306      }
00307      catch( COleException* pException )
00308      {
00309       pException->Delete();
00310      }
00311      log<<_T( "}" );
00312     }
00313     log<<_T( "\n" );
00314    }
00315 }
00316
00317 BOOL CMethodInfo::RequestsEdit() const
00318 {
00319    return( m_tRequestEdit );
00320 }
00321
00322 void CMethodInfo::SetRequestEditResponse( int eResponse )
00323 {
00324    m_eRequestEditResponse = eResponse;
00325 }
00326
00327
00328 CInterfaceInfo::CInterfaceInfo() :
00329    m_iid( IID_NULL )
00330 {
00331 }
00332
00333 CInterfaceInfo::~CInterfaceInfo()
00334 {
00335    int iMethod;
00336
00337    for( iMethod = 0; iMethod < m_apMethodInfo.GetSize(); iMethod++ )
00338    {
00339     delete m_apMethodInfo[iMethod];
00340    }
00341 }
00342
00343 CMethodInfo* CInterfaceInfo::FindMethod( DISPID dispid ) const
00344 {
00345    int iMethod;
00346
00347    for( iMethod = 0; iMethod < m_apMethodInfo.GetSize(); iMethod++ )
00348    {
00349     if( m_apMethodInfo[iMethod]->GetID() == dispid )
00350     {
00351      return( m_apMethodInfo[iMethod] );
00352     }
00353    }
00354
00355    return( NULL );
00356 }
00357
00358 CMethodInfo* CInterfaceInfo::FindPropertyGet( DISPID dispid ) const
00359 {
00360    int iMethod;
00361    CMethodInfo* pMethodInfo;
00362
00363    for( iMethod = 0; iMethod < m_apMethodInfo.GetSize(); iMethod++ )
00364    {
00365     pMethodInfo = m_apMethodInfo[iMethod];
00366     if( (pMethodInfo->GetID() == dispid) && (pMethodInfo->GetInvokeKind() ==
00367      INVOKE_PROPERTYGET) )
00368     {
00369      return( pMethodInfo );
00370     }
00371    }
00372
00373    return( NULL );
00374 }
00375
00376 IID CInterfaceInfo::GetIID() const
00377 {
00378    return( m_iid );
00379 }
00380
00381 CMethodInfo* CInterfaceInfo::GetMethod( int iMethod ) const
00382 {
00383    return( m_apMethodInfo[iMethod] );
00384 }
00385
00386 int CInterfaceInfo::GetNumMethods() const
00387 {
00388    return( (int)m_apMethodInfo.GetSize() );
00389 }
00390
00391 HRESULT CInterfaceInfo::Init( ITypeInfo* pTypeInfo )
00392 {
00393    HRESULT hResult;
00394    CSmartTypeAttr pTypeAttr( pTypeInfo );
00395    CSmartFuncDesc pFuncDesc( pTypeInfo );
00396    CSmartVarDesc pVarDesc( pTypeInfo );
00397    int iVar;
00398    int iMethod;
00399    int iDestMethod;
00400    BOOL tFound;
00401
00402    ASSERT( pTypeInfo != NULL );
00403
00404    hResult = pTypeInfo->GetTypeAttr( &pTypeAttr );
00405    if( FAILED( hResult ) )
00406    {
00407     return( hResult );
00408    }
00409
00410    m_iid = pTypeAttr->guid;
00411
00412    // Allocate enough space for the maximum number of methods that we could
00413    // possibly have, plus room for two methods for each property in case the
00414    // type info doesn't specify properties as put and set methods.
00415    m_apMethodInfo.SetSize( pTypeAttr->cFuncs+(2*pTypeAttr->cVars) );
00416
00417    iDestMethod = 0;
00418    for( iMethod = 0; iMethod < pTypeAttr->cFuncs; iMethod++ )
00419    {
00420     hResult = pTypeInfo->GetFuncDesc( iMethod, &pFuncDesc );
00421     if( FAILED( hResult ) )
00422     {
00423      return( hResult );
00424     }
00425
00426     // Only add the function to our list if it is at least at nesting level
00427     // 2 (i.e. defined in an interface derived from IDispatch).
00428     if( !(pFuncDesc->wFuncFlags&FUNCFLAG_FRESTRICTED) &&
00429      (pFuncDesc->funckind == FUNC_DISPATCH) )
00430     {
00431      m_apMethodInfo[iDestMethod] = new CMethodInfo;
00432      if( m_apMethodInfo[iDestMethod] == NULL )
00433      {
00434       return( E_OUTOFMEMORY );
00435      }
00436      hResult = m_apMethodInfo[iDestMethod]->Init( pTypeInfo, pFuncDesc );
00437      if( FAILED( hResult ) )
00438      {
00439       return( hResult );
00440      }
00441      iDestMethod++;
00442     }
00443     pFuncDesc.Release();
00444    }
00445
00446    for( iVar = 0; iVar < pTypeAttr->cVars; iVar++ )
00447    {
00448     hResult = pTypeInfo->GetVarDesc( iVar, &pVarDesc );
00449     if( FAILED( hResult ) )
00450     {
00451      return( hResult );
00452     }
00453
00454     if( (pVarDesc->varkind == VAR_DISPATCH) && !(pVarDesc->wVarFlags&
00455      VARFLAG_FRESTRICTED) )
00456     {
00457      tFound = FALSE;
00458      for( iMethod = 0; iMethod < iDestMethod; iMethod++ )
00459      {
00460       if( (m_apMethodInfo[iMethod]->GetID() == pVarDesc->memid) &&
00461          (m_apMethodInfo[iMethod]->GetInvokeKind() ==
00462          INVOKE_PROPERTYGET) )
00463       {
00464          tFound = TRUE;
00465       }
00466      }
00467
00468      if( !tFound )
00469      {
00470       // We haven't already added this one as a method, so do it now.
00471
00472       m_apMethodInfo[iDestMethod] = new CMethodInfo;
00473       if( m_apMethodInfo[iDestMethod] == NULL )
00474       {
00475          return( E_OUTOFMEMORY );
00476       }
00477       hResult = m_apMethodInfo[iDestMethod]->InitPropertyGet( pTypeInfo,
00478          pVarDesc );
00479       if( FAILED( hResult ) )
00480       {
00481          return( hResult );
00482       }
00483       iDestMethod++;
00484      }
00485
00486      if( !(pVarDesc->wVarFlags&VARFLAG_FREADONLY) )
00487      {
00488       tFound = FALSE;
00489       for( iMethod = 0; iMethod < iDestMethod; iMethod++ )
00490       {
00491          if( (m_apMethodInfo[iMethod]->GetID() == pVarDesc->memid) &&
00492           (m_apMethodInfo[iMethod]->GetInvokeKind() ==
00493           INVOKE_PROPERTYPUT) )
00494          {
00495           tFound = TRUE;
00496          }
00497       }
00498
00499       if( !tFound )
00500       {
00501          // We haven't already added this one as a method, so do it now.
00502
00503          m_apMethodInfo[iDestMethod] = new CMethodInfo;
00504          if( m_apMethodInfo[iDestMethod] == NULL )
00505          {
00506           return( E_OUTOFMEMORY );
00507          }
00508          hResult = m_apMethodInfo[iDestMethod]->InitPropertyPut(
00509           pTypeInfo, pVarDesc );
00510          if( FAILED( hResult ) )
00511          {
00512           return( hResult );
00513          }
00514          iDestMethod++;
00515       }
00516      }
00517     }
00518
00519     pVarDesc.Release();
00520    }
00521
00522    // Trim the array down to the actual size.
00523    m_apMethodInfo.SetSize( iDestMethod );
00524
00525    return( S_OK );
00526 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBigIcon Member List

This is the complete list of members for CBigIcon, including all inherited members.
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CBigIcon | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CBigIcon | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CBigIcon | [protected, virtual]
m_bitmap | CBigIcon |
m_sizeBitmap | CBigIcon |
OnEraseBkgnd(CDC *pDC) | CBigIcon | [protected]
OnEraseBkgnd(CDC *pDC) | CBigIcon | [protected]
OnEraseBkgnd(CDC *pDC) | CBigIcon | [protected]
SizeToContent() | CBigIcon |
SizeToContent() | CBigIcon |
SizeToContent() | CBigIcon |
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonTableButton Member List

This is the complete list of members for CRibbonTableButton, including all inherited members.
CRibbonTableButton() | CRibbonTableButton | [inline]
CRibbonTableButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex) | CRibbonTableButton |
GetColumns() | CRibbonTableButton | [inline, static]
GetRows() | CRibbonTableButton | [inline, static]
m_nColumns | CRibbonTableButton | [protected, static]
m_nRows | CRibbonTableButton | [protected, static]
NotifyHighlightListItem(int nIndex) | CRibbonTableButton | [protected, virtual]
OnDrawPaletteIcon(CDC *pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon *pIcon, COLORREF clrText) | CRibbonTableButton | [protected, virtual]
OnShowPopupMenu() | CRibbonTableButton | [protected, virtual]
~CRibbonTableButton() | CRibbonTableButton | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CServerItem Member List

This is the complete list of members for CServerItem, including all inherited members.
CServerItem(CServerDoc *pDoc, CServerNode *pNode) | CServerItem |
CServerNode class | CServerItem | [friend]
GetDocument() const | CServerItem | [inline]
GetNativeClipboardData(COleDataSource *pDataSource) | CServerItem | [protected]
m_pServerNode | CServerItem |
OnDraw(CDC *pDC, CSize &rSize) | CServerItem | [protected, virtual]
OnGetClipboardData(BOOL bIncludeLink, LPPOINT pptOffset, LPSIZE pSize) | CServerItem | [protected, virtual]
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CServerItem | [protected, virtual]
OnOpen() | CServerItem | [protected, virtual]
OnRenderFileData(LPFORMATETC lpFormatEtc, CFile *pFile) | CServerItem | [protected, virtual]
Serialize(CArchive &ar) | CServerItem | [protected, virtual]
~CServerItem() | CServerItem |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/statpage.cpp Source File

  • ole
  • drawcli

statpage.cpp

Go to the documentation of this file.
00001 // statpage.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "drawcli.h"
00013 #include "statpage.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CStatPage property page
00022
00023 IMPLEMENT_DYNCREATE(CStatPage, CPropertyPage)
00024
00025 CStatPage::CStatPage() : CPropertyPage(CStatPage::IDD)
00026 {
00027     //{{AFX_DATA_INIT(CStatPage)
00028   m_strCreateDate = _T("");
00029   m_strEditTime = _T("");
00030   m_strLastPrint = _T("");
00031   m_strLastSave = _T("");
00032   m_strNumChars = _T("");
00033   m_strNumPages = _T("");
00034   m_strNumWords = _T("");
00035   m_strRevNum = _T("");
00036   m_strSavedBy = _T("");
00037   m_strSecurity = _T("");
00038   //}}AFX_DATA_INIT
00039 }
00040
00041 CStatPage::~CStatPage()
00042 {
00043 }
00044
00045 void CStatPage::DoDataExchange(CDataExchange* pDX)
00046 {
00047   CPropertyPage::DoDataExchange(pDX);
00048     //{{AFX_DATA_MAP(CStatPage)
00049   DDX_Text(pDX, IDC_CREATEDATE, m_strCreateDate);
00050   DDX_Text(pDX, IDC_EDITTIME, m_strEditTime);
00051   DDX_Text(pDX, IDC_LASTPRINT, m_strLastPrint);
00052   DDX_Text(pDX, IDC_LASTSAVE, m_strLastSave);
00053   DDX_Text(pDX, IDC_NUMCHARS, m_strNumChars);
00054   DDX_Text(pDX, IDC_NUMPAGES, m_strNumPages);
00055   DDX_Text(pDX, IDC_NUMWORDS, m_strNumWords);
00056   DDX_Text(pDX, IDC_REVNUM, m_strRevNum);
00057   DDX_Text(pDX, IDC_SAVEDBY, m_strSavedBy);
00058   DDX_Text(pDX, IDC_SECURITY, m_strSecurity);
00059   //}}AFX_DATA_MAP
00060 }
00061
00062
00063 BEGIN_MESSAGE_MAP(CStatPage, CPropertyPage)
00064     //{{AFX_MSG_MAP(CStatPage)
00065     // NOTE: the ClassWizard will add message map macros here
00066   //}}AFX_MSG_MAP
00067 END_MESSAGE_MAP()
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CStatPage message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Swarm.cpp Source File

  • general
  • MMXSwarm

Swarm.cpp

Go to the documentation of this file.
00001 // Swarm.cpp : implementation of the CSwarm class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #include "stdafx.h"
00013 #include "Swarm.h"
00014
00015 COLORREF CBrightLeader::m_sColorTable[256] = { 0 };
00016
00017 ///////////////////////////////////////////////////////////////////////
00018 // Swarm
00019 CSwarm::CSwarm() :
00020   m_pSurf(NULL)
00021 {
00022
00023 }
00024
00025 CSwarm::~CSwarm()
00026 {
00027   Destroy();
00028 }
00029
00030 void CSwarm::Destroy()
00031 {
00032   for (size_t i = 0; i < m_LeaderArr.GetCount(); i++)
00033     delete m_LeaderArr[i];
00034
00035   for (size_t i = 0; i < m_LlamaArr.GetCount(); i++)
00036     delete m_LlamaArr[i];
00037
00038   m_LeaderArr.SetCount(0);
00039   m_LlamaArr.SetCount(0);
00040   m_pSurf = NULL;
00041 }
00042 void CSwarm::Initialize(CSurface *pSurf, int nLeaders, int nLlamas, const CSize &size)
00043 {
00044   Destroy();
00045   m_nWidth = size.cx;
00046   m_nHeight = size.cy;
00047
00048   if (!m_nHeight || !m_nWidth)
00049     return;
00050
00051   m_pSurf = pSurf;
00052   m_nAge = 0;
00053   m_nBorder = (m_nWidth + m_nHeight) / 50;
00054   m_LeaderArr.SetCount(nLeaders);
00055   m_LlamaArr.SetCount(nLlamas);
00056
00057   for (int i = 0; i < nLeaders; i++) {
00058     m_LeaderArr[i] = GetLeader();
00059   }
00060
00061   for (int i = 0; i < nLlamas; i++) {
00062     m_LlamaArr[i] = new CLlama();
00063     m_LlamaArr[i]->Init(this);
00064   }
00065 }
00066
00067 CLeader *CSwarm::GetLeader()
00068 {
00069   CLeader *pLeader = NULL;
00070   switch (Random(2)) {
00071   case 0:
00072     pLeader = new CBrightLeader();
00073     break;
00074   case 1:
00075     pLeader = new CHueLeader();
00076     break;
00077   }
00078   ASSERT(pLeader != NULL);
00079   pLeader->SetSwarm(this);
00080   return(pLeader);
00081 }
00082
00083 void CSwarm::Tick()
00084 {
00085   size_t nLeaderCount = m_LeaderArr.GetCount();
00086   size_t nLlamaCount = m_LlamaArr.GetCount();
00087   m_nAge++;
00088   // Very occasionally change a swarm type
00089   if ((Random() & 0x7f) == 0x7f) {
00090     size_t nIdx = m_nAge % nLeaderCount;
00091     CLeader *pLeader = GetLeader();
00092     pLeader->Import(m_LeaderArr[nIdx]);
00093     delete m_LeaderArr[nIdx];
00094     m_LeaderArr[nIdx] = pLeader;
00095   }
00096   // Kick a few Llamas
00097   size_t nKickCount = nLeaderCount;
00098   for (size_t i = 0; i < nKickCount; i++) {
00099     m_LlamaArr[Random(int(nLlamaCount))]->Kick();
00100   }
00101
00102   for (size_t i = 0; i < nLlamaCount; i++) {
00103     m_LlamaArr[i]->Tick(this, m_LeaderArr);
00104   }
00105
00106   for (size_t i = 0; i < nLeaderCount; i++) {
00107     m_LeaderArr[i]->Tick();
00108   }
00109 }
00110
00111 ///////////////////////////////////////////////////////////////////////
00112 // Llama
00113 void CLlama::Init(CSwarm *pSwarm)
00114 {
00115   p1.x = p2.x = Random(max(1, (pSwarm->GetWidth())));
00116     p1.y = p2.y = Random(max(1, (pSwarm->GetHeight())));
00117     dx = dy = 0;
00118   m_idxLeader = (size_t)-1;
00119 }
00120
00121 void CLlama::Kick()
00122 {
00123   dx += DeltaRandom(3);
00124   dy += DeltaRandom(3);
00125 }
00126
00127 void CLlama::Tick(CSwarm *pSwarm, const CLeaderArray &leaders)
00128 {
00129   CPoint ptClosestDelta;
00130     int nClosestDist = INT_MAX;
00131   size_t nLeaders = leaders.GetCount();
00132   size_t idxClosest = 0;
00133
00134     p2 = p1;
00135     for (size_t i = 0; i < nLeaders; i++) {
00136         CPoint leader(leaders[i]->p2); // pos of leader
00137         int nDist;
00138     CPoint ptRel(leader.x - p2.x, leader.y - p2.y);
00139         nDist = max(1, ABS(ptRel.x) + ABS(ptRel.y)); // approximation
00140         if (nDist < nClosestDist) {
00141       nClosestDist = nDist;
00142       idxClosest = i;
00143       ptClosestDelta = ptRel;
00144         }
00145     }
00146
00147   CLeader *pClosest = leaders[idxClosest];
00148   // Did we switch leaders?
00149   if (idxClosest != m_idxLeader) {
00150     m_idxLeader = idxClosest;
00151     m_color = pClosest->GetInitialLlamaColor();
00152   }
00153
00154     // Accelerate
00155   int acc = pClosest->GetLlamaAcc();
00156     dx += (ptClosestDelta.x * acc) / (nClosestDist*2);
00157     dy += (ptClosestDelta.y * acc) / (nClosestDist*2);
00158
00159     // Speed Limit Checks
00160   int vel = pClosest->GetLlamaVel();
00161     dx = max(min(dx, vel), -vel);
00162     dy = max(min(dy, vel), -vel);
00163
00164     // Move and bound check
00165     p1.x += dx;
00166     p1.y += dy;
00167
00168     Bounce(p1.x, 0, pSwarm->GetWidth(), dx);
00169     Bounce(p1.y, 0, pSwarm->GetHeight(), dy);
00170     m_color = pClosest->GetLlamaColor(m_color);
00171
00172   // Draw
00173   pSwarm->GetSurface()->Line(p1, p2, m_color);
00174 }
00175
00176 ///////////////////////////////////////////////////////////////////////
00177 // Leader
00178 CLeader::CLeader()
00179 {
00180   m_nMyAcc = 5;
00181   m_nMyVel = 10;
00182   m_nLlamaAcc = 5; // this is scaled back 1/2 when used
00183   m_nLlamaVel = 12;
00184 }
00185
00186 void CLeader::SetSwarm(CSwarm *pSwarm)
00187 {
00188   m_pSwarm = pSwarm;
00189   int nBorder = m_pSwarm->GetBorder();
00190   p1.x = p2.x = nBorder + Random(max(1, (m_pSwarm->GetWidth() - 2*nBorder)));
00191     p1.y = p2.y = nBorder + Random(max(1, (m_pSwarm->GetHeight() - 2*nBorder)));
00192     dx = dy = 0;
00193 }
00194
00195 void CLeader::Import(const CLeader *pRHS)
00196 {
00197   m_pSwarm = pRHS->m_pSwarm;
00198   p1 = pRHS->p1;
00199   p2 = pRHS->p2;
00200   dx = pRHS->dx;
00201   dy = pRHS->dy;
00202 }
00203
00204 void CLeader::Tick()
00205 {
00206     p2 = p1;
00207
00208     // accelerate the leader
00209     dx += DeltaRandom(m_nMyAcc);
00210     dy += DeltaRandom(m_nMyAcc);
00211
00212     // Speed Limit Checks
00213     dx = max(min(dx, m_nMyVel), -m_nMyVel);
00214     dy = max(min(dy, m_nMyVel), -m_nMyVel);
00215
00216     // Move
00217     p1.x += dx;
00218     p1.y += dy;
00219
00220     // Bounce Checks
00221   int nBorder = m_pSwarm->GetBorder();
00222   int nHeight = m_pSwarm->GetHeight();
00223   int nWidth = m_pSwarm->GetWidth();
00224     Bounce(p1.x, nBorder, nWidth-nBorder-1, dx);
00225     Bounce(p1.y, nBorder, nHeight-nBorder-1, dy);
00226
00227   // Draw
00228   m_pSwarm->GetSurface()->Line(p1, p2, RGB(255,255,255));
00229 }
00230
00231 COLORREF CLeader::HSB(BYTE H, BYTE S, BYTE B)
00232 {
00233     unsigned char p, q, t;
00234
00235     int i = (int) H * 6 / 256;
00236     float s = ((float) S) / (float) 255.0;
00237     float f = ((float) (H * 6 - i * 256)) / (float) 255.0;
00238     p = (BYTE) (B * (1.0 - s));
00239     q = (BYTE) (B * (1.0 - (s * f)));
00240     t = (BYTE) (B * (1.0 - (s * (1.0 - f))));
00241     switch (i) {
00242     case 0:
00243         return RGB(B, t, p);
00244     case 1:
00245         return RGB(q, B, p);
00246     case 2:
00247         return RGB(p, B, t);
00248     case 3:
00249         return RGB(p, q, B);
00250     case 4:
00251         return RGB(t, p, B);
00252     case 5:
00253         return RGB(B, p, q);
00254     }
00255
00256     // should never reach here
00257     ASSERT(FALSE);
00258     return RGB(255, 255, 255);
00259 }
00260
00261 ///////////////////////////////////////////////////////////////////////
00262 // BrightLeader
00263 CBrightLeader::CBrightLeader()
00264 {
00265   if (m_sColorTable[0] == 0) { // 1 time init
00266     for (int i = 0; i <= 255; i++) {
00267         m_sColorTable[i] = HSB((BYTE)i, 255, 255);
00268     }
00269   }
00270   m_nColorCounter = Random(256);
00271 }
00272
00273 void CBrightLeader::Tick()
00274 {
00275   if (++m_nColorCounter > 255)
00276     m_nColorCounter = 0;
00277   __super::Tick();
00278 }
00279
00280 COLORREF CBrightLeader::GetLlamaColor(COLORREF /*oldColor*/)
00281 {
00282   return(m_sColorTable[m_nColorCounter]);
00283 }
00284
00285 COLORREF CBrightLeader::GetInitialLlamaColor()
00286 {
00287   return(m_sColorTable[m_nColorCounter]);
00288 }
00289
00290 ///////////////////////////////////////////////////////////////////////
00291 // HueLeader
00292 CHueLeader::CHueLeader()
00293 {
00294   BYTE hue = (BYTE)Random(256);
00295     for (int i = 0; i <= 127; i++) {
00296     int j = min(i+32, 127);
00297         m_ColorTable[i] = HSB(hue, 255, (BYTE)j*2);
00298     }
00299     for (int i = 128; i <= 255; i++) {
00300     int j = max(i-32, 128);
00301         m_ColorTable[i] = HSB(hue, 255, (BYTE)(511-j*2));
00302     }
00303   m_nColorCounter = Random(256);
00304 }
00305
00306 void CHueLeader::Tick()
00307 {
00308   if (++m_nColorCounter > 255)
00309     m_nColorCounter = 0;
00310   __super::Tick();
00311 }
00312
00313 COLORREF CHueLeader::GetLlamaColor(COLORREF /*oldColor*/)
00314 {
00315   return(m_ColorTable[m_nColorCounter]);
00316 }
00317
00318 COLORREF CHueLeader::GetInitialLlamaColor()
00319 {
00320   return(m_ColorTable[m_nColorCounter]);
00321 }
00322
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControlsPropSheet.cpp Source File

  • vc2008fp
  • NewControls

NewControlsPropSheet.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "NewControlsPropSheet.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // NewControlsPropSheet
00022
00023 IMPLEMENT_DYNAMIC(NewControlsPropSheet, CMFCPropertySheet)
00024
00025 NewControlsPropSheet::NewControlsPropSheet(CWnd* pParentWnd)
00026 :CMFCPropertySheet(IDS_CAPTION, pParentWnd)
00027 {
00028   BOOL b32BitIcons = TRUE;
00029
00030   if (afxGlobalData.m_nBitsPerPixel < 16)
00031   {
00032     b32BitIcons = FALSE;
00033   }
00034
00035   SetLook(CMFCPropertySheet::PropSheetLook_OutlookBar);
00036   SetIconsList(b32BitIcons ? IDB_ICONS32 : IDB_ICONS, 32);
00037
00038   AddPage(&m_Page1);
00039   AddPage(&m_Page2);
00040   AddPage(&m_Page3);
00041   AddPage(&m_Page4);
00042   AddPage(&m_Page5);
00043   AddPage(&m_Page6);
00044
00045   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00046 }
00047
00048 NewControlsPropSheet::~NewControlsPropSheet()
00049 {
00050 }
00051
00052 BEGIN_MESSAGE_MAP(NewControlsPropSheet, CMFCPropertySheet)
00053   ON_WM_QUERYDRAGICON()
00054   ON_WM_SYSCOMMAND()
00055 END_MESSAGE_MAP()
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // NewControlsPropSheet message handlers
00059
00060 BOOL NewControlsPropSheet::OnInitDialog()
00061 {
00062   BOOL bResult = CMFCPropertySheet::OnInitDialog();
00063
00064   // Add "About..." menu item to system menu.
00065
00066   // IDM_ABOUTBOX must be in the system command range.
00067   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00068   ASSERT(IDM_ABOUTBOX < 0xF000);
00069
00070   CMenu* pSysMenu = GetSystemMenu(FALSE);
00071   if (pSysMenu != NULL)
00072   {
00073     BOOL bValidString;
00074     CString strAboutMenu;
00075     bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
00076     if (!strAboutMenu.IsEmpty())
00077     {
00078       pSysMenu->AppendMenu(MF_SEPARATOR);
00079       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00080     }
00081   }
00082
00083   // Set the icon for this dialog.  The framework does this automatically
00084   //  when the application's main window is not a dialog
00085   SetIcon(m_hIcon, TRUE); // Set big icon
00086   SetIcon(m_hIcon, FALSE); // Set small icon
00087
00088   return bResult;
00089 }
00090
00091 HCURSOR NewControlsPropSheet::OnQueryDragIcon()
00092 {
00093   return(HCURSOR) m_hIcon;
00094 }
00095
00096 void NewControlsPropSheet::OnSysCommand(UINT nID, LPARAM lParam)
00097 {
00098   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00099   {
00100     CAboutDlg aboutDlg;
00101     aboutDlg.DoModal();
00102   }
00103   else
00104   {
00105     CMFCPropertySheet::OnSysCommand(nID, lParam);
00106   }
00107 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/splitfra.cpp Source File

  • ole
  • oclient

splitfra.cpp

Go to the documentation of this file.
00001 // splitfra.cpp : implementation of the CSplitFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "oclient.h"
00015 #include "splitfra.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CSplitFrame
00024
00025 IMPLEMENT_DYNCREATE(CSplitFrame, CMDIChildWnd)
00026
00027 CSplitFrame::CSplitFrame()
00028 {
00029 }
00030
00031 CSplitFrame::~CSplitFrame()
00032 {
00033 }
00034
00035 BOOL CSplitFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
00036 {
00037   return m_wndSplitter.Create(this,
00038     2, 2,       // TODO: adjust the number of rows, columns
00039     CSize(10, 10),  // TODO: adjust the minimum pane size
00040     pContext);
00041 }
00042
00043 BEGIN_MESSAGE_MAP(CSplitFrame, CMDIChildWnd)
00044   //{{AFX_MSG_MAP(CSplitFrame)
00045     // NOTE - the ClassWizard will add and remove mapping macros here.
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CSplitFrame message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/ObjView.h Source File

  • ole
  • MFCBind

ObjView.h

Go to the documentation of this file.
00001 // ObjView.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_OBJLISTVIEW_H__7C3F7403_C7B1_11D0_8FAD_00A0C9034892__INCLUDED_)
00013 #define AFX_OBJLISTVIEW_H__7C3F7403_C7B1_11D0_8FAD_00A0C9034892__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CObjListView view
00021 #define ITEM_HEIGHT 60
00022
00023 class CObjListView;
00024 struct CItemIcons
00025 {
00026   CItemIcons(){}
00027   ~CItemIcons(){}
00028   CString m_Name;
00029   HICON m_hIcon;
00030   COleClientItem *m_pObject;
00031 };
00032
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CCustomList window
00036
00037 class CCustomList : public CListBox
00038 {
00039 // Construction
00040 public:
00041   CCustomList();
00042   CCustomList(CObjListView *pParent):m_pParent(pParent){}
00043   void MeasureItem(LPMEASUREITEMSTRUCT lpm);
00044   void DrawItem(LPDRAWITEMSTRUCT ldis);
00045   CObjListView *m_pParent;
00046
00047 // Attributes
00048 public:
00049
00050 // Operations
00051 public:
00052
00053 // Overrides
00054   // ClassWizard generated virtual function overrides
00055   //{{AFX_VIRTUAL(CCustomList)
00056   //}}AFX_VIRTUAL
00057
00058 // Implementation
00059 public:
00060   virtual ~CCustomList();
00061
00062   // Generated message map functions
00063 protected:
00064   //{{AFX_MSG(CCustomList)
00065   afx_msg void OnSelchange();
00066   //}}AFX_MSG
00067
00068   DECLARE_MESSAGE_MAP()
00069 };
00070
00071
00072 class CObjListView : public CView
00073 {
00074 protected:
00075   CObjListView();           // protected constructor used by dynamic creation
00076   DECLARE_DYNCREATE(CObjListView)
00077   BOOL AddItem(COleClientItem* pObject, CString& name, HICON hIcon);
00078   BOOL RemoveItem(COleClientItem* pItem);
00079   void RemoveAllItems();
00080   CCustomList m_listbox;
00081
00082 // Attributes
00083 public:
00084
00085 // Operations
00086 public:
00087   CFont m_IconFont;
00088   BOOL m_bFont;
00089
00090 // Overrides
00091   // ClassWizard generated virtual function overrides
00092   //{{AFX_VIRTUAL(CObjListView)
00093   protected:
00094   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00095   //}}AFX_VIRTUAL
00096
00097 // Implementation
00098 protected:
00099   virtual ~CObjListView();
00100 #ifdef _DEBUG
00101   virtual void AssertValid() const;
00102   virtual void Dump(CDumpContext& dc) const;
00103 #endif
00104
00105   // Generated message map functions
00106 protected:
00107   //{{AFX_MSG(CObjListView)
00108   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00109   afx_msg void OnSize(UINT nType, int cx, int cy);
00110   afx_msg void OnDestroy();
00111   //}}AFX_MSG
00112   DECLARE_MESSAGE_MAP()
00113 };
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116
00117
00118 /////////////////////////////////////////////////////////////////////////////
00119 //{{AFX_INSERT_LOCATION}}
00120 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00121
00122 #endif // !defined(AFX_OBJLISTVIEW_H__7C3F7403_C7B1_11D0_8FAD_00A0C9034892__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CImpIAdviseSink Member List

This is the complete list of members for CImpIAdviseSink, including all inherited members.
CImpIAdviseSink(CIDataObjectDlg FAR *) | CImpIAdviseSink |
LONG | CImpIAdviseSink |
LPSTGMEDIUM | CImpIAdviseSink |
m_cRef | CImpIAdviseSink | [protected]
m_pIDOD | CImpIAdviseSink | [protected]
QueryInterface(REFIID, LPVOID FAR *) | CImpIAdviseSink |
STDMETHODIMP_(ULONG) AddRef(void) | CImpIAdviseSink |
STDMETHODIMP_(ULONG) Release(void) | CImpIAdviseSink |
STDMETHODIMP_(void) OnDataChange(LPFORMATETC | CImpIAdviseSink |
STDMETHODIMP_(void) OnViewChange(DWORD | CImpIAdviseSink |
STDMETHODIMP_(void) OnRename(LPMONIKER) | CImpIAdviseSink |
STDMETHODIMP_(void) OnSave(void) | CImpIAdviseSink |
STDMETHODIMP_(void) OnClose(void) | CImpIAdviseSink |
~CImpIAdviseSink(void) | CImpIAdviseSink |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpindialApp Member List

This is the complete list of members for CSpindialApp, including all inherited members.
ExitInstance() | CSpindialApp
InitInstance() | CSpindialApp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpiroRect Member List

This is the complete list of members for CSpiroRect, including all inherited members.
CSpiroRect(int l=0, int t=0, int r=0, int b=0) | CSpiroRect | [inline]
CSpiroRect(CRect rect) | CSpiroRect | [inline]
IntersectRect(CRect *prect) const | CSpiroRect | [inline]
LineInRect(CPoint pt1, CPoint pt2) const | CSpiroRect | [inline]
Scale(long nNumer, long nDenom) | CSpiroRect | [inline]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawtool.cpp Source File

  • vc2008fp
  • DrawClient

drawtool.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014 #include "drawdoc.h"
00015 #include "drawvw.h"
00016 #include "drawobj.h"
00017 #include "drawtool.h"
00018
00019 #include "mainfrm.h"
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CDrawTool implementation
00023
00024 CPtrList CDrawTool::c_tools;
00025
00026 static CSelectTool selectTool;
00027 static CRectTool lineTool(line);
00028 static CRectTool rectTool(rect);
00029 static CRectTool roundRectTool(roundRect);
00030 static CRectTool ellipseTool(ellipse);
00031 static CPolyTool polyTool;
00032
00033 CPoint CDrawTool::c_down;
00034 UINT CDrawTool::c_nDownFlags;
00035 CPoint CDrawTool::c_last;
00036 DrawShape CDrawTool::c_drawShape = selection;
00037
00038 CDrawTool::CDrawTool(DrawShape drawShape)
00039 {
00040   m_drawShape = drawShape;
00041   c_tools.AddTail(this);
00042 }
00043
00044 CDrawTool* CDrawTool::FindTool(DrawShape drawShape)
00045 {
00046   POSITION pos = c_tools.GetHeadPosition();
00047   while (pos != NULL)
00048   {
00049     CDrawTool* pTool = (CDrawTool*)c_tools.GetNext(pos);
00050     if (pTool->m_drawShape == drawShape)
00051       return pTool;
00052   }
00053
00054   return NULL;
00055 }
00056
00057 void CDrawTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00058 {
00059   // deactivate any in-place active item on this view!
00060   COleClientItem* pActiveItem = pView->GetDocument()->GetInPlaceActiveItem(pView);
00061   if (pActiveItem != NULL)
00062   {
00063     pActiveItem->Close();
00064     ASSERT(pView->GetDocument()->GetInPlaceActiveItem(pView) == NULL);
00065   }
00066
00067   pView->SetCapture();
00068   c_nDownFlags = nFlags;
00069   c_down = point;
00070   c_last = point;
00071 }
00072
00073 void CDrawTool::OnLButtonDblClk(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& /*point*/)
00074 {
00075 }
00076
00077 void CDrawTool::OnLButtonUp(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& point)
00078 {
00079   ReleaseCapture();
00080
00081   if (point == c_down)
00082     c_drawShape = selection;
00083 }
00084
00085 void CDrawTool::OnMouseMove(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& point)
00086 {
00087   c_last = point;
00088   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
00089 }
00090
00091 void CDrawTool::OnEditProperties(CDrawView* /*pView*/)
00092 {
00093 }
00094
00095 void CDrawTool::OnCancel()
00096 {
00097   c_drawShape = selection;
00098 }
00099
00100 ////////////////////////////////////////////////////////////////////////////
00101 // CResizeTool
00102
00103 enum SelectMode
00104 {
00105   none, netSelect, move, size
00106 };
00107
00108 SelectMode selectMode = none;
00109 int nDragHandle;
00110
00111 CPoint lastPoint;
00112
00113 CSelectTool::CSelectTool()
00114 : CDrawTool(selection)
00115 {
00116 }
00117
00118 void CSelectTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00119 {
00120   CPoint local = point;
00121   pView->ClientToDoc(local);
00122
00123   CDrawObj* pObj;
00124   selectMode = none;
00125
00126   // Check for resizing(only allowed on single selections)
00127   if (pView->m_selection.GetCount() == 1)
00128   {
00129     pObj = pView->m_selection.GetHead();
00130     nDragHandle = pObj->HitTest(local, pView, TRUE);
00131     if (nDragHandle != 0)
00132       selectMode = size;
00133   }
00134
00135   // See if the click was on an object, select and start move if so
00136   if (selectMode == none)
00137   {
00138     pObj = pView->GetDocument()->ObjectAt(local);
00139
00140     if (pObj != NULL)
00141     {
00142       selectMode = move;
00143
00144       if (!pView->IsSelected(pObj))
00145         pView->Select(pObj, (nFlags & MK_SHIFT) != 0);
00146
00147       // Ctrl+Click clones the selection...
00148       if ((nFlags & MK_CONTROL) != 0)
00149         pView->CloneSelection();
00150     }
00151   }
00152
00153   // Click on background, start a net-selection
00154   if (selectMode == none)
00155   {
00156     if ((nFlags & MK_SHIFT) == 0)
00157       pView->Select(NULL);
00158
00159     selectMode = netSelect;
00160
00161     CClientDC dc(pView);
00162     CRect rect(point.x, point.y, point.x, point.y);
00163     rect.NormalizeRect();
00164     dc.DrawFocusRect(rect);
00165   }
00166
00167   ((CMainFrame*)AfxGetMainWnd())->UpdateUI(pView);
00168
00169   lastPoint = local;
00170   CDrawTool::OnLButtonDown(pView, nFlags, point);
00171 }
00172
00173 void CSelectTool::OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point)
00174 {
00175   if ((nFlags & MK_SHIFT) != 0)
00176   {
00177     // Shift+DblClk deselects object...
00178     CPoint local = point;
00179     pView->ClientToDoc(local);
00180     CDrawObj* pObj = pView->GetDocument()->ObjectAt(local);
00181     if (pObj != NULL)
00182       pView->Deselect(pObj);
00183   }
00184   else
00185   {
00186     // "Normal" DblClk opens properties, or OLE server...
00187     if (pView->m_selection.GetCount() == 1)
00188       pView->m_selection.GetHead()->OnOpen(pView);
00189   }
00190
00191   CDrawTool::OnLButtonDblClk(pView, nFlags, point);
00192 }
00193
00194 void CSelectTool::OnEditProperties(CDrawView* pView)
00195 {
00196   if (pView->m_selection.GetCount() == 1)
00197     pView->m_selection.GetHead()->OnEditProperties();
00198 }
00199
00200 void CSelectTool::OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point)
00201 {
00202   if (pView->GetCapture() == pView)
00203   {
00204     if (selectMode == netSelect)
00205     {
00206       CClientDC dc(pView);
00207       CRect rect(c_down.x, c_down.y, c_last.x, c_last.y);
00208       rect.NormalizeRect();
00209       dc.DrawFocusRect(rect);
00210
00211       pView->SelectWithinRect(rect, TRUE);
00212     }
00213     else if (selectMode != none)
00214     {
00215       pView->GetDocument()->UpdateAllViews(pView);
00216     }
00217   }
00218
00219   CDrawTool::OnLButtonUp(pView, nFlags, point);
00220 }
00221
00222 void CSelectTool::OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point)
00223 {
00224   if (pView->GetCapture() != pView)
00225   {
00226     if (c_drawShape == selection && pView->m_selection.GetCount() == 1)
00227     {
00228       CDrawObj* pObj = pView->m_selection.GetHead();
00229       CPoint local = point;
00230       pView->ClientToDoc(local);
00231       int nHandle = pObj->HitTest(local, pView, TRUE);
00232       if (nHandle != 0)
00233       {
00234         SetCursor(pObj->GetHandleCursor(nHandle));
00235         return; // bypass CDrawTool
00236       }
00237     }
00238     if (c_drawShape == selection)
00239       CDrawTool::OnMouseMove(pView, nFlags, point);
00240     return;
00241   }
00242
00243   if (selectMode == netSelect)
00244   {
00245     CClientDC dc(pView);
00246     CRect rect(c_down.x, c_down.y, c_last.x, c_last.y);
00247     rect.NormalizeRect();
00248     dc.DrawFocusRect(rect);
00249     rect.SetRect(c_down.x, c_down.y, point.x, point.y);
00250     rect.NormalizeRect();
00251     dc.DrawFocusRect(rect);
00252
00253     CDrawTool::OnMouseMove(pView, nFlags, point);
00254     return;
00255   }
00256
00257   CPoint local = point;
00258   pView->ClientToDoc(local);
00259   CPoint delta = (CPoint)(local - lastPoint);
00260
00261   POSITION pos = pView->m_selection.GetHeadPosition();
00262   while (pos != NULL)
00263   {
00264     CDrawObj* pObj = pView->m_selection.GetNext(pos);
00265     CRect position = pObj->m_position;
00266
00267     if (selectMode == move)
00268     {
00269       position += delta;
00270       pObj->MoveTo(position, pView);
00271     }
00272     else if (nDragHandle != 0)
00273     {
00274       pObj->MoveHandleTo(nDragHandle, local, pView);
00275     }
00276   }
00277
00278   lastPoint = local;
00279
00280   if (selectMode == size && c_drawShape == selection)
00281   {
00282     c_last = point;
00283     SetCursor(pView->m_selection.GetHead()->GetHandleCursor(nDragHandle));
00284     return; // bypass CDrawTool
00285   }
00286
00287   c_last = point;
00288
00289   if (c_drawShape == selection)
00290     CDrawTool::OnMouseMove(pView, nFlags, point);
00291 }
00292
00293 ////////////////////////////////////////////////////////////////////////////
00294 // CRectTool(does rectangles, round-rectangles, and ellipses)
00295
00296 CRectTool::CRectTool(DrawShape drawShape)
00297 : CDrawTool(drawShape)
00298 {
00299 }
00300
00301 void CRectTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00302 {
00303   CDrawTool::OnLButtonDown(pView, nFlags, point);
00304
00305   CPoint local = point;
00306   pView->ClientToDoc(local);
00307
00308   CDrawRect* pObj = new CDrawRect(CRect(local, CSize(0, 0)));
00309   switch (m_drawShape)
00310   {
00311   default:
00312     ASSERT(FALSE); // unsuported shape!
00313
00314   case rect:
00315     pObj->m_nShape = CDrawRect::rectangle;
00316     break;
00317
00318   case roundRect:
00319     pObj->m_nShape = CDrawRect::roundRectangle;
00320     break;
00321
00322   case ellipse:
00323     pObj->m_nShape = CDrawRect::ellipse;
00324     break;
00325
00326   case line:
00327     pObj->m_nShape = CDrawRect::line;
00328     break;
00329   }
00330   pView->GetDocument()->Add(pObj);
00331   pView->Select(pObj);
00332
00333   selectMode = size;
00334   nDragHandle = 1;
00335   lastPoint = local;
00336
00337   ((CMainFrame*)AfxGetMainWnd())->ActivateRibbonContextCategory(ID_FORMAT_CONTEXT_TAB);
00338 }
00339
00340 void CRectTool::OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point)
00341 {
00342   CDrawTool::OnLButtonDblClk(pView, nFlags, point);
00343 }
00344
00345 void CRectTool::OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point)
00346 {
00347   if (point == c_down)
00348   {
00349     // Don't create empty objects...
00350     CDrawObj *pObj = pView->m_selection.GetTail();
00351     pView->GetDocument()->Remove(pObj);
00352     pObj->Remove();
00353     selectTool.OnLButtonDown(pView, nFlags, point); // try a select!
00354   }
00355
00356   selectTool.OnLButtonUp(pView, nFlags, point);
00357 }
00358
00359 void CRectTool::OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point)
00360 {
00361   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));
00362   selectTool.OnMouseMove(pView, nFlags, point);
00363 }
00364
00365 ////////////////////////////////////////////////////////////////////////////
00366 // CPolyTool
00367
00368 CPolyTool::CPolyTool()
00369 : CDrawTool(poly)
00370 {
00371   m_pDrawObj = NULL;
00372 }
00373
00374 void CPolyTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
00375 {
00376   CDrawTool::OnLButtonDown(pView, nFlags, point);
00377
00378   CPoint local = point;
00379   pView->ClientToDoc(local);
00380
00381   if (m_pDrawObj == NULL)
00382   {
00383     pView->SetCapture();
00384
00385     m_pDrawObj = new CDrawPoly(CRect(local, CSize(0, 0)));
00386     pView->GetDocument()->Add(m_pDrawObj);
00387     pView->Select(m_pDrawObj);
00388     m_pDrawObj->AddPoint(local, pView);
00389   }
00390   else if (local == m_pDrawObj->m_points[0])
00391   {
00392     // Stop when the first point is repeated...
00393     ReleaseCapture();
00394     m_pDrawObj->m_nPoints -= 1;
00395     if (m_pDrawObj->m_nPoints < 2)
00396     {
00397       m_pDrawObj->Remove();
00398     }
00399     else
00400     {
00401       pView->InvalObj(m_pDrawObj);
00402     }
00403     m_pDrawObj = NULL;
00404     c_drawShape = selection;
00405     return;
00406   }
00407
00408   local.x += 1; // adjacent points can't be the same!
00409   m_pDrawObj->AddPoint(local, pView);
00410
00411   selectMode = size;
00412   nDragHandle = m_pDrawObj->GetHandleCount();
00413   lastPoint = local;
00414 }
00415
00416 void CPolyTool::OnLButtonUp(CDrawView* /*pView*/, UINT /*nFlags*/, const CPoint& /*point*/)
00417 {
00418   // Don't release capture yet!
00419 }
00420
00421 void CPolyTool::OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point)
00422 {
00423   if (m_pDrawObj != NULL &&(nFlags & MK_LBUTTON) != 0)
00424   {
00425     CPoint local = point;
00426     pView->ClientToDoc(local);
00427     m_pDrawObj->AddPoint(local);
00428     nDragHandle = m_pDrawObj->GetHandleCount();
00429     lastPoint = local;
00430     c_last = point;
00431     SetCursor(AfxGetApp()->LoadCursor(IDC_PENCIL));
00432   }
00433   else
00434   {
00435     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));
00436     selectTool.OnMouseMove(pView, nFlags, point);
00437   }
00438 }
00439
00440 void CPolyTool::OnLButtonDblClk(CDrawView* pView, UINT , const CPoint& )
00441 {
00442   ReleaseCapture();
00443
00444   int nPoints = m_pDrawObj->m_nPoints;
00445   if (nPoints > 2 && (m_pDrawObj->m_points[nPoints - 1] == m_pDrawObj->m_points[nPoints - 2] ||
00446     m_pDrawObj->m_points[nPoints - 1].x - 1 == m_pDrawObj->m_points[nPoints - 2].x && m_pDrawObj->m_points[nPoints - 1].y == m_pDrawObj->m_points[nPoints - 2].y))
00447   {
00448     // Remove the last point if it's the same as the next to last...
00449     m_pDrawObj->m_nPoints -= 1;
00450     pView->InvalObj(m_pDrawObj);
00451   }
00452
00453   m_pDrawObj = NULL;
00454   c_drawShape = selection;
00455 }
00456
00457 void CPolyTool::OnCancel()
00458 {
00459   CDrawTool::OnCancel();
00460
00461   m_pDrawObj = NULL;
00462 }
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/stdafx.h Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025
00026
00027
00028
00029 #ifndef _AFX_NO_OLE_SUPPORT
00030 #include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
00031 #endif
00032 #ifndef _AFX_NO_AFXCMN_SUPPORT
00033 #include <afxcmn.h>                     // MFC support for Windows Common Controls
00034 #endif // _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxdlgs.h>
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #ifdef _UNICODE
00046 #if defined _M_IX86
00047 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00048 #elif defined _M_X64
00049 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00050 #else
00051 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00052 #endif
00053 #endif
00054
00055
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npview.h Source File

  • general
  • npp

npview.h

Go to the documentation of this file.
00001 // npview.h : interface of the CNotepadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 class CFindDlg;     // forward declarations
00014 class CGotoDlg;
00015
00016 #include "history.h"
00017
00018 class CNotepadView : public CEditView
00019 {
00020 protected: // create from serialization only
00021   CNotepadView();
00022   DECLARE_DYNCREATE(CNotepadView)
00023
00024 // Attributes
00025 public:
00026   CNotepadDoc* GetDocument();
00027
00028 // Operations
00029 public:
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CNotepadView)
00034   public:
00035   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00036   virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00037   protected:
00038   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00039   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00040   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00041   //}}AFX_VIRTUAL
00042
00043 public:
00044 // Attributes
00045   CFindDlg*    m_pFindDialog;             // find dialog
00046   CGotoDlg*    m_pGotoDialog;             // goto line number dialog
00047   CHistoryList m_searchHistory;           // last used search history list
00048
00049 public:
00050 // Operations
00051   void OnViewFindNext(CString &s1);
00052
00053 // Implementation
00054 public:
00055   virtual ~CNotepadView();
00056 #ifdef _DEBUG
00057   virtual void AssertValid() const;
00058   virtual void Dump(CDumpContext& dc) const;
00059 #endif
00060
00061 protected:
00062
00063 // Generated message map functions
00064 protected:
00065   //{{AFX_MSG(CNotepadView)
00066   afx_msg void OnEditGoto();
00067   afx_msg void OnUpdateEditGoto(CCmdUI* pCmdUI);
00068   afx_msg void OnEditFind();
00069   afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI);
00070   afx_msg void OnViewFindNext();
00071   afx_msg void OnEditPaste();
00072   afx_msg void OnEditCopy();
00073   //}}AFX_MSG
00074
00075   DECLARE_MESSAGE_MAP()
00076 };
00077
00078 #ifndef _DEBUG  // debug version in npview.cpp
00079 inline CNotepadDoc* CNotepadView::GetDocument()
00080    { return (CNotepadDoc*)m_pDocument; }
00081 #endif
00082
00083 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawItem Member List

This is the complete list of members for CDrawItem, including all inherited members.
CDrawItem(CDrawDoc *pContainer=NULL, CDrawOleObj *pDrawObj=NULL) | CDrawItem |
CDrawItem(CDrawDoc *pContainer=NULL, CDrawOleObj *pDrawObj=NULL) | CDrawItem |
GetActiveView() | CDrawItem | [inline]
GetActiveView() | CDrawItem | [inline]
GetDocument() | CDrawItem | [inline]
GetDocument() | CDrawItem | [inline]
m_pDrawObj | CDrawItem |
OnActivate() | CDrawItem | [protected, virtual]
OnActivate() | CDrawItem | [protected, virtual]
OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam) | CDrawItem | [protected, virtual]
OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam) | CDrawItem | [protected, virtual]
OnChangeItemPosition(const CRect &rectPos) | CDrawItem | [protected, virtual]
OnChangeItemPosition(const CRect &rectPos) | CDrawItem | [protected, virtual]
OnDeactivateUI(BOOL bUndoable) | CDrawItem | [protected, virtual]
OnDeactivateUI(BOOL bUndoable) | CDrawItem | [protected, virtual]
OnGetItemPosition(CRect &rPosition) | CDrawItem | [virtual]
OnGetItemPosition(CRect &rPosition) | CDrawItem | [virtual]
OnShowControlBars(CFrameWnd *pFrameWnd, BOOL bShow) | CDrawItem | [protected, virtual]
Serialize(CArchive &ar) | CDrawItem | [virtual]
Serialize(CArchive &ar) | CDrawItem | [virtual]
UpdateExtent() | CDrawItem |
UpdateExtent() | CDrawItem |
~CDrawItem() | CDrawItem |
~CDrawItem() | CDrawItem |
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ipframe.cpp Source File

  • ole
  • wordpad

ipframe.cpp

Go to the documentation of this file.
00001 // ipframe.cpp : implementation of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "formatba.h"
00015 #include "ruler.h"
00016 #include "ipframe.h"
00017 #include "wordpdoc.h"
00018 #include "wordpvw.h"
00019 #include "colorlis.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CInPlaceFrame
00028
00029 IMPLEMENT_DYNCREATE(CInPlaceFrame, COleIPFrameWnd)
00030
00031 BEGIN_MESSAGE_MAP(CInPlaceFrame, COleIPFrameWnd)
00032   //{{AFX_MSG_MAP(CInPlaceFrame)
00033   ON_WM_CREATE()
00034   ON_WM_DESTROY()
00035   ON_COMMAND(ID_HELP, OnHelpFinder)
00036   ON_COMMAND(ID_CHAR_COLOR, OnCharColor)
00037   ON_COMMAND(ID_HELP_INDEX, OnHelpFinder)
00038   ON_COMMAND(ID_PEN_TOGGLE, OnPenToggle)
00039   //}}AFX_MSG_MAP
00040   ON_UPDATE_COMMAND_UI(ID_VIEW_TOOLBAR, OnUpdateControlBarMenu)
00041   ON_COMMAND_EX(ID_VIEW_TOOLBAR, OnBarCheck)
00042   ON_UPDATE_COMMAND_UI(ID_VIEW_FORMATBAR, OnUpdateControlBarMenu)
00043   ON_COMMAND_EX(ID_VIEW_FORMATBAR, OnBarCheck)
00044   ON_UPDATE_COMMAND_UI(ID_VIEW_RULER, OnUpdateControlBarMenu)
00045   ON_COMMAND_EX(ID_VIEW_RULER, OnBarCheck)
00046   ON_MESSAGE(WM_SIZECHILD, OnResizeChild)
00047   ON_MESSAGE(WPM_BARSTATE, OnBarState)
00048   ON_COMMAND(ID_DEFAULT_HELP, OnHelpFinder)
00049 //  ON_COMMAND(ID_CONTEXT_HELP, COleIPFrameWnd::OnContextHelp)
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // arrays of IDs used to initialize control bars
00054
00055 static UINT BASED_CODE toolButtons[] =
00056 {
00057   // same order as in the bitmap 'itoolbar.bmp'
00058   ID_EDIT_CUT,
00059   ID_EDIT_COPY,
00060   ID_EDIT_PASTE,
00061
00062     ID_SEPARATOR,
00063   ID_PEN_TOGGLE,
00064   ID_PEN_PERIOD,
00065   ID_PEN_SPACE,
00066   ID_PEN_BACKSPACE,
00067   ID_PEN_NEWLINE,
00068   ID_PEN_LENS
00069 };
00070
00071 #define NUM_PEN_ITEMS 7
00072 #define NUM_PEN_TOGGLE 5
00073
00074 static UINT BASED_CODE format[] =
00075 {
00076   // same order as in the bitmap 'format.bmp'
00077     ID_SEPARATOR, // font name combo box
00078     ID_SEPARATOR,
00079     ID_SEPARATOR, // font size combo box
00080     ID_SEPARATOR,
00081   ID_CHAR_BOLD,
00082   ID_CHAR_ITALIC,
00083   ID_CHAR_UNDERLINE,
00084   ID_CHAR_COLOR,
00085     ID_SEPARATOR,
00086   ID_PARA_LEFT,
00087   ID_PARA_CENTER,
00088   ID_PARA_RIGHT,
00089     ID_SEPARATOR,
00090   ID_INSERT_BULLET,
00091 };
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CInPlaceFrame construction/destruction
00095
00096 CInPlaceFrame::CInPlaceFrame() : m_wndRulerBar(FALSE)
00097 {
00098 }
00099
00100 int CInPlaceFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00101 {
00102   if (COleIPFrameWnd::OnCreate(lpCreateStruct) == -1)
00103     return -1;
00104
00105   // CResizeBar implements in-place resizing.
00106   if (!m_wndResizeBar.Create(this))
00107   {
00108     TRACE0("Failed to create resize bar\n");
00109     return -1;      // fail to create
00110   }
00111
00112   if (!CreateRulerBar(this))
00113     return FALSE;
00114
00115   // By default, it is a good idea to register a drop-target that does
00116   //  nothing with your frame window.  This prevents drops from
00117   //  "falling through" to a container that supports drag-drop.
00118   m_dropTarget.Register(this);
00119
00120   return 0;
00121 }
00122
00123 // OnCreateControlBars is called by the framework to create control bars on the
00124 //  container application's windows.  pWndFrame is the top level frame window of
00125 //  the container and is always non-NULL.  pWndDoc is the doc level frame window
00126 //  and will be NULL when the container is an SDI application.  A server
00127 //  application can place MFC control bars on either window.
00128 BOOL CInPlaceFrame::OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* /*pWndDoc*/)
00129 {
00130   if (!CreateToolBar(pWndFrame))
00131     return FALSE;
00132
00133   if (!CreateFormatBar(pWndFrame))
00134     return FALSE;
00135
00136   // set owner to this window, so messages are delivered to correct app
00137   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00138   m_wndFormatBar.EnableDocking(CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM);
00139   pWndFrame->EnableDocking(CBRS_ALIGN_ANY);
00140   pWndFrame->DockControlBar(&m_wndToolBar);
00141   pWndFrame->DockControlBar(&m_wndFormatBar);
00142
00143   m_wndToolBar.SetOwner(this);
00144   m_wndFormatBar.SetOwner(this);
00145   m_wndRulerBar.SetOwner(this);
00146   OnBarState(1, RD_EMBEDDED); //load bar state
00147   return TRUE;
00148 }
00149
00150 BOOL CInPlaceFrame::CreateToolBar(CWnd* pWndFrame)
00151 {
00152   // Create toolbar on client's frame window
00153   ASSERT(m_wndToolBar.m_hWnd == NULL);
00154   int nPen = GetSystemMetrics(SM_PENWINDOWS) ? NUM_PEN_TOGGLE :
00155     NUM_PEN_ITEMS;
00156   UINT nID = theApp.m_bLargeIcons ?
00157     IDR_SRVR_INPLACE_BIG : IDR_SRVR_INPLACE;
00158   if (!m_wndToolBar.Create(pWndFrame, WS_CHILD|WS_VISIBLE|CBRS_TOP|
00159       CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC)||
00160     !m_wndToolBar.LoadBitmap(nID) ||
00161     !m_wndToolBar.SetButtons(toolButtons,
00162       sizeof(toolButtons)/sizeof(UINT) - nPen))
00163   {
00164     TRACE0("Failed to create toolbar\n");
00165     return FALSE;      // fail to create
00166   }
00167   if (theApp.m_bLargeIcons)
00168     m_wndToolBar.SetSizes(CSize(31,30), CSize(24,24));
00169   else
00170     m_wndToolBar.SetSizes(CSize(23,22), CSize(16,16));
00171   CString str;
00172   str.LoadString(IDS_TITLE_TOOLBAR);
00173   m_wndToolBar.SetWindowText(str);
00174   return TRUE;
00175 }
00176
00177 BOOL CInPlaceFrame::CreateFormatBar(CWnd* pWndFrame)
00178 {
00179   ASSERT(m_wndFormatBar.m_hWnd == NULL);
00180   m_wndFormatBar.m_hWndOwner = m_hWnd;
00181   UINT nID = theApp.m_bLargeIcons ? IDB_FORMATBAR_BIG : IDB_FORMATBAR;
00182   if (!m_wndFormatBar.Create(pWndFrame, WS_CHILD|WS_VISIBLE|CBRS_TOP|
00183     CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC, ID_VIEW_FORMATBAR) ||
00184     !m_wndFormatBar.LoadBitmap(nID) ||
00185     !m_wndFormatBar.SetButtons(format,
00186       sizeof(format)/sizeof(UINT)))
00187   {
00188     TRACE0("Failed to create FormatBar\n");
00189     return FALSE;      // fail to create
00190   }
00191
00192   if (theApp.m_bLargeIcons)
00193     m_wndFormatBar.SetSizes(CSize(31,30), CSize(24,24));
00194   else
00195     m_wndFormatBar.SetSizes(CSize(23,22), CSize(16,16));
00196   CString str;
00197   str.LoadString(IDS_TITLE_FORMATBAR);
00198   m_wndFormatBar.SetWindowText(str);
00199   m_wndFormatBar.PositionCombos();
00200   return TRUE;
00201 }
00202
00203 BOOL CInPlaceFrame::CreateRulerBar(CWnd* pWndFrame)
00204 {
00205   if (!m_wndRulerBar.Create(pWndFrame,
00206     WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP|CBRS_HIDE_INPLACE, ID_VIEW_RULER))
00207   {
00208     TRACE0("Failed to create ruler\n");
00209     return FALSE;      // fail to create
00210   }
00211   return TRUE;
00212 }
00213
00214 /////////////////////////////////////////////////////////////////////////////
00215 // CInPlaceFrame Operations
00216
00217 /////////////////////////////////////////////////////////////////////////////
00218 // CInPlaceFrame diagnostics
00219
00220 #ifdef _DEBUG
00221 void CInPlaceFrame::AssertValid() const
00222 {
00223   COleIPFrameWnd::AssertValid();
00224 }
00225
00226 void CInPlaceFrame::Dump(CDumpContext& dc) const
00227 {
00228   COleIPFrameWnd::Dump(dc);
00229 }
00230 #endif //_DEBUG
00231
00232 /////////////////////////////////////////////////////////////////////////////
00233 // CInPlaceFrame commands
00234
00235 void CInPlaceFrame::OnDestroy()
00236 {
00237   m_wndToolBar.DestroyWindow();
00238   m_wndFormatBar.DestroyWindow();
00239   COleIPFrameWnd::OnDestroy();
00240 }
00241
00242 void CInPlaceFrame::RepositionFrame(LPCRECT lpPosRect, LPCRECT lpClipRect)
00243 {
00244   CRect rectNew = lpPosRect;
00245   rectNew.left -= HORZ_TEXTOFFSET;
00246   rectNew.top -= VERT_TEXTOFFSET;
00247   m_wndResizeBar.BringWindowToTop();
00248   COleIPFrameWnd::RepositionFrame(&rectNew, lpClipRect);
00249   CWnd* pWnd = GetActiveView();
00250   if (pWnd != NULL)
00251     pWnd->BringWindowToTop();
00252   m_wndRulerBar.BringWindowToTop();
00253 }
00254
00255 void CInPlaceFrame::RecalcLayout(BOOL bNotify)
00256 {
00257   if (m_wndResizeBar.m_hWnd != NULL)
00258     m_wndResizeBar.BringWindowToTop();
00259   COleIPFrameWnd::RecalcLayout(bNotify);
00260   CWnd* pWnd = GetActiveView();
00261   if (pWnd != NULL)
00262     pWnd->BringWindowToTop();
00263   if (m_wndRulerBar.m_hWnd != NULL)
00264     m_wndRulerBar.BringWindowToTop();
00265
00266   // at least 12 pt region plus ruler if it exists
00267   CDisplayIC dc;
00268   CSize size;
00269   size.cy = MulDiv(12, dc.GetDeviceCaps(LOGPIXELSY), 72)+1;
00270   size.cx = dc.GetDeviceCaps(LOGPIXELSX)/4; // 1/4"
00271   size.cx += HORZ_TEXTOFFSET; //adjust for offset
00272   size.cy += VERT_TEXTOFFSET;
00273   if (m_wndRulerBar.m_hWnd != NULL && m_wndRulerBar.IsVisible())
00274   {
00275     CRect rect;
00276     m_wndRulerBar.GetWindowRect(&rect);
00277     size.cy += rect.Height();
00278   }
00279   m_wndResizeBar.SetMinSize(size);
00280 }
00281
00282 void CInPlaceFrame::CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType)
00283 {
00284   COleIPFrameWnd::CalcWindowRect(lpClientRect, nAdjustType);
00285 }
00286
00287 LRESULT CInPlaceFrame::OnResizeChild(WPARAM /*wParam*/, LPARAM lParam)
00288 {
00289   // notify the container that the rectangle has changed!
00290   CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
00291   if (pDoc == NULL)
00292     return 0;
00293
00294   ASSERT(pDoc->IsKindOf(RUNTIME_CLASS(CWordPadDoc)));
00295
00296   // get new rect and parent
00297   CRect rectNew;
00298   rectNew.CopyRect((LPCRECT)lParam);
00299   CWnd* pParentWnd = GetParent();
00300   ASSERT_VALID(pParentWnd);
00301
00302   // convert rectNew relative to pParentWnd
00303   ClientToScreen(&rectNew);
00304   pParentWnd->ScreenToClient(&rectNew);
00305
00306   if (m_wndRulerBar.GetStyle()&WS_VISIBLE)
00307   {
00308     CRect rect;
00309     m_wndRulerBar.GetWindowRect(&rect);
00310     rectNew.top += rect.Height();
00311   }
00312   rectNew.left += HORZ_TEXTOFFSET;
00313   rectNew.top += VERT_TEXTOFFSET;
00314
00315   // adjust the new rectangle for the current control bars
00316   CWnd* pLeftOver = GetDlgItem(AFX_IDW_PANE_FIRST);
00317   ENSURE(pLeftOver != NULL);
00318   CRect rectCur = m_rectPos;
00319   pLeftOver->CalcWindowRect(&rectCur, CWnd::adjustOutside);
00320   rectNew.left += m_rectPos.left - rectCur.left;
00321   rectNew.top += m_rectPos.top - rectCur.top;
00322   rectNew.right -= rectCur.right - m_rectPos.right;
00323   rectNew.bottom -= rectCur.bottom - m_rectPos.bottom;
00324   OnRequestPositionChange(rectNew);
00325
00326   return 0;
00327 }
00328
00329 LONG_PTR CInPlaceFrame::OnBarState(UINT_PTR wParam, LONG_PTR lParam)
00330 {
00331   if (lParam == -1)
00332     return 0L;
00333   if (wParam == 0)
00334   {
00335     GetDockState(theApp.GetDockState(RD_EMBEDDED));
00336     ENSURE(m_pMainFrame != NULL);
00337     m_pMainFrame->GetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
00338   }
00339   else
00340   {
00341     SetDockState(theApp.GetDockState(RD_EMBEDDED));
00342     m_pMainFrame->SetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
00343   }
00344   return 0L;
00345 }
00346
00347 void CInPlaceFrame::OnHelpFinder()
00348 {
00349   theApp.WinHelp(0, HELP_FINDER);
00350 }
00351
00352 void CInPlaceFrame::OnCharColor()
00353 {
00354   CColorMenu colorMenu;
00355   CRect rc;
00356   int index = m_wndFormatBar.CommandToIndex(ID_CHAR_COLOR);
00357   m_wndFormatBar.GetItemRect(index, &rc);
00358   m_wndFormatBar.ClientToScreen(rc);
00359   colorMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,rc.left,rc.bottom, this);
00360 }
00361
00362 void CInPlaceFrame::OnPenToggle()
00363 {
00364   static int nPen = 0;
00365   m_wndToolBar.SetButtons(toolButtons, sizeof(toolButtons)/sizeof(UINT) - nPen);
00366   nPen = (nPen == 0) ? NUM_PEN_TOGGLE : 0;
00367   m_wndToolBar.Invalidate();
00368   m_wndToolBar.GetParentFrame()->RecalcLayout();
00369 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/stdafx.h Source File

  • vc2008fp
  • RollupPane

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPagerCtrlPage Member List

This is the complete list of members for CPagerCtrlPage, including all inherited members.
CPagerCtrlPage() | CPagerCtrlPage |
DoDataExchange(CDataExchange *pDX) | CPagerCtrlPage | [protected, virtual]
IDD enum value | CPagerCtrlPage |
m_comboColor | CPagerCtrlPage | [private]
m_nSize | CPagerCtrlPage | [private]
m_pagerctrl | CPagerCtrlPage | [private]
m_sliderBorderSize | CPagerCtrlPage | [private]
m_staticBorderSize | CPagerCtrlPage | [private]
m_toolbar | CPagerCtrlPage | [private]
OnBnClickedSetButtonSize() | CPagerCtrlPage |
OnCalcSize(NMHDR *pNotifyStruct, LRESULT *result) | CPagerCtrlPage |
OnCbnSelchangeBackColor() | CPagerCtrlPage |
OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) | CPagerCtrlPage |
OnInitDialog() | CPagerCtrlPage | [virtual]
~CPagerCtrlPage() | CPagerCtrlPage | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/stdafx.h Source File

  • general
  • MMXSwarm

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013 //
00014 #pragma once
00015
00016 #ifndef VC_EXTRALEAN
00017 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00018 #endif
00019
00020 #include <afxwin.h>         // MFC core and standard components
00021 #include <afxext.h>         // MFC extensions
00022 #include <atlcoll.h>    // ATL/MFC shared collection classes
00023 #include <comdef.h>     // for _com_error
00024
00025 #include <emmintrin.h>    // MMX, SSE, SSE2 intrinsic support
00026
00027 inline void SeedRandom(int nSeed = 0)
00028 { srand(nSeed ? nSeed : ::GetTickCount()); }
00029 inline int Random() { return(rand()); }
00030 inline int Random(int n) { return(rand() % n ); }
00031
00032 bool IsMMX();
00033 bool IsSSE2();
00034
00035 // Note: This file/project expects to run in an environment
00036 // where no float operations are being done. Therefore, we
00037 // don't require resetting the registers states with an EMMS.
00038 // So we disable the warning that tells us we haven't used
00039 // an EMMS instruction
00040 #pragma warning(disable: 4799)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/rectdlg.h Source File

  • vc2008fp
  • DrawClient

rectdlg.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CRectDlg dialog
00014
00015 class CRectDlg : public CPropertyPage
00016 {
00017 // Construction
00018 public:
00019   CRectDlg(CWnd* pParent = NULL); // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CRectDlg)
00023   enum { IDD = IDD_PROP_RECT };
00024   CSpinButtonCtrl m_SpinCtrl;
00025   BOOL    m_bNoFill;
00026   UINT    m_penSize;
00027   //}}AFX_DATA
00028
00029 // Implementation
00030 protected:
00031   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00032
00033   //{{AFX_MSG(CRectDlg)
00034   virtual BOOL OnInitDialog();
00035   //}}AFX_MSG
00036
00037   DECLARE_MESSAGE_MAP()
00038 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPalPropPage Member List

This is the complete list of members for CPalPropPage, including all inherited members.
CPalPropPage() | CPalPropPage |
DoDataExchange(CDataExchange *pDX) | CPalPropPage | [protected, virtual]
IDD enum value | CPalPropPage |
m_Length | CPalPropPage |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/splash.h Source File

  • ole
  • wordpad

splash.h

Go to the documentation of this file.
00001 // splash.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CBigIcon window
00014
00015 class CBigIcon : public CButton
00016 {
00017 // Attributes
00018 public:
00019   CBitmap m_bitmap;
00020   CSize m_sizeBitmap;
00021
00022 // Operations
00023 public:
00024   void SizeToContent();
00025
00026 // Implementation
00027 protected:
00028   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00029
00030   //{{AFX_MSG(CBigIcon)
00031   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00032   //}}AFX_MSG
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CSplash dialog
00038
00039 #pragma warning(push)
00040 // Disable warning on Create.
00041 #pragma warning(disable : 4264)
00042 #pragma warning(disable : 4263)
00043 class CSplashWnd : public CDialog
00044 {
00045 private:
00046   using CDialog::Create;
00047
00048 // Construction
00049 public:
00050   BOOL Create(CWnd* pParent = NULL);
00051
00052 // Dialog Data
00053   //{{AFX_DATA(CSplashWnd)
00054   enum { IDD = IDD_SPLASH };
00055     // NOTE: the ClassWizard will add data members here
00056   //}}AFX_DATA
00057
00058 // Implementation
00059 protected:
00060   CBigIcon m_icon; // self-draw button
00061
00062   // Generated message map functions
00063   //{{AFX_MSG(CSplashWnd)
00064   virtual BOOL OnInitDialog();
00065   //}}AFX_MSG
00066 };
00067 #pragma warning(pop)
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/stdafx.cpp Source File

  • ole
  • superpad

stdafx.cpp

Go to the documentation of this file.
00001
00002 // stdafx.cpp : pre-compiled header and types file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMMenuBar.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMMenuBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MSMMenuBar.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMMenuBar.h"
00015
00016 #include "MSMVisualManager.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMSMMenuBar
00026
00027 IMPLEMENT_DYNCREATE(CMSMMenuBar, CMFCMenuBar)
00028
00029 CMSMMenuBar::CMSMMenuBar ()
00030 {
00031 }
00032
00033 CMSMMenuBar::~CMSMMenuBar ()
00034 {
00035 }
00036
00037 BEGIN_MESSAGE_MAP(CMSMMenuBar, CMFCMenuBar)
00038   ON_WM_CREATE()
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CMSMMenuBar message handlers
00043
00044 int CMSMMenuBar::OnCreate (LPCREATESTRUCT lpCreateStruct)
00045 {
00046   if (CMFCMenuBar::OnCreate (lpCreateStruct) == -1)
00047     return -1;
00048
00049   SetPaneStyle((GetPaneStyle () &
00050     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT))
00051     | CBRS_SIZE_DYNAMIC);
00052   SetBorders ();
00053
00054   return 0;
00055 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CParaFormat Member List

This is the complete list of members for CParaFormat, including all inherited members.
CParaFormat() | CParaFormat | [inline]
CParaFormat() | CParaFormat | [inline]
operator==(PARAFORMAT2 &pf) | CParaFormat |
operator==(WPD_PARAFORMAT &pf) | CParaFormat |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MyAlertDlg.cpp Source File

  • vc2008fp
  • DesktopAlertDemo

MyAlertDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DesktopAlertDemo.h"
00013 #include "MyAlertDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CMyPopupDlg dialog
00023
00024 IMPLEMENT_DYNCREATE(CMyPopupDlg, CMFCDesktopAlertDialog)
00025
00026 CMyPopupDlg::CMyPopupDlg()
00027 {
00028 }
00029
00030
00031 void CMyPopupDlg::DoDataExchange(CDataExchange* pDX)
00032 {
00033   CMFCDesktopAlertDialog::DoDataExchange(pDX);
00034   DDX_Control(pDX, IDC_FROM, m_wndFrom);
00035   DDX_Control(pDX, IDC_FLAG, m_btnFlag);
00036   DDX_Control(pDX, IDC_DELETE, m_btnDelete);
00037   DDX_Control(pDX, IDC_BUTTON1, m_btnRL);
00038 }
00039
00040
00041 BEGIN_MESSAGE_MAP(CMyPopupDlg, CMFCDesktopAlertDialog)
00042   ON_BN_CLICKED(IDC_DELETE, OnDelete)
00043   ON_BN_CLICKED(IDC_FLAG, OnFlag)
00044   ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CMyPopupDlg message handlers
00049
00050 BOOL CMyPopupDlg::OnInitDialog()
00051 {
00052   CMFCDesktopAlertDialog::OnInitDialog();
00053
00054   LOGFONT lf;
00055   m_wndFrom.GetFont ()->GetLogFont (&lf);
00056
00057   lf.lfWeight = FW_BOLD;
00058   m_fontBold.CreateFontIndirect (&lf);
00059
00060   m_wndFrom.SetFont (&m_fontBold);
00061   m_btnFlag.SetImage (IDB_FLAG);
00062   m_btnDelete.SetImage (IDB_DELETE);
00063
00064   m_btnRL.m_bMultilineText = TRUE;
00065   m_btnRL.m_bAlwaysUnderlineText = FALSE;
00066   m_btnRL.m_bDefaultClickProcess = TRUE;
00067
00068   return TRUE;  // return TRUE unless you set the focus to a control
00069                 // EXCEPTION: OCX Property Pages should return FALSE
00070 }
00071
00072 void CMyPopupDlg::OnDelete()
00073 {
00074   GetParent ()->PostMessage (WM_CLOSE);
00075 }
00076
00077 void CMyPopupDlg::OnFlag()
00078 {
00079   GetParent ()->PostMessage (WM_CLOSE);
00080 }
00081
00082 void CMyPopupDlg::OnButton1()
00083 {
00084   GetParent ()->PostMessage (WM_CLOSE);
00085 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/resource.h Source File

  • vc2008fp
  • StatusBarDemo

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by StatusBarDemo.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDD_STATUSBARDEMO_FORM          101
00007 #define IDS_MAIN_TOOLBAR                101
00008 #define ID_INDICATOR_ICON               102
00009 #define ID_INDICATOR_PROGRESS           103
00010 #define ID_INDICATOR_LABEL              104
00011 #define ID_INDICATOR_ANIMATION          105
00012 #define IDS_WRONG_DISPLAY_SETTINGS      106
00013 #define IDR_MAINFRAME                   128
00014 #define IDR_STATUSTYPE                  129
00015 #define IDR_CONTEXT_MENU                130
00016 #define IDR_POPUP_TOOLBAR               131
00017 #define IDB_ANIMATION                   154
00018 #define IDB_ICON1                       155
00019 #define IDB_ICON2                       156
00020 #define IDD_ABOUTBOX                    999
00021 #define IDC_COMPANY_URL                 1041
00022 #define IDC_START_PROGRESS              1043
00023 #define IDC_START_ANIMATION             1044
00024 #define IDC_ICON1                       1045
00025 #define IDC_ICON2                       1046
00026 #define IDC_TEXT_COLOR                  1047
00027 #define IDC_BACK_COLOR                  1048
00028 #define ID_VIEW_CUSTOMIZE               32770
00029 #define ID_VIEW_TOOLBARS                32771
00030
00031 // Next default values for new objects
00032 //
00033 #ifdef APSTUDIO_INVOKED
00034 #ifndef APSTUDIO_READONLY_SYMBOLS
00035 #define _APS_3D_CONTROLS                     1
00036 #define _APS_NEXT_RESOURCE_VALUE        156
00037 #define _APS_NEXT_COMMAND_VALUE         32833
00038 #define _APS_NEXT_CONTROL_VALUE         1048
00039 #define _APS_NEXT_SYMED_VALUE           108
00040 #endif
00041 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CExplorerDoc Member List

This is the complete list of members for CExplorerDoc, including all inherited members.
CExplorerDoc() | CExplorerDoc | [protected]
OnCommandHistory() | CExplorerDoc | [protected]
OnGoBack() | CExplorerDoc | [protected]
OnGoForward() | CExplorerDoc | [protected]
OnNewDocument() | CExplorerDoc | [virtual]
Serialize(CArchive &ar) | CExplorerDoc | [virtual]
~CExplorerDoc() | CExplorerDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/filenewd.cpp Source File

  • ole
  • wordpad

filenewd.cpp

Go to the documentation of this file.
00001 // filenewd.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "filenewd.h"
00015 #include "helpids.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 DWORD const CFileNewDialog::m_nHelpIDs[] =
00023 {
00024   IDC_DATEDIALOG_LIST, IDH_WORDPAD_FILENEW_DOC,
00025   0, 0
00026 };
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CFileNewDialog dialog
00030
00031 CFileNewDialog::CFileNewDialog(CWnd* pParent /*=NULL*/)
00032   : CCSDialog(CFileNewDialog::IDD, pParent)
00033 {
00034   //{{AFX_DATA_INIT(CFileNewDialog)
00035   m_nSel = -1;
00036   //}}AFX_DATA_INIT
00037 }
00038
00039
00040 void CFileNewDialog::DoDataExchange(CDataExchange* pDX)
00041 {
00042   CCSDialog::DoDataExchange(pDX);
00043   //{{AFX_DATA_MAP(CFileNewDialog)
00044   DDX_Control(pDX, IDC_DATEDIALOG_LIST, m_listbox);
00045   DDX_LBIndex(pDX, IDC_DATEDIALOG_LIST, m_nSel);
00046   //}}AFX_DATA_MAP
00047 }
00048
00049
00050 BEGIN_MESSAGE_MAP(CFileNewDialog, CCSDialog)
00051   //{{AFX_MSG_MAP(CFileNewDialog)
00052   ON_LBN_DBLCLK(IDC_DATEDIALOG_LIST, OnDblclkDatedialogList)
00053   //}}AFX_MSG_MAP
00054 END_MESSAGE_MAP()
00055
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CFileNewDialog message handlers
00059
00060 BOOL CFileNewDialog::OnInitDialog()
00061 {
00062   CCSDialog::OnInitDialog();
00063
00064   CString str;
00065   VERIFY(str.LoadString(IDS_WORD6_DOCUMENT));
00066   m_listbox.AddString(str);
00067   VERIFY(str.LoadString(IDS_RTF_DOCUMENT));
00068   m_listbox.AddString(str);
00069   VERIFY(str.LoadString(IDS_TEXT_DOCUMENT));
00070   m_listbox.AddString(str);
00071   m_listbox.SetCurSel(0);
00072
00073   return TRUE;  // return TRUE unless you set the focus to a control
00074           // EXCEPTION: OCX Property Pages should return FALSE
00075 }
00076
00077 void CFileNewDialog::OnDblclkDatedialogList()
00078 {
00079   OnOK();
00080 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomPagesView Member List

This is the complete list of members for CCustomPagesView, including all inherited members.
CCustomPagesView() | CCustomPagesView | [protected]
GetDocument() | CCustomPagesView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CCustomPagesView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CCustomPagesView | [protected]
OnDraw(CDC *pDC) | CCustomPagesView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CCustomPagesView | [protected, virtual]
OnFilePrintPreview() | CCustomPagesView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CCustomPagesView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CCustomPagesView | [virtual]
~CCustomPagesView() | CCustomPagesView | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/ChildView.h Source File

  • general
  • MMXSwarm

ChildView.h

Go to the documentation of this file.
00001 // ChildView.h : interface of the CChildView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013 #include "MMXSurface.h"
00014 #include "Swarm.h"
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CChildView window
00018
00019 class CChildView : public CWnd
00020 {
00021 // Construction
00022 public:
00023   CChildView();
00024
00025 // Attributes
00026 public:
00027
00028 // Operations
00029 public:
00030   BOOL OnIdle(LONG lCount);
00031   CSurface *GetSurface() const
00032   { return(m_pSurface); }
00033
00034 // Overrides
00035 protected:
00036   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00037
00038 // Implementation
00039 public:
00040   virtual ~CChildView();
00041
00042   // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CChildView)
00045   afx_msg void OnPaint();
00046   afx_msg void OnTimer(UINT_PTR nIDEvent);
00047   afx_msg void OnSize(UINT nType, int cx, int cy);
00048   afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00049   afx_msg void OnUpdateFPS(CCmdUI* pCmdUI);
00050   afx_msg void OnUpdatePauseBlur(CCmdUI* pCmdUI);
00051   afx_msg void OnUpdatePauseSwarm(CCmdUI* pCmdUI);
00052   afx_msg void OnUpdatePauseBlit(CCmdUI* pCmdUI);
00053   afx_msg void OnUpdateResolution(CCmdUI* pCmdUI);
00054   afx_msg void OnUpdateImageFormats(CCmdUI* pCmdUI);
00055   afx_msg void OnFileOpen();
00056   afx_msg void OnFileSave();
00057   afx_msg void OnViewPauseBlur();
00058   afx_msg void OnViewPauseSwarm();
00059   afx_msg void OnViewPauseBlit();
00060   afx_msg void OnImageFormats(UINT nID);
00061   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064 private:
00065   enum ESurface {
00066     eNone       = 0,
00067     e16BitSSE2Intrin  = IDD_16BIT_SSE2INTRINSICS,
00068     e16BitMMXIntrin   = IDD_16BIT_MMXINTRINSICS,
00069     e16BitGeneric   = IDD_16BIT_GENERICCBLUR,
00070     e24BitSSE2Intrin  = IDD_24BIT_SSE2INTRINSICS,
00071     e24BitMMXIntrin   = IDD_24BIT_MMXINTRINSICS,
00072     e24BitGeneric   = IDD_24BIT_GENERICCBLUR,
00073     e32BitSSE2Intrin  = IDD_32BIT_SSE2INTRINSICS,
00074     e32BitMMXIntrin   = IDD_32BIT_MMXINTRINSICS,
00075     e32BitGeneric   = IDD_32BIT_GENERICCBLUR,
00076   };
00077
00078   void CreateSurface();
00079
00080   ESurface  m_eSurf;
00081   CSurface *m_pSurface;
00082   CSwarm    m_swarm;
00083
00084   int   m_nFrameCounter;
00085   int   m_nFilterLoad; // remember file/open filter
00086   int   m_nFilterSave; // remember file/save filter
00087   DWORD m_dwTickStart;
00088   bool  m_bSizeChanged;
00089   bool  m_bPauseBlur;
00090   bool  m_bPauseSwarm;
00091   bool  m_bPauseBlit;
00092   bool    m_bTimerPopped;
00093
00094   static const UINT_PTR m_kTimerID = 31;
00095   static const UINT m_kTimerDelay = 1500;
00096 public:
00097   afx_msg void OnDestroy(void);
00098 };
00099
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/MainFrm.h Source File

  • vc2008fp
  • StateCollection

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "WorkspaceBar.h"
00014 #include "OutputBar.h"
00015
00016 #define CFrameWnd CFrameWndEx
00017
00018 class CMainFrame : public CFrameWnd
00019 {
00020
00021 protected: // create from serialization only
00022   CMainFrame();
00023   DECLARE_DYNCREATE(CMainFrame)
00024
00025 // Attributes
00026 public:
00027
00028 // Operations
00029 public:
00030
00031 // Overrides
00032   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00033
00034 // Implementation
00035 public:
00036   virtual ~CMainFrame();
00037 #ifdef _DEBUG
00038   virtual void AssertValid() const;
00039   virtual void Dump(CDumpContext& dc) const;
00040 #endif
00041
00042 protected:  // control bar embedded members
00043   CMFCMenuBar m_wndMenuBar;
00044   CMFCStatusBar m_wndStatusBar;
00045   CMFCToolBar m_wndToolBar;
00046   CWorkspaceBar m_wndWorkSpace;
00047   COutputBar    m_wndOutput;
00048
00049 protected:
00050   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00051   afx_msg void OnSaveDebugConf();
00052   afx_msg void OnLoadDebugConf();
00053   afx_msg void OnSaveRegularConf();
00054   afx_msg void OnLoadRegularConf();
00055   afx_msg void OnViewCustomize();
00056   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00057   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00058   afx_msg void OnViewWorkspace();
00059   afx_msg void OnUpdateViewWorkspace(CCmdUI* pCmdUI);
00060   afx_msg void OnViewOutput();
00061   afx_msg void OnUpdateViewOutput(CCmdUI* pCmdUI);
00062
00063   DECLARE_MESSAGE_MAP()
00064
00065   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00066 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/stdafx.h Source File

  • general
  • dynamenu

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions (including VB)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCircPropPage Member List

This is the complete list of members for CCircPropPage, including all inherited members.
CCircPropPage() | CCircPropPage |
DoDataExchange(CDataExchange *pDX) | CCircPropPage | [protected, virtual]
IDD enum value | CCircPropPage |
m_caption | CCircPropPage |
m_circleOffset | CCircPropPage |
m_circleShape | CCircPropPage |
m_note | CCircPropPage |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoView.h Source File

  • vc2008fp
  • PaletteDemo

PaletteDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CPaletteDemoView : public CView
00014 {
00015 protected: // create from serialization only
00016   CPaletteDemoView();
00017   DECLARE_DYNCREATE(CPaletteDemoView)
00018
00019 // Attributes
00020 public:
00021   CPaletteDemoDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CPaletteDemoView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnFilePrintPreview();
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 #ifndef _DEBUG  // debug version in PaletteDemoView.cpp
00050 inline CPaletteDemoDoc* CPaletteDemoView::GetDocument()
00051    { return (CPaletteDemoDoc*)m_pDocument; }
00052 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TimeLib::_DTime Member List

This is the complete list of members for TimeLib::_DTime, including all inherited members.
AboutBox() | TimeLib::_DTime
id | TimeLib::_DTime
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/srvritem.cpp Source File

  • ole
  • wordpad

srvritem.cpp

Go to the documentation of this file.
00001 // srvritem.cpp : implementation of the CWordPadSrvrItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "wordpdoc.h"
00015 #include "wordpvw.h"
00016 #include "srvritem.h"
00017 #include <limits.h>
00018
00019 IMPLEMENT_DYNAMIC(CEmbeddedItem, COleServerItem)
00020
00021 extern CLIPFORMAT cfRTF;
00022
00023 CEmbeddedItem::CEmbeddedItem(CWordPadDoc* pContainerDoc, int nBeg, int nEnd)
00024   : COleServerItem(pContainerDoc, TRUE)
00025 {
00026   ASSERT(pContainerDoc != NULL);
00027   ASSERT_VALID(pContainerDoc);
00028   m_nBeg = nBeg;
00029   m_nEnd = nEnd;
00030 }
00031
00032 CWordPadView* CEmbeddedItem::GetView() const
00033 {
00034   CDocument* pDoc = GetDocument();
00035   ASSERT_VALID(pDoc);
00036   POSITION pos = pDoc->GetFirstViewPosition();
00037   if (pos == NULL)
00038     return NULL;
00039
00040   CWordPadView* pView = (CWordPadView*)pDoc->GetNextView(pos);
00041   ASSERT_VALID(pView);
00042   ASSERT(pView->IsKindOf(RUNTIME_CLASS(CWordPadView)));
00043   return pView;
00044 }
00045
00046 void CEmbeddedItem::Serialize(CArchive& ar)
00047 {
00048   if (m_lpRichDataObj != NULL)
00049   {
00050     ASSERT(ar.IsStoring());
00051     FORMATETC etc = {NULL, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
00052     etc.cfFormat = (CLIPFORMAT)cfRTF;
00053     STGMEDIUM stg;
00054     if (SUCCEEDED(m_lpRichDataObj->GetData(&etc, &stg)))
00055     {
00056       LPBYTE p = (LPBYTE)GlobalLock(stg.hGlobal);
00057       if (p != NULL)
00058       {
00059         ar.Write(p, (UINT)GlobalSize(stg.hGlobal));
00060         GlobalUnlock(stg.hGlobal);
00061       }
00062       ASSERT(stg.tymed == TYMED_HGLOBAL);
00063       ReleaseStgMedium(&stg);
00064     }
00065   }
00066   else
00067     GetDocument()->Serialize(ar);
00068 }
00069
00070 BOOL CEmbeddedItem::OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize)
00071 {
00072   if (dwDrawAspect != DVASPECT_CONTENT)
00073     return COleServerItem::OnGetExtent(dwDrawAspect, rSize);
00074
00075   CClientDC dc(NULL);
00076   return OnDrawEx(&dc, rSize, FALSE);
00077 }
00078
00079 BOOL CEmbeddedItem::OnDraw(CDC* pDC, CSize& rSize)
00080 {
00081   return OnDrawEx(pDC, rSize, TRUE);
00082 }
00083
00084 BOOL CEmbeddedItem::OnDrawEx(CDC* pDC, CSize& rSize, BOOL bOutput)
00085 {
00086   CDisplayIC dc;
00087   CWordPadView* pView = GetView();
00088   if (pView == NULL)
00089     return FALSE;
00090   ASSERT_VALID(pView);
00091
00092   int nWrap = pView->m_nWordWrap;
00093
00094   CRect rect;//rect in twips
00095   rect.left = rect.top = 0;
00096   rect.bottom = 32767; // bottomless
00097
00098   rect.right = 32767;
00099   if (nWrap == 0) // no word wrap
00100     rect.right = 32767;
00101   else if (nWrap == 1) // wrap to window
00102   {
00103     CRect rectClient;
00104     pView->GetClientRect(&rectClient);
00105     rect.right = rectClient.right - HORZ_TEXTOFFSET;
00106     rect.right = MulDiv(rect.right, 1440, dc.GetDeviceCaps(LOGPIXELSX));
00107   }
00108   else if (nWrap == 2) // wrap to ruler
00109     rect.right = pView->GetPrintWidth();
00110
00111   // first just determine the correct extents of the text
00112   pDC->SetBkMode(TRANSPARENT);
00113
00114   if (pView->PrintInsideRect(pDC, rect, m_nBeg, m_nEnd, FALSE) == 0)
00115   {
00116     // default to 12pts high and 4" wide if no text
00117     rect.bottom = rect.top+12*20+1; // 12 pts high
00118     rect.right = rect.left+ 4*1440;
00119   }
00120   rect.bottom+=3*(1440/dc.GetDeviceCaps(LOGPIXELSX)); // three pixels
00121
00122   // then, really output the text
00123   CRect rectOut = rect; // don't pass rect because it will get clobbered
00124   if (bOutput)
00125     pView->PrintInsideRect(pDC, rectOut, m_nBeg, m_nEnd, TRUE);
00126   ASSERT(rectOut.right == rect.right);
00127
00128   // adjust for border (rect.left is already adjusted)
00129   if (pView->GetStyle() & WS_HSCROLL)
00130     ++rect.bottom;  // account for border on scroll bar!
00131
00132   // return HIMETRIC size
00133   rSize = rect.Size();
00134   rSize.cx = MulDiv(rSize.cx, 2540, 1440); // convert twips to HIMETRIC
00135   rSize.cy = MulDiv(rSize.cy, 2540, 1440); // convert twips to HIMETRIC
00136   return TRUE;
00137 }
00138
00139 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View2.cpp Source File

  • vc2008fp
  • OutlookMultiViews

View2.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "OutlookMultiViews.h"
00003 #include "View2.h"
00004
00005 #ifdef _DEBUG
00006 #define new DEBUG_NEW
00007 #undef THIS_FILE
00008 static char THIS_FILE[] = __FILE__;
00009 #endif
00010
00011 static const CString strInfo =
00012   _T("This sample illustrates how to switch between multiple views on a single document in a SDI application\r\n\r\nView 3");
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CView2
00016
00017 IMPLEMENT_DYNCREATE(CView2, CView)
00018
00019 CView2::CView2()
00020 {
00021 }
00022
00023 CView2::~CView2()
00024 {
00025 }
00026
00027
00028 BEGIN_MESSAGE_MAP(CView2, CView)
00029   ON_WM_CONTEXTMENU()
00030   // Standard printing commands
00031   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00032   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00033   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CView2 drawing
00038
00039 void CView2::OnDraw(CDC* pDC)
00040 {
00041   const int iOffset = 20;
00042
00043   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00044   ASSERT (pFontOld != NULL);
00045
00046   CRect rectClient;
00047   GetClientRect (&rectClient);
00048
00049   CRect rectText = rectClient;
00050   rectText.DeflateRect (iOffset, iOffset);
00051   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00052
00053   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00054               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00055
00056   CRect rectFrame = rectText;
00057   rectFrame.InflateRect (iOffset, iOffset);
00058
00059   CDrawingManager dm (*pDC);
00060
00061   dm.FillGradient2 (rectFrame, RGB (196, 245, 184), RGB (119, 231, 91), 35);
00062
00063   pDC->Draw3dRect (rectFrame, RGB (39, 126, 17), RGB (39, 126, 17));
00064
00065   pDC->SetBkMode (TRANSPARENT);
00066   pDC->SetTextColor (0);
00067   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00068   pDC->SelectObject (pFontOld);
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CView2 diagnostics
00073
00074 #ifdef _DEBUG
00075 void CView2::AssertValid() const
00076 {
00077   CView::AssertValid();
00078 }
00079
00080 void CView2::Dump(CDumpContext& dc) const
00081 {
00082   CView::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CView2 message handlers
00088
00089 void CView2::OnFilePrintPreview()
00090 {
00091   AFXPrintPreview (this);
00092 }
00093
00094 BOOL CView2::OnPreparePrinting(CPrintInfo* pInfo)
00095 {
00096   // default preparation
00097   return DoPreparePrinting(pInfo);
00098 }
00099
00100 void CView2::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00101 {
00102   // TODO: add extra initialization before printing
00103 }
00104
00105 void CView2::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00106 {
00107   // TODO: add cleanup after printing
00108 }
00109
00110 void CView2::OnContextMenu(CWnd*, CPoint point)
00111 {
00112   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00113 }
00114
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PChngPg.H Source File

  • ole
  • TstCon

PChngPg.H

Go to the documentation of this file.
00001 // File: PChngPg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_PROPERTYCHANGESPAGE_H__CAC42501_E29A_11D0_8E15_00C04FB68D60__INCLUDED_)
00011 #define AFX_PROPERTYCHANGESPAGE_H__CAC42501_E29A_11D0_8E15_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // PropertyChangesPage.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CPropertyChangesPage dialog
00021
00022 class CPropertyChangesPage : public CPropertyPage
00023 {
00024   DECLARE_DYNCREATE(CPropertyChangesPage)
00025
00026 // Construction
00027 public:
00028   CPropertyChangesPage();
00029   ~CPropertyChangesPage();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CPropertyChangesPage)
00033   enum { IDD = IDD_CONTROLLOGGING_PROPERTYCHANGES };
00034   CCheckListBox   m_lbProperties;
00035   //}}AFX_DATA
00036
00037    CStringArray m_astrPropertyNames;
00038    CUIntArray m_atLogFlags;
00039
00040 // Overrides
00041   // ClassWizard generate virtual function overrides
00042   //{{AFX_VIRTUAL(CPropertyChangesPage)
00043   protected:
00044   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 protected:
00049   // Generated message map functions
00050   //{{AFX_MSG(CPropertyChangesPage)
00051   virtual BOOL OnInitDialog();
00052   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00053   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00054   //}}AFX_MSG
00055   DECLARE_MESSAGE_MAP()
00056
00057 };
00058
00059 //{{AFX_INSERT_LOCATION}}
00060 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00061
00062 #endif // !defined(AFX_PROPERTYCHANGESPAGE_H__CAC42501_E29A_11D0_8E15_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/stdafx.cpp Source File

  • advanced
  • dllhusk

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/CntrItem.cpp Source File

  • ole
  • MFCBind

CntrItem.cpp

Go to the documentation of this file.
00001 // CntrItem.cpp : implementation of the CMFCBindCntrItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "MFCBind.h"
00014
00015 #include "BindDoc.h"
00016 #include "BindView.h"
00017 #include "CntrItem.h"
00018 #include "mainfrm.h"
00019 #include "ObjView.h"
00020
00021
00022 #ifdef _DEBUG
00023 #define new DEBUG_NEW
00024 #undef THIS_FILE
00025 static char THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CMFCBindCntrItem implementation
00030
00031 int CMFCBindCntrItem::m_nDocID = 1;
00032
00033 IMPLEMENT_SERIAL(CMFCBindCntrItem, COleDocObjectItem, 0)
00034
00035 CMFCBindCntrItem::CMFCBindCntrItem(CMFCBindDoc* pContainer)
00036   : COleDocObjectItem(pContainer)
00037 {
00038 }
00039
00040 CMFCBindCntrItem::~CMFCBindCntrItem()
00041 {
00042   // TODO: add cleanup code here
00043
00044 }
00045
00046 void CMFCBindCntrItem::OnChange(OLE_NOTIFICATION nCode, DWORD dwParam)
00047 {
00048   ASSERT_VALID(this);
00049
00050   COleDocObjectItem::OnChange(nCode, dwParam);
00051   GetDocument()->UpdateAllViews(NULL);
00052 }
00053
00054 BOOL CMFCBindCntrItem::OnChangeItemPosition(const CRect& rectPos)
00055 {
00056   ASSERT_VALID(this);
00057
00058   if (!COleDocObjectItem::OnChangeItemPosition(rectPos))
00059     return FALSE;
00060   return TRUE;
00061 }
00062
00063 void CMFCBindCntrItem::OnGetItemPosition(CRect& rPosition)
00064 {
00065   ASSERT_VALID(this);
00066   m_pView->GetClientRect(rPosition);
00067 }
00068
00069 void CMFCBindCntrItem::OnActivate()
00070 {
00071    CFrameWnd* pFrame = DYNAMIC_DOWNCAST(CFrameWnd, AfxGetApp()->m_pMainWnd);
00072    ENSURE(pFrame != NULL);
00073
00074    CWnd* pView = pFrame->GetActiveView();
00075    ENSURE(pView != NULL);
00076
00077    COleDocObjectItem* pItem =
00078     (COleDocObjectItem*) GetDocument()->GetInPlaceActiveItem(pView);
00079
00080    // if this isn't the item being activated, deactivate it.
00081    if (pItem != NULL && pItem != this)
00082     pItem->Deactivate();
00083
00084    COleDocObjectItem::OnActivate();
00085 }
00086
00087 void CMFCBindCntrItem::OnDeactivateUI(BOOL bUndoable)
00088 {
00089   COleDocObjectItem::OnDeactivateUI(bUndoable);
00090 }
00091
00092 void CMFCBindCntrItem::Serialize(CArchive& ar)
00093 {
00094   ASSERT_VALID(this);
00095
00096   // Call base class first to read in COleDocObjectItem data.
00097   // Since this sets up the m_pDocument pointer returned from
00098   //  CMFCBindCntrItem::GetDocument, it is a good idea to call
00099   //  the base class Serialize first.
00100   COleDocObjectItem::Serialize(ar);
00101
00102   // now store/retrieve data specific to CMFCBindCntrItem
00103   if (ar.IsStoring())
00104   {
00105     // TODO: add storing code here
00106   }
00107   else
00108   {
00109     // TODO: add loading code here
00110   }
00111 }
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CMFCBindCntrItem diagnostics
00115
00116 #ifdef _DEBUG
00117 void CMFCBindCntrItem::AssertValid() const
00118 {
00119   COleDocObjectItem::AssertValid();
00120 }
00121
00122 void CMFCBindCntrItem::Dump(CDumpContext& dc) const
00123 {
00124   COleDocObjectItem::Dump(dc);
00125 }
00126 #endif
00127
00128 /////////////////////////////////////////////////////////////////////////////
00129 //
00130
00131 void CMFCBindCntrItem::ProcessNewObject()
00132 {
00133   // This function get's an HICON for the server from the registry by
00134   // using our GetObjectIconFromRegistry function.  We also generate a
00135   // name and tell the object list view to add this information to
00136   // the list box.
00137
00138   if (!m_lpObject)
00139     return; //no object, something must've gone wrong
00140
00141   CString strName;
00142   strName.Format(_T("Section %d "), m_nDocID);
00143   m_nDocID++;
00144
00145   HICON hIcon = GetIconFromRegistry();
00146   if (hIcon != NULL)
00147   {
00148     CMainFrame* pFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetApp()->m_pMainWnd);
00149     ENSURE(pFrame != NULL);
00150     CObjListView *pListView = pFrame->GetObjListView();
00151     if (pListView == NULL)
00152       return;
00153
00154     pListView->AddItem((COleDocObjectItem*) this, strName, hIcon);
00155   }
00156 }
00157
00158 BOOL CMFCBindCntrItem::FinishCreate(SCODE sc)
00159 {
00160   // FinishCreate is an undocumented virtual function that we
00161   // override here to do some extra processing after the object
00162   // has been created.
00163
00164   if (FAILED(sc))
00165   {
00166     AfxMessageBox(_T("OleCreate failed to create this item!"));
00167     return FALSE;
00168   }
00169
00170   BOOL bRet = COleDocObjectItem::FinishCreate(sc);
00171   if (bRet)
00172     ProcessNewObject();
00173   return bRet;
00174
00175 }
00176
00177 void CMFCBindCntrItem::LoadFromMoniker(LPUNKNOWN pUnk, OLECHAR* szwName)
00178 {
00179   HRESULT hr;
00180   // Ask the system for a URL Moniker
00181   IMoniker* pIMoniker;
00182   hr = CreateURLMoniker(NULL, (LPWSTR)szwName, &pIMoniker);
00183   if ( SUCCEEDED(hr) )
00184   {
00185     // Get the IPersistMoniker interface
00186     IPersistMoniker* pPMk;
00187     hr = pUnk->QueryInterface(
00188                 IID_IPersistMoniker,
00189                 (void **)&pPMk);
00190     if ( SUCCEEDED(hr) )
00191     {
00192         // note: do not register our BSC when calling IPM::Load directly
00193       IBindCtx *pBCtx;
00194       hr = CreateBindCtx(0, &pBCtx);
00195       if ( SUCCEEDED(hr) )
00196       {
00197         // Call Load on the IPersistMoniker
00198         hr = pPMk->Load(FALSE, pIMoniker, pBCtx, STGM_READ);
00199           pBCtx->Release();
00200       }
00201       pPMk->Release();
00202     }
00203     pIMoniker->Release( );
00204   }
00205 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/MainFrm.cpp Source File

  • vc2008fp
  • ToolbarDateTimePicker

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "ToolbarDateTimePicker.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030   ON_WM_CREATE()
00031   ON_COMMAND(ID_DATE, OnDate)
00032   ON_COMMAND(ID_TIME, OnTime)
00033   //}}AFX_MSG_MAP
00034   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00035   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00036   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00037 END_MESSAGE_MAP()
00038
00039 static UINT indicators[] =
00040 {
00041   ID_SEPARATOR,           // status line indicator
00042   ID_INDICATOR_CAPS,
00043   ID_INDICATOR_NUM,
00044   ID_INDICATOR_SCRL,
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CMainFrame construction/destruction
00049
00050 CMainFrame::CMainFrame()
00051 {
00052   // TODO: add member initialization code here
00053
00054 }
00055
00056 CMainFrame::~CMainFrame()
00057 {
00058 }
00059
00060 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00061 {
00062   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00063     return -1;
00064
00065   // enable Office XP look:
00066   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00067
00068   CMFCToolBar::EnableQuickCustomization ();
00069
00070
00071   // TODO: Define your own basic commands. Be sure, that each pulldown
00072   // menu have at least one basic command.
00073
00074   CList<UINT, UINT> lstBasicCommands;
00075
00076   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00077   lstBasicCommands.AddTail (ID_FILE_NEW);
00078   lstBasicCommands.AddTail (ID_FILE_OPEN);
00079   lstBasicCommands.AddTail (ID_FILE_SAVE);
00080   lstBasicCommands.AddTail (ID_FILE_PRINT);
00081   lstBasicCommands.AddTail (ID_APP_EXIT);
00082   lstBasicCommands.AddTail (ID_EDIT_CUT);
00083   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00084   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00085   lstBasicCommands.AddTail (ID_APP_ABOUT);
00086   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00087   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00088   lstBasicCommands.AddTail (ID_DATE);
00089   lstBasicCommands.AddTail (ID_TIME);
00090
00091   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00092
00093   if (!m_wndMenuBar.Create (this))
00094   {
00095     TRACE0("Failed to create menubar\n");
00096     return -1;      // fail to create
00097   }
00098
00099   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00100
00101   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00102     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00103     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00104   {
00105     TRACE0("Failed to create toolbar\n");
00106     return -1;      // fail to create
00107   }
00108   if (!m_wndStatusBar.Create(this) ||
00109     !m_wndStatusBar.SetIndicators(indicators,
00110       sizeof(indicators)/sizeof(UINT)))
00111   {
00112     TRACE0("Failed to create status bar\n");
00113     return -1;      // fail to create
00114   }
00115
00116   BOOL bValidString;
00117   CString strMainToolbarTitle;
00118   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00119   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00120   // TODO: Delete these three lines if you don't want the toolbar to
00121   //  be dockable
00122   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00123   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00124   EnableDocking(CBRS_ALIGN_ANY);
00125   DockPane(&m_wndMenuBar);
00126   DockPane(&m_wndToolBar);
00127
00128
00129   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00130   return 0;
00131 }
00132
00133 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00134 {
00135   if( !CFrameWnd::PreCreateWindow(cs) )
00136     return FALSE;
00137   // TODO: Modify the Window class or styles here by modifying
00138   //  the CREATESTRUCT cs
00139
00140   return TRUE;
00141 }
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CMainFrame diagnostics
00145
00146 #ifdef _DEBUG
00147 void CMainFrame::AssertValid() const
00148 {
00149   CFrameWnd::AssertValid();
00150 }
00151
00152 void CMainFrame::Dump(CDumpContext& dc) const
00153 {
00154   CFrameWnd::Dump(dc);
00155 }
00156
00157 #endif //_DEBUG
00158
00159 /////////////////////////////////////////////////////////////////////////////
00160 // CMainFrame message handlers
00161
00162
00163 void CMainFrame::OnViewCustomize()
00164 {
00165   //------------------------------------
00166   // Create a customize toolbars dialog:
00167   //------------------------------------
00168   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00169     TRUE /* Automatic menus scaning */
00170     );
00171
00172   //----Example----//
00173
00174   CMFCToolBarDateTimeCtrl dateButton (ID_DATE,
00175     GetCmdMgr ()->GetCmdImage (ID_DATE, FALSE));
00176   pDlgCust->ReplaceButton (ID_DATE, dateButton);
00177
00178   CMFCToolBarDateTimeCtrl timeButton (ID_TIME,
00179     GetCmdMgr ()->GetCmdImage (ID_TIME, FALSE),
00180     DTS_TIMEFORMAT | DTS_UPDOWN);
00181   pDlgCust->ReplaceButton (ID_TIME, timeButton);
00182
00183   //----Example----//
00184
00185   pDlgCust->Create ();
00186 }
00187
00188 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00189 {
00190   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00191
00192   CMenu menu;
00193   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00194
00195   CMenu* pPopup = menu.GetSubMenu(0);
00196   ASSERT(pPopup != NULL);
00197
00198   if (pPopup)
00199   {
00200     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00201     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00202   }
00203
00204   return 0;
00205 }
00206
00207 LRESULT CMainFrame::OnToolbarReset(WPARAM wp,LPARAM)
00208 {
00209   //----Example----//
00210
00211   UINT uiToolBarId = (UINT) wp;
00212
00213   switch (uiToolBarId)
00214   {
00215   case IDR_MAINFRAME:
00216     {
00217       CMFCToolBarDateTimeCtrl dateButton (ID_DATE,
00218         GetCmdMgr ()->GetCmdImage (ID_DATE, FALSE));
00219       m_wndToolBar.ReplaceButton (ID_DATE, dateButton);
00220
00221       CMFCToolBarDateTimeCtrl timeButton (ID_TIME,
00222         GetCmdMgr ()->GetCmdImage (ID_TIME, FALSE),
00223         DTS_TIMEFORMAT | DTS_UPDOWN);
00224       m_wndToolBar.ReplaceButton (ID_TIME, timeButton);
00225     }
00226     break;
00227   }
00228
00229   //----Example----//
00230
00231   return 0;
00232 }
00233
00234 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00235 {
00236   //---------------------------------------------------------
00237   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00238   //---------------------------------------------------------
00239   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00240
00241   if (pMenuPopup != NULL &&
00242     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00243   {
00244     if (CMFCToolBar::IsCustomizeMode ())
00245     {
00246       //----------------------------------------------------
00247       // Don't show toolbars list in the cuztomization mode!
00248       //----------------------------------------------------
00249       return FALSE;
00250     }
00251
00252     pMenuPopup->RemoveAllItems ();
00253
00254     CMenu menu;
00255     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00256
00257     CMenu* pPopup = menu.GetSubMenu(0);
00258     ASSERT(pPopup != NULL);
00259
00260     if (pPopup)
00261     {
00262       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00263     }
00264   }
00265
00266   return TRUE;
00267 }
00268
00269 void CMainFrame::OnDate()
00270 {
00271   MessageBox (_T("Change date..."));
00272 }
00273
00274 void CMainFrame::OnTime()
00275 {
00276   MessageBox (_T("Change time...."));
00277 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputBar.cpp Source File

  • vc2008fp
  • VisualStudioDemo

OutputBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "MainFrm.h"
00013 #include "OutputBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // COutputBar
00023
00024 COutputBar::COutputBar()
00025 {
00026 }
00027
00028 COutputBar::~COutputBar()
00029 {
00030 }
00031
00032 BEGIN_MESSAGE_MAP(COutputBar, CDockablePane)
00033   ON_WM_CREATE()
00034   ON_WM_SIZE()
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // COutputBar message handlers
00039
00040 int COutputBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00041 {
00042   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00043     return -1;
00044
00045   m_Font.CreateStockObject(DEFAULT_GUI_FONT);
00046
00047   CRect rectClient(0, 0, lpCreateStruct->cx, lpCreateStruct->cy);
00048
00049   // Create tabs window:
00050   if (!m_wndTabs.Create(CMFCTabCtrl::STYLE_FLAT_SHARED_HORZ_SCROLL, rectClient, this, 101))
00051   {
00052     TRACE0("Failed to create output tab window\n");
00053     return -1;      // fail to create
00054   }
00055
00056   // Create output panes:
00057   const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
00058
00059   m_wndOutputBuild.Create(dwStyle, rectClient, &m_wndTabs, 1);
00060   m_wndOutputBuild.SetFont(&m_Font);
00061   m_wndOutputBuild.SetOwner(this);
00062
00063   m_wndOutputDebug.Create(dwStyle, rectClient, &m_wndTabs, 2);
00064   m_wndOutputDebug.SetFont(&m_Font);
00065   m_wndOutputDebug.SetOwner(this);
00066
00067   m_wndOutputFind1.Create(dwStyle, rectClient, &m_wndTabs, 3);
00068   m_wndOutputFind1.SetFont(&m_Font);
00069   m_wndOutputFind1.SetOwner(this);
00070
00071   m_wndOutputFind2.Create(dwStyle, rectClient, &m_wndTabs, 4);
00072   m_wndOutputFind2.SetFont(&m_Font);
00073   m_wndOutputFind2.SetOwner(this);
00074
00075   m_wndOutputSQL.Create(dwStyle, rectClient, &m_wndTabs, 5);
00076   m_wndOutputSQL.SetFont(&m_Font);
00077   m_wndOutputSQL.SetOwner(this);
00078
00079   // Fill view context(dummy code, don't seek here something magic :-)):
00080   FillBuildWindow();
00081   FillDebugWindow();
00082
00083   // Attach views to tab:
00084   m_wndTabs.AddTab(&m_wndOutputBuild, _T("Build"), (UINT)-1);
00085   m_wndTabs.AddTab(&m_wndOutputDebug, _T("Debug"), (UINT)-1);
00086   m_wndTabs.AddTab(&m_wndOutputFind1, _T("Find in Files 1"), (UINT)-1);
00087   m_wndTabs.AddTab(&m_wndOutputFind2, _T("Find in Files 2"), (UINT)-1);
00088   m_wndTabs.AddTab(&m_wndOutputSQL, _T("SQL Debugging"), (UINT)-1);
00089
00090   return 0;
00091 }
00092
00093 void COutputBar::OnSize(UINT nType, int cx, int cy)
00094 {
00095   CDockablePane::OnSize(nType, cx, cy);
00096
00097   CRect rc;
00098   GetClientRect(rc);
00099
00100   m_wndTabs.SetWindowPos(NULL, rc.left, rc.top, rc.Width(), rc.Height(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOREDRAW);
00101
00102   AdjusrHorzScroll(m_wndOutputBuild);
00103   AdjusrHorzScroll(m_wndOutputDebug);
00104   AdjusrHorzScroll(m_wndOutputFind1);
00105   AdjusrHorzScroll(m_wndOutputFind2);
00106   AdjusrHorzScroll(m_wndOutputSQL);
00107 }
00108
00109 void COutputBar::AdjusrHorzScroll(CListBox& wndListBox)
00110 {
00111   CClientDC dc(this);
00112   CFont* pOldFont = dc.SelectObject(&m_Font);
00113
00114   int cxExtentMax = 0;
00115
00116   for (int i = 0; i < wndListBox.GetCount(); i ++)
00117   {
00118     CString strItem;
00119     wndListBox.GetText(i, strItem);
00120
00121     cxExtentMax = max(cxExtentMax, dc.GetTextExtent(strItem).cx);
00122   }
00123
00124   wndListBox.SetHorizontalExtent(cxExtentMax);
00125   dc.SelectObject(pOldFont);
00126 }
00127
00128 void COutputBar::FillBuildWindow()
00129 {
00130   m_wndOutputBuild.AddString(_T("--------------------Configuration: Hello - Win32 Debug--------------------"));
00131   m_wndOutputBuild.AddString(_T("Compiling..."));
00132   m_wndOutputBuild.AddString(_T("Hello.cpp..."));
00133   m_wndOutputBuild.AddString(_T("Linking..."));
00134   m_wndOutputBuild.AddString(_T(""));
00135   m_wndOutputBuild.AddString(_T("Hello.exe - 0 error(s), 0 warning(s)"));
00136
00137 }
00138
00139 void COutputBar::FillDebugWindow()
00140 {
00141   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\ntdll.dll', no matching symbolic information found."));
00142   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\winmm.dll', no matching symbolic information found."));
00143   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\USER32.DLL', no matching symbolic information found."));
00144   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\KERNEL32.DLL', no matching symbolic information found."));
00145   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\GDI32.DLL', no matching symbolic information found."));
00146   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\ADVAPI32.DLL', no matching symbolic information found."));
00147   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\RPCRT4.DLL', no matching symbolic information found."));
00148   m_wndOutputDebug.AddString(_T("Loaded symbols for 'C:\\WINNT\\System32\\MFC42D.DLL'"));
00149   m_wndOutputDebug.AddString(_T("Loaded symbols for 'C:\\WINNT\\System32\\MSVCRTD.DLL'"));
00150   m_wndOutputDebug.AddString(_T("Loaded symbols for 'C:\\WINNT\\System32\\MFCO42D.DLL'"));
00151   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\MMDRV.DLL', no matching symbolic information found."));
00152   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\sndblst.dll', no matching symbolic information found."));
00153   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\COMCTL32.DLL', no matching symbolic information found."));
00154   m_wndOutputDebug.AddString(_T("CONTROLBAR.DLL Initializing!"));
00155   m_wndOutputDebug.AddString(_T("Loaded 'C:\\WINNT\\System32\\OLE32.DLL', no matching symbolic information found."));
00156   m_wndOutputDebug.AddString(_T("The thread 0x142 has exited with code 0(0x0)."));
00157   m_wndOutputDebug.AddString(_T("CONTROLBAR.DLL Terminating!"));
00158   m_wndOutputDebug.AddString(_T("The thread 0x15C has exited with code 0(0x0)."));
00159   m_wndOutputDebug.AddString(_T("The program 'Hello.exe' has exited with code 0(0x0)."));
00160 }
00161 /////////////////////////////////////////////////////////////////////////////
00162 // COutputList1
00163
00164 COutputList1::COutputList1()
00165 {
00166 }
00167
00168 COutputList1::~COutputList1()
00169 {
00170 }
00171
00172 BEGIN_MESSAGE_MAP(COutputList1, CListBox)
00173   ON_WM_WINDOWPOSCHANGING()
00174   ON_WM_CONTEXTMENU()
00175   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00176   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00177   ON_COMMAND(ID_OUTPUT_GOTO_ERROR, OnOutputGotoError)
00178   ON_COMMAND(ID_VIEW_OUTPUT, OnViewOutput)
00179 END_MESSAGE_MAP()
00180
00181 /////////////////////////////////////////////////////////////////////////////
00182 // COutputList1 message handlers
00183
00184 void COutputList1::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
00185 {
00186   CListBox::OnWindowPosChanging(lpwndpos);
00187
00188   // Hide horizontal scrollbar:
00189   ShowScrollBar(SB_HORZ, FALSE);
00190   ModifyStyle(WS_HSCROLL, 0, SWP_DRAWFRAME);
00191 }
00192
00193 void COutputList1::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
00194 {
00195   CMenu menu;
00196   menu.LoadMenu(IDR_POPUP_OUTPUT);
00197
00198   CMenu* pSumMenu = menu.GetSubMenu(0);
00199
00200   if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
00201   {
00202     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00203
00204     if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
00205       return;
00206
00207     ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
00208     UpdateDialogControls(this, FALSE);
00209   }
00210 }
00211
00212 void COutputList1::OnEditCopy()
00213 {
00214   MessageBox(_T("Copy output"));
00215 }
00216
00217 void COutputList1::OnEditClear()
00218 {
00219   MessageBox(_T("Clear output"));
00220 }
00221
00222 void COutputList1::OnOutputGotoError()
00223 {
00224   // TODO: Add your command handler code here
00225 }
00226
00227 void COutputList1::OnViewOutput()
00228 {
00229   CBasePane* pParentBar = DYNAMIC_DOWNCAST(CBasePane, GetOwner());
00230   CFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CFrameWndEx, GetTopLevelFrame());
00231
00232   if (pMainFrame != NULL && pParentBar != NULL)
00233   {
00234     pMainFrame->SetFocus();
00235     pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE);
00236   }
00237 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAutoClickPoint Member List

This is the complete list of members for CAutoClickPoint, including all inherited members.
CAutoClickPoint() | CAutoClickPoint | [private]
CAutoClickPoint() | CAutoClickPoint | [private]
get_x(THIS_ short FAR *retval) | CAutoClickPoint |
get_y(THIS_ short FAR *retval) | CAutoClickPoint |
GetClickPoint() | CAutoClickPoint | [inline]
GetClickPoint() | CAutoClickPoint | [inline]
m_x | CAutoClickPoint |
m_y | CAutoClickPoint |
OnFinalRelease() | CAutoClickPoint | [virtual]
OnFinalRelease() | CAutoClickPoint | [virtual]
put_x(THIS_ short newX) | CAutoClickPoint |
put_y(THIS_ short newY) | CAutoClickPoint |
SetClickPoint(CPoint point) | CAutoClickPoint | [inline]
SetClickPoint(CPoint point) | CAutoClickPoint | [inline]
~CAutoClickPoint() | CAutoClickPoint | [protected, virtual]
~CAutoClickPoint() | CAutoClickPoint | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PalLib::_DPal Member List

This is the complete list of members for PalLib::_DPal, including all inherited members.
AboutBox() | PalLib::_DPal
Entry(short nIndex) | PalLib::_DPal
Entry(short nIndex, OLE_COLOR newValue) | PalLib::_DPal
id | PalLib::_DPal
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/resource.h Source File

  • controls
  • time

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by TIME.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_TIME                        1
00015 #define IDB_TIME                        1
00016 #define IDS_TIME_PPG                    2
00017 #define IDI_ABOUTDLL                    10
00018 #define IDD_ABOUTBOX_TIME               100
00019 #define IDS_TIME_PPG_CAPTION            101
00020 #define IDD_PROPPAGE_TIME               101
00021 #define IDC_INTERVALEDIT                201
00022 #define IDB_CLOCK                       201
00023 #define IDC_ENABLEDCHECK                202
00024
00025 // Next default values for new objects
00026 //
00027 #ifdef APSTUDIO_INVOKED
00028 #ifndef APSTUDIO_READONLY_SYMBOLS
00029
00030 #define _APS_NEXT_RESOURCE_VALUE        202
00031 #define _APS_NEXT_COMMAND_VALUE         32768
00032 #define _APS_NEXT_CONTROL_VALUE         203
00033 #define _APS_NEXT_SYMED_VALUE           101
00034 #endif
00035 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMapDWordToMyStructView Member List

This is the complete list of members for CMapDWordToMyStructView, including all inherited members.
AddMapEntryToListBox(DWORD dwKey, CMyStruct *pMyStruct) | CMapDWordToMyStructView | [protected]
CMapDWordToMyStructView() | CMapDWordToMyStructView |
ConstructMyStructFromView() | CMapDWordToMyStructView | [protected]
DoDataExchange(CDataExchange *pDX) | CMapDWordToMyStructView | [protected, virtual]
FindKeyInListBox(DWORD dwKey) | CMapDWordToMyStructView | [protected]
FormatListBoxEntry(DWORD dwKey, CMyStruct *pMyStruct) | CMapDWordToMyStructView | [protected, static]
GetDocument() | CMapDWordToMyStructView | [inline]
IDD enum value | CMapDWordToMyStructView |
m_ctlList | CMapDWordToMyStructView |
m_dwKey | CMapDWordToMyStructView |
m_float | CMapDWordToMyStructView |
m_int | CMapDWordToMyStructView |
m_str | CMapDWordToMyStructView |
OnAddOrUpdate() | CMapDWordToMyStructView | [protected]
OnFind() | CMapDWordToMyStructView | [protected]
OnInitialUpdate() | CMapDWordToMyStructView |
OnRemove() | CMapDWordToMyStructView | [protected]
OnRemoveAll() | CMapDWordToMyStructView | [protected]
OnSelChangeList() | CMapDWordToMyStructView | [protected]
UpdateViewFromMyStruct(CMyStruct *pMyStruct) | CMapDWordToMyStructView | [protected]
~CMapDWordToMyStructView() | CMapDWordToMyStructView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/stdafx.h Source File

  • ole
  • calcdriv

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013 //
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>         // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions (including VB)
00019 #include <afxdisp.h>        // MFC OLE automation classes
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/oclient.cpp Source File

  • ole
  • oclient

oclient.cpp

Go to the documentation of this file.
00001 // oclient.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include <stddef.h>
00015 #include "oclient.h"
00016
00017 #include "frame.h"
00018 #include "maindoc.h"
00019 #include "mainview.h"
00020 #include "splitfra.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // The one and only COleClientApp object
00029
00030 COleClientApp NEAR theApp;
00031
00032 // this is the GUID for OCLIENT documents
00033 static const GUID BASED_CODE clsid =
00034   { 0x00021842, 0, 0, { 0xC0, 0, 0, 0, 0, 0, 0, 0x46 } };
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // COleClientApp
00038
00039 BEGIN_MESSAGE_MAP(COleClientApp, CWinApp)
00040   //{{AFX_MSG_MAP(COleClientApp)
00041   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00042   //}}AFX_MSG_MAP
00043   // Standard file based document commands
00044   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00045   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00046   // Standard print setup command
00047   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00048   // Global help commands
00049   ON_COMMAND(ID_HELP_INDEX, CWinApp::OnHelpIndex)
00050   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00051   ON_COMMAND(ID_DEFAULT_HELP, CWinApp::OnHelpIndex)
00052   ON_COMMAND(ID_CONTEXT_HELP, CWinApp::OnContextHelp)
00053 END_MESSAGE_MAP()
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // COleClientApp construction
00057 // Place all significant initialization in InitInstance
00058
00059 COleClientApp::COleClientApp()
00060 {
00061     EnableHtmlHelp();
00062 }
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // COleClientApp initialization
00066
00067 BOOL COleClientApp::InitInstance()
00068 {
00069 #if defined(_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
00070   // turn on extra memory tracking
00071   afxMemDF |= checkAlwaysMemDF;
00072 #endif
00073
00074   // Initialize OLE 2.0 libraries
00075   if (!AfxOleInit())
00076   {
00077     AfxMessageBox(IDP_AFXOLEINIT_FAILED);
00078     return FALSE;
00079   }
00080
00081   // Standard initialization
00082   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00083
00084   // Register document templates
00085   CMultiDocTemplate* pDocTemplate = new CMultiDocTemplate(IDR_OCLIENTTYPE,
00086       RUNTIME_CLASS(CMainDoc),
00087       RUNTIME_CLASS(CSplitFrame),
00088       RUNTIME_CLASS(CMainView));
00089   pDocTemplate->SetContainerInfo(IDR_OCLIENTTYPE_CNTR_IP);
00090   AddDocTemplate(pDocTemplate);
00091
00092   // create main MDI Frame window
00093   CMainFrame* pMainFrame = new CMainFrame;
00094   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00095   {
00096     delete pMainFrame;
00097     return FALSE;
00098   }
00099   m_pMainWnd = pMainFrame;
00100
00101   // enable file manager drag/drop and DDE Execute open
00102   m_pMainWnd->DragAcceptFiles();
00103
00104   EnableShellOpen();
00105   RegisterShellFileTypes(TRUE);
00106
00107   // connect the COleTemplate server to the document template
00108   m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
00109   COleTemplateServer::RegisterAll();
00110     // Note: MDI applications register all class objects regardless of
00111     //  the /Embedding on the command line.
00112
00113   // Parse command line for standard shell commands, DDE, file open
00114   CCommandLineInfo cmdInfo;
00115   ParseCommandLine(cmdInfo);
00116
00117   if (RunEmbedded())
00118   {
00119     // application was run with /Embedding flag.  Instead of showing
00120     //  the window, the application waits to receive OLE requests.
00121     return TRUE;
00122   }
00123   // always update system registry when run non-embedded
00124   m_server.UpdateRegistry(OAT_CONTAINER);
00125
00126   // Dispatch commands specified on the command line
00127   if (!ProcessShellCommand(cmdInfo))
00128     return FALSE;
00129
00130   pMainFrame->ShowWindow(m_nCmdShow);
00131   pMainFrame->UpdateWindow();
00132
00133   return TRUE;
00134 }
00135
00136 /////////////////////////////////////////////////////////////////////////////
00137 // COleClientApp commands
00138
00139 void COleClientApp::OnAppAbout()
00140 {
00141   CDialog(IDD_ABOUTBOX).DoModal();
00142 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/StdAfx.h Source File

  • vc2008fp
  • TabbedView

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include "afxcview.h"
00039
00040 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00041
00042 #if defined _M_IX86
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #elif defined _M_X64
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #else
00047 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00048 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varassoc.h Source File

  • ole
  • inproc

varassoc.h

Go to the documentation of this file.
00001 // varassoc.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CVariantAssoc command target
00014
00015 class CVariantAssoc : public CCmdTarget
00016 {
00017   DECLARE_DYNCREATE(CVariantAssoc)
00018
00019 // Constructors
00020 public:
00021   CVariantAssoc();           // protected constructor used by dynamic creation
00022
00023 // Attributes
00024 public:
00025   COleVariant m_varKey;
00026   COleVariant m_varValue;
00027
00028 // Operations
00029 public:
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CVariantAssoc)
00034   public:
00035   virtual void OnFinalRelease();
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 protected:
00040   virtual ~CVariantAssoc();
00041
00042   // Generated message map functions
00043   //{{AFX_MSG(CVariantAssoc)
00044     // NOTE - the ClassWizard will add and remove member functions here.
00045   //}}AFX_MSG
00046
00047   DECLARE_MESSAGE_MAP()
00048   // Generated OLE dispatch map functions
00049   //{{AFX_DISPATCH(CVariantAssoc)
00050   afx_msg VARIANT GetKey();
00051   afx_msg VARIANT GetValue();
00052   //}}AFX_DISPATCH
00053   DECLARE_DISPATCH_MAP()
00054
00055   DECLARE_INTERFACE_MAP()
00056 };
00057
00058 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page1.h Source File

  • vc2008fp
  • NewControls

Page1.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPage1 dialog
00014
00015 class CPage1 : public CMFCPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CPage1)
00018
00019 // Construction
00020 public:
00021   CPage1();
00022   ~CPage1();
00023
00024 // Dialog Data
00025   enum { IDD = IDD_PAGE1 };
00026   CMFCButton m_btnMultiLine;
00027   CComboBox m_wndBorder;
00028   CStatic m_wndBorderLabel;
00029   CMFCButton m_btnCheck;
00030   CButton m_wndXPButtons;
00031   BOOL m_bXPButtons;
00032   BOOL m_bCheck;
00033   CMFCButton m_Button;
00034   CString m_strToolTip;
00035   CEdit m_wndToolTip;
00036   int m_iFrameRate;
00037   int m_iImage;
00038   int m_iBorderStyle;
00039   int m_iCursor;
00040   CMFCMenuButton m_btnMenu;
00041   BOOL m_bMenuStayPressed;
00042   BOOL m_bRightArrow;
00043   int m_nImageLocation;
00044   BOOL m_bMenuDefaultClick;
00045
00046   CMFCButton m_btnRadio1;
00047   CMFCButton m_btnRadio2;
00048   CMFCButton m_btnRadio3;
00049   CMFCButton m_btnRadio4;
00050
00051 // Overrides
00052 protected:
00053   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00054
00055 // Implementation
00056 protected:
00057   virtual BOOL OnInitDialog();
00058
00059   afx_msg void OnXpButtons();
00060   afx_msg void OnSetTooltip();
00061   afx_msg void OnSetCursor();
00062   afx_msg void OnButton();
00063   afx_msg void OnRightArrow();
00064   afx_msg void OnButtonMenu();
00065   afx_msg void OnPressedOnMenu();
00066   afx_msg void OnDialogAbout();
00067   afx_msg void OnUpdateItem2(CCmdUI* pCmdUI);
00068   afx_msg void OnResetButton();
00069   afx_msg void OnMenuDefaultClick();
00070
00071   DECLARE_MESSAGE_MAP()
00072
00073   CMenu m_menu;
00074 };
00075
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSliderView Member List

This is the complete list of members for CSliderView, including all inherited members.
CSliderView() | CSliderView | [protected]
GetDocument() | CSliderView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CSliderView | [protected, virtual]
OnDraw(CDC *pDC) | CSliderView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CSliderView | [protected, virtual]
OnFilePrintPreview() | CSliderView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CSliderView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CSliderView | [virtual]
~CSliderView() | CSliderView | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/mtreectl.h Source File

  • general
  • CmnCtrl1

mtreectl.h

Go to the documentation of this file.
00001 // MyTreeCtrl.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013
00014 #ifndef INC_MYTREECTRL_H
00015 #define INC_MYTREECTRL_H
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CMyTreeCtrl window
00018
00019 class CMyTreeCtrl : public CTreeCtrl
00020 {
00021 // Construction
00022 public:
00023   CMyTreeCtrl();
00024
00025 // Attributes
00026 public:
00027   BOOL        m_bDragging;
00028   HTREEITEM   m_hitemDrag;
00029   HTREEITEM   m_hitemDrop;
00030   CImageList  *m_pimagelist;
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CMyTreeCtrl)
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 public:
00041   virtual ~CMyTreeCtrl();
00042   void    SetNewStyle(long lStyleMask, BOOL bSetBits);
00043   BOOL    TransferItem(HTREEITEM hitem, HTREEITEM hNewParent);
00044   void    OnButtonUp(void);
00045   BOOL    IsChildNodeOf(HTREEITEM hitemChild, HTREEITEM hitemSuspectedParent);
00046
00047   // Generated message map functions
00048 protected:
00049   //{{AFX_MSG(CMyTreeCtrl)
00050   afx_msg void OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pLResult);
00051   afx_msg void OnBeginDrag(LPNMHDR pnmhdr, LRESULT *pLResult);
00052   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00053   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00054   afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00055   afx_msg void OnDestroy();
00056   //}}AFX_MSG
00057
00058   void OnButtonUp(CPoint point);
00059
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064
00065 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/palette.h Source File

  • general
  • ctrlbars

palette.h

Go to the documentation of this file.
00001 // palette.h : interface of the CPaletteBar class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CPaletteBar : public CToolBar
00013 {
00014 // Constructor
00015 public:
00016   CPaletteBar();
00017   void SetColumns(UINT nColumns);
00018   UINT GetColumns() { return m_nColumns; };
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Implementation
00027 public:
00028   virtual ~CPaletteBar();
00029 #ifdef _DEBUG
00030   virtual void AssertValid() const;
00031   virtual void Dump(CDumpContext& dc) const;
00032 #endif
00033
00034 protected:
00035   UINT m_nColumns;
00036
00037 // Generated message map functions
00038 protected:
00039   //{{AFX_MSG(CPaletteBar)
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/preview.h Source File

  • general
  • propdlg

preview.h

Go to the documentation of this file.
00001 // preview.h : interface of the CShapePreviewWnd class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CModalShapePropSheet;
00013
00014 class CShapePreviewWnd : public CWnd
00015 {
00016   friend class CModalShapePropSheet;
00017
00018   CShapePreviewWnd();
00019
00020   //{{AFX_MSG(CShapePreviewWnd)
00021   afx_msg void OnPaint();
00022   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00023   //}}AFX_MSG
00024   DECLARE_MESSAGE_MAP()
00025 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdidoc.cpp Source File

  • advanced
  • mtgdi

mtgdidoc.cpp

Go to the documentation of this file.
00001 // mtgdidoc.cpp : implementation of the CThreadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtgdi.h"
00014
00015 #include "mtgdidoc.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CThreadDoc
00024
00025 IMPLEMENT_DYNCREATE(CThreadDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CThreadDoc, CDocument)
00028   //{{AFX_MSG_MAP(CThreadDoc)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code!
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CThreadDoc construction/destruction
00036
00037 CThreadDoc::CThreadDoc()
00038 {
00039   // TODO: add one-time construction code here
00040
00041 }
00042
00043 CThreadDoc::~CThreadDoc()
00044 {
00045 }
00046
00047 BOOL CThreadDoc::OnNewDocument()
00048 {
00049   if (!CDocument::OnNewDocument())
00050     return FALSE;
00051
00052   // TODO: add reinitialization code here
00053   // (SDI documents will reuse this document)
00054
00055   return TRUE;
00056 }
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CThreadDoc serialization
00060
00061 void CThreadDoc::Serialize(CArchive& ar)
00062 {
00063   if (ar.IsStoring())
00064   {
00065     // TODO: add storing code here
00066   }
00067   else
00068   {
00069     // TODO: add loading code here
00070   }
00071 }
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CThreadDoc diagnostics
00075
00076 #ifdef _DEBUG
00077 void CThreadDoc::AssertValid() const
00078 {
00079   CDocument::AssertValid();
00080 }
00081
00082 void CThreadDoc::Dump(CDumpContext& dc) const
00083 {
00084   CDocument::Dump(dc);
00085 }
00086 #endif //_DEBUG
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CThreadDoc commands
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CView1 Member List

This is the complete list of members for CView1, including all inherited members.
CView1() | CView1 |
CView1() | CView1 | [protected]
GetScrollBarCtrl(int nBar) const | CView1 | [virtual]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CView1 | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CView1 | [protected]
OnDraw(CDC *pDC) | CView1 | [protected, virtual]
OnDraw(CDC *pDC) | CView1 | [protected, virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CView1 | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CView1 | [protected]
OnFilePrintPreview() | CView1 | [protected]
OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) | CView1 | [protected]
OnInitialUpdate() | CView1 | [virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CView1 | [protected, virtual]
OnWindowPosChanging(WINDOWPOS FAR *lpwndpos) | CView1 | [protected]
~CView1() | CView1 | [virtual]
~CView1() | CView1 | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNetAddrVerifierApp Member List

This is the complete list of members for CNetAddrVerifierApp, including all inherited members.
CNetAddrVerifierApp() | CNetAddrVerifierApp |
InitInstance() | CNetAddrVerifierApp | [virtual]
OnVerifyIPv4() | CNetAddrVerifierApp |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/propsht.h Source File

  • general
  • CmnCtrl2

propsht.h

Go to the documentation of this file.
00001 // AllControlsSheet.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CAllControlsSheet
00015
00016 #include "progctrl.h"
00017 #include "slidctrl.h"
00018 #include "spinctrl.h"
00019
00020 class CAllControlsSheet : public CPropertySheet
00021 {
00022   DECLARE_DYNAMIC(CAllControlsSheet)
00023
00024 // Construction
00025 public:
00026   CAllControlsSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00027   CAllControlsSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00028
00029 protected:
00030   void AddControlPages(void);
00031
00032 // Attributes
00033 public:
00034
00035   CProgCtrlPage       m_progctrlpage;
00036   CSliderCtrlPage     m_sliderctrlpage;
00037   CSpinCtrlPage       m_spinctrlpage;
00038 // Operations
00039 public:
00040
00041 // Overrides
00042   // ClassWizard generated virtual function overrides
00043   //{{AFX_VIRTUAL(CAllControlsSheet)
00044   public:
00045   virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00046   //}}AFX_VIRTUAL
00047
00048 // Implementation
00049 public:
00050   virtual ~CAllControlsSheet();
00051   virtual BOOL OnInitDialog();
00052
00053   // Generated message map functions
00054 protected:
00055
00056   HICON m_hIcon;
00057
00058   //{{AFX_MSG(CAllControlsSheet)
00059   afx_msg HCURSOR OnQueryDragIcon();
00060   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00061   //}}AFX_MSG
00062   DECLARE_MESSAGE_MAP()
00063 };
00064
00065 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dynamenu.h Source File

  • general
  • dynamenu

dynamenu.h

Go to the documentation of this file.
00001 // dynamenu.h
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: interface of the CDynaMenuApp class
00013 //
00014 // Functions:
00015 //      Most of this file was generated by AppWizard.  The functions
00016 //      which contain code specific to this sample are:
00017 //
00018 //      CDynaMenuApp::InitInstance()         -- per-instance initialization
00019
00020 #ifndef __AFXWIN_H__
00021   #error include 'stdafx.h' before including this file for PCH
00022 #endif
00023
00024 #include "resource.h"       // main symbols
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CDynaMenuApp:
00028 // See dynamenu.cpp for the implementation of this class
00029 //
00030
00031 class CDynaMenuApp : public CWinApp
00032 {
00033 public:
00034   CDynaMenuApp();
00035
00036 // Overrides
00037   virtual BOOL InitInstance();
00038
00039 // Implementation
00040
00041   //{{AFX_MSG(CDynaMenuApp)
00042   afx_msg void OnAppAbout();
00043     // NOTE - the ClassWizard will add and remove member functions here.
00044     //    DO NOT EDIT what you see in these blocks of generated code !
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutputWindowLog Member List

This is the complete list of members for COutputWindowLog, including all inherited members.
CLog() | CLog |
COutputWindowLog(CEdit *pEditBox) | COutputWindowLog |
DECLARE_DYNAMIC(COutputWindowLog) | COutputWindowLog | [private]
m_pEditBox | COutputWindowLog | [protected]
operator<<(LPCTSTR pszString) | COutputWindowLog | [virtual]
CLog::operator<<(COleVariant &var) | CLog |
CLog::operator<<(int n) | CLog |
~CLog() | CLog |
~COutputWindowLog() | COutputWindowLog |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWclsEditDlg Member List

This is the complete list of members for CWclsEditDlg, including all inherited members.
CWclsEditDlg() | CWclsEditDlg | [inline]
DECLARE_MESSAGE_MAP() | CWclsEditDlg |
Edit1() | CWclsEditDlg | [inline]
Edit2() | CWclsEditDlg | [inline]
Edit3() | CWclsEditDlg | [inline]
Edit4() | CWclsEditDlg | [inline]
IDD enum value | CWclsEditDlg |
OnIllegalChar() | CWclsEditDlg |
OnInitDialog() | CWclsEditDlg |
OnOK() | CWclsEditDlg | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/dertest.cpp Source File

  • general
  • ctrltest

dertest.cpp

Go to the documentation of this file.
00001 // deredit.cpp : C++ derived Edit control example
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 #include "paredit.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018
00019 class CDerEditDlg : public CDialog
00020 {
00021 protected:
00022   CFont*  m_pFont;
00023   // construct
00024   CParsedEdit m_edit1, m_edit2, m_edit3, m_edit4;
00025   CStatic m_static1, m_static2, m_static3, m_static4;
00026 public:
00027   //{{AFX_DATA(CDerEditDlg)
00028     enum { IDD = IDD_DERIVED_EDIT };
00029   //}}AFX_DATA
00030   CDerEditDlg()
00031     : CDialog(CDerEditDlg::IDD)
00032     { }
00033
00034   void OnSetFont(CFont* pFont)
00035       { m_pFont = pFont; }
00036
00037   BOOL OnInitDialog();
00038   //{{AFX_MSG(CDerEditDlg)
00039     virtual void OnOK();
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 BEGIN_MESSAGE_MAP(CDerEditDlg, CDialog)
00045   //{{AFX_MSG_MAP(CDerEditDlg)
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049
00050 BOOL CDerEditDlg::OnInitDialog()
00051   // create children on InitDialog
00052   //  (not in CDerEditDlg constructor since the dialog has
00053   //    no attached HWND in the constructor)
00054 {
00055   // This is an example of the _incorrect_ way to create a dialog
00056   // The following code show you what you should _not_ do:
00057   //    1) do not use hard coded numbers for coordinates and sizes
00058   //     (these will break when the font sizes changes and are
00059   //     hard to edit and maintain).
00060   //    2) do not put strings in code, they should be in resources.
00061   //    3) as you can see below the programming steps required
00062   //     to create controls, pass the correct creation parameters,
00063   //     and set the appropriate font, is complicated and error prone.
00064   //    4) localization of the controls would require changes to the
00065   //     sources for the captions, font, coordinates, and sizes.
00066
00067   const int yStart = 8;
00068   const int height = 30;
00069
00070   CPoint whereLabel(10, yStart);
00071   CSize sizeLabel(80, 24);
00072
00073   CPoint whereEdit(90, yStart);
00074   CSize sizeEdit(140, 24);
00075
00076   m_static1.Create(_T("Letters:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
00077     CRect(whereLabel, sizeLabel), this, (UINT)-1);
00078   m_static1.SetFont(m_pFont);
00079   whereLabel.y += height;
00080   m_edit1.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
00081     PES_LETTERS,
00082     CRect(whereEdit, sizeEdit), this, IDC_EDIT1);
00083   m_edit1.SetFont(m_pFont);
00084   whereEdit.y += height;
00085
00086   m_static2.Create(_T("Numbers:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
00087     CRect(whereLabel, sizeLabel), this, (UINT)-1);
00088   m_static2.SetFont(m_pFont);
00089   whereLabel.y += height;
00090   m_edit2.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
00091     PES_NUMBERS,
00092     CRect(whereEdit, sizeEdit), this, IDC_EDIT2);
00093   m_edit2.SetFont(m_pFont);
00094   whereEdit.y += height;
00095
00096   m_static3.Create(_T("Either:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
00097     CRect(whereLabel, sizeLabel), this, (UINT)-1);
00098   m_static3.SetFont(m_pFont);
00099   whereLabel.y += height;
00100   m_edit3.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
00101     PES_LETTERS | PES_NUMBERS,
00102     CRect(whereEdit, sizeEdit), this, IDC_EDIT3);
00103   m_edit3.SetFont(m_pFont);
00104   whereEdit.y += height;
00105
00106   m_static4.Create(_T("Anything:"), WS_VISIBLE | WS_CHILD | SS_LEFT,
00107     CRect(whereLabel, sizeLabel), this, (UINT)-1);
00108   m_static4.SetFont(m_pFont);
00109   whereLabel.y += height;
00110   m_edit4.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
00111     PES_ALL,
00112     CRect(whereEdit, sizeEdit), this, IDC_EDIT4);
00113   m_edit4.SetFont(m_pFont);
00114   whereEdit.y += height;
00115
00116   // change the dialog height so everything fits
00117   int yBottom = whereEdit.y + height * 2; // extra space
00118   CRect rect;
00119   GetWindowRect(rect);
00120   VERIFY(SetWindowPos(NULL, -1, -1, rect.Width(), yBottom,
00121     SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOACTIVATE));
00122
00123   // set focus to first one
00124   m_edit1.SetFocus();
00125   return FALSE;   // focus set
00126 }
00127
00128 void CDerEditDlg::OnOK()
00129 {
00130 #ifdef _DEBUG
00131   // dump results, normally you would do something with these
00132   CString s;
00133   m_edit1.GetWindowText(s);
00134   TRACE(_T("edit1 = '%s'\n"), s);
00135   m_edit2.GetWindowText(s);
00136   TRACE(_T("edit2 = '%s'\n"), s);
00137   m_edit3.GetWindowText(s);
00138   TRACE(_T("edit3 = '%s'\n"), s);
00139   m_edit4.GetWindowText(s);
00140   TRACE(_T("edit4 = '%s'\n"), s);
00141 #endif
00142
00143   EndDialog(IDOK);
00144 }
00145
00146 /////////////////////////////////////////////////////////////////////////////
00147 // Run the test
00148
00149 void CTestWindow::OnTestDerivedEdit()
00150 {
00151   TRACE(_T("running dialog with special derived CParsedEdit controls in it\n"));
00152   CDerEditDlg dlg;
00153   dlg.DoModal();
00154 }
00155
00156
00157 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/docopt.h Source File

  • vc2008fp
  • WordPad

docopt.h

Go to the documentation of this file.
00001 //
00002 // docopt.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CDocOptPage dialog
00016
00017 class CDocOptPage : public CCSPropertyPage
00018 {
00019 // Construction
00020 public:
00021   CDocOptPage();
00022   CDocOptPage(UINT nIDCaption);
00023   ~CDocOptPage();
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CDocOptPage)
00027   enum { IDD = IDD_OPTIONS_WRAP };
00028   int     m_nWordWrap;
00029   BOOL    m_bFormatBar;
00030   BOOL    m_bRulerBar;
00031   BOOL    m_bStatusBar;
00032   BOOL    m_bToolBar;
00033   //}}AFX_DATA
00034
00035
00036 // Overrides
00037   static const DWORD m_nHelpIDs[];
00038   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00039   // ClassWizard generate virtual function overrides
00040   //{{AFX_VIRTUAL(CDocOptPage)
00041   protected:
00042   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046 protected:
00047   // Generated message map functions
00048   //{{AFX_MSG(CDocOptPage)
00049     // NOTE: the ClassWizard will add member functions here
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052
00053 };
00054
00055 class CEmbeddedOptPage : public CDocOptPage
00056 {
00057 // Construction
00058 public:
00059   CEmbeddedOptPage();
00060 // Overrides
00061   BOOL OnInitDialog();
00062 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDriveApp Member List

This is the complete list of members for CDriveApp, including all inherited members.
CDriveApp() | CDriveApp |
InitInstance() | CDriveApp | [virtual]
OnAppAbout() | CDriveApp |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TestContainer98::ITestContainer98 Member List

This is the complete list of members for TestContainer98::ITestContainer98, including all inherited members.
id | TestContainer98::ITestContainer98
Log | TestContainer98::ITestContainer98
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCItem.H Source File

  • ole
  • TstCon

TCItem.H

Go to the documentation of this file.
00001 // CTestContainer98Item.h : interface of the CTestContainer98Item class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #if !defined(AFX_CTESTCONTAINER98ITEM_H__1981850D_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
00012 #define AFX_CTESTCONTAINER98ITEM_H__1981850D_B837_11D0_8DF1_00C04FB68D60__INCLUDED_
00013
00014 #if _MSC_VER >= 1000
00015 #pragma once
00016 #endif // _MSC_VER >= 1000
00017
00018 #define IMPLTYPE_MASK (IMPLTYPEFLAG_FDEFAULT|IMPLTYPEFLAG_FSOURCE|\
00019    IMPLTYPEFLAG_FRESTRICTED)
00020
00021 #define IMPLTYPE_DEFAULTSOURCE (IMPLTYPEFLAG_FDEFAULT|IMPLTYPEFLAG_FSOURCE)
00022 #define IMPLTYPE_DEFAULTINTERFACE (IMPLTYPEFLAG_FDEFAULT)
00023
00024 const int MARGIN_PIXELS = 5;
00025
00026 class CTestContainer98Doc;
00027 class CTestContainer98View;
00028
00029 #include "TCDoc.H"
00030
00031 class CTestContainer98Item : public COleClientItem
00032 {
00033    DECLARE_SERIAL( CTestContainer98Item )
00034
00035 // Constructors
00036 public:
00037    CTestContainer98Item( CTestContainer98Doc* pContainer = NULL );
00038     // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
00039     //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00040     //  zero arguments.  Normally, OLE items are constructed with a
00041     //  non-NULL document pointer.
00042
00043 // Attributes
00044 public:
00045    CTestContainer98Doc* GetDocument()
00046    {
00047     return( (CTestContainer98Doc*)COleClientItem::GetDocument() );
00048    }
00049    CTestContainer98View* GetActiveView()
00050    {
00051     return( GetDocument()->GetView() );
00052    }
00053    CString GetDisplayName();
00054    BOOL IsInsideOut() const;
00055
00056    // ClassWizard generated virtual function overrides
00057    //{{AFX_VIRTUAL(CTestContainer98Item)
00058    public:
00059    virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
00060    virtual void OnActivate();
00061    protected:
00062    virtual void OnGetItemPosition(CRect& rPosition);
00063    virtual void OnGetClipRect(CRect& rPosition);
00064    virtual void OnDeactivateUI(BOOL bUndoable);
00065    virtual BOOL OnChangeItemPosition(const CRect& rectPos);
00066    //}}AFX_VIRTUAL
00067
00068 // Implementation
00069 public:
00070    void CopyToClipboard( CArchive& ar, IStorage* pStorage );
00071    BOOL Create( REFCLSID clsid, LPCTSTR pszName = NULL );
00072    BOOL CreateOrLoad( REFCLSID clsid, LPCTSTR pszName,
00073     REFIID iidPersistanceMedium, IUnknown* pPeristanceMedium );
00074 //   BOOL CreateFromClipboard();
00075    BOOL CreateFromClipboard( CArchive& ar, IStorage* pStorage );
00076 //   BOOL CreateFromData( COleDataObject* pData );
00077    BOOL QuickActivate();
00078    CInterfaceInfo* GetEventInfo();
00079    CInterfaceInfo* GetMethodInfo();
00080    BOOL GetPropertyPageCLSIDs( CArray< CLSID, CLSID& >& aclsidPages );
00081    DWORD HitTest( CPoint point );
00082    void DisplayAsDefault( BOOL tDefault );
00083    BOOL Draw( CDC* pDC, LPCRECT prectBounds, DVASPECT nDrawAspect = DVASPECT(
00084     -1 ) );
00085    BOOL DrawBackToFront( CDC* pDC, LPCRECT prectBounds );
00086    BOOL DrawFrontToBack( CDC* pDC, LPCRECT prectBounds );
00087    void FreezeEvents( BOOL tFreeze );
00088    DWORD GetActivationPolicy() const;
00089    void OnDeselect();
00090    void OnSelect();
00091    BOOL OnWindowlessDragEnter( COleDataObject* pDataObject, DWORD dwKeyState,
00092     CPoint point, DWORD* pdwDropEffect );
00093    void OnWindowlessDragOver( DWORD dwKeyState, CPoint point,
00094     DWORD* pdwDropEffect );
00095    void OnWindowlessDragLeave();
00096    void OnWindowlessDrop( COleDataObject* pDataObject, DWORD dwKeyState,
00097     CPoint point, DWORD* pdwDropEffect );
00098    DWORD OnPointerInactiveMove( CPoint point, DWORD dwKeyState );
00099    DWORD OnPointerInactiveSetCursor( CPoint point, DWORD dwMouseMessage,
00100     BOOL* ptHandled );
00101    void Prepare();
00102    BOOL ActsLikeButton() const;
00103    BOOL ShouldActivateWhenVisible();
00104    void UpdateStatusBar();
00105    BOOL OnWindowMessage( const MSG* pMessage );
00106    BOOL HasUIActiveState() const;
00107    BOOL IsWindowless() const;
00108    BOOL SupportsIPointerInactive() const;
00109    HRESULT SaveToStorage( IStorage* pStorage );
00110    HRESULT SaveToStream( IStream* pStream );
00111    HRESULT SaveToPropertyBag( IPropertyBag* pPropertyBag );
00112    COleDataSource* OnGetClipboardData( BOOL tIncludeLink, LPPOINT pptOffset,
00113     LPSIZE pSize );
00114
00115    BOOL m_tDisplayAsDefault;
00116    BOOL m_tExtendedControl;
00117    BOOL m_tWindowless;
00118    DWORD m_dwAspectPass2;
00119    DISPID m_dispidEvent;
00120    DISPPARAMS m_dpLastParams;
00121    IConnectionPointPtr m_pEventCP;
00122    DWORD m_dwEventCookie;
00123    IConnectionPointPtr m_pPropertyCP;
00124    DWORD m_dwPropertyCookie;
00125    CRect m_rect;
00126    IDispatchPtr m_pCtlDispatch;
00127    ITCExtendedControlPtr m_pExtendedControl;
00128    IOleControlPtr m_pOleControl;
00129    IOleInPlaceObjectWindowlessPtr m_pOleInPlaceObjectWindowless;
00130    IViewObjectExPtr m_pViewObjectEx;
00131    IPointerInactivePtr m_pPointerInactive;
00132    IDropTargetPtr m_pDropTarget;
00133    DWORD m_dwMiscStatus;
00134    DWORD m_dwViewStatus;
00135    CInterfaceInfo m_infoEvents;
00136    CInterfaceInfo m_infoMethods;
00137
00138    IUnknown* GetInterfaceHook( const void* pv );
00139    void InvalidateItem();
00140    void InvokeMethods();
00141    void SetLoggingOptions();
00142    BOOL IsInPlaceActive() const;
00143    BOOL IsInvisibleAtRuntime() const;
00144    BOOL IsUIActive() const;
00145    void Move( const CRect& rect );
00146    void OnAmbientPropertyChange( DISPID dispid );
00147    void OnActivateUI();
00148    void OnDeactivate();
00149    void OnDeactivate( BOOL tNoRedraw );
00150    virtual void OnEvent( DISPID dispid, DISPPARAMS* pdpParams );
00151    void ReadItem( CArchive& ar );
00152    void WriteItem( CArchive& ar );
00153    void CommitItem( BOOL bSuccess );
00154    void UpdateFromServerExtent();
00155    ~CTestContainer98Item();
00156
00157 protected:
00158    CONTROLINFO m_infoControl;
00159    CString m_strDisplayName;
00160    BOOL m_tInsideOut;
00161    CRectTracker m_tracker;
00162    CDC* m_pDC;
00163    IBindHostPtr m_pBindHost;
00164    void CleanupParams();
00165    void CopyParams( DISPPARAMS* pdpParams );
00166    HRESULT GetControlInfo();
00167    BOOL FinishCreate( HRESULT hr );
00168    HRESULT InitControlInfo();
00169    void OnFocus( BOOL tGotFocus );
00170    void Release( OLECLOSE dwCloseOption = OLECLOSE_NOSAVE );
00171    IBindHost* GetBindHost();
00172
00173    BEGIN_INTERFACE_PART( ServiceProvider, IServiceProvider )
00174     STDMETHOD( QueryService )( REFGUID guidService, REFIID iid,
00175      void** ppService );
00176    END_INTERFACE_PART( ServiceProvider )
00177
00178    BEGIN_INTERFACE_PART( EventHandler, IDispatch )
00179     STDMETHOD( GetIDsOfNames )( REFIID iid, LPOLESTR* ppszNames, UINT nNames,
00180      LCID lcid, DISPID* pDispIDs );
00181     STDMETHOD( GetTypeInfo )( UINT iTypeInfo, LCID lcid,
00182      ITypeInfo** ppTypeInfo );
00183     STDMETHOD( GetTypeInfoCount )( UINT* pnInfoCount );
00184     STDMETHOD( Invoke )( DISPID dispidMember, REFIID iid, LCID lcid,
00185      WORD wFlags, DISPPARAMS* pdpParams, VARIANT* pvarResult,
00186      EXCEPINFO* pExceptionInfo, UINT* piArgError );
00187    END_INTERFACE_PART( EventHandler )
00188
00189    BEGIN_INTERFACE_PART( PropertyNotifySink, IPropertyNotifySink )
00190     STDMETHOD( OnChanged )( DISPID dispid );
00191     STDMETHOD( OnRequestEdit )( DISPID dispid );
00192    END_INTERFACE_PART( PropertyNotifySink )
00193
00194    BEGIN_INTERFACE_PART( AmbientProperties, IDispatch )
00195     STDMETHOD( GetIDsOfNames )( REFIID iid, LPOLESTR* ppszNames, UINT nNames,
00196      LCID lcid, DISPID* pDispIDs );
00197     STDMETHOD( GetTypeInfo )( UINT iTypeInfo, LCID lcid,
00198      ITypeInfo** ppTypeInfo );
00199     STDMETHOD( GetTypeInfoCount )( UINT* pnInfoCount );
00200     STDMETHOD( Invoke )( DISPID dispidMember, REFIID iid, LCID lcid,
00201      WORD wFlags, DISPPARAMS* pdpParams, VARIANT* pvarResult,
00202      EXCEPINFO* pExceptionInfo, UINT* piArgError );
00203    END_INTERFACE_PART( AmbientProperties )
00204
00205    BEGIN_INTERFACE_PART( AdviseSinkEx, IAdviseSinkEx )
00206     STDMETHOD_( void, OnClose )();
00207     STDMETHOD_( void, OnDataChange )( FORMATETC* pFormatEtc,
00208      STGMEDIUM* pStgMedium );
00209     STDMETHOD_( void, OnRename )( IMoniker* pMoniker );
00210     STDMETHOD_( void, OnSave )();
00211     STDMETHOD_( void, OnViewChange )( DWORD dwAspect, LONG lindex );
00212     STDMETHOD_( void, OnViewStatusChange )( DWORD dwViewStatus );
00213    END_INTERFACE_PART( AdviseSinkEx )
00214
00215    BEGIN_INTERFACE_PART( OleControlSite, IOleControlSite )
00216     STDMETHOD( GetExtendedControl )( IDispatch** ppExtendedControl );
00217     STDMETHOD( LockInPlaceActive )( BOOL tLock );
00218     STDMETHOD( OnControlInfoChanged )();
00219     STDMETHOD( OnFocus )( BOOL tGotFocus );
00220     STDMETHOD( ShowPropertyFrame )();
00221     STDMETHOD( TransformCoords )( POINTL* pptHiMetric, POINTF* pptContainer,
00222      DWORD dwFlags );
00223     STDMETHOD( TranslateAccelerator )( LPMSG pMessage, DWORD dwModifiers );
00224    END_INTERFACE_PART( OleControlSite )
00225
00226    BEGIN_INTERFACE_PART( OleInPlaceSiteWindowless, IOleInPlaceSiteWindowless )
00227     STDMETHOD( ContextSensitiveHelp )( BOOL tEnterMode );
00228     STDMETHOD( GetWindow )( HWND* phWnd );
00229
00230     STDMETHOD( CanInPlaceActivate )();
00231     STDMETHOD( DeactivateAndUndo )();
00232     STDMETHOD( DiscardUndoState )();
00233     STDMETHOD( GetWindowContext )( IOleInPlaceFrame** ppFrame,
00234      IOleInPlaceUIWindow** ppDoc, LPRECT prectPos, LPRECT prectClip,
00235      LPOLEINPLACEFRAMEINFO pFrameInfo );
00236     STDMETHOD( OnInPlaceActivate )();
00237     STDMETHOD( OnInPlaceDeactivate )();
00238     STDMETHOD( OnPosRectChange )( LPCRECT prectPos );
00239     STDMETHOD( OnUIActivate )();
00240     STDMETHOD( OnUIDeactivate )( BOOL tUndoable );
00241     STDMETHOD( Scroll )( SIZE sizeExtent );
00242
00243     STDMETHOD( OnInPlaceActivateEx )( BOOL* ptNoRedraw, DWORD dwFlags );
00244     STDMETHOD( OnInPlaceDeactivateEx )( BOOL tNoRedraw );
00245     STDMETHOD( RequestUIActivate )();
00246
00247     STDMETHOD( AdjustRect )( LPRECT prect );
00248     STDMETHOD( CanWindowlessActivate )();
00249     STDMETHOD( GetCapture )();
00250     STDMETHOD( GetDC )( LPCRECT prect, DWORD dwFlags, HDC* phDC );
00251     STDMETHOD( GetFocus )();
00252     STDMETHOD( InvalidateRect )( LPCRECT prect, BOOL tErase );
00253     STDMETHOD( InvalidateRgn )( HRGN hRgn, BOOL tErase );
00254     STDMETHOD( OnDefWindowMessage )( UINT nMessage, WPARAM wParam,
00255      LPARAM lParam, LRESULT* plResult );
00256     STDMETHOD( ReleaseDC )( HDC hDC );
00257     STDMETHOD( ScrollRect )( int dx, int dy, LPCRECT prectScroll,
00258      LPCRECT prectClip );
00259     STDMETHOD( SetCapture )( BOOL tCapture );
00260     STDMETHOD( SetFocus )( BOOL tFocus );
00261    END_INTERFACE_PART( OleInPlaceSiteWindowless );
00262
00263    DECLARE_INTERFACE_MAP()
00264
00265 #ifdef _DEBUG
00266    virtual void AssertValid() const;
00267    virtual void Dump(CDumpContext& dc) const;
00268 #endif
00269    virtual void Serialize(CArchive& ar);
00270 };
00271
00272 /////////////////////////////////////////////////////////////////////////////
00273
00274 //{{AFX_INSERT_LOCATION}}
00275 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00276
00277 #endif // !defined(AFX_CTESTCONTAINER98ITEM_H__1981850D_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/MainFrm.h Source File

  • internet
  • HTMLEdit

MainFrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_MAINFRM_H__2BCEEF89_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
00015 #define AFX_MAINFRM_H__2BCEEF89_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_
00016
00017 #if _MSC_VER > 1000
00018 #pragma once
00019 #endif // _MSC_VER > 1000
00020
00021 #include "edittoolbar.h"
00022 #include "SourceView.h" // Added by ClassView
00023 class CSourceView;
00024 class CHTMLEdView;
00025 class CMainFrame : public CFrameWnd
00026 {
00027
00028 protected: // create from serialization only
00029   CMainFrame();
00030   DECLARE_DYNCREATE(CMainFrame)
00031
00032 // Attributes
00033 public:
00034   CComboBox* GetFontNameCombo();
00035   CComboBox* GetFontSizeCombo();
00036   void OnBlockFmtDropdown( NMHDR * pNotifyStruct, LRESULT * result );
00037 // Operations
00038 public:
00039
00040 // Overrides
00041   // ClassWizard generated virtual function overrides
00042   //{{AFX_VIRTUAL(CMainFrame)
00043   public:
00044   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00045   protected:
00046   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00047   //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 public:
00051   CView* GetSourceView();
00052   CView* GetWebView();
00053   void SwapView();
00054   void SwapView(int nCmdId);
00055   virtual ~CMainFrame();
00056   CEditToolbar m_wndEditBar;
00057   BOOL CreateEditBar();
00058   DWORD GetCurrentView();
00059 #ifdef _DEBUG
00060   virtual void AssertValid() const;
00061   virtual void Dump(CDumpContext& dc) const;
00062 #endif
00063
00064 protected:  // control bar embedded members
00065   CStatusBar  m_wndStatusBar;
00066   CToolBar    m_wndToolBar;
00067 // Generated message map functions
00068 protected:
00069   CSourceView *m_pSrcView;
00070
00071   //{{AFX_MSG(CMainFrame)
00072   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00073   afx_msg void OnFontNameChange();
00074   afx_msg void OnFontSizeChange();
00075   afx_msg void OnViewEditingtoolbar();
00076   afx_msg void OnUpdateViewEditingtoolbar(CCmdUI* pCmdUI);
00077   afx_msg void OnViewSource();
00078   afx_msg void OnViewWeb();
00079   afx_msg void OnUpdateViewWeb(CCmdUI* pCmdUI);
00080   afx_msg void OnUpdateViewSource(CCmdUI* pCmdUI);
00081   afx_msg void OnUpdateFontSize(CCmdUI* pCmdUI);
00082   afx_msg void OnUpdateFontName(CCmdUI* pCmdUI);
00083   afx_msg void OnUpdatePane (CCmdUI *pCmdUI);
00084   //}}AFX_MSG
00085   DECLARE_MESSAGE_MAP()
00086 private:
00087 //  CView *m_pWebView;
00088   CHTMLEdView *m_pWebView;
00089   DWORD m_dwCurrentView;
00090 };
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093
00094 //{{AFX_INSERT_LOCATION}}
00095 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00096
00097 #endif // !defined(AFX_MAINFRM_H__2BCEEF89_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paddoc.cpp Source File

  • ole
  • superpad

paddoc.cpp

Go to the documentation of this file.
00001 // paddoc.cpp : implementation of the CPadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "superpad.h"
00015 #include "paddoc.h"
00016 #include "paditem.h"
00017 #include "linkitem.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CPadDoc
00026
00027 IMPLEMENT_DYNCREATE(CPadDoc, COleServerDoc)
00028
00029 BEGIN_MESSAGE_MAP(CPadDoc, COleServerDoc)
00030   //{{AFX_MSG_MAP(CPadDoc)
00031   ON_COMMAND(ID_VIEW_UPDATENOW, OnViewUpdatenow)
00032   ON_COMMAND(ID_CANCEL_INPLACE, OnCancelInplace)
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CPadDoc delegation to CEditView
00038
00039 CPadDoc::CPadDoc()
00040 {
00041 }
00042
00043 CPadDoc::~CPadDoc()
00044 {
00045 }
00046
00047 void CPadDoc::DeleteContents()
00048 {
00049   COleServerDoc::DeleteContents();
00050   if (m_viewList.IsEmpty())
00051     return;
00052   CEditView* pView = (CEditView*)m_viewList.GetHead();
00053   ASSERT_KINDOF(CEditView, pView);
00054   pView->DeleteContents();
00055 }
00056
00057 void CPadDoc::Serialize(CArchive& ar)
00058 {
00059   CEditView* pView = (CEditView*)m_viewList.GetHead();
00060   ASSERT_KINDOF(CEditView, pView);
00061   pView->SerializeRaw(ar);
00062 }
00063
00064 COleServerItem* CPadDoc::OnGetEmbeddedItem()
00065 {
00066   CEmbeddedItem* pItem = new CEmbeddedItem(this);
00067   ASSERT_VALID(pItem);
00068   return pItem;
00069 }
00070
00071 COleServerItem* CPadDoc::OnGetLinkedItem(LPCTSTR lpszItemName)
00072 {
00073   CPadLinkItem *pItem =
00074     (CPadLinkItem*)COleServerDoc::OnGetLinkedItem(lpszItemName);
00075   if (pItem == NULL)
00076     pItem = new CPadLinkItem(this, lpszItemName);
00077
00078   ASSERT_VALID(pItem);
00079   return pItem;
00080 }
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083
00084 void CPadDoc::OnViewUpdatenow()
00085 {
00086   UpdateAllItems(NULL);
00087 }
00088
00089 // Note: both the server and the container should have a keyboard method
00090 //  of deactivating an active in-place item.
00091
00092 void CPadDoc::OnCancelInplace()
00093 {
00094   if (IsInPlaceActive())
00095     OnDeactivateUI(FALSE);
00096 }
00097
00098 void CPadDoc::SetSelection(int nBeg, int nEnd)
00099 {
00100   CEditView* pView = (CEditView*)m_viewList.GetHead();
00101   ASSERT_KINDOF(CEditView, pView);
00102   pView->GetEditCtrl().SetSel(nBeg, nEnd);
00103 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/dlgtemp.h Source File

  • general
  • dlgtempl

dlgtemp.h

Go to the documentation of this file.
00001 // dlgtemp.h : main header file for the DLGTEMP application
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDlgtempApp:
00021 // See dlgtemp.cpp for the implementation of this class
00022 //
00023
00024 class CDlgtempApp : public CWinApp
00025 {
00026 public:
00027   CDlgtempApp();
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CDlgtempApp)
00032   public:
00033   virtual BOOL InitInstance();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037
00038   //{{AFX_MSG(CDlgtempApp)
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3.cpp Source File

  • controls
  • cmnctrl

CmnCtrl3.cpp

Go to the documentation of this file.
00001 // CmnCtrl3.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 #include "stdafx.h"
00005
00006 #include "CmnCtrl3.h"
00007 #include "AllControlsSheet.h"
00008
00009 #ifdef _DEBUG
00010 #define new DEBUG_NEW
00011 #endif
00012
00013 // CCmnCtrl3App
00014
00015 BEGIN_MESSAGE_MAP(CCmnCtrl3App, CWinApp)
00016   ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
00017 END_MESSAGE_MAP()
00018
00019 // CCmnCtrl3App construction
00020 CCmnCtrl3App::CCmnCtrl3App()
00021 {
00022   // TODO: add construction code here,
00023   // Place all significant initialization in InitInstance
00024 }
00025
00026 // The one and only CCmnCtrl3App object
00027 CCmnCtrl3App theApp;
00028
00029 // CCmnCtrl3App initialization
00030 BOOL CCmnCtrl3App::InitInstance()
00031 {
00032   AfxEnableControlContainer();
00033
00034   // Standard initialization
00035
00036   CAllControlsSheet   allcontrolssheet(_T("Common Controls Sample"));
00037   m_pMainWnd = &allcontrolssheet;
00038   allcontrolssheet.DoModal();
00039   return FALSE;
00040 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabControlDoc Member List

This is the complete list of members for CTabControlDoc, including all inherited members.
CTabControlDoc() | CTabControlDoc | [protected]
OnNewDocument() | CTabControlDoc | [virtual]
Serialize(CArchive &ar) | CTabControlDoc | [virtual]
~CTabControlDoc() | CTabControlDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/strcoll.cpp Source File

  • ole
  • inproc

strcoll.cpp

Go to the documentation of this file.
00001 // strcoll.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "inproc.h"
00014 #include "strcoll.h"
00015 #include "enumvar.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CStringCollect
00024
00025 IMPLEMENT_DYNCREATE(CStringCollect, CCmdTarget)
00026
00027 CStringCollect::CStringCollect()
00028 {
00029   EnableAutomation();
00030
00031   // To keep the application running as long as an OLE automation
00032   //  object is active, the constructor calls AfxOleLockApp.
00033
00034   AfxOleLockApp();
00035 }
00036
00037 CStringCollect::~CStringCollect()
00038 {
00039   // To terminate the application when all objects created with
00040   //  with OLE automation, the destructor calls AfxOleUnlockApp.
00041
00042   AfxOleUnlockApp();
00043 }
00044
00045 void CStringCollect::OnFinalRelease()
00046 {
00047   // When the last reference for an automation object is released
00048   //  OnFinalRelease is called.  This implementation deletes the
00049   //  object.  Add additional cleanup required for your object before
00050   //  deleting it from memory.
00051
00052   delete this;
00053 }
00054
00055 BEGIN_MESSAGE_MAP(CStringCollect, CCmdTarget)
00056   //{{AFX_MSG_MAP(CStringCollect)
00057     // NOTE - the ClassWizard will add and remove mapping macros here.
00058   //}}AFX_MSG_MAP
00059 END_MESSAGE_MAP()
00060
00061 // {BA0357C0-C377-11cd-9A90-00DD01113F12}
00062 IMPLEMENT_OLECREATE(CStringCollect, "mfc.inproc.strcoll",
00063   0xba0357c0, 0xc377, 0x11cd, 0x9a, 0x90, 0x0, 0xdd, 0x1, 0x11, 0x3f, 0x12);
00064
00065 BEGIN_DISPATCH_MAP(CStringCollect, CCmdTarget)
00066   //{{AFX_DISPATCH_MAP(CStringCollect)
00067   DISP_PROPERTY_EX(CStringCollect, "Count", GetCount, SetNotSupported, VT_I4)
00068   DISP_FUNCTION(CStringCollect, "Add", Add, VT_I4, VTS_BSTR)
00069   DISP_FUNCTION(CStringCollect, "Find", Find, VT_I4, VTS_BSTR)
00070   DISP_FUNCTION(CStringCollect, "Remove", Remove, VT_I4, VTS_VARIANT)
00071   DISP_FUNCTION(CStringCollect, "RemoveAll", RemoveAll, VT_EMPTY, VTS_NONE)
00072   DISP_PROPERTY_PARAM(CStringCollect, "Item", GetItem, SetItem, VT_BSTR, VTS_I4)
00073   //}}AFX_DISPATCH_MAP
00074   DISP_PROPERTY_EX_ID(CStringCollect, "_NewEnum", DISPID_NEWENUM, GetNewEnum, SetNotSupported, VT_UNKNOWN)
00075   DISP_DEFVALUE(CStringCollect, "Item")
00076 END_DISPATCH_MAP()
00077
00078 // {0F098950-F9F0-11cd-8C3D-00AA004BB3B7}
00079 static const IID IID_IStringCollect = { 0xf098950, 0xf9f0, 0x11cd,
00080   { 0x8c, 0x3d, 0x0, 0xaa, 0x0, 0x4b, 0xb3, 0xb7 } };
00081
00082 // Note: we add support for IID_IStringCollect to support typesafe binding
00083 // from VBA.  This IID must match the GUID that is attached to the
00084 // dispinterface in the .ODL file.
00085
00086 BEGIN_INTERFACE_MAP(CStringCollect, CCmdTarget)
00087   INTERFACE_PART(CStringCollect, IID_IStringCollect, Dispatch)
00088 END_INTERFACE_MAP()
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CStringCollect message handlers
00092
00093 void CStringCollect::CheckIndex(long nIndex)
00094 {
00095   if (nIndex <= 0 || nIndex > m_strArray.GetSize())
00096     AfxThrowOleException(E_INVALIDARG);
00097 }
00098
00099 LPUNKNOWN CStringCollect::GetNewEnum()
00100 {
00101   #pragma warning (suppress: 6211)
00102   CEnumVariant* pEnum = new CEnumVariant;
00103   int nCount = (int)m_strArray.GetSize();
00104   #pragma warning (suppress: 6211)
00105   VARIANT* pContents = new VARIANT[nCount];
00106   int i;
00107
00108   TRY
00109   {
00110     for (i = 0; i < nCount; ++i)
00111     {
00112       VariantInit(&pContents[i]);
00113       pContents[i].bstrVal = m_strArray.ElementAt(i).AllocSysString();
00114       pContents[i].vt = VT_BSTR;
00115     }
00116   }
00117   CATCH_ALL(e)
00118   {
00119     while (--i >= 0)
00120       VariantClear(&pContents[i]);
00121     delete [] pContents;
00122     THROW_LAST();
00123   }
00124   END_CATCH_ALL
00125   pEnum->SetContents(pContents, nCount);
00126
00127   return pEnum->GetInterface(&IID_IUnknown);
00128 }
00129
00130 long CStringCollect::GetCount()
00131 {
00132   return (long)m_strArray.GetSize();
00133 }
00134
00135 BSTR CStringCollect::GetItem(long nIndex)
00136 {
00137   CheckIndex(nIndex);
00138   return m_strArray.ElementAt((int)nIndex-1).AllocSysString();
00139 }
00140
00141 void CStringCollect::SetItem(long nIndex, LPCTSTR lpszNewValue)
00142 {
00143   CheckIndex(nIndex);
00144   m_strArray.ElementAt((int)nIndex-1) = lpszNewValue;
00145 }
00146
00147 long CStringCollect::Add(LPCTSTR newValue)
00148 {
00149   m_strArray.Add(newValue);
00150   return (long)m_strArray.GetSize();
00151 }
00152
00153 long CStringCollect::Find(LPCTSTR findValue)
00154 {
00155   int nCount = (int)m_strArray.GetSize();
00156   for (int i = 0; i < nCount; ++i)
00157   {
00158     if (m_strArray.ElementAt(i) == findValue)
00159       return i+1;
00160   }
00161   return -1;
00162 }
00163
00164 long CStringCollect::Remove(const VARIANT FAR& removeValue)
00165 {
00166   int nIndex = -1;
00167
00168   VARIANT varTemp;
00169   VariantInit(&varTemp);
00170   const VARIANT* pvar = &removeValue;
00171   if (removeValue.vt != VT_BSTR)
00172   {
00173     if (VariantChangeType(&varTemp, (VARIANT*)&removeValue, 0, VT_I4) == NOERROR)
00174       pvar = &varTemp;
00175     else if (VariantChangeType(&varTemp, (VARIANT*)&removeValue, 0, VT_BSTR) == NOERROR)
00176       pvar = &varTemp;
00177     else
00178       AfxThrowOleException(DISP_E_TYPEMISMATCH);
00179   }
00180   if (pvar->vt == VT_BSTR)
00181     nIndex = (int)Find(CString(pvar->bstrVal));
00182   else if (pvar->vt == VT_I4)
00183     nIndex = (int)pvar->lVal;
00184   VariantClear(&varTemp);
00185
00186   CheckIndex(nIndex);
00187
00188   m_strArray.RemoveAt(nIndex);
00189   return (long)m_strArray.GetSize();
00190 }
00191
00192 void CStringCollect::RemoveAll()
00193 {
00194   m_strArray.RemoveAll();
00195 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesDoc.h Source File

  • vc2008fp
  • CustomPages

CustomPagesDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CCustomPagesDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CCustomPagesDoc();
00017   DECLARE_DYNCREATE(CCustomPagesDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CCustomPagesDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/StartView.h Source File

  • vc2008fp
  • VisualStudioDemo

StartView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CStartView view
00014
00015 class CStartView : public CView
00016 {
00017 protected:
00018   CStartView();           // protected constructor used by dynamic creation
00019   DECLARE_DYNCREATE(CStartView)
00020
00021 // Attributes
00022 public:
00023   CMFCToolBarImages m_Image;
00024
00025 // Overrides
00026 public:
00027   virtual void OnInitialUpdate();
00028
00029 protected:
00030   virtual void OnDraw(CDC* pDC);
00031
00032 // Implementation
00033 protected:
00034   virtual ~CStartView();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00041   afx_msg void OnDisableUpdate(CCmdUI* pCmdUI);
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CClassToolBar Member List

This is the complete list of members for CClassToolBar, including all inherited members.
AllowShowOnList() const | CClassToolBar | [inline, private, virtual]
OnUpdateCmdUI(CFrameWnd *, BOOL bDisableIfNoHndler) | CClassToolBar | [inline, private, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.cpp Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBarView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "WorkSpaceToolBar.h"
00013
00014 #include "WorkSpaceToolBarDoc.h"
00015 #include "WorkSpaceToolBarView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CWorkSpaceToolBarView
00025
00026 IMPLEMENT_DYNCREATE(CWorkSpaceToolBarView, CView)
00027
00028 BEGIN_MESSAGE_MAP(CWorkSpaceToolBarView, CView)
00029   ON_WM_CONTEXTMENU()
00030   // Standard printing commands
00031   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00032   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00033   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CWorkSpaceToolBarView construction/destruction
00038
00039 CWorkSpaceToolBarView::CWorkSpaceToolBarView()
00040 {
00041   // TODO: add construction code here
00042
00043 }
00044
00045 CWorkSpaceToolBarView::~CWorkSpaceToolBarView()
00046 {
00047 }
00048
00049 BOOL CWorkSpaceToolBarView::PreCreateWindow(CREATESTRUCT& cs)
00050 {
00051   // TODO: Modify the Window class or styles here by modifying
00052   //  the CREATESTRUCT cs
00053
00054   return CView::PreCreateWindow(cs);
00055 }
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CWorkSpaceToolBarView drawing
00059
00060 void CWorkSpaceToolBarView::OnDraw(CDC* /*pDC*/)
00061 {
00062   //CWorkSpaceToolBarDoc* pDoc = GetDocument();
00063   //ASSERT_VALID(pDoc);
00064   // TODO: add draw code for native data here
00065 }
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CWorkSpaceToolBarView printing
00069
00070 void CWorkSpaceToolBarView::OnFilePrintPreview()
00071 {
00072   AFXPrintPreview (this);
00073 }
00074
00075 BOOL CWorkSpaceToolBarView::OnPreparePrinting(CPrintInfo* pInfo)
00076 {
00077   // default preparation
00078   return DoPreparePrinting(pInfo);
00079 }
00080
00081 void CWorkSpaceToolBarView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00082 {
00083   // TODO: add extra initialization before printing
00084 }
00085
00086 void CWorkSpaceToolBarView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00087 {
00088   // TODO: add cleanup after printing
00089 }
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // CWorkSpaceToolBarView diagnostics
00093
00094 #ifdef _DEBUG
00095 void CWorkSpaceToolBarView::AssertValid() const
00096 {
00097   CView::AssertValid();
00098 }
00099
00100 void CWorkSpaceToolBarView::Dump(CDumpContext& dc) const
00101 {
00102   CView::Dump(dc);
00103 }
00104
00105 CWorkSpaceToolBarDoc* CWorkSpaceToolBarView::GetDocument() // non-debug version is inline
00106 {
00107   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWorkSpaceToolBarDoc)));
00108   return (CWorkSpaceToolBarDoc*)m_pDocument;
00109 }
00110 #endif //_DEBUG
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CWorkSpaceToolBarView message handlers
00114
00115 void CWorkSpaceToolBarView::OnContextMenu(CWnd*, CPoint point)
00116 {
00117   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00118 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikdoc.cpp Source File

  • ole
  • autoclik

aclikdoc.cpp

Go to the documentation of this file.
00001 // AClikDoc.cpp : implementation of the CAutoClickDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "AClikDoc.h"
00016 #include "Dialogs.h"
00017 #include "ClikPnt.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CAutoClickDoc
00027
00028 IMPLEMENT_DYNCREATE(CAutoClickDoc, CDocument)
00029
00030 BEGIN_MESSAGE_MAP(CAutoClickDoc, CDocument)
00031   //{{AFX_MSG_MAP(CAutoClickDoc)
00032   ON_COMMAND(ID_EDIT_CHANGETEXT, OnEditChangetext)
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 BEGIN_DISPATCH_MAP(CAutoClickDoc, CDocument)
00037   //{{AFX_DISPATCH_MAP(CAutoClickDoc)
00038   DISP_PROPERTY(CAutoClickDoc, "text", m_str, VT_BSTR)
00039   DISP_PROPERTY_EX(CAutoClickDoc, "x", GetX, SetX, VT_I2)
00040   DISP_PROPERTY_EX(CAutoClickDoc, "y", GetY, SetY, VT_I2)
00041   DISP_PROPERTY_EX(CAutoClickDoc, "Position", GetPosition, SetPosition, VT_DISPATCH)
00042   DISP_FUNCTION(CAutoClickDoc, "RefreshWindow", Refresh, VT_EMPTY, VTS_NONE)
00043   DISP_FUNCTION(CAutoClickDoc, "SetAllProps", SetAllProps, VT_EMPTY, VTS_I2 VTS_I2 VTS_BSTR)
00044   DISP_FUNCTION(CAutoClickDoc, "ShowWindow", ShowWindow, VT_EMPTY, VTS_NONE)
00045   //}}AFX_DISPATCH_MAP
00046 END_DISPATCH_MAP()
00047
00048 // Note: we add support for IID_IAClick to support typesafe binding
00049 //  from VBA.  This IID must match the GUID that is attached to the
00050 //  dispinterface in the .ODL file.
00051
00052 // {47D53E05-CC33-11CE-8F35-00DD01109044}
00053 static const IID IID_IAClick =
00054 { 0xfc866850, 0x9F96, 0x11ce, { 0xb0, 0xf2, 0x00, 0xaa, 0x00, 0x6c, 0x28, 0xb3 } };
00055
00056 BEGIN_INTERFACE_MAP(CAutoClickDoc, CDocument)
00057   INTERFACE_PART(CAutoClickDoc, IID_IAClick, Dispatch)
00058 END_INTERFACE_MAP()
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CAutoClickDoc construction/destruction
00062
00063 CAutoClickDoc::CAutoClickDoc()
00064 {
00065   EnableAutomation();
00066   m_pt = CPoint(10, 10);
00067   m_str = _T("Automation!");
00068
00069   AfxOleLockApp();
00070 }
00071
00072 CAutoClickDoc::~CAutoClickDoc()
00073 {
00074   AfxOleUnlockApp();
00075 }
00076
00077 BOOL CAutoClickDoc::OnNewDocument()
00078 {
00079   if (!CDocument::OnNewDocument())
00080     return FALSE;
00081
00082   // TODO: add reinitialization code here
00083   // (SDI documents will reuse this document)
00084
00085   return TRUE;
00086 }
00087
00088 void CAutoClickDoc::Refresh()
00089 {
00090   UpdateAllViews(NULL);
00091   SetModifiedFlag();
00092 }
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // CAutoClickDoc serialization
00096
00097 void CAutoClickDoc::Serialize(CArchive& ar)
00098 {
00099   if (ar.IsStoring())
00100   {
00101     ar << m_pt << m_str;
00102   }
00103   else
00104   {
00105     ar >> m_pt >> m_str;
00106   }
00107 }
00108
00109 /////////////////////////////////////////////////////////////////////////////
00110 // CAutoClickDoc diagnostics
00111
00112 #ifdef _DEBUG
00113 void CAutoClickDoc::AssertValid() const
00114 {
00115   CDocument::AssertValid();
00116 }
00117
00118 void CAutoClickDoc::Dump(CDumpContext& dc) const
00119 {
00120   CDocument::Dump(dc);
00121 }
00122 #endif //_DEBUG
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // CAutoClickDoc commands
00126
00127 void CAutoClickDoc::OnEditChangetext()
00128 {
00129   CChangeText dlg;
00130   dlg.m_str = m_str;
00131   if (dlg.DoModal())
00132   {
00133     m_str = dlg.m_str;
00134     Refresh();
00135   }
00136 }
00137
00138 short CAutoClickDoc::GetX()
00139 {
00140   return (short)m_pt.x;
00141 }
00142
00143 void CAutoClickDoc::SetX(short nNewValue)
00144 {
00145   m_pt.x = nNewValue;
00146   Refresh();
00147 }
00148
00149 short CAutoClickDoc::GetY()
00150 {
00151   return (short)m_pt.y;
00152 }
00153
00154 void CAutoClickDoc::SetY(short nNewValue)
00155 {
00156   m_pt.y = nNewValue;
00157   Refresh();
00158 }
00159
00160 void CAutoClickDoc::SetAllProps(short x, short y, LPCTSTR text)
00161 {
00162   m_pt.x = x;
00163   m_pt.y = y;
00164   m_str = text;
00165   Refresh();
00166 }
00167
00168 void CAutoClickDoc::ShowWindow()
00169 {
00170   POSITION pos = GetFirstViewPosition();
00171   CView* pView = GetNextView(pos);
00172   if (pView != NULL)
00173   {
00174     CFrameWnd* pFrameWnd = pView->GetParentFrame();
00175     pFrameWnd->ActivateFrame(SW_SHOW);
00176     pFrameWnd = pFrameWnd->GetParentFrame();
00177     if (pFrameWnd != NULL)
00178       pFrameWnd->ActivateFrame(SW_SHOW);
00179   }
00180 }
00181
00182
00183
00184 LPDISPATCH CAutoClickDoc::GetPosition()
00185 {
00186    #pragma warning (suppress: 6014)
00187   CAutoClickPoint* pPos = new CAutoClickPoint;
00188   pPos->SetClickPoint(m_pt);
00189
00190   LPDISPATCH lpResult = pPos->GetIDispatch(FALSE);
00191   return lpResult;
00192 }
00193
00194 void CAutoClickDoc::SetPosition(LPDISPATCH newValue)
00195 {
00196   CAutoClickPoint* pPos = (CAutoClickPoint*)CCmdTarget::FromIDispatch(newValue);
00197   if (pPos != NULL && pPos->IsKindOf(RUNTIME_CLASS(CAutoClickPoint)))
00198   {
00199     m_pt = pPos->GetClickPoint();
00200     Refresh();
00201   }
00202 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSOffice2007DemoDoc Member List

This is the complete list of members for CMSOffice2007DemoDoc, including all inherited members.
CMSOffice2007DemoDoc() | CMSOffice2007DemoDoc | [protected]
CreateClientItem(REOBJECT *preo) const | CMSOffice2007DemoDoc | [virtual]
OnClose() | CMSOffice2007DemoDoc | [protected]
OnNewDocument() | CMSOffice2007DemoDoc | [virtual]
Serialize(CArchive &ar) | CMSOffice2007DemoDoc | [virtual]
SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU=TRUE) | CMSOffice2007DemoDoc | [virtual]
~CMSOffice2007DemoDoc() | CMSOffice2007DemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWordPadCommandLineInfo Member List

This is the complete list of members for CWordPadCommandLineInfo, including all inherited members.
CWordPadCommandLineInfo() | CWordPadCommandLineInfo | [inline]
CWordPadCommandLineInfo() | CWordPadCommandLineInfo | [inline]
m_bForceTextMode | CWordPadCommandLineInfo |
ParseParam(const char *pszParam, BOOL bFlag, BOOL bLast) | CWordPadCommandLineInfo | [virtual]
ParseParam(const char *pszParam, BOOL bFlag, BOOL bLast) | CWordPadCommandLineInfo | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/hello.cpp Source File

  • advanced
  • mtmdi

hello.cpp

Go to the documentation of this file.
00001 // hello.cpp : Defines the class behaviors for the Hello child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "hello.h"
00015 #include "mdi.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CHelloWnd Member Functions
00019
00020 BEGIN_MESSAGE_MAP(CHelloWnd, CMDIChildWnd)
00021   //{{AFX_MSG_MAP(CHelloWnd)
00022   ON_WM_PAINT()
00023   ON_COMMAND(IDM_BLACK, OnColor)
00024   ON_COMMAND(IDM_CUSTOM, OnCustomColor)
00025   ON_COMMAND(IDM_RED, OnColor)
00026   ON_COMMAND(IDM_GREEN, OnColor)
00027   ON_COMMAND(IDM_BLUE, OnColor)
00028   ON_COMMAND(IDM_WHITE, OnColor)
00029   ON_UPDATE_COMMAND_UI(IDM_BLACK, OnUpdateColor)
00030   ON_UPDATE_COMMAND_UI(IDM_BLUE, OnUpdateColor)
00031   ON_UPDATE_COMMAND_UI(IDM_GREEN, OnUpdateColor)
00032   ON_UPDATE_COMMAND_UI(IDM_RED, OnUpdateColor)
00033   ON_UPDATE_COMMAND_UI(IDM_WHITE, OnUpdateColor)
00034   ON_UPDATE_COMMAND_UI(IDM_CUSTOM, OnUpdateColor)
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 CMenu NEAR CHelloWnd::menu;     // menu for all HELLO windows
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CHelloWnd construction
00042
00043 BOOL CHelloWnd::Create(LPCTSTR szTitle, LONG style /* = 0 */,
00044   const RECT& rect /* = rectDefault */,
00045   CMDIFrameWnd* parent /* = NULL */)
00046 {
00047   // Setup the shared menu
00048   if (menu.m_hMenu == NULL)
00049     menu.LoadMenu(IDR_HELLO);
00050   m_hMenuShared = menu.m_hMenu;
00051
00052   // Register a custom WndClass and create a window.
00053   // This must be done because CHelloWnd has a custom icon.
00054
00055   LPCTSTR lpszHelloClass =
00056       AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
00057       LoadCursor(NULL, IDC_ARROW),
00058       (HBRUSH) (COLOR_WINDOW+1),
00059       LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_HELLO)));
00060
00061   return CMDIChildWnd::Create(lpszHelloClass, szTitle, style, rect, parent);
00062 }
00063
00064 CHelloWnd::CHelloWnd()
00065 {
00066   m_nIDColor = IDM_BLACK;
00067   m_clrText = RGB(0, 0, 0);
00068 }
00069
00070 // OnPaint:
00071 // Draw a string in the center of the client area.
00072 //
00073 void CHelloWnd::OnPaint()
00074 {
00075   CPaintDC dc(this);
00076   CRect rect;
00077
00078   dc.SetTextColor(m_clrText);
00079   dc.SetBkColor(::GetSysColor(COLOR_WINDOW));
00080   GetClientRect(rect);
00081   dc.DrawText(_T("Hello, World!"), -1, rect,
00082     DT_SINGLELINE | DT_CENTER | DT_VCENTER);
00083 }
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CHelloWnd command
00087
00088 void CHelloWnd::OnUpdateColor(CCmdUI* pCmdUI)
00089 {
00090   pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
00091 }
00092
00093 void CHelloWnd::OnColor()
00094 {
00095   m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
00096   m_clrText = colorArray[m_nIDColor - IDM_BLACK];
00097
00098   // Force the client area text to be repainted in the new color
00099   Invalidate();
00100 }
00101
00102 void CHelloWnd::OnCustomColor()
00103 {
00104   CColorDialog dlgColor(m_clrText);
00105   if (dlgColor.DoModal() == IDOK)
00106   {
00107     m_clrText = dlgColor.GetColor();
00108     m_nIDColor = IDM_CUSTOM;
00109     Invalidate();
00110   }
00111 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdrivw.h Source File

  • ole
  • ipdrive

ipdrivw.h

Go to the documentation of this file.
00001 // ipdrivw.h : interface of the CDriverView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CDriverView : public CFormView
00013 {
00014 protected: // create from serialization only
00015   CDriverView();
00016   DECLARE_DYNCREATE(CDriverView)
00017
00018 public:
00019   //{{AFX_DATA(CDriverView)
00020   enum { IDD = IDD_IPDRIVE_FORM };
00021   CEdit   m_toValue;
00022   CComboBox   m_toType;
00023   CEdit   m_ctrlValue;
00024   CComboBox   m_ctrlType;
00025   //}}AFX_DATA
00026
00027 // Attributes
00028 public:
00029   CDriverDoc* GetDocument();
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CDriverView)
00037   public:
00038   virtual void OnInitialUpdate();
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 public:
00045   virtual ~CDriverView();
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050
00051 protected:
00052   // formatting strings for the dialog
00053   CString m_strCurrentCount;
00054   CString m_strLastType;
00055   CString m_strLastValue;
00056   BOOL m_bInitialized;
00057
00058   VARIANT GetFromVariant();
00059   VARIANT GetToVariant();
00060
00061   void UpdateCurrentCount();
00062   void UpdateToNothing();
00063   void UpdateCurrentVariant(VARIANT& va);
00064
00065 // Generated message map functions
00066 protected:
00067   //{{AFX_MSG(CDriverView)
00068   afx_msg void OnLookup();
00069   afx_msg void OnRemove();
00070   afx_msg void OnAdd();
00071   afx_msg void OnButton1();
00072   afx_msg void OnButton2();
00073   //}}AFX_MSG
00074   DECLARE_MESSAGE_MAP()
00075 };
00076
00077 #ifndef _DEBUG  // debug version in ipdrivw.cpp
00078 inline CDriverDoc* CDriverView::GetDocument()
00079    { return (CDriverDoc*)m_pDocument; }
00080 #endif
00081
00082 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/ptarryvw.h Source File

  • advanced
  • collect

ptarryvw.h

Go to the documentation of this file.
00001 // ptarryvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPointArrayView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CPointArrayView : public CFormView
00020 {
00021 public:
00022   CPointArrayView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CPointArrayView)
00024
00025 // Attributes
00026 public:
00027   CCollectDoc* GetDocument();
00028
00029 // Overrides
00030 public:
00031   void OnInitialUpdate();
00032
00033 // Form Data
00034 public:
00035   //{{AFX_DATA(CPointArrayView)
00036   enum { IDD = IDD_POINT_ARRAY };
00037   CListBox    m_ctlList;
00038   int     m_x;
00039   int     m_y;
00040   //}}AFX_DATA
00041
00042 // Implementation
00043 protected:
00044   void AddPointToListBox(CPoint pt, int nSel = -1);
00045
00046 // Overrides
00047   // ClassWizard generate virtual function overrides
00048   //{{AFX_VIRTUAL(CPointArrayView)
00049   protected:
00050   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00051   //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 protected:
00055   virtual ~CPointArrayView();
00056 #ifdef _DEBUG
00057   virtual void AssertValid() const;
00058   virtual void Dump(CDumpContext& dc) const;
00059 #endif
00060
00061   // Generated message map functions
00062   //{{AFX_MSG(CPointArrayView)
00063   afx_msg void OnAdd();
00064   afx_msg void OnUpdateButton();
00065   afx_msg void OnRemove();
00066   afx_msg void OnRemoveAll();
00067   afx_msg void OnSelChangeList();
00068   //}}AFX_MSG
00069   DECLARE_MESSAGE_MAP()
00070 };
00071
00072 #ifndef _DEBUG
00073 inline CCollectDoc* CPointArrayView::GetDocument()
00074    { return (CCollectDoc*)m_pDocument; }
00075 #endif
00076
00077 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSplitButtonCtrlPage Member List

This is the complete list of members for CSplitButtonCtrlPage, including all inherited members.
CSplitButtonCtrlPage() | CSplitButtonCtrlPage |
DoDataExchange(CDataExchange *pDX) | CSplitButtonCtrlPage | [protected, virtual]
IDD enum value | CSplitButtonCtrlPage |
m_checkState | CSplitButtonCtrlPage | [private]
m_image | CSplitButtonCtrlPage | [private]
m_listSplitStyle | CSplitButtonCtrlPage | [private]
m_splitButton | CSplitButtonCtrlPage | [private]
m_xSize | CSplitButtonCtrlPage | [private]
m_ySize | CSplitButtonCtrlPage | [private]
OnBnClickedCheckState() | CSplitButtonCtrlPage |
OnBnClickedSetMenu1() | CSplitButtonCtrlPage |
OnBnClickedSetMenu2() | CSplitButtonCtrlPage |
OnBnClickedSetSize() | CSplitButtonCtrlPage |
OnBnClickedSplitButton() | CSplitButtonCtrlPage |
OnInitDialog() | CSplitButtonCtrlPage | [virtual]
OnLbnSelchangeListStyle() | CSplitButtonCtrlPage |
~CSplitButtonCtrlPage() | CSplitButtonCtrlPage | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/targetver.h Source File

  • vc2008fp
  • RebarTest

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/TaskPane.h Source File

  • vc2008fp
  • MSOffice2007Demo

TaskPane.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CTaskPane : public CMFCTasksPane
00015 {
00016 // Construction
00017 public:
00018   CTaskPane();
00019
00020   // Implementation
00021 public:
00022   virtual ~CTaskPane();
00023
00024   // Generated message map functions
00025 protected:
00026   //{{AFX_MSG(CTaskPane)
00027   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00028   //}}AFX_MSG
00029
00030   DECLARE_MESSAGE_MAP()
00031 };
00032
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncFrm.cpp Source File

  • general
  • mdidocvw

BncFrm.cpp

Go to the documentation of this file.
00001 // BncFrm.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "MDI.h"
00015 #include "BncFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CBounceFrame
00025
00026 IMPLEMENT_DYNCREATE(CBounceFrame, CMDIChildWnd)
00027
00028 CBounceFrame::CBounceFrame()
00029 {
00030 }
00031
00032 CBounceFrame::~CBounceFrame()
00033 {
00034 }
00035
00036
00037 BEGIN_MESSAGE_MAP(CBounceFrame, CMDIChildWnd)
00038   //{{AFX_MSG_MAP(CBounceFrame)
00039     // NOTE - the ClassWizard will add and remove mapping macros here.
00040   //}}AFX_MSG_MAP
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CBounceFrame message handlers
00045 BOOL CBounceFrame::PreCreateWindow(CREATESTRUCT& cs)
00046 {
00047   return CMDIChildWnd::PreCreateWindow(cs);
00048 }
00049
00050 BOOL CBounceFrame::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CMDIFrameWnd* pParentWnd, CCreateContext* pContext)
00051 {
00052   return CMDIChildWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, pContext);
00053 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTableButton.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

RibbonTableButton.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "RibbonTableButton.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[]=__FILE__;
00019 #define new DEBUG_NEW
00020 #endif
00021
00022 #define CELLS_X 10
00023 #define CELLS_Y 8
00024
00025 IMPLEMENT_DYNCREATE(CRibbonTableButton, CMFCRibbonGallery)
00026
00027 int CRibbonTableButton::m_nRows = 0;
00028 int CRibbonTableButton::m_nColumns = 0;
00029
00030 LPCTSTR lpszDefaultCaption = _T("Insert Table");
00031
00032 //////////////////////////////////////////////////////////////////////
00033 // Construction/Destruction
00034 //////////////////////////////////////////////////////////////////////
00035
00036 CRibbonTableButton::CRibbonTableButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex) :
00037   CMFCRibbonGallery(nID, lpszText, nSmallImageIndex, nLargeImageIndex, CSize(18, 18), 0, FALSE)
00038 {
00039   AddGroup(lpszDefaultCaption, CELLS_X * CELLS_Y);
00040   SetIconsInRow(CELLS_X);
00041 }
00042
00043 CRibbonTableButton::~CRibbonTableButton()
00044 {
00045 }
00046
00047 void CRibbonTableButton::OnDrawPaletteIcon(CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* /*pIcon*/, COLORREF /*clrText*/)
00048 {
00049   ASSERT_VALID(this);
00050   ASSERT_VALID(pDC);
00051
00052   rectIcon.DeflateRect(2, 2);
00053
00054   COLORREF color = afxGlobalData.clrWindowText;
00055
00056   if (nIconIndex / CELLS_X + 1 <= m_nRows && (nIconIndex % CELLS_X) + 1 <= m_nColumns)
00057   {
00058     COLORREF clrInner = RGB(255, 226, 148);
00059
00060     pDC->Draw3dRect(rectIcon, clrInner, clrInner);
00061
00062     color = RGB(239, 72, 16);
00063     rectIcon.InflateRect(1, 1);
00064   }
00065
00066   pDC->Draw3dRect(rectIcon, color, color);
00067 }
00068
00069 void CRibbonTableButton::NotifyHighlightListItem(int nIndex)
00070 {
00071   ASSERT_VALID(this);
00072
00073   if (m_pPopupMenu != NULL)
00074   {
00075     if (nIndex < 0)
00076     {
00077       m_nRows = m_nColumns = 0;
00078     }
00079     else
00080     {
00081       m_nRows = nIndex / CELLS_X + 1;
00082       m_nColumns = (nIndex % CELLS_X) + 1;
00083     }
00084
00085     CString strCaption = lpszDefaultCaption;
00086     if (m_nColumns > 0 && m_nRows > 0)
00087     {
00088       strCaption.Format(_T("%dx%d Table"), m_nColumns, m_nRows);
00089     }
00090
00091     SetGroupName(0, strCaption);
00092     RedrawIcons();
00093   }
00094
00095   CMFCRibbonGallery::NotifyHighlightListItem(nIndex);
00096 }
00097
00098 void CRibbonTableButton::OnShowPopupMenu()
00099 {
00100   ASSERT_VALID(this);
00101
00102   m_nRows = m_nColumns = 0;
00103   SetGroupName(0, lpszDefaultCaption);
00104
00105   CMFCRibbonGallery::OnShowPopupMenu();
00106 }
00107
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/StdAfx.h Source File

  • vc2008fp
  • TasksPane

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028 #ifndef _AFX_NO_OLE_SUPPORT
00029 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00030 #endif
00031 #ifndef _AFX_NO_AFXCMN_SUPPORT
00032 #include <afxcmn.h>     // MFC support for Windows Common Controls
00033 #endif // _AFX_NO_AFXCMN_SUPPORT
00034
00035 #include <afxcontrolbars.h> // MFC support for ribbons and control bars
00036
00037 #if defined _M_IX86
00038 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00039 #elif defined _M_X64
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #else
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/InsertTbl.h Source File

  • internet
  • HTMLEdit

InsertTbl.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #if !defined(AFX_INSERTTBL_H__EB9EA713_DB7E_11D1_AD69_0060083E86DF__INCLUDED_)
00011 #define AFX_INSERTTBL_H__EB9EA713_DB7E_11D1_AD69_0060083E86DF__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // InsertTbl.h : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CInsertTableDlg dialog
00021
00022 class CInsertTableDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CInsertTableDlg(CWnd* pParent = NULL);   // standard constructor
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CInsertTableDlg)
00030   enum { IDD = IDD_INSERT_TABLE };
00031   CString m_Caption;
00032   CString m_CellAttribs;
00033   UINT  m_NumCols;
00034   UINT  m_NumRows;
00035   CString m_TableAttribs;
00036   //}}AFX_DATA
00037
00038
00039 // Overrides
00040   // ClassWizard generated virtual function overrides
00041   //{{AFX_VIRTUAL(CInsertTableDlg)
00042   protected:
00043   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00044   //}}AFX_VIRTUAL
00045
00046 // Implementation
00047 protected:
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CInsertTableDlg)
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 //{{AFX_INSERT_LOCATION}}
00056 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00057
00058 #endif // !defined(AFX_INSERTTBL_H__EB9EA713_DB7E_11D1_AD69_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTrackFile Member List

This is the complete list of members for CTrackFile, including all inherited members.
CTrackFile(CFrameWnd *pWnd) | CTrackFile |
CTrackFile(CFrameWnd *pWnd) | CTrackFile |
m_dwLength | CTrackFile |
m_dwLength | CTrackFile |
m_nLastPercent | CTrackFile |
m_pFrameWnd | CTrackFile |
m_strComplete | CTrackFile |
m_strSaving | CTrackFile |
m_strWait | CTrackFile |
OutputPercent(int nPercentComplete=0) | CTrackFile |
OutputPercent(int nPercentComplete=0) | CTrackFile |
OutputString(LPCTSTR lpsz) | CTrackFile |
OutputString(LPCTSTR lpsz) | CTrackFile |
Read(void FAR *lpBuf, UINT nCount) | CTrackFile | [virtual]
Read(void FAR *lpBuf, UINT nCount) | CTrackFile | [virtual]
Write(const void FAR *lpBuf, UINT nCount) | CTrackFile | [virtual]
Write(const void FAR *lpBuf, UINT nCount) | CTrackFile | [virtual]
~CTrackFile() | CTrackFile |
~CTrackFile() | CTrackFile |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/mainfrm.cpp Source File

  • general
  • tracker

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "trackapp.h"
00015
00016 #include "mainfrm.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   ON_WM_CREATE()
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // arrays of IDs used to initialize control bars
00038
00039 // toolbar buttons - IDs are command buttons
00040 static UINT BASED_CODE buttons[] =
00041 {
00042   // same order as in the bitmap 'toolbar.bmp'
00043   ID_FILE_NEW,
00044   ID_FILE_OPEN,
00045   ID_FILE_SAVE,
00046     ID_SEPARATOR,
00047   ID_EDIT_CUT,
00048   ID_EDIT_COPY,
00049   ID_EDIT_PASTE,
00050     ID_SEPARATOR,
00051   ID_FILE_PRINT,
00052   ID_APP_ABOUT,
00053     ID_SEPARATOR,
00054   ID_EDIT_SOLIDLINE,
00055   ID_EDIT_DOTTEDLINE,
00056     ID_SEPARATOR,
00057   ID_EDIT_HATCHEDBORDER,
00058   ID_EDIT_HATCHEDINSIDE,
00059     ID_SEPARATOR,
00060   ID_EDIT_RESIZEINSIDE,
00061   ID_EDIT_RESIZEOUTSIDE,
00062   ID_EDIT_ALLOWINVERT,
00063 };
00064
00065 static UINT BASED_CODE indicators[] =
00066 {
00067   ID_SEPARATOR,           // status line indicator
00068   ID_INDICATOR_CAPS,
00069   ID_INDICATOR_NUM,
00070   ID_INDICATOR_SCRL,
00071 };
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CMainFrame construction/destruction
00075
00076 CMainFrame::CMainFrame()
00077 {
00078   // TODO: add member initialization code here
00079 }
00080
00081 CMainFrame::~CMainFrame()
00082 {
00083 }
00084
00085 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00086 {
00087   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00088     return -1;
00089
00090   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD|WS_VISIBLE|CBRS_TOP) ||
00091     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00092     !m_wndToolBar.SetButtons(buttons,
00093       sizeof(buttons)/sizeof(UINT)))
00094   {
00095     TRACE0("Failed to create toolbar\n");
00096     return -1;      // fail to create
00097   }
00098
00099   if (!m_wndStatusBar.Create(this) ||
00100     !m_wndStatusBar.SetIndicators(indicators,
00101       sizeof(indicators)/sizeof(UINT)))
00102   {
00103     TRACE0("Failed to create status bar\n");
00104     return -1;      // fail to create
00105   }
00106
00107   return 0;
00108 }
00109
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CMainFrame diagnostics
00113
00114 #ifdef _DEBUG
00115 void CMainFrame::AssertValid() const
00116 {
00117   CMDIFrameWnd::AssertValid();
00118 }
00119
00120 void CMainFrame::Dump(CDumpContext& dc) const
00121 {
00122   CMDIFrameWnd::Dump(dc);
00123 }
00124
00125 #endif //_DEBUG
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/stdafx.h Source File

  • general
  • ctrltest

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #define VC_EXTRALEAN
00011
00012 #include <afxwin.h>
00013 #include <afxext.h> // for bitmap button
00014 #include <afxcmn.h> // for spin control
00015 #include <atlbase.h>
00016 #include <atlwin.h>
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetDoc.h Source File

  • vc2008fp
  • MenuSubSet

MenuSubSetDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMenuSubSetDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CMenuSubSetDoc();
00017   DECLARE_DYNCREATE(CMenuSubSetDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   public:
00028   virtual BOOL OnNewDocument();
00029   virtual void Serialize(CArchive& ar);
00030
00031 // Implementation
00032 public:
00033   virtual ~CMenuSubSetDoc();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:
00040   DECLARE_MESSAGE_MAP()
00041 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDerEditDlg Member List

This is the complete list of members for CDerEditDlg, including all inherited members.
CDerEditDlg() | CDerEditDlg | [inline]
IDD enum value | CDerEditDlg |
m_edit1 | CDerEditDlg | [protected]
m_edit2 | CDerEditDlg | [protected]
m_edit3 | CDerEditDlg | [protected]
m_edit4 | CDerEditDlg | [protected]
m_pFont | CDerEditDlg | [protected]
m_static1 | CDerEditDlg | [protected]
m_static2 | CDerEditDlg | [protected]
m_static3 | CDerEditDlg | [protected]
m_static4 | CDerEditDlg | [protected]
OnInitDialog() | CDerEditDlg |
OnOK() | CDerEditDlg | [virtual]
OnSetFont(CFont *pFont) | CDerEditDlg | [inline]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propdlg.h Source File

  • general
  • propdlg

propdlg.h

Go to the documentation of this file.
00001 // propdlg.h : main header file for the PROPDLG application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 #define WM_USER_CHANGE_OBJECT_PROPERTIES (WM_USER + 1)
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CPropDlgApp:
00022 // See propdlg.cpp for the implementation of this class
00023 //
00024
00025 class CPropDlgApp : public CWinApp
00026 {
00027 public:
00028   CPropDlgApp();
00029
00030 // Overrides
00031   // ClassWizard generate virtual function overrides
00032   //{{AFX_VIRTUAL(CPropDlgApp)
00033   public:
00034   virtual BOOL InitInstance();
00035   //}}AFX_VIRTUAL
00036
00037 // Implementation
00038
00039   //{{AFX_MSG(CPropDlgApp)
00040   afx_msg void OnAppAbout();
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/rectitem.h Source File

  • ole
  • oclient

rectitem.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010
00011 // class CRectItem - main COleClientItem bounded by a rectangle
00012
00013 class CMainDoc;
00014 class CMainView;
00015
00016 class CRectItem : public COleClientItem
00017 {
00018   DECLARE_SERIAL(CRectItem)
00019   CRectItem();
00020
00021 public:
00022   CRectItem(COleDocument* pContainer);
00023   ~CRectItem();
00024
00025 // Attributes
00026   CPoint m_ptPos;             //position in document
00027   CSize GetSize();            //current size
00028   void SetSize(CSize size);
00029   CSize GetBaseSize();        //base size
00030   void SetBaseSize(CSize size);
00031   CRect GetRect()             //current rect
00032     { return CRect(m_ptPos, GetSize()); }
00033   void SetRect(CRect& rect);
00034
00035   CMainDoc* GetDocument()
00036     { return (CMainDoc*)COleClientItem::GetDocument(); }
00037   CMainView* GetActiveView()
00038     { return (CMainView*)COleClientItem::GetActiveView(); }
00039
00040 // Operations
00041   void Dirty()
00042     { GetDocument()->SetModifiedFlag(); }
00043   void Invalidate(CView* pNotThisView = NULL);
00044   BOOL UpdateExtent();
00045   void Move(CRect &rc);
00046   void ResetSize();
00047   void GetNativeClipboardData(COleDataSource *pDataSource);
00048
00049   virtual void Serialize(CArchive& ar); // from CObject - public to call directly
00050
00051 // Overridables
00052 protected:
00053   virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
00054   virtual BOOL OnChangeItemPosition(const CRect& rectPos);
00055   virtual void OnActivate();
00056   virtual COleDataSource* OnGetClipboardData(BOOL bIncludeLink,
00057     LPPOINT lpOffset, LPSIZE lpSize);
00058   virtual void OnDeactivateUI(BOOL bUndoable);
00059
00060 public:
00061   virtual void OnGetItemPosition(CRect& rPosition);
00062 protected:
00063   CSize m_sizeIcon;           //current size
00064   CSize m_sizeContent;        //current size
00065   CSize m_sizeIconExtent;     //default size
00066   CSize m_sizeContentExtent;  //default size
00067 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/doctype.cpp Source File

  • ole
  • wordpad

doctype.cpp

Go to the documentation of this file.
00001 // richdoc.cpp : implementation of the CRichEditDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "resource.h"
00014 #include "strings.h"
00015
00016 #include "multconv.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const BYTE byteRTFPrefix[5] = {'{', '\\', 'r', 't', 'f'};
00024 static const BYTE byteWord2Prefix[4] = {0xDB, 0xA5, 0x2D, 0x00};
00025 static const BYTE byteCompFilePrefix[8] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1};
00026 static const BYTE byteWrite1Prefix[2] = {0x31, 0xBE};
00027 static const BYTE byteWrite2Prefix[2] = {0x32, 0xBE};
00028 static const BYTE byteExePrefix[2] = {0x4D, 0x5A};
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031
00032 static BOOL IsConverterFormat(LPCTSTR pszConverter, LPCTSTR pszPathName);
00033 static BOOL IsWord6(LPCTSTR pszConverter, LPCTSTR pszPathName);
00034
00035 DocType doctypes[NUM_DOC_TYPES] =
00036 {
00037   DECLARE_DOCTYPE(WINWORD2, FALSE, FALSE, FALSE, NULL),
00038   DECLARE_DOCTYPE(WINWORD6, TRUE, FALSE, TRUE, szWordConverter),
00039   DECLARE_DOCTYPE_SYN(WORDPAD, WINWORD6, TRUE, TRUE, FALSE, szWordConverter),
00040   DECLARE_DOCTYPE(WRITE, TRUE, FALSE, FALSE, szWriteConverter),
00041   DECLARE_DOCTYPE(RICHTEXT, TRUE, TRUE, FALSE, NULL),
00042   DECLARE_DOCTYPE(TEXT, TRUE, TRUE, FALSE, NULL),
00043   DECLARE_DOCTYPE(OEMTEXT, TRUE, TRUE, FALSE, NULL),
00044   DECLARE_DOCTYPE(ALL, TRUE, FALSE, FALSE, NULL),
00045   DECLARE_DOCTYPE(EXE, FALSE, FALSE, FALSE, NULL),
00046   DECLARE_DOCTYPE_NULL(EMBEDDED, FALSE, FALSE, FALSE, NULL)
00047 };
00048
00049 CString DocType::GetString(int nID)
00050 {
00051   ASSERT(idStr != NULL);
00052   CString str;
00053   VERIFY(str.LoadString(idStr));
00054   CString strSub;
00055   AfxExtractSubString(strSub, str, nID);
00056   return strSub;
00057 }
00058
00059 static BOOL IsConverterFormat(LPCSTR pszConverter, LPCTSTR pszPathName)
00060 {
00061   CConverter conv(pszConverter);
00062   return conv.IsFormatCorrect(pszPathName);
00063 }
00064
00065 static BOOL IsLeadMatch(CFile& file, const BYTE* pb, UINT nCount)
00066 {
00067   // check for match at beginning of file
00068   BOOL b = FALSE;
00069   BYTE* buf = new BYTE[nCount];
00070
00071   TRY
00072   {
00073     file.SeekToBegin();
00074     memset(buf, 0, nCount);
00075     file.Read(buf, nCount);
00076     if (memcmp(buf, pb, nCount) == 0)
00077       b = TRUE;
00078   }
00079   END_TRY
00080
00081   delete [] buf;
00082   return b;
00083 }
00084
00085 static BOOL IsWord6(LPCTSTR pszPathName)
00086 {
00087   USES_CONVERSION;
00088   BOOL bRes = FALSE;
00089   // see who created it
00090   LPSTORAGE lpStorage;
00091   SCODE sc = StgOpenStorage(CT2COLE(pszPathName), NULL,
00092     STGM_READ|STGM_SHARE_EXCLUSIVE, 0, 0, &lpStorage);
00093   if (sc == NOERROR)
00094   {
00095     LPSTREAM lpStream;
00096     sc = lpStorage->OpenStream(CT2COLE(szSumInfo), NULL,
00097       STGM_READ|STGM_SHARE_EXCLUSIVE, NULL, &lpStream);
00098     if (sc == NOERROR)
00099     {
00100       lpStream->Release();
00101       bRes = TRUE;
00102     }
00103     lpStorage->Release();
00104   }
00105   return bRes;
00106 }
00107
00108 int GetDocTypeFromName(LPCTSTR pszPathName, CFileException& fe)
00109 {
00110   CFile file;
00111   ASSERT(pszPathName != NULL);
00112
00113   if (!file.Open(pszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
00114     return -1;
00115
00116   CFileStatus stat;
00117   VERIFY(file.GetStatus(stat));
00118
00119   if (stat.m_size == 0) // file is empty
00120   {
00121     CString ext = CString(pszPathName).Right(4);
00122     if (ext[0] != '.')
00123       return RD_TEXT;
00124 #pragma warning(suppress:6400)
00125     if (lstrcmpi(ext, _T(".doc"))==0)
00126       return RD_WORDPAD;
00127 #pragma warning(suppress:6400)
00128     if (lstrcmpi(ext, _T(".rtf"))==0)
00129       return RD_RICHTEXT;
00130     return RD_TEXT;
00131   }
00132   // RTF
00133   if (IsLeadMatch(file, byteRTFPrefix, sizeof(byteRTFPrefix)))
00134     return RD_RICHTEXT;
00135   // WORD 2
00136   if (IsLeadMatch(file, byteWord2Prefix, sizeof(byteWord2Prefix)))
00137     return RD_WINWORD2;
00138   // EXE
00139   if (IsLeadMatch(file, byteExePrefix, sizeof(byteExePrefix)))
00140     return RD_EXE;
00141   // write file can start with 31BE or 32BE depending on whether it has
00142   // OLE objects in it or not
00143   if (IsLeadMatch(file, byteWrite1Prefix, sizeof(byteWrite1Prefix)) ||
00144     IsLeadMatch(file, byteWrite2Prefix, sizeof(byteWrite2Prefix)))
00145   {
00146     file.Close();
00147     if (IsConverterFormat(szWriteConverter, pszPathName))
00148       return RD_WRITE;
00149     else
00150       return RD_TEXT;
00151   }
00152
00153   // test for compound file
00154   if (IsLeadMatch(file, byteCompFilePrefix, sizeof(byteCompFilePrefix)))
00155   {
00156     file.Close();
00157     if (IsConverterFormat(szWordConverter, pszPathName))
00158     {
00159       if (IsWord6(pszPathName))
00160         return RD_WINWORD6;
00161       else
00162         return RD_WORDPAD;
00163     }
00164     return RD_TEXT;
00165   }
00166   return RD_TEXT;
00167 }
00168
00169 void ScanForConverters()
00170 {
00171   static BOOL bScanned = FALSE;
00172   if (bScanned)
00173     return;
00174
00175   for (int i=0;i<NUM_DOC_TYPES;i++)
00176   {
00177     LPCSTR lpsz = doctypes[i].pszConverterName;
00178     // if converter specified but can't find it
00179     if (lpsz != NULL && *lpsz != NULL && !IsDLLInPath(lpsz))
00180       doctypes[i].bRead = doctypes[i].bWrite = FALSE;
00181   }
00182   if (GetSystemMetrics(SM_DBCSENABLED))
00183     doctypes[RD_OEMTEXT].bRead = doctypes[RD_OEMTEXT].bWrite = FALSE;
00184   bScanned = TRUE;
00185 }
00186
00187 BOOL IsDLLInPath(LPCSTR lpszName)
00188 {
00189   ASSERT(lpszName != NULL);
00190   OFSTRUCT ofs;
00191   return (OpenFile(lpszName, &ofs, OF_EXIST) != HFILE_ERROR);
00192 }
00193
00194 CString GetExtFromType(int nDocType)
00195 {
00196   ScanForConverters();
00197
00198   CString str = doctypes[nDocType].GetString(DOCTYPE_EXT);
00199   if (!str.IsEmpty())
00200   {
00201     ASSERT(str.GetLength() == 5); // "*.ext"
00202     ASSERT(str[1] == '.');
00203     return str.Right(str.GetLength()-1);
00204   }
00205   return str;
00206 }
00207
00208 // returns an RD_* from an index into the openfile dialog types
00209 int GetTypeFromIndex(int nIndex, BOOL bOpen)
00210 {
00211   ScanForConverters();
00212
00213   int nCnt = 0;
00214   for (int i=0;i<NUM_DOC_TYPES;i++)
00215   {
00216     if (!doctypes[i].bDup &&
00217       (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
00218     {
00219       if (nCnt == nIndex)
00220         return i;
00221       nCnt++;
00222     }
00223   }
00224   ASSERT(FALSE);
00225   return -1;
00226 }
00227
00228 // returns an index into the openfile dialog types for the RD_* type
00229 int GetIndexFromType(int nType, BOOL bOpen)
00230 {
00231   ScanForConverters();
00232
00233   int nCnt = 0;
00234   for (int i=0;i<NUM_DOC_TYPES;i++)
00235   {
00236     if (!doctypes[i].bDup &&
00237       (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
00238     {
00239       if (i == nType)
00240         return nCnt;
00241       nCnt++;
00242     }
00243   }
00244   return -1;
00245 }
00246
00247 CString GetFileTypes(BOOL bOpen)
00248 {
00249   ScanForConverters();
00250
00251   CString str;
00252   for (int i=0;i<NUM_DOC_TYPES;i++)
00253   {
00254     if (bOpen && doctypes[i].bRead && !doctypes[i].bDup)
00255     {
00256       str += doctypes[i].GetString(DOCTYPE_DESC);
00257       str += (TCHAR)NULL;
00258       str += doctypes[i].GetString(DOCTYPE_EXT);
00259       str += (TCHAR)NULL;
00260     }
00261     else if (!bOpen && doctypes[i].bWrite && !doctypes[i].bDup)
00262     {
00263       str += doctypes[i].GetString(DOCTYPE_DOCTYPE);
00264       str += (TCHAR)NULL;
00265       str += doctypes[i].GetString(DOCTYPE_EXT);
00266       str += (TCHAR)NULL;
00267     }
00268   }
00269   return str;
00270 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMDialog Member List

This is the complete list of members for CMSMDialog, including all inherited members.
CMSMDialog() | CMSMDialog |
CMSMDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CMSMDialog |
CMSMDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CMSMDialog |
CommonConstruct() | CMSMDialog | [protected]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/propset.h Source File

  • ole
  • drawcli

propset.h

Go to the documentation of this file.
00001 // propset.h : interface of the CProperty, CPropertySection, and CPropertSet classes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 //  Property setting
00014
00015 typedef struct tagSECTIONHEADER
00016 {
00017   DWORD       cbSection ;
00018   DWORD       cProperties ;  // Number of props.
00019 } SECTIONHEADER, *LPSECTIONHEADER ;
00020
00021 typedef struct tagPROPERTYIDOFFSET
00022 {
00023   DWORD       propertyID;
00024   DWORD       dwOffset;
00025 } PROPERTYIDOFFSET, *LPPROPERTYIDOFFSET;
00026
00027 typedef struct tagPROPHEADER
00028 {
00029   WORD        wByteOrder ;    // Always 0xFFFE
00030   WORD        wFormat ;       // Always 0
00031   DWORD       dwOSVer ;       // System version
00032   CLSID       clsID ;         // Application CLSID
00033   DWORD       cSections ;     // Number of sections (must be at least 1)
00034 } PROPHEADER, *LPPROPHEADER ;
00035
00036 typedef struct tagFORMATIDOFFSET
00037 {
00038   GUID        formatID;
00039   DWORD       dwOffset;
00040 } FORMATIDOFFSET, *LPFORMATIDOFFSET;
00041
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CProperty
00045
00046 class CProperty : public CObject
00047 {
00048   friend class CPropertySet ;
00049   friend class CPropertySection ;
00050
00051 public:
00052 // Construction
00053   CProperty( void ) ;
00054   CProperty( DWORD dwID, const LPVOID pValue, DWORD dwType ) ;
00055
00056 // Attributes
00057   BOOL    Set( DWORD dwID, const LPVOID pValue, DWORD dwType ) ;
00058   BOOL    Set( const LPVOID pValue, DWORD dwType ) ;
00059   BOOL    Set( const LPVOID pValue ) ;
00060   LPVOID  Get( DWORD* pcb ) ;     // Returns pointer to actual value
00061   LPVOID  Get( void ) ;           // Returns pointer to actual value
00062   DWORD   GetType( void ) ;       // Returns property type
00063   void    SetType( DWORD dwType ) ;
00064   DWORD   GetID( void ) ;
00065   void    SetID( DWORD dwPropID ) ;
00066
00067   LPVOID  GetRawValue( void ) ;   // Returns pointer internal value (may
00068                   // include size information)
00069 // Operations
00070   BOOL    WriteToStream( IStream* pIStream ) ;
00071   BOOL    ReadFromStream( IStream* pIStream ) ;
00072
00073 private:
00074   DWORD       m_dwPropID ;
00075   DWORD       m_dwType ;
00076   LPVOID      m_pValue ;
00077
00078   LPVOID  AllocValue(ULONG cb);
00079   void    FreeValue();
00080
00081 public:
00082   ~CProperty() ;
00083 } ;
00084
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CPropertySection
00088
00089 class CPropertySection : public CObject
00090 {
00091   friend class CPropertySet ;
00092   friend class CProperty ;
00093
00094 public:
00095 // Construction
00096   CPropertySection( void ) ;
00097   CPropertySection( CLSID FormatID ) ;
00098
00099 // Attributes
00100   CLSID   GetFormatID( void ) ;
00101   void    SetFormatID( CLSID FormatID ) ;
00102
00103   BOOL    Set( DWORD dwPropID, LPVOID pValue, DWORD dwType ) ;
00104   BOOL    Set( DWORD dwPropID, LPVOID pValue ) ;
00105   LPVOID  Get( DWORD dwPropID, DWORD* pcb ) ;
00106   LPVOID  Get( DWORD dwPropID ) ;
00107   void    Remove( DWORD dwPropID ) ;
00108   void    RemoveAll() ;
00109
00110   CProperty* GetProperty( DWORD dwPropID ) ;
00111   void AddProperty( CProperty* pProp ) ;
00112
00113   DWORD   GetSize( void ) ;
00114   DWORD   GetCount( void ) ;
00115   CObList* GetList( void ) ;
00116
00117   BOOL    GetID( LPCTSTR pszName, DWORD* pdwPropID ) ;
00118   BOOL    SetName( DWORD dwPropID, LPCTSTR pszName ) ;
00119
00120   BOOL    SetSectionName( LPCTSTR pszName );
00121   LPCTSTR GetSectionName( void );
00122
00123 // Operations
00124   BOOL    WriteToStream( IStream* pIStream ) ;
00125   BOOL    ReadFromStream( IStream* pIStream, LARGE_INTEGER liPropSet ) ;
00126   BOOL    WriteNameDictToStream( IStream* pIStream ) ;
00127   BOOL    ReadNameDictFromStream( IStream* pIStream ) ;
00128
00129 private:
00130 // Implementation
00131   CLSID           m_FormatID ;
00132   SECTIONHEADER   m_SH ;
00133   // List of properties (CProperty)
00134   CObList         m_PropList ;
00135   // Dictionary of property names
00136   CMapStringToPtr m_NameDict ;
00137   CString         m_strSectionName;
00138
00139 public:
00140   ~CPropertySection();
00141 } ;
00142
00143
00144 /////////////////////////////////////////////////////////////////////////////
00145 // CPropertySet
00146
00147 class CPropertySet : public CObject
00148 {
00149   friend class CPropertySection ;
00150   friend class CProperty ;
00151
00152 public:
00153 // Construction
00154   CPropertySet( void ) ;
00155   CPropertySet( CLSID clsID )  ;
00156
00157 // Attributes
00158   BOOL    Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType ) ;
00159   BOOL    Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue ) ;
00160   LPVOID  Get( CLSID FormatID, DWORD dwPropID, DWORD* pcb ) ;
00161   LPVOID  Get( CLSID FormatID, DWORD dwPropID ) ;
00162   void    Remove( CLSID FormatID, DWORD dwPropID ) ;
00163   void    Remove( CLSID FormatID ) ;
00164   void    RemoveAll( ) ;
00165
00166   CProperty* GetProperty( CLSID FormatID, DWORD dwPropID ) ;
00167   void AddProperty( CLSID FormatID, CProperty* pProp ) ;
00168   CPropertySection* GetSection( CLSID FormatID ) ;
00169   CPropertySection* AddSection( CLSID FormatID ) ;
00170   void AddSection( CPropertySection* psect ) ;
00171
00172   WORD    GetByteOrder( void ) ;
00173   WORD    GetFormatVersion( void ) ;
00174   void    SetFormatVersion( WORD wFmtVersion ) ;
00175   DWORD   GetOSVersion( void ) ;
00176   void    SetOSVersion( DWORD dwOSVer ) ;
00177   CLSID   GetClassID( void ) ;
00178   void    SetClassID( CLSID clsid ) ;
00179   DWORD   GetCount( void ) ;
00180   CObList* GetList( void ) ;
00181
00182 // Operations
00183   BOOL    WriteToStream( IStream* pIStream ) ;
00184   BOOL    ReadFromStream( IStream* pIStream ) ;
00185
00186 // Implementation
00187 private:
00188   PROPHEADER      m_PH ;
00189   CObList         m_SectionList ;
00190
00191 public:
00192   ~CPropertySet();
00193 } ;
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDemoOptionsPropSheet Member List

This is the complete list of members for CDemoOptionsPropSheet, including all inherited members.
CDemoOptionsPropSheet(CWnd *pWndParent, UINT nSelectedPage=0) | CDemoOptionsPropSheet |
m_Icons | CDemoOptionsPropSheet | [protected]
m_Pat | CDemoOptionsPropSheet | [protected]
OnDrawPageHeader(CDC *pDC, int nPage, CRect rectHeader) | CDemoOptionsPropSheet | [protected, virtual]
OnInitDialog() | CDemoOptionsPropSheet | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatba.h Source File

  • vc2008fp
  • WordPad

formatba.h

Go to the documentation of this file.
00001 //
00002 // formatba.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #ifndef __FORMATBA_H__
00015 #define __FORMATBA_H__
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CFormatBar dialog
00019 class CFormatBar : public CMFCToolBar
00020 {
00021   DECLARE_SERIAL(CFormatBar)
00022
00023 // Construction
00024 public:
00025   CFormatBar();
00026
00027 // Operations
00028 public:
00029   virtual void CFormatBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00030
00031   CMFCColorMenuButton* CreateColorButton ();
00032   CMFCToolBarFontComboBox* CreateFontComboButton ();
00033   CMFCToolBarMenuButton* CreateBorderTypeButton ();
00034
00035 // Attributes
00036 public:
00037   CSize m_szBaseUnits;
00038
00039 protected:
00040   CPalette  m_palColorPicker; // Palette for color picker
00041   int     m_nNumColours;
00042
00043 // Implementation
00044 protected:
00045   virtual void OnReset ();
00046
00047   // Generated message map functions
00048   //{{AFX_MSG(CFormatBar)
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 #endif
00054
00055 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBounceView Member List

This is the complete list of members for CBounceView, including all inherited members.
CBounceView() | CBounceView | [protected]
ChangeSpeed() | CBounceView |
GetDocument() | CBounceView | [inline]
MakeNewBall() | CBounceView |
MixColors() | CBounceView |
OnColor() | CBounceView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CBounceView | [protected]
OnCustomColor() | CBounceView | [protected]
OnDraw(CDC *pDC) | CBounceView | [protected, virtual]
OnFast() | CBounceView | [protected]
OnInitialUpdate() | CBounceView | [virtual]
OnSize(UINT nType, int cx, int cy) | CBounceView | [protected]
OnSlow() | CBounceView | [protected]
OnTimer(UINT_PTR nIDEvent) | CBounceView | [protected]
OnUpdateBlack(CCmdUI *pCmdUI) | CBounceView | [protected]
OnUpdateBlue(CCmdUI *pCmdUI) | CBounceView | [protected]
OnUpdateCustom(CCmdUI *pCmdUI) | CBounceView | [protected]
OnUpdateFast(CCmdUI *pCmdUI) | CBounceView | [protected]
OnUpdateGreen(CCmdUI *pCmdUI) | CBounceView | [protected]
OnUpdateRed(CCmdUI *pCmdUI) | CBounceView | [protected]
OnUpdateSlow(CCmdUI *pCmdUI) | CBounceView | [protected]
OnUpdateWhite(CCmdUI *pCmdUI) | CBounceView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CBounceView | [protected, virtual]
~CBounceView() | CBounceView | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRateDlg Member List

This is the complete list of members for CRateDlg, including all inherited members.
CRateDlg(UINT iRate, CWnd *pParent=NULL) | CRateDlg |
DoDataExchange(CDataExchange *pDX) | CRateDlg | [protected, virtual]
GetRate() const | CRateDlg | [inline]
IDD enum value | CRateDlg | [protected]
m_iRate | CRateDlg | [protected]
OnInitDialog() | CRateDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemo.cpp Source File

  • vc2008fp
  • DesktopAlertDemo

DesktopAlertDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DesktopAlertDemo.h"
00013 #include "DesktopAlertDemoDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CDesktopAlertDemoApp
00023
00024 BEGIN_MESSAGE_MAP(CDesktopAlertDemoApp, CWinAppEx)
00025   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00026 END_MESSAGE_MAP()
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CDesktopAlertDemoApp construction
00030
00031 CDesktopAlertDemoApp::CDesktopAlertDemoApp()
00032 {
00033   // TODO: add construction code here,
00034   // Place all significant initialization in InitInstance
00035 }
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // The one and only CDesktopAlertDemoApp object
00039
00040 CDesktopAlertDemoApp theApp;
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CDesktopAlertDemoApp initialization
00044
00045 BOOL CDesktopAlertDemoApp::InitInstance()
00046 {
00047   AfxEnableControlContainer();
00048
00049   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00050   InitContextMenuManager();
00051
00052   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00053   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00054   SetRegistryBase (_T("Settings"));
00055
00056   // Standard initialization
00057   // If you are not using these features and wish to reduce the size
00058   //  of your final executable, you should remove from the following
00059   //  the specific initialization routines you do not need.
00060
00061   CDesktopAlertDemoDlg dlg;
00062   m_pMainWnd = &dlg;
00063   int nResponse = (int) dlg.DoModal();
00064   if (nResponse == IDOK)
00065   {
00066     // TODO: Place code here to handle when the dialog is
00067     //  dismissed with OK
00068   }
00069   else if (nResponse == IDCANCEL)
00070   {
00071     // TODO: Place code here to handle when the dialog is
00072     //  dismissed with Cancel
00073   }
00074
00075   // Since the dialog has been closed, return FALSE so that we exit the
00076   //  application, rather than start the application's message pump.
00077   return FALSE;
00078 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COwnerDrawMenuView Member List

This is the complete list of members for COwnerDrawMenuView, including all inherited members.
COwnerDrawMenuView() | COwnerDrawMenuView | [protected]
GetDocument() | COwnerDrawMenuView | [inline]
m_uiLineStyleCmd | COwnerDrawMenuView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | COwnerDrawMenuView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | COwnerDrawMenuView | [protected]
OnDraw(CDC *pDC) | COwnerDrawMenuView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | COwnerDrawMenuView | [protected, virtual]
OnFilePrintPreview() | COwnerDrawMenuView | [protected]
OnLineStyle(UINT uiCmd) | COwnerDrawMenuView | [protected]
OnMoreLines() | COwnerDrawMenuView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | COwnerDrawMenuView | [protected, virtual]
OnUpdateLineStyle(CCmdUI *pCmdUI) | COwnerDrawMenuView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | COwnerDrawMenuView | [virtual]
~COwnerDrawMenuView() | COwnerDrawMenuView | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAmbientProperty Member List

This is the complete list of members for CAmbientProperty, including all inherited members.
CAmbientProperty() | CAmbientProperty |
CAmbientProperty(DISPID dispid, LPCTSTR pszName, const VARIANT &var, int vti, BOOL tStock=FALSE) | CAmbientProperty |
DECLARE_SERIAL(CAmbientProperty) | CAmbientProperty | [private]
Enable(BOOL tEnabled) | CAmbientProperty |
GetID() const | CAmbientProperty |
GetName() const | CAmbientProperty |
GetValue() const | CAmbientProperty |
GetVTI() const | CAmbientProperty |
IsEnabled() const | CAmbientProperty |
IsStock() const | CAmbientProperty |
m_dispid | CAmbientProperty | [protected]
m_strName | CAmbientProperty | [protected]
m_tEnabled | CAmbientProperty | [protected]
m_tStock | CAmbientProperty | [protected]
m_varValue | CAmbientProperty | [protected]
m_vti | CAmbientProperty | [protected]
operator=(const CAmbientProperty &prop) | CAmbientProperty |
Serialize(CArchive &ar) | CAmbientProperty |
SetValue(const VARIANT &varValue, int vti=-1) | CAmbientProperty |
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CContainerDoc Member List

This is the complete list of members for CContainerDoc, including all inherited members.
CContainerDoc() | CContainerDoc | [protected]
OnNewDocument() | CContainerDoc | [virtual]
Serialize(CArchive &ar) | CContainerDoc | [virtual]
~CContainerDoc() | CContainerDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/testhelp.h Source File

  • controls
  • testhelp

testhelp.h

Go to the documentation of this file.
00001 // testhelp.h : main header file for TESTHELP.DLL
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined( __AFXCTL_H__ )
00013   #error include 'afxctl.h' before including this file
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CTesthelpApp : See testhelp.cpp for implementation.
00020
00021 class CTesthelpApp : public COleControlModule
00022 {
00023 public:
00024   CTesthelpApp();
00025   BOOL InitInstance();
00026   int ExitInstance();
00027 };
00028
00029 extern const GUID CDECL _tlid;
00030 extern const WORD _wVerMajor;
00031 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoDoc.cpp Source File

  • vc2008fp
  • OutlookDemo

OutlookDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012
00013 #include "OutlookDemoDoc.h"
00014 #include "MailFrame.h"
00015 #include "MailView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // COutlookDemoDoc
00025
00026 IMPLEMENT_DYNCREATE(COutlookDemoDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(COutlookDemoDoc, CDocument)
00029   ON_COMMAND(ID_NEW_APPOINTMENT, OnNewAppointment)
00030   ON_COMMAND(ID_NEW_CONTRACT, OnNewContract)
00031   ON_COMMAND(ID_NEW_DISTRIBUTION_LIST, OnNewDistributionList)
00032   ON_COMMAND(ID_NEW_FAX, OnNewFax)
00033   ON_COMMAND(ID_NEW_FOLDER, OnNewFolder)
00034   ON_COMMAND(ID_NEW_JOURNAL_ENTRY, OnNewJournalEntry)
00035   ON_COMMAND(ID_NEW_MAIL, OnNewMail)
00036   ON_COMMAND(ID_NEW_MEETING, OnNewMeeting)
00037   ON_COMMAND(ID_NEW_NOTE, OnNewNote)
00038   ON_COMMAND(ID_NEW_POST_FOLDER, OnNewPostFolder)
00039   ON_COMMAND(ID_NEW_SHORTCUT, OnNewShortcut)
00040   ON_COMMAND(ID_NEW_TASK, OnNewTask)
00041   ON_COMMAND(ID_NEW_TASK_REQUEST, OnNewTaskRequest)
00042   ON_COMMAND(ID_SEND_RECEIVE, OnSendReceive)
00043   ON_COMMAND(ID_ADDRESS_BOOK, OnAddressBook)
00044   ON_COMMAND(ID_FIND_CONTACT, OnFindContact)
00045   ON_COMMAND(ID_WEB_ADDRESS, OnWebAddress)
00046   ON_COMMAND(ID_WEB_BACK, OnWebBack)
00047   ON_COMMAND(ID_WEB_FIND, OnWebFind)
00048   ON_COMMAND(ID_WEB_REFRESH, OnWebRefresh)
00049   ON_COMMAND(ID_WEB_START, OnWebStart)
00050   ON_COMMAND(ID_VIEW_UP, OnViewUp)
00051   ON_COMMAND(ID_VIEW_BACK, OnViewBack)
00052   ON_COMMAND(ID_RULES_WIZARD, OnRulesWizard)
00053 END_MESSAGE_MAP()
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // COutlookDemoDoc construction/destruction
00057
00058 COutlookDemoDoc::COutlookDemoDoc()
00059 {
00060   // TODO: add one-time construction code here
00061
00062 }
00063
00064 COutlookDemoDoc::~COutlookDemoDoc()
00065 {
00066 }
00067
00068 BOOL COutlookDemoDoc::OnNewDocument()
00069 {
00070   if (!CDocument::OnNewDocument())
00071     return FALSE;
00072
00073   // TODO: add reinitialization code here
00074   //(SDI documents will reuse this document)
00075
00076   return TRUE;
00077 }
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // COutlookDemoDoc serialization
00081
00082 void COutlookDemoDoc::Serialize(CArchive& ar)
00083 {
00084   if (ar.IsStoring())
00085   {
00086     // TODO: add storing code here
00087   }
00088   else
00089   {
00090     // TODO: add loading code here
00091   }
00092 }
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // COutlookDemoDoc diagnostics
00096
00097 #ifdef _DEBUG
00098 void COutlookDemoDoc::AssertValid() const
00099 {
00100   CDocument::AssertValid();
00101 }
00102
00103 void COutlookDemoDoc::Dump(CDumpContext& dc) const
00104 {
00105   CDocument::Dump(dc);
00106 }
00107 #endif //_DEBUG
00108
00109 /////////////////////////////////////////////////////////////////////////////
00110 // COutlookDemoDoc commands
00111
00112 void COutlookDemoDoc::OnNewAppointment()
00113 {
00114   // TODO: Add your command handler code here
00115
00116 }
00117
00118 void COutlookDemoDoc::OnNewContract()
00119 {
00120   // TODO: Add your command handler code here
00121
00122 }
00123
00124 void COutlookDemoDoc::OnNewDistributionList()
00125 {
00126   // TODO: Add your command handler code here
00127
00128 }
00129
00130 void COutlookDemoDoc::OnNewFax()
00131 {
00132   // TODO: Add your command handler code here
00133
00134 }
00135
00136 void COutlookDemoDoc::OnNewFolder()
00137 {
00138   // TODO: Add your command handler code here
00139
00140 }
00141
00142 void COutlookDemoDoc::OnNewJournalEntry()
00143 {
00144   // TODO: Add your command handler code here
00145
00146 }
00147
00148 void COutlookDemoDoc::OnNewMeeting()
00149 {
00150   // TODO: Add your command handler code here
00151
00152 }
00153
00154 void COutlookDemoDoc::OnNewNote()
00155 {
00156   // TODO: Add your command handler code here
00157
00158 }
00159
00160 void COutlookDemoDoc::OnNewPostFolder()
00161 {
00162   // TODO: Add your command handler code here
00163
00164 }
00165
00166 void COutlookDemoDoc::OnNewShortcut()
00167 {
00168   // TODO: Add your command handler code here
00169
00170 }
00171
00172 void COutlookDemoDoc::OnNewTask()
00173 {
00174   // TODO: Add your command handler code here
00175
00176 }
00177
00178 void COutlookDemoDoc::OnNewTaskRequest()
00179 {
00180   // TODO: Add your command handler code here
00181
00182 }
00183
00184 void COutlookDemoDoc::OnSendReceive()
00185 {
00186   // TODO: Add your command handler code here
00187
00188 }
00189
00190 void COutlookDemoDoc::OnAddressBook()
00191 {
00192   // TODO: Add your command handler code here
00193
00194 }
00195
00196 void COutlookDemoDoc::OnFindContact()
00197 {
00198   // TODO: Add your command handler code here
00199
00200 }
00201
00202 void COutlookDemoDoc::OnWebAddress()
00203 {
00204   // TODO: Add your command handler code here
00205
00206 }
00207
00208 void COutlookDemoDoc::OnWebBack()
00209 {
00210   // TODO: Add your command handler code here
00211
00212 }
00213
00214 void COutlookDemoDoc::OnWebFind()
00215 {
00216   // TODO: Add your command handler code here
00217
00218 }
00219
00220 void COutlookDemoDoc::OnWebRefresh()
00221 {
00222   // TODO: Add your command handler code here
00223
00224 }
00225
00226 void COutlookDemoDoc::OnWebStart()
00227 {
00228   // TODO: Add your command handler code here
00229
00230 }
00231
00232 void COutlookDemoDoc::OnViewUp()
00233 {
00234   // TODO: Add your command handler code here
00235
00236 }
00237
00238 void COutlookDemoDoc::OnViewBack()
00239 {
00240   // TODO: Add your command handler code here
00241
00242 }
00243
00244 void COutlookDemoDoc::OnRulesWizard()
00245 {
00246   // TODO: Add your command handler code here
00247
00248 }
00249
00250 void COutlookDemoDoc::OnNewMail()
00251 {
00252   theApp.SaveState();
00253
00254   CMailFrame* pMailFrame = new CMailFrame;
00255
00256   CCreateContext context;
00257
00258   context.m_pCurrentDoc = this;
00259   context.m_pCurrentFrame = NULL;
00260   context.m_pNewDocTemplate = NULL;
00261   context.m_pLastView = NULL;
00262   context.m_pNewViewClass = RUNTIME_CLASS(CMailView);
00263
00264   pMailFrame->LoadFrame(IDR_MAILFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, &context);
00265
00266   pMailFrame->ShowWindow(SW_SHOW);
00267 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertyEditRequestsPage::CPropertyInfo Member List

This is the complete list of members for CPropertyEditRequestsPage::CPropertyInfo, including all inherited members.
CPropertyInfo() | CPropertyEditRequestsPage::CPropertyInfo
CPropertyInfo(LPCTSTR pszName, BOOL tLogged, int iResponse) | CPropertyEditRequestsPage::CPropertyInfo
m_iResponse | CPropertyEditRequestsPage::CPropertyInfo
m_strName | CPropertyEditRequestsPage::CPropertyInfo
m_tLogged | CPropertyEditRequestsPage::CPropertyInfo
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/aclikdoc.cpp Source File

  • ole
  • acdual

aclikdoc.cpp

Go to the documentation of this file.
00001 // AClikDoc.cpp : implementation of the CAutoClickDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "AClikDoc.h"
00016 #include "Dialogs.h"
00017 #include "ClikPnt.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CAutoClickDoc
00027
00028 IMPLEMENT_DYNCREATE(CAutoClickDoc, CDocument)
00029
00030 BEGIN_MESSAGE_MAP(CAutoClickDoc, CDocument)
00031   //{{AFX_MSG_MAP(CAutoClickDoc)
00032   ON_COMMAND(ID_EDIT_CHANGETEXT, OnEditChangetext)
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 BEGIN_DISPATCH_MAP(CAutoClickDoc, CDocument)
00037   //{{AFX_DISPATCH_MAP(CAutoClickDoc)
00038   DISP_PROPERTY(CAutoClickDoc, "text", m_str, VT_BSTR)
00039   DISP_PROPERTY_EX(CAutoClickDoc, "x", GetX, SetX, VT_I2)
00040   DISP_PROPERTY_EX(CAutoClickDoc, "y", GetY, SetY, VT_I2)
00041   DISP_PROPERTY_EX(CAutoClickDoc, "Position", GetPosition, SetPosition, VT_DISPATCH)
00042   DISP_FUNCTION(CAutoClickDoc, "RefreshWindow", Refresh, VT_EMPTY, VTS_NONE)
00043   DISP_FUNCTION(CAutoClickDoc, "SetAllProps", SetAllProps, VT_EMPTY, VTS_I2 VTS_I2 VTS_BSTR)
00044   DISP_FUNCTION(CAutoClickDoc, "ShowWindow", ShowWindow, VT_EMPTY, VTS_NONE)
00045   DISP_FUNCTION(CAutoClickDoc, "TestError", TestErrorHandler, VT_EMPTY, VTS_I2)
00046   //}}AFX_DISPATCH_MAP
00047 END_DISPATCH_MAP()
00048
00049 // DUAL_SUPPORT_START
00050 //    Original code:
00051 //       // Note: we add support for IID_IAClick to support typesafe binding
00052 //       //  from VBA.  This IID must match the GUID that is attached to the
00053 //       //  dispinterface in the .ODL file.
00054 //
00055 //       // {47D53E05-CC33-11CE-8F35-00DD01109044}
00056 //       static const IID IID_IAClick =
00057 //       { 0x47d53e05, 0xcc33, 0x11ce, { 0x8f, 0x35, 0x0, 0xdd, 0x1, 0x10, 0x90, 0x44 } };
00058 //
00059 //       BEGIN_INTERFACE_MAP(CAutoClickDoc, CDocument)
00060 //          INTERFACE_PART(CAutoClickDoc, IID_IAClick, Dispatch)
00061 //       END_INTERFACE_MAP()
00062 //
00063
00064 // Note: we add support for DIID_IAClick to support typesafe binding
00065 // from VBA.  We add support for IID_IDualAClick to support our dual
00066 // interface. See ACDual.H for the definition of DIID_IAClick and
00067 // IID_IDualAClick.
00068 //
00069 // DUAL_ERRORINFO_PART indicates we support OLE Automation
00070 // error handling.
00071 //
00072 BEGIN_INTERFACE_MAP(CAutoClickDoc, CDocument)
00073   INTERFACE_PART(CAutoClickDoc, DIID_IAClick, Dispatch)
00074   INTERFACE_PART(CAutoClickDoc, IID_IDualAClick, DualAClick)
00075   DUAL_ERRORINFO_PART(CAutoClickDoc)
00076 END_INTERFACE_MAP()
00077
00078 // DUAL_SUPPORT_END
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CAutoClickDoc construction/destruction
00082
00083 CAutoClickDoc::CAutoClickDoc()
00084 {
00085   EnableAutomation();
00086   m_pt = CPoint(10, 10);
00087   m_str = _T("Automation!");
00088
00089   AfxOleLockApp();
00090 }
00091
00092 CAutoClickDoc::~CAutoClickDoc()
00093 {
00094   AfxOleUnlockApp();
00095 }
00096
00097 BOOL CAutoClickDoc::OnNewDocument()
00098 {
00099   if (!CDocument::OnNewDocument())
00100     return FALSE;
00101
00102   // TODO: add reinitialization code here
00103   // (SDI documents will reuse this document)
00104
00105   return TRUE;
00106 }
00107
00108 void CAutoClickDoc::Refresh()
00109 {
00110   UpdateAllViews(NULL);
00111   SetModifiedFlag();
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CAutoClickDoc serialization
00116
00117 void CAutoClickDoc::Serialize(CArchive& ar)
00118 {
00119   if (ar.IsStoring())
00120   {
00121     ar << m_pt << m_str;
00122   }
00123   else
00124   {
00125     ar >> m_pt >> m_str;
00126   }
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CAutoClickDoc diagnostics
00131
00132 #ifdef _DEBUG
00133 void CAutoClickDoc::AssertValid() const
00134 {
00135   CDocument::AssertValid();
00136 }
00137
00138 void CAutoClickDoc::Dump(CDumpContext& dc) const
00139 {
00140   CDocument::Dump(dc);
00141 }
00142 #endif //_DEBUG
00143
00144 /////////////////////////////////////////////////////////////////////////////
00145 // CAutoClickDoc commands
00146
00147 void CAutoClickDoc::OnEditChangetext()
00148 {
00149   CChangeText dlg;
00150   dlg.m_str = m_str;
00151   if (dlg.DoModal())
00152   {
00153     m_str = dlg.m_str;
00154     Refresh();
00155   }
00156 }
00157
00158 short CAutoClickDoc::GetX()
00159 {
00160   return (short)m_pt.x;
00161 }
00162
00163 void CAutoClickDoc::SetX(short nNewValue)
00164 {
00165   m_pt.x = nNewValue;
00166   Refresh();
00167 }
00168
00169 short CAutoClickDoc::GetY()
00170 {
00171   return (short)m_pt.y;
00172 }
00173
00174 void CAutoClickDoc::SetY(short nNewValue)
00175 {
00176   m_pt.y = nNewValue;
00177   Refresh();
00178 }
00179
00180 void CAutoClickDoc::SetAllProps(short x, short y, LPCTSTR text)
00181 {
00182   m_pt.x = x;
00183   m_pt.y = y;
00184   m_str = text;
00185   Refresh();
00186 }
00187
00188 void CAutoClickDoc::ShowWindow()
00189 {
00190   POSITION pos = GetFirstViewPosition();
00191   CView* pView = GetNextView(pos);
00192   if (pView != NULL)
00193   {
00194     CFrameWnd* pFrameWnd = pView->GetParentFrame();
00195     pFrameWnd->ActivateFrame(SW_SHOW);
00196     pFrameWnd = pFrameWnd->GetParentFrame();
00197     if (pFrameWnd != NULL)
00198       pFrameWnd->ActivateFrame(SW_SHOW);
00199   }
00200 }
00201
00202 LPDISPATCH CAutoClickDoc::GetPosition()
00203 {
00204   CAutoClickPoint* pPos = new CAutoClickPoint;
00205   pPos->SetClickPoint(m_pt);
00206
00207   LPDISPATCH lpResult = pPos->GetIDispatch(FALSE);
00208   return lpResult;
00209 }
00210
00211 void CAutoClickDoc::SetPosition(LPDISPATCH newValue)
00212 {
00213   CAutoClickPoint* pPos = (CAutoClickPoint*)CCmdTarget::FromIDispatch(newValue);
00214   if (pPos != NULL && pPos->IsKindOf(RUNTIME_CLASS(CAutoClickPoint)))
00215   {
00216     m_pt = pPos->GetClickPoint();
00217     Refresh();
00218   }
00219 }
00220
00221 void CAutoClickDoc::TestErrorHandler(short wCode)
00222 {
00223   CString strError;
00224   strError.Format(IDS_TESTERROR, wCode);
00225   AfxThrowOleDispatchException((WORD)wCode,
00226                  strError,
00227                  (UINT)wCode);
00228 }
00229
00230 // DUAL_SUPPORT_START
00231
00232 // delegate standard IDispatch methods to MFC IDispatch implementation
00233 DELEGATE_DUAL_INTERFACE(CAutoClickDoc, DualAClick)
00234
00235 // Our method and property functions can generally just
00236 // delegate back to the methods we generated using
00237 // ClassWizard. However, if we set up properties to
00238 // access variables directly, we will need to write the
00239 //  code to get/put the value into the variable.
00240
00241 STDMETHODIMP CAutoClickDoc::XDualAClick::put_text(BSTR newText)
00242 {
00243   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00244
00245   TRY_DUAL(IID_IDualAClick)
00246   {
00247     // MFC automatically converts from Unicode BSTR to
00248     // Ansi CString, if necessary...
00249     pThis->m_str = newText;
00250     return NOERROR;
00251   }
00252   CATCH_ALL_DUAL
00253 }
00254
00255 STDMETHODIMP CAutoClickDoc::XDualAClick::get_text(BSTR* retval)
00256 {
00257   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00258
00259   TRY_DUAL(IID_IDualAClick)
00260   {
00261     // MFC automatically converts from Ansi CString to
00262     // Unicode BSTR, if necessary...
00263     pThis->m_str.SetSysString(retval);
00264     return NOERROR;
00265   }
00266   CATCH_ALL_DUAL
00267 }
00268
00269 STDMETHODIMP CAutoClickDoc::XDualAClick::put_x(short newX)
00270 {
00271   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00272
00273   TRY_DUAL(IID_IDualAClick)
00274   {
00275     pThis->SetX(newX);
00276     return NOERROR;
00277   }
00278   CATCH_ALL_DUAL
00279 }
00280
00281 STDMETHODIMP CAutoClickDoc::XDualAClick::get_x(short FAR* retval)
00282 {
00283   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00284
00285   TRY_DUAL(IID_IDualAClick)
00286   {
00287     *retval = pThis->GetX();
00288     return NOERROR;
00289   }
00290   CATCH_ALL_DUAL
00291 }
00292
00293 STDMETHODIMP CAutoClickDoc::XDualAClick::put_y(short newY)
00294 {
00295   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00296
00297   TRY_DUAL(IID_IDualAClick)
00298   {
00299     pThis->SetY(newY);
00300     return NOERROR;
00301   }
00302   CATCH_ALL_DUAL
00303 }
00304
00305 STDMETHODIMP CAutoClickDoc::XDualAClick::get_y(short FAR* retval)
00306 {
00307   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00308
00309   TRY_DUAL(IID_IDualAClick)
00310   {
00311     *retval = pThis->GetY();
00312     return NOERROR;
00313   }
00314   CATCH_ALL_DUAL
00315 }
00316
00317 STDMETHODIMP CAutoClickDoc::XDualAClick::put_Position(
00318   IDualAutoClickPoint FAR* newPosition)
00319 {
00320   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00321
00322   TRY_DUAL(IID_IDualAClick)
00323   {
00324     // Passing IDispatch-based interface pointers around doesn't
00325     // work quite as smoothly as you might think, especially if
00326     // you need to call CCmdTarget::FromIDispatch(), as our
00327     // SetPosition method does. Here's one way to work around this -
00328     // give SetPosition the original IDispatch that MFC sets up.
00329
00330     LPDISPATCH lpDisp = NULL;
00331     newPosition->QueryInterface(IID_IDispatch, (LPVOID*)&lpDisp);
00332     pThis->SetPosition(lpDisp);
00333     lpDisp->Release();
00334     return NOERROR;
00335   }
00336   CATCH_ALL_DUAL
00337 }
00338
00339 STDMETHODIMP CAutoClickDoc::XDualAClick::putref_Position(
00340   IDualAutoClickPoint FAR* newPosition)
00341 {
00342   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00343
00344   TRY_DUAL(IID_IDualAClick)
00345   {
00346     // Passing IDispatch-based interface pointers around doesn't
00347     // work quite as smoothly as you might think, especially if
00348     // you need to call CCmdTarget::FromIDispatch(), as our
00349     // SetPosition method does. Here's one way to work around this -
00350     // give SetPosition the original IDispatch that MFC sets up.
00351
00352     LPDISPATCH lpDisp = NULL;
00353     newPosition->QueryInterface(IID_IDispatch, (LPVOID*)&lpDisp);
00354     pThis->SetPosition(lpDisp);
00355     lpDisp->Release();
00356     return NOERROR;
00357   }
00358   CATCH_ALL_DUAL
00359 }
00360
00361 STDMETHODIMP CAutoClickDoc::XDualAClick::get_Position(
00362   IDualAutoClickPoint FAR* FAR* retval)
00363 {
00364   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00365
00366   TRY_DUAL(IID_IDualAClick)
00367   {
00368     // GetPosition gives us the original IDispatch that MFC
00369     // sets up, so we need to QI for the custom interface.
00370     LPDISPATCH lpDisp;
00371     lpDisp = pThis->GetPosition();
00372     lpDisp->QueryInterface(IID_IDualAutoClickPoint, (LPVOID*)retval);
00373     lpDisp->Release();
00374
00375     return NOERROR;
00376   }
00377   CATCH_ALL_DUAL
00378 }
00379
00380 STDMETHODIMP CAutoClickDoc::XDualAClick::RefreshWindow()
00381 {
00382   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00383
00384   TRY_DUAL(IID_IDualAClick)
00385   {
00386     pThis->Refresh();
00387     return NOERROR;
00388   }
00389   CATCH_ALL_DUAL
00390 }
00391
00392 STDMETHODIMP CAutoClickDoc::XDualAClick::SetAllProps(
00393   short x, short y, BSTR text)
00394 {
00395   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00396
00397   TRY_DUAL(IID_IDualAClick)
00398   {
00399     CString strTemp(text);
00400     pThis->SetAllProps(x, y, strTemp);
00401     return NOERROR;
00402   }
00403   CATCH_ALL_DUAL
00404 }
00405
00406 STDMETHODIMP CAutoClickDoc::XDualAClick::ShowWindow()
00407 {
00408   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00409
00410   TRY_DUAL(IID_IDualAClick)
00411   {
00412     pThis->ShowWindow();
00413     return NOERROR;
00414   }
00415   CATCH_ALL_DUAL
00416 }
00417
00418 STDMETHODIMP CAutoClickDoc::XDualAClick::TestError(short wCode)
00419 {
00420   METHOD_PROLOGUE(CAutoClickDoc, DualAClick)
00421
00422   TRY_DUAL(IID_IDualAClick)
00423   {
00424     pThis->TestErrorHandler(wCode);
00425     return NOERROR;
00426   }
00427   CATCH_ALL_DUAL
00428 }
00429
00430 // Implement ISupportErrorInfo to indicate we support the
00431 // OLE Automation error handler.
00432 IMPLEMENT_DUAL_ERRORINFO(CAutoClickDoc, IID_IDualAClick)
00433
00434 // DUAL_SUPPORT_END
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/ctrlbars.h Source File

  • general
  • ctrlbars

ctrlbars.h

Go to the documentation of this file.
00001 // ctrlbars.h : main header file for the CTRLBARS application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 #define WM_IDLEACTIVATE WM_USER+1
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CCtrlbarsApp:
00022 // See ctrlbars.cpp for the implementation of this class
00023 //
00024
00025 class CCtrlbarsApp : public CWinApp
00026 {
00027 public:
00028   CCtrlbarsApp();
00029
00030 // Overrides
00031   virtual BOOL InitInstance();
00032   virtual BOOL OnIdle(LONG lCount);
00033
00034 // Implementation
00035
00036   //{{AFX_MSG(CCtrlbarsApp)
00037   afx_msg void OnAppAbout();
00038   //}}AFX_MSG
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/targetver.h Source File

  • vc2008fp
  • WordPad

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/propset.cpp Source File

  • ole
  • drawcli

propset.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011
00012 #include <malloc.h>
00013 #include <ole2.h>
00014 #include <oleauto.h>
00015 #include "propset.h"
00016
00017 #pragma warning ( disable : 4311 4312 )
00018
00019 #ifdef AFXCTL_PROP_SEG
00020 #pragma code_seg(AFXCTL_PROP_SEG)
00021 #endif
00022
00023 #ifdef _DEBUG
00024 #undef THIS_FILE
00025 static char THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 #define new DEBUG_NEW
00029
00030
00031 static LPVOID CountPrefixedStringA(LPCSTR lpsz)
00032 {
00033   DWORD cb = (lstrlenA( lpsz ) + 1);
00034   LPDWORD lp = (LPDWORD)malloc( (int)cb + sizeof(DWORD) );
00035   if (lp)
00036   {
00037     *lp = cb;
00038     strcpy_s( (LPSTR)(lp+1), (int)cb, lpsz );
00039   }
00040
00041   return (LPVOID)lp;
00042 }
00043
00044
00045 static LPVOID CountPrefixedStringW(LPCWSTR lpsz)
00046 {
00047   DWORD cb = (DWORD)(wcslen( lpsz ) + 1);
00048   LPDWORD lp = (LPDWORD)malloc( (int)cb * sizeof(WCHAR) + sizeof(DWORD) );
00049   if (lp)
00050   {
00051     *lp = cb;
00052     wcscpy_s( (LPWSTR)(lp+1), (int)cb, lpsz );
00053   }
00054
00055   return (LPVOID)lp;
00056 }
00057
00058
00059 #ifdef _UNICODE
00060 #define CountPrefixedStringT CountPrefixedStringW
00061 #else
00062 #define CountPrefixedStringT CountPrefixedStringA
00063 #endif
00064
00065
00066 #ifdef _UNICODE
00067
00068 #define MAX_STRLEN 1024
00069
00070 static LPBYTE ConvertStringProp(LPBYTE pbProp, DWORD dwType, ULONG nReps,
00071   size_t cbCharSize)
00072 {
00073   LPBYTE pbResult = NULL; // Return value
00074   ULONG cbResult = 0;     // Number of bytes in pbResult
00075   LPBYTE pbBuffer;        // Temporary holding space
00076   ULONG cchOrig;          // Number of characters in original string
00077   ULONG cchCopy;          // Number of characters to copy
00078   ULONG cbCopy;           // Number of bytes to copy
00079   LPBYTE pbResultNew;     // Used for realloc of pbResult
00080
00081   pbBuffer = (LPBYTE)malloc(MAX_STRLEN * cbCharSize);
00082   if (pbBuffer == NULL)
00083     return NULL;
00084
00085   // If it's a vector, the count goes first.
00086   if (dwType & VT_VECTOR)
00087   {
00088     pbResult = (LPBYTE)malloc(sizeof(DWORD));
00089     if (pbResult == NULL)
00090     {
00091       free(pbBuffer);
00092       return NULL;
00093     }
00094     *(LPDWORD)pbResult = nReps;
00095     cbResult = sizeof(DWORD);
00096   }
00097
00098   while (nReps--)
00099   {
00100     cchOrig = *(LPDWORD)pbProp;
00101     pbProp += sizeof(DWORD);
00102
00103     // Convert multibyte string to Unicode.
00104     if (cbCharSize == sizeof(WCHAR))
00105     {
00106       cchCopy = MultiByteToWideChar(CP_ACP, 0, (LPSTR)pbProp, -1,
00107         (LPWSTR)pbBuffer, min(cchOrig, MAX_STRLEN));
00108     }
00109     else
00110     {
00111       cchCopy = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)pbProp, -1,
00112         (LPSTR)pbBuffer, min(cchOrig, MAX_STRLEN), NULL, NULL);
00113     }
00114
00115     // Allocate space to append string.
00116     cbCopy = cchCopy * cbCharSize;
00117     pbResultNew = (LPBYTE)realloc(pbResult, cbResult + sizeof(DWORD) +
00118       cbCopy);
00119
00120     // If allocation failed, cleanup and return NULL;
00121     if (pbResultNew == NULL)
00122     {
00123       free(pbResult);
00124       free(pbBuffer);
00125       return NULL;
00126     }
00127
00128     pbResult = pbResultNew;
00129
00130     // Copy character count and converted string into place,
00131     // then update the total size.
00132     memcpy(pbResult + cbResult, (LPBYTE)&cchCopy, sizeof(DWORD));
00133     memcpy(pbResult + cbResult + sizeof(DWORD), pbBuffer, cbCopy);
00134     cbResult += sizeof(DWORD) + cbCopy;
00135
00136     // Advance to the next vector element
00137     pbProp += (cchOrig * cbCharSize);
00138   }
00139
00140   free(pbBuffer);
00141   return pbResult;
00142 }
00143
00144 #endif // _UNICODE
00145
00146
00147 /////////////////////////////////////////////////////////////////////////////
00148 //Implementation of the CProperty class
00149
00150 CProperty::CProperty( void )
00151 {
00152   m_dwPropID = 0;
00153
00154   m_dwType = VT_EMPTY;
00155   m_pValue = NULL;       // must init to NULL
00156 }
00157
00158 CProperty::CProperty( DWORD dwID, const LPVOID pValue, DWORD dwType )
00159 {
00160   m_dwPropID = dwID;
00161   m_dwType = dwType;
00162   m_pValue = NULL;       // must init to NULL
00163   Set( dwID, pValue, dwType );
00164 }
00165
00166 CProperty::~CProperty()
00167 {
00168   FreeValue();
00169 }
00170
00171 BOOL CProperty::Set( DWORD dwID, const LPVOID pValue, DWORD dwType )
00172 {
00173   m_dwType = dwType;
00174   m_dwPropID = dwID;
00175
00176   return Set( pValue );
00177 }
00178
00179 BOOL CProperty::Set( const LPVOID pValue, DWORD dwType )
00180 {
00181   m_dwType = dwType;
00182   return Set( pValue );
00183 }
00184
00185 BOOL CProperty::Set( const  LPVOID pVal )
00186 {
00187   ULONG           cb;
00188   ULONG           cbItem;
00189   ULONG           cbValue;
00190   ULONG           nReps;
00191   LPBYTE          pCur;
00192   LPVOID          pValue = pVal;
00193   DWORD           dwType = m_dwType;
00194   LPVOID          pValueOrig = NULL;
00195
00196   if (m_pValue != NULL)
00197   {
00198     FreeValue();
00199   }
00200
00201   if (pValue == NULL || m_dwType == 0)
00202     return TRUE;
00203
00204   // Given pValue, determine how big it is
00205   // Then allocate a new buffer for m_pValue and copy...
00206   nReps = 1;
00207   cbValue = 0;
00208   pCur = (LPBYTE)pValue;
00209   if (m_dwType & VT_VECTOR)
00210   {
00211     // The next DWORD is a count of the elements
00212     nReps = *(LPDWORD)pValue;
00213     cb = sizeof( nReps );
00214     pCur += cb;
00215     cbValue += cb;
00216     dwType &= ~VT_VECTOR;
00217   }
00218   else
00219   {
00220     // If we get any of the string-like types,
00221     // and we are not a vector create a count-prefixed
00222     // buffer.
00223     switch (dwType )
00224     {
00225       case VT_LPSTR:          // null terminated string
00226         pValueOrig = pValue;
00227         pValue = CountPrefixedStringA( (LPSTR)pValueOrig );
00228         pCur = (LPBYTE)pValue;
00229       break;
00230
00231       case VT_BSTR:           // binary string
00232       case VT_STREAM:         // Name of the stream follows
00233       case VT_STORAGE:        // Name of the storage follows
00234       case VT_STREAMED_OBJECT:// Stream contains an object
00235       case VT_STORED_OBJECT:  // Storage contains an object
00236         pValueOrig = pValue;
00237         pValue = CountPrefixedStringT( (LPTSTR)pValueOrig );
00238         pCur = (LPBYTE)pValue;
00239       break;
00240
00241       case VT_LPWSTR:         // UNICODE string
00242         pValueOrig = pValue;
00243         pValue = CountPrefixedStringW( (LPWSTR)pValueOrig );
00244         pCur = (LPBYTE)pValue;
00245       break;
00246     }
00247   }
00248
00249   // Since a value can be made up of a vector (VT_VECTOR) of
00250   // items, we first seek through the value, picking out
00251   // each item, getting it's size.
00252   //
00253   cbItem = 0;        // Size of the current item
00254   while (nReps--)
00255   {
00256     switch (dwType)
00257     {
00258       case VT_EMPTY:          // nothing
00259         cbItem = 0;
00260       break;
00261
00262       case VT_I2:             // 2 byte signed int
00263       case VT_BOOL:           // True=-1, False=0
00264         cbItem = 2;
00265       break;
00266
00267       case VT_I4:             // 4 byte signed int
00268       case VT_R4:             // 4 byte real
00269         cbItem = 4;
00270       break;
00271
00272       case VT_R8:             // 8 byte real
00273       case VT_CY:             // currency
00274       case VT_DATE:           // date
00275       case VT_I8:             // signed 64-bit int
00276       case VT_FILETIME:       // FILETIME
00277         cbItem = 8;
00278       break;
00279
00280       case VT_CLSID:          // A Class ID
00281         cbItem = sizeof(CLSID);
00282       break;
00283
00284 #ifndef _UNICODE
00285       case VT_BSTR:           // binary string
00286       case VT_STREAM:         // Name of the stream follows
00287       case VT_STORAGE:        // Name of the storage follows
00288       case VT_STREAMED_OBJECT:// Stream contains an object
00289       case VT_STORED_OBJECT:  // Storage contains an object
00290       case VT_STREAMED_PROPSET:// Stream contains a propset
00291       case VT_STORED_PROPSET: // Storage contains a propset
00292 #endif // _UNICODE
00293       case VT_LPSTR:          // null terminated string
00294       case VT_BLOB_OBJECT:    // Blob contains an object
00295       case VT_BLOB_PROPSET:   // Blob contains a propset
00296       case VT_BLOB:           // Length prefixed bytes
00297       case VT_CF:             // Clipboard format
00298         // Get the DWORD that gives us the size, making
00299         // sure we increment cbValue.
00300         cbItem = *(LPDWORD)pCur;
00301         cb = sizeof(cbItem);
00302         pCur += cb;
00303         cbValue += cb;
00304       break;
00305
00306 #ifdef _UNICODE
00307       case VT_BSTR:           // binary string
00308       case VT_STREAM:         // Name of the stream follows
00309       case VT_STORAGE:        // Name of the storage follows
00310       case VT_STREAMED_OBJECT:// Stream contains an object
00311       case VT_STORED_OBJECT:  // Storage contains an object
00312       case VT_STREAMED_PROPSET:// Stream contains a propset
00313       case VT_STORED_PROPSET: // Storage contains a propset
00314 #endif // _UNICODE
00315       case VT_LPWSTR:         // UNICODE string
00316         cbItem = *(LPDWORD)pCur * sizeof(WCHAR);
00317         cb = sizeof( cbItem );
00318         pCur += cb;
00319         cbValue += cb;
00320       break;
00321       case VT_VARIANT:        // VARIANT*
00322       break;
00323
00324       default:
00325         if (pValueOrig)
00326           free( pValue );
00327         return FALSE;
00328     }
00329
00330     // Add 'cb' to cbItem before seeking...
00331     //
00332     // Seek to the next item
00333     pCur += cbItem;
00334     cbValue += cbItem;
00335   }
00336
00337   if (NULL == AllocValue(cbValue))
00338   {
00339     TRACE0("CProperty::AllocValue failed");
00340     return FALSE;
00341   }
00342   memcpy_s( m_pValue, (int)cbValue, pValue, (int)cbValue );
00343
00344   if (pValueOrig)
00345     free( pValue );
00346
00347   return TRUE;
00348 }
00349
00350 LPVOID CProperty::Get( void )
00351 {   return Get( (DWORD*)NULL );   }
00352
00353 LPVOID CProperty::Get( DWORD* pcb )
00354 {
00355   DWORD   cb = 0;
00356   LPBYTE  p = NULL;
00357
00358   p = (LPBYTE)m_pValue;
00359
00360   // m_pValue points to a Property "Value" which may
00361   // have size information included...
00362   switch( m_dwType )
00363   {
00364     case VT_EMPTY:          // nothing
00365       cb = 0;
00366     break;
00367
00368     case VT_I2:             // 2 byte signed int
00369     case VT_BOOL:           // True=-1, False=0
00370       cb = 2;
00371     break;
00372
00373     case VT_I4:             // 4 byte signed int
00374     case VT_R4:             // 4 byte real
00375       cb = 4;
00376     break;
00377
00378     case VT_R8:             // 8 byte real
00379     case VT_CY:             // currency
00380     case VT_DATE:           // date
00381     case VT_I8:             // signed 64-bit int
00382     case VT_FILETIME:       // FILETIME
00383       cb = 8;
00384     break;
00385
00386 #ifndef _UNICODE
00387     case VT_BSTR:           // binary string
00388     case VT_STREAM:         // Name of the stream follows
00389     case VT_STORAGE:        // Name of the storage follows
00390     case VT_STREAMED_OBJECT:// Stream contains an object
00391     case VT_STORED_OBJECT:  // Storage contains an object
00392     case VT_STREAMED_PROPSET:// Stream contains a propset
00393     case VT_STORED_PROPSET: // Storage contains a propset
00394 #endif // UNICODE
00395     case VT_LPSTR:          // null terminated string
00396     case VT_CF:             // Clipboard format
00397       // Read the DWORD that gives us the size, making
00398       // sure we increment cbValue.
00399       cb = *(LPDWORD)p;
00400       p += sizeof( DWORD );
00401     break;
00402
00403     case VT_BLOB:           // Length prefixed bytes
00404     case VT_BLOB_OBJECT:    // Blob contains an object
00405     case VT_BLOB_PROPSET:   // Blob contains a propset
00406       // Read the DWORD that gives us the size.
00407       cb = *(LPDWORD)p;
00408     break;
00409
00410 #ifdef _UNICODE
00411     case VT_BSTR:           // binary string
00412     case VT_STREAM:         // Name of the stream follows
00413     case VT_STORAGE:        // Name of the storage follows
00414     case VT_STREAMED_OBJECT:// Stream contains an object
00415     case VT_STORED_OBJECT:  // Storage contains an object
00416     case VT_STREAMED_PROPSET:// Stream contains a propset
00417     case VT_STORED_PROPSET: // Storage contains a propset
00418 #endif // _UNICODE
00419     case VT_LPWSTR:         // UNICODE string
00420       cb = *(LPDWORD)p * sizeof(WCHAR);
00421       p += sizeof( DWORD );
00422     break;
00423
00424     case VT_CLSID:          // A Class ID
00425       cb = sizeof(CLSID);
00426     break;
00427
00428     case VT_VARIANT:        // VARIANT*
00429     break;
00430
00431     default:
00432       return NULL;
00433   }
00434   if (pcb != NULL)
00435     *pcb = cb;
00436
00437   return p;
00438 }
00439
00440 DWORD  CProperty::GetType( void )
00441 {   return m_dwType;  }
00442
00443 void   CProperty::SetType( DWORD dwType )
00444 {   m_dwType = dwType; }
00445
00446 DWORD CProperty::GetID( void )
00447 {   return m_dwPropID;   }
00448
00449 void CProperty::SetID( DWORD dwPropID )
00450 {    m_dwPropID = dwPropID;   }
00451
00452 LPVOID CProperty::GetRawValue( void )
00453 {   return m_pValue; }
00454
00455 BOOL CProperty::WriteToStream( IStream* pIStream )
00456 {
00457   ULONG           cb = 0;
00458   ULONG           cbTotal; // Total size of the whole value
00459   DWORD           dwType = m_dwType;
00460   DWORD           nReps;
00461   LPBYTE          pValue;
00462   LPBYTE          pCur;
00463   BOOL            bSuccess = FALSE;
00464   BYTE            b = 0;
00465
00466   nReps = 1;
00467   pValue = (LPBYTE)m_pValue;
00468   pCur = pValue;
00469   cbTotal = 0;
00470   if (m_dwType & VT_VECTOR)
00471   {
00472     // Value is a DWORD count of elements followed by
00473     // that many repititions of the value.
00474     //
00475     nReps = *(LPDWORD)pCur;
00476     cbTotal = sizeof(DWORD);
00477     pCur += cbTotal;
00478     dwType &= ~VT_VECTOR;
00479   }
00480
00481 #ifdef _UNICODE
00482   switch (dwType)
00483   {
00484     case VT_BSTR:           // binary string
00485     case VT_STREAM:         // Name of the stream follows
00486     case VT_STORAGE:        // Name of the storage follows
00487     case VT_STREAMED_OBJECT:// Stream contains an object
00488     case VT_STORED_OBJECT:  // Storage contains an object
00489     case VT_STREAMED_PROPSET:// Stream contains a propset
00490     case VT_STORED_PROPSET: // Storage contains a propset
00491       pValue = ConvertStringProp(pCur, m_dwType, nReps, sizeof(char));
00492       if (m_dwType & VT_VECTOR)
00493         pCur = pValue + sizeof(DWORD);
00494     break;
00495   }
00496 #endif // _UNICODE
00497
00498   // Figure out how big the data is.
00499   while (nReps--)
00500   {
00501     switch (dwType)
00502     {
00503       case VT_EMPTY:          // nothing
00504         cb = 0;
00505       break;
00506
00507       case VT_I2:             // 2 byte signed int
00508       case VT_BOOL:           // True=-1, False=0
00509         cb = 2;
00510       break;
00511
00512       case VT_I4:             // 4 byte signed int
00513       case VT_R4:             // 4 byte real
00514         cb = 4;
00515       break;
00516
00517       case VT_R8:             // 8 byte real
00518       case VT_CY:             // currency
00519       case VT_DATE:           // date
00520       case VT_I8:             // signed 64-bit int
00521       case VT_FILETIME:       // FILETIME
00522         cb = 8;
00523       break;
00524
00525       case VT_LPSTR:          // null terminated string
00526       case VT_BSTR:           // binary string
00527       case VT_STREAM:         // Name of the stream follows
00528       case VT_STORAGE:        // Name of the storage follows
00529       case VT_STREAMED_OBJECT:// Stream contains an object
00530       case VT_STORED_OBJECT:  // Storage contains an object
00531       case VT_STREAMED_PROPSET:// Stream contains a propset
00532       case VT_STORED_PROPSET: // Storage contains a propset
00533       case VT_BLOB:           // Length prefixed bytes
00534       case VT_BLOB_OBJECT:    // Blob contains an object
00535       case VT_BLOB_PROPSET:   // Blob contains a propset
00536       case VT_CF:             // Clipboard format
00537         cb = sizeof(DWORD) + *(LPDWORD)pCur;
00538       break;
00539
00540       case VT_LPWSTR:         // UNICODE string
00541         cb = sizeof(DWORD) + (*(LPDWORD)pCur * sizeof(WCHAR));
00542       break;
00543
00544       case VT_CLSID:          // A Class ID
00545         cb = sizeof(CLSID);
00546       break;
00547
00548       case VT_VARIANT:        // VARIANT*
00549       break;
00550
00551       default:
00552         return FALSE;
00553     }
00554
00555     pCur += cb;
00556     cbTotal+= cb;
00557   }
00558
00559   // Write the type
00560   pIStream->Write((LPVOID)&m_dwType, sizeof(m_dwType), &cb);
00561   if (cb != sizeof(m_dwType))
00562     goto Cleanup;
00563
00564   // Write the value
00565   pIStream->Write((LPVOID)pValue, cbTotal, &cb);
00566   if (cb != cbTotal)
00567     goto Cleanup;
00568
00569   // Make sure we are 32 bit aligned
00570   cbTotal = (((cbTotal + 3) >> 2) << 2) - cbTotal;
00571   while (cbTotal--)
00572   {
00573     pIStream->Write((LPVOID)&b, 1, &cb);
00574     if (cb != sizeof(BYTE))
00575       goto Cleanup;
00576   }
00577
00578   bSuccess = TRUE;
00579
00580 Cleanup:
00581   if (pValue != m_pValue)
00582     free(pValue);
00583
00584   return bSuccess;
00585 }
00586
00587 BOOL CProperty::ReadFromStream( IStream* pIStream )
00588 {
00589   ULONG           cb;
00590   ULONG           cbItem;
00591   ULONG           cbValue;
00592   DWORD           dwType;
00593   ULONG           nReps;
00594   ULONG           iReps;
00595   LPSTREAM        pIStrItem;
00596   LARGE_INTEGER   li;
00597
00598   // All properties are made up of a type/value pair.
00599   // The obvious first thing to do is to get the type...
00600   pIStream->Read( (LPVOID)&m_dwType, sizeof(m_dwType), &cb );
00601   if (cb != sizeof(m_dwType))
00602     return FALSE;
00603
00604   dwType = m_dwType;
00605   nReps = 1;
00606   cbValue = 0;
00607   if (m_dwType & VT_VECTOR)
00608   {
00609     // The next DWORD in the stream is a count of the
00610     // elements
00611     pIStream->Read( (LPVOID)&nReps, sizeof(nReps), &cb );
00612     if (cb != sizeof(nReps))
00613       return FALSE;
00614     cbValue += cb;
00615     dwType &= ~VT_VECTOR;
00616   }
00617
00618   // Since a value can be made up of a vector (VT_VECTOR) of
00619   // items, we first seek through the value, picking out
00620   // each item, getting it's size.  We use a cloned
00621   // stream for this (pIStrItem).
00622   // We then use our pIStream to read the entire 'blob' into
00623   // the allocated buffer.
00624   //
00625   cbItem = 0;        // Size of the current item
00626   pIStream->Clone( &pIStrItem );
00627   ENSURE(pIStrItem != NULL);
00628   iReps = nReps;
00629   while (iReps--)
00630   {
00631     switch (dwType)
00632     {
00633       case VT_EMPTY:          // nothing
00634         cbItem = 0;
00635       break;
00636
00637       case VT_I2:             // 2 byte signed int
00638       case VT_BOOL:           // True=-1, False=0
00639         cbItem = 2;
00640       break;
00641
00642       case VT_I4:             // 4 byte signed int
00643       case VT_R4:             // 4 byte real
00644         cbItem = 4;
00645       break;
00646
00647       case VT_R8:             // 8 byte real
00648       case VT_CY:             // currency
00649       case VT_DATE:           // date
00650       case VT_I8:             // signed 64-bit int
00651       case VT_FILETIME:       // FILETIME
00652         cbItem = 8;
00653       break;
00654
00655       case VT_LPSTR:          // null terminated string
00656       case VT_BSTR:           // binary string
00657       case VT_STREAM:         // Name of the stream follows
00658       case VT_STORAGE:        // Name of the storage follows
00659       case VT_STREAMED_OBJECT:// Stream contains an object
00660       case VT_STORED_OBJECT:  // Storage contains an object
00661       case VT_STREAMED_PROPSET:// Stream contains a propset
00662       case VT_STORED_PROPSET: // Storage contains a propset
00663       case VT_BLOB:           // Length prefixed bytes
00664       case VT_BLOB_OBJECT:    // Blob contains an object
00665       case VT_BLOB_PROPSET:   // Blob contains a propset
00666       case VT_CF:             // Clipboard format
00667         // Read the DWORD that gives us the size, making
00668         // sure we increment cbValue.
00669         pIStream->Read( (LPVOID)&cbItem, sizeof(cbItem), &cb );
00670         if (cb != sizeof(cbItem))
00671           return FALSE;
00672         LISet32( li, -(LONG)cb );
00673         pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
00674         cbValue += cb;
00675       break;
00676
00677       case VT_LPWSTR:         // UNICODE string
00678         pIStream->Read( (LPVOID)&cbItem, sizeof(cbItem), &cb );
00679         if (cb != sizeof(cbItem))
00680           return FALSE;
00681         LISet32( li, -(LONG)cb );
00682         pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
00683         cbValue += cb;
00684         cbItem *= sizeof(WCHAR);
00685       break;
00686
00687       case VT_CLSID:          // A Class ID
00688         cbItem = sizeof(CLSID);
00689       break;
00690
00691       case VT_VARIANT:        // VARIANT*
00692       break;
00693
00694       default:
00695         pIStrItem->Release();
00696         return FALSE;
00697     }
00698
00699     // Add 'cb' to cbItem before seeking...
00700     //
00701     // Seek to the next item
00702     LISet32( li, cbItem );
00703     pIStrItem->Seek( li, STREAM_SEEK_CUR, NULL);
00704     cbValue += cbItem;
00705   }
00706
00707   pIStrItem->Release();
00708
00709 #ifdef _UNICODE
00710   LPBYTE pTmp;
00711
00712   switch (dwType)
00713   {
00714     case VT_BSTR:           // binary string
00715     case VT_STREAM:         // Name of the stream follows
00716     case VT_STORAGE:        // Name of the storage follows
00717     case VT_STREAMED_OBJECT:// Stream contains an object
00718     case VT_STORED_OBJECT:  // Storage contains an object
00719     case VT_STREAMED_PROPSET:// Stream contains a propset
00720     case VT_STORED_PROPSET: // Storage contains a propset
00721       pTmp = (LPBYTE)malloc((int)cbValue);
00722       pIStream->Read( pTmp, cbValue, &cb );
00723       m_pValue = ConvertStringProp(pTmp, m_dwType, nReps, sizeof(WCHAR));
00724       free(pTmp);
00725     break;
00726
00727     default:
00728 #endif // _UNICODE
00729       // Allocate cbValue bytes
00730       if (NULL == AllocValue(cbValue))
00731         return FALSE;
00732
00733       // Read the buffer from pIStream
00734       pIStream->Read( m_pValue, cbValue, &cb );
00735       if (cb != cbValue)
00736         return FALSE;
00737 #ifdef _UNICODE
00738     break;
00739   }
00740 #endif // _UNICODE
00741
00742   // Done!
00743   return TRUE;
00744 }
00745
00746
00747 LPVOID CProperty::AllocValue(ULONG cb)
00748 {
00749   return m_pValue = malloc((int)cb);
00750 }
00751
00752
00753 void CProperty::FreeValue()
00754 {
00755   if (m_pValue != NULL)
00756   {
00757     free(m_pValue);
00758     m_pValue = NULL;
00759   }
00760 }
00761
00762 /////////////////////////////////////////////////////////////////////////////
00763 // Implementation of the CPropertySection Class
00764
00765 CPropertySection::CPropertySection( void )
00766 {
00767   m_FormatID = GUID_NULL;
00768   m_SH.cbSection = 0;
00769   m_SH.cProperties = 0;
00770 }
00771
00772 CPropertySection::CPropertySection( CLSID FormatID )
00773 {
00774   m_FormatID = FormatID;
00775   m_SH.cbSection = 0;
00776   m_SH.cProperties = 0;
00777 }
00778
00779 CPropertySection::~CPropertySection( void )
00780 {
00781   RemoveAll();
00782   return;
00783 }
00784
00785 CLSID CPropertySection::GetFormatID( void )
00786 {   return m_FormatID; }
00787
00788 void CPropertySection::SetFormatID( CLSID FormatID )
00789 {   m_FormatID = FormatID; }
00790
00791 BOOL CPropertySection::Set( DWORD dwPropID, LPVOID pValue, DWORD dwType )
00792 {
00793   CProperty* pProp = GetProperty( dwPropID );
00794   if (pProp == NULL)
00795   {
00796     if ((pProp = new CProperty( dwPropID, pValue, dwType )) != NULL)
00797       AddProperty( pProp );
00798     return (pProp != NULL);
00799   }
00800
00801   pProp->Set( dwPropID, pValue, dwType );
00802   return TRUE;
00803 }
00804
00805 BOOL CPropertySection::Set( DWORD dwPropID, LPVOID pValue )
00806 {
00807   // Since no dwType was specified, the property is assumed
00808   // to exist.   Fail if it does not.
00809   CProperty* pProp = GetProperty( dwPropID );
00810   if (pProp != NULL && pProp->m_dwType)
00811   {
00812     pProp->Set( dwPropID, pValue, pProp->m_dwType );
00813     return TRUE;
00814   }
00815   else
00816     return FALSE;
00817 }
00818
00819 LPVOID CPropertySection::Get( DWORD dwPropID )
00820 {   return Get( dwPropID, (DWORD*)NULL );  }
00821
00822 LPVOID CPropertySection::Get( DWORD dwPropID, DWORD* pcb )
00823 {
00824   CProperty* pProp = GetProperty(dwPropID);
00825   if (pProp)
00826   {
00827     ASSERT_VALID(pProp);
00828     return pProp->Get(pcb);
00829   }
00830   else
00831     return NULL;
00832 }
00833
00834 void CPropertySection::Remove( DWORD dwID )
00835 {
00836   POSITION pos = m_PropList.GetHeadPosition();
00837   CProperty*  pProp;
00838   while( pos != NULL )
00839   {
00840     POSITION posRemove = pos;
00841     pProp = (CProperty*)m_PropList.GetNext( pos );
00842     if (pProp->m_dwPropID == dwID)
00843     {
00844       m_PropList.RemoveAt( posRemove );
00845       delete pProp;
00846       m_SH.cProperties--;
00847       return;
00848     }
00849   }
00850 }
00851
00852 void CPropertySection::RemoveAll( )
00853 {
00854   POSITION pos = m_PropList.GetHeadPosition();
00855   while( pos != NULL )
00856     delete (CProperty*)m_PropList.GetNext( pos );
00857   m_PropList.RemoveAll();
00858   m_SH.cProperties = 0;
00859 }
00860
00861
00862 CProperty* CPropertySection::GetProperty( DWORD dwPropID )
00863 {
00864   POSITION pos = m_PropList.GetHeadPosition();
00865   ASSERT_VALID(&m_PropList);
00866   CProperty* pProp;
00867   while (pos != NULL)
00868   {
00869     pProp= (CProperty*)m_PropList.GetNext( pos );
00870     ASSERT_VALID(pProp);
00871     if (pProp->m_dwPropID == dwPropID)
00872       return pProp;
00873   }
00874   return NULL;
00875 }
00876
00877 void CPropertySection::AddProperty( CProperty* pProp )
00878 {
00879   m_PropList.AddTail( pProp );
00880   m_SH.cProperties++;
00881 }
00882
00883 DWORD CPropertySection::GetSize( void )
00884 {   return m_SH.cbSection; }
00885
00886 DWORD CPropertySection::GetCount( void )
00887 {   return (DWORD)m_PropList.GetCount();  }
00888
00889 CObList* CPropertySection::GetList( void )
00890 {   return &m_PropList;  }
00891
00892 BOOL CPropertySection::WriteToStream( IStream* pIStream )
00893 {
00894   // Create a dummy property entry for the name dictionary (ID == 0).
00895   Set(0, NULL, VT_EMPTY);
00896
00897   ULONG           cb;
00898   ULARGE_INTEGER  ulSeekOld;
00899   ULARGE_INTEGER  ulSeek;
00900   LPSTREAM        pIStrPIDO;
00901   PROPERTYIDOFFSET  pido;
00902   LARGE_INTEGER   li;
00903
00904   // The Section header contains the number of bytes in the
00905   // section.  Thus we need  to go back to where we should
00906   // write the count of bytes
00907   // after we write all the property sets..
00908   // We accomplish this by saving the seek pointer to where
00909   // the size should be written in ulSeekOld
00910   m_SH.cbSection = 0;
00911   m_SH.cProperties = (DWORD)m_PropList.GetCount();
00912   LISet32( li, 0 );
00913   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeekOld);
00914
00915   pIStream->Write((LPVOID)&m_SH, sizeof(m_SH), &cb);
00916   if (sizeof(m_SH) != cb)
00917   {
00918     TRACE0("Write of section header failed (1).\n");
00919     return FALSE;
00920   }
00921
00922   if (m_PropList.IsEmpty())
00923   {
00924     TRACE0("Warning: Wrote empty property section.\n");
00925     return TRUE;
00926   }
00927
00928   // After the section header is the list of property ID/Offset pairs
00929   // Since there is an ID/Offset pair for each property and we
00930   // need to write the ID/Offset pair as we write each property
00931   // we clone the stream and use the clone to access the
00932   // table of ID/offset pairs (PIDO)...
00933   //
00934   pIStream->Clone( &pIStrPIDO );
00935
00936   // Now seek pIStream past the PIDO list
00937   //
00938   LISet32( li,  m_SH.cProperties * sizeof( PROPERTYIDOFFSET ) );
00939   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek);
00940
00941   // Now write each section to pIStream.
00942   CProperty* pProp = NULL;
00943   POSITION pos = m_PropList.GetHeadPosition();
00944   while( pos != NULL )
00945   {
00946     // Get next element (note cast)
00947     pProp = (CProperty*)m_PropList.GetNext( pos );
00948
00949     if (pProp->m_dwPropID != 0)
00950     {
00951       // Write it
00952       if (!pProp->WriteToStream( pIStream ))
00953       {
00954         pIStrPIDO->Release();
00955         return FALSE;
00956       }
00957     }
00958     else
00959     {
00960       if (!WriteNameDictToStream( pIStream ))
00961       {
00962         pIStrPIDO->Release();
00963         return FALSE;
00964       }
00965     }
00966
00967     // Using our cloned stream write the Format ID / Offset pair
00968     // The offset to this property is the current seek pointer
00969     // minus the pointer to the beginning of the section
00970     pido.dwOffset = ulSeek.LowPart - ulSeekOld.LowPart;
00971     pido.propertyID = pProp->m_dwPropID;
00972     pIStrPIDO->Write((LPVOID)&pido, sizeof(pido), &cb);
00973     if (sizeof(pido) != cb)
00974     {
00975       TRACE0("Write of 'pido' failed\n");
00976       pIStrPIDO->Release();
00977       return FALSE;
00978     }
00979
00980     // Get the seek offset after the write
00981     LISet32( li, 0 );
00982     pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek );
00983   }
00984
00985   pIStrPIDO->Release();
00986
00987   // Now go back to ulSeekOld and write the section header.
00988   // Size of section is current seek point minus old seek point
00989   //
00990   m_SH.cbSection = ulSeek.LowPart - ulSeekOld.LowPart;
00991
00992   // Seek to beginning of this section and write the section header.
00993   LISet32( li, ulSeekOld.LowPart );
00994   pIStream->Seek( li, STREAM_SEEK_SET, NULL );
00995   pIStream->Write((LPVOID)&m_SH, sizeof(m_SH), &cb);
00996   if (sizeof(m_SH) != cb)
00997   {
00998     TRACE0("Write of section header failed (2).\n");
00999     return FALSE;
01000   }
01001
01002   // Now seek to end of of the now written section
01003   LISet32(li, ulSeek.LowPart);
01004   pIStream->Seek(li, STREAM_SEEK_SET, NULL);
01005
01006   return TRUE;
01007 }
01008
01009 BOOL CPropertySection::ReadFromStream( IStream* pIStream,
01010   LARGE_INTEGER liPropSet )
01011 {
01012   ULONG               cb;
01013   PROPERTYIDOFFSET    pido;
01014   ULONG               cProperties;
01015   LPSTREAM            pIStrPIDO;
01016   ULARGE_INTEGER      ulSectionStart;
01017   LARGE_INTEGER       li;
01018   CProperty*          pProp;
01019
01020   if (m_SH.cProperties || !m_PropList.IsEmpty())
01021     RemoveAll();
01022
01023   // pIStream is pointing to the beginning of the section we
01024   // are to read.  First there is a DWORD that is the count
01025   // of bytes in this section, then there is a count
01026   // of properties, followed by a list of propertyID/offset pairs,
01027   // followed by type/value pairs.
01028   //
01029   LISet32( li, 0 );
01030   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSectionStart );
01031   pIStream->Read( (LPVOID)&m_SH, sizeof(m_SH), &cb );
01032   if (cb != sizeof(m_SH))
01033     return FALSE;
01034
01035   // Now we're pointing at the first of the PropID/Offset pairs
01036   // (PIDOs).   To get to each property we use a cloned stream
01037   // to stay back and point at the PIDOs (pIStrPIDO).  We seek
01038   // pIStream to each of the Type/Value pairs, creating CProperites
01039   // and so forth as we go...
01040   //
01041   pIStream->Clone( &pIStrPIDO );
01042
01043   cProperties = m_SH.cProperties;
01044   while (cProperties--)
01045   {
01046     pIStrPIDO->Read( (LPVOID)&pido, sizeof( pido ), &cb );
01047     if (cb != sizeof(pido))
01048     {
01049       pIStrPIDO->Release();
01050       return FALSE;
01051     }
01052
01053     // Do a seek from the beginning of the property set.
01054     LISet32( li, ulSectionStart.LowPart + pido.dwOffset );
01055     pIStream->Seek( liPropSet, STREAM_SEEK_SET, NULL );
01056     pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
01057
01058     // Now pIStream is at the type/value pair
01059     if (pido.propertyID != 0)
01060     {
01061       pProp = new CProperty( pido.propertyID, NULL, 0 );
01062       pProp->ReadFromStream( pIStream );
01063       ASSERT_VALID(pProp);
01064       m_PropList.AddTail( pProp );
01065       ASSERT_VALID(&m_PropList);
01066     }
01067     else
01068     {
01069       ReadNameDictFromStream( pIStream );
01070     }
01071   }
01072
01073   pIStrPIDO->Release();
01074
01075   return TRUE;
01076 }
01077
01078 BOOL CPropertySection::GetID( LPCTSTR pszName, DWORD* pdwPropID )
01079 {
01080   CString strName(pszName);
01081   strName.MakeLower();        // Dictionary stores all names in lowercase
01082
01083   void* pvID;
01084   if (m_NameDict.Lookup(strName, pvID))
01085   {
01086     *pdwPropID = (DWORD)pvID;
01087     return TRUE;
01088   }
01089
01090   // Failed to find entry in dictionary
01091   return FALSE;
01092 }
01093
01094 BOOL CPropertySection::SetName( DWORD dwPropID, LPCTSTR pszName )
01095 {
01096   BOOL bSuccess = TRUE;
01097   CString strName(pszName);
01098   strName.MakeLower();        // Dictionary stores all names in lowercase
01099
01100   TRY
01101   {
01102     void* pDummy;
01103     BOOL bNameExists = m_NameDict.Lookup(strName, pDummy);
01104
01105     ASSERT(! bNameExists);  // Property names must be unique.
01106
01107     if (bNameExists)
01108       bSuccess = FALSE;
01109     else
01110       m_NameDict.SetAt(strName, (void*)dwPropID);
01111   }
01112   CATCH (CException, e)
01113   {
01114     TRACE0("Failed to add entry to dictionary.\n");
01115     bSuccess = FALSE;
01116   }
01117   END_CATCH
01118
01119   return bSuccess;
01120 }
01121
01122 struct DICTENTRYHEADER
01123 {
01124   DWORD dwPropID;
01125   DWORD cb;
01126 };
01127
01128 struct DICTENTRY
01129 {
01130   DICTENTRYHEADER hdr;
01131   char sz[256];
01132 };
01133
01134 BOOL CPropertySection::ReadNameDictFromStream( IStream* pIStream )
01135 {
01136   ULONG cb;
01137   ULONG cbRead = 0;
01138
01139   // Read dictionary header (count).
01140   ULONG cProperties = 0;
01141   pIStream->Read((LPVOID)&cProperties, sizeof(cProperties), &cb);
01142   if (sizeof(cProperties) != cb)
01143   {
01144     TRACE0("Read of dictionary header failed.\n");
01145     return FALSE;
01146   }
01147
01148   ULONG iProp;
01149   DICTENTRY entry;
01150
01151   for (iProp = 0; iProp < cProperties; iProp++)
01152   {
01153     // Read entry header (dwPropID, cch).
01154     if (FAILED(pIStream->Read((LPVOID)&entry, sizeof(DICTENTRYHEADER),
01155       &cbRead)) ||
01156       (sizeof(DICTENTRYHEADER) != cbRead))
01157     {
01158       TRACE0("Read of dictionary entry failed.\n");
01159       return FALSE;
01160     }
01161
01162     // Read entry data (name).
01163
01164     cb = entry.hdr.cb;
01165
01166     if (FAILED(pIStream->Read((LPVOID)entry.sz, cb, &cbRead)) ||
01167       (cbRead != cb))
01168     {
01169       TRACE0("Read of dictionary entry failed.\n");
01170       return FALSE;
01171     }
01172
01173     LPTSTR pszName;
01174
01175 #ifdef _UNICODE
01176     // Persistent form is always ANSI/DBCS.  Convert to Unicode.
01177     WCHAR wszName[256];
01178     MultiByteToWideChar(CP_ACP, 0, entry.sz, -1, wszName, 256);
01179     pszName = wszName;
01180 #else // _UNICODE
01181     pszName = entry.sz;
01182 #endif // _UNICODE
01183
01184     // Section's "name" appears first in list and has dwPropID == 0.
01185     if ((iProp == 0) && (entry.hdr.dwPropID == 0))
01186       m_strSectionName = pszName;             // Section name
01187     else
01188       SetName(entry.hdr.dwPropID, pszName);   // Some other property
01189   }
01190
01191   return TRUE;
01192 }
01193
01194 static BOOL WriteNameDictEntry(IStream* pIStream, DWORD dwPropID, CString& strName)
01195 {
01196   ULONG cb;
01197   ULONG cbWritten = 0;
01198   DICTENTRY entry;
01199
01200   entry.hdr.dwPropID = dwPropID;
01201   entry.hdr.cb = min(strName.GetLength() + 1, 255);
01202 #ifdef _UNICODE
01203   // Persistent form is always ANSI/DBCS.  Convert from Unicode.
01204   WideCharToMultiByte(CP_ACP, 0, strName, -1, entry.sz, 256, NULL, NULL);
01205 #else // _UNICODE
01206   memcpy_s(entry.sz, 256, (LPCSTR)strName, (size_t)entry.hdr.cb);
01207 #endif // _UNICODE
01208
01209   cb = sizeof(DICTENTRYHEADER) + entry.hdr.cb;
01210
01211   if (FAILED(pIStream->Write((LPVOID)&entry, cb, &cbWritten)) ||
01212     (cbWritten != cb))
01213   {
01214     TRACE0("Write of dictionary entry failed.\n");
01215     return FALSE;
01216   }
01217
01218   return TRUE;
01219 }
01220
01221 BOOL CPropertySection::WriteNameDictToStream( IStream* pIStream )
01222 {
01223   ULONG cb;
01224
01225   // Write dictionary header (count).
01226   ULONG cProperties = (ULONG)(m_NameDict.GetCount() + 1);
01227   pIStream->Write((LPVOID)&cProperties, sizeof(cProperties), &cb);
01228   if (sizeof(cProperties) != cb)
01229   {
01230     TRACE0("Write of dictionary header failed.\n");
01231     return FALSE;
01232   }
01233
01234   POSITION pos;
01235   CString strName;
01236   void* pvID;
01237
01238   // Write out section's "name" with dwPropID == 0 first
01239   if (! WriteNameDictEntry(pIStream, 0, m_strSectionName))
01240     return FALSE;
01241
01242   // Enumerate contents of dictionary and write out (dwPropID, cb, name).
01243   pos = m_NameDict.GetStartPosition();
01244   while (pos != NULL)
01245   {
01246     m_NameDict.GetNextAssoc( pos, strName, pvID );
01247     if (! WriteNameDictEntry(pIStream, (DWORD)pvID, strName))
01248       return FALSE;
01249   }
01250
01251   return TRUE;
01252 }
01253
01254 BOOL CPropertySection::SetSectionName( LPCTSTR pszName )
01255 {
01256   m_strSectionName = pszName;
01257   return TRUE;
01258 }
01259
01260 LPCTSTR CPropertySection::GetSectionName( void )
01261 {
01262   return (LPCTSTR)m_strSectionName;
01263 }
01264
01265
01266 /////////////////////////////////////////////////////////////////////////////
01267 // Implementation of the CPropertySet class
01268
01269 CPropertySet::CPropertySet( void )
01270 {
01271   m_PH.wByteOrder = 0xFFFE;
01272   m_PH.wFormat = 0;
01273   m_PH.dwOSVer = (DWORD)MAKELONG( LOWORD(GetVersion()), 2 );
01274   m_PH.clsID =  GUID_NULL;
01275   m_PH.cSections = 0;
01276
01277 }
01278
01279 CPropertySet::CPropertySet( CLSID clsID )
01280 {
01281   m_PH.wByteOrder = 0xFFFE;
01282   m_PH.wFormat = 0;
01283   m_PH.dwOSVer = (DWORD)MAKELONG( LOWORD(GetVersion()), 2 );
01284   m_PH.clsID = clsID;
01285   m_PH.cSections = 0;
01286 }
01287
01288 CPropertySet::~CPropertySet()
01289 {   RemoveAll();  }
01290
01291 BOOL CPropertySet::Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType )
01292 {
01293   CPropertySection* pSect = GetSection( FormatID );
01294   if (pSect == NULL)
01295   {
01296     if ((pSect = new CPropertySection( FormatID )) != NULL)
01297       AddSection( pSect );
01298   }
01299   pSect->Set( dwPropID, pValue, dwType );
01300   return TRUE;
01301 }
01302
01303 BOOL CPropertySet::Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue )
01304 {
01305   // Since there is no dwType, we have to assume that the property
01306   // already exists.  If it doesn't, fail.
01307   CPropertySection* pSect = GetSection( FormatID );
01308   if (pSect != NULL)
01309     return pSect->Set( dwPropID, pValue );
01310   else
01311     return FALSE;
01312 }
01313
01314 LPVOID CPropertySet::Get( CLSID FormatID, DWORD dwPropID, DWORD* pcb )
01315 {
01316   CPropertySection* pSect = GetSection( FormatID );
01317   if (pSect)
01318     return pSect->Get( dwPropID, pcb );
01319   else
01320     return NULL;
01321 }
01322
01323 LPVOID CPropertySet::Get( CLSID FormatID, DWORD dwPropID )
01324 {   return Get( FormatID, dwPropID, (DWORD*)NULL ); }
01325
01326 void CPropertySet::Remove( CLSID FormatID, DWORD dwPropID )
01327 {
01328   CPropertySection*  pSect = GetSection( FormatID );
01329   if (pSect)
01330     pSect->Remove( dwPropID );
01331 }
01332
01333 void CPropertySet::Remove( CLSID FormatID )
01334 {
01335   CPropertySection* pSect;
01336   POSITION posRemove = m_SectionList.GetHeadPosition();
01337   POSITION pos = posRemove;
01338   while( posRemove != NULL )
01339   {
01340     pSect = (CPropertySection*)m_SectionList.GetNext( pos );
01341     if (IsEqualCLSID( pSect->m_FormatID, FormatID ))
01342     {
01343       m_SectionList.RemoveAt( posRemove );
01344       delete pSect;
01345       m_PH.cSections--;
01346       return;
01347     }
01348     posRemove = pos;
01349   }
01350 }
01351
01352 void CPropertySet::RemoveAll( )
01353 {
01354   POSITION pos = m_SectionList.GetHeadPosition();
01355   while( pos != NULL )
01356   {
01357     delete (CPropertySection*)m_SectionList.GetNext( pos );
01358   }
01359   m_SectionList.RemoveAll();
01360   m_PH.cSections = 0;
01361 }
01362
01363 CPropertySection* CPropertySet::GetSection( CLSID FormatID )
01364 {
01365   POSITION pos = m_SectionList.GetHeadPosition();
01366   CPropertySection* pSect;
01367   while (pos != NULL)
01368   {
01369     pSect = (CPropertySection*)m_SectionList.GetNext( pos );
01370     if (IsEqualCLSID( pSect->m_FormatID, FormatID ))
01371       return pSect;
01372   }
01373   return NULL;
01374 }
01375
01376 CPropertySection* CPropertySet::AddSection( CLSID FormatID )
01377 {
01378   CPropertySection* pSect = GetSection( FormatID );
01379   if (pSect)
01380     return pSect;
01381
01382   pSect = new CPropertySection( FormatID ) ;
01383   if (pSect)
01384     AddSection( pSect );
01385   return pSect;
01386 }
01387
01388 void CPropertySet::AddSection( CPropertySection* pSect )
01389 {
01390   m_SectionList.AddTail( pSect );
01391   m_PH.cSections++;
01392 }
01393
01394 CProperty* CPropertySet::GetProperty( CLSID FormatID, DWORD dwPropID )
01395 {
01396   CPropertySection* pSect = GetSection( FormatID );
01397   if (pSect)
01398     return pSect->GetProperty( dwPropID );
01399   else
01400     return NULL;
01401 }
01402
01403 void CPropertySet::AddProperty( CLSID FormatID, CProperty* pProp )
01404 {
01405   CPropertySection* pSect = GetSection( FormatID );
01406   if (pSect)
01407     pSect->AddProperty( pProp );
01408 }
01409
01410 WORD CPropertySet::GetByteOrder( void )
01411 {   return m_PH.wByteOrder;  }
01412
01413 WORD CPropertySet::GetFormatVersion( void )
01414 {   return m_PH.wFormat;  }
01415
01416 void CPropertySet::SetFormatVersion( WORD wFmtVersion )
01417 {   m_PH.wFormat = wFmtVersion;  }
01418
01419 DWORD CPropertySet::GetOSVersion( void )
01420 {   return m_PH.dwOSVer;  }
01421
01422 void CPropertySet::SetOSVersion( DWORD dwOSVer )
01423 {   m_PH.dwOSVer = dwOSVer;  }
01424
01425 CLSID CPropertySet::GetClassID( void )
01426 {   return m_PH.clsID;  }
01427
01428 void CPropertySet::SetClassID( CLSID clsID )
01429 {   m_PH.clsID = clsID;  }
01430
01431 DWORD CPropertySet::GetCount( void )
01432 {   return (DWORD)m_SectionList.GetCount();  }
01433
01434 CObList* CPropertySet::GetList( void )
01435 {   return &m_SectionList;  }
01436
01437
01438 BOOL CPropertySet::WriteToStream( IStream* pIStream )
01439 {
01440   LPSTREAM        pIStrFIDO;
01441   FORMATIDOFFSET  fido;
01442   ULONG           cb;
01443   ULARGE_INTEGER  ulSeek;
01444   LARGE_INTEGER   li;
01445
01446   // Write the Property List Header
01447   m_PH.cSections = (DWORD)m_SectionList.GetCount();
01448   pIStream->Write((LPVOID)&m_PH, sizeof(m_PH), &cb);
01449   if (sizeof(m_PH) != cb)
01450   {
01451     TRACE0("Write of Property Set Header failed.\n");
01452     return FALSE;
01453   }
01454
01455   if (m_SectionList.IsEmpty())
01456   {
01457     TRACE0("Warning: Wrote empty property set.\n");
01458     return TRUE;
01459   }
01460
01461   // After the header is the list of Format ID/Offset pairs
01462   // Since there is an ID/Offset pair for each section and we
01463   // need to write the ID/Offset pair as we write each section
01464   // we clone the stream and use the clone to access the
01465   // table of ID/offset pairs (FIDO)...
01466   //
01467   pIStream->Clone( &pIStrFIDO );
01468
01469   // Now seek pIStream past the FIDO list
01470   //
01471   LISet32( li, m_PH.cSections * sizeof( FORMATIDOFFSET ) );
01472   pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek);
01473
01474   // Write each section.
01475   CPropertySection*   pSect = NULL;
01476   POSITION            pos = m_SectionList.GetHeadPosition();
01477   while( pos != NULL )
01478   {
01479     // Get next element (note cast)
01480     pSect = (CPropertySection*)m_SectionList.GetNext( pos );
01481
01482     // Write it
01483     if (!pSect->WriteToStream( pIStream ))
01484     {
01485       pIStrFIDO->Release();
01486       return FALSE;
01487     }
01488
01489     // Using our cloned stream write the Format ID / Offset pair
01490     fido.formatID = pSect->m_FormatID;
01491     fido.dwOffset = ulSeek.LowPart;
01492     pIStrFIDO->Write((LPVOID)&fido, sizeof(fido), &cb);
01493     if (sizeof(fido) != cb)
01494     {
01495       TRACE0("Write of 'fido' failed.\n");
01496       pIStrFIDO->Release();
01497       return FALSE;
01498     }
01499
01500     // Get the seek offset (for pIStream) after the write
01501     LISet32( li, 0 );
01502     pIStream->Seek( li, STREAM_SEEK_CUR, &ulSeek );
01503   }
01504
01505   pIStrFIDO->Release();
01506
01507   return TRUE;
01508 }
01509
01510 BOOL CPropertySet::ReadFromStream( IStream* pIStream )
01511 {
01512   ULONG               cb;
01513   FORMATIDOFFSET      fido;
01514   ULONG               cSections;
01515   LPSTREAM            pIStrFIDO;
01516   CPropertySection*   pSect;
01517   LARGE_INTEGER       li;
01518   LARGE_INTEGER       liPropSet;
01519
01520   // Save the stream position at which the property set starts.
01521   LARGE_INTEGER liZero = {0,0};
01522   pIStream->Seek( liZero, STREAM_SEEK_CUR, (ULARGE_INTEGER*)&liPropSet );
01523
01524   if (m_PH.cSections || !m_SectionList.IsEmpty())
01525      RemoveAll();
01526
01527   // The stream starts like this:
01528   //  wByteOrder   wFmtVer   dwOSVer   clsID  cSections
01529   // Which is nice, because our PROPHEADER is the same!
01530   pIStream->Read( (LPVOID)&m_PH, sizeof( m_PH ), &cb );
01531   if (cb != sizeof(m_PH))
01532     return FALSE;
01533
01534   // Now we're pointing at the first of the FormatID/Offset pairs
01535   // (FIDOs).   To get to each section we use a cloned stream
01536   // to stay back and point at the FIDOs (pIStrFIDO).  We seek
01537   // pIStream to each of the sections, creating CProperitySection
01538   // and so forth as we go...
01539   //
01540   pIStream->Clone( &pIStrFIDO );
01541
01542   cSections = m_PH.cSections;
01543   while (cSections--)
01544   {
01545     pIStrFIDO->Read( (LPVOID)&fido, sizeof( fido ), &cb );
01546     if (cb != sizeof(fido))
01547     {
01548       pIStrFIDO->Release();
01549       return FALSE;
01550     }
01551
01552     // Do a seek from the beginning of the property set.
01553     LISet32( li, fido.dwOffset );
01554     pIStream->Seek( liPropSet, STREAM_SEEK_SET, NULL );
01555     pIStream->Seek( li, STREAM_SEEK_CUR, NULL );
01556
01557     // Now pIStream is at the type/value pair
01558     pSect = new CPropertySection;
01559     pSect->SetFormatID( fido.formatID );
01560     pSect->ReadFromStream( pIStream, liPropSet );
01561     m_SectionList.AddTail( pSect );
01562   }
01563
01564   pIStrFIDO->Release();
01565   return TRUE;
01566 }
01567
01568
01569 /////////////////////////////////////////////////////////////////////////////
01570 // Force any extra compiler-generated code into AFX_INIT_SEG
01571
01572 #ifdef AFX_INIT_SEG
01573 #pragma code_seg(AFX_INIT_SEG)
01574 #endif
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFavorit Member List

This is the complete list of members for CFavorit, including all inherited members.
Build(CString strPath) | CFavorit | [protected]
CFavorit(LPCTSTR lpszName, int iIcon, LPCTSTR lpszURL, UINT uiCommand=0) | CFavorit |
CFavorit() | CFavorit | [protected]
CFavoritesManager class | CFavorit | [friend]
CleanUp() | CFavorit | [protected]
CreateMenu(CMenu &menu) | CFavorit | [protected]
FillTree(CTreeCtrl &wndTree, HTREEITEM htreeItemParent) | CFavorit | [protected]
FindByID(UINT uiCommandID) const | CFavorit |
GetCommand() const | CFavorit | [inline]
GetIcon() const | CFavorit | [inline]
GetName() const | CFavorit | [inline]
GetSubItems() const | CFavorit | [inline]
GetURL() const | CFavorit | [inline]
m_IDIcons | CFavorit | [protected, static]
m_iFolderIcon | CFavorit | [protected, static]
m_iIcon | CFavorit | [protected]
m_iInternetShortcutIcon | CFavorit | [protected, static]
m_lstSubItems | CFavorit | [protected]
m_strName | CFavorit | [protected]
m_strURL | CFavorit | [protected]
m_uiCommand | CFavorit | [protected]
m_uiNextCommand | CFavorit | [protected, static]
m_URLIcons | CFavorit | [protected, static]
~CFavorit() | CFavorit | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/mainfrm.h Source File

  • general
  • Scribble

mainfrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CMainFrame : public CMDIFrameWnd
00014 {
00015   DECLARE_DYNAMIC(CMainFrame)
00016 public:
00017   CMainFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CMainFrame)
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CStatusBar  m_wndStatusBar;
00041   CToolBar    m_wndToolBar;
00042   HICON m_hIcon;
00043
00044 // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CMainFrame)
00047   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00048     // NOTE - the ClassWizard will add and remove member functions here.
00049     //    DO NOT EDIT what you see in these blocks of generated code!
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/dialogs.h Source File

  • ole
  • acdual

dialogs.h

Go to the documentation of this file.
00001 // Dialogs.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CChangeText dialog
00014
00015 class CChangeText : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CChangeText(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CChangeText)
00023   enum { IDD = IDD_CHANGE_TEXT };
00024   CString m_str;
00025   //}}AFX_DATA
00026
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CChangeText)
00031   protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 protected:
00037
00038   // Generated message map functions
00039   //{{AFX_MSG(CChangeText)
00040     // NOTE: the ClassWizard will add member functions here
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/view.h Source File

  • ole
  • oleview

view.h

Go to the documentation of this file.
00001 // view.h
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef _VIEW_H_
00014 #define _VIEW_H_
00015
00016 class CDropTargetView : public CView
00017 {
00018 public:
00019   CDropTargetView();
00020   DECLARE_DYNAMIC(CDropTargetView)
00021
00022 // Attributes
00023 public:
00024   COle2ViewDoc* GetDocument();
00025   CListBox      m_lb ;
00026
00027 #if _MFC_VER > 0x0210
00028   COleDropTarget  m_dropTarget ;
00029
00030 // Overridables
00031 public:
00032   virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject,
00033     DWORD dwKeyState, CPoint point);
00034   virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject,
00035     DWORD dwKeyState, CPoint point);
00036   virtual void OnDragLeave();
00037   virtual BOOL OnDrop(COleDataObject* pDataObject,
00038     DROPEFFECT dropEffect, CPoint point);
00039 #endif
00040 // Generated message map functions
00041 protected:
00042   //{{AFX_MSG(CDropTargetView)
00043   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048 #ifndef _DEBUG  // debug version in vw.cpp
00049 inline COle2ViewDoc* CDropTargetView::GetDocument()
00050    { return (COle2ViewDoc*) m_pDocument; }
00051 #endif
00052
00053 #endif // _VIEW_H_
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/zoomdlg.cpp Source File

  • ole
  • hiersvr

zoomdlg.cpp

Go to the documentation of this file.
00001 // zoomdlg.cpp : implementation file
00002 //
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "hiersvr.h"
00015 #include "zoomdlg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CZoomDlg dialog
00024
00025 CZoomDlg::CZoomDlg(CWnd* pParent /*=NULL*/)
00026   : CDialog(CZoomDlg::IDD, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CZoomDlg)
00029   m_zoomX = 0;
00030   m_zoomY = 0;
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 void CZoomDlg::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CZoomDlg)
00038   DDX_Text(pDX, IDC_EDIT1, m_zoomX);
00039   DDV_MinMaxInt(pDX, m_zoomX, 10, 500);
00040   DDX_Text(pDX, IDC_EDIT2, m_zoomY);
00041   DDV_MinMaxInt(pDX, m_zoomY, 10, 500);
00042   //}}AFX_DATA_MAP
00043 }
00044
00045 BEGIN_MESSAGE_MAP(CZoomDlg, CDialog)
00046   //{{AFX_MSG_MAP(CZoomDlg)
00047     // NOTE: the ClassWizard will add message map macros here
00048   //}}AFX_MSG_MAP
00049 END_MESSAGE_MAP()
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CZoomDlg message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDocOptions Member List

This is the complete list of members for CDocOptions, including all inherited members.
CDocOptions(int nDefWrap) | CDocOptions | [inline]
CDocOptions(int nDefWrap) | CDocOptions | [inline]
GetDockState(BOOL bPrimary) | CDocOptions | [inline]
GetDockState(BOOL bPrimary) | CDocOptions | [inline]
LoadDockState(CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout) | CDocOptions |
LoadDockState(CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout) | CDocOptions |
LoadOptions(LPCTSTR lpsz) | CDocOptions |
LoadOptions(LPCTSTR lpsz) | CDocOptions |
m_ds1 | CDocOptions |
m_ds2 | CDocOptions |
m_nDefWrap | CDocOptions |
m_nWordWrap | CDocOptions |
SaveDockState(CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout) | CDocOptions |
SaveDockState(CDockState &ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout) | CDocOptions |
SaveOptions(LPCTSTR lpsz) | CDocOptions |
SaveOptions(LPCTSTR lpsz) | CDocOptions |
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPadFrame Member List

This is the complete list of members for CPadFrame, including all inherited members.
ActivateFrame(int nCmdShow) | CPadFrame | [protected]
Initialize() | CPadFrame | [static]
m_nDefCmdShow | CPadFrame | [protected, static]
m_nDefCmdShowOld | CPadFrame | [protected, static]
OnSize(UINT nType, int cx, int cy) | CPadFrame | [protected]
Terminate() | CPadFrame | [static]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/doctype.h Source File

  • ole
  • wordpad

doctype.h

Go to the documentation of this file.
00001 // doctype.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define RD_WINWORD2 0
00013 #define RD_WINWORD6 1
00014 #define RD_WORDPAD 2
00015 #define RD_WRITE 3
00016 #define RD_RICHTEXT 4
00017 #define RD_TEXT 5
00018 #define RD_OEMTEXT 6
00019 #define RD_ALL 7
00020 #define RD_EXE 8
00021 #define RD_EMBEDDED 9
00022 #define NUM_DOC_TYPES 10
00023
00024 #define RD_DEFAULT RD_WORDPAD
00025 #define RD_NATIVE RD_RICHTEXT
00026
00027 typedef BOOL (*PISFORMATFUNC)(LPCSTR pszConverter, LPCSTR pszPathName);
00028 inline BOOL IsTextType(LONG_PTR nType) {return ((nType==RD_TEXT) || (nType==RD_OEMTEXT));}
00029
00030 struct DocType
00031 {
00032 public:
00033   int nID;
00034   int idStr;
00035   BOOL bRead;
00036   BOOL bWrite;
00037   BOOL bDup;
00038   LPCSTR pszConverterName;
00039   CString GetString(int nID);
00040 };
00041
00042 #define DOCTYPE_DOCTYPE 0
00043 #define DOCTYPE_DESC 1
00044 #define DOCTYPE_EXT 2
00045 #define DOCTYPE_PROGID 3
00046
00047 #define DECLARE_DOCTYPE(name, b1, b2, b3, p) \
00048 {RD_##name, IDS_##name##_DOC, b1, b2, b3, p}
00049 #define DECLARE_DOCTYPE_SYN(actname, name, b1, b2, b3, p) \
00050 {RD_##actname, IDS_##name##_DOC, b1, b2, b3, p}
00051 #define DECLARE_DOCTYPE_NULL(name, b1, b2, b3, p) \
00052 {RD_##name, NULL, b1, b2, b3, p}
00053
00054 extern DocType doctypes[NUM_DOC_TYPES];
00055 extern int GetDocTypeFromName(LPCTSTR pszPathName, CFileException& fe);
00056 extern void ScanForConverters();
00057 extern BOOL IsDLLInPath(LPCSTR lpszName);
00058 int GetIndexFromType(int nType, BOOL bOpen);
00059 int GetTypeFromIndex(int nType, BOOL bOpen);
00060 CString GetExtFromType(int nDocType);
00061 CString GetFileTypes(BOOL bOpen);
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemo.cpp Source File

  • vc2008fp
  • PaletteDemo

PaletteDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "PaletteDemo.h"
00013
00014 #include "MainFrm.h"
00015 #include "PaletteDemoDoc.h"
00016 #include "PaletteDemoView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CPaletteDemoApp
00026
00027 BEGIN_MESSAGE_MAP(CPaletteDemoApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CPaletteDemoApp construction
00038
00039 CPaletteDemoApp::CPaletteDemoApp()
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CPaletteDemoApp object
00047
00048 CPaletteDemoApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CPaletteDemoApp initialization
00052
00053 BOOL CPaletteDemoApp::InitInstance()
00054 {
00055   AfxEnableControlContainer();
00056
00057   AfxOleInit ();
00058
00059   // Standard initialization
00060   // If you are not using these features and wish to reduce the size
00061   //  of your final executable, you should remove from the following
00062   //  the specific initialization routines you do not need.
00063
00064   // Change the registry key under which our settings are stored.
00065   // TODO: You should modify this string to be something appropriate
00066   // such as the name of your company or organization.
00067   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00068
00069   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00070
00071   SetRegistryBase (_T("Settings"));
00072
00073   // Initialize all Managers for usage. They are automatically constructed
00074   // if not yet present
00075   // Register the application's document templates.  Document templates
00076   //  serve as the connection between documents, frame windows and views.
00077
00078   CSingleDocTemplate* pDocTemplate;
00079   pDocTemplate = new CSingleDocTemplate(
00080     IDR_MAINFRAME,
00081     RUNTIME_CLASS(CPaletteDemoDoc),
00082     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00083     RUNTIME_CLASS(CPaletteDemoView));
00084   AddDocTemplate(pDocTemplate);
00085
00086   // Parse command line for standard shell commands, DDE, file open
00087   CCommandLineInfo cmdInfo;
00088   ParseCommandLine(cmdInfo);
00089
00090   // Dispatch commands specified on the command line
00091   if (!ProcessShellCommand(cmdInfo))
00092     return FALSE;
00093
00094   // The one and only window has been initialized, so show and update it.
00095   m_pMainWnd->ShowWindow(SW_SHOW);
00096   m_pMainWnd->UpdateWindow();
00097
00098   return TRUE;
00099 }
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CAboutDlg dialog used for App About
00103
00104 class CAboutDlg : public CDialog
00105 {
00106 public:
00107   CAboutDlg();
00108
00109 // Dialog Data
00110   //{{AFX_DATA(CAboutDlg)
00111   enum { IDD = IDD_ABOUTBOX };
00112   //}}AFX_DATA
00113
00114   // ClassWizard generated virtual function overrides
00115   //{{AFX_VIRTUAL(CAboutDlg)
00116   protected:
00117   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00118   //}}AFX_VIRTUAL
00119
00120 // Implementation
00121 protected:
00122   //{{AFX_MSG(CAboutDlg)
00123     // No message handlers
00124   //}}AFX_MSG
00125   DECLARE_MESSAGE_MAP()
00126 };
00127
00128 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00129 {
00130   //{{AFX_DATA_INIT(CAboutDlg)
00131   //}}AFX_DATA_INIT
00132 }
00133
00134 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00135 {
00136   CDialog::DoDataExchange(pDX);
00137   //{{AFX_DATA_MAP(CAboutDlg)
00138   //}}AFX_DATA_MAP
00139 }
00140
00141 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00142   //{{AFX_MSG_MAP(CAboutDlg)
00143     // No message handlers
00144   //}}AFX_MSG_MAP
00145 END_MESSAGE_MAP()
00146
00147 // App command to run the dialog
00148 void CPaletteDemoApp::OnAppAbout()
00149 {
00150   CAboutDlg aboutDlg;
00151   aboutDlg.DoModal();
00152 }
00153
00154 /////////////////////////////////////////////////////////////////////////////
00155 // CPaletteDemoApp message handlers
00156
00157 int CPaletteDemoApp::ExitInstance()
00158 {
00159   return CWinAppEx::ExitInstance();
00160 }
00161
00162 /////////////////////////////////////////////////////////////////////////////
00163 // CPaletteDemoApp message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEnterDlg Member List

This is the complete list of members for CEnterDlg, including all inherited members.
CEnterDlg(CWnd *pParent=NULL) | CEnterDlg |
DoDataExchange(CDataExchange *pDX) | CEnterDlg | [protected, virtual]
IDD enum value | CEnterDlg |
m_strInput | CEnterDlg |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSourceView Member List

This is the complete list of members for CSourceView, including all inherited members.
CSourceView() | CSourceView | [protected]
m_font | CSourceView | [protected]
NewDocument() | CSourceView | [inline]
OnActivateView(BOOL bActivate, CView *pActivateView, CView *pDeactiveView) | CSourceView | [protected, virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CSourceView | [protected]
OnDraw(CDC *pDC) | CSourceView | [protected, virtual]
UpdateView() | CSourceView |
~CSourceView() | CSourceView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/options.h Source File

  • ole
  • wordpad

options.h

Go to the documentation of this file.
00001 // options.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CUnit
00013 {
00014 public:
00015   int m_nTPU;
00016   int m_nSmallDiv;    // small divisions - small line displayed
00017   int m_nMediumDiv;   // medium divisions - large line displayed
00018   int m_nLargeDiv;    // large divisions - numbers displayed
00019   int m_nMinMove;     // minimum tracking movements
00020   UINT m_nAbbrevID;
00021   BOOL m_bSpaceAbbrev; // put space before abbreviation
00022   CString m_strAbbrev;// cm, pt, pi, ", in, inch, inches
00023
00024   CUnit() {}
00025   CUnit(int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv,
00026     int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev);
00027   const CUnit& operator=(const CUnit& unit);
00028 };
00029
00030 class CDocOptions
00031 {
00032 public:
00033   CDocOptions(int nDefWrap) {m_nDefWrap = nDefWrap;}
00034   CDockState m_ds1;
00035   CDockState m_ds2;
00036   int m_nWordWrap;
00037   int m_nDefWrap;
00038   void SaveOptions(LPCTSTR lpsz);
00039   void LoadOptions(LPCTSTR lpsz);
00040   void SaveDockState(CDockState& ds, LPCTSTR lpszProfileName,
00041     LPCTSTR lpszLayout);
00042   void LoadDockState(CDockState& ds, LPCTSTR lpszProfileName,
00043     LPCTSTR lpszLayout);
00044   CDockState& GetDockState(BOOL bPrimary) {return (bPrimary) ? m_ds1 : m_ds2;}
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page2.cpp Source File

  • vc2008fp
  • NewControls

Page2.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "Page2.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CPage2 property page
00022
00023 IMPLEMENT_DYNCREATE(CPage2, CMFCPropertyPage)
00024
00025 CPage2::CPage2() : CMFCPropertyPage(CPage2::IDD)
00026 {
00027   m_strRGB = _T("255, 0, 255");
00028   m_strRGBColorBar = _T("0, 0, 0");
00029   m_strRGBColorBar2 = _T("0, 0, 255");
00030   m_strRGBColorDialog = _T("255, 0, 255");
00031   m_strRGBColorPalette = _T("0, 255, 0");
00032   m_Color = RGB(255, 0, 255);
00033 }
00034
00035 CPage2::~CPage2()
00036 {
00037 }
00038
00039 void CPage2::DoDataExchange(CDataExchange* pDX)
00040 {
00041   CMFCPropertyPage::DoDataExchange(pDX);
00042   DDX_Control(pDX, IDC_LUM, m_wndLum);
00043   DDX_Control(pDX, IDC_COLOR_PALETTE, m_wndColorPalette);
00044   DDX_Control(pDX, IDC_COLORBAR2, m_wndColorBarFrame2);
00045   DDX_Control(pDX, IDC_COLORBAR, m_wndColorBarFrame);
00046   DDX_Control(pDX, IDC_COLOR_PICKER, m_ColorPicker);
00047   DDX_Text(pDX, IDC_RGB, m_strRGB);
00048   DDX_Text(pDX, IDC_RGB_COLOR_BAR, m_strRGBColorBar);
00049   DDX_Text(pDX, IDC_RGB_COLOR_BAR2, m_strRGBColorBar2);
00050   DDX_Text(pDX, IDC_RGB_DLG, m_strRGBColorDialog);
00051   DDX_Text(pDX, IDC_RGB_COLOR_PALETTE, m_strRGBColorPalette);
00052 }
00053
00054 BEGIN_MESSAGE_MAP(CPage2, CMFCPropertyPage)
00055   ON_BN_CLICKED(IDC_COLOR_DLG, OnColorDlg)
00056   ON_BN_CLICKED(IDC_COLOR_PICKER, OnColorPicker)
00057   ON_BN_CLICKED(IDC_COLOR_PALETTE, OnColorPalette)
00058   ON_BN_CLICKED(IDC_LUM, OnLum)
00059   ON_COMMAND(IDC_COLORBAR, OnColorBar)
00060   ON_COMMAND(IDC_COLORBAR2, OnColorBar2)
00061 END_MESSAGE_MAP()
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CPage2 message handlers
00065
00066 BOOL CPage2::OnInitDialog()
00067 {
00068   CMFCPropertyPage::OnInitDialog();
00069
00070   // Create color picker:
00071   m_ColorPicker.EnableAutomaticButton(_T("Automatic"), RGB(255, 0, 255));
00072   m_ColorPicker.EnableOtherButton(_T("Other"));
00073   m_ColorPicker.SetColor((COLORREF)-1);
00074   m_ColorPicker.SetColumnsNumber(10);
00075
00076   // Create regular color bar:
00077   CRect rectColorBar;
00078   m_wndColorBarFrame.GetClientRect(&rectColorBar);
00079   m_wndColorBarFrame.MapWindowPoints(this, &rectColorBar);
00080
00081   m_wndColorBar.SetHorzMargin(0);
00082   m_wndColorBar.SetVertMargin(0);
00083   m_wndColorBar.EnableOtherButton(_T("Other..."));
00084
00085   m_wndColorBar.CreateControl(this, rectColorBar, IDC_COLORBAR, 5 /* columns */);
00086   m_wndColorBar.SetColor(RGB(0, 0, 0));
00087
00088   // Create regular color bar with the custom palette:
00089   m_wndColorBarFrame2.GetClientRect(&rectColorBar);
00090   m_wndColorBarFrame2.MapWindowPoints(this, &rectColorBar);
00091
00092   // Create the palette
00093 #define NUM_COLOURS 64
00094   struct
00095   {
00096     LOGPALETTE    LogPalette;
00097     PALETTEENTRY  PalEntry[NUM_COLOURS];
00098   }pal;
00099
00100   LOGPALETTE* pLogPalette = (LOGPALETTE*) &pal;
00101   pLogPalette->palVersion    = 0x300;
00102   pLogPalette->palNumEntries = (WORD) NUM_COLOURS;
00103
00104   COLORREF colorStart = RGB(0, 0, 255);
00105   COLORREF colorFinish = RGB(255, 255, 255);
00106
00107   int nShift = 6;
00108   for (int i = 0; i < NUM_COLOURS; i++)
00109   {
00110     BYTE bR = (BYTE)((GetRValue(colorStart) *(NUM_COLOURS - i) + GetRValue(colorFinish) * i) >> nShift);
00111     BYTE bG = (BYTE)((GetGValue(colorStart) *(NUM_COLOURS - i) + GetGValue(colorFinish) * i) >> nShift);
00112     BYTE bB = (BYTE)((GetBValue(colorStart) *(NUM_COLOURS - i) + GetBValue(colorFinish) * i) >> nShift);
00113
00114     pLogPalette->palPalEntry[i].peRed   = bR;
00115     pLogPalette->palPalEntry[i].peGreen = bG;
00116     pLogPalette->palPalEntry[i].peBlue  = bB;
00117     pLogPalette->palPalEntry[i].peFlags = 0;
00118   }
00119
00120   m_palColorPicker.CreatePalette(pLogPalette);
00121   m_wndColorBar2.SetHorzMargin(0);
00122   m_wndColorBar2.SetVertMargin(0);
00123
00124   m_wndColorBar2.CreateControl(this, rectColorBar, IDC_COLORBAR2, -1 /* columns */, &m_palColorPicker);
00125   m_wndColorBar2.SetColor(colorStart);
00126
00127   // Create system palette:
00128   CClientDC dc(this);
00129
00130   int nColors = 256; // Use 256 first entries
00131   UINT nSize = sizeof(LOGPALETTE) +(sizeof(PALETTEENTRY) * nColors);
00132   LOGPALETTE *pLP = (LOGPALETTE *) new BYTE[nSize];
00133
00134   pLP->palVersion = 0x300;
00135   pLP->palNumEntries = (USHORT) nColors;
00136
00137   ::GetSystemPaletteEntries(dc.GetSafeHdc(), 0, nColors, pLP->palPalEntry);
00138
00139   m_palSys.CreatePalette(pLP);
00140
00141   delete[] pLP;
00142
00143   m_wndColorPalette.SetType(CMFCColorPickerCtrl::PICKER);
00144   m_wndColorPalette.SetPalette(&m_palSys);
00145   m_wndColorPalette.SetColor(RGB(0, 255, 0));
00146
00147   m_wndLum.SetType(CMFCColorPickerCtrl::LUMINANCE);
00148   m_wndLum.SetPalette(&m_palSys);
00149   m_wndLum.SetColor(RGB(0, 255, 0));
00150
00151   UpdateData(FALSE);
00152   return TRUE;  // return TRUE unless you set the focus to a control
00153   // EXCEPTION: OCX Property Pages should return FALSE
00154 }
00155 void CPage2::OnColorDlg()
00156 {
00157   CMFCColorDialog dlg(m_Color, 0, this);
00158   if (dlg.DoModal() == IDOK)
00159   {
00160     m_Color = dlg.GetColor();
00161
00162     m_strRGBColorDialog.Format(_T("%d,%d,%d"), GetRValue(m_Color), GetGValue(m_Color), GetBValue(m_Color));
00163
00164     UpdateData(FALSE);
00165   }
00166 }
00167
00168 void CPage2::OnColorPicker()
00169 {
00170   COLORREF color = m_ColorPicker.GetColor();
00171   if (color == -1)
00172   {
00173     color = m_ColorPicker.GetAutomaticColor();
00174   }
00175
00176   m_strRGB.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));
00177
00178   UpdateData(FALSE);
00179 }
00180
00181 void CPage2::OnColorBar()
00182 {
00183   COLORREF color = m_wndColorBar.GetColor();
00184
00185   m_strRGBColorBar.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));
00186
00187   UpdateData(FALSE);
00188 }
00189
00190 void CPage2::OnColorBar2()
00191 {
00192   COLORREF color = m_wndColorBar2.GetColor();
00193
00194   m_strRGBColorBar2.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));
00195
00196   UpdateData(FALSE);
00197 }
00198
00199 void CPage2::OnColorPalette()
00200 {
00201   COLORREF color = m_wndColorPalette.GetColor();
00202
00203   m_strRGBColorPalette.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));
00204
00205   m_wndLum.SetColor(color);
00206   UpdateData(FALSE);
00207 }
00208
00209 void CPage2::OnLum()
00210 {
00211   COLORREF color = m_wndLum.GetColor();
00212
00213   m_strRGBColorPalette.Format(_T("%d,%d,%d"), GetRValue(color), GetGValue(color), GetBValue(color));
00214
00215   m_wndColorPalette.SetLuminance(m_wndLum.GetLuminance());
00216   UpdateData(FALSE);
00217 }
00218
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/resource.h Source File

  • vc2008fp
  • OwnerDrawMenu

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by OwnerDrawMenu.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_OWNERDTYPE                  129
00009 #define IDR_CONTEXT_MENU                130
00010 #define IDR_POPUP_TOOLBAR               131
00011 #define IDR_LINE_STYLE_POPUP            151
00012 #define IDD_ABOUTBOX                    999
00013 #define ID_VIEW_CUSTOMIZE               32770
00014 #define ID_VIEW_TOOLBARS                32771
00015 #define ID_LINE_STYLE_1                 32822
00016 #define ID_LINE_STYLE_2                 32823
00017 #define ID_LINE_STYLE_3                 32824
00018 #define ID_LINE_STYLE_4                 32825
00019 #define ID_LINE_STYLE_5                 32826
00020 #define ID_LINE_STYLE_6                 32827
00021 #define ID_LINE_STYLE_7                 32828
00022 #define ID_LINE_STYLE_8                 32829
00023 #define ID_LINE_STYLE_9                 32830
00024 #define ID_LINE_STYLE_10                32831
00025 #define ID_MORE_LINES                   32832
00026 #define ID_LINE_STYLE_MENU              32833
00027
00028 // Next default values for new objects
00029 //
00030 #ifdef APSTUDIO_INVOKED
00031 #ifndef APSTUDIO_READONLY_SYMBOLS
00032 #define _APS_3D_CONTROLS                     1
00033 #define _APS_NEXT_RESOURCE_VALUE        152
00034 #define _APS_NEXT_COMMAND_VALUE         32834
00035 #define _APS_NEXT_CONTROL_VALUE         1041
00036 #define _APS_NEXT_SYMED_VALUE           107
00037 #endif
00038 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStateCollectionApp Member List

This is the complete list of members for CStateCollectionApp, including all inherited members.
CStateCollectionApp() | CStateCollectionApp |
ExitInstance() | CStateCollectionApp | [virtual]
InitInstance() | CStateCollectionApp | [virtual]
OnAppAbout() | CStateCollectionApp |
PreLoadState() | CStateCollectionApp | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Ratedlg.cpp Source File

  • general
  • dlgcbr32

Ratedlg.cpp

Go to the documentation of this file.
00001 // RateDlg.cpp : Implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014   Purpose:
00015   Implements CRateDlg, which allows the user to specify how often to
00016   update the main dialog display.
00017
00018   Functions:
00019   CRateDlg::CRateDlg()            -- constructor
00020   CRateDlg::DoDataExchange()      -- dialog data exchange/validation
00021   CRateDlg::OnInitDialog()        -- initialize dialog
00022
00023   Development Team:
00024   Mary Kirtland
00025   Ported to 32-bit by:
00026   Mike Hedley
00027   Created by Microsoft Product Support Services, Premier ISV Support
00028   Copyright (c) Microsoft Corporation.  All rights reserved.
00029 \****************************************************************************/
00030
00031 #include "stdafx.h"
00032 #include "resource.h"
00033 #include "ratedlg.h"
00034
00035 #ifdef _DEBUG
00036 #define new DEBUG_NEW
00037 #undef THIS_FILE
00038 static char THIS_FILE[] = __FILE__;
00039 #endif
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CRateDlg dialog
00043
00044 CRateDlg::CRateDlg(UINT iRate, CWnd* pParent /*=NULL*/)
00045   : CDialog(CRateDlg::IDD, pParent)
00046 {
00047   //{{AFX_DATA_INIT(CRateDlg)
00048   //}}AFX_DATA_INIT
00049   m_iRate = iRate;
00050 }
00051
00052 void CRateDlg::DoDataExchange(CDataExchange* pDX)
00053 {
00054   CDialog::DoDataExchange(pDX);
00055   //{{AFX_DATA_MAP(CRateDlg)
00056   DDX_Text(pDX, IDC_INTERVAL, m_iRate);
00057   DDV_MinMaxUInt(pDX, m_iRate, 0, 3600);
00058   //}}AFX_DATA_MAP
00059 }
00060
00061 BOOL CRateDlg::OnInitDialog()
00062 {
00063   CDialog::OnInitDialog();
00064   CenterWindow();
00065   return TRUE;
00066 }
00067
00068 BEGIN_MESSAGE_MAP(CRateDlg, CDialog)
00069   //{{AFX_MSG_MAP(CRateDlg)
00070   //}}AFX_MSG_MAP
00071 END_MESSAGE_MAP()
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStateCollectionView Member List

This is the complete list of members for CStateCollectionView, including all inherited members.
CStateCollectionView() | CStateCollectionView | [protected]
GetDocument() | CStateCollectionView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CStateCollectionView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CStateCollectionView | [protected]
OnDraw(CDC *pDC) | CStateCollectionView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CStateCollectionView | [protected, virtual]
OnFilePrintPreview() | CStateCollectionView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CStateCollectionView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CStateCollectionView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CStateCollectionView | [virtual]
~CStateCollectionView() | CStateCollectionView | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLineThread Member List

This is the complete list of members for CLineThread, including all inherited members.
CGDIThread(CWnd *pWnd, HDC hDC) | CGDIThread |
CLineThread(CWnd *pWnd, HDC hDC, CPoint ptPos1, CPoint ptVel1, CPoint ptVel2, CSize Size, COLORREF color) | CLineThread |
Delete() | CGDIThread | [virtual]
InitInstance() | CLineThread | [virtual]
KillThread() | CGDIThread |
m_csGDILock | CGDIThread | [static]
m_dc | CGDIThread |
m_hAnotherDead | CGDIThread | [static]
m_hDC | CGDIThread |
m_hEventDead | CGDIThread |
m_hEventKill | CGDIThread |
m_hPen | CLineThread |
m_pen | CLineThread |
m_ptPosition1 | CLineThread |
m_ptPosition2 | CLineThread |
m_ptVelocity1 | CLineThread |
m_ptVelocity2 | CLineThread |
m_rectBorder | CGDIThread |
SingleStep() | CLineThread | [virtual]
UpdateBorder() | CGDIThread |
~CGDIThread() | CGDIThread | [virtual]
~CLineThread() | CLineThread | [inline, protected, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/targetver.h Source File

  • vc2008fp
  • MSMoneyDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/BkfstPg.cpp Source File

  • general
  • snapvw

BkfstPg.cpp

Go to the documentation of this file.
00001 // BkfstPg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "snapvw.h"
00014 #include "BkfstPg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CBkfstPage property page
00024
00025 IMPLEMENT_DYNCREATE(CBkfstPage, CPropertyPage)
00026
00027 CBkfstPage::CBkfstPage() : CPropertyPage(CBkfstPage::IDD)
00028 {
00029   //{{AFX_DATA_INIT(CBkfstPage)
00030     // NOTE: the ClassWizard will add member initialization here
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 CBkfstPage::~CBkfstPage()
00035 {
00036 }
00037
00038 void CBkfstPage::DoDataExchange(CDataExchange* pDX)
00039 {
00040   CPropertyPage::DoDataExchange(pDX);
00041   //{{AFX_DATA_MAP(CBkfstPage)
00042     // NOTE: the ClassWizard will add DDX and DDV calls here
00043   //}}AFX_DATA_MAP
00044 }
00045
00046
00047 BEGIN_MESSAGE_MAP(CBkfstPage, CPropertyPage)
00048   //{{AFX_MSG_MAP(CBkfstPage)
00049   //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CBkfstPage message handlers
00054
00055 BOOL CBkfstPage::OnInitDialog()
00056 {
00057   CPropertyPage::OnInitDialog();
00058
00059   CButton* pBevButton;
00060   pBevButton = (CButton*) GetDlgItem(IDC_HOT_TEA);
00061   pBevButton->SetCheck(1);
00062
00063   CButton* pStyleButton;
00064   pStyleButton = (CButton*) GetDlgItem(IDC_CONTINENTAL2);
00065   pStyleButton->SetCheck(1);
00066
00067   CButton* pNewsButton;
00068   pNewsButton = (CButton*) GetDlgItem(IDC_FINANCE);
00069   pNewsButton->SetCheck(1);
00070
00071
00072   return TRUE;  // return TRUE unless you set the focus to a control
00073           // EXCEPTION: OCX Property Pages should return FALSE
00074 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/DlgBanner.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

DlgBanner.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "DlgBanner.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDlgBanner
00024
00025 CDlgBanner::CDlgBanner()
00026 {
00027 }
00028
00029 CDlgBanner::~CDlgBanner()
00030 {
00031 }
00032
00033 BEGIN_MESSAGE_MAP(CDlgBanner, CStatic)
00034   //{{AFX_MSG_MAP(CDlgBanner)
00035   ON_WM_PAINT()
00036   //}}AFX_MSG_MAP
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CDlgBanner message handlers
00041
00042 void CDlgBanner::OnPaint()
00043 {
00044   CPaintDC dc(this); // device context for painting
00045
00046   CRect rect;
00047   GetClientRect(rect);
00048
00049   CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontBold);
00050   ASSERT(pOldFont != NULL);
00051
00052   dc.SetTextColor(CMFCVisualManager::GetInstance()->OnDrawMenuLabel(&dc, rect));
00053   dc.SetBkMode(TRANSPARENT);
00054
00055   rect.DeflateRect(5, 0);
00056
00057   CString strText;
00058   GetWindowText(strText);
00059
00060   dc.DrawText(strText, rect, DT_LEFT | DT_SINGLELINE | DT_VCENTER);
00061
00062   dc.SelectObject(pOldFont);
00063 }
00064
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/ChildView.cpp Source File

  • general
  • SimpleImage

ChildView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // ChildView.cpp : implementation of the CChildView class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "CImage.h"
00015 #include "ChildView.h"
00016 #include "InfoDlg.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 // CChildView
00026
00027 CChildView::CChildView()
00028 {
00029   m_nImageSize = SIZE_NONE;
00030 }
00031
00032 CChildView::~CChildView()
00033 {
00034 }
00035
00036
00037 BEGIN_MESSAGE_MAP(CChildView, CWnd)
00038   ON_WM_PAINT()
00039   ON_COMMAND(ID_FILE_OPENIMAGE, OnFileOpenimage)
00040   ON_COMMAND(ID_FILE_SAVEIMAGE, OnFileSaveImage)
00041   ON_COMMAND(ID_TOOLS_MAKEBW, OnToolsMakeBW)
00042   ON_COMMAND(ID_FILE_IMAGEINFO, OnImageInfo)
00043   ON_UPDATE_COMMAND_UI(ID_SIZE_HALF,OnUpdateSizeHalf)
00044   ON_UPDATE_COMMAND_UI(ID_SIZE_ORIGINAL,OnUpdateSizeOriginal)
00045   ON_UPDATE_COMMAND_UI(ID_SIZE_DOUBLE,OnUpdateSizeDouble)
00046   ON_UPDATE_COMMAND_UI(ID_SIZE_FILL,OnUpdateSizeFill)
00047   ON_UPDATE_COMMAND_UI(ID_FILE_SAVEIMAGE,OnUpdateImage)
00048   ON_UPDATE_COMMAND_UI(ID_FILE_IMAGEINFO,OnUpdateImage)
00049   ON_UPDATE_COMMAND_UI(ID_TOOLS_MAKEBW,OnUpdateImage)
00050   ON_COMMAND_RANGE(ID_SIZE_HALF,ID_SIZE_FILL,OnChangeSize)
00051 END_MESSAGE_MAP()
00052
00053
00054
00055 // CChildView message handlers
00056
00057 BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)
00058 {
00059   if (!CWnd::PreCreateWindow(cs))
00060     return FALSE;
00061
00062   cs.dwExStyle |= WS_EX_CLIENTEDGE;
00063   cs.style &= ~WS_BORDER;
00064   cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS,
00065     ::LoadCursor(NULL, IDC_ARROW), reinterpret_cast<HBRUSH>(COLOR_WINDOW+1), NULL);
00066
00067   return TRUE;
00068 }
00069
00070 void CChildView::OnPaint()
00071 {
00072   CPaintDC dc(this); // device context for painting
00073   if (!imgOriginal.IsNull())
00074   {
00075
00076     switch (m_nImageSize)
00077     {
00078       case SIZE_HALF:
00079         imgOriginal.StretchBlt(dc,0,0,imgOriginal.GetWidth()/2,imgOriginal.GetHeight()/2,SRCCOPY);
00080         break;
00081       case SIZE_ORIGINAL:
00082         imgOriginal.StretchBlt(dc,0,0,imgOriginal.GetWidth(),imgOriginal.GetHeight(),SRCCOPY);
00083         break;
00084       case SIZE_DOUBLE:
00085         imgOriginal.StretchBlt(dc,0,0,imgOriginal.GetWidth()*2,imgOriginal.GetHeight()*2,SRCCOPY);
00086         break;
00087       case SIZE_FILL:
00088         CRect rctWindowSize;
00089         GetClientRect(rctWindowSize);
00090         imgOriginal.StretchBlt(dc,0,0,rctWindowSize.Width(),rctWindowSize.Height(),SRCCOPY);
00091     };
00092   }
00093
00094 }
00095
00096
00097 void CChildView::OnFileOpenimage(void)
00098 {
00099   // TODO: Add your command handler code here
00100   CString strFilter;
00101   CSimpleArray<GUID> aguidFileTypes;
00102   HRESULT hResult;
00103
00104   hResult = imgOriginal.GetExporterFilterString(strFilter,aguidFileTypes);
00105   if (FAILED(hResult)) {
00106     CString fmt;
00107     fmt.Format("GetExporterFilter failed:\n%x - %s", hResult, _com_error(hResult).ErrorMessage());
00108     ::AfxMessageBox(fmt);
00109     return;
00110   }
00111
00112   CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST, strFilter);
00113   dlg.m_ofn.nFilterIndex = m_nFilterLoad;
00114   hResult = (int)dlg.DoModal();
00115   if(FAILED(hResult)) {
00116     return;
00117   }
00118
00119   m_nFilterLoad = dlg.m_ofn.nFilterIndex;
00120   imgOriginal.Destroy();
00121   hResult = imgOriginal.Load(dlg.GetFileName());
00122   if (FAILED(hResult)) {
00123     CString fmt;
00124     fmt.Format("Load image failed:\n%x - %s", hResult, _com_error(hResult).ErrorMessage());
00125     ::AfxMessageBox(fmt);
00126     return;
00127   }
00128
00129   m_nImageSize = SIZE_ORIGINAL;
00130   Invalidate();
00131   UpdateWindow();
00132
00133 }
00134
00135 void CChildView::OnFileSaveImage(void)
00136 {
00137   CString strFilter;
00138   CSimpleArray<GUID> aguidFileTypes;
00139   HRESULT hResult;
00140
00141
00142   strFilter = "Bitmap image|*.bmp|JPEG image|*.jpg|GIF image|*.gif|PNG image|*.png||";
00143
00144   CFileDialog dlg(FALSE,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_EXPLORER,strFilter);
00145   dlg.m_ofn.nFilterIndex = m_nFilterLoad;
00146   hResult = (int)dlg.DoModal();
00147   if (FAILED(hResult)) {
00148     return;
00149   }
00150
00151     // Add the appropriate extension if the user didn't type one
00152
00153   CString strFileName;
00154   CString strExtension;
00155
00156   strFileName = dlg.m_ofn.lpstrFile;
00157
00158
00159   // add the file extension if the user didn't supply one
00160   if (dlg.m_ofn.nFileExtension == 0)
00161   {
00162     switch (dlg.m_ofn.nFilterIndex)
00163     {
00164     case 1:
00165       strExtension = "bmp";
00166       break;
00167     case 2:
00168       strExtension = "jpg";
00169       break;
00170     case 3:
00171       strExtension = "gif";
00172       break;
00173     case 4:
00174       strExtension = "png";
00175       break;
00176     default:
00177       break;
00178     }
00179
00180     strFileName = strFileName + '.' + strExtension;
00181
00182   }
00183
00184   // the extension on the file name will determine the file type that is saved
00185   hResult = imgOriginal.Save(strFileName);
00186   if (FAILED(hResult)) {
00187     CString fmt;
00188     fmt.Format("Save image failed:\n%x - %s", hResult, _com_error(hResult).ErrorMessage());
00189     ::AfxMessageBox(fmt);
00190     return;
00191   }
00192
00193 }
00194
00195 void CChildView::OnToolsMakeBW(void)
00196 {
00197
00198   CWaitCursor wait;
00199
00200   if (!imgOriginal.IsIndexed()) {
00201
00202     // the image does not use an indexed palette, so we will change each pixel to B&W (slow)
00203     COLORREF pixel;
00204     int maxY = imgOriginal.GetHeight(), maxX = imgOriginal.GetWidth();
00205     byte r,g,b,avg;
00206     for (int x=0; x<maxX; x++) {
00207       for (int y=0; y<maxY; y++) {
00208         pixel = imgOriginal.GetPixel(x,y);
00209         r = GetRValue(pixel);
00210         g = GetGValue(pixel);
00211         b = GetBValue(pixel);
00212         avg = ((r + g + b)/3);
00213         imgOriginal.SetPixelRGB(x,y,avg,avg,avg);
00214       }
00215     }
00216
00217   } else {
00218
00219     // the image uses an indexed palette, so we will just change the palette table entries to
00220     // their B&W equivalents
00221     int MaxColors = imgOriginal.GetMaxColorTableEntries();
00222     RGBQUAD* ColorTable;
00223     ColorTable = new RGBQUAD[MaxColors];
00224
00225     imgOriginal.GetColorTable(0,MaxColors,ColorTable);
00226     for (int i=0; i<MaxColors; i++)
00227     {
00228       int avg = (ColorTable[i].rgbBlue + ColorTable[i].rgbGreen + ColorTable[i].rgbRed)/3;
00229       ColorTable[i].rgbBlue = (BYTE)avg;
00230       ColorTable[i].rgbGreen = (BYTE)avg;
00231       ColorTable[i].rgbRed = (BYTE)avg;
00232     }
00233     imgOriginal.SetColorTable(0,MaxColors,ColorTable);
00234
00235     delete[] ColorTable;
00236   }
00237
00238   Invalidate();
00239   UpdateWindow();
00240 }
00241
00242
00243 void CChildView::OnImageInfo()
00244 {
00245   CInfoDlg infoDlg(imgOriginal);
00246   infoDlg.DoModal();
00247 }
00248
00249
00250 void CChildView::OnChangeSize(UINT nID)
00251 {
00252   m_nImageSize = (SizesEnum)(nID - ID_SIZE_BASE);
00253   Invalidate();
00254   UpdateWindow();
00255 }
00256
00257 void CChildView::OnUpdateSizeHalf(CCmdUI* pCmdUI)
00258 {
00259   pCmdUI->Enable(!imgOriginal.IsNull());
00260   pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_HALF));
00261 }
00262
00263 void CChildView::OnUpdateSizeOriginal(CCmdUI* pCmdUI)
00264 {
00265   pCmdUI->Enable(!imgOriginal.IsNull());
00266   pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_ORIGINAL));
00267 }
00268
00269 void CChildView::OnUpdateSizeDouble(CCmdUI* pCmdUI)
00270 {
00271   pCmdUI->Enable(!imgOriginal.IsNull());
00272   pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_DOUBLE));
00273 }
00274
00275 void CChildView::OnUpdateSizeFill(CCmdUI* pCmdUI)
00276 {
00277   pCmdUI->Enable(!imgOriginal.IsNull());
00278   pCmdUI->SetCheck((UINT)(m_nImageSize == SIZE_FILL));
00279 }
00280
00281 void CChildView::OnUpdateImage(CCmdUI *pCmdUI)
00282 {
00283   pCmdUI->Enable(!imgOriginal.IsNull());
00284 }
00285
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timectl.h Source File

  • controls
  • time

timectl.h

Go to the documentation of this file.
00001 // timectl.h : Declaration of the CTimeCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // Numeric constants
00016
00017 const int DEFAULT_INTERVAL  = 1000;
00018
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CTimeCtrl : See timectl.cpp for implementation.
00022
00023 class CTimeCtrl : public COleControl
00024 {
00025   DECLARE_DYNCREATE(CTimeCtrl)
00026
00027 // Constructor
00028 public:
00029   CTimeCtrl();
00030
00031 // Overrides
00032
00033   // Drawing function
00034   virtual void OnDraw(
00035         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00036
00037   // Persistence
00038   virtual void DoPropExchange(CPropExchange* pPX);
00039
00040   // Reset control state
00041   virtual void OnResetState();
00042
00043   virtual void OnAmbientPropertyChange(DISPID dispid);
00044
00045   virtual void OnEnabledChanged();
00046
00047 // Implementation
00048 protected:
00049   ~CTimeCtrl();
00050
00051   DECLARE_OLECREATE_EX(CTimeCtrl) // Class factory and guid
00052   DECLARE_OLETYPELIB(CTimeCtrl)       // GetTypeInfo
00053   DECLARE_PROPPAGEIDS(CTimeCtrl)      // Property page IDs
00054   DECLARE_OLECTLTYPE(CTimeCtrl)       // Type name and misc status
00055
00056 // Message maps
00057   //{{AFX_MSG(CTimeCtrl)
00058   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00059   afx_msg void OnDestroy();
00060   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00061   afx_msg void OnTimer(UINT_PTR nIDEvent);
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064
00065 // Dispatch maps
00066   //{{AFX_DISPATCH(CTimeCtrl)
00067   short m_interval;
00068   afx_msg void OnIntervalChanged();
00069   //}}AFX_DISPATCH
00070   DECLARE_DISPATCH_MAP()
00071
00072   afx_msg void AboutBox();
00073
00074 // Event maps
00075   //{{AFX_EVENT(CTimeCtrl)
00076   void FireTimer()
00077     {FireEvent(eventidTimer,EVENT_PARAM(VTS_NONE));}
00078   //}}AFX_EVENT
00079   DECLARE_EVENT_MAP()
00080
00081 // Dispatch and event IDs
00082 public:
00083   enum {
00084   //{{AFX_DISP_ID(CTimeCtrl)
00085   dispidInterval = 1L,
00086   eventidTimer = 1L,
00087   //}}AFX_DISP_ID
00088   };
00089
00090 protected:
00091
00092   void OnSetClientSite();
00093   void StartTimer();
00094   void StopTimer();
00095 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ipframe.h Source File

  • vc2008fp
  • WordPad

ipframe.h

Go to the documentation of this file.
00001 //
00002 // ipframe.h : interface of the CInPlaceFrame class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 class CWordPadResizeBar : public COleResizeBar
00015 {
00016 public:
00017   void SetMinSize(CSize size) {m_tracker.m_sizeMin = size;}
00018 };
00019
00020 class CInPlaceFrame : public COleIPFrameWndEx
00021 {
00022   DECLARE_DYNCREATE(CInPlaceFrame)
00023 public:
00024   CInPlaceFrame();
00025
00026 // Attributes
00027 public:
00028   CMFCToolBar m_wndMenuBar;
00029   CMFCToolBar m_wndToolBar;
00030   CFormatBar m_wndFormatBar;
00031   CRulerBar m_wndRulerBar;
00032   CWordPadResizeBar m_wndResizeBar;
00033   COleDropTarget m_dropTarget;
00034
00035 // Operations
00036 public:
00037   virtual void RecalcLayout(BOOL bNotify = TRUE);
00038   virtual void CalcWindowRect(LPRECT lpClientRect,
00039     UINT nAdjustType = adjustBorder);
00040
00041 // Overrides
00042   // ClassWizard generated virtual function overrides
00043   //{{AFX_VIRTUAL(CInPlaceFrame)
00044   public:
00045   virtual BOOL OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* pWndDoc);
00046   virtual void RepositionFrame(LPCRECT lpPosRect, LPCRECT lpClipRect);
00047   //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 public:
00051 #ifdef _DEBUG
00052   virtual void AssertValid() const;
00053   virtual void Dump(CDumpContext& dc) const;
00054 #endif
00055
00056 protected:
00057   BOOL CreateMenuBar();
00058   BOOL CreateToolBar(CWnd* pWndFrame);
00059   BOOL CreateFormatBar(CWnd* pWndFrame);
00060   BOOL CreateRulerBar(CWnd* pWndFrame);
00061
00062 // Generated message map functions
00063 protected:
00064   //{{AFX_MSG(CInPlaceFrame)
00065   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00066   afx_msg void OnDestroy();
00067   afx_msg void OnHelpFinder();
00068   afx_msg void OnPenToggle();
00069   //}}AFX_MSG
00070   LRESULT OnResizeChild(WPARAM wParam, LPARAM lParam);
00071   afx_msg LRESULT OnBarState(WPARAM wParam, LPARAM lParam);
00072   DECLARE_MESSAGE_MAP()
00073 };
00074
00075 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/btnctl.h Source File

  • controls
  • button

btnctl.h

Go to the documentation of this file.
00001 // btnctl.h : Declaration of the CButtonCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CButtonCtrl : See btnctl.cpp for implementation.
00014
00015 class CButtonCtrl : public COleControl
00016 {
00017   DECLARE_DYNCREATE(CButtonCtrl)
00018
00019 // Constructor
00020 public:
00021   CButtonCtrl();
00022
00023 // Overrides
00024
00025   // Accelerator keys
00026   virtual BOOL PreTranslateMessage(MSG* pMsg);
00027
00028   // Drawing function
00029   virtual void OnDraw(
00030         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00031
00032   // Persistence
00033   virtual void DoPropExchange(CPropExchange* pPX);
00034
00035   // Reset control state
00036   virtual void OnResetState();
00037
00038   virtual HMENU OnGetInPlaceMenu(void);
00039
00040 // Implementation
00041 protected:
00042   ~CButtonCtrl();
00043
00044   CMenu m_menuInPlace;
00045
00046   DECLARE_OLECREATE_EX(CButtonCtrl)   // Class factory and guid
00047   DECLARE_OLETYPELIB(CButtonCtrl)     // GetTypeInfo
00048   DECLARE_PROPPAGEIDS(CButtonCtrl)        // Property page IDs
00049   DECLARE_OLECTLTYPE(CButtonCtrl)     // Type name and misc status
00050
00051   // Subclassed control support
00052   BOOL PreCreateWindow(CREATESTRUCT& cs);
00053   BOOL IsSubclassedControl();
00054   LRESULT OnOcmCommand(WPARAM wParam, LPARAM lParam);
00055
00056 // Message maps
00057   //{{AFX_MSG(CButtonCtrl)
00058   afx_msg void CmdAbout();
00059   afx_msg void OnOptionsOption1();
00060   afx_msg void OnOptionsOption2();
00061   afx_msg void OnOptionsOption3();
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064
00065 // Dispatch maps
00066   //{{AFX_DISPATCH(CButtonCtrl)
00067   //}}AFX_DISPATCH
00068   DECLARE_DISPATCH_MAP()
00069
00070   afx_msg void AboutBox();
00071
00072 // Event maps
00073   //{{AFX_EVENT(CButtonCtrl)
00074   void FireClick()
00075     {FireEvent(DISPID_CLICK,EVENT_PARAM(VTS_NONE));}
00076   //}}AFX_EVENT
00077   DECLARE_EVENT_MAP()
00078
00079 // Dispatch and event IDs
00080 public:
00081   enum {
00082   //{{AFX_DISP_ID(CButtonCtrl)
00083   //}}AFX_DISP_ID
00084   };
00085 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/childfrm.cpp Source File

  • general
  • Scribble

childfrm.cpp

Go to the documentation of this file.
00001 // ChildFrm.cpp : implementation of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014
00015 #include "ChildFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CChildFrame
00025
00026 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
00027
00028 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
00029   //{{AFX_MSG_MAP(CChildFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CChildFrame construction/destruction
00037
00038 CChildFrame::CChildFrame()
00039 {
00040   // TODO: add member initialization code here
00041
00042 }
00043
00044 CChildFrame::~CChildFrame()
00045 {
00046 }
00047
00048 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00049 {
00050   // TODO: Modify the Window class or styles here by modifying
00051   //  the CREATESTRUCT cs
00052
00053   return CMDIChildWnd::PreCreateWindow(cs);
00054 }
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CChildFrame diagnostics
00058
00059 #ifdef _DEBUG
00060 void CChildFrame::AssertValid() const
00061 {
00062   CMDIChildWnd::AssertValid();
00063 }
00064
00065 void CChildFrame::Dump(CDumpContext& dc) const
00066 {
00067   CMDIChildWnd::Dump(dc);
00068 }
00069
00070 #endif //_DEBUG
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CChildFrame message handlers
00074
00075 BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT /* lpcs */, CCreateContext* pContext)
00076 {
00077   return m_wndSplitter.Create(this,
00078     2, 2,       // TODO: adjust the number of rows, columns
00079     CSize(10, 10),  // TODO: adjust the minimum pane size
00080     pContext);
00081 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/minifrm.cpp Source File

  • general
  • propdlg

minifrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011
00012 #include "shapeobj.h"
00013 #include "resource.h"
00014 #include "colorpge.h"
00015 #include "stylepge.h"
00016 #include "propsht2.h"
00017 #include "minifrm.h"
00018 #include "mainfrm.h"
00019
00020 BEGIN_MESSAGE_MAP(CShapePropSheetFrame, CMiniFrameWnd)
00021   //{{AFX_MSG_MAP(CShapePropSheetFrame)
00022   ON_WM_CREATE()
00023   ON_WM_CLOSE()
00024   ON_WM_SETFOCUS()
00025   ON_WM_ACTIVATE()
00026   //}}AFX_MSG_MAP
00027 END_MESSAGE_MAP()
00028
00029 CShapePropSheetFrame::CShapePropSheetFrame()
00030 {
00031   m_pModelessShapePropSheet = NULL;
00032 }
00033
00034 int CShapePropSheetFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00035 {
00036   if (CMiniFrameWnd::OnCreate(lpCreateStruct) == -1)
00037     return -1;
00038
00039   m_pModelessShapePropSheet = new CModelessShapePropSheet(this);
00040   if (!m_pModelessShapePropSheet->Create(this,
00041     WS_CHILD | WS_VISIBLE, 0))
00042   {
00043     delete m_pModelessShapePropSheet;
00044     m_pModelessShapePropSheet = NULL;
00045     return -1;
00046   }
00047
00048   // Resize the mini frame so that it fits around the child property
00049   // sheet.
00050   CRect rectClient, rectWindow;
00051   m_pModelessShapePropSheet->GetWindowRect(rectClient);
00052   rectWindow = rectClient;
00053
00054   // CMiniFrameWnd::CalcWindowRect adds the extra width and height
00055   // needed from the mini frame.
00056   CalcWindowRect(rectWindow);
00057   SetWindowPos(NULL, rectWindow.left, rectWindow.top,
00058     rectWindow.Width(), rectWindow.Height(),
00059     SWP_NOZORDER | SWP_NOACTIVATE);
00060   m_pModelessShapePropSheet->SetWindowPos(NULL, 0, 0,
00061     rectClient.Width(), rectClient.Height(),
00062     SWP_NOZORDER | SWP_NOACTIVATE);
00063
00064   return 0;
00065 }
00066
00067 void CShapePropSheetFrame::OnClose()
00068 {
00069   // Instead of closing the modeless property sheet, just hide it.
00070   CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
00071   pMainFrame->HideModelessPropSheet();
00072 }
00073
00074 void CShapePropSheetFrame::OnSetFocus(CWnd* /*pOldWnd*/)
00075 {
00076   // Forward focus to the embedded property sheet
00077   ASSERT_VALID(m_pModelessShapePropSheet);
00078   m_pModelessShapePropSheet->SetFocus();
00079 }
00080
00081 void CShapePropSheetFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
00082 {
00083   CMiniFrameWnd::OnActivate(nState, pWndOther, bMinimized);
00084
00085   // Forward any WM_ACTIVATEs to the property sheet...
00086   // Like the dialog manager itself, it needs them to save/restore the focus.
00087   ASSERT_VALID(m_pModelessShapePropSheet);
00088
00089   // Use GetCurrentMessage to get unmodified message data.
00090   const MSG* pMsg = GetCurrentMessage();
00091   ASSERT(pMsg->message == WM_ACTIVATE);
00092   m_pModelessShapePropSheet->SendMessage(pMsg->message, pMsg->wParam,
00093     pMsg->lParam);
00094 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/resource.h Source File

  • ole
  • ipdrive

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by IPDRIVE.RC
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDD_IPDRIVE_FORM                101
00008 #define IDR_MAINFRAME                   128
00009 #define IDS_NOTHING                     129
00010 #define IDS_UNKNOWN                     130
00011 #define IDP_UNABLE_TO_CREATE_INPROC     131
00012 #define IDP_INCOMPATIBLE_TYPE_VALUE     132
00013 #define IDP_TIMING_RESULT               133
00014 #define IDC_COMBO2                      1001
00015 #define IDC_EDIT1                       1002
00016 #define IDC_COMBO3                      1003
00017 #define IDC_EDIT2                       1004
00018 #define IDC_CURRENT_COUNT               1007
00019 #define IDC_BUTTON1                     1010
00020 #define IDC_BUTTON2                     1011
00021 #define ID_LOOKUP                       0x8001
00022 #define ID_ADD                          0x8002
00023 #define ID_REMOVE                       0x8003
00024
00025 // Next default values for new objects
00026 //
00027 #ifdef APSTUDIO_INVOKED
00028 #ifndef APSTUDIO_READONLY_SYMBOLS
00029 #define _APS_3D_CONTROLS                     1
00030 #define _APS_NEXT_RESOURCE_VALUE        131
00031 #define _APS_NEXT_COMMAND_VALUE         32771
00032 #define _APS_NEXT_CONTROL_VALUE         1012
00033 #define _APS_NEXT_SYMED_VALUE           101
00034 #endif
00035 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/key.h Source File

  • ole
  • wordpad

key.h

Go to the documentation of this file.
00001 // key.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CKey
00014
00015 class CKey
00016 {
00017 public:
00018   CKey() {m_hKey = NULL;}
00019   ~CKey() {Close();}
00020
00021 // Attributes
00022 public:
00023   HKEY m_hKey;
00024   BOOL SetStringValue(LPCTSTR lpszValue, LPCTSTR lpszValueName = NULL);
00025   BOOL GetStringValue(CString& str, LPCTSTR lpszValueName = NULL);
00026
00027 // Operations
00028 public:
00029   BOOL Create(HKEY hKey, LPCTSTR lpszKeyName);
00030   BOOL Open(HKEY hKey, LPCTSTR lpszKeyName);
00031   void Close();
00032
00033 // Overrides
00034
00035 // Implementation
00036 protected:
00037 };
00038
00039 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagSYE Member List

This is the complete list of members for tagSYE, including all inherited members.
cl | tagSYE
iSyc | tagSYE
lRecogVal | tagSYE
syv | tagSYE
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/LHdrDlg.cpp Source File

  • general
  • ListHdr

LHdrDlg.cpp

Go to the documentation of this file.
00001 // ListHdrDlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ListHdr.h"
00014 #include "LHdrDlg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CAboutDlg dialog used for App About
00024
00025 class CAboutDlg : public CDialog
00026 {
00027 public:
00028   CAboutDlg();
00029
00030 // Dialog Data
00031   //{{AFX_DATA(CAboutDlg)
00032   enum { IDD = IDD_ABOUTBOX };
00033   //}}AFX_DATA
00034
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CAboutDlg)
00037   protected:
00038   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 protected:
00043   //{{AFX_MSG(CAboutDlg)
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00049 {
00050   //{{AFX_DATA_INIT(CAboutDlg)
00051   //}}AFX_DATA_INIT
00052 }
00053
00054 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00055 {
00056   CDialog::DoDataExchange(pDX);
00057   //{{AFX_DATA_MAP(CAboutDlg)
00058   //}}AFX_DATA_MAP
00059 }
00060
00061 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00062   //{{AFX_MSG_MAP(CAboutDlg)
00063     // No message handlers
00064   //}}AFX_MSG_MAP
00065 END_MESSAGE_MAP()
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CListHdrDlg dialog
00069
00070 CListHdrDlg::CListHdrDlg(CWnd* pParent /*=NULL*/)
00071   : CDialog(CListHdrDlg::IDD, pParent)
00072 {
00073   //{{AFX_DATA_INIT(CListHdrDlg)
00074   m_bNoLabelWrap = FALSE;
00075   m_bAutoArrange = FALSE;
00076   m_bSingleSel = FALSE;
00077   m_bEditLabels = FALSE;
00078   m_bNoColHdr = FALSE;
00079   m_bNoSortHdr = FALSE;
00080   m_strViewMode = _T("REPORT");
00081   m_strAlignMode = _T("ALIGNTOP");
00082   m_strSortMode = _T("None");
00083   m_bHoverSelect = FALSE;
00084   m_bWorkAreas = FALSE;
00085   //}}AFX_DATA_INIT
00086   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00087
00088   m_bHotCursor= TRUE;
00089   m_pImageHdrSmall = NULL;
00090   m_pImageList = NULL;
00091   m_pImageListSmall = NULL;
00092 }
00093
00094 CListHdrDlg::~CListHdrDlg()
00095 {
00096   if( m_pImageHdrSmall != NULL)
00097     delete m_pImageHdrSmall;
00098   if( m_pImageList != NULL)
00099     delete m_pImageList;
00100   if( m_pImageListSmall != NULL)
00101     delete m_pImageListSmall;
00102 }
00103
00104 void CListHdrDlg::DoDataExchange(CDataExchange* pDX)
00105 {
00106   CDialog::DoDataExchange(pDX);
00107   //{{AFX_DATA_MAP(CListHdrDlg)
00108   DDX_Control(pDX, IDC_LISTVIEW1, m_listctrl);
00109   DDX_Check(pDX, IDC_NOLABELWRAP, m_bNoLabelWrap);
00110   DDX_Check(pDX, IDC_AUTOARRANGE, m_bAutoArrange);
00111   DDX_Check(pDX, IDC_SINGLESEL, m_bSingleSel);
00112   DDX_Check(pDX, IDC_EDITLABELS, m_bEditLabels);
00113   DDX_Check(pDX, IDC_NOCOLUMNHEADER, m_bNoColHdr);
00114   DDX_Check(pDX, IDC_NOSORTHEADER, m_bNoSortHdr);
00115   DDX_CBString(pDX, IDC_VIEWMODE, m_strViewMode);
00116   DDX_CBString(pDX, IDC_ALIGN, m_strAlignMode);
00117   DDX_CBString(pDX, IDC_SORT, m_strSortMode);
00118   DDX_Check(pDX, IDC_HOVER, m_bHoverSelect);
00119   DDX_Check(pDX, IDC_WORKAREAS, m_bWorkAreas);
00120   //}}AFX_DATA_MAP
00121 }
00122
00123 BEGIN_MESSAGE_MAP(CListHdrDlg, CDialog)
00124   //{{AFX_MSG_MAP(CListHdrDlg)
00125   ON_WM_PAINT()
00126   ON_WM_QUERYDRAGICON()
00127   ON_BN_CLICKED(IDC_NOLABELWRAP, OnNoLabelWrap)
00128   ON_BN_CLICKED(IDC_AUTOARRANGE, OnAutoArrange)
00129   ON_BN_CLICKED(IDC_EDITLABELS, OnEditLabels)
00130   ON_BN_CLICKED(IDC_NOCOLUMNHEADER, OnNoColHdr)
00131   ON_BN_CLICKED(IDC_NOSORTHEADER, OnNoSortHdr)
00132   ON_BN_CLICKED(IDC_SINGLESEL, OnSingleSel)
00133   ON_CBN_SELCHANGE(IDC_ALIGN, OnChangeAlign)
00134   ON_CBN_SELCHANGE(IDC_VIEWMODE, OnChangeView)
00135   ON_BN_CLICKED(IDC_HOVER, OnHover)
00136   ON_BN_CLICKED(IDC_MYHOTCUR, OnMyHotCur)
00137   ON_CBN_SELCHANGE(IDC_SORT, OnChangeSort)
00138   ON_BN_CLICKED(IDC_WORKAREAS, OnWorkAreas)
00139   ON_BN_CLICKED(IDC_STDHOTCUR, OnStdHotCur)
00140   ON_BN_CLICKED(IDABOUT, OnAbout)
00141   //}}AFX_MSG_MAP
00142 END_MESSAGE_MAP()
00143
00144 /////////////////////////////////////////////////////////////////////////////
00145 // CListHdrDlg message handlers
00146
00147 BOOL CListHdrDlg::OnInitDialog()
00148 {
00149   CListHdrApp     *pApp;
00150   CRect           rect;
00151
00152   CDialog::OnInitDialog();  // let the base class do the default work
00153   UpdateData(TRUE);  // bring the information from the dialog.
00154   pApp = (CListHdrApp *)AfxGetApp();
00155   srand((unsigned) time(NULL));  // start the random number generator
00156
00157   // create image list for header items
00158   m_pImageHdrSmall = new CImageList();
00159   ASSERT(m_pImageHdrSmall != NULL);    // serious allocation failure checking
00160   m_pImageHdrSmall->Create(16, 16, ILC_MASK, 2, 2);
00161   m_pImageHdrSmall->Add(pApp->LoadIcon(IDI_HDRICON1));
00162   m_pImageHdrSmall->Add(pApp->LoadIcon(IDI_HDRICON2));
00163
00164   // fill in image lists
00165   m_pImageList = new CImageList();
00166   m_pImageListSmall = new CImageList();
00167   ASSERT(m_pImageList != NULL && m_pImageListSmall != NULL);    // serious allocation failure checking
00168   m_pImageList->Create(32, 32, TRUE,  4, 4);
00169   m_pImageListSmall->Create(16, 16, TRUE, 4, 4);
00170   m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST1));
00171   m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST2));
00172   m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST3));
00173   m_pImageList->Add(pApp->LoadIcon(IDI_ICONLIST4));
00174   m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST1));
00175   m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST2));
00176   m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST3));
00177   m_pImageListSmall->Add(pApp->LoadIcon(IDI_ICONLIST4));
00178
00179   // initialize the standard and custom hot cursors
00180   m_hMyHotCursor= pApp->LoadCursor(IDC_SPYGLASS);
00181   m_hStdHotCursor= m_listctrl.GetHotCursor();
00182
00183   FillListCtrl();
00184
00185   // Enable/disable inter-dependent list control styles
00186   ((CButton*)GetDlgItem(IDC_STDHOTCUR))->SetCheck(m_bHotCursor);
00187   GetDlgItem(IDC_STDHOTCUR)->EnableWindow(m_bHoverSelect);
00188   GetDlgItem(IDC_MYHOTCUR)->EnableWindow(m_bHoverSelect);
00189   GetDlgItem(IDC_WORKAREAS)->EnableWindow(FALSE);
00190   GetDlgItem(IDC_ALIGN)->EnableWindow(FALSE);  // default is  report mode Does not support this
00191   GetDlgItem(IDC_AUTOARRANGE)->EnableWindow(FALSE);
00192
00193   return FALSE;  // there is no change in any control focus stuff here.
00194 }
00195
00196 // If you add a minimize button to your dialog, you will need the code below
00197 //  to draw the icon.  For MFC applications using the document/view model,
00198 //  this is automatically done for you by the framework.
00199 void CListHdrDlg::OnPaint()
00200 {
00201   if (IsIconic())
00202   {
00203     CPaintDC dc(this); // device context for painting
00204
00205     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00206
00207     // Center icon in client rectangle
00208     int cxIcon = GetSystemMetrics(SM_CXICON);
00209     int cyIcon = GetSystemMetrics(SM_CYICON);
00210     CRect rect;
00211     GetClientRect(&rect);
00212     int x = (rect.Width() - cxIcon + 1) / 2;
00213     int y = (rect.Height() - cyIcon + 1) / 2;
00214
00215     // Draw the icon
00216     dc.DrawIcon(x, y, m_hIcon);
00217   }
00218   else
00219   {
00220     CDialog::OnPaint();
00221   }
00222 }
00223
00224 HCURSOR CListHdrDlg::OnQueryDragIcon()
00225 {
00226   return (HCURSOR) m_hIcon;
00227 }
00228
00229 void CListHdrDlg::FillListCtrl()
00230 {
00231   CRect           rect;
00232   int             iIcon, iItem, iSubItem, iActualItem;
00233   LV_ITEM         lvitem;
00234   CString         strItem1= _T("ITEM");
00235   CString         strItem2= _T("SUB_ITEM");
00236   CString         strIconDesc[4], strIconShortDesc[4];
00237   LPTSTR          pStrTemp1, pStrTemp2;
00238   CListHdrApp     *pApp;
00239
00240   iIcon = iItem = iSubItem = iActualItem = 0;
00241
00242   strIconDesc[0]= _T("Blue Ellipse, Yellow Triangle, Red Rectangle");
00243   strIconDesc[1]= _T("Yellow Ellipse, Red Triangle, Blue Rectangle");
00244   strIconDesc[2]= _T("Red Ellipse, Blue Triangle, Yellow Rectangle");
00245   strIconDesc[3]= _T("Red Ellipse, Yellow Triangle, Blue Rectangle");
00246   strIconShortDesc[0]= _T("BE, YT, RR (Title)");
00247   strIconShortDesc[1]= _T("YE, RT, BR (Title)");
00248   strIconShortDesc[2]= _T("RE, BT, YR (Title)");
00249   strIconShortDesc[3]= _T("RE, YT, BR (Title)");
00250
00251
00252   pApp = (CListHdrApp *)AfxGetApp();
00253   m_listctrl.SetImageList(m_pImageList, LVSIL_NORMAL);
00254   m_listctrl.SetImageList(m_pImageListSmall, LVSIL_SMALL);
00255
00256   // insert two columns (REPORT mode) and modify the new header items
00257   m_listctrl.GetWindowRect(&rect);
00258   m_listctrl.InsertColumn(0, strItem1, LVCFMT_LEFT,
00259     rect.Width() * 1/3, 0);
00260   m_listctrl.InsertColumn(1, strItem2, LVCFMT_LEFT,
00261     rect.Width() * 2/3, 1);
00262   ModifyHeaderItems();
00263
00264   for (iItem = 0; iItem < 20; iItem++)  // insert the items and subitems into the list view.
00265     for (iSubItem = 0; iSubItem < 2; iSubItem++)
00266     {
00267       if (iSubItem == 0) {
00268         iIcon = rand() % 4;  // choose the icon and legend for the entry
00269       }
00270
00271       lvitem.mask = LVIF_TEXT | (iSubItem == 0? LVIF_IMAGE : 0);
00272       lvitem.iItem = (iSubItem == 0)? iItem : iActualItem;
00273       lvitem.iSubItem = iSubItem;
00274
00275       // calculate the main and sub-item strings for the current item
00276       pStrTemp1= strIconShortDesc[iIcon].GetBuffer(strIconShortDesc[iIcon].GetLength());
00277       pStrTemp2= strIconDesc[iIcon].GetBuffer(strIconDesc[iIcon].GetLength());
00278       lvitem.pszText = iSubItem == 0? pStrTemp1 : pStrTemp2;
00279
00280       lvitem.iImage = iIcon;
00281       if (iSubItem == 0)
00282         iActualItem = m_listctrl.InsertItem(&lvitem); // insert new item
00283       else
00284         m_listctrl.SetItem(&lvitem); // modify existing item (the sub-item text)
00285     }
00286 }
00287
00288 void CListHdrDlg::ModifyHeaderItems()
00289 {
00290   HD_ITEM curItem;
00291
00292   // retrieve embedded header control
00293   CHeaderCtrl* pHdrCtrl= NULL;
00294   pHdrCtrl= m_listctrl.GetHeaderCtrl();
00295
00296   pHdrCtrl->SetImageList(m_pImageHdrSmall);
00297   // add bmaps to each header item
00298   memset(&curItem, 0, sizeof(curItem));
00299   pHdrCtrl->GetItem(0, &curItem);
00300   curItem.mask= HDI_IMAGE | HDI_FORMAT;
00301   curItem.iImage= 0;
00302   curItem.fmt= HDF_LEFT | HDF_IMAGE | HDF_STRING;
00303   pHdrCtrl->SetItem(0, &curItem);
00304
00305   pHdrCtrl->GetItem(1, &curItem);
00306   curItem.mask= HDI_IMAGE | HDI_FORMAT;
00307   curItem.iImage= 1;
00308   curItem.fmt= HDF_LEFT | HDF_IMAGE | HDF_STRING;
00309   pHdrCtrl->SetItem(1, &curItem);
00310 }
00311
00312 // this function is used when a requested style
00313 // LVS_NOLABELWRAP, LVS_NOCOLUMNHEADER, and LVS_NOSORTHEADER
00314 // forces the current control to be re-created with the new style.
00315 void CListHdrDlg::RenewListCtrl(DWORD dwStyle, BOOL bSetBits)
00316 {
00317   DWORD   dwStyleOld, dwExtStyles;
00318   CRect   rect;
00319
00320   dwStyleOld = GetWindowLong(m_listctrl.m_hWnd, GWL_STYLE);
00321   if (bSetBits)
00322     dwStyleOld |= dwStyle;   // turn on bits specified by caller.
00323   else
00324     dwStyleOld &= ~dwStyle;  // turn off bits specified by caller.
00325
00326   m_listctrl.GetWindowRect(&rect);
00327   ScreenToClient(&rect);
00328   dwExtStyles= m_listctrl.GetExtendedStyle(); //save extended styles
00329   m_listctrl.DestroyWindow();
00330   m_listctrl.Create(dwStyleOld, rect, this, IDC_LISTVIEW1);
00331   m_listctrl.ModifyStyleEx(0,WS_EX_CLIENTEDGE); // renew the 3D border of the control
00332   m_listctrl.SetExtendedStyle(dwExtStyles);
00333
00334   FillListCtrl(); // repopulate with a new item group
00335
00336   // work areas are not carried over with the new control
00337   m_listctrl.SetWorkAreas(0, NULL);
00338   m_bWorkAreas= FALSE;
00339   UpdateData(FALSE);  // update the dialog
00340
00341 }
00342
00343 // this function is used when a requested style
00344 // can be applied to the existing control, and demonstrated.
00345 void CListHdrDlg::ChangeListCtrlStyle(DWORD dwStyle, BOOL bSetBits)
00346 {
00347   CRect   rect;
00348
00349   m_listctrl.GetWindowRect(&rect);
00350   ScreenToClient(&rect);
00351   ASSERT(dwStyle != 0);  // watch out for LVS_foo DEFINITIONS which are 0.
00352   if (bSetBits)
00353     m_listctrl.ModifyStyle(0, dwStyle);
00354   else
00355     m_listctrl.ModifyStyle(dwStyle, 0);
00356
00357   InvalidateRect(rect);
00358   UpdateData(FALSE);  // send information back to the dialog
00359 }
00360
00361 void CListHdrDlg::OnAutoArrange()
00362 {
00363   UpdateData(TRUE);  // get the information from the dialog
00364   ChangeListCtrlStyle(LVS_AUTOARRANGE, m_bAutoArrange);
00365 }
00366
00367 void CListHdrDlg::OnEditLabels()
00368 {
00369   UpdateData(TRUE);
00370   ChangeListCtrlStyle(LVS_EDITLABELS, m_bEditLabels);
00371 }
00372
00373 void CListHdrDlg::OnNoColHdr()
00374 {
00375   UpdateData(TRUE);
00376   RenewListCtrl(LVS_NOCOLUMNHEADER, m_bNoColHdr);
00377 }
00378
00379 void CListHdrDlg::OnNoSortHdr()
00380 {
00381   UpdateData(TRUE);
00382   RenewListCtrl(LVS_NOSORTHEADER, m_bNoSortHdr);
00383 }
00384
00385 void CListHdrDlg::OnSingleSel()
00386 {
00387   UpdateData(TRUE);
00388   ChangeListCtrlStyle(LVS_SINGLESEL, m_bSingleSel);
00389 }
00390
00391 void CListHdrDlg::OnNoLabelWrap()
00392 {
00393   UpdateData(TRUE);
00394   RenewListCtrl(LVS_NOLABELWRAP, m_bNoLabelWrap);
00395 }
00396
00397 void CListHdrDlg::OnChangeView()
00398 {
00399
00400   long        lStyle, lStyleOld;
00401   BOOL        bReport, bIconic;
00402
00403   // retrieve view mode selection
00404   UpdateData(TRUE);
00405   if (m_strViewMode == _T("ICON"))
00406     lStyle = LVS_ICON;
00407   else if (m_strViewMode == _T("SMALL ICON"))
00408     lStyle = LVS_SMALLICON;
00409   else if (m_strViewMode == _T("REPORT"))
00410     lStyle = LVS_REPORT;
00411   else
00412   {
00413     ASSERT(m_strViewMode == _T("LIST"));
00414     lStyle = LVS_LIST;
00415   }
00416
00417   // update interdependent styles, depending on view mode choice
00418   bReport = lStyle == LVS_REPORT;
00419   bIconic = lStyle == LVS_ICON || lStyle == LVS_SMALLICON;
00420   GetDlgItem(IDC_NOSORTHEADER)->EnableWindow(bReport);
00421   GetDlgItem(IDC_NOCOLUMNHEADER)->EnableWindow(bReport);
00422   GetDlgItem(IDC_WORKAREAS)->EnableWindow(bIconic);
00423   GetDlgItem(IDC_ALIGN)->EnableWindow(bIconic);
00424   GetDlgItem(IDC_AUTOARRANGE)->EnableWindow(bIconic);
00425
00426   lStyleOld = GetWindowLong(m_listctrl.m_hWnd, GWL_STYLE);
00427   lStyleOld &= ~(LVS_TYPEMASK);  // turn off all the style (view mode) bits
00428   lStyleOld |= lStyle;        // Set the new style for the control
00429   SetWindowLong(m_listctrl.m_hWnd, GWL_STYLE, lStyleOld);
00430
00431   //In order to change the alignment, the control must be re-created.
00432   //However, changing the view mode of a list control does not force a re-creation.
00433   //Therefore, if the list view is in iconic mode, the control must be re-created
00434   //to carry over the current alignment mode.
00435   if(bIconic) //need to keep alignment also
00436     RenewListCtrl(0, 0);
00437 }
00438
00439 void CListHdrDlg::OnChangeAlign()
00440 {
00441   // this function takes into consideration that LVS_ALIGNTOP is defined as zero.
00442   UpdateData(TRUE);
00443   ASSERT(m_strAlignMode == _T("ALIGNTOP") || m_strAlignMode == _T("ALIGNLEFT"));
00444   RenewListCtrl(LVS_ALIGNLEFT, (m_strAlignMode == _T("ALIGNLEFT")));
00445 }
00446
00447 void CListHdrDlg::OnHover()
00448 {
00449   UpdateData(TRUE);
00450
00451   if(m_bHoverSelect) // "hover selection" is enabled
00452   {
00453   // LVS_EX_ONECLICKACTIVATE (or LVS_EX_TWOCLICKACTIVATE must also be
00454   // set before  "hover selection" is enabled
00455     m_listctrl.SetExtendedStyle(LVS_EX_TRACKSELECT |
00456       LVS_EX_ONECLICKACTIVATE);
00457     GetDlgItem(IDC_STDHOTCUR)->EnableWindow(m_bHoverSelect);
00458     GetDlgItem(IDC_MYHOTCUR)->EnableWindow(m_bHoverSelect);
00459   }
00460   else // "hover selection" is disabled
00461   {
00462     m_listctrl.SetExtendedStyle(0);
00463     GetDlgItem(IDC_STDHOTCUR)->EnableWindow(m_bHoverSelect);
00464     GetDlgItem(IDC_MYHOTCUR)->EnableWindow(m_bHoverSelect);
00465   }
00466 }
00467
00468 void CListHdrDlg::OnMyHotCur()
00469 {
00470   m_listctrl.SetHotCursor(m_hMyHotCursor);
00471   m_bHotCursor= FALSE;
00472 }
00473
00474 void CListHdrDlg::OnChangeSort()
00475 {
00476   long    lStyle;
00477
00478   UpdateData(TRUE);
00479   lStyle = GetWindowLong(m_listctrl.m_hWnd, GWL_STYLE);
00480   lStyle &= ~(LVS_SORTASCENDING | LVS_SORTDESCENDING);
00481   SetWindowLong(m_listctrl.m_hWnd, GWL_STYLE, lStyle);  // set style without sorting
00482   if (m_strSortMode == _T("None"))
00483     RenewListCtrl(LVS_SORTASCENDING | LVS_SORTDESCENDING, FALSE);
00484   else if (m_strSortMode == _T("ASCENDING"))
00485     RenewListCtrl(LVS_SORTASCENDING, TRUE);
00486   else
00487   {
00488     ASSERT(m_strSortMode == _T("DESCENDING"));
00489     RenewListCtrl(LVS_SORTDESCENDING, TRUE);
00490   }
00491 }
00492
00493 void CListHdrDlg::OnWorkAreas()
00494 {
00495   UpdateData(TRUE);
00496
00497   if(m_bWorkAreas)
00498   {
00499     CRect curRect;
00500     CSize size;
00501
00502     size= m_listctrl.ApproximateViewRect();
00503     size.cx+= 100;
00504     size.cy+= 100;
00505
00506 /*      Work area layout
00507     _____________________
00508     |          |         |
00509     |          |         |
00510     |   0      |    1    |
00511     |          |         |
00512     |--------------------|
00513     |          |         |
00514     |   2      |    3    |
00515     |          |         |
00516     |__________|_________|*/
00517
00518     CRect rcWorkAreas[4];
00519
00520     rcWorkAreas[0].SetRect(0, 0, (size.cx / 2) - 5, (size.cy / 2) - 5);
00521     rcWorkAreas[1].SetRect((size.cx / 2) + 5, 0, size.cx, (size.cy / 2) - 5);
00522     rcWorkAreas[2].SetRect(0, (size.cy / 2) + 5, (size.cx / 2) - 5, size.cy);
00523     rcWorkAreas[3].SetRect((size.cx / 2) + 5, (size.cy / 2) + 5, size.cx, size.cy);
00524
00525     //set work areas
00526     m_listctrl.SetWorkAreas(4, rcWorkAreas);
00527
00528     // set insertion points for each work area
00529     CPoint  rgptWork[4];
00530     int i;
00531     for (i = 0; i < 4; i++)
00532     {
00533       rgptWork[i].x = rcWorkAreas[i].left + 10;
00534       rgptWork[i].y = rcWorkAreas[i].top + 10;
00535     }
00536     // now move all the items to the different quadrants
00537     for (i = 0; i < 20; i++)
00538       m_listctrl.SetItemPosition(i, rgptWork[i % 4]);
00539   }
00540   else    //delete all work areas and re-organize items
00541   {
00542     m_listctrl.SetWorkAreas(0, NULL);
00543
00544     CPoint pt(0, 0);
00545     for (int i = 0; i < 20; i++)
00546       m_listctrl.SetItemPosition(i, pt);  // move all the items to the origin
00547   }
00548   m_listctrl.Arrange(LVA_DEFAULT); // force the control to re-arrange the shuffled items
00549 }
00550
00551 void CListHdrDlg::OnStdHotCur()
00552 {
00553   m_listctrl.SetHotCursor(m_hStdHotCursor);
00554   m_bHotCursor= TRUE;
00555 }
00556
00557 void CListHdrDlg::OnAbout()
00558 {
00559     CAboutDlg dlgAbout;
00560     dlgAbout.DoModal();
00561 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/testhelp.odl Source File

  • controls
  • testhelp

testhelp.odl

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ Library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // testhelp.odl : type library source for OLE Control project.
00011
00012 // This file will be processed by the Make Type Library (mktyplib) tool to
00013 // produce the type library (testhelp.tlb) that will become a resource in
00014 // testhelp.ocx.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(31A2B280-8C11-11Cf-B37F-00AA00B92B50), version(1.0),
00019   helpstring("testhelp OLE Control module"), helpfile("testhelp.chm"),control ]
00020 library TESTHELPLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CTesthelpCtrl
00026
00027   [ uuid(31A2B281-8C11-11Cf-B37F-00AA00B92B50),
00028     helpstring("Dispatch interface for Testhelp Control"), hidden ]
00029   dispinterface _DTesthelp
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CTesthelpCtrl)
00035       [id(DISPID_FONT), bindable] IFontDisp* Font;
00036       [id(DISPID_BACKCOLOR), bindable, requestedit] OLE_COLOR BackColor;
00037       [id(DISPID_FORECOLOR), bindable, requestedit] OLE_COLOR ForeColor;
00038       [id(1)] BSTR Name1;
00039       [id(2)] BSTR Name2;
00040       [id(3)] BSTR Name3;
00041       [id(DISPID_BORDERSTYLE), bindable, requestedit] short BorderStyle;
00042       [id(4)] boolean UseMyHelp;
00043       [id(5)] boolean ShowToolTip;
00044       [id(6)] BSTR ToolTipText;
00045       [id(7)] short UsePopupHelp;
00046       //}}AFX_ODL_PROP
00047
00048     methods:
00049       // NOTE - ClassWizard will maintain method information here.
00050       //    Use extreme caution when editing this section.
00051       //{{AFX_ODL_METHOD(CTesthelpCtrl)
00052       //}}AFX_ODL_METHOD
00053
00054       [id(DISPID_ABOUTBOX)] void AboutBox();
00055   };
00056
00057   //  Event dispatch interface for CTesthelpCtrl
00058
00059   [ uuid(31A2B282-8C11-11Cf-B37F-00AA00B92B50),
00060     helpstring("Event interface for Testhelp Control") ]
00061   dispinterface _DTesthelpEvents
00062   {
00063     properties:
00064       //  Event interface has no properties
00065
00066     methods:
00067       // NOTE - ClassWizard will maintain event information here.
00068       //    Use extreme caution when editing this section.
00069       //{{AFX_ODL_EVENT(CTesthelpCtrl)
00070       //}}AFX_ODL_EVENT
00071   };
00072
00073   //  Class information for CTesthelpCtrl
00074
00075   [ uuid(31A2B283-8C11-11CF-B37F-00AA00B92B50),
00076     helpstring("Testhelp Control"), helpcontext(0x20064),control ]
00077   coclass Testhelp
00078   {
00079     [default] dispinterface _DTesthelp;
00080     [default, source] dispinterface _DTesthelpEvents;
00081   };
00082
00083
00084   //{{AFX_APPEND_ODL}}
00085 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CShapePropSheetFrame Member List

This is the complete list of members for CShapePropSheetFrame, including all inherited members.
CShapePropSheetFrame() | CShapePropSheetFrame |
m_pModelessShapePropSheet | CShapePropSheetFrame |
OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized) | CShapePropSheetFrame | [protected]
OnClose() | CShapePropSheetFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CShapePropSheetFrame | [protected]
OnSetFocus(CWnd *pOldWnd) | CShapePropSheetFrame | [protected]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CUndoMenu Member List

This is the complete list of members for CUndoMenu, including all inherited members.
GetMenuBar() | CUndoMenu | [inline, private, virtual]
m_wndUndoBar | CUndoMenu | [private]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CUndoMenu | [protected]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubeview.h Source File

  • advanced
  • cube

cubeview.h

Go to the documentation of this file.
00001 // cubeview.h : interface of the CCubeView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CCubeView : public CView
00013 {
00014 protected: // create from serialization only
00015   CCubeView();
00016   DECLARE_DYNCREATE(CCubeView)
00017
00018 // Attributes
00019 public:
00020   CCubeDoc* GetDocument();
00021
00022   CPalette    m_cPalette;
00023   CPalette    *m_pOldPalette;
00024   CRect       m_oldRect;
00025   float       m_fRadius;
00026   CClientDC   *m_pDC;
00027
00028 // Operations
00029 public:
00030   void Init();
00031   void CreateRGBPalette(void);
00032   BOOL bSetupPixelFormat(void);
00033   unsigned char ComponentFromIndex(int i, UINT nbits, UINT shift);
00034   void DrawScene(void);
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CCubeView)
00039   public:
00040   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 public:
00045   virtual ~CCubeView();
00046   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00047 #ifdef _DEBUG
00048   virtual void AssertValid() const;
00049   virtual void Dump(CDumpContext& dc) const;
00050 #endif
00051
00052 protected:
00053   BOOL    m_play;
00054
00055 // Generated message map functions
00056 protected:
00057   //{{AFX_MSG(CCubeView)
00058   afx_msg void OnFilePlay();
00059   afx_msg void OnUpdateFilePlay(CCmdUI* pCmdUI);
00060   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00061   afx_msg void OnDestroy();
00062   afx_msg void OnSize(UINT nType, int cx, int cy);
00063   afx_msg void OnTimer(UINT_PTR nIDEvent);
00064   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00065   //}}AFX_MSG
00066   DECLARE_MESSAGE_MAP()
00067 };
00068
00069 #ifndef _DEBUG  // debug version in cubeview.cpp
00070 inline CCubeDoc* CCubeView::GetDocument()
00071    { return (CCubeDoc*)m_pDocument; }
00072 #endif
00073
00074 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page5.cpp Source File

  • vc2008fp
  • NewControls

Page5.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "CustomProperties.h"
00013 #include "Page5.h"
00014
00015 #include <memory>
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CPage5 property page
00025
00026 IMPLEMENT_DYNCREATE(CPage5, CMFCPropertyPage)
00027
00028 CPage5::CPage5() : CMFCPropertyPage(CPage5::IDD)
00029 {
00030   m_bDescrArea = TRUE;
00031   m_bDotNetLook = TRUE;
00032   m_bHeader = TRUE;
00033   m_bMarkSortedColumn = TRUE;
00034   m_bColor = TRUE;
00035   m_bModifyFont = TRUE;
00036   m_bPropListCustomColors = FALSE;
00037   m_bPropListCategorized = TRUE;
00038   m_bShowDragContext = TRUE;
00039   m_bMarkChanged = TRUE;
00040   m_bHideFontProps = FALSE;
00041
00042   m_wndList.m_bColor = TRUE;
00043   m_wndList.m_bModifyFont = TRUE;
00044
00045   pGroupFont = NULL;
00046 }
00047
00048 CPage5::~CPage5()
00049 {
00050 }
00051
00052 void CPage5::DoDataExchange(CDataExchange* pDX)
00053 {
00054   CMFCPropertyPage::DoDataExchange(pDX);
00055   DDX_Control(pDX, IDC_PROPLIST_EXPAND_ALL, m_btnExpandAll);
00056   DDX_Control(pDX, IDC_PROPLIST_LOCATION, m_wndPropListLocation);
00057   DDX_Control(pDX, IDC_LIST1, m_wndList);
00058   DDX_Check(pDX, IDC_DESCRIPTION_AREA, m_bDescrArea);
00059   DDX_Check(pDX, IDC_DOT_NET_LOOK, m_bDotNetLook);
00060   DDX_Check(pDX, IDC_HEADER, m_bHeader);
00061   DDX_Check(pDX, IDC_MARK_SORTED_COLUMN, m_bMarkSortedColumn);
00062   DDX_Check(pDX, IDC_COLOR_ROWS, m_bColor);
00063   DDX_Check(pDX, IDC_MODIFY_FONT, m_bModifyFont);
00064   DDX_Check(pDX, IDC_CUSTOM_COLORS, m_bPropListCustomColors);
00065   DDX_Check(pDX, IDC_PROPLIST_CATEGORIZED, m_bPropListCategorized);
00066   DDX_Check(pDX, IDC_PROPLIST_CATEGORIZED2, m_bShowDragContext);
00067   DDX_Check(pDX, IDC_MARK_CHANGED, m_bMarkChanged);
00068   DDX_Check(pDX, IDC_HIDE_FONT_PROPS, m_bHideFontProps);
00069 }
00070
00071 BEGIN_MESSAGE_MAP(CPage5, CMFCPropertyPage)
00072   ON_BN_CLICKED(IDC_HEADER, OnHeader)
00073   ON_BN_CLICKED(IDC_DOT_NET_LOOK, OnDotNetLook)
00074   ON_BN_CLICKED(IDC_DESCRIPTION_AREA, OnDescriptionArea)
00075   ON_BN_CLICKED(IDC_MARK_SORTED_COLUMN, OnMarkSortedColumn)
00076   ON_BN_CLICKED(IDC_COLOR_ROWS, OnColorRows)
00077   ON_BN_CLICKED(IDC_MODIFY_FONT, OnModifyFont)
00078   ON_BN_CLICKED(IDC_CUSTOM_COLORS, OnPropListCustomColors)
00079   ON_BN_CLICKED(IDC_PROPLIST_EXPAND_ALL, OnProplistExpandAll)
00080   ON_BN_CLICKED(IDC_PROPLIST_CATEGORIZED, OnProplistCategorized)
00081   ON_BN_CLICKED(IDC_PROPLIST_CATEGORIZED2, OnProplistCategorized2)
00082   ON_BN_CLICKED(IDC_RESET_VALUES, OnResetValues)
00083   ON_BN_CLICKED(IDC_MARK_CHANGED, OnMarkChanged)
00084   ON_BN_CLICKED(IDC_HIDE_FONT_PROPS, OnHideFontProps)
00085 END_MESSAGE_MAP()
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CPage5 message handlers
00089
00090 const int nColumns = 3;
00091 const int nRows = 50;
00092
00093 BOOL CPage5::OnInitDialog()
00094 {
00095   CMFCPropertyPage::OnInitDialog();
00096
00097   m_wndList.InsertColumn(0, _T("#"), LVCFMT_LEFT, 20);
00098
00099   int nColumn;
00100   for (nColumn = 1; nColumn < nColumns; nColumn++)
00101   {
00102     m_wndList.InsertColumn(nColumn, CString((TCHAR)(_T('A') + nColumn - 1)), LVCFMT_LEFT, 60 + nColumn * 10);
00103   }
00104
00105   for (int i = 0; i < nRows; i++)
00106   {
00107     CString str;
00108     str.Format(_T("%d"), i);
00109     m_wndList.InsertItem(i, str);
00110     m_wndList.SetItemData(i, i);
00111
00112     for (nColumn = 1; nColumn < nColumns; nColumn++)
00113     {
00114       str.Format(_T("Item(%d, %d)"), nColumn - 1, nColumn == 1 ? 99 - i : i + 50);
00115       m_wndList.SetItemText(i, nColumn, str);
00116     }
00117   }
00118
00119   m_wndList.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
00120   m_wndList.EnableMarkSortedColumn();
00121
00122   CRect rectPropList;
00123   m_wndPropListLocation.GetClientRect(&rectPropList);
00124   m_wndPropListLocation.MapWindowPoints(this, &rectPropList);
00125
00126   m_wndPropList.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, rectPropList, this, (UINT)-1);
00127
00128   m_wndPropList.EnableHeaderCtrl();
00129   m_wndPropList.EnableDescriptionArea();
00130   m_wndPropList.SetVSDotNetLook(m_bDotNetLook);
00131   m_wndPropList.MarkModifiedProperties(m_bMarkChanged);
00132
00133   m_wndPropList.SetAlphabeticMode(!m_bPropListCategorized);
00134   m_wndPropList.SetShowDragContext(m_bShowDragContext);
00135
00136   std::auto_ptr<CMFCPropertyGridProperty> apGroup1(new CMFCPropertyGridProperty(_T("Appearance")));
00137
00138   COleVariant var3DLook((short)VARIANT_FALSE, VT_BOOL);
00139   apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("3D Look"), var3DLook, _T("Specifies the dialog's font will be nonbold and controls will have a 3D border")));
00140
00141   CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("Border"), _T("Dialog Frame"), _T("One of: None, Thin, Resizable, or Dialog Frame"));
00142   pProp->AddOption(_T("None"));
00143   pProp->AddOption(_T("Thin"));
00144   pProp->AddOption(_T("Resizable"));
00145   pProp->AddOption(_T("Dialog Frame"));
00146   pProp->AllowEdit(FALSE);
00147
00148   apGroup1->AddSubItem(pProp);
00149   apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("Caption"), (COleVariant) _T("About NewControlsDemo"), _T("Specifies the text that will be displayed in the dialog's title bar")));
00150
00151   m_wndPropList.AddProperty(apGroup1.release());
00152
00153   std::auto_ptr<CMFCPropertyGridProperty> apSize(new CBoundedNumberPairProp(_T("Window Size"), 0, 300, 0, 200, 0, TRUE));
00154
00155   pProp = new CBoundedNumberSubProp(_T("Height"), (COleVariant) 250l, 0, 300, _T("Specifies the dialog's height"));
00156   pProp->EnableSpinControl(TRUE, 0, 300);
00157   apSize->AddSubItem(pProp);
00158
00159   pProp = new CBoundedNumberSubProp( _T("Width"), (COleVariant) 150l, 0, 200, _T("Specifies the dialog's width"));
00160   pProp->EnableSpinControl(TRUE, 0, 200);
00161   apSize->AddSubItem(pProp);
00162
00163   m_wndPropList.AddProperty(apSize.release());
00164
00165   pGroupFont = new CMFCPropertyGridProperty(_T("Font"));
00166
00167   LOGFONT lf;
00168   CFont* font = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
00169   font->GetLogFont(&lf);
00170   lstrcpy(lf.lfFaceName, _T("Arial"));
00171
00172   pGroupFont->AddSubItem(new CMFCPropertyGridFontProperty(_T("Font"), lf, CF_EFFECTS | CF_SCREENFONTS, _T("Specifies the default font for the dialog")));
00173   pGroupFont->AddSubItem(new CMFCPropertyGridProperty(_T("Use System Font"), (COleVariant)VARIANT_TRUE, _T("Specifies that the dialog uses MS Shell Dlg font")));
00174
00175   m_wndPropList.AddProperty(pGroupFont);
00176
00177   std::auto_ptr<CMFCPropertyGridProperty> apGroup3(new CMFCPropertyGridProperty(_T("Misc")));
00178   pProp = new CMFCPropertyGridProperty(_T("(Name)"), _T("IDD_ABOUT_BOX(dialog)"));
00179   pProp->Enable(FALSE);
00180   apGroup3->AddSubItem(pProp);
00181
00182   CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("Window Color"), RGB(210, 192, 254), NULL, _T("Specifies the default dialog color"));
00183   pColorProp->EnableOtherButton(_T("Other..."));
00184   pColorProp->EnableAutomaticButton(_T("Default"), ::GetSysColor(COLOR_3DFACE));
00185   apGroup3->AddSubItem(pColorProp);
00186
00187   static TCHAR BASED_CODE szFilter[] = _T("Icon Files(*.ico)|*.ico|All Files(*.*)|*.*||");
00188   apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Icon"), TRUE, _T(""), _T("ico"), 0, szFilter, _T("Specifies the dialog icon")));
00189
00190   apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Folder"), _T("c:\\")));
00191
00192   apGroup3->AddSubItem(new CMFCPropertyGridProperty(_T("Phone"), _T("(123) 123-12-12"), _T("Enter a phone number"), 0, _T(" ddd  ddd dd dd"), _T("(___) ___-__-__")));
00193
00194   m_wndPropList.AddProperty(apGroup3.release());
00195
00196   std::auto_ptr<CMFCPropertyGridProperty> apGroup4(new CMFCPropertyGridProperty(_T("Hierarchy")));
00197
00198   CMFCPropertyGridProperty* pGroup41 = new CMFCPropertyGridProperty(_T("First sub-level"));
00199   apGroup4->AddSubItem(pGroup41);
00200
00201   CMFCPropertyGridProperty* pGroup411 = new CMFCPropertyGridProperty(_T("Second sub-level"));
00202   pGroup41->AddSubItem(pGroup411);
00203
00204   pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 1"), (COleVariant) _T("Value 1"), _T("This is a description")));
00205   pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 2"), (COleVariant) _T("Value 2"), _T("This is a description")));
00206   pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 3"), (COleVariant) _T("Value 3"), _T("This is a description")));
00207
00208   apGroup4->Expand(FALSE);
00209   m_wndPropList.AddProperty(apGroup4.release());
00210
00211   // Add custom properties:
00212   std::auto_ptr<CMFCPropertyGridProperty> apGroup5(new CMFCPropertyGridProperty(_T("Custom Properties")));
00213
00214   apGroup5->AddSubItem(new CCheckBoxProp(_T("Check Box"), TRUE, _T("Check Box Property")));
00215
00216   apGroup5->AddSubItem(new CPasswordProp(_T("Password"), _T("123456"), _T("Password Property")));
00217
00218   apGroup5->AddSubItem(new CSliderProp(_T("Slider"), 0, _T("Slider Property")));
00219
00220   CBitmap bmp;
00221   bmp.LoadBitmap(IDB_PROPICONS);
00222
00223   m_imageList.Create(16, 16, ILC_MASK | ILC_COLOR24, 0, 0);
00224   m_imageList.Add(&bmp, RGB(192, 192, 192));
00225
00226   CStringList lstIconNames;
00227   lstIconNames.AddTail(_T("Icon 1"));
00228   lstIconNames.AddTail(_T("Icon 2"));
00229   lstIconNames.AddTail(_T("Icon 3"));
00230   lstIconNames.AddTail(_T("Icon 4"));
00231   lstIconNames.AddTail(_T("Icon 5"));
00232   lstIconNames.AddTail(_T("Icon 6"));
00233   lstIconNames.AddTail(_T("Icon 7"));
00234   lstIconNames.AddTail(_T("Icon 8"));
00235   lstIconNames.AddTail(_T("Icon 9"));
00236   lstIconNames.AddTail(_T("Icon 10"));
00237
00238   apGroup5->AddSubItem(new CIconListProp(_T("Icon List"), m_imageList, 0, &lstIconNames, _T("Icon List Property")));
00239
00240   CComboBoxExProp* pComboEx = new CComboBoxExProp(_T("ComboBoxEx"), _T("Test"), _T("ComboBoxEx Property"), 0, &m_imageList);
00241   pComboEx->AddOption(_T("New"), 0, 0);
00242   pComboEx->AddOption(_T("Open"), 1, 1);
00243   pComboEx->AddOption(_T("Save"), 2, 0);
00244
00245   apGroup5->AddSubItem(pComboEx);
00246
00247   apGroup5->AddSubItem(new COwnerDrawDescrProp(_T("Owner-draw descr."), 0l));
00248   apGroup5->AddSubItem(new CTwoButtonsProp(_T("2 Buttons"), _T("text")));
00249   apGroup5->AddSubItem(new CCustomDlgProp(_T("Custom Dialog"), _T("value")));
00250
00251   m_wndPropList.AddProperty(apGroup5.release());
00252
00253   return TRUE;  // return TRUE unless you set the focus to a control
00254   // EXCEPTION: OCX Property Pages should return FALSE
00255 }
00256
00257 void CPage5::OnHeader()
00258 {
00259   UpdateData();
00260   m_wndPropList.EnableHeaderCtrl(m_bHeader);
00261 }
00262
00263 void CPage5::OnDotNetLook()
00264 {
00265   UpdateData();
00266   m_wndPropList.SetVSDotNetLook(m_bDotNetLook);
00267 }
00268
00269 void CPage5::OnDescriptionArea()
00270 {
00271   UpdateData();
00272   m_wndPropList.EnableDescriptionArea(m_bDescrArea);
00273 }
00274
00275 void CPage5::OnMarkSortedColumn()
00276 {
00277   UpdateData();
00278   m_wndList.EnableMarkSortedColumn(m_bMarkSortedColumn);
00279 }
00280
00281 COLORREF CMyListCtrl::OnGetCellTextColor(int nRow, int nColum)
00282 {
00283   if (!m_bColor)
00284   {
00285     return CMFCListCtrl::OnGetCellTextColor(nRow, nColum);
00286   }
00287
00288   return(nRow % 2) == 0 ? RGB(128, 37, 0) : RGB(0, 0, 0);
00289 }
00290
00291 COLORREF CMyListCtrl::OnGetCellBkColor(int nRow, int nColum)
00292 {
00293   if (!m_bColor)
00294   {
00295     return CMFCListCtrl::OnGetCellBkColor(nRow, nColum);
00296   }
00297
00298   if (m_bMarkSortedColumn && nColum == m_iSortedColumn)
00299   {
00300     return(nRow % 2) == 0 ? RGB(233, 221, 229) : RGB(176, 218, 234);
00301   }
00302
00303   return(nRow % 2) == 0 ? RGB(253, 241, 249) : RGB(196, 238, 254);
00304 }
00305
00306 HFONT CMyListCtrl::OnGetCellFont(int nRow, int nColum, DWORD /*dwData* = 0*/)
00307 {
00308   if (!m_bModifyFont)
00309   {
00310     return NULL;
00311   }
00312
00313   if (nColum == 2 &&(nRow >= 4 && nRow <= 8))
00314   {
00315     return afxGlobalData.fontDefaultGUIBold;
00316   }
00317
00318   return NULL;
00319 }
00320
00321 int CMyListCtrl::OnCompareItems(LPARAM lParam1, LPARAM lParam2, int iColumn)
00322 {
00323   CString strItem1 = GetItemText((int)(lParam1 < lParam2 ? lParam1 : lParam2), iColumn);
00324   CString strItem2 = GetItemText((int)(lParam1 < lParam2 ? lParam2 : lParam1), iColumn);
00325
00326   if (iColumn == 0)
00327   {
00328     int nItem1 = _ttoi(strItem1);
00329     int nItem2 = _ttoi(strItem2);
00330     return(nItem1 < nItem2 ? -1 : 1);
00331   }
00332   else
00333   {
00334     int iSort = _tcsicmp(strItem1, strItem2);
00335     return(iSort);
00336   }
00337 }
00338
00339 void CPage5::OnColorRows()
00340 {
00341   UpdateData();
00342   m_wndList.m_bColor = m_bColor;
00343   m_wndList.RedrawWindow();
00344 }
00345
00346 void CPage5::OnModifyFont()
00347 {
00348   UpdateData();
00349   m_wndList.m_bModifyFont = m_bModifyFont;
00350   m_wndList.RedrawWindow();
00351 }
00352
00353 void CPage5::OnPropListCustomColors()
00354 {
00355   UpdateData();
00356
00357   if (m_bPropListCustomColors)
00358   {
00359     if (afxGlobalData.m_nBitsPerPixel >= 16)
00360     {
00361       m_wndPropList.SetCustomColors(RGB(228, 243, 254), RGB(46, 70, 165), RGB(200, 236, 209), RGB(33, 102, 49), RGB(255, 229, 216), RGB(128, 0, 0), RGB(159, 159, 255));
00362     }
00363     else
00364     {
00365       m_wndPropList.SetCustomColors(RGB(255, 255, 255), RGB(32, 64, 128), RGB(255, 255, 0), RGB(255, 255, 0), RGB(192, 192, 192), RGB(255, 255, 255), RGB(0, 0, 0));
00366     }
00367   }
00368   else
00369   {
00370     COLORREF c = (COLORREF)-1;
00371     m_wndPropList.SetCustomColors(c, c, c, c, c, c, c);
00372   }
00373
00374   m_wndPropList.RedrawWindow();
00375 }
00376
00377 void CPage5::OnProplistExpandAll()
00378 {
00379   static BOOL bExpanded = FALSE;
00380
00381   m_wndPropList.ExpandAll(!bExpanded);
00382
00383   m_btnExpandAll.SetWindowText(bExpanded ? _T("Expand &All") : _T("Collapse &All"));
00384
00385   bExpanded = !bExpanded;
00386 }
00387
00388 void CPage5::OnProplistCategorized()
00389 {
00390   UpdateData();
00391
00392   m_wndPropList.SetAlphabeticMode(!m_bPropListCategorized);
00393   m_btnExpandAll.EnableWindow(m_bPropListCategorized);
00394 }
00395
00396 void CPage5::OnProplistCategorized2()
00397 {
00398   UpdateData();
00399   m_wndPropList.SetShowDragContext(m_bShowDragContext);
00400 }
00401
00402 void CPage5::OnResetValues()
00403 {
00404   m_wndPropList.ResetOriginalValues();
00405 }
00406
00407 void CPage5::OnMarkChanged()
00408 {
00409   UpdateData();
00410   m_wndPropList.MarkModifiedProperties(m_bMarkChanged);
00411 }
00412
00413 void CPage5::OnHideFontProps()
00414 {
00415   UpdateData();
00416
00417   ASSERT_VALID(pGroupFont);
00418   pGroupFont->Show(!m_bHideFontProps);
00419 }
00420
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRectItem Member List

This is the complete list of members for CRectItem, including all inherited members.
CRectItem() | CRectItem | [private]
CRectItem(COleDocument *pContainer) | CRectItem |
Dirty() | CRectItem | [inline]
GetActiveView() | CRectItem | [inline]
GetBaseSize() | CRectItem |
GetDocument() | CRectItem | [inline]
GetNativeClipboardData(COleDataSource *pDataSource) | CRectItem |
GetRect() | CRectItem | [inline]
GetSize() | CRectItem |
Invalidate(CView *pNotThisView=NULL) | CRectItem |
m_ptPos | CRectItem |
m_sizeContent | CRectItem | [protected]
m_sizeContentExtent | CRectItem | [protected]
m_sizeIcon | CRectItem | [protected]
m_sizeIconExtent | CRectItem | [protected]
Move(CRect &rc) | CRectItem |
OnActivate() | CRectItem | [protected, virtual]
OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam) | CRectItem | [protected, virtual]
OnChangeItemPosition(const CRect &rectPos) | CRectItem | [protected, virtual]
OnDeactivateUI(BOOL bUndoable) | CRectItem | [protected, virtual]
OnGetClipboardData(BOOL bIncludeLink, LPPOINT lpOffset, LPSIZE lpSize) | CRectItem | [protected, virtual]
OnGetItemPosition(CRect &rPosition) | CRectItem | [virtual]
ResetSize() | CRectItem |
Serialize(CArchive &ar) | CRectItem | [virtual]
SetBaseSize(CSize size) | CRectItem |
SetRect(CRect &rect) | CRectItem |
SetSize(CSize size) | CRectItem |
UpdateExtent() | CRectItem |
~CRectItem() | CRectItem |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CComponentCategoriesDlg Member List

This is the complete list of members for CComponentCategoriesDlg, including all inherited members.
CComponentCategoriesDlg(UINT idCaption, CWnd *pParent=NULL) | CComponentCategoriesDlg |
DoDataExchange(CDataExchange *pDX) | CComponentCategoriesDlg | [protected, virtual]
IDD enum value | CComponentCategoriesDlg |
m_aAvailableCategories | CComponentCategoriesDlg | [protected]
m_idCaption | CComponentCategoriesDlg |
m_lbCategories | CComponentCategoriesDlg |
m_lSelectedCategories | CComponentCategoriesDlg |
m_pCatInfo | CComponentCategoriesDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CComponentCategoriesDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CComponentCategoriesDlg | [protected]
OnInitDialog() | CComponentCategoriesDlg | [protected, virtual]
OnSelectAll() | CComponentCategoriesDlg | [protected]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/APropDg.Cpp Source File

  • ole
  • TstCon

APropDg.Cpp

Go to the documentation of this file.
00001 // CAmbientPropertiesDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CAmbientPropertiesDlg dialog
00022
00023
00024 CAmbientPropertiesDlg::CAmbientPropertiesDlg( CWnd* pParent,
00025    CTestContainer98Doc* pDoc ) :
00026    CDialog( CAmbientPropertiesDlg::IDD, pParent ),
00027    m_pDoc( pDoc ),
00028    m_tChanged( FALSE ),
00029    m_dispidChanged( DISPID_UNKNOWN )
00030 {
00031    ASSERT( m_pDoc != NULL );
00032   //{{AFX_DATA_INIT(CAmbientPropertiesDlg)
00033   //}}AFX_DATA_INIT
00034 }
00035
00036
00037 void CAmbientPropertiesDlg::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CDialog::DoDataExchange(pDX);
00040   //{{AFX_DATA_MAP(CAmbientPropertiesDlg)
00041   DDX_Control(pDX, IDC_PROPVALUECOMBO_AMBIENT, m_cboxPropValue);
00042   DDX_Control(pDX, IDC_DATE_AMBIENT, m_date);
00043   DDX_Control(pDX, IDC_STATIC_PROPERTYVALUE, m_staticPropertyValue);
00044   DDX_Control(pDX, IDC_DISPID, m_editDISPID);
00045   DDX_Control(pDX, IDC_CHOOSEFONT_AMBIENT, m_butChooseFont);
00046   DDX_Control(pDX, IDC_CHOOSECOLOR_AMBIENT, m_butChooseColor);
00047   DDX_Control(pDX, IDC_PROPNAME, m_cboxPropName);
00048   DDX_Control(pDX, IDC_SETVALUE_AMBIENT, m_butSetValue);
00049   DDX_Control(pDX, IDC_PROPVALUE, m_editPropValue);
00050   DDX_Control(pDX, IDC_PROPTYPE, m_cboxPropType);
00051   DDX_Control(pDX, IDC_ENABLED, m_checkEnabled);
00052   //}}AFX_DATA_MAP
00053 }
00054
00055
00056 BEGIN_MESSAGE_MAP(CAmbientPropertiesDlg, CDialog)
00057   //{{AFX_MSG_MAP(CAmbientPropertiesDlg)
00058   ON_CBN_SELCHANGE(IDC_PROPNAME, OnPropNameSelChange)
00059   ON_CBN_SELCHANGE(IDC_PROPTYPE, OnPropTypeSelChange)
00060   ON_BN_CLICKED(IDC_SETVALUE_AMBIENT, OnSetValue)
00061   ON_BN_CLICKED(IDC_ENABLED, OnEnabled)
00062   ON_BN_CLICKED(IDC_CHOOSECOLOR_AMBIENT, OnChooseColor)
00063   ON_BN_CLICKED(IDC_CHOOSEFONT_AMBIENT, OnChooseFont)
00064   ON_BN_CLICKED(IDC_NEWPROPERTY, OnNewProperty)
00065   ON_EN_SETFOCUS(IDC_PROPVALUE, OnPropValueSetFocus)
00066   ON_WM_HELPINFO()
00067   ON_WM_CONTEXTMENU()
00068   //}}AFX_MSG_MAP
00069 END_MESSAGE_MAP()
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CAmbientPropertiesDlg message handlers
00073
00074 BOOL CAmbientPropertiesDlg::OnInitDialog()
00075 {
00076    int iProp;
00077    int iType;
00078    int iItem;
00079
00080   CDialog::OnInitDialog();
00081
00082    // Fill in the available ambient properties
00083    for( iProp = 0; iProp < m_pDoc->GetNumAmbientProperties(); iProp++ )
00084    {
00085     iItem = m_cboxPropName.AddString( m_pDoc->GetAmbientProperty(
00086      iProp )->GetName() );
00087     m_cboxPropName.SetItemData( iItem, iProp );
00088    }
00089
00090    for( iType = 0; iType < NUM_VARTYPES; iType++ )
00091    {
00092     iItem = m_cboxPropType.AddString( VTIToString( iType ) );
00093     m_cboxPropType.SetItemData( iItem, iType );
00094    }
00095
00096    m_cboxPropName.SetCurSel( 0 );
00097    OnPropNameSelChange();
00098
00099    return( TRUE );  // return TRUE unless you set the focus to a control
00100 }
00101
00102 void CAmbientPropertiesDlg::OnPropNameSelChange()
00103 {
00104
00105    int iProp;
00106    int iItem;
00107    CString strDisplay;
00108
00109    iItem = m_cboxPropName.GetCurSel();
00110    ASSERT( iItem != CB_ERR );
00111    iProp = (int)m_cboxPropName.GetItemData( iItem );
00112
00113    m_pProp = m_pDoc->GetAmbientProperty( iProp );
00114
00115    strDisplay.Format( _T( "%d" ), m_pProp->GetID() );
00116    m_editDISPID.SetWindowText( strDisplay );
00117    m_editDISPID.SetReadOnly( m_pProp->IsStock() );
00118
00119 //   m_cboxPropType.SetCurSel( m_pProp->GetVTI() );
00120    m_cboxPropType.SelectString( -1, VTIToString( m_pProp->GetVTI() ) );
00121    OnPropTypeSelChange();
00122    TRY
00123    {
00124       if( m_pProp->GetVTI() == VTI_DATE )
00125       {
00126          m_date.SetTime( COleDateTime( m_pProp->GetValue() ) );
00127       }
00128       else if( m_pProp->GetVTI() == VTI_BOOL )
00129       {
00130          m_cboxPropValue.SetCurSel( m_pProp->GetValue().boolVal ? 1 : 0 );
00131       }
00132       else
00133       {
00134        strDisplay = VariantToString( m_pProp->GetValue() );
00135        m_editPropValue.SetWindowText( strDisplay );
00136       }
00137    }
00138    CATCH( COleException, e )
00139    {
00140     TRACE( "ChangeType() failed.\n" );
00141    }
00142    END_CATCH
00143
00144    if( m_pProp->IsEnabled() )
00145    {
00146     m_checkEnabled.SetCheck( 1 );
00147      m_date.EnableWindow( TRUE );
00148      m_cboxPropValue.EnableWindow( TRUE );
00149     m_cboxPropType.EnableWindow( TRUE );
00150     m_editPropValue.EnableWindow( TRUE );
00151     m_butSetValue.EnableWindow( TRUE );
00152     m_butChooseColor.EnableWindow( TRUE );
00153     m_butChooseFont.EnableWindow( TRUE );
00154    }
00155    else
00156    {
00157     m_checkEnabled.SetCheck( 0 );
00158      m_cboxPropValue.EnableWindow( FALSE );
00159      m_date.EnableWindow( FALSE );
00160     m_cboxPropType.EnableWindow( FALSE );
00161     m_editPropValue.EnableWindow( FALSE );
00162     m_butSetValue.EnableWindow( FALSE );
00163     m_butChooseColor.EnableWindow( FALSE );
00164     m_butChooseFont.EnableWindow( FALSE );
00165    }
00166 }
00167
00168 void CAmbientPropertiesDlg::OnPropTypeSelChange()
00169 {
00170    int iType;
00171    int iItem;
00172
00173    iItem = m_cboxPropType.GetCurSel();
00174    ASSERT( iItem != CB_ERR );
00175    iType = (int)m_cboxPropType.GetItemData( iItem );
00176
00177    switch( iType )
00178    {
00179    case VTI_BOOL:
00180       m_butChooseColor.ShowWindow( SW_HIDE );
00181       m_editPropValue.ShowWindow( SW_HIDE );
00182       m_butChooseFont.ShowWindow( SW_HIDE );
00183       m_date.ShowWindow( SW_HIDE );
00184       m_butSetValue.ShowWindow( SW_NORMAL );
00185       m_staticPropertyValue.ShowWindow( SW_NORMAL );
00186       m_cboxPropValue.ShowWindow( SW_NORMAL );
00187       DisplayPropValues( iType );
00188     m_cboxPropValue.SetCurSel( 0 );
00189       break;
00190
00191    case VTI_FONT:
00192       m_cboxPropValue.ShowWindow( SW_HIDE );
00193     m_butChooseColor.ShowWindow( SW_HIDE );
00194     m_staticPropertyValue.ShowWindow( SW_HIDE );
00195     m_editPropValue.ShowWindow( SW_HIDE );
00196     m_butSetValue.ShowWindow( SW_HIDE );
00197      m_date.ShowWindow( SW_HIDE );
00198     m_butChooseFont.ShowWindow( SW_NORMAL );
00199     break;
00200
00201    case VTI_COLOR:
00202       m_cboxPropValue.ShowWindow( SW_HIDE );
00203     m_butChooseFont.ShowWindow( SW_HIDE );
00204     m_staticPropertyValue.ShowWindow( SW_HIDE );
00205     m_editPropValue.ShowWindow( SW_HIDE );
00206     m_butSetValue.ShowWindow( SW_HIDE );
00207     m_butChooseColor.ShowWindow( SW_NORMAL );
00208      m_date.ShowWindow( SW_HIDE );
00209     break;
00210
00211    case VTI_DATE:
00212       m_cboxPropValue.ShowWindow( SW_HIDE );
00213     m_butChooseFont.ShowWindow( SW_HIDE );
00214     m_staticPropertyValue.ShowWindow( SW_NORMAL );
00215     m_editPropValue.ShowWindow( SW_HIDE );
00216     m_butSetValue.ShowWindow( SW_NORMAL );
00217     m_butChooseColor.ShowWindow( SW_HIDE );
00218      m_date.ShowWindow( SW_NORMAL );
00219       break;
00220
00221    default:
00222       m_cboxPropValue.ShowWindow( SW_HIDE );
00223     m_butChooseColor.ShowWindow( SW_HIDE );
00224     m_butChooseFont.ShowWindow( SW_HIDE );
00225     m_staticPropertyValue.ShowWindow( SW_NORMAL );
00226     m_editPropValue.ShowWindow( SW_NORMAL );
00227     m_butSetValue.ShowWindow( SW_NORMAL );
00228      m_date.ShowWindow( SW_HIDE );
00229     break;
00230    }
00231 }
00232
00233 void CAmbientPropertiesDlg::DisplayPropValues( int iType )
00234 {
00235    CString strValue;
00236
00237    m_cboxPropValue.ResetContent();
00238    switch( iType )
00239    {
00240    case VTI_BOOL:
00241       LOAD_STRING_FROM_RESOURCE( strValue, IDS_FALSE );
00242       m_cboxPropValue.AddString( strValue );
00243       LOAD_STRING_FROM_RESOURCE( strValue, IDS_TRUE );
00244       m_cboxPropValue.AddString( strValue );
00245       break;
00246
00247    default:
00248       ASSERT( FALSE );
00249       break;
00250    }
00251 }
00252
00253 void CAmbientPropertiesDlg::OnSetValue()
00254 {
00255    COleVariant varValue;
00256    CString strValue;
00257    int iType;
00258    int iItem;
00259    COleDateTime date;
00260
00261    iItem = m_cboxPropType.GetCurSel();
00262    ASSERT( iItem != CB_ERR );
00263    iType = (int)m_cboxPropType.GetItemData( iItem );
00264    if( iType == VTI_DATE )
00265    {
00266       m_date.GetTime( date );
00267       varValue = date;
00268    }
00269    else if( iType == VTI_BOOL )
00270    {
00271       varValue = COleVariant( VARIANT_BOOL( (m_cboxPropValue.GetCurSel() ==
00272          1) ? ~VARIANT_FALSE : VARIANT_FALSE ), VT_BOOL );
00273    }
00274    else
00275    {
00276       m_editPropValue.GetWindowText( strValue );
00277       varValue = strValue;
00278    }
00279
00280    TRY
00281    {
00282     varValue.ChangeType( VTIToVT( iType ) );
00283     m_pProp->SetValue( varValue, iType );
00284     OnPropertyChanged( m_pProp->GetID() );
00285    }
00286    CATCH( COleException, e )
00287    {
00288     TRACE( "ChangeType() failed.\n" );
00289    }
00290    END_CATCH
00291
00292    m_editPropValue.SetFocus();
00293    m_editPropValue.SetSel( 0, -1 );
00294 }
00295
00296 void CAmbientPropertiesDlg::OnEnabled()
00297 {
00298    if( m_checkEnabled.GetCheck() )
00299    {
00300     m_pProp->Enable( TRUE );
00301     OnPropNameSelChange();
00302    }
00303    else
00304    {
00305     m_pProp->Enable( FALSE );
00306     OnPropNameSelChange();
00307    }
00308 }
00309
00310 BOOL CAmbientPropertiesDlg::GetChangedPropertyID( DISPID* pdispid ) const
00311 {
00312    if( m_tChanged )
00313    {
00314     *pdispid = m_dispidChanged;
00315    }
00316    else
00317    {
00318     *pdispid = DISPID_UNKNOWN;
00319    }
00320
00321    return( m_tChanged );
00322 }
00323
00324 void CAmbientPropertiesDlg::OnChooseColor()
00325 {
00326    int nResult;
00327    COleVariant varColor;
00328
00329    varColor = m_pProp->GetValue();
00330    try
00331    {
00332     varColor.ChangeType( VT_COLOR );
00333    }
00334    catch( CException* pException )
00335    {
00336     varColor = COleVariant( long( 0 ), VT_COLOR );
00337
00338    pException->Delete();
00339    }
00340
00341    ASSERT( varColor.vt == VT_COLOR );
00342
00343    CColorDialog dlg( varColor.lVal );
00344
00345    nResult = (int)dlg.DoModal();
00346    if( nResult != IDOK )
00347    {
00348     return;
00349    }
00350
00351    varColor = COleVariant( long( dlg.GetColor() ), VT_COLOR );
00352    m_pProp->SetValue( varColor );
00353    OnPropertyChanged( m_pProp->GetID() );
00354 }
00355
00356 void CAmbientPropertiesDlg::OnChooseFont()
00357 {
00358
00359    int nResult;
00360    IFontDispPtr pFontDisp;
00361    IFontPtr pFont;
00362    FONTDESC desc;
00363    HRESULT hResult;
00364    COleVariant varFont;
00365    CFont font;
00366    HFONT hFont;
00367    LOGFONT logfont;
00368    LOGFONT* pLogFont;
00369    BOOL tSuccess;
00370
00371    hFont = NULL;
00372    varFont = m_pProp->GetValue();
00373    if( varFont.vt == VT_FONT )
00374    {
00375     pFont = varFont.pdispVal;
00376     if( pFont != NULL )
00377     {
00378      hResult = pFont->get_hFont( &hFont );
00379      if( FAILED( hResult ) )
00380      {
00381       hFont = NULL;
00382      }
00383      pFont.Release();
00384     }
00385    }
00386
00387    if( hFont != NULL )
00388    {
00389     font.Attach( hFont );
00390     tSuccess = font.GetLogFont( &logfont );
00391     font.Detach();
00392     if( !tSuccess )
00393     {
00394      hFont = NULL;
00395     }
00396    }
00397
00398    if( hFont != NULL )
00399    {
00400     pLogFont = &logfont;
00401    }
00402    else
00403    {
00404     pLogFont = NULL;
00405    }
00406
00407    CFontDialog dlg( pLogFont );
00408
00409    nResult = (int)dlg.DoModal();
00410    if( nResult != IDOK )
00411    {
00412     return;
00413    }
00414
00415    memset( &desc, 0, sizeof( desc ) );
00416    desc.cbSizeofstruct = sizeof( desc );
00417    CT2OLE tName(dlg.m_cf.lpLogFont->lfFaceName);
00418    desc.lpstrName = tName;
00419    desc.cySize = COleCurrency( dlg.m_cf.iPointSize/10, 1000*
00420     (dlg.m_cf.iPointSize%10) );
00421    desc.sWeight = short( dlg.m_cf.lpLogFont->lfWeight );
00422    desc.sCharset = dlg.m_cf.lpLogFont->lfCharSet;
00423    desc.fItalic = dlg.m_cf.lpLogFont->lfItalic;
00424    desc.fUnderline = dlg.m_cf.lpLogFont->lfUnderline;
00425    desc.fStrikethrough = dlg.m_cf.lpLogFont->lfStrikeOut;
00426
00427    hResult = OleCreateFontIndirect( &desc, IID_IFontDisp, (void**)&pFontDisp );
00428    if( FAILED( hResult ) )
00429    {
00430     TRACE( "OleCreateFontIndirect() failed\n" );
00431     return;
00432    }
00433
00434    varFont.vt = VT_DISPATCH;
00435    varFont.pdispVal = pFontDisp;
00436    varFont.pdispVal->AddRef();
00437    m_pProp->SetValue( varFont );
00438    OnPropertyChanged( m_pProp->GetID() );
00439 }
00440
00441 void CAmbientPropertiesDlg::OnPropertyChanged( DISPID dispid )
00442 {
00443    if( m_tChanged == FALSE )
00444    {
00445     // This is the first property we changed.
00446     m_tChanged = TRUE;
00447     m_dispidChanged = dispid;
00448    }
00449    else
00450    {
00451     if( m_dispidChanged != dispid )
00452     {
00453      // We've already changed a different property, so we'll have to do
00454      // a bulk notify.
00455      m_dispidChanged = DISPID_UNKNOWN;
00456     }
00457    }
00458 }
00459
00460 void CAmbientPropertiesDlg::OnNewProperty()
00461 {
00462    COleVariant var;
00463    int iProp;
00464    int iItem;
00465    CNewAmbientPropertyDlg dlg;
00466    int nResult;
00467
00468    LOAD_STRING_FROM_RESOURCE( dlg.m_strName, IDS_NEWPROPERTY );
00469    dlg.m_dispid = DISPID_UNKNOWN;
00470
00471    nResult = (int)dlg.DoModal();
00472    if( nResult != IDOK )
00473    {
00474     return;
00475    }
00476
00477    var = COleVariant( VARIANT_FALSE, VT_BOOL );
00478    try
00479    {
00480     iProp = m_pDoc->AddAmbientProperty( dlg.m_dispid, dlg.m_strName, var,
00481      VTI_BOOL );
00482     iItem = m_cboxPropName.AddString( dlg.m_strName );
00483     m_cboxPropName.SetItemData( iItem, iProp );
00484     m_cboxPropName.SetCurSel( iItem );
00485     OnPropertyChanged( dlg.m_dispid );
00486     OnPropNameSelChange();
00487    }
00488    catch( ... )
00489    {
00490     TRACE( "Failed to add ambient property\n" );
00491    }
00492 }
00493
00494 void CAmbientPropertiesDlg::OnPropValueSetFocus()
00495 {
00496    // The ParamValue edit box just got the keyboard focus.  The user should be
00497    // able to set the value to the contents of the edit box just by hitting
00498    // ENTER.
00499    SetDefID( IDC_SETVALUE_AMBIENT );
00500 }
00501
00502 static DWORD rgmapCHID[] =
00503 {
00504    IDC_PROPNAME, HIDC_PROPNAME,
00505    IDC_DISPID, HIDC_DISPID,
00506    IDC_ENABLED, HIDC_ENABLED,
00507    IDC_CHOOSECOLOR_AMBIENT, HIDC_CHOOSECOLOR_AMBIENT,
00508    IDC_CHOOSEFONT_AMBIENT, HIDC_CHOOSEFONT_AMBIENT,
00509    IDC_PROPTYPE, HIDC_PROPTYPE,
00510    IDC_SETVALUE_AMBIENT, HIDC_SETVALUE_AMBIENT,
00511    IDC_PROPVALUE, HIDC_PROPVALUE,
00512    IDC_NEWPROPERTY, HIDC_NEWPROPERTY,
00513    IDC_DATE_AMBIENT, HIDC_DATE_AMBIENT,
00514    IDC_PROPVALUECOMBO_AMBIENT, HIDC_PROPVALUECOMBO_AMBIENT,
00515    IDC_STATIC_PROPERTYVALUE, DWORD( -1 ),
00516    0, 0
00517 };
00518
00519 BOOL CAmbientPropertiesDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00520 {
00521   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00522   strPath += _T("::/popups.txt");
00523
00524   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00525 }
00526
00527 void CAmbientPropertiesDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00528 {
00529   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00530   strPath += _T("::/popups.txt");
00531
00532   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00533 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMDITabOptions Member List

This is the complete list of members for CMDITabOptions, including all inherited members.
CMDITabOptions() | CMDITabOptions |
IsMDITabsDisabled() const | CMDITabOptions | [inline]
Load() | CMDITabOptions |
m_bActiveTabCloseButton | CMDITabOptions |
m_bCustomTooltips | CMDITabOptions |
m_bDisableMDIChildRedraw | CMDITabOptions |
m_bDragMDITabs | CMDITabOptions |
m_bFlatFrame | CMDITabOptions |
m_bMDITabsContextMenu | CMDITabOptions |
m_bMDITabsDocMenu | CMDITabOptions |
m_bMDITabsIcons | CMDITabOptions |
m_bTabsAutoColor | CMDITabOptions |
m_bTabsOnTop | CMDITabOptions |
m_nMDITabsBorderSize | CMDITabOptions |
m_nMDITabsType | CMDITabOptions |
m_nTabsStyle | CMDITabOptions |
MDITabbedGroups enum value | CMDITabOptions |
MDITabsStandard enum value | CMDITabOptions |
MDITabsType enum name | CMDITabOptions |
None enum value | CMDITabOptions |
Save() | CMDITabOptions |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/stdafx.cpp Source File

  • controls
  • xlist

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagRC Member List

This is the complete list of members for tagRC, including all inherited members.
alc | tagRC
alcPriority | tagRC
clErrorLevel | tagRC
dwAppParam | tagRC
dwDictParam | tagRC
dwRecognizer | tagRC
guide | tagRC
hrec | tagRC
hwnd | tagRC
lPcm | tagRC
lpfnYield | tagRC
lpLanguage | tagRC
lpUser | tagRC
lRcOptions | tagRC
nInkWidth | tagRC
rectBound | tagRC
rectExclude | tagRC
rgbfAlc | tagRC
rgbInk | tagRC
rglpdf | tagRC
rgwReserved | tagRC
wCountry | tagRC
wEventRef | tagRC
wIntlPreferences | tagRC
wRcDirect | tagRC
wRcOrient | tagRC
wRcPreferences | tagRC
wResultMode | tagRC
wTimeOut | tagRC
wTryDictionary | tagRC
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/StdAfx.h Source File

  • vc2008fp
  • DesktopAlertDemo

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
00047
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputView.h Source File

  • vc2008fp
  • VisualStudioDemo

OutputView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // COutputList window
00014
00015 class COutputList : public CListBox
00016 {
00017 // Construction
00018 public:
00019   COutputList();
00020
00021 // Implementation
00022 public:
00023   virtual ~COutputList();
00024
00025 protected:
00026   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00027   afx_msg void OnEditCopy();
00028   afx_msg void OnEditClear();
00029   afx_msg void OnOutputGotoError();
00030   afx_msg void OnViewOutput();
00031
00032   DECLARE_MESSAGE_MAP()
00033 };
00034
00035 class COutputViewBar : public CDockablePane
00036 {
00037 // Construction
00038 public:
00039   COutputViewBar();
00040
00041   void UpdateFonts();
00042
00043 // Attributes
00044 protected:
00045   COutputList m_wndOutput;
00046
00047 protected:
00048   void FillDebugWindow();
00049   void FillBuildWindow();
00050   void AdjusrHorzScroll(CListBox& wndListBox);
00051
00052 // Implementation
00053 public:
00054   virtual ~COutputViewBar();
00055
00056 protected:
00057   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00058   afx_msg void OnSize(UINT nType, int cx, int cy);
00059   afx_msg void OnPaint();
00060   afx_msg void OnSetFocus(CWnd* pOldWnd);
00061
00062   DECLARE_MESSAGE_MAP()
00063 };
00064
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabRulerItem Member List

This is the complete list of members for CTabRulerItem, including all inherited members.
CRulerItem(UINT nBitmapID=0) | CRulerItem |
CRulerItem(UINT nBitmapID=0) | CRulerItem |
CTabRulerItem() | CTabRulerItem | [inline]
CTabRulerItem() | CTabRulerItem | [inline]
Draw(CDC &dc) | CTabRulerItem | [inline, virtual]
Draw(CDC &dc) | CTabRulerItem | [inline, virtual]
DrawFocusLine() | CRulerItem |
DrawFocusLine() | CRulerItem |
GetHitRectPix() | CRulerItem |
GetHitRectPix() | CRulerItem |
GetHorzPosPix() | CRulerItem | [inline]
GetHorzPosPix() | CRulerItem |
GetHorzPosTwips() | CRulerItem | [inline]
GetHorzPosTwips() | CRulerItem | [inline]
GetMax() | CRulerItem | [inline]
GetMax() | CRulerItem | [inline]
GetMin() | CRulerItem | [inline]
GetMin() | CRulerItem | [inline]
GetVertPosPix() | CRulerItem | [inline]
GetVertPosPix() | CRulerItem | [inline]
HitTestPix(CPoint pt) | CTabRulerItem | [inline, virtual]
HitTestPix(CPoint pt) | CTabRulerItem | [inline, virtual]
Invalidate() | CRulerItem |
Invalidate() | CRulerItem |
LoadMaskedBitmap(LPCTSTR lpszResourceName) | CRulerItem |
LoadMaskedBitmap(LPCTSTR lpszResourceName) | CRulerItem |
m_bTrack | CRulerItem | [protected]
m_hbm | CRulerItem |
m_hbmMask | CRulerItem |
m_nAlignment | CRulerItem | [protected]
m_nMax | CRulerItem | [protected]
m_nMin | CRulerItem | [protected]
m_nXPosTwips | CRulerItem | [protected]
m_nYPosPix | CRulerItem | [protected]
m_pDC | CRulerItem | [protected]
m_pRuler | CRulerItem | [protected]
m_rcTrack | CRulerItem | [protected]
m_size | CRulerItem |
SetAlignment(int nAlign) | CRulerItem | [inline, virtual]
SetAlignment(int nAlign) | CRulerItem | [inline, virtual]
SetBounds(int nMin, int nMax) | CRulerItem | [inline, virtual]
SetBounds(int nMin, int nMax) | CRulerItem | [inline, virtual]
SetHorzPosTwips(int nXPos) | CRulerItem | [virtual]
SetHorzPosTwips(int nXPos) | CRulerItem | [virtual]
SetRuler(CRulerBar *pRuler) | CRulerItem | [inline, virtual]
SetRuler(CRulerBar *pRuler) | CRulerItem | [inline, virtual]
SetTrack(BOOL b) | CRulerItem |
SetTrack(BOOL b) | CRulerItem |
SetVertPos(int nYPos) | CRulerItem | [inline, virtual]
SetVertPos(int nYPos) | CRulerItem | [inline, virtual]
TrackHorzPosTwips(int nXPos, BOOL bOnRuler=TRUE) | CTabRulerItem | [virtual]
TrackHorzPosTwips(int nXPos, BOOL bOnRuler=TRUE) | CTabRulerItem | [virtual]
~CRulerItem() | CRulerItem |
~CRulerItem() | CRulerItem |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncDoc.h Source File

  • general
  • mdidocvw

BncDoc.h

Go to the documentation of this file.
00001 // BounceDoc.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CBounceDoc document
00015
00016 class CBounceDoc : public CDocument
00017 {
00018 protected:
00019   CBounceDoc();           // protected constructor used by dynamic creation
00020   DECLARE_DYNCREATE(CBounceDoc)
00021
00022 // Attributes
00023 public:
00024   // bounce window client area and bouncing ball color/size parameters
00025   COLORREF m_clrBall;
00026
00027   BOOL m_bFastSpeed;          // current speed
00028
00029   CPoint m_ptPixel;           // pixel size
00030   CSize m_sizeRadius;         // radius of ball
00031   CSize m_sizeMove;           // move speed
00032   CSize m_sizeTotal;          // total size for ball bitmap
00033   CPoint m_ptCenter;          // current center for the ball
00034
00035   //state of color buttons
00036   BOOL m_bBlack;
00037   BOOL m_bWhite;
00038   BOOL m_bBlue;
00039   BOOL m_bRed;
00040   BOOL m_bGreen;
00041   BOOL m_bCustom;
00042
00043   // for replicating bouncing ball
00044   CBitmap m_bmBall;
00045
00046 // Operations
00047 public:
00048   void SetCustomBallColor(COLORREF clr);
00049   void SetBallRadius(CSize radius);
00050   void ClearAllColors();
00051
00052 // Overrides
00053   // ClassWizard generated virtual function overrides
00054   //{{AFX_VIRTUAL(CBounceDoc)
00055   public:
00056   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00057   protected:
00058   virtual BOOL OnNewDocument();
00059   //}}AFX_VIRTUAL
00060
00061 // Implementation
00062 public:
00063   virtual ~CBounceDoc();
00064 #ifdef _DEBUG
00065   virtual void AssertValid() const;
00066   virtual void Dump(CDumpContext& dc) const;
00067 #endif
00068
00069   // Generated message map functions
00070 protected:
00071   //{{AFX_MSG(CBounceDoc)
00072     // NOTE - the ClassWizard will add and remove member functions here.
00073   //}}AFX_MSG
00074   DECLARE_MESSAGE_MAP()
00075 };
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagTARGINFO Member List

This is the complete list of members for tagTARGINFO, including all inherited members.
cbSize | tagTARGINFO
cTargets | tagTARGINFO
dwFlags | tagTARGINFO
htrgOwner | tagTARGINFO
iTargetLast | tagTARGINFO
rgTarget | tagTARGINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/StdAfx.h Source File

  • vc2008fp
  • OutlookMultiViews

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoclik.cpp Source File

  • ole
  • acdual
  • acdualdriv

autoclik.cpp

Go to the documentation of this file.
00001 // Machine generated IDispatch wrapper class(es) created with ClassWizard
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "autoclik.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CAutoClik properties
00017
00018 CString CAutoClik::GetText()
00019 {
00020   CString result;
00021   GetProperty(0x1, VT_BSTR, (void*)&result);
00022   return result;
00023 }
00024
00025 void CAutoClik::SetText(LPCTSTR propVal)
00026 {
00027   SetProperty(0x1, VT_BSTR, propVal);
00028 }
00029
00030 short CAutoClik::GetX()
00031 {
00032   short result;
00033   GetProperty(0x2, VT_I2, (void*)&result);
00034   return result;
00035 }
00036
00037 void CAutoClik::SetX(short propVal)
00038 {
00039   SetProperty(0x2, VT_I2, propVal);
00040 }
00041
00042 short CAutoClik::GetY()
00043 {
00044   short result;
00045   GetProperty(0x3, VT_I2, (void*)&result);
00046   return result;
00047 }
00048
00049 void CAutoClik::SetY(short propVal)
00050 {
00051   SetProperty(0x3, VT_I2, propVal);
00052 }
00053
00054 LPDISPATCH CAutoClik::GetPosition()
00055 {
00056   LPDISPATCH result;
00057   GetProperty(0x4, VT_DISPATCH, (void*)&result);
00058   return result;
00059 }
00060
00061 void CAutoClik::SetPosition(LPDISPATCH propVal)
00062 {
00063   SetProperty(0x4, VT_DISPATCH, propVal);
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CAutoClik operations
00068
00069 void CAutoClik::RefreshWindow()
00070 {
00071   InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00072 }
00073
00074 void CAutoClik::SetAllProps(short x, short y, LPCTSTR text)
00075 {
00076   static BYTE BASED_CODE parms[] =
00077     VTS_I2 VTS_I2 VTS_BSTR;
00078   InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
00079      x, y, text);
00080 }
00081
00082 void CAutoClik::ShowWindow()
00083 {
00084   InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00085 }
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CClikPoint properties
00088
00089 short CClikPoint::GetX()
00090 {
00091   short result;
00092   GetProperty(0x1, VT_I2, (void*)&result);
00093   return result;
00094 }
00095
00096 void CClikPoint::SetX(short propVal)
00097 {
00098   SetProperty(0x1, VT_I2, propVal);
00099 }
00100
00101 short CClikPoint::GetY()
00102 {
00103   short result;
00104   GetProperty(0x2, VT_I2, (void*)&result);
00105   return result;
00106 }
00107
00108 void CClikPoint::SetY(short propVal)
00109 {
00110   SetProperty(0x2, VT_I2, propVal);
00111 }
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CClikPoint operations
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawdoc.h Source File

  • vc2008fp
  • DrawClient

drawdoc.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "drawobj.h"
00013 #include "summinfo.h"
00014
00015 class CDrawView;
00016
00017 class CDrawDoc : public COleDocument
00018 {
00019 protected: // create from serialization only
00020   CDrawDoc();
00021   DECLARE_DYNCREATE(CDrawDoc)
00022
00023 // Attributes
00024 public:
00025   CDrawObjList* GetObjects() { return &m_objects; }
00026   const CSize& GetSize() const { return m_size; }
00027   void ComputePageSize();
00028   int GetMapMode() const { return m_nMapMode; }
00029   COLORREF GetPaperColor() const { return m_paperColor; }
00030   CSummInfo *m_pSummInfo;
00031
00032   BOOL CanDeactivateInplace() const
00033   {
00034     return m_bCanDeactivateInplace;
00035   }
00036
00037 // Operations
00038 public:
00039   CDrawObj* ObjectAt(const CPoint& point);
00040   void Draw(CDC* pDC, CDrawView* pView);
00041   // ------ Draw called for live icon and Win7 taskbar thumbnails
00042   void Draw (CDC* pDC);
00043   void FixUpObjectPositions();
00044   CRect m_rectDocumentBounds;
00045   // ------
00046
00047   void Add(CDrawObj* pObj);
00048   void Remove(CDrawObj* pObj);
00049
00050   void SetPreviewColor(COLORREF clr);
00051
00052 #ifdef SHARED_HANDLERS
00053   // Search support
00054   virtual void InitializeSearchContent();
00055
00056   // Set properties for search
00057   void SetTitle(const CString& value);
00058   void SetAuthor(const CString& value);
00059   void SetCompany(const CString& value);
00060   void SetComment(const CString& value);
00061   void SetCopyright(const CString& value);
00062   void SetKeywords(const CString& value);
00063   void SetLastAuthor(const CString& value);
00064   void SetSearchContents(const CString& value);
00065 #endif
00066
00067 // Implementation
00068 public:
00069   virtual ~CDrawDoc();
00070   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00071 #ifdef _DEBUG
00072   virtual void AssertValid() const;
00073   virtual void Dump(CDumpContext& dc) const;
00074 #endif
00075
00076 protected:
00077   virtual BOOL OnNewDocument();
00078   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00079   virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
00080   virtual BOOL CanCloseFrame(CFrameWnd* pFrame);
00081   virtual void OnUnloadHandler();
00082
00083   BOOL m_bCanDeactivateInplace;
00084
00085   CDrawObjList m_objects;
00086   CSize m_size;
00087   int m_nMapMode;
00088   COLORREF m_paperColor;
00089   COLORREF m_paperColorLast;
00090
00091 protected:
00092   //{{AFX_MSG(CDrawDoc)
00093   afx_msg void OnViewPaperColor();
00094   afx_msg void OnFileSummaryInfo();
00095   //}}AFX_MSG
00096   DECLARE_MESSAGE_MAP()
00097 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BITMAPINFO256 Member List

This is the complete list of members for BITMAPINFO256, including all inherited members.
bmiOtherColors BITMAPINFO256
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWorkspaceToolBar Member List

This is the complete list of members for CWorkspaceToolBar, including all inherited members.
AdjustLayout() | CWorkspaceToolBar | [virtual]
AllowShowOnList() const | CWorkspaceToolBar | [inline, virtual]
OnUpdateCmdUI(CFrameWnd *, BOOL bDisableIfNoHndler) | CWorkspaceToolBar | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/splitfrm.cpp Source File

  • vc2008fp
  • DrawClient

splitfrm.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014 #include "splitfrm.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSplitFrame
00023
00024 IMPLEMENT_DYNCREATE(CSplitFrame, CMDIChildWndEx)
00025
00026 CSplitFrame::CSplitFrame()
00027 {
00028 }
00029
00030 CSplitFrame::~CSplitFrame()
00031 {
00032 }
00033
00034 BOOL CSplitFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
00035 {
00036   return m_wndSplitter.Create(this, 2, 2, CSize(10, 10), pContext);
00037 }
00038
00039 BEGIN_MESSAGE_MAP(CSplitFrame, CMDIChildWndEx)
00040   //{{AFX_MSG_MAP(CSplitFrame)
00041   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00042   ON_COMMAND(ID_FILE_PRINT_DIRECT, OnFilePrint)
00043   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00044   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, OnUpdateFilePrintPreview)
00045   //}}AFX_MSG_MAP
00046 END_MESSAGE_MAP()
00047
00048 void CSplitFrame::OnFilePrint ()
00049 {
00050   if (m_dockManager.IsPrintPreviewValid ())
00051   {
00052     PostMessage (WM_COMMAND, AFX_ID_PREVIEW_PRINT);
00053   }
00054 }
00055
00056 void CSplitFrame::OnFilePrintPreview()
00057 {
00058   if (m_dockManager.IsPrintPreviewValid ())
00059   {
00060     PostMessage (WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
00061   }
00062 }
00063
00064 void CSplitFrame::OnUpdateFilePrintPreview(CCmdUI* pCmdUI)
00065 {
00066   pCmdUI->SetCheck (m_dockManager.IsPrintPreviewValid ());
00067 }
00068
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/mainview.h Source File

  • ole
  • oclient

mainview.h

Go to the documentation of this file.
00001 // mainview.h : interface of the CMainView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 class CRectItem;
00014
00015 class CMainView : public CScrollView
00016 {
00017 protected: // create from serialization only
00018   CMainView();
00019   DECLARE_DYNCREATE(CMainView)
00020
00021 // Attributes
00022 public:
00023   CMainDoc* GetDocument()
00024   {
00025     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
00026     return (CMainDoc*) m_pDocument;
00027   }
00028
00029   CRectItem* GetSelection() const
00030     { return m_pSelection; } // Just the top-most window
00031   // set bSafeSelect to TRUE when there is a chance that an inplace
00032   // active item could be deactivated before finishing
00033   void SetSelection(CRectItem* pNewSel, BOOL bSafeSelect = FALSE);
00034
00035 // Operations
00036 public:
00037   CRectItem* DoPasteItem(BOOL bLink, COleDataObject* pDataObject,
00038     CPoint* pPoint, CLIPFORMAT cfFormat = 0);
00039   void ClientToDoc(CRect &rc);
00040   void DocToClient(CRect &rc);
00041   void ClientToDoc(CPoint &pt);
00042   void DocToClient(CPoint &pt);
00043   void ClientToDoc(CSize &sz);
00044   void DocToClient(CSize &sz);
00045   void UpdateActiveItem();
00046
00047
00048 // Implementation
00049 protected:
00050   BOOL m_bInDrag;
00051   CRectItem* m_pSelection;
00052   COleDropTarget m_dropTarget;
00053   CPoint m_dragPoint;
00054   CSize m_dragSize;
00055   CSize m_dragOffset;
00056   DROPEFFECT m_prevDropEffect;
00057   static CLIPFORMAT m_cfObjectDescriptor;
00058   static CBrush NEAR m_brHatch;
00059
00060   CRectItem* GetHitItem(CPoint point);
00061   BOOL GetObjectInfo(COleDataObject* pDataObject,
00062     CSize* pSize, CSize* pOffset);
00063   void DoPasteNative(COleDataObject* pDataObject, CPoint* pPoint,
00064     CRectItem* pItem);
00065   void DoPasteStandard(BOOL bLink, COleDataObject* pDataObject,
00066     CPoint* pPoint, CRectItem* pItem, CLIPFORMAT cfFormat = 0);
00067
00068 public:
00069   virtual ~CMainView();
00070   virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
00071   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00072   virtual void OnInitialUpdate();
00073   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00074 #ifdef _DEBUG
00075   virtual void AssertValid() const;
00076   virtual void Dump(CDumpContext& dc) const;
00077 #endif
00078
00079   // special scroll handling
00080   virtual BOOL OnScrollBy(CSize sizeScroll, BOOL bDoScroll = TRUE);
00081
00082   // drag drop implementation
00083   virtual BOOL OnDrop(COleDataObject* pDataObject,
00084     DROPEFFECT dropEffect, CPoint point);
00085   virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject,
00086     DWORD grfKeyState, CPoint point);
00087   virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject,
00088     DWORD grfKeyState, CPoint point);
00089   virtual void OnDragLeave();
00090
00091   // Printing support
00092 protected:
00093   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00094
00095   // OLE Client support
00096   virtual BOOL IsSelected(const CObject* pDocItem) const;
00097   BOOL DoCopySelection();
00098   void SetupTracker(CRectTracker* pTracker, CRectItem* pItem,
00099     CRect* pTrueRect = NULL);
00100   void InvalidateItem(CRectItem* pItem);
00101
00102 // Generated message map functions
00103 protected:
00104   //{{AFX_MSG(CMainView)
00105   afx_msg void OnPaste();
00106   afx_msg void OnPasteLink();
00107   afx_msg void OnInsertObject();
00108   afx_msg void OnUpdateEditMenu(CCmdUI* pCmdUI);
00109   afx_msg void OnEditClear();
00110   afx_msg void OnEditCopy();
00111   afx_msg void OnEditCut();
00112   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00113   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00114   afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00115   afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00116   afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
00117   afx_msg void OnSetFocus(CWnd* pOldWnd);
00118   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00119   afx_msg void OnSize(UINT nType, int cx, int cy);
00120   afx_msg void OnObjectDisplayContent();
00121   afx_msg void OnUpdateObjectDisplayContent(CCmdUI* pCmdUI);
00122   afx_msg void OnObjectDisplayAsIcon();
00123   afx_msg void OnUpdateObjectDisplayAsIcon(CCmdUI* pCmdUI);
00124   afx_msg void OnPasteSpecial();
00125   afx_msg void OnUpdateEditClone(CCmdUI* pCmdUI);
00126   afx_msg void OnEditClone();
00127   afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
00128   afx_msg void OnObjectResetsize();
00129   afx_msg void OnCancelInplace();
00130   afx_msg void OnDestroy();
00131   afx_msg void OnUpdateOleEditProperties(CCmdUI* pCmdUI);
00132   afx_msg void OnOleEditProperties();
00133   afx_msg void OnUpdateOleChangeSource(CCmdUI* pCmdUI);
00134   afx_msg void OnOleChangeSource();
00135   //}}AFX_MSG
00136   DECLARE_MESSAGE_MAP()
00137 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewers.h Source File

  • ole
  • oleview
  • iviewers

iviewers.h

Go to the documentation of this file.
00001 // iviewers.h
00002 //
00003 // Definitions for Ole2View 2.0's interface viewers
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #ifndef __IVIEWERS_H__
00016 #define __IVIEWERS_H__
00017
00018 DEFINE_GUID(IID_IInterfaceViewer, /* fc37e5ba-4a8e-11ce-870b-0800368d2302 */
00019   0xfc37e5ba,
00020   0x4a8e,
00021   0x11ce,
00022   0x87, 0x0b, 0x08, 0x00, 0x36, 0x8d, 0x23, 0x02
00023   );
00024
00025 #ifndef __IInterfaceViewer__
00026 #define __IInterfaceViewer__
00027 DECLARE_INTERFACE_(IInterfaceViewer, IUnknown)
00028 {
00029   // *** IUnknown methods ***
00030   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
00031   STDMETHOD_(ULONG,AddRef) (THIS) PURE;
00032   STDMETHOD_(ULONG,Release) (THIS) PURE;
00033
00034   // *** IInterfaceViewer methods ***
00035   STDMETHOD(View) (HWND hwndParent, REFIID riid, LPUNKNOWN punk) PURE;
00036 };
00037 #endif // __IInterfaceViewer__
00038
00039
00040 // IInterfaceViewer::View can return the following SCODEs
00041 //
00042 // S_OK
00043 // E_INVALIDARG
00044 // E_UNEXPECTED
00045 // E_OUTOFMEMORY
00046 //
00047
00048 // CLSIDs of viewers implemented in IVIEWER.DLL
00049 //
00050 DEFINE_GUID(CLSID_ITypeLibViewer,    0x57efbf49, 0x4a8b, 0x11ce, 0x87, 0xb,  0x8,  0x0,  0x36, 0x8d, 0x23, 0x2 ) ;
00051 DEFINE_GUID(CLSID_IDataObjectViewer, 0x28d8aba0, 0x4b78, 0x11ce, 0xb2, 0x7d, 0x0,  0xaa, 0x0,  0x1f, 0x73, 0xc1);
00052 DEFINE_GUID(CLSID_IDispatchViewer,   0xd2af7a60, 0x4c42, 0x11ce, 0xb2, 0x7d, 0x00, 0xaa, 0x00, 0x1f, 0x73, 0xc1) ;
00053
00054 // Helper function exported from iviewers.dll.  Make sure OLE is initialized
00055 // before calling.   rclsid is the clsid of the interface viewer and riid
00056 // is the iid of the interface.
00057 //
00058 STDAPI DllRegisterInterfaceViewer( REFCLSID rclsid, REFIID riid );
00059
00060 #endif // __IVIEWERS_H__
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStringListView Member List

This is the complete list of members for CStringListView, including all inherited members.
CStringListView() | CStringListView |
DoDataExchange(CDataExchange *pDX) | CStringListView | [protected, virtual]
FindString(int &nSel, POSITION &pos) | CStringListView | [protected]
GetDocument() | CStringListView | [inline]
IDD enum value | CStringListView |
m_ctlList | CStringListView |
m_strElement | CStringListView |
OnAdd() | CStringListView | [protected]
OnInitialUpdate() | CStringListView |
OnInsertBefore() | CStringListView | [protected]
OnRemove() | CStringListView | [protected]
OnRemoveAll() | CStringListView | [protected]
OnSelChangeList() | CStringListView | [protected]
OnUpdateElement() | CStringListView | [protected]
~CStringListView() | CStringListView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIconCombo Member List

This is the complete list of members for CIconCombo, including all inherited members.
CIconCombo(CMFCToolBarImages &imageListIcons, CStringList &lstIconNames) | CIconCombo |
m_imageListIcons | CIconCombo | [protected]
m_lstIconNames | CIconCombo | [protected]
OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct) | CIconCombo | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CIconCombo | [protected]
~CIconCombo() | CIconCombo | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSnapDoc Member List

This is the complete list of members for CSnapDoc, including all inherited members.
CSnapDoc() | CSnapDoc | [protected]
OnNewDocument() | CSnapDoc | [virtual]
~CSnapDoc() | CSnapDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWordPadView Member List

This is the complete list of members for CWordPadView, including all inherited members.
CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType=adjustBorder) | CWordPadView | [protected, virtual]
CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType=adjustBorder) | CWordPadView | [protected, virtual]
CWordPadView() | CWordPadView | [protected]
CWordPadView() | CWordPadView | [protected]
DeleteContents() | CWordPadView | [protected, virtual]
DeleteContents() | CWordPadView | [protected, virtual]
DrawMargins(CDC *pDC) | CWordPadView |
DrawMargins(CDC *pDC) | CWordPadView |
GetClipboardData(CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT lpRichDataObj, LPDATAOBJECT *lplpdataobj) | CWordPadView | [protected, virtual]
GetClipboardData(CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT lpRichDataObj, LPDATAOBJECT *lplpdataobj) | CWordPadView | [protected, virtual]
GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE *lpchrg) | CWordPadView | [virtual]
GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE *lpchrg) | CWordPadView | [virtual]
GetDefaultFont(CCharFormat &cf, UINT nFontNameID) | CWordPadView |
GetDefaultFont(CCharFormat &cf, UINT nFontNameID) | CWordPadView |
GetDocument() | CWordPadView | [inline]
GetDocument() | CWordPadView |
GetDocumentColors(CList< COLORREF, COLORREF > &lstColors) | CWordPadView |
IsFormatText() | CWordPadView |
IsFormatText() | CWordPadView |
m_bDelayUpdateItems | CWordPadView |
m_bInPrint | CWordPadView |
m_bOnBar | CWordPadView | [protected]
m_defCharFormat | CWordPadView |
m_defParaFormat | CWordPadView |
m_defTextCharFormat | CWordPadView |
m_nBorderType | CWordPadView | [protected]
m_uTimerID | CWordPadView |
OnBarKillFocus(NMHDR *, LRESULT *) | CWordPadView | [protected]
OnBarKillFocus(UINT, NMHDR *, LRESULT *) | CWordPadView | [protected]
OnBarReturn(NMHDR *, LRESULT *) | CWordPadView | [protected]
OnBarReturn(UINT, NMHDR *, LRESULT *) | CWordPadView | [protected]
OnBarSetFocus(NMHDR *, LRESULT *) | CWordPadView | [protected]
OnBarSetFocus(UINT, NMHDR *, LRESULT *) | CWordPadView | [protected]
OnBorderType(UINT id) | CWordPadView | [protected]
OnCancelEditSrvr() | CWordPadView | [protected]
OnCancelEditSrvr() | CWordPadView | [protected]
OnCharColor() | CWordPadView | [protected]
OnColorPick(UINT nID) | CWordPadView | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CWordPadView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWordPadView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWordPadView | [protected]
OnDestroy() | CWordPadView | [protected]
OnDestroy() | CWordPadView | [protected]
OnEditChange() | CWordPadView | [protected]
OnEditChange() | CWordPadView | [protected]
OnFilePrint() | CWordPadView | [protected]
OnFilePrint() | CWordPadView | [protected]
OnFilePrintPreview() | CWordPadView | [protected]
OnFontname() | CWordPadView | [protected]
OnFontsize() | CWordPadView | [protected]
OnFormatParagraph() | CWordPadView | [protected]
OnFormatParagraph() | CWordPadView | [protected]
OnFormatTabs() | CWordPadView | [protected]
OnFormatTabs() | CWordPadView | [protected]
OnGetCharFormat(NMHDR *pNMHDR, LRESULT *pRes) | CWordPadView | [protected]
OnInsertDateTime() | CWordPadView | [protected]
OnInsertDateTime() | CWordPadView | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CWordPadView | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CWordPadView | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CWordPadView | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CWordPadView | [protected]
OnMouseActivate(CWnd *pWnd, UINT nHitTest, UINT message) | CWordPadView | [protected]
OnMouseActivate(CWnd *pWnd, UINT nHitTest, UINT message) | CWordPadView | [protected]
OnPageSetup() | CWordPadView | [protected]
OnPageSetup() | CWordPadView | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CWordPadView | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CWordPadView | [protected]
OnPenBackspace() | CWordPadView | [protected]
OnPenNewline() | CWordPadView | [protected]
OnPenPeriod() | CWordPadView | [protected]
OnPenSpace() | CWordPadView | [protected]
OnPenTab() | CWordPadView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CWordPadView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CWordPadView | [protected]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CWordPadView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CWordPadView | [protected, virtual]
OnPrinterChangedMsg(UINT_PTR, LONG_PTR) | CWordPadView | [protected]
OnPrinterChangedMsg(UINT, LONG) | CWordPadView | [protected]
OnQueryNewPalette() | CWordPadView | [protected]
OnQueryNewPalette() | CWordPadView | [protected]
OnRButtonUp(UINT nFlags, CPoint point) | CWordPadView | [protected]
OnSetCharFormat(NMHDR *pNMHDR, LRESULT *pRes) | CWordPadView | [protected]
OnSettingChange(UINT uFlags, LPCTSTR lpszSection) | CWordPadView | [protected]
OnSettingChange(UINT uFlags, LPCTSTR lpszSection) | CWordPadView | [protected]
OnSize(UINT nType, int cx, int cy) | CWordPadView | [protected]
OnSize(UINT nType, int cx, int cy) | CWordPadView | [protected]
OnTextNotFound(LPCTSTR) | CWordPadView | [protected, virtual]
OnTextNotFound(LPCTSTR) | CWordPadView | [protected, virtual]
OnTimer(UINT_PTR nIDEvent) | CWordPadView | [protected]
OnTimer(UINT_PTR nIDEvent) | CWordPadView | [protected]
OnUpdateBorderType(CCmdUI *pCmdUI) | CWordPadView | [protected]
PasteNative(LPDATAOBJECT lpdataobj) | CWordPadView |
PasteNative(LPDATAOBJECT lpdataobj) | CWordPadView |
PreCreateWindow(CREATESTRUCT &cs) | CWordPadView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CWordPadView | [protected, virtual]
QueryAcceptData(LPDATAOBJECT, CLIPFORMAT *, DWORD, BOOL, HGLOBAL) | CWordPadView | [protected, virtual]
QueryAcceptData(LPDATAOBJECT, CLIPFORMAT *, DWORD, BOOL, HGLOBAL) | CWordPadView | [protected, virtual]
SelectPalette() | CWordPadView |
SelectPalette() | CWordPadView |
SetDefaultFont(BOOL bText) | CWordPadView |
SetDefaultFont(BOOL bText) | CWordPadView |
SetTextColor(COLORREF color) | CWordPadView |
SetUpdateTimer() | CWordPadView |
SetUpdateTimer() | CWordPadView |
ShowContextMenu(CPoint pt) | CWordPadView |
WrapChanged() | CWordPadView | [virtual]
WrapChanged() | CWordPadView | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInfoBar Member List

This is the complete list of members for CInfoBar, including all inherited members.
CInfoBar() | CInfoBar |
OnPaint() | CInfoBar | [protected]
~CInfoBar() | CInfoBar | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/StdAfx.h Source File

  • internet
  • MFCIE

StdAfx.h

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013 //
00014
00015 #if !defined(AFX_STDAFX_H__47FF407F_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
00016 #define AFX_STDAFX_H__47FF407F_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_
00017
00018 #if _MSC_VER >= 1000
00019 #pragma once
00020 #endif // _MSC_VER >= 1000
00021
00022 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00023
00024 #include <afxwin.h>         // MFC core and standard components
00025 #include <afxext.h>         // MFC extensions
00026 #include <afxdisp.h>        // MFC OLE automation classes
00027 #ifndef _AFX_NO_AFXCMN_SUPPORT
00028 #include <afxcmn.h>         // MFC support for Windows Common Controls
00029 #endif // _AFX_NO_AFXCMN_SUPPORT
00030 #include <afxhtml.h>
00031
00032 #include <afxsock.h>        // MFC socket extensions
00033
00034 //{{AFX_INSERT_LOCATION}}
00035 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00036
00037 #endif // !defined(AFX_STDAFX_H__47FF407F_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/datedial.cpp Source File

  • vc2008fp
  • WordPad

datedial.cpp

Go to the documentation of this file.
00001 //
00002 // datedial.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "datedial.h"
00017 #include "helpids.h"
00018 #include <winnls.h>
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 SYSTEMTIME CDateDialog::m_time;
00026 LCID CDateDialog::m_id;
00027 CListBox* CDateDialog::m_pListBox = NULL;
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CDateDialog dialog
00031
00032 const DWORD CDateDialog::m_nHelpIDs[] =
00033 {
00034   IDC_DATEDIALOG_LIST, IDH_WORDPAD_TIMEDATE,
00035   IDC_STATIC_HEADING, IDH_WORDPAD_TIMEDATE,
00036   IDOK, IDH_WORDPAD_TIMEDATE,
00037   IDCANCEL, IDH_WORDPAD_TIMEDATE,
00038   0 , 0
00039 };
00040
00041 CDateDialog::CDateDialog(CWnd* pParent /*=NULL*/)
00042   : CCSDialog(CDateDialog::IDD, pParent)
00043 {
00044   //{{AFX_DATA_INIT(CDateDialog)
00045   m_strSel = _T("");
00046   //}}AFX_DATA_INIT
00047 }
00048
00049
00050 void CDateDialog::DoDataExchange(CDataExchange* pDX)
00051 {
00052   CCSDialog::DoDataExchange(pDX);
00053   //{{AFX_DATA_MAP(CDateDialog)
00054   DDX_Control(pDX, IDC_DATEDIALOG_LIST, m_listBox);
00055   DDX_LBString(pDX, IDC_DATEDIALOG_LIST, m_strSel);
00056   //}}AFX_DATA_MAP
00057 }
00058
00059
00060 BEGIN_MESSAGE_MAP(CDateDialog, CCSDialog)
00061   //{{AFX_MSG_MAP(CDateDialog)
00062   ON_LBN_DBLCLK(IDC_DATEDIALOG_LIST, OnDblclkDatedialogList)
00063   //}}AFX_MSG_MAP
00064 END_MESSAGE_MAP()
00065
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CDateDialog message handlers
00069
00070 BOOL CDateDialog::OnInitDialog()
00071 {
00072   CCSDialog::OnInitDialog();
00073
00074   m_pListBox = &m_listBox; // set static member
00075   GetLocalTime(&m_time);
00076   m_id = GetUserDefaultLCID();
00077
00078   EnumDateFormats(DateFmtEnumProc, m_id, DATE_SHORTDATE);
00079   EnumDateFormats(DateFmtEnumProc, m_id, DATE_LONGDATE);
00080   EnumTimeFormats(TimeFmtEnumProc, m_id, 0);
00081
00082   m_pListBox = NULL;
00083   m_listBox.SetCurSel(0);
00084
00085   return TRUE;  // return TRUE unless you set the focus to a control
00086           // EXCEPTION: OCX Property Pages should return FALSE
00087 }
00088
00089 BOOL CALLBACK CDateDialog::DateFmtEnumProc(LPTSTR lpszFormatString)
00090 {
00091   ASSERT(m_pListBox != NULL);
00092   if (m_pListBox == NULL)
00093     return FALSE;
00094
00095   TCHAR buf[256];
00096   VERIFY(GetDateFormat(m_id, 0, &m_time, lpszFormatString, buf, 256));
00097   // we can end up with same format because a format with leading
00098   // zeroes may be the same as one without when a number is big enough
00099   // e.g. 09/10/94 9/10/94 are different but 10/10/94 and 10/10/94 are
00100   // the same
00101   if (m_pListBox->FindStringExact(-1,buf) == CB_ERR)
00102     m_pListBox->AddString(buf);
00103   return TRUE;
00104 }
00105
00106 BOOL CALLBACK CDateDialog::TimeFmtEnumProc(LPTSTR lpszFormatString)
00107 {
00108   ASSERT(m_pListBox != NULL);
00109   if (m_pListBox == NULL)
00110     return FALSE;
00111
00112   TCHAR buf[256];
00113   VERIFY(GetTimeFormat(m_id, 0, &m_time, lpszFormatString, buf, 256));
00114   // we can end up with same format because a format with leading
00115   // zeroes may be the same as one without when a number is big enough
00116   // e.g. 09/10/94 9/10/94 are different but 10/10/94 and 10/10/94 are
00117   // the same
00118   if (m_pListBox->FindStringExact(-1,buf) == CB_ERR)
00119     m_pListBox->AddString(buf);
00120   return TRUE;
00121 }
00122
00123 void CDateDialog::OnDblclkDatedialogList()
00124 {
00125   OnOK();
00126 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropSheetDemoApp Member List

This is the complete list of members for CPropSheetDemoApp, including all inherited members.
CPropSheetDemoApp() | CPropSheetDemoApp |
InitInstance() | CPropSheetDemoApp | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPane.cpp Source File

  • vc2008fp
  • RollupPane

RollupPane.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RollupPane.h"
00013 #include "MainFrm.h"
00014
00015 #include "RollupPaneDoc.h"
00016 #include "RollupPaneView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #endif
00021
00022
00023 // CRollupPaneApp
00024
00025 BEGIN_MESSAGE_MAP(CRollupPaneApp, CWinApp)
00026   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00027   // Standard file based document commands
00028   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00029   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00030   // Standard print setup command
00031   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00032 END_MESSAGE_MAP()
00033
00034
00035 // CRollupPaneApp construction
00036
00037 CRollupPaneApp::CRollupPaneApp() :
00038   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00039 {
00040   // TODO: add construction code here,
00041   // Place all significant initialization in InitInstance
00042 }
00043
00044
00045 // The one and only CRollupPaneApp object
00046
00047 CRollupPaneApp theApp;
00048
00049
00050 // CRollupPaneApp initialization
00051
00052 BOOL CRollupPaneApp::InitInstance()
00053 {
00054   // InitCommonControlsEx() is required on Windows XP if an application
00055   // manifest specifies use of ComCtl32.dll version 6 or later to enable
00056   // visual styles.  Otherwise, any window creation will fail.
00057   INITCOMMONCONTROLSEX InitCtrls;
00058   InitCtrls.dwSize = sizeof(InitCtrls);
00059   // Set this to include all the common control classes you want to use
00060   // in your application.
00061   InitCtrls.dwICC = ICC_WIN95_CLASSES;
00062   InitCommonControlsEx(&InitCtrls);
00063
00064   CWinApp::InitInstance();
00065
00066   // Initialize OLE libraries
00067   if (!AfxOleInit())
00068   {
00069     AfxMessageBox(IDP_OLE_INIT_FAILED);
00070     return FALSE;
00071   }
00072   AfxEnableControlContainer();
00073   // Standard initialization
00074   // If you are not using these features and wish to reduce the size
00075   // of your final executable, you should remove from the following
00076   // the specific initialization routines you do not need
00077   // Change the registry key under which our settings are stored
00078   // TODO: You should modify this string to be something appropriate
00079   // such as the name of your company or organization
00080   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00081   LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)
00082
00083   SetRegistryBase (_T("Settings"));
00084
00085   // Initialize all Managers for usage. They are automatically constructed
00086   // if not yet present
00087   InitContextMenuManager();
00088   InitKeyboardManager();
00089
00090   // TODO: Remove this if you don't want extended tooltips:
00091   InitTooltipManager();
00092
00093   CMFCToolTipInfo params;
00094   params.m_bVislManagerTheme = TRUE;
00095
00096   theApp.GetTooltipManager ()->SetTooltipParams (
00097     AFX_TOOLTIP_TYPE_ALL,
00098     RUNTIME_CLASS (CMFCToolTipCtrl),
00099     &params);
00100
00101   // Register the application's document templates.  Document templates
00102   //  serve as the connection between documents, frame windows and views
00103   CSingleDocTemplate* pDocTemplate;
00104   pDocTemplate = new CSingleDocTemplate(
00105     IDR_MAINFRAME,
00106     RUNTIME_CLASS(CRollupPaneDoc),
00107     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00108     RUNTIME_CLASS(CRollupPaneView));
00109   if (!pDocTemplate)
00110     return FALSE;
00111   AddDocTemplate(pDocTemplate);
00112
00113
00114
00115   // Parse command line for standard shell commands, DDE, file open
00116   CCommandLineInfo cmdInfo;
00117   ParseCommandLine(cmdInfo);
00118
00119
00120   // Dispatch commands specified on the command line
00121   if (!ProcessShellCommand(cmdInfo))
00122     return FALSE;
00123
00124   // The one and only window has been initialized, so show and update it
00125   m_pMainWnd->ShowWindow(SW_SHOW);
00126   m_pMainWnd->UpdateWindow();
00127   // call DragAcceptFiles only if there's a suffix
00128   //  In an SDI app, this should occur after ProcessShellCommand
00129
00130   if (afxGlobalData.m_nBitsPerPixel < 16)
00131   {
00132     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00133   }
00134
00135   return TRUE;
00136 }
00137
00138 // CRollupPaneApp message handlers
00139
00140 int CRollupPaneApp::ExitInstance()
00141 {
00142
00143
00144   return CWinAppEx::ExitInstance();
00145 }
00146
00147 // CRollupPaneApp message handlers
00148
00149 void CRollupPaneApp::PreLoadState ()
00150 {
00151
00152   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00153
00154   // TODO: add another context menus here
00155 }
00156
00157 /////////////////////////////////////////////////////////////////////////////
00158 // CAboutDlg dialog used for App About
00159
00160 class CAboutDlg : public CDialog
00161 {
00162 public:
00163   CAboutDlg();
00164
00165 // Dialog Data
00166   //{{AFX_DATA(CAboutDlg)
00167   enum { IDD = IDD_ABOUTBOX };
00168   //}}AFX_DATA
00169
00170   // ClassWizard generated virtual function overrides
00171   //{{AFX_VIRTUAL(CAboutDlg)
00172   protected:
00173   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00174   //}}AFX_VIRTUAL
00175
00176 // Implementation
00177 protected:
00178   //{{AFX_MSG(CAboutDlg)
00179     // No message handlers
00180   //}}AFX_MSG
00181   DECLARE_MESSAGE_MAP()
00182 };
00183
00184 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00185 {
00186   //{{AFX_DATA_INIT(CAboutDlg)
00187   //}}AFX_DATA_INIT
00188 }
00189
00190 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00191 {
00192   CDialog::DoDataExchange(pDX);
00193   //{{AFX_DATA_MAP(CAboutDlg)
00194   //}}AFX_DATA_MAP
00195 }
00196
00197 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00198   //{{AFX_MSG_MAP(CAboutDlg)
00199     // No message handlers
00200   //}}AFX_MSG_MAP
00201 END_MESSAGE_MAP()
00202
00203 // App command to run the dialog
00204 void CRollupPaneApp::OnAppAbout()
00205 {
00206   CAboutDlg aboutDlg;
00207   aboutDlg.DoModal();
00208 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSurface Member List

This is the complete list of members for CSurface, including all inherited members.
AdjustWidth(int *) | CSurface | [inline, protected, virtual]
BlitBits() | CSurface |
BlurBits() | CSurface | [virtual]
ClearBits() | CSurface |
Create(CWnd *pWnd, int nBitDepth) | CSurface |
CSurface() | CSurface | [inline]
Destroy() | CSurface |
GetBitDepth() const | CSurface | [inline]
GetByteDepth() const | CSurface | [inline]
GetImage() | CSurface | [inline]
GetPitch() const | CSurface | [inline]
GetPixelAddress(int x, int y) const | CSurface | [inline]
GetVisibleHeight() const | CSurface | [inline]
GetVisibleWidth() const | CSurface | [inline]
Import(const CImage &image) | CSurface |
IsNull() const | CSurface | [inline]
Line(const CPoint &p1, const CPoint &p2, COLORREF c) | CSurface |
m_hDestDC | CSurface | [private]
m_image | CSurface | [private]
m_kDeltaX | CSurface | [protected, static]
m_kDeltaY | CSurface | [protected, static]
m_nBitDepth | CSurface | [private]
m_nByteDepth | CSurface | [private]
m_pSrcWnd | CSurface | [private]
m_wndHeight | CSurface | [private]
m_wndWidth | CSurface | [private]
OnCreated() | CSurface | [inline, protected, virtual]
PointColor(int x, int y, COLORREF c) | CSurface | [inline]
PointColor(int x, int y) const | CSurface | [inline]
RandomBits() | CSurface |
RandomLine(COLORREF c) | CSurface |
ShiftBits() | CSurface |
StripeBits() | CSurface |
~CSurface() | CSurface | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMFCBindCntrItem Member List

This is the complete list of members for CMFCBindCntrItem, including all inherited members.
CMFCBindCntrItem(CMFCBindDoc *pContainer=NULL) | CMFCBindCntrItem |
FinishCreate(SCODE sc) | CMFCBindCntrItem |
GetActiveView() | CMFCBindCntrItem | [inline]
GetDocument() | CMFCBindCntrItem | [inline]
LoadFromMoniker(LPUNKNOWN pUnk, OLECHAR *swzName) | CMFCBindCntrItem |
m_nDocID | CMFCBindCntrItem | [static]
OnActivate() | CMFCBindCntrItem | [virtual]
OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam) | CMFCBindCntrItem | [virtual]
OnChangeItemPosition(const CRect &rectPos) | CMFCBindCntrItem | [protected, virtual]
OnDeactivateUI(BOOL bUndoable) | CMFCBindCntrItem | [protected, virtual]
OnGetItemPosition(CRect &rPosition) | CMFCBindCntrItem | [protected, virtual]
ProcessNewObject() | CMFCBindCntrItem |
Serialize(CArchive &ar) | CMFCBindCntrItem | [virtual]
~CMFCBindCntrItem() | CMFCBindCntrItem |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CThreadDoc Member List

This is the complete list of members for CThreadDoc, including all inherited members.
CThreadDoc() | CThreadDoc | [protected]
OnNewDocument() | CThreadDoc | [virtual]
Serialize(CArchive &ar) | CThreadDoc | [virtual]
~CThreadDoc() | CThreadDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmview.h Source File

  • general
  • dynamenu

dmview.h

Go to the documentation of this file.
00001 // dmview.h
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: interface of the CDynaMenuView class
00013 //
00014 // Functions:
00015 //   Most of this file was generated by AppWizard.  The functions
00016 //   which contain code specific to this sample are:
00017 //
00018 //      CDynaMenuView::OnDraw()             -- draw the view contents
00019 //
00020 //   These functions are implemented in dmview.cpp
00021
00022 class CDynaMenuView : public CView
00023 {
00024 protected: // create from serialization only
00025   CDynaMenuView();
00026   DECLARE_DYNCREATE(CDynaMenuView)
00027
00028 // Attributes
00029 public:
00030   CDynaMenuDoc* GetDocument();
00031
00032 // Operations
00033 public:
00034
00035 // Implementation
00036 public:
00037   virtual ~CDynaMenuView();
00038   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043
00044 protected:
00045
00046   // Printing support
00047   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00048   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00049   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00050
00051 // Generated message map functions
00052 protected:
00053   //{{AFX_MSG(CDynaMenuView)
00054     // NOTE - the ClassWizard will add and remove member functions here.
00055     //    DO NOT EDIT what you see in these blocks of generated code !
00056   //}}AFX_MSG
00057   DECLARE_MESSAGE_MAP()
00058 };
00059
00060 #ifndef _DEBUG  // debug version in dmview.cpp
00061 inline CDynaMenuDoc* CDynaMenuView::GetDocument()
00062    { return (CDynaMenuDoc*)m_pDocument; }
00063 #endif
00064
00065 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/StdAfx.cpp Source File

  • vc2008fp
  • RibbonGadgets

StdAfx.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // stdafx.cpp : source file that includes just the standard includes
00013 // RibbonGadgets.pch will be the pre-compiled header
00014 // stdafx.obj will contain the pre-compiled type information
00015
00016 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/PenDlg.h Source File

  • general
  • Scribble

PenDlg.h

Go to the documentation of this file.
00001 // PenDlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPenWidthsDlg dialog
00014
00015 class CPenWidthsDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CPenWidthsDlg(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CPenWidthsDlg)
00023   enum { IDD = IDD_PEN_WIDTHS };
00024   int   m_nThinWidth;
00025   int   m_nThickWidth;
00026   //}}AFX_DATA
00027
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CPenWidthsDlg)
00032   protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 protected:
00038
00039   // Generated message map functions
00040   //{{AFX_MSG(CPenWidthsDlg)
00041   afx_msg void OnDefaultPenWidths();
00042   //}}AFX_MSG
00043   DECLARE_MESSAGE_MAP()
00044 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestDoc.h Source File

  • vc2008fp
  • RebarTest

RebarTestDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013
00014 class CRebarTestDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CRebarTestDoc();
00018   DECLARE_DYNCREATE(CRebarTestDoc)
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual BOOL OnNewDocument();
00029   virtual void Serialize(CArchive& ar);
00030
00031 // Implementation
00032 public:
00033   virtual ~CRebarTestDoc();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:
00040
00041 // Generated message map functions
00042 protected:
00043   DECLARE_MESSAGE_MAP()
00044 };
00045
00046
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionsPage22 Member List

This is the complete list of members for COptionsPage22, including all inherited members.
COptionsPage22() | COptionsPage22 |
DoDataExchange(CDataExchange *pDX) | COptionsPage22 | [protected, virtual]
IDD enum value | COptionsPage22 |
~COptionsPage22() | COptionsPage22 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/gotodlg.h Source File

  • general
  • npp

gotodlg.h

Go to the documentation of this file.
00001 // gotodlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 // CGotoDlg dialog
00014
00015 class CGotoDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CGotoDlg(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CGotoDlg)
00023   enum { IDD = IDD_GOTO };
00024   int     m_nLineNum;
00025   //}}AFX_DATA
00026
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CGotoDlg)
00031   protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 protected:
00037
00038   // Generated message map functions
00039   //{{AFX_MSG(CGotoDlg)
00040   virtual void OnCancel();
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MainFrm.cpp Source File

  • vc2008fp
  • CustomPages

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "CustomPages.h"
00013
00014 #include "MainFrm.h"
00015
00016 #include "MyCustomizationPage.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00028
00029
00030 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00031   ON_WM_CREATE()
00032   ON_WM_CLOSE()
00033   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00034   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00035   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00036 END_MESSAGE_MAP()
00037
00038 static UINT indicators[] =
00039 {
00040   ID_SEPARATOR,           // status line indicator
00041   ID_INDICATOR_CAPS,
00042   ID_INDICATOR_NUM,
00043   ID_INDICATOR_SCRL,
00044 };
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMainFrame construction/destruction
00048
00049 CMainFrame::CMainFrame()
00050 {
00051   // TODO: add member initialization code here
00052
00053 }
00054
00055 CMainFrame::~CMainFrame()
00056 {
00057 }
00058
00059 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00060 {
00061   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00062     return -1;
00063
00064   // enable Office XP look:
00065   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00066   CMFCToolBar::EnableQuickCustomization ();
00067
00068   if (!m_wndMenuBar.Create (this))
00069   {
00070     TRACE0("Failed to create menubar\n");
00071     return -1;      // fail to create
00072   }
00073
00074   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00075
00076   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00077     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00078     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00079   {
00080     TRACE0("Failed to create toolbar\n");
00081     return -1;      // fail to create
00082   }
00083   if (!m_wndStatusBar.Create(this) ||
00084     !m_wndStatusBar.SetIndicators(indicators,
00085       sizeof(indicators)/sizeof(UINT)))
00086   {
00087     TRACE0("Failed to create status bar\n");
00088     return -1;      // fail to create
00089   }
00090
00091   BOOL bValidString;
00092   CString strMainToolbarTitle;
00093   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00094   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00095   // TODO: Delete these three lines if you don't want the toolbar to
00096   //  be dockable
00097   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00098   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00099   EnableDocking(CBRS_ALIGN_ANY);
00100   DockPane(&m_wndMenuBar);
00101   DockPane(&m_wndToolBar);
00102
00103   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00104   return 0;
00105 }
00106
00107 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00108 {
00109   if( !CFrameWnd::PreCreateWindow(cs) )
00110     return FALSE;
00111   // TODO: Modify the Window class or styles here by modifying
00112   //  the CREATESTRUCT cs
00113
00114   return TRUE;
00115 }
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CMainFrame diagnostics
00119
00120 #ifdef _DEBUG
00121 void CMainFrame::AssertValid() const
00122 {
00123   CFrameWnd::AssertValid();
00124 }
00125
00126 void CMainFrame::Dump(CDumpContext& dc) const
00127 {
00128   CFrameWnd::Dump(dc);
00129 }
00130
00131 #endif //_DEBUG
00132
00133 /////////////////////////////////////////////////////////////////////////////
00134 // CMainFrame message handlers
00135
00136
00137 void CMainFrame::OnViewCustomize()
00138 {
00139   CList <CRuntimeClass*, CRuntimeClass*> lstCustomPages;
00140   lstCustomPages.AddTail (RUNTIME_CLASS (CMyCustomizationPage));
00141   //------------------------------------
00142   // Create a customize toolbars dialog:
00143   //------------------------------------
00144   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00145     TRUE /* Automatic menus scaning */,
00146     AFX_CUSTOMIZE_MENU_SHADOWS | AFX_CUSTOMIZE_TEXT_LABELS |
00147     AFX_CUSTOMIZE_MENU_ANIMATIONS, // default parameters
00148     &lstCustomPages); // pointer to the list of runtime classes of the custom property pages
00149
00150   pDlgCust->Create ();
00151 }
00152
00153 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00154 {
00155   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00156
00157   CMenu menu;
00158   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00159
00160   CMenu* pPopup = menu.GetSubMenu(0);
00161   ASSERT(pPopup != NULL);
00162
00163   if (pPopup)
00164   {
00165     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00166     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00167   }
00168
00169   return 0;
00170 }
00171
00172 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00173 {
00174   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00175   //
00176   // UINT uiToolBarId = (UINT) wp;
00177   // if (uiToolBarId == IDR_MAINFRAME)
00178   // {
00179   //    do something with m_wndToolBar
00180   // }
00181
00182   return 0;
00183 }
00184
00185 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00186 {
00187   //---------------------------------------------------------
00188   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00189   //---------------------------------------------------------
00190   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00191
00192   if (pMenuPopup != NULL &&
00193     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00194   {
00195     if (CMFCToolBar::IsCustomizeMode ())
00196     {
00197       //----------------------------------------------------
00198       // Don't show toolbars list in the cuztomization mode!
00199       //----------------------------------------------------
00200       return FALSE;
00201     }
00202
00203     pMenuPopup->RemoveAllItems ();
00204
00205     CMenu menu;
00206     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00207
00208     CMenu* pPopup = menu.GetSubMenu(0);
00209     ASSERT(pPopup != NULL);
00210
00211     if (pPopup)
00212     {
00213       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00214     }
00215   }
00216
00217   return TRUE;
00218 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CommandLinkCtrlPage.cpp Source File

  • controls
  • cmnctrl

CommandLinkCtrlPage.cpp

Go to the documentation of this file.
00001 // CommandLinkCtrlPage.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005 #include "CmnCtrl3.h"
00006 #include "CommandLinkCtrlPage.h"
00007
00008
00009 // CCommandLinkCtrlPage dialog
00010
00011 IMPLEMENT_DYNAMIC(CCommandLinkCtrlPage, CPropertyPage)
00012
00013 CCommandLinkCtrlPage::CCommandLinkCtrlPage()
00014   : CPropertyPage(CCommandLinkCtrlPage::IDD)
00015 {
00016 }
00017
00018 CCommandLinkCtrlPage::~CCommandLinkCtrlPage()
00019 {
00020 }
00021
00022 void CCommandLinkCtrlPage::DoDataExchange(CDataExchange* pDX)
00023 {
00024   CPropertyPage::DoDataExchange(pDX);
00025   DDX_Control(pDX, IDC_BUTTON_NOTE, m_editNote);
00026   DDX_Control(pDX, IDC_CHECK_ELEV, m_checkShowElev);
00027   DDX_Control(pDX, IDC_COMMAND, m_cmdbtn);
00028 }
00029
00030 BOOL CCommandLinkCtrlPage::OnInitDialog()
00031 {
00032   CPropertyPage::OnInitDialog();
00033
00034   // Init UI
00035   LPCTSTR szInitialNote = _T("and the note goes here ...");
00036   m_editNote.SetWindowText(szInitialNote);
00037   OnBnClickedSetButtonNote();
00038
00039   return TRUE;
00040 }
00041
00042
00043 BEGIN_MESSAGE_MAP(CCommandLinkCtrlPage, CPropertyPage)
00044   ON_BN_CLICKED(IDC_SET_BUTTON_NOTE, &CCommandLinkCtrlPage::OnBnClickedSetButtonNote)
00045   ON_BN_CLICKED(IDC_CHECK_ELEV, &CCommandLinkCtrlPage::OnBnClickedCheckElev)
00046 END_MESSAGE_MAP()
00047
00048 void CCommandLinkCtrlPage::OnBnClickedSetButtonNote()
00049 {
00050   CString note;
00051   m_editNote.GetWindowText(note);
00052   m_cmdbtn.SetNote(note);
00053 }
00054
00055 void CCommandLinkCtrlPage::OnBnClickedCheckElev()
00056 {
00057   m_cmdbtn.SetShield(m_checkShowElev.GetCheck() == BST_CHECKED);
00058 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/BindDoc.h Source File

  • ole
  • MFCBind

BindDoc.h

Go to the documentation of this file.
00001 // BindDoc.h : interface of the CMFCBindDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_BINDDOC_H__C3B18228_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
00013 #define AFX_BINDDOC_H__C3B18228_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_
00014
00015 #if _MSC_VER > 1000
00016 #pragma once
00017 #endif // _MSC_VER > 1000
00018
00019
00020 class CMFCBindDoc : public COleDocument
00021 {
00022 protected: // create from serialization only
00023   CMFCBindDoc();
00024   DECLARE_DYNCREATE(CMFCBindDoc)
00025
00026 // Attributes
00027 public:
00028
00029 // Operations
00030 public:
00031
00032 // Overrides
00033   // ClassWizard generated virtual function overrides
00034   //{{AFX_VIRTUAL(CMFCBindDoc)
00035   public:
00036   virtual BOOL OnNewDocument();
00037   virtual void Serialize(CArchive& ar);
00038   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00039   virtual void OnCloseDocument();
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 public:
00044   virtual ~CMFCBindDoc();
00045 #ifdef _DEBUG
00046   virtual void AssertValid() const;
00047   virtual void Dump(CDumpContext& dc) const;
00048 #endif
00049
00050 protected:
00051
00052 // Generated message map functions
00053 protected:
00054   //{{AFX_MSG(CMFCBindDoc)
00055   afx_msg void OnOleInsertNew();
00056   afx_msg void OnSectionRemove();
00057   afx_msg void OnUpdateSectionRemove(CCmdUI* pCmdUI);
00058   afx_msg void OnFilePrint();
00059   afx_msg void OnFilePrintAll();
00060   //}}AFX_MSG
00061   DECLARE_MESSAGE_MAP()
00062 };
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065
00066 //{{AFX_INSERT_LOCATION}}
00067 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00068
00069 #endif // !defined(AFX_BINDDOC_H__C3B18228_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ddxm.h Source File

  • ole
  • wordpad

ddxm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include <limits.h>
00011 void PASCAL DDX_Twips(CDataExchange* pDX, int nIDC, int& value);
00012 void PASCAL DDV_MinMaxTwips(CDataExchange* pDX, int value, int minVal, int maxVal);
00013 #define DDXM_BLANK INT_MAX
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/Resource.h Source File

  • internet
  • MFCIE

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by mfcie.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_SOCKETS_INIT_FAILED         104
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_MFCIETYPE                   129
00009 #define IDR_MFCAVI                      131
00010 #define IDR_FONT_POPUP                  132
00011 #define IDR_FAVORITES_POPUP             133
00012 #define IDB_COLDTOOLBAR                 261
00013 #define IDB_HOTTOOLBAR                  262
00014 #define IDS_WEB_TUTORIAL                736
00015 #define IDS_ONLINE_SUPPORT              737
00016 #define IDS_FREE_STUFF                  738
00017 #define IDS_GET_FASTER_INTERNET_ACCESS  741
00018 #define IDS_FREQUENTLY_ASKED_QUESTIONS  742
00019 #define IDS_INTERNET_START_PAGE         743
00020 #define IDS_SEND_FEEDBACK               744
00021 #define IDS_BEST_OF_THE_WEB             745
00022 #define IDS_SEARCH_THE_WEB              746
00023 #define IDS_MICROSOFT_HOME_PAGE         747
00024 #define IDS_BACK                        748
00025 #define IDS_FORWARD                     749
00026 #define IDS_STOP                        750
00027 #define IDS_REFRESH                     751
00028 #define IDS_HOME                        752
00029 #define IDS_SEARCH                      753
00030 #define IDS_FAVORITES                   754
00031 #define IDS_PRINT                       755
00032 #define IDS_FONT                        756
00033 #define IDS_ADDRESS                     757
00034 #define IDS_FILETYPES                   1201
00035 #define ID_VIEW_STOP                    32778
00036 #define ID_VIEW_REFRESH                 32779
00037 #define ID_VIEW_FONTS_LARGEST           32782
00038 #define ID_VIEW_FONTS_LARGE             32783
00039 #define ID_VIEW_FONTS_MEDIUM            32784
00040 #define ID_VIEW_FONTS_SMALL             32785
00041 #define ID_VIEW_FONTS_SMALLEST          32786
00042 #define ID_GO_BACK                      32787
00043 #define ID_GO_FORWARD                   32788
00044 #define ID_GO_START_PAGE                32789
00045 #define ID_GO_SEARCH_THE_WEB            32790
00046 #define ID_GO_BEST_OF_THE_WEB           32791
00047 #define ID_FAVORITES_DROPDOWN           32792
00048 #define ID_FONT_DROPDOWN                32793
00049 #define ID_HELP_WEB_TUTORIAL            32798
00050 #define ID_HELP_ONLINE_SUPPORT          32800
00051 #define ID_HELP_MICROSOFT_ON_THE_WEB_FREE_STUFF 32801
00052 #define ID_HELP_MICROSOFT_ON_THE_WEB_GET_FASTER_INTERNET_ACCESS 32802
00053 #define ID_HELP_MICROSOFT_ON_THE_WEB_FREQUENTLY_ASKED_QUESTIONS 32803
00054 #define ID_HELP_MICROSOFT_ON_THE_WEB_SEND_FEEDBACK 32804
00055 #define ID_HELP_MICROSOFT_ON_THE_WEB_BEST_OF_THE_WEB 32805
00056 #define ID_HELP_MICROSOFT_ON_THE_WEB_SEARCH_THE_WEB 32806
00057 #define ID_HELP_MICROSOFT_ON_THE_WEB_MICROSOFT_HOME_PAGE 32807
00058 #define ID_HELP_MICROSOFT_ON_THE_WEB_INTERNET_START_PAGE 32812
00059 #define ID_BOGUS                        32818
00060
00061 // Next default values for new objects
00062 //
00063 #ifdef APSTUDIO_INVOKED
00064 #ifndef APSTUDIO_READONLY_SYMBOLS
00065 #define _APS_3D_CONTROLS                     1
00066 #define _APS_NEXT_RESOURCE_VALUE        134
00067 #define _APS_NEXT_COMMAND_VALUE         32819
00068 #define _APS_NEXT_CONTROL_VALUE         1002
00069 #define _APS_NEXT_SYMED_VALUE           101
00070 #endif
00071 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTaskDialogTestApp Member List

This is the complete list of members for CTaskDialogTestApp, including all inherited members.
CTaskDialogTestApp() | CTaskDialogTestApp |
InitInstance() | CTaskDialogTestApp | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/WorkspaceBar.h Source File

  • vc2008fp
  • StateCollection

WorkspaceBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CWorkspaceBar : public CDockablePane
00014 {
00015 public:
00016   CWorkspaceBar();
00017
00018 // Attributes
00019 protected:
00020   CMFCTabCtrl m_wndTabs;
00021
00022   CTreeCtrl m_wndTree1;
00023   CTreeCtrl m_wndTree2;
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029
00030 // Implementation
00031 public:
00032   virtual ~CWorkspaceBar();
00033
00034 protected:
00035   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00036   afx_msg void OnSize(UINT nType, int cx, int cy);
00037
00038   DECLARE_MESSAGE_MAP()
00039 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/ChildFrm.h Source File

  • vc2008fp
  • RebarTest

ChildFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CChildFrame : public CMDIChildWndEx
00014 {
00015   DECLARE_DYNCREATE(CChildFrame)
00016 public:
00017   CChildFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00027
00028 // Implementation
00029 public:
00030   virtual ~CChildFrame();
00031 #ifdef _DEBUG
00032   virtual void AssertValid() const;
00033   virtual void Dump(CDumpContext& dc) const;
00034 #endif
00035
00036 // Generated message map functions
00037 protected:
00038   DECLARE_MESSAGE_MAP()
00039 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PBagDg.H Source File

  • ole
  • TstCon

PBagDg.H

Go to the documentation of this file.
00001 // File: PBagDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_CPROPERTYBAGDLG_H__5C86BA45_D2DA_11D0_8E0F_00C04FB68D60__INCLUDED_)
00011 #define AFX_CPROPERTYBAGDLG_H__5C86BA45_D2DA_11D0_8E0F_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // CPropertyBagDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CPropertyBagDlg dialog
00021
00022 class CPropertyBagDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CPropertyBagDlg( CPropertyBag* pPropertyBag, CWnd* pParent = NULL );
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CPropertyBagDlg)
00030   enum { IDD = IDD_PROPERTYBAG };
00031   CListCtrl   m_lvProperties;
00032   //}}AFX_DATA
00033
00034
00035 // Overrides
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CPropertyBagDlg)
00038   protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 protected:
00044    CPropertyBag* m_pPropertyBag;
00045
00046   // Generated message map functions
00047   //{{AFX_MSG(CPropertyBagDlg)
00048   virtual BOOL OnInitDialog();
00049   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00050   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 //{{AFX_INSERT_LOCATION}}
00056 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00057
00058 #endif // !defined(AFX_CPROPERTYBAGDLG_H__5C86BA45_D2DA_11D0_8E0F_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribdoc.cpp Source File

  • general
  • Scribble

scribdoc.cpp

Go to the documentation of this file.
00001 // ScribDoc.cpp : implementation of the CScribbleDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014
00015 #include "ScribDoc.h"
00016 #include "ScribItm.h"
00017 #include "PenDlg.h"
00018 #include "ScribVw.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CScribbleDoc
00028
00029 IMPLEMENT_DYNCREATE(CScribbleDoc, COleServerDoc)
00030
00031 BEGIN_MESSAGE_MAP(CScribbleDoc, COleServerDoc)
00032   //{{AFX_MSG_MAP(CScribbleDoc)
00033   ON_COMMAND(ID_EDIT_CLEAR_ALL, OnEditClearAll)
00034   ON_COMMAND(ID_PEN_THICK_OR_THIN, OnPenThickOrThin)
00035   ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR_ALL, OnUpdateEditClearAll)
00036   ON_UPDATE_COMMAND_UI(ID_PEN_THICK_OR_THIN, OnUpdatePenThickOrThin)
00037   ON_COMMAND(ID_PEN_WIDTHS, OnPenWidths)
00038   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00039   //}}AFX_MSG_MAP
00040   ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00041   ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00042 END_MESSAGE_MAP()
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CScribbleDoc construction/destruction
00046
00047 CScribbleDoc::CScribbleDoc()
00048 {
00049   // Use OLE compound files
00050   EnableCompoundFile();
00051
00052   m_sizeDoc = CSize(200, 200);
00053 }
00054
00055 CScribbleDoc::~CScribbleDoc()
00056 {
00057 }
00058
00059 BOOL CScribbleDoc::OnNewDocument()
00060 {
00061   if (!COleServerDoc::OnNewDocument())
00062     return FALSE;
00063   InitDocument();
00064   return TRUE;
00065 }
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CScribbleDoc serialization
00069
00070 void CScribbleDoc::Serialize(CArchive& ar)
00071 {
00072   if (ar.IsStoring())
00073   {
00074     ar << m_sizeDoc;
00075   }
00076   else
00077   {
00078     ar >> m_sizeDoc;
00079   }
00080   m_strokeList.Serialize(ar);
00081 }
00082
00083 /////////////////////////////////////////////////////////////////////////////
00084 // CScribbleDoc diagnostics
00085
00086 #ifdef _DEBUG
00087 void CScribbleDoc::AssertValid() const
00088 {
00089   COleServerDoc::AssertValid();
00090 }
00091
00092 void CScribbleDoc::Dump(CDumpContext& dc) const
00093 {
00094   COleServerDoc::Dump(dc);
00095 }
00096 #endif //_DEBUG
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CScribbleDoc commands
00100
00101 BOOL CScribbleDoc::OnOpenDocument(LPCTSTR lpszPathName)
00102 {
00103   if (!COleServerDoc::OnOpenDocument(lpszPathName))
00104     return FALSE;
00105   InitDocument();
00106   return TRUE;
00107 }
00108
00109 void CScribbleDoc::DeleteContents()
00110 {
00111   while (!m_strokeList.IsEmpty())
00112   {
00113     delete m_strokeList.RemoveHead();
00114   }
00115   COleServerDoc::DeleteContents();
00116 }
00117
00118 void CScribbleDoc::InitDocument()
00119 {
00120   m_bThickPen = FALSE;
00121   m_nThinWidth = 2;   // default thin pen is 2 pixels wide
00122   m_nThickWidth = 5;  // default thick pen is 5 pixels wide
00123   ReplacePen();       // initialize pen according to current width
00124
00125   // default document size is 2 x 2 inches
00126   m_sizeDoc = CSize(200,200);
00127 }
00128
00129 CStroke* CScribbleDoc::NewStroke()
00130 {
00131   CStroke* pStrokeItem = new CStroke(m_nPenWidth);
00132   m_strokeList.AddTail(pStrokeItem);
00133   SetModifiedFlag();  // Mark the document as having been modified, for
00134             // purposes of confirming File Close.
00135   return pStrokeItem;
00136 }
00137
00138
00139
00140
00141 /////////////////////////////////////////////////////////////////////////////
00142 // CStroke
00143
00144 IMPLEMENT_SERIAL(CStroke, CObject, 2)
00145 CStroke::CStroke()
00146 {
00147   // This empty constructor should be used by serialization only
00148 }
00149
00150 CStroke::CStroke(UINT nPenWidth)
00151 {
00152   m_nPenWidth = nPenWidth;
00153   m_rectBounding.SetRectEmpty();
00154 }
00155
00156 void CStroke::Serialize(CArchive& ar)
00157 {
00158   if (ar.IsStoring())
00159   {
00160     ar << m_rectBounding;
00161     ar << (WORD)m_nPenWidth;
00162     m_pointArray.Serialize(ar);
00163   }
00164   else
00165   {
00166     ar >> m_rectBounding;
00167     WORD w;
00168     ar >> w;
00169     m_nPenWidth = w;
00170     m_pointArray.Serialize(ar);
00171   }
00172 }
00173
00174 BOOL CStroke::DrawStroke(CDC* pDC)
00175 {
00176   CPen penStroke;
00177   if (!penStroke.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0)))
00178     return FALSE;
00179   CPen* pOldPen = pDC->SelectObject(&penStroke);
00180   pDC->MoveTo(m_pointArray[0]);
00181   for (int i=1; i < m_pointArray.GetSize(); i++)
00182   {
00183     pDC->LineTo(m_pointArray[i]);
00184   }
00185
00186   pDC->SelectObject(pOldPen);
00187   return TRUE;
00188 }
00189 void CScribbleDoc::OnEditClearAll()
00190 {
00191   DeleteContents();
00192   SetModifiedFlag();  // Mark the document as having been modified, for
00193             // purposes of confirming File Close.
00194   UpdateAllViews(NULL);
00195 }
00196
00197 void CScribbleDoc::OnPenThickOrThin()
00198 {
00199   // Toggle the state of the pen between thin or thick.
00200   m_bThickPen = !m_bThickPen;
00201
00202   // Change the current pen to reflect the new user-specified width.
00203   ReplacePen();
00204 }
00205
00206 void CScribbleDoc::ReplacePen()
00207 {
00208   m_nPenWidth = m_bThickPen? m_nThickWidth : m_nThinWidth;
00209
00210   // Change the current pen to reflect the new user-specified width.
00211   m_penCur.DeleteObject();
00212   m_penCur.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0)); // solid black
00213 }
00214
00215 void CScribbleDoc::OnUpdateEditClearAll(CCmdUI* pCmdUI)
00216 {
00217   // Enable the command user interface object (menu item or tool bar
00218   // button) if the document is non-empty, i.e., has at least one stroke.
00219   pCmdUI->Enable(!m_strokeList.IsEmpty());
00220 }
00221
00222 void CScribbleDoc::OnUpdatePenThickOrThin(CCmdUI* pCmdUI)
00223 {
00224   // Add check mark to Draw Thick Line menu item, if the current
00225   // pen width is "thick".
00226   pCmdUI->SetCheck(m_bThickPen);
00227 }
00228
00229 void CScribbleDoc::OnPenWidths()
00230 {
00231   CPenWidthsDlg dlg;
00232   // Initialize dialog data
00233   dlg.m_nThinWidth = m_nThinWidth;
00234   dlg.m_nThickWidth = m_nThickWidth;
00235
00236   // Invoke the dialog box
00237   if (dlg.DoModal() == IDOK)
00238   {
00239     // retrieve the dialog data
00240     m_nThinWidth = dlg.m_nThinWidth;
00241     m_nThickWidth = dlg.m_nThickWidth;
00242
00243     // Update the pen that is used by views when drawing new strokes,
00244     // to reflect the new pen width definitions for "thick" and "thin".
00245     ReplacePen();
00246   }
00247 }
00248
00249 void CStroke::FinishStroke()
00250 {
00251   // Calculate the bounding rectangle.  It's needed for smart
00252   // repainting.
00253
00254   if (m_pointArray.GetSize()==0)
00255   {
00256     m_rectBounding.SetRectEmpty();
00257     return;
00258   }
00259   CPoint pt = m_pointArray[0];
00260   m_rectBounding = CRect(pt.x, pt.y, pt.x, pt.y);
00261
00262   for (int i=1; i < m_pointArray.GetSize(); i++)
00263   {
00264     // If the point lies outside of the accumulated bounding
00265     // rectangle, then inflate the bounding rect to include it.
00266     pt = m_pointArray[i];
00267     m_rectBounding.left     = min(m_rectBounding.left, pt.x);
00268     m_rectBounding.right    = max(m_rectBounding.right, pt.x);
00269     m_rectBounding.top      = max(m_rectBounding.top, pt.y);
00270     m_rectBounding.bottom   = min(m_rectBounding.bottom, pt.y);
00271   }
00272
00273   // Add the pen width to the bounding rectangle.  This is necessary
00274   // to account for the width of the stroke when invalidating
00275   // the screen.
00276   m_rectBounding.InflateRect(CSize(m_nPenWidth, -(int)m_nPenWidth));
00277   return;
00278 }
00279
00280 COleServerItem* CScribbleDoc::OnGetEmbeddedItem()
00281 {
00282   // OnGetEmbeddedItem is called by the framework to get the COleServerItem
00283   //  that is associated with the document.  It is only called when necessary.
00284
00285   CScribbleItem* pItem = new CScribbleItem(this);
00286   ASSERT_VALID(pItem);
00287   return pItem;
00288 }
00289
00290 void CScribbleDoc::OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect)
00291 {
00292   // call base class to change the size of the window
00293   COleServerDoc::OnSetItemRects(lpPosRect, lpClipRect);
00294
00295   // notify first view that scroll info should change
00296   POSITION pos = GetFirstViewPosition();
00297   CScribbleView* pView = (CScribbleView*)GetNextView(pos);
00298   pView->ResyncScrollSizes();
00299 }
00300
00301 void CScribbleDoc::OnEditCopy()
00302 {
00303   CScribbleItem* pItem = GetEmbeddedItem();
00304   pItem->CopyToClipboard(TRUE);
00305 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/stdafx.cpp Source File

  • general
  • Scribble

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  Scribble.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/optionsh.cpp Source File

  • ole
  • wordpad

optionsh.cpp

Go to the documentation of this file.
00001 // optionsh.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "unitspag.h"
00015 #include "docopt.h"
00016 #include "optionsh.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // COptionSheet
00025
00026 COptionSheet::COptionSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00027   : CCSPropertySheet(nIDCaption, pParentWnd, iSelectPage),
00028   pageText(IDS_TEXT_OPTIONS), pageRTF(IDS_RTF_OPTIONS),
00029   pageWord(IDS_WORD6_OPTIONS), pageWrite(IDS_WRITE_OPTIONS),
00030   pageEmbedded()
00031 {
00032   units.m_nUnits = theApp.GetUnits();
00033   units.m_bWordSel = theApp.m_bWordSel;
00034   pageText.m_nWordWrap = theApp.GetDocOptions(RD_TEXT).m_nWordWrap;
00035   pageRTF.m_nWordWrap = theApp.GetDocOptions(RD_RICHTEXT).m_nWordWrap;
00036   pageWord.m_nWordWrap = theApp.GetDocOptions(RD_WINWORD6).m_nWordWrap;
00037   pageWrite.m_nWordWrap = theApp.GetDocOptions(RD_WRITE).m_nWordWrap;
00038   pageEmbedded.m_nWordWrap = theApp.GetDocOptions(RD_EMBEDDED).m_nWordWrap;
00039   SetPageButtons(pageText, theApp.GetDockState(RD_TEXT));
00040   SetPageButtons(pageRTF, theApp.GetDockState(RD_RICHTEXT));
00041   SetPageButtons(pageWord, theApp.GetDockState(RD_WINWORD6));
00042   SetPageButtons(pageWrite, theApp.GetDockState(RD_WRITE));
00043   SetPageButtons(pageEmbedded, theApp.GetDockState(RD_EMBEDDED));
00044   SetPageButtons(pageEmbedded, theApp.GetDockState(RD_EMBEDDED, FALSE));
00045   AddPage(&units);
00046   AddPage(&pageText);
00047   AddPage(&pageRTF);
00048   AddPage(&pageWord);
00049   AddPage(&pageWrite);
00050   AddPage(&pageEmbedded);
00051 }
00052
00053 void COptionSheet::SetPageButtons(CDocOptPage& page, CDockState& ds)
00054 {
00055   if (ds.m_arrBarInfo.GetSize() == 0)
00056   {
00057     page.m_bFormatBar = page.m_bRulerBar = TRUE;
00058     page.m_bToolBar = page.m_bStatusBar = TRUE;
00059   }
00060   else
00061   {
00062     for (int i = 0;i < ds.m_arrBarInfo.GetSize(); i++)
00063     {
00064       CControlBarInfo* pInfo = (CControlBarInfo*)ds.m_arrBarInfo[i];
00065       ENSURE(pInfo != NULL);
00066       switch (pInfo->m_nBarID)
00067       {
00068         case ID_VIEW_FORMATBAR:
00069           page.m_bFormatBar = page.m_bFormatBar || pInfo->m_bVisible;
00070           break;
00071         case ID_VIEW_RULER:
00072           page.m_bRulerBar = page.m_bRulerBar || pInfo->m_bVisible;
00073           break;
00074         case ID_VIEW_TOOLBAR:
00075           page.m_bToolBar = page.m_bToolBar || pInfo->m_bVisible;
00076           break;
00077         case ID_VIEW_STATUS_BAR:
00078           page.m_bStatusBar = page.m_bStatusBar || pInfo->m_bVisible;
00079           break;
00080       }
00081     }
00082   }
00083 }
00084
00085 void COptionSheet::SetState(CDocOptPage& page, CDockState& ds)
00086 {
00087   for (int i = 0;i < ds.m_arrBarInfo.GetSize(); i++)
00088   {
00089     CControlBarInfo* pInfo = (CControlBarInfo*)ds.m_arrBarInfo[i];
00090     ENSURE(pInfo != NULL);
00091     switch (pInfo->m_nBarID)
00092     {
00093       case ID_VIEW_FORMATBAR:
00094         pInfo->m_bVisible = page.m_bFormatBar;
00095         break;
00096       case ID_VIEW_RULER:
00097         pInfo->m_bVisible = page.m_bRulerBar;
00098         break;
00099       case ID_VIEW_TOOLBAR:
00100         pInfo->m_bVisible = page.m_bToolBar;
00101         break;
00102       case ID_VIEW_STATUS_BAR:
00103         pInfo->m_bVisible = page.m_bStatusBar;
00104         break;
00105     }
00106   }
00107 }
00108
00109 BEGIN_MESSAGE_MAP(COptionSheet, CCSPropertySheet)
00110   //{{AFX_MSG_MAP(COptionSheet)
00111   ON_WM_CREATE()
00112   //}}AFX_MSG_MAP
00113 END_MESSAGE_MAP()
00114
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // COptionSheet message handlers
00118
00119 INT_PTR COptionSheet::DoModal()
00120 {
00121   INT_PTR nRes = CCSPropertySheet::DoModal();
00122   if (nRes == IDOK)
00123   {
00124     SetState(pageText, theApp.GetDockState(RD_TEXT));
00125     SetState(pageRTF, theApp.GetDockState(RD_RICHTEXT));
00126     SetState(pageWord, theApp.GetDockState(RD_WINWORD6));
00127     SetState(pageWrite, theApp.GetDockState(RD_WRITE));
00128     SetState(pageEmbedded, theApp.GetDockState(RD_EMBEDDED));
00129     SetState(pageEmbedded, theApp.GetDockState(RD_EMBEDDED, FALSE));
00130     theApp.SetUnits(units.m_nUnits);
00131     theApp.m_bWordSel = units.m_bWordSel;
00132     theApp.GetDocOptions(RD_TEXT).m_nWordWrap = pageText.m_nWordWrap;
00133     theApp.GetDocOptions(RD_RICHTEXT).m_nWordWrap = pageRTF.m_nWordWrap;
00134     theApp.GetDocOptions(RD_WINWORD6).m_nWordWrap = pageWord.m_nWordWrap;
00135     theApp.GetDocOptions(RD_WRITE).m_nWordWrap = pageWrite.m_nWordWrap;
00136     theApp.GetDocOptions(RD_EMBEDDED).m_nWordWrap = pageEmbedded.m_nWordWrap;
00137   }
00138   return nRes;
00139 }
00140
00141 /////////////////////////////////////////////////////////////////////////////
00142 // COptionSheet message handlers
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLinksBar Member List

This is the complete list of members for CLinksBar, including all inherited members.
AllowChangeTextLabels() const | CLinksBar | [inline, virtual]
CanBeRestored() const | CLinksBar | [inline, virtual]
CLinksBar() | CLinksBar |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CLinksBar | [protected]
OnSendCommand(const CMFCToolBarButton *pButton) | CLinksBar | [virtual]
RestoreOriginalstate() | CLinksBar | [virtual]
~CLinksBar() | CLinksBar | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/resource.h Source File

  • general
  • dlgtempl

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by dlgtemp.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_DLGTEMP_DIALOG              102
00009 #define IDR_MAINFRAME                   128
00010 #define IDC_YPOS                        1007
00011 #define IDC_WIDTH                       1008
00012 #define IDC_HEIGHT                      1009
00013 #define IDC_CAPTION                     1010
00014 #define IDC_BUTTON                      1011
00015 #define IDC_EDITCONTROL                 1012
00016 #define IDC_STATICTEXT                  1013
00017 #define IDC_TERMINATE                   1014
00018 #define IDC_DEMOIT                      1015
00019 #define IDC_SELECTEDITEM                1016
00020 #define IDC_XPOS                        1017
00021 #define IDC_MYBUTTON                    1018
00022 #define IDC_MYSTATICTEXT                1019
00023 #define IDC_MYEDITCONTROL               1020
00024
00025 // Next default values for new objects
00026 //
00027 #ifdef APSTUDIO_INVOKED
00028 #ifndef APSTUDIO_READONLY_SYMBOLS
00029 #define _APS_NEXT_RESOURCE_VALUE        132
00030 #define _APS_NEXT_COMMAND_VALUE         32771
00031 #define _APS_NEXT_CONTROL_VALUE         1021
00032 #define _APS_NEXT_SYMED_VALUE           101
00033 #endif
00034 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikdoc.h Source File

  • ole
  • autoclik

aclikdoc.h

Go to the documentation of this file.
00001 // AClikDoc.h : interface of the CAutoClickDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CAutoClickDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CAutoClickDoc();
00017   DECLARE_DYNCREATE(CAutoClickDoc)
00018
00019 // Attributes
00020 public:
00021   CPoint m_pt;
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CAutoClickDoc)
00029   public:
00030   virtual BOOL OnNewDocument();
00031   virtual void Serialize(CArchive& ar);
00032   //}}AFX_VIRTUAL
00033
00034 // Implementation
00035 public:
00036   virtual ~CAutoClickDoc();
00037 #ifdef _DEBUG
00038   virtual void AssertValid() const;
00039   virtual void Dump(CDumpContext& dc) const;
00040 #endif
00041
00042 protected:
00043
00044 // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CAutoClickDoc)
00047   afx_msg void OnEditChangetext();
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050
00051   // Generated OLE dispatch map functions
00052 public:
00053   //{{AFX_DISPATCH(CAutoClickDoc)
00054   CString m_str;
00055   afx_msg short GetX();
00056   afx_msg void SetX(short nNewValue);
00057   afx_msg short GetY();
00058   afx_msg void SetY(short nNewValue);
00059   afx_msg LPDISPATCH GetPosition();
00060   afx_msg void SetPosition(LPDISPATCH newValue);
00061   afx_msg void Refresh();
00062   afx_msg void SetAllProps(short x, short y, LPCTSTR text);
00063   afx_msg void ShowWindow();
00064   //}}AFX_DISPATCH
00065   DECLARE_DISPATCH_MAP()
00066   DECLARE_INTERFACE_MAP()
00067 };
00068
00069 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexes.h Source File

  • advanced
  • mutexes

mutexes.h

Go to the documentation of this file.
00001 // mutexes.h : main header file for the MUTEXES application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // This sample application is derived from the Mutex application
00013 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00014 // (Microsoft Press).  See the book for more information about Win32
00015 // programming topics, including thread synchronization.
00016
00017 #ifndef __AFXWIN_H__
00018   #error include 'stdafx.h' before including this file for PCH
00019 #endif
00020
00021 #include "resource.h"       // main symbols
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMutexesApp:
00025 // See mutexes.cpp for the implementation of this class
00026 //
00027
00028 class CMutexesApp : public CWinApp
00029 {
00030 public:
00031   CMutexesApp();
00032
00033 // Overrides
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CMutexesApp)
00036   public:
00037   virtual BOOL InitInstance();
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041
00042   //{{AFX_MSG(CMutexesApp)
00043     // NOTE - the ClassWizard will add and remove member functions here.
00044     //    DO NOT EDIT what you see in these blocks of generated code !
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBounceFrame Member List

This is the complete list of members for CBounceFrame, including all inherited members.
CBounceFrame() | CBounceFrame | [protected]
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_OVERLAPPEDWINDOW, const RECT &rect=rectDefault, CMDIFrameWnd *pParentWnd=NULL, CCreateContext *pContext=NULL) | CBounceFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CBounceFrame | [protected, virtual]
~CBounceFrame() | CBounceFrame | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licenctl.h Source File

  • controls
  • licensed

licenctl.h

Go to the documentation of this file.
00001 // licenctl.h : Declaration of the CLicensedCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CLicensedCtrl : See licenctl.cpp for implementation.
00014
00015 class CLicensedCtrl : public COleControl
00016 {
00017   DECLARE_DYNCREATE(CLicensedCtrl)
00018
00019 // Constructor
00020 public:
00021   CLicensedCtrl();
00022
00023 // Overrides
00024
00025   // Drawing function
00026   virtual void OnDraw(
00027         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00028
00029   // Persistence
00030   virtual void DoPropExchange(CPropExchange* pPX);
00031
00032   // Reset control state
00033   virtual void OnResetState();
00034
00035 // Implementation
00036 protected:
00037   ~CLicensedCtrl();
00038
00039   BEGIN_OLEFACTORY(CLicensedCtrl)     // Class factory and guid
00040     virtual BOOL VerifyUserLicense();
00041     virtual BOOL GetLicenseKey(DWORD, BSTR FAR*);
00042   END_OLEFACTORY(CLicensedCtrl)
00043
00044   DECLARE_OLETYPELIB(CLicensedCtrl)       // GetTypeInfo
00045   DECLARE_PROPPAGEIDS(CLicensedCtrl)      // Property page IDs
00046   DECLARE_OLECTLTYPE(CLicensedCtrl)       // Type name and misc status
00047
00048 // Message maps
00049   //{{AFX_MSG(CLicensedCtrl)
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052
00053 // Dispatch maps
00054   //{{AFX_DISPATCH(CLicensedCtrl)
00055   //}}AFX_DISPATCH
00056   DECLARE_DISPATCH_MAP()
00057
00058   afx_msg void AboutBox();
00059
00060 // Event maps
00061   //{{AFX_EVENT(CLicensedCtrl)
00062   //}}AFX_EVENT
00063   DECLARE_EVENT_MAP()
00064
00065 // Dispatch and event IDs
00066 public:
00067   enum {
00068   //{{AFX_DISP_ID(CLicensedCtrl)
00069   //}}AFX_DISP_ID
00070   };
00071 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/infobar.h Source File

  • vc2008fp
  • RollupPane

infobar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CInfoBar window
00015
00016 class CInfoBar : public CDockablePane
00017 {
00018 // Construction
00019 public:
00020   CInfoBar();
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CInfoBar)
00031   //}}AFX_VIRTUAL
00032
00033 // Implementation
00034 public:
00035   virtual ~CInfoBar();
00036
00037   // Generated message map functions
00038 protected:
00039   //{{AFX_MSG(CInfoBar)
00040   afx_msg void OnPaint();
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.h Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

FileDlgWatcherDlg.h

Go to the documentation of this file.
00001 // FileDlgWatcherDlg.h : header file
00002 //
00003
00004 #pragma once
00005
00006
00007 // CFileDlgWatcherDlg dialog
00008 class CFileDlgWatcherDlg : public CDialog
00009 {
00010 // Construction
00011 public:
00012   CFileDlgWatcherDlg(CWnd* pParent = NULL); // standard constructor
00013
00014 // Dialog Data
00015   enum { IDD = IDD_FILEDLGWATCHER_DIALOG };
00016
00017   protected:
00018   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00019
00020
00021 // Implementation
00022 protected:
00023   HICON m_hIcon;
00024
00025   // Generated message map functions
00026   virtual BOOL OnInitDialog();
00027   afx_msg void OnPaint();
00028   afx_msg HCURSOR OnQueryDragIcon();
00029   DECLARE_MESSAGE_MAP()
00030 public:
00031   afx_msg void OnBnClickedCreateDlg();
00032   afx_msg void OnBnClickedClearLog();
00033 private:
00034   // Creates the log prologue based on the current settings
00035   void CreateLogPrologue();
00036   // Creates the log epilogue based on current settings
00037   void CreateLogEpilogue();
00038
00039   BOOL m_bOpenFileDialog;
00040   BOOL m_bVistaStyle;
00041   BOOL m_bEventPopups;
00042   CString m_strLog;
00043 };
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribvw.h Source File

  • general
  • Scribble

scribvw.h

Go to the documentation of this file.
00001 // ScribVw.h : interface of the CScribbleView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CScribbleView : public CScrollView
00014 {
00015 protected: // create from serialization only
00016   CScribbleView();
00017   DECLARE_DYNCREATE(CScribbleView)
00018
00019 // Attributes
00020 public:
00021   CScribbleDoc* GetDocument();
00022
00023 protected:
00024   CStroke*    m_pStrokeCur;   // the stroke in progress
00025   CPoint      m_ptPrev;       // the last mouse pt in the stroke in progress
00026
00027 // Operations
00028 public:
00029         void ResyncScrollSizes();       // ensure scroll info is up-to-date
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CScribbleView)
00034   public:
00035   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00036   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00037   virtual void OnInitialUpdate();
00038   virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
00039   protected:
00040   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00041   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00042   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00043   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00044   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 public:
00049   void PrintTitlePage(CDC* pDC, CPrintInfo* pInfo);
00050   void PrintPageHeader(CDC* pDC, CPrintInfo* pInfo, CString& strHeader);
00051   virtual ~CScribbleView();
00052 #ifdef _DEBUG
00053   virtual void AssertValid() const;
00054   virtual void Dump(CDumpContext& dc) const;
00055 #endif
00056
00057 protected:
00058
00059 // Generated message map functions
00060 protected:
00061   //{{AFX_MSG(CScribbleView)
00062   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00063   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00064   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00065   afx_msg void OnCancelEditSrvr();
00066   afx_msg void OnSize(UINT nType, int cx, int cy);
00067   //}}AFX_MSG
00068   DECLARE_MESSAGE_MAP()
00069 };
00070
00071 #ifndef _DEBUG  // debug version in ScribVw.cpp
00072 inline CScribbleDoc* CScribbleView::GetDocument()
00073    { return (CScribbleDoc*)m_pDocument; }
00074 #endif
00075
00076 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWordPadResizeBar Member List

This is the complete list of members for CWordPadResizeBar, including all inherited members.
SetMinSize(CSize size) | CWordPadResizeBar | [inline]
SetMinSize(CSize size) | CWordPadResizeBar | [inline]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Wrapper.h Source File

  • general
  • MMXSwarm

SSE2Wrapper.h

Go to the documentation of this file.
00001 // SSE2Wrapper.h : Very thin object wrapper over the SSE2 types
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013
00014 // Very thin and specific classes to have the SSE2 integer
00015 // types more C++ friendly.
00016
00017 class CSSE2Unsigned16Saturated
00018 {
00019 public:
00020   CSSE2Unsigned16Saturated()
00021   {
00022   }
00023   CSSE2Unsigned16Saturated( __m128i m128i )
00024   {
00025     m_m128i = m128i;
00026   }
00027   CSSE2Unsigned16Saturated( ULONGLONG qw )
00028   {
00029     m_m128i = _mm_loadl_epi64((__m128i*)&qw);
00030   }
00031
00032   CSSE2Unsigned16Saturated& operator=( const CSSE2Unsigned16Saturated& m )
00033   {
00034     m_m128i = m.m_m128i;
00035     return( *this );
00036   }
00037   CSSE2Unsigned16Saturated& operator=( const ULONGLONG &qw )
00038   {
00039     m_m128i = _mm_loadl_epi64((__m128i*)&qw);
00040     return( *this );
00041   }
00042
00043   operator __m128i() const
00044   {
00045     return( m_m128i );
00046   }
00047
00048   // least significant half
00049   operator ULONGLONG() const
00050   {
00051     return( *m_m128i.m128i_i64 );
00052   }
00053
00054   void Clear()
00055   {
00056     m_m128i = _mm_setzero_si128();
00057   }
00058
00059   void Fill( const ULONGLONG &qw )
00060   {
00061     __m64 m;
00062     m.m64_u64 = qw;
00063     m_m128i = _mm_set1_epi64( m );
00064   }
00065
00066   CSSE2Unsigned16Saturated& operator+=( const CSSE2Unsigned16Saturated& m )
00067   {
00068     m_m128i = _mm_adds_epu16( m_m128i, m );
00069     return( *this );
00070   }
00071   CSSE2Unsigned16Saturated& operator-=( const CSSE2Unsigned16Saturated& m )
00072   {
00073     m_m128i = _mm_subs_epu16( m_m128i, m );
00074     return( *this );
00075   }
00076   CSSE2Unsigned16Saturated& operator>>=( int nBits )
00077   {
00078     m_m128i = _mm_srli_epi16( m_m128i, nBits );
00079     return( *this );
00080   }
00081
00082   CSSE2Unsigned16Saturated& operator<<=( int nBits )
00083   {
00084     m_m128i = _mm_slli_epi16( m_m128i, nBits );
00085     return( *this );
00086   }
00087
00088   CSSE2Unsigned16Saturated& operator&=( const CSSE2Unsigned16Saturated& m )
00089   {
00090     m_m128i = _mm_and_si128(m_m128i, m);
00091     return(*this);
00092   }
00093
00094   CSSE2Unsigned16Saturated& operator|=( const CSSE2Unsigned16Saturated& m )
00095   {
00096     m_m128i = _mm_or_si128(m_m128i, m);
00097     return(*this);
00098   }
00099
00100   CSSE2Unsigned16Saturated& AndNot( const CSSE2Unsigned16Saturated& m )
00101   {
00102     m_m128i = _mm_andnot_si128(m, m_m128i);
00103     return(*this);
00104   }
00105
00106   ULONGLONG PackBytes() const
00107   {
00108     return( *_mm_packus_epi16(m_m128i, _mm_setzero_si128()).m128i_i64 );
00109   }
00110
00111   // aligned
00112   void Store( void *pAddr )
00113   {
00114     ASSERT((DWORD_PTR(pAddr)& 0xF) == 0);
00115     _mm_store_si128( (__m128i *)pAddr, m_m128i );
00116   }
00117
00118   // aligned
00119   void StoreU( void *pAddr )
00120   {
00121     _mm_storeu_si128( (__m128i *)pAddr, m_m128i );
00122   }
00123
00124   // aligned
00125   void Load( void *pAddr )
00126   {
00127     ASSERT((DWORD_PTR(pAddr)& 0xF) == 0);
00128     m_m128i = _mm_load_si128( (__m128i *)pAddr );
00129   }
00130
00131   // aligned
00132   void LoadU( void *pAddr )
00133   {
00134     m_m128i = _mm_loadu_si128( (__m128i *)pAddr );
00135   }
00136
00137   // aligned
00138   void PackBytes( void *pAddr, const CSSE2Unsigned16Saturated& mUpper ) const
00139   {
00140     ASSERT((DWORD_PTR(pAddr)& 0xF) == 0);
00141     _mm_store_si128( (__m128i *)pAddr, _mm_packus_epi16( m_m128i, mUpper ) );
00142   }
00143
00144   // Unaligned, documented to be slower.
00145   void PackBytesU( void *pAddr, const CSSE2Unsigned16Saturated& mUpper ) const
00146   {
00147     _mm_storeu_si128( (__m128i *)pAddr, _mm_packus_epi16( m_m128i, mUpper ) );
00148   }
00149
00150
00151   void UnpackBytesLo( const ULONGLONG &qw )
00152   {
00153     m_m128i = _mm_unpacklo_epi8( _mm_loadl_epi64((__m128i*)&qw), _mm_setzero_si128() );
00154   }
00155   void UnpackBytesHi( ULONGLONG qw )
00156   {
00157     m_m128i = _mm_unpacklo_epi8( _mm_setzero_si128(), _mm_loadl_epi64((__m128i*)&qw) );
00158   }
00159
00160   void UnpackBytes(CSSE2Unsigned16Saturated &mmLeft)
00161   {
00162     mmLeft = _mm_unpackhi_epi8( m_m128i, _mm_setzero_si128() );
00163     m_m128i = _mm_unpacklo_epi8( m_m128i, _mm_setzero_si128() );
00164   }
00165
00166 public:
00167   __m128i m_m128i;
00168 };
00169
00170 inline CSSE2Unsigned16Saturated operator+( const CSSE2Unsigned16Saturated& m1, const CSSE2Unsigned16Saturated& m2 )
00171 {
00172   return( _mm_adds_epu16( m1.m_m128i, m2.m_m128i ) );
00173 }
00174
00175 inline CSSE2Unsigned16Saturated operator-( const CSSE2Unsigned16Saturated& m1, const CSSE2Unsigned16Saturated& m2 )
00176 {
00177   return( _mm_subs_epu16( m1.m_m128i, m2.m_m128i ) );
00178 }
00179
00180 inline CSSE2Unsigned16Saturated operator<<( const CSSE2Unsigned16Saturated& m1, int nBits )
00181 {
00182   return( _mm_slli_epi16( m1, nBits ) );
00183 }
00184
00185 inline CSSE2Unsigned16Saturated operator>>( const CSSE2Unsigned16Saturated& m1, int nBits )
00186 {
00187   return( _mm_srli_epi16( m1, nBits ) );
00188 }
00189
00190 inline CSSE2Unsigned16Saturated operator&( const CSSE2Unsigned16Saturated& m1, const CSSE2Unsigned16Saturated& m2 )
00191 {
00192   return(_mm_and_si128(m1, m2));
00193 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/htmledit.h Source File

  • internet
  • HTMLEdit

htmledit.h

Go to the documentation of this file.
00001 // HTMLEdit.h : main header file for the HTMLEDIT application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_HTMLEDIT_H__2BCEEF85_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
00013 #define AFX_HTMLEDIT_H__2BCEEF85_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_
00014
00015 #if _MSC_VER > 1000
00016 #pragma once
00017 #endif // _MSC_VER > 1000
00018
00019 #ifndef __AFXWIN_H__
00020   #error include 'stdafx.h' before including this file for PCH
00021 #endif
00022
00023 #include "resource.h"       // main symbols
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CHTMLEditApp:
00027 // See HTMLEdit.cpp for the implementation of this class
00028 //
00029
00030 class CHTMLEditApp : public CWinApp
00031 {
00032 public:
00033   CHTMLEditApp();
00034
00035 // Overrides
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CHTMLEditApp)
00038   public:
00039   virtual BOOL InitInstance();
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043   //{{AFX_MSG(CHTMLEditApp)
00044   afx_msg void OnAppAbout();
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046     //    DO NOT EDIT what you see in these blocks of generated code !
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053
00054 //{{AFX_INSERT_LOCATION}}
00055 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00056
00057 #endif // !defined(AFX_HTMLEDIT_H__2BCEEF85_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.cpp Source File

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenuView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "OwnerDrawMenu.h"
00013
00014 #include "OwnerDrawMenuDoc.h"
00015 #include "OwnerDrawMenuView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const CString strInfo =
00024   _T("This sample illustrates how the popup menu items may be drawn on the fly.\r\n\r\n")
00025   _T("Click the \"Line Style\" toolbar button to see an owner-draw menu item\r\n")
00026   _T("which is implemented in the CLineStyleMenuItem class.\r\n")
00027   _T("The menu items are replaced by this object in CMainFrame::OnShowPopupMenu.");
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // COwnerDrawMenuView
00031
00032 IMPLEMENT_DYNCREATE(COwnerDrawMenuView, CView)
00033
00034 BEGIN_MESSAGE_MAP(COwnerDrawMenuView, CView)
00035   ON_COMMAND(ID_MORE_LINES, OnMoreLines)
00036   ON_WM_CONTEXTMENU()
00037   // Standard printing commands
00038   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00039   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00040   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00041   ON_COMMAND_RANGE(ID_LINE_STYLE_1, ID_LINE_STYLE_10, OnLineStyle)
00042   ON_UPDATE_COMMAND_UI_RANGE(ID_LINE_STYLE_1, ID_LINE_STYLE_10, OnUpdateLineStyle)
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // COwnerDrawMenuView construction/destruction
00047
00048 COwnerDrawMenuView::COwnerDrawMenuView()
00049 {
00050   m_uiLineStyleCmd = ID_LINE_STYLE_3;
00051 }
00052
00053 COwnerDrawMenuView::~COwnerDrawMenuView()
00054 {
00055 }
00056
00057 BOOL COwnerDrawMenuView::PreCreateWindow(CREATESTRUCT& cs)
00058 {
00059   // TODO: Modify the Window class or styles here by modifying
00060   //  the CREATESTRUCT cs
00061
00062   return CView::PreCreateWindow(cs);
00063 }
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // COwnerDrawMenuView drawing
00067
00068 void COwnerDrawMenuView::OnDraw(CDC* pDC)
00069 {
00070 //  COwnerDrawMenuDoc* pDoc = GetDocument();
00071 //  ASSERT_VALID(pDoc);
00072
00073   const int iOffset = 20;
00074
00075   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00076   ASSERT (pFontOld != NULL);
00077
00078   CRect rectClient;
00079   GetClientRect (&rectClient);
00080
00081   CRect rectText = rectClient;
00082   rectText.DeflateRect (iOffset, iOffset);
00083   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00084
00085   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00086               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00087
00088   CRect rectFrame = rectText;
00089   rectFrame.InflateRect (iOffset, iOffset);
00090
00091   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00092
00093   rectFrame.DeflateRect (1, 1);
00094   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00095           ::GetSysColor (COLOR_3DLIGHT));
00096
00097   rectFrame.DeflateRect (2, 2);
00098   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00099           ::GetSysColor (COLOR_3DLIGHT));
00100
00101   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00102   pDC->SetBkMode (TRANSPARENT);
00103
00104   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00105
00106   pDC->SelectObject (pFontOld);
00107 }
00108
00109 /////////////////////////////////////////////////////////////////////////////
00110 // COwnerDrawMenuView printing
00111
00112 void COwnerDrawMenuView::OnFilePrintPreview()
00113 {
00114   AFXPrintPreview (this);
00115 }
00116
00117 BOOL COwnerDrawMenuView::OnPreparePrinting(CPrintInfo* pInfo)
00118 {
00119   // default preparation
00120   return DoPreparePrinting(pInfo);
00121 }
00122
00123 void COwnerDrawMenuView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00124 {
00125   // TODO: add extra initialization before printing
00126 }
00127
00128 void COwnerDrawMenuView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00129 {
00130   // TODO: add cleanup after printing
00131 }
00132
00133 /////////////////////////////////////////////////////////////////////////////
00134 // COwnerDrawMenuView diagnostics
00135
00136 #ifdef _DEBUG
00137 void COwnerDrawMenuView::AssertValid() const
00138 {
00139   CView::AssertValid();
00140 }
00141
00142 void COwnerDrawMenuView::Dump(CDumpContext& dc) const
00143 {
00144   CView::Dump(dc);
00145 }
00146
00147 COwnerDrawMenuDoc* COwnerDrawMenuView::GetDocument() // non-debug version is inline
00148 {
00149   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COwnerDrawMenuDoc)));
00150   return (COwnerDrawMenuDoc*)m_pDocument;
00151 }
00152 #endif //_DEBUG
00153
00154 /////////////////////////////////////////////////////////////////////////////
00155 // COwnerDrawMenuView message handlers
00156
00157 void COwnerDrawMenuView::OnContextMenu(CWnd*, CPoint point)
00158 {
00159   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00160 }
00161
00162 void COwnerDrawMenuView::OnLineStyle(UINT uiCmd)
00163 {
00164   m_uiLineStyleCmd = uiCmd;
00165
00166   CString str;
00167   str.Format (_T("Line style: %d"), uiCmd - ID_LINE_STYLE_1 + 1);
00168
00169   MessageBox (str);
00170 }
00171
00172 void COwnerDrawMenuView::OnUpdateLineStyle(CCmdUI* pCmdUI)
00173 {
00174   pCmdUI->SetCheck (m_uiLineStyleCmd == pCmdUI->m_nID);
00175 }
00176
00177 void COwnerDrawMenuView::OnMoreLines()
00178 {
00179   MessageBox (_T("More line styles...."));
00180 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMonthCalPage Member List

This is the complete list of members for CMonthCalPage, including all inherited members.
CMonthCalPage() | CMonthCalPage |
DoDataExchange(CDataExchange *pDX) | CMonthCalPage | [protected, virtual]
GetDayState(NMHDR *pHdr, LRESULT *pRes) | CMonthCalPage |
HandleSelChange(NMHDR *pHdr, LRESULT *pRes) | CMonthCalPage |
HandleSelect(NMHDR *pHdr, LRESULT *pRes) | CMonthCalPage |
IDD enum value | CMonthCalPage |
m_bDayState | CMonthCalPage |
m_bMultiSelect | CMonthCalPage |
m_bNoToday | CMonthCalPage |
m_bNoTodayCircle | CMonthCalPage |
m_bWeekNumbers | CMonthCalPage |
m_edMaxSel | CMonthCalPage |
m_MonthCal | CMonthCalPage |
m_nMaxSelCount | CMonthCalPage |
m_NotifyList | CMonthCalPage |
m_pszRange | CMonthCalPage |
m_pszSelection | CMonthCalPage |
OnChangeEdselrange() | CMonthCalPage | [protected]
OnCkdaystate() | CMonthCalPage | [protected]
OnCknotoday() | CMonthCalPage | [protected]
OnCknotodaycircle() | CMonthCalPage | [protected]
OnCkweeknumbers() | CMonthCalPage | [protected]
OnCmultiselect() | CMonthCalPage | [protected]
OnInitDialog() | CMonthCalPage | [protected, virtual]
~CMonthCalPage() | CMonthCalPage |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawObj Member List

This is the complete list of members for CDrawObj, including all inherited members.
active enum value | CDrawObj |
CanChangeFillColor() const | CDrawObj | [inline, virtual]
CanChangeLineColor() const | CDrawObj | [inline, virtual]
CanChangeLineWeight() const | CDrawObj | [inline, virtual]
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
Clone(CDrawDoc *pDoc=NULL) | CDrawObj | [virtual]
Clone(CDrawDoc *pDoc=NULL) | CDrawObj | [virtual]
DECLARE_SERIAL(CDrawObj) | CDrawObj | [protected]
DECLARE_SERIAL(CDrawObj) | CDrawObj | [protected]
Draw(CDC *pDC) | CDrawObj | [virtual]
Draw(CDC *pDC) | CDrawObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
EnableFill(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
EnableLine(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
GetFillColor() const | CDrawObj | [inline]
GetHandle(int nHandle) | CDrawObj | [virtual]
GetHandle(int nHandle) | CDrawObj | [virtual]
GetHandleCount() | CDrawObj | [virtual]
GetHandleCount() | CDrawObj | [virtual]
GetHandleCursor(int nHandle) | CDrawObj | [virtual]
GetHandleCursor(int nHandle) | CDrawObj | [virtual]
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetLineColor() const | CDrawObj | [inline]
GetLineWeight() const | CDrawObj | [inline]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawObj | [virtual]
Invalidate() | CDrawObj |
Invalidate() | CDrawObj |
IsEnableFill() const | CDrawObj | [inline]
IsEnableLine() const | CDrawObj | [inline]
m_bBrush | CDrawObj | [protected]
m_bPen | CDrawObj | [protected]
m_logbrush | CDrawObj | [protected]
m_logpen | CDrawObj | [protected]
m_pDocument | CDrawObj |
m_position | CDrawObj |
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveTo(const CPoint &position) | CDrawObj | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawObj | [virtual]
normal enum value | CDrawObj |
OnEditProperties() | CDrawObj | [virtual]
OnEditProperties() | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
Remove() | CDrawObj | [virtual]
Remove() | CDrawObj | [virtual]
selected enum value | CDrawObj |
Serialize(CArchive &ar) | CDrawObj | [virtual]
Serialize(CArchive &ar) | CDrawObj | [virtual]
SetFillColor(COLORREF color) | CDrawObj | [virtual]
SetFillColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineColor(COLORREF color) | CDrawObj | [virtual]
SetLineColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineWeight(int nWidth, BOOL bPreview=FALSE) | CDrawObj |
TrackerState enum name | CDrawObj |
TrackerState enum name | CDrawObj |
~CDrawObj() | CDrawObj | [virtual]
~CDrawObj() | CDrawObj | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/AProp.Cpp Source File

  • ole
  • TstCon

AProp.Cpp

Go to the documentation of this file.
00001 // File: AProp.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019
00020 IMPLEMENT_SERIAL( CAmbientProperty, CObject, 1 );
00021
00022 CAmbientProperty::CAmbientProperty() :
00023    m_dispid( 0 ),
00024    m_tEnabled( FALSE )
00025 {
00026 }
00027
00028 CAmbientProperty::CAmbientProperty( DISPID dispid, LPCTSTR pszName,
00029    const VARIANT& var, int vti, BOOL tStock ) :
00030    m_dispid( dispid ),
00031    m_strName( pszName ),
00032    m_varValue( var ),
00033    m_vti( vti ),
00034    m_tEnabled( TRUE ),
00035    m_tStock( tStock )
00036 {
00037 }
00038
00039 CAmbientProperty& CAmbientProperty::operator=( const CAmbientProperty& prop )
00040 {
00041    m_dispid = prop.m_dispid;
00042    m_strName = prop.m_strName;
00043    m_varValue = prop.m_varValue;
00044    m_vti = prop.m_vti;
00045    m_tEnabled = prop.m_tEnabled;
00046    m_tStock = prop.m_tStock;
00047
00048    return( *this );
00049 }
00050
00051 void CAmbientProperty::Enable( BOOL tEnabled )
00052 {
00053    m_tEnabled = tEnabled;
00054 }
00055
00056 DISPID CAmbientProperty::GetID() const
00057 {
00058    return( m_dispid );
00059 }
00060
00061 CString CAmbientProperty::GetName() const
00062 {
00063    return( m_strName );
00064 }
00065
00066 const COleVariant& CAmbientProperty::GetValue() const
00067 {
00068    return( m_varValue );
00069 }
00070
00071 int CAmbientProperty::GetVTI() const
00072 {
00073    return( m_vti );
00074 }
00075
00076 BOOL CAmbientProperty::IsEnabled() const
00077 {
00078    return( m_tEnabled );
00079 }
00080
00081 BOOL CAmbientProperty::IsStock() const
00082 {
00083    return( m_tStock );
00084 }
00085
00086 void CAmbientProperty::SetValue( const VARIANT& varValue, int vti )
00087 {
00088    m_varValue = varValue;
00089    if( vti == -1 )
00090    {
00091     m_vti = VTToVTI( varValue.vt );
00092    }
00093    else
00094    {
00095     ASSERT( VTIToVT( vti ) == varValue.vt );
00096     m_vti = vti;
00097    }
00098 }
00099
00100 void CAmbientProperty::Serialize( CArchive& ar )
00101 {
00102    CObject::Serialize( ar );
00103
00104    if( ar.IsStoring() )
00105    {
00106     ar<<m_dispid;
00107     ar<<m_strName;
00108     ar<<m_varValue;
00109     ar<<m_vti;
00110     ar<<m_tEnabled;
00111     ar<<m_tStock;
00112    }
00113    else
00114    {
00115     ar>>m_dispid;
00116     ar>>m_strName;
00117     ar>>m_varValue;
00118     ar>>m_vti;
00119     ar>>m_tEnabled;
00120     ar>>m_tStock;
00121    }
00122 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page3.h Source File

  • vc2008fp
  • NewControls

Page3.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CCustomEditListBox : public CVSListBox
00013 {
00014   virtual void OnBrowse()
00015   {
00016     int nSel = GetSelItem();
00017
00018     MessageBox(_T("Browse item..."));
00019
00020     if (nSel == GetCount()) // New item
00021     {
00022       nSel = AddItem(_T("New text"));
00023       SelectItem(nSel);
00024     }
00025     else
00026     {
00027       SetItemText(nSel, _T("Updated text"));
00028     }
00029   }
00030 };
00031
00032 class CMyBrowseEdit : public CMFCEditBrowseCtrl
00033 {
00034   virtual void OnBrowse()
00035   {
00036     MessageBox(_T("Browse item..."));
00037     SetWindowText(_T("New value!"));
00038   }
00039 };
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CPage3 dialog
00043
00044 class CPage3 : public CMFCPropertyPage
00045 {
00046   DECLARE_DYNCREATE(CPage3)
00047
00048 // Construction
00049 public:
00050   CPage3();
00051   ~CPage3();
00052
00053 // Dialog Data
00054   enum { IDD = IDD_PAGE3 };
00055   CMyBrowseEdit m_wndCustomEdit;
00056   CMFCEditBrowseCtrl m_wndFolderEdit;
00057   CMFCEditBrowseCtrl m_wndFileEdit;
00058   CMFCFontComboBox m_wndFont;
00059   CStatic m_wndImageArea;
00060   CMFCButton m_btnImageEdit;
00061   CMFCLinkCtrl m_btnLink;
00062   CCustomEditListBox m_wndEditListBox;
00063   BOOL m_bTrueType;
00064   BOOL m_bRaster;
00065   BOOL m_bDeviceFont;
00066   BOOL m_bDrawUsingFont;
00067   BYTE m_nCurFontCharSet;
00068   CString m_strCurFontName;
00069
00070
00071 // Overrides
00072 protected:
00073   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00074
00075 // Implementation
00076 protected:
00077   afx_msg void OnEditImage();
00078   virtual BOOL OnInitDialog();
00079   afx_msg void OnPaint();
00080   afx_msg void OnFontType();
00081   afx_msg void OnDrawUsingFont();
00082   afx_msg void OnSelchangeFont();
00083
00084   DECLARE_MESSAGE_MAP()
00085
00086   CRect m_rectImage;
00087   CBitmap m_bmpImage;
00088 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/idataobj.cpp Source File

  • ole
  • oleview
  • iviewers

idataobj.cpp

Go to the documentation of this file.
00001 // idataobj.cpp
00002 //
00003 // Implementation file for the IDataObject interface viewer.
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014 //
00015 #include "stdafx.h"
00016 #include "iview.h"
00017 #include "util.h"
00018 #include "idataobj.h"
00019 #include "iadvsink.h"
00020
00021 static HFONT      g_hFont ;
00022 static HFONT      g_hFontBold ;
00023 static UINT        g_cyFont ;
00024
00025 static WNDPROC     g_pfnEdit = NULL ;
00026
00027 #define I_NORMAL        0x0000
00028 #define I_LABEL         0x0001
00029 #define I_COLUMNHEAD    0x0002
00030 #define I_COLUMNENTRY   0x0003
00031
00032 typedef struct FAR tagITEMDATA
00033 {
00034   UINT            nLevel ;
00035   UINT            uiType ;
00036   int             cColumns ;
00037   LPCOLUMNSTRUCT  rgCol ;
00038   LPVOID          lpData ;
00039
00040 } ITEMDATA, *PITEMDATA, FAR*LPITEMDATA ;
00041
00042 extern "C"
00043 LRESULT EXPORT CALLBACK fnEditSubclass( HWND hwnd, UINT uiMsg, WPARAM wP, LPARAM lP ) ;
00044
00045 LPCTSTR MyGetClipboardFormatName( UINT cf ) ;
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CIDataObjectDlg dialog
00049 //
00050 CIDataObjectDlg::CIDataObjectDlg( HWND hwnd, LPDATAOBJECT lpDO, REFIID /*riid*/, LPTSTR lpszName )
00051 {
00052   m_lbFmtEtc = NULL ;
00053   m_edtAdvise = NULL ;
00054   m_MetaFile.hMF = NULL ;
00055
00056   m_hWndParent = hwnd ;
00057   m_lpDO = lpDO ;
00058   m_lpszName = lpszName ;
00059
00060   m_pSink = NULL ;
00061   m_dwConn = 0 ;
00062   m_advf = ADVF_PRIMEFIRST ;
00063
00064   m_fetc.cfFormat = CF_TEXT ;
00065   m_fetc.dwAspect = DVASPECT_CONTENT ;
00066   m_fetc.ptd = NULL ;
00067   m_fetc.tymed = TYMED_HGLOBAL ;
00068   m_fetc.lindex = - 1 ;
00069
00070   m_fDoOnGetDataPosted = FALSE ;
00071
00072   m_cchOutput = 0 ;
00073   m_cLinesOutput = 0 ;
00074 }
00075
00076 CIDataObjectDlg::~CIDataObjectDlg()
00077 {
00078   if (m_MetaFile.hMF != NULL)
00079     DeleteMetaFile( m_MetaFile.hMF ) ;
00080 }
00081
00082 int CIDataObjectDlg::DoModal( void )
00083 {
00084   if (-1 == DialogBoxParam( GetModuleHandle(_T("IVIEWERS.DLL")), MAKEINTRESOURCE( IDD_IDATAOBJDLG ), m_hWndParent, (DLGPROC)fnIDataObjectDlg, (LONG_PTR)this ))
00085   {
00086     DWORD dw = GetLastError() ;
00087     ErrorMessage( "Could not open dialog box", dw ) ;
00088     return -1 ;
00089   }
00090   else
00091     return 0 ;
00092 }
00093
00094 extern "C"
00095 BOOL EXPORT CALLBACK fnIDataObjectDlg( HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam )
00096 {
00097   CIDataObjectDlg * pIDOD =(CIDataObjectDlg *)GetWindowLongPtr( hDlg, DWLP_USER ) ;
00098
00099   switch (uiMsg)
00100   {
00101     case WM_INITDIALOG:
00102       pIDOD=(CIDataObjectDlg *)lParam ;
00103       if (pIDOD==NULL)
00104       {
00105         EndDialog( hDlg, 0 ) ;
00106         return TRUE ;
00107       }
00108       SetWindowLongPtr( hDlg, DWLP_USER, (LONG_PTR)pIDOD ) ;
00109       pIDOD->m_hDlg = hDlg ;
00110       return pIDOD->OnInitDialog() ;
00111     break ;
00112
00113     case WM_DESTROY:
00114       if (pIDOD)
00115         pIDOD->OnDestroy() ;
00116     break ;
00117
00118     case WM_SIZE:
00119       if (pIDOD)
00120         pIDOD->OnSize( (UINT)wParam, LOWORD( lParam ), HIWORD( lParam ) ) ;
00121     break ;
00122
00123     case WM_COMMAND:
00124     {
00125       WORD wNotifyCode = HIWORD(wParam);
00126       WORD wID = LOWORD(wParam);
00127
00128       switch (wID)
00129       {
00130         case IDCANCEL:
00131           EndDialog( hDlg, IDCANCEL ) ;
00132         break ;
00133
00134         case IDC_DOGETDATA:
00135           pIDOD->OnDoGetData() ;
00136         break ;
00137
00138         case IDC_SETUPADVISE:
00139           if (pIDOD->m_dwConn != 0)
00140             pIDOD->OnKillAdvise() ;
00141           else
00142             pIDOD->OnSetupAdvise() ;
00143         break ;
00144
00145         case IDC_CLEAROUTPUT:
00146           if (pIDOD)
00147           {
00148             pIDOD->m_cchOutput = 0 ;
00149             pIDOD->m_cLinesOutput = 0 ;
00150             if (pIDOD->m_MetaFile.hMF != NULL)
00151             {
00152               DeleteMetaFile( pIDOD->m_MetaFile.hMF ) ;
00153               pIDOD->m_MetaFile.hMF = NULL ;
00154             }
00155             SetWindowText( pIDOD->m_edtAdvise, _T("") ) ;
00156             InvalidateRect( pIDOD->m_edtAdvise, NULL, TRUE ) ;
00157             UpdateWindow( pIDOD->m_edtAdvise ) ;
00158           }
00159         break ;
00160
00161         case IDC_FORMATETC:
00162           if (wNotifyCode == LBN_SELCHANGE)
00163             pIDOD->OnSelChangeFormatEtc() ;
00164         break ;
00165
00166         case IDC_UPDATEDISPLAY:
00167           pIDOD->m_fUpdateDisplay = Button_GetCheck( pIDOD->m_chkUpdateDisplay ) ;
00168         break ;
00169
00170         case IDC_PRIMEFIRST:
00171           if (Button_GetCheck( pIDOD->m_chkPrimeFirst ))
00172             pIDOD->m_advf = ADVF_PRIMEFIRST ;
00173           else
00174             pIDOD->m_advf = ADVF_NODATA ;
00175         break ;
00176
00177         case IDC_ADVISEDATA:
00178           if (wNotifyCode == EN_ERRSPACE)
00179           {
00180             #ifdef _DEBUG
00181             OutputDebugString(_T("Output Edit Control reports EN_ERRSPACE\r\n")) ;
00182             #endif
00183           }
00184         break ;
00185       }
00186     }
00187     break ;
00188
00189     case WM_DRAWITEM:
00190       if (pIDOD)
00191         pIDOD->OnDrawItem( (int)wParam, (LPDRAWITEMSTRUCT)lParam ) ;
00192     break ;
00193
00194     case WM_MEASUREITEM:
00195       if (pIDOD)
00196         pIDOD->OnMeasureItem( (int)wParam, (LPMEASUREITEMSTRUCT)lParam ) ;
00197     break ;
00198
00199     case WM_OUTPUTBUFFERHASDATA:
00200       if (pIDOD)
00201         pIDOD->OnOutputBufferHasData() ;
00202     break ;
00203
00204     default:
00205        return FALSE ;
00206   }
00207   return TRUE ;
00208 }
00209
00210
00211 /////////////////////////////////////////////////////////////////////////////
00212 // CIDataObjectDlg message handlers
00213
00214 BOOL CIDataObjectDlg::OnInitDialog()
00215 {
00216   m_btnDoGetData = GetDlgItem( m_hDlg, IDC_DOGETDATA ) ;
00217   m_btnSetupAdvise = GetDlgItem( m_hDlg, IDC_SETUPADVISE ) ;
00218
00219   m_lbGetData = GetDlgItem( m_hDlg, IDC_GETDATA ) ;
00220   m_lbFmtEtc = GetDlgItem( m_hDlg, IDC_FORMATETC ) ;
00221
00222   m_edtAdvise = GetDlgItem( m_hDlg, IDC_ADVISEDATA ) ;
00223
00224   // Sublcass the edit so we can override it's WM_PAINT and
00225   // draw a metafile if we want to...
00226   if (g_pfnEdit == NULL)
00227     g_pfnEdit = SubclassWindow( m_edtAdvise, fnEditSubclass) ;
00228
00229   m_chkUpdateDisplay = GetDlgItem( m_hDlg, IDC_UPDATEDISPLAY );
00230   m_fUpdateDisplay = TRUE ;
00231   Button_SetCheck( m_chkUpdateDisplay, m_fUpdateDisplay ) ;
00232
00233   m_chkPrimeFirst = GetDlgItem( m_hDlg, IDC_PRIMEFIRST );
00234   Button_SetCheck( m_chkPrimeFirst, m_advf == ADVF_PRIMEFIRST ) ;
00235
00236   //m_chkDump = GetDlgItem( m_hDlg, IDC_DUMPTOFILE ) ;
00237   //EnableWindow( m_chkDump, FALSE ) ;
00238
00239   TEXTMETRIC  tm ;
00240   HDC hdc = GetDC(NULL);
00241   g_hFont = CreateFont( -8, 0, 0, 0, 0, 0,
00242         0, 0, ANSI_CHARSET, 0, 0, 0,
00243         FF_SWISS, _T("MS Sans Serif") ) ;
00244   g_hFontBold = CreateFont( -8, 0, 0, 0, 0, FW_BOLD,
00245         0, 0, ANSI_CHARSET, 0, 0, 0,
00246         FF_SWISS, _T("MS Sans Serif") ) ;
00247   HFONT hFont = (HFONT)SelectObject( hdc, g_hFont ) ;
00248   GetTextMetrics( hdc, &tm ) ;
00249   SelectObject( hdc, hFont ) ;
00250   ReleaseDC( NULL, hdc ) ;
00251   g_cyFont = tm.tmHeight + tm.tmExternalLeading ;
00252
00253   SetWindowFont( m_lbFmtEtc, g_hFont, TRUE ) ;
00254   SetWindowFont( m_lbGetData, g_hFont, TRUE ) ;
00255   SetWindowFont( m_edtAdvise, g_hFont, TRUE ) ;
00256
00257   DoIDataObject( 0, (LPDATAOBJECT)m_lpDO ) ;
00258
00259   DlgCenter( m_hDlg, m_hWndParent, FALSE ) ;
00260   RECT rc ;
00261   GetWindowRect( m_hDlg, &rc ) ;
00262   SetWindowPos( m_hDlg, NULL, rc.left, rc.top, rc.right - rc.left + 1,
00263           rc.bottom - rc.top +1, SWP_NOMOVE|SWP_NOZORDER | SWP_NOACTIVATE ) ;
00264
00265   //SetWindowText( m_hDlg, m_lpszName ) ;
00266
00267   return TRUE;  // return TRUE  unless you set the focus to a control
00268 }
00269
00270 void CIDataObjectDlg::OnDestroy()
00271 {
00272   OnKillAdvise() ;
00273
00274   if (g_pfnEdit != NULL && m_edtAdvise && IsWindow(m_edtAdvise))
00275   {
00276     SubclassWindow(m_edtAdvise, g_pfnEdit) ;
00277     g_pfnEdit = NULL ;
00278   }
00279
00280   int c = ListBox_GetCount( m_lbFmtEtc ) ;
00281   for (int i = 0 ; i < c ; i++)
00282   {
00283     LPITEMDATA lpID = (LPITEMDATA)ListBox_GetItemData( m_lbFmtEtc, i ) ;
00284     if (lpID)
00285     {
00286       if (lpID->uiType == I_COLUMNHEAD)
00287         delete lpID->rgCol ;
00288
00289       if (lpID->lpData != NULL)
00290         delete (LPFORMATETC)lpID->lpData ;
00291       delete lpID ;
00292     }
00293   }
00294
00295   if (g_hFont)
00296     DeleteObject( g_hFont );
00297
00298   if (g_hFontBold)
00299     DeleteObject (g_hFontBold) ;
00300 }
00301
00302 void CIDataObjectDlg::OnSize(UINT, int cx, int cy)
00303 {
00304   if (m_edtAdvise && !IsWindow( m_edtAdvise ) )
00305     return ;
00306
00307   RECT    rc ;
00308   RECT    rcWnd ;
00309   GetClientRect( m_hDlg, &rcWnd ) ;
00310   GetWindowRect( m_edtAdvise, &rc ) ;
00311   MapWindowPoints( NULL, m_hDlg, (POINT *)&rc, 2 ) ;
00312   SetWindowPos( m_edtAdvise, NULL, -1, rc.top, cx+2, cy - rc.top + 1,
00313         SWP_NOZORDER | SWP_NOACTIVATE ) ;
00314 }
00315
00316
00317 void CIDataObjectDlg::OnDrawItem(int, LPDRAWITEMSTRUCT lpDIS )
00318 {
00319   if (lpDIS->itemID == LB_ERR)
00320     return ;
00321
00322   LPITEMDATA      lpID ;
00323   COLORREF        rgbBack ;
00324   RECT            rcFocus ;
00325   BOOL            fSelected ;
00326   int             x, y, cy ;
00327   TCHAR           szItem[128] ;
00328   HFONT           hFont = 0;
00329
00330   lpID = (LPITEMDATA)lpDIS->itemData ;
00331   rcFocus = lpDIS->rcItem ;
00332   ListBox_GetText( m_lbFmtEtc, lpDIS->itemID, szItem ) ;
00333
00334   if (fSelected = (lpDIS->itemState & ODS_SELECTED) ? TRUE : FALSE)
00335   {
00336     SetTextColor( lpDIS->hDC, GetSysColor( COLOR_HIGHLIGHTTEXT ) ) ;
00337     SetBkColor( lpDIS->hDC, rgbBack = GetSysColor( COLOR_HIGHLIGHT ) ) ;
00338   }
00339   else
00340   {
00341     SetTextColor( lpDIS->hDC, GetSysColor( COLOR_WINDOWTEXT ) ) ;
00342     SetBkColor( lpDIS->hDC, rgbBack = GetSysColor( COLOR_WINDOW ) ) ;
00343   }
00344
00345   // if we are loosing focus, remove the focus rect before
00346   // drawing.
00347   //
00348   if ((lpDIS->itemAction) & (ODA_FOCUS))
00349     if (!((lpDIS->itemState) & (ODS_FOCUS)))
00350       DrawFocusRect( lpDIS->hDC, &rcFocus ) ;
00351
00352   y = lpDIS->rcItem.top ;
00353   x = lpDIS->rcItem.left ;
00354
00355   int cxChar = GetTextMetricsCorrectly( lpDIS->hDC, NULL ) ;
00356
00357   if (lpID && (lpID->uiType == I_COLUMNHEAD || lpID->uiType == I_LABEL))
00358     hFont = (HFONT)SelectObject( lpDIS->hDC, g_hFontBold ) ;
00359
00360   cy = (rcFocus.bottom - rcFocus.top - g_cyFont) / 2 ;
00361
00362   ExtTextOut( lpDIS->hDC, x+2, y + cy, ETO_OPAQUE, &lpDIS->rcItem, NULL, 0, NULL ) ;
00363   if (lpID)
00364     ColumnTextOut( lpDIS->hDC, x + 2 + ((cxChar*3) * lpID->nLevel), y + cy, szItem, lpID->cColumns, lpID->rgCol ) ;
00365
00366   if (lpID && lpID->uiType == I_COLUMNHEAD )
00367   {
00368     COLORREF    rgb ;
00369     RECT        rc = rcFocus ;
00370     rgb = SetBkColor( lpDIS->hDC, GetTextColor( lpDIS->hDC ) ) ;
00371     rc.top = rc.bottom - 1 ;
00372     rc.left = x + 2 + ((cxChar*3) * lpID->nLevel) ;
00373     ExtTextOut( lpDIS->hDC, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL ) ;
00374     SetBkColor( lpDIS->hDC, rgb ) ;
00375   }
00376
00377   if (lpID && (lpID->uiType == I_COLUMNHEAD || lpID->uiType == I_LABEL) && hFont)
00378     (HFONT)SelectObject( lpDIS->hDC, hFont ) ;
00379
00380   // if we are gaining focus draw the focus rect after drawing
00381   // the text.
00382   if ((lpDIS->itemAction) & (ODA_FOCUS))
00383     if ((lpDIS->itemState) & (ODS_FOCUS))
00384        DrawFocusRect( lpDIS->hDC, &rcFocus ) ;
00385
00386   if (fSelected)
00387   {
00388     SetTextColor( lpDIS->hDC, GetSysColor( COLOR_WINDOWTEXT ) ) ;
00389     SetBkColor( lpDIS->hDC, GetSysColor( COLOR_WINDOW ) ) ;
00390   }
00391
00392 }
00393
00394 void CIDataObjectDlg::OnMeasureItem(int, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00395 {
00396   lpMeasureItemStruct->itemHeight = g_cyFont ;
00397 }
00398
00399 void CIDataObjectDlg::OnDblClkFormatEtc()
00400 {
00401 }
00402
00403 void CIDataObjectDlg::OnSelChangeFormatEtc()
00404 {
00405
00406   if (m_MetaFile.hMF != NULL)
00407   {
00408     DeleteMetaFile( m_MetaFile.hMF ) ;
00409     m_MetaFile.hMF = NULL ;
00410   }
00411   InvalidateRect( m_edtAdvise, NULL, TRUE ) ;
00412   SetWindowText( m_edtAdvise, _T("") ) ;
00413
00414   int i = ListBox_GetCurSel( m_lbFmtEtc ) ;
00415   if (i != LB_ERR)
00416   {
00417     LPITEMDATA lpid = (LPITEMDATA)ListBox_GetItemData( m_lbFmtEtc, i ) ;
00418     if (lpid && lpid->lpData)
00419     {
00420       m_fetc = *(LPFORMATETC)lpid->lpData ;
00421       return ;
00422     }
00423   }
00424
00425   m_fetc.cfFormat = CF_TEXT ;
00426   m_fetc.dwAspect = DVASPECT_CONTENT ;
00427   m_fetc.ptd = NULL ;
00428   m_fetc.tymed = TYMED_HGLOBAL ;
00429   m_fetc.lindex = - 1 ;
00430 }
00431
00432
00433 void CIDataObjectDlg::OnDoGetData()
00434 {
00435   HRESULT     hr ;
00436   STGMEDIUM   stm ;
00437   TCHAR       szBuf[256] ;
00438
00439   if (m_lpDO == NULL)
00440   {
00441     ListBox_AddString( m_lbGetData, _T( "IDataObject viewer internal error: m_lpDO == NULL" ) ) ;
00442     return ;
00443   }
00444
00445   _stprintf_s( szBuf, 256, _T( "Calling GetData for %s" ), (LPCTSTR)MyGetClipboardFormatName( m_fetc.cfFormat ) ) ;
00446   ListBox_AddString( m_lbGetData, szBuf ) ;
00447
00448   hr = m_lpDO->QueryGetData( &m_fetc ) ;
00449   if (FAILED( hr ))
00450   {
00451     _stprintf_s( szBuf, 256, _T( "QueryGetData() failed:  %s" ),
00452           (LPTSTR)HRtoString( hr ) ) ;
00453     ListBox_AddString( m_lbGetData, szBuf ) ;
00454     return ;
00455   }
00456
00457   stm.tymed = m_fetc.tymed ;
00458   hr = m_lpDO->GetData( &m_fetc, &stm ) ;
00459   if (FAILED( hr ))
00460   {
00461     _stprintf_s( szBuf, 256, _T( "GetData() failed:  %s" ),
00462           (LPTSTR)HRtoString( hr ) ) ;
00463     ListBox_AddString( m_lbGetData, szBuf ) ;
00464     return ;
00465   }
00466
00467   if (FAILED( hr = GotData( &m_fetc, &stm ) ))
00468   {
00469     _stprintf_s( szBuf, 256, _T( "IDataDlg::GotData() failed:  %s" ),
00470           (LPTSTR)HRtoString( hr ) ) ;
00471     ListBox_AddString( m_lbGetData, szBuf ) ;
00472     return ;
00473   }
00474
00475   // If we're warm linked, then don't let the queue overfill.  Allow only one
00476   // message at a time.  This is similar to the way Excel handles it's DDE Links.
00477   //
00478   m_fDoOnGetDataPosted = FALSE ;
00479 }
00480
00481
00482 HRESULT CIDataObjectDlg::GotData( LPFORMATETC lpfetc, LPSTGMEDIUM lpstm )
00483 {
00484   HRESULT hr = NOERROR ;
00485   BOOL    fHandled = FALSE ;
00486
00487   if ((lpfetc->cfFormat == CF_TEXT  || lpfetc->cfFormat == CF_UNICODETEXT)
00488       && lpstm->tymed & TYMED_HGLOBAL)
00489   {
00490     LPTSTR lpsz = (LPTSTR)GlobalLock( lpstm->hGlobal ) ;
00491     if (lpsz == NULL)
00492     {
00493       ListBox_AddString( m_lbGetData, _T( "hGlobal returned by GetData is NULL!" ) ) ;
00494       ReleaseStgMedium( lpstm );
00495       return ResultFromScode( E_FAIL ) ;
00496     }
00497
00498     if (m_fUpdateDisplay == TRUE)
00499     {
00500     #ifndef _UNICODE
00501       if (lpfetc->cfFormat == CF_UNICODETEXT)
00502       {
00503         UINT n = (UINT)wcslen( (LPWSTR)lpsz ) ;
00504         TCHAR* sztemp = new TCHAR[n+1] ;
00505         wcstombs_s( NULL,sztemp, n,(LPWSTR)lpsz, n ) ;
00506         WriteToOutput( sztemp ) ;
00507         delete [] sztemp ;
00508       }
00509       else
00510         WriteToOutput( lpsz ) ;
00511     #else
00512       if (lpfetc->cfFormat == CF_TEXT)
00513       {
00514         UINT n = _mbstrlen( (LPCSTR)lpsz ) ;
00515         TCHAR* sztemp = new TCHAR[n+1] ;
00516         mbstowcs( sztemp, (LPSTR)lpsz, n ) ;
00517         WriteToOutput( sztemp ) ;
00518         delete [] sztemp ;
00519       }
00520       else
00521         WriteToOutput( lpsz ) ;
00522     #endif
00523     }
00524
00525     GlobalUnlock( lpstm->hGlobal ) ;
00526
00527     fHandled = TRUE ;
00528   }
00529
00530   if (lpfetc->cfFormat == CF_METAFILEPICT && lpstm->tymed & TYMED_MFPICT)
00531   {
00532     LPMETAFILEPICT pMF = (LPMETAFILEPICT)GlobalLock(lpstm->hGlobal) ;
00533     if (pMF)
00534     {
00535       if (m_MetaFile.hMF)
00536       {
00537         DeleteMetaFile( m_MetaFile.hMF ) ;
00538         m_MetaFile.hMF = NULL ;
00539       }
00540
00541       if (m_fUpdateDisplay)
00542       {
00543         m_MetaFile = *pMF ;
00544         m_MetaFile.hMF = CopyMetaFile( pMF->hMF, NULL ) ;
00545         InvalidateRect( m_edtAdvise, NULL, FALSE ) ;
00546       }
00547     }
00548     fHandled = TRUE ;
00549   }
00550
00551   m_cOnDataChanges++ ;
00552
00553   ReleaseStgMedium( lpstm );
00554
00555   if (fHandled == FALSE)
00556   {
00557     ListBox_AddString( m_lbGetData, _T( "The IDataObject viewer does not know how to decode this FORMATETC" ) ) ;
00558   }
00559
00560   return  hr;
00561 }
00562
00563 void CIDataObjectDlg::OnSetupAdvise()
00564 {
00565   TCHAR szBuf[128] ;
00566   OnKillAdvise() ;
00567
00568   m_pSink = new CImpIAdviseSink( this ) ;
00569
00570   if (m_pSink == NULL)
00571   {
00572     ListBox_AddString( m_lbGetData, _T( "CImpIAdviseSink constructor failed" ) ) ;
00573     return ;
00574   }
00575
00576   SetWindowText( m_btnSetupAdvise, _T( "&Kill Advise" ) ) ;
00577
00578   _stprintf_s( szBuf, 128, _T( "Advise started with a cfFormat of %s" ),
00579         (LPCTSTR)MyGetClipboardFormatName( m_fetc.cfFormat ) ) ;
00580   ListBox_AddString( m_lbGetData, szBuf ) ;
00581
00582   m_dwTime = GetTickCount() ;
00583   m_cOnDataChanges = 0 ;
00584
00585   HRESULT hr = m_lpDO->DAdvise( &m_fetc, m_advf, m_pSink, &m_dwConn ) ;
00586   if (FAILED( hr ))
00587   {
00588     _stprintf_s( szBuf, 128, _T( "DAdvise() failed:  %s" ), (LPTSTR)HRtoString( hr ) ) ;
00589     ListBox_AddString( m_lbGetData, szBuf ) ;
00590     SetWindowText( m_btnSetupAdvise, _T( "&DAdvise" ) ) ;
00591     return ;
00592   }
00593
00594 }
00595
00596 void CIDataObjectDlg::OnKillAdvise()
00597 {
00598   if (m_dwConn != 0)
00599   {
00600     TCHAR szBuf[128] ;
00601     DWORD dwTime = max( 1000, GetTickCount() - m_dwTime ) ;    // avoid div by zero
00602
00603     m_lpDO->DUnadvise( m_dwConn ) ;
00604     m_dwConn = 0 ;
00605     _stprintf_s( szBuf, 128, _T( "  Advise Killed after %lu milliseconds, and %lu OnDataChanges;" ), dwTime, m_cOnDataChanges ) ;
00606     ListBox_AddString( m_lbGetData, szBuf ) ;
00607     _stprintf_s( szBuf, 128, _T( "  That's %lu.%lu OnDataChange calls per second." ),
00608             m_cOnDataChanges / (dwTime / 1000L),
00609             m_cOnDataChanges % (dwTime / 1000L) ) ;
00610     ListBox_AddString( m_lbGetData, szBuf ) ;
00611   }
00612
00613   if (m_pSink != NULL)
00614   {
00615     m_pSink->Release() ;
00616     m_pSink = NULL ;
00617   }
00618
00619   SetWindowText( m_btnSetupAdvise, _T( "&DAdvise" ) ) ;
00620 }
00621
00622 // DoIDataObject
00623 //
00624 // This is where we start doing IDataObject dirty work.
00625 // This function calls pIDataObject->EnumFormatEtc twice, once
00626 // each for DATADIR_GET and DATADIR_SET, to get a pIEnumFORMATETC.
00627 //
00628 // We then call DoIEnumFormatEtc() with this pointer to actually
00629 // perform the enumaration.
00630 //
00631 BOOL CIDataObjectDlg::DoIDataObject( UINT nLevel, LPDATAOBJECT pIDataObject )
00632 {
00633   LPENUMFORMATETC pEFE = NULL ;
00634   HRESULT     hr1 ;
00635
00636   hr1 = pIDataObject->EnumFormatEtc( DATADIR_GET, &pEFE ) ;
00637   if (SUCCEEDED( hr1 ))
00638   {
00639     if (pEFE == NULL)
00640     {
00641       AfxMessageBox(_T("IDataObject::EnumFormatEtc returned success, but returned IEnumFORMATETC pointer is NULL.")) ;
00642       AddItem( nLevel, _T( "<<DATA_DIRGET failed>>" ), NULL, I_LABEL ) ;
00643       return FALSE ;
00644     }
00645
00646     DoIEnumFormatEtc( nLevel, pEFE ) ;
00647     pEFE->Release() ;
00648   }
00649   else
00650     AddItem( nLevel, _T( "<<DATA_DIRGET failed>>" ), NULL, I_LABEL ) ;
00651
00652   if (SUCCEEDED(hr1))
00653   {
00654     ListBox_SetCurSel( m_lbFmtEtc, 0 ) ;
00655     OnSelChangeFormatEtc() ;
00656   }
00657   return TRUE ;
00658 }
00659
00660 // This member takes a pointer to an IEnumFORMATETC and enumerates
00661 // the FORMATETC structures avaialbe, inserting them into our
00662 // listbox.
00663 //
00664 BOOL CIDataObjectDlg::DoIEnumFormatEtc( UINT nLevel, LPENUMFORMATETC pIFormatEtc )
00665 {
00666   LPCOLUMNSTRUCT  rgCol = new COLUMNSTRUCT[5] ;
00667   UINT    cxChar ;
00668   HDC     hdc  = GetDC( NULL) ;
00669
00670   // We use the "ColumnTextOut" code in util.c to create nice
00671   // columns in our list box.
00672   //
00673   HFONT hFont = (HFONT)SelectObject( hdc, g_hFontBold ) ;
00674   cxChar = GetTextMetricsCorrectly( hdc, NULL ) ;
00675   rgCol[0].nLeft = 0 ;
00676   rgCol[0].nRight = cxChar * lstrlen( _T( "CF_METAFILEPICT_" ) ) ;
00677   rgCol[0].uiFlags = DT_LEFT ;
00678
00679   rgCol[1].nLeft = rgCol[0].nRight + cxChar ;
00680   rgCol[1].nRight = rgCol[1].nLeft + cxChar * lstrlen( _T( "0000:0000_" ) ) ;
00681   rgCol[1].uiFlags = DT_LEFT ;
00682
00683   rgCol[2].nLeft = rgCol[1].nRight + cxChar ;
00684   rgCol[2].nRight = rgCol[2].nLeft + cxChar * lstrlen( _T( "THUMBNAIL_" ) ) ;
00685   rgCol[2].uiFlags = DT_LEFT ;
00686
00687   rgCol[3].nLeft = rgCol[2].nRight + cxChar ;
00688   rgCol[3].nRight = rgCol[3].nLeft + cxChar * lstrlen( _T( "0000:0000_" ) ) ;
00689   rgCol[3].uiFlags = DT_LEFT ;
00690
00691   rgCol[4].nLeft = rgCol[3].nRight + cxChar ;
00692   rgCol[4].nRight = rgCol[4].nLeft + cxChar * lstrlen( _T( "_HGLOBAL_" ) ) ;
00693   rgCol[4].uiFlags = DT_LEFT ;
00694
00695   (HFONT)SelectObject( hdc, hFont ) ;
00696   ReleaseDC( NULL, hdc ) ;
00697
00698   AddItem( nLevel, _T( "cfFormat\tptd\tdwAspect\tlindex\ttymed" ), NULL, I_COLUMNHEAD, 5, rgCol ) ;
00699   LPFORMATETC     pfetc ;
00700   FORMATETC       fetc ;
00701   TCHAR           sz[512] ;
00702   ULONG           ulFE ; // number returned
00703
00704   while (pIFormatEtc->Next( 1, &fetc, &ulFE ) == S_OK)
00705   {
00706     // now insert into list
00707     pfetc = new FORMATETC ;
00708     *pfetc = fetc ;
00709     _tcscpy_s( sz, 512, MyGetClipboardFormatName( (UINT)fetc.cfFormat ) ) ;
00710     _tcscat_s( sz, 512, _T("\t") ) ;
00711
00712     TCHAR szTemp[32] ;
00713     _stprintf_s( szTemp, 32, _T( "%04lX:%04lX\t" ), (DWORD)HIWORD( (DWORD_PTR)fetc.ptd ), (DWORD)LOWORD( (DWORD_PTR)fetc.ptd ) ) ;
00714     _tcscat_s( sz, 512, szTemp ) ;
00715
00716     switch( fetc.dwAspect )
00717     {
00718       case DVASPECT_CONTENT: _tcscat_s( sz, 512, _T( "CONTENT\t" ) ) ; break ;
00719       case DVASPECT_THUMBNAIL: _tcscat_s( sz, 512, _T( "THUMBNAIL\t" ) ) ; break ;
00720       case DVASPECT_ICON: _tcscat_s( sz, 512, _T( "ICON\t" ) ) ; break ;
00721       case DVASPECT_DOCPRINT: _tcscat_s( sz, 512, _T( "DOCPRINT\t" ) ) ; break ;
00722       default:
00723         _stprintf_s( szTemp, 32, _T( "%08lX\t" ), (DWORD)fetc.dwAspect ) ;
00724         _tcscat_s( sz, 512, szTemp ) ;
00725       break ;
00726     }
00727
00728     _stprintf_s( szTemp, 32, _T( "%04lX:%04lX\t" ), (DWORD)HIWORD( fetc.lindex ), (DWORD)LOWORD( fetc.lindex ) ) ;
00729     _tcscat_s( sz, 512, szTemp ) ;
00730
00731     switch( fetc.tymed )
00732     {
00733       case TYMED_HGLOBAL: _tcscat_s( sz, 512, _T( "HGLOBAL\t" ) ) ; break ;
00734       case TYMED_FILE: _tcscat_s( sz, 512, _T( "FILE\t" ) ) ; break ;
00735       case TYMED_ISTREAM: _tcscat_s( sz, 512, _T( "ISTREAM\t" ) ) ; break ;
00736       case TYMED_ISTORAGE: _tcscat_s( sz, 512, _T( "ISTORAGE\t" ) ) ; break ;
00737       case TYMED_GDI: _tcscat_s( sz, 512, _T( "GDI\t" ) ) ; break ;
00738       case TYMED_MFPICT: _tcscat_s( sz, 512, _T( "MFPICT\t" ) ) ; break ;
00739       case TYMED_NULL: _tcscat_s( sz, 512, _T( "NULL\t" ) ) ; break ;
00740       default:
00741         _stprintf_s( szTemp, 32, _T( "%08lX\t" ), (DWORD)fetc.tymed ) ;
00742         _tcscat_s( sz, 512, szTemp ) ;
00743       break ;
00744     }
00745
00746     AddItem( nLevel, sz,
00747          pfetc, I_COLUMNENTRY, 5, rgCol ) ;
00748   }
00749
00750   return TRUE ;
00751 }
00752
00753 LPCTSTR MyGetClipboardFormatName( UINT cf )
00754 {
00755   static TCHAR sz[256] ;
00756   switch( cf )
00757   {
00758
00759     case CF_UNICODETEXT: _tcscpy_s( sz, 256, _T( "CF_UNICODETEXT" ) ) ; break ;
00760     case CF_ENHMETAFILE: _tcscpy_s( sz, 256, _T( "CF_ENHMETAFILE" ) ) ; break ;
00761     case CF_TEXT: _tcscpy_s( sz, 256, _T( "CF_TEXT" ) ) ; break ;
00762     case CF_BITMAP: _tcscpy_s( sz, 256, _T( "CF_BITMAP" ) ) ; break ;
00763     case CF_METAFILEPICT: _tcscpy_s( sz, 256, _T( "CF_METAFILEPICT" ) ) ; break ;
00764     case CF_SYLK: _tcscpy_s( sz, 256, _T( "CF_SYLK" ) ) ; break ;
00765     case CF_DIF: _tcscpy_s( sz, 256, _T( "CF_DIF" ) ) ; break ;
00766     case CF_TIFF: _tcscpy_s( sz, 256, _T( "CF_TIFF" ) ) ; break ;
00767     case CF_OEMTEXT: _tcscpy_s( sz, 256, _T( "CF_OEMTEXT" ) ) ; break ;
00768     case CF_DIB: _tcscpy_s( sz, 256, _T( "CF_DIB" ) ) ; break ;
00769     case CF_PALETTE: _tcscpy_s( sz, 256, _T( "CF_PALETTE" ) ) ; break ;
00770     case CF_PENDATA: _tcscpy_s( sz, 256, _T( "CF_PENDATA" ) ) ; break ;
00771     case CF_RIFF: _tcscpy_s( sz, 256, _T( "CF_RIFF" ) ) ; break ;
00772     case CF_WAVE: _tcscpy_s( sz, 256, _T( "CF_WAVE" ) ) ; break ;
00773     case 0: _tcscpy_s( sz, 256, _T( "\"Wildcard Advise\"" ) ) ; break ;
00774     default:
00775       if (!GetClipboardFormatName( (UINT)cf, sz, 254 ))
00776         _stprintf_s( sz, 256, _T( "%#08lX" ), (DWORD)cf ) ;
00777     break ;
00778   }
00779
00780   return sz ;
00781 }
00782
00783
00784 UINT DBStrCpy(LPTSTR pszDst, LPCTSTR pszSrc, int far* pcLines) ;
00785
00786 BOOL  CIDataObjectDlg::WriteToOutput( LPTSTR lpsz )
00787 {
00788   UINT cch;
00789   int cLines;
00790
00791   cch = DBStrCpy(NULL, lpsz, &cLines);
00792
00793   if (cch > (CCHOUTPUTMAX - m_cchOutput))
00794   {
00795     MessageBeep(0);
00796     return FALSE;
00797   }
00798
00799   DBStrCpy(&m_szOutput[m_cchOutput], lpsz, NULL);
00800
00801   m_cchOutput += cch;
00802   m_cLinesOutput += cLines;
00803
00804   // If buffer was originally empty, wake up the main loop.
00805   //
00806   if (m_cchOutput == cch)
00807     PostMessage( m_hDlg, WM_OUTPUTBUFFERHASDATA, 0, 0L);
00808
00809   return TRUE;
00810 }
00811
00812 // This function performs a string copy (or string length if pszDst is NULL)
00813 // It also ensures the destination string is properly formatted for the
00814 // edit controls: line terminators must be CR followed by LF, in that orderc.
00815 // If pcLines != NULL, returns number of lines in the string in *pcLines
00816 //
00817 // (pulled from the dbwin sample)
00818 //
00819 UINT DBStrCpy(LPTSTR pszDst, LPCTSTR pszSrc, int far* pcLines)
00820 {
00821   TCHAR ch;
00822   UINT cch = 0;
00823   int cLines = 0;
00824
00825   while (ch = *pszSrc++)
00826   {
00827     // If we find a CR or LF, then store a CR/LF in
00828     // the output string.
00829     //
00830     if (ch == 0x0d || ch == 0x0a)
00831     {
00832       cch += 2;
00833       cLines++;
00834       if (pszDst)
00835       {
00836         *pszDst++ = 0x0d;
00837         *pszDst++ = 0x0a;
00838       }
00839
00840       // Skip any other CRs or LFs we find.
00841       //
00842       while ((ch = *pszSrc) && (ch == 0x0d || ch == 0x0a))
00843         ++pszSrc;
00844     }
00845     else
00846     {
00847       cch++;
00848       if (pszDst)
00849         *pszDst++ = ch;
00850     }
00851   }
00852   if (pszDst)
00853     *pszDst = 0;
00854
00855   if (pcLines)
00856     *pcLines = cLines;
00857
00858   return cch;
00859 }
00860
00861 // Whenever something happens that causes output, it calls the WriteToOutput function
00862 // which puts the data into a buffer (m_szOutput) and posts a message.  This is
00863 // the message handler.
00864 //
00865 void CIDataObjectDlg::OnOutputBufferHasData()
00866 {
00867   if (m_szOutput != NULL && m_cchOutput != 0)
00868   {
00869     int cLines = Edit_GetLineCount(m_edtAdvise) + m_cLinesOutput ;
00870
00871     if (cLines > CLINESMAX)
00872     {
00873       SetWindowRedraw( m_edtAdvise, FALSE ) ;
00874       // If the total # of lines is greater than our arbitrary max lines
00875       // remove some from the top.
00876       //
00877       Edit_SetSel( m_edtAdvise, 0, Edit_LineIndex( m_edtAdvise, cLines - CLINESMAX));
00878       Edit_ReplaceSel( m_edtAdvise, _T(""));
00879     }
00880
00881     // Put current output buffer at the end of the edit control
00882     //
00883     Edit_SetSel( m_edtAdvise, (UINT)-1, (UINT)-1 )  ;   // select the end
00884     Edit_ReplaceSel( m_edtAdvise, m_szOutput ) ;
00885     Edit_SetSel( m_edtAdvise, (UINT)-1, (UINT)-1 )  ;   // select the end
00886
00887     if (cLines > CLINESMAX)
00888       SetWindowRedraw( m_edtAdvise, TRUE ) ;
00889
00890     // Reset the output buffer
00891     m_cLinesOutput = 0 ;
00892     m_cchOutput = 0 ;
00893   }
00894 }
00895
00896
00897 // AddItem does a ListBox_AddString() plus a ListBox_SetItemData().  The
00898 // item data that is set tells our owner-draw code what 'level' this
00899 // item is at (indentation) and whether it is a label (bold), column
00900 // head (column info is stored), or column entry (no column info is
00901 // stored, but previous column head is used in WM_DRAWITEM).
00902 //
00903 int CIDataObjectDlg::AddItem( UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType, int cColumns, LPCOLUMNSTRUCT  rgCol )
00904 {
00905   int i ;
00906   LPITEMDATA      lpID ;
00907
00908   i = ListBox_AddString( m_lbFmtEtc,  sz ) ;
00909   lpID = new ITEMDATA ;
00910   lpID->uiType = uiType ;
00911   lpID->cColumns = cColumns ;
00912   lpID->rgCol = rgCol ;
00913   lpID->nLevel = nLevel ;
00914   lpID->lpData = lpData ;
00915   ListBox_SetItemData( m_lbFmtEtc, i, (DWORD_PTR)lpID ) ;
00916   return i ;
00917 }
00918
00919 int CIDataObjectDlg::AddItem( UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType )
00920 {
00921   return AddItem( nLevel, sz, lpData, uiType, 0, NULL ) ;
00922 }
00923
00924 int CIDataObjectDlg::AddItem( UINT nLevel, LPTSTR sz, LPVOID lpData )
00925 {
00926   return AddItem( nLevel, sz, lpData, I_NORMAL, 0, NULL ) ;
00927 }
00928
00929 extern "C"
00930 LRESULT EXPORT CALLBACK fnEditSubclass( HWND hwnd, UINT uiMsg, WPARAM wP, LPARAM lP )
00931 {
00932   if (uiMsg == WM_PAINT)
00933   {
00934     HWND hwndParent = GetParent(hwnd) ;
00935     CIDataObjectDlg * pIDOD =(CIDataObjectDlg *)GetWindowLongPtr( hwndParent, DWLP_USER ) ;
00936     if (pIDOD && pIDOD->m_MetaFile.hMF != NULL)
00937     {
00938       PAINTSTRUCT ps ;
00939       BeginPaint( hwnd, &ps ) ;
00940
00941 /*
00942       if (pIDOD->m_MetaFile.mm == MM_ISOTROPIC || pIDOD->m_MetaFile.mm == MM_ANISOTROPIC)
00943       {
00944         if (pIDOD->m_MetaFile.xExt != 0 && pIDOD->m_MetaFile.yExt != 0)
00945         {
00946
00947         }
00948       }
00949       else
00950       {
00951         SetMapMode( ps.hdc, MM_ANISOTROPIC ) ;
00952         SetWindowOrg( ps.hdc, 0, 0 ) ;
00953         SetWindowExt( ps.hdc, pIDOD->m_MetaFile.xExt, pIDOD->m_MetaFile.yExt ) ;
00954         SetViewportExt( ps.hdc, pIDOD->m_MetaFile.xExt, pIDOD->m_MetaFile.yExt ) ;
00955       }
00956 */
00957       PlayMetaFile( ps.hdc, pIDOD->m_MetaFile.hMF ) ;
00958
00959       EndPaint( hwnd, &ps ) ;
00960       return 0L ;
00961     }
00962   }
00963
00964   return CallWindowProc( g_pfnEdit, hwnd, uiMsg, wP, lP ) ;
00965 }
00966
00967 /****************************************************************
00968  *
00969  *  Description:
00970  *
00971  *    The ColumntTextOut function writes a character string at
00972  *    the specified location, using tabs to identify column breaks.  Each
00973  *    column is aligned according to the array of COLUMNSTRUCTs.
00974  *
00975  *    A COLUMNSTRUCT looks like this:
00976  *
00977  *    {
00978  *       int   nLeft ;       // starting x position of the column
00979  *       int   nRight ;      // ending x position of the column
00980  *       UINT  uiFlags ;      // format flags
00981  *    }
00982  *
00983  *    If a column has another column to the left of it, it's nLeft member
00984  *    is ignored.
00985  *
00986  *    uiFlags can be any of the following:
00987  *
00988  *          #define DT_LEFT      0x0000
00989  *          #define DT_CENTER    0x0001
00990  *          #define DT_RIGHT     0x0002
00991  *
00992  *  Comments:
00993  *
00994  ****************************************************************/
00995 void WINAPI ColumnTextOut( HDC hdc, int nX, int nY, LPTSTR lpszIN,
00996               int cColumns, LPCOLUMNSTRUCT rgColumns )
00997 {
00998
00999 #define ETOFLAGS ETO_CLIPPED
01000
01001   COLUMNSTRUCT   CS ;              // local copy for speed
01002   RECT           rc ;              // current cell rect
01003   unsigned int   cIteration = 0 ;  // what column
01004   LPTSTR         lpNext ;          // next string (current is lpsz)
01005   int            cch ;             // count of chars in current string
01006   SIZE           size ;            // extent of current string
01007   int            dx ;              // column width
01008
01009   rc.left = nX ;
01010   rc.top = nY ;
01011   rc.right = 0 ;
01012
01013   if (rgColumns == NULL || cColumns <= 1)
01014   {
01015     int Tab = 15 ;
01016     TabbedTextOut( hdc, nX, nY, lpszIN, lstrlen(lpszIN), 1, &Tab, nX ) ;
01017     return ;
01018   }
01019
01020   // For each sub string (bracketed by a tab)
01021   //
01022   LPTSTR lpsz = lpszIN ;
01023   while (*lpsz)
01024   {
01025     if (cIteration >= (unsigned int)cColumns)
01026       return ;
01027
01028     for (cch = 0, lpNext = lpsz ;
01029        *lpNext != '\t' && *lpNext ;
01030        lpNext++, cch++)
01031       ;
01032
01033     CS = rgColumns[cIteration] ;
01034
01035     // If it's the leftmost column use
01036     //
01037     if (cIteration == 0)
01038     {
01039       rc.left = nX + CS.nLeft ;
01040       rc.right = nX + CS.nRight ;
01041     }
01042     else
01043       rc.right = nX + CS.nRight ;
01044
01045     GetTextExtentPoint( hdc, lpsz, cch, &size ) ;
01046     rc.bottom = rc.top + size.cy ;
01047
01048     // If the width of the column is 0 do nothing
01049     //
01050     if ((dx = (rc.right - rc.left)) > 0)
01051     {
01052       switch(CS.uiFlags)
01053       {
01054         case DT_CENTER:
01055           ExtTextOut( hdc, rc.left + ((dx - size.cx) / (int)2),
01056           rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
01057         break ;
01058
01059         case DT_RIGHT:
01060           // If it's right justified then make the left border 0
01061           //
01062           //rc.left = nX + rgColumns[0].nLeft ;
01063           ExtTextOut( hdc, rc.left + (dx - size.cx),
01064           rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
01065         break ;
01066
01067         case DT_LEFT:
01068         default:
01069           ExtTextOut( hdc, rc.left, rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
01070         break ;
01071       }
01072     }
01073     rc.left = rc.right ;
01074     cIteration++ ;
01075     lpsz = lpNext + 1 ;
01076   }
01077
01078 } // ColumnTextOut()
01079
01080
01081 /*************************************************************************
01082  *  void WINAPI
01083  *  DlgCenter( HWND hwndCenter, HWND hwndWithin, BOOL fClient )
01084  *
01085  *  Description:
01086  *
01087  *    Centers a window within another window.
01088  *
01089  *  Type/Parameter
01090  *          Description
01091  *
01092  *    HWND  hwndCenter
01093  *          Window to center.  This does not have to be a child of
01094  *          hwndWithin.
01095  *
01096  *    HWND  hwndWithin
01097  *          Window to center the above window within.  Can be NULL.
01098  *
01099  *    BOOL  fClient
01100  *          If TRUE the window is centered within the available client
01101  *          area.  Otherwise it's centered within the entire window area.
01102  *
01103  *  Comments:
01104  *
01105  *************************************************************************/
01106 void WINAPI
01107 DlgCenter( HWND hwndCenter, HWND hwndWithin, BOOL fClient )
01108 {
01109    RECT rcWithin ;
01110    RECT rcCenter ;
01111    int   x, y ;
01112    int   dxCenter, dyCenter ;
01113    int   dxScreen, dyScreen ;
01114
01115    dxScreen = GetSystemMetrics( SM_CXSCREEN ) ;
01116    dyScreen = GetSystemMetrics( SM_CYSCREEN ) ;
01117
01118    if (!IsWindow(hwndCenter))
01119     return ;
01120
01121    if (hwndWithin && !IsWindow(hwndWithin))
01122     return ;
01123
01124    if (hwndWithin == NULL)
01125    {
01126     rcWithin.left = rcWithin.top = 0 ;
01127     rcWithin.right = dxScreen ;
01128     rcWithin.bottom = dyScreen ;
01129    }
01130    else
01131    {
01132     if (fClient)
01133     {
01134      /*
01135       * First get screen coords of rectangle we're going to be
01136       * centered within.
01137       */
01138      GetClientRect( hwndWithin, (LPRECT)&rcWithin ) ;
01139      ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.left ) ;
01140      ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.right ) ;
01141     }
01142     else
01143      GetWindowRect( hwndWithin, (LPRECT)&rcWithin ) ;
01144    }
01145
01146    GetWindowRect( hwndCenter, (LPRECT)&rcCenter ) ;
01147    dxCenter = rcCenter.right - rcCenter.left ;
01148    dyCenter = rcCenter.bottom - rcCenter.top ;
01149
01150    /*
01151   * Now we have both the within and center rects in screen coords.
01152   *
01153   * SetWindowPos behaves differently for Non child windows
01154   * than for child windows.  For popups it's coordinates
01155   * are relative to the upper left corner of the screen.  For
01156   * children it's coords are relative to the upper left corner
01157   * of the client area of the parent.
01158   */
01159    x = ((rcWithin.right - rcWithin.left) - dxCenter) / 2 ;
01160    y = ((rcWithin.bottom - rcWithin.top) - dyCenter) / 2 ;
01161
01162    if (hwndWithin == GetParent( hwndCenter ) &&
01163      !(GetWindowLong( hwndCenter, GWL_STYLE ) & WS_CHILD ))
01164    {
01165     x += rcWithin.left ;
01166     y += rcWithin.top ;
01167
01168     if (x + dxCenter > dxScreen )
01169      x = dxScreen - dxCenter ;
01170
01171     if (y + dyCenter > dyScreen )
01172      y = dyScreen - dyCenter ;
01173
01174     SetWindowPos( hwndCenter, NULL,
01175           max(x,0),
01176           max(y,0),
01177           0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;
01178
01179     return ;
01180    }
01181
01182    SetWindowPos( hwndCenter, NULL,
01183          max(x,0),
01184          max(y,0),
01185          0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;
01186
01187    return ;
01188
01189 }/* DlgCenter() */
01190
01191 /****************************************************************
01192  *  int WINAPI
01193  *    GetTextMetricsCorrectly( HDC hDC, LPTEXTMETRIC lpTextMetrics )
01194  *
01195  *  Description:
01196  *
01197  *    This function gets the textmetrics of the font currently
01198  *    selected into the hDC.  It returns the average char width as
01199  *    the return value.
01200  *
01201  *    This function computes the average character width correctly
01202  *    by using GetTextExtent() on the string "abc...xzyABC...XYZ"
01203  *    which works out much better for proportional fonts.
01204  *
01205  *    Note that this function returns the same TEXTMETRIC
01206  *    values that GetTextMetrics() does, it simply has a different
01207  *    return value.
01208  *
01209  *  Comments:
01210  *
01211  ****************************************************************/
01212 int WINAPI
01213    GetTextMetricsCorrectly( HDC hDC, LPTEXTMETRIC lpTM )
01214 {
01215    int    nAveWidth ;
01216    TCHAR  rgchAlphabet[52] ;
01217    int  i ;
01218    SIZE size ;
01219
01220    // Get the TM of the current font.  Note that GetTextMetrics
01221    // gets the incorrect AveCharWidth value for proportional fonts.
01222    // This is the whole poshort in this exercise.
01223    //
01224    if (lpTM)
01225   GetTextMetrics(hDC, lpTM);
01226
01227    // If it's not a variable pitch font GetTextMetrics was correct
01228    // so just return.
01229    //
01230    if (lpTM && !(lpTM->tmPitchAndFamily & FIXED_PITCH))
01231     return lpTM->tmAveCharWidth ;
01232    else
01233    {
01234     for ( i = 0 ; i <= 25 ; i++)
01235      rgchAlphabet[i] = (TCHAR)(i+(int)'a') ;
01236
01237     for ( i = 0 ; i<=25 ; i++)
01238      rgchAlphabet[i+25] = (TCHAR)(i+(int)'A') ;
01239
01240     GetTextExtentPoint( hDC, (LPTSTR)rgchAlphabet, 52, &size ) ;
01241     nAveWidth = size.cx / 26 ;
01242     nAveWidth = (nAveWidth + 1) / 2 ;
01243    }
01244
01245    // Return the calculated average char width
01246    //
01247    return nAveWidth ;
01248
01249 } /* GetTextMetricsCorrectly()  */
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CModelessShapePropSheet Member List

This is the complete list of members for CModelessShapePropSheet, including all inherited members.
CModelessShapePropSheet(CWnd *pWndParent) | CModelessShapePropSheet |
m_colorPage | CModelessShapePropSheet |
m_stylePage | CModelessShapePropSheet |
PostNcDestroy() | CModelessShapePropSheet | [virtual]
SetShapePropsFromSheet(CShape *pShape) | CModelessShapePropSheet |
SetSheetPropsFromShape(CShape *pShape) | CModelessShapePropSheet |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/setupdlg.h Source File

  • general
  • dlgtempl

setupdlg.h

Go to the documentation of this file.
00001 // dlgtempDlg.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CDlgtempDlg dialog
00015
00016 #ifndef INC_SETUPDLG_H
00017 #define INC_SETUPDLG_H
00018
00019 #include "itemtemp.h"
00020 class CDlgtempDlg : public CDialog
00021 {
00022 // Construction
00023 public:
00024   CDlgtempDlg(CWnd* pParent = NULL);  // standard constructor
00025
00026 // Dialog Data
00027   //{{AFX_DATA(CDlgtempDlg)
00028   enum { IDD = IDD_DLGTEMP_DIALOG };
00029   CString m_strCaption;
00030   UINT    m_x;
00031   UINT    m_y;
00032   UINT    m_nWidth;
00033   UINT    m_nHeight;
00034   int     m_nItem;
00035   CString m_strSelectedItem;
00036   //}}AFX_DATA
00037
00038   int     m_nActiveItem;
00039
00040   // ClassWizard generated virtual function overrides
00041   //{{AFX_VIRTUAL(CDlgtempDlg)
00042   protected:
00043   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00044   //}}AFX_VIRTUAL
00045
00046   CMyDialogTemplate   m_dlgTemplate;
00047 // Implementation
00048 protected:
00049   HICON m_hIcon;
00050
00051   void InfoToDialogHelper(int nItem, LPCTSTR lpszSelectedItem);
00052
00053   // Generated message map functions
00054   //{{AFX_MSG(CDlgtempDlg)
00055   virtual BOOL OnInitDialog();
00056   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00057   afx_msg void OnPaint();
00058   afx_msg void OnDemoIt();
00059   afx_msg void OnButtonInformation();
00060   afx_msg void OnStaticTextInformation();
00061   afx_msg void OnEditControlInformation();
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
00066 #endif
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSSE2Surface16Intrinsic Member List

This is the complete list of members for CSSE2Surface16Intrinsic, including all inherited members.
AdjustWidth(int *pWidth) | CSSE2Surface16Intrinsic | [virtual]
BlitBits() | CSurface |
BlurBits() | CSSE2Surface16Intrinsic | [virtual]
ClearBits() | CSurface |
Create(CWnd *pWnd, int nBitDepth) | CSurface |
CSurface() | CSurface | [inline]
Destroy() | CSurface |
GetBitDepth() const | CSurface | [inline]
GetByteDepth() const | CSurface | [inline]
GetImage() | CSurface | [inline]
GetPitch() const | CSurface | [inline]
GetPixelAddress(int x, int y) const | CSurface | [inline]
GetVisibleHeight() const | CSurface | [inline]
GetVisibleWidth() const | CSurface | [inline]
Import(const CImage &image) | CSurface |
IsNull() const | CSurface | [inline]
Line(const CPoint &p1, const CPoint &p2, COLORREF c) | CSurface |
m_kDeltaX | CSurface | [protected, static]
m_kDeltaY | CSurface | [protected, static]
m_qqwpl | CSSE2Surface16Intrinsic | [private]
m_width | CSSE2Surface16Intrinsic | [private]
OnCreated() | CSSE2Surface16Intrinsic | [protected, virtual]
PointColor(int x, int y, COLORREF c) | CSurface | [inline]
PointColor(int x, int y) const | CSurface | [inline]
RandomBits() | CSurface |
RandomLine(COLORREF c) | CSurface |
ShiftBits() | CSurface |
StripeBits() | CSurface |
~CSurface() | CSurface | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/PagerCtrlPage.h Source File

  • controls
  • cmnctrl

PagerCtrlPage.h

Go to the documentation of this file.
00001 #pragma once
00002 #include "afxwin.h"
00003 // CPagerCtrlPage dialog
00004
00005 class CPagerCtrlPage : public CPropertyPage
00006 {
00007   DECLARE_DYNAMIC(CPagerCtrlPage)
00008
00009 public:
00010   CPagerCtrlPage();
00011   virtual ~CPagerCtrlPage();
00012
00013 // Dialog Data
00014   enum { IDD = IDD_PAGER_CONTROL };
00015 public:
00016   virtual BOOL OnInitDialog();
00017
00018 protected:
00019   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00020
00021   DECLARE_MESSAGE_MAP()
00022
00023 public:
00024
00025   afx_msg void OnCbnSelchangeBackColor();
00026   afx_msg void OnBnClickedSetButtonSize();
00027   afx_msg void CPagerCtrlPage::OnCalcSize(NMHDR * pNotifyStruct, LRESULT * result);
00028   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00029
00030 private:
00031   CPagerCtrl m_pagerctrl;
00032   CToolBar m_toolbar;
00033   CComboBox m_comboColor;
00034   CSliderCtrl m_sliderBorderSize;
00035   CStatic m_staticBorderSize;
00036   int m_nSize;
00037 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/childfrm.cpp Source File

  • ole
  • acdual

childfrm.cpp

Go to the documentation of this file.
00001 // ChildFrm.cpp : implementation of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "ChildFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CChildFrame
00025
00026 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
00027
00028 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
00029   //{{AFX_MSG_MAP(CChildFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CChildFrame construction/destruction
00037
00038 CChildFrame::CChildFrame()
00039 {
00040   // TODO: add member initialization code here
00041
00042 }
00043
00044 CChildFrame::~CChildFrame()
00045 {
00046 }
00047
00048 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00049 {
00050   // TODO: Modify the Window class or styles here by modifying
00051   //  the CREATESTRUCT cs
00052
00053   return CMDIChildWnd::PreCreateWindow(cs);
00054 }
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CChildFrame diagnostics
00058
00059 #ifdef _DEBUG
00060 void CChildFrame::AssertValid() const
00061 {
00062   CMDIChildWnd::AssertValid();
00063 }
00064
00065 void CChildFrame::Dump(CDumpContext& dc) const
00066 {
00067   CMDIChildWnd::Dump(dc);
00068 }
00069
00070 #endif //_DEBUG
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/mainfrm.h Source File

  • ole
  • superpad

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 #ifndef __AFXEXT_H__
00015 #include <afxext.h>         // for access to CToolBar and CStatusBar
00016 #endif
00017
00018 class CMainFrame : public CMDIFrameWnd
00019 {
00020   DECLARE_DYNCREATE(CMainFrame)
00021 public:
00022   void InitialShowWindow(UINT nCmdShow);
00023
00024 protected:
00025   CStatusBar  m_wndStatusBar;
00026   CToolBar    m_wndToolBar;
00027
00028 protected:
00029   //{{AFX_MSG(CMainFrame)
00030   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00031   afx_msg void OnClose();
00032   //}}AFX_MSG
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/stdafx.cpp Source File

  • advanced
  • DllScreenCap
  • ScreenCap

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // ScreenCap.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
00013
00014
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.h Source File

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CVisualStudioDemoDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   CVisualStudioDemoDoc();
00016   DECLARE_DYNCREATE(CVisualStudioDemoDoc)
00017
00018 // Overrides
00019 public:
00020   virtual BOOL OnNewDocument();
00021   virtual void Serialize(CArchive& ar);
00022
00023 // Implementation
00024 public:
00025   virtual ~CVisualStudioDemoDoc();
00026 #ifdef _DEBUG
00027   virtual void AssertValid() const;
00028   virtual void Dump(CDumpContext& dc) const;
00029 #endif
00030
00031 protected:
00032   //{{AFX_MSG(CVisualStudioDemoDoc)
00033   afx_msg void OnDummySelectActiveConfiguration();
00034   afx_msg void OnDummyBuild();
00035   afx_msg void OnDummyCompile();
00036   afx_msg void OnDummyExecute();
00037   afx_msg void OnDummyGo();
00038   afx_msg void OnDummyRebuildAll();
00039   afx_msg void OnDummyRemoveAllBreakpoints();
00040   afx_msg void OnDummyClean();
00041   afx_msg void OnNewDialog();
00042   afx_msg void OnNewAccelerator();
00043   afx_msg void OnNewBitmap();
00044   afx_msg void OnNewCursor();
00045   afx_msg void OnNewIcon();
00046   afx_msg void OnNewMenu();
00047   afx_msg void OnNewStringTable();
00048   afx_msg void OnNewToolbar();
00049   afx_msg void OnNewVersion();
00050   //}}AFX_MSG
00051
00052   DECLARE_MESSAGE_MAP()
00053 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDriverDlg Member List

This is the complete list of members for CDriverDlg, including all inherited members.
CDriverDlg(CWnd *pParent=NULL) | CDriverDlg |
DoDataExchange(CDataExchange *pDX) | CDriverDlg | [protected, virtual]
IDD enum value | CDriverDlg |
m_calc | CDriverDlg |
m_editExpression | CDriverDlg |
m_stcAccum | CDriverDlg |
m_stcOperand | CDriverDlg |
m_stcOperator | CDriverDlg |
OnGo() | CDriverDlg | [protected]
OnInitDialog() | CDriverDlg | [protected, virtual]
OnRefresh() | CDriverDlg | [protected]
OnSingleStep() | CDriverDlg | [protected]
~CDriverDlg() | CDriverDlg | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/spintest.cpp Source File

  • general
  • ctrltest

spintest.cpp

Go to the documentation of this file.
00001 // spintest.cpp : New control example - Uses MicroScroll32
00002 //                custom control DLL from MuScrl32 sample
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "ctrltest.h"
00015
00016 #include "paredit.h"
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // Example of a dialog with special controls in it
00020
00021 #define NUM_EDIT        4
00022 #define IDC_EDIT_MIN    IDC_EDIT1
00023 #define IDC_BUTTON_MAX  IDC_BUTTON4
00024   // IDC_EDIT1->IDC_EDIT4 and IDC_BUTTON1->IDC_BUTTON4 must be contiguous
00025
00026 class CSpinEditDlg : public CDialog
00027 {
00028 protected:
00029   CParsedEdit edit[NUM_EDIT];
00030 public:
00031   //{{AFX_DATA(CSpinEditDlg)
00032     enum { IDD = IDD_SPIN_EDIT };
00033   //}}AFX_DATA
00034   CSpinEditDlg()
00035     : CDialog(CSpinEditDlg::IDD)
00036       { }
00037
00038   BOOL OnInitDialog();
00039   //{{AFX_MSG(CSpinEditDlg)
00040     virtual void OnOK();
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045 BEGIN_MESSAGE_MAP(CSpinEditDlg, CDialog)
00046   //{{AFX_MSG_MAP(CSpinEditDlg)
00047   //}}AFX_MSG_MAP
00048 END_MESSAGE_MAP()
00049
00050
00051 BOOL CSpinEditDlg::OnInitDialog()
00052 {
00053   int value = 1;
00054   for (int i = 0; i < NUM_EDIT; i++)
00055   {
00056     // associate button with edit item
00057     CSpinButtonCtrl* pSpin = (CSpinButtonCtrl*)GetDlgItem(IDC_BUTTON_MAX - i);
00058     ENSURE(pSpin != NULL);
00059
00060     // The default range for the spin button has the maximum set to zero (0)
00061     // and the minimum set to 100. Since the maximum value is less than the
00062     // minimum value, clicking the up arrow will decrease the position and
00063     // clicking the down arrow will increase it.
00064     // Call SetRange32 to set it from 0 to 100
00065
00066     pSpin->SetRange32(0,100);
00067     pSpin->SetPos(value++);     // 1, 2, 3, 4
00068   }
00069   return TRUE;
00070 }
00071
00072 void CSpinEditDlg::OnOK()
00073 {
00074   int values[NUM_EDIT];
00075   UINT nID = 0;
00076   BOOL bOk = TRUE;
00077   int i;
00078   for (i = 0; bOk && i < NUM_EDIT; i++)
00079   {
00080     nID = IDC_EDIT_MIN + i;
00081     values[i] = GetDlgItemInt(nID, &bOk);
00082   }
00083
00084   if (!bOk)
00085   {
00086     // report illegal value
00087     CString str;
00088     str.LoadString(IDS_ILLEGAL_VALUE);
00089     MessageBox(str);
00090     CEdit& badEdit = *(CEdit*)GetDlgItem(nID);
00091     badEdit.SetSel(0, -1);
00092     badEdit.SetFocus();
00093     return;     // don't end dialog
00094   }
00095
00096 #ifdef _DEBUG
00097   // dump results, normally you would do something with these
00098   TRACE0("Final values:\n");
00099   for (i = 0; i < NUM_EDIT; i++)
00100     TRACE1("\t%d\n", values[i]);
00101 #endif
00102   EndDialog(IDOK);
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // Run the test
00107
00108 void CTestWindow::OnTestSpinEdit()
00109 {
00110   TRACE0("running dialog with spin controls in it\n");
00111   CSpinEditDlg dlg;
00112   dlg.DoModal();
00113 }
00114
00115
00116 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/stdafx.cpp Source File

  • ole
  • oleview
  • iviewers

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and Microsoft
00008 // QuickHelp and/or WinHelp documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ddxm.cpp Source File

  • ole
  • wordpad

ddxm.cpp

Go to the documentation of this file.
00001 // ddxm.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ddxm.h"
00014 #include "wordpad.h"
00015 #include "resource.h"
00016
00017 // this routine prints a floatingpoint number with 2 digits after the decimal
00018 void PASCAL DDX_Twips(CDataExchange* pDX, int nIDC, int& value)
00019 {
00020   HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
00021   TCHAR szT[64];
00022
00023   if (pDX->m_bSaveAndValidate)
00024   {
00025     ::GetWindowText(hWndCtrl, szT, sizeof(szT));
00026     if (szT[0] != NULL) // not empty
00027     {
00028       if (!theApp.ParseMeasurement(szT, value))
00029       {
00030         AfxMessageBox(IDS_INVALID_MEASUREMENT,MB_OK|MB_ICONINFORMATION);
00031         pDX->Fail();            // throws exception
00032       }
00033       theApp.PrintTwips(szT, 64, value, 2);
00034       theApp.ParseMeasurement(szT, value);
00035     }
00036     else // empty
00037       value = INT_MAX;
00038   }
00039   else
00040   {
00041     // convert from twips to default units
00042     if (value != INT_MAX)
00043     {
00044       theApp.PrintTwips(szT, 64, value, 2);
00045       SetWindowText(hWndCtrl, szT);
00046     }
00047   }
00048 }
00049
00050 void PASCAL DDV_MinMaxTwips(CDataExchange* pDX, int value, int minVal, int maxVal)
00051 {
00052   ASSERT(minVal <= maxVal);
00053   if (value < minVal || value > maxVal)
00054   {
00055     // "The measurement must be between %1 and %2."
00056     if (!pDX->m_bSaveAndValidate)
00057     {
00058       TRACE0("Warning: initial dialog data is out of range.\n");
00059       return;     // don't stop now
00060     }
00061     TCHAR szMin[64];
00062     TCHAR szMax[64];
00063     theApp.PrintTwips(szMin, 64, minVal, 2);
00064     theApp.PrintTwips(szMax, 64, maxVal, 2);
00065     CString prompt;
00066     AfxFormatString2(prompt, IDS_MEASUREMENT_RANGE, szMin, szMax);
00067     AfxMessageBox(prompt, MB_ICONEXCLAMATION, AFX_IDS_APP_TITLE);
00068     prompt.Empty(); // exception prep
00069     pDX->Fail();
00070   }
00071 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoDoc.cpp Source File

  • vc2008fp
  • MDITabsDemo

MDITabsDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MDITabsDemo.h"
00013
00014 #include "MDITabsDemoDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMDITabsDemoDoc
00024
00025 IMPLEMENT_DYNCREATE(CMDITabsDemoDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CMDITabsDemoDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CMDITabsDemoDoc construction/destruction
00032
00033 CMDITabsDemoDoc::CMDITabsDemoDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CMDITabsDemoDoc::~CMDITabsDemoDoc()
00040 {
00041 }
00042
00043 BOOL CMDITabsDemoDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CMDITabsDemoDoc serialization
00058
00059 void CMDITabsDemoDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CMDITabsDemoDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CMDITabsDemoDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CMDITabsDemoDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CMDITabsDemoDoc commands
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht2.h Source File

  • general
  • propdlg

propsht2.h

Go to the documentation of this file.
00001 // propsht2.h : interface of the CModelessShapePropSheet class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CModelessShapePropSheet;
00013
00014 class CModelessShapePropSheet : public CPropertySheet
00015 {
00016 public:
00017   DECLARE_DYNAMIC(CModelessShapePropSheet)
00018   CModelessShapePropSheet(CWnd* pWndParent);
00019
00020 // Attributes
00021   CStylePage m_stylePage;
00022   CColorPage m_colorPage;
00023
00024 // Operations
00025   void SetSheetPropsFromShape(CShape* pShape);
00026   void SetShapePropsFromSheet(CShape* pShape);
00027
00028 // Overrides
00029   virtual void PostNcDestroy();
00030
00031 // Message Handlers
00032 protected:
00033   //{{AFX_MSG(CModelessShapePropSheet)
00034   //}}AFX_MSG
00035   DECLARE_MESSAGE_MAP()
00036 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSmartFuncDesc Member List

This is the complete list of members for CSmartFuncDesc, including all inherited members.
CSmartFuncDesc(ITypeInfo *pTypeInfo) | CSmartFuncDesc |
m_pFuncDesc | CSmartFuncDesc | [protected]
m_pTypeInfo | CSmartFuncDesc | [protected]
operator const FUNCDESC *() const | CSmartFuncDesc |
operator&() | CSmartFuncDesc |
operator->() | CSmartFuncDesc |
Release() | CSmartFuncDesc |
~CSmartFuncDesc() | CSmartFuncDesc |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHelpToolBar Member List

This is the complete list of members for CHelpToolBar, including all inherited members.
AllowShowOnList() const | CHelpToolBar | [inline, virtual]
OnUpdateCmdUI(CFrameWnd *, BOOL bDisableIfNoHndler) | CHelpToolBar | [inline, virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/DynamicHelpView.h Source File

  • vc2008fp
  • VisualStudioDemo

DynamicHelpView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CHelpToolBar : public CMFCToolBar
00013 {
00014 public:
00015   virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
00016   {
00017     CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
00018   }
00019
00020   virtual BOOL AllowShowOnList() const { return FALSE; }
00021 };
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CDynamicHelpVieBar window
00025
00026 class CDynamicHelpViewBar : public CDockablePane
00027 {
00028 // Construction
00029 public:
00030   CDynamicHelpViewBar();
00031
00032   void AdjustLayout();
00033
00034 // Attributes
00035 protected:
00036   CHelpToolBar m_wndToolBar;
00037   CTreeCtrl m_wndArticles;
00038   CImageList m_DynamicHelpImages;
00039
00040 // Operations
00041 public:
00042   void OnChangeVisualStyle();
00043
00044 protected:
00045   virtual void OnEraseWorkArea(CDC* pDC, CRect rectWorkArea);
00046   void FillHelp();
00047
00048 // Implementation
00049 public:
00050   virtual ~CDynamicHelpViewBar();
00051
00052 protected:
00053   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00054   afx_msg void OnSize(UINT nType, int cx, int cy);
00055   afx_msg void OnDhelp1();
00056   afx_msg void OnUpdateDhelp1(CCmdUI* pCmdUI);
00057   afx_msg void OnDhelp2();
00058   afx_msg void OnUpdateDhelp2(CCmdUI* pCmdUI);
00059   afx_msg void OnDhelp3();
00060   afx_msg void OnUpdateDhelp3(CCmdUI* pCmdUI);
00061   afx_msg void OnPaint();
00062   afx_msg void OnSetFocus(CWnd* pOldWnd);
00063   afx_msg void OnSelectTree(NMHDR* pNMHDR, LRESULT* pResult);
00064
00065   DECLARE_MESSAGE_MAP()
00066 };
00067
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/BindHost.Cpp Source File

  • ole
  • TstCon

BindHost.Cpp

Go to the documentation of this file.
00001 // File: BindHost.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 CTCBindHost::CTCBindHost() :
00020    m_nRefCount( 0 )
00021 {
00022 }
00023
00024 CTCBindHost::~CTCBindHost()
00025 {
00026 }
00027
00028 HRESULT CTCBindHost::CreateInstance( REFIID iid, void** ppObject )
00029 {
00030    CTCBindHost* pObject;
00031    HRESULT hResult;
00032
00033    if( ppObject == NULL )
00034    {
00035     return( E_POINTER );
00036    }
00037    *ppObject = NULL;
00038
00039 #pragma warning(push)
00040 #pragma warning(disable: 6014)
00041    /* prefast noise VSW 489981 */
00042    pObject = new CTCBindHost;
00043
00044    hResult = pObject->QueryInterface( iid, ppObject );
00045    if( FAILED( hResult ) )
00046    {
00047     delete pObject;
00048     return( hResult );
00049    }
00050
00051    ASSERT( *ppObject != NULL );
00052
00053    return( S_OK );
00054 #pragma warning(pop)
00055 }
00056
00057
00058 ///////////////////////////////////////////////////////////////////////////////
00059 // IUnknown
00060 ///////////////////////////////////////////////////////////////////////////////
00061
00062 STDMETHODIMP_( ULONG ) CTCBindHost::AddRef()
00063 {
00064    m_nRefCount++;
00065
00066    return( m_nRefCount );
00067 }
00068
00069 STDMETHODIMP_( ULONG ) CTCBindHost::Release()
00070 {
00071    m_nRefCount--;
00072
00073    if( m_nRefCount == 0 )
00074    {
00075     delete this;
00076     return( 0 );
00077    }
00078
00079    return( m_nRefCount );
00080 }
00081
00082 STDMETHODIMP CTCBindHost::QueryInterface( REFIID iid, void** ppInterface )
00083 {
00084    if( ppInterface == NULL )
00085    {
00086     return( E_POINTER );
00087    }
00088    *ppInterface = NULL;
00089
00090    if( IsEqualIID( iid, IID_IUnknown ) || IsEqualIID( iid, IID_IBindHost ) )
00091    {
00092     *ppInterface = (IBindHost*)this;
00093     AddRef();
00094     return( S_OK );
00095    }
00096
00097    return( E_NOINTERFACE );
00098 }
00099
00100
00101 ///////////////////////////////////////////////////////////////////////////////
00102 // IBindHost
00103 ///////////////////////////////////////////////////////////////////////////////
00104
00105 STDMETHODIMP CTCBindHost::CreateMoniker( LPOLESTR pszName, IBindCtx* pBindCtx,
00106    IMoniker** ppMoniker, DWORD dwReserved )
00107 {
00108    HRESULT hResult;
00109
00110    (void)pBindCtx;
00111    (void)dwReserved;
00112
00113    if( ppMoniker == NULL )
00114    {
00115     return( E_POINTER );
00116    }
00117    *ppMoniker = NULL;
00118
00119    if( pszName == NULL )
00120    {
00121     return( E_INVALIDARG );
00122    }
00123
00124    hResult = CreateURLMoniker( NULL, pszName, ppMoniker );
00125    if( FAILED( hResult ) )
00126    {
00127     return( hResult );
00128    }
00129
00130    ASSERT( *ppMoniker != NULL );
00131
00132    return( S_OK );
00133 }
00134
00135 STDMETHODIMP CTCBindHost::MonikerBindToObject( IMoniker* pMoniker,
00136    IBindCtx* pBindCtx, IBindStatusCallback* pBSC, REFIID iid, void** ppObject )
00137 {
00138    (void)pMoniker;
00139    (void)pBindCtx;
00140    (void)pBSC;
00141    (void)iid;
00142
00143    if( ppObject == NULL )
00144    {
00145     return( E_POINTER );
00146    }
00147    *ppObject = NULL;
00148
00149    return( E_NOTIMPL );
00150 }
00151
00152 STDMETHODIMP CTCBindHost::MonikerBindToStorage( IMoniker* pMoniker,
00153    IBindCtx* pBindCtx, IBindStatusCallback* pBSC, REFIID iid, void** ppObject )
00154 {
00155    HRESULT hResult;
00156    IBindCtxPtr pNewBindCtx;
00157
00158    TCTrace( TRACELEVEL_NORMAL, "IBindHost::MonikerBindToStorage\n" );
00159
00160    if( ppObject == NULL )
00161    {
00162     return( E_POINTER );
00163    }
00164    *ppObject = NULL;
00165
00166    if( pBindCtx != NULL )
00167    {
00168     pNewBindCtx = pBindCtx;
00169     if( pBSC )
00170     {
00171      hResult = RegisterBindStatusCallback( pBindCtx, pBSC, NULL, 0 );
00172      if( FAILED( hResult ) )
00173      {
00174       return( hResult );
00175      }
00176     }
00177    }
00178    else
00179    {
00180     if( pBSC )
00181     {
00182      hResult = CreateAsyncBindCtx( 0, pBSC, NULL, &pNewBindCtx );
00183      if( FAILED( hResult ) )
00184      {
00185       return( hResult );
00186      }
00187     }
00188     else
00189     {
00190      hResult = CreateBindCtx( 0, &pNewBindCtx );
00191      if( FAILED( hResult ) )
00192      {
00193       return( hResult );
00194      }
00195     }
00196    }
00197    ASSERT( pNewBindCtx != NULL );
00198
00199    return( pMoniker->BindToStorage( pNewBindCtx, NULL, iid, ppObject ) );
00200 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TimeLib::_DTimeEvents Member List

This is the complete list of members for TimeLib::_DTimeEvents, including all inherited members.
Timer() TimeLib::_DTimeEvents
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/stdafx.cpp Source File

  • advanced
  • mutexes

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  mutexes.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013 //
00014 // This sample application is derived from the Mutex application
00015 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00016 // (Microsoft Press).  See the book for more information about Win32
00017 // programming topics, including thread synchronization.
00018
00019 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/mainfrm.h Source File

  • vc2008fp
  • DrawClient

mainfrm.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 class CDrawView;
00013 #include "drawobj.h"
00014
00015 #define ID_FORMAT_CONTEXT_TAB 1
00016
00017 class CMainFrame : public CMDIFrameWndEx
00018 {
00019   DECLARE_DYNAMIC(CMainFrame)
00020 public:
00021   struct XStyle
00022   {
00023     COLORREF clrFill;
00024     COLORREF clrLine;
00025   };
00026
00027 public:
00028   CMainFrame();
00029
00030   // Attributes
00031 public:
00032   CMFCRibbonBar* GetRibbonBar() {return &m_wndRibbonBar;}
00033
00034   // Operations
00035 public:
00036   void UpdateUI(CDrawView* pCurrView);
00037   void UpdateContextTab(CDrawView* pCurrView);
00038   void UpdateContextTabFromObject(CDrawObjList& list);
00039
00040   COLORREF GetColorFromColorButton(int nButtonID);
00041   int GetWeightFromLineWeight(int nButtonID);
00042   BOOL GetStyleFromStyles(XStyle& style);
00043
00044   void SetRibbonContextCategory(UINT uiCategoryID);
00045   void ActivateRibbonContextCategory(UINT uiCategoryID);
00046
00047 // Implementation
00048 public:
00049   virtual ~CMainFrame();
00050 #ifdef _DEBUG
00051   virtual void AssertValid() const;
00052   virtual void Dump(CDumpContext& dc) const;
00053 #endif
00054
00055 protected:
00056   // control bar embedded members
00057   CMFCRibbonStatusBar m_wndStatusBar;
00058   CMFCRibbonBar m_wndRibbonBar;
00059   CMFCRibbonApplicationButton m_MainButton;
00060
00061   // panel images
00062   CMFCToolBarImages m_PanelImages;
00063
00064   // Document colors for demo:
00065   CList<COLORREF,COLORREF> m_lstMainColors;
00066   CList<COLORREF,COLORREF> m_lstAdditionalColors;
00067   CList<COLORREF,COLORREF> m_lstStandardColors;
00068
00069   // Generated message map functions
00070 protected:
00071   //{{AFX_MSG(CMainFrame)
00072   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00073   afx_msg void OnAppLook(UINT id);
00074   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00075   afx_msg void OnWindowManager();
00076   afx_msg void OnMdiMoveToNextGroup();
00077   afx_msg void OnMdiMoveToPrevGroup();
00078   afx_msg void OnMdiNewHorzTabGroup();
00079   afx_msg void OnMdiNewVertGroup();
00080   afx_msg void OnMdiCancel();
00081   afx_msg LRESULT OnRibbonCustomize(WPARAM wp, LPARAM lp);
00082   afx_msg LRESULT OnHighlightRibbonListItem(WPARAM wp, LPARAM lp);
00083   afx_msg void OnToolsOptions();
00084   afx_msg void OnDummy();
00085   //}}AFX_MSG
00086
00087   DECLARE_MESSAGE_MAP()
00088
00089   virtual BOOL OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop);
00090   virtual BOOL OnShowPopupMenu(CMFCPopupMenu* pMenuPopup);
00091
00092   void ShowOptions(int nPage);
00093   void CreateDocumentColors();
00094
00095 private:
00096   BOOL CreateRibbonBar();
00097   BOOL CreateStatusBar();
00098
00099   void InitMainButton();
00100   void InitHomeCategory();
00101   void InitViewCategory();
00102   void InitTabButtons();
00103
00104   void AddContextTab_Format();
00105
00106   void AdjustObjectSubmenu(CMFCPopupMenu* pMenuPopup);
00107   void UpdateStatusBarCountPane(int nID, CString strText, int nCount);
00108
00109   UINT m_nAppLook;
00110 };
00111
00112
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/DateTime.cpp Source File

  • general
  • CmnCtrl1

DateTime.cpp

Go to the documentation of this file.
00001 // DateTime.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "RESOURCE.H"
00014 #include "DateTime.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDateTimePage property page
00024
00025 IMPLEMENT_DYNCREATE(CDateTimePage, CPropertyPage)
00026
00027 CDateTimePage::CDateTimePage() : CPropertyPage(CDateTimePage::IDD)
00028 {
00029   //{{AFX_DATA_INIT(CDateTimePage)
00030   m_bAppCanParse = FALSE;
00031   m_bShowNone = FALSE;
00032   m_bUpDown = FALSE;
00033   //}}AFX_DATA_INIT
00034   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00035 }
00036
00037 CDateTimePage::~CDateTimePage()
00038 {
00039 }
00040
00041 void CDateTimePage::DoDataExchange(CDataExchange* pDX)
00042 {
00043   CPropertyPage::DoDataExchange(pDX);
00044   //{{AFX_DATA_MAP(CDateTimePage)
00045   DDX_Check(pDX, IDC_CKAPPCANPARSE, m_bAppCanParse);
00046   DDX_Check(pDX, IDC_CKSHOWNONE, m_bShowNone);
00047   DDX_Check(pDX, IDC_CKUPDOWN, m_bUpDown);
00048   //}}AFX_DATA_MAP
00049   DDX_Control(pDX,IDC_LBNOTIFY,m_lbNotifyList);
00050 }
00051
00052
00053 BEGIN_MESSAGE_MAP(CDateTimePage, CPropertyPage)
00054   //{{AFX_MSG_MAP(CDateTimePage)
00055   ON_BN_CLICKED(IDC_CKUPDOWN, OnCkupdown)
00056   ON_BN_CLICKED(IDC_CKTIMEFORMAT, OnCktimeformat)
00057   ON_BN_CLICKED(IDC_CKSHORTDATEFORMAT, OnCkshortdateformat)
00058   ON_BN_CLICKED(IDC_CKSHOWNONE, OnCkshownone)
00059   ON_BN_CLICKED(IDC_CKLONGDATEFORMAT, OnCklongdateformat)
00060   ON_BN_CLICKED(IDC_CKAPPCANPARSE, OnCkappcanparse)
00061   //}}AFX_MSG_MAP
00062   ON_NOTIFY(DTN_CLOSEUP,IDC_DATETIME, OnDTNotify)
00063   ON_NOTIFY(DTN_DATETIMECHANGE,IDC_DATETIME, OnDTNotify)
00064   ON_NOTIFY(DTN_DROPDOWN ,IDC_DATETIME, OnDTNotify)
00065   ON_NOTIFY(DTN_FORMAT,IDC_DATETIME, OnDTNotify)
00066   ON_NOTIFY(DTN_FORMATQUERY,IDC_DATETIME, OnDTNotify)
00067   ON_NOTIFY(DTN_USERSTRING,IDC_DATETIME, OnDTNotify)
00068   ON_NOTIFY(DTN_WMKEYDOWN ,IDC_DATETIME, OnDTNotify)
00069 END_MESSAGE_MAP()
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CDateTimePage message handlers
00073
00074 BOOL CDateTimePage::OnInitDialog()
00075 {
00076   CPropertyPage::OnInitDialog();
00077
00078   CWnd *pWnd = GetDlgItem(IDC_DTFRAME);
00079   CRect rc;
00080   if(!pWnd) return TRUE;
00081   pWnd->GetWindowRect(rc);
00082   pWnd->DestroyWindow(); //pWnd was just a placeholder;
00083   ScreenToClient(rc);
00084   m_DateTime.Create(WS_CHILD|WS_VISIBLE|DTS_SHORTDATEFORMAT,rc,this,IDC_DATETIME);
00085   m_nPrevStyle=DTS_SHORTDATEFORMAT;
00086   SetCheck(IDC_CKSHORTDATEFORMAT);
00087
00088
00089   return TRUE;
00090 }
00091
00092 void CDateTimePage::OnCkupdown()
00093 {
00094   UpdateData(TRUE);
00095
00096   if(m_bUpDown)
00097   {
00098     CRect rc;
00099     m_DateTime.GetWindowRect(rc);
00100     long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
00101     lStyle |= DTS_UPDOWN;
00102     m_DateTime.DestroyWindow();
00103     ScreenToClient(rc);
00104     m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
00105   }
00106   else
00107   {
00108     CRect rc;
00109     m_DateTime.GetWindowRect(rc);
00110     long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
00111     lStyle &= ~DTS_UPDOWN;
00112     m_DateTime.DestroyWindow();
00113     ScreenToClient(rc);
00114     m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
00115   }
00116
00117 }
00118
00119
00120
00121
00122
00123 void CDateTimePage::OnCkshownone()
00124 {
00125   UpdateData(TRUE);
00126   if(m_bShowNone)
00127   {
00128     CRect rc;
00129     m_DateTime.GetWindowRect(rc);
00130     long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
00131     lStyle |= DTS_SHOWNONE;
00132     m_DateTime.DestroyWindow();
00133     ScreenToClient(rc);
00134     m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
00135
00136   }
00137   else
00138   {
00139     CRect rc;
00140     m_DateTime.GetWindowRect(rc);
00141     long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
00142     lStyle &= ~DTS_SHOWNONE;
00143     m_DateTime.DestroyWindow();
00144     ScreenToClient(rc);
00145     m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
00146   }
00147
00148 }
00149
00150
00151
00152 void CDateTimePage::OnCkappcanparse()
00153 {
00154   UpdateData(TRUE);
00155   if(m_bAppCanParse)
00156   {
00157     CRect rc;
00158     m_DateTime.GetWindowRect(rc);
00159     long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
00160     lStyle |= DTS_APPCANPARSE;
00161     m_DateTime.DestroyWindow();
00162     ScreenToClient(rc);
00163     m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
00164   }
00165   else
00166   {
00167     CRect rc;
00168     m_DateTime.GetWindowRect(rc);
00169     long lStyle = ::GetWindowLong(m_DateTime.m_hWnd,GWL_STYLE);
00170     lStyle &= ~DTS_APPCANPARSE;
00171     m_DateTime.DestroyWindow();
00172     ScreenToClient(rc);
00173     m_DateTime.Create(lStyle,rc,this,IDC_DATETIME);
00174   }
00175
00176 }
00177
00178 void CDateTimePage::OnCkshortdateformat()
00179 {
00180   SetCheck(IDC_CKSHORTDATEFORMAT);
00181   //remove previous format style
00182   m_DateTime.ModifyStyle(m_nPrevStyle,0);
00183   //set this style
00184   m_DateTime.ModifyStyle(0,DTS_SHORTDATEFORMAT,SWP_NOSIZE);
00185   m_nPrevStyle=DTS_SHORTDATEFORMAT;
00186 }
00187 void CDateTimePage::OnCklongdateformat()
00188 {
00189   SetCheck(IDC_CKLONGDATEFORMAT);
00190
00191   //remove previous format style
00192   m_DateTime.ModifyStyle(m_nPrevStyle,0);
00193   //set this style
00194   m_DateTime.ModifyStyle(0,DTS_LONGDATEFORMAT,SWP_NOSIZE);
00195   m_nPrevStyle=DTS_LONGDATEFORMAT;
00196 }
00197 void CDateTimePage::OnCktimeformat()
00198 {
00199   SetCheck(IDC_CKTIMEFORMAT);
00200
00201   //remove previous format style
00202   m_DateTime.ModifyStyle(m_nPrevStyle,0);
00203   //set this style
00204   m_DateTime.ModifyStyle(0,DTS_TIMEFORMAT,SWP_NOSIZE);
00205   m_nPrevStyle=DTS_TIMEFORMAT;
00206 }
00207 void CDateTimePage::SetCheck(UINT idBtn)
00208 {
00209   static UINT buttons []={IDC_CKTIMEFORMAT,IDC_CKLONGDATEFORMAT,IDC_CKSHORTDATEFORMAT};
00210   CButton *pBtn=NULL;
00211   for(int i=0;i<3;i++)
00212   {
00213     pBtn = (CButton*)GetDlgItem(buttons[i]);
00214     if(!pBtn) continue;
00215
00216     if(buttons[i]==idBtn)
00217       pBtn->SetCheck(1);
00218     else
00219       pBtn->SetCheck(0);
00220   }
00221
00222 }
00223
00224 void CDateTimePage::OnDTNotify(NMHDR *pHdr, LRESULT * /*pRes*/)
00225 {
00226   switch( pHdr->code)
00227   {
00228   case DTN_CLOSEUP:
00229     m_lbNotifyList.AddString(_T("DTN_CLOSEUP"));
00230     break;
00231   case DTN_DATETIMECHANGE:
00232     m_lbNotifyList.AddString(_T("DTN_DATETIMECHANGE"));
00233     break;
00234   case DTN_DROPDOWN:
00235     m_lbNotifyList.AddString(_T("DTN_DROPDOWN"));
00236     break;
00237   case DTN_FORMAT:
00238     m_lbNotifyList.AddString(_T("DTN_FORMAT"));
00239     break;
00240   case DTN_FORMATQUERY:
00241     m_lbNotifyList.AddString(_T("DTN_FORMATQUERY"));
00242     break;
00243   case DTN_USERSTRING:
00244     m_lbNotifyList.AddString(_T("DTN_USERSTRING"));
00245     break;
00246   case DTN_WMKEYDOWN:
00247     m_lbNotifyList.AddString(_T("DTN_WMKEYDOWN"));
00248     break;
00249   }
00250
00251 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/bbutton.cpp Source File

  • general
  • ctrltest

bbutton.cpp

Go to the documentation of this file.
00001 // bbutton.cpp : bitmap button test
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // BitmapButton Test dialog #1
00017
00018 // In this example we pass the bitmap resource names to LoadBitmaps
00019 //  OnInitDialog is used to Subclass the buttons so the dialog
00020 //  controls get attached to the MFC WndProc for C++ message map dispatch.
00021
00022 class CBMTest1Dlg : public CDialog
00023 {
00024 protected:
00025   CBitmapButton button1, button2;
00026 public:
00027   //{{AFX_DATA(CBMTest1Dlg)
00028     enum { IDD = IDM_TEST_BITMAP_BUTTON1 };
00029   //}}AFX_DATA
00030   CBMTest1Dlg();
00031
00032   BOOL OnInitDialog();
00033   //{{AFX_MSG(CBMTest1Dlg)
00034   //}}AFX_MSG
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
00038 BEGIN_MESSAGE_MAP(CBMTest1Dlg, CDialog)
00039   //{{AFX_MSG_MAP(CBMTest1Dlg)
00040   //}}AFX_MSG_MAP
00041 END_MESSAGE_MAP()
00042
00043
00044 CBMTest1Dlg::CBMTest1Dlg()
00045   : CDialog(CBMTest1Dlg::IDD)
00046 {
00047   // NOTE: The obsolete MFC V1 CBitmapButton constructor with 3 arguments is
00048   //  replaced by a call to LoadBitmaps.
00049   if (!button1.LoadBitmaps(_T("Image1Up"), _T("Image1Down"), _T("Image1Focus")) ||
00050     !button2.LoadBitmaps(_T("Image2Up"), _T("Image2Down"), _T("Image2Focus")))
00051   {
00052     TRACE0("Failed to load bitmaps for buttons\n");
00053     AfxThrowResourceException();
00054   }
00055 }
00056
00057 BOOL CBMTest1Dlg::OnInitDialog()
00058 {
00059   // each dialog control has special bitmaps
00060   VERIFY(button1.SubclassDlgItem(IDOK, this));
00061   button1.SizeToContent();
00062   VERIFY(button2.SubclassDlgItem(IDCANCEL, this));
00063   button2.SizeToContent();
00064
00065   return TRUE;
00066 }
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // BitmapButton Test dialog #2
00070
00071 // In this example we use the CBitmapButton AutoLoad member function.
00072 //  Autoload uses the text/title of the button as the base resource name.
00073 //  For this trivial example the buttons are called "OK" and "CANCEL",
00074 //  which use the bitmaps "OKU", "OKD", "OKF", "CANCELU", "CANCELD"
00075 //  and "CANCELF" respectively for the up, down and focused images.
00076
00077 #define ID_BUTTON_MIN       IDOK
00078 #define N_BUTTONS   (IDCANCEL - ID_BUTTON_MIN + 1)
00079
00080 class CBMTest2Dlg : public CDialog
00081 {
00082 protected:
00083   // array of buttons constructed with no attached bitmap images
00084   CBitmapButton buttons[N_BUTTONS];
00085 public:
00086   //{{AFX_DATA(CBMTest2Dlg)
00087     enum { IDD = IDM_TEST_BITMAP_BUTTON2 };
00088   //}}AFX_DATA
00089   CBMTest2Dlg()
00090     : CDialog(CBMTest2Dlg::IDD)
00091     { }
00092
00093   BOOL OnInitDialog();
00094   //{{AFX_MSG(CBMTest2Dlg)
00095   //}}AFX_MSG
00096   DECLARE_MESSAGE_MAP()
00097 };
00098
00099 BEGIN_MESSAGE_MAP(CBMTest2Dlg, CDialog)
00100   //{{AFX_MSG_MAP(CBMTest2Dlg)
00101   //}}AFX_MSG_MAP
00102 END_MESSAGE_MAP()
00103
00104
00105 BOOL CBMTest2Dlg::OnInitDialog()
00106 {
00107   // load bitmaps for all the bitmap buttons (does SubclassButton as well)
00108   for (int i = 0; i < N_BUTTONS; i++)
00109     VERIFY(buttons[i].AutoLoad(ID_BUTTON_MIN + i, this));
00110   return TRUE;
00111 }
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // BitmapButton Test dialog #3
00115
00116 // This is an extension of test dialog 2 using AutoLoad using the disabled
00117 //   state with the "X" suffix.
00118 // Here we use bitmap buttons to select a number between 1 and 10.
00119 // The "PREV" and "NEXT" buttons change the number.  These buttons are
00120 //  disabled when the number hits the limits.
00121
00122 class CBMTest3Dlg : public CDialog
00123 {
00124 protected:
00125   // construct
00126   CBitmapButton okButton;
00127   CBitmapButton prevButton;
00128   CBitmapButton nextButton;
00129
00130 public:
00131   int m_nNumber;
00132   //{{AFX_DATA(CBMTest3Dlg)
00133     enum { IDD = IDM_TEST_BITMAP_BUTTON3 };
00134   //}}AFX_DATA
00135
00136   CBMTest3Dlg()
00137     : CDialog(CBMTest3Dlg::IDD)
00138     { }
00139
00140   BOOL OnInitDialog();
00141   void Update();
00142
00143   //{{AFX_MSG(CBMTest3Dlg)
00144   afx_msg void OnNextNumber();
00145   afx_msg void OnPrevNumber();
00146   //}}AFX_MSG
00147   DECLARE_MESSAGE_MAP()
00148 };
00149
00150 BOOL CBMTest3Dlg::OnInitDialog()
00151 {
00152   // load bitmaps for all the bitmap buttons (does SubclassButton as well)
00153   VERIFY(okButton.AutoLoad(IDOK, this));
00154   VERIFY(prevButton.AutoLoad(ID_PREV, this));
00155   VERIFY(nextButton.AutoLoad(ID_NEXT, this));
00156   Update();
00157   return TRUE;
00158 }
00159
00160 BEGIN_MESSAGE_MAP(CBMTest3Dlg, CDialog)
00161   //{{AFX_MSG_MAP(CBMTest3Dlg)
00162   ON_COMMAND(ID_PREV, OnPrevNumber)
00163   ON_COMMAND(ID_NEXT, OnNextNumber)
00164   //}}AFX_MSG_MAP
00165 END_MESSAGE_MAP()
00166
00167 void CBMTest3Dlg::OnPrevNumber()
00168 {
00169   m_nNumber--;
00170   Update();
00171 }
00172
00173 void CBMTest3Dlg::OnNextNumber()
00174 {
00175   m_nNumber++;
00176   Update();
00177 }
00178
00179 void CBMTest3Dlg::Update()
00180 {
00181   SetDlgItemInt(IDC_NUMBEROUT, m_nNumber);
00182   prevButton.EnableWindow(m_nNumber > 1);
00183   nextButton.EnableWindow(m_nNumber < 10);
00184   // move focus to active button
00185   if (!prevButton.IsWindowEnabled())
00186     nextButton.SetFocus();
00187   else if (!nextButton.IsWindowEnabled())
00188     prevButton.SetFocus();
00189 }
00190
00191 /////////////////////////////////////////////////////////////////////////////
00192 // Test driver routines
00193
00194 void CTestWindow::OnTestBitmapButton1()
00195 {
00196   CBMTest1Dlg dlg;
00197   dlg.DoModal();
00198 }
00199
00200 void CTestWindow::OnTestBitmapButton2()
00201 {
00202   CBMTest2Dlg dlg;
00203   dlg.DoModal();
00204 }
00205
00206 void CTestWindow::OnTestBitmapButton3()
00207 {
00208   CBMTest3Dlg dlg;
00209   dlg.m_nNumber = 5;
00210   dlg.DoModal();
00211
00212   CString strYouChose;
00213   strYouChose.LoadString(IDS_YOU_CHOSE);
00214   CString strMsg;
00215   strMsg.Format(strYouChose, dlg.m_nNumber);
00216   AfxMessageBox(strMsg);
00217 }
00218
00219 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpCtl.h Source File

  • controls
  • testhelp

ThelpCtl.h

Go to the documentation of this file.
00001 // ThelpCtl.h : Declaration of the CTesthelpCtrl OLE control class.
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CTesthelpCtrl : See ThelpCtl.cpp for implementation.
00014 class CTesthelpCtrl : public COleControl
00015 {
00016    DECLARE_DYNCREATE(CTesthelpCtrl)
00017
00018 // Constructor
00019 public:
00020
00021    void RelayEvent(UINT message, WPARAM wParam, LPARAM lParam);
00022    CToolTipCtrl m_ttip;
00023    LRESULT OnHelpCommand(UINT_PTR wParam, LONG_PTR lParam);
00024
00025    CTesthelpCtrl();
00026 // Overrides
00027
00028    // Drawing function
00029    virtual void OnDraw(
00030           CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00031
00032    // Persistence
00033    virtual void DoPropExchange(CPropExchange* pPX);
00034
00035    // Reset control state
00036    virtual void OnResetState();
00037
00038 // Implementation
00039 protected:
00040    ~CTesthelpCtrl();
00041
00042    DECLARE_OLECREATE_EX(CTesthelpCtrl)    // Class factory and guid
00043    DECLARE_OLETYPELIB(CTesthelpCtrl)      // GetTypeInfo
00044    DECLARE_PROPPAGEIDS(CTesthelpCtrl)     // Property page IDs
00045    DECLARE_OLECTLTYPE(CTesthelpCtrl)          // Type name and misc status
00046
00047 // Message maps
00048    //{{AFX_MSG(CTesthelpCtrl)
00049    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00050    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00051    afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00052    afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00053   //}}AFX_MSG
00054    DECLARE_MESSAGE_MAP()
00055
00056 // Dispatch maps
00057    //{{AFX_DISPATCH(CTesthelpCtrl)
00058   CString m_szName1;
00059   afx_msg void OnName1Changed();
00060   CString m_szName2;
00061   afx_msg void OnName2Changed();
00062   CString m_szName3;
00063   afx_msg void OnName3Changed();
00064   BOOL m_bUseMyHelp;
00065   afx_msg void OnUseMyHelpChanged();
00066   BOOL m_bShowToolTip;
00067   afx_msg void OnShowToolTipChanged();
00068   CString m_szToolTipText;
00069   afx_msg void OnToolTipTextChanged();
00070   short m_nUsePopupHelp;
00071   afx_msg void OnUsePopupHelpChanged();
00072   //}}AFX_DISPATCH
00073    DECLARE_DISPATCH_MAP()
00074
00075    afx_msg void AboutBox();
00076
00077 // Event maps
00078    //{{AFX_EVENT(CTesthelpCtrl)
00079   //}}AFX_EVENT
00080    DECLARE_EVENT_MAP()
00081
00082 // Dispatch and event IDs
00083 public:
00084    enum {
00085    //{{AFX_DISP_ID(CTesthelpCtrl)
00086   dispidName1 = 1L,
00087   dispidName2 = 2L,
00088   dispidName3 = 3L,
00089   dispidUseMyHelp = 4L,
00090   dispidShowToolTip = 5L,
00091   dispidToolTipText = 6L,
00092   dispidUsePopupHelp = 7L,
00093   //}}AFX_DISP_ID
00094    };
00095
00096
00097 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CViewExSplitWnd Member List

This is the complete list of members for CViewExSplitWnd, including all inherited members.
CViewExSplitWnd() | CViewExSplitWnd
GetActivePane(int *pRow=NULL, int *pCol=NULL) | CViewExSplitWnd
~CViewExSplitWnd() | CViewExSplitWnd
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CToolbarDateTimePickerApp Member List

This is the complete list of members for CToolbarDateTimePickerApp, including all inherited members.
CToolbarDateTimePickerApp() | CToolbarDateTimePickerApp |
ExitInstance() | CToolbarDateTimePickerApp | [virtual]
InitInstance() | CToolbarDateTimePickerApp | [virtual]
OnAppAbout() | CToolbarDateTimePickerApp |
PreLoadState() | CToolbarDateTimePickerApp | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CColorOptDlg Member List

This is the complete list of members for CColorOptDlg, including all inherited members.
CColorOptDlg(CDynaMenuDoc *pDoc, CWnd *pParent=NULL) | CColorOptDlg |
DoDataExchange(CDataExchange *pDX) | CColorOptDlg | [protected, virtual]
IDD enum value | CColorOptDlg |
m_pDoc | CColorOptDlg | [protected]
OnInitDialog() | CColorOptDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/MainFrm.cpp Source File

  • advanced
  • DllScreenCap
  • ScreenCap

MainFrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "ScreenCap.h"
00013 #include "MainFrm.h"
00014 #pragma comment(lib, "DllScreenCap.lib")
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNAMIC(CMainFrame, CFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00028   ON_WM_CREATE()
00029   ON_WM_SETFOCUS()
00030   ON_COMMAND(ID_FILE_CONFIGURESCREENCAPTURE, OnFileConfigureScreenCapture)
00031   ON_COMMAND(ID_FILE_SCREENCAPTURE, OnFileScreencapture)
00032 END_MESSAGE_MAP()
00033
00034 static UINT indicators[] =
00035 {
00036   ID_SEPARATOR,           // status line indicator
00037   ID_INDICATOR_CAPS,
00038   ID_INDICATOR_NUM,
00039   ID_INDICATOR_SCRL,
00040 };
00041
00042
00043 // CMainFrame construction/destruction
00044
00045 CMainFrame::CMainFrame()
00046 {
00047   memset(&m_CapData, 0, sizeof(CaptureData));
00048   m_CapData.bCaptureFullScreen = TRUE;
00049 }
00050
00051 CMainFrame::~CMainFrame()
00052 {
00053 }
00054
00055
00056 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00057 {
00058   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00059     return -1;
00060   // create a view to occupy the client area of the frame
00061   if (!m_wndView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
00062     CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
00063   {
00064     TRACE0("Failed to create view window\n");
00065     return -1;
00066   }
00067
00068   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00069     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00070     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00071   {
00072     TRACE0("Failed to create toolbar\n");
00073     return -1;      // fail to create
00074   }
00075
00076   if (!m_wndStatusBar.Create(this) ||
00077     !m_wndStatusBar.SetIndicators(indicators,
00078       sizeof(indicators)/sizeof(UINT)))
00079   {
00080     TRACE0("Failed to create status bar\n");
00081     return -1;      // fail to create
00082   }
00083   // TODO: Delete these three lines if you don't want the toolbar to be dockable
00084   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00085   EnableDocking(CBRS_ALIGN_ANY);
00086   DockControlBar(&m_wndToolBar);
00087
00088   return 0;
00089 }
00090
00091 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00092 {
00093   if( !CFrameWnd::PreCreateWindow(cs) )
00094     return FALSE;
00095
00096   cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
00097   cs.lpszClass = AfxRegisterWndClass(0);
00098   return TRUE;
00099 }
00100
00101
00102 // CMainFrame diagnostics
00103
00104 #ifdef _DEBUG
00105 void CMainFrame::AssertValid() const
00106 {
00107   CFrameWnd::AssertValid();
00108 }
00109
00110 void CMainFrame::Dump(CDumpContext& dc) const
00111 {
00112   CFrameWnd::Dump(dc);
00113 }
00114
00115 #endif //_DEBUG
00116
00117
00118 // CMainFrame message handlers
00119
00120 void CMainFrame::OnSetFocus(CWnd* /*pOldWnd*/)
00121 {
00122   // forward focus to the view window
00123   m_wndView.SetFocus();
00124 }
00125
00126 BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00127 {
00128   // let the view have first crack at the command
00129   if (m_wndView.OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
00130     return TRUE;
00131
00132   // otherwise, do default handling
00133   return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00134 }
00135
00136 void CMainFrame::OnFileConfigureScreenCapture(void)
00137 {
00138   ConfigureCapture(GetSafeHwnd(), &m_CapData);
00139 }
00140
00141 void CMainFrame::OnFileScreencapture(void)
00142 {
00143   CaptureScreen(&m_CapData);
00144   if (m_CapData.szCaptureFilename[0] != '\0') {
00145     // In a real application that had interest in the
00146     // actual image and not just a screen capture
00147     // we would want to pass the Bitmap/CImage back
00148     // and forth directly, but for screen capture
00149     // sample purposes, this works fine.
00150     CString strPathName(m_CapData.szCapturePath);
00151     if (strPathName.Right(1) != "\\")
00152       strPathName += '\\';
00153     strPathName += m_CapData.szCaptureFilename;
00154     m_wndView.SetImage(strPathName);
00155   }
00156 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/StdAfx.cpp Source File

  • general
  • spiro

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  spiro.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/Resource.h Source File

  • general
  • VariantUse

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by VariantUse.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_VARIANTUSE_DIALOG           102
00009 #define IDR_MAINFRAME                   128
00010 #define IDC_Basic                       1000
00011 #define IDC_Strings                     1001
00012 #define IDC_Date                        1002
00013 #define IDC_Currency                    1003
00014 #define IDC_MultiDimensionArray         1004
00015 #define IDC_SafeArray                   1005
00016 #define IDC_OleArray                    1006
00017
00018 // Next default values for new objects
00019 //
00020 #ifdef APSTUDIO_INVOKED
00021 #ifndef APSTUDIO_READONLY_SYMBOLS
00022 #define _APS_NEXT_RESOURCE_VALUE        129
00023 #define _APS_NEXT_COMMAND_VALUE         32771
00024 #define _APS_NEXT_CONTROL_VALUE         1001
00025 #define _APS_NEXT_SYMED_VALUE           101
00026 #endif
00027 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTCBindHost Member List

This is the complete list of members for CTCBindHost, including all inherited members.
CreateInstance(REFIID iid, void **ppObject) | CTCBindHost | [static]
CreateMoniker(LPOLESTR pszName, IBindCtx *pBindCtx, IMoniker **ppMoniker, DWORD dwReserved) | CTCBindHost |
CTCBindHost() | CTCBindHost |
m_nRefCount | CTCBindHost | [protected]
MonikerBindToObject(IMoniker *pMoniker, IBindCtx *pBindCtx, IBindStatusCallback *pBSC, REFIID iid, void **ppObject) | CTCBindHost |
MonikerBindToStorage(IMoniker *pMoniker, IBindCtx *pBindCtx, IBindStatusCallback *pBSC, REFIID iid, void **ppObject) | CTCBindHost |
QueryInterface(REFIID iid, void **ppInterface) | CTCBindHost |
STDMETHOD_(ULONG, AddRef)() | CTCBindHost |
STDMETHOD_(ULONG, Release)() | CTCBindHost |
~CTCBindHost() | CTCBindHost |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPDEVENT Member List

This is the complete list of members for tagPDEVENT, including all inherited members.
cbSize | tagPDEVENT
dwReserved | tagPDEVENT
fPen | tagPDEVENT
hwnd | tagPDEVENT
lExInfo | tagPDEVENT
lParam | tagPDEVENT
pt | tagPDEVENT
wm | tagPDEVENT
wParam | tagPDEVENT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varassoc.cpp Source File

  • ole
  • inproc

varassoc.cpp

Go to the documentation of this file.
00001 // varassoc.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "inproc.h"
00014 #include "varassoc.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CVariantAssoc
00023
00024 IMPLEMENT_DYNCREATE(CVariantAssoc, CCmdTarget)
00025
00026 CVariantAssoc::CVariantAssoc()
00027 {
00028   EnableAutomation();
00029
00030   // To keep the application running as long as an OLE automation
00031   //  object is active, the constructor calls AfxOleLockApp.
00032
00033   AfxOleLockApp();
00034 }
00035
00036 CVariantAssoc::~CVariantAssoc()
00037 {
00038   // To terminate the application when all objects created with
00039   //  with OLE automation, the destructor calls AfxOleUnlockApp.
00040
00041   AfxOleUnlockApp();
00042 }
00043
00044 void CVariantAssoc::OnFinalRelease()
00045 {
00046   // When the last reference for an automation object is released
00047   //  OnFinalRelease is called.  This implementation deletes the
00048   //  object.  Add additional cleanup required for your object before
00049   //  deleting it from memory.
00050
00051   delete this;
00052 }
00053
00054 BEGIN_MESSAGE_MAP(CVariantAssoc, CCmdTarget)
00055   //{{AFX_MSG_MAP(CVariantAssoc)
00056     // NOTE - the ClassWizard will add and remove mapping macros here.
00057   //}}AFX_MSG_MAP
00058 END_MESSAGE_MAP()
00059
00060 BEGIN_DISPATCH_MAP(CVariantAssoc, CCmdTarget)
00061   //{{AFX_DISPATCH_MAP(CVariantAssoc)
00062   DISP_PROPERTY_EX(CVariantAssoc, "Key", GetKey, SetNotSupported, VT_VARIANT)
00063   DISP_PROPERTY_EX(CVariantAssoc, "Value", GetValue, SetNotSupported, VT_VARIANT)
00064   //}}AFX_DISPATCH_MAP
00065 END_DISPATCH_MAP()
00066
00067 // {84E099E0-F9F6-11cd-8C3D-00AA004BB3B7}
00068 static const IID IID_IVariantAssoc = { 0x84e099e0, 0xf9f6, 0x11cd,
00069   { 0x8c, 0x3d, 0x0, 0xaa, 0x0, 0x4b, 0xb3, 0xb7 } };
00070
00071 // Note: we add support for IID_IVariantAssoc to support typesafe binding
00072 // from VBA.  This IID must match the GUID that is attached to the
00073 // dispinterface in the .ODL file.
00074
00075 BEGIN_INTERFACE_MAP(CVariantAssoc, CCmdTarget)
00076   INTERFACE_PART(CVariantAssoc, IID_IVariantAssoc, Dispatch)
00077 END_INTERFACE_MAP()
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CVariantAssoc message handlers
00081
00082 VARIANT CVariantAssoc::GetKey()
00083 {
00084   COleVariant varResult = m_varKey;
00085   return varResult.Detach();
00086 }
00087
00088 VARIANT CVariantAssoc::GetValue()
00089 {
00090   COleVariant varResult = m_varValue;
00091   return varResult.Detach();
00092 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMainFrame Member List

This is the complete list of members for CMainFrame, including all inherited members.
ActivateByTab() | CMainFrame |
ActivateFrame(int nCmdShow=-1) | CMainFrame | [virtual]
ActivateFrame(int nCmdShow=-1) | CMainFrame | [virtual]
ActivateRibbonContextCategory(UINT uiCategoryID) | CMainFrame |
ActivateRibbonContextCategory(UINT uiCategoryID) | CMainFrame |
Add_Category1() | CMainFrame | [protected]
Add_Category2() | CMainFrame | [protected]
Add_Category3() | CMainFrame | [protected]
Add_Category4() | CMainFrame | [protected]
Add_Category5() | CMainFrame | [protected]
Add_Category6() | CMainFrame | [protected]
Add_MainPanel() | CMainFrame | [protected]
Add_QAT() | CMainFrame | [protected]
AddContextTab_Chart() | CMainFrame | [protected]
AddContextTab_Format() | CMainFrame | [private]
AddContextTab_Picture() | CMainFrame | [protected]
AddContextTab_Table() | CMainFrame | [protected]
AddMainCategory() | CMainFrame | [protected]
AddPanelArrange(CMFCRibbonCategory *pCategory, UINT imageP, UINT imageS, UINT imageL) | CMainFrame | [protected]
AddTab_Developer() | CMainFrame | [protected]
AddTab_Home() | CMainFrame | [protected]
AddTab_Insert() | CMainFrame | [protected]
AddTab_Mailings() | CMainFrame | [protected]
AddTab_PageLayout() | CMainFrame | [protected]
AddTab_References() | CMainFrame | [protected]
AddTab_Review() | CMainFrame | [protected]
AddTab_View() | CMainFrame | [protected]
AddWorkSpace(const CString &strName, const int iIconIndex, const UINT uiCmd, CMFCOutlookBarPane &pane, const UINT uiNewCmdID, CImageList &images) | CMainFrame | [protected]
AdjustClientArea() | CMainFrame | [virtual]
AdjustColorsMenu(CMFCPopupMenu *pMenuPopup, UINT uiId) | CMainFrame | [protected]
AdjustDockingLayout(HDWP hdwp=NULL) | CMainFrame | [virtual]
AdjustObjectSubmenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [private]
AdjustObjectSubmenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected]
BuildFavoritesMenu(LPCTSTR pszPath, int nStartPos, CMenu *pMenu) | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
CMainFrame() | CMainFrame | [protected]
CMainFrame() | CMainFrame |
COle2ViewApp class | CMainFrame | [friend]
CreateCaptionBar() | CMainFrame | [protected]
CreateComboBox() | CMainFrame | [protected]
CreateDockingBars() | CMainFrame | [protected]
CreateDocumentColors() | CMainFrame | [protected]
CreateDocumentColors() | CMainFrame | [protected]
CreateDocumentColors() | CMainFrame | [protected]
CreateDocumentWindow(LPCTSTR lpcszDocName) | CMainFrame |
CreateDocumentWindow(LPCTSTR lpcszDocName, CObject *) | CMainFrame | [protected, virtual]
CreateDocumentWindow(LPCTSTR lpcszDocName, CObject *) | CMainFrame | [protected, virtual]
CreateDocumentWindow(LPCTSTR lpcszDocName, CObject *) | CMainFrame | [protected, virtual]
CreateDocumentWindow(LPCTSTR lpcszDocName, CObject *pObj) | CMainFrame | [protected, virtual]
CreateEditBar() | CMainFrame |
CreateFontsList() | CMainFrame | [protected]
CreateFormatBar() | CMainFrame | [protected]
CreateFormatBar() | CMainFrame | [protected]
CreateMenuBar() | CMainFrame | [protected]
CreateMessageBar() | CMainFrame | [protected]
CreateOutlookBar(CMFCOutlookBar &bar, UINT uiID, CMFCOutlookBarPane &pane1, CMFCOutlookBarPane &pane2, CShellTreeCtrl &tree, CCalendarBar &calendar, int nInitialWidth) | CMainFrame | [protected]
CreatePaletteBar() | CMainFrame |
CreateRibbonBar() | CMainFrame | [private]
CreateRibbonBar() | CMainFrame | [protected]
CreateRibbonBar() | CMainFrame | [protected]
CreateRulerBar() | CMainFrame | [protected]
CreateRulerBar() | CMainFrame | [protected]
CreateShortcutsBar() | CMainFrame | [protected]
CreateStatusBar() | CMainFrame |
CreateStatusBar() | CMainFrame | [protected]
CreateStatusBar() | CMainFrame | [private]
CreateStatusBar() | CMainFrame | [protected]
CreateStatusBar() | CMainFrame | [protected]
CreateStyleBar() | CMainFrame |
CreateStyleList() | CMainFrame | [protected]
CreateTaskPane() | CMainFrame | [protected]
CreateTaskPane() | CMainFrame | [protected]
CreateThemeList() | CMainFrame | [protected]
CreateToolBar() | CMainFrame |
CreateToolBar() | CMainFrame | [protected]
CreateToolBar() | CMainFrame | [protected]
CTasksPaneView class | CMainFrame | [friend]
DestroyWindow() | CMainFrame | [virtual]
DestroyWindow() | CMainFrame | [virtual]
DockControlBarLeftOf(CToolBar *Bar, CToolBar *LeftOf) | CMainFrame |
DoNothing() | CMainFrame | [protected]
FindFocusedOutlookWnd(CMFCOutlookBarTabCtrl **ppOutlookWnd) | CMainFrame | [protected]
FindInternalDivider(CDockablePane *pBar, CPaneContainer *&pContainer, CPaneDivider *&pDivider, BOOL &bLeftSlider, BOOL &bAloneInContainer) | CMainFrame | [private]
FindOutlookParent(CWnd *pWnd) | CMainFrame | [protected]
GetColorFromColorButton(int nButtonID) | CMainFrame |
GetCurrentView() | CMainFrame |
GetDocView() | CMainFrame |
GetFindCombo() | CMainFrame | [static]
GetFolders() | CMainFrame |
GetFontNameCombo() | CMainFrame |
GetFontSizeCombo() | CMainFrame |
GetIcon(int nDocType) | CMainFrame |
GetIcon(int nDocType) | CMainFrame |
GetLinksBar(UINT nID) | CMainFrame | [private]
GetMessageString(UINT nID, CString &rMessage) const | CMainFrame | [protected, virtual]
GetObjListView() | CMainFrame |
GetRibbonBar() | CMainFrame | [inline]
GetRibbonBar() | CMainFrame | [inline]
GetSliderPos(UINT nID) | CMainFrame | [protected]
GetSourceView() | CMainFrame |
GetStatusBar() | CMainFrame | [inline]
GetStyleFromStyles(XStyle &style) | CMainFrame |
GetToolbarButtonToolTipText(CMFCToolBarButton *pButton, CString &strTTText) | CMainFrame | [virtual]
GetTooltipImage(UINT uiID) | CMainFrame |
GetView() | CMainFrame | [inline]
GetWebView() | CMainFrame |
GetWeightFromLineWeight(int nButtonID) | CMainFrame |
HideModelessPropSheet() | CMainFrame |
InitBulletPalette(CMFCRibbonGallery *pPalette) | CMainFrame | [protected]
InitHomeCategory() | CMainFrame | [private]
InitialShowWindow(UINT nCmdShow) | CMainFrame |
InitMainButton() | CMainFrame | [private]
InitMultilevelPalette(CMFCRibbonGallery *pPalette) | CMainFrame | [protected]
InitNumberingPalette(CMFCRibbonGallery *pPalette) | CMainFrame | [protected]
InitPositionPalette(CMFCRibbonGallery *pPalette) | CMainFrame | [protected]
InitRibbon() | CMainFrame | [protected]
InitTabButtons() | CMainFrame | [private]
InitViewCategory() | CMainFrame | [private]
InitViews() | CMainFrame |
IsEditViewActive() | CMainFrame | [private]
IsFavoritesMenu(const CMFCToolBarMenuButton *pMenuButton) | CMainFrame |
IsOutlookBar2003() const | CMainFrame | [inline]
IsPrintPreviewMode() | CMainFrame |
LoadFrame(UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL) | CMainFrame | [virtual]
LoadFrame(UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL) | CMainFrame | [virtual]
LoadFrame(UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL) | CMainFrame | [virtual]
LoadFrame(UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL) | CMainFrame | [virtual]
LoadFrame(UINT nIDResource, DWORD dwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, CWnd *pParentWnd=NULL, CCreateContext *pContext=NULL) | CMainFrame | [virtual]
m_arColorThemes | CMainFrame | [protected]
m_arFonts | CMainFrame | [protected]
m_arStyles | CMainFrame | [protected]
m_arStyleSets | CMainFrame | [protected]
m_arThemes | CMainFrame | [protected]
m_astrFavoriteURLs | CMainFrame |
m_bCheckBox1 | CMainFrame | [protected]
m_bCheckBox2 | CMainFrame | [protected]
m_bCheckBox3 | CMainFrame | [protected]
m_bColor | CMainFrame |
m_bDialogTop | CMainFrame | [protected]
m_bInfiniteProgressMode | CMainFrame | [protected]
m_bInsert | CMainFrame |
m_bIsFullScreen | CMainFrame | [protected]
m_bIsHighColor | CMainFrame | [protected]
m_bMainToolbarMenu | CMainFrame | [protected]
m_bmpCaption | CMainFrame | [protected]
m_bmpStatus | CMainFrame | [protected]
m_bOutlookBar2003 | CMainFrame | [protected]
m_bToolTips | CMainFrame |
m_CapData | CMainFrame | [private]
m_dwCurrentView | CMainFrame | [private]
m_hIcon | CMainFrame | [protected]
m_hIconDoc | CMainFrame |
m_hIconText | CMainFrame |
m_hIconWrite | CMainFrame |
m_ImagesSmall | CMainFrame | [protected]
m_imlStatusAnimation | CMainFrame | [protected]
m_lstAdditionalColors | CMainFrame | [protected]
m_lstMainColors | CMainFrame | [protected]
m_lstStandardColors | CMainFrame | [protected]
m_lstWorkspaces | CMainFrame | [protected]
m_MainButton | CMainFrame | [protected]
m_MemBitmap | CMainFrame | [protected]
m_menuFavotites | CMainFrame |
m_nAppLook | CMainFrame | [private]
m_nCategorie | CMainFrame | [private]
m_nCurrentExample | CMainFrame |
m_nCurView | CMainFrame | [protected]
m_nPaletteCol | CMainFrame | [protected]
m_nPercentDone | CMainFrame | [protected]
m_nProgressValue | CMainFrame | [protected]
m_nProgressValue1 | CMainFrame | [protected]
m_nProgressValue2 | CMainFrame | [protected]
m_palette | CMainFrame |
m_PanelImages | CMainFrame | [protected]
m_Pat | CMainFrame | [protected]
m_pCurrOutlookPage | CMainFrame | [protected]
m_pCurrOutlookWnd | CMainFrame | [protected]
m_pCurrWorkSpace | CMainFrame | [protected]
m_pObjectView | CMainFrame |
m_pObjTreeView | CMainFrame |
m_pShapePropFrame | CMainFrame |
m_pSrcView | CMainFrame | [protected]
m_pViews | CMainFrame | [protected]
m_pWebView | CMainFrame | [private]
m_rectFill | CMainFrame | [protected]
m_rectSizing | CMainFrame | [protected]
m_StatusBar | CMainFrame | [private]
m_ToolBar | CMainFrame | [private]
m_TooltipImages | CMainFrame | [protected]
m_uiHilightedPage | CMainFrame | [protected]
m_UserImages | CMainFrame | [protected]
m_wndAddress | CMainFrame | [protected]
m_wndAddress | CMainFrame | [protected]
m_wndAnimate | CMainFrame | [protected]
m_wndBarOutlook | CMainFrame | [protected]
m_wndBarOutlook2003 | CMainFrame | [protected]
m_wndBrowseBar | CMainFrame | [protected]
m_wndCalendar | CMainFrame | [protected]
m_wndCalendar2003 | CMainFrame | [protected]
m_wndCaption | CMainFrame | [protected]
m_wndCaptionBar | CMainFrame | [private]
m_wndCaptionBar | CMainFrame | [protected]
m_wndCategoryBar | CMainFrame | [private]
m_wndClassView | CMainFrame | [protected]
m_wndDebugBar | CMainFrame | [protected]
m_wndDlgBar | CMainFrame | [protected]
m_wndDlgBar | CMainFrame | [protected]
m_wndDynamicHelpView | CMainFrame | [protected]
m_wndEditBar | CMainFrame | [protected]
m_wndEditBar | CMainFrame |
m_wndExplorerBar | CMainFrame | [protected]
m_wndFileView | CMainFrame | [protected]
m_wndFolderList | CMainFrame | [protected]
m_wndFoldersBar | CMainFrame | [protected]
m_wndFormatBar | CMainFrame |
m_wndInfoBar | CMainFrame | [protected]
m_wndLinksBar | CMainFrame | [protected]
m_wndLinksBars | CMainFrame | [private]
m_wndMacroBar | CMainFrame |
m_wndMainBar | CMainFrame | [protected]
m_wndMenuBar | CMainFrame | [protected]
m_wndMenuBar | CMainFrame | [protected]
m_wndMenuBar | CMainFrame | [private]
m_wndMessageBar | CMainFrame | [protected]
m_wndOutlookPane1 | CMainFrame | [protected]
m_wndOutlookPane12003 | CMainFrame | [protected]
m_wndOutlookPane2 | CMainFrame | [protected]
m_wndOutlookPane22003 | CMainFrame | [protected]
m_wndOutput | CMainFrame | [protected]
m_wndOutputView | CMainFrame | [protected]
m_wndPalette | CMainFrame | [protected]
m_wndPaletteBar | CMainFrame | [protected]
m_wndPropertiesBar | CMainFrame | [protected]
m_wndReBar | CMainFrame | [protected]
m_wndReBar | CMainFrame | [protected]
m_wndResourceBar | CMainFrame | [protected]
m_wndResourceView | CMainFrame | [protected]
m_wndRibbonBar | CMainFrame | [protected]
m_wndRulerBar | CMainFrame |
m_wndShortcutsBar | CMainFrame | [protected]
m_wndShortcutsPane1 | CMainFrame | [protected]
m_wndSizeToolBar | CMainFrame | [protected]
m_wndSplitter | CMainFrame |
m_wndSplitter | CMainFrame |
m_wndSplitter | CMainFrame | [protected]
m_wndStatusBar | CMainFrame | [protected]
m_wndStatusBar | CMainFrame | [protected]
m_wndStatusBar | CMainFrame | [protected]
m_wndStyleBar | CMainFrame | [protected]
m_wndTaskPane | CMainFrame | [private]
m_wndTaskPane | CMainFrame | [protected]
m_wndToolBar | CMainFrame | [protected]
m_wndToolBar | CMainFrame |
m_wndToolBar | CMainFrame | [protected]
m_wndToolBar | CMainFrame | [private]
m_wndToolBarAdvanced | CMainFrame | [protected]
m_wndToolbarBuild | CMainFrame | [protected]
m_wndToolbarEdit | CMainFrame | [protected]
m_wndToolbarResource | CMainFrame | [protected]
m_wndToolBarSpiro | CMainFrame |
m_wndToolBarTheme | CMainFrame | [protected]
m_wndToolBarWeb | CMainFrame | [protected]
m_wndTree | CMainFrame | [protected]
m_wndTree2003 | CMainFrame | [protected]
m_wndView | CMainFrame | [protected]
m_wndWatchBar | CMainFrame | [protected]
m_wndWorkSpace | CMainFrame | [protected]
m_wndWorkSpace2 | CMainFrame | [protected]
m_wpPrev | CMainFrame | [protected]
OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized) | CMainFrame | [protected]
OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAppLook(UINT id) | CMainFrame | [protected]
OnAskQuestion() | CMainFrame | [protected]
OnBarState(UINT_PTR wParam, LONG_PTR lParam) | CMainFrame | [protected]
OnBarState(WPARAM wParam, LPARAM lParam) | CMainFrame | [protected]
OnBlockFmtDropdown(NMHDR *pNotifyStruct, LRESULT *result) | CMainFrame |
OnBounce() | CMainFrame | [protected]
OnBounce() | CMainFrame | [protected]
OnCategorie(UINT nID) | CMainFrame | [protected]
OnChangeLayout(CWnd *pWnd=NULL, BOOL bNoLoopOverPopup=FALSE) | CMainFrame |
OnChangeLook(BOOL bOutlookBar2003) | CMainFrame |
OnChangeLook(BOOL bOneNoteTabs, BOOL bMDITabColors, BOOL bIsVSDotNetLook, BOOL bDockTabColors, BOOL bMDITabsVS2005Look, BOOL bActiveTabCloseButton) | CMainFrame |
OnChangeLook() | CMainFrame |
OnChangeRibbonCategory(WPARAM, LPARAM) | CMainFrame | [protected]
OnChangeStyle(UINT nID) | CMainFrame | [protected]
OnCharColor() | CMainFrame | [protected]
OnClose() | CMainFrame | [protected]
OnClose() | CMainFrame | [protected]
OnClose() | CMainFrame | [protected]
OnClose() | CMainFrame | [protected]
OnClose() | CMainFrame | [protected]
OnClose() | CMainFrame | [protected]
OnClose() | CMainFrame | [protected]
OnCloseFoldersPopup(BOOL bKeep) | CMainFrame |
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CMainFrame | [virtual]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CMainFrame | [virtual]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CMainFrame | [virtual]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CMainFrame | [virtual]
OnCommand(WPARAM wParam, LPARAM lParam) | CMainFrame | [protected, virtual]
OnCommand(WPARAM wParam, LPARAM lParam) | CMainFrame | [protected, virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [private]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CMainFrame | [virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CMainFrame | [protected, virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CMainFrame | [protected, virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CMainFrame | [virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CMainFrame | [protected, virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CMainFrame | [protected, virtual]
OnDate() | CMainFrame | [protected]
OnDestroy() | CMainFrame | [protected]
OnDestroy() | CMainFrame | [protected]
OnDevModeChange(LPTSTR lpDeviceName) | CMainFrame | [protected]
OnDevModeChange(LPTSTR lpDeviceName) | CMainFrame | [protected]
OnDrawMenuImage(CDC *pDC, const CMFCToolBarMenuButton *pMenuButton, const CRect &rectImage) | CMainFrame | [protected, virtual]
OnDrawMenuImage(CDC *pDC, const CMFCToolBarMenuButton *pMenuButton, const CRect &rectImage) | CMainFrame | [virtual]
OnDropDown(NMHDR *pNotifyStruct, LRESULT *pResult) | CMainFrame | [protected]
OnDropFiles(HDROP hDropInfo) | CMainFrame | [protected]
OnDropFiles(HDROP hDropInfo) | CMainFrame | [protected]
OnDummy() | CMainFrame | [protected]
OnDummy(UINT id) | CMainFrame | [protected]
OnDummy(UINT id) | CMainFrame | [protected]
OnDummy() | CMainFrame | [protected]
OnDynamicItem1() | CMainFrame | [protected]
OnDynamicItem2() | CMainFrame | [protected]
OnEditFindCombo() | CMainFrame | [protected]
OnEditMyItem1() | CMainFrame | [protected]
OnEditMyItem2() | CMainFrame | [protected]
OnEnable(BOOL bEnable) | CMainFrame | [protected]
OnEraseBkgnd(CDC *pDC) | CMainFrame | [protected]
OnExample(UINT nCmdID) | CMainFrame |
OnFavorite(UINT nID) | CMainFrame | [protected]
OnFavorite(UINT nID) | CMainFrame | [protected]
OnFileBind() | CMainFrame | [protected]
OnFileCloseSolution() | CMainFrame | [protected]
OnFileConfigureScreenCapture(void) | CMainFrame |
OnFileNewBlankSolution() | CMainFrame | [protected]
OnFileNewProject() | CMainFrame | [protected]
OnFileOpenSolution() | CMainFrame | [protected]
OnFilePrint() | CMainFrame | [protected]
OnFilePrint() | CMainFrame | [protected]
OnFilePrintPreview() | CMainFrame | [protected]
OnFilePrintPreview() | CMainFrame | [protected]
OnFileRunREGEDIT() | CMainFrame | [protected]
OnFileSaveAll() | CMainFrame | [protected]
OnFileScreencapture(void) | CMainFrame |
OnFileViewTypeLib() | CMainFrame | [protected]
OnFontChange() | CMainFrame | [protected]
OnFontChange() | CMainFrame | [protected]
OnFontNameChange() | CMainFrame | [protected]
OnFontSizeChange() | CMainFrame | [protected]
OnFourColumns() | CMainFrame | [protected]
OnGetDocumentColors(WPARAM, LPARAM) | CMainFrame | [protected]
OnGetMinMaxInfo(MINMAXINFO FAR *lpMMI) | CMainFrame | [protected]
OnGetMinMaxInfo(MINMAXINFO FAR *lpMMI) | CMainFrame | [protected]
OnGetTabToolTip(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnGetTabToolTip(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnHello() | CMainFrame | [protected]
OnHello() | CMainFrame | [protected]
OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnHelpFinder() | CMainFrame | [protected]
OnHelpFinder() | CMainFrame | [protected]
OnHelpKeyboardmap() | CMainFrame | [protected]
OnHelpMicrosoft() | CMainFrame | [protected]
OnHelpWeb() | CMainFrame | [protected]
OnHighlightRibbonListItem(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnHighlightRibbonListItem(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnHistory(UINT nID) | CMainFrame | [protected]
OnLink() | CMainFrame | [protected]
OnLink(UINT nID) | CMainFrame | [protected]
OnLink1() | CMainFrame | [protected]
OnLinkMicrosoft() | CMainFrame | [protected]
OnLinkMSDN() | CMainFrame | [protected]
OnLinks(UINT nID) | CMainFrame | [protected]
OnLinkVisualCPP() | CMainFrame | [protected]
OnLoadDebugConf() | CMainFrame | [protected]
OnLoadRegularConf() | CMainFrame | [protected]
OnMdiCancel() | CMainFrame | [protected]
OnMdiCancel() | CMainFrame | [protected]
OnMdiCancel() | CMainFrame | [protected]
OnMdiMoveToNextGroup() | CMainFrame | [protected]
OnMdiMoveToNextGroup() | CMainFrame | [protected]
OnMdiMoveToNextGroup() | CMainFrame | [protected]
OnMdiMoveToPrevGroup() | CMainFrame | [protected]
OnMdiMoveToPrevGroup() | CMainFrame | [protected]
OnMdiMoveToPrevGroup() | CMainFrame | [protected]
OnMdiNewHorzTabGroup() | CMainFrame | [protected]
OnMdiNewHorzTabGroup() | CMainFrame | [protected]
OnMdiNewHorzTabGroup() | CMainFrame | [protected]
OnMdiNewVertGroup() | CMainFrame | [protected]
OnMdiNewVertGroup() | CMainFrame | [protected]
OnMdiNewVertGroup() | CMainFrame | [protected]
OnMdiTabbed() | CMainFrame | [protected]
OnMdiTabbedDocument() | CMainFrame | [protected]
OnMenuButtonToolHitTest(CMFCToolBarButton *pButton, TOOLINFO *pTI) | CMainFrame | [virtual]
OnMenuButtonToolHitTest(CMFCToolBarButton *pButton, TOOLINFO *pTI) | CMainFrame | [virtual]
OnMenuSelection() | CMainFrame | [protected]
OnMiniFramePropertySheet() | CMainFrame |
OnMove(int x, int y) | CMainFrame | [protected]
OnMove(int x, int y) | CMainFrame | [protected]
OnNcRButtonDown(UINT nHitTest, CPoint point) | CMainFrame | [protected]
OnNewAddress() | CMainFrame | [protected]
OnNewAddress() | CMainFrame | [protected]
OnNewAddress() | CMainFrame | [protected]
OnNewAddressEnter() | CMainFrame | [protected]
OnNewAddressEnter() | CMainFrame | [protected]
OnNewAddressEnter() | CMainFrame | [protected]
OnObjectDelete() | CMainFrame | [protected]
OnObjectVerify() | CMainFrame | [protected]
OnOleInsertNew() | CMainFrame | [protected]
OnOpenMsg(UINT_PTR wParam, LONG_PTR lParam) | CMainFrame | [protected]
OnOpenMsg(WPARAM wParam, LPARAM lParam) | CMainFrame | [protected]
OnOutlookAddPage() | CMainFrame | [protected]
OnOutlookAnimation() | CMainFrame | [protected]
OnOutlookBarShortcut(UINT id) | CMainFrame | [protected]
OnOutlookDeletePage() | CMainFrame | [protected]
OnOutlookRenamePage() | CMainFrame | [protected]
OnOutlookShowTextLabels() | CMainFrame | [protected]
OnPaint() | CMainFrame | [protected]
OnPalette(UINT nID) | CMainFrame | [protected]
OnPalette2column() | CMainFrame | [protected]
OnPalette3column() | CMainFrame | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CMainFrame | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CMainFrame | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CMainFrame | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CMainFrame | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CMainFrame | [protected]
OnPenToggle() | CMainFrame | [protected]
OnPostRecalcLayout(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnQueryNewPalette() | CMainFrame | [protected]
OnQueryNewPalette() | CMainFrame | [protected]
OnQueryNewPalette() | CMainFrame | [protected]
OnQueryNewPalette() | CMainFrame | [protected]
OnQueryNewPalette() | CMainFrame | [protected]
OnRecalcInProgress(WPARAM wParam, LPARAM lParam) | CMainFrame | [protected]
OnRefresh() | CMainFrame | [protected]
OnResetMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnResetPage() | CMainFrame | [protected]
OnRibbonBtn7() | CMainFrame | [protected]
OnRibbonBtn8() | CMainFrame | [protected]
OnRibbonBtn9() | CMainFrame | [protected]
OnRibbonCustomize(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnRibbonCustomize(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnRibbonCustomize(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnRibbonObtn10() | CMainFrame | [protected]
OnRibbonObtn2() | CMainFrame | [protected]
OnRibbonObtn3() | CMainFrame | [protected]
OnRibbonObtn4() | CMainFrame | [protected]
OnRibbonObtn8() | CMainFrame | [protected]
OnSaveDebugConf() | CMainFrame | [protected]
OnSaveRegularConf() | CMainFrame | [protected]
OnSelChangePalette() | CMainFrame | [protected]
OnSetFocus(CWnd *pOldWnd) | CMainFrame | [protected]
OnSetFocus(CWnd *pOldWnd) | CMainFrame | [protected]
OnSetFocus(CWnd *pOldWnd) | CMainFrame | [protected]
OnSetMessageString(WPARAM wParam, LPARAM lParam) | CMainFrame | [protected]
OnSettingChange(UINT uFlags, LPCTSTR lpszSection) | CMainFrame | [protected]
OnSettingChange(UINT uFlags, LPCTSTR lpszSection) | CMainFrame | [protected]
OnSettingChange(UINT uFlags, LPCTSTR lpszSection) | CMainFrame | [protected]
OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop) | CMainFrame | [protected, virtual]
OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop) | CMainFrame | [protected, virtual]
OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop) | CMainFrame | [protected, virtual]
OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowPopupMenu(CMFCPopupMenu *pMenuPopup) | CMainFrame | [protected, virtual]
OnShowRibbonItemMenu(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnSize(UINT nType, int cx, int cy) | CMainFrame | [protected]
OnSize(UINT nType, int cx, int cy) | CMainFrame | [protected]
OnSize(UINT nType, int cx, int cy) | CMainFrame | [protected]
OnSize(UINT nType, int cx, int cy) | CMainFrame | [protected]
OnSizing(UINT fwSide, LPRECT pRect) | CMainFrame | [protected]
OnSizing(UINT fwSide, LPRECT pRect) | CMainFrame | [protected]
OnSlider() | CMainFrame | [protected]
OnSpell() | CMainFrame | [protected]
OnStartCustomize(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnSysColorChange() | CMainFrame | [protected]
OnSysColorChange() | CMainFrame | [protected]
OnSysColorChange() | CMainFrame | [protected]
OnSysColorChange() | CMainFrame | [protected]
OnTask() | CMainFrame | [protected]
OnTearOffMenu(CMFCPopupMenu *pMenuPopup, CPane *pBar) | CMainFrame | [protected, virtual]
OnThreeColumns() | CMainFrame | [protected]
OnTime() | CMainFrame | [protected]
OnTimer(UINT_PTR nIDEvent) | CMainFrame | [protected]
OnTimer(UINT_PTR nIDEvent) | CMainFrame | [protected]
OnToggleInsert() | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarContextMenu(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarCreateNew(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarCreateNew(WPARAM wp, LPARAM lp) | CMainFrame | [protected]
OnToolbarCreateNew(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolbarReset(WPARAM, LPARAM) | CMainFrame | [protected]
OnToolsConnectToDatabase() | CMainFrame | [protected]
OnToolsDebugProcesses() | CMainFrame | [protected]
OnToolsOptions() | CMainFrame | [protected]
OnToolsOptions() | CMainFrame | [protected]
OnToolsOptions() | CMainFrame | [protected]
OnToolsOptions() | CMainFrame | [protected]
OnToolsToolbar() | CMainFrame | [protected]
OnToolsViewUserToolbar(UINT id) | CMainFrame | [protected]
OnToolsViewUserToolbar(UINT id) | CMainFrame | [protected]
OnTwoColumns() | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateAppLook(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateBackward1(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateBackward2(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateBarMenu(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateCategorie(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateClock(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateCustomize(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateExampleUI(CCmdUI *pCmdUI) | CMainFrame |
OnUpdateFilePrintPreview(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateFilePrintPreview(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateFontName(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateFontSize(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateForward1(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateForward2(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateFourColumns(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateGoAddressEdit(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateIndicatorSendReceive(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateInsert(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateLineNumber(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateLinks(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateMdiTabbed(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateMdiTabbedDocument(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateMiniFramePropertySheet(CCmdUI *pCmdUI) | CMainFrame |
OnUpdateObjectDelete(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateObjectVerify(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateOutlookAddPage(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateOutlookAnimation(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateOutlookBarShortcut(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateOutlookDeletePage(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateOutlookRenamePage(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateOutlookShowTextLabels(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdatePalette(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdatePalette2column(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdatePalette3column(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdatePaletteMenu(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdatePane(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdatePercentDone(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateRefresh(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateResetPage(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateRibbonBtn7(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateRibbonBtn8(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateRibbonBtn9(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateRibbonObtn10(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateRibbonObtn8(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateStyle(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateThreeColumns(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateToolsViewUserToolbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateToolsViewUserToolbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateTwoColumns(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateUseInProcHandler(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateUseInProcServer(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateUseLocalServer(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewAddressBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewCaptionBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewCaptionbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewClass(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewDialogBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewDlgbartop(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewDynamichelp(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewEditingtoolbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewExplorerbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewFile(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewFolderList(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewFolders(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewInfobar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewLinksBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewMacroBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewMessageBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewOutlookbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewOutlookBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewOutput(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewOutput(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewOutput(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewProperties(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewRefresh(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewResource(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewRtl(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewSource(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewStatusBar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewTaskpane(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewTextlabels(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewThemeToolbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewThemeToolbar(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewToolsPalette(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWatch(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWeb(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWorkspace(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWorkspace(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWorkspace(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWorkspace(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWorkspace(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewWorkspace2(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateWindowManager(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateWriteClipboard(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUseInProcHandler() | CMainFrame | [protected]
OnUseInProcServer() | CMainFrame | [protected]
OnUseLocalServer() | CMainFrame | [protected]
OnViewAddressBar() | CMainFrame | [protected]
OnViewBar(UINT nID) | CMainFrame | [protected]
OnViewCaptionbar() | CMainFrame | [protected]
OnViewCaptionBar() | CMainFrame | [protected]
OnViewClass() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewCustomize() | CMainFrame | [protected]
OnViewDialogBar() | CMainFrame | [protected]
OnViewDlgbarTop() | CMainFrame | [protected]
OnViewDynamichelp() | CMainFrame | [protected]
OnViewEditingtoolbar() | CMainFrame | [protected]
OnViewExplorerbar() | CMainFrame | [protected]
OnViewFile() | CMainFrame | [protected]
OnViewFolderList() | CMainFrame | [protected]
OnViewFolders() | CMainFrame | [protected]
OnViewFoldersPopup() | CMainFrame | [protected]
OnViewFullScreen() | CMainFrame | [protected]
OnViewFullScreen() | CMainFrame | [protected]
OnViewInfobar() | CMainFrame | [protected]
OnViewLinksBar() | CMainFrame | [protected]
OnViewLong() | CMainFrame | [protected]
OnViewMacroBar() | CMainFrame | [protected]
OnViewMessageBar() | CMainFrame | [protected]
OnViewMyComputer() | CMainFrame | [protected]
OnViewOutlookBar() | CMainFrame | [protected]
OnViewOutlookbar() | CMainFrame | [protected]
OnViewOutput() | CMainFrame | [protected]
OnViewOutput() | CMainFrame | [protected]
OnViewOutput() | CMainFrame | [protected]
OnViewPalette() | CMainFrame | [protected]
OnViewProperties() | CMainFrame | [protected]
OnViewRefresh() | CMainFrame | [protected]
OnViewRefresh() | CMainFrame | [protected]
OnViewResource() | CMainFrame | [protected]
OnViewRtl() | CMainFrame | [protected]
OnViewShort() | CMainFrame | [protected]
OnViewSource() | CMainFrame | [protected]
OnViewStatusBar() | CMainFrame | [protected]
OnViewTaskpane() | CMainFrame | [protected]
OnViewTextlabels() | CMainFrame | [protected]
OnViewThemeToolbar() | CMainFrame | [protected]
OnViewThemeToolbar() | CMainFrame | [protected]
OnViewToolsPalette() | CMainFrame | [protected]
OnViewWatch() | CMainFrame | [protected]
OnViewWeb() | CMainFrame | [protected]
OnViewWorkspace() | CMainFrame | [protected]
OnViewWorkspace() | CMainFrame | [protected]
OnViewWorkspace() | CMainFrame | [protected]
OnViewWorkspace() | CMainFrame | [protected]
OnViewWorkspace() | CMainFrame | [protected]
OnViewWorkSpace(UINT ud) | CMainFrame | [protected]
OnViewWorkspace2() | CMainFrame | [protected]
OnWindowManager() | CMainFrame | [protected]
OnWindowManager() | CMainFrame | [protected]
OnWindowManager() | CMainFrame | [protected]
OnWindowManager() | CMainFrame | [protected]
OnWindowManager() | CMainFrame | [protected]
OnWindowManager() | CMainFrame | [protected]
OnWindowManager() | CMainFrame | [protected]
OnWindowTileHorz() | CMainFrame | [protected]
OnWriteClipboard() | CMainFrame | [protected]
OnZoom() | CMainFrame | [protected]
OnZoomSlider() | CMainFrame | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
PreTranslateMessage(MSG *pMsg) | CMainFrame | [virtual]
PreTranslateMessage(MSG *pMsg) | CMainFrame | [virtual]
RecalcLayout(BOOL bNotify=TRUE) | CMainFrame | [virtual]
RestorePosition(int nCmdShow) | CMainFrame | [protected]
SavePosition() | CMainFrame | [protected]
SelectPalette(BOOL bBackground) | CMainFrame |
SetAddress(LPCTSTR lpszUrl) | CMainFrame |
SetAddress(LPCTSTR lpszUrl) | CMainFrame |
SetBasicCommands() | CMainFrame | [protected]
SetContainerSize(UINT nSize) | CMainFrame |
SetCurrFolder(LPCTSTR lpszPath) | CMainFrame |
SetDlgBarHeightInPixels(UINT nHeight) | CMainFrame |
SetDlgBarSizeInContainer(UINT nSize) | CMainFrame |
SetDlgBarWidthInPixels(UINT nWidth) | CMainFrame |
SetDockingBarsIcons(BOOL bHiColorIcons) | CMainFrame | [protected]
SetKeys() | CMainFrame | [protected]
SetProgress(long nCurr, long nTotal) | CMainFrame |
SetProgressPos(int nPos, UINT nID) | CMainFrame | [protected]
SetRibbonContextCategory(UINT uiCategoryID) | CMainFrame |
SetRibbonContextCategory(UINT uiCategoryID) | CMainFrame |
SetSliderPos(int nPos, UINT nID) | CMainFrame | [protected]
SetupMemoryBitmapSize(const CSize &sz) | CMainFrame | [private]
SetupOffice2007Button() | CMainFrame | [protected]
SetupOffice2007Button() | CMainFrame | [protected]
SetWorkSpace(CWorkspaceObj *pWorkSpace) | CMainFrame |
ShowOptions(int nPage) | CMainFrame | [protected]
ShowOptions(int nPage) | CMainFrame | [protected]
ShowOptions(int nPage) | CMainFrame | [protected]
ShowProgress(BOOL bShow=TRUE) | CMainFrame | [protected]
StartAnimation() | CMainFrame |
StartAnimation() | CMainFrame |
SwapView() | CMainFrame |
SwapView(int nCmdId) | CMainFrame |
UpdateContextTab(CDrawView *pCurrView) | CMainFrame |
UpdateContextTabFromObject(CDrawObjList &list) | CMainFrame |
UpdateMDITabs(BOOL bResetMDIChild) | CMainFrame |
UpdateMRUFilesList() | CMainFrame | [inline]
UpdateMRUFilesList() | CMainFrame | [inline]
UpdateStatusBarCountPane(int nID, CString strText, int nCount) | CMainFrame | [private]
UpdateTime(HWND hWnd, UINT nMsg, UINT_PTR nIDEvent, DWORD dwTime) | CMainFrame | [protected, static]
UpdateUI(CDrawView *pCurrView) | CMainFrame |
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
~CMainFrame() | CMainFrame | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCalendarBar Member List

This is the complete list of members for CCalendarBar, including all inherited members.
CCalendarBar() | CCalendarBar |
Create(const RECT &rect, CWnd *pParentWnd, UINT nID=(UINT)-1) | CCalendarBar | [virtual]
m_Images | CCalendarBar | [protected]
m_nMyCalendarsY | CCalendarBar | [protected]
m_wndCalendar | CCalendarBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCalendarBar | [protected]
OnEraseBkgnd(CDC *pDC) | CCalendarBar | [protected]
OnPaint() | CCalendarBar | [protected]
OnSize(UINT nType, int cx, int cy) | CCalendarBar | [protected]
~CCalendarBar() | CCalendarBar | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrdoc.cpp Source File

  • ole
  • hiersvr

svrdoc.cpp

Go to the documentation of this file.
00001 // svrdoc.cpp : implementation of the CServerDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "hiersvr.h"
00015
00016 #include "svrdoc.h"
00017 #include "svritem.h"
00018 #include "svrview.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 CLIPFORMAT NEAR CServerDoc::m_cfPrivate = NULL;
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CServerDoc
00029
00030 IMPLEMENT_DYNCREATE(CServerDoc, COleServerDoc)
00031
00032 BEGIN_MESSAGE_MAP(CServerDoc, COleServerDoc)
00033   //{{AFX_MSG_MAP(CServerDoc)
00034   ON_COMMAND(ID_OPTIONS_FONT, OnOptionsFont)
00035   ON_COMMAND(ID_CANCEL_INPLACE, OnCancelInplace)
00036   //}}AFX_MSG_MAP
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CServerDoc construction/destruction
00041
00042 CServerDoc::CServerDoc()
00043 {
00044   m_pRoot = CServerNode::CreateRootNode(this);
00045
00046   // determine default font for document
00047   memset(&m_logfont, 0, sizeof m_logfont);
00048   m_logfont.lfHeight = -10;
00049   _tcscpy_s(m_logfont.lfFaceName, LF_FACESIZE, _T("Arial"));
00050   m_logfont.lfOutPrecision = OUT_TT_PRECIS;
00051   m_logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
00052   m_logfont.lfQuality = PROOF_QUALITY;
00053   m_logfont.lfPitchAndFamily = FF_SWISS | VARIABLE_PITCH;
00054
00055   // use default window text color
00056   m_crText = COLOR_WINDOWTEXT+1;
00057
00058   if (m_cfPrivate == NULL)
00059   {
00060     m_cfPrivate = (CLIPFORMAT)
00061       ::RegisterClipboardFormat(_T("MFC HierSvr Sample"));
00062   }
00063 }
00064
00065 CServerDoc::~CServerDoc()
00066 {
00067   delete m_pRoot;     // delete kills child nodes
00068 }
00069
00070 void CServerDoc::DeleteContents()
00071 {
00072   COleServerDoc::DeleteContents();
00073
00074   if (m_pRoot != NULL)
00075     m_pRoot->InitRootNode();
00076 }
00077
00078 BOOL CServerDoc::OnNewDocument()
00079 {
00080   if (!COleServerDoc::OnNewDocument())
00081     return FALSE;
00082
00083   // Note: m_pRoot is created in the constructor
00084   return (m_pRoot != NULL);
00085 }
00086
00087 COleServerItem* CServerDoc::OnGetEmbeddedItem()
00088 {
00089   ASSERT_VALID(m_pRoot);
00090
00091   // allocate embedded item first time requested
00092   if (m_pRoot->m_pServerItem == NULL)
00093     m_pRoot->m_pServerItem = new CServerItem(this, m_pRoot);
00094
00095   // and return it
00096   ASSERT_VALID(m_pRoot->m_pServerItem);
00097   return m_pRoot->m_pServerItem;
00098 }
00099
00100 COleServerItem* CServerDoc::OnGetLinkedItem(LPCTSTR lpszItemName)
00101 {
00102   ASSERT_VALID(m_pRoot);
00103
00104   // look in current list first
00105   COleServerItem* pItem = COleServerDoc::OnGetLinkedItem(lpszItemName);
00106   if (pItem != NULL)
00107     return pItem;
00108
00109   // look in document itself for an item with that link name
00110   CString strItemName = lpszItemName;
00111   CServerNode* pNode = m_pRoot->FindNode(strItemName);
00112   if (pNode == NULL)
00113     return NULL;    // node does not exist
00114
00115   ASSERT(pNode->m_pServerItem == NULL);   // should not be connected
00116   pItem = new CServerItem(this, pNode);
00117   ASSERT_VALID(pItem);
00118
00119   // return new item that matches lpszItemName
00120   return pItem;
00121 }
00122
00123 CFont* CServerDoc::SelectDocFont(CDC* pDC, CFont& font)
00124 {
00125   // convert points in m_logfont.lfHeight to logical
00126   LOGFONT logfont = m_logfont;
00127   logfont.lfHeight = -::MulDiv(-logfont.lfHeight,
00128     pDC->GetDeviceCaps(LOGPIXELSY), 72);
00129
00130   // set the text color as appropriate
00131   COLORREF cr = m_crText;
00132   if (cr == COLOR_WINDOW+1)
00133     cr = GetSysColor(COLOR_WINDOW);
00134   pDC->SetTextColor(m_crText);
00135
00136   // create the font object
00137   if (!font.CreateFontIndirect(&logfont))
00138     return NULL;
00139
00140   // select the font
00141   return pDC->SelectObject(&font);
00142 }
00143
00144 int CServerDoc::DrawTree(CDC* pDC, CPoint ptStart, CServerNode* pNodeSel,
00145   CServerNode* pRoot)
00146 {
00147   if (pRoot == NULL)
00148     pRoot = m_pRoot;
00149   // select correct font for the document
00150   CFont font;
00151   CFont* pOldFont = SelectDocFont(pDC, font);
00152   if (pOldFont == NULL)
00153     return -1;
00154
00155   // draw the hierachy list
00156   int iResult = pRoot->DrawTree(pDC, ptStart, pNodeSel);
00157
00158   // restore state of the dc
00159   pDC->SelectObject(pOldFont);
00160   return iResult;
00161 }
00162
00163 void CServerDoc::CalcBounding(CDC* pDC, CServerNode* pNodeStart,
00164   CPoint ptStart, CSize& sizeMax)
00165 {
00166   ASSERT_VALID(pNodeStart);
00167
00168   // select correct font for the document
00169   CFont font;
00170   CFont* pOldFont = SelectDocFont(pDC, font);
00171
00172   // calculate the bounding rect
00173   pNodeStart->CalcBounding(pDC, ptStart, sizeMax);
00174
00175   // restore state of the dc
00176   if (pOldFont != NULL)
00177     pDC->SelectObject(pOldFont);
00178 }
00179
00180 /////////////////////////////////////////////////////////////////////////////
00181 // CServerDoc serialization
00182
00183 // this serializes the OLE Server document as a stand-alone file
00184 void CServerDoc::Serialize(CArchive& ar)
00185 {
00186   ASSERT(m_pRoot != NULL);
00187   SerializeFontInfo(ar);
00188   m_pRoot->Serialize(ar);
00189 }
00190
00191 void CServerDoc::SerializeFontInfo(CArchive& ar)
00192 {
00193   if (ar.IsStoring())
00194   {
00195     ar.Write(&m_logfont, sizeof(m_logfont) - sizeof(m_logfont.lfFaceName));
00196     // lfFaceName is stored as CString so it is UNICODE/ANSI independent
00197     ar << CString(m_logfont.lfFaceName);
00198     ar << m_crText;
00199   }
00200   else
00201   {
00202     ar.Read(&m_logfont, sizeof(m_logfont) - sizeof(m_logfont.lfFaceName));
00203     // lfFaceName must be read as a CString
00204     CString strFaceName;
00205     ar >> strFaceName;
00206     _tcscpy_s(m_logfont.lfFaceName, LF_FACESIZE, strFaceName);
00207     ar >> m_crText;
00208   }
00209 }
00210
00211 /////////////////////////////////////////////////////////////////////////////
00212 // CServerDoc in-place editing
00213
00214 void CServerDoc::OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect)
00215 {
00216   // get first view of document
00217   POSITION pos = GetFirstViewPosition();
00218   ASSERT(pos != NULL);
00219   CServerView* pView = (CServerView*)GetNextView(pos);
00220   ASSERT_KINDOF(CServerView, pView);
00221   ASSERT_VALID(pView);
00222
00223   CSize sizeNum(lpPosRect->right - lpPosRect->left,
00224     lpPosRect->bottom - lpPosRect->top);
00225   // for denom -- get extent in device
00226   // create a view dc
00227   CServerDC dc(pView);
00228   // set zoom to 100%
00229   dc.SetViewportExt(CSize(1,1));
00230   dc.SetWindowExt(CSize(1,1));
00231   // get extents in device
00232   CSize sizeDenom = pView->CalcActualItemSize(m_pRoot, &dc);
00233
00234   // notify first view of potential zoom factor change!
00235   pView->SetZoomFactor(sizeNum, sizeDenom);
00236   // resize the window
00237   COleServerDoc::OnSetItemRects(lpPosRect, lpClipRect);
00238   // set scrollbar state (if necessary)
00239   pView->SetScrollInfo();
00240 }
00241
00242 void CServerDoc::OnOptionsFont()
00243 {
00244   CClientDC dc(NULL);
00245   LOGFONT lf = m_logfont;
00246   lf.lfHeight = -::MulDiv(-lf.lfHeight, dc.GetDeviceCaps(LOGPIXELSY), 72);
00247   CFontDialog dlg(&lf);
00248   dlg.m_cf.rgbColors = m_crText;
00249   if (dlg.DoModal() == IDOK)
00250   {
00251     lf.lfHeight = -::MulDiv(-lf.lfHeight, 72, dc.GetDeviceCaps(LOGPIXELSY));
00252     m_crText = dlg.GetColor();
00253     m_logfont = lf;
00254     SetModifiedFlag();
00255     UpdateAllItems(NULL);
00256     UpdateAllViews(NULL);
00257   }
00258 }
00259
00260 // Note: both the server and the container should have a keyboard method
00261 //  of deactivating an active in-place item.
00262
00263 void CServerDoc::OnCancelInplace()
00264 {
00265   if (IsInPlaceActive())
00266     OnDeactivateUI(FALSE);
00267 }
00268
00269 /////////////////////////////////////////////////////////////////////////////
00270 // CServerDoc diagnostics
00271
00272 #ifdef _DEBUG
00273 void CServerDoc::AssertValid() const
00274 {
00275   COleServerDoc::AssertValid();
00276 }
00277
00278 void CServerDoc::Dump(CDumpContext& dc) const
00279 {
00280   COleServerDoc::Dump(dc);
00281 }
00282 #endif //_DEBUG
00283
00284 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoDoc.cpp Source File

  • vc2008fp
  • PaletteDemo

PaletteDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "PaletteDemo.h"
00013
00014 #include "PaletteDemoDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CPaletteDemoDoc
00024
00025 IMPLEMENT_DYNCREATE(CPaletteDemoDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CPaletteDemoDoc, CDocument)
00028   ON_COMMAND_RANGE(ID_PAL_CURSOR, ID_PAL_AVI, OnPaletteTool)
00029   ON_UPDATE_COMMAND_UI_RANGE(ID_PAL_CURSOR, ID_PAL_AVI, OnUpdatePaletteTool)
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CPaletteDemoDoc construction/destruction
00034
00035 CPaletteDemoDoc::CPaletteDemoDoc()
00036 {
00037   m_uiCurrTool = ID_PAL_CURSOR;
00038 }
00039
00040 CPaletteDemoDoc::~CPaletteDemoDoc()
00041 {
00042 }
00043
00044 BOOL CPaletteDemoDoc::OnNewDocument()
00045 {
00046   if (!CDocument::OnNewDocument())
00047     return FALSE;
00048
00049   // TODO: add reinitialization code here
00050   // (SDI documents will reuse this document)
00051
00052   return TRUE;
00053 }
00054
00055
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CPaletteDemoDoc serialization
00059
00060 void CPaletteDemoDoc::Serialize(CArchive& ar)
00061 {
00062   if (ar.IsStoring())
00063   {
00064     // TODO: add storing code here
00065   }
00066   else
00067   {
00068     // TODO: add loading code here
00069   }
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CPaletteDemoDoc diagnostics
00074
00075 #ifdef _DEBUG
00076 void CPaletteDemoDoc::AssertValid() const
00077 {
00078   CDocument::AssertValid();
00079 }
00080
00081 void CPaletteDemoDoc::Dump(CDumpContext& dc) const
00082 {
00083   CDocument::Dump(dc);
00084 }
00085 #endif //_DEBUG
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CPaletteDemoDoc commands
00089
00090 void CPaletteDemoDoc::OnPaletteTool(UINT uiCmd)
00091 {
00092   m_uiCurrTool = uiCmd;
00093 }
00094
00095 void CPaletteDemoDoc::OnUpdatePaletteTool(CCmdUI* pCmdUI)
00096 {
00097   pCmdUI->SetCheck (m_uiCurrTool == pCmdUI->m_nID);
00098 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTooltipDemoView Member List

This is the complete list of members for CTooltipDemoView, including all inherited members.
CTooltipDemoView() | CTooltipDemoView | [protected]
DoDataExchange(CDataExchange *pDX) | CTooltipDemoView | [protected, virtual]
EnableControls() | CTooltipDemoView | [protected]
GetDocument() | CTooltipDemoView | [inline]
IDD enum value | CTooltipDemoView |
m_bBoldLabel | CTooltipDemoView |
m_bCustomColors | CTooltipDemoView |
m_bDrawDescription | CTooltipDemoView |
m_bDrawIcon | CTooltipDemoView |
m_bDrawSeparator | CTooltipDemoView |
m_bRoundedCorners | CTooltipDemoView |
m_bTTInPopupMenus | CTooltipDemoView |
m_nTTType | CTooltipDemoView |
OnApplyParams() | CTooltipDemoView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CTooltipDemoView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CTooltipDemoView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CTooltipDemoView | [protected, virtual]
OnFilePrintPreview() | CTooltipDemoView | [protected]
OnInitialUpdate() | CTooltipDemoView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CTooltipDemoView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CTooltipDemoView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CTooltipDemoView | [virtual]
~CTooltipDemoView() | CTooltipDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/treecpg.cpp Source File

  • general
  • CmnCtrl1

treecpg.cpp

Go to the documentation of this file.
00001 // TreeCtrlPage.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl1.h"
00015 #include "treecpg.h"
00016 #include "mtreectl.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CTreeCtrlPage property page
00026
00027 IMPLEMENT_DYNCREATE(CTreeCtrlPage, CPropertyPage)
00028
00029 CTreeCtrlPage::CTreeCtrlPage() : CPropertyPage(CTreeCtrlPage::IDD)
00030 {
00031   //{{AFX_DATA_INIT(CTreeCtrlPage)
00032   m_bDisableDragDrop = FALSE;
00033   m_bHasButtons = FALSE;
00034   m_bHasLines = FALSE;
00035   m_bLinesAtRoot = FALSE;
00036   m_bEditLabels = FALSE;
00037   m_bShowSelAlways = FALSE;
00038   m_cstrStatus = _T("");
00039   m_bSingleExpand = FALSE;
00040   //}}AFX_DATA_INIT
00041   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00042 }
00043
00044 CTreeCtrlPage::~CTreeCtrlPage()
00045 {
00046 }
00047
00048 void CTreeCtrlPage::DoDataExchange(CDataExchange* pDX)
00049 {
00050   CPropertyPage::DoDataExchange(pDX);
00051   //{{AFX_DATA_MAP(CTreeCtrlPage)
00052   DDX_Control(pDX, IDC_TREESTATUS, m_notifshowcase);
00053   DDX_Control(pDX, IDC_TREEVIEW1, m_mytreectrl);
00054   DDX_Check(pDX, IDC_TVDISABLEDDRAGDROP, m_bDisableDragDrop);
00055   DDX_Check(pDX, IDC_TVHASBUTTONS, m_bHasButtons);
00056   DDX_Check(pDX, IDC_TVHASLINES, m_bHasLines);
00057   DDX_Check(pDX, IDC_TVLINESATROOT, m_bLinesAtRoot);
00058   DDX_Check(pDX, IDC_TVEDITLABELS, m_bEditLabels);
00059   DDX_Check(pDX, IDC_TVSHOWSELALWAYS, m_bShowSelAlways);
00060   DDX_Text(pDX, IDC_TREESTATUS, m_cstrStatus);
00061   DDX_Check(pDX, IDC_TVSSINGELEXPAND, m_bSingleExpand);
00062   //}}AFX_DATA_MAP
00063 }
00064
00065
00066 BEGIN_MESSAGE_MAP(CTreeCtrlPage, CPropertyPage)
00067   //{{AFX_MSG_MAP(CTreeCtrlPage)
00068   ON_BN_CLICKED(IDC_TVEDITLABELS, OnEditLabels)
00069   ON_BN_CLICKED(IDC_TVHASBUTTONS, OnHasButtons)
00070   ON_BN_CLICKED(IDC_TVHASLINES, OnHasLines)
00071   ON_BN_CLICKED(IDC_TVLINESATROOT, OnLinesAtRoot)
00072   ON_BN_CLICKED(IDC_TVDISABLEDDRAGDROP, OnDisabledDragDrop)
00073   ON_BN_CLICKED(IDC_TVSHOWSELALWAYS, OnShowSelAlways)
00074   ON_NOTIFY(TVN_BEGINLABELEDIT, IDC_TREEVIEW1, ShowNotification)
00075   ON_NOTIFY(TVN_SELCHANGING, IDC_TREEVIEW1, ShowNotification)
00076   ON_NOTIFY(TVN_SELCHANGED, IDC_TREEVIEW1, ShowNotification)
00077   ON_NOTIFY(TVN_GETDISPINFO, IDC_TREEVIEW1, ShowNotification)
00078   ON_NOTIFY(TVN_SETDISPINFO, IDC_TREEVIEW1, ShowNotification)
00079   ON_NOTIFY(TVN_ITEMEXPANDING, IDC_TREEVIEW1, ShowNotification)
00080   ON_NOTIFY(TVN_ITEMEXPANDED, IDC_TREEVIEW1, ShowNotification)
00081   ON_NOTIFY(TVN_BEGINDRAG, IDC_TREEVIEW1, ShowNotification)
00082   ON_NOTIFY(TVN_KEYDOWN, IDC_TREEVIEW1, ShowNotification)
00083   ON_NOTIFY(TVN_SELCHANGED, IDC_TREEVIEW1, ShowNotification)
00084   ON_NOTIFY(TVN_SELCHANGING, IDC_TREEVIEW1, ShowNotification)
00085   ON_NOTIFY(TVN_ITEMEXPANDING, IDC_TREEVIEW1, ShowNotification)
00086   ON_NOTIFY(TVN_ITEMEXPANDED, IDC_TREEVIEW1, ShowNotification)
00087   ON_NOTIFY(TVN_DELETEITEM, IDC_TREEVIEW1, ShowNotification)
00088   ON_BN_CLICKED(IDC_TVSSINGELEXPAND, OnSingleExpand)
00089   //}}AFX_MSG_MAP
00090 END_MESSAGE_MAP()
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // CTreeCtrlPage message handlers
00094 BOOL CTreeCtrlPage::OnInitDialog()
00095 {
00096   CImageList          *pImageList;
00097   CBitmap             bitmap;
00098   CString             strItems[12];
00099   CCmnCtrl1App        *pApp;
00100   int                 iItem;
00101   UINT                nID;
00102   TV_INSERTSTRUCT     curTreeItem;
00103
00104   strItems[0]= _T("Dogs");
00105   strItems[1]= _T("German Shepherd");
00106   strItems[2]= _T("Dalmatian");
00107   strItems[3]= _T("Great Dane");
00108   strItems[4]= _T("Birds");
00109   strItems[5]= _T("Hummingbird");
00110   strItems[6]= _T("Pigeon");
00111   strItems[7]= _T("Eagle");
00112   strItems[8]= _T("Fish");
00113   strItems[9]= _T("Snapper");
00114   strItems[10]= _T("Sole");
00115   strItems[11]= _T("Salmon");
00116
00117   pApp = (CCmnCtrl1App *)AfxGetApp();
00118   CPropertyPage::OnInitDialog();  // let the base class do the default work
00119   pImageList = new CImageList();
00120   pImageList->Create(32, 16, ILC_MASK, 6, 4);
00121
00122   for (nID = IDB_BMTREEFIRST; nID <= IDB_BMTREELAST; nID++)  // load bitmaps for dog, bird and fish
00123   {
00124     bitmap.LoadBitmap(nID);
00125     pImageList->Add(&bitmap, (COLORREF)0xFFFFFF);
00126     bitmap.DeleteObject();
00127   }
00128
00129   m_mytreectrl.SetImageList(pImageList, TVSIL_NORMAL);
00130   for (iItem = 0; iItem < CELEMS(strItems); iItem ++)
00131   {
00132     curTreeItem.hParent = (iItem % 4 == 0)? NULL : m_rghItem[iItem / 4 * 4];
00133     curTreeItem.hInsertAfter = TVI_SORT;
00134     curTreeItem.item.iImage = iItem / 4 * 2;
00135     curTreeItem.item.iSelectedImage = curTreeItem.item.iImage + 1;
00136     curTreeItem.item.pszText = strItems[iItem].GetBuffer(strItems[iItem].GetLength());
00137     curTreeItem.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
00138     m_rghItem[iItem] = m_mytreectrl.InsertItem(&curTreeItem);
00139   }
00140
00141   return FALSE;
00142 }
00143
00144 void CTreeCtrlPage::OnEditLabels()
00145 {
00146   UpdateData(TRUE/*bSaveAndValidate*/);  // get information from the dialog
00147   m_mytreectrl.SetNewStyle(TVS_EDITLABELS, m_bEditLabels);
00148 }
00149
00150 void CTreeCtrlPage::OnHasButtons()
00151 {
00152   UpdateData(TRUE);
00153   m_mytreectrl.SetNewStyle(TVS_HASBUTTONS, m_bHasButtons);
00154 }
00155
00156 void CTreeCtrlPage::OnHasLines()
00157 {
00158   UpdateData(TRUE);
00159   m_mytreectrl.SetNewStyle(TVS_HASLINES, m_bHasLines);
00160 }
00161
00162 void CTreeCtrlPage::OnLinesAtRoot()
00163 {
00164   UpdateData(TRUE);
00165   m_mytreectrl.SetNewStyle(TVS_LINESATROOT, m_bLinesAtRoot);
00166 }
00167
00168 void CTreeCtrlPage::OnDisabledDragDrop()
00169 {
00170   UpdateData(TRUE);
00171   m_mytreectrl.SetNewStyle(TVS_DISABLEDRAGDROP, m_bDisableDragDrop);
00172 }
00173
00174 void CTreeCtrlPage::OnShowSelAlways()
00175 {
00176   UpdateData(TRUE);
00177   m_mytreectrl.SetNewStyle(TVS_SHOWSELALWAYS, m_bShowSelAlways);
00178 }
00179
00180 void CTreeCtrlPage::ShowNotification(LPNMHDR pnmhdr, LRESULT* /*pResult*/)
00181 {
00182   ((CNotifyShowCase *)GetDlgItem(IDC_TREESTATUS))->ShowNotification(pnmhdr->code);
00183 }
00184
00185 void CTreeCtrlPage::OnSingleExpand()
00186 {
00187   UpdateData(TRUE);
00188   m_mytreectrl.SetNewStyle(TVS_SINGLEEXPAND, m_bSingleExpand);
00189 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDBVListApp Member List

This is the complete list of members for CDBVListApp, including all inherited members.
CDBVListApp() | CDBVListApp |
InitInstance() | CDBVListApp | [virtual]
OnAppAbout() | CDBVListApp |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFontComboBox Member List

This is the complete list of members for CFontComboBox, including all inherited members.
AddFont(ENUMLOGFONT *pelf, DWORD dwType, LPCTSTR lpszScript=NULL) | CFontComboBox |
CFontComboBox() | CFontComboBox |
CompareItem(LPCOMPAREITEMSTRUCT lpCIS) | CFontComboBox | [virtual]
DrawItem(LPDRAWITEMSTRUCT lpDIS) | CFontComboBox | [virtual]
EmptyContents() | CFontComboBox |
EnumFamPrinterCallBack(ENUMLOGFONT *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis) | CFontComboBox | [static]
EnumFamPrinterCallBackEx(ENUMLOGFONTEX *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis) | CFontComboBox | [static]
EnumFamScreenCallBack(ENUMLOGFONT *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis) | CFontComboBox | [static]
EnumFamScreenCallBackEx(ENUMLOGFONTEX *pelf, NEWTEXTMETRICEX *, int FontType, LPVOID pThis) | CFontComboBox | [static]
EnumFontFamiliesEx(CDC &dc, BYTE nCharSet=DEFAULT_CHARSET) | CFontComboBox |
GetTheText(CString &str) | CLocalComboBox |
HasFocus() | CLocalComboBox | [inline]
LimitText(int nMaxChars) | CLocalComboBox |
m_arrayFontDesc | CLocalComboBox |
m_bmFontType | CFontComboBox |
m_nFontHeight | CLocalComboBox | [static]
m_nLimitText | CLocalComboBox |
MatchFont(LPCTSTR lpszName, BYTE nCharSet) | CFontComboBox |
MeasureItem(LPMEASUREITEMSTRUCT lpMIS) | CFontComboBox | [virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CLocalComboBox |
OnDestroy() | CFontComboBox |
PreTranslateMessage(MSG *pMsg) | CLocalComboBox | [virtual]
SetTheText(LPCTSTR lpszText, BOOL bMatchExact=FALSE) | CLocalComboBox |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHTMLEdDoc Member List

This is the complete list of members for CHTMLEdDoc, including all inherited members.
CHTMLEdDoc() | CHTMLEdDoc | [protected]
IsModified() | CHTMLEdDoc |
m_bCallCloseDocument | CHTMLEdDoc |
m_bCallNewDocument | CHTMLEdDoc |
m_bDoSaveOnDocCom | CHTMLEdDoc |
m_sSaveFileName | CHTMLEdDoc | [private]
OnCloseDocument() | CHTMLEdDoc |
OnFileOpenurl() | CHTMLEdDoc | [protected]
OnNewDocument() | CHTMLEdDoc |
OnOpenDocument(LPCTSTR lpszFileName) | CHTMLEdDoc |
OnSaveDocument(LPCTSTR lpszFileName) | CHTMLEdDoc |
SaveMyDocument() | CHTMLEdDoc |
~CHTMLEdDoc() | CHTMLEdDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/shadow.h Source File

  • ole
  • oleview

shadow.h

Go to the documentation of this file.
00001 /*
00002  * These defines are used in the uiFlags and uiStyle parameters to
00003  * the TDUTIL functions.
00004  */
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #define DRAW3D_IN           0x0100     // effect looks indented
00016 #define DRAW3D_OUT          0x0200     // effect 'sticks out'
00017 #define DRAW3D_CREASE       0x0400     // for that 'creased' look
00018
00019 #define DRAW3D_TOPLINE      0x0800
00020 #define DRAW3D_BOTTOMLINE   0x1000
00021 #define DRAW3D_LEFTLINE     0x2000
00022 #define DRAW3D_RIGHTLINE    0x4000
00023
00024 /*
00025  * Very useful set of macros for dealing with the 'base' 16 colors
00026  */
00027 #ifndef _RGB_H_
00028 #define _RGB_H_
00029    #define RGBBLACK     RGB(0,0,0)
00030    #define RGBRED       RGB(128,0,0)
00031    #define RGBGREEN     RGB(0,128,0)
00032    #define RGBBLUE      RGB(0,0,128)
00033    #define RGBBROWN     RGB(128,128,0)
00034    #define RGBMAGENTA   RGB(128,0,128)
00035    #define RGBCYAN      RGB(0,128,128)
00036    #define RGBLTGRAY    RGB(192,192,192)
00037    #define RGBGRAY      RGB(128,128,128)
00038    #define RGBLTRED     RGB(255,0,0)
00039    #define RGBLTGREEN   RGB(0,255,0)
00040    #define RGBLTBLUE    RGB(0,0,255)
00041    #define RGBYELLOW    RGB(255,255,0)
00042    #define RGBLTMAGENTA RGB(255,0,255)
00043    #define RGBLTCYAN    RGB(0,255,255)
00044    #define RGBWHITE     RGB(255,255,255)
00045 #endif
00046
00047 /* tdDraw3DRect()
00048  *
00049  * Draws a rectangle (non-filled) that has 3D effects.
00050  *
00051  *    lprc     Defines the rectangle in client coordinates
00052  *    uiWidth  Specifies the width of the lines that make up the rectangle.
00053  *    wFlags   Either DRAW3D_IN or DRAW3D_OUT.  May be combined with
00054  *             DRAW3D_CREASED (uiWidth is ignored).
00055  */
00056 VOID WINAPI tdDraw3DRect( HDC hdc, LPRECT lprc, UINT uiWidth, UINT wFlags );
00057
00058 /* tdDraw3DLine()
00059  *
00060  * Draws a component of a 3D rectangle.  The tdDraw3DRect() function uses
00061  * this function to draw the rectangles.  This function is optimized
00062  * for speed.  For one pixel wide lines it uses ExtTextOut(), for others
00063  * it use Polygon() ('cause line ends are not square).
00064  *
00065  *    x, y     Defines the line in client coordinates
00066  *    uiWidth   Specifies the width of the lines that make up the rectangle.
00067  *    wFlags   May be a combination of either DRAW3D_IN or DRAW3D_OUT and
00068  *             DRAW3D_TOP, DRAW3D_LEFT, DRAW3D_BOTTOM, or DRAW3D_RIGHT.
00069  */
00070 VOID WINAPI tdDraw3DLine( HDC hdc, UINT x, UINT y, UINT nLen, UINT uiWidth, UINT wFlags );
00071
00072
00073 /* tdDrawFaceFrame()
00074  *
00075  * Draws a rectangle using the current background color.  This function
00076  * is useful for drawing fast rectangles (it' uses ExtTextOut() for speed).
00077  *
00078  * Restrictions are that it does not do patterned lines, or fill the
00079  * rectangle.  But it's a great deal faster than Rectangle().
00080  *
00081  * tdDrawRect() is really a macro that calls tdDrawFaceFrame() which
00082  * is mis-named (blame curtisp).
00083  */
00084 #define tdDrawRect tdDrawFaceFrame
00085 VOID WINAPI tdDrawFaceFrame( HDC hdc, LPRECT lprc, UINT uiWidth );
00086
00087
00088 /* tdDraw3DCrease()
00089  *
00090  * Draws a 3D 'crease' effect using the specified rectangle.  This
00091  * effect is often used for 3d group boxes.  uiFlags dictates whether
00092  * the crease is indented (DRAW3D_IN) or sticks out (DRAW_3DOUT).
00093  */
00094 VOID WINAPI tdDraw3DCrease( HDC hdc, LPRECT lprc, UINT uiFlags ) ;
00095
00096 /* tdGetHighlightColor()
00097  *
00098  * TDUTIL uses the concept of a normal color, highlight color, and shadow
00099  * color to do it's drawing.  Both the highlight color and shadow colors
00100  * are derived from the normal color.  This function takes a 'normal'
00101  * color, and returns the appropriate highlight color.
00102  *
00103  * For example if RGBLTGRAY is passed in as rgb, RGBWHITE will be returned.
00104  */
00105 COLORREF WINAPI tdGetHighlightColor( COLORREF rgb ) ;
00106
00107 /* tdGetShadowColor()
00108  *
00109  * TDUTIL uses the concept of a normal color, highlight color, and shadow
00110  * color to do it's drawing.  Both the highlight color and shadow colors
00111  * are derived from the normal color.  This function takes a 'normal'
00112  * color, and returns the appropriate shadow color.
00113  *
00114  * For example if RGBLTGRAY is passed in as rgb, RGBGRAY will be returned.
00115  */
00116 COLORREF WINAPI tdGetShadowColor( COLORREF rgb ) ;
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCmnCtrl2App Member List

This is the complete list of members for CCmnCtrl2App, including all inherited members.
CCmnCtrl2App() | CCmnCtrl2App |
InitInstance() | CCmnCtrl2App | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/stdafx.h Source File

  • advanced
  • speakn

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #define VC_EXTRALEAN
00011
00012 #include <afxwin.h>
00013 #include <afxext.h> // for bitmap button
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEmbeddedOptPage Member List

This is the complete list of members for CEmbeddedOptPage, including all inherited members.
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
CDocOptPage() | CDocOptPage |
CDocOptPage(UINT nIDCaption) | CDocOptPage |
CDocOptPage() | CDocOptPage |
CDocOptPage(UINT nIDCaption) | CDocOptPage |
CEmbeddedOptPage() | CEmbeddedOptPage |
CEmbeddedOptPage() | CEmbeddedOptPage |
DoDataExchange(CDataExchange *pDX) | CDocOptPage | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CDocOptPage | [protected, virtual]
GetHelpIDs() | CDocOptPage | [inline, virtual]
GetHelpIDs() | CDocOptPage | [inline, virtual]
IDD enum value | CDocOptPage |
m_bFormatBar | CDocOptPage |
m_bRulerBar | CDocOptPage |
m_bStatusBar | CDocOptPage |
m_bToolBar | CDocOptPage |
m_nHelpIDs | CDocOptPage | [static]
m_nWordWrap | CDocOptPage |
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
OnInitDialog() | CEmbeddedOptPage |
OnInitDialog() | CEmbeddedOptPage |
~CDocOptPage() | CDocOptPage |
~CDocOptPage() | CDocOptPage |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSOffice2007DemoCntrItem Member List

This is the complete list of members for CMSOffice2007DemoCntrItem, including all inherited members.
CMSOffice2007DemoCntrItem(REOBJECT *preo=NULL, CMSOffice2007DemoDoc *pContainer=NULL) | CMSOffice2007DemoCntrItem |
GetActiveView() | CMSOffice2007DemoCntrItem | [inline]
GetDocument() | CMSOffice2007DemoCntrItem | [inline]
m_uiCategoryID | CMSOffice2007DemoCntrItem |
OnShowPanes(CFrameWnd *pFrameWnd, BOOL bShow) | CMSOffice2007DemoCntrItem | [protected, virtual]
~CMSOffice2007DemoCntrItem() | CMSOffice2007DemoCntrItem |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/stdafx.cpp Source File

  • controls
  • licensed

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface24.cpp Source File

  • general
  • MMXSwarm

MMXSurface24.cpp

Go to the documentation of this file.
00001 // MMXSurface24.cpp : implementation of the CMMXSurface24Intrinsic
00002 // class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012 //
00013 #include "stdafx.h"
00014 #include "MMXSurface.h"
00015 #include "MMXWrapper.h"
00016
00017 typedef CMMXUnsigned16Saturated CMMX;
00018
00019 void CMMXSurface24Intrinsic::OnCreated()
00020 {
00021   ASSERT(GetBitDepth() == 24);
00022   ASSERT(GetVisibleWidth() && GetVisibleHeight());
00023   ASSERT(sizeof(RGBTRIPLE) == 3);
00024   ASSERT((GetPitch() & 0x3) == 0);
00025
00026   int width = GetVisibleWidth();
00027     m_dwpl = GetPitch()/4; // DWORDs Per Line
00028     m_width = (width+1)*3/4; // round up
00029     m_delta = int((GetPixelAddress(0,1) - GetPixelAddress(width,0)) / 4);
00030 }
00031
00032 void CMMXSurface24Intrinsic::BlurBits()
00033 {
00034     int height = GetVisibleHeight();
00035     DWORD *pCur  = (DWORD*)GetPixelAddress(0,0);
00036
00037   CMMX cFader;
00038   CMMX cRight;
00039   CMMX cLeft;
00040   CMMX cUp, cDown, cCur;
00041
00042   cFader.UnpackBytesLo( 0x01010101 );
00043   cLeft.Clear();
00044
00045   do {
00046     int width = m_width;
00047     do {
00048       BYTE *bpCur = (BYTE *)pCur;
00049       // Load pixels and do the mmx unpack
00050       cCur.UnpackBytesLo( pCur[0] );
00051       // treating non-aligned data as dwords isn't generally a good idea
00052       cRight.UnpackBytesLo( *(DWORD *)(bpCur+3) );
00053       cUp.UnpackBytesLo( pCur[-m_dwpl] );
00054       cDown.UnpackBytesLo( pCur[m_dwpl] );
00055
00056       // Sum the 4 around and double the middle
00057       // Do current pixel in this line
00058       cUp = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;
00059
00060 #if defined(TRIPPY)
00061       cUp += cFader; // increase the fade to white
00062 #elif defined (FAST_FADE)
00063           cUp -= cFader; // increase the fade to black
00064 #endif
00065       // Reset the left before we write anything out.
00066       // treating non-aligned data as dwords isn't generally a good idea
00067       cLeft.UnpackBytesLo( *(DWORD *)(bpCur+1) );
00068       *pCur++ = cUp.PackBytes();
00069     } while (--width > 0);
00070     pCur += m_delta;
00071   } while (--height > 0);
00072 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrdoc.h Source File

  • ole
  • hiersvr

svrdoc.h

Go to the documentation of this file.
00001 // svrdoc.h : interface of the CServerDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define MAX_LEVEL   20
00013
00014 class CServerNode;
00015
00016 class CServerDoc : public COleServerDoc
00017 {
00018 protected: // create from serialization only
00019   CServerDoc();
00020   DECLARE_DYNCREATE(CServerDoc)
00021
00022 // Attributes
00023 public:
00024   LOGFONT m_logfont;          // font in use for the document
00025   COLORREF m_crText;
00026   CServerNode* m_pRoot;
00027
00028   // private clipboard format
00029   static CLIPFORMAT NEAR m_cfPrivate;
00030
00031 // Operations
00032 public:
00033   CFont* SelectDocFont(CDC* pDC, CFont& font);
00034   int CServerDoc::DrawTree(CDC* pDC, CPoint ptStart, CServerNode* pItemSel,
00035     CServerNode* pRoot = NULL);
00036   void CalcBounding(CDC* pDC, CServerNode* pItemStart,
00037     CPoint ptStart, CSize& sizeMax);
00038
00039 // Implementation
00040 public:
00041   virtual COleServerItem* OnGetEmbeddedItem();
00042   virtual COleServerItem* OnGetLinkedItem(LPCTSTR lpszItemName);
00043   virtual ~CServerDoc();
00044   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00045   void SerializeFontInfo(CArchive& ar);
00046   virtual void DeleteContents();
00047   virtual void OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect);
00048 #ifdef _DEBUG
00049   virtual void AssertValid() const;
00050   virtual void Dump(CDumpContext& dc) const;
00051 #endif
00052 protected:
00053   virtual BOOL    OnNewDocument();
00054
00055 // Generated message map functions
00056 protected:
00057   //{{AFX_MSG(CServerDoc)
00058   afx_msg void OnOptionsFont();
00059   afx_msg void OnCancelInplace();
00060   //}}AFX_MSG
00061   DECLARE_MESSAGE_MAP()
00062 };
00063
00064 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemo.h Source File

  • vc2008fp
  • PaletteDemo

PaletteDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CPaletteDemoApp:
00021 // See PaletteDemo.cpp for the implementation of this class
00022 //
00023
00024 class CPaletteDemoApp : public CWinAppEx
00025 {
00026 public:
00027   CPaletteDemoApp();
00028
00029 // Overrides
00030   public:
00031   virtual BOOL InitInstance();
00032   virtual int ExitInstance();
00033
00034 // Implementation
00035   afx_msg void OnAppAbout();
00036
00037   DECLARE_MESSAGE_MAP()
00038 };
00039
00040
00041 extern CPaletteDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSliderProp Member List

This is the complete list of members for CSliderProp, including all inherited members.
CreateInPlaceEdit(CRect rectEdit, BOOL &bDefaultFormat) | CSliderProp | [protected, virtual]
CSliderProp(const CString &strName, long nValue, LPCTSTR lpszDescr=NULL, DWORD dwData=0) | CSliderProp |
OnSetCursor() const | CSliderProp | [inline, protected, virtual]
OnUpdateValue() | CSliderProp | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/StdAfx.h Source File

  • internet
  • HTMLEdit

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #if !defined(AFX_STDAFX_H__2BCEEF87_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
00015 #define AFX_STDAFX_H__2BCEEF87_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_
00016
00017 #if _MSC_VER > 1000
00018 #pragma once
00019 #endif // _MSC_VER > 1000
00020
00021 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #include <afxdisp.h>        // MFC Automation classes
00026 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00027 #ifndef _AFX_NO_AFXCMN_SUPPORT
00028 #include <afxcmn.h>     // MFC support for Windows Common Controls
00029 #include <afxdlgs.h>
00030 #include <atlbase.h>
00031 #include <afxhtml.h>
00032
00033 #endif // _AFX_NO_AFXCMN_SUPPORT
00034
00035
00036 //{{AFX_INSERT_LOCATION}}
00037 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00038
00039 #endif // !defined(AFX_STDAFX_H__2BCEEF87_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CServerApp Member List

This is the complete list of members for CServerApp, including all inherited members.
CServerApp() | CServerApp |
ExitInstance() | CServerApp | [virtual]
InitInstance() | CServerApp | [virtual]
m_server | CServerApp | [protected]
OnAppAbout() | CServerApp | [protected]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawcli.cpp Source File

  • ole
  • drawcli

drawcli.cpp

Go to the documentation of this file.
00001 // drawcli.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "drawcli.h"
00014
00015 #include "mainfrm.h"
00016 #include "drawobj.h"
00017 #include "drawdoc.h"
00018 #include "drawvw.h"
00019 #include "splitfrm.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CDrawApp
00028
00029 BEGIN_MESSAGE_MAP(CDrawApp, CWinApp)
00030   //{{AFX_MSG_MAP(CDrawApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032     // NOTE - the ClassWizard will add and remove mapping macros here.
00033     //    DO NOT EDIT what you see in these blocks of generated code!
00034   //}}AFX_MSG_MAP
00035   // Standard file based document commands
00036   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00037   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00038   // Standard print setup command
00039   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CDrawApp construction
00044
00045 CDrawApp::CDrawApp()
00046 {
00047   // TODO: add construction code here,
00048   // Place all significant initialization in InitInstance
00049 }
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // The one and only CDrawApp object
00053
00054 CDrawApp theApp;
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CDrawApp initialization
00058
00059 BOOL CDrawApp::InitInstance()
00060 {
00061     SetRegistryKey(_T("YourCompany"));
00062   // Initialize OLE libraries
00063   if (!AfxOleInit())
00064   {
00065     AfxMessageBox(IDP_OLE_INIT_FAILED);
00066     return FALSE;
00067   }
00068
00069   // Standard initialization
00070   // If you are not using these features and wish to reduce the size
00071   //  of your final executable, you should remove from the following
00072   //  the specific initialization routines you do not need.
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   // Register the application's document templates.  Document templates
00077   //  serve as the connection between documents, frame windows and views.
00078
00079   CMultiDocTemplate* pDocTemplate;
00080   pDocTemplate = new CMultiDocTemplate(
00081     IDR_DRAWCLTYPE,
00082     RUNTIME_CLASS(CDrawDoc),
00083     RUNTIME_CLASS(CSplitFrame),
00084     RUNTIME_CLASS(CDrawView));
00085   pDocTemplate->SetContainerInfo(IDR_DRAWCLTYPE_CNTR_IP);
00086   AddDocTemplate(pDocTemplate);
00087
00088   // create main MDI Frame window
00089   CMainFrame* pMainFrame = new CMainFrame;
00090
00091   if(!pMainFrame)
00092     return FALSE;
00093
00094   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00095   {
00096     delete pMainFrame;
00097     return FALSE;
00098   }
00099   m_pMainWnd = pMainFrame;
00100
00101   // Enable DDE Execute open
00102   EnableShellOpen();
00103   RegisterShellFileTypes(TRUE);
00104
00105   // Parse command line for standard shell commands, DDE, file open
00106   CCommandLineInfo cmdInfo;
00107   ParseCommandLine(cmdInfo);
00108
00109   // Dispatch commands specified on the command line
00110   if (!ProcessShellCommand(cmdInfo))
00111     return FALSE;
00112
00113   // Enable drag/drop open
00114   m_pMainWnd->DragAcceptFiles();
00115
00116   // The main window has been initialized, so show and update it.
00117   pMainFrame->ShowWindow(m_nCmdShow);
00118   pMainFrame->UpdateWindow();
00119
00120   return TRUE;
00121 }
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // CAboutDlg dialog used for App About
00125
00126 class CAboutDlg : public CDialog
00127 {
00128 public:
00129   CAboutDlg();
00130
00131 // Dialog Data
00132   //{{AFX_DATA(CAboutDlg)
00133   enum { IDD = IDD_ABOUTBOX };
00134   //}}AFX_DATA
00135
00136   // ClassWizard generated virtual function overrides
00137   //{{AFX_VIRTUAL(CAboutDlg)
00138   protected:
00139   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00140   //}}AFX_VIRTUAL
00141
00142 // Implementation
00143 protected:
00144   //{{AFX_MSG(CAboutDlg)
00145     // No message handlers
00146   //}}AFX_MSG
00147   DECLARE_MESSAGE_MAP()
00148 };
00149
00150 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00151 {
00152   //{{AFX_DATA_INIT(CAboutDlg)
00153   //}}AFX_DATA_INIT
00154 }
00155
00156 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00157 {
00158   CDialog::DoDataExchange(pDX);
00159   //{{AFX_DATA_MAP(CAboutDlg)
00160   //}}AFX_DATA_MAP
00161 }
00162
00163 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00164   //{{AFX_MSG_MAP(CAboutDlg)
00165     // No message handlers
00166   //}}AFX_MSG_MAP
00167 END_MESSAGE_MAP()
00168
00169 // App command to run the dialog
00170 void CDrawApp::OnAppAbout()
00171 {
00172   CAboutDlg aboutDlg;
00173   aboutDlg.DoModal();
00174 }
00175
00176 /////////////////////////////////////////////////////////////////////////////
00177 // CDrawApp commands
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DocType Member List

This is the complete list of members for DocType, including all inherited members.
bDup | DocType
bRead | DocType
bWrite | DocType
GetString(int nID) | DocType
GetString(int nID) | DocType
idStr | DocType
nID | DocType
pszConverterName | DocType
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mainfrm.cpp Source File

  • advanced
  • mtgdi

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtgdi.h"
00014
00015 #include "mainfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00028   //{{AFX_MSG_MAP(CMainFrame)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code !
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CMainFrame construction/destruction
00036
00037 CMainFrame::CMainFrame()
00038 {
00039   // TODO: add member initialization code here
00040
00041 }
00042
00043 CMainFrame::~CMainFrame()
00044 {
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CMainFrame diagnostics
00049
00050 #ifdef _DEBUG
00051 void CMainFrame::AssertValid() const
00052 {
00053   CFrameWnd::AssertValid();
00054 }
00055
00056 void CMainFrame::Dump(CDumpContext& dc) const
00057 {
00058   CFrameWnd::Dump(dc);
00059 }
00060
00061 #endif //_DEBUG
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CMainFrame message handlers
00065
00066 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00067 {
00068   cs.style &= ~FWS_ADDTOTITLE;
00069
00070   return CFrameWnd::PreCreateWindow(cs);
00071 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBounceDoc Member List

This is the complete list of members for CBounceDoc, including all inherited members.
CBounceDoc() | CBounceDoc | [protected]
ClearAllColors() | CBounceDoc |
m_bBlack | CBounceDoc |
m_bBlue | CBounceDoc |
m_bCustom | CBounceDoc |
m_bFastSpeed | CBounceDoc |
m_bGreen | CBounceDoc |
m_bmBall | CBounceDoc |
m_bRed | CBounceDoc |
m_bWhite | CBounceDoc |
m_clrBall | CBounceDoc |
m_ptCenter | CBounceDoc |
m_ptPixel | CBounceDoc |
m_sizeMove | CBounceDoc |
m_sizeRadius | CBounceDoc |
m_sizeTotal | CBounceDoc |
OnNewDocument() | CBounceDoc | [protected, virtual]
Serialize(CArchive &ar) | CBounceDoc | [virtual]
SetBallRadius(CSize radius) | CBounceDoc |
SetCustomBallColor(COLORREF clr) | CBounceDoc |
~CBounceDoc() | CBounceDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMMenuBar.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMMenuBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMMenuBar.h : header file
00013 //
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CMSMMenuBar window
00017
00018 class CMSMMenuBar : public CMFCMenuBar
00019 {
00020   DECLARE_DYNCREATE(CMSMMenuBar)
00021
00022 // Construction
00023 public:
00024   CMSMMenuBar();
00025
00026   virtual ~CMSMMenuBar();
00027
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Implementation
00035 public:
00036
00037 protected:
00038   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00039
00040   DECLARE_MESSAGE_MAP()
00041 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AutoClik::IAClick Member List

This is the complete list of members for AutoClik::IAClick, including all inherited members.
id | AutoClik::IAClick
id | AutoClik::IAClick
RefreshWindow() | AutoClik::IAClick
SetAllProps(short x, short y, BSTR text) | AutoClik::IAClick
ShowWindow() | AutoClik::IAClick
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/MainFrm.h Source File

  • vc2008fp
  • TabControl

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CFrameWnd CFrameWndEx
00014
00015 class CMainFrame : public CFrameWnd
00016 {
00017
00018 protected: // create from serialization only
00019   CMainFrame();
00020   DECLARE_DYNCREATE(CMainFrame)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CMFCMenuBar m_wndMenuBar;
00041   CMFCStatusBar m_wndStatusBar;
00042   CMFCToolBar m_wndToolBar;
00043   CMFCToolBar m_wndToolBarTheme;
00044
00045 protected:
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047   afx_msg void OnViewThemeToolbar();
00048   afx_msg void OnUpdateViewThemeToolbar(CCmdUI* pCmdUI);
00049   afx_msg void OnViewCustomize();
00050   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00051   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00052   afx_msg void OnAppLook(UINT id);
00053   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00054
00055   DECLARE_MESSAGE_MAP()
00056
00057   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00058
00059   UINT  m_nAppLook;
00060
00061   void SetupOffice2007Button ();
00062 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/dllhusk.cpp Source File

  • advanced
  • dllhusk

dllhusk.cpp

Go to the documentation of this file.
00001 // dllhusk.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "dllhusk.h"
00014
00015 #include "mainfrm.h"
00016 #include "testdll1.h"   // classes exported from TESTDLL1
00017 #include "testdll2.h"   // classes exported from TESTDLL2
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CHuskApp
00026
00027 BEGIN_MESSAGE_MAP(CHuskApp, CWinApp)
00028   //{{AFX_MSG_MAP(CHuskApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   ON_COMMAND(ID_DUMP_CLASSES, OnDumpClasses)
00031   ON_COMMAND(ID_DUMP_DOCTEMPLATES, OnDumpDocTemplates)
00032   ON_COMMAND(ID_DUMP_OBJECTS, OnDumpObjects)
00033   ON_COMMAND(ID_DUMP_DLLS, OnDumpDLLs)
00034   //}}AFX_MSG_MAP
00035   // Standard file based document commands
00036   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00037   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00038   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CHuskApp construction
00043 // Place all significant initialization in InitInstance
00044
00045 CHuskApp::CHuskApp()
00046 {
00047   m_pListOut = NULL;
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only CHuskApp object
00052
00053 CHuskApp NEAR theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CHuskApp initialization
00057
00058 BOOL CHuskApp::InitInstance()
00059 {
00060   // Standard initialization
00061
00062   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00063
00064   // create main MDI Frame window
00065   CMainFrame* pMainFrame = new CMainFrame;
00066   if (!pMainFrame->LoadFrame(IDR_MAINFRAME)){
00067     delete pMainFrame; //clean up
00068     return FALSE;
00069   }
00070
00071   pMainFrame->ShowWindow(m_nCmdShow);
00072   pMainFrame->UpdateWindow();
00073   m_pMainWnd = pMainFrame;
00074
00075   // Initialize DLLs - will add doc templates and make other class
00076   //   implementations available to this application
00077   InitTestDLL1();
00078   InitTestDLL2();
00079
00080   CreateListOutput();
00081
00082   if (m_lpCmdLine[0] == '\0')
00083   {
00084     if (m_pListOut != NULL)
00085       m_pListOut->AddString(_T("Attempting to create a new document"));
00086     // create a new (empty) document
00087     OnFileNew();
00088   }
00089   else
00090   {
00091     if (m_pListOut != NULL)
00092       m_pListOut->AddString(_T("Attempting to open an existing document"));
00093     // open an existing document
00094     OpenDocumentFile(m_lpCmdLine);
00095   }
00096
00097 #ifdef _DEBUG
00098   if (m_pListOut != NULL)
00099   {
00100     m_pListOut->AddString(_T(""));
00101     m_pListOut->AddString(_T("Click the Right-Mouse-Button over"));
00102     m_pListOut->AddString(_T(" the main TitleBar for diagnostic menu"));
00103     m_pListOut->AddString(_T(""));
00104   }
00105 #endif
00106   return TRUE;
00107 }
00108
00109 // Example of calling a class in a DLL
00110 BOOL CHuskApp::CreateListOutput()
00111 {
00112   m_pListOut = new CListOutputFrame;
00113       // all objects are allocated on the application's heap,
00114       //  even CListOutputFrame which is defined in another DLL
00115
00116   CRect rectOriginal(250, 0, 600, 300);
00117       // hard-coded initial position
00118
00119   if (!m_pListOut->Create(_T("List Output"),
00120       WS_OVERLAPPEDWINDOW | WS_CHILD | WS_VISIBLE,
00121       rectOriginal, (CMDIFrameWnd*)m_pMainWnd))
00122   {
00123     AfxMessageBox(_T("Failed to create ListOutput Window"));
00124     m_pListOut = NULL;  // just in case (Create will delete the C++ object)
00125     return FALSE;
00126   }
00127
00128   m_pListOut->SetBackpointer(&m_pListOut);
00129   return TRUE;
00130 }
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CAboutDlg dialog used for App About
00134
00135 void CHuskApp::OnAppAbout()
00136 {
00137   if (m_pListOut != NULL)
00138     m_pListOut->AddString(_T("CHuskApp::OnAppAbout called"));
00139   CDialog(IDD_ABOUTBOX).DoModal();
00140 }
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CHuskApp debug menu dump commands
00144
00145 #ifdef _DEBUG
00146 static void DumpObjectProc(CObject* pObject, void* pContext)
00147 {
00148   CListOutputFrame* pListOut = (CListOutputFrame*)pContext;
00149   TCHAR szT[128];
00150   _stprintf_s(szT, 128, _T("    a %s at $%08lX"),
00151     pObject->GetRuntimeClass()->m_lpszClassName, (LONG_PTR)(void*)pObject);
00152   pListOut->AddString(szT);
00153 }
00154
00155 static void DumpClassProc(const CRuntimeClass* pClass, void* pContext)
00156 {
00157   CListOutputFrame* pListOut = (CListOutputFrame*)pContext;
00158   TCHAR szT[128];
00159   _stprintf_s(szT, 128, _T("    %s"), pClass->m_lpszClassName);
00160   pListOut->AddString(szT);
00161 }
00162 #endif
00163
00164 void CHuskApp::OnDumpClasses()
00165 {
00166 #ifdef _DEBUG
00167   if (m_pListOut == NULL && !CreateListOutput())
00168     return; // no output window
00169   m_pListOut->AddString(_T("Dump of all classes:"));
00170   AfxDoForAllClasses(DumpClassProc, m_pListOut);
00171   m_pListOut->AddString(_T(""));
00172 #endif
00173 }
00174
00175 void CHuskApp::OnDumpDocTemplates()
00176 {
00177 #ifdef _DEBUG
00178   if (m_pListOut == NULL && !CreateListOutput())
00179     return; // no output window
00180   m_pListOut->AddString(_T("Dump of all Doc Templates:"));
00181   POSITION pos = GetFirstDocTemplatePosition();
00182   while (pos != NULL)
00183   {
00184     CDocTemplate* pTemplate = GetNextDocTemplate(pos);
00185     CString str;
00186     TCHAR szT[128];
00187     if (pTemplate->GetDocString(str, CDocTemplate::fileNewName))
00188       _stprintf_s(szT, 128, _T("    Template for %s documents"), (LPCTSTR)str);
00189     else
00190       _stprintf_s(szT, 128, _T("    Unknown DocTemplate at $%08lX"),
00191         (LONG_PTR)(void*)pTemplate);
00192     m_pListOut->AddString(szT);
00193   }
00194   m_pListOut->AddString(_T(""));
00195 #endif
00196 }
00197
00198 void CHuskApp::OnDumpObjects()
00199 {
00200 #ifdef _DEBUG
00201   if (m_pListOut == NULL && !CreateListOutput())
00202     return; // no output window
00203   m_pListOut->AddString(_T("Dump of all heap Objects"));
00204   AfxDoForAllObjects(DumpObjectProc, m_pListOut);
00205   m_pListOut->AddString(_T(""));
00206 #endif
00207 }
00208
00209 void CHuskApp::OnDumpDLLs()
00210 {
00211 #ifdef _DEBUG
00212   if (m_pListOut == NULL && !CreateListOutput())
00213     return; // no output window
00214   m_pListOut->AddString(_T("Dump of DLLs in resource search order"));
00215   AFX_MODULE_STATE* pState = AfxGetModuleState();
00216   CDynLinkLibrary* pDLL = NULL;
00217   for (pDLL = pState->m_libraryList; pDLL != NULL;
00218     pDLL = pDLL->m_pNextDLL)
00219   {
00220     // get module name
00221     TCHAR szName[255];
00222     DWORD dwRet = 0;
00223     dwRet = ::GetModuleFileName(pDLL->m_hModule, szName, sizeof(szName));
00224     TCHAR szT[256];
00225
00226     // count classes
00227     int nClasses = 0;
00228     for (CRuntimeClass* pClass = pDLL->m_classList;
00229       pClass != NULL; pClass = pClass->m_pNextClass)
00230       nClasses++;
00231
00232     // count factories
00233     int nFactories = 0;
00234   #ifndef _AFX_NO_OLE_SUPPORT
00235     for (COleObjectFactory* pFactory = pDLL->m_factoryList;
00236       pFactory != NULL; pFactory = pFactory->m_pNextFactory)
00237       nFactories++;
00238   #endif
00239
00240     _stprintf_s(szT, 256, _T("    Module %s has %d classes and %d factories"),
00241       szName, nClasses, nFactories);
00242     m_pListOut->AddString(szT);
00243   }
00244   m_pListOut->AddString(_T(""));
00245 #endif
00246 }
00247
00248 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlView.h Source File

  • vc2008fp
  • TabControl

TabControlView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTabControlView : public CFormView
00014 {
00015 protected: // create from serialization only
00016   CTabControlView();
00017   DECLARE_DYNCREATE(CTabControlView)
00018
00019 public:
00020   enum { IDD = IDD_TABCONTROL_FORM };
00021   CButton m_wndTabIcons;
00022   CListBox  m_wndNotifications;
00023   CStatic m_wndTabLoc;
00024   int   m_nTabStyle;
00025   int   m_nTabLocation;
00026   int   m_nColor;
00027   BOOL  m_bTabIcons;
00028   BOOL  m_bTabsSwap;
00029
00030 // Attributes
00031 public:
00032   CTabControlDoc* GetDocument();
00033
00034 protected:
00035   CMFCTabCtrl m_wndTab;
00036
00037   CEdit   m_wnd1;
00038   CEdit   m_wnd2;
00039   CEdit   m_wnd3;
00040   CEdit   m_wnd4;
00041
00042 // Operations
00043 public:
00044
00045 // Overrides
00046   public:
00047   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00048   protected:
00049   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00050   virtual void OnInitialUpdate(); // called first time after construct
00051   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00052   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00053   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00054   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00055
00056 // Implementation
00057 public:
00058   virtual ~CTabControlView();
00059 #ifdef _DEBUG
00060   virtual void AssertValid() const;
00061   virtual void Dump(CDumpContext& dc) const;
00062 #endif
00063
00064 protected:
00065   void AddNotification (LPCTSTR lpszText);
00066
00067 protected:
00068   afx_msg void OnSelchangeTabStyle();
00069   afx_msg void OnLocation();
00070   afx_msg void OnColor();
00071   afx_msg void OnTabIcons();
00072   afx_msg void OnTabSwap();
00073   afx_msg void OnContextMenu(CWnd*, CPoint point);
00074   afx_msg void OnFilePrintPreview();
00075   afx_msg LRESULT OnMoveTab(WPARAM wp, LPARAM lp);
00076   afx_msg LRESULT OnChangeActiveTab(WPARAM wp, LPARAM lp);
00077   afx_msg LRESULT OnChangingActiveTab(WPARAM wp, LPARAM lp);
00078
00079   DECLARE_MESSAGE_MAP()
00080 };
00081
00082 #ifndef _DEBUG  // debug version in TabControlView.cpp
00083 inline CTabControlDoc* CTabControlView::GetDocument()
00084    { return (CTabControlDoc*)m_pDocument; }
00085 #endif
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibdoc.cpp Source File

  • general
  • diblook

dibdoc.cpp

Go to the documentation of this file.
00001 // dibdoc.cpp : implementation of the CDibDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "diblook.h"
00014 #include <limits.h>
00015
00016 #include "dibdoc.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CDibDoc
00025
00026 IMPLEMENT_DYNCREATE(CDibDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CDibDoc, CDocument)
00029   //{{AFX_MSG_MAP(CDibDoc)
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CDibDoc construction/destruction
00035
00036 CDibDoc::CDibDoc()
00037 {
00038   m_hDIB = NULL;
00039   m_palDIB = NULL;
00040   m_sizeDoc = CSize(1,1);     // dummy value to make CScrollView happy
00041 }
00042
00043 CDibDoc::~CDibDoc()
00044 {
00045   if (m_hDIB != NULL)
00046   {
00047     ::GlobalFree((HGLOBAL) m_hDIB);
00048   }
00049   if (m_palDIB != NULL)
00050   {
00051     delete m_palDIB;
00052   }
00053 }
00054
00055 BOOL CDibDoc::OnNewDocument()
00056 {
00057   if (!CDocument::OnNewDocument())
00058     return FALSE;
00059   return TRUE;
00060 }
00061
00062 void CDibDoc::InitDIBData()
00063 {
00064   if (m_palDIB != NULL)
00065   {
00066     delete m_palDIB;
00067     m_palDIB = NULL;
00068   }
00069   if (m_hDIB == NULL)
00070   {
00071     return;
00072   }
00073   // Set up document size
00074   LPSTR lpDIB = (LPSTR) ::GlobalLock((HGLOBAL) m_hDIB);
00075   if (::DIBWidth(lpDIB) > INT_MAX ||::DIBHeight(lpDIB) > INT_MAX)
00076   {
00077     ::GlobalUnlock((HGLOBAL) m_hDIB);
00078     ::GlobalFree((HGLOBAL) m_hDIB);
00079     m_hDIB = NULL;
00080     CString strMsg;
00081     strMsg.LoadString(IDS_DIB_TOO_BIG);
00082     MessageBox(NULL, strMsg, NULL, MB_ICONINFORMATION | MB_OK);
00083     return;
00084   }
00085   m_sizeDoc = CSize((int) ::DIBWidth(lpDIB), (int) ::DIBHeight(lpDIB));
00086   ::GlobalUnlock((HGLOBAL) m_hDIB);
00087   // Create copy of palette
00088   m_palDIB = new CPalette;
00089   if (m_palDIB == NULL)
00090   {
00091     // we must be really low on memory
00092     ::GlobalFree((HGLOBAL) m_hDIB);
00093     m_hDIB = NULL;
00094     return;
00095   }
00096   if (::CreateDIBPalette(m_hDIB, m_palDIB) == NULL)
00097   {
00098     // DIB may not have a palette
00099     delete m_palDIB;
00100     m_palDIB = NULL;
00101     return;
00102   }
00103 }
00104
00105
00106 BOOL CDibDoc::OnOpenDocument(LPCTSTR lpszPathName)
00107 {
00108   CFile file;
00109   CFileException fe;
00110   if (!file.Open(lpszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
00111   {
00112     ReportSaveLoadException(lpszPathName, &fe,
00113       FALSE, AFX_IDP_FAILED_TO_OPEN_DOC);
00114     return FALSE;
00115   }
00116
00117   DeleteContents();
00118   BeginWaitCursor();
00119
00120   // replace calls to Serialize with ReadDIBFile function
00121   TRY
00122   {
00123     m_hDIB = ::ReadDIBFile(file);
00124   }
00125   CATCH (CFileException, eLoad)
00126   {
00127     file.Abort(); // will not throw an exception
00128     EndWaitCursor();
00129     ReportSaveLoadException(lpszPathName, eLoad,
00130       FALSE, AFX_IDP_FAILED_TO_OPEN_DOC);
00131     m_hDIB = NULL;
00132     return FALSE;
00133   }
00134   END_CATCH
00135
00136   InitDIBData();
00137   EndWaitCursor();
00138
00139   if (m_hDIB == NULL)
00140   {
00141     // may not be DIB format
00142     CString strMsg;
00143     strMsg.LoadString(IDS_CANNOT_LOAD_DIB);
00144     MessageBox(NULL, strMsg, NULL, MB_ICONINFORMATION | MB_OK);
00145     return FALSE;
00146   }
00147   SetPathName(lpszPathName);
00148   SetModifiedFlag(FALSE);     // start off with unmodified
00149   return TRUE;
00150 }
00151
00152
00153 BOOL CDibDoc::OnSaveDocument(LPCTSTR lpszPathName)
00154 {
00155   CFile file;
00156   CFileException fe;
00157
00158   if (!file.Open(lpszPathName, CFile::modeCreate |
00159     CFile::modeReadWrite | CFile::shareExclusive, &fe))
00160   {
00161     ReportSaveLoadException(lpszPathName, &fe,
00162       TRUE, AFX_IDP_INVALID_FILENAME);
00163     return FALSE;
00164   }
00165
00166   // replace calls to Serialize with SaveDIB function
00167   BOOL bSuccess = FALSE;
00168   TRY
00169   {
00170     BeginWaitCursor();
00171     bSuccess = ::SaveDIB(m_hDIB, file);
00172     file.Close();
00173   }
00174   CATCH (CException, eSave)
00175   {
00176     file.Abort(); // will not throw an exception
00177     EndWaitCursor();
00178     ReportSaveLoadException(lpszPathName, eSave,
00179       TRUE, AFX_IDP_FAILED_TO_SAVE_DOC);
00180     return FALSE;
00181   }
00182   END_CATCH
00183
00184   EndWaitCursor();
00185   SetModifiedFlag(FALSE);     // back to unmodified
00186
00187   if (!bSuccess)
00188   {
00189     // may be other-style DIB (load supported but not save)
00190     //  or other problem in SaveDIB
00191     CString strMsg;
00192     strMsg.LoadString(IDS_CANNOT_SAVE_DIB);
00193     MessageBox(NULL, strMsg, NULL, MB_ICONINFORMATION | MB_OK);
00194   }
00195
00196   return bSuccess;
00197 }
00198
00199 void CDibDoc::ReplaceHDIB(HDIB hDIB)
00200 {
00201   if (m_hDIB != NULL)
00202   {
00203     ::GlobalFree((HGLOBAL) m_hDIB);
00204   }
00205   m_hDIB = hDIB;
00206 }
00207
00208 /////////////////////////////////////////////////////////////////////////////
00209 // CDibDoc diagnostics
00210
00211 #ifdef _DEBUG
00212 void CDibDoc::AssertValid() const
00213 {
00214   CDocument::AssertValid();
00215 }
00216
00217 void CDibDoc::Dump(CDumpContext& dc) const
00218 {
00219   CDocument::Dump(dc);
00220 }
00221
00222 #endif //_DEBUG
00223
00224 /////////////////////////////////////////////////////////////////////////////
00225 // CDibDoc commands
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDocOptPage Member List

This is the complete list of members for CDocOptPage, including all inherited members.
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
CDocOptPage() | CDocOptPage |
CDocOptPage(UINT nIDCaption) | CDocOptPage |
CDocOptPage() | CDocOptPage |
CDocOptPage(UINT nIDCaption) | CDocOptPage |
DoDataExchange(CDataExchange *pDX) | CDocOptPage | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CDocOptPage | [protected, virtual]
GetHelpIDs() | CDocOptPage | [inline, virtual]
GetHelpIDs() | CDocOptPage | [inline, virtual]
IDD enum value | CDocOptPage |
m_bFormatBar | CDocOptPage |
m_bRulerBar | CDocOptPage |
m_bStatusBar | CDocOptPage |
m_bToolBar | CDocOptPage |
m_nHelpIDs | CDocOptPage | [static]
m_nWordWrap | CDocOptPage |
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
~CDocOptPage() | CDocOptPage |
~CDocOptPage() | CDocOptPage |
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/splitfrm.h Source File

  • ole
  • drawcli

splitfrm.h

Go to the documentation of this file.
00001 // splitfrm.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CSplitFrame frame with splitter
00015
00016 #ifndef __AFXEXT_H__
00017 #include <afxext.h>
00018 #endif
00019
00020 class CSplitFrame : public CMDIChildWnd
00021 {
00022   DECLARE_DYNCREATE(CSplitFrame)
00023 protected:
00024   CSplitFrame();          // protected constructor used by dynamic creation
00025
00026 // Attributes
00027 protected:
00028   CSplitterWnd    m_wndSplitter;
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Implementation
00035 public:
00036   virtual ~CSplitFrame();
00037   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00038
00039   // Generated message map functions
00040   //{{AFX_MSG(CSplitFrame)
00041     // NOTE - the ClassWizard will add and remove member functions here.
00042   //}}AFX_MSG
00043   DECLARE_MESSAGE_MAP()
00044 };
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/FeatPg.Cpp Source File

  • ole
  • TstCon

FeatPg.Cpp

Go to the documentation of this file.
00001 // CFeaturesPage.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CFeaturesPage property page
00022
00023 IMPLEMENT_DYNCREATE(CFeaturesPage, CPropertyPage)
00024
00025 CFeaturesPage::CFeaturesPage() : CPropertyPage(CFeaturesPage::IDD)
00026 {
00027    m_psp.dwFlags &= ~PSP_HASHELP;
00028
00029   //{{AFX_DATA_INIT(CFeaturesPage)
00030   m_tAllowWindowless = FALSE;
00031   m_tTwoPassDrawing = FALSE;
00032   m_tHonorIgnoreActivateWhenVisible = FALSE;
00033   m_tUseIPointerInactive = FALSE;
00034   m_tUseQuickActivation = FALSE;
00035   //}}AFX_DATA_INIT
00036 }
00037
00038 CFeaturesPage::~CFeaturesPage()
00039 {
00040 }
00041
00042 void CFeaturesPage::DoDataExchange(CDataExchange* pDX)
00043 {
00044   CPropertyPage::DoDataExchange(pDX);
00045   //{{AFX_DATA_MAP(CFeaturesPage)
00046   DDX_Check(pDX, IDC_ALLOWWINDOWLESS, m_tAllowWindowless);
00047   DDX_Check(pDX, IDC_TWOPASSDRAWING, m_tTwoPassDrawing);
00048   DDX_Check(pDX, IDC_IGNOREACTIVATEWHENVISIBLE, m_tHonorIgnoreActivateWhenVisible);
00049   DDX_Check(pDX, IDC_USEIPOINTERINACTIVE, m_tUseIPointerInactive);
00050   DDX_Check(pDX, IDC_USEQUICKACTIVATION, m_tUseQuickActivation);
00051   //}}AFX_DATA_MAP
00052 }
00053
00054
00055 BEGIN_MESSAGE_MAP(CFeaturesPage, CPropertyPage)
00056   //{{AFX_MSG_MAP(CFeaturesPage)
00057   ON_WM_HELPINFO()
00058   ON_WM_CONTEXTMENU()
00059   //}}AFX_MSG_MAP
00060 END_MESSAGE_MAP()
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CFeaturesPage message handlers
00064
00065 static DWORD rgmapCHID[] =
00066 {
00067    IDC_ALLOWWINDOWLESS, HIDC_ALLOWWINDOWLESS,
00068    IDC_TWOPASSDRAWING, HIDC_TWOPASSDRAWING,
00069    IDC_IGNOREACTIVATEWHENVISIBLE, HIDC_IGNOREACTIVATEWHENVISIBLE,
00070    IDC_USEIPOINTERINACTIVE, HIDC_USEIPOINTERINACTIVE,
00071    IDC_USEQUICKACTIVATION, HIDC_USEQUICKACTIVATION,
00072    0, 0
00073 };
00074
00075 BOOL CFeaturesPage::OnHelpInfo( HELPINFO* pHelpInfo )
00076 {
00077   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00078   strPath += _T("::/popups.txt");
00079
00080   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00081 }
00082
00083 void CFeaturesPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00084 {
00085   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00086   strPath += _T("::/popups.txt");
00087
00088   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00089 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/notifwdw.h Source File

  • general
  • CmnCtrl1

notifwdw.h

Go to the documentation of this file.
00001 // NotifySowCase.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CNotifySowCase window
00015
00016 #ifndef INC_NOTIFYSHOWCASE_H
00017 #define INC_NOTIFYSHOWCASE_H
00018
00019 typedef struct notif_tag
00020 {
00021   UINT    nCode;
00022   TCHAR   sztCodeName[30];
00023 } notifDescrip;
00024
00025
00026 #define NOTIFCOUNT  23
00027
00028 class CNotifyShowCase : public CEdit
00029 {
00030 // Construction
00031 public:
00032   CNotifyShowCase();
00033   static notifDescrip m_rgNotifDescrip[NOTIFCOUNT];
00034
00035 // Attributes
00036 public:
00037   int     m_totalLines;
00038
00039 // Operations
00040 public:
00041
00042 // Overrides
00043   // ClassWizard generated virtual function overrides
00044   //{{AFX_VIRTUAL(CNotifySowCase)
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 public:
00049   virtual ~CNotifyShowCase();
00050   void    SetBufferSize(int nLines) { m_totalLines = nLines;};
00051   void    AddLine(LPCTSTR lpsz);
00052   void    ShowNotification(UINT nCode);
00053
00054   // Generated message map functions
00055 protected:
00056   //{{AFX_MSG(CNotifySowCase)
00057     // NOTE - the ClassWizard will add and remove member functions here.
00058   //}}AFX_MSG
00059
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064
00065
00066 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/StdAfx.cpp Source File

  • vc2008fp
  • TasksPane

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  TasksPane.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMFCRibbonNumEdit Member List

This is the complete list of members for CMFCRibbonNumEdit, including all inherited members.
CMFCRibbonNumEdit(UINT uiID, int nWidth, LPCTSTR lpszLabel, int nImage=-1) | CMFCRibbonNumEdit | [inline]
CreateEdit(CWnd *pWndParent, DWORD dwEditStyle) | CMFCRibbonNumEdit | [inline, virtual]
~CMFCRibbonNumEdit() | CMFCRibbonNumEdit | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAddNodeDlg Member List

This is the complete list of members for CAddNodeDlg, including all inherited members.
CAddNodeDlg(CWnd *pParent=NULL) | CAddNodeDlg |
DoDataExchange(CDataExchange *pDX) | CAddNodeDlg | [protected, virtual]
IDD enum value | CAddNodeDlg |
m_btnOK | CAddNodeDlg |
m_editDescription | CAddNodeDlg |
m_shape | CAddNodeDlg |
m_strDescription | CAddNodeDlg |
m_strLinkKey | CAddNodeDlg |
OnChange() | CAddNodeDlg | [protected]
OnInitDialog() | CAddNodeDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/STDAFX.CPP Source File

  • general
  • dlgcbr32

STDAFX.CPP

Go to the documentation of this file.
00001 // stdafx.cpp : pre-compiled header and types file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFileDlgWatcherDlg Member List

This is the complete list of members for CFileDlgWatcherDlg, including all inherited members.
CFileDlgWatcherDlg(CWnd *pParent=NULL) | CFileDlgWatcherDlg |
CreateLogEpilogue() | CFileDlgWatcherDlg | [private]
CreateLogPrologue() | CFileDlgWatcherDlg | [private]
DoDataExchange(CDataExchange *pDX) | CFileDlgWatcherDlg | [protected, virtual]
IDD enum value | CFileDlgWatcherDlg |
m_bEventPopups | CFileDlgWatcherDlg | [private]
m_bOpenFileDialog | CFileDlgWatcherDlg | [private]
m_bVistaStyle | CFileDlgWatcherDlg | [private]
m_hIcon | CFileDlgWatcherDlg | [protected]
m_strLog | CFileDlgWatcherDlg | [private]
OnBnClickedClearLog() | CFileDlgWatcherDlg |
OnBnClickedCreateDlg() | CFileDlgWatcherDlg |
OnInitDialog() | CFileDlgWatcherDlg | [protected, virtual]
OnPaint() | CFileDlgWatcherDlg | [protected]
OnQueryDragIcon() | CFileDlgWatcherDlg | [protected]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUse.h Source File

  • general
  • VariantUse

VariantUse.h

Go to the documentation of this file.
00001 // VariantUse.h : main header file for the VARIANTUSE application
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #if !defined(AFX_VARIANTUSE_H__0E9FDA45_3143_11D2_9373_00C04FD9757C__INCLUDED_)
00012 #define AFX_VARIANTUSE_H__0E9FDA45_3143_11D2_9373_00C04FD9757C__INCLUDED_
00013
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif // _MSC_VER > 1000
00017
00018 #ifndef __AFXWIN_H__
00019   #error include 'stdafx.h' before including this file for PCH
00020 #endif
00021
00022 #include "resource.h"   // main symbols
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CVarUseApp:
00026 // See VariantUse.cpp for the implementation of this class
00027 //
00028
00029 class CVarUseApp : public CWinApp
00030 {
00031 public:
00032   CVarUseApp();
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CVarUseApp)
00037   public:
00038   virtual BOOL InitInstance();
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042
00043   //{{AFX_MSG(CVarUseApp)
00044     // NOTE - the ClassWizard will add and remove member functions here.
00045     //    DO NOT EDIT what you see in these blocks of generated code !
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052
00053 //{{AFX_INSERT_LOCATION}}
00054 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00055
00056 #endif // !defined(AFX_VARIANTUSE_H__0E9FDA45_3143_11D2_9373_00C04FD9757C__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/inputvw.cpp Source File

  • general
  • viewex

inputvw.cpp

Go to the documentation of this file.
00001 // inputvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "viewex.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CInputView
00022
00023 IMPLEMENT_DYNCREATE(CInputView, CFormView)
00024
00025 CInputView::CInputView()
00026   : CFormView(CInputView::IDD)
00027 {
00028   //{{AFX_DATA_INIT(CInputView)
00029   m_strData = "";
00030   m_iColor = -1;
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 CInputView::~CInputView()
00035 {
00036 }
00037
00038 void CInputView::OnUpdate(CView*, LPARAM, CObject*)
00039 {
00040   CMainDoc* pDoc = GetDocument();
00041   m_strData = pDoc->m_strData;
00042
00043   if (pDoc->m_colorData == RGB(255, 0, 0))
00044     m_iColor = 0;
00045   else if (pDoc->m_colorData == RGB(0, 255, 0))
00046     m_iColor = 1;
00047   else if (pDoc->m_colorData == RGB(0, 0, 255))
00048     m_iColor = 2;
00049   else
00050     m_iColor = -1;
00051
00052 TRACE2("OnUpdate: m_iColor = %d ($%lx)\n", m_iColor, pDoc->m_colorData);
00053
00054   UpdateData(FALSE);  // set the data into the controls
00055 }
00056
00057 void CInputView::DoDataExchange(CDataExchange* pDX)
00058 {
00059   CFormView::DoDataExchange(pDX);
00060   //{{AFX_DATA_MAP(CInputView)
00061   DDX_Text(pDX, IDC_EDIT1, m_strData);
00062   DDX_Radio(pDX, IDC_RADIO1, m_iColor);
00063   //}}AFX_DATA_MAP
00064 }
00065
00066 BEGIN_MESSAGE_MAP(CInputView, CFormView)
00067   //{{AFX_MSG_MAP(CInputView)
00068   ON_EN_CHANGE(IDC_EDIT1, OnDataChange)
00069   ON_BN_CLICKED(IDC_RADIO1, OnDataChange)
00070   ON_BN_CLICKED(IDC_RADIO2, OnDataChange)
00071   ON_BN_CLICKED(IDC_RADIO3, OnDataChange)
00072   //}}AFX_MSG_MAP
00073 END_MESSAGE_MAP()
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CInputView message handlers
00077
00078 void CInputView::OnDataChange()
00079 {
00080   if (!UpdateData())
00081     return;
00082
00083   CMainDoc* pDoc = GetDocument();
00084   COLORREF color = RGB(255 * (m_iColor == 0),
00085             255 * (m_iColor == 1),
00086             255 * (m_iColor == 2));
00087
00088   BOOL bUpdate = FALSE;
00089   if (m_strData != pDoc->m_strData)
00090   {
00091     pDoc->m_strData = m_strData;
00092     bUpdate = TRUE;
00093   }
00094   if (color != pDoc->m_colorData)
00095   {
00096     pDoc->m_colorData = color;
00097     bUpdate = TRUE;
00098   }
00099   if (bUpdate)
00100   {
00101     // if the document stored data then we would call SetModifiedFlag here
00102     pDoc->UpdateAllViews(this);
00103   }
00104 }
00105
00106 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CExtendedControl Member List

This is the complete list of members for CExtendedControl, including all inherited members.
CExtendedControl() | CExtendedControl |
CreateInstance(REFCLSID clsidControl, CTestContainer98Item *pItem, IUnknown *pOuterUnknown, REFIID iid, void **ppInterface) | CExtendedControl | [static]
get_Name(BSTR *pbstrName) | CExtendedControl |
get_PositionX(long *px) | CExtendedControl |
get_PositionY(long *py) | CExtendedControl |
get_SizeX(long *px) | CExtendedControl |
get_SizeY(long *py) | CExtendedControl |
GetIDsOfNames(REFIID iid, LPOLESTR *ppszNames, UINT nNames, LCID lcid, DISPID *pDispIDs) | CExtendedControl |
GetTypeInfo(UINT iTypeInfo, LCID lcid, ITypeInfo **ppTypeInfo) | CExtendedControl |
GetTypeInfoCount(UINT *pnInfoCount) | CExtendedControl |
Init(REFCLSID clsidControl, CTestContainer98Item *pItem) | CExtendedControl |
InternalInvoke(DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError) | CExtendedControl | [protected]
Invoke(DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError) | CExtendedControl |
m_bstrName | CExtendedControl | [protected]
m_nRefCount | CExtendedControl | [protected]
m_pControl | CExtendedControl | [protected]
m_pInnerDispatch | CExtendedControl | [protected]
m_pItem | CExtendedControl | [protected]
m_ptPosition | CExtendedControl | [protected]
m_pTypeInfo | CExtendedControl | [protected]
m_pView | CExtendedControl | [protected]
m_size | CExtendedControl | [protected]
m_tVisible | CExtendedControl | [protected]
put_Name(BSTR bstrName) | CExtendedControl |
put_PositionX(long x) | CExtendedControl |
put_PositionY(long y) | CExtendedControl |
put_SizeX(long x) | CExtendedControl |
put_SizeY(long y) | CExtendedControl |
QueryInterface(REFIID iid, void **ppInterface) | CExtendedControl |
raw_Activate() | CExtendedControl |
raw_Deactivate() | CExtendedControl |
raw_UIActivate() | CExtendedControl |
raw_UIDeactivate() | CExtendedControl |
STDMETHOD_(ULONG, AddRef)() | CExtendedControl |
STDMETHOD_(ULONG, Release)() | CExtendedControl |
~CExtendedControl() | CExtendedControl |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/stdafx.cpp Source File

  • ole
  • acdual
  • acdualdriv

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/dialogs.cpp Source File

  • general
  • tracker

dialogs.cpp

Go to the documentation of this file.
00001 // dialogs.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "trackapp.h"
00015 #include "dialogs.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CHandleSize dialog
00024
00025
00026 CHandleSize::CHandleSize(CWnd* pParent /*=NULL*/)
00027   : CDialog(CHandleSize::IDD, pParent)
00028 {
00029   //{{AFX_DATA_INIT(CHandleSize)
00030   m_nHandleSize = 0;
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 void CHandleSize::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CHandleSize)
00038   DDX_Text(pDX, IDC_EDIT1, m_nHandleSize);
00039   //}}AFX_DATA_MAP
00040 }
00041
00042 BEGIN_MESSAGE_MAP(CHandleSize, CDialog)
00043   //{{AFX_MSG_MAP(CHandleSize)
00044     // NOTE: the ClassWizard will add message map macros here
00045   //}}AFX_MSG_MAP
00046 END_MESSAGE_MAP()
00047
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CHandleSize message handlers
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CMinSize dialog
00053
00054
00055 CMinSize::CMinSize(CWnd* pParent /*=NULL*/)
00056   : CDialog(CMinSize::IDD, pParent)
00057 {
00058   //{{AFX_DATA_INIT(CMinSize)
00059   m_nMinX = 0;
00060   m_nMinY = 0;
00061   //}}AFX_DATA_INIT
00062 }
00063
00064 void CMinSize::DoDataExchange(CDataExchange* pDX)
00065 {
00066   CDialog::DoDataExchange(pDX);
00067   //{{AFX_DATA_MAP(CMinSize)
00068   DDX_Text(pDX, IDC_EDIT1, m_nMinX);
00069   DDX_Text(pDX, IDC_EDIT2, m_nMinY);
00070   //}}AFX_DATA_MAP
00071 }
00072
00073 BEGIN_MESSAGE_MAP(CMinSize, CDialog)
00074   //{{AFX_MSG_MAP(CMinSize)
00075     // NOTE: the ClassWizard will add message map macros here
00076   //}}AFX_MSG_MAP
00077 END_MESSAGE_MAP()
00078
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CMinSize message handlers
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licensed.h Source File

  • controls
  • licensed

licensed.h

Go to the documentation of this file.
00001 // licensed.h : main header file for LICENSED.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined( __AFXCTL_H__ )
00013   #error include 'afxctl.h' before including this file
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CLicensedApp : See licensed.cpp for implementation.
00020
00021 class CLicensedApp : public COleControlModule
00022 {
00023 public:
00024   BOOL InitInstance();
00025   int ExitInstance();
00026 };
00027
00028 extern const GUID CDECL _tlid;
00029 extern const WORD _wVerMajor;
00030 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsDlg.cpp Source File

  • vc2008fp
  • VisualStudioDemo

OptionsDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OptionsDlg.h"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // COptionsDlg
00021
00022 IMPLEMENT_DYNAMIC(COptionsDlg, CMFCPropertySheet)
00023
00024 COptionsDlg::COptionsDlg(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00025 :CMFCPropertySheet(pszCaption, pParentWnd, iSelectPage)
00026 {
00027   SetLook(CMFCPropertySheet::PropSheetLook_Tree, 150 /* Tree control width */);
00028   SetIconsList(IDB_OPTIONSIMAGES, 16 /* Image width */);
00029
00030   CMFCPropertySheetCategoryInfo* pCat1 = AddTreeCategory(_T("Environment"), 0, 1);
00031
00032   AddPageToTree(pCat1, &m_Page11, -1, 2);
00033   AddPageToTree(pCat1, &m_Page12, -1, 2);
00034
00035   CMFCPropertySheetCategoryInfo* pCat2 = AddTreeCategory(_T("Source Control"), 0, 1);
00036
00037   AddPageToTree(pCat2, &m_Page21, -1, 2);
00038   AddPageToTree(pCat2, &m_Page22, -1, 2);
00039
00040   CMFCPropertySheetCategoryInfo* pCat3 = AddTreeCategory(_T("Text Editor"), 0, 1);
00041
00042   AddPageToTree(pCat3, &m_Page31, -1, 2);
00043   AddPageToTree(pCat3, &m_Page32, -1, 2);
00044 }
00045
00046 COptionsDlg::~COptionsDlg()
00047 {
00048 }
00049
00050 BEGIN_MESSAGE_MAP(COptionsDlg, CMFCPropertySheet)
00051 END_MESSAGE_MAP()
00052
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/resource.h Source File

  • ole
  • mfccalc

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by mfccalc.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDP_OLE_INIT_FAILED             100
00008 #define IDS_ABOUTBOX                    101
00009 #define IDD_MFCCALC_DIALOG              102
00010 #define IDS_ERROR                       102
00011 #define IDP_UNABLE_TO_SHOW_CALC         103
00012 #define IDR_MAINFRAME                   128
00013 #define IDB_0                           1000
00014 #define IDB_1                           1001
00015 #define IDB_2                           1002
00016 #define IDB_3                           1003
00017 #define IDB_4                           1004
00018 #define IDB_5                           1005
00019 #define IDB_6                           1006
00020 #define IDB_7                           1007
00021 #define IDB_8                           1008
00022 #define IDB_9                           1009
00023 #define IDB_PLUS                        1010
00024 #define IDB_MINUS                       1011
00025 #define IDB_TIMES                       1012
00026 #define IDB_DIVIDE                      1013
00027 #define IDC_INVISIBLE_FOCUS             1016
00028 #define IDB_CLOSE                       1017
00029 #define IDB_EQUAL                       1020
00030 #define IDB_CLEAR                       1021
00031 #define IDE_ACCUM                       1030
00032 #define ID_NOTHING                      32789
00033
00034 // Next default values for new objects
00035 //
00036 #ifdef APSTUDIO_INVOKED
00037 #ifndef APSTUDIO_READONLY_SYMBOLS
00038 #define _APS_3D_CONTROLS                     1
00039 #define _APS_NEXT_RESOURCE_VALUE        131
00040 #define _APS_NEXT_COMMAND_VALUE         32790
00041 #define _APS_NEXT_CONTROL_VALUE         1018
00042 #define _APS_NEXT_SYMED_VALUE           101
00043 #endif
00044 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/resource.h Source File

  • utility
  • guidgen

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by GuidGen.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_GUIDGEN_DIALOG              102
00009 #define IDP_ERR_INIT_OLE                102
00010 #define IDS_FORMATS                     104
00011 #define IDS_STRING105                   105
00012 #define IDS_STRING106                   106
00013 #define IDS_STRING107                   107
00014 #define IDS_STRING108                   108
00015 #define IDS_STRING109                   109
00016 #define IDR_MAINFRAME                   128
00017 #define IDC_RADIO1                      1000
00018 #define IDC_RADIO2                      1001
00019 #define IDC_RADIO3                      1002
00020 #define IDC_RADIO4                      1003
00021 #define IDC_RADIO5                      1004
00022 #define IDC_RADIO6                      1005
00023 #define IDC_RESULTS                     1100
00024 #define IDC_NEWGUID                     1101
00025 #define IDP_ERR_CREATE_GUID             2000
00026 #define IDP_ERR_OPEN_CLIP               2001
00027 #define IDP_ERR_LOCAL_ONLY              2002
00028 #define IDP_ERR_NO_ADDRESS              2003
00029 #define IDP_ERR_NOT_OK                  2004
00030
00031 // Next default values for new objects
00032 //
00033 #ifdef APSTUDIO_INVOKED
00034 #ifndef APSTUDIO_READONLY_SYMBOLS
00035 #define _APS_3D_CONTROLS                     1
00036 #define _APS_NEXT_RESOURCE_VALUE        129
00037 #define _APS_NEXT_COMMAND_VALUE         32771
00038 #define _APS_NEXT_CONTROL_VALUE         1006
00039 #define _APS_NEXT_SYMED_VALUE           101
00040 #endif
00041 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpinEditDlg Member List

This is the complete list of members for CSpinEditDlg, including all inherited members.
CSpinEditDlg() | CSpinEditDlg | [inline]
edit | CSpinEditDlg | [protected]
IDD enum value | CSpinEditDlg |
OnInitDialog() | CSpinEditDlg |
OnOK() | CSpinEditDlg | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/mswd6_32.h Source File

  • ole
  • wordpad

mswd6_32.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #ifndef MSWD6_32_H
00011 #define MSWD6_32_H
00012
00013 typedef unsigned long (pascal *PFN_RTF_CALLBACK)(int, int);
00014
00015 extern "C" int pascal InitConverter32(HANDLE, char *);
00016 extern "C" HANDLE pascal RegisterApp32(unsigned long, void *);
00017 extern "C" int pascal IsFormatCorrect32(HANDLE, HANDLE);
00018 extern "C" int pascal ForeignToRtf32(HANDLE, void *, HANDLE, HANDLE, HANDLE, PFN_RTF_CALLBACK);
00019 extern "C" int pascal RtfToForeign32(HANDLE, LPSTORAGE, HANDLE, HANDLE, PFN_RTF_CALLBACK);
00020
00021 #endif
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/unitspag.cpp Source File

  • ole
  • wordpad

unitspag.cpp

Go to the documentation of this file.
00001 // unitspag.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "unitspag.h"
00015 #include "helpids.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CUnitsPage dialog
00024
00025 const DWORD CUnitsPage::m_nHelpIDs[] =
00026 {
00027   IDC_BOX, IDH_COMM_GROUPBOX,
00028   IDC_UNITS_IN, IDH_WORDPAD_INCHES,
00029   IDC_UNITS_CM, IDH_WORDPAD_CENTIMETERS,
00030   IDC_UNITS_PT, IDH_WORDPAD_POINTS,
00031   IDC_UNITS_PI, IDH_WORDPAD_PICAS,
00032   IDC_WORDSEL, IDH_WORDPAD_OPTIONS_AUTOWORDSEL,
00033   0, 0
00034 };
00035
00036 CUnitsPage::CUnitsPage() : CCSPropertyPage(CUnitsPage::IDD)
00037 {
00038   //{{AFX_DATA_INIT(CUnitsPage)
00039   m_nUnits = -1;
00040   m_bWordSel = FALSE;
00041   //}}AFX_DATA_INIT
00042 }
00043
00044
00045 void CUnitsPage::DoDataExchange(CDataExchange* pDX)
00046 {
00047   CCSPropertyPage::DoDataExchange(pDX);
00048   //{{AFX_DATA_MAP(CUnitsPage)
00049   DDX_Radio(pDX, IDC_UNITS_IN, m_nUnits);
00050   DDX_Check(pDX, IDC_WORDSEL, m_bWordSel);
00051   //}}AFX_DATA_MAP
00052 }
00053
00054 BEGIN_MESSAGE_MAP(CUnitsPage, CCSPropertyPage)
00055   //{{AFX_MSG_MAP(CUnitsPage)
00056     // NOTE: the ClassWizard will add message map macros here
00057   //}}AFX_MSG_MAP
00058 END_MESSAGE_MAP()
00059
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CUnitsPage message handlers
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIntListView Member List

This is the complete list of members for CIntListView, including all inherited members.
AddIntToListBox(int n, int nSel=-1) | CIntListView | [protected]
CIntListView() | CIntListView |
DoDataExchange(CDataExchange *pDX) | CIntListView | [protected, virtual]
FindInt(int &nSel, POSITION &pos) | CIntListView | [protected]
GetDocument() | CIntListView | [inline]
IDD enum value | CIntListView |
m_ctlList | CIntListView |
m_int | CIntListView |
OnAdd() | CIntListView | [protected]
OnInitialUpdate() | CIntListView |
OnInsertBefore() | CIntListView | [protected]
OnRemove() | CIntListView | [protected]
OnRemoveAll() | CIntListView | [protected]
OnSelChangeList() | CIntListView | [protected]
OnUpdateButton() | CIntListView | [protected]
~CIntListView() | CIntListView | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpeedDlg Member List

This is the complete list of members for CSpeedDlg, including all inherited members.
CSpeedDlg(CWnd *pParent=NULL) | CSpeedDlg |
DoDataExchange(CDataExchange *pDX) | CSpeedDlg | [protected, virtual]
IDD enum value | CSpeedDlg |
m_nRecalcSpeedSeconds | CSpeedDlg |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibdoc.h Source File

  • general
  • diblook

dibdoc.h

Go to the documentation of this file.
00001 // dibdoc.h : interface of the CDibDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "dibapi.h"
00013
00014 class CDibDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CDibDoc();
00018   DECLARE_DYNCREATE(CDibDoc)
00019
00020 // Attributes
00021 public:
00022   HDIB GetHDIB() const
00023     { return m_hDIB; }
00024   CPalette* GetDocPalette() const
00025     { return m_palDIB; }
00026   CSize GetDocSize() const
00027     { return m_sizeDoc; }
00028
00029 // Operations
00030 public:
00031   void ReplaceHDIB(HDIB hDIB);
00032   void InitDIBData();
00033
00034 // Implementation
00035 protected:
00036   virtual ~CDibDoc();
00037
00038   virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
00039   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00040
00041 protected:
00042   HDIB m_hDIB;
00043   CPalette* m_palDIB;
00044   CSize m_sizeDoc;
00045
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050 protected:
00051   virtual BOOL    OnNewDocument();
00052
00053 // Generated message map functions
00054 protected:
00055   //{{AFX_MSG(CDibDoc)
00056   //}}AFX_MSG
00057   DECLARE_MESSAGE_MAP()
00058 };
00059
00060 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipdridoc.cpp Source File

  • ole
  • ipdrive

ipdridoc.cpp

Go to the documentation of this file.
00001 // ipdridoc.cpp : implementation of the CDriverDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ipdrive.h"
00014
00015 #include "ipdridoc.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDriverDoc
00024
00025 IMPLEMENT_DYNCREATE(CDriverDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CDriverDoc, CDocument)
00028   //{{AFX_MSG_MAP(CDriverDoc)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code!
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CDriverDoc construction/destruction
00036
00037 CDriverDoc::CDriverDoc()
00038 {
00039   if (!m_map.CreateDispatch(_T("mfc.inproc.varmap")))
00040   {
00041     AfxMessageBox(IDP_UNABLE_TO_CREATE_INPROC);
00042     AfxThrowUserException();
00043   }
00044 }
00045
00046 CDriverDoc::~CDriverDoc()
00047 {
00048 }
00049
00050 BOOL CDriverDoc::OnNewDocument()
00051 {
00052   if (!CDocument::OnNewDocument())
00053     return FALSE;
00054
00055   // TODO: add reinitialization code here
00056   // (SDI documents will reuse this document)
00057
00058   return TRUE;
00059 }
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CDriverDoc serialization
00063
00064 void CDriverDoc::Serialize(CArchive& ar)
00065 {
00066   if (ar.IsStoring())
00067   {
00068     // TODO: add storing code here
00069   }
00070   else
00071   {
00072     // TODO: add loading code here
00073   }
00074 }
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077 // CDriverDoc diagnostics
00078
00079 #ifdef _DEBUG
00080 void CDriverDoc::AssertValid() const
00081 {
00082   CDocument::AssertValid();
00083 }
00084
00085 void CDriverDoc::Dump(CDumpContext& dc) const
00086 {
00087   CDocument::Dump(dc);
00088 }
00089 #endif //_DEBUG
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // CDriverDoc commands
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlist.h Source File

  • controls
  • xlist

xlist.h

Go to the documentation of this file.
00001 // xlist.h : main header file for XLIST.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #if !defined( __AFXCTL_H__ )
00014   #error include 'afxctl.h' before including this file
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CXlistApp : See xlist.cpp for implementation.
00021
00022 class CXlistApp : public COleControlModule
00023 {
00024 public:
00025   BOOL InitInstance();
00026   int ExitInstance();
00027 };
00028
00029 extern const GUID CDECL _tlid;
00030 extern const WORD _wVerMajor;
00031 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBar.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMLinksBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMLinksBar.h : header file
00013 //
00014
00015 #include "MSMToolBar.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CMSMLinksBar window
00019
00020 class CMSMLinksBar : public CMSMToolBar
00021 {
00022   DECLARE_DYNCREATE(CMSMLinksBar)
00023 // Construction
00024 public:
00025   CMSMLinksBar ();
00026
00027   virtual ~CMSMLinksBar ();
00028
00029 // Attributes
00030 public:
00031
00032 // Operations
00033 public:
00034
00035 // Implementation
00036 public:
00037   virtual int GetRowHeight () const
00038         {
00039           return 1;
00040         }
00041
00042   void SetCurrentCommand (UINT nCommand)
00043      {
00044       m_CurrentCommand = nCommand;
00045      }
00046
00047   UINT GetCurrentCommand () const
00048      {
00049       return m_CurrentCommand;
00050      }
00051
00052 protected:
00053   DECLARE_MESSAGE_MAP()
00054
00055 private:
00056   UINT m_CurrentCommand;
00057 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/OutputBar.h Source File

  • vc2008fp
  • StateCollection

OutputBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class COutputBar : public CDockablePane
00014 {
00015 public:
00016   COutputBar();
00017
00018 // Attributes
00019 protected:
00020   CMFCTabCtrl m_wndTabs;
00021
00022   CListCtrl m_wndList1;
00023   CListCtrl m_wndList2;
00024   CListCtrl m_wndList3;
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030
00031 // Implementation
00032 public:
00033   virtual ~COutputBar();
00034
00035 protected:
00036   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00037   afx_msg void OnSize(UINT nType, int cx, int cy);
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/stdafx.cpp Source File

  • ole
  • inproc

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/stdafx.cpp Source File

  • general
  • CTaskDialog

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // TaskDialogTest.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/multconv.cpp Source File

  • ole
  • wordpad

multconv.cpp

Go to the documentation of this file.
00001 // convert.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "multconv.h"
00015 #include "mswd6_32.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 #ifdef CONVERTERS
00023 CConverter* CConverter::m_pThis = NULL;
00024 #endif
00025
00026 #define BUFFSIZE 4096
00027
00028 CTrackFile::CTrackFile(CFrameWnd* pWnd) : CFile()
00029 {
00030   m_nLastPercent = -1;
00031   m_dwLength = 0;
00032   m_pFrameWnd = pWnd;
00033   VERIFY(m_strComplete.LoadString(IDS_COMPLETE));
00034   VERIFY(m_strWait.LoadString(IDS_PLEASE_WAIT));
00035   VERIFY(m_strSaving.LoadString(IDS_SAVING));
00036 //  OutputPercent(0);
00037 }
00038
00039 CTrackFile::~CTrackFile()
00040 {
00041   OutputPercent(100);
00042   if (m_pFrameWnd != NULL)
00043     m_pFrameWnd->SetMessageText(AFX_IDS_IDLEMESSAGE);
00044 }
00045
00046 UINT CTrackFile::Read(void FAR* lpBuf, UINT nCount)
00047 {
00048   UINT n = CFile::Read(lpBuf, nCount);
00049   if (m_dwLength != 0)
00050     OutputPercent((int)((GetPosition()*100)/m_dwLength));
00051   return n;
00052 }
00053
00054 void CTrackFile::Write(const void FAR* lpBuf, UINT nCount)
00055 {
00056   CFile::Write(lpBuf, nCount);
00057   OutputString(m_strSaving);
00058 //  if (m_dwLength != 0)
00059 //      OutputPercent((int)((GetPosition()*100)/m_dwLength));
00060 }
00061
00062 void CTrackFile::OutputString(LPCTSTR lpsz)
00063 {
00064   if (m_pFrameWnd != NULL)
00065   {
00066     m_pFrameWnd->SetMessageText(lpsz);
00067     CWnd* pBarWnd = m_pFrameWnd->GetMessageBar();
00068     if (pBarWnd != NULL)
00069       pBarWnd->UpdateWindow();
00070   }
00071 }
00072
00073 void CTrackFile::OutputPercent(int nPercentComplete)
00074 {
00075   if (m_pFrameWnd != NULL && m_nLastPercent != nPercentComplete)
00076   {
00077     m_nLastPercent = nPercentComplete;
00078     TCHAR buf[64];
00079     int n = nPercentComplete;
00080     _stprintf_s(buf, 64, (n==100) ? m_strWait : m_strComplete, n);
00081     OutputString(buf);
00082   }
00083 }
00084
00085 COEMFile::COEMFile(CFrameWnd* pWnd) : CTrackFile(pWnd)
00086 {
00087 }
00088
00089 UINT COEMFile::Read(void FAR* lpBuf, UINT nCount)
00090 {
00091   UINT n = CTrackFile::Read(lpBuf, nCount);
00092   OemToCharBuffA((const char*)lpBuf, (char*)lpBuf, n);
00093   return n;
00094 }
00095
00096 void COEMFile::Write(const void FAR* lpBuf, UINT nCount)
00097 {
00098   CharToOemBuffA((const char*)lpBuf, (char*)lpBuf, nCount);
00099   CTrackFile::Write(lpBuf, nCount);
00100 }
00101
00102 #ifdef CONVERTERS
00103
00104 HGLOBAL CConverter::StringToHGLOBAL(LPCSTR pstr)
00105 {
00106   HGLOBAL hMem = NULL;
00107   if (pstr != NULL)
00108   {
00109     hMem = GlobalAlloc(GHND, (lstrlenA(pstr)*2)+1);
00110     char* p = (char*) GlobalLock(hMem);
00111     ASSERT(p != NULL);
00112     if (p != NULL)
00113       strcpy_s(p, (lstrlenA(pstr)*2)+1, pstr);
00114     GlobalUnlock(hMem);
00115   }
00116   return hMem;
00117 }
00118
00119 CConverter::CConverter(LPCSTR pszLibName, CFrameWnd* pWnd) : CTrackFile(pWnd)
00120 {
00121   USES_CONVERSION;
00122   m_hBuff = NULL;
00123   m_pBuf = NULL;
00124   m_nBytesAvail = 0;
00125   m_nBytesWritten = 0;
00126   m_nPercent = 0;
00127   m_hEventFile = NULL;
00128   m_hEventConv = NULL;
00129   m_bDone = TRUE;
00130   m_bConvErr = FALSE;
00131   m_hFileName = NULL;
00132   OFSTRUCT ofs;
00133   if (OpenFile(pszLibName, &ofs, OF_EXIST) == HFILE_ERROR)
00134   {
00135     m_hLibCnv = NULL;
00136     return;
00137   }
00138   m_hLibCnv = LoadLibraryA(pszLibName);
00139   if (m_hLibCnv < (HINSTANCE)HINSTANCE_ERROR)
00140     m_hLibCnv = NULL;
00141   else
00142   {
00143     LoadFunctions();
00144     ASSERT(m_pInitConverter != NULL);
00145     if (m_pInitConverter != NULL)
00146     {
00147       CString str = AfxGetAppName();
00148       str.MakeUpper();
00149       VERIFY(m_pInitConverter(AfxGetMainWnd()->GetSafeHwnd(), T2CA(str)));
00150     }
00151   }
00152 }
00153
00154 CConverter::CConverter(CFrameWnd* pWnd) : CTrackFile(pWnd)
00155 {
00156   m_pInitConverter = NULL;
00157   m_pIsFormatCorrect = NULL;
00158   m_pForeignToRtf = NULL;
00159   m_pRtfToForeign = NULL;
00160   m_bConvErr = FALSE;
00161   m_hFileName = NULL;
00162 }
00163
00164 CConverter::~CConverter()
00165 {
00166   if (!m_bDone) // converter thread hasn't exited
00167   {
00168     WaitForConverter();
00169     m_nBytesAvail = 0;
00170     VERIFY(ResetEvent(m_hEventFile));
00171     m_nBytesAvail = 0;
00172     SetEvent(m_hEventConv);
00173     WaitForConverter();// wait for DoConversion exit
00174     VERIFY(ResetEvent(m_hEventFile));
00175   }
00176
00177   if (m_hEventFile != NULL)
00178     VERIFY(CloseHandle(m_hEventFile));
00179   if (m_hEventConv != NULL)
00180     VERIFY(CloseHandle(m_hEventConv));
00181   if (m_hLibCnv != NULL)
00182     FreeLibrary(m_hLibCnv);
00183   if (m_hFileName != NULL)
00184     GlobalFree(m_hFileName);
00185 }
00186
00187 void CConverter::WaitForConverter()
00188 {
00189   // while event not signalled -- process messages
00190   while (MsgWaitForMultipleObjects(1, &m_hEventFile, FALSE, INFINITE,
00191     QS_SENDMESSAGE) != WAIT_OBJECT_0)
00192   {
00193     MSG msg;
00194     PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE);
00195   }
00196 }
00197
00198 void CConverter::WaitForBuffer()
00199 {
00200   // while event not signalled -- process messages
00201   while (MsgWaitForMultipleObjects(1, &m_hEventConv, FALSE, INFINITE,
00202     QS_SENDMESSAGE) != WAIT_OBJECT_0)
00203   {
00204     MSG msg;
00205     PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE);
00206   }
00207 }
00208
00209 UINT CConverter::ConverterThread(LPVOID)
00210 {
00211   ENSURE(m_pThis != NULL);
00212
00213   HRESULT hRes = OleInitialize(NULL);
00214   ASSERT(hRes == S_OK || hRes == S_FALSE);
00215   m_pThis->DoConversion();
00216   OleUninitialize();
00217
00218   return 0;
00219 }
00220
00221 BOOL CConverter::IsFormatCorrect(LPCTSTR pszFileName)
00222 {
00223   USES_CONVERSION;
00224   int nRet;
00225   if (m_hLibCnv == NULL || m_pIsFormatCorrect == NULL)
00226     return FALSE;
00227
00228   char buf[_MAX_PATH];
00229   strcpy_s(buf, MAX_PATH, T2CA(pszFileName));
00230
00231   CharToOemA(buf, buf);
00232
00233   HGLOBAL hFileName = StringToHGLOBAL(buf);
00234   HGLOBAL hDesc = GlobalAlloc(GHND, 256);
00235   ASSERT(hDesc != NULL);
00236   nRet = m_pIsFormatCorrect(hFileName, hDesc);
00237   GlobalFree(hDesc);
00238   GlobalFree(hFileName);
00239   return (nRet == 1) ? TRUE : FALSE;
00240 }
00241
00242 // static callback function
00243 int CALLBACK CConverter::WriteOutStatic(int cch, int nPercentComplete)
00244 {
00245   ENSURE(m_pThis != NULL);
00246   return m_pThis->WriteOut(cch, nPercentComplete);
00247 }
00248
00249 int CALLBACK CConverter::WriteOut(int cch, int nPercentComplete)
00250 {
00251   ASSERT(m_hBuff != NULL);
00252   m_nPercent = nPercentComplete;
00253   if (m_hBuff == NULL)
00254     return -9;
00255   if (cch != 0)
00256   {
00257     WaitForBuffer();
00258     VERIFY(ResetEvent(m_hEventConv));
00259     m_nBytesAvail = cch;
00260     SetEvent(m_hEventFile);
00261     WaitForBuffer();
00262   }
00263   return 0; //everything OK
00264 }
00265
00266 int CALLBACK CConverter::ReadInStatic(int /*flags*/, int nPercentComplete)
00267 {
00268   ENSURE(m_pThis != NULL);
00269   return m_pThis->ReadIn(nPercentComplete);
00270 }
00271
00272 int CALLBACK CConverter::ReadIn(int /*nPercentComplete*/)
00273 {
00274   ASSERT(m_hBuff != NULL);
00275   if (m_hBuff == NULL)
00276     return -8;
00277
00278   SetEvent(m_hEventFile);
00279   WaitForBuffer();
00280   VERIFY(ResetEvent(m_hEventConv));
00281
00282   return m_nBytesAvail;
00283 }
00284
00285 BOOL CConverter::DoConversion()
00286 {
00287   USES_CONVERSION;
00288   m_nLastPercent = -1;
00289 //  m_dwLength = 0; // prevent Read/Write from displaying
00290   m_nPercent = 0;
00291
00292   ASSERT(m_hBuff != NULL);
00293   ASSERT(m_pThis != NULL);
00294   HGLOBAL hDesc = StringToHGLOBAL("");
00295   HGLOBAL hSubset = StringToHGLOBAL("");
00296
00297   int nRet = 0;
00298   if (m_bForeignToRtf)
00299   {
00300     ASSERT(m_pForeignToRtf != NULL);
00301     ASSERT(m_hFileName != NULL);
00302     nRet = m_pForeignToRtf(m_hFileName, NULL, m_hBuff, hDesc, hSubset,
00303       (LPFNOUT)WriteOutStatic);
00304     // wait for next CConverter::Read to come through
00305     WaitForBuffer();
00306     VERIFY(ResetEvent(m_hEventConv));
00307   }
00308   else if (!m_bForeignToRtf)
00309   {
00310     ASSERT(m_pRtfToForeign != NULL);
00311     ASSERT(m_hFileName != NULL);
00312     nRet = m_pRtfToForeign(m_hFileName, NULL, m_hBuff, hDesc,
00313       (LPFNIN)ReadInStatic);
00314     // don't need to wait for m_hEventConv
00315   }
00316
00317   GlobalFree(hDesc);
00318   GlobalFree(hSubset);
00319   if (m_pBuf != NULL)
00320     GlobalUnlock(m_hBuff);
00321   GlobalFree(m_hBuff);
00322
00323   if (nRet != 0)
00324     m_bConvErr = TRUE;
00325
00326   m_bDone = TRUE;
00327   m_nPercent = 100;
00328   m_nLastPercent = -1;
00329
00330   SetEvent(m_hEventFile);
00331
00332   return (nRet == 0);
00333 }
00334
00335 void CConverter::LoadFunctions()
00336 {
00337   m_pInitConverter = (PINITCONVERTER)GetProcAddress(m_hLibCnv, "InitConverter32");
00338   m_pIsFormatCorrect = (PISFORMATCORRECT)GetProcAddress(m_hLibCnv, "IsFormatCorrect32");
00339   m_pForeignToRtf = (PFOREIGNTORTF)GetProcAddress(m_hLibCnv, "ForeignToRtf32");
00340   m_pRtfToForeign = (PRTFTOFOREIGN)GetProcAddress(m_hLibCnv, "RtfToForeign32");
00341 }
00342 #endif
00343
00344 ///////////////////////////////////////////////////////////////////////////////
00345
00346 BOOL CConverter::Open(LPCTSTR pszFileName, UINT nOpenFlags,
00347   CFileException* pException)
00348 {
00349   USES_CONVERSION;
00350   // we convert to oem and back because of the following case
00351   // test(c).txt becomes testc.txt in OEM and stays testc.txt to Ansi
00352   char buf[_MAX_PATH];
00353   strncpy_s(buf, _MAX_PATH, T2CA(pszFileName), _TRUNCATE);
00354   buf[_MAX_PATH-1] = NULL;
00355   int nLen = (int)strlen(buf);
00356   if(nLen >= _MAX_PATH)
00357   {
00358     nLen = _MAX_PATH - 1;
00359   }
00360
00361   CharToOemBuffA(buf, buf, nLen);
00362   OemToCharBuffA(buf, buf, nLen);
00363
00364   LPTSTR lpszFileNameT = A2T(buf);
00365
00366   // let's make sure we could do what is wanted directly even though we aren't
00367   m_bCloseOnDelete = FALSE;
00368   m_hFile = (HANDLE)hFileNull;
00369
00370   BOOL bOpen = CFile::Open(lpszFileNameT, nOpenFlags, pException);
00371   CFile::Close();
00372   if (!bOpen)
00373     return FALSE;
00374
00375   m_bForeignToRtf = !(nOpenFlags & (CFile::modeReadWrite | CFile::modeWrite));
00376
00377   // check for reading empty file
00378   if (m_bForeignToRtf)
00379   {
00380     CFileStatus stat;
00381     if (CFile::GetStatus(lpszFileNameT, stat) && stat.m_size == 0)
00382       return TRUE;
00383   }
00384
00385   //set security attributes to inherit handle
00386   SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
00387   //create the events
00388   m_hEventFile = CreateEvent(&sa, TRUE, FALSE, NULL);
00389   m_hEventConv = CreateEvent(&sa, TRUE, FALSE, NULL);
00390   //create the converter thread and create the events
00391
00392   CharToOemA(buf, buf);
00393   ASSERT(m_hFileName == NULL);
00394   m_hFileName = StringToHGLOBAL(buf);
00395
00396   m_pThis = this;
00397   m_bDone = FALSE;
00398   m_hBuff = GlobalAlloc(GHND, BUFFSIZE);
00399   ASSERT(m_hBuff != NULL);
00400
00401   AfxBeginThread(ConverterThread, this, THREAD_PRIORITY_NORMAL, 0, 0, &sa);
00402
00403   return TRUE;
00404 }
00405
00406 // m_hEventConv -- the main thread signals this event when ready for more data
00407 // m_hEventFile -- the converter signals this event when data is ready
00408
00409 UINT CConverter::Read(void FAR* lpBuf, UINT nCount)
00410 {
00411   ASSERT(m_bForeignToRtf);
00412   if (m_bDone)
00413     return 0;
00414   // if converter is done
00415   int cch = nCount;
00416   BYTE* pBuf = (BYTE*)lpBuf;
00417   while (cch != 0)
00418   {
00419     if (m_nBytesAvail == 0)
00420     {
00421       if (m_pBuf != NULL)
00422         GlobalUnlock(m_hBuff);
00423       m_pBuf = NULL;
00424       SetEvent(m_hEventConv);
00425       WaitForConverter();
00426       VERIFY(ResetEvent(m_hEventFile));
00427       if (m_bConvErr)
00428         AfxThrowFileException(CFileException::genericException);
00429       if (m_bDone)
00430         return nCount - cch;
00431       m_pBuf = (BYTE*)GlobalLock(m_hBuff);
00432       ASSERT(m_pBuf != NULL);
00433     }
00434     int nBytes = min(cch, m_nBytesAvail);
00435     memcpy_s(pBuf, nCount, m_pBuf, nBytes);
00436     pBuf += nBytes;
00437     m_pBuf += nBytes;
00438     m_nBytesAvail -= nBytes;
00439     cch -= nBytes;
00440     OutputPercent(m_nPercent);
00441   }
00442   return nCount - cch;
00443 }
00444
00445 void CConverter::Write(const void FAR* lpBuf, UINT nCount)
00446 {
00447   ASSERT(!m_bForeignToRtf);
00448
00449   m_nBytesWritten += nCount;
00450   while (nCount != 0)
00451   {
00452     WaitForConverter();
00453     VERIFY(ResetEvent(m_hEventFile));
00454     if (m_bConvErr)
00455       AfxThrowFileException(CFileException::genericException);
00456     m_nBytesAvail = min(nCount, BUFFSIZE);
00457     nCount -= m_nBytesAvail;
00458     BYTE* pBuf = (BYTE*)GlobalLock(m_hBuff);
00459     ASSERT(pBuf != NULL);
00460     memcpy_s(pBuf, nCount, lpBuf, m_nBytesAvail);
00461     GlobalUnlock(m_hBuff);
00462     SetEvent(m_hEventConv);
00463   }
00464   OutputString(m_strSaving);
00465 }
00466
00467 ULONGLONG CConverter::Seek(LONGLONG lOff, UINT nFrom)
00468 {
00469   if (lOff != 0 && nFrom != current)
00470     AfxThrowNotSupportedException();
00471   return 0;
00472 }
00473
00474 ULONGLONG CConverter::GetPosition() const
00475 {
00476   return 0;
00477 }
00478
00479 void CConverter::Flush()
00480 {
00481 }
00482
00483 void CConverter::Close()
00484 {
00485 }
00486
00487 void CConverter::Abort()
00488 {
00489 }
00490
00491 ULONGLONG CConverter::GetLength() const
00492 {
00493   ASSERT_VALID(this);
00494   return 1;
00495 }
00496
00497 CFile* CConverter::Duplicate() const
00498 {
00499   AfxThrowNotSupportedException();
00500 }
00501
00502 void CConverter::LockRange(ULONGLONG, ULONGLONG)
00503 {
00504   AfxThrowNotSupportedException();
00505 }
00506
00507 void CConverter::UnlockRange(ULONGLONG, ULONGLONG)
00508 {
00509   AfxThrowNotSupportedException();
00510 }
00511
00512 void CConverter::SetLength(ULONGLONG)
00513 {
00514   AfxThrowNotSupportedException();
00515 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInterfaceViewer Member List

This is the complete list of members for CInterfaceViewer, including all inherited members.
CInterfaceViewer() | CInterfaceViewer |
OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CInterfaceViewer | [virtual]
View(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CInterfaceViewer |
~CInterfaceViewer() | CInterfaceViewer | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionsPage21 Member List

This is the complete list of members for COptionsPage21, including all inherited members.
COptionsPage21() | COptionsPage21 |
DoDataExchange(CDataExchange *pDX) | COptionsPage21 | [protected, virtual]
IDD enum value | COptionsPage21 |
~COptionsPage21() | COptionsPage21 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyToolTipCtrl Member List

This is the complete list of members for CMyToolTipCtrl, including all inherited members.
CMyToolTipCtrl() | CMyToolTipCtrl |
GetIconSize() | CMyToolTipCtrl | [virtual]
m_hIcon | CMyToolTipCtrl | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMyToolTipCtrl | [protected]
OnDrawIcon(CDC *pDC, CRect rectImage) | CMyToolTipCtrl | [virtual]
OnDrawSeparator(CDC *pDC, int x1, int x2, int y) | CMyToolTipCtrl | [virtual]
OnFillBackground(CDC *pDC, CRect rect, COLORREF &clrText, COLORREF &clrLine) | CMyToolTipCtrl | [virtual]
SetDescription(const CString strDesrciption) | CMyToolTipCtrl | [virtual]
~CMyToolTipCtrl() | CMyToolTipCtrl | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Modeless.cpp Source File

  • general
  • dlgcbr32

Modeless.cpp

Go to the documentation of this file.
00001 // Modeless.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014   Purpose:
00015   Implements CModelessDialog, a reusable class for creating modeless
00016   dialogs.
00017
00018   Functions:
00019   CModelessDialog::CModelessDialog()      -- constructor
00020   CModelessDialog::~CModelessDialog()     -- destructor
00021   CModelessDialog::OnCancel()             -- WM_COMMAND IDCANCEL handler
00022   CModelessDialog::OnOK()                 -- WM_COMMAND IDOK handler
00023   CModelessDialog::PostNcDestroy()        -- called after WM_NCDESTROY
00024
00025   Development Team:
00026   Mary Kirtland
00027   Ported to 32-bit by:
00028   Mike Hedley
00029   Created by Microsoft Product Support Services, Premier ISV Support
00030   Copyright (c) Microsoft Corporation.  All rights reserved.
00031 \****************************************************************************/
00032
00033 #include "stdafx.h"
00034 #include "modeless.h"
00035
00036 #ifdef _DEBUG
00037 #define new DEBUG_NEW
00038 #undef THIS_FILE
00039 static char THIS_FILE[] = __FILE__;
00040 #endif
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CModelessDialog
00044
00045 IMPLEMENT_DYNAMIC(CModelessDialog, CDialog)
00046
00047 BEGIN_MESSAGE_MAP(CModelessDialog, CDialog)
00048   //{{AFX_MSG_MAP(CModelessDialog)
00049   //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CModelessDialog Construction/Destruction
00054
00055 CModelessDialog::CModelessDialog()
00056 {
00057 }
00058
00059 CModelessDialog::~CModelessDialog()
00060 {
00061 }
00062
00063 void CModelessDialog::PostNcDestroy()
00064 {
00065   delete this;
00066 }
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CModelessDialog::OnCancel
00070 //      Modeless dialogs must not call EndDialog(), as CDialog::OnCancel()
00071 //      does.  All we need to do is destroy the window.
00072
00073 void CModelessDialog::OnCancel()
00074 {
00075   DestroyWindow();
00076 }
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // CModelessDialog::OnOK
00080 //      Modeless dialogs must not call EndDialog(), as CDialog::OnOK() does
00081 //      We retrieve data from the controls using DDX, then destroy the
00082 //      window.
00083
00084 void CModelessDialog::OnOK()
00085 {
00086   if (!UpdateData(TRUE))
00087   {
00088     TRACE0("UpdateData failed -- modeless dialog terminate\n");
00089     return;
00090   }
00091   DestroyWindow();
00092 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/StdAfx.cpp Source File

  • vc2008fp
  • TrayMenu

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  TrayMenu.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWorkspaceObj Member List

This is the complete list of members for CWorkspaceObj, including all inherited members.
CWorkspaceObj(const CString &strName, const UINT uiCmd, const int iIconIndex, const UINT uiDefaultNewAction) | CWorkspaceObj |
m_iIconIndex | CWorkspaceObj |
m_strName | CWorkspaceObj |
m_uiCmd | CWorkspaceObj |
m_uiDefaultNewAction | CWorkspaceObj |
~CWorkspaceObj() | CWorkspaceObj | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MFileWnd.H Source File

  • ole
  • TstCon

MFileWnd.H

Go to the documentation of this file.
00001 // File: MFileWnd.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_METAFILEWND_H__E1CB782F_3AB4_11D1_8E47_00C04FB68D60__INCLUDED_)
00011 #define AFX_METAFILEWND_H__E1CB782F_3AB4_11D1_8E47_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // MetaFileWnd.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CMetaFileWnd window
00021
00022 class CMetaFileWnd : public CFrameWnd
00023 {
00024 // Construction
00025 public:
00026   CMetaFileWnd();
00027
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033    void SetObject( IUnknown* pObject );
00034
00035 // Overrides
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CMetaFileWnd)
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 public:
00042   virtual ~CMetaFileWnd();
00043
00044 protected:
00045    HMETAFILE m_hMetaFile;
00046    IOleObjectPtr m_pOleObject;
00047    IViewObjectPtr m_pViewObject;
00048    CSize m_size;
00049
00050   // Generated message map functions
00051 protected:
00052   //{{AFX_MSG(CMetaFileWnd)
00053   afx_msg void OnPaint();
00054   //}}AFX_MSG
00055   DECLARE_MESSAGE_MAP()
00056 };
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059
00060 //{{AFX_INSERT_LOCATION}}
00061 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00062
00063 #endif // !defined(AFX_METAFILEWND_H__E1CB782F_3AB4_11D1_8E47_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CColorPage Member List

This is the complete list of members for CColorPage, including all inherited members.
CColorPage() | CColorPage |
DoDataExchange(CDataExchange *pDX) | CColorPage | [protected, virtual]
IDD enum value | CColorPage |
m_nColor | CColorPage |
OnColorClicked(UINT nCmdID) | CColorPage | [protected]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSliderDoc Member List

This is the complete list of members for CSliderDoc, including all inherited members.
CSliderDoc() | CSliderDoc | [protected]
OnNewDocument() | CSliderDoc | [virtual]
Serialize(CArchive &ar) | CSliderDoc | [virtual]
~CSliderDoc() | CSliderDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localifr.odl Source File

  • controls
  • localize

localifr.odl

Go to the documentation of this file.
00001 // localifr.odl : French type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the French type library for the Localize sample control
00005 // (localifr.tlb).
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(879D6FE3-5470-101B-B57B-00608CC96AFA), version(1.0),
00019   helpstring("Localize OLE Custom Control module"), control,
00020   lcid(0x040c) ]
00021 library LocalizeLib
00022 {
00023   importlib(STDOLE_TLB);
00024   importlib(STDTYPE_TLB);
00025
00026   //  Primary dispatch interface for CLocalizeCtrl
00027
00028   [ uuid(035E3E52-6745-101B-B57B-00608CC96AFA),
00029     helpstring("Dispatch interface for Localize Control"), hidden ]
00030   dispinterface _DLocalize
00031   {
00032     properties:
00033       // NOTE - ClassWizard will maintain property information here.
00034       //    Use extreme caution when editing this section.
00035       //{{AFX_ODL_PROP(CLocalizeCtrl)
00036       [id(1)] boolean InvertInFrench;
00037       [id(DISPID_CAPTION), bindable, requestedit] BSTR CaptionInFrench;
00038       //}}AFX_ODL_PROP
00039
00040     methods:
00041       // NOTE - ClassWizard will maintain method information here.
00042       //    Use extreme caution when editing this section.
00043       //{{AFX_ODL_METHOD(CLocalizeCtrl)
00044       //}}AFX_ODL_METHOD
00045
00046       [id(DISPID_ABOUTBOX)] void AboutBoxInFrench();
00047   };
00048
00049   //  Event dispatch interface for CLocalizeCtrl
00050
00051   [ uuid(035E3E53-6745-101B-B57B-00608CC96AFA),
00052     helpstring("Event interface for Localize Control") ]
00053   dispinterface _DLocalizeEvents
00054   {
00055     properties:
00056       //  Event interface has no properties
00057
00058     methods:
00059       // NOTE - ClassWizard will maintain event information here.
00060       //    Use extreme caution when editing this section.
00061       //{{AFX_ODL_EVENT(CLocalizeCtrl)
00062       [id(DISPID_CLICK)] void ClickInFrench();
00063       //}}AFX_ODL_EVENT
00064   };
00065
00066   //  Class information for CLocalizeCtrl
00067
00068   [ uuid(879D6FE0-5470-101B-B57B-00608CC96AFA),
00069     helpstring("Localize Control (in French)"), control ]
00070   coclass Localize
00071   {
00072     [default] dispinterface _DLocalize;
00073     [default, source] dispinterface _DLocalizeEvents;
00074   };
00075
00076
00077   //{{AFX_APPEND_ODL}}
00078 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLicensedCtrl Member List

This is the complete list of members for CLicensedCtrl, including all inherited members.
BEGIN_OLEFACTORY(CLicensedCtrl) virtual BOOL VerifyUserLicense() | CLicensedCtrl | [protected]
CLicensedCtrl() | CLicensedCtrl |
DECLARE_OLETYPELIB(CLicensedCtrl) DECLARE_PROPPAGEIDS(CLicensedCtrl) DECLARE_OLECTLTYPE(CLicensedCtrl) afx_msg void AboutBox() | CLicensedCtrl | [protected]
DoPropExchange(CPropExchange *pPX) | CLicensedCtrl | [virtual]
GetLicenseKey(DWORD, BSTR FAR *) | CLicensedCtrl | [protected, virtual]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CLicensedCtrl | [virtual]
OnResetState() | CLicensedCtrl | [virtual]
~CLicensedCtrl() | CLicensedCtrl | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/Exports.cpp Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

Exports.cpp

Go to the documentation of this file.
00001 // File: Exports.cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "stdafx.h"
00011 #include <AtlImage.h>
00012 #include "DllScreenCap.h"
00013 #include "ScreenCapApi.h"
00014 #include "ConfigDlg.h"
00015
00016 static CString GetTempName(CString strPath);
00017
00018 BOOL WINAPI ConfigureCapture(HWND hWndParent, CaptureData* lpData)
00019 {
00020   ASSERT(lpData);
00021   if (!lpData)
00022     return(FALSE);
00023
00024   AFX_MANAGE_STATE(AfxGetStaticModuleState());
00025   CConfigDlg dlg(lpData->bCaptureFullScreen,
00026     CA2T(lpData->szCapturePath), CWnd::FromHandle(hWndParent));
00027   BOOL bStat = FALSE;
00028   if (dlg.DoModal() == IDOK) {
00029     bStat = TRUE;
00030     lpData->bCaptureFullScreen = dlg.m_nFullScreen > 0;
00031     strncpy_s(lpData->szCapturePath, MAX_PATH, CT2A(dlg.m_strPath), _TRUNCATE);
00032     *lpData->szCaptureFilename = '\0';
00033   }
00034   return(bStat);
00035 }
00036
00037 void WINAPI CaptureScreen(CaptureData* lpData)
00038 {
00039   ASSERT(lpData);
00040   if (!lpData)
00041     return;
00042
00043   AFX_MANAGE_STATE(AfxGetStaticModuleState());
00044
00045   BOOL bStat;
00046   CImage image;
00047   CWnd *pWnd;
00048   CRect rect;
00049   if (lpData->bCaptureFullScreen) {
00050     pWnd = CWnd::GetDesktopWindow();
00051   }
00052   else {
00053     pWnd = CWnd::GetActiveWindow();
00054   }
00055   ASSERT(pWnd);
00056   if (pWnd == NULL)
00057     return;
00058
00059   CWindowDC  winDC(pWnd);
00060   pWnd->GetWindowRect(rect);
00061   int nBPP = winDC.GetDeviceCaps(BITSPIXEL) * winDC.GetDeviceCaps(PLANES);
00062   if (nBPP < 24)
00063     nBPP = 24;
00064   bStat = image.Create(rect.Width(), rect.Height(), nBPP);
00065   ASSERT(bStat);
00066   if (!bStat)
00067     return;
00068   CImageDC imageDC(image);
00069   ::BitBlt(imageDC, 0, 0, rect.Width(), rect.Height(), winDC, 0, 0, SRCCOPY);
00070   CString strTempName = GetTempName(CString(lpData->szCapturePath));
00071   HRESULT hr = image.Save(strTempName);
00072   if (FAILED(hr)) {
00073     TRACE("Couldn't Save File: %s, %x\n", (LPCTSTR)strTempName, hr);
00074     return;
00075   }
00076   strncpy_s(lpData->szCaptureFilename, MAX_PATH, CT2A(::PathFindFileName(strTempName)), _TRUNCATE);
00077 }
00078
00079 BOOL WINAPI FilterDllMsg(LPMSG lpMsg)
00080 {
00081   AFX_MANAGE_STATE(AfxGetStaticModuleState());
00082   TRY
00083   {
00084     return AfxGetThread()->PreTranslateMessage(lpMsg);
00085   }
00086   END_TRY
00087   return FALSE;
00088 }
00089
00090 void WINAPI ProcessDllIdle()
00091 {
00092   AFX_MANAGE_STATE(AfxGetStaticModuleState());
00093   TRY
00094   {
00095     // flush it all at once
00096     long lCount = 0;
00097     while (AfxGetThread()->OnIdle(lCount))
00098       lCount++;
00099   }
00100   END_TRY
00101 }
00102
00103 static CString GetTempName(CString strPath)
00104 {
00105   const int nMin = 0;
00106   const int nMax = 999;
00107   const CString strBase(_T("ScreenCap"));
00108   static int nLastKnown = nMin;
00109
00110   // count up sequentially to make sure we take the next available
00111   // slot
00112   if (strPath.Right(1) != "\\")
00113     strPath += '\\';
00114
00115   bool bFound = false;
00116   CString strPathName;
00117   while (!bFound) {
00118     if (nLastKnown > nMax)
00119       break;
00120     strPathName = strPath + strBase;
00121     strPathName.AppendFormat(_T("%03.3d.png"), nLastKnown++);
00122     HANDLE hFile = ::CreateFile(strPathName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
00123     if (hFile != INVALID_HANDLE_VALUE) {
00124       ::CloseHandle(hFile);
00125       bFound = TRUE;
00126     }
00127   }
00128   if (!bFound)
00129     strPathName.Empty();
00130   return(strPathName);
00131 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroView.cpp Source File

  • general
  • spiro

spiroView.cpp

Go to the documentation of this file.
00001 // spiroView.cpp : implementation of the CSpiroView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "spiro.h"
00014 #include "piece.h"
00015 #include "mainfrm.h"
00016
00017 #pragma warning( disable : 4189 )
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CSpiroView
00027
00028 IMPLEMENT_DYNCREATE(CSpiroView, CScrollView)
00029
00030 BEGIN_MESSAGE_MAP(CSpiroView, CScrollView)
00031   //{{AFX_MSG_MAP(CSpiroView)
00032   ON_COMMAND(ID_PENWIDTH, OnPenWidth)
00033   ON_WM_SETCURSOR()
00034   ON_WM_LBUTTONDOWN()
00035   ON_WM_MOUSEMOVE()
00036   ON_UPDATE_COMMAND_UI(ID_ENORMOUSWHEEL, OnUpdateAnyWheel)
00037   ON_COMMAND(ID_HUGERING, OnDropRing)
00038   ON_COMMAND(ID_ENORMOUSWHEEL, OnDropWheel)
00039   ON_UPDATE_COMMAND_UI(ID_REMOVERING, OnUpdateRemoveRing)
00040   ON_UPDATE_COMMAND_UI(ID_REMOVEWHEEL, OnUpdateRemoveWheel)
00041   ON_COMMAND(ID_REMOVERING, OnRemoveRing)
00042   ON_COMMAND(ID_REMOVEWHEEL, OnRemoveWheel)
00043   ON_UPDATE_COMMAND_UI(ID_ZOOMIN, OnUpdateZoomIn)
00044   ON_COMMAND(ID_ZOOMIN, OnZoomIn)
00045   ON_COMMAND(ID_ZOOMOUT, OnZoomOut)
00046   ON_UPDATE_COMMAND_UI(ID_ZOOMOUT, OnUpdateZoomOut)
00047   ON_WM_LBUTTONUP()
00048   ON_UPDATE_COMMAND_UI(ID_DRAWPATTERN, OnUpdateDrawPattern)
00049   ON_COMMAND(ID_DRAWPATTERN, OnDrawPattern)
00050   ON_COMMAND(ID_END_DRAWING, OnEndDrawing)
00051   ON_WM_ERASEBKGND()
00052   ON_COMMAND(ID_BLACK, OnBlack)
00053   ON_COMMAND(ID_BLUE, OnBlue)
00054   ON_COMMAND(ID_GREEN, OnGreen)
00055   ON_COMMAND(ID_PURPLE, OnPurple)
00056   ON_COMMAND(ID_RED, OnRed)
00057   ON_COMMAND(ID_YELLOW, OnYellow)
00058   ON_UPDATE_COMMAND_UI(ID_BLUE, OnUpdateColor)
00059   ON_UPDATE_COMMAND_UI(ID_PAUSEDRAWING, OnUpdatePauseDrawing)
00060   ON_COMMAND(ID_PAUSEDRAWING, OnPauseDrawing)
00061   ON_UPDATE_COMMAND_UI(IDC_SLOW, OnUpdateSlow)
00062   ON_COMMAND(IDC_SLOW, OnSlow)
00063   ON_UPDATE_COMMAND_UI(ID_FAST, OnUpdateFast)
00064   ON_COMMAND(ID_FAST, OnFast)
00065   ON_COMMAND(ID_TIMERTICK, OnCallTimerTick)
00066   ON_UPDATE_COMMAND_UI(ID_TIMERTICK, OnUpdateTimerTick)
00067   ON_COMMAND(ID_TRACEWIDTH, OnTraceWidth)
00068   ON_COMMAND(ID_VERYLARGERING, OnDropRing)
00069   ON_COMMAND(ID_MEDIUMRING, OnDropRing)
00070   ON_COMMAND(ID_SMALLRING, OnDropRing)
00071   ON_COMMAND(ID_HUGEWHEEL, OnDropWheel)
00072   ON_COMMAND(ID_VERYLARGEWHEEL, OnDropWheel)
00073   ON_COMMAND(ID_LARGEWHEEL, OnDropWheel)
00074   ON_COMMAND(ID_MEDIUMWHEEL, OnDropWheel)
00075   ON_COMMAND(ID_SMALLWHEEL, OnDropWheel)
00076   ON_COMMAND(ID_TINYWHEEL, OnDropWheel)
00077   ON_UPDATE_COMMAND_UI(ID_HUGEWHEEL, OnUpdateAnyWheel)
00078   ON_UPDATE_COMMAND_UI(ID_VERYLARGEWHEEL, OnUpdateAnyWheel)
00079   ON_UPDATE_COMMAND_UI(ID_LARGEWHEEL, OnUpdateAnyWheel)
00080   ON_UPDATE_COMMAND_UI(ID_MEDIUMWHEEL, OnUpdateAnyWheel)
00081   ON_UPDATE_COMMAND_UI(ID_SMALLWHEEL, OnUpdateAnyWheel)
00082   ON_UPDATE_COMMAND_UI(ID_TINYWHEEL, OnUpdateAnyWheel)
00083   ON_UPDATE_COMMAND_UI(ID_TRACEWIDTH, OnUpdateTraceWidth)
00084   //}}AFX_MSG_MAP
00085   // Standard printing commands
00086
00087   ON_UPDATE_COMMAND_UI(ID_RED, OnUpdateColor)
00088   ON_UPDATE_COMMAND_UI(ID_PURPLE, OnUpdateColor)
00089   ON_UPDATE_COMMAND_UI(ID_YELLOW, OnUpdateColor)
00090   ON_UPDATE_COMMAND_UI(ID_GREEN, OnUpdateColor)
00091   ON_UPDATE_COMMAND_UI(ID_BLACK, OnUpdateColor)
00092   ON_UPDATE_COMMAND_UI(ID_HUGERING, OnUpdateAnyRing)
00093   ON_UPDATE_COMMAND_UI(ID_VERYLARGERING, OnUpdateAnyRing)
00094   ON_UPDATE_COMMAND_UI(ID_MEDIUMRING, OnUpdateAnyRing)
00095   ON_UPDATE_COMMAND_UI(ID_SMALLRING, OnUpdateAnyRing)
00096
00097   ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
00098   ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
00099   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
00100 END_MESSAGE_MAP()
00101
00102 /////////////////////////////////////////////////////////////////////////////
00103 // CSpiroView construction/destruction
00104 CSpiroView* g_pView = NULL;
00105
00106 CSpiroView::CSpiroView() : m_ptWheelPosFirst(0, 0), m_ptHotSpotDragFigure(0, 0)
00107 {
00108   m_nZoomNumer = 1;
00109   m_IDTimer = 0;
00110   m_nZoomDenom = 1;
00111   m_pAnchor = NULL;
00112   m_pWheel = NULL;
00113   m_bDrawingActive = false;
00114   m_bStartDrag = false;
00115   m_bDrawingDone = false;
00116   m_bDroppingAnchor = false;
00117   m_bDroppingWheel = false;
00118   m_bMovingPencil = false;
00119   m_nCurrentPenWidth = 1;
00120   m_coCurrentPen = RGB(0, 0, 0);  //color of current pen
00121   m_nTracesPerTick = TRACES_PER_TICK_SLOW;
00122   m_dDataAnchorFirst = 0;
00123   m_dDataWheelFirst = 0;
00124   m_pDCMem = NULL;
00125   m_pBitmap = NULL;
00126   m_pBitmapDragFigure = NULL;
00127   m_pbitmapOld = NULL;
00128   m_pFigureDrag = NULL;
00129   m_pILDragFigure = NULL;
00130 }
00131
00132 CSpiroView::~CSpiroView()
00133 {
00134   delete m_pAnchor;
00135   delete m_pWheel;
00136
00137   if (m_pDCMem != NULL)
00138   {
00139     ENSURE(m_pbitmapOld != NULL);
00140     m_pDCMem->SelectObject(m_pbitmapOld);
00141     delete m_pDCMem;
00142     delete m_pBitmap;
00143   }
00144   else
00145   {
00146     ASSERT(m_pbitmapOld == NULL);
00147     ASSERT(m_pBitmap == NULL);
00148   }
00149 }
00150
00151 BOOL CSpiroView::PreCreateWindow(CREATESTRUCT& cs)
00152 {
00153   // TODO: Modify the Window class or styles here by modifying
00154   //  the CREATESTRUCT cs
00155
00156   return CScrollView::PreCreateWindow(cs);
00157 }
00158
00159 /////////////////////////////////////////////////////////////////////////////
00160 // CSpiroView drawing
00161
00162 void CSpiroView::OnDraw(CDC* pDC)
00163 {
00164   ENSURE(pDC != NULL);
00165
00166   CPaintDC* pDCPaint;
00167   int     nWidthClip(0);  // Initialize to avoid compiler warnings.
00168   int     nHeightClip(0);  // Initialize to avoid compiler warnings.
00169   CRect   rectClip;
00170   CSpiroRect  rectLogClip;
00171
00172   if (!pDC->IsPrinting())
00173   {
00174     ASSERT(pDC->IsKindOf(RUNTIME_CLASS(CPaintDC)));
00175     pDCPaint = (CPaintDC*)pDC;
00176     rectClip = pDCPaint->m_ps.rcPaint;
00177     rectLogClip = rectClip;
00178     pDC->DPtoLP(&rectLogClip);   // this will be the clip rectangle which includes the zoom factor in it
00179     nWidthClip = rectLogClip.Width();
00180     nHeightClip = rectLogClip.Height();
00181     // Prepare a memory DC to draw on
00182     if (nWidthClip <= 0 || nHeightClip >= 0)  // the clipping region is empty
00183       return;  // nothing to draw in this case
00184   }
00185
00186   g_pView = this;
00187   CSpiroDoc* pDoc = GetDocument();
00188   ASSERT_VALID(pDoc);
00189
00190   CDC* pDCUse = pDC;
00191   int nSavedDC(0);  // Initialized to avoid compiler warnings.
00192
00193   CRgn* prgnWheel = NULL;
00194
00195   if (!pDC->IsPrinting())
00196   {
00197     if (m_pDCMem == NULL)
00198     {
00199       m_pDCMem = new CDC();
00200       ASSERT(m_pDCMem != NULL);
00201       VERIFY(m_pDCMem->CreateCompatibleDC(pDC));
00202       m_pDCMem->SetMapMode(MM_SPIRO);
00203     }
00204
00205     int cxClip = rectClip.Width();
00206     int cyClip = rectClip.Height();
00207     ASSERT(cxClip > 0 && cyClip >0);
00208
00209     if (m_pBitmap == NULL)
00210       m_pBitmap = new CBitmap();
00211
00212     if (cxClip > m_sizeBitmap.cx || cyClip > m_sizeBitmap.cy)
00213     {
00214       if (m_pbitmapOld != NULL)
00215       {
00216         m_pDCMem->SelectObject(m_pbitmapOld);
00217         m_pBitmap->DeleteObject();
00218       }
00219
00220       VERIFY(m_pBitmap->CreateCompatibleBitmap(pDC, cxClip, cyClip));
00221       m_pbitmapOld  = m_pDCMem->SelectObject(m_pBitmap);
00222       m_sizeBitmap.cx = cxClip;
00223       m_sizeBitmap.cy = cyClip;
00224     }
00225
00226     CPoint ptViewportOrg = pDC->GetViewportOrg();
00227     ptViewportOrg.x -= rectClip.left;
00228     ptViewportOrg.y -= rectClip.top;
00229     m_pDCMem->SetViewportOrg(ptViewportOrg);
00230     m_pDCMem->SetWindowOrg(pDC->GetWindowOrg());
00231
00232     CSpiroRect  rectDoc(rectLogClip);
00233     CSpiroRect  rectOut(rectDoc);  // strip to the right of the doc (vertical strip)
00234
00235     int cx = pDoc->m_sizeExtent.cx * m_nZoomNumer / m_nZoomDenom;
00236     CBrush  br(GetSysColor(COLOR_3DLIGHT));
00237
00238     if (rectDoc.right > cx)  // paint vertical strip
00239     {
00240       rectOut.left = cx;
00241       rectDoc.right = cx;
00242       m_pDCMem->FillRect(&rectOut, &br);
00243     }
00244
00245     if (rectDoc.bottom < 0)
00246     {
00247       rectOut.SetRect(rectDoc.left, 0, cx, rectDoc.bottom);
00248       m_pDCMem->FillRect(&rectOut, &br);
00249       rectDoc.bottom = 0;
00250     }
00251
00252     CBrush brush(GetSysColor(COLOR_WINDOW));
00253     m_pDCMem->FillRect(&rectDoc, &brush);
00254
00255     pDCUse = m_pDCMem;
00256     nSavedDC = pDCUse->SaveDC();
00257     pDCUse->IntersectClipRect(0, pDoc->m_sizeExtent.cy * m_nZoomNumer / m_nZoomDenom, cx, 0);
00258
00259     if (m_pWheel != NULL)
00260     {
00261       prgnWheel = new CRgn();
00262       m_pWheel->GetLogPieceRgn(prgnWheel, m_nZoomNumer, m_nZoomDenom);
00263     }
00264   }
00265
00266
00267   // draw the current figure
00268   pDoc->m_pFigureCurrent->Draw(pDCUse, m_nZoomNumer, m_nZoomDenom
00269                         , prgnWheel, &rectLogClip);
00270
00271   // draw all the other figures
00272   INT_PTR nLast = pDoc->m_arrPFigures.GetUpperBound();
00273   CFigure* pFig;
00274   for (int i = 0; i <= nLast; i++)
00275   {
00276     pFig = (CFigure*)pDoc->m_arrPFigures.GetAt(i);
00277     pFig->Draw(pDCUse, m_nZoomNumer, m_nZoomDenom, prgnWheel, &rectLogClip);
00278   }
00279
00280   delete prgnWheel;
00281
00282   if (!pDC->IsPrinting())
00283   {
00284
00285     pDCUse->RestoreDC(nSavedDC);
00286
00287     if (m_pAnchor != NULL)
00288       m_pAnchor->Draw(m_pDCMem, m_nZoomNumer, m_nZoomDenom);
00289
00290     if (m_pWheel != NULL)
00291       m_pWheel->Draw(m_pDCMem, m_nZoomNumer, m_nZoomDenom);
00292
00293     // now transfer the information in the memory DC to the device DC
00294     VERIFY(pDC->BitBlt(rectLogClip.left, rectLogClip.top, nWidthClip, nHeightClip,
00295                           pDCUse, rectLogClip.left, rectLogClip.top, SRCCOPY));
00296
00297   }
00298 }
00299
00300 /////////////////////////////////////////////////////////////////////////////
00301 // CSpiroView printing
00302
00303 BOOL CSpiroView::OnPreparePrinting(CPrintInfo* pInfo)
00304 {
00305   BOOL bRet = DoPreparePrinting(pInfo);
00306   pInfo->m_nNumPreviewPages = 2;
00307   pInfo->SetMaxPage(2);   // will always print 2 pages
00308   return bRet;
00309 }
00310
00311 void CSpiroView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00312 {
00313   // TODO: add extra initialization before printing
00314 }
00315
00316 void CSpiroView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00317 {
00318   // TODO: add cleanup after printing
00319 }
00320
00321 /////////////////////////////////////////////////////////////////////////////
00322 // CSpiroView diagnostics
00323
00324 #ifdef _DEBUG
00325 void CSpiroView::AssertValid() const
00326 {
00327   CScrollView::AssertValid();
00328 }
00329
00330 void CSpiroView::Dump(CDumpContext& dc) const
00331 {
00332   CScrollView::Dump(dc);
00333 }
00334
00335 CSpiroDoc* CSpiroView::GetDocument() // non-debug version is inline
00336 {
00337   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSpiroDoc)));
00338   return (CSpiroDoc*)m_pDocument;
00339 }
00340 #endif //_DEBUG
00341
00342 /////////////////////////////////////////////////////////////////////////////
00343 // CSpiroView message handlers
00344
00345 void CSpiroView::OnInitialUpdate()
00346 {
00347   CScrollView::OnInitialUpdate();
00348
00349   if (m_pAnchor != NULL)
00350   {
00351     delete m_pAnchor;
00352     m_pAnchor = NULL;
00353   }
00354
00355   if (m_pWheel != NULL)
00356   {
00357     delete m_pWheel;
00358         m_pWheel = NULL;
00359   }
00360
00361   m_bDrawingActive = false;
00362   m_bStartDrag = false;
00363   m_bDrawingDone = false;
00364   m_bDroppingAnchor = false;
00365   m_bDroppingWheel = false;
00366   m_bMovingPencil = false;
00367   m_dDataAnchorFirst = 0;
00368   m_dDataWheelFirst = 0;
00369
00370   CSpiroDoc* pDoc = GetDocument();
00371   ENSURE(pDoc != NULL);
00372   SetScrollSizes(MM_SPIRO, pDoc->m_sizeExtent);
00373 }
00374
00375 void CSpiroView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
00376 {
00377   CScrollView::OnPrepareDC(pDC, pInfo);
00378
00379   CSpiroDoc* pDoc = GetDocument();
00380   ENSURE(pDoc != NULL);
00381
00382   if (!pDC->IsPrinting())
00383     pDC->SetWindowOrg(0, pDoc->m_sizeExtent.cy * m_nZoomNumer / m_nZoomDenom);
00384 }
00385
00386 void CSpiroView::OnUpdateAnyRing(CCmdUI* pCmdUI)
00387 {
00388   pCmdUI->Enable(m_pAnchor == NULL && !m_bDroppingAnchor && !m_bDroppingWheel);
00389 }
00390
00391 void CSpiroView::OnUpdateAnyWheel(CCmdUI* pCmdUI)
00392 {
00393   // The wheel can act as a ring or as a wheel
00394   pCmdUI->Enable((m_pAnchor == NULL || m_pWheel == NULL) &&
00395           !m_bDroppingAnchor && !m_bDroppingWheel);
00396 }
00397
00398 void CSpiroView::OnUpdateDraw(CCmdUI* pCmdUI)
00399 {
00400   pCmdUI->Enable(m_pAnchor != NULL && m_pWheel != NULL);
00401 }
00402
00403 void CSpiroView::OnUpdatePause(CCmdUI* pCmdUI)
00404 {
00405   pCmdUI->Enable(m_bDrawingActive);
00406 }
00407
00408 void CSpiroView::OnPenWidth()
00409 {
00410   CSpiroDoc* pDoc = GetDocument();
00411   ENSURE(pDoc != NULL);
00412
00413   pDoc->m_bThickPen = !pDoc->m_bThickPen; // toggle the width of the pen
00414 }
00415
00416 void CSpiroView::OnUpdatePenWidth(CCmdUI* pCmdUI)
00417 {
00418   pCmdUI->Enable(!m_bDrawingActive);
00419 }
00420
00421 BOOL CSpiroView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00422 {
00423   if (m_bDroppingAnchor)
00424   {
00425     ::SetCursor(GetApp()->m_cursorRing);
00426     return TRUE;
00427   }
00428
00429   if (m_bDroppingWheel)
00430   {
00431     ::SetCursor(GetApp()->m_cursorWheel);
00432     return TRUE;
00433   }
00434
00435   return CScrollView::OnSetCursor(pWnd, nHitTest, message);
00436 }
00437
00438 void CSpiroView::OnLButtonDown(UINT nFlags, CPoint point)
00439 {
00440   if (m_bDrawingActive)
00441     return;
00442
00443   if (m_bDroppingAnchor || m_bDroppingWheel)
00444   {
00445     ASSERT(!m_bDrawingDone);
00446     CWheel* pWheelDrop = NULL;
00447     CRing*  pRingDrop = NULL;
00448     CSpiroDoc* pDoc = GetDocument();
00449     ENSURE(pDoc != NULL);
00450
00451     //convert the client coordinates to logical coordinates
00452     CDC* pDC = GetDC();
00453     ENSURE(pDC != NULL);
00454     OnPrepareDC(pDC);
00455
00456     // Convert client coordinates to Logical coordinates
00457     CPoint pointScaled(point);
00458     pDC->DPtoLP(&pointScaled);
00459     point.x = pointScaled.x * m_nZoomDenom / m_nZoomNumer;  // undo scaling effects
00460     point.y = pointScaled.y * m_nZoomDenom / m_nZoomNumer;
00461
00462     CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
00463     ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
00464
00465     if (m_bDroppingAnchor)
00466     {
00467       ASSERT(m_iPieceDropped >= 0 && m_iPieceDropped < TOTALRINGS);
00468       pRingDrop = new CRing(CRing::m_rgnRads[m_iPieceDropped] - RINGWIDTH,
00469         CRing::m_rgnRads[m_iPieceDropped],
00470         CRing::m_rgco[m_iPieceDropped], RGB(0, 0, 0));
00471
00472       ENSURE(pRingDrop != NULL);
00473       m_bDroppingAnchor = false;
00474       ENSURE(m_pAnchor == NULL);
00475       m_pAnchor = pRingDrop;
00476       m_pAnchor->SetPosition(point);
00477       m_dDataAnchorFirst = m_pAnchor->GetFigData();
00478     }
00479     else if (m_bDroppingWheel)
00480     {
00481       CBasePiece** ppPiece = (m_pAnchor == NULL? &m_pAnchor : &m_pWheel);
00482       ASSERT(m_iPieceDropped >= 0 && m_iPieceDropped < TOTALWHEELS);
00483       pWheelDrop = new CWheel(CWheel::m_rgnRads[m_iPieceDropped],
00484                 CWheel::m_rgco[m_iPieceDropped],
00485                 CWheel::m_rgcoPattern[m_iPieceDropped]);
00486
00487
00488       ENSURE(pWheelDrop != NULL);
00489       ENSURE(*ppPiece == NULL);
00490       *ppPiece = pWheelDrop;
00491       m_bDroppingWheel = false;
00492       (*ppPiece)->SetPosition(point);
00493
00494       if (m_pWheel != NULL)
00495       {
00496         m_pWheel->SetWheelMode();
00497
00498         // set the default pen location. pDC and zoom ration are dummies
00499         m_pWheel->SetPenLocation(this, pDC, CPoint(0, 0), 1, 1);
00500
00501         ENSURE(m_pAnchor != NULL);
00502
00503         CPoint ptContact;
00504         double dAngle;
00505         // Get contact position from the anchor and set wheel position
00506         // Decides if wheel is internal in case of being a ring
00507         m_pAnchor->GetContactPosition(pointScaled, m_nZoomNumer,
00508                     m_nZoomDenom, ptContact, dAngle);
00509
00510         if (m_pWheel->GetPerimeter() >= m_pAnchor->GetPerimeter())
00511         {
00512           pointScaled.x = 0;
00513           pointScaled.y = 0;   // force the wheel out of the ring
00514
00515           // get contact position again to make sure it's right
00516           m_pAnchor->GetContactPosition(pointScaled, m_nZoomNumer,
00517                       m_nZoomDenom, ptContact, dAngle);
00518         }
00519
00520         m_pWheel->SetPosition(ptContact, dAngle);
00521         m_dDataWheelFirst = m_pWheel->GetFigData();
00522         m_ptWheelPosFirst = m_pWheel->m_ptPos;
00523         PressButton(0);  // get the color settings for the new wheel
00524         CreateFigure();
00525       }
00526
00527       m_iPieceDropped += TOTALRINGS + 1;
00528 #ifdef _DEBUG
00529       int nID = pFrame->m_wndToolBarSpiro.GetItemID(m_iPieceDropped);
00530       ASSERT(nID >= ID_ENORMOUSWHEEL && nID <= ID_TINYWHEEL);
00531 #endif
00532     }
00533
00534     // uncheck the button used to select the piece in the toolbar
00535     UINT nButtonID = pFrame->m_wndToolBarSpiro.GetItemID(m_iPieceDropped);
00536     pFrame->m_wndToolBarSpiro.GetToolBarCtrl().CheckButton(nButtonID, FALSE);
00537
00538     // invalidate the region holding the ring
00539     CRgn  rgn;  // region occupied by the piece
00540     (m_pWheel != NULL? m_pWheel : m_pAnchor)->GetDevPieceRgn(pDC,
00541                   &rgn, m_nZoomNumer, m_nZoomDenom, false);
00542
00543     InvalidateRgn(&rgn, FALSE);
00544     m_iPieceDropped = -1; // reset to keep control on values.
00545     ReleaseDC(pDC);
00546     return;
00547   }
00548
00549   // check if the user wants to drag the pen position
00550
00551   CDC* pDC = GetDC();
00552   ENSURE(pDC != NULL);
00553   OnPrepareDC(pDC);
00554   CPoint pointScaled(point);
00555   pDC->DPtoLP(&pointScaled);   // gets the logical coord point value with scale into account
00556
00557   if (m_pWheel != NULL)
00558   {
00559     if (m_pWheel->HitTest(pDC, point, m_nZoomNumer, m_nZoomDenom) == HIT_PEN_LOCATION)  // start drag operation
00560     {
00561       MSG   msg;
00562
00563       // if there is a WM_LBUTTONUP in the queue do not drag pencil location
00564       if (!::PeekMessage(&msg, m_hWnd, WM_LBUTTONUP, WM_LBUTTONUP, PM_NOREMOVE))
00565       {
00566         ClientToScreen(&point); // convert to screen coordinates
00567         CRect rectWindow;
00568         GetWindowRect(&rectWindow);
00569         point.x -= rectWindow.left;
00570         point.y -= rectWindow.top;  // point relative to windows corner
00571
00572         CImageList& il = GetApp()->m_imageList;
00573         ::ShowCursor(FALSE);
00574         il.BeginDrag(0, CPoint(0, 47));
00575         il.DragEnter(this, point);
00576         m_bMovingPencil = true;
00577         SetCapture();
00578       }
00579     }
00580   }
00581
00582   for (;;)
00583   {
00584     CRgn  rgn;
00585     MSG   msg;
00586
00587     if (::PeekMessage(&msg, m_hWnd, WM_LBUTTONUP, WM_LBUTTONUP, PM_NOREMOVE))  // no drag is being requested
00588       break;
00589
00590     if (m_pWheel != NULL)
00591     {
00592       m_pWheel->GetLogPieceRgn(&rgn, m_nZoomNumer, m_nZoomDenom);
00593       if (rgn.PtInRegion(pointScaled))  // clicked on wheel.  Don't do anything
00594         break;
00595
00596       rgn.DeleteObject();
00597     }
00598
00599     if (m_pAnchor != NULL)
00600     {
00601       m_pAnchor->GetLogPieceRgn(&rgn, m_nZoomNumer, m_nZoomDenom);
00602       if (rgn.PtInRegion(pointScaled))   // clicked on the anchor
00603         break;
00604
00605       rgn.DeleteObject();
00606     }
00607
00608     // find now if the user clicked on a Figure.  The current Figure cannot be dragged.  This is by design
00609     CSpiroDoc*  pDoc = GetDocument();
00610     INT_PTR   iPic;
00611     CFigure*  pFigure;
00612     CSpiroRect  rect;
00613
00614     for (iPic = pDoc->m_arrPFigures.GetUpperBound(); iPic >= 0; iPic--)
00615     {
00616       pFigure = (CFigure*)pDoc->m_arrPFigures.GetAt(iPic);
00617       ENSURE(pFigure != NULL);
00618       pFigure->GetBoundingRect(&rect);
00619       rect.Scale(m_nZoomNumer, m_nZoomDenom);
00620       if (pointScaled.x < rect.left || pointScaled.x >= rect.right ||
00621           pointScaled.y > rect.top || pointScaled.y <= rect.bottom)
00622       {
00623         continue;
00624       }
00625
00626       bool bCopy = (nFlags & MK_CONTROL) == MK_CONTROL;
00627       m_pFigureDrag = (bCopy? new CFigure(pFigure) : pFigure);
00628
00629       if (!bCopy)
00630         pDoc->m_arrPFigures.RemoveAt(iPic);
00631
00632       ENSURE(m_pILDragFigure == NULL);
00633
00634       // First draw the Figure into a memery DC using an allocated bitmap
00635       CDC dcMem;
00636       ENSURE(pDC != NULL);
00637
00638       VERIFY(dcMem.CreateCompatibleDC(pDC));
00639       dcMem.SetMapMode(MM_SPIRO);
00640       dcMem.SetViewportOrg(0, 0);
00641       dcMem.SetWindowOrg(rect.left, rect.top);
00642
00643       CSpiroRect  rectBitmap(rect);
00644       dcMem.LPtoDP(&rectBitmap);
00645       ASSERT(rectBitmap.left == 0 && rectBitmap.top == 0);
00646
00647       int     nWidth = rectBitmap.right;
00648       int     nHeight = rectBitmap.bottom;
00649
00650       CBitmap*  pbmOld = NULL;
00651
00652       ASSERT(m_pBitmapDragFigure == NULL);
00653       m_pBitmapDragFigure = new CBitmap();
00654       m_pBitmapDragFigure->CreateCompatibleBitmap(pDC, nWidth, nHeight);
00655       pbmOld = dcMem.SelectObject(m_pBitmapDragFigure);
00656
00657     //  dcMem.PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), WHITENESS);
00658       CBrush  brush;
00659       brush.CreateStockObject(WHITE_BRUSH);
00660       dcMem.FillRect(&rect, &brush);
00661       m_pFigureDrag->Draw(&dcMem, m_nZoomNumer, m_nZoomDenom, NULL, &rect);
00662       dcMem.SelectObject(pbmOld);
00663       // Then create an imagelist and add the bitmap to it
00664       ASSERT(m_pILDragFigure == NULL);
00665       m_pILDragFigure = new CImageList();
00666       VERIFY(m_pILDragFigure->Create(nWidth, nHeight, ILC_COLOR | ILC_MASK, 1, 1));
00667       VERIFY(m_pILDragFigure->Add(m_pBitmapDragFigure, RGB(255, 255, 255)) == 0);
00668
00669       m_bStartDrag = true;  // Enter the drag on first mouse move
00670
00671       //calculate the hot spot for the figure
00672       m_ptHotSpotDragFigure.x = pointScaled.x - rect.left;
00673       m_ptHotSpotDragFigure.y = pointScaled.y - rect.bottom;
00674       pDC->SetWindowOrg(0, rect.top - rect.bottom);
00675       pDC->SetViewportOrg(0, 0);
00676       pDC->LPtoDP(&m_ptHotSpotDragFigure);
00677       m_pILDragFigure->BeginDrag(0, m_ptHotSpotDragFigure);
00678       SetCapture();
00679       break;
00680     }
00681
00682     break;
00683   }
00684
00685   ReleaseDC(pDC);
00686   CScrollView::OnLButtonDown(nFlags, point);
00687 }
00688
00689 void CSpiroView::OnMouseMove(UINT nFlags, CPoint point)
00690 {
00691   if (m_bMovingPencil || m_pFigureDrag != NULL)  // the user is dragging the pencil location
00692   {
00693     CPoint ptWindow(point);
00694     ClientToScreen(&ptWindow);
00695     CRect rectWindow;
00696     GetWindowRect(&rectWindow);
00697     ptWindow.Offset(-rectWindow.left, -rectWindow.top);
00698
00699     CImageList* pImList = m_bMovingPencil? &GetApp()->m_imageList : m_pILDragFigure;
00700
00701     ENSURE(pImList != NULL);
00702     if (m_bStartDrag)
00703     {
00704       ENSURE(m_pFigureDrag != NULL);
00705       m_bStartDrag = false;
00706       CSpiroRect rect;
00707       m_pFigureDrag->GetBoundingRect(&rect);
00708       rect.Scale(m_nZoomNumer, m_nZoomDenom);
00709       CDC* pDC = GetDC();
00710       ENSURE(pDC != NULL);
00711       OnPrepareDC(pDC);
00712       pDC->LPtoDP(&rect);
00713       ReleaseDC(pDC);
00714       rect.InflateRect(4, 4);
00715       InvalidateRect(&rect);
00716       pImList->DragLeave(this);
00717       UpdateWindow();
00718       pImList->DragEnter(this, ptWindow);
00719     }
00720     else
00721       pImList->DragMove(ptWindow);
00722
00723     return;
00724   }
00725
00726   CScrollView::OnMouseMove(nFlags, point);
00727 }
00728
00729 // receives a pointer to the array of ID's and the count of elements in the array
00730 void CSpiroView::OnDropPiece(int* rgID, int nCount)
00731 {
00732 #ifdef _DEBUG
00733   int nChosen = -1;
00734 #endif
00735
00736   CMainFrame*   pFrame = (CMainFrame*)AfxGetMainWnd();
00737   ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
00738
00739   int i;
00740   for (i = 0; i < nCount; i ++)
00741   {
00742     if (pFrame->m_wndToolBarSpiro.GetToolBarCtrl().IsButtonChecked(rgID[i]))
00743 #ifdef _DEBUG
00744     {
00745       ASSERT(nChosen == -1);
00746       nChosen = i;
00747     }
00748 #else  // !_DEBUG
00749       break;
00750 #endif  // !_DEBUG
00751   }
00752
00753 #ifdef _DEBUG
00754   VERIFY((i = nChosen) != -1);
00755 #endif
00756
00757   m_iPieceDropped = i;
00758 }
00759
00760 void CSpiroView::OnDropRing()
00761 {
00762   static const int rgID[] = {ID_HUGERING, ID_VERYLARGERING,
00763                 ID_MEDIUMRING, ID_SMALLRING};
00764
00765   OnDropPiece((int*)rgID, elementsof(rgID));
00766   m_bDroppingAnchor = true;
00767 }
00768
00769 void CSpiroView::OnDropWheel()
00770 {
00771   static const int rgID[] = {ID_ENORMOUSWHEEL, ID_HUGEWHEEL, ID_VERYLARGEWHEEL,
00772                 ID_LARGEWHEEL, ID_MEDIUMWHEEL,
00773                 ID_SMALLWHEEL, ID_TINYWHEEL};
00774
00775   OnDropPiece((int*)rgID, elementsof(rgID));
00776   m_bDroppingWheel = true;
00777 }
00778
00779 void CSpiroView::OnUpdateRemoveRing(CCmdUI* pCmdUI)
00780 {
00781   pCmdUI->Enable(m_pAnchor != NULL && !m_bDroppingAnchor && !m_bDroppingWheel && !m_bDrawingActive);
00782 }
00783
00784 void CSpiroView::OnUpdateRemoveWheel(CCmdUI* pCmdUI)
00785 {
00786   pCmdUI->Enable(m_pWheel != NULL && !m_bDroppingAnchor && !m_bDroppingWheel && !m_bDrawingActive);
00787 }
00788
00789 void CSpiroView::OnRemovePiece(CBasePiece** ppPiece)
00790 {
00791   ENSURE(ppPiece != NULL && *ppPiece != NULL);
00792   CRgn  rgnPiece;
00793
00794   CDC*  pDC = GetDC();
00795   ENSURE(pDC != NULL);
00796   OnPrepareDC(pDC);
00797
00798   (*ppPiece)->GetDevPieceRgn(pDC, &rgnPiece, m_nZoomNumer, m_nZoomDenom, true);
00799
00800   InvalidateRgn(&rgnPiece);
00801   delete *ppPiece;
00802   *ppPiece = NULL;
00803   ReleaseDC(pDC);
00804   GetDocument()->TransferCurrentFigure();  // make the current figure permanent
00805   m_bDrawingDone = false;
00806 }
00807
00808 void CSpiroView::OnRemoveRing()
00809 {
00810   ENSURE(m_pAnchor != NULL);
00811   OnRemovePiece(&m_pAnchor);
00812   if (m_pWheel != NULL)
00813     OnRemovePiece(&m_pWheel);
00814 }
00815
00816 void CSpiroView::OnRemoveWheel()
00817 {
00818   OnRemovePiece(&m_pWheel);
00819 }
00820
00821 void CSpiroView::OnUpdateZoomIn(CCmdUI* pCmdUI)
00822 {
00823   pCmdUI->Enable(m_nZoomNumer != 1 || m_nZoomDenom != 1);
00824 }
00825
00826 void CSpiroView::OnZoomIn()
00827 {
00828   ZoomChange(1);
00829 }
00830
00831 void CSpiroView::ZoomChange(int nChange)
00832 {
00833   m_nZoomNumer = (m_nZoomNumer * 4 / m_nZoomDenom) + nChange;
00834   m_nZoomDenom = 4;
00835   if (m_nZoomDenom % m_nZoomNumer == 0)
00836   {
00837     m_nZoomDenom /= m_nZoomNumer;
00838     m_nZoomNumer = 1;
00839   }
00840
00841   // change the extent of the document to match the new zoom
00842   CSpiroDoc* pDoc = GetDocument();
00843   ENSURE(pDoc != NULL);
00844   SetScrollSizes(MM_SPIRO, CSize(pDoc->m_sizeExtent.cx * m_nZoomNumer / m_nZoomDenom,
00845             pDoc->m_sizeExtent.cy * m_nZoomNumer / m_nZoomDenom));
00846
00847   Invalidate();  // invalidate the window so it's drawn again
00848 }
00849
00850 void CSpiroView::OnZoomOut()
00851 {
00852   ZoomChange(-1);
00853 }
00854
00855 void CSpiroView::OnUpdateZoomOut(CCmdUI* pCmdUI)
00856 {
00857   pCmdUI->Enable(m_nZoomNumer != 1 || m_nZoomDenom != 4);
00858 }
00859
00860 void CSpiroView::OnLButtonUp(UINT nFlags, CPoint point)
00861 {
00862   if (m_bMovingPencil)
00863   {
00864     CImageList& il = GetApp()->m_imageList;
00865     il.DragLeave(this);
00866     il.EndDrag();
00867     ::ShowCursor(TRUE);
00868
00869     ENSURE(m_pWheel != NULL);
00870     CDC* pDC = GetDC();
00871     ENSURE(pDC != NULL);
00872     OnPrepareDC(pDC);
00873
00874     // undo the effect of the zoom factor on the point value
00875     pDC->DPtoLP(&point);
00876     point.x = point.x * m_nZoomDenom / m_nZoomNumer;
00877     point.y = point.y * m_nZoomDenom / m_nZoomNumer;
00878     if (m_pWheel->SetPenLocation(this, pDC, point, m_nZoomNumer, m_nZoomDenom))
00879     {
00880       GetDocument()->TransferCurrentFigure();
00881       CreateFigure();  // create figure for the new pen location
00882     }
00883
00884     ReleaseDC(pDC);
00885     ReleaseCapture();
00886     m_bMovingPencil = false;
00887   }
00888   else if (m_pFigureDrag != NULL)
00889   {
00890     ENSURE(m_pILDragFigure != NULL);
00891
00892     CPoint ptWindow(point);
00893     CDC* pDC = GetDC();
00894     ENSURE(pDC != NULL);
00895
00896     // get new position for the figure being drawn and insert it into figure arrays
00897
00898     CPoint  ptCorner(point.x - m_ptHotSpotDragFigure.x, point.y - m_ptHotSpotDragFigure.y);
00899     OnPrepareDC(pDC);
00900     pDC->DPtoLP(&ptCorner);   // convert corner of figure to logical coords
00901
00902     ptCorner.x = ptCorner.x * m_nZoomDenom / m_nZoomNumer;  // undo effect of zooming
00903     ptCorner.y = ptCorner.y * m_nZoomDenom / m_nZoomNumer;
00904
00905
00906     if (m_pFigureDrag->MoveFigure(ptCorner, GetDocument()))   // move figure to new place
00907     {
00908       CSpiroRect  rect;
00909       m_pFigureDrag->GetBoundingRect(&rect);
00910       rect.Scale(m_nZoomNumer, m_nZoomDenom);
00911       pDC->LPtoDP(&rect);
00912       InvalidateRect(&rect);
00913       ReleaseDC(pDC);
00914     }
00915
00916     m_pILDragFigure->DragLeave(this);
00917     m_pILDragFigure->EndDrag();
00918     UpdateWindow();
00919     delete m_pILDragFigure;
00920     delete m_pBitmapDragFigure;
00921     m_pBitmapDragFigure = NULL;
00922     m_pILDragFigure = NULL;
00923
00924     ReleaseCapture();
00925     m_pFigureDrag = NULL;
00926   }
00927
00928   CScrollView::OnLButtonUp(nFlags, point);
00929 }
00930
00931 int CompareLong(const void* pn1, const void* pn2)   // used for qsorting an array
00932 {
00933   return *(long*)pn1 - *(long*)pn2;
00934 }
00935
00936 long CSpiroView::GetWheelDistanceForFigure() const
00937 {
00938   ENSURE(m_pWheel != NULL && m_pAnchor != NULL);
00939   double  dPerimWheel = m_pWheel->GetPerimeter();
00940   double  dPerimAnchor = m_pAnchor->GetPerimeter();
00941
00942   bool  bInverted(false); // Anchor and wheel swapped to have anchor > wheel.
00943
00944   if (dPerimAnchor < dPerimWheel)
00945   {
00946     bInverted = true;
00947     double d = dPerimAnchor;
00948     dPerimAnchor = dPerimWheel;
00949     dPerimWheel = d;
00950   }
00951
00952   double  dRemain = 0;
00953   long  rgCycleOrder[200];
00954   double  rgdCycleLimits[2][200];  // first and last mark in every cycle
00955   double  dCurrentPos = 0.0;
00956   int   nTurnsThisCycle;
00957   int   nTotalTurns = 0;
00958   int   i;
00959   long  nTolerance = m_pAnchor->GetCycleError();  // returns distance tolerance for one figure
00960   int   iCycle;
00961
00962   for (iCycle = 0;iCycle < 200;iCycle++)
00963   {
00964     nTurnsThisCycle = (long)((dPerimAnchor + dRemain) / dPerimWheel);
00965     rgdCycleLimits[0][iCycle] = dCurrentPos + dPerimWheel;
00966     while (rgdCycleLimits[0][iCycle] - dPerimAnchor >= 0.0)
00967       rgdCycleLimits[0][iCycle] -= dPerimAnchor;
00968
00969     rgdCycleLimits[1][iCycle] = dCurrentPos + nTurnsThisCycle * dPerimWheel;
00970     while (rgdCycleLimits[1][iCycle] - dPerimAnchor >= 0.0)
00971       rgdCycleLimits[1][iCycle] -= dPerimAnchor;
00972
00973     ASSERT(rgdCycleLimits[1][iCycle] >= 0.0 && rgdCycleLimits[1][iCycle] < dPerimAnchor);
00974
00975     rgCycleOrder[iCycle] = iCycle;  // rgCycleOrder says the order of the columns
00976
00977     // sort the cycle order to find which columns go first
00978     for (i = 0; i < iCycle; i++)
00979     {
00980       // is new cycle being inserted at position i?
00981       if (rgdCycleLimits[0][rgCycleOrder[i]] > rgdCycleLimits[0][iCycle])
00982       {
00983         //yes.  Insert iCycle in this position in rgCycleOrder
00984         memmove_s((int*)rgCycleOrder + i + 1, (iCycle - i) * sizeof(int), (int*)rgCycleOrder + i, (iCycle - i) * sizeof(int));
00985         rgCycleOrder[i] = iCycle;
00986         break;
00987       }
00988     }
00989
00990     double  dLastGap(0);  // Initialize to avoid compiler warnings.
00991     double  dThisGap;
00992     double  dLastPos;
00993     double  dThisPos;
00994
00995     // check if the values are so close to the origin that the cycle is complete
00996     bool bFirstTurnCloses = rgdCycleLimits[0][iCycle] < (double)nTolerance;
00997     if (bFirstTurnCloses ||   // close to origin? check gaps
00998         dPerimAnchor - rgdCycleLimits[1][iCycle] < (double)nTolerance ||
00999         rgdCycleLimits[1][iCycle] < 0.000000001)
01000     {
01001       dLastPos = rgdCycleLimits[0][rgCycleOrder[0]];
01002       for (i = 1; i < iCycle; i++)
01003       {
01004         dThisGap = (dThisPos = rgdCycleLimits[0][rgCycleOrder[i]]) - dLastPos;
01005         if (i > 1 && abs((long)(dThisGap - dLastGap)) > nTolerance / 4)   // there are gaps to be filled in
01006           break;
01007
01008         dLastGap = dThisGap;
01009         dLastPos = dThisPos;
01010       }
01011
01012       if (i == iCycle)
01013       {
01014         nTotalTurns += bFirstTurnCloses? 1 : nTurnsThisCycle;
01015         break;
01016       }
01017     }
01018
01019     nTotalTurns += nTurnsThisCycle;
01020     dCurrentPos = rgdCycleLimits[1][iCycle];
01021     dRemain = dPerimAnchor - dCurrentPos;
01022   }
01023
01024   if (bInverted)   // adjust the number of turns
01025   {
01026     double d = (double)nTotalTurns * dPerimWheel / dPerimAnchor;
01027     nTotalTurns = (long)d;
01028     if (d - (double)nTotalTurns > 0.9)
01029       nTotalTurns++;
01030
01031     dPerimWheel = dPerimAnchor;
01032   }
01033
01034   ASSERT(nTotalTurns < 200 && nTotalTurns > 0);
01035   return (long)(nTotalTurns * dPerimWheel);
01036 }
01037
01038 // This routine creates the figure when the wheel is dropped or the pen is moved.
01039 // It is very critical that these calculations are done as fast as possible.
01040 void CSpiroView::CreateFigure()
01041 {
01042   long    nTotalDistance;
01043   CSpiroDoc*  pDoc = GetDocument();
01044   ENSURE(pDoc != NULL);
01045   CFigure*  pFigure = pDoc->m_pFigureCurrent;
01046
01047   ENSURE(pFigure != NULL);
01048   ENSURE(m_pWheel != NULL && m_pAnchor != NULL);
01049
01050   m_ptWheelPosFirst = m_pWheel->m_ptPos;
01051   m_dDataWheelFirst = m_pWheel->GetFigData();
01052   double dAnchorDataStart = m_pAnchor->GetFigData();
01053
01054   nTotalDistance = GetWheelDistanceForFigure();  // get the total wheel travel distance
01055   m_pWheel->SetAngleDelta(STEP_DISTANCE, m_pAnchor->ReverseWheelDirection());
01056   m_pAnchor->SetAngleDelta(STEP_DISTANCE, false/*dummy value*/);
01057
01058   CPoint ptPen;
01059   m_pWheel->GetPenLocation(&ptPen);
01060
01061   CPoint  ptContact;
01062   double  dAngle;
01063   double  dAngleExtra;
01064
01065   pFigure->AddCommand(SET_PEN_WIDTH, m_nCurrentPenWidth);
01066   m_pWheel->m_icoCurrent = -1;
01067   ASSERT(m_pWheel->m_nColorCount > 0);
01068   m_coCurrentPen = m_pWheel->m_rgCo[0];
01069   pFigure->AddCommand(MOVE_TO, ptPen, m_pWheel->m_ptPos, m_pWheel->GetFigData(), m_pAnchor->GetFigData());
01070
01071   long  nTraces = nTotalDistance / STEP_DISTANCE;
01072
01073   ASSERT(m_pWheel->m_icoCurrent >= -1 && m_pWheel->m_icoCurrent <= m_pWheel->m_nColorCount);
01074   ASSERT(m_pWheel->m_nColorCount > 0);
01075   pFigure->m_nTracesPerColor = nTraces / m_pWheel->m_nColorCount;
01076   pFigure->m_nTracesThisColor = 0;  // force color change upon starting
01077
01078   for (long i = 0; i < nTraces; i++)  // travel until very close to the end
01079   {
01080     m_pAnchor->AdvanceTrace(ptContact, dAngle, dAngleExtra); // returns point of contact
01081     m_pWheel->AdvanceTrace(ptContact, dAngle, dAngleExtra);
01082     m_pWheel->GetPenLocation(&ptPen);
01083     pFigure->AddCommand((i == 0? MOVE_TO : LINE_TO), ptPen,
01084               m_pWheel->m_ptPos, m_pWheel->GetFigData(),
01085               m_pAnchor->GetFigData());
01086   }
01087
01088   m_pWheel->m_ptPos = m_ptWheelPosFirst;
01089   m_pWheel->SetFigData(m_dDataWheelFirst);
01090   m_pAnchor->SetFigData(dAnchorDataStart);
01091 }
01092
01093 void CSpiroView::OnUpdateDrawPattern(CCmdUI* pCmdUI)
01094 {
01095   pCmdUI->Enable(!m_bDrawingDone && m_pAnchor != NULL && m_pWheel != NULL);
01096 }
01097
01098 void CALLBACK  CSpiroView::TimerCallBack(HWND , UINT , UINT_PTR , DWORD )
01099 {
01100   ENSURE(g_pView != NULL && g_pView->IsKindOf(RUNTIME_CLASS(CSpiroView)));
01101   if (!g_pView->m_bDrawingActive)  //waiting for the timer to be killed
01102     return;
01103
01104   CSpiroDoc* pDoc = g_pView->GetDocument();
01105   CFigure* pFigure = pDoc->m_pFigureCurrent;
01106   ENSURE(pFigure != NULL);
01107
01108   int nLast =   min(pFigure->m_nTotalDrawn + g_pView->m_nTracesPerTick,
01109           pFigure->m_arrCommands.GetUpperBound());
01110
01111   if (nLast == -1)
01112     return;
01113
01114   int nFirst = pFigure->m_nTotalDrawn + 1;
01115   CFigCommand figCommand;
01116
01117   // Will now invalidate the rectangle that needs to be drawn
01118
01119   CSpiroRect  rect(1200, 0, 0, 1800);
01120
01121   // go to the last known point in the pattern and move the pen to that position
01122   int i;
01123   for (i = 1; nFirst - i >= 0; i++)
01124   {
01125     figCommand = pFigure->m_arrCommands.GetAt(nFirst - i);
01126     if (figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO)
01127     {
01128       rect.left = rect.right = figCommand.m_point.x;
01129       rect.top = rect.bottom = figCommand.m_point.y;
01130       break;
01131     }
01132   }
01133
01134   for (; nFirst <= nLast; nFirst++)
01135   {
01136     figCommand = pDoc->m_pFigureCurrent->m_arrCommands.GetAt(nFirst);
01137     if (figCommand.m_type == SET_PEN_WIDTH || figCommand.m_type == CHANGE_COLOR)
01138       continue;  // this does not change the area to be invalidated.
01139
01140     // do we need to change color according to the selection?
01141     if (pFigure->m_nTracesThisColor-- == 0 &&
01142         g_pView->m_pWheel->m_icoCurrent != g_pView->m_pWheel->m_nColorCount - 1)
01143     {
01144       figCommand.m_type = CHANGE_COLOR;
01145       ASSERT(g_pView->m_pWheel->m_icoCurrent >= -1);
01146       figCommand.m_co = g_pView->m_pWheel->m_rgCo[++g_pView->m_pWheel->m_icoCurrent];
01147       pFigure->m_arrCommands.InsertAt(nFirst, figCommand);
01148       nLast++;
01149       pFigure->m_nTracesThisColor = pFigure->m_nTracesPerColor;
01150       continue;
01151     }
01152
01153     if (pFigure->m_nTracesThisColor == -1)
01154       pFigure->m_nTracesThisColor = pFigure->m_nTracesPerColor;
01155
01156     ASSERT(figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO);
01157     if (figCommand.m_point.x < rect.left)
01158       rect.left = figCommand.m_point.x;
01159     if (figCommand.m_point.x + 2 > rect.right)
01160       rect.right = figCommand.m_point.x + 2;
01161     if (figCommand.m_point.y > rect.top)
01162       rect.top = figCommand.m_point.y;
01163     if (figCommand.m_point.y - 2 < rect.bottom)
01164       rect.bottom = figCommand.m_point.y - 2;
01165   }
01166
01167   pFigure->m_nTotalDrawn = nLast;
01168   ASSERT(nFirst == nLast + 1);  // make sure the while executed
01169   // now set the new position for the wheel
01170   ENSURE(g_pView->m_pWheel != NULL);
01171   g_pView->m_pWheel->MovePiece(g_pView, figCommand.m_ptWheelPos, figCommand.m_dWheelData,
01172             g_pView->m_nZoomNumer, g_pView->m_nZoomDenom);
01173
01174   rect.Scale(g_pView->m_nZoomNumer, g_pView->m_nZoomDenom);
01175   CDC* pDC = g_pView->GetDC();
01176   g_pView->OnPrepareDC(pDC);
01177   pDC->LPtoDP(&rect);
01178   if (rect.left < rect.right && rect.top < rect.bottom)
01179     g_pView->InvalidateRect(&rect);  // Redraw area covering new lines
01180
01181   g_pView->ReleaseDC(pDC);
01182
01183   if (nLast == pDoc->m_pFigureCurrent->m_arrCommands.GetUpperBound() &&
01184             g_pView->m_IDTimer != 0)
01185   {
01186     g_pView->PostMessage(WM_COMMAND, ID_END_DRAWING );  // kill the timer
01187     g_pView->m_bDrawingActive = false;
01188   }
01189
01190   pDoc->SetModifiedFlag();
01191 }
01192
01193 void CSpiroView::OnDrawPattern()
01194 {
01195   ASSERT(!m_bDrawingActive);
01196   g_pView = this;
01197   m_IDTimer = SetTimer(1, 100, TimerCallBack);
01198   ASSERT(m_IDTimer != 0);
01199   m_bDrawingActive = true;
01200
01201   // enable the pause button
01202   ENSURE(m_pWheel != NULL);
01203   CMainFrame* pFrame = (CMainFrame *)AfxGetMainWnd();
01204   ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
01205   CToolBarCtrl& tb = pFrame->m_wndToolBar.GetToolBarCtrl();
01206   tb.SetState(ID_PAUSEDRAWING, TBSTATE_ENABLED);
01207   tb.SetState(ID_DRAWPATTERN, 0);
01208   CToolBarCtrl& tbctrl = pFrame->m_wndToolBarSpiro.GetToolBarCtrl();
01209   tbctrl.SetState(ID_REMOVERING, 0);
01210   tbctrl.SetState(ID_REMOVEWHEEL, 0);
01211 }
01212
01213 void CSpiroView::OnEndDrawing()
01214 {
01215   ASSERT(m_IDTimer != 0);
01216   ASSERT(!m_bDrawingActive);
01217   VERIFY(KillTimer(m_IDTimer));
01218   m_IDTimer = 0;
01219   ENSURE(m_pAnchor != NULL);
01220   m_pAnchor->SetFigData(m_dDataAnchorFirst);
01221   ENSURE(m_pWheel != NULL);
01222   m_pWheel->MovePiece(this, m_ptWheelPosFirst, m_dDataWheelFirst, m_nZoomNumer, m_nZoomDenom);
01223   m_pWheel->m_icoCurrent = -1;  // set the current color to nothing.
01224 }
01225
01226
01227 BOOL CSpiroView::OnEraseBkgnd(CDC*)
01228 {
01229   return TRUE;
01230 }
01231
01232 void CSpiroView::OnBlack()
01233 {
01234   PressButton(ID_BLACK);
01235 }
01236
01237 void CSpiroView::PressButton(UINT id)
01238 {
01239   UINT rgID[] = {ID_BLUE, ID_RED, ID_GREEN, ID_YELLOW, ID_PURPLE};
01240   COLORREF rgCo[] = {RGB(0, 0, 255), RGB(255, 0, 0),
01241             RGB(128, 128, 0), RGB(128, 64, 64), RGB(255, 0, 255)};
01242
01243   CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
01244   ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
01245   CToolBarCtrl& tbctrl = pFrame->m_wndToolBar.GetToolBarCtrl();
01246
01247   bool bCheck = tbctrl.IsButtonChecked(id) != 0;
01248   tbctrl.CheckButton(id, bCheck);
01249
01250   int i;
01251
01252   ENSURE(m_pWheel != NULL);     // otherwise the buttons should be disabled.
01253   m_pWheel->m_nColorCount = 0;
01254
01255   // if pressed the black button, uncheck all the other colors
01256   if (bCheck && id == ID_BLACK)
01257   {
01258     for (i = 0; i < elementsof(rgID); i++)
01259       tbctrl.CheckButton(rgID[i], FALSE);
01260
01261     m_coCurrentPen = RGB(0, 0, 0);
01262     m_pWheel->m_nColorCount = 1;
01263     m_pWheel->m_rgCo[0] = RGB(0, 0, 0);
01264   }
01265   else
01266   {
01267     // if all the buttons are unchecked, check the black
01268     // if any button is checked, uncheck the black
01269     for (i = 0; i < elementsof(rgID); i++)
01270     {
01271       if (tbctrl.IsButtonChecked(rgID[i]))
01272       {
01273         m_pWheel->m_rgCo[m_pWheel->m_nColorCount++] = rgCo[i];
01274         tbctrl.CheckButton(ID_BLACK, FALSE);  // inefficient, but not terribly awful
01275       }
01276     }
01277
01278     if (m_pWheel->m_nColorCount == 0)
01279     {
01280       tbctrl.CheckButton(ID_BLACK, TRUE);
01281       m_pWheel->m_nColorCount = 1;
01282       m_pWheel->m_rgCo[0] = RGB(0, 0, 0);
01283     }
01284   }
01285
01286   // set the color information for the current figure
01287   CFigure* pFigure = GetDocument()->m_pFigureCurrent;
01288   ENSURE(pFigure != NULL);
01289   long nTracesLeft = pFigure->m_nTotalTraces - pFigure->m_nTotalDrawn;
01290   ASSERT(m_pWheel->m_nColorCount != 0);
01291   pFigure->m_nTracesPerColor = nTracesLeft / m_pWheel->m_nColorCount;
01292   pFigure->m_nTracesThisColor = 0;  // force a color change upon starting
01293   m_pWheel->m_icoCurrent = -1;  // restart current color count
01294
01295   // update pen color on the display
01296   CSpiroRect rectPen;
01297   m_pWheel->GetPenRect(&rectPen);
01298   rectPen.Scale(m_nZoomNumer, m_nZoomDenom);
01299   CDC* pDC = GetDC();
01300   OnPrepareDC(pDC);
01301   pDC->LPtoDP(&rectPen);
01302   InvalidateRect(&rectPen);
01303   ReleaseDC(pDC);
01304 }
01305
01306 void CSpiroView::OnBlue()
01307 {
01308   PressButton(ID_BLUE);
01309 }
01310
01311 void CSpiroView::OnGreen()
01312 {
01313   PressButton(ID_GREEN);
01314 }
01315
01316 void CSpiroView::OnPurple()
01317 {
01318   PressButton(ID_PURPLE);
01319 }
01320
01321 void CSpiroView::OnRed()
01322 {
01323   PressButton(ID_RED);
01324 }
01325
01326 void CSpiroView::OnYellow()
01327 {
01328   PressButton(ID_YELLOW);
01329 }
01330
01331 void CSpiroView::OnUpdateColor(CCmdUI* pCmdUI)
01332 {
01333   pCmdUI->Enable(m_pWheel != NULL && !m_bDrawingActive);
01334 }
01335
01336 void CSpiroView::OnUpdatePauseDrawing(CCmdUI* pCmdUI)
01337 {
01338   pCmdUI->Enable(m_bDrawingActive);
01339 }
01340
01341 void CSpiroView::OnPauseDrawing()
01342 {
01343   KillTimer(m_IDTimer);
01344   m_bDrawingActive = false;
01345 }
01346
01347 void CSpiroView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
01348 {
01349   CSpiroDoc*  pDoc = GetDocument();
01350   ENSURE(pDC != NULL);
01351
01352   CRect rect(pInfo->m_rectDraw);
01353   rect.NormalizeRect();
01354   long  cyDiff = max(0, GetDocument()->m_sizeExtent.cy / 2 - rect.Height());
01355
01356   if (pInfo->m_nCurPage == 1)
01357     pDC->SetWindowOrg(0, pDoc->m_sizeExtent.cy - cyDiff);  // clip off the top if necessary
01358   else
01359     pDC->SetWindowOrg(0, pDoc->m_sizeExtent.cy / 2);  // never clip on the second page
01360
01361   CScrollView::OnPrint(pDC, pInfo);
01362 }
01363
01364 void CSpiroView::OnUpdateSlow(CCmdUI* pCmdUI)
01365 {
01366   pCmdUI->Enable(m_nTracesPerTick != TRACES_PER_TICK_SLOW);
01367 }
01368
01369 void CSpiroView::OnSlow()
01370 {
01371   m_nTracesPerTick = TRACES_PER_TICK_SLOW;
01372 }
01373
01374 void CSpiroView::OnUpdateFast(CCmdUI* pCmdUI)
01375 {
01376   pCmdUI->Enable(m_nTracesPerTick != TRACES_PER_TICK_FAST);
01377 }
01378
01379 void CSpiroView::OnFast()
01380 {
01381   m_nTracesPerTick = TRACES_PER_TICK_FAST;
01382 }
01383
01384 void CSpiroView::OnCallTimerTick()
01385 {
01386   bool bDrawingActiveMode = m_bDrawingActive;
01387   m_bDrawingActive = true;
01388   TimerCallBack(m_hWnd, WM_TIMER, 0, 0);
01389   m_bDrawingActive = bDrawingActiveMode;
01390 }
01391
01392 void CSpiroView::OnUpdateTimerTick(CCmdUI* pCmdUI)
01393 {
01394   pCmdUI->Enable(!m_bDrawingActive && !m_bDrawingDone && m_pWheel != NULL && m_pAnchor != NULL);
01395 }
01396
01397
01398 void CSpiroView::OnTraceWidth()
01399 {
01400   CMainFrame*   pFrame = (CMainFrame*)AfxGetMainWnd();
01401   ENSURE(pFrame != NULL && pFrame->IsKindOf(RUNTIME_CLASS(CMainFrame)));
01402   CToolBarCtrl& tbctrl = pFrame->m_wndToolBar.GetToolBarCtrl();
01403   m_nCurrentPenWidth = tbctrl.IsButtonChecked(ID_TRACEWIDTH)? 2 : 1;
01404   CFigure* pFig = GetDocument()->m_pFigureCurrent;
01405   if (pFig != NULL)  // change the command that sets the pen width
01406   {
01407     INT_PTR iLim = pFig->m_arrCommands.GetSize();
01408     int i;
01409     CFigCommand figCommand;
01410     for (i = 0; i < iLim; i++)
01411     {
01412       figCommand = pFig->m_arrCommands.GetAt(i);
01413       if (figCommand.m_type != SET_PEN_WIDTH)
01414         continue;
01415
01416       figCommand.m_nPenWidth = m_nCurrentPenWidth;
01417       pFig->m_arrCommands.SetAt(i, figCommand);
01418       break;
01419     }
01420
01421     ASSERT(iLim == 0 || i < iLim);
01422   }
01423 }
01424
01425 void CSpiroView::OnUpdateTraceWidth(CCmdUI* pCmdUI)
01426 {
01427   CSpiroDoc* pDoc = GetDocument();
01428   ENSURE(pDoc != NULL && pDoc->IsKindOf(RUNTIME_CLASS(CSpiroDoc)));
01429   pCmdUI->Enable(pDoc->m_pFigureCurrent != NULL && pDoc->m_pFigureCurrent->m_nTotalDrawn == 0);
01430 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerView.h Source File

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePickerView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #if !defined(AFX_TOOLBARDATETIMEPICKERVIEW_H__2921CCF1_7FF3_4E5E_A361_E8FF8F313192__INCLUDED_)
00012 #define AFX_TOOLBARDATETIMEPICKERVIEW_H__2921CCF1_7FF3_4E5E_A361_E8FF8F313192__INCLUDED_
00013
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif // _MSC_VER > 1000
00017
00018
00019 class CToolbarDateTimePickerView : public CView
00020 {
00021 protected: // create from serialization only
00022   CToolbarDateTimePickerView();
00023   DECLARE_DYNCREATE(CToolbarDateTimePickerView)
00024
00025 // Attributes
00026 public:
00027   CToolbarDateTimePickerDoc* GetDocument();
00028
00029 // Operations
00030 public:
00031
00032 // Overrides
00033   // ClassWizard generated virtual function overrides
00034   //{{AFX_VIRTUAL(CToolbarDateTimePickerView)
00035   public:
00036   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038   protected:
00039   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00040   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00041   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045 public:
00046   virtual ~CToolbarDateTimePickerView();
00047 #ifdef _DEBUG
00048   virtual void AssertValid() const;
00049   virtual void Dump(CDumpContext& dc) const;
00050 #endif
00051
00052 protected:
00053
00054 // Generated message map functions
00055 protected:
00056   //{{AFX_MSG(CToolbarDateTimePickerView)
00057     // NOTE - the ClassWizard will add and remove member functions here.
00058     //    DO NOT EDIT what you see in these blocks of generated code !
00059   //}}AFX_MSG
00060   afx_msg void OnContextMenu(CWnd*, CPoint point);
00061   afx_msg void OnFilePrintPreview();
00062   DECLARE_MESSAGE_MAP()
00063 };
00064
00065 #ifndef _DEBUG  // debug version in ToolbarDateTimePickerView.cpp
00066 inline CToolbarDateTimePickerDoc* CToolbarDateTimePickerView::GetDocument()
00067    { return (CToolbarDateTimePickerDoc*)m_pDocument; }
00068 #endif
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071
00072 //{{AFX_INSERT_LOCATION}}
00073 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00074
00075 #endif // !defined(AFX_TOOLBARDATETIMEPICKERVIEW_H__2921CCF1_7FF3_4E5E_A361_E8FF8F313192__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FileViewBar.cpp Source File

  • vc2008fp
  • VisualStudioDemo

FileViewBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "mainfrm.h"
00013 #include "FileViewBar.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char THIS_FILE[]=__FILE__;
00018 #define new DEBUG_NEW
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CFileViewBar
00023
00024 CFileViewBar::CFileViewBar()
00025 {
00026 }
00027
00028 CFileViewBar::~CFileViewBar()
00029 {
00030 }
00031
00032 BEGIN_MESSAGE_MAP(CFileViewBar, CDockablePane)
00033   ON_WM_CREATE()
00034   ON_WM_SIZE()
00035   ON_WM_CONTEXTMENU()
00036   ON_COMMAND(ID_PROPERTIES, OnProperties)
00037   ON_COMMAND(ID_SOLUTION_OPEN, OnSolutionOpen)
00038   ON_COMMAND(ID_SOLUTION_OPEN_WITH, OnSolutionOpenWith)
00039   ON_COMMAND(ID_DUMMY_COMPILE, OnDummyCompile)
00040   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00041   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00042   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00043   ON_WM_PAINT()
00044   ON_WM_SETFOCUS()
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CWorkspaceBar message handlers
00049
00050 int CFileViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00051 {
00052   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00053     return -1;
00054
00055   CRect rectDummy;
00056   rectDummy.SetRectEmpty();
00057
00058   // Create view:
00059   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;
00060
00061   if (!m_wndFileView.Create(dwViewStyle, rectDummy, this, 4))
00062   {
00063     TRACE0("Failed to create solution explorer\n");
00064     return -1;      // fail to create
00065   }
00066
00067   // Load view images:
00068   m_FileViewImages.Create(IDB_FILE_VIEW, 16, 0, RGB(255, 0, 255));
00069   m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL);
00070
00071   m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_SOLUTION_EXPLORER);
00072   m_wndToolBar.LoadToolBar(IDR_SOLUTION_EXPLORER, 0, 0, TRUE /* Is locked */);
00073
00074   OnChangeVisualStyle();
00075
00076   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00077
00078   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00079
00080   m_wndToolBar.SetOwner(this);
00081
00082   // All commands will be routed via this control , not via the parent frame:
00083   m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
00084
00085   // Fill view context(dummy code, don't seek here something magic :-)):
00086   FillFileView();
00087   AdjustLayout();
00088
00089   return 0;
00090 }
00091
00092 void CFileViewBar::OnSize(UINT nType, int cx, int cy)
00093 {
00094   CDockablePane::OnSize(nType, cx, cy);
00095   AdjustLayout();
00096 }
00097
00098 void CFileViewBar::FillFileView()
00099 {
00100   HTREEITEM hRoot = m_wndFileView.InsertItem(_T("Hello files"), 0, 0);
00101   m_wndFileView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);
00102
00103   HTREEITEM hSrc = m_wndFileView.InsertItem(_T("Source Files"), 0, 0, hRoot);
00104
00105   m_wndFileView.InsertItem(_T("Hello.cpp"), 1, 1, hSrc);
00106   m_wndFileView.InsertItem(_T("Hello.rc"), 1, 1, hSrc);
00107   m_wndFileView.InsertItem(_T("HelloDoc.cpp"), 1, 1, hSrc);
00108   m_wndFileView.InsertItem(_T("HelloView.cpp"), 1, 1, hSrc);
00109   m_wndFileView.InsertItem(_T("MainFrm.cpp"), 1, 1, hSrc);
00110   m_wndFileView.InsertItem(_T("StdAfx.cpp"), 1, 1, hSrc);
00111
00112   HTREEITEM hInc = m_wndFileView.InsertItem(_T("Header Files"), 0, 0, hRoot);
00113
00114   m_wndFileView.InsertItem(_T("Hello.h"), 2, 2, hInc);
00115   m_wndFileView.InsertItem(_T("HelloDoc.h"), 2, 2, hInc);
00116   m_wndFileView.InsertItem(_T("HelloView.h"), 2, 2, hInc);
00117   m_wndFileView.InsertItem(_T("resource.h"), 2, 2, hInc);
00118   m_wndFileView.InsertItem(_T("MainFrm.h"), 2, 2, hInc);
00119   m_wndFileView.InsertItem(_T("StdAfx.h"), 2, 2, hInc);
00120
00121   HTREEITEM hRes = m_wndFileView.InsertItem(_T("Resource Files"), 0, 0, hRoot);
00122
00123   m_wndFileView.InsertItem(_T("Hello.ico"), 2, 2, hRes);
00124   m_wndFileView.InsertItem(_T("Hello.rc2"), 2, 2, hRes);
00125   m_wndFileView.InsertItem(_T("HelloDoc.ico"), 2, 2, hRes);
00126   m_wndFileView.InsertItem(_T("Toolbar.bmp"), 2, 2, hRes);
00127
00128   m_wndFileView.Expand(hRoot, TVE_EXPAND);
00129   m_wndFileView.Expand(hSrc, TVE_EXPAND);
00130   m_wndFileView.Expand(hInc, TVE_EXPAND);
00131 }
00132
00133 void CFileViewBar::OnContextMenu(CWnd* pWnd, CPoint point)
00134 {
00135   CTreeCtrl* pWndTree = (CTreeCtrl*) &m_wndFileView;
00136   ASSERT_VALID(pWndTree);
00137
00138   if (pWnd != pWndTree)
00139   {
00140     CDockablePane::OnContextMenu(pWnd, point);
00141     return;
00142   }
00143
00144   if (point != CPoint(-1, -1))
00145   {
00146     // Select clicked item:
00147     CPoint ptTree = point;
00148     pWndTree->ScreenToClient(&ptTree);
00149
00150     UINT flags = 0;
00151     HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
00152     if (hTreeItem != NULL)
00153     {
00154       pWndTree->SelectItem(hTreeItem);
00155     }
00156   }
00157
00158   pWndTree->SetFocus();
00159   theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_SOLUTION, point.x, point.y, this, TRUE);
00160 }
00161
00162 void CFileViewBar::AdjustLayout()
00163 {
00164   if (GetSafeHwnd() == NULL)
00165   {
00166     return;
00167   }
00168
00169   CRect rectClient;
00170   GetClientRect(rectClient);
00171
00172   int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;
00173
00174   m_wndToolBar.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
00175   m_wndFileView.SetWindowPos(NULL, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
00176 }
00177
00178 void CFileViewBar::OnProperties()
00179 {
00180   AfxMessageBox(_T("Properties..."));
00181
00182 }
00183
00184 void CFileViewBar::OnSolutionOpen()
00185 {
00186   // TODO: Add your command handler code here
00187 }
00188
00189 void CFileViewBar::OnSolutionOpenWith()
00190 {
00191   // TODO: Add your command handler code here
00192 }
00193
00194 void CFileViewBar::OnDummyCompile()
00195 {
00196   // TODO: Add your command handler code here
00197 }
00198
00199 void CFileViewBar::OnEditCut()
00200 {
00201   // TODO: Add your command handler code here
00202 }
00203
00204 void CFileViewBar::OnEditCopy()
00205 {
00206   // TODO: Add your command handler code here
00207 }
00208
00209 void CFileViewBar::OnEditClear()
00210 {
00211   // TODO: Add your command handler code here
00212 }
00213
00214 void CFileViewBar::OnPaint()
00215 {
00216   CPaintDC dc(this); // device context for painting
00217
00218   CRect rectTree;
00219   m_wndFileView.GetWindowRect(rectTree);
00220   ScreenToClient(rectTree);
00221
00222   rectTree.InflateRect(1, 1);
00223   dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
00224 }
00225
00226 void CFileViewBar::OnSetFocus(CWnd* pOldWnd)
00227 {
00228   CDockablePane::OnSetFocus(pOldWnd);
00229
00230   m_wndFileView.SetFocus();
00231 }
00232
00233 void CFileViewBar::OnChangeVisualStyle()
00234 {
00235   m_wndToolBar.CleanUpLockedImages();
00236   m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_SOLUTION_EXPLORER_24 : IDR_SOLUTION_EXPLORER, 0, 0, TRUE /* Locked */);
00237
00238   m_FileViewImages.DeleteImageList();
00239
00240   UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_FILE_VIEW24 : IDB_FILE_VIEW;
00241
00242   CBitmap bmp;
00243   if (!bmp.LoadBitmap(uiBmpId))
00244   {
00245     TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
00246     ASSERT(FALSE);
00247     return;
00248   }
00249
00250   BITMAP bmpObj;
00251   bmp.GetBitmap(&bmpObj);
00252
00253   UINT nFlags = ILC_MASK;
00254
00255   nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;
00256
00257   m_FileViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
00258   m_FileViewImages.Add(&bmp, RGB(255, 0, 255));
00259
00260   m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL);
00261 }
00262
00263
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/speeddlg.cpp Source File

  • advanced
  • mtrecalc

speeddlg.cpp

Go to the documentation of this file.
00001 // speedlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtrecalc.h"
00014 #include "speeddlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSpeedDlg dialog
00023
00024
00025 CSpeedDlg::CSpeedDlg(CWnd* pParent /*=NULL*/)
00026   : CDialog(CSpeedDlg::IDD, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CSpeedDlg)
00029   m_nRecalcSpeedSeconds = 0;
00030   //}}AFX_DATA_INIT
00031 }
00032
00033 void CSpeedDlg::DoDataExchange(CDataExchange* pDX)
00034 {
00035   CDialog::DoDataExchange(pDX);
00036   //{{AFX_DATA_MAP(CSpeedDlg)
00037   DDX_Text(pDX, IDC_SPEED, m_nRecalcSpeedSeconds);
00038   DDV_MinMaxInt(pDX, m_nRecalcSpeedSeconds, 1, 20);
00039   //}}AFX_DATA_MAP
00040 }
00041
00042 BEGIN_MESSAGE_MAP(CSpeedDlg, CDialog)
00043   //{{AFX_MSG_MAP(CSpeedDlg)
00044     // NOTE: the ClassWizard will add message map macros here
00045   //}}AFX_MSG_MAP
00046 END_MESSAGE_MAP()
00047
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CSpeedDlg message handlers
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COleClientApp Member List

This is the complete list of members for COleClientApp, including all inherited members.
COleClientApp() | COleClientApp |
InitInstance() | COleClientApp | [virtual]
m_server | COleClientApp | [protected]
OnAppAbout() | COleClientApp | [protected]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMVisualManager.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMVisualManager.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MSMVisualManager.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMVisualManager.h"
00015
00016 #include "MSMCaptionBar.h"
00017 #include "MSMMenuBar.h"
00018 #include "MSMToolBar.h"
00019 #include "MSMTasksPane.h"
00020 #include "MSMCategoryBar.h"
00021 #include "MSMCategoryBarButton.h"
00022 #include "MSMLinksBar.h"
00023 #include "MSMLinksBarButton.h"
00024
00025 #ifdef _DEBUG
00026 #define new DEBUG_NEW
00027 #undef THIS_FILE
00028 static char THIS_FILE[] = __FILE__;
00029 #endif
00030
00031 #define WP_MINBUTTON    15
00032 #define WP_MAXBUTTON    17
00033 #define WP_CLOSEBUTTON    18
00034 #define WP_RESTOREBUTTON  21
00035
00036 #define CBS_NORMAL      1
00037 #define CBS_HOT       2
00038 #define CBS_PUSHED      3
00039 #define CBS_DISABLED    4
00040
00041 IMPLEMENT_DYNCREATE(CMSMVisualManager, CMFCVisualManagerOffice2003)
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CMSMVisualManager
00045
00046 BOOL _StretchBitmap (CDC* pDC, const CRect& rectClient, CBitmap& bmp)
00047 {
00048   ASSERT_VALID (pDC);
00049
00050   if (bmp.GetSafeHandle () != NULL)
00051   {
00052     BITMAP bm;
00053     ZeroMemory (&bm, sizeof (BITMAP));
00054
00055     bmp.GetBitmap (&bm);
00056
00057     CDC dc;
00058     dc.CreateCompatibleDC (pDC);
00059
00060     // Select the bitmap into the in-memory DC
00061     CBitmap* pOldBitmap = dc.SelectObject (&bmp);
00062
00063     int nOldStretchBltMode = pDC->SetStretchBltMode (COLORONCOLOR);
00064
00065     pDC->StretchBlt(0, 0, rectClient.Width (), rectClient.Height (), &dc,
00066             0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
00067
00068
00069     dc.SelectObject (pOldBitmap);
00070
00071     pDC->SetStretchBltMode (nOldStretchBltMode);
00072
00073     return true;
00074   }
00075
00076   return false;
00077 }
00078
00079
00080 void _DrawReflectedGradient (CDC* pDC, COLORREF clrS, COLORREF clrM, COLORREF clrF,
00081                const CRect& rect, BOOL bHorz)
00082 {
00083   ASSERT_VALID (pDC);
00084
00085   CDrawingManager dm (*pDC);
00086
00087   long x1 = rect.left;
00088   long x2 = rect.right;
00089   long y1 = rect.top;
00090   long y2 = rect.bottom;
00091
00092   if (bHorz)
00093   {
00094     CRect rt (x1, y1, x2, (y1 + y2) / 2);
00095     dm.FillGradient (rt, clrM, clrS, TRUE);
00096     rt.top = rt.bottom;
00097     rt.bottom = y2;
00098     dm.FillGradient (rt, clrF, clrM, TRUE);
00099   }
00100   else
00101   {
00102     CRect rt (x1, y1, (x1 + x2) / 2, y2);
00103     dm.FillGradient (rt, clrS, clrM, FALSE);
00104     rt.left  = rt.right;
00105     rt.right = x2;
00106     dm.FillGradient (rt, clrM, clrF, FALSE);
00107   }
00108 }
00109
00110 CMSMVisualManager::CMSMVisualManager()
00111 {
00112   //SetOfficeStyleMenus (TRUE);
00113   SetMenuShadowDepth  (0);
00114
00115   m_MemoryFilled = false;
00116   m_MemorySize   = CSize (0, 0);
00117
00118   m_CaptionButtonSize = CSize (0, 0);
00119
00120   m_brMenuBarButtonHighlighted.CreateSolidBrush (RGB ( 57, 134, 206));
00121   m_clrMenuBarButtonBorderHighlighted = RGB ( 57, 134, 206);
00122
00123   m_clrMenuBarButtonTextRegular       = RGB (255, 255, 255);
00124   m_clrMenuBarButtonTextPressed       = RGB (255, 255, 255);
00125   m_clrMenuBarButtonTextHighlighted   = RGB (255, 255, 255);
00126
00127   m_clrToolBarButtonTextRegular       = RGB (255, 255, 255);
00128   m_clrToolBarButtonTextPressed       = RGB (255, 223, 127);
00129   m_clrToolBarButtonTextHighlighted   = RGB (255, 223, 127);
00130
00131   m_clrCategorieBarButtonTextRegular  = RGB (232, 243, 253);
00132   m_clrCategorieBarButtonTextPressed  = RGB (255, 223, 127);
00133   m_clrCategorieBarButtonTextHighlighted
00134                     = RGB (255, 223, 127);
00135
00136   m_clrToolBarSeparatorS              = RGB (119, 162, 211);
00137   m_clrToolBarSeparatorM              = RGB (255, 255, 255);
00138   m_clrToolBarSeparatorF              = RGB ( 85, 136, 198);
00139
00140   m_clrComboBoxBorder         = RGB ( 78, 122, 171);
00141
00142   m_clrComboBoxBtnRegularF      = RGB (208, 220, 252);
00143   m_clrComboBoxBtnRegularL      = RGB (182, 205, 251);
00144   m_clrComboBoxBtnRegularBorder   = RGB (177, 197, 245);
00145   m_clrComboBoxBtnHighlightedF    = RGB (226, 244, 254);
00146   m_clrComboBoxBtnHighlightedL    = RGB (203, 219, 252);
00147   m_clrComboBoxBtnHighlightedBorder = RGB (140, 165, 225);
00148   m_clrComboBoxBtnPressedF      = RGB (122, 153, 242);
00149   m_clrComboBoxBtnPressedL      = RGB (159, 178, 235);
00150   m_clrComboBoxBtnPressedBorder   = RGB (181, 198, 242);
00151
00152   m_clrCategorieBarButtonBorder       = RGB ( 53,  94, 159);
00153   m_clrCategorieBarButtonBorderM      = RGB (191, 209, 231);
00154   m_clrCategorieBarButtonLine         = RGB (123, 165, 210);
00155   m_clrCategorieBarButtonF            = RGB ( 77, 127, 193);
00156   m_clrCategorieBarButtonL            = RGB ( 40,  74, 144);
00157
00158   m_brLinksBarBack.CreateSolidBrush (RGB ( 49,  85, 153));
00159
00160   m_brLinksBarButtonHighlighted.CreateSolidBrush (RGB ( 38,  69, 135));
00161   m_clrLinksBarButtonBorderHighlighted
00162                     = RGB ( 38,  69, 135);
00163 }
00164
00165 BOOL CMSMVisualManager::LoadMSMCaptionButtonsIcons (LPCTSTR lpszID)
00166 {
00167   CBitmap bmp;
00168
00169   m_CaptionButtonSize = CSize (0, 0);
00170
00171   if (bmp.LoadBitmap (lpszID))
00172   {
00173     BITMAP bm;
00174     ZeroMemory (&bm, sizeof (BITMAP));
00175
00176     bmp.GetBitmap (&bm);
00177
00178     if (m_CaptionButtonIconst.GetSafeHandle() != NULL &&
00179       m_CaptionButtonIconst.GetImageCount () > 0)
00180     {
00181       m_CaptionButtonIconst.DeleteImageList ();
00182     }
00183
00184     UINT nFlags = ILC_MASK;
00185
00186     switch (bm.bmBitsPixel)
00187     {
00188     case 4 :
00189       nFlags |= ILC_COLOR4;
00190       break;
00191     case 8 :
00192       nFlags |= ILC_COLOR8;
00193       break;
00194     case 16:
00195       nFlags |= ILC_COLOR16;
00196       break;
00197     case 24:
00198       nFlags |= ILC_COLOR24;
00199       break;
00200     case 32:
00201       nFlags |= ILC_COLOR32;
00202       break;
00203     default:
00204       ASSERT (FALSE);
00205     }
00206
00207     m_CaptionButtonSize.cx = bm.bmWidth / 12;
00208     m_CaptionButtonSize.cy = bm.bmHeight;
00209
00210     m_CaptionButtonIconst.Create (m_CaptionButtonSize.cx,
00211       m_CaptionButtonSize.cy, nFlags, 0, 3);
00212     m_CaptionButtonIconst.Add (&bmp, RGB (255, 0, 255));
00213
00214     return true;
00215   }
00216
00217   return false;
00218 }
00219
00220 void CMSMVisualManager::OnUpdateSystemColors ()
00221 {
00222
00223   CMFCVisualManagerOffice2003::OnUpdateSystemColors();
00224
00225   m_clrMenuLight            = RGB (210, 232, 253);
00226   m_brMenuLight.DeleteObject ();
00227   m_brMenuLight.CreateSolidBrush (m_clrMenuLight);
00228
00229   m_clrHighlight            = RGB (152, 192, 235);
00230   m_brHighlight.DeleteObject ();
00231   m_brHighlight.CreateSolidBrush (m_clrHighlight);
00232
00233   m_clrHighlightDn          = RGB (152, 192, 235);
00234   m_brHighlightDn.DeleteObject ();
00235   m_brHighlightDn.CreateSolidBrush (m_clrHighlightDn);
00236
00237   m_clrHighlightChecked       = RGB (152, 192, 235);
00238   m_brHighlightChecked.DeleteObject ();
00239   m_brHighlightChecked.CreateSolidBrush (m_clrHighlightChecked);
00240
00241   m_clrMenuItemBorder         = RGB (152, 192, 235);
00242
00243   m_clrMenuBorder           = RGB (128, 128, 128);
00244 }
00245
00246 CMSMVisualManager::~CMSMVisualManager()
00247 {
00248 }
00249
00250 void CMSMVisualManager::SetupMemoryBitmapSize (CDC* pDC, const CSize& size)
00251 {
00252   if (pDC == NULL && size == CSize (0, 0))
00253   {
00254     return;
00255   }
00256
00257   if (m_MemoryDC.GetSafeHdc () != NULL)
00258   {
00259     if (pDC && pDC->GetDeviceCaps (BITSPIXEL) != m_MemoryDC.GetDeviceCaps (BITSPIXEL))
00260     {
00261       m_MemoryBitmap.DeleteObject ();
00262       m_MemoryDC.DeleteDC ();
00263     }
00264   }
00265
00266   if (m_MemoryDC.GetSafeHdc () == NULL)
00267   {
00268     m_MemoryDC.CreateCompatibleDC (pDC);
00269   }
00270
00271   if (m_MemorySize != size || m_MemoryBitmap.GetSafeHandle () == NULL)
00272   {
00273     m_MemorySize = size;
00274
00275     if (m_MemoryBitmap.GetSafeHandle () != NULL)
00276     {
00277       m_MemoryBitmap.DeleteObject ();
00278     }
00279
00280     m_MemoryBitmap.CreateCompatibleBitmap (pDC, m_MemorySize.cx, m_MemorySize.cy);
00281     m_MemoryDC.SelectObject (m_MemoryBitmap);
00282
00283     m_MemoryFilled = false;
00284   }
00285
00286   if (m_MSMFrameBitmap.GetSafeHandle () != NULL)
00287   {
00288     m_MemoryFilled = _StretchBitmap (&m_MemoryDC, CRect (CPoint (0, 0), m_MemorySize), m_MSMFrameBitmap);
00289   }
00290 }
00291
00292 void CMSMVisualManager::OnFillBarBackground (CDC* pDC, CBasePane* pBar,
00293     CRect rectClient, CRect rectClip, BOOL /*bNCArea*/)
00294 {
00295   if (m_MSMFrameBitmap.GetSafeHandle () == NULL)
00296   {
00297     m_MSMFrameBitmap.LoadBitmap (_T("IDB_MSM_FRAME_BKGND"));
00298
00299     if (!m_MemoryFilled)
00300     {
00301       m_MemoryFilled =
00302         _StretchBitmap (&m_MemoryDC, CRect (CPoint (0, 0), m_MemorySize), m_MSMFrameBitmap);
00303     }
00304   }
00305
00306   ASSERT_VALID (pDC);
00307   ASSERT_VALID (pBar);
00308
00309   if (rectClip.IsRectEmpty ())
00310   {
00311     rectClip = rectClient;
00312   }
00313
00314   CRuntimeClass* pBarClass = pBar->GetRuntimeClass ();
00315
00316   if (pBarClass == NULL || pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMFCPopupMenuBar)))
00317   {
00318     pDC->FillRect (rectClip, &m_brMenuLight);
00319
00320     return;
00321   }
00322
00323   BOOL bDefault = true;
00324
00325   if (pBarClass != NULL &&
00326     (pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMCaptionBar)) ||
00327      pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMMenuBar)) ||
00328      pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMToolBar))
00329     ))
00330   {
00331     if (pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMLinksBar)))
00332     {
00333       pDC->FillRect (rectClip, &m_brLinksBarBack);
00334       return;
00335     }
00336
00337     if (!pBar->IsFloating ())
00338     {
00339       CRect rt (rectClient);
00340
00341       CWnd* pWnd = pBar->GetTopLevelFrame ();
00342       if (pWnd != NULL)
00343       {
00344         CRect rtW;
00345         pBar->GetWindowRect (rtW);
00346         pWnd->ScreenToClient (rtW);
00347
00348         rt.OffsetRect (rtW.TopLeft ());
00349       }
00350
00351       int nOldStretchBltMode = pDC->SetStretchBltMode (COLORONCOLOR);
00352
00353       pDC->BitBlt(rectClient.left, rectClient.top,
00354             rectClient.Width (), rectClient.Height (),
00355             &m_MemoryDC,
00356             rt.left, rt.top,
00357             SRCCOPY);
00358
00359       pDC->SetStretchBltMode (nOldStretchBltMode);
00360
00361       bDefault = false;
00362
00363       if (pBarClass->IsDerivedFrom (RUNTIME_CLASS (CMSMCategoryBar)))
00364       {
00365         CDrawingManager dm (*pDC);
00366
00367         CRect rect (rectClient);
00368         rect.top += 3;
00369
00370         rect.bottom = rect.top + 1;
00371         dm.HighlightRect (rect, 15, (COLORREF)-1, 0, RGB (255, 255, 255));
00372
00373         rect.top++;
00374         rect.bottom++;
00375         dm.HighlightRect (rect, 40, (COLORREF)-1, 0, RGB (255, 255, 255));
00376
00377         rect.top++;
00378         rect.bottom = rectClient.bottom - 1;
00379         dm.HighlightRect (rect, 30, (COLORREF)-1, 0, RGB (255, 255, 255));
00380
00381         rect.top = rect.bottom;
00382         rect.bottom++;
00383         dm.HighlightRect (rect, 10, (COLORREF)-1, 0, RGB (255, 255, 255));
00384       }
00385     }
00386   }
00387
00388   if (bDefault)
00389   {
00390     CMFCVisualManagerOffice2003::OnFillBarBackground (pDC, pBar, rectClient, rectClip);
00391   }
00392 }
00393
00394 void CMSMVisualManager::MSMDrawCaptionButton (CDC* pDC, CRect rect, AFX_BUTTON_STATE state, UINT id)
00395 {
00396   int nState = CBS_NORMAL;
00397
00398   int nPart = 0;
00399
00400   if (m_CaptionButtonIconst.GetSafeHandle () != NULL &&
00401     m_CaptionButtonIconst.GetImageCount () >= 12)
00402   {
00403     long index = 0;
00404
00405     switch (id)
00406     {
00407     case SC_CLOSE:
00408       index = 9;
00409       break;
00410     case SC_MINIMIZE:
00411       index = 0;
00412       break;
00413     case SC_MAXIMIZE:
00414       index = 3;
00415       break;
00416     case SC_RESTORE:
00417       index = 6;
00418       break;
00419     default:
00420       ASSERT (FALSE);
00421     }
00422
00423     switch (state)
00424     {
00425     case ButtonsIsHighlighted:
00426       index += 1;
00427       break;
00428     case ButtonsIsPressed:
00429       index += 2;
00430       break;
00431     }
00432
00433     m_CaptionButtonIconst.Draw (pDC, index, rect.TopLeft (), ILD_NORMAL);
00434
00435     return;
00436   }
00437
00438   if (m_pfDrawThemeBackground == NULL || m_hThemeWindow == NULL)
00439   {
00440     switch (state)
00441     {
00442     case ButtonsIsRegular:
00443     case ButtonsIsHighlighted:
00444       nState = 0;
00445       break;
00446     case ButtonsIsPressed:
00447       nState = DFCS_PUSHED;
00448       break;
00449     }
00450
00451     switch (id)
00452     {
00453     case SC_CLOSE:
00454       nPart = DFCS_CAPTIONCLOSE;
00455       break;
00456     case SC_MINIMIZE:
00457       nPart = DFCS_CAPTIONMIN;
00458       break;
00459     case SC_MAXIMIZE:
00460       nPart = DFCS_CAPTIONMAX;
00461       break;
00462     case SC_RESTORE:
00463       nPart = DFCS_CAPTIONRESTORE;
00464       break;
00465     default:
00466       ASSERT (FALSE);
00467     }
00468
00469     pDC->DrawFrameControl (rect, DFC_CAPTION, nPart | nState);
00470     return;
00471   }
00472
00473   switch (state)
00474   {
00475   case ButtonsIsRegular:
00476     nState = CBS_NORMAL;
00477     break;
00478   case ButtonsIsPressed:
00479     nState = CBS_PUSHED;
00480     break;
00481   case ButtonsIsHighlighted:
00482     nState = CBS_HOT;
00483     break;
00484   }
00485
00486   switch (id)
00487   {
00488   case SC_CLOSE:
00489     nPart = WP_CLOSEBUTTON;
00490     break;
00491   case SC_MINIMIZE:
00492     nPart = WP_MINBUTTON;
00493     break;
00494   case SC_MAXIMIZE:
00495     nPart = WP_MAXBUTTON;
00496     break;
00497   case SC_RESTORE:
00498     nPart = WP_RESTOREBUTTON;
00499     break;
00500   default:
00501     ASSERT (FALSE);
00502   }
00503
00504   (*m_pfDrawThemeBackground) (m_hThemeWindow, pDC->GetSafeHdc(), nPart,
00505     nState, &rect, 0);
00506 }
00507
00508 COLORREF CMSMVisualManager::GetToolbarButtonTextColor (CMFCToolBarButton* pButton,
00509                         CMFCVisualManager::AFX_BUTTON_STATE state)
00510 {
00511   COLORREF clr = COLORREF (-1);
00512
00513   CMFCToolBarMenuButton* pMenuButton =
00514     DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);
00515
00516   BOOL bIsMenuButton = pMenuButton != NULL;
00517
00518   BOOL bIsPopupMenu = bIsMenuButton &&
00519     pMenuButton->GetParentWnd () != NULL &&
00520     pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));
00521
00522   if (bIsMenuButton && !bIsPopupMenu)
00523   {
00524     switch (state)
00525     {
00526     case ButtonsIsRegular:
00527       clr = m_clrMenuBarButtonTextRegular;
00528       break;
00529     case ButtonsIsPressed:
00530       clr = m_clrMenuBarButtonTextPressed;
00531       break;
00532     case ButtonsIsHighlighted:
00533       clr = m_clrMenuBarButtonTextHighlighted;
00534       break;
00535     }
00536   }
00537   else
00538   {
00539     if (pButton->IsKindOf (RUNTIME_CLASS (CMSMCategoryBarButton)))
00540     {
00541       switch (state)
00542       {
00543       case ButtonsIsRegular:
00544         clr = m_clrCategorieBarButtonTextRegular;
00545         break;
00546       case ButtonsIsPressed:
00547         clr = m_clrCategorieBarButtonTextPressed;
00548         break;
00549       case ButtonsIsHighlighted:
00550         clr = m_clrCategorieBarButtonTextHighlighted;
00551         break;
00552       }
00553     }
00554     else
00555     {
00556       switch (state)
00557       {
00558       case ButtonsIsRegular:
00559         clr = m_clrToolBarButtonTextRegular;
00560         break;
00561       case ButtonsIsPressed:
00562         clr = m_clrToolBarButtonTextPressed;
00563         break;
00564       case ButtonsIsHighlighted:
00565         clr = m_clrToolBarButtonTextHighlighted;
00566         break;
00567       }
00568     }
00569   }
00570
00571   if (clr == COLORREF (-1))
00572   {
00573     clr = CMFCVisualManagerOffice2003::GetToolbarButtonTextColor (pButton, state);
00574   }
00575
00576   return clr;
00577 }
00578
00579 void CMSMVisualManager::OnFillHighlightedArea (CDC* pDC, CRect rect,
00580     CBrush* pBrush, CMFCToolBarButton* pButton)
00581 {
00582   if (pButton == NULL)
00583   {
00584     CMFCVisualManagerOffice2003::OnFillHighlightedArea (pDC, rect,
00585                         pBrush, pButton);
00586     return;
00587   }
00588
00589   ASSERT_VALID (pDC);
00590   ASSERT_VALID (pBrush);
00591
00592   CMFCToolBarMenuButton* pMenuButton =
00593     DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);
00594
00595   BOOL bIsMenuButton = pMenuButton != NULL;
00596
00597   BOOL bIsPopupMenu = bIsMenuButton &&
00598     pMenuButton->GetParentWnd () != NULL &&
00599     pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));
00600
00601   CBrush* pBr = pBrush;
00602
00603   bIsMenuButton = bIsMenuButton &&
00604     pMenuButton->GetParentWnd () != NULL &&
00605     pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCMenuBar));
00606
00607   BOOL bDefault = true;
00608
00609   if (bIsMenuButton || bIsPopupMenu)
00610   {
00611     if (!bIsPopupMenu)
00612     {
00613       pBr = &m_brMenuBarButtonHighlighted;
00614     }
00615   }
00616   else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMLinksBarButton)))
00617   {
00618     pBr = &m_brLinksBarButtonHighlighted;
00619     rect.InflateRect (0, 0, 1, 1);
00620   }
00621   else
00622   {
00623     bDefault = false;
00624   }
00625
00626   if (bDefault)
00627   {
00628     CMFCVisualManagerOfficeXP::OnFillHighlightedArea (pDC, rect, pBr, pButton);
00629     return;
00630   }
00631   else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMCategoryBarButton)))
00632   {
00633     if ((pButton->m_nStyle & TBBS_CHECKED) != 0)
00634     {
00635       CDrawingManager dm(*pDC);
00636
00637       dm.FillGradient (rect,
00638         m_clrCategorieBarButtonL, m_clrCategorieBarButtonF, TRUE);
00639     }
00640   }
00641   else
00642   {
00643     if (pMenuButton != NULL &&
00644       pMenuButton->GetParentWnd () != NULL &&
00645       pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMSMToolBar)))
00646     {
00647       rect.InflateRect (0, 0, 1, 1);
00648
00649       CDrawingManager dm (*pDC);
00650
00651       dm.HighlightRect (rect, 10, (COLORREF)-1, 0, RGB (255, 255, 255));
00652     }
00653     else // other buttons
00654     {
00655       // TODO: paint toolbar buttons
00656       //CMFCVisualManagerOffice2003::OnFillHighlightedArea (pDC, rect, pBr, pButton);
00657     }
00658   }
00659 }
00660
00661 void CMSMVisualManager::OnDrawMenuBorder (CDC* pDC, CMFCPopupMenu* /*pMenu*/, CRect rect)
00662 {
00663   ASSERT_VALID (pDC);
00664
00665   pDC->Draw3dRect (rect, m_clrMenuBorder, m_clrMenuBorder);
00666
00667   rect.DeflateRect (1, 1);
00668   pDC->Draw3dRect (rect, m_clrMenuLight, m_clrMenuLight);
00669
00670   CRect rectLeft (1, 1, 2, rect.bottom - 1);
00671   pDC->FillRect (rectLeft, &m_brBarBkgnd);
00672
00673 }
00674
00675 void CMSMVisualManager::OnDrawButtonBorder (CDC* pDC,
00676     CMFCToolBarButton* pButton, CRect rect, AFX_BUTTON_STATE state)
00677 {
00678   ASSERT_VALID (pDC);
00679   ASSERT_VALID (pButton);
00680
00681   if (state != ButtonsIsPressed && state != ButtonsIsHighlighted)
00682   {
00683     ASSERT ((pButton->m_nStyle & TBBS_CHECKED) == 0);
00684     return;
00685   }
00686
00687   CMFCToolBarMenuButton* pMenuButton =
00688     DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);
00689
00690   BOOL bIsMenuButton = pMenuButton != NULL;
00691
00692   BOOL bIsPopupMenu = bIsMenuButton &&
00693     pMenuButton->GetParentWnd () != NULL &&
00694     pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));
00695
00696   bIsMenuButton = bIsMenuButton &&
00697     pMenuButton->GetParentWnd () != NULL &&
00698     pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCMenuBar));
00699
00700   if (bIsMenuButton || bIsPopupMenu)
00701   {
00702     COLORREF clrBorder = m_clrMenuItemBorder;
00703
00704     switch (state)
00705     {
00706     case ButtonsIsPressed:
00707     case ButtonsIsHighlighted:
00708       clrBorder = bIsPopupMenu
00709         ? m_clrMenuItemBorder
00710         : m_clrMenuBarButtonBorderHighlighted;
00711       break;
00712     }
00713
00714
00715     if (!bIsPopupMenu || state != ButtonsIsHighlighted)
00716     {
00717       rect.right--;
00718       rect.bottom--;
00719     }
00720
00721     if (bIsMenuButton && !bIsPopupMenu &&
00722       pMenuButton->IsDroppedDown ())
00723     {
00724       CMFCPopupMenu* pPopupMenu= pMenuButton->GetPopupMenu ();
00725       if (pPopupMenu != NULL &&
00726         (pPopupMenu->IsWindowVisible () || pPopupMenu->IsShown()))
00727       {
00728         ExtendMenuButton (pMenuButton, rect);
00729
00730         BOOL bRTL = pPopupMenu->GetExStyle() & WS_EX_LAYOUTRTL;
00731
00732         if (m_bShdowDroppedDownMenuButton && !bRTL &&
00733           CMFCMenuBar::IsMenuShadows () &&
00734           !CMFCToolBar::IsCustomizeMode () &&
00735           afxGlobalData.m_nBitsPerPixel > 8 &&
00736           !afxGlobalData.m_bIsBlackHighContrast &&
00737           !pPopupMenu->IsRightAlign ())
00738         {
00739           CDrawingManager dm (*pDC);
00740
00741           dm.DrawShadow (rect, m_nMenuShadowDepth, 100, 75, NULL, NULL,
00742             m_clrMenuShadowBase);
00743         }
00744       }
00745     }
00746
00747     if (state == ButtonsIsPressed || state == ButtonsIsHighlighted)
00748     {
00749       if (bIsPopupMenu && (pButton->m_nStyle & TBBS_CHECKED))
00750       {
00751         rect.bottom ++;
00752       }
00753
00754       pDC->Draw3dRect (rect, clrBorder, clrBorder);
00755     }
00756   }
00757   else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMCategoryBarButton)))
00758   {
00759     if ((pButton->m_nStyle & TBBS_CHECKED) != 0)
00760     {
00761       _DrawReflectedGradient (pDC, m_clrCategorieBarButtonBorder,
00762         m_clrCategorieBarButtonBorderM, m_clrCategorieBarButtonBorder,
00763         CRect (rect.left, rect.top, rect.right, rect.top + 1), false);
00764
00765       CDrawingManager dm(*pDC);
00766
00767       dm.FillGradient (CRect (rect.left, rect.top, rect.left + 1, rect.bottom),
00768         m_clrCategorieBarButtonL, m_clrCategorieBarButtonBorder, TRUE);
00769
00770       dm.FillGradient (CRect (rect.right - 1, rect.top, rect.right, rect.bottom),
00771         m_clrCategorieBarButtonL, m_clrCategorieBarButtonBorder, TRUE);
00772
00773       {
00774         CPen pen (PS_SOLID, 0, m_clrCategorieBarButtonLine);
00775
00776         CPen* pOldPen = pDC->SelectObject (&pen);
00777
00778         pDC->MoveTo (rect.left + 1, rect.top + 1);
00779         pDC->LineTo (rect.right - 1, rect.top + 1);
00780
00781         pDC->SelectObject (pOldPen);
00782       }
00783
00784       {
00785         CPen pen (PS_SOLID, 0, m_clrCategorieBarButtonL);
00786
00787         CPen* pOldPen = pDC->SelectObject (&pen);
00788
00789         pDC->MoveTo (rect.left + 1, rect.bottom - 1);
00790         pDC->LineTo (rect.right - 1, rect.bottom - 1);
00791
00792         pDC->SelectObject (pOldPen);
00793       }
00794     }
00795   }
00796   else if (pButton->IsKindOf (RUNTIME_CLASS (CMSMLinksBarButton)))
00797   {
00798     if (state == ButtonsIsPressed || state == ButtonsIsHighlighted)
00799     {
00800       pDC->Draw3dRect (rect, m_clrLinksBarButtonBorderHighlighted, m_clrLinksBarButtonBorderHighlighted);
00801     }
00802   }
00803   else
00804   {
00805     if (pMenuButton != NULL &&
00806       pMenuButton->GetParentWnd () != NULL &&
00807       pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMSMToolBar)))
00808     {
00809       CRect rt (rect);
00810
00811       CDrawingManager dm (*pDC);
00812
00813       rt.bottom = rt.top + 1;
00814       dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));
00815
00816       rt.bottom = rect.bottom;
00817       rt.top    = rt.bottom - 1;
00818       dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));
00819
00820       rt.top    = rect.top    + 1;
00821       rt.bottom = rect.bottom - 1;
00822       rt.right  = rt.left + 1;
00823       dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));
00824
00825       rt.right  = rect.right;
00826       rt.left   = rt.right - 1;
00827       dm.HighlightRect (rt, 15, (COLORREF)-1, 0, RGB (255, 255, 255));
00828     }
00829     else
00830     {
00831       // TODO: paint toolbar buttons
00832       //CMFCVisualManagerOffice2003::OnDrawButtonBorder (pDC, pButton, rect, state);
00833     }
00834   }
00835 }
00836
00837 void CMSMVisualManager::OnHighlightMenuItem (CDC*pDC, CMFCToolBarMenuButton* pButton,
00838                       CRect rect, COLORREF& clrText)
00839 {
00840   CMFCToolBarMenuButton* pMenuButton =
00841     DYNAMIC_DOWNCAST (CMFCToolBarMenuButton, pButton);
00842
00843   BOOL bIsMenuButton = pMenuButton != NULL;
00844
00845   BOOL bIsPopupMenu = bIsMenuButton &&
00846     pMenuButton->GetParentWnd () != NULL &&
00847     pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar));
00848
00849   if (bIsPopupMenu && rect.Width() > pButton->Rect ().Width () / 2)
00850   {
00851     rect.right--;
00852   }
00853
00854   CMFCVisualManagerOfficeXP::OnHighlightMenuItem (pDC, pButton, rect, clrText);
00855 }
00856
00857 void CMSMVisualManager::OnDrawSeparator (CDC* pDC, CBasePane* pBar,
00858                      CRect rect, BOOL bHorz)
00859 {
00860   ASSERT_VALID (pDC);
00861   ASSERT_VALID (pBar);
00862
00863   if (pBar->IsDialogControl () ||
00864     pBar->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar)) ||
00865     pBar->IsKindOf (RUNTIME_CLASS (CMFCColorBar)))
00866   {
00867     CMFCVisualManagerOffice2003::OnDrawSeparator (pDC, pBar, rect, bHorz);
00868     return;
00869   }
00870
00871
00872   CRect rectSeparator = rect;
00873
00874   int x1, x2;
00875   int y1, y2;
00876
00877   if (bHorz)
00878   {
00879     x1 = x2 = (rect.left + rect.right) / 2;
00880     y1 = rect.top;
00881     y2 = rect.bottom - 1;
00882   }
00883   else
00884   {
00885     y1 = y2 = (rect.top + rect.bottom) / 2;
00886     x1 = rect.left;
00887     x2 = rect.right;
00888
00889     if (pBar->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar)) &&
00890       !pBar->IsKindOf (RUNTIME_CLASS (CMFCColorBar)))
00891     {
00892
00893       x1 = rect.left + CMFCToolBar::GetMenuImageSize ().cx +
00894             GetMenuImageMargin () + 1;
00895
00896       CRect rectBar;
00897       pBar->GetClientRect (rectBar);
00898
00899       if (rectBar.right - x2 < 50) // Last item in row
00900       {
00901         x2 = rectBar.right;
00902       }
00903
00904       if (((CMFCPopupMenuBar*) pBar)->m_bDisableSideBarInXPMode)
00905       {
00906         x1 = 0;
00907       }
00908
00909       //---------------------------------
00910       //  Maybe Quick Customize separator
00911       //---------------------------------
00912       if (pBar->IsKindOf (RUNTIME_CLASS (CMFCPopupMenuBar)))
00913       {
00914         CWnd* pWnd = pBar->GetParent();
00915         if (pWnd != NULL && pWnd->IsKindOf (RUNTIME_CLASS (CMFCPopupMenu)))
00916         {
00917           CMFCPopupMenu* pMenu = (CMFCPopupMenu*)pWnd;
00918           if (pMenu->IsCustomizePane())
00919           {
00920             x1 = rect.left + 2*CMFCToolBar::GetMenuImageSize ().cx +
00921                 3*GetMenuImageMargin () + 2;
00922           }
00923         }
00924       }
00925     }
00926   }
00927
00928   if (x1 == x2)
00929   {
00930     x2++;
00931   }
00932
00933   if (y1 == y2)
00934   {
00935     y2++;
00936   }
00937
00938   _DrawReflectedGradient (pDC, m_clrToolBarSeparatorS,
00939     m_clrToolBarSeparatorM, m_clrToolBarSeparatorF, CRect (x1, y1, x2, y2), !!bHorz);
00940 }
00941
00942 void CMSMVisualManager::OnDrawComboBorder (CDC* pDC, CRect rect,
00943                         BOOL bDisabled,
00944                         BOOL bIsDropped,
00945                         BOOL bIsHighlighted,
00946                         CMFCToolBarComboBoxButton* pButton)
00947 {
00948   if (afxGlobalData.m_nBitsPerPixel <= 8 || afxGlobalData.m_bIsBlackHighContrast)
00949   {
00950     CMFCVisualManagerOffice2003::OnDrawComboBorder (pDC, rect,
00951                         bDisabled,
00952                         bIsDropped,
00953                         bIsHighlighted,
00954                         pButton);
00955     return;
00956   }
00957
00958   rect.DeflateRect (1, 1);
00959
00960   COLORREF colorBorder = bDisabled ? afxGlobalData.clrBtnShadow : m_clrComboBoxBorder;
00961   pDC->Draw3dRect (&rect, colorBorder, colorBorder);
00962 }
00963
00964 void CMSMVisualManager::OnDrawComboDropButton (CDC* pDC, CRect rect,
00965                         BOOL bDisabled,
00966                         BOOL bIsDropped,
00967                         BOOL bIsHighlighted,
00968                         CMFCToolBarComboBoxButton* pButton)
00969 {
00970   if (afxGlobalData.m_nBitsPerPixel <= 8 || afxGlobalData.m_bIsBlackHighContrast)
00971   {
00972     CMFCVisualManagerOfficeXP::OnDrawComboDropButton (pDC, rect,
00973                         bDisabled, bIsDropped,
00974                         bIsHighlighted, pButton);
00975     return;
00976   }
00977
00978   ASSERT_VALID(pDC);
00979   ASSERT_VALID (this);
00980
00981   CPoint pointTriangle (
00982     rect.left + (rect.Width () - CMenuImages::Size ().cx) / 2 + 1,
00983     rect.top + (rect.Height () - CMenuImages::Size ().cy) / 2 + 1);
00984
00985   if (!bDisabled)
00986   {
00987     COLORREF clr1 = m_clrComboBoxBtnRegularF;
00988     COLORREF clr2 = m_clrComboBoxBtnRegularL;
00989     COLORREF clrB = m_clrComboBoxBtnRegularBorder;
00990
00991     if (bIsHighlighted)
00992     {
00993       clr1 = m_clrComboBoxBtnHighlightedF;
00994       clr2 = m_clrComboBoxBtnHighlightedL;
00995       clrB = m_clrComboBoxBtnHighlightedBorder;
00996     }
00997     else if (bIsDropped)
00998     {
00999       clr1 = m_clrComboBoxBtnPressedF;
01000       clr2 = m_clrComboBoxBtnPressedL;
01001       clrB = m_clrComboBoxBtnPressedBorder;
01002     }
01003
01004     CDrawingManager dm (*pDC);
01005     dm.FillGradient (rect, clr2, clr1, TRUE);
01006
01007     pDC->Draw3dRect (rect, clrB, clrB);
01008   }
01009
01010   CMenuImages::Draw (pDC, CMenuImages::IdArrowDown, pointTriangle,
01011     bDisabled ? CMenuImages::ImageGray : (bIsDropped && bIsHighlighted) ?
01012       CMenuImages::ImageWhite : CMenuImages::ImageBlack);
01013 }
01014
01015 void CMSMVisualManager::OnFillTasksPaneBackground(CDC* pDC, CRect rectWorkArea)
01016 {
01017   CDrawingManager dm (*pDC);
01018   dm.FillGradient (rectWorkArea, RGB (203, 228, 252), RGB (226, 242, 254), FALSE);
01019
01020   CPen penLeft (PS_SOLID, 1, RGB (188, 218, 247));
01021   CPen* pOldPen = pDC->SelectObject (&penLeft);
01022
01023   pDC->MoveTo (rectWorkArea.right - 1, rectWorkArea.top);
01024   pDC->LineTo (rectWorkArea.right - 1, rectWorkArea.bottom);
01025
01026   pDC->SelectObject (pOldPen);
01027 }
01028
01029 void CMSMVisualManager::OnDrawTask(CDC* pDC, CMFCTasksPaneTask* pTask,
01030                      CImageList* pIcons, BOOL bIsHighlighted, BOOL bIsSelected)
01031 {
01032   if (pTask != NULL)
01033   {
01034     pTask->m_clrText = pTask->m_clrTextHot = RGB (16, 37, 127);
01035   }
01036
01037   CMFCVisualManagerOffice2003::OnDrawTask(pDC, pTask, pIcons, bIsHighlighted, bIsSelected);
01038 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/ipframe.cpp Source File

  • ole
  • hiersvr

ipframe.cpp

Go to the documentation of this file.
00001 // ipframe.cpp : implementation of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "hiersvr.h"
00015 #include "ipframe.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CInPlaceFrame
00024
00025 IMPLEMENT_DYNCREATE(CInPlaceFrame, COleIPFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CInPlaceFrame, COleIPFrameWnd)
00028   //{{AFX_MSG_MAP(CInPlaceFrame)
00029   ON_WM_CREATE()
00030   ON_UPDATE_COMMAND_UI(ID_CONTEXT_HELP, OnUpdateContextHelp)
00031   //}}AFX_MSG_MAP
00032   // Global help commands
00033   ON_COMMAND(ID_HELP_INDEX, COleIPFrameWnd::OnHelpIndex)
00034   ON_COMMAND(ID_HELP_USING, COleIPFrameWnd::OnHelpUsing)
00035   ON_COMMAND(ID_HELP, COleIPFrameWnd::OnHelp)
00036   ON_COMMAND(ID_DEFAULT_HELP, COleIPFrameWnd::OnHelpIndex)
00037   ON_COMMAND(ID_CONTEXT_HELP, COleIPFrameWnd::OnContextHelp)
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // arrays of IDs used to initialize control bars
00042
00043 // toolbar buttons - IDs are command buttons
00044 static UINT BASED_CODE buttons[] =
00045 {
00046   // same order as in the bitmap 'toolbar.bmp'
00047   ID_EDIT_CUT,
00048   ID_EDIT_COPY,
00049   ID_EDIT_PASTE,
00050     ID_SEPARATOR,
00051   ID_APP_ABOUT,
00052   ID_CONTEXT_HELP,
00053 };
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CInPlaceFrame construction/destruction
00057
00058 CInPlaceFrame::CInPlaceFrame()
00059 {
00060 }
00061
00062 CInPlaceFrame::~CInPlaceFrame()
00063 {
00064 }
00065
00066 int CInPlaceFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00067 {
00068   if (COleIPFrameWnd::OnCreate(lpCreateStruct) == -1)
00069     return -1;
00070
00071   if (!m_wndResizeBar.Create(this))
00072   {
00073     TRACE0("Failed to create resize bar\n");
00074     return -1;      // fail to create
00075   }
00076
00077   m_dropTarget.Register(this);
00078   return 0;
00079 }
00080
00081 // OnCreateControlBars is called by the framework to create control
00082 //  bars on the container application's windows.
00083 BOOL CInPlaceFrame::OnCreateControlBars(CFrameWnd* pWndFrame,
00084   CFrameWnd* /*pWndDoc*/)
00085 {
00086   // create toolbar on client's frame window
00087   if (!m_wndToolBar.Create(pWndFrame) ||
00088     !m_wndToolBar.LoadBitmap(IDR_HIERSVRTYPE_SRVR_IP) ||
00089     !m_wndToolBar.SetButtons(buttons,
00090       sizeof(buttons)/sizeof(UINT)))
00091   {
00092     TRACE0("Failed to create toolbar\n");
00093     return FALSE;
00094   }
00095
00096   // set owner to this window, so messages are delivered to correct app
00097   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00098   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_SIZE_DYNAMIC);
00099   pWndFrame->EnableDocking(CBRS_ALIGN_ANY);
00100   pWndFrame->DockControlBar(&m_wndToolBar);
00101   m_wndToolBar.SetOwner(this);
00102   return TRUE;
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CInPlaceFrame diagnostics
00107
00108 #ifdef _DEBUG
00109 void CInPlaceFrame::AssertValid() const
00110 {
00111   COleIPFrameWnd::AssertValid();
00112 }
00113
00114 void CInPlaceFrame::Dump(CDumpContext& dc) const
00115 {
00116   COleIPFrameWnd::Dump(dc);
00117 }
00118 #endif //_DEBUG
00119
00120 /////////////////////////////////////////////////////////////////////////////
00121 // CInPlaceFrame commands
00122
00123 void CInPlaceFrame::OnUpdateContextHelp(CCmdUI* pCmdUI)
00124 {
00125   pCmdUI->SetCheck(!!m_bHelpMode);
00126 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/piece.cpp Source File

  • general
  • spiro

piece.cpp

Go to the documentation of this file.
00001 // piece.cpp  : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include <math.h>
00014 #include "piece.h"
00015
00016 extern CSpiroView* g_pView;
00017
00018 //=====================================================================
00019 //CSpiroRect Class Members
00020
00021
00022 //=====================================================================
00023 //CVector Class Members
00024 CVector::CVector(long x, long y)
00025 {
00026   m_dX = (double)x;
00027   m_dY = (double)y;
00028 }
00029
00030 CVector::CVector(long nRadius, double dAngle)
00031 {
00032   m_dX = nRadius * cos(dAngle);
00033   m_dY = nRadius * sin(dAngle);
00034 }
00035
00036 void CVector::SetValueLengthAngle(long nRadius, double dAngle)
00037 {
00038   m_dX = nRadius * cos(dAngle);
00039   m_dY = nRadius * sin(dAngle);
00040 }
00041
00042 CVector::CVector(CPoint pt)
00043 {
00044   m_dX = static_cast<double>(pt.x);
00045   m_dY = static_cast<double>(pt.y);
00046 }
00047
00048 CVector::CVector(CVector& vector2)
00049 {
00050   *this = vector2;
00051 }
00052
00053 __inline CVector CVector::operator+(CVector vector2) const
00054 {
00055   CVector vecSum((long)(m_dX + vector2.m_dX), (long)(m_dY + vector2.m_dY));
00056   return vecSum;
00057 }
00058
00059 __inline CVector CVector::operator-(CVector vector2) const
00060 {
00061   CVector vecDiff((long)(m_dX - vector2.m_dX), (long)(m_dY - vector2.m_dY));
00062   return vecDiff;
00063 }
00064
00065 __inline CVector CVector::operator+=(CPoint pt)
00066 {
00067   m_dX += static_cast<double>(pt.x);
00068   m_dY += static_cast<double>(pt.y);
00069   return *this;
00070 }
00071
00072 __inline CVector CVector::operator+(CPoint pt) const
00073 {
00074   CVector vectFinal;
00075   vectFinal.m_dX = m_dX + pt.x;
00076   vectFinal.m_dY = m_dY + pt.y;
00077   return vectFinal;
00078 }
00079
00080 __inline CVector CVector::operator-(CPoint pt) const
00081 {
00082   CVector vectFinal;
00083   vectFinal.m_dX = m_dX + pt.x;
00084   vectFinal.m_dY = m_dY + pt.y;
00085   return vectFinal;
00086 }
00087
00088 __inline void CVector::Scale(long nNumer, long nDenom)
00089 {
00090   double dFactor = (double)nNumer / (double) nDenom;
00091   m_dX *= dFactor;
00092   m_dY *= dFactor;
00093 }
00094
00095 __inline CVector::operator CPoint() const
00096 {
00097   CPoint ptRet(static_cast<long>(m_dX), static_cast<long>(m_dY));
00098   return ptRet;
00099 }
00100
00101 __inline CVector& CVector::operator=(CVector& vector2)
00102 {
00103   m_dX = vector2.m_dX;
00104   m_dY = vector2.m_dY;
00105   return *this;
00106 }
00107
00108 __inline CVector CVector::operator=(CPoint pt)
00109 {
00110   m_dX = pt.x;
00111   m_dY = pt.y;
00112   return *this;
00113 }
00114
00115 double CVector::GetAngle() const
00116 {
00117   if (m_dX == 0 && m_dY > 0)  // the angle is pi/2
00118     return PI / 2.0;
00119
00120   if (m_dX == 0 && m_dY < 0)
00121     return 1.5 * PI;
00122
00123   if (m_dX ==0 && m_dY == 0)
00124     return 0;
00125
00126   double dAngle = atan(m_dY / m_dX);
00127   if (m_dY <= 0 && m_dX < 0 || m_dY > 0 && m_dX < 0)
00128     dAngle += PI;
00129
00130   return dAngle;
00131 }
00132
00133 long CVector::GetLength() const
00134 {
00135   double dSqLen = m_dX * m_dX + m_dY * m_dY;
00136   return static_cast<long>(sqrt(dSqLen));
00137 }
00138
00139 //=====================================================================
00140 // CBasePiece class members
00141
00142 CBasePiece::CBasePiece(COLORREF co, bool bIsWheel) :
00143             m_ptPos(0, 0)
00144 {
00145   m_co = co;
00146   m_bIsWheel = bIsWheel;
00147   m_nColorCount = 1;
00148   m_icoCurrent = -1;
00149   memset(m_rgCo, 0, sizeof(m_rgCo));   // the current color is black, which is 0 anyway
00150 }
00151
00152 //======================================================================
00153 // CWheel class members
00154 long CWheel::m_rgnRads[TOTALWHEELS] = {130, 120, 110, 100, 90, 80, 70};
00155 COLORREF CWheel::m_rgco[TOTALWHEELS] =
00156     {RGB(255, 0, 0),   // Red
00157     RGB(0, 0, 255),  // Blue
00158     RGB(255, 255, 0), // Yellow
00159     RGB(128, 128, 0),  // Green
00160     RGB(125, 0, 125),  // Purple
00161     RGB(128, 50, 50), // Orange??
00162     RGB(0, 128, 128)};   // ??
00163
00164 COLORREF CWheel::m_rgcoPattern[TOTALWHEELS] = {
00165     RGB(128, 0, 0),  // Red
00166     RGB(255, 255, 0), //Yellow
00167     RGB(0, 0, 255), // Blue
00168     RGB(255, 255, 0),   // Yellow
00169     RGB(255, 255, 0),  // Yellow
00170     RGB(0, 0, 255),  // Blue
00171     RGB(255, 0, 0) };
00172
00173 CWheel::CWheel(long nRadius, COLORREF co, COLORREF coPattern) :
00174         CBasePiece(co)
00175 {
00176   ASSERT(TOTALWHEELS == elementsof(m_rgco));
00177   ASSERT(TOTALWHEELS == elementsof(m_rgnRads));
00178
00179   m_nPenRadius = 0;
00180   m_angleCurrent = m_bIsWheel? 0 : PI / 2.0;
00181   m_dAngleCorrection = 0;
00182   m_anglePen = 0;
00183   m_nRadius = nRadius;
00184   m_coPattern = coPattern;
00185   m_angleDelta = 0;
00186 }
00187
00188 /* Draw will drw the piece at the current location including the pattern
00189   which is for now a happy face. */
00190 void CWheel::Draw(CDC* pDC, long nZoomNumer, long nZoomDenom) const
00191 {
00192   ENSURE(pDC != NULL);
00193   // First find if the bounding rectangle is visible at all in the DC
00194
00195   CSpiroRect rect;
00196   GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
00197   if (!pDC->RectVisible(&rect))
00198     return;
00199
00200   CRgn rgn;
00201   VERIFY(rgn.CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
00202   CBrush brush(m_co);
00203   pDC->FillRgn(&rgn, &brush);
00204
00205   // Now draw the pattern.  (happy face)
00206   // First draw the smile at half the radius distance.
00207   long nRadSmile = m_nRadius * 5 / 8;
00208   double dAngle = m_bIsWheel? m_angleCurrent : 0;
00209   double dAngleStart = dAngle + PI * 9 / 8;
00210
00211   int ptsInPen = max(m_nRadius * 100 * nZoomNumer / 12 / 72 / nZoomDenom, 1);
00212   CPen  pen(PS_SOLID /*| PS_ENDCAP_ROUND*/, ptsInPen, m_coPattern);
00213   CPen* pPenOld = pDC->SelectObject(&pen);
00214
00215     // rectangle to draw smile arc
00216   rect.SetRect(m_ptPos.x - nRadSmile, m_ptPos.y + nRadSmile, m_ptPos.x + nRadSmile, m_ptPos.y - nRadSmile);
00217   rect.Scale(nZoomNumer, nZoomDenom);
00218
00219   CVector vecStart(nRadSmile, dAngleStart);
00220   vecStart += m_ptPos;
00221   vecStart.Scale(nZoomNumer, nZoomDenom);
00222   CVector vecFinish(nRadSmile, dAngleStart + PI * 3.0 / 4.0);
00223   vecFinish += m_ptPos;
00224   vecFinish.Scale(nZoomNumer, nZoomDenom);
00225
00226   pDC->Arc(&rect, (CPoint)vecStart, (CPoint)vecFinish);  // draw smile
00227   pDC->SelectObject(pPenOld);  // set the default black pen
00228
00229   // finished drawing the smile for the happy face, now draw the eyes.
00230   CBrush brushPat(m_coPattern);
00231   CBrush* pBrushOld = pDC->SelectObject(&brushPat);
00232
00233   nRadSmile = nRadSmile * 3 / 4;  // using += would lose precision
00234   vecStart.SetValueLengthAngle(nRadSmile, dAngle + 3.0 * PI / 4.0);
00235   vecStart += m_ptPos;
00236   vecStart.Scale(nZoomNumer, nZoomDenom);
00237
00238   long  nRadEye = m_nRadius * nZoomNumer / nZoomDenom / 12;
00239
00240   for (int i = 0; i < 2; i++)
00241   {
00242     rect.SetRect(((CPoint)vecStart).x - nRadEye, ((CPoint)vecStart).y + nRadEye,
00243               ((CPoint)vecStart).x + nRadEye, ((CPoint)vecStart).y - nRadEye);
00244
00245     pDC->Ellipse(&rect);
00246
00247     if (i == 0)
00248     {
00249       vecStart.SetValueLengthAngle(nRadSmile, dAngle + PI / 4.0);
00250       vecStart += m_ptPos;
00251       vecStart.Scale(nZoomNumer, nZoomDenom);
00252     }
00253   }
00254
00255   pDC->SelectObject(pBrushOld);
00256   brushPat.DeleteObject();
00257
00258   // now draw the pen location if the wheel is not an anchor
00259   if (m_bIsWheel)
00260   {
00261     ASSERT(m_icoCurrent >= -1 && m_icoCurrent < elementsof(m_rgCo));
00262     int   ico = max(m_icoCurrent, 0);
00263     CSpiroRect secondRect;
00264     GetPenRect(&secondRect);
00265     rect.Scale(nZoomNumer, nZoomDenom);
00266     brushPat.CreateSolidBrush(m_rgCo[ico]);
00267     pDC->SelectObject(&brushPat);
00268     pen.DeleteObject();
00269     pen.CreatePen(PS_SOLID, 1, m_coPattern);
00270     pDC->SelectObject(&pen);
00271     pDC->Ellipse(&rect);
00272   }
00273
00274   // clean up and we're done
00275   pDC->SelectObject(pPenOld);
00276   pDC->SelectObject(pBrushOld);
00277 }
00278
00279 /* GetBoundingRect returns the rectangle sorrounding the piece */
00280 void CWheel::GetBoundingRect(CSpiroRect* pRect, long nZoomNumer, long nZoomDenom) const
00281 {
00282   ENSURE(pRect != NULL);
00283   pRect->SetRect((m_ptPos.x - m_nRadius) * nZoomNumer / nZoomDenom,
00284             (m_ptPos.y + m_nRadius) * nZoomNumer / nZoomDenom,
00285             (m_ptPos.x + m_nRadius) * nZoomNumer / nZoomDenom,
00286             (m_ptPos.y - m_nRadius) * nZoomNumer / nZoomDenom);
00287 }
00288
00289 void CWheel::SetPosition(CPoint pt)
00290 {
00291   m_ptPos.x = pt.x;
00292   m_ptPos.y = pt.y - m_nRadius;
00293 }
00294
00295 // overload used to set the position of the piece based on a contact position
00296 // and an angle provided by an anchor.
00297 void CWheel::SetPosition(CPoint point, double dAngle)
00298 {
00299   ASSERT(m_nRadius > 0);
00300   ASSERT(m_bIsWheel);  // this routine should never execute for anchors
00301   CVector vecCenter(m_nRadius, dAngle);
00302   vecCenter += point;  // add the point in logical coordinates.
00303   m_ptPos = (CPoint)vecCenter;
00304 }
00305
00306 // Gets the region used by the piece, in CLIENT coordinates.
00307 // Due to off by one errors in some drivers, it is necessary to inflate the
00308 // region before invalidating to make sure a piece is erased completely
00309 void CWheel::GetDevPieceRgn(CDC* pDC, CRgn* pRgn,
00310           long nZoomNumer, long nZoomDenom, bool bInflate) const
00311 {
00312   ENSURE(pDC != NULL);
00313   CSpiroRect  rect;
00314   GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
00315   pDC->LPtoDP(&rect);  // convert to client coords
00316   if (bInflate)  // cover off by one errors in region invalidation in Windows
00317     rect.InflateRect(10, 10);
00318
00319   ENSURE(pRgn != NULL);
00320   VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
00321 }
00322
00323 void CWheel::GetLogPieceRgn(CRgn* pRgn, long nZoomNumer, long nZoomDenom) const
00324 {
00325   CSpiroRect  rect;
00326   GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
00327   ENSURE(pRgn != NULL);
00328   VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
00329 }
00330
00331 void CWheel::GetContactPosition(CPoint, long, long,
00332                     CPoint& ptContact, double& dAngle)
00333 {
00334   ptContact.x = m_ptPos.x;
00335   ptContact.y = m_ptPos.y + m_nRadius;
00336   dAngle = PI / 2.0;
00337   m_angleCurrent = dAngle;
00338 }
00339
00340 // SetPenLocation receives the point in logical coordinates without scaling.
00341 // The DC and the zoom ratio is provided only for the purpose of invalidating
00342 // the rectangles where the pen was and where it moves to.
00343 bool CWheel::SetPenLocation(CSpiroView* pView, CDC* pDC, CPoint point,
00344                   long nZoomNumer, long nZoomDenom)
00345 {
00346   if (point != CPoint(0, 0))
00347   {
00348     CSpiroRect  rectPen;
00349     GetPenRect(&rectPen);
00350     point.x -= m_ptPos.x;
00351     point.y -= m_ptPos.y;
00352     CVector vect(point);  // easier to compute angle using vector
00353     long nNewPenRadius = vect.GetLength();
00354     if (nNewPenRadius < m_nRadius - PENMARKERSIZE - 1)
00355     {
00356       m_anglePen = vect.GetAngle() - m_angleCurrent;
00357       m_nPenRadius = nNewPenRadius;
00358
00359       // invalidate the old location of the pen
00360       rectPen.Scale(nZoomNumer, nZoomDenom);
00361       pDC->LPtoDP(&rectPen);
00362       pView->InvalidateRect(&rectPen, FALSE);
00363
00364       // now invalidate the new location of the pen
00365       GetPenRect(&rectPen);
00366       rectPen.Scale(nZoomNumer, nZoomDenom);
00367       pDC->LPtoDP(&rectPen);
00368       pView->InvalidateRect(&rectPen, FALSE);
00369       return true;
00370     }
00371
00372     return false;  // if the new pen location is off the wheel don't change anything
00373   }
00374
00375   //default value.
00376   m_anglePen = PI / 2.0;
00377   m_nPenRadius = m_nRadius * 3 / 4;
00378   return true;
00379 }
00380
00381 void CWheel::GetPenRect(CRect* pRect) const
00382 {
00383   CVector vectPosPen(m_nPenRadius, m_anglePen + m_angleCurrent);
00384   vectPosPen += m_ptPos;
00385   CPoint ptPen = (CPoint)vectPosPen;
00386
00387   pRect->SetRect(ptPen.x - PENMARKERSIZE, ptPen.y + PENMARKERSIZE, // working in loenglish, so add
00388             ptPen.x + PENMARKERSIZE, ptPen.y - PENMARKERSIZE);
00389 }
00390
00391 int CWheel::HitTest(CDC* pDC, CPoint point, long nZoomNumer, long nZoomDenom) const
00392 {
00393   ENSURE(pDC != NULL);
00394   CSpiroRect rectPen;
00395   GetPenRect(&rectPen);
00396   rectPen.Scale(nZoomNumer, nZoomDenom);
00397
00398   // convert the pen rectangle to device coordinates.
00399   pDC->LPtoDP(&rectPen);
00400   if (rectPen.PtInRect(point))
00401   {
00402     return HIT_PEN_LOCATION;
00403   }
00404
00405   return HIT_NOTHING;
00406 }
00407
00408 __inline double CWheel::GetPerimeter() const
00409 {
00410   return 2.0 * PI * (double)m_nRadius;
00411 }
00412
00413 __inline void CWheel::SetAngleDelta(long nDistance, bool bReverse)
00414 {
00415   // according to physics, w * r = d, and so w = d / r.
00416   ASSERT(m_nRadius > 0);
00417   ASSERT(nDistance > 0);
00418   m_angleDelta = (bReverse? -1.0 : 1.0) * (double)nDistance / m_nRadius;
00419
00420   ASSERT(m_angleDelta != 0);
00421 }
00422
00423 __inline void CWheel::AdvanceTrace(CPoint& ptContact, double& dAngle, double& dAngleExtra, bool bMove)
00424 {
00425   ASSERT(m_angleDelta != 0);
00426
00427   if (m_bIsWheel)
00428   {
00429     CVector vecPos = ptContact;
00430     vecPos += CVector(m_nRadius, dAngle);  // new position for the wheel
00431     if (bMove)
00432     {
00433       m_ptPos = (CPoint)vecPos;
00434       m_angleCurrent += m_angleDelta + dAngleExtra;
00435     }
00436   }
00437   else  // code when wheel behaves like an anchor
00438   {
00439     if (bMove)
00440     {
00441       m_angleCurrent += m_angleDelta + m_dAngleCorrection;
00442     }
00443
00444     CVector vecAfter(m_nRadius, m_angleCurrent);
00445     vecAfter += m_ptPos;
00446     ptContact = (CPoint)vecAfter;
00447     dAngle = m_angleCurrent;
00448     dAngleExtra = m_angleDelta + m_dAngleCorrection;
00449   }
00450 }
00451
00452 __inline void CWheel::GetPenLocation(CPoint* pPoint) const
00453 {
00454   ASSERT(m_bIsWheel);
00455   ASSERT(m_nPenRadius > 0);
00456   CVector vecPen(m_nPenRadius, m_anglePen + m_angleCurrent);
00457   vecPen += m_ptPos;  // move relative to the location of the wheel
00458   *pPoint = (CPoint)vecPen;
00459 }
00460
00461 long CWheel::GetCycleError() const
00462 {
00463   // Calculate the distance for the cycle error to be 6 degrees
00464   // which means (PI / 30) * radius
00465   return (long)(PI * (double)m_nRadius / 30.0);
00466 }
00467
00468 __inline bool CWheel::ReverseWheelDirection() const
00469 {
00470   return false;
00471 }
00472
00473 __inline double CWheel::GetFigData() const
00474 {
00475   return m_angleCurrent;
00476 }
00477
00478 __inline void CWheel::SetFigData(double dData)
00479 {
00480   m_angleCurrent = dData;
00481 }
00482
00483 // The following routine is called during the drawing process to create the animation
00484 // effect.  It moves the wheel from one position to the next.
00485 void CWheel::MovePiece(CSpiroView* pView, CPoint point, double dWheelData,
00486               long nZoomNumer, long nZoomDenom)
00487 {
00488   ENSURE(pView != NULL);
00489   if (point == m_ptPos && dWheelData == m_angleCurrent)
00490     return;
00491
00492   // First invalidate the current rectangle for the wheel and then the new position
00493   CSpiroRect rect;
00494   CDC* pDC = pView->GetDC();
00495   ENSURE(pDC != NULL);
00496   pView->OnPrepareDC(pDC);
00497
00498   for (int i= 0; i < 2; i++)
00499   {
00500     GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
00501     pDC->LPtoDP(&rect);
00502     pView->InvalidateRect(&rect);
00503     m_ptPos = point;
00504     m_angleCurrent = dWheelData;
00505   }
00506
00507   pView->ReleaseDC(pDC);
00508 }
00509
00510 void CWheel::SetWheelMode(bool bWheel)
00511 {
00512   m_bIsWheel = bWheel;
00513   if (m_bIsWheel)
00514     m_angleCurrent = 0;
00515 }
00516
00517 //=============================================================================
00518 // CRing member functions
00519
00520 long CRing::m_rgnRads[TOTALRINGS] = {250, 220, 180, 150};
00521 COLORREF CRing::m_rgco[TOTALRINGS] =
00522     {RGB(255, 0, 0),
00523     RGB(0, 0, 255),
00524     RGB(255, 255, 0),
00525     RGB(200, 200, 0)};
00526
00527 CRing::CRing(long nRadiusIn, long nRadiusOut, COLORREF co, COLORREF coPattern) :
00528     CWheel(nRadiusOut, co, coPattern)
00529 {
00530   ASSERT(TOTALRINGS == elementsof(m_rgnRads));
00531   ASSERT(TOTALRINGS == elementsof(m_rgco));
00532   m_nRadiusInt = nRadiusIn;
00533   m_bWheelInside = false;
00534   m_angleCurrent = PI / 2.0;  // initial angle is always pi/2 for a ring
00535 }
00536
00537 void CRing::Draw(CDC* pDC, long nZoomNumer, long nZoomDenom) const
00538 {
00539   ENSURE(pDC != NULL);
00540   ASSERT(pDC->GetMapMode() == MM_SPIRO);  // make sure the mapping mode is right
00541   ASSERT(m_nRadiusInt > 0 && m_nRadius > m_nRadiusInt);
00542
00543   CSpiroRect  rectOut;
00544   GetBoundingRect(&rectOut, nZoomNumer, nZoomDenom);
00545   if (!pDC->RectVisible(&rectOut))
00546     return;
00547
00548   CRgn  rgnRing;
00549   VERIFY(rgnRing.CreateEllipticRgn(rectOut.left, rectOut.top,
00550                   rectOut.right, rectOut.bottom));
00551
00552   CSpiroRect    rectIn;
00553   GetInnerRect(&rectIn, nZoomNumer, nZoomDenom);
00554   CRgn  rgnInnerRing;
00555   VERIFY(rgnInnerRing.CreateEllipticRgn(rectIn.left, rectIn.top,
00556                     rectIn.right, rectIn.bottom));
00557
00558   //define the region for the ring itself
00559   VERIFY(rgnRing.CombineRgn(&rgnRing, &rgnInnerRing, RGN_DIFF) != ERROR);
00560
00561   CBrush  brush(m_co);  // get ready to draw the ring.
00562   pDC->FillRgn(&rgnRing, &brush);  // draw the ring
00563
00564   double  dSpace = PI / 30.0;
00565   CVector vectWork;
00566   CPen  pen(PS_SOLID, 2, RGB(0, 0, 0));
00567   CPen* pPenOld(NULL);  // Initialize to avoid compiler warnings.
00568
00569   for (int i = 0; i < 60; i++)
00570   {
00571     if (i % 5 == 0)
00572       pPenOld = pDC->SelectObject(&pen);
00573
00574     vectWork = m_ptPos;
00575     vectWork += CVector(m_nRadiusInt, dSpace * (double)i + PI / 2.0);
00576     CPoint ptStart = (CPoint)vectWork;
00577     vectWork += CVector(m_nRadius - m_nRadiusInt, dSpace * (double)i + PI / 2.0);
00578     CPoint ptEnd = (CPoint)vectWork;
00579     pDC->MoveTo(ptStart.x * nZoomNumer / nZoomDenom, ptStart.y * nZoomNumer / nZoomDenom);
00580     pDC->LineTo(ptEnd.x * nZoomNumer / nZoomDenom, ptEnd.y * nZoomNumer / nZoomDenom);
00581
00582     if (i % 5 == 0)
00583       pDC->SelectObject(pPenOld);
00584   }
00585 }
00586
00587 void CRing::GetInnerRect(CSpiroRect* pRect, long nZoomNumer, long nZoomDenom) const
00588 {
00589   pRect->left = (m_ptPos.x - m_nRadiusInt) * nZoomNumer / nZoomDenom;
00590   pRect->right = (m_ptPos.x + m_nRadiusInt) * nZoomNumer / nZoomDenom;
00591   pRect->top = (m_ptPos.y + m_nRadiusInt) * nZoomNumer / nZoomDenom;
00592   pRect->bottom = (m_ptPos.y - m_nRadiusInt) * nZoomNumer / nZoomDenom;
00593 }
00594
00595 // returns the region occupied by the piece in CLIENT coordinates.
00596 void CRing::GetDevPieceRgn(CDC* pDC, CRgn* pRgn,
00597             long nZoomNumer, long nZoomDenom, bool bInflate) const
00598 {
00599   ENSURE(pDC != NULL);
00600   ENSURE(pRgn != NULL);
00601   CSpiroRect  rect;
00602   GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
00603   pDC->LPtoDP(&rect);  // convert to client coordinates
00604   if (bInflate)
00605     rect.InflateRect(5, 5);
00606
00607   VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
00608
00609   CSpiroRect rectInner;
00610   GetInnerRect(&rectInner, nZoomNumer, nZoomDenom);
00611   pDC->LPtoDP(&rectInner);
00612   if (bInflate)
00613     rectInner.DeflateRect(5, 5);  // cover for bug where region is not repainted properly
00614
00615   CRgn  rgnInner;
00616   VERIFY(rgnInner.CreateEllipticRgn(rectInner.left, rectInner.top,
00617                 rectInner.right, rectInner.bottom));
00618
00619   VERIFY(pRgn->CombineRgn(pRgn, &rgnInner, RGN_DIFF) != ERROR);
00620 }
00621
00622 // returns the region occupied by the piece in CLIENT coordinates.
00623 void CRing::GetLogPieceRgn(CRgn* pRgn, long nZoomNumer, long nZoomDenom) const
00624 {
00625   CSpiroRect  rect;
00626   GetBoundingRect(&rect, nZoomNumer, nZoomDenom);
00627   ENSURE(pRgn != NULL);
00628   VERIFY(pRgn->CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
00629   int nWidth = (m_nRadius - m_nRadiusInt) * nZoomNumer / nZoomDenom;
00630   rect.DeflateRect(nWidth, -nWidth);
00631   CRgn  rgnInner;
00632   VERIFY(rgnInner.CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
00633   VERIFY(pRgn->CombineRgn(pRgn, &rgnInner, RGN_DIFF) != ERROR);
00634 }
00635
00636
00637 // called by a wheel to find the initial position of contact with the anchor
00638 // point is the point IN LOGICAL COORDS where the user clicked to anchor the wheel
00639 void CRing::GetContactPosition(CPoint point, long nZoomNumer, long nZoomDenom,
00640                  CPoint& ptContact, double& dAngle)
00641 {
00642   CSpiroRect  rect;
00643   GetInnerRect(&rect, nZoomNumer, nZoomDenom);
00644   ptContact.x = m_ptPos.x;
00645   CRgn  rgnInner;
00646   VERIFY(rgnInner.CreateEllipticRgn(rect.left, rect.top, rect.right, rect.bottom));
00647   if (rgnInner.PtInRegion(point))  // anchor wheel inside the ring
00648   {
00649     ptContact.y = m_ptPos.y + m_nRadiusInt;
00650     dAngle = 3.0 * PI / 2.0;
00651     m_angleCurrent = PI / 2.0;  // GetContactPosition always resets the current angle
00652     m_bWheelInside = true;
00653     return;
00654   }
00655
00656   ptContact.y = m_ptPos.y + m_nRadius;
00657   dAngle = PI / 2.0;
00658   m_angleCurrent = dAngle;
00659   m_bWheelInside = false;
00660 }
00661
00662 __inline double CRing::GetPerimeter() const
00663 {
00664   return (m_bWheelInside? (double)m_nRadiusInt :
00665                 (double)m_nRadius) * 2.0 * PI;
00666 }
00667
00668 __inline void CRing::SetAngleDelta(long nDistance, bool)
00669 {
00670   ASSERT(nDistance > 0);
00671   ASSERT(m_nRadiusInt > 0 && m_nRadius > 0);
00672   m_angleDelta = (double)nDistance /
00673             (double)(m_bWheelInside? m_nRadiusInt : m_nRadius);
00674
00675   ASSERT(m_angleDelta != 0);
00676 }
00677
00678 __inline void CRing::AdvanceTrace(CPoint& ptContact, double& dAngle, double& dAngleExtra, bool bMove)
00679 {
00680   ASSERT(!m_bIsWheel);  // rings do not work as wheels in this implementation
00681   ASSERT(m_angleDelta != 0);
00682
00683   if (!m_bWheelInside)  // on the external use, behaves like a common wheel
00684   {
00685     CWheel::AdvanceTrace(ptContact, dAngle, dAngleExtra, bMove);
00686     return;
00687   }
00688
00689
00690   if (bMove)
00691   {
00692     m_angleCurrent += m_angleDelta + m_dAngleCorrection;
00693   }
00694
00695   CVector vecAfter(m_nRadiusInt, m_angleCurrent);
00696   vecAfter += m_ptPos;
00697   ptContact = (CPoint)vecAfter;
00698   dAngle = m_angleCurrent + PI;
00699   dAngleExtra = m_angleDelta + m_dAngleCorrection;   // positive is fine since wheel spins in negative direction
00700 }
00701
00702 long CRing::GetCycleError() const
00703 {
00704   // Calculate the error to be the distance in the circumference for a 6 degree
00705   // error, which is (PI / 30) * radius
00706   if (!m_bWheelInside)
00707     return CWheel::GetCycleError();
00708
00709   return (long)(PI * (double)m_nRadiusInt / 30.0);
00710 }
00711
00712 __inline bool CRing::ReverseWheelDirection() const
00713 {
00714   return m_bWheelInside;
00715 }
00716
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImagePpg.cpp Source File

  • controls
  • IMAGE

ImagePpg.cpp

Go to the documentation of this file.
00001 // ImagePpg.cpp : Implementation of the CImagePropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "image.h"
00014 #include "ImagePpg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 IMPLEMENT_DYNCREATE(CImagePropPage, COlePropertyPage)
00024
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // Message map
00028
00029 BEGIN_MESSAGE_MAP(CImagePropPage, COlePropertyPage)
00030   //{{AFX_MSG_MAP(CImagePropPage)
00031   // NOTE - ClassWizard will add and remove message map entries
00032   //    DO NOT EDIT what you see in these blocks of generated code !
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // Initialize class factory and guid
00039
00040 IMPLEMENT_OLECREATE_EX(CImagePropPage, "IMAGE.ImagePropPage.1",
00041   0x346685e4, 0xc383, 0x11cf, 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5)
00042
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CImagePropPage::CImagePropPageFactory::UpdateRegistry -
00046 // Adds or removes system registry entries for CImagePropPage
00047
00048 BOOL CImagePropPage::CImagePropPageFactory::UpdateRegistry(BOOL bRegister)
00049 {
00050   if (bRegister)
00051     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00052       m_clsid, IDS_IMAGE_PPG);
00053   else
00054     return AfxOleUnregisterClass(m_clsid, NULL);
00055 }
00056
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CImagePropPage::CImagePropPage - Constructor
00060
00061 CImagePropPage::CImagePropPage() :
00062   COlePropertyPage(IDD, IDS_IMAGE_PPG_CAPTION)
00063 {
00064   //{{AFX_DATA_INIT(CImagePropPage)
00065   m_strImagePath = _T("");
00066   m_bAutoSize = FALSE;
00067   //}}AFX_DATA_INIT
00068 }
00069
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CImagePropPage::DoDataExchange - Moves data between page and properties
00073
00074 void CImagePropPage::DoDataExchange(CDataExchange* pDX)
00075 {
00076   //{{AFX_DATA_MAP(CImagePropPage)
00077   DDP_Text(pDX, IDC_IMAGEPATH, m_strImagePath, _T("ImagePath") );
00078   DDX_Text(pDX, IDC_IMAGEPATH, m_strImagePath);
00079   DDP_Check(pDX, IDC_AUTOSIZE, m_bAutoSize, _T("AutoSize") );
00080   DDX_Check(pDX, IDC_AUTOSIZE, m_bAutoSize);
00081   //}}AFX_DATA_MAP
00082   DDP_PostProcessing(pDX);
00083 }
00084
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CImagePropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/stdafx.h Source File

  • ole
  • mfccalc

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define VC_EXTRALEAN
00013
00014 #include <afxwin.h>         // MFC core and standard components
00015 #include <afxext.h>         // MFC extensions
00016 #include <afxdisp.h>        // MFC OLE Automation extensions
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/resource.h Source File

  • general
  • spiro

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by spiro.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define IDR_SPIROTYPE                   129
00008 #define IDB_PENCIL                      130
00009 #define IDC_DROPWHEEL                   132
00010 #define IDR_PIECES                      133
00011 #define IDC_DROPRING                    134
00012 #define ID_PENWIDTH                     32773
00013 #define ID_SMALLRING                    32775
00014 #define ID_DRAW                         32776
00015 #define ID_HUGERING                     32776
00016 #define ID_VERYLARGERING                32777
00017 #define ID_MEDIUMRING                   32778
00018 #define ID_ENORMOUSWHEEL                32779
00019 #define ID_HUGEWHEEL                    32780
00020 #define ID_VERYLARGEWHEEL               32781
00021 #define ID_LARGEWHEEL                   32782
00022 #define ID_MEDIUMWHEEL                  32783
00023 #define ID_SMALLWHEEL                   32784
00024 #define ID_TINYWHEEL                    32785
00025 #define ID_REMOVERING                   32795
00026 #define ID_REMOVEWHEEL                  32796
00027 #define ID_DRAWPATTERN                  32797
00028 #define ID_PAUSEDRAWING                 32798
00029 #define ID_TRACEWIDTH                   32799
00030 #define ID_ZOOMIN                       32801
00031 #define ID_ZOOMOUT                      32803
00032 #define ID_BLUE                         32804
00033 #define ID_RED                          32805
00034 #define ID_YELLOW                       32806
00035 #define ID_GREEN                        32807
00036 #define ID_BLACK                        32808
00037 #define ID_PURPLE                       32809
00038 #define IDC_SLOW                        32810
00039 #define ID_FAST                         32811
00040 #define ID_END_DRAWING                  32812
00041 #define ID_TIMERTICK                    32813
00042
00043 // Next default values for new objects
00044 //
00045 #ifdef APSTUDIO_INVOKED
00046 #ifndef APSTUDIO_READONLY_SYMBOLS
00047 #define _APS_3D_CONTROLS                     1
00048 #define _APS_NEXT_RESOURCE_VALUE        138
00049 #define _APS_NEXT_COMMAND_VALUE         32814
00050 #define _APS_NEXT_CONTROL_VALUE         1000
00051 #define _APS_NEXT_SYMED_VALUE           101
00052 #endif
00053 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHTMLEdView Member List

This is the complete list of members for CHTMLEdView, including all inherited members.
CHTMLEdView() | CHTMLEdView | [protected]
DECLARE_DHTMLEDITING_CMDMAP(CHTMLEdView) | CHTMLEdView | [protected]
GetDocument() | CHTMLEdView | [inline]
m_bUserMode | CHTMLEdView | [protected]
m_pClrMenu | CHTMLEdView | [protected]
m_pFmtMenu | CHTMLEdView |
m_prevFormat | CHTMLEdView | [protected]
OnActivateView(BOOL bActivate, CView *pActivateView, CView *pDeactiveView) | CHTMLEdView | [protected, virtual]
OnContextMenuAction(long itemIndex) | CHTMLEdView |
OnDisplayChanged() | CHTMLEdView |
OnDocumentComplete() | CHTMLEdView |
OnEditBarNotify(NMHDR *pNMHDR, LRESULT *pResult) | CHTMLEdView | [protected]
OnFormatPopup(UINT) | CHTMLEdView | [protected]
OnInitialUpdate() | CHTMLEdView | [virtual]
OnShowContextMenu(DWORD dwID, LPPOINT ppt, LPUNKNOWN pcmdtReserved, LPDISPATCH pdispReserved) | CHTMLEdView | [virtual]
OnUpdateBlockFmt(CCmdUI *pCmdUI) | CHTMLEdView |
OnUpdateColor(CCmdUI *pCmdUI) | CHTMLEdView |
OnUpdateToolbarButtons(CCmdUI *pCmdUI) | CHTMLEdView | [protected]
OnUpdateUI() | CHTMLEdView | [virtual]
PopBlockFmtMenu() | CHTMLEdView | [protected]
PopColorMenu() | CHTMLEdView | [protected]
SetAbsPos(UINT) | CHTMLEdView | [protected]
SetStaticPos(UINT) | CHTMLEdView | [protected]
UpdateFontCombos() | CHTMLEdView | [protected]
UpdateView() | CHTMLEdView |
~CHTMLEdView() | CHTMLEdView | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/StdAfx.cpp Source File

  • vc2008fp
  • ToolbarDateTimePicker

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  ToolbarDateTimePicker.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuView.h Source File

  • vc2008fp
  • DynamicMenu

DynamicMenuView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CDynamicMenuView : public CView
00014 {
00015 protected: // create from serialization only
00016   CDynamicMenuView();
00017   DECLARE_DYNCREATE(CDynamicMenuView)
00018
00019 // Attributes
00020 public:
00021   CDynamicMenuDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CDynamicMenuView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnContextMenu(CWnd*, CPoint point);
00045   afx_msg void OnFilePrintPreview();
00046
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 #ifndef _DEBUG  // debug version in DynamicMenuView.cpp
00051 inline CDynamicMenuDoc* CDynamicMenuView::GetDocument()
00052    { return (CDynamicMenuDoc*)m_pDocument; }
00053 #endif
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribdoc.h Source File

  • general
  • Scribble

scribdoc.h

Go to the documentation of this file.
00001 // ScribDoc.h : interface of the CScribbleDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013
00014 // Forward declaration of data structure class
00015 class CScribbleItem;
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // class CStroke
00019 //
00020 // A stroke is a series of connected points in the scribble drawing.
00021 // A scribble document may have multiple strokes.
00022
00023 class CStroke : public CObject
00024 {
00025 public:
00026   CStroke(UINT nPenWidth);
00027
00028 protected:
00029   CStroke();
00030   DECLARE_SERIAL(CStroke)
00031
00032 // Attributes
00033 protected:
00034   UINT                   m_nPenWidth;    // one pen width applies to entire stroke
00035 public:
00036   CArray<CPoint,CPoint>  m_pointArray;   // series of connected points
00037   CRect               m_rectBounding; // smallest rect that surrounds all
00038                     // of the points in the stroke
00039                     // measured in MM_LOENGLISH units
00040                     // (0.01 inches, with Y-axis inverted)
00041 public:
00042   CRect& GetBoundingRect() { return m_rectBounding; }
00043
00044 // Operations
00045 public:
00046   BOOL DrawStroke(CDC* pDC);
00047   void FinishStroke();
00048
00049 public:
00050   virtual void Serialize(CArchive& ar);
00051 };
00052
00053
00054
00055 class CScribbleDoc : public COleServerDoc
00056 {
00057 protected: // create from serialization only
00058   CScribbleDoc();
00059   DECLARE_DYNCREATE(CScribbleDoc)
00060
00061 // Attributes
00062 protected:
00063   // The document keeps track of the current pen width on
00064   // behalf of all views. We'd like the user interface of
00065   // Scribble to be such that if the user chooses the Draw
00066   // Thick Line command, it will apply to all views, not just
00067   // the view that currently has the focus.
00068
00069   UINT            m_nPenWidth;        // current user-selected pen width
00070   BOOL            m_bThickPen;        // TRUE if current pen is thick
00071   UINT            m_nThinWidth;
00072   UINT            m_nThickWidth;
00073   CPen            m_penCur;           // pen created according to
00074                     // user-selected pen style (width)
00075 public:
00076   CTypedPtrList<CObList,CStroke*>     m_strokeList;
00077   CPen*           GetCurrentPen() { return &m_penCur; }
00078
00079 protected:
00080   CSize           m_sizeDoc;
00081 public:
00082   CSize GetDocSize() { return m_sizeDoc; }
00083   CScribbleItem* GetEmbeddedItem()
00084     { return (CScribbleItem*)COleServerDoc::GetEmbeddedItem(); }
00085
00086 // Operations
00087 public:
00088   CStroke* NewStroke();
00089
00090 // Overrides
00091   // ClassWizard generated virtual function overrides
00092   //{{AFX_VIRTUAL(CScribbleDoc)
00093   protected:
00094   virtual COleServerItem* OnGetEmbeddedItem();
00095   public:
00096   virtual BOOL OnNewDocument();
00097   virtual void Serialize(CArchive& ar);
00098   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00099   virtual void DeleteContents();
00100   //}}AFX_VIRTUAL
00101
00102 // Implementation
00103 protected:
00104   void ReplacePen();
00105   void OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect);
00106
00107 public:
00108   virtual ~CScribbleDoc();
00109 #ifdef _DEBUG
00110   virtual void AssertValid() const;
00111   virtual void Dump(CDumpContext& dc) const;
00112 #endif
00113
00114 protected:
00115   void            InitDocument();
00116
00117 // Generated message map functions
00118 protected:
00119   //{{AFX_MSG(CScribbleDoc)
00120   afx_msg void OnEditClearAll();
00121   afx_msg void OnPenThickOrThin();
00122   afx_msg void OnUpdateEditClearAll(CCmdUI* pCmdUI);
00123   afx_msg void OnUpdatePenThickOrThin(CCmdUI* pCmdUI);
00124   afx_msg void OnPenWidths();
00125   afx_msg void OnEditCopy();
00126   //}}AFX_MSG
00127   DECLARE_MESSAGE_MAP()
00128 };
00129
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/dialogs.h Source File

  • general
  • tracker

dialogs.h

Go to the documentation of this file.
00001 // dialogs.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CHandleSize dialog
00015
00016 class CHandleSize : public CDialog
00017 {
00018 // Construction
00019 public:
00020   CHandleSize(CWnd* pParent = NULL);  // standard constructor
00021
00022 // Dialog Data
00023   //{{AFX_DATA(CHandleSize)
00024   enum { IDD = IDD_HANDLE_SIZE };
00025   int     m_nHandleSize;
00026   //}}AFX_DATA
00027
00028 // Implementation
00029 protected:
00030   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00031
00032   // Generated message map functions
00033   //{{AFX_MSG(CHandleSize)
00034     // NOTE: the ClassWizard will add member functions here
00035   //}}AFX_MSG
00036   DECLARE_MESSAGE_MAP()
00037 };
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CMinSize dialog
00040
00041 class CMinSize : public CDialog
00042 {
00043 // Construction
00044 public:
00045   CMinSize(CWnd* pParent = NULL); // standard constructor
00046
00047 // Dialog Data
00048   //{{AFX_DATA(CMinSize)
00049   enum { IDD = IDD_MIN_SIZE };
00050   int     m_nMinX;
00051   int     m_nMinY;
00052   //}}AFX_DATA
00053
00054 // Implementation
00055 protected:
00056   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00057
00058   // Generated message map functions
00059   //{{AFX_MSG(CMinSize)
00060     // NOTE: the ClassWizard will add member functions here
00061   //}}AFX_MSG
00062   DECLARE_MESSAGE_MAP()
00063 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/mainfrm.h Source File

  • ole
  • drawcli

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 class CMainFrame : public CMDIFrameWnd
00014 {
00015   DECLARE_DYNAMIC(CMainFrame)
00016 public:
00017   CMainFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Implementation
00026 public:
00027   virtual ~CMainFrame();
00028 #ifdef _DEBUG
00029   virtual void AssertValid() const;
00030   virtual void Dump(CDumpContext& dc) const;
00031 #endif
00032
00033 protected:
00034   // control bar embedded members
00035   CStatusBar  m_wndStatusBar;
00036   CToolBar    m_wndToolBar;
00037
00038 // Generated message map functions
00039 protected:
00040   //{{AFX_MSG(CMainFrame)
00041   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00042     // NOTE - the ClassWizard will add and remove member functions here.
00043     //    DO NOT EDIT what you see in these blocks of generated code!
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewDoc.h Source File

  • vc2008fp
  • TabbedView

TabbedViewDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTabbedViewDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CTabbedViewDoc();
00017   DECLARE_DYNCREATE(CTabbedViewDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CTabbedViewDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/util.cpp Source File

  • ole
  • oleview

util.cpp

Go to the documentation of this file.
00001 // util.cpp
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "util.h"
00014 #include "shadow.h"
00015 /////
00016 // Utility functions
00017 //
00018 static TCHAR szBold[]       = _T("Bold") ;
00019 static TCHAR szItalic[]      = _T("Italic") ;
00020 static TCHAR szBoldItalic[]  = _T("Bold Italic") ;
00021 static TCHAR szRegular[]     = _T("Regular") ;
00022
00023 void ErrorMessage( const CString& str, HRESULT hr )
00024 {
00025   LPVOID lpMessageBuffer = NULL ;
00026   if (FormatMessage(
00027       FORMAT_MESSAGE_ALLOCATE_BUFFER |
00028       FORMAT_MESSAGE_FROM_SYSTEM,
00029       NULL,
00030       GetScode(hr),
00031       MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
00032       (LPTSTR) &lpMessageBuffer,
00033       0,
00034       NULL ))
00035   {
00036     CString str2 ;
00037     str2.Format( _T("\n%s %s"), (LPCTSTR)lpMessageBuffer, (LPCTSTR)HRtoString(hr) ) ;
00038     str2 = str + str2 ;
00039     LocalFree(lpMessageBuffer) ;
00040     AfxMessageBox( str2 ) ;
00041   }
00042   else
00043   {
00044     CString str2 ;
00045     str2.Format( _T("\n<No system message defined> %s"), (LPCTSTR)HRtoString(hr) ) ;
00046     str2 = str + str2 ;
00047     AfxMessageBox( str2 ) ;
00048   }
00049 }
00050
00051
00052 extern "C"
00053 int EXPORT CALLBACK
00054   fnEnumReallyEx( LPENUMLOGFONT lpLogFont,
00055         LPNEWTEXTMETRIC lpTextMetrics,
00056         int nFontType,
00057         LPENUMLOGFONT lpELF ) ;
00058
00059  /****************************************************************
00060  *  HFONT WINAPI
00061  *    ReallyCreateFontEx( HDC hDC, LPTSTR lpszFace,
00062  *                        LPTSTR lpszStyle, int nPointSize, UINT uiFlags )
00063  *
00064  *  Description:
00065  *
00066  *    Creates a font based on facename, pointsize, and style.
00067  *
00068  *    Uses 3.1 API's to correctly select TT fonts.
00069  *
00070  *    HDC   hDC         the target DC (optional)
00071  *
00072  *    LPTSTR lpszFace    pointer the facename (required)
00073  *
00074  *    LPTSTR lpszStyle   pointer to the style (like "Demibold Italic")
00075  *                      (optional).
00076  *
00077  *    int nPointSize  size in points (required)
00078  *
00079  *    UINT  uiFlags      Flags, same as for ReallyCreateFont() except
00080  *                      RCF_BOLD and RCF_ITALIC are ignored if lpszStyle
00081  *                      is not NULL.
00082  *
00083  *  Comments:
00084  *
00085  ****************************************************************/
00086
00087 #pragma warning(disable : 4706)
00088 CFont* ReallyCreateFont( HDC hDC, LPTSTR lpszFace, LPTSTR lpszStyle, UINT nPointSize, UINT uiFlags )
00089 {
00090    ENUMLOGFONT  elf ;
00091    FONTENUMPROC lpfn ;
00092    HDC          hdcCur ;
00093
00094    if (!(lpfn = (FONTENUMPROC)MakeProcInstance( (FARPROC)fnEnumReallyEx, AfxGetInstanceHandle() )))
00095     return NULL ;
00096
00097    // if the DC wasn't specified then use the display...
00098    //
00099    if (!hDC)
00100    {
00101     if (!(hdcCur = GetDC( NULL )))
00102     {
00103      FreeProcInstance( (FARPROC)lpfn ) ;
00104      return FALSE ;
00105     }
00106    }
00107    else
00108     hdcCur = hDC ;
00109
00110    if (hdcCur)
00111    {
00112     /*
00113      * EnumFontFamilies takes the family name as the second param.
00114      * For example the family name might be "Lucida Sans" and the
00115      * style might be "Demibold Roman".
00116      *
00117      * The last parameter is app. defined.  In our case we pass a
00118      * structure that has a LOGFONT and a char array as it's members.
00119      * We put the style in the char array, and when this function
00120      * returns the LOGFONT has the logfont for the font we want to create.
00121      */
00122     if (lpszStyle)
00123      _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, lpszStyle ) ;
00124     else
00125     switch( uiFlags & ~(RCF_NODEFAULT | RCF_STRIKEOUT | RCF_UNDERLINE) )
00126     {
00127       case RCF_BOLD:
00128         _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szBold ) ;
00129       break ;
00130
00131       case RCF_ITALIC:
00132         _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szItalic ) ;
00133       break ;
00134
00135       case RCF_BOLD | RCF_ITALIC:
00136         _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szBold ) ;
00137         _tcscat_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, _T(" ") ) ;
00138         _tcscat_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szItalic ) ;
00139       break ;
00140
00141       default:
00142         _tcscpy_s( (LPTSTR)elf.elfStyle, LF_FACESIZE, szRegular ) ;
00143         lpszStyle = (LPTSTR)elf.elfStyle ;
00144       break ;
00145     }
00146
00147     if (lpszFace)
00148      EnumFontFamilies( hdcCur, lpszFace, lpfn, (LPARAM)(LPVOID)&elf ) ;
00149
00150     if (!lpszFace || lstrcmpi( elf.elfLogFont.lfFaceName, lpszFace))
00151     {
00152      if ((uiFlags & RCF_NODEFAULT) == RCF_NODEFAULT)
00153      {
00154       FreeProcInstance( (FARPROC)lpfn ) ;
00155
00156       if (hdcCur != hDC)
00157          ReleaseDC( NULL, hdcCur ) ;
00158
00159       return NULL ;
00160
00161      }
00162      else
00163       GetObject( GetStockObject( SYSTEM_FONT ),
00164              sizeof( LOGFONT ), (LPTSTR)&elf.elfLogFont ) ;
00165     }
00166
00167     //
00168     // See pages 4-48, 4-49, of Reference Vol. 1 for explaination
00169     // of why we set lfWidth to 0
00170     //
00171     elf.elfLogFont.lfWidth = 0 ;
00172
00173     //
00174     // The equation for calculating point size based on font
00175     // height (a point is 1/72 of an inch) is:
00176     //
00177     //
00178     //    pt = (height * 72) / number of pixels in the Y direction
00179     //
00180     // Using GetTextMetrics() you should calculate height as:
00181     //
00182     //    height = tm.tmHeight - tm.tmInternalLeading
00183     //
00184     // This is because Windows' interpretation of a font height
00185     // is different from everyone else's.
00186     //
00187     //
00188     elf.elfLogFont.lfHeight = -MulDiv( nPointSize,
00189                GetDeviceCaps( hdcCur, LOGPIXELSY),
00190                72 )  ;
00191
00192     elf.elfLogFont.lfStrikeOut = (BYTE)((uiFlags & RCF_STRIKEOUT) == RCF_STRIKEOUT) ;
00193     elf.elfLogFont.lfUnderline = (BYTE)((uiFlags & RCF_UNDERLINE) == RCF_UNDERLINE) ;
00194
00195     if (!lpszStyle)
00196     {
00197      elf.elfLogFont.lfWeight    = (uiFlags & RCF_BOLD) ? FW_BOLD : FW_NORMAL ;
00198      elf.elfLogFont.lfItalic    = (BYTE)((uiFlags & RCF_ITALIC) == RCF_ITALIC) ;
00199     }
00200
00201    }
00202    FreeProcInstance( (FARPROC)lpfn ) ;
00203
00204    if (hdcCur != hDC)
00205     ReleaseDC( NULL, hdcCur ) ;
00206
00207    CFont * pFont = new CFont ;
00208    pFont->CreateFontIndirect( &elf.elfLogFont ) ;
00209
00210    return pFont ;
00211
00212 } /* ReallyCreateFontEx()  */
00213 #pragma warning(default : 4706)
00214
00215 /****************************************************************
00216  *  int CALLBACK
00217  *    fnEnumReallyEx( LPLOGFONT lpLogFont,
00218  *                  LPTEXTMETRIC lpTextMetrics,
00219  *                  int nFontType, LPLOGFONT lpLF )
00220  *
00221  *  Description:
00222  *
00223  *    Call back for EnumFonts and ReallySelectFontEx().
00224  *
00225  *    DO NOT FORGET TO EXPORT!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00226  *
00227  *  Comments:
00228  *
00229  ****************************************************************/
00230 extern "C"
00231 int EXPORT CALLBACK
00232 fnEnumReallyEx( LPENUMLOGFONT lpELFin,
00233         LPNEWTEXTMETRIC /*lpTextMetrics*/,
00234         int nFontType,
00235         LPENUMLOGFONT lpELF )
00236 {
00237    /* If we are not true type, then we will only be called once,
00238   * in in this case we need to compare the weight and italic
00239   * members of the TM struct to some strings.
00240   */
00241    if (!(nFontType & TRUETYPE_FONTTYPE))
00242    {
00243     lpELF->elfLogFont = lpELFin->elfLogFont ;
00244
00245      // Workaround for WindowsJ bug
00246      //
00247      LOGFONT lf ;
00248      GetObject( GetStockObject( SYSTEM_FONT ),
00249                sizeof( LOGFONT ), (LPTSTR)&lf ) ;
00250      lpELF->elfLogFont.lfCharSet = lf.lfCharSet;
00251
00252     /* Parse szStyle.  It may be something like "Bold Italic" or
00253      * "Demibold Italic".  Let's be somewhat smart about this.
00254      *
00255      * If "Demibold Italic" is passed in then he wants bold and
00256      * italic.
00257      *
00258      * We want to search szStyle for the word "bold".  Got a better
00259      * search strategy, go ahead and put it here (but tell me about it!).
00260      *
00261      * WARNING!!!
00262      *   The style string is language dependent.
00263      */
00264     if (lpELF->elfStyle)
00265     {
00266      /*
00267       * Assume "Regular"
00268       */
00269      lpELF->elfLogFont.lfWeight = FW_NORMAL ;
00270      lpELF->elfLogFont.lfItalic = FALSE ;
00271
00272      if (!lstrcmpi( (LPTSTR)lpELF->elfStyle, szBold ))
00273      {
00274       lpELF->elfLogFont.lfWeight = FW_BOLD ;
00275       return 0 ;
00276      }
00277
00278      if (!lstrcmpi( (LPTSTR)lpELF->elfStyle, szItalic))
00279      {
00280       lpELF->elfLogFont.lfItalic = TRUE ;
00281       return 0 ;
00282      }
00283
00284      if (!lstrcmpi( (LPTSTR)lpELF->elfStyle, szBoldItalic ))
00285      {
00286       lpELF->elfLogFont.lfWeight = FW_BOLD ;
00287       lpELF->elfLogFont.lfItalic = TRUE ;
00288       return 0 ;
00289      }
00290     }
00291
00292     return 0 ;  /* stop the enumeration */
00293
00294    }
00295
00296    /* We now know we have a TT font.  For each style in the
00297   * family passed in, we will get here.
00298   *
00299   * If we get an exact match copy it into lpELF and return.
00300   * Otherwise get as close as possible.
00301   */
00302    if (0==lstrcmpi( (LPTSTR)lpELF->elfStyle, (LPTSTR)lpELFin->elfStyle ))
00303    {
00304     *lpELF = *lpELFin;
00305     return 0;
00306    }
00307
00308    lpELF->elfLogFont = lpELFin->elfLogFont ;
00309
00310    return 1 ;
00311
00312 }/* fnEnumReallyEx() */
00313
00314
00315 /*
00316  * PointerToNthField
00317  *
00318  * Purpose:
00319  *  Returns a pointer to the beginning of the nth field.
00320  *  Assumes null-terminated string.
00321  *
00322  * Parameters:
00323  *  lpString        string to parse
00324  *  nField            field to return starting index of.
00325  *  chDelimiter       char that delimits fields
00326  *
00327  * Return Value:
00328  *  LPTSTR             pointer to beginning of nField field.
00329  *                    NOTE: If the null terminator is found
00330  *                          Before we find the Nth field, then
00331  *                          we return a pointer to the null terminator -
00332  *                          calling app should be sure to check for
00333  *                          this case.
00334  *
00335  */
00336 LPTSTR FAR PASCAL PointerToNthField(LPTSTR lpszString, int nField, TCHAR chDelimiter)
00337 {
00338    LPTSTR lpField = lpszString;
00339    int   cFieldFound = 1;
00340
00341    if (1 ==nField)
00342     return lpszString;
00343
00344    while (*lpField != '\0')
00345    {
00346
00347     if (*lpField++ == chDelimiter)
00348     {
00349
00350      cFieldFound++;
00351
00352      if (nField == cFieldFound)
00353       return lpField;
00354     }
00355    }
00356
00357    return lpField;
00358
00359 }
00360
00361 #include <ctype.h>
00362 // Very useful API that parses a LONG out of a string, updating
00363 // the string pointer before it returns.
00364 //
00365 LONG WINAPI ParseOffNumber( LPTSTR FAR *lplp, LPINT lpConv )
00366 {
00367   LPTSTR lp = *lplp;
00368   LONG  lValue=0;
00369   int   sign=1;
00370
00371   while( isspace((unsigned char)*lp) )
00372     lp++;
00373   if( *lp=='-' )
00374   {
00375     sign = -1;
00376     lp++;
00377   }
00378   if (*lp=='\0')
00379   {
00380     *lpConv = FALSE;
00381     return 0L;
00382   }
00383
00384   // Is it a decimal number
00385   #ifdef UNICODE
00386   if( _wcsnicmp( lp, (LPTSTR)_T("0x"),2) )
00387   #else
00388   #ifdef WIN32
00389   if( _strnicmp( lp, (LPTSTR)_T("0x"),2) )
00390   #else
00391   if( _fstrnicmp( lp, (LPTSTR)_T("0x"),2) )
00392   #endif
00393   #endif
00394   {
00395
00396     while( isdigit((unsigned char)*lp) )
00397     {
00398       lValue *= 10;
00399       lValue += (*lp - (TCHAR)'0');
00400       lp++;
00401     }
00402   }
00403   else
00404   {
00405     lp+=2;
00406
00407     while( isxdigit((unsigned char)*lp) )
00408     {
00409       lValue *= 16;
00410       if( isdigit((unsigned char)*lp) )
00411         lValue += (*lp - (TCHAR)'0');
00412       else
00413         lValue += (toupper(*lp) - (TCHAR)'A' + 10);
00414       lp++;
00415     }
00416   }
00417   while( isspace((unsigned char)*lp) )
00418     lp++;
00419
00420   lValue *= (long)sign;
00421
00422   if (*lp==(TCHAR)',')
00423   {
00424     lp++;
00425     while( isspace((unsigned char)*lp) )
00426       lp++;
00427     *lplp = lp;
00428     if (lpConv)
00429       *lpConv = (int)TRUE;
00430   }
00431   else
00432   {
00433     *lplp = lp;
00434     if (lpConv)
00435       *lpConv = (int)(*lp=='\0');
00436   }
00437   return lValue;
00438
00439 } //*** ParseOffNumber
00440
00441
00442 /*************************************************************************
00443  *  void WINAPI
00444  *  DlgCenter( HWND hwndCenter, HWND hwndWithin, BOOL fClient )
00445  *
00446  *  Description:
00447  *
00448  *    Centers a window within another window.
00449  *
00450  *  Type/Parameter
00451  *          Description
00452  *
00453  *    HWND  hwndCenter
00454  *          Window to center.  This does not have to be a child of
00455  *          hwndWithin.
00456  *
00457  *    HWND  hwndWithin
00458  *          Window to center the above window within.  Can be NULL.
00459  *
00460  *    BOOL  fClient
00461  *          If TRUE the window is centered within the available client
00462  *          area.  Otherwise it's centered within the entire window area.
00463  *
00464  *  Comments:
00465  *
00466  *************************************************************************/
00467 void WINAPI
00468 DlgCenter( HWND hwndCenter, HWND hwndWithin, BOOL fClient )
00469 {
00470    RECT rcWithin ;
00471    RECT rcCenter ;
00472    int   x, y ;
00473    int   dxCenter, dyCenter ;
00474    int   dxScreen, dyScreen ;
00475
00476    dxScreen = GetSystemMetrics( SM_CXSCREEN ) ;
00477    dyScreen = GetSystemMetrics( SM_CYSCREEN ) ;
00478
00479    if (!IsWindow(hwndCenter))
00480     return ;
00481
00482    if (hwndWithin && !IsWindow(hwndWithin))
00483     return ;
00484
00485    if (hwndWithin == NULL)
00486    {
00487     rcWithin.left = rcWithin.top = 0 ;
00488     rcWithin.right = dxScreen ;
00489     rcWithin.bottom = dyScreen ;
00490    }
00491    else
00492    {
00493     if (fClient)
00494     {
00495      /*
00496       * First get screen coords of rectangle we're going to be
00497       * centered within.
00498       */
00499      GetClientRect( hwndWithin, (LPRECT)&rcWithin ) ;
00500      ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.left ) ;
00501      ClientToScreen( hwndWithin, (LPPOINT)&rcWithin.right ) ;
00502     }
00503     else
00504      GetWindowRect( hwndWithin, (LPRECT)&rcWithin ) ;
00505    }
00506
00507    GetWindowRect( hwndCenter, (LPRECT)&rcCenter ) ;
00508    dxCenter = rcCenter.right - rcCenter.left ;
00509    dyCenter = rcCenter.bottom - rcCenter.top ;
00510
00511    /*
00512   * Now we have both the within and center rects in screen coords.
00513   *
00514   * SetWindowPos behaves differently for Non child windows
00515   * than for child windows.  For popups it's coordinates
00516   * are relative to the upper left corner of the screen.  For
00517   * children it's coords are relative to the upper left corner
00518   * of the client area of the parent.
00519   */
00520    x = ((rcWithin.right - rcWithin.left) - dxCenter) / 2 ;
00521    y = ((rcWithin.bottom - rcWithin.top) - dyCenter) / 2 ;
00522
00523    if (hwndWithin == GetParent( hwndCenter ) &&
00524      !(GetWindowLong( hwndCenter, GWL_STYLE ) & WS_CHILD ))
00525    {
00526     x += rcWithin.left ;
00527     y += rcWithin.top ;
00528
00529     if (x + dxCenter > dxScreen )
00530      x = dxScreen - dxCenter ;
00531
00532     if (y + dyCenter > dyScreen )
00533      y = dyScreen - dyCenter ;
00534
00535     SetWindowPos( hwndCenter, NULL,
00536           max(x,0),
00537           max(y,0),
00538           0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;
00539
00540     return ;
00541    }
00542
00543    SetWindowPos( hwndCenter, NULL,
00544          max(x,0),
00545          max(y,0),
00546          0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER ) ;
00547
00548    return ;
00549
00550 }/* DlgCenter() */
00551
00552 /****************************************************************
00553  *  VOID FAR PASCAL bmColorTranslateDC( HDC pbm, LPBITMAP lpBM,
00554  *                                    COLORREF rgbOld, COLORREF rgbNew,
00555  *                                    WORD  wStyle )
00556  *
00557  *  Description:
00558  *
00559  *    This function makes all pixels in the given DC that have the
00560  *    color rgbOld have the color rgbNew.
00561  *
00562  *    wSytle can be BM_NORMAL or BM_DISABLED.  If it is BM_DISABLED
00563  *    the bitmap will be translated so that it looks disabled.
00564  *
00565  *  Comments:
00566  *
00567  ****************************************************************/
00568 void bmColorTranslateDC( CDC* pdcMem, BITMAP *pBM, COLORREF rgbOld,
00569              COLORREF rgbNew )
00570 {
00571    CDC      dcMask ;
00572    CBitmap  bmMask ;
00573    CBitmap* pbmMask ;
00574    CBrush   brT ;
00575    CBrush*  pbrT ;
00576
00577    if (bmMask.CreateBitmap( pBM->bmWidth, pBM->bmHeight, 1, 1, NULL ))
00578    {
00579     if (dcMask.CreateCompatibleDC( pdcMem ))
00580     {
00581      // Select th mask bitmap into the mono DC
00582      //
00583      pbmMask = dcMask.SelectObject( &bmMask ) ;
00584
00585      // Create the brush and select it into the bits DC
00586      //
00587      brT.CreateSolidBrush( rgbNew ) ;
00588      pbrT = pdcMem->SelectObject( &brT ) ;
00589
00590      // Do a color to mono bitblt to build the mask.  Generate
00591      // 1's where the source is equal to the background.
00592      //
00593      pdcMem->SetBkColor( rgbOld ) ;
00594      dcMask.BitBlt( 0, 0, pBM->bmWidth, pBM->bmHeight, pdcMem, 0, 0, SRCCOPY ) ;
00595
00596      // Where the mask is 1, lay down the brush, where it is 0, leave
00597      // the destination.
00598      //
00599      pdcMem->SetBkColor( RGBWHITE ) ;
00600      pdcMem->SetTextColor( RGBBLACK ) ;
00601
00602 #define DSPDxax   0x00E20746L
00603      pdcMem->BitBlt( 0, 0, pBM->bmWidth, pBM->bmHeight, &dcMask, 0, 0, DSPDxax ) ;
00604
00605      pbmMask = dcMask.SelectObject( &bmMask ) ;
00606
00607      pbrT = pdcMem->SelectObject( pbrT ) ;
00608      brT.DeleteObject( ) ;
00609
00610      dcMask.DeleteDC( ) ;
00611     }
00612     else
00613     {
00614      return ;
00615     }
00616
00617     bmMask.DeleteObject( ) ;
00618    }
00619
00620 } /* bmColorTranslateDC()  */
00621
00622
00623 void bmColorTranslate( CBitmap* pbmSrc, COLORREF rgbNew )
00624 {
00625    HDC      hdc ;
00626    CDC      dc ;
00627    CDC      dcMem ;
00628    BITMAP   bmBits ;
00629
00630    hdc = GetDC( NULL );
00631    if (hdc)
00632      dc.Attach( hdc ) ;
00633    else
00634      return ;
00635
00636   if (dcMem.CreateCompatibleDC( &dc ))
00637   {
00638    // Get the bitmap struct needed by bmColorTranslateDC()
00639    //
00640    pbmSrc->GetObject( sizeof( BITMAP ), &bmBits ) ;
00641
00642    // Select our bitmap into the memory DC
00643    //
00644    pbmSrc = dcMem.SelectObject( pbmSrc ) ;
00645
00646    // Translate the bitmap
00647    //
00648    bmColorTranslateDC( &dcMem, &bmBits, dcMem.GetPixel( 0, 0 ), rgbNew ) ;
00649
00650    // Unselect our bitmap before deleting the DC
00651    //
00652    pbmSrc = dcMem.SelectObject( pbmSrc ) ;
00653
00654    dcMem.DeleteDC( ) ;
00655   }
00656
00657   dc.Detach() ;
00658
00659   ReleaseDC( NULL, hdc ) ;
00660
00661 } /* bmColorTranslate()  */
00662
00663
00664 CBitmap* bmLoadAndTranslate( UINT id, COLORREF rgb )
00665 {
00666   CBitmap* pBitmap = new CBitmap ;
00667
00668   if (pBitmap)
00669   {
00670     pBitmap->LoadBitmap( id ) ;
00671     bmColorTranslate( pBitmap, rgb ) ;
00672   }
00673   return pBitmap ;
00674 }
00675
00676
00677 void DrawListBoxBitmap( CDC* pdc, CBitmap *pbmt, int x,  int y )
00678 {
00679   CDC   dcMem ;
00680   if (dcMem.CreateCompatibleDC( pdc ))
00681   {
00682     if (pbmt)
00683     {
00684       pbmt = dcMem.SelectObject( pbmt ) ;
00685       pdc->BitBlt( x, y, 16, 16, &dcMem, 0, 0, SRCCOPY ) ;
00686       dcMem.SelectObject( pbmt ) ;
00687     }
00688     dcMem.DeleteDC() ;
00689   }
00690 }
00691
00692 // column text out
00693
00694 /****************************************************************
00695  *  int WINAPI
00696  *    GetTextMetricsCorrectly( HDC hDC, LPTEXTMETRIC lpTextMetrics )
00697  *
00698  *  Description:
00699  *
00700  *    This function gets the textmetrics of the font currently
00701  *    selected into the hDC.  It returns the average char width as
00702  *    the return value.
00703  *
00704  *    This function computes the average character width correctly
00705  *    by using GetTextExtent() on the string "abc...xzyABC...XYZ"
00706  *    which works out much better for proportional fonts.
00707  *
00708  *    Note that this function returns the same TEXTMETRIC
00709  *    values that GetTextMetrics() does, it simply has a different
00710  *    return value.
00711  *
00712  *  Comments:
00713  *
00714  ****************************************************************/
00715 int WINAPI
00716    GetTextMetricsCorrectly( HDC hDC, LPTEXTMETRIC lpTM )
00717 {
00718    int    nAveWidth ;
00719    TCHAR  rgchAlphabet[52] ;
00720    int  i ;
00721    SIZE size ;
00722
00723    // Get the TM of the current font.  Note that GetTextMetrics
00724    // gets the incorrect AveCharWidth value for proportional fonts.
00725    // This is the whole poshort in this exercise.
00726    //
00727    if (lpTM)
00728   GetTextMetrics(hDC, lpTM);
00729
00730    // If it's not a variable pitch font GetTextMetrics was correct
00731    // so just return.
00732    //
00733    if (lpTM && !(lpTM->tmPitchAndFamily & FIXED_PITCH))
00734     return lpTM->tmAveCharWidth ;
00735    else
00736    {
00737     for ( i = 0 ; i <= 25 ; i++)
00738      rgchAlphabet[i] = (TCHAR)(i+(int)'a') ;
00739
00740     for ( i = 0 ; i<=25 ; i++)
00741      rgchAlphabet[i+25] = (TCHAR)(i+(int)'A') ;
00742
00743     GetTextExtentPoint( hDC, (LPTSTR)rgchAlphabet, 52, &size ) ;
00744     nAveWidth = size.cx / 26 ;
00745     nAveWidth = (nAveWidth + 1) / 2 ;
00746    }
00747
00748    // Return the calculated average char width
00749    //
00750    return nAveWidth ;
00751
00752 } /* GetTextMetricsCorrectly()  */
00753
00754 /****************************************************************
00755  *
00756  *  Description:
00757  *
00758  *    The ColumntTextOut function writes a character string at
00759  *    the specified location, using tabs to identify column breaks.  Each
00760  *    column is aligned according to the array of COLUMNSTRUCTs.
00761  *
00762  *    A COLUMNSTRUCT looks like this:
00763  *
00764  *    {
00765  *       int   nLeft ;       // starting x position of the column
00766  *       int   nRight ;      // ending x position of the column
00767  *       UINT  uiFlags ;      // format flags
00768  *    }
00769  *
00770  *    If a column has another column to the left of it, it's nLeft member
00771  *    is ignored.
00772  *
00773  *    uiFlags can be any of the following:
00774  *
00775  *          #define DT_LEFT      0x0000
00776  *          #define DT_CENTER    0x0001
00777  *          #define DT_RIGHT     0x0002
00778  *
00779  *  Comments:
00780  *
00781  ****************************************************************/
00782 void WINAPI ColumnTextOut( HDC hdc, int nX, int nY, LPTSTR lpszIN,
00783               int cColumns, LPCOLUMNSTRUCT rgColumns )
00784 {
00785
00786 #define ETOFLAGS ETO_CLIPPED
00787
00788   COLUMNSTRUCT   CS ;              // local copy for speed
00789   RECT           rc ;              // current cell rect
00790   unsigned int   cIteration = 0 ;  // what column
00791   LPTSTR         lpNext ;          // next string (current is lpsz)
00792   int            cch ;             // count of chars in current string
00793   SIZE           size ;            // extent of current string
00794   int            dx ;              // column width
00795
00796   rc.left = nX ;
00797   rc.top = nY ;
00798   rc.right = 0 ;
00799
00800   if (rgColumns == NULL || cColumns <= 1)
00801   {
00802     int Tab = 15 ;
00803     TabbedTextOut( hdc, nX, nY, lpszIN, lstrlen(lpszIN), 1, &Tab, nX ) ;
00804     return ;
00805   }
00806
00807   // For each sub string (bracketed by a tab)
00808   //
00809   LPTSTR lpsz = lpszIN ;
00810   while (*lpsz)
00811   {
00812     if (cIteration >= (unsigned int)cColumns)
00813       return ;
00814
00815     for (cch = 0, lpNext = lpsz ;
00816        *lpNext != '\t' && *lpNext ;
00817        lpNext++, cch++)
00818       ;
00819
00820     CS = rgColumns[cIteration] ;
00821
00822     // If it's the leftmost column use
00823     //
00824     if (cIteration == 0)
00825     {
00826       rc.left = nX + CS.nLeft ;
00827       rc.right = nX + CS.nRight ;
00828     }
00829     else
00830       rc.right = nX + CS.nRight ;
00831
00832     GetTextExtentPoint( hdc, lpsz, cch, &size ) ;
00833     rc.bottom = rc.top + size.cy ;
00834
00835     // If the width of the column is 0 do nothing
00836     //
00837     if ((dx = (rc.right - rc.left)) > 0)
00838     {
00839       switch(CS.uiFlags)
00840       {
00841         case DT_CENTER:
00842           ExtTextOut( hdc, rc.left + ((dx - size.cx) / (int)2),
00843           rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
00844         break ;
00845
00846         case DT_RIGHT:
00847           // If it's right justified then make the left border 0
00848           //
00849           //rc.left = nX + rgColumns[0].nLeft ;
00850           ExtTextOut( hdc, rc.left + (dx - size.cx),
00851           rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
00852         break ;
00853
00854         case DT_LEFT:
00855         default:
00856           ExtTextOut( hdc, rc.left, rc.top, ETOFLAGS, &rc, lpsz, cch, NULL ) ;
00857         break ;
00858       }
00859     }
00860     rc.left = rc.right ;
00861     cIteration++ ;
00862     lpsz = lpNext + 1 ;
00863   }
00864
00865 } // ColumnTextOut()
00866
00867 // Stolen from OLEMISC.CPP in the MFC 3.0 source.  Function names
00868 // changed from Afx* to _*.
00869 //
00870 #define _COUNTOF(array) (sizeof(array)/sizeof(array[0]))
00871
00872 LPCTSTR AFXAPI _GetScodeString(SCODE sc)
00873 {
00874   struct SCODE_ENTRY
00875   {
00876     SCODE sc;
00877     LPCTSTR lpszName;
00878   };
00879   #define MAKE_SCODE_ENTRY(sc)    { sc, _T(#sc) }
00880   static const SCODE_ENTRY scNameTable[] =
00881   {
00882     MAKE_SCODE_ENTRY(S_OK),
00883     MAKE_SCODE_ENTRY(S_FALSE),
00884
00885     MAKE_SCODE_ENTRY(CACHE_S_FORMATETC_NOTSUPPORTED),
00886     MAKE_SCODE_ENTRY(CACHE_S_SAMECACHE),
00887     MAKE_SCODE_ENTRY(CACHE_S_SOMECACHES_NOTUPDATED),
00888     MAKE_SCODE_ENTRY(CONVERT10_S_NO_PRESENTATION),
00889     MAKE_SCODE_ENTRY(DATA_S_SAMEFORMATETC),
00890     MAKE_SCODE_ENTRY(DRAGDROP_S_CANCEL),
00891     MAKE_SCODE_ENTRY(DRAGDROP_S_DROP),
00892     MAKE_SCODE_ENTRY(DRAGDROP_S_USEDEFAULTCURSORS),
00893     MAKE_SCODE_ENTRY(INPLACE_S_TRUNCATED),
00894     MAKE_SCODE_ENTRY(MK_S_HIM),
00895     MAKE_SCODE_ENTRY(MK_S_ME),
00896     MAKE_SCODE_ENTRY(MK_S_MONIKERALREADYREGISTERED),
00897     MAKE_SCODE_ENTRY(MK_S_REDUCED_TO_SELF),
00898     MAKE_SCODE_ENTRY(MK_S_US),
00899     MAKE_SCODE_ENTRY(OLE_S_MAC_CLIPFORMAT),
00900     MAKE_SCODE_ENTRY(OLE_S_STATIC),
00901     MAKE_SCODE_ENTRY(OLE_S_USEREG),
00902     MAKE_SCODE_ENTRY(OLEOBJ_S_CANNOT_DOVERB_NOW),
00903     MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDHWND),
00904     MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDVERB),
00905     MAKE_SCODE_ENTRY(OLEOBJ_S_LAST),
00906     MAKE_SCODE_ENTRY(STG_S_CONVERTED),
00907     MAKE_SCODE_ENTRY(VIEW_S_ALREADY_FROZEN),
00908
00909     MAKE_SCODE_ENTRY(E_UNEXPECTED),
00910     MAKE_SCODE_ENTRY(E_NOTIMPL),
00911     MAKE_SCODE_ENTRY(E_OUTOFMEMORY),
00912     MAKE_SCODE_ENTRY(E_INVALIDARG),
00913     MAKE_SCODE_ENTRY(E_NOINTERFACE),
00914     MAKE_SCODE_ENTRY(E_POINTER),
00915     MAKE_SCODE_ENTRY(E_HANDLE),
00916     MAKE_SCODE_ENTRY(E_ABORT),
00917     MAKE_SCODE_ENTRY(E_FAIL),
00918     MAKE_SCODE_ENTRY(E_ACCESSDENIED),
00919
00920     MAKE_SCODE_ENTRY(CACHE_E_NOCACHE_UPDATED),
00921     MAKE_SCODE_ENTRY(CLASS_E_CLASSNOTAVAILABLE),
00922     MAKE_SCODE_ENTRY(CLASS_E_NOAGGREGATION),
00923     MAKE_SCODE_ENTRY(CLIPBRD_E_BAD_DATA),
00924     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_CLOSE),
00925     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_EMPTY),
00926     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_OPEN),
00927     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_SET),
00928     MAKE_SCODE_ENTRY(CO_E_ALREADYINITIALIZED),
00929     MAKE_SCODE_ENTRY(CO_E_APPDIDNTREG),
00930     MAKE_SCODE_ENTRY(CO_E_APPNOTFOUND),
00931     MAKE_SCODE_ENTRY(CO_E_APPSINGLEUSE),
00932     #ifdef _WIN32
00933     MAKE_SCODE_ENTRY(CO_E_BAD_PATH),
00934     #endif
00935     MAKE_SCODE_ENTRY(CO_E_CANTDETERMINECLASS),
00936     #ifdef _WIN32
00937     MAKE_SCODE_ENTRY(CO_E_CLASS_CREATE_FAILED),
00938     #endif
00939     MAKE_SCODE_ENTRY(CO_E_CLASSSTRING),
00940     MAKE_SCODE_ENTRY(CO_E_DLLNOTFOUND),
00941     MAKE_SCODE_ENTRY(CO_E_ERRORINAPP),
00942     MAKE_SCODE_ENTRY(CO_E_ERRORINDLL),
00943     MAKE_SCODE_ENTRY(CO_E_IIDSTRING),
00944     MAKE_SCODE_ENTRY(CO_E_NOTINITIALIZED),
00945     MAKE_SCODE_ENTRY(CO_E_OBJISREG),
00946     MAKE_SCODE_ENTRY(CO_E_OBJNOTCONNECTED),
00947     MAKE_SCODE_ENTRY(CO_E_OBJNOTREG),
00948     #ifdef _WIN32
00949     MAKE_SCODE_ENTRY(CO_E_OBJSRV_RPC_FAILURE),
00950     MAKE_SCODE_ENTRY(CO_E_SCM_ERROR),
00951     MAKE_SCODE_ENTRY(CO_E_SCM_RPC_FAILURE),
00952     MAKE_SCODE_ENTRY(CO_E_SERVER_EXEC_FAILURE),
00953     MAKE_SCODE_ENTRY(CO_E_SERVER_STOPPING),
00954     #endif
00955     MAKE_SCODE_ENTRY(CO_E_WRONGOSFORAPP),
00956     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_BITMAP_TO_DIB),
00957     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_FMT),
00958     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_GET),
00959     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_PUT),
00960     MAKE_SCODE_ENTRY(CONVERT10_E_STG_DIB_TO_BITMAP),
00961     MAKE_SCODE_ENTRY(CONVERT10_E_STG_FMT),
00962     MAKE_SCODE_ENTRY(CONVERT10_E_STG_NO_STD_STREAM),
00963     MAKE_SCODE_ENTRY(DISP_E_ARRAYISLOCKED),
00964     MAKE_SCODE_ENTRY(DISP_E_BADCALLEE),
00965     MAKE_SCODE_ENTRY(DISP_E_BADINDEX),
00966     MAKE_SCODE_ENTRY(DISP_E_BADPARAMCOUNT),
00967     MAKE_SCODE_ENTRY(DISP_E_BADVARTYPE),
00968     MAKE_SCODE_ENTRY(DISP_E_EXCEPTION),
00969     MAKE_SCODE_ENTRY(DISP_E_MEMBERNOTFOUND),
00970     MAKE_SCODE_ENTRY(DISP_E_NONAMEDARGS),
00971     MAKE_SCODE_ENTRY(DISP_E_NOTACOLLECTION),
00972     MAKE_SCODE_ENTRY(DISP_E_OVERFLOW),
00973     MAKE_SCODE_ENTRY(DISP_E_PARAMNOTFOUND),
00974     MAKE_SCODE_ENTRY(DISP_E_PARAMNOTOPTIONAL),
00975     MAKE_SCODE_ENTRY(DISP_E_TYPEMISMATCH),
00976     MAKE_SCODE_ENTRY(DISP_E_UNKNOWNINTERFACE),
00977     MAKE_SCODE_ENTRY(DISP_E_UNKNOWNLCID),
00978     MAKE_SCODE_ENTRY(DISP_E_UNKNOWNNAME),
00979     MAKE_SCODE_ENTRY(DRAGDROP_E_ALREADYREGISTERED),
00980     MAKE_SCODE_ENTRY(DRAGDROP_E_INVALIDHWND),
00981     MAKE_SCODE_ENTRY(DRAGDROP_E_NOTREGISTERED),
00982     MAKE_SCODE_ENTRY(DV_E_CLIPFORMAT),
00983     MAKE_SCODE_ENTRY(DV_E_DVASPECT),
00984     MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE),
00985     MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE_SIZE),
00986     MAKE_SCODE_ENTRY(DV_E_FORMATETC),
00987     MAKE_SCODE_ENTRY(DV_E_LINDEX),
00988     MAKE_SCODE_ENTRY(DV_E_NOIVIEWOBJECT),
00989     MAKE_SCODE_ENTRY(DV_E_STATDATA),
00990     MAKE_SCODE_ENTRY(DV_E_STGMEDIUM),
00991     MAKE_SCODE_ENTRY(DV_E_TYMED),
00992     MAKE_SCODE_ENTRY(INPLACE_E_NOTOOLSPACE),
00993     MAKE_SCODE_ENTRY(INPLACE_E_NOTUNDOABLE),
00994     #ifdef _WIN32
00995     MAKE_SCODE_ENTRY(MEM_E_INVALID_LINK),
00996     MAKE_SCODE_ENTRY(MEM_E_INVALID_ROOT),
00997     MAKE_SCODE_ENTRY(MEM_E_INVALID_SIZE),
00998     #endif
00999     MAKE_SCODE_ENTRY(MK_E_CANTOPENFILE),
01000     MAKE_SCODE_ENTRY(MK_E_CONNECTMANUALLY),
01001     #ifdef _WIN32
01002     MAKE_SCODE_ENTRY(MK_E_ENUMERATION_FAILED),
01003     #endif
01004     MAKE_SCODE_ENTRY(MK_E_EXCEEDEDDEADLINE),
01005     MAKE_SCODE_ENTRY(MK_E_INTERMEDIATEINTERFACENOTSUPPORTED),
01006     MAKE_SCODE_ENTRY(MK_E_INVALIDEXTENSION),
01007     MAKE_SCODE_ENTRY(MK_E_MUSTBOTHERUSER),
01008     MAKE_SCODE_ENTRY(MK_E_NEEDGENERIC),
01009     #ifdef _WIN32
01010     MAKE_SCODE_ENTRY(MK_E_NO_NORMALIZED),
01011     #endif
01012     MAKE_SCODE_ENTRY(MK_E_NOINVERSE),
01013     MAKE_SCODE_ENTRY(MK_E_NOOBJECT),
01014     MAKE_SCODE_ENTRY(MK_E_NOPREFIX),
01015     MAKE_SCODE_ENTRY(MK_E_NOSTORAGE),
01016     MAKE_SCODE_ENTRY(MK_E_NOTBINDABLE),
01017     MAKE_SCODE_ENTRY(MK_E_NOTBOUND),
01018     MAKE_SCODE_ENTRY(MK_E_SYNTAX),
01019     MAKE_SCODE_ENTRY(MK_E_UNAVAILABLE),
01020     MAKE_SCODE_ENTRY(OLE_E_ADVF),
01021     MAKE_SCODE_ENTRY(OLE_E_ADVISENOTSUPPORTED),
01022     MAKE_SCODE_ENTRY(OLE_E_BLANK),
01023     MAKE_SCODE_ENTRY(OLE_E_CANT_BINDTOSOURCE),
01024     MAKE_SCODE_ENTRY(OLE_E_CANT_GETMONIKER),
01025     MAKE_SCODE_ENTRY(OLE_E_CANTCONVERT),
01026     MAKE_SCODE_ENTRY(OLE_E_CLASSDIFF),
01027     MAKE_SCODE_ENTRY(OLE_E_ENUM_NOMORE),
01028     MAKE_SCODE_ENTRY(OLE_E_INVALIDHWND),
01029     MAKE_SCODE_ENTRY(OLE_E_INVALIDRECT),
01030     MAKE_SCODE_ENTRY(OLE_E_NOCACHE),
01031     MAKE_SCODE_ENTRY(OLE_E_NOCONNECTION),
01032     MAKE_SCODE_ENTRY(OLE_E_NOSTORAGE),
01033     MAKE_SCODE_ENTRY(OLE_E_NOT_INPLACEACTIVE),
01034     MAKE_SCODE_ENTRY(OLE_E_NOTRUNNING),
01035     MAKE_SCODE_ENTRY(OLE_E_OLEVERB),
01036     MAKE_SCODE_ENTRY(OLE_E_PROMPTSAVECANCELLED),
01037     MAKE_SCODE_ENTRY(OLE_E_STATIC),
01038     MAKE_SCODE_ENTRY(OLE_E_WRONGCOMPOBJ),
01039     MAKE_SCODE_ENTRY(OLEOBJ_E_INVALIDVERB),
01040     MAKE_SCODE_ENTRY(OLEOBJ_E_NOVERBS),
01041     MAKE_SCODE_ENTRY(REGDB_E_CLASSNOTREG),
01042     MAKE_SCODE_ENTRY(REGDB_E_IIDNOTREG),
01043     MAKE_SCODE_ENTRY(REGDB_E_INVALIDVALUE),
01044     MAKE_SCODE_ENTRY(REGDB_E_KEYMISSING),
01045     MAKE_SCODE_ENTRY(REGDB_E_READREGDB),
01046     MAKE_SCODE_ENTRY(REGDB_E_WRITEREGDB),
01047     #ifdef _WIN32
01048     MAKE_SCODE_ENTRY(RPC_E_ATTEMPTED_MULTITHREAD),
01049     #endif
01050     MAKE_SCODE_ENTRY(RPC_E_CALL_CANCELED),
01051     MAKE_SCODE_ENTRY(RPC_E_CALL_REJECTED),
01052     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_AGAIN),
01053     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INASYNCCALL),
01054     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INEXTERNALCALL),
01055     #ifdef _WIN32
01056     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_ININPUTSYNCCALL),
01057     #endif
01058     MAKE_SCODE_ENTRY(RPC_E_CANTPOST_INSENDCALL),
01059     MAKE_SCODE_ENTRY(RPC_E_CANTTRANSMIT_CALL),
01060     #ifdef _WIN32
01061     MAKE_SCODE_ENTRY(RPC_E_CHANGED_MODE),
01062     #endif
01063     MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTMARSHAL_DATA),
01064     MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTUNMARSHAL_DATA),
01065     MAKE_SCODE_ENTRY(RPC_E_CLIENT_DIED),
01066     MAKE_SCODE_ENTRY(RPC_E_CONNECTION_TERMINATED),
01067     #ifdef _WIN32
01068     MAKE_SCODE_ENTRY(RPC_E_DISCONNECTED),
01069     MAKE_SCODE_ENTRY(RPC_E_FAULT),
01070     MAKE_SCODE_ENTRY(RPC_E_INVALID_CALLDATA),
01071     #endif
01072     MAKE_SCODE_ENTRY(RPC_E_INVALID_DATA),
01073     MAKE_SCODE_ENTRY(RPC_E_INVALID_DATAPACKET),
01074     MAKE_SCODE_ENTRY(RPC_E_INVALID_PARAMETER),
01075     #ifdef _WIN32
01076     MAKE_SCODE_ENTRY(RPC_E_INVALIDMETHOD),
01077     MAKE_SCODE_ENTRY(RPC_E_NOT_REGISTERED),
01078     MAKE_SCODE_ENTRY(RPC_E_OUT_OF_RESOURCES),
01079     MAKE_SCODE_ENTRY(RPC_E_RETRY),
01080     #endif
01081     MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTMARSHAL_DATA),
01082     MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTUNMARSHAL_DATA),
01083     MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED),
01084     #ifdef _WIN32
01085     MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED_DNE),
01086     MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_REJECTED),
01087     MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_RETRYLATER),
01088     MAKE_SCODE_ENTRY(RPC_E_SERVERFAULT),
01089     MAKE_SCODE_ENTRY(RPC_E_SYS_CALL_FAILED),
01090     MAKE_SCODE_ENTRY(RPC_E_THREAD_NOT_INIT),
01091     MAKE_SCODE_ENTRY(RPC_E_WRONG_THREAD),
01092     #endif
01093     MAKE_SCODE_ENTRY(RPC_E_UNEXPECTED),
01094     MAKE_SCODE_ENTRY(STG_E_ABNORMALAPIEXIT),
01095     MAKE_SCODE_ENTRY(STG_E_ACCESSDENIED),
01096     MAKE_SCODE_ENTRY(STG_E_CANTSAVE),
01097     MAKE_SCODE_ENTRY(STG_E_DISKISWRITEPROTECTED),
01098     MAKE_SCODE_ENTRY(STG_E_EXTANTMARSHALLINGS),
01099     MAKE_SCODE_ENTRY(STG_E_FILEALREADYEXISTS),
01100     MAKE_SCODE_ENTRY(STG_E_FILENOTFOUND),
01101     MAKE_SCODE_ENTRY(STG_E_INSUFFICIENTMEMORY),
01102     MAKE_SCODE_ENTRY(STG_E_INUSE),
01103     MAKE_SCODE_ENTRY(STG_E_INVALIDFLAG),
01104     MAKE_SCODE_ENTRY(STG_E_INVALIDFUNCTION),
01105     MAKE_SCODE_ENTRY(STG_E_INVALIDHANDLE),
01106     MAKE_SCODE_ENTRY(STG_E_INVALIDHEADER),
01107     MAKE_SCODE_ENTRY(STG_E_INVALIDNAME),
01108     MAKE_SCODE_ENTRY(STG_E_INVALIDPARAMETER),
01109     MAKE_SCODE_ENTRY(STG_E_INVALIDPOINTER),
01110     MAKE_SCODE_ENTRY(STG_E_LOCKVIOLATION),
01111     MAKE_SCODE_ENTRY(STG_E_MEDIUMFULL),
01112     MAKE_SCODE_ENTRY(STG_E_NOMOREFILES),
01113     MAKE_SCODE_ENTRY(STG_E_NOTCURRENT),
01114     MAKE_SCODE_ENTRY(STG_E_NOTFILEBASEDSTORAGE),
01115     MAKE_SCODE_ENTRY(STG_E_OLDDLL),
01116     MAKE_SCODE_ENTRY(STG_E_OLDFORMAT),
01117     MAKE_SCODE_ENTRY(STG_E_PATHNOTFOUND),
01118     MAKE_SCODE_ENTRY(STG_E_READFAULT),
01119     MAKE_SCODE_ENTRY(STG_E_REVERTED),
01120     MAKE_SCODE_ENTRY(STG_E_SEEKERROR),
01121     MAKE_SCODE_ENTRY(STG_E_SHAREREQUIRED),
01122     MAKE_SCODE_ENTRY(STG_E_SHAREVIOLATION),
01123     MAKE_SCODE_ENTRY(STG_E_TOOMANYOPENFILES),
01124     MAKE_SCODE_ENTRY(STG_E_UNIMPLEMENTEDFUNCTION),
01125     MAKE_SCODE_ENTRY(STG_E_UNKNOWN),
01126     MAKE_SCODE_ENTRY(STG_E_WRITEFAULT),
01127     MAKE_SCODE_ENTRY(TYPE_E_AMBIGUOUSNAME),
01128     MAKE_SCODE_ENTRY(TYPE_E_BADMODULEKIND),
01129     MAKE_SCODE_ENTRY(TYPE_E_BUFFERTOOSMALL),
01130     MAKE_SCODE_ENTRY(TYPE_E_CANTCREATETMPFILE),
01131     MAKE_SCODE_ENTRY(TYPE_E_CANTLOADLIBRARY),
01132     MAKE_SCODE_ENTRY(TYPE_E_CIRCULARTYPE),
01133     MAKE_SCODE_ENTRY(TYPE_E_DLLFUNCTIONNOTFOUND),
01134     MAKE_SCODE_ENTRY(TYPE_E_DUPLICATEID),
01135     MAKE_SCODE_ENTRY(TYPE_E_ELEMENTNOTFOUND),
01136     MAKE_SCODE_ENTRY(TYPE_E_INCONSISTENTPROPFUNCS),
01137     MAKE_SCODE_ENTRY(TYPE_E_INVALIDSTATE),
01138     MAKE_SCODE_ENTRY(TYPE_E_INVDATAREAD),
01139     MAKE_SCODE_ENTRY(TYPE_E_IOERROR),
01140     MAKE_SCODE_ENTRY(TYPE_E_LIBNOTREGISTERED),
01141     MAKE_SCODE_ENTRY(TYPE_E_NAMECONFLICT),
01142     MAKE_SCODE_ENTRY(TYPE_E_OUTOFBOUNDS),
01143     MAKE_SCODE_ENTRY(TYPE_E_QUALIFIEDNAMEDISALLOWED),
01144     MAKE_SCODE_ENTRY(TYPE_E_REGISTRYACCESS),
01145     MAKE_SCODE_ENTRY(TYPE_E_SIZETOOBIG),
01146     MAKE_SCODE_ENTRY(TYPE_E_TYPEMISMATCH),
01147     MAKE_SCODE_ENTRY(TYPE_E_UNDEFINEDTYPE),
01148     MAKE_SCODE_ENTRY(TYPE_E_UNKNOWNLCID),
01149     MAKE_SCODE_ENTRY(TYPE_E_UNSUPFORMAT),
01150     MAKE_SCODE_ENTRY(TYPE_E_WRONGTYPEKIND),
01151     MAKE_SCODE_ENTRY(VIEW_E_DRAW),
01152   };
01153   #undef MAKE_SCODE_ENTRY
01154
01155   // look for it in the table
01156   for (int i = 0; i < _COUNTOF(scNameTable); i++)
01157   {
01158     if (sc == scNameTable[i].sc)
01159       return scNameTable[i].lpszName;
01160   }
01161   return NULL;    // not found
01162 }
01163
01164 LPCTSTR AFXAPI _GetScodeRangeString(SCODE sc)
01165 {
01166   struct RANGE_ENTRY
01167   {
01168     SCODE scFirst;
01169     SCODE scLast;
01170     LPCTSTR lpszName;
01171   };
01172   #define MAKE_RANGE_ENTRY(scRange) \
01173     { scRange##_FIRST, scRange##_LAST, \
01174       _T(#scRange) _T("_FIRST...") _T(#scRange) _T("_LAST") }
01175
01176   static const RANGE_ENTRY scRangeTable[] =
01177   {
01178     MAKE_RANGE_ENTRY(CACHE_E),
01179     MAKE_RANGE_ENTRY(CACHE_S),
01180     MAKE_RANGE_ENTRY(CLASSFACTORY_E),
01181     MAKE_RANGE_ENTRY(CLASSFACTORY_S),
01182     MAKE_RANGE_ENTRY(CLIENTSITE_E),
01183     MAKE_RANGE_ENTRY(CLIENTSITE_S),
01184     MAKE_RANGE_ENTRY(CLIPBRD_E),
01185     MAKE_RANGE_ENTRY(CLIPBRD_S),
01186     MAKE_RANGE_ENTRY(CONVERT10_E),
01187     MAKE_RANGE_ENTRY(CONVERT10_S),
01188     MAKE_RANGE_ENTRY(CO_E),
01189     MAKE_RANGE_ENTRY(CO_S),
01190     MAKE_RANGE_ENTRY(DATA_E),
01191     MAKE_RANGE_ENTRY(DATA_S),
01192     MAKE_RANGE_ENTRY(DRAGDROP_E),
01193     MAKE_RANGE_ENTRY(DRAGDROP_S),
01194     MAKE_RANGE_ENTRY(ENUM_E),
01195     MAKE_RANGE_ENTRY(ENUM_S),
01196     MAKE_RANGE_ENTRY(INPLACE_E),
01197     MAKE_RANGE_ENTRY(INPLACE_S),
01198     MAKE_RANGE_ENTRY(MARSHAL_E),
01199     MAKE_RANGE_ENTRY(MARSHAL_S),
01200     MAKE_RANGE_ENTRY(MK_E),
01201     MAKE_RANGE_ENTRY(MK_S),
01202     MAKE_RANGE_ENTRY(OLEOBJ_E),
01203     MAKE_RANGE_ENTRY(OLEOBJ_S),
01204     MAKE_RANGE_ENTRY(OLE_E),
01205     MAKE_RANGE_ENTRY(OLE_S),
01206     MAKE_RANGE_ENTRY(REGDB_E),
01207     MAKE_RANGE_ENTRY(REGDB_S),
01208     MAKE_RANGE_ENTRY(VIEW_E),
01209     MAKE_RANGE_ENTRY(VIEW_S),
01210   };
01211   #undef MAKE_RANGE_ENTRY
01212
01213   // look for it in the table
01214   for (int i = 0; i < _COUNTOF(scRangeTable); i++)
01215   {
01216     if (sc >= scRangeTable[i].scFirst && sc <= scRangeTable[i].scLast)
01217       return scRangeTable[i].lpszName;
01218   }
01219   return NULL;    // not found
01220 }
01221
01222 LPCTSTR AFXAPI _GetSeverityString(SCODE sc)
01223 {
01224   static const TCHAR* rgszSEVERITY[] =
01225   {
01226     _T("SEVERITY_SUCCESS"),
01227     _T("SEVERITY_ERROR"),
01228   };
01229   return rgszSEVERITY[SCODE_SEVERITY(sc)];
01230 }
01231
01232 LPCTSTR AFXAPI _GetFacilityString(SCODE sc)
01233 {
01234   static const TCHAR* rgszFACILITY[] =
01235   {
01236     _T("FACILITY_NULL"),
01237     _T("FACILITY_RPC"),
01238     _T("FACILITY_DISPATCH"),
01239     _T("FACILITY_STORAGE"),
01240     _T("FACILITY_ITF"),
01241     _T("FACILITY_0x05"),
01242     _T("FACILITY_0x06"),
01243     _T("FACILITY_WIN32"),
01244     _T("FACILITY_WINDOWS"),
01245   };
01246   if (SCODE_FACILITY(sc) >= _COUNTOF(rgszFACILITY) || SCODE_FACILITY(sc) < 0)
01247     return _T("<Unknown Facility>");
01248
01249   return rgszFACILITY[SCODE_FACILITY(sc)];
01250 }
01251
01252 LPCTSTR AFXAPI _GetFullScodeString(SCODE sc)
01253 {
01254   static TCHAR szBuf[128];
01255   LPCTSTR lpsz;
01256   if ((lpsz = _GetScodeString(sc)) != NULL)
01257   {
01258     // found exact match
01259     _stprintf_s(szBuf, 128, _T("%s ($%08lX)"), lpsz, sc);
01260   }
01261   else if ((lpsz = _GetScodeRangeString(sc)) != NULL)
01262   {
01263     // found suitable range
01264     _stprintf_s(szBuf, 128, _T("range: %s ($%08lX)"), lpsz, sc);
01265   }
01266   else
01267   {
01268     // not found at all -- split it up into its parts
01269     _stprintf_s(szBuf, 128, _T("severity: %s, facility: %s ($%08lX)"),
01270       _GetSeverityString(sc), _GetFacilityString(sc), sc);
01271   }
01272   return szBuf;
01273 }
01274
01275
01276 LPTSTR HRtoString( HRESULT hr )
01277 {
01278   SCODE   sc ;
01279   sc = GetScode( hr ) ;
01280
01281 #ifdef FORMATMSG
01282   LPVOID lpMessageBuffer ;
01283   if (FormatMessage(
01284       FORMAT_MESSAGE_ALLOCATE_BUFFER |
01285       FORMAT_MESSAGE_FROM_SYSTEM,
01286       NULL,
01287       sc,
01288       MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
01289       (LPTSTR) &lpMessageBuffer,
01290       0,
01291       NULL ))
01292   {
01293     _stprintf_s( sz, _countof(sz), _T( "%s (0x%lx)" ), (LPTSTR)lpMessageBuffer, sc);
01294     LocalFree(lpMessageBuffer) ;
01295   }
01296   else
01297   {
01298     _stprintf_s( sz, _countof(sz), _T( "Unknown Scode (0x%lx)" ), sc);
01299   }
01300
01301
01302 #endif // !FORMATMSG
01303
01304   return (LPTSTR)_GetFullScodeString(sc) ;
01305 }
01306
01307 static TCHAR * g_rgszVT[] =
01308 {
01309   _T( "Void" ),             //VT_EMPTY           = 0,   /* [V]   [P]  nothing                     */
01310   _T( "Null" ),             //VT_NULL            = 1,   /* [V]        SQL style Null              */
01311   _T( "Integer" ),          //VT_I2              = 2,   /* [V][T][P]  2 byte signed int           */
01312   _T( "Long" ),             //VT_I4              = 3,   /* [V][T][P]  4 byte signed int           */
01313   _T( "Single" ),           //VT_R4              = 4,   /* [V][T][P]  4 byte real                 */
01314   _T( "Double" ),           //VT_R8              = 5,   /* [V][T][P]  8 byte real                 */
01315   _T( "Currency" ),         //VT_CY              = 6,   /* [V][T][P]  currency                    */
01316   _T( "Date" ),             //VT_DATE            = 7,   /* [V][T][P]  date                        */
01317   _T( "String" ),           //VT_BSTR            = 8,   /* [V][T][P]  binary string               */
01318   _T( "Object" ),           //VT_DISPATCH        = 9,   /* [V][T]     IDispatch FAR*              */
01319   _T( "SCODE" ),            //VT_ERROR           = 10,  /* [V][T]     SCODE                       */
01320   _T( "Boolean" ),          //VT_BOOL            = 11,  /* [V][T][P]  True=-1, False=0            */
01321   _T( "Variant" ),          //VT_VARIANT         = 12,  /* [V][T][P]  VARIANT FAR*                */
01322   _T( "pIUnknown" ),        //VT_UNKNOWN         = 13,  /* [V][T]     IUnknown FAR*               */
01323   _T( "Unicode" ),          //VT_WBSTR           = 14,  /* [V][T]     wide binary string          */
01324   _T( "" ),                 //                   = 15,
01325   _T( "BYTE" ),             //VT_I1              = 16,  /*    [T]     signed char                 */
01326   _T( "char" ),             //VT_UI1             = 17,  /*    [T]     unsigned char               */
01327   _T( "USHORT" ),           //VT_UI2             = 18,  /*    [T]     unsigned short              */
01328   _T( "ULONG" ),            //VT_UI4             = 19,  /*    [T]     unsigned short              */
01329   _T( "int64" ),            //VT_I8              = 20,  /*    [T][P]  signed 64-bit int           */
01330   _T( "uint64" ),           //VT_UI8             = 21,  /*    [T]     unsigned 64-bit int         */
01331   _T( "int" ),              //VT_INT             = 22,  /*    [T]     signed machine int          */
01332   _T( "UINT" ),             //VT_UINT            = 23,  /*    [T]     unsigned machine int        */
01333   _T( "VOID" ),             //VT_VOID            = 24,  /*    [T]     C style void                */
01334   _T( "HRESULT" ),          //VT_HRESULT         = 25,  /*    [T]                                 */
01335   _T( "PTR" ),              //VT_PTR             = 26,  /*    [T]     pointer type                */
01336   _T( "SAFEARRAY" ),        //VT_SAFEARRAY       = 27,  /*    [T]     (use VT_ARRAY in VARIANT)   */
01337   _T( "CARRAY" ),           //VT_CARRAY          = 28,  /*    [T]     C style array               */
01338   _T( "USERDEFINED" ),      //VT_USERDEFINED     = 29,  /*    [T]     user defined type         */
01339   _T( "LPTSTR" ),            //VT_LPTSTR           = 30,  /*    [T][P]  null terminated string      */
01340   _T( "LPWSTR" ),           //VT_LPWSTR          = 31,  /*    [T][P]  wide null terminated string */
01341   _T( "" ),                 //                   = 32,
01342   _T( "" ),                 //                   = 33,
01343   _T( "" ),                 //                   = 34,
01344   _T( "" ),                 //                   = 35,
01345   _T( "" ),                 //                   = 36,
01346   _T( "" ),                 //                   = 37,
01347   _T( "" ),                 //                   = 38,
01348   _T( "" ),                 //                   = 39,
01349   _T( "" ),                 //                   = 40,
01350   _T( "" ),                 //                   = 41,
01351   _T( "" ),                 //                   = 42,
01352   _T( "" ),                 //                   = 43,
01353   _T( "" ),                 //                   = 44,
01354   _T( "" ),                 //                   = 45,
01355   _T( "" ),                 //                   = 46,
01356   _T( "" ),                 //                   = 47,
01357   _T( "" ),                 //                   = 48,
01358   _T( "" ),                 //                   = 49,
01359   _T( "" ),                 //                   = 50,
01360   _T( "" ),                 //                   = 51,
01361   _T( "" ),                 //                   = 52,
01362   _T( "" ),                 //                   = 53,
01363   _T( "" ),                 //                   = 54,
01364   _T( "" ),                 //                   = 55,
01365   _T( "" ),                 //                   = 56,
01366   _T( "" ),                 //                   = 57,
01367   _T( "" ),                 //                   = 58,
01368   _T( "" ),                 //                   = 59,
01369   _T( "" ),                 //                   = 60,
01370   _T( "" ),                 //                   = 61,
01371   _T( "" ),                 //                   = 62,
01372   _T( "" ),                 //                   = 63,
01373   _T( "FILETIME" ),         //VT_FILETIME        = 64,  /*       [P]  FILETIME                    */
01374   _T( "BLOB" ),             //VT_BLOB            = 65,  /*       [P]  Length prefixed bytes       */
01375   _T( "STREAM" ),           //VT_STREAM          = 66,  /*       [P]  Name of the stream follows  */
01376   _T( "STORAGE" ),          //VT_STORAGE         = 67,  /*       [P]  Name of the storage follows */
01377   _T( "STREAMED_OBJECT" ),  //VT_STREAMED_OBJECT = 68,  /*       [P]  Stream contains an object   */
01378   _T( "STORED_OBJECT" ),    //VT_STORED_OBJECT   = 69,  /*       [P]  Storage contains an object  */
01379   _T( "BLOB_OBJECT" ),      //VT_BLOB_OBJECT     = 70,  /*       [P]  Blob contains an object     */
01380   _T( "CF" ),               //VT_CF              = 71,  /*       [P]  Clipboard format            */
01381   _T( "CLSID" ),            //VT_CLSID           = 72   /*       [P]  A Class ID                  */
01382 };
01383
01384 LPTSTR VTtoString( VARTYPE vt )
01385 {
01386   static TCHAR szBuf[64];
01387
01388   if (vt <= VT_CLSID)
01389     return (LPTSTR)g_rgszVT[vt] ;
01390
01391   if (vt & VT_VECTOR)
01392   {
01393     vt &= ~VT_VECTOR ;
01394     if (vt <= VT_CLSID)
01395       _stprintf_s( szBuf, 64, _T("VECTOR of %s"), (LPTSTR)g_rgszVT[vt] ) ;
01396     else
01397       _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_VECTOR ) ;
01398     return (LPTSTR)szBuf ;
01399   }
01400
01401   if (vt & VT_ARRAY)
01402   {
01403     vt &= ~VT_ARRAY ;
01404     if (vt <= VT_CLSID)
01405       _stprintf_s( szBuf, 64, _T("Array of %s"), (LPTSTR)g_rgszVT[vt] ) ;
01406     else
01407       _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_ARRAY ) ;
01408     return (LPTSTR)szBuf ;
01409   }
01410
01411   if (vt & VT_BYREF)
01412   {
01413     vt &= ~VT_BYREF ;
01414     if (vt <= VT_CLSID)
01415       _stprintf_s( szBuf, 64, _T("%s BYREF "), (LPTSTR)g_rgszVT[vt] ) ;
01416     else
01417       _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_BYREF ) ;
01418     return (LPTSTR)szBuf ;
01419   }
01420
01421   if (vt & VT_RESERVED)
01422   {
01423     vt &= ~VT_RESERVED ;
01424     if (vt <= VT_CLSID)
01425       _stprintf_s( szBuf, 64, _T("RESERVED (%s)"), (LPTSTR)g_rgszVT[vt] ) ;
01426     else
01427       _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt & VT_RESERVED ) ;
01428     return (LPTSTR)szBuf ;
01429   }
01430
01431   _stprintf_s( szBuf, 64, _T("<Unknown %08lX>"), vt ) ;
01432
01433   return (LPTSTR)szBuf ;
01434 }
01435
01436 /* Remove the filespec portion from a path (including the backslash).
01437  */
01438 VOID WINAPI StripFilespec( LPTSTR lpszPath )
01439 {
01440   LPTSTR     p;
01441
01442   p = lpszPath + lstrlen( lpszPath ) ;
01443   while ((*p != '\\') && (*p != ':') && (p != lpszPath))
01444     p-- ;
01445
01446   if (*p == ':')
01447     p++ ;
01448
01449   /* Don't strip backslash from root directory entry. */
01450   if (p != lpszPath)
01451   {
01452     if ((*p == '\\') && (*(p-1) == ':'))
01453       p++ ;
01454   }
01455
01456   *p = NULL ;
01457 }
01458
01459 /* Ensures that a path ends with a backslash.
01460  */
01461 VOID WINAPI AddBackslash( LPTSTR lpszPath, int nSize )
01462 {
01463   if (lpszPath[lstrlen( lpszPath ) - 1] == '\\')
01464     return ;
01465   _tcscat_s( lpszPath, nSize, _T("\\") ) ;
01466 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenuDlg.cpp Source File

  • vc2008fp
  • TrayMenu

TrayMenuDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TrayMenu.h"
00013 #include "TrayMenuDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 #define UM_TRAYNOTIFY (WM_USER + 1)
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CTrayMenuDlg dialog
00025
00026 CTrayMenuDlg::CTrayMenuDlg(CWnd* pParent /*=NULL*/)
00027   : CDialog(CTrayMenuDlg::IDD, pParent)
00028 {
00029   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00030   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00031
00032   // Initialize NOTIFYICONDATA
00033   memset(&m_nid, 0 , sizeof(m_nid));
00034   m_nid.cbSize = sizeof(m_nid);
00035   m_nid.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
00036 }
00037
00038 CTrayMenuDlg::~CTrayMenuDlg ()
00039 {
00040   m_nid.hIcon = NULL;
00041   Shell_NotifyIcon (NIM_DELETE, &m_nid);
00042 }
00043
00044 void CTrayMenuDlg::DoDataExchange(CDataExchange* pDX)
00045 {
00046   CDialog::DoDataExchange(pDX);
00047 }
00048
00049 BEGIN_MESSAGE_MAP(CTrayMenuDlg, CDialog)
00050   ON_WM_SYSCOMMAND()
00051   ON_WM_PAINT()
00052   ON_WM_QUERYDRAGICON()
00053   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00054   ON_COMMAND(ID_APP_EXIT, OnAppExit)
00055   ON_COMMAND(ID_APP_OPEN, OnAppOpen)
00056   ON_COMMAND(ID_ITEM1, OnItem1)
00057   ON_COMMAND(ID_ITEM2, OnItem2)
00058   ON_COMMAND(ID_ITEM3, OnItem3)
00059   ON_COMMAND(ID_ITEM4, OnItem4)
00060   ON_UPDATE_COMMAND_UI(ID_ITEM4, OnUpdateItem4)
00061   ON_MESSAGE(UM_TRAYNOTIFY, OnTrayNotify)
00062 END_MESSAGE_MAP()
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CTrayMenuDlg message handlers
00066
00067 BOOL CTrayMenuDlg::OnInitDialog()
00068 {
00069   CDialog::OnInitDialog();
00070
00071   // Add "About..." menu item to system menu.
00072
00073   // IDM_ABOUTBOX must be in the system command range.
00074   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00075   ASSERT(IDM_ABOUTBOX < 0xF000);
00076
00077   CMenu* pSysMenu = GetSystemMenu(FALSE);
00078   if (pSysMenu != NULL)
00079   {
00080     BOOL bValidString;
00081     CString strAboutMenu;
00082     bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
00083     if (!strAboutMenu.IsEmpty())
00084     {
00085       pSysMenu->AppendMenu(MF_SEPARATOR);
00086       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00087     }
00088   }
00089
00090   // Set the icon for this dialog.  The framework does this automatically
00091   //  when the application's main window is not a dialog
00092   SetIcon(m_hIcon, TRUE);     // Set big icon
00093   SetIcon(m_hIcon, FALSE);    // Set small icon
00094
00095   // Set tray notification window:
00096   m_nid.hWnd = GetSafeHwnd ();
00097   m_nid.uCallbackMessage = UM_TRAYNOTIFY;
00098
00099   // Set tray icon and tooltip:
00100   m_nid.hIcon = m_hIcon;
00101
00102   CString strToolTip = _T("MFCTrayDemo");
00103   _tcsncpy_s (m_nid.szTip, strToolTip, strToolTip.GetLength ());
00104
00105   Shell_NotifyIcon (NIM_ADD, &m_nid);
00106
00107   CMFCToolBar::AddToolBarForImageCollection (IDR_MENUIMAGES);
00108
00109   return TRUE;  // return TRUE  unless you set the focus to a control
00110 }
00111
00112 void CTrayMenuDlg::OnSysCommand(UINT nID, LPARAM lParam)
00113 {
00114   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00115   {
00116   }
00117   else
00118   {
00119     CDialog::OnSysCommand(nID, lParam);
00120   }
00121 }
00122
00123 // If you add a minimize button to your dialog, you will need the code below
00124 //  to draw the icon.  For MFC applications using the document/view model,
00125 //  this is automatically done for you by the framework.
00126
00127 void CTrayMenuDlg::OnPaint()
00128 {
00129   if (IsIconic())
00130   {
00131     CPaintDC dc(this); // device context for painting
00132
00133     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00134
00135     // Center icon in client rectangle
00136     int cxIcon = GetSystemMetrics(SM_CXICON);
00137     int cyIcon = GetSystemMetrics(SM_CYICON);
00138     CRect rect;
00139     GetClientRect(&rect);
00140     int x = (rect.Width() - cxIcon + 1) / 2;
00141     int y = (rect.Height() - cyIcon + 1) / 2;
00142
00143     // Draw the icon
00144     dc.DrawIcon(x, y, m_hIcon);
00145   }
00146   else
00147   {
00148     CDialog::OnPaint();
00149   }
00150 }
00151
00152 // The system calls this to obtain the cursor to display while the user drags
00153 //  the minimized window.
00154 HCURSOR CTrayMenuDlg::OnQueryDragIcon()
00155 {
00156   return (HCURSOR) m_hIcon;
00157 }
00158
00159 LRESULT CTrayMenuDlg::OnTrayNotify(WPARAM /*wp*/, LPARAM lp)
00160 {
00161   UINT uiMsg = (UINT) lp;
00162
00163   switch (uiMsg)
00164   {
00165   case WM_RBUTTONUP:
00166     OnTrayContextMenu ();
00167     return 1;
00168
00169   case WM_LBUTTONDBLCLK:
00170     ShowWindow (SW_SHOWNORMAL);
00171     return 1;
00172   }
00173
00174   return 0;
00175 }
00176
00177 void CTrayMenuDlg::OnTrayContextMenu ()
00178 {
00179   CPoint point;
00180   ::GetCursorPos (&point);
00181
00182   CMenu menu;
00183   menu.LoadMenu (IDR_MENU1);
00184
00185   CMFCPopupMenu::SetForceShadow (TRUE);
00186
00187   HMENU hMenu = menu.GetSubMenu (0)->Detach ();
00188   CMFCPopupMenu* pMenu = theApp.GetContextMenuManager()->ShowPopupMenu(hMenu, point.x, point.y, this, TRUE);
00189
00190   pMenu->SetForegroundWindow ();
00191 }
00192
00193 void CTrayMenuDlg::OnAppAbout()
00194 {
00195 }
00196
00197 void CTrayMenuDlg::OnAppExit()
00198 {
00199   PostMessage (WM_CLOSE);
00200 }
00201
00202 void CTrayMenuDlg::OnAppOpen()
00203 {
00204   ShowWindow (SW_SHOWNORMAL);
00205 }
00206
00207 void CTrayMenuDlg::OnItem1()
00208 {
00209   ::MessageBox (NULL, _T("Item 1"), _T("TrayMenu"), MB_OK);
00210 }
00211
00212 void CTrayMenuDlg::OnItem2()
00213 {
00214   ::MessageBox (NULL, _T("Item 2"), _T("TrayMenu"), MB_OK);
00215 }
00216
00217 void CTrayMenuDlg::OnItem3()
00218 {
00219   ::MessageBox (NULL, _T("Item 3"), _T("TrayMenu"), MB_OK);
00220 }
00221
00222 static BOOL bIsItem4Checked = TRUE;
00223
00224 void CTrayMenuDlg::OnItem4()
00225 {
00226   bIsItem4Checked = !bIsItem4Checked;
00227 }
00228
00229 void CTrayMenuDlg::OnUpdateItem4(CCmdUI* pCmdUI)
00230 {
00231   pCmdUI->SetCheck (bIsItem4Checked);
00232 }
00233
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CGDIThread Member List

This is the complete list of members for CGDIThread, including all inherited members.
CGDIThread(CWnd *pWnd, HDC hDC) | CGDIThread |
Delete() | CGDIThread | [virtual]
InitInstance() | CGDIThread | [protected, virtual]
KillThread() | CGDIThread |
m_csGDILock | CGDIThread | [static]
m_dc | CGDIThread |
m_hAnotherDead | CGDIThread | [static]
m_hDC | CGDIThread |
m_hEventDead | CGDIThread |
m_hEventKill | CGDIThread |
m_rectBorder | CGDIThread |
SingleStep()=0 | CGDIThread | [pure virtual]
UpdateBorder() | CGDIThread |
~CGDIThread() | CGDIThread | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

notif_tag Member List

This is the complete list of members for notif_tag, including all inherited members.
nCode | notif_tag
sztCodeName | notif_tag
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCSPropertyPage Member List

This is the complete list of members for CCSPropertyPage, including all inherited members.
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
GetHelpIDs()=0 | CCSPropertyPage | [protected, pure virtual]
GetHelpIDs()=0 | CCSPropertyPage | [protected, pure virtual]
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/MainFrm.h Source File

  • vc2008fp
  • OwnerDrawMenu

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CFrameWnd CFrameWndEx
00014
00015 class CMainFrame : public CFrameWnd
00016 {
00017
00018 protected: // create from serialization only
00019   CMainFrame();
00020   DECLARE_DYNCREATE(CMainFrame)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CMFCMenuBar m_wndMenuBar;
00041   CMFCStatusBar m_wndStatusBar;
00042   CMFCToolBar m_wndToolBar;
00043
00044 protected:
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   afx_msg void OnViewCustomize();
00047   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00048   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00049
00050   DECLARE_MESSAGE_MAP()
00051
00052   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00053 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDg.H Source File

  • ole
  • TstCon

MacroDg.H

Go to the documentation of this file.
00001 // File: MacroDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_MACRODLG_H__C4B24B98_0D5D_11D1_8E2F_00C04FB68D60__INCLUDED_)
00011 #define AFX_MACRODLG_H__C4B24B98_0D5D_11D1_8E2F_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // MacroDlg.H : header file
00017 //
00018
00019 class CScript;
00020 class CScriptManager;
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMacroDlg dialog
00024
00025 class CMacroDlg :
00026    public CDialog
00027 {
00028 // Construction
00029 public:
00030   CMacroDlg( CWnd* pParent = NULL );   // standard constructor
00031
00032 // Dialog Data
00033   //{{AFX_DATA(CMacroDlg)
00034   enum { IDD = IDD_MACRO };
00035   CButton m_butRun;
00036   CListBox    m_lbMacros;
00037   CString m_strMacroName;
00038   //}}AFX_DATA
00039
00040    CScriptManager* m_pScriptManager;
00041    CScript* m_pScript;
00042
00043 // Overrides
00044   // ClassWizard generated virtual function overrides
00045   //{{AFX_VIRTUAL(CMacroDlg)
00046   protected:
00047   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00048   //}}AFX_VIRTUAL
00049
00050 // Implementation
00051 protected:
00052    void UpdateMacroList();
00053
00054   // Generated message map functions
00055   //{{AFX_MSG(CMacroDlg)
00056   virtual BOOL OnInitDialog();
00057   afx_msg void OnOpenFile();
00058   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00059   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00060   //}}AFX_MSG
00061   DECLARE_MESSAGE_MAP()
00062 };
00063
00064 //{{AFX_INSERT_LOCATION}}
00065 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00066
00067 #endif // !defined(AFX_MACRODLG_H__C4B24B98_0D5D_11D1_8E2F_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonTooltipCtrl.h Source File

  • vc2008fp
  • MSOffice2007Demo

RibbonTooltipCtrl.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CRibbonTooltipCtrl window
00016
00017 class CRibbonTooltipCtrl : public CMFCToolTipCtrl
00018 {
00019   DECLARE_DYNCREATE(CRibbonTooltipCtrl)
00020
00021 // Construction
00022 public:
00023   CRibbonTooltipCtrl();
00024
00025 // Attributes
00026 protected:
00027   CMFCRibbonPanelMenuBar* m_pParentMenuBar;
00028   CMFCRibbonBar* m_pParentRibbon;
00029   UINT m_nID;
00030
00031 // Overrides
00032 public:
00033   virtual CSize GetIconSize();
00034   virtual BOOL OnDrawIcon(CDC* pDC, CRect rectImage);
00035
00036   // Implementation
00037 public:
00038   virtual ~CRibbonTooltipCtrl();
00039
00040   // Generated message map functions
00041 protected:
00042   //{{AFX_MSG(CRibbonTooltipCtrl)
00043   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00044   afx_msg void OnShow(NMHDR* pNMHDR, LRESULT* pResult);
00045   //}}AFX_MSG
00046
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page6.h Source File

  • vc2008fp
  • NewControls

Page6.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPage6 dialog
00014
00015 class CPage6 : public CMFCPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CPage6)
00018
00019 // Construction
00020 public:
00021   CPage6();
00022   ~CPage6();
00023
00024 // Dialog Data
00025   enum { IDD = IDD_PAGE6 };
00026   CMFCShellListCtrl m_wndShellList;
00027   CMFCShellTreeCtrl m_wbdShellTree;
00028   CString m_strSelectedFolder;
00029
00030 // Overrides
00031 protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   ULONG m_ulChangeIconNotifyID;
00034
00035 // Implementation
00036 protected:
00037   afx_msg void OnSelectFolder();
00038   virtual BOOL OnInitDialog();
00039   afx_msg LRESULT OnChangeSystemIcon(WPARAM wParam, LPARAM lParam);
00040
00041   DECLARE_MESSAGE_MAP()
00042 public:
00043   afx_msg void OnDestroy();
00044 };
00045
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRowListView Member List

This is the complete list of members for CRowListView, including all inherited members.
CheckItem(int nNewCheckedItem) | CRowListView | [protected]
CListViewEx() | CListViewEx |
CRowListView() | CRowListView | [protected]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CListViewEx | [protected, virtual]
GetDocument() | CRowListView | [inline]
GetFullRowSel() | CListViewEx |
GetViewType() | CRowListView |
m_bClientWidthSel | CListViewEx |
m_bFullRowSel | CListViewEx | [protected]
m_bStateIcons | CRowListView | [protected]
m_clrBkgnd | CListViewEx | [protected]
m_clrText | CListViewEx | [protected]
m_clrTextBk | CListViewEx | [protected]
m_cxClient | CListViewEx | [protected]
m_cxStateImageOffset | CListViewEx | [protected]
m_hLargeIcon | CRowListView | [protected]
m_hSmallIcon | CRowListView | [protected]
m_LargeImageList | CRowListView | [protected]
m_nCheckedItem | CRowListView | [protected]
m_SmallImageList | CRowListView | [protected]
m_StateImageList | CRowListView | [protected]
MakeShortString(CDC *pDC, LPCTSTR lpszLong, int nColumnLen, int nOffset) | CListViewEx | [protected, static]
OnInitialUpdate() | CRowListView | [protected, virtual]
OnKillFocus(CWnd *pNewWnd) | CListViewEx | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CRowListView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CRowListView | [protected]
OnPaint() | CListViewEx | [protected]
OnSetBkColor(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSetFocus(CWnd *pOldWnd) | CListViewEx | [protected]
OnSetImageList(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSetTextBkColor(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSetTextColor(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSize(UINT nType, int cx, int cy) | CListViewEx | [protected]
OnUpdateViewClientWidthSel(CCmdUI *pCmdUI) | CRowListView | [protected]
OnUpdateViewDetails(CCmdUI *pCmdUI) | CRowListView | [protected]
OnUpdateViewFullRowDetails(CCmdUI *pCmdUI) | CRowListView | [protected]
OnUpdateViewLargeIcons(CCmdUI *pCmdUI) | CRowListView | [protected]
OnUpdateViewList(CCmdUI *pCmdUI) | CRowListView | [protected]
OnUpdateViewSmallIcons(CCmdUI *pCmdUI) | CRowListView | [protected]
OnUpdateViewStateIcons(CCmdUI *pCmdUI) | CRowListView | [protected]
OnViewClientWidthSel() | CRowListView | [protected]
OnViewDetails() | CRowListView | [protected]
OnViewFullRowDetails() | CRowListView | [protected]
OnViewLargeIcons() | CRowListView | [protected]
OnViewList() | CRowListView | [protected]
OnViewSmallIcons() | CRowListView | [protected]
OnViewStateIcons() | CRowListView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CRowListView | [virtual]
RepaintSelectedItems() | CListViewEx | [protected]
SetFullRowSel(BOOL bFillRowSel) | CListViewEx |
SetViewType(DWORD dwViewType) | CRowListView |
~CListViewEx() | CListViewEx | [virtual]
~CRowListView() | CRowListView | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackvw.h Source File

  • general
  • tracker

trackvw.h

Go to the documentation of this file.
00001 // trackvw.h : interface of the CTrackerView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 class CTrackerView : public CView
00015 {
00016 protected: // create from serialization only
00017   CTrackerView();
00018   DECLARE_DYNCREATE(CTrackerView)
00019
00020 // Attributes
00021 public:
00022   CTrackerDoc* GetDocument();
00023
00024 // Operations
00025 public:
00026
00027 // Implementation
00028 public:
00029   virtual ~CTrackerView();
00030   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00031 #ifdef _DEBUG
00032   virtual void AssertValid() const;
00033   virtual void Dump(CDumpContext& dc) const;
00034 #endif
00035   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00036
00037   // Printing support
00038 protected:
00039   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00040   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00041   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00042
00043 // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CTrackerView)
00046   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00047   afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00048   afx_msg void OnViewSethandlesize();
00049   afx_msg void OnViewSetminimumsize();
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 #ifndef _DEBUG  // debug version in trackvw.cpp
00055 inline CTrackerDoc* CTrackerView::GetDocument()
00056    { return (CTrackerDoc*) m_pDocument; }
00057 #endif
00058
00059 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemo.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MSMoneyDemo.h : main header file for the MSMONEY application
00011 //
00012
00013 #pragma once
00014
00015 #ifndef __AFXWIN_H__
00016   #error include 'stdafx.h' before including this file for PCH
00017 #endif
00018
00019 #include "resource.h"       // main symbols
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CMSMoneyDemoApp:
00023 // See MSMoneyDemo.cpp for the implementation of this class
00024 //
00025
00026 class CMSMoneyDemoApp : public CWinAppEx
00027 {
00028 public:
00029   CMSMoneyDemoApp();
00030
00031 // Overrides
00032 public:
00033   virtual BOOL InitInstance();
00034
00035 // Implementation
00036   afx_msg void OnAppAbout();
00037
00038   DECLARE_MESSAGE_MAP()
00039 };
00040
00041
00042 extern CMSMoneyDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/MainFrm.cpp Source File

  • vc2008fp
  • OutlookMultiViews

MainFrm.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "OutlookMultiViews.h"
00003
00004 #include "MainFrm.h"
00005
00006 #include "View1.h"
00007 #include "View2.h"
00008 #include "View3.h"
00009
00010 #ifdef _DEBUG
00011 #define new DEBUG_NEW
00012 #undef THIS_FILE
00013 static char THIS_FILE[] = __FILE__;
00014 #endif
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CMainFrame
00018
00019 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00020
00021
00022 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00023   ON_WM_CREATE()
00024   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00025   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00026   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00027   ON_COMMAND(ID_VIEW_OUTLOOKBAR, OnViewOutlookBar)
00028   ON_UPDATE_COMMAND_UI(ID_VIEW_OUTLOOKBAR, OnUpdateViewOutlookBar)
00029   ON_COMMAND_RANGE(ID_SHORTCUT_1, ID_SHORTCUT_4, OnOutlookBarShortcut)
00030   ON_UPDATE_COMMAND_UI_RANGE(ID_SHORTCUT_1, ID_SHORTCUT_4, OnUpdateOutlookBarShortcut)
00031   ON_COMMAND(ID_VIEW_CAPTIONBAR, OnViewCaptionBar)
00032   ON_UPDATE_COMMAND_UI(ID_VIEW_CAPTIONBAR, OnUpdateViewCaptionBar)
00033   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnAppLook)
00034   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnUpdateAppLook)
00035 END_MESSAGE_MAP()
00036
00037 static UINT indicators[] =
00038 {
00039   ID_SEPARATOR,           // status line indicator
00040   ID_INDICATOR_CAPS,
00041   ID_INDICATOR_NUM,
00042   ID_INDICATOR_SCRL,
00043 };
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CMainFrame construction/destruction
00047
00048 CMainFrame::CMainFrame()
00049 {
00050   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_2003);
00051
00052   // TODO: add member initialization code here
00053
00054 }
00055
00056 CMainFrame::~CMainFrame()
00057 {
00058 }
00059
00060 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00061 {
00062   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00063     return -1;
00064
00065   OnAppLook (m_nAppLook);
00066
00067   CMFCToolBar::EnableQuickCustomization ();
00068
00069   // TODO: Define your own basic commands. Be sure, that each pulldown
00070   // menu have at least one basic command.
00071
00072   CList<UINT, UINT> lstBasicCommands;
00073
00074   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00075   lstBasicCommands.AddTail (ID_FILE_NEW);
00076   lstBasicCommands.AddTail (ID_FILE_OPEN);
00077   lstBasicCommands.AddTail (ID_FILE_SAVE);
00078   lstBasicCommands.AddTail (ID_FILE_PRINT);
00079   lstBasicCommands.AddTail (ID_APP_EXIT);
00080   lstBasicCommands.AddTail (ID_EDIT_CUT);
00081   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00082   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00083   lstBasicCommands.AddTail (ID_APP_ABOUT);
00084   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00085   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00086   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2000);
00087   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_XP);
00088   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2003);
00089   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_VS2005);
00090   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_WIN_XP);
00091   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_1);
00092   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_2);
00093   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_3);
00094   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_4);
00095
00096   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00097
00098   if (!m_wndMenuBar.Create (this))
00099   {
00100     TRACE0("Failed to create menubar\n");
00101     return -1;      // fail to create
00102   }
00103
00104   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00105
00106   // Detect color depth. 256 color toolbars can be used in the
00107   // high or true color modes only (bits per pixel is > 8):
00108   CClientDC dc (this);
00109   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00110
00111   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00112
00113   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00114     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00115     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00116   {
00117     TRACE0("Failed to create toolbar\n");
00118     return -1;      // fail to create
00119   }
00120   if (!m_wndStatusBar.Create(this) ||
00121     !m_wndStatusBar.SetIndicators(indicators,
00122       sizeof(indicators)/sizeof(UINT)))
00123   {
00124     TRACE0("Failed to create status bar\n");
00125     return -1;      // fail to create
00126   }
00127
00128   m_wndToolBar.SetWindowText (_T("Standard"));
00129   // TODO: Delete these three lines if you don't want the toolbar to
00130   //  be dockable
00131   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00132   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00133
00134   //------------------------------------------------------------------
00135   // Outlook bar will be created at left, so temporary disable docking
00136   // at the left side:
00137   //------------------------------------------------------------------
00138   EnableDocking (CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM | CBRS_ALIGN_RIGHT);
00139
00140   if (!CreateShortcutsBar ())
00141   {
00142     TRACE0("Failed to create shortcuts bar\n");
00143     return -1;      // fail to create
00144   }
00145
00146   //----------------------------------------------------
00147   // Outlook bar is created and docking on the left side
00148   // should be allowed.
00149   //----------------------------------------------------
00150   EnableDocking (CBRS_ALIGN_LEFT);
00151
00152   if (!m_wndCaptionBar.Create (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, this,
00153     ID_VIEW_CAPTIONBAR, -1))
00154   {
00155     TRACE0("Failed to create caption bar\n");
00156     return -1;      // fail to create
00157   }
00158
00159   m_wndCaptionBar.SetFlatBorder ();
00160   m_wndCaptionBar.SetText (_T("View 1"));
00161   m_bmpCaption.LoadBitmap (IDB_CAPTION);
00162   m_wndCaptionBar.SetBitmap (m_bmpCaption, RGB (255, 0, 255));
00163
00164   DockPane(&m_wndMenuBar);
00165   DockPane(&m_wndToolBar);
00166
00167   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00168
00169   return 0;
00170 }
00171
00172 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00173 {
00174   if( !CFrameWnd::PreCreateWindow(cs) )
00175     return FALSE;
00176   // TODO: Modify the Window class or styles here by modifying
00177   //  the CREATESTRUCT cs
00178
00179   return TRUE;
00180 }
00181
00182 /////////////////////////////////////////////////////////////////////////////
00183 // CMainFrame diagnostics
00184
00185 #ifdef _DEBUG
00186 void CMainFrame::AssertValid() const
00187 {
00188   CFrameWnd::AssertValid();
00189 }
00190
00191 void CMainFrame::Dump(CDumpContext& dc) const
00192 {
00193   CFrameWnd::Dump(dc);
00194 }
00195
00196 #endif //_DEBUG
00197
00198 /////////////////////////////////////////////////////////////////////////////
00199 // CMainFrame message handlers
00200
00201
00202 void CMainFrame::OnViewCustomize()
00203 {
00204   //------------------------------------
00205   // Create a customize toolbars dialog:
00206   //------------------------------------
00207   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00208     TRUE /* Automatic menus scaning */
00209     );
00210
00211   pDlgCust->Create ();
00212 }
00213
00214 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00215 {
00216   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00217
00218   CMenu menu;
00219   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00220
00221   CMenu* pPopup = menu.GetSubMenu(0);
00222   ASSERT(pPopup != NULL);
00223
00224   if (pPopup)
00225   {
00226     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00227     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00228   }
00229
00230   return 0;
00231 }
00232
00233 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00234 {
00235   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00236   //
00237   // UINT uiToolBarId = (UINT) wp;
00238   // if (uiToolBarId == IDR_MAINFRAME)
00239   // {
00240   //    do something with m_wndToolBar
00241   // }
00242
00243   return 0;
00244 }
00245
00246 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00247 {
00248   //---------------------------------------------------------
00249   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00250   //---------------------------------------------------------
00251   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00252
00253   if (pMenuPopup != NULL &&
00254     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00255   {
00256     if (CMFCToolBar::IsCustomizeMode ())
00257     {
00258       //----------------------------------------------------
00259       // Don't show toolbars list in the cuztomization mode!
00260       //----------------------------------------------------
00261       return FALSE;
00262     }
00263
00264     pMenuPopup->RemoveAllItems ();
00265
00266     CMenu menu;
00267     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00268
00269     CMenu* pPopup = menu.GetSubMenu(0);
00270     ASSERT(pPopup != NULL);
00271
00272     if (pPopup)
00273     {
00274       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00275     }
00276   }
00277
00278   return TRUE;
00279 }
00280
00281 void CMainFrame::OnViewOutlookBar()
00282 {
00283   ShowPane (&m_wndShortcutsBar,
00284           !(m_wndShortcutsBar.IsVisible ()),
00285           FALSE, TRUE);
00286   RecalcLayout ();
00287 }
00288
00289 void CMainFrame::OnUpdateViewOutlookBar(CCmdUI* pCmdUI)
00290 {
00291   pCmdUI->SetCheck (m_wndShortcutsBar.IsVisible ());
00292 }
00293
00294 void CMainFrame::OnOutlookBarShortcut(UINT id)
00295 {
00296   const int nIndex = id - ID_SHORTCUT_1;
00297
00298   ASSERT( nIndex >=0 && nIndex < NUMVIEWS );
00299   if ( nIndex < 0 || nIndex >= NUMVIEWS )
00300     return;
00301
00302   if (!m_pViews)
00303     return;
00304
00305   CView* pNewView = m_pViews[nIndex];
00306   if (!pNewView)
00307     return;
00308
00309   CView* pActiveView =GetActiveView();
00310
00311   if ( !pActiveView )    // No currently active view
00312     return;
00313
00314   if ( pNewView == pActiveView )    // Already there
00315     return;
00316
00317   m_nCurView = nIndex;    // Store the new current view's index
00318
00319   // exchange view window ID's so RecalcLayout() works
00320   UINT temp = ::GetWindowLong(pActiveView->m_hWnd, GWL_ID);
00321   ::SetWindowLong(pActiveView->m_hWnd, GWL_ID,
00322     ::GetWindowLong(pNewView->m_hWnd, GWL_ID));
00323   ::SetWindowLong(pNewView->m_hWnd, GWL_ID, temp);
00324
00325   // Display and update the new current view - hide the old one
00326   pActiveView->ShowWindow(SW_HIDE);
00327   pNewView->ShowWindow(SW_SHOW);
00328   SetActiveView(pNewView);
00329   RecalcLayout();
00330   pNewView->Invalidate();
00331
00332   CString strCaption;
00333   strCaption.Format (_T("View %d"), nIndex + 1);
00334
00335   m_wndCaptionBar.SetText (strCaption);
00336   m_wndCaptionBar.RedrawWindow ();
00337 }
00338
00339 void CMainFrame::OnUpdateOutlookBarShortcut(CCmdUI* pCmdUI)
00340 {
00341   pCmdUI->SetCheck (pCmdUI->m_nID == ID_SHORTCUT_1 + m_nCurView);
00342 }
00343
00344 void CMainFrame::OnViewCaptionBar()
00345 {
00346   ShowPane (&m_wndCaptionBar,
00347           !(m_wndCaptionBar.IsVisible ()),
00348           FALSE, TRUE);
00349   RecalcLayout ();
00350 }
00351
00352 void CMainFrame::OnUpdateViewCaptionBar(CCmdUI* pCmdUI)
00353 {
00354   pCmdUI->SetCheck (m_wndCaptionBar.IsVisible ());
00355 }
00356
00357 BOOL CMainFrame::CreateShortcutsBar ()
00358 {
00359   CMFCOutlookBarTabCtrl::EnableAnimation ();
00360
00361   const int nInitialWidth = 150;
00362   const CString strCaption = _T("Shortcuts");
00363
00364   if (!m_wndShortcutsBar.Create (strCaption, this,
00365     CRect (0, 0, nInitialWidth, nInitialWidth),
00366     ID_VIEW_OUTLOOKBAR, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
00367   {
00368     TRACE0("Failed to create outlook bar\n");
00369     return FALSE;      // fail to create
00370   }
00371
00372   CMFCOutlookBarTabCtrl* pShortcutsBarContainer = DYNAMIC_DOWNCAST (CMFCOutlookBarTabCtrl, m_wndShortcutsBar.GetUnderlyingWindow ());
00373   if (pShortcutsBarContainer == NULL)
00374   {
00375     TRACE0("Cannot get outlook bar container\n");
00376     return FALSE;
00377   }
00378
00379   CImageList images;
00380   images.Create (IDB_SHORTCUTS, 32, 0, RGB (255, 0, 255));
00381
00382   // Create first page:
00383   m_wndShortcutsPane1.Create (&m_wndShortcutsBar, AFX_DEFAULT_TOOLBAR_STYLE, ID_SHORTCUTS_PANE_1);
00384   m_wndShortcutsPane1.SetOwner (this);
00385   m_wndShortcutsPane1.EnableTextLabels ();
00386   m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);
00387
00388   m_wndShortcutsPane1.AddButton (images.ExtractIcon (0), _T("View 1"), ID_SHORTCUT_1);
00389   m_wndShortcutsPane1.AddButton (images.ExtractIcon (1), _T("View 2"), ID_SHORTCUT_2);
00390   m_wndShortcutsPane1.AddButton (images.ExtractIcon (2), _T("View 3"), ID_SHORTCUT_3);
00391   m_wndShortcutsPane1.AddButton (images.ExtractIcon (3), _T("View 4"), ID_SHORTCUT_4);
00392
00393   pShortcutsBarContainer->AddTab (&m_wndShortcutsPane1, _T("Views"), (UINT)-1, FALSE);
00394
00395   return TRUE;
00396 }
00397
00398 void CMainFrame::OnAppLook(UINT id)
00399 {
00400   CDockingManager::SetDockingMode (DT_SMART);
00401
00402   m_nAppLook = id;
00403
00404   switch (m_nAppLook)
00405   {
00406   case ID_VIEW_APPLOOK_2000:
00407     // enable Office 2000 look:
00408     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00409     break;
00410
00411   case ID_VIEW_APPLOOK_XP:
00412     // enable Office XP look:
00413     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00414     break;
00415
00416   case ID_VIEW_APPLOOK_WIN_XP:
00417     // enable Windows XP look (in other OS Office XP look will be used):
00418     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00419     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00420     break;
00421
00422   case ID_VIEW_APPLOOK_2003:
00423     // enable Office 2003 look:
00424     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00425     CDockingManager::SetDockingMode (DT_SMART);
00426     break;
00427
00428   case ID_VIEW_APPLOOK_VS2005:
00429     // enable VS.NET 2005 look:
00430     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00431     CMFCVisualManager::GetInstance ();
00432     CDockingManager::SetDockingMode (DT_SMART);
00433     break;
00434
00435   case ID_VIEW_APPLOOK_2007_1:
00436     // enable Office 2007 look:
00437     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00438     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00439     CDockingManager::SetDockingMode (DT_SMART);
00440     break;
00441
00442   case ID_VIEW_APPLOOK_2007_2:
00443     // enable Office 2007 look:
00444     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00445     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00446     CDockingManager::SetDockingMode (DT_SMART);
00447     break;
00448
00449   case ID_VIEW_APPLOOK_2007_3:
00450     // enable Office 2007 look:
00451     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00452     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00453     CDockingManager::SetDockingMode (DT_SMART);
00454     break;
00455
00456   case ID_VIEW_APPLOOK_2007_4:
00457     // enable Office 2007 look:
00458     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00459     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00460     CDockingManager::SetDockingMode (DT_SMART);
00461     break;
00462
00463   default:
00464     ASSERT (FALSE);
00465   }
00466
00467   CDockingManager* pDockManager = GetDockingManager ();
00468   if (pDockManager != NULL)
00469   {
00470     ASSERT_VALID (pDockManager);
00471     pDockManager->AdjustPaneFrames ();
00472   }
00473
00474   RecalcLayout ();
00475   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00476
00477   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00478 }
00479
00480 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00481 {
00482   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00483 }
00484
00485
00486 void CMainFrame::InitViews ()
00487 {
00488     m_nCurView = 0;        // Save index of the currently active view class
00489     CView* pActiveView = GetActiveView();
00490
00491     m_pViews[0] = pActiveView;
00492     m_pViews[1] = (CView*) new CView1;
00493     m_pViews[2] = (CView*) new CView2;
00494     m_pViews[3] = (CView*) new CView3;
00495
00496     CDocument* pCurrentDoc = GetActiveDocument();
00497
00498     // Initialize a CCreateContext to point to the active document.
00499     // With this context, the new view is added to the document
00500     // when the view is created in CView::OnCreate().
00501     CCreateContext newContext;
00502     newContext.m_pNewViewClass = NULL;
00503     newContext.m_pNewDocTemplate = NULL;
00504     newContext.m_pLastView = NULL;
00505     newContext.m_pCurrentFrame = NULL;
00506     newContext.m_pCurrentDoc = pCurrentDoc;
00507
00508     CRect rect(0, 0, 0, 0); // gets resized later
00509
00510   for (int nView = 1; nView < NUMVIEWS; nView++)
00511     {
00512         // Create the new view. In this example, the view persists for
00513         // the life of the application. The application automatically
00514         // deletes the view when the application is closed.
00515         m_pViews[nView]->Create(NULL, NULL,
00516         (AFX_WS_DEFAULT_VIEW & ~WS_VISIBLE),
00517       // views are created with the style of AFX_WS_DEFAULT_VIEW
00518       // In MFC 4.0, this is (WS_BORDER | WS_VISIBLE | WS_CHILD)
00519                     rect, this,
00520         AFX_IDW_PANE_FIRST + nView, &newContext);
00521
00522     // When a document template creates a view, the WM_INITIALUPDATE
00523     // message is sent automatically. However, this code must
00524     // explicitly send the message, as follows.
00525     m_pViews [nView]->OnInitialUpdate();
00526     }
00527 }
00528
00529
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/NetAddressCtrlPage.h Source File

  • controls
  • cmnctrl

NetAddressCtrlPage.h

Go to the documentation of this file.
00001 #pragma once
00002 #include "afxcmn.h"
00003 #include "afxwin.h"
00004
00005 // CNetAddressCtrlPage dialog
00006 class CNetAddressCtrlPage : public CPropertyPage
00007 {
00008   DECLARE_DYNAMIC(CNetAddressCtrlPage)
00009
00010 public:
00011   CNetAddressCtrlPage();
00012   virtual ~CNetAddressCtrlPage();
00013
00014 // Dialog Data
00015   enum { IDD = IDD_NETWORK_ADDRESS_CONTROL };
00016
00017 protected:
00018   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00019
00020   DECLARE_MESSAGE_MAP()
00021
00022 public:
00023     afx_msg void OnBnClickedButtonValidate();
00024     afx_msg void OnEnChangeNetaddress();
00025     virtual BOOL OnInitDialog();
00026
00027 private:
00028     CNetAddressCtrl m_netaddrctrl;
00029     CListBox m_listbox;
00030 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CColorListBox Member List

This is the complete list of members for CColorListBox, including all inherited members.
AddColorItem(COLORREF color) | CColorListBox |
CompareItem(LPCOMPAREITEMSTRUCT lpCIS) | CColorListBox | [virtual]
DrawItem(LPDRAWITEMSTRUCT lpDIS) | CColorListBox | [virtual]
MeasureItem(LPMEASUREITEMSTRUCT lpMIS) | CColorListBox | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEventLoggingPage Member List

This is the complete list of members for CEventLoggingPage, including all inherited members.
CEventLoggingPage() | CEventLoggingPage |
DoDataExchange(CDataExchange *pDX) | CEventLoggingPage | [protected, virtual]
IDD enum value | CEventLoggingPage |
m_astrEventNames | CEventLoggingPage |
m_atLogFlags | CEventLoggingPage |
m_lbEvents | CEventLoggingPage |
OnContextMenu(CWnd *pWnd, CPoint point) | CEventLoggingPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CEventLoggingPage | [protected]
OnInitDialog() | CEventLoggingPage | [protected, virtual]
~CEventLoggingPage() | CEventLoggingPage |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/cntritem.h Source File

  • vc2008fp
  • DrawClient

cntritem.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 class CDrawDoc;
00013 class CDrawView;
00014
00015 class CDrawItem : public COleClientItem
00016 {
00017   DECLARE_SERIAL(CDrawItem)
00018
00019 // Constructors
00020 public:
00021   CDrawItem(CDrawDoc* pContainer = NULL, CDrawOleObj* pDrawObj = NULL);
00022   // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE
00023   //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00024   //  zero arguments.  Normally, OLE items are constructed with a
00025   //  non-NULL document pointer.
00026
00027 // Attributes
00028 public:
00029   CDrawDoc* GetDocument() { return(CDrawDoc*)COleClientItem::GetDocument(); }
00030   CDrawView* GetActiveView() { return(CDrawView*)COleClientItem::GetActiveView(); }
00031
00032   CDrawOleObj* m_pDrawObj;    // back pointer to OLE draw object
00033
00034 // Operations
00035   BOOL UpdateExtent();
00036
00037 // Implementation
00038 public:
00039   ~CDrawItem();
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044   virtual void Serialize(CArchive& ar);
00045   virtual void OnGetItemPosition(CRect& rPosition);
00046
00047 protected:
00048   virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
00049   virtual BOOL OnChangeItemPosition(const CRect& rectPos);
00050   virtual void OnDeactivateUI(BOOL bUndoable);
00051   virtual void OnActivate();
00052   virtual BOOL OnShowControlBars(CFrameWnd* pFrameWnd, BOOL bShow);
00053 };
00054
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlist.cpp Source File

  • controls
  • xlist

xlist.cpp

Go to the documentation of this file.
00001 // xlist.cpp : Implementation of CXlistApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "xlist.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021
00022 CXlistApp NEAR theApp;
00023
00024 const GUID CDECL BASED_CODE _tlid =
00025     { 0x37446b9c, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00026 const WORD _wVerMajor = 1;
00027 const WORD _wVerMinor = 0;
00028
00029
00030 ////////////////////////////////////////////////////////////////////////////
00031 // CXlistApp::InitInstance - DLL initialization
00032
00033 BOOL CXlistApp::InitInstance()
00034 {
00035   BOOL bInit = COleControlModule::InitInstance();
00036
00037   if (bInit)
00038   {
00039     // TODO: Add your own module initialization code here.
00040   }
00041
00042   return bInit;
00043 }
00044
00045
00046 ////////////////////////////////////////////////////////////////////////////
00047 // CXlistApp::ExitInstance - DLL termination
00048
00049 int CXlistApp::ExitInstance()
00050 {
00051   // TODO: Add your own module termination code here.
00052
00053   return COleControlModule::ExitInstance();
00054 }
00055
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // DllRegisterServer - Adds entries to the system registry
00059
00060 STDAPI DllRegisterServer(void)
00061 {
00062   AFX_MANAGE_STATE(_afxModuleAddrThis);
00063
00064   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00065     return ResultFromScode(SELFREG_E_TYPELIB);
00066
00067   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00068     return ResultFromScode(SELFREG_E_CLASS);
00069
00070   return NOERROR;
00071 }
00072
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // DllUnregisterServer - Removes entries from the system registry
00076
00077 STDAPI DllUnregisterServer(void)
00078 {
00079   AFX_MANAGE_STATE(_afxModuleAddrThis);
00080
00081   if (!AfxOleUnregisterTypeLib(_tlid))
00082     return ResultFromScode(SELFREG_E_TYPELIB);
00083
00084   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00085     return ResultFromScode(SELFREG_E_CLASS);
00086
00087   return NOERROR;
00088 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifierDlg.h Source File

  • controls
  • netaddr

NetAddrVerifierDlg.h

Go to the documentation of this file.
00001 // NetAddrVerifierDlg.h : header file
00002 //
00003
00004 #pragma once
00005 #include "afxwin.h"
00006 #include "afxcmn.h"
00007
00008
00009 // CNetAddrVerifierDlg dialog
00010 class CNetAddrVerifierDlg : public CDialog
00011 {
00012 // Construction
00013 public:
00014   CNetAddrVerifierDlg(CWnd* pParent = NULL);  // standard constructor
00015   ~CNetAddrVerifierDlg();
00016
00017   enum AddressKind
00018   {
00019     NoKind,
00020     AllKinds,
00021     IPv4,
00022     IPv6,
00023     Named
00024   };
00025
00026   std::wstring Ipv4AddrToString(IN_ADDR &addr);
00027   std::wstring Ipv6AddrToString(IN6_ADDR &addr);
00028   DWORD ConstructAddrMask(AddressKind kind);
00029   BOOL Verify(AddressKind kind);
00030   AddressKind Revalidate();
00031   void Enum();
00032 // Dialog Data
00033   enum { IDD = IDD_NETADDRVERIFIER_DIALOG };
00034
00035   protected:
00036   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00037
00038
00039 // Implementation
00040 protected:
00041   HICON m_hIcon;
00042
00043   // Generated message map functions
00044   virtual BOOL OnInitDialog();
00045   afx_msg void OnPaint();
00046   afx_msg HCURSOR OnQueryDragIcon();
00047   DECLARE_MESSAGE_MAP()
00048 public:
00049   BOOL m_fVista;
00050   CString m_strParsedAddr;
00051
00052
00053   afx_msg void OnBnClickedButton1();
00054   afx_msg void OnVerifyAll();
00055   afx_msg void OnVerifyIPv4();
00056   afx_msg void OnVerifyIPv6();
00057   afx_msg void OnVerifyNamed();
00058
00059   CListCtrl m_listCtrl;
00060
00061   //Vista
00062   CNetAddressCtrl* m_pNetAddr;
00063   CSplitButton* m_pValidateBtn;
00064
00065   //XP
00066   CEdit* m_pEdit;
00067   CButton* m_pButton;
00068 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagITEMDATA Member List

This is the complete list of members for tagITEMDATA, including all inherited members.
cColumns | tagITEMDATA
lpData | tagITEMDATA
nLevel | tagITEMDATA
rgCol | tagITEMDATA
uiType | tagITEMDATA
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgen.cpp Source File

  • utility
  • guidgen

guidgen.cpp

Go to the documentation of this file.
00001 // guidgen.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "guidgen.h"
00014 #include "guidgdlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 HMODULE LoadLocalizedResourceDLLUsingPath(const CString &strPath, const CString &strDLLName)
00022 {
00023   if (strPath.IsEmpty() || strPath.IsEmpty())
00024   {
00025     return NULL;
00026   }
00027
00028   // Check if given path even exists
00029   if (GetFileAttributes(strPath) == 0xFFFFFFFF)
00030   {
00031     return NULL;
00032   }
00033
00034   LANGID langid = GetUserDefaultUILanguage();
00035   const LCID lcidUser = MAKELCID(langid, SORT_DEFAULT);
00036
00037   LCID rglcid[3];
00038   rglcid[0] = lcidUser;
00039   rglcid[1] = MAKELCID(MAKELANGID(PRIMARYLANGID(lcidUser), SUBLANG_DEFAULT), SORTIDFROMLCID(lcidUser));
00040   rglcid[2] = 0x409;
00041
00042   CString strFullPath;
00043   BOOL fFoundDLL = FALSE;
00044
00045   for (int i = 0; i < _countof(rglcid); i++)
00046   {
00047     // Check if it's the same as any LCID already checked, which is very possible
00048     int n = 0;
00049     for (n = 0; n < i; n++)
00050     {
00051       if (rglcid[n] == rglcid[i])
00052         break;
00053     }
00054
00055     if (n < i)
00056     {
00057       continue;
00058     }
00059
00060     strFullPath.Format(_T("%s\\%d\\%s"), strPath, rglcid[i], strDLLName);
00061
00062     if (GetFileAttributes(strFullPath) != 0xFFFFFFFF)
00063     {
00064       fFoundDLL = TRUE;
00065       break;
00066     }
00067   }
00068
00069   if (fFoundDLL)
00070   {
00071     // Finally, attempt to load the library
00072     return LoadLibraryEx(strFullPath, NULL, 0);
00073   }
00074
00075   return NULL;
00076 }
00077
00078 HMODULE LoadLocalizedResourceDLL(const CString &strDLLName)
00079 {
00080   TCHAR szModulePath[_MAX_PATH + 1];
00081   GetModuleFileName(GetModuleHandle(NULL), szModulePath, _MAX_PATH);
00082
00083   // find path of current executable
00084   CString strModule = szModulePath;
00085   CString strPath = strModule.Left(strModule.ReverseFind(_T('\\')));
00086
00087   return LoadLocalizedResourceDLLUsingPath(strPath, strDLLName);
00088 }
00089
00090 const TCHAR *szLocalizedUIDll = _T("GuidGenUI.dll");
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // CGuidGenApp
00094
00095 BEGIN_MESSAGE_MAP(CGuidGenApp, CWinApp)
00096   //{{AFX_MSG_MAP(CGuidGenApp)
00097     // NOTE - the ClassWizard will add and remove mapping macros here.
00098     //    DO NOT EDIT what you see in these blocks of generated code!
00099   //}}AFX_MSG
00100   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00101 END_MESSAGE_MAP()
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // CGuidGenApp construction
00105
00106 CGuidGenApp::CGuidGenApp()
00107 {
00108   // TODO: add construction code here,
00109   // Place all significant initialization in InitInstance
00110 }
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // The one and only CGuidGenApp object
00114
00115 CGuidGenApp theApp;
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CGuidGenApp initialization
00119
00120 BOOL CGuidGenApp::InitInstance()
00121 {
00122   // Turn on the "termination on heap corruption" flag.
00123   (void)HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
00124
00125   SetRegistryKey(_T("Microsoft\\MFC 3.0 Samples"));
00126
00127   if (::CoInitialize(NULL) != S_OK)
00128   {
00129     AfxMessageBox(IDP_ERR_INIT_OLE);
00130     return FALSE;
00131   }
00132
00133   // Load the localized resource DLL for current locale
00134   HINSTANCE hInstRes = LoadLocalizedResourceDLL(szLocalizedUIDll);
00135   AfxSetResourceHandle(hInstRes);
00136
00137   // process command line arguments
00138   CWnd* pParentWnd = NULL;
00139   for (LPCTSTR lpsz = m_lpCmdLine; *lpsz != 0; ++lpsz)
00140   {
00141     if (*lpsz != '-' && *lpsz != '/')
00142       continue;
00143
00144     switch (lpsz[1])
00145     {
00146     // "/A" or "/a" allows the window to be parented to the IDE window
00147     // add GUIDGEN /A to your tools menu for easy access!
00148     case 'a':
00149     case 'A':
00150       pParentWnd = CWnd::GetForegroundWindow();
00151       break;
00152     }
00153   }
00154
00155   CGuidGenDlg dlg(pParentWnd);
00156   m_pMainWnd = &dlg;
00157   // ignore return value
00158   dlg.DoModal();
00159
00160   // Since the dialog has been closed, return FALSE so that we exit the
00161   //  application, rather than start the application's message pump.
00162   return FALSE;
00163 }
00164
00165 int CGuidGenApp::ExitInstance()
00166 {
00167   ::CoUninitialize();
00168
00169   return CWinApp::ExitInstance();
00170 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/buttondi.h Source File

  • ole
  • wordpad

buttondi.h

Go to the documentation of this file.
00001 // buttondi.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CButtonDialog dialog
00014
00015 class CButtonDialog : public CCSDialog
00016 {
00017 // Construction
00018 public:
00019   CButtonDialog(LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons,
00020     WORD wStyle, DWORD* pHelpIDs = NULL, CWnd* pParentWnd = NULL);
00021   ~CButtonDialog();
00022
00023 // Attributes
00024   CFont m_font;
00025 // Operations
00026   static INT_PTR DisplayMessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption,
00027     LPCTSTR lpszButtons, WORD wStyle, int nDef = 0, int nCancel = -1,
00028     DWORD* pHelpIDs = NULL, CWnd* pParentWnd = NULL);
00029
00030   void AddButton(CString& strButton) { m_strArray.Add(strButton);}
00031   void AddButtons(LPCTSTR lpszButton);
00032   void SetCancel(int nCancel)
00033     { ASSERT(nCancel < m_strArray.GetSize()); m_nCancel = nCancel;}
00034   void SetDefault(int nDef)
00035     { ASSERT(nDef < m_strArray.GetSize()); m_nDefButton = nDef;}
00036   void FillInHeader(LPDLGTEMPLATE lpDlgTmp);
00037
00038 // Overridables
00039   virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00040   virtual INT_PTR DoModal();
00041
00042 // Implementation
00043 protected:
00044   virtual const DWORD* GetHelpIDs() {return m_pHelpIDs;}
00045   DWORD* m_pHelpIDs;
00046   int m_nDefButton;
00047   int m_nCancel;
00048   HGLOBAL m_hDlgTmp;
00049   UINT m_nBaseID;
00050   WORD m_wStyle;
00051   CButton* m_pButtons;
00052   CStatic m_staticIcon;
00053   CStatic m_staticText;
00054   CString m_strCaption;
00055   CString m_strText;
00056   CStringArray m_strArray;
00057   CSize GetBaseUnits();
00058   LPCTSTR GetIconID(WORD wFlags);
00059   void PositionControls();
00060
00061   // Generated message map functions
00062   //{{AFX_MSG(CButtonDialog)
00063   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00064   virtual BOOL OnInitDialog();
00065   //}}AFX_MSG
00066   DECLARE_MESSAGE_MAP()
00067 };
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/CmnCtrl2.cpp Source File

  • general
  • CmnCtrl2

CmnCtrl2.cpp

Go to the documentation of this file.
00001 // CmnCtrl2.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "CmnCtrl2.h"
00014 #include "propsht.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CCmnCtrl2App
00024
00025 BEGIN_MESSAGE_MAP(CCmnCtrl2App, CWinApp)
00026   //{{AFX_MSG_MAP(CCmnCtrl2App)
00027   //}}AFX_MSG
00028   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CCmnCtrl2App construction
00033
00034 CCmnCtrl2App::CCmnCtrl2App()
00035 {
00036 }
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // The one and only CCmnCtrl2App object
00040
00041 CCmnCtrl2App theApp;
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CCmnCtrl2App initialization
00045
00046 BOOL CCmnCtrl2App::InitInstance()
00047 {
00048   AfxEnableControlContainer();
00049
00050   // Standard initialization
00051
00052   CAllControlsSheet   allcontrolssheet(_T("Common Controls Sample"));
00053   m_pMainWnd = &allcontrolssheet;
00054   allcontrolssheet.DoModal();
00055   return FALSE;
00056 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVisualStudioDemoApp Member List

This is the complete list of members for CVisualStudioDemoApp, including all inherited members.
CVisualStudioDemoApp() | CVisualStudioDemoApp |
ExitInstance() | CVisualStudioDemoApp | [virtual]
InitInstance() | CVisualStudioDemoApp | [virtual]
LoadCustomState() | CVisualStudioDemoApp | [virtual]
m_bHiColorIcons | CVisualStudioDemoApp |
m_pDocTemplateCpp | CVisualStudioDemoApp |
m_pStartDocTemplate | CVisualStudioDemoApp |
OnAppAbout() | CVisualStudioDemoApp |
OnHelpShowStart() | CVisualStudioDemoApp |
OnViewAppLook() | CVisualStudioDemoApp |
PreLoadState() | CVisualStudioDemoApp | [virtual]
SaveAllModified() | CVisualStudioDemoApp | [virtual]
SaveCustomState() | CVisualStudioDemoApp | [virtual]
~CVisualStudioDemoApp() | CVisualStudioDemoApp | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCProps.idl Source File

  • ole
  • TstCon
  • TCProps

TCProps.idl

Go to the documentation of this file.
00001 // TCProps.idl : IDL source for TCProps.dll
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 // This file will be processed by the MIDL tool to
00012 // produce the type library (TCProps.tlb) and marshalling code.
00013
00014 import "oaidl.idl";
00015 import "ocidl.idl";
00016
00017 [
00018   uuid( FFC3C462-18DE-11d1-8E2F-00C04FB68D60 ),
00019   version( 1.0 ),
00020   helpstring( "TCProps 1.0 Type Library" )
00021 ]
00022 library TCPropsLib
00023 {
00024   importlib("stdole32.tlb");
00025   importlib("stdole2.tlb");
00026
00027   [
00028     object,
00029     uuid( 3E6F10A8-E1D1-11d0-8E14-00C04FB68D60 ),
00030     dual,
00031     helpstring( "ITCExtendedControl Interface"),
00032     pointer_default( unique )
00033   ]
00034   interface ITCExtendedControl : IDispatch
00035   {
00036       [propput, id(0x80010000)]
00037       HRESULT Name( [in] BSTR bstrName );
00038       [propget, id(0x80010000)]
00039       HRESULT Name( [out, retval] BSTR* pbstrName );
00040       [propput, id(0x80010001)]
00041       HRESULT PositionX( [in] long x );
00042       [propget, id(0x80010001)]
00043       HRESULT PositionX( [out, retval] long* px );
00044       [propput, id(0x80010002)]
00045       HRESULT PositionY( [in] long y );
00046       [propget, id(0x80010002)]
00047       HRESULT PositionY( [out, retval] long* py );
00048       [propput, id(0x80010003)]
00049       HRESULT SizeX( [in] long x );
00050       [propget, id(0x80010003)]
00051       HRESULT SizeX( [out, retval] long* px );
00052       [propput, id(0x80010004)]
00053       HRESULT SizeY( [in] long y );
00054       [propget, id(0x80010004)]
00055       HRESULT SizeY( [out, retval] long* py );
00056
00057       [id(0x80010100)]
00058       HRESULT Activate();
00059       [id(0x80010101)]
00060       HRESULT Deactivate();
00061       [id(0x80010102)]
00062       HRESULT UIActivate();
00063       [id(0x80010103)]
00064       HRESULT UIDeactivate();
00065   };
00066
00067   [
00068     uuid( AB39F080-0F5D-11D1-8E2F-00C04FB68D60 ),
00069     helpstring( "TCExtPage Class" )
00070   ]
00071   coclass TCExtPage
00072   {
00073     interface IUnknown;
00074   };
00075 };
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPushApp Member List

This is the complete list of members for CPushApp, including all inherited members.
ExitInstance() | CPushApp
InitInstance() | CPushApp
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypedPtrMapView Member List

This is the complete list of members for CTypedPtrMapView, including all inherited members.
AddMapEntryToListBox(CString &strKey, CMyObject *pMyObject) | CTypedPtrMapView | [protected]
ConstructMyObjectFromView() | CTypedPtrMapView | [protected]
CTypedPtrMapView() | CTypedPtrMapView |
DoDataExchange(CDataExchange *pDX) | CTypedPtrMapView | [protected, virtual]
FindKeyInListBox(CString &strKey) | CTypedPtrMapView | [protected]
FormatListBoxEntry(CString &strKey, CMyObject *pMyObject) | CTypedPtrMapView | [protected, static]
GetDocument() | CTypedPtrMapView | [inline]
IDD enum value | CTypedPtrMapView |
m_ctlList | CTypedPtrMapView |
m_float | CTypedPtrMapView |
m_int | CTypedPtrMapView |
m_str | CTypedPtrMapView |
m_strKey | CTypedPtrMapView |
OnAddOrUpdate() | CTypedPtrMapView | [protected]
OnFind() | CTypedPtrMapView | [protected]
OnInitialUpdate() | CTypedPtrMapView |
OnRemove() | CTypedPtrMapView | [protected]
OnRemoveAll() | CTypedPtrMapView | [protected]
OnSelChangeList() | CTypedPtrMapView | [protected]
UpdateViewFromMyObject(CMyObject *pMyObject) | CTypedPtrMapView | [protected]
~CTypedPtrMapView() | CTypedPtrMapView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoddlg.cpp Source File

  • ole
  • autoclik
  • autodriv

autoddlg.cpp

Go to the documentation of this file.
00001 // autoddlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "autodriv.h"
00014 #include "autoclik.h"
00015 #include "autoddlg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CAutoDrivDlg dialog
00024
00025 CAutoDrivDlg::CAutoDrivDlg(CWnd* pParent /*=NULL*/)
00026   : CDialog(CAutoDrivDlg::IDD, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CAutoDrivDlg)
00029   m_szText = _T("");
00030   m_x = 0;
00031   m_y = 0;
00032   //}}AFX_DATA_INIT
00033   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00034   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00035 }
00036
00037
00038 void CAutoDrivDlg::DoDataExchange(CDataExchange* pDX)
00039 {
00040   CDialog::DoDataExchange(pDX);
00041   //{{AFX_DATA_MAP(CAutoDrivDlg)
00042   DDX_Text(pDX, IDC_EDITTEXT, m_szText);
00043   DDX_Text(pDX, IDC_EDITX, m_x);
00044   DDX_Text(pDX, IDC_EDITY, m_y);
00045   //}}AFX_DATA_MAP
00046 }
00047
00048 BEGIN_MESSAGE_MAP(CAutoDrivDlg, CDialog)
00049   //{{AFX_MSG_MAP(CAutoDrivDlg)
00050   ON_WM_PAINT()
00051   ON_WM_QUERYDRAGICON()
00052   ON_BN_CLICKED(IDC_CLOSE, OnClose)
00053   ON_WM_CREATE()
00054   ON_BN_CLICKED(IDC_ANIMATE_XY, OnAnimateXY)
00055   ON_BN_CLICKED(IDC_ANIMATEPOS, OnAnimatePos)
00056   ON_BN_CLICKED(IDC_SETALL, OnSetAll)
00057   ON_BN_CLICKED(IDC_SETPOS, OnSetPosition)
00058   ON_BN_CLICKED(IDC_SETTEXT, OnSetText)
00059   ON_BN_CLICKED(IDC_SETX, OnSetX)
00060   ON_BN_CLICKED(IDC_SETY, OnSetY)
00061   ON_BN_CLICKED(IDC_REFRESH, OnRefresh)
00062   ON_BN_CLICKED(IDC_GETALL, OnGetAll)
00063   ON_BN_CLICKED(IDC_GETPOS, OnGetPosition)
00064   //}}AFX_MSG_MAP
00065 END_MESSAGE_MAP()
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CAutoDrivDlg message handlers
00069
00070 BOOL CAutoDrivDlg::OnInitDialog()
00071 {
00072   CDialog::OnInitDialog();
00073   CenterWindow();
00074
00075   // TODO: Add extra initialization here
00076
00077   return TRUE;  // return TRUE  unless you set the focus to a control
00078 }
00079
00080 // If you add a minimize button to your dialog, you will need the code below
00081 //  to draw the icon.  For MFC applications using the document/view model,
00082 //  this is automatically done for you by the framework.
00083
00084 void CAutoDrivDlg::OnPaint()
00085 {
00086   if (IsIconic())
00087   {
00088     CPaintDC dc(this); // device context for painting
00089
00090     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00091
00092     // Center icon in client rectangle
00093     int cxIcon = GetSystemMetrics(SM_CXICON);
00094     int cyIcon = GetSystemMetrics(SM_CYICON);
00095     CRect rect;
00096     GetClientRect(&rect);
00097     int x = (rect.Width() - cxIcon + 1) / 2;
00098     int y = (rect.Height() - cyIcon + 1) / 2;
00099
00100     // Draw the icon
00101     dc.DrawIcon(x, y, m_hIcon);
00102   }
00103   else
00104   {
00105     CDialog::OnPaint();
00106   }
00107 }
00108
00109 // The system calls this to obtain the cursor to display while the user drags
00110 //  the minimized window.
00111 HCURSOR CAutoDrivDlg::OnQueryDragIcon()
00112 {
00113   return (HCURSOR) m_hIcon;
00114 }
00115
00116 int CAutoDrivDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
00117 {
00118   if (CDialog::OnCreate(lpCreateStruct) == -1)
00119     return -1;  // fail
00120
00121   if (!m_autoClikObject.CreateDispatch(_T("AutoClick.Document")))
00122   {
00123     AfxMessageBox(IDP_CANNOT_CREATE_AUTOCLIK);
00124     return -1;  // fail
00125   }
00126   m_autoClikObject.ShowWindow();
00127
00128   return 0;   // success
00129 }
00130
00131 void CAutoDrivDlg::OnClose()
00132 {
00133   EndDialog(0);
00134 }
00135
00136 void CAutoDrivDlg::OnAnimateXY()
00137 {
00138   for (short i = 10; i <= 100; i += 5)
00139   {
00140     m_autoClikObject.SetX(i);
00141     m_autoClikObject.SetY(i);
00142   }
00143 }
00144
00145 void CAutoDrivDlg::OnAnimatePos()
00146 {
00147   CClikPoint point;
00148   LPDISPATCH lpPointDiaptch = m_autoClikObject.GetPosition();
00149
00150   point.AttachDispatch(lpPointDiaptch);
00151   for (short i = 10; i <= 100; i += 5)
00152   {
00153     point.SetX(i);
00154     point.SetY(i);
00155     m_autoClikObject.SetPosition(lpPointDiaptch);
00156   }
00157 }
00158
00159 void CAutoDrivDlg::OnSetAll()
00160 {
00161   UpdateData(TRUE);
00162   m_autoClikObject.SetAllProps((short)m_x, (short)m_y, m_szText);
00163 }
00164
00165 void CAutoDrivDlg::OnSetPosition()
00166 {
00167   CClikPoint point;
00168   point.AttachDispatch(m_autoClikObject.GetPosition());
00169
00170   UpdateData(TRUE);
00171   point.SetX((short)m_x);
00172   point.SetY((short)m_y);
00173   m_autoClikObject.SetPosition(point.m_lpDispatch);
00174 }
00175
00176 void CAutoDrivDlg::OnSetText()
00177 {
00178   UpdateData(TRUE);
00179   m_autoClikObject.SetText(m_szText);
00180 }
00181
00182 void CAutoDrivDlg::OnSetX()
00183 {
00184   UpdateData(TRUE);
00185   m_autoClikObject.SetX((short)m_x);
00186 }
00187
00188 void CAutoDrivDlg::OnSetY()
00189 {
00190   UpdateData(TRUE);
00191   m_autoClikObject.SetY((short)m_y);
00192 }
00193
00194 void CAutoDrivDlg::OnRefresh()
00195 {
00196   m_autoClikObject.RefreshWindow();
00197 }
00198
00199 void CAutoDrivDlg::OnGetAll()
00200 {
00201   m_x = m_autoClikObject.GetX();
00202   m_y = m_autoClikObject.GetY();
00203   m_szText = m_autoClikObject.GetText();
00204   UpdateData(FALSE);
00205 }
00206
00207 void CAutoDrivDlg::OnGetPosition()
00208 {
00209   CClikPoint point;
00210   point.AttachDispatch(m_autoClikObject.GetPosition());
00211
00212   m_x = point.GetX();
00213   m_y = point.GetY();
00214   UpdateData(FALSE);
00215 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/childfrm.cpp Source File

  • ole
  • autoclik

childfrm.cpp

Go to the documentation of this file.
00001 // ChildFrm.cpp : implementation of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "ChildFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CChildFrame
00025
00026 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
00027
00028 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
00029   //{{AFX_MSG_MAP(CChildFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CChildFrame construction/destruction
00037
00038 CChildFrame::CChildFrame()
00039 {
00040   // TODO: add member initialization code here
00041
00042 }
00043
00044 CChildFrame::~CChildFrame()
00045 {
00046 }
00047
00048 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00049 {
00050   // TODO: Modify the Window class or styles here by modifying
00051   //  the CREATESTRUCT cs
00052
00053   return CMDIChildWnd::PreCreateWindow(cs);
00054 }
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CChildFrame diagnostics
00058
00059 #ifdef _DEBUG
00060 void CChildFrame::AssertValid() const
00061 {
00062   CMDIChildWnd::AssertValid();
00063 }
00064
00065 void CChildFrame::Dump(CDumpContext& dc) const
00066 {
00067   CMDIChildWnd::Dump(dc);
00068 }
00069
00070 #endif //_DEBUG
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mainfrm.h Source File

  • advanced
  • collect

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CFrameWnd
00013 {
00014 protected: // create from serialization only
00015   CMainFrame();
00016   DECLARE_DYNCREATE(CMainFrame)
00017
00018 // Attributes
00019 public:
00020   UINT m_nCurrentExample;
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   void OnExample(UINT nCmdID);
00027   void OnUpdateExampleUI(CCmdUI* pCmdUI);
00028   // ClassWizard generate virtual function overrides
00029   //{{AFX_VIRTUAL(CMainFrame)
00030   //}}AFX_VIRTUAL
00031
00032 // Implementation
00033 public:
00034   virtual ~CMainFrame();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:  // control bar embedded members
00041   CStatusBar  m_wndStatusBar;
00042   CToolBar    m_wndToolBar;
00043
00044 // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CMainFrame)
00047   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summinfo.cpp Source File

  • ole
  • drawcli

summinfo.cpp

Go to the documentation of this file.
00001 // summinfo.cpp : implementation of the CDrawDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include <winnls.h>
00014
00015 #include "drawcli.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 #include <objbase.h>
00023
00024 // the following header redefines
00025 // the DEFINE_GUID macro to actually allocate data
00026
00027 #include <initguid.h>
00028 #ifndef INITGUID
00029 #define INITGUID
00030 #endif
00031
00032 // the DEFINE_GUID macro in the following header now allocates data
00033 #include "summinfo.h"
00034
00035 const OLECHAR szSummInfo[] = OLESTR("\005SummaryInformation");
00036
00037 #if defined(_UNICODE)
00038 LPCSTR tcstocs(LPCTSTR lpctStr) {                       // typed char (WCHAR) to CHAR
00039   size_t numConv = 0;
00040   static CHAR strTemp[1024];
00041   wcstombs_s(&numConv, strTemp, 1024, lpctStr, 1024);
00042   return strTemp;
00043 }
00044 #else // !defined(_UNICODE)
00045 #define tcstocs(lpctStr) (LPCSTR)(lpctStr)
00046 #endif
00047
00048 CSummInfo::CSummInfo()
00049 {
00050   m_propSet.SetFormatVersion(0);
00051   DWORD dwOSVer;
00052   dwOSVer = (DWORD)MAKELONG(LOWORD(GetVersion()), 2);
00053   m_propSet.SetOSVersion(dwOSVer);
00054   m_propSet.SetClassID(FMTID_SummaryInformation);
00055   m_pSection = m_propSet.AddSection(FMTID_SummaryInformation);
00056   UINT cp = GetACP();
00057   m_pSection->Set(PID_CODEPAGE, (void*)&cp, VT_I2);
00058   SetTitle(_T(""));
00059   SetSubject(_T(""));
00060   SetAuthor(_T(""));
00061   SetKeywords(_T(""));
00062   SetComments(_T(""));
00063   SetTemplate(_T(""));
00064   SetLastAuthor(_T(""));
00065   m_pSection->Set(PIDSI_REVNUMBER, (void*)_T("0"), VT_LPSTR);
00066   FILETIME zeroTime = {0L, 0L};
00067   m_pSection->Set(PIDSI_EDITTIME, (void*)&zeroTime, VT_FILETIME);
00068   m_pSection->Set(PIDSI_LASTPRINTED, (void*)&zeroTime, VT_FILETIME);
00069   m_pSection->Set(PIDSI_LASTSAVE_DTM, (void*)&zeroTime, VT_FILETIME);
00070   m_pSection->Set(PIDSI_CREATE_DTM, (void*)&zeroTime, VT_FILETIME);
00071   SetNumPages(0);
00072   SetNumWords(0);
00073   SetNumChars(0);
00074   SetAppname(_T(""));
00075   SetSecurity(0);
00076 }
00077
00078 BOOL CSummInfo::SetTitle(LPCTSTR szTitle)
00079 {
00080   return m_pSection->Set(PIDSI_TITLE, (void*)tcstocs(szTitle), VT_LPSTR);
00081 }
00082
00083 CString CSummInfo::GetTitle()
00084 {
00085   return CString((LPCSTR)m_pSection->Get(PIDSI_TITLE));
00086 }
00087
00088 BOOL CSummInfo::SetSubject(LPCTSTR szSubject)
00089 {
00090   return m_pSection->Set(PIDSI_SUBJECT,
00091     (void*)tcstocs(szSubject), VT_LPSTR);
00092 }
00093
00094 CString CSummInfo::GetSubject()
00095 {
00096   return CString((LPCSTR)m_pSection->Get(PIDSI_SUBJECT));
00097 }
00098
00099 BOOL CSummInfo::SetAuthor(LPCTSTR szAuthor)
00100 {
00101   return m_pSection->Set(PIDSI_AUTHOR,
00102     (void*)tcstocs(szAuthor), VT_LPSTR);
00103 }
00104
00105 CString CSummInfo::GetAuthor()
00106 {
00107   return CString((LPCSTR)m_pSection->Get(PIDSI_AUTHOR));
00108 }
00109
00110 BOOL CSummInfo::SetKeywords(LPCTSTR szKeywords)
00111 {
00112   return m_pSection->Set(PIDSI_KEYWORDS,
00113     (void*)tcstocs(szKeywords), VT_LPSTR);
00114 }
00115
00116 CString CSummInfo::GetKeywords()
00117 {
00118   return CString((LPCSTR)m_pSection->Get(PIDSI_KEYWORDS));
00119 }
00120
00121 BOOL CSummInfo::SetComments(LPCTSTR szComments)
00122 {
00123   return m_pSection->Set(PIDSI_COMMENTS,
00124     (void*)tcstocs(szComments), VT_LPSTR);
00125 }
00126
00127 CString CSummInfo::GetComments()
00128 {
00129   return CString((LPCSTR)m_pSection->Get(PIDSI_COMMENTS));
00130 }
00131
00132 BOOL CSummInfo::SetTemplate(LPCTSTR szTemplate)
00133 {
00134   return m_pSection->Set(PIDSI_TEMPLATE,
00135     (void*)tcstocs(szTemplate), VT_LPSTR);
00136 }
00137
00138 CString CSummInfo::GetTemplate()
00139 {
00140   return CString((LPCSTR)m_pSection->Get(PIDSI_TEMPLATE));
00141 }
00142
00143 BOOL CSummInfo::SetLastAuthor(LPCTSTR szLastAuthor)
00144 {
00145   return m_pSection->Set(PIDSI_LASTAUTHOR,
00146     (void*)tcstocs(szLastAuthor), VT_LPSTR);
00147 }
00148
00149 CString CSummInfo::GetLastAuthor()
00150 {
00151   return CString((LPCSTR)m_pSection->Get(PIDSI_LASTAUTHOR));
00152 }
00153
00154 BOOL CSummInfo::IncrRevNum()
00155 {
00156   ULONG count;
00157   _stscanf_s((LPCTSTR)GetRevNum(), _T("%lu"), &count);
00158   count++;
00159   TCHAR buff[20];
00160   _stprintf_s(buff, 20, _T("%lu"), count);
00161   return m_pSection->Set(PIDSI_REVNUMBER, (void*)buff, VT_LPSTR);
00162 }
00163
00164 CString CSummInfo::GetRevNum()
00165 {
00166   return CString((LPCSTR)m_pSection->Get(PIDSI_REVNUMBER));
00167 }
00168
00169 void CSummInfo::StartEditTimeCount()
00170 {
00171   FILETIME now;
00172   CoFileTimeNow(&now);
00173   startEdit = *(__int64*)&now;
00174 }
00175
00176 BOOL CSummInfo::AddCountToEditTime()
00177 {
00178   FILETIME now;
00179   CoFileTimeNow(&now);
00180   __int64 currTime = *(__int64*)&now;
00181   __int64 thisSession = currTime - startEdit;
00182   __int64 lastTotal = *(__int64*)m_pSection->Get(PIDSI_EDITTIME);
00183   __int64 newTotal = lastTotal + thisSession;
00184   return m_pSection->Set(PIDSI_EDITTIME, (void*)&newTotal, VT_FILETIME);
00185 }
00186
00187 CString CSummInfo::GetEditTime()
00188 {
00189   FILETIME now;
00190   CoFileTimeNow(&now);
00191   __int64 currTime = *(__int64*)&now;
00192   __int64 thisSession = currTime - startEdit;
00193   __int64 lastTotal = *(__int64*)m_pSection->Get(PIDSI_EDITTIME);
00194   __int64 newTotal = lastTotal + thisSession;
00195   ULONG editMinutes = (ULONG)(newTotal/600000000);
00196
00197   TCHAR buff[20];
00198   _stprintf_s(buff, 20, _T("%lu min"), editMinutes);
00199   return CString(buff);
00200 }
00201
00202 BOOL CSummInfo::RecordPrintDate()
00203 {
00204   FILETIME printDate;
00205   CoFileTimeNow(&printDate);
00206   return m_pSection->Set(PIDSI_LASTPRINTED,
00207     (void*)&printDate, VT_FILETIME);
00208 }
00209
00210 CString CSummInfo::GetLastPrintDate()
00211 {
00212   FILETIME* pPrintDate = (FILETIME*)m_pSection->Get(PIDSI_LASTPRINTED);
00213   if ((pPrintDate == NULL) ||
00214     ((pPrintDate->dwLowDateTime == 0L) &&
00215      (pPrintDate->dwHighDateTime == 0L)  ))
00216     return CString(_T(""));
00217   else
00218   {
00219     COleDateTime tempDate = *pPrintDate;
00220     return tempDate.Format();
00221   }
00222 }
00223
00224 BOOL CSummInfo::RecordCreateDate()
00225 {
00226   FILETIME createDate;
00227   CoFileTimeNow(&createDate);
00228   return m_pSection->Set(PIDSI_CREATE_DTM,
00229     (void*)&createDate, VT_FILETIME);
00230 }
00231
00232 CString CSummInfo::GetCreateDate()
00233 {
00234   FILETIME* pCreateDate = (FILETIME*)m_pSection->Get(PIDSI_CREATE_DTM);
00235   if ((pCreateDate == NULL) ||
00236     ((pCreateDate->dwLowDateTime == 0L) &&
00237      (pCreateDate->dwHighDateTime == 0L)  ))
00238     return CString(_T(""));
00239   else
00240   {
00241     COleDateTime tempDate = *pCreateDate;
00242     return tempDate.Format();
00243   }
00244 }
00245
00246 BOOL CSummInfo::RecordSaveDate()
00247 {
00248   FILETIME saveDate;
00249   CoFileTimeNow(&saveDate);
00250   return m_pSection->Set(PIDSI_LASTSAVE_DTM,
00251     (void*)&saveDate, VT_FILETIME);
00252 }
00253
00254 CString CSummInfo::GetLastSaveDate()
00255 {
00256   FILETIME *pSaveDate = (FILETIME*)m_pSection->Get(PIDSI_LASTSAVE_DTM);
00257   if ((pSaveDate == NULL) ||
00258     ((pSaveDate->dwLowDateTime == 0L) &&
00259      (pSaveDate->dwHighDateTime == 0L)  ))
00260     return CString(_T(""));
00261   else
00262   {
00263     COleDateTime tempDate = *pSaveDate;
00264     return tempDate.Format();
00265   }
00266 }
00267
00268 BOOL CSummInfo::SetNumPages(ULONG nPages)
00269 {
00270   return m_pSection->Set(PIDSI_PAGECOUNT, (void*)&nPages, VT_I4);
00271 }
00272
00273 CString CSummInfo::GetNumPages()
00274 {
00275   TCHAR buff[20];
00276   ULONG* pNumPages = (ULONG*)m_pSection->Get(PIDSI_PAGECOUNT);
00277   if (pNumPages != NULL)
00278   {
00279     _stprintf_s(buff,20, _T("%lu"), *pNumPages);
00280     return CString(buff);
00281   }
00282   else
00283     return CString(_T(""));
00284 }
00285
00286 BOOL CSummInfo::SetNumWords(ULONG nWords)
00287 {
00288   return m_pSection->Set(PIDSI_WORDCOUNT, (void*)&nWords, VT_I4);
00289 }
00290
00291 CString CSummInfo::GetNumWords()
00292 {
00293   TCHAR buff[20];
00294   ULONG* pNumWords = (ULONG*)m_pSection->Get(PIDSI_WORDCOUNT);
00295   if (pNumWords != NULL)
00296   {
00297     _stprintf_s(buff, 20,_T("%lu"), *pNumWords);
00298     return CString(buff);
00299   }
00300   else
00301     return CString(_T(""));
00302 }
00303
00304 BOOL CSummInfo::SetNumChars(ULONG nChars)
00305 {
00306   return m_pSection->Set(PIDSI_CHARCOUNT, (void*)&nChars, VT_I4);
00307 }
00308
00309 CString CSummInfo::GetNumChars()
00310 {
00311   TCHAR buff[20];
00312   ULONG* pNumChars = (ULONG*)m_pSection->Get(PIDSI_CHARCOUNT);
00313   if (pNumChars != NULL)
00314   {
00315     _stprintf_s(buff, 20,_T("%lu"), *pNumChars);
00316     return CString(buff);
00317   }
00318   else
00319     return CString(_T(""));
00320 }
00321
00322 BOOL CSummInfo::SetAppname(LPCTSTR szAppname)
00323 {
00324   return m_pSection->Set(PIDSI_APPNAME,
00325     (void*)tcstocs(szAppname), VT_LPSTR);
00326 }
00327
00328 CString CSummInfo::GetAppname()
00329 {
00330   return CString((LPCSTR)m_pSection->Get(PIDSI_APPNAME));
00331 }
00332
00333 BOOL CSummInfo::SetSecurity(ULONG nLevel)
00334 {
00335   return m_pSection->Set(PID_SECURITY, (void*)&nLevel, VT_I4);
00336 }
00337
00338 CString CSummInfo::GetSecurity()
00339 {
00340   TCHAR buff[20];
00341   ULONG* pSecurity = (ULONG*)m_pSection->Get(PID_SECURITY);
00342   if (pSecurity != NULL)
00343   {
00344     _stprintf_s(buff, 20,_T("%lu"), *pSecurity);
00345     return CString(buff);
00346   }
00347   else
00348     return CString(_T(""));
00349 }
00350
00351 BOOL CSummInfo::WriteToStorage(LPSTORAGE lpRootStg)
00352 {
00353   if (lpRootStg != NULL)
00354   {
00355     LPSTREAM lpStream = NULL;
00356     if (FAILED(lpRootStg->CreateStream(szSummInfo,
00357            STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE,
00358            0, 0, &lpStream)))
00359     {
00360       TRACE(_T("CreateStream failed\n"));
00361       return FALSE;
00362     }
00363     else
00364     {
00365       if(!m_propSet.WriteToStream(lpStream))
00366       {
00367         TRACE(_T("WriteToStream failed\n"));
00368         return FALSE;
00369       }
00370       lpRootStg->Commit(STGC_DEFAULT);
00371       lpStream->Release();
00372       return TRUE;
00373     }
00374   }
00375   return FALSE;
00376 }
00377
00378 BOOL CSummInfo::ReadFromStorage(LPSTORAGE lpRootStg)
00379 {
00380   if (lpRootStg != NULL)
00381   {
00382     LPSTREAM lpStream = NULL;
00383
00384     if (FAILED(lpRootStg->OpenStream(szSummInfo,
00385            NULL, STGM_SHARE_EXCLUSIVE|STGM_READ,
00386            0, &lpStream)))
00387     {
00388       TRACE(_T("OpenStream failed\n"));
00389       return FALSE;
00390     }
00391     else
00392     {
00393       if (!m_propSet.ReadFromStream(lpStream))
00394       {
00395         TRACE(_T("ReadFromStream failed\n"));
00396         return FALSE;
00397       }
00398       m_pSection = m_propSet.GetSection(FMTID_SummaryInformation);
00399       lpStream->Release();
00400       return TRUE;
00401     }
00402   }
00403   return FALSE;
00404 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHelloApp Member List

This is the complete list of members for CHelloApp, including all inherited members.
InitInstance() CHelloApp [inline, virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CToolsPalette Member List

This is the complete list of members for CToolsPalette, including all inherited members.
AdjustLocations() | CToolsPalette | [virtual]
AllowShowOnList() const | CToolsPalette | [inline, virtual]
CalcSize(BOOL bVertDock) | CToolsPalette | [virtual]
CToolsPalette() | CToolsPalette |
DoPaint(CDC *pDC) | CToolsPalette | [virtual]
GetColumns() const | CToolsPalette | [inline]
m_nColumns | CToolsPalette | [protected]
m_rectInfo | CToolsPalette | [protected]
SetColumns(int nColumns) | CToolsPalette |
~CToolsPalette() | CToolsPalette | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRecalcDoc Member List

This is the complete list of members for CRecalcDoc, including all inherited members.
CRecalcDoc() | CRecalcDoc | [protected]
m_bRecalcInProgress | CRecalcDoc |
m_bRecalcNeeded | CRecalcDoc |
m_hEventKillRecalcThread | CRecalcDoc |
m_hEventRecalcDone | CRecalcDoc |
m_hEventRecalcThreadKilled | CRecalcDoc |
m_hEventStartRecalc | CRecalcDoc |
m_nCurrentDemoCommand | CRecalcDoc |
m_nInt1 | CRecalcDoc |
m_nInt2 | CRecalcDoc |
m_nRecalcSpeedSeconds | CRecalcDoc |
m_nSum | CRecalcDoc |
m_pRecalcWorkerThread | CRecalcDoc |
m_recalcThreadInfo | CRecalcDoc |
OnDemoThread(UINT nCmdID) | CRecalcDoc | [protected]
OnKillWorkerThread() | CRecalcDoc | [protected]
OnNewDocument() | CRecalcDoc | [protected, virtual]
OnRecalcSpeed() | CRecalcDoc | [protected]
OnSaveDocument(LPCTSTR lpszPathName) | CRecalcDoc | [virtual]
OnUpdateDemoThread(CCmdUI *pCmdUI) | CRecalcDoc | [protected]
OnUpdateKillWorkerThread(CCmdUI *pCmdUI) | CRecalcDoc | [protected]
RecalcDone() | CRecalcDoc |
RecalcInSecondThread() | CRecalcDoc |
RecalcInSingleThread() | CRecalcDoc |
Serialize(CArchive &ar) | CRecalcDoc | [virtual]
UpdateInt1AndInt2(int n1, int n2, BOOL bForceRecalc) | CRecalcDoc |
~CRecalcDoc() | CRecalcDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/speakn.h Source File

  • advanced
  • speakn

speakn.h

Go to the documentation of this file.
00001 // speakn.h : Declares the class interfaces for the SpeakN application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "resource.h"       // resource IDs
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CSpeakNDlg:
00016 //   The main user interface to this application is just one big dialog
00017
00018 class CSpeakNDlg : public CDialog
00019 {
00020 // Constructors
00021 public:
00022   CSpeakNDlg(BOOL bNoPen);
00023   BOOL LoadLesson(LPCTSTR lpLessonName);
00024
00025   //{{AFX_DATA(CSpeakNDlg)
00026   enum { IDD = IDD_PENDIALOG };
00027   CButton m_buttonNext;
00028   //}}AFX_DATA
00029
00030 // Operations
00031   void        AdvanceLesson();
00032
00033 // Attributes (the current question/lesson)
00034   // current question (from resource)
00035   CString         m_targetWord;           // target word (upper case)
00036   CString         m_targetRes;
00037
00038   // resource containing a list of target words and associated bitmap names, in ANSI
00039   LPCSTR         m_lpszNextQuestion; // empty string => done
00040
00041 // Implementation
00042 protected:
00043   void DoDataExchange(CDataExchange* pDX);
00044
00045   BOOL m_bNoPen;      // TRUE => no PenWindows (run less functional)
00046   BOOL m_bNoAnswerCheck;  // TRUE => disable test for answer
00047
00048   // special controls
00049   CFont           m_biggerFont;
00050   CBitmapButton   m_pictureButton; // main bitmap done as a special button
00051   CBitmapButton   m_replayButton; // bitmap button for replay sound
00052
00053   // normal Windows controls
00054   CStatic&    StatusFace()    // face which smiles or frowns
00055           { return *(CStatic*)GetDlgItem(IDC_STATUS_FACE); }
00056   CStatic&    PromptText()    // prompt area
00057           { return *(CStatic*)GetDlgItem(IDC_PROMPT_TEXT); }
00058
00059   void        SetAnswerText(LPCTSTR lpsz);
00060   CEdit&      InputEdit()     // user input for answer text
00061                 //  (a normal Edit or a Pen Boxed Edit)
00062           { return *(CEdit*)GetDlgItem(IDC_INPUT_EDIT); }
00063
00064   // message handlers
00065   //{{AFX_MSG(CSpeakNDlg)
00066   virtual BOOL OnInitDialog();
00067   afx_msg void OnReplaySound();
00068   afx_msg void OnUpdateStatus();
00069   virtual void OnOK();        // Guess
00070   virtual void OnGiveUp();
00071   //}}AFX_MSG
00072   DECLARE_MESSAGE_MAP()
00073 };
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CSpeakNApp:
00077
00078 class CSpeakNApp : public CWinApp
00079 {
00080 public:
00081   BOOL InitInstance();
00082 };
00083
00084 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/view.cpp Source File

  • ole
  • oleview

view.cpp

Go to the documentation of this file.
00001 // view.cpp
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 // Implements CDropTargetView which is an override of CView with appropriate
00014 // COleDropTarget support.
00015 //
00016 // CDropTargetView, CObjTreeView, and CInterfaceView all are derived from this class
00017 //
00018
00019 // This class is never used.....but it is interesting
00020
00021 #include "stdafx.h"
00022 #include "OleView.h"
00023
00024 #ifdef _DEBUG
00025 #undef THIS_FILE
00026 static char BASED_CODE THIS_FILE[] = __FILE__;
00027 #endif
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CDropTargetView
00031
00032 IMPLEMENT_DYNAMIC(CDropTargetView, CView)
00033
00034 BEGIN_MESSAGE_MAP(CDropTargetView, CView)
00035   //{{AFX_MSG_MAP(CDropTargetView)
00036   ON_WM_CREATE()
00037   //}}AFX_MSG_MAP
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CDropTargetView construction/destruction
00042
00043 CDropTargetView::CDropTargetView()
00044 {
00045 }
00046
00047 int CDropTargetView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00048 {
00049   if (CView::OnCreate(lpCreateStruct) == -1)
00050     return -1;
00051 #if _MFC_VER > 0x0210
00052   m_dropTarget.Register( this ) ;
00053 #endif
00054   return 0;
00055 }
00056
00057 #if _MFC_VER > 0x0210
00058 DROPEFFECT CDropTargetView::OnDragEnter(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)
00059 {
00060   return OnDragOver(pDataObject, dwKeyState, point);
00061 }
00062
00063
00064 DROPEFFECT CDropTargetView::OnDragOver(COleDataObject*, DWORD dwKeyState, CPoint)
00065 {
00066   DROPEFFECT de = DROPEFFECT_NONE;
00067
00068   // check for force link
00069   if ((dwKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
00070     de = DROPEFFECT_LINK;
00071   // check for force copy
00072   else if ((dwKeyState & MK_CONTROL) == MK_CONTROL)
00073     de = DROPEFFECT_COPY;
00074   // check for force move
00075   else if ((dwKeyState & MK_ALT) == MK_ALT)
00076     de = DROPEFFECT_MOVE;
00077   // default -- recommended action is move
00078   else
00079     de = DROPEFFECT_MOVE;
00080
00081   return de;
00082 }
00083
00084 void CDropTargetView::OnDragLeave()
00085 {
00086   CView::OnDragLeave() ;
00087 }
00088
00089 #pragma warning(disable : 4189)
00090 BOOL CDropTargetView::OnDrop(COleDataObject* pDataObject,DROPEFFECT dropEffect, CPoint point)
00091 {
00092 /*
00093   LPDATAOBJECT    pDO = pDataObject->m_lpDataObject ;
00094
00095   pDO->AddRef() ;
00096   IDisplayInterface( theApp.m_pMainWnd->GetSafeHwnd(),
00097              pDO,
00098              (LPIID)&IID_IDataObject,
00099              (LPTSTR)(LPCSTR)"Drag and Drop data object" ) ;
00100   pDO->Release() ;
00101 */
00102
00103   COle2ViewDoc*   pDoc = GetDocument() ;
00104
00105 #if 0
00106   pDoc->m_clsidCur = CLSID_NULL ;
00107
00108   HRESULT hr = pDataObject->m_lpDataObject->QueryInterface( IID_IUnknown, (LPVOID*)&pDoc->m_pIUnknown );
00109   if (FAILED(hr))
00110   {
00111     ErrorMessage( _T("QueryInterface( IID_IUnknown ) failed on the data object."), hr ) ;
00112     pDoc->m_pIUnknown = NULL ;
00113   }
00114
00115   pDoc->m_pIUnknown->AddRef() ;
00116
00117   pDoc->m_fTypeLib = FALSE ;
00118   ((CMainFrame*)theApp.m_pMainWnd)->m_pObjListView->m_lb.SetCurSel( -1 ) ;
00119   pDoc->m_szObjectCur = "Drag and Drop data object" ;
00120   pDoc->UpdateAllViews( NULL, UPD_NOOBJECTVIEW | UPD_NORELOAD ) ;
00121
00122 #endif
00123
00124   return CView::OnDrop( pDataObject, dropEffect, point ) ;
00125 }
00126 #pragma warning(default : 4189)
00127 #endif
00128 #ifdef _DEBUG
00129
00130 COle2ViewDoc* CDropTargetView::GetDocument() // non-debug version is inline
00131 {
00132   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COle2ViewDoc)));
00133   return (COle2ViewDoc*) m_pDocument;
00134 }
00135
00136 #endif //_DEBUG
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/ConfigDlg.cpp Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

ConfigDlg.cpp

Go to the documentation of this file.
00001 // ConfigDlg.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "DllScreenCap.h"
00013 #include "ConfigDlg.h"
00014
00015
00016 // CConfigDlg dialog
00017
00018 IMPLEMENT_DYNAMIC(CConfigDlg, CDialog)
00019 CConfigDlg::CConfigDlg(BOOL bFullScreen, LPCTSTR szPath, CWnd* pParent /*=NULL*/)
00020   : CDialog(CConfigDlg::IDD, pParent)
00021   , m_strPath(szPath)
00022   , m_nFullScreen(bFullScreen)
00023 {
00024 }
00025
00026 CConfigDlg::~CConfigDlg()
00027 {
00028 }
00029
00030 void CConfigDlg::DoDataExchange(CDataExchange* pDX)
00031 {
00032   CDialog::DoDataExchange(pDX);
00033   DDX_Text(pDX, IDC_PATH, m_strPath);
00034   DDV_MaxChars(pDX, m_strPath, 255);
00035   DDX_Radio(pDX, IDC_WINDOW, m_nFullScreen);
00036 }
00037
00038
00039 BEGIN_MESSAGE_MAP(CConfigDlg, CDialog)
00040 ON_BN_CLICKED(IDC_BROWSE, OnBnClickedBrowse)
00041 END_MESSAGE_MAP()
00042
00043
00044 // CConfigDlg message handlers
00045
00046 void CConfigDlg::OnBnClickedBrowse(void)
00047 {
00048   HRESULT hr;
00049   LPITEMIDLIST pItemList;
00050   BROWSEINFO browseinfo;
00051   TCHAR path[MAX_PATH];
00052   hr = ::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
00053   if (FAILED(hr)) {
00054     TRACE("CoInitEx failed: %x\n", hr);
00055     return;
00056   }
00057
00058   IMalloc *pMalloc = NULL;
00059   hr = SHGetMalloc(&pMalloc);
00060   if (FAILED(hr)) {
00061     TRACE("Can't retrieve system's IMalloc interface: %x\n", hr);
00062     return;
00063   }
00064   ENSURE(pMalloc);
00065
00066   memset(&browseinfo, 0, sizeof(BROWSEINFO));
00067   CString strCaption;
00068   browseinfo.hwndOwner = GetSafeHwnd();
00069   browseinfo.pszDisplayName = path;
00070   browseinfo.ulFlags = BIF_NEWDIALOGSTYLE | BIF_RETURNONLYFSDIRS;
00071   strCaption.LoadString(IDS_CONFIG_CAPTION);
00072   browseinfo.lpszTitle = strCaption;
00073
00074   pItemList = ::SHBrowseForFolder(&browseinfo);
00075   if (pItemList) {
00076     // Behold the elegance of CStrBuf!
00077     ::SHGetPathFromIDList(pItemList, CStrBuf(m_strPath, MAX_PATH));
00078     pMalloc->Free(pItemList);
00079     UpdateData(FALSE);
00080   }
00081   pMalloc->Release();
00082   pMalloc = NULL;
00083   ::CoUninitialize();
00084 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/ChildFrm.h Source File

  • vc2008fp
  • WorkSpaceToolBar

ChildFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CMDIChildWnd CMDIChildWndEx
00014
00015 class CChildFrame : public CMDIChildWnd
00016 {
00017   DECLARE_DYNCREATE(CChildFrame)
00018 public:
00019   CChildFrame();
00020
00021 // Attributes
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029
00030 // Implementation
00031 public:
00032   virtual ~CChildFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabbedViewDoc Member List

This is the complete list of members for CTabbedViewDoc, including all inherited members.
CTabbedViewDoc() | CTabbedViewDoc | [protected]
OnNewDocument() | CTabbedViewDoc | [virtual]
Serialize(CArchive &ar) | CTabbedViewDoc | [virtual]
~CTabbedViewDoc() | CTabbedViewDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CScribbleView Member List

This is the complete list of members for CScribbleView, including all inherited members.
CScribbleView() | CScribbleView | [protected]
GetDocument() | CScribbleView | [inline]
m_pStrokeCur | CScribbleView | [protected]
m_ptPrev | CScribbleView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CScribbleView | [protected, virtual]
OnCancelEditSrvr() | CScribbleView | [protected]
OnDraw(CDC *pDC) | CScribbleView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CScribbleView | [protected, virtual]
OnInitialUpdate() | CScribbleView | [virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CScribbleView | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CScribbleView | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CScribbleView | [protected]
OnPrepareDC(CDC *pDC, CPrintInfo *pInfo=NULL) | CScribbleView | [virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CScribbleView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CScribbleView | [protected, virtual]
OnSize(UINT nType, int cx, int cy) | CScribbleView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CScribbleView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CScribbleView | [virtual]
PrintPageHeader(CDC *pDC, CPrintInfo *pInfo, CString &strHeader) | CScribbleView |
PrintTitlePage(CDC *pDC, CPrintInfo *pInfo) | CScribbleView |
ResyncScrollSizes() | CScribbleView |
~CScribbleView() | CScribbleView | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/mainfrm.h Source File

  • controls
  • contain

mainfrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 class CMainFrame : public CMDIFrameWnd
00013 {
00014   DECLARE_DYNAMIC(CMainFrame)
00015 public:
00016   CMainFrame();
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CMainFrame)
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028   //}}AFX_VIRTUAL
00029
00030 // Implementation
00031 public:
00032   virtual ~CMainFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:  // control bar embedded members
00039   CStatusBar  m_wndStatusBar;
00040   CToolBar    m_wndToolBar;
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CMainFrame)
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046     // NOTE - the ClassWizard will add and remove member functions here.
00047     //    DO NOT EDIT what you see in these blocks of generated code!
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/resource.h Source File

  • vc2008fp
  • NewControls

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by NewControls.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDS_ABOUTBOX                    101
00007 #define IDD_NewControls_DIALOG          102
00008 #define IDS_CAPTION                     102
00009 #define IDD_PAGE1                       107
00010 #define IDD_PAGE2                       108
00011 #define IDD_PAGE3                       109
00012 #define IDD_PAGE4                       110
00013 #define IDD_PAGE5                       111
00014 #define IDD_PAGE6                       113
00015 #define IDR_MAINFRAME                   128
00016 #define IDB_BTN1                        129
00017 #define IDB_BTN1_HOT                    130
00018 #define IDC_CURSOR                      130
00019 #define IDR_MENU1                       131
00020 #define IDC_BORDER                      131
00021 #define IDB_GLOBE                       132
00022 #define IDR_DIALOG_MENU                 132
00023 #define IDB_PLAY                        133
00024 #define IDB_STOP                        134
00025 #define IDB_STOP_HOT                    135
00026 #define IDB_PLAY_HOT                    136
00027 #define IDB_IMAGE                       137
00028 #define IDB_TEST_BITMAP                 138
00029 #define IDB_BACK                        140
00030 #define IDR_TOOLBAR_MENU_IMAGES         141
00031 #define IDB_ICONS                       143
00032 #define IDB_CHECK                       144
00033 #define IDB_RADIO_ON                    146
00034 #define IDB_PROPICONS                   147
00035 #define IDB_BUTTONS                     149
00036 #define IDB_CHECKNO                     151
00037 #define IDB_RADIO_OFF                   152
00038 #define IDB_CHECK32                     153
00039 #define IDB_CHECKNO32                   154
00040 #define IDB_RADIO_OFF32                 155
00041 #define IDB_RADIO_ON32                  156
00042 #define IDB_BTN1_HOT_32                 157
00043 #define IDB_BTN1_32                     158
00044 #define IDB_ICONS32                     159
00045 #define IDD_ABOUTBOX                    999
00046 #define IDC_BUTTON                      1000
00047 #define IDC_MAIL                        1000
00048 #define IDC_IMAGE                       1001
00049 #define IDC_URL                         1001
00050 #define IDC_VERSION                     1002
00051 #define IDC_IMAGE_LOCATION              1002
00052 #define IDC_BUTTON_MULTLINE             1003
00053 #define IDC_TOOLTIP                     1008
00054 #define IDC_SET_TOOLTIP                 1009
00055 #define IDC_BUTTON_MENU                 1013
00056 #define IDC_RIGHT_ARROW                 1014
00057 #define IDC_EDIT_LIST                   1015
00058 #define IDC_BUTTON_URL                  1016
00059 #define IDC_IMAGE_AREA                  1021
00060 #define IDC_EDIT_IMAGE                  1022
00061 #define IDC_COLOR_AREA                  1023
00062 #define IDC_PRESSED_ON_MENU             1023
00063 #define IDC_COLOR_DLG                   1024
00064 #define IDC_TRUETYPE                    1024
00065 #define IDC_MENU_DEFAULT_CLICK          1024
00066 #define IDC_COLOR_PICKER                1025
00067 #define IDC_RASTER                      1025
00068 #define IDC_DEVICE                      1026
00069 #define IDC_RGB                         1027
00070 #define IDC_DRAW_USING_FONT             1027
00071 #define IDC_RGB_COLOR_BAR               1028
00072 #define IDC_BACKGROUND                  1029
00073 #define IDC_RGB_DLG                     1029
00074 #define IDC_XP_BUTTONS                  1030
00075 #define IDC_CHECK_BUTTON                1038
00076 #define IDC_FONT                        1039
00077 #define IDC_BORDER_LABEL                1040
00078 #define IDC_RADIO1                      1041
00079 #define IDC_RADIO2                      1042
00080 #define IDC_RGB_COLOR_BAR2              1042
00081 #define IDC_RADIO3                      1043
00082 #define IDC_COLOR_PALETTE               1043
00083 #define IDC_RADIO4                      1044
00084 #define IDC_RGB_COLOR_PALETTE           1044
00085 #define IDC_LIST1                       1044
00086 #define IDC_MASKEDIT1                   1045
00087 #define IDC_MASKEDIT2                   1046
00088 #define IDC_MASKEDIT3                   1047
00089 #define IDC_MASKEDIT4                   1048
00090 #define IDC_MASKEDIT5                   1049
00091 #define IDC_BUTTON1                     1060
00092 #define IDC_VALUE1                      1061
00093 #define IDC_VALUE2                      1062
00094 #define IDC_VALUE3                      1063
00095 #define IDC_VALUE4                      1064
00096 #define IDC_VALUE5                      1065
00097 #define IDC_PROPLIST_LOCATION           1067
00098 #define IDC_HEADER                      1068
00099 #define IDC_DOT_NET_LOOK                1069
00100 #define IDC_DESCRIPTION_AREA            1070
00101 #define IDC_MARK_SORTED_COLUMN          1071
00102 #define IDC_COLOR_ROWS                  1072
00103 #define IDC_LUM                         1072
00104 #define IDC_MODIFY_FONT                 1073
00105 #define IDC_DATETIMELOCATION            1074
00106 #define IDC_DATETIME                    1074
00107 #define IDC_CUSTOM_COLORS               1074
00108 #define IDC_PROPLIST_CATEGORIZED        1075
00109 #define IDC_PROPLIST_CATEGORIZED2       1076
00110 #define IDC_MARK_CHANGED                1077
00111 #define IDC_CHECKMINUTES                1085
00112 #define IDC_DATETIMEPICKER2             1088
00113 #define IDC_DATETIMEFORMAT              1095
00114 #define IDC_TREE1                       1103
00115 #define IDC_SELECT_FOLDER               1104
00116 #define IDC_PROPLIST_EXPAND_ALL         1105
00117 #define IDC_SELECTED_FOLDER             1107
00118 #define IDC_FILE_EDIT                   1109
00119 #define IDC_FOLDER_EDIT                 1110
00120 #define IDC_CUSTOM_EDIT                 1111
00121 #define IDC_RESET_VALUES                1113
00122 #define IDC_HIDE_FONT_PROPS             1114
00123 #define IDC_COLORBAR                    16516
00124 #define IDC_COLORBAR2                   16518
00125 #define ID_ITEM_1                       32771
00126 #define ID_ITEM_2                       32772
00127 #define ID_ITEM_3                       32773
00128 #define ID_ITEM_4                       32774
00129 #define ID_DIALOG_ABOUT                 32775
00130
00131 // Next default values for new objects
00132 //
00133 #ifdef APSTUDIO_INVOKED
00134 #ifndef APSTUDIO_READONLY_SYMBOLS
00135 #define _APS_NEXT_RESOURCE_VALUE        160
00136 #define _APS_NEXT_COMMAND_VALUE         32778
00137 #define _APS_NEXT_CONTROL_VALUE         1115
00138 #define _APS_NEXT_SYMED_VALUE           101
00139 #endif
00140 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PushLib::_DPushEvents Member List

This is the complete list of members for PushLib::_DPushEvents, including all inherited members.
CustomClick(BSTR lpstrCaption, short cchCaption) PushLib::_DPushEvents
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/editbar.h Source File

  • general
  • docktool

editbar.h

Go to the documentation of this file.
00001 // editbar.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "searchbx.h"
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CEditBar window
00016
00017 class CEditBar : public CToolBar
00018 {
00019 // Construction
00020 public:
00021   BOOL m_bColor;
00022   CSearchBox m_SearchBox;
00023
00024   CEditBar();
00025   BOOL Init(CWnd* pParentWnd, BOOL bColor, BOOL bToolTips);
00026   BOOL SetColor(BOOL bColor);
00027   BOOL SetHorizontal();
00028   BOOL SetVertical();
00029
00030 // Attributes
00031 public:
00032
00033 // Operations
00034 public:
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CEditBar)
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 public:
00043   BOOL m_bVertical;
00044
00045   virtual ~CEditBar();
00046 //  virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
00047   virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode);
00048
00049   // Generated message map functions
00050 protected:
00051   //{{AFX_MSG(CEditBar)
00052   //}}AFX_MSG
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
00056 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MainFrm.cpp Source File

  • vc2008fp
  • OutlookDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "WorkspaceObj.h"
00013 #include "FolderListPopupWnd.h"
00014 #include "PreviewPane.h"
00015 #include "MailFrame.h"
00016
00017 #include "MainFrm.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 BOOL CMyOutlookBar::AllowShowOnPaneMenu() const
00026 {
00027   return m_bMode2003 == ((CMainFrame*)GetParent())->IsOutlookBar2003();
00028 }
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CMainFrame
00032
00033 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00034
00035 const int  iMaxUserToolbars = 10;
00036 const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
00037 const UINT uiLastUserToolBarId = uiFirstUserToolBarId + iMaxUserToolbars - 1;
00038
00039 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00040   ON_WM_CREATE()
00041   ON_WM_ACTIVATE()
00042   ON_COMMAND(ID_OUTLOOK_ADD_PAGE, OnOutlookAddPage)
00043   ON_COMMAND(ID_OUTLOOK_ANIMATION, OnOutlookAnimation)
00044   ON_COMMAND(ID_OUTLOOK_DELETE_PAGE, OnOutlookDeletePage)
00045   ON_COMMAND(ID_OUTLOOK_RENAME_PAGE, OnOutlookRenamePage)
00046   ON_COMMAND(ID_OUTLOOK_SHOW_TEXT_LABELS, OnOutlookShowTextLabels)
00047   ON_UPDATE_COMMAND_UI(ID_OUTLOOK_RENAME_PAGE, OnUpdateOutlookRenamePage)
00048   ON_UPDATE_COMMAND_UI(ID_OUTLOOK_DELETE_PAGE, OnUpdateOutlookDeletePage)
00049   ON_UPDATE_COMMAND_UI(ID_OUTLOOK_ANIMATION, OnUpdateOutlookAnimation)
00050   ON_UPDATE_COMMAND_UI(ID_OUTLOOK_SHOW_TEXT_LABELS, OnUpdateOutlookShowTextLabels)
00051   ON_COMMAND(ID_RESET_PAGE, OnResetPage)
00052   ON_UPDATE_COMMAND_UI(ID_RESET_PAGE, OnUpdateResetPage)
00053   ON_WM_CLOSE()
00054   ON_UPDATE_COMMAND_UI(ID_OUTLOOK_ADD_PAGE, OnUpdateOutlookAddPage)
00055   ON_WM_SETTINGCHANGE()
00056   ON_WM_ENABLE()
00057   ON_COMMAND(ID_VIEW_CAPTIONBAR, OnViewCaptionbar)
00058   ON_UPDATE_COMMAND_UI(ID_VIEW_CAPTIONBAR, OnUpdateViewCaptionbar)
00059   ON_COMMAND(ID_VIEW_FOLDER_LIST, OnViewFolderList)
00060   ON_UPDATE_COMMAND_UI(ID_VIEW_FOLDER_LIST, OnUpdateViewFolderList)
00061   ON_COMMAND(ID_VIEW_OUTLOOKBAR, OnViewOutlookbar)
00062   ON_UPDATE_COMMAND_UI(ID_VIEW_OUTLOOKBAR, OnUpdateViewOutlookbar)
00063   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00064   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00065   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00066   ON_REGISTERED_MESSAGE(AFX_WM_CREATETOOLBAR, OnToolbarCreateNew)
00067   ON_COMMAND_RANGE(ID_VIEW_GOTO_HOME, ID_VIEW_GOTO_FAVORITES, OnViewWorkSpace)
00068   ON_COMMAND(ID_VIEW_MY_COMPUTER, OnViewMyComputer)
00069   ON_COMMAND(ID_SHOW_FOLDERS_POPUP, OnViewFoldersPopup)
00070   ON_UPDATE_COMMAND_UI(ID_INDICATOR_ANIMATION, OnUpdateIndicatorSendReceive)
00071 END_MESSAGE_MAP()
00072
00073 static UINT indicators[] =
00074 {
00075   ID_SEPARATOR, // status line indicator
00076   ID_INDICATOR_ANIMATION, // status icon
00077   ID_INDICATOR_CAPS,
00078   ID_INDICATOR_NUM,
00079   ID_INDICATOR_SCRL,
00080 };
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CMainFrame construction/destruction
00084
00085 CMainFrame::CMainFrame() : m_wndFolderList(m_lstWorkspaces, m_ImagesSmall)
00086 {
00087   m_uiHilightedPage = (UINT)-1;
00088   m_pCurrWorkSpace = NULL;
00089   m_pCurrOutlookWnd = NULL;
00090   m_pCurrOutlookPage = NULL;
00091
00092   CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
00093   CMFCOutlookBarTabCtrl::EnableAnimation(TRUE);
00094
00095   m_bOutlookBar2003 = FALSE;
00096 }
00097
00098 CMainFrame::~CMainFrame()
00099 {
00100   while (!m_lstWorkspaces.IsEmpty())
00101   {
00102     delete m_lstWorkspaces.RemoveHead();
00103   }
00104 }
00105
00106 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00107 {
00108   CWindowDC dc(NULL);
00109   const BOOL bIsHiColor = dc.GetDeviceCaps(BITSPIXEL) > 16;
00110
00111   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00112     return -1;
00113
00114   // Load toolbar user images:
00115   if (m_UserImages.Load(_T(".\\Userimages.bmp")))
00116   {
00117     CMFCToolBar::SetUserImages(&m_UserImages);
00118   }
00119
00120   CMFCToolBar::EnableQuickCustomization();
00121   CMFCToolBarComboBoxButton::SetFlatMode();
00122   CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES);
00123
00124   // Define basic commands. These commands will appear in
00125   // the menu by default:
00126   SetBasicCommands();
00127
00128   // Create menu bar:
00129   if (!m_wndMenuBar.Create(this))
00130   {
00131     TRACE0("Failed to create menubar\n");
00132     return -1;      // fail to create
00133   }
00134
00135   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00136
00137   // Create main toolbar:
00138   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00139     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00140   {
00141     TRACE0("Failed to create toolbar\n");
00142     return -1;      // fail to create
00143   }
00144
00145   BOOL bValidString;
00146   CString strMainToolbarTitle;
00147   bValidString = strMainToolbarTitle.LoadString(IDS_MAIN_TOOLBAR);
00148   m_wndToolBar.SetWindowText(strMainToolbarTitle);
00149
00150   // Create advanced toolbar:
00151   if (!m_wndToolBarAdvanced.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, ID_VIEW_ADVANCED_TOOLBAR) ||
00152     !m_wndToolBarAdvanced.LoadToolBar(IDR_ADVANCED))
00153   {
00154     TRACE0("Failed to create advanced toolbar\n");
00155     return -1;      // fail to create
00156   }
00157
00158   CString strAdvToolbarTitle;
00159   bValidString = strAdvToolbarTitle.LoadString(IDS_ADV_TOOLBAR);
00160   m_wndToolBarAdvanced.SetWindowText(strAdvToolbarTitle);
00161
00162   // Create Web toolbar:
00163   if (!m_wndToolBarWeb.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, ID_VIEW_WEB_TOOLBAR) ||
00164     !m_wndToolBarWeb.LoadToolBar(IDR_WEB))
00165   {
00166     TRACE0("Failed to create web toolbar\n");
00167     return -1;      // fail to create
00168   }
00169
00170   CString strWebToolbarTitle;
00171   bValidString = strWebToolbarTitle.LoadString(IDS_WEB_TOOLBAR);
00172   m_wndToolBarWeb.SetWindowText(strWebToolbarTitle);
00173
00174   // Create status bar:
00175   if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
00176   {
00177     TRACE0("Failed to create status bar\n");
00178     return -1;      // fail to create
00179   }
00180
00181   CBitmap bmpAni;
00182   if (bmpAni.LoadBitmap(bIsHiColor ? IDB_ANIMATION_HC : IDB_ANIMATION))
00183   {
00184     m_imlStatusAnimation.Create(16, 16,
00185       (bIsHiColor ? ILC_COLOR8 : ILC_COLOR4) | ILC_MASK, 10, 0);
00186     m_imlStatusAnimation.Add(&bmpAni, RGB(255, 0, 255));
00187     m_wndStatusBar.SetPaneAnimation(1, m_imlStatusAnimation);
00188     m_wndStatusBar.SetPaneStyle(1, SBPS_NOBORDERS);
00189   }
00190
00191   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00192   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00193   m_wndToolBarAdvanced.EnableDocking(CBRS_ALIGN_ANY);
00194   m_wndToolBarWeb.EnableDocking(CBRS_ALIGN_ANY);
00195
00196   // Outlook bar will be created at left, so temporary disable docking
00197   // at the left side:
00198   EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM | CBRS_ALIGN_RIGHT);
00199
00200   m_wndBarOutlook2003.SetMode2003();
00201
00202   // Create and setup "Outlook" shortcuts bar:
00203   if (!CreateOutlookBar( m_wndBarOutlook, ID_VIEW_OUTLOOKBAR, m_wndOutlookPane1, m_wndOutlookPane2, m_wndTree, m_wndCalendar, 100) ||
00204     !CreateOutlookBar(m_wndBarOutlook2003, ID_VIEW_OUTLOOKBAR2003, m_wndOutlookPane12003, m_wndOutlookPane22003, m_wndTree2003, m_wndCalendar2003, 200))
00205   {
00206     TRACE0("Failed to create outlook bar\n");
00207     return -1;      // fail to create
00208   }
00209
00210   m_wndBarOutlook2003.SetButtonsFont(&afxGlobalData.fontBold);
00211   m_wndBarOutlook2003.ShowWindow(SW_HIDE);
00212
00213   CImageList images;
00214   CBitmap bmp;
00215   if (!bmp.LoadBitmap(bIsHiColor ? IDB_OUTLOOK_SMALL_HC : IDB_OUTLOOK_SMALL))
00216   {
00217     return FALSE;
00218   }
00219
00220   BITMAP bm;
00221   bmp.GetBitmap(&bm);
00222
00223   UINT nFlags = ILC_MASK;
00224
00225   if (bIsHiColor)
00226   {
00227     nFlags |= ILC_COLOR24;
00228   }
00229   else
00230   {
00231     nFlags |= ILC_COLOR;
00232   }
00233
00234   m_ImagesSmall.Create(16, bm.bmHeight, nFlags, 0, 0);
00235   m_ImagesSmall.Add(&bmp, RGB(255, 0, 255));
00236
00237   // Create a caption bar:
00238   if (!CreateCaptionBar())
00239   {
00240     TRACE0("Failed to create caption bar\n");
00241     return -1;      // fail to create
00242   }
00243   // Create folders list:
00244   if (!m_wndFolderList.Create(_T("Folder List"),this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_FOLDER_LIST,
00245     WS_CHILD | WS_VISIBLE | CBRS_LEFT | CBRS_HIDE_INPLACE | WS_CAPTION, AFX_CBRS_OUTLOOK_TABS, AFX_CBRS_CLOSE | AFX_CBRS_RESIZE))
00246   {
00247     TRACE0("Failed to create folder list\n");
00248     return -1;      // fail to create
00249   }
00250
00251   m_wndFolderList.EnableDocking(CBRS_ALIGN_LEFT);
00252   DockPane(&m_wndFolderList);
00253
00254   // Outlook bar is created and docking on the left side
00255   // should be allowed.
00256   EnableDocking(CBRS_ALIGN_LEFT);
00257   EnableAutoHidePanes(CBRS_ALIGN_RIGHT);
00258
00259   DockPane(&m_wndMenuBar);
00260   DockPane(&m_wndToolBar);
00261   DockPane(&m_wndToolBarAdvanced);
00262   DockPaneLeftOf(&m_wndToolBarWeb, &m_wndToolBarAdvanced);
00263
00264   // Allow user-defined toolbars operations:
00265   InitUserToolbars(NULL, uiFirstUserToolBarId, uiLastUserToolBarId);
00266
00267   // Enable customization button fore all toolbars:
00268   m_wndToolBar.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, IDS_CUSTOMIZE);
00269   m_wndToolBarAdvanced.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, IDS_CUSTOMIZE);
00270   m_wndToolBarWeb.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, IDS_CUSTOMIZE);
00271
00272   SetWorkSpace((CWorkspaceObj*) m_lstWorkspaces.GetHead());
00273
00274   // Enable conttol bar context menu(list of bars + customize command):
00275   EnablePaneMenu( TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."), ID_VIEW_TOOLBARS,
00276     FALSE /* all control bars on the context menu */, TRUE /* toolbars only on the "View" menu*/);
00277   return 0;
00278 }
00279
00280 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00281 {
00282   if ( !CFrameWnd::PreCreateWindow(cs) )
00283     return FALSE;
00284   // TODO: Modify the Window class or styles here by modifying
00285   //  the CREATESTRUCT cs
00286
00287   return TRUE;
00288 }
00289
00290 /////////////////////////////////////////////////////////////////////////////
00291 // CMainFrame diagnostics
00292
00293 #ifdef _DEBUG
00294 void CMainFrame::AssertValid() const
00295 {
00296   CFrameWnd::AssertValid();
00297 }
00298
00299 void CMainFrame::Dump(CDumpContext& dc) const
00300 {
00301   CFrameWnd::Dump(dc);
00302 }
00303
00304 #endif //_DEBUG
00305
00306 /////////////////////////////////////////////////////////////////////////////
00307 // CMainFrame message handlers
00308
00309 void CMainFrame::OnViewCustomize()
00310 {
00311   // Create a customize toolbars dialog:
00312   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog(this, TRUE /* Automatic menus scaning */);
00313
00314   pDlgCust->EnableUserDefinedToolbars();
00315   pDlgCust->Create();
00316 }
00317
00318 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM wp,LPARAM lp)
00319 {
00320   CPoint point(AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00321
00322   m_pCurrOutlookPage = DYNAMIC_DOWNCAST( CMFCOutlookBarPane, CWnd::FromHandlePermanent((HWND) wp));
00323
00324   if (m_pCurrOutlookPage == NULL)
00325   {
00326     m_uiHilightedPage = (UINT)-1;
00327     return 1l; // Default menu
00328   }
00329
00330   CMenu menu;
00331   VERIFY(menu.LoadMenu(m_bOutlookBar2003 ? IDR_POPUP_OLBAR2003 : IDR_POPUP_OLBAR));
00332
00333   CMenu* pPopup = menu.GetSubMenu(0);
00334   ASSERT(pPopup != NULL);
00335
00336   if (pPopup)
00337   {
00338     SetupToolbarMenu(*pPopup, ID_VIEW_USER_TOOLBAR1, ID_VIEW_USER_TOOLBAR10);
00339
00340     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00341     pPopupMenu->Create(this, point.x, point.y, pPopup->Detach());
00342   }
00343
00344   m_uiHilightedPage = FindFocusedOutlookWnd(&m_pCurrOutlookWnd);
00345   return 0;
00346 }
00347
00348 LRESULT CMainFrame::OnToolbarReset(WPARAM wp,LPARAM)
00349 {
00350   UINT uiToolBarId = (UINT) wp;
00351   if (uiToolBarId == IDR_MAINFRAME)
00352   {
00353     // Replace new button by the menu
00354     CMenu menu;
00355     VERIFY(menu.LoadMenu(IDR_MAINFRAME));
00356
00357     CMenu* pMenuFile = menu.GetSubMenu(0);
00358     VERIFY(pMenuFile != NULL);
00359
00360     if (pMenuFile)
00361     {
00362       CMenu* pMenuNew = pMenuFile->GetSubMenu(0);
00363       VERIFY(pMenuNew != NULL);
00364
00365       if (pMenuNew)
00366       {
00367         UINT uiNewCmdID = (m_pCurrWorkSpace == NULL) ? ID_NEW_MAIL : m_pCurrWorkSpace->m_uiDefaultNewAction;
00368         CMFCToolBarMenuButton btnNew(uiNewCmdID, pMenuNew->GetSafeHmenu(), GetCmdMgr()->GetCmdImage(uiNewCmdID));
00369         m_wndToolBar.ReplaceButton(ID_FILE_NEW, btnNew);
00370         m_wndToolBar.SetToolBarBtnText(m_wndToolBar.CommandToIndex(uiNewCmdID), _T("&New"));
00371       }
00372     }
00373
00374     // Send/Receive appear with the text label:
00375     m_wndToolBar.SetToolBarBtnText(m_wndToolBar.CommandToIndex(ID_SEND_RECEIVE));
00376
00377     // Replace Find Contact by combo:
00378     m_wndToolBar.ReplaceButton(ID_FIND_CONTACT, CMFCToolBarComboBoxButton(ID_FIND_CONTACT, GetCmdMgr()->GetCmdImage(ID_FIND_CONTACT), CBS_DROPDOWN));
00379   }
00380   else if (uiToolBarId == IDR_WEB)
00381   {
00382     CMenu menu;
00383     VERIFY(menu.LoadMenu(IDR_DUMMY));
00384     CMenu* pSubMenu = menu.GetSubMenu(0);
00385
00386     CMFCToolBarMenuButton btnBack(ID_WEB_BACK, pSubMenu->GetSafeHmenu(), GetCmdMgr()->GetCmdImage(ID_WEB_BACK));
00387     m_wndToolBarWeb.ReplaceButton(ID_WEB_BACK, btnBack);
00388
00389     m_wndToolBarWeb.ReplaceButton(ID_WEB_ADDRESS, CMFCToolBarComboBoxButton(ID_WEB_ADDRESS, GetCmdMgr()->GetCmdImage(ID_WEB_ADDRESS), CBS_DROPDOWN));
00390   }
00391   else if (uiToolBarId == IDR_ADVANCED)
00392   {
00393     CMenu menu;
00394     VERIFY(menu.LoadMenu(IDR_DUMMY));
00395     CMenu* pSubMenu = menu.GetSubMenu(0);
00396
00397     CMFCToolBarMenuButton btnBack(ID_VIEW_BACK, pSubMenu->GetSafeHmenu(), GetCmdMgr()->GetCmdImage(ID_VIEW_BACK));
00398     m_wndToolBarAdvanced.ReplaceButton(ID_VIEW_BACK, btnBack);
00399   }
00400
00401   return 0;
00402 }
00403
00404 void CMainFrame::AddWorkSpace(const CString& strName, const int iIconIndex, const UINT uiCmd, CMFCOutlookBarPane& pane, const UINT uiNewCmdID, CImageList& images)
00405 {
00406   pane.AddButton(images.ExtractIcon(iIconIndex), strName, uiCmd);
00407
00408   BOOL bIsAlreadyExist = FALSE;
00409   for (POSITION pos = m_lstWorkspaces.GetHeadPosition(); pos != NULL;)
00410   {
00411     CWorkspaceObj* pWS = (CWorkspaceObj*) m_lstWorkspaces.GetNext(pos);
00412     ASSERT_VALID(pWS);
00413
00414     if (pWS->m_uiCmd == uiCmd)
00415     {
00416       bIsAlreadyExist = TRUE;
00417       break;
00418     }
00419   }
00420
00421   if (!bIsAlreadyExist)
00422   {
00423     m_lstWorkspaces.AddTail(new CWorkspaceObj(strName, uiCmd, iIconIndex, uiNewCmdID));
00424   }
00425 }
00426
00427 BOOL CMainFrame::CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID, CMFCOutlookBarPane& pane1, CMFCOutlookBarPane& pane2, CShellTreeCtrl& tree, CCalendarBar& calendar, int nInitialWidth)
00428 {
00429   CWindowDC dc(NULL);
00430   const BOOL bIsHiColor = dc.GetDeviceCaps(BITSPIXEL) > 16;
00431
00432   if (!bar.Create(_T("Shortcuts"), this, CRect(0, 0, nInitialWidth, 32000), uiID, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
00433   {
00434     return FALSE; // fail to create
00435   }
00436
00437   CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)bar.GetUnderlyingWindow();
00438
00439   if (pOutlookBar == NULL)
00440   {
00441     ASSERT(FALSE);
00442     return FALSE;
00443   }
00444
00445   pOutlookBar->EnableInPlaceEdit(TRUE);
00446
00447   static UINT uiPageID = 1;
00448
00449   DWORD dwPaneStyle = AFX_DEFAULT_TOOLBAR_STYLE | CBRS_FLOAT_MULTI;
00450
00451   // can float, can autohide, can resize, CAN NOT CLOSE
00452   DWORD dwStyle = AFX_CBRS_FLOAT | AFX_CBRS_AUTOHIDE | AFX_CBRS_RESIZE;
00453
00454   pane1.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
00455   pane1.SetOwner(this);
00456   pane1.EnableTextLabels();
00457   pane1.EnableDocking(CBRS_ALIGN_ANY);
00458
00459   pane2.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
00460   pane2.SetOwner(this);
00461   pane2.EnableTextLabels();
00462   pane2.EnableDocking(CBRS_ALIGN_ANY);
00463
00464   CImageList images;
00465   CBitmap bmp;
00466   if (!bmp.LoadBitmap(bIsHiColor ? IDB_OUTLOOK_LARGE_HC : IDB_OUTLOOK_LARGE))
00467   {
00468     return FALSE;
00469   }
00470
00471   BITMAP bm;
00472   bmp.GetBitmap(&bm);
00473
00474   UINT nFlags = ILC_MASK;
00475
00476   if (bIsHiColor)
00477   {
00478     nFlags |= ILC_COLOR24;
00479   }
00480   else
00481   {
00482     nFlags |= ILC_COLOR;
00483   }
00484
00485   images.Create(32, bm.bmHeight, nFlags, 0, 0);
00486   images.Add(&bmp, RGB(255, 0, 255));
00487
00488   AddWorkSpace(_T("Home"), 0, ID_VIEW_GOTO_HOME, pane1, ID_NEW_MAIL, images);
00489   AddWorkSpace(_T("Calendar"), 1, ID_VIEW_GOTO_CALENDAR, pane1, ID_NEW_APPOINTMENT, images);
00490   AddWorkSpace(_T("Drafts"), 2, ID_VIEW_GOTO_DRAFTS, pane1, ID_NEW_MAIL, images);
00491   AddWorkSpace(_T("Inbox"), 3, ID_VIEW_GOTO_INBOX, pane1, ID_NEW_MAIL, images);
00492   AddWorkSpace(_T("Journal"), 4, ID_VIEW_GOTO_JOURNAL, pane1, ID_NEW_JOURNAL_ENTRY, images);
00493   AddWorkSpace(_T("Notes"), 5, ID_VIEW_GOTO_NOTES, pane1, ID_NEW_NOTE, images);
00494   AddWorkSpace(_T("Outbox"), 6, ID_VIEW_GOTO_OUTBOX, pane1, ID_NEW_MAIL, images);
00495   AddWorkSpace(_T("Sent Items"), 7, ID_VIEW_GOTO_SENTITEMS, pane1, ID_NEW_MAIL, images);
00496   AddWorkSpace(_T("Tasks"), 8, ID_VIEW_GOTO_TASKS, pane1, ID_NEW_TASK, images);
00497
00498   pOutlookBar->AddControl(&pane1, _T("General"), 0, TRUE, dwStyle);
00499   pane1.EnableDocking(CBRS_ALIGN_ANY);
00500   pane1.SetDefaultState();
00501
00502   AddWorkSpace(_T("My Computer"), 9, ID_VIEW_MY_COMPUTER, pane2, ID_NEW_SHORTCUT, images);
00503   AddWorkSpace(_T("Personal"), 10, ID_VIEW_GOTO_PERSONAL, pane2, ID_NEW_SHORTCUT, images);
00504   AddWorkSpace(_T("Favorites"), 10, ID_VIEW_GOTO_FAVORITES, pane2, ID_NEW_SHORTCUT, images);
00505
00506   pOutlookBar->AddControl(&pane2, _T("Other Shortcuts"), 1, TRUE, dwStyle);
00507   pane2.EnableDocking(CBRS_ALIGN_ANY);
00508   pane2.SetDefaultState();
00509
00510   CRect rectDummy(0, 0, 0, 0);
00511   const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;
00512
00513   int nShift = (uiID == ID_VIEW_OUTLOOKBAR) ? 0 : 2; // we are going to create the same controls for two Outlook bars (regular and 2003), so we need this to prevent controls with the same ID
00514
00515   tree.Create(dwTreeStyle, rectDummy, &bar, 1200 + nShift);
00516   pOutlookBar->AddControl(&tree, _T("Folders"), 2, TRUE, dwStyle);
00517
00518   calendar.Create(rectDummy, &bar, 1201 + nShift);
00519   pOutlookBar->AddControl(&calendar, _T("Calendar"), 3, TRUE, dwStyle);
00520
00521   bar.SetPaneStyle(bar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00522   bar.FillDefaultTabsOrderArray();
00523
00524   BOOL bAnimation = theApp.GetInt(_T("OutlookAnimation"), TRUE);
00525   CMFCOutlookBarTabCtrl::EnableAnimation(bAnimation);
00526
00527   return TRUE;
00528 }
00529
00530 BOOL CMainFrame::CreateCaptionBar()
00531 {
00532   if (!m_wndCaption.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, this, ID_VIEW_CAPTIONBAR, -1))
00533   {
00534     TRACE0("Failed to create caption bar\n");
00535     return FALSE;
00536   }
00537
00538   m_wndCaption.SetFlatBorder();
00539   m_wndCaption.SetFont(&afxGlobalData.fontBold);
00540
00541   return TRUE;
00542 }
00543
00544 void CMainFrame::OnViewWorkSpace(UINT id)
00545 {
00546   for (POSITION pos = m_lstWorkspaces.GetHeadPosition(); pos != NULL;)
00547   {
00548     CWorkspaceObj* pWS = (CWorkspaceObj*) m_lstWorkspaces.GetNext(pos);
00549     ASSERT_VALID(pWS);
00550
00551     if (pWS->m_uiCmd == id)
00552     {
00553       SetWorkSpace(pWS);
00554     }
00555   }
00556 }
00557
00558 void CMainFrame::OnViewMyComputer()
00559 {
00560   OnViewWorkSpace(ID_VIEW_MY_COMPUTER);
00561 }
00562
00563 void CMainFrame::SetWorkSpace(CWorkspaceObj* pWorkSpace)
00564 {
00565   ASSERT_VALID(pWorkSpace);
00566
00567   m_pCurrWorkSpace = pWorkSpace;
00568
00569   m_wndCaption.SetIcon(m_ImagesSmall.ExtractIcon(m_pCurrWorkSpace->m_iIconIndex));
00570   m_wndCaption.SetButton(m_pCurrWorkSpace->m_strName, ID_SHOW_FOLDERS_POPUP);
00571
00572   m_wndCaption.Invalidate();
00573   m_wndCaption.UpdateWindow();
00574
00575   m_wndFolderList.SelectWorkspace(pWorkSpace);
00576
00577 }
00578
00579 void CMainFrame::OnViewFoldersPopup()
00580 {
00581   // First, calulate popup window rectangle.
00582   // Top left corner need to be under the caption's button:
00583   CRect rectButton = m_wndCaption.GetButtonRect();
00584   m_wndCaption.ClientToScreen(&rectButton);
00585
00586   // Width will be same as folder bar's width:
00587   CRect rectFolderBar;
00588   m_wndFolderList.GetWindowRect(&rectFolderBar);
00589
00590   // Bottom will be near the main frame bottom:
00591   CRect rectStatusBar;
00592   m_wndStatusBar.GetWindowRect(rectStatusBar);
00593
00594   CRect rectPopup(rectButton.left, rectButton.bottom, rectButton.left + rectFolderBar.Width(), rectStatusBar.bottom - 1);
00595
00596   CFolderListPopupWnd* pFoldersPopup = new CFolderListPopupWnd(m_lstWorkspaces, m_ImagesSmall, m_pCurrWorkSpace);
00597   pFoldersPopup->Create(rectPopup);
00598
00599   m_wndCaption.SetButtonPressed();
00600 }
00601
00602 void CMainFrame::OnCloseFoldersPopup(BOOL bKeep)
00603 {
00604   if (bKeep)
00605   {
00606     m_wndCaption.EnableButton(FALSE);
00607     ShowPane(&m_wndFolderList, TRUE, FALSE, TRUE);
00608   }
00609
00610   m_wndCaption.SetButtonPressed(FALSE);
00611 }
00612
00613 void CMainFrame::RecalcLayout(BOOL bNotify)
00614 {
00615   CFrameWnd::RecalcLayout(bNotify);
00616
00617   if (m_wndFolderList.GetSafeHwnd() != NULL)
00618   {
00619     m_wndCaption.EnableButton(!(m_wndFolderList.GetStyle() & WS_VISIBLE));
00620   }
00621 }
00622
00623 void CMainFrame::AdjustDockingLayout(HDWP hdwp)
00624 {
00625   CFrameWnd::AdjustDockingLayout(hdwp);
00626   if (m_wndFolderList.GetSafeHwnd() != NULL)
00627   {
00628     m_wndCaption.EnableButton(!(m_wndFolderList.GetStyle() & WS_VISIBLE));
00629   }
00630 }
00631
00632 BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
00633 {
00634   CRect rectClient;
00635   GetClientRect(rectClient);
00636
00637   m_wndSplitter.CreateStatic(this, 2, 1);
00638   m_wndSplitter.CreateView(0, 0, pContext->m_pNewViewClass, CSize(0, rectClient.Height() / 2), pContext);
00639   m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CPreviewPane), CSize(0, rectClient.Height() / 2), pContext);
00640
00641   return TRUE;
00642 }
00643
00644 void CMainFrame::SetBasicCommands()
00645 {
00646   CList<UINT, UINT> lstBasicCommands;
00647
00648   lstBasicCommands.AddTail(ID_VIEW_TOOLBARS);
00649   lstBasicCommands.AddTail(ID_FILE_NEW);
00650   lstBasicCommands.AddTail(ID_FILE_OPEN);
00651   lstBasicCommands.AddTail(ID_FILE_SAVE);
00652   lstBasicCommands.AddTail(ID_FILE_PRINT);
00653   lstBasicCommands.AddTail(ID_APP_EXIT);
00654   lstBasicCommands.AddTail(ID_EDIT_CUT);
00655   lstBasicCommands.AddTail(ID_EDIT_PASTE);
00656   lstBasicCommands.AddTail(ID_EDIT_UNDO);
00657   lstBasicCommands.AddTail(ID_APP_ABOUT);
00658   lstBasicCommands.AddTail(ID_VIEW_TOOLBAR);
00659   lstBasicCommands.AddTail(ID_VIEW_CUSTOMIZE);
00660   lstBasicCommands.AddTail(ID_VIEW_APP_LOOK);
00661   lstBasicCommands.AddTail(ID_NEW_MAIL);
00662   lstBasicCommands.AddTail(ID_NEW_FAX);
00663   lstBasicCommands.AddTail(ID_NEW_POST_FOLDER);
00664   lstBasicCommands.AddTail(ID_NEW_APPOINTMENT);
00665   lstBasicCommands.AddTail(ID_NEW_MEETING);
00666   lstBasicCommands.AddTail(ID_NEW_CONTRACT);
00667   lstBasicCommands.AddTail(ID_NEW_DISTRIBUTION_LIST);
00668   lstBasicCommands.AddTail(ID_NEW_TASK);
00669   lstBasicCommands.AddTail(ID_NEW_NOTE);
00670   lstBasicCommands.AddTail(ID_DUMMY);
00671   lstBasicCommands.AddTail(ID_VIEW_FOLDER_LIST);
00672   lstBasicCommands.AddTail(ID_MAIL_SEND);
00673   lstBasicCommands.AddTail(ID_MAIL_SAVE);
00674   lstBasicCommands.AddTail(ID_FILE_SAVE_AS);
00675   lstBasicCommands.AddTail(ID_MAIL_SAVE_ATTACHMENTS);
00676   lstBasicCommands.AddTail(ID_MAIL_SAVE_STATIONERY);
00677   lstBasicCommands.AddTail(ID_MAIL_DELETE);
00678   lstBasicCommands.AddTail(ID_MAIL_MOVE_TO_FOLDER);
00679   lstBasicCommands.AddTail(ID_FILE_PRINT_PREVIEW);
00680   lstBasicCommands.AddTail(ID_FILE_CLOSE);
00681   lstBasicCommands.AddTail(ID_MAIL_ATTACHMENT);
00682   lstBasicCommands.AddTail(ID_MAIL_ITEM);
00683   lstBasicCommands.AddTail(ID_MAIL_SIGNATURE);
00684   lstBasicCommands.AddTail(ID_MAIL_SPELL);
00685   lstBasicCommands.AddTail(ID_MAIL_CLOSE);
00686   lstBasicCommands.AddTail(ID_ADDRESS_BOOK);
00687   lstBasicCommands.AddTail(ID_VIEW_GOTO_HOME);
00688   lstBasicCommands.AddTail(ID_VIEW_GOTO_CALENDAR);
00689   lstBasicCommands.AddTail(ID_VIEW_GOTO_TASKS);
00690   lstBasicCommands.AddTail(ID_VIEW_GOTO_FAVORITES);
00691
00692   CMFCToolBar::SetBasicCommands(lstBasicCommands);
00693 }
00694
00695 void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
00696 {
00697   CFrameWnd::OnActivate(nState, pWndOther, bMinimized);
00698
00699   if (nState != WA_INACTIVE)
00700   {
00701     theApp.SetActiveFrame(COutlookDemoApp::MainFrame);
00702     theApp.m_pMainWnd = this;
00703   }
00704 }
00705
00706 BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
00707 {
00708   if (!CFrameWnd::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
00709   {
00710     return FALSE;
00711   }
00712
00713   // Enable customization button fore all user toolbars:
00714   for (int i = 0; i < uiLastUserToolBarId - uiFirstUserToolBarId + 1; i++)
00715   {
00716     CMFCToolBar* pUserToolbar = GetUserToolBarByIndex(i);
00717     if (pUserToolbar != NULL)
00718     {
00719       pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, IDS_CUSTOMIZE);
00720     }
00721   }
00722
00723   return TRUE;
00724 }
00725
00726 LRESULT CMainFrame::OnToolbarCreateNew(WPARAM wp,LPARAM lp)
00727 {
00728   LRESULT lres = CFrameWndEx::OnToolbarCreateNew(wp,lp);
00729   if (lres == 0)
00730   {
00731     return 0;
00732   }
00733
00734   CMFCToolBar* pUserToolbar = (CMFCToolBar*) lres;
00735   ASSERT_VALID(pUserToolbar);
00736
00737   pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00738   pUserToolbar->AdjustLayout();
00739   return lres;
00740 }
00741
00742 void CMainFrame::OnOutlookAddPage()
00743 {
00744   CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)m_wndBarOutlook.GetUnderlyingWindow();
00745   if (pOutlookBar == NULL)
00746   {
00747     return;
00748   }
00749
00750   CMFCOutlookBarPane* pPane = m_wndBarOutlook.CreateCustomPage(_T("New Page"), TRUE, CBRS_ALIGN_ANY);
00751
00752   if (pPane != NULL)
00753   {
00754     OnOutlookRenamePage();
00755   }
00756 }
00757
00758 void CMainFrame::OnUpdateOutlookAddPage(CCmdUI* pCmdUI)
00759 {
00760   pCmdUI->Enable(!m_bOutlookBar2003);
00761 }
00762
00763 void CMainFrame::OnOutlookAnimation()
00764 {
00765   CMFCOutlookBarTabCtrl::EnableAnimation(!CMFCOutlookBarTabCtrl::IsAnimation());
00766 }
00767
00768 void CMainFrame::OnResetPage()
00769 {
00770   if (m_pCurrOutlookPage == NULL)
00771   {
00772     ASSERT(FALSE);
00773     return;
00774   }
00775
00776   ASSERT_VALID(m_pCurrOutlookPage);
00777
00778   if (AfxMessageBox(IDP_REST_OUTLOOK_PAGE, MB_YESNO) == IDYES)
00779   {
00780     m_pCurrOutlookPage->RestoreOriginalstate();
00781   }
00782 }
00783
00784 void CMainFrame::OnUpdateResetPage(CCmdUI* pCmdUI)
00785 {
00786   pCmdUI->Enable(!m_bOutlookBar2003 && m_pCurrOutlookPage != NULL && m_pCurrOutlookPage->CanBeRestored());
00787 }
00788
00789 void CMainFrame::OnOutlookDeletePage()
00790 {
00791   if (m_pCurrOutlookWnd == NULL)
00792   {
00793     return;
00794   }
00795
00796   UINT uiPage = m_pCurrOutlookWnd->GetActiveTab();
00797
00798   CString strPageName = _T("");
00799   m_pCurrOutlookWnd->GetTabLabel(uiPage,strPageName);
00800
00801   CString strMessage;
00802   strMessage.Format(_T("Remove page '%s'?"), (LPCTSTR)strPageName);
00803
00804   if (AfxMessageBox(strMessage, MB_YESNO) == IDYES)
00805   {
00806     m_wndBarOutlook.RemoveCustomPage(uiPage, m_pCurrOutlookWnd);
00807   }
00808 }
00809
00810 void CMainFrame::OnOutlookRenamePage()
00811 {
00812   if (m_pCurrOutlookWnd != NULL)
00813   {
00814     if (!m_pCurrOutlookWnd->IsInPlaceEdit())
00815     {
00816       m_pCurrOutlookWnd->EnableInPlaceEdit(TRUE);
00817     }
00818     m_pCurrOutlookWnd->StartRenameTab(m_pCurrOutlookWnd->GetActiveTab());
00819   }
00820 }
00821
00822 void CMainFrame::OnOutlookShowTextLabels()
00823 {
00824   m_wndOutlookPane1.EnableTextLabels(!m_wndOutlookPane1.AreTextLabels());
00825   m_wndOutlookPane12003.EnableTextLabels(!m_wndOutlookPane12003.AreTextLabels());
00826 }
00827
00828 void CMainFrame::OnUpdateOutlookRenamePage(CCmdUI* pCmdUI)
00829 {
00830   BOOL bEnable = (m_pCurrOutlookWnd != NULL) && ((UINT)m_uiHilightedPage != -1);
00831   pCmdUI->Enable(bEnable);
00832 }
00833
00834 void CMainFrame::OnUpdateOutlookDeletePage(CCmdUI* pCmdUI)
00835 {
00836   pCmdUI->Enable(!m_bOutlookBar2003 && m_uiHilightedPage != (UINT)-1);
00837 }
00838
00839 void CMainFrame::OnUpdateOutlookAnimation(CCmdUI* pCmdUI)
00840 {
00841   pCmdUI->SetCheck(CMFCOutlookBarTabCtrl::IsAnimation());
00842 }
00843
00844 void CMainFrame::OnUpdateOutlookShowTextLabels(CCmdUI* pCmdUI)
00845 {
00846   pCmdUI->SetCheck(m_wndOutlookPane1.AreTextLabels());
00847 }
00848
00849 int CMainFrame::FindFocusedOutlookWnd(CMFCOutlookBarTabCtrl** ppOutlookWnd)
00850 {
00851   ASSERT(ppOutlookWnd != NULL);
00852
00853   if (!ppOutlookWnd)
00854   {
00855     return -1;
00856   }
00857
00858   *ppOutlookWnd = NULL;
00859   // find the outlook from the current point
00860   CPoint pt;
00861   GetCursorPos(&pt);
00862
00863   CWnd* pWndPoint = m_dockManager.PaneFromPoint(pt, 0);
00864   *ppOutlookWnd = FindOutlookParent(pWndPoint);
00865
00866   CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;
00867
00868   // find focused outlook
00869   if (*ppOutlookWnd != NULL)
00870   {
00871     CWnd* pWnd = GetFocus();
00872
00873     if (pWnd == &bar)
00874     {
00875       *ppOutlookWnd = (CMFCOutlookBarTabCtrl*) bar.GetUnderlyingWindow();
00876     }
00877     else if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
00878     {
00879       *ppOutlookWnd = (CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pWnd)->GetUnderlyingWindow();
00880     }
00881     else
00882     {
00883       CWnd* pParent = pWnd->GetParent();
00884       while (pParent != NULL)
00885       {
00886         if (pParent->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
00887         {
00888           *ppOutlookWnd = (CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pParent)->GetUnderlyingWindow();
00889           break;
00890         }
00891         pParent = pParent->GetParent();
00892       }
00893     }
00894   }
00895
00896   if (*ppOutlookWnd != NULL)
00897   {
00898     return(*ppOutlookWnd)->GetActiveTab();
00899   }
00900
00901   return -1;
00902 }
00903
00904 CMFCOutlookBarTabCtrl* CMainFrame::FindOutlookParent(CWnd* pWnd)
00905 {
00906   if (pWnd == NULL)
00907   {
00908     return NULL;
00909   }
00910
00911   if (pWnd->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
00912   {
00913     return(CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pWnd)->GetUnderlyingWindow();
00914   }
00915
00916   CWnd* pParent = pWnd->GetParent();
00917   while (pParent != NULL)
00918   {
00919     if (pParent->IsKindOf(RUNTIME_CLASS(CMFCOutlookBar)))
00920     {
00921       return(CMFCOutlookBarTabCtrl*)((CMFCOutlookBar*)pParent)->GetUnderlyingWindow();
00922
00923     }
00924     pParent = pParent->GetParent();
00925   }
00926   return NULL;
00927 }
00928
00929 void CMainFrame::OnClose()
00930 {
00931   theApp.WriteInt(_T("OutlookAnimation"), CMFCOutlookBarTabCtrl::IsAnimation());
00932   CFrameWnd::OnClose();
00933 }
00934
00935 void CMainFrame::OnUpdateIndicatorSendReceive(CCmdUI* pCmdUI)
00936 {
00937   pCmdUI->Enable();
00938 }
00939
00940 void CMainFrame::OnChangeLook(BOOL bOutlookBar2003)
00941 {
00942   BOOL bIsLook2003 = CMFCVisualManager::GetInstance()->IsKindOf(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
00943
00944   CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;
00945
00946   m_bOutlookBar2003 = bOutlookBar2003;
00947
00948   if ((bar.GetStyle() & WS_VISIBLE) != 0)
00949   {
00950     if (m_bOutlookBar2003)
00951     {
00952       ShowPane(&m_wndBarOutlook2003, TRUE, FALSE, TRUE);
00953       ShowPane(&m_wndBarOutlook, FALSE, FALSE, TRUE);
00954     }
00955     else
00956     {
00957       ShowPane(&m_wndBarOutlook, TRUE, FALSE, TRUE);
00958       ShowPane(&m_wndBarOutlook2003, FALSE, FALSE, TRUE);
00959     }
00960   }
00961
00962   // Reload toolbar images:
00963   CWindowDC dc(NULL);
00964   int nBitsPerPixel = dc.GetDeviceCaps(BITSPIXEL);
00965
00966   BOOL bIsHiColor = bIsLook2003 && nBitsPerPixel > 16;
00967
00968   CMFCToolBar::ResetAllImages();
00969
00970   CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES, bIsHiColor ? IDB_MENU_IMAGE_HC : 0);
00971
00972   m_wndToolBar.LoadBitmap(bIsHiColor ? IDB_TOOLBAR_HC : IDR_MAINFRAME);
00973   m_wndToolBarAdvanced.LoadBitmap(bIsHiColor ? IDB_ADVANCED_HC : IDR_ADVANCED);
00974   m_wndToolBarWeb.LoadBitmap(bIsHiColor ? IDB_WEB_HC : IDR_WEB);
00975
00976   CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)m_wndBarOutlook2003.GetUnderlyingWindow();
00977
00978   if (pOutlookBar != NULL)
00979   {
00980     pOutlookBar->SetImageList(bIsHiColor ? IDB_PAGES_HC : IDB_PAGES, 24);
00981     pOutlookBar->SetToolbarImageList(bIsHiColor ? IDB_PAGES_SMALL_HC : IDB_PAGES_SMALL, 16);
00982
00983     m_wndBarOutlook2003.RecalcLayout();
00984   }
00985
00986   RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00987
00988   CMailFrame::OnChangeLook();
00989 }
00990
00991 void CMainFrame::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
00992 {
00993   m_wndCaption.SetFont(NULL);
00994
00995   CFrameWnd::OnSettingChange(uFlags, lpszSection);
00996
00997   m_wndCaption.SetFont(&afxGlobalData.fontBold);
00998 }
00999
01000 void CMainFrame::OnEnable( BOOL bEnable )
01001 {
01002   CWnd* pWnd = GetNextWindow();
01003   while (pWnd != NULL)
01004   {
01005     if (pWnd->IsKindOf(RUNTIME_CLASS(CFrameWndEx)))
01006     {
01007       pWnd->EnableWindow(bEnable);
01008     }
01009     pWnd = pWnd->GetNextWindow();
01010   }
01011 }
01012
01013 void CMainFrame::OnViewCaptionbar()
01014 {
01015   ShowPane(&m_wndCaption, !(m_wndCaption.GetStyle() & WS_VISIBLE), FALSE, TRUE);
01016 }
01017
01018 void CMainFrame::OnUpdateViewCaptionbar(CCmdUI* pCmdUI)
01019 {
01020   pCmdUI->SetCheck(m_wndCaption.GetStyle() & WS_VISIBLE);
01021 }
01022
01023 void CMainFrame::OnViewFolderList()
01024 {
01025   ShowPane(&m_wndFolderList, !(m_wndFolderList.GetStyle() & WS_VISIBLE), FALSE, TRUE);
01026   RecalcLayout();
01027 }
01028
01029 void CMainFrame::OnUpdateViewFolderList(CCmdUI* pCmdUI)
01030 {
01031   pCmdUI->SetCheck(m_wndFolderList.GetStyle() & WS_VISIBLE);
01032 }
01033
01034 void CMainFrame::OnViewOutlookbar()
01035 {
01036   CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;
01037
01038   ShowPane(&bar, !(bar.GetStyle() & WS_VISIBLE), FALSE, TRUE);
01039 }
01040
01041 void CMainFrame::OnUpdateViewOutlookbar(CCmdUI* pCmdUI)
01042 {
01043   CMFCOutlookBar& bar = m_bOutlookBar2003 ? m_wndBarOutlook2003 : m_wndBarOutlook;
01044   pCmdUI->SetCheck(bar.GetStyle() & WS_VISIBLE);
01045 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSetPaneSizeApp Member List

This is the complete list of members for CSetPaneSizeApp, including all inherited members.
CSetPaneSizeApp() | CSetPaneSizeApp |
ExitInstance() | CSetPaneSizeApp | [virtual]
InitInstance() | CSetPaneSizeApp | [virtual]
OnAppAbout() | CSetPaneSizeApp |
PreLoadState() | CSetPaneSizeApp | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/chicdial.cpp Source File

  • vc2008fp
  • WordPad

chicdial.cpp

Go to the documentation of this file.
00001 //
00002 // chicdial.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CCSDialog dialog
00023
00024 CCSDialog::CCSDialog(UINT nIDTemplate, CWnd* pParentWnd)
00025   : CDialog(nIDTemplate, pParentWnd)
00026 {
00027 }
00028
00029 CCSDialog::CCSDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd)
00030   : CDialog(lpszTemplateName, pParentWnd)
00031 {
00032 }
00033
00034 CCSDialog::CCSDialog() : CDialog()
00035 {
00036 }
00037
00038 BEGIN_MESSAGE_MAP(CCSDialog, CDialog)
00039   //{{AFX_MSG_MAP(CCSDialog)
00040   //}}AFX_MSG_MAP
00041   ON_MESSAGE(WM_HELP, OnHelp)
00042   ON_MESSAGE(WM_CONTEXTMENU, OnHelpContextMenu)
00043 END_MESSAGE_MAP()
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CCSDialog message handlers
00048
00049 LRESULT CCSDialog::OnHelp(WPARAM, LPARAM lParam)
00050 {
00051   ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
00052     HELP_WM_HELP, (ULONG_PTR)(LPVOID)GetHelpIDs());
00053   return 0;
00054 }
00055
00056 LRESULT CCSDialog::OnHelpContextMenu(WPARAM wParam, LPARAM)
00057 {
00058   ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
00059     HELP_CONTEXTMENU, (ULONG_PTR)(LPVOID)GetHelpIDs());
00060   return 0;
00061 }
00062
00063 BOOL CCSDialog::OnInitDialog()
00064 {
00065   CDialog::OnInitDialog();
00066   ModifyStyleEx(0, WS_EX_CONTEXTHELP);
00067   return TRUE;  // return TRUE unless you set the focus to a control
00068           // EXCEPTION: OCX Property Pages should return FALSE
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CCSPropertyPage
00073
00074 CCSPropertyPage::CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption)
00075   : CPropertyPage(nIDTemplate, nIDCaption)
00076 {
00077 }
00078
00079 CCSPropertyPage::CCSPropertyPage(LPCTSTR lpszTemplateName,
00080   UINT nIDCaption) : CPropertyPage(lpszTemplateName, nIDCaption)
00081 {
00082 }
00083
00084 BEGIN_MESSAGE_MAP(CCSPropertyPage, CPropertyPage)
00085   //{{AFX_MSG_MAP(CCSPropertyPage)
00086   //}}AFX_MSG_MAP
00087   ON_MESSAGE(WM_HELP, OnHelp)
00088   ON_MESSAGE(WM_CONTEXTMENU, OnHelpContextMenu)
00089 END_MESSAGE_MAP()
00090
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // CCSPropertyPage message handlers
00094
00095 LRESULT CCSPropertyPage::OnHelp(WPARAM, LPARAM lParam)
00096 {
00097   ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
00098     HELP_WM_HELP, (ULONG_PTR)(LPVOID)GetHelpIDs());
00099   return 0;
00100 }
00101
00102 LRESULT CCSPropertyPage::OnHelpContextMenu(WPARAM wParam, LPARAM)
00103 {
00104   ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
00105     HELP_CONTEXTMENU, (ULONG_PTR)(LPVOID)GetHelpIDs());
00106   return 0;
00107 }
00108
00109 /////////////////////////////////////////////////////////////////////////////
00110 // CCSPropertySheet
00111
00112 BEGIN_MESSAGE_MAP(CCSPropertySheet, CPropertySheet)
00113   //{{AFX_MSG_MAP(CCSPropertySheet)
00114   //}}AFX_MSG_MAP
00115   ON_MESSAGE(WM_HELP, OnHelp)
00116   ON_MESSAGE(WM_CONTEXTMENU, OnHelpContextMenu)
00117 END_MESSAGE_MAP()
00118
00119 CCSPropertySheet::CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd,
00120   UINT iSelectPage) : CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00121 {
00122 }
00123
00124 CCSPropertySheet::CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd,
00125   UINT iSelectPage) : CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00126 {
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CCSPropertySheet message handlers
00131
00132 LRESULT CCSPropertySheet::OnHelp(WPARAM wParam, LPARAM lParam)
00133 {
00134   GetActivePage()->SendMessage(WM_HELP, wParam, lParam);
00135   return 0;
00136 }
00137
00138 LRESULT CCSPropertySheet::OnHelpContextMenu(WPARAM wParam, LPARAM lParam)
00139 {
00140   GetActivePage()->SendMessage(WM_CONTEXTMENU, wParam, lParam);
00141   return 0;
00142 }
00143
00144 BOOL CCSPropertySheet::PreCreateWindow(CREATESTRUCT& cs)
00145 {
00146   cs.dwExStyle |= WS_EX_CONTEXTHELP;
00147   return CPropertySheet::PreCreateWindow(cs);
00148 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/mainfrm.cpp Source File

  • advanced
  • cube

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "cube.h"
00014
00015 #include "cubedoc.h"
00016 #include "cubeview.h"
00017 #include "mainfrm.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00030   //{{AFX_MSG_MAP(CMainFrame)
00031   ON_WM_CREATE()
00032   ON_WM_PALETTECHANGED()
00033   ON_WM_QUERYNEWPALETTE()
00034   //}}AFX_MSG_MAP
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // arrays of IDs used to initialize control bars
00039
00040 // toolbar buttons - IDs are command buttons
00041 static UINT BASED_CODE buttons[] =
00042 {
00043   // same order as in the bitmap 'toolbar.bmp'
00044   ID_FILE_PLAY,
00045   ID_APP_ABOUT,
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CMainFrame construction/destruction
00050
00051 CMainFrame::CMainFrame()
00052 {
00053   // TODO: add member initialization code here
00054
00055 }
00056
00057 CMainFrame::~CMainFrame()
00058 {
00059 }
00060
00061 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00062 {
00063   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00064     return -1;
00065
00066   if (!m_wndToolBar.Create(this) ||
00067     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00068     !m_wndToolBar.SetButtons(buttons,
00069       sizeof(buttons)/sizeof(UINT)))
00070   {
00071     TRACE0("Failed to create toolbar\n");
00072     return -1;      // fail to create
00073   }
00074
00075   // TODO: Delete these three lines if you don't want the toolbar to
00076   //  be dockable
00077   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00078   EnableDocking(CBRS_ALIGN_ANY);
00079   DockControlBar(&m_wndToolBar);
00080
00081   // TODO: Remove this if you don't want tool tips
00082   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00083     CBRS_TOOLTIPS | CBRS_FLYBY);
00084
00085   return 0;
00086 }
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CMainFrame diagnostics
00090
00091 #ifdef _DEBUG
00092 void CMainFrame::AssertValid() const
00093 {
00094   CFrameWnd::AssertValid();
00095 }
00096
00097 void CMainFrame::Dump(CDumpContext& dc) const
00098 {
00099   CFrameWnd::Dump(dc);
00100 }
00101
00102 #endif //_DEBUG
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CMainFrame message handlers
00106
00107 void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd)
00108 {
00109   CFrameWnd::OnPaletteChanged(pFocusWnd);
00110
00111   if(pFocusWnd != this)
00112     OnQueryNewPalette();
00113 }
00114
00115 BOOL CMainFrame::OnQueryNewPalette()
00116 {
00117   int        i;
00118   CPalette    *pOldPal;
00119   CCubeView   *pView = (CCubeView *)GetActiveView();
00120   CClientDC   dc(pView);
00121
00122
00123   pOldPal = dc.SelectPalette(&pView->m_cPalette, FALSE);
00124   i = dc.RealizePalette();
00125   dc.SelectPalette(pOldPal, FALSE);
00126
00127   if(i > 0)
00128     InvalidateRect(NULL);
00129
00130
00131   return CFrameWnd::OnQueryNewPalette();
00132 }
00133
00134 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00135 {
00136   // remove this flag to remove " - Untitled" from the frame's caption
00137
00138   cs.style &= ~ FWS_ADDTOTITLE;
00139
00140   return CFrameWnd::PreCreateWindow(cs);
00141 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagCTLINITHEDIT Member List

This is the complete list of members for tagCTLINITHEDIT, including all inherited members.
cbSize | tagCTLINITHEDIT
dwFlags | tagCTLINITHEDIT
dwReserved | tagCTLINITHEDIT
hwnd | tagCTLINITHEDIT
id | tagCTLINITHEDIT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/bounce.h Source File

  • advanced
  • mtmdi

bounce.h

Go to the documentation of this file.
00001 // bounce.h : Declares the class interfaces for the Bounce child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #ifndef __BOUNCE_H__
00014 #define __BOUNCE_H__
00015
00016 #define IDC_BOUNCE_WND 1
00017
00018 // COnCmdMsg struct is used to pass the OnCmdMsg parameters via SendMessage
00019 // from the CBounceMDIChildWnd in the main application thread to the
00020 // CBounceWnd in the separate u/i thread.
00021 struct COnCmdMsg
00022 {
00023   int m_nID;
00024   int m_nCode;
00025   void* m_pExtra;
00026   AFX_CMDHANDLERINFO* m_pHandlerInfo;
00027 };
00028
00029 #define WM_USER_ONCMDMSG (WM_USER + 0x1000)
00030 #define WM_USER_PREPARE_TO_CLOSE (WM_USER + 0x1001)
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // A CBounceWnd is a child window of the CBounceMDIChildWnd.
00034 // The CBounceMDIChildWnd executes in the same thread as that of the
00035 // CMainFrame (CMDIFrameWnd), which is the main application thread.
00036
00037 class CBounceMDIChildWnd : public CMDIChildWnd
00038 {
00039 private:
00040   using CMDIChildWnd::Create;
00041
00042 public:
00043   CBounceMDIChildWnd();
00044   BOOL Create(LPCTSTR szTitle, LONG style = 0,
00045       const RECT& rect = rectDefault,
00046       CMDIFrameWnd* pParent = NULL);
00047
00048 // Overrides
00049   // ClassWizard generated virtual function overrides
00050   //{{AFX_VIRTUAL(CBounceMDIChildWnd)
00051   public:
00052   virtual BOOL DestroyWindow();
00053   //}}AFX_VIRTUAL
00054
00055 // Implementation
00056 protected:
00057   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
00058     AFX_CMDHANDLERINFO* pHandlerInfo);
00059   static CMenu NEAR menu;     // menu for all BOUNCE windows
00060
00061   // message handlers
00062   //{{AFX_MSG(CBounceMDIChildWnd)
00063   afx_msg void OnSize(UINT nType, int cx, int cy);
00064   //}}AFX_MSG
00065   afx_msg LRESULT OnPrepareToClose(WPARAM wParam = 0, LPARAM lParam = 0);
00066
00067   DECLARE_MESSAGE_MAP()
00068 };
00069
00070 class CBounceWnd : public CWnd
00071 {
00072 private:
00073   using CWnd::Create;
00074
00075   DECLARE_DYNAMIC(CBounceWnd)
00076 public:
00077   CBounceWnd();
00078   BOOL Create(LPCTSTR szTitle, LONG style, const RECT& rect, CWnd* pParent);
00079
00080 // Overrides
00081   // ClassWizard generated virtual function overrides
00082   //{{AFX_VIRTUAL(CBounceWnd)
00083   //}}AFX_VIRTUAL
00084
00085 // Implementation
00086 protected:
00087   // bounce window client area and bouncing ball color/size parameters
00088   UINT m_nIDColor;
00089   COLORREF m_clrBall;
00090
00091   BOOL m_bFastSpeed;          // current speed
00092
00093   CPoint m_ptPixel;           // pixel size
00094   CSize m_sizeRadius;         // radius of ball
00095   CSize m_sizeMove;           // move speed
00096   CSize m_sizeTotal;          // total size for ball bitmap
00097   CPoint m_ptCenter;          // current center for the ball
00098
00099   // for replicating bouncing ball
00100   CBitmap m_bmBall;
00101
00102   void MakeNewBall();
00103   void ChangeSpeed();
00104
00105   // message handlers
00106   //{{AFX_MSG(CBounceWnd)
00107   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00108   afx_msg void OnSize(UINT nType, int cx, int cy);
00109   afx_msg void OnTimer(UINT_PTR nIDEvent);
00110   afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
00111   afx_msg void OnColor();
00112   afx_msg void OnCustomColor();
00113   afx_msg void OnUpdateSlow(CCmdUI* pCmdUI);
00114   afx_msg void OnSlow();
00115   afx_msg void OnUpdateFast(CCmdUI* pCmdUI);
00116   afx_msg void OnFast();
00117   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00118   afx_msg void OnDestroy();
00119   //}}AFX_MSG
00120   afx_msg LRESULT OnDelegatedCmdMsg(WPARAM, LPARAM);
00121   afx_msg LRESULT OnPrepareToClose(WPARAM wParam = 0, LPARAM lParam = 0);
00122
00123   DECLARE_MESSAGE_MAP()
00124 };
00125
00126 /////////////////////////////////////////////////////////////////////////////
00127
00128 #endif // __BOUNCE_H__
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemoView.h Source File

  • vc2008fp
  • IEDemo

IEDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CIEDemoView : public CHtmlView
00014 {
00015 protected: // create from serialization only
00016   CIEDemoView();
00017   DECLARE_DYNCREATE(CIEDemoView)
00018
00019 // Attributes
00020 public:
00021   CIEDemoDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CIEDemoView)
00029   public:
00030   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00031   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00032   virtual void OnDocumentComplete(LPCTSTR lpszURL);
00033   virtual void OnTitleChange(LPCTSTR lpszText);
00034   virtual void OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel);
00035   virtual void OnInitialUpdate();
00036   virtual void OnProgressChange(long nProgress, long nProgressMax);
00037   protected:
00038   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00039   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00040   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 public:
00045   virtual ~CIEDemoView();
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050
00051 protected:
00052
00053 // Generated message map functions
00054 protected:
00055   //{{AFX_MSG(CIEDemoView)
00056   afx_msg void OnGoBack();
00057   afx_msg void OnGoForward();
00058   afx_msg void OnGoSearchTheWeb();
00059   afx_msg void OnGoStartPage();
00060   afx_msg void OnViewStop();
00061   afx_msg void OnViewRefresh();
00062   afx_msg void OnViewFontsLargest();
00063   afx_msg void OnViewFontsLarge();
00064   afx_msg void OnViewFontsMedium();
00065   afx_msg void OnViewFontsSmall();
00066   afx_msg void OnViewFontsSmallest();
00067   afx_msg void OnFileOpen();
00068   afx_msg void OnUpdateGoForward(CCmdUI* pCmdUI);
00069   afx_msg void OnUpdateGoBack(CCmdUI* pCmdUI);
00070   afx_msg void OnDestroy();
00071   //}}AFX_MSG
00072   DECLARE_MESSAGE_MAP()
00073 };
00074
00075 #ifndef _DEBUG  // debug version in IEDemoView.cpp
00076 inline CIEDemoDoc* CIEDemoView::GetDocument()
00077    { return (CIEDemoDoc*)m_pDocument; }
00078 #endif
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CToolbarDateTimePickerView Member List

This is the complete list of members for CToolbarDateTimePickerView, including all inherited members.
CToolbarDateTimePickerView() | CToolbarDateTimePickerView | [protected]
GetDocument() | CToolbarDateTimePickerView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CToolbarDateTimePickerView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CToolbarDateTimePickerView | [protected]
OnDraw(CDC *pDC) | CToolbarDateTimePickerView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CToolbarDateTimePickerView | [protected, virtual]
OnFilePrintPreview() | CToolbarDateTimePickerView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CToolbarDateTimePickerView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CToolbarDateTimePickerView | [virtual]
~CToolbarDateTimePickerView() | CToolbarDateTimePickerView | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Mdlsmain.cpp Source File

  • general
  • dlgcbr32

Mdlsmain.cpp

Go to the documentation of this file.
00001 // Dlgcbr32.cpp : Defines the class behaviors for CModelessMain.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include <afxpriv.h>
00014 #include "mdlsmain.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CModelessMain
00024
00025 IMPLEMENT_DYNAMIC(CModelessMain, CModelessDialog)
00026
00027 BEGIN_MESSAGE_MAP(CModelessMain, CModelessDialog)
00028   //{{AFX_MSG_MAP(CModelessMain)
00029   ON_WM_CLOSE()
00030   ON_WM_PAINT()
00031   ON_WM_ERASEBKGND()
00032   ON_WM_QUERYDRAGICON()
00033   ON_WM_ENTERIDLE()
00034   ON_WM_INITMENUPOPUP()
00035   ON_WM_MENUSELECT()
00036   ON_MESSAGE(WM_SETMESSAGESTRING, OnSetMessageString)
00037   ON_MESSAGE(WM_POPMESSAGESTRING, OnPopMessageString)
00038   //}}AFX_MSG_MAP
00039   ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipText)
00040   ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipText)
00041
00042   // Standard View menu options
00043   ON_COMMAND(ID_VIEW_STATUS_BAR, OnStatusBarCheck)
00044   ON_COMMAND(ID_VIEW_TOOLBAR, OnToolBarCheck)
00045   ON_UPDATE_COMMAND_UI(ID_VIEW_STATUS_BAR, OnUpdateStatusBarMenu)
00046   ON_UPDATE_COMMAND_UI(ID_VIEW_TOOLBAR, OnUpdateToolBarMenu)
00047
00048   // Standard status bar mode indicators
00049   ON_UPDATE_COMMAND_UI(ID_INDICATOR_CAPS, OnUpdateKeyIndicator)
00050   ON_UPDATE_COMMAND_UI(ID_INDICATOR_NUM, OnUpdateKeyIndicator)
00051   ON_UPDATE_COMMAND_UI(ID_INDICATOR_SCRL, OnUpdateKeyIndicator)
00052
00053 END_MESSAGE_MAP()
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CModelessMain Construction/Destruction
00057
00058 CModelessMain::CModelessMain()
00059 {
00060   m_hIcon = NULL;
00061
00062   m_nIDTracking     = 0;
00063   m_nIDLastMessage  = 0;
00064
00065   m_lpaIDStatusBar  = NULL;
00066   m_cIDStatusBar    = 0;
00067
00068   m_lpaIDToolBar    = NULL;
00069   m_cIDToolBar      = 0;
00070   m_nIDBitmap       = 0;
00071 }
00072
00073 CModelessMain::~CModelessMain()
00074 {
00075 }
00076
00077 ////////////////////////////////////////////////////////////////////////////
00078 // CModelessMain::Create
00079 //      Create saves away information about the status bar and toolbar,
00080 //      loads the dialog icon, and creates the dialog window.  It assumes
00081 //      the dialog icon has the same resource ID as the dialog template
00082 //      itself.
00083
00084 BOOL CModelessMain::Create(UINT nIDTemplate,
00085                const UINT FAR* lpaIDStatus, int cIDStatus,
00086                const UINT FAR* lpaIDToolbar, int cIDToolbar,
00087                UINT nIDBitmap)
00088 {
00089   m_hIcon = AfxGetApp()->LoadIcon(nIDTemplate);
00090
00091   m_lpaIDStatusBar = lpaIDStatus;
00092   m_cIDStatusBar   = cIDStatus;
00093
00094   m_lpaIDToolBar   = lpaIDToolbar;
00095   m_cIDToolBar     = cIDToolbar;
00096   m_nIDBitmap      = nIDBitmap;
00097
00098   return CModelessDialog::Create(nIDTemplate);
00099 }
00100
00101 BOOL CModelessMain::Create(LPCTSTR lpszTemplateName,
00102                const UINT FAR* lpaIDStatus, int cIDStatus,
00103                const UINT FAR* lpaIDToolbar, int cIDToolbar,
00104                UINT nIDBitmap)
00105 {
00106   ASSERT(lpszTemplateName != NULL);
00107
00108   m_hIcon = AfxGetApp()->LoadIcon(lpszTemplateName);
00109
00110   m_lpaIDStatusBar = lpaIDStatus;
00111   m_cIDStatusBar   = cIDStatus;
00112
00113   m_lpaIDToolBar   = lpaIDToolbar;
00114   m_cIDToolBar     = cIDToolbar;
00115   m_nIDBitmap      = nIDBitmap;
00116
00117   return CModelessDialog::Create(lpszTemplateName);
00118 }
00119
00120
00121 /////////////////////////////////////////////////////////////////////////////
00122 // CModelessMain::OnClose
00123 //      OnClose handles the WM_CLOSE message by posting a WM_QUIT message
00124 //      (so the app shuts down), after performing default processing to
00125 //      actually close the window.
00126
00127 void CModelessMain::OnClose()
00128 {
00129   CModelessDialog::OnClose();
00130   PostQuitMessage(0);
00131 }
00132
00133 /////////////////////////////////////////////////////////////////////////////
00134 // CModelessMain::OnInitDialog
00135 //      OnInitDialog centers the dialog on the screen and creates the status
00136 //      and toolbars.  To make sure the control bars don't overlap any
00137 //      dialog controls, the dialog's client area is expanded by the amount
00138 //      of space required for the control bars.
00139
00140 BOOL CModelessMain::OnInitDialog()
00141 {
00142   CModelessDialog::OnInitDialog();
00143
00144   // Create status bar at the bottom of the dialog window
00145   if (m_statusBar.Create(this))
00146   {
00147     m_statusBar.SetIndicators(m_lpaIDStatusBar, m_cIDStatusBar);
00148     OnSetMessageString(AFX_IDS_IDLEMESSAGE);
00149
00150     // Make a sunken or recessed border around the first pane
00151     m_statusBar.SetPaneInfo(0, m_statusBar.GetItemID(0),
00152       SBPS_STRETCH, NULL );
00153   }
00154
00155   // Create toolbar at the top of the dialog window
00156   if (m_toolBar.Create(this))
00157   {
00158     m_toolBar.LoadBitmap(m_nIDBitmap);
00159     m_toolBar.SetButtons(m_lpaIDToolBar, m_cIDToolBar);
00160   }
00161
00162   m_toolBar.SetBarStyle(m_toolBar.GetBarStyle() |
00163     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00164
00165   // We need to resize the dialog to make room for control bars.
00166   // First, figure out how big the control bars are.
00167   CRect rcClientStart;
00168   CRect rcClientNow;
00169   GetClientRect(rcClientStart);
00170   RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,
00171            0, reposQuery, rcClientNow);
00172
00173   // Now move all the controls so they are in the same relative
00174   // position within the remaining client area as they would be
00175   // with no control bars.
00176   CPoint ptOffset(rcClientNow.left - rcClientStart.left,
00177           rcClientNow.top - rcClientStart.top);
00178
00179   CRect  rcChild;
00180   CWnd* pwndChild = GetWindow(GW_CHILD);
00181   while (pwndChild)
00182   {
00183     pwndChild->GetWindowRect(rcChild);
00184     ScreenToClient(rcChild);
00185     rcChild.OffsetRect(ptOffset);
00186     pwndChild->MoveWindow(rcChild, FALSE);
00187     pwndChild = pwndChild->GetNextWindow();
00188   }
00189
00190   // Adjust the dialog window dimensions
00191   CRect rcWindow;
00192   GetWindowRect(rcWindow);
00193   rcWindow.right += rcClientStart.Width() - rcClientNow.Width();
00194   rcWindow.bottom += rcClientStart.Height() - rcClientNow.Height();
00195   MoveWindow(rcWindow, FALSE);
00196
00197   // And position the control bars
00198   RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
00199
00200   // Set the icon for this dialog.  The framework does this automatically
00201   //  when the application's main window is not a dialog
00202   SetIcon(m_hIcon, TRUE);         // Set big icon
00203   SetIcon(m_hIcon, FALSE);        // Set small icon
00204
00205   // Finally, center the dialog on the screen
00206   CenterWindow();
00207   return TRUE;
00208 }
00209
00210 /////////////////////////////////////////////////////////////////////////////
00211 // CModelessMain::OnPaint
00212 // CModelessMain::OnEraseBkgnd
00213 // CModelessMain::OnQueryDragIcon
00214 //      These functions are used to display a custom icon for the dialog.
00215 //
00216 //      These functions use a technique described in KB article Q87976
00217 //      to display a custom icon for our dialog window.  We assume that
00218 //      the icon has been loaded into m_hIcon.
00219
00220 void CModelessMain::OnPaint()
00221 {
00222   CPaintDC dc(this);
00223   if (IsIconic() && m_hIcon)
00224   {
00225     // Erase the icon background when placed over other app window
00226     DefWindowProc(WM_ICONERASEBKGND, (WORD)dc.m_hDC, 0L);
00227
00228     // Center the icon
00229     CRect rc;
00230     GetClientRect(&rc);
00231     rc.left = (rc.right - ::GetSystemMetrics(SM_CXICON))/2;
00232     rc.top  = (rc.bottom - ::GetSystemMetrics(SM_CYICON))/2;
00233
00234     // Draw the icon
00235     dc.DrawIcon(rc.left, rc.top, m_hIcon);
00236   }
00237 }
00238
00239 BOOL CModelessMain::OnEraseBkgnd(CDC* pDC)
00240 {
00241   if (IsIconic() && m_hIcon)
00242     return TRUE;
00243   else
00244     return CModelessDialog::OnEraseBkgnd(pDC);
00245 }
00246
00247 HCURSOR CModelessMain::OnQueryDragIcon()
00248 {
00249   return (HCURSOR)m_hIcon;
00250 }
00251
00252 /////////////////////////////////////////////////////////////////////////////
00253 // CModelessMain::OnInitMenuPopup
00254 //      OnInitMenuPopup updates the state of items on a popup menu.
00255 //
00256 //      This code is based on CFrameWnd::OnInitMenuPopup.  We assume the
00257 //      application does not support context sensitive help.
00258
00259 void CModelessMain::OnInitMenuPopup(CMenu* pPopupMenu, UINT /*nIndex*/, BOOL bSysMenu)
00260 {
00261   if (!bSysMenu)
00262   {
00263     ENSURE(pPopupMenu != NULL);
00264
00265     // check the enabled state of various menu items
00266     CCmdUI state;
00267     state.m_pMenu = pPopupMenu;
00268     ASSERT(state.m_pOther == NULL);
00269
00270     state.m_nIndexMax = pPopupMenu->GetMenuItemCount();
00271     for (state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax;
00272        state.m_nIndex++)
00273     {
00274       state.m_nID = pPopupMenu->GetMenuItemID(state.m_nIndex);
00275       if (state.m_nID == 0)
00276         continue; // menu separator or invalid cmd - ignore it
00277
00278       ASSERT(state.m_pOther == NULL);
00279       ASSERT(state.m_pMenu != NULL);
00280       if (state.m_nID == (UINT)-1)
00281       {
00282         // possibly a popup menu, route to first item of that popup
00283         state.m_pSubMenu = pPopupMenu->GetSubMenu(state.m_nIndex);
00284         if (state.m_pSubMenu == NULL ||
00285           (state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
00286           state.m_nID == (UINT)-1)
00287         {
00288           continue; // first item of popup can't be routed to
00289         }
00290         state.DoUpdate(this, FALSE);  // popups are never auto disabled
00291       }
00292       else
00293       {
00294         // normal menu item
00295         // Auto enable/disable if command is _not_ a system command
00296         state.m_pSubMenu = NULL;
00297         state.DoUpdate(this, state.m_nID < 0xF000);
00298       }
00299     }
00300   }
00301 }
00302
00303 /////////////////////////////////////////////////////////////////////////////
00304 // CModelessMain::OnEnterIdle
00305 //      OnEnterIdle updates the status bar when there's nothing better to do.
00306 //      This code is based on CFrameWnd::OnEnterIdle.
00307
00308 void CModelessMain::OnEnterIdle(UINT nWhy, CWnd* /*pWho*/)
00309 {
00310   if (nWhy != MSGF_MENU || m_nIDTracking == m_nIDLastMessage)
00311     return;
00312
00313   OnSetMessageString(m_nIDTracking);
00314   ASSERT(m_nIDTracking == m_nIDLastMessage);
00315 }
00316
00317 /////////////////////////////////////////////////////////////////////////////
00318 // CModelessMain::OnMenuSelect
00319 //      OnMenuSelect updates the status bar message, based on the state
00320 //      of the dialog menu.
00321 //
00322 //      This code is based on CFrameWnd::OnMenuSelect.  We assume the
00323 //      application does not support context sensitive help.
00324
00325 void CModelessMain::OnMenuSelect(UINT nItemID, UINT nFlags, HMENU /*hSysMenu*/)
00326 {
00327   // set the tracking state
00328   if (nFlags == 0xFFFF)
00329   {
00330     // cancel menu operation (go back to idle now)
00331     m_nIDTracking = AFX_IDS_IDLEMESSAGE;
00332     OnSetMessageString(m_nIDTracking);  // set string now
00333     ASSERT(m_nIDTracking == m_nIDLastMessage);
00334   }
00335   else if (nItemID == 0 ||
00336        nFlags & (MF_SEPARATOR|MF_POPUP|MF_MENUBREAK|MF_MENUBARBREAK))
00337   {
00338     // nothing should be displayed
00339     m_nIDTracking = 0;
00340   }
00341   else if (nItemID >= 0xF000 && nItemID < 0xF1F0)
00342   {
00343     // special string table entries for system commands
00344     m_nIDTracking = ID_COMMAND_FROM_SC(nItemID);
00345     ASSERT(m_nIDTracking >= AFX_IDS_SCFIRST &&
00346          m_nIDTracking < AFX_IDS_SCFIRST + 31);
00347   }
00348   else
00349   {
00350     // track on idle
00351     m_nIDTracking = nItemID;
00352   }
00353 }
00354
00355 /////////////////////////////////////////////////////////////////////////////
00356 // CModelessMain::OnSetMessageString
00357 //      OnSetMessageString updates the status bar text.
00358 //
00359 //      This code is based on CFrameWnd::OnSetMessageString.  We assume
00360 //      a string ID is always passed in wParam.
00361
00362 LRESULT CModelessMain::OnSetMessageString(WPARAM wParam, LPARAM /*lParam*/)
00363 {
00364   UINT    nIDMsg = (UINT)wParam;
00365   CString strMsg;
00366
00367   if (nIDMsg)
00368   {
00369     if (strMsg.LoadString(nIDMsg) != 0)
00370     {
00371       CString strStatusText;
00372       AfxExtractSubString(strStatusText, strMsg, 0, '\n');
00373       m_statusBar.SetWindowText(strStatusText);
00374     }
00375     else
00376       TRACE1("Warning: no message line prompt for ID %x%04X\n", nIDMsg);
00377   }
00378
00379   UINT nIDLast     = m_nIDLastMessage;
00380   m_nIDLastMessage = nIDMsg;
00381   m_nIDTracking    = nIDMsg;
00382   return nIDLast;
00383
00384 }
00385
00386 /////////////////////////////////////////////////////////////////////////////
00387 // CModelessMain::OnStatusBarCheck
00388 //      OnStatusBarCheck toggles the status of the status bar when the
00389 //      corresponding View option is selected from the menu.
00390
00391 void CModelessMain::OnStatusBarCheck()
00392 {
00393   m_statusBar.ShowWindow(m_statusBar.IsWindowVisible() ? SW_HIDE : SW_SHOWNA);
00394 }
00395
00396 /////////////////////////////////////////////////////////////////////////////
00397 // CModelessMain::OnUpdateStatusBarMenu
00398 //      OnUpdateStatusBarMenu checks or unchecks the View option,
00399 //      depending on whether or not the status bar is visible.
00400
00401 void CModelessMain::OnUpdateStatusBarMenu(CCmdUI* pCmdUI)
00402 {
00403   ASSERT(pCmdUI->m_nID == ID_VIEW_STATUS_BAR);
00404   pCmdUI->SetCheck(m_statusBar.IsWindowVisible());
00405 }
00406
00407 /////////////////////////////////////////////////////////////////////////////
00408 // CModelessMain::OnToolBarCheck
00409 //      OnToolBarCheck toggles the status of the toolbar when the
00410 //      corresponding View option is selected from the menu.
00411
00412 void CModelessMain::OnToolBarCheck()
00413 {
00414   m_toolBar.ShowWindow(m_toolBar.IsWindowVisible() ? SW_HIDE : SW_SHOWNA);
00415 }
00416
00417 /////////////////////////////////////////////////////////////////////////////
00418 // CModelessMain::OnUpdateToolBarMenu
00419 //      OnUpdateToolBarMenu checks or unchecks the View option,
00420 //      depending on whether or not the toolbar is visible.
00421
00422 void CModelessMain::OnUpdateToolBarMenu(CCmdUI* pCmdUI)
00423 {
00424   ASSERT(pCmdUI->m_nID == ID_VIEW_TOOLBAR);
00425   pCmdUI->SetCheck(m_toolBar.IsWindowVisible());
00426 }
00427
00428 /////////////////////////////////////////////////////////////////////////////
00429 // CModelessMain::OnUpdateKeyIndicator
00430 //      OnUpdateKeyIndicator enables or disables one of the key indicators
00431 //      in a status bar.  It recognizes the CAPS, NUM, and SCRL keys.
00432
00433 void CModelessMain::OnUpdateKeyIndicator(CCmdUI* pCmdUI)
00434 {
00435   UINT nVK;
00436
00437   switch (pCmdUI->m_nID)
00438   {
00439   case ID_INDICATOR_CAPS:
00440     nVK = VK_CAPITAL;
00441     break;
00442
00443   case ID_INDICATOR_NUM:
00444     nVK = VK_NUMLOCK;
00445     break;
00446
00447   case ID_INDICATOR_SCRL:
00448     nVK = VK_SCROLL;
00449     break;
00450
00451   default:
00452     TRACE1("Warning: OnUpdateKeyIndicator - unknown indicator 0x%04X\n",
00453       pCmdUI->m_nID);
00454     pCmdUI->ContinueRouting();
00455     return; // not for us
00456   }
00457
00458   pCmdUI->Enable(::GetKeyState(nVK) & 1);
00459     // enable static text based on toggled key state
00460   ASSERT(pCmdUI->m_bEnableChanged);
00461 }
00462
00463 /////////////////////////////////////////////////////////////////////////////
00464 // CModelessMain::OnPopMessageString
00465 //      Resets status bar message string.  This code is based on
00466 //      CFrameWnd::OnPopMessageString
00467
00468 LRESULT CModelessMain::OnPopMessageString(WPARAM wParam, LPARAM lParam)
00469 {
00470   if (m_nFlags & WF_NOPOPMSG)
00471     return 0;
00472
00473   return SendMessage(WM_SETMESSAGESTRING, wParam, lParam);
00474 }
00475
00476 /////////////////////////////////////////////////////////////////////////////
00477 // CModelessMain::OnToolTipText
00478 //      Handles TTN_NEEDTEXT message to display tooltips for the toolbar.
00479 //      This code is based on CFrameWnd::OnToolTipText
00480
00481 BOOL CModelessMain::OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult)
00482 {
00483   ASSERT(pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW);
00484
00485   // allow top level routing frame to handle the message
00486   if (GetRoutingFrame() != NULL)
00487     return FALSE;
00488
00489   // need to handle both ANSI and UNICODE versions of the message
00490   TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
00491   TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
00492   TCHAR szFullText[256];
00493   CString strTipText;
00494   UINT_PTR nID = (UINT_PTR)pNMHDR->idFrom;
00495   if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) ||
00496     pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
00497   {
00498     // idFrom is actually the HWND of the tool
00499     nID = ((UINT_PTR)(WORD)::GetDlgCtrlID((HWND)nID));
00500   }
00501
00502   if (nID != 0) // will be zero on a separator
00503   {
00504     AfxLoadString((UINT)nID, szFullText);
00505       // this is the command id, not the button index
00506     AfxExtractSubString(strTipText, szFullText, 1, '\n');
00507   }
00508 #ifndef _UNICODE
00509   if (pNMHDR->code == TTN_NEEDTEXTA)
00510     _tcsncpy_s(pTTTA->szText, (sizeof(pTTTA->szText)/sizeof(pTTTA->szText[0])),
00511       strTipText, _TRUNCATE);
00512   else
00513   {
00514     int n = MultiByteToWideChar(CP_ACP, 0, strTipText, -1, pTTTW->szText,
00515       sizeof(pTTTW->szText)/sizeof(pTTTW->szText[0]));
00516     if (n > 0)
00517       pTTTW->szText[n-1] = 0;
00518   }
00519 #else
00520   if (pNMHDR->code == TTN_NEEDTEXTA)
00521   {
00522     int n = WideCharToMultiByte(CP_ACP, 0, strTipText, -1,
00523       pTTTA->szText, sizeof(pTTTA->szText)/sizeof(pTTTA->szText[0]),
00524       NULL, NULL);
00525     if (n > 0)
00526       pTTTA->szText[n-1] = 0;
00527   }
00528   else
00529     _tcsncpy_s(pTTTW->szText, (sizeof(pTTTW->szText)/sizeof(pTTTW->szText[0])),
00530       strTipText, _TRUNCATE);
00531 #endif
00532   *pResult = 0;
00533
00534   // bring the tooltip window above other popup windows
00535   ::SetWindowPos(pNMHDR->hwndFrom, HWND_TOP, 0, 0, 0, 0,
00536     SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE);
00537
00538   return TRUE;    // message was handled
00539 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemo.cpp Source File

  • vc2008fp
  • MDITabsDemo

MDITabsDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MDITabsDemo.h"
00013
00014 #include "MainFrm.h"
00015 #include "ChildFrm.h"
00016 #include "MDITabsDemoDoc.h"
00017 #include "MDITabsDemoView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 CMDITabOptions::CMDITabOptions()
00026 {
00027   m_nMDITabsType = CMDITabOptions::MDITabsStandard;
00028   m_bTabsOnTop = TRUE;
00029   m_bActiveTabCloseButton = FALSE;
00030   m_nTabsStyle = CMFCTabCtrl::STYLE_3D_ONENOTE;
00031   m_bTabsAutoColor = FALSE;
00032   m_bMDITabsIcons = TRUE;
00033   m_bMDITabsDocMenu = FALSE;
00034   m_bDragMDITabs = TRUE;
00035   m_bMDITabsContextMenu = TRUE;
00036   m_nMDITabsBorderSize = 2;
00037   m_bDisableMDIChildRedraw = TRUE;
00038   m_bFlatFrame = TRUE;
00039   m_bCustomTooltips = FALSE;
00040 }
00041
00042 void CMDITabOptions::Load ()
00043 {
00044   m_nMDITabsType =  (MDITabsType) theApp.GetInt (_T("ShowMDITabs"), TRUE);
00045   m_bTabsOnTop = theApp.GetInt (_T("TabsOnTop"), TRUE);
00046   m_bActiveTabCloseButton = theApp.GetInt (_T("ActiveTabCloseButton"), FALSE);
00047   m_nTabsStyle = (CMFCTabCtrl::Style) theApp.GetInt (_T("TabsStyle"), CMFCTabCtrl::STYLE_3D_ONENOTE);
00048   m_bTabsAutoColor = theApp.GetInt (_T("TabsAutoColor"), FALSE);
00049   m_bMDITabsIcons = theApp.GetInt (_T("MDITabsIcons"), TRUE);
00050   m_bMDITabsDocMenu = theApp.GetInt (_T("MDITabsDocMenu"), FALSE);
00051   m_bDragMDITabs = theApp.GetInt (_T("DragMDITabs"), TRUE);
00052   m_bMDITabsContextMenu = theApp.GetInt (_T("MDITabsContextMenu"), TRUE);
00053   m_nMDITabsBorderSize = theApp.GetInt (_T("MDITabsBorderSize"), TRUE);
00054   m_bDisableMDIChildRedraw = theApp.GetInt (_T("DisableMDIChildRedraw"), TRUE);
00055   m_bFlatFrame = theApp.GetInt (_T("FlatFrame"), TRUE);
00056   m_bCustomTooltips = theApp.GetInt (_T("CustomTooltips"), FALSE);
00057 }
00058
00059 void CMDITabOptions::Save ()
00060 {
00061   theApp.WriteInt (_T("ShowMDITabs"), m_nMDITabsType);
00062   theApp.WriteInt (_T("TabsOnTop"), m_bTabsOnTop);
00063   theApp.WriteInt (_T("ActiveTabCloseButton"), m_bActiveTabCloseButton);
00064   theApp.WriteInt (_T("TabsStyle"), m_nTabsStyle);
00065   theApp.WriteInt (_T("TabsAutoColor"), m_bTabsAutoColor);
00066   theApp.WriteInt (_T("MDITabsIcons"), m_bMDITabsIcons);
00067   theApp.WriteInt (_T("MDITabsDocMenu"), m_bMDITabsDocMenu);
00068   theApp.WriteInt (_T("DragMDITabs"), m_bDragMDITabs);
00069   theApp.WriteInt (_T("MDITabsContextMenu"), m_bMDITabsContextMenu);
00070   theApp.WriteInt (_T("MDITabsBorderSize"), m_nMDITabsBorderSize);
00071   theApp.WriteInt (_T("DisableMDIChildRedraw"), m_bDisableMDIChildRedraw);
00072   theApp.WriteInt (_T("FlatFrame"), m_bFlatFrame);
00073   theApp.WriteInt (_T("CustomTooltips"), m_bCustomTooltips);
00074 }
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077 // CMDITabsDemoApp
00078
00079 BEGIN_MESSAGE_MAP(CMDITabsDemoApp, CWinApp)
00080   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00081   // Standard file based document commands
00082   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00083   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00084   // Standard print setup command
00085   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00086 END_MESSAGE_MAP()
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CMDITabsDemoApp construction
00090
00091 CMDITabsDemoApp::CMDITabsDemoApp() :
00092   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00093 {
00094   // TODO: add construction code here,
00095   // Place all significant initialization in InitInstance
00096 }
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // The one and only CMDITabsDemoApp object
00100
00101 CMDITabsDemoApp theApp;
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // CMDITabsDemoApp initialization
00105
00106 BOOL CMDITabsDemoApp::InitInstance()
00107 {
00108   // Initialize OLE libraries
00109   if (!AfxOleInit())
00110   {
00111     AfxMessageBox(IDP_OLE_INIT_FAILED);
00112     return FALSE;
00113   }
00114
00115   AfxEnableControlContainer();
00116
00117   // Standard initialization
00118   // If you are not using these features and wish to reduce the size
00119   //  of your final executable, you should remove from the following
00120   //  the specific initialization routines you do not need.
00121
00122   // Change the registry key under which our settings are stored.
00123   // TODO: You should modify this string to be something appropriate
00124   // such as the name of your company or organization.
00125   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00126   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00127   SetRegistryBase (_T("Settings"));
00128
00129   m_Options.Load ();
00130
00131   // Initialize all Managers for usage. They are automatically constructed
00132   // if not yet present
00133   InitContextMenuManager();
00134   InitKeyboardManager();
00135   InitTooltipManager ();
00136
00137   CMFCToolTipInfo params;
00138   params.m_bVislManagerTheme = TRUE;
00139
00140   GetTooltipManager ()->SetTooltipParams (
00141     AFX_TOOLTIP_TYPE_ALL,
00142     RUNTIME_CLASS (CMFCToolTipCtrl),
00143     &params);
00144
00145   // Register the application's document templates.  Document templates
00146   //  serve as the connection between documents, frame windows and views.
00147
00148   CMultiDocTemplate* pDocTemplate;
00149   pDocTemplate = new CMultiDocTemplate(
00150     IDR_MDITABTYPE,
00151     RUNTIME_CLASS(CMDITabsDemoDoc),
00152     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00153     RUNTIME_CLASS(CMDITabsDemoView));
00154   AddDocTemplate(pDocTemplate);
00155
00156   // create main MDI Frame window
00157   CMainFrame* pMainFrame = new CMainFrame;
00158   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00159     return FALSE;
00160   m_pMainWnd = pMainFrame;
00161
00162   // Parse command line for standard shell commands, DDE, file open
00163   CCommandLineInfo cmdInfo;
00164   ParseCommandLine(cmdInfo);
00165
00166   // Dispatch commands specified on the command line
00167   if (!ProcessShellCommand(cmdInfo))
00168     return FALSE;
00169
00170   OnFileNew ();
00171   OnFileNew ();
00172   OnFileNew ();
00173
00174   // The main window has been initialized, so show and update it.
00175   pMainFrame->ShowWindow(m_nCmdShow);
00176   pMainFrame->UpdateWindow();
00177
00178   if (afxGlobalData.m_nBitsPerPixel < 16)
00179   {
00180     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00181   }
00182
00183   return TRUE;
00184 }
00185
00186 /////////////////////////////////////////////////////////////////////////////
00187 // CMDITabsDemoApp message handlers
00188
00189 int CMDITabsDemoApp::ExitInstance()
00190 {
00191   m_Options.Save ();
00192   return CWinAppEx::ExitInstance();
00193 }
00194
00195 void CMDITabsDemoApp::PreLoadState ()
00196 {
00197   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00198
00199   // TODO: add another context menus here
00200 }
00201
00202 void CMDITabsDemoApp::UpdateMDITabs (BOOL bResetMDIChild)
00203 {
00204   ((CMainFrame*) AfxGetMainWnd ())->UpdateMDITabs (bResetMDIChild);
00205 }
00206
00207 /////////////////////////////////////////////////////////////////////////////
00208 // CAboutDlg dialog used for App About
00209
00210 class CAboutDlg : public CDialog
00211 {
00212 public:
00213   CAboutDlg();
00214
00215 // Dialog Data
00216   //{{AFX_DATA(CAboutDlg)
00217   enum { IDD = IDD_ABOUTBOX };
00218   //}}AFX_DATA
00219
00220   // ClassWizard generated virtual function overrides
00221   //{{AFX_VIRTUAL(CAboutDlg)
00222   protected:
00223   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00224   //}}AFX_VIRTUAL
00225
00226 // Implementation
00227 protected:
00228   //{{AFX_MSG(CAboutDlg)
00229     // No message handlers
00230   //}}AFX_MSG
00231   DECLARE_MESSAGE_MAP()
00232 };
00233
00234 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00235 {
00236   //{{AFX_DATA_INIT(CAboutDlg)
00237   //}}AFX_DATA_INIT
00238 }
00239
00240 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00241 {
00242   CDialog::DoDataExchange(pDX);
00243   //{{AFX_DATA_MAP(CAboutDlg)
00244   //}}AFX_DATA_MAP
00245 }
00246
00247 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00248   //{{AFX_MSG_MAP(CAboutDlg)
00249     // No message handlers
00250   //}}AFX_MSG_MAP
00251 END_MESSAGE_MAP()
00252
00253 // App command to run the dialog
00254 void CMDITabsDemoApp::OnAppAbout()
00255 {
00256   CAboutDlg aboutDlg;
00257   aboutDlg.DoModal();
00258 }
00259
00260 /////////////////////////////////////////////////////////////////////////////
00261 // CMDITabsDemoApp message handlers
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPage4 Member List

This is the complete list of members for CPage4, including all inherited members.
CPage4() | CPage4 |
DoDataExchange(CDataExchange *pDX) | CPage4 | [protected, virtual]
IDD enum value | CPage4 |
m_strValue1 | CPage4 |
m_strValue2 | CPage4 |
m_strValue3 | CPage4 |
m_strValue4 | CPage4 |
m_strValue5 | CPage4 |
m_wndMaskEdit1 | CPage4 |
m_wndMaskEdit2 | CPage4 |
m_wndMaskEdit3 | CPage4 |
m_wndMaskEdit4 | CPage4 |
m_wndMaskEdit5 | CPage4 |
OnButtonGet() | CPage4 | [protected]
OnInitDialog() | CPage4 | [protected, virtual]
~CPage4() | CPage4 |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mdi.cpp Source File

  • advanced
  • mtmdi

mdi.cpp

Go to the documentation of this file.
00001 // mdi.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mdi.h"
00014
00015 #include "mainfrm.h"
00016 #include "bounce.h"
00017 #include "mtbounce.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMdiApp
00026
00027 BEGIN_MESSAGE_MAP(CMdiApp, CWinApp)
00028   //{{AFX_MSG_MAP(CMdiApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CMdiApp construction
00035 // Place all significant initialization in InitInstance
00036
00037 CMdiApp::CMdiApp()
00038 {
00039 }
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // The one and only CMdiApp object
00043
00044 CMdiApp NEAR theApp;
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMdiApp initialization
00048
00049 BOOL CMdiApp::InitInstance()
00050 {
00051   // Win32 multi-threading APIs are not available on non-NT versions
00052   // of Windows less than Windows version 4.0.
00053   if ((::GetVersion() & 0x80000000) && (BYTE(::GetVersion()) < 4))
00054   {
00055     AfxMessageBox(IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4);
00056     return FALSE;
00057   }
00058
00059   // create main MDI Frame window
00060   CMainFrame* pMainFrame = new CMainFrame;
00061   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00062   {
00063     delete pMainFrame;
00064     return FALSE;
00065   }
00066   pMainFrame->ShowWindow(m_nCmdShow);
00067   pMainFrame->UpdateWindow();
00068   m_pMainWnd = pMainFrame;
00069
00070   CBounceThread::m_hEventBounceThreadKilled
00071     = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset
00072
00073   return TRUE;
00074 }
00075
00076 int CMdiApp::ExitInstance()
00077 {
00078   CloseHandle(CBounceThread::m_hEventBounceThreadKilled);
00079
00080   return CWinApp::ExitInstance();
00081 }
00082
00083 /////////////////////////////////////////////////////////////////////////////
00084 // CMdiApp commands
00085
00086 void CMdiApp::OnAppAbout()
00087 {
00088   CDialog(IDD_ABOUTBOX).DoModal();
00089 }
00090
00091 /////////////////////////////////////////////////////////////////////////////
00092 // other globals
00093
00094 // Color array maps to Color menu
00095 COLORREF NEAR colorArray[] =
00096 {
00097   RGB (0, 0, 0),
00098   RGB (255, 0, 0),
00099   RGB (0, 255, 0),
00100   RGB (0, 0, 255),
00101   RGB (255, 255, 255)
00102 };
00103
00104 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/MonthCal.cpp Source File

  • general
  • CmnCtrl1

MonthCal.cpp

Go to the documentation of this file.
00001 // MonthCalPage.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "resource.h"
00014
00015 #include "MonthCal.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMonthCalPage property page
00025
00026 IMPLEMENT_DYNCREATE(CMonthCalPage, CPropertyPage)
00027
00028 CMonthCalPage::CMonthCalPage() : CPropertyPage(CMonthCalPage::IDD)
00029 {
00030   //{{AFX_DATA_INIT(CMonthCalPage)
00031   m_nMaxSelCount = 0;
00032   m_pszRange = _T("");
00033   m_pszSelection = _T("");
00034   m_bDayState = FALSE;
00035   m_bNoToday = FALSE;
00036   m_bNoTodayCircle = FALSE;
00037   m_bWeekNumbers = FALSE;
00038   m_bMultiSelect = FALSE;
00039   //}}AFX_DATA_INIT
00040   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00041 }
00042
00043 CMonthCalPage::~CMonthCalPage()
00044 {
00045 }
00046
00047 void CMonthCalPage::DoDataExchange(CDataExchange* pDX)
00048 {
00049   CPropertyPage::DoDataExchange(pDX);
00050   //{{AFX_DATA_MAP(CMonthCalPage)
00051   DDX_Control(pDX, IDC_EDSELRANGE, m_edMaxSel);
00052   DDX_Control(pDX, IDC_NOTIFYLIST, m_NotifyList);
00053   DDX_Text(pDX, IDC_EDSELRANGE, m_nMaxSelCount);
00054   DDX_Text(pDX, IDC_STRRANGE, m_pszRange);
00055   DDX_Text(pDX, IDC_STRSELECTION, m_pszSelection);
00056   DDX_Check(pDX, IDC_CKDAYSTATE, m_bDayState);
00057   DDX_Check(pDX, IDC_CKNOTODAY, m_bNoToday);
00058   DDX_Check(pDX, IDC_CKNOTODAYCIRCLE, m_bNoTodayCircle);
00059   DDX_Check(pDX, IDC_CKWEEKNUMBERS, m_bWeekNumbers);
00060   DDX_Check(pDX, IDC_CMULTISELECT, m_bMultiSelect);
00061   //}}AFX_DATA_MAP
00062 }
00063
00064
00065 BEGIN_MESSAGE_MAP(CMonthCalPage, CPropertyPage)
00066   //{{AFX_MSG_MAP(CMonthCalPage)
00067   ON_BN_CLICKED(IDC_CKNOTODAY, OnCknotoday)
00068   ON_BN_CLICKED(IDC_CKNOTODAYCIRCLE, OnCknotodaycircle)
00069   ON_BN_CLICKED(IDC_CKWEEKNUMBERS, OnCkweeknumbers)
00070   ON_BN_CLICKED(IDC_CMULTISELECT, OnCmultiselect)
00071   ON_EN_CHANGE(IDC_EDSELRANGE, OnChangeEdselrange)
00072   ON_BN_CLICKED(IDC_CKDAYSTATE, OnCkdaystate)
00073   //}}AFX_MSG_MAP
00074   ON_NOTIFY(MCN_SELCHANGE,IDC_MONTHCAL,HandleSelChange)
00075   ON_NOTIFY(MCN_SELECT,IDC_MONTHCAL,HandleSelect)
00076   ON_NOTIFY(MCN_GETDAYSTATE,IDC_MONTHCAL,GetDayState)
00077 END_MESSAGE_MAP()
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CMonthCalPage message handlers
00081
00082 BOOL CMonthCalPage::OnInitDialog()
00083 {
00084   CPropertyPage::OnInitDialog();
00085
00086   CWnd *pFrame = GetDlgItem(IDC_MCFRAME);
00087   CRect rcWnd;
00088   pFrame->GetClientRect(rcWnd);
00089   pFrame->DestroyWindow(); //pFrame was just a placeholder anyway.
00090   m_MonthCal.Create(WS_CHILD|WS_VISIBLE,CPoint(rcWnd.left,rcWnd.top),this,IDC_MONTHCAL);
00091   m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
00092   UpdateData(FALSE);
00093
00094   return TRUE;
00095 }
00096
00097 void CMonthCalPage::OnCknotoday()
00098 {
00099   UpdateData(TRUE);
00100
00101   if(m_bNoToday)
00102   {
00103     //add style
00104     m_MonthCal.ModifyStyle(0,MCS_NOTODAY,SWP_NOSIZE);
00105   }
00106   else
00107   {
00108     //remove style
00109     m_MonthCal.ModifyStyle(MCS_NOTODAY,0,SWP_NOSIZE);
00110   }
00111   m_MonthCal.SizeMinReq();
00112 }
00113 void CMonthCalPage::OnCknotodaycircle()
00114 {
00115   UpdateData(TRUE);
00116   if(m_bNoTodayCircle)
00117   {
00118     //add style
00119     m_MonthCal.ModifyStyle(0,MCS_NOTODAYCIRCLE,SWP_NOSIZE);
00120   }
00121   else
00122   {
00123     //remove style
00124     m_MonthCal.ModifyStyle(MCS_NOTODAYCIRCLE,SWP_NOSIZE);
00125   }
00126
00127 }
00128 void CMonthCalPage::OnCkweeknumbers()
00129 {
00130   UpdateData(TRUE);
00131   if(m_bWeekNumbers)
00132   {
00133     //add style
00134     m_MonthCal.ModifyStyle(0,MCS_WEEKNUMBERS,SWP_NOSIZE);
00135   }
00136   else
00137   {
00138     //remove style
00139     m_MonthCal.ModifyStyle(MCS_WEEKNUMBERS,SWP_NOSIZE);
00140   }
00141   m_MonthCal.SizeMinReq();
00142
00143 }
00144
00145 void CMonthCalPage::OnCmultiselect()
00146 {
00147   UpdateData(TRUE);
00148   if(m_bMultiSelect)
00149   {
00150     long lStyle; CRect rc;
00151     lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
00152     lStyle |= MCS_MULTISELECT;
00153     m_MonthCal.GetClientRect(rc);
00154     m_MonthCal.DestroyWindow();
00155     m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
00156     m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
00157     UpdateData(FALSE);
00158     m_edMaxSel.EnableWindow(TRUE);
00159
00160   }
00161   else
00162   {
00163     //remove style
00164     long lStyle; CRect rc;
00165     lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
00166     lStyle &= ~MCS_MULTISELECT;
00167     m_MonthCal.GetClientRect(rc);
00168     m_MonthCal.DestroyWindow();
00169     m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
00170     m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
00171     UpdateData(FALSE);
00172     m_edMaxSel.EnableWindow(FALSE);
00173   }
00174
00175 }
00176
00177 void CMonthCalPage::OnCkdaystate()
00178 {
00179   UpdateData(TRUE);
00180   if(m_bDayState)
00181   {
00182     long lStyle; CRect rc;
00183     lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
00184     lStyle |= MCS_DAYSTATE;
00185     m_MonthCal.GetClientRect(rc);
00186     m_MonthCal.DestroyWindow();
00187     m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
00188     UpdateData(FALSE);
00189
00190   }
00191   else
00192   {
00193     //remove style
00194     long lStyle; CRect rc;
00195     lStyle = ::GetWindowLong(m_MonthCal.m_hWnd,GWL_STYLE);
00196     lStyle &= ~MCS_DAYSTATE;
00197     m_MonthCal.GetClientRect(rc);
00198     m_MonthCal.DestroyWindow();
00199     m_MonthCal.Create(lStyle,CPoint(rc.left,rc.top),this,IDC_MONTHCAL);
00200     m_nMaxSelCount = m_MonthCal.GetMaxSelCount();
00201     UpdateData(FALSE);
00202   }
00203 }
00204
00205 //Notification handlers for notifications from the MonthCal control
00206 void CMonthCalPage::GetDayState(NMHDR *pHdr, LRESULT* /*pRes*/)
00207 {
00208   NMDAYSTATE *pds = (NMDAYSTATE*)pHdr;
00209   m_NotifyList.AddString(_T("MCN_GETDAYSTATE"));
00210   //this function just bolds the first four days of every visible
00211   //month.
00212   for(int i=0;i<pds->cDayState;i++)
00213     pds->prgDayState[i]=0xf;
00214
00215 }
00216
00217 void CMonthCalPage::HandleSelect(NMHDR* /*pHdr*/, LRESULT* /*pRes*/)
00218 {
00219   m_NotifyList.AddString(_T("MCN_SELECT"));
00220   if((m_MonthCal.GetStyle() & MCS_MULTISELECT))
00221     return;
00222   CTime ct;
00223   m_MonthCal.GetCurSel(ct);
00224   m_pszSelection.Format(_T("%02d/%02d/%2d"),ct.GetMonth(),ct.GetDay(),ct.GetYear());
00225   UpdateData(FALSE);
00226
00227 }
00228
00229 void CMonthCalPage::HandleSelChange(NMHDR* /*pHdr*/, LRESULT* /*pRes*/)
00230 {
00231
00232   m_NotifyList.AddString(_T("MCN_SELCHANGE"));
00233   if(! (m_MonthCal.GetStyle() & MCS_MULTISELECT))
00234     return;
00235   CTime ctmin,ctmax;
00236   m_MonthCal.GetSelRange(ctmin,ctmax);
00237   m_pszRange.Format(_T("%02d/%02d/%2d to %02d/%02d/%2d"), ctmin.GetMonth(),ctmin.GetDay(),ctmin.GetYear(),
00238                 ctmax.GetMonth(),ctmax.GetDay(),ctmax.GetYear());
00239   UpdateData(FALSE);
00240 }
00241
00242 //Handler for selection range edit control
00243 void CMonthCalPage::OnChangeEdselrange()
00244 {
00245   UpdateData(TRUE);
00246   m_MonthCal.SetMaxSelCount(m_nMaxSelCount);
00247 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/resource.h Source File

  • ole
  • acdual
  • acdualdriv

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by autodriv.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDP_CANNOT_CREATE_AUTOCLIK      101
00007 #define IDD_AUTODRIV_DIALOG             102
00008 #define IDR_MAINFRAME                   128
00009 #define IDC_CLOSE                       1000
00010 #define IDC_REFRESH                     1001
00011 #define IDC_ANIMATE_XY                  1002
00012 #define IDC_ANIMATEPOS                  1003
00013 #define IDC_SETX                        1004
00014 #define IDC_SETY                        1005
00015 #define IDC_SETPOS                      1006
00016 #define IDC_GETPOS                      1007
00017 #define IDC_SETTEXT                     1008
00018 #define IDC_SETALL                      1009
00019 #define IDC_GETALL                      1010
00020 #define IDC_EDITX                       1011
00021 #define IDC_EDITY                       1012
00022 #define IDC_EDITTEXT                    1013
00023 #define IDC_USEDISPATCH                 1014
00024
00025 // Next default values for new objects
00026 //
00027 #ifdef APSTUDIO_INVOKED
00028 #ifndef APSTUDIO_READONLY_SYMBOLS
00029 #define _APS_NEXT_RESOURCE_VALUE        129
00030 #define _APS_NEXT_COMMAND_VALUE         32771
00031 #define _APS_NEXT_CONTROL_VALUE         1015
00032 #define _APS_NEXT_SYMED_VALUE           101
00033 #endif
00034 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/StdAfx.h Source File

  • general
  • CmnCtrl2

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #if !defined(AFX_STDAFX_H__A14ECE94_E24D_11D0_8286_00C04FD73634__INCLUDED_)
00015 #define AFX_STDAFX_H__A14ECE94_E24D_11D0_8286_00C04FD73634__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #include <afxdisp.h>        // MFC OLE automation classes
00026 #ifndef _AFX_NO_AFXCMN_SUPPORT
00027 #include <afxcmn.h>         // MFC support for Windows Common Controls
00028 #endif // _AFX_NO_AFXCMN_SUPPORT
00029
00030
00031 //{{AFX_INSERT_LOCATION}}
00032 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00033
00034 #endif // !defined(AFX_STDAFX_H__A14ECE94_E24D_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawObjFriend Member List

This is the complete list of members for CDrawObjFriend, including all inherited members.
active enum value | CDrawObj |
CanChangeFillColor() const | CDrawObj | [inline, virtual]
CanChangeLineColor() const | CDrawObj | [inline, virtual]
CanChangeLineWeight() const | CDrawObj | [inline, virtual]
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawView::XPreviewStateItem | CDrawObjFriend | [friend]
Clone(CDrawDoc *pDoc=NULL) | CDrawObj | [virtual]
Clone(CDrawDoc *pDoc=NULL) | CDrawObj | [virtual]
DECLARE_SERIAL(CDrawObj) | CDrawObj | [protected]
DECLARE_SERIAL(CDrawObj) | CDrawObj | [protected]
Draw(CDC *pDC) | CDrawObj | [virtual]
Draw(CDC *pDC) | CDrawObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
EnableFill(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
EnableLine(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
GetFillColor() const | CDrawObj | [inline]
GetHandle(int nHandle) | CDrawObj | [virtual]
GetHandle(int nHandle) | CDrawObj | [virtual]
GetHandleCount() | CDrawObj | [virtual]
GetHandleCount() | CDrawObj | [virtual]
GetHandleCursor(int nHandle) | CDrawObj | [virtual]
GetHandleCursor(int nHandle) | CDrawObj | [virtual]
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetLineColor() const | CDrawObj | [inline]
GetLineWeight() const | CDrawObj | [inline]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawObj | [virtual]
Invalidate() | CDrawObj |
Invalidate() | CDrawObj |
IsEnableFill() const | CDrawObj | [inline]
IsEnableLine() const | CDrawObj | [inline]
m_bBrush | CDrawObj | [protected]
m_bPen | CDrawObj | [protected]
m_logbrush | CDrawObj | [protected]
m_logpen | CDrawObj | [protected]
m_pDocument | CDrawObj |
m_position | CDrawObj |
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveTo(const CPoint &position) | CDrawObj | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawObj | [virtual]
normal enum value | CDrawObj |
OnEditProperties() | CDrawObj | [virtual]
OnEditProperties() | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
Remove() | CDrawObj | [virtual]
Remove() | CDrawObj | [virtual]
selected enum value | CDrawObj |
Serialize(CArchive &ar) | CDrawObj | [virtual]
Serialize(CArchive &ar) | CDrawObj | [virtual]
SetFillColor(COLORREF color) | CDrawObj | [virtual]
SetFillColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineColor(COLORREF color) | CDrawObj | [virtual]
SetLineColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineWeight(int nWidth, BOOL bPreview=FALSE) | CDrawObj |
TrackerState enum name | CDrawObj |
TrackerState enum name | CDrawObj |
~CDrawObj() | CDrawObj | [virtual]
~CDrawObj() | CDrawObj | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutlookMultiViewsDoc Member List

This is the complete list of members for COutlookMultiViewsDoc, including all inherited members.
COutlookMultiViewsDoc() | COutlookMultiViewsDoc | [protected]
OnNewDocument() | COutlookMultiViewsDoc | [virtual]
Serialize(CArchive &ar) | COutlookMultiViewsDoc | [virtual]
~COutlookMultiViewsDoc() | COutlookMultiViewsDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mainfrm.cpp Source File

  • general
  • mdi

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "bounce.h"
00014 #include "hello.h"
00015 #include "mdi.h"
00016
00017 #include "mainfrm.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00030   //{{AFX_MSG_MAP(CMainFrame)
00031   ON_COMMAND(IDM_BOUNCE, OnBounce)
00032   ON_COMMAND(IDM_HELLO, OnHello)
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CMainFrame construction/destruction
00039
00040 CMainFrame::CMainFrame()
00041 {
00042 }
00043
00044 CMainFrame::~CMainFrame()
00045 {
00046 }
00047
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CMainFrame commands
00051
00052 #pragma warning(push)
00053 #pragma warning(disable : 6014) // see comment in function
00054 void CMainFrame::OnBounce()
00055 {
00056   CBounceWnd *pBounceWnd = new CBounceWnd;
00057   if (!pBounceWnd->Create(_T("Bounce"),
00058     WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW, rectDefault, this))
00059     return;
00060
00061   // the default PostNcDestroy handler will delete this object when destroyed
00062 }
00063
00064
00065 void CMainFrame::OnHello()
00066 {
00067   CHelloWnd *pHelloWnd = new CHelloWnd;
00068   if (!pHelloWnd->Create(_T("Hello"),
00069     WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW,
00070     rectDefault, this))
00071     return;
00072
00073   // the default PostNcDestroy handler will delete this object when destroyed
00074 }
00075 #pragma warning(pop)
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autoclik.h Source File

  • ole
  • autoclik

autoclik.h

Go to the documentation of this file.
00001 // AutoClik.h : main header file for the AUTOCLIK application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CAutoClickApp:
00020 // See AutoClik.cpp for the implementation of this class
00021 //
00022
00023 class CAutoClickApp : public CWinApp
00024 {
00025 public:
00026   CAutoClickApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CAutoClickApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036   COleTemplateServer m_server;
00037     // Server object for document creation
00038
00039   //{{AFX_MSG(CAutoClickApp)
00040   afx_msg void OnAppAbout();
00041     // NOTE - the ClassWizard will add and remove member functions here.
00042     //    DO NOT EDIT what you see in these blocks of generated code !
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/intlstvw.cpp Source File

  • advanced
  • collect

intlstvw.cpp

Go to the documentation of this file.
00001 // intlstvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "intlstvw.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CIntListView
00024
00025 IMPLEMENT_DYNCREATE(CIntListView, CFormView)
00026
00027 CIntListView::CIntListView()
00028   : CFormView(CIntListView::IDD)
00029 {
00030   //{{AFX_DATA_INIT(CIntListView)
00031   m_int = 0;
00032   //}}AFX_DATA_INIT
00033 }
00034
00035 CIntListView::~CIntListView()
00036 {
00037 }
00038
00039 void CIntListView::OnInitialUpdate()
00040 {
00041   CFormView::OnInitialUpdate();
00042
00043   // Copy all of the integers from the document's CList<int,int>
00044   // to the listbox.
00045   m_ctlList.ResetContent();
00046   CList<int,int>& intList = GetDocument()->m_intList;
00047   POSITION pos = intList.GetHeadPosition();
00048   while (pos != NULL)
00049   {
00050     int n = intList.GetNext(pos);
00051     AddIntToListBox(n);
00052   }
00053 }
00054
00055
00056 void CIntListView::DoDataExchange(CDataExchange* pDX)
00057 {
00058   CFormView::DoDataExchange(pDX);
00059   //{{AFX_DATA_MAP(CIntListView)
00060   DDX_Control(pDX, IDC_LIST, m_ctlList);
00061   DDX_Text(pDX, IDC_ELEMENT, m_int);
00062   //}}AFX_DATA_MAP
00063 }
00064
00065
00066 BEGIN_MESSAGE_MAP(CIntListView, CFormView)
00067   //{{AFX_MSG_MAP(CIntListView)
00068   ON_BN_CLICKED(IDC_ADD, OnAdd)
00069   ON_BN_CLICKED(IDC_UPDATE, OnUpdateButton)
00070   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00071   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00072   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00073   ON_BN_CLICKED(IDC_INSERT_BEFORE, OnInsertBefore)
00074   //}}AFX_MSG_MAP
00075 END_MESSAGE_MAP()
00076
00077
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CIntListView diagnostics
00081
00082 #ifdef _DEBUG
00083 void CIntListView::AssertValid() const
00084 {
00085   CFormView::AssertValid();
00086 }
00087
00088 void CIntListView::Dump(CDumpContext& dc) const
00089 {
00090   CFormView::Dump(dc);
00091 }
00092
00093 CCollectDoc* CIntListView::GetDocument() // non-debug version is inline
00094 {
00095   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00096 }
00097 #endif //_DEBUG
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CIntListView internal implementation
00101
00102 BOOL CIntListView::FindInt(int& nSel, POSITION& pos)
00103 {
00104   nSel = m_ctlList.GetCurSel();
00105   if (nSel == LB_ERR)
00106   {
00107     AfxMessageBox(IDS_SELECT_INTEGER);
00108     return FALSE;
00109   }
00110
00111   int nValue = (int)m_ctlList.GetItemData(nSel);
00112
00113   // Find the integer in the integer list.
00114   pos = GetDocument()->m_intList.Find(nValue);
00115
00116   // If the integer is in the listbox, it must also be in the integer list
00117   ASSERT(pos != NULL);
00118
00119   return TRUE;
00120 }
00121
00122 void CIntListView::AddIntToListBox(int n, int nSel)
00123 {
00124   // Add new integer to the listbox.
00125   CString str;
00126   str.Format(_T("%i"),n);
00127   if (nSel == -1)
00128     nSel = m_ctlList.AddString(str);
00129   else
00130     m_ctlList.InsertString(nSel, str);
00131
00132   // Save the integer as the listbox entry's "data item".
00133   m_ctlList.SetItemData(nSel, (DWORD)n);
00134 }
00135
00136
00137 /////////////////////////////////////////////////////////////////////////////
00138 // CIntListView message handlers
00139
00140 void CIntListView::OnAdd()
00141 {
00142   if (UpdateData() != TRUE)
00143     return;
00144
00145   // Add new integer to the CList<int,int>
00146   GetDocument()->m_intList.AddTail(m_int);
00147
00148   AddIntToListBox(m_int);
00149 }
00150
00151 void CIntListView::OnInsertBefore()
00152 {
00153   if (UpdateData() != TRUE)
00154     return;
00155
00156   int nSel;
00157   POSITION pos;
00158   // Find the integer in both the CList<int,int> and the listbox.
00159   if (FindInt(nSel, pos) != TRUE)
00160     return;
00161
00162
00163   // Insert in front of the integer found in the CList<int,int>
00164   POSITION posTemp = 0;
00165   posTemp = GetDocument()->m_intList.InsertBefore(pos, m_int);
00166
00167   // Insert new integer in the listbox
00168   AddIntToListBox(m_int, nSel);
00169 }
00170
00171 void CIntListView::OnUpdateButton()
00172 {
00173   if (UpdateData() != TRUE)
00174     return;
00175
00176   int nSel;
00177   POSITION pos;
00178   // Find the integer in both the CList<int,int> and the listbox.
00179   if (FindInt(nSel, pos) != TRUE)
00180     return;
00181
00182   // Replace the integer in the CList<int,int>.
00183   GetDocument()->m_intList.SetAt(pos, m_int);
00184
00185   // Update the old integer in the listbox by removing
00186   // the old entry and adding a new entry.
00187   m_ctlList.DeleteString(nSel);
00188   AddIntToListBox(m_int, nSel);
00189 }
00190
00191 void CIntListView::OnRemove()
00192 {
00193   int nSel;
00194   POSITION pos;
00195   // Find the string in both the CList<int,int> and in the listbox.
00196   if (FindInt(nSel, pos) != TRUE)
00197     return;
00198
00199
00200   // Remove the integer from the CList<int,int>.
00201   GetDocument()->m_intList.RemoveAt(pos);
00202
00203   // Remove the integer from the listbox.
00204   m_ctlList.DeleteString(nSel);
00205 }
00206
00207 void CIntListView::OnRemoveAll()
00208 {
00209   // Remove all of the integers from the CList<int,int>.
00210   GetDocument()->m_intList.RemoveAll();
00211
00212   // Remove all of the integers from the listbox.
00213   m_ctlList.ResetContent();
00214 }
00215
00216 void CIntListView::OnSelChangeList()
00217 {
00218   // Update the edit control to reflect the new selection
00219   // in the listbox.
00220   m_int = (int)m_ctlList.GetItemData(m_ctlList.GetCurSel());
00221   UpdateData(FALSE);
00222 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapview.h Source File

  • general
  • snapvw

snapview.h

Go to the documentation of this file.
00001 // SnapView.h : interface of the CSnapView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 class CSnapView : public CFormView
00015 {
00016 protected: // create from serialization only
00017   CSnapView();
00018   DECLARE_DYNCREATE(CSnapView)
00019
00020 public:
00021   //{{AFX_DATA(CSnapView)
00022     // NOTE: the ClassWizard will add data members here
00023   //}}AFX_DATA
00024
00025 // Attributes
00026 public:
00027   CSnapDoc* GetDocument();
00028
00029 // Operations
00030 public:
00031
00032 // Overrides
00033   // ClassWizard generated virtual function overrides
00034   //{{AFX_VIRTUAL(CSnapView)
00035   public:
00036   virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00037   virtual void OnInitialUpdate();
00038   protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 public:
00044   virtual ~CSnapView();
00045 #ifdef _DEBUG
00046   virtual void AssertValid() const;
00047   virtual void Dump(CDumpContext& dc) const;
00048 #endif
00049
00050 protected:
00051   // tracks whether parent frame has already been sized.
00052   BOOL m_bSizedBefore;
00053
00054   // property sheet is wired to MDI child frame and is not displayed
00055   CPropertySheet* m_pPropSheet;
00056
00057   // one page for each menu so we can initialize controls
00058   // using OnInitDialog
00059   CPropertyPage* m_pPageBkfst;
00060   CPropertyPage* m_pPageLunch;
00061   CPropertyPage* m_pPageDinner;
00062
00063   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00064   afx_msg void OnDraw(CDC* pDC);
00065
00066 // Generated message map functions
00067 protected:
00068   //{{AFX_MSG(CSnapView)
00069   afx_msg void OnSize(UINT nType, int cx, int cy);
00070   //}}AFX_MSG
00071   DECLARE_MESSAGE_MAP()
00072 };
00073
00074 #ifndef _DEBUG  // debug version in SnapView.cpp
00075 inline CSnapDoc* CSnapView::GetDocument()
00076    { return (CSnapDoc*) m_pDocument; }
00077 #endif
00078
00079 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CGuidGenApp Member List

This is the complete list of members for CGuidGenApp, including all inherited members.
CGuidGenApp() | CGuidGenApp |
ExitInstance() | CGuidGenApp | [virtual]
InitInstance() | CGuidGenApp | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlView.cpp Source File

  • vc2008fp
  • TabControl

TabControlView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabControl.h"
00013
00014 #include "TabControlDoc.h"
00015 #include "TabControlView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CTabControlView
00025
00026 IMPLEMENT_DYNCREATE(CTabControlView, CFormView)
00027
00028 BEGIN_MESSAGE_MAP(CTabControlView, CFormView)
00029   ON_CBN_SELCHANGE(IDC_TAB_STYLE, OnSelchangeTabStyle)
00030   ON_BN_CLICKED(IDC_LOCATION, OnLocation)
00031   ON_BN_CLICKED(IDC_COLOR, OnColor)
00032   ON_BN_CLICKED(IDC_TAB_ICONS, OnTabIcons)
00033   ON_BN_CLICKED(IDC_LOCATION2, OnLocation)
00034   ON_BN_CLICKED(IDC_COLOR1, OnColor)
00035   ON_BN_CLICKED(IDC_COLOR2, OnColor)
00036   ON_BN_CLICKED(IDC_TAB_SWAP, OnTabSwap)
00037   ON_WM_CONTEXTMENU()
00038   // Standard printing commands
00039   ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
00040   ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
00041   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00042   // Tab control notifications
00043   ON_REGISTERED_MESSAGE(AFX_WM_ON_MOVE_TAB, OnMoveTab)
00044   ON_REGISTERED_MESSAGE(AFX_WM_CHANGE_ACTIVE_TAB, OnChangeActiveTab)
00045   ON_REGISTERED_MESSAGE(AFX_WM_CHANGING_ACTIVE_TAB, OnChangingActiveTab)
00046 END_MESSAGE_MAP()
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CTabControlView construction/destruction
00050
00051 CTabControlView::CTabControlView()
00052   : CFormView(CTabControlView::IDD)
00053 {
00054   m_nTabStyle = 0;
00055   m_nTabLocation = 0;
00056   m_nColor = 0;
00057   m_bTabIcons = TRUE;
00058   m_bTabsSwap = TRUE;
00059 }
00060
00061 CTabControlView::~CTabControlView()
00062 {
00063 }
00064
00065 void CTabControlView::DoDataExchange(CDataExchange* pDX)
00066 {
00067   CFormView::DoDataExchange(pDX);
00068   DDX_Control(pDX, IDC_TAB_ICONS, m_wndTabIcons);
00069   DDX_Control(pDX, IDC_NOTIFICATIONS, m_wndNotifications);
00070   DDX_Control(pDX, IDC_TAB, m_wndTabLoc);
00071   DDX_CBIndex(pDX, IDC_TAB_STYLE, m_nTabStyle);
00072   DDX_Radio(pDX, IDC_LOCATION, m_nTabLocation);
00073   DDX_Radio(pDX, IDC_COLOR, m_nColor);
00074   DDX_Check(pDX, IDC_TAB_ICONS, m_bTabIcons);
00075   DDX_Check(pDX, IDC_TAB_SWAP, m_bTabsSwap);
00076 }
00077
00078 BOOL CTabControlView::PreCreateWindow(CREATESTRUCT& cs)
00079 {
00080   // TODO: Modify the Window class or styles here by modifying
00081   //  the CREATESTRUCT cs
00082
00083   return CFormView::PreCreateWindow(cs);
00084 }
00085
00086 void CTabControlView::OnInitialUpdate()
00087 {
00088   // There is only one view ever, so it only needs to do the initial
00089   // update once--otherwise the application is  resized needlessly.
00090   static BOOL bUpdatedOnce = FALSE;
00091   if (bUpdatedOnce)
00092     return;
00093   bUpdatedOnce = TRUE;
00094
00095   CFormView::OnInitialUpdate();
00096   GetParentFrame()->RecalcLayout();
00097
00098   if (m_wndTab.GetSafeHwnd () != NULL)
00099   {
00100     return;
00101   }
00102
00103   CRect rectTab;
00104
00105   m_wndTabLoc.GetWindowRect (&rectTab);
00106   ScreenToClient (&rectTab);
00107
00108   m_wndTab.Create (CMFCTabCtrl::STYLE_3D, rectTab, this, 1,
00109     CMFCTabCtrl::LOCATION_TOP);
00110
00111   m_wndTab.SetImageList (IDB_ICONS, 16, RGB (255, 0, 255));
00112
00113   m_wnd1.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 1);
00114   m_wnd1.SetFont (&afxGlobalData.fontRegular);
00115   m_wnd1.SetWindowText (_T("Edit 1"));
00116
00117   m_wnd2.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 2);
00118   m_wnd2.SetFont (&afxGlobalData.fontRegular);
00119   m_wnd2.SetWindowText (_T("Edit 2"));
00120
00121   m_wnd3.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 3);
00122   m_wnd3.SetFont (&afxGlobalData.fontRegular);
00123   m_wnd3.SetWindowText (_T("Edit 3"));
00124
00125   m_wnd4.Create (WS_CHILD | WS_VISIBLE, CRect (0, 0, 0, 0), &m_wndTab, 4);
00126   m_wnd4.SetFont (&afxGlobalData.fontRegular);
00127   m_wnd4.SetWindowText (_T("Edit 4"));
00128
00129   m_wndTab.AddTab (&m_wnd1, _T("One"), 0, FALSE);
00130   m_wndTab.AddTab (&m_wnd2, _T("Two"), 1, FALSE);
00131   m_wndTab.AddTab (&m_wnd3, _T("Three"), 2, FALSE);
00132   m_wndTab.AddTab (&m_wnd4, _T("Four"), 3, FALSE);
00133
00134   m_nTabStyle = theApp.GetInt (_T("TabStyle"), 0);
00135   m_nTabLocation = theApp.GetInt (_T("TabLocation"), 0);
00136   m_nColor = theApp.GetInt (_T("TabColor"), 0);
00137   m_bTabIcons = theApp.GetInt (_T("TabIcons"), TRUE);
00138   m_bTabsSwap = theApp.GetInt (_T("TabsSwap"), TRUE);
00139
00140   UpdateData (FALSE);
00141
00142   OnSelchangeTabStyle();
00143   OnLocation();
00144   OnColor();
00145   OnTabIcons ();
00146   OnTabSwap ();
00147 }
00148
00149 /////////////////////////////////////////////////////////////////////////////
00150 // CTabControlView printing
00151
00152 void CTabControlView::OnFilePrintPreview()
00153 {
00154   AFXPrintPreview (this);
00155 }
00156
00157 BOOL CTabControlView::OnPreparePrinting(CPrintInfo* pInfo)
00158 {
00159   // default preparation
00160   return DoPreparePrinting(pInfo);
00161 }
00162
00163 void CTabControlView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00164 {
00165   // TODO: add extra initialization before printing
00166 }
00167
00168 void CTabControlView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00169 {
00170   // TODO: add cleanup after printing
00171 }
00172
00173 void CTabControlView::OnPrint(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00174 {
00175   // TODO: add customized printing code here
00176 }
00177
00178 /////////////////////////////////////////////////////////////////////////////
00179 // CTabControlView diagnostics
00180
00181 #ifdef _DEBUG
00182 void CTabControlView::AssertValid() const
00183 {
00184   CFormView::AssertValid();
00185 }
00186
00187 void CTabControlView::Dump(CDumpContext& dc) const
00188 {
00189   CFormView::Dump(dc);
00190 }
00191
00192 CTabControlDoc* CTabControlView::GetDocument() // non-debug version is inline
00193 {
00194   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabControlDoc)));
00195   return (CTabControlDoc*)m_pDocument;
00196 }
00197 #endif //_DEBUG
00198
00199 /////////////////////////////////////////////////////////////////////////////
00200 // CTabControlView message handlers
00201
00202 void CTabControlView::OnContextMenu(CWnd*, CPoint point)
00203 {
00204   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00205 }
00206
00207 void CTabControlView::OnSelchangeTabStyle()
00208 {
00209   UpdateData ();
00210
00211   CMFCTabCtrl::Style style;
00212   int nTab = 0;
00213
00214   m_wndTabIcons.EnableWindow ();
00215
00216   for (nTab = 0; nTab < m_wndTab.GetTabsNum (); nTab++)
00217   {
00218     m_wndTab.SetTabIcon (nTab, m_bTabIcons ? nTab : (UINT)-1);
00219   }
00220
00221   switch (m_nTabStyle)
00222   {
00223   case 1:
00224     style = CMFCTabCtrl::STYLE_FLAT;
00225     m_wndTabIcons.EnableWindow (FALSE);
00226
00227     for (nTab = 0; nTab < m_wndTab.GetTabsNum (); nTab++)
00228     {
00229       m_wndTab.SetTabIcon (nTab, (UINT)-1);
00230     }
00231
00232     break;
00233
00234   case 2:
00235     style = CMFCTabCtrl::STYLE_3D_ONENOTE;
00236     break;
00237
00238   case 3:
00239     style = CMFCTabCtrl::STYLE_3D_VS2005;
00240     break;
00241
00242   case 4:
00243     style = CMFCTabCtrl::STYLE_3D_ROUNDED;
00244     break;
00245   default:
00246     style = CMFCTabCtrl::STYLE_3D;
00247   }
00248
00249   m_wndTab.ModifyTabStyle (style);
00250   m_wndTab.RecalcLayout ();
00251   m_wndTab.RedrawWindow ();
00252
00253   theApp.WriteInt (_T("TabStyle"), m_nTabStyle);
00254 }
00255
00256 void CTabControlView::OnLocation()
00257 {
00258   UpdateData ();
00259
00260   CMFCTabCtrl::Location location;
00261
00262   switch (m_nTabLocation)
00263   {
00264   case 1:
00265     location = CMFCTabCtrl::LOCATION_BOTTOM;
00266     break;
00267
00268   default:
00269     location = CMFCTabCtrl::LOCATION_TOP;
00270   }
00271
00272   m_wndTab.SetLocation (location);
00273   m_wndTab.RecalcLayout ();
00274   m_wndTab.RedrawWindow ();
00275
00276   theApp.WriteInt (_T("TabLocation"), m_nTabLocation);
00277 }
00278
00279 void CTabControlView::OnColor()
00280 {
00281   UpdateData ();
00282
00283   CArray<COLORREF, COLORREF> arColors;
00284
00285   switch (m_nColor)
00286   {
00287   case 0:
00288     m_wndTab.EnableAutoColor (FALSE);
00289     break;
00290
00291   case 1:
00292     m_wndTab.EnableAutoColor (TRUE);
00293     break;
00294
00295   case 2:
00296     arColors.Add (RGB (121, 210, 231));
00297     arColors.Add (RGB (190, 218, 153));
00298     arColors.Add (RGB (255, 170, 100));
00299
00300     m_wndTab.EnableAutoColor (TRUE);
00301   }
00302
00303   m_wndTab.SetAutoColors (arColors);
00304
00305   theApp.WriteInt (_T("TabColor"), m_nColor);
00306 }
00307
00308 void CTabControlView::OnTabIcons()
00309 {
00310   UpdateData ();
00311
00312   for (int nTab = 0; nTab < m_wndTab.GetTabsNum (); nTab++)
00313   {
00314     m_wndTab.SetTabIcon (nTab, m_bTabIcons ? nTab : (UINT)-1);
00315   }
00316
00317   m_wndTab.RecalcLayout ();
00318   m_wndTab.RedrawWindow ();
00319
00320   theApp.WriteInt (_T("TabIcons"), m_bTabIcons);
00321 }
00322
00323 void CTabControlView::AddNotification (LPCTSTR lpszText)
00324 {
00325   if (m_wndNotifications.GetCount () > 100)
00326   {
00327     m_wndNotifications.DeleteString (0);
00328   }
00329
00330   int nIndex = m_wndNotifications.AddString (lpszText);
00331   m_wndNotifications.SetCurSel (nIndex);
00332 }
00333
00334 LRESULT CTabControlView::OnMoveTab(WPARAM wp, LPARAM lp)
00335 {
00336   CString str;
00337   str.Format (_T("AFX_WM_ON_MOVE_TAB: %d %d"), (int) wp, (int) lp);
00338
00339   AddNotification (str);
00340   return 0;
00341 }
00342
00343 LRESULT CTabControlView::OnChangeActiveTab(WPARAM wp, LPARAM /*lp*/)
00344 {
00345   CString str;
00346   str.Format (_T("AFX_WM_CHANGE_ACTIVE_TAB: %d"), (int) wp);
00347
00348   AddNotification (str);
00349   return 0;
00350 }
00351
00352 LRESULT CTabControlView::OnChangingActiveTab(WPARAM wp, LPARAM /*lp*/)
00353 {
00354   CString str;
00355   str.Format (_T("AFX_WM_CHANGING_ACTIVE_TAB: %d"), (int) wp);
00356
00357   AddNotification (str);
00358   return 0;
00359 }
00360
00361 void CTabControlView::OnTabSwap()
00362 {
00363   UpdateData ();
00364
00365   m_wndTab.EnableTabSwap (m_bTabsSwap);
00366   theApp.WriteInt (_T("TabsSwap"), m_bTabsSwap);
00367 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRecalcApp Member List

This is the complete list of members for CRecalcApp, including all inherited members.
CRecalcApp() | CRecalcApp |
InitInstance() | CRecalcApp | [virtual]
OnAppAbout() | CRecalcApp |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/RibbonListButton.h Source File

  • vc2008fp
  • DrawClient

RibbonListButton.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CRibbonListButton : public CMFCRibbonGallery
00015 {
00016   DECLARE_DYNCREATE(CRibbonListButton)
00017
00018   // Construction:
00019 public:
00020   CRibbonListButton();
00021   CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL    bRightAlignedText = TRUE);
00022   CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray& arLabels, BOOL bRightAlignedText = TRUE);
00023
00024   virtual ~CRibbonListButton();
00025
00026 public:
00027   void AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray& arLabels);
00028
00029   virtual void Clear();
00030
00031   void SetRightAlignedText(BOOL bSet = TRUE);
00032
00033 protected:
00034   virtual CSize GetIconSize() const;
00035   virtual void OnDrawPaletteIcon(CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* pIcon, COLORREF clrText);
00036   virtual void CopyFrom(const CMFCRibbonBaseElement& src);
00037   virtual void OnShowPopupMenu();
00038
00039   virtual BOOL IsItemMenuLook() const
00040   {
00041     return m_bRightAlignedText;
00042   }
00043
00044   void RecalcTextSizes(CDC* pDC);
00045
00046 protected:
00047   CMFCToolBarImages m_listImages;
00048   CStringArray m_arLabels;
00049   CSize m_sizeMargins;
00050   BOOL m_bRightAlignedText;
00051   CSize m_sizeMaxText;
00052 };
00053
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerView.h Source File

  • vc2008fp
  • Explorer

ExplorerView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CExplorerView : public CView
00014 {
00015 protected: // create from serialization only
00016   CExplorerView();
00017   DECLARE_DYNCREATE(CExplorerView)
00018
00019 // Attributes
00020 public:
00021   CExplorerDoc* GetDocument();
00022   CMFCShellListCtrl m_wndList;
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   public:
00029   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00030   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031   protected:
00032   virtual void OnInitialUpdate(); // called first time after construct
00033   virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
00034
00035 // Implementation
00036 public:
00037   virtual ~CExplorerView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00045   afx_msg void OnSize(UINT nType, int cx, int cy);
00046   afx_msg void OnViewLargeicon();
00047   afx_msg void OnUpdateViewLargeicon(CCmdUI* pCmdUI);
00048   afx_msg void OnViewDetails();
00049   afx_msg void OnUpdateViewDetails(CCmdUI* pCmdUI);
00050   afx_msg void OnViewList();
00051   afx_msg void OnUpdateViewList(CCmdUI* pCmdUI);
00052   afx_msg void OnViewSmallicon();
00053   afx_msg void OnUpdateViewSmallicon(CCmdUI* pCmdUI);
00054   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00055   afx_msg void OnSetFocus(CWnd* pOldWnd);
00056   afx_msg void OnFolderUp();
00057   afx_msg void OnUpdateFolderUp(CCmdUI* pCmdUI);
00058   afx_msg void OnCopyTo();
00059   afx_msg void OnMoveTo();
00060   afx_msg void OnViewRefresh();
00061   afx_msg LRESULT OnChangeFolder(WPARAM,LPARAM);
00062
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
00066 #ifndef _DEBUG  // debug version in ExplorerView.cpp
00067 inline CExplorerDoc* CExplorerView::GetDocument()
00068    { return (CExplorerDoc*)m_pDocument; }
00069 #endif
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/targetver.h Source File

  • vc2008fp
  • IEDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHelloWnd Member List

This is the complete list of members for CHelloWnd, including all inherited members.
CHelloWnd() | CHelloWnd |
CHelloWnd() | CHelloWnd |
Create(LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL) | CHelloWnd |
Create(LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL) | CHelloWnd |
m_clrText | CHelloWnd | [protected]
m_nIDColor | CHelloWnd | [protected]
menu | CHelloWnd | [protected, static]
OnColor() | CHelloWnd | [protected]
OnColor() | CHelloWnd | [protected]
OnCustomColor() | CHelloWnd | [protected]
OnCustomColor() | CHelloWnd | [protected]
OnPaint() | CHelloWnd | [protected]
OnPaint() | CHelloWnd | [protected]
OnUpdateColor(CCmdUI *pCmdUI) | CHelloWnd | [protected]
OnUpdateColor(CCmdUI *pCmdUI) | CHelloWnd | [protected]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDibDoc Member List

This is the complete list of members for CDibDoc, including all inherited members.
CDibDoc() | CDibDoc | [protected]
GetDocPalette() const | CDibDoc | [inline]
GetDocSize() const | CDibDoc | [inline]
GetHDIB() const | CDibDoc | [inline]
InitDIBData() | CDibDoc |
m_hDIB | CDibDoc | [protected]
m_palDIB | CDibDoc | [protected]
m_sizeDoc | CDibDoc | [protected]
OnNewDocument() | CDibDoc | [protected, virtual]
OnOpenDocument(LPCTSTR lpszPathName) | CDibDoc | [protected, virtual]
OnSaveDocument(LPCTSTR lpszPathName) | CDibDoc | [protected, virtual]
ReplaceHDIB(HDIB hDIB) | CDibDoc |
~CDibDoc() | CDibDoc | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMacroDialogBar Member List

This is the complete list of members for CMacroDialogBar, including all inherited members.
CalcFixedLayout(BOOL tStretch, BOOL tHorz) | CMacroDialogBar | [protected]
Create(CWnd *pParent, UINT nStyle, UINT nID) | CMacroDialogBar |
m_cboxMacroName | CMacroDialogBar | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rowlist.h Source File

  • general
  • rowlist

rowlist.h

Go to the documentation of this file.
00001 // RowList.h : main header file for the ROWLIST application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CRowListApp:
00020 // See RowList.cpp for the implementation of this class
00021 //
00022
00023 class CRowListApp : public CWinApp
00024 {
00025 public:
00026   CRowListApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CRowListApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CRowListApp)
00038   afx_msg void OnAppAbout();
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemo.h Source File

  • vc2008fp
  • DesktopAlertDemo

DesktopAlertDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"   // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDesktopAlertDemoApp:
00021 // See DesktopAlertDemo.cpp for the implementation of this class
00022 //
00023
00024 class CDesktopAlertDemoApp : public CWinAppEx
00025 {
00026 public:
00027   CDesktopAlertDemoApp();
00028
00029 // Overrides
00030   public:
00031   virtual BOOL InitInstance();
00032
00033 // Implementation
00034
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
00038 extern CDesktopAlertDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpdoc.cpp Source File

  • vc2008fp
  • WordPad

wordpdoc.cpp

Go to the documentation of this file.
00001 //
00002 // wordpdoc.cpp : implementation of the CWordPadDoc class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015
00016 #include "wordpad.h"
00017 #include "wordpdoc.h"
00018 #include "wordpvw.h"
00019 #include "cntritem.h"
00020 #include "srvritem.h"
00021 #include "formatba.h"
00022
00023 #include "mainfrm.h"
00024 #include "ipframe.h"
00025 #include "buttondi.h"
00026 #include "helpids.h"
00027 #include "strings.h"
00028 #include "unitspag.h"
00029 #include "docopt.h"
00030 #include "optionsh.h"
00031
00032 #include "multconv.h"
00033
00034 #ifdef _DEBUG
00035 #undef THIS_FILE
00036 static char BASED_CODE THIS_FILE[] = __FILE__;
00037 #endif
00038
00039 extern BOOL AFXAPI AfxFullPath(LPTSTR lpszPathOut, LPCTSTR lpszFileIn);
00040 extern UINT AFXAPI AfxGetFileTitle(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
00041
00042 #ifndef OFN_EXPLORER
00043 #define OFN_EXPLORER 0x00080000L
00044 #endif
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CWordPadDoc
00047 IMPLEMENT_DYNCREATE(CWordPadDoc, CRichEditDoc)
00048
00049 BEGIN_MESSAGE_MAP(CWordPadDoc, CRichEditDoc)
00050   //{{AFX_MSG_MAP(CWordPadDoc)
00051   ON_COMMAND(ID_VIEW_OPTIONS, OnViewOptions)
00052   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_POPUP, OnUpdateOleVerbPopup)
00053   ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00054   ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateIfEmbedded)
00055   ON_UPDATE_COMMAND_UI(ID_FILE_OPEN, OnUpdateIfEmbedded)
00056   ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnUpdateIfEmbedded)
00057   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT, OnUpdateIfEmbedded)
00058   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_DIRECT, OnUpdateIfEmbedded)
00059   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, OnUpdateIfEmbedded)
00060   //}}AFX_MSG_MAP
00061   ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00062   ON_COMMAND(ID_OLE_EDIT_LINKS, CRichEditDoc::OnEditLinks)
00063   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, OnUpdateObjectVerbMenu)
00064   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_CONVERT, CRichEditDoc::OnUpdateObjectVerbMenu)
00065   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, CRichEditDoc::OnUpdateEditLinksMenu)
00066 END_MESSAGE_MAP()
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CWordPadDoc construction/destruction
00070
00071 CWordPadDoc::CWordPadDoc()
00072 {
00073   m_nDocType = -1;
00074   m_nNewDocType = -1;
00075 }
00076
00077 BOOL CWordPadDoc::OnNewDocument()
00078 {
00079   if (!CRichEditDoc::OnNewDocument())
00080     return FALSE;
00081
00082   //correct type already set in theApp.m_nNewDocType;
00083   int nDocType = (IsEmbedded()) ? RD_EMBEDDED : theApp.m_nNewDocType;
00084
00085   GetView()->SetDefaultFont(IsTextType(nDocType));
00086   SetDocType(nDocType);
00087
00088   return TRUE;
00089 }
00090
00091 void CWordPadDoc::ReportSaveLoadException(LPCTSTR lpszPathName,
00092   CException* e, BOOL bSaving, UINT nIDP)
00093 {
00094   if (!m_bDeferErrors && e != NULL)
00095   {
00096     ASSERT_VALID(e);
00097     if (e->IsKindOf(RUNTIME_CLASS(CFileException)))
00098     {
00099       switch (((CFileException*)e)->m_cause)
00100       {
00101       case CFileException::fileNotFound:
00102       case CFileException::badPath:
00103         nIDP = AFX_IDP_FAILED_INVALID_PATH;
00104         break;
00105       case CFileException::diskFull:
00106         nIDP = AFX_IDP_FAILED_DISK_FULL;
00107         break;
00108       case CFileException::accessDenied:
00109         nIDP = bSaving ? AFX_IDP_FAILED_ACCESS_WRITE :
00110             AFX_IDP_FAILED_ACCESS_READ;
00111         if (((CFileException*)e)->m_lOsError == ERROR_WRITE_PROTECT)
00112           nIDP = IDS_WRITEPROTECT;
00113         break;
00114       case CFileException::tooManyOpenFiles:
00115         nIDP = IDS_TOOMANYFILES;
00116         break;
00117       case CFileException::directoryFull:
00118         nIDP = IDS_DIRFULL;
00119         break;
00120       case CFileException::sharingViolation:
00121         nIDP = IDS_SHAREVIOLATION;
00122         break;
00123       case CFileException::lockViolation:
00124       case CFileException::badSeek:
00125       case CFileException::genericException:
00126       case CFileException::invalidFile:
00127       case CFileException::hardIO:
00128         nIDP = bSaving ? AFX_IDP_FAILED_IO_ERROR_WRITE :
00129             AFX_IDP_FAILED_IO_ERROR_READ;
00130         break;
00131       default:
00132         break;
00133       }
00134       CString prompt;
00135       AfxFormatString1(prompt, nIDP, lpszPathName);
00136       AfxMessageBox(prompt, MB_ICONEXCLAMATION, nIDP);
00137       return;
00138     }
00139   }
00140   CRichEditDoc::ReportSaveLoadException(lpszPathName, e, bSaving, nIDP);
00141   return;
00142 }
00143
00144 BOOL CWordPadDoc::OnOpenDocument(LPCTSTR lpszPathName)
00145 {
00146   if (m_lpRootStg != NULL) // we are embedded
00147   {
00148     // we really want to use the converter on this storage
00149     m_nNewDocType = RD_EMBEDDED;
00150   }
00151   else
00152   {
00153     if (theApp.cmdInfo.m_bForceTextMode)
00154       m_nNewDocType = RD_TEXT;
00155     else
00156     {
00157       CFileException fe;
00158       m_nNewDocType = GetDocTypeFromName(lpszPathName, fe);
00159       if (m_nNewDocType == -1)
00160       {
00161         ReportSaveLoadException(lpszPathName, &fe, FALSE,
00162           AFX_IDP_FAILED_TO_OPEN_DOC);
00163         return FALSE;
00164       }
00165       if (m_nNewDocType == RD_TEXT && theApp.m_bForceOEM)
00166         m_nNewDocType = RD_OEMTEXT;
00167     }
00168     ScanForConverters();
00169     if (!doctypes[m_nNewDocType].bRead)
00170     {
00171       CString str;
00172       CString strName = doctypes[m_nNewDocType].GetString(DOCTYPE_DOCTYPE);
00173       AfxFormatString1(str, IDS_CANT_LOAD, strName);
00174       AfxMessageBox(str, MB_OK|MB_ICONINFORMATION);
00175       return FALSE;
00176     }
00177   }
00178
00179 //  SetDocType(nNewDocType);
00180   if (!CRichEditDoc::OnOpenDocument(lpszPathName))
00181     return FALSE;
00182   return TRUE;
00183 }
00184
00185 void CWordPadDoc::Serialize(CArchive& ar)
00186 {
00187   COleMessageFilter* pFilter = AfxOleGetMessageFilter();
00188   ASSERT(pFilter != NULL);
00189   if (pFilter != NULL)
00190   {
00191     pFilter->EnableBusyDialog(FALSE);
00192     if (ar.IsLoading())
00193       SetDocType(m_nNewDocType);
00194     CRichEditDoc::Serialize(ar);
00195     pFilter->EnableBusyDialog(TRUE);
00196   }
00197 }
00198
00199 BOOL CWordPadDoc::DoSave(LPCTSTR pszPathName, BOOL bReplace /*=TRUE*/)
00200   // Save the document data to a file
00201   // pszPathName = path name where to save document file
00202   // if pszPathName is NULL then the user will be prompted (SaveAs)
00203   // note: pszPathName can be different than 'm_strPathName'
00204   // if 'bReplace' is TRUE will change file name if successful (SaveAs)
00205   // if 'bReplace' is FALSE will not change path name (SaveCopyAs)
00206 {
00207   CString newName = pszPathName;
00208   int nOrigDocType = m_nDocType;  //saved in case of SaveCopyAs or failure
00209
00210   //  newName     bWrite  type    result
00211   //  empty       TRUE    -       SaveAs dialog
00212   //  empty       FALSE   -       SaveAs dialog
00213   //  notempty    TRUE    -       nothing
00214   //  notempty    FALSE   W6      warn (change to wordpad, save as, cancel)
00215   //  notempty    FALSE   other   warn (save as, cancel)
00216
00217   BOOL bModified = IsModified();
00218
00219   ScanForConverters();
00220
00221   BOOL bSaveAs = FALSE;
00222   if (newName.IsEmpty())
00223     bSaveAs = TRUE;
00224   else if (!doctypes[m_nDocType].bWrite)
00225   {
00226     if (m_nDocType == RD_WINWORD6)
00227     {
00228       //      DWORD nHelpIDs[] =
00229       //      {
00230       //          0, 0
00231       //      };
00232       int nRes = CButtonDialog::DisplayMessageBox(
00233         MAKEINTRESOURCE(IDS_WORD6_WARNING), AfxGetAppName(),
00234         MAKEINTRESOURCE(IDS_WORD6_WARNING_BUTTONS),
00235         MB_ICONQUESTION, 1, 2);
00236       if (nRes == 0) // Save
00237         SetDocType(RD_WORDPAD, TRUE);
00238       else if (nRes == 2) // Cancel
00239         return FALSE;
00240       else
00241         bSaveAs = TRUE;
00242       // else save as
00243     }
00244     else //
00245     {
00246       if (AfxMessageBox(IDS_SAVE_UNSUPPORTED,
00247         MB_YESNO | MB_ICONQUESTION) != IDYES)
00248       {
00249         return FALSE;
00250       }
00251       else
00252         bSaveAs = TRUE;
00253     }
00254   }
00255
00256   if (m_lpRootStg == NULL && IsTextType(m_nDocType) &&
00257     !GetView()->IsFormatText())
00258   {
00259     // formatting changed in plain old text file
00260     DWORD nHelpIDs[] =
00261     {
00262       0, IDH_WORDPAD_WORD6FILE,
00263       0, IDH_WORDPAD_FORMATTED,
00264       0, IDH_WORDPAD_TEXTFILE,
00265       0, 0
00266     };
00267     CString str;
00268     AfxFormatString1(str, IDS_SAVE_FORMAT_TEXT, GetTitle());
00269     int nRes = CButtonDialog::DisplayMessageBox(str,
00270       MAKEINTRESOURCE(AFX_IDS_APP_TITLE),
00271       MAKEINTRESOURCE(IDS_TF_BUTTONS), MB_ICONQUESTION, 0, 3, nHelpIDs);
00272     if (nRes == 3)
00273       return FALSE;
00274     int nDocType = (nRes == 0) ? RD_DEFAULT:    //Word 6
00275           (nRes == 1) ? RD_RICHTEXT : //RTF
00276           RD_TEXT;                    //text
00277     if (IsTextType(m_nDocType) && nDocType != RD_TEXT)
00278       SetDocType(nDocType, TRUE);
00279     if (nDocType != RD_TEXT)
00280       bSaveAs = TRUE;
00281   }
00282
00283   GetView()->GetParentFrame()->RecalcLayout();
00284   if (bSaveAs)
00285   {
00286     newName = m_strPathName;
00287     if (bReplace && newName.IsEmpty())
00288     {
00289       newName = m_strTitle;
00290       int iBad = newName.FindOneOf(_T(" #%;/\\"));    // dubious filename
00291       if (iBad != -1)
00292         newName.ReleaseBuffer(iBad);
00293
00294       // append the default suffix if there is one
00295       newName += GetExtFromType(m_nDocType);
00296     }
00297
00298     int nDocType = m_nDocType;
00299     if (!theApp.PromptForFileName(newName,
00300       bReplace ? AFX_IDS_SAVEFILE : AFX_IDS_SAVEFILECOPY,
00301       OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, FALSE, &nDocType))
00302     {
00303       SetDocType(nOrigDocType, TRUE);
00304       return FALSE;       // don't even try to save
00305     }
00306     SetDocType(nDocType, TRUE);
00307   }
00308
00309   BeginWaitCursor();
00310   if (!OnSaveDocument(newName))
00311   {
00312     if (pszPathName == NULL)
00313     {
00314       // be sure to delete the file
00315       TRY
00316       {
00317         CFile::Remove(newName);
00318       }
00319       CATCH_ALL(e)
00320       {
00321         TRACE0("Warning: failed to delete file after failed SaveAs\n");
00322       }
00323       END_CATCH_ALL
00324     }
00325     // restore orginal document type
00326     SetDocType(nOrigDocType, TRUE);
00327     EndWaitCursor();
00328     return FALSE;
00329   }
00330
00331   EndWaitCursor();
00332   if (bReplace)
00333   {
00334     int nType = m_nDocType;
00335     SetDocType(nOrigDocType, TRUE);
00336     SetDocType(nType);
00337     // Reset the title and change the document name
00338     SetPathName(newName, TRUE);
00339     ASSERT(m_strPathName == newName);       // must be set
00340   }
00341   else // SaveCopyAs
00342   {
00343     SetDocType(nOrigDocType, TRUE);
00344     SetModifiedFlag(bModified);
00345   }
00346   return TRUE;        // success
00347 }
00348
00349 class COIPF : public COleIPFrameWnd
00350 {
00351 public:
00352   CFrameWnd* GetMainFrame() { return m_pMainFrame;}
00353   CFrameWnd* GetDocFrame() { return m_pDocFrame;}
00354 };
00355
00356 void CWordPadDoc::OnDeactivateUI(BOOL bUndoable)
00357 {
00358   if (GetView()->m_bDelayUpdateItems)
00359     UpdateAllItems(NULL);
00360   SaveState(m_nDocType);
00361   CRichEditDoc::OnDeactivateUI(bUndoable);
00362   COIPF* pFrame = (COIPF*)m_pInPlaceFrame;
00363   if (pFrame != NULL)
00364   {
00365     if (pFrame->GetMainFrame() != NULL)
00366       ForceDelayed(pFrame->GetMainFrame());
00367     if (pFrame->GetDocFrame() != NULL)
00368       ForceDelayed(pFrame->GetDocFrame());
00369   }
00370 }
00371
00372 void CWordPadDoc::ForceDelayed(CFrameWnd* /*pFrameWnd*/)
00373 {
00374 /*  ASSERT_VALID(this);
00375   ASSERT_VALID(pFrameWnd);
00376
00377   POSITION pos = pFrameWnd->m_listControlBars.GetHeadPosition();
00378   while (pos != NULL)
00379   {
00380     // show/hide the next control bar
00381     CControlBar* pBar =
00382       (CControlBar*)pFrameWnd->m_listControlBars.GetNext(pos);
00383
00384     BOOL bVis = pBar->GetStyle() & WS_VISIBLE;
00385     UINT swpFlags = 0;
00386     if ((pBar->m_nStateFlags & CControlBar::delayHide) && bVis)
00387       swpFlags = SWP_HIDEWINDOW;
00388     else if ((pBar->m_nStateFlags & CControlBar::delayShow) && !bVis)
00389       swpFlags = SWP_SHOWWINDOW;
00390     pBar->m_nStateFlags &= ~(CControlBar::delayShow|CControlBar::delayHide);
00391     if (swpFlags != 0)
00392     {
00393       pBar->SetWindowPos(NULL, 0, 0, 0, 0, swpFlags|
00394         SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
00395     }
00396   }*/
00397 }
00398
00399 /////////////////////////////////////////////////////////////////////////////
00400 // CWordPadDoc Attributes
00401 CLSID CWordPadDoc::GetClassID()
00402 {
00403   return (m_pFactory == NULL) ? CLSID_NULL : m_pFactory->GetClassID();
00404 }
00405
00406 void CWordPadDoc::SetDocType(int nNewDocType, BOOL bNoOptionChange)
00407 {
00408   ASSERT(nNewDocType != -1);
00409   if (nNewDocType == m_nDocType)
00410     return;
00411
00412   m_bRTF = !IsTextType(nNewDocType);
00413   if (bNoOptionChange)
00414     m_nDocType = nNewDocType;
00415   else
00416   {
00417     SaveState(m_nDocType);
00418     m_nDocType = nNewDocType;
00419     RestoreState(m_nDocType);
00420   }
00421 }
00422
00423 CWordPadView* CWordPadDoc::GetView()
00424 {
00425   POSITION pos = GetFirstViewPosition();
00426   return (CWordPadView* )GetNextView( pos );
00427 }
00428
00429 /////////////////////////////////////////////////////////////////////////////
00430 // CWordPadDoc Operations
00431
00432 CFile* CWordPadDoc::GetFile(LPCTSTR pszPathName, UINT nOpenFlags, CFileException* pException)
00433 {
00434   CTrackFile* pFile = NULL;
00435   CFrameWnd* pWnd = GetView()->GetParentFrame();
00436
00437   // if writing use current doc type otherwise use new doc type
00438   int nType = (nOpenFlags & CFile::modeReadWrite) ? m_nDocType : m_nNewDocType;
00439
00440 #ifdef CONVERTERS
00441   ScanForConverters();
00442
00443   // m_nNewDocType will be same as m_nDocType except when opening a new file
00444   if (doctypes[nType].pszConverterName != NULL)
00445     pFile = new CConverter(doctypes[nType].pszConverterName, pWnd);
00446   else
00447 #endif
00448   if (nType == RD_OEMTEXT)
00449     pFile = new COEMFile(pWnd);
00450   else
00451     pFile = new CTrackFile(pWnd);
00452   if (!pFile->Open(pszPathName, nOpenFlags, pException))
00453   {
00454     delete pFile;
00455     return NULL;
00456   }
00457   if (nOpenFlags & (CFile::modeWrite | CFile::modeReadWrite))
00458     pFile->m_dwLength = 0; // can't estimate this
00459   else
00460     pFile->m_dwLength = pFile->GetLength();
00461   return pFile;
00462 }
00463
00464 CRichEditCntrItem* CWordPadDoc::CreateClientItem(REOBJECT* preo) const
00465 {
00466   // cast away constness of this
00467   return new CWordPadCntrItem(preo, (CWordPadDoc*)this);
00468 }
00469
00470 /////////////////////////////////////////////////////////////////////////////
00471 // CWordPadDoc server implementation
00472
00473 COleServerItem* CWordPadDoc::OnGetEmbeddedItem()
00474 {
00475   // OnGetEmbeddedItem is called by the framework to get the COleServerItem
00476   //  that is associated with the document.  It is only called when necessary.
00477
00478   CEmbeddedItem* pItem = new CEmbeddedItem(this);
00479   ASSERT_VALID(pItem);
00480   return pItem;
00481 }
00482
00483 /////////////////////////////////////////////////////////////////////////////
00484 // CWordPadDoc serialization
00485
00486 /////////////////////////////////////////////////////////////////////////////
00487 // CWordPadDoc diagnostics
00488
00489 #ifdef _DEBUG
00490 void CWordPadDoc::AssertValid() const
00491 {
00492   CRichEditDoc::AssertValid();
00493 }
00494
00495 void CWordPadDoc::Dump(CDumpContext& dc) const
00496 {
00497   CRichEditDoc::Dump(dc);
00498 }
00499 #endif //_DEBUG
00500
00501 /////////////////////////////////////////////////////////////////////////////
00502 // CWordPadDoc commands
00503
00504 int CWordPadDoc::MapType(int nType)
00505 {
00506   if (nType == RD_OEMTEXT)
00507     nType = RD_TEXT;
00508   else if (!IsInPlaceActive() && nType == RD_EMBEDDED)
00509     nType = RD_RICHTEXT;
00510   return nType;
00511 }
00512
00513 void CWordPadDoc::OnViewOptions()
00514 {
00515   int nType = MapType(m_nDocType);
00516   int nFirstPage = 3;
00517   if (nType == RD_TEXT)
00518     nFirstPage = 1;
00519   else if (nType == RD_RICHTEXT)
00520     nFirstPage = 2;
00521   else if (nType == RD_WRITE)
00522     nFirstPage = 4;
00523   else if (nType == RD_EMBEDDED)
00524     nFirstPage = 5;
00525
00526   SaveState(nType);
00527
00528   COptionSheet sheet(IDS_OPTIONS, NULL, nFirstPage);
00529
00530   if (sheet.DoModal() == IDOK)
00531   {
00532     CWordPadView* pView = GetView();
00533     if (theApp.m_bWordSel)
00534       pView->GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_AUTOWORDSELECTION);
00535     else
00536     {
00537       pView->GetRichEditCtrl().SetOptions(ECOOP_AND,
00538         ~(DWORD)ECO_AUTOWORDSELECTION);
00539     }
00540     RestoreState(nType);
00541   }
00542 }
00543
00544 void CWordPadDoc::OnUpdateOleVerbPopup(CCmdUI* pCmdUI)
00545 {
00546   pCmdUI->m_pParentMenu = pCmdUI->m_pMenu;
00547   CRichEditDoc::OnUpdateObjectVerbMenu(pCmdUI);
00548 }
00549
00550 BOOL CWordPadDoc::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00551 {
00552   if (nCode == CN_COMMAND && nID == ID_OLE_VERB_POPUP)
00553     nID = ID_OLE_VERB_FIRST;
00554   return CRichEditDoc::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00555 }
00556
00557 void CWordPadDoc::SaveState(int nType)
00558 {
00559   if (nType == -1)
00560     return;
00561   nType = MapType(nType);
00562   CWordPadView* pView = GetView();
00563   if (pView != NULL)
00564   {
00565     CFrameWnd* pFrame = pView->GetParentFrame();
00566     ASSERT(pFrame != NULL);
00567     if (pFrame != NULL)
00568     {
00569       // save current state
00570       pFrame->SendMessage(WPM_BARSTATE, 0, nType);
00571     }
00572     theApp.GetDocOptions(nType).m_nWordWrap = pView->m_nWordWrap;
00573   }
00574 }
00575
00576 void CWordPadDoc::RestoreState(int nType)
00577 {
00578   if (nType == -1)
00579     return;
00580   nType = MapType(nType);
00581   CWordPadView* pView = GetView();
00582   if (pView != NULL)
00583   {
00584     CFrameWnd* pFrame = pView->GetParentFrame();
00585     ASSERT(pFrame != NULL);
00586     if (pFrame != NULL)
00587     {
00588       // set new state
00589       pFrame->SendMessage(WPM_BARSTATE, 1, nType);
00590     }
00591
00592     int nWrapNew = theApp.GetDocOptions(nType).m_nWordWrap;
00593     if (pView->m_nWordWrap != nWrapNew)
00594     {
00595       pView->m_nWordWrap = nWrapNew;
00596       pView->WrapChanged();
00597     }
00598   }
00599 }
00600
00601 void CWordPadDoc::OnCloseDocument()
00602 {
00603   SaveState(m_nDocType);
00604   CRichEditDoc::OnCloseDocument();
00605 }
00606
00607 void CWordPadDoc::PreCloseFrame(CFrameWnd* pFrameArg)
00608 {
00609   CRichEditDoc::PreCloseFrame(pFrameArg);
00610   SaveState(m_nDocType);
00611 }
00612
00613 void CWordPadDoc::OnFileSendMail()
00614 {
00615   if (m_strTitle.Find('.') == -1)
00616   {
00617     // add the extension because the default extension will be wrong
00618     CString strOldTitle = m_strTitle;
00619     m_strTitle += GetExtFromType(m_nDocType);
00620     CRichEditDoc::OnFileSendMail();
00621     m_strTitle = strOldTitle;
00622   }
00623   else
00624     CRichEditDoc::OnFileSendMail();
00625 }
00626
00627 void CWordPadDoc::OnUpdateIfEmbedded(CCmdUI* pCmdUI)
00628 {
00629   pCmdUI->Enable(!IsEmbedded());
00630 }
00631
00632 void CWordPadDoc::OnUpdateObjectVerbMenu(CCmdUI* pCmdUI)
00633 {
00634 //  if (pCmdUI->m_pMenu == NULL/* || pCmdUI->m_pParentMenu == NULL !!!Commented by Stas */)
00635   if (pCmdUI->m_pMenu == NULL || pCmdUI->m_pParentMenu == NULL)
00636   {
00637     // not a menu or is on sub-menu (don't recurse)
00638     pCmdUI->ContinueRouting();
00639     return;
00640   }
00641
00642   // check for single selection
00643   COleClientItem* pItem = GetPrimarySelectedItem(GetRoutingView_());
00644   GetPrimarySelectedItem (GetRoutingView_());
00645
00646   if (pItem == NULL || pItem->GetType() == OT_STATIC)
00647   {
00648     // no selection, or is 'static' item
00649     pCmdUI->Enable(FALSE);
00650   }
00651
00652   // only include Convert... if there is a handler for ID_OLE_EDIT_CONVERT
00653   UINT nConvertID = ID_OLE_EDIT_CONVERT;
00654   AFX_CMDHANDLERINFO info;
00655   if (!OnCmdMsg(ID_OLE_EDIT_CONVERT, CN_COMMAND, NULL, &info))
00656     nConvertID = 0;
00657
00658   // update the menu
00659   AfxOleSetEditMenu(GetPrimarySelectedItem(GetRoutingView_()),
00660     pCmdUI->m_pMenu, pCmdUI->m_nIndex,
00661     ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, nConvertID);
00662 }
00663
00664 void CWordPadDoc::SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU)
00665 {
00666   CRichEditDoc::SetPathName(lpszPathName, bAddToMRU);
00667
00668   ((CMainFrame*) AfxGetMainWnd ())->UpdateMRUFilesList ();
00669 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/treecpg.h Source File

  • general
  • CmnCtrl1

treecpg.h

Go to the documentation of this file.
00001 // TreeCtrlPage.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CTreeCtrlPage dialog
00015 #ifndef INC_TRCPAGE_H
00016 #define INC_TRCPAGE_H
00017
00018 #include "mtreectl.h"
00019 #include "notifwdw.h"
00020
00021 class CTreeCtrlPage : public CPropertyPage
00022 {
00023   DECLARE_DYNCREATE(CTreeCtrlPage)
00024
00025 // Construction
00026 public:
00027   CTreeCtrlPage();
00028   ~CTreeCtrlPage();
00029
00030 // Dialog Data
00031   //{{AFX_DATA(CTreeCtrlPage)
00032   enum { IDD = IDD_TREECTRL };
00033   CNotifyShowCase m_notifshowcase;
00034   CMyTreeCtrl m_mytreectrl;
00035   BOOL    m_bDisableDragDrop;
00036   BOOL    m_bHasButtons;
00037   BOOL    m_bHasLines;
00038   BOOL    m_bLinesAtRoot;
00039   BOOL    m_bEditLabels;
00040   BOOL    m_bShowSelAlways;
00041   CString m_cstrStatus;
00042   BOOL    m_bSingleExpand;
00043   //}}AFX_DATA
00044
00045
00046   HTREEITEM   m_rghItem[12];
00047   HTREEITEM   m_hitemDrag;
00048   HTREEITEM   m_hitemDrop;
00049
00050 // Overrides
00051   // ClassWizard generate virtual function overrides
00052   //{{AFX_VIRTUAL(CTreeCtrlPage)
00053   protected:
00054   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00055   virtual BOOL OnInitDialog();
00056   //}}AFX_VIRTUAL
00057
00058 // Implementation
00059 public:
00060   // Generated message map functions
00061   //{{AFX_MSG(CTreeCtrlPage)
00062   afx_msg void OnEditLabels();
00063   afx_msg void OnHasButtons();
00064   afx_msg void OnHasLines();
00065   afx_msg void OnLinesAtRoot();
00066   afx_msg void OnDisabledDragDrop();
00067   afx_msg void OnShowSelAlways();
00068   afx_msg void ShowNotification(LPNMHDR pnmhdr, LRESULT *pLResult);
00069   afx_msg void OnSingleExpand();
00070   //}}AFX_MSG
00071   DECLARE_MESSAGE_MAP()
00072
00073 };
00074
00075 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/StdAfx.h Source File

  • vc2008fp
  • MSOffice2007Demo

StdAfx.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // stdafx.h : include file for standard system include files,
00013 //  or project specific include files that are used frequently, but
00014 //      are changed infrequently
00015 //
00016
00017 #pragma once
00018
00019 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00020
00021 #include "targetver.h"
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #include <afxole.h>         // MFC OLE classes
00026 #include <afxodlgs.h>       // MFC OLE dialog classes
00027 #include <afxdisp.h>        // MFC Automation classes
00028 #include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
00029
00030 #ifndef _AFX_NO_AFXCMN_SUPPORT
00031 #include <afxcmn.h>         // MFC support for Windows Common Controls
00032 #endif // _AFX_NO_AFXCMN_SUPPORT
00033
00034 #include <afxrich.h>        // MFC rich edit classes
00035
00036 #include <afxcontrolbars.h> // MFC ribbon and control bar support
00037
00038 #if defined _M_IX86
00039 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00040 #elif defined _M_X64
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #else
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCalcDrivApp Member List

This is the complete list of members for CCalcDrivApp, including all inherited members.
CCalcDrivApp() | CCalcDrivApp |
InitInstance() | CCalcDrivApp | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawClientHandlersApp Member List

This is the complete list of members for CDrawClientHandlersApp, including all inherited members.
ExitInstance() | CDrawClientHandlersApp | [virtual]
InitInstance() | CDrawClientHandlersApp | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/resource.h Source File

  • general
  • hello

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by HELLO.RC
00004 //
00005 #define IDR_MAINFRAME                   128
00006 #define IDS_HELLO                       129
00007 #define IDD_ABOUTBOX                    130
00008
00009 // Next default values for new objects
00010 //
00011 #ifdef APSTUDIO_INVOKED
00012 #ifndef APSTUDIO_READONLY_SYMBOLS
00013
00014 #define _APS_NEXT_RESOURCE_VALUE        104
00015 #define _APS_NEXT_COMMAND_VALUE         32768
00016 #define _APS_NEXT_CONTROL_VALUE         1000
00017 #define _APS_NEXT_SYMED_VALUE           104
00018 #endif
00019 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemo.h Source File

  • vc2008fp
  • RibbonMDI

RibbonMDIDemo.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #ifndef __AFXWIN_H__
00015   #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 #include "resource.h"       // main symbols
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CRibbonMDIDemoApp:
00022 // See RibbonMDIDemo.cpp for the implementation of this class
00023 //
00024
00025 class CRibbonMDIDemoApp : public CWinAppEx
00026 {
00027 public:
00028   CRibbonMDIDemoApp();
00029
00030   virtual void PreLoadState ();
00031
00032 // Overrides
00033   public:
00034   virtual BOOL InitInstance();
00035   virtual int ExitInstance();
00036   virtual BOOL SaveAllModified();
00037
00038 // Implementation
00039   afx_msg void OnAppAbout();
00040
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044
00045 extern CRibbonMDIDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/slowcalc.h Source File

  • advanced
  • mtrecalc

slowcalc.h

Go to the documentation of this file.
00001 // slowcalc.h   Simulation of a calculation that takes a long time
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 BOOL SlowAdd(int nInt1, int nInt2, int& nResult, CRecalcThreadInfo* pInfo, int nSeconds,
00013   HWND hwndNotifyProgress);
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/ctrlbars.cpp Source File

  • general
  • ctrlbars

ctrlbars.cpp

Go to the documentation of this file.
00001 // ctrlbars.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include <afxpriv.h>    // for idle-update windows message
00014
00015 #include "ctrlbars.h"
00016 #include "mainfrm.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CCtrlbarsApp
00025
00026 BEGIN_MESSAGE_MAP(CCtrlbarsApp, CWinApp)
00027   //{{AFX_MSG_MAP(CCtrlbarsApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   //}}AFX_MSG_MAP
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CCtrlbarsApp construction
00034
00035 CCtrlbarsApp::CCtrlbarsApp()
00036 {
00037   // Place all significant initialization in InitInstance
00038 }
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // The one and only CCtrlbarsApp object
00042
00043 CCtrlbarsApp NEAR theApp;
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CCtrlbarsApp initialization
00047
00048 BOOL CCtrlbarsApp::InitInstance()
00049 {
00050   // create a new SDI main frame window
00051   CFrameWnd* pMainFrame = new CMainFrame;
00052   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00053   {
00054     // free the memory
00055     delete pMainFrame;
00056     return FALSE;
00057   }
00058   pMainFrame->ShowWindow(m_nCmdShow);
00059   pMainFrame->UpdateWindow();
00060   m_pMainWnd = pMainFrame;
00061
00062   pMainFrame->SendMessage(WM_COMMAND, IDM_VIEWPALETTE, (LPARAM)0);
00063   return TRUE;
00064 }
00065
00066
00067 // In this override of OnIdle we are doing UI for our app.
00068 // Since this needs to be as fast as possible to give the user
00069 // the best result we do our updates first when lCount is zero
00070 // then we call the library to do its work.
00071 BOOL CCtrlbarsApp::OnIdle(LONG lCount)
00072 {
00073   if (lCount == 0)
00074   {
00075     ENSURE(m_pMainWnd != NULL);
00076
00077     // look for any top-level windows owned by us
00078     // we use 'HWND's to avoid generation of too many temporary CWnds
00079     for (HWND hWnd = ::GetWindow(m_pMainWnd->m_hWnd, GW_HWNDFIRST);
00080         hWnd != NULL; hWnd = ::GetNextWindow(hWnd, GW_HWNDNEXT))
00081     {
00082       if (::GetParent(hWnd) == m_pMainWnd->m_hWnd)
00083       {
00084         // if owned window is active, move the activation to the
00085         //   application window
00086         if (GetActiveWindow() == hWnd && (::GetCapture() == NULL))
00087           m_pMainWnd->SetActiveWindow();
00088
00089         // also update the buttons for the top-level window
00090         SendMessage(hWnd, WM_IDLEUPDATECMDUI, (WPARAM)TRUE, 0L);
00091       }
00092     }
00093   }
00094   return CWinApp::OnIdle(lCount);
00095 }
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CCtrlbarsApp commands
00099
00100 void CCtrlbarsApp::OnAppAbout()
00101 {
00102   CDialog(IDD_ABOUTBOX).DoModal();
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/StdAfx.h Source File

  • vc2008fp
  • CustomPages

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
00047
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typlstvw.cpp Source File

  • advanced
  • collect

typlstvw.cpp

Go to the documentation of this file.
00001 // typlstvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "typlstvw.h"
00016 #include "resource.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CTypedPtrListView
00025
00026 IMPLEMENT_DYNCREATE(CTypedPtrListView, CFormView)
00027
00028 CTypedPtrListView::CTypedPtrListView()
00029   : CFormView(CTypedPtrListView::IDD)
00030 {
00031   //{{AFX_DATA_INIT(CTypedPtrListView)
00032   m_float = 0.0f;
00033   m_int = 0;
00034   m_str = "";
00035   //}}AFX_DATA_INIT
00036 }
00037
00038 CTypedPtrListView::~CTypedPtrListView()
00039 {
00040 }
00041
00042 void CTypedPtrListView::OnInitialUpdate()
00043 {
00044   CFormView::OnInitialUpdate();
00045
00046   // Copy all of the strings from the document's CTypedPtrList
00047   // to the listbox.
00048   m_ctlList.ResetContent();
00049   CMyStructList& mystructList = GetDocument()->m_mystructList;
00050   POSITION pos = mystructList.GetHeadPosition();
00051   while (pos != NULL)
00052   {
00053     CMyStruct* pMyStruct = mystructList.GetNext(pos);
00054     AddMyStructToListBox(pMyStruct);
00055   }
00056 }
00057
00058 void CTypedPtrListView::DoDataExchange(CDataExchange* pDX)
00059 {
00060   CFormView::DoDataExchange(pDX);
00061   //{{AFX_DATA_MAP(CTypedPtrListView)
00062   DDX_Control(pDX, IDC_LIST, m_ctlList);
00063   DDX_Text(pDX, IDC_FLOAT, m_float);
00064   DDX_Text(pDX, IDC_INT, m_int);
00065   DDX_Text(pDX, IDC_STRING, m_str);
00066   //}}AFX_DATA_MAP
00067   if (pDX->m_bSaveAndValidate && _tcschr(m_str, ' ') != NULL)
00068   {
00069     AfxMessageBox(IDS_BLANK_CHARS_NOT_ALLOWED);
00070     pDX->Fail();
00071   }
00072 }
00073
00074
00075 BEGIN_MESSAGE_MAP(CTypedPtrListView, CFormView)
00076   //{{AFX_MSG_MAP(CTypedPtrListView)
00077   ON_BN_CLICKED(IDC_ADD, OnAdd)
00078   ON_BN_CLICKED(IDC_UPDATE, OnUpdateButton)
00079   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00080   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00081   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00082   ON_BN_CLICKED(IDC_INSERT_BEFORE, OnInsertBefore)
00083   //}}AFX_MSG_MAP
00084 END_MESSAGE_MAP()
00085
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CTypedPtrListView diagnostics
00089
00090 #ifdef _DEBUG
00091 void CTypedPtrListView::AssertValid() const
00092 {
00093   CFormView::AssertValid();
00094 }
00095
00096 void CTypedPtrListView::Dump(CDumpContext& dc) const
00097 {
00098   CFormView::Dump(dc);
00099 }
00100
00101 CCollectDoc* CTypedPtrListView::GetDocument() // non-debug version is inline
00102 {
00103   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00104 }
00105
00106 #endif //_DEBUG
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CmystructListView internal implementation
00110
00111 CMyStruct* CTypedPtrListView::FindMyStruct(int& nSel, POSITION& pos)
00112 {
00113   nSel = m_ctlList.GetCurSel();
00114   if (nSel == LB_ERR)
00115   {
00116     AfxMessageBox(IDS_SELECT_ENTRY);
00117     return NULL;
00118   }
00119
00120   // The CMyStruct pointer was saved as the listbox entry's data item.
00121   CMyStruct* pMyStruct = (CMyStruct*)m_ctlList.GetItemDataPtr(nSel);
00122
00123   // Find the CMyStruct pointer in the CTypedPtrList.
00124   pos = GetDocument()->m_mystructList.Find(pMyStruct);
00125
00126   // If the CMyStruct is displayed in the listbox, it should also be
00127   // found in the CTypedPtrList.
00128   ASSERT(pos != NULL);
00129
00130   return pMyStruct;
00131 }
00132
00133 void CTypedPtrListView::AddMyStructToListBox(CMyStruct* pMyStruct, int nSel)
00134 {
00135   // Add new CMyStruct to the listbox.
00136   CString str;
00137   pMyStruct->FormatMyStruct(str);
00138   if (nSel == -1)
00139     nSel = m_ctlList.AddString(str);
00140   else
00141     m_ctlList.InsertString(nSel, str);
00142
00143   // Save the CMyStruct pointer as the listbox entry's "data item".
00144   m_ctlList.SetItemDataPtr(nSel, pMyStruct);
00145 }
00146
00147
00148 /////////////////////////////////////////////////////////////////////////////
00149 // CTypedPtrListView message handlers
00150
00151 void CTypedPtrListView::OnAdd()
00152 {
00153   if (UpdateData() != TRUE)
00154     return;
00155
00156   // Add new CMyStruct to the CTypedPtrList
00157   CMyStruct* pMyStruct = new CMyStruct;
00158   pMyStruct->m_int = m_int;
00159   pMyStruct->m_float = m_float;
00160   pMyStruct->m_str = m_str;
00161   GetDocument()->m_mystructList.AddTail(pMyStruct);
00162
00163   AddMyStructToListBox(pMyStruct);
00164 }
00165
00166 void CTypedPtrListView::OnInsertBefore()
00167 {
00168   if (UpdateData() != TRUE)
00169     return;
00170
00171   int nSel;
00172   POSITION pos;
00173   // Find the CMyStruct in the CTypedPtrList and listbox.
00174   if (FindMyStruct(nSel, pos) == NULL)
00175     return;
00176
00177   // Insert new CMyStruct in the CTypedPtrList
00178   CMyStruct* pMyStruct = new CMyStruct;
00179   pMyStruct->m_int = m_int;
00180   pMyStruct->m_float = m_float;
00181   pMyStruct->m_str = m_str;
00182   GetDocument()->m_mystructList.InsertBefore(pos, pMyStruct);
00183
00184   AddMyStructToListBox(pMyStruct, nSel);
00185 }
00186
00187 void CTypedPtrListView::OnUpdateButton()
00188 {
00189   if (UpdateData() != TRUE)
00190     return;
00191
00192   int nSel;
00193   POSITION pos;
00194   // Find the CMyStruct in the CTypedPtrList and listbox.
00195   CMyStruct* pMyStruct = FindMyStruct(nSel, pos);
00196   if (pMyStruct == NULL)
00197     return;
00198
00199   // Replace the value of the CMyStruct in the CTypedPtrList.
00200   pMyStruct->m_int = m_int;
00201   pMyStruct->m_float = m_float;
00202   pMyStruct->m_str = m_str;
00203
00204   // Replace the displayed CMyStruct in the listbox by removing
00205   // the old listbox entry and adding a new entry.
00206   m_ctlList.DeleteString(nSel);
00207   AddMyStructToListBox(pMyStruct, nSel);
00208 }
00209
00210 void CTypedPtrListView::OnRemove()
00211 {
00212   int nSel;
00213   POSITION pos;
00214   // Find the CMyStruct in the CTypedPtrList and listbox.
00215   CMyStruct* pMyStruct = FindMyStruct(nSel, pos);
00216   if (pMyStruct == NULL)
00217     return;
00218
00219   // Remove the CMyStruct ptr from the CTypedPtrList.
00220   GetDocument()->m_mystructList.RemoveAt(pos);
00221
00222   // Delete the CMyStruct object. (The CTypePtrList only holds the ptr.)
00223   delete pMyStruct;
00224
00225   // Remove the corresponding entry from the listbox.
00226   m_ctlList.DeleteString(nSel);
00227 }
00228
00229 void CTypedPtrListView::OnRemoveAll()
00230 {
00231   CMyStructList& mystructList = GetDocument()->m_mystructList;
00232
00233   // Delete all of the CMyStruct objects pointed to
00234   // by the CTypedPtrList. Then remove all of the
00235   // CMyStruct pointers from the CTypedPtrList, which
00236   // is faster than removing each individually.
00237   POSITION pos = mystructList.GetHeadPosition();
00238   while (pos != NULL)
00239   {
00240     delete mystructList.GetNext(pos);
00241   }
00242   mystructList.RemoveAll();
00243
00244   // Remove all of the corresponding formatted strings from the listbox.
00245   m_ctlList.ResetContent();
00246 }
00247
00248 void CTypedPtrListView::OnSelChangeList()
00249 {
00250   // Update the edit control to reflect the new selection
00251   // in the listbox.
00252
00253   int nSel;
00254   POSITION pos;
00255   // Find the CMyStruct in the CTypedPtrList and listbox.
00256   CMyStruct* pMyStruct = FindMyStruct(nSel, pos);
00257
00258   m_int = pMyStruct->m_int;
00259   m_float = pMyStruct->m_float;
00260   m_str = pMyStruct->m_str;
00261
00262   UpdateData(FALSE);
00263 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynamicMenuDoc Member List

This is the complete list of members for CDynamicMenuDoc, including all inherited members.
CDynamicMenuDoc() | CDynamicMenuDoc | [protected]
OnNewDocument() | CDynamicMenuDoc | [virtual]
Serialize(CArchive &ar) | CDynamicMenuDoc | [virtual]
~CDynamicMenuDoc() | CDynamicMenuDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/targetver.h Source File

  • vc2008fp
  • StatusBarDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll1.cpp Source File

  • advanced
  • dllhusk

testdll1.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011
00012 #include "resource.h"       // main symbols
00013 #include "testres1.h"       // symbols unique to this DLL
00014
00015 #include "testdll1.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // Initialization of MFC Extension DLL
00024
00025 #include "afxdllx.h"    // standard MFC Extension DLL routines
00026
00027 static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
00028
00029 extern "C" int APIENTRY
00030 DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
00031 {
00032   if (dwReason == DLL_PROCESS_ATTACH)
00033   {
00034     // Extension DLL one-time initialization.
00035     if (!AfxInitExtensionModule(extensionDLL, hInstance))
00036        return 0;
00037
00038     // Other initialization could be done here, as long as
00039     // it doesn't result in direct or indirect calls to AfxGetApp.
00040     // This extension DLL needs to add doc templates to the
00041     // app object, so it waits for the application to boot
00042     // and call an initialization function (see below).
00043   }
00044   return 1;   // ok
00045 }
00046
00047 // Exported DLL initialization is run in context of running application
00048 extern "C" void WINAPI InitTestDLL1()
00049 {
00050   // create a new CDynLinkLibrary for this app
00051   #pragma warning(push)
00052   #pragma warning(disable:6211) //silence prefast warning because CDynLinkLibrary is cleaned up elsewhere
00053   new CDynLinkLibrary(extensionDLL);
00054   #pragma warning(pop)
00055
00056   // Register the doc templates we provide to the app
00057   CWinApp* pApp = AfxGetApp();
00058   ENSURE(pApp != NULL);
00059   pApp->AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
00060       RUNTIME_CLASS(CTextDoc),
00061       RUNTIME_CLASS(CMDIChildWnd),
00062       RUNTIME_CLASS(CEditView)));
00063   pApp->AddDocTemplate(new CMultiDocTemplate(IDR_HELLOTYPE,
00064       RUNTIME_CLASS(CDummyDoc),
00065       RUNTIME_CLASS(CMDIChildWnd),
00066       RUNTIME_CLASS(CHelloView)));
00067   // add other initialization here
00068 }
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // Example of a Simple CEditView (taken from MultiPad)
00072
00073 IMPLEMENT_DYNCREATE(CTextDoc, CDocument)
00074
00075 BEGIN_MESSAGE_MAP(CTextDoc, CDocument)
00076   //{{AFX_MSG_MAP(CTextDoc)
00077   //}}AFX_MSG_MAP
00078 END_MESSAGE_MAP()
00079
00080 void CTextDoc::Serialize(CArchive& ar)
00081 {
00082   CEditView* pView = (CEditView*)m_viewList.GetHead();
00083   ASSERT_KINDOF(CEditView, pView);
00084   pView->SerializeRaw(ar);
00085 }
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CHelloView : example of a simple output only document and view
00089 //      (taken from Hello/MDI)
00090
00091 IMPLEMENT_DYNCREATE(CHelloView, CView)
00092
00093 BEGIN_MESSAGE_MAP(CHelloView, CView)
00094   //{{AFX_MSG_MAP(CHelloView)
00095   ON_WM_PAINT()
00096   ON_COMMAND(IDM_BLACK, OnColor)
00097   ON_COMMAND(IDM_CUSTOM, OnCustomColor)
00098   ON_COMMAND(IDM_RED, OnColor)
00099   ON_COMMAND(IDM_GREEN, OnColor)
00100   ON_COMMAND(IDM_BLUE, OnColor)
00101   ON_COMMAND(IDM_WHITE, OnColor)
00102   ON_UPDATE_COMMAND_UI(IDM_BLACK, OnUpdateColor)
00103   ON_UPDATE_COMMAND_UI(IDM_BLUE, OnUpdateColor)
00104   ON_UPDATE_COMMAND_UI(IDM_GREEN, OnUpdateColor)
00105   ON_UPDATE_COMMAND_UI(IDM_RED, OnUpdateColor)
00106   ON_UPDATE_COMMAND_UI(IDM_WHITE, OnUpdateColor)
00107   ON_UPDATE_COMMAND_UI(IDM_CUSTOM, OnUpdateColor)
00108   //}}AFX_MSG_MAP
00109 END_MESSAGE_MAP()
00110
00111 CHelloView::CHelloView()
00112 {
00113   m_nIDColor = IDM_BLACK;
00114   m_clrText = RGB(0, 0, 0);
00115 }
00116
00117 // OnDraw: Draw a string in the center of the client area.
00118 void CHelloView::OnDraw(CDC* pDC)
00119 {
00120   CRect rect;
00121
00122   pDC->SetTextColor(m_clrText);
00123   pDC->SetBkColor(::GetSysColor(COLOR_WINDOW));
00124   GetClientRect(rect);
00125   pDC->DrawText(_T("Hello, World!"), -1, rect,
00126     DT_SINGLELINE | DT_CENTER | DT_VCENTER);
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CHelloView command
00131
00132 void CHelloView::OnUpdateColor(CCmdUI* pCmdUI)
00133 {
00134   pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
00135 }
00136
00137 // Color array maps to order of the Color menu
00138 static COLORREF NEAR colorArray[] =
00139 {
00140   RGB (0, 0, 0),
00141   RGB (255, 0, 0),
00142   RGB (0, 255, 0),
00143   RGB (0, 0, 255),
00144   RGB (255, 255, 255)
00145 };
00146
00147 void CHelloView::OnColor()
00148 {
00149   m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
00150   m_clrText = colorArray[m_nIDColor - IDM_BLACK];
00151
00152   // Force the client area text to be repainted in the new color
00153   Invalidate();
00154 }
00155
00156 void CHelloView::OnCustomColor()
00157 {
00158   CColorDialog dlgColor(m_clrText);
00159   if (dlgColor.DoModal() == IDOK)
00160   {
00161     m_clrText = dlgColor.GetColor();
00162     m_nIDColor = IDM_CUSTOM;
00163     Invalidate();
00164   }
00165 }
00166
00167 /////////////////////////////////////////////////////////////////////////////
00168 // CDummyDoc : a do-nothing document that can be used with non-data views
00169
00170 IMPLEMENT_DYNCREATE(CDummyDoc, CDocument)
00171
00172 BEGIN_MESSAGE_MAP(CDummyDoc, CDocument)
00173   //{{AFX_MSG_MAP(CDummyDoc)
00174   //}}AFX_MSG_MAP
00175 END_MESSAGE_MAP()
00176
00177 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COEMFile Member List

This is the complete list of members for COEMFile, including all inherited members.
COEMFile(CFrameWnd *pWnd) | COEMFile |
COEMFile(CFrameWnd *pWnd) | COEMFile |
CTrackFile(CFrameWnd *pWnd) | CTrackFile |
CTrackFile(CFrameWnd *pWnd) | CTrackFile |
m_dwLength | CTrackFile |
m_dwLength | CTrackFile |
m_nLastPercent | CTrackFile |
m_pFrameWnd | CTrackFile |
m_strComplete | CTrackFile |
m_strSaving | CTrackFile |
m_strWait | CTrackFile |
OutputPercent(int nPercentComplete=0) | CTrackFile |
OutputPercent(int nPercentComplete=0) | CTrackFile |
OutputString(LPCTSTR lpsz) | CTrackFile |
OutputString(LPCTSTR lpsz) | CTrackFile |
Read(void FAR *lpBuf, UINT nCount) | COEMFile | [virtual]
Read(void FAR *lpBuf, UINT nCount) | COEMFile | [virtual]
Write(const void FAR *lpBuf, UINT nCount) | COEMFile | [virtual]
Write(const void FAR *lpBuf, UINT nCount) | COEMFile | [virtual]
~CTrackFile() | CTrackFile |
~CTrackFile() | CTrackFile |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/stdafx.h Source File

  • vc2008fp
  • WordPad

stdafx.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #ifndef _SECURE_ATL
00004 #define _SECURE_ATL 1
00005 #endif
00006
00007 #ifndef VC_EXTRALEAN
00008 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00009 #endif
00010
00011 #include "targetver.h"
00012
00013 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00014
00015 // turns off MFC's hiding of some common and often safely ignored warning messages
00016 #define _AFX_ALL_WARNINGS
00017
00018 // #define CONVERTERS
00019
00020 #include <afxwin.h>         // MFC core and standard components
00021 #include <afxext.h>         // MFC extensions
00022 #include <afxole.h>         // MFC OLE classes
00023 #include <afxodlgs.h>       // MFC OLE dialog classes
00024 #include <afxcmn.h>
00025 #include <afxpriv.h>
00026
00027 #pragma warning (disable : 4189)
00028 #include <afxrich.h>
00029 #pragma warning (default : 4189)
00030
00031 #define HORZ_TEXTOFFSET 15
00032 #define VERT_TEXTOFFSET 5
00033
00034 class CDisplayIC : public CDC
00035 {
00036 public:
00037   CDisplayIC() { CreateIC(_T("DISPLAY"), NULL, NULL, NULL); }
00038 };
00039
00040 #define WPD_CHARFORMAT CHARFORMAT2
00041 #define WPD_PARAFORMAT PARAFORMAT2
00042
00043 struct CCharFormat : public WPD_CHARFORMAT
00044 {
00045   CCharFormat() {cbSize = sizeof(WPD_CHARFORMAT);}
00046   BOOL operator==(CCharFormat& cf);
00047 };
00048
00049 struct CParaFormat : public WPD_PARAFORMAT
00050 {
00051   CParaFormat() {cbSize = sizeof(WPD_PARAFORMAT);}
00052   BOOL operator==(WPD_PARAFORMAT& pf);
00053 };
00054
00055 #include "doctype.h"
00056 #include "chicdial.h"
00057
00058 #ifndef _AFX_NO_OLE_SUPPORT
00059 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00060 #endif
00061 #ifndef _AFX_NO_AFXCMN_SUPPORT
00062 #include <afxcmn.h>     // MFC support for Windows Common Controls
00063 #endif // _AFX_NO_AFXCMN_SUPPORT
00064
00065 #include <afxcontrolbars.h> // MFC ribbon and control bar support
00066
00067 #if defined _M_IX86
00068 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00069 #elif defined _M_X64
00070 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00071 #else
00072 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00073 #endif
00074
00075
00076 #pragma warning (disable : 4996)
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsDoc.h Source File

  • vc2008fp
  • RibbonGadgets

RibbonGadgetsDoc.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CRibbonGadgetsDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CRibbonGadgetsDoc();
00018   DECLARE_DYNCREATE(CRibbonGadgetsDoc)
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual BOOL OnNewDocument();
00029   virtual void Serialize(CArchive& ar);
00030
00031 // Implementation
00032 public:
00033   virtual ~CRibbonGadgetsDoc();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:
00040   DECLARE_MESSAGE_MAP()
00041
00042 protected:
00043   BOOL m_bStartup;
00044 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/regsvr/version.h Source File

  • controls
  • regsvr

version.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #define rmj     4
00011 #define rmm     0
00012 #define rup     0
00013 #define szVerName   ""
00014 #define szVerUser   ""
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMVisualManager.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMVisualManager.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMVisualManager.h : header file
00013 //
00014
00015 class CMSMVisualManager : public CMFCVisualManagerOffice2003
00016 {
00017   DECLARE_DYNCREATE(CMSMVisualManager)
00018
00019 // Construction
00020 public:
00021   CMSMVisualManager();
00022
00023   virtual ~CMSMVisualManager();
00024
00025   virtual void MSMDrawCaptionButton (CDC* pDC, CRect rect, AFX_BUTTON_STATE state, UINT id);
00026
00027   void SetupMemoryBitmapSize (CDC* pDC, const CSize& size);
00028
00029   BOOL LoadMSMCaptionButtonsIcons (LPCTSTR lpszID);
00030
00031   const CSize& GetMSMCaptionButtonsSize () const;
00032
00033 protected:
00034   virtual void OnUpdateSystemColors ();
00035
00036   virtual void OnDrawSeparator (CDC* pDC, CBasePane* pBar,
00037                 CRect rect, BOOL bHorz);
00038
00039   virtual COLORREF GetToolbarButtonTextColor (CMFCToolBarButton* pButton,
00040                      CMFCVisualManager::AFX_BUTTON_STATE state);
00041
00042   virtual void OnFillBarBackground (CDC* pDC, CBasePane* pBar,
00043            CRect rectClient, CRect rectClip, BOOL bNCArea = FALSE);
00044
00045   virtual void OnFillHighlightedArea (CDC* pDC, CRect rect,
00046              CBrush* pBrush, CMFCToolBarButton* pButton);
00047
00048   virtual void OnDrawMenuBorder (CDC* pDC, CMFCPopupMenu* pMenu, CRect rect);
00049
00050   virtual void OnDrawButtonBorder (CDC* pDC,
00051              CMFCToolBarButton* pButton, CRect rect, AFX_BUTTON_STATE state);
00052
00053   virtual void OnHighlightMenuItem (CDC*pDC, CMFCToolBarMenuButton* pButton,
00054                  CRect rect, COLORREF& clrText);
00055
00056   virtual void OnDrawComboBorder (CDC* pDC, CRect rect,
00057                    BOOL bDisabled,
00058                    BOOL bIsDropped,
00059                    BOOL bIsHighlighted,
00060                    CMFCToolBarComboBoxButton* pButton);
00061
00062   virtual void OnDrawComboDropButton (CDC* pDC, CRect rect,
00063                    BOOL bDisabled,
00064                    BOOL bIsDropped,
00065                    BOOL bIsHighlighted,
00066                    CMFCToolBarComboBoxButton* pButton);
00067
00068   virtual void OnFillTasksPaneBackground(CDC* pDC, CRect rectWorkArea);
00069   virtual void OnFillTasksGroupInterior(CDC* /*pDC*/, CRect /*rect*/, BOOL /*bSpecial*/ = FALSE) {}
00070   virtual void OnDrawTasksGroupAreaBorder(CDC* /*pDC*/, CRect /*rect*/, BOOL /*bSpecial*/ = FALSE, BOOL /*bNoTitle*/ = FALSE) {}
00071   virtual void OnDrawTask(CDC* pDC, CMFCTasksPaneTask* pTask, CImageList* pIcons, BOOL bIsHighlighted = FALSE, BOOL bIsSelected = FALSE);
00072
00073 private:
00074   CSize    m_MemorySize;
00075   CDC      m_MemoryDC;
00076   CBitmap    m_MemoryBitmap;
00077   BOOL     m_MemoryFilled;
00078
00079   CImageList m_CaptionButtonIconst;
00080   CSize    m_CaptionButtonSize;
00081
00082   CBitmap    m_MSMFrameBitmap;
00083   CBitmap    m_MSMViewBitmap;
00084
00085   CBrush     m_brMenuBarButtonHighlighted;
00086   COLORREF   m_clrMenuBarButtonBorderHighlighted;
00087
00088   COLORREF   m_clrMenuBarButtonTextRegular;
00089   COLORREF   m_clrMenuBarButtonTextPressed;
00090   COLORREF   m_clrMenuBarButtonTextHighlighted;
00091
00092   COLORREF   m_clrToolBarButtonTextRegular;
00093   COLORREF   m_clrToolBarButtonTextPressed;
00094   COLORREF   m_clrToolBarButtonTextHighlighted;
00095
00096   COLORREF   m_clrCategorieBarButtonTextRegular;
00097   COLORREF   m_clrCategorieBarButtonTextPressed;
00098   COLORREF   m_clrCategorieBarButtonTextHighlighted;
00099
00100   COLORREF   m_clrToolBarSeparatorS;
00101   COLORREF   m_clrToolBarSeparatorM;
00102   COLORREF   m_clrToolBarSeparatorF;
00103
00104   COLORREF   m_clrComboBoxBorder;
00105
00106   COLORREF   m_clrComboBoxBtnRegularF;
00107   COLORREF   m_clrComboBoxBtnRegularL;
00108   COLORREF   m_clrComboBoxBtnRegularBorder;
00109   COLORREF   m_clrComboBoxBtnHighlightedF;
00110   COLORREF   m_clrComboBoxBtnHighlightedL;
00111   COLORREF   m_clrComboBoxBtnHighlightedBorder;
00112   COLORREF   m_clrComboBoxBtnPressedF;
00113   COLORREF   m_clrComboBoxBtnPressedL;
00114   COLORREF   m_clrComboBoxBtnPressedBorder;
00115
00116   COLORREF   m_clrCategorieBarButtonBorder;
00117   COLORREF   m_clrCategorieBarButtonBorderM;
00118   COLORREF   m_clrCategorieBarButtonLine;
00119   COLORREF   m_clrCategorieBarButtonF;
00120   COLORREF   m_clrCategorieBarButtonL;
00121
00122   CBrush     m_brLinksBarBack;
00123   CBrush     m_brLinksBarButtonHighlighted;
00124   COLORREF   m_clrLinksBarButtonBorderHighlighted;
00125 };
00126
00127
00128 inline
00129 const CSize&
00130 CMSMVisualManager::GetMSMCaptionButtonsSize () const
00131 {
00132   return m_CaptionButtonSize;
00133 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CScriptManager Member List

This is the complete list of members for CScriptManager, including all inherited members.
AddNamedItem(LPCTSTR pszItemName, IDispatch *pDispatch) | CScriptManager |
AddNamedItems(IActiveScript *pScript) | CScriptManager |
CScriptManager(CTestContainer98Doc *pDoc) | CScriptManager |
DECLARE_DYNAMIC(CScriptManager) | CScriptManager | [private]
FindMacro(LPCTSTR pszMacroName) | CScriptManager |
GetFirstScriptPosition() const | CScriptManager |
GetItemDispatch(LPCTSTR pszItemName, IUnknown **ppDispatch) | CScriptManager |
GetItemTypeInfo(LPCTSTR pszItemName, ITypeInfo **ppTypeInfo) | CScriptManager |
GetNextScript(POSITION &posScript) | CScriptManager |
GetNumScripts() const | CScriptManager |
LoadScript(LPCTSTR pszFileName, LPCTSTR pszScriptName, CScript **ppScript=NULL) | CScriptManager |
m_lpScripts | CScriptManager | [protected]
m_mapNamedItems | CScriptManager | [protected]
m_pDoc | CScriptManager | [protected]
~CScriptManager() | CScriptManager |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mainfrm.h Source File

  • advanced
  • mtgdi

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CFrameWnd
00013 {
00014 protected: // create from serialization only
00015   CMainFrame();
00016   DECLARE_DYNCREATE(CMainFrame)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CMainFrame)
00027   protected:
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 // Generated message map functions
00040 protected:
00041   //{{AFX_MSG(CMainFrame)
00042     // NOTE - the ClassWizard will add and remove member functions here.
00043     //    DO NOT EDIT what you see in these blocks of generated code!
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMFCRibbonNumEditCtrl Member List

This is the complete list of members for CMFCRibbonNumEditCtrl, including all inherited members.
CMFCRibbonNumEditCtrl(CMFCRibbonEdit &edit) | CMFCRibbonNumEditCtrl | [inline]
m_nValidNum | CMFCRibbonNumEditCtrl | [protected]
OnKillFocus(CWnd *pNewWnd) | CMFCRibbonNumEditCtrl | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Dlgbars.h Source File

  • general
  • dlgcbr32

Dlgbars.h

Go to the documentation of this file.
00001 // DlgBars.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014
00015   Purpose:
00016   Interface for CDlgToolBar, a special type of CToolBar which does not
00017   expect a parent frame window to be available, and CDlgStatusBar, which
00018   does the same for CStatusBars.  This allows the control bars
00019   to be used in applications where the main window is a dialog bar.
00020
00021   Functions:
00022   CDlgToolBar::CDlgToolBar()          -- constructor
00023   CDlgToolBar::~CDlgToolBar()         -- destructor
00024   CDlgToolBar::OnIdleUpdateCmdUI()    -- WM_IDLEUPDATECMDUI handler
00025
00026   CDlgStatusBar::CDlgStatusBar()      -- constructor
00027   CDlgStatusBar::~CDlgStatusBar()     -- destructor
00028   CDlgStatusBar::OnIdleUpdateCmdUI()  -- WM_IDLEUPDATECMDUI handler
00029
00030   Development Team:
00031   Mary Kirtland
00032   Ported to 32-bit by:
00033   Mike Hedley
00034   Created by Microsoft Product Support Services, Premier ISV Support
00035   Copyright (c) Microsoft Corporation.  All rights reserved.
00036 \****************************************************************************/
00037
00038 #ifndef __DLGBARS_H__
00039 #define __DLGBARS_H__
00040
00041 class CDlgToolBar : public CToolBar
00042 {
00043 // Construction
00044 public:
00045   CDlgToolBar();
00046
00047 // Implementation
00048 public:
00049   virtual ~CDlgToolBar();
00050
00051 protected:
00052   // Generated message map functions
00053   //{{AFX_MSG(CDlgToolBar)
00054   afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM);
00055   //}}AFX_MSG
00056   DECLARE_MESSAGE_MAP()
00057 };
00058
00059 class CDlgStatusBar : public CStatusBar
00060 {
00061 // Construction
00062 public:
00063   CDlgStatusBar();
00064
00065 // Implementation
00066 public:
00067   virtual ~CDlgStatusBar();
00068
00069 protected:
00070   // Generated message map functions
00071   //{{AFX_MSG(CDlgStatusBar)
00072   afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM);
00073   //}}AFX_MSG
00074   DECLARE_MESSAGE_MAP()
00075 };
00076
00077
00078
00079 #endif //__DLGBARS_H__
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CButtonApp Member List

This is the complete list of members for CButtonApp, including all inherited members.
ExitInstance() | CButtonApp
InitInstance() | CButtonApp
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/EditToolbar.cpp Source File

  • internet
  • HTMLEdit

EditToolbar.cpp

Go to the documentation of this file.
00001 // EditToolbar.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014 #include "EditToolbar.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CEditToolbar
00024
00025 CEditToolbar::CEditToolbar()
00026 {
00027 }
00028
00029 CEditToolbar::~CEditToolbar()
00030 {
00031 }
00032
00033
00034 BEGIN_MESSAGE_MAP(CEditToolbar, CToolBar)
00035   //{{AFX_MSG_MAP(CEditToolbar)
00036   ON_WM_CREATE()
00037   //}}AFX_MSG_MAP
00038
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CEditToolbar message handlers
00043
00044 int CEditToolbar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00045 {
00046   if (CToolBar::OnCreate(lpCreateStruct) == -1)
00047     return -1;
00048
00049   return 0;
00050 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/resource.h Source File

  • general
  • ctrlbars

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by ctrlbars.rc
00004 //
00005 #define IDB_STYLES                      3
00006 #define IDD_ABOUTBOX                    100
00007 #define IDC_PALETTE                     101
00008 #define IDW_COMBO                       102
00009 #define IDD_VIEWSELECT                  102
00010 #define IDS_DEFAULT_FONT                103
00011 #define IDB_PALETTE                     106
00012 #define IDR_MAINFRAME                   128
00013 #define IDW_STYLES                      501
00014 #define IDM_VIEWPALETTE                 502
00015 #define ID_PALETTE_BASE                 601
00016 #define ID_PALETTEERASE                 601
00017 #define ID_PALETTEPEN                   602
00018 #define ID_PALETTESELECT                603
00019 #define ID_PALETTEBRUSH                 604
00020 #define ID_PALETTESPRAY                 605
00021 #define ID_PALETTEPAINT                 606
00022 #define ID_PALETTELINE                  607
00023 #define ID_PALETTEEYEDROP               608
00024 #define ID_PALETTEMAG                   609
00025 #define ID_PALETTERECT                  610
00026 #define ID_PALETTEROUND                 611
00027 #define ID_PALETTEOVAL                  612
00028 #define ID_VIEW_DLGBARTOP               32800
00029 #define ID_VIEW_SHORT                   32801
00030 #define ID_VIEW_LONG                    32802
00031 #define ID_TOGGLE_INSERT                32803
00032 #define IDM_PALETTE_2COLUMN             32804
00033 #define IDM_PALETTE_3COLUMN             32805
00034 #define ID_STYLE_BASE                   33000
00035 #define ID_STYLE_LEFT                   33000
00036 #define ID_STYLE_CENTERED               33001
00037 #define ID_STYLE_RIGHT                  33002
00038 #define ID_STYLE_JUSTIFIED              33003
00039 #define ID_PALETTEBAR                   59396
00040 #define IDS_LEFT                        61204
00041 #define IDS_RIGHT                       61205
00042 #define IDS_CENTERED                    61206
00043 #define IDS_JUSTIFIED                   61207
00044 #define IDS_SELECTED_PROMPT             61208
00045
00046 // Next default values for new objects
00047 //
00048 #ifdef APSTUDIO_INVOKED
00049 #ifndef APSTUDIO_READONLY_SYMBOLS
00050 #define _APS_NEXT_RESOURCE_VALUE        108
00051 #define _APS_NEXT_COMMAND_VALUE         34000
00052 #define _APS_NEXT_CONTROL_VALUE         105
00053 #define _APS_NEXT_SYMED_VALUE           102
00054 #endif
00055 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/mfccalc.odl Source File

  • ole
  • mfccalc

mfccalc.odl

Go to the documentation of this file.
00001 // mfccalc.odl : type library source for mfccalc.exe
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (mfccalc.tlb).
00005
00006 [ uuid(5627AF00-F44C-11CD-8C3D-00AA004BB3B7), version(1.0) ]
00007 library mfccalc
00008 {
00009   importlib("stdole32.tlb");
00010
00011
00012   //  Primary dispatch interface for CCalcDlg
00013
00014   [ uuid(990BA900-F45E-11cd-8C3D-00AA004BB3B7) ]
00015   dispinterface ICalcDlg
00016   {
00017     properties:
00018       // NOTE - ClassWizard will maintain property information here.
00019       //    Use extreme caution when editing this section.
00020       //{{AFX_ODL_PROP(CCalcDlg)
00021       [id(1)] long Accum;
00022       [id(2)] long Operand;
00023       [id(3)] short Operation;
00024       [id(4)] boolean Visible;
00025       //}}AFX_ODL_PROP
00026
00027     methods:
00028       // NOTE - ClassWizard will maintain method information here.
00029       //    Use extreme caution when editing this section.
00030       //{{AFX_ODL_METHOD(CCalcDlg)
00031       [id(5)] boolean Evaluate();
00032       [id(6)] void Clear();
00033       [id(7)] void Display();
00034       [id(8)] void Close();
00035       [id(9)] boolean Button(BSTR szButton);
00036       //}}AFX_ODL_METHOD
00037
00038   };
00039
00040   //  Class information for CCCalcDlg
00041
00042   [ uuid(62C4DD10-F45E-11cd-8C3D-00AA004BB3B7) ]
00043   coclass CCCalcDlg
00044   {
00045     [default] dispinterface ICalcDlg;
00046   };
00047
00048   //{{AFX_APPEND_ODL}}
00049 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNotifyShowCase Member List

This is the complete list of members for CNotifyShowCase, including all inherited members.
AddLine(LPCTSTR lpsz) | CNotifyShowCase |
AddLine(LPCTSTR lpsz) | CNotifyShowCase |
CNotifyShowCase() | CNotifyShowCase |
CNotifyShowCase() | CNotifyShowCase |
m_rgNotifDescrip | CNotifyShowCase | [static]
m_totalLines | CNotifyShowCase |
SetBufferSize(int nLines) | CNotifyShowCase | [inline]
SetBufferSize(int nLines) | CNotifyShowCase | [inline]
ShowNotification(UINT nCode) | CNotifyShowCase |
ShowNotification(UINT nCode) | CNotifyShowCase |
~CNotifyShowCase() | CNotifyShowCase | [virtual]
~CNotifyShowCase() | CNotifyShowCase | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoclik.cpp Source File

  • ole
  • autoclik
  • autodriv

autoclik.cpp

Go to the documentation of this file.
00001 // Machine generated IDispatch wrapper class(es) created with ClassWizard
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "autoclik.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CAutoClik properties
00017
00018 CString CAutoClik::GetText()
00019 {
00020   CString result;
00021   GetProperty(0x1, VT_BSTR, (void*)&result);
00022   return result;
00023 }
00024
00025 void CAutoClik::SetText(LPCTSTR propVal)
00026 {
00027   SetProperty(0x1, VT_BSTR, propVal);
00028 }
00029
00030 short CAutoClik::GetX()
00031 {
00032   short result;
00033   GetProperty(0x2, VT_I2, (void*)&result);
00034   return result;
00035 }
00036
00037 void CAutoClik::SetX(short propVal)
00038 {
00039   SetProperty(0x2, VT_I2, propVal);
00040 }
00041
00042 short CAutoClik::GetY()
00043 {
00044   short result;
00045   GetProperty(0x3, VT_I2, (void*)&result);
00046   return result;
00047 }
00048
00049 void CAutoClik::SetY(short propVal)
00050 {
00051   SetProperty(0x3, VT_I2, propVal);
00052 }
00053
00054 LPDISPATCH CAutoClik::GetPosition()
00055 {
00056   LPDISPATCH result;
00057   GetProperty(0x4, VT_DISPATCH, (void*)&result);
00058   return result;
00059 }
00060
00061 void CAutoClik::SetPosition(LPDISPATCH propVal)
00062 {
00063   SetProperty(0x4, VT_DISPATCH, propVal);
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CAutoClik operations
00068
00069 void CAutoClik::RefreshWindow()
00070 {
00071   InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00072 }
00073
00074 void CAutoClik::SetAllProps(short x, short y, LPCTSTR text)
00075 {
00076   static BYTE BASED_CODE parms[] =
00077     VTS_I2 VTS_I2 VTS_BSTR;
00078   InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
00079      x, y, text);
00080 }
00081
00082 void CAutoClik::ShowWindow()
00083 {
00084   InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00085 }
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CClikPoint properties
00088
00089 short CClikPoint::GetX()
00090 {
00091   short result;
00092   GetProperty(0x1, VT_I2, (void*)&result);
00093   return result;
00094 }
00095
00096 void CClikPoint::SetX(short propVal)
00097 {
00098   SetProperty(0x1, VT_I2, propVal);
00099 }
00100
00101 short CClikPoint::GetY()
00102 {
00103   short result;
00104   GetProperty(0x2, VT_I2, (void*)&result);
00105   return result;
00106 }
00107
00108 void CClikPoint::SetY(short propVal)
00109 {
00110   SetProperty(0x2, VT_I2, propVal);
00111 }
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CClikPoint operations
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonMDIDemoView Member List

This is the complete list of members for CRibbonMDIDemoView, including all inherited members.
CRibbonMDIDemoView() | CRibbonMDIDemoView | [protected]
GetDocument() | CRibbonMDIDemoView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CRibbonMDIDemoView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CRibbonMDIDemoView | [protected]
OnDraw(CDC *pDC) | CRibbonMDIDemoView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CRibbonMDIDemoView | [protected, virtual]
OnFilePrintPreview() | CRibbonMDIDemoView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CRibbonMDIDemoView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CRibbonMDIDemoView | [virtual]
~CRibbonMDIDemoView() | CRibbonMDIDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/splash.cpp Source File

  • ole
  • wordpad

splash.cpp

Go to the documentation of this file.
00001 // splash.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CSplashWnd dialog
00022
00023 BOOL CSplashWnd::Create(CWnd* pParent)
00024 {
00025   //{{AFX_DATA_INIT(CSplashWnd)
00026     // NOTE: the ClassWizard will add member initialization here
00027   //}}AFX_DATA_INIT
00028
00029   if (!CDialog::Create(CSplashWnd::IDD, pParent))
00030   {
00031     TRACE0("Warning: creation of CSplashWnd dialog failed\n");
00032     return FALSE;
00033   }
00034
00035   return TRUE;
00036 }
00037
00038 BOOL CSplashWnd::OnInitDialog()
00039 {
00040   CDialog::OnInitDialog();
00041   CenterWindow();
00042
00043   // initialize the big icon control
00044   m_icon.SubclassDlgItem(IDC_BIGICON, this);
00045   m_icon.SizeToContent();
00046
00047   return TRUE;  // return TRUE  unless you set the focus to a control
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CSplashWnd message handlers
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CBigIcon
00055
00056 BEGIN_MESSAGE_MAP(CBigIcon, CButton)
00057   //{{AFX_MSG_MAP(CBigIcon)
00058   ON_WM_DRAWITEM()
00059   ON_WM_ERASEBKGND()
00060   //}}AFX_MSG_MAP
00061 END_MESSAGE_MAP()
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CBigIcon message handlers
00065
00066 #define CY_SHADOW   4
00067 #define CX_SHADOW   4
00068
00069 void CBigIcon::SizeToContent()
00070 {
00071   m_bitmap.LoadBitmap(IDB_BITMAP48);
00072   BITMAP bm;
00073   m_bitmap.GetObject(sizeof(bm), &bm);
00074   m_sizeBitmap = CSize(bm.bmWidth, bm.bmHeight);
00075   // get system icon size
00076
00077   // a big icon should be twice the size of an icon + shadows
00078   SetWindowPos(NULL, 0, 0, bm.bmWidth + CX_SHADOW + 4, bm.bmHeight + CY_SHADOW + 4,
00079     SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
00080 }
00081
00082 void CBigIcon::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00083 {
00084   CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
00085   ENSURE(pDC != NULL);
00086
00087   CRect rect;
00088   GetClientRect(rect);
00089   int cxClient = rect.Width();
00090   int cyClient = rect.Height();
00091
00092   // draw border around icon
00093   CPen pen;
00094   pen.CreateStockObject(BLACK_PEN);
00095   CPen* pPenOld = pDC->SelectObject(&pen);
00096   pDC->Rectangle(0, 0, cxClient-CX_SHADOW, cyClient-CY_SHADOW);
00097   if (pPenOld)
00098     pDC->SelectObject(pPenOld);
00099
00100   // draw shadows around icon
00101   CBrush br;
00102   br.CreateStockObject(DKGRAY_BRUSH);
00103   rect.SetRect(cxClient-CX_SHADOW, CY_SHADOW, cxClient, cyClient);
00104   pDC->FillRect(rect, &br);
00105   rect.SetRect(CX_SHADOW, cyClient-CY_SHADOW, cxClient, cyClient);
00106   pDC->FillRect(rect, &br);
00107
00108   // draw the bitmap contents
00109   CDC dcMem;
00110   if (!dcMem.CreateCompatibleDC(pDC))
00111     return;
00112   CBitmap* pBitmapOld = dcMem.SelectObject(&m_bitmap);
00113   if (pBitmapOld == NULL)
00114     return;
00115
00116   pDC->BitBlt(2, 2, m_sizeBitmap.cx, m_sizeBitmap.cy, &dcMem, 0, 0, SRCCOPY);
00117
00118   dcMem.SelectObject(pBitmapOld);
00119 }
00120
00121 BOOL CBigIcon::OnEraseBkgnd(CDC*)
00122 {
00123   return TRUE;    // we don't do any erasing...
00124 }
00125
00126 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClient.cpp Source File

  • vc2008fp
  • DrawClient

DrawClient.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014
00015 #include "mainfrm.h"
00016 #include "drawobj.h"
00017 #include "drawdoc.h"
00018 #include "drawvw.h"
00019 #include "splitfrm.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CDrawApp
00028
00029 BEGIN_MESSAGE_MAP(CDrawApp, CWinAppEx)
00030   //{{AFX_MSG_MAP(CDrawApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032   // NOTE - the ClassWizard will add and remove mapping macros here.
00033   //    DO NOT EDIT what you see in these blocks of generated code!
00034   // Standard file based document commands
00035   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00036   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00037   // Standard print setup command
00038   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00039   //}}AFX_MSG_MAP
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CDrawApp construction
00044
00045 CDrawApp::CDrawApp()
00046 {
00047   // TODO: add construction code here, // Place all significant initialization in InitInstance
00048
00049   // support Restart Manager
00050   m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;
00051 }
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // The one and only CDrawApp object
00055
00056 CDrawApp theApp;
00057
00058
00059 // {7A301015-E5DF-4f44-A219-964CC90AA16C}
00060 static const GUID clsid =
00061 { 0x7a301015, 0xe5df, 0x4f44, { 0xa2, 0x19, 0x96, 0x4c, 0xc9, 0xa, 0xa1, 0x6c } };
00062
00063
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CDrawApp initialization
00067
00068 BOOL CDrawApp::InitInstance()
00069 {
00070   // Initialize OLE libraries
00071   if (!AfxOleInit())
00072   {
00073     AfxMessageBox(IDP_OLE_INIT_FAILED);
00074     return FALSE;
00075   }
00076
00077   // Standard initialization
00078   // If you are not using these features and wish to reduce the size
00079   // of your final executable, you should remove from the following
00080   // the specific initialization routines you do not need
00081   // Change the registry key under which our settings are stored
00082   // TODO: You should modify this string to be something appropriate
00083   // such as the name of your company or organization
00084   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00085   LoadStdProfileSettings(4);  // Load standard INI file options(including MRU)
00086
00087   SetRegistryBase(_T("Settings"));
00088   CWinApp::InitInstance();
00089
00090   // Initialize all Managers for usage. They are automatically constructed
00091   // if not yet present
00092   InitContextMenuManager();
00093   InitKeyboardManager();
00094   // TODO: Remove this if you don't want extended tooltips:
00095   InitTooltipManager();
00096
00097   CMFCToolTipInfo params;
00098   params.m_bVislManagerTheme = TRUE;
00099
00100   theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, RUNTIME_CLASS(CMFCToolTipCtrl), &params);
00101   // Register the application's document templates.  Document templates
00102   //  serve as the connection between documents, frame windows and views.
00103
00104   CMultiDocTemplate* pDocTemplate;
00105   pDocTemplate = new CMultiDocTemplate(IDR_DRAWCLTYPE, RUNTIME_CLASS(CDrawDoc), RUNTIME_CLASS(CSplitFrame), RUNTIME_CLASS(CDrawView));
00106   pDocTemplate->SetContainerInfo(IDR_DRAWCLTYPE_CNTR_IP);
00107   AddDocTemplate(pDocTemplate);
00108
00109   m_server.ConnectTemplate(clsid, pDocTemplate, FALSE, TRUE);
00110   COleTemplateServer::RegisterAll();
00111
00112   // create main MDI Frame window
00113   CMainFrame* pMainFrame = new CMainFrame;
00114
00115   if (!pMainFrame)
00116     return FALSE;
00117
00118   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00119   {
00120     delete pMainFrame;
00121     return FALSE;
00122   }
00123   m_pMainWnd = pMainFrame;
00124
00125   // Parse command line for standard shell commands, DDE, file open
00126
00127   CCommandLineInfo cmdInfo;
00128   ParseCommandLine(cmdInfo);
00129
00130   // Enable DDE Execute open
00131   if (!cmdInfo.m_bRunEmbedded)
00132   {
00133     EnableShellOpen();
00134   }
00135
00136   //------------------------
00137   RegisterShellFileTypes(TRUE);
00138
00139   if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
00140   {
00141     return TRUE;
00142   }
00143   else if (cmdInfo.m_nShellCommand == CCommandLineInfo::AppUnregister)
00144   {
00145     UnregisterShellFileTypes();
00146   }
00147   //------------------------
00148
00149   // Dispatch commands specified on the command line
00150   if (!ProcessShellCommand(cmdInfo))
00151     return FALSE;
00152
00153   // Enable drag/drop open
00154   m_pMainWnd->DragAcceptFiles();
00155
00156   // The main window has been initialized, so show and update it.
00157   pMainFrame->ShowWindow(m_nCmdShow);
00158   pMainFrame->UpdateWindow();
00159
00160   return TRUE;
00161 }
00162
00163 int CDrawApp::ExitInstance()
00164 {
00165   return CWinAppEx::ExitInstance();
00166 }
00167
00168 /////////////////////////////////////////////////////////////////////////////
00169 // CAboutDlg dialog used for App About
00170
00171 class CAboutDlg : public CDialog
00172 {
00173 public:
00174   CAboutDlg();
00175
00176 // Dialog Data
00177   //{{AFX_DATA(CAboutDlg)
00178   enum { IDD = IDD_ABOUTBOX };
00179   //}}AFX_DATA
00180
00181   // ClassWizard generated virtual function overrides
00182   //{{AFX_VIRTUAL(CAboutDlg)
00183   protected:
00184   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00185   //}}AFX_VIRTUAL
00186
00187 // Implementation
00188 protected:
00189   //{{AFX_MSG(CAboutDlg)
00190     // No message handlers
00191   //}}AFX_MSG
00192   DECLARE_MESSAGE_MAP()
00193 };
00194
00195 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00196 {
00197   //{{AFX_DATA_INIT(CAboutDlg)
00198   //}}AFX_DATA_INIT
00199 }
00200
00201 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00202 {
00203   CDialog::DoDataExchange(pDX);
00204   //{{AFX_DATA_MAP(CAboutDlg)
00205   //}}AFX_DATA_MAP
00206 }
00207
00208 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00209   //{{AFX_MSG_MAP(CAboutDlg)
00210     // No message handlers
00211   //}}AFX_MSG_MAP
00212 END_MESSAGE_MAP()
00213
00214 // App command to run the dialog
00215 void CDrawApp::OnAppAbout()
00216 {
00217   CAboutDlg aboutDlg;
00218   aboutDlg.DoModal();
00219 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/StdAfx.h Source File

  • vc2008fp
  • DynamicMenu

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
00046
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/stdafx.h Source File

  • vc2008fp
  • VisualStudioDemo

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 // or project specific include files that are used frequently,
00012 // but are changed infrequently
00013
00014 #pragma once
00015
00016 #ifndef _SECURE_ATL
00017 #define _SECURE_ATL 1
00018 #endif
00019
00020 #ifndef VC_EXTRALEAN
00021 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
00022 #endif
00023
00024 #include "targetver.h"
00025
00026 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
00027
00028 // turns off MFC's hiding of some common and often safely ignored warning messages
00029 #define _AFX_ALL_WARNINGS
00030
00031 #include <afxwin.h>         // MFC core and standard components
00032 #include <afxext.h>         // MFC extensions
00033
00034 #include <afxhtml.h>
00035 #include <afxdisp.h>        // MFC Automation classes
00036
00037 #ifndef _AFX_NO_OLE_SUPPORT
00038 #include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
00039 #endif
00040 #ifndef _AFX_NO_AFXCMN_SUPPORT
00041 #include <afxcmn.h>         // MFC support for Windows Common Controls
00042 #endif // _AFX_NO_AFXCMN_SUPPORT
00043
00044 #include <afxcontrolbars.h> // MFC support for ribbons and control bars
00045
00046 #if defined _M_IX86
00047 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00048 #elif defined _M_X64
00049 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00050 #else
00051 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00052 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInterfacesPage Member List

This is the complete list of members for CInterfacesPage, including all inherited members.
CInterfacesPage() | CInterfacesPage |
DoDataExchange(CDataExchange *pDX) | CInterfacesPage | [protected, virtual]
IDD enum value | CInterfacesPage |
m_tIAdviseSinkEx | CInterfacesPage |
m_tIOleInPlaceSiteEx | CInterfacesPage |
m_tIOleInPlaceSiteWindowless | CInterfacesPage |
OnContextMenu(CWnd *pWnd, CPoint point) | CInterfacesPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CInterfacesPage | [protected]
~CInterfacesPage() | CInterfacesPage |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsDoc.cpp Source File

  • vc2008fp
  • RibbonGadgets

RibbonGadgetsDoc.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonGadgets.h"
00014
00015 #include "RibbonGadgetsDoc.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CRibbonGadgetsDoc
00025
00026 IMPLEMENT_DYNCREATE(CRibbonGadgetsDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CRibbonGadgetsDoc, CDocument)
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CRibbonGadgetsDoc construction/destruction
00033
00034 CRibbonGadgetsDoc::CRibbonGadgetsDoc()
00035   : m_bStartup (TRUE)
00036 {
00037   // TODO: add one-time construction code here
00038
00039 }
00040
00041 CRibbonGadgetsDoc::~CRibbonGadgetsDoc()
00042 {
00043 }
00044
00045 BOOL CRibbonGadgetsDoc::OnNewDocument()
00046 {
00047   if (!CDocument::OnNewDocument())
00048     return FALSE;
00049
00050   return TRUE;
00051 }
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CRibbonGadgetsDoc serialization
00055
00056 void CRibbonGadgetsDoc::Serialize(CArchive& ar)
00057 {
00058   if (ar.IsStoring())
00059   {
00060   }
00061   else
00062   {
00063   }
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CRibbonGadgetsDoc diagnostics
00068
00069 #ifdef _DEBUG
00070 void CRibbonGadgetsDoc::AssertValid() const
00071 {
00072   CDocument::AssertValid();
00073 }
00074
00075 void CRibbonGadgetsDoc::Dump(CDumpContext& dc) const
00076 {
00077   CDocument::Dump(dc);
00078 }
00079 #endif //_DEBUG
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CRibbonGadgetsDoc commands
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/paredit2.cpp Source File

  • general
  • ctrltest

paredit2.cpp

Go to the documentation of this file.
00001 // paredit2.cpp : code needed to export CParsedEdit as a WndClass
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 #include "paredit.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // The C++ class CParsedEdit can be made visible to the dialog manager
00019 //   by registering a window class for it
00020 // The C++ class 'CParsedEditExported' is used to implement the
00021 //   creation and destruction of a C++ object as if it were just
00022 //   a normal Windows control.
00023 // In order to hook in the class creation we must provide a special
00024 //   WndProc to create the C++ object and override the PostNcDestroy
00025 //   message to destroy it
00026
00027 class CParsedEditExported : public CParsedEdit      // WNDCLASS exported class
00028 {
00029 public:
00030   CParsedEditExported() { };
00031   BOOL RegisterControlClass();
00032
00033 // Implementation: (all is implementation since the public interface of
00034 //    this class is identical to CParsedEdit)
00035 protected:
00036   virtual void PostNcDestroy();
00037   static LRESULT CALLBACK EXPORT WndProcHook(HWND, UINT, WPARAM, LPARAM);
00038   static WNDPROC lpfnSuperEdit;
00039
00040   friend class CParsedEdit;       // for RegisterControlClass
00041
00042   //{{AFX_MSG(CParsedEditExported)
00043   afx_msg int OnNcCreate(LPCREATESTRUCT lpCreateStruct);
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP();
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // Special create hooks
00050
00051 LRESULT CALLBACK EXPORT
00052 CParsedEditExported::WndProcHook(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
00053 {
00054   // create new item and attach it
00055   #pragma warning(push)
00056   #pragma warning(disable:6014) //disable PREFast warning about leaked memory
00057   CParsedEditExported* pEdit = new CParsedEditExported();
00058   #pragma warning(pop)
00059
00060   pEdit->Attach(hWnd);
00061
00062   // set up wndproc to AFX one, and call it
00063   pEdit->m_pfnSuper = CParsedEditExported::lpfnSuperEdit;
00064   ::SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)AfxWndProc);
00065
00066   // then call it for this first message
00067   return ::CallWindowProc(AfxWndProc, hWnd, msg, wParam, lParam);
00068 }
00069
00070 BEGIN_MESSAGE_MAP(CParsedEditExported, CParsedEdit)
00071   //{{AFX_MSG_MAP(CParsedEditExported)
00072   ON_WM_NCCREATE()
00073   //}}AFX_MSG_MAP
00074 END_MESSAGE_MAP()
00075
00076 int CParsedEditExported::OnNcCreate(LPCREATESTRUCT lpCreateStruct)
00077 {
00078   // special create hook
00079   // example of stripping the sub-style bits from the style specified
00080   //   in the dialog template to use for some other reason
00081   m_wParseStyle = LOWORD(lpCreateStruct->style);
00082   DWORD dwEditStyle = MAKELONG(ES_LEFT, HIWORD(lpCreateStruct->style));
00083
00084   ::SetWindowLong(m_hWnd, GWL_STYLE, dwEditStyle);
00085   lpCreateStruct->style = dwEditStyle;
00086   return CParsedEdit::OnNcCreate(lpCreateStruct);
00087 }
00088
00089 void CParsedEditExported::PostNcDestroy()
00090 {
00091   // needed to clean up the C++ CWnd object
00092   delete this;
00093 }
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // Routine to register the class
00097
00098 WNDPROC CParsedEditExported::lpfnSuperEdit = NULL;
00099
00100 BOOL CParsedEdit::RegisterControlClass()
00101 {
00102   WNDCLASS wcls;
00103
00104   // check to see if class already registered
00105   static const TCHAR szClass[] = _T("paredit");
00106   if (::GetClassInfo(AfxGetInstanceHandle(), szClass, &wcls))
00107   {
00108     // name already registered - ok if it was us
00109     return (wcls.lpfnWndProc == (WNDPROC)CParsedEditExported::WndProcHook);
00110   }
00111
00112   // Use standard "edit" control as a template.
00113   VERIFY(::GetClassInfo(NULL, _T("edit"), &wcls));
00114   CParsedEditExported::lpfnSuperEdit = wcls.lpfnWndProc;
00115
00116   // set new values
00117   wcls.lpfnWndProc = CParsedEditExported::WndProcHook;
00118   wcls.hInstance = AfxGetInstanceHandle();
00119   wcls.lpszClassName = szClass;
00120   return (RegisterClass(&wcls) != 0);
00121 }
00122
00123 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StdAfx.cpp Source File

  • vc2008fp
  • StatusBarDemo

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  StatusBarDemo.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/chicdial.cpp Source File

  • ole
  • wordpad

chicdial.cpp

Go to the documentation of this file.
00001 // chicdial.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #ifdef _DEBUG
00015 #undef THIS_FILE
00016 static char BASED_CODE THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CCSDialog dialog
00021
00022 CCSDialog::CCSDialog(UINT nIDTemplate, CWnd* pParentWnd)
00023   : CDialog(nIDTemplate, pParentWnd)
00024 {
00025 }
00026
00027 CCSDialog::CCSDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd)
00028   : CDialog(lpszTemplateName, pParentWnd)
00029 {
00030 }
00031
00032 CCSDialog::CCSDialog() : CDialog()
00033 {
00034 }
00035
00036 BEGIN_MESSAGE_MAP(CCSDialog, CDialog)
00037   //{{AFX_MSG_MAP(CCSDialog)
00038   //}}AFX_MSG_MAP
00039   ON_MESSAGE(WM_HELP, OnHelp)
00040   ON_MESSAGE(WM_CONTEXTMENU, OnHelpContextMenu)
00041 END_MESSAGE_MAP()
00042
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CCSDialog message handlers
00046
00047 LONG_PTR CCSDialog::OnHelp(UINT_PTR, LONG_PTR lParam)
00048 {
00049   ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
00050     HELP_WM_HELP, (ULONG_PTR)GetHelpIDs());
00051   return 0;
00052 }
00053
00054 LONG_PTR CCSDialog::OnHelpContextMenu(UINT_PTR wParam, LONG_PTR)
00055 {
00056   ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
00057     HELP_CONTEXTMENU, (ULONG_PTR)GetHelpIDs());
00058   return 0;
00059 }
00060
00061 BOOL CCSDialog::OnInitDialog()
00062 {
00063   CDialog::OnInitDialog();
00064   ModifyStyleEx(0, WS_EX_CONTEXTHELP);
00065   return TRUE;  // return TRUE unless you set the focus to a control
00066           // EXCEPTION: OCX Property Pages should return FALSE
00067 }
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CCSPropertyPage
00071
00072 CCSPropertyPage::CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption)
00073   : CPropertyPage(nIDTemplate, nIDCaption)
00074 {
00075 }
00076
00077 CCSPropertyPage::CCSPropertyPage(LPCTSTR lpszTemplateName,
00078   UINT nIDCaption) : CPropertyPage(lpszTemplateName, nIDCaption)
00079 {
00080 }
00081
00082 BEGIN_MESSAGE_MAP(CCSPropertyPage, CPropertyPage)
00083   //{{AFX_MSG_MAP(CCSPropertyPage)
00084   //}}AFX_MSG_MAP
00085   ON_MESSAGE(WM_HELP, OnHelp)
00086   ON_MESSAGE(WM_CONTEXTMENU, OnHelpContextMenu)
00087 END_MESSAGE_MAP()
00088
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CCSPropertyPage message handlers
00092
00093 LONG_PTR CCSPropertyPage::OnHelp(UINT_PTR, LONG_PTR lParam)
00094 {
00095   ::WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle, AfxGetApp()->m_pszHelpFilePath,
00096     HELP_WM_HELP, (ULONG_PTR)GetHelpIDs());
00097   return 0;
00098 }
00099
00100 LONG_PTR CCSPropertyPage::OnHelpContextMenu(UINT_PTR wParam, LONG_PTR)
00101 {
00102   ::WinHelp((HWND)wParam, AfxGetApp()->m_pszHelpFilePath,
00103     HELP_CONTEXTMENU, (ULONG_PTR)GetHelpIDs());
00104   return 0;
00105 }
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // CCSPropertySheet
00109
00110 BEGIN_MESSAGE_MAP(CCSPropertySheet, CPropertySheet)
00111   //{{AFX_MSG_MAP(CCSPropertySheet)
00112   //}}AFX_MSG_MAP
00113   ON_MESSAGE(WM_HELP, OnHelp)
00114   ON_MESSAGE(WM_CONTEXTMENU, OnHelpContextMenu)
00115 END_MESSAGE_MAP()
00116
00117 CCSPropertySheet::CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd,
00118   UINT iSelectPage) : CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00119 {
00120 }
00121
00122 CCSPropertySheet::CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd,
00123   UINT iSelectPage) : CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00124 {
00125 }
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CCSPropertySheet message handlers
00129
00130 LONG_PTR CCSPropertySheet::OnHelp(UINT_PTR wParam, LONG_PTR lParam)
00131 {
00132   GetActivePage()->SendMessage(WM_HELP, wParam, lParam);
00133   return 0;
00134 }
00135
00136 LONG_PTR CCSPropertySheet::OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam)
00137 {
00138   GetActivePage()->SendMessage(WM_CONTEXTMENU, wParam, lParam);
00139   return 0;
00140 }
00141
00142 BOOL CCSPropertySheet::PreCreateWindow(CREATESTRUCT& cs)
00143 {
00144   cs.dwExStyle |= WS_EX_CONTEXTHELP;
00145   return CPropertySheet::PreCreateWindow(cs);
00146 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CServerDC Member List

This is the complete list of members for CServerDC, including all inherited members.
CServerDC(CServerView *pView) | CServerDC |
font | CServerDC | [private]
pOldFont | CServerDC | [private]
~CServerDC() | CServerDC |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/maindoc.cpp Source File

  • ole
  • oclient

maindoc.cpp

Go to the documentation of this file.
00001 // maindoc.cpp : implementation of the CMainDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "oclient.h"
00015
00016 #include "maindoc.h"
00017 #include "rectitem.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 // private clipboard format
00025 CLIPFORMAT CMainDoc::m_cfPrivate = NULL;
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CMainDoc
00029
00030 IMPLEMENT_DYNCREATE(CMainDoc, COleLinkingDoc)
00031
00032 BEGIN_MESSAGE_MAP(CMainDoc, COleLinkingDoc)
00033   //{{AFX_MSG_MAP(CMainDoc)
00034   ON_COMMAND(ID_EDIT_CLEAR_ALL, OnEditClearAll)
00035   ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR_ALL, OnUpdateEditClearAll)
00036   //}}AFX_MSG_MAP
00037   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdatePasteMenu)
00038   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE_LINK, OnUpdatePasteLinkMenu)
00039   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, OnUpdateEditLinksMenu)
00040   ON_COMMAND(ID_OLE_EDIT_LINKS, OnEditLinks)
00041   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, OnUpdateObjectVerbMenu)
00042   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_CHANGE_ICON, OnUpdateEditChangeIcon)
00043   ON_COMMAND(ID_OLE_EDIT_CHANGE_ICON, OnEditChangeIcon)
00044 END_MESSAGE_MAP()
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMainDoc construction/destruction
00048
00049 CMainDoc::CMainDoc() : m_sizeDoc(800,1050) // document size is 8x10.5
00050 {
00051   EnableCompoundFile();
00052
00053   m_bNeedUpdate = TRUE;
00054   if (m_cfPrivate == NULL)
00055     m_cfPrivate = (CLIPFORMAT)
00056       ::RegisterClipboardFormat(_T("MFC OClient Sample"));
00057 }
00058
00059 CMainDoc::~CMainDoc()
00060 {
00061 }
00062
00063 CSize &CMainDoc::GetDocumentSize()
00064 {
00065   return m_sizeDoc;
00066 }
00067
00068 void CMainDoc::OnShowViews(BOOL bVisible)
00069 {
00070   COleLinkingDoc::OnShowViews(bVisible);
00071
00072   if (bVisible && m_bNeedUpdate)
00073   {
00074     // update embedded links in this document before showing the window
00075     COleUpdateDialog dlg(this);
00076     dlg.DoModal();
00077     m_bNeedUpdate = FALSE;
00078   }
00079 }
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CMainDoc item management
00083
00084 CRectItem* CMainDoc::CreateItem()
00085 {
00086   return new CRectItem(this); // does 'AddItem' automatically
00087 }
00088
00089 // safe delete that notifies views
00090 void CMainDoc::DeleteItem(CRectItem* pItem)
00091 {
00092   ASSERT(pItem->GetDocument() == this);
00093
00094   SetModifiedFlag();
00095   UpdateAllViews(NULL, 1, pItem); // pItem will be deleted
00096   pItem->Delete();    // does a 'RemoveItem' & 'delete this' automatically
00097 }
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CMainDoc serialization
00101
00102 void CMainDoc::Serialize(CArchive& ar)
00103 {
00104 // NOTE: New easier to use serialization model -- even for OLE objects!
00105   WORD wMagic = 0x0DAF;
00106   if (ar.IsStoring())
00107   {
00108     if (HasBlankItems() &&
00109       AfxMessageBox(IDP_SAVEINCOMPLETE, MB_YESNO|MB_ICONEXCLAMATION) != IDYES)
00110     {
00111       TRACE0("Aborting save -- incomplete items found!\n");
00112       AfxThrowArchiveException(CArchiveException::genericException);
00113     }
00114     ar << wMagic;
00115   }
00116   else
00117   {
00118     WORD w;
00119     ar >> w;
00120
00121     if (w != wMagic)
00122     {
00123       TRACE0("invalid magic number at start of file\n");
00124       AfxThrowArchiveException(CArchiveException::genericException);
00125     }
00126   }
00127
00128   // serialize the rest of the document (OLE items)
00129   COleLinkingDoc::Serialize(ar);
00130 }
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CMainDoc commands
00134
00135 void CMainDoc::OnEditClearAll()
00136 {
00137   // delete all items in the document (also removes sub-storages)
00138   POSITION pos = GetStartPosition();
00139   while (pos != NULL)
00140   {
00141     CRectItem* pItem = (CRectItem*)GetNextItem(pos);
00142     ASSERT_KINDOF(CRectItem, pItem);
00143     pItem->Delete();
00144   }
00145
00146   // everything is gone now!
00147   SetModifiedFlag();
00148   UpdateAllViews(NULL);
00149 }
00150
00151
00152 void CMainDoc::OnUpdateEditClearAll(CCmdUI* pCmdUI)
00153 {
00154   // Enable ClearAll if there is anything to clear
00155   pCmdUI->Enable(GetStartPosition() != NULL);
00156 }
00157
00158 void CMainDoc::AdjustItemPosition(CRectItem* pItem)
00159 {
00160   POSITION pos = GetStartPosition();
00161   while (pos != NULL)
00162   {
00163     CRectItem* pRectItem = (CRectItem*)GetNextItem(pos);
00164     ASSERT_KINDOF(CRectItem, pItem);
00165     if (pRectItem != pItem && pRectItem->GetRect() == pItem->GetRect())
00166     {
00167       pItem->m_ptPos.x += 10;
00168       pItem->m_ptPos.y -= 10;
00169       pos = GetStartPosition();
00170     }
00171   }
00172 }
00173
00174 /////////////////////////////////////////////////////////////////////////////
00175 // CMainDoc diagnostics
00176
00177 #ifdef _DEBUG
00178 void CMainDoc::AssertValid() const
00179 {
00180   COleLinkingDoc::AssertValid();
00181 }
00182
00183 void CMainDoc::Dump(CDumpContext& dc) const
00184 {
00185   COleLinkingDoc::Dump(dc);
00186 }
00187 #endif //_DEBUG
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbodl.cpp Source File

  • ole
  • oleview
  • iviewers

tlbodl.cpp

Go to the documentation of this file.
00001 // tlbodl.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "iviewers.h"
00015 #include "iview.h"
00016 #include "util.h"
00017 #include "iviewers.h"
00018 #include "iviewer.h"
00019 #include "typelib.h"
00020 #include "tree.h"
00021 #include "tlbodl.h"
00022
00023 #ifdef _DEBUG
00024 #undef THIS_FILE
00025 static char BASED_CODE THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 #define MAX_NAMES   64     // max parameters to a function
00029
00030 IStream* CreateMemoryStream();
00031 int StringFromGUID2T(REFGUID rguid, LPTSTR lpszGUID, int nSize, int cbMax);
00032
00033 // if defined, when typedefs are written out a tag is created
00034 // by concatinating "tag" with the typedef name.
00035 #define _WRITE_TAG 1
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CTypeLibODLView
00039
00040 IMPLEMENT_DYNCREATE(CTypeLibODLView, CEditView)
00041
00042 CTypeLibODLView::CTypeLibODLView()
00043 {
00044 }
00045
00046 CTypeLibODLView::~CTypeLibODLView()
00047 {
00048 }
00049
00050
00051 BEGIN_MESSAGE_MAP(CTypeLibODLView, CEditView)
00052   //{{AFX_MSG_MAP(CTypeLibODLView)
00053   ON_WM_DESTROY()
00054   //}}AFX_MSG_MAP
00055 END_MESSAGE_MAP()
00056
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CTypeLibODLView drawing
00060
00061 void CTypeLibODLView::OnDraw(CDC* pDC)
00062 {
00063 }
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CTypeLibODLView diagnostics
00067
00068 #ifdef _DEBUG
00069 void CTypeLibODLView::AssertValid() const
00070 {
00071   CEditView::AssertValid();
00072 }
00073
00074 void CTypeLibODLView::Dump(CDumpContext& dc) const
00075 {
00076   CEditView::Dump(dc);
00077 }
00078 #endif //_DEBUG
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CTypeLibODLView message handlers
00082
00083 BOOL CTypeLibODLView::PreCreateWindow(CREATESTRUCT& cs)
00084 {
00085   cs.style |= ES_READONLY | ES_MULTILINE | WS_VSCROLL | WS_HSCROLL ;
00086
00087   return CEditView::PreCreateWindow(cs);
00088 }
00089
00090 void CTypeLibODLView::OnInitialUpdate()
00091 {
00092   m_Font.CreateFont( -11, 0, 0, 0, 0, 0,
00093         0, 0, ANSI_CHARSET, 0, 0, 0,
00094         FIXED_PITCH | FF_DONTCARE, _T("Courier New") ) ;
00095
00096   SetFont( &m_Font );
00097   CEditView::OnInitialUpdate();
00098 }
00099
00100 void CTypeLibODLView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
00101 {
00102   CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
00103   ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));
00104
00105   if (pFrame->m_pSelectedItem == NULL)
00106   {
00107     SetWindowText(_T("")) ;
00108     return ;
00109   }
00110
00111   SetRedraw( FALSE ) ;
00112   BeginWaitCursor() ;
00113
00114   CString     sText;
00115   HRESULT     hr = S_OK ;
00116   IStream*    pstm = NULL ;
00117
00118   TRY
00119   {
00120     pstm = CreateMemoryStream() ;
00121
00122     switch(pFrame->m_pSelectedItem->m_Type)
00123     {
00124     case CTreeItem::typeTypeLib:
00125     case CTreeItem::typeTypeLib2:
00126        hr = DeCompileTypeLib( pstm, pFrame->m_pSelectedItem->GetTypeLib() ) ;
00127     break ;
00128
00129     case CTreeItem::typeEnum:
00130     case CTreeItem::typeRecord:
00131     case CTreeItem::typeModule:
00132     case CTreeItem::typeInterface:
00133     case CTreeItem::typeDispinterface:
00134     case CTreeItem::typeCoClass:
00135     case CTreeItem::typeAlias:
00136     case CTreeItem::typeUnion:
00137     case CTreeItem::typeTypeInfo:
00138     case CTreeItem::typeTypeInfo2:
00139       switch(pFrame->m_pSelectedItem->GetTypeKind())
00140       {
00141       case TKIND_ENUM:
00142       case TKIND_RECORD:
00143       case TKIND_UNION:
00144       case TKIND_ALIAS:
00145          hr = DeCompileTypedef( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
00146       break ;
00147
00148       case TKIND_MODULE:
00149          hr = DeCompileModule( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
00150       break ;
00151
00152       case TKIND_INTERFACE:
00153          hr = DeCompileInterface( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
00154       break ;
00155
00156       case TKIND_DISPATCH:
00157          hr = DeCompileDispinterface( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
00158       break ;
00159
00160       case TKIND_COCLASS:
00161          hr = DeCompileCoClass( pstm, pFrame->m_pSelectedItem->GetTypeInfo() ) ;
00162       break ;
00163
00164       default:
00165         sText = _T("<<unclassified typeinfo>>");
00166       break ;
00167       }
00168     break ;
00169
00170     case CTreeItem::typeMethod:
00171        hr = DeCompileFunc( pstm, pFrame->m_pSelectedItem->GetTypeInfo(), pFrame->m_pSelectedItem->m_uiMemid ) ;
00172     break ;
00173
00174     case CTreeItem::typeProperty:
00175        hr = DeCompileVar( pstm, pFrame->m_pSelectedItem->GetTypeInfo(), pFrame->m_pSelectedItem->m_uiMemid ) ;
00176     break ;
00177
00178     case CTreeItem::typeConstant:
00179        hr = DeCompileConst( pstm, pFrame->m_pSelectedItem->GetTypeInfo(), pFrame->m_pSelectedItem->m_uiMemid ) ;
00180     break ;
00181
00182     case CTreeItem::typeUnknown:
00183     case CTreeItem::typeUnknown2:
00184     case CTreeItem::typeEnums:
00185     case CTreeItem::typeRecords:
00186     case CTreeItem::typeModules:
00187     case CTreeItem::typeInterfaces:
00188     case CTreeItem::typeDispinterfaces:
00189     case CTreeItem::typeCoClasses:
00190     case CTreeItem::typeAliases:
00191     case CTreeItem::typeUnions:
00192     case CTreeItem::typeMethods:
00193     case CTreeItem::typeMethods2:
00194     case CTreeItem::typeProperties:
00195     case CTreeItem::typeProperties2:
00196     case CTreeItem::typeConstants:
00197     case CTreeItem::typeConstants2:
00198     case CTreeItem::typeImplTypes:
00199     case CTreeItem::typeImplTypes2:
00200     default:
00201       //bstr = ::SysAllocString(OLESTR(""));
00202     break ;
00203     }
00204
00205     if (hr != S_OK)
00206       AfxThrowOleException( hr ) ;
00207
00208     if (pstm)
00209     {
00210       STATSTG statstg ;
00211       if (FAILED(hr = pstm->Stat( &statstg,STATFLAG_NONAME )))
00212         AfxThrowOleException( hr ) ;
00213
00214       // Seek to beginning
00215       LARGE_INTEGER li ;
00216       LISet32( li, 0 ) ;
00217       if (FAILED(hr = pstm->Seek( li, STREAM_SEEK_SET, NULL )))
00218         AfxThrowOleException( hr ) ;
00219
00220       // Read into string
00221       LPSTR lpszBuf = sText.GetBuffer(statstg.cbSize.LowPart+1);
00222       if (FAILED(hr = pstm->Read( lpszBuf, statstg.cbSize.LowPart, NULL )))
00223         AfxThrowOleException( hr ) ;
00224       lpszBuf[statstg.cbSize.LowPart] = '\0';
00225       sText.ReleaseBuffer();
00226       SetWindowText(sText);
00227       pstm->Release() ;
00228     }
00229   }
00230   CATCH(CException, pException)
00231   {
00232     SetWindowText( _T("// Could not decompile selected item") ) ;
00233     if (pstm)
00234       pstm->Release() ;
00235
00236     if (pException->IsKindOf(RUNTIME_CLASS(COleException)))
00237       hr = ((COleException*)pException)->m_sc ;
00238     else if (pException->IsKindOf(RUNTIME_CLASS(COleException)))
00239       hr = E_OUTOFMEMORY ;
00240
00241     if (hr == S_OK)
00242       hr = GetLastError() ;
00243
00244     ErrorMessage( "Could not decompile selected item", hr ) ;
00245   }
00246   END_CATCH
00247
00248   SetRedraw( TRUE ) ;
00249   EndWaitCursor() ;
00250   SendMessage(EM_SETSEL, 0, 0)  ;
00251 }
00252
00253 void CTypeLibODLView::OnDestroy()
00254 {
00255   CEditView::OnDestroy();
00256
00257   m_Font.DeleteObject() ;
00258 }
00259
00260 // Write string s with no indent and no CR
00261 #define WRITE( s )          WriteLine( pstm, s, 0, FALSE )
00262
00263 // Write string s with indent and no CR
00264 #define WRITE1( s )         WriteLine( pstm, s, uiIndent, FALSE )
00265 #define WRITE2( s, ui )     WriteLine( pstm, s, uiIndent+ui, FALSE )
00266
00267 // Write string s with indent and CR
00268 #define WRITELINE( s )      WriteLine( pstm, s, uiIndent, TRUE )
00269 #define WRITELINE2( s, ui ) WriteLine( pstm, s, uiIndent+ui, TRUE )
00270 #define WRITECR( s )        WriteLine( pstm, s, 0, TRUE )
00271
00272 #define WRITERAW( p, len )     WriteRaw( pstm, p, len )
00273 #define WRITEBSTR( p )         WriteBSTR( pstm, p )
00274
00275 inline void WriteRaw( IStream* pstm, const void* pv, UINT cb )
00276 {
00277   HRESULT hr ;
00278   if (FAILED(hr = pstm->Write( pv, cb, NULL )))
00279     AfxThrowOleException( hr ) ;
00280 }
00281
00282 inline void WriteLine( IStream* pstm, const CString &rstr, UINT uiIndent, BOOL fNewLine )
00283 {
00284   while(uiIndent--)
00285   {
00286     WriteRaw( pstm, _T("    "), 4 * sizeof(TCHAR));
00287   }
00288
00289   WriteRaw( pstm, rstr, rstr.GetLength() * sizeof(TCHAR)) ;
00290
00291   if (fNewLine)
00292     WriteRaw(pstm, _T("\r\n"), 2 * sizeof(TCHAR)) ;
00293 }
00294
00295 inline void WriteBSTR( IStream* pstm, BSTR bstr )
00296 {
00297   UINT len = ::SysStringLen(bstr) ;
00298   if (!len)
00299     return ;
00300
00301   COLE2T lpszSource(bstr);
00302   TCHAR *pstrTemp = new TCHAR[((len + 1) * sizeof(TCHAR)) * 2];
00303   LPTSTR lpD, lpS = lpszSource ;
00304
00305   lpD = pstrTemp;
00306   for (UINT n = 0 ; n < len ; n++)
00307   {
00308     #pragma warning (suppress: 6328) // unexpected type mismatch warning
00309     if (!isprint(*lpS) || (*lpS) == '\"' || (*lpS) == '\\')
00310     {
00311       // \"  \\ \a  \b  \f  \n  \r  \t  \v
00312       *lpD++ = '\\' ;
00313       switch(*lpS)
00314       {
00315       case '\"':
00316         *lpD++ = '\"' ;
00317       break ;
00318       case '\\':
00319         *lpD++ = '\\' ;
00320       break ;
00321       case '\a':
00322         *lpD++ = 'a' ;
00323       break ;
00324       case '\b':
00325         *lpD++ = 'b' ;
00326       break ;
00327       case '\f':
00328         *lpD++ = 'f' ;
00329       break ;
00330       case '\n':
00331         *lpD++ = 'n' ;
00332       break ;
00333       case '\r':
00334         *lpD++ = 'r' ;
00335       break ;
00336       case '\t':
00337         *lpD++ = 't' ;
00338       break ;
00339       case '\v':
00340         *lpD++ = 'v' ;
00341       break ;
00342       case '\0':
00343         *lpD++ = '0' ;
00344       break ;
00345       default:
00346         lpD += _stprintf_s( lpD, ((len + 1) * sizeof(TCHAR)) * 2, _T("x%02X"), (UINT)*lpS );
00347       break ;
00348       }
00349       lpS++;
00350     }
00351     else
00352       *lpD++ = *lpS++;
00353   }
00354   *lpD = '\0';
00355   #pragma warning(suppress: 6387) // pstrTemp will always be null terminated.
00356   WriteRaw( pstm, pstrTemp, lstrlen(pstrTemp)*sizeof(TCHAR) ) ;
00357   delete []pstrTemp ;
00358 }
00359
00360 //  // typelib.tlb
00361 //  [
00362 //    uuid(<00026b00-0000-0000-C000-000000000046>),
00363 //    version (<major>.<minor>),
00364 //    helpfile ("<helpfile.hlp>"),
00365 //    helpstring("<helpstring>"),
00366 //    helpcontext(<helpcontext>)
00367 //  ]
00368 //  library <libname>
00369 //  {
00370 //      importlib("<import.tlb>");
00371 //
00372 //  };
00373 HRESULT CTypeLibODLView::DeCompileTypeLib( IStream* pstm, ITypeLib* ptlb, UINT uiIndent /* = 0 */ )
00374 {
00375   HRESULT         hr = S_OK ;
00376   BSTR            bstrName = NULL ;
00377   BSTR            bstrDoc = NULL ;
00378   BSTR            bstrHelp = NULL ;
00379   DWORD           dwHelpID ;
00380   TLIBATTR*       plibattr = NULL ;
00381   ITypeInfo*      pti = NULL ;
00382   TYPEATTR*       pattr = NULL ;
00383
00384   ASSERT(ptlb) ;
00385
00386   TRY
00387   {
00388     TCHAR szGUID[64] ;
00389     CString str;
00390
00391     ENSURE(ptlb);
00392     hr = ptlb->GetLibAttr(&plibattr);
00393     if (FAILED(hr))
00394       AfxThrowOleException( hr ) ;
00395
00396     // write header with library filename
00397     WRITELINE(_T("// Generated .ODL file (by Ole2View)"));
00398     WRITELINE(_T("// "));
00399     WRITE1(_T("// typelib filename: "));
00400     hr = ::QueryPathOfRegTypeLib(plibattr->guid, plibattr->wMajorVerNum, plibattr->wMinorVerNum, plibattr->lcid, &bstrName);
00401     if (SUCCEEDED(hr))
00402     {
00403       COLE2CT lpszName(bstrName);
00404       ::SysFreeString(bstrName);
00405       bstrName = NULL;
00406
00407       LPCTSTR p = _tcsrchr(lpszName, '\\');
00408       if (p != NULL && *p && *(p+1))
00409         WRITECR( p+1 ) ;
00410       else
00411         WRITECR( (LPCTSTR)lpszName ) ;
00412     }
00413     else
00414     {
00415       // It's possible we're viewing a type lib that was never registered
00416       WRITECR( _T("<could not determine filename>") ) ;
00417     }
00418
00419     WRITELINE( _T("[") ) ;
00420
00421     StringFromGUID2T( plibattr->guid, szGUID, 64, sizeof(szGUID) );
00422     WRITE1(_T("  uuid(")) ; WRITE(szGUID); WRITECR(_T("),"))  ;
00423
00424     str.Format( _T("  version(%d.%d)"), plibattr->wMajorVerNum, plibattr->wMinorVerNum ) ;
00425     WRITE1(str) ;
00426
00427     hr = ptlb->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp );
00428     if (FAILED(hr))
00429       AfxThrowOleException( hr ) ;
00430
00431     if (bstrDoc && *bstrDoc)
00432     {
00433       WRITECR(_T(",")) ;
00434       WRITE1(_T("  helpstring(\"")) ;
00435       WRITEBSTR( bstrDoc ) ;
00436       WRITE(_T("\")")) ;
00437     }
00438
00439     if (bstrHelp && *bstrHelp)
00440     {
00441       WRITECR(",") ;
00442       COLE2CT lpszHelp(bstrHelp);
00443       ::SysFreeString(bstrHelp);
00444       bstrHelp = NULL;
00445
00446       LPCTSTR p = _tcsrchr(lpszHelp, '\\');
00447       if (p != NULL && *p && *(p+1))
00448         str.Format( _T("  helpfile(\"%s\"),"), p+1 ) ;
00449       else
00450         str.Format( _T("  helpfile(\"%s\"),"), lpszHelp ) ;
00451       WRITELINE( str ) ;
00452       str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
00453       WRITE1( str ) ;
00454     }
00455
00456     WRITECR(_T("")) ;
00457     WRITELINE(_T("]") ) ;
00458
00459     WRITE1( _T("library ") ) ;
00460     WRITEBSTR(bstrName) ;
00461     WRITECR(_T("")) ;
00462
00463     WRITELINE( _T("(") ) ;
00464
00465     // TODO:  Grovel through all typeinfos for any referenced types
00466     // that are defined in imported libs
00467     //uiInfos = ptlb->GetTypeInfoCount() ;
00468     //for (UINT n = 0 ; n < uiInfos ; n++)
00469     //{
00470     //}
00471     WRITELINE(_T("// BUGBUG:  There most likely were \"importlib()\" statements in"));
00472     WRITELINE(_T("//          in the source.  While it appears possible to be able"));
00473     WRITELINE(_T("//          to identify them, it is non-trivial and is currently"));
00474     WRITELINE(_T("//          not supported."));
00475     WRITELINE(_T("// "));
00476
00477     UINT uiInfos = ptlb->GetTypeInfoCount() ;
00478     for (UINT n = 0 ; n < uiInfos ; n++)
00479     {
00480       if (FAILED(hr = ptlb->GetTypeInfo( n, &pti )))
00481         AfxThrowOleException(hr) ;
00482
00483       if (FAILED(hr = pti->GetTypeAttr( &pattr )))
00484         AfxThrowOleException(hr) ;
00485
00486       switch(pattr->typekind)
00487       {
00488       case TKIND_ENUM:
00489       case TKIND_RECORD:
00490       case TKIND_UNION:
00491       case TKIND_ALIAS:
00492          hr = DeCompileTypedef( pstm, pti, uiIndent + 1 ) ;
00493       break ;
00494
00495       case TKIND_MODULE:
00496          hr = DeCompileModule( pstm, pti, uiIndent + 1 ) ;
00497       break ;
00498
00499       case TKIND_INTERFACE:
00500          hr = DeCompileInterface( pstm, pti, uiIndent + 1 ) ;
00501       break ;
00502
00503       case TKIND_DISPATCH:
00504          hr = DeCompileDispinterface( pstm, pti, uiIndent + 1 ) ;
00505       break ;
00506
00507       case TKIND_COCLASS:
00508          hr = DeCompileCoClass( pstm, pti, uiIndent + 1 ) ;
00509       break ;
00510       }
00511
00512       if (n != uiInfos - 1)
00513         WRITECR(_T("")) ;
00514
00515       pti->ReleaseTypeAttr( pattr ) ;
00516       pti->Release() ;
00517       pti = NULL ;
00518       pattr = NULL ;
00519     }
00520     // Last line of the .ODL file
00521     WRITELINE( ");" ) ;
00522
00523     SysFreeString( bstrName ) ;
00524     bstrName = NULL ;
00525     SysFreeString( bstrDoc ) ;
00526     bstrDoc = NULL ;
00527     SysFreeString( bstrHelp ) ;
00528     bstrHelp = NULL ;
00529
00530     if (plibattr)
00531       ptlb->ReleaseTLibAttr( plibattr ) ;
00532   }
00533   CATCH(CException, pException)
00534   {
00535     if (pti)
00536     {
00537       if (pattr)
00538         pti->ReleaseTypeAttr( pattr ) ;
00539       pti->Release() ;
00540     }
00541     if (plibattr)
00542       ptlb->ReleaseTLibAttr( plibattr ) ;
00543     if (bstrName)
00544       SysFreeString( bstrName ) ;
00545     if (bstrDoc)
00546       SysFreeString( bstrDoc ) ;
00547     if (bstrHelp)
00548       SysFreeString( bstrHelp ) ;
00549
00550     THROW_LAST() ;
00551   }
00552   END_CATCH
00553
00554   return hr ;
00555 }
00556
00557 // if typekind == TKIND_ALIAS
00558 //      typedef [attributes] basetype aliasname;
00559 //
00560 // if typekind == TKIND_ENUM
00561 //  typedef [attributes] enum [tag] {
00562 //      enumlist
00563 //  } enumname;
00564 // enumlist is made up of members of the form
00565 //      name = value,
00566 // or "= value" can be ommitted
00567 //
00568 // if typekind == TKIND_UNION or TKIND_RECORD
00569 // typedef [attributes] union/struct [tag] {
00570 //      memberlist
00571 // } union/structname;
00572 //
00573 // attributes can be
00574 //      [uuid(<00026b00-0000-0000-C000-000000000046>), version (<major>.<minor>),
00575 //       helpstring("<helpstring>"), helpcontext(<id), hidden, restricted,
00576 //       public]
00577 //
00578 // memberlist is made up of members of the form
00579 //      type name[bounds];
00580 //
00581 HRESULT CTypeLibODLView::DeCompileTypedef( IStream* pstm, ITypeInfo* pti, UINT uiIndent /* = 0 */ )
00582 {
00583   HRESULT     hr = S_OK ;
00584   TYPEATTR*   pattr = NULL ;
00585   BSTR            bstrName = NULL ;
00586   BSTR            bstrDoc = NULL ;
00587   BSTR            bstrHelp = NULL ;
00588   DWORD           dwHelpID ;
00589
00590   WRITE1("typedef ") ;
00591
00592   TRY
00593   {
00594     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
00595       AfxThrowOleException( hr ) ;
00596
00597     BOOL    fAttributes = FALSE ;      // any attributes?
00598     BOOL    fAttribute = FALSE ;       // at least one (insert ",")
00599
00600     // Was 'uuid' specified?
00601     if (!IsEqualGUID( pattr->guid, GUID_NULL ))
00602     {
00603       TCHAR szGUID[64] ;
00604       StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
00605       fAttributes = TRUE ;
00606       WRITE("[uuid(") ;
00607       WRITE(szGUID) ;
00608       WRITE(")") ;
00609       fAttribute = TRUE ;
00610     }
00611
00612     // was version specified
00613     if (pattr->wMajorVerNum || pattr->wMinorVerNum)
00614     {
00615       if (fAttributes == FALSE)
00616         WRITE("[") ;
00617       fAttributes = TRUE ;
00618       if (fAttribute)
00619         WRITE(", ") ;
00620
00621       CString str ;
00622       str.Format(_T("version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
00623       WRITE(str) ;
00624       fAttribute = TRUE ;
00625     }
00626
00627     if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
00628     {
00629       CString str ;
00630       if (bstrDoc && *bstrDoc)
00631       {
00632         if (fAttributes == FALSE) WRITE("[") ;
00633         fAttributes = TRUE ;
00634         if (fAttribute)
00635           WRITE(", ") ;
00636         COLE2CT lpszDoc(bstrDoc);
00637         ::SysFreeString(bstrDoc);
00638         bstrDoc = NULL;
00639
00640         str.Format( _T("helpstring(\"%s\")"), lpszDoc );
00641         WRITE( str ) ;
00642         if (dwHelpID > 0)
00643         {
00644           str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
00645           WRITE( str ) ;
00646         }
00647       }
00648       else if (dwHelpID > 0)
00649       {
00650         if (fAttributes == FALSE) WRITE("[") ;
00651         fAttributes = TRUE ;
00652         if (fAttribute)
00653           WRITE(", ") ;
00654         str.Format( _T("helpcontext(%#08.8x)"), dwHelpID ) ;
00655         WRITE( str ) ;
00656         fAttribute = TRUE ;
00657       }
00658     }
00659
00660     if (pattr->typekind == TKIND_ALIAS)
00661     {
00662       if (fAttributes == FALSE) WRITE("[") ;
00663       fAttributes = TRUE ;
00664       if (fAttribute)
00665         WRITE(", ") ;
00666       WRITE("public") ;       // if it's in the tlb it had public
00667     }
00668
00669     if (fAttributes)
00670       WRITE("] ") ;
00671
00672     switch(pattr->typekind)
00673     {
00674     case TKIND_RECORD:
00675       #ifdef _WRITE_TAG
00676       WRITE("struct tag") ;
00677       WRITEBSTR(bstrName) ;
00678       #else
00679       WRITE("struct ") ;
00680       #endif
00681       WRITECR(" {" );
00682     break ;
00683
00684     case TKIND_UNION:
00685       #ifdef _WRITE_TAG
00686       WRITE("union tag") ;
00687       WRITEBSTR(bstrName) ;
00688       #else
00689       WRITE("union ") ;
00690       #endif
00691       WRITECR(" {" );
00692     break ;
00693
00694     case TKIND_ALIAS:  //typedef
00695       // write base type
00696       WRITE(TYPEDESCtoString( pti, &pattr->tdescAlias )) ;
00697       WRITE(" ") ;
00698
00699       // write aliasname
00700     break ;
00701
00702     case TKIND_ENUM:
00703       WRITECR("enum {" );
00704     break ;
00705
00706     default:
00707     ASSERT(0) ;
00708     break ;
00709     }
00710
00711     if (pattr->typekind == TKIND_RECORD || pattr->typekind == TKIND_UNION)
00712     {
00713       for (UINT n = 0 ; n < pattr->cVars ; n++)
00714         DumpVar( pstm, pti, pattr, n, uiIndent + 1 ) ;
00715       WRITE1("} ");
00716     }
00717
00718     if (pattr->typekind == TKIND_ENUM)
00719     {
00720       for (int n = 0 ; n < pattr->cVars ; n++)
00721       {
00722         DumpConst( pstm, pti, pattr, n, uiIndent + 1, FALSE ) ;
00723         if (n < pattr->cVars-1)
00724           WRITECR(",") ;
00725         else
00726           WRITECR("") ;
00727       }
00728       WRITE1("} ");
00729     }
00730
00731     WRITEBSTR(bstrName) ;
00732     WRITECR(";") ;
00733
00734
00735     if (bstrName)
00736       SysFreeString( bstrName ) ;
00737     if (bstrDoc)
00738       SysFreeString( bstrDoc ) ;
00739     if (bstrHelp)
00740       SysFreeString( bstrHelp ) ;
00741
00742     pti->ReleaseTypeAttr( pattr ) ;
00743   }
00744   CATCH(CException, pException)
00745   {
00746     if (bstrName)
00747       SysFreeString( bstrName ) ;
00748     if (bstrDoc)
00749       SysFreeString( bstrDoc ) ;
00750     if (bstrHelp)
00751       SysFreeString( bstrHelp ) ;
00752     if (pattr)
00753       pti->ReleaseTypeAttr( pattr ) ;
00754
00755     THROW_LAST();
00756   }
00757   END_CATCH
00758   return hr ;
00759 }
00760
00761 //  [
00762 //    attributes
00763 //  ]
00764 //  module modulename {
00765 //      elementlist
00766 //  };
00767 //  attributes are
00768 //      uuid, version, helpstring, helpcontext, dllname
00769 //      The dllname attribute is required.
00770 //
00771 //  [attributes] returntype [calling convention] funcname(params);
00772 //  [attributes] const constname = constval;
00773 //
00774 HRESULT CTypeLibODLView::DeCompileModule( IStream* pstm, ITypeInfo* pti, UINT uiIndent /* = 0 */ )
00775 {
00776   HRESULT     hr = S_OK ;
00777   TYPEATTR*   pattr = NULL ;
00778   BSTR            bstrName = NULL ;
00779   BSTR            bstrDoc = NULL ;
00780   BSTR            bstrHelp = NULL ;
00781   DWORD           dwHelpID ;
00782
00783   TRY
00784   {
00785     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
00786       AfxThrowOleException( hr ) ;
00787
00788     WRITELINE(_T("// BUGBUG:   There appears to be no way to retrieve the dllname of"));
00789     WRITELINE(_T("//           a module via ITypeInfo in a reliable way. "));
00790     WRITELINE(_T("//           ITypeInfo::GetDllEntry offers a possibility, but it will"));
00791     WRITELINE(_T("//           only work if the module has entries in it."));
00792     WRITELINE(_T("// "));
00793
00794     WRITELINE(_T("[")) ;
00795     WRITE1( _T("  dllname(")) ;
00796
00797     /*
00798     if (FAILED(hr = pti->GetDllEntry(MEMBERID_NIL, INVOKE_FUNC, &bstrName, NULL, NULL)))
00799       AfxThrowOleException( hr ) ;
00800
00801     WRITEBSTR(bstrName) ;
00802     SysFreeString(bstrName) ;
00803     bstrName = NULL ;
00804     */
00805
00806     WRITE(_T(")")) ;
00807
00808     // Was 'uuid' specified?
00809     if (!IsEqualGUID( pattr->guid, GUID_NULL ))
00810     {
00811       TCHAR szGUID[64] ;
00812       StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
00813       WRITECR(",") ;
00814       WRITE1("  uuid(") ;
00815       WRITE(szGUID) ;
00816       WRITE(")") ;
00817     }
00818
00819     // was version specified
00820     if (pattr->wMajorVerNum || pattr->wMinorVerNum)
00821     {
00822       WRITECR(",") ;
00823       CString str ;
00824       str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
00825       WRITE1(str) ;
00826     }
00827
00828     if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
00829     {
00830       CString str ;
00831       if (bstrDoc && *bstrDoc)
00832       {
00833         WRITECR(",") ;
00834         COLE2CT lpszDoc(bstrDoc);
00835         ::SysFreeString(bstrDoc);
00836         bstrDoc = NULL;
00837         str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
00838         WRITE1( str ) ;
00839         if (dwHelpID > 0)
00840         {
00841           WRITECR(",") ;
00842           str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
00843           WRITE1( str ) ;
00844         }
00845       }
00846       else if (dwHelpID > 0)
00847       {
00848         WRITECR(",") ;
00849         str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
00850         WRITE1( str ) ;
00851       }
00852     }
00853
00854     WRITECR("") ;
00855     WRITELINE(_T("]")) ;
00856     WRITE1(_T("module ")) ;
00857     WRITEBSTR( bstrName ) ;
00858     WRITECR( _T(" {")) ;
00859
00860     int n;
00861     for (n = 0 ; n < pattr->cFuncs ; n++)
00862       DumpFunc( pstm, pti, pattr, n, uiIndent + 1 ) ;
00863
00864     for (n = 0 ; n < pattr->cVars ; n++)
00865       DumpConst( pstm, pti, pattr, n, uiIndent + 1, TRUE ) ;
00866
00867     WRITELINE("};") ;
00868
00869
00870     if (bstrName)
00871       SysFreeString( bstrName ) ;
00872     if (bstrDoc)
00873       SysFreeString( bstrDoc ) ;
00874     if (bstrHelp)
00875       SysFreeString( bstrHelp ) ;
00876
00877     pti->ReleaseTypeAttr( pattr ) ;
00878   }
00879   CATCH(CException, pException)
00880   {
00881     if (bstrName)
00882       SysFreeString( bstrName ) ;
00883     if (bstrDoc)
00884       SysFreeString( bstrDoc ) ;
00885     if (bstrHelp)
00886       SysFreeString( bstrHelp ) ;
00887     if (pattr)
00888       pti->ReleaseTypeAttr( pattr ) ;
00889
00890     THROW_LAST();
00891   }
00892   END_CATCH
00893   return hr ;
00894 }
00895
00896 //  [
00897 //    attributes
00898 //  ]
00899 //  interface interfacename  [:baseinterface] {
00900 //      functionlist
00901 //  };
00902 //
00903 //  attributes include source, default, and restricted
00904 //
00905 HRESULT CTypeLibODLView::DeCompileInterface( IStream* pstm, ITypeInfo* pti, UINT uiIndent /* = 0 */ )
00906 {
00907   HRESULT     hr = S_OK ;
00908   TYPEATTR*   pattr = NULL ;
00909   BSTR            bstrName = NULL ;
00910   BSTR            bstrDoc = NULL ;
00911   BSTR            bstrHelp = NULL ;
00912   DWORD           dwHelpID ;
00913   ITypeInfo*      ptiImpl = NULL ;
00914
00915   TRY
00916   {
00917     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
00918       AfxThrowOleException( hr ) ;
00919
00920     WRITELINE(_T("[")) ;
00921     WRITE1( _T("  odl")) ;
00922
00923     TCHAR szGUID[64] ;
00924     StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
00925     WRITECR(",") ;
00926     WRITE1("  uuid(") ;
00927     WRITE(szGUID) ;
00928     WRITE(")") ;
00929
00930     // was version specified
00931     if (pattr->wMajorVerNum || pattr->wMinorVerNum)
00932     {
00933       WRITECR(",") ;
00934       CString str ;
00935       str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
00936       WRITE1(str) ;
00937     }
00938
00939     if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
00940     {
00941       CString str ;
00942       if (bstrDoc && *bstrDoc)
00943       {
00944         WRITECR(",") ;
00945         COLE2CT lpszDoc(bstrDoc);
00946         ::SysFreeString(bstrDoc);
00947         bstrDoc = NULL;
00948         str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
00949         WRITE1( str ) ;
00950         if (dwHelpID > 0)
00951         {
00952           WRITECR(",") ;
00953           str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
00954           WRITE1( str ) ;
00955         }
00956       }
00957       else if (dwHelpID > 0)
00958       {
00959         WRITECR(",") ;
00960         str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
00961         WRITE1( str ) ;
00962       }
00963     }
00964
00965     // source, default, or restricted
00966     if (pattr->wTypeFlags == TYPEFLAG_FHIDDEN)
00967     {
00968       WRITECR(",") ;
00969       WRITE1("  hidden") ;
00970     }
00971
00972   /*
00973     int    implflags = NULL ;
00974     if (FAILED(hr = pti->GetImplTypeFlags(0, &implflags )))
00975       AfxThrowOleException(hr) ;
00976
00977     if (implflags & IMPLTYPEFLAG_FDEFAULT)
00978     {
00979       WRITECR(",") ;
00980       WRITE1("  default") ;
00981     }
00982
00983     if (implflags & IMPLTYPEFLAG_FSOURCE)
00984     {
00985       WRITECR(",") ;
00986       WRITE1("  source") ;
00987     }
00988
00989     if (implflags & IMPLTYPEFLAG_FRESTRICTED)
00990     {
00991       WRITECR(",") ;
00992       WRITE1("  restricted") ;
00993     }
00994    */
00995
00996     WRITECR("") ;
00997     WRITELINE(_T("]")) ;
00998     WRITE1(_T("interface ")) ;
00999     // interface name
01000     WRITEBSTR( bstrName ) ;
01001
01002     if (bstrName)
01003       SysFreeString( bstrName ) ;
01004     if (bstrDoc)
01005       SysFreeString( bstrDoc ) ;
01006     if (bstrHelp)
01007       SysFreeString( bstrHelp ) ;
01008     bstrName = bstrDoc = bstrHelp = NULL ;
01009
01010     // is there a base interface?
01011     UINT n;
01012     for (n = 0 ; n <  pattr->cImplTypes; n++)
01013     {
01014       HREFTYPE href = NULL ;
01015       if (FAILED(hr = pti->GetRefTypeOfImplType(n, &href)))
01016         AfxThrowOleException(hr) ;
01017
01018       if (FAILED(hr = pti->GetRefTypeInfo( href, &ptiImpl )))
01019         AfxThrowOleException(hr) ;
01020
01021       if (FAILED(hr = ptiImpl->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
01022         AfxThrowOleException(hr) ;
01023
01024       WRITE(_T(" : ")) ;
01025       WRITEBSTR( bstrName ) ;
01026
01027       SysFreeString( bstrName ) ;
01028       bstrName = NULL ;
01029       SysFreeString( bstrDoc ) ;
01030       bstrDoc = NULL ;
01031       SysFreeString( bstrHelp ) ;
01032       bstrHelp = NULL ;
01033
01034       ptiImpl->Release() ;
01035       ptiImpl = NULL ;
01036     }
01037
01038     WRITECR(_T(" {")) ;
01039
01040     for (n = 0 ; n < pattr->cFuncs ; n++)
01041       DumpFunc( pstm, pti, pattr, n, uiIndent + 1 ) ;
01042
01043     WRITELINE("};") ;
01044
01045     if (bstrName)
01046       SysFreeString( bstrName ) ;
01047     if (bstrDoc)
01048       SysFreeString( bstrDoc ) ;
01049     if (bstrHelp)
01050       SysFreeString( bstrHelp ) ;
01051
01052     pti->ReleaseTypeAttr( pattr ) ;
01053   }
01054   CATCH(CException, pException)
01055   {
01056     if (ptiImpl)
01057       ptiImpl->Release() ;
01058
01059     if (bstrName)
01060       SysFreeString( bstrName ) ;
01061     if (bstrDoc)
01062       SysFreeString( bstrDoc ) ;
01063     if (bstrHelp)
01064       SysFreeString( bstrHelp ) ;
01065     if (pattr)
01066       pti->ReleaseTypeAttr( pattr ) ;
01067
01068     THROW_LAST();
01069   }
01070   END_CATCH
01071   return hr ;
01072 }
01073
01074
01075 //  Syntax 1
01076 //
01077 //  [
01078 //    attributes
01079 //  ]
01080 //  dispinterface intfname {
01081 //      properties:
01082 //          proplist
01083 //      methods:
01084 //          methlist
01085 //  };
01086 //
01087 //  Syntax 2
01088 //
01089 //  [
01090 //    attributes
01091 //  ]
01092 //  dispinterface intfname {
01093 //      interface interfacename
01094 //  };
01095 //
01096 HRESULT CTypeLibODLView::DeCompileDispinterface( IStream* pstm, ITypeInfo* pti, UINT uiIndent /* = 0 */ )
01097 {
01098   HRESULT     hr = S_OK ;
01099   TYPEATTR*   pattr = NULL ;
01100   BSTR            bstrName = NULL ;
01101   BSTR            bstrDoc = NULL ;
01102   BSTR            bstrHelp = NULL ;
01103   DWORD           dwHelpID ;
01104   ITypeInfo*      ptiImpl = NULL ;
01105
01106   TRY
01107   {
01108     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
01109       AfxThrowOleException( hr ) ;
01110
01111     WRITELINE(_T("[")) ;
01112
01113     TCHAR szGUID[64] ;
01114     StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
01115     WRITE1("  uuid(") ;
01116     WRITE(szGUID) ;
01117     WRITE(")") ;
01118
01119     // was version specified
01120     if (pattr->wMajorVerNum || pattr->wMinorVerNum)
01121     {
01122       WRITECR(",") ;
01123       CString str ;
01124       str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
01125       WRITE1(str) ;
01126     }
01127
01128     if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
01129     {
01130       CString str ;
01131       if (bstrDoc && *bstrDoc)
01132       {
01133         WRITECR(",") ;
01134         COLE2CT lpszDoc(bstrDoc);
01135         ::SysFreeString(bstrDoc);
01136         bstrDoc = NULL;
01137         str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
01138         WRITE1( str ) ;
01139         if (dwHelpID > 0)
01140         {
01141           WRITECR(",") ;
01142           str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
01143           WRITE1( str ) ;
01144         }
01145       }
01146       else if (dwHelpID > 0)
01147       {
01148         WRITECR(",") ;
01149         str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
01150         WRITE1( str ) ;
01151       }
01152     }
01153
01154     // source, default, or restricted
01155     if (pattr->wTypeFlags == TYPEFLAG_FHIDDEN)
01156     {
01157       WRITECR(",") ;
01158       WRITE1("  hidden") ;
01159     }
01160
01161     if (pattr->wTypeFlags == TYPEFLAG_FDUAL)
01162     {
01163       WRITECR(",") ;
01164       WRITE1("  dual") ;
01165     }
01166
01167     WRITECR("") ;
01168     WRITELINE(_T("]")) ;
01169     WRITE1(_T("dispinterface ")) ;
01170     // interface name
01171     WRITEBSTR( bstrName ) ;
01172
01173     if (bstrName)
01174       SysFreeString( bstrName ) ;
01175     if (bstrDoc)
01176       SysFreeString( bstrDoc ) ;
01177     if (bstrHelp)
01178       SysFreeString( bstrHelp ) ;
01179     bstrName = bstrDoc = bstrHelp = NULL ;
01180
01181     WRITECR(_T(" {")) ;
01182
01183     WRITELINE2(_T("properties:"), 1) ;
01184     UINT n;
01185     for (n = 0 ; n < pattr->cVars ; n++)
01186       DumpVar( pstm, pti, pattr, n, uiIndent + 2 ) ;
01187
01188     WRITELINE2(_T("methods:"), 1) ;
01189     for (n = 0 ; n < pattr->cFuncs ; n++)
01190       DumpFunc( pstm, pti, pattr, n, uiIndent + 2 ) ;
01191
01192     WRITELINE("};") ;
01193
01194     if (bstrName)
01195       SysFreeString( bstrName ) ;
01196     if (bstrDoc)
01197       SysFreeString( bstrDoc ) ;
01198     if (bstrHelp)
01199       SysFreeString( bstrHelp ) ;
01200
01201     pti->ReleaseTypeAttr( pattr ) ;
01202   }
01203   CATCH(CException, pException)
01204   {
01205     if (ptiImpl)
01206       ptiImpl->Release() ;
01207
01208     if (bstrName)
01209       SysFreeString( bstrName ) ;
01210     if (bstrDoc)
01211       SysFreeString( bstrDoc ) ;
01212     if (bstrHelp)
01213       SysFreeString( bstrHelp ) ;
01214     if (pattr)
01215       pti->ReleaseTypeAttr( pattr ) ;
01216   }
01217   END_CATCH
01218   return hr ;
01219 }
01220
01221 //  [
01222 //    attributes
01223 //  ]
01224 //  coclass classname {
01225 //      [attributes2] [interface | dispinterface] interfacename;
01226 //      ...
01227 //  };
01228 //
01229 //  attributes
01230 //      uuid, helpstring, helpcontext, licensed, version, and appobject
01231 //
01232 HRESULT CTypeLibODLView::DeCompileCoClass( IStream* pstm, ITypeInfo* pti, UINT uiIndent /* = 0 */ )
01233 {
01234   HRESULT     hr = S_OK ;
01235   TYPEATTR*   pattr = NULL ;
01236   BSTR            bstrName = NULL ;
01237   BSTR            bstrDoc = NULL ;
01238   BSTR            bstrHelp = NULL ;
01239   DWORD           dwHelpID ;
01240   ITypeInfo*      ptiImpl = NULL ;
01241   TYPEATTR*       pattrImpl = NULL ;
01242
01243   TRY
01244   {
01245     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
01246       AfxThrowOleException( hr ) ;
01247
01248     WRITELINE(_T("[")) ;
01249
01250     TCHAR szGUID[64] ;
01251     StringFromGUID2T( pattr->guid, szGUID, 64, sizeof(szGUID) ) ;
01252     WRITE1("  uuid(") ;
01253     WRITE(szGUID) ;
01254     WRITE(")") ;
01255
01256     // was version specified
01257     if (pattr->wMajorVerNum || pattr->wMinorVerNum)
01258     {
01259       WRITECR(",") ;
01260       CString str ;
01261       str.Format(_T("  version(%d.%d)"), pattr->wMajorVerNum, pattr->wMinorVerNum) ;
01262       WRITE1(str) ;
01263     }
01264
01265     if (SUCCEEDED(pti->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
01266     {
01267       CString str ;
01268       if (bstrDoc && *bstrDoc)
01269       {
01270         WRITECR(",") ;
01271         COLE2CT lpszDoc(bstrDoc);
01272         ::SysFreeString(bstrDoc);
01273         bstrDoc = NULL;
01274         str.Format( _T("  helpstring(\"%s\")"), lpszDoc ) ;
01275         WRITE1( str ) ;
01276         if (dwHelpID > 0)
01277         {
01278           WRITECR(",") ;
01279           str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
01280           WRITE1( str ) ;
01281         }
01282       }
01283       else if (dwHelpID > 0)
01284       {
01285         WRITECR(",") ;
01286         str.Format( _T("  helpcontext(%#08.8x)"), dwHelpID ) ;
01287         WRITE1( str ) ;
01288       }
01289     }
01290
01291     if (pattr->wTypeFlags == TYPEFLAG_FAPPOBJECT)
01292     {
01293       WRITECR(",") ;
01294       WRITE1("  appobject") ;
01295     }
01296     if (pattr->wTypeFlags == TYPEFLAG_FHIDDEN)
01297     {
01298       WRITECR(",") ;
01299       WRITE1("  hidden") ;
01300     }
01301     if (pattr->wTypeFlags == TYPEFLAG_FLICENSED)
01302     {
01303       WRITECR(",") ;
01304       WRITE1("  licensed") ;
01305     }
01306     if (pattr->wTypeFlags == TYPEFLAG_FCONTROL)
01307     {
01308       WRITECR(",") ;
01309       WRITE1("  control") ;
01310     }
01311
01312     WRITECR("") ;
01313     WRITELINE(_T("]")) ;
01314     WRITE1(_T("coclass ")) ;
01315     // coclass name
01316     WRITEBSTR( bstrName ) ;
01317
01318     if (bstrName)
01319       SysFreeString( bstrName ) ;
01320     if (bstrDoc)
01321       SysFreeString( bstrDoc ) ;
01322     if (bstrHelp)
01323       SysFreeString( bstrHelp ) ;
01324     bstrName = bstrDoc = bstrHelp = NULL ;
01325
01326     WRITECR(_T(" {")) ;
01327
01328     //  [attributes2] [interface | dispinterface] interfacename;
01329     for (UINT n = 0 ; n < pattr->cImplTypes ; n++)
01330     {
01331       HREFTYPE href = NULL ;
01332
01333       int impltype = NULL ;
01334       if (FAILED(hr = pti->GetImplTypeFlags( n, &impltype )))
01335         AfxThrowOleException(hr) ;
01336
01337       if (FAILED(hr = pti->GetRefTypeOfImplType(n, &href)))
01338         AfxThrowOleException(hr) ;
01339
01340       if (FAILED(hr = pti->GetRefTypeInfo( href, &ptiImpl )))
01341         AfxThrowOleException(hr) ;
01342
01343       if (FAILED(hr = ptiImpl->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
01344         AfxThrowOleException(hr) ;
01345
01346       if (FAILED(hr = ptiImpl->GetTypeAttr( &pattrImpl)))
01347         AfxThrowOleException( hr ) ;
01348
01349       WRITE2(_T(""), 1 ) ;
01350
01351       if (impltype)
01352       {
01353         WRITE(_T("[")) ;
01354         BOOL    fComma = FALSE ;
01355         if (impltype & IMPLTYPEFLAG_FDEFAULT)
01356         {
01357           WRITE(_T("default")) ;
01358           fComma = TRUE ;
01359         }
01360         if (impltype & IMPLTYPEFLAG_FSOURCE)
01361         {
01362           if (fComma)
01363             WRITE(_T(", ")) ;
01364           WRITE(_T("source")) ;
01365           fComma = TRUE ;
01366         }
01367         if (impltype & IMPLTYPEFLAG_FRESTRICTED)
01368         {
01369           if (fComma)
01370             WRITE(_T(", ")) ;
01371           WRITE(_T("restricted")) ;
01372         }
01373
01374         WRITE(_T("] "));
01375       }
01376
01377       if (pattrImpl->typekind == TKIND_INTERFACE)
01378         WRITE(_T("interface ")) ;
01379
01380       if (pattrImpl->typekind == TKIND_DISPATCH)
01381         WRITE(_T("dispinterface ")) ;
01382
01383       WRITE( bstrName ) ;
01384
01385       WRITECR(_T(";")) ;
01386
01387       SysFreeString( bstrName ) ;
01388       bstrName = NULL ;
01389       SysFreeString( bstrDoc ) ;
01390       bstrDoc = NULL ;
01391       SysFreeString( bstrHelp ) ;
01392       bstrHelp = NULL ;
01393
01394       ptiImpl->ReleaseTypeAttr( pattrImpl ) ;
01395       pattrImpl = NULL ;
01396
01397       ptiImpl->Release() ;
01398       ptiImpl = NULL ;
01399     }
01400
01401     WRITELINE("};") ;
01402
01403     if (bstrName)
01404       SysFreeString( bstrName ) ;
01405     if (bstrDoc)
01406       SysFreeString( bstrDoc ) ;
01407     if (bstrHelp)
01408       SysFreeString( bstrHelp ) ;
01409
01410     pti->ReleaseTypeAttr( pattr ) ;
01411   }
01412   CATCH(CException, pException)
01413   {
01414     if (ptiImpl)
01415     {
01416       if (pattrImpl)
01417         ptiImpl->ReleaseTypeAttr( pattrImpl ) ;
01418
01419       ptiImpl->Release() ;
01420     }
01421     if (bstrName)
01422       SysFreeString( bstrName ) ;
01423     if (bstrDoc)
01424       SysFreeString( bstrDoc ) ;
01425     if (bstrHelp)
01426       SysFreeString( bstrHelp ) ;
01427     if (pattr)
01428       pti->ReleaseTypeAttr( pattr ) ;
01429
01430     THROW_LAST();
01431   }
01432   END_CATCH
01433   return hr ;
01434
01435 }
01436
01437 HRESULT CTypeLibODLView::DeCompileFunc( IStream* pstm, ITypeInfo* pti, MEMBERID memid, UINT uiIndent /* = 0 */ )
01438 {
01439   HRESULT     hr = S_OK ;
01440   TYPEATTR*   pattr = NULL ;
01441   ASSERT(pti) ;
01442
01443   TRY
01444   {
01445     ENSURE(pti);
01446     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
01447       AfxThrowOleException( hr ) ;
01448
01449     if (FAILED(hr = DumpFunc( pstm, pti, pattr, memid, uiIndent )))
01450       AfxThrowOleException( hr ) ;
01451
01452     pti->ReleaseTypeAttr( pattr ) ;
01453   }
01454   CATCH(CException, pException)
01455   {
01456     if (pattr)
01457       pti->ReleaseTypeAttr( pattr ) ;
01458
01459     THROW_LAST();
01460   }
01461   END_CATCH
01462
01463   return hr ;
01464 }
01465
01466 HRESULT CTypeLibODLView::DumpFunc( IStream* pstm, ITypeInfo* pti, TYPEATTR* pattr, MEMBERID memid, UINT uiIndent /* = 0 */ )
01467 {
01468   HRESULT     hr = S_OK ;
01469   FUNCDESC*   pfuncdesc = NULL ;
01470   BSTR            rgbstrNames[MAX_NAMES] ;
01471   BSTR            bstrName = NULL ;
01472   BSTR            bstrDoc = NULL ;
01473   BSTR            bstrHelp = NULL ;
01474   DWORD           dwHelpID ;
01475   ASSERT(pti) ;
01476
01477   for (UINT ui = 0 ; ui < MAX_NAMES ; ui++)
01478     rgbstrNames[ui] = NULL ;
01479
01480   TRY
01481   {
01482     ENSURE(pti);
01483     if (FAILED(hr = pti->GetFuncDesc( memid, &pfuncdesc )))
01484       AfxThrowOleException( hr ) ;
01485
01486     // If pattr->typekind == TKIND_DISPATCH (dispinterface)
01487     //    [attributes] returntype methname(params);
01488     // where attributes can be
01489     //      id(<id>), propput, propget,
01490     //      propputref, bindable, defaultbind, displaybind,
01491     //      requestedit, source, vararg, hidden, helpstring("<helpstring>"),
01492     //      helpcontext(<id>)
01493     //
01494     // If pattr->typekind == TKIND_INTERFACE || TKIND_MODULE
01495     //  [attributes] returntype [calling convention]  funcname(params);
01496     // where attributes can be
01497     //      restricted, bindable, defaultbind, displaybind,
01498     //      requestedit, source, vararg, hidden, helpstring("<helpstring>"),
01499     //      helpcontext(<id>)
01500     // and calling convention can be
01501     //      pascal, cdecl, stdcall
01502     //
01503     // Write [attributes]
01504     //
01505     BOOL    fAttributes = FALSE ;      // any attributes?
01506     BOOL    fAttribute = FALSE ;       // at least one (insert ",")
01507     WRITE1("") ;    // indent
01508     CString str ;
01509     if (pattr->typekind == TKIND_DISPATCH)
01510     {
01511       fAttributes = TRUE ;
01512       fAttribute = TRUE ;
01513       str.Format(_T("[id(%d)"), memid) ;
01514       WRITE(str) ;
01515     }
01516     else if (pattr->typekind == TKIND_MODULE)
01517     {
01518       fAttributes = TRUE ;
01519       fAttribute = TRUE ;
01520       str.Format(_T("[entry(%d)"), memid) ;
01521       WRITE(str) ;
01522     }
01523     else
01524       // if there are some attributes
01525       if ((pfuncdesc->invkind > 1)|| pfuncdesc->wFuncFlags || pfuncdesc->cParamsOpt == -1)
01526       {
01527         WRITE("[") ;
01528         fAttributes = TRUE ;
01529       }
01530
01531     if (pfuncdesc->invkind & INVOKE_PROPERTYGET)
01532     {
01533       if (fAttribute)
01534         WRITE(", ") ;
01535       fAttribute = TRUE ;
01536       WRITE("propget") ;
01537     }
01538     if (pfuncdesc->invkind & INVOKE_PROPERTYPUT)
01539     {
01540       if (fAttribute)
01541         WRITE(", ") ;
01542       fAttribute = TRUE ;
01543       WRITE("propput") ;
01544     }
01545     if (pfuncdesc->invkind & INVOKE_PROPERTYPUTREF)
01546     {
01547       if (fAttribute)
01548         WRITE(", ") ;
01549       fAttribute = TRUE ;
01550       WRITE("propputref") ;
01551     }
01552     if (pfuncdesc->wFuncFlags & FUNCFLAG_FRESTRICTED)
01553     {
01554       if (fAttribute)
01555         WRITE(", ") ;
01556       fAttribute = TRUE ;
01557       WRITE("restricted") ;
01558     }
01559     if (pfuncdesc->wFuncFlags & FUNCFLAG_FSOURCE)
01560     {
01561       if (fAttribute)
01562         WRITE(", ") ;
01563       fAttribute = TRUE ;
01564       WRITE("source") ;
01565     }
01566     if (pfuncdesc->wFuncFlags & FUNCFLAG_FBINDABLE)
01567     {
01568       if (fAttribute)
01569         WRITE(", ") ;
01570       fAttribute = TRUE ;
01571       WRITE("bindable") ;
01572     }
01573     if (pfuncdesc->wFuncFlags & FUNCFLAG_FREQUESTEDIT)
01574     {
01575       if (fAttribute)
01576         WRITE(", ") ;
01577       fAttribute = TRUE ;
01578       WRITE("requestedit") ;
01579     }
01580     if (pfuncdesc->wFuncFlags & FUNCFLAG_FDISPLAYBIND)
01581     {
01582       if (fAttribute)
01583         WRITE(", ") ;
01584       fAttribute = TRUE ;
01585       WRITE("displaybind") ;
01586     }
01587     if (pfuncdesc->wFuncFlags & FUNCFLAG_FDEFAULTBIND)
01588     {
01589       if (fAttribute)
01590         WRITE(", ") ;
01591       fAttribute = TRUE ;
01592       WRITE("defaultbind") ;
01593     }
01594     if (pfuncdesc->wFuncFlags & FUNCFLAG_FHIDDEN)
01595     {
01596       if (fAttribute)
01597         WRITE(", ") ;
01598       fAttribute = TRUE ;
01599       WRITE("hidden") ;
01600     }
01601     if (pfuncdesc->cParamsOpt == -1)    // cParamsOpt > 0 indicates VARIANT style
01602     {
01603       if (fAttribute)
01604         WRITE(", ") ;
01605       fAttribute = TRUE ;
01606       WRITE("vararg") ;         // optional params
01607     }
01608
01609     if (SUCCEEDED(pti->GetDocumentation( pfuncdesc->memid, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
01610     {
01611       if (bstrDoc && *bstrDoc)
01612       {
01613         if (fAttributes == FALSE) WRITE("[") ;
01614         fAttributes = TRUE ;
01615         if (fAttribute)
01616           WRITE(", ") ;
01617         COLE2CT lpszDoc(bstrDoc);
01618         ::SysFreeString(bstrDoc);
01619         bstrDoc = NULL;
01620         str.Format( _T("helpstring(\"%s\")"), lpszDoc ) ;
01621         WRITE( str ) ;
01622         if (dwHelpID > 0)
01623         {
01624           str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
01625           WRITE( str ) ;
01626         }
01627       }
01628       else if (dwHelpID > 0)
01629       {
01630         if (fAttributes == FALSE) WRITE("[") ;
01631         if (fAttribute)
01632           WRITE(", ") ;
01633         fAttributes = TRUE ;
01634         str.Format( _T("helpcontext(%#08.8x)"), dwHelpID ) ;
01635         WRITE( str ) ;
01636       }
01637     }
01638     if (fAttributes)
01639       WRITE("] ") ;
01640
01641     // Write return type
01642     WRITE(TYPEDESCtoString( pti, &pfuncdesc->elemdescFunc.tdesc )) ;
01643     WRITE(" ") ;
01644
01645     if (pattr->typekind != TKIND_DISPATCH)
01646     {   // Write calling convention
01647       switch(pfuncdesc->callconv)
01648       {
01649         case CC_CDECL:      WRITE("_cdecl ") ;           break ;
01650         //case CC_MSCPASCAL:  WRITE("_mspascal ") ;        break ;
01651         case CC_PASCAL:     WRITE("_pascal ") ;          break ;
01652         case CC_MACPASCAL:  WRITE("_macpascal ") ;       break ;
01653         case CC_STDCALL :   WRITE("_stdcall ") ;          break ;
01654         //case CC_RESERVED:   WRITE("_reserved ") ;         break ;
01655         case CC_SYSCALL:    WRITE("_syscall ") ;          break ;
01656         case CC_MPWCDECL:   WRITE("_mpwcdecl ") ;         break ;
01657         case CC_MPWPASCAL:  WRITE("_mpwpascal ") ;        break ;
01658       }
01659     }
01660
01661     // Write methodname
01662
01663     // Problem:  If a property has the propput or propputref attributes the
01664     // 'right hand side' (rhs) is *always* the last parameter and MkTypeLib
01665     // strips the parameter name.  Thus you will always get 1 less name
01666     // back from ::GetNames than normal.
01667     //
01668     // Thus for the example below
01669     //  [propput] void Color([in] VARIANT rgb, [in] VARIANT rgb2 );
01670     // without taking this into consderation the output would be
01671     //  [propput] void Color([in] VARIANT rgb, [in] VARIANT );
01672     // when it should be
01673     //  [propput] void Color([in] VARIANT rgb, [in] VARIANT rhs );
01674     //
01675     // Another weirdness comes from a bug (which will never be fixed)
01676     // where optional parameters on property functions were allowed.
01677     // Because they were allowed by accident people used them, so they
01678     // are still allowed.
01679     //
01680
01681     UINT cNames = 0 ;
01682     if (FAILED( hr = pti->GetNames( pfuncdesc->memid, rgbstrNames, MAX_NAMES, &cNames )))
01683       AfxThrowOleException( hr ) ;
01684
01685     // fix for 'rhs' problem
01686     if ((int)cNames < pfuncdesc->cParams + 1)
01687     {
01688       rgbstrNames[cNames] = ::SysAllocString(OLESTR("rhs")) ;
01689       cNames++ ;
01690     }
01691
01692     ASSERT((int)cNames == pfuncdesc->cParams+1) ;
01693     WRITEBSTR( rgbstrNames[0] ) ;
01694     WRITE("(") ;
01695
01696     // params have the format
01697     //   [attributes] type paramname
01698     // where attributes can be
01699     //   in, out, optional, string   (string is not valid for TKIND_MODULE)
01700     //
01701     if (pfuncdesc->cParams > 1)
01702       WRITECR("") ;
01703     for ( int n = 0 ; n < pfuncdesc->cParams ; n++ )
01704     {
01705       if (pfuncdesc->cParams > 1)
01706         WRITE2("", 4 ) ;    // indent 4
01707       fAttributes = FALSE ;
01708       fAttribute = FALSE ;
01709
01710       if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags)
01711       {
01712         WRITE("[") ;
01713         fAttributes = TRUE ;
01714       }
01715
01716       if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FIN)
01717       {
01718         if (fAttribute)
01719           WRITE(", ") ;
01720         WRITE("in") ;
01721         fAttribute = TRUE ;
01722       }
01723       if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FOUT)
01724       {
01725         if (fAttribute)
01726           WRITE(", ") ;
01727         WRITE("out") ;
01728         fAttribute = TRUE ;
01729       }
01730       if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FLCID)
01731       {
01732         if (fAttribute)
01733           WRITE(", ") ;
01734         WRITE("lcid") ;
01735         fAttribute = TRUE ;
01736       }
01737       if (pfuncdesc->lprgelemdescParam[n].idldesc.wIDLFlags & IDLFLAG_FRETVAL)
01738       {
01739         if (fAttribute)
01740           WRITE(", ") ;
01741         WRITE("retval") ;
01742         fAttribute = TRUE ;
01743       }
01744
01745       // If we have an optional last parameter and we're on the last paramter
01746       // or we are into the optional parameters...
01747       if ((pfuncdesc->cParamsOpt == -1 && n == pfuncdesc->cParams - 1) ||
01748         (n > (pfuncdesc->cParams - pfuncdesc->cParamsOpt)))
01749       {
01750         if (fAttribute)
01751           WRITE(", ") ;
01752         if (!fAttributes)
01753           WRITE("[") ;
01754         WRITE("optional") ;
01755         fAttributes = TRUE ;
01756         fAttribute = TRUE ;
01757       }
01758
01759       if (fAttributes)
01760         WRITE("] ") ;
01761
01762       // type
01763       if ((pfuncdesc->lprgelemdescParam[n].tdesc.vt & 0x0FFF) == VT_CARRAY)
01764       {
01765         // type name[n]
01766         WRITE(TYPEDESCtoString( pti, &pfuncdesc->lprgelemdescParam[n].tdesc.lpadesc->tdescElem )) ;
01767         WRITE(" ") ;
01768
01769         WRITEBSTR(rgbstrNames[n+1]) ;
01770
01771         // Allocate cDims * lstrlen("[123456]")
01772         for (USHORT n1 = 0 ; n1 < pfuncdesc->lprgelemdescParam[n1].tdesc.lpadesc->cDims ; n1++)
01773         {
01774           str.Format( _T("[%d]"), pfuncdesc->lprgelemdescParam[n1].tdesc.lpadesc->rgbounds[n1].cElements ) ;
01775           WRITE(str) ;
01776         }
01777       }
01778       else
01779       {
01780         WRITE(TYPEDESCtoString( pti, &pfuncdesc->lprgelemdescParam[n].tdesc ) + " " ) ;
01781         WRITEBSTR(rgbstrNames[n+1]) ;
01782       }
01783       if (n < pfuncdesc->cParams - 1)
01784         WRITECR(", ") ;
01785     }
01786
01787     WRITECR(");") ;
01788
01789     for (UINT ui = 0 ; ui < MAX_NAMES ; ui++)
01790       if (rgbstrNames[ui])
01791         SysFreeString(rgbstrNames[ui]) ;
01792     if (bstrName)
01793       SysFreeString( bstrName ) ;
01794     if (bstrDoc)
01795       SysFreeString( bstrDoc ) ;
01796     if (bstrHelp)
01797       SysFreeString( bstrHelp ) ;
01798
01799     pti->ReleaseFuncDesc( pfuncdesc ) ;
01800   }
01801   CATCH(CException, pException)
01802   {
01803     for (UINT ui = 0 ; ui < MAX_NAMES ; ui++)
01804       if (rgbstrNames[ui])
01805         SysFreeString(rgbstrNames[ui]) ;
01806
01807     if (bstrName)
01808       SysFreeString( bstrName ) ;
01809     if (bstrDoc)
01810       SysFreeString( bstrDoc ) ;
01811     if (bstrHelp)
01812       SysFreeString( bstrHelp ) ;
01813     if (pfuncdesc)
01814       pti->ReleaseFuncDesc( pfuncdesc ) ;
01815
01816     THROW_LAST();
01817   }
01818   END_CATCH
01819
01820   return hr ;
01821 }
01822
01823 HRESULT CTypeLibODLView::DeCompileVar( IStream* pstm, ITypeInfo* pti, MEMBERID memid, UINT uiIndent /* = 0 */)
01824 {
01825   HRESULT     hr = S_OK ;
01826   TYPEATTR*   pattr = NULL ;
01827   ASSERT(pti) ;
01828
01829   TRY
01830   {
01831     ENSURE(pti);
01832     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
01833       AfxThrowOleException( hr ) ;
01834
01835     if (FAILED(hr = DumpVar( pstm, pti, pattr, memid, uiIndent )))
01836       AfxThrowOleException( hr ) ;
01837
01838     pti->ReleaseTypeAttr( pattr ) ;
01839   }
01840   CATCH(CException, pException)
01841   {
01842     if (pattr)
01843       pti->ReleaseTypeAttr( pattr ) ;
01844
01845     THROW_LAST();
01846   }
01847   END_CATCH
01848
01849   return hr ;
01850 }
01851
01852 HRESULT CTypeLibODLView::DumpVar( IStream* pstm, ITypeInfo* pti, TYPEATTR* pattr, MEMBERID memid, UINT uiIndent /* = 0 */)
01853 {
01854   HRESULT     hr = S_OK ;
01855   VARDESC*    pvardesc = NULL ;
01856   BSTR            rgbstrNames[1] ;
01857   BSTR            bstrName = NULL ;
01858   BSTR            bstrDoc = NULL ;
01859   BSTR            bstrHelp = NULL ;
01860   DWORD           dwHelpID ;
01861   ASSERT(pti) ;
01862
01863   TRY
01864   {
01865     ENSURE(pti);
01866     if (FAILED(hr = pti->GetVarDesc( memid, &pvardesc )))
01867       AfxThrowOleException( hr ) ;
01868
01869     ASSERT(pvardesc->varkind != VAR_CONST) ;    // must not be a const
01870
01871     // If pattr->typekind == TKIND_RECORD (struct) || TKIND_UNION
01872     //    type name[array];
01873     //
01874     // If pattr->typekind == TKIND_DISPATCH (dispinterface)
01875     //    [id(<id>), bindable, defaultbind, displaybind, readonly,
01876     //      requestedit, source, hidden, helpstring("<helpstring>"),
01877     //      helpcontext(<id>)] type name;
01878     //
01879     BOOL    fAttributes = FALSE ;
01880     WRITE1("") ;    // indent
01881     if (pattr->typekind == TKIND_DISPATCH)
01882     {
01883       CString str ;
01884       fAttributes = TRUE ;
01885       str.Format(_T("[id(%d)"), memid) ;
01886       WRITE(str) ;
01887
01888       if (pvardesc->wVarFlags & VARFLAG_FREADONLY)
01889         WRITE(", readonly") ;
01890       if (pvardesc->wVarFlags & VARFLAG_FSOURCE)
01891         WRITE(", source") ;
01892       if (pvardesc->wVarFlags & VARFLAG_FBINDABLE)
01893         WRITE(", bindable") ;
01894       if (pvardesc->wVarFlags & VARFLAG_FREQUESTEDIT)
01895         WRITE(", requestedit") ;
01896       if (pvardesc->wVarFlags & VARFLAG_FDISPLAYBIND)
01897         WRITE(", displaybind") ;
01898       if (pvardesc->wVarFlags & VARFLAG_FDEFAULTBIND)
01899         WRITE(", defaultbind") ;
01900       if (pvardesc->wVarFlags & VARFLAG_FHIDDEN)
01901         WRITE(", hidden") ;
01902     }
01903
01904     if (SUCCEEDED(pti->GetDocumentation( pvardesc->memid, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
01905     {
01906       CString str ;
01907       if (bstrDoc && *bstrDoc)
01908       {
01909         if (fAttributes == FALSE)
01910           WRITE("[") ;
01911         else
01912           WRITE(", ") ;
01913         fAttributes = TRUE ;
01914         COLE2CT lpszDoc(bstrDoc);
01915         ::SysFreeString(bstrDoc);
01916         bstrDoc = NULL;
01917         str.Format( _T("helpstring(\"%s\")"), lpszDoc ) ;
01918         WRITE( str ) ;
01919         if (dwHelpID > 0)
01920         {
01921           str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
01922           WRITE( str ) ;
01923         }
01924       }
01925       else if (dwHelpID > 0)
01926       {
01927         if (fAttributes == FALSE)
01928           WRITE("[") ;
01929         else
01930           WRITE(", ") ;
01931         fAttributes = TRUE ;
01932         str.Format( _T("helpcontext(%#08.8x)"), dwHelpID ) ;
01933         WRITE( str ) ;
01934       }
01935     }
01936
01937     if (fAttributes)
01938       WRITE("] ") ;
01939     UINT cNames ;
01940     if (FAILED( hr = pti->GetNames( pvardesc->memid, rgbstrNames, 1, (UINT FAR*)&cNames )))
01941       AfxThrowOleException( hr ) ;
01942
01943     CString str ;
01944     if ((pvardesc->elemdescVar.tdesc.vt & 0x0FFF) == VT_CARRAY)
01945     {
01946       // type name[n]
01947       WRITE(TYPEDESCtoString( pti, &pvardesc->elemdescVar.tdesc.lpadesc->tdescElem )) ;
01948       WRITE(" ") ;
01949       if (rgbstrNames[0])
01950         WRITEBSTR(rgbstrNames[0]);
01951       else
01952         WRITE(_T("(nameless)")) ;
01953       // Allocate cDims * lstrlen("[123456]")
01954       for (USHORT n = 0 ; n < pvardesc->elemdescVar.tdesc.lpadesc->cDims ; n++)
01955       {
01956         str.Format( _T("[%d]"), pvardesc->elemdescVar.tdesc.lpadesc->rgbounds[n].cElements ) ;
01957         WRITE(str) ;
01958       }
01959     }
01960     else
01961     {
01962       WRITE(TYPEDESCtoString( pti, &pvardesc->elemdescVar.tdesc ) + _T(" "));
01963       if (rgbstrNames[0])
01964         WRITEBSTR(rgbstrNames[0]);
01965       else
01966         WRITE(_T("(nameless)")) ;
01967     }
01968     WRITECR(";") ;
01969
01970     if (bstrName)
01971       SysFreeString( bstrName ) ;
01972     if (bstrDoc)
01973       SysFreeString( bstrDoc ) ;
01974     if (bstrHelp)
01975       SysFreeString( bstrHelp ) ;
01976
01977     pti->ReleaseVarDesc( pvardesc ) ;
01978   }
01979   CATCH(CException, pException)
01980   {
01981     if (bstrName)
01982       SysFreeString( bstrName ) ;
01983     if (bstrDoc)
01984       SysFreeString( bstrDoc ) ;
01985     if (bstrHelp)
01986       SysFreeString( bstrHelp ) ;
01987     if (pvardesc)
01988       pti->ReleaseVarDesc( pvardesc ) ;
01989
01990     THROW_LAST();
01991   }
01992   END_CATCH
01993
01994   return hr ;
01995 }
01996
01997 // if fConst ==  TURE
01998 //  const type name = value ;
01999 // else
02000 //  name = value  (no commas)
02001 //
02002 HRESULT CTypeLibODLView::DeCompileConst( IStream* pstm, ITypeInfo* pti, MEMBERID memid, UINT uiIndent /* = 0 */, BOOL fConst /* = TRUE */  )
02003 {
02004   HRESULT     hr = S_OK ;
02005   TYPEATTR*       pattr = NULL ;
02006   ASSERT(pti) ;
02007
02008   TRY
02009   {
02010     ENSURE(pti);
02011     if (FAILED(hr = pti->GetTypeAttr( &pattr)))
02012       AfxThrowOleException( hr ) ;
02013
02014     if (FAILED(hr = DumpConst( pstm, pti, pattr, memid, uiIndent, fConst )))
02015       AfxThrowOleException( hr ) ;
02016
02017     pti->ReleaseTypeAttr( pattr ) ;
02018   }
02019   CATCH(CException, pException)
02020   {
02021     if (pattr)
02022       pti->ReleaseTypeAttr( pattr ) ;
02023     THROW_LAST();
02024   }
02025   END_CATCH
02026
02027   return hr ;
02028 }
02029
02030 HRESULT CTypeLibODLView::DumpConst( IStream* pstm, ITypeInfo* pti, TYPEATTR* pattr, MEMBERID memid, UINT uiIndent /* = 0 */, BOOL fConst /* = TRUE */  )
02031 {
02032   HRESULT     hr = S_OK ;
02033   VARDESC*    pvardesc = NULL ;
02034   BSTR            rgbstrNames[1] ;
02035   BSTR            bstrName = NULL ;
02036   BSTR            bstrDoc = NULL ;
02037   BSTR            bstrHelp = NULL ;
02038   DWORD           dwHelpID ;
02039   ASSERT(pti) ;
02040   VARIANT varValue ;
02041   VariantInit( &varValue ) ;
02042
02043   TRY
02044   {
02045     ENSURE(pti);
02046     if (FAILED(hr = pti->GetVarDesc( memid, &pvardesc )))
02047       AfxThrowOleException( hr ) ;
02048
02049     ASSERT(pvardesc->varkind == VAR_CONST) ;
02050
02051     CString str = TYPEDESCtoString( pti, &pvardesc->elemdescVar.tdesc ) ;
02052     if (FAILED(hr = VariantChangeType( &varValue, pvardesc->lpvarValue, 0, VT_BSTR )))
02053     {
02054       if (pvardesc->lpvarValue->vt == VT_ERROR || pvardesc->lpvarValue->vt == VT_HRESULT)
02055       {
02056         varValue.vt = VT_BSTR ;
02057         varValue.bstrVal = ::SysAllocString(CT2OLE(_GetScodeString(pvardesc->lpvarValue->scode))) ;
02058         hr = S_OK ;
02059       }
02060       else
02061         AfxThrowOleException( hr ) ;
02062     }
02063
02064     BOOL fIndent = FALSE ;
02065     if (fConst)
02066     {
02067       if (pattr->typekind == TKIND_MODULE)
02068       {
02069         str.Format(_T("[entry(%d)"), memid) ;
02070         WRITE1(str) ;
02071         fIndent = TRUE ;
02072       }
02073
02074       // [helpstring("<helpstring>"), helpcontext(<id>)] const type name = expression ;
02075       if (SUCCEEDED(pti->GetDocumentation( pvardesc->memid, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp )))
02076       {
02077         if (bstrDoc && *bstrDoc)
02078         {
02079           if (!fIndent)
02080             WRITE1("[") ;
02081           else
02082             WRITE(", ") ;
02083           COLE2CT lpszDoc(bstrDoc);
02084           ::SysFreeString(bstrDoc);
02085           bstrDoc = NULL;
02086           str.Format( _T("helpstring(\"%s\")"), lpszDoc ) ;
02087           WRITE( str ) ;
02088           if (dwHelpID > 0)
02089           {
02090             str.Format( _T(", helpcontext(%#08.8x)"), dwHelpID ) ;
02091             WRITE( str ) ;
02092           }
02093           WRITE("] ");
02094           fIndent = TRUE ;
02095         }
02096         else if (dwHelpID > 0)
02097         {
02098           if (!fIndent)
02099             WRITE1("[") ;
02100           else
02101             WRITE(", ") ;
02102           str.Format( _T("helpcontext(%#08.8x)] "), dwHelpID ) ;
02103           WRITE( str ) ;
02104           fIndent = TRUE ;
02105         }
02106       }
02107     }
02108
02109     UINT cNames ;
02110     if (FAILED( hr = pti->GetNames( pvardesc->memid, rgbstrNames, 1, (UINT FAR*)&cNames )))
02111       AfxThrowOleException( hr ) ;
02112
02113     if (fConst)
02114     {
02115       if (!fIndent)
02116         WRITE1(_T("")) ;
02117       WRITE("const ") ; WRITE( str ) ; WRITE( " " ) ;
02118     }
02119     else
02120       WRITE1("") ;
02121
02122     WRITEBSTR( rgbstrNames[0] ) ; WRITE( " = " ) ;
02123
02124     if (pvardesc->lpvarValue->vt == VT_BSTR)
02125     {
02126       WRITE( "\"" ) ;
02127       WRITEBSTR( varValue.bstrVal ) ;
02128       WRITE( "\"" ) ;
02129     }
02130     else
02131       WRITEBSTR( varValue.bstrVal) ;
02132
02133     if (fConst)
02134       WRITECR(";") ;
02135
02136     VariantClear( &varValue ) ;
02137
02138     if (bstrName)
02139       SysFreeString( bstrName ) ;
02140     if (bstrDoc)
02141       SysFreeString( bstrDoc ) ;
02142     if (bstrHelp)
02143       SysFreeString( bstrHelp ) ;
02144     pti->ReleaseVarDesc( pvardesc ) ;
02145   }
02146   CATCH(CException, pException)
02147   {
02148     VariantClear( &varValue ) ;
02149     if (bstrName)
02150       SysFreeString( bstrName ) ;
02151     if (bstrDoc)
02152       SysFreeString( bstrDoc ) ;
02153     if (bstrHelp)
02154       SysFreeString( bstrHelp ) ;
02155     if (pvardesc)
02156       pti->ReleaseVarDesc( pvardesc ) ;
02157
02158     THROW_LAST();
02159   }
02160   END_CATCH
02161
02162   return hr ;
02163 }
02164
02165 IStream* CreateMemoryStream()
02166 {
02167   LPSTREAM lpStream = NULL;
02168
02169   // Create a stream object on a memory block.
02170   HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE|GMEM_SHARE, 0);
02171   if (hGlobal != NULL)
02172   {
02173     HRESULT hr ;
02174     if (FAILED(hr = CreateStreamOnHGlobal(hGlobal, TRUE, &lpStream)))
02175     {
02176       TRACE0("CreateStreamOnHGlobal failed.\n");
02177       GlobalFree(hGlobal);
02178       AfxThrowOleException( hr ) ;
02179     }
02180   }
02181   else
02182   {
02183     #pragma warning (suppress: 6255)
02184     TRACE0("Failed to allocate memory for stream.\n");
02185     AfxThrowMemoryException() ;
02186   }
02187
02188   return lpStream;
02189 }
02190
02191 int StringFromGUID2T(REFGUID rguid, LPTSTR lpszGUID, int nSize, int cbMax )
02192 {
02193   OLECHAR* lpszOle = (OLECHAR*)_malloca(cbMax*sizeof(OLECHAR));
02194   int nCount = ::StringFromGUID2(rguid,lpszOle, cbMax*sizeof(OLECHAR));
02195   if (nCount == 0)
02196   {
02197     lpszGUID[0] = '\0';
02198     _freea(lpszOle);
02199
02200     return 0; // buffer too small for the returned string
02201   }
02202   COLE2T lpszRes(lpszOle);
02203   _tcscpy_s(lpszGUID, nSize, lpszRes);
02204   _freea(lpszOle);
02205   return 0;
02206 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/minifrm.h Source File

  • general
  • propdlg

minifrm.h

Go to the documentation of this file.
00001 // minifrm.h : interface of the CShapePropSheetFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CShapePropSheetFrame : public CMiniFrameWnd
00013 {
00014 // Constructor
00015 public:
00016   CShapePropSheetFrame();
00017
00018 // Attributes
00019 public:
00020   CModelessShapePropSheet* m_pModelessShapePropSheet;
00021
00022 // Handlers
00023 protected:
00024   //{{AFX_MSG(CShapePropSheetFrame)
00025   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00026   afx_msg void OnClose();
00027   afx_msg void OnSetFocus(CWnd* pOldWnd);
00028   afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
00029   //}}AFX_MSG
00030   DECLARE_MESSAGE_MAP()
00031 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/EvLogPg.Cpp Source File

  • ole
  • TstCon

EvLogPg.Cpp

Go to the documentation of this file.
00001 // EventLoggingPage.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CEventLoggingPage property page
00022
00023 IMPLEMENT_DYNCREATE(CEventLoggingPage, CPropertyPage)
00024
00025 CEventLoggingPage::CEventLoggingPage() :
00026    CPropertyPage( CEventLoggingPage::IDD )
00027 {
00028    m_psp.dwFlags &= ~PSP_HASHELP;
00029
00030   //{{AFX_DATA_INIT(CEventLoggingPage)
00031     // NOTE: the ClassWizard will add member initialization here
00032   //}}AFX_DATA_INIT
00033 }
00034
00035 CEventLoggingPage::~CEventLoggingPage()
00036 {
00037 }
00038
00039 void CEventLoggingPage::DoDataExchange(CDataExchange* pDX)
00040 {
00041    int iEvent;
00042    int iItem;
00043
00044   CPropertyPage::DoDataExchange(pDX);
00045   //{{AFX_DATA_MAP(CEventLoggingPage)
00046   DDX_Control(pDX, IDC_EVENTS, m_lbEvents);
00047   //}}AFX_DATA_MAP
00048
00049    if( m_lbEvents.GetCount() > 0 )
00050    {
00051     for( iEvent = 0; iEvent < m_astrEventNames.GetSize(); iEvent++ )
00052     {
00053      iItem = m_lbEvents.FindStringExact( -1, m_astrEventNames[iEvent] );
00054      ASSERT( iItem != LB_ERR );
00055      if( pDX->m_bSaveAndValidate )
00056      {
00057       m_atLogFlags[iEvent] = m_lbEvents.GetCheck( iItem );
00058      }
00059      else
00060      {
00061
00062       m_lbEvents.SetCheck( iItem, m_atLogFlags[iEvent] != FALSE );
00063      }
00064     }
00065    }
00066 }
00067
00068
00069 BEGIN_MESSAGE_MAP(CEventLoggingPage, CPropertyPage)
00070   //{{AFX_MSG_MAP(CEventLoggingPage)
00071   ON_WM_HELPINFO()
00072   ON_WM_CONTEXTMENU()
00073   //}}AFX_MSG_MAP
00074 END_MESSAGE_MAP()
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077 // CEventLoggingPage message handlers
00078
00079 BOOL CEventLoggingPage::OnInitDialog()
00080 {
00081    int iEvent;
00082
00083   CPropertyPage::OnInitDialog();
00084
00085    for( iEvent = 0; iEvent < m_astrEventNames.GetSize(); iEvent++ )
00086    {
00087     m_lbEvents.AddString( m_astrEventNames[iEvent] );
00088    }
00089
00090    UpdateData( FALSE );
00091
00092   return( TRUE );
00093 }
00094
00095 static DWORD rgmapCHID[] =
00096 {
00097    IDC_EVENTS, HIDC_EVENTS,
00098    0, 0
00099 };
00100
00101 BOOL CEventLoggingPage::OnHelpInfo( HELPINFO* pHelpInfo )
00102 {
00103   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00104   strPath += _T("::/popups.txt");
00105
00106   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00107 }
00108
00109 void CEventLoggingPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00110 {
00111   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00112   strPath += _T("::/popups.txt");
00113
00114   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00115 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/MainFrm.h Source File

  • vc2008fp
  • TabbedView

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CMDIFrameWnd CMDIFrameWndEx
00014
00015 class CMainFrame : public CMDIFrameWnd
00016 {
00017   DECLARE_DYNAMIC(CMainFrame)
00018 public:
00019   CMainFrame();
00020
00021 // Attributes
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029
00030 // Implementation
00031 public:
00032   virtual ~CMainFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:  // control bar embedded members
00039   CMFCMenuBar m_wndMenuBar;
00040   CMFCStatusBar m_wndStatusBar;
00041   CMFCToolBar m_wndToolBar;
00042
00043 protected:
00044   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00045   afx_msg void OnViewCustomize();
00046   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00047   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00048
00049   DECLARE_MESSAGE_MAP()
00050
00051   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00052 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlist.odl Source File

  • controls
  • xlist

xlist.odl

Go to the documentation of this file.
00001 // xlist.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (xlist.tlb) that will become a resource in
00005 // xlist.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(37446B9C-5870-101B-B57B-00608CC96AFA), version(1.0),
00019   helpstring("Xlist OLE Custom Control module"), control ]
00020 library XlistLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CXlistCtrl
00026
00027   [ uuid(37446B9A-5870-101B-B57B-00608CC96AFA),
00028     helpstring("Dispatch interface for Xlist Control"), hidden ]
00029   dispinterface _DXlist
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CXlistCtrl)
00035       [id(1)] boolean InvertFlag;
00036       //}}AFX_ODL_PROP
00037
00038     methods:
00039       // NOTE - ClassWizard will maintain method information here.
00040       //    Use extreme caution when editing this section.
00041       //{{AFX_ODL_METHOD(CXlistCtrl)
00042       [id(7), propget] OLE_COLOR ItemBackColor(short nIndex);
00043       [id(7), propput] void ItemBackColor(short nIndex, OLE_COLOR newValue);
00044       [id(8), propget] OLE_COLOR ItemForeColor(short nIndex);
00045       [id(8), propput] void ItemForeColor(short nIndex, OLE_COLOR newValue);
00046       [id(9), propget] BSTR ItemText(short nIndex);
00047       [id(9), propput] void ItemText(short nIndex, BSTR lpszNewValue);
00048       [id(10), propget] IFontDisp* ItemFont(short nIndex);
00049       [id(10), propput] void ItemFont(short nIndex, IFontDisp* newValue);
00050       [id(11), propget] IPictureDisp* ItemPicture(short nIndex);
00051       [id(11), propput] void ItemPicture(short nIndex, IPictureDisp* newValue);
00052       [id(2)] void RemoveItem(short nIndex);
00053       [id(3)] void Clear();
00054       [id(4)] void AddTextFontItem(short nIndex, BSTR lpstrText, IFontDisp* font);
00055       [id(5)] void AddTextItem(short nIndex, BSTR lpstrText);
00056       [id(6)] void AddPicItem(short nIndex, IPictureDisp* pic);
00057       //}}AFX_ODL_METHOD
00058
00059       [id(DISPID_ABOUTBOX)] void AboutBox();
00060
00061   };
00062
00063   //  Event dispatch interface for CXlistCtrl
00064
00065   [ uuid(37446B9B-5870-101B-B57B-00608CC96AFA),
00066     helpstring("Event interface for Xlist Control") ]
00067   dispinterface _DXlistEvents
00068   {
00069     properties:
00070       //  Event interface has no properties
00071
00072     methods:
00073       // NOTE - ClassWizard will maintain event information here.
00074       //    Use extreme caution when editing this section.
00075       //{{AFX_ODL_EVENT(CXlistCtrl)
00076       //}}AFX_ODL_EVENT
00077   };
00078
00079   //  Class information for CXlistCtrl
00080
00081   [ uuid(37446B99-5870-101B-B57B-00608CC96AFA),
00082     helpstring("Xlist Control"), control ]
00083   coclass Xlist
00084   {
00085     [default] dispinterface _DXlist;
00086     [default, source] dispinterface _DXlistEvents;
00087   };
00088
00089   //{{AFX_APPEND_ODL}}
00090 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatta.cpp Source File

  • ole
  • wordpad

formatta.cpp

Go to the documentation of this file.
00001 // formatta.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "formatta.h"
00015 #include "ddxm.h"
00016 #include "helpids.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 const DWORD CFormatTabDlg::m_nHelpIDs[] =
00024 {
00025   IDC_BUTTON_SET, IDH_WORDPAD_TABSET,
00026   IDC_BUTTON_CLEAR, IDH_WORDPAD_TABCLEAR,
00027   IDC_BUTTON_CLEARALL, IDH_WORDPAD_TAB_CLEARALL,
00028   IDC_COMBO1, IDH_WORDPAD_TABSTOPS,
00029   IDC_BOX, IDH_COMM_GROUPBOX,
00030   0, 0
00031 };
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CFormatTabDlg dialog
00035
00036 CFormatTabDlg::CFormatTabDlg(PARAFORMAT2& pf, CWnd* pParent /*=NULL*/)
00037   : CCSDialog(CFormatTabDlg::IDD, pParent)
00038 {
00039   m_pf = pf;
00040   m_tabarray = new LONG[MAX_TAB_STOPS];
00041   m_nCount = 0;
00042   if (m_pf.dwMask & PFM_TABSTOPS)
00043   {
00044     m_nCount = m_pf.cTabCount;
00045     ASSERT(m_pf.cTabCount <= MAX_TAB_STOPS);
00046     for (int i=0;i<m_pf.cTabCount;i++)
00047       m_tabarray[i] = m_pf.rgxTabs[i];
00048   }
00049
00050   //{{AFX_DATA_INIT(CFormatTabDlg)
00051   //}}AFX_DATA_INIT
00052 }
00053
00054 CFormatTabDlg::~CFormatTabDlg()
00055 {
00056   delete [] m_tabarray;
00057 }
00058
00059 void CFormatTabDlg::DoDataExchange(CDataExchange* pDX)
00060 {
00061   CCSDialog::DoDataExchange(pDX);
00062   //{{AFX_DATA_MAP(CFormatTabDlg)
00063   DDX_Control(pDX, IDC_BUTTON_CLEARALL, m_buttonClearAll);
00064   DDX_Control(pDX, IDC_BUTTON_SET, m_buttonSet);
00065   DDX_Control(pDX, IDC_BUTTON_CLEAR, m_buttonClear);
00066   DDX_Control(pDX, IDC_COMBO1, m_comboBox);
00067   //}}AFX_DATA_MAP
00068   if (!pDX->m_bSaveAndValidate)
00069     UpdateListBox();
00070 }
00071
00072 BEGIN_MESSAGE_MAP(CFormatTabDlg, CCSDialog)
00073   //{{AFX_MSG_MAP(CFormatTabDlg)
00074   ON_BN_CLICKED(IDC_BUTTON_CLEAR, OnClickedClear)
00075   ON_BN_CLICKED(IDC_BUTTON_CLEARALL, OnClickedClearAll)
00076   ON_BN_CLICKED(IDC_BUTTON_SET, OnClickedSet)
00077   ON_CBN_EDITCHANGE(IDC_COMBO1, OnEditChange)
00078   ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchange)
00079   //}}AFX_MSG_MAP
00080 END_MESSAGE_MAP()
00081
00082
00083 /////////////////////////////////////////////////////////////////////////////
00084 // CFormatTabDlg message handlers
00085
00086 void CFormatTabDlg::OnClickedClear()
00087 {
00088   int nTab;
00089   int nSel = m_comboBox.GetCurSel();
00090   if (nSel == CB_ERR)
00091   {
00092     CDataExchange dx(this, TRUE);
00093     DDX_Twips(&dx, IDC_COMBO1, nTab);
00094     DDV_MinMaxTwips(&dx, nTab, 0, 31680);
00095     if (nTab != DDXM_BLANK)
00096     {
00097         if (RemoveTabFromArray(nTab))
00098           UpdateListBox();
00099     }
00100   }
00101   else
00102   {
00103     ASSERT(nSel < m_nCount);
00104     RemoveTabFromArrayByIndex(nSel);
00105     UpdateListBox();
00106   }
00107   UpdateButtons();
00108   SetEditFocus();
00109 }
00110
00111 void CFormatTabDlg::OnClickedClearAll()
00112 {
00113   m_nCount = 0;
00114   m_comboBox.ResetContent();
00115   UpdateButtons();
00116   SetEditFocus();
00117 }
00118
00119 void CFormatTabDlg::OnClickedSet()
00120 {
00121   Set();
00122   UpdateButtons();
00123   SetEditFocus();
00124 }
00125
00126 BOOL CFormatTabDlg::Set()
00127 {
00128   int nTab;
00129   CDataExchange dx(this, TRUE);
00130   DDX_Twips(&dx, IDC_COMBO1, nTab);
00131   DDV_MinMaxTwips(&dx, nTab, 0, 31680);
00132   if (nTab != DDXM_BLANK)
00133   {
00134     if (m_nCount == MAX_TAB_STOPS)
00135     {
00136       AfxMessageBox(IDS_NOMORETABS);
00137       m_comboBox.Clear();
00138       return FALSE;
00139     }
00140     if (AddTabToArray(nTab))
00141       UpdateListBox();
00142     return TRUE;
00143   }
00144   return FALSE;
00145 }
00146
00147 void CFormatTabDlg::SetEditFocus()
00148 {
00149   m_comboBox.SetFocus();
00150   m_comboBox.SetEditSel(0,-1);
00151 }
00152
00153 BOOL CFormatTabDlg::RemoveTabFromArray(LONG lTab)
00154 {
00155   int i;
00156   for (i=0;i<m_nCount;i++)
00157   {
00158     if (m_tabarray[i] == lTab)
00159     {
00160       RemoveTabFromArrayByIndex(i);
00161       return TRUE;
00162     }
00163   }
00164   return FALSE;
00165 }
00166
00167 void CFormatTabDlg::RemoveTabFromArrayByIndex(int nIndex)
00168 {
00169   memmove_s(&m_tabarray[nIndex], sizeof(LONG), &m_tabarray[nIndex+1],
00170     (m_nCount-nIndex-1)*sizeof(LONG));
00171   m_nCount--;
00172 }
00173
00174 BOOL CFormatTabDlg::AddTabToArray(LONG lTab)
00175 {
00176   int i;
00177   BOOL bInsert = FALSE;
00178   LONG lTemp;
00179   for (i=0;i<m_nCount;i++)
00180   {
00181     if (!bInsert && lTab < m_tabarray[i])
00182       bInsert = TRUE;
00183     else if (lTab == m_tabarray[i]) // we don't want repeats
00184       return FALSE;
00185     if (bInsert)
00186     {
00187       lTemp = m_tabarray[i];
00188       m_tabarray[i] = lTab;
00189       lTab = lTemp;
00190     }
00191   }
00192   m_tabarray[m_nCount++] = lTab;
00193   return TRUE;
00194 }
00195
00196 void CFormatTabDlg::UpdateListBox()
00197 {
00198   int i;
00199   TCHAR szT[64];
00200   ASSERT(m_nCount >= 0);
00201   m_comboBox.ResetContent();
00202   for (i=0;i<m_nCount;i++)
00203   {
00204     theApp.PrintTwips(szT, 64, m_tabarray[i], 2);
00205     m_comboBox.AddString(szT);
00206   }
00207 }
00208
00209 void CFormatTabDlg::OnOK()
00210 {
00211   if (m_buttonSet.IsWindowEnabled())
00212   {
00213     if (!Set())
00214       return;
00215   }
00216   CCSDialog::OnOK();
00217   m_pf.cTabCount = (SHORT) m_nCount;
00218   for (int i=0;i<m_nCount;i++)
00219     m_pf.rgxTabs[i] = m_tabarray[i];
00220   m_pf.dwMask = PFM_TABSTOPS;
00221 }
00222
00223 void CFormatTabDlg::OnEditChange()
00224 {
00225   UpdateButtons();
00226 }
00227
00228 void CFormatTabDlg::UpdateButton(CButton& button, BOOL b)
00229 {
00230   if (b != button.IsWindowEnabled())
00231     button.EnableWindow(b);
00232 }
00233
00234 void CFormatTabDlg::UpdateButtons()
00235 {
00236   UpdateButton(m_buttonClearAll, m_nCount > 0);
00237   BOOL bHasText = (m_comboBox.GetWindowTextLength() > 0);
00238   UpdateButton(m_buttonSet, bHasText);
00239   UpdateButton(m_buttonClear, bHasText);
00240   WORD wID = LOWORD(GetDefID());
00241   if (bHasText && wID != IDC_BUTTON_SET)
00242     SetDefID(IDC_BUTTON_SET);
00243   else if (!bHasText && wID != IDOK)
00244     SetDefID(IDOK);
00245 }
00246
00247 BOOL CFormatTabDlg::OnInitDialog()
00248 {
00249   CCSDialog::OnInitDialog();
00250   UpdateButtons();
00251   return TRUE;  // return TRUE unless you set the focus to a control
00252           // EXCEPTION: OCX Property Pages should return FALSE
00253 }
00254
00255 void CFormatTabDlg::OnSelchange()
00256 {
00257   UpdateButton(m_buttonClearAll, m_nCount > 0);
00258   // force these since if the edit control is empty and
00259   // an item in the box is clicked on, the edit control will
00260   // not be filled in first
00261   UpdateButton(m_buttonSet, TRUE);
00262   UpdateButton(m_buttonClear, TRUE);
00263   WORD wID = LOWORD(GetDefID());
00264   if (wID != IDC_BUTTON_SET)
00265     SetDefID(IDC_BUTTON_SET);
00266 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcherDlg.cpp Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

FileDlgWatcherDlg.cpp

Go to the documentation of this file.
00001 // FileDlgWatcherDlg.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005 #include "FileDlgWatcher.h"
00006 #include "FileDlgWatcherDlg.h"
00007 #include "CustomFileDialog.h"
00008
00009 #ifdef _DEBUG
00010 #define new DEBUG_NEW
00011 #endif
00012
00013
00014 // CFileDlgWatcherDlg dialog
00015
00016 CFileDlgWatcherDlg::CFileDlgWatcherDlg(CWnd* pParent /*=NULL*/)
00017   : CDialog(CFileDlgWatcherDlg::IDD, pParent),
00018     m_bOpenFileDialog(TRUE),
00019     m_bVistaStyle(FALSE),
00020     m_bEventPopups(FALSE),
00021     m_strLog()
00022 {
00023   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00024 }
00025
00026 void CFileDlgWatcherDlg::DoDataExchange(CDataExchange* pDX)
00027 {
00028   CDialog::DoDataExchange(pDX);
00029   DDX_Check(pDX, IDC_OPEN_FILE_DLG, m_bOpenFileDialog);
00030   DDX_Check(pDX, IDC_VISTA_STYLE, m_bVistaStyle);
00031   DDX_Check(pDX, IDC_EVENT_POPUPS, m_bEventPopups);
00032   DDX_Text(pDX, IDC_LOG, m_strLog);
00033 }
00034
00035 BEGIN_MESSAGE_MAP(CFileDlgWatcherDlg, CDialog)
00036   ON_WM_PAINT()
00037   ON_WM_QUERYDRAGICON()
00038   //}}AFX_MSG_MAP
00039   ON_BN_CLICKED(IDC_CREATE_DLG, &CFileDlgWatcherDlg::OnBnClickedCreateDlg)
00040   ON_BN_CLICKED(IDC_CLEAR_LOG, &CFileDlgWatcherDlg::OnBnClickedClearLog)
00041 END_MESSAGE_MAP()
00042
00043
00044 // CFileDlgWatcherDlg message handlers
00045
00046 BOOL CFileDlgWatcherDlg::OnInitDialog()
00047 {
00048   CDialog::OnInitDialog();
00049
00050   // Set the icon for this dialog.  The framework does this automatically
00051   //  when the application's main window is not a dialog
00052   SetIcon(m_hIcon, TRUE);     // Set big icon
00053   SetIcon(m_hIcon, FALSE);    // Set small icon
00054
00055   // TODO: Add extra initialization here
00056
00057   return TRUE;  // return TRUE  unless you set the focus to a control
00058 }
00059
00060 // If you add a minimize button to your dialog, you will need the code below
00061 //  to draw the icon.  For MFC applications using the document/view model,
00062 //  this is automatically done for you by the framework.
00063
00064 void CFileDlgWatcherDlg::OnPaint()
00065 {
00066   if (IsIconic())
00067   {
00068     CPaintDC dc(this); // device context for painting
00069
00070     SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
00071
00072     // Center icon in client rectangle
00073     int cxIcon = GetSystemMetrics(SM_CXICON);
00074     int cyIcon = GetSystemMetrics(SM_CYICON);
00075     CRect rect;
00076     GetClientRect(&rect);
00077     int x = (rect.Width() - cxIcon + 1) / 2;
00078     int y = (rect.Height() - cyIcon + 1) / 2;
00079
00080     // Draw the icon
00081     dc.DrawIcon(x, y, m_hIcon);
00082   }
00083   else
00084   {
00085     CDialog::OnPaint();
00086   }
00087 }
00088
00089 // The system calls this function to obtain the cursor to display while the user drags
00090 //  the minimized window.
00091 HCURSOR CFileDlgWatcherDlg::OnQueryDragIcon()
00092 {
00093   return static_cast<HCURSOR>(m_hIcon);
00094 }
00095
00096 void CFileDlgWatcherDlg::OnBnClickedCreateDlg()
00097 {
00098   UpdateData(TRUE);   // to get current data from check boxes
00099   CreateLogPrologue();
00100   CCustomFileDialog cfd (m_bOpenFileDialog, m_bVistaStyle, m_bEventPopups,
00101                m_strLog);
00102   cfd.DoModal();
00103   CreateLogEpilogue();
00104   UpdateData(FALSE);    // to get new data from text log
00105 }
00106
00107 void CFileDlgWatcherDlg::OnBnClickedClearLog()
00108 {
00109   m_strLog.Empty();
00110   UpdateData(FALSE);
00111 }
00112
00113 void CFileDlgWatcherDlg::CreateLogPrologue()
00114 {
00115   if (m_bOpenFileDialog)
00116   {
00117     m_strLog += _T("Open ");
00118   }
00119   else
00120   {
00121     m_strLog += _T("Save ");
00122   }
00123   m_strLog += _T("file dialog (");
00124   if (m_bVistaStyle)
00125   {
00126     m_strLog += _T("Vista ");
00127   }
00128   else
00129   {
00130     m_strLog += _T("XP ");
00131   }
00132   m_strLog += _T("style)\r\n");
00133   m_strLog += _T("-----\r\n");
00134 }
00135
00136 void CFileDlgWatcherDlg::CreateLogEpilogue()
00137 {
00138   m_strLog += _T("\r\n");
00139 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionsPage12 Member List

This is the complete list of members for COptionsPage12, including all inherited members.
COptionsPage12() | COptionsPage12 |
DoDataExchange(CDataExchange *pDX) | COptionsPage12 | [protected, virtual]
IDD enum value | COptionsPage12 |
~COptionsPage12() | COptionsPage12 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/idataobj.h Source File

  • ole
  • oleview
  • iviewers

idataobj.h

Go to the documentation of this file.
00001 // idataobj.h
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 // Header file for the IDataObject interface viewer.
00014 //
00015
00016
00017 #ifndef _IDATAOBJ_H_
00018 #define _IDATAOBJ_H_
00019
00020 int WINAPI GetTextMetricsCorrectly( HDC hDC, LPTEXTMETRIC lpTM ) ;
00021 typedef struct FAR tagCOLUMNSTRUCT
00022 {
00023    int   nLeft ;       // starting x position of the column
00024    int   nRight ;      // ending x position of the column
00025    UINT  uiFlags ;      // format flags
00026
00027 } COLUMNSTRUCT, *PCOLUMNSTRUCT, FAR *LPCOLUMNSTRUCT ;
00028
00029 void WINAPI ColumnTextOut( HDC hdc, int nX, int nY, LPTSTR lpszIN,
00030               int cColumns, LPCOLUMNSTRUCT rgColumns );
00031 void WINAPI DlgCenter( HWND hwndCenter, HWND hwndWithin, BOOL fClient ) ;
00032
00033 class CImpIAdviseSink ;
00034
00035 #define CCHOUTPUTMAX        8192
00036 #define CLINESMAX           500
00037 #define WM_OUTPUTBUFFERHASDATA      (WM_USER+1000)
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CIDataObjectDlg dialog
00041 //
00042 extern "C"
00043 BOOL CALLBACK fnIDataObjectDlg( HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ;
00044
00045 class FAR CIDataObjectDlg
00046 {
00047   friend BOOL CALLBACK fnIDataObjectDlg( HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ;
00048   friend class CImpIAdviseSink ;
00049
00050 public:
00051
00052   CIDataObjectDlg( HWND hwnd, LPDATAOBJECT lpDO, REFIID riid, LPTSTR lpszName ) ;
00053   ~CIDataObjectDlg() ;
00054
00055   int DoModal( void ) ;
00056
00057   LPDATAOBJECT    m_lpDO ;
00058   LPTSTR          m_lpszName ;
00059
00060   FORMATETC       m_fetc ;
00061   DWORD           m_advf ;
00062   BOOL            m_fDoOnGetDataPosted ;
00063
00064   HWND        m_hWndParent ;
00065   HWND        m_hDlg ;
00066
00067   HWND        m_btnDoGetData ;
00068   HWND        m_btnSetupAdvise ;
00069   HWND        m_lbGetData ;
00070   HWND        m_edtAdvise ;
00071   TCHAR       m_szOutput[CCHOUTPUTMAX] ;
00072   METAFILEPICT m_MetaFile ;
00073
00074   UINT        m_cchOutput ;
00075   UINT        m_cLinesOutput ;
00076
00077   HWND        m_chkUpdateDisplay ;
00078   BOOL        m_fUpdateDisplay ;
00079   HWND        m_chkPrimeFirst ;
00080
00081   HWND        m_lbFmtEtc ;
00082
00083   HWND        m_chkDump ;
00084
00085   DWORD       m_dwTime ;
00086   DWORD       m_cOnDataChanges ;
00087
00088   CImpIAdviseSink FAR* m_pSink ;
00089   DWORD               m_dwConn ;
00090
00091 // Implementation
00092 protected:
00093   BOOL DoIDataObject( UINT nLevel, LPDATAOBJECT pI ) ;
00094   BOOL DoIEnumFormatEtc( UINT nLevel, LPENUMFORMATETC pI ) ;
00095
00096   int AddItem( UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType, int cColumns, LPCOLUMNSTRUCT  rgCol ) ;
00097   int AddItem( UINT nLevel, LPTSTR sz, LPVOID lpData, UINT uiType ) ;
00098   int AddItem( UINT nLevel, LPTSTR sz, LPVOID lpData ) ;
00099
00100   BOOL OnInitDialog();
00101
00102   void OnDoGetData() ;
00103   HRESULT GotData( LPFORMATETC lpfetc, LPSTGMEDIUM lpstm ) ;
00104   void OnSetupAdvise() ;
00105   void OnKillAdvise() ;
00106
00107   void OnSize(UINT nType, int cx, int cy);
00108   void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
00109   void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00110   void OnDblClkFormatEtc();
00111   void OnSelChangeFormatEtc();
00112   void OnDestroy();
00113   BOOL  WriteToOutput( LPTSTR lpsz ) ;
00114   void OnOutputBufferHasData() ;
00115 };
00116
00117 #endif // _IDATAOBJ_H_
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/IEDemo.h Source File

  • vc2008fp
  • IEDemo

IEDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018 #include "FavoritesManager.h"
00019
00020 // CIEDemoApp:
00021 // See IEDemo.cpp for the implementation of this class
00022 //
00023
00024 class CIEDemoApp : public CWinAppEx
00025 {
00026 public:
00027   CIEDemoApp();
00028
00029   // Override from CWorkspace
00030   virtual void PreLoadState ();
00031
00032   CFavoritesManager m_Favorites;
00033
00034 // Overrides
00035 public:
00036   virtual BOOL InitInstance();
00037   virtual int ExitInstance();
00038
00039 // Implementation
00040   afx_msg void OnAppAbout();
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 extern CIEDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSnapView Member List

This is the complete list of members for CSnapView, including all inherited members.
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CSnapView | [virtual]
CSnapView() | CSnapView | [protected]
DoDataExchange(CDataExchange *pDX) | CSnapView | [protected, virtual]
GetDocument() | CSnapView | [inline]
m_bSizedBefore | CSnapView | [protected]
m_pPageBkfst | CSnapView | [protected]
m_pPageDinner | CSnapView | [protected]
m_pPageLunch | CSnapView | [protected]
m_pPropSheet | CSnapView | [protected]
OnDraw(CDC *pDC) | CSnapView | [protected]
OnEraseBkgnd(CDC *pDC) | CSnapView | [protected]
OnInitialUpdate() | CSnapView | [virtual]
OnSize(UINT nType, int cx, int cy) | CSnapView | [protected]
~CSnapView() | CSnapView | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/stdafx.h Source File

  • ole
  • autoclik

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00015
00016 #include <afxwin.h>         // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions
00018 #include <afxdisp.h>        // MFC OLE automation classes
00019 #ifndef _AFX_NO_AFXCMN_SUPPORT
00020 #include <afxcmn.h>     // MFC support for Windows 95 Common Controls
00021 #endif // _AFX_NO_AFXCMN_SUPPORT
00022
00023
00024
00025
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMDITabsDemoApp Member List

This is the complete list of members for CMDITabsDemoApp, including all inherited members.
CMDITabsDemoApp() | CMDITabsDemoApp |
ExitInstance() | CMDITabsDemoApp | [virtual]
InitInstance() | CMDITabsDemoApp | [virtual]
m_Options | CMDITabsDemoApp |
OnAppAbout() | CMDITabsDemoApp |
PreLoadState() | CMDITabsDemoApp | [virtual]
UpdateMDITabs(BOOL bResetMDIChild) | CMDITabsDemoApp |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mtbounce.cpp Source File

  • advanced
  • mtmdi

mtbounce.cpp

Go to the documentation of this file.
00001 // mtbounce.cpp : Implements the user interface thread for the
00002 //                bounce window.
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "bounce.h"
00015 #include "mtbounce.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 // A single global event handle is used to synchronize the termination
00023 // of the application and the termination of bounce threads.  This
00024 // synchronization avoids false memory leak detection of CBounceThread
00025 // objects that did not have time to be auto-destroyed before the
00026 // application terminates.
00027 //
00028 // The reason that m_hEventBounceThreadKilled cannot be a per-object member
00029 // variable of the CBounceThread object is because the event handle must
00030 // be referred to by the delete operator.   By the time the delete operator
00031 // is called, the member variable no longer can be referenced.  The reason
00032 // that it is permissable to use a global event, instead of per thread events,
00033 // is that each CBounceWnd window is destroyed in sequence, one after another.
00034 // Therefore, each CBounceThread is destroyed in sequence, one after another.
00035
00036 HANDLE CBounceThread::m_hEventBounceThreadKilled;
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CBounceThread
00040
00041 IMPLEMENT_DYNCREATE(CBounceThread, CWinThread)
00042
00043 CBounceThread::CBounceThread()
00044 {
00045 }
00046
00047 CBounceThread::CBounceThread(HWND hwndParent) : m_hwndParent(hwndParent)
00048 {
00049 }
00050
00051 CBounceThread::~CBounceThread()
00052 {
00053 }
00054
00055 void CBounceThread::operator delete(void* p)
00056 {
00057   // The exiting main application thread waits for this event before completely
00058   // terminating in order to avoid a false memory leak detection.  See also
00059   // CBounceWnd::OnNcDestroy in bounce.cpp.
00060
00061   SetEvent(m_hEventBounceThreadKilled);
00062
00063   CWinThread::operator delete(p);
00064 }
00065
00066 int CBounceThread::InitInstance()
00067 {
00068   CWnd* pParent = CWnd::FromHandle(m_hwndParent);
00069   CRect rect;
00070   pParent->GetClientRect(&rect);
00071
00072   BOOL bReturn = m_wndBounce.Create(_T("BounceMTChildWnd"),
00073     WS_CHILD | WS_VISIBLE, rect, pParent);
00074
00075   // It is important to set CWinThread::m_pMainWnd to the user interface
00076   // window.  This is required so that when the m_pMainWnd is destroyed,
00077   // the CWinThread is also automatically destroyed.  For insight into
00078   // how the CWinThread is automatically destroyed when the m_pMainWnd
00079   // window is destroyed, see the implementation of CWnd::OnNcDestroy
00080   // in wincore.cpp of the MFC sources.
00081
00082   if (bReturn)
00083     m_pMainWnd = &m_wndBounce;
00084
00085   return bReturn;
00086 }
00087
00088 int CBounceThread::ExitInstance()
00089 {
00090   return CWinThread::ExitInstance();
00091 }
00092
00093 BEGIN_MESSAGE_MAP(CBounceThread, CWinThread)
00094   //{{AFX_MSG_MAP(CBounceThread)
00095     // NOTE - the ClassWizard will add and remove mapping macros here.
00096   //}}AFX_MSG_MAP
00097 END_MESSAGE_MAP()
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CBounceThread message handlers
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View3.cpp Source File

  • vc2008fp
  • TabbedView

View3.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013 #include "View3.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CView3
00023
00024 IMPLEMENT_DYNCREATE(CView3, CFormView)
00025
00026 CView3::CView3()
00027   : CFormView(CView3::IDD)
00028 {
00029 }
00030
00031 CView3::~CView3()
00032 {
00033 }
00034
00035 void CView3::DoDataExchange(CDataExchange* pDX)
00036 {
00037   CFormView::DoDataExchange(pDX);
00038 }
00039
00040
00041 BEGIN_MESSAGE_MAP(CView3, CFormView)
00042   ON_WM_CONTEXTMENU()
00043   ON_WM_WINDOWPOSCHANGING()
00044   ON_WM_ERASEBKGND()
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CView3 diagnostics
00049
00050 #ifdef _DEBUG
00051 void CView3::AssertValid() const
00052 {
00053   CFormView::AssertValid();
00054 }
00055
00056 void CView3::Dump(CDumpContext& dc) const
00057 {
00058   CFormView::Dump(dc);
00059 }
00060 #endif //_DEBUG
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CView3 message handlers
00064
00065 void CView3::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
00066 {
00067   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00068 }
00069
00070 void CView3::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
00071 {
00072   CFormView::OnWindowPosChanging(lpwndpos);
00073
00074   // Hide horizontal scrollbar:
00075   ShowScrollBar (SB_HORZ, FALSE);
00076   ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
00077 }
00078
00079
00080 BOOL CView3::OnEraseBkgnd(CDC* /*pDC*/)
00081 {
00082   return TRUE;
00083 }
00084
00085 void CView3::OnDraw(CDC* pDC)
00086 {
00087   CRect rectClient;
00088   GetClientRect (rectClient);
00089
00090   pDC->FillSolidRect (rectClient, ::GetSysColor (COLOR_3DFACE));
00091 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/stdafx.h Source File

  • ole
  • hiersvr

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>
00017 #include <afxext.h>
00018 #include <afxole.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collect.cpp Source File

  • advanced
  • collect

collect.cpp

Go to the documentation of this file.
00001 // collect.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014
00015 #include "mainfrm.h"
00016 #include "colledoc.h"
00017 #include "strlstvw.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CCollectApp
00026
00027 BEGIN_MESSAGE_MAP(CCollectApp, CWinApp)
00028   //{{AFX_MSG_MAP(CCollectApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   //}}AFX_MSG_MAP
00031   // Standard file based document commands
00032   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00033   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00034   // Standard print setup command
00035   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CCollectApp construction
00040
00041 CCollectApp::CCollectApp()
00042 {
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CCollectApp object
00047
00048 CCollectApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CCollectApp initialization
00052
00053 BOOL CCollectApp::InitInstance()
00054 {
00055   // Standard initialization
00056
00057   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00058
00059   // Register document templates
00060
00061   CSingleDocTemplate* pDocTemplate;
00062   pDocTemplate = new CSingleDocTemplate(
00063     IDR_MAINFRAME,
00064     RUNTIME_CLASS(CCollectDoc),
00065     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00066     RUNTIME_CLASS(CStringListView));
00067   AddDocTemplate(pDocTemplate);
00068
00069   // create a new (empty) document
00070   OnFileNew();
00071
00072   if (m_lpCmdLine[0] != '\0')
00073   {
00074   }
00075
00076   return TRUE;
00077 }
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CAboutDlg dialog used for App About
00081
00082 class CAboutDlg : public CDialog
00083 {
00084 public:
00085   CAboutDlg();
00086
00087 // Dialog Data
00088   //{{AFX_DATA(CAboutDlg)
00089   enum { IDD = IDD_ABOUTBOX };
00090   //}}AFX_DATA
00091
00092 // Implementation
00093 protected:
00094   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00095   //{{AFX_MSG(CAboutDlg)
00096     // No message handlers
00097   //}}AFX_MSG
00098   DECLARE_MESSAGE_MAP()
00099 };
00100
00101 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00102 {
00103   //{{AFX_DATA_INIT(CAboutDlg)
00104   //}}AFX_DATA_INIT
00105 }
00106
00107 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00108 {
00109   CDialog::DoDataExchange(pDX);
00110   //{{AFX_DATA_MAP(CAboutDlg)
00111   //}}AFX_DATA_MAP
00112 }
00113
00114 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00115   //{{AFX_MSG_MAP(CAboutDlg)
00116     // No message handlers
00117   //}}AFX_MSG_MAP
00118 END_MESSAGE_MAP()
00119
00120 // App command to run the dialog
00121 void CCollectApp::OnAppAbout()
00122 {
00123   CAboutDlg aboutDlg;
00124   aboutDlg.DoModal();
00125 }
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CCollectApp commands
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPages.cpp Source File

  • vc2008fp
  • CustomPages

CustomPages.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "CustomPages.h"
00013
00014 #include "MainFrm.h"
00015 #include "CustomPagesDoc.h"
00016 #include "CustomPagesView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CCustomPagesApp
00026
00027 BEGIN_MESSAGE_MAP(CCustomPagesApp, CWinAppEx)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CCustomPagesApp construction
00038
00039 CCustomPagesApp::CCustomPagesApp() : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CCustomPagesApp object
00047
00048 CCustomPagesApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CCustomPagesApp initialization
00052
00053 BOOL CCustomPagesApp::InitInstance()
00054 {
00055   // Initialize OLE libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   AfxEnableControlContainer();
00063
00064   // Standard initialization
00065   // If you are not using these features and wish to reduce the size
00066   //  of your final executable, you should remove from the following
00067   //  the specific initialization routines you do not need.
00068
00069   // Change the registry key under which our settings are stored.
00070   // TODO: You should modify this string to be something appropriate
00071   // such as the name of your company or organization.
00072   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   SetRegistryBase (_T("Settings"));
00077
00078   // Initialize all Managers for usage. They are automatically constructed
00079   // if not yet present
00080   InitContextMenuManager();
00081   InitKeyboardManager();
00082
00083   // Register the application's document templates.  Document templates
00084   //  serve as the connection between documents, frame windows and views.
00085
00086   CSingleDocTemplate* pDocTemplate;
00087   pDocTemplate = new CSingleDocTemplate(
00088     IDR_MAINFRAME,
00089     RUNTIME_CLASS(CCustomPagesDoc),
00090     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00091     RUNTIME_CLASS(CCustomPagesView));
00092   AddDocTemplate(pDocTemplate);
00093
00094   // Parse command line for standard shell commands, DDE, file open
00095   CCommandLineInfo cmdInfo;
00096   ParseCommandLine(cmdInfo);
00097
00098   // Dispatch commands specified on the command line
00099   if (!ProcessShellCommand(cmdInfo))
00100     return FALSE;
00101
00102   LoadCustomState ();
00103
00104   // The one and only window has been initialized, so show and update it.
00105   m_pMainWnd->ShowWindow(SW_SHOW);
00106   m_pMainWnd->UpdateWindow();
00107
00108   return TRUE;
00109 }
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CCustomPagesApp message handlers
00113
00114 int CCustomPagesApp::ExitInstance()
00115 {
00116   return CWinAppEx::ExitInstance();
00117 }
00118
00119 void CCustomPagesApp::PreLoadState ()
00120 {
00121
00122   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00123
00124   // TODO: add another context menus here
00125 }
00126
00127
00128 /////////////////////////////////////////////////////////////////////////////
00129 // CAboutDlg dialog used for App About
00130
00131 class CAboutDlg : public CDialog
00132 {
00133 public:
00134   CAboutDlg();
00135
00136 // Dialog Data
00137   //{{AFX_DATA(CAboutDlg)
00138   enum { IDD = IDD_ABOUTBOX };
00139   //}}AFX_DATA
00140
00141   // ClassWizard generated virtual function overrides
00142   //{{AFX_VIRTUAL(CAboutDlg)
00143   protected:
00144   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00145   //}}AFX_VIRTUAL
00146
00147 // Implementation
00148 protected:
00149   //{{AFX_MSG(CAboutDlg)
00150     // No message handlers
00151   //}}AFX_MSG
00152   DECLARE_MESSAGE_MAP()
00153 };
00154
00155 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00156 {
00157   //{{AFX_DATA_INIT(CAboutDlg)
00158   //}}AFX_DATA_INIT
00159 }
00160
00161 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00162 {
00163   CDialog::DoDataExchange(pDX);
00164   //{{AFX_DATA_MAP(CAboutDlg)
00165   //}}AFX_DATA_MAP
00166 }
00167
00168 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00169   //{{AFX_MSG_MAP(CAboutDlg)
00170     // No message handlers
00171   //}}AFX_MSG_MAP
00172 END_MESSAGE_MAP()
00173
00174 // App command to run the dialog
00175 void CCustomPagesApp::OnAppAbout()
00176 {
00177   CAboutDlg aboutDlg;
00178   aboutDlg.DoModal();
00179 }
00180
00181 /////////////////////////////////////////////////////////////////////////////
00182 // CCustomPagesApp message handlers
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/mainfrm.cpp Source File

  • ole
  • autoclik

mainfrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "stdafx.h"
00014 #include "AutoClik.h"
00015
00016 #include "MainFrm.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMainFrame
00026
00027 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00030   //{{AFX_MSG_MAP(CMainFrame)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code !
00033   ON_WM_CREATE()
00034   //}}AFX_MSG_MAP
00035 END_MESSAGE_MAP()
00036
00037 static UINT indicators[] =
00038 {
00039   ID_SEPARATOR,           // status line indicator
00040   ID_INDICATOR_CAPS,
00041   ID_INDICATOR_NUM,
00042   ID_INDICATOR_SCRL,
00043 };
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CMainFrame construction/destruction
00047
00048 CMainFrame::CMainFrame()
00049 {
00050   // TODO: add member initialization code here
00051
00052 }
00053
00054 CMainFrame::~CMainFrame()
00055 {
00056 }
00057
00058 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00059 {
00060   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00061     return -1;
00062
00063   if (!m_wndToolBar.Create(this) ||
00064     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00065   {
00066     TRACE0("Failed to create toolbar\n");
00067     return -1;      // fail to create
00068   }
00069
00070   if (!m_wndStatusBar.Create(this) ||
00071     !m_wndStatusBar.SetIndicators(indicators,
00072       sizeof(indicators)/sizeof(UINT)))
00073   {
00074     TRACE0("Failed to create status bar\n");
00075     return -1;      // fail to create
00076   }
00077
00078   // TODO: Remove this if you don't want tool tips
00079   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00080     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00081
00082   // TODO: Delete these three lines if you don't want the toolbar to
00083   //  be dockable
00084   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00085   EnableDocking(CBRS_ALIGN_ANY);
00086   DockControlBar(&m_wndToolBar);
00087
00088   return 0;
00089 }
00090
00091 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00092 {
00093   // TODO: Modify the Window class or styles here by modifying
00094   //  the CREATESTRUCT cs
00095
00096   return CMDIFrameWnd::PreCreateWindow(cs);
00097 }
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CMainFrame diagnostics
00101
00102 #ifdef _DEBUG
00103 void CMainFrame::AssertValid() const
00104 {
00105   CMDIFrameWnd::AssertValid();
00106 }
00107
00108 void CMainFrame::Dump(CDumpContext& dc) const
00109 {
00110   CMDIFrameWnd::Dump(dc);
00111 }
00112
00113 #endif //_DEBUG
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ChildFrm.h Source File

  • vc2008fp
  • MenuSubSet

ChildFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CChildFrame : public CMDIChildWndEx
00014 {
00015   DECLARE_DYNCREATE(CChildFrame)
00016 public:
00017   CChildFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00027
00028 // Implementation
00029 public:
00030   virtual ~CChildFrame();
00031 #ifdef _DEBUG
00032   virtual void AssertValid() const;
00033   virtual void Dump(CDumpContext& dc) const;
00034 #endif
00035
00036 protected:
00037   DECLARE_MESSAGE_MAP()
00038 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/Resource.h Source File

  • controls
  • IMAGE

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by image.rc
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_IMAGE                       1
00015 #define IDD_ABOUTBOX_IMAGE              1
00016 #define IDB_IMAGE                       1
00017 #define IDI_ABOUTDLL                    1
00018 #define IDS_IMAGE_PPG                   2
00019 #define IDS_IMAGE_PPG_CAPTION           100
00020 #define IDD_PROPPAGE_IMAGE              100
00021 #define IDC_IMAGEPATH                   201
00022 #define IDC_AUTOSIZE                    202
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028 #define _APS_NEXT_RESOURCE_VALUE        201
00029 #define _APS_NEXT_COMMAND_VALUE         32768
00030 #define _APS_NEXT_CONTROL_VALUE         203
00031 #define _APS_NEXT_SYMED_VALUE           101
00032 #endif
00033 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/StdAfx.cpp Source File

  • vc2008fp
  • Slider

StdAfx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  Slider.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005
00006 #include "stdafx.h"
00007
00008
00009
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/PropertiesViewBar.h Source File

  • vc2008fp
  • VisualStudioDemo

PropertiesViewBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CPropertiesToolBar : public CMFCToolBar
00013 {
00014 public:
00015   virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
00016   {
00017     CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
00018   }
00019
00020   virtual BOOL AllowShowOnList() const { return FALSE; }
00021 };
00022
00023 class CPropertiesViewBar : public CDockablePane
00024 {
00025 // Construction
00026 public:
00027   CPropertiesViewBar();
00028
00029   void AdjustLayout();
00030
00031 // Attributes
00032 public:
00033   void SetVSDotNetLook(BOOL bSet)
00034   {
00035     m_wndPropList.SetVSDotNetLook(bSet);
00036     m_wndPropList.SetGroupNameFullWidth(bSet);
00037   }
00038
00039   void OnChangeVisualStyle();
00040
00041 protected:
00042   CComboBox m_wndObjectCombo;
00043   CPropertiesToolBar m_wndToolBar;
00044   CMFCPropertyGridCtrl m_wndPropList;
00045   CFont m_fntPropList;
00046
00047 // Implementation
00048 public:
00049   virtual ~CPropertiesViewBar();
00050
00051 protected:
00052   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00053   afx_msg void OnSize(UINT nType, int cx, int cy);
00054   afx_msg void OnSortingprop();
00055   afx_msg void OnUpdateSortingprop(CCmdUI* pCmdUI);
00056   afx_msg void OnProperies1();
00057   afx_msg void OnUpdateProperies1(CCmdUI* pCmdUI);
00058   afx_msg void OnProperies2();
00059   afx_msg void OnUpdateProperies2(CCmdUI* pCmdUI);
00060   afx_msg void OnExpand();
00061   afx_msg void OnUpdateExpand(CCmdUI* pCmdUI);
00062   afx_msg void OnSetFocus(CWnd* pOldWnd);
00063   afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
00064
00065   DECLARE_MESSAGE_MAP()
00066
00067   void InitPropList();
00068   void SetPropListFont();
00069 };
00070
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stdafx.h Source File

  • general
  • propdlg

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions (including VB)
00018
00019 #ifndef _AFX_NO_AFXCMN_SUPPORT
00020 #include <afxcmn.h>         // MFC support for Windows 95 Common Controls
00021 #endif // _AFX_NO_AFXCMN_SUPPORT
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circctl.cpp Source File

  • controls
  • circ

circctl.cpp

Go to the documentation of this file.
00001 // circctl.cpp : Implementation of the CCircCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "circ.h"
00014 #include "circctl.h"
00015 #include "circppg.h"
00016 #include <msstkppg.h>
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023
00024 IMPLEMENT_DYNCREATE(CCircCtrl, COleControl)
00025
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // Message map
00029
00030 BEGIN_MESSAGE_MAP(CCircCtrl, COleControl)
00031   //{{AFX_MSG_MAP(CCircCtrl)
00032   ON_WM_LBUTTONDOWN()
00033   ON_WM_LBUTTONDBLCLK()
00034   ON_WM_LBUTTONUP()
00035   ON_WM_SIZE()
00036   //}}AFX_MSG_MAP
00037   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00038 END_MESSAGE_MAP()
00039
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // Dispatch map
00043
00044 BEGIN_DISPATCH_MAP(CCircCtrl, COleControl)
00045   //{{AFX_DISPATCH_MAP(CCircCtrl)
00046   DISP_PROPERTY_NOTIFY(CCircCtrl, "CircleShape", m_circleShape, OnCircleShapeChanged, VT_BOOL)
00047   DISP_PROPERTY_NOTIFY(CCircCtrl, "FlashColor", m_flashColor, OnFlashColorChanged, VT_COLOR)
00048   DISP_PROPERTY_EX(CCircCtrl, "CircleOffset", GetCircleOffset, SetCircleOffset, VT_I2)
00049   DISP_PROPERTY_EX(CCircCtrl, "Note", GetNote, SetNote, VT_BSTR)
00050   DISP_STOCKPROP_BACKCOLOR()
00051   DISP_STOCKPROP_CAPTION()
00052   DISP_STOCKPROP_FONT()
00053   DISP_STOCKPROP_FORECOLOR()
00054   //}}AFX_DISPATCH_MAP
00055   DISP_FUNCTION_ID(CCircCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00056 END_DISPATCH_MAP()
00057
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // Event map
00061
00062 BEGIN_EVENT_MAP(CCircCtrl, COleControl)
00063   //{{AFX_EVENT_MAP(CCircCtrl)
00064   EVENT_CUSTOM("ClickIn", FireClickIn, VTS_XPOS_PIXELS  VTS_YPOS_PIXELS)
00065   EVENT_CUSTOM("ClickOut", FireClickOut, VTS_NONE)
00066   //}}AFX_EVENT_MAP
00067 END_EVENT_MAP()
00068
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // Property pages
00072
00073 // TODO: Add more property pages as needed.  Remember to increase the count!
00074 BEGIN_PROPPAGEIDS(CCircCtrl, 3)
00075   PROPPAGEID(CCircPropPage::guid)
00076   PROPPAGEID(CLSID_StockColorPage)
00077   PROPPAGEID(CLSID_StockFontPage)
00078 END_PROPPAGEIDS(CCircCtrl)
00079
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // Initialize class factory and guid
00083
00084 IMPLEMENT_OLECREATE_EX(CCircCtrl, "CIRC.CircCtrl.1",
00085   0x9dbafccf, 0x592f, 0x101b, 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b)
00086
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // Type library ID and version
00090
00091 IMPLEMENT_OLETYPELIB(CCircCtrl, _tlid, _wVerMajor, _wVerMinor)
00092
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // Interface IDs
00096
00097 const IID BASED_CODE IID_DCirc =
00098     { 0x9dbafcd0, 0x592f, 0x101b, { 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b } };
00099 const IID BASED_CODE IID_DCircEvents =
00100     { 0x9dbafcd1, 0x592f, 0x101b, { 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b } };
00101
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // Control type information
00105
00106 static const DWORD BASED_CODE _dwCircOleMisc =
00107   OLEMISC_ACTIVATEWHENVISIBLE |
00108   OLEMISC_SETCLIENTSITEFIRST |
00109   OLEMISC_INSIDEOUT |
00110   OLEMISC_CANTLINKINSIDE |
00111   OLEMISC_RECOMPOSEONRESIZE;
00112
00113 IMPLEMENT_OLECTLTYPE(CCircCtrl, IDS_CIRC, _dwCircOleMisc)
00114
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // CCircCtrl::CCircCtrlFactory::UpdateRegistry -
00118 // Adds or removes system registry entries for CCircCtrl
00119
00120 BOOL CCircCtrl::CCircCtrlFactory::UpdateRegistry(BOOL bRegister)
00121 {
00122   if (bRegister)
00123     return AfxOleRegisterControlClass(
00124       AfxGetInstanceHandle(),
00125       m_clsid,
00126       m_lpszProgID,
00127       IDS_CIRC,
00128       IDB_CIRC,
00129       FALSE,                      //  Not insertable
00130       _dwCircOleMisc,
00131       _tlid,
00132       _wVerMajor,
00133       _wVerMinor);
00134   else
00135     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00136 }
00137
00138
00139 /////////////////////////////////////////////////////////////////////////////
00140 // CCircCtrl::CCircCtrl - Constructor
00141
00142 CCircCtrl::CCircCtrl()
00143 {
00144   InitializeIIDs(&IID_DCirc, &IID_DCircEvents);
00145
00146   // TODO: Initialize your control's instance data here.
00147 }
00148
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CCircCtrl::~CCircCtrl - Destructor
00152
00153 CCircCtrl::~CCircCtrl()
00154 {
00155   // TODO: Cleanup your control's instance data here.
00156 }
00157
00158
00159 /////////////////////////////////////////////////////////////////////////////
00160 // CCircCtrl::OnDraw - Drawing function
00161
00162 void CCircCtrl::OnDraw(
00163       CDC* pdc, const CRect& rcBounds, const CRect&)
00164 {
00165   CBrush* pOldBrush;
00166   CBrush bkBrush(TranslateColor(GetBackColor()));
00167   CPen* pOldPen;
00168   CRect rc = rcBounds;
00169   CFont* pOldFont;
00170   TEXTMETRIC tm;
00171   const CString& strCaption = InternalGetText();
00172
00173   // Set the ForeColor property color and transparent background mode into the device context
00174   pdc->SetTextColor(TranslateColor(GetForeColor()));
00175   pdc->SetBkMode(TRANSPARENT);
00176
00177   // Paint the background using the BackColor property
00178   pdc->FillRect(rcBounds, &bkBrush);
00179
00180   // Draw the ellipse using the BackColor property and a black pen
00181   GetDrawRect(&rc);
00182   pOldBrush = pdc->SelectObject(&bkBrush);
00183   pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
00184   pdc->Ellipse(rc);
00185
00186   // Draw the caption and note using the stock Font and ForeColor properties
00187   pOldFont = SelectStockFont(pdc);
00188   GetStockTextMetrics(&tm);
00189
00190   pdc->SetTextAlign(TA_CENTER | TA_TOP);
00191   pdc->ExtTextOut((rc.left + rc.right) / 2, (rc.top + rc.bottom - tm.tmHeight) / 2,
00192     ETO_CLIPPED, rc, strCaption, strCaption.GetLength(), NULL);
00193   pdc->SetTextAlign(TA_LEFT | TA_TOP);
00194   pdc->ExtTextOut(rcBounds.left, rcBounds.top,
00195     ETO_CLIPPED, rcBounds, m_note, m_note.GetLength(), NULL);
00196   pdc->SelectObject(pOldFont);
00197
00198   pdc->SelectObject(pOldPen);
00199   pdc->SelectObject(pOldBrush);
00200 }
00201
00202
00203 /////////////////////////////////////////////////////////////////////////////
00204 // CCircCtrl::DoPropExchange - Persistence support
00205
00206 void CCircCtrl::DoPropExchange(CPropExchange* pPX)
00207 {
00208   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00209   COleControl::DoPropExchange(pPX);
00210
00211   if (pPX->GetVersion() == (DWORD)MAKELONG(_wVerMinor, _wVerMajor))
00212   {
00213     PX_Bool(pPX, _T("CircleShape"), m_circleShape, TRUE);
00214     PX_Short(pPX, _T("CircleOffset"), m_circleOffset, 0);
00215     PX_Long(pPX, _T("FlashColor"), (long &)m_flashColor, RGB(0xFF, 0x00, 0x00));
00216     PX_String(pPX, _T("Note"), m_note, _T(""));
00217   }
00218   else if (pPX->IsLoading())
00219   {
00220     // Skip over persistent data
00221     BOOL bDummy;
00222     short sDummy;
00223     long lDummy;
00224     CString strDummy;
00225     PX_Bool(pPX, _T("CircleShape"), bDummy, FALSE);
00226     PX_Short(pPX, _T("CircleOffset"), sDummy, 0);
00227     PX_Long(pPX, _T("FlashColor"), lDummy, 0);
00228     PX_String(pPX, _T("Note"), strDummy, _T(""));
00229
00230     // Force property values to these defaults
00231     m_circleShape = TRUE;
00232     m_circleOffset = 0;
00233     m_flashColor = RGB(0xFF, 0x00, 0x00);
00234     m_note = _T("");
00235   }
00236 }
00237
00238
00239 /////////////////////////////////////////////////////////////////////////////
00240 // CCircCtrl::OnResetState - Reset control to default state
00241
00242 void CCircCtrl::OnResetState()
00243 {
00244   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00245
00246   // TODO: Reset any other control state here.
00247 }
00248
00249
00250 /////////////////////////////////////////////////////////////////////////////
00251 // CCircCtrl::AboutBox - Display an "About" box to the user
00252
00253 void CCircCtrl::AboutBox()
00254 {
00255   CDialog dlgAbout(IDD_ABOUTBOX_CIRC);
00256   dlgAbout.DoModal();
00257 }
00258
00259
00260 /////////////////////////////////////////////////////////////////////////////
00261 // CCircCtrl message handlers
00262
00263
00264 void CCircCtrl::OnCircleShapeChanged()
00265 {
00266   SetModifiedFlag();
00267
00268   // force the control to redraw itself
00269   InvalidateControl();
00270
00271   // reset the circle offset, if necessary
00272   if (m_circleShape)
00273     SetCircleOffset(0);
00274 }
00275
00276
00277 void CCircCtrl::GetDrawRect(CRect* rc)
00278 {
00279   if (m_circleShape)
00280   {
00281     int cx = rc->right - rc->left;
00282     int cy = rc->bottom - rc->top;
00283
00284     if (cx > cy)
00285     {
00286       rc->left += (cx - cy) / 2;
00287       rc->right = rc->left + cy;
00288
00289       // offset circle in bounding rect
00290       rc->left += m_circleOffset;
00291       rc->right += m_circleOffset;
00292     }
00293     else
00294     {
00295       rc->top += (cy - cx) / 2;
00296       rc->bottom = rc->top + cx;
00297
00298       // offset circle in bounding rect
00299       rc->bottom -= m_circleOffset;
00300       rc->top -= m_circleOffset;
00301     }
00302   }
00303 }
00304
00305
00306 short CCircCtrl::GetCircleOffset()
00307 {
00308   return m_circleOffset;
00309 }
00310
00311
00312 void CCircCtrl::SetCircleOffset(short nNewValue)
00313 {
00314   // Validate the specified offset value
00315   if ((m_circleOffset != nNewValue) && m_circleShape && InBounds(nNewValue))
00316   {
00317     m_circleOffset = nNewValue;
00318     SetModifiedFlag();
00319     InvalidateControl();
00320   }
00321 }
00322
00323
00324 BOOL CCircCtrl::InBounds(short nOffset)
00325 {
00326   int diameter;
00327   int length;
00328   int cx;
00329   int cy;
00330
00331   GetControlSize(&cx, &cy);
00332
00333   if (cx > cy)
00334   {
00335     length = cx;
00336     diameter = cy;
00337   }
00338   else
00339   {
00340     length = cy;
00341     diameter = cx;
00342   }
00343   if (nOffset < 0)
00344     nOffset = (short) -nOffset;
00345   return (diameter / 2 + nOffset) <= (length / 2);
00346 }
00347
00348
00349 void CCircCtrl::OnLButtonDown(UINT nFlags, CPoint point)
00350 {
00351   CDC* pdc;
00352
00353   // Flash the color of the control if within the ellipse.
00354   if (InCircle(point))
00355   {
00356     pdc = GetDC();
00357     FlashColor(pdc);
00358     ReleaseDC(pdc);
00359
00360     // Fire the ClickIn event
00361     FireClickIn(point.x, point.y);
00362   }
00363   else
00364     // Fire the ClickOut event
00365     FireClickOut();
00366
00367   COleControl::OnLButtonDown(nFlags, point);
00368 }
00369
00370
00371 void CCircCtrl::OnLButtonDblClk(UINT nFlags, CPoint point)
00372 {
00373   CDC* pdc;
00374
00375   // Flash the color of the control if within the ellipse.
00376   if (InCircle(point))
00377   {
00378     pdc = GetDC();
00379     FlashColor(pdc);
00380     ReleaseDC(pdc);
00381   }
00382
00383   COleControl::OnLButtonDblClk(nFlags, point);
00384 }
00385
00386
00387 void CCircCtrl::OnLButtonUp(UINT nFlags, CPoint point)
00388 {
00389   // Redraw the control.
00390   if (InCircle(point))
00391     InvalidateControl();
00392
00393   COleControl::OnLButtonUp(nFlags, point);
00394 }
00395
00396
00397 BOOL CCircCtrl::InCircle(CPoint& point)
00398 {
00399   CRect rc;
00400   GetClientRect(rc);
00401   GetDrawRect(&rc);
00402
00403   // Determine radii
00404   double a = (rc.right - rc.left) / 2;
00405   double b = (rc.bottom - rc.top) / 2;
00406
00407   // Determine x, y
00408   double x = point.x - (rc.left + rc.right) / 2;
00409   double y = point.y - (rc.top + rc.bottom) / 2;
00410
00411   // Apply ellipse formula
00412   return ((x * x) / (a * a) + (y * y) / (b * b) <= 1);
00413 }
00414
00415
00416 void CCircCtrl::FlashColor(CDC* pdc)
00417 {
00418   CBrush* pOldBrush;
00419   CBrush flashBrush(TranslateColor(m_flashColor));
00420   CPen* pOldPen;
00421   CRect rc;
00422
00423   GetClientRect(rc);
00424   GetDrawRect(&rc);
00425   pOldBrush = pdc->SelectObject(&flashBrush);
00426   pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
00427   pdc->Ellipse(rc);
00428   pdc->SelectObject(pOldPen);
00429   pdc->SelectObject(pOldBrush);
00430 }
00431
00432
00433 BOOL CCircCtrl::OnMapPropertyToPage(DISPID dispid, LPCLSID lpclsid,
00434   BOOL* pbPageOptional)
00435 {
00436   switch(dispid)
00437   {
00438     case dispidFlashColor:
00439       *lpclsid = CLSID_CColorPropPage;
00440       *pbPageOptional = TRUE;
00441       return TRUE;
00442   }
00443   return COleControl::OnMapPropertyToPage(dispid, lpclsid, pbPageOptional);
00444 }
00445
00446
00447 BSTR CCircCtrl::GetNote()
00448 {
00449   return m_note.AllocSysString();
00450 }
00451
00452
00453 void CCircCtrl::SetNote(LPCTSTR lpszNewValue)
00454 {
00455   if (m_note != lpszNewValue)
00456   {
00457     m_note = lpszNewValue;
00458     SetModifiedFlag();
00459     InvalidateControl();
00460     BoundPropertyChanged(dispidNote);
00461   }
00462 }
00463
00464 void CCircCtrl::OnSize(UINT nType, int cx, int cy)
00465 {
00466   COleControl::OnSize(nType, cx, cy);
00467
00468   // If circle shape is true & cicrle does not fit in new size, reset the offset
00469   if (m_circleShape && !InBounds(GetCircleOffset()))
00470     SetCircleOffset(0);
00471
00472 }
00473
00474 void CCircCtrl::OnFlashColorChanged()
00475 {
00476   // TODO: Add notification handler code
00477
00478   SetModifiedFlag();
00479 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMToolBar Member List

This is the complete list of members for CMSMToolBar, including all inherited members.
CMSMToolBar() | CMSMToolBar |
DrawButton(CDC *pDC, CMFCToolBarButton *pButton, CMFCToolBarImages *pImages, BOOL bHighlighted, BOOL bDrawDisabledImages) | CMSMToolBar | [protected, virtual]
LoadToolBar(UINT uiResID, UINT uiColdResID=0, UINT uiMenuResID=0, BOOL bLocked=FALSE, UINT uiDisabledResID=0, UINT uiMenuDisabledResID=0, UINT uiHotResID=0, UINT uiPressedResID=0) | CMSMToolBar | [virtual]
m_PressedImages | CMSMToolBar | [protected, static]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMSMToolBar | [protected]
OnSysColorChange() | CMSMToolBar | [protected]
~CMSMToolBar() | CMSMToolBar | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSplashWnd Member List

This is the complete list of members for CSplashWnd, including all inherited members.
Create(CWnd *pParent) | CSplashWnd |
Create(CWnd *pParent=NULL) | CSplashWnd |
Create(CWnd *pParent) | CSplashWnd |
DoDataExchange(CDataExchange *pDX) | CSplashWnd | [protected, virtual]
IDD enum value | CSplashWnd |
m_font | CSplashWnd | [protected]
m_icon | CSplashWnd | [protected]
OnInitDialog() | CSplashWnd | [protected, virtual]
OnInitDialog() | CSplashWnd | [protected, virtual]
OnInitDialog() | CSplashWnd | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMDialog.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMDialog.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMDialog.h : header file
00013 //
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CMSMDialog dialog
00017
00018 class CMSMDialog : public CDialogEx
00019 {
00020   DECLARE_DYNAMIC(CMSMDialog)
00021
00022 // Construction
00023 public:
00024   CMSMDialog();
00025   CMSMDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
00026   CMSMDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd = NULL);
00027
00028 // Implementation
00029 protected:
00030   void CommonConstruct ();
00031
00032   DECLARE_MESSAGE_MAP()
00033 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/StdAfx.cpp Source File

  • vc2008fp
  • OwnerDrawMenu

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  OwnerDrawMenu.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFileNewDialog Member List

This is the complete list of members for CFileNewDialog, including all inherited members.
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CFileNewDialog(CWnd *pParent=NULL) | CFileNewDialog |
CFileNewDialog(CWnd *pParent=NULL) | CFileNewDialog |
DoDataExchange(CDataExchange *pDX) | CFileNewDialog | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CFileNewDialog | [protected, virtual]
GetHelpIDs() | CFileNewDialog | [inline, protected, virtual]
GetHelpIDs() | CFileNewDialog | [inline, protected, virtual]
IDD enum value | CFileNewDialog |
m_listbox | CFileNewDialog |
m_nHelpIDs | CFileNewDialog | [protected, static]
m_nSel | CFileNewDialog |
OnDblclkDatedialogList() | CFileNewDialog | [protected]
OnDblclkDatedialogList() | CFileNewDialog | [protected]
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnInitDialog() | CFileNewDialog | [protected, virtual]
OnInitDialog() | CFileNewDialog | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExcepInf.Cpp Source File

  • ole
  • TstCon

ExcepInf.Cpp

Go to the documentation of this file.
00001 // File: ExcepInf.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 CExcepInfo::CExcepInfo()
00020 {
00021    memset( this, 0, sizeof( *this ) );
00022 }
00023
00024 CExcepInfo::~CExcepInfo()
00025 {
00026    Clear();
00027 }
00028
00029 void CExcepInfo::Clear()
00030 {
00031    if( bstrSource != NULL )
00032    {
00033     ::SysFreeString( bstrSource );
00034    }
00035    if( bstrDescription != NULL )
00036    {
00037     ::SysFreeString( bstrDescription );
00038    }
00039    if( bstrHelpFile != NULL )
00040    {
00041     ::SysFreeString( bstrHelpFile );
00042    }
00043
00044    memset( this, 0, sizeof( *this ) );
00045 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CClikPoint Member List

This is the complete list of members for CClikPoint, including all inherited members.
GetX() | CClikPoint
GetX() | CClikPoint
GetY() | CClikPoint
GetY() | CClikPoint
SetX(short) | CClikPoint
SetX(short) | CClikPoint
SetY(short) | CClikPoint
SetY(short) | CClikPoint
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutputWindowView Member List

This is the complete list of members for COutputWindowView, including all inherited members.
COutputWindowView() | COutputWindowView | [protected]
m_font | COutputWindowView | [protected]
OnClear() | COutputWindowView | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | COutputWindowView | [protected]
OnCopy() | COutputWindowView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | COutputWindowView | [protected]
OnDraw(CDC *pDC) | COutputWindowView | [protected, virtual]
~COutputWindowView() | COutputWindowView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/resource.h Source File

  • internet
  • DHtmlExplore

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DHtmlExplore.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_DHTMLEXPLORE_DIALOG         102
00009 #define IDR_MAINFRAME                   128
00010 #define IDR_EXPLORE                     129
00011 #define IDR_CONTEXT_MENU                132
00012 #define IDD_PROPERTIES                  133
00013 #define IDR_PROPERTIES                  134
00014 #define ID_CONTEXT_BROWSE               32771
00015 #define ID_CONTEXT_EXIT                 32773
00016 #define ID_CONTEXT_PROPERTIES           32774
00017
00018 // Next default values for new objects
00019 //
00020 #ifdef APSTUDIO_INVOKED
00021 #ifndef APSTUDIO_READONLY_SYMBOLS
00022 #define _APS_NEXT_RESOURCE_VALUE        135
00023 #define _APS_NEXT_COMMAND_VALUE         32775
00024 #define _APS_NEXT_CONTROL_VALUE         1000
00025 #define _APS_NEXT_SYMED_VALUE           101
00026 #endif
00027 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSmartTypeAttr Member List

This is the complete list of members for CSmartTypeAttr, including all inherited members.
CSmartTypeAttr(ITypeInfo *pTypeInfo) | CSmartTypeAttr |
m_pTypeAttr | CSmartTypeAttr | [protected]
m_pTypeInfo | CSmartTypeAttr | [protected]
operator&() | CSmartTypeAttr |
operator->() | CSmartTypeAttr |
Release() | CSmartTypeAttr |
~CSmartTypeAttr() | CSmartTypeAttr |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/hlp/popups.h Source File

  • controls
  • testhelp
  • hlp

popups.h

Go to the documentation of this file.
00001 #define IDH_WHATISTHISTHING 18001
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsPages.cpp Source File

  • vc2008fp
  • VisualStudioDemo

OptionsPages.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright(c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OptionsPages.h"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // COptionsPage1 property page
00021
00022 IMPLEMENT_DYNCREATE(COptionsPage1, CMFCPropertyPage)
00023
00024 COptionsPage1::COptionsPage1() : CMFCPropertyPage(COptionsPage1::IDD)
00025 {
00026 }
00027
00028 COptionsPage1::~COptionsPage1()
00029 {
00030 }
00031
00032 void COptionsPage1::DoDataExchange(CDataExchange* pDX)
00033 {
00034   CMFCPropertyPage::DoDataExchange(pDX);
00035 }
00036
00037 BEGIN_MESSAGE_MAP(COptionsPage1, CMFCPropertyPage)
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // COptionsPage12 property page
00042
00043 IMPLEMENT_DYNCREATE(COptionsPage12, CMFCPropertyPage)
00044
00045 COptionsPage12::COptionsPage12() : CMFCPropertyPage(COptionsPage12::IDD)
00046 {
00047 }
00048
00049 COptionsPage12::~COptionsPage12()
00050 {
00051 }
00052
00053 void COptionsPage12::DoDataExchange(CDataExchange* pDX)
00054 {
00055   CMFCPropertyPage::DoDataExchange(pDX);
00056 }
00057
00058 BEGIN_MESSAGE_MAP(COptionsPage12, CMFCPropertyPage)
00059 END_MESSAGE_MAP()
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // COptionsPage21 property page
00063
00064 IMPLEMENT_DYNCREATE(COptionsPage21, CMFCPropertyPage)
00065
00066 COptionsPage21::COptionsPage21() : CMFCPropertyPage(COptionsPage21::IDD)
00067 {
00068 }
00069
00070 COptionsPage21::~COptionsPage21()
00071 {
00072 }
00073
00074 void COptionsPage21::DoDataExchange(CDataExchange* pDX)
00075 {
00076   CMFCPropertyPage::DoDataExchange(pDX);
00077 }
00078
00079 BEGIN_MESSAGE_MAP(COptionsPage21, CMFCPropertyPage)
00080 END_MESSAGE_MAP()
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // COptionsPage22 property page
00084
00085 IMPLEMENT_DYNCREATE(COptionsPage22, CMFCPropertyPage)
00086
00087 COptionsPage22::COptionsPage22() : CMFCPropertyPage(COptionsPage22::IDD)
00088 {
00089 }
00090
00091 COptionsPage22::~COptionsPage22()
00092 {
00093 }
00094
00095 void COptionsPage22::DoDataExchange(CDataExchange* pDX)
00096 {
00097   CMFCPropertyPage::DoDataExchange(pDX);
00098 }
00099
00100 BEGIN_MESSAGE_MAP(COptionsPage22, CMFCPropertyPage)
00101 END_MESSAGE_MAP()
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // COptionsPage31 property page
00105
00106 IMPLEMENT_DYNCREATE(COptionsPage31, CMFCPropertyPage)
00107
00108 COptionsPage31::COptionsPage31() : CMFCPropertyPage(COptionsPage31::IDD)
00109 {
00110 }
00111
00112 COptionsPage31::~COptionsPage31()
00113 {
00114 }
00115
00116 void COptionsPage31::DoDataExchange(CDataExchange* pDX)
00117 {
00118   CMFCPropertyPage::DoDataExchange(pDX);
00119 }
00120
00121 BEGIN_MESSAGE_MAP(COptionsPage31, CMFCPropertyPage)
00122 END_MESSAGE_MAP()
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // COptionsPage32 property page
00126
00127 IMPLEMENT_DYNCREATE(COptionsPage32, CMFCPropertyPage)
00128
00129 COptionsPage32::COptionsPage32() : CMFCPropertyPage(COptionsPage32::IDD)
00130 {
00131 }
00132
00133 COptionsPage32::~COptionsPage32()
00134 {
00135 }
00136
00137 void COptionsPage32::DoDataExchange(CDataExchange* pDX)
00138 {
00139   CMFCPropertyPage::DoDataExchange(pDX);
00140 }
00141
00142 BEGIN_MESSAGE_MAP(COptionsPage32, CMFCPropertyPage)
00143 END_MESSAGE_MAP()
00144
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/resource.h Source File

  • general
  • propdlg

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by propdlg.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define IDR_SHAPESTYPE                  129
00008 #define IDD_STYLE                       130
00009 #define IDD_COLOR                       131
00010 #define IDC_RECTANGLE                   1000
00011 #define IDC_ROUND_RECTANGLE             1001
00012 #define IDC_ELLIPSE                     1002
00013 #define IDC_BLACK                       1004
00014 #define IDC_RED                         1005
00015 #define IDC_GREEN                       1006
00016 #define IDC_BLUE                        1007
00017 #define ID_SIMPLE_PROPERTY_SHEET        32771
00018 #define ID_PROPERTY_SHEET_WITH_PREVIEW  32772
00019 #define ID_MINI_FRAME_PROPERTY_SHEET    32773
00020 #define ID_MINI_FRAME_WITH_PIN_BUTTON   32774
00021 #define ID_CHANGE_OBJECT_PROPS          32775
00022 #define IDS_OBJECT_PROPERTIES           61216
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028 #define _APS_NEXT_RESOURCE_VALUE        132
00029 #define _APS_NEXT_COMMAND_VALUE         32776
00030 #define _APS_NEXT_CONTROL_VALUE         1009
00031 #define _APS_NEXT_SYMED_VALUE           102
00032 #endif
00033 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerView.cpp Source File

  • vc2008fp
  • Explorer

ExplorerView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Explorer.h"
00013
00014 #include "ExplorerDoc.h"
00015 #include "ExplorerView.h"
00016 #include "MainFrm.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CExplorerView
00026
00027 IMPLEMENT_DYNCREATE(CExplorerView, CView)
00028
00029 BEGIN_MESSAGE_MAP(CExplorerView, CView)
00030   ON_WM_CREATE()
00031   ON_WM_SIZE()
00032   ON_COMMAND(ID_VIEW_LARGEICON, OnViewLargeicon)
00033   ON_UPDATE_COMMAND_UI(ID_VIEW_LARGEICON, OnUpdateViewLargeicon)
00034   ON_COMMAND(ID_VIEW_DETAILS, OnViewDetails)
00035   ON_UPDATE_COMMAND_UI(ID_VIEW_DETAILS, OnUpdateViewDetails)
00036   ON_COMMAND(ID_VIEW_LIST, OnViewList)
00037   ON_UPDATE_COMMAND_UI(ID_VIEW_LIST, OnUpdateViewList)
00038   ON_COMMAND(ID_VIEW_SMALLICON, OnViewSmallicon)
00039   ON_UPDATE_COMMAND_UI(ID_VIEW_SMALLICON, OnUpdateViewSmallicon)
00040   ON_WM_ERASEBKGND()
00041   ON_WM_SETFOCUS()
00042   ON_COMMAND(ID_FOLDER_UP, OnFolderUp)
00043   ON_UPDATE_COMMAND_UI(ID_FOLDER_UP, OnUpdateFolderUp)
00044   ON_COMMAND(ID_COPY_TO, OnCopyTo)
00045   ON_COMMAND(ID_MOVE_TO, OnMoveTo)
00046   ON_COMMAND(ID_VIEW_REFRESH, OnViewRefresh)
00047   ON_REGISTERED_MESSAGE(AFX_WM_CHANGE_CURRENT_FOLDER, OnChangeFolder)
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CExplorerView construction/destruction
00052
00053 CExplorerView::CExplorerView()
00054 {
00055 }
00056
00057 CExplorerView::~CExplorerView()
00058 {
00059 }
00060
00061 BOOL CExplorerView::PreCreateWindow(CREATESTRUCT& cs)
00062 {
00063   // TODO: Modify the Window class or styles here by modifying
00064   //  the CREATESTRUCT cs
00065   cs.style &= ~WS_BORDER;
00066   return CView::PreCreateWindow(cs);
00067 }
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CExplorerView drawing
00071
00072 void CExplorerView::OnDraw(CDC* /*pDC*/)
00073 {
00074 }
00075
00076 void CExplorerView::OnInitialUpdate()
00077 {
00078   CView::OnInitialUpdate();
00079   OnChangeFolder (0, 0);  // To update mainframe's address bar
00080 }
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CExplorerView diagnostics
00084
00085 #ifdef _DEBUG
00086 void CExplorerView::AssertValid() const
00087 {
00088   CView::AssertValid();
00089 }
00090
00091 void CExplorerView::Dump(CDumpContext& dc) const
00092 {
00093   CView::Dump(dc);
00094 }
00095
00096 CExplorerDoc* CExplorerView::GetDocument() // non-debug version is inline
00097 {
00098   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CExplorerDoc)));
00099   return (CExplorerDoc*)m_pDocument;
00100 }
00101 #endif //_DEBUG
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // CExplorerView message handlers
00105
00106 int CExplorerView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00107 {
00108   if (CView::OnCreate(lpCreateStruct) == -1)
00109     return -1;
00110
00111   CRect rectDummy (0, 0, 0, 0);
00112   m_wndList.Create (WS_CHILD | WS_VISIBLE | LVS_REPORT, rectDummy, this, 1);
00113
00114   return 0;
00115 }
00116
00117 void CExplorerView::OnSize(UINT nType, int cx, int cy)
00118 {
00119   CView::OnSize(nType, cx, cy);
00120   m_wndList.SetWindowPos (NULL, -1, -1, cx, cy, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
00121 }
00122
00123 void CExplorerView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
00124 {
00125   if (bActivate && AfxGetMainWnd () != NULL)
00126   {
00127     ((CMainFrame*) AfxGetMainWnd ())->GetFolders ().SetRelatedList (&m_wndList);
00128   }
00129
00130   CView::OnActivateView(bActivate, pActivateView, pDeactiveView);
00131 }
00132
00133 void CExplorerView::OnViewLargeicon()
00134 {
00135   m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_ICON);
00136 }
00137
00138 void CExplorerView::OnUpdateViewLargeicon(CCmdUI* pCmdUI)
00139 {
00140   pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_ICON);
00141 }
00142
00143 void CExplorerView::OnViewDetails()
00144 {
00145   m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_REPORT);
00146 }
00147
00148 void CExplorerView::OnUpdateViewDetails(CCmdUI* pCmdUI)
00149 {
00150   pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_REPORT);
00151 }
00152
00153 void CExplorerView::OnViewList()
00154 {
00155   m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_LIST);
00156 }
00157
00158 void CExplorerView::OnUpdateViewList(CCmdUI* pCmdUI)
00159 {
00160   pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_LIST);
00161 }
00162
00163 void CExplorerView::OnViewSmallicon()
00164 {
00165   m_wndList.ModifyStyle(LVS_TYPEMASK, LVS_SMALLICON);
00166 }
00167
00168 void CExplorerView::OnUpdateViewSmallicon(CCmdUI* pCmdUI)
00169 {
00170   pCmdUI->SetRadio ((m_wndList.GetStyle () & LVS_TYPEMASK) == LVS_SMALLICON);
00171 }
00172
00173 BOOL CExplorerView::OnEraseBkgnd(CDC* /*pDC*/)
00174 {
00175   return TRUE;
00176 }
00177
00178 void CExplorerView::OnSetFocus(CWnd* pOldWnd)
00179 {
00180   CView::OnSetFocus(pOldWnd);
00181   m_wndList.SetFocus ();
00182 }
00183
00184 LRESULT CExplorerView::OnChangeFolder(WPARAM,LPARAM)
00185 {
00186   CString strPath;
00187   if (!m_wndList.GetCurrentFolder (strPath) &&
00188     !m_wndList.GetCurrentFolderName (strPath))
00189   {
00190     strPath = _T("????");
00191   }
00192
00193   if (AfxGetMainWnd () != NULL)
00194   {
00195     ((CMainFrame*) AfxGetMainWnd ())->SetCurrFolder (strPath);
00196   }
00197
00198   return 0;
00199 }
00200
00201 void CExplorerView::OnFolderUp()
00202 {
00203   m_wndList.DisplayParentFolder ();
00204   ((CMainFrame*) AfxGetMainWnd ())->GetFolders ().SetFocus();
00205 }
00206
00207 void CExplorerView::OnUpdateFolderUp(CCmdUI* pCmdUI)
00208 {
00209   pCmdUI->Enable (!m_wndList.IsDesktop ());
00210 }
00211
00212 void CExplorerView::OnCopyTo()
00213 {
00214   CString strPath;
00215   if (m_wndList.GetCurrentFolder (strPath) &&
00216     theApp.GetShellManager ()->BrowseForFolder (strPath,
00217       this, strPath, _T("Copy the selected item(s) to the folder:")))
00218   {
00219     MessageBox (CString (_T("The selected path is: ")) + strPath);
00220   }
00221 }
00222
00223 void CExplorerView::OnMoveTo()
00224 {
00225   CString strPath;
00226   if (m_wndList.GetCurrentFolder (strPath) &&
00227     theApp.GetShellManager ()->BrowseForFolder (strPath,
00228       this, strPath, _T("Move the selected item(s) to the folder:")))
00229   {
00230     MessageBox (CString (_T("The selected path is: ")) + strPath);
00231   }
00232 }
00233
00234 void CExplorerView::OnViewRefresh()
00235 {
00236   m_wndList.Refresh ();
00237 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/stdafx.cpp Source File

  • advanced
  • mtmdi

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svritem.cpp Source File

  • ole
  • hiersvr

svritem.cpp

Go to the documentation of this file.
00001 // svritem.cpp : implementation of the CServerNode class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include <afxpriv.h>    // for CSharedFile
00015 #include <malloc.h>     // for _alloca
00016
00017 #include "hiersvr.h"
00018 #include "svritem.h"
00019 #include "svrdoc.h"
00020 #include "svrview.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // Local dialogs used for implementation
00029
00030 class CChangeNameDlg : public CDialog
00031 {
00032 // Construction
00033 public:
00034   CChangeNameDlg(CWnd* pParent = NULL);
00035
00036 // Dialog Data
00037   //{{AFX_DATA(CChangeNameDlg)
00038   enum { IDD = IDD_CHANGE_NAME };
00039   int     m_shape;
00040   CString m_strDescription;
00041   CString m_strLinkKey;
00042   CEdit   m_editDescription;
00043   CButton m_btnOK;
00044   //}}AFX_DATA
00045
00046 // Implementation
00047 protected:
00048   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00049   virtual BOOL OnInitDialog();
00050   // Generated message map functions
00051   //{{AFX_MSG(CChangeNameDlg)
00052   afx_msg void OnChange();
00053   //}}AFX_MSG
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 class CAddNodeDlg : public CDialog
00058 {
00059 // Construction
00060 public:
00061   CAddNodeDlg(CWnd* pParent = NULL);  // standard constructor
00062
00063 // Dialog Data
00064   //{{AFX_DATA(CAddNodeDlg)
00065   enum { IDD = IDD_ADD_NODE };
00066   CString m_strDescription;
00067   CString m_strLinkKey;
00068   int     m_shape;
00069   CEdit   m_editDescription;
00070   CButton m_btnOK;
00071   //}}AFX_DATA
00072
00073 // Implementation
00074 protected:
00075   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00076   virtual BOOL OnInitDialog();
00077
00078   // Generated message map functions
00079   //{{AFX_MSG(CAddNodeDlg)
00080   afx_msg void OnChange();
00081   //}}AFX_MSG
00082   DECLARE_MESSAGE_MAP()
00083 };
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CServerNode
00087
00088 IMPLEMENT_SERIAL(CServerNode, CObject, 0);
00089
00090 CServerNode::CServerNode(CServerDoc* pServerDoc)
00091 {
00092   m_shape = shapeRect;
00093   m_bHideChildren = FALSE;
00094   m_pDocument = pServerDoc;
00095
00096   m_pServerItem = NULL;   // will get connected if need be
00097 }
00098
00099 // Special "new" operator for root node
00100 CServerNode* CServerNode::CreateRootNode(CServerDoc* pDoc)
00101 {
00102   CServerNode* pRoot = NULL;
00103   TRY
00104   {
00105     pRoot = new CServerNode(pDoc);
00106     pRoot->InitRootNode();
00107   }
00108   CATCH(CException, e)
00109   {
00110     delete pRoot;
00111     pRoot = NULL;
00112   }
00113   END_CATCH
00114
00115   return pRoot;
00116 }
00117
00118 // Special constructor for root node
00119 void CServerNode::InitRootNode()
00120 {
00121   DeleteChildNodes(); // initalized root node has no children
00122
00123   m_strDescription = "Root node";
00124   m_strLinkKey = "%ROOT%";    // link name for root
00125   UpdateItemName();
00126 }
00127
00128 BOOL CServerNode::FindAndDelete(CServerNode* pNode)
00129 {
00130   POSITION pos = m_listChild.GetHeadPosition();
00131   while (pos != NULL)
00132   {
00133     POSITION posPrev = pos;
00134     CServerNode *pChild = (CServerNode*)m_listChild.GetNext(pos);
00135     if (pChild == pNode)
00136     {
00137       m_listChild.RemoveAt(posPrev);
00138       delete pNode;
00139       return TRUE;
00140     }
00141     if (pChild->FindAndDelete(pNode) == TRUE)
00142       return TRUE;
00143   }
00144   return FALSE;
00145 }
00146
00147 CServerNode* CServerNode::FindNode(LPCTSTR pszItemName)
00148 {
00149   // return this node if it matches!
00150   if (GetItemName() == pszItemName)
00151     return this;
00152
00153   POSITION pos = m_listChild.GetHeadPosition();
00154   while (pos != NULL)
00155   {
00156     CServerNode* pChild = (CServerNode*)m_listChild.GetNext(pos);
00157     if (pChild->GetItemName() == pszItemName)
00158       return pChild;
00159
00160     // recurse down the tree
00161     pChild = pChild->FindNode(pszItemName);
00162     if (pChild != NULL)
00163       return pChild;
00164   }
00165   return NULL;
00166 }
00167
00168 void CServerNode::DeleteChildNodes()
00169 {
00170   // delete child nodes
00171   POSITION pos = m_listChild.GetHeadPosition();
00172   while (pos != NULL)
00173     delete m_listChild.GetNext(pos);
00174   m_listChild.RemoveAll();
00175 }
00176
00177 CServerNode::~CServerNode()
00178 {
00179   // if we are the root of a document, clear it
00180   if (GetDocument()->m_pRoot == this)
00181     GetDocument()->m_pRoot = NULL;
00182
00183   // if we are attached to a server item, detach from it
00184   if (m_pServerItem != NULL)
00185   {
00186     CServerItem* pItem = m_pServerItem;
00187     m_pServerItem = NULL;
00188     delete pItem;
00189   }
00190
00191   // delete all of the child nodes of this node
00192   DeleteChildNodes();
00193 }
00194
00195 BOOL CServerNode::IsChild(const CServerNode* pPotentialChild) const
00196 {
00197   if (pPotentialChild == this)
00198     return TRUE;
00199   POSITION pos = m_listChild.GetHeadPosition();
00200   while (pos != NULL)
00201   {
00202     CServerNode* pNode = (CServerNode*)m_listChild.GetNext(pos);
00203     if (pNode->IsChild(pPotentialChild))
00204       return TRUE;
00205   }
00206   return FALSE;
00207 }
00208
00209 /////////////////////////////////////////////////////////////////////////////
00210 // CServerNode bounding rect helpers
00211
00212 #define CX_INSET    4
00213 #define CY_INSET    2
00214
00215 // calc node size for arbitrary dc and return
00216 //  (result is in logical units for the given DC)
00217 void CServerNode::CalcNodeSize(CDC* pDC, CSize& sizeNode)
00218 {
00219   ENSURE(pDC != NULL);
00220   sizeNode = pDC->GetTextExtent(m_strDescription, m_strDescription.GetLength());
00221   sizeNode += CSize(CX_INSET * 2, CY_INSET * 2);
00222 }
00223
00224 // calculate bounding rect using pointer to member for each node
00225 void CServerNode::CalcBounding(CDC* pDC, CPoint& ptStart, CSize& sizeMax)
00226 {
00227   ASSERT(sizeMax.cx >= 0 && sizeMax.cy >= 0);
00228   ASSERT(ptStart.x >= 0 && ptStart.y >= 0);
00229
00230   CSize sizeNode;
00231   CalcNodeSize(pDC, sizeNode);
00232
00233   ptStart.y += sizeNode.cy + CY_SEPARATOR;
00234   if (ptStart.y > sizeMax.cy)
00235     sizeMax.cy = ptStart.y;
00236
00237   if (ptStart.x + sizeNode.cx > sizeMax.cx)
00238     sizeMax.cx = ptStart.x + sizeNode.cx;
00239   ptStart.x += CX_INDENT;
00240   // add in the kids
00241   if (!m_bHideChildren)
00242   {
00243     POSITION pos = m_listChild.GetHeadPosition();
00244     while (pos != NULL)
00245     {
00246       CServerNode* pNode = (CServerNode*)m_listChild.GetNext(pos);
00247       pNode->CalcBounding(pDC, ptStart, sizeMax);
00248     }
00249   }
00250   ptStart.x -= CX_INDENT;
00251 }
00252
00253 /////////////////////////////////////////////////////////////////////////////
00254 // CServerNode drawing helpers
00255
00256 BOOL CServerNode::Draw(CDC* pDC, CPoint pt, BOOL bSelected, CSize sizeNode)
00257 {
00258   CRect rect(pt, sizeNode);
00259   if (!pDC->RectVisible(&rect))
00260     return TRUE;
00261
00262   // draw a the bounding shape
00263   BOOL bOK = TRUE;
00264
00265   CPen* pOldPen = NULL;
00266   CPen penHilite;
00267   int nPenStyle = (m_bHideChildren) ? PS_DASH : PS_SOLID;
00268   COLORREF crPen = (bSelected) ? RGB(255,0,0) : RGB(0,0,0);
00269   if (penHilite.CreatePen(nPenStyle, 0, crPen))
00270     pOldPen = pDC->SelectObject(&penHilite);
00271
00272   switch (m_shape)
00273   {
00274   case shapeRect:
00275     bOK = pDC->Rectangle(rect);
00276     break;
00277   case shapeRound:
00278     bOK = pDC->RoundRect(rect, CPoint(7, 7));
00279     break;
00280   case shapeOval: // really just a rounder rounded rect
00281     bOK = pDC->RoundRect(rect, CPoint(14, 14));
00282     break;
00283   default:
00284     TRACE1("Error: unknown shape %d\n", m_shape);
00285     bOK = FALSE;
00286     break;
00287   }
00288   if (pOldPen != NULL)
00289     pDC->SelectObject(pOldPen);
00290
00291   if (!bOK)
00292     return FALSE;
00293
00294   // inset a bit
00295   rect.InflateRect(-CX_INSET, -CY_INSET);
00296
00297   if (!pDC->ExtTextOut(rect.left, rect.top, ETO_OPAQUE, rect,
00298     m_strDescription, m_strDescription.GetLength(), NULL))
00299     return FALSE;
00300
00301   // all OK
00302   return TRUE;
00303 }
00304
00305 int CServerNode::DrawTree(CDC* pDC, CPoint ptStart, CServerNode* pNodeSel)
00306 {
00307   ENSURE(pDC != NULL);
00308   ASSERT(ptStart.x >= 0 && ptStart.y >= 0);
00309
00310   // root node starts here
00311   int cyDrawn = 0;
00312   CSize sizeNode;
00313   CalcNodeSize(pDC, sizeNode);
00314   Draw(pDC, ptStart, this == pNodeSel, sizeNode);
00315   cyDrawn += sizeNode.cy + CY_SEPARATOR;
00316
00317   if (m_listChild.GetCount() == 0 || m_bHideChildren)
00318     return cyDrawn;     // nothing more to draw
00319
00320   // indent for the kids
00321   CPoint ptKid(ptStart.x + CX_INDENT, ptStart.y + cyDrawn);
00322
00323   // draw the kids
00324   int yMid = 0;
00325   POSITION pos = m_listChild.GetHeadPosition();
00326   while (pos != NULL)
00327   {
00328     CServerNode *pChild = (CServerNode*)m_listChild.GetNext(pos);
00329
00330     // add the little line
00331     yMid = ptKid.y + (sizeNode.cy)/2;
00332     pDC->MoveTo(ptStart.x + CX_BACKDENT, yMid);
00333     pDC->LineTo(ptKid.x, yMid);
00334
00335     // draw the child node
00336     int cyKid = pChild->DrawTree(pDC, ptKid, pNodeSel);
00337     if (cyKid == -1)
00338       return -1;      // error
00339
00340     cyDrawn += cyKid;
00341     ptKid.y += cyKid;
00342   }
00343   ASSERT(ptKid.y == ptStart.y + cyDrawn);
00344
00345   // draw the connecting line (down to last yMid)
00346   ENSURE(yMid != 0);
00347   int xLine = ptStart.x + CX_BACKDENT;
00348   pDC->MoveTo(xLine, ptStart.y + sizeNode.cy);
00349   pDC->LineTo(xLine, yMid);
00350   return cyDrawn;
00351 }
00352
00353 // Serializes to file or to embedded OLE stream
00354 void CServerNode::Serialize(CArchive& ar)
00355 {
00356   CObject::Serialize(ar);
00357   if (ar.IsStoring())
00358   {
00359     ar << (WORD)m_shape;
00360
00361     ASSERT(m_strLinkKey.IsEmpty() || m_strDescription != m_strLinkKey);
00362     if (m_pServerItem != NULL)
00363       ar << m_pServerItem->GetItemName();
00364     else
00365       ar << m_strLinkKey;
00366     ar << m_strDescription;
00367     ar << (WORD)m_bHideChildren;
00368   }
00369   else
00370   {
00371     // get back-pointer to document
00372     m_pDocument = (CServerDoc*)ar.m_pDocument;
00373
00374     WORD wTemp;
00375     ar >> wTemp; m_shape = (EShape)wTemp;
00376     if (m_shape >= shapeMax)
00377       m_shape = shapeRect;
00378     ar >> m_strLinkKey >> m_strDescription;
00379     UpdateItemName();
00380     ar >> wTemp;
00381     m_bHideChildren = (BOOL)wTemp;
00382   }
00383   m_listChild.Serialize(ar);
00384 }
00385
00386 /////////////////////////////////////////////////////////////////////////////
00387 // CServerNode support for CF_TEXT format
00388
00389 void CServerNode::SaveAsText(CArchive& ar, int nLevel)
00390 {
00391   ASSERT(ar.IsStoring());
00392
00393   // indent node text
00394   char szTabs[MAX_LEVEL];
00395   int nTabs = min(nLevel, MAX_LEVEL);
00396   memset(szTabs, '\t', nTabs);
00397   ar.Write(szTabs, nTabs);
00398
00399   // write node text itself
00400 #ifdef _UNICODE
00401   int nLen = m_strDescription.GetLength();
00402   char* psz = (char*)_alloca(nLen+1);
00403   wcstombs(psz, m_strDescription, nLen+1);
00404   ar.Write(psz, nLen);
00405 #else
00406   ar.Write(m_strDescription, m_strDescription.GetLength()*sizeof(TCHAR));
00407 #endif
00408
00409   // terminate line with CRLF
00410   static char BASED_CODE szCRLF[] = "\r\n";
00411   ar.Write(szCRLF, sizeof(szCRLF)-1);
00412
00413   // write kids
00414   POSITION pos = m_listChild.GetHeadPosition();
00415   while (pos != NULL)
00416   {
00417     CServerNode* pNode = (CServerNode*)m_listChild.GetNext(pos);
00418     pNode->SaveAsText(ar, nLevel+1);
00419   }
00420 }
00421
00422 void CServerNode::UpdateItemName()
00423 {
00424   // empty link key if same as description (it is redundant)
00425   if (m_strLinkKey == m_strDescription)
00426     m_strLinkKey.Empty();
00427
00428   // update link name in item if attached
00429   if (m_pServerItem != NULL)
00430   {
00431     CString* pstr;
00432     if (m_strLinkKey.IsEmpty())
00433       pstr = &m_strDescription;
00434     else
00435       pstr = &m_strLinkKey;
00436     m_pServerItem->SetItemName(*pstr);
00437
00438     // empty link key since it is redundant with the server item
00439     m_strLinkKey.Empty();
00440   }
00441 }
00442
00443 const CString& CServerNode::GetItemName()
00444 {
00445   // use item name in server item if connected
00446   if (m_pServerItem != NULL)
00447     return m_pServerItem->GetItemName();
00448
00449   // use description or link key depending on state of link key
00450   else if (m_strLinkKey.IsEmpty())
00451     return m_strDescription;
00452   else
00453     return m_strLinkKey;
00454 }
00455
00456 BOOL CServerNode::PromptChangeNode()
00457 {
00458   CChangeNameDlg dlg;
00459   dlg.m_strDescription = m_strDescription;
00460   dlg.m_strLinkKey = GetItemName();
00461   if (dlg.m_strLinkKey == dlg.m_strDescription)
00462     dlg.m_strLinkKey.Empty(); // leave empty for tracking link name
00463   dlg.m_shape = m_shape;
00464
00465   if (dlg.DoModal() == IDOK)
00466   {
00467     m_strDescription = dlg.m_strDescription;
00468     m_strLinkKey = dlg.m_strLinkKey;
00469     UpdateItemName();   // syncronize names as appropriate
00470     m_shape = (EShape)dlg.m_shape;
00471     return TRUE;
00472   }
00473   return FALSE;
00474 }
00475
00476 ////////////////////////////////////////////////////////////////
00477 // Creating child nodes
00478
00479 // Special constructor for child node
00480 CServerNode* CServerNode::CreateChildNode(LPCTSTR lpszDescription)
00481 {
00482   CServerNode* pNew = NULL;
00483   TRY
00484   {
00485     pNew = new CServerNode(GetDocument());
00486     pNew->m_strDescription = lpszDescription;
00487       // both item name and description start out the same
00488
00489     // add as the last child
00490     m_listChild.AddTail(pNew);
00491   }
00492   CATCH (CException, e)
00493   {
00494     delete pNew;
00495     pNew = NULL;
00496   }
00497   END_CATCH
00498
00499   return pNew;
00500 }
00501
00502 CServerNode* CServerNode::PromptNewChildNode()
00503 {
00504   CAddNodeDlg dlg;
00505   dlg.m_shape = (EShape)shapeRect;
00506   if (dlg.DoModal() != IDOK)
00507     return NULL;
00508
00509   CServerNode* pNew = CreateChildNode(dlg.m_strDescription);
00510   if (pNew == NULL)
00511     AfxThrowMemoryException();
00512   pNew->m_shape = (EShape)dlg.m_shape;
00513   pNew->m_strLinkKey = dlg.m_strLinkKey;
00514   pNew->UpdateItemName();
00515
00516   return pNew;
00517 }
00518
00519 CServerNode* CServerNode::GetNext(CServerNode* pNode, BOOL bInit)
00520 {
00521   static BOOL bFound;
00522   if (bInit)
00523     bFound = FALSE;
00524
00525   if (pNode == this)
00526     bFound = TRUE;
00527   if (!m_bHideChildren)
00528   {
00529     POSITION pos = m_listChild.GetHeadPosition();
00530     while (pos != NULL)
00531     {
00532       CServerNode* pChild = (CServerNode*)m_listChild.GetNext(pos);
00533       if (bFound)
00534         return pChild;
00535       pChild = pChild->GetNext(pNode, FALSE);
00536       if (pChild != NULL)
00537         return pChild;
00538     }
00539   }
00540   // if reached top and last level return original
00541   if (bInit)
00542     return pNode;
00543   else
00544     return NULL;
00545 }
00546
00547 CServerNode* CServerNode::GetPrev(CServerNode* pNode,BOOL bInit)
00548 {
00549   static CServerNode* pPrev;
00550   if (bInit)
00551     pPrev = this;
00552
00553   if (pNode == this)
00554     return pPrev;
00555
00556   pPrev = this;
00557
00558   if (!m_bHideChildren)
00559   {
00560     POSITION pos = m_listChild.GetHeadPosition();
00561     while (pos != NULL)
00562     {
00563       CServerNode* pCur = (CServerNode*)m_listChild.GetNext(pos);
00564       CServerNode* pChild = pCur->GetPrev(pNode, FALSE);
00565       if (pChild != NULL)
00566         return pChild;
00567     }
00568   }
00569   if (bInit)
00570     return pPrev;
00571   else
00572     return NULL;
00573 }
00574
00575 /////////////////////////////////////////////////////////////////////////////
00576 // CChangeNameDlg dialog
00577
00578 CChangeNameDlg::CChangeNameDlg(CWnd* pParent)
00579   : CDialog(CChangeNameDlg::IDD, pParent)
00580 {
00581   //{{AFX_DATA_INIT(CChangeNameDlg)
00582   //}}AFX_DATA_INIT
00583 }
00584
00585 BOOL CChangeNameDlg::OnInitDialog()
00586 {
00587   CDialog::OnInitDialog();
00588   OnChange(); // after DDX
00589   return TRUE;
00590 }
00591
00592 void CChangeNameDlg::DoDataExchange(CDataExchange* pDX)
00593 {
00594   CDialog::DoDataExchange(pDX);
00595   //{{AFX_DATA_MAP(CChangeNameDlg)
00596   DDX_CBIndex(pDX, IDC_COMBO1, m_shape);
00597   DDX_Text(pDX, IDC_EDIT1, m_strDescription);
00598   DDX_Text(pDX, IDC_EDIT2, m_strLinkKey);
00599   DDX_Control(pDX, IDC_EDIT1, m_editDescription);
00600   DDX_Control(pDX, IDOK, m_btnOK);
00601   //}}AFX_DATA_MAP
00602 }
00603
00604 BEGIN_MESSAGE_MAP(CChangeNameDlg, CDialog)
00605   //{{AFX_MSG_MAP(CChangeNameDlg)
00606   ON_EN_CHANGE(IDC_EDIT1, OnChange)
00607   //}}AFX_MSG_MAP
00608 END_MESSAGE_MAP()
00609
00610
00611 void CChangeNameDlg::OnChange()
00612 {
00613   if (m_btnOK.m_hWnd)
00614     m_btnOK.EnableWindow(m_editDescription.GetWindowTextLength() > 0);
00615 }
00616
00617 /////////////////////////////////////////////////////////////////////////////
00618 // CAddNodeDlg dialog
00619
00620 CAddNodeDlg::CAddNodeDlg(CWnd* pParent /*=NULL*/)
00621   : CDialog(CAddNodeDlg::IDD, pParent)
00622 {
00623   //{{AFX_DATA_INIT(CAddNodeDlg)
00624   //}}AFX_DATA_INIT
00625 }
00626
00627 BOOL CAddNodeDlg::OnInitDialog()
00628 {
00629   CDialog::OnInitDialog();
00630   OnChange(); // after DDX
00631   return TRUE;
00632 }
00633
00634 void CAddNodeDlg::DoDataExchange(CDataExchange* pDX)
00635 {
00636   CDialog::DoDataExchange(pDX);
00637   //{{AFX_DATA_MAP(CAddNodeDlg)
00638   DDX_Text(pDX, IDC_EDIT1, m_strDescription);
00639   DDX_Text(pDX, IDC_EDIT2, m_strLinkKey);
00640   DDX_CBIndex(pDX, IDC_COMBO1, m_shape);
00641   DDX_Control(pDX, IDC_EDIT1, m_editDescription);
00642   DDX_Control(pDX, IDOK, m_btnOK);
00643   //}}AFX_DATA_MAP
00644 }
00645
00646
00647 BEGIN_MESSAGE_MAP(CAddNodeDlg, CDialog)
00648   //{{AFX_MSG_MAP(CAddNodeDlg)
00649   ON_EN_CHANGE(IDC_EDIT1, OnChange)
00650   //}}AFX_MSG_MAP
00651 END_MESSAGE_MAP()
00652
00653 void CAddNodeDlg::OnChange()
00654 {
00655   if (m_btnOK.m_hWnd)
00656     m_btnOK.EnableWindow(m_editDescription.GetWindowTextLength() > 0);
00657 }
00658
00659 //////////////////////////////////////////////////////////////////////////////
00660 // CServerItem construction
00661
00662 CServerItem::CServerItem(CServerDoc* pServerDoc, CServerNode* pServerNode)
00663   : COleServerItem(pServerDoc, TRUE)
00664 {
00665   // need to attach this server item to the node in the document
00666   ASSERT_VALID(pServerNode);
00667   m_pServerNode = pServerNode;
00668   pServerNode->m_pServerItem = this;
00669   pServerNode->UpdateItemName();
00670
00671   // support CF_TEXT format
00672   GetDataSource()->DelayRenderFileData(CF_TEXT);
00673 }
00674
00675 CServerItem::~CServerItem()
00676 {
00677   if (m_pServerNode != NULL)
00678   {
00679     m_pServerNode->m_pServerItem = NULL;
00680     m_pServerNode->m_strLinkKey = GetItemName();
00681     m_pServerNode->UpdateItemName();
00682   }
00683 }
00684
00685 //////////////////////////////////////////////////////////////////////////////
00686 // CServerItem verb handling
00687
00688 void CServerItem::OnOpen()
00689 {
00690   if (IsLinkedItem() && m_pServerNode != NULL)
00691   {
00692     // for linked items, try to select this node in the document
00693     CServerDoc* pDoc = GetDocument();
00694     ASSERT(pDoc != NULL);
00695     POSITION pos = pDoc->GetFirstViewPosition();
00696     ASSERT(pos != NULL);
00697     CServerView* pView = (CServerView*)pDoc->GetNextView(pos);
00698     ASSERT_KINDOF(CServerView, pView);
00699
00700     pView->SetSelection(m_pServerNode);
00701     pView->ScrollToItem(m_pServerNode, TRUE);
00702   }
00703   COleServerItem::OnOpen();
00704 }
00705
00706 /////////////////////////////////////////////////////////////////////////////
00707 // CServerItem drawing
00708
00709 BOOL CServerItem::OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize)
00710 {
00711   if (dwDrawAspect != DVASPECT_CONTENT)
00712     return COleServerItem::OnGetExtent(dwDrawAspect, rSize);
00713
00714   // determine extent based on screen dc
00715   rSize = CSize(0, 0);
00716   if (m_pServerNode != NULL)
00717   {
00718     CClientDC dc(NULL);
00719     dc.SetMapMode(MM_ANISOTROPIC);
00720     CServerDoc* pDoc = GetDocument();
00721     ASSERT_VALID(pDoc);
00722     CPoint ptStart(CX_MARGIN, CY_MARGIN);
00723     pDoc->CalcBounding(&dc, m_pServerNode, ptStart, rSize);
00724     rSize.cx += CX_MARGIN;
00725     dc.LPtoHIMETRIC(&rSize); // convert pixels to HIMETRIC
00726   }
00727   return TRUE;
00728 }
00729
00730 BOOL CServerItem::OnDraw(CDC* pDC, CSize& rSize)
00731 {
00732   if (m_pServerNode != NULL)
00733   {
00734     // determine extent of this item in the document
00735     CServerDoc* pDoc = GetDocument();
00736     ASSERT_VALID(pDoc);
00737     rSize = CSize(0, 0);
00738     CPoint ptStart(CX_MARGIN, CY_MARGIN);
00739     pDoc->CalcBounding(pDC, m_pServerNode, ptStart, rSize);
00740     rSize.cx += CX_MARGIN;
00741
00742     // prepare to draw and remember the extent in himetric units
00743     pDC->SetWindowOrg(0, 0);
00744     pDC->SetWindowExt(rSize);
00745     pDC->SetViewportExt(rSize);  // Note: only affects the m_hAttribDC
00746
00747     pDC->LPtoHIMETRIC(&rSize);   // convert pixels to HIMETRIC
00748
00749     // CServerDoc::DrawTree selects and releases font automatically
00750     pDoc->DrawTree(pDC, ptStart, NULL, m_pServerNode);
00751   }
00752   return TRUE;
00753 }
00754
00755 /////////////////////////////////////////////////////////////////////////////
00756 // CServerItem clipboard handling
00757
00758 void CServerItem::Serialize(CArchive& ar)
00759 {
00760   // serialize font info from document (so it looks like a document)
00761   CServerDoc* pDoc = GetDocument();
00762   ASSERT_VALID(pDoc);
00763   pDoc->SerializeFontInfo(ar);
00764
00765   // serialize node info
00766   ASSERT_VALID(m_pServerNode);
00767   m_pServerNode->Serialize(ar);
00768 }
00769
00770 BOOL CServerItem::OnRenderFileData(LPFORMATETC lpFormatEtc, CFile* pFile)
00771 {
00772   ENSURE(lpFormatEtc != NULL);
00773   if (lpFormatEtc->cfFormat != CF_TEXT)
00774     return COleServerItem::OnRenderFileData(lpFormatEtc, pFile);
00775
00776   BOOL bResult = FALSE;
00777   if (m_pServerNode != NULL)
00778   {
00779     TRY
00780     {
00781       // save as text
00782       CArchive ar(pFile, CArchive::store);
00783       m_pServerNode->SaveAsText(ar, 0);
00784       ar << (BYTE)'\0';   // terminate with NUL character
00785       bResult = TRUE;
00786     }
00787     END_TRY
00788   }
00789   return bResult;
00790 }
00791
00792 // OnGetClipboardData is used by CopyToClipboard and DoDragDrop
00793 COleDataSource* CServerItem::OnGetClipboardData(BOOL bIncludeLink,
00794   LPPOINT pptOffset, LPSIZE pSize)
00795 {
00796   ASSERT_VALID(this);
00797
00798   if (m_pServerNode == NULL)
00799     return NULL;
00800
00801   COleDataSource* pDataSource = new COleDataSource;
00802   TRY
00803   {
00804     GetNativeClipboardData(pDataSource);
00805     GetClipboardData(pDataSource, bIncludeLink, pptOffset, pSize);
00806   }
00807   CATCH_ALL(e)
00808   {
00809     delete pDataSource;
00810     THROW_LAST();
00811   }
00812   END_CATCH_ALL
00813
00814   ASSERT_VALID(pDataSource);
00815   return pDataSource;
00816 }
00817
00818 void CServerItem::GetNativeClipboardData(COleDataSource *pDataSource)
00819 {
00820   ASSERT_VALID(this);
00821   ASSERT(CServerDoc::m_cfPrivate != NULL);
00822
00823   // Create a shared file and associate a CArchive with it
00824   CSharedFile file;
00825   CArchive ar(&file,CArchive::store);
00826
00827   // Serialize selected objects to the archive
00828   m_pServerNode->Serialize(ar);
00829   ar.Close();
00830
00831   // put on local format instead of or in addation to
00832   pDataSource->CacheGlobalData(CServerDoc::m_cfPrivate,file.Detach());
00833 }
00834
00835 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLicensedApp Member List

This is the complete list of members for CLicensedApp, including all inherited members.
ExitInstance() | CLicensedApp
InitInstance() | CLicensedApp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/resource.h Source File

  • controls
  • licensed

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by LICENSED.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_LICENSED                1
00015 #define IDS_LICENSED_PPG            2
00016 #define IDS_LICENSED_PPG_CAPTION    101
00017
00018 #define IDD_ABOUTBOX_LICENSED       100
00019 #define IDD_PROPPAGE_LICENSED       101
00020 #define IDB_LICENSED                1
00021 #define IDI_ABOUTDLL            10
00022
00023 #define _APS_NEXT_RESOURCE_VALUE        201
00024 #define _APS_NEXT_CONTROL_VALUE         201
00025 #define _APS_NEXT_SYMED_VALUE           101
00026 #define _APS_NEXT_COMMAND_VALUE         32768
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/targetver.h Source File

  • vc2008fp
  • WorkSpaceToolBar

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/targetver.h Source File

  • vc2008fp
  • DrawClient

targetver.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include <winsdkver.h>
00015
00016 #ifndef _WIN32_WINNT
00017 // Modify the following define to target a prior platform. Refer to MSDN
00018 // for the latest info on corresponding values for different platforms.
00019 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00020 #endif
00021
00022 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAnimateCtrlPage Member List

This is the complete list of members for CAnimateCtrlPage, including all inherited members.
ApplyChanges() | CAnimateCtrlPage | [protected]
CAnimateCtrlPage() | CAnimateCtrlPage |
DoDataExchange(CDataExchange *pDX) | CAnimateCtrlPage | [protected, virtual]
IDD enum value | CAnimateCtrlPage |
m_AnimateCtrl | CAnimateCtrlPage |
m_bAutoplay | CAnimateCtrlPage |
m_bCentered | CAnimateCtrlPage |
m_bTransparent | CAnimateCtrlPage |
m_cstrFileName | CAnimateCtrlPage |
m_dwStyle | CAnimateCtrlPage |
m_rectAnimateCtrl | CAnimateCtrlPage |
OnAutoplay() | CAnimateCtrlPage | [protected]
OnBrowse() | CAnimateCtrlPage | [protected]
OnCenter() | CAnimateCtrlPage | [protected]
OnFileChange() | CAnimateCtrlPage | [protected]
OnInitDialog() | CAnimateCtrlPage | [protected, virtual]
OnPlay() | CAnimateCtrlPage | [protected]
OnStop() | CAnimateCtrlPage | [protected]
OnTransparent() | CAnimateCtrlPage | [protected]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/StdAfx.cpp Source File

  • vc2008fp
  • DynamicMenu

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  DynamicMenu.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CImagePropPage Member List

This is the complete list of members for CImagePropPage, including all inherited members.
CImagePropPage() | CImagePropPage |
DoDataExchange(CDataExchange *pDX) | CImagePropPage | [protected, virtual]
IDD enum value | CImagePropPage |
m_bAutoSize | CImagePropPage |
m_strImagePath | CImagePropPage |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCExtPg.H Source File

  • ole
  • TstCon
  • TCProps

TCExtPg.H

Go to the documentation of this file.
00001 // TCExtPage.H : Declaration of the CTCExtPage
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #ifndef __TCEXTPAGE_H_
00011 #define __TCEXTPAGE_H_
00012
00013 #include "resource.h"       // main symbols
00014
00015 #pragma warning( disable : 4268 )
00016 EXTERN_C const CLSID CLSID_TCExtPage;
00017 #pragma warning( default : 4268 )
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTCExtPage
00021 class ATL_NO_VTABLE CTCExtPage :
00022   public CComObjectRootEx<CComSingleThreadModel>,
00023   public CComCoClass<CTCExtPage, &CLSID_TCExtPage>,
00024   public IPropertyPageImpl<CTCExtPage>,
00025   public CDialogImpl<CTCExtPage>
00026 {
00027 public:
00028   CTCExtPage()
00029   {
00030     m_dwTitleID = IDS_TITLETCExtPage;
00031     m_dwHelpFileID = IDS_HELPFILETCExtPage;
00032     m_dwDocStringID = IDS_DOCSTRINGTCExtPage;
00033   }
00034
00035   enum {IDD = IDD_TCEXTPAGE};
00036
00037 DECLARE_REGISTRY_RESOURCEID(IDR_TCEXTPAGE)
00038
00039 BEGIN_COM_MAP(CTCExtPage)
00040   COM_INTERFACE_ENTRY_IMPL(IPropertyPage)
00041 END_COM_MAP()
00042
00043 BEGIN_MSG_MAP(CTCExtPage)
00044    MESSAGE_HANDLER( WM_INITDIALOG, OnInitDialog )
00045   CHAIN_MSG_MAP(IPropertyPageImpl<CTCExtPage>)
00046 END_MSG_MAP()
00047
00048 // IPropertyPage
00049 public:
00050   STDMETHOD( Apply )();
00051
00052 protected:
00053    LRESULT OnInitDialog( UINT nMessage, WPARAM wParam, LPARAM lParam,
00054     BOOL& bHandled );
00055 };
00056
00057 OBJECT_ENTRY_AUTO(CLSID_TCExtPage, CTCExtPage)
00058
00059 #endif //__TCEXTPAGE_H_
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRoamer Member List

This is the complete list of members for CRoamer, including all inherited members.
Bounce(long &value, const int lower, const int upper, int &vel) | CRoamer | [inline]
DeltaRandom(int i) | CRoamer | [inline, static]
dx | CRoamer |
dy | CRoamer |
p1 | CRoamer |
p2 | CRoamer |
~CRoamer() | CRoamer | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/StartView.cpp Source File

  • vc2008fp
  • VisualStudioDemo

StartView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "StartView.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CStartView
00022
00023 #define IDC_START_IMAGE 1
00024
00025 IMPLEMENT_DYNCREATE(CStartView, CView)
00026
00027 CStartView::CStartView()
00028 {
00029 }
00030
00031 CStartView::~CStartView()
00032 {
00033 }
00034
00035 BEGIN_MESSAGE_MAP(CStartView, CView)
00036   ON_WM_ERASEBKGND()
00037   ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnDisableUpdate)
00038   ON_UPDATE_COMMAND_UI(ID_FILE_SAVE_AS, OnDisableUpdate)
00039   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_SETUP, OnDisableUpdate)
00040   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, OnDisableUpdate)
00041   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT, OnDisableUpdate)
00042 END_MESSAGE_MAP()
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CStartView diagnostics
00046
00047 #ifdef _DEBUG
00048 void CStartView::AssertValid() const
00049 {
00050   CView::AssertValid();
00051 }
00052
00053 void CStartView::Dump(CDumpContext& dc) const
00054 {
00055   CView::Dump(dc);
00056 }
00057 #endif //_DEBUG
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CStartView message handlers
00061
00062 void CStartView::OnInitialUpdate()
00063 {
00064   CDocument* pDoc = GetDocument();
00065   ASSERT_VALID(pDoc);
00066
00067   if (m_Image.GetCount() == 0)
00068   {
00069     m_Image.Load(IDR_START);
00070     m_Image.SetSingleImage();
00071     m_Image.SetTransparentColor(RGB(255, 0, 255));
00072   }
00073
00074   pDoc->SetTitle(_T("Start Page"));
00075 }
00076
00077 void CStartView::OnDraw(CDC* pDC)
00078 {
00079   ASSERT_VALID(pDC);
00080
00081   CRect rectClient;
00082   GetClientRect(rectClient);
00083
00084   pDC->FillSolidRect(rectClient, RGB(255, 255, 255));
00085
00086   m_Image.DrawEx(pDC, rectClient, 0);
00087 }
00088
00089 BOOL CStartView::OnEraseBkgnd(CDC* /*pDC*/)
00090 {
00091   return TRUE;
00092 }
00093
00094 void CStartView::OnDisableUpdate(CCmdUI* pCmdUI)
00095 {
00096   pCmdUI->Enable(FALSE);
00097 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/mainfrm.h Source File

  • general
  • snapvw

mainfrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 class CMainFrame : public CMDIFrameWnd
00015 {
00016   DECLARE_DYNAMIC(CMainFrame)
00017 public:
00018   CMainFrame();
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CMainFrame)
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   //}}AFX_VIRTUAL
00031
00032 // Implementation
00033 public:
00034   virtual ~CMainFrame();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:  // control bar embedded members
00041   CStatusBar  m_wndStatusBar;
00042   CToolBar    m_wndToolBar;
00043
00044 // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CMainFrame)
00047   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00048     // NOTE - the ClassWizard will add and remove member functions here.
00049     //    DO NOT EDIT what you see in these blocks of generated code!
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StdAfx.h Source File

  • vc2008fp
  • StatusBarDemo

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCalcDlg Member List

This is the complete list of members for CCalcDlg, including all inherited members.
Button(LPCTSTR szButton) | CCalcDlg |
CCalcDlg(CWnd *pParent=NULL) | CCalcDlg |
Clear() | CCalcDlg |
ClickedNumber(long lNum) | CCalcDlg | [protected]
Close() | CCalcDlg |
Display() | CCalcDlg |
DoDataExchange(CDataExchange *pDX) | CCalcDlg | [protected, virtual]
Evaluate() | CCalcDlg |
GetAccum() | CCalcDlg |
GetOperand() | CCalcDlg |
GetOperation() | CCalcDlg |
GetVisible() | CCalcDlg |
IDD enum value | CCalcDlg |
m_accum | CCalcDlg | [protected]
m_bAutoDelete | CCalcDlg | [protected]
m_bOperandAvail | CCalcDlg | [protected]
m_dwRegister | CCalcDlg | [protected]
m_errorState | CCalcDlg | [protected]
m_hAccel | CCalcDlg | [protected]
m_hIcon | CCalcDlg | [protected]
m_operand | CCalcDlg | [protected]
m_operator | CCalcDlg | [protected]
OnCancel() | CCalcDlg | [virtual]
OnClickedClear() | CCalcDlg |
OnClickedDivide() | CCalcDlg |
OnClickedEqual() | CCalcDlg |
OnClickedMinus() | CCalcDlg |
OnClickedNumber(UINT nID) | CCalcDlg |
OnClickedPlus() | CCalcDlg |
OnClickedTimes() | CCalcDlg |
OnInitDialog() | CCalcDlg | [virtual]
OnOK() | CCalcDlg | [virtual]
OnPaint() | CCalcDlg |
OnQueryDragIcon() | CCalcDlg |
OnSetFocusAccum() | CCalcDlg |
OnSysCommand(UINT nID, LPARAM lParam) | CCalcDlg |
PerformOperation() | CCalcDlg | [protected]
PostNcDestroy() | CCalcDlg | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CCalcDlg | [virtual]
RegisterActive() | CCalcDlg |
SetAccum(long nNewValue) | CCalcDlg |
SetOperand(long nNewValue) | CCalcDlg |
SetOperation(short nNewValue) | CCalcDlg |
SetVisible(BOOL bNewValue) | CCalcDlg |
UpdateDisplay() | CCalcDlg | [protected]
~CCalcDlg() | CCalcDlg | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/StdAfx.cpp Source File

  • vc2008fp
  • WorkSpaceToolBar

StdAfx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  WorkSpaceToolBar.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005
00006 #include "stdafx.h"
00007
00008
00009
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVarUseDlg Member List

This is the complete list of members for CVarUseDlg, including all inherited members.
CVarUseDlg(CWnd *pParent=NULL) | CVarUseDlg |
DoDataExchange(CDataExchange *pDX) | CVarUseDlg | [protected, virtual]
FunctionCallWithVariant(VARIANT myVariant) | CVarUseDlg |
IDD enum value | CVarUseDlg |
m_hIcon | CVarUseDlg | [protected]
OnBasic() | CVarUseDlg | [protected]
OnCurrency() | CVarUseDlg | [protected]
OnDate() | CVarUseDlg | [protected]
OnInitDialog() | CVarUseDlg | [protected, virtual]
OnMultiDimensionArray() | CVarUseDlg | [protected]
OnOleArray() | CVarUseDlg | [protected]
OnPaint() | CVarUseDlg | [protected]
OnQueryDragIcon() | CVarUseDlg | [protected]
OnSafeArray() | CVarUseDlg | [protected]
OnStrings() | CVarUseDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CVarUseDlg | [protected]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/stdafx.h Source File

  • general
  • mdidocvw

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015
00016 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00017
00018 #include <afxwin.h>         // MFC core and standard components
00019 #include <afxext.h>         // MFC extensions
00020 #ifndef _AFX_NO_AFXCMN_SUPPORT
00021 #include <afxcmn.h>         // MFC support for Windows 95 Common Controls
00022 #endif // _AFX_NO_AFXCMN_SUPPORT
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/StdAfx.h Source File

  • vc2008fp
  • TabControl

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapdwvw.cpp Source File

  • advanced
  • collect

mapdwvw.cpp

Go to the documentation of this file.
00001 // mapdwvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "mapdwvw.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMapDWordToMyStructView
00024
00025 IMPLEMENT_DYNCREATE(CMapDWordToMyStructView, CFormView)
00026
00027 CMapDWordToMyStructView::CMapDWordToMyStructView()
00028   : CFormView(CMapDWordToMyStructView::IDD)
00029 {
00030   //{{AFX_DATA_INIT(CMapDWordToMyStructView)
00031   m_int = 0;
00032   m_float = 0.0f;
00033   m_str = "";
00034   m_dwKey = 0;
00035   //}}AFX_DATA_INIT
00036 }
00037
00038 CMapDWordToMyStructView::~CMapDWordToMyStructView()
00039 {
00040 }
00041
00042 void CMapDWordToMyStructView::OnInitialUpdate()
00043 {
00044   CFormView::OnInitialUpdate();
00045
00046   // Copy all of the assocations from the document's CMap to the listbox.
00047   DWORD dwKey;
00048   CMyStruct* pMyStruct;
00049   m_ctlList.ResetContent();
00050   CMapDWordToMyStruct& map = GetDocument()->m_mapDWordToMyStruct;
00051   POSITION pos = map.GetStartPosition();
00052   while (pos != NULL)
00053   {
00054     map.GetNextAssoc(pos, dwKey, pMyStruct);
00055     AddMapEntryToListBox(dwKey, pMyStruct);
00056   }
00057 }
00058
00059 void CMapDWordToMyStructView::DoDataExchange(CDataExchange* pDX)
00060 {
00061   CFormView::DoDataExchange(pDX);
00062   //{{AFX_DATA_MAP(CMapDWordToMyStructView)
00063   DDX_Control(pDX, IDC_LIST, m_ctlList);
00064   DDX_Text(pDX, IDC_INT, m_int);
00065   DDX_Text(pDX, IDC_FLOAT, m_float);
00066   DDX_Text(pDX, IDC_STRING, m_str);
00067   DDX_Text(pDX, IDC_KEY, m_dwKey);
00068   //}}AFX_DATA_MAP
00069 }
00070
00071
00072 BEGIN_MESSAGE_MAP(CMapDWordToMyStructView, CFormView)
00073   //{{AFX_MSG_MAP(CMapDWordToMyStructView)
00074   ON_BN_CLICKED(IDC_ADD_OR_UPDATE, OnAddOrUpdate)
00075   ON_BN_CLICKED(IDC_FIND, OnFind)
00076   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00077   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00078   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00079   //}}AFX_MSG_MAP
00080 END_MESSAGE_MAP()
00081
00082
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // CMapDWordToMyStructView diagnostics
00086
00087 #ifdef _DEBUG
00088 void CMapDWordToMyStructView::AssertValid() const
00089 {
00090   CFormView::AssertValid();
00091 }
00092
00093 void CMapDWordToMyStructView::Dump(CDumpContext& dc) const
00094 {
00095   CFormView::Dump(dc);
00096 }
00097
00098 CCollectDoc* CMapDWordToMyStructView::GetDocument() // non-debug version is inline
00099 {
00100   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00101 }
00102 #endif //_DEBUG
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CMapDWordToMyStructView internal implementation
00106
00107 CString CMapDWordToMyStructView::FormatListBoxEntry(DWORD dwKey, CMyStruct* pMyStruct)
00108 {
00109   CString strListBoxEntry;
00110   strListBoxEntry.Format(_T("%d"),dwKey);
00111   strListBoxEntry += _T(" >> ");
00112   CString strMyStruct;
00113   pMyStruct->FormatMyStruct(strMyStruct);
00114   strListBoxEntry += strMyStruct;
00115   return strListBoxEntry;
00116 }
00117
00118 int CMapDWordToMyStructView::FindKeyInListBox(DWORD dwKey)
00119 {
00120   for (int nSel = 0; nSel < m_ctlList.GetCount(); nSel++)
00121   {
00122     if (m_ctlList.GetItemData(nSel) == dwKey)
00123       return nSel;
00124   }
00125   return LB_ERR;
00126 }
00127
00128 void CMapDWordToMyStructView::AddMapEntryToListBox(DWORD dwKey, CMyStruct* pMyStruct)
00129 {
00130   CString strListBoxEntry = FormatListBoxEntry(dwKey, pMyStruct);
00131   int nSel = m_ctlList.AddString(strListBoxEntry);
00132   m_ctlList.SetItemData(nSel, dwKey);
00133 }
00134
00135 CMyStruct* CMapDWordToMyStructView::ConstructMyStructFromView()
00136 {
00137   CMyStruct* pMyStruct = new CMyStruct;
00138   pMyStruct->m_int = m_int;
00139   pMyStruct->m_float = m_float;
00140   pMyStruct->m_str = m_str;
00141   return pMyStruct;
00142 }
00143
00144 void CMapDWordToMyStructView::UpdateViewFromMyStruct(CMyStruct* pMyStruct)
00145 {
00146   m_int = pMyStruct->m_int;
00147   m_float = pMyStruct->m_float;
00148   m_str = pMyStruct->m_str;
00149   UpdateData(FALSE);  // update the value found in the map lookup
00150 }
00151
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 // CMapDWordToMyStructView message handlers
00155
00156 void CMapDWordToMyStructView::OnAddOrUpdate()
00157 {
00158   if (UpdateData() != TRUE)
00159     return;
00160
00161   // Add or replace entry in the listbox
00162   int nSel = FindKeyInListBox(m_dwKey);
00163   if (nSel != LB_ERR)
00164     m_ctlList.DeleteString(nSel);
00165   CMyStruct* pMyStruct = ConstructMyStructFromView();
00166   AddMapEntryToListBox(m_dwKey, pMyStruct);
00167
00168   // Add or update association in the CMap
00169   CMyStruct* pTemp;
00170   if( GetDocument()->m_mapDWordToMyStruct.Lookup( m_dwKey, pTemp ) )
00171     delete pTemp; // delete old value
00172   GetDocument()->m_mapDWordToMyStruct[m_dwKey] = pMyStruct;
00173 }
00174
00175 void CMapDWordToMyStructView::OnFind()
00176 {
00177   if (UpdateData() != TRUE)
00178     return;
00179
00180   CMyStruct* pMyStruct;
00181   if (GetDocument()->m_mapDWordToMyStruct.Lookup(m_dwKey, pMyStruct) != TRUE)
00182   {
00183     AfxMessageBox(IDS_KEY_NOT_FOUND);
00184     return;
00185   }
00186
00187   UpdateViewFromMyStruct(pMyStruct);
00188 }
00189
00190 void CMapDWordToMyStructView::OnRemove()
00191 {
00192   if (UpdateData() != TRUE)
00193     return;
00194
00195   CMyStruct* pMyStruct;
00196   CMapDWordToMyStruct& map = GetDocument()->m_mapDWordToMyStruct;
00197   if (map.Lookup(m_dwKey, pMyStruct) != TRUE)
00198   {
00199     AfxMessageBox(IDS_KEY_NOT_FOUND);
00200     return;
00201   }
00202
00203   if (m_int != pMyStruct->m_int
00204     || m_float != pMyStruct->m_float
00205     || m_str != pMyStruct->m_str)
00206   {
00207     UpdateViewFromMyStruct(pMyStruct);
00208     AfxMessageBox(IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN);
00209     return;
00210   }
00211
00212   // Remove assocation from the listbox
00213   int nSel = FindKeyInListBox(m_dwKey);
00214   ASSERT(nSel != LB_ERR);
00215   m_ctlList.DeleteString(nSel);
00216
00217   // Remove the association from the CMap
00218   map.RemoveKey(m_dwKey);
00219
00220   // Delete CMyStruct
00221   delete pMyStruct;
00222 }
00223
00224 void CMapDWordToMyStructView::OnRemoveAll()
00225 {
00226   CCollectDoc* pDoc = GetDocument();
00227   POSITION pos = GetDocument()->m_mapDWordToMyStruct.GetStartPosition();
00228   while (pos != NULL)
00229   {
00230     DWORD dwKey;
00231     CMyStruct* pMyStruct;
00232     pDoc->m_mapDWordToMyStruct.GetNextAssoc(pos, dwKey, pMyStruct);
00233     delete pMyStruct;
00234   }
00235   pDoc->m_mapDWordToMyStruct.RemoveAll();
00236   m_ctlList.ResetContent();
00237 }
00238
00239 void CMapDWordToMyStructView::OnSelChangeList()
00240 {
00241   // Update the "key" field to reflect the new selection in the listbox.
00242   m_dwKey = (DWORD)m_ctlList.GetItemData(m_ctlList.GetCurSel());
00243   UpdateData(FALSE);
00244
00245   // Now that the key field has been updated to reflect the listbox selection,
00246   // find the string in the map as though the user had hit the Find button.
00247   OnFind();
00248 }
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/stdafx.cpp Source File

  • advanced
  • cube

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/MainFrm.h Source File

  • vc2008fp
  • RollupPane

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CFrameWnd CFrameWndEx
00014
00015 #include "InfoBar.h"
00016
00017 class CMainFrame : public CFrameWnd
00018 {
00019
00020 protected: // create from serialization only
00021   CMainFrame();
00022   DECLARE_DYNCREATE(CMainFrame)
00023
00024 // Attributes
00025 public:
00026
00027 // Operations
00028 public:
00029
00030 // Overrides
00031   // ClassWizard generated virtual function overrides
00032   //{{AFX_VIRTUAL(CMainFrame)
00033   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 public:
00038   virtual ~CMainFrame();
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043
00044 protected:  // control bar embedded members
00045   CMFCMenuBar     m_wndMenuBar;
00046   CMFCToolBar     m_wndToolBar;
00047   CMFCStatusBar     m_wndStatusBar;
00048   CInfoBar        m_wndInfoBar;
00049
00050 // Generated message map functions
00051 protected:
00052   //{{AFX_MSG(CMainFrame)
00053   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00054   afx_msg void OnViewInfobar();
00055   afx_msg void OnUpdateViewInfobar(CCmdUI* pCmdUI);
00056   //}}AFX_MSG
00057   afx_msg void OnViewCustomize();
00058   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00059   afx_msg void OnAppLook(UINT id);
00060   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00061   DECLARE_MESSAGE_MAP()
00062
00063
00064   UINT  m_nAppLook;
00065 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderView.h Source File

  • vc2008fp
  • Slider

SliderView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CSliderView : public CView
00014 {
00015 protected: // create from serialization only
00016   CSliderView();
00017   DECLARE_DYNCREATE(CSliderView)
00018
00019 // Attributes
00020 public:
00021   CSliderDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CSliderView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnFilePrintPreview();
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 #ifndef _DEBUG  // debug version in SliderView.cpp
00050 inline CSliderDoc* CSliderView::GetDocument()
00051    { return (CSliderDoc*)m_pDocument; }
00052 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mainfrm.cpp Source File

  • advanced
  • mtrecalc

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtrecalc.h"
00014
00015 #include "mainfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00028   //{{AFX_MSG_MAP(CMainFrame)
00029   ON_WM_CREATE()
00030   //}}AFX_MSG_MAP
00031   ON_UPDATE_COMMAND_UI(ID_PERCENT_DONE, OnUpdatePercentDone)
00032   ON_MESSAGE(WM_USER_RECALC_IN_PROGRESS, OnRecalcInProgress)
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // arrays of IDs used to initialize control bars
00037
00038 // toolbar buttons - IDs are command buttons
00039 static UINT BASED_CODE buttons[] =
00040 {
00041   // same order as in the bitmap 'toolbar.bmp'
00042   ID_FILE_NEW,
00043   ID_FILE_OPEN,
00044   ID_FILE_SAVE,
00045     ID_SEPARATOR,
00046   ID_EDIT_CUT,
00047   ID_EDIT_COPY,
00048   ID_EDIT_PASTE,
00049     ID_SEPARATOR,
00050   ID_FILE_PRINT,
00051   ID_APP_ABOUT,
00052 };
00053
00054 static UINT BASED_CODE indicators[] =
00055 {
00056   ID_SEPARATOR,           // status line indicator
00057   ID_PERCENT_DONE,
00058   ID_INDICATOR_CAPS,
00059   ID_INDICATOR_NUM,
00060   ID_INDICATOR_SCRL,
00061 };
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CMainFrame construction/destruction
00065
00066 CMainFrame::CMainFrame()
00067 {
00068   m_nPercentDone = 100;
00069 }
00070
00071 CMainFrame::~CMainFrame()
00072 {
00073 }
00074
00075 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00076 {
00077   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00078     return -1;
00079
00080   if (!m_wndToolBar.Create(this) ||
00081     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00082     !m_wndToolBar.SetButtons(buttons,
00083       sizeof(buttons)/sizeof(UINT)))
00084   {
00085     TRACE0("Failed to create toolbar\n");
00086     return -1;      // fail to create
00087   }
00088
00089   if (!m_wndStatusBar.Create(this) ||
00090     !m_wndStatusBar.SetIndicators(indicators,
00091       sizeof(indicators)/sizeof(UINT)))
00092   {
00093     TRACE0("Failed to create status bar\n");
00094     return -1;      // fail to create
00095   }
00096
00097   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00098   EnableDocking(CBRS_ALIGN_ANY);
00099   DockControlBar(&m_wndToolBar);
00100
00101   return 0;
00102 }
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CMainFrame diagnostics
00106
00107 #ifdef _DEBUG
00108 void CMainFrame::AssertValid() const
00109 {
00110   CMDIFrameWnd::AssertValid();
00111 }
00112
00113 void CMainFrame::Dump(CDumpContext& dc) const
00114 {
00115   CMDIFrameWnd::Dump(dc);
00116 }
00117
00118 #endif //_DEBUG
00119
00120 /////////////////////////////////////////////////////////////////////////////
00121 // CMainFrame message handlers
00122
00123 void CMainFrame::OnUpdatePercentDone(CCmdUI* pCmdUI)
00124 {
00125   // It is necessary to enable the percent-done status bar pane, so that
00126   // the text will be displayed.
00127   pCmdUI->Enable();
00128 }
00129
00130 LRESULT CMainFrame::OnRecalcInProgress(WPARAM wParam, LPARAM)
00131 {
00132   m_nPercentDone = (int)wParam;
00133   CString strPercentDone;
00134   strPercentDone.Format("%i%c", m_nPercentDone, '%');
00135   m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_PERCENT_DONE), strPercentDone);
00136   m_wndStatusBar.UpdateWindow();
00137   return 0;
00138 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/listdlg.cpp Source File

  • ole
  • wordpad

listdlg.cpp

Go to the documentation of this file.
00001 // listdlg.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "resource.h"
00014 #include "listdlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 BEGIN_MESSAGE_MAP(CListDlg, CDialog)
00022   //{{AFX_MSG_MAP(CListDlg)
00023   ON_LBN_DBLCLK(IDC_LISTDIALOG_LIST, OnOK)
00024   //}}AFX_MSG_MAP
00025 END_MESSAGE_MAP()
00026
00027 CListDlg::CListDlg(UINT idStrDlgTitle, UINT idStrListTitle,
00028   const CStringList& listItems, int nDefSel) : CDialog(CListDlg::IDD),
00029   m_listItems(listItems)
00030 {
00031   VERIFY(m_strDlgTitle.LoadString(idStrDlgTitle));
00032   VERIFY(m_strListTitle.LoadString(idStrListTitle));
00033   m_nSelection = nDefSel;
00034 }
00035
00036 BOOL CListDlg::OnInitDialog()
00037 {
00038   SetWindowText(m_strDlgTitle);
00039 // fix this
00040   SetDlgItemText(IDC_STATIC_HEADING, m_strListTitle);
00041   CListBox* pListBox = (CListBox*)GetDlgItem(IDC_LISTDIALOG_LIST);
00042   ENSURE(pListBox != NULL);
00043   // fill with document templates in list
00044
00045   POSITION pos = m_listItems.GetHeadPosition();
00046   while (pos != NULL)
00047   {
00048      if ( pListBox->AddString(m_listItems.GetNext(pos)) == -1)
00049       return FALSE;
00050   }
00051   pListBox->SetCurSel(m_nSelection);
00052
00053   return CDialog::OnInitDialog();
00054 }
00055
00056 void CListDlg::OnOK()
00057 {
00058   CListBox* pListBox = (CListBox*)GetDlgItem(IDC_LISTDIALOG_LIST);
00059   ENSURE(pListBox != NULL);
00060   m_nSelection = pListBox->GetCurSel();
00061   CDialog::OnOK();
00062 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/listdlg.h Source File

  • ole
  • wordpad

listdlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 class CListDlg : public CDialog
00011 {
00012 public:
00013   //{{AFX_DATA(CListDlg)
00014   enum { IDD = IDD_LISTDIALOG };
00015   //}}AFX_DATA
00016   CListDlg::CListDlg(UINT idStrDlgTitle, UINT idStrListTitle,
00017     const CStringList& listItems, int nDefSel=0);
00018   CString m_strDlgTitle,m_strListTitle;
00019   const CStringList& m_listItems;
00020   int m_nSelection;
00021
00022 protected:
00023   BOOL OnInitDialog();
00024   //{{AFX_MSG(CListDlg)
00025   afx_msg void OnOK();
00026   //}}AFX_MSG
00027   DECLARE_MESSAGE_MAP()
00028 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDockView Member List

This is the complete list of members for CDockView, including all inherited members.
CDockView() | CDockView | [protected]
GetDocument() | CDockView | [inline]
OnDraw(CDC *pDC) | CDockView | [virtual]
~CDockView() | CDockView | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypedPtrListView Member List

This is the complete list of members for CTypedPtrListView, including all inherited members.
AddMyStructToListBox(CMyStruct *pMyStruct, int nSel=-1) | CTypedPtrListView | [protected]
CTypedPtrListView() | CTypedPtrListView |
DoDataExchange(CDataExchange *pDX) | CTypedPtrListView | [protected, virtual]
FindMyStruct(int &nSel, POSITION &pos) | CTypedPtrListView | [protected]
GetDocument() | CTypedPtrListView | [inline]
IDD enum value | CTypedPtrListView |
m_ctlList | CTypedPtrListView |
m_float | CTypedPtrListView |
m_int | CTypedPtrListView |
m_str | CTypedPtrListView |
OnAdd() | CTypedPtrListView | [protected]
OnInitialUpdate() | CTypedPtrListView |
OnInsertBefore() | CTypedPtrListView | [protected]
OnRemove() | CTypedPtrListView | [protected]
OnRemoveAll() | CTypedPtrListView | [protected]
OnSelChangeList() | CTypedPtrListView | [protected]
OnUpdateButton() | CTypedPtrListView | [protected]
~CTypedPtrListView() | CTypedPtrListView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ChildFrm.cpp Source File

  • vc2008fp
  • MenuSubSet

ChildFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MenuSubSet.h"
00013
00014 #include "ChildFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CChildFrame
00024
00025 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWndEx)
00026
00027 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWndEx)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CChildFrame construction/destruction
00032
00033 CChildFrame::CChildFrame()
00034 {
00035   // TODO: add member initialization code here
00036
00037 }
00038
00039 CChildFrame::~CChildFrame()
00040 {
00041 }
00042
00043 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00044 {
00045   // TODO: Modify the Window class or styles here by modifying
00046   //  the CREATESTRUCT cs
00047
00048   if( !CMDIChildWndEx::PreCreateWindow(cs) )
00049     return FALSE;
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CChildFrame diagnostics
00058
00059 #ifdef _DEBUG
00060 void CChildFrame::AssertValid() const
00061 {
00062   CMDIChildWndEx::AssertValid();
00063 }
00064
00065 void CChildFrame::Dump(CDumpContext& dc) const
00066 {
00067   CMDIChildWndEx::Dump(dc);
00068 }
00069
00070 #endif //_DEBUG
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar2.h Source File

  • general
  • CmnCtrl1

toolbar2.h

Go to the documentation of this file.
00001 // Toolbar2.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CPaletteBar window
00015 #ifndef INC_TOOLBAR2_H
00016 #define INC_TOOLBAR2_H
00017
00018 class CPaletteBar : public CToolBarCtrl
00019 {
00020 private:
00021   int         m_nButtonCount;
00022   TBBUTTON    *m_pTBButtons;
00023   using CToolBarCtrl::Create;
00024
00025 // Construction
00026 public:
00027   CPaletteBar();
00028
00029 // Attributes
00030 public:
00031
00032 // Operations
00033 public:
00034
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CPaletteBar)
00039   public:
00040   virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
00041   virtual BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00042   //}}AFX_VIRTUAL
00043
00044
00045 // Implementation
00046 public:
00047   virtual ~CPaletteBar();
00048
00049 protected:
00050   BOOL BeginAdjust(WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
00051   BOOL BeginDrag(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00052   BOOL CustomizeHelp(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00053   BOOL EndAdjust(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00054   BOOL EndDrag(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00055   BOOL GetButtonInfo(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00056   BOOL QueryDelete(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00057   BOOL QueryInsert(WPARAM wParam, LPARAM  lParam, LRESULT* pLResult);
00058   BOOL Reset(WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
00059   BOOL ToolBarChange(WPARAM wParam, LPARAM lParam,LRESULT* pLResult);
00060   CString NeedText(UINT nID, NMHDR * pNotifyStruct, LRESULT * lResult);
00061
00062   // Generated message map functions
00063 protected:
00064   //{{AFX_MSG(CPaletteBar)
00065   afx_msg void OnNeedTextW( UINT nID, NMHDR * pNotifyStruct, LRESULT * lResult );
00066   afx_msg void OnNeedTextA( UINT nID, NMHDR * pNotifyStruct, LRESULT * lResult );
00067   //}}AFX_MSG
00068
00069   DECLARE_MESSAGE_MAP()
00070 };
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawtool.h Source File

  • ole
  • drawcli

drawtool.h

Go to the documentation of this file.
00001 // drawtool.h - interface for CDrawTool and derivatives
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __DRAWTOOL_H__
00014 #define __DRAWTOOL_H__
00015
00016 #include "drawobj.h"
00017
00018 class CDrawView;
00019
00020 enum DrawShape
00021 {
00022   selection,
00023   line,
00024   rect,
00025   roundRect,
00026   ellipse,
00027   poly
00028 };
00029
00030 class CDrawTool
00031 {
00032 // Constructors
00033 public:
00034   CDrawTool(DrawShape nDrawShape);
00035
00036 // Overridables
00037   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00038   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00039   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00040   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00041   virtual void OnEditProperties(CDrawView* pView);
00042   virtual void OnCancel();
00043
00044 // Attributes
00045   DrawShape m_drawShape;
00046
00047   static CDrawTool* FindTool(DrawShape drawShape);
00048   static CPtrList c_tools;
00049   static CPoint c_down;
00050   static UINT c_nDownFlags;
00051   static CPoint c_last;
00052   static DrawShape c_drawShape;
00053 };
00054
00055 class CSelectTool : public CDrawTool
00056 {
00057 // Constructors
00058 public:
00059   CSelectTool();
00060
00061 // Implementation
00062   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00063   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00064   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00065   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00066   virtual void OnEditProperties(CDrawView* pView);
00067 };
00068
00069 class CRectTool : public CDrawTool
00070 {
00071 // Constructors
00072 public:
00073   CRectTool(DrawShape drawShape);
00074
00075 // Implementation
00076   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00077   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00078   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00079   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00080 };
00081
00082 class CPolyTool : public CDrawTool
00083 {
00084 // Constructors
00085 public:
00086   CPolyTool();
00087
00088 // Implementation
00089   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00090   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00091   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00092   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00093   virtual void OnCancel();
00094 private:
00095   CDrawPoly* m_pDrawObj;
00096 };
00097
00098 ////////////////////////////////////////////////////////////////////////////
00099
00100 #endif // __DRAWTOOL_H__
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/util.cpp Source File

  • ole
  • oleview
  • iviewers

util.cpp

Go to the documentation of this file.
00001 // util.cpp
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "util.h"
00014 #include "shadow.h"
00015 /////
00016 // Utility functions
00017 //
00018 static TCHAR szBold[]       = _T("Bold") ;
00019 static TCHAR szItalic[]      = _T("Italic") ;
00020 static TCHAR szBoldItalic[]  = _T("Bold Italic") ;
00021 static TCHAR szRegular[]     = _T("Regular") ;
00022
00023 void ErrorMessage( const CString& str, HRESULT hr )
00024 {
00025   LPVOID lpMessageBuffer = NULL ;
00026   if (FormatMessage(
00027       FORMAT_MESSAGE_ALLOCATE_BUFFER |
00028       FORMAT_MESSAGE_FROM_SYSTEM,
00029       NULL,
00030       GetScode(hr),
00031       MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
00032       (LPTSTR) &lpMessageBuffer,
00033       0,
00034       NULL ))
00035   {
00036     CString str2 ;
00037     str2.Format( _T("\n%s %s"), (LPCTSTR)lpMessageBuffer, (LPCTSTR)HRtoString(hr) ) ;
00038     str2 = str + str2 ;
00039     LocalFree(lpMessageBuffer) ;
00040     AfxMessageBox( str2 ) ;
00041   }
00042   else
00043   {
00044     CString str2 ;
00045     str2.Format( _T("\n<No system message defined> %s"), (LPCTSTR)HRtoString(hr) ) ;
00046     str2 = str + str2 ;
00047     AfxMessageBox( str2 ) ;
00048   }
00049 }
00050
00051 // Stolen from OLEMISC.CPP in the MFC 3.0 source.  Function names
00052 // changed from Afx* to _*.
00053 //
00054 #define _COUNTOF(array) (sizeof(array)/sizeof(array[0]))
00055
00056 LPCTSTR AFXAPI _GetScodeString(SCODE sc)
00057 {
00058   struct SCODE_ENTRY
00059   {
00060     SCODE sc;
00061     LPCTSTR lpszName;
00062   };
00063   #define MAKE_SCODE_ENTRY(sc)    { sc, _T(#sc) }
00064   static const SCODE_ENTRY scNameTable[] =
00065   {
00066     MAKE_SCODE_ENTRY(S_OK),
00067     MAKE_SCODE_ENTRY(S_FALSE),
00068
00069     MAKE_SCODE_ENTRY(CACHE_S_FORMATETC_NOTSUPPORTED),
00070     MAKE_SCODE_ENTRY(CACHE_S_SAMECACHE),
00071     MAKE_SCODE_ENTRY(CACHE_S_SOMECACHES_NOTUPDATED),
00072     MAKE_SCODE_ENTRY(CONVERT10_S_NO_PRESENTATION),
00073     MAKE_SCODE_ENTRY(DATA_S_SAMEFORMATETC),
00074     MAKE_SCODE_ENTRY(DRAGDROP_S_CANCEL),
00075     MAKE_SCODE_ENTRY(DRAGDROP_S_DROP),
00076     MAKE_SCODE_ENTRY(DRAGDROP_S_USEDEFAULTCURSORS),
00077     MAKE_SCODE_ENTRY(INPLACE_S_TRUNCATED),
00078     MAKE_SCODE_ENTRY(MK_S_HIM),
00079     MAKE_SCODE_ENTRY(MK_S_ME),
00080     MAKE_SCODE_ENTRY(MK_S_MONIKERALREADYREGISTERED),
00081     MAKE_SCODE_ENTRY(MK_S_REDUCED_TO_SELF),
00082     MAKE_SCODE_ENTRY(MK_S_US),
00083     MAKE_SCODE_ENTRY(OLE_S_MAC_CLIPFORMAT),
00084     MAKE_SCODE_ENTRY(OLE_S_STATIC),
00085     MAKE_SCODE_ENTRY(OLE_S_USEREG),
00086     MAKE_SCODE_ENTRY(OLEOBJ_S_CANNOT_DOVERB_NOW),
00087     MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDHWND),
00088     MAKE_SCODE_ENTRY(OLEOBJ_S_INVALIDVERB),
00089     MAKE_SCODE_ENTRY(OLEOBJ_S_LAST),
00090     MAKE_SCODE_ENTRY(STG_S_CONVERTED),
00091     MAKE_SCODE_ENTRY(VIEW_S_ALREADY_FROZEN),
00092
00093     MAKE_SCODE_ENTRY(E_UNEXPECTED),
00094     MAKE_SCODE_ENTRY(E_NOTIMPL),
00095     MAKE_SCODE_ENTRY(E_OUTOFMEMORY),
00096     MAKE_SCODE_ENTRY(E_INVALIDARG),
00097     MAKE_SCODE_ENTRY(E_NOINTERFACE),
00098     MAKE_SCODE_ENTRY(E_POINTER),
00099     MAKE_SCODE_ENTRY(E_HANDLE),
00100     MAKE_SCODE_ENTRY(E_ABORT),
00101     MAKE_SCODE_ENTRY(E_FAIL),
00102     MAKE_SCODE_ENTRY(E_ACCESSDENIED),
00103
00104     MAKE_SCODE_ENTRY(CACHE_E_NOCACHE_UPDATED),
00105     MAKE_SCODE_ENTRY(CLASS_E_CLASSNOTAVAILABLE),
00106     MAKE_SCODE_ENTRY(CLASS_E_NOAGGREGATION),
00107     MAKE_SCODE_ENTRY(CLIPBRD_E_BAD_DATA),
00108     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_CLOSE),
00109     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_EMPTY),
00110     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_OPEN),
00111     MAKE_SCODE_ENTRY(CLIPBRD_E_CANT_SET),
00112     MAKE_SCODE_ENTRY(CO_E_ALREADYINITIALIZED),
00113     MAKE_SCODE_ENTRY(CO_E_APPDIDNTREG),
00114     MAKE_SCODE_ENTRY(CO_E_APPNOTFOUND),
00115     MAKE_SCODE_ENTRY(CO_E_APPSINGLEUSE),
00116     MAKE_SCODE_ENTRY(CO_E_BAD_PATH),
00117     MAKE_SCODE_ENTRY(CO_E_CANTDETERMINECLASS),
00118     MAKE_SCODE_ENTRY(CO_E_CLASS_CREATE_FAILED),
00119     MAKE_SCODE_ENTRY(CO_E_CLASSSTRING),
00120     MAKE_SCODE_ENTRY(CO_E_DLLNOTFOUND),
00121     MAKE_SCODE_ENTRY(CO_E_ERRORINAPP),
00122     MAKE_SCODE_ENTRY(CO_E_ERRORINDLL),
00123     MAKE_SCODE_ENTRY(CO_E_IIDSTRING),
00124     MAKE_SCODE_ENTRY(CO_E_NOTINITIALIZED),
00125     MAKE_SCODE_ENTRY(CO_E_OBJISREG),
00126     MAKE_SCODE_ENTRY(CO_E_OBJNOTCONNECTED),
00127     MAKE_SCODE_ENTRY(CO_E_OBJNOTREG),
00128     MAKE_SCODE_ENTRY(CO_E_OBJSRV_RPC_FAILURE),
00129     MAKE_SCODE_ENTRY(CO_E_SCM_ERROR),
00130     MAKE_SCODE_ENTRY(CO_E_SCM_RPC_FAILURE),
00131     MAKE_SCODE_ENTRY(CO_E_SERVER_EXEC_FAILURE),
00132     MAKE_SCODE_ENTRY(CO_E_SERVER_STOPPING),
00133     MAKE_SCODE_ENTRY(CO_E_WRONGOSFORAPP),
00134     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_BITMAP_TO_DIB),
00135     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_FMT),
00136     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_GET),
00137     MAKE_SCODE_ENTRY(CONVERT10_E_OLESTREAM_PUT),
00138     MAKE_SCODE_ENTRY(CONVERT10_E_STG_DIB_TO_BITMAP),
00139     MAKE_SCODE_ENTRY(CONVERT10_E_STG_FMT),
00140     MAKE_SCODE_ENTRY(CONVERT10_E_STG_NO_STD_STREAM),
00141     MAKE_SCODE_ENTRY(DISP_E_ARRAYISLOCKED),
00142     MAKE_SCODE_ENTRY(DISP_E_BADCALLEE),
00143     MAKE_SCODE_ENTRY(DISP_E_BADINDEX),
00144     MAKE_SCODE_ENTRY(DISP_E_BADPARAMCOUNT),
00145     MAKE_SCODE_ENTRY(DISP_E_BADVARTYPE),
00146     MAKE_SCODE_ENTRY(DISP_E_EXCEPTION),
00147     MAKE_SCODE_ENTRY(DISP_E_MEMBERNOTFOUND),
00148     MAKE_SCODE_ENTRY(DISP_E_NONAMEDARGS),
00149     MAKE_SCODE_ENTRY(DISP_E_NOTACOLLECTION),
00150     MAKE_SCODE_ENTRY(DISP_E_OVERFLOW),
00151     MAKE_SCODE_ENTRY(DISP_E_PARAMNOTFOUND),
00152     MAKE_SCODE_ENTRY(DISP_E_PARAMNOTOPTIONAL),
00153     MAKE_SCODE_ENTRY(DISP_E_TYPEMISMATCH),
00154     MAKE_SCODE_ENTRY(DISP_E_UNKNOWNINTERFACE),
00155     MAKE_SCODE_ENTRY(DISP_E_UNKNOWNLCID),
00156     MAKE_SCODE_ENTRY(DISP_E_UNKNOWNNAME),
00157     MAKE_SCODE_ENTRY(DRAGDROP_E_ALREADYREGISTERED),
00158     MAKE_SCODE_ENTRY(DRAGDROP_E_INVALIDHWND),
00159     MAKE_SCODE_ENTRY(DRAGDROP_E_NOTREGISTERED),
00160     MAKE_SCODE_ENTRY(DV_E_CLIPFORMAT),
00161     MAKE_SCODE_ENTRY(DV_E_DVASPECT),
00162     MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE),
00163     MAKE_SCODE_ENTRY(DV_E_DVTARGETDEVICE_SIZE),
00164     MAKE_SCODE_ENTRY(DV_E_FORMATETC),
00165     MAKE_SCODE_ENTRY(DV_E_LINDEX),
00166     MAKE_SCODE_ENTRY(DV_E_NOIVIEWOBJECT),
00167     MAKE_SCODE_ENTRY(DV_E_STATDATA),
00168     MAKE_SCODE_ENTRY(DV_E_STGMEDIUM),
00169     MAKE_SCODE_ENTRY(DV_E_TYMED),
00170     MAKE_SCODE_ENTRY(INPLACE_E_NOTOOLSPACE),
00171     MAKE_SCODE_ENTRY(INPLACE_E_NOTUNDOABLE),
00172     MAKE_SCODE_ENTRY(MEM_E_INVALID_LINK),
00173     MAKE_SCODE_ENTRY(MEM_E_INVALID_ROOT),
00174     MAKE_SCODE_ENTRY(MEM_E_INVALID_SIZE),
00175     MAKE_SCODE_ENTRY(MK_E_CANTOPENFILE),
00176     MAKE_SCODE_ENTRY(MK_E_CONNECTMANUALLY),
00177     MAKE_SCODE_ENTRY(MK_E_ENUMERATION_FAILED),
00178     MAKE_SCODE_ENTRY(MK_E_EXCEEDEDDEADLINE),
00179     MAKE_SCODE_ENTRY(MK_E_INTERMEDIATEINTERFACENOTSUPPORTED),
00180     MAKE_SCODE_ENTRY(MK_E_INVALIDEXTENSION),
00181     MAKE_SCODE_ENTRY(MK_E_MUSTBOTHERUSER),
00182     MAKE_SCODE_ENTRY(MK_E_NEEDGENERIC),
00183     MAKE_SCODE_ENTRY(MK_E_NO_NORMALIZED),
00184     MAKE_SCODE_ENTRY(MK_E_NOINVERSE),
00185     MAKE_SCODE_ENTRY(MK_E_NOOBJECT),
00186     MAKE_SCODE_ENTRY(MK_E_NOPREFIX),
00187     MAKE_SCODE_ENTRY(MK_E_NOSTORAGE),
00188     MAKE_SCODE_ENTRY(MK_E_NOTBINDABLE),
00189     MAKE_SCODE_ENTRY(MK_E_NOTBOUND),
00190     MAKE_SCODE_ENTRY(MK_E_SYNTAX),
00191     MAKE_SCODE_ENTRY(MK_E_UNAVAILABLE),
00192     MAKE_SCODE_ENTRY(OLE_E_ADVF),
00193     MAKE_SCODE_ENTRY(OLE_E_ADVISENOTSUPPORTED),
00194     MAKE_SCODE_ENTRY(OLE_E_BLANK),
00195     MAKE_SCODE_ENTRY(OLE_E_CANT_BINDTOSOURCE),
00196     MAKE_SCODE_ENTRY(OLE_E_CANT_GETMONIKER),
00197     MAKE_SCODE_ENTRY(OLE_E_CANTCONVERT),
00198     MAKE_SCODE_ENTRY(OLE_E_CLASSDIFF),
00199     MAKE_SCODE_ENTRY(OLE_E_ENUM_NOMORE),
00200     MAKE_SCODE_ENTRY(OLE_E_INVALIDHWND),
00201     MAKE_SCODE_ENTRY(OLE_E_INVALIDRECT),
00202     MAKE_SCODE_ENTRY(OLE_E_NOCACHE),
00203     MAKE_SCODE_ENTRY(OLE_E_NOCONNECTION),
00204     MAKE_SCODE_ENTRY(OLE_E_NOSTORAGE),
00205     MAKE_SCODE_ENTRY(OLE_E_NOT_INPLACEACTIVE),
00206     MAKE_SCODE_ENTRY(OLE_E_NOTRUNNING),
00207     MAKE_SCODE_ENTRY(OLE_E_OLEVERB),
00208     MAKE_SCODE_ENTRY(OLE_E_PROMPTSAVECANCELLED),
00209     MAKE_SCODE_ENTRY(OLE_E_STATIC),
00210     MAKE_SCODE_ENTRY(OLE_E_WRONGCOMPOBJ),
00211     MAKE_SCODE_ENTRY(OLEOBJ_E_INVALIDVERB),
00212     MAKE_SCODE_ENTRY(OLEOBJ_E_NOVERBS),
00213     MAKE_SCODE_ENTRY(REGDB_E_CLASSNOTREG),
00214     MAKE_SCODE_ENTRY(REGDB_E_IIDNOTREG),
00215     MAKE_SCODE_ENTRY(REGDB_E_INVALIDVALUE),
00216     MAKE_SCODE_ENTRY(REGDB_E_KEYMISSING),
00217     MAKE_SCODE_ENTRY(REGDB_E_READREGDB),
00218     MAKE_SCODE_ENTRY(REGDB_E_WRITEREGDB),
00219     MAKE_SCODE_ENTRY(RPC_E_ATTEMPTED_MULTITHREAD),
00220     MAKE_SCODE_ENTRY(RPC_E_CALL_CANCELED),
00221     MAKE_SCODE_ENTRY(RPC_E_CALL_REJECTED),
00222     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_AGAIN),
00223     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INASYNCCALL),
00224     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_INEXTERNALCALL),
00225     MAKE_SCODE_ENTRY(RPC_E_CANTCALLOUT_ININPUTSYNCCALL),
00226     MAKE_SCODE_ENTRY(RPC_E_CANTPOST_INSENDCALL),
00227     MAKE_SCODE_ENTRY(RPC_E_CANTTRANSMIT_CALL),
00228     MAKE_SCODE_ENTRY(RPC_E_CHANGED_MODE),
00229     MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTMARSHAL_DATA),
00230     MAKE_SCODE_ENTRY(RPC_E_CLIENT_CANTUNMARSHAL_DATA),
00231     MAKE_SCODE_ENTRY(RPC_E_CLIENT_DIED),
00232     MAKE_SCODE_ENTRY(RPC_E_CONNECTION_TERMINATED),
00233     MAKE_SCODE_ENTRY(RPC_E_DISCONNECTED),
00234     MAKE_SCODE_ENTRY(RPC_E_FAULT),
00235     MAKE_SCODE_ENTRY(RPC_E_INVALID_CALLDATA),
00236     MAKE_SCODE_ENTRY(RPC_E_INVALID_DATA),
00237     MAKE_SCODE_ENTRY(RPC_E_INVALID_DATAPACKET),
00238     MAKE_SCODE_ENTRY(RPC_E_INVALID_PARAMETER),
00239     MAKE_SCODE_ENTRY(RPC_E_INVALIDMETHOD),
00240     MAKE_SCODE_ENTRY(RPC_E_NOT_REGISTERED),
00241     MAKE_SCODE_ENTRY(RPC_E_OUT_OF_RESOURCES),
00242     MAKE_SCODE_ENTRY(RPC_E_RETRY),
00243     MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTMARSHAL_DATA),
00244     MAKE_SCODE_ENTRY(RPC_E_SERVER_CANTUNMARSHAL_DATA),
00245     MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED),
00246     MAKE_SCODE_ENTRY(RPC_E_SERVER_DIED_DNE),
00247     MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_REJECTED),
00248     MAKE_SCODE_ENTRY(RPC_E_SERVERCALL_RETRYLATER),
00249     MAKE_SCODE_ENTRY(RPC_E_SERVERFAULT),
00250     MAKE_SCODE_ENTRY(RPC_E_SYS_CALL_FAILED),
00251     MAKE_SCODE_ENTRY(RPC_E_THREAD_NOT_INIT),
00252     MAKE_SCODE_ENTRY(RPC_E_UNEXPECTED),
00253     MAKE_SCODE_ENTRY(RPC_E_WRONG_THREAD),
00254     MAKE_SCODE_ENTRY(STG_E_ABNORMALAPIEXIT),
00255     MAKE_SCODE_ENTRY(STG_E_ACCESSDENIED),
00256     MAKE_SCODE_ENTRY(STG_E_CANTSAVE),
00257     MAKE_SCODE_ENTRY(STG_E_DISKISWRITEPROTECTED),
00258     MAKE_SCODE_ENTRY(STG_E_EXTANTMARSHALLINGS),
00259     MAKE_SCODE_ENTRY(STG_E_FILEALREADYEXISTS),
00260     MAKE_SCODE_ENTRY(STG_E_FILENOTFOUND),
00261     MAKE_SCODE_ENTRY(STG_E_INSUFFICIENTMEMORY),
00262     MAKE_SCODE_ENTRY(STG_E_INUSE),
00263     MAKE_SCODE_ENTRY(STG_E_INVALIDFLAG),
00264     MAKE_SCODE_ENTRY(STG_E_INVALIDFUNCTION),
00265     MAKE_SCODE_ENTRY(STG_E_INVALIDHANDLE),
00266     MAKE_SCODE_ENTRY(STG_E_INVALIDHEADER),
00267     MAKE_SCODE_ENTRY(STG_E_INVALIDNAME),
00268     MAKE_SCODE_ENTRY(STG_E_INVALIDPARAMETER),
00269     MAKE_SCODE_ENTRY(STG_E_INVALIDPOINTER),
00270     MAKE_SCODE_ENTRY(STG_E_LOCKVIOLATION),
00271     MAKE_SCODE_ENTRY(STG_E_MEDIUMFULL),
00272     MAKE_SCODE_ENTRY(STG_E_NOMOREFILES),
00273     MAKE_SCODE_ENTRY(STG_E_NOTCURRENT),
00274     MAKE_SCODE_ENTRY(STG_E_NOTFILEBASEDSTORAGE),
00275     MAKE_SCODE_ENTRY(STG_E_OLDDLL),
00276     MAKE_SCODE_ENTRY(STG_E_OLDFORMAT),
00277     MAKE_SCODE_ENTRY(STG_E_PATHNOTFOUND),
00278     MAKE_SCODE_ENTRY(STG_E_READFAULT),
00279     MAKE_SCODE_ENTRY(STG_E_REVERTED),
00280     MAKE_SCODE_ENTRY(STG_E_SEEKERROR),
00281     MAKE_SCODE_ENTRY(STG_E_SHAREREQUIRED),
00282     MAKE_SCODE_ENTRY(STG_E_SHAREVIOLATION),
00283     MAKE_SCODE_ENTRY(STG_E_TOOMANYOPENFILES),
00284     MAKE_SCODE_ENTRY(STG_E_UNIMPLEMENTEDFUNCTION),
00285     MAKE_SCODE_ENTRY(STG_E_UNKNOWN),
00286     MAKE_SCODE_ENTRY(STG_E_WRITEFAULT),
00287     MAKE_SCODE_ENTRY(TYPE_E_AMBIGUOUSNAME),
00288     MAKE_SCODE_ENTRY(TYPE_E_BADMODULEKIND),
00289     MAKE_SCODE_ENTRY(TYPE_E_BUFFERTOOSMALL),
00290     MAKE_SCODE_ENTRY(TYPE_E_CANTCREATETMPFILE),
00291     MAKE_SCODE_ENTRY(TYPE_E_CANTLOADLIBRARY),
00292     MAKE_SCODE_ENTRY(TYPE_E_CIRCULARTYPE),
00293     MAKE_SCODE_ENTRY(TYPE_E_DLLFUNCTIONNOTFOUND),
00294     MAKE_SCODE_ENTRY(TYPE_E_DUPLICATEID),
00295     MAKE_SCODE_ENTRY(TYPE_E_ELEMENTNOTFOUND),
00296     MAKE_SCODE_ENTRY(TYPE_E_INCONSISTENTPROPFUNCS),
00297     MAKE_SCODE_ENTRY(TYPE_E_INVALIDSTATE),
00298     MAKE_SCODE_ENTRY(TYPE_E_INVDATAREAD),
00299     MAKE_SCODE_ENTRY(TYPE_E_IOERROR),
00300     MAKE_SCODE_ENTRY(TYPE_E_LIBNOTREGISTERED),
00301     MAKE_SCODE_ENTRY(TYPE_E_NAMECONFLICT),
00302     MAKE_SCODE_ENTRY(TYPE_E_OUTOFBOUNDS),
00303     MAKE_SCODE_ENTRY(TYPE_E_QUALIFIEDNAMEDISALLOWED),
00304     MAKE_SCODE_ENTRY(TYPE_E_REGISTRYACCESS),
00305     MAKE_SCODE_ENTRY(TYPE_E_SIZETOOBIG),
00306     MAKE_SCODE_ENTRY(TYPE_E_TYPEMISMATCH),
00307     MAKE_SCODE_ENTRY(TYPE_E_UNDEFINEDTYPE),
00308     MAKE_SCODE_ENTRY(TYPE_E_UNKNOWNLCID),
00309     MAKE_SCODE_ENTRY(TYPE_E_UNSUPFORMAT),
00310     MAKE_SCODE_ENTRY(TYPE_E_WRONGTYPEKIND),
00311     MAKE_SCODE_ENTRY(VIEW_E_DRAW),
00312   };
00313   #undef MAKE_SCODE_ENTRY
00314
00315   // look for it in the table
00316   for (int i = 0; i < _COUNTOF(scNameTable); i++)
00317   {
00318     if (sc == scNameTable[i].sc)
00319       return scNameTable[i].lpszName;
00320   }
00321
00322   static TCHAR szError[32] ;
00323   _stprintf_s( szError, 32, _T("%#08.8x"), sc ) ;
00324
00325   return szError ;    // not found
00326 }
00327
00328 LPCTSTR AFXAPI _GetScodeRangeString(SCODE sc)
00329 {
00330   struct RANGE_ENTRY
00331   {
00332     SCODE scFirst;
00333     SCODE scLast;
00334     LPCTSTR lpszName;
00335   };
00336   #define MAKE_RANGE_ENTRY(scRange) \
00337     { scRange##_FIRST, scRange##_LAST, \
00338       _T(#scRange) _T("_FIRST...") _T(#scRange) _T("_LAST") }
00339
00340   static const RANGE_ENTRY scRangeTable[] =
00341   {
00342     MAKE_RANGE_ENTRY(CACHE_E),
00343     MAKE_RANGE_ENTRY(CACHE_S),
00344     MAKE_RANGE_ENTRY(CLASSFACTORY_E),
00345     MAKE_RANGE_ENTRY(CLASSFACTORY_S),
00346     MAKE_RANGE_ENTRY(CLIENTSITE_E),
00347     MAKE_RANGE_ENTRY(CLIENTSITE_S),
00348     MAKE_RANGE_ENTRY(CLIPBRD_E),
00349     MAKE_RANGE_ENTRY(CLIPBRD_S),
00350     MAKE_RANGE_ENTRY(CONVERT10_E),
00351     MAKE_RANGE_ENTRY(CONVERT10_S),
00352     MAKE_RANGE_ENTRY(CO_E),
00353     MAKE_RANGE_ENTRY(CO_S),
00354     MAKE_RANGE_ENTRY(DATA_E),
00355     MAKE_RANGE_ENTRY(DATA_S),
00356     MAKE_RANGE_ENTRY(DRAGDROP_E),
00357     MAKE_RANGE_ENTRY(DRAGDROP_S),
00358     MAKE_RANGE_ENTRY(ENUM_E),
00359     MAKE_RANGE_ENTRY(ENUM_S),
00360     MAKE_RANGE_ENTRY(INPLACE_E),
00361     MAKE_RANGE_ENTRY(INPLACE_S),
00362     MAKE_RANGE_ENTRY(MARSHAL_E),
00363     MAKE_RANGE_ENTRY(MARSHAL_S),
00364     MAKE_RANGE_ENTRY(MK_E),
00365     MAKE_RANGE_ENTRY(MK_S),
00366     MAKE_RANGE_ENTRY(OLEOBJ_E),
00367     MAKE_RANGE_ENTRY(OLEOBJ_S),
00368     MAKE_RANGE_ENTRY(OLE_E),
00369     MAKE_RANGE_ENTRY(OLE_S),
00370     MAKE_RANGE_ENTRY(REGDB_E),
00371     MAKE_RANGE_ENTRY(REGDB_S),
00372     MAKE_RANGE_ENTRY(VIEW_E),
00373     MAKE_RANGE_ENTRY(VIEW_S),
00374   };
00375   #undef MAKE_RANGE_ENTRY
00376
00377   // look for it in the table
00378   for (int i = 0; i < _COUNTOF(scRangeTable); i++)
00379   {
00380     if (sc >= scRangeTable[i].scFirst && sc <= scRangeTable[i].scLast)
00381       return scRangeTable[i].lpszName;
00382   }
00383   return NULL;    // not found
00384 }
00385
00386 LPCTSTR AFXAPI _GetSeverityString(SCODE sc)
00387 {
00388   static const TCHAR* rgszSEVERITY[] =
00389   {
00390     _T("SEVERITY_SUCCESS"),
00391     _T("SEVERITY_ERROR"),
00392   };
00393   return rgszSEVERITY[SCODE_SEVERITY(sc)];
00394 }
00395
00396 LPCTSTR AFXAPI _GetFacilityString(SCODE sc)
00397 {
00398   static const TCHAR* rgszFACILITY[] =
00399   {
00400     _T("FACILITY_NULL"),
00401     _T("FACILITY_RPC"),
00402     _T("FACILITY_DISPATCH"),
00403     _T("FACILITY_STORAGE"),
00404     _T("FACILITY_ITF"),
00405     _T("FACILITY_0x05"),
00406     _T("FACILITY_0x06"),
00407     _T("FACILITY_WIN32"),
00408     _T("FACILITY_WINDOWS"),
00409   };
00410   if (SCODE_FACILITY(sc) >= _COUNTOF(rgszFACILITY) || SCODE_FACILITY(sc) < 0)
00411     return _T("<Unknown Facility>");
00412
00413   return rgszFACILITY[SCODE_FACILITY(sc)];
00414 }
00415
00416 LPCTSTR AFXAPI _GetFullScodeString(SCODE sc)
00417 {
00418   static TCHAR szBuf[128];
00419   LPCTSTR lpsz;
00420   if ((lpsz = _GetScodeString(sc)) != NULL)
00421   {
00422     // found exact match
00423     _stprintf_s(szBuf, 128, _T("%s ($%08lX)"), lpsz, sc);
00424   }
00425   else if ((lpsz = _GetScodeRangeString(sc)) != NULL)
00426   {
00427     // found suitable range
00428     _stprintf_s(szBuf, 128, _T("range: %s ($%08lX)"), lpsz, sc);
00429   }
00430   else
00431   {
00432     // not found at all -- split it up into its parts
00433     _stprintf_s(szBuf, 128, _T("severity: %s, facility: %s ($%08lX)"),
00434       _GetSeverityString(sc), _GetFacilityString(sc), sc);
00435   }
00436   return szBuf;
00437 }
00438
00439
00440 LPTSTR HRtoString( HRESULT hr )
00441 {
00442   SCODE   sc ;
00443   sc = GetScode( hr ) ;
00444
00445 #ifdef FORMATMSG
00446   LPVOID lpMessageBuffer ;
00447   if (FormatMessage(
00448       FORMAT_MESSAGE_ALLOCATE_BUFFER |
00449       FORMAT_MESSAGE_FROM_SYSTEM,
00450       NULL,
00451       sc,
00452       MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
00453       (LPTSTR) &lpMessageBuffer,
00454       0,
00455       NULL ))
00456   {
00457     wsprintf( sz, _T( "%s (0x%lx)" ), (LPTSTR)lpMessageBuffer, sc);
00458     LocalFree(lpMessageBuffer) ;
00459   }
00460   else
00461   {
00462     wsprintf( sz, _T( "Unknown Scode (0x%lx)" ), sc);
00463   }
00464
00465
00466 #endif // !FORMATMSG
00467
00468   return (LPTSTR)_GetFullScodeString(sc) ;
00469 }
00470
00471 #include <ctype.h>
00472 // Very useful API that parses a LONG out of a string, updating
00473 // the string pointer before it returns.
00474 //
00475 LONG WINAPI ParseOffNumber( LPTSTR FAR *lplp, LPINT lpConv )
00476 {
00477   LPTSTR lp = *lplp;
00478   LONG  lValue=0;
00479   int   sign=1;
00480   #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
00481   while( isspace(*lp) )
00482     lp++;
00483   if( *lp=='-' )
00484   {
00485     sign = -1;
00486     lp++;
00487   }
00488   if (*lp=='\0')
00489   {
00490     *lpConv = FALSE;
00491     return 0L;
00492   }
00493
00494   // Is it a decimal number
00495   #ifdef UNICODE
00496   if( _wcsnicmp( lp, (LPTSTR)_T("0x"),2) )
00497   #else
00498   #ifdef WIN32
00499   if( _strnicmp( lp, (LPTSTR)_T("0x"),2) )
00500   #else
00501   if( _fstrnicmp( lp, (LPTSTR)_T("0x"),2) )
00502   #endif
00503   #endif
00504   {
00505     #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
00506     while( isdigit(*lp) )
00507     {
00508       lValue *= 10;
00509       lValue += (*lp - (TCHAR)'0');
00510       lp++;
00511     }
00512   }
00513   else
00514   {
00515     lp+=2;
00516     #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
00517     while( isxdigit(*lp) )
00518     {
00519       lValue *= 16;
00520       #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
00521       if( isdigit(*lp) )
00522         lValue += (*lp - (TCHAR)'0');
00523       else
00524         lValue += (toupper(*lp) - (TCHAR)'A' + 10);
00525       lp++;
00526     }
00527   }
00528   #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
00529   while( isspace(*lp) )
00530     lp++;
00531
00532   lValue *= (long)sign;
00533
00534   if (*lp==(TCHAR)',')
00535   {
00536     lp++;
00537     #pragma warning(suppress: 6328) // unexpected type mismatch prefast warning
00538     while( isspace(*lp) )
00539       lp++;
00540     *lplp = lp;
00541     if (lpConv)
00542       *lpConv = (int)TRUE;
00543   }
00544   else
00545   {
00546     *lplp = lp;
00547     if (lpConv)
00548       *lpConv = (int)(*lp=='\0');
00549   }
00550   return lValue;
00551
00552 } //*** ParseOffNumber
00553
00554 static TCHAR* BASED_CODE g_rgszVT[] =
00555 {
00556   _T("void"),             //VT_EMPTY           = 0,   /* [V]   [P]  nothing                     */
00557   _T("null"),             //VT_NULL            = 1,   /* [V]        SQL style Null              */
00558   _T("short"),            //VT_I2              = 2,   /* [V][T][P]  2 byte signed int           */
00559   _T("long"),             //VT_I4              = 3,   /* [V][T][P]  4 byte signed int           */
00560   _T("single"),           //VT_R4              = 4,   /* [V][T][P]  4 byte real                 */
00561   _T("double"),           //VT_R8              = 5,   /* [V][T][P]  8 byte real                 */
00562   _T("CURRENCY"),         //VT_CY              = 6,   /* [V][T][P]  currency                    */
00563   _T("DATE"),             //VT_DATE            = 7,   /* [V][T][P]  date                        */
00564   _T("BSTR"),             //VT_BSTR            = 8,   /* [V][T][P]  binary string               */
00565   _T("IDispatch*"),       //VT_DISPATCH        = 9,   /* [V][T]     IDispatch FAR*              */
00566   _T("SCODE"),            //VT_ERROR           = 10,  /* [V][T]     SCODE                       */
00567   _T("boolean"),          //VT_BOOL            = 11,  /* [V][T][P]  True=-1, False=0            */
00568   _T("VARIANT"),          //VT_VARIANT         = 12,  /* [V][T][P]  VARIANT FAR*                */
00569   _T("IUnknown*"),        //VT_UNKNOWN         = 13,  /* [V][T]     IUnknown FAR*               */
00570   _T("wchar_t"),          //VT_WBSTR           = 14,  /* [V][T]     wide binary string          */
00571   _T(""),                 //                   = 15,
00572   _T("char"),             //VT_I1              = 16,  /*    [T]     signed char                 */
00573   _T("unsigned char"),             //VT_UI1             = 17,  /*    [T]     unsigned char               */
00574   _T("unsigned short"),           //VT_UI2             = 18,  /*    [T]     unsigned short              */
00575   _T("unsigned long"),            //VT_UI4             = 19,  /*    [T]     unsigned short              */
00576   _T("int64"),            //VT_I8              = 20,  /*    [T][P]  signed 64-bit int           */
00577   _T("uint64"),           //VT_UI8             = 21,  /*    [T]     unsigned 64-bit int         */
00578   _T("int"),              //VT_INT             = 22,  /*    [T]     signed machine int          */
00579   _T("unsigned int"),             //VT_UINT            = 23,  /*    [T]     unsigned machine int        */
00580   _T("void"),             //VT_VOID            = 24,  /*    [T]     C style void                */
00581   _T("HRESULT"),          //VT_HRESULT         = 25,  /*    [T]                                 */
00582   _T("PTR"),              //VT_PTR             = 26,  /*    [T]     pointer type                */
00583   _T("SAFEARRAY"),        //VT_SAFEARRAY       = 27,  /*    [T]     (use VT_ARRAY in VARIANT)   */
00584   _T("CARRAY"),           //VT_CARRAY          = 28,  /*    [T]     C style array               */
00585   _T("USERDEFINED"),      //VT_USERDEFINED     = 29,  /*    [T]     user defined type         */
00586   _T("LPSTR"),            //VT_LPSTR           = 30,  /*    [T][P]  null terminated string      */
00587   _T("LPWSTR"),           //VT_LPWSTR          = 31,  /*    [T][P]  wide null terminated string */
00588   _T(""),                 //                   = 32,
00589   _T(""),                 //                   = 33,
00590   _T(""),                 //                   = 34,
00591   _T(""),                 //                   = 35,
00592   _T(""),                 //                   = 36,
00593   _T(""),                 //                   = 37,
00594   _T(""),                 //                   = 38,
00595   _T(""),                 //                   = 39,
00596   _T(""),                 //                   = 40,
00597   _T(""),                 //                   = 41,
00598   _T(""),                 //                   = 42,
00599   _T(""),                 //                   = 43,
00600   _T(""),                 //                   = 44,
00601   _T(""),                 //                   = 45,
00602   _T(""),                 //                   = 46,
00603   _T(""),                 //                   = 47,
00604   _T(""),                 //                   = 48,
00605   _T(""),                 //                   = 49,
00606   _T(""),                 //                   = 50,
00607   _T(""),                 //                   = 51,
00608   _T(""),                 //                   = 52,
00609   _T(""),                 //                   = 53,
00610   _T(""),                 //                   = 54,
00611   _T(""),                 //                   = 55,
00612   _T(""),                 //                   = 56,
00613   _T(""),                 //                   = 57,
00614   _T(""),                 //                   = 58,
00615   _T(""),                 //                   = 59,
00616   _T(""),                 //                   = 60,
00617   _T(""),                 //                   = 61,
00618   _T(""),                 //                   = 62,
00619   _T(""),                 //                   = 63,
00620   _T("FILETIME"),         //VT_FILETIME        = 64,  /*       [P]  FILETIME                    */
00621   _T("BLOB"),             //VT_BLOB            = 65,  /*       [P]  Length prefixed bytes       */
00622   _T("STREAM"),           //VT_STREAM          = 66,  /*       [P]  Name of the stream follows  */
00623   _T("STORAGE"),          //VT_STORAGE         = 67,  /*       [P]  Name of the storage follows */
00624   _T("STREAMED_OBJECT"),  //VT_STREAMED_OBJECT = 68,  /*       [P]  Stream contains an object   */
00625   _T("STORED_OBJECT"),    //VT_STORED_OBJECT   = 69,  /*       [P]  Storage contains an object  */
00626   _T("BLOB_OBJECT"),      //VT_BLOB_OBJECT     = 70,  /*       [P]  Blob contains an object     */
00627   _T("CF"),               //VT_CF              = 71,  /*       [P]  Clipboard format            */
00628   _T("CLSID"),            //VT_CLSID           = 72   /*       [P]  A Class ID                  */
00629 };
00630
00631 CString VTtoString( VARTYPE vt )
00632 {
00633   CString str ;
00634   vt &= ~0xF000 ;
00635   if (vt <= VT_CLSID)
00636      str = g_rgszVT[vt]  ;
00637   else
00638      str = "BAD VARTYPE" ;
00639
00640   return str ;
00641 }
00642 CString TYPEDESCtoString( ITypeInfo* pti, TYPEDESC* ptdesc )
00643 {
00644   CString str ;
00645
00646   if (ptdesc->vt == VT_PTR)
00647   {
00648     // ptdesc->lptdesc points to a TYPEDESC that specifies the thing pointed to
00649
00650     str = TYPEDESCtoString( pti, ptdesc->lptdesc ) ;
00651     str += "*" ;
00652     return str.AllocSysString() ;
00653   }
00654
00655   if ((ptdesc->vt & 0x0FFF) == VT_CARRAY)
00656   {
00657     // ptdesc->lpadesc points to an ARRAYDESC
00658     str = TYPEDESCtoString( pti, &ptdesc->lpadesc->tdescElem ) ;
00659
00660     // Allocate cDims * lstrlen("[123456]")
00661     CString strTemp ;
00662     for (USHORT n = 0 ; n < ptdesc->lpadesc->cDims ; n++)
00663     {
00664       strTemp.Format( _T("[%d]"), ptdesc->lpadesc->rgbounds[n].cElements ) ;
00665       str += strTemp ;
00666     }
00667     return str ;
00668   }
00669
00670   if ((ptdesc->vt & 0x0FFF) == VT_SAFEARRAY)
00671   {
00672     str = "SAFEARRAY(" + TYPEDESCtoString( pti, ptdesc->lptdesc ) + ")" ;
00673     return str ;
00674   }
00675
00676   if (ptdesc->vt == VT_USERDEFINED)
00677   {
00678     // Use ptdesc->hreftype and pti->GetRefTypeInfo
00679     //
00680     ASSERT(pti) ;
00681     ITypeInfo* ptiRefType = NULL ;
00682     HRESULT hr = pti->GetRefTypeInfo( ptdesc->hreftype, &ptiRefType ) ;
00683     if (SUCCEEDED(hr))
00684     {
00685       BSTR            bstrName = NULL ;
00686       BSTR            bstrDoc = NULL ;
00687       BSTR            bstrHelp = NULL ;
00688       DWORD           dwHelpID ;
00689       hr = ptiRefType->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
00690       if (FAILED(hr))
00691       {
00692         #ifdef _DEBUG
00693         ErrorMessage(_T("ITypeInfo::GetDocumentation() failed"), hr ) ;
00694         #endif
00695         return _T("ITypeInfo::GetDocumentation() failed in TYPEDESCToString") ;
00696       }
00697
00698       str = bstrName ;
00699
00700       SysFreeString(bstrName) ;
00701       SysFreeString( bstrDoc ) ;
00702       SysFreeString( bstrHelp ) ;
00703
00704       ptiRefType->Release() ;
00705     }
00706     else
00707     {
00708       #ifdef _DEBUG
00709       ErrorMessage( _T("GetRefTypeInfo failed in TYPEDESCToString"), hr ) ;
00710       #endif
00711       return _T("<GetRefTypeInfo failed>") ;
00712     }
00713
00714     return str ;
00715   }
00716   return VTtoString( ptdesc->vt );
00717 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PChngPg.Cpp Source File

  • ole
  • TstCon

PChngPg.Cpp

Go to the documentation of this file.
00001 // PropertyChangesPage.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CPropertyChangesPage property page
00022
00023 IMPLEMENT_DYNCREATE(CPropertyChangesPage, CPropertyPage)
00024
00025 CPropertyChangesPage::CPropertyChangesPage() :
00026    CPropertyPage( CPropertyChangesPage::IDD )
00027 {
00028    m_psp.dwFlags &= ~PSP_HASHELP;
00029
00030   //{{AFX_DATA_INIT(CPropertyChangesPage)
00031     // NOTE: the ClassWizard will add member initialization here
00032   //}}AFX_DATA_INIT
00033 }
00034
00035 CPropertyChangesPage::~CPropertyChangesPage()
00036 {
00037 }
00038
00039 void CPropertyChangesPage::DoDataExchange( CDataExchange* pDX )
00040 {
00041    int iProperty;
00042    int iItem;
00043
00044   CPropertyPage::DoDataExchange( pDX );
00045   //{{AFX_DATA_MAP(CPropertyChangesPage)
00046   DDX_Control(pDX, IDC_PROPERTIES_CHANGES, m_lbProperties);
00047   //}}AFX_DATA_MAP
00048
00049    if( m_lbProperties.GetCount() > 0 )
00050    {
00051     for( iProperty = 0; iProperty < m_astrPropertyNames.GetSize();
00052      iProperty++ )
00053     {
00054      iItem = m_lbProperties.FindStringExact( -1, m_astrPropertyNames[
00055       iProperty] );
00056      ASSERT( iItem != LB_ERR );
00057      if( pDX->m_bSaveAndValidate )
00058      {
00059       m_atLogFlags[iProperty] = m_lbProperties.GetCheck( iItem );
00060      }
00061      else
00062      {
00063       m_lbProperties.SetCheck( iItem, m_atLogFlags[iProperty] != FALSE );
00064      }
00065     }
00066    }
00067 }
00068
00069
00070 BEGIN_MESSAGE_MAP(CPropertyChangesPage, CPropertyPage)
00071   //{{AFX_MSG_MAP(CPropertyChangesPage)
00072   ON_WM_HELPINFO()
00073   ON_WM_CONTEXTMENU()
00074   //}}AFX_MSG_MAP
00075 END_MESSAGE_MAP()
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // CPropertyChangesPage message handlers
00079
00080 BOOL CPropertyChangesPage::OnInitDialog()
00081 {
00082    int iProperty;
00083
00084   CPropertyPage::OnInitDialog();
00085
00086    for( iProperty = 0; iProperty < m_astrPropertyNames.GetSize(); iProperty++ )
00087    {
00088     m_lbProperties.AddString( m_astrPropertyNames[iProperty] );
00089    }
00090
00091    UpdateData( FALSE );
00092
00093   return( TRUE );
00094 }
00095
00096
00097 static DWORD rgmapCHID[] =
00098 {
00099    IDC_PROPERTIES_CHANGES, HIDC_PROPERTIES_CHANGES,
00100    0, 0
00101 };
00102
00103 BOOL CPropertyChangesPage::OnHelpInfo( HELPINFO* pHelpInfo )
00104 {
00105   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00106   strPath += _T("::/popups.txt");
00107
00108   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00109 }
00110
00111 void CPropertyChangesPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00112 {
00113   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00114   strPath += _T("::/popups.txt");
00115
00116   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00117 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNewAmbientPropertyDlg Member List

This is the complete list of members for CNewAmbientPropertyDlg, including all inherited members.
CNewAmbientPropertyDlg(CWnd *pParent=NULL) | CNewAmbientPropertyDlg |
DoDataExchange(CDataExchange *pDX) | CNewAmbientPropertyDlg | [protected, virtual]
IDD enum value | CNewAmbientPropertyDlg |
m_dispid | CNewAmbientPropertyDlg |
m_editName | CNewAmbientPropertyDlg |
m_strName | CNewAmbientPropertyDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CNewAmbientPropertyDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CNewAmbientPropertyDlg | [protected]
OnInitDialog() | CNewAmbientPropertyDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/mfccalc.cpp Source File

  • ole
  • mfccalc

mfccalc.cpp

Go to the documentation of this file.
00001 // mfccalc.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mfccalc.h"
00014 #include "calcdlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CCalcApp
00023
00024 BEGIN_MESSAGE_MAP(CCalcApp, CWinApp)
00025   //{{AFX_MSG_MAP(CCalcApp)
00026     // NOTE - the ClassWizard will add and remove mapping macros here.
00027     //    DO NOT EDIT what you see in these blocks of generated code!
00028   //}}AFX_MSG
00029   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CCalcApp construction
00034
00035 CCalcApp::CCalcApp()
00036 {
00037   // TODO: add construction code here,
00038   // Place all significant initialization in InitInstance
00039 }
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // The one and only CCalcApp object
00043
00044 CCalcApp theApp;
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CCalcApp initialization
00048
00049 BOOL CCalcApp::InitInstance()
00050 {
00051   // Initialize OLE 2.0 libraries
00052   if (!AfxOleInit())
00053   {
00054     AfxMessageBox(IDP_OLE_INIT_FAILED);
00055     return FALSE;
00056   }
00057
00058   // Parse the command line to see if launched as OLE server
00059   if (RunEmbedded() || RunAutomated())
00060   {
00061     // Register all OLE server (factories) as running.  This enables the
00062     //  OLE 2.0 libraries to create objects from other applications.
00063     COleTemplateServer::RegisterAll();
00064
00065     // Do not continue with rest of initialization.  Wait for
00066     // client to create a CCalcDlg object instead.
00067     return TRUE;
00068   }
00069
00070   // When a server application is launched stand-alone, it is a good idea
00071   //  to update the system registry in case it has been damaged.
00072   COleObjectFactory::UpdateRegistryAll();
00073
00074   // create a modeless dialog as the main window of the application
00075   //This disables the warning that the dialog could leak -
00076   //it will not leak since the Set Visible registers the dialog as
00077   //the main frame and any windows message that closes that dialog
00078   //causes the parent class to call the destructor
00079   #pragma warning( push )
00080   #pragma warning(disable:6014)
00081   CCalcDlg* pDlg = new CCalcDlg;
00082   #pragma warning( pop )
00083   pDlg->SetVisible(TRUE);
00084   if (!pDlg->GetVisible())
00085   {
00086     // if GetVisible fails after SetVisibile, we never registered
00087     // the pDlg with the parent class, and it will not be deleted
00088     AfxMessageBox(IDP_UNABLE_TO_SHOW_CALC);
00089     delete pDlg;
00090     return FALSE;
00091   }
00092   pDlg->RegisterActive();
00093
00094   // We are using a modeless dialog so we can translate accelerator keys
00095   // against the dialog.  In order to run the main message pump,
00096   // InitInstance must return TRUE even though this application is
00097   // a dialog-based application.
00098   return TRUE;
00099 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkspaceBar.h Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkspaceBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CWorkspaceToolBar : public CMFCToolBar
00014 {
00015 public:
00016   // All commands should be routed via owner window, not via frame:
00017   virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
00018   {
00019     CMFCToolBar::OnUpdateCmdUI ((CFrameWnd*) GetOwner (), bDisableIfNoHndler);
00020   }
00021
00022   // Toolbar should't appear on the customization list
00023   virtual BOOL AllowShowOnList () const   { return FALSE; }
00024   virtual void AdjustLayout ();
00025 };
00026
00027
00028 class CWorkspaceBar : public CDockablePane
00029 {
00030 public:
00031   CWorkspaceBar();
00032
00033 // Attributes
00034 protected:
00035   CWorkspaceToolBar m_wndToolBar;
00036   CMFCTabCtrl     m_wndTabs;
00037
00038   CTreeCtrl     m_wndTree1;
00039   CTreeCtrl     m_wndTree2;
00040
00041 // Operations
00042 public:
00043   void AdjustLayout ();
00044
00045 // Overrides
00046
00047 // Implementation
00048 public:
00049   virtual ~CWorkspaceBar();
00050
00051 protected:
00052   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00053   afx_msg void OnSize(UINT nType, int cx, int cy);
00054   afx_msg void OnCommand1();
00055   afx_msg void OnCommand2();
00056   afx_msg void OnCommand3();
00057   afx_msg void OnUpdateCommand3(CCmdUI* pCmdUI);
00058
00059   DECLARE_MESSAGE_MAP()
00060 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/Resource.h Source File

  • vc2008fp
  • MSMoneyDemo

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by MSMoneyDemo.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDP_SOCKETS_INIT_FAILED         104
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_MSMONETYPE              129
00009 #define IDB_MENU_IMAGES                 134
00010 #define IDR_FORWARD_MENU                144
00011 #define IDR_BACKWARD_MENU               145
00012 #define IDB_PRESSEDTOOLBAR              146
00013 #define IDB_MSM_VIEW_BKGND          147
00014 #define IDB_COLDTOOLBAR                 261
00015 #define IDB_HOTTOOLBAR                  262
00016 #define IDB_DISABLEDTOOLBAR             263
00017 #define IDB_MENU_IMAGES_16              264
00018 #define IDS_BACK                        748
00019 #define IDS_FORWARD                     749
00020 #define IDS_STOP                        750
00021 #define IDS_REFRESH                     751
00022 #define IDC_MAIL                        1000
00023 #define IDC_URL                         1001
00024 #define IDC_VERSION                     1002
00025 #define ID_VIEW_CUSTOMIZE               32770
00026 #define ID_VIEW_STOP                    32778
00027 #define ID_VIEW_REFRESH                 32779
00028 #define ID_GO_BACK                      32787
00029 #define ID_GO_FORWARD                   32788
00030 #define ID_GO_ADDRESS                   32830
00031 #define ID_GO_ADDRESS_EDIT              32831
00032 #define ID_CATEGORIE_1                  32832
00033 #define ID_CATEGORIE_2                  32833
00034 #define ID_CATEGORIE_3                  32834
00035 #define ID_CATEGORIE_4                  32835
00036 #define ID_CATEGORIE_5                  32836
00037 #define ID_CATEGORIE_6                  32837
00038 #define ID_CATEGORIE_7                  32838
00039 #define ID_CATEGORIE_8                  32839
00040 #define ID_LINKS_HOME_1                 32840
00041 #define ID_LINKS_HOME_2                 32841
00042 #define ID_LINKS_BANKING_1              32842
00043 #define ID_LINKS_BANKING_2              32843
00044 #define ID_LINKS_BANKING_3              32844
00045 #define ID_LINKS_BANKING_4              32845
00046 #define ID_LINKS_BANKING_5              32846
00047 #define ID_LINKS_BILLS_1                32847
00048 #define ID_LINKS_BILLS_2                32848
00049 #define ID_LINKS_BILLS_3                32849
00050 #define ID_LINKS_BILLS_4                32850
00051 #define ID_LINKS_BILLS_5                32851
00052 #define ID_LINKS_REPORTS_1              32852
00053 #define ID_LINKS_REPORTS_2              32853
00054 #define ID_LINKS_REPORTS_3              32854
00055 #define ID_LINKS_BUDGET_1               32855
00056 #define ID_LINKS_BUDGET_2               32856
00057 #define ID_LINKS_INVESTING_1            32857
00058 #define ID_LINKS_INVESTING_2            32858
00059 #define ID_LINKS_INVESTING_3            32859
00060 #define ID_LINKS_INVESTING_4            32860
00061 #define ID_LINKS_INVESTING_5            32861
00062 #define ID_LINKS_INVESTING_6            32862
00063 #define ID_LINKS_INVESTING_7            32863
00064 #define ID_LINKS_PLANNING_1             32864
00065 #define ID_LINKS_PLANNING_2             32865
00066 #define ID_LINKS_PLANNING_3             32866
00067 #define ID_LINKS_PLANNING_4             32867
00068 #define ID_LINKS_PLANNING_5             32868
00069 #define ID_LINKS_PLANNING_6             32869
00070 #define ID_LINKS_TAXES_1                32870
00071 #define ID_LINKS_TAXES_2                32871
00072 #define ID_LINKS_TAXES_3                32872
00073 #define ID_LINKS_TAXES_4                32873
00074 #define ID_LINKS_TAXES_5                32874
00075 #define ID_TOOLBAR_CUSTOMIZE            32875
00076 #define ID_FORWARD_1                    32876
00077 #define ID_FORWARD_2                    32877
00078 #define ID_BACKWARD_1                   32878
00079 #define ID_BACKWARD_2                   32879
00080 #define ID_HELP_MICROSOFT               32880
00081 #define ID_APP_HELP_MICROSOFT           32881
00082
00083 // Next default values for new objects
00084 //
00085 #ifdef APSTUDIO_INVOKED
00086 #ifndef APSTUDIO_READONLY_SYMBOLS
00087 #define _APS_3D_CONTROLS                     1
00088 #define _APS_NEXT_RESOURCE_VALUE        148
00089 #define _APS_NEXT_COMMAND_VALUE         32882
00090 #define _APS_NEXT_CONTROL_VALUE         1004
00091 #define _APS_NEXT_SYMED_VALUE           102
00092 #endif
00093 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRollupPaneDoc Member List

This is the complete list of members for CRollupPaneDoc, including all inherited members.
CRollupPaneDoc() | CRollupPaneDoc | [protected]
OnNewDocument() | CRollupPaneDoc | [virtual]
Serialize(CArchive &ar) | CRollupPaneDoc | [virtual]
~CRollupPaneDoc() | CRollupPaneDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CShapePreviewWnd Member List

This is the complete list of members for CShapePreviewWnd, including all inherited members.
CModalShapePropSheet class | CShapePreviewWnd | [friend]
CShapePreviewWnd() | CShapePreviewWnd | [private]
OnEraseBkgnd(CDC *pDC) | CShapePreviewWnd | [private]
OnPaint() | CShapePreviewWnd | [private]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/stdafx.h Source File

  • ole
  • acdual
  • acdualdriv

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <afxwin.h>         // MFC core and standard components
00013 #include <afxext.h>         // MFC extensions
00014 #include <afxdisp.h>
00015
00016 #include "..\ACDual.h"       // AutoClik dual interface definitions
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/dwarryvw.h Source File

  • advanced
  • collect

dwarryvw.h

Go to the documentation of this file.
00001 // dwarryvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CDWordArrayView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CDWordArrayView : public CFormView
00020 {
00021 public:
00022   CDWordArrayView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CDWordArrayView)
00024
00025 // Attributes
00026 public:
00027   CCollectDoc* GetDocument();
00028
00029 // Overrides
00030 public:
00031   void OnInitialUpdate();
00032
00033 // Form Data
00034 public:
00035   //{{AFX_DATA(CDWordArrayView)
00036   enum { IDD = IDD_DWORD_ARRAY };
00037   CListBox    m_ctlList;
00038   DWORD   m_dw;
00039   //}}AFX_DATA
00040
00041 // Overrides
00042   // ClassWizard generate virtual function overrides
00043   //{{AFX_VIRTUAL(CDWordArrayView)
00044   protected:
00045   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00046   //}}AFX_VIRTUAL
00047
00048 // Implementation
00049 protected:
00050   virtual ~CDWordArrayView();
00051 #ifdef _DEBUG
00052   virtual void AssertValid() const;
00053   virtual void Dump(CDumpContext& dc) const;
00054 #endif
00055
00056   // Generated message map functions
00057   //{{AFX_MSG(CDWordArrayView)
00058   afx_msg void OnAdd();
00059   afx_msg void OnUpdateButton();
00060   afx_msg void OnRemove();
00061   afx_msg void OnRemoveAll();
00062   afx_msg void OnSelChangeList();
00063   //}}AFX_MSG
00064   DECLARE_MESSAGE_MAP()
00065 };
00066
00067 #ifndef _DEBUG
00068 inline CCollectDoc* CDWordArrayView::GetDocument()
00069    { return (CCollectDoc*)m_pDocument; }
00070 #endif
00071
00072 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemo.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MSMoneyDemo.cpp : Defines the class behaviors for the application.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMoneyDemo.h"
00015
00016 #include "MainFrm.h"
00017 #include "MSMoneyDemoDoc.h"
00018 #include "MSMoneyDemoView.h"
00019
00020 #include "MSMDialog.h"
00021
00022 #ifdef _DEBUG
00023 #define new DEBUG_NEW
00024 #undef THIS_FILE
00025 static char THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CMSMoneyDemoApp
00030
00031 BEGIN_MESSAGE_MAP(CMSMoneyDemoApp, CWinAppEx)
00032   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CMSMoneyDemoApp construction
00040
00041 CMSMoneyDemoApp::CMSMoneyDemoApp()
00042 {
00043   // TODO: add construction code here,
00044   // Place all significant initialization in InitInstance
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CMSMoneyDemoApp object
00049
00050 CMSMoneyDemoApp theApp;
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CMSMoneyDemoApp initialization
00054
00055 BOOL CMSMoneyDemoApp::InitInstance()
00056 {
00057   AfxEnableControlContainer();
00058
00059   // Standard initialization
00060   // If you are not using these features and wish to reduce the size
00061   //  of your final executable, you should remove from the following
00062   //  the specific initialization routines you do not need.
00063
00064   // Change the registry key under which our settings are stored.
00065   // TODO: You should modify this string to be something appropriate
00066   // such as the name of your company or organization.
00067   SetRegistryKey(_T("Microsoft\\MFC\\Examples"));
00068
00069   LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)
00070
00071   SetRegistryBase (_T("Settings"));
00072
00073   // Initialize all Managers for usage. They are automatically constructed
00074   // if not yet present
00075
00076   // Initialize favorites:
00077
00078   // Register the application's document templates.  Document templates
00079   //  serve as the connection between documents, frame windows and views.
00080
00081   CSingleDocTemplate* pDocTemplate;
00082   pDocTemplate = new CSingleDocTemplate(
00083     IDR_MAINFRAME,
00084     RUNTIME_CLASS(CMSMoneyDemoDoc),
00085     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00086     RUNTIME_CLASS(CMSMoneyDemoView));
00087   AddDocTemplate(pDocTemplate);
00088
00089   // Parse command line for standard shell commands, DDE, file open
00090   CCommandLineInfo cmdInfo;
00091   ParseCommandLine(cmdInfo);
00092
00093   // Dispatch commands specified on the command line
00094   if (!ProcessShellCommand(cmdInfo))
00095     return FALSE;
00096
00097   // The one and only window has been initialized, so show and update it.
00098   m_pMainWnd->ShowWindow(SW_SHOW);
00099   m_pMainWnd->UpdateWindow();
00100
00101   return TRUE;
00102 }
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CMSMoneyDemoApp message handlers
00106
00107 // App command to run the dialog
00108 void CMSMoneyDemoApp::OnAppAbout()
00109 {
00110   // ShowAboutDlg (AFX_IDS_APP_TITLE);
00111 }
00112
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CMSMoneyDemoApp message handlers
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/targetver.h Source File

  • vc2008fp
  • DesktopAlertDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
00012
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MainFrm.h Source File

  • vc2008fp
  • MSMoneyDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 //*******************************************************************************
00011 //
00012 // MainFrm.h : interface of the CMainFrame class
00013 //
00014 /////////////////////////////////////////////////////////////////////////////
00015
00016 #pragma once
00017
00018 #include "MSMCaptionBar.h"
00019 #include "MSMMenuBar.h"
00020 #include "MSMToolBar.h"
00021 #include "MSMTasksPane.h"
00022 #include "MSMCategoryBar.h"
00023 #include "MSMLinksBar.h"
00024
00025 #define CFrameWnd CFrameWndEx
00026
00027 class CMainFrame : public CFrameWnd
00028 {
00029
00030 protected: // create from serialization only
00031   CMainFrame();
00032
00033   DECLARE_DYNCREATE(CMainFrame)
00034
00035 // Attributes
00036 public:
00037
00038 // Operations
00039 public:
00040
00041 // Implementation
00042 public:
00043
00044   virtual ~CMainFrame();
00045
00046   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00047
00048 #ifdef _DEBUG
00049   virtual void AssertValid() const;
00050   virtual void Dump(CDumpContext& dc) const;
00051 #endif
00052
00053 protected:
00054   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00055   afx_msg void OnClose();
00056   afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
00057   afx_msg void OnSize(UINT nType, int cx, int cy);
00058   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00059   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00060   afx_msg void OnUpdateGoAddressEdit(CCmdUI* pCmdUI);
00061   afx_msg void OnUpdateBackward1(CCmdUI* pCmdUI);
00062   afx_msg void OnUpdateBackward2(CCmdUI* pCmdUI);
00063   afx_msg void OnUpdateForward1(CCmdUI* pCmdUI);
00064   afx_msg void OnUpdateForward2(CCmdUI* pCmdUI);
00065   afx_msg void OnUpdateCustomize(CCmdUI* pCmdUI);
00066   afx_msg void OnCategorie(UINT nID);
00067   afx_msg void OnUpdateCategorie(CCmdUI* pCmdUI);
00068   afx_msg void OnLinks(UINT nID);
00069   afx_msg void OnUpdateLinks(CCmdUI* pCmdUI);
00070   afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
00071   afx_msg void OnHelpMicrosoft();
00072   afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
00073
00074   DECLARE_MESSAGE_MAP()
00075
00076 private:
00077   void SetupMemoryBitmapSize (const CSize& sz);
00078
00079   CMSMLinksBar*    GetLinksBar (UINT nID);
00080
00081   CMSMCaptionBar   m_wndCaptionBar;
00082   CMSMMenuBar      m_wndMenuBar;
00083   CMSMToolBar      m_wndToolBar;
00084   CMSMCategoryBar  m_wndCategoryBar;
00085   CMSMLinksBar     m_wndLinksBars[8];
00086   CMSMTasksPane    m_wndTaskPane;
00087
00088   CMenu        m_menuFavotites;
00089
00090   BOOL         m_bIsHighColor;
00091   BOOL         m_bMainToolbarMenu;
00092
00093   UINT         m_nCategorie;
00094 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cube.h Source File

  • advanced
  • cube

cube.h

Go to the documentation of this file.
00001 // cube.h : main header file for the CUBE application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CCubeApp:
00020 // See cube.cpp for the implementation of this class
00021 //
00022
00023 class CCubeApp : public CWinApp
00024 {
00025 public:
00026   CCubeApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CCubeApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CCubeApp)
00038   afx_msg void OnAppAbout();
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcie.h Source File

  • internet
  • MFCIE

mfcie.h

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // mfcie.h : main header file for the MFCIE application
00011 //
00012
00013 #if !defined(AFX_MFCIE_H__47FF407D_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
00014 #define AFX_MFCIE_H__47FF407D_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_
00015
00016 #if _MSC_VER >= 1000
00017 #pragma once
00018 #endif // _MSC_VER >= 1000
00019
00020 #ifndef __AFXWIN_H__
00021   #error include 'stdafx.h' before including this file for PCH
00022 #endif
00023
00024 #include "resource.h"       // main symbols
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMfcieApp:
00028 // See mfcie.cpp for the implementation of this class
00029 //
00030
00031 class CMfcieApp : public CWinApp
00032 {
00033 public:
00034   CMfcieApp();
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CMfcieApp)
00039   public:
00040   virtual BOOL InitInstance();
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044
00045   //{{AFX_MSG(CMfcieApp)
00046   afx_msg void OnAppAbout();
00047     // NOTE - the ClassWizard will add and remove member functions here.
00048     //    DO NOT EDIT what you see in these blocks of generated code !
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055
00056 //{{AFX_INSERT_LOCATION}}
00057 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00058
00059 #endif // !defined(AFX_MFCIE_H__47FF407D_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenu.h Source File

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenu.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // COwnerDrawMenuApp:
00021 // See OwnerDrawMenu.cpp for the implementation of this class
00022 //
00023
00024 class COwnerDrawMenuApp : public CWinAppEx
00025 {
00026 public:
00027   COwnerDrawMenuApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern COwnerDrawMenuApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/autoclik.odl Source File

  • ole
  • acdual

autoclik.odl

Go to the documentation of this file.
00001 // AutoClik.odl : type library source for AutoClik.exe
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (AutoClik.tlb).
00005
00006 // DUAL_SUPPORT_START
00007 // Original Code:
00008 //    [ uuid(FC866851-9F96-11CE-B0F2-00AA006C28B3), version(1.0) ]
00009 //    library AutoClik
00010 [ uuid(4B115284-32F0-11cf-AC85-444553540000), version(1.0) ]
00011 library ACDual
00012 // DUAL_SUPPORT_END
00013 {
00014   importlib("stdole32.tlb");
00015
00016   // DUAL_SUPPORT_START
00017   // Original Code:
00018   //    //  Primary dispatch interface for CAutoClickDoc
00019   //
00020   //    [ uuid(FC866852-9F96-11CE-B0F2-00AA006C28B3) ]
00021   //    dispinterface IAClick
00022
00023   // Primary dispatch interface for ACDual.Document
00024   //    Used for IDispatch::Invoke access only!
00025
00026   [ uuid(4B115280-32F0-11cf-AC85-444553540000) ]
00027   dispinterface IAClick
00028   // DUAL_SUPPORT_END
00029   {
00030     properties:
00031       // NOTE - ClassWizard will maintain property information here.
00032       //    Use extreme caution when editing this section.
00033       //{{AFX_ODL_PROP(CAutoClickDoc)
00034       [id(1)] BSTR text;
00035       [id(2)] short x;
00036       [id(3)] short y;
00037       [id(4)] IDispatch* Position;
00038       //}}AFX_ODL_PROP
00039
00040     methods:
00041       // NOTE - ClassWizard will maintain method information here.
00042       //    Use extreme caution when editing this section.
00043       //{{AFX_ODL_METHOD(CAutoClickDoc)
00044       [id(5)] void RefreshWindow();
00045       [id(6)] void SetAllProps(short x, short y, BSTR text);
00046       [id(7)] void ShowWindow();
00047       [id(8)] void TestError(short wCode);
00048       //}}AFX_ODL_METHOD
00049
00050   };
00051
00052   // DUAL_INTERFACE_START
00053   //    add equivalent interface definitions, which will be used
00054   //    for VTBL binding. You must specify the attributes
00055   //    "oleautomation" and "dual" for dual interfaces, and
00056   //    your interface must be derived from IDispatch
00057
00058   interface IDualAutoClickPoint;  // defined below
00059
00060   [ uuid(0BDD0E81-0DD7-11cf-BBA8-444553540000), // IID_IDualAClick
00061     oleautomation,
00062     dual
00063   ]
00064   interface IDualAClick : IDispatch
00065   {
00066     // For dual interfaces, methods and properties should
00067     // return HRESULTs and pass return values as parameters
00068     // with the attributes "[out, retval]".
00069
00070     // Convert dispinterface properties...
00071     //    read/write properties need two entries each, one
00072     //    for read (attribute "propget") and one for write
00073     //    (attribute "propput"), with the same id.
00074     [propput, id(1)] HRESULT text([in] BSTR newText);
00075     [propget, id(1)] HRESULT text([out, retval] BSTR* retval);
00076
00077     [propput, id(2)] HRESULT x([in] short newX);
00078     [propget, id(2)] HRESULT x([out, retval] short* retval);
00079
00080     [propput, id(3)] HRESULT y([in] short newY);
00081     [propget, id(3)] HRESULT y([out, retval] short* retval);
00082
00083     [propput, id(4)] HRESULT Position([in] IDualAutoClickPoint* newPosition);
00084     [propget, id(4)] HRESULT Position([out, retval] IDualAutoClickPoint** retval);
00085     [propputref, id(4)] HRESULT Position([in] IDualAutoClickPoint* newPosition);
00086
00087     // Convert dispinterface methods
00088     [id(5)] HRESULT RefreshWindow();
00089     [id(6)] HRESULT SetAllProps([in] short x, [in] short y, [in] BSTR text);
00090     [id(7)] HRESULT ShowWindow();
00091     [id(8)] HRESULT TestError([in] short wCode);
00092
00093   };
00094   // DUAL_SUPPORT_END
00095
00096   // DUAL_SUPPORT_START
00097   // Original Code:
00098   //    //  Class information for CAutoClickDoc
00099   //
00100   //    [ uuid(FC866850-9F96-11CE-B0F2-00AA006C28B3) ]
00101   //    coclass CAutoClickDoc
00102   //    {
00103   //         [default] dispinterface IAClick;
00104   //    };
00105
00106   // Class information for ACDual.Document
00107   //    include both the dispinterface and dual interface,
00108     //    but make the dual interface the default.
00109
00110   [ uuid(4B115281-32F0-11cf-AC85-444553540000) ]
00111   coclass Document
00112   {
00113     dispinterface IAClick;
00114     [default] interface IDualAClick;
00115   };
00116   // DUAL_SUPPORT_END
00117
00118
00119   // DUAL_SUPPORT_START
00120   // Original Code:
00121   //    //  Primary dispatch interface for CAutoClickPoint
00122   //
00123   //    [ uuid(0368D830-A050-11CE-B0F3-00AA006C28B3) ]
00124   //    dispinterface IAutoClickPoint
00125
00126   //  Primary dispatch interface for ACDual.Point
00127   //    Used for IDispatch::Invoke access only!
00128
00129   [ uuid(4B115283-32F0-11cf-AC85-444553540000) ]
00130   dispinterface IAutoClickPoint
00131   // DUAL_SUPPORT_END
00132   {
00133     properties:
00134       // NOTE - ClassWizard will maintain property information here.
00135       //    Use extreme caution when editing this section.
00136       //{{AFX_ODL_PROP(CAutoClickPoint)
00137       [id(1)] short x;
00138       [id(2)] short y;
00139       //}}AFX_ODL_PROP
00140
00141     methods:
00142       // NOTE - ClassWizard will maintain method information here.
00143       //    Use extreme caution when editing this section.
00144       //{{AFX_ODL_METHOD(CAutoClickPoint)
00145       //}}AFX_ODL_METHOD
00146
00147   };
00148
00149   // DUAL_SUPPORT_START
00150   [ uuid(0BDD0E80-0DD7-11cf-BBA8-444553540000), // IID_IDualAutoClickPoint
00151     oleautomation,
00152     dual
00153   ]
00154   interface IDualAutoClickPoint : IDispatch
00155   {
00156     [propput, id(1)] HRESULT x([in] short newX);
00157     [propget, id(1)] HRESULT x([out, retval] short* retval);
00158     [propput, id(2)] HRESULT y([in] short newY);
00159     [propget, id(2)] HRESULT y([out, retval] short* retval);
00160   };
00161   // DUAL_SUPPORT_END
00162
00163   // DUAL_SUPPORT_START
00164   // Original Code:
00165   //     //  Class information for CAutoClickPoint
00166   //
00167   //     [ uuid(0368D831-A050-11CE-B0F3-00AA006C28B3) ]
00168   //     coclass CAutoClickPoint
00169   //     {
00170   //         [default] dispinterface IAutoClickPoint;
00171   //     };
00172
00173   //  Class information for ACDual.Point
00174
00175   [ uuid(4B115285-32F0-11cf-AC85-444553540000) ]
00176   coclass Point
00177   {
00178     dispinterface IAutoClickPoint;
00179     [default] interface IDualAutoClickPoint;
00180   };
00181   // DUAL_SUPPORT_END
00182
00183   //{{AFX_APPEND_ODL}}
00184 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iadvsink.cpp Source File

  • ole
  • oleview
  • iviewers

iadvsink.cpp

Go to the documentation of this file.
00001 /*
00002  * IADVSINK.CPP
00003  *
00004  * Implementation of the IAdviseSink interface for the Data User, Chapter 6
00005 /*
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and related
00012 // electronic documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 /*
00017  * Kraig Brockschmidt, Software Design Engineer
00018  * Microsoft Systems Developer Relations
00019  *
00020  * Internet  :  kraigb@microsoft.com
00021  * Compuserve:  >INTERNET:kraigb@microsoft.com
00022  */
00023 #include "stdafx.h"
00024 #include "iview.h"
00025 #include "util.h"
00026 #include "idataobj.h"
00027 #include "iadvsink.h"
00028
00029 /*
00030  * CImpIAdviseSink::CImpIAdviseSink
00031  * CImpIAdviseSink::~CImpIAdviseSink
00032  *
00033  * Parameters (Constructor):
00034  *  pAV             LPAPPVARS to the application
00035  *
00036  */
00037
00038 CImpIAdviseSink::CImpIAdviseSink( CIDataObjectDlg FAR* lpIDOD )
00039   {
00040   m_cRef=0;
00041   m_pIDOD=lpIDOD;
00042   return;
00043   }
00044
00045 CImpIAdviseSink::~CImpIAdviseSink(void)
00046   {
00047   m_pIDOD->m_pSink = NULL; // make sure the container knows I've been deleted. SteveBl
00048   return;
00049   }
00050
00051
00052
00053
00054 /*
00055  * CImpIAdviseSink::QueryInterface
00056  * CImpIAdviseSink::AddRef
00057  * CImpIAdviseSink::Release
00058  *
00059  * Purpose:
00060  *  IUnknown members for CImpIAdviseSink object.
00061  */
00062
00063 STDMETHODIMP CImpIAdviseSink::QueryInterface(REFIID riid, LPVOID FAR *ppv)
00064   {
00065   *ppv=NULL;
00066
00067   //Any interface on this object is the object pointer.
00068   if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IAdviseSink))
00069     *ppv=(LPVOID)this;
00070
00071   /*
00072    * If we actually assign an interface to ppv we need to AddRef it
00073    * since we're returning a new pointer.
00074    */
00075   if (NULL!=*ppv)
00076     {
00077     ((LPUNKNOWN)*ppv)->AddRef();
00078     return NOERROR;
00079     }
00080
00081   return ResultFromScode(E_NOINTERFACE);
00082   }
00083
00084
00085 STDMETHODIMP_(ULONG) CImpIAdviseSink::AddRef(void)
00086   {
00087   return ++m_cRef;
00088   }
00089
00090
00091 STDMETHODIMP_(ULONG) CImpIAdviseSink::Release(void)
00092   {
00093   ULONG   cRefT;
00094
00095   cRefT=--m_cRef;
00096
00097   if (0==cRefT)
00098     delete this;
00099
00100   return cRefT;
00101   }
00102
00103
00104
00105
00106 /*
00107  * IAdviseSink::OnDataChange
00108  *
00109  * Purpose:
00110  *  Notifes the advise sink that data changed in a data object.  On
00111  *  this message you may request a new data rendering and update your
00112  *  displays as necessary.  Any data sent to this function is owned
00113  *  by the caller, not by this advise sink!
00114  *
00115  *  All Advise Sink methods should be considered asynchronous and therefore
00116  *  we should attempt no synchronous calls from within them to an EXE
00117  *  object.  If we do, we'll get RPC_E_CALLREJECTED as shown below.
00118  *
00119  * Parameters:
00120  *  pFE             LPFORMATETC describing format that changed
00121  *  pSTM            LPSTGMEDIUM providing the medium in which the data
00122  *                  is provided.
00123  *
00124  * Return Value:
00125  *  None
00126  */
00127
00128 STDMETHODIMP_(void) CImpIAdviseSink::OnDataChange(LPFORMATETC pFE, LPSTGMEDIUM pSTM)
00129 {
00130   UINT        cf;
00131
00132   //See if we're interested
00133   cf=pFE->cfFormat;
00134
00135   if (!(DVASPECT_CONTENT & pFE->dwAspect))
00136     return;
00137
00138 /*
00139   BOOL        fUsable=TRUE;
00140   //Check media types
00141   switch (cf)
00142   {
00143   #ifdef UNICODE
00144     case CF_UNICODETEXT:
00145   #else
00146     case CF_TEXT:
00147   #endif
00148       fUsable=(BOOL)(TYMED_HGLOBAL & pFE->tymed);
00149     break;
00150     case CF_BITMAP:
00151       fUsable=(BOOL)(TYMED_GDI & pFE->tymed);
00152     break;
00153
00154     case CF_METAFILEPICT:
00155       fUsable=(BOOL)(TYMED_MFPICT & pFE->tymed);
00156     break;
00157
00158     default:
00159     break;
00160   }
00161
00162   if (!fUsable)
00163     return;
00164 */
00165
00166   if (NULL==m_pIDOD->m_lpDO)
00167     return;
00168
00169   // If we are doing a 'warm link' then the data does not come with the
00170   // OnDataChange.   Post a message back to ourselves so that we can
00171   // call GetData when it's convienient
00172   //
00173   if (m_pIDOD->m_advf & ADVF_NODATA)
00174   {
00175     if (m_pIDOD->m_fDoOnGetDataPosted == FALSE)
00176     {
00177       m_pIDOD->m_fDoOnGetDataPosted = TRUE ;
00178       PostMessage( m_pIDOD->m_hDlg, WM_COMMAND,  IDC_DOGETDATA, 0L ) ;
00179     }
00180     return ;
00181   }
00182
00183   // for Hot links the data comes with the OnDataChange
00184   m_pIDOD->GotData( pFE, pSTM ) ;
00185   return ;
00186 }
00187
00188 /*
00189  * IAdviseSink::OnViewChange
00190  *
00191  * Purpose:
00192  *  Notifes the advise sink that presentation data changed in the data
00193  *  object to which we're connected providing the right time to update
00194  *  displays using such presentations.
00195  *
00196  * Parameters:
00197  *  dwAspect        DWORD indicating which aspect has changed.
00198  *  lindex          LONG indicating the piece that changed.
00199  *
00200  * Return Value:
00201  *  None
00202  */
00203
00204 STDMETHODIMP_(void) CImpIAdviseSink::OnViewChange(DWORD , LONG )
00205   {
00206   return;
00207   }
00208
00209
00210
00211
00212
00213 /*
00214  * IAdviseSink::OnRename
00215  *
00216  * Purpose:
00217  *  Informs the advise sink that an IOleObject has been renamed, primarily
00218  *  when its linked.
00219  *
00220  * Parameters:
00221  *  pmk             LPMONIKER providing the new name of the object
00222  *
00223  * Return Value:
00224  *  None
00225  */
00226
00227 STDMETHODIMP_(void) CImpIAdviseSink::OnRename(LPMONIKER)
00228   {
00229   return;
00230   }
00231
00232
00233
00234
00235
00236
00237 /*
00238  * IAdviseSink::OnSave
00239  *
00240  * Purpose:
00241  *  Informs the advise sink that the OLE object has been saved
00242  *  persistently.  The primary purpose of this is for containers that
00243  *  want to make optimizations for objects that are not in a saved
00244  *  state, so on this you have to disable such optimizations.
00245  *
00246  * Parameters:
00247  *  None
00248  *
00249  * Return Value:
00250  *  None
00251  */
00252
00253 STDMETHODIMP_(void) CImpIAdviseSink::OnSave(void)
00254   {
00255   return;
00256   }
00257
00258
00259
00260
00261
00262 /*
00263  * IAdviseSink::OnClose
00264  *
00265  * Purpose:
00266  *  Informs the advise sink that the OLE object has closed and is
00267  *  no longer bound in any way.  On this you typically change state
00268  *  variables and redraw shading, etc.
00269  *
00270  * Parameters:
00271  *  None
00272  *
00273  * Return Value:
00274  *  None
00275  */
00276
00277 STDMETHODIMP_(void) CImpIAdviseSink::OnClose(void)
00278   {
00279   return;
00280   }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/clipart/resource.h Source File

  • general
  • clipart

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by COMMON.RC
00004 //
00005
00006 // Next default values for new objects
00007 //
00008 #ifdef APSTUDIO_INVOKED
00009 #ifndef APSTUDIO_READONLY_SYMBOLS
00010
00011 #define _APS_NEXT_RESOURCE_VALUE        101
00012 #define _APS_NEXT_COMMAND_VALUE         101
00013 #define _APS_NEXT_CONTROL_VALUE         1000
00014 #define _APS_NEXT_SYMED_VALUE           101
00015 #endif
00016 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControls.h Source File

  • vc2008fp
  • NewControls

NewControls.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #ifndef __AFXWIN_H__
00013 #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h" // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CNewControlsApp:
00020 // See NewControls.cpp for the implementation of this class
00021 //
00022
00023 class CNewControlsApp : public CWinAppEx
00024 {
00025 public:
00026   CNewControlsApp();
00027
00028 // Overrides
00029 public:
00030   virtual BOOL InitInstance();
00031
00032 // Implementation
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 extern CNewControlsApp theApp;
00037
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CAboutDlg dialog used for App About
00041
00042 class CAboutDlg : public CDialog
00043 {
00044 public:
00045   CAboutDlg();
00046
00047 // Dialog Data
00048   //{{AFX_DATA(CAboutDlg)
00049   enum { IDD = IDD_ABOUTBOX };
00050   //}}AFX_DATA
00051
00052   // ClassWizard generated virtual function overrides
00053   //{{AFX_VIRTUAL(CAboutDlg)
00054   protected:
00055   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00056   //}}AFX_VIRTUAL
00057
00058 // Implementation
00059 protected:
00060   //{{AFX_MSG(CAboutDlg)
00061     // No message handlers
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderButton.cpp Source File

  • vc2008fp
  • Slider

SliderButton.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "SliderButton.h"
00013
00014 #ifdef _DEBUG
00015 #undef THIS_FILE
00016 static char THIS_FILE[]=__FILE__;
00017 #define new DEBUG_NEW
00018 #endif
00019
00020 IMPLEMENT_SERIAL(CSliderButton, CMFCToolBarButton, 1)
00021
00022 static const int nDefaultWidth = 150;
00023 static const int nDefaultHeight = 25;
00024
00025 //////////////////////////////////////////////////////////////////////
00026 // Construction/Destruction
00027 //////////////////////////////////////////////////////////////////////
00028
00029 #pragma warning (disable : 4355)
00030
00031 CSliderButton::CSliderButton() :
00032   m_wndSlider (*this)
00033 {
00034   m_dwStyle = WS_CHILD | WS_VISIBLE | TBS_HORZ | TBS_NOTICKS;
00035   m_iWidth = nDefaultWidth;
00036   m_nMin = 0;
00037   m_nMax = 0;
00038   m_nValue = 0;
00039 }
00040 //**************************************************************************************
00041 CSliderButton::CSliderButton (UINT uiId,
00042       int iImage,
00043       DWORD dwStyle,
00044       int iWidth) :
00045   CMFCToolBarButton (uiId, iImage),
00046   m_wndSlider (*this)
00047 {
00048   m_dwStyle = dwStyle | WS_CHILD | WS_VISIBLE | TBS_HORZ | TBS_NOTICKS;
00049   m_iWidth = (iWidth == 0) ? nDefaultWidth : iWidth;
00050   m_nMin = 0;
00051   m_nMax = 0;
00052   m_nValue = 0;
00053 }
00054
00055 #pragma warning (default : 4355)
00056
00057 //**************************************************************************************
00058 CSliderButton::~CSliderButton()
00059 {
00060   if (m_wndSlider.GetSafeHwnd () != NULL)
00061   {
00062     m_wndSlider.DestroyWindow ();
00063   }
00064 }
00065 //**************************************************************************************
00066 SIZE CSliderButton::OnCalculateSize (CDC* /*pDC*/, const CSize& /*sizeDefault*/, BOOL bHorz)
00067 {
00068   if (!IsVisible ())
00069   {
00070     if (m_wndSlider.GetSafeHwnd () != NULL)
00071     {
00072       m_wndSlider.ShowWindow (SW_HIDE);
00073     }
00074
00075     return CSize (0,0);
00076   }
00077
00078   if (bHorz)
00079   {
00080     if (m_wndSlider.GetSafeHwnd () != NULL && !IsHidden ())
00081     {
00082       m_wndSlider.ShowWindow (SW_SHOWNOACTIVATE);
00083       m_wndSlider.ModifyStyle (TBS_VERT, TBS_HORZ);
00084     }
00085
00086     return CSize (m_iWidth, nDefaultHeight);
00087   }
00088   else
00089   {
00090     if (m_wndSlider.GetSafeHwnd () != NULL && !IsHidden ())
00091     {
00092       m_wndSlider.ShowWindow (SW_SHOWNOACTIVATE);
00093       m_wndSlider.ModifyStyle (TBS_HORZ, TBS_VERT);
00094     }
00095
00096     return CSize (nDefaultHeight, m_iWidth);
00097   }
00098 }
00099 //**************************************************************************************
00100 void CSliderButton::Serialize(CArchive& ar)
00101 {
00102   CMFCToolBarButton::Serialize (ar);
00103
00104   if (ar.IsLoading ())
00105   {
00106     ar >> m_iWidth;
00107     ar >> m_dwStyle;
00108
00109     int   nMin;
00110     int   nMax;
00111     int   nValue;
00112
00113     ar >> nMin;
00114     ar >> nMax;
00115     ar >> nValue;
00116
00117     SetRange (nMin, nMax);
00118     SetValue (nValue, FALSE);
00119   }
00120   else
00121   {
00122     ar << m_iWidth;
00123     ar << m_dwStyle;
00124     ar << m_nMin;
00125     ar << m_nMax;
00126     ar << m_nValue;
00127   }
00128 }
00129 //**************************************************************************************
00130 void CSliderButton::OnMove ()
00131 {
00132   if (m_wndSlider.GetSafeHwnd () != NULL &&
00133     (m_wndSlider.GetStyle () & WS_VISIBLE))
00134   {
00135     m_wndSlider.SetWindowPos (NULL,
00136       m_rect.left + 1, m_rect.top + 1, m_rect.Width () - 2, m_rect.Height () - 2,
00137       SWP_NOZORDER | SWP_NOACTIVATE);
00138   }
00139 }
00140 //**************************************************************************************
00141 void CSliderButton::OnSize (int iSize)
00142 {
00143   m_iWidth = iSize;
00144   m_rect.right = m_rect.left + m_iWidth;
00145
00146   if (m_wndSlider.GetSafeHwnd () != NULL &&
00147     (m_wndSlider.GetStyle () & WS_VISIBLE))
00148   {
00149     m_wndSlider.SetWindowPos (NULL,
00150       m_rect.left + 1, m_rect.top + 1, m_rect.Width () - 2, m_rect.Height () - 2,
00151       SWP_NOZORDER | SWP_NOACTIVATE);
00152   }
00153 }
00154 //**************************************************************************************
00155 void CSliderButton::OnChangeParentWnd (CWnd* pWndParent)
00156 {
00157   if (m_wndSlider.GetSafeHwnd () != NULL)
00158   {
00159     CWnd* pWndParentCurr = m_wndSlider.GetParent ();
00160     ASSERT (pWndParentCurr != NULL);
00161
00162     if (pWndParent != NULL && pWndParentCurr != NULL &&
00163       pWndParentCurr->GetSafeHwnd () == pWndParent->GetSafeHwnd ())
00164     {
00165       return;
00166     }
00167
00168     m_wndSlider.DestroyWindow ();
00169   }
00170
00171   if (pWndParent == NULL || pWndParent->GetSafeHwnd () == NULL)
00172   {
00173     return;
00174   }
00175
00176   if (!m_wndSlider.Create (m_dwStyle, m_rect, pWndParent, m_nID))
00177   {
00178     ASSERT (FALSE);
00179     return;
00180   }
00181
00182   m_wndSlider.SetRange (m_nMin, m_nMax);
00183   m_wndSlider.SetPos (m_nValue);
00184   m_wndSlider.SetOwner (pWndParent->GetTopLevelFrame ());
00185 }
00186 //**************************************************************************************
00187 void CSliderButton::CopyFrom (const CMFCToolBarButton& s)
00188 {
00189   CMFCToolBarButton::CopyFrom (s);
00190
00191   const CSliderButton& src = (const CSliderButton&) s;
00192
00193   m_dwStyle = src.m_dwStyle;
00194   m_iWidth = src.m_iWidth;
00195   m_nMin = src.m_nMin;
00196   m_nMax = src.m_nMax;
00197   m_nValue = src.m_nValue;
00198 }
00199 //************************************************************************************
00200 void CSliderButton::SetRange (int iMin, int iMax)
00201 {
00202   m_nMin = iMin;
00203   m_nMax = iMax;
00204
00205   if (m_wndSlider.GetSafeHwnd () != NULL)
00206   {
00207     m_wndSlider.SetRange (iMin, iMax, TRUE);
00208   }
00209
00210   CObList listButtons;
00211   if (CMFCToolBar::GetCommandButtons (m_nID, listButtons) > 0)
00212   {
00213     for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
00214     {
00215       CSliderButton* pSlider = DYNAMIC_DOWNCAST (CSliderButton,
00216                         listButtons.GetNext (pos));
00217       if (pSlider != NULL && pSlider != this)
00218       {
00219         pSlider->m_nMin = iMin;
00220         pSlider->m_nMax = iMax;
00221
00222         if (pSlider->m_wndSlider.GetSafeHwnd () != NULL)
00223         {
00224           pSlider->m_wndSlider.SetRange (iMin, iMax, TRUE);
00225         }
00226       }
00227     }
00228   }
00229 }
00230 //************************************************************************************
00231 void CSliderButton::SetValue (int iValue, BOOL bNotify)
00232 {
00233   m_nValue = iValue;
00234   if (GetHwnd () != NULL)
00235   {
00236     m_wndSlider.SetPos (iValue);
00237   }
00238
00239   CObList listButtons;
00240   if (CMFCToolBar::GetCommandButtons (m_nID, listButtons) > 0)
00241   {
00242     for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
00243     {
00244       CSliderButton* pSlider = DYNAMIC_DOWNCAST (CSliderButton,
00245                         listButtons.GetNext (pos));
00246       if (pSlider != NULL && pSlider != this)
00247       {
00248         pSlider->m_nValue = iValue;
00249
00250         if (pSlider->GetHwnd () != NULL)
00251         {
00252           pSlider->m_wndSlider.SetPos (iValue);
00253         }
00254       }
00255     }
00256   }
00257
00258   if (bNotify && m_wndSlider.GetSafeHwnd () != NULL)
00259   {
00260     m_wndSlider.GetOwner ()->SendMessage (WM_COMMAND, m_nID);
00261   }
00262 }
00263 //************************************************************************************
00264 int CSliderButton::GetPos (UINT uiCmd)
00265 {
00266   CObList listButtons;
00267   if (CMFCToolBar::GetCommandButtons (uiCmd, listButtons) > 0)
00268   {
00269     for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
00270     {
00271       CSliderButton* pSlider = DYNAMIC_DOWNCAST (CSliderButton,
00272                         listButtons.GetNext (pos));
00273       if (pSlider != NULL && pSlider->GetHwnd () != NULL)
00274       {
00275         return pSlider->m_wndSlider.GetPos ();
00276       }
00277     }
00278   }
00279
00280   return -1;
00281 }
00282 //****************************************************************************************
00283 void CSliderButton::OnShow (BOOL bShow)
00284 {
00285   if (m_wndSlider.GetSafeHwnd () != NULL)
00286   {
00287     if (bShow)
00288     {
00289       m_wndSlider.ShowWindow (SW_SHOWNOACTIVATE);
00290       OnMove ();
00291     }
00292     else
00293     {
00294       m_wndSlider.ShowWindow (SW_HIDE);
00295     }
00296   }
00297 }
00298
00299 /////////////////////////////////////////////////////////////////////////////
00300 // CCustomSliderCtrl
00301
00302 CCustomSliderCtrl::CCustomSliderCtrl(CSliderButton& btnSlider) :
00303   m_btnSlider (btnSlider)
00304 {
00305 }
00306
00307 CCustomSliderCtrl::~CCustomSliderCtrl()
00308 {
00309 }
00310
00311
00312 BEGIN_MESSAGE_MAP(CCustomSliderCtrl, CSliderCtrl)
00313   ON_WM_MOUSEMOVE()
00314   ON_WM_KEYDOWN()
00315   ON_WM_LBUTTONUP()
00316 END_MESSAGE_MAP()
00317
00318 /////////////////////////////////////////////////////////////////////////////
00319 // CCustomSliderCtrl message handlers
00320
00321 void CCustomSliderCtrl::OnMouseMove(UINT nFlags, CPoint point)
00322 {
00323   int nPos = GetPos ();
00324
00325   CSliderCtrl::OnMouseMove(nFlags, point);
00326
00327   if ((nFlags & MK_LBUTTON) && GetPos () != nPos)
00328   {
00329     m_btnSlider.SetValue (GetPos (), TRUE);
00330   }
00331 }
00332
00333 void CCustomSliderCtrl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00334 {
00335   int nPos = GetPos ();
00336
00337   CSliderCtrl::OnKeyDown(nChar, nRepCnt, nFlags);
00338
00339   if (GetPos () != nPos)
00340   {
00341     m_btnSlider.SetValue (GetPos (), TRUE);
00342   }
00343 }
00344
00345 void CCustomSliderCtrl::OnLButtonUp(UINT nFlags, CPoint point)
00346 {
00347   CSliderCtrl::OnLButtonUp(nFlags, point);
00348   if (IsWindowVisible ())
00349   {
00350     m_btnSlider.SetValue (GetPos (), TRUE);
00351   }
00352 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CButtonCtrl Member List

This is the complete list of members for CButtonCtrl, including all inherited members.
AboutBox() | CButtonCtrl | [protected]
CButtonCtrl() | CButtonCtrl |
CmdAbout() | CButtonCtrl | [protected]
DECLARE_OLECREATE_EX(CButtonCtrl) DECLARE_OLETYPELIB(CButtonCtrl) DECLARE_PROPPAGEIDS(CButtonCtrl) DECLARE_OLECTLTYPE(CButtonCtrl) BOOL PreCreateWindow(CREATESTRUCT &cs) | CButtonCtrl | [protected]
DoPropExchange(CPropExchange *pPX) | CButtonCtrl | [virtual]
FireClick() | CButtonCtrl | [inline, protected]
IsSubclassedControl() | CButtonCtrl | [protected]
m_menuInPlace | CButtonCtrl | [protected]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CButtonCtrl | [virtual]
OnGetInPlaceMenu(void) | CButtonCtrl | [virtual]
OnOcmCommand(WPARAM wParam, LPARAM lParam) | CButtonCtrl | [protected]
OnOptionsOption1() | CButtonCtrl | [protected]
OnOptionsOption2() | CButtonCtrl | [protected]
OnOptionsOption3() | CButtonCtrl | [protected]
OnResetState() | CButtonCtrl | [virtual]
PreTranslateMessage(MSG *pMsg) | CButtonCtrl | [virtual]
~CButtonCtrl() | CButtonCtrl | [protected]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPageSetupDlg Member List

This is the complete list of members for CPageSetupDlg, including all inherited members.
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CPageSetupDlg(CWnd *pParent=NULL) | CPageSetupDlg |
CPageSetupDlg(CWnd *pParent=NULL) | CPageSetupDlg |
CPageSetupDlg(CWnd *pParent=NULL) | CPageSetupDlg |
DoDataExchange(CDataExchange *pDX) | CPageSetupDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CPageSetupDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CPageSetupDlg | [protected, virtual]
FormatFilePage(CString &strFormat, LPCTSTR pszFileName, UINT nPage) | CPageSetupDlg | [protected, static]
FormatFooter(CString &strFooter, CTime &time, LPCTSTR pszFileName, UINT nPage) | CPageSetupDlg |
FormatHeader(CString &strHeader, CTime &time, LPCTSTR pszFileName, UINT nPage) | CPageSetupDlg |
GetHelpIDs() | CPageSetupDlg | [inline, virtual]
GetHelpIDs() | CPageSetupDlg | [inline, virtual]
IDD enum value | CPageSetupDlg |
Initialize() | CPageSetupDlg |
m_iFooterTime | CPageSetupDlg |
m_iFooterTimeOld | CPageSetupDlg |
m_iHeaderTime | CPageSetupDlg |
m_iHeaderTimeOld | CPageSetupDlg |
m_nBottomMargin | CPageSetupDlg |
m_nHelpIDs | CPageSetupDlg | [static]
m_nLeftMargin | CPageSetupDlg |
m_nRightMargin | CPageSetupDlg |
m_nTopMargin | CPageSetupDlg |
m_strFooter | CPageSetupDlg |
m_strFooterOld | CPageSetupDlg |
m_strHeader | CPageSetupDlg |
m_strHeaderOld | CPageSetupDlg |
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnInitDialog() | CCSDialog | [protected, virtual]
OnInitDialog() | CCSDialog | [protected, virtual]
Terminate() | CPageSetupDlg |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mtbounce.h Source File

  • advanced
  • mtmdi

mtbounce.h

Go to the documentation of this file.
00001 // mtbounce.h : Declares the class interfaces for the Bounce
00002 //              user interface thread.
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CBounceThread thread
00015
00016 class CBounceThread : public CWinThread
00017 {
00018   DECLARE_DYNCREATE(CBounceThread)
00019 protected:
00020   CBounceThread();           // protected constructor used by dynamic creation
00021 public:
00022   CBounceThread(HWND hwndParent);
00023   void operator delete(void* p);
00024
00025 // Attributes
00026 public:
00027   static HANDLE m_hEventBounceThreadKilled;
00028
00029 protected:
00030   HWND m_hwndParent;
00031   CBounceWnd m_wndBounce;
00032
00033 // Operations
00034 public:
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CBounceThread)
00039   public:
00040   virtual BOOL InitInstance();
00041   virtual int ExitInstance();
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045 protected:
00046   virtual ~CBounceThread();
00047
00048   // Generated message map functions
00049   //{{AFX_MSG(CBounceThread)
00050     // NOTE - the ClassWizard will add and remove member functions here.
00051   //}}AFX_MSG
00052
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
00056 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MyToolTipCtrl.h Source File

  • vc2008fp
  • ToolTipDemo

MyToolTipCtrl.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CMyToolTipCtrl window
00015
00016 class CMyToolTipCtrl : public CMFCToolTipCtrl
00017 {
00018   DECLARE_DYNCREATE(CMyToolTipCtrl)
00019
00020 // Construction
00021 public:
00022   CMyToolTipCtrl();
00023
00024 // Attributes
00025 public:
00026
00027 // Operations
00028 public:
00029
00030 // Overrides
00031   virtual void SetDescription (const CString strDesrciption);
00032   virtual CSize GetIconSize ();
00033   virtual void OnFillBackground (CDC* pDC, CRect rect, COLORREF& clrText, COLORREF& clrLine);
00034
00035   virtual BOOL OnDrawIcon (CDC* pDC, CRect rectImage);
00036   virtual void OnDrawSeparator (CDC* pDC, int x1, int x2, int y);
00037
00038 // Implementation
00039 public:
00040   virtual ~CMyToolTipCtrl();
00041
00042 protected:
00043   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00044
00045   DECLARE_MESSAGE_MAP()
00046
00047   HICON m_hIcon;
00048 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CParsedEdit Member List

This is the complete list of members for CParsedEdit, including all inherited members.
CParsedEdit() | CParsedEdit |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CParsedEdit |
m_wParseStyle | CParsedEdit | [protected]
OnBadInput() | CParsedEdit | [virtual]
OnChar(UINT, UINT, UINT) | CParsedEdit | [protected]
OnVScroll(UINT, UINT, CScrollBar *) | CParsedEdit | [protected]
RegisterControlClass() | CParsedEdit | [static]
SubclassEdit(UINT nID, CWnd *pParent, WORD wParseStyle) | CParsedEdit |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/unitspag.cpp Source File

  • vc2008fp
  • WordPad

unitspag.cpp

Go to the documentation of this file.
00001 //
00002 // unitspag.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "unitspag.h"
00017 #include "helpids.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CUnitsPage dialog
00026
00027 const DWORD CUnitsPage::m_nHelpIDs[] =
00028 {
00029   IDC_BOX, IDH_COMM_GROUPBOX,
00030   IDC_UNITS_IN, IDH_WORDPAD_INCHES,
00031   IDC_UNITS_CM, IDH_WORDPAD_CENTIMETERS,
00032   IDC_UNITS_PT, IDH_WORDPAD_POINTS,
00033   IDC_UNITS_PI, IDH_WORDPAD_PICAS,
00034   IDC_WORDSEL, IDH_WORDPAD_OPTIONS_AUTOWORDSEL,
00035   0, 0
00036 };
00037
00038 CUnitsPage::CUnitsPage() : CCSPropertyPage(CUnitsPage::IDD)
00039 {
00040   //{{AFX_DATA_INIT(CUnitsPage)
00041   m_nUnits = -1;
00042   m_bWordSel = FALSE;
00043   //}}AFX_DATA_INIT
00044 }
00045
00046
00047 void CUnitsPage::DoDataExchange(CDataExchange* pDX)
00048 {
00049   CCSPropertyPage::DoDataExchange(pDX);
00050   //{{AFX_DATA_MAP(CUnitsPage)
00051   DDX_Radio(pDX, IDC_UNITS_IN, m_nUnits);
00052   DDX_Check(pDX, IDC_WORDSEL, m_bWordSel);
00053   //}}AFX_DATA_MAP
00054 }
00055
00056 BEGIN_MESSAGE_MAP(CUnitsPage, CCSPropertyPage)
00057   //{{AFX_MSG_MAP(CUnitsPage)
00058     // NOTE: the ClassWizard will add message map macros here
00059   //}}AFX_MSG_MAP
00060 END_MESSAGE_MAP()
00061
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CUnitsPage message handlers
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/stdafx.h Source File

  • general
  • Scribble

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include <afxwin.h>         // MFC core and standard components
00015 #include <afxext.h>         // MFC extensions
00016 #include <afxtempl.h>   // MFC templates
00017
00018 #ifndef _AFX_NO_AFXCMN_SUPPORT
00019 #include <afxcmn.h>     // MFC support for Windows 95 Common Controls
00020 #endif // _AFX_NO_AFXCMN_SUPPORT
00021
00022 #include <afxole.h>     // MFC OLE classes
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/obj_vw.h Source File

  • ole
  • oleview

obj_vw.h

Go to the documentation of this file.
00001 // obj_vw.h
00002 //
00003 // Interface def for CObjTreeView
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #ifndef _OBJ_VW_H_
00016 #define _OBJ_VW_H_
00017
00018 #include "view.h"
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CObjectData
00022
00023 class CObjectData : public CObject
00024 {
00025   DECLARE_DYNCREATE(CObjectData)
00026 public:
00027   CObjectData() ;
00028   virtual ~CObjectData() ;
00029
00030   HRESULT CreateInstance( DWORD clsctx ) ;
00031   BOOL Release() ;
00032
00033   DWORD           m_nType;
00034
00035   CLSID           m_clsid ;
00036   TCHAR           m_szProgID[40] ; // max 39 chars
00037   WORD            m_wMajorVer, m_wMinorVer ;
00038   UINT            m_uiBitmap ;
00039   IClassFactory*  m_pcf ;
00040   IUnknown*       m_punk ;
00041
00042   enum {
00043     typeUnknown,
00044     typeObject,
00045     typeTypeLib,
00046     typeInterface,
00047     typeStaticInterface
00048   };
00049
00050 } ;
00051
00052
00053 class CObjTreeView : public CTreeView
00054 {
00055   DECLARE_DYNCREATE(CObjTreeView)
00056 protected: // create from serialization only
00057   CObjTreeView();
00058
00059 // Attributes
00060 public:
00061
00062   COle2ViewDoc* GetDocument();
00063   HTREEITEM     m_hObjects;
00064   HTREEITEM     m_hTypeLibs ;
00065   HTREEITEM     m_hInterfaces;
00066
00067   HTREEITEM     m_hInsertable ;
00068   HTREEITEM     m_hControls ;
00069   HTREEITEM     m_hInternal ;
00070 #ifdef SHOW_CONTAINERS
00071   HTREEITEM     m_hContainers ;
00072 #endif
00073   HTREEITEM     m_hOLE1 ;
00074   HTREEITEM     m_hUnclassified ;
00075
00076 // Operations
00077 public:
00078   void DeleteTreeContents() ;
00079   void DeleteTreeItems( HTREEITEM htree ) ;
00080   BOOL IsValidSel() ;
00081   void ExpandInterfaces( NM_TREEVIEW* pNMTreeView );
00082   void ExpandTypeLibs( NM_TREEVIEW* pNMTreeView );
00083   void ExpandClassification( NM_TREEVIEW* pNMTreeView );
00084   void ExpandObject( NM_TREEVIEW* pNMTreeView );
00085   void CallInterfaceViewer(CObjectData* pObjectData, HTREEITEM hItem);
00086
00087 // Implementation
00088 public:
00089
00090   virtual ~CObjTreeView();
00091   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00092   virtual void OnUpdate( CView* pSender, LPARAM lHint, CObject* pHint ) ;
00093   virtual void OnDraw( CDC* pdc );
00094   virtual void OnInitialUpdate();
00095 #ifdef _DEBUG
00096   virtual void AssertValid() const;
00097   virtual void Dump(CDumpContext& dc) const;
00098 #endif
00099
00100
00101 // Generated message map functions
00102 protected:
00103   //{{AFX_MSG(CObjTreeView)
00104   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00105   afx_msg void OnDestroy();
00106   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00107   afx_msg void OnObjectDelete();
00108   afx_msg void OnObjectVerify();
00109   afx_msg void OnUseInProcServer();
00110   afx_msg void OnUpdateUseInProcServer(CCmdUI* pCmdUI);
00111   afx_msg void OnUseInProcHandler();
00112   afx_msg void OnUpdateUseInProcHandler(CCmdUI* pCmdUI);
00113   afx_msg void OnUseLocalServer();
00114   afx_msg void OnUpdateUseLocalServer(CCmdUI* pCmdUI);
00115   afx_msg void OnFileBind();
00116   //}}AFX_MSG
00117   afx_msg void OnTreeSelchanged(NMHDR* pNMHDR, LRESULT* pResult) ;
00118   afx_msg void OnTreeItemExpanding(NMHDR* pNMHDR, LRESULT* pResult) ;
00119   afx_msg void OnTreeItemExpanded(NMHDR* pNMHDR, LRESULT* pResult) ;
00120   afx_msg void OnTreeDeleteItem(NMHDR* pNMHDR, LRESULT* pResult) ;
00121   afx_msg void OnTreeReturn(NMHDR* pNMHDR, LRESULT* pResult) ;
00122   afx_msg LRESULT OnCommandHelp(WPARAM, LPARAM lParam) ;
00123   DECLARE_MESSAGE_MAP()
00124
00125   friend class CMainFrame;
00126 };
00127
00128 #ifndef _DEBUG  // debug version in vw.cpp
00129 inline COle2ViewDoc* CObjTreeView::GetDocument()
00130    { return (COle2ViewDoc*) m_pDocument; }
00131 #endif
00132
00133 #endif // _OBJ_VW_H_
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMacroDlg Member List

This is the complete list of members for CMacroDlg, including all inherited members.
CMacroDlg(CWnd *pParent=NULL) | CMacroDlg |
DoDataExchange(CDataExchange *pDX) | CMacroDlg | [protected, virtual]
IDD enum value | CMacroDlg |
m_butRun | CMacroDlg |
m_lbMacros | CMacroDlg |
m_pScript | CMacroDlg |
m_pScriptManager | CMacroDlg |
m_strMacroName | CMacroDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CMacroDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CMacroDlg | [protected]
OnInitDialog() | CMacroDlg | [protected, virtual]
OnOpenFile() | CMacroDlg | [protected]
UpdateMacroList() | CMacroDlg | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneDoc.cpp Source File

  • vc2008fp
  • RollupPane

RollupPaneDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RollupPane.h"
00013
00014 #include "RollupPaneDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #endif
00019
00020
00021 // CRollupPaneDoc
00022
00023 IMPLEMENT_DYNCREATE(CRollupPaneDoc, CDocument)
00024
00025 BEGIN_MESSAGE_MAP(CRollupPaneDoc, CDocument)
00026 END_MESSAGE_MAP()
00027
00028
00029 // CRollupPaneDoc construction/destruction
00030
00031 CRollupPaneDoc::CRollupPaneDoc()
00032 {
00033   // TODO: add one-time construction code here
00034
00035 }
00036
00037 CRollupPaneDoc::~CRollupPaneDoc()
00038 {
00039 }
00040
00041 BOOL CRollupPaneDoc::OnNewDocument()
00042 {
00043   if (!CDocument::OnNewDocument())
00044     return FALSE;
00045
00046   // TODO: add reinitialization code here
00047   // (SDI documents will reuse this document)
00048
00049   return TRUE;
00050 }
00051
00052
00053
00054
00055 // CRollupPaneDoc serialization
00056
00057 void CRollupPaneDoc::Serialize(CArchive& ar)
00058 {
00059   if (ar.IsStoring())
00060   {
00061     // TODO: add storing code here
00062   }
00063   else
00064   {
00065     // TODO: add loading code here
00066   }
00067 }
00068
00069
00070 // CRollupPaneDoc diagnostics
00071
00072 #ifdef _DEBUG
00073 void CRollupPaneDoc::AssertValid() const
00074 {
00075   CDocument::AssertValid();
00076 }
00077
00078 void CRollupPaneDoc::Dump(CDumpContext& dc) const
00079 {
00080   CDocument::Dump(dc);
00081 }
00082 #endif //_DEBUG
00083
00084
00085 // CRollupPaneDoc commands
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CView3 Member List

This is the complete list of members for CView3, including all inherited members.
CView3() | CView3 |
CView3() | CView3 | [protected]
DoDataExchange(CDataExchange *pDX) | CView3 | [protected, virtual]
IDD enum value | CView3 |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CView3 | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CView3 | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CView3 | [protected]
OnDraw(CDC *pDC) | CView3 | [protected, virtual]
OnDraw(CDC *pDC) | CView3 | [protected, virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CView3 | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CView3 | [protected]
OnFilePrintPreview() | CView3 | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CView3 | [protected, virtual]
OnWindowPosChanging(WINDOWPOS FAR *lpwndpos) | CView3 | [protected]
~CView3() | CView3 | [virtual]
~CView3() | CView3 | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/multconv.h Source File

  • ole
  • wordpad

multconv.h

Go to the documentation of this file.
00001 // convert.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifdef CONVERTERS
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CConverter
00016
00017 typedef int (CALLBACK *LPFNOUT)(int cch, int nPercentComplete);
00018 typedef int (CALLBACK *LPFNIN)(int flags, int nPercentComplete);
00019 typedef BOOL (FAR PASCAL *PINITCONVERTER)(HWND hWnd, LPCSTR lpszModuleName);
00020 typedef BOOL (FAR PASCAL *PISFORMATCORRECT)(HANDLE ghszFile, HANDLE ghszClass);
00021 typedef int (FAR PASCAL *PFOREIGNTORTF)(HANDLE ghszFile, LPVOID lpv, HANDLE ghBuff,
00022   HANDLE ghszClass, HANDLE ghszSubset, LPFNOUT lpfnOut);
00023 typedef int (FAR PASCAL *PRTFTOFOREIGN)(HANDLE ghszFile, LPVOID lpv, HANDLE ghBuff,
00024   HANDLE ghszClass, LPFNIN lpfnIn);
00025
00026 #endif
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CTrackFile
00030 class CTrackFile : public CFile
00031 {
00032 public:
00033 //Construction
00034   CTrackFile(CFrameWnd* pWnd);
00035   ~CTrackFile();
00036
00037 //Attributes
00038   int m_nLastPercent;
00039   DWORD m_dwLength;
00040   CFrameWnd* m_pFrameWnd;
00041   CString m_strComplete;
00042   CString m_strWait;
00043   CString m_strSaving;
00044 //Operations
00045   void OutputPercent(int nPercentComplete = 0);
00046   void OutputString(LPCTSTR lpsz);
00047   virtual UINT Read(void FAR* lpBuf, UINT nCount);
00048   virtual void Write(const void FAR* lpBuf, UINT nCount);
00049 };
00050
00051 class COEMFile : public CTrackFile
00052 {
00053 public:
00054   COEMFile(CFrameWnd* pWnd);
00055   virtual UINT Read(void FAR* lpBuf, UINT nCount);
00056   virtual void Write(const void FAR* lpBuf, UINT nCount);
00057 };
00058
00059 #ifdef CONVERTERS
00060
00061 class CConverter : public CTrackFile
00062 {
00063 public:
00064   CConverter(LPCSTR pszLibName, CFrameWnd* pWnd = NULL);
00065 protected:
00066   CConverter(CFrameWnd* pWnd = NULL);
00067
00068 public:
00069 //Attributes
00070   int m_nPercent;
00071   BOOL m_bDone;
00072   BOOL m_bConvErr;
00073   virtual ULONGLONG GetPosition() const;
00074
00075 // Operations
00076   BOOL IsFormatCorrect(LPCTSTR pszFileName);
00077   BOOL DoConversion();
00078   virtual BOOL Open(LPCTSTR lpszFileName, UINT nOpenFlags,
00079     CFileException* pError = NULL);
00080   void WaitForConverter();
00081   void WaitForBuffer();
00082
00083 // Overridables
00084   virtual ULONGLONG Seek(LONGLONG lOff, UINT nFrom);
00085   virtual ULONGLONG GetLength() const;
00086
00087   virtual UINT Read(void* lpBuf, UINT nCount);
00088   virtual void Write(const void* lpBuf, UINT nCount);
00089
00090   virtual void Abort();
00091   virtual void Flush();
00092   virtual void Close();
00093
00094 // Unsupported
00095   virtual CFile* Duplicate() const;
00096   virtual void LockRange(ULONGLONG dwPos, ULONGLONG dwCount);
00097   virtual void UnlockRange(ULONGLONG dwPos, ULONGLONG dwCount);
00098   virtual void SetLength(ULONGLONG dwNewLen);
00099
00100 //Implementation
00101 public:
00102   ~CConverter();
00103
00104 protected:
00105   int m_nBytesAvail;
00106   int m_nBytesWritten;
00107   BYTE* m_pBuf;
00108   HANDLE m_hEventFile;
00109   HANDLE m_hEventConv;
00110   BOOL m_bForeignToRtf;
00111   HGLOBAL m_hBuff;
00112   HGLOBAL m_hFileName;
00113   void LoadFunctions();
00114   HINSTANCE m_hLibCnv;
00115   PINITCONVERTER m_pInitConverter;
00116   PISFORMATCORRECT m_pIsFormatCorrect;
00117   PFOREIGNTORTF m_pForeignToRtf;
00118   PRTFTOFOREIGN m_pRtfToForeign;
00119   int CALLBACK WriteOut(int cch, int nPercentComplete);
00120   int CALLBACK ReadIn(int nPercentComplete);
00121   static HGLOBAL StringToHGLOBAL(LPCSTR pstr);
00122   static int CALLBACK WriteOutStatic(int cch, int nPercentComplete);
00123   static int CALLBACK ReadInStatic(int flags, int nPercentComplete);
00124   static UINT ConverterThread(LPVOID pParam);
00125   static CConverter *m_pThis;
00126 };
00127
00128 #endif
00129
00130 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagCALBSTRUCT Member List

This is the complete list of members for tagCALBSTRUCT, including all inherited members.
wDistinctHeight | tagCALBSTRUCT
wDistinctWidth | tagCALBSTRUCT
wOffsetX | tagCALBSTRUCT
wOffsetY | tagCALBSTRUCT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/mainfrm.cpp Source File

  • general
  • diblook

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "diblook.h"
00014
00015 #include "mainfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00028   //{{AFX_MSG_MAP(CMainFrame)
00029   ON_WM_CREATE()
00030   ON_WM_PALETTECHANGED()
00031   ON_WM_QUERYNEWPALETTE()
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // arrays of IDs used to initialize control bars
00037
00038 // toolbar buttons - IDs are command buttons
00039 static UINT BASED_CODE buttons[] =
00040 {
00041   // same order as in the bitmap 'toolbar.bmp'
00042   ID_FILE_NEW,
00043   ID_FILE_OPEN,
00044   ID_FILE_SAVE,
00045     ID_SEPARATOR,
00046   ID_EDIT_CUT,
00047   ID_EDIT_COPY,
00048   ID_EDIT_PASTE,
00049     ID_SEPARATOR,
00050   ID_FILE_PRINT,
00051   ID_APP_ABOUT,
00052 };
00053
00054 static UINT BASED_CODE indicators[] =
00055 {
00056   ID_SEPARATOR,           // status line indicator
00057   ID_INDICATOR_CAPS,
00058   ID_INDICATOR_NUM,
00059   ID_INDICATOR_SCRL,
00060 };
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CMainFrame construction/destruction
00064
00065 CMainFrame::CMainFrame()
00066 {
00067 }
00068
00069 CMainFrame::~CMainFrame()
00070 {
00071 }
00072
00073 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00074 {
00075   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00076     return -1;
00077
00078   if (!m_wndToolBar.Create(this) ||
00079     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00080     !m_wndToolBar.SetButtons(buttons,
00081       sizeof(buttons)/sizeof(UINT)))
00082   {
00083     TRACE0("Failed to create toolbar\n");
00084     return -1;      // fail to create
00085   }
00086
00087   if (!m_wndStatusBar.Create(this) ||
00088     !m_wndStatusBar.SetIndicators(indicators,
00089       sizeof(indicators)/sizeof(UINT)))
00090   {
00091     TRACE0("Failed to create status bar\n");
00092     return -1;      // fail to create
00093   }
00094
00095   return 0;
00096 }
00097
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CMainFrame commands
00101
00102
00103 void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd)
00104 {
00105   CMDIFrameWnd::OnPaletteChanged(pFocusWnd);
00106
00107   // always realize the palette for the active view
00108   CMDIChildWnd* pMDIChildWnd = MDIGetActive();
00109   if (pMDIChildWnd == NULL)
00110     return; // no active MDI child frame
00111   CView* pView = pMDIChildWnd->GetActiveView();
00112   ENSURE(pView != NULL);
00113
00114   // notify all child windows that the palette has changed
00115   SendMessageToDescendants(WM_DOREALIZE, (WPARAM)pView->m_hWnd);
00116 }
00117
00118
00119
00120 BOOL CMainFrame::OnQueryNewPalette()
00121 {
00122   // always realize the palette for the active view
00123   CMDIChildWnd* pMDIChildWnd = MDIGetActive();
00124   if (pMDIChildWnd == NULL)
00125     return FALSE; // no active MDI child frame (no new palette)
00126   CView* pView = pMDIChildWnd->GetActiveView();
00127   ENSURE(pView != NULL);
00128
00129   // just notify the target view
00130   pView->SendMessage(WM_DOREALIZE, (WPARAM)pView->m_hWnd);
00131   return TRUE;
00132 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoDoc.cpp Source File

  • vc2008fp
  • RibbonMDI

RibbonMDIDemoDoc.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014
00015 #include "RibbonMDIDemoDoc.h"
00016 #include "MainFrm.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CRibbonMDIDemoDoc
00026
00027 IMPLEMENT_DYNCREATE(CRibbonMDIDemoDoc, CDocument)
00028
00029 BEGIN_MESSAGE_MAP(CRibbonMDIDemoDoc, CDocument)
00030   ON_COMMAND(ID_FILE_CLOSE, OnFileClose)
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CRibbonMDIDemoDoc construction/destruction
00035
00036 CRibbonMDIDemoDoc::CRibbonMDIDemoDoc()
00037 {
00038   // TODO: add one-time construction code here
00039
00040 }
00041
00042 CRibbonMDIDemoDoc::~CRibbonMDIDemoDoc()
00043 {
00044 }
00045
00046 BOOL CRibbonMDIDemoDoc::OnNewDocument()
00047 {
00048   if (!CDocument::OnNewDocument())
00049     return FALSE;
00050
00051   // TODO: add reinitialization code here
00052   // (SDI documents will reuse this document)
00053
00054   return TRUE;
00055 }
00056
00057
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CRibbonMDIDemoDoc serialization
00061
00062 void CRibbonMDIDemoDoc::Serialize(CArchive& ar)
00063 {
00064   if (ar.IsStoring())
00065   {
00066     // TODO: add storing code here
00067   }
00068   else
00069   {
00070     // TODO: add loading code here
00071   }
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CRibbonMDIDemoDoc diagnostics
00076
00077 #ifdef _DEBUG
00078 void CRibbonMDIDemoDoc::AssertValid() const
00079 {
00080   CDocument::AssertValid();
00081 }
00082
00083 void CRibbonMDIDemoDoc::Dump(CDumpContext& dc) const
00084 {
00085   CDocument::Dump(dc);
00086 }
00087 #endif //_DEBUG
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CRibbonMDIDemoDoc commands
00091
00092 void CRibbonMDIDemoDoc::OnFileClose()
00093 {
00094   CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd ();
00095
00096   if (pMainFrame != NULL && pMainFrame->IsPrintPreviewMode ())
00097   {
00098     return;
00099   }
00100
00101   CDocument::OnFileClose();
00102 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/cntritem.h Source File

  • vc2008fp
  • WordPad

cntritem.h

Go to the documentation of this file.
00001 //
00002 // cntritem.h : interface of the CWordPadCntrItem class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 class CWordPadDoc;
00015 class CWordPadView;
00016
00017 class CWordPadCntrItem : public CRichEditCntrItem
00018 {
00019   DECLARE_SERIAL(CWordPadCntrItem)
00020
00021 // Constructors
00022 public:
00023   CWordPadCntrItem(REOBJECT* preo = NULL, CWordPadDoc* pContainer = NULL);
00024     // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
00025     //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00026     //  zero arguments.  Normally, OLE items are constructed with a
00027     //  non-NULL document pointer.
00028
00029 // Attributes
00030 public:
00031   CWordPadDoc* GetDocument()
00032     { return (CWordPadDoc*)COleClientItem::GetDocument(); }
00033   CWordPadView* GetActiveView()
00034     { return (CWordPadView*)COleClientItem::GetActiveView(); }
00035
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CWordPadCntrItem)
00038   public:
00039   protected:
00040   //}}AFX_VIRTUAL
00041
00042   virtual BOOL OnShowPanes(CFrameWnd* pFrameWnd, BOOL bShow);
00043
00044 // Implementation
00045 public:
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/CmnCtrl1.cpp Source File

  • general
  • CmnCtrl1

CmnCtrl1.cpp

Go to the documentation of this file.
00001 // CmnCtrl1.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 #include "stdafx.h"
00012 #include "CmnCtrl1.h"
00013 #include "propsht.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CCmnCtrl1App
00023
00024 BEGIN_MESSAGE_MAP(CCmnCtrl1App, CWinApp)
00025   //{{AFX_MSG_MAP(CCmnCtrl1App)
00026   //}}AFX_MSG
00027   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CCmnCtrl1App construction
00032
00033 CCmnCtrl1App::CCmnCtrl1App()
00034 {
00035 }
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // The one and only CCmnCtrl1App object
00039
00040 CCmnCtrl1App theApp;
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CCmnCtrl1App initialization
00044
00045 BOOL CCmnCtrl1App::InitInstance()
00046 {
00047   AfxEnableControlContainer();
00048
00049   // Standard initialization
00050
00051   CAllControlsSheet   allcontrolssheet(_T("Common Controls Sample"));
00052   m_pMainWnd = &allcontrolssheet;
00053   allcontrolssheet.DoModal();
00054   return FALSE;
00055 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/splash.h Source File

  • vc2008fp
  • WordPad

splash.h

Go to the documentation of this file.
00001 //
00002 // splash.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CBigIcon window
00016
00017 class CBigIcon : public CButton
00018 {
00019 // Attributes
00020 public:
00021   CBitmap m_bitmap;
00022   CSize m_sizeBitmap;
00023
00024 // Operations
00025 public:
00026   void SizeToContent();
00027
00028 // Implementation
00029 protected:
00030   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00031
00032   //{{AFX_MSG(CBigIcon)
00033   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00034   //}}AFX_MSG
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CSplash dialog
00040
00041 class CSplashWnd : public CDialog
00042 {
00043 // Construction
00044 public:
00045   BOOL Create(CWnd* pParent);
00046
00047 // Dialog Data
00048   //{{AFX_DATA(CSplashWnd)
00049   enum { IDD = IDD_SPLASH };
00050     // NOTE: the ClassWizard will add data members here
00051   //}}AFX_DATA
00052
00053 // Implementation
00054 protected:
00055   CBigIcon m_icon; // self-draw button
00056
00057   // Generated message map functions
00058   //{{AFX_MSG(CSplashWnd)
00059   virtual BOOL OnInitDialog();
00060   //}}AFX_MSG
00061 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoListBox.h Source File

  • vc2008fp
  • VisualStudioDemo

UndoListBox.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CUndoBar;
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CUndoListBox window
00016
00017 class CUndoListBox : public CListBox
00018 {
00019 // Construction
00020 public:
00021   CUndoListBox(CUndoBar& bar);
00022
00023 // Attributes
00024 protected:
00025   CUndoBar& m_Bar;
00026
00027 // Implementation
00028 public:
00029   virtual ~CUndoListBox();
00030
00031 protected:
00032   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00033   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00034
00035   DECLARE_MESSAGE_MAP()
00036 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroCB.Cpp Source File

  • ole
  • TstCon

MacroCB.Cpp

Go to the documentation of this file.
00001 // MacroComboBox.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 const int MACROCOMBOBOX_MRUSIZE = 8;
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMacroComboBox
00024
00025 CMacroComboBox::CMacroComboBox()
00026 {
00027 }
00028
00029 CMacroComboBox::~CMacroComboBox()
00030 {
00031 }
00032
00033 void CMacroComboBox::AddMRUEntry( LPCTSTR pszMacroName )
00034 {
00035    int iString;
00036
00037    iString = FindStringExact( -1, pszMacroName );
00038    if( iString != CB_ERR )
00039    {
00040     DeleteString( iString );
00041    }
00042
00043    ASSERT( GetCount() <= MACROCOMBOBOX_MRUSIZE );
00044    if( GetCount() == MACROCOMBOBOX_MRUSIZE )
00045    {
00046     DeleteString( MACROCOMBOBOX_MRUSIZE-1 );
00047    }
00048
00049    InsertString( 0, pszMacroName );
00050 }
00051
00052 BEGIN_MESSAGE_MAP(CMacroComboBox, CComboBox)
00053   //{{AFX_MSG_MAP(CMacroComboBox)
00054   //}}AFX_MSG_MAP
00055 END_MESSAGE_MAP()
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CMacroComboBox message handlers
00059
00060 BOOL CMacroComboBox::PreTranslateMessage( MSG* pMsg )
00061 {
00062    CString strMacroName;
00063
00064    if( pMsg->message == WM_KEYDOWN )
00065    {
00066     if( pMsg->wParam == VK_RETURN )
00067     {
00068      if( (pMsg->lParam&0x04000000) == 0 )
00069      {
00070       if( GetWindowTextLength() > 0 )
00071       {
00072          GetWindowText( strMacroName );
00073          AddMRUEntry( strMacroName );
00074
00075          SetCurSel( 0 );
00076          GetOwner()->SendMessage( WM_COMMAND, MAKELONG( ID_RUNMACRO, 0 ),
00077           LPARAM( m_hWnd ) );
00078       }
00079      }
00080
00081      return( TRUE );
00082     }
00083    }
00084
00085   return( CComboBox::PreTranslateMessage( pMsg ) );
00086 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockvw.h Source File

  • general
  • docktool

dockvw.h

Go to the documentation of this file.
00001 // dockvw.h : interface of the CDockView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CDockView : public CView
00013 {
00014 protected: // create from serialization only
00015   CDockView();
00016   DECLARE_DYNCREATE(CDockView)
00017
00018 // Attributes
00019 public:
00020   CDockDoc* GetDocument();
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CDockView)
00028   public:
00029   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00030   protected:
00031   //}}AFX_VIRTUAL
00032
00033 // Implementation
00034 public:
00035   virtual ~CDockView();
00036 #ifdef _DEBUG
00037   virtual void AssertValid() const;
00038   virtual void Dump(CDumpContext& dc) const;
00039 #endif
00040
00041 protected:
00042
00043 // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CDockView)
00046     // NOTE - the ClassWizard will add and remove member functions here.
00047     //    DO NOT EDIT what you see in these blocks of generated code !
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 #ifndef _DEBUG  // debug version in dockvw.cpp
00053 inline CDockDoc* CDockView::GetDocument()
00054    { return (CDockDoc*)m_pDocument; }
00055 #endif
00056
00057 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LocalizeLib::_DLocalizeEvents Member List

This is the complete list of members for LocalizeLib::_DLocalizeEvents, including all inherited members.
Click() | LocalizeLib::_DLocalizeEvents
ClickInFrench() | LocalizeLib::_DLocalizeEvents
ClickInGerman() | LocalizeLib::_DLocalizeEvents
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/resource.h Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by DrawClientHandlers.rc
00004 //
00005 #define IDS_PROJNAME                    100
00006 #define IDR_DRAWCLIENTHANDLERS          101
00007 #define IDR_DRAWCLILIVEICONSHANDLER     103
00008 #define IDR_DRAWCLISEARCHHANDLER        105
00009
00010 // Next default values for new objects
00011 //
00012 #ifdef APSTUDIO_INVOKED
00013 #ifndef APSTUDIO_READONLY_SYMBOLS
00014 #define _APS_NEXT_RESOURCE_VALUE        201
00015 #define _APS_NEXT_COMMAND_VALUE         32768
00016 #define _APS_NEXT_CONTROL_VALUE         201
00017 #define _APS_NEXT_SYMED_VALUE           106
00018 #endif
00019 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typaryvw.cpp Source File

  • advanced
  • collect

typaryvw.cpp

Go to the documentation of this file.
00001 // typaryvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "typaryvw.h"
00016 #include "resource.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CTypedPtrArrayView
00025
00026 IMPLEMENT_DYNCREATE(CTypedPtrArrayView, CFormView)
00027
00028 CTypedPtrArrayView::CTypedPtrArrayView()
00029   : CFormView(CTypedPtrArrayView::IDD)
00030 {
00031   //{{AFX_DATA_INIT(CTypedPtrArrayView)
00032   m_int = 0;
00033   m_float = 0.0f;
00034   m_str = "";
00035   //}}AFX_DATA_INIT
00036 }
00037
00038 CTypedPtrArrayView::~CTypedPtrArrayView()
00039 {
00040 }
00041
00042 void CTypedPtrArrayView::OnInitialUpdate()
00043 {
00044   CFormView::OnInitialUpdate();
00045
00046   // Copy all of the entries from the document's CTypedPtrArray
00047   // to the listbox.
00048   m_ctlList.ResetContent();
00049   CMyObjectArray& myobArray = GetDocument()->m_myobArray;
00050   for (int nIndex = 0; nIndex < myobArray.GetSize(); nIndex++)
00051   {
00052     CMyObject* pMyObject = myobArray[nIndex];
00053     AddMyObjectToListBox(pMyObject);
00054   }
00055 }
00056
00057 void CTypedPtrArrayView::DoDataExchange(CDataExchange* pDX)
00058 {
00059   CFormView::DoDataExchange(pDX);
00060   //{{AFX_DATA_MAP(CTypedPtrArrayView)
00061   DDX_Control(pDX, IDC_LIST, m_ctlList);
00062   DDX_Text(pDX, IDC_INT, m_int);
00063   DDX_Text(pDX, IDC_FLOAT, m_float);
00064   DDX_Text(pDX, IDC_STRING, m_str);
00065   //}}AFX_DATA_MAP
00066 }
00067
00068
00069 BEGIN_MESSAGE_MAP(CTypedPtrArrayView, CFormView)
00070   //{{AFX_MSG_MAP(CTypedPtrArrayView)
00071   ON_BN_CLICKED(IDC_ADD, OnAdd)
00072   ON_BN_CLICKED(IDC_UPDATE, OnUpdateButton)
00073   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00074   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00075   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00076   //}}AFX_MSG_MAP
00077 END_MESSAGE_MAP()
00078
00079
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CTypedPtrArrayView diagnostics
00083
00084 #ifdef _DEBUG
00085 void CTypedPtrArrayView::AssertValid() const
00086 {
00087   CFormView::AssertValid();
00088 }
00089
00090 void CTypedPtrArrayView::Dump(CDumpContext& dc) const
00091 {
00092   CFormView::Dump(dc);
00093 }
00094
00095 CCollectDoc* CTypedPtrArrayView::GetDocument() // non-debug version is inline
00096 {
00097   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00098 }
00099 #endif //_DEBUG
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CmyobArrayView internal implementation
00103
00104 void CTypedPtrArrayView::AddMyObjectToListBox(CMyObject* pMyObject,
00105   int nSel)
00106 {
00107   // Add new CMyObject to the listbox.
00108   CString str;
00109   pMyObject->FormatMyObject(str);
00110   if (nSel == -1)
00111     nSel = m_ctlList.AddString(str);
00112   else
00113     m_ctlList.InsertString(nSel, str);
00114 }
00115
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CTypedPtrArrayView message handlers
00119
00120 void CTypedPtrArrayView::OnAdd()
00121 {
00122   if (UpdateData() != TRUE)
00123     return;
00124
00125   // Add new CMyObject to the CTypedPtrArray
00126   CMyObject* pMyObject = new CMyObject;
00127   pMyObject->m_int = m_int;
00128   pMyObject->m_float = m_float;
00129   pMyObject->m_str = m_str;
00130   GetDocument()->m_myobArray.Add(pMyObject);
00131
00132   AddMyObjectToListBox(pMyObject);
00133 }
00134
00135 void CTypedPtrArrayView::OnUpdateButton()
00136 {
00137   if (UpdateData() != TRUE)
00138     return;
00139
00140   int nSel = m_ctlList.GetCurSel();
00141   if (nSel == LB_ERR)
00142   {
00143     AfxMessageBox(IDS_SELECT_ENTRY_TO_BE_UPDATED);
00144     return;
00145   }
00146
00147   CMyObject* pMyObject = GetDocument()->m_myobArray[nSel];
00148
00149   // Replace the value of the CMyObject in the CTypedPtrArray.
00150   pMyObject->m_int = m_int;
00151   pMyObject->m_float = m_float;
00152   pMyObject->m_str = m_str;
00153
00154   // Replace the displayed CMyObject in the listbox by removing
00155   // the old listbox entry and adding a new entry.
00156   m_ctlList.DeleteString(nSel);
00157   AddMyObjectToListBox(pMyObject, nSel);
00158 }
00159
00160 void CTypedPtrArrayView::OnRemove()
00161 {
00162   int nSel = m_ctlList.GetCurSel();
00163   if (nSel == LB_ERR)
00164   {
00165     AfxMessageBox(IDS_SELECT_ENTRY_TO_BE_REMOVED);
00166     return;
00167   }
00168
00169   CMyObject* pMyObject = GetDocument()->m_myobArray[nSel];
00170
00171   // Remove the CMyObject ptr from the CTypedPtrArray.
00172   GetDocument()->m_myobArray.RemoveAt(nSel);
00173
00174   // Delete the CMyObject object. (The CTypedPtrArray only holds the ptr.)
00175   delete pMyObject;
00176
00177   // Remove the corresponding entry from the listbox.
00178   m_ctlList.DeleteString(nSel);
00179 }
00180
00181 void CTypedPtrArrayView::OnRemoveAll()
00182 {
00183   CCollectDoc* pDoc = GetDocument();
00184   for (int n = 0; n < pDoc->m_myobArray.GetSize(); n++)
00185   {
00186     delete pDoc->m_myobArray[n];
00187   }
00188   pDoc->m_myobArray.RemoveAll();
00189
00190   // Remove all of the corresponding formatted strings from the listbox.
00191   m_ctlList.ResetContent();
00192 }
00193
00194 void CTypedPtrArrayView::OnSelChangeList()
00195 {
00196   // Update the edit control to reflect the new selection
00197   // in the listbox.
00198   int nSel = m_ctlList.GetCurSel();
00199   CMyObject* pMyObject = GetDocument()->m_myobArray[nSel];
00200
00201   m_int = pMyObject->m_int;
00202   m_float = pMyObject->m_float;
00203   m_str = pMyObject->m_str;
00204
00205   UpdateData(FALSE);
00206 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contain.cpp Source File

  • controls
  • contain

contain.cpp

Go to the documentation of this file.
00001 // Contain.cpp : Defines the class behaviors for the application.
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Contain.h"
00013
00014 #include "MainFrm.h"
00015 #include "ChildFrm.h"
00016 #include "ContrDoc.h"
00017 #include "ContrVw.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CContainerApp
00027
00028 BEGIN_MESSAGE_MAP(CContainerApp, CWinApp)
00029   //{{AFX_MSG_MAP(CContainerApp)
00030   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code!
00033   //}}AFX_MSG_MAP
00034   // Standard file based document commands
00035   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00036   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00037   // Standard print setup command
00038   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CContainerApp construction
00043
00044 CContainerApp::CContainerApp()
00045 {
00046   // TODO: add construction code here,
00047   // Place all significant initialization in InitInstance
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only CContainerApp object
00052
00053 CContainerApp theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CContainerApp initialization
00057
00058 BOOL CContainerApp::InitInstance()
00059 {
00060   // Initialize OLE libraries
00061   if (!AfxOleInit())
00062   {
00063     AfxMessageBox(IDP_OLE_INIT_FAILED);
00064     return FALSE;
00065   }
00066
00067   // Standard initialization
00068   // If you are not using these features and wish to reduce the size
00069   //  of your final executable, you should remove from the following
00070   //  the specific initialization routines you do not need.
00071
00072   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00073
00074   // Register the application's document templates.  Document templates
00075   //  serve as the connection between documents, frame windows and views.
00076
00077   CMultiDocTemplate* pDocTemplate;
00078   pDocTemplate = new CMultiDocTemplate(
00079     IDR_CONTRTYPE,
00080     RUNTIME_CLASS(CContainerDoc),
00081     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00082     RUNTIME_CLASS(CContainerView));
00083   pDocTemplate->SetContainerInfo(IDR_CONTRTYPE_CNTR_IP);
00084   AddDocTemplate(pDocTemplate);
00085
00086   // create main MDI Frame window
00087   CMainFrame* pMainFrame = new CMainFrame;
00088   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00089   {
00090     // free the memory
00091     delete pMainFrame;
00092     return FALSE;
00093   }
00094   m_pMainWnd = pMainFrame;
00095
00096   // Enable drag/drop open
00097   m_pMainWnd->DragAcceptFiles();
00098
00099   // Enable DDE Execute open
00100   EnableShellOpen();
00101   RegisterShellFileTypes(TRUE);
00102
00103   // Parse command line for standard shell commands, DDE, file open
00104   CCommandLineInfo cmdInfo;
00105   ParseCommandLine(cmdInfo);
00106
00107   // Dispatch commands specified on the command line
00108   if (!ProcessShellCommand(cmdInfo))
00109     return FALSE;
00110
00111   // The main window has been initialized, so show and update it.
00112   pMainFrame->ShowWindow(m_nCmdShow);
00113   pMainFrame->UpdateWindow();
00114
00115   return TRUE;
00116 }
00117
00118 /////////////////////////////////////////////////////////////////////////////
00119 // CAboutDlg dialog used for App About
00120
00121 class CAboutDlg : public CDialog
00122 {
00123 public:
00124   CAboutDlg();
00125
00126 // Dialog Data
00127   //{{AFX_DATA(CAboutDlg)
00128   enum { IDD = IDD_ABOUTBOX };
00129   //}}AFX_DATA
00130
00131   // ClassWizard generated virtual function overrides
00132   //{{AFX_VIRTUAL(CAboutDlg)
00133   protected:
00134   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00135   //}}AFX_VIRTUAL
00136
00137 // Implementation
00138 protected:
00139   //{{AFX_MSG(CAboutDlg)
00140     // No message handlers
00141   //}}AFX_MSG
00142   DECLARE_MESSAGE_MAP()
00143 };
00144
00145 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00146 {
00147   //{{AFX_DATA_INIT(CAboutDlg)
00148   //}}AFX_DATA_INIT
00149 }
00150
00151 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00152 {
00153   CDialog::DoDataExchange(pDX);
00154   //{{AFX_DATA_MAP(CAboutDlg)
00155   //}}AFX_DATA_MAP
00156 }
00157
00158 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00159   //{{AFX_MSG_MAP(CAboutDlg)
00160     // No message handlers
00161   //}}AFX_MSG_MAP
00162 END_MESSAGE_MAP()
00163
00164 // App command to run the dialog
00165 void CContainerApp::OnAppAbout()
00166 {
00167   CAboutDlg aboutDlg;
00168   aboutDlg.DoModal();
00169 }
00170
00171 /////////////////////////////////////////////////////////////////////////////
00172 // CContainerApp commands
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieVw.cpp Source File

  • internet
  • MFCIE

mfcieVw.cpp

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // mfcieVw.cpp : implementation of the CMfcieView class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "mfcie.h"
00015 #include "MainFrm.h"
00016
00017 #include "mfcieDoc.h"
00018 #include "mfcieVw.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMfcieView
00028
00029 IMPLEMENT_DYNCREATE(CMfcieView, CHtmlView)
00030
00031 BEGIN_MESSAGE_MAP(CMfcieView, CHtmlView)
00032   //{{AFX_MSG_MAP(CMfcieView)
00033   ON_COMMAND(ID_GO_BACK, OnGoBack)
00034   ON_COMMAND(ID_GO_FORWARD, OnGoForward)
00035   ON_COMMAND(ID_GO_SEARCH_THE_WEB, OnGoSearchTheWeb)
00036   ON_COMMAND(ID_GO_START_PAGE, OnGoStartPage)
00037   ON_COMMAND(ID_VIEW_STOP, OnViewStop)
00038   ON_COMMAND(ID_VIEW_REFRESH, OnViewRefresh)
00039   ON_COMMAND(ID_HELP_WEB_TUTORIAL, OnHelpWebTutorial)
00040   ON_COMMAND(ID_HELP_ONLINE_SUPPORT, OnHelpOnlineSupport)
00041   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_FREE_STUFF, OnHelpMicrosoftOnTheWebFreeStuff)
00042   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_FREQUENTLY_ASKED_QUESTIONS, OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions)
00043   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_GET_FASTER_INTERNET_ACCESS, OnHelpMicrosoftOnTheWebGetFasterInternetAccess)
00044   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_MICROSOFT_HOME_PAGE, OnHelpMicrosoftOnTheWebMicrosoftHomePage)
00045   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_SEARCH_THE_WEB, OnHelpMicrosoftOnTheWebSearchTheWeb)
00046   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_SEND_FEEDBACK, OnHelpMicrosoftOnTheWebSendFeedback)
00047   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_INTERNET_START_PAGE, OnHelpMicrosoftOnTheWebInternetStartPage)
00048   ON_COMMAND(ID_HELP_MICROSOFT_ON_THE_WEB_BEST_OF_THE_WEB, OnHelpMicrosoftOnTheWebBestOfTheWeb)
00049   ON_COMMAND(ID_VIEW_FONTS_LARGEST, OnViewFontsLargest)
00050   ON_COMMAND(ID_VIEW_FONTS_LARGE, OnViewFontsLarge)
00051   ON_COMMAND(ID_VIEW_FONTS_MEDIUM, OnViewFontsMedium)
00052   ON_COMMAND(ID_VIEW_FONTS_SMALL, OnViewFontsSmall)
00053   ON_COMMAND(ID_VIEW_FONTS_SMALLEST, OnViewFontsSmallest)
00054   ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
00055   //}}AFX_MSG_MAP
00056 END_MESSAGE_MAP()
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CMfcieView construction/destruction
00060
00061 CMfcieView::CMfcieView()
00062 {
00063 }
00064
00065 CMfcieView::~CMfcieView()
00066 {
00067 }
00068
00069 BOOL CMfcieView::PreCreateWindow(CREATESTRUCT& cs)
00070 {
00071   cs.lpszClass = AfxRegisterWndClass(0);
00072   return CView::PreCreateWindow(cs);
00073 }
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CMfcieView drawing
00077
00078 void CMfcieView::OnDraw(CDC* /*pDC*/)
00079 {
00080   CMfcieDoc* pDoc = GetDocument();
00081   ASSERT_VALID(pDoc);
00082 }
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // CMfcieView diagnostics
00086
00087 #ifdef _DEBUG
00088 void CMfcieView::AssertValid() const
00089 {
00090   CView::AssertValid();
00091 }
00092
00093 void CMfcieView::Dump(CDumpContext& dc) const
00094 {
00095   CView::Dump(dc);
00096 }
00097
00098 CMfcieDoc* CMfcieView::GetDocument() // non-debug version is inline
00099 {
00100   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMfcieDoc)));
00101   return (CMfcieDoc*)m_pDocument;
00102 }
00103 #endif //_DEBUG
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CMfcieView message handlers
00107
00108 void CMfcieView::OnTitleChange(LPCTSTR lpszText)
00109 {
00110   // this will change the main frame's title bar
00111   if (m_pDocument != NULL)
00112     m_pDocument->SetTitle(lpszText);
00113 }
00114
00115 void CMfcieView::OnDocumentComplete(LPCTSTR lpszUrl)
00116 {
00117   // make sure the main frame has the new URL.  This call also stops the animation
00118   ((CMainFrame*)GetParentFrame())->SetAddress(lpszUrl);
00119 }
00120
00121 void CMfcieView::OnInitialUpdate()
00122 {
00123   // Go to the home page initially
00124   CHtmlView::OnInitialUpdate();
00125   CString strCmdLine(AfxGetApp()->m_lpCmdLine);
00126   if(strCmdLine == _T(""))
00127   {
00128     GoHome();
00129   }
00130   else
00131   {
00132     Navigate(strCmdLine);
00133   }
00134 }
00135
00136 void CMfcieView::OnBeforeNavigate2(LPCTSTR /*lpszURL*/, DWORD /*nFlags*/,
00137   LPCTSTR /*lpszTargetFrameName*/, CByteArray& /*baPostedData*/,
00138   LPCTSTR /*lpszHeaders*/, BOOL* /*pbCancel*/)
00139 {
00140   // start the animation so that is plays while the new page is being loaded
00141   ((CMainFrame*)GetParentFrame())->StartAnimation();
00142 }
00143
00144 // these are all simple one-liners to do simple controlling of the browser
00145 void CMfcieView::OnGoBack()
00146 {
00147   GoBack();
00148 }
00149
00150 void CMfcieView::OnGoForward()
00151 {
00152   GoForward();
00153 }
00154
00155 void CMfcieView::OnGoSearchTheWeb()
00156 {
00157   GoSearch();
00158 }
00159
00160 void CMfcieView::OnGoStartPage()
00161 {
00162   GoHome();
00163 }
00164
00165 void CMfcieView::OnViewStop()
00166 {
00167   Stop();
00168 }
00169
00170 void CMfcieView::OnViewRefresh()
00171 {
00172   Refresh();
00173 }
00174
00175 // these all go to specific web pages, just like Internet Explorer's help menu
00176 void CMfcieView::OnHelpWebTutorial()
00177 {
00178   CString str;
00179
00180   str.LoadString(IDS_WEB_TUTORIAL);
00181   Navigate2(str, 0, NULL);
00182 }
00183
00184 void CMfcieView::OnHelpOnlineSupport()
00185 {
00186   CString str;
00187
00188   str.LoadString(IDS_ONLINE_SUPPORT);
00189   Navigate2(str, 0, NULL);
00190 }
00191
00192 void CMfcieView::OnHelpMicrosoftOnTheWebBestOfTheWeb()
00193 {
00194   CString str;
00195
00196   str.LoadString(IDS_BEST_OF_THE_WEB);
00197   Navigate2(str, 0, NULL);
00198 }
00199
00200 void CMfcieView::OnHelpMicrosoftOnTheWebFreeStuff()
00201 {
00202   CString str;
00203
00204   str.LoadString(IDS_FREE_STUFF);
00205   Navigate2(str, 0, NULL);
00206 }
00207
00208 void CMfcieView::OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions()
00209 {
00210   CString str;
00211
00212   str.LoadString(IDS_FREQUENTLY_ASKED_QUESTIONS);
00213   Navigate2(str, 0, NULL);
00214 }
00215
00216 void CMfcieView::OnHelpMicrosoftOnTheWebGetFasterInternetAccess()
00217 {
00218   CString str;
00219
00220   str.LoadString(IDS_GET_FASTER_INTERNET_ACCESS);
00221   Navigate2(str, 0, NULL);
00222 }
00223
00224 void CMfcieView::OnHelpMicrosoftOnTheWebMicrosoftHomePage()
00225 {
00226   CString str;
00227
00228   str.LoadString(IDS_MICROSOFT_HOME_PAGE);
00229   Navigate2(str, 0, NULL);
00230 }
00231
00232 void CMfcieView::OnHelpMicrosoftOnTheWebSearchTheWeb()
00233 {
00234   CString str;
00235
00236   str.LoadString(IDS_SEARCH_THE_WEB);
00237   Navigate2(str, 0, NULL);
00238 }
00239
00240 void CMfcieView::OnHelpMicrosoftOnTheWebSendFeedback()
00241 {
00242   CString str;
00243
00244   str.LoadString(IDS_SEND_FEEDBACK);
00245   Navigate2(str, 0, NULL);
00246 }
00247
00248 void CMfcieView::OnHelpMicrosoftOnTheWebInternetStartPage()
00249 {
00250   CString str;
00251
00252   str.LoadString(IDS_INTERNET_START_PAGE);
00253   Navigate2(str, 0, NULL);
00254 }
00255
00256 // these functions control the font size.  There is no explicit command in the
00257 // CHtmlView class to do this, but we can do it by using the ExecWB() function.
00258 void CMfcieView::OnViewFontsLargest()
00259 {
00260   COleVariant vaZoomFactor(4l);
00261
00262   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00263        &vaZoomFactor, NULL);
00264 }
00265
00266 void CMfcieView::OnViewFontsLarge()
00267 {
00268   COleVariant vaZoomFactor(3l);
00269
00270   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00271        &vaZoomFactor, NULL);
00272 }
00273
00274 void CMfcieView::OnViewFontsMedium()
00275 {
00276   COleVariant vaZoomFactor(2l);
00277
00278   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00279        &vaZoomFactor, NULL);
00280 }
00281
00282 void CMfcieView::OnViewFontsSmall()
00283 {
00284   COleVariant vaZoomFactor(1l);
00285
00286   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00287        &vaZoomFactor, NULL);
00288 }
00289
00290 void CMfcieView::OnViewFontsSmallest()
00291 {
00292   COleVariant vaZoomFactor(0l);
00293
00294   ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
00295        &vaZoomFactor, NULL);
00296 }
00297
00298 // This demonstrates how we can use the Navigate2() function to load local files
00299 // including local HTML pages, GIFs, AIFF files, etc.
00300 void CMfcieView::OnFileOpen()
00301 {
00302   CString str;
00303
00304   str.LoadString(IDS_FILETYPES);
00305
00306   CFileDialog fileDlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, str);
00307
00308   if(fileDlg.DoModal() == IDOK)
00309     Navigate2(fileDlg.GetPathName(), 0, NULL);
00310 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CModalShapePropSheet Member List

This is the complete list of members for CModalShapePropSheet, including all inherited members.
CModalShapePropSheet(CWnd *pWndParent=NULL) | CModalShapePropSheet |
m_colorPage | CModalShapePropSheet |
m_stylePage | CModalShapePropSheet |
m_wndPreview | CModalShapePropSheet |
OnApplyNow() | CModalShapePropSheet | [protected]
OnInitDialog() | CModalShapePropSheet | [virtual]
SetShapePropsFromSheet(CShape *pShape) | CModalShapePropSheet |
SetSheetPropsFromShape(CShape *pShape) | CModalShapePropSheet |
UpdateShapePreview() | CModalShapePropSheet |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTBComboBox Member List

This is the complete list of members for CTBComboBox, including all inherited members.
FontEnumProc(const LOGFONT *pLogFont, const TEXTMETRIC *pTextMetric, DWORD type, LPARAM pDestLogFont) | CTBComboBox | [protected, static]
m_font | CTBComboBox | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTBComboBox | [protected]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/stdafx.cpp Source File

  • ole
  • hiersvr

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010
00011 // stdafx.cpp : source file that includes just the standard includes
00012 //  stdafx.pch will be the pre-compiled header
00013 //  stdafx.obj will contain the pre-compiled type information
00014
00015 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethodDg.Cpp Source File

  • ole
  • TstCon

MethodDg.Cpp

Go to the documentation of this file.
00001 // CMethodDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMethodDlg dialog
00022
00023
00024 CMethodDlg::CMethodDlg( CWnd* pParent, IDispatch* pDispatch,
00025    CInterfaceInfo* pInterfaceInfo ) :
00026    CDialog( CMethodDlg::IDD, pParent ),
00027    m_pDispatch( pDispatch ),
00028    m_pInterfaceInfo( pInterfaceInfo ),
00029    m_pMethodInfo( NULL ),
00030    m_pvarParams( NULL ),
00031    m_piParamTypes( NULL ),
00032    m_pvarCurrentParam( NULL ),
00033    m_tException( FALSE )
00034 {
00035    _ASSERTE( m_pDispatch != NULL );
00036    _ASSERTE( m_pInterfaceInfo != NULL );
00037
00038    //{{AFX_DATA_INIT(CMethodDlg)
00039    //}}AFX_DATA_INIT
00040 }
00041
00042 CMethodDlg::~CMethodDlg()
00043 {
00044    delete[] m_pvarParams;
00045    delete[] m_piParamTypes;
00046 }
00047
00048 void CMethodDlg::DoDataExchange(CDataExchange* pDX)
00049 {
00050   CDialog::DoDataExchange(pDX);
00051   //{{AFX_DATA_MAP(CMethodDlg)
00052   DDX_Control(pDX, IDC_PARAMVALUECOMBO, m_cboxParamValue);
00053   DDX_Control(pDX, IDC_DATE, m_date);
00054   DDX_Control(pDX, IDC_STATIC_PARAMETERVALUE, m_staticParameterValue);
00055   DDX_Control(pDX, IDC_EXCEPTIONDESC, m_editExceptionDesc);
00056   DDX_Control(pDX, IDC_EXCEPTIONSOURCE, m_editExceptionSource);
00057   DDX_Control(pDX, IDC_RETURNVALUE, m_editReturnValue);
00058   DDX_Control(pDX, IDC_PARAMVALUE, m_editParamValue);
00059   DDX_Control(pDX, IDC_PARAMS, m_listParams);
00060   DDX_Control(pDX, IDC_PARAMTYPE, m_cboxParamType);
00061   DDX_Control(pDX, IDC_METHODNAME, m_cboxMethodName);
00062   //}}AFX_DATA_MAP
00063 }
00064
00065
00066 BEGIN_MESSAGE_MAP(CMethodDlg, CDialog)
00067   //{{AFX_MSG_MAP(CMethodDlg)
00068   ON_CBN_SELCHANGE(IDC_METHODNAME, OnMethodNameSelChange)
00069   ON_NOTIFY(LVN_ITEMCHANGED, IDC_PARAMS, OnParamsItemChanged)
00070   ON_BN_CLICKED(IDC_SETVALUE, OnSetValue)
00071   ON_BN_CLICKED(IDC_INVOKE, OnInvoke)
00072   ON_EN_SETFOCUS(IDC_PARAMVALUE, OnParamValueSetFocus)
00073   ON_EN_CHANGE(IDC_PARAMVALUE, OnParamValueChange)
00074   ON_BN_CLICKED(IDC_EXCEPTIONHELP, OnExceptionHelp)
00075   ON_CBN_SELCHANGE(IDC_PARAMTYPE, OnParamTypeSelChange)
00076   ON_BN_CLICKED(IDC_CHOOSECOLOR, OnChooseColor)
00077   ON_BN_CLICKED(IDC_CHOOSEFONT, OnChooseFont)
00078   ON_WM_HELPINFO()
00079   ON_WM_CONTEXTMENU()
00080   //}}AFX_MSG_MAP
00081 END_MESSAGE_MAP()
00082
00083 /////////////////////////////////////////////////////////////////////////////
00084 // CMethodDlg message handlers
00085
00086 BOOL CMethodDlg::OnInitDialog()
00087 {
00088    int iMethod;
00089    int iType;
00090    int iItem;
00091    CMethodInfo* pMethodInfo;
00092    CString strMethodName;
00093    CString strColumnName;
00094
00095    CDialog::OnInitDialog();
00096
00097    // Populate the method name combo box with the names of all of the methods
00098    // on this interface.
00099    for( iMethod = 0; iMethod < m_pInterfaceInfo->GetNumMethods(); iMethod++ )
00100    {
00101     pMethodInfo = m_pInterfaceInfo->GetMethod( iMethod );
00102
00103     // Add on a description of the method type (propget, propput, etc.).
00104     strMethodName = pMethodInfo->GetName();
00105     strMethodName += _T( " (" );
00106     strMethodName += InvokeKindToString( pMethodInfo->GetInvokeKind() );
00107     strMethodName += _T( ")" );
00108
00109     m_cboxMethodName.AddString( strMethodName );
00110    }
00111
00112    // Add the appropriate columns to the parameter list control.
00113    LOAD_STRING_FROM_RESOURCE( strColumnName, IDS_PARAMETER );
00114    m_listParams.InsertColumn( 0, strColumnName, LVCFMT_LEFT, 125 );
00115    LOAD_STRING_FROM_RESOURCE( strColumnName, IDS_VALUE );
00116    m_listParams.InsertColumn( 1, strColumnName, LVCFMT_LEFT, 150 );
00117    LOAD_STRING_FROM_RESOURCE( strColumnName, IDS_TYPE );
00118    m_listParams.InsertColumn( 2, strColumnName, LVCFMT_LEFT, 100 );
00119
00120    m_listParams.SetColumnWidth( 2, LVSCW_AUTOSIZE_USEHEADER );
00121
00122    // Add all available VARTYPEs to the parameter type combo box.
00123    for( iType = 0; iType < NUM_VARTYPES; iType++ )
00124    {
00125     iItem = m_cboxParamType.AddString( VTIToString( iType ) );
00126     m_cboxParamType.SetItemData( iItem, iType );
00127    }
00128
00129    m_cboxMethodName.SetCurSel( 0 );
00130    OnMethodNameSelChange();
00131
00132    return( TRUE );
00133 }
00134
00135 void CMethodDlg::OnMethodNameSelChange()
00136 {
00137    int iMethod;
00138    int iParam;
00139    CMethodParamInfo* pParamInfo = 0;
00140    COleVariant* pvarParam = 0;
00141
00142    iMethod = m_cboxMethodName.GetCurSel();
00143    ASSERT( iMethod != CB_ERR );
00144    m_pMethodInfo = m_pInterfaceInfo->GetMethod( iMethod );
00145
00146    // Clean up from the old method.
00147    m_varResult.Clear();
00148    m_editReturnValue.SetWindowText( _T( "" ) );
00149    m_editParamValue.SetWindowText( _T( "" ) );
00150    m_listParams.DeleteAllItems();
00151    delete[] (COleVariant*)m_pvarParams;
00152    m_pvarParams = NULL;
00153    m_pvarCurrentParam = NULL;
00154    delete[] m_piParamTypes;
00155    m_piParamTypes = NULL;
00156    m_excepInfo.Clear();
00157    m_editExceptionSource.SetWindowText( _T( "" ) );
00158    m_editExceptionDesc.SetWindowText( _T( "" ) );
00159    GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( FALSE );
00160
00161    // Allocate the parameters for the new method.
00162    if( m_pMethodInfo->GetNumParams() > 0 )
00163    {
00164     m_pvarParams = new COleVariant[m_pMethodInfo->GetNumParams()];
00165     m_piParamTypes = new int[m_pMethodInfo->GetNumParams()];
00166    }
00167
00168    // Fill in the info for each parameter.
00169    for( iParam = 0; iParam < m_pMethodInfo->GetNumParams(); iParam++ )
00170    {
00171     pParamInfo = m_pMethodInfo->GetParam( iParam );
00172     m_listParams.InsertItem( iParam, pParamInfo->GetName() );
00173     m_listParams.SetItemText( iParam, 0, pParamInfo->GetName() );
00174     TRY
00175     {
00176      pvarParam = GetParam( iParam );
00177      pvarParam->ChangeType( pParamInfo->GetType() );
00178     }
00179     CATCH( COleException, e )
00180     {
00181      TRACE( "Warning: ChangeType failed during initialization.\n" );
00182     }
00183     END_CATCH
00184     m_piParamTypes[iParam] = VTToVTI( pvarParam->vt );
00185
00186     DisplayParamValueInList( iParam );
00187    }
00188
00189    if( m_pMethodInfo->GetNumParams() > 0 )
00190    {
00191     // Enable the parameter entry controls.
00192     m_cboxParamType.EnableWindow( TRUE );
00193
00194     // Select the first parameter.
00195     m_listParams.SetItemState( 0, LVIS_SELECTED, LVIS_SELECTED );
00196
00197     // Let the user start editing the first parameter's value.
00198     if( m_editParamValue.IsWindowEnabled() )
00199     {
00200      m_editParamValue.SetSel( 0, -1 );
00201     }
00202    }
00203    else
00204    {
00205     // OnParamsItemChanged isn't going to update the parameter type combo
00206     // box, so do it here.
00207     m_cboxParamType.SetCurSel( -1 );
00208     OnParamTypeSelChange();
00209
00210     // Disable the parameter entry controls.
00211     m_cboxParamType.EnableWindow( FALSE );
00212
00213     // Set the Invoke button to be the default.
00214     SetDefID( IDC_INVOKE );
00215    }
00216 }
00217
00218 void CMethodDlg::OnParamsItemChanged( NMHDR* pNMHDR, LRESULT* pResult )
00219 {
00220    NM_LISTVIEW* pNMListView;
00221
00222    pNMListView = (NM_LISTVIEW*)pNMHDR;
00223    *pResult = 0;
00224
00225    if( pNMListView->uChanged&LVIF_STATE )
00226    {
00227     if( pNMListView->uNewState&LVIS_SELECTED )
00228     {
00229      // Display the info for the new parameter
00230      m_iCurrentParam = pNMListView->iItem;
00231      m_pParamInfo = m_pMethodInfo->GetParam( m_iCurrentParam );
00232      m_pvarCurrentParam = GetParam( m_iCurrentParam );
00233 //         m_cboxParamType.SetCurSel( m_piParamTypes[m_iCurrentParam] );
00234      m_cboxParamType.SelectString( -1, VTIToString( m_piParamTypes[
00235       m_iCurrentParam] ) );
00236      OnParamTypeSelChange();
00237 //         DisplayParamValue( m_iCurrentParam );
00238     }
00239    }
00240 }
00241
00242 void CMethodDlg::OnSetValue()
00243 {
00244    int iType;
00245    int iItem;
00246    CString strEditText;
00247    CString strValue;
00248    COleDateTime date;
00249
00250    iItem = m_cboxParamType.GetCurSel();
00251    ASSERT( iItem != CB_ERR );
00252    iType = (int)m_cboxParamType.GetItemData( iItem );
00253    if( iType == VTI_DATE )
00254    {
00255       m_date.GetTime( date );
00256       *m_pvarCurrentParam = COleVariant( date );
00257    }
00258   else if( iType == VTI_BOOL )
00259   {
00260     *m_pvarCurrentParam = COleVariant( VARIANT_BOOL(
00261       (m_cboxParamValue.GetCurSel() == 1) ? ~VARIANT_FALSE :
00262       VARIANT_FALSE ), VT_BOOL );
00263   }
00264    else
00265    {
00266       m_editParamValue.GetWindowText( strEditText );
00267       if (!strEditText.IsEmpty())
00268      *m_pvarCurrentParam = strEditText;
00269    }
00270
00271    TRY
00272    {
00273    m_pvarCurrentParam->ChangeType( VTIToVT( iType ) );
00274     DisplayParamValueInList( m_iCurrentParam );
00275     m_piParamTypes[m_iCurrentParam] = iType;
00276     if( m_iCurrentParam == (m_pMethodInfo->GetNumParams()-1) )
00277     {
00278      // We just set the last parameter, so set the Invoke button to be the
00279      // default button.
00280      SetDefID( IDC_INVOKE );
00281     }
00282     else
00283     {
00284      // Move on to the next parameter.
00285      m_listParams.SetItemState( m_iCurrentParam+1, LVIS_SELECTED,
00286       LVIS_SELECTED );
00287      SetDefID( IDC_SETVALUE );
00288      m_editParamValue.SetSel( 0, -1 );
00289     }
00290    }
00291    CATCH( COleException, e )
00292    {
00293     TRACE( "ChangeType() failed.\n" );
00294    }
00295    END_CATCH
00296 }
00297
00298 void CMethodDlg::OnInvoke()
00299 {
00300    DISPPARAMS dpParams;
00301    HRESULT hResult;
00302    UINT iArgErr;
00303    DISPID dispidArg;
00304    CString strReturnValue;
00305
00306    if(m_pvarCurrentParam != NULL)
00307    {
00308     OnSetValue();
00309    }
00310
00311    dpParams.rgvarg = m_pvarParams;
00312    dpParams.cArgs = m_pMethodInfo->GetNumParams();
00313
00314    if( m_pMethodInfo->GetInvokeKind() == DISPATCH_PROPERTYPUT )
00315    {
00316     dispidArg = DISPID_PROPERTYPUT;
00317     dpParams.rgdispidNamedArgs = &dispidArg;
00318     dpParams.cNamedArgs = 1;
00319    }
00320    else
00321    {
00322     dpParams.rgdispidNamedArgs = NULL;
00323     dpParams.cNamedArgs = 0;
00324    }
00325
00326    m_varResult.Clear();
00327    m_excepInfo.Clear();
00328    m_tException = FALSE;
00329
00330    TRY
00331    {
00332     hResult = m_pDispatch->Invoke( m_pMethodInfo->GetID(), IID_NULL,
00333      GetUserDefaultLCID(), WORD( m_pMethodInfo->GetInvokeKind() ),
00334      &dpParams, &m_varResult, &m_excepInfo, &iArgErr );
00335     if( FAILED( hResult ) )
00336     {
00337
00338      TRACE( "Invoke() failed\n" );
00339      if( hResult == DISP_E_EXCEPTION )
00340      {
00341       m_tException = TRUE;
00342      }
00343      AfxThrowOleException( hResult );
00344     }
00345     strReturnValue = VariantToString( m_varResult );
00346     strReturnValue += _T( " (" );
00347     strReturnValue += VTToString( m_varResult.vt );
00348     strReturnValue += _T( ")" );
00349     m_editReturnValue.SetWindowText( strReturnValue );
00350    }
00351    CATCH( COleException, e )
00352    {
00353    }
00354    END_CATCH
00355
00356    DisplayExceptionInfo();
00357 }
00358
00359 void CMethodDlg::OnParamValueSetFocus()
00360 {
00361    // The ParamValue edit box just got the keyboard focus.  The user should be
00362    // able to set the value to the contents of the edit box just by hitting
00363    // ENTER.
00364    SetDefID( IDC_SETVALUE );
00365 }
00366
00367 void CMethodDlg::OnParamValueChange()
00368 {
00369    // The user is typing in the ParamValue edit box, so set the default button
00370    // to SetValue.
00371    SetDefID( IDC_SETVALUE );
00372 }
00373
00374 void CMethodDlg::DisplayParamValueInList( int iParam )
00375 {
00376    COleVariant varDisplay;
00377    CString strTemp;
00378    CString strValue;
00379    COleVariant* pvarParam;
00380
00381    pvarParam = GetParam( iParam );
00382    if( m_piParamTypes[iParam] == VTI_COLOR )
00383    {
00384     ASSERT( pvarParam->vt == VT_I4 );
00385     strValue.Format( "%#8.8x", pvarParam->lVal );
00386     m_listParams.SetItemText( iParam, 1, strValue );
00387    }
00388    else if( m_piParamTypes[iParam] == VTI_DATE )
00389    {
00390       m_date.SetTime( COleDateTime( *pvarParam ) );
00391    }
00392   else if( m_piParamTypes[iParam] == VTI_BOOL )
00393   {
00394     m_cboxParamValue.SetCurSel( pvarParam->boolVal ? 1 : 0 );
00395   }
00396    else
00397    {
00398     TRY
00399     {
00400      varDisplay.ChangeType( VT_BSTR, pvarParam );
00401      strValue = varDisplay.bstrVal;
00402      m_listParams.SetItemText( iParam, 1, strValue );
00403      m_editParamValue.SetWindowText( strValue );
00404     }
00405     CATCH( COleException, e )
00406     {
00407      TRACE( "ChangeType failed\n" );
00408      LOAD_STRING_FROM_RESOURCE( strValue, IDS_UNABLETOREPRESENT );
00409      m_listParams.SetItemText( iParam, 1, strValue );
00410      m_editParamValue.SetWindowText( _T( "" ) );
00411     }
00412     END_CATCH
00413    }
00414
00415    m_listParams.SetItemText( iParam, 2, VTToString( pvarParam->vt ) );
00416 //   m_cboxParamType.SetCurSel( m_piParamTypes[iParam] );
00417 }
00418
00419 COleVariant* CMethodDlg::GetParam( int iParam )
00420 {
00421    // Dispatch parameters are in reverse order.
00422    return( &m_pvarParams[(m_pMethodInfo->GetNumParams()-1)-iParam] );
00423 }
00424
00425 void CMethodDlg::DisplayExceptionInfo()
00426 {
00427
00428    CString strSource;
00429    CString strDesc;
00430
00431    if( m_tException )
00432    {
00433     if( m_excepInfo.bstrSource != NULL )
00434     {
00435      m_editExceptionSource.SetWindowText( COLE2CT(
00436        m_excepInfo.bstrSource ) );
00437     }
00438     else
00439     {
00440     LOAD_STRING_FROM_RESOURCE( strSource, IDS_UNSPECIFIEDSOURCE );
00441      m_editExceptionSource.SetWindowText( strSource );
00442     }
00443
00444     if( m_excepInfo.bstrDescription != NULL )
00445     {
00446      m_editExceptionDesc.SetWindowText( COLE2CT(
00447       m_excepInfo.bstrDescription ) );
00448     }
00449     else
00450     {
00451     LOAD_STRING_FROM_RESOURCE( strDesc, IDS_UNSPECIFIEDEXCEPTION );
00452      m_editExceptionDesc.SetWindowText( strDesc );
00453     }
00454
00455     if( m_excepInfo.bstrHelpFile != NULL )
00456     {
00457      GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( TRUE );
00458     }
00459     else
00460     {
00461      GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( FALSE );
00462     }
00463    }
00464    else
00465    {
00466     m_editExceptionSource.SetWindowText( _T( "" ) );
00467     m_editExceptionDesc.SetWindowText( _T( "" ) );
00468     GetDlgItem( IDC_EXCEPTIONHELP )->EnableWindow( FALSE );
00469    }
00470 }
00471
00472 void CMethodDlg::DisplayParamValues( int iType )
00473 {
00474    CString strValue;
00475
00476    m_cboxParamValue.ResetContent();
00477    switch( iType )
00478    {
00479    case VTI_BOOL:
00480       LOAD_STRING_FROM_RESOURCE( strValue, IDS_FALSE );
00481       m_cboxParamValue.AddString( strValue );
00482       LOAD_STRING_FROM_RESOURCE( strValue, IDS_TRUE );
00483       m_cboxParamValue.AddString( strValue );
00484       break;
00485
00486    default:
00487       ASSERT( FALSE );
00488       break;
00489    }
00490 }
00491
00492 void CMethodDlg::OnExceptionHelp()
00493 {
00494
00495    ASSERT( m_excepInfo.bstrHelpFile != NULL );
00496
00497    ::HtmlHelp( AfxGetMainWnd()->GetSafeHwnd(), COLE2CT(
00498     m_excepInfo.bstrHelpFile ), HH_HELP_CONTEXT, m_excepInfo.dwHelpContext );
00499 }
00500
00501 void CMethodDlg::OnParamTypeSelChange()
00502 {
00503    int iType;
00504    int iItem;
00505
00506    iItem = m_cboxParamType.GetCurSel();
00507    if( iItem == CB_ERR )
00508    {
00509     iType = -1;
00510    }
00511    else
00512    {
00513     iType = (int)m_cboxParamType.GetItemData( iItem );
00514    }
00515
00516    switch( iType )
00517    {
00518    case -1:
00519     // No type was selected
00520     GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
00521     GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
00522     GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
00523     GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
00524     GetDlgItem( IDC_SETVALUE )->EnableWindow( FALSE );
00525     GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_NORMAL );
00526      m_date.EnableWindow( FALSE );
00527      m_date.ShowWindow( SW_HIDE );
00528     m_cboxParamValue.EnableWindow( FALSE );
00529     m_cboxParamValue.ShowWindow( SW_HIDE );
00530     m_staticParameterValue.ShowWindow( SW_NORMAL );
00531     m_editParamValue.EnableWindow( FALSE );
00532     m_editParamValue.ShowWindow( SW_NORMAL );
00533     break;
00534
00535    case VTI_COLOR:
00536     GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
00537     GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
00538     GetDlgItem( IDC_SETVALUE )->EnableWindow( FALSE );
00539     GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_HIDE );
00540      m_date.EnableWindow( FALSE );
00541      m_date.ShowWindow( SW_HIDE );
00542     m_cboxParamValue.EnableWindow( FALSE );
00543     m_cboxParamValue.ShowWindow( SW_HIDE );
00544     m_staticParameterValue.ShowWindow( SW_HIDE );
00545     m_editParamValue.EnableWindow( FALSE );
00546     m_editParamValue.ShowWindow( SW_HIDE );
00547     GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_NORMAL );
00548     GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( TRUE );
00549     break;
00550
00551    case VTI_FONT:
00552     GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
00553     GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
00554     GetDlgItem( IDC_SETVALUE )->EnableWindow( FALSE );
00555     GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_HIDE );
00556      m_date.EnableWindow( FALSE );
00557      m_date.ShowWindow( SW_HIDE );
00558     m_cboxParamValue.EnableWindow( FALSE );
00559     m_cboxParamValue.ShowWindow( SW_HIDE );
00560     m_staticParameterValue.ShowWindow( SW_HIDE );
00561     m_editParamValue.EnableWindow( FALSE );
00562     m_editParamValue.ShowWindow( SW_HIDE );
00563     GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_NORMAL );
00564     GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( TRUE );
00565     break;
00566
00567    case VTI_BOOL:
00568     GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
00569     GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
00570      GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
00571      GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
00572     m_staticParameterValue.ShowWindow( SW_SHOW );
00573     m_editParamValue.EnableWindow( FALSE );
00574     m_editParamValue.ShowWindow( SW_HIDE );
00575     GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_SHOW );
00576     GetDlgItem( IDC_SETVALUE )->EnableWindow( TRUE );
00577      m_date.ShowWindow( SW_HIDE );
00578      m_date.EnableWindow( FALSE );
00579     m_cboxParamValue.EnableWindow( TRUE );
00580     m_cboxParamValue.ShowWindow( SW_NORMAL );
00581     DisplayParamValues( iType );
00582       break;
00583
00584    case VTI_DATE:
00585     GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
00586     GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
00587      GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
00588      GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
00589     m_cboxParamValue.EnableWindow( FALSE );
00590     m_cboxParamValue.ShowWindow( SW_HIDE );
00591     m_staticParameterValue.ShowWindow( SW_SHOW );
00592     m_editParamValue.EnableWindow( FALSE );
00593     m_editParamValue.ShowWindow( SW_HIDE );
00594     GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_SHOW );
00595     GetDlgItem( IDC_SETVALUE )->EnableWindow( TRUE );
00596      m_date.ShowWindow( SW_NORMAL );
00597      m_date.EnableWindow( TRUE );
00598       break;
00599
00600    default:
00601     GetDlgItem( IDC_CHOOSEFONT )->EnableWindow( FALSE );
00602     GetDlgItem( IDC_CHOOSEFONT )->ShowWindow( SW_HIDE );
00603     GetDlgItem( IDC_CHOOSECOLOR )->EnableWindow( FALSE );
00604     GetDlgItem( IDC_CHOOSECOLOR )->ShowWindow( SW_HIDE );
00605      m_date.EnableWindow( FALSE );
00606      m_date.ShowWindow( SW_HIDE );
00607     m_cboxParamValue.EnableWindow( FALSE );
00608     m_cboxParamValue.ShowWindow( SW_HIDE );
00609     m_staticParameterValue.ShowWindow( SW_NORMAL );
00610     m_editParamValue.ShowWindow( SW_SHOWNORMAL );
00611     m_editParamValue.EnableWindow( TRUE );
00612     GetDlgItem( IDC_SETVALUE )->ShowWindow( SW_NORMAL );
00613     GetDlgItem( IDC_SETVALUE )->EnableWindow( TRUE );
00614     break;
00615    }
00616 }
00617
00618 void CMethodDlg::OnChooseColor()
00619 {
00620    CColorDialog dlg;
00621    int nResult;
00622
00623    nResult = (int)dlg.DoModal();
00624    if( nResult != IDOK )
00625    {
00626     return;
00627    }
00628
00629    *m_pvarCurrentParam = long( dlg.GetColor() );
00630    m_piParamTypes[m_iCurrentParam] = VTI_COLOR;
00631    DisplayParamValueInList( m_iCurrentParam );
00632 }
00633
00634 void CMethodDlg::OnChooseFont()
00635 {
00636
00637    CFontDialog dlg;
00638    int nResult;
00639    IFontDispPtr pFont;
00640    FONTDESC desc;
00641    HRESULT hResult;
00642
00643    nResult = (int)dlg.DoModal();
00644    if( nResult != IDOK )
00645    {
00646     return;
00647    }
00648
00649    memset( &desc, 0, sizeof( desc ) );
00650    desc.cbSizeofstruct = sizeof( desc );
00651    CT2OLE tName(dlg.m_cf.lpLogFont->lfFaceName );
00652    desc.lpstrName = tName;
00653    desc.cySize = COleCurrency( dlg.m_cf.iPointSize/10, 1000*
00654     (dlg.m_cf.iPointSize%10) );
00655    desc.sWeight = short( dlg.m_cf.lpLogFont->lfWeight );
00656    desc.sCharset = dlg.m_cf.lpLogFont->lfCharSet;
00657    desc.fItalic = dlg.m_cf.lpLogFont->lfItalic;
00658    desc.fUnderline = dlg.m_cf.lpLogFont->lfUnderline;
00659    desc.fStrikethrough = dlg.m_cf.lpLogFont->lfStrikeOut;
00660
00661    hResult = OleCreateFontIndirect( &desc, IID_IFontDisp, (void**)&pFont );
00662    if( FAILED( hResult ) )
00663    {
00664     TRACE( "OleCreateFontIndirect() failed\n" );
00665    }
00666
00667    m_pvarCurrentParam->Clear();
00668    m_pvarCurrentParam->vt = VT_DISPATCH;
00669    m_pvarCurrentParam->pdispVal = pFont;
00670    m_pvarCurrentParam->pdispVal->AddRef();
00671
00672    m_piParamTypes[m_iCurrentParam] = VTI_FONT;
00673    DisplayParamValueInList( m_iCurrentParam );
00674 }
00675
00676 static DWORD rgmapCHID[] =
00677 {
00678    IDC_METHODNAME, HIDC_METHODNAME,
00679    IDC_PARAMS, HIDC_PARAMS,
00680    IDC_INVOKE, HIDC_INVOKE,
00681    IDC_PARAMVALUE, HIDC_PARAMVALUE,
00682    IDC_PARAMTYPE, HIDC_PARAMTYPE,
00683    IDC_SETVALUE, HIDC_SETVALUE,
00684    IDC_RETURNVALUE, HIDC_RETURNVALUE,
00685    IDC_EXCEPTIONSOURCE, HIDC_EXCEPTIONSOURCE,
00686    IDC_EXCEPTIONDESC, HIDC_EXCEPTIONDESC,
00687    IDC_EXCEPTIONHELP, HIDC_EXCEPTIONHELP,
00688    IDC_CHOOSECOLOR, HIDC_CHOOSECOLOR,
00689    IDC_CHOOSEFONT, HIDC_CHOOSEFONT,
00690    IDC_DATE, HIDC_DATE,
00691    IDC_PARAMVALUECOMBO, HIDC_PARAMVALUECOMBO,
00692    IDC_STATIC_PARAMETERVALUE, DWORD( -1 ),
00693    0, 0
00694 };
00695
00696 BOOL CMethodDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00697 {
00698   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00699   strPath += _T("::/popups.txt");
00700
00701   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00702 }
00703
00704 void CMethodDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00705 {
00706   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00707   strPath += _T("::/popups.txt");
00708
00709   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00710 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/filenewd.h Source File

  • vc2008fp
  • WordPad

filenewd.h

Go to the documentation of this file.
00001 //
00002 // filenewd.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CFileNewDialog dialog
00016
00017 class CFileNewDialog : public CCSDialog
00018 {
00019 // Construction
00020 public:
00021   CFileNewDialog(CWnd* pParent = NULL);   // standard constructor
00022
00023 // Dialog Data
00024   //{{AFX_DATA(CFileNewDialog)
00025   enum { IDD = IDD_FILENEWDIALOG };
00026   CListBox    m_listbox;
00027   int     m_nSel;
00028   //}}AFX_DATA
00029
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CFileNewDialog)
00034   protected:
00035   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 protected:
00040   static const DWORD m_nHelpIDs[];
00041   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00042
00043   // Generated message map functions
00044   //{{AFX_MSG(CFileNewDialog)
00045   virtual BOOL OnInitDialog();
00046   afx_msg void OnDblclkDatedialogList();
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEntryInfoDlg Member List

This is the complete list of members for CEntryInfoDlg, including all inherited members.
CEntryInfoDlg(CWnd *pParent=NULL) | CEntryInfoDlg |
CheckStartEndTime() | CEntryInfoDlg |
CheckValidDescription() | CEntryInfoDlg |
CheckValidTitle() | CEntryInfoDlg |
DoDataExchange(CDataExchange *pDX) | CEntryInfoDlg | [protected, virtual]
GetHourMinute(CString szTime, CString &szHour, CString &szMinute, int &iHour) | CEntryInfoDlg |
IDD enum value | CEntryInfoDlg |
IDH enum value | CEntryInfoDlg |
m_fCancelSchedule | CEntryInfoDlg |
m_fClearSchedule | CEntryInfoDlg |
m_fDeleteSchedule | CEntryInfoDlg |
m_fModifySchedule | CEntryInfoDlg |
m_fUpdateScheduleDisplay | CEntryInfoDlg |
m_fVisibleButtons | CEntryInfoDlg |
m_fVisibleDefaultButtons | CEntryInfoDlg |
m_iEndHour | CEntryInfoDlg |
m_iStartHour | CEntryInfoDlg |
m_szDescription | CEntryInfoDlg |
m_szEndTime | CEntryInfoDlg |
m_szEndTimeHour | CEntryInfoDlg |
m_szEndTimeMinute | CEntryInfoDlg |
m_szStartTime | CEntryInfoDlg |
m_szStartTimeHour | CEntryInfoDlg |
m_szStartTimeMinute | CEntryInfoDlg |
m_szTitle | CEntryInfoDlg |
OnButtonCancel(IHTMLElement *pElement) | CEntryInfoDlg |
OnButtonClear(IHTMLElement *pElement) | CEntryInfoDlg |
OnButtonDelete(IHTMLElement *pElement) | CEntryInfoDlg |
OnButtonModify(IHTMLElement *pElement) | CEntryInfoDlg |
OnButtonSave(IHTMLElement *pElement) | CEntryInfoDlg |
OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl) | CEntryInfoDlg |
OnInitDialog() | CEntryInfoDlg | [protected, virtual]
OnMouseOutButtons(IHTMLElement *pElement) | CEntryInfoDlg |
OnMouseOverButtons(IHTMLElement *pElement) | CEntryInfoDlg |
operator=(const CEntryInfoDlg &InfoDlg) | CEntryInfoDlg |
ResetVariables() | CEntryInfoDlg |
SetDefaultSettings() | CEntryInfoDlg |
~CEntryInfoDlg() | CEntryInfoDlg | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRulerItem Member List

This is the complete list of members for CRulerItem, including all inherited members.
CRulerItem(UINT nBitmapID=0) | CRulerItem |
CRulerItem(UINT nBitmapID=0) | CRulerItem |
Draw(CDC &dc) | CRulerItem | [virtual]
Draw(CDC &dc) | CRulerItem | [virtual]
DrawFocusLine() | CRulerItem |
DrawFocusLine() | CRulerItem |
GetHitRectPix() | CRulerItem |
GetHitRectPix() | CRulerItem |
GetHorzPosPix() | CRulerItem | [inline]
GetHorzPosPix() | CRulerItem |
GetHorzPosTwips() | CRulerItem | [inline]
GetHorzPosTwips() | CRulerItem | [inline]
GetMax() | CRulerItem | [inline]
GetMax() | CRulerItem | [inline]
GetMin() | CRulerItem | [inline]
GetMin() | CRulerItem | [inline]
GetVertPosPix() | CRulerItem | [inline]
GetVertPosPix() | CRulerItem | [inline]
HitTestPix(CPoint pt) | CRulerItem | [inline, virtual]
HitTestPix(CPoint pt) | CRulerItem | [inline, virtual]
Invalidate() | CRulerItem |
Invalidate() | CRulerItem |
LoadMaskedBitmap(LPCTSTR lpszResourceName) | CRulerItem |
LoadMaskedBitmap(LPCTSTR lpszResourceName) | CRulerItem |
m_bTrack | CRulerItem | [protected]
m_hbm | CRulerItem |
m_hbmMask | CRulerItem |
m_nAlignment | CRulerItem | [protected]
m_nMax | CRulerItem | [protected]
m_nMin | CRulerItem | [protected]
m_nXPosTwips | CRulerItem | [protected]
m_nYPosPix | CRulerItem | [protected]
m_pDC | CRulerItem | [protected]
m_pRuler | CRulerItem | [protected]
m_rcTrack | CRulerItem | [protected]
m_size | CRulerItem |
SetAlignment(int nAlign) | CRulerItem | [inline, virtual]
SetAlignment(int nAlign) | CRulerItem | [inline, virtual]
SetBounds(int nMin, int nMax) | CRulerItem | [inline, virtual]
SetBounds(int nMin, int nMax) | CRulerItem | [inline, virtual]
SetHorzPosTwips(int nXPos) | CRulerItem | [virtual]
SetHorzPosTwips(int nXPos) | CRulerItem | [virtual]
SetRuler(CRulerBar *pRuler) | CRulerItem | [inline, virtual]
SetRuler(CRulerBar *pRuler) | CRulerItem | [inline, virtual]
SetTrack(BOOL b) | CRulerItem |
SetTrack(BOOL b) | CRulerItem |
SetVertPos(int nYPos) | CRulerItem | [inline, virtual]
SetVertPos(int nYPos) | CRulerItem | [inline, virtual]
TrackHorzPosTwips(int nXPos, BOOL bOnRuler=TRUE) | CRulerItem | [virtual]
TrackHorzPosTwips(int nXPos, BOOL bOnRuler=TRUE) | CRulerItem | [virtual]
~CRulerItem() | CRulerItem |
~CRulerItem() | CRulerItem |
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushppg.cpp Source File

  • controls
  • push

pushppg.cpp

Go to the documentation of this file.
00001 // pushppg.cpp : Implementation of the CPushPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "push.h"
00015 #include "pushppg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 IMPLEMENT_DYNCREATE(CPushPropPage, COlePropertyPage)
00024
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // Message map
00028
00029 BEGIN_MESSAGE_MAP(CPushPropPage, COlePropertyPage)
00030   //{{AFX_MSG_MAP(CPushPropPage)
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // Initialize class factory and guid
00037
00038 IMPLEMENT_OLECREATE_EX(CPushPropPage, "PUSH.PushPropPage.1",
00039   0x37446b88, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CPushPropPage::CPushPropPageFactory::UpdateRegistry -
00044 // Adds or removes system registry entries for CPushPropPage
00045
00046 BOOL CPushPropPage::CPushPropPageFactory::UpdateRegistry(BOOL bRegister)
00047 {
00048   if (bRegister)
00049     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00050       m_clsid, IDS_PUSH_PPG);
00051   else
00052     return AfxOleUnregisterClass(m_clsid, NULL);
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CPushPropPage::CPushPropPage - Constructor
00058
00059 CPushPropPage::CPushPropPage() :
00060   COlePropertyPage(IDD, IDS_PUSH_PPG_CAPTION)
00061 {
00062   //{{AFX_DATA_INIT(CPushPropPage)
00063   m_Border = FALSE;
00064   m_Caption = _T("");
00065   m_Enabled = FALSE;
00066   //}}AFX_DATA_INIT
00067 }
00068
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CPushPropPage::DoDataExchange - Moves data between page and properties
00072
00073 void CPushPropPage::DoDataExchange(CDataExchange* pDX)
00074 {
00075   //{{AFX_DATA_MAP(CPushPropPage)
00076   DDP_Check(pDX, IDC_BORDERCHECK, m_Border, _T("BorderStyle"));
00077   DDX_Check(pDX, IDC_BORDERCHECK, m_Border);
00078   DDP_Text(pDX, IDC_CAPTIONEDIT, m_Caption, _T("Caption"));
00079   DDX_Text(pDX, IDC_CAPTIONEDIT, m_Caption);
00080   DDP_Check(pDX, IDC_ENABLEDCHECK, m_Enabled, _T("Enabled"));
00081   DDX_Check(pDX, IDC_ENABLEDCHECK, m_Enabled);
00082   //}}AFX_DATA_MAP
00083   DDP_PostProcessing(pDX);
00084 }
00085
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CPushPropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/stdafx.h Source File

  • general
  • rowlist

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00015
00016 #include <afxwin.h>         // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions
00018 #include <afxcview.h>
00019 #ifndef _AFX_NO_AFXCMN_SUPPORT
00020 #include <afxcmn.h>         // MFC support for Windows 95 Common Controls
00021 #endif // _AFX_NO_AFXCMN_SUPPORT
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/stdafx.cpp Source File

  • vc2008fp
  • RollupPane

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // RollupPane.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHelloWindow Member List

This is the complete list of members for CHelloWindow, including all inherited members.
CHelloWindow() CHelloWindow [inline]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertyBag Member List

This is the complete list of members for CPropertyBag, including all inherited members.
CPropertyBag() | CPropertyBag |
GetFirstItemPosition() const | CPropertyBag |
GetNextItem(POSITION &posItem) const | CPropertyBag |
m_lpItems | CPropertyBag | [protected]
m_nRefCount | CPropertyBag | [protected]
QueryInterface(REFIID iid, void **ppInterface) | CPropertyBag |
Read(LPCOLESTR pszPropName, VARIANT *pvarValue, IErrorLog *pErrorLog) | CPropertyBag |
STDMETHOD_(ULONG, AddRef)() | CPropertyBag |
STDMETHOD_(ULONG, Release)() | CPropertyBag |
Write(LPCOLESTR pszPropName, VARIANT *pvarValue) | CPropertyBag |
~CPropertyBag() | CPropertyBag |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/oclient.h Source File

  • ole
  • oclient

oclient.h

Go to the documentation of this file.
00001 // oclient.h : main header file for the OCLIENT application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // COleClientApp: See oclient.cpp for the implementation of this class
00021
00022 class COleClientApp : public CWinApp
00023 {
00024 public:
00025   COleClientApp();
00026
00027 // Overrides
00028   virtual BOOL InitInstance();
00029
00030 // Implementation
00031 protected:
00032   COleTemplateServer m_server;
00033
00034   //{{AFX_MSG(COleClientApp)
00035   afx_msg void OnAppAbout();
00036   //}}AFX_MSG
00037   DECLARE_MESSAGE_MAP()
00038 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliLiveIconsHandler.cpp Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawCliLiveIconsHandler.cpp

Go to the documentation of this file.
00001 // DrawCliLiveIconsHandler.cpp : Implementation of CDrawCliLiveIconsHandler
00002
00003 #include "stdafx.h"
00004 #include "DrawCliLiveIconsHandler.h"
00005
00006
00007 // CDrawCliLiveIconsHandler
00008
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FoldersTree.h Source File

  • vc2008fp
  • OutlookDemo

FoldersTree.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CWorkspaceObj;
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CFoldersTree window
00016
00017 class CFoldersTree : public CTreeCtrl
00018 {
00019 // Construction
00020 public:
00021   CFoldersTree(const CObList& lstWorkspaces, CImageList& images);
00022
00023 // Attributes
00024 protected:
00025   CTreeCtrl m_wndFolders;
00026   const CObList& m_lstWorkspaces;
00027   CImageList& m_images;
00028
00029   CMap<CWorkspaceObj*, CWorkspaceObj*, HTREEITEM, HTREEITEM> m_Items;
00030
00031 // Operations
00032 public:
00033   BOOL SelectWorkspace(CWorkspaceObj* pWS);
00034
00035 // Overrides
00036 protected:
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038
00039 // Implementation
00040 public:
00041   virtual ~CFoldersTree();
00042
00043 protected:
00044   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/finddlg.h Source File

  • general
  • npp

finddlg.h

Go to the documentation of this file.
00001 // finddlg.h : interface of the CFindDlg class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CFindDlg dialog
00015
00016 class CFindDlg : public CDialog
00017 {
00018 // Construction
00019 public:
00020   CFindDlg(CWnd* pParent = NULL);   // standard constructor
00021
00022 // Dialog Data
00023   //{{AFX_DATA(CFindDlg)
00024   enum { IDD = IDD_FIND };
00025   BOOL    m_bMatchCase;
00026   CString m_szText;
00027   int m_nDirection;   // search direction 0=down, 1=up
00028   //}}AFX_DATA
00029
00030 // Overrides
00031   // ClassWizard generated virtual function overrides
00032   //{{AFX_VIRTUAL(CFindDlg)
00033   protected:
00034   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00035   //}}AFX_VIRTUAL
00036
00037 // Implementation
00038 protected:
00039   // Generated message map functions
00040   //{{AFX_MSG(CFindDlg)
00041   afx_msg void OnEditFindNext();
00042   virtual BOOL OnInitDialog();
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/pageset.cpp Source File

  • vc2008fp
  • WordPad

pageset.cpp

Go to the documentation of this file.
00001 //
00002 // pageset.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "resource.h"
00017 #include "pageset.h"
00018 #include "ruler.h"
00019 #include "ddxm.h"
00020 #include "helpids.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CPageSetupDlg dialog
00029
00030 const DWORD CPageSetupDlg::m_nHelpIDs[] =
00031 {
00032   IDC_EDIT_TM, IDH_WORDPAD_TOPMARGIN,
00033   IDC_EDIT_BM, IDH_WORDPAD_BOTTOMMARGIN,
00034   IDC_EDIT_LM, IDH_WORDPAD_LEFTMARGIN,
00035   IDC_EDIT_RM, IDH_WORDPAD_RIGHTMARGIN,
00036   IDC_BOX, IDH_COMM_GROUPBOX,
00037   0, 0
00038 };
00039
00040 CPageSetupDlg::CPageSetupDlg(CWnd* pParent /*=NULL*/)
00041   : CCSDialog(CPageSetupDlg::IDD, pParent)
00042 {
00043   //{{AFX_DATA_INIT(CPageSetupDlg)
00044   m_nTopMargin = 0;
00045   m_nRightMargin = 0;
00046   m_nLeftMargin = 0;
00047   m_nBottomMargin = 0;
00048   //}}AFX_DATA_INIT
00049 }
00050
00051 void CPageSetupDlg::DoDataExchange(CDataExchange* pDX)
00052 {
00053   CCSDialog::DoDataExchange(pDX);
00054   //{{AFX_DATA_MAP(CPageSetupDlg)
00055   DDX_Twips(pDX, IDC_EDIT_TM, m_nTopMargin);
00056   DDV_MinMaxTwips(pDX, m_nTopMargin, -31680, 31680);
00057   DDX_Twips(pDX, IDC_EDIT_RM, m_nRightMargin);
00058   DDV_MinMaxTwips(pDX, m_nRightMargin, -31680, 31680);
00059   DDX_Twips(pDX, IDC_EDIT_LM, m_nLeftMargin);
00060   DDV_MinMaxTwips(pDX, m_nLeftMargin, -31680, 31680);
00061   DDX_Twips(pDX, IDC_EDIT_BM, m_nBottomMargin);
00062   DDV_MinMaxTwips(pDX, m_nBottomMargin, -31680, 31680);
00063   //}}AFX_DATA_MAP
00064 }
00065
00066 BEGIN_MESSAGE_MAP(CPageSetupDlg, CCSDialog)
00067   //{{AFX_MSG_MAP(CPageSetupDlg)
00068   //}}AFX_MSG_MAP
00069 END_MESSAGE_MAP()
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CPageSetupDlg message handlers
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/TaskPane.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

TaskPane.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "TaskPane.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CTaskPane
00024
00025 BEGIN_MESSAGE_MAP(CTaskPane, CMFCTasksPane)
00026   //{{AFX_MSG_MAP(CTaskPane)
00027   ON_WM_CREATE()
00028   //}}AFX_MSG_MAP
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CTaskPane construction/destruction
00033
00034 CTaskPane::CTaskPane()
00035 {
00036 }
00037
00038 CTaskPane::~CTaskPane()
00039 {
00040 }
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CTaskPane message handlers
00044
00045 int CTaskPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
00046 {
00047   SetWindowText(_T("Clipboard"));
00048
00049   if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
00050     return -1;
00051
00052   // Create tasks pane windows.
00053   // TODO: create your own tasks panes here:
00054
00055   return 0;
00056 }
00057
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBounceThread Member List

This is the complete list of members for CBounceThread, including all inherited members.
CBounceThread() | CBounceThread | [protected]
CBounceThread(HWND hwndParent) | CBounceThread |
ExitInstance() | CBounceThread | [virtual]
InitInstance() | CBounceThread | [virtual]
m_hEventBounceThreadKilled | CBounceThread | [static]
m_hwndParent | CBounceThread | [protected]
m_wndBounce | CBounceThread | [protected]
operator delete(void *p) | CBounceThread |
~CBounceThread() | CBounceThread | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.cpp Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "WorkSpaceToolBar.h"
00013
00014 #include "MainFrm.h"
00015 #include "ChildFrm.h"
00016 #include "WorkSpaceToolBarDoc.h"
00017 #include "WorkSpaceToolBarView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CWorkSpaceToolBarApp
00027
00028 BEGIN_MESSAGE_MAP(CWorkSpaceToolBarApp, CWinApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   // Standard file based document commands
00031   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00032   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00033   // Standard print setup command
00034   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CWorkSpaceToolBarApp construction
00039
00040 CWorkSpaceToolBarApp::CWorkSpaceToolBarApp() :
00041   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00042 {
00043   // TODO: add construction code here,
00044   // Place all significant initialization in InitInstance
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CWorkSpaceToolBarApp object
00049
00050 CWorkSpaceToolBarApp theApp;
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CWorkSpaceToolBarApp initialization
00054
00055 BOOL CWorkSpaceToolBarApp::InitInstance()
00056 {
00057   // Initialize OLE libraries
00058   if (!AfxOleInit())
00059   {
00060     AfxMessageBox(IDP_OLE_INIT_FAILED);
00061     return FALSE;
00062   }
00063
00064   AfxEnableControlContainer();
00065
00066   // Standard initialization
00067   // If you are not using these features and wish to reduce the size
00068   //  of your final executable, you should remove from the following
00069   //  the specific initialization routines you do not need.
00070
00071   // Change the registry key under which our settings are stored.
00072   // TODO: You should modify this string to be something appropriate
00073   // such as the name of your company or organization.
00074   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00075
00076   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00077
00078   SetRegistryBase (_T("Settings"));
00079
00080   // Initialize all Managers for usage. They are automatically constructed
00081   // if not yet present
00082   InitContextMenuManager();
00083   InitKeyboardManager();
00084
00085   // Register the application's document templates.  Document templates
00086   //  serve as the connection between documents, frame windows and views.
00087
00088   CMultiDocTemplate* pDocTemplate;
00089   pDocTemplate = new CMultiDocTemplate(
00090     IDR_WORKSPTYPE,
00091     RUNTIME_CLASS(CWorkSpaceToolBarDoc),
00092     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00093     RUNTIME_CLASS(CWorkSpaceToolBarView));
00094   AddDocTemplate(pDocTemplate);
00095
00096   // create main MDI Frame window
00097   CMainFrame* pMainFrame = new CMainFrame;
00098   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00099     return FALSE;
00100   m_pMainWnd = pMainFrame;
00101
00102   // Parse command line for standard shell commands, DDE, file open
00103   CCommandLineInfo cmdInfo;
00104   ParseCommandLine(cmdInfo);
00105
00106   // Dispatch commands specified on the command line
00107   if (!ProcessShellCommand(cmdInfo))
00108     return FALSE;
00109
00110   // The main window has been initialized, so show and update it.
00111   pMainFrame->ShowWindow(m_nCmdShow);
00112   pMainFrame->UpdateWindow();
00113
00114   return TRUE;
00115 }
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CWorkSpaceToolBarApp message handlers
00119
00120 int CWorkSpaceToolBarApp::ExitInstance()
00121 {
00122
00123
00124   return CWinAppEx::ExitInstance();
00125 }
00126
00127 void CWorkSpaceToolBarApp::PreLoadState ()
00128 {
00129
00130   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00131
00132   // TODO: add another context menus here
00133 }
00134
00135
00136 /////////////////////////////////////////////////////////////////////////////
00137 // CAboutDlg dialog used for App About
00138
00139 class CAboutDlg : public CDialog
00140 {
00141 public:
00142   CAboutDlg();
00143
00144 // Dialog Data
00145   //{{AFX_DATA(CAboutDlg)
00146   enum { IDD = IDD_ABOUTBOX };
00147   //}}AFX_DATA
00148
00149   // ClassWizard generated virtual function overrides
00150   //{{AFX_VIRTUAL(CAboutDlg)
00151   protected:
00152   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00153   //}}AFX_VIRTUAL
00154
00155 // Implementation
00156 protected:
00157   //{{AFX_MSG(CAboutDlg)
00158     // No message handlers
00159   //}}AFX_MSG
00160   DECLARE_MESSAGE_MAP()
00161 };
00162
00163 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00164 {
00165   //{{AFX_DATA_INIT(CAboutDlg)
00166   //}}AFX_DATA_INIT
00167 }
00168
00169 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00170 {
00171   CDialog::DoDataExchange(pDX);
00172   //{{AFX_DATA_MAP(CAboutDlg)
00173   //}}AFX_DATA_MAP
00174 }
00175
00176 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00177   //{{AFX_MSG_MAP(CAboutDlg)
00178     // No message handlers
00179   //}}AFX_MSG_MAP
00180 END_MESSAGE_MAP()
00181
00182 // App command to run the dialog
00183 void CWorkSpaceToolBarApp::OnAppAbout()
00184 {
00185   CAboutDlg aboutDlg;
00186   aboutDlg.DoModal();
00187 }
00188
00189 /////////////////////////////////////////////////////////////////////////////
00190 // CWorkSpaceToolBarApp message handlers
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timectl.cpp Source File

  • controls
  • time

timectl.cpp

Go to the documentation of this file.
00001 // timectl.cpp : Implementation of the CTimeCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "time.h"
00015 #include "timectl.h"
00016 #include "timeppg.h"
00017
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // Numeric constants
00027
00028 const short ID_TIMER = 1;
00029
00030
00031 IMPLEMENT_DYNCREATE(CTimeCtrl, COleControl)
00032
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // Message map
00036
00037 BEGIN_MESSAGE_MAP(CTimeCtrl, COleControl)
00038   //{{AFX_MSG_MAP(CTimeCtrl)
00039   ON_WM_CREATE()
00040   ON_WM_DESTROY()
00041   ON_WM_ERASEBKGND()
00042   ON_WM_TIMER()
00043   //}}AFX_MSG_MAP
00044   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00045 END_MESSAGE_MAP()
00046
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // Dispatch map
00050
00051 BEGIN_DISPATCH_MAP(CTimeCtrl, COleControl)
00052   //{{AFX_DISPATCH_MAP(CTimeCtrl)
00053   DISP_PROPERTY_NOTIFY(CTimeCtrl, "Interval", m_interval, OnIntervalChanged, VT_I2)
00054   DISP_STOCKPROP_ENABLED()
00055   //}}AFX_DISPATCH_MAP
00056   DISP_FUNCTION_ID(CTimeCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00057 END_DISPATCH_MAP()
00058
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // Event map
00062
00063 BEGIN_EVENT_MAP(CTimeCtrl, COleControl)
00064   //{{AFX_EVENT_MAP(CTimeCtrl)
00065   EVENT_CUSTOM("Timer", FireTimer, VTS_NONE)
00066   //}}AFX_EVENT_MAP
00067 END_EVENT_MAP()
00068
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // Property pages
00072
00073 // TODO: Add more property pages as needed.  Remember to increase the count!
00074 BEGIN_PROPPAGEIDS(CTimeCtrl, 1)
00075   PROPPAGEID(CTimePropPage::guid)
00076 END_PROPPAGEIDS(CTimeCtrl)
00077
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // Initialize class factory and guid
00081
00082 IMPLEMENT_OLECREATE_EX(CTimeCtrl, "TIME.TimeCtrl.1",
00083   0xdcf0768d, 0xba7a, 0x101a, 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f)
00084
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // Type library ID and version
00088
00089 IMPLEMENT_OLETYPELIB(CTimeCtrl, _tlid, _wVerMajor, _wVerMinor)
00090
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093 // Interface IDs
00094
00095 const IID BASED_CODE IID_DTime =
00096     { 0x37446b91, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00097 const IID BASED_CODE IID_DTimeEvents =
00098     { 0x37446b92, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00099
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // Control type information
00103
00104 static const DWORD BASED_CODE _dwTimeOleMisc =
00105   OLEMISC_INVISIBLEATRUNTIME |
00106   OLEMISC_ACTIVATEWHENVISIBLE |
00107   OLEMISC_SETCLIENTSITEFIRST |
00108   OLEMISC_INSIDEOUT |
00109   OLEMISC_CANTLINKINSIDE |
00110   OLEMISC_RECOMPOSEONRESIZE;
00111
00112 IMPLEMENT_OLECTLTYPE(CTimeCtrl, IDS_TIME, _dwTimeOleMisc)
00113
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // CTimeCtrl::CTimeCtrlFactory::UpdateRegistry -
00117 // Adds or removes system registry entries for CTimeCtrl
00118
00119 BOOL CTimeCtrl::CTimeCtrlFactory::UpdateRegistry(BOOL bRegister)
00120 {
00121   if (bRegister)
00122     return AfxOleRegisterControlClass(
00123       AfxGetInstanceHandle(),
00124       m_clsid,
00125       m_lpszProgID,
00126       IDS_TIME,
00127       IDB_TIME,
00128       FALSE,                      //  Not insertable
00129       _dwTimeOleMisc,
00130       _tlid,
00131       _wVerMajor,
00132       _wVerMinor);
00133   else
00134     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00135 }
00136
00137
00138 /////////////////////////////////////////////////////////////////////////////
00139 // CTimeCtrl::CTimeCtrl - Constructor
00140
00141 CTimeCtrl::CTimeCtrl()
00142 {
00143   InitializeIIDs(&IID_DTime, &IID_DTimeEvents);
00144
00145   SetInitialSize(24, 22);
00146   m_interval = (short) DEFAULT_INTERVAL; // initialize interval property
00147 }
00148
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CTimeCtrl::~CTimeCtrl - Destructor
00152
00153 CTimeCtrl::~CTimeCtrl()
00154 {
00155 }
00156
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CTimeCtrl::OnDraw - Drawing function
00160
00161 void CTimeCtrl::OnDraw(
00162       CDC* pdc, const CRect& rcBounds, const CRect&)
00163 {
00164   CBitmap bitmap;
00165   BITMAP  bmp;
00166   CPictureHolder picHolder;
00167   CRect rcSrcBounds;
00168
00169   // Load clock bitmap
00170   bitmap.LoadBitmap(IDB_CLOCK);
00171   bitmap.GetObject(sizeof(BITMAP), &bmp);
00172   rcSrcBounds.right = bmp.bmWidth;
00173   rcSrcBounds.bottom = bmp.bmHeight;
00174
00175   // Create picture and render
00176   picHolder.CreateFromBitmap((HBITMAP)bitmap.m_hObject, NULL, FALSE);
00177   picHolder.Render(pdc, rcBounds, rcSrcBounds);
00178 }
00179
00180
00181 /////////////////////////////////////////////////////////////////////////////
00182 // CTimeCtrl::DoPropExchange - Persistence support
00183
00184 void CTimeCtrl::DoPropExchange(CPropExchange* pPX)
00185 {
00186   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00187   COleControl::DoPropExchange(pPX);
00188
00189   short nInterval = m_interval;
00190   PX_Short(pPX, _T("Interval"), (short) m_interval, (short) DEFAULT_INTERVAL);
00191
00192   if (pPX->IsLoading())
00193   {
00194     if (nInterval != m_interval)
00195       OnIntervalChanged();    // Force timer to recreate w/ correct interval
00196     OnEnabledChanged();
00197   }
00198 }
00199
00200
00201 /////////////////////////////////////////////////////////////////////////////
00202 // CTimeCtrl::OnResetState - Reset control to default state
00203
00204 void CTimeCtrl::OnResetState()
00205 {
00206   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00207 }
00208
00209
00210 /////////////////////////////////////////////////////////////////////////////
00211 // CTimeCtrl::AboutBox - Display an "About" box to the user
00212
00213 void CTimeCtrl::AboutBox()
00214 {
00215   CDialog dlgAbout(IDD_ABOUTBOX_TIME);
00216   dlgAbout.DoModal();
00217 }
00218
00219
00220 /////////////////////////////////////////////////////////////////////////////
00221 // CTimeCtrl::OnEnabledChanged - Start/stop the timer when the enable state
00222 // has changed.
00223
00224 void CTimeCtrl::OnEnabledChanged()
00225 {
00226   if (AmbientUserMode())
00227   {
00228     if (GetEnabled())
00229     {
00230       if (GetHwnd() != NULL)
00231         StartTimer();
00232     }
00233     else
00234       StopTimer();
00235   }
00236 }
00237
00238
00239 /////////////////////////////////////////////////////////////////////////////
00240 // CTimeCtrl::OnIntervalChanged - Respond to a change of interval.
00241
00242 void CTimeCtrl::OnIntervalChanged()
00243 {
00244   // Restart timer if it's enabled
00245   if (GetEnabled() && AmbientUserMode())
00246   {
00247     StopTimer();
00248     StartTimer();
00249   }
00250
00251   SetModifiedFlag(TRUE);
00252 }
00253
00254
00255 /////////////////////////////////////////////////////////////////////////////
00256 // CTimeCtrl::OnSetClientSite - Force creation of window
00257
00258 void CTimeCtrl::OnSetClientSite()
00259 {
00260   RecreateControlWindow();
00261 }
00262
00263
00264 /////////////////////////////////////////////////////////////////////////////
00265 // CTimeCtrl::OnCreate - Start the timer if it's enabled.
00266
00267 int CTimeCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
00268 {
00269   if (COleControl::OnCreate(lpCreateStruct) == -1)
00270     return -1;
00271
00272   // Start timer if in user mode and if enabled
00273   if (AmbientUserMode() && GetEnabled())
00274     StartTimer();
00275
00276   return 0;
00277 }
00278
00279
00280 /////////////////////////////////////////////////////////////////////////////
00281 // CTimeCtrl::OnDestroy - Stop the timer before the control is destroyed.
00282
00283 void CTimeCtrl::OnDestroy()
00284 {
00285   StopTimer();
00286
00287   COleControl::OnDestroy();
00288 }
00289
00290
00291 /////////////////////////////////////////////////////////////////////////////
00292 // CTimeCtrl::OnEraseBkgnd - Simply return TRUE so background is not erased.
00293
00294 BOOL CTimeCtrl::OnEraseBkgnd(CDC*)
00295 {
00296   return TRUE;
00297 }
00298
00299
00300 /////////////////////////////////////////////////////////////////////////////
00301 // CTimeCtrl::OnTimer - Fire the timer event.
00302
00303 void CTimeCtrl::OnTimer(UINT_PTR)
00304 {
00305   FireTimer();
00306 }
00307
00308
00309 /////////////////////////////////////////////////////////////////////////////
00310 // CTimeCtrl::OnAmbientPropertyChange - Start the timer if user mode ambient
00311 // property has changed and if timer is enabled.  Stop the timer if user
00312 // mode ambient property has changed and if timer is enabled.
00313
00314 void CTimeCtrl::OnAmbientPropertyChange(DISPID dispid)
00315 {
00316   if (dispid == DISPID_AMBIENT_USERMODE)
00317   {
00318     // Start or stop the timer
00319     if (GetEnabled())
00320     {
00321       if (AmbientUserMode())
00322         StartTimer();
00323       else
00324         StopTimer();
00325     }
00326
00327     InvalidateControl();
00328   }
00329 }
00330
00331
00332 /////////////////////////////////////////////////////////////////////////////
00333 // CTimeCtrl::StartTimer - Start the timer.
00334
00335 void CTimeCtrl::StartTimer()
00336 {
00337   SetTimer(ID_TIMER, m_interval, NULL);
00338 }
00339
00340
00341 /////////////////////////////////////////////////////////////////////////////
00342 // CTimeCtrl::StopTimer - Stop the timer.
00343
00344 void CTimeCtrl::StopTimer()
00345 {
00346   KillTimer(ID_TIMER);
00347 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/stdafx.h Source File

  • ole
  • inproc

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define VC_EXTRALEAN
00013
00014 #include <afxwin.h>         // MFC core and standard components
00015 #include <afxext.h>         // MFC extensions
00016 #include <afxdisp.h>        // MFC OLE automation classes
00017 #include <afxtempl.h>       // MFC class templates
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatpa.h Source File

  • ole
  • wordpad

formatpa.h

Go to the documentation of this file.
00001 // formatpa.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CFormatParaDlg dialog
00014
00015 class CFormatParaDlg : public CCSDialog
00016 {
00017 // Construction
00018 public:
00019   CFormatParaDlg(PARAFORMAT2& pf, CWnd* pParent = NULL);   // standard constructor
00020   PARAFORMAT2 m_pf;
00021
00022 // Attributes
00023   int m_nWordWrap;
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CFormatParaDlg)
00027   enum { IDD = IDD_FORMAT_PARA };
00028   int     m_nAlignment;
00029   int     m_nFirst;
00030   int     m_nLeft;
00031   int     m_nRight;
00032   BOOL  m_bPageBreak;
00033   int   m_nAfter;
00034   int   m_nBefore;
00035   //}}AFX_DATA
00036
00037 // Implementation
00038 protected:
00039   static const DWORD m_nHelpIDs[];
00040   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00041   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00042   virtual void OnOK();
00043
00044   // Generated message map functions
00045   //{{AFX_MSG(CFormatParaDlg)
00046   virtual BOOL OnInitDialog();
00047   afx_msg void OnDeltaposSpinBefore(NMHDR* pNMHDR, LRESULT* pResult);
00048   afx_msg void OnDeltaposSpinAfter(NMHDR* pNMHDR, LRESULT* pResult);
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPaletteDemoDoc Member List

This is the complete list of members for CPaletteDemoDoc, including all inherited members.
CPaletteDemoDoc() | CPaletteDemoDoc | [protected]
m_uiCurrTool | CPaletteDemoDoc |
OnNewDocument() | CPaletteDemoDoc | [virtual]
OnPaletteTool(UINT uiCmd) | CPaletteDemoDoc | [protected]
OnUpdatePaletteTool(CCmdUI *pCmdUI) | CPaletteDemoDoc | [protected]
Serialize(CArchive &ar) | CPaletteDemoDoc | [virtual]
~CPaletteDemoDoc() | CPaletteDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PEdReqPg.H Source File

  • ole
  • TstCon

PEdReqPg.H

Go to the documentation of this file.
00001 // File: PEdReqPg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_PROPERTYEDITREQUESTSPAGE_H__E3C35167_EC02_11D0_8E1D_00C04FB68D60__INCLUDED_)
00011 #define AFX_PROPERTYEDITREQUESTSPAGE_H__E3C35167_EC02_11D0_8E1D_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // PropertyEditRequestsPage.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CPropertyEditRequestsPage dialog
00021
00022 class CPropertyEditRequestsPage :
00023    public CPropertyPage
00024 {
00025    DECLARE_DYNCREATE( CPropertyEditRequestsPage )
00026
00027 public:
00028    class CPropertyInfo
00029    {
00030    public:
00031     CPropertyInfo();
00032     CPropertyInfo( LPCTSTR pszName, BOOL tLogged, int iResponse );
00033
00034    public:
00035     CString m_strName;
00036     BOOL m_tLogged;
00037     int m_iResponse;
00038    };
00039
00040 // Construction
00041 public:
00042   CPropertyEditRequestsPage();
00043
00044 // Dialog Data
00045   //{{AFX_DATA(CPropertyEditRequestsPage)
00046   enum { IDD = IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS };
00047   CCheckListBox   m_lbProperties;
00048   int     m_iAllowEdit;
00049   //}}AFX_DATA
00050
00051    CArray< CPropertyInfo, CPropertyInfo& > m_aProperties;
00052
00053 // Overrides
00054   // ClassWizard generated virtual function overrides
00055   //{{AFX_VIRTUAL(CPropertyEditRequestsPage)
00056   protected:
00057   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00058   //}}AFX_VIRTUAL
00059
00060 // Implementation
00061 protected:
00062    int GetSelectionResponse();
00063    void SetSelectionResponse( int iResponse );
00064
00065   // Generated message map functions
00066   //{{AFX_MSG(CPropertyEditRequestsPage)
00067   virtual BOOL OnInitDialog();
00068   afx_msg void OnPropertiesSelChange();
00069   afx_msg void OnAlways();
00070   afx_msg void OnNever();
00071   afx_msg void OnPrompt();
00072   afx_msg void OnSelectAll();
00073   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00074   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00075   //}}AFX_MSG
00076   DECLARE_MESSAGE_MAP()
00077 };
00078
00079 //{{AFX_INSERT_LOCATION}}
00080 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00081
00082 #endif // !defined(AFX_PROPERTYEDITREQUESTSPAGE_H__E3C35167_EC02_11D0_8E1D_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collevw.cpp Source File

  • advanced
  • collect

collevw.cpp

Go to the documentation of this file.
00001 // collevw.cpp : implementation of the CCollectView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014
00015 #include "colledoc.h"
00016 #include "collevw.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CCollectView
00025
00026 IMPLEMENT_DYNCREATE(CCollectView, CView)
00027
00028 BEGIN_MESSAGE_MAP(CCollectView, CView)
00029   //{{AFX_MSG_MAP(CCollectView)
00030   //}}AFX_MSG_MAP
00031   // Standard printing commands
00032   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00033   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CCollectView construction/destruction
00038
00039 CCollectView::CCollectView()
00040 {
00041 }
00042
00043 CCollectView::~CCollectView()
00044 {
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CCollectView drawing
00049
00050 void CCollectView::OnDraw(CDC* pDC)
00051 {
00052   CCollectDoc* pDoc = GetDocument();
00053   ASSERT_VALID(pDoc);
00054
00055   pDC;    // not used
00056 }
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CCollectView printing
00060
00061 BOOL CCollectView::OnPreparePrinting(CPrintInfo* pInfo)
00062 {
00063   // default preparation
00064   return DoPreparePrinting(pInfo);
00065 }
00066
00067 void CCollectView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00068 {
00069 }
00070
00071 void CCollectView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00072 {
00073 }
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CCollectView diagnostics
00077
00078 #ifdef _DEBUG
00079 void CCollectView::AssertValid() const
00080 {
00081   CView::AssertValid();
00082 }
00083
00084 void CCollectView::Dump(CDumpContext& dc) const
00085 {
00086   CView::Dump(dc);
00087 }
00088
00089 CCollectDoc* CCollectView::GetDocument() // non-debug version is inline
00090 {
00091   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00092 }
00093 #endif //_DEBUG
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CCollectView message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailFrame.cpp Source File

  • vc2008fp
  • OutlookDemo

MailFrame.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "MailFrame.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 static UINT indicators[] =
00021 {
00022   ID_SEPARATOR,           // status line indicator
00023   ID_INDICATOR_CAPS,
00024   ID_INDICATOR_NUM,
00025   ID_INDICATOR_SCRL,
00026 };
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CMailFrame
00030
00031 CObList CMailFrame::m_lstMailFrames;
00032
00033 IMPLEMENT_DYNCREATE(CMailFrame, CFrameWndEx)
00034
00035 CMailFrame::CMailFrame()
00036 {
00037   m_wndMenuBar.m_bClearHashOnClose = TRUE;
00038 }
00039
00040 CMailFrame::~CMailFrame()
00041 {
00042 }
00043
00044 BEGIN_MESSAGE_MAP(CMailFrame, CFrameWndEx)
00045   ON_WM_CREATE()
00046   ON_WM_ACTIVATE()
00047   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00048   ON_WM_CLOSE()
00049   ON_COMMAND(ID_MAIL_CLOSE, OnMailClose)
00050   ON_WM_ENABLE()
00051   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00052 END_MESSAGE_MAP()
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CMailFrame message handlers
00056
00057 int CMailFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00058 {
00059   m_lstMailFrames.AddTail(this);
00060
00061   m_pMainWnd = theApp.m_pMainWnd;
00062
00063   if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
00064     return -1;
00065
00066   BOOL bIsLook2003 = CMFCVisualManager::GetInstance()->IsKindOf(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
00067
00068   CWindowDC dc(NULL);
00069   int nBitsPerPixel = dc.GetDeviceCaps(BITSPIXEL);
00070
00071   BOOL bHiColorToolbarIcons = bIsLook2003 && nBitsPerPixel > 16;
00072
00073   // Create menu bar:
00074   if (!m_wndMenuBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, ID_MAIL_MENU))
00075   {
00076     TRACE0("Failed to create menubar\n");
00077     return -1;      // fail to create
00078   }
00079
00080   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00081
00082   // Create main toolbar:
00083   if (!m_wndToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP
00084     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, ID_VIEW_MAIL_TOOLBAR) || !m_wndToolBar.LoadToolBar(IDR_MAILFRAME, 0, 0, FALSE, 0, 0, bHiColorToolbarIcons ? IDB_MAIL_HC : 0))
00085   {
00086     TRACE0("Failed to create toolbar\n");
00087     return -1;      // fail to create
00088   }
00089
00090   BOOL bValidString;
00091   CString strMainToolbarTitle;
00092   bValidString = strMainToolbarTitle.LoadString(IDS_MAIN_TOOLBAR);
00093   m_wndToolBar.SetWindowText(strMainToolbarTitle);
00094
00095   // Create status bar:
00096   if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
00097   {
00098     TRACE0("Failed to create status bar\n");
00099     return -1;      // fail to create
00100   }
00101
00102   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00103   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00104
00105   EnableDocking(CBRS_ALIGN_ANY);
00106
00107   DockPane(&m_wndMenuBar);
00108   DockPane(&m_wndToolBar);
00109
00110   // Create mail bar:
00111   if (!m_wndMailBar.Create(_T(""), this, FALSE, MAKEINTRESOURCE(IDD_MAILBAR), WS_VISIBLE | WS_CHILD | CBRS_TOP, ID_MAIL_BAR, AFX_CBRS_REGULAR_TABS, 0))
00112   {
00113     TRACE0("Failed to create mail bar\n");
00114     return -1;      // fail to create
00115   }
00116
00117   DockPane(&m_wndMailBar);
00118
00119   CRect rect;
00120   m_wndMailBar.GetWindowRect(rect);
00121   m_wndMailBar.SetMinSize(rect.Size());
00122
00123   // Enable customization button fore all toolbars:
00124   m_wndToolBar.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, IDS_CUSTOMIZE);
00125
00126   // Enable conttol bar context menu(list of bars + customize command):
00127   EnablePaneMenu( TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."), ID_VIEW_TOOLBARS);
00128   return 0;
00129 }
00130
00131 LRESULT CMailFrame::OnToolbarReset(WPARAM wp,LPARAM)
00132 {
00133   UINT uiToolBarId = (UINT) wp;
00134   if (uiToolBarId == IDR_MAILFRAME)
00135   {
00136     m_wndToolBar.SetToolBarBtnText(m_wndToolBar.CommandToIndex(ID_MAIL_SEND));
00137     m_wndToolBar.SetToolBarBtnText(m_wndToolBar.CommandToIndex(ID_MAIL_OPTIONS));
00138   }
00139
00140   return 0;
00141 }
00142
00143 void CMailFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
00144 {
00145   CFrameWndEx::OnActivate(nState, pWndOther, bMinimized);
00146
00147   if (nState != WA_INACTIVE)
00148   {
00149     theApp.SetActiveFrame(COutlookDemoApp::MailFrame);
00150     theApp.m_pMainWnd = this;
00151   }
00152 }
00153
00154 void CMailFrame::OnViewCustomize()
00155 {
00156   // Create a customize toolbars dialog:
00157   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog(this, TRUE /* Automatic menus scaning */);
00158   pDlgCust->Create();
00159 }
00160
00161 void CMailFrame::OnClose()
00162 {
00163   theApp.m_pMainWnd = m_pMainWnd;
00164
00165   POSITION pos = m_lstMailFrames.Find(this);
00166   if (pos != NULL)
00167   {
00168     m_lstMailFrames.RemoveAt(pos);
00169   }
00170
00171   CFrameWndEx::OnClose();
00172 }
00173
00174 BOOL CMailFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
00175 {
00176   BOOL bRes = CFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext);
00177   if (bRes)
00178   {
00179     InitialUpdateFrame(pContext->m_pCurrentDoc, TRUE);
00180   }
00181
00182   theApp.SetActiveFrame(COutlookDemoApp::MailFrame);
00183   return bRes;
00184 }
00185
00186 void CMailFrame::OnMailClose()
00187 {
00188   SendMessage(WM_CLOSE);
00189 }
00190
00191 void CMailFrame::OnChangeLook()
00192 {
00193   BOOL bIsLook2003 = CMFCVisualManager::GetInstance()->IsKindOf(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
00194
00195   CWindowDC dc(NULL);
00196   int nBitsPerPixel = dc.GetDeviceCaps(BITSPIXEL);
00197
00198   BOOL bIsHiColor = bIsLook2003 && nBitsPerPixel > 16;
00199
00200   for (POSITION pos = m_lstMailFrames.GetHeadPosition(); pos != NULL;)
00201   {
00202     CMailFrame* pFrame = (CMailFrame*) m_lstMailFrames.GetNext(pos);
00203     ASSERT_VALID(pFrame);
00204
00205     pFrame->m_wndToolBar.LoadBitmap(bIsHiColor ? IDB_MAIL_HC : IDR_MAILFRAME);
00206     pFrame->RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00207   }
00208 }
00209
00210 void CMailFrame::OnEnable( BOOL bEnable )
00211 {
00212   CWnd* pWnd = GetNextWindow();
00213   while (pWnd != NULL)
00214   {
00215     if (pWnd->IsKindOf(RUNTIME_CLASS(CFrameWndEx)))
00216     {
00217       pWnd->EnableWindow(bEnable);
00218     }
00219     pWnd = pWnd->GetNextWindow();
00220   }
00221 }
00222
00223
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/MainFrm.h Source File

  • vc2008fp
  • RebarTest

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMainFrame : public CMDIFrameWndEx
00014 {
00015   DECLARE_DYNAMIC(CMainFrame)
00016 public:
00017   CMainFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026 public:
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028
00029 // Implementation
00030 public:
00031   virtual ~CMainFrame();
00032 #ifdef _DEBUG
00033   virtual void AssertValid() const;
00034   virtual void Dump(CDumpContext& dc) const;
00035 #endif
00036
00037 protected:  // control bar embedded members
00038   CMFCStatusBar     m_wndStatusBar;
00039   CMFCMenuBar     m_wndMenuBar;
00040   CMFCToolBar     m_wndToolBar;
00041   CMFCReBar       m_wndReBar;
00042
00043   CMFCToolBarImages m_UserImages;
00044 // Generated message map functions
00045 protected:
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047   afx_msg void OnViewCustomize();
00048   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00049   void OnToolsViewUserToolbar (UINT id);
00050   void OnUpdateToolsViewUserToolbar (CCmdUI* pCmdUI);
00051   afx_msg void OnWindowManager();
00052   afx_msg void OnAppLook(UINT id);
00053   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00054   afx_msg void OnClose();
00055   DECLARE_MESSAGE_MAP()
00056
00057   virtual CMDIChildWndEx* CreateDocumentWindow (LPCTSTR lpcszDocName, CObject* /*pObj*/);
00058
00059   UINT  m_nAppLook;
00060 };
00061
00062
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSNDlg Member List

This is the complete list of members for CMSNDlg, including all inherited members.
CMSNDlg() | CMSNDlg |
DoDataExchange(CDataExchange *pDX) | CMSNDlg | [protected, virtual]
IDD enum value | CMSNDlg |
m_btnRL | CMSNDlg |
m_imgLogo | CMSNDlg | [protected]
m_Options | CMSNDlg |
OnButton1() | CMSNDlg | [protected]
OnDraw(CDC *pDC) | CMSNDlg | [protected, virtual]
OnInitDialog() | CMSNDlg | [protected, virtual]
OnOptions() | CMSNDlg | [protected]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexes.cpp Source File

  • advanced
  • mutexes

mutexes.cpp

Go to the documentation of this file.
00001 // mutexes.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // This sample application is derived from the Mutex application
00013 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00014 // (Microsoft Press).  See the book for more information about Win32
00015 // programming topics, including thread synchronization.
00016
00017 #include "stdafx.h"
00018 #include "mutexes.h"
00019 #include "mutexdlg.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMutexesApp
00028
00029 BEGIN_MESSAGE_MAP(CMutexesApp, CWinApp)
00030   //{{AFX_MSG_MAP(CMutexesApp)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code!
00033   //}}AFX_MSG
00034   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CMutexesApp construction
00039
00040 CMutexesApp::CMutexesApp()
00041 {
00042   // TODO: add construction code here,
00043   // Place all significant initialization in InitInstance
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CMutexesApp object
00048
00049 CMutexesApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CMutexesApp initialization
00053
00054 BOOL CMutexesApp::InitInstance()
00055 {
00056   // Standard initialization
00057   // If you are not using these features and wish to reduce the size
00058   //  of your final executable, you should remove from the following
00059   //  the specific initialization routines you do not need.
00060
00061   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00062
00063   CMutexesDlg dlg;
00064   m_pMainWnd = &dlg;
00065   int nResponse = (int)dlg.DoModal();
00066   if (nResponse == IDOK)
00067   {
00068     // TODO: Place code here to handle when the dialog is
00069     //  dismissed with OK
00070   }
00071   else if (nResponse == IDCANCEL)
00072   {
00073     // TODO: Place code here to handle when the dialog is
00074     //  dismissed with Cancel
00075   }
00076
00077   // Since the dialog has been closed, return FALSE so that we exit the
00078   //  application, rather than start the application's message pump.
00079   return FALSE;
00080 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/stdafx.cpp Source File

  • general
  • modeless

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  modeless.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTestContainer98View Member List

This is the complete list of members for CTestContainer98View, including all inherited members.
ClearSelection() | CTestContainer98View |
CTestContainer98View() | CTestContainer98View | [protected]
GetDocument() | CTestContainer98View | [inline]
GetItemWithCapture() const | CTestContainer98View |
GetItemWithFocus() const | CTestContainer98View |
HandlePointerInactiveDragOver(CPoint point) | CTestContainer98View |
HandlePointerInactiveMove(CPoint point, DWORD dwKeyState) | CTestContainer98View |
HandlePointerInactiveSetCursor(DWORD dwMouseMessage) | CTestContainer98View |
HandleWindowlessDragEnter(COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect) | CTestContainer98View |
HandleWindowlessDragLeave() | CTestContainer98View |
HandleWindowlessDragOver(COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect) | CTestContainer98View |
HandleWindowlessDrop(COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect) | CTestContainer98View |
HandleWindowlessKeyboardMessage() | CTestContainer98View |
HandleWindowlessMouseMessage(CPoint point) | CTestContainer98View |
HitTestItems(CPoint point, DWORD *pdwHitType) | CTestContainer98View |
IsSelected(const CObject *pDocItem) const | CTestContainer98View | [protected, virtual]
m_dropTarget | CTestContainer98View | [protected]
m_dwLastDropKeyState | CTestContainer98View | [protected]
m_lpSelectedItems | CTestContainer98View | [protected]
m_pInactiveDropTarget | CTestContainer98View | [protected]
m_pItemToDeactivateOnLeave | CTestContainer98View | [protected]
m_pItemWithCapture | CTestContainer98View | [protected]
m_pItemWithFocus | CTestContainer98View | [protected]
m_pSelection | CTestContainer98View |
m_ptLastMousePosition | CTestContainer98View | [protected]
m_pWindowlessDropTarget | CTestContainer98View | [protected]
OnCancelEditCntr() | CTestContainer98View | [protected]
OnCancelMode() | CTestContainer98View | [protected]
OnCaptureChanged(CWnd *pWnd) | CTestContainer98View | [protected]
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CTestContainer98View | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CTestContainer98View | [protected]
OnControlActivate() | CTestContainer98View | [protected]
OnControlDeactivate() | CTestContainer98View | [protected]
OnControlDrawMetaFile() | CTestContainer98View | [protected]
OnControlInvokeMethods() | CTestContainer98View | [protected]
OnControlLogging() | CTestContainer98View | [protected]
OnControlSaveToPropertyBag() | CTestContainer98View | [protected]
OnControlSaveToStorage() | CTestContainer98View | [protected]
OnControlSaveToStream() | CTestContainer98View | [protected]
OnControlUIActivate() | CTestContainer98View | [protected]
OnControlUIDeactivate() | CTestContainer98View | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTestContainer98View | [protected]
OnDestroy() | CTestContainer98View | [protected]
OnDragEnter(COleDataObject *pDataObject, DWORD dwKeyState, CPoint point) | CTestContainer98View | [virtual]
OnDragLeave() | CTestContainer98View | [virtual]
OnDragOver(COleDataObject *pDataObject, DWORD dwKeyState, CPoint point) | CTestContainer98View | [virtual]
OnDraw(CDC *pDC) | CTestContainer98View | [virtual]
OnDrop(COleDataObject *pDataObject, DROPEFFECT dropEffect, CPoint point) | CTestContainer98View | [virtual]
OnEditBringToFront() | CTestContainer98View | [protected]
OnEditClear() | CTestContainer98View | [protected]
OnEditCopy() | CTestContainer98View | [protected]
OnEditCut() | CTestContainer98View | [protected]
OnEditInsertControlFromStorage() | CTestContainer98View | [protected]
OnEditInsertFromStream() | CTestContainer98View | [protected]
OnEditPaste() | CTestContainer98View | [protected]
OnEditProperties() | CTestContainer98View | [protected]
OnEditSelectAll() | CTestContainer98View | [protected]
OnEditSendToBack() | CTestContainer98View | [protected]
OnFocus(CTestContainer98Item *pItem, BOOL tGotFocus) | CTestContainer98View |
OnInitialUpdate() | CTestContainer98View | [protected, virtual]
OnInsertObject() | CTestContainer98View | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CTestContainer98View | [protected]
OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) | CTestContainer98View | [protected]
OnKillFocus(CWnd *pNewWnd) | CTestContainer98View | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CTestContainer98View | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CTestContainer98View | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CTestContainer98View | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CTestContainer98View | [protected]
OnOptionsDesignMode() | CTestContainer98View | [protected]
OnRButtonDblClk(UINT nFlags, CPoint point) | CTestContainer98View | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CTestContainer98View | [protected]
OnRButtonUp(UINT nFlags, CPoint point) | CTestContainer98View | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CTestContainer98View | [protected]
OnSetFocus(CWnd *pOldWnd) | CTestContainer98View | [protected]
OnSize(UINT nType, int cx, int cy) | CTestContainer98View | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CTestContainer98View | [protected, virtual]
OnUpdateControlActivate(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlDeactivate(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlDrawMetaFile(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlInvokeMethods(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlLogging(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlSaveToPropertyBag(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlSaveToStorage(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlSaveToStream(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlUIActivate(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateControlUIDeactivate(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditBringToFront(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditClear(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditCopy(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditCut(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditPaste(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditProperties(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditSelectAll(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateEditSendToBack(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnUpdateOptionsDesignMode(CCmdUI *pCmdUI) | CTestContainer98View | [protected]
OnWindowlessDefWindowMessage(UINT nMessage, WPARAM wParam, LPARAM lParam, LRESULT *plResult) | CTestContainer98View |
OnWindowlessReleaseCapture(CTestContainer98Item *pItem) | CTestContainer98View |
OnWindowlessReleaseFocus() | CTestContainer98View |
OnWindowlessSetCapture(CTestContainer98Item *pItem) | CTestContainer98View |
OnWindowlessSetFocus(CTestContainer98Item *pItem) | CTestContainer98View |
PreCreateWindow(CREATESTRUCT &cs) | CTestContainer98View | [virtual]
PreTranslateMessage(MSG *pMsg) | CTestContainer98View | [virtual]
s_cfObjectDescriptor | CTestContainer98View | [protected, static]
SetMultiSelect(CTestContainer98Item *pItem, BOOL tSelect) | CTestContainer98View |
SetSelection(CTestContainer98Item *pItem) | CTestContainer98View |
SetupSelectionTracker(CRectTracker *pTracker) | CTestContainer98View |
SetupTracker(CTestContainer98Item *pItem, CRectTracker *pTracker) | CTestContainer98View |
ToggleMultiSelect(CTestContainer98Item *pItem) | CTestContainer98View |
~CTestContainer98View() | CTestContainer98View | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubedoc.cpp Source File

  • advanced
  • cube

cubedoc.cpp

Go to the documentation of this file.
00001 // cubedoc.cpp : implementation of the CCubeDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "cube.h"
00014
00015 #include "cubedoc.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CCubeDoc
00024
00025 IMPLEMENT_DYNCREATE(CCubeDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CCubeDoc, CDocument)
00028   //{{AFX_MSG_MAP(CCubeDoc)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code!
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CCubeDoc construction/destruction
00036
00037 CCubeDoc::CCubeDoc()
00038 {
00039   // TODO: add one-time construction code here
00040
00041 }
00042
00043 CCubeDoc::~CCubeDoc()
00044 {
00045 }
00046
00047 BOOL CCubeDoc::OnNewDocument()
00048 {
00049   if (!CDocument::OnNewDocument())
00050     return FALSE;
00051
00052   // TODO: add reinitialization code here
00053   // (SDI documents will reuse this document)
00054
00055   return TRUE;
00056 }
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CCubeDoc serialization
00060
00061 void CCubeDoc::Serialize(CArchive& ar)
00062 {
00063   if (ar.IsStoring())
00064   {
00065     // TODO: add storing code here
00066   }
00067   else
00068   {
00069     // TODO: add loading code here
00070   }
00071 }
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CCubeDoc diagnostics
00075
00076 #ifdef _DEBUG
00077 void CCubeDoc::AssertValid() const
00078 {
00079   CDocument::AssertValid();
00080 }
00081
00082 void CCubeDoc::Dump(CDumpContext& dc) const
00083 {
00084   CDocument::Dump(dc);
00085 }
00086 #endif //_DEBUG
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CCubeDoc commands
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MethodDg.H Source File

  • ole
  • TstCon

MethodDg.H

Go to the documentation of this file.
00001 // File: MethodDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_CMETHODDLG_H__BA8090EB_BFF5_11D0_8DFA_00C04FB68D60__INCLUDED_)
00011 #define AFX_CMETHODDLG_H__BA8090EB_BFF5_11D0_8DFA_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // CMethodDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CMethodDlg dialog
00021
00022 class CMethodDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026    CMethodDlg( CWnd* pParent, IDispatch* pDispatch,
00027     CInterfaceInfo* pInterfaceInfo );
00028    ~CMethodDlg();
00029
00030 // Dialog Data
00031   //{{AFX_DATA(CMethodDlg)
00032   enum { IDD = IDD_METHOD };
00033   CComboBox m_cboxParamValue;
00034   CDateTimeCtrl m_date;
00035   CStatic m_staticParameterValue;
00036   CEdit   m_editExceptionDesc;
00037   CEdit   m_editExceptionSource;
00038   CEdit   m_editReturnValue;
00039   CEdit   m_editParamValue;
00040   CListCtrl   m_listParams;
00041   CComboBox   m_cboxParamType;
00042   CComboBox   m_cboxMethodName;
00043   //}}AFX_DATA
00044
00045
00046 // Overrides
00047   // ClassWizard generated virtual function overrides
00048   //{{AFX_VIRTUAL(CMethodDlg)
00049   protected:
00050   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00051   //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 protected:
00055    void DisplayExceptionInfo();
00056    void DisplayParamValueInList( int iParam );
00057   void DisplayParamValues( int iType );
00058    COleVariant* GetParam( int iParam );
00059
00060 protected:
00061    IDispatchPtr m_pDispatch;
00062    CInterfaceInfo* m_pInterfaceInfo;
00063    CMethodInfo* m_pMethodInfo;
00064    CMethodParamInfo* m_pParamInfo;
00065    CTypedPtrArray< CPtrArray, COleVariant* > m_apParams;
00066    int* m_piParamTypes;
00067    COleVariant* m_pvarParams;
00068    COleVariant* m_pvarCurrentParam;
00069    int m_iCurrentParam;
00070    COleVariant m_varResult;
00071    CExcepInfo m_excepInfo;
00072    BOOL m_tException;
00073
00074   // Generated message map functions
00075   //{{AFX_MSG(CMethodDlg)
00076   virtual BOOL OnInitDialog();
00077   afx_msg void OnMethodNameSelChange();
00078   afx_msg void OnParamsItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
00079   afx_msg void OnSetValue();
00080   afx_msg void OnInvoke();
00081   afx_msg void OnParamValueSetFocus();
00082   afx_msg void OnParamValueChange();
00083   afx_msg void OnExceptionHelp();
00084   afx_msg void OnParamTypeSelChange();
00085   afx_msg void OnChooseColor();
00086   afx_msg void OnChooseFont();
00087   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00088   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00089   //}}AFX_MSG
00090   DECLARE_MESSAGE_MAP()
00091 };
00092
00093 //{{AFX_INSERT_LOCATION}}
00094 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00095
00096 #endif // !defined(AFX_CMETHODDLG_H__BA8090EB_BFF5_11D0_8DFA_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAddressCombo Member List

This is the complete list of members for CAddressCombo, including all inherited members.
CAddressCombo() | CAddressCombo |
FillWithExplorerHistory() | CAddressCombo |
m_font | CAddressCombo |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CAddressCombo | [protected]
~CAddressCombo() | CAddressCombo | [virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTimeCtrl Member List

This is the complete list of members for CTimeCtrl, including all inherited members.
AboutBox() | CTimeCtrl | [protected]
CTimeCtrl() | CTimeCtrl |
DECLARE_OLECREATE_EX(CTimeCtrl) DECLARE_OLETYPELIB(CTimeCtrl) DECLARE_PROPPAGEIDS(CTimeCtrl) DECLARE_OLECTLTYPE(CTimeCtrl) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct) | CTimeCtrl | [protected]
dispidInterval enum value | CTimeCtrl |
DoPropExchange(CPropExchange *pPX) | CTimeCtrl | [virtual]
eventidTimer enum value | CTimeCtrl |
FireTimer() | CTimeCtrl | [inline, protected]
m_interval | CTimeCtrl | [protected]
OnAmbientPropertyChange(DISPID dispid) | CTimeCtrl | [virtual]
OnDestroy() | CTimeCtrl | [protected]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CTimeCtrl | [virtual]
OnEnabledChanged() | CTimeCtrl | [virtual]
OnEraseBkgnd(CDC *pDC) | CTimeCtrl | [protected]
OnIntervalChanged() | CTimeCtrl | [protected]
OnResetState() | CTimeCtrl | [virtual]
OnSetClientSite() | CTimeCtrl | [protected]
OnTimer(UINT_PTR nIDEvent) | CTimeCtrl | [protected]
StartTimer() | CTimeCtrl | [protected]
StopTimer() | CTimeCtrl | [protected]
~CTimeCtrl() | CTimeCtrl | [protected]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXWrapper.h Source File

  • general
  • MMXSwarm

MMXWrapper.h

Go to the documentation of this file.
00001 // MMXWrapper.h : Very thin object wrapper over the MMX types
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013
00014 // Very thin and specific classes to have the MMX types more C++ friendly.
00015 class CMMXUnsigned16Saturated
00016 {
00017 public:
00018   CMMXUnsigned16Saturated()
00019   {
00020   }
00021   CMMXUnsigned16Saturated( DWORD dw )
00022   {
00023     m_m64 = _m_from_int( dw );
00024   }
00025   CMMXUnsigned16Saturated( __m64 m64 )
00026   {
00027     m_m64 = m64;
00028   }
00029   CMMXUnsigned16Saturated( ULONGLONG qw )
00030   {
00031     m_m64.m64_u64 = qw;
00032   }
00033
00034   CMMXUnsigned16Saturated& operator=( DWORD dw )
00035   {
00036     m_m64 = _m_from_int( dw );
00037     return( *this );
00038   }
00039   CMMXUnsigned16Saturated& operator=( const CMMXUnsigned16Saturated& m )
00040   {
00041     m_m64 = m.m_m64;
00042     return( *this );
00043   }
00044   CMMXUnsigned16Saturated& operator=( ULONGLONG qw )
00045   {
00046     m_m64.m64_u64 = qw;
00047     return( *this );
00048   }
00049
00050   operator __m64() const
00051   {
00052     return( m_m64 );
00053   }
00054
00055   operator ULONGLONG() const
00056   {
00057     return( m_m64.m64_u64 );
00058   }
00059
00060   void Clear()
00061   {
00062     m_m64 = _mm_setzero_si64();
00063   }
00064
00065   CMMXUnsigned16Saturated& operator+=( const CMMXUnsigned16Saturated& m )
00066   {
00067     m_m64 = _mm_adds_pu16( m_m64, m );
00068     return( *this );
00069   }
00070   CMMXUnsigned16Saturated& operator-=( const CMMXUnsigned16Saturated& m )
00071   {
00072     m_m64 = _mm_subs_pu16( m_m64, m );
00073     return( *this );
00074   }
00075   CMMXUnsigned16Saturated& operator>>=( int nBits )
00076   {
00077     m_m64 = _mm_srli_pi16( m_m64, nBits );
00078     return( *this );
00079   }
00080
00081   CMMXUnsigned16Saturated& operator<<=( int nBits )
00082   {
00083     m_m64 = _mm_slli_pi16( m_m64, nBits );
00084     return( *this );
00085   }
00086
00087   CMMXUnsigned16Saturated& operator&=( const CMMXUnsigned16Saturated& m )
00088   {
00089     m_m64 = _mm_and_si64(m_m64, m);
00090     return(*this);
00091   }
00092
00093   CMMXUnsigned16Saturated& operator|=( const CMMXUnsigned16Saturated& m )
00094   {
00095     m_m64 = _mm_or_si64(m_m64, m);
00096     return(*this);
00097   }
00098
00099   CMMXUnsigned16Saturated& AndNot( const CMMXUnsigned16Saturated& m )
00100   {
00101     m_m64 = _mm_andnot_si64(m, m_m64);
00102     return(*this);
00103   }
00104
00105   DWORD PackBytes() const
00106   {
00107     return( _m_to_int( _mm_packs_pu16( m_m64, _mm_setzero_si64() ) ) );
00108   }
00109
00110   ULONGLONG PackBytes( const CMMXUnsigned16Saturated& mUpper ) const
00111   {
00112     return( _mm_packs_pu16( m_m64, mUpper ).m64_u64 );
00113   }
00114
00115   void UnpackBytesLo( DWORD dw )
00116   {
00117     m_m64 = _mm_unpacklo_pi8( _m_from_int( dw ), _mm_setzero_si64() );
00118   }
00119   void UnpackBytesHi( DWORD dw )
00120   {
00121     m_m64 = _mm_unpacklo_pi8( _mm_setzero_si64(), _m_from_int( dw ) );
00122   }
00123
00124   void UnpackBytes(CMMXUnsigned16Saturated &mmLeft)
00125   {
00126     mmLeft = _mm_unpackhi_pi8( m_m64, _mm_setzero_si64() );
00127     m_m64 = _mm_unpacklo_pi8( m_m64, _mm_setzero_si64() );
00128   }
00129
00130 public:
00131   __m64 m_m64;
00132 };
00133
00134 inline CMMXUnsigned16Saturated operator+( const CMMXUnsigned16Saturated& m1, const CMMXUnsigned16Saturated& m2 )
00135 {
00136   return( _mm_adds_pu16( m1.m_m64, m2.m_m64 ) );
00137 }
00138
00139 inline CMMXUnsigned16Saturated operator-( const CMMXUnsigned16Saturated& m1, const CMMXUnsigned16Saturated& m2 )
00140 {
00141   return( _mm_subs_pu16( m1.m_m64, m2.m_m64 ) );
00142 }
00143
00144 inline CMMXUnsigned16Saturated operator<<( const CMMXUnsigned16Saturated& m1, int nBits )
00145 {
00146   return( _mm_slli_pi16( m1, nBits ) );
00147 }
00148
00149 inline CMMXUnsigned16Saturated operator>>( const CMMXUnsigned16Saturated& m1, int nBits )
00150 {
00151   return( _mm_srli_pi16( m1, nBits ) );
00152 }
00153
00154 inline CMMXUnsigned16Saturated operator&( const CMMXUnsigned16Saturated& m1, const CMMXUnsigned16Saturated& m2 )
00155 {
00156   return(_mm_and_si64(m1, m2));
00157 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroView.h Source File

  • general
  • spiro

spiroView.h

Go to the documentation of this file.
00001 // spiroView.h : interface of the CSpiroView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_SPIROVIEW_H__4417CF8E_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
00015 #define AFX_SPIROVIEW_H__4417CF8E_AFA9_11D1_AB61_D9B80632F018__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 #include "piece.h"
00022
00023 class CSpiroView : public CScrollView
00024 {
00025 public:
00026   // Data Members
00027   long  m_nZoomNumer;  // The zoom is determined by ZoomNumer/ZoomDenom
00028   long  m_nZoomDenom;
00029   bool  m_bDrawingActive;
00030   bool  m_bStartDrag; // Initiate figure moving action on next mousemove message
00031   bool  m_bDrawingDone;  // The pattern has been drawn completely
00032   bool  m_bDroppingAnchor;  // a ring is being dropped on the form
00033   bool  m_bDroppingWheel;  // a wheel is being dropped on the form
00034   int   m_iPieceDropped;  // index of piece being dropped.
00035   bool  m_bMovingPencil;  // the user is dragging the pencil location
00036   COLORREF m_coCurrentPen;  // color of current pen being used.
00037   int   m_nCurrentPenWidth;  // width of current pen used in the drawing
00038   int   m_nTracesPerTick; // number of traces per callback on the timer
00039   INT_PTR m_IDTimer;      // Timer ID for the view.
00040
00041   CDC*  m_pDCMem;   // memory DC used to draw before bitblt'ing
00042   CBitmap*  m_pBitmap;    // bitmap used by the memory DC
00043   CBitmap*  m_pbitmapOld; // stores the original bitmap in m_pDCMem
00044   CSize m_sizeBitmap;   // size of the bitmap, which changes as required.
00045
00046   double  m_dDataAnchorFirst;   // Initial Data for an anchor piece
00047   double  m_dDataWheelFirst;    // Initial Data for a wheel piece
00048   CPoint  m_ptWheelPosFirst;    // Initial position for the wheel piece
00049
00050   CBasePiece*   m_pAnchor;  // anchored piece on the form
00051   CBasePiece*   m_pWheel; // moving part on the form (wheel or not)
00052
00053 protected:
00054   CImageList* m_pILDragFigure;   // image list for Figure dragging
00055   CFigure*  m_pFigureDrag;    // Figure being dragged
00056   CPoint    m_ptHotSpotDragFigure;   // Hot Spot for the image used when dragging a Figure
00057   CBitmap*  m_pBitmapDragFigure;  // bitmap that goes into the image list for dragging a figure.
00058
00059 protected: // create from serialization only
00060   CSpiroView();
00061   DECLARE_DYNCREATE(CSpiroView)
00062
00063 // Attributes
00064 public:
00065   CSpiroDoc* GetDocument();
00066
00067 // Operations
00068 public:
00069
00070   static void CALLBACK TimerCallBack(HWND hWnd, UINT nMsg, UINT_PTR nIDEvent, DWORD dwTimer);
00071 // Overrides
00072   // ClassWizard generated virtual function overrides
00073   //{{AFX_VIRTUAL(CSpiroView)
00074   public:
00075   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00076   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00077   virtual void OnInitialUpdate();
00078   virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
00079   protected:
00080   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00081   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00082   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00083   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00084   //}}AFX_VIRTUAL
00085
00086 protected:
00087   void  OnRemovePiece(CBasePiece** ppPiece);
00088   void  ZoomChange(int nChange);
00089   void  CreateFigure();  // calculates the figure with the given tools
00090   long  GetWheelDistanceForFigure() const;
00091   void  PressButton(UINT id);
00092
00093 // Implementation
00094 public:
00095   virtual ~CSpiroView();
00096 #ifdef _DEBUG
00097   virtual void AssertValid() const;
00098   virtual void Dump(CDumpContext& dc) const;
00099 #endif
00100
00101 protected:
00102   void OnDropPiece(int* rgID, int nCount);
00103
00104 // Generated message map functions
00105 protected:
00106   //{{AFX_MSG(CSpiroView)
00107   afx_msg void OnPenWidth();
00108   afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00109   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00110   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00111   afx_msg void OnUpdateAnyWheel(CCmdUI* pCmdUI);
00112   afx_msg void OnDropRing();
00113   afx_msg void OnDropWheel();
00114   afx_msg void OnUpdateRemoveRing(CCmdUI* pCmdUI);
00115   afx_msg void OnUpdateRemoveWheel(CCmdUI* pCmdUI);
00116   afx_msg void OnRemoveRing();
00117   afx_msg void OnRemoveWheel();
00118   afx_msg void OnUpdateZoomIn(CCmdUI* pCmdUI);
00119   afx_msg void OnZoomIn();
00120   afx_msg void OnZoomOut();
00121   afx_msg void OnUpdateZoomOut(CCmdUI* pCmdUI);
00122   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00123   afx_msg void OnUpdateDrawPattern(CCmdUI* pCmdUI);
00124   afx_msg void OnDrawPattern();
00125   afx_msg void OnEndDrawing();
00126   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00127   afx_msg void OnBlack();
00128   afx_msg void OnBlue();
00129   afx_msg void OnGreen();
00130   afx_msg void OnPurple();
00131   afx_msg void OnRed();
00132   afx_msg void OnYellow();
00133   afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
00134   afx_msg void OnUpdatePauseDrawing(CCmdUI* pCmdUI);
00135   afx_msg void OnPauseDrawing();
00136   afx_msg void OnUpdateSlow(CCmdUI* pCmdUI);
00137   afx_msg void OnSlow();
00138   afx_msg void OnUpdateFast(CCmdUI* pCmdUI);
00139   afx_msg void OnFast();
00140   afx_msg void OnCallTimerTick();
00141   afx_msg void OnUpdateTimerTick(CCmdUI* pCmdUI);
00142   afx_msg void OnTraceWidth();
00143   afx_msg void OnUpdateTraceWidth(CCmdUI* pCmdUI);
00144   //}}AFX_MSG
00145   afx_msg void OnUpdateAnyRing(CCmdUI* pCmdUI);
00146   afx_msg void OnUpdateDraw(CCmdUI* pCmdUI);
00147   afx_msg void OnUpdatePause(CCmdUI* pCmdUI);
00148   afx_msg void OnUpdatePenWidth(CCmdUI* pCmdUI);
00149   DECLARE_MESSAGE_MAP()
00150 };
00151
00152 #ifndef _DEBUG  // debug version in spiroView.cpp
00153 inline CSpiroDoc* CSpiroView::GetDocument()
00154    { return (CSpiroDoc*)m_pDocument; }
00155 #endif
00156
00157 /////////////////////////////////////////////////////////////////////////////
00158
00159 //{{AFX_INSERT_LOCATION}}
00160 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00161
00162 #endif // !defined(AFX_SPIROVIEW_H__4417CF8E_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/targetver.h Source File

  • vc2008fp
  • StateCollection

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CChangeText Member List

This is the complete list of members for CChangeText, including all inherited members.
CChangeText(CWnd *pParent=NULL) | CChangeText |
CChangeText(CWnd *pParent=NULL) | CChangeText |
DoDataExchange(CDataExchange *pDX) | CChangeText | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CChangeText | [protected, virtual]
IDD enum value | CChangeText |
m_str | CChangeText |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autodriv.cpp Source File

  • ole
  • acdual
  • acdualdriv

autodriv.cpp

Go to the documentation of this file.
00001 // autodriv.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "autodriv.h"
00014 #include "autoclik.h"
00015 #include "autoddlg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CAutoDrivApp
00024
00025 BEGIN_MESSAGE_MAP(CAutoDrivApp, CWinApp)
00026   //{{AFX_MSG_MAP(CAutoDrivApp)
00027     // NOTE - the ClassWizard will add and remove mapping macros here.
00028     //    DO NOT EDIT what you see in these blocks of generated code!
00029   //}}AFX_MSG
00030   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CAutoDrivApp construction
00035
00036 CAutoDrivApp::CAutoDrivApp()
00037 {
00038   // TODO: add construction code here,
00039   // Place all significant initialization in InitInstance
00040 }
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // The one and only CAutoDrivApp object
00044
00045 CAutoDrivApp theApp;
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CAutoDrivApp initialization
00049
00050 BOOL CAutoDrivApp::InitInstance()
00051 {
00052   // Initialize OLE libraries
00053   if (!AfxOleInit())
00054   {
00055     AfxMessageBox(IDP_OLE_INIT_FAILED);
00056     return FALSE;
00057   }
00058
00059   // Standard initialization
00060   // If you are not using these features and wish to reduce the size
00061   //  of your final executable, you should remove from the following
00062   //  the specific initialization routines you do not need.
00063
00064   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00065
00066   CAutoDrivDlg dlg;
00067   m_pMainWnd = &dlg;
00068   int nResponse = (int)dlg.DoModal();
00069   if (nResponse == IDOK)
00070   {
00071     // TODO: Place code here to handle when the dialog is
00072     //  dismissed with OK
00073   }
00074   else if (nResponse == IDCANCEL)
00075   {
00076     // TODO: Place code here to handle when the dialog is
00077     //  dismissed with Cancel
00078   }
00079
00080   // Since the dialog has been closed, return FALSE so that we exit the
00081   //  application, rather than start the application's message pump.
00082   return FALSE;
00083 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CShapesView Member List

This is the complete list of members for CShapesView, including all inherited members.
CShapesView() | CShapesView | [protected]
GetDocument() | CShapesView | [inline]
GetModelessShapePropSheet() | CShapesView |
m_pModalShapePropSheet | CShapesView | [protected]
m_pShapeSelected | CShapesView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CShapesView | [protected, virtual]
OnChangeObjectProps(WPARAM wParam, LPARAM lParam) | CShapesView | [protected]
OnDraw(CDC *pDC) | CShapesView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CShapesView | [protected, virtual]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CShapesView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CShapesView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CShapesView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CShapesView | [protected, virtual]
OnPropertySheetWithPreview() | CShapesView | [protected]
OnSimplePropertySheet() | CShapesView | [protected]
OnUpdatePropertySheetWithPreview(CCmdUI *pCmdUI) | CShapesView | [protected]
OnUpdateSimplePropertySheet(CCmdUI *pCmdUI) | CShapesView | [protected]
~CShapesView() | CShapesView | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarView.h Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBarView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CWorkSpaceToolBarView : public CView
00014 {
00015 protected: // create from serialization only
00016   CWorkSpaceToolBarView();
00017   DECLARE_DYNCREATE(CWorkSpaceToolBarView)
00018
00019 // Attributes
00020 public:
00021   CWorkSpaceToolBarDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CWorkSpaceToolBarView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnContextMenu(CWnd*, CPoint point);
00045   afx_msg void OnFilePrintPreview();
00046
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 #ifndef _DEBUG  // debug version in WorkSpaceToolBarView.cpp
00051 inline CWorkSpaceToolBarDoc* CWorkSpaceToolBarView::GetDocument()
00052    { return (CWorkSpaceToolBarDoc*)m_pDocument; }
00053 #endif
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDg.Cpp Source File

  • ole
  • TstCon

MacroDg.Cpp

Go to the documentation of this file.
00001 // MacroDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMacroDlg dialog
00022
00023 CMacroDlg::CMacroDlg( CWnd* pParent ) :
00024    CDialog( CMacroDlg::IDD, pParent ),
00025    m_pScriptManager( NULL ),
00026    m_pScript( NULL )
00027 {
00028   //{{AFX_DATA_INIT(CMacroDlg)
00029   m_strMacroName = _T("");
00030   //}}AFX_DATA_INIT
00031 }
00032
00033
00034 void CMacroDlg::DoDataExchange(CDataExchange* pDX)
00035 {
00036    int iItem;
00037
00038   CDialog::DoDataExchange(pDX);
00039   //{{AFX_DATA_MAP(CMacroDlg)
00040   DDX_Control(pDX, IDOK, m_butRun);
00041   DDX_Control(pDX, IDC_MACROS, m_lbMacros);
00042   DDX_LBString(pDX, IDC_MACROS, m_strMacroName);
00043   //}}AFX_DATA_MAP
00044
00045    if( pDX->m_bSaveAndValidate )
00046    {
00047     iItem = m_lbMacros.GetCurSel();
00048     if( iItem == LB_ERR )
00049     {
00050      m_pScript = NULL;
00051     }
00052     else
00053     {
00054      m_pScript = (CScript*)m_lbMacros.GetItemDataPtr( iItem );
00055      ASSERT( m_pScript != NULL );
00056     }
00057    }
00058 }
00059
00060
00061 BEGIN_MESSAGE_MAP(CMacroDlg, CDialog)
00062   //{{AFX_MSG_MAP(CMacroDlg)
00063   ON_BN_CLICKED(IDC_OPENFILE, OnOpenFile)
00064   ON_WM_HELPINFO()
00065   ON_WM_CONTEXTMENU()
00066   //}}AFX_MSG_MAP
00067 END_MESSAGE_MAP()
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CMacroDlg message handlers
00071
00072 BOOL CMacroDlg::OnInitDialog()
00073 {
00074   CDialog::OnInitDialog();
00075
00076    UpdateMacroList();
00077
00078   return( TRUE );
00079 }
00080
00081 void CMacroDlg::OnOpenFile()
00082 {
00083    int nResult;
00084    HRESULT hResult;
00085
00086    CString strFilter;
00087    LOAD_STRING_FROM_RESOURCE(strFilter, IDS_SCRIPT_FILES);
00088    CFileDialog dlg( TRUE, _T( "dsm" ), NULL, OFN_HIDEREADONLY|
00089     OFN_OVERWRITEPROMPT, strFilter );
00090
00091    nResult = (int)dlg.DoModal();
00092    if( nResult != IDOK )
00093    {
00094     return;
00095    }
00096
00097    hResult = m_pScriptManager->LoadScript( dlg.GetPathName(),
00098     dlg.GetFileTitle() );
00099    if( FAILED( hResult ) )
00100    {
00101     CString strErrorMessage;
00102     _com_error error( hResult );
00103
00104     AfxFormatString2( strErrorMessage, IDS_ERRORLOADINGSCRIPT,
00105      dlg.GetFileTitle(), error.ErrorMessage() );
00106     AfxMessageBox( strErrorMessage );
00107     return;
00108    }
00109
00110    UpdateMacroList();
00111 }
00112
00113 void CMacroDlg::UpdateMacroList()
00114 {
00115    POSITION posMacro;
00116    POSITION posScript;
00117    CScript* pScript;
00118    CString strMacroName;
00119    int iItem;
00120
00121    m_lbMacros.ResetContent();
00122
00123    posScript = m_pScriptManager->GetFirstScriptPosition();
00124    while( posScript != NULL )
00125    {
00126     pScript = m_pScriptManager->GetNextScript( posScript );
00127     ENSURE( pScript != NULL );
00128
00129     posMacro = pScript->GetFirstMacroPosition();
00130     while( posMacro != NULL )
00131     {
00132      strMacroName = pScript->GetNextMacroName( posMacro );
00133      iItem = m_lbMacros.AddString( strMacroName );
00134      m_lbMacros.SetItemDataPtr( iItem, pScript );
00135     }
00136    }
00137
00138    if( m_lbMacros.GetCount() == 0 )
00139    {
00140     m_lbMacros.SetCurSel( -1 );
00141     m_butRun.EnableWindow( FALSE );
00142    }
00143    else
00144    {
00145     m_lbMacros.SetCurSel( 0 );
00146     m_butRun.EnableWindow( TRUE );
00147    }
00148 }
00149
00150
00151 static DWORD rgmapCHID[] =
00152 {
00153    IDC_MACROS, HIDC_MACROS,
00154    IDC_OPENFILE, HIDC_OPENFILE,
00155    0, 0
00156 };
00157
00158 BOOL CMacroDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00159 {
00160   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00161   strPath += _T("::/popups.txt");
00162
00163   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00164 }
00165
00166 void CMacroDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00167 {
00168   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00169   strPath += _T("::/popups.txt");
00170
00171   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00172 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBallThread Member List

This is the complete list of members for CBallThread, including all inherited members.
CBallThread(CWnd *pWnd, HDC hDC, CPoint ptPos, CPoint ptVel, CSize Size, COLORREF color) | CBallThread |
CGDIThread(CWnd *pWnd, HDC hDC) | CGDIThread |
Delete() | CGDIThread | [virtual]
InitInstance() | CBallThread | [virtual]
KillThread() | CGDIThread |
m_brush | CBallThread |
m_csGDILock | CGDIThread | [static]
m_dc | CGDIThread |
m_hAnotherDead | CGDIThread | [static]
m_hBrush | CBallThread |
m_hDC | CGDIThread |
m_hEventDead | CGDIThread |
m_hEventKill | CGDIThread |
m_ptVelocity | CBallThread |
m_rectBorder | CGDIThread |
m_rectPosition | CBallThread |
SingleStep() | CBallThread | [virtual]
UpdateBorder() | CGDIThread |
~CBallThread() | CBallThread | [inline, protected, virtual]
~CGDIThread() | CGDIThread | [virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localppg.cpp Source File

  • controls
  • localize

localppg.cpp

Go to the documentation of this file.
00001 // localppg.cpp : Implementation of the CLocalizePropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "localize.h"
00014 #include "localppg.h"
00015
00016 #ifdef _WIN32
00017   #include <winnt.h>
00018 #else
00019   #include <olenls.h>
00020 #endif
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027
00028 IMPLEMENT_DYNCREATE(CLocalizePropPage, COlePropertyPage)
00029
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // Message map
00033
00034 BEGIN_MESSAGE_MAP(CLocalizePropPage, COlePropertyPage)
00035   //{{AFX_MSG_MAP(CLocalizePropPage)
00036   // NOTE - ClassWizard will add and remove message map entries
00037   //    DO NOT EDIT what you see in these blocks of generated code !
00038   //}}AFX_MSG_MAP
00039 END_MESSAGE_MAP()
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // Initialize class factory and guid
00044
00045 IMPLEMENT_OLECREATE_EX(CLocalizePropPage, "LOCALIZE.LocalizePropPage.1",
00046   0x35e3e54, 0x6745, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00047
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CLocalizePropPage::CLocalizePropPageFactory::UpdateRegistry -
00051 // Adds or removes system registry entries for CLocalizePropPage
00052
00053 BOOL CLocalizePropPage::CLocalizePropPageFactory::UpdateRegistry(BOOL bRegister)
00054 {
00055   if (bRegister)
00056     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00057       m_clsid, IDS_LOCALIZE_PPG);
00058   else
00059     return AfxOleUnregisterClass(m_clsid, NULL);
00060 }
00061
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CLocalizePropPage::CLocalizePropPage - Constructor
00065
00066 CLocalizePropPage::CLocalizePropPage() :
00067   COlePropertyPage(IDD, IDS_LOCALIZE_PPG_CAPTION)
00068 {
00069   //{{AFX_DATA_INIT(CLocalizePropPage)
00070   m_Invert = FALSE;
00071   //}}AFX_DATA_INIT
00072
00073   hResHandle = NULL;
00074 }
00075
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // CLocalizePropPage::DoDataExchange - Moves data between page and properties
00079
00080 void CLocalizePropPage::DoDataExchange(CDataExchange* pDX)
00081 {
00082   //{{AFX_DATA_MAP(CLocalizePropPage)
00083   DDP_Check(pDX, IDC_CHECK1, m_Invert, _T("Invert") );
00084   DDX_Check(pDX, IDC_CHECK1, m_Invert);
00085   //}}AFX_DATA_MAP
00086   DDP_PostProcessing(pDX);
00087 }
00088
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // Set the resource handle to the module which contains locale-specific
00092 // resources
00093
00094 void CLocalizePropPage::OnSetPageSite()
00095 {
00096   BOOL bError = FALSE;
00097   LCID lcid = 0;
00098
00099   LPPROPERTYPAGESITE pSite = GetPageSite();
00100   if (pSite != NULL)
00101     pSite->GetLocaleID(&lcid);
00102
00103   // Get the handle of the resource module
00104   hResHandle = GetResourceHandle(lcid);
00105
00106   #ifdef _WIN32
00107     if (!hResHandle)
00108     bError = TRUE;
00109   #else
00110     if (hResHandle <= HINSTANCE_ERROR)
00111     bError = TRUE;
00112   #endif
00113
00114   if (!bError)
00115   {
00116     // Use resources from resource module
00117     HINSTANCE hResPrev = AfxGetResourceHandle();
00118     AfxSetResourceHandle(hResHandle);
00119     COlePropertyPage::OnSetPageSite();
00120     AfxSetResourceHandle(hResPrev);
00121   }
00122   else
00123     // Use resources from control module
00124     COlePropertyPage::OnSetPageSite();
00125 }
00126
00127
00128 /////////////////////////////////////////////////////////////////////////////
00129 // CLocalizePropPage::OnFinalRelease - Frees locale-specific resource
00130 // module, if any.
00131
00132 void CLocalizePropPage::OnFinalRelease()
00133 {
00134   if (hResHandle != NULL)
00135   {
00136     FreeLibrary(hResHandle);
00137     hResHandle = NULL;
00138   }
00139
00140   COlePropertyPage::OnFinalRelease();
00141 }
00142
00143
00144 /////////////////////////////////////////////////////////////////////////////
00145 // CLocalizePropPage::GetResourceHandle - Load module which contains
00146 // locale-specific resources
00147
00148 HINSTANCE CLocalizePropPage::GetResourceHandle(LCID lcid)
00149 {
00150   LPCTSTR lpszResModule = NULL;
00151   HINSTANCE hResHandle = NULL;
00152
00153   // Use lcid to determine module that contains resources
00154   LANGID langID = LANGIDFROMLCID(lcid);
00155   unsigned short priLangID = (unsigned short) PRIMARYLANGID(langID);
00156   switch (priLangID)
00157   {
00158     case LANG_ENGLISH:
00159       break;
00160     case LANG_FRENCH:
00161       #ifdef _WIN32
00162         lpszResModule = (LPCTSTR)_T("lresfr32.dll");
00163       #else
00164         lpszResModule = (LPCTSTR)_T("locresfr.dll");
00165       #endif
00166       break;
00167     case LANG_GERMAN:
00168       #ifdef _WIN32
00169         lpszResModule = (LPCTSTR)_T("lresde32.dll");
00170       #else
00171         lpszResModule = (LPCTSTR)_T("locresde.dll");
00172       #endif
00173       break;
00174     case 0:
00175     default:
00176        break;
00177   }
00178
00179   // Load resource module
00180   if (lpszResModule != NULL)
00181     hResHandle = LoadLibrary(lpszResModule);
00182
00183   return hResHandle;
00184 }
00185
00186
00187 /////////////////////////////////////////////////////////////////////////////
00188 // CLocalizePropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/stdafx.cpp Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // DrawClientHandlers.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CUndoButton Member List

This is the complete list of members for CUndoButton, including all inherited members.
CreatePopupMenu() | CUndoButton | [protected, virtual]
CUndoBar class | CUndoButton | [friend]
CUndoButton() | CUndoButton | [inline]
CUndoButton(UINT uiCmdID, LPCTSTR lpszText) | CUndoButton | [inline]
GetSelNum() | CUndoButton | [inline]
IsEmptyMenuAllowed() const | CUndoButton | [inline, protected, virtual]
IsExclusive() const | CUndoButton | [inline, protected, virtual]
m_lstActions | CUndoButton |
m_nSelNum | CUndoButton |
OnChangeParentWnd(CWnd *pWndParent) | CUndoButton | [inline, protected, virtual]
ResetSelNum() | CUndoButton | [inline]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSearchBox Member List

This is the complete list of members for CSearchBox, including all inherited members.
CSearchBox() | CSearchBox |
PreTranslateMessage(MSG *pMsg) | CSearchBox | [virtual]
~CSearchBox() | CSearchBox | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypeLibTreeView Member List

This is the complete list of members for CTypeLibTreeView, including all inherited members.
CTypeLibTreeView() | CTypeLibTreeView |
CTypeLibWnd class | CTypeLibTreeView | [friend]
DeleteTreeItems(HTREEITEM htree) | CTypeLibTreeView |
IMGID_TYPEINFO_C enum value | CTypeLibTreeView |
IMGID_TYPEINFO_O enum value | CTypeLibTreeView |
IMGID_TYPELIB enum value | CTypeLibTreeView |
m_hTypeInfos | CTypeLibTreeView |
m_images | CTypeLibTreeView |
m_ptlb | CTypeLibTreeView |
m_tree | CTypeLibTreeView |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTypeLibTreeView | [protected]
OnDestroy() | CTypeLibTreeView | [protected]
OnDraw(CDC *pDC) | CTypeLibTreeView | [protected, virtual]
OnInitialUpdate() | CTypeLibTreeView | [virtual]
OnSize(UINT nType, int cx, int cy) | CTypeLibTreeView | [protected]
OnTreeDeleteItem(NMHDR *pNMHDR, LRESULT *pResult) | CTypeLibTreeView | [inline, protected]
OnTreeItemExpanded(NMHDR *pNMHDR, LRESULT *pResult) | CTypeLibTreeView | [protected]
OnTreeItemExpanding(NMHDR *pNMHDR, LRESULT *pResult) | CTypeLibTreeView | [protected]
OnTreeItemReturn(NMHDR *pNMHDR, LRESULT *pResult) | CTypeLibTreeView | [protected]
OnTreeSelchanged(NMHDR *pNMHDR, LRESULT *pResult) | CTypeLibTreeView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CTypeLibTreeView | [protected, virtual]
~CTypeLibTreeView() | CTypeLibTreeView | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/stdafx.h Source File

  • ole
  • autoclik
  • autodriv

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <afxwin.h>         // MFC core and standard components
00013 #include <afxext.h>         // MFC extensions
00014 #include <afxdisp.h>
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/statpage.cpp Source File

  • vc2008fp
  • DrawClient

statpage.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014 #include "statpage.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CStatPage property page
00023
00024 IMPLEMENT_DYNCREATE(CStatPage, CPropertyPage)
00025
00026 CStatPage::CStatPage() : CPropertyPage(CStatPage::IDD)
00027 {
00028   //{{AFX_DATA_INIT(CStatPage)
00029   m_strCreateDate = _T("");
00030   m_strEditTime = _T("");
00031   m_strLastPrint = _T("");
00032   m_strLastSave = _T("");
00033   m_strNumChars = _T("");
00034   m_strNumPages = _T("");
00035   m_strNumWords = _T("");
00036   m_strRevNum = _T("");
00037   m_strSavedBy = _T("");
00038   m_strSecurity = _T("");
00039   //}}AFX_DATA_INIT
00040 }
00041
00042 CStatPage::~CStatPage()
00043 {
00044 }
00045
00046 void CStatPage::DoDataExchange(CDataExchange* pDX)
00047 {
00048   CPropertyPage::DoDataExchange(pDX);
00049   //{{AFX_DATA_MAP(CStatPage)
00050   DDX_Text(pDX, IDC_CREATEDATE, m_strCreateDate);
00051   DDX_Text(pDX, IDC_EDITTIME, m_strEditTime);
00052   DDX_Text(pDX, IDC_LASTPRINT, m_strLastPrint);
00053   DDX_Text(pDX, IDC_LASTSAVE, m_strLastSave);
00054   DDX_Text(pDX, IDC_NUMCHARS, m_strNumChars);
00055   DDX_Text(pDX, IDC_NUMPAGES, m_strNumPages);
00056   DDX_Text(pDX, IDC_NUMWORDS, m_strNumWords);
00057   DDX_Text(pDX, IDC_REVNUM, m_strRevNum);
00058   DDX_Text(pDX, IDC_SAVEDBY, m_strSavedBy);
00059   DDX_Text(pDX, IDC_SECURITY, m_strSecurity);
00060   //}}AFX_DATA_MAP
00061 }
00062
00063 BEGIN_MESSAGE_MAP(CStatPage, CPropertyPage)
00064   //{{AFX_MSG_MAP(CStatPage)
00065   //}}AFX_MSG_MAP
00066 END_MESSAGE_MAP()
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTrackerApp Member List

This is the complete list of members for CTrackerApp, including all inherited members.
CTrackerApp() | CTrackerApp |
InitInstance() | CTrackerApp | [virtual]
OnAppAbout() | CTrackerApp |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paddoc.h Source File

  • ole
  • superpad

paddoc.h

Go to the documentation of this file.
00001 // paddoc.h : interface of the CPadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __PADDOC_H__
00014 #define __PADDOC_H__
00015
00016 class CEmbeddedItem;
00017
00018 class CPadDoc : public COleServerDoc
00019 {
00020   DECLARE_DYNCREATE(CPadDoc)
00021
00022 // Constructors
00023 public:
00024   CPadDoc();
00025
00026 //Operations
00027 public:
00028   void SetSelection(int nBeg, int nEnd);
00029
00030 // Implementation
00031 public:
00032   virtual COleServerItem* OnGetEmbeddedItem();
00033   virtual COleServerItem* OnGetLinkedItem(LPCTSTR lpszItemName);
00034
00035 protected:
00036   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00037   virtual void DeleteContents();
00038   virtual ~CPadDoc();
00039
00040   //{{AFX_MSG(CPadDoc)
00041   afx_msg void OnViewUpdatenow();
00042   afx_msg void OnCancelInplace();
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045
00046   friend class CEmbeddedItem;
00047 };
00048
00049 #endif  // __PADDOC_H__
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/shadow.cpp Source File

  • ole
  • oleview
  • iviewers

shadow.cpp

Go to the documentation of this file.
00001 /************************************************************************
00002  *      Module:  shadow.c
00003  *
00004  ***********************************************************************/
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #include "stdafx.h"
00016 #include "shadow.h"
00017 VOID NEAR PASCAL Draw3DLine1( HDC hDC, UINT x, UINT y, UINT nLen, UINT wFlags ) ;
00018 VOID NEAR PASCAL DrawFrame( HDC hDC, LPRECT lprc ) ;
00019
00020 #define SHADOWWIDTH  1
00021
00022 /****************************************************************
00023  *  VOID WINAPI tdDraw3DCrease( HDC hDC, LPRECT lprc, UINT uiFlags )
00024  *
00025  *  Description:
00026  *
00027  *
00028  *
00029  *  Comments:
00030  *
00031  ****************************************************************/
00032 VOID WINAPI tdDraw3DCrease( HDC hDC, LPRECT lpRect, UINT uiFlags )
00033 {
00034    RECT       rc ;
00035    COLORREF   rgbOld ;
00036
00037    rc = *lpRect ;
00038
00039    if (uiFlags & DRAW3D_OUT)
00040     OffsetRect( &rc, 1, 1 ) ;
00041
00042    rgbOld = SetBkColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ;
00043
00044    DrawFrame( hDC, &rc ) ;
00045
00046    if (uiFlags & DRAW3D_OUT)
00047     OffsetRect( &rc, -1, -1 ) ;
00048    else
00049     OffsetRect( &rc, 1, 1 ) ;
00050
00051
00052    SetBkColor( hDC, tdGetHighlightColor( rgbOld ) ) ;
00053
00054    DrawFrame( hDC, &rc ) ;
00055
00056    SetBkColor( hDC, rgbOld ) ;
00057
00058 } /* tdDraw3DCrease()  */
00059
00060 /** VOID WINAPI tdDraw3DRect( HDC, LPRECT, UINT, UINT )
00061  *
00062  *  DESCRIPTION:
00063  *      Draws a 3D rectangle that is shaded.  wFlags can be used to
00064  *      control how the rectangle looks.
00065  *
00066  *  ARGUMENTS:
00067  *      HDC hDC             :   Handle to the device context that will be
00068  *                              used to display the rectangle.
00069  *
00070  *      RECT rect           :   A rectangle describing the dimensions of
00071  *                              the rectangle in device coordinates.
00072  *
00073  *      UINT wShadowWidth   :   Width of the shadow in device coordinates.
00074  *
00075  *      UINT wFlags         :   The following flags may be passed to describe
00076  *                              the style of the rectangle:
00077  *
00078  *                              DRAW3D_IN   :   The shadow is drawn such that
00079  *                              the box appears to be sunk in to the screen.
00080  *                              This is default if 0 is passed.
00081  *
00082  *                              DRAW3D_OUT  :   The shadow is drawn such that
00083  *                              the box appears to be sticking out of the
00084  *                              screen.
00085  *
00086  *  RETURN (VOID WINAPI):
00087  *      The 3D looking rectangle will have been drawn into the DC.
00088  *
00089  *  NOTES:
00090  *
00091  ** cjp */
00092
00093 VOID WINAPI tdDraw3DRect( HDC hDC, LPRECT lpRect,
00094                  UINT uiShadowWidth, UINT uiFlags )
00095 {
00096    /* sanity check--don't work if you don't have to! */
00097    if ( !uiShadowWidth || !RectVisible( hDC, lpRect ) )
00098      return ;
00099
00100    if (uiFlags & DRAW3D_CREASE)
00101    {
00102     tdDraw3DCrease( hDC, lpRect, uiFlags ) ;
00103     return ;
00104    }
00105
00106    /* if width is 1 use lines instead of polygons */
00107    if (uiShadowWidth == 1)
00108    {
00109     /* draw the top line */
00110     Draw3DLine1( hDC, lpRect->left, lpRect->top,
00111            lpRect->right - lpRect->left,
00112            DRAW3D_TOPLINE | uiFlags ) ;
00113
00114     /* right line */
00115     Draw3DLine1( hDC, lpRect->right, lpRect->top,
00116            lpRect->bottom - lpRect->top,
00117            DRAW3D_RIGHTLINE | uiFlags ) ;
00118
00119     /* bottom line */
00120     Draw3DLine1( hDC, lpRect->left, lpRect->bottom,
00121            lpRect->right - lpRect->left,
00122            DRAW3D_BOTTOMLINE | uiFlags ) ;
00123
00124     /* left line */
00125     Draw3DLine1( hDC, lpRect->left, lpRect->top,
00126            lpRect->bottom - lpRect->top,
00127            DRAW3D_LEFTLINE | uiFlags ) ;
00128    }
00129    else
00130    {
00131     /* draw the top line */
00132     tdDraw3DLine( hDC, lpRect->left, lpRect->top,
00133            lpRect->right - lpRect->left,
00134            uiShadowWidth, DRAW3D_TOPLINE | uiFlags ) ;
00135
00136     /* right line */
00137     tdDraw3DLine( hDC, lpRect->right, lpRect->top,
00138            lpRect->bottom - lpRect->top,
00139            uiShadowWidth, DRAW3D_RIGHTLINE | uiFlags ) ;
00140
00141     /* bottom line */
00142     tdDraw3DLine( hDC, lpRect->left, lpRect->bottom,
00143            lpRect->right - lpRect->left,
00144            uiShadowWidth, DRAW3D_BOTTOMLINE | uiFlags ) ;
00145
00146     /* left line */
00147     tdDraw3DLine( hDC, lpRect->left, lpRect->top,
00148            lpRect->bottom - lpRect->top,
00149            uiShadowWidth, DRAW3D_LEFTLINE | uiFlags ) ;
00150    }
00151 } /* Draw3DRect() */
00152
00153
00154 /** VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT nLen,
00155  *
00156  *  DESCRIPTION:
00157  *      Draws a 3D line that can be used to make a 3D box.
00158  *
00159  *  ARGUMENTS:
00160  *      HDC hDC             :   Handle to the device context that will be
00161  *                              used to display the 3D line.
00162  *
00163  *      UINT x, y           :   Coordinates of the beginning of the line.
00164  *                              These coordinates are in device UINTs and
00165  *                              represent the _outside_ most point. Horiz-
00166  *                              ontal lines are drawn from left to right and
00167  *                              vertical lines are drawn from top to bottom.
00168  *
00169  *      UINT uiShadowWidth   :   Width of the shadow in device coordinates.
00170  *
00171  *      UINT  uiFlags        :   The following flags may be passed to
00172  *                              describe the style of the 3D line:
00173  *
00174  *                              DRAW3D_IN   :   The shadow is drawn such that
00175  *                              the box appears to be sunk in to the screen.
00176  *                              This is default if 0 is passed.
00177  *
00178  *                              DRAW3D_OUT  :   The shadow is drawn such that
00179  *                              the box appears to be sticking out of the
00180  *                              screen.
00181  *
00182  *                              DRAW3D_TOPLINE, _BOTTOMLINE, _LEFTLINE, and
00183  *                              _RIGHTLINE  :   Specifies that a "top",
00184  *                              "Bottom", "Left", or"Right" line is to be
00185  *                              drawn.
00186  *
00187  *  RETURN (VOID WINAPI):
00188  *      The line will have been drawn into the DC.
00189  *
00190  *  NOTES:
00191  *
00192  ** cjp */
00193
00194 VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT uiLen,
00195                  UINT uiShadowWidth, UINT uiFlags )
00196 {
00197    HBRUSH  hBrush ;
00198    BOOL    fDark ;
00199    POINT   Point[ 4 ] ;         /* define a polgon with 4 points    */
00200
00201    /* if width is zero, don't do nothin'! */
00202    if ( !uiShadowWidth )
00203      return ;
00204
00205    /* if width is 1 use lines instead of polygons */
00206    if (uiShadowWidth == 1)
00207    {
00208     Draw3DLine1( hDC, x, y, uiLen, uiFlags ) ;
00209     return ;
00210    }
00211
00212    /* define shape of polygon--origin is always the same */
00213    Point[0].x = x ;
00214    Point[0].y = y ;
00215
00216    /*  To do this we'll simply draw a polygon with four sides, using
00217   *  the appropriate brush.  I dare you to ask me why this isn't a
00218   *  switch/case!
00219   */
00220    if ( uiFlags & DRAW3D_TOPLINE )
00221    {
00222      /* across to right */
00223      Point[1].x = x + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
00224      Point[1].y = y ;
00225
00226      /* down/left */
00227      Point[2].x = x + uiLen - uiShadowWidth ;
00228      Point[2].y = y + uiShadowWidth ;
00229
00230      /* accross to left */
00231      Point[3].x = x + uiShadowWidth ;
00232      Point[3].y = y + uiShadowWidth ;
00233
00234      /* select 'dark' brush if 'in'--'light' for 'out' */
00235      fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00236    }
00237
00238    /* possibly the bottom? */
00239    else if ( uiFlags & DRAW3D_BOTTOMLINE )
00240    {
00241      /* across to right */
00242      Point[1].x = x + uiLen ;
00243      Point[1].y = y ;
00244
00245      /* up/left */
00246      Point[2].x = x + uiLen - uiShadowWidth ;
00247      Point[2].y = y - uiShadowWidth ;
00248
00249      /* accross to left */
00250      Point[3].x = x + uiShadowWidth ;
00251      Point[3].y = y - uiShadowWidth ;
00252
00253      /* select 'light' brush if 'in' */
00254      fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00255    }
00256
00257    /* ok, it's gotta be left? */
00258    else if ( uiFlags & DRAW3D_LEFTLINE )
00259    {
00260      /* down */
00261      Point[1].x = x ;
00262      Point[1].y = y + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
00263
00264      /* up/right */
00265      Point[2].x = x + uiShadowWidth ;
00266      Point[2].y = y + uiLen - uiShadowWidth ;
00267
00268      /* down */
00269      Point[3].x = x + uiShadowWidth ;
00270      Point[3].y = y + uiShadowWidth ;
00271
00272      /* select 'dark' brush if 'in'--'light' for 'out' */
00273      fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00274    }
00275
00276    /* well maybe it's for the right side? */
00277    else if ( uiFlags & DRAW3D_RIGHTLINE )
00278    {
00279      /* down */
00280      Point[1].x = x ;
00281      Point[1].y = y + uiLen ;
00282
00283      /* up/left */
00284      Point[2].x = x - uiShadowWidth ;
00285      Point[2].y = y + uiLen - uiShadowWidth ;
00286
00287      /* up */
00288      Point[3].x = x - uiShadowWidth ;
00289      Point[3].y = y + uiShadowWidth ;
00290
00291      /* select 'light' brush if 'in' */
00292      fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00293    }
00294    else
00295     return ;
00296
00297    /* select NULL_PEN for no borders */
00298    SelectObject( hDC, GetStockObject( NULL_PEN ) ) ;
00299
00300    /* select the appropriate color for the fill */
00301    hBrush = CreateSolidBrush( GetNearestColor( hDC, fDark ?
00302                 tdGetShadowColor( GetBkColor( hDC ) ) :
00303                 tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;
00304
00305    hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;
00306
00307    Polygon( hDC, (LPPOINT)Point, 4 ) ;
00308
00309    /* restore what we killed */
00310    hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;
00311
00312    DeleteObject( hBrush ) ;
00313
00314 } /*tdDraw3DLine() */
00315
00316
00317
00318 /****************************************************************
00319  *  COLORREF WINAPI tdGetHighLightColor( COLORREF rgb )
00320  *
00321  *  Description:
00322  *
00323  *    This function returns the highlight color that corresponds
00324  *    to the given rgb value.  If there is no "high intensity"
00325  *    color that matches, white is used (or yellow if the color
00326  *    is white).
00327  *
00328  *  Comments:
00329  *
00330  ****************************************************************/
00331 COLORREF WINAPI tdGetHighlightColor( COLORREF rgb )
00332 {
00333    BYTE  cRed, cGreen, cBlue ;
00334
00335   #if _MFC_VER >= 0x0300
00336     if (rgb == GetSysColor( COLOR_BTNFACE ))
00337       return GetSysColor( COLOR_BTNHIGHLIGHT ) ;
00338   #endif
00339
00340    if (rgb == RGBLTRED     ||
00341      rgb == RGBLTGREEN   ||
00342      rgb == RGBLTBLUE    ||
00343      rgb == RGBLTMAGENTA ||
00344      rgb == RGBLTCYAN    ||
00345      rgb == RGBLTGRAY    ||
00346      rgb == RGBYELLOW)
00347     return RGBWHITE ;
00348
00349    if (rgb == RGBWHITE)
00350     return RGBLTGRAY ;
00351
00352    if (rgb == RGBBLACK || rgb == RGBGRAY)
00353     return RGBLTGRAY ;
00354
00355    cRed = (BYTE)(rgb & 0x000000FF) ;
00356
00357    cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;
00358
00359    cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;
00360
00361    if (cRed == 128)
00362     cRed += 64 ;
00363
00364    if (cGreen == 128)
00365     cGreen += 64 ;
00366
00367    if (cBlue == 128)
00368     cBlue += 64 ;
00369
00370    return RGB( cRed, cGreen, cBlue ) ;
00371
00372 } /* tdGetHighlightColor()  */
00373
00374
00375 /****************************************************************
00376  *  COLORREF WINAPI tdGetShadowColor( COLORREF rgb )
00377  *
00378  *  Description:
00379  *
00380  *    Returns an appropriate shadow color for the given rgb.
00381  *
00382  *  Comments:
00383  *
00384  ****************************************************************/
00385 COLORREF WINAPI tdGetShadowColor( COLORREF rgb )
00386 {
00387   if (rgb == GetSysColor( COLOR_BTNFACE ))
00388     return GetSysColor( COLOR_BTNSHADOW ) ;
00389
00390    BYTE  cRed, cGreen, cBlue ;
00391
00392    if (rgb == RGBBLACK)
00393     return RGBGRAY ;
00394
00395    if (rgb == RGBRED     ||
00396      rgb == RGBGREEN   ||
00397      rgb == RGBBLUE    ||
00398      rgb == RGBBROWN   ||
00399      rgb == RGBMAGENTA ||
00400      rgb == RGBCYAN    ||
00401      rgb == RGBWHITE   ||
00402      rgb == RGBGRAY)
00403     return RGBBLACK ;
00404
00405    if (rgb == RGBLTGRAY)
00406     return RGBGRAY ;
00407
00408    cRed = (BYTE)(rgb & 0x000000FF) ;
00409
00410    cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;
00411
00412    cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;
00413
00414    if (cRed > 128)
00415     cRed -= 64 ;
00416
00417    if (cGreen > 128)
00418     cGreen -= 64 ;
00419
00420    if (cBlue > 128)
00421     cBlue -= 64 ;
00422
00423    return RGB( cRed, cGreen, cBlue ) ;
00424 } /* tdGetShadowColor()  */
00425
00426
00427 /*
00428  *====================================================================
00429  *  Internal functions
00430  *====================================================================
00431  */
00432
00433 /****************************************************************
00434  *  VOID NEAR PASCAL
00435  *   Draw3DLine1( HDC hDC, UINT x, UINT y, UINT uiLen, UINT uiFlags )
00436  *
00437  *  Description:
00438  *
00439  *    Does the same thing astdDraw3DLine but for single width lines.
00440  *
00441  *  Comments:
00442  *
00443  ****************************************************************/
00444 VOID NEAR PASCAL
00445    Draw3DLine1( HDC hDC, UINT x, UINT y, UINT uiLen, UINT uiFlags )
00446 {
00447    BOOL    fDark ;
00448    RECT    rc ;
00449    COLORREF   rgbOld ;
00450
00451    if ( uiFlags & DRAW3D_TOPLINE )
00452    {
00453     rc.left = x ;
00454     rc.right = rc.left + uiLen - 1 ;
00455     rc.top = y ;
00456     rc.bottom = y + 1 ;
00457
00458     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00459    }
00460
00461    /* possibly the bottom? */
00462    else if ( uiFlags & DRAW3D_BOTTOMLINE )
00463    {
00464     rc.left = x ;
00465     rc.right = rc.left + uiLen - 1 ;
00466     rc.top = y - 1 ;
00467     rc.bottom = y ;
00468
00469     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00470    }
00471
00472    /* ok, it's gotta be left? */
00473    else if ( uiFlags & DRAW3D_LEFTLINE )
00474    {
00475     rc.left = x ;
00476     rc.right = x + 1 ;
00477     rc.top = y ;
00478     rc.bottom = y + uiLen ;
00479
00480     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00481    }
00482
00483    /* well maybe it's for the right side? */
00484    else if ( uiFlags & DRAW3D_RIGHTLINE )
00485    {
00486     rc.left = x - 1 ;
00487     rc.right = x ;
00488     rc.top = y ;
00489     rc.bottom = y + uiLen ;
00490
00491     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00492    }
00493
00494    /* bad drugs? */
00495    else return ;
00496
00497    /* select the appropriate color for the fill */
00498    if ( fDark )
00499     rgbOld = SetBkColor( hDC,
00500          GetNearestColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ) ;
00501    else
00502     rgbOld = SetBkColor( hDC,
00503          GetNearestColor( hDC, tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;
00504
00505    /* finally, draw the dern thing */
00506
00507    ExtTextOut( hDC, x, y, ETO_OPAQUE, &rc, NULL, 0, NULL ) ;
00508
00509    SetBkColor( hDC, rgbOld ) ;
00510
00511 } /* Draw3DLine1()  */
00512
00513 VOID NEAR PASCAL DrawFrame( HDC hDC, LPRECT lprc )
00514 {
00515    RECT    rc1 ;
00516
00517    /* perform CopyRect w/o bloody windows style overhead */
00518    rc1 = *lprc ;
00519
00520    /* top */
00521    rc1.top = lprc->top ;
00522    rc1.left = lprc->left ;
00523    rc1.bottom = lprc->top + 1 ;
00524    rc1.right = lprc->right ;
00525
00526    /* blast it out */
00527    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00528
00529    /* right */
00530    rc1.left = lprc->right - 1 ;
00531    rc1.bottom = lprc->bottom ;
00532
00533    /* blast this part now */
00534    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00535
00536    /* left */
00537    rc1.left = lprc->left ;
00538    rc1.right = lprc->left + 1 ;
00539
00540    /* and another part */
00541    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00542
00543    /* bottom */
00544    rc1.right = lprc->right ;
00545    rc1.top = lprc->bottom - 1 ;
00546
00547    /* finish it off */
00548    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00549
00550 } /* DrawFaceFrame() */
00551
00552
00553 /************************************************************************
00554  * End of File: shadow.c
00555  ***********************************************************************/
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCSplit.Cpp Source File

  • ole
  • TstCon

TCSplit.Cpp

Go to the documentation of this file.
00001 // TCSplitter.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CTCSplitter
00022
00023 IMPLEMENT_DYNAMIC( CTCSplitter, CSplitterWnd )
00024
00025 CTCSplitter::CTCSplitter()
00026 {
00027 }
00028
00029 CTCSplitter::~CTCSplitter()
00030 {
00031 }
00032
00033 BEGIN_MESSAGE_MAP(CTCSplitter, CSplitterWnd)
00034   //{{AFX_MSG_MAP(CTCSplitter)
00035     // NOTE - the ClassWizard will add and remove mapping macros here.
00036   //}}AFX_MSG_MAP
00037    ON_WM_CTLCOLOR()
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CTCSplitter message handlers
00042
00043 HBRUSH CTCSplitter::OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor )
00044 {
00045    if( nCtlColor == CTLCOLOR_STATIC )
00046    {
00047     return( GetSysColorBrush( COLOR_WINDOW ) );
00048    }
00049
00050    return( CSplitterWnd::OnCtlColor( pDC, pWnd, nCtlColor ) );
00051 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLineFile Member List

This is the complete list of members for CLineFile, including all inherited members.
ReadLine(CString &stringLine) | CLineFile
SafeOpen(const CString &string, UINT nStyleFlags) | CLineFile
WriteLine(const CString &stringLine) | CLineFile
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInterfaceInfo Member List

This is the complete list of members for CInterfaceInfo, including all inherited members.
CInterfaceInfo() | CInterfaceInfo
FindMethod(DISPID dispid) const | CInterfaceInfo
FindPropertyGet(DISPID dispid) const | CInterfaceInfo
GetIID() const | CInterfaceInfo
GetMethod(int iMethod) const | CInterfaceInfo
GetNumMethods() const | CInterfaceInfo
Init(ITypeInfo *pTypeInfo) | CInterfaceInfo
m_apMethodInfo | CInterfaceInfo
m_iid | CInterfaceInfo
~CInterfaceInfo() | CInterfaceInfo
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMTasksPane.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMTasksPane.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMTasksPane.h : header file
00013 //
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CMSMTasksPane window
00017
00018 class CMSMTasksPane : public CMFCTasksPane
00019 {
00020   DECLARE_DYNAMIC(CMSMTasksPane)
00021
00022 // Construction
00023 public:
00024   CMSMTasksPane();
00025
00026 // Attributes
00027 public:
00028
00029 // Operations
00030 public:
00031
00032 // Implementation
00033 public:
00034   virtual ~CMSMTasksPane();
00035
00036 protected:
00037   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDriverDoc Member List

This is the complete list of members for CDriverDoc, including all inherited members.
CDriverDoc() | CDriverDoc | [protected]
m_map | CDriverDoc |
OnNewDocument() | CDriverDoc | [virtual]
Serialize(CArchive &ar) | CDriverDoc | [virtual]
~CDriverDoc() | CDriverDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSubEditDlg Member List

This is the complete list of members for CSubEditDlg, including all inherited members.
CSubEditDlg() | CSubEditDlg | [inline]
edit1 | CSubEditDlg | [protected]
edit2 | CSubEditDlg | [protected]
edit3 | CSubEditDlg | [protected]
edit4 | CSubEditDlg | [protected]
IDD enum value | CSubEditDlg |
OnInitDialog() | CSubEditDlg |
OnOK() | CSubEditDlg | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRowListApp Member List

This is the complete list of members for CRowListApp, including all inherited members.
CRowListApp() | CRowListApp |
InitInstance() | CRowListApp | [virtual]
OnAppAbout() | CRowListApp |
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/stdafx.cpp Source File

  • general
  • rowlist

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  RowList.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/targetver.h Source File

  • vc2008fp
  • MDITabsDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/stdafx.h Source File

  • controls
  • localize

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/StdAfx.h Source File

  • general
  • ListHdr

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #if !defined(AFX_STDAFX_H__3128182A_D350_11D0_8286_00C04FD73634__INCLUDED_)
00015 #define AFX_STDAFX_H__3128182A_D350_11D0_8286_00C04FD73634__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #include <afxdisp.h>        // MFC OLE automation classes
00026 #ifndef _AFX_NO_AFXCMN_SUPPORT
00027 #include <afxcmn.h>         // MFC support for Windows Common Controls
00028 #endif // _AFX_NO_AFXCMN_SUPPORT
00029
00030
00031 //{{AFX_INSERT_LOCATION}}
00032 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00033
00034 #endif // !defined(AFX_STDAFX_H__3128182A_D350_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TaskPane.cpp Source File

  • vc2008fp
  • TasksPane

TaskPane.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TasksPane.h"
00013 #include "TaskPane.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CTaskPane
00023
00024 BEGIN_MESSAGE_MAP(CTaskPane, CMFCTasksPane)
00025   ON_WM_CREATE()
00026 END_MESSAGE_MAP()
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CTaskPane construction/destruction
00030
00031 CTaskPane::CTaskPane()
00032 {
00033   m_nDocumentsGroup = -1;
00034
00035   m_nUserColorGroup = -1;
00036   m_nUserColorTask = -1;
00037   // TODO: add one-time construction code here
00038
00039 }
00040
00041 CTaskPane::~CTaskPane()
00042 {
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CTaskPane message handlers
00047
00048 int CTaskPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
00049 {
00050   if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
00051     return -1;
00052
00053   SetCaption (_T("Tasks Pane"));
00054   SetIconsList (IDB_TASKS, 16);
00055
00056   EnableNavigationToolbar (TRUE);
00057
00058   EnableWrapLabels (TRUE);
00059   EnableOffsetCustomControls (FALSE);
00060
00061   m_nDocumentsGroup = AddGroup (_T("Open a document"), FALSE, TRUE);
00062
00063   // Add MRU list:
00064   AddMRUFilesList (m_nDocumentsGroup);
00065   AddTask (m_nDocumentsGroup, _T("More Documents..."), 0, ID_FILE_OPEN);
00066
00067   int nPage1Gr2 = AddGroup (_T("Custom group"));
00068   m_nUserColorGroup = nPage1Gr2;
00069
00070   AddTask (nPage1Gr2, _T("Task 1"), 1, ID_TASK1);
00071   m_nUserColorTask = AddTask (nPage1Gr2, _T("Task 2"), 2, ID_TASK2);
00072   AddTask (nPage1Gr2, _T("Task 3"), 3, ID_TASK3);
00073   AddSeparator (nPage1Gr2);
00074   AddTask (nPage1Gr2, _T("Task 4"), 4, ID_TASK4);
00075   AddTask (nPage1Gr2, _T("Task 5"), 5, ID_TASK5);
00076   AddTask (nPage1Gr2, _T("Long task's name to see words wrap feature"), 6, ID_TASK6);
00077
00078   int nPage1Gr3 = AddGroup (_T("Details"), TRUE);
00079   AddLabel (nPage1Gr3, _T("The Label contains text, which can be displayed in several lines. \n\nText can include line breaking characters \'\\n\' and &underline markers \'&&\'"));
00080
00081   // Add second page:
00082   int nPage2 = AddPage (_T("Custom page"));
00083
00084   int nPage2Gr1 = AddGroup (nPage2, _T("Tree Control"));
00085
00086   if (!CreateTreeControl())
00087   {
00088     TRACE0("Failed to create the custom window\n");
00089     return -1;      // fail to create
00090   }
00091
00092   const int nControlHeight = 65;
00093
00094   AddWindow (nPage2Gr1, m_wndTree.GetSafeHwnd (), nControlHeight);
00095   AddTask (nPage2Gr1, _T("My favorites..."), 9, ID_TASK9);
00096
00097   int nPage2Gr2 = AddGroup (nPage2, _T("Edit Control"));
00098
00099   if (!CreateEditControl())
00100   {
00101     TRACE0("Failed to create the custom window\n");
00102     return -1;      // fail to create
00103   }
00104
00105   AddWindow (nPage2Gr2, m_wndEdit.GetSafeHwnd (), nControlHeight);
00106
00107   // Create tasks pane windows.
00108   // TODO: create your own tasks panes here:
00109
00110   return 0;
00111 }
00112
00113 void CTaskPane::UpdateMRUFilesList ()
00114 {
00115   AddMRUFilesList (m_nDocumentsGroup);
00116   RedrawWindow ();
00117 }
00118
00119 void CTaskPane::UpdateToolbar ()
00120 {
00121   m_wndToolBar.RedrawWindow ();
00122 }
00123
00124 BOOL CTaskPane::CreateTreeControl()
00125 {
00126   CRect rectDummy (0, 0, 0, 0);
00127   const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
00128                 TVS_LINESATROOT | TVS_HASBUTTONS;
00129
00130   if(!m_wndTree.Create (dwTreeStyle, rectDummy, this, (UINT)-1))
00131   {
00132     TRACE0("Failed to create the custom window\n");
00133     return FALSE;
00134   }
00135
00136   m_wndTree.ModifyStyleEx (0, WS_EX_CLIENTEDGE);
00137
00138   HTREEITEM hRoot = m_wndTree.InsertItem (_T("Folders"));
00139
00140   m_wndTree.InsertItem (_T("Folder 1"), hRoot);
00141   m_wndTree.InsertItem (_T("Folder 2"), hRoot);
00142   m_wndTree.InsertItem (_T("Folder 3"), hRoot);
00143   m_wndTree.InsertItem (_T("Folder 4"), hRoot);
00144
00145   m_wndTree.Expand (hRoot, TVE_EXPAND);
00146
00147   m_wndTree.RedrawWindow ();
00148   return TRUE;
00149 }
00150
00151 BOOL CTaskPane::CreateEditControl()
00152 {
00153   CRect rectDummy (0, 0, 0, 0);
00154   DWORD dwEditStyle = WS_CHILD | WS_VISIBLE |
00155     ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE;
00156
00157   m_Font.CreateStockObject (DEFAULT_GUI_FONT);
00158
00159   if (!m_wndEdit.Create (dwEditStyle, rectDummy, this, (UINT)-1))
00160   {
00161     TRACE0("Failed to create the edit window\n");
00162     return FALSE;
00163   }
00164
00165   m_wndEdit.ModifyStyleEx (0, WS_EX_CLIENTEDGE);
00166
00167   m_wndEdit.SetFont (&m_Font);
00168   m_wndEdit.SetWindowText(
00169     _T("This is the standard multiline Edit Box.\r\nHere you can type your text."));
00170
00171   return TRUE;
00172 }
00173
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface32.cpp Source File

  • general
  • MMXSwarm

MMXSurface32.cpp

Go to the documentation of this file.
00001 // MMXSurface32.cpp : implementation of the CMMXSurface32Intrinsic
00002 // class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012 //
00013 #include "stdafx.h"
00014 #include "MMXSurface.h"
00015 #include "MMXWrapper.h"
00016
00017 typedef CMMXUnsigned16Saturated CMMX;
00018
00019 // Optimized for a 2-pixel processing 32 bit buffer
00020 void CMMXSurface32Intrinsic::AdjustWidth(int *pWidth)
00021 {
00022   ASSERT(pWidth != NULL);
00023   ASSERT(m_kDeltaX == 1);
00024   // increment if odd.  If we are even, we stop
00025   // dead on correctly, reading the single black buffer
00026   // column. If we are odd, we need an extra column so
00027   // we don't need to special case the tail of the loop.
00028
00029   // Because we know there is always a DeltaX black stripe
00030   // at least 1 pixel wide, we can subtract instead of adding.
00031   // this allows us to get rid of adding a delta per horizontal
00032   // loop. while in theory this could cause the left side to bleed
00033   // to the right, in reality this won't happen.
00034   if (*pWidth & 0x01)
00035     *pWidth -= 1;
00036 }
00037
00038 void CMMXSurface32Intrinsic::OnCreated()
00039 {
00040   ASSERT(GetBitDepth() == 32);
00041   ASSERT((GetPitch() & 0x7) == 0);
00042   ASSERT(GetVisibleWidth() && GetVisibleHeight());
00043
00044   int width = GetVisibleWidth();
00045     m_dwpl = GetPitch()/4; // dwords Per Line
00046     m_width = (width+1)/2; // 2 pixels at a time
00047 }
00048
00049 void CMMXSurface32Intrinsic::BlurBits()
00050 {
00051     int height = GetVisibleHeight();
00052     DWORD *pCur  = (DWORD *)GetPixelAddress(0,0);
00053
00054   CMMX cFader;
00055   CMMX cRight, cRightRight;
00056   CMMX cDownRight;
00057   CMMX cLeft;
00058   CMMX cUpRight;
00059   CMMX cUp, cDown, cCur;
00060
00061   cFader.UnpackBytesLo( 0x01010101 );
00062   cLeft.Clear();
00063   cCur.UnpackBytesLo( *pCur );
00064
00065   do {
00066     int width = m_width;
00067     do {
00068       // Load pixels and do the mmx unpack
00069       cRight.UnpackBytesLo( pCur[1] );
00070       cRightRight.UnpackBytesLo( pCur[2] );
00071       cUp.UnpackBytesLo( pCur[-m_dwpl] );
00072       cUpRight.UnpackBytesLo( pCur[-m_dwpl+1] );
00073       cDown.UnpackBytesLo( pCur[m_dwpl] );
00074       cDownRight.UnpackBytesLo( pCur[m_dwpl+1] );
00075
00076       // Actual math. Don't step on current, or right.
00077       // Sum the 4 around and double the middle
00078
00079       // Do current pixel in this line
00080       cUp = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;
00081
00082       // Do next pixel
00083       cDown = (cDownRight+cUpRight+cCur+cRightRight+(cRight<<2))>>3;
00084
00085 #if defined(TRIPPY)
00086       cUp += cFader; // increase the fade to white
00087       cDown += cFader; // increase the fade to white
00088 #elif defined (FAST_FADE)
00089           cUp -= cFader; // increase the fade to black
00090           cDown -= cFader; // increase the fade to black
00091 #endif
00092       cLeft = cRight;     // Slide left!
00093       cCur = cRightRight;
00094
00095       *(ULONGLONG *)pCur = cUp.PackBytes(cDown);
00096       pCur += 2;
00097     } while (--width > 0);
00098   } while (--height > 0);
00099 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertySection Member List

This is the complete list of members for CPropertySection, including all inherited members.
AddProperty(CProperty *pProp) | CPropertySection |
AddProperty(CProperty *pProp) | CPropertySection |
CProperty class | CPropertySection | [friend]
CPropertySection(void) | CPropertySection |
CPropertySection(CLSID FormatID) | CPropertySection |
CPropertySection(void) | CPropertySection |
CPropertySection(CLSID FormatID) | CPropertySection |
CPropertySet class | CPropertySection | [friend]
Get(DWORD dwPropID, DWORD *pcb) | CPropertySection |
Get(DWORD dwPropID) | CPropertySection |
Get(DWORD dwPropID, DWORD *pcb) | CPropertySection |
Get(DWORD dwPropID) | CPropertySection |
GetCount(void) | CPropertySection |
GetCount(void) | CPropertySection |
GetFormatID(void) | CPropertySection |
GetFormatID(void) | CPropertySection |
GetID(LPCTSTR pszName, DWORD *pdwPropID) | CPropertySection |
GetID(LPCTSTR pszName, DWORD *pdwPropID) | CPropertySection |
GetList(void) | CPropertySection |
GetList(void) | CPropertySection |
GetProperty(DWORD dwPropID) | CPropertySection |
GetProperty(DWORD dwPropID) | CPropertySection |
GetSectionName(void) | CPropertySection |
GetSectionName(void) | CPropertySection |
GetSize(void) | CPropertySection |
GetSize(void) | CPropertySection |
m_FormatID | CPropertySection | [private]
m_NameDict | CPropertySection | [private]
m_PropList | CPropertySection | [private]
m_SH | CPropertySection | [private]
m_strSectionName | CPropertySection | [private]
ReadFromStream(IStream *pIStream, LARGE_INTEGER liPropSet) | CPropertySection |
ReadFromStream(IStream *pIStream, LARGE_INTEGER liPropSet) | CPropertySection |
ReadNameDictFromStream(IStream *pIStream) | CPropertySection |
ReadNameDictFromStream(IStream *pIStream) | CPropertySection |
Remove(DWORD dwPropID) | CPropertySection |
Remove(DWORD dwPropID) | CPropertySection |
RemoveAll() | CPropertySection |
RemoveAll() | CPropertySection |
Set(DWORD dwPropID, LPVOID pValue, DWORD dwType) | CPropertySection |
Set(DWORD dwPropID, LPVOID pValue) | CPropertySection |
Set(DWORD dwPropID, LPVOID pValue, DWORD dwType) | CPropertySection |
Set(DWORD dwPropID, LPVOID pValue) | CPropertySection |
SetFormatID(CLSID FormatID) | CPropertySection |
SetFormatID(CLSID FormatID) | CPropertySection |
SetName(DWORD dwPropID, LPCTSTR pszName) | CPropertySection |
SetName(DWORD dwPropID, LPCTSTR pszName) | CPropertySection |
SetSectionName(LPCTSTR pszName) | CPropertySection |
SetSectionName(LPCTSTR pszName) | CPropertySection |
WriteNameDictToStream(IStream *pIStream) | CPropertySection |
WriteNameDictToStream(IStream *pIStream) | CPropertySection |
WriteToStream(IStream *pIStream) | CPropertySection |
WriteToStream(IStream *pIStream) | CPropertySection |
~CPropertySection() | CPropertySection |
~CPropertySection() | CPropertySection |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSummPage Member List

This is the complete list of members for CSummPage, including all inherited members.
CSummPage() | CSummPage |
CSummPage() | CSummPage |
DoDataExchange(CDataExchange *pDX) | CSummPage | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CSummPage | [protected, virtual]
IDD enum value | CSummPage |
m_strAppname | CSummPage |
m_strAuthor | CSummPage |
m_strCmt | CSummPage |
m_strKeywd | CSummPage |
m_strSubj | CSummPage |
m_strTempl | CSummPage |
m_strTitle | CSummPage |
~CSummPage() | CSummPage |
~CSummPage() | CSummPage |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/mainfrm.cpp Source File

  • general
  • npp

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "np.h"
00015 #include "combobar.h"
00016 #include "mainfrm.h"
00017 #include "npdoc.h"
00018 #include "npview.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainFrame
00027
00028 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00029
00030 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00031   //{{AFX_MSG_MAP(CMainFrame)
00032   ON_WM_CREATE()
00033   ON_WM_CLOSE()
00034   ON_COMMAND(ID_VIEW_STATUS_BAR, OnViewStatusBar)
00035   ON_COMMAND(ID_EDIT_FIND_COMBO, OnEditFindCombo)
00036   //}}AFX_MSG_MAP
00037   ON_UPDATE_COMMAND_UI(ID_VIEW_STATUS_BAR, OnUpdateViewStatusBar)
00038   ON_UPDATE_COMMAND_UI(ID_INDICATOR_LINE, OnUpdateLineNumber)
00039   ON_UPDATE_COMMAND_UI(ID_INDICATOR_CLOCK, OnUpdateClock)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // arrays of IDs used to initialize control bars
00044
00045 // toolbar buttons - IDs are command buttons
00046 static UINT BASED_CODE buttons[] =
00047 {
00048   // same order as in the bitmap 'toolbar.bmp'
00049   ID_FILE_NEW,
00050   ID_FILE_OPEN,
00051   ID_FILE_SAVE,
00052     ID_SEPARATOR,
00053   ID_EDIT_CUT,
00054   ID_EDIT_COPY,
00055   ID_EDIT_PASTE,
00056     ID_SEPARATOR,
00057     ID_SEPARATOR, //(8) CComboBox location in the toolbar
00058     ID_SEPARATOR,
00059   ID_FILE_PRINT,
00060   ID_APP_ABOUT,
00061 };
00062
00063 static UINT BASED_CODE indicators[] =
00064 {
00065   ID_SEPARATOR,           // status line indicator
00066   ID_INDICATOR_LINE,
00067   ID_INDICATOR_CAPS,
00068   ID_INDICATOR_NUM,
00069   ID_INDICATOR_SCRL,
00070   ID_INDICATOR_CLOCK,
00071 };
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CMainFrame construction/destruction
00075
00076 CMainFrame::CMainFrame()
00077 {
00078 }
00079
00080 CMainFrame::~CMainFrame()
00081 {
00082 }
00083
00084 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00085 {
00086   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00087     return -1;
00088
00089   if (!m_wndToolBar.Create(this) ||
00090     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00091     !m_wndToolBar.SetButtons(buttons,
00092       sizeof(buttons)/sizeof(UINT)))
00093   {
00094     TRACE0("Failed to create toolbar\n");
00095     return -1;      // fail to create
00096   }
00097
00098   if (!CreateComboBox())
00099   {
00100     TRACE0("Failed to create combobox in toolbar\n");
00101     return -1;      // fail to create
00102   }
00103
00104   if (!m_wndStatusBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM , AFX_IDW_STATUS_BAR) ||
00105     !m_wndStatusBar.SetIndicators(indicators,
00106       sizeof(indicators)/sizeof(UINT)))
00107   {
00108     TRACE0("Failed to create status bar\n");
00109     return -1;      // fail to create
00110   }
00111
00112   m_wndToolBar.EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);
00113   EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);
00114   DockControlBar(&m_wndToolBar);
00115
00116   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00117     CBRS_TOOLTIPS | CBRS_FLYBY);
00118
00119   // create the timer to update the status bar clock
00120   if(!SetTimer(TIMER_ID, 2000, &CMainFrame::UpdateTime))
00121     return -1;
00122
00123   CMainFrame::UpdateTime(m_hWnd, 0, 0, 0); // update the time now
00124
00125   return 0;
00126 }
00127
00128 int CMainFrame::CreateComboBox()
00129 {
00130   CRect rect, comboRect;
00131   m_wndToolBar.SetButtonInfo(8, IDW_COMBO, TBBS_SEPARATOR, COMBO_WIDTH);
00132   m_wndToolBar.GetItemRect(8, &rect);
00133   rect.bottom += COMBO_HEIGHT;
00134
00135   if (!m_wndToolBar.m_toolBarCombo.Create(CBS_DROPDOWN|WS_VISIBLE|WS_TABSTOP|CBS_AUTOHSCROLL,
00136       rect, &m_wndToolBar, IDW_COMBO))
00137   {
00138     return FALSE;
00139   }
00140
00141   // center combo box edit control vertically within tool bar
00142   rect.bottom -= COMBO_HEIGHT;
00143   m_wndToolBar.m_toolBarCombo.GetWindowRect(&comboRect);
00144   m_wndToolBar.m_toolBarCombo.ScreenToClient(&comboRect);
00145
00146   m_wndToolBar.m_toolBarCombo.SetWindowPos(&m_wndToolBar.m_toolBarCombo, rect.left,
00147     rect.top + (rect.Height() - comboRect.Height())/2+1, 0, 0,
00148     SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE);
00149
00150   return TRUE;
00151 }
00152 /////////////////////////////////////////////////////////////////////////////
00153 // CMainFrame diagnostics
00154
00155 #ifdef _DEBUG
00156 void CMainFrame::AssertValid() const
00157 {
00158   CFrameWnd::AssertValid();
00159 }
00160
00161 void CMainFrame::Dump(CDumpContext& dc) const
00162 {
00163   CFrameWnd::Dump(dc);
00164 }
00165
00166 #endif //_DEBUG
00167
00168 /////////////////////////////////////////////////////////////////////////////
00169 // CMainFrame message handlers
00170
00171 #pragma warning (disable : 4706)
00172 void CMainFrame::OnViewStatusBar()
00173 {
00174   CWnd* pStatusBar;
00175   if (pStatusBar = GetDescendantWindow(AFX_IDW_STATUS_BAR))
00176   {
00177     pStatusBar->ShowWindow(!(pStatusBar->GetStyle() & WS_VISIBLE));
00178     RecalcLayout();
00179   }
00180 }
00181 #pragma warning (default: 4706)
00182
00183 #pragma warning (disable : 4706)
00184 void CMainFrame::OnUpdateViewStatusBar(CCmdUI* pCmdUI)
00185 {
00186   CWnd* pStatusBar;
00187   if (pStatusBar = GetDescendantWindow(AFX_IDW_STATUS_BAR))
00188     pCmdUI->SetCheck((pStatusBar->GetStyle() & WS_VISIBLE));
00189 }
00190 #pragma warning (default: 4706)
00191
00192 void CMainFrame::OnUpdateLineNumber(CCmdUI* pCmdUI)
00193 {
00194   pCmdUI->Enable(TRUE);
00195 }
00196
00197 void CMainFrame::OnUpdateClock(CCmdUI* pCmdUI)
00198 {
00199   pCmdUI->Enable(TRUE);
00200 }
00201
00202 void CMainFrame::OnEditFindCombo()
00203 {
00204   m_wndToolBar.m_toolBarCombo.SetFocus();
00205 }
00206
00207 void CMainFrame::OnClose()
00208 {
00209   KillTimer(TIMER_ID);
00210   CFrameWnd::OnClose();
00211 }
00212
00213 void CALLBACK EXPORT CMainFrame::UpdateTime(HWND hWnd,UINT /*nMsg*/, UINT_PTR /*nIDEvent*/, DWORD /*dwTime*/)
00214 {
00215   CString time;
00216   BOOL bPM = TRUE;
00217   SYSTEMTIME tm;
00218
00219   CMainFrame* pFrame = (CMainFrame*)CWnd::FromHandle(hWnd);
00220   CStatusBar* pStatusBar = (CStatusBar*) pFrame->GetDescendantWindow(AFX_IDW_STATUS_BAR);
00221
00222   if (pStatusBar == NULL)
00223     return;
00224
00225   GetLocalTime(&tm);
00226
00227   if (tm.wHour >= 0 && tm.wHour < 12)
00228     bPM = FALSE;
00229
00230   // convert 24 hour clock
00231   if (tm.wHour > 12)      // 13 - 23
00232     tm.wHour -= 12;
00233   else if (tm.wHour == 0) // midnight
00234     tm.wHour = 12;
00235
00236   time.Format(_T(" %d:%02.2d %s "), tm.wHour, tm.wMinute, ((bPM) ? _T("PM"):_T("AM")));
00237
00238   // get current pane font information and update time
00239   UINT nID, nStyle;
00240   int nWidth, nIndex = pStatusBar->CommandToIndex(ID_INDICATOR_CLOCK);
00241
00242   CClientDC dc(pStatusBar);
00243   CFont* pOldFont = dc.SelectObject(pStatusBar->GetFont());
00244   CSize szExtent = dc.GetTextExtent(time, time.GetLength());
00245   dc.SelectObject(pOldFont);
00246
00247   pStatusBar->GetPaneInfo(nIndex, nID, nStyle, nWidth);
00248   pStatusBar->SetPaneInfo(nIndex, nID, nStyle, szExtent.cx);
00249   pStatusBar->SetPaneText(nIndex, time);
00250 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ipframe.cpp Source File

  • vc2008fp
  • WordPad

ipframe.cpp

Go to the documentation of this file.
00001 //
00002 // ipframe.cpp : implementation of the CInPlaceFrame class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "formatba.h"
00017 #include "ruler.h"
00018 #include "ipframe.h"
00019 #include "wordpdoc.h"
00020 #include "wordpvw.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 const UINT uiMenuBarId      = AFX_IDW_CONTROLBAR_FIRST + 20;
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CInPlaceFrame
00031
00032 IMPLEMENT_DYNCREATE(CInPlaceFrame, COleIPFrameWndEx)
00033
00034 BEGIN_MESSAGE_MAP(CInPlaceFrame, COleIPFrameWndEx)
00035   //{{AFX_MSG_MAP(CInPlaceFrame)
00036   ON_WM_CREATE()
00037   ON_WM_DESTROY()
00038   ON_COMMAND(ID_HELP, OnHelpFinder)
00039   ON_COMMAND(ID_PEN_TOGGLE, OnPenToggle)
00040   ON_COMMAND(ID_HELP_INDEX, OnHelpFinder)
00041   //}}AFX_MSG_MAP
00042   ON_UPDATE_COMMAND_UI(ID_VIEW_TOOLBAR, OnUpdateControlBarMenu)
00043   ON_COMMAND_EX(ID_VIEW_TOOLBAR, OnBarCheck)
00044   ON_UPDATE_COMMAND_UI(ID_VIEW_FORMATBAR, OnUpdateControlBarMenu)
00045   ON_COMMAND_EX(ID_VIEW_FORMATBAR, OnBarCheck)
00046   ON_UPDATE_COMMAND_UI(ID_VIEW_RULER, OnUpdateControlBarMenu)
00047   ON_COMMAND_EX(ID_VIEW_RULER, OnBarCheck)
00048   ON_MESSAGE(WM_SIZECHILD, OnResizeChild)
00049   ON_MESSAGE(WPM_BARSTATE, OnBarState)
00050   ON_COMMAND(ID_DEFAULT_HELP, OnHelpFinder)
00051 END_MESSAGE_MAP()
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // arrays of IDs used to initialize control bars
00055
00056 static UINT BASED_CODE toolButtons[] =
00057 {
00058   // same order as in the bitmap 'itoolbar.bmp'
00059   ID_EDIT_CUT,
00060   ID_EDIT_COPY,
00061   ID_EDIT_PASTE,
00062
00063     ID_SEPARATOR,
00064   ID_PEN_TOGGLE,
00065   ID_PEN_PERIOD,
00066   ID_PEN_SPACE,
00067   ID_PEN_BACKSPACE,
00068   ID_PEN_NEWLINE,
00069   ID_PEN_LENS
00070 };
00071
00072 #define NUM_PEN_ITEMS 7
00073 #define NUM_PEN_TOGGLE 5
00074
00075 static UINT BASED_CODE format[] =
00076 {
00077   // same order as in the bitmap 'format.bmp'
00078   IDC_FONTNAME,
00079     ID_SEPARATOR,
00080   IDC_FONTSIZE,
00081     ID_SEPARATOR,
00082   ID_CHAR_BOLD,
00083   ID_CHAR_ITALIC,
00084   ID_CHAR_UNDERLINE,
00085   ID_CHAR_COLOR,
00086     ID_SEPARATOR,
00087   ID_PARA_LEFT,
00088   ID_PARA_CENTER,
00089   ID_PARA_RIGHT,
00090     ID_SEPARATOR,
00091   ID_INSERT_BULLET,
00092 };
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // CInPlaceFrame construction/destruction
00096
00097 CInPlaceFrame::CInPlaceFrame() : m_wndRulerBar(FALSE)
00098 {
00099 }
00100
00101 int CInPlaceFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00102 {
00103   if (COleIPFrameWndEx::OnCreate(lpCreateStruct) == -1)
00104     return -1;
00105
00106   // CResizeBar implements in-place resizing.
00107   if (!m_wndResizeBar.Create(this))
00108   {
00109     TRACE0("Failed to create resize bar\n");
00110     return -1;      // fail to create
00111   }
00112
00113   if (!CreateRulerBar(this))
00114     return FALSE;
00115
00116   // By default, it is a good idea to register a drop-target that does
00117   //  nothing with your frame window.  This prevents drops from
00118   //  "falling through" to a container that supports drag-drop.
00119   m_dropTarget.Register(this);
00120
00121   return 0;
00122 }
00123
00124 // OnCreateControlBars is called by the framework to create control bars on the
00125 //  container application's windows.  pWndFrame is the top level frame window of
00126 //  the container and is always non-NULL.  pWndDoc is the doc level frame window
00127 //  and will be NULL when the container is an SDI application.  A server
00128 //  application can place MFC control bars on either window.
00129 BOOL CInPlaceFrame::OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* /*pWndDoc*/)
00130 {
00131   if (!CreateMenuBar())
00132     return -1;
00133
00134   if (!CreateToolBar(pWndFrame))
00135     return FALSE;
00136
00137   if (!CreateFormatBar(pWndFrame))
00138     return FALSE;
00139
00140   // set owner to this window, so messages are delivered to correct app
00141   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00142   m_wndFormatBar.EnableDocking(CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM);
00143
00144   COleCntrFrameWndEx* pFrame = DYNAMIC_DOWNCAST (COleCntrFrameWndEx, m_pMainFrame);
00145   if (pFrame == NULL)
00146   {
00147     return FALSE;
00148   }
00149
00150   ASSERT_VALID (pFrame);
00151
00152   pFrame->EnableDocking(CBRS_ALIGN_ANY);
00153   pFrame->DockPane(&m_wndToolBar);
00154   pFrame->DockPane(&m_wndFormatBar);
00155
00156   m_wndToolBar.SetOwner(this);
00157   m_wndFormatBar.SetOwner(this);
00158   m_wndRulerBar.SetOwner(this);
00159   OnBarState(1, RD_EMBEDDED); //load bar state
00160   return TRUE;
00161 }
00162
00163 BOOL CInPlaceFrame::CreateMenuBar()
00164 {
00165   //----------------------------------------------
00166   // Create menu bar (replaces the standard menu):
00167   //----------------------------------------------
00168   if (!m_wndMenuBar.Create (this, WS_CHILD | WS_VISIBLE | CBRS_TOP, uiMenuBarId))
00169   {
00170     TRACE0("Failed to create menubar\n");
00171     return FALSE;
00172   }
00173
00174   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() |
00175     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC | CBRS_GRIPPER | CBRS_BORDER_3D);
00176
00177   CString str;
00178   BOOL bValidString;
00179   bValidString = str.LoadString(IDS_TITLE_MENUBAR);
00180   ASSERT(bValidString);
00181
00182   m_wndMenuBar.SetWindowText(str);
00183   return TRUE;
00184 }
00185
00186 BOOL CInPlaceFrame::CreateToolBar(CWnd* pWndFrame)
00187 {
00188   // Create toolbar on client's frame window
00189   ASSERT(m_wndToolBar.m_hWnd == NULL);
00190   int nPen = GetSystemMetrics(SM_PENWINDOWS) ? NUM_PEN_TOGGLE :
00191     NUM_PEN_ITEMS;
00192
00193   if (!m_wndToolBar.Create(pWndFrame, WS_CHILD|WS_VISIBLE|CBRS_TOP|
00194       CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC | CBRS_GRIPPER | CBRS_BORDER_3D)||
00195     !m_wndToolBar.LoadBitmap(IDR_SRVR_INPLACE) ||
00196     !m_wndToolBar.SetButtons(toolButtons,
00197       sizeof(toolButtons)/sizeof(UINT) - nPen))
00198   {
00199     TRACE0("Failed to create toolbar\n");
00200     return FALSE;      // fail to create
00201   }
00202
00203   CString str;
00204   BOOL bValidString;
00205   bValidString = str.LoadString(IDS_TITLE_TOOLBAR);
00206   ASSERT(bValidString);
00207
00208   m_wndToolBar.SetWindowText(str);
00209   return TRUE;
00210 }
00211
00212 BOOL CInPlaceFrame::CreateFormatBar(CWnd* pWndFrame)
00213 {
00214   ASSERT(m_wndFormatBar.m_hWnd == NULL);
00215   m_wndFormatBar.m_hWndOwner = m_hWnd;
00216
00217   if (!m_wndFormatBar.Create(pWndFrame, WS_CHILD|WS_VISIBLE|CBRS_TOP|
00218     CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC | CBRS_GRIPPER | CBRS_BORDER_3D,
00219     ID_VIEW_FORMATBAR) ||
00220     !m_wndFormatBar.LoadBitmap(IDB_FORMATBAR) ||
00221     !m_wndFormatBar.SetButtons(format,
00222       sizeof(format)/sizeof(UINT)))
00223   {
00224     TRACE0("Failed to create FormatBar\n");
00225     return FALSE;      // fail to create
00226   }
00227
00228   CString str;
00229   BOOL bValidString;
00230   bValidString = str.LoadString(IDS_TITLE_FORMATBAR);
00231   ASSERT(bValidString);
00232
00233   m_wndFormatBar.SetWindowText(str);
00234   return TRUE;
00235 }
00236
00237 BOOL CInPlaceFrame::CreateRulerBar(CWnd* pWndFrame)
00238 {
00239   if (!m_wndRulerBar.Create(pWndFrame,
00240     WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP|CBRS_HIDE_INPLACE, ID_VIEW_RULER))
00241   {
00242     TRACE0("Failed to create ruler\n");
00243     return FALSE;      // fail to create
00244   }
00245   return TRUE;
00246 }
00247
00248 /////////////////////////////////////////////////////////////////////////////
00249 // CInPlaceFrame Operations
00250
00251 /////////////////////////////////////////////////////////////////////////////
00252 // CInPlaceFrame diagnostics
00253
00254 #ifdef _DEBUG
00255 void CInPlaceFrame::AssertValid() const
00256 {
00257   COleIPFrameWndEx::AssertValid();
00258 }
00259
00260 void CInPlaceFrame::Dump(CDumpContext& dc) const
00261 {
00262   COleIPFrameWndEx::Dump(dc);
00263 }
00264 #endif //_DEBUG
00265
00266 /////////////////////////////////////////////////////////////////////////////
00267 // CInPlaceFrame commands
00268
00269 void CInPlaceFrame::OnDestroy()
00270 {
00271   m_wndToolBar.DestroyWindow();
00272   m_wndFormatBar.DestroyWindow();
00273   COleIPFrameWndEx::OnDestroy();
00274 }
00275
00276 void CInPlaceFrame::RepositionFrame(LPCRECT lpPosRect, LPCRECT lpClipRect)
00277 {
00278   CRect rectNew = lpPosRect;
00279   rectNew.left -= HORZ_TEXTOFFSET;
00280   rectNew.top -= VERT_TEXTOFFSET;
00281   m_wndResizeBar.BringWindowToTop();
00282   COleIPFrameWndEx::RepositionFrame(&rectNew, lpClipRect);
00283   CWnd* pWnd = GetActiveView();
00284   if (pWnd != NULL)
00285     pWnd->BringWindowToTop();
00286   m_wndRulerBar.BringWindowToTop();
00287 }
00288
00289 void CInPlaceFrame::RecalcLayout(BOOL bNotify)
00290 {
00291   if (m_wndResizeBar.m_hWnd != NULL)
00292     m_wndResizeBar.BringWindowToTop();
00293   COleIPFrameWndEx::RecalcLayout(bNotify);
00294   CWnd* pWnd = GetActiveView();
00295   if (pWnd != NULL)
00296     pWnd->BringWindowToTop();
00297   if (m_wndRulerBar.m_hWnd != NULL)
00298     m_wndRulerBar.BringWindowToTop();
00299
00300   // at least 12 pt region plus ruler if it exists
00301   CDisplayIC dc;
00302   CSize size;
00303   size.cy = MulDiv(12, dc.GetDeviceCaps(LOGPIXELSY), 72)+1;
00304   size.cx = dc.GetDeviceCaps(LOGPIXELSX)/4; // 1/4"
00305   size.cx += HORZ_TEXTOFFSET; //adjust for offset
00306   size.cy += VERT_TEXTOFFSET;
00307   if (m_wndRulerBar.m_hWnd != NULL && m_wndRulerBar.IsVisible())
00308   {
00309     CRect rect;
00310     m_wndRulerBar.GetWindowRect(&rect);
00311     size.cy += rect.Height();
00312   }
00313   m_wndResizeBar.SetMinSize(size);
00314 }
00315
00316 void CInPlaceFrame::CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType)
00317 {
00318   COleIPFrameWndEx::CalcWindowRect(lpClientRect, nAdjustType);
00319 }
00320
00321 LRESULT CInPlaceFrame::OnResizeChild(WPARAM /*wParam*/, LPARAM lParam)
00322 {
00323   // notify the container that the rectangle has changed!
00324   CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
00325   if (pDoc == NULL)
00326     return 0;
00327
00328   ASSERT(pDoc->IsKindOf(RUNTIME_CLASS(CWordPadDoc)));
00329
00330   // get new rect and parent
00331   CRect rectNew;
00332   rectNew.CopyRect((LPCRECT)lParam);
00333   CWnd* pParentWnd = GetParent();
00334   ASSERT_VALID(pParentWnd);
00335
00336   // convert rectNew relative to pParentWnd
00337   ClientToScreen(&rectNew);
00338   pParentWnd->ScreenToClient(&rectNew);
00339
00340   if (m_wndRulerBar.GetStyle()&WS_VISIBLE)
00341   {
00342     CRect rect;
00343     m_wndRulerBar.GetWindowRect(&rect);
00344     rectNew.top += rect.Height();
00345   }
00346   rectNew.left += HORZ_TEXTOFFSET;
00347   rectNew.top += VERT_TEXTOFFSET;
00348
00349   // adjust the new rectangle for the current control bars
00350   CWnd* pLeftOver = GetDlgItem(AFX_IDW_PANE_FIRST);
00351   ASSERT(pLeftOver != NULL);
00352   if (pLeftOver != NULL)
00353   {
00354     CRect rectCur = m_rectPos;
00355     pLeftOver->CalcWindowRect(&rectCur, CWnd::adjustOutside);
00356     rectNew.left += m_rectPos.left - rectCur.left;
00357     rectNew.top += m_rectPos.top - rectCur.top;
00358     rectNew.right -= rectCur.right - m_rectPos.right;
00359     rectNew.bottom -= rectCur.bottom - m_rectPos.bottom;
00360     OnRequestPositionChange(rectNew);
00361   }
00362
00363   return 0;
00364 }
00365
00366 LRESULT CInPlaceFrame::OnBarState(WPARAM wParam, LPARAM lParam)
00367 {
00368   if (lParam == -1)
00369     return 0L;
00370   if (wParam == 0)
00371   {
00372     GetDockState(theApp.GetDockState(RD_EMBEDDED));
00373     ASSERT(m_pMainFrame != NULL);
00374     if (m_pMainFrame != NULL)
00375     {
00376       m_pMainFrame->GetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
00377     }
00378   }
00379   else
00380   {
00381     SetDockState(theApp.GetDockState(RD_EMBEDDED));
00382     m_pMainFrame->SetDockState(theApp.GetDockState(RD_EMBEDDED, FALSE));
00383   }
00384   return 0L;
00385 }
00386
00387 void CInPlaceFrame::OnHelpFinder()
00388 {
00389   theApp.WinHelp(0, HELP_FINDER);
00390 }
00391
00392 void CInPlaceFrame::OnPenToggle()
00393 {
00394   static int nPen = 0;
00395   m_wndToolBar.SetButtons(toolButtons, sizeof(toolButtons)/sizeof(UINT) - nPen);
00396   nPen = (nPen == 0) ? NUM_PEN_TOGGLE : 0;
00397   m_wndToolBar.Invalidate();
00398   m_wndToolBar.GetParentFrame()->RecalcLayout();
00399 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/datedial.h Source File

  • ole
  • wordpad

datedial.h

Go to the documentation of this file.
00001 // datedial.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CDateDialog dialog
00014
00015 class CDateDialog : public CCSDialog
00016 {
00017 // Construction
00018 public:
00019   CDateDialog(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Attributes
00022   static SYSTEMTIME m_time;
00023   static LCID m_id;
00024   static CListBox* m_pListBox;
00025   static BOOL CALLBACK DateFmtEnumProc(LPTSTR lpszFormatString);
00026   static BOOL CALLBACK TimeFmtEnumProc(LPTSTR lpszFormatString);
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CDateDialog)
00030   enum { IDD = IDD_DATEDIALOG };
00031   CListBox    m_listBox;
00032   CString m_strSel;
00033   //}}AFX_DATA
00034
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CDateDialog)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 protected:
00045   static const DWORD m_nHelpIDs[];
00046   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00047
00048   // Generated message map functions
00049   //{{AFX_MSG(CDateDialog)
00050   virtual BOOL OnInitDialog();
00051   afx_msg void OnDblclkDatedialogList();
00052   //}}AFX_MSG
00053   DECLARE_MESSAGE_MAP()
00054 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/PreviewPane.cpp Source File

  • vc2008fp
  • OutlookDemo

PreviewPane.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "PreviewPane.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 const int nHorzMargin = 2;
00021 const int nVertMargin = 2;
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CPreviewPane
00025
00026 IMPLEMENT_DYNCREATE(CPreviewPane, CView)
00027
00028 CPreviewPane::CPreviewPane()
00029 {
00030 }
00031
00032 CPreviewPane::~CPreviewPane()
00033 {
00034 }
00035
00036 BEGIN_MESSAGE_MAP(CPreviewPane, CView)
00037   ON_WM_ERASEBKGND()
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CPreviewPane drawing
00042
00043 void CPreviewPane::OnDraw(CDC* pDC)
00044 {
00045   CRect rectClient;
00046   GetClientRect(rectClient);
00047
00048   CRect rectCaption = rectClient;
00049   rectCaption.bottom = rectCaption.top + afxGlobalData.GetTextHeight() + 4;
00050
00051   CRect rectMessage = rectClient;
00052   rectMessage.top = rectCaption.bottom;
00053
00054   pDC->FillRect(rectCaption, &afxGlobalData.brBarFace);
00055   pDC->FillRect(rectMessage, &afxGlobalData.brWindow);
00056
00057   int nOldBkMode = pDC->SetBkMode(TRANSPARENT);
00058   COLORREF clrOldText = pDC->SetTextColor(afxGlobalData.clrBarText);
00059   CFont* pOldFont = (CFont*) pDC->SelectStockObject(DEFAULT_GUI_FONT);
00060
00061   CRect rectText = rectCaption;
00062   rectText.left += 2 * nHorzMargin;
00063   rectText.right -= 2 * nHorzMargin + rectText.Height();
00064
00065   CString strCaption = _T("Preview area...");
00066   pDC->DrawText(strCaption, rectText, DT_END_ELLIPSIS | DT_SINGLELINE | DT_VCENTER);
00067
00068   pDC->SetTextColor(afxGlobalData.clrWindowText);
00069
00070   rectText = rectMessage;
00071   rectText.DeflateRect(nHorzMargin, nVertMargin);
00072
00073   CString strText = _T("Message body");
00074   pDC->DrawText(strText, rectText, DT_WORDBREAK | DT_END_ELLIPSIS);
00075
00076   pDC->SelectObject(pOldFont);
00077   pDC->SetTextColor(clrOldText);
00078   pDC->SetBkMode(nOldBkMode);
00079 }
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CPreviewPane diagnostics
00083
00084 #ifdef _DEBUG
00085 void CPreviewPane::AssertValid() const
00086 {
00087   CView::AssertValid();
00088 }
00089
00090 void CPreviewPane::Dump(CDumpContext& dc) const
00091 {
00092   CView::Dump(dc);
00093 }
00094 #endif //_DEBUG
00095
00096 /////////////////////////////////////////////////////////////////////////////
00097 // CPreviewPane message handlers
00098
00099 BOOL CPreviewPane::OnEraseBkgnd(CDC* /*pDC*/)
00100 {
00101   return TRUE;
00102 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoView.h Source File

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CVisualStudioDemoView : public CEditView
00013 {
00014 protected: // create from serialization only
00015   CVisualStudioDemoView();
00016   DECLARE_DYNCREATE(CVisualStudioDemoView)
00017
00018   // Attributes
00019 public:
00020   CVisualStudioDemoDoc* GetDocument() const;
00021
00022   // Operations
00023 public:
00024
00025   // Overrides
00026 public:
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028 protected:
00029   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00030   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00031   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00032
00033   // Implementation
00034 public:
00035   virtual ~CVisualStudioDemoView();
00036 #ifdef _DEBUG
00037   virtual void AssertValid() const;
00038   virtual void Dump(CDumpContext& dc) const;
00039 #endif
00040
00041 private:
00042   void VerifyFindString(CMFCToolBarComboBoxButton* pFindCombo, CString& strFindText);
00043 protected:
00044   DECLARE_MESSAGE_MAP()
00045 public:
00046   afx_msg void OnEditTogglebreakpoint();
00047   afx_msg void OnFind();
00048   afx_msg void OnFilePrintPreview();
00049 };
00050
00051 #ifndef _DEBUG  // debug version in VisualStudioDemoView.cpp
00052 inline CVisualStudioDemoDoc* CVisualStudioDemoView::GetDocument() const { return reinterpret_cast<CVisualStudioDemoDoc*>(m_pDocument); }
00053 #endif
00054
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInsertControlDlg Member List

This is the complete list of members for CInsertControlDlg, including all inherited members.
CInsertControlDlg(CWnd *pParent=NULL) | CInsertControlDlg |
DoDataExchange(CDataExchange *pDX) | CInsertControlDlg | [protected, virtual]
IDD enum value | CInsertControlDlg |
m_aImplementedCategories | CInsertControlDlg | [protected]
m_aRequiredCategories | CInsertControlDlg | [protected]
m_butIgnoreRequiredCategories | CInsertControlDlg |
m_butOK | CInsertControlDlg |
m_butRequiredCategories | CInsertControlDlg |
m_clsid | CInsertControlDlg |
m_lbControls | CInsertControlDlg |
m_lControls | CInsertControlDlg | [protected]
m_pCatInfo | CInsertControlDlg | [protected]
m_staticServerPath | CInsertControlDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CInsertControlDlg | [protected]
OnControlsDblClk() | CInsertControlDlg | [protected]
OnControlsSelChange() | CInsertControlDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CInsertControlDlg | [protected]
OnIgnoreRequiredCategories() | CInsertControlDlg | [protected]
OnImplementedCategories() | CInsertControlDlg | [protected]
OnInitDialog() | CInsertControlDlg | [protected, virtual]
OnRequiredCategories() | CInsertControlDlg | [protected]
RefreshControlList() | CInsertControlDlg | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autodriv.h Source File

  • ole
  • autoclik
  • autodriv

autodriv.h

Go to the documentation of this file.
00001 // autodriv.h : main header file for the AUTODRIV application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CAutoDrivApp:
00020 // See autodriv.cpp for the implementation of this class
00021 //
00022
00023 class CAutoDrivApp : public CWinApp
00024 {
00025 public:
00026   CAutoDrivApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CAutoDrivApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CAutoDrivApp)
00038     // NOTE - the ClassWizard will add and remove member functions here.
00039     //    DO NOT EDIT what you see in these blocks of generated code !
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/preview.cpp Source File

  • general
  • propdlg

preview.cpp

Go to the documentation of this file.
00001 // preview.cpp : implementation of the CModalShapePropSheet class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "preview.h"
00014 #include "resource.h"
00015 #include "colorpge.h"
00016 #include "stylepge.h"
00017 #include "shapeobj.h"
00018 #include "propsht.h"
00019
00020 BEGIN_MESSAGE_MAP(CShapePreviewWnd, CWnd)
00021 //{{AFX_MSG_MAP(CShapePreviewWnd)
00022   ON_WM_PAINT()
00023   ON_WM_ERASEBKGND()
00024 //}}AFX_MSG_MAP
00025 END_MESSAGE_MAP()
00026
00027 CShapePreviewWnd::CShapePreviewWnd()
00028 {
00029 }
00030
00031 void CShapePreviewWnd::OnPaint()
00032 {
00033   CPaintDC dc(this);
00034   CModalShapePropSheet* pShapePropSheet =
00035     STATIC_DOWNCAST(CModalShapePropSheet, GetParent());
00036   CRect rect;
00037   GetClientRect(rect);
00038   CShape shape(
00039     (SHAPE_COLOR_ENUM)pShapePropSheet->m_colorPage.m_nColor,
00040     (SHAPE_STYLE)pShapePropSheet->m_stylePage.m_nShapeStyle,
00041     rect);
00042   shape.Draw(&dc, FALSE);
00043 }
00044
00045 BOOL CShapePreviewWnd::OnEraseBkgnd(CDC* pDC)
00046 {
00047   // Use the same background color as that of the dialog
00048   //  (property sheet).
00049
00050   CWnd* pParentWnd = GetParent();
00051   HBRUSH hBrush = (HBRUSH)pParentWnd->SendMessage(WM_CTLCOLORDLG,
00052     (WPARAM)pDC->m_hDC, (LPARAM)pParentWnd->m_hWnd);
00053   CRect rect;
00054   GetClientRect(rect);
00055   pDC->FillRect(&rect, CBrush::FromHandle(hBrush));
00056   return TRUE;
00057 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/stdafx.cpp Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // FileDlgWatcher.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/stdafx.cpp Source File

  • ole
  • autoclik

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  AutoClik.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/CTaskDialogDemoDlg.cpp Source File

  • general
  • CTaskDialog

CTaskDialogDemoDlg.cpp

Go to the documentation of this file.
00001 // TaskDialogTestDlg.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005 #include "CTaskDialogDemo.h"
00006 #include "CTaskDialogDemoDlg.h"
00007
00008 #include <afxtaskdialog.h>
00009
00010 #ifdef _DEBUG
00011 #define new DEBUG_NEW
00012 #endif
00013
00014 CTaskDialogTestDlg::CTaskDialogTestDlg(CWnd* pParent /*=NULL*/)
00015   : CDialog(CTaskDialogTestDlg::IDD, pParent)
00016 {
00017   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00018 }
00019
00020 void CTaskDialogTestDlg::DoDataExchange(CDataExchange* pDX)
00021 {
00022   CDialog::DoDataExchange(pDX);
00023 }
00024
00025 BEGIN_MESSAGE_MAP(CTaskDialogTestDlg, CDialog)
00026   ON_WM_PAINT()
00027   ON_WM_QUERYDRAGICON()
00028   //}}AFX_MSG_MAP
00029   ON_BN_CLICKED(IDC_BUTTON1, &CTaskDialogTestDlg::OnBnClickedButton1)
00030   ON_BN_CLICKED(IDC_BUTTON2, &CTaskDialogTestDlg::OnBnClickedButton2)
00031   ON_BN_CLICKED(IDC_BUTTON3, &CTaskDialogTestDlg::OnBnClickedButton3)
00032   ON_STN_CLICKED(IDC_RADIO_ID, &CTaskDialogTestDlg::OnStnClickedRadioId)
00033   ON_BN_CLICKED(IDC_BUTTON6, &CTaskDialogTestDlg::OnBnClickedButton6)
00034   ON_BN_CLICKED(IDC_BUTTON4, &CTaskDialogTestDlg::OnBnClickedButton4)
00035   ON_BN_CLICKED(IDC_BUTTON5, &CTaskDialogTestDlg::OnBnClickedButton5)
00036   ON_BN_CLICKED(IDC_BUTTON7, &CTaskDialogTestDlg::OnBnClickedButton7)
00037   ON_BN_CLICKED(IDC_BUTTON8, &CTaskDialogTestDlg::OnBnClickedButton8)
00038 END_MESSAGE_MAP()
00039
00040
00041 // CTaskDialogTestDlg message handlers
00042
00043 BOOL CTaskDialogTestDlg::OnInitDialog()
00044 {
00045   CDialog::OnInitDialog();
00046
00047   // Set the icon for this dialog.  The framework does this automatically
00048   //  when the application's main window is not a dialog
00049   SetIcon(m_hIcon, TRUE);     // Set big icon
00050   SetIcon(m_hIcon, FALSE);    // Set small icon
00051
00052   // TODO: Add extra initialization here
00053
00054   return TRUE;  // return TRUE  unless you set the focus to a control
00055 }
00056
00057 // If you add a minimize button to your dialog, you will need the code below
00058 //  to draw the icon.  For MFC applications using the document/view model,
00059 //  this is automatically done for you by the framework.
00060
00061 void CTaskDialogTestDlg::OnPaint()
00062 {
00063   if (IsIconic())
00064   {
00065     CPaintDC dc(this); // device context for painting
00066
00067     SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
00068
00069     // Center icon in client rectangle
00070     int cxIcon = GetSystemMetrics(SM_CXICON);
00071     int cyIcon = GetSystemMetrics(SM_CYICON);
00072     CRect rect;
00073     GetClientRect(&rect);
00074     int x = (rect.Width() - cxIcon + 1) / 2;
00075     int y = (rect.Height() - cyIcon + 1) / 2;
00076
00077     // Draw the icon
00078     dc.DrawIcon(x, y, m_hIcon);
00079   }
00080   else
00081   {
00082     CDialog::OnPaint();
00083   }
00084 }
00085
00086 // The system calls this function to obtain the cursor to display while the user drags
00087 //  the minimized window.
00088 HCURSOR CTaskDialogTestDlg::OnQueryDragIcon()
00089 {
00090   return static_cast<HCURSOR>(m_hIcon);
00091 }
00092
00093
00094 void CTaskDialogTestDlg::OnBnClickedButton1()
00095 {
00096   CTaskDialog dlg(_T("A CTaskDialog presents information in a clear and consistent way."),
00097       _T("How much do you like CTaskDialog?"), _T("Sample CTaskDialog"),
00098         TDCBF_YES_BUTTON | TDCBF_NO_BUTTON, TDF_ENABLE_HYPERLINKS | TDF_ALLOW_DIALOG_CANCELLATION, _T("I hope you like it very much!"));
00099
00100   INT_PTR nResult = dlg.DoModal();
00101
00102   SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
00103 }
00104
00105 void CTaskDialogTestDlg::OnBnClickedButton2()
00106 {
00107   CProgressBarTaskDialog dlg;
00108   INT_PTR nResult = dlg.DoModal();
00109
00110   SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
00111 }
00112
00113 void CTaskDialogTestDlg::OnBnClickedButton3()
00114 {
00115
00116   CTaskDialog dlg(_T("A CTaskDialog presents information in a clear and consistent way."),
00117       _T("How much do you like CTaskDialog?"), _T("Sample CTaskDialog"), 0,
00118       TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS , _T("I hope you like it!"));
00119
00120   dlg.AddCommandControl( 10, _T("&Use it!\nIt's the best dialog you can have!"));
00121   dlg.AddCommandControl( 20, _T("&Maybe?\nDon't you want to try it?"));
00122   dlg.AddCommandControl( 25, _T("&No way!\nI'm not going to use it!"));
00123
00124   dlg.AddRadioButton( 3, _T("Lots"));
00125   dlg.AddRadioButton( 7, _T("A little"));
00126   dlg.AddRadioButton( 4, _T("Not at all"));
00127
00128     dlg.SetMainIcon(TD_SHIELD_ICON);
00129   dlg.SetFooterIcon(TD_INFORMATION_ICON);
00130
00131   INT_PTR nResult = dlg.DoModal();
00132
00133   SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
00134 }
00135
00136
00137 void CTaskDialogTestDlg::OnStnClickedRadioId()
00138 {
00139   // TODO: Add your control notification handler code here
00140 }
00141
00142 void CTaskDialogTestDlg::OnBnClickedButton6()
00143 {
00144   CTaskDialog dlg(_T("Should we replace MessageBox by CTaskDialog?"), _T(""), _T("Usage as MessageBox"),
00145    TDCBF_YES_BUTTON, TDF_ENABLE_HYPERLINKS);
00146
00147   INT_PTR nResult = dlg.DoModal();
00148
00149   SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
00150 }
00151
00152 void CTaskDialogTestDlg::OnBnClickedButton4()
00153 {
00154   CTaskDialog dlg(_T("A CTaskDialog presents information in a clear and consistent way and if you want to get more information go to <a href=\"http://microsoft.com\">http://microsoft.com</a>. Where can you get some useful information?"),
00155     _T("How much do you like CTaskDialog?"), _T("Loading from resources"),
00156     IDS_BUTTON, IDS_END_BUTTON , 0, TDF_ENABLE_HYPERLINKS | TDF_USE_COMMAND_LINKS,
00157     _T("I hope you like it!"));
00158
00159   dlg.SetFooterIcon(TD_INFORMATION_ICON);
00160   dlg.SetMainIcon(TD_INFORMATION_ICON);
00161   dlg.LoadRadioButtons(IDS_RADIO_START, IDS_RADIO_END);
00162
00163   INT_PTR nResult = dlg.DoModal();
00164
00165   SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
00166 }
00167
00168 void CTaskDialogTestDlg::OnBnClickedButton5()
00169 {
00170   CMargueeTaskDialog dlg;
00171   INT_PTR nResult = dlg.DoModal();
00172
00173   SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
00174 }
00175
00176 void CTaskDialogTestDlg::OnBnClickedButton8()
00177 {
00178   CWizardDialog dlg;
00179
00180   INT_PTR nResult = dlg.DoModal();
00181
00182   SetControls(nResult, dlg.GetSelectedRadioButtonID(), dlg.GetVerificationCheckboxState());
00183 }
00184
00185 void CTaskDialogTestDlg::OnBnClickedButton7()
00186 {
00187   INT_PTR nResult = CTaskDialog::ShowDialog(
00188       _T("Don't spend to much time on code, write only one line and get your CTaskDialog!"),
00189       _T("Where do you like to go?"),
00190       _T("One line command"), IDS_RADIO_START, IDS_RADIO_START + 3, TDCBF_CANCEL_BUTTON);
00191
00192   SetControls(nResult, 0, FALSE);
00193 }
00194
00195 void CTaskDialogTestDlg::SetControls(INT_PTR nResult, int nRadioButtonId, BOOL bChecked)
00196 {
00197   CString strTmp;
00198   strTmp.Format(_T("%d"), nResult);
00199   SetDlgItemText(IDC_NEW_BUTTON, strTmp);
00200
00201   strTmp.Format(_T("%d"), nRadioButtonId);
00202   SetDlgItemText(IDC_RADIO_ID, strTmp);
00203
00204   CheckDlgButton(IDC_CHECK, bChecked ? BST_CHECKED : BST_UNCHECKED);
00205 }
00206
00207
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/srvritem.h Source File

  • ole
  • wordpad

srvritem.h

Go to the documentation of this file.
00001 // srvritem.h : interface of the CWordPadSrvrItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CWordPadDoc;
00013 class CWordPadView;
00014
00015 class CEmbeddedItem : public COleServerItem
00016 {
00017 public:
00018   using COleServerItem::OnDrawEx;
00019
00020   DECLARE_DYNAMIC(CEmbeddedItem)
00021
00022 // Constructors
00023 public:
00024   CEmbeddedItem(CWordPadDoc* pContainerDoc, int nBeg = 0, int nEnd = -1);
00025
00026 // Attributes
00027   int m_nBeg;
00028   int m_nEnd;
00029   LPDATAOBJECT m_lpRichDataObj;
00030   CWordPadDoc* GetDocument() const
00031     { return (CWordPadDoc*) COleServerItem::GetDocument(); }
00032   CWordPadView* GetView() const;
00033
00034 // Implementation
00035 public:
00036   BOOL OnDrawEx(CDC* pDC, CSize& rSize, BOOL bOutput);
00037   virtual BOOL OnDraw(CDC* pDC, CSize& rSize);
00038   virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize);
00039
00040 protected:
00041   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00042 };
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/stdafx.cpp Source File

  • ole
  • calcdriv

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawvw.h Source File

  • vc2008fp
  • DrawClient

drawvw.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // Hints for UpdateAllViews/OnUpdate
00013 #define HINT_UPDATE_WINDOW      0
00014 #define HINT_UPDATE_DRAWOBJ     1
00015 #define HINT_UPDATE_SELECTION   2
00016 #define HINT_DELETE_SELECTION   3
00017 #define HINT_UPDATE_OLE_ITEMS   4
00018
00019 class CDrawObj;
00020
00021 class CDrawView : public CScrollView
00022 {
00023   friend class CDrawObjFriend;
00024
00025 protected: // create from serialization only
00026   CDrawView();
00027   DECLARE_DYNCREATE(CDrawView)
00028
00029 // Attributes
00030 public:
00031   CDrawDoc* GetDocument()
00032   { return(CDrawDoc*)m_pDocument; }
00033   void SetPageSize(CSize size);
00034   CRect GetInitialPosition();
00035
00036 // Operations
00037 public:
00038   void DocToClient(CRect& rect);
00039   void DocToClient(CPoint& point);
00040   void ClientToDoc(CPoint& point);
00041   void ClientToDoc(CRect& rect);
00042   void Select(CDrawObj* pObj, BOOL bAdd = FALSE);
00043   void SelectWithinRect(CRect rect, BOOL bAdd = FALSE);
00044   void Deselect(CDrawObj* pObj);
00045   void CloneSelection();
00046   void UpdateActiveItem();
00047   void InvalObj(CDrawObj* pObj);
00048   void Remove(CDrawObj* pObj);
00049   void PasteNative(COleDataObject& dataObject);
00050   void PasteEmbedded(COleDataObject& dataObject, CPoint point );
00051
00052   void PreviewFillColor(COLORREF color);
00053   void PreviewLineColor(COLORREF color);
00054   void PreviewLineWeight(int nWeight);
00055
00056   void PreviewStyle(COLORREF clrFill, COLORREF clrLine);
00057
00058   void StorePreviewState();
00059   void RestorePreviewState(BOOL bReset = TRUE);
00060   void ResetPreviewState();
00061
00062 // Implementation
00063 protected:
00064   // added for drop-target functionality
00065   COleDropTarget m_dropTarget;        // for drop target functionality
00066   CPoint m_dragPoint;                 // current position
00067   CSize m_dragSize;                   // size of dragged object
00068   CSize m_dragOffset;                 // offset between pt and drag object corner
00069   DROPEFFECT m_prevDropEffect;
00070   BOOL m_bDragDataAcceptable;
00071
00072   BOOL GetObjectInfo(COleDataObject* pDataObject, CSize* pSize, CSize* pOffset);
00073   // end of drop-target additions
00074
00075   struct XPreviewStateItem
00076   {
00077     BOOL m_bPen;
00078     LOGPEN m_logpen;
00079     BOOL m_bBrush;
00080     LOGBRUSH m_logbrush;
00081
00082     XPreviewStateItem(const CDrawObj& rObj)
00083     {
00084       Store(rObj);
00085     }
00086
00087     void Store(const CDrawObj& rObj);
00088     void Restore(CDrawObj& rObj) const;
00089   };
00090   typedef CArray<XPreviewStateItem*, XPreviewStateItem*> XPreviewState;
00091
00092   XPreviewState m_PreviewState;
00093
00094 public:
00095   virtual ~CDrawView();
00096 #ifdef _DEBUG
00097   virtual void AssertValid() const;
00098   virtual void Dump(CDumpContext& dc) const;
00099 #endif
00100
00101   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);  // overriden to record time/date
00102   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00103   virtual void OnActivateView(BOOL bActivate, CView* pActiveView, CView* pDeactiveView);
00104   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00105   virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo);
00106   virtual BOOL OnScrollBy(CSize sizeScroll, BOOL bDoScroll);
00107   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00108   void DrawGrid(CDC* pDC);
00109
00110   // added for drop-target functionality
00111   virtual BOOL OnDrop(COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
00112   virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject, DWORD grfKeyState, CPoint point);
00113   virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject, DWORD grfKeyState, CPoint point);
00114   virtual void OnDragLeave();
00115   static CLIPFORMAT m_cfObjectDescriptor;
00116   // end of drop-target additions
00117
00118   static CLIPFORMAT m_cfDraw; // custom clipboard format
00119
00120   CDrawObjList m_selection;
00121   BOOL m_bGrid;
00122   COLORREF m_gridColor;
00123   BOOL m_bActive; // is the view active?
00124
00125 protected:
00126   virtual void OnInitialUpdate(); // called first time after construct
00127
00128   // Printing support
00129   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00130   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00131   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00132
00133   // OLE Container support
00134 public:
00135   virtual BOOL IsSelected(const CObject* pDocItem) const;
00136
00137 protected:
00138   //{{AFX_MSG(CDrawView)
00139   afx_msg void OnInsertObject();
00140   afx_msg void OnCancelEdit();
00141   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00142   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00143   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00144   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00145   afx_msg void OnDrawSelect();
00146   afx_msg void OnDrawRoundRect();
00147   afx_msg void OnDrawRect();
00148   afx_msg void OnDrawLine();
00149   afx_msg void OnDrawEllipse();
00150   afx_msg void OnUpdateDrawEllipse(CCmdUI* pCmdUI);
00151   afx_msg void OnUpdateDrawLine(CCmdUI* pCmdUI);
00152   afx_msg void OnUpdateDrawRect(CCmdUI* pCmdUI);
00153   afx_msg void OnUpdateDrawRoundRect(CCmdUI* pCmdUI);
00154   afx_msg void OnUpdateDrawSelect(CCmdUI* pCmdUI);
00155   afx_msg void OnUpdateSingleSelect(CCmdUI* pCmdUI);
00156   afx_msg void OnEditSelectAll();
00157   afx_msg void OnEditClear();
00158   afx_msg void OnUpdateAnySelect(CCmdUI* pCmdUI);
00159   afx_msg void OnDrawPolygon();
00160   afx_msg void OnUpdateDrawPolygon(CCmdUI* pCmdUI);
00161   afx_msg void OnSize(UINT nType, int cx, int cy);
00162   afx_msg void OnViewGrid();
00163   afx_msg void OnUpdateViewGrid(CCmdUI* pCmdUI);
00164   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00165   afx_msg void OnObjectFillColor();
00166   afx_msg void OnUpdateObjectFillColor(CCmdUI* pCmdUI);
00167   afx_msg void OnObjectNoFill();
00168   afx_msg void OnUpdateObjectNoFill(CCmdUI* pCmdUI);
00169   afx_msg void OnObjectLineColor();
00170   afx_msg void OnUpdateObjectLineColor(CCmdUI* pCmdUI);
00171   afx_msg void OnObjectNoLine();
00172   afx_msg void OnUpdateObjectNoLine(CCmdUI* pCmdUI);
00173   afx_msg void OnObjectLineWeight(UINT nID);
00174   afx_msg void OnUpdateObjectLineWeight(CCmdUI* pCmdUI);
00175   afx_msg void OnObjectProperties();
00176   afx_msg void OnUpdateObjectProperties(CCmdUI* pCmdUI);
00177   afx_msg void OnObjectStyles();
00178   afx_msg void OnUpdateObjectStyles(CCmdUI* pCmdUI);
00179   afx_msg void OnObjectMoveBack();
00180   afx_msg void OnObjectMoveForward();
00181   afx_msg void OnObjectMoveToBack();
00182   afx_msg void OnObjectMoveToFront();
00183   afx_msg void OnEditCopy();
00184   afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
00185   afx_msg void OnEditCut();
00186   afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI);
00187   afx_msg void OnEditPaste();
00188   afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
00189   afx_msg void OnFilePrint();
00190   afx_msg void OnSetFocus(CWnd* pOldWnd);
00191   afx_msg void OnViewShowObjects();
00192   afx_msg void OnUpdateViewShowObjects(CCmdUI* pCmdUI);
00193   afx_msg void OnDestroy();
00194   afx_msg void OnUpdateEditSelectAll(CCmdUI* pCmdUI);
00195   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00196   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00197   afx_msg void OnFilePrintPreview();
00198   afx_msg void OnUpdateSelection(CCmdUI* pCmdUI);
00199   //}}AFX_MSG
00200
00201   DECLARE_MESSAGE_MAP()
00202
00203 private:
00204   COLORREF GetColorFromColorButton(int nButtonID);
00205 };
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar2.cpp Source File

  • general
  • CmnCtrl1

toolbar2.cpp

Go to the documentation of this file.
00001 // ToolBar2.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "afxpriv.h"
00015 #include "CmnCtrl1.h"
00016 #include "Toolbar2.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CPaletteBar
00026
00027 CPaletteBar::CPaletteBar() : m_pTBButtons(NULL)
00028 {
00029
00030 }
00031
00032 CPaletteBar::~CPaletteBar()
00033 {
00034   delete []m_pTBButtons;
00035 }
00036
00037 BEGIN_MESSAGE_MAP(CPaletteBar, CToolBarCtrl)
00038   //{{AFX_MSG_MAP(CPaletteBar)
00039   ON_NOTIFY_RANGE( TTN_NEEDTEXTA, 0, 0xFFFF, OnNeedTextA)
00040   ON_NOTIFY_RANGE( TTN_NEEDTEXTW, 0, 0xFFFF, OnNeedTextW)
00041   //}}AFX_MSG_MAP
00042 END_MESSAGE_MAP()
00043
00044
00045 BOOL CPaletteBar::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID )
00046 {
00047   BOOL bRet = CToolBarCtrl::Create(dwStyle, rect, pParentWnd, nID);
00048
00049   m_nButtonCount = ID_ELLIPSE - ID_ERASE + 1;
00050
00051   VERIFY(AddBitmap(m_nButtonCount,IDR_PALETTEBAR) != -1);
00052
00053   m_pTBButtons = new TBBUTTON[m_nButtonCount];
00054
00055   int nIndex;
00056   for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
00057   {
00058     CString string;
00059     string.LoadString(nIndex + ID_ERASE);
00060
00061     // Add second '\0'
00062     int nStringLength = string.GetLength() + 1;
00063     TCHAR* pString = string.GetBufferSetLength(nStringLength);
00064     pString[nStringLength] = 0;
00065
00066     VERIFY((m_pTBButtons[nIndex].iString = AddStrings(pString)) != -1);
00067
00068     string.ReleaseBuffer();
00069
00070
00071     m_pTBButtons[nIndex].fsState = TBSTATE_ENABLED;
00072     m_pTBButtons[nIndex].fsStyle = TBSTYLE_CHECKGROUP;
00073     m_pTBButtons[nIndex].dwData = 0;
00074     m_pTBButtons[nIndex].iBitmap = nIndex;
00075     m_pTBButtons[nIndex].idCommand = nIndex + ID_ERASE;
00076
00077   }
00078
00079
00080   for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
00081   {
00082     VERIFY(AddButtons(1,&m_pTBButtons[nIndex]));
00083   }
00084
00085
00086   return bRet;
00087 }
00088
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CPaletteBar message handlers
00092
00093 // MFC routes the notifications sent to the parent of the control to
00094 // the control before the parent can process the notification.
00095 // The control object can handle the notification or ignore it.
00096 // If the notification is handled then return TRUE. Otherwise MFC
00097 // will route it to the parent of the control.
00098
00099 BOOL CPaletteBar::OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult)
00100 {
00101   if (message == WM_NOTIFY)
00102   {
00103     NMHDR *pNMHDR = (NMHDR *) lParam;
00104     switch (pNMHDR->code)
00105     {
00106     case TBN_BEGINADJUST :
00107       return BeginAdjust(wParam,  lParam,  pLResult);
00108
00109     case TBN_BEGINDRAG:
00110       return BeginDrag(wParam,  lParam,  pLResult);
00111
00112     case TBN_CUSTHELP:
00113       return CustomizeHelp(wParam,  lParam,  pLResult);
00114
00115     case TBN_ENDADJUST:
00116       return EndAdjust(wParam,  lParam,  pLResult);
00117
00118     case TBN_ENDDRAG:
00119       return EndDrag(wParam,  lParam,  pLResult);
00120
00121     case TBN_GETBUTTONINFO:
00122       return GetButtonInfo(wParam,  lParam,  pLResult);
00123
00124     case TBN_QUERYDELETE:
00125       return QueryDelete(wParam,  lParam,  pLResult);
00126
00127     case TBN_QUERYINSERT:
00128       return QueryInsert(wParam,  lParam,  pLResult);
00129
00130     case TBN_RESET:
00131       return Reset(wParam, lParam,  pLResult);
00132
00133     case TBN_TOOLBARCHANGE:
00134       return ToolBarChange(wParam, lParam, pLResult);
00135     }
00136   }
00137
00138   return CToolBarCtrl::OnChildNotify(message, wParam, lParam, pLResult);
00139 }
00140
00141 BOOL CPaletteBar::BeginAdjust(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* /*pLResult*/)
00142 {
00143   TRACE(_T("TBN_BEGINADJUST\n"));
00144
00145   // the customize dialog box is about to be displayed
00146
00147   // save toolbar state before customization using the dialog
00148   // Use this information to restore the state if reset button is pressed
00149   SaveState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Palette Tool Bar"));
00150
00151   return TRUE;
00152 }
00153
00154 BOOL CPaletteBar::BeginDrag(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00155 {
00156   TRACE(_T("TBN_BEGINDRAG\n"));
00157
00158   // we are not implementing custon drag and drop
00159   * pLResult = FALSE;
00160   return FALSE;
00161 }
00162
00163 BOOL CPaletteBar::CustomizeHelp(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* /*pLResult*/)
00164 {
00165   TRACE(_T("TBN_CUSTHELP\n"));
00166
00167   // Sample displays a message box but a valid help topic
00168   // can be displayed for the customize dialog for this toolbar
00169   AfxMessageBox(_T("Help not implemented!"));
00170
00171   return TRUE;
00172 }
00173
00174 BOOL CPaletteBar::EndAdjust(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* /*pLResult*/)
00175 {
00176   TRACE(_T("TBN_ENDADJUST\n"));
00177
00178   // the customize dialog box has been closed
00179
00180   return TRUE;
00181 }
00182
00183 BOOL CPaletteBar::EndDrag(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00184 {
00185   TRACE(_T("TBN_ENDDRAG\n"));
00186
00187   // Code to handle custom drag and drop. This message indicates that
00188   // the item is being dropped
00189   * pLResult = FALSE;
00190   return TRUE;
00191 }
00192
00193 BOOL CPaletteBar::GetButtonInfo(WPARAM /*wParam*/, LPARAM  lParam, LRESULT* pLResult)
00194 {
00195   // This notification message has to be handled correctly if
00196   // all operations in the custom dialogbox has to function correctly
00197   // We have to supply information for the button specified by pTBN->tbButton
00198   //
00199   // This notification is sent in the following cases
00200   //
00201   // After TBN_BEGINADJUST the control sends these notifications until
00202   // * pLResult is TRUE. We have to supply valid values when this value is
00203   // set to TRUE. Here the control is collecting information for all
00204   // the buttons that have to be displayed in the dialog box
00205   //
00206   // The control sends this notification to get information about
00207   // a button if the user is trying to add it to the toolbar or
00208   // rearranging the buttons on the toolbar from within the dialog
00209
00210   TRACE(_T("TBN_GETBUTTONINFO\n"));
00211
00212   TBNOTIFY *pTBN = (TBNOTIFY *) lParam;
00213
00214   if (pTBN->iItem >= m_nButtonCount || pTBN->iItem < 0)
00215   {
00216     * pLResult = FALSE;
00217   }
00218   else
00219   {
00220     CString buffer;
00221     buffer.LoadString(pTBN->iItem + ID_ERASE);
00222
00223     // set the string for the button
00224     // truncate the string if its length is greater than the buffer
00225     // supplied by the toolbar
00226     _tcsncpy_s(pTBN->pszText, pTBN->cchText, buffer, _TRUNCATE);
00227     pTBN->pszText[pTBN->cchText - 1] = '\0';
00228
00229     // set the button info
00230     pTBN->tbButton = m_pTBButtons[pTBN->iItem];
00231
00232     // valid values are structure
00233     *pLResult = TRUE;
00234   }
00235
00236   return TRUE;
00237 }
00238
00239 BOOL CPaletteBar::QueryDelete(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00240 {
00241   TRACE(_T("TBN_QUERYDELETE\n"));
00242
00243   // in this sample any button can be deleted
00244   // if a particular button cannot be deleted set *pResult to FALSE for that item
00245   *pLResult = TRUE;
00246   return TRUE;
00247 }
00248
00249 BOOL CPaletteBar::QueryInsert(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00250 {
00251   TRACE(_T("TBN_QUERYINSERT\n"));
00252
00253   // in this sample buttons can be inserted at any location on the
00254   // toolbar
00255   *pLResult = TRUE;
00256   return TRUE;
00257 }
00258
00259 BOOL CPaletteBar::Reset(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00260 {
00261   TRACE(_T("TBN_RESET\n"));
00262
00263   // User has pressed the reset button
00264   // restore the state of the toolbar to the state it was before customization
00265   RestoreState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Palette Tool Bar"));
00266
00267   *pLResult = TRUE;
00268   return TRUE;
00269 }
00270
00271 BOOL CPaletteBar::ToolBarChange(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* /*pLResult*/)
00272 {
00273   TRACE(_T("TBN_TOOLBARCHANGE\n"));
00274
00275   // the toolbar has changed
00276   return TRUE;
00277 }
00278
00279
00280 // Helper function for tooltips
00281
00282 CString CPaletteBar::NeedText(UINT nID, NMHDR* pNotifyStruct, LRESULT* /*lResult*/ )
00283 {
00284   LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct ;
00285   ASSERT(nID == lpTTT->hdr.idFrom);
00286
00287   CString toolTipText;
00288   toolTipText.LoadString(nID);
00289
00290   // szText length is 80
00291   int nLength = (toolTipText.GetLength() > 79) ? 79 : toolTipText.GetLength();
00292
00293   toolTipText = toolTipText.Left(nLength);
00294
00295   return toolTipText;
00296 }
00297
00298
00299 void CPaletteBar::OnNeedTextW(UINT /*nID*/, NMHDR* pNotifyStruct, LRESULT * lResult )
00300 {
00301   size_t numchars;
00302
00303   if (pNotifyStruct->idFrom >= ID_ERASE && pNotifyStruct->idFrom <= ID_ELLIPSE)
00304   {
00305     CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
00306     LPTOOLTIPTEXTW lpTTT = (LPTOOLTIPTEXTW)pNotifyStruct;
00307 #ifdef _UNICODE
00308     _tcsncpy_s(lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText, toolTipText.GetLength());
00309 #else
00310     mbstowcs_s(&numchars, lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText, toolTipText.GetLength());
00311 #endif
00312   }
00313 }
00314
00315 void CPaletteBar::OnNeedTextA(UINT /*nID*/, NMHDR* pNotifyStruct, LRESULT * lResult )
00316 {
00317   if (pNotifyStruct->idFrom >= ID_ERASE && pNotifyStruct->idFrom <= ID_ELLIPSE)
00318   {
00319     CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
00320     LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct;
00321     _tcscpy_s(lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText);
00322   }
00323 }
00324
00325
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlblist.h Source File

  • ole
  • oleview
  • iviewers

tlblist.h

Go to the documentation of this file.
00001 // tlblist.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CTypeLibListView view
00015
00016 class CTypeLibListView : public CView
00017 {
00018 friend class CTypeLibWnd ;
00019 protected:
00020   CTypeLibListView();           // protected constructor used by dynamic creation
00021   DECLARE_DYNCREATE(CTypeLibListView)
00022
00023 // Attributes
00024 public:
00025   CListCtrl       m_list ;
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CTypeLibListView)
00032   public:
00033   virtual void OnInitialUpdate();
00034   protected:
00035   virtual void OnDraw(CDC* pDC);
00036   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 protected:
00041   virtual ~CTypeLibListView();
00042 #ifdef _DEBUG
00043   virtual void AssertValid() const;
00044   virtual void Dump(CDumpContext& dc) const;
00045 #endif
00046
00047   // Generated message map functions
00048 protected:
00049   //{{AFX_MSG(CTypeLibListView)
00050   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00051   afx_msg void OnDestroy();
00052   afx_msg void OnSize(UINT nType, int cx, int cy);
00053   //}}AFX_MSG
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/MainFrm.cpp Source File

  • vc2008fp
  • StateCollection

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StateCollection.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 const int  iMaxUserToolbars   = 10;
00023 const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
00024 const UINT uiLastUserToolBarId  = uiFirstUserToolBarId + iMaxUserToolbars - 1;
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMainFrame
00028
00029 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00030
00031
00032 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00033   ON_WM_CREATE()
00034   ON_COMMAND(ID_SAVE_DEBUG_CONF, OnSaveDebugConf)
00035   ON_COMMAND(ID_LOAD_DEBUG_CONF, OnLoadDebugConf)
00036   ON_COMMAND(ID_SAVE_REGULAR_CONF, OnSaveRegularConf)
00037   ON_COMMAND(ID_LOAD_REGULAR_CONF, OnLoadRegularConf)
00038   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00039   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00040   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00041   ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace)
00042   ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, OnUpdateViewWorkspace)
00043   ON_COMMAND(ID_VIEW_OUTPUT, OnViewOutput)
00044   ON_UPDATE_COMMAND_UI(ID_VIEW_OUTPUT, OnUpdateViewOutput)
00045 END_MESSAGE_MAP()
00046
00047 static UINT indicators[] =
00048 {
00049   ID_SEPARATOR,           // status line indicator
00050   ID_INDICATOR_CAPS,
00051   ID_INDICATOR_NUM,
00052   ID_INDICATOR_SCRL,
00053 };
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CMainFrame construction/destruction
00057
00058 CMainFrame::CMainFrame()
00059 {
00060   // TODO: add member initialization code here
00061
00062 }
00063
00064 CMainFrame::~CMainFrame()
00065 {
00066 }
00067
00068 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00069 {
00070   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00071     return -1;
00072
00073   CMFCToolBar::EnableQuickCustomization ();
00074
00075   // enable Office XP look:
00076   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00077
00078   // TODO: Define your own basic commands. Be sure, that each pulldown
00079   // menu have at least one basic command.
00080
00081   CList<UINT, UINT> lstBasicCommands;
00082
00083   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00084   lstBasicCommands.AddTail (ID_FILE_NEW);
00085   lstBasicCommands.AddTail (ID_FILE_OPEN);
00086   lstBasicCommands.AddTail (ID_FILE_SAVE);
00087   lstBasicCommands.AddTail (ID_FILE_PRINT);
00088   lstBasicCommands.AddTail (ID_APP_EXIT);
00089   lstBasicCommands.AddTail (ID_EDIT_CUT);
00090   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00091   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00092   lstBasicCommands.AddTail (ID_APP_ABOUT);
00093   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00094   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00095   lstBasicCommands.AddTail (ID_LOAD_DEBUG_CONF);
00096   lstBasicCommands.AddTail (ID_LOAD_REGULAR_CONF);
00097   lstBasicCommands.AddTail (ID_SAVE_DEBUG_CONF);
00098   lstBasicCommands.AddTail (ID_SAVE_REGULAR_CONF);
00099
00100   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00101
00102   m_wndMenuBar.SetShowAllCommands (FALSE);
00103   if (!m_wndMenuBar.Create (this))
00104   {
00105     TRACE0("Failed to create menubar\n");
00106     return -1;      // fail to create
00107   }
00108
00109   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00110
00111   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00112     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00113     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00114   {
00115     TRACE0("Failed to create toolbar\n");
00116     return -1;      // fail to create
00117   }
00118   if (!m_wndStatusBar.Create(this) ||
00119     !m_wndStatusBar.SetIndicators(indicators,
00120       sizeof(indicators)/sizeof(UINT)))
00121   {
00122     TRACE0("Failed to create status bar\n");
00123     return -1;      // fail to create
00124   }
00125
00126   if (!m_wndWorkSpace.Create (_T("Workspace"), this, CSize (200, 200),
00127     TRUE /* Has gripper */, ID_VIEW_WORKSPACE,
00128     WS_CHILD | WS_VISIBLE | CBRS_LEFT))
00129   {
00130     TRACE0("Failed to create workspace bar\n");
00131     return -1;      // fail to create
00132   }
00133
00134   if (!m_wndOutput.Create (_T("Output"), this, CSize (150, 150),
00135     TRUE /* Has gripper */, ID_VIEW_OUTPUT,
00136     WS_CHILD | WS_VISIBLE | CBRS_BOTTOM))
00137   {
00138     TRACE0("Failed to create output bar\n");
00139     return -1;      // fail to create
00140   }
00141
00142   BOOL bValidString;
00143   CString strMainToolbarTitle;
00144   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00145   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00146   // TODO: Delete these three lines if you don't want the toolbar to
00147   //  be dockable
00148   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00149   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00150   m_wndWorkSpace.EnableDocking(CBRS_ALIGN_ANY);
00151   m_wndOutput.EnableDocking(CBRS_ALIGN_ANY);
00152   EnableDocking(CBRS_ALIGN_ANY);
00153   DockPane(&m_wndMenuBar);
00154   DockPane(&m_wndToolBar);
00155   DockPane(&m_wndWorkSpace);
00156   DockPane(&m_wndOutput);
00157
00158   // Allow user-defined toolbars operations:
00159   InitUserToolbars (NULL,
00160           uiFirstUserToolBarId,
00161           uiLastUserToolBarId);
00162
00163   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00164   return 0;
00165 }
00166
00167 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00168 {
00169   if( !CFrameWnd::PreCreateWindow(cs) )
00170     return FALSE;
00171   // TODO: Modify the Window class or styles here by modifying
00172   //  the CREATESTRUCT cs
00173
00174   return TRUE;
00175 }
00176
00177 /////////////////////////////////////////////////////////////////////////////
00178 // CMainFrame diagnostics
00179
00180 #ifdef _DEBUG
00181 void CMainFrame::AssertValid() const
00182 {
00183   CFrameWnd::AssertValid();
00184 }
00185
00186 void CMainFrame::Dump(CDumpContext& dc) const
00187 {
00188   CFrameWnd::Dump(dc);
00189 }
00190
00191 #endif //_DEBUG
00192
00193 /////////////////////////////////////////////////////////////////////////////
00194 // CMainFrame message handlers
00195
00196
00197 void CMainFrame::OnViewCustomize()
00198 {
00199   //------------------------------------
00200   // Create a customize toolbars dialog:
00201   //------------------------------------
00202   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00203     TRUE /* Automatic menus scaning */);
00204
00205   pDlgCust->EnableUserDefinedToolbars ();
00206
00207   pDlgCust->Create ();
00208 }
00209
00210 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00211 {
00212   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00213
00214   CMenu menu;
00215   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00216
00217   CMenu* pPopup = menu.GetSubMenu(0);
00218   ASSERT(pPopup != NULL);
00219
00220   if (pPopup)
00221   {
00222     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00223     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00224   }
00225
00226   return 0;
00227 }
00228
00229 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00230 {
00231   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00232   //
00233   // UINT uiToolBarId = (UINT) wp;
00234   // if (uiToolBarId == IDR_MAINFRAME)
00235   // {
00236   //    do something with m_wndToolBar
00237   // }
00238
00239   return 0;
00240 }
00241
00242 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00243 {
00244   //---------------------------------------------------------
00245   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00246   //---------------------------------------------------------
00247   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00248
00249   if (pMenuPopup != NULL &&
00250     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00251   {
00252     if (CMFCToolBar::IsCustomizeMode ())
00253     {
00254       //----------------------------------------------------
00255       // Don't show toolbars list in the cuztomization mode!
00256       //----------------------------------------------------
00257       return FALSE;
00258     }
00259
00260     pMenuPopup->RemoveAllItems ();
00261
00262     CMenu menu;
00263     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00264
00265     CMenu* pPopup = menu.GetSubMenu(0);
00266     ASSERT(pPopup != NULL);
00267
00268     if (pPopup)
00269     {
00270       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00271     }
00272   }
00273
00274   return TRUE;
00275 }
00276
00277 void CMainFrame::OnViewWorkspace()
00278 {
00279   ShowPane (&m_wndWorkSpace,
00280           !(m_wndWorkSpace.IsVisible ()),
00281           FALSE, TRUE);
00282   RecalcLayout ();
00283 }
00284
00285 void CMainFrame::OnUpdateViewWorkspace(CCmdUI* pCmdUI)
00286 {
00287   pCmdUI->SetCheck (m_wndWorkSpace.IsVisible ());
00288 }
00289
00290 void CMainFrame::OnViewOutput()
00291 {
00292   ShowPane (&m_wndOutput,
00293           !(m_wndOutput.IsVisible ()),
00294           FALSE, TRUE);
00295   RecalcLayout ();
00296 }
00297
00298 void CMainFrame::OnUpdateViewOutput(CCmdUI* pCmdUI)
00299 {
00300   pCmdUI->SetCheck (m_wndOutput.IsVisible ());
00301 }
00302
00303 void CMainFrame::OnSaveDebugConf()
00304 {
00305   theApp.SaveState (this, _T ("Debug"));
00306 }
00307
00308 void CMainFrame::OnLoadDebugConf()
00309 {
00310   CRect rectOld;
00311   GetWindowRect (rectOld);
00312   theApp.m_bLoadUserToolbars = FALSE;
00313   SetRedraw (FALSE);
00314   theApp.LoadState (this, _T ("Debug"));
00315   SetRedraw (TRUE);
00316   RedrawWindow (NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
00317                 RDW_ERASE | RDW_ALLCHILDREN);
00318   GetDesktopWindow ()->RedrawWindow (rectOld, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
00319                 RDW_ERASE | RDW_ALLCHILDREN);
00320 }
00321
00322 void CMainFrame::OnSaveRegularConf()
00323 {
00324   theApp.SaveState (this, _T ("Regular")) ;
00325 }
00326
00327 void CMainFrame::OnLoadRegularConf()
00328 {
00329   CRect rectOld;
00330   GetWindowRect (rectOld);
00331   theApp.m_bLoadUserToolbars = FALSE;
00332   SetRedraw (FALSE);
00333   theApp.LoadState (this, _T ("Regular")) ;
00334   SetRedraw (TRUE);
00335   RedrawWindow (NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
00336                 RDW_ERASE | RDW_ALLCHILDREN);
00337   GetDesktopWindow ()->RedrawWindow (rectOld, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
00338                 RDW_ERASE | RDW_ALLCHILDREN);
00339 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/StdAfx.cpp Source File

  • vc2008fp
  • OutlookDemo

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  OutlookDemo.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/listvwex.h Source File

  • general
  • rowlist

listvwex.h

Go to the documentation of this file.
00001 // ListVwEx.h : interface of the CListViewEx class
00002 //
00003 // This class provedes a full row selection mode for the report
00004 // mode list view control.
00005 //
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 class CListViewEx : public CListView
00016 {
00017   DECLARE_DYNCREATE(CListViewEx)
00018
00019 // Construction
00020 public:
00021   CListViewEx();
00022
00023 // Attributes
00024 protected:
00025   BOOL m_bFullRowSel;
00026
00027 public:
00028   BOOL SetFullRowSel(BOOL bFillRowSel);
00029   BOOL GetFullRowSel();
00030
00031   BOOL m_bClientWidthSel;
00032
00033 // Overrides
00034 protected:
00035   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00036
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CListViewEx)
00039   public:
00040   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00041   protected:
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045 public:
00046   virtual ~CListViewEx();
00047 #ifdef _DEBUG
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050
00051 protected:
00052   static LPCTSTR MakeShortString(CDC* pDC, LPCTSTR lpszLong, int nColumnLen, int nOffset);
00053   void RepaintSelectedItems();
00054
00055 // Implementation - client area width
00056   int m_cxClient;
00057
00058 // Implementation - state icon width
00059   int m_cxStateImageOffset;
00060   afx_msg LRESULT OnSetImageList(WPARAM wParam, LPARAM lParam);
00061
00062 // Implementation - list view colors
00063   COLORREF m_clrText;
00064   COLORREF m_clrTextBk;
00065   COLORREF m_clrBkgnd;
00066   afx_msg LRESULT OnSetTextColor(WPARAM wParam, LPARAM lParam);
00067   afx_msg LRESULT OnSetTextBkColor(WPARAM wParam, LPARAM lParam);
00068   afx_msg LRESULT OnSetBkColor(WPARAM wParam, LPARAM lParam);
00069
00070 // Generated message map functions
00071 protected:
00072   //{{AFX_MSG(CListViewEx)
00073   afx_msg void OnSize(UINT nType, int cx, int cy);
00074   afx_msg void OnPaint();
00075   afx_msg void OnSetFocus(CWnd* pOldWnd);
00076   afx_msg void OnKillFocus(CWnd* pNewWnd);
00077   //}}AFX_MSG
00078   DECLARE_MESSAGE_MAP()
00079 };
00080
00081 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSetView.h Source File

  • vc2008fp
  • MenuSubSet

MenuSubSetView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMenuSubSetView : public CFormView
00014 {
00015 protected: // create from serialization only
00016   CMenuSubSetView();
00017   DECLARE_DYNCREATE(CMenuSubSetView)
00018
00019 public:
00020   enum{ IDD = IDD_MENUSUBSET_FORM };
00021
00022 // Attributes
00023 public:
00024   CMenuSubSetDoc* GetDocument();
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   public:
00031   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00032   protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034   virtual void OnInitialUpdate(); // called first time after construct
00035   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00036   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00037   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00038   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00039
00040 // Implementation
00041 public:
00042   virtual ~CMenuSubSetView();
00043 #ifdef _DEBUG
00044   virtual void AssertValid() const;
00045   virtual void Dump(CDumpContext& dc) const;
00046 #endif
00047
00048 protected:
00049   afx_msg void OnDemoDemo1();
00050   afx_msg void OnDemoDemo2();
00051   afx_msg void OnContextMenu(CWnd*, CPoint point);
00052   afx_msg void OnFilePrintPreview();
00053
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 #ifndef _DEBUG  // debug version in MenuSubSetView.cpp
00058 inline CMenuSubSetDoc* CMenuSubSetView::GetDocument()
00059    { return (CMenuSubSetDoc*)m_pDocument; }
00060 #endif
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

inproc::IStringCollect Member List

This is the complete list of members for inproc::IStringCollect, including all inherited members.
Add | inproc::IStringCollect
Find | inproc::IStringCollect
id | inproc::IStringCollect
Item | inproc::IStringCollect
Remove | inproc::IStringCollect
RemoveAll | inproc::IStringCollect
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/stdafx.h Source File

  • controls
  • licensed

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/mainfrm.cpp Source File

  • ole
  • ipdrive

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ipdrive.h"
00014
00015 #include "mainfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00028   //{{AFX_MSG_MAP(CMainFrame)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code !
00031   ON_WM_CREATE()
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // arrays of IDs used to initialize control bars
00037
00038 // toolbar buttons - IDs are command buttons
00039 static UINT BASED_CODE buttons[] =
00040 {
00041   // same order as in the bitmap 'toolbar.bmp'
00042   ID_FILE_NEW,
00043   ID_FILE_OPEN,
00044   ID_FILE_SAVE,
00045     ID_SEPARATOR,
00046   ID_EDIT_CUT,
00047   ID_EDIT_COPY,
00048   ID_EDIT_PASTE,
00049     ID_SEPARATOR,
00050   ID_FILE_PRINT,
00051   ID_APP_ABOUT,
00052 };
00053
00054 static UINT BASED_CODE indicators[] =
00055 {
00056   ID_SEPARATOR,           // status line indicator
00057   ID_INDICATOR_CAPS,
00058   ID_INDICATOR_NUM,
00059   ID_INDICATOR_SCRL,
00060 };
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CMainFrame construction/destruction
00064
00065 CMainFrame::CMainFrame()
00066 {
00067   // TODO: add member initialization code here
00068
00069 }
00070
00071 CMainFrame::~CMainFrame()
00072 {
00073 }
00074
00075 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00076 {
00077   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00078     return -1;
00079
00080   if (!m_wndToolBar.Create(this) ||
00081     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00082     !m_wndToolBar.SetButtons(buttons,
00083       sizeof(buttons)/sizeof(UINT)))
00084   {
00085     TRACE0("Failed to create toolbar\n");
00086     return -1;      // fail to create
00087   }
00088
00089   if (!m_wndStatusBar.Create(this) ||
00090     !m_wndStatusBar.SetIndicators(indicators,
00091       sizeof(indicators)/sizeof(UINT)))
00092   {
00093     TRACE0("Failed to create status bar\n");
00094     return -1;      // fail to create
00095   }
00096
00097   // TODO: Delete these three lines if you don't want the toolbar to
00098   //  be dockable
00099 #if (_MFC_VER > 0x300)
00100   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00101   EnableDocking(CBRS_ALIGN_ANY);
00102   DockControlBar(&m_wndToolBar);
00103
00104   // TODO: Remove this if you don't want tool tips
00105   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00106     CBRS_TOOLTIPS | CBRS_FLYBY);
00107 #endif
00108
00109   return 0;
00110 }
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CMainFrame diagnostics
00114
00115 #ifdef _DEBUG
00116 void CMainFrame::AssertValid() const
00117 {
00118   CFrameWnd::AssertValid();
00119 }
00120
00121 void CMainFrame::Dump(CDumpContext& dc) const
00122 {
00123   CFrameWnd::Dump(dc);
00124 }
00125
00126 #endif //_DEBUG
00127
00128 /////////////////////////////////////////////////////////////////////////////
00129 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/StdAfx.h Source File

  • general
  • DBVList

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #if !defined(AFX_STDAFX_H__13CCB745_ED59_11D0_8286_00C04FD73634__INCLUDED_)
00015 #define AFX_STDAFX_H__13CCB745_ED59_11D0_8286_00C04FD73634__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #include <afxdisp.h>        // MFC OLE automation classes
00026 #include <afxdao.h>         // MFC DAO database classes
00027 #ifndef _AFX_NO_AFXCMN_SUPPORT
00028 #include <afxcmn.h>         // MFC support for Windows Common Controls
00029 #include <afxcview.h>       // MFC support for Cmn Ctrl Views
00030 #endif // _AFX_NO_AFXCMN_SUPPORT
00031
00032
00033 //{{AFX_INSERT_LOCATION}}
00034 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00035
00036 #endif // !defined(AFX_STDAFX_H__13CCB745_ED59_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/mtreectl.cpp Source File

  • general
  • CmnCtrl1

mtreectl.cpp

Go to the documentation of this file.
00001 // MyTreeCtrl.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl1.h"
00015 #include "mtreectl.h"
00016 #include "treecpg.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMyTreeCtrl
00026
00027 CMyTreeCtrl::CMyTreeCtrl()
00028 {
00029   m_bDragging = FALSE;
00030   m_pimagelist = NULL;
00031 }
00032
00033 CMyTreeCtrl::~CMyTreeCtrl()
00034 {
00035 }
00036
00037
00038 BEGIN_MESSAGE_MAP(CMyTreeCtrl, CTreeCtrl)
00039   //{{AFX_MSG_MAP(CMyTreeCtrl)
00040   ON_NOTIFY_REFLECT(TVN_ENDLABELEDIT, OnEndLabelEdit)
00041   ON_NOTIFY_REFLECT(TVN_BEGINDRAG, OnBeginDrag)
00042   ON_NOTIFY_REFLECT(TVN_BEGINRDRAG, OnBeginDrag)
00043   ON_WM_MOUSEMOVE()
00044   ON_WM_DESTROY()
00045   ON_WM_LBUTTONUP()
00046   ON_WM_RBUTTONUP()
00047   //}}AFX_MSG_MAP
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CMyTreeCtrl message handlers
00052 void CMyTreeCtrl::OnDestroy()
00053 {
00054   CImageList  *pimagelist;
00055
00056   pimagelist = GetImageList(TVSIL_NORMAL);
00057   pimagelist->DeleteImageList();
00058   delete pimagelist;
00059 }
00060
00061 void CMyTreeCtrl::SetNewStyle(long lStyleMask, BOOL bSetBits)
00062 {
00063   long        lStyleOld;
00064
00065   lStyleOld = GetWindowLong(m_hWnd, GWL_STYLE);
00066   lStyleOld &= ~lStyleMask;
00067   if (bSetBits)
00068     lStyleOld |= lStyleMask;
00069
00070   SetWindowLong(m_hWnd, GWL_STYLE, lStyleOld);
00071   SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
00072 }
00073
00074 void CMyTreeCtrl::OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pLResult)
00075 {
00076   TV_DISPINFO     *ptvinfo;
00077
00078   ((CTreeCtrlPage *)GetParent())->ShowNotification(pnmhdr, pLResult);
00079   ptvinfo = (TV_DISPINFO *)pnmhdr;
00080   if (ptvinfo->item.pszText != NULL)
00081   {
00082     ptvinfo->item.mask = TVIF_TEXT;
00083     SetItem(&ptvinfo->item);
00084   }
00085   *pLResult = TRUE;
00086 }
00087
00088 void CMyTreeCtrl::OnMouseMove(UINT nFlags, CPoint point)
00089 {
00090   HTREEITEM           hitem;
00091   UINT                flags;
00092
00093   if (m_bDragging)
00094   {
00095     ASSERT(m_pimagelist != NULL);
00096     m_pimagelist->DragMove(point);
00097     if ((hitem = HitTest(point, &flags)) != NULL)
00098     {
00099       m_pimagelist->DragLeave(this);
00100       SelectDropTarget(hitem);
00101       m_hitemDrop = hitem;
00102       m_pimagelist->DragEnter(this, point);
00103     }
00104   }
00105
00106   CTreeCtrl::OnMouseMove(nFlags, point);
00107 }
00108
00109 BOOL CMyTreeCtrl::IsChildNodeOf(HTREEITEM hitemChild, HTREEITEM hitemSuspectedParent)
00110 {
00111   do
00112   {
00113     if (hitemChild == hitemSuspectedParent)
00114       break;
00115   }
00116   while ((hitemChild = GetParentItem(hitemChild)) != NULL);
00117
00118   return (hitemChild != NULL);
00119 }
00120
00121
00122 BOOL CMyTreeCtrl::TransferItem(HTREEITEM hitemDrag, HTREEITEM hitemDrop)
00123 {
00124   TV_INSERTSTRUCT     tvstruct;
00125   TCHAR               sztBuffer[50];
00126   HTREEITEM           hNewItem, hFirstChild;
00127
00128     // avoid an infinite recursion situation
00129   tvstruct.item.hItem = hitemDrag;
00130   tvstruct.item.cchTextMax = 49;
00131   tvstruct.item.pszText = sztBuffer;
00132   tvstruct.item.mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
00133   GetItem(&tvstruct.item);  // get information of the dragged element
00134   tvstruct.hParent = hitemDrop;
00135   tvstruct.hInsertAfter = TVI_SORT;
00136   tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
00137   hNewItem = InsertItem(&tvstruct);
00138
00139   while ((hFirstChild = GetChildItem(hitemDrag)) != NULL)
00140   {
00141     TransferItem(hFirstChild, hNewItem);  // recursively transfer all the items
00142     DeleteItem(hFirstChild);        // delete the first child and all its children
00143   }
00144   return TRUE;
00145 }
00146
00147 void CMyTreeCtrl::OnButtonUp()
00148 {
00149   if (m_bDragging)
00150   {
00151     ASSERT(m_pimagelist != NULL);
00152     m_pimagelist->DragLeave(this);
00153     m_pimagelist->EndDrag();
00154     delete m_pimagelist;
00155     m_pimagelist = NULL;
00156
00157     if (m_hitemDrag != m_hitemDrop && !IsChildNodeOf(m_hitemDrop, m_hitemDrag) &&
00158                               GetParentItem(m_hitemDrag) != m_hitemDrop)
00159     {
00160       TransferItem(m_hitemDrag, m_hitemDrop);
00161       DeleteItem(m_hitemDrag);
00162     }
00163     else
00164       MessageBeep(0);
00165
00166     ReleaseCapture();
00167     m_bDragging = FALSE;
00168     SelectDropTarget(NULL);
00169   }
00170 }
00171
00172 void CMyTreeCtrl::OnLButtonUp(UINT nFlags, CPoint point)
00173 {
00174   OnButtonUp();
00175   CTreeCtrl::OnLButtonUp(nFlags, point);
00176 }
00177
00178 void CMyTreeCtrl::OnRButtonUp(UINT nFlags, CPoint point)
00179 {
00180   OnButtonUp();
00181   CTreeCtrl::OnRButtonUp(nFlags, point);
00182 }
00183
00184 void CMyTreeCtrl::OnBeginDrag(LPNMHDR pnmhdr, LRESULT *pLResult)
00185 {
00186   CPoint      ptAction;
00187   UINT        nFlags;
00188
00189   GetCursorPos(&ptAction);
00190   ScreenToClient(&ptAction);
00191   ((CTreeCtrlPage *)GetParent())->ShowNotification(pnmhdr, pLResult);
00192   ASSERT(!m_bDragging);
00193   m_bDragging = TRUE;
00194   m_hitemDrag = HitTest(ptAction, &nFlags);
00195   m_hitemDrop = NULL;
00196
00197   ASSERT(m_pimagelist == NULL);
00198   m_pimagelist = CreateDragImage(m_hitemDrag);  // get the image list for dragging
00199   m_pimagelist->DragShowNolock(TRUE);
00200   m_pimagelist->SetDragCursorImage(0, CPoint(0, 0));
00201   m_pimagelist->BeginDrag(0, CPoint(0,0));
00202   m_pimagelist->DragMove(ptAction);
00203   m_pimagelist->DragEnter(this, ptAction);
00204   SetCapture();
00205 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/initiids.cpp Source File

  • ole
  • acdual

initiids.cpp

Go to the documentation of this file.
00001 // initIIDs.cpp: defines IIDs for dual interfaces
00002 //   ** This must not be built with precompiled header **
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include <ole2.h>
00014 #include <initguid.h>
00015 //#include "acdual.h"
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTCOptions Member List

This is the complete list of members for CTCOptions, including all inherited members.
CTCOptions() | CTCOptions
m_iLogType | CTCOptions
m_strDSMFile | CTCOptions
m_strLogFileName | CTCOptions
m_strProgID | CTCOptions
m_tAllowWindowless | CTCOptions
m_tHonorIgnoreActivateWhenVisible | CTCOptions
m_tIAdviseSinkEx | CTCOptions
m_tIOleInPlaceSiteEx | CTCOptions
m_tIOleInPlaceSiteWindowless | CTCOptions
m_tQuickActivation | CTCOptions
m_tSBindHost | CTCOptions
m_tTwoPassDrawing | CTCOptions
m_tUseIPointerInactive | CTCOptions
m_tUserMode | CTCOptions
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/push.odl Source File

  • controls
  • push

push.odl

Go to the documentation of this file.
00001 // push.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (push.tlb) that will become a resource in
00005 // push.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(75303866-B925-101A-B57A-0000C0C3ED5F), version(1.0),
00019   helpstring("Push OLE Custom Control module"), control ]
00020 library PushLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CPushCtrl
00026
00027   [ uuid(37446B86-5870-101B-B57B-00608CC96AFA),
00028     helpstring("Dispatch interface for Push Control"), hidden ]
00029   dispinterface _DPush
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CPushCtrl)
00035       [id(DISPID_BORDERSTYLE), bindable, requestedit] short BorderStyle;
00036       [id(DISPID_CAPTION), bindable, requestedit] BSTR Caption;
00037       [id(DISPID_ENABLED), bindable, requestedit] boolean Enabled;
00038       //}}AFX_ODL_PROP
00039
00040     methods:
00041       // NOTE - ClassWizard will maintain method information here.
00042       //    Use extreme caution when editing this section.
00043       //{{AFX_ODL_METHOD(CPushCtrl)
00044       //}}AFX_ODL_METHOD
00045
00046       [id(DISPID_ABOUTBOX)] void AboutBox();
00047   };
00048
00049   //  Event dispatch interface for CPushCtrl
00050
00051   [ uuid(37446B87-5870-101B-B57B-00608CC96AFA),
00052     helpstring("Event interface for Push Control") ]
00053   dispinterface _DPushEvents
00054   {
00055     properties:
00056       //  Event interface has no properties
00057
00058     methods:
00059       // NOTE - ClassWizard will maintain event information here.
00060       //    Use extreme caution when editing this section.
00061       //{{AFX_ODL_EVENT(CPushCtrl)
00062       [id(1)] void CustomClick(BSTR lpstrCaption, short cchCaption);
00063       //}}AFX_ODL_EVENT
00064   };
00065
00066   //  Class information for CPushCtrl
00067
00068   [ uuid(75303863-B925-101A-B57A-0000C0C3ED5F),
00069     helpstring("Push Control"), control ]
00070   coclass Push
00071   {
00072     [default] dispinterface _DPush;
00073     [default, source] dispinterface _DPushEvents;
00074   };
00075
00076   //{{AFX_APPEND_ODL}}
00077 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagOEM_PENPACKET Member List

This is the complete list of members for tagOEM_PENPACKET, including all inherited members.
dwTime | tagOEM_PENPACKET
rgwOemData | tagOEM_PENPACKET
wPDK | tagOEM_PENPACKET
wTabletX | tagOEM_PENPACKET
wTabletY | tagOEM_PENPACKET
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapedoc.cpp Source File

  • general
  • propdlg

shapedoc.cpp

Go to the documentation of this file.
00001 // shapedoc.cpp : implementation of the CShapesDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014
00015 #include "shapeobj.h"
00016 #include "shapedoc.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CShapesDoc
00025
00026 IMPLEMENT_DYNCREATE(CShapesDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CShapesDoc, CDocument)
00029   //{{AFX_MSG_MAP(CShapesDoc)
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CShapesDoc construction/destruction
00035
00036 CShapesDoc::CShapesDoc()
00037 {
00038 }
00039
00040 CShapesDoc::~CShapesDoc()
00041 {
00042   POSITION pos = m_shapeList.GetHeadPosition();
00043   while (pos != NULL)
00044   {
00045     delete m_shapeList.GetNext(pos);
00046   }
00047 }
00048
00049 BOOL CShapesDoc::OnNewDocument()
00050 {
00051   if (!CDocument::OnNewDocument())
00052     return FALSE;
00053
00054   CRect rect(20,20,120,120);
00055
00056   CShape* pShapeNew = new CShape(
00057     black,
00058     rectangle,
00059     rect);
00060   AddShape(pShapeNew);
00061
00062   return TRUE;
00063 }
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CShapesDoc operations
00067
00068 void CShapesDoc::AddShape(CShape* pShapeNew)
00069 {
00070   m_shapeList.AddHead(pShapeNew);
00071   UpdateAllViews(NULL);
00072   SetModifiedFlag();
00073 }
00074
00075 CShape* CShapesDoc::HitTest(CPoint pt)
00076 {
00077   CShape* pShapeHit;
00078   POSITION pos = m_shapeList.GetHeadPosition();
00079   while (pos != NULL)
00080   {
00081     pShapeHit = m_shapeList.GetNext(pos);
00082     if (pShapeHit->m_rect.PtInRect(pt))
00083       return pShapeHit;
00084   }
00085   return NULL;
00086 }
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CShapesDoc serialization
00090
00091 void CShapesDoc::Serialize(CArchive& ar)
00092 {
00093   m_shapeList.Serialize(ar);
00094 }
00095
00096 /////////////////////////////////////////////////////////////////////////////
00097 // CShapesDoc diagnostics
00098
00099 #ifdef _DEBUG
00100 void CShapesDoc::AssertValid() const
00101 {
00102   CDocument::AssertValid();
00103 }
00104
00105 void CShapesDoc::Dump(CDumpContext& dc) const
00106 {
00107   CDocument::Dump(dc);
00108 }
00109 #endif //_DEBUG
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CShapesDoc commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeless.h Source File

  • general
  • modeless

modeless.h

Go to the documentation of this file.
00001 // modeless.h : main header file for the MODELESS application
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CModelessApp:
00021 // See modeless.cpp for the implementation of this class
00022 //
00023
00024 class CModelessApp : public CWinApp
00025 {
00026 public:
00027   CModelessApp();
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CModelessApp)
00032   public:
00033   virtual BOOL InitInstance();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037
00038   //{{AFX_MSG(CModelessApp)
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circppg.h Source File

  • controls
  • circ

circppg.h

Go to the documentation of this file.
00001 // circppg.h : Declaration of the CCircPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 ////////////////////////////////////////////////////////////////////////////
00013 // CCircPropPage : See circppg.cpp for implementation.
00014
00015 class CCircPropPage : public COlePropertyPage
00016 {
00017   DECLARE_DYNCREATE(CCircPropPage)
00018   DECLARE_OLECREATE_EX(CCircPropPage)
00019
00020 // Constructor
00021 public:
00022   CCircPropPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CCircPropPage)
00026   enum { IDD = IDD_PROPPAGE_CIRC };
00027   CString m_caption;
00028   int     m_circleOffset;
00029   BOOL    m_circleShape;
00030   CString m_note;
00031   //}}AFX_DATA
00032
00033 // Implementation
00034 protected:
00035   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00036
00037 // Message maps
00038 protected:
00039   //{{AFX_MSG(CCircPropPage)
00040     // NOTE - ClassWizard will add and remove member functions here.
00041     //    DO NOT EDIT what you see in these blocks of generated code !
00042   //}}AFX_MSG
00043   DECLARE_MESSAGE_MAP()
00044
00045 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/stdafx.cpp Source File

  • vc2008fp
  • NewControls

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // NewControls.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropSliderCtrl Member List

This is the complete list of members for CPropSliderCtrl, including all inherited members.
CPropSliderCtrl(CSliderProp *pProp, COLORREF clrBack) | CPropSliderCtrl |
CtlColor(CDC *pDC, UINT nCtlColor) | CPropSliderCtrl | [protected]
HScroll(UINT nSBCode, UINT nPos) | CPropSliderCtrl | [protected]
m_brBackground | CPropSliderCtrl | [protected]
m_clrBack | CPropSliderCtrl | [protected]
m_pProp | CPropSliderCtrl | [protected]
~CPropSliderCtrl() | CPropSliderCtrl | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdivw.cpp Source File

  • advanced
  • mtgdi

mtgdivw.cpp

Go to the documentation of this file.
00001 // mtgdivw.cpp : implementation of the CThreadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtgdi.h"
00014
00015 #include "mtgdidoc.h"
00016 #include "mtgdivw.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CThreadView
00025
00026 IMPLEMENT_DYNCREATE(CThreadView, CView)
00027
00028 BEGIN_MESSAGE_MAP(CThreadView, CView)
00029   //{{AFX_MSG_MAP(CThreadView)
00030   ON_COMMAND(ID_THREAD_NEWBALL, OnNewball)
00031   ON_COMMAND(ID_THREAD_KILLTHREADS, OnKillThreads)
00032   ON_WM_DESTROY()
00033   ON_COMMAND(ID_THREAD_NEWLINE, OnNewline)
00034   ON_COMMAND(ID_THREAD_NEWRECTANGLE, OnNewrectangle)
00035   ON_COMMAND(ID_THREAD_10NEWBALLS, On10newballs)
00036   ON_COMMAND(ID_THREAD_10NEWLINES, On10newlines)
00037   ON_COMMAND(ID_THREAD_10NEWRECTANGLES, On10newrectangles)
00038   ON_WM_CREATE()
00039   ON_WM_SIZE()
00040   ON_COMMAND(ID_THREAD_25NEWBALLS, On25newballs)
00041   ON_COMMAND(ID_THREAD_25NEWLINES, On25newlines)
00042   ON_COMMAND(ID_THREAD_25NEWRECTANGLES, On25newrectangles)
00043   ON_COMMAND(ID_THREAD_KILLTHREADSSLOW, OnThreadKillThreadsSlow)
00044   //}}AFX_MSG_MAP
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CThreadView construction/destruction
00049
00050 CThreadView::CThreadView()
00051 {
00052   m_pDC = NULL;
00053 }
00054
00055 CThreadView::~CThreadView()
00056 {
00057 }
00058
00059 void CThreadView::UpdateTitle(int nThreads)
00060 {
00061   if (nThreads == -1)
00062     nThreads = (int)m_threadList.GetCount();
00063
00064   CString strCaption;
00065   if (nThreads != 0)
00066   {
00067     CString strFormat; strFormat.LoadString(IDS_CAPTION_FORMAT);
00068     strCaption.Format(strFormat, nThreads);
00069   }
00070   else
00071     strCaption.LoadString(IDS_CAPTION_NOTHREADS);
00072
00073   GetParentFrame()->SetWindowText(strCaption);
00074 }
00075
00076 void CThreadView::StartThread(int ThreadID)
00077 {
00078   CGDIThread* pThread = 0;
00079   CPoint Pos(rand()%100,rand()%100);
00080   CPoint Vel1((rand()%10)+2,(rand()%10)+2);
00081   CPoint Vel2((rand()%5)+2,(rand()%5)+2);
00082   CSize Size(((rand()%60)+20),((rand()%60)+20));
00083   COLORREF Color;
00084
00085   //BLOCK: calculate random color
00086   {
00087     int r,g,b;
00088
00089     do
00090     {
00091       r = (rand()%3);
00092       r = (r!=0) ? (r==2) ? 255 : 127 : 0;
00093
00094       g = (rand()%3);
00095       g = (g!=0) ? (g==2) ? 255 : 127 : 0;
00096
00097       b = (rand()%3);
00098       b = (b!=0) ? (b==2) ? 255 : 127 : 0;
00099     }
00100     while ((r==g) && (g==b));
00101     // No white(255,255,255), gray(127,127,127), or black(0,0,0) allowed
00102
00103     Color = RGB(r,g,b);
00104   }
00105
00106   if (rand()%1) Vel1.x*=-1;
00107   if (rand()%1) Vel1.y*=-1;
00108   if (rand()%1) Vel2.x*=-1;
00109   if (rand()%1) Vel2.y*=-1;
00110
00111   switch(ThreadID)
00112   {
00113   case 1:
00114     pThread = new CBallThread(this,
00115       m_pDC->GetSafeHdc(), Pos, Vel1, Size, Color);
00116     break;
00117   case 2:
00118     pThread = new CRectThread(this,
00119       m_pDC->GetSafeHdc(), Pos, Vel1, Size, Color);
00120     break;
00121   case 3:
00122     pThread = new CLineThread(this,
00123       m_pDC->GetSafeHdc(), Pos, Vel1, Vel2, Size, Color);
00124     break;
00125   }
00126
00127   if (pThread == NULL)
00128     return;
00129
00130   ASSERT_VALID(pThread);
00131   pThread->m_pThreadParams = NULL;
00132
00133   // Create Thread in a suspended state so we can set the Priority
00134   // before it starts getting away from us
00135   if (!pThread->CreateThread(CREATE_SUSPENDED))
00136   {
00137     delete pThread;
00138     return;
00139   }
00140
00141   // since everything is successful, add the thread to our list
00142   m_threadList.AddTail(pThread);
00143
00144   // If you want to make the sample more sprightly, set the thread priority here
00145   // a little higher. It has been set at idle priority to keep from bogging down
00146   // other apps that may also be running.
00147   VERIFY(pThread->SetThreadPriority(THREAD_PRIORITY_IDLE));
00148   // Now the thread can run wild
00149   pThread->ResumeThread();
00150 }
00151
00152 void CThreadView::OnDraw(CDC*)
00153 {
00154 }
00155
00156 /////////////////////////////////////////////////////////////////////////////
00157 // CThreadView diagnostics
00158
00159 #ifdef _DEBUG
00160 void CThreadView::AssertValid() const
00161 {
00162   CView::AssertValid();
00163 }
00164
00165 void CThreadView::Dump(CDumpContext& dc) const
00166 {
00167   CView::Dump(dc);
00168 }
00169
00170 CThreadDoc* CThreadView::GetDocument() // non-debug version is inline
00171 {
00172   return STATIC_DOWNCAST(CThreadDoc, m_pDocument);
00173 }
00174 #endif //_DEBUG
00175
00176 /////////////////////////////////////////////////////////////////////////////
00177 // CThreadView message handlers
00178
00179 void CThreadView::OnNewball()
00180 {
00181   StartThread(1);
00182   UpdateTitle();
00183 }
00184
00185 void CThreadView::On10newballs()
00186 {
00187   for (int i = 0; i < 10; i++)
00188   {
00189     StartThread(1);
00190     UpdateTitle();
00191   }
00192 }
00193
00194 void CThreadView::On25newballs()
00195 {
00196   for (int i = 0; i < 25; i++)
00197   {
00198     StartThread(1);
00199     UpdateTitle();
00200   }
00201 }
00202
00203 void CThreadView::OnNewrectangle()
00204 {
00205   StartThread(2);
00206   UpdateTitle();
00207 }
00208
00209 void CThreadView::On10newrectangles()
00210 {
00211   for (int i = 0; i < 10; i++)
00212   {
00213     StartThread(2);
00214     UpdateTitle();
00215   }
00216 }
00217
00218 void CThreadView::On25newrectangles()
00219 {
00220   for (int i = 0; i < 25; i++)
00221   {
00222     StartThread(2);
00223     UpdateTitle();
00224   }
00225 }
00226
00227 void CThreadView::OnNewline()
00228 {
00229   StartThread(3);
00230   UpdateTitle();
00231 }
00232
00233 void CThreadView::On10newlines()
00234 {
00235   for (int i = 0 ;i < 10; i++)
00236   {
00237     StartThread(3);
00238     UpdateTitle();
00239   }
00240 }
00241
00242 void CThreadView::On25newlines()
00243 {
00244   for (int i = 0; i < 25; i++)
00245   {
00246     StartThread(3);
00247     UpdateTitle();
00248   }
00249 }
00250
00251 // A preferred method for killing many threads.  Tell them to go away all
00252 // at once, then wait for them all to be scheduled and to terminate
00253 // themselves.  This is much, much faster than the more straight forward
00254 // way of asking just one to terminate, then waiting for it to do so.
00255 // It is also a little bit more complex.
00256
00257 void CThreadView::OnKillThreads()
00258 {
00259   // tell all threads to shutdown
00260   POSITION pos;
00261   for (pos = m_threadList.GetHeadPosition(); pos != NULL; )
00262   {
00263     CGDIThread* pThread = m_threadList.GetNext(pos);
00264     VERIFY(SetEvent(pThread->m_hEventKill));
00265   }
00266
00267   // wait for all threads to finish shutdown
00268   for (int nThreadsLeft = (int)m_threadList.GetCount(); nThreadsLeft != 0; )
00269   {
00270     WaitForSingleObject(CGDIThread::m_hAnotherDead, INFINITE);
00271     Sleep(nThreadsLeft*2);// 200ms for every 100 threads
00272     nThreadsLeft = 0;
00273     for (pos = m_threadList.GetHeadPosition(); pos != NULL; )
00274     {
00275       CGDIThread* pThread = m_threadList.GetNext(pos);
00276       if (WaitForSingleObject(pThread->m_hEventDead, 0) == WAIT_TIMEOUT)
00277         ++nThreadsLeft;
00278     }
00279     UpdateTitle(nThreadsLeft);
00280   }
00281
00282   // delete all thread objects
00283   while (!m_threadList.IsEmpty())
00284   {
00285     CGDIThread* pThread = m_threadList.RemoveHead();
00286     VERIFY(WaitForSingleObject(pThread->m_hThread, INFINITE) == WAIT_OBJECT_0);
00287     delete pThread;
00288   }
00289   UpdateTitle();
00290
00291   // invalidate the window since all threads are now gone
00292   Invalidate();
00293 }
00294
00295 // KillThreadsSlow is much easier to understand since the process of
00296 // killing a thread is encapsulated in KillThread.  If you get more
00297 // than 50 threads running, however, you'll notice quite a difference
00298 // between this method and the one above.
00299
00300 void CThreadView::OnThreadKillThreadsSlow()
00301 {
00302   // Iterate through the threads killing each
00303   // KillThread doesn't return until the Thread is dead
00304   while (!m_threadList.IsEmpty())
00305   {
00306     m_threadList.RemoveHead()->KillThread();
00307     UpdateTitle();
00308   }
00309
00310   // Invalidate the window so it blanks the window
00311   Invalidate();
00312 }
00313
00314 void CThreadView::OnDestroy()
00315 {
00316   OnKillThreads();
00317
00318   delete m_pDC;
00319   m_pDC = NULL;
00320
00321   CView::OnDestroy();
00322 }
00323
00324 int CThreadView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00325 {
00326   if (CView::OnCreate(lpCreateStruct) == -1)
00327     return -1;
00328
00329   // m_pDC must be initialized here instead of the constructor
00330   // because the HWND isn't created until Create is called.
00331   m_pDC = new CClientDC(this);
00332   UpdateTitle();
00333
00334   return 0;
00335 }
00336
00337 void CThreadView::OnSize(UINT nType, int cx, int cy)
00338 {
00339   CView::OnSize(nType, cx, cy);
00340
00341   // Instead of getting the client rect every time we draw, we only
00342   // update it when it changes.
00343   for (POSITION pos = m_threadList.GetHeadPosition(); pos != NULL; )
00344     m_threadList.GetNext(pos)->UpdateBorder();
00345 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/NetAddressCtrlPage.cpp Source File

  • controls
  • cmnctrl

NetAddressCtrlPage.cpp

Go to the documentation of this file.
00001 // NetAddressCtrlPage.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005
00006 #include "CmnCtrl3.h"
00007 #include "NetAddressCtrlPage.h"
00008
00009 static const struct
00010 {
00011     DWORD   dwNetString;
00012     LPCTSTR lpszDisplay;
00013 } netStrings[] =
00014 {
00015     { NET_STRING_IPV4_ADDRESS, _T("NET_STRING_IPV4_ADDRESS") },
00016     { NET_STRING_IPV4_SERVICE, _T("NET_STRING_IPV4_SERVICE") },
00017     { NET_STRING_IPV4_NETWORK, _T("NET_STRING_IPV4_NETWORK") },
00018
00019     { NET_STRING_IPV6_ADDRESS, _T("NET_STRING_IPV6_ADDRESS") },
00020     { NET_STRING_IPV6_ADDRESS_NO_SCOPE, _T("NET_STRING_IPV6_ADDRESS_NO_SCOPE") },
00021     { NET_STRING_IPV6_SERVICE, _T("NET_STRING_IPV6_SERVICE") },
00022     { NET_STRING_IPV6_SERVICE_NO_SCOPE, _T("NET_STRING_IPV6_SERVICE_NO_SCOPE") },
00023     { NET_STRING_IPV6_NETWORK, _T("NET_STRING_IPV6_NETWORK") },
00024
00025     { NET_STRING_NAMED_ADDRESS, _T("NET_STRING_NAMED_ADDRESS") },
00026     { NET_STRING_NAMED_SERVICE, _T("NET_STRING_NAMED_SERVICE") },
00027
00028     { NET_STRING_IP_ADDRESS, _T("NET_STRING_IP_ADDRESS") },
00029     { NET_STRING_IP_ADDRESS_NO_SCOPE, _T("NET_STRING_IP_ADDRESS_NO_SCOPE") },
00030     { NET_STRING_IP_SERVICE, _T("NET_STRING_IP_SERVICE") },
00031     { NET_STRING_IP_SERVICE_NO_SCOPE, _T("NET_STRING_IP_SERVICE_NO_SCOPE") },
00032     { NET_STRING_IP_NETWORK, _T("NET_STRING_IP_NETWORK") },
00033
00034     { NET_STRING_ANY_ADDRESS, _T("NET_STRING_ANY_ADDRESS") },
00035     { NET_STRING_ANY_ADDRESS_NO_SCOPE, _T("NET_STRING_ANY_ADDRESS_NO_SCOPE") },
00036     { NET_STRING_ANY_SERVICE, _T("NET_STRING_ANY_SERVICE") },
00037     { NET_STRING_ANY_SERVICE_NO_SCOPE, _T("NET_STRING_ANY_SERVICE_NO_SCOPE") },
00038 };
00039
00040 static LPCTSTR szCue = _T("Enter the address here then validate");
00041
00042 // CNetAddressCtrlPage dialog
00043
00044 IMPLEMENT_DYNAMIC(CNetAddressCtrlPage, CPropertyPage)
00045
00046 CNetAddressCtrlPage::CNetAddressCtrlPage()
00047 : CPropertyPage(CNetAddressCtrlPage::IDD)
00048 {
00049 }
00050
00051 CNetAddressCtrlPage::~CNetAddressCtrlPage()
00052 {
00053 }
00054
00055 void CNetAddressCtrlPage::DoDataExchange(CDataExchange* pDX)
00056 {
00057     CPropertyPage::DoDataExchange(pDX);
00058     DDX_Control(pDX, IDC_NETADDRESS, m_netaddrctrl);
00059     DDX_Control(pDX, IDC_LIST_NETSTRINGS, m_listbox);
00060 }
00061
00062 BEGIN_MESSAGE_MAP(CNetAddressCtrlPage, CPropertyPage)
00063     ON_BN_CLICKED(IDC_BUTTON_VALIDATE, &CNetAddressCtrlPage::OnBnClickedButtonValidate)
00064     ON_EN_CHANGE(IDC_NETADDRESS, &CNetAddressCtrlPage::OnEnChangeNetaddress)
00065 END_MESSAGE_MAP()
00066
00067 // CNetAddressCtrlPage message handlers
00068
00069 void CNetAddressCtrlPage::OnBnClickedButtonValidate()
00070 {
00071     // Get selected Address Types
00072     int nCount = m_listbox.GetSelCount();
00073     int *selectedItems = new int[nCount];
00074     m_listbox.GetSelItems(nCount, selectedItems);
00075
00076     // Prepare the mask
00077     DWORD dwAddrMask = 0;
00078     for (int i = 0; i < nCount; i++)
00079         dwAddrMask |= netStrings[selectedItems[i]].dwNetString;
00080
00081     delete[] selectedItems;
00082
00083     NET_ADDRESS_INFO nfo;
00084     NC_ADDRESS addr;
00085     addr.pAddrInfo = &nfo;
00086
00087     // Validate
00088     m_netaddrctrl.SetAllowType(dwAddrMask);
00089     HRESULT hr = m_netaddrctrl.GetAddress(&addr);
00090
00091     if (hr == S_OK)
00092         ::MessageBox(m_hWnd, _T("Succeeded!"), _T("Validation"), 0);
00093     else
00094         m_netaddrctrl.DisplayErrorTip();
00095 }
00096
00097 BOOL CNetAddressCtrlPage::OnInitDialog()
00098 {
00099     CPropertyPage::OnInitDialog();
00100
00101     // Display the cue
00102     m_netaddrctrl.SetCueBanner(szCue, TRUE);
00103
00104     // Fill in all the NET_STRINGs
00105     for (int i = 0; i < _countof(netStrings); i++)
00106         m_listbox.AddString(netStrings[i].lpszDisplay);
00107
00108     return TRUE;
00109 }
00110
00111 void CNetAddressCtrlPage::OnEnChangeNetaddress()
00112 {
00113     CString text;
00114     int len = m_netaddrctrl.LineLength(0);
00115     m_netaddrctrl.GetLine(0, text.GetBuffer(len), len);
00116     text.ReleaseBuffer(len);
00117
00118     // Display the cue if the input is empty
00119     if (text.GetLength() == 0)
00120         m_netaddrctrl.SetCueBanner(szCue, TRUE);
00121 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockvw.cpp Source File

  • general
  • docktool

dockvw.cpp

Go to the documentation of this file.
00001 // dockvw.cpp : implementation of the CDockView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "docktool.h"
00014
00015 #include "dockdoc.h"
00016 #include "dockvw.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CDockView
00025
00026 IMPLEMENT_DYNCREATE(CDockView, CView)
00027
00028 BEGIN_MESSAGE_MAP(CDockView, CView)
00029   //{{AFX_MSG_MAP(CDockView)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CDockView construction/destruction
00037
00038 CDockView::CDockView()
00039 {
00040   // TODO: add construction code here
00041
00042 }
00043
00044 CDockView::~CDockView()
00045 {
00046 }
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CDockView drawing
00050
00051 void CDockView::OnDraw(CDC* pDC)
00052 {
00053   CDockDoc* pDoc = GetDocument();
00054   ASSERT_VALID(pDoc);
00055   pDC;    // unused right now
00056
00057   // TODO: add draw code for native data here
00058 }
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CDockView diagnostics
00062
00063 #ifdef _DEBUG
00064 void CDockView::AssertValid() const
00065 {
00066   CView::AssertValid();
00067 }
00068
00069 void CDockView::Dump(CDumpContext& dc) const
00070 {
00071   CView::Dump(dc);
00072 }
00073
00074 CDockDoc* CDockView::GetDocument() // non-debug version is inline
00075 {
00076   return STATIC_DOWNCAST(CDockDoc, m_pDocument);
00077 }
00078 #endif //_DEBUG
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CDockView message handlers
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncDoc.cpp Source File

  • general
  • mdidocvw

BncDoc.cpp

Go to the documentation of this file.
00001 // BounceDoc.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "MDI.h"
00015 #include "BncDoc.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CBounceDoc
00025
00026 IMPLEMENT_DYNCREATE(CBounceDoc, CDocument)
00027
00028 CBounceDoc::CBounceDoc()
00029 {
00030 }
00031
00032 BOOL CBounceDoc::OnNewDocument()
00033 {
00034   if (!CDocument::OnNewDocument())
00035     return FALSE;
00036
00037   m_clrBall = RGB(0, 0, 255);
00038   m_bFastSpeed = FALSE;
00039
00040   m_bBlue= 1;
00041   m_bWhite= m_bRed= 0;
00042   m_bGreen= m_bBlack= m_bCustom= 0;
00043
00044   return TRUE;
00045 }
00046
00047 CBounceDoc::~CBounceDoc()
00048 {
00049 }
00050
00051
00052 BEGIN_MESSAGE_MAP(CBounceDoc, CDocument)
00053   //{{AFX_MSG_MAP(CBounceDoc)
00054     // NOTE - the ClassWizard will add and remove mapping macros here.
00055   //}}AFX_MSG_MAP
00056 END_MESSAGE_MAP()
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CBounceDoc diagnostics
00060
00061 #ifdef _DEBUG
00062 void CBounceDoc::AssertValid() const
00063 {
00064   CDocument::AssertValid();
00065 }
00066
00067 void CBounceDoc::Dump(CDumpContext& dc) const
00068 {
00069   CDocument::Dump(dc);
00070 }
00071 #endif //_DEBUG
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CBounceDoc serialization
00075
00076 void CBounceDoc::Serialize(CArchive& ar)
00077 {
00078   if (ar.IsStoring())
00079   {
00080   }
00081   else
00082   {
00083   }
00084 }
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CBounceDoc commands
00088 void CBounceDoc::SetCustomBallColor(COLORREF clr)
00089 {
00090   m_clrBall= clr;
00091   UpdateAllViews(NULL);
00092 }
00093
00094 void CBounceDoc::SetBallRadius(CSize radius)
00095 {
00096   m_sizeRadius= radius;
00097   UpdateAllViews(NULL);
00098 }
00099
00100 void CBounceDoc::ClearAllColors()
00101 {
00102   m_bBlack= m_bBlue= m_bRed= 0;
00103   m_bWhite= m_bGreen= m_bCustom= 0;
00104 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDBVListSet Member List

This is the complete list of members for CDBVListSet, including all inherited members.
CDBVListSet(CDaoDatabase *pDatabase=NULL) | CDBVListSet |
DoFieldExchange(CDaoFieldExchange *pFX) | CDBVListSet | [virtual]
GetDefaultDBName() | CDBVListSet | [virtual]
GetDefaultSQL() | CDBVListSet | [virtual]
m_Department | CDBVListSet |
m_Division | CDBVListSet |
m_Email | CDBVListSet |
m_Location | CDBVListSet |
m_Name | CDBVListSet |
m_Phone | CDBVListSet |
m_Title | CDBVListSet |
SetFilter(CString strCurQuery) | CDBVListSet |
SetSort(LPCTSTR pszSortField) | CDBVListSet |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEnumVariant Member List

This is the complete list of members for CEnumVariant, including all inherited members.
CEnumVariant() | CEnumVariant |
Clone(IEnumVARIANT **ppenum) | CEnumVariant |
m_nCount | CEnumVariant |
m_nIndex | CEnumVariant |
m_pClonedFrom | CEnumVariant | [protected]
m_pContents | CEnumVariant |
Next(ULONG celt, VARIANT *rgvar, ULONG *pceltFetched) | CEnumVariant |
OnFinalRelease() | CEnumVariant | [virtual]
Reset() | CEnumVariant |
SetContents(VARIANT *pContents, int nCount, int nIndex=0) | CEnumVariant |
Skip(ULONG celt) | CEnumVariant |
~CEnumVariant() | CEnumVariant | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrview.cpp Source File

  • ole
  • hiersvr

svrview.cpp

Go to the documentation of this file.
00001 // svrview.cpp : implementation of the CServerView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 #include "stdafx.h"
00015 #include "afxdlgs.h"        // for FileOpen
00016 #include "hiersvr.h"
00017
00018 #include "svrdoc.h"
00019 #include "svrview.h"
00020 #include "svritem.h"
00021 #include "zoomdlg.h"
00022
00023 #ifdef _DEBUG
00024 #undef THIS_FILE
00025 static char BASED_CODE THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 CServerNode* NEAR CServerView::m_pDragNode = NULL;
00029
00030 static int ReadString(CArchive& ar, char* pString, int nMaxLen);
00031 static BOOL FindItemRect(CDC* pDC, CServerNode* pItemFind, LPRECT lpRect,
00032   CPoint& ptStart, CServerNode* pRoot);
00033 static CServerNode* HitDetect(CDC* pDC, CPoint point,
00034   CPoint& ptStart, CServerNode* pRoot);
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // support for zooming
00038
00039 static int NEAR rgiZoomFactor[] =
00040 {
00041   25, 50, 75, 100, 125, 150, 175, 200, 250, 300
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CServerView
00046
00047 IMPLEMENT_DYNCREATE(CServerView, CScrollView)
00048
00049 BEGIN_MESSAGE_MAP(CServerView, CScrollView)
00050   //{{AFX_MSG_MAP(CServerView)
00051   ON_COMMAND(ID_CHANGE_NAME, OnChangeName)
00052   ON_COMMAND(ID_ADD_NODE, OnAddNode)
00053   ON_UPDATE_COMMAND_UI(ID_CHANGE_NAME, OnUpdateHasSel)
00054   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00055   ON_WM_LBUTTONDOWN()
00056   ON_WM_RBUTTONDOWN()
00057   ON_COMMAND(ID_IMPORT_TEXT, OnImportText)
00058   ON_COMMAND(ID_VIEW_ZOOMCUSTOM, OnViewZoomCustom)
00059   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00060   ON_WM_LBUTTONDBLCLK()
00061   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00062   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste)
00063   ON_WM_CREATE()
00064   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00065   ON_COMMAND(ID_TREE_COLLAPSEBRANCH, OnTreeCollapsebranch)
00066   ON_COMMAND(ID_TREE_EXPANDALL, OnTreeExpandall)
00067   ON_COMMAND(ID_TREE_EXPANDBRANCH, OnTreeExpandbranch)
00068   ON_COMMAND(ID_TREE_EXPANDONELEVEL, OnTreeExpandonelevel)
00069   ON_UPDATE_COMMAND_UI(ID_TREE_COLLAPSEBRANCH, OnUpdateTreeCollapsebranch)
00070   ON_UPDATE_COMMAND_UI(ID_TREE_EXPANDONELEVEL, OnUpdateTreeExpandonelevel)
00071   ON_UPDATE_COMMAND_UI(ID_TREE_EXPANDALL, OnUpdateTreeExpandall)
00072   ON_UPDATE_COMMAND_UI(ID_TREE_EXPANDBRANCH, OnUpdateTreeExpandbranch)
00073   ON_WM_KEYDOWN()
00074   ON_UPDATE_COMMAND_UI(ID_ADD_NODE, OnUpdateHasSel)
00075   ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateHasSel)
00076   ON_UPDATE_COMMAND_UI(ID_IMPORT_TEXT, OnUpdateHasSel)
00077   ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateHasSel)
00078   ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR, OnUpdateHasSel)
00079   ON_WM_SIZE()
00080   //}}AFX_MSG_MAP
00081   ON_COMMAND_RANGE(ID_VIEW_ZOOM25, ID_VIEW_ZOOM300, OnZoom)
00082   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_ZOOM25, ID_VIEW_ZOOM300, OnUpdateZoom)
00083 END_MESSAGE_MAP()
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CServerView construction/destruction
00087
00088 CServerView::CServerView()
00089 {
00090   m_pSelectedNode = NULL;
00091   m_ptStart = CPoint(CX_MARGIN, CY_MARGIN);   // upper left position
00092
00093   // initialize zoom state (100% from size cache)
00094   m_zoomNum = CSize(100, 100);
00095   m_zoomDenom = CSize(100, 100);
00096   m_prevDropEffect = DROPEFFECT_NONE;
00097 }
00098
00099 CServerView::~CServerView()
00100 {
00101 }
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // Attributes -- public
00105
00106 void CServerView::SetSelection(CServerNode* pNewSel, CDC* pDC)
00107 {
00108   if (pNewSel == m_pSelectedNode)
00109     return;     // already set
00110   InvalidateItem(m_pSelectedNode, pDC);
00111   m_pSelectedNode = pNewSel;
00112   InvalidateItem(m_pSelectedNode, pDC);
00113 }
00114
00115 void CServerView::SetSelection(CServerNode* pNewSel)
00116 {
00117   CServerDC dc(this);
00118   SetSelection(pNewSel, &dc);
00119 }
00120
00121 /////////////////////////////////////////////////////////////////////////////
00122 // Operations -- public
00123
00124 void CServerView::SetScrollInfo()
00125 {
00126   CServerNode* pRoot = GetDocument()->m_pRoot;
00127   ENSURE(pRoot != NULL);
00128
00129   //BLOCK: determine new scrolling sizes
00130   CSize sizeLine;
00131   CSize sizePage;
00132   CSize sizeTotal;
00133   {
00134     CServerDC dc(this);
00135
00136     pRoot->CalcNodeSize(&dc, sizeLine);
00137     sizeLine.cx = sizeDefault.cx;
00138     sizeLine.cy += CY_SEPARATOR;
00139     sizePage.cx = sizeDefault.cx;
00140     sizePage.cy = sizeLine.cy * 10;
00141
00142     // set the scroll sizes dependent on the zoom factor
00143     dc.LPtoDP(&sizePage);
00144     dc.LPtoDP(&sizeLine);
00145     sizeTotal = CalcActualViewSize(&dc);
00146     // subtract out the right and bottom margins
00147     // these are not interesting and this way we avoid
00148     // some problems with nonlinear scaling of fonts
00149     CSize sizeMargin(CX_MARGIN, CY_MARGIN);
00150     CRect rect(CPoint(0, 0), sizeMargin);
00151     dc.LPtoDP(rect);
00152     sizeTotal -= rect.Size();
00153   }
00154
00155   SetScrollSizes(MM_TEXT, sizeTotal, sizePage, sizeLine);
00156 }
00157
00158 BOOL CServerView::SetZoomFactor(CSize zoomNum, CSize zoomDenom)
00159 {
00160   if (zoomDenom != m_zoomDenom || zoomNum != m_zoomNum)
00161   {
00162     // sync to new zoom factor
00163     m_zoomNum = zoomNum;
00164     m_zoomDenom = zoomDenom;
00165
00166     // resync to new sizes
00167     Invalidate();
00168     return TRUE;
00169   }
00170   return FALSE;
00171 }
00172
00173 void CServerView::UpdateServerView()
00174 {
00175   CServerDoc* pDoc = GetDocument();
00176   pDoc->SetModifiedFlag();
00177   pDoc->UpdateAllItems(NULL);
00178   pDoc->UpdateAllViews(NULL);
00179 }
00180
00181 CSize CServerView::CalcActualViewSize(CDC *pDC)
00182 {
00183   return CalcActualItemSize(GetDocument()->m_pRoot, pDC);
00184 }
00185
00186 CSize CServerView::CalcActualItemSize(CServerNode* pItem, CDC *pDC)
00187 {
00188   CSize sizeTotal(0, 0);
00189   CPoint ptStart = m_ptStart;
00190   pItem->CalcBounding(pDC, ptStart, sizeTotal);
00191   sizeTotal.cx += CX_MARGIN;
00192   // sizeTotal is the extent in logical coords
00193   // convert from logical to device
00194   CRect rc(CPoint(0,0),sizeTotal);
00195   pDC->LPtoDP(rc);
00196   return rc.Size();
00197 }
00198
00199 CSize CServerView::CalcScaledViewSize()
00200 {
00201   return CalcScaledItemSize(GetDocument()->m_pRoot);
00202 }
00203
00204 CSize CServerView::CalcScaledItemSize(CServerNode* pItem)
00205 {
00206   CServerDC dc(this);
00207   // set extent to 100%
00208   dc.SetViewportExt(CSize(1,1));
00209   dc.SetWindowExt(CSize(1,1));
00210
00211   CSize sizeTotal(0, 0);
00212   CPoint ptStart = m_ptStart;
00213   pItem->CalcBounding(&dc, ptStart, sizeTotal);
00214   sizeTotal.cx += CX_MARGIN;
00215   // sizeTotal is the native extent in device coords
00216   sizeTotal.cx = MulDiv(sizeTotal.cx,m_zoomNum.cx,m_zoomDenom.cx);
00217   sizeTotal.cy = MulDiv(sizeTotal.cy,m_zoomNum.cy,m_zoomDenom.cy);
00218   return sizeTotal;
00219 }
00220
00221 BOOL CServerView::DoPasteItem(COleDataObject* pDataObject)
00222 {
00223   ENSURE(pDataObject != NULL);
00224   ASSERT_VALID(this);
00225   ENSURE(m_pSelectedNode != NULL);
00226
00227   BeginWaitCursor();
00228
00229   TRY
00230   {
00231     if (pDataObject->IsDataAvailable(CServerDoc::m_cfPrivate))
00232       DoPasteNative(pDataObject);
00233     else if (pDataObject->IsDataAvailable(CF_TEXT))
00234       DoPasteText(pDataObject);
00235     else
00236       AfxThrowNotSupportedException();
00237   }
00238   CATCH_ALL(e)
00239   {
00240     // general cleanup
00241     TRACE0("failed to embed/link an OLE object\n");
00242     EndWaitCursor();
00243     return FALSE;
00244   }
00245   END_CATCH_ALL
00246
00247   EndWaitCursor();
00248   return TRUE;
00249 }
00250
00251 void CServerView::DoPasteNative(COleDataObject *pDataObject)
00252 {
00253   ASSERT(m_pSelectedNode != NULL);
00254   CServerNode* pItem = new CServerNode(GetDocument());
00255   ASSERT_VALID(pItem);
00256
00257   // get file refering to clipboard data
00258   CFile *pFile = pDataObject->GetFileData(CServerDoc::m_cfPrivate);
00259   if (pFile == NULL)
00260   {
00261     delete pItem;
00262     return;
00263   }
00264
00265   // connect the file to the archive and read the contents
00266   CArchive ar(pFile, CArchive::load);
00267   ar.m_pDocument = GetDocument(); // for COleClientItem serialize
00268   pItem->Serialize(ar);
00269   ar.Close();
00270   delete pFile;
00271
00272   // add the item to selected node
00273   m_pSelectedNode->m_listChild.AddHead(pItem);
00274   SetSelection(pItem);
00275 }
00276
00277 void CServerView::DoPasteText(COleDataObject *pDataObject)
00278 {
00279   ASSERT(m_pSelectedNode != NULL);
00280
00281   // get file refering to clipboard data
00282   CFile *pFile = pDataObject->GetFileData(CF_TEXT);
00283   if (pFile == NULL)
00284     return;
00285
00286   // connect the file to the archive and read the contents
00287   CArchive ar(pFile, CArchive::load);
00288   DoImportText(ar);
00289   ar.Close();
00290   delete pFile;
00291 }
00292
00293 void CServerView::DoImportText(CArchive &ar)
00294 {
00295   // read in lines appending items from this node
00296   char szNode[256];
00297 #ifdef _UNICODE
00298   TCHAR szT[256];
00299 #endif
00300   int nCurLevel = 0;
00301   CServerNode* parents[MAX_LEVEL];
00302   parents[0] = m_pSelectedNode;   // must have a parent at the current level
00303   CServerNode* pNewSel = NULL;
00304
00305   while (ReadString(ar, szNode, sizeof(szNode)) != NULL)
00306   {
00307     int cch = (int)strlen(szNode);
00308     if (cch == 0)
00309       continue;
00310     if (szNode[cch-1] != '\n')
00311     {
00312       AfxMessageBox(
00313         _T("Text file contains too long a line - aborting read\n"));
00314       break;      // leaves items loaded so far
00315     }
00316     szNode[cch-1] = '\0';
00317     // check the indentation level
00318     char* pch = szNode;
00319     while (*pch == '\t')
00320       pch++;
00321     int nLevel = (int)((pch - szNode)+1);
00322     ENSURE(nLevel >= 1);        // levels are 1 based, 0 is the root
00323
00324     if (*pch == '\0')
00325       continue;       // skip blank lines
00326     if (nLevel > nCurLevel + 1 || nLevel >= MAX_LEVEL)
00327     {
00328       AfxMessageBox(
00329         _T("Text file contains too many tabs = aborting read\n"));
00330       break;      // leaves items loaded so far
00331     }
00332
00333 #ifdef _UNICODE
00334     int n = MultiByteToWideChar(CP_ACP, 0, pch, -1,
00335       szT, sizeof(szT)/sizeof(szT[0]));
00336     if (n > 0)
00337       szT[n-1] = 0;
00338     parents[nLevel] = parents[nLevel-1]->CreateChildNode(szT);
00339 #else
00340     parents[nLevel] = parents[nLevel-1]->CreateChildNode(pch);
00341 #endif
00342     nCurLevel = nLevel;
00343     if (pNewSel == NULL)
00344       pNewSel = parents[nLevel];
00345   }
00346   if (nCurLevel == 0)
00347     return;     // nothing added
00348
00349   SetSelection(pNewSel);
00350   UpdateServerView();
00351 }
00352
00353 void CServerView::ScrollToItem(CServerNode *pItem, BOOL bScrollUp)
00354 {
00355   CServerDC dc(this);
00356
00357   CRect rect;
00358   CPoint ptStart = m_ptStart;
00359   if (FindItemRect(&dc, pItem, &rect, ptStart, GetDocument()->m_pRoot))
00360   {
00361     CRect rc;
00362     dc.LPtoDP(rect);
00363     if (GetDocument()->IsInPlaceActive())
00364     {
00365       CRect rcPos,rcClip;
00366       GetDocument()->GetItemPosition(&rcPos);
00367       GetDocument()->GetItemClipRect(&rcClip);
00368       rc.IntersectRect(&rcPos,&rcClip);
00369       rc.OffsetRect(-rcPos.left,-rcPos.top);
00370       if (!rc.PtInRect(rect.TopLeft()) || !rc.PtInRect(rect.BottomRight()))
00371       {
00372         CSize size(0, 0);
00373         // scroll inplace site
00374         if (bScrollUp)
00375           size.cy = rect.top - rc.top;
00376         else
00377           size.cy = rect.bottom + rcPos.top - rcClip.bottom;
00378         GetDocument()->ScrollContainerBy(size);
00379       }
00380     }
00381     else
00382     {
00383       GetClientRect(rc);
00384       if (!rc.PtInRect(rect.TopLeft()) || !rc.PtInRect(rect.BottomRight()))
00385       {
00386         CPoint ptDevScroll = GetDeviceScrollPosition();
00387         if (bScrollUp)
00388           ScrollToPosition(CPoint(0,rect.top + ptDevScroll.y));
00389         else
00390           ScrollToPosition(
00391             CPoint(0,ptDevScroll.y + rect.bottom - rc.Height()));
00392       }
00393     }
00394   }
00395 }
00396
00397 void CServerView::Locate(int nCount, BOOL bScrollUp)
00398 {
00399   CServerNode* pRoot = GetDocument()->m_pRoot;
00400   CServerNode* pItem = pRoot;
00401
00402   if (m_pSelectedNode == NULL)
00403     SetSelection(pRoot);
00404
00405   if (nCount == 0) // goto top or bottom depending on direction
00406   {
00407     if (bScrollUp)
00408       pItem = pRoot;
00409     else
00410     {
00411       while (pItem->HasChildren())
00412         pItem = (CServerNode *)(pItem->m_listChild.GetTail());
00413     }
00414   }
00415   else if (bScrollUp)
00416   {
00417     pItem = m_pSelectedNode;
00418     while (nCount--)
00419       pItem = pRoot->GetPrev(pItem);
00420   }
00421   else // going down
00422   {
00423     pItem = m_pSelectedNode;
00424     while (nCount--)
00425       pItem = pRoot->GetNext(pItem);
00426   }
00427   ScrollToItem(pItem, bScrollUp);
00428   SetSelection(pItem);
00429   UpdateWindow();
00430 }
00431
00432 void CServerView::InvalidateItem(CServerNode *pItem, CDC* pDC)
00433 {
00434   if (pItem != NULL)
00435   {
00436     CRect rect;
00437     CPoint ptStart = m_ptStart;
00438     if (FindItemRect(pDC, pItem, &rect, ptStart, GetDocument()->m_pRoot))
00439     {
00440       pDC->LPtoDP(rect);
00441       InvalidateRect(rect, FALSE);
00442     }
00443   }
00444 }
00445
00446 void CServerView::InvalidateItem(CServerNode* pItem)
00447 {
00448   CServerDC dc(this);
00449   InvalidateItem(pItem, &dc);
00450 }
00451
00452 void CServerView::ToggleSelectedItem()
00453 {
00454   if (m_pSelectedNode != NULL && m_pSelectedNode->HasChildren())
00455   {
00456     if (m_pSelectedNode->m_bHideChildren)
00457       OnTreeExpandonelevel();
00458     else
00459       OnTreeCollapsebranch();
00460   }
00461 }
00462
00463 /////////////////////////////////////////////////////////////////////////////
00464 // Implementation
00465
00466 void CServerView::OnDraw(CDC* pDC)
00467 {
00468   if (GetDocument()->DrawTree(pDC, m_ptStart, m_pSelectedNode) == -1)
00469     TRACE0("Error: CServerDoc::DrawTree failed!!\n");
00470 }
00471
00472 void CServerView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
00473 {
00474   CScrollView::OnUpdate(pSender, lHint, pHint);
00475   CServerDoc* pDoc = GetDocument();
00476   CServerNode* pRoot = pDoc->m_pRoot;
00477   ASSERT(pRoot != NULL);
00478
00479   if (m_pSelectedNode == NULL)
00480     m_pSelectedNode = pRoot;
00481
00482   if (pDoc->IsInPlaceActive())
00483   {
00484     ASSERT_VALID(pDoc->m_pRoot);
00485     CRect rect;
00486     pDoc->GetItemPosition(rect);
00487
00488     // adjust rect for new size of view
00489     rect.BottomRight() = rect.TopLeft() + CalcScaledViewSize();
00490     pDoc->RequestPositionChange(rect);
00491       // may resize the window before returning
00492   }
00493   SetScrollInfo();
00494 }
00495
00496 void CServerView::OnInitialUpdate()
00497 {
00498   // initialize zoom state (100% from size cache)
00499   m_zoomNum = CSize(100, 100);
00500   m_zoomDenom = CSize(100, 100);
00501
00502   // call base class last (will call OnUpdate)
00503   CScrollView::OnInitialUpdate();
00504 }
00505
00506 void CServerView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
00507 {
00508   CScrollView::OnPrepareDC(pDC, pInfo);
00509
00510   pDC->SetMapMode(MM_ANISOTROPIC);
00511   pDC->SetViewportExt(m_zoomNum);
00512   pDC->SetWindowExt(m_zoomDenom);
00513 }
00514
00515 void CServerView::SelectAtPoint(CPoint point, CPoint& pointHit)
00516 {
00517   CServerDC dc(this);
00518
00519   // change the selection as appropriate
00520   pointHit = m_ptStart;
00521   CServerNode* pSelection = HitDetect(&dc, point, pointHit,
00522     GetDocument()->m_pRoot);
00523
00524   // now set the selection to new hit-tested node
00525   SetSelection(pSelection, &dc);
00526 }
00527
00528 void CServerView::DoBranch(CServerNode *pItem, BOOL bHide)
00529 {
00530   if (pItem->HasChildren())
00531   {
00532     pItem->m_bHideChildren = bHide;
00533     POSITION pos = pItem->m_listChild.GetHeadPosition();
00534     while (pos != NULL)
00535       DoBranch((CServerNode *)pItem->m_listChild.GetNext(pos),bHide);
00536   }
00537 }
00538
00539 BOOL CServerView::OnDrop(COleDataObject* pDataObject, DROPEFFECT, CPoint)
00540 {
00541   ASSERT_VALID(this);
00542   OnDragLeave();
00543   if (DoPasteItem(pDataObject))
00544   {
00545     UpdateServerView();
00546     return TRUE;
00547   }
00548   else
00549     return FALSE;
00550 }
00551
00552 DROPEFFECT CServerView::OnDragEnter(COleDataObject* pDataObject,
00553   DWORD grfKeyState, CPoint point)
00554 {
00555   ASSERT(m_prevDropEffect == DROPEFFECT_NONE);
00556   return OnDragOver(pDataObject, grfKeyState, point);
00557 }
00558
00559 DROPEFFECT CServerView::OnDragOver(COleDataObject* pDataObject,
00560   DWORD grfKeyState, CPoint point)
00561 {
00562   DROPEFFECT dropEffect = DROPEFFECT_NONE;
00563   if (pDataObject->IsDataAvailable(CServerDoc::m_cfPrivate) ||
00564     pDataObject->IsDataAvailable(CF_TEXT))
00565   {
00566     CPoint pointHit;
00567     SelectAtPoint(point, pointHit);
00568     UpdateWindow();
00569     if (m_pSelectedNode != NULL)
00570     {
00571       // don't allow a node to drop on itself
00572       if (m_pDragNode == m_pSelectedNode)
00573         dropEffect = DROPEFFECT_NONE;
00574       // if drop target is a child of drag source
00575       // then don't drop
00576       else if (m_pDragNode != NULL && m_pDragNode->IsChild(m_pSelectedNode))
00577         dropEffect = DROPEFFECT_NONE;
00578       // check for force link
00579       else if ((grfKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
00580         dropEffect = DROPEFFECT_COPY;
00581       // check for force copy
00582       else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
00583         dropEffect = DROPEFFECT_COPY;
00584       // check for force move
00585       else if ((grfKeyState & MK_ALT) == MK_ALT)
00586         dropEffect = DROPEFFECT_MOVE;
00587       // if m_pDragNode == NULL then not dropping on self
00588       // so make default effect be copy
00589       // if dropping on self make default be move
00590       else
00591         dropEffect = (m_pDragNode == NULL) ? DROPEFFECT_COPY :
00592           DROPEFFECT_MOVE;
00593     }
00594   }
00595   m_prevDropEffect = dropEffect;
00596   return dropEffect;
00597 }
00598
00599 void CServerView::OnDragLeave()
00600 {
00601   m_prevDropEffect = DROPEFFECT_NONE;
00602 }
00603
00604 /////////////////////////////////////////////////////////////////////////////
00605 // CServerView commands
00606
00607 void CServerView::OnUpdateHasSel(CCmdUI* pCmdUI)
00608 {
00609   pCmdUI->Enable(m_pSelectedNode != NULL);
00610 }
00611
00612 void CServerView::OnChangeName()
00613 {
00614   if (m_pSelectedNode != NULL && m_pSelectedNode->PromptChangeNode())
00615   {
00616     GetDocument()->SetModifiedFlag();
00617     GetDocument()->UpdateAllItems(NULL);
00618     GetDocument()->UpdateAllViews(NULL);
00619   }
00620 }
00621
00622 void CServerView::OnAddNode()
00623 {
00624   if (m_pSelectedNode == NULL)
00625     AfxThrowNotSupportedException();
00626   CServerNode* pNew;
00627   if ((pNew = m_pSelectedNode->PromptNewChildNode()) == NULL)
00628     return;
00629
00630   SetSelection(pNew);
00631   UpdateServerView();
00632 }
00633
00634 void CServerView::OnEditCopy()
00635 {
00636   ASSERT_VALID(this);
00637   if (m_pSelectedNode == NULL)
00638     return;
00639
00640   // get a server item suitable to generate the clipboard data
00641        CServerItem* pItem = m_pSelectedNode->m_pServerItem;
00642        if (pItem == NULL)
00643           #pragma warning (suppress: 6014)
00644                pItem = new CServerItem(GetDocument(), m_pSelectedNode);
00645        ASSERT_VALID(pItem);
00646        pItem->CopyToClipboard(TRUE);
00647 }
00648
00649 void CServerView::OnLButtonDown(UINT, CPoint point)
00650 {
00651   // m_pDragNode != NULL only when drag in progress
00652   ASSERT(m_pDragNode == NULL);
00653   CPoint pointHit;
00654   SelectAtPoint(point, pointHit);
00655   UpdateWindow();
00656
00657   // maybe start drag drop operation on selection
00658   if (m_pSelectedNode != NULL)
00659   {
00660     // record current selection because a drop back in same view
00661     // will change the current selection
00662     m_pDragNode = m_pSelectedNode;
00663
00664     // determine rectangle of object we'll be dragging
00665     CServerDC dc(this);
00666     CSize size = CalcActualItemSize(m_pSelectedNode, &dc);
00667     CRect rect(pointHit, size);
00668
00669     // get a server item suitable to generate the clipboard data
00670       CServerItem* pItem = m_pSelectedNode->m_pServerItem;
00671       if (pItem == NULL)
00672                pItem = new CServerItem(GetDocument(), m_pSelectedNode);
00673
00674       ASSERT_VALID(pItem);
00675
00676     // rect must be in screen co-ordinates
00677     dc.LPtoDP(&rect);
00678     CPoint ptOffset = point - rect.TopLeft();
00679     ClientToScreen(&rect);
00680
00681     // drag the object
00682     if (pItem->DoDragDrop(rect, ptOffset, TRUE,
00683       DROPEFFECT_COPY | DROPEFFECT_MOVE) == DROPEFFECT_MOVE)
00684     {
00685       // the object was moved, need to delete/move depending on dest
00686       CServerDoc* pDoc = GetDocument();
00687       if (m_pSelectedNode == m_pDragNode)
00688         SetSelection(pDoc->m_pRoot->GetPrev(m_pSelectedNode));
00689       if (m_pDragNode == pDoc->m_pRoot)
00690         pDoc->m_pRoot->InitRootNode();
00691       else
00692         pDoc->m_pRoot->FindAndDelete(m_pDragNode);
00693
00694       // if drop was not back in same view clear selected node
00695       UpdateServerView();
00696     }
00697     m_pDragNode = NULL;
00698   }
00699 }
00700
00701 void CServerView::OnRButtonDown(UINT /*nFlags*/, CPoint point)
00702 {
00703   // make sure window is active
00704   GetParentFrame()->ActivateFrame();
00705
00706   CPoint pointHit;
00707   SelectAtPoint(point, pointHit); // select node first
00708   UpdateWindow();
00709
00710   int iSub;
00711   if (m_pSelectedNode == NULL ||
00712     (iSub = m_pSelectedNode->GetPopupMenuIndex()) == -1)
00713      return;  // nothing if no selection or no popup
00714
00715   CMenu popups;
00716   if (!popups.LoadMenu(IDR_POPUPS))
00717     AfxThrowResourceException();
00718   CMenu* pMenu = popups.GetSubMenu(iSub);
00719   ENSURE(pMenu != NULL);
00720
00721   ClientToScreen(&point);
00722   pMenu->TrackPopupMenu(TPM_CENTERALIGN | TPM_RIGHTBUTTON,
00723     point.x, point.y, AfxGetMainWnd());
00724 }
00725
00726 void CServerView::OnImportText()
00727 {
00728   if (m_pSelectedNode == NULL)
00729     AfxThrowNotSupportedException();
00730
00731   CFileDialog dlg(TRUE, _T("txt"), NULL,
00732     OFN_FILEMUSTEXIST | OFN_HIDEREADONLY,
00733     _T("Text Files (*.txt)|*.txt|All Files (*.*)|*.*||"));
00734   if (dlg.DoModal() != IDOK)
00735     return;                 // stay with old data file
00736
00737   CFile file;
00738   if (!file.Open(dlg.GetPathName(), CFile::modeRead))
00739   {
00740     AfxMessageBox(_T("Failed to open text file"));
00741     return;
00742   }
00743
00744   CArchive ar(&file,CArchive::load);
00745   DoImportText(ar);
00746   ar.Close();
00747   file.Close();
00748 }
00749
00750 static int ReadString(CArchive& ar, char* pString, int nMaxLen)
00751 {
00752   unsigned int nCount = 0;
00753   BYTE ch;
00754   pString[nCount] = (char)0;
00755   TRY
00756   {
00757     do
00758     {
00759       ar >> ch;
00760
00761       // watch out for ^Z (EOF under DOS)
00762       if ((char)ch == 0x1A)
00763         break;
00764
00765       // combine "\r\n" pair into single "\n"
00766       if (ch == '\n' && nCount != 0 && pString[nCount-1] == '\r')
00767         nCount--;
00768
00769       pString[nCount++] = ch;
00770
00771     } while (nCount < (unsigned int)nMaxLen-1 && ch != '\n');
00772   }
00773   END_TRY
00774
00775 #ifdef _OLD
00776   // insert newline if missing
00777   if (nCount != 0 && pString[nCount-1] != '\n' && nCount < (unsigned int)nMaxLen-1)
00778     pString[nCount++] = '\n';
00779   pString[nCount] = (char)0;
00780 #else
00781   // insert newline if missing
00782   if (nCount != 0 && pString[nCount-1] != '\n' && nCount < (unsigned int)nMaxLen-1)
00783   {
00784     if (pString[nCount-1] == '\0')
00785       pString[nCount-1] = '\n';
00786     else
00787       pString[nCount++] = '\n';
00788   }
00789   pString[nCount] = (char)0;
00790 #endif
00791   return nCount;
00792 }
00793
00794 /////////////////////////////////////////////////////////////////////////////
00795 // Zooming user interface
00796
00797 void CServerView::OnZoom(UINT nID)
00798 {
00799   ENSURE(nID >= ID_VIEW_ZOOM25 && nID <= ID_VIEW_ZOOM300);
00800
00801   CSize zoomDenom;
00802   CSize zoomNum;
00803
00804   // all of our zoom factors use denominator of 100
00805   zoomDenom.cx = 100;
00806   zoomDenom.cy = 100;
00807
00808   // get zoom factor numerator and set it
00809   ASSERT(nID-ID_VIEW_ZOOM25 < sizeof(rgiZoomFactor)/sizeof(rgiZoomFactor[0]));
00810   int iZoomFactor = rgiZoomFactor[nID-ID_VIEW_ZOOM25];
00811   zoomNum.cx = iZoomFactor;
00812   zoomNum.cy = iZoomFactor;
00813
00814   // change the zoom factor to new zoom factor
00815   SetZoomFactor(zoomNum, zoomDenom);
00816   SetScrollInfo();
00817 }
00818
00819 void CServerView::OnUpdateZoom(CCmdUI* pCmdUI)
00820 {
00821   UINT nID = pCmdUI->m_nID;
00822
00823   if (m_zoomDenom.cx == 100 && m_zoomDenom.cy == 100 &&
00824     nID != ID_VIEW_ZOOMCUSTOM)
00825   {
00826     ASSERT(nID-ID_VIEW_ZOOM25 <
00827       sizeof(rgiZoomFactor)/sizeof(rgiZoomFactor[0]));
00828     int iZoomFactor = rgiZoomFactor[nID-ID_VIEW_ZOOM25];
00829
00830     if (iZoomFactor == m_zoomNum.cx && iZoomFactor == m_zoomNum.cy)
00831     {
00832       pCmdUI->SetCheck(TRUE);
00833       return;
00834     }
00835   }
00836
00837   // default to not checked
00838   pCmdUI->SetCheck(FALSE);
00839 }
00840
00841 void CServerView::OnViewZoomCustom()
00842 {
00843   // prepare dialog data
00844   CZoomDlg dlg;
00845   dlg.m_zoomX = m_zoomNum.cx;
00846   dlg.m_zoomY = m_zoomNum.cy;
00847
00848   // launch dialog
00849   if (dlg.DoModal() == IDOK)
00850   {
00851     // set new zoom factors
00852     CSize zoomNum(dlg.m_zoomX, dlg.m_zoomY);
00853     SetZoomFactor(zoomNum, m_zoomDenom);
00854     SetScrollInfo();
00855   }
00856 }
00857
00858 /////////////////////////////////////////////////////////////////////////////
00859
00860 void CServerView::OnEditCut()
00861 {
00862   ASSERT(m_pSelectedNode != NULL);
00863   CServerDoc* pDoc = GetDocument();
00864   OnEditCopy();
00865   if (m_pSelectedNode == pDoc->m_pRoot)
00866     pDoc->m_pRoot->InitRootNode();
00867   else if (pDoc->m_pRoot->FindAndDelete(m_pSelectedNode))
00868     m_pSelectedNode = NULL;
00869   UpdateServerView();
00870 }
00871
00872 void CServerView::OnLButtonDblClk(UINT /*nFlags*/, CPoint point)
00873 {
00874   CPoint pointHit;
00875   SelectAtPoint(point, pointHit);
00876   ToggleSelectedItem();
00877 }
00878
00879 void CServerView::OnEditPaste()
00880 {
00881   COleDataObject clipboardData;
00882   clipboardData.AttachClipboard();
00883   DoPasteItem(&clipboardData);
00884   UpdateServerView();
00885 }
00886
00887 void CServerView::OnUpdateEditPaste(CCmdUI* pCmdUI)
00888 {
00889   // determine if private or standard OLE formats are on the clipboard
00890   COleDataObject dataObj;
00891   BOOL bEnable = m_pSelectedNode != NULL &&
00892     dataObj.AttachClipboard() &&
00893     (dataObj.IsDataAvailable(CServerDoc::m_cfPrivate) ||
00894      dataObj.IsDataAvailable(CF_TEXT));
00895   // enable command based on availability
00896   pCmdUI->Enable(bEnable);
00897 }
00898
00899 int CServerView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00900 {
00901   if (CScrollView::OnCreate(lpCreateStruct) == -1)
00902     return -1;
00903
00904   // register drop target
00905   m_dropTarget.Register(this);
00906
00907   // setup scroll state so it is possible to calculate the extent
00908   SetScrollSizes(MM_TEXT, CSize(0, 0));
00909
00910   return 0;
00911 }
00912
00913 void CServerView::OnEditClear()
00914 {
00915   CServerNode* pRoot = GetDocument()->m_pRoot;
00916   if (m_pSelectedNode == NULL)
00917     return;
00918   if (m_pSelectedNode == pRoot)
00919     pRoot->InitRootNode();
00920   else
00921   {
00922     CServerNode *pItem = pRoot->GetPrev(m_pSelectedNode);
00923     if (pRoot->FindAndDelete(m_pSelectedNode))
00924       m_pSelectedNode = pRoot->GetNext(pItem);
00925   }
00926   UpdateServerView();
00927 }
00928
00929 void CServerView::OnTreeCollapsebranch()
00930 {
00931   DoBranch(m_pSelectedNode,TRUE);
00932   UpdateServerView();
00933 }
00934
00935 void CServerView::OnTreeExpandall()
00936 {
00937   DoBranch(GetDocument()->m_pRoot,FALSE);
00938   UpdateServerView();
00939 }
00940
00941 void CServerView::OnTreeExpandbranch()
00942 {
00943   DoBranch(m_pSelectedNode,FALSE);
00944   UpdateServerView();
00945 }
00946
00947 void CServerView::OnTreeExpandonelevel()
00948 {
00949   if (m_pSelectedNode->HasChildren())
00950   {
00951     m_pSelectedNode->m_bHideChildren = FALSE;
00952     UpdateServerView();
00953   }
00954 }
00955
00956 void CServerView::OnUpdateTreeCollapsebranch(CCmdUI* pCmdUI)
00957 {
00958   pCmdUI->Enable(m_pSelectedNode != NULL && m_pSelectedNode->HasChildren() &&
00959     !m_pSelectedNode->m_bHideChildren);
00960 }
00961
00962 void CServerView::OnUpdateTreeExpandonelevel(CCmdUI* pCmdUI)
00963 {
00964   pCmdUI->Enable(m_pSelectedNode != NULL && m_pSelectedNode->HasChildren() &&
00965     m_pSelectedNode->m_bHideChildren);
00966 }
00967
00968 void CServerView::OnUpdateTreeExpandall(CCmdUI* pCmdUI)
00969 {
00970   pCmdUI->Enable(GetDocument()->m_pRoot != NULL &&
00971     GetDocument()->m_pRoot->HasChildren());
00972 }
00973
00974 void CServerView::OnUpdateTreeExpandbranch(CCmdUI* pCmdUI)
00975 {
00976   pCmdUI->Enable(m_pSelectedNode != NULL && m_pSelectedNode->HasChildren());
00977 }
00978
00979 void CServerView::OnKeyDown(UINT nChar, UINT /*nRepCnt*/, UINT /*nFlags*/)
00980 {
00981   switch (nChar)
00982   {
00983     case VK_RETURN:
00984       ToggleSelectedItem();
00985       break;
00986     case VK_UP:
00987       Locate(1, TRUE);
00988       break;
00989     case VK_DOWN:
00990       Locate(1, FALSE);
00991       break;
00992     case VK_HOME:
00993       Locate(0, TRUE);
00994       break;
00995     case VK_END:
00996       Locate(0, FALSE);
00997       break;
00998     case VK_PRIOR:
00999       Locate(10, TRUE);
01000       break;
01001     case VK_NEXT:
01002       Locate(10, FALSE);
01003       break;
01004   }
01005 }
01006
01007 void CServerView::OnSize(UINT nType, int cx, int cy)
01008 {
01009   // update scroll bar size before handling the size message
01010   //  (this avoids multiple updates during in-place activation)
01011   SetScrollInfo();
01012
01013   CScrollView::OnSize(nType, cx, cy);
01014 }
01015
01016 /////////////////////////////////////////////////////////////////////////////
01017 // CServerDC class -- helper for setting up and cleaning up DC
01018
01019 CServerDC::CServerDC(CServerView *pView) : CClientDC(pView)
01020 {
01021   pView->OnPrepareDC(this);
01022   pOldFont = pView->GetDocument()->SelectDocFont(this, font);
01023 }
01024
01025 CServerDC::~CServerDC()
01026 {
01027   if (pOldFont != NULL)
01028     SelectObject(pOldFont);
01029 }
01030
01031 /////////////////////////////////////////////////////////////////////////////
01032 // non-member static functions
01033
01034 // calculate the bounding rect for a given item in the context of this view
01035 static BOOL FindItemRect(CDC* pDC, CServerNode* pItemFind, LPRECT lpRect,
01036   CPoint& ptStart, CServerNode* pRoot)
01037 {
01038   ENSURE(pItemFind != NULL);
01039   ENSURE(lpRect != NULL);
01040   ENSURE(pRoot != NULL);
01041
01042   CSize sizeNode;
01043   pRoot->CalcNodeSize(pDC, sizeNode);
01044   if (pItemFind == pRoot)
01045   {
01046     // item rect does not include separator
01047     lpRect->right = (lpRect->left = ptStart.x) + sizeNode.cx;
01048     lpRect->bottom = (lpRect->top = ptStart.y) + sizeNode.cy;
01049     return TRUE;
01050   }
01051
01052   CPoint pt(CX_INDENT, CY_SEPARATOR);
01053   ptStart.x += CX_INDENT; // not essential for calculation
01054   ptStart.y += sizeNode.cy + CY_SEPARATOR;
01055
01056   // check the kids
01057   if (!pRoot->m_bHideChildren)
01058   {
01059     POSITION pos = pRoot->m_listChild.GetHeadPosition();
01060     while (pos != NULL)
01061     {
01062       CServerNode* pChild = (CServerNode*) (pRoot->m_listChild.GetNext(pos));
01063       if (FindItemRect(pDC, pItemFind, lpRect, ptStart, pChild))
01064         return TRUE;    // found
01065     }
01066   }
01067   ptStart.x -= CX_INDENT;
01068   return FALSE;
01069 }
01070
01071 // calculate the bounding rect for a given item in the context of this view
01072 static CServerNode* HitDetect(CDC* pDC, CPoint point,
01073   CPoint& ptStart, CServerNode* pRoot)
01074 {
01075   ENSURE(pRoot != NULL);
01076
01077   CSize sizeNode;
01078   pRoot->CalcNodeSize(pDC, sizeNode);
01079   CRect rect(ptStart, sizeNode);
01080   pDC->LPtoDP(rect);
01081   if (rect.PtInRect(point))
01082     return pRoot;
01083
01084   ptStart.x += CX_INDENT;
01085   ptStart.y += sizeNode.cy + CY_SEPARATOR;
01086   CPoint pt = ptStart;
01087   pDC->LPtoDP(&pt);
01088   if (pt.y >= point.y)
01089     return FALSE;       // no point in looking any lower
01090
01091   // check the kids
01092   if (!pRoot->m_bHideChildren)
01093   {
01094     POSITION pos = pRoot->m_listChild.GetHeadPosition();
01095     while (pos != NULL)
01096     {
01097       CServerNode* pChild = (CServerNode*) (pRoot->m_listChild.GetNext(pos));
01098       CServerNode* pItem = HitDetect(pDC, point, ptStart, pChild);
01099       if (pItem != NULL)
01100         return pItem;   // found
01101     }
01102   }
01103   ptStart.x -= CX_INDENT;
01104   return NULL;
01105 }
01106
01107 /////////////////////////////////////////////////////////////////////////////
01108 // CServerView diagnostics
01109
01110 #ifdef _DEBUG
01111 void CServerView::AssertValid() const
01112 {
01113   CScrollView::AssertValid();
01114 }
01115
01116 void CServerView::Dump(CDumpContext& dc) const
01117 {
01118   CScrollView::Dump(dc);
01119 }
01120 #endif //_DEBUG
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCaptionBarButton.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMCaptionBarButton.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MSMCaptionBarButton.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMCaptionBarButton.h"
00015
00016 #include "MSMVisualManager.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMSMCaptionBarButton
00026
00027 IMPLEMENT_DYNCREATE(CMSMCaptionBarButton, CMFCButton);
00028
00029 CMSMCaptionBarButton::CMSMCaptionBarButton ()
00030 {
00031   m_bDrawFocus = FALSE;
00032 }
00033
00034 CMSMCaptionBarButton::~CMSMCaptionBarButton ()
00035 {
00036 }
00037
00038 void CMSMCaptionBarButton::OnDraw (CDC* pDC, const CRect& /*rect*/, UINT /*uiState*/)
00039 {
00040   CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
00041     CMFCVisualManager::GetInstance ());
00042
00043   long nID = GetSysCommand ();
00044
00045   if (pManager == NULL || nID == 0)
00046   {
00047     ASSERT (FALSE);
00048   }
00049   else
00050   {
00051     CRect rt;
00052     GetClientRect(rt);
00053
00054     CMFCVisualManager::AFX_BUTTON_STATE state =
00055       CMFCVisualManager::ButtonsIsRegular;
00056
00057     if (m_bPushed)
00058     {
00059       state = CMFCVisualManager::ButtonsIsPressed;
00060     }
00061     else if (m_bHighlighted)
00062     {
00063       state = CMFCVisualManager::ButtonsIsHighlighted;
00064     }
00065
00066     pManager->MSMDrawCaptionButton (pDC, rt, state, nID);
00067   }
00068 }
00069
00070 UINT CMSMCaptionBarButton::GetSysCommand () const
00071 {
00072     HWND hWnd = GetSafeHwnd();
00073
00074     ASSERT(hWnd != NULL);
00075
00076     if (hWnd != NULL)
00077     {
00078         return ::GetWindowLong (hWnd, GWL_ID);
00079     }
00080
00081     return 0;
00082 }
00083
00084 void CMSMCaptionBarButton::SetSysCommand (UINT uiSysCommand)
00085 {
00086   HWND hWnd = GetSafeHwnd();
00087
00088   ASSERT(hWnd != NULL);
00089
00090   if (GetSysCommand () != uiSysCommand && hWnd != NULL)
00091   {
00092     ::SetWindowLong (hWnd, GWL_ID, uiSysCommand);
00093   }
00094 }
00095
00096 BEGIN_MESSAGE_MAP(CMSMCaptionBarButton, CMFCButton)
00097 END_MESSAGE_MAP()
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CMSMCaptionBarButton message handlers
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSmartVarDesc Member List

This is the complete list of members for CSmartVarDesc, including all inherited members.
CSmartVarDesc(ITypeInfo *pTypeInfo) | CSmartVarDesc |
m_pTypeInfo | CSmartVarDesc | [protected]
m_pVarDesc | CSmartVarDesc | [protected]
operator const VARDESC *() const | CSmartVarDesc |
operator&() | CSmartVarDesc |
operator->() | CSmartVarDesc |
Release() | CSmartVarDesc |
~CSmartVarDesc() | CSmartVarDesc |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabbedViewView Member List

This is the complete list of members for CTabbedViewView, including all inherited members.
CTabbedViewView() | CTabbedViewView | [protected]
GetDocument() | CTabbedViewView | [inline]
IsScrollBar() const | CTabbedViewView | [inline, protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CTabbedViewView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CTabbedViewView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTabbedViewView | [protected]
OnDraw(CDC *pDC) | CTabbedViewView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CTabbedViewView | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CTabbedViewView | [protected]
OnFilePrintPreview() | CTabbedViewView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CTabbedViewView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CTabbedViewView | [virtual]
~CTabbedViewView() | CTabbedViewView | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagBOXLAYOUT Member List

This is the complete list of members for tagBOXLAYOUT, including all inherited members.
cyCusp | tagBOXLAYOUT
cyEndCusp | tagBOXLAYOUT
dwReserved1 | tagBOXLAYOUT
dwReserved2 | tagBOXLAYOUT
dwReserved3 | tagBOXLAYOUT
style | tagBOXLAYOUT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpeakNDlg Member List

This is the complete list of members for CSpeakNDlg, including all inherited members.
AdvanceLesson() | CSpeakNDlg |
CSpeakNDlg(BOOL bNoPen) | CSpeakNDlg |
DoDataExchange(CDataExchange *pDX) | CSpeakNDlg | [protected]
IDD enum value | CSpeakNDlg |
InputEdit() | CSpeakNDlg | [inline, protected]
LoadLesson(LPCTSTR lpLessonName) | CSpeakNDlg |
m_biggerFont | CSpeakNDlg | [protected]
m_bNoAnswerCheck | CSpeakNDlg | [protected]
m_bNoPen | CSpeakNDlg | [protected]
m_buttonNext | CSpeakNDlg |
m_lpszNextQuestion | CSpeakNDlg |
m_pictureButton | CSpeakNDlg | [protected]
m_replayButton | CSpeakNDlg | [protected]
m_targetRes | CSpeakNDlg |
m_targetWord | CSpeakNDlg |
OnGiveUp() | CSpeakNDlg | [protected, virtual]
OnInitDialog() | CSpeakNDlg | [protected, virtual]
OnOK() | CSpeakNDlg | [protected, virtual]
OnReplaySound() | CSpeakNDlg | [protected]
OnUpdateStatus() | CSpeakNDlg | [protected]
PromptText() | CSpeakNDlg | [inline, protected]
SetAnswerText(LPCTSTR lpsz) | CSpeakNDlg | [protected]
StatusFace() | CSpeakNDlg | [inline, protected]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/stdafx.cpp Source File

  • ole
  • autoclik
  • autodriv

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAdderDialog Member List

This is the complete list of members for CAdderDialog, including all inherited members.
CAdderDialog(CWnd *pParent) | CAdderDialog |
Create() | CAdderDialog |
DoDataExchange(CDataExchange *pDX) | CAdderDialog | [protected, virtual]
IDD enum value | CAdderDialog |
m_nID | CAdderDialog | [protected]
m_pParent | CAdderDialog | [protected]
OnCancel() | CAdderDialog | [protected, virtual]
OnOK() | CAdderDialog | [protected, virtual]
PostNcDestroy() | CAdderDialog | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/ChildView.cpp Source File

  • general
  • MMXSwarm

ChildView.cpp

Go to the documentation of this file.
00001 // ChildView.cpp : implementation of the CChildView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #include "stdafx.h"
00013 #include "MMXSwarm.h"
00014 #include "ChildView.h"
00015
00016 #include "MMXSurface.h"
00017 #include "SSE2Surface.h"
00018 #include "Swarm.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CChildView
00028 BEGIN_MESSAGE_MAP(CChildView, CWnd)
00029   ON_WM_PAINT()
00030   ON_WM_SETCURSOR()
00031   ON_WM_TIMER()
00032   ON_WM_SIZE()
00033     ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
00034     ON_COMMAND(ID_FILE_SAVE, OnFileSave)
00035     ON_COMMAND(ID_VIEW_PAUSE_BLUR, OnViewPauseBlur)
00036     ON_COMMAND(ID_VIEW_PAUSE_SWARM, OnViewPauseSwarm)
00037     ON_COMMAND(ID_VIEW_PAUSE_BLIT, OnViewPauseBlit)
00038   ON_UPDATE_COMMAND_UI(ID_VIEW_PAUSE_BLUR, OnUpdatePauseBlur)
00039   ON_UPDATE_COMMAND_UI(ID_VIEW_PAUSE_SWARM, OnUpdatePauseSwarm)
00040   ON_UPDATE_COMMAND_UI(ID_VIEW_PAUSE_BLIT, OnUpdatePauseBlit)
00041   ON_UPDATE_COMMAND_UI(ID_INDICATOR_PAUSE_BLUR, OnUpdatePauseBlur)
00042   ON_UPDATE_COMMAND_UI(ID_INDICATOR_PAUSE_SWARM, OnUpdatePauseSwarm)
00043   ON_UPDATE_COMMAND_UI(ID_INDICATOR_PAUSE_BLIT, OnUpdatePauseBlit)
00044   ON_UPDATE_COMMAND_UI(ID_INDICATOR_FPS, OnUpdateFPS)
00045   ON_UPDATE_COMMAND_UI(ID_INDICATOR_RESOLUTION, OnUpdateResolution)
00046   ON_COMMAND_RANGE(IDD_16BIT_MMXINTRINSICS, IDD_32BIT_GENERICCBLUR, OnImageFormats)
00047   ON_UPDATE_COMMAND_UI_RANGE(IDD_16BIT_MMXINTRINSICS, IDD_32BIT_GENERICCBLUR, OnUpdateImageFormats)
00048   ON_WM_ERASEBKGND()
00049   ON_WM_DESTROY()
00050 END_MESSAGE_MAP()
00051
00052 CChildView::CChildView()
00053 {
00054   m_pSurface = NULL;
00055   m_dwTickStart = ::GetTickCount();
00056   m_nFrameCounter = 0;
00057   m_nFilterLoad = 0;
00058   m_nFilterSave = 0;
00059   m_bSizeChanged = false;
00060   m_bPauseBlur = false;
00061   m_bPauseSwarm = false;
00062   m_bPauseBlit = false;
00063   m_bTimerPopped = false;
00064   m_eSurf = eNone;
00065 }
00066
00067 CChildView::~CChildView()
00068 {
00069   delete m_pSurface;
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CChildView message handlers
00074
00075 BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)
00076 {
00077   if (!CWnd::PreCreateWindow(cs))
00078     return FALSE;
00079
00080   cs.dwExStyle |= WS_EX_CLIENTEDGE;
00081   cs.style &= ~WS_BORDER;
00082   cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS,
00083     ::LoadCursor(NULL, IDC_ARROW), HBRUSH(COLOR_WINDOW+1), NULL);
00084
00085   return TRUE;
00086 }
00087
00088 void CChildView::OnFileOpen()
00089 {
00090   CImage image;
00091   CString strFilter;
00092   CString strAllFilePrompt;
00093   CSimpleArray<GUID> aguidFileTypes;
00094   HRESULT hResult;
00095   INT_PTR nResult;
00096
00097   if (m_pSurface == NULL)
00098     return;
00099   VERIFY(strAllFilePrompt.LoadString(IDS_ALL_IMAGES));
00100   hResult = image.GetImporterFilterString(strFilter, aguidFileTypes, strAllFilePrompt);
00101   if(FAILED(hResult)) {
00102     CString fmt;
00103     fmt.Format(IDS_ERROR_GETEXPORTERFILTER, hResult, _com_error(hResult).ErrorMessage());
00104     ::AfxMessageBox(fmt);
00105     return;
00106   }
00107
00108   CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST, strFilter);
00109   dlg.m_ofn.nFilterIndex = m_nFilterLoad;
00110
00111   nResult = dlg.DoModal();
00112   if(nResult != IDOK) {
00113     return;
00114   }
00115
00116   m_nFilterLoad = dlg.m_ofn.nFilterIndex;
00117   hResult = image.Load(dlg.GetFileName());
00118   ASSERT(SUCCEEDED(hResult));
00119   if (SUCCEEDED(hResult)) {
00120     m_pSurface->Import(image);
00121     // Stop the weird effects
00122     m_bPauseBlur = true;
00123     m_bPauseSwarm = true;
00124   }
00125 }
00126
00127 void CChildView::OnFileSave()
00128 {
00129   CString strFilter;
00130   CSimpleArray<GUID> aguidFileTypes;
00131   CImage *pImage;
00132   CString fmt;
00133   HRESULT hResult;
00134   INT_PTR nResult;
00135
00136   pImage = m_pSurface->GetImage();
00137   ASSERT(pImage != NULL);
00138   hResult = pImage->GetExporterFilterString( strFilter, aguidFileTypes );
00139   if(FAILED(hResult)) {
00140     fmt.Format(IDS_ERROR_GETEXPORTERFILTER, hResult, _com_error(hResult).ErrorMessage());
00141     ::AfxMessageBox(fmt);
00142     return;
00143   }
00144
00145   CFileDialog dlg(FALSE, NULL, NULL,
00146     OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, strFilter);
00147   dlg.m_ofn.nFilterIndex = m_nFilterSave;
00148
00149   nResult = dlg.DoModal();
00150   if( nResult != IDOK ) {
00151     return;
00152   }
00153   m_nFilterSave = dlg.m_ofn.nFilterIndex;
00154   GUID guid = m_nFilterSave > 0 ? aguidFileTypes[m_nFilterSave-1] : GUID(GUID_NULL);
00155   CString strFileName = dlg.GetPathName();
00156   if (dlg.GetFileExt().IsEmpty()) {
00157     if (strFileName[strFileName.GetLength()-1] == '.') {
00158       strFileName = strFileName.Left(strFileName.GetLength()-1);
00159     }
00160     CString strExt;
00161     if (m_nFilterSave == 0) {
00162       strExt = _T(".jpg"); // default to JPEG
00163     }
00164     else {
00165       // Look up the first extension in the filters
00166       int nCount = (m_nFilterSave*2)-1;
00167       int nLeft = 0;
00168       while (nCount) {
00169         if (strFilter[nLeft++] == '|') {
00170           nCount--;
00171         }
00172       }
00173       ASSERT(nLeft < strFilter.GetLength());
00174       strExt = strFilter.Tokenize(_T(";|"), nLeft).MakeLower();
00175       strExt = ::PathFindExtension(strExt);
00176     }
00177     strFileName += strExt;
00178   }
00179
00180   hResult = pImage->Save(strFileName, guid);
00181   if(FAILED(hResult)) {
00182     fmt.Format(IDS_ERROR_SAVE, hResult, _com_error(hResult).ErrorMessage());
00183     ::AfxMessageBox(fmt);
00184   }
00185 }
00186
00187 void CChildView::OnImageFormats(UINT nID)
00188 {
00189   ASSERT((nID >= IDD_16BIT_MMXINTRINSICS) && (nID <= IDD_32BIT_GENERICCBLUR));
00190   m_eSurf = ESurface(nID);
00191   CreateSurface();
00192 }
00193
00194 void CChildView::OnViewPauseBlur()
00195 {
00196   m_bPauseBlur = !m_bPauseBlur;
00197 }
00198
00199 void CChildView::OnViewPauseSwarm()
00200 {
00201   m_bPauseSwarm = !m_bPauseSwarm;
00202 }
00203
00204 void CChildView::OnViewPauseBlit()
00205 {
00206   m_bPauseBlit = !m_bPauseBlit;
00207 }
00208
00209 void CChildView::OnPaint()
00210 {
00211   CPaintDC dc(this); // device context for painting
00212   // Do not call CWnd::OnPaint() for painting messages
00213   if (m_pSurface != NULL)
00214     m_pSurface->BlitBits();
00215 }
00216
00217 BOOL CChildView::OnIdle(LONG /*lCount*/)
00218 {
00219   BOOL bContinue = FALSE;
00220   if (m_pSurface == NULL)
00221     return(FALSE);
00222
00223   // Debugging helper for blur
00224   // m_pSurface->Line(CPoint(160, 120), CPoint(160, 0), RGB(255, 128, 128));
00225   // m_pSurface->Line(CPoint(80, 60), CPoint(240, 60), RGB(128, 128, 255));
00226
00227     if (::GetAsyncKeyState(VK_SHIFT) & 0x8000) {
00228         m_pSurface->RandomLine((int)Random() << 15 | Random());
00229     bContinue = TRUE;
00230     }
00231     if (::GetAsyncKeyState(VK_DELETE) & 0x8000) {
00232         m_pSurface->ClearBits();
00233     bContinue = TRUE;
00234     }
00235     if (::GetAsyncKeyState(VK_SPACE) & 0x8000) {
00236         m_pSurface->RandomBits();
00237     bContinue = TRUE;
00238     }
00239   if (::GetAsyncKeyState(VK_UP) & 0x8000) {
00240     m_pSurface->ShiftBits();
00241     bContinue = TRUE;
00242   }
00243
00244   // The guts...
00245   if (!m_bPauseBlur) {
00246     m_pSurface->BlurBits();
00247     bContinue = TRUE;
00248   }
00249
00250   if (!m_bPauseSwarm) {
00251     m_swarm.Tick();
00252     bContinue = TRUE;
00253   }
00254
00255   if (bContinue) {
00256     m_nFrameCounter++;
00257     if (!m_bPauseBlit) {
00258       m_pSurface->BlitBits();
00259     }
00260   }
00261   ::GdiFlush();
00262     return(bContinue);
00263 }
00264
00265 BOOL CChildView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00266 {
00267   // Add your message handler code here and/or call default
00268     if (nHitTest == HTCLIENT) {
00269         SetCursor(LoadCursor(NULL, IDC_CROSS));
00270         return(TRUE);
00271     }
00272
00273   return CWnd::OnSetCursor(pWnd, nHitTest, message);
00274 }
00275
00276 void CChildView::OnSize(UINT nType, int cx, int cy)
00277 {
00278   CWnd::OnSize(nType, cx, cy);
00279     if (m_hWnd && cx && cy) {
00280         TRACE("OnSize: width == %d, height == %d\n", cx, cy);
00281
00282     // Initialize screen format
00283     // First time init with an hwnd
00284     if (m_eSurf == eNone) {
00285       CClientDC dc(this);
00286       int pixels;
00287       bool bWarnDepth = false;
00288       bool bWarnDebug = false;
00289
00290       SetTimer(m_kTimerID, m_kTimerDelay, NULL);
00291       pixels = dc.GetDeviceCaps(BITSPIXEL) * dc.GetDeviceCaps(PLANES);
00292       switch (pixels) {
00293         case 16:
00294           m_eSurf = IsSSE2() ? e16BitSSE2Intrin :
00295             IsMMX() ? e16BitMMXIntrin : e16BitGeneric;
00296           break;
00297         case 24:
00298           m_eSurf =  IsSSE2() ? e24BitSSE2Intrin :
00299             IsMMX() ? e24BitMMXIntrin : e24BitGeneric;
00300           break;
00301         case 32:
00302           m_eSurf =  IsSSE2() ? e32BitSSE2Intrin :
00303             IsMMX() ? e32BitMMXIntrin : e32BitGeneric;
00304           break;
00305         default:
00306           bWarnDepth = true;
00307           m_eSurf =  IsSSE2() ? e32BitSSE2Intrin :
00308             IsMMX() ? e32BitMMXIntrin : e32BitGeneric;
00309           break;
00310       }
00311 #ifdef _DEBUG
00312       bWarnDebug = true;
00313 #endif
00314       if (bWarnDepth || bWarnDebug) {
00315         CString fmt;
00316         if (bWarnDepth) {
00317           fmt.LoadString(IDS_WARNING_BITDEPTH);
00318         }
00319         if (bWarnDepth && bWarnDebug) {
00320           fmt += "\n";
00321         }
00322         if (bWarnDebug) {
00323           CString temp;
00324           temp.LoadString(IDS_WARNING_DEBUG);
00325           fmt += temp;
00326         }
00327         ::AfxMessageBox(fmt, MB_ICONINFORMATION);
00328       }
00329
00330     }
00331
00332     m_bSizeChanged = true;
00333     CreateSurface();
00334     }
00335 }
00336
00337 void CChildView::CreateSurface()
00338 {
00339   int nBits = 0;
00340
00341   delete m_pSurface;
00342   m_pSurface = NULL;
00343
00344   switch (m_eSurf) {
00345     case e16BitSSE2Intrin:
00346       nBits = 16;
00347       m_pSurface = new CSSE2Surface16Intrinsic();
00348       break;
00349     case e16BitMMXIntrin:
00350       nBits = 16;
00351       m_pSurface = new CMMXSurface16Intrinsic();
00352       break;
00353     case e16BitGeneric:
00354       nBits = 16;
00355       m_pSurface = new CSurface();
00356       break;
00357     case e24BitSSE2Intrin:
00358       nBits = 24;
00359       m_pSurface = new CSSE2Surface24Intrinsic();
00360       break;
00361     case e24BitMMXIntrin:
00362       nBits = 24;
00363       m_pSurface = new CMMXSurface24Intrinsic();
00364       break;
00365     case e24BitGeneric:
00366       nBits = 24;
00367       m_pSurface = new CSurface();
00368       break;
00369     case e32BitSSE2Intrin:
00370       nBits = 32;
00371       m_pSurface = new CSSE2Surface32Intrinsic();
00372       break;
00373     case e32BitMMXIntrin:
00374       nBits = 32;
00375       m_pSurface = new CMMXSurface32Intrinsic();
00376       break;
00377     case e32BitGeneric:
00378       nBits = 32;
00379       m_pSurface = new CSurface();
00380       break;
00381     default:
00382       ASSERT(FALSE);
00383       break;
00384
00385   }
00386   ASSERT(m_pSurface != NULL);
00387   m_pSurface->Create(this, nBits);
00388     m_pSurface->ClearBits();
00389
00390   CRect cRect;
00391   GetClientRect(&cRect);
00392   int numLeaders = max(2, (cRect.Width()*cRect.Height())>>16);
00393   int numLlamas = numLeaders*35;
00394   m_swarm.Initialize(m_pSurface, numLeaders, numLlamas, cRect.Size());
00395 }
00396
00397 void CChildView::OnTimer(UINT_PTR nIDEvent)
00398 {
00399   nIDEvent;
00400   ASSERT(nIDEvent == m_kTimerID);
00401   // This only exists to kick the UI handler for fps.
00402   m_bTimerPopped = true;
00403 }
00404
00405 void CChildView::OnUpdateFPS(CCmdUI* pCmdUI)
00406 {
00407   if (!m_bTimerPopped) // Only update on regular intervals
00408     return;
00409
00410     DWORD dwStop = max(m_dwTickStart+1, ::GetTickCount());
00411     CString fmt;
00412     fmt.Format(_T("%d fps"), (m_nFrameCounter*1000L)/(dwStop-m_dwTickStart));
00413
00414   m_nFrameCounter = 0;
00415   m_bTimerPopped = false;
00416     m_dwTickStart = dwStop;
00417
00418   pCmdUI->SetText(fmt);
00419   pCmdUI->Enable(TRUE);
00420 }
00421
00422 void CChildView::OnUpdatePauseBlur(CCmdUI* pCmdUI)
00423 {
00424   if (pCmdUI->m_nID == ID_INDICATOR_PAUSE_BLUR) {
00425     pCmdUI->Enable(m_bPauseBlur ? FALSE : TRUE);
00426   }
00427   else {
00428     ASSERT(pCmdUI->m_nID == ID_VIEW_PAUSE_BLUR);
00429     pCmdUI->SetCheck(m_bPauseBlur ? 1 : 0);
00430     pCmdUI->Enable(TRUE);
00431   }
00432 }
00433
00434 void CChildView::OnUpdatePauseSwarm(CCmdUI* pCmdUI)
00435 {
00436   if (pCmdUI->m_nID == ID_INDICATOR_PAUSE_SWARM) {
00437     pCmdUI->Enable(m_bPauseSwarm ? FALSE : TRUE);
00438   }
00439   else {
00440     ASSERT(pCmdUI->m_nID == ID_VIEW_PAUSE_SWARM);
00441     pCmdUI->SetCheck(m_bPauseSwarm ? 1 : 0);
00442     pCmdUI->Enable(TRUE);
00443   }
00444 }
00445
00446 void CChildView::OnUpdatePauseBlit(CCmdUI* pCmdUI)
00447 {
00448   if (pCmdUI->m_nID == ID_INDICATOR_PAUSE_BLIT) {
00449     pCmdUI->Enable(m_bPauseBlit ? FALSE : TRUE);
00450   }
00451   else {
00452     ASSERT(pCmdUI->m_nID == ID_VIEW_PAUSE_BLIT);
00453     pCmdUI->SetCheck(m_bPauseBlit ? 1 : 0);
00454     pCmdUI->Enable(TRUE);
00455   }
00456 }
00457
00458 void CChildView::OnUpdateResolution(CCmdUI* pCmdUI)
00459 {
00460   if (m_bSizeChanged) {
00461     CString str;
00462     str.Format(_T("%dx%d"), m_pSurface->GetVisibleWidth(), m_pSurface->GetVisibleHeight());
00463     pCmdUI->SetText(str);
00464     m_bSizeChanged = false;
00465   }
00466   pCmdUI->Enable(TRUE);
00467 }
00468
00469 void CChildView::OnUpdateImageFormats(CCmdUI* pCmdUI)
00470 {
00471   BOOL bEnable = TRUE;
00472
00473   switch (pCmdUI->m_nID) {
00474     case IDD_16BIT_MMXINTRINSICS:
00475     case IDD_24BIT_MMXINTRINSICS:
00476     case IDD_32BIT_MMXINTRINSICS:
00477       bEnable = IsMMX();
00478       break;
00479     case IDD_16BIT_SSE2INTRINSICS:
00480     case IDD_24BIT_SSE2INTRINSICS:
00481     case IDD_32BIT_SSE2INTRINSICS:
00482       bEnable = IsSSE2();
00483       break;
00484     default:
00485       break;
00486   }
00487   if (ESurface(pCmdUI->m_nID) == m_eSurf)
00488     pCmdUI->SetCheck(1);
00489   else
00490     pCmdUI->SetCheck(0);
00491
00492   pCmdUI->Enable(bEnable);
00493 }
00494
00495 BOOL CChildView::OnEraseBkgnd(CDC* /*pDC*/)
00496 {
00497   return(TRUE);
00498 }
00499
00500 void CChildView::OnDestroy(void)
00501 {
00502   CWnd::OnDestroy();
00503   KillTimer(m_kTimerID);
00504 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/WorkspaceBar.h Source File

  • vc2008fp
  • SetPaneSize

WorkspaceBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CWorkspaceBar : public CDockablePane
00014 {
00015 public:
00016   CWorkspaceBar();
00017
00018 // Attributes
00019 protected:
00020   CTreeCtrl m_wndTree;
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026
00027 // Implementation
00028 public:
00029   virtual ~CWorkspaceBar();
00030
00031 protected:
00032   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00033   afx_msg void OnSize(UINT nType, int cx, int cy);
00034   afx_msg void OnPaint();
00035
00036   DECLARE_MESSAGE_MAP()
00037 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPage1 Member List

This is the complete list of members for CPage1, including all inherited members.
CPage1() | CPage1 |
DoDataExchange(CDataExchange *pDX) | CPage1 | [protected, virtual]
IDD enum value | CPage1 |
m_bCheck | CPage1 |
m_bMenuDefaultClick | CPage1 |
m_bMenuStayPressed | CPage1 |
m_bRightArrow | CPage1 |
m_btnCheck | CPage1 |
m_btnMenu | CPage1 |
m_btnMultiLine | CPage1 |
m_btnRadio1 | CPage1 |
m_btnRadio2 | CPage1 |
m_btnRadio3 | CPage1 |
m_btnRadio4 | CPage1 |
m_Button | CPage1 |
m_bXPButtons | CPage1 |
m_iBorderStyle | CPage1 |
m_iCursor | CPage1 |
m_iFrameRate | CPage1 |
m_iImage | CPage1 |
m_menu | CPage1 | [protected]
m_nImageLocation | CPage1 |
m_strToolTip | CPage1 |
m_wndBorder | CPage1 |
m_wndBorderLabel | CPage1 |
m_wndToolTip | CPage1 |
m_wndXPButtons | CPage1 |
OnButton() | CPage1 | [protected]
OnButtonMenu() | CPage1 | [protected]
OnDialogAbout() | CPage1 | [protected]
OnInitDialog() | CPage1 | [protected, virtual]
OnMenuDefaultClick() | CPage1 | [protected]
OnPressedOnMenu() | CPage1 | [protected]
OnResetButton() | CPage1 | [protected]
OnRightArrow() | CPage1 | [protected]
OnSetCursor() | CPage1 | [protected]
OnSetTooltip() | CPage1 | [protected]
OnUpdateItem2(CCmdUI *pCmdUI) | CPage1 | [protected]
OnXpButtons() | CPage1 | [protected]
~CPage1() | CPage1 |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CProgCtrlPage Member List

This is the complete list of members for CProgCtrlPage, including all inherited members.
CProgCtrlPage() | CProgCtrlPage |
DoDataExchange(CDataExchange *pDX) | CProgCtrlPage | [protected, virtual]
IDD enum value | CProgCtrlPage |
m_bSmooth | CProgCtrlPage |
m_bVertical | CProgCtrlPage |
m_iDelta | CProgCtrlPage |
m_Progress | CProgCtrlPage |
m_uiPos | CProgCtrlPage |
m_uiRangeFrom | CProgCtrlPage |
m_uiRangeTo | CProgCtrlPage |
m_uiStep | CProgCtrlPage |
OnFrom() | CProgCtrlPage | [protected]
OnInitDialog() | CProgCtrlPage | [protected, virtual]
OnProgressSetdelta() | CProgCtrlPage | [protected]
OnProgressStepit() | CProgCtrlPage | [protected]
OnSetpos() | CProgCtrlPage | [protected]
OnStep() | CProgCtrlPage | [protected]
OnStyleChange() | CProgCtrlPage | [protected]
OnTo() | CProgCtrlPage | [protected]
~CProgCtrlPage() | CProgCtrlPage |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/MainFrm.cpp Source File

  • general
  • spiro

MainFrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "spiro.h"
00014
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030   ON_WM_CREATE()
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 static UINT indicators[] =
00035 {
00036   ID_SEPARATOR,           // status line indicator
00037   ID_INDICATOR_CAPS,
00038   ID_INDICATOR_NUM,
00039   ID_INDICATOR_SCRL,
00040 };
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CMainFrame construction/destruction
00044
00045 CMainFrame::CMainFrame()
00046 {
00047   // TODO: add member initialization code here
00048
00049 }
00050
00051 CMainFrame::~CMainFrame()
00052 {
00053 }
00054
00055 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00056 {
00057   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00058     return -1;
00059
00060   if (!m_wndToolBar.Create(this) ||
00061     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME) ||
00062     !m_wndToolBarSpiro.Create(this) ||
00063     !m_wndToolBarSpiro.LoadToolBar(IDR_PIECES))
00064   {
00065     TRACE0("Failed to create toolbars\n");
00066     return -1;      // fail to create
00067   }
00068
00069   if (!m_wndStatusBar.Create(this) ||
00070     !m_wndStatusBar.SetIndicators(indicators,
00071       sizeof(indicators)/sizeof(UINT)))
00072   {
00073     TRACE0("Failed to create status bar\n");
00074     return -1;      // fail to create
00075   }
00076
00077   // TODO: Remove this if you don't want tool tips or a resizeable toolbar
00078   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00079     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00080
00081   m_wndToolBarSpiro.SetBarStyle(m_wndToolBarSpiro.GetBarStyle() |
00082     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00083
00084   // TODO: Delete these three lines if you don't want the toolbar to
00085   //  be dockable
00086   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00087   m_wndToolBarSpiro.EnableDocking(CBRS_ALIGN_ANY);
00088
00089   EnableDocking(CBRS_ALIGN_ANY);
00090
00091   UINT rgID[] = {ID_HUGERING, ID_VERYLARGERING, ID_MEDIUMRING,
00092         ID_SMALLRING, ID_ENORMOUSWHEEL, ID_HUGEWHEEL,
00093         ID_VERYLARGEWHEEL, ID_LARGEWHEEL, ID_MEDIUMWHEEL,
00094         ID_SMALLWHEEL, ID_TINYWHEEL};
00095
00096   int nIndex;
00097   int i;
00098   for (i = 0; i < elementsof(rgID); i++)
00099   {
00100     VERIFY((nIndex = m_wndToolBarSpiro.CommandToIndex(rgID[i])) != -1);
00101     m_wndToolBarSpiro.SetButtonStyle(nIndex, TBBS_CHECKBOX);
00102   }
00103
00104   UINT rgID2[] = {ID_BLUE, ID_RED, ID_YELLOW, ID_GREEN, ID_PURPLE, ID_BLACK, ID_TRACEWIDTH};
00105   for (i = 0; i < elementsof(rgID2); i++)
00106   {
00107     VERIFY((nIndex = m_wndToolBar.CommandToIndex(rgID2[i])) != -1);
00108     m_wndToolBar.SetButtonStyle(nIndex, TBBS_CHECKBOX);
00109   }
00110
00111   m_wndToolBar.GetToolBarCtrl().CheckButton(ID_BLACK);
00112   VERIFY((nIndex = m_wndToolBar.CommandToIndex(ID_TRACEWIDTH)) != -1);
00113   m_wndToolBar.SetButtonStyle(nIndex, TBBS_CHECKBOX);
00114
00115   DockControlBar(&m_wndToolBar);
00116   DockControlBar(&m_wndToolBarSpiro);
00117
00118   return 0;
00119 }
00120
00121 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00122 {
00123   // TODO: Modify the Window class or styles here by modifying
00124   //  the CREATESTRUCT cs
00125
00126   return CFrameWnd::PreCreateWindow(cs);
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CMainFrame diagnostics
00131
00132 #ifdef _DEBUG
00133 void CMainFrame::AssertValid() const
00134 {
00135   CFrameWnd::AssertValid();
00136 }
00137
00138 void CMainFrame::Dump(CDumpContext& dc) const
00139 {
00140   CFrameWnd::Dump(dc);
00141 }
00142
00143 #endif //_DEBUG
00144
00145 /////////////////////////////////////////////////////////////////////////////
00146 // CMainFrame message handlers
00147
00148
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/WorkspaceBar.cpp Source File

  • vc2008fp
  • SetPaneSize

WorkspaceBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "SetPaneSize.h"
00013 #include "WorkspaceBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 const int nBorderSize = 1;
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CWorkspaceBar
00025
00026 BEGIN_MESSAGE_MAP(CWorkspaceBar, CDockablePane)
00027   ON_WM_CREATE()
00028   ON_WM_SIZE()
00029   ON_WM_PAINT()
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CWorkspaceBar construction/destruction
00034
00035 CWorkspaceBar::CWorkspaceBar()
00036 {
00037   // TODO: add one-time construction code here
00038
00039 }
00040
00041 CWorkspaceBar::~CWorkspaceBar()
00042 {
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CWorkspaceBar message handlers
00047
00048 int CWorkspaceBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00049 {
00050   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00051     return -1;
00052
00053   CRect rectDummy;
00054   rectDummy.SetRectEmpty ();
00055
00056   // Create tree windows.
00057   // TODO: create your own tab windows here:
00058   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
00059                 TVS_LINESATROOT | TVS_HASBUTTONS;
00060
00061   if (!m_wndTree.Create (dwViewStyle, rectDummy, this, 1))
00062   {
00063     TRACE0("Failed to create workspace view\n");
00064     return -1;      // fail to create
00065   }
00066
00067   // Setup trees content:
00068   HTREEITEM hRoot1 = m_wndTree.InsertItem (_T("Root 1"));
00069   m_wndTree.InsertItem (_T("Item 1"), hRoot1);
00070   m_wndTree.InsertItem (_T("Item 2"), hRoot1);
00071
00072   return 0;
00073 }
00074
00075 void CWorkspaceBar::OnSize(UINT nType, int cx, int cy)
00076 {
00077   CDockablePane::OnSize(nType, cx, cy);
00078
00079   // Tab control should cover a whole client area:
00080   m_wndTree.SetWindowPos (NULL, nBorderSize, nBorderSize,
00081     cx - 2 * nBorderSize, cy - 2 * nBorderSize,
00082     SWP_NOACTIVATE | SWP_NOZORDER);
00083 }
00084
00085 void CWorkspaceBar::OnPaint()
00086 {
00087   CPaintDC dc(this); // device context for painting
00088
00089   CRect rectTree;
00090   m_wndTree.GetWindowRect (rectTree);
00091   ScreenToClient (rectTree);
00092
00093   rectTree.InflateRect (nBorderSize, nBorderSize);
00094   dc.Draw3dRect (rectTree,  ::GetSysColor (COLOR_3DSHADOW),
00095                 ::GetSysColor (COLOR_3DSHADOW));
00096 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/MyScheduler.h Source File

  • internet
  • Scheduler

MyScheduler.h

Go to the documentation of this file.
00001 // File: MyScheduler.h
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #ifndef __MYSCHEDULER_H_
00011 #define __MYSCHEDULER_H_
00012
00013 #pragma once
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CMyScheduler command target
00017
00018 class CMyScheduler : public CObject
00019 {
00020 public:
00021   CMyScheduler();
00022   virtual ~CMyScheduler();
00023   virtual void Serialize( CArchive& ar );
00024   const CMyScheduler& operator=(const CMyScheduler& scheduler);
00025
00026   int m_iMonth;
00027   int m_iDay;
00028   int m_iYear;
00029   int m_iStartHour;
00030   int m_iStartMinutes;
00031   int m_iEndHour;
00032   int m_iEndMinutes;
00033   int m_iId;
00034   CString m_szTitle;
00035   CString m_szDescription;
00036
00037 protected:
00038   DECLARE_SERIAL( CMyScheduler )
00039 };
00040
00041 #endif
00042
00043 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autodriv.h Source File

  • ole
  • acdual
  • acdualdriv

autodriv.h

Go to the documentation of this file.
00001 // autodriv.h : main header file for the AUTODRIV application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CAutoDrivApp:
00020 // See autodriv.cpp for the implementation of this class
00021 //
00022
00023 class CAutoDrivApp : public CWinApp
00024 {
00025 public:
00026   CAutoDrivApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CAutoDrivApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CAutoDrivApp)
00038     // NOTE - the ClassWizard will add and remove member functions here.
00039     //    DO NOT EDIT what you see in these blocks of generated code !
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/StdAfx.cpp Source File

  • vc2008fp
  • DesktopAlertDemo

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  DesktopAlertDemo.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikvw.cpp Source File

  • ole
  • autoclik

aclikvw.cpp

Go to the documentation of this file.
00001 // AClikVw.cpp : implementation of the CAutoClickView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "AClikDoc.h"
00016 #include "AClikVw.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CAutoClickView
00026
00027 IMPLEMENT_DYNCREATE(CAutoClickView, CView)
00028
00029 BEGIN_MESSAGE_MAP(CAutoClickView, CView)
00030   //{{AFX_MSG_MAP(CAutoClickView)
00031   ON_WM_LBUTTONDOWN()
00032   //}}AFX_MSG_MAP
00033   // Standard printing commands
00034   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00035   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00036   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CAutoClickView construction/destruction
00041
00042 CAutoClickView::CAutoClickView()
00043 {
00044   // TODO: add construction code here
00045
00046 }
00047
00048 CAutoClickView::~CAutoClickView()
00049 {
00050 }
00051
00052 BOOL CAutoClickView::PreCreateWindow(CREATESTRUCT& cs)
00053 {
00054   // TODO: Modify the Window class or styles here by modifying
00055   //  the CREATESTRUCT cs
00056
00057   return CView::PreCreateWindow(cs);
00058 }
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CAutoClickView drawing
00062
00063 void CAutoClickView::OnDraw(CDC* pDC)
00064 {
00065   CAutoClickDoc* pDoc = GetDocument();
00066   ASSERT_VALID(pDoc);
00067
00068   pDC->TextOut(pDoc->m_pt.x, pDoc->m_pt.y, pDoc->m_str);
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CAutoClickView printing
00073
00074 BOOL CAutoClickView::OnPreparePrinting(CPrintInfo* pInfo)
00075 {
00076   // default preparation
00077   return DoPreparePrinting(pInfo);
00078 }
00079
00080 void CAutoClickView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00081 {
00082   // TODO: add extra initialization before printing
00083 }
00084
00085 void CAutoClickView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00086 {
00087   // TODO: add cleanup after printing
00088 }
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CAutoClickView diagnostics
00092
00093 #ifdef _DEBUG
00094 void CAutoClickView::AssertValid() const
00095 {
00096   CView::AssertValid();
00097 }
00098
00099 void CAutoClickView::Dump(CDumpContext& dc) const
00100 {
00101   CView::Dump(dc);
00102 }
00103
00104 CAutoClickDoc* CAutoClickView::GetDocument() // non-debug version is inline
00105 {
00106   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAutoClickDoc)));
00107   return (CAutoClickDoc*)m_pDocument;
00108 }
00109 #endif //_DEBUG
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CAutoClickView message handlers
00113
00114 void CAutoClickView::OnLButtonDown(UINT nFlags, CPoint point)
00115 {
00116   CAutoClickDoc* pDoc = GetDocument();
00117   pDoc->m_pt = point;
00118   pDoc->Refresh();
00119
00120   CView::OnLButtonDown(nFlags, point);
00121 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMMXSwarmApp Member List

This is the complete list of members for CMMXSwarmApp, including all inherited members.
CMMXSwarmApp() | CMMXSwarmApp |
InitInstance() | CMMXSwarmApp | [virtual]
m_pView | CMMXSwarmApp | [private]
OnAppAbout() | CMMXSwarmApp |
OnIdle(LONG lCount) | CMMXSwarmApp | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpinCtrlPage Member List

This is the complete list of members for CSpinCtrlPage, including all inherited members.
CreateSpinCtrl() | CSpinCtrlPage | [protected]
CSpinCtrlPage() | CSpinCtrlPage |
DoDataExchange(CDataExchange *pDX) | CSpinCtrlPage | [protected, virtual]
IDD enum value | CSpinCtrlPage |
m_bArrowkeys | CSpinCtrlPage |
m_bAutobuddy | CSpinCtrlPage |
m_bNothousands | CSpinCtrlPage |
m_bSetbuddyint | CSpinCtrlPage |
m_bWrap | CSpinCtrlPage |
m_EditRect | CSpinCtrlPage |
m_iAlignment | CSpinCtrlPage |
m_iOrientation | CSpinCtrlPage |
m_Spin | CSpinCtrlPage |
m_uiRangeFrom | CSpinCtrlPage |
m_uiRangeTo | CSpinCtrlPage |
OnAnyChange() | CSpinCtrlPage | [protected]
OnApply() | CSpinCtrlPage | [protected, virtual]
OnInitDialog() | CSpinCtrlPage | [protected, virtual]
~CSpinCtrlPage() | CSpinCtrlPage |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemo.cpp Source File

  • vc2008fp
  • StatusBarDemo

StatusBarDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StatusBarDemo.h"
00013
00014 #include "MainFrm.h"
00015 #include "StatusBarDemoDoc.h"
00016 #include "StatusBarDemoView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CStatusBarDemoApp
00026
00027 BEGIN_MESSAGE_MAP(CStatusBarDemoApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CStatusBarDemoApp construction
00038
00039 CStatusBarDemoApp::CStatusBarDemoApp() :
00040   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00041 {
00042   // TODO: add construction code here,
00043   // Place all significant initialization in InitInstance
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CStatusBarDemoApp object
00048
00049 CStatusBarDemoApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CStatusBarDemoApp initialization
00053
00054 BOOL CStatusBarDemoApp::InitInstance()
00055 {
00056   // Initialize OLE libraries
00057   if (!AfxOleInit())
00058   {
00059     AfxMessageBox(IDP_OLE_INIT_FAILED);
00060     return FALSE;
00061   }
00062
00063   AfxEnableControlContainer();
00064
00065   // Standard initialization
00066   // If you are not using these features and wish to reduce the size
00067   //  of your final executable, you should remove from the following
00068   //  the specific initialization routines you do not need.
00069
00070   // Change the registry key under which our settings are stored.
00071   // TODO: You should modify this string to be something appropriate
00072   // such as the name of your company or organization.
00073   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00074
00075   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00076
00077   SetRegistryBase (_T("Settings"));
00078
00079   // Initialize all Managers for usage. They are automatically constructed
00080   // if not yet present
00081   InitContextMenuManager();
00082   InitKeyboardManager();
00083
00084   // Register the application's document templates.  Document templates
00085   //  serve as the connection between documents, frame windows and views.
00086
00087   CSingleDocTemplate* pDocTemplate;
00088   pDocTemplate = new CSingleDocTemplate(
00089     IDR_MAINFRAME,
00090     RUNTIME_CLASS(CStatusBarDemoDoc),
00091     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00092     RUNTIME_CLASS(CStatusBarDemoView));
00093   AddDocTemplate(pDocTemplate);
00094
00095   // Parse command line for standard shell commands, DDE, file open
00096   CCommandLineInfo cmdInfo;
00097   ParseCommandLine(cmdInfo);
00098
00099   // Dispatch commands specified on the command line
00100   if (!ProcessShellCommand(cmdInfo))
00101     return FALSE;
00102
00103   // The one and only window has been initialized, so show and update it.
00104   m_pMainWnd->ShowWindow(SW_SHOW);
00105   m_pMainWnd->UpdateWindow();
00106
00107   if (afxGlobalData.m_nBitsPerPixel < 16)
00108   {
00109     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00110   }
00111
00112   return TRUE;
00113 }
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // CStatusBarDemoApp message handlers
00117
00118 int CStatusBarDemoApp::ExitInstance()
00119 {
00120   return CWinAppEx::ExitInstance();
00121 }
00122
00123 void CStatusBarDemoApp::PreLoadState ()
00124 {
00125
00126   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00127
00128   // TODO: add another context menus here
00129 }
00130
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CAboutDlg dialog used for App About
00134
00135 class CAboutDlg : public CDialog
00136 {
00137 public:
00138   CAboutDlg();
00139
00140 // Dialog Data
00141   //{{AFX_DATA(CAboutDlg)
00142   enum { IDD = IDD_ABOUTBOX };
00143   //}}AFX_DATA
00144
00145   // ClassWizard generated virtual function overrides
00146   //{{AFX_VIRTUAL(CAboutDlg)
00147   protected:
00148   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00149   //}}AFX_VIRTUAL
00150
00151 // Implementation
00152 protected:
00153   //{{AFX_MSG(CAboutDlg)
00154     // No message handlers
00155   //}}AFX_MSG
00156   DECLARE_MESSAGE_MAP()
00157 };
00158
00159 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00160 {
00161   //{{AFX_DATA_INIT(CAboutDlg)
00162   //}}AFX_DATA_INIT
00163 }
00164
00165 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00166 {
00167   CDialog::DoDataExchange(pDX);
00168   //{{AFX_DATA_MAP(CAboutDlg)
00169   //}}AFX_DATA_MAP
00170 }
00171
00172 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00173   //{{AFX_MSG_MAP(CAboutDlg)
00174     // No message handlers
00175   //}}AFX_MSG_MAP
00176 END_MESSAGE_MAP()
00177
00178 // App command to run the dialog
00179 void CStatusBarDemoApp::OnAppAbout()
00180 {
00181   CAboutDlg aboutDlg;
00182   aboutDlg.DoModal();
00183 }
00184
00185 /////////////////////////////////////////////////////////////////////////////
00186 // CStatusBarDemoApp message handlers
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/stdafx.cpp Source File

  • controls
  • cmnctrl

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // CmnCtrl3.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/subtest.cpp Source File

  • general
  • ctrltest

subtest.cpp

Go to the documentation of this file.
00001 // subedit.cpp : SubClassed Edit control example
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 #include "paredit.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // Dialog class
00019
00020 class CSubEditDlg : public CDialog
00021 {
00022 protected:
00023   CParsedEdit edit1, edit2, edit3, edit4;
00024 public:
00025   //{{AFX_DATA(CSubEditDlg)
00026     enum { IDD = IDD_SUB_EDIT };
00027   //}}AFX_DATA
00028   CSubEditDlg()
00029     : CDialog(CSubEditDlg::IDD)
00030       { }
00031
00032   BOOL OnInitDialog();
00033   //{{AFX_MSG(CSubEditDlg)
00034     virtual void OnOK();
00035   //}}AFX_MSG
00036   DECLARE_MESSAGE_MAP()
00037 };
00038
00039 BEGIN_MESSAGE_MAP(CSubEditDlg, CDialog)
00040   //{{AFX_MSG_MAP(CSubEditDlg)
00041   //}}AFX_MSG_MAP
00042 END_MESSAGE_MAP()
00043
00044
00045 BOOL CSubEditDlg::OnInitDialog()
00046 {
00047   edit1.SubclassEdit(IDC_EDIT1, this, PES_LETTERS);
00048   edit2.SubclassEdit(IDC_EDIT2, this, PES_NUMBERS);
00049   edit3.SubclassEdit(IDC_EDIT3, this, PES_NUMBERS | PES_LETTERS);
00050   edit4.SubclassEdit(IDC_EDIT4, this, PES_ALL);
00051   return TRUE;
00052 }
00053
00054 void CSubEditDlg::OnOK()
00055 {
00056 #ifdef _DEBUG
00057   // dump results, normally you would do something with these
00058   CString s;
00059   edit1.GetWindowText(s);
00060   TRACE1("edit1 = '%s'\n", s);
00061   edit2.GetWindowText(s);
00062   TRACE1("edit2 = '%s'\n", s);
00063   edit3.GetWindowText(s);
00064   TRACE1("edit3 = '%s'\n", s);
00065   edit4.GetWindowText(s);
00066   TRACE1("edit4 = '%s'\n", s);
00067 #endif
00068
00069   EndDialog(IDOK);
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // Run the test
00074
00075 void CTestWindow::OnTestSubclassedEdit()
00076 {
00077   TRACE0("running dialog containing edit items aliased to ParsedEdits\n");
00078   CSubEditDlg dlg;
00079   dlg.DoModal();
00080 }
00081
00082
00083 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CChangeNameDlg Member List

This is the complete list of members for CChangeNameDlg, including all inherited members.
CChangeNameDlg(CWnd *pParent=NULL) | CChangeNameDlg |
DoDataExchange(CDataExchange *pDX) | CChangeNameDlg | [protected, virtual]
IDD enum value | CChangeNameDlg |
m_btnOK | CChangeNameDlg |
m_editDescription | CChangeNameDlg |
m_shape | CChangeNameDlg |
m_strDescription | CChangeNameDlg |
m_strLinkKey | CChangeNameDlg |
OnChange() | CChangeNameDlg | [protected]
OnInitDialog() | CChangeNameDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CImageCtrl Member List

This is the complete list of members for CImageCtrl, including all inherited members.
AboutBox() | CImageCtrl | [protected]
AutoSize() | CImageCtrl |
CImageCtrl() | CImageCtrl |
DECLARE_OLECREATE_EX(CImageCtrl) DECLARE_OLETYPELIB(CImageCtrl) DECLARE_PROPPAGEIDS(CImageCtrl) DECLARE_OLECTLTYPE(CImageCtrl) BOOL m_bAutoSize | CImageCtrl | [protected]
dispidAutoSize enum value | CImageCtrl |
dispidImagePath enum value | CImageCtrl |
DoPropExchange(CPropExchange *pPX) | CImageCtrl | [virtual]
GetControlFlags() | CImageCtrl | [virtual]
GetImagePath() | CImageCtrl | [protected]
InformDlStatus(CBitmapProperty::DLState dlState) | CImageCtrl |
InformSize() | CImageCtrl |
m_bitprop | CImageCtrl |
OnAutoSizeChanged() | CImageCtrl | [protected]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CImageCtrl | [virtual]
OnResetState() | CImageCtrl | [virtual]
SetImagePath(LPCTSTR lpszNewValue) | CImageCtrl | [protected]
~CImageCtrl() | CImageCtrl | [protected]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/targetver.h Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

targetver.h

Go to the documentation of this file.
00001
00002 #pragma once
00003
00004 // The following macros define the minimum required platform.  The minimum required platform
00005 // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
00006 // your application.  The macros work by enabling all features available on platform versions up to and
00007 // including the version specified.
00008
00009 // Modify the following defines if you have to target a platform prior to the ones specified below.
00010 // Refer to MSDN for the latest info on corresponding values for different platforms.
00011 #ifndef WINVER                          // Specifies that the minimum required platform is Windows Vista.
00012 #define WINVER 0x0600           // Change this to the appropriate value to target other versions of Windows.
00013 #endif
00014
00015 #ifndef _WIN32_WINNT            // Specifies that the minimum required platform is Windows Vista.
00016 #define _WIN32_WINNT 0x0600     // Change this to the appropriate value to target other versions of Windows.
00017 #endif
00018
00019 #ifndef _WIN32_WINDOWS          // Specifies that the minimum required platform is Windows 98.
00020 #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
00021 #endif
00022
00023 #ifndef _WIN32_IE                       // Specifies that the minimum required platform is Internet Explorer 7.0.
00024 #define _WIN32_IE 0x0700        // Change this to the appropriate value to target other versions of IE.
00025 #endif
00026
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/InsCtlDg.Cpp Source File

  • ole
  • TstCon

InsCtlDg.Cpp

Go to the documentation of this file.
00001 // InsertControlDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CInsertControlDlg dialog
00022
00023
00024 CInsertControlDlg::CInsertControlDlg( CWnd* pParent ) :
00025    CDialog( CInsertControlDlg::IDD, pParent ),
00026    m_clsid( CLSID_NULL )
00027 {
00028   //{{AFX_DATA_INIT(CInsertControlDlg)
00029     // NOTE: the ClassWizard will add member initialization here
00030   //}}AFX_DATA_INIT
00031 }
00032
00033
00034 void CInsertControlDlg::DoDataExchange(CDataExchange* pDX)
00035 {
00036    int iItem;
00037    POSITION posControl;
00038
00039   CDialog::DoDataExchange(pDX);
00040   //{{AFX_DATA_MAP(CInsertControlDlg)
00041   DDX_Control(pDX, IDC_SERVERPATH, m_staticServerPath);
00042   DDX_Control(pDX, IDC_REQUIREDCATEGORIES, m_butRequiredCategories);
00043   DDX_Control(pDX, IDC_IGNOREREQUIREDCATEGORIES, m_butIgnoreRequiredCategories);
00044   DDX_Control(pDX, IDOK, m_butOK);
00045   DDX_Control(pDX, IDC_CONTROLS, m_lbControls);
00046   //}}AFX_DATA_MAP
00047
00048    if( pDX->m_bSaveAndValidate )
00049    {
00050     iItem = m_lbControls.GetCurSel();
00051     if( iItem == LB_ERR )
00052     {
00053      m_clsid = CLSID_NULL;
00054     }
00055     else
00056     {
00057      posControl = POSITION( m_lbControls.GetItemDataPtr( iItem ) );
00058      ASSERT( posControl != NULL );
00059      m_clsid = m_lControls.GetAt( posControl );
00060     }
00061    }
00062 }
00063
00064
00065 BEGIN_MESSAGE_MAP(CInsertControlDlg, CDialog)
00066   //{{AFX_MSG_MAP(CInsertControlDlg)
00067   ON_BN_CLICKED(IDC_IMPLEMENTEDCATEGORIES, OnImplementedCategories)
00068   ON_LBN_DBLCLK(IDC_CONTROLS, OnControlsDblClk)
00069   ON_BN_CLICKED(IDC_REQUIREDCATEGORIES, OnRequiredCategories)
00070   ON_LBN_SELCHANGE(IDC_CONTROLS, OnControlsSelChange)
00071   ON_BN_CLICKED(IDC_IGNOREREQUIREDCATEGORIES, OnIgnoreRequiredCategories)
00072   ON_WM_HELPINFO()
00073   ON_WM_CONTEXTMENU()
00074   //}}AFX_MSG_MAP
00075 END_MESSAGE_MAP()
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // CInsertControlDlg message handlers
00079
00080 BOOL CInsertControlDlg::OnInitDialog()
00081 {
00082    HRESULT hResult;
00083    CATID catid;
00084
00085    hResult = m_pCatInfo.CreateInstance( CLSID_StdComponentCategoriesMgr, NULL,
00086     CLSCTX_INPROC_SERVER );
00087    if( FAILED( hResult ) )
00088    {
00089     TRACE( "Failed to create category manager\n" );
00090     EndDialog( IDCANCEL );
00091     return( TRUE );
00092    }
00093
00094   CDialog::OnInitDialog();
00095
00096    catid = CATID_Control;
00097    m_aImplementedCategories.Add( catid );
00098
00099    m_butIgnoreRequiredCategories.SetCheck( 0 );
00100
00101    m_lbControls.ModifyStyle( 0, WS_HSCROLL );
00102
00103    RefreshControlList();
00104
00105    m_lbControls.SetFocus();
00106
00107   return( FALSE );
00108 }
00109
00110 void GetClassServerPath( REFCLSID clsid, CString& strServerPath )
00111 {
00112    HKEY hKey;
00113    HKEY hServerKey;
00114    OLECHAR szCLSID[64];
00115    LONG nResult;
00116    ULONG nBytes;
00117    DWORD dwType;
00118    LPTSTR pszServerPath;
00119
00120    StringFromGUID2( clsid, szCLSID, 64 );
00121
00122    hKey = NULL;
00123    hServerKey = NULL;
00124    try
00125    {
00126     nResult = RegOpenKeyEx( HKEY_CLASSES_ROOT, CString( "CLSID\\" )+CString(
00127      szCLSID ), 0, KEY_READ, &hKey );
00128     if( nResult != ERROR_SUCCESS )
00129     {
00130      throw( E_FAIL );
00131     }
00132
00133     nResult = RegOpenKeyEx( hKey, _T( "InprocServer32" ), 0, KEY_READ,
00134      &hServerKey );
00135     if( nResult != ERROR_SUCCESS )
00136     {
00137      nResult = RegOpenKeyEx( hKey, _T( "InprocHandler32" ), 0, KEY_READ,
00138       &hServerKey );
00139      if( nResult != ERROR_SUCCESS )
00140      {
00141       nResult = RegOpenKeyEx( hKey, _T( "LocalServer32" ), 0, KEY_READ,
00142          &hServerKey );
00143       if( nResult != ERROR_SUCCESS )
00144       {
00145          throw( E_FAIL );
00146       }
00147      }
00148     }
00149
00150     nBytes = 0;
00151     nResult = RegQueryValueEx( hServerKey, NULL, NULL, &dwType, NULL,
00152      &nBytes );
00153     if( (nResult != ERROR_SUCCESS) || (dwType != REG_SZ) )
00154     {
00155      throw( E_FAIL );
00156     }
00157     pszServerPath = LPTSTR( _alloca( nBytes ) );
00158     nResult = RegQueryValueEx( hServerKey, NULL, NULL, &dwType,
00159      LPBYTE( pszServerPath ), &nBytes );
00160     if( (nResult != ERROR_SUCCESS) || (dwType != REG_SZ) )
00161     {
00162      throw( E_FAIL );
00163     }
00164
00165     strServerPath = pszServerPath;
00166
00167     RegCloseKey( hKey );
00168     hKey = NULL;
00169     RegCloseKey( hServerKey );
00170     hServerKey = NULL;
00171    }
00172    catch( HRESULT )
00173    {
00174     if( hKey != NULL )
00175     {
00176      RegCloseKey( hKey );
00177     }
00178     if( hServerKey != NULL )
00179     {
00180      RegCloseKey( hServerKey );
00181     }
00182
00183     LOAD_STRING_FROM_RESOURCE( strServerPath, IDS_SERVERNOTFOUND );
00184
00185     return;
00186    }
00187 }
00188
00189 void CInsertControlDlg::RefreshControlList()
00190 {
00191    BOOL tDone;
00192    HRESULT hResult;
00193    IEnumGUIDPtr pEnum;
00194    ULONG nImplementedCategories;
00195    CATID* pcatidImpl;
00196    ULONG nRequiredCategories;
00197    CATID* pcatidReq;
00198    CLSID clsid;
00199    LPOLESTR pszName;
00200    CString strName;
00201    ULONG iCategory;
00202    int iItem;
00203    POSITION posControl;
00204    CString strServerPath;
00205    CString strString;
00206
00207    m_lbControls.ResetContent();
00208    m_lControls.RemoveAll();
00209
00210    nImplementedCategories = (ULONG)m_aImplementedCategories.GetSize();
00211    if( nImplementedCategories == 0 )
00212    {
00213     nImplementedCategories = ULONG( -1 );
00214     pcatidImpl = NULL;
00215    }
00216    else
00217    {
00218     pcatidImpl = (CATID*)_malloca( nImplementedCategories*sizeof( CATID ) );
00219     for( iCategory = 0; iCategory < nImplementedCategories; iCategory++ )
00220     {
00221      pcatidImpl[iCategory] = m_aImplementedCategories[iCategory];
00222     }
00223    }
00224
00225    if( m_butIgnoreRequiredCategories.GetCheck() )
00226    {
00227     nRequiredCategories = ULONG( -1 );
00228     pcatidReq = NULL;
00229    }
00230    else
00231    {
00232     nRequiredCategories = (ULONG)m_aRequiredCategories.GetSize();
00233     if( nRequiredCategories == 0 )
00234     {
00235      pcatidReq = NULL;
00236     }
00237     else
00238     {
00239      pcatidReq = (CATID*)_malloca( nRequiredCategories*sizeof( CATID ) );
00240      for( iCategory = 0; iCategory < nRequiredCategories; iCategory++ )
00241      {
00242       pcatidReq[iCategory] = m_aRequiredCategories[iCategory];
00243      }
00244     }
00245    }
00246
00247    hResult = m_pCatInfo->EnumClassesOfCategories( nImplementedCategories,
00248     pcatidImpl, nRequiredCategories, pcatidReq, &pEnum );
00249
00250
00251    _freea(pcatidImpl);
00252    _freea(pcatidReq);
00253
00254
00255    if( FAILED( hResult ) )
00256    {
00257     return;
00258    }
00259
00260    tDone = FALSE;
00261
00262    int nExtent = 0;
00263    TEXTMETRIC tm;
00264    ::ZeroMemory(&tm, sizeof(TEXTMETRIC));
00265    CFont *pFont = NULL;
00266    CFont *pOldFont = NULL;
00267    CDC *pDC = m_lbControls.GetDC();
00268    ASSERT(pDC);
00269    if (pDC)
00270    {
00271      pFont = m_lbControls.GetFont();
00272      ASSERT(pFont);
00273        if (pFont)
00274      {
00275        pOldFont = pDC->SelectObject(pFont);
00276        VERIFY(pDC->GetTextMetrics(&tm));
00277      }
00278    }
00279
00280    while( !tDone )
00281    {
00282     hResult = pEnum->Next( 1, &clsid, NULL );
00283     if( hResult == S_OK )
00284     {
00285      pszName = NULL;
00286      hResult = OleRegGetUserType( clsid, USERCLASSTYPE_FULL, &pszName );
00287      if( SUCCEEDED( hResult ) )
00288      {
00289       strName = pszName;
00290       CoTaskMemFree( pszName );
00291       pszName = NULL;
00292       if (pDC && pFont)
00293       {
00294         CSize sz = pDC->GetTextExtent(strName);
00295         if (sz.cx > nExtent)
00296           nExtent = sz.cx;
00297       }
00298       iItem = m_lbControls.AddString( strName );
00299       posControl = m_lControls.AddTail( clsid );
00300       m_lbControls.SetItemDataPtr( iItem, posControl );
00301      }
00302     }
00303     else
00304     {
00305      tDone = TRUE;
00306     }
00307    }
00308    if (pDC && pFont)
00309    {
00310      pDC->SelectObject(pOldFont);
00311      m_lbControls.SetHorizontalExtent(nExtent + tm.tmAveCharWidth);
00312    }
00313
00314    OnControlsSelChange();
00315 }
00316
00317 void CInsertControlDlg::OnImplementedCategories()
00318 {
00319    CComponentCategoriesDlg dlg( IDS_IMPLEMENTEDCATEGORIES );
00320    int nResult;
00321    int iCategory;
00322    POSITION posCategory;
00323    CATID catid;
00324
00325    for( iCategory = 0; iCategory < m_aImplementedCategories.GetSize();
00326     iCategory++ )
00327    {
00328     dlg.m_lSelectedCategories.AddTail( m_aImplementedCategories[
00329      iCategory] );
00330    }
00331
00332    nResult = (int)dlg.DoModal();
00333    if( nResult != IDOK )
00334    {
00335     return;
00336    }
00337
00338    m_aImplementedCategories.RemoveAll();
00339    posCategory = dlg.m_lSelectedCategories.GetHeadPosition();
00340    while( posCategory != NULL )
00341    {
00342     catid = dlg.m_lSelectedCategories.GetNext( posCategory );
00343     m_aImplementedCategories.Add( catid );
00344    }
00345
00346    RefreshControlList();
00347 }
00348
00349 void CInsertControlDlg::OnControlsDblClk()
00350 {
00351    OnOK();
00352 }
00353
00354 void CInsertControlDlg::OnRequiredCategories()
00355 {
00356    CComponentCategoriesDlg dlg( IDS_REQUIREDCATEGORIES );
00357    int nResult;
00358    int iCategory;
00359    POSITION posCategory;
00360    CATID catid;
00361
00362    for( iCategory = 0; iCategory < m_aRequiredCategories.GetSize();
00363     iCategory++ )
00364    {
00365     dlg.m_lSelectedCategories.AddTail( m_aRequiredCategories[iCategory] );
00366    }
00367
00368    nResult = (int)dlg.DoModal();
00369    if( nResult != IDOK )
00370    {
00371     return;
00372    }
00373
00374    m_aRequiredCategories.RemoveAll();
00375    posCategory = dlg.m_lSelectedCategories.GetHeadPosition();
00376    while( posCategory != NULL )
00377    {
00378     catid = dlg.m_lSelectedCategories.GetNext( posCategory );
00379     m_aRequiredCategories.Add( catid );
00380    }
00381
00382    RefreshControlList();
00383 }
00384
00385 void CInsertControlDlg::OnControlsSelChange()
00386 {
00387    int iItem;
00388    POSITION posControl;
00389    CString strServerPath;
00390    CLSID clsid;
00391    CDC dc;
00392    CFont* pFont;
00393    LPTSTR pszServerPath;
00394    CRect rect;
00395    CFont* pOldFont;
00396
00397    iItem = m_lbControls.GetCurSel();
00398    if( iItem != LB_ERR )
00399    {
00400     m_butOK.EnableWindow( TRUE );
00401     posControl = POSITION( m_lbControls.GetItemDataPtr( iItem ) );
00402     clsid = m_lControls.GetAt( posControl );
00403     GetClassServerPath( clsid, strServerPath );
00404
00405     dc.CreateCompatibleDC( NULL );
00406
00407     pFont = m_staticServerPath.GetFont();
00408     pOldFont = dc.SelectObject( pFont );
00409
00410     // Workaround for SHLWAPI bug (in weird cases, PathCompactPath actually
00411     // expands the pathname)
00412     pszServerPath = strServerPath.GetBuffer( MAX_PATH+2 );
00413     m_staticServerPath.GetWindowRect( &rect );
00414     PathCompactPath( dc, pszServerPath, rect.Width() );
00415     strServerPath.ReleaseBuffer();
00416
00417     dc.SelectObject( pOldFont );
00418
00419     m_staticServerPath.SetWindowText( strServerPath );
00420    }
00421    else
00422    {
00423     m_butOK.EnableWindow( FALSE );
00424     m_staticServerPath.SetWindowText( NULL );
00425    }
00426 }
00427
00428 void CInsertControlDlg::OnIgnoreRequiredCategories()
00429 {
00430    RefreshControlList();
00431
00432    if( m_butIgnoreRequiredCategories.GetCheck() )
00433    {
00434     m_butRequiredCategories.EnableWindow( FALSE );
00435    }
00436    else
00437    {
00438     m_butRequiredCategories.EnableWindow( TRUE );
00439    }
00440 }
00441
00442 static DWORD rgmapCHID[] =
00443 {
00444    IDC_CONTROLS, HIDC_CONTROLS,
00445    IDC_IMPLEMENTEDCATEGORIES, HIDC_IMPLEMENTEDCATEGORIES,
00446    IDC_REQUIREDCATEGORIES, HIDC_REQUIREDCATEGORIES,
00447    IDC_IGNOREREQUIREDCATEGORIES, HIDC_IGNOREREQUIREDCATEGORIES,
00448    0, 0
00449 };
00450
00451 BOOL CInsertControlDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00452 {
00453   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00454   strPath += _T("::/popups.txt");
00455
00456   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00457 }
00458
00459 void CInsertControlDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00460 {
00461   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00462   strPath += _T("::/popups.txt");
00463
00464   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00465 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/ChildFrm.cpp Source File

  • vc2008fp
  • MDITabsDemo

ChildFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MDITabsDemo.h"
00013
00014 #include "ChildFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CChildFrame
00024
00025 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWndEx)
00026
00027 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWndEx)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CChildFrame construction/destruction
00032
00033 CChildFrame::CChildFrame()
00034 {
00035   // TODO: add member initialization code here
00036
00037 }
00038
00039 CChildFrame::~CChildFrame()
00040 {
00041 }
00042
00043 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00044 {
00045   // TODO: Modify the Window class or styles here by modifying
00046   //  the CREATESTRUCT cs
00047
00048   if( !CMDIChildWndEx::PreCreateWindow(cs) )
00049     return FALSE;
00050
00051   if (!theApp.m_Options.IsMDITabsDisabled ())
00052   {
00053     cs.style &= ~WS_SYSMENU;
00054   }
00055
00056   return TRUE;
00057 }
00058
00059 void CChildFrame::ActivateFrame(int nCmdShow)
00060 {
00061   CMDIChildWndEx::ActivateFrame(nCmdShow);
00062 }
00063
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CChildFrame diagnostics
00067
00068 #ifdef _DEBUG
00069 void CChildFrame::AssertValid() const
00070 {
00071   CMDIChildWndEx::AssertValid();
00072 }
00073
00074 void CChildFrame::Dump(CDumpContext& dc) const
00075 {
00076   CMDIChildWndEx::Dump(dc);
00077 }
00078
00079 #endif //_DEBUG
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPadDoc Member List

This is the complete list of members for CPadDoc, including all inherited members.
CEmbeddedItem class | CPadDoc | [friend]
CPadDoc() | CPadDoc |
DeleteContents() | CPadDoc | [protected, virtual]
OnCancelInplace() | CPadDoc | [protected]
OnGetEmbeddedItem() | CPadDoc | [virtual]
OnGetLinkedItem(LPCTSTR lpszItemName) | CPadDoc | [virtual]
OnViewUpdatenow() | CPadDoc | [protected]
Serialize(CArchive &ar) | CPadDoc | [private]
Serialize(CArchive &ar) | CPadDoc | [protected, virtual]
SetSelection(int nBeg, int nEnd) | CPadDoc |
~CPadDoc() | CPadDoc | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/splitter.h Source File

  • general
  • viewex

splitter.h

Go to the documentation of this file.
00001 // splitter.h : custom splitter control and frame that contains it
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CSplitterFrame frame with splitter/wiper
00014
00015 class CSplitterFrame : public CMDIChildWnd
00016 {
00017   DECLARE_DYNCREATE(CSplitterFrame)
00018 protected:
00019   CSplitterFrame();   // protected constructor used by dynamic creation
00020
00021 // Attributes
00022 protected:
00023   CSplitterWnd m_wndSplitter;
00024
00025 // Implementation
00026 public:
00027   virtual ~CSplitterFrame();
00028   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00029
00030   // Generated message map functions
00031   //{{AFX_MSG(CSplitterFrame)
00032   //}}AFX_MSG
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 //
00038
00039 class CViewExSplitWnd : public CSplitterWnd
00040 {
00041   DECLARE_DYNAMIC(CViewExSplitWnd)
00042
00043 // Implementation
00044 public:
00045   CViewExSplitWnd();
00046   ~CViewExSplitWnd();
00047   CWnd* GetActivePane(int* pRow = NULL, int* pCol = NULL);
00048 };
00049
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 //
00053
00054 class C3WaySplitterFrame : public CMDIChildWnd
00055 {
00056   DECLARE_DYNCREATE(C3WaySplitterFrame)
00057 protected:
00058   C3WaySplitterFrame();   // protected constructor used by dynamic creation
00059
00060 // Attributes
00061 protected:
00062   CViewExSplitWnd m_wndSplitter;
00063   CViewExSplitWnd m_wndSplitter2;        // embedded in the first
00064
00065 // Implementation
00066 public:
00067   virtual ~C3WaySplitterFrame();
00068   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00069
00070   // Generated message map functions
00071   //{{AFX_MSG(C3WaySplitterFrame)
00072   //}}AFX_MSG
00073   DECLARE_MESSAGE_MAP()
00074 };
00075
00076 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemo.cpp Source File

  • vc2008fp
  • RibbonMDI

RibbonMDIDemo.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014
00015 #include "MainFrm.h"
00016 #include "ChildFrm.h"
00017 #include "RibbonMDIDemoDoc.h"
00018 #include "RibbonMDIDemoView.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CRibbonMDIDemoApp
00028
00029 BEGIN_MESSAGE_MAP(CRibbonMDIDemoApp, CWinAppEx)
00030   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00031   // Standard file based document commands
00032   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00033   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00034   // Standard print setup command
00035   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CRibbonMDIDemoApp construction
00040
00041 CRibbonMDIDemoApp::CRibbonMDIDemoApp()
00042 {
00043   // TODO: add construction code here,
00044   // Place all significant initialization in InitInstance
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CRibbonMDIDemoApp object
00049
00050 CRibbonMDIDemoApp theApp;
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CRibbonMDIDemoApp initialization
00054
00055 BOOL CRibbonMDIDemoApp::InitInstance()
00056 {
00057   // Initialize OLE libraries
00058   if (!AfxOleInit())
00059   {
00060     AfxMessageBox(IDP_OLE_INIT_FAILED);
00061     return FALSE;
00062   }
00063
00064   AfxEnableControlContainer();
00065
00066   // Standard initialization
00067   // If you are not using these features and wish to reduce the size
00068   //  of your final executable, you should remove from the following
00069   //  the specific initialization routines you do not need.
00070
00071   // Change the registry key under which our settings are stored.
00072   // TODO: You should modify this string to be something appropriate
00073   // such as the name of your company or organization.
00074   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00075
00076   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00077
00078   SetRegistryBase (_T("Settings"));
00079
00080   // Initialize all Managers for usage. They are automatically constructed
00081   // if not yet present
00082   InitContextMenuManager();
00083   InitKeyboardManager();
00084   InitTooltipManager();
00085
00086   CMFCToolTipInfo params;
00087   params.m_bVislManagerTheme = TRUE;
00088
00089   theApp.GetTooltipManager ()->SetTooltipParams (0xFFFF, RUNTIME_CLASS (CMFCToolTipCtrl), &params);
00090
00091   // Register the application's document templates.  Document templates
00092   //  serve as the connection between documents, frame windows and views.
00093
00094   CMultiDocTemplate* pDocTemplate;
00095   pDocTemplate = new CMultiDocTemplate(
00096     IDR_RIBBONTYPE,
00097     RUNTIME_CLASS(CRibbonMDIDemoDoc),
00098     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00099     RUNTIME_CLASS(CRibbonMDIDemoView));
00100   AddDocTemplate(pDocTemplate);
00101
00102   // create main MDI Frame window
00103   CMainFrame* pMainFrame = new CMainFrame;
00104   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00105     return FALSE;
00106   m_pMainWnd = pMainFrame;
00107
00108   // Parse command line for standard shell commands, DDE, file open
00109   CCommandLineInfo cmdInfo;
00110   ParseCommandLine(cmdInfo);
00111
00112   if (!ProcessShellCommand(cmdInfo))
00113     return FALSE;
00114
00115   // The main window has been initialized, so show and update it.
00116   pMainFrame->ShowWindow(m_nCmdShow);
00117   pMainFrame->UpdateWindow();
00118
00119   return TRUE;
00120 }
00121
00122 /////////////////////////////////////////////////////////////////////////////
00123 // CRibbonMDIDemoApp message handlers
00124
00125 int CRibbonMDIDemoApp::ExitInstance()
00126 {
00127   return CWinAppEx::ExitInstance();
00128 }
00129
00130 /////////////////////////////////////////////////////////////////////////////
00131 void CRibbonMDIDemoApp::PreLoadState ()
00132 {
00133
00134   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00135
00136   // TODO: add another context menus here
00137 }
00138
00139
00140 /////////////////////////////////////////////////////////////////////////////
00141 // CAboutDlg dialog used for App About
00142
00143 class CAboutDlg : public CDialog
00144 {
00145 public:
00146   CAboutDlg();
00147
00148 // Dialog Data
00149   //{{AFX_DATA(CAboutDlg)
00150   enum { IDD = IDD_ABOUTBOX };
00151   //}}AFX_DATA
00152
00153   // ClassWizard generated virtual function overrides
00154   //{{AFX_VIRTUAL(CAboutDlg)
00155   protected:
00156   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00157   //}}AFX_VIRTUAL
00158
00159 // Implementation
00160 protected:
00161   //{{AFX_MSG(CAboutDlg)
00162     // No message handlers
00163   //}}AFX_MSG
00164   DECLARE_MESSAGE_MAP()
00165 };
00166
00167 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00168 {
00169   //{{AFX_DATA_INIT(CAboutDlg)
00170   //}}AFX_DATA_INIT
00171 }
00172
00173 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00174 {
00175   CDialog::DoDataExchange(pDX);
00176   //{{AFX_DATA_MAP(CAboutDlg)
00177   //}}AFX_DATA_MAP
00178 }
00179
00180 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00181   //{{AFX_MSG_MAP(CAboutDlg)
00182     // No message handlers
00183   //}}AFX_MSG_MAP
00184 END_MESSAGE_MAP()
00185
00186 // App command to run the dialog
00187 void CRibbonMDIDemoApp::OnAppAbout()
00188 {
00189   CAboutDlg aboutDlg;
00190   aboutDlg.DoModal();
00191 }
00192
00193 /////////////////////////////////////////////////////////////////////////////
00194 // CRibbonMDIDemoApp message handlers
00195
00196 BOOL CRibbonMDIDemoApp::SaveAllModified()
00197 {
00198   if (!CWinAppEx::SaveAllModified ())
00199   {
00200     return FALSE;
00201   }
00202
00203   CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST (CMDIFrameWndEx, m_pMainWnd);
00204   if (pMainFrame != NULL)
00205   {
00206     pMainFrame->SaveMDIState (GetRegSectionPath ());
00207   }
00208
00209   return TRUE;
00210 }
00211
00212
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recalcvw.cpp Source File

  • advanced
  • mtrecalc

recalcvw.cpp

Go to the documentation of this file.
00001 // recalcvw.cpp : implementation of the CRecalcView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtrecalc.h"
00014 #include "calcthrd.h"
00015 #include "recaldoc.h"
00016 #include "recalcvw.h"
00017 #include "resource.h"
00018 #include "slowcalc.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CRecalcView
00027
00028 IMPLEMENT_DYNCREATE(CRecalcView, CFormView)
00029
00030 BEGIN_MESSAGE_MAP(CRecalcView, CFormView)
00031   ON_MESSAGE(WM_USER_RECALC_DONE, OnRecalcDone)
00032   ON_MESSAGE(WM_USER_RECALC_NOW, OnRecalcNowMsg)
00033   //{{AFX_MSG_MAP(CRecalcView)
00034   ON_EN_KILLFOCUS(IDC_INT1, OnKillFocus)
00035   ON_EN_KILLFOCUS(IDC_INT2, OnKillFocus)
00036   ON_COMMAND(ID_RECALCULATE_NOW, OnRecalculateNow)
00037   //}}AFX_MSG_MAP
00038   // Standard printing commands
00039   ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
00040   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CRecalcView construction/destruction
00045
00046 CRecalcView::CRecalcView()
00047   : CFormView(CRecalcView::IDD)
00048 {
00049   //{{AFX_DATA_INIT(CRecalcView)
00050   m_nInt1 = 0;
00051   m_nInt2 = 0;
00052   //}}AFX_DATA_INIT
00053
00054   m_bFirstKillFocus = FALSE;
00055 }
00056
00057 CRecalcView::~CRecalcView()
00058 {
00059 }
00060
00061 void CRecalcView::OnUpdate(
00062   CView* /*pSender*/, LPARAM lHint, CObject* /*pHint*/)
00063 {
00064   CRecalcDoc* pDoc = GetDocument();
00065   if (lHint != UPDATE_HINT_SUM)
00066   {
00067     m_nInt1 = pDoc->m_nInt1;
00068     m_nInt2 = pDoc->m_nInt2;
00069     UpdateData(FALSE);
00070   }
00071
00072   CString strSum;
00073   if (pDoc->m_bRecalcNeeded)
00074   {
00075     if (pDoc->m_bRecalcInProgress)
00076       strSum.LoadString(IDS_RECALCULATING);
00077     else
00078       strSum = _T("?");
00079   }
00080   else
00081   {
00082     strSum.Format(_T("%i"), pDoc->m_nSum);
00083   }
00084   m_ctlSum.SetWindowText(strSum);
00085   m_ctlSum.UpdateWindow();
00086 }
00087
00088 void CRecalcView::DoDataExchange(CDataExchange* pDX)
00089 {
00090   CFormView::DoDataExchange(pDX);
00091   //{{AFX_DATA_MAP(CRecalcView)
00092   DDX_Control(pDX, IDC_SUM, m_ctlSum);
00093   DDX_Text(pDX, IDC_INT1, m_nInt1);
00094   DDX_Text(pDX, IDC_INT2, m_nInt2);
00095   //}}AFX_DATA_MAP
00096 }
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CRecalcView printing
00100
00101 BOOL CRecalcView::OnPreparePrinting(CPrintInfo* pInfo)
00102 {
00103   // default preparation
00104   return DoPreparePrinting(pInfo);
00105 }
00106
00107 void CRecalcView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00108 {
00109 }
00110
00111 void CRecalcView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00112 {
00113 }
00114
00115 void CRecalcView::OnPrint(CDC*, CPrintInfo*)
00116 {
00117 }
00118
00119 /////////////////////////////////////////////////////////////////////////////
00120 // CRecalcView diagnostics
00121
00122 #ifdef _DEBUG
00123 void CRecalcView::AssertValid() const
00124 {
00125   CFormView::AssertValid();
00126 }
00127
00128 void CRecalcView::Dump(CDumpContext& dc) const
00129 {
00130   CFormView::Dump(dc);
00131 }
00132
00133 CRecalcDoc* CRecalcView::GetDocument() // non-debug version is inline
00134 {
00135   return STATIC_DOWNCAST(CRecalcDoc, m_pDocument);
00136 }
00137 #endif //_DEBUG
00138
00139 /////////////////////////////////////////////////////////////////////////////
00140 // CRecalcView message handlers
00141
00142 void CRecalcView::OnRecalculateNow()
00143 {
00144   if (!UpdateData())
00145     return;
00146
00147   GetDocument()->UpdateInt1AndInt2(m_nInt1, m_nInt2, TRUE);
00148 }
00149
00150 LRESULT CRecalcView::OnRecalcNowMsg(WPARAM, LPARAM)
00151 {
00152   // The WM_USER_RECALC_NOW message is posted by the view to itself whenever
00153   // the focus changes from one field to another.  The view cannot call
00154   // UpdateData() from the WM_KILLFOCUS handler because UpdateData() will
00155   // incorrectly try to call SetFocus() during the WM_KILLFOCUS if the
00156   // field exchange (DDX) or validation (DDV) fails.
00157
00158   // The WM_USER_RECALC_NOW message is also posted by the document in other
00159   // circumstances (such as when the user is trying to save the document
00160   // before it has been recalculated).    In this case, the kill focus
00161   // problem is not an issue.
00162
00163   BOOL bUpdateDataSuccess = UpdateData();
00164   m_bFirstKillFocus = FALSE;
00165   if (!bUpdateDataSuccess)
00166     return 0;
00167
00168   GetDocument()->UpdateInt1AndInt2(m_nInt1, m_nInt2, FALSE);
00169   return 0;
00170 }
00171
00172 void CRecalcView::OnKillFocus()
00173 {
00174   // See comment for OnRecalcNowMsg.
00175
00176   // Only post the WM_USER_RECALC_NOW message if the view is not already
00177   // in the process of handling the first kill focus.  If UpdateData() fails
00178   // in the OnRecalcNowMsg handler, then the framework will call SetFocus()
00179   // to set the focus back on the control with the invalid value.  The SetFocus()
00180   // call will cause another WM_KILLFOCUS message to be sent.  If this OnKillFocus()
00181   // handler were to post yet another WM_USER_RECALC_NOW message, the program would
00182   // go into an infinite loop of attempting focus changes.
00183
00184   if (!m_bFirstKillFocus)
00185   {
00186     PostMessage(WM_USER_RECALC_NOW, 0, 0);
00187     m_bFirstKillFocus = TRUE;
00188   }
00189 }
00190
00191
00192 LRESULT CRecalcView::OnRecalcDone(WPARAM, LPARAM)
00193 {
00194   GetDocument()->RecalcDone();
00195   return 0;
00196 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/itemtemp.h Source File

  • general
  • dlgtempl

itemtemp.h

Go to the documentation of this file.
00001 // itemtemp.h
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef INC_ITEMTEMP_H
00014 #define INC_ITEMTEMP_H
00015
00016 // if you change the value for TOTALITEMS, make sure that the allocations
00017 // in CMyDialogTemplate::DemoIt remain consistent with your changes.  Otherwise you might
00018 // end up corrupting the heap.
00019
00020 #define TOTALITEMS  3
00021
00022 #define IBUTTON         0
00023 #define IEDITCONTROL    1
00024 #define ISTATICTEXT     2
00025
00026 // There is no reason to derive a class from CObject because in this specific
00027 // sample application there will be no serialization.
00028 class CDialogItem
00029 {
00030 public:
00031   // define the enum with values to match whatever DLGITEMTEMPLATE requires
00032
00033   DLGITEMTEMPLATE  m_dlgItemTemplate;
00034
00035   enum            controltype {BUTTON = 0x0080, EDITCONTROL, STATICTEXT};
00036   controltype     m_controltype;
00037   CString         m_strCaption;
00038
00039 public:
00040   CDialogItem(enum controltype cType);  // default constructor will fill in default values
00041   CDialogItem() {};  // default constructor, not to be called directly
00042
00043   void Initialize(enum controltype cType, UINT nID, CRect* prect = NULL, LPCTSTR pszCaption = NULL);
00044 };
00045
00046 class CMyDialogTemplate
00047 {
00048 public:
00049
00050   DLGTEMPLATE m_dlgTempl;
00051   CDialogItem m_rgDlgItem[3];  // the 3 controls to be inserted
00052
00053   CMyDialogTemplate();
00054   void DemoIt();  // build the template and run it.
00055 };
00056
00057 #endif
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/stdafx.cpp Source File

  • advanced
  • mtgdi

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/SchedulerDlg.cpp Source File

  • internet
  • Scheduler

SchedulerDlg.cpp

Go to the documentation of this file.
00001 // SchedulerDlg.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Scheduler.h"
00013 #include "SchedulerDlg.h"
00014 #include "EnterInfoDlg.h"
00015 #include "MyScheduler.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CAboutDlg dialog used for App About
00025
00026 class CAboutDlg : public CDialog
00027 {
00028 public:
00029   CAboutDlg();
00030
00031 // Dialog Data
00032   enum { IDD = IDD_ABOUTBOX };
00033
00034   protected:
00035   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00036
00037 // Implementation
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00043 {
00044 }
00045
00046 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00047 {
00048   CDialog::DoDataExchange(pDX);
00049 }
00050
00051 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00052 END_MESSAGE_MAP()
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CSchedulerDlg dialog
00056
00057 BEGIN_DHTML_EVENT_MAP(CSchedulerDlg)
00058   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("time"),  OnMouseOverTime)
00059   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, _T("time"),  OnMouseOutTime)
00060   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("cmdbuttons"),  OnMouseOverButtons)
00061   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, _T("cmdbuttons"),  OnMouseOutButtons)
00062   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("timedesc"),  OnMouseOverTimeDesc)
00063   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("newElements"),  OnMouseOverNewElements)
00064   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, _T("newElements"),  OnMouseOutNewElements)
00065   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("newElements"),  OnClickNewElements)
00066   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("time"),  OnClickTime)
00067   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("timedesc"),  OnClickTimeDesc)
00068   DHTML_EVENT_AXCONTROL(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("Calendar1"), OnClickCalendar)
00069   DHTML_EVENT_ONCLICK(_T("BClearAll"), OnButtonClearAll)
00070 END_DHTML_EVENT_MAP()
00071
00072
00073 CSchedulerDlg::CSchedulerDlg(CWnd* pParent /*=NULL*/)
00074   : CDHtmlDialog(CSchedulerDlg::IDD, CSchedulerDlg::IDH, pParent)
00075 {
00076   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00077 }
00078
00079 void CSchedulerDlg::DoDataExchange(CDataExchange* pDX)
00080 {
00081   CDHtmlDialog::DoDataExchange(pDX);
00082   DDX_DHtml_AxControl(pDX, _T("Calendar1"), DISPID_MONTH, m_month);
00083   DDX_DHtml_AxControl(pDX, _T("Calendar1"), DISPID_DAY, m_day);
00084   DDX_DHtml_AxControl(pDX, _T("Calendar1"), DISPID_YEAR, m_year);
00085 }
00086
00087 BEGIN_MESSAGE_MAP(CSchedulerDlg, CDHtmlDialog)
00088   ON_WM_SYSCOMMAND()
00089   //}}AFX_MSG_MAP
00090   ON_COMMAND(IDD_HELP_ABOUTSCHEDULER, OnHelpAbout)
00091 END_MESSAGE_MAP()
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CSchedulerDlg message handlers
00095
00096 BOOL CSchedulerDlg::OnInitDialog()
00097 {
00098   CDHtmlDialog::OnInitDialog();
00099
00100   // Add "About..." menu item to system menu.
00101
00102   // IDM_ABOUTBOX must be in the system command range.
00103   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00104   ASSERT(IDM_ABOUTBOX < 0xF000);
00105
00106   CMenu* pSysMenu = GetSystemMenu(FALSE);
00107   if (pSysMenu != NULL)
00108   {
00109     CString strAboutMenu;
00110     strAboutMenu.LoadString(IDS_ABOUTBOX);
00111     if (!strAboutMenu.IsEmpty())
00112     {
00113       pSysMenu->AppendMenu(MF_SEPARATOR);
00114       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00115     }
00116   }
00117
00118   // Set the icon for this dialog.  The framework does this automatically
00119   //  when the application's main window is not a dialog
00120   SetIcon(m_hIcon, TRUE);     // Set big icon
00121   SetIcon(m_hIcon, FALSE);    // Set small icon
00122
00123   // TODO: Add extra initialization here
00124
00125   //Initializing the calendar to the current date
00126
00127   CTime t = CTime::GetCurrentTime();
00128   m_currMonth = (short)t.GetMonth();
00129   m_currDay = (short)t.GetDay();
00130   m_currYear = (short)t.GetYear();
00131
00132   SetDefaultProperties();
00133
00134   m_szDivClass = _T("newElements");
00135   m_iLastDivID = 0;
00136
00137
00138   VERIFY(SHGetSpecialFolderPath(NULL, m_scheduler_filepath, CSIDL_PERSONAL, 0));
00139
00140   //Saves the file to load/store in the 'My Documents' folder specific to the current user
00141   if(SHGetSpecialFolderPath(NULL, m_scheduler_filepath, CSIDL_PERSONAL, 0))
00142     PathAppend(m_scheduler_filepath, _T("Scheduler.sdr"));
00143
00144   ASSERT(m_scheduler_filepath);
00145
00146   return TRUE;  // return TRUE  unless you set the focus to a control
00147 }
00148
00149 void CSchedulerDlg::OnSysCommand(UINT nID, LPARAM lParam)
00150 {
00151   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00152   {
00153     CAboutDlg dlgAbout;
00154     dlgAbout.DoModal();
00155   }
00156   else
00157   {
00158     CDHtmlDialog::OnSysCommand(nID, lParam);
00159   }
00160 }
00161
00162 // If you add a minimize button to your dialog, you will need the code below
00163 //  to draw the icon.  For MFC applications using the document/view model,
00164 //  this is automatically done for you by the framework.
00165
00166 void CSchedulerDlg::OnPaint()
00167 {
00168   if (IsIconic())
00169   {
00170     CPaintDC dc(this); // device context for painting
00171
00172     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00173
00174     // Center icon in client rectangle
00175     int cxIcon = GetSystemMetrics(SM_CXICON);
00176     int cyIcon = GetSystemMetrics(SM_CYICON);
00177     CRect rect;
00178     GetClientRect(&rect);
00179     int x = (rect.Width() - cxIcon + 1) / 2;
00180     int y = (rect.Height() - cyIcon + 1) / 2;
00181
00182     // Draw the icon
00183     dc.DrawIcon(x, y, m_hIcon);
00184   }
00185   else
00186   {
00187     CDHtmlDialog::OnPaint();
00188   }
00189 }
00190
00191 // The system calls this to obtain the cursor to display while the user drags
00192 //  the minimized window.
00193 HCURSOR CSchedulerDlg::OnQueryDragIcon()
00194 {
00195   return (HCURSOR) m_hIcon;
00196 }
00197
00198
00199 /*********************************************************************************************
00200 Shows that the Time column of the scheduler and Buttons are clickable by modifying the style
00201 *********************************************************************************************/
00202 HRESULT CSchedulerDlg::OnMouseOverTime(IHTMLElement* pElement)
00203 {
00204   COleVariant varColor;
00205   CComPtr<IHTMLStyle> phtmlStyle;
00206   pElement->get_style(&phtmlStyle);
00207
00208   ASSERT(phtmlStyle);
00209
00210   if (phtmlStyle)
00211   {
00212     varColor = RED;
00213     phtmlStyle->put_textDecorationUnderline(VARIANT_TRUE);
00214     phtmlStyle->put_color(varColor);
00215     phtmlStyle->put_cursor(L"hand");
00216   }
00217   return NULL;
00218 }
00219
00220 /*********************************************************************************************
00221 Sets the default styles when the mouse is no longer on the time column of the scheduler and
00222 buttons
00223 *********************************************************************************************/
00224 HRESULT CSchedulerDlg::OnMouseOutTime(IHTMLElement* pElement)
00225 {
00226   COleVariant varColor;
00227   CComPtr<IHTMLStyle> phtmlStyle;
00228
00229   pElement->get_style(&phtmlStyle);
00230
00231   ASSERT(phtmlStyle);
00232
00233   if (phtmlStyle)
00234   {
00235     varColor = BLACK;
00236     phtmlStyle->put_textDecorationUnderline(VARIANT_FALSE);
00237     phtmlStyle->put_color(varColor);
00238   }
00239   return NULL;
00240 }
00241
00242 /*********************************************************************************************
00243 Enables the text on the 'ClearAll' button to change color when the mouse runs over it
00244 *********************************************************************************************/
00245 HRESULT CSchedulerDlg::OnMouseOverButtons(IHTMLElement* pElement)
00246 {
00247   COleVariant varColor;
00248   CComPtr<IHTMLStyle> phtmlStyle;
00249
00250   pElement->get_style(&phtmlStyle);
00251
00252   ASSERT(phtmlStyle);
00253
00254   if (phtmlStyle)
00255   {
00256     varColor = AQUA;
00257     phtmlStyle->put_color(varColor);
00258     phtmlStyle->put_cursor(L"hand");
00259   }
00260   return NULL;
00261 }
00262
00263 /*********************************************************************************************
00264 Sets the default styles when the mouse is no longer on the 'ClearAll' button
00265 *********************************************************************************************/
00266 HRESULT CSchedulerDlg::OnMouseOutButtons(IHTMLElement* pElement)
00267 {
00268   COleVariant varColor;
00269   CComPtr<IHTMLStyle> phtmlStyle;
00270
00271   pElement->get_style(&phtmlStyle);
00272
00273   ASSERT(phtmlStyle);
00274
00275   if (phtmlStyle)
00276   {
00277     varColor = YELLOW;
00278     phtmlStyle->put_color(varColor);
00279   }
00280   return NULL;
00281 }
00282
00283
00284 /*********************************************************************************************
00285 Shows that the schedule information column is clickable by modifying the style
00286 *********************************************************************************************/
00287 HRESULT CSchedulerDlg::OnMouseOverTimeDesc(IHTMLElement* pElement)
00288 {
00289   CComPtr<IHTMLStyle> phtmlStyle;
00290   pElement->get_style(&phtmlStyle);
00291
00292   ASSERT(phtmlStyle);
00293
00294   if (phtmlStyle)
00295   {
00296     phtmlStyle->put_cursor(L"hand");
00297   }
00298   return NULL;
00299 }
00300
00301
00302 /*********************************************************************************************
00303 Shows that the schedules entered in the scheduler are clickable distinctly by modifying the
00304 style
00305 *********************************************************************************************/
00306 HRESULT CSchedulerDlg::OnMouseOverNewElements(IHTMLElement* pElement)
00307 {
00308   COleVariant varColor;
00309   CComPtr<IHTMLStyle> phtmlStyle;
00310
00311   pElement->get_style(&phtmlStyle);
00312
00313   ASSERT(phtmlStyle);
00314
00315   if (phtmlStyle)
00316   {
00317     varColor = RED;
00318     phtmlStyle->put_textDecorationUnderline(VARIANT_TRUE);
00319     phtmlStyle->put_color(varColor);
00320     phtmlStyle->put_cursor(L"hand");
00321   }
00322   return NULL;
00323 }
00324
00325 /*********************************************************************************************
00326 Sets the default styles when the mouse is no longer on the schedule entries
00327 *********************************************************************************************/
00328 HRESULT CSchedulerDlg::OnMouseOutNewElements(IHTMLElement* pElement)
00329 {
00330   COleVariant varColor;
00331   CComPtr<IHTMLStyle> phtmlStyle;
00332
00333   pElement->get_style(&phtmlStyle);
00334
00335   ASSERT(phtmlStyle);
00336
00337   if (phtmlStyle)
00338   {
00339     varColor = BLUE;
00340     phtmlStyle->put_textDecorationUnderline(VARIANT_FALSE);
00341     phtmlStyle->put_color(varColor);
00342   }
00343   return NULL;
00344 }
00345
00346 /*********************************************************************************************
00347 When the time column is clicked, the EntryInfo dialog is called to enter the schedule
00348 information.  The schedule is stored in the scheduler if the information entered is valid.
00349 Valid Information: The 'title' field should not be null.
00350 If the information entered is invalid, the user is prompted to re-enter the information.
00351 *********************************************************************************************/
00352 HRESULT CSchedulerDlg::OnClickTime(IHTMLElement *pElement)
00353 {
00354   CComBSTR getbstr;
00355   CEntryInfoDlg InfoDlg;
00356
00357   UpdateData(true);
00358
00359   if (CheckDates())
00360   {
00361     //Get the start time selected
00362     pElement->get_id(&getbstr);
00363
00364     ASSERT(getbstr);
00365
00366     InfoDlg.m_szStartTime = getbstr;
00367     InfoDlg.DoModal();
00368
00369     //If valid schedule information was entered
00370     if (InfoDlg.m_fUpdateScheduleDisplay)
00371       OnUpdateScheduleDisplay(InfoDlg);
00372   }
00373   return S_OK;
00374 }
00375
00376
00377 /************************************************************************************************
00378 When the Schedule Information column is clicked, the EntryInfo dialog is called with the default
00379 'Save' 'Cancel' and 'Clear' buttons to enterthe schedule information. The schedule is stored
00380 in the scheduler if the information entered is valid.
00381 Valid information: The 'title' field should not be null.
00382 If the information entered is invalid, the user is prompted to re-enter the information.
00383 This event has the same functionality as the 'OnClickTime' event.  They are not merged
00384 together because the two columns 'Time' and 'Scheduler Information' have different 'ids' in
00385 the html source code and merging them would give an incorrect 'startTime' in the EntryInfo
00386 dialog.
00387 *************************************************************************************************/
00388 HRESULT CSchedulerDlg::OnClickTimeDesc(IHTMLElement *pElement)
00389 {
00390   CComBSTR getbstr;
00391   CEntryInfoDlg InfoDlg;
00392   CString szStr;
00393
00394   //Get the id of the row that was clicked
00395   pElement->get_id(&getbstr);
00396
00397   ASSERT(getbstr);
00398
00399   InfoDlg.m_fVisibleButtons = false;
00400   InfoDlg.m_fVisibleDefaultButtons = true;
00401   szStr = getbstr;
00402   InfoDlg.m_szStartTime = GetStartTimeFormatted(szStr);
00403
00404   InfoDlg.DoModal();
00405
00406   //If valid schedule information was entered
00407   if (InfoDlg.m_fUpdateScheduleDisplay)
00408     OnUpdateScheduleDisplay(InfoDlg);
00409
00410   return S_OK;
00411 }
00412
00413
00414 /*********************************************************************************************
00415 When the schedules are clicked, the EntryInfo dialog is called with the 'Modify' 'Delete' and
00416 'Cancel' buttons and the schedule information in it to either Modify/Delete the schedule.
00417 If Modify is clicked, another EntryInfo dialog is called with the schedule information, but
00418 with the default buttons 'Save' 'Cancel' and 'Clear'.
00419   Modifying the schedule and clicking 'Save' overwrites the old schedule with the modified
00420   schedule
00421   Clicking 'Save' only (without any modifications) leaves the old schedule unmodified
00422   Clicking 'Clear' and 'Save' deletes the schedule
00423   Clicking 'Cancel' leaves the old schedule unmodified
00424 *********************************************************************************************/
00425 HRESULT CSchedulerDlg::OnClickNewElements(IHTMLElement *pElement)
00426 {
00427   BSTR getbstr = NULL;
00428   CEntryInfoDlg InfoDlg;
00429   CMyScheduler scheduler;
00430   CString szStr;
00431   CComPtr<IHTMLElement> phtmlElement;
00432   int iDivID, iScheduleInfo;
00433
00434   pElement->get_parentElement(&phtmlElement);
00435
00436   //Get a valid parent element
00437   ASSERT(phtmlElement);
00438
00439   if (phtmlElement)
00440     phtmlElement->get_id(&getbstr);
00441
00442   //Get a valid parent id
00443   ASSERT(getbstr);
00444
00445   szStr = getbstr;
00446   InfoDlg.m_szStartTime = GetStartTimeFormatted(szStr);
00447
00448   pElement->get_id(&getbstr);
00449
00450   //Get a valid id for the new meeting
00451   ASSERT(getbstr);
00452
00453   szStr = getbstr;
00454   iDivID = atoi(szStr);
00455
00456   for (iScheduleInfo=0; iScheduleInfo < m_scheduler_array.GetSize(); iScheduleInfo++)
00457   {
00458     scheduler = m_scheduler_array.GetAt(iScheduleInfo);
00459
00460     if (scheduler.m_iId == iDivID)
00461       break;
00462   }
00463
00464   ASSERT(scheduler.m_iId==iDivID);
00465
00466   InfoDlg.m_szTitle = scheduler.m_szTitle;
00467   InfoDlg.m_szDescription = scheduler.m_szDescription;
00468
00469   InfoDlg.m_fVisibleButtons = true;
00470   InfoDlg.m_fVisibleDefaultButtons = false;
00471   InfoDlg.DoModal();
00472
00473   if (InfoDlg.m_fDeleteSchedule) //If the schedule needs to be deleted
00474   {
00475     m_scheduler_array.RemoveAt(iScheduleInfo);
00476     OnDeleteScheduleDisplay(scheduler);
00477   }
00478   else if (InfoDlg.m_fModifySchedule) //If the schedule needs to be modified
00479   {
00480     RemoveInfoFromTable();
00481     OnModifyScheduleDisplay(m_scheduler_array.ElementAt(iScheduleInfo), InfoDlg);
00482     DateSchedules();
00483   }
00484   else //Cancel
00485     //DO NOTHING
00486
00487   InfoDlg.SetDefaultSettings();
00488
00489   return S_OK;
00490 }
00491
00492
00493 /*********************************************************************************************
00494 Removes all the data from the table
00495 Removes all the data from the Scheduler Array
00496 Sets the default table properties
00497 *********************************************************************************************/
00498 HRESULT CSchedulerDlg::OnButtonClearAll(IHTMLElement* /*pElement*/)
00499 {
00500   RemoveInfoFromTable();
00501   m_scheduler_array.RemoveAll();
00502   SetDefaultProperties();
00503   return S_OK;
00504 }
00505
00506
00507 /*********************************************************************************************
00508 Set the member variables for month, day and year to the current date
00509 Set the Calendar values to the current date
00510 *********************************************************************************************/
00511 void CSchedulerDlg::SetDefaultProperties()
00512 {
00513   //Set the month, day and year values to the current date
00514   m_month = m_currMonth;
00515   m_day = m_currDay;
00516   m_year = m_currYear;
00517
00518   UpdateData(false);
00519 }
00520
00521
00522 /*********************************************************************************************
00523 Check if the dates entered are valid
00524 Valid dates: Dates > Current Date
00525 Valid dates: Dates with the year, month and day fields selected
00526 *********************************************************************************************/
00527 BOOL CSchedulerDlg::CheckDates()
00528 {
00529   BOOL fRetval = true;
00530
00531   ASSERT(m_month.iVal);
00532   ASSERT(m_day.iVal);
00533   ASSERT(m_year.iVal);
00534
00535   CTime currTime(m_currYear, m_currMonth, m_currDay, 0, 0, 0, 0);
00536   CTime enteredTime(m_year.iVal, m_month.iVal, m_day.iVal, 0, 0, 0, 0);
00537
00538   if (!(m_month.iVal && m_day.iVal && m_year.iVal) || (currTime > enteredTime))
00539   {
00540     fRetval = false;
00541     SetDefaultProperties();
00542     AfxMessageBox (IDS_INVALIDDATE);
00543   }
00544
00545   return fRetval;
00546 }
00547
00548
00549 /*********************************************************************************************
00550 Adjusts the 'Start' and 'End' hours to be displayed between '1 - 12
00551 eg. Converts '13:00' to '1:00'
00552 *********************************************************************************************/
00553 CString CSchedulerDlg::AdjustHour(int iHour)
00554 {
00555   ASSERT(iHour < 24);
00556   CString szRetval;
00557   szRetval.Format("%d", iHour < 13 ? iHour : iHour-12);
00558   return(szRetval);
00559 }
00560
00561
00562 /*********************************************************************************************
00563 Formats the 'Time' string to be displayed in the Scheduler Table
00564 *********************************************************************************************/
00565 CString CSchedulerDlg::SetTimeFormat(int iHour, int iMinutes)
00566 {
00567   CString szTime_span;
00568
00569   szTime_span = AdjustHour(iHour);
00570
00571   if (iMinutes)
00572     szTime_span += _T(":30");
00573   else
00574     szTime_span += _T(":00");
00575
00576   if (iHour >= 12)
00577     szTime_span += _T(" pm");
00578   else
00579     szTime_span += _T(" am");
00580
00581   return szTime_span;
00582 }
00583
00584
00585 /*********************************************************************************************
00586 Displays all the schedules for the selected date
00587 At the end of the function, all the rows of the table contain information for the specified
00588 date only!
00589 *********************************************************************************************/
00590 inline void CSchedulerDlg::DateSchedules()
00591 {
00592   CComBSTR startTime;
00593   CComBSTR endTime;
00594   CComBSTR scheduleEntry;
00595   CComBSTR tempbstr;
00596   CMyScheduler scheduler;
00597   CString szTempstr;
00598   CString szInnerHtml;
00599   CString szHour;
00600   CString szDate;
00601   CString szElementId;
00602   CString szEid;
00603   CString szTempstring;
00604   CTime mytime;
00605   HRESULT result;
00606   COleVariant varColor;
00607
00608   //If the dates entered are valid
00609   if(CheckDates())
00610   {
00611     if (m_scheduler_array.GetSize())
00612     {
00613       //Iterate through all the schedules stored in the scheduler
00614       for (int iallDates = 0; iallDates < m_scheduler_array.GetSize(); iallDates++)
00615       {
00616         scheduler = m_scheduler_array.GetAt(iallDates);
00617
00618         //Change the valid dated schedules' background color
00619         if ((scheduler.m_iYear == m_year.iVal) && (scheduler.m_iMonth == m_month.iVal) && (scheduler.m_iDay == m_day.iVal))
00620         {
00621           CTime mytime( m_year.iVal, m_month.iVal, m_day.iVal, scheduler.m_iStartHour, scheduler.m_iStartMinutes, 0);
00622           szDate = mytime.Format( "%A, %B %d, %Y" );
00623
00624           //To get the chosen Start and End Times
00625           //timeSpan contains the duration of the schedule
00626           //eg. 8:00 am - 9:00 am
00627           szElementId = SetTimeFormat(scheduler.m_iStartHour, scheduler.m_iStartMinutes);
00628
00629           for (int j=0; szElementId.GetAt(j) != ' ';j++)
00630             szEid += szElementId.GetAt(j);
00631
00632           CComPtr<IHTMLElement> pHTMLElement;
00633
00634           //Format the new schedule information
00635           result = GetElement(szEid, &pHTMLElement);
00636
00637           ASSERT(pHTMLElement);
00638
00639           szElementId += _T(" - ");
00640           szElementId += SetTimeFormat(scheduler.m_iEndHour, scheduler.m_iEndMinutes);
00641
00642           CComPtr<IHTMLStyle> phtmlStyle;
00643
00644           //Change the text color of the schedule information
00645           if (pHTMLElement)
00646             pHTMLElement->get_style(&phtmlStyle);
00647
00648           ASSERT(phtmlStyle);
00649
00650           if (phtmlStyle)
00651           {
00652             varColor = BLUE;
00653             phtmlStyle->put_color(varColor);
00654           }
00655
00656           szInnerHtml = scheduler.m_szTitle;
00657           szInnerHtml += _T(": ");
00658           szInnerHtml += szElementId;
00659           szInnerHtml += _T(" (");
00660           szInnerHtml += szDate;
00661           szInnerHtml += _T(")");
00662           szInnerHtml += _T("\n");
00663
00664           szTempstr.Format(_T("<DIV class=%s title=%s id=%d>%s</DIV>"), m_szDivClass, "Modify/Delete",
00665             scheduler.m_iId, szInnerHtml);
00666           tempbstr = szTempstr.AllocSysString();
00667
00668           scheduleEntry = GetElementHtml(szEid);
00669
00670           //Display the duration of the schedule
00671           if (scheduleEntry)
00672             scheduleEntry += tempbstr;
00673           else
00674             scheduleEntry = tempbstr;
00675
00676           SetElementHtml(szEid, scheduleEntry);
00677           szEid.Empty();
00678           scheduleEntry.Empty();
00679         }
00680       }
00681     }
00682   }
00683 }
00684
00685
00686 /********************************************************************************************
00687 Undisplays all the contents from the Scheduler table
00688 When the function returns, all the rows of the table are empty
00689 This function DOES NOT AFFECT the data structures that contain the scheduler information
00690 *********************************************************************************************/
00691 void CSchedulerDlg::RemoveInfoFromTable()
00692 {
00693   CComBSTR blankBstr;
00694   CMyScheduler schedulerEntry;
00695   CString szTime;
00696
00697   for (int iallDates = 0; iallDates < m_scheduler_array.GetSize(); iallDates++)
00698   {
00699     schedulerEntry = m_scheduler_array.GetAt(iallDates);
00700
00701     szTime = AdjustHour(schedulerEntry.m_iStartHour);
00702     szTime += _T(":");
00703
00704     if (schedulerEntry.m_iStartMinutes)
00705       szTime += _T("30");
00706     else
00707       szTime += _T("00");
00708
00709     SetElementText(szTime, blankBstr);
00710   }
00711 }
00712
00713 /********************************************************************************************
00714 Open an existing file
00715 If the file does not exist, an error message is returned
00716 The user has the option of creating a new file
00717 *********************************************************************************************/
00718 void CSchedulerDlg::OpenScheduler(void)
00719 {
00720   // TODO: Add your command handler code here
00721   CFile schedulerFile;
00722   CMyScheduler scheduler;
00723
00724   if( schedulerFile.Open(m_scheduler_filepath, CFile::modeRead) )
00725   {
00726     CArchive ar(&schedulerFile, CArchive::load);
00727     m_scheduler_array.Serialize(ar);
00728     ar >> m_iLastDivID;
00729
00730     DateSchedules();
00731
00732     ar.Close();
00733     schedulerFile.Close();
00734   }
00735 }
00736
00737 /*********************************************************************************************
00738 Stores the contents of the Scheduler in an archive (file)
00739 If the file does not exist, it creates a new file
00740 If the file exists, the function overwrites the same file every time
00741 *********************************************************************************************/
00742 void CSchedulerDlg::ExitScheduler(void)
00743 {
00744   // TODO: Add your command handler code here
00745   CFile schedulerFile;
00746   CMyScheduler scheduler;
00747
00748   if (m_scheduler_array.GetSize())
00749   {
00750     TRY
00751     {
00752       if( !schedulerFile.Open(m_scheduler_filepath, CFile::modeCreate | CFile::modeWrite))
00753       {
00754         //SHOULD NEVER GET HERE
00755         AfxMessageBox (IDS_CANNOTOPENFILE);
00756       }
00757       else
00758       {
00759         CArchive ar(&schedulerFile, CArchive::store);
00760         m_scheduler_array.Serialize(ar);
00761         ar << m_iLastDivID;
00762
00763         ar.Close();
00764
00765         schedulerFile.Close();
00766       }
00767     }
00768     CATCH( CFileException, e )
00769     {
00770       #ifdef _DEBUG
00771         afxDump << "File " << m_scheduler_filepath << " cannot be created\n";
00772       #endif
00773     }
00774     END_CATCH
00775   }
00776   else
00777   {
00778     if (schedulerFile.Open(m_scheduler_filepath, CFile::modeRead))
00779     {
00780       schedulerFile.Close();
00781       TRY
00782       {
00783         CFile::Remove(m_scheduler_filepath);
00784       }
00785       CATCH( CFileException, e)
00786       {
00787         #ifdef _DEBUG
00788           afxDump << "File " << m_scheduler_filepath << " cannot be removed\n";
00789         #endif
00790       }
00791       END_CATCH
00792     }
00793   }
00794   PostQuitMessage(0);
00795 }
00796
00797 /*********************************************************************************************
00798 The Help menu gives you information about 'The Scheduler'
00799 **********************************************************************************************/
00800 void CSchedulerDlg::OnHelpAbout(void)
00801 {
00802   CAboutDlg dlg;
00803   dlg.DoModal();
00804 }
00805
00806 /*********************************************************************************************
00807 Enters a new schedule to the scheduler
00808 Adds a new schedule entry to the m_scheduler_array
00809 Calls DateSchedules() method to display the new schedule in the scheduler
00810 **********************************************************************************************/
00811 void CSchedulerDlg::OnUpdateScheduleDisplay(const CEntryInfoDlg& InfoDlg)
00812 {
00813   CMyScheduler schedulerEntry;
00814
00815   schedulerEntry.m_iMonth = m_month.iVal;
00816   schedulerEntry.m_iDay = m_day.iVal;
00817   schedulerEntry.m_iYear = m_year.iVal;
00818   schedulerEntry.m_szTitle = InfoDlg.m_szTitle;
00819   schedulerEntry.m_szDescription = InfoDlg.m_szDescription;
00820   schedulerEntry.m_iStartHour = InfoDlg.m_iStartHour;
00821   schedulerEntry.m_iEndHour = InfoDlg.m_iEndHour;
00822   schedulerEntry.m_iStartMinutes = atoi(InfoDlg.m_szStartTimeMinute);
00823   schedulerEntry.m_iEndMinutes = atoi(InfoDlg.m_szEndTimeMinute);
00824   schedulerEntry.m_iId = m_iLastDivID++;
00825
00826   m_scheduler_array.Add(schedulerEntry);
00827
00828   RemoveInfoFromTable();
00829
00830   DateSchedules();
00831 }
00832
00833
00834 /*********************************************************************************************
00835 Binds the user's selected date to the schedules for that given date
00836 Displays all the schedules for the selected date
00837 **********************************************************************************************/
00838 void __stdcall CSchedulerDlg::OnClickCalendar()
00839 {
00840   UpdateData(true);
00841   RemoveInfoFromTable();
00842   DateSchedules();
00843 }
00844
00845
00846 /*********************************************************************************************
00847 Format the start time as displayed in the list box control in 'EntryInfoDlg.htm'
00848 This function is used to determine the start time to be displayed
00849 **********************************************************************************************/
00850 CString CSchedulerDlg::GetStartTimeFormatted(CString szStartTime)
00851 {
00852   CString szHour;
00853   CString szAmpm;
00854   CString szRetval;
00855   int i, iHour;
00856
00857   //Getting the start hour to be displayed on the EntryInfoDlg
00858   for(i=0; szStartTime.GetAt(i) != ':'; i++)
00859     szHour += szStartTime.GetAt(i);
00860
00861   ASSERT(szHour);
00862
00863   iHour = atoi(szHour);
00864
00865   //Formatting the start hour according to the cell (row) id (HTML source)
00866   szAmpm.Format("%s", iHour == 12 ? _T(" pm") : iHour > 6 ? _T(" am") : _T(" pm"));
00867
00868   szRetval = szStartTime;
00869   szRetval += szAmpm;
00870
00871   return szRetval;
00872 }
00873
00874 /*********************************************************************************************
00875 Called on deleting a schedule from the scheduler
00876 Sets the inner_html tag of that row to ""
00877 **********************************************************************************************/
00878 void CSchedulerDlg::OnDeleteScheduleDisplay(CMyScheduler& scheduler)
00879 {
00880   CComBSTR getbstr;
00881   CString szStr;
00882
00883   szStr.Format("%d", scheduler.m_iId);
00884
00885   ASSERT(szStr);
00886
00887   SetElementHtml(szStr, getbstr);
00888 }
00889
00890
00891 /*********************************************************************************************
00892 Called when trying to modify a schedule
00893 Replaces the 'existing' schedule information with the newly entered information
00894 **********************************************************************************************/
00895 void CSchedulerDlg::OnModifyScheduleDisplay(CMyScheduler& scheduler, const CEntryInfoDlg& InfoDlg)
00896 {
00897   scheduler.m_iMonth = m_month.iVal;
00898   scheduler.m_iDay = m_day.iVal;
00899   scheduler.m_iYear = m_year.iVal;
00900   scheduler.m_szTitle = InfoDlg.m_szTitle;
00901   scheduler.m_szDescription = InfoDlg.m_szDescription;
00902   scheduler.m_iStartHour = InfoDlg.m_iStartHour;
00903   scheduler.m_iEndHour = InfoDlg.m_iEndHour;
00904   scheduler.m_iStartMinutes = atoi(InfoDlg.m_szStartTimeMinute);
00905   scheduler.m_iEndMinutes = atoi(InfoDlg.m_szEndTimeMinute);
00906 }
00907
00908 /*********************************************************************************************
00909 When the dialog is completed before being displayed, the color of the 'ClearAll' button is
00910 modified. The OpenScheduler() method is invoked to open an 'Archive/File' if it exists.
00911 **********************************************************************************************/
00912 void CSchedulerDlg::OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl)
00913 {
00914   IHTMLElement *pClearAllElement;
00915   IHTMLStyle *pClearAllStyle;
00916   VARIANT varColor;
00917   HRESULT result = GetElement(_T("BClearAll"), &pClearAllElement);
00918
00919   if (SUCCEEDED(result)) {
00920     pClearAllElement->get_style(&pClearAllStyle);
00921     varColor.vt = VT_I4;
00922     varColor.lVal = 0xfffacd;
00923     pClearAllStyle->put_color(varColor);
00924     varColor.lVal = 0x00000;
00925     pClearAllStyle->put_backgroundColor(varColor);
00926     pClearAllStyle->Release();
00927     pClearAllElement->Release();
00928   }
00929
00930   OpenScheduler();
00931
00932   CDHtmlDialog::OnDocumentComplete(pDisp, szUrl);
00933 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTesthelpPropPage Member List

This is the complete list of members for CTesthelpPropPage, including all inherited members.
CTesthelpPropPage() | CTesthelpPropPage |
DoDataExchange(CDataExchange *pDX) | CTesthelpPropPage | [protected, virtual]
IDD enum value | CTesthelpPropPage |
m_bUseMine | CTesthelpPropPage |
m_bUseToolTip | CTesthelpPropPage |
m_CtrlTipCaption | CTesthelpPropPage |
m_nUsePopupHelp | CTesthelpPropPage |
m_szName1 | CTesthelpPropPage |
m_szName2 | CTesthelpPropPage |
m_szName3 | CTesthelpPropPage |
m_szTipCaption | CTesthelpPropPage |
OnHelp(LPCTSTR helpdir) | CTesthelpPropPage |
OnInitDialog() | CTesthelpPropPage | [protected, virtual]
OnUsetooltipClicked() | CTesthelpPropPage | [protected]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/hlp/popups.h Source File

  • ole
  • TstCon
  • hlp

popups.h

Go to the documentation of this file.
00001 #define HIDC_PROPNAME           18001
00002 #define HIDC_DISPID             18002
00003 #define HIDC_ENABLED            18003
00004 #define HIDC_CHOOSECOLOR_AMBIENT      18004
00005 #define HIDC_DATE_AMBIENT         18005
00006 #define HIDC_STATIC_PROPERTYVALUE     18006
00007 #define HIDC_PROPVALUECOMBO_AMBIENT     18007
00008 #define HIDC_CHOOSEFONT_AMBIENT       18008
00009 #define HIDC_PROPVALUE            18009
00010 #define HIDC_PROPTYPE           18010
00011 #define HIDC_SETVALUE_AMBIENT       18011
00012 #define HIDC_NEWPROPERTY          18012
00013 #define HIDC_CATEGORIES           18013
00014 #define HIDC_SELECTALL            18014
00015 #define HIDC_OBJECTS            18015
00016 #define HIDC_ALLOWWINDOWLESS        18016
00017 #define HIDC_TWOPASSDRAWING         18017
00018 #define HIDC_IGNOREACTIVATEWHENVISIBLE    18018
00019 #define HIDC_USEIPOINTERINACTIVE      18019
00020 #define HIDC_USEQUICKACTIVATION       18020
00021 #define HIDC_IOLEINPLACESITEEX        18021
00022 #define HIDC_IOLEINPLACESITEWINDOWLESS    18022
00023 #define HIDC_IADVISESINKEX          18023
00024 #define HIDC_SBINDHOST            18024
00025 #define HIDC_EVENTS             18025
00026 #define HIDC_PROPERTIES_CHANGES       18026
00027 #define HIDC_PROPERTIES_EDITREQUESTS    18027
00028 #define HIDC_ALWAYS             18028
00029 #define HIDC_NEVER              18029
00030 #define HIDC_PROMPT             18030
00031 #define HIDC_SELECTALL_EDITREQUESTS     18031
00032 #define HIDC_CONTROLS           18032
00033 #define HIDC_IMPLEMENTEDCATEGORIES      18033
00034 #define HIDC_REQUIREDCATEGORIES       18034
00035 #define HIDC_IGNOREREQUIREDCATEGORIES   18035
00036 #define HIDC_LOGTONULL            18036
00037 #define HIDC_LOGTOOUTPUT          18037
00038 #define HIDC_LOGTODEBUG           18038
00039 #define HIDC_LOGTOFILE            18039
00040 #define HIDC_FILENAME           18040
00041 #define HIDC_FILENAME_BROWSE        18041
00042 #define HIDC_MACROS             18042
00043 #define HIDC_OPENFILE           18043
00044 #define HIDC_METHODNAME           18044
00045 #define HIDC_PARAMS             18045
00046 #define HIDC_PARAMVALUE           18046
00047 #define HIDC_STATIC_PARAMETERVALUE      18047
00048 #define HIDC_DATE             18048
00049 #define HIDC_PARAMVALUECOMBO        18049
00050 #define HIDC_PARAMTYPE            18050
00051 #define HIDC_SETVALUE           18051
00052 #define HIDC_RETURNVALUE          18052
00053 #define HIDC_EXCEPTIONSOURCE        18053
00054 #define HIDC_EXCEPTIONDESC          18054
00055 #define HIDC_EXCEPTIONHELP          18055
00056 #define HIDC_INVOKE             18056
00057 #define HIDC_CHOOSEFONT           18057
00058 #define HIDC_CHOOSECOLOR          18058
00059 #define HIDC_PROPNAME_NEW         18059
00060 #define HIDC_DISPID_NEW           18060
00061 #define HIDC_OUTPUT             18061
00062 #define HIDC_CLEAROUTPUTWINDOW        18062
00063 #define HIDC_PROPERTIES           18063
00064 #define HIDC_REGISTEREDCONTROLS       18064
00065 #define HIDC_UNREGISTER           18065
00066 #define HIDC_REGISTER           18066
00067 #define HIDC_REREGISTER           18067
00068 #define HIDC_TABORDER           18068
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/datedial.cpp Source File

  • ole
  • wordpad

datedial.cpp

Go to the documentation of this file.
00001 // datedial.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014 #include "datedial.h"
00015 #include "helpids.h"
00016 #include <winnls.h>
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 SYSTEMTIME CDateDialog::m_time;
00024 LCID CDateDialog::m_id;
00025 CListBox* CDateDialog::m_pListBox = NULL;
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CDateDialog dialog
00029
00030 const DWORD CDateDialog::m_nHelpIDs[] =
00031 {
00032   IDC_DATEDIALOG_LIST, IDH_WORDPAD_TIMEDATE,
00033   IDC_STATIC_HEADING, IDH_WORDPAD_TIMEDATE,
00034   IDOK, IDH_WORDPAD_TIMEDATE,
00035   IDCANCEL, IDH_WORDPAD_TIMEDATE,
00036   0 , 0
00037 };
00038
00039 CDateDialog::CDateDialog(CWnd* pParent /*=NULL*/)
00040   : CCSDialog(CDateDialog::IDD, pParent)
00041 {
00042   //{{AFX_DATA_INIT(CDateDialog)
00043   m_strSel = _T("");
00044   //}}AFX_DATA_INIT
00045 }
00046
00047
00048 void CDateDialog::DoDataExchange(CDataExchange* pDX)
00049 {
00050   CCSDialog::DoDataExchange(pDX);
00051   //{{AFX_DATA_MAP(CDateDialog)
00052   DDX_Control(pDX, IDC_DATEDIALOG_LIST, m_listBox);
00053   DDX_LBString(pDX, IDC_DATEDIALOG_LIST, m_strSel);
00054   //}}AFX_DATA_MAP
00055 }
00056
00057
00058 BEGIN_MESSAGE_MAP(CDateDialog, CCSDialog)
00059   //{{AFX_MSG_MAP(CDateDialog)
00060   ON_LBN_DBLCLK(IDC_DATEDIALOG_LIST, OnDblclkDatedialogList)
00061   //}}AFX_MSG_MAP
00062 END_MESSAGE_MAP()
00063
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CDateDialog message handlers
00067
00068 BOOL CDateDialog::OnInitDialog()
00069 {
00070   CCSDialog::OnInitDialog();
00071
00072   m_pListBox = &m_listBox; // set static member
00073   GetLocalTime(&m_time);
00074   m_id = GetUserDefaultLCID();
00075
00076   EnumDateFormats(DateFmtEnumProc, m_id, DATE_SHORTDATE);
00077   EnumDateFormats(DateFmtEnumProc, m_id, DATE_LONGDATE);
00078   EnumTimeFormats(TimeFmtEnumProc, m_id, 0);
00079
00080   m_pListBox = NULL;
00081   m_listBox.SetCurSel(0);
00082
00083   return TRUE;  // return TRUE unless you set the focus to a control
00084           // EXCEPTION: OCX Property Pages should return FALSE
00085 }
00086
00087 BOOL CALLBACK CDateDialog::DateFmtEnumProc(LPTSTR lpszFormatString)
00088 {
00089   ENSURE(m_pListBox != NULL);
00090   TCHAR buf[256];
00091   VERIFY(GetDateFormat(m_id, 0, &m_time, lpszFormatString, buf, 256));
00092   // we can end up with same format because a format with leading
00093   // zeroes may be the same as one without when a number is big enough
00094   // e.g. 09/10/94 9/10/94 are different but 10/10/94 and 10/10/94 are
00095   // the same
00096   if (m_pListBox->FindStringExact(-1,buf) == CB_ERR)
00097     m_pListBox->AddString(buf);
00098   return TRUE;
00099 }
00100
00101 BOOL CALLBACK CDateDialog::TimeFmtEnumProc(LPTSTR lpszFormatString)
00102 {
00103   ENSURE(m_pListBox != NULL);
00104   TCHAR buf[256];
00105   VERIFY(GetTimeFormat(m_id, 0, &m_time, lpszFormatString, buf, 256));
00106   // we can end up with same format because a format with leading
00107   // zeroes may be the same as one without when a number is big enough
00108   // e.g. 09/10/94 9/10/94 are different but 10/10/94 and 10/10/94 are
00109   // the same
00110   if (m_pListBox->FindStringExact(-1,buf) == CB_ERR)
00111     m_pListBox->AddString(buf);
00112   return TRUE;
00113 }
00114
00115 void CDateDialog::OnDblclkDatedialogList()
00116 {
00117   OnOK();
00118 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/mainfrm.cpp Source File

  • ole
  • drawcli

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "drawcli.h"
00015
00016 #include "mainfrm.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   ON_WM_CREATE()
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 static UINT BASED_CODE indicators[] =
00037 {
00038   ID_SEPARATOR,           // status line indicator
00039   ID_INDICATOR_CAPS,
00040   ID_INDICATOR_NUM,
00041   ID_INDICATOR_SCRL,
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMainFrame construction/destruction
00046
00047 CMainFrame::CMainFrame()
00048 {
00049   // TODO: add member initialization code here
00050 }
00051
00052 CMainFrame::~CMainFrame()
00053 {
00054 }
00055
00056 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00057 {
00058   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00059     return -1;
00060
00061   if (!m_wndToolBar.Create(this) ||
00062     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00063   {
00064     TRACE0("Failed to create toolbar\n");
00065     return -1;      // fail to create
00066   }
00067
00068   if (!m_wndStatusBar.Create(this) ||
00069     !m_wndStatusBar.SetIndicators(indicators,
00070       sizeof(indicators)/sizeof(UINT)))
00071   {
00072     TRACE0("Failed to create status bar\n");
00073     return -1;      // fail to create
00074   }
00075
00076   // TODO: Delete these three lines if you don't want the toolbar to
00077   //  be dockable
00078   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00079   EnableDocking(CBRS_ALIGN_ANY);
00080   DockControlBar(&m_wndToolBar);
00081
00082   // TODO: Remove this if you don't want tool tips
00083   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00084     CBRS_TOOLTIPS | CBRS_FLYBY);
00085
00086   return 0;
00087 }
00088
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CMainFrame diagnostics
00092
00093 #ifdef _DEBUG
00094 void CMainFrame::AssertValid() const
00095 {
00096   CMDIFrameWnd::AssertValid();
00097 }
00098
00099 void CMainFrame::Dump(CDumpContext& dc) const
00100 {
00101   CMDIFrameWnd::Dump(dc);
00102 }
00103
00104 #endif //_DEBUG
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackapp.h Source File

  • general
  • tracker

trackapp.h

Go to the documentation of this file.
00001 // tracker.h : main header file for the TRACKER application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTrackerApp:
00021 // See tracker.cpp for the implementation of this class
00022 //
00023
00024 class CTrackerApp : public CWinApp
00025 {
00026 public:
00027   CTrackerApp();
00028
00029 // Overrides
00030   virtual BOOL InitInstance();
00031
00032 // Implementation
00033
00034   //{{AFX_MSG(CTrackerApp)
00035   afx_msg void OnAppAbout();
00036     // NOTE - the ClassWizard will add and remove member functions here.
00037     //    DO NOT EDIT what you see in these blocks of generated code !
00038   //}}AFX_MSG
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/CntrItem.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

CntrItem.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014
00015 #include "MSOffice2007DemoDoc.h"
00016 #include "MSOffice2007DemoView.h"
00017 #include "CntrItem.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMSOffice2007DemoCntrItem implementation
00027
00028 IMPLEMENT_SERIAL(CMSOffice2007DemoCntrItem, CRichEditCntrItem, 0)
00029
00030 CMSOffice2007DemoCntrItem::CMSOffice2007DemoCntrItem(REOBJECT* preo, CMSOffice2007DemoDoc* pContainer) :
00031   CRichEditCntrItem(preo, pContainer)
00032 {
00033   m_uiCategoryID = 0;
00034 }
00035
00036 CMSOffice2007DemoCntrItem::~CMSOffice2007DemoCntrItem()
00037 {
00038   // TODO: add cleanup code here
00039 }
00040
00041 BOOL CMSOffice2007DemoCntrItem::OnShowPanes(CFrameWnd* pFrameWnd, BOOL bShow)
00042 {
00043   CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, pFrameWnd);
00044   if (pMainFrame != NULL)
00045   {
00046     return pMainFrame->OnShowPanes(bShow);
00047   }
00048   else // Maybe, SDI frame...
00049   {
00050     CFrameWndEx* pFrame = DYNAMIC_DOWNCAST(CFrameWndEx, pFrameWnd);
00051     if (pFrame != NULL)
00052     {
00053       return pFrame->OnShowPanes(bShow);
00054     }
00055   }
00056
00057   return FALSE;
00058 }
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CMSOffice2007DemoCntrItem diagnostics
00062
00063 #ifdef _DEBUG
00064 void CMSOffice2007DemoCntrItem::AssertValid() const
00065 {
00066   CRichEditCntrItem::AssertValid();
00067 }
00068
00069 void CMSOffice2007DemoCntrItem::Dump(CDumpContext& dc) const
00070 {
00071   CRichEditCntrItem::Dump(dc);
00072 }
00073 #endif
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076
00077
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFolderBar Member List

This is the complete list of members for CFolderBar, including all inherited members.
CFolderBar() | CFolderBar |
m_ulRecycleBin | CFolderBar | [protected]
m_wndShellTree | CFolderBar |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CFolderBar | [protected]
OnDestroy() | CFolderBar |
OnEraseBkgnd(CDC *pDC) | CFolderBar | [protected]
OnNotifyRecycleBin(WPARAM wParam, LPARAM lParam) | CFolderBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CFolderBar | [protected]
OnSize(UINT nType, int cx, int cy) | CFolderBar | [protected]
~CFolderBar() | CFolderBar | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMTasksPane.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMTasksPane.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MSMTasksPane.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "msmoneydemo.h"
00015 #include "MSMTasksPane.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMSMTasksPane
00025
00026 IMPLEMENT_DYNAMIC(CMSMTasksPane, CMFCTasksPane)
00027
00028 CMSMTasksPane::CMSMTasksPane()
00029 {
00030   m_bWrapTasks = TRUE;
00031   m_bWrapLabels = TRUE;
00032 }
00033
00034 CMSMTasksPane::~CMSMTasksPane()
00035 {
00036 }
00037
00038
00039 BEGIN_MESSAGE_MAP(CMSMTasksPane, CMFCTasksPane)
00040   ON_WM_CREATE()
00041 END_MESSAGE_MAP()
00042
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMSMTasksPane message handlers
00046
00047 int CMSMTasksPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
00048 {
00049   if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
00050     return -1;
00051
00052   int nGroup = AddGroup (_T(""));
00053
00054   COleDateTime now = COleDateTime::GetCurrentTime ();
00055   CString strDate = now.Format (_T("%B %d, %Y"));
00056
00057   AddLabel (nGroup, strDate, -1, TRUE);
00058
00059   AddLabel (nGroup, _T(" "));
00060   AddLabel (nGroup, _T(" "));
00061
00062   AddLabel (nGroup, _T("Common tasks"), -1, TRUE);
00063   AddSeparator (nGroup);
00064
00065   AddTask (nGroup, _T("Learn more about new MFC cool and fresh features"), -1, ID_HELP_MICROSOFT);
00066
00067   return 0;
00068 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TstCon.H Source File

  • ole
  • TstCon

TstCon.H

Go to the documentation of this file.
00001 // TestContainer98.h : main header file for the TESTCONTAINER98 application
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #if !defined(AFX_TESTCONTAINER98_H__198184FF_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
00012 #define AFX_TESTCONTAINER98_H__198184FF_B837_11D0_8DF1_00C04FB68D60__INCLUDED_
00013
00014 #if _MSC_VER >= 1000
00015 #pragma once
00016 #endif // _MSC_VER >= 1000
00017
00018 #ifndef __AFXWIN_H__
00019   #error include 'stdafx.h' before including this file for PCH
00020 #endif
00021
00022 #include "resource.h"       // main symbols
00023
00024 const int TCLOG_NULL = 0;
00025 const int TCLOG_OUTPUTWINDOW = 1;
00026 const int TCLOG_DEBUG = 2;
00027 const int TCLOG_FILE = 3;
00028
00029 #define LOAD_STRING_FROM_RESOURCE(s, r) \
00030 if(s.LoadString(r) == FALSE) { AfxThrowResourceException(); }
00031
00032 class CTCOptions
00033 {
00034 public:
00035    CTCOptions();
00036
00037 public:
00038    BOOL m_tUserMode;
00039    int m_iLogType;
00040    CString m_strLogFileName;
00041    CString m_strProgID;
00042    CString m_strDSMFile;
00043    BOOL m_tAllowWindowless;
00044    BOOL m_tQuickActivation;
00045    BOOL m_tTwoPassDrawing;
00046    BOOL m_tUseIPointerInactive;
00047    BOOL m_tHonorIgnoreActivateWhenVisible;
00048    BOOL m_tIOleInPlaceSiteEx;
00049    BOOL m_tIOleInPlaceSiteWindowless;
00050    BOOL m_tIAdviseSinkEx;
00051    BOOL m_tSBindHost;
00052 };
00053
00054 class CTCCommandLineInfo :
00055    public CCommandLineInfo
00056 {
00057 public:
00058    CTCCommandLineInfo( CTCOptions* pOptions );
00059
00060    void ParseInterfaceFlag( LPCTSTR pszParam );
00061    void ParseOptionFlag( LPCTSTR pszParam );
00062    void ParseParam( LPCTSTR pszParam, BOOL tFlag, BOOL tLast );
00063    void ParseServiceFlag( LPCTSTR pszParam );
00064
00065 protected:
00066    CTCOptions* m_pOptions;
00067    BOOL m_tExpectingLogFileName;
00068    BOOL m_tExpectingProgID;
00069    BOOL m_tExpectingDSMFile;
00070 };
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CTestContainer98App:
00074 // See TestContainer98.cpp for the implementation of this class
00075 //
00076
00077 class CTestContainer98App : public CWinApp
00078 {
00079 public:
00080   CTestContainer98App();
00081
00082 // Overrides
00083   // ClassWizard generated virtual function overrides
00084   //{{AFX_VIRTUAL(CTestContainer98App)
00085   public:
00086   virtual BOOL InitInstance();
00087   //}}AFX_VIRTUAL
00088
00089 // Implementation
00090   COleTemplateServer m_server;
00091     // Server object for document creation
00092
00093    CTCOptions m_options;
00094
00095    void LoadRegistrySettings();
00096    void SaveRegistrySettings();
00097
00098   //{{AFX_MSG(CTestContainer98App)
00099   afx_msg void OnAppAbout();
00100   afx_msg void OnOptionsTraceLevelNone();
00101   afx_msg void OnOptionsTraceLevelNormal();
00102   afx_msg void OnOptionsTraceLevelVerbose();
00103   afx_msg void OnUpdateOptionsTraceLevelNone(CCmdUI* pCmdUI);
00104   afx_msg void OnUpdateOptionsTraceLevelNormal(CCmdUI* pCmdUI);
00105   afx_msg void OnUpdateOptionsTraceLevelVerbose(CCmdUI* pCmdUI);
00106   afx_msg void OnFileRegisterControls();
00107   //}}AFX_MSG
00108   DECLARE_MESSAGE_MAP()
00109 };
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113
00114 //{{AFX_INSERT_LOCATION}}
00115 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00116
00117 #endif // !defined(AFX_TESTCONTAINER98_H__198184FF_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/resource.h Source File

  • vc2008fp
  • PropSheetDemo

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by PropSheetDemo.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDS_ABOUTBOX                    101
00007 #define IDD_PROPSHEETDEMO_DIALOG        102
00008 #define IDS_PROPSHT_CAPTION             103
00009 #define IDD_PROPPAGE1                   104
00010 #define IDD_PROPPAGE2                   105
00011 #define IDD_PROPPAGE3                   106
00012 #define IDD_PROPPAGE4                   107
00013 #define IDR_MAINFRAME                   128
00014 #define IDB_ICONS_LARGE                 129
00015 #define IDB_ICONS_SMALL                 130
00016 #define IDB_TREE_ICONS                  131
00017 #define IDC_PROP_SHEET1                 1000
00018 #define IDC_PROP_SHEET2                 1001
00019 #define IDC_PROP_SHEET3                 1002
00020 #define IDC_PROP_SHEET4                 1003
00021 #define IDC_PROP_SHEET5                 1004
00022 #define IDC_HEADER                      1005
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028 #define _APS_NEXT_RESOURCE_VALUE        132
00029 #define _APS_NEXT_COMMAND_VALUE         32771
00030 #define _APS_NEXT_CONTROL_VALUE         1006
00031 #define _APS_NEXT_SYMED_VALUE           108
00032 #endif
00033 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autoclik.odl Source File

  • ole
  • autoclik

autoclik.odl

Go to the documentation of this file.
00001 // AutoClik.odl : type library source for AutoClik.exe
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (AutoClik.tlb).
00005
00006 [ uuid(FC866851-9F96-11CE-B0F2-00AA006C28B3), version(1.0) ]
00007 library AutoClik
00008 {
00009   importlib("stdole32.tlb");
00010
00011   //  Primary dispatch interface for CAutoClickDoc
00012
00013   [ uuid(FC866852-9F96-11CE-B0F2-00AA006C28B3) ]
00014   dispinterface IAClick
00015   {
00016     properties:
00017       // NOTE - ClassWizard will maintain property information here.
00018       //    Use extreme caution when editing this section.
00019       //{{AFX_ODL_PROP(CAutoClickDoc)
00020       [id(1)] BSTR text;
00021       [id(2)] short x;
00022       [id(3)] short y;
00023       [id(4)] IDispatch* Position;
00024       //}}AFX_ODL_PROP
00025
00026     methods:
00027       // NOTE - ClassWizard will maintain method information here.
00028       //    Use extreme caution when editing this section.
00029       //{{AFX_ODL_METHOD(CAutoClickDoc)
00030       [id(5)] void RefreshWindow();
00031       [id(6)] void SetAllProps(short x, short y, BSTR text);
00032       [id(7)] void ShowWindow();
00033       //}}AFX_ODL_METHOD
00034
00035   };
00036
00037   //  Class information for CAutoClickDoc
00038
00039   [ uuid(FC866850-9F96-11CE-B0F2-00AA006C28B3) ]
00040   coclass CAutoClickDoc
00041   {
00042     [default] dispinterface IAClick;
00043   };
00044
00045
00046   //  Primary dispatch interface for CAutoClickPoint
00047
00048   [ uuid(0368D830-A050-11CE-B0F3-00AA006C28B3) ]
00049   dispinterface IAutoClickPoint
00050   {
00051     properties:
00052       // NOTE - ClassWizard will maintain property information here.
00053       //    Use extreme caution when editing this section.
00054       //{{AFX_ODL_PROP(CAutoClickPoint)
00055       [id(1)] short x;
00056       [id(2)] short y;
00057       //}}AFX_ODL_PROP
00058
00059     methods:
00060       // NOTE - ClassWizard will maintain method information here.
00061       //    Use extreme caution when editing this section.
00062       //{{AFX_ODL_METHOD(CAutoClickPoint)
00063       //}}AFX_ODL_METHOD
00064
00065   };
00066
00067   //  Class information for CAutoClickPoint
00068
00069   [ uuid(0368D831-A050-11CE-B0F3-00AA006C28B3) ]
00070   coclass CAutoClickPoint
00071   {
00072     [default] dispinterface IAutoClickPoint;
00073   };
00074
00075   //{{AFX_APPEND_ODL}}
00076 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCubeApp Member List

This is the complete list of members for CCubeApp, including all inherited members.
CCubeApp() | CCubeApp |
InitInstance() | CCubeApp | [virtual]
OnAppAbout() | CCubeApp |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MenuSubSet.cpp Source File

  • vc2008fp
  • MenuSubSet

MenuSubSet.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MenuSubSet.h"
00013
00014 #include "MainFrm.h"
00015 #include "ChildFrm.h"
00016 #include "MenuSubSetDoc.h"
00017 #include "MenuSubSetView.h"
00018
00019 #include "ConfigDlg.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CMenuSubSetApp
00029
00030 BEGIN_MESSAGE_MAP(CMenuSubSetApp, CWinApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032   // Standard file based document commands
00033   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00034   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00035   // Standard print setup command
00036   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CMenuSubSetApp construction
00041
00042 CMenuSubSetApp::CMenuSubSetApp() :
00043   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00044 {
00045   m_nCurrConfig = 0;
00046 }
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // The one and only CMenuSubSetApp object
00050
00051 CMenuSubSetApp theApp;
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CMenuSubSetApp initialization
00055
00056 BOOL CMenuSubSetApp::InitInstance()
00057 {
00058   // Initialize OLE libraries
00059   if (!AfxOleInit())
00060   {
00061     AfxMessageBox(IDP_OLE_INIT_FAILED);
00062     return FALSE;
00063   }
00064
00065   AfxEnableControlContainer();
00066
00067   // Standard initialization
00068   // If you are not using these features and wish to reduce the size
00069   //  of your final executable, you should remove from the following
00070   //  the specific initialization routines you do not need.
00071
00072   // Change the registry key under which our settings are stored.
00073   // TODO: You should modify this string to be something appropriate
00074   // such as the name of your company or organization.
00075   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00076
00077   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00078
00079   SetRegistryBase (_T("Settings"));
00080
00081   m_nCurrConfig = GetInt (_T("Configuration"), 0);
00082
00083   // Initialize all Managers for usage. They are automatically constructed
00084   // if not yet present
00085   InitContextMenuManager();
00086   InitKeyboardManager();
00087
00088   // TODO: Remove this if you don't want extended tooltips:
00089   InitTooltipManager();
00090
00091   CMFCToolTipInfo params;
00092   params.m_bVislManagerTheme = TRUE;
00093
00094   theApp.GetTooltipManager ()->SetTooltipParams (
00095     AFX_TOOLTIP_TYPE_ALL,
00096     RUNTIME_CLASS (CMFCToolTipCtrl),
00097     &params);
00098
00099 // -EXAMPLE-
00100
00101   // Choose application configuration:
00102   BOOL bResetToolbars = ChooseConfig (TRUE);
00103
00104 // --
00105
00106   // Register the application's document templates.  Document templates
00107   //  serve as the connection between documents, frame windows and views.
00108
00109   CMultiDocTemplate* pDocTemplate;
00110   pDocTemplate = new CMultiDocTemplate(
00111     IDR_MENUSUTYPE,
00112     RUNTIME_CLASS(CMenuSubSetDoc),
00113     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00114     RUNTIME_CLASS(CMenuSubSetView));
00115   AddDocTemplate(pDocTemplate);
00116
00117   // create main MDI Frame window
00118   CMainFrame* pMainFrame = new CMainFrame;
00119   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00120     return FALSE;
00121   m_pMainWnd = pMainFrame;
00122
00123 // -EXAMPLE-
00124
00125   if (bResetToolbars)
00126   {
00127     CMFCToolBar::ResetAll ();
00128   }
00129
00130 // --
00131
00132   // Parse command line for standard shell commands, DDE, file open
00133   CCommandLineInfo cmdInfo;
00134   ParseCommandLine(cmdInfo);
00135
00136   // Dispatch commands specified on the command line
00137   if (!ProcessShellCommand(cmdInfo))
00138     return FALSE;
00139
00140   // The main window has been initialized, so show and update it.
00141   pMainFrame->ShowWindow(m_nCmdShow);
00142   pMainFrame->UpdateWindow();
00143
00144   return TRUE;
00145 }
00146
00147 /////////////////////////////////////////////////////////////////////////////
00148 // CAboutDlg dialog used for App About
00149
00150 class CAboutDlg : public CDialog
00151 {
00152 public:
00153   CAboutDlg();
00154
00155 // Dialog Data
00156   //{{AFX_DATA(CAboutDlg)
00157   enum { IDD = IDD_ABOUTBOX };
00158   //}}AFX_DATA
00159
00160   // ClassWizard generated virtual function overrides
00161   //{{AFX_VIRTUAL(CAboutDlg)
00162   protected:
00163   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00164   //}}AFX_VIRTUAL
00165
00166 // Implementation
00167 protected:
00168   //{{AFX_MSG(CAboutDlg)
00169     // No message handlers
00170   //}}AFX_MSG
00171   DECLARE_MESSAGE_MAP()
00172 };
00173
00174 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00175 {
00176   //{{AFX_DATA_INIT(CAboutDlg)
00177   //}}AFX_DATA_INIT
00178 }
00179
00180 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00181 {
00182   CDialog::DoDataExchange(pDX);
00183   //{{AFX_DATA_MAP(CAboutDlg)
00184   //}}AFX_DATA_MAP
00185 }
00186
00187 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00188   //{{AFX_MSG_MAP(CAboutDlg)
00189     // No message handlers
00190   //}}AFX_MSG_MAP
00191 END_MESSAGE_MAP()
00192
00193 // App command to run the dialog
00194 void CMenuSubSetApp::OnAppAbout()
00195 {
00196   CAboutDlg aboutDlg;
00197   aboutDlg.DoModal();
00198 }
00199
00200 /////////////////////////////////////////////////////////////////////////////
00201 // CMenuSubSetApp message handlers
00202
00203 int CMenuSubSetApp::ExitInstance()
00204 {
00205   return CWinAppEx::ExitInstance();
00206 }
00207
00208 void CMenuSubSetApp::PreLoadState ()
00209 {
00210
00211   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00212
00213   // TODO: add another context menus here
00214 }
00215
00216
00217 /////////////////////////////////////////////////////////////////////////////
00218 // CMenuSubSetApp message handlers
00219
00220 BOOL CMenuSubSetApp::SaveAllModified()
00221 {
00222   if (!CWinApp::SaveAllModified ())
00223   {
00224     return FALSE;
00225   }
00226
00227   CMDIFrameWndEx* pMainFrame =
00228     DYNAMIC_DOWNCAST (CMDIFrameWndEx, m_pMainWnd);
00229   if (pMainFrame != NULL)
00230   {
00231     pMainFrame->SaveMDIState (GetRegSectionPath ());
00232   }
00233
00234   return TRUE;
00235 }
00236
00237 // -EXAMPLE-
00238
00239 BOOL CMenuSubSetApp::ChooseConfig(BOOL bIsStartup)
00240 {
00241   CConfigDlg dlgConfig (bIsStartup);
00242
00243   dlgConfig.m_nConfig = m_nCurrConfig;
00244
00245   if (dlgConfig.DoModal () != IDOK)
00246   {
00247     return FALSE;
00248   }
00249
00250   BOOL bResetToolbars = m_nCurrConfig != dlgConfig.m_nConfig;
00251
00252   m_nCurrConfig = dlgConfig.m_nConfig;
00253
00254   // These commands will be removed from all menus/toolbars/keyboard shortcuts:
00255   CList<UINT, UINT> lstNonPermittedCommands;
00256
00257   switch (dlgConfig.m_nConfig)
00258   {
00259   case 0:
00260     // All commands will be visible
00261     break;
00262
00263   case 1:
00264     // Remove demo commands:
00265     lstNonPermittedCommands.AddTail (ID_DEMO_DEMO1);
00266     lstNonPermittedCommands.AddTail (ID_DEMO_DEMO2);
00267     break;
00268
00269   case 2:
00270     // Remove demo/save commands:
00271     lstNonPermittedCommands.AddTail (ID_DEMO_DEMO1);
00272     lstNonPermittedCommands.AddTail (ID_DEMO_DEMO2);
00273     lstNonPermittedCommands.AddTail (ID_FILE_SAVE);
00274     lstNonPermittedCommands.AddTail (ID_FILE_SAVE_AS);
00275     break;
00276   }
00277
00278   CMFCToolBar::SetNonPermittedCommands (lstNonPermittedCommands);
00279
00280   WriteInt (_T("Configuration"), m_nCurrConfig);
00281   return bResetToolbars;
00282 }
00283
00284 // ---
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/superpad.h Source File

  • ole
  • superpad

superpad.h

Go to the documentation of this file.
00001 // superpad.h : main header file for the SuperPad application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "resource.h"
00013 #include "pageset.h"
00014 #include "aboutbox.h"
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CTheApp
00018
00019 class CTheApp : public CWinApp
00020 {
00021 // Constructors
00022 public:
00023   CTheApp();
00024   ~CTheApp();
00025
00026 // Implementation
00027 private:
00028   virtual BOOL InitInstance();
00029   virtual int ExitInstance();
00030   virtual BOOL OnIdle(LONG lCount);
00031   virtual BOOL PreTranslateMessage(MSG* pMsg);
00032
00033   DWORD m_dwSplashTime;
00034   CSplashWnd m_splash;
00035
00036   COleTemplateServer m_server;
00037
00038   //{{AFX_MSG(CTheApp)
00039   afx_msg void OnAppAbout();
00040   afx_msg void OnPageSetup();
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045 extern CPageSetupDlg NEAR dlgPageSetup;
00046 extern CTheApp NEAR theApp;
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDHtmlExploreDlg Member List

This is the complete list of members for CDHtmlExploreDlg, including all inherited members.
CDHtmlExploreDlg(CWnd *pParent=NULL) | CDHtmlExploreDlg |
DoDataExchange(CDataExchange *pDX) | CDHtmlExploreDlg | [protected, virtual]
IDD enum value | CDHtmlExploreDlg |
m_hIcon | CDHtmlExploreDlg | [protected]
m_spCurrElement | CDHtmlExploreDlg | [protected]
m_strCtxFileName | CDHtmlExploreDlg | [protected]
m_strCurrDir | CDHtmlExploreDlg | [protected]
OnBrowse(IHTMLElement *phtmlElement) | CDHtmlExploreDlg | [protected]
OnClickFile(IHTMLElement *phtmlElement) | CDHtmlExploreDlg | [protected]
OnClickFolder(IHTMLElement *phtmlElement) | CDHtmlExploreDlg | [protected]
OnContextBrowse() | CDHtmlExploreDlg | [protected]
OnContextExit() | CDHtmlExploreDlg | [protected]
OnContextProperties() | CDHtmlExploreDlg | [protected]
OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl) | CDHtmlExploreDlg | [protected]
OnInitDialog() | CDHtmlExploreDlg | [protected, virtual]
OnMouseOutElement(IHTMLElement *phtmlElement) | CDHtmlExploreDlg | [protected]
OnMouseOverElement(IHTMLElement *phtmlElement) | CDHtmlExploreDlg | [protected]
OnPaint() | CDHtmlExploreDlg | [protected]
OnQueryDragIcon() | CDHtmlExploreDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CDHtmlExploreDlg | [protected]
RefreshDir() | CDHtmlExploreDlg | [protected]
ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved) | CDHtmlExploreDlg | [protected]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ExcepInf.H Source File

  • ole
  • TstCon

ExcepInf.H

Go to the documentation of this file.
00001 // File: ExcepInf.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CExcepInfo :
00011    public EXCEPINFO
00012 {
00013 public:
00014    CExcepInfo();
00015    ~CExcepInfo();
00016
00017    void Clear();
00018 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/StdAfx.cpp Source File

  • vc2008fp
  • MDITabsDemo

StdAfx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  MDITabsDemo.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005
00006 #include "stdafx.h"
00007
00008
00009
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/statpage.h Source File

  • vc2008fp
  • DrawClient

statpage.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CStatPage dialog
00014
00015 class CStatPage : public CPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CStatPage)
00018
00019 // Construction
00020 public:
00021   CStatPage();
00022   ~CStatPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CStatPage)
00026   enum { IDD = IDD_STAT_PAGE };
00027   CString m_strSavedBy;
00028   CString m_strRevNum;
00029   CString m_strEditTime;
00030   CString m_strLastPrint;
00031   CString m_strCreateDate;
00032   CString m_strLastSave;
00033   CString m_strNumPages;
00034   CString m_strNumWords;
00035   CString m_strNumChars;
00036   CString m_strSecurity;
00037   //}}AFX_DATA
00038
00039 // Overrides
00040 protected:
00041   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00042
00043   // Implementation
00044 protected:
00045   //{{AFX_MSG(CStatPage)
00046   //}}AFX_MSG
00047
00048   DECLARE_MESSAGE_MAP()
00049 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/resource.h Source File

  • general
  • multipad

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by MULTIPAD.RC
00004 //
00005 #define IDR_MAINFRAME                   128
00006 #define IDR_TEXTTYPE                    129
00007 #define IDD_ABOUTBOX                    512
00008
00009 // Next default values for new objects
00010 //
00011 #ifdef APSTUDIO_INVOKED
00012 #ifndef APSTUDIO_READONLY_SYMBOLS
00013 #define _APS_NEXT_RESOURCE_VALUE        101
00014 #define _APS_NEXT_COMMAND_VALUE         32769
00015 #define _APS_NEXT_CONTROL_VALUE         1000
00016 #define _APS_NEXT_SYMED_VALUE           101
00017 #endif
00018 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHARHDR Member List

This is the complete list of members for CHARHDR, including all inherited members.
cf | CHARHDR |
CHARHDR() | CHARHDR | [inline]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoclik.h Source File

  • ole
  • autoclik
  • autodriv

autoclik.h

Go to the documentation of this file.
00001 // autoclik.h: defines the IDispatch classes available from AUTOCLIK.EXE
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 // Machine generated IDispatch driver class(es) created with MFCDSPWZ tool.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CAutoClik wrapper class
00016
00017 class CAutoClik : public COleDispatchDriver
00018 {
00019 // Attributes
00020 public:
00021   CString GetText();
00022   void SetText(LPCTSTR);
00023   short GetX();
00024   void SetX(short);
00025   short GetY();
00026   void SetY(short);
00027   LPDISPATCH GetPosition();
00028   void SetPosition(LPDISPATCH);
00029
00030 // Operations
00031 public:
00032   void RefreshWindow();
00033   void SetAllProps(short x, short y, LPCTSTR text);
00034   void ShowWindow();
00035 };
00036
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CClikPoint wrapper class
00040
00041 class CClikPoint : public COleDispatchDriver
00042 {
00043 // Attributes
00044 public:
00045   short GetX();
00046   void SetX(short);
00047   short GetY();
00048   void SetY(short);
00049
00050 // Operations
00051 public:
00052 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenu.cpp Source File

  • vc2008fp
  • DynamicMenu

DynamicMenu.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DynamicMenu.h"
00013
00014 #include "MainFrm.h"
00015 #include "DynamicMenuDoc.h"
00016 #include "DynamicMenuView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDynamicMenuApp
00026
00027 BEGIN_MESSAGE_MAP(CDynamicMenuApp, CWinAppEx)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CDynamicMenuApp construction
00038
00039 CDynamicMenuApp::CDynamicMenuApp() : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CDynamicMenuApp object
00047
00048 CDynamicMenuApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CDynamicMenuApp initialization
00052
00053 BOOL CDynamicMenuApp::InitInstance()
00054 {
00055   // Initialize OLE libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   AfxEnableControlContainer();
00063
00064   // Standard initialization
00065   // If you are not using these features and wish to reduce the size
00066   //  of your final executable, you should remove from the following
00067   //  the specific initialization routines you do not need.
00068
00069   // Change the registry key under which our settings are stored.
00070   // TODO: You should modify this string to be something appropriate
00071   // such as the name of your company or organization.
00072   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   SetRegistryBase (_T("Settings"));
00077
00078   // Initialize all Managers for usage. They are automatically constructed
00079   // if not yet present
00080   InitContextMenuManager();
00081   InitKeyboardManager();
00082
00083   // Register the application's document templates.  Document templates
00084   //  serve as the connection between documents, frame windows and views.
00085
00086   CSingleDocTemplate* pDocTemplate;
00087   pDocTemplate = new CSingleDocTemplate(
00088     IDR_MAINFRAME,
00089     RUNTIME_CLASS(CDynamicMenuDoc),
00090     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00091     RUNTIME_CLASS(CDynamicMenuView));
00092   AddDocTemplate(pDocTemplate);
00093
00094   // Parse command line for standard shell commands, DDE, file open
00095   CCommandLineInfo cmdInfo;
00096   ParseCommandLine(cmdInfo);
00097
00098   // Dispatch commands specified on the command line
00099   if (!ProcessShellCommand(cmdInfo))
00100     return FALSE;
00101
00102   LoadCustomState ();
00103
00104   // The one and only window has been initialized, so show and update it.
00105   m_pMainWnd->ShowWindow(SW_SHOW);
00106   m_pMainWnd->UpdateWindow();
00107
00108   return TRUE;
00109 }
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CDynamicMenuApp message handlers
00113
00114 int CDynamicMenuApp::ExitInstance()
00115 {
00116   return CWinAppEx::ExitInstance();
00117 }
00118
00119 void CDynamicMenuApp::PreLoadState ()
00120 {
00121
00122   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00123
00124   // TODO: add another context menus here
00125 }
00126
00127
00128 /////////////////////////////////////////////////////////////////////////////
00129 // CAboutDlg dialog used for App About
00130
00131 class CAboutDlg : public CDialog
00132 {
00133 public:
00134   CAboutDlg();
00135
00136 // Dialog Data
00137   //{{AFX_DATA(CAboutDlg)
00138   enum { IDD = IDD_ABOUTBOX };
00139   //}}AFX_DATA
00140
00141   // ClassWizard generated virtual function overrides
00142   //{{AFX_VIRTUAL(CAboutDlg)
00143   protected:
00144   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00145   //}}AFX_VIRTUAL
00146
00147 // Implementation
00148 protected:
00149   //{{AFX_MSG(CAboutDlg)
00150     // No message handlers
00151   //}}AFX_MSG
00152   DECLARE_MESSAGE_MAP()
00153 };
00154
00155 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00156 {
00157   //{{AFX_DATA_INIT(CAboutDlg)
00158   //}}AFX_DATA_INIT
00159 }
00160
00161 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00162 {
00163   CDialog::DoDataExchange(pDX);
00164   //{{AFX_DATA_MAP(CAboutDlg)
00165   //}}AFX_DATA_MAP
00166 }
00167
00168 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00169   //{{AFX_MSG_MAP(CAboutDlg)
00170     // No message handlers
00171   //}}AFX_MSG_MAP
00172 END_MESSAGE_MAP()
00173
00174 // App command to run the dialog
00175 void CDynamicMenuApp::OnAppAbout()
00176 {
00177   CAboutDlg aboutDlg;
00178   aboutDlg.DoModal();
00179 }
00180
00181 /////////////////////////////////////////////////////////////////////////////
00182 // CDynamicMenuApp message handlers
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page2.h Source File

  • vc2008fp
  • NewControls

Page2.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPage2 dialog
00014
00015 class CPage2 : public CMFCPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CPage2)
00018
00019 // Construction
00020 public:
00021   CPage2();
00022   ~CPage2();
00023
00024 // Dialog Data
00025   enum { IDD = IDD_PAGE2 };
00026   CMFCColorPickerCtrl m_wndLum;
00027   CMFCColorPickerCtrl m_wndColorPalette;
00028   CStatic m_wndColorBarFrame2;
00029   CStatic m_wndColorBarFrame;
00030   CMFCColorButton m_ColorPicker;
00031   CString m_strRGB;
00032   CString m_strRGBColorBar;
00033   CString m_strRGBColorBar2;
00034   CString m_strRGBColorDialog;
00035   CString m_strRGBColorPalette;
00036
00037 // Overrides
00038 protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040
00041 // Implementation
00042 protected:
00043   virtual BOOL OnInitDialog();
00044
00045   afx_msg void OnColorDlg();
00046   afx_msg void OnColorPicker();
00047   afx_msg void OnColorPalette();
00048   afx_msg void OnLum();
00049   afx_msg void OnColorBar();
00050   afx_msg void OnColorBar2();
00051
00052   DECLARE_MESSAGE_MAP()
00053
00054   COLORREF m_Color;
00055   CMFCColorBar m_wndColorBar;
00056   CMFCColorBar m_wndColorBar2;
00057
00058   CPalette m_palColorPicker;
00059   CPalette m_palSys;
00060 };
00061
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CircLib::_DCirc Member List

This is the complete list of members for CircLib::_DCirc, including all inherited members.
AboutBox() | CircLib::_DCirc
id | CircLib::_DCirc
id | CircLib::_DCirc
id | CircLib::_DCirc
id | CircLib::_DCirc
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpPpg.h Source File

  • controls
  • testhelp

ThelpPpg.h

Go to the documentation of this file.
00001 // ThelpPpg.h : Declaration of the CTesthelpPropPage property page class.
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 ////////////////////////////////////////////////////////////////////////////
00013 // CTesthelpPropPage : See ThelpPpg.cpp for implementation.
00014
00015 class CTesthelpPropPage : public COlePropertyPage
00016 {
00017    DECLARE_DYNCREATE(CTesthelpPropPage)
00018    DECLARE_OLECREATE_EX(CTesthelpPropPage)
00019
00020 // Constructor
00021 public:
00022    CTesthelpPropPage();
00023
00024    BOOL OnHelp(LPCTSTR helpdir);
00025
00026 // Dialog Data
00027    //{{AFX_DATA(CTesthelpPropPage)
00028   enum { IDD = IDD_PROPPAGE_TESTHELP };
00029    CEdit     m_CtrlTipCaption;
00030    CString     m_szName1;
00031    CString     m_szName2;
00032    CString     m_szName3;
00033    BOOL     m_bUseMine;
00034    CString     m_szTipCaption;
00035    BOOL     m_bUseToolTip;
00036    int        m_nUsePopupHelp;
00037   //}}AFX_DATA
00038
00039 // Implementation
00040 protected:
00041    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00042
00043 // Message maps
00044 protected:
00045    //{{AFX_MSG(CTesthelpPropPage)
00046    virtual BOOL OnInitDialog();
00047   afx_msg void OnUsetooltipClicked();
00048   //}}AFX_MSG
00049    DECLARE_MESSAGE_MAP()
00050
00051 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/inproc.odl Source File

  • ole
  • inproc

inproc.odl

Go to the documentation of this file.
00001 // inproc.odl : type library source for inproc.dll
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 // This file will be processed by the Make Type Library (mktyplib) tool to
00013 // produce the type library (inproc.tlb).
00014
00015 [ uuid(67519E10-2266-11B9-C004-5230D8C07D39), version(1.0) ]
00016 library inproc
00017 {
00018   importlib("stdole32.tlb");
00019
00020   //  Primary dispatch interface for CVariantMap
00021   [ uuid(747205C0-F9F0-11cd-8C3D-00AA004BB3B7) ]
00022   dispinterface IVariantMap
00023   {
00024     properties:
00025       // NOTE - ClassWizard will maintain property information here.
00026       //    Use extreme caution when editing this section.
00027       //{{AFX_ODL_PROP(CVariantMap)
00028       [id(1)] BSTR str1;
00029       [id(3)] BSTR str2;
00030       [id(2)] long i1;
00031       [id(4)] long i2;
00032       [id(5)] long Count;
00033       //}}AFX_ODL_PROP
00034
00035     methods:
00036       // NOTE - ClassWizard will maintain method information here.
00037       //    Use extreme caution when editing this section.
00038       //{{AFX_ODL_METHOD(CVariantMap)
00039       [id(6)] void SetAt(VARIANT from, VARIANT to);
00040       [id(7)] void RemoveAll();
00041       [id(8)] void RemoveKey(VARIANT key);
00042       [id(9)] boolean IsEmpty();
00043       [id(10), propget] VARIANT Item(VARIANT from);
00044       //}}AFX_ODL_METHOD
00045       [id(-4), propget] IUnknown* _NewEnum();
00046   };
00047
00048   //  Class information for CVariantMap
00049   [ uuid(7ACE7860-9A1C-11cd-9A90-00DD01113F12) ]
00050   coclass CVariantMap
00051   {
00052     [default] dispinterface IVariantMap;
00053   };
00054
00055   //  Primary dispatch interface for CStringCollect
00056   [ uuid(0F098950-F9F0-11cd-8C3D-00AA004BB3B7) ]
00057   dispinterface IStringCollect
00058   {
00059     properties:
00060       // NOTE - ClassWizard will maintain property information here.
00061       //    Use extreme caution when editing this section.
00062       //{{AFX_ODL_PROP(CStringCollect)
00063       [id(1)] long Count;
00064       //}}AFX_ODL_PROP
00065
00066     methods:
00067       // NOTE - ClassWizard will maintain method information here.
00068       //    Use extreme caution when editing this section.
00069       //{{AFX_ODL_METHOD(CStringCollect)
00070       [id(6), propget] BSTR Item(long nIndex);
00071       [id(6), propput] void Item(long nIndex, BSTR lpszNewValue);
00072       [id(2)] long Add(BSTR newValue);
00073       [id(3)] long Find(BSTR findValue);
00074       [id(4)] long Remove(VARIANT removeValue);
00075       [id(5)] void RemoveAll();
00076       //}}AFX_ODL_METHOD
00077       [id(-4), propget] IUnknown* _NewEnum();
00078   };
00079
00080   //  Class information for CStringCollect
00081   [ uuid(BA0357C0-C377-11cd-9A90-00DD01113F12) ]
00082   coclass CStringCollect
00083   {
00084     [default] dispinterface IStringCollect;
00085   };
00086
00087   //  Primary dispatch interface for CVariantAssoc
00088   [ uuid(84E099E0-F9F6-11cd-8C3D-00AA004BB3B7) ]
00089   dispinterface IVariantAssoc
00090   {
00091     properties:
00092       // NOTE - ClassWizard will maintain property information here.
00093       //    Use extreme caution when editing this section.
00094       //{{AFX_ODL_PROP(CVariantAssoc)
00095       [id(1)] VARIANT Key;
00096       [id(2)] VARIANT Value;
00097       //}}AFX_ODL_PROP
00098
00099     methods:
00100       // NOTE - ClassWizard will maintain method information here.
00101       //    Use extreme caution when editing this section.
00102       //{{AFX_ODL_METHOD(CVariantAssoc)
00103       //}}AFX_ODL_METHOD
00104
00105   };
00106
00107   //  Class information for CVariantAssoc
00108   [ uuid(857F2CD0-F9FB-11cd-8C3D-00AA004BB3B7) ]
00109   coclass CVariantAssoc
00110   {
00111     [default] dispinterface IVariantAssoc;
00112   };
00113
00114   //{{AFX_APPEND_ODL}}
00115 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDllScreenCapApp Member List

This is the complete list of members for CDllScreenCapApp, including all inherited members.
CDllScreenCapApp() | CDllScreenCapApp |
InitInstance() | CDllScreenCapApp | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomDlgProp Member List

This is the complete list of members for CCustomDlgProp, including all inherited members.
CCustomDlgProp(const CString &strName, const COleVariant &varValue) | CCustomDlgProp |
HasButton() const | CCustomDlgProp | [inline, protected, virtual]
OnClickButton(CPoint point) | CCustomDlgProp | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CListViewEx Member List

This is the complete list of members for CListViewEx, including all inherited members.
CListViewEx() | CListViewEx |
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CListViewEx | [protected, virtual]
GetFullRowSel() | CListViewEx |
m_bClientWidthSel | CListViewEx |
m_bFullRowSel | CListViewEx | [protected]
m_clrBkgnd | CListViewEx | [protected]
m_clrText | CListViewEx | [protected]
m_clrTextBk | CListViewEx | [protected]
m_cxClient | CListViewEx | [protected]
m_cxStateImageOffset | CListViewEx | [protected]
MakeShortString(CDC *pDC, LPCTSTR lpszLong, int nColumnLen, int nOffset) | CListViewEx | [protected, static]
OnKillFocus(CWnd *pNewWnd) | CListViewEx | [protected]
OnPaint() | CListViewEx | [protected]
OnSetBkColor(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSetFocus(CWnd *pOldWnd) | CListViewEx | [protected]
OnSetImageList(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSetTextBkColor(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSetTextColor(WPARAM wParam, LPARAM lParam) | CListViewEx | [protected]
OnSize(UINT nType, int cx, int cy) | CListViewEx | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CListViewEx | [virtual]
RepaintSelectedItems() | CListViewEx | [protected]
SetFullRowSel(BOOL bFillRowSel) | CListViewEx |
~CListViewEx() | CListViewEx | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/stdafx.h Source File

  • general
  • snapvw

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently, but
00003 // are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00015
00016 #include <afxwin.h>         // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions
00018 #ifndef _AFX_NO_AFXCMN_SUPPORT
00019 #include <afxcmn.h>         // MFC support for Windows 95 Common Controls
00020 #endif // _AFX_NO_AFXCMN_SUPPORT
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistctl.cpp Source File

  • controls
  • xlist

xlistctl.cpp

Go to the documentation of this file.
00001 // xlistctl.cpp : Implementation of the CXlistCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "xlist.h"
00014 #include "xlistctl.h"
00015 #include "xlistppg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // Numeric constants
00025
00026 const int LSTITEMSPACING       =   4;
00027 const int MAXTEXTLEN        = 128;
00028
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // Forward declarations
00032
00033 short GetFontHeight(LPFONTDISP lpfd);
00034 long GetPictureHeight(LPPICTUREDISP lppd);
00035 long GetPictureWidth(LPPICTUREDISP lppd);
00036 void GetProperty(LPDISPATCH lpd, short dispId, short propType, void *value);
00037 STDAPI_(int) XformWidthInHimetricToPixels(HDC hDC, int iWidthInHiMetric);
00038 STDAPI_(int) XformHeightInHimetricToPixels(HDC hDC, int iHeightInHiMetric);
00039
00040 #define HIMETRIC_PER_INCH   2540      // number HIMETRIC units per inch
00041 #define MAP_LOGHIM_TO_PIX(x,ppli)   MulDiv((ppli), (x), HIMETRIC_PER_INCH)
00042
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CItemData::CItemData - Constructor
00046
00047 CItemData::CItemData(const TCHAR *pstrText, LPFONTDISP lpFontDisp, LPPICTUREDISP lpPicDisp)
00048 {
00049   pBack = NULL;
00050   pFore = NULL;
00051
00052   // Init text
00053   if (pstrText)
00054     pText = new CString(pstrText);
00055   else
00056     pText = NULL;
00057
00058   // Init picture holder
00059   if (lpPicDisp)
00060   {
00061      pPicHolder = new CPictureHolder;
00062      pPicHolder->SetPictureDispatch(lpPicDisp);
00063   }
00064   else pPicHolder = NULL;
00065
00066   // Init font holder
00067   if (lpFontDisp)
00068   {
00069      pFontHolder = new CFontHolder(NULL);
00070      pFontHolder->InitializeFont(NULL, lpFontDisp);
00071   }
00072   else pFontHolder = NULL;
00073 }
00074
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077 // CItemData::CItemData - Destructor
00078
00079 CItemData::~CItemData()
00080 {
00081   if (pBack) delete pBack;
00082   if (pFore) delete pFore;
00083   if (pText) delete pText;
00084   if (pFontHolder) delete pFontHolder;
00085   if (pPicHolder) delete pPicHolder;
00086 }
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CItemData::GetBackColor - Return the item's background color.
00090
00091 OLE_COLOR *CItemData::GetBackColor()
00092 {
00093   return pBack;
00094 }
00095
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CItemData::SetBackColor - Set the item's background color.
00099
00100 void CItemData::SetBackColor(OLE_COLOR *pNewBack)
00101 {
00102   if (pNewBack)
00103   {
00104     if (!pBack)
00105     {
00106       pBack = new OLE_COLOR;
00107     }
00108     *pBack = *pNewBack;
00109   }
00110   else
00111     if (pBack)
00112     {
00113       delete pBack;
00114       pBack = NULL;
00115     }
00116 }
00117
00118
00119 /////////////////////////////////////////////////////////////////////////////
00120 // CItemData::GetForeColor - Return the item's foreground color.
00121
00122 OLE_COLOR *CItemData::GetForeColor()
00123 {
00124   return pFore;
00125 }
00126
00127
00128 /////////////////////////////////////////////////////////////////////////////
00129 // CItemData::SetForeColor - Set the item's foreground color.
00130
00131 void CItemData::SetForeColor(OLE_COLOR *pNewFore)
00132 {
00133   if (pNewFore)
00134   {
00135     if (!pFore)
00136     {
00137       pFore = new OLE_COLOR;
00138     }
00139     *pFore = *pNewFore;
00140   }
00141   else
00142     if (pFore)
00143     {
00144       delete pFore;
00145       pFore = NULL;
00146     }
00147 }
00148
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CItemData::GetText - Return the item's text.
00152
00153 void CItemData::GetText(LPTSTR buffer, short szBuffer)
00154 {
00155   if (pText)
00156   {
00157     _tcscpy_s(buffer, szBuffer, pText->GetBuffer(szBuffer));
00158     pText->ReleaseBuffer();
00159   }
00160   else
00161     _tcscpy_s(buffer, szBuffer, _T(""));
00162 }
00163
00164
00165 /////////////////////////////////////////////////////////////////////////////
00166 // CItemData::SetText - Set the item's text.
00167
00168 void CItemData::SetText(const TCHAR *pstrText)
00169 {
00170   if (_tcslen(pstrText) > 0)
00171   {
00172     if (!pText)
00173     {
00174       pText = new CString(pstrText);
00175     }
00176     else *pText = pstrText;
00177   }
00178   else
00179     if (pText)
00180     {
00181       delete pText;
00182       pText = NULL;
00183     }
00184 }
00185
00186
00187 /////////////////////////////////////////////////////////////////////////////
00188 // CItemData::GetFont - Return the item's font.
00189
00190 CFontHolder *CItemData::GetFont()
00191 {
00192   return pFontHolder;
00193 }
00194
00195
00196 /////////////////////////////////////////////////////////////////////////////
00197 // CItemData::SetFont - Set the item's font.
00198
00199 void CItemData::SetFont(LPFONTDISP pNewFontDisp)
00200 {
00201    if (pNewFontDisp)
00202    {
00203     if (!pFontHolder)
00204     {
00205       pFontHolder = new CFontHolder(NULL);
00206     }
00207     pFontHolder->InitializeFont(NULL, pNewFontDisp);
00208   }
00209   else
00210     if (pFontHolder)
00211     {
00212       delete pFontHolder;
00213       pFontHolder = NULL;
00214     }
00215 }
00216
00217
00218 /////////////////////////////////////////////////////////////////////////////
00219 // CItemData::GetPicture - Return the item's picture.
00220
00221 CPictureHolder *CItemData::GetPicture()
00222 {
00223   return pPicHolder;
00224 }
00225
00226
00227 /////////////////////////////////////////////////////////////////////////////
00228 // CItemData::SetPicture - Set the item's picture.
00229
00230 void CItemData::SetPicture(LPPICTUREDISP pNewPicDisp)
00231 {
00232   if (pNewPicDisp)
00233   {
00234     if (!pPicHolder)
00235     {
00236       pPicHolder = new CPictureHolder;
00237     }
00238      pPicHolder->SetPictureDispatch(pNewPicDisp);
00239   }
00240   else
00241     if (pPicHolder)
00242     {
00243       delete pPicHolder;
00244       pPicHolder = NULL;
00245     }
00246 }
00247
00248
00249 IMPLEMENT_DYNCREATE(CXlistCtrl, COleControl)
00250
00251
00252 /////////////////////////////////////////////////////////////////////////////
00253 // Message map
00254
00255 BEGIN_MESSAGE_MAP(CXlistCtrl, COleControl)
00256   //{{AFX_MSG_MAP(CXlistCtrl)
00257   ON_MESSAGE(OCM_COMMAND, OnOcmCommand)
00258   ON_WM_ERASEBKGND()
00259   ON_MESSAGE(OCM_DRAWITEM,    OnOcmDrawItem)
00260   ON_MESSAGE(OCM_MEASUREITEM, OnOcmMeasureItem)
00261   //}}AFX_MSG_MAP
00262   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00263 END_MESSAGE_MAP()
00264
00265
00266 /////////////////////////////////////////////////////////////////////////////
00267 // Dispatch map
00268
00269 BEGIN_DISPATCH_MAP(CXlistCtrl, COleControl)
00270   //{{AFX_DISPATCH_MAP(CXlistCtrl)
00271   DISP_PROPERTY_NOTIFY(CXlistCtrl, "InvertFlag", m_invertFlag, OnInvertFlagChanged, VT_BOOL)
00272   DISP_FUNCTION(CXlistCtrl, "RemoveItem", RemoveItem, VT_EMPTY, VTS_I2)
00273   DISP_FUNCTION(CXlistCtrl, "Clear", Clear, VT_EMPTY, VTS_NONE)
00274   DISP_FUNCTION(CXlistCtrl, "AddTextFontItem", AddTextFontItem, VT_EMPTY, VTS_I2 VTS_BSTR VTS_FONT)
00275   DISP_FUNCTION(CXlistCtrl, "AddTextItem", AddTextItem, VT_EMPTY, VTS_I2 VTS_BSTR)
00276   DISP_FUNCTION(CXlistCtrl, "AddPicItem", AddPicItem, VT_EMPTY, VTS_I2 VTS_PICTURE)
00277   DISP_PROPERTY_PARAM(CXlistCtrl, "ItemBackColor", GetItemBackColor, SetItemBackColor, VT_COLOR, VTS_I2)
00278   DISP_PROPERTY_PARAM(CXlistCtrl, "ItemForeColor", GetItemForeColor, SetItemForeColor, VT_COLOR, VTS_I2)
00279   DISP_PROPERTY_PARAM(CXlistCtrl, "ItemText", GetItemText, SetItemText, VT_BSTR, VTS_I2)
00280   DISP_PROPERTY_PARAM(CXlistCtrl, "ItemFont", GetItemFont, SetItemFont, VT_FONT, VTS_I2)
00281   DISP_PROPERTY_PARAM(CXlistCtrl, "ItemPicture", GetItemPicture, SetItemPicture, VT_PICTURE, VTS_I2)
00282   //}}AFX_DISPATCH_MAP
00283   DISP_FUNCTION_ID(CXlistCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00284 END_DISPATCH_MAP()
00285
00286
00287 /////////////////////////////////////////////////////////////////////////////
00288 // Event map
00289
00290 BEGIN_EVENT_MAP(CXlistCtrl, COleControl)
00291   //{{AFX_EVENT_MAP(CXlistCtrl)
00292   //}}AFX_EVENT_MAP
00293 END_EVENT_MAP()
00294
00295
00296 /////////////////////////////////////////////////////////////////////////////
00297 // Property pages
00298
00299 // TODO: Add more property pages as needed.  Remember to increase the count!
00300 BEGIN_PROPPAGEIDS(CXlistCtrl, 1)
00301   PROPPAGEID(CXlistPropPage::guid)
00302 END_PROPPAGEIDS(CXlistCtrl)
00303
00304
00305 /////////////////////////////////////////////////////////////////////////////
00306 // Initialize class factory and guid
00307
00308 IMPLEMENT_OLECREATE_EX(CXlistCtrl, "XLIST.XlistCtrl.1",
00309   0x37446b99, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00310
00311
00312 /////////////////////////////////////////////////////////////////////////////
00313 // Type library ID and version
00314
00315 IMPLEMENT_OLETYPELIB(CXlistCtrl, _tlid, _wVerMajor, _wVerMinor)
00316
00317
00318 /////////////////////////////////////////////////////////////////////////////
00319 // Interface IDs
00320
00321 const IID BASED_CODE IID_DXlist =
00322     { 0x37446b9a, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00323 const IID BASED_CODE IID_DXlistEvents =
00324     { 0x37446b9b, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00325
00326
00327 /////////////////////////////////////////////////////////////////////////////
00328 // Control type information
00329
00330 static const DWORD BASED_CODE _dwXlistOleMisc =
00331   OLEMISC_ACTIVATEWHENVISIBLE |
00332   OLEMISC_SETCLIENTSITEFIRST |
00333   OLEMISC_INSIDEOUT |
00334   OLEMISC_CANTLINKINSIDE |
00335   OLEMISC_RECOMPOSEONRESIZE;
00336
00337 IMPLEMENT_OLECTLTYPE(CXlistCtrl, IDS_XLIST, _dwXlistOleMisc)
00338
00339
00340 /////////////////////////////////////////////////////////////////////////////
00341 // CXlistCtrl::CXlistCtrlFactory::UpdateRegistry -
00342 // Adds or removes system registry entries for CXlistCtrl
00343
00344 BOOL CXlistCtrl::CXlistCtrlFactory::UpdateRegistry(BOOL bRegister)
00345 {
00346   if (bRegister)
00347     return AfxOleRegisterControlClass(
00348       AfxGetInstanceHandle(),
00349       m_clsid,
00350       m_lpszProgID,
00351       IDS_XLIST,
00352       IDB_XLIST,
00353       FALSE,                      //  Not insertable
00354       _dwXlistOleMisc,
00355       _tlid,
00356       _wVerMajor,
00357       _wVerMinor);
00358   else
00359     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00360 }
00361
00362
00363 /////////////////////////////////////////////////////////////////////////////
00364 // CXlistCtrl::CXlistCtrl - Constructor
00365
00366 CXlistCtrl::CXlistCtrl()
00367 {
00368   InitializeIIDs(&IID_DXlist, &IID_DXlistEvents);
00369
00370   m_itemDefHeight = 0;
00371   m_sBorderStyle = 1;
00372 }
00373
00374
00375 /////////////////////////////////////////////////////////////////////////////
00376 // CXlistCtrl::~CXlistCtrl - Destructor
00377
00378 CXlistCtrl::~CXlistCtrl()
00379 {
00380   // Cleanup any and all CItemData objects
00381
00382   for (int i=0; i<=m_itemData.GetUpperBound(); i++)
00383   {
00384     CItemData* pItem = (CItemData*)m_itemData.GetAt(i);
00385
00386     if (pItem != NULL)
00387       delete pItem;
00388   }
00389
00390   m_itemData.RemoveAll();
00391 }
00392
00393
00394 BOOL CXlistCtrl::PreTranslateMessage(MSG* pMsg)
00395 {
00396   if (pMsg->message == WM_KEYDOWN)
00397   {
00398     if (pMsg->wParam == VK_DOWN || pMsg->wParam == VK_UP)
00399     {
00400       SendMessage(pMsg->message, pMsg->wParam, pMsg->lParam);
00401       return TRUE;
00402     }
00403   }
00404   return FALSE;
00405 }
00406
00407 /////////////////////////////////////////////////////////////////////////////
00408 // CXlistCtrl::OnDraw - Drawing function
00409
00410 void CXlistCtrl::OnDraw(
00411       CDC* pdc, const CRect& rcBounds, const CRect&)
00412 {
00413   LPRECT      lpr;
00414   CBrush      br;
00415
00416   lpr = (LPRECT)(LPCRECT)rcBounds;
00417
00418   // Paint background with the ambient background color
00419   br.CreateSolidBrush(TranslateColor(AmbientBackColor()));
00420   pdc->FillRect(lpr, &br);
00421
00422   // Adjust rectangle size to account for listbox idiosyncracies
00423   // (it paints its own nonclient stuff during WM_PAINT)
00424   CRect rect(rcBounds);
00425
00426   if (!pdc->IsKindOf(RUNTIME_CLASS(CPaintDC)))
00427   {
00428     if (m_bUIActive && m_pRectTracker != NULL)
00429     {
00430       UINT nAdjust = 2 * m_pRectTracker->m_nHandleSize;
00431       rect.right -= nAdjust;
00432       rect.bottom -= nAdjust;
00433     }
00434
00435     if (m_bInPlaceActive && (GetStyle() & WS_VSCROLL))
00436       rect.right -= GetSystemMetrics(SM_CXVSCROLL);
00437   }
00438
00439   DoSuperclassPaint(pdc, rect);
00440 }
00441
00442
00443 /////////////////////////////////////////////////////////////////////////////
00444 // CXlistCtrl::DoPropExchange - Persistence support
00445
00446 void CXlistCtrl::DoPropExchange(CPropExchange* pPX)
00447 {
00448   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00449   COleControl::DoPropExchange(pPX);
00450
00451   PX_Bool(pPX, _T("InvertFlag"), m_invertFlag, TRUE);
00452 }
00453
00454
00455 /////////////////////////////////////////////////////////////////////////////
00456 // CXlistCtrl::OnResetState - Reset control to default state
00457
00458 void CXlistCtrl::OnResetState()
00459 {
00460   Clear();
00461
00462   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00463 }
00464
00465
00466 /////////////////////////////////////////////////////////////////////////////
00467 // CXlistCtrl::AboutBox - Display an "About" box to the user
00468
00469 void CXlistCtrl::AboutBox()
00470 {
00471   CDialog dlgAbout(IDD_ABOUTBOX_XLIST);
00472   dlgAbout.DoModal();
00473 }
00474
00475
00476 /////////////////////////////////////////////////////////////////////////////
00477 // CXlistCtrl::PreCreateWindow - Modify parameters for CreateWindowEx
00478
00479 BOOL CXlistCtrl::PreCreateWindow(CREATESTRUCT& cs)
00480 {
00481   cs.lpszClass = _T("LISTBOX");
00482   cs.style |= LBS_STANDARD | LBS_OWNERDRAWVARIABLE;
00483   return COleControl::PreCreateWindow(cs);
00484 }
00485
00486
00487 /////////////////////////////////////////////////////////////////////////////
00488 // CXlistCtrl::IsSubclassedControl - This is a subclassed control
00489
00490 BOOL CXlistCtrl::IsSubclassedControl()
00491 {
00492   return TRUE;
00493 }
00494
00495
00496 /////////////////////////////////////////////////////////////////////////////
00497 // CXlistCtrl::OnOcmCommand - Handle command messages
00498
00499 LRESULT CXlistCtrl::OnOcmCommand(WPARAM wParam, LPARAM lParam)
00500 {
00501 #ifdef _WIN32
00502   WORD wNotifyCode = HIWORD(wParam);
00503   lParam;
00504 #else
00505   WORD wNotifyCode = HIWORD(lParam);
00506   wParam;
00507 #endif
00508   wNotifyCode;
00509   return 0;
00510 }
00511
00512
00513 /////////////////////////////////////////////////////////////////////////////
00514 // CXlistCtrl::OnInvertFlagChanged - Respond when the invert flag is changed.
00515
00516 void CXlistCtrl::OnInvertFlagChanged()
00517 {
00518   SetModifiedFlag(TRUE);
00519   InvalidateControl();
00520 }
00521
00522
00523 /////////////////////////////////////////////////////////////////////////////
00524 // CXlistCtrl::GetItemBackColor - Return an item's background color.
00525
00526 OLE_COLOR CXlistCtrl::GetItemBackColor(short nIndex)
00527 {
00528   OLE_COLOR *pColor;
00529   if ((int)nIndex <= m_itemData.GetSize() - 1)
00530   {
00531     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00532     pColor = pItemData->GetBackColor();
00533     if (pColor)
00534       return *pColor;
00535   }
00536   return (OLE_COLOR)-1;
00537 }
00538
00539
00540 /////////////////////////////////////////////////////////////////////////////
00541 // CXlistCtrl::SetItemBackColor - Set an item's background color.
00542
00543 void CXlistCtrl::SetItemBackColor(short nIndex, OLE_COLOR newValue)
00544 {
00545   OLE_COLOR *pColor;
00546   if ((int)nIndex <= m_itemData.GetSize() - 1)
00547   {
00548     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00549     newValue == -1 ? pColor = NULL : pColor = &newValue;
00550
00551     TRY
00552     {
00553       pItemData->SetBackColor(pColor);
00554     }
00555     CATCH(CMemoryException, e)
00556     {
00557       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00558     }
00559     END_CATCH
00560
00561     SetModifiedFlag(TRUE);
00562     InvalidateControl();
00563   }
00564 }
00565
00566
00567 /////////////////////////////////////////////////////////////////////////////
00568 // CXlistCtrl::GetItemForeColor - Return an item's foreground color.
00569
00570 OLE_COLOR CXlistCtrl::GetItemForeColor(short nIndex)
00571 {
00572   OLE_COLOR *pColor;
00573   if ((int)nIndex <= m_itemData.GetSize() - 1)
00574   {
00575     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00576     pColor = pItemData->GetForeColor();
00577     if (pColor)
00578       return *pColor;
00579   }
00580   return (OLE_COLOR)-1;
00581 }
00582
00583
00584 /////////////////////////////////////////////////////////////////////////////
00585 // CXlistCtrl::SetItemForeColor - Set an item's foreground color.
00586
00587 void CXlistCtrl::SetItemForeColor(short nIndex, OLE_COLOR newValue)
00588 {
00589   OLE_COLOR *pColor;
00590   if ((int)nIndex <= m_itemData.GetSize() - 1)
00591   {
00592     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00593     newValue == -1 ? pColor = NULL : pColor = &newValue;
00594     TRY
00595     {
00596       pItemData->SetForeColor(pColor);
00597     }
00598     CATCH (CMemoryException, e)
00599     {
00600       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00601     }
00602     END_CATCH
00603
00604     SetModifiedFlag(TRUE);
00605     InvalidateControl();
00606   }
00607 }
00608
00609
00610 /////////////////////////////////////////////////////////////////////////////
00611 // CXlistCtrl::GetItemText - Get an item's text.
00612
00613 BSTR CXlistCtrl::GetItemText(short nIndex)
00614 {
00615   TCHAR textBuffer[MAXTEXTLEN];
00616   LPTSTR lpTextBuffer = (LPTSTR)textBuffer;
00617
00618   if ((int)nIndex <= m_itemData.GetSize() - 1)
00619   {
00620     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00621     pItemData->GetText(lpTextBuffer, sizeof(textBuffer)/sizeof(*textBuffer));
00622
00623     CString s = lpTextBuffer;
00624     return s.AllocSysString();
00625   }
00626   return NULL;
00627 }
00628
00629
00630 /////////////////////////////////////////////////////////////////////////////
00631 // CXlistCtrl::SetItemText - Set an item's text.
00632
00633 void CXlistCtrl::SetItemText(short nIndex, LPCTSTR lpszNewValue)
00634 {
00635   if ((int)nIndex <= m_itemData.GetSize() - 1)
00636   {
00637     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00638     TRY
00639     {
00640       pItemData->SetText(lpszNewValue);
00641     }
00642     CATCH (CMemoryException, e)
00643     {
00644       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00645     }
00646     END_CATCH
00647
00648     SetModifiedFlag(TRUE);
00649     InvalidateControl();
00650   }
00651 }
00652
00653
00654 /////////////////////////////////////////////////////////////////////////////
00655 // CXlistCtrl::GetItemFont - Return an item's font.
00656
00657 LPFONTDISP CXlistCtrl::GetItemFont(short nIndex)
00658 {
00659   if ((int)nIndex <= m_itemData.GetSize() - 1)
00660   {
00661     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00662     CFontHolder *pFontHolder = pItemData->GetFont();
00663     if (pFontHolder)
00664       return pFontHolder->GetFontDispatch();
00665   }
00666   return NULL;
00667 }
00668
00669
00670 /////////////////////////////////////////////////////////////////////////////
00671 // CXlistCtrl::SetItemFont - Set an item's font.
00672
00673 void CXlistCtrl::SetItemFont(short nIndex, LPFONTDISP newValue)
00674 {
00675   if ((int)nIndex <= m_itemData.GetSize() - 1)
00676   {
00677     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00678     TRY
00679     {
00680       pItemData->SetFont(newValue);
00681     }
00682     CATCH (CMemoryException, e)
00683     {
00684       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00685     }
00686     END_CATCH
00687
00688     // Update item positions because font size may have changed
00689     UpdateItems();
00690
00691     SetModifiedFlag(TRUE);
00692     InvalidateControl();
00693   }
00694 }
00695
00696
00697 /////////////////////////////////////////////////////////////////////////////
00698 // CXlistCtrl:GetItemPicture - Get an item's picture.
00699
00700 LPPICTUREDISP CXlistCtrl::GetItemPicture(short nIndex)
00701 {
00702   if ((int)nIndex <= m_itemData.GetSize() - 1)
00703   {
00704     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00705     CPictureHolder *pPictureHolder = pItemData->GetPicture();
00706     if (pPictureHolder)
00707       return pPictureHolder->GetPictureDispatch();
00708   }
00709   return NULL;
00710 }
00711
00712
00713 /////////////////////////////////////////////////////////////////////////////
00714 // CXlistCtrl::SetItemPicture - Set an item's picture.
00715
00716 void CXlistCtrl::SetItemPicture(short nIndex, LPPICTUREDISP newValue)
00717 {
00718   if ((int)nIndex <= m_itemData.GetSize() - 1)
00719   {
00720     CItemData *pItemData = (CItemData *)m_itemData.GetAt(nIndex);
00721     TRY
00722     {
00723       pItemData->SetPicture(newValue);
00724     }
00725     CATCH (CMemoryException, e)
00726     {
00727       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00728     }
00729     END_CATCH
00730
00731     // Update item positions because picture size may have changed
00732     UpdateItems();
00733
00734     SetModifiedFlag(TRUE);
00735     InvalidateControl();
00736   }
00737 }
00738
00739
00740 /////////////////////////////////////////////////////////////////////////////
00741 // CXlistCtrl::AddTextItem - Add a text item.
00742
00743 void CXlistCtrl::AddTextItem(short nIndex, LPCTSTR lpstrText)
00744 {
00745   AddItem(nIndex, lpstrText, NULL, NULL);
00746 }
00747
00748
00749 /////////////////////////////////////////////////////////////////////////////
00750 // CXlistCtrl::AddTextFontItem - Add a text item which has its own font.
00751
00752 void CXlistCtrl::AddTextFontItem(short nIndex, LPCTSTR lpstrText, LPFONTDISP font)
00753 {
00754   AddItem(nIndex, lpstrText, font, NULL);
00755 }
00756
00757
00758 /////////////////////////////////////////////////////////////////////////////
00759 // CXlistCtrl::AddPicItem - Add a picture item.
00760
00761 void CXlistCtrl::AddPicItem(short nIndex, LPPICTUREDISP pic)
00762 {
00763   AddItem(nIndex, NULL, NULL, pic);
00764 }
00765
00766
00767 /////////////////////////////////////////////////////////////////////////////
00768 // CXlistCtrl::AddItem - Add an item.
00769
00770 void CXlistCtrl::AddItem(short nIndex, LPCTSTR lpstrText, LPFONTDISP lpFontDisp, LPPICTUREDISP lpPicDisp)
00771 {
00772   if ((int)nIndex <= m_itemData.GetSize())
00773   {
00774     // Init item data
00775     CItemData* pItemData = NULL;
00776
00777     TRY
00778     {
00779       pItemData = new CItemData(lpstrText, lpFontDisp, lpPicDisp);
00780     }
00781     CATCH (CMemoryException, e)
00782     {
00783       ThrowError(CTL_E_OUTOFMEMORY, AFX_IDP_E_OUTOFMEMORY);
00784     }
00785     END_CATCH
00786
00787     // Add item data to collection
00788     m_itemData.InsertAt(nIndex, pItemData);
00789
00790     // Add item text to listbox
00791     SendMessage(LB_INSERTSTRING, nIndex, (LONG_PTR)lpstrText);
00792
00793     SetModifiedFlag(TRUE);
00794     InvalidateControl();
00795   }
00796 }
00797
00798
00799 /////////////////////////////////////////////////////////////////////////////
00800 // CXlistCtrl::RemoveItem - Remove an item.
00801
00802 void CXlistCtrl::RemoveItem(short nIndex)
00803 {
00804   if ((int)nIndex <= m_itemData.GetSize() - 1)
00805   {
00806     // Free item data
00807     delete m_itemData.GetAt(nIndex);
00808
00809     // Remove item from item array
00810     m_itemData.RemoveAt(nIndex);
00811
00812     // Remove item text from listbox
00813     SendMessage(LB_DELETESTRING, nIndex, 0L);
00814
00815     SetModifiedFlag(TRUE);
00816     InvalidateControl();
00817   }
00818 }
00819
00820
00821 /////////////////////////////////////////////////////////////////////////////
00822 // CXlistCtrl::Clear - Clear all items in the list.
00823
00824 void CXlistCtrl::Clear()
00825 {
00826   if (m_itemData.GetSize() > 0)
00827   {
00828     // For each item
00829     for (int i = 0; i < m_itemData.GetSize(); i++)
00830     {
00831       // Free item data
00832       delete m_itemData.GetAt( i );
00833     }
00834
00835     // Remove all items from item array
00836     m_itemData.RemoveAll();
00837
00838     // Remove all text from listbox
00839     SendMessage(LB_RESETCONTENT, 0, 0L);
00840
00841     SetModifiedFlag(TRUE);
00842     InvalidateControl();
00843   }
00844 }
00845
00846
00847 /////////////////////////////////////////////////////////////////////////////
00848 // CXlistCtrl::OnAmbientPropertyChange - If the ambient font has changed,
00849 // update default item height and item positions.
00850
00851 void CXlistCtrl::OnAmbientPropertyChange(DISPID dispid)
00852 {
00853   if (dispid == DISPID_AMBIENT_FONT)
00854   {
00855     // Update item default height
00856     UpdateDefHeight();
00857
00858     // Update item positions
00859     UpdateItems();
00860   }
00861 }
00862
00863
00864 /////////////////////////////////////////////////////////////////////////////
00865 // CXlistCtrl::OnEraseBkgnd
00866
00867 BOOL CXlistCtrl::OnEraseBkgnd(CDC* pDC)
00868 {
00869   return COleControl::OnEraseBkgnd(pDC);
00870 }
00871
00872
00873 /////////////////////////////////////////////////////////////////////////////
00874 // CXlistCtrl::OnSetClientSite - Set the default item height.
00875
00876 void CXlistCtrl::OnSetClientSite()
00877 {
00878   COleControl::OnSetClientSite();
00879
00880   UpdateDefHeight();
00881 }
00882
00883
00884 /////////////////////////////////////////////////////////////////////////////
00885 // CXlistCtrl::OnOcmDrawItem - Draw an item.
00886
00887 LRESULT CXlistCtrl::OnOcmDrawItem(WPARAM, LPARAM lParam)
00888 {
00889   DrawItem((LPDRAWITEMSTRUCT)lParam);
00890
00891   return 1;
00892 }
00893
00894
00895 /////////////////////////////////////////////////////////////////////////////
00896 // CXlistCtrl::DrawItem - Draw an item.
00897
00898 void CXlistCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00899 {
00900   CItemData *pItemData;
00901   CDC *pdc;
00902   CPen* pOldPen;
00903
00904   // Return if id is invalid
00905   if ( (lpDrawItemStruct->itemID == (UINT)-1) ||
00906      ((int)lpDrawItemStruct->itemID >= m_itemData.GetSize()))
00907     return;
00908
00909   // Get item data
00910   pItemData = (CItemData *)m_itemData.GetAt(lpDrawItemStruct->itemID);
00911
00912   // Construct CDC object for drawing
00913   pdc = CDC::FromHandle(lpDrawItemStruct->hDC);
00914
00915   switch (lpDrawItemStruct->itemAction)
00916   {
00917     case ODA_DRAWENTIRE:
00918
00919        // Brush item background and set background color
00920       SelectItemBackColor(pItemData, &lpDrawItemStruct->rcItem, pdc);
00921
00922       // Draw item's picture
00923       DrawItemPicture(pItemData, &lpDrawItemStruct->rcItem, pdc);
00924
00925       // Draw item's text
00926       DrawItemText(pItemData, &lpDrawItemStruct->rcItem, pdc);
00927
00928       // Break if item is not selected
00929       if (lpDrawItemStruct->itemState != ODS_SELECTED)
00930         break;
00931
00932     case ODA_SELECT:
00933
00934       // If invert flag is set, invert item when selected
00935       if (m_invertFlag)
00936         pdc->InvertRect(&lpDrawItemStruct->rcItem);
00937       break;
00938
00939     case ODA_FOCUS:
00940
00941       // Draw focus rect when item gets the focus
00942       pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
00943       pdc->DrawFocusRect(&lpDrawItemStruct->rcItem);
00944       pdc->SelectObject(pOldPen);
00945       break;
00946   }
00947 }
00948
00949
00950 /////////////////////////////////////////////////////////////////////////////
00951 // CXlistCtrl::SelectItemBackColor - Brushes an item's background and
00952 // selects the background color
00953
00954 void CXlistCtrl::SelectItemBackColor(CItemData *pItemData, LPRECT lpRect, CDC *pdc)
00955 {
00956   OLE_COLOR color;
00957   OLE_COLOR *pColor;
00958
00959   // Get item background color
00960   pColor = pItemData->GetBackColor();
00961
00962   // If background color is not specified, use ambient background color
00963   if (!pColor)
00964   {
00965     color = AmbientBackColor();
00966     pColor = (OLE_COLOR *)&color;
00967   }
00968
00969   // Brush background
00970   CBrush brush;
00971   brush.CreateSolidBrush(TranslateColor(*pColor));
00972   pdc->FillRect(lpRect, &brush);
00973
00974   // Set background color
00975   pdc->SetBkMode(TRANSPARENT);
00976 }
00977
00978
00979 /////////////////////////////////////////////////////////////////////////////
00980 // CXlistCtrl::DrawItemPicture - Draws an item's picture.  Draws nothing if
00981 // the item has no picture.
00982
00983 void CXlistCtrl::DrawItemPicture(CItemData *pItemData, LPRECT lpRect, CDC *pdc)
00984 {
00985   CPictureHolder *pPicHolder;
00986   LPPICTUREDISP pPicDisp;
00987
00988   int picHeight;
00989   int picWidth;
00990   long tempPicHeight;
00991   long tempPicWidth;
00992
00993   // Get item picture
00994   pPicHolder = pItemData->GetPicture();
00995
00996   // Draw item picture
00997   if (pPicHolder)
00998   {
00999     // Get height and width of picture
01000     pPicDisp = pPicHolder->GetPictureDispatch();
01001     tempPicHeight = GetPictureHeight(pPicDisp);
01002     tempPicWidth = GetPictureWidth(pPicDisp);
01003     pPicDisp->Release();
01004
01005     // Convert height and width to pixels
01006     picHeight = XformHeightInHimetricToPixels(pdc->m_hDC, (int)LOWORD(tempPicHeight));
01007     picWidth = XformWidthInHimetricToPixels(pdc->m_hDC, (int)LOWORD(tempPicWidth));
01008
01009     // Set up draw rect
01010     lpRect->right = lpRect->left + picWidth;
01011     lpRect->bottom = lpRect->top + picHeight;
01012
01013     // Center rect
01014     lpRect->top += LSTITEMSPACING/2;
01015     lpRect->bottom += LSTITEMSPACING/2;
01016
01017     // Draw picture
01018     pPicHolder->Render(pdc, *lpRect, *lpRect);
01019   }
01020 }
01021
01022
01023 /////////////////////////////////////////////////////////////////////////////
01024 // CXlistCtrl::DrawItemText - Draws an item's text.  Draws nothing if the
01025 // item has no text.
01026
01027 void CXlistCtrl::DrawItemText(CItemData *pItemData, LPRECT lpRect, CDC *pdc)
01028 {
01029   TCHAR textBuffer[MAXTEXTLEN];
01030   LPTSTR lpTextBuffer = (LPTSTR)textBuffer;
01031   USHORT usLen;
01032   CFont* pOldFont;
01033
01034   // Get item text
01035   pItemData->GetText(lpTextBuffer,
01036     sizeof(textBuffer)/sizeof(*textBuffer));
01037
01038   // If item has text
01039   usLen = (USHORT)_tcslen(lpTextBuffer);
01040   if (usLen)
01041   {
01042     // Set item foreground color
01043     SelectItemForeColor(pItemData, pdc);
01044
01045     // Select item font
01046     CFontHolder fontHolder(NULL);
01047     pOldFont = SelectItemFont(pItemData, pdc, fontHolder);
01048
01049     // Draw text
01050     pdc->ExtTextOut(lpRect->left, lpRect->top, ETO_CLIPPED, lpRect, lpTextBuffer, usLen, NULL);
01051
01052     // Reselect old font
01053     pdc->SelectObject(pOldFont);
01054   }
01055 }
01056
01057
01058 /////////////////////////////////////////////////////////////////////////////
01059 // CXlistCtrl::SelectItemForeColor - Selects item's foreground color
01060
01061 void CXlistCtrl::SelectItemForeColor(CItemData *pItemData, CDC *pdc)
01062 {
01063   OLE_COLOR color;
01064   OLE_COLOR *pColor;
01065
01066   // Get item foreground color
01067   pColor = pItemData->GetForeColor();
01068   if (!pColor)
01069   {
01070     // If foreground color is not specified, use ambient foreground color
01071     color = AmbientForeColor();
01072     pColor = (OLE_COLOR *)&color;
01073   }
01074   pdc->SetTextColor(TranslateColor(*pColor));
01075 }
01076
01077
01078 /////////////////////////////////////////////////////////////////////////////
01079 // CXlistCtrl::SelectItemFont - Selects item's font
01080
01081 CFont* CXlistCtrl::SelectItemFont(CItemData *pItemData, CDC *pdc,
01082   CFontHolder& fontHolder)
01083 {
01084   CFontHolder *pFontHolder;
01085   CFont* pOldFont;
01086   LPFONTDISP pFontDisp;
01087
01088   // Get item font
01089   pFontHolder = pItemData->GetFont();
01090
01091   // If font is not specified, use ambient font
01092   if (!pFontHolder)
01093   {
01094     pFontHolder = &fontHolder;
01095     pFontDisp = AmbientFont();
01096     pFontHolder->InitializeFont(NULL, pFontDisp);
01097     if (pFontDisp != NULL)
01098       pFontDisp->Release();
01099   }
01100
01101   pOldFont = SelectFontObject(pdc, *pFontHolder);
01102   return pOldFont;
01103 }
01104
01105
01106 /////////////////////////////////////////////////////////////////////////////
01107 // CXlistCtrl::OnOcmMeasureItem - Return the height of an item.
01108
01109 LRESULT CXlistCtrl::OnOcmMeasureItem(WPARAM, LPARAM lParam)
01110 {
01111   MeasureItem((LPMEASUREITEMSTRUCT)lParam);
01112
01113   return 1;
01114 }
01115
01116
01117 /////////////////////////////////////////////////////////////////////////////
01118 // CXlistCtrl::MeasureItem - Return the height of an item.
01119
01120 void CXlistCtrl::MeasureItem
01121 (
01122   LPMEASUREITEMSTRUCT lpMI
01123 )
01124 {
01125   CItemData *pItemData;
01126   int textHeight;
01127   int picHeight;
01128   int tempHeight;
01129
01130   // Return if id is invalid
01131   if ((lpMI->itemID == 0xffff) || ((int)lpMI->itemID >= m_itemData.GetSize()))
01132     return;
01133
01134   pItemData = (CItemData *)m_itemData.GetAt(lpMI->itemID);
01135
01136   // Get item's text height - zero if item has no text
01137   textHeight = GetItemTextHeight(pItemData);
01138
01139   // Get item's picture height - zero if item has no picture
01140   picHeight = GetItemPictureHeight(pItemData);
01141
01142   // Calculate item height using font height, picture height and spacing
01143
01144   // tempHeight = max of textHeight and picHeight
01145   tempHeight = (textHeight > picHeight)  ? textHeight : picHeight;
01146
01147   // if zero, set to default item height, else add item spacing
01148   tempHeight = (tempHeight == 0) ? m_itemDefHeight : tempHeight + LSTITEMSPACING;
01149
01150   lpMI->itemHeight = tempHeight;
01151 }
01152
01153
01154 /////////////////////////////////////////////////////////////////////////////
01155 // CXlistCtrl::GetItemTextHeight - Return an item's text height.  Returns
01156 // zero if the item has no text.
01157
01158 int CXlistCtrl::GetItemTextHeight(CItemData *pItemData)
01159 {
01160   TCHAR textBuffer[MAXTEXTLEN];
01161   LPTSTR lpTextBuffer = (LPTSTR)textBuffer;
01162
01163   CFontHolder *pFontHolder;
01164   LPFONTDISP pFontDisp;
01165   int textHeight;
01166
01167   // Get item text
01168   pItemData->GetText(lpTextBuffer,
01169     sizeof(textBuffer)/sizeof(*textBuffer));
01170
01171   // If item has text
01172   if (_tcslen(lpTextBuffer) > 0)
01173   {
01174     // Get item font
01175     pFontHolder = pItemData->GetFont();
01176
01177     if (pFontHolder)
01178     {
01179       // Get font dispatch ID
01180       pFontDisp = pFontHolder->GetFontDispatch();
01181
01182       // Get font height using dispatch ID
01183       textHeight = GetFontHeight(pFontDisp);
01184       if (pFontDisp != NULL)
01185         pFontDisp->Release();
01186
01187       textHeight += LSTITEMSPACING;
01188     }
01189     else
01190       //If item font is not specified, use default item height
01191       textHeight = m_itemDefHeight;
01192   }
01193   else
01194     textHeight = 0;
01195
01196   return textHeight;
01197 }
01198
01199
01200 /////////////////////////////////////////////////////////////////////////////
01201 // CXlistCtrl::GetItemPictureHeight - Return an item's picture height.
01202 // Returns zero if the item has no picture.
01203
01204 int CXlistCtrl::GetItemPictureHeight(CItemData *pItemData)
01205 {
01206   CPictureHolder *pPicHolder;
01207   LPPICTUREDISP pPicDisp;
01208   long tempPicHeight;
01209   HDC dc;
01210   int picHeight;
01211
01212   // Get item picture
01213   pPicHolder = pItemData->GetPicture();
01214
01215   // If item has picture
01216   if (pPicHolder)
01217   {
01218     // Get picture height
01219     pPicDisp = pPicHolder->GetPictureDispatch();
01220     tempPicHeight = GetPictureHeight(pPicDisp);
01221     pPicDisp->Release();
01222
01223     // Convert height to pixels
01224     dc = ::GetDC(m_hWnd);
01225     picHeight = XformHeightInHimetricToPixels(dc, (int)LOWORD(tempPicHeight));
01226     ::ReleaseDC(m_hWnd, dc);
01227   }
01228   else
01229     picHeight = 0;
01230
01231   return picHeight;
01232 }
01233
01234
01235 /////////////////////////////////////////////////////////////////////////////
01236 // CXlistCtrl::UpdateItems - Readds all items to reflect changes in size
01237
01238 void CXlistCtrl::UpdateItems()
01239 {
01240   CItemData *pItemData;
01241   TCHAR textBuffer[MAXTEXTLEN];
01242   LPTSTR lpTextBuffer = (LPTSTR)textBuffer;
01243
01244   if (m_itemData.GetSize() > 0)
01245   {
01246     // Delete items
01247     SendMessage(LB_RESETCONTENT, 0, 0L);
01248
01249     // Readd items
01250     for (int i = 0; i < m_itemData.GetSize(); i++)
01251     {
01252       pItemData = (CItemData *)m_itemData.GetAt(i);
01253       pItemData->GetText(lpTextBuffer, sizeof(textBuffer)/sizeof(*textBuffer));
01254
01255       // Add item text to listbox
01256       SendMessage(LB_INSERTSTRING, i, (LONG_PTR)lpTextBuffer);
01257     }
01258   }
01259 }
01260
01261
01262 /////////////////////////////////////////////////////////////////////////////
01263 // CXlistCtrl::UpdateDefHeight - Update the default item height
01264
01265 void CXlistCtrl::UpdateDefHeight()
01266 {
01267   CFontHolder fontHolder(NULL);
01268   LPFONTDISP pFontDisp;
01269
01270   // Get height of ambient font
01271   pFontDisp = AmbientFont();
01272
01273   if (pFontDisp != NULL)
01274   {
01275     m_itemDefHeight = GetFontHeight(pFontDisp);
01276     pFontDisp->Release();
01277   }
01278   if (m_itemDefHeight == 0)
01279   {
01280     // Initialize with default font
01281     fontHolder.InitializeFont(NULL, NULL);
01282     pFontDisp = fontHolder.GetFontDispatch();
01283     m_itemDefHeight = GetFontHeight(pFontDisp);
01284     pFontDisp->Release();
01285   }
01286
01287   m_itemDefHeight += LSTITEMSPACING;
01288 }
01289
01290
01291 /////////////////////////////////////////////////////////////////////////////
01292 // GetFontHeight - Return the height of the font with the specified
01293 // dispatch id.
01294
01295 short GetFontHeight(LPFONTDISP lpfd)
01296 {
01297   short fontHeight = 0;
01298   GetProperty(lpfd, DISPID_FONT_SIZE, VT_I2, (void*)&fontHeight);
01299   return fontHeight;
01300 }
01301
01302
01303 /////////////////////////////////////////////////////////////////////////////
01304 // GetPictureHeight - Return the height of the picture with the specified
01305 // dispatch id.
01306
01307 long GetPictureHeight(LPPICTUREDISP lppd)
01308 {
01309   long picHeight = 0;
01310   GetProperty(lppd, DISPID_PICT_HEIGHT, VT_I4, (void*)&picHeight);
01311   return picHeight;
01312 }
01313
01314
01315 /////////////////////////////////////////////////////////////////////////////
01316 // GetPictureWidth - Return the width of the picture with the specified
01317 // dispatch id.
01318
01319 long GetPictureWidth(LPPICTUREDISP lppd)
01320 {
01321   long picWidth = 0;
01322   GetProperty(lppd, DISPID_PICT_WIDTH, VT_I4, (void*)&picWidth);
01323   return picWidth;
01324 }
01325
01326
01327 /////////////////////////////////////////////////////////////////////////////
01328 // GetProperty - Return the property with the specified dispatch id.
01329
01330 void GetProperty(LPDISPATCH lpd, short dispId, short propType, void *value)
01331 {
01332   COleDispatchDriver driver;
01333
01334   if (lpd)
01335   {
01336     driver.AttachDispatch(lpd, TRUE);
01337     if (driver.m_lpDispatch != NULL)
01338     {
01339       TRY
01340       {
01341         driver.GetProperty(dispId, propType, value);
01342       }
01343       END_TRY
01344       driver.DetachDispatch();
01345     }
01346   }
01347 }
01348
01349
01350 /////////////////////////////////////////////////////////////////////////////
01351 // XformWidthInHimetricToPixels - Transform the specified himetric width
01352 // to pixels.
01353
01354 STDAPI_(int) XformWidthInHimetricToPixels(HDC hDC, int iWidthInHiMetric)
01355 {
01356   int     iXppli;     // Pixels per logical inch along width
01357   int     iWidthInPix;
01358   BOOL    fSystemDC=FALSE;
01359
01360   if (NULL==hDC)
01361   {
01362     hDC=GetDC(NULL);
01363     fSystemDC=TRUE;
01364   }
01365
01366   iXppli = GetDeviceCaps (hDC, LOGPIXELSX);
01367
01368   // We've got logical HIMETRIC along the display, convert to pixel units
01369   iWidthInPix = MAP_LOGHIM_TO_PIX(iWidthInHiMetric, iXppli);
01370
01371   if (fSystemDC)
01372     ReleaseDC(NULL, hDC);
01373
01374   return iWidthInPix;
01375 }
01376
01377
01378 /////////////////////////////////////////////////////////////////////////////
01379 // XformHeightInHimetricToPixels - Transform the specified himetric height
01380 // to pixels.
01381
01382 STDAPI_(int) XformHeightInHimetricToPixels(HDC hDC, int iHeightInHiMetric)
01383 {
01384   int     iYppli;     // Pixels per logical inch along height
01385   int     iHeightInPix;
01386   BOOL    fSystemDC=FALSE;
01387
01388   if (NULL==hDC)
01389   {
01390     hDC=GetDC(NULL);
01391     fSystemDC=TRUE;
01392   }
01393
01394   iYppli = GetDeviceCaps (hDC, LOGPIXELSY);
01395
01396   // We've got logical HIMETRIC along the display, convert to pixel units
01397   iHeightInPix = MAP_LOGHIM_TO_PIX(iHeightInHiMetric, iYppli);
01398
01399   if (fSystemDC)
01400     ReleaseDC(NULL, hDC);
01401
01402   return iHeightInPix;
01403 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/childfrm.h Source File

  • general
  • Scribble

childfrm.h

Go to the documentation of this file.
00001 // ChildFrm.h : interface of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CChildFrame : public CMDIChildWnd
00014 {
00015   DECLARE_DYNCREATE(CChildFrame)
00016 public:
00017   CChildFrame();
00018
00019 // Attributes
00020 protected:
00021   CSplitterWnd    m_wndSplitter;
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CChildFrame)
00030   public:
00031   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00032   protected:
00033   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 public:
00038   virtual ~CChildFrame();
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043
00044 // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CChildFrame)
00047     // NOTE - the ClassWizard will add and remove member functions here.
00048     //    DO NOT EDIT what you see in these blocks of generated code!
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mainfrm.cpp Source File

  • general
  • dynamenu

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: implementation of the CMainFrame class
00013 //
00014 // Functions:
00015 //      Most of this file was generated by AppWizard.  The functions
00016 //      which contain code specific to this sample are:
00017 //
00018 //      CMainFrame::GetMessageString()   -- override of CFrameWnd::GetMessageString
00019 //                                          to customize message on status bar
00020
00021 #include "stdafx.h"
00022 #include "dynamenu.h"
00023
00024 #include "mainfrm.h"
00025 #include "dmdoc.h"    // for color definitions
00026
00027 #ifdef _DEBUG
00028 #undef THIS_FILE
00029 static char BASED_CODE THIS_FILE[] = __FILE__;
00030 #endif
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CMainFrame
00034
00035 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00036
00037 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00038   //{{AFX_MSG_MAP(CMainFrame)
00039   ON_WM_CREATE()
00040   //}}AFX_MSG_MAP
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // arrays of IDs used to initialize control bars
00045
00046 // toolbar buttons - IDs are command buttons
00047 static UINT BASED_CODE buttons[] =
00048 {
00049   // same order as in the bitmap 'toolbar.bmp'
00050   ID_FILE_NEW,
00051   ID_FILE_OPEN,
00052   ID_FILE_SAVE,
00053     ID_SEPARATOR,
00054   ID_EDIT_CUT,
00055   ID_EDIT_COPY,
00056   ID_EDIT_PASTE,
00057     ID_SEPARATOR,
00058   ID_FILE_PRINT,
00059   ID_APP_ABOUT,
00060 };
00061
00062 static UINT BASED_CODE indicators[] =
00063 {
00064   ID_SEPARATOR,           // status line indicator
00065   ID_INDICATOR_CAPS,
00066   ID_INDICATOR_NUM,
00067   ID_INDICATOR_SCRL,
00068 };
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CMainFrame construction/destruction
00072
00073 CMainFrame::CMainFrame()
00074 {
00075   // TODO: add member initialization code here
00076 }
00077
00078 CMainFrame::~CMainFrame()
00079 {
00080 }
00081
00082 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00083 {
00084   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00085     return -1;
00086
00087   if (!m_wndToolBar.Create(this) ||
00088     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00089     !m_wndToolBar.SetButtons(buttons,
00090       sizeof(buttons)/sizeof(UINT)))
00091   {
00092     TRACE0("Failed to create toolbar\n");
00093     return -1;      // fail to create
00094   }
00095
00096   if (!m_wndStatusBar.Create(this) ||
00097     !m_wndStatusBar.SetIndicators(indicators,
00098       sizeof(indicators)/sizeof(UINT)))
00099   {
00100     TRACE0("Failed to create status bar\n");
00101     return -1;      // fail to create
00102   }
00103
00104   return 0;
00105 }
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // CMainFrame diagnostics
00109
00110 #ifdef _DEBUG
00111 void CMainFrame::AssertValid() const
00112 {
00113   CMDIFrameWnd::AssertValid();
00114 }
00115
00116 void CMainFrame::Dump(CDumpContext& dc) const
00117 {
00118   CMDIFrameWnd::Dump(dc);
00119 }
00120
00121 #endif //_DEBUG
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // CMainFrame message handlers
00125
00126 void CMainFrame::GetMessageString(UINT nID, CString& rMessage) const
00127 {
00128   CString strMessage;
00129   if (CDynaMenuDoc::GetMessageString(nID, rMessage))
00130     return; // the document has provided the message string for the dynamic command i.d.
00131
00132   CFrameWnd::GetMessageString(nID, rMessage);
00133 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawCliSearchHandler Member List

This is the complete list of members for CDrawCliSearchHandler, including all inherited members.
CDrawCliSearchHandler() | CDrawCliSearchHandler | [inline]
FinalConstruct() | CDrawCliSearchHandler | [inline]
FinalRelease() | CDrawCliSearchHandler | [inline]
GetClassID(CLSID *pClassID) | CDrawCliSearchHandler | [inline]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/mainfrm.h Source File

  • general
  • propdlg

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CMDIFrameWnd
00013 {
00014   DECLARE_DYNAMIC(CMainFrame)
00015 public:
00016   CMainFrame();
00017
00018 // Attributes
00019 protected:  // control bar embedded members
00020   CStatusBar  m_wndStatusBar;
00021   CToolBar    m_wndToolBar;
00022 public:
00023   CShapePropSheetFrame*   m_pShapePropFrame;
00024
00025 // Operations
00026 public:
00027   void HideModelessPropSheet();
00028
00029 // Overrides
00030   // ClassWizard generate virtual function overrides
00031   //{{AFX_VIRTUAL(CMainFrame)
00032   //}}AFX_VIRTUAL
00033
00034 // Implementation
00035 public:
00036   virtual ~CMainFrame();
00037 #ifdef _DEBUG
00038   virtual void AssertValid() const;
00039   virtual void Dump(CDumpContext& dc) const;
00040 #endif
00041
00042 // Generated message map functions
00043 public:
00044   //{{AFX_MSG(CMainFrame)
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   afx_msg void OnMiniFramePropertySheet();
00047   afx_msg void OnUpdateMiniFramePropertySheet(CCmdUI* pCmdUI);
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/targetver.h Source File

  • vc2008fp
  • VisualStudioDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CConfigDlg Member List

This is the complete list of members for CConfigDlg, including all inherited members.
CConfigDlg(BOOL bFullScreen, LPCTSTR szPath, CWnd *pParent=NULL) | CConfigDlg |
CConfigDlg(BOOL bIsStartup=FALSE) | CConfigDlg |
DoDataExchange(CDataExchange *pDX) | CConfigDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CConfigDlg | [protected, virtual]
IDD enum value | CConfigDlg |
m_bIsStartup | CConfigDlg | [protected]
m_btnCancel | CConfigDlg |
m_nConfig | CConfigDlg |
m_nFullScreen | CConfigDlg |
m_strPath | CConfigDlg |
OnBnClickedBrowse(void) | CConfigDlg |
OnInitDialog() | CConfigDlg | [protected, virtual]
~CConfigDlg() | CConfigDlg | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCircCtrl Member List

This is the complete list of members for CCircCtrl, including all inherited members.
AboutBox() | CCircCtrl | [protected]
CCircCtrl() | CCircCtrl |
DECLARE_OLECREATE_EX(CCircCtrl) DECLARE_OLETYPELIB(CCircCtrl) DECLARE_PROPPAGEIDS(CCircCtrl) DECLARE_OLECTLTYPE(CCircCtrl) afx_msg void OnLButtonDown(UINT nFlags | CCircCtrl | [protected]
dispidCircleOffset enum value | CCircCtrl |
dispidCircleShape enum value | CCircCtrl |
dispidFlashColor enum value | CCircCtrl |
dispidNote enum value | CCircCtrl |
DoPropExchange(CPropExchange *pPX) | CCircCtrl | [virtual]
eventidClickIn enum value | CCircCtrl |
eventidClickOut enum value | CCircCtrl |
FireClickIn(OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) | CCircCtrl | [inline, protected]
FireClickOut() | CCircCtrl | [inline, protected]
FlashColor(CDC *pdc) | CCircCtrl | [protected]
GetCircleOffset() | CCircCtrl | [protected]
GetDrawRect(CRect *rc) | CCircCtrl | [protected]
GetNote() | CCircCtrl | [protected]
InBounds(short nOffset) | CCircCtrl | [protected]
InCircle(CPoint &point) | CCircCtrl | [protected]
m_circleOffset | CCircCtrl | [protected]
m_circleShape | CCircCtrl | [protected]
m_flashColor | CCircCtrl | [protected]
m_note | CCircCtrl | [protected]
OnCircleShapeChanged() | CCircCtrl | [protected]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CCircCtrl | [virtual]
OnFlashColorChanged() | CCircCtrl | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCircCtrl | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCircCtrl | [protected]
OnMapPropertyToPage(DISPID dispid, LPCLSID lpclsid, BOOL *pbPageOptional) | CCircCtrl | [virtual]
OnResetState() | CCircCtrl | [virtual]
OnSize(UINT nType, int cx, int cy) | CCircCtrl | [protected]
point | CCircCtrl | [protected]
SetCircleOffset(short nNewValue) | CCircCtrl | [protected]
SetNote(LPCTSTR lpszNewValue) | CCircCtrl | [protected]
~CCircCtrl() | CCircCtrl | [protected]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVisualStudioDemoView Member List

This is the complete list of members for CVisualStudioDemoView, including all inherited members.
CVisualStudioDemoView() | CVisualStudioDemoView | [protected]
GetDocument() const | CVisualStudioDemoView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CVisualStudioDemoView | [protected, virtual]
OnEditTogglebreakpoint() | CVisualStudioDemoView |
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CVisualStudioDemoView | [protected, virtual]
OnFilePrintPreview() | CVisualStudioDemoView |
OnFind() | CVisualStudioDemoView |
OnPreparePrinting(CPrintInfo *pInfo) | CVisualStudioDemoView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CVisualStudioDemoView | [virtual]
VerifyFindString(CMFCToolBarComboBoxButton *pFindCombo, CString &strFindText) | CVisualStudioDemoView | [private]
~CVisualStudioDemoView() | CVisualStudioDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/resource.h Source File

  • vc2008fp
  • TrayMenu

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by TrayMenu.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDS_ABOUTBOX                    101
00007 #define IDD_TRAYMENU_DIALOG             102
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_MENU1                       129
00010 #define IDR_MENUIMAGES                  130
00011 #define ID_APP_OPEN                     32771
00012 #define ID_ITEM1                        32773
00013 #define ID_ITEM2                        32774
00014 #define ID_ITEM3                        32775
00015 #define ID_ITEM4                        32776
00016
00017 // Next default values for new objects
00018 //
00019 #ifdef APSTUDIO_INVOKED
00020 #ifndef APSTUDIO_READONLY_SYMBOLS
00021 #define _APS_NEXT_RESOURCE_VALUE        132
00022 #define _APS_NEXT_COMMAND_VALUE         32777
00023 #define _APS_NEXT_CONTROL_VALUE         1000
00024 #define _APS_NEXT_SYMED_VALUE           101
00025 #endif
00026 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/aboutbox.cpp Source File

  • ole
  • superpad

aboutbox.cpp

Go to the documentation of this file.
00001 // aboutbox.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 #include "stdafx.h"
00015 #include "resource.h"
00016 #include "aboutbox.h"
00017 #include <dos.h>
00018 #include <direct.h>
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CAboutBox dialog
00027
00028 BEGIN_MESSAGE_MAP(CAboutBox, CDialog)
00029   //{{AFX_MSG_MAP(CAboutBox)
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033 CAboutBox::CAboutBox(CWnd* pParent /*=NULL*/)
00034   : CDialog(CAboutBox::IDD, pParent)
00035 {
00036   //{{AFX_DATA_INIT(CAboutBox)
00037     // NOTE: the ClassWizard will add member initialization here
00038   //}}AFX_DATA_INIT
00039 }
00040
00041 void CAboutBox::DoDataExchange(CDataExchange* pDX)
00042 {
00043   CDialog::DoDataExchange(pDX);
00044   //{{AFX_DATA_MAP(CAboutBox)
00045     // NOTE: the ClassWizard will add DDX and DDV calls here
00046   //}}AFX_DATA_MAP
00047 }
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CAboutBox message handlers
00051
00052 BOOL CAboutBox::OnInitDialog()
00053 {
00054   CDialog::OnInitDialog();
00055
00056   // initialize the big icon control
00057   m_icon.SubclassDlgItem(IDC_BIGICON, this);
00058   m_icon.SizeToContent();
00059
00060   // fill available memory
00061   CString str, strFmt;
00062   strFmt.LoadString(IDS_PHYSICAL_MEM);
00063
00064   MEMORYSTATUS MemStat;
00065   MemStat.dwLength = sizeof(MEMORYSTATUS);
00066   GlobalMemoryStatus(&MemStat);
00067   _stprintf_s(str.GetBuffer(80), 80, strFmt, MemStat.dwTotalPhys / 1024L);
00068   str.ReleaseBuffer();
00069   SetDlgItemText(IDC_PHYSICAL_MEM, str);
00070
00071   // fill disk free information
00072   struct _diskfree_t diskfree;
00073   if (_getdiskfree(_getdrive(), &diskfree) == 0)
00074   {
00075     strFmt.LoadString(IDS_DISK_SPACE);
00076     _stprintf_s(str.GetBuffer(80), 80, strFmt,
00077       (DWORD)diskfree.avail_clusters *
00078       (DWORD)diskfree.sectors_per_cluster *
00079       (DWORD)diskfree.bytes_per_sector / (DWORD)1024L);
00080     str.ReleaseBuffer();
00081   }
00082   else
00083     str.LoadString(IDS_DISK_SPACE_UNAVAIL);
00084   SetDlgItemText(IDC_DISK_SPACE, str);
00085
00086   return TRUE;  // return TRUE  unless you set the focus to a control
00087 }
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CSplashWnd dialog
00091
00092 BEGIN_MESSAGE_MAP(CSplashWnd, CDialog)
00093   //{{AFX_MSG_MAP(CSplashWnd)
00094   //}}AFX_MSG_MAP
00095 END_MESSAGE_MAP()
00096
00097 void CSplashWnd::DoDataExchange(CDataExchange* pDX)
00098 {
00099   CDialog::DoDataExchange(pDX);
00100   //{{AFX_DATA_MAP(CSplashWnd)
00101     // NOTE: the ClassWizard will add DDX and DDV calls here
00102   //}}AFX_DATA_MAP
00103 }
00104
00105 BOOL CSplashWnd::Create(CWnd* pParent)
00106 {
00107   //{{AFX_DATA_INIT(CSplashWnd)
00108     // NOTE: the ClassWizard will add member initialization here
00109   //}}AFX_DATA_INIT
00110
00111   if (!CDialog::Create(CSplashWnd::IDD, pParent))
00112   {
00113     TRACE0("Warning: creation of CSplashWnd dialog failed\n");
00114     return FALSE;
00115   }
00116
00117   return TRUE;
00118 }
00119
00120 BOOL CSplashWnd::OnInitDialog()
00121 {
00122   CDialog::OnInitDialog();
00123   CenterWindow();
00124
00125   // initialize the big icon control
00126   m_icon.SubclassDlgItem(IDC_BIGICON, this);
00127   m_icon.SizeToContent();
00128
00129   return TRUE;  // return TRUE  unless you set the focus to a control
00130 }
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CSplashWnd message handlers
00134
00135 /////////////////////////////////////////////////////////////////////////////
00136 // CBigIcon
00137
00138 BEGIN_MESSAGE_MAP(CBigIcon, CButton)
00139   //{{AFX_MSG_MAP(CBigIcon)
00140   ON_WM_DRAWITEM()
00141   ON_WM_ERASEBKGND()
00142   //}}AFX_MSG_MAP
00143 END_MESSAGE_MAP()
00144
00145 /////////////////////////////////////////////////////////////////////////////
00146 // CBigIcon message handlers
00147
00148 #define CY_SHADOW   4
00149 #define CX_SHADOW   4
00150
00151 void CBigIcon::SizeToContent()
00152 {
00153   // get system icon size
00154   int cxIcon = ::GetSystemMetrics(SM_CXICON);
00155   int cyIcon = ::GetSystemMetrics(SM_CYICON);
00156
00157   // a big icon should be twice the size of an icon + shadows
00158   SetWindowPos(NULL, 0, 0, cxIcon*2 + CX_SHADOW + 4, cyIcon*2 + CY_SHADOW + 4,
00159     SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
00160 }
00161
00162 void CBigIcon::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00163 {
00164   CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
00165   ASSERT(pDC != NULL);
00166
00167   CRect rect;
00168   GetClientRect(rect);
00169   int cxClient = rect.Width();
00170   int cyClient = rect.Height();
00171
00172   // load icon
00173   HICON hicon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00174   if (hicon == NULL)
00175     return;
00176
00177   // draw icon into off-screen bitmap
00178   int cxIcon = ::GetSystemMetrics(SM_CXICON);
00179   int cyIcon = ::GetSystemMetrics(SM_CYICON);
00180
00181   CBitmap bitmap;
00182   if (!bitmap.CreateCompatibleBitmap(pDC, cxIcon, cyIcon))
00183     return;
00184   CDC dcMem;
00185   if (!dcMem.CreateCompatibleDC(pDC))
00186     return;
00187   CBitmap* pBitmapOld = dcMem.SelectObject(&bitmap);
00188   if (pBitmapOld == NULL)
00189     return;
00190
00191   // blt the bits already on the window onto the off-screen bitmap
00192   dcMem.StretchBlt(0, 0, cxIcon, cyIcon, pDC,
00193     2, 2, cxClient-CX_SHADOW-4, cyClient-CY_SHADOW-4, SRCCOPY);
00194
00195   // draw the icon on the background
00196   dcMem.DrawIcon(0, 0, hicon);
00197
00198   // draw border around icon
00199   CPen pen;
00200   pen.CreateStockObject(BLACK_PEN);
00201   ENSURE(pDC != NULL);
00202   CPen* pPenOld = pDC->SelectObject(&pen);
00203   pDC->Rectangle(0, 0, cxClient-CX_SHADOW, cyClient-CY_SHADOW);
00204   if (pPenOld)
00205     pDC->SelectObject(pPenOld);
00206
00207   // draw shadows around icon
00208   CBrush br;
00209   br.CreateStockObject(DKGRAY_BRUSH);
00210   rect.SetRect(cxClient-CX_SHADOW, CY_SHADOW, cxClient, cyClient);
00211   pDC->FillRect(rect, &br);
00212   rect.SetRect(CX_SHADOW, cyClient-CY_SHADOW, cxClient, cyClient);
00213   pDC->FillRect(rect, &br);
00214
00215   // draw the icon contents
00216   pDC->StretchBlt(2, 2, cxClient-CX_SHADOW-4, cyClient-CY_SHADOW-4,
00217     &dcMem, 0, 0, cxIcon, cyIcon, SRCCOPY);
00218
00219   dcMem.DeleteDC();
00220
00221 }
00222
00223 BOOL CBigIcon::OnEraseBkgnd(CDC*)
00224 {
00225   return TRUE;    // we don't do any erasing...
00226 }
00227
00228 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNDlg.cpp Source File

  • vc2008fp
  • DesktopAlertDemo

MSNDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DesktopAlertDemo.h"
00013 #include "MSNDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CMSNDlg dialog
00023
00024 IMPLEMENT_DYNCREATE(CMSNDlg, CMFCDesktopAlertDialog)
00025
00026 CMSNDlg::CMSNDlg()
00027 {
00028 }
00029
00030
00031 void CMSNDlg::DoDataExchange(CDataExchange* pDX)
00032 {
00033   CMFCDesktopAlertDialog::DoDataExchange(pDX);
00034   DDX_Control(pDX, IDC_OPTIONS, m_Options);
00035   DDX_Control(pDX, IDC_BUTTON1, m_btnRL);
00036 }
00037
00038
00039 BEGIN_MESSAGE_MAP(CMSNDlg, CMFCDesktopAlertDialog)
00040   ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
00041   ON_BN_CLICKED(IDC_OPTIONS, OnOptions)
00042 END_MESSAGE_MAP()
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMSNDlg message handlers
00046
00047 void CMSNDlg::OnDraw (CDC* pDC)
00048 {
00049   CMFCDesktopAlertDialog::OnDraw (pDC);
00050
00051   CRect rectClient;
00052   GetClientRect (rectClient);
00053
00054   CSize sizeLogo = m_imgLogo.GetImageSize ();
00055
00056   CAfxDrawState ds;
00057   m_imgLogo.PrepareDrawImage (ds);
00058
00059   m_imgLogo.Draw (pDC,
00060     rectClient.right - sizeLogo.cx - 5,
00061     rectClient.bottom - sizeLogo.cy - 5,
00062     0);
00063
00064   m_imgLogo.EndDrawImage (ds);
00065 }
00066
00067
00068 BOOL CMSNDlg::OnInitDialog()
00069 {
00070   CMFCDesktopAlertDialog::OnInitDialog();
00071
00072   m_Options.m_bAlwaysUnderlineText = FALSE;
00073   m_Options.m_bDefaultClickProcess = FALSE;
00074
00075   m_btnRL.m_bMultilineText = TRUE;
00076   m_btnRL.m_bAlwaysUnderlineText = FALSE;
00077   m_btnRL.m_bDefaultClickProcess = TRUE;
00078
00079   m_imgLogo.Load (IDB_LOGO);
00080   m_imgLogo.SetTransparentColor (RGB (236, 0, 140));
00081   m_imgLogo.SetSingleImage ();
00082
00083   return TRUE;  // return TRUE unless you set the focus to a control
00084                 // EXCEPTION: OCX Property Pages should return FALSE
00085 }
00086
00087 void CMSNDlg::OnButton1()
00088 {
00089   ::ShellExecute (NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
00090 }
00091
00092 void CMSNDlg::OnOptions()
00093 {
00094   // TODO: Add your control notification handler code here
00095
00096 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MainFrm.Cpp Source File

  • ole
  • TstCon

MainFrm.Cpp

Go to the documentation of this file.
00001 // CMainFrame.cpp : implementation of the CMainFrame class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMainFrame
00022
00023 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00024
00025 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00026    //{{AFX_MSG_MAP(CMainFrame)
00027    ON_WM_CREATE()
00028    ON_WM_DESTROY()
00029    ON_COMMAND(ID_VIEW_MACROBAR, OnViewMacroBar)
00030    ON_UPDATE_COMMAND_UI(ID_VIEW_MACROBAR, OnUpdateViewMacroBar)
00031   //}}AFX_MSG_MAP
00032    ON_COMMAND( ID_HELP_FINDER, CFrameWnd::OnHelpFinder )
00033    ON_COMMAND( ID_HELP, CFrameWnd::OnHelp )
00034    ON_COMMAND( ID_CONTEXT_HELP, CFrameWnd::OnContextHelp )
00035    ON_COMMAND( ID_DEFAULT_HELP, CFrameWnd::OnHelpFinder )
00036 END_MESSAGE_MAP()
00037
00038 static UINT indicators[] =
00039 {
00040    ID_SEPARATOR,  // Status line indicator
00041    ID_SEPARATOR,  // Activation state
00042    ID_SEPARATOR,  // Windowed/windowless state
00043    ID_INDICATOR_CAPS,
00044    ID_INDICATOR_NUM,
00045    ID_INDICATOR_SCRL,
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CMainFrame construction/destruction
00050
00051 CMainFrame::CMainFrame()
00052 {
00053 }
00054
00055 CMainFrame::~CMainFrame()
00056 {
00057 }
00058
00059 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00060 {
00061    CString strOutputWindowTitle;
00062    UINT nID;
00063    UINT nStyle;
00064    int nWidth;
00065
00066    if( CFrameWnd::OnCreate( lpCreateStruct ) == -1 )
00067    {
00068     return( -1 );
00069    }
00070
00071    if( !m_wndStatusBar.Create( this ) || !m_wndStatusBar.SetIndicators(
00072     indicators, sizeof( indicators )/sizeof( UINT ) ) )
00073    {
00074     TRACE( "Failed to create status bar\n" );
00075     return( -1 );
00076    }
00077
00078    // Shrink the windowed/windowless and activation state status bar panes to a
00079    // more reasonable size
00080    m_wndStatusBar.GetPaneInfo( 1, nID, nStyle, nWidth );
00081    m_wndStatusBar.SetPaneInfo( 1, nID, nStyle, nWidth/3 );
00082
00083    m_wndStatusBar.GetPaneInfo( 2, nID, nStyle, nWidth );
00084    m_wndStatusBar.SetPaneInfo( 2, nID, nStyle, nWidth/3 );
00085
00086    // Start out assuming that the latest comctl32.dll is installed
00087    BOOL bHaveIE40 = TRUE;
00088
00089    // Create the rebar. If the creation goes through then
00090    // add an instance of a CReToolBar to the rebar
00091    if( !m_wndReBar.Create( this ) )
00092    {
00093     TRACE( "Failed to create rebar\n" );
00094     bHaveIE40 = FALSE;
00095    }
00096
00097    // Create the toolbar
00098    if( !m_wndToolBar.CreateEx( this, TBSTYLE_FLAT, WS_CHILD|WS_VISIBLE|
00099     CBRS_ALIGN_TOP|CBRS_TOOLTIPS|CBRS_FLYBY ) || !m_wndToolBar.LoadToolBar(
00100     IDR_MAINFRAME ) )
00101    {
00102     TRACE( "Failed to create toolbar\n" );
00103     return( -1 );
00104    }
00105
00106    if( !m_wndMacroBar.Create( this, CBRS_SIZE_FIXED|CBRS_ALIGN_TOP, IDC_MACROBAR ) )
00107    {
00108     TRACE( "Failed to create macro bar\n" );
00109     return( -1 );
00110    }
00111
00112    if( bHaveIE40 ) // Do the rebar
00113    {
00114     if( !m_wndReBar.AddBar( &m_wndToolBar ) )
00115     {
00116      TRACE( "Failed to add toolbar to rebar\n" );
00117      return( -1 );
00118     }
00119     if( !m_wndReBar.AddBar( &m_wndMacroBar ) )
00120     {
00121      TRACE( "Failed to add macro bar to rebar\n" );
00122      return( -1 );
00123     }
00124
00125     EnableDocking( CBRS_ALIGN_ANY );
00126    }
00127    else  // Do a regular toolbar
00128    {
00129     m_wndToolBar.EnableDocking( CBRS_ORIENT_VERT|CBRS_ALIGN_TOP );
00130     m_wndMacroBar.EnableDocking( CBRS_ORIENT_VERT|CBRS_ALIGN_TOP );
00131
00132     EnableDocking( CBRS_ALIGN_ANY );
00133     DockControlBar( &m_wndToolBar );
00134     DockControlBar( &m_wndMacroBar );
00135    }
00136
00137    return( 0 );
00138 }
00139
00140 BOOL CMainFrame::PreCreateWindow( CREATESTRUCT& cs )
00141 {
00142   WNDCLASS wc;
00143
00144   if( !CFrameWnd::PreCreateWindow( cs ) )
00145   {
00146     return( FALSE );
00147   }
00148
00149   GetClassInfo( AfxGetInstanceHandle(), cs.lpszClass, &wc );
00150   cs.lpszClass = AfxRegisterWndClass( 0, wc.hCursor, wc.hbrBackground,
00151     wc.hIcon );
00152
00153   cs.style |= WS_CLIPCHILDREN;
00154
00155   return( TRUE );
00156 }
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CMainFrame diagnostics
00160
00161 #ifdef _DEBUG
00162 void CMainFrame::AssertValid() const
00163 {
00164    CFrameWnd::AssertValid();
00165 }
00166
00167 void CMainFrame::Dump(CDumpContext& dc) const
00168 {
00169    CFrameWnd::Dump(dc);
00170 }
00171
00172 #endif //_DEBUG
00173
00174 /////////////////////////////////////////////////////////////////////////////
00175 // CMainFrame message handlers
00176
00177 void CMainFrame::OnDestroy()
00178 {
00179    CFrameWnd::OnDestroy();
00180 }
00181
00182 void CMainFrame::OnViewMacroBar()
00183 {
00184    CControlBar* pControlBar;
00185
00186    pControlBar = GetControlBar( IDC_MACROBAR );
00187    if( pControlBar != NULL )
00188    {
00189     ShowControlBar( pControlBar, (pControlBar->GetStyle()&WS_VISIBLE) == 0,
00190      FALSE );
00191    }
00192 }
00193
00194 void CMainFrame::OnUpdateViewMacroBar( CCmdUI* pCmdUI )
00195 {
00196    CControlBar* pControlBar;
00197
00198    pControlBar = GetControlBar( IDC_MACROBAR );
00199    if( pControlBar != NULL )
00200    {
00201     pCmdUI->SetCheck( (pControlBar->GetStyle()&WS_VISIBLE) != 0 );
00202    }
00203 }
00204
00205 BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /* pcs */,
00206    CCreateContext* pContext )
00207 {
00208    CSize size;
00209    CRect rect;
00210
00211    GetClientRect( &rect );
00212    size = rect.Size();
00213
00214    // Create a static splitter with two panes.  The top pane is the actual
00215    // CTestContainer98View, and the bottom pane is the output window.
00216    m_wndSplitter.CreateStatic( this, 2, 1 );
00217    m_wndSplitter.CreateView( 0, 0, RUNTIME_CLASS( CTestContainer98View ),
00218     CSize( size.cx, 2*size.cy/3 ), pContext );
00219    m_wndSplitter.CreateView( 1, 0, RUNTIME_CLASS( COutputWindowView ), CSize(
00220     size.cx, size.cy-(2*size.cy/3) ), pContext );
00221
00222    return( TRUE );
00223 }
00224
00225 BOOL CMainFrame::OnCmdMsg( UINT nID, int nCode, void* pExtra,
00226    AFX_CMDHANDLERINFO* pHandlerInfo )
00227 {
00228    BOOL tHandled;
00229    CWnd* pView;
00230
00231    // First, try the default routing scheme.
00232    tHandled = CFrameWnd::OnCmdMsg( nID, nCode, pExtra, pHandlerInfo );
00233    if( tHandled )
00234    {
00235     return( TRUE );
00236    }
00237
00238    // If nobody handled it, and the main view isn't active, try the main view.
00239    pView = m_wndSplitter.GetPane( 0, 0 );
00240    if( pView != GetActiveView() )
00241    {
00242     tHandled = pView->OnCmdMsg( nID, nCode, pExtra, pHandlerInfo );
00243     if( tHandled )
00244     {
00245      return( TRUE );
00246     }
00247    }
00248
00249    return( FALSE );
00250 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/stdafx.h Source File

  • advanced
  • mtrecalc

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/dockdoc.h Source File

  • general
  • docktool

dockdoc.h

Go to the documentation of this file.
00001 // dockdoc.h : interface of the CDockDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CDockDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   CDockDoc();
00016   DECLARE_DYNCREATE(CDockDoc)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CDockDoc)
00027   public:
00028   virtual BOOL OnNewDocument();
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CDockDoc();
00034   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CDockDoc)
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046     //    DO NOT EDIT what you see in these blocks of generated code !
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNotepadDoc Member List

This is the complete list of members for CNotepadDoc, including all inherited members.
CNotepadDoc() | CNotepadDoc | [protected]
OnNewDocument() | CNotepadDoc | [virtual]
Serialize(CArchive &ar) | CNotepadDoc | [virtual]
~CNotepadDoc() | CNotepadDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View1.h Source File

  • vc2008fp
  • TabbedView

View1.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CView1 view
00015
00016 class CView1 : public CScrollView
00017 {
00018 protected:
00019   CView1();           // protected constructor used by dynamic creation
00020   DECLARE_DYNCREATE(CView1)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   public:
00030   virtual void OnInitialUpdate();
00031   virtual CScrollBar* GetScrollBarCtrl(int nBar) const;
00032   protected:
00033   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00034
00035 // Implementation
00036 protected:
00037   virtual ~CView1();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00045   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00046   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00047
00048   DECLARE_MESSAGE_MAP()
00049 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CShapesDoc Member List

This is the complete list of members for CShapesDoc, including all inherited members.
AddShape(CShape *pShapeNew) | CShapesDoc |
CShapesDoc() | CShapesDoc | [protected]
HitTest(CPoint pt) | CShapesDoc |
m_shapeList | CShapesDoc |
OnNewDocument() | CShapesDoc | [protected, virtual]
Serialize(CArchive &ar) | CShapesDoc | [virtual]
~CShapesDoc() | CShapesDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPENINFO Member List

This is the complete list of members for tagPENINFO, including all inherited members.
cbOemData | tagPENINFO
cPens | tagPENINFO
cxRawWidth | tagPENINFO
cyRawHeight | tagPENINFO
fuOEM | tagPENINFO
lPdc | tagPENINFO
nSamplingDist | tagPENINFO
nSamplingRate | tagPENINFO
rgoempeninfo | tagPENINFO
rgwReserved | tagPENINFO
wDistinctHeight | tagPENINFO
wDistinctWidth | tagPENINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPointArrayView Member List

This is the complete list of members for CPointArrayView, including all inherited members.
AddPointToListBox(CPoint pt, int nSel=-1) | CPointArrayView | [protected]
CPointArrayView() | CPointArrayView |
DoDataExchange(CDataExchange *pDX) | CPointArrayView | [protected, virtual]
GetDocument() | CPointArrayView | [inline]
IDD enum value | CPointArrayView |
m_ctlList | CPointArrayView |
m_x | CPointArrayView |
m_y | CPointArrayView |
OnAdd() | CPointArrayView | [protected]
OnInitialUpdate() | CPointArrayView |
OnRemove() | CPointArrayView | [protected]
OnRemoveAll() | CPointArrayView | [protected]
OnSelChangeList() | CPointArrayView | [protected]
OnUpdateButton() | CPointArrayView | [protected]
~CPointArrayView() | CPointArrayView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloFrm.h Source File

  • general
  • mdidocvw

HelloFrm.h

Go to the documentation of this file.
00001 // HelloFrm.h : interface of the CHelloFrame class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014
00015 class CHelloFrame : public CMDIChildWnd
00016 {
00017   DECLARE_DYNCREATE(CHelloFrame)
00018 public:
00019   CHelloFrame();
00020
00021 // Attributes
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CHelloFrame)
00030   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031   //}}AFX_VIRTUAL
00032
00033 // Implementation
00034 public:
00035   virtual ~CHelloFrame();
00036 #ifdef _DEBUG
00037   virtual void AssertValid() const;
00038   virtual void Dump(CDumpContext& dc) const;
00039 #endif
00040
00041 // Generated message map functions
00042 protected:
00043   //{{AFX_MSG(CHelloFrame)
00044     // NOTE - the ClassWizard will add and remove member functions here.
00045     //    DO NOT EDIT what you see in these blocks of generated code!
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLicensedPropPage Member List

This is the complete list of members for CLicensedPropPage, including all inherited members.
CLicensedPropPage() | CLicensedPropPage |
DoDataExchange(CDataExchange *pDX) | CLicensedPropPage | [protected, virtual]
IDD enum value | CLicensedPropPage |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/slidctrl.cpp Source File

  • general
  • CmnCtrl2

slidctrl.cpp

Go to the documentation of this file.
00001 // SlidCtrl.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl2.h"
00015 #include "SlidCtrl.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CSliderCtrlPage property page
00024
00025 IMPLEMENT_DYNCREATE(CSliderCtrlPage, CPropertyPage)
00026
00027 #ifdef _DEBUG
00028 #define new DEBUG_NEW
00029 #endif
00030
00031 CSliderCtrlPage::CSliderCtrlPage() : CPropertyPage(CSliderCtrlPage::IDD)
00032 {
00033   //{{AFX_DATA_INIT(CSliderCtrlPage)
00034   m_bAutoticks = TRUE;
00035   m_bEnablesel = FALSE;
00036   m_bFixed = FALSE;
00037   m_uiLine = 10;
00038   m_bNothumb = FALSE;
00039   m_bNoticks = FALSE;
00040   m_iOrientation = 0;
00041   m_uiPage = 50;
00042   m_iTickpos = 0;
00043   m_uiRangeFrom = 0;
00044   m_uiRangeTo = 100;
00045   m_uiSelRangeFrom = 20;
00046   m_uiSelRangeTo = 80;
00047   m_uiTickFreq = 20;
00048   //}}AFX_DATA_INIT
00049   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00050 }
00051
00052 CSliderCtrlPage::~CSliderCtrlPage()
00053 {
00054 }
00055
00056 void CSliderCtrlPage::DoDataExchange(CDataExchange* pDX)
00057 {
00058   CPropertyPage::DoDataExchange(pDX);
00059   //{{AFX_DATA_MAP(CSliderCtrlPage)
00060   DDX_Control(pDX, IDC_NOTIFICATIONS, m_Notifications);
00061   DDX_Check(pDX, IDC_SLIDER_AUTOTICKS, m_bAutoticks);
00062   DDX_Check(pDX, IDC_SLIDER_ENABLESEL, m_bEnablesel);
00063   DDX_Check(pDX, IDC_SLIDER_FIXED, m_bFixed);
00064   DDX_Text(pDX, IDC_SLIDER_LINE, m_uiLine);
00065   DDV_MinMaxUInt(pDX, m_uiLine, 0, 65535);
00066   DDX_Check(pDX, IDC_SLIDER_NOTHUMB, m_bNothumb);
00067   DDX_Check(pDX, IDC_SLIDER_NOTICKS, m_bNoticks);
00068   DDX_CBIndex(pDX, IDC_SLIDER_ORIENTATION, m_iOrientation);
00069   DDX_Text(pDX, IDC_SLIDER_PAGE, m_uiPage);
00070   DDV_MinMaxUInt(pDX, m_uiPage, 0, 65535);
00071   DDX_CBIndex(pDX, IDC_SLIDER_POINT, m_iTickpos);
00072   DDX_Text(pDX, IDC_SLIDER_RANGEFROM, m_uiRangeFrom);
00073   DDV_MinMaxUInt(pDX, m_uiRangeFrom, 0, 65535);
00074   DDX_Text(pDX, IDC_SLIDER_RANGETO, m_uiRangeTo);
00075   DDV_MinMaxUInt(pDX, m_uiRangeTo, 0, 65535);
00076   DDX_Text(pDX, IDC_SLIDER_SELRANGEFROM, m_uiSelRangeFrom);
00077   DDV_MinMaxUInt(pDX, m_uiSelRangeFrom, 0, 65535);
00078   DDX_Text(pDX, IDC_SLIDER_SELRANGETO, m_uiSelRangeTo);
00079   DDV_MinMaxUInt(pDX, m_uiSelRangeTo, 0, 65535);
00080   DDX_Text(pDX, IDC_SLIDER_TICKFREQ, m_uiTickFreq);
00081   DDV_MinMaxUInt(pDX, m_uiTickFreq, 0, 65535);
00082   //}}AFX_DATA_MAP
00083 }
00084
00085 BOOL CSliderCtrlPage::OnInitDialog()
00086 {
00087   CPropertyPage::OnInitDialog();
00088
00089   // Initially create slider control in horizontal position
00090   CWnd* pWnd =
00091     GetDlgItem( IDC_SLIDER_HORZPOS );
00092   CRect rect;
00093   pWnd->GetWindowRect( &rect );
00094   ScreenToClient( &rect );
00095
00096   // Initialise controls
00097   m_Slider.Create( WS_VISIBLE|WS_CHILD|TBS_HORZ|TBS_BOTH|TBS_AUTOTICKS,
00098            rect, this, IDC_SLIDER );
00099   m_Slider.SetTicFreq( m_uiTickFreq );    // Send TBM_SETTICFREQ
00100   m_Slider.SetLineSize( m_uiLine );       // Send TBM_SETLINESIZE
00101   m_Slider.SetPageSize( m_uiPage );       // Send TBM_SETPAGESIZE
00102   m_Slider.SetRange( m_uiRangeFrom, m_uiRangeTo, TRUE );
00103                       // Send TBM_SETRANGE
00104   return TRUE;
00105 }
00106
00107 void CSliderCtrlPage::ChangeCtrlStyle( long lStyle, BOOL bSetBit)
00108 {
00109   long    lStyleOld;
00110   CRect   rect;
00111
00112   lStyleOld = GetWindowLong( m_Slider.GetSafeHwnd(), GWL_STYLE );
00113   if ( bSetBit )
00114     lStyleOld |= lStyle;
00115   else
00116     lStyleOld &= ~lStyle;
00117   SetWindowLong( m_Slider.GetSafeHwnd(), GWL_STYLE, lStyleOld );
00118   m_Slider.GetWindowRect(&rect);
00119   m_Slider.InvalidateRect(&rect);
00120 }
00121
00122 BEGIN_MESSAGE_MAP(CSliderCtrlPage, CPropertyPage)
00123   //{{AFX_MSG_MAP(CSliderCtrlPage)
00124   ON_BN_CLICKED(IDC_SLIDER_AUTOTICKS, OnAutoticks)
00125   ON_EN_KILLFOCUS(IDC_SLIDER_TICKFREQ, OnTickfreq)
00126   ON_BN_CLICKED(IDC_SLIDER_NOTICKS, OnNoticks)
00127   ON_BN_CLICKED(IDC_SLIDER_NOTHUMB, OnNothumb)
00128   ON_BN_CLICKED(IDC_SLIDER_FIXED, OnFixed)
00129   ON_BN_CLICKED(IDC_SLIDER_ENABLESEL, OnEnablesel)
00130   ON_EN_KILLFOCUS(IDC_SLIDER_LINE, OnLine)
00131   ON_EN_KILLFOCUS(IDC_SLIDER_PAGE, OnPage)
00132   ON_EN_KILLFOCUS(IDC_SLIDER_RANGEFROM, OnRangefrom)
00133   ON_EN_KILLFOCUS(IDC_SLIDER_RANGETO, OnRangeto)
00134   ON_CBN_SELCHANGE(IDC_SLIDER_ORIENTATION, OnOrientation)
00135   ON_CBN_SELCHANGE(IDC_SLIDER_POINT, OnPoint)
00136   ON_EN_KILLFOCUS(IDC_SLIDER_SELRANGEFROM, OnSelrangefrom)
00137   ON_EN_KILLFOCUS(IDC_SLIDER_SELRANGETO, OnSelrangeto)
00138 //  ON_WM_HSCROLL()
00139   //}}AFX_MSG_MAP
00140 END_MESSAGE_MAP()
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CSliderCtrlPage message handlers
00144
00145 void CSliderCtrlPage::OnAutoticks()
00146 {
00147   UpdateData();
00148
00149   // Shows tick marks according to increment/frequency when set (default frequency is 1)
00150   ChangeCtrlStyle( TBS_AUTOTICKS, m_bAutoticks );
00151
00152   // Enable/disable edit controls
00153   GetDlgItem( IDC_SLIDER_TICKFREQ )->EnableWindow( m_bAutoticks );
00154
00155   if ( m_bAutoticks )
00156     // Set tick marks with given frequency (1 = tick at every increment)
00157     m_Slider.SetTicFreq( m_uiTickFreq );    // Send TBM_SETTICFREQ - need TBS_AUTOTICKS
00158   else
00159     // Clear tick marks
00160     m_Slider.ClearTics( TRUE );
00161 }
00162
00163 void CSliderCtrlPage::OnTickfreq()
00164 {
00165   UpdateData();
00166   if ( m_bAutoticks )
00167     // Set tick marks at given frequency (1 = tick at every increment)
00168     m_Slider.SetTicFreq( m_uiTickFreq );    // Send TBM_SETTICFREQ - need TBS_AUTOTICKS
00169 }
00170
00171 void CSliderCtrlPage::OnNoticks()
00172 {
00173   UpdateData();
00174
00175   // Removes tick marks when set
00176   ChangeCtrlStyle( TBS_NOTICKS, m_bNoticks );
00177 }
00178
00179 void CSliderCtrlPage::OnNothumb()
00180 {
00181   UpdateData();
00182
00183   // Removes thumb from slider control when set
00184   ChangeCtrlStyle( TBS_NOTHUMB, m_bNothumb );
00185 }
00186
00187 void CSliderCtrlPage::OnFixed()
00188 {
00189   UpdateData();
00190
00191   // Fixes length of slider thumb when set (
00192   ChangeCtrlStyle( TBS_FIXEDLENGTH, m_bFixed );
00193 }
00194
00195 void CSliderCtrlPage::OnEnablesel()
00196 {
00197   UpdateData();
00198   ChangeCtrlStyle( TBS_ENABLESELRANGE, m_bEnablesel );
00199
00200   // Enable/disable edit controls
00201   GetDlgItem( IDC_SLIDER_SELRANGEFROM )->EnableWindow( m_bEnablesel );
00202   GetDlgItem( IDC_SLIDER_SELRANGETO )->EnableWindow( m_bEnablesel );
00203
00204   if ( m_bEnablesel )
00205     // Set selection range
00206     m_Slider.SetSelection( m_uiSelRangeFrom, m_uiSelRangeTo );  // Send TBM_SETSEL
00207   else
00208     // Clear selection range
00209     m_Slider.ClearSel( TRUE );
00210 }
00211
00212 void CSliderCtrlPage::OnLine()
00213 {
00214   UpdateData();
00215
00216   // Set line size (determines effect of arrow keys)
00217   m_Slider.SetLineSize( m_uiLine );       // Send TBM_SETLINESIZE
00218 }
00219
00220 void CSliderCtrlPage::OnPage()
00221 {
00222   UpdateData();
00223
00224   // Set page size (determines effect of PageUp/PageDown keys)
00225   m_Slider.SetPageSize( m_uiPage );       // Send TBM_SETPAGESIZE
00226 }
00227
00228 void CSliderCtrlPage::OnRangefrom()
00229 {
00230   UpdateData();
00231
00232   // Set range of slider control
00233   m_Slider.SetRangeMin( m_uiRangeFrom, TRUE );    // Send TBM_SETRANGE
00234 }
00235
00236 void CSliderCtrlPage::OnRangeto()
00237 {
00238   UpdateData();
00239
00240   // Set range of slider control
00241   m_Slider.SetRangeMax( m_uiRangeTo, TRUE );  // Send TBM_SETRANGE
00242 }
00243
00244 void CSliderCtrlPage::OnOrientation()
00245 {
00246   UpdateData();
00247
00248   // Obtain horz/vert place marker (static control)
00249   CWnd* pWnd =
00250     GetDlgItem( (0==m_iOrientation)?IDC_SLIDER_HORZPOS:IDC_SLIDER_VERTPOS );
00251   CRect rect;
00252   pWnd->GetWindowRect( &rect );
00253   ScreenToClient( &rect );
00254
00255   // Set slider control style
00256   ChangeCtrlStyle( TBS_HORZ, (0 == m_iOrientation) );
00257   ChangeCtrlStyle( TBS_VERT, (1 == m_iOrientation) );
00258
00259   // Move control to horz/vert position
00260   m_Slider.SetWindowPos( NULL,
00261                rect.left, rect.top,
00262                rect.Width(), rect.Height(),
00263                SWP_NOZORDER|SWP_SHOWWINDOW );
00264   Invalidate();
00265 }
00266
00267 void CSliderCtrlPage::OnPoint()
00268 {
00269   UpdateData();
00270
00271   switch ( m_iTickpos )
00272   {
00273   case 0:
00274     ChangeCtrlStyle( TBS_BOTH );
00275     break;
00276   case 1:
00277     ChangeCtrlStyle( TBS_TOP );     // Same as TBS_LEFT
00278     ChangeCtrlStyle( TBS_BOTH, FALSE );
00279     ChangeCtrlStyle( TBS_BOTTOM, FALSE );
00280     break;
00281   case 2:
00282     ChangeCtrlStyle( TBS_BOTTOM );  // Same as TBS_RIGHT
00283     ChangeCtrlStyle( TBS_BOTH, FALSE );
00284     ChangeCtrlStyle( TBS_TOP, FALSE );
00285     break;
00286   default:
00287     break;
00288   }
00289 }
00290
00291 void CSliderCtrlPage::OnSelrangefrom()
00292 {
00293   UpdateData();
00294   m_Slider.ClearSel();
00295   m_Slider.SetSelection( m_uiSelRangeFrom, m_uiSelRangeTo );  // Send TBM_SETSEL
00296 }
00297
00298 void CSliderCtrlPage::OnSelrangeto()
00299 {
00300   UpdateData();
00301   m_Slider.ClearSel();
00302   m_Slider.SetSelection( m_uiSelRangeFrom, m_uiSelRangeTo );  // Send TBM_SETSEL
00303 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoView.h Source File

  • vc2008fp
  • RibbonMDI

RibbonMDIDemoView.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CRibbonMDIDemoView : public CView
00015 {
00016 protected: // create from serialization only
00017   CRibbonMDIDemoView();
00018   DECLARE_DYNCREATE(CRibbonMDIDemoView)
00019
00020 // Attributes
00021 public:
00022   CRibbonMDIDemoDoc* GetDocument();
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   public:
00029   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00030   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031   protected:
00032   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00033   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00034   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00035
00036 // Implementation
00037 public:
00038   virtual ~CRibbonMDIDemoView();
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043
00044 protected:
00045   afx_msg void OnContextMenu(CWnd*, CPoint point);
00046   afx_msg void OnFilePrintPreview();
00047
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 #ifndef _DEBUG  // debug version in RibbonMDIDemoView.cpp
00052 inline CRibbonMDIDemoDoc* CRibbonMDIDemoView::GetDocument()
00053    { return (CRibbonMDIDemoDoc*)m_pDocument; }
00054 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWorkspaceBar Member List

This is the complete list of members for CWorkspaceBar, including all inherited members.
AdjustLayout() | CWorkspaceBar |
CWorkspaceBar() | CWorkspaceBar |
CWorkspaceBar() | CWorkspaceBar |
CWorkspaceBar() | CWorkspaceBar |
CWorkspaceBar() | CWorkspaceBar |
CWorkspaceBar() | CWorkspaceBar |
idActiveTabCloseButton enum value | CWorkspaceBar | [protected]
idCustomTooltips enum value | CWorkspaceBar | [protected]
idDisableMDIChildRedraw enum value | CWorkspaceBar | [protected]
idDragMDITabs enum value | CWorkspaceBar | [protected]
idFlatFrame enum value | CWorkspaceBar | [protected]
idMDITabsBorderSize enum value | CWorkspaceBar | [protected]
idMDITabsContextMenu enum value | CWorkspaceBar | [protected]
idMDITabsDocMenu enum value | CWorkspaceBar | [protected]
idMDITabsIcons enum value | CWorkspaceBar | [protected]
idShowMDITabs enum value | CWorkspaceBar | [protected]
idTabsAutoColor enum value | CWorkspaceBar | [protected]
idTabsOnTop enum value | CWorkspaceBar | [protected]
idTabsStyle enum value | CWorkspaceBar | [protected]
m_wndPropList | CWorkspaceBar | [protected]
m_wndTabs | CWorkspaceBar | [protected]
m_wndToolBar | CWorkspaceBar | [protected]
m_wndTree | CWorkspaceBar | [protected]
m_wndTree1 | CWorkspaceBar | [protected]
m_wndTree2 | CWorkspaceBar | [protected]
OnCommand1() | CWorkspaceBar | [protected]
OnCommand2() | CWorkspaceBar | [protected]
OnCommand3() | CWorkspaceBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWorkspaceBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWorkspaceBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWorkspaceBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWorkspaceBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWorkspaceBar | [protected]
OnPaint() | CWorkspaceBar | [protected]
OnPaint() | CWorkspaceBar | [protected]
OnPaint() | CWorkspaceBar | [protected]
OnPropertyChanged(WPARAM, LPARAM) | CWorkspaceBar | [protected]
OnSize(UINT nType, int cx, int cy) | CWorkspaceBar | [protected]
OnSize(UINT nType, int cx, int cy) | CWorkspaceBar | [protected]
OnSize(UINT nType, int cx, int cy) | CWorkspaceBar | [protected]
OnSize(UINT nType, int cx, int cy) | CWorkspaceBar | [protected]
OnSize(UINT nType, int cx, int cy) | CWorkspaceBar | [protected]
OnUpdateCommand3(CCmdUI *pCmdUI) | CWorkspaceBar | [protected]
SetPropState() | CWorkspaceBar |
~CWorkspaceBar() | CWorkspaceBar | [virtual]
~CWorkspaceBar() | CWorkspaceBar | [virtual]
~CWorkspaceBar() | CWorkspaceBar | [virtual]
~CWorkspaceBar() | CWorkspaceBar | [virtual]
~CWorkspaceBar() | CWorkspaceBar | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/Scheduler.h Source File

  • internet
  • Scheduler

Scheduler.h

Go to the documentation of this file.
00001 // Scheduler.h : main header file for the PROJECT_NAME application
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #ifndef __SCHEDULER_H_
00012 #define __SCHEDULER_H
00013
00014 #define BROWN ((long)0x993366)
00015 #define BLACK ((long)0x000000)
00016 #define AQUA ((long)0x99ffff)
00017 #define YELLOW ((long)0xfffacd)
00018 #define BLUE ((long)0x0000cc)
00019 #define RED ((long)0xff0066)
00020
00021 #pragma once
00022
00023 #ifndef __AFXWIN_H__
00024   #error include 'stdafx.h' before including this file for PCH
00025 #endif
00026
00027 #include "MyScheduler.h"
00028 #include "resource.h"   // main symbols
00029
00030 template <>
00031 void __stdcall SerializeElements <CMyScheduler> ( CArchive& ar, CMyScheduler* pSchedule, INT_PTR nCount );
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CSchedulerApp:
00035 // See Scheduler.cpp for the implementation of this class
00036 //
00037
00038 class CSchedulerApp : public CWinApp
00039 {
00040 public:
00041   CSchedulerApp();
00042
00043 // Overrides
00044   public:
00045   virtual BOOL InitInstance();
00046
00047 // Implementation
00048
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 #endif
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFormatTabDlg Member List

This is the complete list of members for CFormatTabDlg, including all inherited members.
AddTabToArray(LONG lTab) | CFormatTabDlg | [protected]
AddTabToArray(LONG lTab) | CFormatTabDlg | [protected]
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CFormatTabDlg(PARAFORMAT2 &pf, CWnd *pParent=NULL) | CFormatTabDlg |
CFormatTabDlg(WPD_PARAFORMAT &pf, CWnd *pParent=NULL) | CFormatTabDlg |
DoDataExchange(CDataExchange *pDX) | CFormatTabDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CFormatTabDlg | [protected, virtual]
GetHelpIDs() | CFormatTabDlg | [inline, protected, virtual]
GetHelpIDs() | CFormatTabDlg | [inline, protected, virtual]
IDD enum value | CFormatTabDlg |
m_buttonClear | CFormatTabDlg |
m_buttonClearAll | CFormatTabDlg |
m_buttonSet | CFormatTabDlg |
m_comboBox | CFormatTabDlg |
m_nCount | CFormatTabDlg |
m_nHelpIDs | CFormatTabDlg | [protected, static]
m_pf | CFormatTabDlg |
m_pf | CFormatTabDlg |
m_tabarray | CFormatTabDlg |
OnClickedClear() | CFormatTabDlg | [protected]
OnClickedClear() | CFormatTabDlg | [protected]
OnClickedClearAll() | CFormatTabDlg | [protected]
OnClickedClearAll() | CFormatTabDlg | [protected]
OnClickedSet() | CFormatTabDlg | [protected]
OnClickedSet() | CFormatTabDlg | [protected]
OnEditChange() | CFormatTabDlg | [protected]
OnEditChange() | CFormatTabDlg | [protected]
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnInitDialog() | CFormatTabDlg | [protected, virtual]
OnInitDialog() | CFormatTabDlg | [protected, virtual]
OnOK() | CFormatTabDlg | [protected, virtual]
OnOK() | CFormatTabDlg | [protected, virtual]
OnSelchange() | CFormatTabDlg | [protected]
OnSelchange() | CFormatTabDlg | [protected]
RemoveTabFromArray(LONG lTab) | CFormatTabDlg | [protected]
RemoveTabFromArray(LONG lTab) | CFormatTabDlg | [protected]
RemoveTabFromArrayByIndex(int nIndex) | CFormatTabDlg | [protected]
RemoveTabFromArrayByIndex(int nIndex) | CFormatTabDlg | [protected]
Set() | CFormatTabDlg | [protected]
Set() | CFormatTabDlg | [protected]
SetEditFocus() | CFormatTabDlg | [protected]
SetEditFocus() | CFormatTabDlg | [protected]
UpdateButton(CButton &button, BOOL b) | CFormatTabDlg | [protected]
UpdateButton(CButton &button, BOOL b) | CFormatTabDlg | [protected]
UpdateButtons() | CFormatTabDlg | [protected]
UpdateButtons() | CFormatTabDlg | [protected]
UpdateListBox() | CFormatTabDlg | [protected]
UpdateListBox() | CFormatTabDlg | [protected]
~CFormatTabDlg() | CFormatTabDlg |
~CFormatTabDlg() | CFormatTabDlg |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MainFrm.h Source File

  • vc2008fp
  • ToolTipDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMainFrame : public CFrameWndEx
00014 {
00015
00016 protected: // create from serialization only
00017   CMainFrame();
00018   DECLARE_DYNCREATE(CMainFrame)
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028
00029   virtual BOOL OnMenuButtonToolHitTest (CMFCToolBarButton* pButton, TOOLINFO* pTI);
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CMFCMenuBar   m_wndMenuBar;
00041   CMFCStatusBar m_wndStatusBar;
00042   CMFCToolBar   m_wndToolBar;
00043
00044   CMFCToolBarImages m_UserImages;
00045
00046 protected:
00047   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00048   afx_msg void OnViewCustomize();
00049   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00050   void OnToolsViewUserToolbar (UINT id);
00051   void OnUpdateToolsViewUserToolbar (CCmdUI* pCmdUI);
00052   afx_msg void OnAppLook(UINT id);
00053   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00054
00055   DECLARE_MESSAGE_MAP()
00056
00057   UINT  m_nAppLook;
00058 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/resource.h Source File

  • vc2008fp
  • RibbonGadgets

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by RibbonGadgets.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDR_MAINFRAME                   128
00007 #define IDR_RIBBONTYPE                  129
00008 #define IDR_PASTE_MENU                  134
00009 #define IDR_THEME_MENU                  136
00010 #define IDB_RIBBON_ICONS                154
00011 #define IDB_RIBBON_FILE_SMALL           155
00012 #define IDB_RIBBON_FILE_LARGE           156
00013 #define IDB_RIBBON_MAIN                 159
00014 #define IDB_RIBBON_CATEGORY1_SMALL      160
00015 #define IDB_RIBBON_CATEGORY1_LARGE      161
00016 #define IDR_RIBBON_MENU_1               162
00017 #define IDR_EDIT_MENU                   163
00018 #define IDB_RIBBON_PALETTE_1            164
00019 #define IDR_RIBBON_MENU_2               164
00020 #define IDB_RIBBON_PALETTE_2            165
00021 #define IDR_TOOLBAR                     168
00022 #define IDR_CODE                        169
00023 #define IDB_RIBBON_CATEGORY4_SMALL      171
00024 #define IDB_RIBBON_CATEGORY5_SMALL      172
00025 #define IDB_RIBBON_CATEGORY3_SMALL      173
00026 #define IDB_RIBBON_CATEGORY2_LARGE      174
00027 #define IDB_RIBBON_CATEGORY2_SMALL      175
00028 #define IDB_RIBBON_CATEGORY3_LARGE      176
00029 #define IDB_RIBBON_CATEGORY6_LARGE      177
00030 #define IDB_RIBBON_CATEGORY6_SMALL      178
00031 #define IDD_ABOUTBOX                    999
00032 #define ID_RIBBON_SOURCE_CODE_1_1       2933
00033 #define ID_RIBBON_SOURCE_CODE_1_2       2934
00034 #define ID_RIBBON_SOURCE_CODE_1_3       2935
00035 #define ID_RIBBON_SOURCE_CODE_2_1       2936
00036 #define ID_RIBBON_SOURCE_CODE_2_2       2937
00037 #define ID_RIBBON_SOURCE_CODE_3_1       2938
00038 #define ID_RIBBON_SOURCE_CODE_3_2       2939
00039 #define ID_RIBBON_SOURCE_CODE_3_3       2940
00040 #define ID_RIBBON_SOURCE_CODE_3_4       2941
00041 #define ID_RIBBON_SOURCE_CODE_4_1       2942
00042 #define ID_RIBBON_SOURCE_CODE_4_2       2943
00043 #define ID_RIBBON_SOURCE_CODE_5_1       2944
00044 #define ID_RIBBON_SOURCE_CODE_5_2       2945
00045 #define ID_RIBBON_SOURCE_CODE_5_3       2946
00046 #define ID_RIBBON_SOURCE_CODE_6_1       2947
00047 #define ID_RIBBON_SOURCE_CODE_6_2       2948
00048 #define ID_RIBBON_SOURCE_CODE_6_3       2949
00049 #define ID_RIBBON_SOURCE_CODE_6_4       2950
00050 #define ID_RIBBON_SOURCE_CODE_6_5       2951
00051 #define ID_VIEW_TOOLBARS                32771
00052 #define ID_VIEW_OUTPUT                  32833
00053 #define ID_VIEW_APPLOOK_2007            32838
00054 #define ID_VIEW_APPLOOK_2007_1          32839
00055 #define ID_VIEW_APPLOOK_2007_2          32840
00056 #define ID_VIEW_APPLOOK_2007_3          32841
00057 #define ID_TOOLS_OPTIONS                32847
00058 #define ID_STATUSBAR_PANE1              32848
00059 #define ID_STATUSBAR_PANE2              32849
00060 #define ID_RIBBON_A                     32853
00061 #define ID_RIBBON_BTN_8                 32854
00062 #define ID_RIBBON_BTN_1                 32855
00063 #define ID_RIBBON_BTN_2                 32857
00064 #define ID_RIBBON_BTN_3                 32858
00065 #define ID_RIBBON_BTN_4                 32859
00066 #define ID_RIBBON_BTN_5                 32860
00067 #define ID_RIBBON_BTN_6                 32861
00068 #define ID_RIBBON_BTN_7                 32862
00069 #define ID_RIBBON_BTN_9                 32863
00070 #define ID_RIBBON_MENU_ITEM_1           32864
00071 #define ID_RIBBON_MENU_ITEM_2           32865
00072 #define ID_RIBBON_MENU_ITEM_3           32866
00073 #define ID_RIBBON_MENU_ITEM_4           32867
00074 #define ID_RIBBON_MENU_ITEM_5           32868
00075 #define ID_RIBBON_MENU_ITEM_6           32869
00076 #define ID_RIBBON_MBTN_1                32870
00077 #define ID_RIBBON_MBTN_2                32871
00078 #define ID_RIBBON_PBTN_1                32881
00079 #define ID_RIBBON_PBTN_2                32882
00080 #define ID_RIBBON_PBTN_3                32883
00081 #define ID_RIBBON_PBTN_4                32884
00082 #define ID_RIBBON_PBTN_5                32885
00083 #define ID_RIBBON_GBTN_1                32886
00084 #define ID_RIBBON_GBTN_2                32887
00085 #define ID_RIBBON_GBTN_3                32888
00086 #define ID_RIBBON_GBTN_4                32889
00087 #define ID_RIBBON_GBTN_5                32890
00088 #define ID_RIBBON_GBTN_6                32891
00089 #define ID_RIBBON_GBTN_7                32894
00090 #define ID_RIBBON_GBTN_8                32895
00091 #define ID_RIBBON_GBTN_9                32896
00092 #define ID_RIBBON_GBTN_10               32897
00093 #define ID_RIBBON_GBTN_11               32898
00094 #define ID_RIBBON_CBTN_3                32900
00095 #define ID_RIBBON_CBTN_1                32901
00096 #define ID_RIBBON_CBTN_2                32902
00097 #define ID_RIBBON_CBTN_4                32903
00098 #define ID_RIBBON_CBTN_5                32904
00099 #define ID_RIBBON_CBTN_6                32905
00100 #define ID_RIBBON_CBTN_7                32906
00101 #define ID_RIBBON_CBTN_8                32907
00102 #define ID_RIBBON_CBTN_9                32908
00103 #define ID_RIBBON_EBTN_1                32909
00104 #define ID_RIBBON_EBTN_2                32910
00105 #define ID_RIBBON_EBTN_3                32911
00106 #define ID_RIBBON_EBTN_4                32913
00107 #define ID_RIBBON_EBTN_5                32914
00108 #define ID_RIBBON_EBTN_6                32915
00109 #define ID_RIBBON_EBTN_7                32916
00110 #define ID_RIBBON_EBTN_8                32917
00111 #define ID_RIBBON_EBTN_9                32918
00112 #define ID_RIBBON_OBTN_1                32919
00113 #define ID_RIBBON_OBTN_2                32920
00114 #define ID_RIBBON_OBTN_3                32921
00115 #define ID_RIBBON_OBTN_4                32922
00116 #define ID_RIBBON_OBTN_5                32923
00117 #define ID_RIBBON_OBTN_6                32924
00118 #define ID_RIBBON_OBTN_7                32925
00119 #define ID_RIBBON_OBTN_8                32926
00120 #define ID_RIBBON_OBTN_9                32927
00121 #define ID_RIBBON_OBTN_10               32928
00122 #define ID_RIBBON_OBTN_11               32929
00123 #define ID_RIBBON_CBTN_10               32930
00124 #define ID_RIBBON_Z                     33000
00125 #define IDR_RIBBON                      33001
00126
00127 // Next default values for new objects
00128 //
00129 #ifdef APSTUDIO_INVOKED
00130 #ifndef APSTUDIO_READONLY_SYMBOLS
00131 #define _APS_3D_CONTROLS                     1
00132 #define _APS_NEXT_RESOURCE_VALUE        198
00133 #define _APS_NEXT_COMMAND_VALUE         32952
00134 #define _APS_NEXT_CONTROL_VALUE         1042
00135 #define _APS_NEXT_SYMED_VALUE           108
00136 #endif
00137 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputBar.h Source File

  • vc2008fp
  • VisualStudioDemo

OutputBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // COutputList1 window
00014
00015 class COutputList1 : public CListBox
00016 {
00017 // Construction
00018 public:
00019   COutputList1();
00020
00021 // Implementation
00022 public:
00023   virtual ~COutputList1();
00024
00025 protected:
00026   afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00027   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00028   afx_msg void OnEditCopy();
00029   afx_msg void OnEditClear();
00030   afx_msg void OnOutputGotoError();
00031   afx_msg void OnViewOutput();
00032
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // COutputBar window
00038
00039 class COutputBar : public CDockablePane
00040 {
00041 // Construction
00042 public:
00043   COutputBar();
00044
00045 // Attributes
00046 protected:
00047   CMFCTabCtrl m_wndTabs;
00048   CFont m_Font;
00049
00050   COutputList1 m_wndOutputBuild;
00051   COutputList1 m_wndOutputDebug;
00052   COutputList1 m_wndOutputFind1;
00053   COutputList1 m_wndOutputFind2;
00054   COutputList1 m_wndOutputSQL;
00055
00056 // Operations
00057 public:
00058   void SetFlatTabs(BOOL bFlat = TRUE, BOOL bRepaint = TRUE)
00059   {
00060     m_wndTabs.SetFlatFrame(bFlat, bRepaint);
00061   }
00062
00063 protected:
00064   void FillBuildWindow();
00065   void FillDebugWindow();
00066   void AdjusrHorzScroll(CListBox& wndListBox);
00067
00068 // Implementation
00069 public:
00070   virtual ~COutputBar();
00071
00072 protected:
00073   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00074   afx_msg void OnSize(UINT nType, int cx, int cy);
00075
00076   DECLARE_MESSAGE_MAP()
00077 };
00078
00079
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDockDoc Member List

This is the complete list of members for CDockDoc, including all inherited members.
CDockDoc() | CDockDoc | [protected]
OnNewDocument() | CDockDoc | [virtual]
Serialize(CArchive &ar) | CDockDoc | [virtual]
~CDockDoc() | CDockDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoclik.h Source File

  • ole
  • acdual
  • acdualdriv

autoclik.h

Go to the documentation of this file.
00001 // autoclik.h: defines the IDispatch classes available from AUTOCLIK.EXE
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 // Machine generated IDispatch driver class(es) created with MFCDSPWZ tool.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CAutoClik wrapper class
00016
00017 class CAutoClik : public COleDispatchDriver
00018 {
00019 // Attributes
00020 public:
00021   CString GetText();
00022   void SetText(LPCTSTR);
00023   short GetX();
00024   void SetX(short);
00025   short GetY();
00026   void SetY(short);
00027   LPDISPATCH GetPosition();
00028   void SetPosition(LPDISPATCH);
00029
00030 // Operations
00031 public:
00032   void RefreshWindow();
00033   void SetAllProps(short x, short y, LPCTSTR text);
00034   void ShowWindow();
00035 };
00036
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CClikPoint wrapper class
00040
00041 class CClikPoint : public COleDispatchDriver
00042 {
00043 // Attributes
00044 public:
00045   short GetX();
00046   void SetX(short);
00047   short GetY();
00048   void SetY(short);
00049
00050 // Operations
00051 public:
00052 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewer.cpp Source File

  • ole
  • oleview
  • iviewers

iviewer.cpp

Go to the documentation of this file.
00001 // iviewer.h : implementation file
00002 //
00003 // Base iviewer class
00004 //
00005 //
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and related
00012 // electronic documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include "stdafx.h"
00017 #include "iviewers.h"
00018 #include "iviewer.h"
00019
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CInterfaceViewer command target
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CInterfaceViewer
00032
00033 IMPLEMENT_DYNAMIC(CInterfaceViewer, CCmdTarget)
00034
00035 CInterfaceViewer::CInterfaceViewer()
00036 {
00037   AfxOleLockApp() ;
00038 }
00039
00040 CInterfaceViewer::~CInterfaceViewer()
00041 {
00042   AfxOleUnlockApp() ;
00043 }
00044
00045 HRESULT CInterfaceViewer::OnView(HWND /*hwndParent*/, REFIID /*riid*/, LPUNKNOWN /*punk*/)
00046 {
00047   AfxMessageBox(_T("Implement interface viewer UI here.") ) ;
00048   return NOERROR ;
00049 }
00050
00051 BEGIN_MESSAGE_MAP(CInterfaceViewer, CCmdTarget)
00052   //{{AFX_MSG_MAP(CInterfaceViewer)
00053     // NOTE - the ClassWizard will add and remove mapping macros here.
00054   //}}AFX_MSG_MAP
00055 END_MESSAGE_MAP()
00056
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CInterfaceViewer message handlers
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // IInterfaceViewer implementation
00063
00064 BEGIN_INTERFACE_MAP(CInterfaceViewer, CCmdTarget)
00065   INTERFACE_PART(CInterfaceViewer, IID_IInterfaceViewer, InterfaceViewer)
00066 END_INTERFACE_MAP()
00067
00068 STDMETHODIMP_(ULONG) CInterfaceViewer::XInterfaceViewer::AddRef()
00069 {
00070   METHOD_PROLOGUE(CInterfaceViewer, InterfaceViewer)
00071   return pThis->ExternalAddRef();
00072 }
00073
00074 STDMETHODIMP_(ULONG) CInterfaceViewer::XInterfaceViewer::Release()
00075 {
00076   METHOD_PROLOGUE(CInterfaceViewer, InterfaceViewer)
00077   return pThis->ExternalRelease();
00078 }
00079
00080 STDMETHODIMP CInterfaceViewer::XInterfaceViewer::QueryInterface(REFIID iid, void** ppvObj)
00081 {
00082   METHOD_PROLOGUE(CInterfaceViewer, InterfaceViewer)
00083   return (HRESULT)pThis->ExternalQueryInterface(&iid, ppvObj) ;
00084 }
00085
00086 STDMETHODIMP CInterfaceViewer::XInterfaceViewer::View(HWND hwndParent, REFIID riid, LPUNKNOWN punk)
00087 {
00088   METHOD_PROLOGUE(CInterfaceViewer, InterfaceViewer)
00089   return pThis->OnView( hwndParent, riid, punk ) ;
00090 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/CalendarBar.h Source File

  • vc2008fp
  • OutlookDemo

CalendarBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CCalendarBar window
00014
00015 class CCalendarBar : public CWnd
00016 {
00017 // Construction
00018 public:
00019   CCalendarBar();
00020
00021 // Attributes
00022 protected:
00023   CMonthCalCtrl m_wndCalendar;
00024   int m_nMyCalendarsY;
00025   CImageList m_Images;
00026
00027 // Overrides
00028 public:
00029   virtual BOOL Create(const RECT& rect, CWnd* pParentWnd, UINT nID = (UINT)-1);
00030
00031 // Implementation
00032 public:
00033   virtual ~CCalendarBar();
00034
00035 protected:
00036   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00037   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00038   afx_msg void OnSize(UINT nType, int cx, int cy);
00039   afx_msg void OnPaint();
00040
00041   DECLARE_MESSAGE_MAP()
00042 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View3.h Source File

  • vc2008fp
  • TabbedView

View3.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CView3 form view
00015
00016 #ifndef __AFXEXT_H__
00017 #include <afxext.h>
00018 #endif
00019
00020 class CView3 : public CFormView
00021 {
00022 protected:
00023   CView3();           // protected constructor used by dynamic creation
00024   DECLARE_DYNCREATE(CView3)
00025
00026 // Form Data
00027 public:
00028   enum { IDD = IDD_FORMVIEW };
00029
00030 // Attributes
00031 public:
00032
00033 // Operations
00034 public:
00035
00036 // Overrides
00037   protected:
00038   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00039   virtual void OnDraw(CDC* pDC);
00040
00041 // Implementation
00042 protected:
00043   virtual ~CView3();
00044 #ifdef _DEBUG
00045   virtual void AssertValid() const;
00046   virtual void Dump(CDumpContext& dc) const;
00047 #endif
00048
00049   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00050   afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00051   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00052
00053   DECLARE_MESSAGE_MAP()
00054 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CListOutputFrame Member List

This is the complete list of members for CListOutputFrame, including all inherited members.
AddString(LPCTSTR lpszItem) | CListOutputFrame |
Clear() | CListOutputFrame |
CListOutputFrame() | CListOutputFrame |
Create(LPCTSTR lpszWindowName, DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_OVERLAPPEDWINDOW, const RECT &rect=rectDefault, CMDIFrameWnd *pParentWnd=NULL) | CListOutputFrame |
GetTextData() | CListOutputFrame | [protected]
m_dlgBar | CListOutputFrame | [protected]
m_listBox | CListOutputFrame | [protected]
m_menu | CListOutputFrame | [protected]
m_ppThis | CListOutputFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CListOutputFrame | [protected]
OnEditClear() | CListOutputFrame | [protected]
OnEditCopy() | CListOutputFrame | [protected]
OnEditCut() | CListOutputFrame | [protected]
SetBackpointer(CListOutputFrame **ppThis) | CListOutputFrame | [inline]
~CListOutputFrame() | CListOutputFrame |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DICTENTRYHEADER Member List

This is the complete list of members for DICTENTRYHEADER, including all inherited members.
cb | DICTENTRYHEADER
dwPropID | DICTENTRYHEADER
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/StdAfx.h Source File

  • vc2008fp
  • WorkSpaceToolBar

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
00046
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/targetver.h Source File

  • vc2008fp
  • PropSheetDemo

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawdoc.cpp Source File

  • vc2008fp
  • DrawClient

drawdoc.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013
00014 #ifndef SHARED_HANDLERS
00015 #include "DrawClient.h"
00016 #include "mainfrm.h"
00017 #endif
00018
00019 #include "drawdoc.h"
00020
00021 #ifndef SHARED_HANDLERS
00022 #include "drawvw.h"
00023 #endif
00024
00025 #include "drawobj.h"
00026 #include "cntritem.h"
00027
00028 #ifndef SHARED_HANDLERS
00029 #include "summpage.h"
00030 #include "statpage.h"
00031 #endif
00032
00033 #include "propkey.h"
00034
00035 #ifdef _DEBUG
00036 #undef THIS_FILE
00037 static char BASED_CODE THIS_FILE[] = __FILE__;
00038 #endif
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CDrawDoc
00042
00043 IMPLEMENT_DYNCREATE(CDrawDoc, COleDocument)
00044
00045 BEGIN_MESSAGE_MAP(CDrawDoc, COleDocument)
00046   //{{AFX_MSG_MAP(CDrawDoc)
00047 #ifndef SHARED_HANDLERS
00048   ON_COMMAND(ID_VIEW_PAPERCOLOR, OnViewPaperColor)
00049   ON_COMMAND(ID_FILE_SUMMARYINFO, OnFileSummaryInfo)
00050   // Enable default OLE container implementation
00051   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, COleDocument::OnUpdatePasteMenu)
00052   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE_LINK, COleDocument::OnUpdatePasteLinkMenu)
00053   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, COleDocument::OnUpdateEditLinksMenu)
00054   ON_COMMAND(ID_OLE_EDIT_LINKS, COleDocument::OnEditLinks)
00055   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, COleDocument::OnUpdateObjectVerbMenu)
00056   // MAPI support
00057   ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00058   ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00059 #endif
00060   //}}AFX_MSG_MAP
00061 END_MESSAGE_MAP()
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CDrawDoc construction/destruction
00065
00066 CDrawDoc::CDrawDoc()
00067 {
00068   EnableCompoundFile();
00069
00070   m_bCanDeactivateInplace = TRUE;
00071   m_nMapMode = MM_ANISOTROPIC;
00072   m_paperColorLast = m_paperColor = RGB(255, 255, 255);
00073   m_pSummInfo = NULL;
00074   ComputePageSize();
00075 }
00076
00077 CDrawDoc::~CDrawDoc()
00078 {
00079   OnUnloadHandler();
00080 }
00081
00082 void CDrawDoc::OnUnloadHandler()
00083 {
00084   POSITION pos = m_objects.GetHeadPosition();
00085   while (pos != NULL)
00086     delete m_objects.GetNext(pos);
00087
00088   m_objects.RemoveAll();
00089   delete m_pSummInfo;
00090   m_pSummInfo = NULL;
00091 }
00092
00093 BOOL CDrawDoc::OnNewDocument()
00094 {
00095   if (!COleDocument::OnNewDocument())
00096     return FALSE;
00097
00098   // reinitialization code
00099   //(SDI documents will reuse this document)
00100   if (m_pSummInfo != NULL)
00101     delete m_pSummInfo;
00102   m_pSummInfo = new CSummInfo;
00103   // Title, Subject, Author, Keywords default to empty string
00104   // Comments, Template, SavedBy default to empty string
00105   // LastSave, LastPrint, EditTime, RevNum default to 0
00106   m_pSummInfo->StartEditTimeCount();
00107   m_pSummInfo->RecordCreateDate();
00108   m_pSummInfo->SetNumPages(1);
00109   // NumWords, NumChars default to 0
00110   m_pSummInfo->SetAppname( _T("DrawCli") );
00111   // Security defaults to 0
00112   return TRUE;
00113 }
00114
00115 BOOL CDrawDoc::OnOpenDocument(LPCTSTR lpszPathName)
00116 {
00117   if ( m_pSummInfo != NULL)
00118     delete m_pSummInfo;
00119   m_pSummInfo = new CSummInfo;
00120   m_pSummInfo->StartEditTimeCount();
00121   return COleDocument::OnOpenDocument(lpszPathName);
00122 }
00123
00124 BOOL CDrawDoc::OnSaveDocument(LPCTSTR lpszPathName)
00125 {
00126   m_pSummInfo->RecordSaveDate();
00127   m_pSummInfo->IncrRevNum();
00128   m_pSummInfo->SetLastAuthor(m_pSummInfo->GetAuthor());
00129   m_pSummInfo->AddCountToEditTime();
00130   m_pSummInfo->StartEditTimeCount();
00131   return COleDocument::OnSaveDocument(lpszPathName);
00132 }
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CDrawDoc serialization
00136
00137 void CDrawDoc::Serialize(CArchive& ar)
00138 {
00139   if (ar.IsStoring())
00140   {
00141     ar << m_paperColor;
00142     m_objects.Serialize(ar);
00143     m_pSummInfo->WriteToStorage(m_lpRootStg);
00144   }
00145   else
00146   {
00147     ar >> m_paperColor;
00148     m_paperColorLast = m_paperColor;
00149     m_objects.Serialize(ar);
00150     m_pSummInfo->ReadFromStorage(m_lpRootStg);
00151   }
00152
00153   // By calling the base class COleDocument, we enable serialization
00154   //  of the container document's COleClientItem objects automatically.
00155   COleDocument::Serialize(ar);
00156 }
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CDrawDoc implementation
00160
00161 void CDrawDoc::Draw(CDC* pDC, CDrawView* pView)
00162 {
00163   POSITION pos = m_objects.GetHeadPosition();
00164   while (pos != NULL)
00165   {
00166     CDrawObj* pObj = m_objects.GetNext(pos);
00167     pObj->Draw(pDC);
00168 #ifndef SHARED_HANDLERS
00169     if (pView != NULL && pView->m_bActive && !pDC->IsPrinting() && pView->IsSelected(pObj))
00170       pObj->DrawTracker(pDC, CDrawObj::selected);
00171 #endif
00172   }
00173 }
00174
00175 void CDrawDoc::Draw (CDC* pDC)
00176 {
00177   CSize szPage = m_rectDocumentBounds.Size ();
00178   pDC->FillSolidRect(CRect (CPoint (0, 0), szPage), m_paperColor);
00179
00180   pDC->SetMapMode(MM_ANISOTROPIC);
00181   pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX),
00182   pDC->GetDeviceCaps(LOGPIXELSY));
00183
00184   pDC->SetWindowExt(100, -100);
00185   pDC->OffsetWindowOrg(-szPage.cx / 2, szPage.cy / 2);
00186
00187   Draw (pDC, NULL);
00188
00189   pDC->SetViewportOrg(0, 0);
00190   pDC->SetWindowOrg(0,0);
00191   pDC->SetMapMode(MM_TEXT);
00192 }
00193
00194 void CDrawDoc::Add(CDrawObj* pObj)
00195 {
00196   m_objects.AddTail(pObj);
00197   pObj->m_pDocument = this;
00198   SetModifiedFlag();
00199 }
00200
00201 void CDrawDoc::Remove(CDrawObj* pObj)
00202 {
00203   // Find and remove from document
00204   POSITION pos = m_objects.Find(pObj);
00205   if (pos != NULL)
00206     m_objects.RemoveAt(pos);
00207   // set document modified flag
00208   SetModifiedFlag();
00209
00210 #ifndef SHARED_HANDLERS
00211   // call remove for each view so that the view can remove from m_selection
00212   pos = GetFirstViewPosition();
00213   while (pos != NULL)
00214     ((CDrawView*)GetNextView(pos))->Remove(pObj);
00215 #endif
00216 }
00217
00218 // point is in logical coordinates
00219 CDrawObj* CDrawDoc::ObjectAt(const CPoint& point)
00220 {
00221   CRect rect(point, CSize(1, 1));
00222   POSITION pos = m_objects.GetTailPosition();
00223   while (pos != NULL)
00224   {
00225     CDrawObj* pObj = m_objects.GetPrev(pos);
00226     if (pObj->Intersects(rect))
00227       return pObj;
00228   }
00229
00230   return NULL;
00231 }
00232
00233 void CDrawDoc::ComputePageSize()
00234 {
00235   CSize new_size(850, 1100);  // 8.5" x 11" default
00236
00237   CPrintDialog dlg(FALSE);
00238   if (AfxGetApp()->GetPrinterDeviceDefaults(&dlg.m_pd))
00239   {
00240     // GetPrinterDC returns a HDC so attach it
00241     CDC dc;
00242     HDC hDC= dlg.CreatePrinterDC();
00243     ASSERT(hDC != NULL);
00244     dc.Attach(hDC);
00245
00246     // Get the size of the page in loenglish
00247     new_size.cx = MulDiv(dc.GetDeviceCaps(HORZSIZE), 1000, 254);
00248     new_size.cy = MulDiv(dc.GetDeviceCaps(VERTSIZE), 1000, 254);
00249   }
00250
00251 #ifndef SHARED_HANDLERS
00252   // if size changed then iterate over views and reset
00253   if (new_size != m_size)
00254   {
00255     m_size = new_size;
00256     POSITION pos = GetFirstViewPosition();
00257     while (pos != NULL)
00258       ((CDrawView*)GetNextView(pos))->SetPageSize(m_size);
00259   }
00260 #endif
00261 }
00262
00263 void CDrawDoc::OnViewPaperColor()
00264 {
00265 #ifndef SHARED_HANDLERS
00266   COLORREF color = ((CMainFrame*)AfxGetMainWnd())->GetColorFromColorButton(ID_VIEW_PAPERCOLOR);
00267   m_paperColor = color == (COLORREF) -1 ? RGB(255, 255, 255) : color;
00268   m_paperColorLast = m_paperColor;
00269
00270   SetModifiedFlag();
00271   UpdateAllViews(NULL);
00272 #endif
00273 }
00274
00275 /////////////////////////////////////////////////////////////////////////////
00276 // CDrawDoc diagnostics
00277
00278 #ifdef _DEBUG
00279 void CDrawDoc::AssertValid() const
00280 {
00281   COleDocument::AssertValid();
00282 }
00283
00284 void CDrawDoc::Dump(CDumpContext& dc) const
00285 {
00286   COleDocument::Dump(dc);
00287 }
00288 #endif //_DEBUG
00289
00290 /////////////////////////////////////////////////////////////////////////////
00291 // CDrawDoc commands
00292
00293 void CDrawDoc::OnFileSummaryInfo()
00294 {
00295 #ifndef SHARED_HANDLERS
00296   ASSERT_VALID(this);
00297
00298   CPropertySheet sheet( _T("Document Properties") );
00299   CSummPage summ;
00300   CStatPage stat;
00301   sheet.AddPage( &summ );
00302   sheet.AddPage( &stat );
00303
00304   summ.m_strAppname = m_pSummInfo->GetAppname();
00305   summ.m_strTitle   = m_pSummInfo->GetTitle();
00306   summ.m_strSubj    = m_pSummInfo->GetSubject();
00307   summ.m_strAuthor  = m_pSummInfo->GetAuthor();
00308   summ.m_strKeywd   = m_pSummInfo->GetKeywords();
00309   summ.m_strCmt     = m_pSummInfo->GetComments();
00310   summ.m_strTempl   = m_pSummInfo->GetTemplate();
00311
00312   stat.m_strSavedBy    = m_pSummInfo->GetLastAuthor();
00313   stat.m_strRevNum     = m_pSummInfo->GetRevNum();
00314   stat.m_strEditTime   = m_pSummInfo->GetEditTime();
00315   stat.m_strLastPrint  = m_pSummInfo->GetLastPrintDate();
00316   stat.m_strCreateDate = m_pSummInfo->GetCreateDate();
00317   stat.m_strLastSave   = m_pSummInfo->GetLastSaveDate();
00318   stat.m_strNumPages   = m_pSummInfo->GetNumPages();
00319   stat.m_strNumWords   = m_pSummInfo->GetNumWords();
00320   stat.m_strNumChars   = m_pSummInfo->GetNumChars();
00321   stat.m_strSecurity   = m_pSummInfo->GetSecurity();
00322
00323   if (sheet.DoModal() != IDOK)
00324     return;
00325
00326   m_pSummInfo->SetAuthor(summ.m_strAuthor);
00327   m_pSummInfo->SetKeywords(summ.m_strKeywd);
00328   m_pSummInfo->SetSubject(summ.m_strSubj);
00329   m_pSummInfo->SetComments(summ.m_strCmt);
00330   m_pSummInfo->SetTemplate(summ.m_strTempl);
00331   m_pSummInfo->SetTitle(summ.m_strTitle);
00332
00333   SetModifiedFlag();
00334 #endif
00335 }
00336
00337 void CDrawDoc::SetPreviewColor(COLORREF clr)
00338 {
00339   m_paperColor = clr == -1 ? m_paperColorLast : clr;
00340   UpdateAllViews(NULL);
00341 }
00342
00343 BOOL CDrawDoc::CanCloseFrame(CFrameWnd* pFrame)
00344 {
00345   m_bCanDeactivateInplace = FALSE;
00346
00347   BOOL bRes = COleDocument::CanCloseFrame(pFrame);
00348
00349   m_bCanDeactivateInplace = TRUE;
00350
00351   return bRes;
00352 }
00353
00354 void CDrawDoc::FixUpObjectPositions()
00355 {
00356   CPoint ptLeftTop(0, 0);
00357   CPoint ptRightBottom(0, 0);
00358
00359   // find bounding rectangle of all objects
00360   for (POSITION pos = m_objects.GetHeadPosition(); pos != NULL;)
00361   {
00362     CDrawObj* pObj = m_objects.GetNext(pos);
00363     CRect rectPos = pObj->m_position;
00364     rectPos.NormalizeRect();
00365     ptLeftTop.x = min(rectPos.left, ptLeftTop.x);
00366     ptLeftTop.y = min(rectPos.top, ptLeftTop.y);
00367     ptRightBottom.x = max(rectPos.right, ptRightBottom.x);
00368     ptRightBottom.y = max(rectPos.bottom, ptRightBottom.y);
00369   }
00370
00371   m_rectDocumentBounds.SetRect(ptLeftTop, ptRightBottom);
00372
00373   // make some borders
00374   m_rectDocumentBounds.InflateRect(4, 4);
00375
00376   // center all objects within bounding rectangle
00377   for (POSITION pos = m_objects.GetHeadPosition(); pos != NULL;)
00378   {
00379     CDrawObj* pObj = m_objects.GetNext(pos);
00380     pObj->MoveTo(CPoint (-ptLeftTop.x - m_rectDocumentBounds.Width() / 2, -ptLeftTop.y - m_rectDocumentBounds.Height() / 2));
00381   }
00382 }
00383
00384 #ifdef SHARED_HANDLERS
00385 void CDrawDoc::InitializeSearchContent ()
00386 {
00387   SetAuthor(m_pSummInfo->GetAuthor());
00388   SetTitle(m_pSummInfo->GetTitle());
00389   SetComment(m_pSummInfo->GetComments());
00390   SetKeywords(m_pSummInfo->GetKeywords());
00391   SetLastAuthor(m_pSummInfo->GetLastAuthor());
00392
00393   if (m_objects.GetCount() == 0)
00394   {
00395     return;
00396   }
00397
00398   CString strContent;
00399
00400   LPCTSTR szTypes[] =
00401   {
00402     _T ("line"),
00403     _T ("rectangle"),
00404     _T ("rounded rectangle"),
00405     _T ("ellipse"),
00406     _T ("polyline"),
00407     _T ("ole object"),
00408   };
00409
00410   struct XColor
00411   {
00412     LPCTSTR szName;
00413     COLORREF clr;
00414   };
00415
00416   XColor szColors[] =
00417   {
00418     {_T("black")  , RGB(  0,   0,   0)},
00419     {_T("gray")   , RGB(128, 128, 128)},
00420     {_T("white")  , RGB(255, 255, 255)},
00421     {_T("maroon") , RGB(128,   0,   0)},
00422     {_T("green")  , RGB(  0, 128,   0)},
00423     {_T("olive")  , RGB(128, 128,   0)},
00424     {_T("navy")   , RGB(  0,   0, 128)},
00425     {_T("purple") , RGB(128,   0, 128)},
00426     {_T("teal")   , RGB(  0, 128, 128)},
00427     {_T("red")    , RGB(255,   0,   0)},
00428     {_T("lime")   , RGB(  0, 255,   0)},
00429     {_T("yellow") , RGB(255, 255,   0)},
00430     {_T("blue")   , RGB(  0,   0, 255)},
00431     {_T("fuchsia"), RGB(255,   0, 255)},
00432     {_T("aqua")   , RGB(  0, 255, 255)}
00433   };
00434   BYTE nColorIndex[] = {0, 128, 255};
00435
00436   POSITION pos = m_objects.GetHeadPosition();
00437   while (pos != NULL)
00438   {
00439     CDrawObj* pObject = m_objects.GetNext(pos);
00440     if (pObject == NULL)
00441     {
00442       continue;
00443     }
00444
00445     int typeObj = -1;
00446     //0 - line
00447     //1 - rectangle
00448     //2 - rounded rectangle
00449     //3 - ellipse
00450     //4 - polyline
00451     //5 - ole object
00452
00453     int typeClr = -1;
00454     //0  - black
00455     //1  - gray
00456     //2  - white
00457     //3  - maroon
00458     //4  - green
00459     //5  - olive
00460     //6  - navy
00461     //7  - purple
00462     //8  - teal
00463     //9  - red
00464     //10 - lime
00465     //11 - yellow
00466     //12 - blue
00467     //13 - fuchsia
00468     //14 - aqua
00469
00470     COLORREF clr = (COLORREF)-1;
00471
00472     if (DYNAMIC_DOWNCAST(CDrawRect, pObject) != NULL)
00473     {
00474       CDrawRect* pDraw = (CDrawRect*)pObject;
00475       switch (pDraw->GetShape())
00476       {
00477       case CDrawRect::line:
00478         typeObj = 0;
00479         if (pDraw->IsEnableLine())
00480         {
00481           clr = pDraw->GetLineColor();
00482         }
00483         break;
00484       case CDrawRect::rectangle:
00485         typeObj = 1;
00486         break;
00487       case CDrawRect::roundRectangle:
00488         typeObj = 2;
00489         break;
00490       case CDrawRect::ellipse:
00491         typeObj = 3;
00492         break;
00493       }
00494
00495       if (typeObj != 0)
00496       {
00497         if (pDraw->IsEnableFill())
00498         {
00499           clr = pDraw->GetFillColor();
00500         }
00501       }
00502     }
00503     else if (DYNAMIC_DOWNCAST(CDrawPoly, pObject) != NULL)
00504     {
00505       typeObj = 4;
00506
00507       CDrawPoly* pDraw = (CDrawPoly*)pObject;
00508       if (pDraw->IsEnableFill())
00509       {
00510         clr = pDraw->GetFillColor();
00511       }
00512     }
00513     else if (DYNAMIC_DOWNCAST(CDrawOleObj, pObject) != NULL)
00514     {
00515       typeObj = 5;
00516     }
00517
00518     if (typeObj == -1)
00519     {
00520       continue;
00521     }
00522
00523     CString strClr;
00524     if (clr != (COLORREF)-1)
00525     {
00526       COLORREF clrOrig = clr;
00527       clr = RGB
00528         (
00529         nColorIndex[GetRValue(clr) / 86],
00530         nColorIndex[GetGValue(clr) / 86],
00531         nColorIndex[GetBValue(clr) / 86]
00532       );
00533       for (int i = 0; i < sizeof(szColors)/ sizeof(XColor); i++)
00534       {
00535         if (szColors[i].clr == clr)
00536         {
00537           strClr = szColors[i].szName;
00538           break;
00539         }
00540       }
00541
00542       if (strClr.IsEmpty ())
00543       {
00544         strClr.Format (_T("#%0X"), clrOrig);
00545       }
00546     }
00547     else
00548     {
00549       strClr = _T("empty");
00550     }
00551
00552     CString str;
00553     str = strClr + _T(" ") + szTypes[typeObj];
00554
00555     if (strContent.IsEmpty())
00556     {
00557       strContent = str;
00558     }
00559     else if (strContent.Find(str) == -1)
00560     {
00561       strContent += _T("; ") + str;
00562     }
00563   }
00564
00565   if (strContent.IsEmpty())
00566   {
00567     strContent = _T("empty document");
00568   }
00569
00570   SetSearchContents(strContent);
00571 }
00572 void CDrawDoc::SetTitle(const CString& value)
00573 {
00574   if (value.IsEmpty())
00575   {
00576     RemoveChunk(PKEY_Title.fmtid, PKEY_Title.pid);
00577   }
00578   else
00579   {
00580     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00581     pChunk->SetTextValue(PKEY_Title, value, CHUNK_VALUE, 0, 0, 0, CHUNK_EOP);
00582     SetChunkValue(pChunk);
00583   }
00584 }
00585
00586 void CDrawDoc::SetAuthor(const CString& value)
00587 {
00588   if (value.IsEmpty())
00589   {
00590     RemoveChunk(PKEY_Author.fmtid, PKEY_Author.pid);
00591   }
00592   else
00593   {
00594     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00595     pChunk->SetTextValue(PKEY_Author, value, CHUNK_VALUE, 0, 0, 0, CHUNK_EOP);
00596     SetChunkValue(pChunk);
00597   }
00598 }
00599
00600 void CDrawDoc::SetCompany(const CString& value)
00601 {
00602   if (value.IsEmpty())
00603   {
00604     RemoveChunk(PKEY_Company.fmtid, PKEY_Company.pid);
00605   }
00606   else
00607   {
00608     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00609     pChunk->SetTextValue(PKEY_Company, value, CHUNK_VALUE, 0, 0, 0, CHUNK_EOP);
00610     SetChunkValue(pChunk);
00611   }
00612 }
00613
00614 void CDrawDoc::SetComment(const CString& value)
00615 {
00616   if (value.IsEmpty())
00617   {
00618     RemoveChunk(PKEY_Comment.fmtid, PKEY_Comment.pid);
00619   }
00620   else
00621   {
00622     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00623     pChunk->SetTextValue(PKEY_Comment, value, CHUNK_VALUE, 0, 0, 0, CHUNK_EOP);
00624     SetChunkValue(pChunk);
00625   }
00626 }
00627
00628 void CDrawDoc::SetCopyright(const CString& value)
00629 {
00630   if (value.IsEmpty())
00631   {
00632     RemoveChunk(PKEY_Copyright.fmtid, PKEY_Copyright.pid);
00633   }
00634   else
00635   {
00636     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00637     pChunk->SetTextValue(PKEY_Copyright, value, CHUNK_VALUE, 0, 0, 0, CHUNK_EOP);
00638     SetChunkValue(pChunk);
00639   }
00640 }
00641
00642 void CDrawDoc::SetKeywords(const CString& value)
00643 {
00644   if (value.IsEmpty())
00645   {
00646     RemoveChunk(PKEY_Keywords.fmtid, PKEY_Keywords.pid);
00647   }
00648   else
00649   {
00650     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00651     pChunk->SetTextValue(PKEY_Keywords, value);
00652     SetChunkValue(pChunk);
00653   }
00654 }
00655
00656 void CDrawDoc::SetLastAuthor(const CString& value)
00657 {
00658   if (value.IsEmpty())
00659   {
00660     RemoveChunk(PKEY_Document_LastAuthor.fmtid, PKEY_Document_LastAuthor.pid);
00661   }
00662   else
00663   {
00664     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00665     pChunk->SetTextValue(PKEY_Document_LastAuthor, value, CHUNK_VALUE, 0, 0, 0, CHUNK_EOP);
00666     SetChunkValue(pChunk);
00667   }
00668 }
00669
00670 void CDrawDoc::SetSearchContents(const CString& value)
00671 {
00672   if (value.IsEmpty())
00673   {
00674     RemoveChunk(PKEY_Search_Contents.fmtid, PKEY_Search_Contents.pid);
00675   }
00676   else
00677   {
00678     CMFCFilterChunkValueImpl *pChunk = new CMFCFilterChunkValueImpl;
00679     pChunk->SetTextValue(PKEY_Search_Contents, value, CHUNK_TEXT);
00680     SetChunkValue(pChunk);
00681   }
00682 }
00683
00684 #endif
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestDoc.cpp Source File

  • vc2008fp
  • RebarTest

RebarTestDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RebarTest.h"
00013
00014 #include "RebarTestDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #endif
00019
00020
00021 // CRebarTestDoc
00022
00023 IMPLEMENT_DYNCREATE(CRebarTestDoc, CDocument)
00024
00025 BEGIN_MESSAGE_MAP(CRebarTestDoc, CDocument)
00026 END_MESSAGE_MAP()
00027
00028
00029 // CRebarTestDoc construction/destruction
00030
00031 CRebarTestDoc::CRebarTestDoc()
00032 {
00033   // TODO: add one-time construction code here
00034
00035 }
00036
00037 CRebarTestDoc::~CRebarTestDoc()
00038 {
00039 }
00040
00041 BOOL CRebarTestDoc::OnNewDocument()
00042 {
00043   if (!CDocument::OnNewDocument())
00044     return FALSE;
00045
00046   // TODO: add reinitialization code here
00047   // (SDI documents will reuse this document)
00048
00049   return TRUE;
00050 }
00051
00052
00053
00054
00055 // CRebarTestDoc serialization
00056
00057 void CRebarTestDoc::Serialize(CArchive& ar)
00058 {
00059   if (ar.IsStoring())
00060   {
00061     // TODO: add storing code here
00062   }
00063   else
00064   {
00065     // TODO: add loading code here
00066   }
00067 }
00068
00069
00070 // CRebarTestDoc diagnostics
00071
00072 #ifdef _DEBUG
00073 void CRebarTestDoc::AssertValid() const
00074 {
00075   CDocument::AssertValid();
00076 }
00077
00078 void CRebarTestDoc::Dump(CDumpContext& dc) const
00079 {
00080   CDocument::Dump(dc);
00081 }
00082 #endif //_DEBUG
00083
00084
00085 // CRebarTestDoc commands
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapesvw.cpp Source File

  • general
  • propdlg

shapesvw.cpp

Go to the documentation of this file.
00001 // shapesvw.cpp : implementation of the CShapesView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014
00015 #include "shapeobj.h"
00016 #include "colorpge.h"
00017 #include "stylepge.h"
00018 #include "preview.h"
00019 #include "propsht.h"
00020 #include "propsht2.h"
00021 #include "shapedoc.h"
00022 #include "shapesvw.h"
00023
00024 #include "minifrm.h"
00025 #include "mainfrm.h"
00026
00027 #ifdef _DEBUG
00028 #undef THIS_FILE
00029 static char BASED_CODE THIS_FILE[] = __FILE__;
00030 #endif
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CShapesView
00034
00035 IMPLEMENT_DYNCREATE(CShapesView, CView)
00036
00037 BEGIN_MESSAGE_MAP(CShapesView, CView)
00038   ON_MESSAGE(WM_USER_CHANGE_OBJECT_PROPERTIES, OnChangeObjectProps)
00039   //{{AFX_MSG_MAP(CShapesView)
00040   ON_WM_LBUTTONDOWN()
00041   ON_COMMAND(ID_SIMPLE_PROPERTY_SHEET, OnSimplePropertySheet)
00042   ON_UPDATE_COMMAND_UI(ID_SIMPLE_PROPERTY_SHEET, OnUpdateSimplePropertySheet)
00043   ON_COMMAND(ID_PROPERTY_SHEET_WITH_PREVIEW, OnPropertySheetWithPreview)
00044   ON_WM_KEYDOWN()
00045   ON_UPDATE_COMMAND_UI(ID_PROPERTY_SHEET_WITH_PREVIEW, OnUpdatePropertySheetWithPreview)
00046   ON_WM_LBUTTONDBLCLK()
00047   //}}AFX_MSG_MAP
00048   // Standard printing commands
00049   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00050   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00051 END_MESSAGE_MAP()
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CShapesView construction/destruction
00055
00056 CShapesView::CShapesView()
00057 {
00058   m_pShapeSelected = NULL;
00059   m_pModalShapePropSheet = NULL;
00060 }
00061
00062 CShapesView::~CShapesView()
00063 {
00064 }
00065
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // Operations
00069
00070 CModelessShapePropSheet* CShapesView::GetModelessShapePropSheet()
00071 {
00072   CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
00073   if (pMainFrame->m_pShapePropFrame == NULL)
00074     return NULL;
00075   return pMainFrame->m_pShapePropFrame->m_pModelessShapePropSheet;
00076 }
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // CShapesView drawing
00080
00081 void CShapesView::OnDraw(CDC* pDC)
00082 {
00083   CShapesDoc* pDoc = GetDocument();
00084   ASSERT_VALID(pDoc);
00085
00086   CRect rectDirty, rectIntersect;
00087   pDC->GetClipBox(&rectDirty);
00088   if (rectDirty.IsRectNull())
00089     GetClientRect(&rectDirty);
00090
00091   CShape* pShape;
00092   POSITION pos = pDoc->m_shapeList.GetTailPosition();
00093   // Draw all of the shapes, except the currently selected shape, from
00094   // back to front.
00095   while (pos != NULL)
00096   {
00097     pShape = pDoc->m_shapeList.GetPrev(pos);
00098     if (rectIntersect.IntersectRect(&pShape->m_rect, &rectDirty) != 0
00099       && pShape != m_pShapeSelected)
00100       pShape->Draw(pDC, FALSE);
00101   }
00102   // Draw the selected shape on top
00103   if (m_pShapeSelected != NULL)
00104     m_pShapeSelected->Draw(pDC, TRUE);
00105 }
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // CShapesView printing
00109
00110 BOOL CShapesView::OnPreparePrinting(CPrintInfo* pInfo)
00111 {
00112   // default preparation
00113   return DoPreparePrinting(pInfo);
00114 }
00115
00116 void CShapesView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00117 {
00118 }
00119
00120 void CShapesView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00121 {
00122 }
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // CShapesView diagnostics
00126
00127 #ifdef _DEBUG
00128 void CShapesView::AssertValid() const
00129 {
00130   CView::AssertValid();
00131 }
00132
00133 void CShapesView::Dump(CDumpContext& dc) const
00134 {
00135   CView::Dump(dc);
00136 }
00137
00138 CShapesDoc* CShapesView::GetDocument() // non-debug version is inline
00139 {
00140   ASSERT_KINDOF(CShapesDoc, m_pDocument);
00141   return (CShapesDoc*)m_pDocument;
00142 }
00143 #endif //_DEBUG
00144
00145 /////////////////////////////////////////////////////////////////////////////
00146 // CShapesView message handlers
00147
00148 void CShapesView::OnLButtonDown(UINT /*nFlags*/, CPoint point)
00149 {
00150   CShapesDoc* pDoc = GetDocument();
00151   CModelessShapePropSheet* pModelessShapePropSheet
00152     = GetModelessShapePropSheet();
00153
00154   CClientDC dc(this);
00155
00156   CShape* pShapeHit;
00157   pShapeHit = pDoc->HitTest(point);
00158   if (pShapeHit != NULL)
00159   {   // Select the object that was clicked.
00160
00161     CRect rectInvalid;
00162     // Invalidate the previously selected object, so it will
00163     // be redrawn as unselected.
00164     if (m_pShapeSelected != NULL)
00165       InvalidateRect(&m_pShapeSelected->m_rect);
00166     m_pShapeSelected = pShapeHit;
00167
00168     // Invalidate the newly selected object, so it will be
00169     // redrawn as selected.
00170     InvalidateRect(&m_pShapeSelected->m_rect);
00171
00172     // If the modeless property is visible, update its
00173     // settings to reflect the newly selected shape.
00174     if (pModelessShapePropSheet != NULL
00175       && pModelessShapePropSheet->IsWindowVisible())
00176     {
00177        pModelessShapePropSheet->
00178          SetSheetPropsFromShape(m_pShapeSelected);
00179     }
00180   }
00181   else
00182   {   // Add a new shape
00183
00184     CRect rect(point.x-50, point.y-50, point.x + 50, point.y + 50);
00185     CShape* pShapeNew = new CShape(
00186       black,
00187       rectangle,
00188       rect);
00189     pDoc->AddShape(pShapeNew);
00190     m_pShapeSelected = pShapeNew;
00191     // If the modeless property sheet exists, then apply its current
00192     // settings to the new shape.
00193     if (pModelessShapePropSheet != NULL)
00194     {
00195        pModelessShapePropSheet->
00196          SetShapePropsFromSheet(m_pShapeSelected);
00197     }
00198   }
00199 }
00200
00201 void CShapesView::OnLButtonDblClk(UINT /*nFlags*/, CPoint /*point*/)
00202 {
00203   // Double-click anywhere brings up modeless property sheet.
00204   CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
00205   pMainFrame->OnMiniFramePropertySheet();
00206 }
00207
00208
00209 void CShapesView::OnSimplePropertySheet()
00210 {
00211   if (m_pShapeSelected == NULL)
00212     return;
00213
00214   CPropertySheet dlgPropertySheet(AFX_IDS_APP_TITLE);
00215   CStylePage stylePage;
00216   CColorPage colorPage;
00217
00218   stylePage.m_nShapeStyle = m_pShapeSelected->m_shapestyle;
00219   colorPage.m_nColor = m_pShapeSelected->m_shapecolor;
00220
00221   dlgPropertySheet.AddPage(&stylePage);
00222   dlgPropertySheet.AddPage(&colorPage);
00223
00224   if (dlgPropertySheet.DoModal() == IDOK)
00225   {
00226     m_pShapeSelected->m_shapecolor = colorPage.m_nColor;
00227     m_pShapeSelected->m_shapestyle
00228       = (SHAPE_STYLE)stylePage.m_nShapeStyle;
00229     GetDocument()->SetModifiedFlag();
00230     GetDocument()->UpdateAllViews(NULL);
00231   }
00232 }
00233
00234 void CShapesView::OnUpdateSimplePropertySheet(CCmdUI* pCmdUI)
00235 {
00236   // Borrow logic from Property Sheet with Preview command.
00237   OnUpdatePropertySheetWithPreview(pCmdUI);
00238 }
00239
00240 void CShapesView::OnPropertySheetWithPreview()
00241 {
00242   if (m_pShapeSelected == NULL)
00243     return;
00244
00245   // Save pointer to the modal property sheet so that when the
00246   // user choose Apply Now and the CModalShapePropSheet sends
00247   // the WM_USER_CHANGE_OBJECT_PROPERTIES message to the view,
00248   // the view can easily refer back to the property sheet
00249   // to get the current settings and apply them to the currently
00250   // selected object.
00251   m_pModalShapePropSheet = new CModalShapePropSheet;
00252
00253   // Cannot use CModalShapePropSheet::SetSheetPropsFromShape here
00254   // because it was designed to be called from the handler of
00255   // the user-defined WM_USER_CHANGE_OBJECT_PROPS message when
00256   // the user chooses Apply Now.  The window for the modal
00257   // property sheet here has not been created yet.  Calling
00258   // SetSheetPropsFromShape would result in a failure in trying
00259   // to update the window.
00260   m_pModalShapePropSheet->m_stylePage.m_nShapeStyle
00261     = m_pShapeSelected->m_shapestyle;
00262   m_pModalShapePropSheet->m_colorPage.m_nColor = m_pShapeSelected->m_shapecolor;
00263
00264   if (m_pModalShapePropSheet->DoModal() == IDOK)
00265   {
00266     m_pModalShapePropSheet->SetShapePropsFromSheet(m_pShapeSelected);
00267     GetDocument()->SetModifiedFlag();
00268     GetDocument()->UpdateAllViews(NULL);
00269   }
00270   delete m_pModalShapePropSheet;
00271   m_pModalShapePropSheet = NULL;
00272 }
00273
00274 void CShapesView::OnUpdatePropertySheetWithPreview(CCmdUI* pCmdUI)
00275 {
00276   BOOL bEnable = TRUE;
00277   if (m_pShapeSelected == NULL)
00278   {
00279     bEnable = FALSE;
00280   }
00281   else
00282   {
00283     CModelessShapePropSheet* pModelessShapePropSheet
00284       = GetModelessShapePropSheet();
00285     if (pModelessShapePropSheet != NULL
00286       && pModelessShapePropSheet->IsWindowVisible())
00287     {
00288       // Don't display modal property sheet if the modeless
00289       // property sheet is already displayed.
00290       bEnable = FALSE;
00291     }
00292   }
00293   pCmdUI->Enable(bEnable);
00294 }
00295
00296 LRESULT CShapesView::OnChangeObjectProps(WPARAM, LPARAM)
00297 {
00298   // The user-defined WM_USER_CHANGE_OBJECT_PROPS message is sent
00299   // by the modal CModalShapePropSheet when the user chooses Apply Now,
00300   // or by the modeless CModelessShapePropSheet when the user
00301   // changes any setting in a property page.
00302
00303   if (m_pShapeSelected == NULL)
00304     return 0;
00305
00306   CModelessShapePropSheet* pModelessShapePropSheet
00307     = GetModelessShapePropSheet();
00308   if (pModelessShapePropSheet != NULL)
00309     pModelessShapePropSheet->SetShapePropsFromSheet(m_pShapeSelected);
00310
00311   if (m_pModalShapePropSheet != NULL)
00312     m_pModalShapePropSheet->SetShapePropsFromSheet(m_pShapeSelected);
00313
00314   GetDocument()->SetModifiedFlag();
00315   GetDocument()->UpdateAllViews(NULL);
00316   return 0;
00317 }
00318
00319 void CShapesView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00320 {
00321   if (nChar == VK_ESCAPE)
00322   {
00323     CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
00324     pMainFrame->HideModelessPropSheet();
00325     return;
00326   }
00327
00328   CView::OnKeyDown(nChar, nRepCnt, nFlags);
00329 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/hello.h Source File

  • general
  • hello

hello.h

Go to the documentation of this file.
00001 // hello.h : Declares the class interfaces for the application.
00002 //         Hello is a simple program which consists of a main window
00003 //         and an "About" dialog which can be invoked by a menu choice.
00004 //         It is intended to serve as a starting-point for new
00005 //         applications.
00006 //
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and related
00012 // electronic documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #ifndef __HELLO_H__
00017 #define __HELLO_H__
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020
00021 // CMainWindow:
00022 // See hello.cpp for the code to the member functions and the message map.
00023 //
00024 class CMainWindow : public CFrameWnd
00025 {
00026 public:
00027   CMainWindow();
00028
00029   //{{AFX_MSG( CMainWindow )
00030   afx_msg void OnPaint();
00031   afx_msg void OnAbout();
00032   //}}AFX_MSG
00033
00034   DECLARE_MESSAGE_MAP()
00035 };
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038
00039 // CTheApp:
00040 // See hello.cpp for the code to the InitInstance member function.
00041 //
00042 class CTheApp : public CWinApp
00043 {
00044 public:
00045   virtual BOOL InitInstance();
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049
00050 #endif // __HELLO_H__
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStatusBarDemoView Member List

This is the complete list of members for CStatusBarDemoView, including all inherited members.
CStatusBarDemoView() | CStatusBarDemoView | [protected]
DoDataExchange(CDataExchange *pDX) | CStatusBarDemoView | [protected, virtual]
GetDocument() | CStatusBarDemoView | [inline]
GetStatusBar() const | CStatusBarDemoView | [inline, protected]
IDD enum value | CStatusBarDemoView |
m_bInAnimation | CStatusBarDemoView | [protected]
m_bInProgress | CStatusBarDemoView | [protected]
m_bmpIcon1 | CStatusBarDemoView | [protected]
m_bmpIcon2 | CStatusBarDemoView | [protected]
m_imlStatusAnimation | CStatusBarDemoView | [protected]
m_nIcon | CStatusBarDemoView |
m_nProgressCurr | CStatusBarDemoView | [protected]
m_wndBackColor | CStatusBarDemoView |
m_wndStartAnimation | CStatusBarDemoView |
m_wndStartProgress | CStatusBarDemoView |
m_wndTextColor | CStatusBarDemoView |
OnBackColor() | CStatusBarDemoView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CStatusBarDemoView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | CStatusBarDemoView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CStatusBarDemoView | [protected, virtual]
OnFilePrintPreview() | CStatusBarDemoView | [protected]
OnIcon() | CStatusBarDemoView | [protected]
OnIndicatorLabel() | CStatusBarDemoView | [protected]
OnInitialUpdate() | CStatusBarDemoView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CStatusBarDemoView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CStatusBarDemoView | [protected, virtual]
OnStartAnimation() | CStatusBarDemoView | [protected]
OnStartProgress() | CStatusBarDemoView | [protected]
OnTextColor() | CStatusBarDemoView | [protected]
OnTimer(UINT_PTR nIDEvent) | CStatusBarDemoView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CStatusBarDemoView | [virtual]
~CStatusBarDemoView() | CStatusBarDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/ConfigDlg.h Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

ConfigDlg.h

Go to the documentation of this file.
00001 // File: ConfigDlg.h
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #pragma once
00011
00012 // CConfigDlg dialog
00013
00014 class CConfigDlg : public CDialog
00015 {
00016   DECLARE_DYNAMIC(CConfigDlg)
00017
00018 public:
00019   CConfigDlg(BOOL bFullScreen, LPCTSTR szPath, CWnd* pParent = NULL);   // standard constructor
00020   virtual ~CConfigDlg();
00021
00022 // Dialog Data
00023   enum { IDD = IDD_CONFIG };
00024
00025 protected:
00026   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00027
00028   DECLARE_MESSAGE_MAP()
00029 public:
00030   CString m_strPath;
00031   int  m_nFullScreen;
00032   void OnBnClickedBrowse(void);
00033 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/StdAfx.h Source File

  • vc2008fp
  • DlgToolTips

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
00047
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StdAfx.h Source File

  • vc2008fp
  • StateCollection

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedViewView.cpp Source File

  • vc2008fp
  • TabbedView

TabbedViewView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013
00014 #include "TabbedViewDoc.h"
00015 #include "TabbedViewView.h"
00016
00017 #include "View1.h"
00018 #include "View2.h"
00019 #include "View3.h"
00020 #include "View4.h"
00021
00022 #ifdef _DEBUG
00023 #define new DEBUG_NEW
00024 #undef THIS_FILE
00025 static char THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CTabbedViewView
00030
00031 IMPLEMENT_DYNCREATE(CTabbedViewView, CTabView)
00032
00033 BEGIN_MESSAGE_MAP(CTabbedViewView, CTabView)
00034   ON_WM_CREATE()
00035   ON_WM_ERASEBKGND()
00036   ON_WM_CONTEXTMENU()
00037   // Standard printing commands
00038   ON_COMMAND(ID_FILE_PRINT, CTabView::OnFilePrint)
00039   ON_COMMAND(ID_FILE_PRINT_DIRECT, CTabView::OnFilePrint)
00040   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CTabbedViewView construction/destruction
00045
00046 CTabbedViewView::CTabbedViewView()
00047 {
00048 }
00049
00050 CTabbedViewView::~CTabbedViewView()
00051 {
00052 }
00053
00054 BOOL CTabbedViewView::PreCreateWindow(CREATESTRUCT& cs)
00055 {
00056   // TODO: Modify the Window class or styles here by modifying
00057   //  the CREATESTRUCT cs
00058
00059   return CTabView::PreCreateWindow(cs);
00060 }
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CTabbedViewView drawing
00064
00065 void CTabbedViewView::OnDraw(CDC* /*pDC*/)
00066 {
00067 //  CTabbedViewDoc* pDoc = GetDocument();
00068 //  ASSERT_VALID(pDoc);
00069   // TODO: add draw code for native data here
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CTabbedViewView printing
00074
00075 void CTabbedViewView::OnFilePrintPreview()
00076 {
00077   AFXPrintPreview (this);
00078 }
00079
00080 BOOL CTabbedViewView::OnPreparePrinting(CPrintInfo* pInfo)
00081 {
00082   // default preparation
00083   return DoPreparePrinting(pInfo);
00084 }
00085
00086 void CTabbedViewView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00087 {
00088   // TODO: add extra initialization before printing
00089 }
00090
00091 void CTabbedViewView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00092 {
00093   // TODO: add cleanup after printing
00094 }
00095
00096 /////////////////////////////////////////////////////////////////////////////
00097 // CTabbedViewView diagnostics
00098
00099 #ifdef _DEBUG
00100 void CTabbedViewView::AssertValid() const
00101 {
00102   CTabView::AssertValid();
00103 }
00104
00105 void CTabbedViewView::Dump(CDumpContext& dc) const
00106 {
00107   CTabView::Dump(dc);
00108 }
00109
00110 CTabbedViewDoc* CTabbedViewView::GetDocument() // non-debug version is inline
00111 {
00112   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabbedViewDoc)));
00113   return (CTabbedViewDoc*)m_pDocument;
00114 }
00115 #endif //_DEBUG
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CTabbedViewView message handlers
00119
00120 void CTabbedViewView::OnContextMenu(CWnd*, CPoint point)
00121 {
00122   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00123 }
00124
00125 int CTabbedViewView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00126 {
00127   if (CTabView::OnCreate(lpCreateStruct) == -1)
00128     return -1;
00129
00130   AddView (RUNTIME_CLASS (CView1), _T("Simple"), 100);
00131   AddView (RUNTIME_CLASS (CView2), _T("List"), 101);
00132   AddView (RUNTIME_CLASS (CView3), _T("Form"), 102);
00133   AddView (RUNTIME_CLASS (CView4), _T("ScrollView"), 102);
00134
00135   return 0;
00136 }
00137
00138 BOOL CTabbedViewView::OnEraseBkgnd(CDC* /*pDC*/)
00139 {
00140   return TRUE;
00141 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/mainview.cpp Source File

  • ole
  • oclient

mainview.cpp

Go to the documentation of this file.
00001 // mainview.cpp : implementation of the CMainView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "oclient.h"
00015
00016 #include "maindoc.h"
00017 #include "mainview.h"
00018 #include "rectitem.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainView
00027
00028 CBrush NEAR CMainView::m_brHatch;
00029 CLIPFORMAT CMainView::m_cfObjectDescriptor=NULL;
00030
00031 IMPLEMENT_DYNCREATE(CMainView, CScrollView)
00032
00033 BEGIN_MESSAGE_MAP(CMainView, CScrollView)
00034   //{{AFX_MSG_MAP(CMainView)
00035   ON_COMMAND(ID_EDIT_PASTE, OnPaste)
00036   ON_COMMAND(ID_EDIT_PASTE_LINK, OnPasteLink)
00037   ON_COMMAND(ID_OLE_INSERT_NEW, OnInsertObject)
00038   ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR, OnUpdateEditMenu)
00039   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00040   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00041   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00042   ON_WM_LBUTTONDBLCLK()
00043   ON_WM_LBUTTONDOWN()
00044   ON_WM_SETCURSOR()
00045   ON_WM_RBUTTONDOWN()
00046   ON_WM_CHAR()
00047   ON_WM_SETFOCUS()
00048   ON_WM_CREATE()
00049   ON_WM_SIZE()
00050   ON_COMMAND(ID_OBJECT_DISPLAYCONTENT, OnObjectDisplayContent)
00051   ON_UPDATE_COMMAND_UI(ID_OBJECT_DISPLAYCONTENT, OnUpdateObjectDisplayContent)
00052   ON_COMMAND(ID_OBJECT_DISPLAYASICON, OnObjectDisplayAsIcon)
00053   ON_UPDATE_COMMAND_UI(ID_OBJECT_DISPLAYASICON, OnUpdateObjectDisplayAsIcon)
00054   ON_COMMAND(ID_EDIT_PASTE_SPECIAL, OnPasteSpecial)
00055   ON_UPDATE_COMMAND_UI(ID_EDIT_CLONE, OnUpdateEditClone)
00056   ON_COMMAND(ID_EDIT_CLONE, OnEditClone)
00057   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE_SPECIAL, OnUpdateEditPaste)
00058   ON_COMMAND(ID_OBJECT_RESETSIZE, OnObjectResetsize)
00059   ON_COMMAND(ID_CANCEL_INPLACE, OnCancelInplace)
00060   ON_WM_DESTROY()
00061   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste)
00062   ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditMenu)
00063   ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditMenu)
00064   ON_UPDATE_COMMAND_UI(ID_OBJECT_RESETSIZE, OnUpdateEditMenu)
00065   ON_COMMAND(ID_OLE_CHANGE_SOURCE, OnOleChangeSource)
00066   ON_UPDATE_COMMAND_UI(ID_OLE_CHANGE_SOURCE, OnUpdateOleChangeSource)
00067   ON_COMMAND(ID_OLE_EDIT_PROPERTIES, OnOleEditProperties)
00068   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_PROPERTIES, OnUpdateOleEditProperties)
00069   //}}AFX_MSG_MAP
00070   // Standard printing commands
00071   ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
00072   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
00073 END_MESSAGE_MAP()
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CMainView construction/destruction
00077
00078 CMainView::CMainView()
00079 {
00080   if (m_brHatch.m_hObject == NULL)
00081     m_brHatch.CreateHatchBrush(HS_DIAGCROSS, RGB(0,0,0));
00082   if (m_cfObjectDescriptor == NULL)
00083     m_cfObjectDescriptor =
00084       (CLIPFORMAT)::RegisterClipboardFormat(_T("Object Descriptor"));
00085
00086   m_pSelection = NULL;
00087   m_prevDropEffect = DROPEFFECT_NONE;
00088   m_bInDrag = FALSE;
00089 }
00090
00091 CMainView::~CMainView()
00092 {
00093 }
00094
00095 void CMainView::OnInitialUpdate()
00096 {
00097   CScrollView::OnInitialUpdate();
00098
00099   // We can't pass MM_ANISOTROPIC to SetScrollSizes so we have to convert to MM_TEXT
00100   CSize size = GetDocument()->GetDocumentSize();
00101   CClientDC dc(NULL);
00102   size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
00103   size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
00104   SetScrollSizes(MM_TEXT, size);
00105 }
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // CMainView drawing
00109
00110 void CMainView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
00111 {
00112   CScrollView::OnPrepareDC(pDC, pInfo);
00113   // set up a reasonable default context
00114   pDC->SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
00115   pDC->SetBkColor(::GetSysColor(COLOR_WINDOW));
00116
00117   // LOENGLISH units are based on physical inches
00118   // We want logical inches so we have to do it differently
00119   pDC->SetMapMode(MM_ANISOTROPIC);
00120   pDC->SetViewportExt(
00121     pDC->GetDeviceCaps(LOGPIXELSX), pDC->GetDeviceCaps(LOGPIXELSY));
00122   pDC->SetWindowExt(100,-100);
00123 }
00124
00125 void CMainView::SetupTracker(CRectTracker* pTracker, CRectItem* pItem,
00126   CRect* pTrueRect)
00127 {
00128   ENSURE(pTracker != NULL);
00129   ENSURE(pItem != NULL);
00130
00131   pTracker->m_rect = pItem->GetRect();
00132   DocToClient(pTracker->m_rect);
00133
00134   // set minimum size for our OLE items
00135   pTracker->m_sizeMin.cx = 8;
00136   pTracker->m_sizeMin.cy = 8;
00137
00138   pTracker->m_nStyle = 0;
00139
00140   // setup resize handles if item is selected
00141   if (pItem == m_pSelection)
00142     pTracker->m_nStyle |= CRectTracker::resizeInside;
00143
00144   // put correct border depending on item type
00145   if (pItem->GetType() == OT_LINK)
00146     pTracker->m_nStyle |= CRectTracker::dottedLine;
00147   else
00148     pTracker->m_nStyle |= CRectTracker::solidLine;
00149
00150   // put hatching over the item if it is currently open
00151   if (pItem->GetItemState() == COleClientItem::openState ||
00152     pItem->GetItemState() == COleClientItem::activeUIState)
00153   {
00154     pTracker->m_nStyle |= CRectTracker::hatchInside;
00155   }
00156
00157   if (pTrueRect != NULL)
00158     pTracker->GetTrueRect(pTrueRect);
00159 }
00160
00161 void CMainView::OnDraw(CDC* pDC)
00162 {
00163   CMainDoc* pDoc = GetDocument();
00164
00165   ASSERT_VALID(pDC);
00166
00167   if (!pDC->IsPrinting())
00168   {
00169     m_brHatch.UnrealizeObject();
00170     CPoint point(0, 0);
00171     pDC->LPtoDP(&point);
00172     pDC->SetBrushOrg(point.x % 8, point.y % 8);
00173
00174     CRect rcClip;
00175     GetClientRect(&rcClip);
00176     ClientToDoc(rcClip);
00177     CSize docSize = pDoc->GetDocumentSize();
00178     if (rcClip.right > docSize.cx)
00179     {
00180       CRect rcFill(rcClip);
00181       rcFill.left = max(rcFill.left,docSize.cx);
00182       pDC->FillRect(rcFill,&m_brHatch);
00183     }
00184     if (rcClip.bottom < -docSize.cy)
00185     {
00186       CRect rcFill(rcClip);
00187       rcFill.top = min(rcFill.top, -docSize.cy);
00188       pDC->FillRect(rcFill,&m_brHatch);
00189     }
00190   }
00191
00192   // Draw all the CRectItems
00193   POSITION pos = pDoc->GetStartPosition();
00194   while (pos != NULL)
00195   {
00196     CRectItem* pItem = DYNAMIC_DOWNCAST(CRectItem, pDoc->GetNextItem(pos));
00197     if (pItem != NULL)
00198     {
00199       pItem->Draw(pDC, pItem->GetRect());
00200
00201       if (!pDC->IsPrinting())
00202       {
00203         // draw the tracker
00204         CRectTracker tracker;
00205         CRect rectTrue;
00206         SetupTracker(&tracker, pItem, &rectTrue);
00207         ClientToDoc(rectTrue);
00208         if (pDC->RectVisible(&rectTrue))
00209           tracker.Draw(pDC);
00210       }
00211     }
00212   }
00213 }
00214
00215 // pHint is the deleted item or NULL if deselect/delete all
00216 void CMainView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
00217 {
00218   if (pHint == NULL && lHint == 0)
00219   {
00220     // some sort of clear all
00221     m_pSelection = NULL;
00222   }
00223
00224   if (pHint != NULL && pHint->IsKindOf(RUNTIME_CLASS(CRectItem)))
00225   {
00226     // just invalidate the one item
00227     InvalidateItem((CRectItem*)pHint);
00228
00229     // clear selection if pointing to deleted item
00230     if (lHint == 1 && pHint == m_pSelection)
00231     {
00232       // specific case of pHint being deleted
00233       m_pSelection = NULL;
00234     }
00235   }
00236   else if (lHint != 0)
00237   {
00238     // invalidate arbitrary rectangle
00239     InvalidateRect((CRect*)lHint);
00240   }
00241   else
00242   {
00243     // complete update
00244     CScrollView::OnUpdate(pSender, lHint, pHint);
00245   }
00246 }
00247
00248 void CMainView::InvalidateItem(CRectItem* pItem)
00249 {
00250   if (m_nMapMode != 0)
00251   {
00252     CRectTracker tracker;
00253     CRect rect;
00254     SetupTracker(&tracker, pItem, &rect);
00255     InvalidateRect(&rect);
00256   }
00257 }
00258
00259 BOOL CMainView::OnScrollBy(CSize sizeScroll, BOOL bDoScroll)
00260 {
00261   // remove drag/drop feedback before scrolling
00262   if (bDoScroll && m_prevDropEffect != DROPEFFECT_NONE)
00263   {
00264     CClientDC dc(this);
00265     dc.DrawFocusRect(CRect(m_dragPoint, m_dragSize));
00266       // erase previous focus rect
00267     m_prevDropEffect = DROPEFFECT_NONE;
00268   }
00269
00270   // do the scroll
00271   if (!CScrollView::OnScrollBy(sizeScroll, bDoScroll))
00272     return FALSE;
00273
00274   // update the position of any in-place active item
00275   if (bDoScroll)
00276   {
00277     UpdateActiveItem();
00278     UpdateWindow();
00279   }
00280
00281   return TRUE;
00282 }
00283
00284 /////////////////////////////////////////////////////////////////////////////
00285 // CMainView printing
00286
00287 BOOL CMainView::OnPreparePrinting(CPrintInfo* pInfo)
00288 {
00289   // default preparation
00290   return DoPreparePrinting(pInfo);
00291 }
00292
00293 /////////////////////////////////////////////////////////////////////////////
00294 // Selection support
00295
00296 BOOL CMainView::IsSelected(const CObject* pDocItem) const
00297 {
00298   return (pDocItem == m_pSelection);
00299 }
00300
00301 void CMainView::SetSelection(CRectItem* pNewSel, BOOL bSafeSelect)
00302 {
00303   if (pNewSel != NULL && pNewSel == m_pSelection)
00304     return;
00305
00306   // deactivate any in-place active item on this view!
00307   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00308   if (pActiveItem != NULL && pNewSel != pActiveItem)
00309   {
00310     if (bSafeSelect)
00311       return;
00312     // if we found one, deactivate it
00313     pActiveItem->Close();
00314     ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00315   }
00316   if (m_pSelection != NULL) // invalidate the old item
00317     InvalidateItem(m_pSelection);
00318   if ((m_pSelection = pNewSel) != NULL) // invalidate the new item
00319     InvalidateItem(m_pSelection);
00320 }
00321
00322 /////////////////////////////////////////////////////////////////////////////
00323 // CMainView diagnostics
00324
00325 #ifdef _DEBUG
00326 void CMainView::AssertValid() const
00327 {
00328   CScrollView::AssertValid();
00329 }
00330
00331 void CMainView::Dump(CDumpContext& dc) const
00332 {
00333   CScrollView::Dump(dc);
00334 }
00335
00336 #endif //_DEBUG
00337
00338 /////////////////////////////////////////////////////////////////////////////
00339 // Main 'Edit' menu commands
00340
00341 void CMainView::OnUpdateEditMenu(CCmdUI* pCmdUI)
00342 {
00343   // most Edit menu commands are enabled only if we have a selection
00344   //  and there are no in-place activations for this view
00345   pCmdUI->Enable(m_pSelection != NULL &&
00346     GetDocument()->GetInPlaceActiveItem(this) == NULL);
00347 }
00348
00349 void CMainView::OnEditCut()
00350 {
00351   ENSURE(m_pSelection != NULL);
00352   TRY
00353   {
00354     m_pSelection->CopyToClipboard(TRUE);
00355     OnEditClear();
00356   }
00357   CATCH_ALL(e)
00358   {
00359     AfxMessageBox(IDP_CLIPBOARD_CUT_FAILED);
00360   }
00361   END_CATCH_ALL
00362 }
00363
00364 void CMainView::OnEditCopy()
00365 {
00366   ENSURE(m_pSelection != NULL);
00367   TRY
00368   {
00369     m_pSelection->CopyToClipboard(TRUE);
00370   }
00371   CATCH_ALL(e)
00372   {
00373     AfxMessageBox(IDP_CLIPBOARD_COPY_FAILED);
00374   }
00375   END_CATCH_ALL
00376 }
00377
00378 void CMainView::OnEditClear()
00379 {
00380   if (m_pSelection != NULL)
00381     GetDocument()->DeleteItem(m_pSelection);
00382 }
00383
00384 void CMainView::OnPaste()
00385 {
00386   if (DoPasteItem(FALSE, NULL, NULL) == NULL)
00387     AfxMessageBox(IDP_GET_FROM_CLIPBOARD_FAILED);
00388 }
00389
00390 void CMainView::OnPasteLink()
00391 {
00392   if (DoPasteItem(TRUE, NULL, NULL) == NULL)
00393     AfxMessageBox(IDP_GET_FROM_CLIPBOARD_FAILED);
00394 }
00395
00396 void CMainView::DoPasteNative(
00397   COleDataObject* pDataObject, CPoint* pPoint, CRectItem* pItem)
00398 {
00399   // get file refering to clipboard data
00400   CFile* pFile = pDataObject->GetFileData(CMainDoc::m_cfPrivate);
00401   if (pFile == NULL)
00402     {
00403     // if the file failed to open, throw an exception
00404     // to force cleanup in DoPasteItem.  the exact
00405     // type of exception thrown here is unimportant...
00406
00407     AfxThrowFileException(CFileException::genericException);
00408     }
00409
00410   CArchive ar(pFile, CArchive::load);
00411   TRY
00412   {
00413     // connect the file to an archive and read the data
00414     ar.m_pDocument = GetDocument(); // for COleClientItem serialize
00415     pItem->Serialize(ar);
00416   }
00417   CATCH_ALL(e)
00418   {
00419     ar.Close();
00420     delete pFile;
00421     THROW_LAST();
00422   }
00423   END_CATCH_ALL
00424
00425   ar.Close();
00426   delete pFile;
00427
00428   // adjust position to that specified by point
00429   if (pPoint != NULL)
00430     pItem->m_ptPos = *pPoint;
00431 }
00432
00433 void CMainView::DoPasteStandard(BOOL bLink, COleDataObject* pDataObject,
00434   CPoint* pPoint, CRectItem* pItem, CLIPFORMAT cfFormat)
00435 {
00436   if (bLink)      // paste link
00437   {
00438     if (!pItem->CreateLinkFromData(pDataObject))
00439       AfxThrowMemoryException();  // any exception will do
00440   }
00441   // paste embedded
00442   else if (!pItem->CreateFromData(pDataObject) &&
00443     !pItem->CreateStaticFromData(pDataObject, OLERENDER_DRAW, cfFormat))
00444   {
00445     AfxThrowMemoryException();      // any exception will do
00446   }
00447
00448   // copy the current iconic representation
00449   FORMATETC fmtetc;
00450   fmtetc.cfFormat = CF_METAFILEPICT;
00451   fmtetc.dwAspect = DVASPECT_ICON;
00452   fmtetc.ptd = NULL;
00453   fmtetc.tymed = TYMED_MFPICT;
00454   fmtetc.lindex = 1;
00455   HGLOBAL hObj = pDataObject->GetGlobalData(CF_METAFILEPICT, &fmtetc);
00456   if (hObj != NULL)
00457   {
00458     pItem->SetIconicMetafile(hObj);
00459     // the following code is an easy way to free a metafile pict
00460     STGMEDIUM stgMed;
00461     memset(&stgMed, 0, sizeof(stgMed));
00462     stgMed.tymed = TYMED_MFPICT;
00463     stgMed.hGlobal = hObj;
00464     ReleaseStgMedium(&stgMed);
00465   }
00466
00467   // set the current drawing aspect
00468   hObj = pDataObject->GetGlobalData(m_cfObjectDescriptor);
00469   if (hObj != NULL)
00470   {
00471     ASSERT(hObj != NULL);
00472     // got CF_OBJECTDESCRIPTOR ok.  Lock it down and extract size.
00473     LPOBJECTDESCRIPTOR pObjDesc = (LPOBJECTDESCRIPTOR)GlobalLock(hObj);
00474     ENSURE(pObjDesc != NULL);
00475     pItem->SetDrawAspect((DVASPECT)pObjDesc->dwDrawAspect);
00476     GlobalUnlock(hObj);
00477     GlobalFree(hObj);
00478   }
00479
00480   // set top-left based on point of drop
00481   if (pPoint != NULL)
00482     pItem->m_ptPos = *pPoint;
00483
00484   // get size from drag/drop operation
00485   CSize size;
00486   if (GetObjectInfo(pDataObject, &size, NULL) && size.cx != 0 && size.cy != 0)
00487   {
00488     // use size obtained from object instead of default
00489     size.cx = MulDiv(size.cx, 10, 254);
00490     size.cy = -MulDiv(size.cy, 10, 254);
00491     pItem->SetSize(size);
00492     CSize sizeExtent;
00493     pItem->GetCachedExtent(&sizeExtent);
00494     pItem->SetBaseSize(sizeExtent);
00495   }
00496   else
00497   {
00498     // no extent from CF_OBJECTDESCRIPTOR, use extent from object
00499     pItem->UpdateExtent();
00500   }
00501 }
00502
00503
00504 // Helper for paste/pastelink
00505 //
00506 //                  bLink       pDataObject     pPoint              cfFormat
00507 //  EditPaste       FALSE       NULL(clipboard) NULL(default)       0
00508 //  Drag/Drop       TRUE/FALSE  X               X                   0
00509 //  PasteLink       TRUE        NULL(clipboard) NULL(default)       0
00510 //  PasteSpecial    TRUE/FALSE  X               NULL(default)       X
00511 CRectItem* CMainView::DoPasteItem(BOOL bLink, COleDataObject* pDataObject,
00512   CPoint* pPoint, CLIPFORMAT cfFormat)
00513 {
00514   BeginWaitCursor();
00515
00516   CRectItem* pItem = GetDocument()->CreateItem();
00517   ASSERT_VALID(pItem);
00518   BOOL bAllowAdjust = (pPoint == NULL) ? TRUE : FALSE;
00519
00520   // use clipboard data if not doing drag/drop
00521   COleDataObject clipboardData;
00522   if (pDataObject == NULL)
00523   {
00524     clipboardData.AttachClipboard();
00525     pDataObject = &clipboardData;
00526   }
00527
00528   TRY
00529   {
00530     if (cfFormat == CMainDoc::m_cfPrivate)
00531     {
00532       // if format specified (i.e. PasteSpecial) then use that one
00533       DoPasteNative(pDataObject, pPoint, pItem);
00534     }
00535     else if (!bLink && cfFormat == 0 &&
00536       pDataObject->IsDataAvailable(CMainDoc::m_cfPrivate))
00537     {
00538       // if we're not pasting a link, cfFormat was unspecified,
00539       // and private format is available use it
00540       DoPasteNative(pDataObject, pPoint, pItem);
00541     }
00542     // otherwise perform a standard paste
00543     else if (bAllowAdjust)
00544     {
00545       CPoint ptDef(10, -10);
00546       DoPasteStandard(bLink, pDataObject, &ptDef, pItem, cfFormat);
00547     }
00548     else
00549     {
00550       DoPasteStandard(bLink, pDataObject, pPoint, pItem, cfFormat);
00551     }
00552
00553     if (bAllowAdjust)
00554     {
00555       // allow document to adjust position of item so that it doesn't
00556       // lay directly over an item of the same size
00557       // this only occurs if the drop point is not specified
00558       GetDocument()->AdjustItemPosition(pItem);
00559     }
00560   }
00561   CATCH_ALL(e)
00562   {
00563     // general cleanup
00564     TRACE0("failed to embed/link an OLE object\n");
00565     pItem->Delete();
00566     pItem = NULL;
00567   }
00568   END_CATCH_ALL
00569
00570   // set the selection with bSafeSelect = TRUE
00571   SetSelection(pItem, TRUE);
00572
00573   // update the document and views
00574   GetDocument()->SetModifiedFlag();
00575   GetDocument()->UpdateAllViews(NULL, 0, pItem);      // including this view
00576
00577   EndWaitCursor();
00578
00579   return pItem;
00580 }
00581
00582 /////////////////////////////////////////////////////////////////////////////
00583 // Insert New Object and Activate Object
00584
00585 void CMainView::OnInsertObject()
00586 {
00587   COleInsertDialog dlg;
00588   if (dlg.DoModal() != IDOK)
00589     return;
00590
00591   BeginWaitCursor();
00592
00593   CRectItem* pItem = NULL;
00594   TRY
00595   {
00596     // create item from dialog results
00597     pItem = GetDocument()->CreateItem();
00598     if (!dlg.CreateItem(pItem))
00599       AfxThrowMemoryException();  // any exception will do
00600
00601     // try to get initial presentation data
00602     pItem->UpdateLink();
00603     pItem->UpdateExtent();
00604
00605     // if insert new object -- initially show the object
00606     if (dlg.GetSelectionType() == COleInsertDialog::createNewItem)
00607       pItem->DoVerb(OLEIVERB_SHOW, this);
00608
00609     SetSelection(pItem);
00610   }
00611   CATCH_ALL(e)
00612   {
00613     // cleanup item, if allocated
00614     if (pItem != NULL)
00615       GetDocument()->DeleteItem(pItem);
00616
00617     AfxMessageBox(IDP_FAILED_TO_CREATE);
00618   }
00619   END_CATCH_ALL
00620
00621   EndWaitCursor();
00622 }
00623
00624 void CMainView::OnLButtonDblClk(UINT, CPoint)
00625 {
00626   // Double click will activate the main verb
00627   if (m_pSelection != NULL)
00628   {
00629     BeginWaitCursor();
00630     LONG iVerb = OLEIVERB_PRIMARY;
00631     if (GetKeyState(VK_CONTROL) < 0)
00632       iVerb = OLEIVERB_OPEN;
00633     m_pSelection->DoVerb(iVerb, this);
00634     EndWaitCursor();
00635   }
00636 }
00637
00638 /////////////////////////////////////////////////////////////////////////////
00639 // Hit detection, moving and resizing items
00640
00641 CRectItem* CMainView::GetHitItem(CPoint point)
00642 {
00643   CMainDoc* pDoc = GetDocument();
00644   CRectItem* pItemHit = NULL;
00645
00646   // Find the item hit by the mouse
00647   POSITION pos = pDoc->GetStartPosition();
00648   while (pos != NULL)
00649   {
00650     CRectItem* pItem = DYNAMIC_DOWNCAST(CRectItem, pDoc->GetNextItem(pos));
00651     if (pItem != NULL)
00652     {
00653       CRectTracker tracker;
00654       SetupTracker(&tracker, pItem);
00655       if (tracker.HitTest(point) >= 0)
00656       {
00657         pItemHit = pItem;
00658         // items later in the list are drawn on top - so keep looking
00659       }
00660     }
00661   }
00662   return pItemHit;
00663 }
00664
00665 void CMainView::DocToClient(CRect& rect)
00666 {
00667   CClientDC dc(this);
00668   OnPrepareDC(&dc);
00669   dc.LPtoDP(&rect); // convert logical rect to device rect
00670   rect.NormalizeRect();
00671 }
00672
00673 void CMainView::ClientToDoc(CRect& rect)
00674 {
00675   CClientDC dc(this);
00676   OnPrepareDC(&dc);
00677   dc.DPtoLP(&rect); // convert device rect to logical rect
00678 }
00679
00680 void CMainView::DocToClient(CSize& size)
00681 {
00682   CClientDC dc(this);
00683   OnPrepareDC(&dc);
00684   dc.LPtoDP(&size); // convert logical size to device size
00685   size.cx = abs(size.cx);
00686   size.cy = abs(size.cy);
00687 }
00688
00689 void CMainView::ClientToDoc(CSize& size)
00690 {
00691   CClientDC dc(this);
00692   OnPrepareDC(&dc);
00693   dc.DPtoLP(&size); // convert device rect to logical rect
00694   size.cx = abs(size.cx);
00695   size.cy = abs(size.cy);
00696 }
00697
00698 void CMainView::DocToClient(CPoint& point)
00699 {
00700   CClientDC dc(this);
00701   OnPrepareDC(&dc);
00702   dc.LPtoDP(&point); // convert logical point to device point
00703 }
00704
00705 void CMainView::ClientToDoc(CPoint& point)
00706 {
00707   CClientDC dc(this);
00708   OnPrepareDC(&dc);
00709   dc.DPtoLP(&point); // convert device point to logical point
00710 }
00711
00712 void CMainView::OnLButtonDown(UINT /*nFlags*/, CPoint point)
00713 {
00714   CRectItem* pItemHit = GetHitItem(point);
00715   SetSelection(pItemHit);
00716   if (pItemHit == NULL)
00717     return;
00718
00719   CRect rectLimit;
00720   GetClientRect(rectLimit);
00721
00722   CRectTracker tracker;
00723   SetupTracker(&tracker, pItemHit);
00724
00725   UpdateWindow(); // update before entering the tracker
00726   if (tracker.HitTest(point) == CRectTracker::hitMiddle) // moving, not sizing
00727   {
00728     // determine mouse position offset from the item itself
00729     CRect rect = pItemHit->GetRect();
00730     DocToClient(rect);
00731     CPoint ptOffset(point.x - rect.left, point.y - rect.top);
00732
00733     // determine sensitivity rectangle (determines when drag starts)
00734     CRect rectDrag(rect.left, rect.top, rect.left+1, rect.top+1);
00735
00736     // execute the drag/drop operation
00737     m_bInDrag = TRUE;
00738     ClientToScreen(&rect);  // must be in screen co-ordinates
00739     ClientToScreen(&rectDrag);
00740     DROPEFFECT dropEffect = pItemHit->DoDragDrop(rect, ptOffset,
00741       TRUE, DROPEFFECT_COPY|DROPEFFECT_MOVE, &rectDrag);
00742     if (m_bInDrag == FALSE) // move in same window
00743       return;
00744     m_bInDrag = FALSE;
00745
00746     if (dropEffect == DROPEFFECT_MOVE)
00747     {
00748       // the item was moved (essentially a copy w/delete)
00749       pItemHit->Invalidate();
00750       if (m_pSelection == pItemHit)
00751         m_pSelection = NULL;
00752       GetDocument()->DeleteItem(pItemHit);
00753     }
00754   }
00755   else if (tracker.Track(this, point))
00756   {
00757     ClientToDoc(tracker.m_rect);
00758     pItemHit->Move(tracker.m_rect);
00759     GetDocument()->SetModifiedFlag();
00760   }
00761 }
00762
00763 BOOL CMainView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00764 {
00765   if (pWnd == this && m_pSelection != NULL)
00766   {
00767     // give the tracker for the selection a chance
00768     CRectTracker tracker;
00769     SetupTracker(&tracker, m_pSelection);
00770     if (tracker.SetCursor(this, nHitTest))
00771       return TRUE;
00772   }
00773   return CScrollView::OnSetCursor(pWnd, nHitTest, message);
00774 }
00775
00776 /////////////////////////////////////////////////////////////////////////////
00777 // Right mouse for popup context sensitive menu
00778
00779 void CMainView::OnRButtonDown(UINT, CPoint point)
00780 {
00781   // make sure window is active
00782   GetParentFrame()->ActivateFrame();
00783
00784   SetSelection(GetHitItem(point));    // reselect item if appropriate
00785   UpdateWindow();
00786
00787   if (m_pSelection != NULL)
00788   {
00789     CMenu bar;
00790     if (bar.LoadMenu(ID_OBJECT_POPUP_MENU))
00791     {
00792       CMenu& popup = *bar.GetSubMenu(0);
00793       ASSERT(popup.m_hMenu != NULL);
00794
00795       ClientToScreen(&point);
00796       popup.TrackPopupMenu(TPM_RIGHTBUTTON,
00797         point.x, point.y,
00798         AfxGetMainWnd()); // route commands through main window
00799     }
00800   }
00801 }
00802
00803 void CMainView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
00804 {
00805   MessageBeep(0);     // to test for proper focus transfer
00806
00807   CScrollView::OnChar(nChar, nRepCnt, nFlags);
00808 }
00809
00810 void CMainView::OnSetFocus(CWnd* pOldWnd)
00811 {
00812   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00813   if (pActiveItem != NULL &&
00814     pActiveItem->GetItemState() == COleClientItem::activeUIState)
00815   {
00816     // need to set focus to this item if it is in the same view
00817     CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00818     if (pWnd != NULL)
00819     {
00820       pWnd->SetFocus();
00821       return;
00822     }
00823   }
00824
00825   CScrollView::OnSetFocus(pOldWnd);
00826 }
00827
00828 void CMainView::OnSize(UINT nType, int cx, int cy)
00829 {
00830   CScrollView::OnSize(nType, cx, cy);
00831
00832   UpdateActiveItem();
00833 }
00834
00835 /////////////////////////////////////////////////////////////////////////////
00836 // support for drag/drop
00837
00838 int CMainView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00839 {
00840   if (CScrollView::OnCreate(lpCreateStruct) == -1)
00841     return -1;
00842
00843   // register drop target
00844   m_dropTarget.Register(this);
00845
00846   return 0;
00847 }
00848
00849 BOOL CMainView::OnDrop(COleDataObject* pDataObject,
00850   DROPEFFECT dropEffect, CPoint point)
00851 {
00852   ASSERT_VALID(this);
00853
00854   // clean up focus rect
00855   OnDragLeave();
00856
00857   // offset point as appropriate for dragging
00858   GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
00859   CClientDC dc(NULL);
00860   dc.HIMETRICtoDP(&m_dragSize);
00861   dc.HIMETRICtoDP(&m_dragOffset);
00862   point -= m_dragOffset;
00863
00864   // if move within the view
00865   ClientToDoc(point);
00866   if ((dropEffect & DROPEFFECT_MOVE) && m_bInDrag)
00867   {
00868     ASSERT(m_pSelection != NULL);
00869     m_bInDrag = FALSE; // signal drag code that a move happened
00870     // set top-left based on point of drop
00871     CRect rect = m_pSelection->GetRect();
00872     if (rect.TopLeft() != point) // if moved
00873     {
00874       CRect cr(point,rect.Size());
00875       m_pSelection->Move(cr);
00876       GetDocument()->SetModifiedFlag();
00877     }
00878   }
00879   // check and paste link
00880   else if ((dropEffect & DROPEFFECT_LINK) && DoPasteItem(TRUE, pDataObject, &point))
00881     return TRUE;
00882
00883   // paste embedding/static
00884   else if (DoPasteItem(FALSE, pDataObject, &point))
00885     return TRUE;
00886
00887   return FALSE;
00888 }
00889
00890 BOOL CMainView::GetObjectInfo(COleDataObject* pDataObject,
00891   CSize* pSize, CSize* pOffset)
00892 {
00893   ENSURE(pSize != NULL);
00894
00895   // get object descriptor data
00896   HGLOBAL hObjDesc = pDataObject->GetGlobalData(m_cfObjectDescriptor);
00897   if (hObjDesc == NULL)
00898   {
00899     if (pOffset != NULL)
00900       *pOffset = CSize(0, 0); // fill in defaults instead
00901     *pSize = CSize(0, 0);
00902     return FALSE;
00903   }
00904   ASSERT(hObjDesc != NULL);
00905
00906   // otherwise, got CF_OBJECTDESCRIPTOR ok.  Lock it down and extract size.
00907   LPOBJECTDESCRIPTOR pObjDesc = (LPOBJECTDESCRIPTOR)GlobalLock(hObjDesc);
00908   ENSURE(pObjDesc != NULL);
00909   pSize->cx = (int)pObjDesc->sizel.cx;
00910   pSize->cy = (int)pObjDesc->sizel.cy;
00911   if (pOffset != NULL)
00912   {
00913     pOffset->cx = (int)pObjDesc->pointl.x;
00914     pOffset->cy = (int)pObjDesc->pointl.y;
00915   }
00916   GlobalUnlock(hObjDesc);
00917   GlobalFree(hObjDesc);
00918
00919   // successfully retrieved pSize & pOffset info
00920   return TRUE;
00921 }
00922
00923 DROPEFFECT CMainView::OnDragEnter(COleDataObject* pDataObject,
00924   DWORD grfKeyState, CPoint point)
00925 {
00926   ASSERT(m_prevDropEffect == DROPEFFECT_NONE);
00927
00928   GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
00929   CClientDC dc(NULL);
00930   dc.HIMETRICtoDP(&m_dragSize);
00931   dc.HIMETRICtoDP(&m_dragOffset);
00932
00933   return OnDragOver(pDataObject, grfKeyState, point);
00934 }
00935
00936 DROPEFFECT CMainView::OnDragOver(COleDataObject*,
00937   DWORD grfKeyState, CPoint point)
00938 {
00939   point -= m_dragOffset;  // adjust target rect by original cursor offset
00940
00941   // check for point outside logical area -- i.e. in hatched region
00942   // GetTotalSize() returns the size passed to SetScrollSizes
00943   CRect rectScroll(CPoint(0, 0), GetTotalSize());
00944
00945   CRect rectItem(point,m_dragSize);
00946   if (rectItem.IsRectEmpty())
00947   {
00948     // some apps might have a null size in the object descriptor...
00949     rectItem.InflateRect(1,1);
00950   }
00951   rectItem.OffsetRect(GetDeviceScrollPosition());
00952
00953   DROPEFFECT de = DROPEFFECT_NONE;
00954   CRect rectTemp;
00955   if (rectTemp.IntersectRect(rectScroll, rectItem))
00956   {
00957     // check for force link
00958     if ((grfKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
00959       de = DROPEFFECT_LINK;
00960     // check for force copy
00961     else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
00962       de = DROPEFFECT_COPY;
00963     // check for force move
00964     else if ((grfKeyState & MK_ALT) == MK_ALT)
00965       de = DROPEFFECT_MOVE;
00966     // default -- recommended action is move
00967     else
00968       de = DROPEFFECT_MOVE;
00969   }
00970
00971   if (point == m_dragPoint)
00972     return de;
00973
00974   // otherwise, cursor has moved -- need to update the drag feedback
00975   CClientDC dc(this);
00976   if (m_prevDropEffect != DROPEFFECT_NONE)
00977   {
00978     // erase previous focus rect
00979     dc.DrawFocusRect(CRect(m_dragPoint, m_dragSize));
00980   }
00981   m_prevDropEffect = de;
00982   if (m_prevDropEffect != DROPEFFECT_NONE)
00983   {
00984     m_dragPoint = point;
00985     dc.DrawFocusRect(CRect(point, m_dragSize));
00986   }
00987   return de;
00988 }
00989
00990 void CMainView::OnDragLeave()
00991 {
00992   CClientDC dc(this);
00993   if (m_prevDropEffect != DROPEFFECT_NONE)
00994   {
00995     dc.DrawFocusRect(CRect(m_dragPoint,m_dragSize)); // erase previous focus rect
00996     m_prevDropEffect = DROPEFFECT_NONE;
00997   }
00998 }
00999
01000 /////////////////////////////////////////////////////////////////////////////
01001 // Commands for switching display aspects
01002
01003 void CMainView::OnObjectDisplayContent()
01004 {
01005   if (m_pSelection == NULL)
01006     return;
01007   ASSERT_VALID(m_pSelection);
01008   m_pSelection->Invalidate();
01009   m_pSelection->SetDrawAspect(DVASPECT_CONTENT);
01010   m_pSelection->UpdateExtent();
01011   m_pSelection->Invalidate();
01012 }
01013
01014 void CMainView::OnUpdateObjectDisplayContent(CCmdUI* pCmdUI)
01015 {
01016   if (m_pSelection == NULL)
01017   {
01018     pCmdUI->Enable(FALSE);
01019     return;
01020   }
01021   ASSERT_VALID(m_pSelection);
01022   pCmdUI->SetCheck(m_pSelection->GetDrawAspect() == DVASPECT_CONTENT);
01023   pCmdUI->Enable(TRUE);
01024 }
01025
01026 void CMainView::OnObjectDisplayAsIcon()
01027 {
01028   if (m_pSelection == NULL)
01029     return;
01030   ASSERT_VALID(m_pSelection);
01031   m_pSelection->Invalidate();
01032   m_pSelection->SetDrawAspect(DVASPECT_ICON);
01033   m_pSelection->UpdateExtent();
01034   m_pSelection->Invalidate();
01035 }
01036
01037 void CMainView::OnUpdateObjectDisplayAsIcon(CCmdUI* pCmdUI)
01038 {
01039   if (m_pSelection == NULL)
01040   {
01041     pCmdUI->Enable(FALSE);
01042     return;
01043   }
01044   ASSERT_VALID(m_pSelection);
01045   pCmdUI->SetCheck(m_pSelection->GetDrawAspect() == DVASPECT_ICON);
01046   pCmdUI->Enable(TRUE);
01047 }
01048
01049 void CMainView::UpdateActiveItem()
01050 {
01051   // when there is an active item visible, sizing the window may cause
01052   //  more/less of the in-place object to become visible.
01053   //  (ie. the clipping rectangle changes with the size of the window)
01054   // a container supporting scrolling would also have to do this
01055   //  when scrolling the contents of the window.
01056
01057   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
01058   if (pActiveItem != NULL &&
01059     pActiveItem->GetItemState() == COleClientItem::activeUIState &&
01060     pActiveItem->GetActiveView() == this)
01061   {
01062     // this will update the item rectangles by calling
01063     //  OnGetPosRect & OnGetClipRect.
01064     pActiveItem->SetItemRects();
01065   }
01066 }
01067
01068 void CMainView::OnUpdateEditClone(CCmdUI* pCmdUI)
01069 {
01070   pCmdUI->Enable(m_pSelection != NULL);
01071 }
01072
01073 void CMainView::OnEditClone()
01074 {
01075   if (m_pSelection == NULL)
01076     return;
01077
01078   BeginWaitCursor();
01079
01080   CRectItem* pItem = NULL;
01081   TRY
01082   {
01083     // create item from dialog results
01084     pItem = GetDocument()->CreateItem();
01085     if (!pItem->CreateCloneFrom(m_pSelection))
01086       AfxThrowMemoryException();  // any exception will do
01087
01088     // offset it so we can see the clone easier
01089     CRect rect(20, 20, 0, 0);
01090     ClientToDoc(rect);
01091     pItem->m_ptPos.x += rect.left;
01092     pItem->m_ptPos.y += rect.top;
01093     ASSERT_VALID(pItem);
01094   }
01095   CATCH_ALL(e)
01096   {
01097     // cleanup item, if allocated
01098     if (pItem != NULL)
01099       GetDocument()->DeleteItem(pItem);
01100
01101     AfxMessageBox(IDP_FAILED_TO_CREATE);
01102   }
01103   END_CATCH_ALL
01104
01105   EndWaitCursor();
01106 }
01107
01108 void CMainView::OnPasteSpecial()
01109 {
01110   COlePasteSpecialDialog dlg;
01111   dlg.AddFormat(CMainDoc::m_cfPrivate, TYMED_HGLOBAL,
01112     IDS_PRIVATE_CF_DESCR, FALSE, FALSE);
01113   dlg.AddStandardFormats();
01114   if (dlg.DoModal() != IDOK)
01115     return;
01116
01117   CRectItem* pItem = NULL;
01118   TRY
01119   {
01120     // Get the clipboard format of the selected
01121     CLIPFORMAT cf = dlg.m_ps.arrPasteEntries[dlg.m_ps.nSelectedIndex].fmtetc.cfFormat;
01122     if (cf == CMainDoc::m_cfPrivate)
01123     {
01124       BOOL bLink = dlg.GetSelectionType() ==
01125         COlePasteSpecialDialog::pasteLink;
01126       COleDataObject dataObject;
01127       dataObject.Attach(dlg.m_ps.lpSrcDataObj, FALSE);
01128       pItem = DoPasteItem(bLink, &dataObject, NULL, cf);
01129
01130       // try to get initial presentation data
01131       pItem->UpdateLink();
01132     }
01133     else
01134     {
01135       pItem = GetDocument()->CreateItem();
01136       if (!dlg.CreateItem(pItem))
01137       {
01138         TRACE0("Warning: paste special failed to create item.\n");
01139         AfxThrowMemoryException();
01140       }
01141
01142       // try to get initial presentation data
01143       pItem->UpdateLink();
01144
01145       // try to get initial extent
01146       pItem->UpdateExtent();
01147
01148       // allow document to offset item to avoid direct superimposition
01149       GetDocument()->AdjustItemPosition(pItem);
01150
01151       // set the selection with bSafeSelect = TRUE
01152       SetSelection(pItem, TRUE);
01153       GetDocument()->SetModifiedFlag();
01154       GetDocument()->UpdateAllViews(NULL, 0, pItem);
01155     }
01156   }
01157   CATCH_ALL(e)
01158   {
01159     // cleanup item, if allocated
01160     if (pItem != NULL)
01161       GetDocument()->DeleteItem(pItem);
01162     AfxMessageBox(IDP_FAILED_TO_CREATE);
01163     return;
01164   }
01165   END_CATCH_ALL
01166 }
01167
01168 void CMainView::OnUpdateEditPaste(CCmdUI* pCmdUI)
01169 {
01170   // determine if private or standard OLE formats are on the clipboard
01171   COleDataObject dataObj;
01172   BOOL bEnable = dataObj.AttachClipboard() &&
01173     (dataObj.IsDataAvailable(CMainDoc::m_cfPrivate) ||
01174      COleClientItem::CanCreateFromData(&dataObj));
01175
01176   // enable command based on availability
01177   pCmdUI->Enable(bEnable);
01178 }
01179
01180 void CMainView::OnObjectResetsize()
01181 {
01182   ENSURE(m_pSelection != NULL);
01183   m_pSelection->ResetSize();
01184 }
01185
01186 void CMainView::OnCancelInplace()
01187 {
01188   // deactivate the inplace active item on this frame/view
01189   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
01190   if (pActiveItem != NULL)
01191     pActiveItem->Deactivate();
01192   ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
01193 }
01194
01195 void CMainView::OnDestroy()
01196 {
01197   CScrollView::OnDestroy();
01198
01199   // deactivate the inplace active item on this view
01200   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
01201   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
01202   {
01203     pActiveItem->Deactivate();
01204     ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
01205   }
01206 }
01207
01208 void CMainView::OnUpdateOleEditProperties(CCmdUI* pCmdUI)
01209 {
01210   pCmdUI->Enable(m_pSelection != NULL);
01211 }
01212
01213 // edit properties dialog specific to OCLIENT
01214 class COlePropertiesEx : public COlePropertiesDialog
01215 {
01216 public:
01217   COlePropertiesEx(COleClientItem* pItem,
01218     UINT nScaleMin = 10, UINT nScaleMax = 500, CWnd* pParentWnd = NULL)
01219     : COlePropertiesDialog(pItem, nScaleMin, nScaleMax, pParentWnd)
01220     { }
01221
01222   virtual BOOL OnApplyScale(
01223     COleClientItem* pItem, int nCurrentScale, BOOL bRelativeToOrig);
01224 };
01225
01226 BOOL COlePropertiesEx::OnApplyScale(
01227   COleClientItem* pItem, int nCurrentScale, BOOL bRelativeToOrig)
01228 {
01229   if (nCurrentScale != -1)
01230   {
01231     ASSERT_VALID(pItem);
01232     CRectItem* pRectItem = (CRectItem*)pItem;
01233     ASSERT_KINDOF(CRectItem, pRectItem);
01234
01235     // reset to original size if necessary
01236     if (bRelativeToOrig)
01237       pRectItem->ResetSize();
01238
01239     // update extent to reflect scaling factor
01240     pRectItem->Invalidate();
01241     CSize size = pRectItem->GetSize();
01242     size.cx = MulDiv(size.cx, nCurrentScale, 100);
01243     size.cy = MulDiv(size.cy, nCurrentScale, 100);
01244     pRectItem->SetSize(size);
01245     pRectItem->Invalidate();
01246   }
01247   return TRUE;
01248 }
01249
01250 void CMainView::OnOleEditProperties()
01251 {
01252   ASSERT(m_pSelection != NULL);
01253
01254   COlePropertiesEx dlg(m_pSelection);
01255   dlg.DoModal();
01256 }
01257
01258 void CMainView::OnUpdateOleChangeSource(CCmdUI* pCmdUI)
01259 {
01260   pCmdUI->Enable(m_pSelection != NULL && m_pSelection->GetType() == OT_LINK);
01261 }
01262
01263 void CMainView::OnOleChangeSource()
01264 {
01265   ASSERT(m_pSelection != NULL && m_pSelection->GetType() == OT_LINK);
01266
01267   COleChangeSourceDialog dlg(m_pSelection);
01268   dlg.DoModal();
01269 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View1.h Source File

  • vc2008fp
  • OutlookMultiViews

View1.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 class CView1 : public CView
00004 {
00005 public:
00006   CView1();           // protected constructor used by dynamic creation
00007   virtual ~CView1();
00008
00009   DECLARE_DYNCREATE(CView1)
00010
00011 // Attributes
00012
00013 // Operations
00014 public:
00015
00016 // Overrides
00017   protected:
00018   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00019   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00020   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00021   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00022
00023 // Implementation
00024 protected:
00025 #ifdef _DEBUG
00026   virtual void AssertValid() const;
00027   virtual void Dump(CDumpContext& dc) const;
00028 #endif
00029
00030 protected:
00031   afx_msg void OnContextMenu(CWnd*, CPoint point);
00032   afx_msg void OnFilePrintPreview();
00033   DECLARE_MESSAGE_MAP()
00034 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFontDesc Member List

This is the complete list of members for CFontDesc, including all inherited members.
CFontDesc(LPCTSTR lpszName, LPCTSTR lpszScript, BYTE nCharSet, BYTE nPitchAndFamily, DWORD dwFlags) | CFontDesc
m_dwFlags | CFontDesc
m_nCharSet | CFontDesc
m_nPitchAndFamily | CFontDesc
m_strName | CFontDesc
m_strScript | CFontDesc
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutlookMultiViewsView Member List

This is the complete list of members for COutlookMultiViewsView, including all inherited members.
COutlookMultiViewsView() | COutlookMultiViewsView | [protected]
GetDocument() | COutlookMultiViewsView | [inline]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | COutlookMultiViewsView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | COutlookMultiViewsView | [protected]
OnDraw(CDC *pDC) | COutlookMultiViewsView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | COutlookMultiViewsView | [protected, virtual]
OnFilePrintPreview() | COutlookMultiViewsView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | COutlookMultiViewsView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | COutlookMultiViewsView | [virtual]
~COutlookMultiViewsView() | COutlookMultiViewsView | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/stdafx.cpp Source File

  • controls
  • pal

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/notifwdw.h Source File

  • general
  • CmnCtrl2

notifwdw.h

Go to the documentation of this file.
00001 // NotifyShowCase.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CNotifySowCase window
00015
00016 #ifndef INC_NOTIFYSHOWCASE_H
00017 #define INC_NOTIFYSHOWCASE_H
00018
00019 typedef struct notif_tag
00020 {
00021   UINT    nCode;
00022   TCHAR   sztCodeName[30];
00023 } notifDescrip;
00024
00025
00026 #define NOTIFCOUNT  23
00027
00028 class CNotifyShowCase : public CEdit
00029 {
00030 // Construction
00031 public:
00032   CNotifyShowCase();
00033   static notifDescrip m_rgNotifDescrip[NOTIFCOUNT];
00034
00035 // Attributes
00036 public:
00037   int     m_totalLines;
00038
00039 // Operations
00040 public:
00041
00042 // Overrides
00043   // ClassWizard generated virtual function overrides
00044   //{{AFX_VIRTUAL(CNotifySowCase)
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 public:
00049   virtual ~CNotifyShowCase();
00050   void    SetBufferSize(int nLines) { m_totalLines = nLines;};
00051   void    AddLine(LPCTSTR lpsz);
00052   void    ShowNotification(UINT nCode);
00053
00054   // Generated message map functions
00055 protected:
00056   //{{AFX_MSG(CNotifySowCase)
00057     // NOTE - the ClassWizard will add and remove member functions here.
00058   //}}AFX_MSG
00059
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064
00065
00066 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/coloropt.cpp Source File

  • general
  • dynamenu

coloropt.cpp

Go to the documentation of this file.
00001 // coloropt.cpp
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: implementation of the CColorOptDlg class
00013 //
00014 // Functions:
00015 //      Most of this file was generated by AppWizard.  The functions
00016 //      which contain code specific to this sample are:
00017 //
00018 //      CColorOptDlg::CColorOptDlg()         -- dialog constructor
00019 //      CColorOptDlg::DoDataExchange()       -- connect data to controls
00020 //      CColorOptDlg::OnInitDialog()         -- initialize dialog
00021
00022 #include "stdafx.h"
00023 #include "dynamenu.h"
00024 #include "coloropt.h"
00025 #include "dmdoc.h"    // for CDynaMenuDoc class
00026
00027 #ifdef _DEBUG
00028 #undef THIS_FILE
00029 static char BASED_CODE THIS_FILE[] = __FILE__;
00030 #endif
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CColorOptDlg dialog
00034
00035
00036 //***********************************************************************
00037 // Function: CColorOptDlg::CColorOptDlg()
00038 //
00039 // Purpose:
00040 //    This is the constructor for the color options dialog class.
00041 //
00042 // Parameters:
00043 //    pDoc    -- pointer to the CDynaMenuDoc with the data we want to
00044 //               update
00045 //    pParent -- pointer to parent window for dialog
00046 //
00047 // Returns:
00048 //    none
00049 //
00050 // Comments:
00051 //    none
00052 //
00053 // History:
00054 //
00055 //   Date   Comment                                           Initials
00056 // ======== ================================================= ========
00057 // 03/24/94 Created                                             MIK
00058 //
00059 //***********************************************************************
00060 CColorOptDlg::CColorOptDlg(CDynaMenuDoc* pDoc, CWnd* pParent /*=NULL*/)
00061   : CDialog(CColorOptDlg::IDD, pParent)
00062 {
00063   //{{AFX_DATA_INIT(CColorOptDlg)
00064     // NOTE: the ClassWizard will add member initialization here
00065   //}}AFX_DATA_INIT
00066
00067   m_pDoc = pDoc;
00068 }
00069
00070 //***********************************************************************
00071 // Function: CColorOptDlg::DoDataExchange()
00072 //
00073 // Purpose:
00074 //    DoDataExchange is called by the framework to initialize the
00075 //    dialog's control, or to retrieve data from the dialog.
00076 //
00077 //    Instead of using ClassWizard to generate the DDX calls, we
00078 //    add our own, so that we can loop over an array.
00079 //
00080 // Parameters:
00081 //    pDX -- pointer to a CDataExchange object
00082 //
00083 // Returns:
00084 //    none
00085 //
00086 // Comments:
00087 //    see CWnd::DoDataExchange documentation for further information.
00088 //
00089 // History:
00090 //
00091 //   Date   Comment                                           Initials
00092 // ======== ================================================= ========
00093 // 03/24/94 Created                                             MIK
00094 //
00095 //***********************************************************************
00096 void CColorOptDlg::DoDataExchange(CDataExchange* pDX)
00097 {
00098   CDialog::DoDataExchange(pDX);
00099   //{{AFX_DATA_MAP(CColorOptDlg)
00100     // NOTE: the ClassWizard will add DDX and DDV calls here
00101   //}}AFX_DATA_MAP
00102
00103   for (int i = 0; i < NUM_TEXTCOLOR; i++)
00104     DDX_Check(pDX, IDC_COLOR1 + i, m_pDoc->m_abAllowColor[i]);
00105 }
00106
00107 BEGIN_MESSAGE_MAP(CColorOptDlg, CDialog)
00108   //{{AFX_MSG_MAP(CColorOptDlg)
00109     // NOTE: the ClassWizard will add message map macros here
00110   //}}AFX_MSG_MAP
00111 END_MESSAGE_MAP()
00112
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CColorOptDlg message handlers
00116
00117 //***********************************************************************
00118 // Function: CColorOptDlg::OnInitDialog()
00119 //
00120 // Purpose:
00121 //    OnInitDialog is called by the framework in response to a
00122 //    WM_INITDIALOG message.  It allows us to initialize a dialog
00123 //    before it is displayed.
00124 //
00125 //    We set the text of the dialog's checkbox controls using the
00126 //    strings defined in the color definitions, CDynaMenuDoc::m_aColorDef.
00127 //
00128 // Parameters:
00129 //    none
00130 //
00131 // Returns:
00132 //    nonzero to have Windows set input focus, 0 if focus explicitly set
00133 //
00134 // Comments:
00135 //    see CDialog::OnInitDialog documentation for further information.
00136 //
00137 //***********************************************************************
00138 BOOL CColorOptDlg::OnInitDialog()
00139 {
00140   // set the text of each color checkbox
00141   for (int i = 0; i < NUM_TEXTCOLOR; i++)
00142   {
00143     CWnd* pCtl = GetDlgItem(i + IDC_COLOR1);
00144     CString strColor;
00145     strColor.LoadString(CDynaMenuDoc::m_aColorDef[i].m_nString);
00146     pCtl->SetWindowText(strColor);
00147   }
00148
00149   // center the dialog window
00150   CenterWindow();
00151
00152   // do the default processing (including DDX)
00153   return CDialog::OnInitDialog();
00154 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/BncFrm.h Source File

  • general
  • mdidocvw

BncFrm.h

Go to the documentation of this file.
00001 // BncFrm.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CBounceFrame frame
00015
00016 class CBounceFrame : public CMDIChildWnd
00017 {
00018 private:
00019   using CMDIChildWnd::Create;
00020
00021   DECLARE_DYNCREATE(CBounceFrame)
00022 protected:
00023   CBounceFrame();           // protected constructor used by dynamic creation
00024
00025 // Attributes
00026 public:
00027
00028 // Operations
00029 public:
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CBounceFrame)
00034   public:
00035   virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW, const RECT& rect = rectDefault, CMDIFrameWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
00036   protected:
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 protected:
00042   virtual ~CBounceFrame();
00043
00044   // Generated message map functions
00045   //{{AFX_MSG(CBounceFrame)
00046     // NOTE - the ClassWizard will add and remove member functions here.
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyObject Member List

This is the complete list of members for CMyObject, including all inherited members.
CMyObject() | CMyObject |
FormatMyObject(CString &str) | CMyObject |
m_float | CMyObject |
m_int | CMyObject |
m_str | CMyObject |
Serialize(CArchive &ar) | CMyObject | [virtual]
~CMyObject() | CMyObject | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/mainfrm.h Source File

  • ole
  • ipdrive

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CFrameWnd
00013 {
00014 protected: // create from serialization only
00015   CMainFrame();
00016   DECLARE_DYNCREATE(CMainFrame)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CMainFrame)
00027   //}}AFX_VIRTUAL
00028
00029 // Implementation
00030 public:
00031   virtual ~CMainFrame();
00032 #ifdef _DEBUG
00033   virtual void AssertValid() const;
00034   virtual void Dump(CDumpContext& dc) const;
00035 #endif
00036
00037 protected:  // control bar embedded members
00038   CStatusBar  m_wndStatusBar;
00039   CToolBar    m_wndToolBar;
00040
00041 // Generated message map functions
00042 protected:
00043   //{{AFX_MSG(CMainFrame)
00044   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046     //    DO NOT EDIT what you see in these blocks of generated code!
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControlDoc.cpp Source File

  • vc2008fp
  • TabControl

TabControlDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabControl.h"
00013
00014 #include "TabControlDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CTabControlDoc
00024
00025 IMPLEMENT_DYNCREATE(CTabControlDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CTabControlDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CTabControlDoc construction/destruction
00032
00033 CTabControlDoc::CTabControlDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CTabControlDoc::~CTabControlDoc()
00040 {
00041 }
00042
00043 BOOL CTabControlDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CTabControlDoc serialization
00058
00059 void CTabControlDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CTabControlDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CTabControlDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CTabControlDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CTabControlDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/ExplorerBar.cpp Source File

  • vc2008fp
  • IEDemo

ExplorerBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013 #include "ExplorerBar.h"
00014 #include "IEDemoDoc.h"
00015 #include "IEDemoView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 const int idTree = 1;
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CExplorerBar
00027
00028 CExplorerBar::CExplorerBar()
00029 {
00030 }
00031
00032 CExplorerBar::~CExplorerBar()
00033 {
00034 }
00035
00036 BEGIN_MESSAGE_MAP(CExplorerBar, CMFCTasksPane)
00037   //{{AFX_MSG_MAP(CExplorerBar)
00038   ON_WM_CREATE()
00039   //}}AFX_MSG_MAP
00040   ON_NOTIFY(TVN_SELCHANGED, idTree, OnSelectTree)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CExplorerBar message handlers
00045
00046 int CExplorerBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00047 {
00048   if (CMFCTasksPane::OnCreate(lpCreateStruct) == -1)
00049     return -1;
00050
00051   SetWindowText (_T("Explorer Bar"));
00052   EnableOffsetCustomControls (FALSE);
00053
00054   // ----------------------
00055   // Create favorites list:
00056   // ----------------------
00057   CRect rectDummy (0, 0, 0, 0);
00058   const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_SINGLEEXPAND | TVS_TRACKSELECT;
00059
00060   if(!m_wndFavorites.Create (dwTreeStyle, rectDummy,
00061     this, idTree))
00062   {
00063     TRACE0("Failed to create the Favorites window\n");
00064     return FALSE;      // fail to create
00065   }
00066
00067   theApp.m_Favorites.FillTree (m_wndFavorites);
00068
00069   // -----------
00070   // Add groups:
00071   // -----------
00072   int nGroup1 = AddGroup (_T("Favorites"), FALSE, TRUE);
00073   AddWindow (nGroup1, m_wndFavorites.GetSafeHwnd (), 200);
00074
00075   int nGroup2 = AddGroup (_T("Links"));
00076
00077   AddTask (nGroup2, _T("MSDN Home"), -1, ID_LINK_MSDN);
00078   AddTask (nGroup2, _T("Microsoft Home"), -1, ID_LINK_MICROSOFT);
00079   AddTask (nGroup2, _T("Visual C++ Developer Center"), -1, ID_LINK_VISUALCPP);
00080
00081   return 0;
00082 }
00083 //************************************************************************************
00084 void CExplorerBar::OnSelectTree(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00085 {
00086   HTREEITEM hTreeItem = m_wndFavorites.GetSelectedItem ();
00087   if (hTreeItem != NULL)
00088   {
00089     CFavorit* pFavorit = (CFavorit*) m_wndFavorites.GetItemData (hTreeItem);
00090     ASSERT_VALID (pFavorit);
00091
00092     if (!pFavorit->GetURL ().IsEmpty ())
00093     {
00094       CIEDemoView* pView =
00095         (CIEDemoView*)((CFrameWnd*) AfxGetMainWnd ())->GetActiveView ();
00096       ASSERT_VALID (pView);
00097
00098       pView->Navigate2 (pFavorit->GetURL ());
00099     }
00100   }
00101
00102   *pResult = 0;
00103 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/custlist.cpp Source File

  • general
  • ctrltest

custlist.cpp

Go to the documentation of this file.
00001 // custlist.cpp : custom listbox
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 #pragma warning( disable : 4312)
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // Custom Listbox - containing colors
00019
00020 class CColorListBox : public CListBox
00021 {
00022 public:
00023 // Operations
00024   void AddColorItem(COLORREF color);
00025
00026 // Implementation
00027   virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
00028   virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
00029   virtual int CompareItem(LPCOMPAREITEMSTRUCT lpCIS);
00030 };
00031
00032 void CColorListBox::AddColorItem(COLORREF color)
00033 {
00034   // add a listbox item
00035   AddString((LPCTSTR) color);
00036     // Listbox does not have the LBS_HASSTRINGS style, so the
00037     //  normal listbox string is used to store an RGB color
00038 }
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041
00042 #define COLOR_ITEM_HEIGHT   20
00043
00044 void CColorListBox::MeasureItem(LPMEASUREITEMSTRUCT lpMIS)
00045 {
00046   // all items are of fixed size
00047   // must use LBS_OWNERDRAWVARIABLE for this to work
00048   lpMIS->itemHeight = COLOR_ITEM_HEIGHT;
00049 }
00050
00051 void CColorListBox::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00052 {
00053   CDC* pDC = CDC::FromHandle(lpDIS->hDC);
00054   COLORREF cr = (COLORREF)lpDIS->itemData; // RGB in item data
00055
00056   if (lpDIS->itemAction & ODA_DRAWENTIRE)
00057   {
00058     // Paint the color item in the color requested
00059     CBrush br(cr);
00060     pDC->FillRect(&lpDIS->rcItem, &br);
00061   }
00062
00063   if ((lpDIS->itemState & ODS_SELECTED) &&
00064     (lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)))
00065   {
00066     // item has been selected - hilite frame
00067     COLORREF crHilite = RGB(255-GetRValue(cr),
00068             255-GetGValue(cr), 255-GetBValue(cr));
00069     CBrush br(crHilite);
00070     pDC->FrameRect(&lpDIS->rcItem, &br);
00071   }
00072
00073   if (!(lpDIS->itemState & ODS_SELECTED) &&
00074     (lpDIS->itemAction & ODA_SELECT))
00075   {
00076     // Item has been de-selected -- remove frame
00077     CBrush br(cr);
00078     pDC->FrameRect(&lpDIS->rcItem, &br);
00079   }
00080 }
00081
00082 int CColorListBox::CompareItem(LPCOMPAREITEMSTRUCT lpCIS)
00083 {
00084   COLORREF cr1 = (COLORREF)lpCIS->itemData1;
00085   COLORREF cr2 = (COLORREF)lpCIS->itemData2;
00086   if (cr1 == cr2)
00087     return 0;       // exact match
00088
00089   // first do an intensity sort, lower intensities go first
00090   int intensity1 = GetRValue(cr1) + GetGValue(cr1) + GetBValue(cr1);
00091   int intensity2 = GetRValue(cr2) + GetGValue(cr2) + GetBValue(cr2);
00092   if (intensity1 < intensity2)
00093     return -1;      // lower intensity goes first
00094   else if (intensity1 > intensity2)
00095     return 1;       // higher intensity goes second
00096
00097   // if same intensity, sort by color (blues first, reds last)
00098   if (GetBValue(cr1) > GetBValue(cr2))
00099     return -1;
00100   else if (GetGValue(cr1) > GetGValue(cr2))
00101     return -1;
00102   else if (GetRValue(cr1) > GetRValue(cr2))
00103     return -1;
00104   else
00105     return 1;
00106 }
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // Dialog class
00110
00111 class CCustListDlg : public CDialog
00112 {
00113 protected:
00114   CColorListBox  m_colors;
00115 public:
00116   //{{AFX_DATA(CCustListDlg)
00117     enum { IDD = IDD_CUSTOM_LIST };
00118   //}}AFX_DATA
00119   CCustListDlg()
00120     : CDialog(CCustListDlg::IDD)
00121     { }
00122
00123   // access to controls is through inline helpers
00124   BOOL OnInitDialog();
00125
00126   //{{AFX_MSG(CCustListDlg)
00127     virtual void OnOK();
00128   //}}AFX_MSG
00129   DECLARE_MESSAGE_MAP();
00130 };
00131
00132 BEGIN_MESSAGE_MAP(CCustListDlg, CDialog)
00133   //{{AFX_MSG_MAP(CCustListDlg)
00134   ON_LBN_DBLCLK(IDC_LISTBOX1, OnOK)       // double click for OK
00135   //}}AFX_MSG_MAP
00136 END_MESSAGE_MAP()
00137
00138 BOOL CCustListDlg::OnInitDialog()
00139 {
00140   // subclass the control
00141   VERIFY(m_colors.SubclassDlgItem(IDC_LISTBOX1, this));
00142
00143   // add 8 colors to the listbox (primary + secondary color only)
00144   for (int red = 0; red <= 255; red += 255)
00145     for (int green = 0; green <= 255; green += 255)
00146       for (int blue = 0; blue <= 255; blue += 255)
00147         m_colors.AddColorItem(RGB(red, green, blue));
00148
00149   return TRUE;
00150 }
00151
00152 void CCustListDlg::OnOK()
00153 {
00154   // get the final color
00155   int nIndex = m_colors.GetCurSel();
00156   if (nIndex == -1)
00157   {
00158     CString str;
00159     str.LoadString(IDS_PLEASE_SELECT_COLOR);
00160     MessageBox(str);
00161     m_colors.SetFocus();
00162     return;
00163   }
00164   DWORD color = (DWORD)m_colors.GetItemData(nIndex);
00165
00166 #ifdef _DEBUG
00167   // normally do something with it...
00168   TRACE1("final color RGB = 0x%06lX\n", color);
00169 #endif
00170
00171   EndDialog(IDOK);
00172 }
00173
00174 /////////////////////////////////////////////////////////////////////////////
00175 // Run the test
00176
00177 void CTestWindow::OnTestCustomList()
00178 {
00179   TRACE0("running dialog with custom listbox (owner draw)\n");
00180   CCustListDlg dlg;
00181   dlg.DoModal();
00182 }
00183
00184 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/InsCtlDg.H Source File

  • ole
  • TstCon

InsCtlDg.H

Go to the documentation of this file.
00001 // File: InsCtlDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_INSERTCONTROLDLG_H__C6531855_F70A_11D0_8E26_00C04FB68D60__INCLUDED_)
00011 #define AFX_INSERTCONTROLDLG_H__C6531855_F70A_11D0_8E26_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // InsertControlDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CInsertControlDlg dialog
00021
00022 class CInsertControlDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CInsertControlDlg(CWnd* pParent = NULL);   // standard constructor
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CInsertControlDlg)
00030   enum { IDD = IDD_INSERTCONTROL };
00031   CStatic m_staticServerPath;
00032   CButton m_butRequiredCategories;
00033   CButton m_butIgnoreRequiredCategories;
00034   CButton m_butOK;
00035   CListBox    m_lbControls;
00036   //}}AFX_DATA
00037
00038    CLSID m_clsid;
00039
00040 // Overrides
00041   // ClassWizard generated virtual function overrides
00042   //{{AFX_VIRTUAL(CInsertControlDlg)
00043   protected:
00044   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 protected:
00049    void RefreshControlList();
00050
00051    ICatInformationPtr m_pCatInfo;
00052    CArray< CATID, CATID& > m_aImplementedCategories;
00053    CArray< CATID, CATID& > m_aRequiredCategories;
00054    CList< CLSID, CLSID& > m_lControls;
00055
00056   // Generated message map functions
00057   //{{AFX_MSG(CInsertControlDlg)
00058   virtual BOOL OnInitDialog();
00059   afx_msg void OnImplementedCategories();
00060   afx_msg void OnControlsDblClk();
00061   afx_msg void OnRequiredCategories();
00062   afx_msg void OnControlsSelChange();
00063   afx_msg void OnIgnoreRequiredCategories();
00064   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00065   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00066   //}}AFX_MSG
00067   DECLARE_MESSAGE_MAP()
00068 };
00069
00070 //{{AFX_INSERT_LOCATION}}
00071 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00072
00073 #endif // !defined(AFX_INSERTCONTROLDLG_H__C6531855_F70A_11D0_8E26_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynaMenuDoc Member List

This is the complete list of members for CDynaMenuDoc, including all inherited members.
CDynaMenuDoc() | CDynaMenuDoc | [protected]
DoSelectColor(int iColor) | CDynaMenuDoc | [protected]
DoUpdateSelectColor(int iColor, CCmdUI *pExtra) | CDynaMenuDoc | [protected]
GetMessageString(UINT nID, CString &strMessage) | CDynaMenuDoc | [static]
m_abAllowColor | CDynaMenuDoc |
m_aColorDef | CDynaMenuDoc | [static]
m_iColor | CDynaMenuDoc |
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CDynaMenuDoc | [virtual]
OnColorOptions() | CDynaMenuDoc | [protected]
OnNewDocument() | CDynaMenuDoc | [protected, virtual]
Serialize(CArchive &ar) | CDynaMenuDoc | [virtual]
~CDynaMenuDoc() | CDynaMenuDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/StdAfx.h Source File

  • vc2008fp
  • OwnerDrawMenu

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabControl/TabControl.h Source File

  • vc2008fp
  • TabControl

TabControl.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTabControlApp:
00021 // See TabControl.cpp for the implementation of this class
00022 //
00023
00024 class CTabControlApp : public CWinAppEx
00025 {
00026 public:
00027   CTabControlApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern CTabControlApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/targetver.h Source File

  • general
  • CTaskDialog

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/resource.h Source File

  • general
  • ListHdr

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by ListHdr.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_LISTHDR_DIALOG              102
00009 #define IDR_MAINFRAME                   128
00010 #define IDI_HDRICON1                    130
00011 #define IDC_SPYGLASS                    130
00012 #define IDI_ICONLIST1                   132
00013 #define IDI_ICONLIST2                   133
00014 #define IDI_ICONLIST3                   134
00015 #define IDI_ICONLIST4                   135
00016 #define IDI_HDRICON2                    136
00017 #define IDC_LISTVIEW1                   1001
00018 #define IDC_AUTOARRANGE                 1002
00019 #define IDC_SINGLESEL                   1003
00020 #define IDC_HOVER                       1004
00021 #define IDC_NOLABELWRAP                 1005
00022 #define IDC_EDITLABELS                  1006
00023 #define IDC_NOCOLUMNHEADER              1007
00024 #define IDC_NOSORTHEADER                1008
00025 #define IDC_STDHOTCUR                   1009
00026 #define IDC_VIEWMODE                    1010
00027 #define IDC_ALIGN                       1011
00028 #define IDC_SORT                        1012
00029 #define IDC_MYHOTCUR                    1013
00030 #define IDC_WORKAREAS                   1014
00031 #define IDC_BUTTON1                     1015
00032 #define IDABOUT                         1017
00033
00034 // Next default values for new objects
00035 //
00036 #ifdef APSTUDIO_INVOKED
00037 #ifndef APSTUDIO_READONLY_SYMBOLS
00038 #define _APS_NEXT_RESOURCE_VALUE        129
00039 #define _APS_NEXT_COMMAND_VALUE         32771
00040 #define _APS_NEXT_CONTROL_VALUE         1018
00041 #define _APS_NEXT_SYMED_VALUE           101
00042 #endif
00043 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushctl.h Source File

  • controls
  • push

pushctl.h

Go to the documentation of this file.
00001 // pushctl.h : Declaration of the CPushCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CPushCtrl : See pushctl.cpp for implementation.
00015
00016 class CPushCtrl : public COleControl
00017 {
00018   DECLARE_DYNCREATE(CPushCtrl)
00019
00020 // Constructor
00021 public:
00022   CPushCtrl();
00023
00024 // Overrides
00025
00026   // Drawing function
00027   virtual void OnDraw(
00028         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00029
00030   // Persistence
00031   virtual void DoPropExchange(CPropExchange* pPX);
00032
00033   // Reset control state
00034   virtual void OnResetState();
00035
00036 // Implementation
00037 protected:
00038   ~CPushCtrl();
00039
00040   DECLARE_OLECREATE_EX(CPushCtrl) // Class factory and guid
00041   DECLARE_OLETYPELIB(CPushCtrl)       // GetTypeInfo
00042   DECLARE_PROPPAGEIDS(CPushCtrl)      // Property page IDs
00043   DECLARE_OLECTLTYPE(CPushCtrl)       // Type name and misc status
00044
00045   // Subclassed control support
00046   BOOL PreCreateWindow(CREATESTRUCT& cs);
00047   BOOL IsSubclassedControl();
00048   LRESULT OnOcmCommand(WPARAM wParam, LPARAM lParam);
00049
00050
00051   LRESULT OnOcmDrawItem(WPARAM wParam, LPARAM lParam);
00052   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00053
00054 // Message maps
00055   //{{AFX_MSG(CPushCtrl)
00056   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00057   //}}AFX_MSG
00058   DECLARE_MESSAGE_MAP()
00059
00060 // Dispatch maps
00061   //{{AFX_DISPATCH(CPushCtrl)
00062   //}}AFX_DISPATCH
00063   DECLARE_DISPATCH_MAP()
00064
00065   afx_msg void AboutBox();
00066
00067 // Event maps
00068   //{{AFX_EVENT(CPushCtrl)
00069   void FireCustomClick(LPCTSTR lpstrCaption, short cchCaption)
00070     {FireEvent(eventidCustomClick,EVENT_PARAM(VTS_BSTR  VTS_I2), lpstrCaption, cchCaption);}
00071   //}}AFX_EVENT
00072   DECLARE_EVENT_MAP()
00073
00074 // Dispatch and event IDs
00075 public:
00076   enum {
00077   //{{AFX_DISP_ID(CPushCtrl)
00078   eventidCustomClick = 1L,
00079   //}}AFX_DISP_ID
00080   };
00081
00082 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTooltipDemoDoc Member List

This is the complete list of members for CTooltipDemoDoc, including all inherited members.
CTooltipDemoDoc() | CTooltipDemoDoc | [protected]
OnNewDocument() | CTooltipDemoDoc | [virtual]
Serialize(CArchive &ar) | CTooltipDemoDoc | [virtual]
~CTooltipDemoDoc() | CTooltipDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSSE2Surface24Intrinsic Member List

This is the complete list of members for CSSE2Surface24Intrinsic, including all inherited members.
AdjustWidth(int *pWidth) | CSSE2Surface24Intrinsic | [virtual]
BlitBits() | CSurface |
BlurBits() | CSSE2Surface24Intrinsic | [virtual]
ClearBits() | CSurface |
Create(CWnd *pWnd, int nBitDepth) | CSurface |
CSurface() | CSurface | [inline]
Destroy() | CSurface |
GetBitDepth() const | CSurface | [inline]
GetByteDepth() const | CSurface | [inline]
GetImage() | CSurface | [inline]
GetPitch() const | CSurface | [inline]
GetPixelAddress(int x, int y) const | CSurface | [inline]
GetVisibleHeight() const | CSurface | [inline]
GetVisibleWidth() const | CSurface | [inline]
Import(const CImage &image) | CSurface |
IsNull() const | CSurface | [inline]
Line(const CPoint &p1, const CPoint &p2, COLORREF c) | CSurface |
m_delta | CSSE2Surface24Intrinsic | [private]
m_kDeltaX | CSurface | [protected, static]
m_kDeltaY | CSurface | [protected, static]
m_qwpl | CSSE2Surface24Intrinsic | [private]
m_width | CSSE2Surface24Intrinsic | [private]
OnCreated() | CSSE2Surface24Intrinsic | [protected, virtual]
PointColor(int x, int y, COLORREF c) | CSurface | [inline]
PointColor(int x, int y) const | CSurface | [inline]
RandomBits() | CSurface |
RandomLine(COLORREF c) | CSurface |
ShiftBits() | CSurface |
StripeBits() | CSurface |
~CSurface() | CSurface | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMainWindow Member List

This is the complete list of members for CMainWindow, including all inherited members.
CMainWindow() | CMainWindow
OnAbout() | CMainWindow
OnPaint() | CMainWindow
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Surface.cpp Source File

  • general
  • MMXSwarm

Surface.cpp

Go to the documentation of this file.
00001 // Surface.cpp : implementation of the CSurface class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #include "stdafx.h"
00013 #include "Surface.h"
00014
00015 void CSurface::Create(CWnd *pWnd, int nBitDepth)
00016 {
00017   // no palettes
00018   ASSERT(nBitDepth == 24 || nBitDepth == 16 || nBitDepth == 32);
00019
00020     CRect clientRect;
00021     pWnd->GetClientRect(clientRect);
00022   int height = clientRect.Height();
00023     int width = clientRect.Width();
00024
00025   if (!height || !width)
00026     return;
00027
00028     Destroy();
00029
00030   m_nBitDepth = nBitDepth;
00031   m_nByteDepth = nBitDepth/8;
00032   m_wndHeight = height;
00033     m_wndWidth = width;
00034   m_hDestDC = ::GetDC(pWnd->GetSafeHwnd());
00035   m_pSrcWnd = pWnd;
00036     ASSERT(m_hDestDC);
00037
00038   width = m_wndWidth + m_kDeltaX; // not *2 because we don't need it on the left side.
00039   // Allow derived classes a shot at updating if they need more alignment
00040   AdjustWidth(&width);
00041
00042   // pass Negative Height to make it Top Down.
00043   VERIFY(m_image.Create(width, -(m_wndHeight + m_kDeltaY*2), m_nBitDepth, 0));
00044   ASSERT((DWORD_PTR(m_image.GetBits()) & 0xf) == 0); // make sure we are at least 128 bit aligned.(SSE2)
00045   ASSERT(m_image.GetPitch() > 0); // Verify top down DIB
00046   VERIFY(m_image.GetDC() != NULL); // Prefer the DC to exist for life of object
00047   OnCreated();
00048 }
00049
00050 void CSurface::Destroy()
00051 {
00052   if (IsNull())
00053     return;
00054
00055   m_image.ReleaseDC();
00056   m_image.Destroy();
00057   ::ReleaseDC(m_pSrcWnd->GetSafeHwnd(), m_hDestDC);
00058   m_wndHeight = 0;
00059   m_wndWidth = 0;
00060 }
00061
00062 void CSurface::Import(const CImage &image)
00063 {
00064   image.BitBlt(m_image.GetDC(), 0, m_kDeltaY,
00065     GetVisibleWidth(), GetVisibleHeight(), 0, 0);
00066   m_image.ReleaseDC();
00067   BlitBits();
00068 }
00069
00070 void CSurface::ClearBits()
00071 {
00072     int size = m_image.GetPitch() * m_image.GetHeight();
00073   memset(m_image.GetBits(), 0x00, size);
00074 }
00075
00076 void CSurface::StripeBits()
00077 {
00078     int count = 0x880000;
00079     for (int i = 0; i < m_wndHeight; i++) {
00080         COLORREF color = count++; // RAND();
00081         for (int j = 0; j < m_wndWidth; j++) {
00082             PointColor(j, i, color);
00083         }
00084     }
00085
00086 }
00087
00088 void CSurface::RandomBits()
00089 {
00090     for (int i = 0; i < m_wndHeight; i++) {
00091         for (int j = 0; j < m_wndWidth; j++) {
00092             PointColor(j, i, RGB(Random(), Random(), Random()));
00093         }
00094     }
00095 }
00096
00097 void CSurface::ShiftBits()
00098 {
00099   BYTE *pBits = (BYTE*)m_image.GetBits();
00100   int nPitch = GetPitch();
00101   for (int i = 0; i < m_wndHeight; i++) {
00102     memcpy_s(pBits, nPitch, pBits+nPitch, nPitch);
00103     pBits += nPitch;
00104   }
00105 }
00106
00107 void CSurface::BlurBits()
00108 {
00109     COLORREF cLeft = 0, cCur = PointColor(0,0), cRight, cUp, cDown;
00110     BYTE r, g, b;
00111     for (int i = 0; i < m_wndHeight; i++) {
00112     cLeft = 0;
00113         for (int j = 0; j < m_wndWidth; j++) {
00114             cRight = PointColor(j+1, i);
00115             cUp = PointColor(j, i-1);
00116             cDown = PointColor(j, i+1);
00117             r = (BYTE)(((int)(GetRValue(cCur) << 2) + GetRValue(cLeft) + GetRValue(cRight) + GetRValue(cUp) + GetRValue(cDown)) >> 3);
00118             g = (BYTE)(((int)(GetGValue(cCur) << 2) + GetGValue(cLeft) + GetGValue(cRight) + GetGValue(cUp) + GetGValue(cDown)) >> 3);
00119             b = (BYTE)(((int)(GetBValue(cCur) << 2) + GetBValue(cLeft) + GetBValue(cRight) + GetBValue(cUp) + GetBValue(cDown)) >> 3);
00120             PointColor(j, i, RGB(b,g,r)); // RGBs are physically inverted
00121             cLeft = cCur;
00122             cCur = cRight;
00123         }
00124     }
00125 }
00126
00127 // nothing beats good old fashioned Bresenham
00128 void CSurface::Line(const CPoint &p1, const CPoint &p2, COLORREF c)
00129 {
00130     int x1 = p1.x;
00131     int x2 = p2.x;
00132     int y1 = p1.y;
00133     int y2 = p2.y;
00134
00135   int d, deltax, deltay, numpixels,
00136     dinc1, dinc2,
00137     xinc1, xinc2,
00138     yinc1, yinc2;
00139
00140   // Calculate deltax and deltay for startup
00141   deltax = ABS(x2 - x1);
00142   deltay = ABS(y2 - y1);
00143
00144   // Initialize all vars based on which is the independent variable
00145     if (deltax >= deltay) {
00146     // x is independent variable
00147     numpixels = deltax + 1;
00148     dinc1 = deltay << 1;
00149     dinc2 = (deltay - deltax) << 1;
00150     d = dinc1 - deltax;
00151     xinc1 = xinc2 = yinc2 = 1;
00152     yinc1 = 0;
00153     }
00154     else {
00155     // y is independent variable
00156     numpixels = deltay + 1;
00157     dinc1 = deltax <<  1;
00158     dinc2 = (deltax - deltay) << 1;
00159     d = dinc1 - deltay;
00160     xinc1 = 0;
00161     xinc2 = yinc1 = yinc2 = 1;
00162     }
00163
00164   // Make sure x and y move in the right directions
00165     if (x1 > x2) {
00166     xinc1 = -xinc1;
00167     xinc2 = -xinc2;
00168     }
00169     if (y1 > y2) {
00170     yinc1 = -yinc1;
00171     yinc2 = -yinc2;
00172     }
00173
00174   // Start drawing pixels at [x1, y1]
00175     for (int i = numpixels; i > 0; i--) {
00176         PointColor(x1, y1, c);
00177         if (d < 0) {
00178       d += dinc1;
00179       x1 += xinc1;
00180       y1 += yinc1;
00181         }
00182         else {
00183       d += dinc2;
00184       x1 += xinc2;
00185       y1 += yinc2;
00186         }
00187     }
00188 }
00189
00190 void CSurface::RandomLine(COLORREF c)
00191 {
00192     CPoint p1(Random(m_wndWidth), Random(m_wndHeight));
00193     CPoint p2(Random(m_wndWidth), Random(m_wndHeight));
00194     Line(p1, p2, c);
00195 }
00196
00197 void CSurface::BlitBits()
00198 {
00199   ASSERT(m_wndHeight && m_wndWidth);
00200     BOOL bStat = m_image.BitBlt(m_hDestDC, 0, 0,
00201         m_wndWidth, m_wndHeight, 0, m_kDeltaY);
00202
00203     ASSERT(bStat);
00204 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.h Source File

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007DemoDoc.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CMSOffice2007DemoDoc : public CRichEditDoc
00015 {
00016 protected: // create from serialization only
00017   CMSOffice2007DemoDoc();
00018   DECLARE_DYNCREATE(CMSOffice2007DemoDoc)
00019
00020 // Overrides
00021 public:
00022   virtual BOOL OnNewDocument();
00023   virtual void SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE);
00024   virtual void Serialize(CArchive& ar);
00025   virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo) const;
00026
00027   // Implementation
00028 public:
00029   virtual ~CMSOffice2007DemoDoc();
00030 #ifdef _DEBUG
00031   virtual void AssertValid() const;
00032   virtual void Dump(CDumpContext& dc) const;
00033 #endif
00034
00035 protected:
00036   //{{AFX_MSG(CMSOffice2007DemoDoc)
00037   afx_msg void OnClose();
00038   //}}AFX_MSG
00039
00040   DECLARE_MESSAGE_MAP()
00041 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/AppLookDlg.h Source File

  • vc2008fp
  • WordPad

AppLookDlg.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 /////////////////////////////////////////////////////////////////////////////
00004 // CAppLookDlg dialog
00005
00006 class CAppLookDlg : public CDialog
00007 {
00008 // Construction
00009 public:
00010   CAppLookDlg(BOOL bStartup, CWnd* pParent = NULL);   // standard constructor
00011
00012 // Dialog Data
00013   //{{AFX_DATA(CAppLookDlg)
00014   enum { IDD = IDD_APP_LOOK };
00015   CComboBox m_wndStyle2007;
00016   CButton m_wndOK;
00017   CButton m_wndCancel;
00018   int   m_nAppLook;
00019   BOOL  m_bShowAtStartup;
00020   int   m_nStyle2007;
00021   //}}AFX_DATA
00022
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CAppLookDlg)
00027   protected:
00028   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 protected:
00033
00034   // Generated message map functions
00035   //{{AFX_MSG(CAppLookDlg)
00036   virtual BOOL OnInitDialog();
00037   virtual void OnOK();
00038   afx_msg void OnApply();
00039   afx_msg void OnAppLook();
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042
00043   const BOOL  m_bStartup;
00044
00045   void SetLook ();
00046 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padview.cpp Source File

  • ole
  • superpad

padview.cpp

Go to the documentation of this file.
00001 // padview.cpp : implementation of the CPadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "superpad.h"
00014 #include "padview.h"
00015 #include "paditem.h"
00016 #include "linkitem.h"
00017 #include "tabstop.h"
00018 #include <afxpriv.h>
00019 #include <stdlib.h>
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CPadView
00028
00029 IMPLEMENT_DYNCREATE(CPadView, CEditView)
00030
00031 BEGIN_MESSAGE_MAP(CPadView, CEditView)
00032   //{{AFX_MSG_MAP(CPadView)
00033   ON_WM_CREATE()
00034   ON_COMMAND(ID_CHOOSE_FONT, OnChooseFont)
00035   ON_COMMAND(ID_WORD_WRAP, OnWordWrap)
00036   ON_UPDATE_COMMAND_UI(ID_WORD_WRAP, OnUpdateWordWrap)
00037   ON_WM_RBUTTONDOWN()
00038   ON_COMMAND(ID_CHOOSE_PRINT_FONT, OnChoosePrintFont)
00039   ON_COMMAND(ID_MIRROR_DISPLAY_FONT, OnMirrorDisplayFont)
00040   ON_UPDATE_COMMAND_UI(ID_MIRROR_DISPLAY_FONT, OnUpdateMirrorDisplayFont)
00041   ON_UPDATE_COMMAND_UI(ID_CHOOSE_PRINT_FONT, OnUpdateChoosePrintFont)
00042   ON_WM_SIZE()
00043   ON_CONTROL_REFLECT(EN_CHANGE, OnEditChange)
00044   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00045   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00046   ON_WM_TIMER()
00047   //}}AFX_MSG_MAP
00048   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00049   ON_COMMAND(ID_SET_TABSTOPS, OnSetTabStops)
00050 END_MESSAGE_MAP()
00051
00052 UINT CPadView::m_nDefTabStops;
00053 UINT CPadView::m_nDefTabStopsOld;
00054 BOOL CPadView::m_bDefWordWrap;
00055 BOOL CPadView::m_bDefWordWrapOld;
00056 LOGFONT NEAR CPadView::m_lfDefFont;
00057 LOGFONT NEAR CPadView::m_lfDefFontOld;
00058 LOGFONT NEAR CPadView::m_lfDefPrintFont;
00059 LOGFONT NEAR CPadView::m_lfDefPrintFontOld;
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // Static initialization/termination
00063
00064 static TCHAR BASED_CODE szSettings[] = _T("Settings");
00065 static TCHAR BASED_CODE szTabStops[] = _T("TabStops");
00066 static TCHAR BASED_CODE szFont[] = _T("Font");
00067 static TCHAR BASED_CODE szPrintFont[] = _T("PrintFont");
00068 static TCHAR BASED_CODE szHeight[] = _T("Height");
00069 static TCHAR BASED_CODE szWeight[] = _T("Weight");
00070 static TCHAR BASED_CODE szItalic[] = _T("Italic");
00071 static TCHAR BASED_CODE szUnderline[] = _T("Underline");
00072 static TCHAR BASED_CODE szPitchAndFamily[] = _T("PitchAndFamily");
00073 static TCHAR BASED_CODE szCharSet[] = _T("CharSet");
00074 static TCHAR BASED_CODE szFaceName[] = _T("FaceName");
00075 static TCHAR BASED_CODE szSystem[] = _T("System");
00076 static TCHAR BASED_CODE szWordWrap[] = _T("WordWrap");
00077
00078 static void GetProfileFont(LPCTSTR szSec, LOGFONT* plf)
00079 {
00080   CWinApp* pApp = AfxGetApp();
00081   plf->lfHeight = pApp->GetProfileInt(szSec, szHeight, 0);
00082   if (plf->lfHeight != 0)
00083   {
00084     plf->lfWeight = pApp->GetProfileInt(szSec, szWeight, 0);
00085     plf->lfItalic = (BYTE)pApp->GetProfileInt(szSec, szItalic, 0);
00086     plf->lfUnderline = (BYTE)pApp->GetProfileInt(szSec, szUnderline, 0);
00087     plf->lfPitchAndFamily = (BYTE)pApp->GetProfileInt(szSec, szPitchAndFamily, 0);
00088     plf->lfCharSet = (BYTE)pApp->GetProfileInt(szSec, szCharSet, DEFAULT_CHARSET);
00089     CString strFont = pApp->GetProfileString(szSec, szFaceName, szSystem);
00090     _tcsncpy_s((TCHAR*)plf->lfFaceName, LF_FACESIZE, strFont, _TRUNCATE);
00091     plf->lfFaceName[sizeof plf->lfFaceName-1] = 0;
00092   }
00093 }
00094
00095 static void WriteProfileFont(LPCTSTR szSec, const LOGFONT* plf, LOGFONT* plfOld)
00096 {
00097   CWinApp* pApp = AfxGetApp();
00098
00099   if (plf->lfHeight != plfOld->lfHeight)
00100     pApp->WriteProfileInt(szSec, szHeight, plf->lfHeight);
00101   if (plf->lfHeight != 0)
00102   {
00103     if (plf->lfHeight != plfOld->lfHeight)
00104       pApp->WriteProfileInt(szSec, szHeight, plf->lfHeight);
00105     if (plf->lfWeight != plfOld->lfWeight)
00106       pApp->WriteProfileInt(szSec, szWeight, plf->lfWeight);
00107     if (plf->lfItalic != plfOld->lfItalic)
00108       pApp->WriteProfileInt(szSec, szItalic, plf->lfItalic);
00109     if (plf->lfUnderline != plfOld->lfUnderline)
00110       pApp->WriteProfileInt(szSec, szUnderline, plf->lfUnderline);
00111     if (plf->lfPitchAndFamily != plfOld->lfPitchAndFamily)
00112       pApp->WriteProfileInt(szSec, szPitchAndFamily, plf->lfPitchAndFamily);
00113     if (plf->lfCharSet != plfOld->lfCharSet)
00114       pApp->WriteProfileInt(szSec, szCharSet, plf->lfCharSet);
00115     if (_tcscmp(plf->lfFaceName, plfOld->lfFaceName) != 0)
00116       pApp->WriteProfileString(szSec, szFaceName, (LPCTSTR)plf->lfFaceName);
00117   }
00118   *plfOld = *plf;
00119 }
00120
00121 void CPadView::Initialize()
00122 {
00123   CWinApp* pApp = AfxGetApp();
00124   m_bDefWordWrap = pApp->GetProfileInt(szSettings, szWordWrap, 0);
00125   m_bDefWordWrapOld = m_bDefWordWrap;
00126   m_nDefTabStops = pApp->GetProfileInt(szSettings, szTabStops, 8*4);
00127   m_nDefTabStopsOld = m_nDefTabStops;
00128   GetProfileFont(szFont, &m_lfDefFont);
00129   m_lfDefFontOld = m_lfDefFont;
00130   GetProfileFont(szPrintFont, &m_lfDefPrintFont);
00131   m_lfDefPrintFontOld = m_lfDefPrintFont;
00132 }
00133
00134 void CPadView::Terminate()
00135 {
00136   CWinApp* pApp = AfxGetApp();
00137   if (m_nDefTabStops != m_nDefTabStopsOld)
00138     pApp->WriteProfileInt(szSettings, szTabStops, m_nDefTabStops);
00139   if (m_bDefWordWrap != m_bDefWordWrapOld)
00140     pApp->WriteProfileInt(szSettings, szWordWrap, m_bDefWordWrap);
00141   WriteProfileFont(szFont, &m_lfDefFont, &m_lfDefFontOld);
00142   WriteProfileFont(szPrintFont, &m_lfDefPrintFont, &m_lfDefPrintFontOld);
00143 }
00144
00145 /////////////////////////////////////////////////////////////////////////////
00146 // CPadView construction/destruction
00147
00148 CPadView::CPadView()
00149 {
00150   m_nTabStops = m_nDefTabStops;
00151   m_uTimerID = 0;
00152 }
00153
00154 BOOL CPadView::PreCreateWindow(CREATESTRUCT& cs)
00155 {
00156   if (!CEditView::PreCreateWindow(cs))
00157     return FALSE;
00158
00159   if (m_bDefWordWrap)
00160     cs.style &= ~(WS_HSCROLL|ES_AUTOHSCROLL);
00161
00162   return TRUE;
00163 }
00164
00165 int CPadView::OnCreate(LPCREATESTRUCT lpcs)
00166 {
00167   if (CEditView::OnCreate(lpcs) != 0)
00168     return -1;
00169   if (m_lfDefFont.lfHeight != 0)
00170   {
00171     m_font.CreateFontIndirect(&m_lfDefFont);
00172     SetFont(&m_font);
00173   }
00174   if (m_lfDefPrintFont.lfHeight != 0)
00175   {
00176     m_fontPrint.CreateFontIndirect(&m_lfDefPrintFont);
00177     SetPrinterFont(&m_fontPrint);
00178   }
00179   return 0;
00180 }
00181
00182 /////////////////////////////////////////////////////////////////////////////
00183 // CPadView Word Wrap support
00184
00185 BOOL CPadView::IsWordWrap() const
00186 {
00187   return (GetStyle() & ES_AUTOHSCROLL) == 0;
00188 }
00189
00190 BOOL CPadView::SetWordWrap(BOOL bWordWrap)
00191 {
00192   bWordWrap = !!bWordWrap;    // make sure ==TRUE || ==FALSE
00193   if (IsWordWrap() == bWordWrap)
00194     return FALSE;
00195
00196   // preserve original control's state.
00197   CFont* pFont = GetFont();
00198   int nLen = GetBufferLength();
00199   TCHAR* pSaveText = new TCHAR[GetBufferLength()+1];
00200   GetWindowText(pSaveText, nLen+1);
00201
00202   // create new edit control with appropriate style and size.
00203   DWORD dwStyle = dwStyleDefault & ~(ES_AUTOHSCROLL|WS_HSCROLL|WS_VISIBLE);
00204   if (!bWordWrap)
00205     dwStyle |= ES_AUTOHSCROLL|WS_HSCROLL;
00206
00207   CWnd* pParent = GetParent();
00208   CRect rect;
00209   GetWindowRect(rect);
00210   pParent->ScreenToClient(rect);
00211   CWnd* pFocus = GetFocus();
00212
00213   UINT_PTR nID = GetDlgCtrlID();
00214
00215   HWND hWnd = ::CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), NULL, dwStyle,
00216     rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
00217     pParent->m_hWnd, (HMENU)nID, AfxGetInstanceHandle(), NULL);
00218
00219   if (hWnd == NULL)
00220   {
00221     delete[] pSaveText;
00222     return FALSE;
00223   }
00224
00225   // set the window text to nothing to make sure following set doesn't fail
00226   SetWindowText(NULL);
00227
00228   // restore visual state
00229   ::SetWindowText(hWnd, pSaveText);
00230   delete[] pSaveText;
00231   if (pFont != NULL)
00232   {
00233     ASSERT(pFont->m_hObject != NULL);
00234     ::SendMessage(hWnd, WM_SETFONT, (WPARAM)pFont->m_hObject, 0);
00235   }
00236
00237   // detach old window, attach new
00238   SetDlgCtrlID((UINT)nID+1);
00239   HWND hWndOld = Detach();
00240   ::SetWindowLongPtr(hWndOld, GWLP_WNDPROC, (LONG_PTR)*GetSuperWndProcAddr());
00241   ASSERT(m_hWnd == NULL);
00242   SubclassWindow(hWnd);
00243   ASSERT(m_hWnd == hWnd);
00244   GetParentFrame()->SendMessage(WM_RECALCPARENT);
00245
00246   UINT nTabStops = m_nTabStops;
00247   GetEditCtrl().SetTabStops(nTabStops);
00248
00249   GetClientRect(&rect);
00250   SetWindowPos(NULL, 0, 0, 0, 0,
00251     SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_SHOWWINDOW);
00252   SetWindowPos(NULL, 0, 0, 0, 0,
00253     SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_DRAWFRAME);
00254   SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
00255   UpdateWindow();
00256
00257   // destroy old
00258   ::SetWindowPos(hWndOld, NULL, 0, 0, 0, 0,
00259     SWP_HIDEWINDOW|SWP_NOREDRAW|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|
00260     SWP_NOZORDER);
00261   ::DestroyWindow(hWndOld);
00262
00263   // restore rest of state...
00264   GetEditCtrl().LimitText(nMaxSize);
00265   if (pFocus == this)
00266     SetFocus();
00267
00268   // notify container that doc changed
00269   GetDocument()->UpdateAllItems(NULL);
00270
00271   ASSERT_VALID(this);
00272   return TRUE;
00273 }
00274
00275 /////////////////////////////////////////////////////////////////////////////
00276 // CPadView Printing support
00277
00278 void CPadView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
00279 {
00280   CEditView::OnBeginPrinting(pDC, pInfo);
00281
00282   LPCTSTR pszFileName = GetDocument()->GetPathName();
00283   BOOL bForceSysTime = _tcschr(pszFileName, '.') == NULL;
00284   CTime timeSys = CTime::GetCurrentTime();
00285   CFileStatus status;
00286   CFile::GetStatus(pszFileName, status);
00287
00288   if (dlgPageSetup.m_iHeaderTime != 0 || bForceSysTime)
00289     m_timeHeader = timeSys;
00290   else
00291     m_timeHeader = status.m_mtime;
00292
00293   if (dlgPageSetup.m_iFooterTime != 0 || bForceSysTime)
00294     m_timeFooter = timeSys;
00295   else
00296     m_timeFooter = status.m_mtime;
00297
00298   if (!pInfo->m_bPreview)
00299     return;
00300
00301   CWaitCursor wait;
00302   pInfo->m_nCurPage = 0xFFFF;
00303   OnPrepareDC(pDC, pInfo);
00304
00305   UINT nIndex = LOWORD(GetEditCtrl().GetSel());
00306   UINT nCurPage = 1;
00307   while (nCurPage < (UINT)m_aPageStart.GetSize())
00308   {
00309     if (nIndex < m_aPageStart[nCurPage])
00310       break;
00311     nCurPage++;
00312   }
00313   pInfo->m_nCurPage = nCurPage;
00314   pInfo->SetMaxPage((UINT)m_aPageStart.GetSize());
00315   m_nPreviewPage = nCurPage;
00316 }
00317
00318 void CPadView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
00319 {
00320   // get string to show as "filename" in header/footer
00321   LPCTSTR pszFileName = GetDocument()->GetPathName();
00322   if (pszFileName[0] == 0)
00323     pszFileName = GetDocument()->GetTitle();
00324
00325   // go thru global CPageSetupDlg to format the header and footer
00326   CString strHeader;
00327   dlgPageSetup.FormatHeader(strHeader, m_timeHeader, pszFileName,
00328     pInfo->m_nCurPage);
00329   CString strFooter;
00330   dlgPageSetup.FormatFooter(strFooter, m_timeFooter, pszFileName,
00331     pInfo->m_nCurPage);
00332
00333   TEXTMETRIC tm;
00334   pDC->GetTextMetrics(&tm);
00335   int cyChar = tm.tmHeight;
00336   CRect rectPage = pInfo->m_rectDraw;
00337
00338   // draw and exclude space for header
00339   if (!strHeader.IsEmpty())
00340   {
00341     pDC->TextOut(rectPage.left, rectPage.top, strHeader);
00342     rectPage.top += cyChar + cyChar / 4;
00343     pDC->MoveTo(rectPage.left, rectPage.top);
00344     pDC->LineTo(rectPage.right, rectPage.top);
00345     rectPage.top += cyChar / 4;
00346   }
00347
00348   // allow space for footer
00349   pInfo->m_rectDraw = rectPage;
00350   if (!strFooter.IsEmpty())
00351     pInfo->m_rectDraw.bottom -= cyChar + cyChar/4 + cyChar/4;
00352
00353   // draw body text
00354   CEditView::OnPrint(pDC, pInfo);
00355
00356   // draw footer
00357   if (!strFooter.IsEmpty())
00358   {
00359     rectPage.bottom -= cyChar;
00360     pDC->TextOut(rectPage.left, rectPage.bottom, strFooter);
00361     rectPage.bottom -= cyChar / 4;
00362     pDC->MoveTo(rectPage.left, rectPage.bottom);
00363     pDC->LineTo(rectPage.right, rectPage.bottom);
00364     rectPage.bottom -= cyChar / 4;
00365   }
00366 }
00367
00368 void CPadView::OnScrollTo(CDC*, CPrintInfo* pInfo, POINT)
00369 {
00370   UINT nPage = pInfo->m_nCurPage;
00371   ASSERT(nPage < (UINT)m_aPageStart.GetSize());
00372   if (nPage != m_nPreviewPage)
00373   {
00374     UINT nIndex = m_aPageStart[nPage];
00375     GetEditCtrl().SetSel((int)nIndex, (int)nIndex);
00376   }
00377 }
00378
00379 /////////////////////////////////////////////////////////////////////////////
00380 // CPadView Font Handling
00381
00382 void CPadView::OnChooseFont()
00383 {
00384    // get current font description
00385    CFont* pFont = GetFont();
00386    LOGFONT lf;
00387    if (pFont != NULL)
00388      pFont->GetObject(sizeof(LOGFONT), &lf);
00389    else
00390      ::GetObject(GetStockObject(SYSTEM_FONT), sizeof(LOGFONT), &lf);
00391
00392   CFontDialog dlg(&lf, CF_SCREENFONTS|CF_INITTOLOGFONTSTRUCT);
00393   if (dlg.DoModal() == IDOK)
00394   {
00395     // switch to new font.
00396     m_font.DeleteObject();
00397     if (m_font.CreateFontIndirect(&lf))
00398     {
00399       CWaitCursor wait;
00400       SetFont(&m_font);
00401       m_lfDefFont = lf;
00402
00403       if (GetPrinterFont() == NULL)
00404       {
00405         // notify container that content has changed
00406         GetDocument()->UpdateAllItems(NULL);
00407       }
00408     }
00409   }
00410 }
00411
00412 static void ScaleLogFont(LPLOGFONT plf, const CDC& dcFrom, const CDC& dcTo)
00413   // helper to scale log font member from one DC to another!
00414 {
00415   plf->lfHeight = MulDiv(plf->lfHeight,
00416     dcTo.GetDeviceCaps(LOGPIXELSY), dcFrom.GetDeviceCaps(LOGPIXELSY));
00417   plf->lfWidth = MulDiv(plf->lfWidth,
00418     dcTo.GetDeviceCaps(LOGPIXELSX), dcFrom.GetDeviceCaps(LOGPIXELSX));
00419 }
00420
00421 void CPadView::OnChoosePrintFont()
00422 {
00423   CWaitCursor wait;
00424   CFont* pFont = GetPrinterFont();
00425   LOGFONT lf;
00426   LPLOGFONT plf = NULL;
00427   if (pFont != NULL)
00428   {
00429     pFont->GetObject(sizeof(LOGFONT), &lf);
00430     plf = &lf;
00431   }
00432
00433   // magic to get printer dialog that would be used if we were printing!
00434   CPrintDialog dlgPrint(FALSE);
00435   if (!AfxGetApp()->GetPrinterDeviceDefaults(&dlgPrint.m_pd))
00436   {
00437     AfxMessageBox(IDP_ERR_GET_DEVICE_DEFAULTS);
00438     return;
00439   }
00440   wait.Restore();
00441   HDC hdcPrint = dlgPrint.CreatePrinterDC();
00442   if (hdcPrint == NULL)
00443   {
00444     AfxMessageBox(IDP_ERR_GET_PRINTER_DC);
00445     return;
00446   }
00447
00448   CDC dcScreen;
00449   dcScreen.Attach(::GetDC(NULL));
00450   CDC dcPrint;
00451   dcPrint.Attach(hdcPrint);
00452
00453   if (plf != NULL)
00454   {
00455     // need to map initial logfont to screen metrics.
00456     ::ScaleLogFont(plf, dcPrint, dcScreen);
00457   }
00458
00459   // now bring up the dialog since we know the printer DC
00460   CFontDialog dlg(plf, CF_PRINTERFONTS, &dcPrint);
00461   if (dlg.DoModal() == IDOK)
00462   {
00463     // map the resulting logfont back to printer metrics.
00464     lf = dlg.m_lf;
00465     ::ScaleLogFont(&lf, dcScreen, dcPrint);
00466
00467     SetPrinterFont(NULL);
00468     m_fontPrint.DeleteObject();
00469     if (m_fontPrint.CreateFontIndirect(&lf))
00470     {
00471       SetPrinterFont(&m_fontPrint);
00472       m_lfDefPrintFont = lf;
00473
00474       // notify container that content has changed
00475       GetDocument()->UpdateAllItems(NULL);
00476     }
00477   }
00478   //NOTE: destructor will call dcPrint.DeleteDC
00479
00480   ::ReleaseDC(NULL, dcScreen.Detach());
00481 }
00482
00483 void CPadView::OnMirrorDisplayFont()
00484 {
00485   if (GetPrinterFont() != NULL)
00486   {
00487     SetPrinterFont(NULL);
00488     m_lfDefPrintFont.lfHeight = 0;
00489
00490     // notify container that content changed
00491     GetDocument()->UpdateAllItems(NULL);
00492   }
00493 }
00494
00495 void CPadView::OnUpdateChoosePrintFont(CCmdUI* pCmdUI)
00496 {
00497   pCmdUI->SetCheck(GetPrinterFont() != NULL);
00498 }
00499
00500 void CPadView::OnUpdateMirrorDisplayFont(CCmdUI* pCmdUI)
00501 {
00502   pCmdUI->SetCheck(GetPrinterFont() == NULL);
00503 }
00504
00505 /////////////////////////////////////////////////////////////////////////////
00506 // CPadView Tab Stops
00507
00508 void CPadView::OnSetTabStops()
00509 {
00510   CSetTabStops dlg;
00511   dlg.m_nTabStops = m_nTabStops/4;
00512   if (dlg.DoModal() == IDOK)
00513   {
00514     CWaitCursor wait;
00515     SetTabStops(dlg.m_nTabStops*4);
00516     m_nDefTabStops = m_nTabStops;
00517
00518     // notify container that content changed
00519     GetDocument()->UpdateAllItems(NULL);
00520   }
00521 }
00522
00523 /////////////////////////////////////////////////////////////////////////////
00524 // CPadView Word Wrap
00525
00526 void CPadView::OnUpdateWordWrap(CCmdUI* pCmdUI)
00527 {
00528   pCmdUI->SetCheck(IsWordWrap());
00529 }
00530
00531 void CPadView::OnWordWrap()
00532 {
00533   CWaitCursor wait;
00534   SetWordWrap(!IsWordWrap());
00535   m_bDefWordWrap = IsWordWrap();
00536 }
00537
00538 /////////////////////////////////////////////////////////////////////////////
00539 // CPadView commands
00540
00541 void CPadView::OnRButtonDown(UINT, CPoint)
00542 {
00543   GetParentFrame()->BringWindowToTop();
00544 }
00545
00546 void CPadView::OnSize(UINT nType, int cx, int cy)
00547 {
00548   CWaitCursor wait;
00549   CEditView::OnSize(nType, cx, cy);
00550
00551   CFrameWnd* pFrameWnd = GetParentFrame();
00552   ASSERT_VALID(pFrameWnd);
00553
00554   if ((pFrameWnd->GetStyle() & WS_VISIBLE) &&
00555     pFrameWnd->IsKindOf(RUNTIME_CLASS(COleIPFrameWnd)))
00556   {
00557     // update the cx part of the extent to the width of the control
00558     COleServerItem* pItem = GetDocument()->GetEmbeddedItem();
00559
00560     // only update if it has actually changed
00561     if ((int)pItem->m_sizeExtent.cx != cx)
00562     {
00563       pItem->m_sizeExtent.cx = cx;
00564       OnEditChange();
00565     }
00566   }
00567 }
00568
00569 /////////////////////////////////////////////////////////////////////////////
00570 // CPadView OLE support
00571
00572 void CPadView::OnEditChange()
00573 {
00574   CEditView::OnEditChange();
00575
00576   if (m_uTimerID != 0) // if outstanding timer kill it
00577     KillTimer(m_uTimerID);
00578   m_uTimerID = (UINT)SetTimer(1, 200, NULL); //set a timer for 200 milliseconds
00579   if (m_uTimerID == 0) // no timer available so force update now
00580     GetDocument()->UpdateAllItems(NULL);
00581 }
00582
00583 void CPadView::OnEditCopy()
00584 {
00585   CWaitCursor wait;
00586
00587   // get the current selection
00588   UINT nFrom = 0;
00589   UINT nTo =0;
00590
00591   GetEditCtrl().GetSel((int&)nFrom, (int&)nTo);
00592
00593   // what gets copied depends on partial vs. full selection
00594   if ((nFrom == 0 && nTo == (UINT)GetWindowTextLength()))
00595   {
00596     // copy entire document to the clipboard
00597     GetDocument()->GetEmbeddedItem()->CopyToClipboard(TRUE);
00598   }
00599   else
00600   {
00601     // copy linked item to clipboard
00602     CPadLinkItem item(GetDocument(), nFrom, nTo);
00603     item.CopyToClipboard(TRUE);
00604   }
00605 }
00606
00607 void CPadView::OnEditCut()
00608 {
00609   OnEditCopy();
00610   CEditView::OnEditCut();
00611 }
00612
00613 void CPadView::OnTimer(UINT_PTR nIDEvent)
00614 {
00615   if (m_uTimerID != nIDEvent) // not our timer
00616   {
00617     CEditView::OnTimer(nIDEvent);
00618     return;
00619   }
00620
00621   KillTimer(m_uTimerID); // kill one-shot timer
00622   m_uTimerID = 0;
00623   GetDocument()->UpdateAllItems(NULL);
00624 }
00625
00626 /////////////////////////////////////////////////////////////////////////////
00627 // CPadView diagnostics
00628
00629 #ifdef _DEBUG
00630 void CPadView::AssertValid() const
00631 {
00632   CEditView::AssertValid();
00633 }
00634
00635 void CPadView::Dump(CDumpContext& dc) const
00636 {
00637   CEditView::Dump(dc);
00638 }
00639 #endif //_DEBUG
00640
00641 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/unitspag.h Source File

  • ole
  • wordpad

unitspag.h

Go to the documentation of this file.
00001 // unitspag.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CUnitsPage dialog
00014
00015 class CUnitsPage : public CCSPropertyPage
00016 {
00017 // Construction
00018 public:
00019   CUnitsPage();   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CUnitsPage)
00023   enum { IDD = IDD_OPTIONS_UNITS };
00024   int     m_nUnits;
00025   BOOL    m_bWordSel;
00026   //}}AFX_DATA
00027
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CUnitsPage)
00032   protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 protected:
00038   static const DWORD m_nHelpIDs[];
00039   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00040
00041   // Generated message map functions
00042   //{{AFX_MSG(CUnitsPage)
00043     // NOTE: the ClassWizard will add member functions here
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/resource.h Source File

  • controls
  • button

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by BUTTON.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_BUTTON                      1
00015 #define IDB_BUTTON                      1
00016 #define IDS_BUTTON_PPG                  2
00017 #define IDI_ABOUTDLL                    10
00018 #define IDD_ABOUTBOX_BUTTON             100
00019 #define IDS_BUTTON_PPG_CAPTION          101
00020 #define IDD_PROPPAGE_BUTTON             101
00021 #define IDR_INPLACEMENU                 201
00022 #define IDC_CAPTIONEDIT                 201
00023 #define ID_OPTIONS_OPTION1              32768
00024 #define ID_OPTIONS_OPTION2              32769
00025 #define ID_OPTIONS_OPTION3              32770
00026 #define ID_HELP_BUTTONCONTROL           32771
00027
00028 // Next default values for new objects
00029 //
00030 #ifdef APSTUDIO_INVOKED
00031 #ifndef APSTUDIO_READONLY_SYMBOLS
00032
00033 #define _APS_NEXT_RESOURCE_VALUE        202
00034 #define _APS_NEXT_COMMAND_VALUE         32767
00035 #define _APS_NEXT_CONTROL_VALUE         202
00036 #define _APS_NEXT_SYMED_VALUE           101
00037 #endif
00038 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/resource.h Source File

  • vc2008fp
  • OutlookDemo

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by OutlookDemo.rc
00004 //
00005 #define IDC_APPLY                       3
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDS_MAIN_TOOLBAR                101
00008 #define IDS_ADV_TOOLBAR                 102
00009 #define IDS_WEB_TOOLBAR                 103
00010 #define IDD_MAILBAR                     103
00011 #define IDS_CUSTOMIZE                   104
00012 #define IDS_FOLDER_POPUP_CAPTION        105
00013 #define IDP_REST_OUTLOOK_PAGE           106
00014 #define IDS_WRONG_DISPLAY_SETTINGS      107
00015 #define IDR_MAINFRAME                   128
00016 #define IDR_OUTTYPE                     129
00017 #define IDR_CONTEXT_MENU                130
00018 #define IDR_ADVANCED                    148
00019 #define IDR_POPUP_OLBAR                 150
00020 #define IDR_POPUP_OLBAR2003             151
00021 #define IDR_WEB                         152
00022 #define IDB_OUTLOOK_LARGE               168
00023 #define IDB_OUTLOOK_SMALL               169
00024 #define IDR_MENU_IMAGES                 171
00025 #define IDR_DUMMY                       173
00026 #define IDB_PIN                         174
00027 #define IDB_HEADER_IMAGES               175
00028 #define IDB_LIST_IMAGES                 176
00029 #define IDR_MAILFRAME                   177
00030 #define IDD_APP_LOOK                    180
00031 #define IDB_ANIMATION                   182
00032 #define IDB_PAGES                       183
00033 #define IDB_ADVANCED_HC                 185
00034 #define IDB_WEB_HC                      186
00035 #define IDB_MAIL_HC                     187
00036 #define IDB_MENU_IMAGE_HC               188
00037 #define IDB_TOOLBAR_HC                  189
00038 #define IDB_PAGES_HC                    190
00039 #define IDB_PAGES_SMALL_HC              191
00040 #define IDB_PAGES_SMALL                 192
00041 #define IDB_OUTLOOK_LARGE_HC            193
00042 #define IDB_OUTLOOK_SMALL_HC            194
00043 #define IDB_ANIMATION_HC                196
00044 #define IDD_ABOUTBOX                    999
00045 #define IDC_MAIL                        1000
00046 #define IDC_APP_LOOK1                   1012
00047 #define IDC_APP_LOOK2                   1013
00048 #define IDC_APP_LOOK3                   1014
00049 #define IDC_SHOW_AT_STARTUP             1015
00050 #define IDC_STYLE2007                   1033
00051 #define IDC_MAIL_TO                     1041
00052 #define IDC_MAIL_CC                     1042
00053 #define IDC_MAIL_TO_NAME                1043
00054 #define IDC_MAIL_CC_NAME                1044
00055 #define IDC_OUTLOOKBAR2003              1044
00056 #define IDC_MAIL_SUBJECT_NAME           1045
00057 #define ID_VIEW_CUSTOMIZE               32770
00058 #define ID_VIEW_TOOLBARS                32771
00059 #define ID_VIEW_USER_TOOLBAR1           32793
00060 #define ID_VIEW_USER_TOOLBAR2           32794
00061 #define ID_VIEW_USER_TOOLBAR3           32795
00062 #define ID_VIEW_USER_TOOLBAR4           32796
00063 #define ID_VIEW_USER_TOOLBAR5           32797
00064 #define ID_VIEW_USER_TOOLBAR6           32798
00065 #define ID_VIEW_USER_TOOLBAR7           32799
00066 #define ID_VIEW_USER_TOOLBAR8           32800
00067 #define ID_VIEW_USER_TOOLBAR9           32801
00068 #define ID_VIEW_USER_TOOLBAR10          32802
00069 #define ID_VIEW_MY_COMPUTER             32803
00070 #define ID_TOOLS_ENTRY                  32805
00071 #define ID_USER_TOOL1                   32806
00072 #define ID_USER_TOOL2                   32807
00073 #define ID_USER_TOOL3                   32808
00074 #define ID_USER_TOOL4                   32809
00075 #define ID_USER_TOOL5                   32810
00076 #define ID_USER_TOOL6                   32811
00077 #define ID_USER_TOOL7                   32812
00078 #define ID_USER_TOOL8                   32813
00079 #define ID_USER_TOOL9                   32814
00080 #define ID_USER_TOOL10                  32815
00081 #define ID_SEND_RECEIVE                 32816
00082 #define ID_ADDRESS_BOOK                 32817
00083 #define ID_FIND_CONTACT                 32818
00084 #define ID_VIEW_HOME                    32819
00085 #define ID_VIEW_BACK                    32820
00086 #define ID_VIEW_FORWARD                 32821
00087 #define ID_SHOW_FOLDERS_POPUP           32822
00088 #define ID_VIEW_UP                      32823
00089 #define ID_VIEW_FOLDER_LIST             32824
00090 #define ID_VIEW_PREVIEW_PANE            32825
00091 #define ID_MAIL_MENU                    32826
00092 #define ID_RULES_WIZARD                 32827
00093 #define ID_VIEW_ADVANCED_TOOLBAR        32828
00094 #define ID_VIEW_WEB_TOOLBAR             32829
00095 #define ID_WEB_BACK                     32830
00096 #define ID_WEB_FORWARD                  32831
00097 #define ID_WEB_STOP                     32832
00098 #define ID_WEB_REFRESH                  32833
00099 #define ID_WEB_START                    32834
00100 #define ID_WEB_FIND                     32835
00101 #define ID_WEB_ADDRESS                  32836
00102 #define ID_VIEW_OUTLOOKBAR              32837
00103 #define ID_VIEW_CAPTIONBAR              32838
00104 #define ID_VIEW_GOTO_HOME               32839
00105 #define ID_VIEW_GOTO_CALENDAR           32840
00106 #define ID_VIEW_GOTO_DRAFTS             32841
00107 #define ID_VIEW_GOTO_INBOX              32842
00108 #define ID_VIEW_GOTO_JOURNAL            32843
00109 #define ID_VIEW_GOTO_NOTES              32844
00110 #define ID_VIEW_GOTO_OUTBOX             32845
00111 #define ID_VIEW_GOTO_SENTITEMS          32846
00112 #define ID_VIEW_GOTO_TASKS              32847
00113 #define ID_VIEW_GOTO_PERSONAL           32848
00114 #define ID_MAIL_BAR                     32848
00115 #define ID_VIEW_GOTO_FAVORITES          32849
00116 #define ID_NEW_MAIL                     32850
00117 #define ID_NEW_FAX                      32851
00118 #define ID_NEW_POST_FOLDER              32852
00119 #define ID_NEW_APPOINTMENT              32853
00120 #define ID_NEW_MEETING                  32854
00121 #define ID_NEW_FOLDER                   32855
00122 #define ID_NEW_SHORTCUT                 32856
00123 #define ID_NEW_CONTRACT                 32857
00124 #define ID_NEW_DISTRIBUTION_LIST        32858
00125 #define ID_NEW_TASK                     32859
00126 #define ID_NEW_TASK_REQUEST             32860
00127 #define ID_NEW_JOURNAL_ENTRY            32861
00128 #define ID_NEW_NOTE                     32862
00129 #define ID_DUMMY                        32866
00130 #define ID_MAIL_SEND                    32867
00131 #define ID_MAIL_SAVE                    32868
00132 #define ID_MAIL_PRINT                   32869
00133 #define ID_MAIL_SIGNATURE               32871
00134 #define ID_MAIL_ATTACHMENT              32872
00135 #define ID_MAIL_CHECK_NAMES             32873
00136 #define ID_MAIL_HIGHT_PRIORITY          32874
00137 #define ID_MAIL_LOW_PRIORITY            32875
00138 #define ID_MAIL_FLAG                    32876
00139 #define ID_MAIL_OPTIONS                 32877
00140 #define ID_MAIL_FONTSIZE                32878
00141 #define ID_MAIL_SAVE_ATTACHMENTS        32879
00142 #define ID_MAIL_SAVE_STATIONERY         32880
00143 #define ID_MAIL_DELETE                  32881
00144 #define ID_MAIL_MOVE_TO_FOLDER          32882
00145 #define ID_MAIL_COPY_TO_FOLDER          32883
00146 #define ID_MAIL_PROPERTIES              32884
00147 #define ID_MAIL_ITEM                    32885
00148 #define ID_MAIL_SPELL                   32886
00149 #define ID_VIEW_MAIL_TOOLBAR            32887
00150 #define ID_MAIL_CLOSE                   32888
00151 #define ID_OUTLOOK_SHOW_BACKGROUND      32889
00152 #define ID_OUTLOOK_SHOW_TEXT_LABELS     32890
00153 #define ID_OUTLOOK_ADD_PAGE             32891
00154 #define ID_OUTLOOK_RENAME_PAGE          32892
00155 #define ID_OUTLOOK_DELETE_PAGE          32893
00156 #define ID_OUTLOOK_ANIMATION            32894
00157 #define ID_RESET_PAGE                   32895
00158 #define ID_VIEW_APP_LOOK                32950
00159 #define ID_VIEW_OUTLOOKBAR2003          32951
00160 #define ID_INDICATOR_ANIMATION          59142
00161
00162 // Next default values for new objects
00163 //
00164 #ifdef APSTUDIO_INVOKED
00165 #ifndef APSTUDIO_READONLY_SYMBOLS
00166 #define _APS_3D_CONTROLS                     1
00167 #define _APS_NEXT_RESOURCE_VALUE        197
00168 #define _APS_NEXT_COMMAND_VALUE         32896
00169 #define _APS_NEXT_CONTROL_VALUE         1045
00170 #define _APS_NEXT_SYMED_VALUE           108
00171 #endif
00172 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/PropertiesDlg.cpp Source File

  • internet
  • DHtmlExplore

PropertiesDlg.cpp

Go to the documentation of this file.
00001 // PropertiesDlg.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "DHtmlExplore.h"
00013 #include "PropertiesDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CPropertiesDlg dialog
00023
00024
00025 CPropertiesDlg::CPropertiesDlg(CWnd* pParent /*=NULL*/)
00026   : CDHtmlDialog(CPropertiesDlg::IDD, 0, pParent)
00027 {
00028   //{{AFX_DATA_INIT(CPropertiesDlg)
00029     // NOTE: the ClassWizard will add member initialization here
00030   //}}AFX_DATA_INIT
00031   m_dwFileAttributes = 0;
00032   m_nReadOnly = 0;
00033   m_nArchive = 0;
00034   m_nHidden = 0;
00035   m_nSystem = 0;
00036 }
00037
00038
00039 void CPropertiesDlg::DoDataExchange(CDataExchange* pDX)
00040 {
00041   CDHtmlDialog::DoDataExchange(pDX);
00042   //{{AFX_DATA_MAP(CPropertiesDlg)
00043     // NOTE: the ClassWizard will add DDX and DDV calls here
00044   //}}AFX_DATA_MAP
00045   DDX_DHtml_ElementInnerText(pDX, _T("filename"), m_strFileName);
00046   DDX_DHtml_ElementInnerText(pDX, _T("filetype"), m_strType);
00047   DDX_DHtml_ElementInnerText(pDX, _T("filesize"), m_strFileSize);
00048   DDX_DHtml_ElementInnerText(pDX, _T("createtime"), m_strCreationTime);
00049   DDX_DHtml_ElementInnerText(pDX, _T("modifiedtime"), m_strModificationTime);
00050   DDX_DHtml_ElementInnerText(pDX, _T("accessedtime"), m_strAccessTime);
00051   DDX_DHtml_CheckBox(pDX, _T("readonly"), m_nReadOnly);
00052   DDX_DHtml_CheckBox(pDX, _T("archive"), m_nArchive);
00053   DDX_DHtml_CheckBox(pDX, _T("hidden"), m_nHidden);
00054   DDX_DHtml_CheckBox(pDX, _T("system"), m_nSystem);
00055 }
00056
00057
00058 BEGIN_MESSAGE_MAP(CPropertiesDlg, CDHtmlDialog)
00059   //{{AFX_MSG_MAP(CPropertiesDlg)
00060   //}}AFX_MSG_MAP
00061 END_MESSAGE_MAP()
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CPropertiesDlg message handlers
00065
00066 BOOL CPropertiesDlg::OnInitDialog()
00067 {
00068   SetHostFlags(DOCHOSTUIFLAG_FLAT_SCROLLBAR);
00069
00070   CDHtmlDialog::OnInitDialog();
00071
00072   // get the properties of the file
00073   WIN32_FIND_DATA finddata;
00074   HANDLE hFind = FindFirstFile(m_strFileName, &finddata);
00075   FindClose(hFind);
00076
00077   if (hFind == INVALID_HANDLE_VALUE)
00078     // File was not found.
00079     return TRUE;
00080
00081   // copy the file data to internal members
00082   m_strType = finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ?
00083     _T("Directory") : _T("File");
00084   m_strFileSize.Format(_T("%lu"), finddata.nFileSizeLow);
00085   m_strCreationTime = CTime(finddata.ftCreationTime).Format(_T("%A, %B %d, %Y"));
00086   m_strModificationTime = CTime(finddata.ftLastWriteTime).Format(_T("%A, %B %d, %Y"));
00087   m_strAccessTime = CTime(finddata.ftLastAccessTime).Format(_T("%A, %B %d, %Y"));
00088   m_dwFileAttributes = finddata.dwFileAttributes;
00089
00090   m_nReadOnly = (m_dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? BST_CHECKED : BST_UNCHECKED;
00091   m_nHidden = (m_dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ? BST_CHECKED : BST_UNCHECKED;
00092   m_nArchive = (m_dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ? BST_CHECKED : BST_UNCHECKED;
00093   m_nSystem = (m_dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) ? BST_CHECKED : BST_UNCHECKED;
00094
00095   LoadFromResource(IDR_PROPERTIES);
00096
00097   return TRUE;  // return TRUE unless you set the focus to a control
00098                 // EXCEPTION: OCX Property Pages should return FALSE
00099 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControlsPropSheet.h Source File

  • vc2008fp
  • NewControls

NewControlsPropSheet.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "Page1.h"
00013 #include "Page2.h"
00014 #include "Page3.h"
00015 #include "Page4.h"
00016 #include "Page5.h"
00017 #include "Page6.h"
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // NewControlsPropSheet
00021
00022 class NewControlsPropSheet : public CMFCPropertySheet
00023 {
00024   DECLARE_DYNAMIC(NewControlsPropSheet)
00025
00026 // Construction
00027 public:
00028   NewControlsPropSheet(CWnd* pParentWnd = NULL);
00029
00030 // Attributes
00031 public:
00032   CPage1 m_Page1;
00033   CPage2 m_Page2;
00034   CPage3 m_Page3;
00035   CPage4 m_Page4;
00036   CPage5 m_Page5;
00037   CPage6 m_Page6;
00038
00039   HICON m_hIcon;
00040
00041 // Overrides
00042 public:
00043   virtual BOOL OnInitDialog();
00044
00045 // Implementation
00046 public:
00047   virtual ~NewControlsPropSheet();
00048
00049 protected:
00050   afx_msg HCURSOR OnQueryDragIcon();
00051   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00052
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/stdafx.h Source File

  • general
  • mdi

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
00017 #include <afxdlgs.h>        // CommDlg Wrappers
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPalApp Member List

This is the complete list of members for CPalApp, including all inherited members.
ExitInstance() | CPalApp
InitInstance() | CPalApp
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTimeApp Member List

This is the complete list of members for CTimeApp, including all inherited members.
ExitInstance() | CTimeApp
InitInstance() | CTimeApp
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contain.h Source File

  • controls
  • contain

contain.h

Go to the documentation of this file.
00001 // Contain.h : main header file for the CONTAINER application
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #ifndef __AFXWIN_H__
00012   #error include 'stdafx.h' before including this file for PCH
00013 #endif
00014
00015 #include "resource.h"       // main symbols
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CContainerApp:
00019 // See Contain.cpp for the implementation of this class
00020 //
00021
00022 class CContainerApp : public CWinApp
00023 {
00024 public:
00025   CContainerApp();
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CContainerApp)
00030   public:
00031   virtual BOOL InitInstance();
00032   //}}AFX_VIRTUAL
00033
00034 // Implementation
00035
00036   //{{AFX_MSG(CContainerApp)
00037   afx_msg void OnAppAbout();
00038     // NOTE - the ClassWizard will add and remove member functions here.
00039     //    DO NOT EDIT what you see in these blocks of generated code !
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/StdAfx.h Source File

  • general
  • CmnCtrl1

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #if !defined(AFX_STDAFX_H__A14ECE87_E24D_11D0_8286_00C04FD73634__INCLUDED_)
00015 #define AFX_STDAFX_H__A14ECE87_E24D_11D0_8286_00C04FD73634__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #include <afxdisp.h>        // MFC OLE automation classes
00026 #ifndef _AFX_NO_AFXCMN_SUPPORT
00027 #include <afxcmn.h>         // MFC support for Windows Common Controls
00028 #endif // _AFX_NO_AFXCMN_SUPPORT
00029 #include <afxdtctl.h>
00030
00031 //{{AFX_INSERT_LOCATION}}
00032 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00033
00034 #endif // !defined(AFX_STDAFX_H__A14ECE87_E24D_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/StdAfx.cpp Source File

  • vc2008fp
  • PaletteDemo

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  PaletteDemo.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/helloapp/helloapp.cpp Source File

  • general
  • helloapp

helloapp.cpp

Go to the documentation of this file.
00001 // helloapp.cpp : Minimal MFC Windows app.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <afxwin.h>
00013
00014 #ifdef MINIMAL
00015
00016 // Stub out non-critical CRT initialization functions
00017 extern "C" void _setenvp() { }
00018 extern "C" void _setargv() { }
00019
00020 // Define a window class derived from CWnd
00021 class CHelloWindow : public CWnd
00022 {
00023 public:
00024   CHelloWindow()
00025   {
00026     CreateEx(WS_EX_CLIENTEDGE,
00027       AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)(COLOR_WINDOW+1)),
00028       _T("Hello World!"), WS_OVERLAPPEDWINDOW,
00029       CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, 0);
00030   }
00031 };
00032
00033 #else
00034
00035 // Define a window class derived from CFrameWnd
00036 class CHelloWindow : public CFrameWnd
00037 {
00038 public:
00039   CHelloWindow()
00040     { Create(NULL, _T("Hello World!"), WS_OVERLAPPEDWINDOW, rectDefault); }
00041 };
00042
00043 #endif
00044
00045 // Define an application class derived from CWinApp
00046 class CHelloApp : public CWinApp
00047 {
00048 public:
00049   virtual BOOL InitInstance()
00050   {
00051     m_pMainWnd = new CHelloWindow();
00052     m_pMainWnd->ShowWindow(m_nCmdShow);
00053     m_pMainWnd->UpdateWindow();
00054     return TRUE;
00055   }
00056 };
00057
00058 CHelloApp HelloApp;  // HelloApp's constructor initializes and runs the app
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCommandLinkCtrlPage Member List

This is the complete list of members for CCommandLinkCtrlPage, including all inherited members.
CCommandLinkCtrlPage() | CCommandLinkCtrlPage |
DoDataExchange(CDataExchange *pDX) | CCommandLinkCtrlPage | [protected, virtual]
IDD enum value | CCommandLinkCtrlPage |
m_checkShowElev | CCommandLinkCtrlPage | [private]
m_cmdbtn | CCommandLinkCtrlPage | [private]
m_editNote | CCommandLinkCtrlPage | [private]
OnBnClickedCheckElev() | CCommandLinkCtrlPage |
OnBnClickedSetButtonNote() | CCommandLinkCtrlPage |
OnInitDialog() | CCommandLinkCtrlPage | [virtual]
~CCommandLinkCtrlPage() | CCommandLinkCtrlPage | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBounceWnd Member List

This is the complete list of members for CBounceWnd, including all inherited members.
CBounceWnd() | CBounceWnd |
CBounceWnd() | CBounceWnd |
ChangeSpeed() | CBounceWnd | [protected]
ChangeSpeed() | CBounceWnd | [protected]
Create(LPCTSTR szTitle, LONG style, const RECT &rect, CWnd *pParent) | CBounceWnd |
Create(LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL) | CBounceWnd |
m_bFastSpeed | CBounceWnd | [protected]
m_bmBall | CBounceWnd | [protected]
m_clrBall | CBounceWnd | [protected]
m_nIDColor | CBounceWnd | [protected]
m_ptCenter | CBounceWnd | [protected]
m_ptPixel | CBounceWnd | [protected]
m_sizeMove | CBounceWnd | [protected]
m_sizeRadius | CBounceWnd | [protected]
m_sizeTotal | CBounceWnd | [protected]
MakeNewBall() | CBounceWnd | [protected]
MakeNewBall() | CBounceWnd | [protected]
menu | CBounceWnd | [protected, static]
OnColor() | CBounceWnd | [protected]
OnColor() | CBounceWnd | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CBounceWnd | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CBounceWnd | [protected]
OnCustomColor() | CBounceWnd | [protected]
OnCustomColor() | CBounceWnd | [protected]
OnDelegatedCmdMsg(WPARAM, LPARAM) | CBounceWnd | [protected]
OnDestroy() | CBounceWnd | [protected]
OnFast() | CBounceWnd | [protected]
OnFast() | CBounceWnd | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CBounceWnd | [protected]
OnPrepareToClose(WPARAM wParam=0, LPARAM lParam=0) | CBounceWnd | [protected]
OnSize(UINT nType, int cx, int cy) | CBounceWnd | [protected]
OnSize(UINT nType, int cx, int cy) | CBounceWnd | [protected]
OnSlow() | CBounceWnd | [protected]
OnSlow() | CBounceWnd | [protected]
OnTimer(UINT_PTR nIDEvent) | CBounceWnd | [protected]
OnTimer(UINT_PTR nIDEvent) | CBounceWnd | [protected]
OnUpdateColor(CCmdUI *pCmdUI) | CBounceWnd | [protected]
OnUpdateColor(CCmdUI *pCmdUI) | CBounceWnd | [protected]
OnUpdateFast(CCmdUI *pCmdUI) | CBounceWnd | [protected]
OnUpdateFast(CCmdUI *pCmdUI) | CBounceWnd | [protected]
OnUpdateSlow(CCmdUI *pCmdUI) | CBounceWnd | [protected]
OnUpdateSlow(CCmdUI *pCmdUI) | CBounceWnd | [protected]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailView.cpp Source File

  • vc2008fp
  • OutlookDemo

MailView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "MailView.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMailView
00022
00023 IMPLEMENT_DYNCREATE(CMailView, CEditView)
00024
00025 CMailView::CMailView()
00026 {
00027   m_nPriority = 1;
00028 }
00029
00030 CMailView::~CMailView()
00031 {
00032 }
00033
00034 BEGIN_MESSAGE_MAP(CMailView, CEditView)
00035   ON_COMMAND(ID_MAIL_ATTACHMENT, OnMailAttachment)
00036   ON_COMMAND(ID_MAIL_CHECK_NAMES, OnMailCheckNames)
00037   ON_COMMAND(ID_MAIL_COPY_TO_FOLDER, OnMailCopyToFolder)
00038   ON_COMMAND(ID_MAIL_DELETE, OnMailDelete)
00039   ON_COMMAND(ID_MAIL_FLAG, OnMailFlag)
00040   ON_COMMAND(ID_MAIL_FONTSIZE, OnMailFontsize)
00041   ON_COMMAND(ID_MAIL_HIGHT_PRIORITY, OnMailHightPriority)
00042   ON_UPDATE_COMMAND_UI(ID_MAIL_HIGHT_PRIORITY, OnUpdateMailHightPriority)
00043   ON_COMMAND(ID_MAIL_ITEM, OnMailItem)
00044   ON_COMMAND(ID_MAIL_LOW_PRIORITY, OnMailLowPriority)
00045   ON_UPDATE_COMMAND_UI(ID_MAIL_LOW_PRIORITY, OnUpdateMailLowPriority)
00046   ON_COMMAND(ID_MAIL_MOVE_TO_FOLDER, OnMailMoveToFolder)
00047   ON_COMMAND(ID_MAIL_OPTIONS, OnMailOptions)
00048   ON_COMMAND(ID_MAIL_PROPERTIES, OnMailProperties)
00049   ON_COMMAND(ID_MAIL_SAVE, OnMailSave)
00050   ON_COMMAND(ID_MAIL_SAVE_ATTACHMENTS, OnMailSaveAttachments)
00051   ON_COMMAND(ID_MAIL_SAVE_STATIONERY, OnMailSaveStationery)
00052   ON_COMMAND(ID_MAIL_SEND, OnMailSend)
00053   ON_COMMAND(ID_MAIL_SIGNATURE, OnMailSignature)
00054   ON_COMMAND(ID_MAIL_SPELL, OnMailSpell)
00055   ON_COMMAND(IDC_MAIL_TO, OnMailTo)
00056   ON_COMMAND(IDC_MAIL_CC, OnMailCc)
00057 END_MESSAGE_MAP()
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CMailView diagnostics
00061
00062 #ifdef _DEBUG
00063 void CMailView::AssertValid() const
00064 {
00065   CEditView::AssertValid();
00066 }
00067
00068 void CMailView::Dump(CDumpContext& dc) const
00069 {
00070   CEditView::Dump(dc);
00071 }
00072 #endif //_DEBUG
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CMailView message handlers
00076
00077 void CMailView::OnMailTo()
00078 {
00079 }
00080
00081 void CMailView::OnMailCc()
00082 {
00083 }
00084
00085 void CMailView::OnMailAttachment()
00086 {
00087   // TODO: Add your command handler code here
00088 }
00089
00090 void CMailView::OnMailCheckNames()
00091 {
00092   // TODO: Add your command handler code here
00093 }
00094
00095 void CMailView::OnMailCopyToFolder()
00096 {
00097   // TODO: Add your command handler code here
00098 }
00099
00100 void CMailView::OnMailDelete()
00101 {
00102   // TODO: Add your command handler code here
00103 }
00104
00105 void CMailView::OnMailFlag()
00106 {
00107   // TODO: Add your command handler code here
00108 }
00109
00110 void CMailView::OnMailFontsize()
00111 {
00112   // TODO: Add your command handler code here
00113 }
00114
00115 void CMailView::OnMailHightPriority()
00116 {
00117   m_nPriority = m_nPriority == 2 ? 1 : 2;
00118 }
00119
00120 void CMailView::OnUpdateMailHightPriority(CCmdUI* pCmdUI)
00121 {
00122   pCmdUI->SetCheck(m_nPriority == 2);
00123 }
00124
00125 void CMailView::OnMailItem()
00126 {
00127   // TODO: Add your command handler code here
00128 }
00129
00130 void CMailView::OnMailLowPriority()
00131 {
00132   m_nPriority = m_nPriority == 0 ? 1 : 0;
00133 }
00134
00135 void CMailView::OnUpdateMailLowPriority(CCmdUI* pCmdUI)
00136 {
00137   pCmdUI->SetCheck(m_nPriority == 0);
00138 }
00139
00140 void CMailView::OnMailMoveToFolder()
00141 {
00142   // TODO: Add your command handler code here
00143 }
00144
00145 void CMailView::OnMailOptions()
00146 {
00147   // TODO: Add your command handler code here
00148 }
00149
00150 void CMailView::OnMailProperties()
00151 {
00152   // TODO: Add your command handler code here
00153 }
00154
00155 void CMailView::OnMailSave()
00156 {
00157   // TODO: Add your command handler code here
00158 }
00159
00160 void CMailView::OnMailSaveAttachments()
00161 {
00162   // TODO: Add your command handler code here
00163 }
00164
00165 void CMailView::OnMailSaveStationery()
00166 {
00167   // TODO: Add your command handler code here
00168 }
00169
00170 void CMailView::OnMailSend()
00171 {
00172   GetParentFrame()->SendMessage(WM_CLOSE);
00173 }
00174
00175 void CMailView::OnMailSignature()
00176 {
00177   // TODO: Add your command handler code here
00178 }
00179
00180 void CMailView::OnMailSpell()
00181 {
00182   // TODO: Add your command handler code here
00183 }
00184
00185 void CMailView::OnInitialUpdate()
00186 {
00187   CEditView::OnInitialUpdate();
00188   GetEditCtrl().ModifyStyle(0, WS_BORDER);
00189 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/ctrltest.h Source File

  • general
  • ctrltest

ctrltest.h

Go to the documentation of this file.
00001 // ctrltest.h : main window class interface
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "resource.h"
00013 #include "res\otherids.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // ColorMenu - used for custom menu test
00017 //   included here to show how it should be embedded as a member of the
00018 //   main frame window that uses it.  The implementation is in custmenu.cpp
00019
00020 class CColorMenu : public CMenu
00021 {
00022 public:
00023 // Operations
00024   void AppendColorMenuItem(UINT nID, COLORREF color);
00025
00026 // Implementation
00027   virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
00028   virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
00029   CColorMenu();
00030   virtual ~CColorMenu();
00031 };
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // Main Window
00035 //   used as the context for running all the tests
00036
00037 class CTestWindow : public CFrameWnd
00038 {
00039 public:
00040   // construction helpers
00041   void SetupMenus();
00042
00043 protected:
00044   // custom menu tests implementation in custmenu.cpp
00045   void AttachCustomMenu();
00046   CColorMenu  m_colorMenu;
00047   virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00048
00049 // Implementation
00050   //{{AFX_MSG(CTestWindow)
00051   afx_msg void OnTestDerivedEdit();           // simple test
00052   afx_msg void OnTestWndClassEdit();          // simple test
00053   afx_msg void OnTestSubclassedEdit();        // simple test
00054   afx_msg void OnTestBitmapButton1();         // custom control
00055   afx_msg void OnTestBitmapButton2();         // custom control
00056   afx_msg void OnTestBitmapButton3();         // custom control
00057   afx_msg void OnTestCustomList();            // custom control
00058   afx_msg void OnTestSpinEdit();          // custom control
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CButtonPropPage Member List

This is the complete list of members for CButtonPropPage, including all inherited members.
CButtonPropPage() | CButtonPropPage |
DoDataExchange(CDataExchange *pDX) | CButtonPropPage | [protected, virtual]
IDD enum value | CButtonPropPage |
m_Caption | CButtonPropPage |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dispatch.cpp Source File

  • ole
  • oleview
  • iviewers

dispatch.cpp

Go to the documentation of this file.
00001 // dispatch.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "iviewers.h"
00015 #include "iview.h"
00016 #include "iviewer.h"
00017 #include "dispatch.h"
00018 #include "util.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CDispatchViewer
00027
00028 IMPLEMENT_DYNCREATE(CDispatchViewer, CInterfaceViewer)
00029
00030 CDispatchViewer::CDispatchViewer()
00031 {
00032 }
00033
00034 CDispatchViewer::~CDispatchViewer()
00035 {
00036 }
00037
00038 BEGIN_MESSAGE_MAP(CDispatchViewer, CInterfaceViewer)
00039 //  //{{AFX_MSG_MAP(CDispatchViewer)
00040 //      // NOTE - the ClassWizard will add and remove mapping macros here.
00041 //  //}}AFX_MSG_MAP
00042 END_MESSAGE_MAP()
00043
00044 IMPLEMENT_OLECREATE(CDispatchViewer, "Ole2View.IDispatch.1", 0xd2af7a60, 0x4c42, 0x11ce, 0xb2, 0x7d, 0x00, 0xaa, 0x00, 0x1f, 0x73, 0xc1) ;
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CDispatchViewer View imp.
00048
00049 //
00050
00051 HRESULT CDispatchViewer::OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk)
00052 {
00053   SCODE sc = NOERROR ;
00054
00055   ASSERT(hwndParent);
00056   ENSURE(punk);
00057
00058   if (riid != IID_IDispatch)
00059   {
00060     AfxMessageBox( _T("IDispatch interface viewer only supports IID_IDispatch") ) ;
00061     return E_INVALIDARG ;
00062   }
00063
00064   CDispatchDlg dlg(CWnd::FromHandle(hwndParent)) ;
00065
00066   sc = punk->QueryInterface( riid, (void**)&dlg.m_pdisp ) ;
00067   if (FAILED(sc))
00068   {
00069     ErrorMessage( "Object does not support IDispatch.", sc ) ;
00070     return E_UNEXPECTED ;
00071   }
00072
00073   dlg.DoModal() ;
00074
00075   dlg.m_pdisp->Release() ;
00076
00077   return sc ;
00078 }
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CDispatchDlg dialog
00081
00082
00083 CDispatchDlg::CDispatchDlg(CWnd* pParent /*=NULL*/)
00084   : CDialog(CDispatchDlg::IDD, pParent)
00085 {
00086   //{{AFX_DATA_INIT(CDispatchDlg)
00087   m_uiTypeInfoCount = 0;
00088   //}}AFX_DATA_INIT
00089   m_pdisp = NULL ;
00090 }
00091
00092
00093 void CDispatchDlg::DoDataExchange(CDataExchange* pDX)
00094 {
00095   CDialog::DoDataExchange(pDX);
00096   //{{AFX_DATA_MAP(CDispatchDlg)
00097   DDX_Control(pDX, IDC_VIEWTYPEINFO, m_btnViewTypeInfo);
00098   DDX_Text(pDX, IDC_TYPEINFOCOUNT, m_uiTypeInfoCount);
00099   //}}AFX_DATA_MAP
00100
00101   m_btnViewTypeInfo.EnableWindow(m_uiTypeInfoCount != 0) ;
00102 }
00103
00104
00105 BEGIN_MESSAGE_MAP(CDispatchDlg, CDialog)
00106   //{{AFX_MSG_MAP(CDispatchDlg)
00107   ON_BN_CLICKED(IDC_VIEWTYPEINFO, OnViewTypeInfo)
00108   //}}AFX_MSG_MAP
00109 END_MESSAGE_MAP()
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CDispatchDlg message handlers
00114
00115 void CDispatchDlg::OnViewTypeInfo()
00116 {
00117   // TODO:
00118   // if (m_uiTypeInfoCount > 0) // should never be > 1
00119   //    Call IDispatch::GetTypeInfo
00120   //    Pop up ITypeInfo Viewer in the resulting ITypeInfo*
00121   //    (note that there is currently no ITypeInfo viewer, but
00122   //     the ITypeLib viewer could easily be modified/extended
00123   //     to browse a specific ITypeInfo).
00124
00125 }
00126
00127 BOOL CDispatchDlg::OnInitDialog()
00128 {
00129   ENSURE(m_pdisp);
00130
00131   HRESULT hr ;
00132   hr = m_pdisp->GetTypeInfoCount( &m_uiTypeInfoCount ) ;
00133   if (FAILED(hr))
00134   {
00135     m_uiTypeInfoCount = 0 ;
00136     ErrorMessage( "IDispatch::GetTypeInfoCount failed.", hr ) ;
00137   }
00138
00139   CDialog::OnInitDialog();
00140
00141   return TRUE;  // return TRUE unless you set the focus to a control
00142           // EXCEPTION: OCX Property Pages should return FALSE
00143 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/AppLookDlg.cpp Source File

  • vc2008fp
  • OutlookDemo

AppLookDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "AppLookDlg.h"
00013 #include "MainFrm.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CAppLookDlg dialog
00023
00024 CAppLookDlg::CAppLookDlg(BOOL bStartup, CWnd* pParent /*=NULL*/) :
00025   CDialog(CAppLookDlg::IDD, pParent), m_bStartup(bStartup)
00026 {
00027   m_nAppLook = 1;
00028   m_bShowAtStartup = FALSE;
00029   m_bOutlookBar2003 = FALSE;
00030   m_nStyle2007 = 0;
00031
00032   m_nAppLook = theApp.GetInt(_T("AppLook"), 2);
00033   m_bShowAtStartup = theApp.GetInt(_T("ShowAppLookAtStartup"), TRUE);
00034   m_nStyle2007 = theApp.GetInt(_T("Style2007"), 0);
00035   m_bOutlookBar2003 = theApp.GetInt(_T("OutlookBar2003"), m_nAppLook == 2);
00036 }
00037
00038 void CAppLookDlg::DoDataExchange(CDataExchange* pDX)
00039 {
00040   CDialog::DoDataExchange(pDX);
00041   DDX_Control(pDX, IDC_STYLE2007, m_wndStyle2007);
00042   DDX_Control(pDX, IDC_OUTLOOKBAR2003, m_wndOutlookBar2003);
00043   DDX_Control(pDX, IDOK, m_wndOK);
00044   DDX_Control(pDX, IDCANCEL, m_wndCancel);
00045   DDX_Radio(pDX, IDC_APP_LOOK1, m_nAppLook);
00046   DDX_Check(pDX, IDC_SHOW_AT_STARTUP, m_bShowAtStartup);
00047   DDX_Check(pDX, IDC_OUTLOOKBAR2003, m_bOutlookBar2003);
00048   DDX_CBIndex(pDX, IDC_STYLE2007, m_nStyle2007);
00049 }
00050
00051 BEGIN_MESSAGE_MAP(CAppLookDlg, CDialog)
00052   ON_BN_CLICKED(IDC_APPLY, OnApply)
00053   ON_BN_CLICKED(IDC_APP_LOOK1, OnAppLook)
00054   ON_BN_CLICKED(IDC_APP_LOOK2, OnAppLook)
00055   ON_BN_CLICKED(IDC_APP_LOOK3, OnAppLook)
00056 END_MESSAGE_MAP()
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CAppLookDlg message handlers
00060
00061 BOOL CAppLookDlg::OnInitDialog()
00062 {
00063   CDialog::OnInitDialog();
00064
00065   SetLook();
00066
00067   m_wndStyle2007.EnableWindow(m_nAppLook == 2);
00068
00069   if (m_bStartup)
00070   {
00071     if (!m_bShowAtStartup)
00072     {
00073       EndDialog(IDCANCEL);
00074       return TRUE;
00075     }
00076
00077     CRect rectBtn;
00078
00079     // Hide "Cancel" button:
00080     m_wndCancel.GetWindowRect(rectBtn);
00081     ScreenToClient(rectBtn);
00082
00083     m_wndOK.MoveWindow(rectBtn);
00084
00085     m_wndCancel.ShowWindow(SW_HIDE);
00086   }
00087
00088   return TRUE;  // return TRUE unless you set the focus to a control
00089 }
00090
00091 void CAppLookDlg::OnOK()
00092 {
00093   CDialog::OnOK();
00094   SetLook();
00095 }
00096
00097 void CAppLookDlg::OnApply()
00098 {
00099   SetLook();
00100
00101   if (!m_bStartup)
00102   {
00103     m_wndCancel.SetWindowText(_T("Close"));
00104   }
00105 }
00106
00107 void CAppLookDlg::SetLook()
00108 {
00109   UpdateData();
00110   OnAppLook();
00111
00112   switch (m_nAppLook)
00113   {
00114   case 0:
00115     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOfficeXP));
00116     break;
00117
00118   case 1:
00119     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
00120     break;
00121
00122   case 2:
00123     switch (m_nStyle2007)
00124     {
00125     case 0:
00126       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00127       break;
00128
00129     case 1:
00130       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00131       break;
00132
00133     case 2:
00134       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);
00135       break;
00136
00137     case 3:
00138       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);
00139       break;
00140     }
00141
00142     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));
00143     break;
00144   }
00145
00146   theApp.WriteInt(_T("AppLook"), m_nAppLook);
00147   theApp.WriteInt(_T("Style2007"), m_nStyle2007);
00148   theApp.WriteInt(_T("ShowAppLookAtStartup"), m_bShowAtStartup);
00149   theApp.WriteInt(_T("OutlookBar2003"), m_bOutlookBar2003);
00150
00151   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
00152   if (pMainFrame != NULL)
00153   {
00154     pMainFrame->OnChangeLook((m_nAppLook == 2 || m_nAppLook == 3) && m_bOutlookBar2003);
00155   }
00156 }
00157
00158 void CAppLookDlg::OnAppLook()
00159 {
00160   UpdateData();
00161
00162   m_wndStyle2007.EnableWindow(m_nAppLook == 2);
00163   m_wndOutlookBar2003.EnableWindow(m_nAppLook == 1 || m_nAppLook == 2);
00164 }
00165
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyPropertySheet Member List

This is the complete list of members for CMyPropertySheet, including all inherited members.
CMyPropertySheet(CMFCPropertySheet::PropSheetLook look, UINT uiIconsResID=0, int cxIcon=0) | CMyPropertySheet |
m_Page1 | CMyPropertySheet |
m_Page2 | CMyPropertySheet |
m_Page3 | CMyPropertySheet |
m_Page4 | CMyPropertySheet |
OnDrawPageHeader(CDC *pDC, int nPage, CRect rectHeader) | CMyPropertySheet | [virtual]
~CMyPropertySheet() | CMyPropertySheet | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStatPage Member List

This is the complete list of members for CStatPage, including all inherited members.
CStatPage() | CStatPage |
CStatPage() | CStatPage |
DoDataExchange(CDataExchange *pDX) | CStatPage | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CStatPage | [protected, virtual]
IDD enum value | CStatPage |
m_strCreateDate | CStatPage |
m_strEditTime | CStatPage |
m_strLastPrint | CStatPage |
m_strLastSave | CStatPage |
m_strNumChars | CStatPage |
m_strNumPages | CStatPage |
m_strNumWords | CStatPage |
m_strRevNum | CStatPage |
m_strSavedBy | CStatPage |
m_strSecurity | CStatPage |
~CStatPage() | CStatPage |
~CStatPage() | CStatPage |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/contrvw.cpp Source File

  • controls
  • contain

contrvw.cpp

Go to the documentation of this file.
00001 // ContrVw.cpp : implementation of the CContainerView class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Contain.h"
00013
00014 #include "ContrDoc.h"
00015 #include "CntrItem.h"
00016 #include "ContrVw.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CContainerView
00026
00027 IMPLEMENT_DYNCREATE(CContainerView, CView)
00028
00029 BEGIN_MESSAGE_MAP(CContainerView, CView)
00030   //{{AFX_MSG_MAP(CContainerView)
00031     // NOTE - the ClassWizard will add and remove mapping macros here.
00032     //    DO NOT EDIT what you see in these blocks of generated code!
00033   ON_WM_SETFOCUS()
00034   ON_WM_SIZE()
00035   ON_COMMAND(ID_OLE_INSERT_NEW, OnInsertObject)
00036   ON_COMMAND(ID_CANCEL_EDIT_CNTR, OnCancelEditCntr)
00037   ON_WM_LBUTTONDOWN()
00038   ON_WM_LBUTTONDBLCLK()
00039   ON_WM_SETCURSOR()
00040   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00041   ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR, OnUpdateEditClear)
00042   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00043   ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy)
00044   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00045   //}}AFX_MSG_MAP
00046   // Standard printing commands
00047   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00048   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00049   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CContainerView construction/destruction
00054
00055 CContainerView::CContainerView()
00056 {
00057   m_pSelection = NULL;
00058   // TODO: add construction code here
00059
00060 }
00061
00062 CContainerView::~CContainerView()
00063 {
00064 }
00065
00066 BOOL CContainerView::PreCreateWindow(CREATESTRUCT& cs)
00067 {
00068   // TODO: Modify the Window class or styles here by modifying
00069   //  the CREATESTRUCT cs
00070
00071   return CView::PreCreateWindow(cs);
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CContainerView drawing
00076
00077 void CContainerView::OnDraw(CDC* pDC)
00078 {
00079   CContainerDoc* pDoc = GetDocument();
00080   ASSERT_VALID(pDoc);
00081
00082   // draw the OLE items from the list
00083   POSITION pos = pDoc->GetStartPosition();
00084   while (pos != NULL)
00085   {
00086     // draw the item
00087     CContainerItem* pItem = (CContainerItem*)pDoc->GetNextItem(pos);
00088     pItem->Draw(pDC, pItem->m_rect);
00089
00090     // draw the tracker over the item
00091     CRectTracker tracker;
00092     SetupTracker(pItem, &tracker);
00093     tracker.Draw(pDC);
00094   }
00095 }
00096
00097 void CContainerView::OnInitialUpdate()
00098 {
00099   CView::OnInitialUpdate();
00100
00101   // TODO: remove this code when final selection model code is written
00102   m_pSelection = NULL;    // initialize selection
00103
00104 }
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CContainerView printing
00108
00109 BOOL CContainerView::OnPreparePrinting(CPrintInfo* pInfo)
00110 {
00111   // default preparation
00112   return DoPreparePrinting(pInfo);
00113 }
00114
00115 void CContainerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00116 {
00117   // TODO: add extra initialization before printing
00118 }
00119
00120 void CContainerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00121 {
00122   // TODO: add cleanup after printing
00123 }
00124
00125 /////////////////////////////////////////////////////////////////////////////
00126 // OLE Client support and commands
00127
00128 BOOL CContainerView::IsSelected(const CObject* pDocItem) const
00129 {
00130   // The implementation below is adequate if your selection consists of
00131   //  only CContainerItem objects.  To handle different selection
00132   //  mechanisms, the implementation here should be replaced.
00133
00134   // TODO: implement this function that tests for a selected OLE client item
00135
00136   return pDocItem == m_pSelection;
00137 }
00138
00139 void CContainerView::OnInsertObject()
00140 {
00141   // Invoke the standard Insert Object dialog box to obtain information
00142   //  for new CContainerItem object.
00143   COleInsertDialog dlg;
00144   if (dlg.DoModal() != IDOK)
00145     return;
00146
00147   BeginWaitCursor();
00148
00149   CContainerItem* pItem = NULL;
00150   TRY
00151   {
00152     // Create new item connected to this document.
00153     CContainerDoc* pDoc = GetDocument();
00154     ASSERT_VALID(pDoc);
00155     pItem = new CContainerItem(pDoc);
00156     ASSERT_VALID(pItem);
00157
00158     // Initialize the item from the dialog data.
00159     if (!dlg.CreateItem(pItem))
00160       AfxThrowMemoryException();  // any exception will do
00161     ASSERT_VALID(pItem);
00162     pItem->UpdateLink();
00163     pItem->UpdateFromServerExtent();
00164
00165     // If item created from class list (not from file) then launch
00166     //  the server to edit the item.
00167     if (dlg.GetSelectionType() == COleInsertDialog::createNewItem)
00168       pItem->DoVerb(OLEIVERB_SHOW, this);
00169
00170     ASSERT_VALID(pItem);
00171
00172     SetSelection(pItem);
00173     pItem->InvalidateItem();
00174   }
00175   CATCH(CException, e)
00176   {
00177     if (pItem != NULL)
00178     {
00179       ASSERT_VALID(pItem);
00180       pItem->Delete();
00181     }
00182     AfxMessageBox(IDP_FAILED_TO_CREATE);
00183   }
00184   END_CATCH
00185
00186   EndWaitCursor();
00187 }
00188
00189 // The following command handler provides the standard keyboard
00190 //  user interface to cancel an in-place editing session.  Here,
00191 //  the container (not the server) causes the deactivation.
00192 void CContainerView::OnCancelEditCntr()
00193 {
00194   // Close any in-place active item on this view.
00195   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00196   if (pActiveItem != NULL)
00197   {
00198     pActiveItem->Close();
00199   }
00200   ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00201 }
00202
00203 // Special handling of OnSetFocus and OnSize are required for a container
00204 //  when an object is being edited in-place.
00205 void CContainerView::OnSetFocus(CWnd* pOldWnd)
00206 {
00207   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00208   if (pActiveItem != NULL &&
00209     pActiveItem->GetItemState() == COleClientItem::activeUIState)
00210   {
00211     // need to set focus to this item if it is in the same view
00212     CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00213     if (pWnd != NULL)
00214     {
00215       pWnd->SetFocus();   // don't call the base class
00216       return;
00217     }
00218   }
00219
00220   CView::OnSetFocus(pOldWnd);
00221 }
00222
00223 void CContainerView::OnSize(UINT nType, int cx, int cy)
00224 {
00225   CView::OnSize(nType, cx, cy);
00226   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00227   if (pActiveItem != NULL)
00228     pActiveItem->SetItemRects();
00229 }
00230 CContainerItem* CContainerView::HitTestItems(CPoint point)
00231 {
00232   CContainerDoc* pDoc = GetDocument();
00233   CContainerItem* pItemHit = NULL;
00234   POSITION pos = pDoc->GetStartPosition();
00235   while (pos != NULL)
00236   {
00237     CContainerItem* pItem = (CContainerItem*)pDoc->GetNextItem(pos);
00238     if (pItem->m_rect.PtInRect(point))
00239       pItemHit = pItem;
00240   }
00241   return pItemHit;    // return top item at point
00242 }
00243
00244 void CContainerView::SetSelection(CContainerItem* pItem)
00245 {
00246   // close in-place active item
00247   if (pItem == NULL || m_pSelection != pItem)
00248   {
00249     COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00250     if (pActiveItem != NULL && pActiveItem != pItem)
00251       pActiveItem->Close();
00252   }
00253   // update view to new selection
00254   if (m_pSelection != pItem)
00255   {
00256     if (m_pSelection != NULL)
00257       OnUpdate(NULL, HINT_UPDATE_ITEM, m_pSelection);
00258
00259     m_pSelection = pItem;
00260     if (m_pSelection != NULL)
00261       OnUpdate(NULL, HINT_UPDATE_ITEM, m_pSelection);
00262   }
00263 }
00264
00265 void CContainerView::SetupTracker(CContainerItem* pItem, CRectTracker* pTracker)
00266 {
00267   pTracker->m_rect = pItem->m_rect;
00268
00269   if (pItem == m_pSelection)
00270     pTracker->m_nStyle |= CRectTracker::resizeInside;
00271
00272   if (pItem->GetType() == OT_LINK)
00273     pTracker->m_nStyle |= CRectTracker::dottedLine;
00274   else
00275     pTracker->m_nStyle |= CRectTracker::solidLine;
00276
00277   if (pItem->GetItemState() == COleClientItem::openState ||
00278     pItem->GetItemState() == COleClientItem::activeUIState)
00279   {
00280     pTracker->m_nStyle |= CRectTracker::hatchInside;
00281   }
00282 }
00283
00284
00285 /////////////////////////////////////////////////////////////////////////////
00286 // CContainerView diagnostics
00287
00288 #ifdef _DEBUG
00289 void CContainerView::AssertValid() const
00290 {
00291   CView::AssertValid();
00292 }
00293
00294 void CContainerView::Dump(CDumpContext& dc) const
00295 {
00296   CView::Dump(dc);
00297 }
00298
00299 CContainerDoc* CContainerView::GetDocument() // non-debug version is inline
00300 {
00301   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CContainerDoc)));
00302   return (CContainerDoc*)m_pDocument;
00303 }
00304 #endif //_DEBUG
00305
00306 /////////////////////////////////////////////////////////////////////////////
00307 // CContainerView message handlers
00308 void CContainerView::OnLButtonDown(UINT nFlags, CPoint point)
00309 {
00310   CContainerItem* pItemHit = HitTestItems(point);
00311   SetSelection(pItemHit);
00312
00313   if (pItemHit != NULL)
00314   {
00315     CRectTracker tracker;
00316     SetupTracker(pItemHit, &tracker);
00317
00318     UpdateWindow();
00319     if (tracker.Track(this, point))
00320     {
00321       pItemHit->InvalidateItem();
00322       pItemHit->m_rect = tracker.m_rect;
00323       pItemHit->InvalidateItem();
00324       GetDocument()->SetModifiedFlag();
00325     }
00326   }
00327
00328   CView::OnLButtonDown(nFlags, point);
00329 }
00330
00331 void CContainerView::OnLButtonDblClk(UINT nFlags, CPoint point)
00332 {
00333   OnLButtonDown(nFlags, point);
00334
00335   if (m_pSelection != NULL)
00336   {
00337     m_pSelection->DoVerb(GetKeyState(VK_CONTROL) < 0 ?
00338       OLEIVERB_OPEN : OLEIVERB_PRIMARY, this);
00339   }
00340
00341   CView::OnLButtonDblClk(nFlags, point);
00342 }
00343
00344 BOOL CContainerView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00345 {
00346   if (pWnd == this && m_pSelection != NULL)
00347   {
00348     // give the tracker for the selection a chance
00349     CRectTracker tracker;
00350     SetupTracker(m_pSelection, &tracker);
00351     if (tracker.SetCursor(this, nHitTest))
00352       return TRUE;
00353   }
00354
00355   return CView::OnSetCursor(pWnd, nHitTest, message);
00356 }
00357
00358 void CContainerView::OnEditClear()
00359 {
00360   if (m_pSelection != NULL)
00361   {
00362     m_pSelection->Delete();
00363     m_pSelection = NULL;
00364     GetDocument()->UpdateAllViews(NULL);
00365   }
00366 }
00367
00368 void CContainerView::OnUpdateEditClear(CCmdUI* pCmdUI)
00369 {
00370   pCmdUI->Enable(m_pSelection != NULL);
00371
00372 }
00373 void CContainerView::OnEditCopy()
00374 {
00375   if (m_pSelection != NULL)
00376     m_pSelection->CopyToClipboard();
00377 }
00378
00379 void CContainerView::OnUpdateEditCopy(CCmdUI* pCmdUI)
00380 {
00381   pCmdUI->Enable(m_pSelection != NULL);
00382 }
00383
00384 void CContainerView::OnEditPaste()
00385 {
00386   CContainerItem* pItem = NULL;
00387
00388   TRY
00389   {
00390     // Create new item connected to this document.
00391     CContainerDoc* pDoc = GetDocument();
00392     ASSERT_VALID(pDoc);
00393     pItem = new CContainerItem(pDoc);
00394     ASSERT_VALID(pItem);
00395
00396     // Initialize the item from clipboard data
00397     if (!pItem->CreateFromClipboard())
00398       AfxThrowMemoryException();  // any exception will do
00399     ASSERT_VALID(pItem);
00400
00401     // update the size before displaying
00402     pItem->UpdateFromServerExtent();
00403
00404     // set selection to newly pasted item
00405     SetSelection(pItem);
00406     pItem->InvalidateItem();
00407   }
00408   CATCH(CException, e)
00409   {
00410     if (pItem != NULL)
00411     {
00412       ASSERT_VALID(pItem);
00413       pItem->Delete();
00414     }
00415     AfxMessageBox(IDP_FAILED_TO_CREATE);
00416   }
00417   END_CATCH
00418 }
00419 void CContainerView::OnUpdate(CView* /* pSender */, LPARAM lHint, CObject* pHint)
00420 {
00421   switch (lHint)
00422   {
00423   case HINT_UPDATE_WINDOW:    // invalidate entire window
00424     Invalidate();
00425     break;
00426   case HINT_UPDATE_ITEM:      // invalidate single item
00427     {
00428       CRectTracker tracker;
00429       SetupTracker((CContainerItem*)pHint, &tracker);
00430       CRect rect;
00431       tracker.GetTrueRect(rect);
00432       InvalidateRect(rect);
00433     }
00434     break;
00435   }
00436 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoDoc.cpp Source File

  • vc2008fp
  • ToolTipDemo

TooltipDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TooltipDemo.h"
00013
00014 #include "TooltipDemoDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CTooltipDemoDoc
00024
00025 IMPLEMENT_DYNCREATE(CTooltipDemoDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CTooltipDemoDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CTooltipDemoDoc construction/destruction
00032
00033 CTooltipDemoDoc::CTooltipDemoDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CTooltipDemoDoc::~CTooltipDemoDoc()
00040 {
00041 }
00042
00043 BOOL CTooltipDemoDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CTooltipDemoDoc serialization
00058
00059 void CTooltipDemoDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CTooltipDemoDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CTooltipDemoDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CTooltipDemoDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CTooltipDemoDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDispatchDlg Member List

This is the complete list of members for CDispatchDlg, including all inherited members.
CDispatchDlg(CWnd *pParent=NULL) | CDispatchDlg |
DoDataExchange(CDataExchange *pDX) | CDispatchDlg | [protected, virtual]
IDD enum value | CDispatchDlg |
m_btnViewTypeInfo | CDispatchDlg |
m_pdisp | CDispatchDlg |
m_uiTypeInfoCount | CDispatchDlg |
OnInitDialog() | CDispatchDlg | [protected, virtual]
OnViewTypeInfo() | CDispatchDlg | [protected]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ruler.h Source File

  • ole
  • wordpad

ruler.h

Go to the documentation of this file.
00001 // riched.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __RULER_H__
00013 #define __RULER_H__
00014
00015 class CWordPadView;
00016 class CWordPadDoc;
00017 class CRulerBar;
00018
00019 // ruler items include left margin, right margin, indent, and tabs
00020
00021 // horz positions in twips -- necessary to avoid rounding errors
00022 // vertical position in pixels
00023 class CRulerItem
00024 {
00025 public:
00026   CRulerItem(UINT nBitmapID = 0);
00027   ~CRulerItem();
00028   virtual BOOL HitTestPix(CPoint pt) { return GetHitRectPix().PtInRect(pt); }
00029   virtual void Draw(CDC& dc);
00030   virtual void SetHorzPosTwips(int nXPos);
00031   virtual void TrackHorzPosTwips(int nXPos, BOOL bOnRuler = TRUE);
00032   virtual void SetVertPos(int nYPos) { m_nYPosPix = nYPos; }
00033   virtual void SetAlignment(int nAlign) {m_nAlignment = nAlign;}
00034   virtual void SetRuler(CRulerBar* pRuler) {m_pRuler = pRuler;}
00035   virtual void SetBounds(int nMin, int nMax) { m_nMin = nMin; m_nMax = nMax; }
00036   int GetMin() { return m_nMin;}
00037   int GetMax() { return m_nMax;}
00038   void Invalidate();
00039   int GetVertPosPix() { return m_nYPosPix;}
00040   int GetHorzPosTwips() { return m_nXPosTwips;}
00041   int GetHorzPosPix();
00042   CRect GetHitRectPix();
00043   void DrawFocusLine();
00044   void SetTrack(BOOL b);
00045
00046   HBITMAP m_hbm;
00047   HBITMAP m_hbmMask;
00048   CSize m_size;   // size of item in pixels
00049
00050 // Operations
00051   BOOL LoadMaskedBitmap(LPCTSTR lpszResourceName);
00052
00053 protected:
00054   int m_nYPosPix;
00055   int m_nXPosTwips;
00056   int m_nAlignment;
00057   BOOL m_bTrack;
00058   CRulerBar* m_pRuler;
00059   CRect m_rcTrack;
00060   CDC* m_pDC; // dc used for drawing tracking line
00061   int m_nMin, m_nMax;
00062 };
00063
00064 class CComboRulerItem : public CRulerItem
00065 {
00066 public:
00067   CComboRulerItem(UINT nBitmapID1, UINT nBitmapID2, CRulerItem& item);
00068   virtual BOOL HitTestPix(CPoint pt);
00069   virtual void Draw(CDC& dc);
00070   virtual void SetHorzPosTwips(int nXPos);
00071   virtual void TrackHorzPosTwips(int nXPos, BOOL bOnRuler = TRUE);
00072   virtual void SetVertPos(int nYPos);
00073   virtual void SetAlignment(int nAlign);
00074   virtual void SetRuler(CRulerBar* pRuler);
00075   virtual void SetBounds(int nMin, int nMax);
00076   int GetMin();
00077   int GetMax();
00078 protected:
00079   CRulerItem m_secondary;
00080   CRulerItem& m_link;
00081   BOOL m_bHitPrimary;
00082 };
00083
00084 class CTabRulerItem : public CRulerItem
00085 {
00086 public:
00087   CTabRulerItem() { SetAlignment(TA_LEFT); }
00088   virtual void Draw(CDC& dc) {if (GetHorzPosTwips() != 0) CRulerItem::Draw(dc);}
00089   virtual void TrackHorzPosTwips(int nXPos, BOOL bOnRuler = TRUE);
00090   virtual BOOL HitTestPix(CPoint pt) { return (GetHorzPosTwips() != 0) ? CRulerItem::HitTestPix(pt) : FALSE;}
00091 };
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CRulerBar
00095
00096 class CRulerBar : public CControlBar
00097 {
00098 private:
00099   using CControlBar::Create;
00100
00101 // Construction
00102 public:
00103   CRulerBar(BOOL b3DExt = TRUE);
00104   ~CRulerBar();
00105
00106 // Operations
00107 public:
00108   virtual BOOL Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID);
00109 protected:
00110   void Update(const PARAFORMAT& pf);
00111   void Update(CSize sizePaper, const CRect& rectMargins);
00112
00113 // Attributes
00114 public:
00115   BOOL m_bDeferInProgress;
00116   BOOL m_bDraw3DExt;
00117   CUnit m_unit;
00118   CRulerItem* m_pSelItem;
00119   CFont fnt;
00120   CSize GetBaseUnits();
00121   CComboRulerItem m_leftmargin;
00122   CRulerItem m_indent;
00123   CRulerItem m_rightmargin;
00124   CRulerItem m_tabItem;
00125   CTabRulerItem m_pTabItems[MAX_TAB_STOPS];
00126   CSize m_sizePaper;
00127   CRect m_rectMargin;
00128   int PrintWidth() {return m_sizePaper.cx - m_rectMargin.left -
00129     m_rectMargin.right;}
00130   int m_nTabs;
00131   int m_logx;
00132   int m_nLinePos;
00133   int m_nScroll; // in pixels
00134
00135   CPen penFocusLine;
00136   CPen penBtnHighLight;
00137   CPen penBtnShadow;
00138   CPen penWindowFrame;
00139   CPen penBtnText;
00140   CPen penBtnFace;
00141   CPen penWindowText;
00142   CPen penWindow;
00143   CBrush brushWindow;
00144   CBrush brushBtnFace;
00145
00146 // Implementation
00147 public:
00148   virtual void DoPaint(CDC* pDC);
00149   virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
00150   void ClientToRuler(CPoint& pt) {pt.Offset(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}
00151   void ClientToRuler(CRect& rect) {rect.OffsetRect(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}
00152   void RulerToClient(CPoint& pt) {pt.Offset(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}
00153   void RulerToClient(CRect& rect) {rect.OffsetRect(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}
00154
00155   int XTwipsToClient(int nT) {return MulDiv(nT, m_logx, 1440) + m_cxLeftBorder - m_nScroll;}
00156   int XClientToTwips(int nC) {return MulDiv(nC - m_cxLeftBorder + m_nScroll, 1440, m_logx);}
00157
00158   int XTwipsToRuler(int nT) {return MulDiv(nT, m_logx, 1440);}
00159   int XRulerToTwips(int nR) {return MulDiv(nR, 1440, m_logx);}
00160
00161   int XRulerToClient(int nR) {return nR + m_cxLeftBorder - m_nScroll;}
00162   int XClientToRuler(int nC) {return nC - m_cxLeftBorder + m_nScroll;}
00163
00164 protected:
00165   virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00166   void CreateGDIObjects();
00167   void DrawFace(CDC& dc);
00168   void DrawTickMarks(CDC& dC);
00169   void DrawNumbers(CDC& dc, int nInc, int nTPU);
00170   void DrawDiv(CDC& dc, int nInc, int nLargeDiv, int nLength);
00171   void DrawTabs(CDC& dc);
00172   void FillInParaFormat(PARAFORMAT& pf);
00173   void SortTabs();
00174   void SetMarginBounds();
00175   CRulerItem* GetFreeTab();
00176   CView* GetView()
00177   {
00178     ASSERT(GetParent() != NULL);
00179     return ((CFrameWnd*)GetParent())->GetActiveView();
00180   }
00181   CDocument* GetDocument() { return GetView()->GetDocument(); }
00182
00183   CTabRulerItem* GetHitTabPix(CPoint pt);
00184
00185   // Generated message map functions
00186   //{{AFX_MSG(CRulerBar)
00187   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00188   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00189   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00190   afx_msg void OnSysColorChange();
00191   afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00192   afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
00193   afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00194   //}}AFX_MSG
00195   afx_msg LRESULT OnSizeParent(WPARAM wParam, LPARAM lParam);
00196   DECLARE_MESSAGE_MAP()
00197
00198   friend class CRulerItem;
00199 };
00200
00201 inline int CRulerItem::GetHorzPosPix()
00202   { return m_pRuler->XTwipsToRuler(m_nXPosTwips); }
00203
00204 #endif
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHelloDoc Member List

This is the complete list of members for CHelloDoc, including all inherited members.
CHelloDoc() | CHelloDoc | [protected]
ClearAllColors() | CHelloDoc |
m_bBlack | CHelloDoc |
m_bBlue | CHelloDoc |
m_bCustom | CHelloDoc |
m_bGreen | CHelloDoc |
m_bRed | CHelloDoc |
m_bWhite | CHelloDoc |
m_clrText | CHelloDoc |
m_str | CHelloDoc |
OnNewDocument() | CHelloDoc | [virtual]
Serialize(CArchive &ar) | CHelloDoc | [virtual]
SetCustomStrColor(COLORREF clr) | CHelloDoc |
SetStrColor(COLORREF clr) | CHelloDoc |
~CHelloDoc() | CHelloDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iview.h Source File

  • ole
  • oleview
  • iviewers

iview.h

Go to the documentation of this file.
00001 // iviewers.h : main header file for the iviewers application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and Microsoft
00008 // QuickHelp and/or WinHelp documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #ifndef __IVIEW_H__
00017 #define __IVIEW_H__
00018
00019 #include "resource.h"       // main symbols
00020
00021 #ifndef _RGB_H_
00022 #define _RGB_H_
00023    #define RGBBLACK     RGB(0,0,0)
00024    #define RGBRED       RGB(128,0,0)
00025    #define RGBGREEN     RGB(0,128,0)
00026    #define RGBBLUE      RGB(0,0,128)
00027    #define RGBBROWN     RGB(128,128,0)
00028    #define RGBMAGENTA   RGB(128,0,128)
00029    #define RGBCYAN      RGB(0,128,128)
00030    #define RGBLTGRAY    RGB(192,192,192)
00031    #define RGBGRAY      RGB(128,128,128)
00032    #define RGBLTRED     RGB(255,0,0)
00033    #define RGBLTGREEN   RGB(0,255,0)
00034    #define RGBLTBLUE    RGB(0,0,255)
00035    #define RGBYELLOW    RGB(255,255,0)
00036    #define RGBLTMAGENTA RGB(255,0,255)
00037    #define RGBLTCYAN    RGB(0,255,255)
00038    #define RGBWHITE     RGB(255,255,255)
00039 #endif
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 #endif // __IVIEW_H__
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/stdafx.h Source File

  • general
  • hello

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #define VC_EXTRALEAN
00011
00012 #include <afxwin.h>
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/MainFrm.h Source File

  • vc2008fp
  • WordPad

MainFrm.h

Go to the documentation of this file.
00001 //
00002 // mainfrm.h : interface of the CMainFrame class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "formatba.h"
00015 #include "ruler.h"
00016 #include "taskpane.h"
00017
00018 class CMainFrame : public CFrameWndEx
00019 {
00020 protected: // create from serialization only
00021   CMainFrame();
00022   DECLARE_DYNCREATE(CMainFrame)
00023
00024 // Attributes
00025 public:
00026   HICON m_hIconDoc;
00027   HICON m_hIconText;
00028   HICON m_hIconWrite;
00029   HICON GetIcon(int nDocType);
00030
00031 // Operations
00032 public:
00033   void UpdateMRUFilesList ()
00034   {
00035     m_wndTaskPane.UpdateMRUFilesList ();
00036   }
00037
00038   void OnChangeLook ();
00039
00040 // Overrides
00041   // ClassWizard generated virtual function overrides
00042   //{{AFX_VIRTUAL(CMainFrame)
00043   public:
00044   virtual void ActivateFrame(int nCmdShow = -1);
00045   virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
00046   protected:
00047   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00048   virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00049   //}}AFX_VIRTUAL
00050
00051   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00052   virtual BOOL OnTearOffMenu (CMFCPopupMenu* pMenuPopup, CPane* pBar);
00053
00054 protected:
00055   void AdjustObjectSubmenu (CMFCPopupMenu* pMenuPopup);
00056   void AdjustColorsMenu (CMFCPopupMenu* pMenuPopup, UINT uiId);
00057
00058 // Implementation
00059 public:
00060   virtual ~CMainFrame();
00061 #ifdef _DEBUG
00062   virtual void AssertValid() const;
00063   virtual void Dump(CDumpContext& dc) const;
00064 #endif
00065
00066 public:
00067   CMFCMenuBar m_wndMenuBar;
00068   CMFCToolBar m_wndToolBar;
00069   CMFCStatusBar m_wndStatusBar;
00070   CFormatBar    m_wndFormatBar;
00071   CRulerBar   m_wndRulerBar;
00072   CTaskPane   m_wndTaskPane;
00073
00074 protected:  // control bar embedded members
00075   BOOL CreateMenuBar();
00076   BOOL CreateToolBar();
00077   BOOL CreateFormatBar();
00078   BOOL CreateStatusBar();
00079   BOOL CreateRulerBar();
00080   BOOL CreateTaskPane ();
00081
00082 // Generated message map functions
00083 protected:
00084   //{{AFX_MSG(CMainFrame)
00085   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00086   afx_msg void OnSysColorChange();
00087   afx_msg void OnSize(UINT nType, int cx, int cy);
00088   afx_msg void OnMove(int x, int y);
00089   afx_msg void OnHelpFinder();
00090   afx_msg void OnDropFiles(HDROP hDropInfo);
00091   afx_msg void OnFontChange();
00092   afx_msg BOOL OnQueryNewPalette();
00093   afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00094   afx_msg void OnDevModeChange(LPTSTR lpDeviceName);
00095   afx_msg void OnViewCustomize();
00096   afx_msg void OnViewFullScreen();
00097   //}}AFX_MSG
00098   afx_msg LRESULT OnBarState(WPARAM wParam, LPARAM lParam);
00099   afx_msg LRESULT OnOpenMsg(WPARAM wParam, LPARAM lParam);
00100   afx_msg LRESULT OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp);
00101   afx_msg LRESULT OnStartCustomize(WPARAM wp, LPARAM lp);
00102   afx_msg LRESULT OnToolbarCreateNew(WPARAM,LPARAM);
00103   afx_msg LRESULT OnGetDocumentColors(WPARAM,LPARAM);
00104   afx_msg void OnDummy();
00105   afx_msg void OnAskQuestion();
00106   DECLARE_MESSAGE_MAP()
00107 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawCliLiveIconsHandler Member List

This is the complete list of members for CDrawCliLiveIconsHandler, including all inherited members.
CDrawCliLiveIconsHandler() | CDrawCliLiveIconsHandler | [inline]
FinalConstruct() | CDrawCliLiveIconsHandler | [inline]
FinalRelease() | CDrawCliLiveIconsHandler | [inline]
GetBitmap(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE *pdwAlpha) | CDrawCliLiveIconsHandler | [inline, protected, virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ServPg.Cpp Source File

  • ole
  • TstCon

ServPg.Cpp

Go to the documentation of this file.
00001 // ServicesPage.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CServicesPage property page
00022
00023 IMPLEMENT_DYNCREATE(CServicesPage, CPropertyPage)
00024
00025 CServicesPage::CServicesPage() : CPropertyPage(CServicesPage::IDD)
00026 {
00027    m_psp.dwFlags &= ~PSP_HASHELP;
00028
00029   //{{AFX_DATA_INIT(CServicesPage)
00030   m_tSBindHost = FALSE;
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 CServicesPage::~CServicesPage()
00035 {
00036 }
00037
00038 void CServicesPage::DoDataExchange(CDataExchange* pDX)
00039 {
00040   CPropertyPage::DoDataExchange(pDX);
00041   //{{AFX_DATA_MAP(CServicesPage)
00042   DDX_Check(pDX, IDC_SBINDHOST, m_tSBindHost);
00043   //}}AFX_DATA_MAP
00044 }
00045
00046
00047 BEGIN_MESSAGE_MAP(CServicesPage, CPropertyPage)
00048   //{{AFX_MSG_MAP(CServicesPage)
00049   ON_WM_HELPINFO()
00050   ON_WM_CONTEXTMENU()
00051   //}}AFX_MSG_MAP
00052 END_MESSAGE_MAP()
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CServicesPage message handlers
00056
00057
00058 static DWORD rgmapCHID[] =
00059 {
00060    IDC_SBINDHOST, HIDC_SBINDHOST,
00061    0, 0
00062 };
00063
00064 BOOL CServicesPage::OnHelpInfo( HELPINFO* pHelpInfo )
00065 {
00066   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00067   strPath += _T("::/popups.txt");
00068
00069   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00070 }
00071
00072 void CServicesPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00073 {
00074   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00075   strPath += _T("::/popups.txt");
00076
00077   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00078 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/resource.h Source File

  • advanced
  • mtrecalc

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by mtrecalc.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDD_MTRECALC_FORM               101
00007 #define ID_PERCENT_DONE                 101
00008 #define IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 102
00009 #define IDR_MAINFRAME                   128
00010 #define IDR_RECALCTYPE                  129
00011 #define IDS_RECALCULATING               130
00012 #define IDD_SPEED                       130
00013 #define IDS_CONTINUE_RECALC_BEFORE_SAVE 131
00014 #define IDD_RECALC_PROGRESS             131
00015 #define IDS_FILE_NOT_SAVED              132
00016 #define IDS_NEED_RECALC_BEFORE_SAVE     133
00017 #define IDC_INTEGER                     1000
00018 #define IDC_INT1                        1000
00019 #define IDC_RESULT                      1001
00020 #define IDC_SUM                         1001
00021 #define IDC_INT2                        1002
00022 #define IDC_SPEED                       1003
00023 #define IDC_PERCENT_DONE                1008
00024 #define ID_SINGLE_THREAD                32771
00025 #define ID_WORKER_THREAD                32772
00026 #define ID_UI_THREAD                    32773
00027 #define ID_DERIVED_WORKER_THREAD        32774
00028 #define ID_NONDERIVED_WORKER_THREAD     32775
00029 #define ID_OPTIONS_SPEED                32776
00030 #define ID_RECALC_SPEED                 32777
00031 #define ID_RECALCULATE_NOW              32778
00032 #define ID_KILL_WORKER_THREAD           32779
00033 #define ID_RECALC_DONE                  32780
00034
00035 // Next default values for new objects
00036 //
00037 #ifdef APSTUDIO_INVOKED
00038 #ifndef APSTUDIO_READONLY_SYMBOLS
00039 #define _APS_NEXT_RESOURCE_VALUE        132
00040 #define _APS_NEXT_COMMAND_VALUE         32781
00041 #define _APS_NEXT_CONTROL_VALUE         1009
00042 #define _APS_NEXT_SYMED_VALUE           102
00043 #endif
00044 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFolderListBar Member List

This is the complete list of members for CFolderListBar, including all inherited members.
CanAcceptPane(const CBasePane *) const | CFolderListBar | [inline, virtual]
CFolderListBar(const CObList &lstWorkspaces, CImageList &images) | CFolderListBar |
DoesAllowDynInsertBefore() const | CFolderListBar | [inline, virtual]
m_bNotifyFrame | CFolderListBar | [protected]
m_wndFolders | CFolderListBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CFolderListBar | [protected]
OnEraseWorkArea(CDC *pDC, CRect rectWorkArea) | CFolderListBar | [protected, virtual]
OnSelectTree(NMHDR *pNMHDR, LRESULT *pResult) | CFolderListBar | [protected]
OnSize(UINT nType, int cx, int cy) | CFolderListBar | [protected]
SelectWorkspace(CWorkspaceObj *pWS) | CFolderListBar |
~CFolderListBar() | CFolderListBar | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MFileWnd.Cpp Source File

  • ole
  • TstCon

MFileWnd.Cpp

Go to the documentation of this file.
00001 // MetaFileWnd.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMetaFileWnd
00022
00023 CMetaFileWnd::CMetaFileWnd() :
00024    m_hMetaFile( NULL )
00025 {
00026 }
00027
00028 CMetaFileWnd::~CMetaFileWnd()
00029 {
00030    if( m_hMetaFile != NULL )
00031    {
00032     DeleteMetaFile( m_hMetaFile );
00033    }
00034 }
00035
00036
00037 BEGIN_MESSAGE_MAP(CMetaFileWnd, CFrameWnd)
00038   //{{AFX_MSG_MAP(CMetaFileWnd)
00039   ON_WM_PAINT()
00040   //}}AFX_MSG_MAP
00041 END_MESSAGE_MAP()
00042
00043
00044 STDAPI_(HDC) OleStdCreateDC(DVTARGETDEVICE FAR* ptd)
00045 {
00046   HDC hdc=NULL;
00047   LPDEVNAMES lpDevNames;
00048   LPDEVMODE lpDevMode;
00049   LPTSTR lpszDriverName;
00050   LPTSTR lpszDeviceName;
00051   LPTSTR lpszPortName;
00052
00053   if (ptd == NULL) {
00054     hdc = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
00055     goto errReturn;
00056   }
00057
00058   lpDevNames = (LPDEVNAMES) ptd; // offset for size field
00059
00060   if (ptd->tdExtDevmodeOffset == 0) {
00061     lpDevMode = NULL;
00062   }else{
00063     lpDevMode  = (LPDEVMODE) ((LPTSTR)ptd + ptd->tdExtDevmodeOffset);
00064   }
00065
00066   lpszDriverName = (LPTSTR) lpDevNames + ptd->tdDriverNameOffset;
00067   lpszDeviceName = (LPTSTR) lpDevNames + ptd->tdDeviceNameOffset;
00068   lpszPortName   = (LPTSTR) lpDevNames + ptd->tdPortNameOffset;
00069
00070   hdc = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, lpDevMode);
00071
00072 errReturn:
00073   return hdc;
00074 }
00075
00076
00077 void CMetaFileWnd::SetObject( IUnknown* pObject )
00078 {
00079    SIZE size;
00080    RECTL rect;
00081    BOOL tSuccess;
00082    CMetaFileDC dc;
00083    HDC hAttribDC;
00084
00085    _ASSERTE( pObject != NULL );
00086
00087    m_pOleObject = pObject;
00088    m_pViewObject = pObject;
00089
00090    m_pOleObject->GetExtent( DVASPECT_CONTENT, &size );
00091
00092    tSuccess = dc.Create();
00093    if( !tSuccess )
00094    {
00095     return;
00096    }
00097
00098    hAttribDC = ::OleStdCreateDC( NULL );
00099    dc.SetAttribDC( hAttribDC );
00100
00101    m_size.cx = size.cx;
00102    m_size.cy = size.cy;
00103    dc.HIMETRICtoDP( &m_size );
00104
00105    rect.left = 0;
00106    rect.top = 0;
00107    rect.right = m_size.cx;
00108    rect.bottom = m_size.cy;
00109
00110    m_pViewObject->Draw( DVASPECT_CONTENT, -1, NULL, NULL, hAttribDC, dc.m_hDC,
00111     &rect, &rect, NULL, 0 );
00112
00113    dc.SetAttribDC( NULL );
00114    DeleteDC( hAttribDC );
00115
00116    m_hMetaFile = dc.Close();
00117    if( m_hMetaFile == NULL )
00118    {
00119     return;
00120    }
00121
00122    InvalidateRect( NULL );
00123 }
00124
00125 /////////////////////////////////////////////////////////////////////////////
00126 // CMetaFileWnd message handlers
00127
00128 void CMetaFileWnd::OnPaint()
00129 {
00130    CRect rect;
00131   CPaintDC dc( this ); // device context for painting
00132
00133    if( m_hMetaFile != NULL )
00134    {
00135     GetClientRect( &rect );
00136     dc.SetMapMode( MM_ANISOTROPIC );
00137     dc.SetWindowOrg( 0, 0 );
00138     dc.SetWindowExt( m_size );
00139     dc.SetViewportOrg( 0, 0 );
00140     dc.SetViewportExt( rect.right, rect.bottom );
00141     dc.PlayMetaFile( m_hMetaFile );
00142    }
00143 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPolyTool Member List

This is the complete list of members for CPolyTool, including all inherited members.
c_down | CDrawTool | [static]
c_drawShape | CDrawTool | [static]
c_last | CDrawTool | [static]
c_nDownFlags | CDrawTool | [static]
c_tools | CDrawTool | [static]
CDrawTool(DrawShape nDrawShape) | CDrawTool |
CDrawTool(DrawShape nDrawShape) | CDrawTool |
CPolyTool() | CPolyTool |
CPolyTool() | CPolyTool |
FindTool(DrawShape drawShape) | CDrawTool | [static]
FindTool(DrawShape drawShape) | CDrawTool | [static]
m_drawShape | CDrawTool |
m_pDrawObj | CPolyTool | [private]
OnCancel() | CPolyTool | [virtual]
OnCancel() | CPolyTool | [virtual]
OnEditProperties(CDrawView *pView) | CDrawTool | [virtual]
OnEditProperties(CDrawView *pView) | CDrawTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CPolyTool | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExploreDlg.cpp Source File

  • internet
  • DHtmlExplore

DHtmlExploreDlg.cpp

Go to the documentation of this file.
00001 // DHtmlExploreDlg.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "DHtmlExplore.h"
00013 #include "DHtmlExploreDlg.h"
00014 #include "PropertiesDlg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CAboutDlg dialog used for App About
00024
00025 class CAboutDlg : public CDialog
00026 {
00027 public:
00028   CAboutDlg();
00029
00030 // Dialog Data
00031   //{{AFX_DATA(CAboutDlg)
00032   enum { IDD = IDD_ABOUTBOX };
00033   //}}AFX_DATA
00034
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CAboutDlg)
00037   protected:
00038   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 protected:
00043   //{{AFX_MSG(CAboutDlg)
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00049 {
00050   //{{AFX_DATA_INIT(CAboutDlg)
00051   //}}AFX_DATA_INIT
00052 }
00053
00054 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00055 {
00056   CDialog::DoDataExchange(pDX);
00057   //{{AFX_DATA_MAP(CAboutDlg)
00058   //}}AFX_DATA_MAP
00059 }
00060
00061 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00062   //{{AFX_MSG_MAP(CAboutDlg)
00063     // No message handlers
00064   //}}AFX_MSG_MAP
00065 END_MESSAGE_MAP()
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CDHtmlExploreDlg dialog
00069
00070 CDHtmlExploreDlg::CDHtmlExploreDlg(CWnd* pParent /*=NULL*/)
00071   : CDHtmlDialog(CDHtmlExploreDlg::IDD, 0, pParent)
00072 {
00073   //{{AFX_DATA_INIT(CDHtmlExploreDlg)
00074     // NOTE: the ClassWizard will add member initialization here
00075   //}}AFX_DATA_INIT
00076   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00077   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00078 }
00079
00080 void CDHtmlExploreDlg::DoDataExchange(CDataExchange* pDX)
00081 {
00082   CDHtmlDialog::DoDataExchange(pDX);
00083   //{{AFX_DATA_MAP(CDHtmlExploreDlg)
00084     // NOTE: the ClassWizard will add DDX and DDV calls here
00085   //}}AFX_DATA_MAP
00086   DDX_DHtml_ElementInnerText(pDX, _T("currDir"), m_strCurrDir);
00087 }
00088
00089 BEGIN_MESSAGE_MAP(CDHtmlExploreDlg, CDHtmlDialog)
00090   //{{AFX_MSG_MAP(CDHtmlExploreDlg)
00091   ON_WM_SYSCOMMAND()
00092   ON_WM_PAINT()
00093   ON_WM_QUERYDRAGICON()
00094   ON_COMMAND(ID_CONTEXT_BROWSE, OnContextBrowse)
00095   ON_COMMAND(ID_CONTEXT_EXIT, OnContextExit)
00096   ON_COMMAND(ID_CONTEXT_PROPERTIES, OnContextProperties)
00097   //}}AFX_MSG_MAP
00098 END_MESSAGE_MAP()
00099
00100
00101 BEGIN_DHTML_EVENT_MAP(CDHtmlExploreDlg)
00102   DHTML_EVENT_ONCLICK(_T("browse"), OnBrowse)
00103   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("hotElement"),  OnMouseOverElement)
00104   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, _T("hotElement"),  OnMouseOutElement)
00105   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("folder"),  OnMouseOverElement)
00106   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, _T("folder"),  OnMouseOutElement)
00107   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("file"),  OnMouseOverElement)
00108   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, _T("file"),  OnMouseOutElement)
00109   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("folder"),  OnClickFolder)
00110   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("file"),  OnClickFile)
00111 END_DHTML_EVENT_MAP()
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CDHtmlExploreDlg message handlers
00115
00116 BOOL CDHtmlExploreDlg::OnInitDialog()
00117 {
00118   SetHostFlags(DOCHOSTUIFLAG_FLAT_SCROLLBAR);
00119
00120   CDHtmlDialog::OnInitDialog();
00121
00122   // Add "About..." menu item to system menu.
00123
00124   // IDM_ABOUTBOX must be in the system command range.
00125   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00126   ASSERT(IDM_ABOUTBOX < 0xF000);
00127
00128   CMenu* pSysMenu = GetSystemMenu(FALSE);
00129   if (pSysMenu != NULL)
00130   {
00131     CString strAboutMenu;
00132     strAboutMenu.LoadString(IDS_ABOUTBOX);
00133     if (!strAboutMenu.IsEmpty())
00134     {
00135       pSysMenu->AppendMenu(MF_SEPARATOR);
00136       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00137     }
00138   }
00139
00140   // Set the icon for this dialog.  The framework does this automatically
00141   //  when the application's main window is not a dialog
00142   SetIcon(m_hIcon, TRUE);     // Set big icon
00143   SetIcon(m_hIcon, FALSE);    // Set small icon
00144
00145   // TODO: Add extra initialization here
00146   LoadFromResource(IDR_EXPLORE);
00147
00148   return TRUE;  // return TRUE  unless you set the focus to a control
00149 }
00150
00151 void CDHtmlExploreDlg::OnSysCommand(UINT nID, LPARAM lParam)
00152 {
00153   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00154   {
00155     CAboutDlg dlgAbout;
00156     dlgAbout.DoModal();
00157   }
00158   else
00159   {
00160     CDHtmlDialog::OnSysCommand(nID, lParam);
00161   }
00162 }
00163
00164 // If you add a minimize button to your dialog, you will need the code below
00165 //  to draw the icon.  For MFC applications using the document/view model,
00166 //  this is automatically done for you by the framework.
00167
00168 void CDHtmlExploreDlg::OnPaint()
00169 {
00170   if (IsIconic())
00171   {
00172     CPaintDC dc(this); // device context for painting
00173
00174     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00175
00176     // Center icon in client rectangle
00177     int cxIcon = GetSystemMetrics(SM_CXICON);
00178     int cyIcon = GetSystemMetrics(SM_CYICON);
00179     CRect rect;
00180     GetClientRect(&rect);
00181     int x = (rect.Width() - cxIcon + 1) / 2;
00182     int y = (rect.Height() - cyIcon + 1) / 2;
00183
00184     // Draw the icon
00185     dc.DrawIcon(x, y, m_hIcon);
00186   }
00187   else
00188   {
00189     CDHtmlDialog::OnPaint();
00190   }
00191 }
00192
00193 // The system calls this to obtain the cursor to display while the user drags
00194 //  the minimized window.
00195 HCURSOR CDHtmlExploreDlg::OnQueryDragIcon()
00196 {
00197   return (HCURSOR) m_hIcon;
00198 }
00199
00200 void CDHtmlExploreDlg::OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl)
00201 {
00202   CDHtmlDialog::OnDocumentComplete(pDisp, szUrl);
00203   RefreshDir();
00204 }
00205
00206 void CDHtmlExploreDlg::RefreshDir()
00207 {
00208   CTempBuffer<TCHAR, MAX_PATH> strBuffer(MAX_PATH);
00209   strBuffer[0] = _T('\0');
00210   DWORD length = GetCurrentDirectory(MAX_PATH, strBuffer);
00211
00212   if (length > MAX_PATH)
00213   {
00214     // We need to reallocate the string => MAX_PATH wasn't space enough.
00215     strBuffer.Reallocate(length);
00216     strBuffer[0] = _T('\0');
00217     GetCurrentDirectory(length, strBuffer);
00218   }
00219
00220   m_strCurrDir = strBuffer;
00221   UpdateData(FALSE);
00222
00223   CString strTable;
00224   strTable = _T("<TABLE border=1 cols=4 width=100%>\n")
00225     _T("<THEAD><TR><TD width=20>&nbsp;</TD><TD>File Name</TD><TD>Size</TD><TD>Modified</TD></TR></THEAD>");
00226
00227
00228   // recreate the filelist table
00229   CComPtr<IHTMLElement> spfileList;
00230   GetElementInterface(_T("fileList"), IID_IHTMLElement, (void **) &spfileList);
00231
00232   if (spfileList == NULL)
00233     return;
00234
00235   CString strFilter = m_strCurrDir + _T("\\*.*");
00236   WIN32_FIND_DATA finddata;
00237   HANDLE hFind = FindFirstFile(strFilter, &finddata);
00238   if (hFind==INVALID_HANDLE_VALUE)
00239     return;
00240   CWaitCursor cur;
00241   CString str, strDate;
00242
00243   do
00244   {
00245
00246     CTime t(finddata.ftLastWriteTime);
00247     strDate = t.Format(_T("%A, %B %d, %Y"));
00248
00249     str.Format(_T("<TR><TD width=20><IMG src=%s.gif></TD><TD><SPAN class=%s>%s</SPAN></TD><TD>%lu</TD><TD>%s</TD></TR>"),
00250       ((finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _T("folder") : _T("file")),
00251       ((finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _T("folder") : _T("file")),
00252       finddata.cFileName, finddata.nFileSizeLow, (LPCTSTR) strDate);
00253     strTable += str;
00254   } while (FindNextFile(hFind, &finddata));
00255   strTable += _T("</TABLE>");
00256   FindClose(hFind);
00257   CComBSTR bstrTable = strTable;
00258   spfileList->put_innerHTML(bstrTable);
00259 }
00260
00261 HRESULT CDHtmlExploreDlg::OnBrowse(IHTMLElement* /*phtmlElement*/)
00262 {
00263   BROWSEINFO bi;
00264   TCHAR szDisplayName[MAX_PATH];
00265   memset(&bi, 0x00, sizeof(bi));
00266   bi.hwndOwner = m_hWnd;
00267   bi.pszDisplayName = szDisplayName;
00268   bi.ulFlags = BIF_RETURNONLYFSDIRS;
00269   LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
00270   if (pidl)
00271   {
00272     SHGetPathFromIDList(pidl, szDisplayName);
00273     SetCurrentDirectory(szDisplayName);
00274     RefreshDir();
00275
00276     // free the pidl
00277     CComPtr<IMalloc> spSHMalloc;
00278     if(FAILED(SHGetMalloc(&spSHMalloc)))
00279     {
00280       return S_FALSE;
00281     }
00282     if (spSHMalloc != NULL)
00283       spSHMalloc->Free(pidl);
00284   }
00285
00286   return S_OK;
00287 }
00288
00289 HRESULT CDHtmlExploreDlg::OnMouseOverElement(IHTMLElement *phtmlElement)
00290 {
00291   IHTMLStyle *phtmlStyle;
00292   phtmlElement->get_style(&phtmlStyle);
00293   if (phtmlStyle)
00294   {
00295     VARIANT varColor;
00296     varColor.vt = VT_I4;
00297     varColor.lVal = 0xff0000;
00298     phtmlStyle->put_textDecorationUnderline(VARIANT_TRUE);
00299     phtmlStyle->put_color(varColor);
00300     phtmlStyle->put_cursor(L"hand");
00301     phtmlStyle->Release();
00302   }
00303   m_spCurrElement = phtmlElement;
00304   return S_OK;
00305 }
00306
00307 HRESULT CDHtmlExploreDlg::OnMouseOutElement(IHTMLElement *phtmlElement)
00308 {
00309   IHTMLStyle *phtmlStyle;
00310   phtmlElement->get_style(&phtmlStyle);
00311   if (phtmlStyle)
00312   {
00313     VARIANT varColor;
00314     varColor.vt = VT_I4;
00315     varColor.lVal = 0x000000;
00316     phtmlStyle->put_textDecorationUnderline(VARIANT_FALSE);
00317     phtmlStyle->put_color(varColor);
00318     phtmlStyle->Release();
00319   }
00320   m_spCurrElement = NULL;
00321   return S_OK;
00322 }
00323
00324 HRESULT CDHtmlExploreDlg::OnClickFolder(IHTMLElement *phtmlElement)
00325 {
00326   CComBSTR bstr;
00327   phtmlElement->get_innerText(&bstr);
00328   if (bstr)
00329   {
00330     CString strNewDir;
00331     strNewDir = m_strCurrDir + _T("\\") + CString(bstr);
00332     SetCurrentDirectory(strNewDir);
00333     RefreshDir();
00334   }
00335   return S_OK;
00336 }
00337
00338 HRESULT CDHtmlExploreDlg::OnClickFile(IHTMLElement *phtmlElement)
00339 {
00340   CComBSTR bstr;
00341   phtmlElement->get_innerText(&bstr);
00342   if (bstr)
00343   {
00344     CString strFullPath;
00345     strFullPath = m_strCurrDir + _T("\\") + CString(bstr);
00346     ShellExecute(NULL, NULL, strFullPath, NULL, NULL, SW_SHOWNORMAL);
00347   }
00348   return S_OK;
00349 }
00350
00351 HRESULT STDMETHODCALLTYPE CDHtmlExploreDlg::ShowContextMenu(DWORD /*dwID*/, POINT *ppt, IUnknown* /*pcmdtReserved*/, IDispatch* /*pdispReserved*/)
00352 {
00353   CMenu ctxMenu;
00354
00355   m_strCtxFileName.Empty();
00356   if (m_spCurrElement != NULL)
00357   {
00358
00359     CComBSTR bstrFileName;
00360     m_spCurrElement->get_innerText(&bstrFileName);
00361     if (bstrFileName)
00362       m_strCtxFileName = bstrFileName;
00363   }
00364   ctxMenu.LoadMenu(IDR_CONTEXT_MENU);
00365
00366   ctxMenu.GetSubMenu(0)->EnableMenuItem(ID_CONTEXT_PROPERTIES, MF_BYCOMMAND |
00367     ((m_spCurrElement==NULL) ? MF_GRAYED : MF_ENABLED));
00368   ctxMenu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN, ppt->x, ppt->y, this, NULL);
00369   return S_OK;
00370 }
00371
00372 void CDHtmlExploreDlg::OnContextBrowse()
00373 {
00374   // TODO: Add your command handler code here
00375   OnBrowse(NULL);
00376 }
00377
00378 void CDHtmlExploreDlg::OnContextExit()
00379 {
00380   // TODO: Add your command handler code here
00381   EndDialog(IDOK);
00382 }
00383
00384 void CDHtmlExploreDlg::OnContextProperties()
00385 {
00386   // TODO: Add your command handler code here
00387   ASSERT(!m_strCtxFileName.IsEmpty());
00388   CPropertiesDlg dlg;
00389   dlg.m_strFileName = m_strCurrDir + _T("\\") + m_strCtxFileName;
00390   dlg.DoModal();
00391 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/stdafx.cpp Source File

  • general
  • mdi

stdafx.cpp

Go to the documentation of this file.
00001
00002 // This is a part of the Microsoft Foundation Classes C++ library.
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 // stdafx.cpp : source file that includes just the standard includes
00012 //  stdafx.pch will be the pre-compiled header
00013 //  stdafx.obj will contain the pre-compiled type information
00014
00015 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifier.cpp Source File

  • controls
  • netaddr

NetAddrVerifier.cpp

Go to the documentation of this file.
00001 // NetAddrVerifier.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 #include "stdafx.h"
00005 #include "NetAddrVerifier.h"
00006 #include "NetAddrVerifierDlg.h"
00007
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #endif
00011
00012
00013 // CNetAddrVerifierApp
00014
00015 BEGIN_MESSAGE_MAP(CNetAddrVerifierApp, CWinApp)
00016   ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
00017 END_MESSAGE_MAP()
00018
00019
00020 // CNetAddrVerifierApp construction
00021
00022 CNetAddrVerifierApp::CNetAddrVerifierApp()
00023 {
00024   // TODO: add construction code here,
00025   // Place all significant initialization in InitInstance
00026 }
00027
00028
00029 // The one and only CNetAddrVerifierApp object
00030
00031 CNetAddrVerifierApp theApp;
00032
00033
00034 // CNetAddrVerifierApp initialization
00035
00036 BOOL CNetAddrVerifierApp::InitInstance()
00037 {
00038   // InitCommonControlsEx() is required on Windows XP if an application
00039   // manifest specifies use of ComCtl32.dll version 6 or later to enable
00040   // visual styles.  Otherwise, any window creation will fail.
00041   INITCOMMONCONTROLSEX InitCtrls;
00042   InitCtrls.dwSize = sizeof(InitCtrls);
00043   // Set this to include all the common control classes you want to use
00044   // in your application.
00045   InitCtrls.dwICC = ICC_WIN95_CLASSES;
00046   InitCommonControlsEx(&InitCtrls);
00047
00048   CWinApp::InitInstance();
00049
00050   AfxEnableControlContainer();
00051
00052   // Standard initialization
00053   // If you are not using these features and wish to reduce the size
00054   // of your final executable, you should remove from the following
00055   // the specific initialization routines you do not need
00056   // Change the registry key under which our settings are stored
00057   // TODO: You should modify this string to be something appropriate
00058   // such as the name of your company or organization
00059   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00060
00061   CNetAddrVerifierDlg dlg;
00062   m_pMainWnd = &dlg;
00063   INT_PTR nResponse = dlg.DoModal();
00064   if (nResponse == IDOK)
00065   {
00066     // TODO: Place code here to handle when the dialog is
00067     //  dismissed with OK
00068   }
00069   else if (nResponse == IDCANCEL)
00070   {
00071     // TODO: Place code here to handle when the dialog is
00072     //  dismissed with Cancel
00073   }
00074
00075   // Since the dialog has been closed, return FALSE so that we exit the
00076   //  application, rather than start the application's message pump.
00077   return FALSE;
00078 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/calcdlg.h Source File

  • ole
  • mfccalc

calcdlg.h

Go to the documentation of this file.
00001 // calcdlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CCalcDlg dialog
00014
00015 enum Operator { OpNone, OpAdd, OpSubtract, OpMultiply, OpDivide };
00016 enum CalcError { ErrNone, ErrDivideByZero };
00017
00018 class CCalcDlg : public CDialog
00019 {
00020 // Construction
00021 public:
00022   CCalcDlg(CWnd* pParent = NULL); // standard constructor
00023
00024 // Operations
00025   BOOL RegisterActive();
00026
00027 // Dialog Data
00028   //{{AFX_DATA(CCalcDlg)
00029   enum { IDD = IDD_MFCCALC_DIALOG };
00030     // NOTE: the ClassWizard will add data members here
00031   //}}AFX_DATA
00032
00033   // ClassWizard generated virtual function overrides
00034   //{{AFX_VIRTUAL(CCalcDlg)
00035   public:
00036   virtual BOOL PreTranslateMessage(MSG* pMsg);
00037   protected:
00038   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00039   virtual void PostNcDestroy();
00040   //}}AFX_VIRTUAL
00041
00042
00043 // Implementation
00044 public:
00045   virtual ~CCalcDlg();
00046 protected:
00047
00048   HICON m_hIcon;
00049   HACCEL m_hAccel;
00050
00051   BOOL m_bAutoDelete;     // delete in PostNcDestroy
00052   DWORD m_dwRegister;     // active registration magic cookie
00053
00054   // calculator state
00055   long m_accum;
00056   long m_operand;
00057   Operator m_operator;
00058   CalcError m_errorState;
00059   BOOL m_bOperandAvail;
00060
00061   // helper functions
00062   void PerformOperation();
00063   void ClickedNumber(long lNum);
00064   void UpdateDisplay();
00065
00066 public:
00067   // Generated message map functions
00068   //{{AFX_MSG(CCalcDlg)
00069   virtual BOOL OnInitDialog();
00070   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00071   afx_msg void OnPaint();
00072   afx_msg HCURSOR OnQueryDragIcon();
00073   afx_msg void OnClickedNumber(UINT nID);
00074   afx_msg void OnClickedClear();
00075   afx_msg void OnClickedDivide();
00076   afx_msg void OnClickedEqual();
00077   afx_msg void OnClickedMinus();
00078   afx_msg void OnClickedPlus();
00079   afx_msg void OnClickedTimes();
00080   virtual void OnCancel();
00081   virtual void OnOK();
00082   afx_msg void OnSetFocusAccum();
00083   //}}AFX_MSG
00084   DECLARE_MESSAGE_MAP()
00085
00086   // to be OLE creatable, it must be DYNCREATE and OLECREATE
00087   DECLARE_DYNCREATE(CCalcDlg)
00088   DECLARE_OLECREATE(CCalcDlg)
00089
00090 public:
00091   // Generated OLE dispatch map functions
00092   //{{AFX_DISPATCH(CCalcDlg)
00093   afx_msg long GetAccum();
00094   afx_msg void SetAccum(long nNewValue);
00095   afx_msg long GetOperand();
00096   afx_msg void SetOperand(long nNewValue);
00097   afx_msg short GetOperation();
00098   afx_msg void SetOperation(short nNewValue);
00099   afx_msg BOOL GetVisible();
00100   afx_msg void SetVisible(BOOL bNewValue);
00101   afx_msg BOOL Evaluate();
00102   afx_msg void Clear();
00103   afx_msg void Display();
00104   afx_msg void Close();
00105   afx_msg BOOL Button(LPCTSTR szButton);
00106   //}}AFX_DISPATCH
00107   DECLARE_DISPATCH_MAP()
00108 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawobj.cpp Source File

  • vc2008fp
  • DrawClient

drawobj.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013
00014 #ifndef SHARED_HANDLERS
00015 #include "DrawClient.h"
00016 #endif
00017
00018 #include "drawdoc.h"
00019
00020 #ifndef SHARED_HANDLERS
00021 #include "drawvw.h"
00022 #endif
00023
00024 #include "drawobj.h"
00025 #include "cntritem.h"
00026
00027 #ifndef SHARED_HANDLERS
00028 #include "rectdlg.h"
00029 #endif
00030
00031 IMPLEMENT_SERIAL(CDrawObj, CObject, 0)
00032
00033 CDrawObj::CDrawObj()
00034 {
00035 }
00036
00037 CDrawObj::~CDrawObj()
00038 {
00039 }
00040
00041 CDrawObj::CDrawObj(const CRect& position)
00042 {
00043   m_position = position;
00044   m_pDocument = NULL;
00045
00046   m_bPen = TRUE;
00047   m_logpen.lopnStyle = PS_INSIDEFRAME;
00048   m_logpen.lopnWidth.x = 1;
00049   m_logpen.lopnWidth.y = 1;
00050   m_logpen.lopnColor = RGB(0, 0, 0);
00051
00052   m_bBrush = TRUE;
00053   m_logbrush.lbStyle = BS_SOLID;
00054   m_logbrush.lbColor = RGB(192, 192, 192);
00055   m_logbrush.lbHatch = HS_HORIZONTAL;
00056 }
00057
00058 void CDrawObj::Serialize(CArchive& ar)
00059 {
00060   CObject::Serialize(ar);
00061   if (ar.IsStoring())
00062   {
00063     ar << m_position;
00064     ar <<(WORD)m_bPen;
00065     ar.Write(&m_logpen, sizeof(LOGPEN));
00066     ar <<(WORD)m_bBrush;
00067     ar.Write(&m_logbrush, sizeof(LOGBRUSH));
00068   }
00069   else
00070   {
00071     // get the document back pointer from the archive
00072     m_pDocument = (CDrawDoc*)ar.m_pDocument;
00073     ASSERT_VALID(m_pDocument);
00074     ASSERT_KINDOF(CDrawDoc, m_pDocument);
00075
00076     WORD wTemp;
00077     ar >> m_position;
00078     ar >> wTemp; m_bPen = (BOOL)wTemp;
00079     ar.Read(&m_logpen,sizeof(LOGPEN));
00080     ar >> wTemp; m_bBrush = (BOOL)wTemp;
00081     ar.Read(&m_logbrush, sizeof(LOGBRUSH));
00082   }
00083 }
00084
00085 void CDrawObj::Remove()
00086 {
00087   delete this;
00088 }
00089
00090 void CDrawObj::Draw(CDC*)
00091 {
00092 }
00093
00094 void CDrawObj::MoveTo(const CPoint& position)
00095 {
00096   m_position.OffsetRect (position);
00097 }
00098
00099 void CDrawObj::DrawTracker(CDC* pDC, TrackerState state)
00100 {
00101   ASSERT_VALID(this);
00102
00103   switch (state)
00104   {
00105   case normal:
00106     break;
00107
00108   case selected:
00109   case active:
00110     {
00111       int nHandleCount = GetHandleCount();
00112       for (int nHandle = 1; nHandle <= nHandleCount; nHandle += 1)
00113       {
00114         CPoint handle = GetHandle(nHandle);
00115         pDC->PatBlt(handle.x - 3, handle.y - 3, 7, 7, DSTINVERT);
00116       }
00117     }
00118     break;
00119   }
00120 }
00121
00122 // position is in logical
00123 void CDrawObj::MoveTo(const CRect& position, CDrawView* pView)
00124 {
00125   ASSERT_VALID(this);
00126
00127   if (position == m_position)
00128     return;
00129
00130   if (pView == NULL)
00131   {
00132     Invalidate();
00133     m_position = position;
00134     Invalidate();
00135   }
00136   else
00137   {
00138 #ifndef SHARED_HANDLERS
00139     pView->InvalObj(this);
00140     m_position = position;
00141     pView->InvalObj(this);
00142 #endif
00143   }
00144   m_pDocument->SetModifiedFlag();
00145 }
00146
00147 // Note: if bSelected, hit-codes start at one for the top-left
00148 // and increment clockwise, 0 means no hit.
00149 // If !bSelected, 0 = no hit, 1 = hit(anywhere)
00150
00151 // point is in logical coordinates
00152 int CDrawObj::HitTest(CPoint point, CDrawView* pView, BOOL bSelected)
00153 {
00154   ASSERT_VALID(this);
00155   ASSERT(pView != NULL);
00156
00157 #ifndef SHARED_HANDLERS
00158   if (bSelected)
00159   {
00160     int nHandleCount = GetHandleCount();
00161     for (int nHandle = 1; nHandle <= nHandleCount; nHandle += 1)
00162     {
00163       // GetHandleRect returns in logical coords
00164       CRect rc = GetHandleRect(nHandle,pView);
00165       if (point.x >= rc.left && point.x < rc.right && point.y <= rc.top && point.y > rc.bottom)
00166         return nHandle;
00167     }
00168   }
00169   else
00170   {
00171     if (point.x >= m_position.left && point.x < m_position.right && point.y <= m_position.top && point.y > m_position.bottom)
00172       return 1;
00173   }
00174 #endif
00175
00176   return 0;
00177 }
00178
00179 // rect must be in logical coordinates
00180 BOOL CDrawObj::Intersects(const CRect& rect)
00181 {
00182   ASSERT_VALID(this);
00183
00184   CRect fixed = m_position;
00185   fixed.NormalizeRect();
00186   CRect rectT = rect;
00187   rectT.NormalizeRect();
00188   return !(rectT & fixed).IsRectEmpty();
00189 }
00190
00191 int CDrawObj::GetHandleCount()
00192 {
00193   ASSERT_VALID(this);
00194   return 8;
00195 }
00196
00197 // returns logical coords of center of handle
00198 CPoint CDrawObj::GetHandle(int nHandle)
00199 {
00200   ASSERT_VALID(this);
00201   int x, y, xCenter, yCenter;
00202
00203   // this gets the center regardless of left/right and top/bottom ordering
00204   xCenter = m_position.left + m_position.Width() / 2;
00205   yCenter = m_position.top + m_position.Height() / 2;
00206
00207   switch (nHandle)
00208   {
00209   default:
00210     ASSERT(FALSE);
00211
00212   case 1:
00213     x = m_position.left;
00214     y = m_position.top;
00215     break;
00216
00217   case 2:
00218     x = xCenter;
00219     y = m_position.top;
00220     break;
00221
00222   case 3:
00223     x = m_position.right;
00224     y = m_position.top;
00225     break;
00226
00227   case 4:
00228     x = m_position.right;
00229     y = yCenter;
00230     break;
00231
00232   case 5:
00233     x = m_position.right;
00234     y = m_position.bottom;
00235     break;
00236
00237   case 6:
00238     x = xCenter;
00239     y = m_position.bottom;
00240     break;
00241
00242   case 7:
00243     x = m_position.left;
00244     y = m_position.bottom;
00245     break;
00246
00247   case 8:
00248     x = m_position.left;
00249     y = yCenter;
00250     break;
00251   }
00252
00253   return CPoint(x, y);
00254 }
00255
00256 // return rectange of handle in logical coords
00257 CRect CDrawObj::GetHandleRect(int nHandleID, CDrawView* pView)
00258 {
00259   ASSERT_VALID(this);
00260   ENSURE(pView != NULL);
00261   CRect rect;
00262
00263 #ifndef SHARED_HANDLERS
00264   // get the center of the handle in logical coords
00265   CPoint point = GetHandle(nHandleID);
00266   // convert to client/device coords
00267   pView->DocToClient(point);
00268   // return CRect of handle in device coords
00269   rect.SetRect(point.x-3, point.y-3, point.x+3, point.y+3);
00270   pView->ClientToDoc(rect);
00271 #endif
00272
00273   return rect;
00274 }
00275
00276 HCURSOR CDrawObj::GetHandleCursor(int nHandle)
00277 {
00278   ASSERT_VALID(this);
00279
00280   LPCTSTR id;
00281   switch (nHandle)
00282   {
00283   default:
00284     ASSERT(FALSE);
00285
00286   case 1:
00287   case 5:
00288     id = IDC_SIZENWSE;
00289     break;
00290
00291   case 2:
00292   case 6:
00293     id = IDC_SIZENS;
00294     break;
00295
00296   case 3:
00297   case 7:
00298     id = IDC_SIZENESW;
00299     break;
00300
00301   case 4:
00302   case 8:
00303     id = IDC_SIZEWE;
00304     break;
00305   }
00306
00307   return AfxGetApp()->LoadStandardCursor(id);
00308 }
00309
00310 // point must be in logical
00311 void CDrawObj::MoveHandleTo(int nHandle, CPoint point, CDrawView* pView)
00312 {
00313   ASSERT_VALID(this);
00314
00315   CRect position = m_position;
00316   switch (nHandle)
00317   {
00318   default:
00319     ASSERT(FALSE);
00320
00321   case 1:
00322     position.left = point.x;
00323     position.top = point.y;
00324     break;
00325
00326   case 2:
00327     position.top = point.y;
00328     break;
00329
00330   case 3:
00331     position.right = point.x;
00332     position.top = point.y;
00333     break;
00334
00335   case 4:
00336     position.right = point.x;
00337     break;
00338
00339   case 5:
00340     position.right = point.x;
00341     position.bottom = point.y;
00342     break;
00343
00344   case 6:
00345     position.bottom = point.y;
00346     break;
00347
00348   case 7:
00349     position.left = point.x;
00350     position.bottom = point.y;
00351     break;
00352
00353   case 8:
00354     position.left = point.x;
00355     break;
00356   }
00357
00358   MoveTo(position, pView);
00359 }
00360
00361 void CDrawObj::Invalidate()
00362 {
00363   ASSERT_VALID(this);
00364 #ifndef SHARED_HANDLERS
00365   if (m_pDocument)
00366   {
00367     m_pDocument->UpdateAllViews(NULL, HINT_UPDATE_DRAWOBJ, this);
00368   }
00369 #endif
00370 }
00371
00372 CDrawObj* CDrawObj::Clone(CDrawDoc* pDoc)
00373 {
00374   ASSERT_VALID(this);
00375
00376   CDrawObj* pClone = new CDrawObj(m_position);
00377   pClone->m_bPen         = m_bPen;
00378   pClone->m_logpen       = m_logpen;
00379   pClone->m_bBrush       = m_bBrush;
00380   pClone->m_logbrush     = m_logbrush;
00381   ASSERT_VALID(pClone);
00382
00383   if (pDoc != NULL)
00384     pDoc->Add(pClone);
00385
00386   return pClone;
00387 }
00388
00389 void CDrawObj::OnEditProperties()
00390 {
00391   ASSERT_VALID(this);
00392
00393 #ifndef SHARED_HANDLERS
00394   CPropertySheet sheet( _T("Shape Properties") );
00395   CRectDlg dlg;
00396   dlg.m_bNoFill = !m_bBrush;
00397   dlg.m_penSize = m_bPen ? m_logpen.lopnWidth.x : 0;
00398   sheet.AddPage( &dlg );
00399
00400   if (sheet.DoModal() != IDOK)
00401     return;
00402
00403   m_bBrush = !dlg.m_bNoFill;
00404   m_bPen = dlg.m_penSize > 0;
00405   if (m_bPen)
00406   {
00407     m_logpen.lopnWidth.x = dlg.m_penSize;
00408     m_logpen.lopnWidth.y = dlg.m_penSize;
00409   }
00410
00411   Invalidate();
00412   m_pDocument->SetModifiedFlag();
00413 #endif
00414 }
00415
00416 void CDrawObj::OnOpen(CDrawView* /*pView*/ )
00417 {
00418   OnEditProperties();
00419 }
00420
00421 void CDrawObj::SetLineColor(COLORREF color, BOOL bPreview)
00422 {
00423   ASSERT_VALID(this);
00424
00425   m_logpen.lopnColor = color;
00426
00427   Invalidate();
00428
00429   if (!bPreview)
00430   {
00431     m_pDocument->SetModifiedFlag();
00432   }
00433 }
00434
00435 void CDrawObj::SetFillColor(COLORREF color, BOOL bPreview)
00436 {
00437   ASSERT_VALID(this);
00438
00439   m_logbrush.lbColor = color;
00440
00441   Invalidate();
00442
00443   if (!bPreview)
00444   {
00445     m_pDocument->SetModifiedFlag();
00446   }
00447 }
00448
00449 void CDrawObj::SetLineWeight(int nWidth, BOOL bPreview)
00450 {
00451   ASSERT_VALID(this);
00452
00453   if (m_bPen)
00454   {
00455     m_bPen = nWidth > 0;
00456   }
00457
00458   if (m_bPen)
00459   {
00460     m_logpen.lopnWidth.x = nWidth;
00461     m_logpen.lopnWidth.y = nWidth;
00462   }
00463
00464   Invalidate();
00465
00466   if (!bPreview)
00467   {
00468     m_pDocument->SetModifiedFlag();
00469   }
00470 }
00471
00472 void CDrawObj::EnableFill(BOOL bEnable, BOOL bPreview/* = FALSE*/)
00473 {
00474   m_bBrush = bEnable;
00475   if (!bPreview)
00476   {
00477     m_pDocument->SetModifiedFlag();
00478   }
00479 }
00480
00481 void CDrawObj::EnableLine(BOOL bEnable, BOOL bPreview/* = FALSE*/)
00482 {
00483   m_bPen = bEnable;
00484   if (!bPreview)
00485   {
00486     m_pDocument->SetModifiedFlag();
00487   }
00488 }
00489
00490 #ifdef _DEBUG
00491 void CDrawObj::AssertValid()
00492 {
00493   ASSERT(m_position.left <= m_position.right);
00494   ASSERT(m_position.bottom <= m_position.top);
00495 }
00496 #endif
00497
00498 ////////////////////////////////////////////////////////////////////////////
00499 // CDrawRect
00500
00501 IMPLEMENT_SERIAL(CDrawRect, CDrawObj, 0)
00502
00503 CDrawRect::CDrawRect()
00504 {
00505 }
00506
00507 CDrawRect::CDrawRect(const CRect& position)
00508 : CDrawObj(position)
00509 {
00510   ASSERT_VALID(this);
00511
00512   m_nShape = rectangle;
00513   m_roundness.x = 16;
00514   m_roundness.y = 16;
00515 }
00516
00517 void CDrawRect::Serialize(CArchive& ar)
00518 {
00519   ASSERT_VALID(this);
00520
00521   CDrawObj::Serialize(ar);
00522   if (ar.IsStoring())
00523   {
00524     ar <<(WORD) m_nShape;
00525     ar << m_roundness;
00526   }
00527   else
00528   {
00529     WORD wTemp;
00530     ar >> wTemp; m_nShape = (Shape)wTemp;
00531     ar >> m_roundness;
00532   }
00533 }
00534
00535 void CDrawRect::Draw(CDC* pDC)
00536 {
00537   ASSERT_VALID(this);
00538
00539   CBrush brush;
00540   if (!brush.CreateBrushIndirect(&m_logbrush))
00541     return;
00542   CPen pen;
00543   if (!pen.CreatePenIndirect(&m_logpen))
00544     return;
00545
00546   CBrush* pOldBrush;
00547   CPen* pOldPen;
00548
00549   if (m_bBrush)
00550     pOldBrush = pDC->SelectObject(&brush);
00551   else
00552     pOldBrush = (CBrush*)pDC->SelectStockObject(NULL_BRUSH);
00553
00554   if (m_bPen)
00555     pOldPen = pDC->SelectObject(&pen);
00556   else
00557     pOldPen = (CPen*)pDC->SelectStockObject(NULL_PEN);
00558
00559   CRect rect = m_position;
00560   switch (m_nShape)
00561   {
00562   case rectangle:
00563     pDC->Rectangle(rect);
00564     break;
00565
00566   case roundRectangle:
00567     pDC->RoundRect(rect, m_roundness);
00568     break;
00569
00570   case ellipse:
00571     pDC->Ellipse(rect);
00572     break;
00573
00574   case line:
00575     if (rect.top > rect.bottom)
00576     {
00577       rect.top -= m_logpen.lopnWidth.y / 2;
00578       rect.bottom += (m_logpen.lopnWidth.y + 1) / 2;
00579     }
00580     else
00581     {
00582       rect.top += (m_logpen.lopnWidth.y + 1) / 2;
00583       rect.bottom -= m_logpen.lopnWidth.y / 2;
00584     }
00585
00586     if (rect.left > rect.right)
00587     {
00588       rect.left -= m_logpen.lopnWidth.x / 2;
00589       rect.right += (m_logpen.lopnWidth.x + 1) / 2;
00590     }
00591     else
00592     {
00593       rect.left += (m_logpen.lopnWidth.x + 1) / 2;
00594       rect.right -= m_logpen.lopnWidth.x / 2;
00595     }
00596
00597     pDC->MoveTo(rect.TopLeft());
00598     pDC->LineTo(rect.BottomRight());
00599     break;
00600   }
00601
00602   pDC->SelectObject(pOldBrush);
00603   pDC->SelectObject(pOldPen);
00604 }
00605
00606 int CDrawRect::GetHandleCount()
00607 {
00608   ASSERT_VALID(this);
00609
00610   return m_nShape == line ? 2 : CDrawObj::GetHandleCount() +(m_nShape == roundRectangle);
00611 }
00612
00613 // returns center of handle in logical coordinates
00614 CPoint CDrawRect::GetHandle(int nHandle)
00615 {
00616   ASSERT_VALID(this);
00617
00618   if (m_nShape == line && nHandle == 2)
00619     nHandle = 5;
00620   else if (m_nShape == roundRectangle && nHandle == 9)
00621   {
00622     CRect rect = m_position;
00623     rect.NormalizeRect();
00624     CPoint point = rect.BottomRight();
00625     point.x -= m_roundness.x / 2;
00626     point.y -= m_roundness.y / 2;
00627     return point;
00628   }
00629
00630   return CDrawObj::GetHandle(nHandle);
00631 }
00632
00633 HCURSOR CDrawRect::GetHandleCursor(int nHandle)
00634 {
00635   ASSERT_VALID(this);
00636
00637   if (m_nShape == line && nHandle == 2)
00638     nHandle = 5;
00639   else if (m_nShape == roundRectangle && nHandle == 9)
00640     return AfxGetApp()->LoadStandardCursor(IDC_SIZEALL);
00641   return CDrawObj::GetHandleCursor(nHandle);
00642 }
00643
00644 // point is in logical coordinates
00645 void CDrawRect::MoveHandleTo(int nHandle, CPoint point, CDrawView* pView)
00646 {
00647   ASSERT_VALID(this);
00648
00649 #ifndef SHARED_HANDLERS
00650   if (m_nShape == line && nHandle == 2)
00651     nHandle = 5;
00652   else if (m_nShape == roundRectangle && nHandle == 9)
00653   {
00654     CRect rect = m_position;
00655     rect.NormalizeRect();
00656     if (point.x > rect.right - 1)
00657       point.x = rect.right - 1;
00658     else if (point.x < rect.left + rect.Width() / 2)
00659       point.x = rect.left + rect.Width() / 2;
00660     if (point.y > rect.bottom - 1)
00661       point.y = rect.bottom - 1;
00662     else if (point.y < rect.top + rect.Height() / 2)
00663       point.y = rect.top + rect.Height() / 2;
00664     m_roundness.x = 2 *(rect.right - point.x);
00665     m_roundness.y = 2 *(rect.bottom - point.y);
00666     m_pDocument->SetModifiedFlag();
00667     if (pView == NULL)
00668       Invalidate();
00669     else
00670       pView->InvalObj(this);
00671     return;
00672   }
00673 #endif
00674   CDrawObj::MoveHandleTo(nHandle, point, pView);
00675 }
00676
00677 // rect must be in logical coordinates
00678 BOOL CDrawRect::Intersects(const CRect& rect)
00679 {
00680   ASSERT_VALID(this);
00681
00682   CRect rectT = rect;
00683   rectT.NormalizeRect();
00684
00685   CRect fixed = m_position;
00686   fixed.NormalizeRect();
00687   if ((rectT & fixed).IsRectEmpty())
00688     return FALSE;
00689
00690   CRgn rgn;
00691   switch (m_nShape)
00692   {
00693   case rectangle:
00694     return TRUE;
00695
00696   case roundRectangle:
00697     rgn.CreateRoundRectRgn(fixed.left, fixed.top, fixed.right, fixed.bottom, m_roundness.x, m_roundness.y);
00698     break;
00699
00700   case ellipse:
00701     rgn.CreateEllipticRgnIndirect(fixed);
00702     break;
00703
00704   case line:
00705     {
00706       int x = (m_logpen.lopnWidth.x + 5) / 2;
00707       int y = (m_logpen.lopnWidth.y + 5) / 2;
00708       POINT points[4];
00709       points[0].x = fixed.left;
00710       points[0].y = fixed.top;
00711       points[1].x = fixed.left;
00712       points[1].y = fixed.top;
00713       points[2].x = fixed.right;
00714       points[2].y = fixed.bottom;
00715       points[3].x = fixed.right;
00716       points[3].y = fixed.bottom;
00717
00718       if (fixed.left < fixed.right)
00719       {
00720         points[0].x -= x;
00721         points[1].x += x;
00722         points[2].x += x;
00723         points[3].x -= x;
00724       }
00725       else
00726       {
00727         points[0].x += x;
00728         points[1].x -= x;
00729         points[2].x -= x;
00730         points[3].x += x;
00731       }
00732
00733       if (fixed.top < fixed.bottom)
00734       {
00735         points[0].y -= y;
00736         points[1].y += y;
00737         points[2].y += y;
00738         points[3].y -= y;
00739       }
00740       else
00741       {
00742         points[0].y += y;
00743         points[1].y -= y;
00744         points[2].y -= y;
00745         points[3].y += y;
00746       }
00747       rgn.CreatePolygonRgn(points, 4, ALTERNATE);
00748     }
00749     break;
00750   }
00751   return rgn.RectInRegion(fixed);
00752 }
00753
00754 CDrawObj* CDrawRect::Clone(CDrawDoc* pDoc)
00755 {
00756   ASSERT_VALID(this);
00757
00758   CDrawRect* pClone = new CDrawRect(m_position);
00759   pClone->m_bPen = m_bPen;
00760   pClone->m_logpen = m_logpen;
00761   pClone->m_bBrush = m_bBrush;
00762   pClone->m_logbrush = m_logbrush;
00763   pClone->m_nShape = m_nShape;
00764   pClone->m_roundness = m_roundness;
00765   ASSERT_VALID(pClone);
00766
00767   if (pDoc != NULL)
00768     pDoc->Add(pClone);
00769
00770   ASSERT_VALID(pClone);
00771   return pClone;
00772 }
00773
00774 ////////////////////////////////////////////////////////////////////////////
00775 // CDrawPoly
00776
00777 IMPLEMENT_SERIAL(CDrawPoly, CDrawObj, 0)
00778
00779 CDrawPoly::CDrawPoly()
00780 {
00781   m_points = NULL;
00782   m_nPoints = 0;
00783   m_nAllocPoints = 0;
00784 }
00785
00786 CDrawPoly::CDrawPoly(const CRect& position)
00787 : CDrawObj(position)
00788 {
00789   m_points       = NULL;
00790   m_nPoints      = 0;
00791   m_nAllocPoints = 0;
00792
00793   m_bPen         = TRUE;
00794   m_bBrush       = FALSE;
00795 }
00796
00797 CDrawPoly::~CDrawPoly()
00798 {
00799   if (m_points != NULL)
00800     delete[] m_points;
00801 }
00802
00803 void CDrawPoly::Serialize( CArchive& ar )
00804 {
00805   int i;
00806   CDrawObj::Serialize( ar );
00807   if ( ar.IsStoring() )
00808   {
00809     ar <<(WORD) m_nPoints;
00810     ar <<(WORD) m_nAllocPoints;
00811     for (i = 0;i< m_nPoints; i++)
00812       ar << m_points[i];
00813   }
00814   else
00815   {
00816     WORD wTemp;
00817     ar >> wTemp; m_nPoints = wTemp;
00818     ar >> wTemp; m_nAllocPoints = wTemp;
00819     m_points = new CPoint[m_nAllocPoints];
00820     for (i = 0;i < m_nPoints; i++)
00821       ar >> m_points[i];
00822   }
00823 }
00824
00825 void CDrawPoly::Draw(CDC* pDC)
00826 {
00827   ASSERT_VALID(this);
00828
00829   CBrush brush;
00830   if (!brush.CreateBrushIndirect(&m_logbrush))
00831     return;
00832   CPen pen;
00833   if (!pen.CreatePenIndirect(&m_logpen))
00834     return;
00835
00836   CBrush* pOldBrush;
00837   CPen* pOldPen;
00838
00839   if (m_bBrush)
00840     pOldBrush = pDC->SelectObject(&brush);
00841   else
00842     pOldBrush = (CBrush*)pDC->SelectStockObject(NULL_BRUSH);
00843
00844   if (m_bPen)
00845     pOldPen = pDC->SelectObject(&pen);
00846   else
00847     pOldPen = (CPen*)pDC->SelectStockObject(NULL_PEN);
00848
00849   pDC->Polygon(m_points, m_nPoints);
00850
00851   pDC->SelectObject(pOldBrush);
00852   pDC->SelectObject(pOldPen);
00853 }
00854
00855 // position must be in logical coordinates
00856 void CDrawPoly::MoveTo(const CRect& position, CDrawView* pView)
00857 {
00858   ASSERT_VALID(this);
00859   if (position == m_position)
00860     return;
00861
00862 #ifndef SHARED_HANDLERS
00863   if (pView == NULL)
00864     Invalidate();
00865   else
00866     pView->InvalObj(this);
00867
00868   for (int i = 0; i < m_nPoints; i += 1)
00869   {
00870     m_points[i].x += position.left - m_position.left;
00871     m_points[i].y += position.top - m_position.top;
00872   }
00873
00874   m_position = position;
00875
00876   if (pView == NULL)
00877     Invalidate();
00878   else
00879     pView->InvalObj(this);
00880 #endif
00881   m_pDocument->SetModifiedFlag();
00882 }
00883 void CDrawPoly::MoveTo (const CPoint& position)
00884 {
00885   CDrawObj::MoveTo (position);
00886   for (int i = 0; i < m_nPoints; i += 1)
00887   {
00888     m_points[i].x += position.x;
00889     m_points[i].y += position.y;
00890   }
00891 }
00892 int CDrawPoly::GetHandleCount()
00893 {
00894   return m_nPoints;
00895 }
00896
00897 CPoint CDrawPoly::GetHandle(int nHandle)
00898 {
00899   ASSERT_VALID(this);
00900
00901   ASSERT(nHandle >= 1 && nHandle <= m_nPoints);
00902   return m_points[nHandle - 1];
00903 }
00904
00905 HCURSOR CDrawPoly::GetHandleCursor(int )
00906 {
00907   return AfxGetApp()->LoadStandardCursor(IDC_ARROW);
00908 }
00909
00910 // point is in logical coordinates
00911 void CDrawPoly::MoveHandleTo(int nHandle, CPoint point, CDrawView* pView)
00912 {
00913   ASSERT_VALID(this);
00914   ASSERT(nHandle >= 1 && nHandle <= m_nPoints);
00915   if (m_points[nHandle - 1] == point)
00916     return;
00917
00918 #ifndef SHARED_HANDLERS
00919   m_points[nHandle - 1] = point;
00920   RecalcBounds(pView);
00921
00922   if (pView == NULL)
00923     Invalidate();
00924   else
00925     pView->InvalObj(this);
00926   m_pDocument->SetModifiedFlag();
00927 #endif
00928 }
00929
00930 // rect must be in logical coordinates
00931 BOOL CDrawPoly::Intersects(const CRect& rect)
00932 {
00933   ASSERT_VALID(this);
00934   CRgn rgn;
00935   rgn.CreatePolygonRgn(m_points, m_nPoints, ALTERNATE);
00936   return rgn.RectInRegion(rect);
00937 }
00938
00939 CDrawObj* CDrawPoly::Clone(CDrawDoc* pDoc)
00940 {
00941   ASSERT_VALID(this);
00942
00943 #pragma warning(suppress:6211)
00944   CDrawPoly* pClone = new CDrawPoly(m_position);
00945   pClone->m_bPen = m_bPen;
00946   pClone->m_logpen = m_logpen;
00947   pClone->m_bBrush = m_bBrush;
00948   pClone->m_logbrush = m_logbrush;
00949   pClone->m_points = new CPoint[m_nAllocPoints];
00950
00951   memcpy_s(pClone->m_points, sizeof(CPoint) * m_nAllocPoints, m_points, sizeof(CPoint) * m_nPoints);
00952
00953   pClone->m_nAllocPoints = m_nAllocPoints;
00954   pClone->m_nPoints = m_nPoints;
00955   ASSERT_VALID(pClone);
00956
00957   if (pDoc != NULL)
00958     pDoc->Add(pClone);
00959
00960   ASSERT_VALID(pClone);
00961   return pClone;
00962 }
00963
00964 // point is in logical coordinates
00965 void CDrawPoly::AddPoint(const CPoint& point, CDrawView* pView)
00966 {
00967   ASSERT_VALID(this);
00968
00969 #ifndef SHARED_HANDLERS
00970   if (m_nPoints == m_nAllocPoints)
00971   {
00972     CPoint* newPoints = new CPoint[m_nAllocPoints + 10];
00973     if (m_points != NULL)
00974     {
00975       memcpy_s(newPoints, sizeof(CPoint) *(m_nAllocPoints + 10), m_points, sizeof(CPoint) * m_nAllocPoints);
00976       delete[] m_points;
00977     }
00978     m_points = newPoints;
00979     m_nAllocPoints += 10;
00980   }
00981
00982   if (m_nPoints == 0 || m_points[m_nPoints - 1] != point)
00983   {
00984     m_points[m_nPoints++] = point;
00985     if (!RecalcBounds(pView))
00986     {
00987       if (pView == NULL)
00988         Invalidate();
00989       else
00990         pView->InvalObj(this);
00991     }
00992     m_pDocument->SetModifiedFlag();
00993   }
00994 #endif
00995 }
00996
00997 BOOL CDrawPoly::RecalcBounds(CDrawView* pView)
00998 {
00999   ASSERT_VALID(this);
01000
01001   if (m_nPoints == 0)
01002     return FALSE;
01003
01004 #ifndef SHARED_HANDLERS
01005   CRect bounds(m_points[0], CSize(0, 0));
01006   for (int i = 1; i < m_nPoints; ++i)
01007   {
01008     if (m_points[i].x < bounds.left)
01009       bounds.left = m_points[i].x;
01010     if (m_points[i].x > bounds.right)
01011       bounds.right = m_points[i].x;
01012     if (m_points[i].y < bounds.top)
01013       bounds.top = m_points[i].y;
01014     if (m_points[i].y > bounds.bottom)
01015       bounds.bottom = m_points[i].y;
01016   }
01017
01018   if (bounds == m_position)
01019     return FALSE;
01020
01021   if (pView == NULL)
01022     Invalidate();
01023   else
01024     pView->InvalObj(this);
01025
01026   m_position = bounds;
01027
01028   if (pView == NULL)
01029     Invalidate();
01030   else
01031     pView->InvalObj(this);
01032 #endif
01033
01034   return TRUE;
01035 }
01036
01037 ////////////////////////////////////////////////////////////////////////////
01038
01039 IMPLEMENT_SERIAL(CDrawOleObj, CDrawObj, 0)
01040
01041 BOOL CDrawOleObj::c_bShowItems = TRUE;
01042
01043 CDrawOleObj::CDrawOleObj() : m_extent(0,0)
01044 {
01045   m_pClientItem = NULL;
01046 }
01047
01048 CDrawOleObj::CDrawOleObj(const CRect& position)
01049 : CDrawObj(position), m_extent(0, 0)
01050 {
01051   m_pClientItem = NULL;
01052 }
01053
01054 CDrawOleObj::~CDrawOleObj()
01055 {
01056   if (m_pClientItem != NULL)
01057   {
01058     m_pClientItem->Release();
01059     m_pClientItem = NULL;
01060   }
01061 }
01062
01063 void CDrawOleObj::Remove()
01064 {
01065   if (m_pClientItem != NULL)
01066   {
01067     m_pClientItem->Delete();
01068     m_pClientItem = NULL;
01069   }
01070   CDrawObj::Remove();
01071 }
01072
01073 void CDrawOleObj::Serialize( CArchive& ar )
01074 {
01075   ASSERT_VALID(this);
01076
01077   CDrawObj::Serialize(ar);
01078
01079   if (ar.IsStoring())
01080   {
01081     ar << m_extent;
01082     ar << m_pClientItem;
01083   }
01084   else
01085   {
01086     ar >> m_extent;
01087     ar >> m_pClientItem;
01088     m_pClientItem->m_pDrawObj = this;
01089   }
01090 }
01091
01092 CDrawObj* CDrawOleObj::Clone(CDrawDoc* pDoc)
01093 {
01094   ASSERT_VALID(this);
01095
01096   AfxGetApp()->BeginWaitCursor();
01097
01098   CDrawOleObj* pClone = NULL;
01099   CDrawItem* pItem = NULL;
01100   TRY
01101   {
01102     // perform a "deep copy" -- need to copy CDrawOleObj and the CDrawItem
01103     //  that it points to.
01104     pClone = new CDrawOleObj(m_position);
01105 #pragma warning(suppress:6014)
01106     pItem = new CDrawItem(m_pDocument, pClone);
01107     if (!pItem->CreateCloneFrom(m_pClientItem))
01108     {
01109       AfxThrowMemoryException();
01110     }
01111
01112     pClone->m_pClientItem = pItem;
01113     pClone->m_bPen = m_bPen;
01114     pClone->m_logpen = m_logpen;
01115     pClone->m_bBrush = m_bBrush;
01116     pClone->m_logbrush = m_logbrush;
01117     ASSERT_VALID(pClone);
01118
01119     if (pDoc != NULL)
01120       pDoc->Add(pClone);
01121   }
01122   CATCH_ALL(e)
01123   {
01124     if (pItem)
01125       pItem->Delete();
01126
01127     if (pClone)
01128     {
01129       pClone->m_pClientItem = NULL;
01130       pClone->Remove();
01131     }
01132     AfxGetApp()->EndWaitCursor();
01133
01134     THROW_LAST();
01135   }
01136   END_CATCH_ALL
01137
01138     AfxGetApp()->EndWaitCursor();
01139   return pClone;
01140 }
01141
01142 void CDrawOleObj::Draw(CDC* pDC)
01143 {
01144   ASSERT_VALID(this);
01145
01146   CDrawItem* pItem = m_pClientItem;
01147   if (pItem != NULL)
01148   {
01149     // draw the OLE item itself
01150     pItem->Draw(pDC, m_position);
01151
01152     // don't draw tracker in print preview or on printer
01153     if (!pDC->IsPrinting())
01154     {
01155       // use a CRectTracker to draw the standard effects
01156       CRectTracker tracker;
01157       tracker.m_rect = m_position;
01158       pDC->LPtoDP(tracker.m_rect);
01159
01160       if (c_bShowItems)
01161       {
01162         // put correct border depending on item type
01163         if (pItem->GetType() == OT_LINK)
01164           tracker.m_nStyle |= CRectTracker::dottedLine;
01165         else
01166           tracker.m_nStyle |= CRectTracker::solidLine;
01167       }
01168
01169       // put hatching over the item if it is currently open
01170       if (pItem->GetItemState() == COleClientItem::openState || pItem->GetItemState() == COleClientItem::activeUIState)
01171       {
01172         tracker.m_nStyle |= CRectTracker::hatchInside;
01173       }
01174       tracker.Draw(pDC);
01175     }
01176   }
01177 }
01178
01179 void CDrawOleObj::OnOpen(CDrawView* pView)
01180 {
01181   AfxGetApp()->BeginWaitCursor();
01182   m_pClientItem->DoVerb(GetKeyState(VK_CONTROL) < 0 ? OLEIVERB_OPEN : OLEIVERB_PRIMARY, pView);
01183   AfxGetApp()->EndWaitCursor();
01184 }
01185
01186 void CDrawOleObj::OnEditProperties()
01187 {
01188 #ifndef SHARED_HANDLERS
01189   // using COlePropertiesDialog directly means no scaling
01190   COlePropertiesDialog dlg(m_pClientItem, 100, 100, NULL);
01191
01192   dlg.DoModal();
01193 #endif
01194 }
01195
01196 // position is in logical
01197 void CDrawOleObj::MoveTo(const CRect& position, CDrawView* pView)
01198 {
01199   ASSERT_VALID(this);
01200
01201   if (position == m_position)
01202     return;
01203
01204   // call base class to update position
01205   CDrawObj::MoveTo(position, pView);
01206
01207   // update position of in-place editing session on position change
01208   if (m_pClientItem->IsInPlaceActive())
01209     m_pClientItem->SetItemRects();
01210 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/MainFrm.cpp Source File

  • vc2008fp
  • RibbonGadgets

MainFrm.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonGadgets.h"
00014
00015 #include "MainFrm.h"
00016
00017 #include <memory>
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 const int IdShowProgress1Timer  = 1;
00026 const int IdShowProgress2Timer  = 2;
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CMainFrame
00030
00031 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
00032
00033
00034 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
00035   ON_WM_CREATE()
00036   ON_COMMAND(ID_RIBBON_BTN_7, OnRibbonBtn7)
00037   ON_UPDATE_COMMAND_UI(ID_RIBBON_BTN_7, OnUpdateRibbonBtn7)
00038   ON_COMMAND(ID_RIBBON_BTN_8, OnRibbonBtn8)
00039   ON_UPDATE_COMMAND_UI(ID_RIBBON_BTN_8, OnUpdateRibbonBtn8)
00040   ON_COMMAND(ID_RIBBON_BTN_9, OnRibbonBtn9)
00041   ON_UPDATE_COMMAND_UI(ID_RIBBON_BTN_9, OnUpdateRibbonBtn9)
00042   ON_COMMAND(ID_RIBBON_OBTN_2, OnRibbonObtn2)
00043   ON_COMMAND(ID_RIBBON_OBTN_3, OnRibbonObtn3)
00044   ON_COMMAND(ID_RIBBON_OBTN_4, OnRibbonObtn4)
00045   ON_COMMAND(ID_RIBBON_OBTN_8, OnRibbonObtn8)
00046   ON_UPDATE_COMMAND_UI(ID_RIBBON_OBTN_8, OnUpdateRibbonObtn8)
00047   ON_COMMAND(ID_RIBBON_OBTN_10, OnRibbonObtn10)
00048   ON_UPDATE_COMMAND_UI(ID_RIBBON_OBTN_10, OnUpdateRibbonObtn10)
00049   ON_WM_TIMER()
00050   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2007, ID_VIEW_APPLOOK_2007_3, OnAppLook)
00051   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2007, ID_VIEW_APPLOOK_2007_3, OnUpdateAppLook)
00052   ON_REGISTERED_MESSAGE(AFX_WM_ON_RIBBON_CUSTOMIZE, OnRibbonCustomize)
00053   ON_REGISTERED_MESSAGE(AFX_WM_ON_CHANGE_RIBBON_CATEGORY, OnChangeRibbonCategory)
00054   ON_COMMAND(ID_TOOLS_OPTIONS, OnToolsOptions)
00055   ON_COMMAND_RANGE(ID_RIBBON_A, ID_RIBBON_Z, OnDummy)
00056   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00057   ON_COMMAND(ID_FILE_PRINT_DIRECT, OnFilePrint)
00058   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00059   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, OnUpdateFilePrintPreview)
00060 END_MESSAGE_MAP()
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CMainFrame construction/destruction
00064
00065 CMainFrame::CMainFrame()
00066   : m_bCheckBox1 (TRUE)
00067   , m_bCheckBox2 (FALSE)
00068   , m_bCheckBox3 (FALSE)
00069   , m_nProgressValue1 (-1)
00070   , m_nProgressValue2 (-1)
00071 {
00072   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_2007);
00073 }
00074
00075 void CMainFrame::CreateDocumentColors ()
00076 {
00077   typedef struct
00078   {
00079     COLORREF  color;
00080     TCHAR*    szName;
00081   }
00082   ColorTableEntry;
00083
00084   int i = 0;
00085   int nNumColours = 0;
00086
00087   static ColorTableEntry colorsMain [] =
00088   {
00089     { RGB (255, 255, 255),  _T("White, Background 1") },
00090     { RGB (0, 0, 0),      _T("Black, Text 1")     },
00091     { RGB (238, 236, 225),  _T("Tan, Background 2")   },
00092     { RGB (31, 73, 125),    _T("Dark Blue, Text 2")   },
00093     { RGB (79, 129, 189),   _T("Blue, Accent 1")    },
00094     { RGB (192, 80, 77),    _T("Red, Accent 2")     },
00095     { RGB (155, 187, 89),   _T("Olive Green, Accent 3") },
00096     { RGB (128, 100, 162),  _T("Purple, Accent 4")    },
00097     { RGB (75, 172, 198),   _T("Aqua, Accent 5")    },
00098     { RGB (245, 150, 70),   _T("Orange, Accent 6")    }
00099   };
00100
00101   static ColorTableEntry colorsAdditional [] =
00102   {
00103     { RGB (242, 242, 242),  _T("White, Background 1, Darker 5%")  },
00104     { RGB (127, 127, 127),  _T("Black, Text 1, Lighter 50%")    },
00105     { RGB (214, 212, 202),  _T("Tan, Background 2, Darker 10%")   },
00106     { RGB (210, 218, 229),  _T("Dark Blue, Text 2, Lighter 80%")  },
00107     { RGB (217, 228, 240),  _T("Blue, Accent 1, Lighter 80%")   },
00108     { RGB (244, 219, 218),  _T("Red, Accent 2, Lighter 80%")    },
00109     { RGB (234, 241, 221),  _T("Olive Green, Accent 3, Lighter 80%")},
00110     { RGB (229, 223, 235),  _T("Purple, Accent 4, Lighter 80%")   },
00111     { RGB (216, 237, 242),  _T("Aqua, Accent 5, Lighter 80%")   },
00112     { RGB (255, 234, 218),  _T("Orange, Accent 6, Lighter 80%")   },
00113
00114     { RGB (215, 215, 215),  _T("White, Background 1, Darker 15%") },
00115     { RGB (89, 89, 89),   _T("Black, Text 1, Lighter 35%")    },
00116     { RGB (177, 176, 167),  _T("Tan, Background 2, Darker 25%")   },
00117     { RGB (161, 180, 201),  _T("Dark Blue, Text 2, Lighter 60%")  },
00118     { RGB (179, 202, 226),  _T("Blue, Accent 1, Lighter 60%")   },
00119     { RGB (233, 184, 182),  _T("Red, Accent 2, Lighter 60%")    },
00120     { RGB (213, 226, 188),  _T("Olive Green, Accent 3, Lighter 60%")},
00121     { RGB (203, 191, 215),  _T("Purple, Accent 4, Lighter 60%")   },
00122     { RGB (176, 220, 231),  _T("Aqua, Accent 5, Lighter 60%")   },
00123     { RGB (255, 212, 181),  _T("Orange, Accent 6, Lighter 60%")   },
00124
00125     { RGB (190, 190, 190),  _T("White, Background 1, Darker 25%") },
00126     { RGB (65, 65, 65),   _T("Black, Text 1, Lighter 25%")    },
00127     { RGB (118, 117, 112),  _T("Tan, Background 2, Darker 35%")   },
00128     { RGB (115, 143, 175),  _T("Dark Blue, Text 2, Lighter 40%")  },
00129     { RGB (143, 177, 213),  _T("Blue, Accent 1, Lighter 40%")   },
00130     { RGB (222, 149, 147),  _T("Red, Accent 2, Lighter 40%")    },
00131     { RGB (192, 213, 155),  _T("Olive Green, Accent 3, Lighter 40%")},
00132     { RGB (177, 160, 197),  _T("Purple, Accent 4, Lighter 40%")   },
00133     { RGB (137, 203, 218),  _T("Aqua, Accent 5, Lighter 40%")   },
00134     { RGB (255, 191, 145),  _T("Orange, Accent 6, Lighter 40%")   },
00135
00136     { RGB (163, 163, 163),  _T("White, Background 1, Darker 35%") },
00137     { RGB (42, 42, 42),   _T("Black, Text 1, Lighter 15%")    },
00138     { RGB (61, 61, 59),   _T("Tan, Background 2, Darker 50%")   },
00139     { RGB (20, 57, 92),   _T("Dark Blue, Text 2, Darker 25%")   },
00140     { RGB (54, 96, 139),    _T("Blue, Accent 1, Darker 25%")    },
00141     { RGB (149, 63, 60),    _T("Red, Accent 2, Darker 25%")     },
00142     { RGB (114, 139, 71),   _T("Olive Green, Accent 3, Darker 25%") },
00143     { RGB (97, 76, 119),    _T("Purple, Accent 4, Darker 25%")    },
00144     { RGB (41, 128, 146),   _T("Aqua, Accent 5, Darker 25%")    },
00145     { RGB (190, 112, 59),   _T("Orange, Accent 6, Darker 25%")    },
00146
00147     { RGB (126, 126, 126),  _T("White, Background 1, Darker 50%") },
00148     { RGB (20, 20, 20),   _T("Black, Text 1, Lighter 5%")     },
00149     { RGB (29, 29, 28),   _T("Tan, Background 2, Darker 90%")   },
00150     { RGB (17, 40, 64),   _T("Dark Blue, Text 2, Darker 50%")   },
00151     { RGB (38, 66, 94),   _T("Blue, Accent 1, Darker 50%")    },
00152     { RGB (100, 44, 43),    _T("Red, Accent 2, Darker 50%")     },
00153     { RGB (77, 93, 49),   _T("Olive Green, Accent 3, Darker 50%") },
00154     { RGB (67, 53, 81),   _T("Purple, Accent 4, Darker 50%")    },
00155     { RGB (31, 86, 99),   _T("Aqua, Accent 5, Darker 50%")    },
00156     { RGB (126, 77, 42),    _T("Orange, Accent 6, Darker 50%")    },
00157   };
00158
00159   static ColorTableEntry colorsStandard [] =
00160   {
00161     { RGB (200, 15, 18),    _T("Dark Red")    },
00162     { RGB (255, 20, 24),    _T("Red")     },
00163     { RGB (255, 191, 40),   _T("Orange")    },
00164     { RGB (255, 255, 49),   _T("Yellow")    },
00165     { RGB (138, 207, 87),   _T("Light Green") },
00166     { RGB (0, 175, 84),   _T("Green")     },
00167     { RGB (0, 174, 238),    _T("Light Blue")  },
00168     { RGB (0, 111, 189),    _T("Blue")      },
00169     { RGB (0, 36, 95),    _T("Black")     },
00170     { RGB (114, 50, 157),   _T("Purple")    },
00171   };
00172
00173   m_lstMainColors.RemoveAll ();
00174   nNumColours = sizeof (colorsMain) / sizeof (ColorTableEntry);
00175
00176   for (i = 0; i < nNumColours; i++)
00177   {
00178     m_lstMainColors.AddTail (colorsMain [i].color);
00179     CMFCRibbonColorButton::SetColorName (colorsMain [i].color, colorsMain [i].szName);
00180   };
00181
00182   m_lstAdditionalColors.RemoveAll ();
00183   nNumColours = sizeof (colorsAdditional) / sizeof (ColorTableEntry);
00184
00185   for (i = 0; i < nNumColours; i++)
00186   {
00187     m_lstAdditionalColors.AddTail (colorsAdditional [i].color);
00188     CMFCRibbonColorButton::SetColorName (colorsAdditional [i].color, colorsAdditional [i].szName);
00189   };
00190
00191   m_lstStandardColors.RemoveAll ();
00192   nNumColours = sizeof (colorsStandard) / sizeof (ColorTableEntry);
00193
00194   for (i = 0; i < nNumColours; i++)
00195   {
00196     m_lstStandardColors.AddTail (colorsStandard [i].color);
00197     CMFCRibbonColorButton::SetColorName (colorsStandard [i].color, colorsStandard [i].szName);
00198   };
00199 }
00200
00201 CMainFrame::~CMainFrame()
00202 {
00203 }
00204
00205 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00206 {
00207   if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
00208     return -1;
00209
00210   OnAppLook (m_nAppLook);
00211
00212   if (!CreateRibbonBar ())
00213   {
00214     TRACE0("Failed to create ribbon bar\n");
00215     return -1;      // fail to create
00216   }
00217
00218 //  m_wndRibbonBar.SaveToXMLFile(_T("E:\\Users\\patbr\\Documents\\Visual Studio 10\\Samples\\C++\\MFC\\Visual C++ 2008 Feature Pack\\RibbonGadgets\\res\\RibbonGadgets.mfcribbon-ms"));
00219
00220   if (!m_wndStatusBar.Create(this))
00221   {
00222     TRACE0("Failed to create status bar\n");
00223     return -1;      // fail to create
00224   }
00225
00226   m_wndStatusBar.AddElement (new CMFCRibbonStatusBarPane (ID_STATUSBAR_PANE1, _T("Pane 1"), TRUE), _T("Pane 1"));
00227   m_wndStatusBar.AddExtendedElement (new CMFCRibbonStatusBarPane (ID_STATUSBAR_PANE2, _T("Pane 2"), TRUE), _T("Pane 2"));
00228
00229   if (!m_wndOutput.Create (_T("Source Code"), this, CRect (0, 0, 150, 150),
00230     TRUE /* Has gripper */, ID_VIEW_OUTPUT,
00231     WS_CHILD | WS_VISIBLE | CBRS_BOTTOM | CBRS_FLOAT_MULTI,
00232     AFX_CBRS_REGULAR_TABS, AFX_CBRS_RESIZE | AFX_CBRS_AUTOHIDE))
00233   {
00234     TRACE0("Failed to create output bar\n");
00235     return -1;      // fail to create
00236   }
00237
00238   EnableDocking(CBRS_ALIGN_ANY);
00239   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00240   DockPane(&m_wndOutput);
00241
00242   OnChangeRibbonCategory (0, 0);
00243   return 0;
00244 }
00245
00246 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00247 {
00248   if( !CFrameWndEx::PreCreateWindow(cs) )
00249     return FALSE;
00250
00251   cs.style &= ~FWS_ADDTOTITLE;
00252
00253   return TRUE;
00254 }
00255
00256 /////////////////////////////////////////////////////////////////////////////
00257 // CMainFrame diagnostics
00258
00259 #ifdef _DEBUG
00260 void CMainFrame::AssertValid() const
00261 {
00262   CFrameWndEx::AssertValid();
00263 }
00264
00265 void CMainFrame::Dump(CDumpContext& dc) const
00266 {
00267   CFrameWndEx::Dump(dc);
00268 }
00269
00270 #endif //_DEBUG
00271
00272 /////////////////////////////////////////////////////////////////////////////
00273 // CMainFrame message handlers
00274
00275
00276
00277 void CMainFrame::OnAppLook(UINT id)
00278 {
00279   CDockingManager::SetDockingMode (DT_SMART);
00280
00281   m_nAppLook = id;
00282
00283   CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;
00284
00285   switch (m_nAppLook)
00286   {
00287   case ID_VIEW_APPLOOK_2007:
00288   case ID_VIEW_APPLOOK_2007_1:
00289   case ID_VIEW_APPLOOK_2007_2:
00290   case ID_VIEW_APPLOOK_2007_3:
00291     // enable Office 2007 look:
00292
00293     switch (m_nAppLook)
00294     {
00295     case ID_VIEW_APPLOOK_2007:
00296       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00297       break;
00298
00299     case ID_VIEW_APPLOOK_2007_1:
00300       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00301       break;
00302
00303     case ID_VIEW_APPLOOK_2007_2:
00304       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00305       break;
00306
00307     case ID_VIEW_APPLOOK_2007_3:
00308       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00309       break;
00310     }
00311
00312     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00313     CDockingManager::SetDockingMode (DT_SMART);
00314     break;
00315
00316   default:
00317     ASSERT (FALSE);
00318   }
00319
00320   CDockingManager* pDockManager = GetDockingManager ();
00321   if (pDockManager != NULL)
00322   {
00323     ASSERT_VALID (pDockManager);
00324     pDockManager->AdjustPaneFrames ();
00325   }
00326
00327   CTabbedPane::ResetTabs ();
00328
00329   RecalcLayout ();
00330   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00331
00332   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00333 }
00334
00335 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00336 {
00337   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00338 }
00339
00340 BOOL CMainFrame::CreateRibbonBar ()
00341 {
00342   if (!m_wndRibbonBar.Create(this))
00343   {
00344     return FALSE;
00345   }
00346
00347   // Load panel images:
00348   m_PanelImages.SetImageSize (CSize (16, 16));
00349   m_PanelImages.Load (IDB_RIBBON_ICONS);
00350
00351   if (!m_wndRibbonBar.LoadFromResource(IDR_RIBBON))
00352   {
00353     // Add main panel:
00354     Add_MainPanel ();
00355
00356     Add_Category1 ();
00357     Add_Category2 ();
00358     Add_Category3 ();
00359     Add_Category4 ();
00360     Add_Category5 ();
00361     Add_Category6 ();
00362
00363     // Add quick access toolbar commands:
00364     Add_QAT ();
00365
00366     // Add "Style" button to the right of tabs:
00367     CMFCRibbonButton* pStyleButton = new CMFCRibbonButton ((UINT)-1, _T("Style\ns"), -1, -1);
00368     pStyleButton->SetMenu (IDR_THEME_MENU, TRUE /* Right align */);
00369     m_wndRibbonBar.AddToTabs (pStyleButton);
00370
00371     // Add "About" button to the right of tabs:
00372     m_wndRibbonBar.AddToTabs (new CMFCRibbonButton (ID_APP_ABOUT, _T("About\na"), m_PanelImages.ExtractIcon (0)));
00373   }
00374   else
00375   {
00376     // Attach related source code to the panels
00377     for (int nCategory = 0; nCategory < m_wndRibbonBar.GetCategoryCount(); nCategory++)
00378     {
00379       CMFCRibbonCategory* pCategory = m_wndRibbonBar.GetCategory(nCategory);
00380       CString strCategory = pCategory->GetName();
00381       if (strCategory == _T("Buttons"))
00382       {
00383         for (int nPanel = 0; nPanel < pCategory->GetPanelCount(); nPanel++)
00384         {
00385           CMFCRibbonPanel* pPanel = pCategory->GetPanel(nPanel);
00386           pPanel->SetData(ID_RIBBON_SOURCE_CODE_1_1 + nPanel);
00387         }
00388       }
00389       else if (strCategory == _T("Palette Buttons"))
00390       {
00391         for (int nPanel = 0; nPanel < pCategory->GetPanelCount(); nPanel++)
00392         {
00393           CMFCRibbonPanel* pPanel = pCategory->GetPanel(nPanel);
00394           pPanel->SetData(ID_RIBBON_SOURCE_CODE_2_1 + nPanel);
00395         }
00396       }
00397       else if (strCategory == _T("Color Buttons"))
00398       {
00399         for (int nPanel = 0; nPanel < pCategory->GetPanelCount(); nPanel++)
00400         {
00401           CMFCRibbonPanel* pPanel = pCategory->GetPanel(nPanel);
00402           pPanel->SetData(ID_RIBBON_SOURCE_CODE_3_1 + nPanel);
00403         }
00404       }
00405       else if (strCategory == _T("Groups"))
00406       {
00407         for (int nPanel = 0; nPanel < pCategory->GetPanelCount(); nPanel++)
00408         {
00409           CMFCRibbonPanel* pPanel = pCategory->GetPanel(nPanel);
00410           pPanel->SetData(ID_RIBBON_SOURCE_CODE_4_1 + nPanel);
00411         }
00412       }
00413       else if (strCategory == _T("Edit and Combo"))
00414       {
00415         for (int nPanel = 0; nPanel < pCategory->GetPanelCount(); nPanel++)
00416         {
00417           CMFCRibbonPanel* pPanel = pCategory->GetPanel(nPanel);
00418           pPanel->SetData(ID_RIBBON_SOURCE_CODE_5_1 + nPanel);
00419         }
00420       }
00421       else if (strCategory == _T("Other"))
00422       {
00423         for (int nPanel = 0; nPanel < pCategory->GetPanelCount(); nPanel++)
00424         {
00425           CMFCRibbonPanel* pPanel = pCategory->GetPanel(nPanel);
00426           pPanel->SetData(ID_RIBBON_SOURCE_CODE_6_1 + nPanel);
00427         }
00428       }
00429     }
00430   }
00431
00432   return TRUE;
00433 }
00434
00435 void CMainFrame::Add_MainPanel ()
00436 {
00437   m_MainButton.SetImage (IDB_RIBBON_MAIN);
00438   m_MainButton.SetToolTipText (_T("File"));
00439   m_MainButton.SetText (_T("\nf"));
00440
00441   m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));
00442
00443   CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory (_T("File"), IDB_RIBBON_FILE_SMALL, IDB_RIBBON_FILE_LARGE);
00444
00445   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_NEW, _T("&New"), 0, 0));
00446   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_OPEN, _T("&Open..."), 1, 1));
00447
00448   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE, _T("&Save"), 2, 2));
00449
00450   pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));
00451
00452   std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton (ID_FILE_PRINT, _T("&Print"), 4, 4));
00453
00454   apBtnPrint->AddSubItem (new CMFCRibbonLabel (_T("Preview and print the document")));
00455   apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT, _T("&Print"), 4, 4, TRUE));
00456   apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 6, 6, TRUE));
00457   apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 7, 7, TRUE));
00458
00459   apBtnPrint->SetKeys (_T("p"), _T("w"));
00460
00461   pMainPanel->Add (apBtnPrint.release());
00462
00463   pMainPanel->AddRecentFilesList (_T("Recent Documents"));
00464
00465   pMainPanel->AddToBottom (new CMFCRibbonMainPanelButton (ID_TOOLS_OPTIONS, _T("Opt&ions"), 8));
00466   pMainPanel->AddToBottom (new CMFCRibbonMainPanelButton (ID_APP_EXIT, _T("E&xit"), 9));
00467 }
00468
00469 void CMainFrame::Add_QAT ()
00470 {
00471   CMFCRibbonQuickAccessToolBarDefaultState qatState;
00472   qatState.AddCommand (ID_FILE_NEW);
00473   qatState.AddCommand (ID_FILE_OPEN, FALSE);
00474   qatState.AddCommand (ID_FILE_SAVE, FALSE);
00475   qatState.AddCommand (ID_FILE_SAVE_AS);
00476   qatState.AddCommand (ID_FILE_PRINT_DIRECT);
00477   qatState.AddCommand (ID_FILE_PRINT_PREVIEW, FALSE);
00478   m_wndRibbonBar.SetQuickAccessDefaultState (qatState);
00479 }
00480
00481 void CMainFrame::Add_Category1()
00482 {
00483   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Buttons"), IDB_RIBBON_CATEGORY1_SMALL, IDB_RIBBON_CATEGORY1_LARGE);
00484
00485   CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Large Buttons"));
00486
00487   std::auto_ptr<CMFCRibbonButton> apBtn1(new CMFCRibbonButton(ID_RIBBON_BTN_1, _T("Button"), 0, 0));
00488   apBtn1->SetAlwaysLargeImage();
00489   pPanel1->Add(apBtn1.release());
00490
00491   std::auto_ptr<CMFCRibbonButton> apBtn2(new CMFCRibbonButton(ID_RIBBON_BTN_2, _T("Menu Button"), 1, 1));
00492   apBtn2->SetMenu(IDR_RIBBON_MENU_1);
00493   apBtn2->SetAlwaysLargeImage();
00494   pPanel1->Add(apBtn2.release());
00495
00496   std::auto_ptr<CMFCRibbonButton> apBtn3(new CMFCRibbonButton(ID_RIBBON_BTN_3, _T("Split Button"), 2, 2));
00497   apBtn3->SetMenu(IDR_RIBBON_MENU_1, TRUE);
00498   apBtn3->SetAlwaysLargeImage();
00499   apBtn3->RemoveSubItem(0);
00500   apBtn3->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MBTN_1, _T("Item 1"), 2), 0);
00501   pPanel1->Add(apBtn3.release());
00502
00503   CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Small"));
00504
00505   std::auto_ptr<CMFCRibbonButton> apBtn4(new CMFCRibbonButton(ID_RIBBON_BTN_4, _T("Button"), 3));
00506   pPanel2->Add(apBtn4.release());
00507
00508   std::auto_ptr<CMFCRibbonButton> apBtn5(new CMFCRibbonButton(ID_RIBBON_BTN_5, _T("Menu Button"), 4));
00509   apBtn5->SetMenu(IDR_RIBBON_MENU_1);
00510   pPanel2->Add(apBtn5.release());
00511
00512   std::auto_ptr<CMFCRibbonButton> apBtn6(new CMFCRibbonButton(ID_RIBBON_BTN_6, _T("Split Button"), 5));
00513   apBtn6->SetMenu(IDR_RIBBON_MENU_1, TRUE);
00514   apBtn6->SetAlwaysLargeImage();
00515   apBtn6->RemoveSubItem(1);
00516   apBtn6->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MBTN_2, _T("Item 2"), 5), 1);
00517   pPanel2->Add(apBtn6.release());
00518
00519   CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Check Boxes"));
00520
00521   pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_7, _T("Check Box 1")));
00522   pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_8, _T("Check Box 2")));
00523   pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_9, _T("Check Box 3")));
00524
00525   pPanel1->SetData(ID_RIBBON_SOURCE_CODE_1_1);
00526   pPanel2->SetData(ID_RIBBON_SOURCE_CODE_1_2);
00527   pPanel3->SetData(ID_RIBBON_SOURCE_CODE_1_3);
00528 }
00529
00530 void CMainFrame::Add_Category2()
00531 {
00532   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Palette Buttons"), IDB_RIBBON_CATEGORY2_SMALL, IDB_RIBBON_CATEGORY2_LARGE);
00533
00534   CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Standard"));
00535
00536   pPanel1->Add(new CMFCRibbonGallery(ID_RIBBON_PBTN_1, _T("Embedded"), 0, 0, IDB_RIBBON_PALETTE_1, 64));
00537
00538   std::auto_ptr<CMFCRibbonGallery> apBtn2(new CMFCRibbonGallery(ID_RIBBON_PBTN_2, _T("Button"), 1, 1, IDB_RIBBON_PALETTE_1, 64));
00539   apBtn2->SetButtonMode();
00540   apBtn2->SetAlwaysLargeImage();
00541   pPanel1->Add(apBtn2.release());
00542
00543   CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Extended"));
00544
00545   std::auto_ptr<CMFCRibbonGallery> apBtn3(new CMFCRibbonGallery(ID_RIBBON_PBTN_3, _T("Resize Vertical"), 2, 2, IDB_RIBBON_PALETTE_1, 64));
00546   apBtn3->SetButtonMode();
00547   apBtn3->SetIconsInRow(2);
00548   apBtn3->EnableMenuResize(TRUE, TRUE);
00549   pPanel2->Add(apBtn3.release());
00550
00551   std::auto_ptr<CMFCRibbonGallery> apBtn4(new CMFCRibbonGallery(ID_RIBBON_PBTN_4, _T("Resize Both"), 3, 3, IDB_RIBBON_PALETTE_1, 64));
00552   apBtn4->SetButtonMode();
00553   apBtn4->SetIconsInRow(4);
00554   apBtn4->EnableMenuResize(TRUE);
00555   pPanel2->Add(apBtn4.release());
00556
00557   std::auto_ptr<CMFCRibbonGallery> apBtn5(new CMFCRibbonGallery(ID_RIBBON_PBTN_5, _T("Groups && Subitems"), 4, 4));
00558   apBtn5->AddGroup(_T("Group 1"), IDB_RIBBON_PALETTE_1, 64);
00559   apBtn5->AddGroup(_T("Group 2"), IDB_RIBBON_PALETTE_2, 64);
00560   apBtn5->SetButtonMode();
00561   apBtn5->SetIconsInRow(4);
00562   apBtn5->EnableMenuResize(TRUE);
00563   apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_1, _T("Item 1")));
00564   apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_2, _T("Item 2")));
00565   apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_3, _T("Item 3")));
00566   pPanel2->Add(apBtn5.release());
00567
00568   pPanel1->SetData(ID_RIBBON_SOURCE_CODE_2_1);
00569   pPanel2->SetData(ID_RIBBON_SOURCE_CODE_2_2);
00570 }
00571
00572 void CMainFrame::Add_Category3()
00573 {
00574   CreateDocumentColors();
00575
00576   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Color Buttons"), IDB_RIBBON_CATEGORY3_SMALL, IDB_RIBBON_CATEGORY3_LARGE);
00577
00578   CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Large"));
00579
00580   CMFCRibbonColorButton* pBtn1 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_1, _T("Simple"), TRUE, 0, 0);
00581   pBtn1->SetAlwaysLargeImage();
00582   pBtn1->SetDefaultCommand(FALSE);
00583   pPanel1->Add(pBtn1);
00584
00585   CMFCRibbonColorButton* pBtn2 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_2, _T("Simple with Options"), TRUE, 1, 1);
00586   pBtn2->SetAlwaysLargeImage();
00587   pBtn2->SetDefaultCommand(FALSE);
00588   pBtn2->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00589   pBtn2->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00590   pPanel1->Add(pBtn2);
00591
00592   CMFCRibbonColorButton* pBtn3 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_3, _T("Custom"), TRUE, 2, 2);
00593   pBtn3->SetAlwaysLargeImage();
00594   pBtn3->SetDefaultCommand(FALSE);
00595   pBtn3->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00596   pBtn3->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00597   pBtn3->SetColumns(10);
00598   pBtn3->SetColorBoxSize(CSize(17, 17));
00599   pBtn3->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00600   pBtn3->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
00601   pBtn3->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00602   pPanel1->Add(pBtn3);
00603
00604   CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Small"));
00605
00606   CMFCRibbonColorButton* pBtn4 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_4, _T("Simple"), TRUE, 3, -1);
00607   pBtn4->SetDefaultCommand(FALSE);
00608   pPanel2->Add(pBtn4);
00609
00610   CMFCRibbonColorButton* pBtn5 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_5, _T("Simple with Options"), TRUE, 4, -1);
00611   pBtn5->SetDefaultCommand(FALSE);
00612   pBtn5->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00613   pBtn5->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00614   pPanel2->Add(pBtn5);
00615
00616   CMFCRibbonColorButton* pBtn6 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_6, _T("Custom"), TRUE, 5, -1);
00617   pBtn6->SetDefaultCommand(FALSE);
00618   pBtn6->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00619   pBtn6->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00620   pBtn6->SetColumns(10);
00621   pBtn6->SetColorBoxSize(CSize(17, 17));
00622   pBtn6->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00623   pBtn6->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
00624   pBtn6->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00625   pPanel2->Add(pBtn6);
00626
00627   CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Small with Indicator"));
00628
00629   CMFCRibbonColorButton* pBtn7 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_7, _T("Simple"), 6);
00630   pBtn7->SetColor(RGB(255, 0, 0));
00631   pPanel3->Add(pBtn7);
00632
00633   CMFCRibbonColorButton* pBtn8 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_8, _T("Simple with Options"), 7);
00634   pBtn8->SetColor(RGB(0, 0, 255));
00635   pBtn8->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00636   pBtn8->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00637   pPanel3->Add(pBtn8);
00638
00639   CMFCRibbonColorButton* pBtn9 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_9, _T("Custom"), 8);
00640   pBtn9->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00641   pBtn9->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00642   pBtn9->SetColumns(10);
00643   pBtn9->SetColorBoxSize(CSize(17, 17));
00644   pBtn9->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00645   pBtn9->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
00646   pBtn9->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00647   pPanel3->Add(pBtn9);
00648
00649   CMFCRibbonPanel* pPanel4 = pCategory->AddPanel(_T("Embedded"));
00650
00651   CMFCRibbonColorButton* pBtn10 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_10, _T("Embedded"), TRUE, 1, 1);
00652   pBtn10->EnableOtherButton(_T("&More Colors..."), _T("More Shading Colors"));
00653   pBtn10->SetColor(RGB(240, 240, 240));
00654   pBtn10->SetColumns(10);
00655   pBtn10->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00656   pBtn10->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
00657   pBtn10->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00658   pBtn10->SetColorBoxSize(CSize(17, 17));
00659   pBtn10->SetButtonMode(FALSE);
00660   pBtn10->EnableAutomaticButton(_T("&No Color"), (COLORREF)-1, TRUE, NULL, FALSE /* Bottom */);
00661   pPanel4->Add(pBtn10);
00662
00663   pPanel1->SetData(ID_RIBBON_SOURCE_CODE_3_1);
00664   pPanel2->SetData(ID_RIBBON_SOURCE_CODE_3_2);
00665   pPanel3->SetData(ID_RIBBON_SOURCE_CODE_3_3);
00666   pPanel4->SetData(ID_RIBBON_SOURCE_CODE_3_4);
00667 }
00668
00669 void CMainFrame::Add_Category4()
00670 {
00671   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Groups"), IDB_RIBBON_CATEGORY4_SMALL, 0);
00672
00673   CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("From Toolbar"));
00674
00675   pPanel1->AddToolBar(IDR_TOOLBAR);
00676
00677   CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Manual"));
00678
00679   std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup1(new CMFCRibbonButtonsGroup);
00680
00681   apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_1, _T(""), 0));
00682   apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_2, _T(""), 1));
00683
00684   CMFCRibbonEdit* pEdit = new CMFCRibbonEdit(ID_RIBBON_GBTN_3, 65);
00685   pEdit->SetEditText(_T("Edit"));
00686   apButtonsGroup1->AddButton(pEdit);
00687
00688   apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_4, _T(""), 2));
00689   apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_5, _T(""), 3));
00690
00691   pPanel2->Add(apButtonsGroup1.release());
00692
00693   std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup2(new CMFCRibbonButtonsGroup);
00694   apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_6, _T(""), 4));
00695   apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_7, _T(""), 5));
00696   apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_8, _T(""), 6));
00697   apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_9, _T(""), 7));
00698
00699   pPanel2->Add(apButtonsGroup2.release());
00700
00701   std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup3(new CMFCRibbonButtonsGroup);
00702
00703   CMFCRibbonButton* pBtn10 = new CMFCRibbonButton(ID_RIBBON_GBTN_10, _T(""), 8);
00704   pBtn10->SetMenu(IDR_RIBBON_MENU_1);
00705   apButtonsGroup3->AddButton(pBtn10);
00706
00707   CMFCRibbonButton* pBtn11 = new CMFCRibbonButton(ID_RIBBON_GBTN_11, _T(""), 9);
00708   pBtn11->SetMenu(IDR_RIBBON_MENU_1, TRUE);
00709   apButtonsGroup3->AddButton(pBtn11);
00710
00711   pPanel2->Add(apButtonsGroup3.release());
00712
00713   pPanel1->SetData(ID_RIBBON_SOURCE_CODE_4_1);
00714   pPanel2->SetData(ID_RIBBON_SOURCE_CODE_4_2);
00715 }
00716
00717 void CMainFrame::Add_Category5()
00718 {
00719   int i = 0;
00720
00721   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Edit and Combo"), IDB_RIBBON_CATEGORY5_SMALL, 0);
00722
00723   CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Standard"));
00724
00725   CMFCRibbonEdit* pBtn1 = new CMFCRibbonEdit(ID_RIBBON_EBTN_1, 90);
00726   pBtn1->SetEditText(_T("Edit"));
00727   pPanel1->Add(pBtn1);
00728
00729   CMFCRibbonEdit* pBtn2 = new CMFCRibbonEdit(ID_RIBBON_EBTN_2, 90);
00730   pBtn2->EnableSpinButtons(0, 99);
00731   pBtn2->SetEditText(_T("0"));
00732   pPanel1->Add(pBtn2);
00733
00734   CMFCRibbonComboBox* pBtn3 = new CMFCRibbonComboBox(ID_RIBBON_EBTN_3, TRUE, 74);
00735   pBtn3->AddItem(_T("Combo Box"));
00736   for (i = 0; i < 20; i++)
00737   {
00738     CString str;
00739     str.Format(_T("Item %d"), i + 1);
00740     pBtn3->AddItem(str);
00741   }
00742   pBtn3->SelectItem(0);
00743   pPanel1->Add(pBtn3);
00744
00745   CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("With Icons and Labels"));
00746
00747   CMFCRibbonEdit* pBtn4 = new CMFCRibbonEdit(ID_RIBBON_EBTN_4, 90, _T("Label:"), 0);
00748   pBtn4->SetEditText(_T("Edit"));
00749   pPanel2->Add(pBtn4);
00750
00751   CMFCRibbonEdit* pBtn5 = new CMFCRibbonEdit(ID_RIBBON_EBTN_5, 90, _T("Label:"), 1);
00752   pBtn5->EnableSpinButtons(0, 99);
00753   pBtn5->SetEditText(_T("0"));
00754   pPanel2->Add(pBtn5);
00755
00756   CMFCRibbonComboBox* pBtn6 = new CMFCRibbonComboBox(ID_RIBBON_EBTN_6, TRUE, 74, _T("Label:"), 2);
00757   pBtn6->AddItem(_T("Combo Box"));
00758   for (i = 0; i < 20; i++)
00759   {
00760     CString str;
00761     str.Format(_T("Item %d"), i + 1);
00762     pBtn6->AddItem(str);
00763   }
00764   pBtn6->SelectItem(0);
00765   pPanel2->Add(pBtn6);
00766
00767   CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Font"));
00768
00769   CMFCRibbonFontComboBox::m_bDrawUsingFont = TRUE;
00770   CMFCRibbonFontComboBox* pBtn7 = new CMFCRibbonFontComboBox(ID_RIBBON_EBTN_7);
00771   pBtn7->SelectItem(_T("Arial"));
00772   pPanel3->Add(pBtn7);
00773
00774   pPanel1->SetData(ID_RIBBON_SOURCE_CODE_5_1);
00775   pPanel2->SetData(ID_RIBBON_SOURCE_CODE_5_2);
00776   pPanel3->SetData(ID_RIBBON_SOURCE_CODE_5_3);
00777 }
00778
00779 void CMainFrame::Add_Category6()
00780 {
00781   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Other"), IDB_RIBBON_CATEGORY6_SMALL, IDB_RIBBON_CATEGORY6_LARGE);
00782
00783   CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Undo"));
00784
00785   CMFCRibbonUndoButton* pBtn1 = new CMFCRibbonUndoButton(ID_RIBBON_OBTN_1, _T("Undo"), 0, 0);
00786   for (int i = 0; i < 20; i++)
00787   {
00788     CString str;
00789     str.Format(_T("Action %d"), i + 1);
00790     pBtn1->AddUndoAction(str);
00791   }
00792   pPanel1->Add(pBtn1);
00793
00794   CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Label"));
00795
00796   pPanel2->Add(new CMFCRibbonLabel(_T("Label 1")));
00797   pPanel2->Add(new CMFCRibbonLabel(_T("Label 2")));
00798   pPanel2->Add(new CMFCRibbonLabel(_T("Label 3")));
00799
00800   pPanel2->Add(new CMFCRibbonSeparator());
00801
00802   pPanel2->Add(new CMFCRibbonLabel(_T("This is a multi-line label"), TRUE));
00803
00804   CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Hyperlink"));
00805
00806   pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_2, _T("Send e-mail"), _T("mailto:info@microsoft.com")));
00807   pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_3, _T("Visit site"), _T("http://www.microsoft.com")));
00808   pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_4, _T("Launch Notepad"), _T("notepad")));
00809
00810   CMFCRibbonPanel* pPanel4 = pCategory->AddPanel(_T("Sliders"));
00811   pPanel4->SetCenterColumnVert();
00812
00813   pPanel4->Add(new CMFCRibbonLabel(_T("Simple Slider:")));
00814   pPanel4->Add(new CMFCRibbonSlider(ID_RIBBON_OBTN_5, 70 /* Slider width */));
00815
00816   pPanel4->Add(new CMFCRibbonSeparator());
00817
00818   pPanel4->Add(new CMFCRibbonLabel(_T("Slider with Buttons:")));
00819   CMFCRibbonSlider* pBtn6 = new CMFCRibbonSlider(ID_RIBBON_OBTN_6, 70 /* Slider width */);
00820   pBtn6->SetZoomButtons();
00821   pBtn6->SetRange(0, 100);
00822   pBtn6->SetPos(50);
00823   pPanel4->Add(pBtn6);
00824
00825   CMFCRibbonPanel* pPanel5 = pCategory->AddPanel(_T("Progress Bars"));
00826   pPanel5->SetCenterColumnVert();
00827
00828   pPanel5->Add(new CMFCRibbonLabel(_T("Simple Progress:")));
00829   pPanel5->Add(new CMFCRibbonProgressBar(ID_RIBBON_OBTN_7, 100 /* Bar width */));
00830   pPanel5->Add(new CMFCRibbonButton(ID_RIBBON_OBTN_8, _T("Show Progress 1")));
00831
00832   pPanel5->Add(new CMFCRibbonSeparator());
00833
00834   pPanel5->Add(new CMFCRibbonLabel(_T("Infinite Progress:")));
00835   CMFCRibbonProgressBar* pBtn9 = new CMFCRibbonProgressBar(ID_RIBBON_OBTN_9, 100 /* Bar width */);
00836   pBtn9->SetInfiniteMode();
00837   pPanel5->Add(pBtn9);
00838
00839   pPanel5->Add(new CMFCRibbonButton(ID_RIBBON_OBTN_10, _T("Show Progress 2")));
00840
00841   pPanel1->SetData(ID_RIBBON_SOURCE_CODE_6_1);
00842   pPanel2->SetData(ID_RIBBON_SOURCE_CODE_6_2);
00843   pPanel3->SetData(ID_RIBBON_SOURCE_CODE_6_3);
00844   pPanel4->SetData(ID_RIBBON_SOURCE_CODE_6_4);
00845   pPanel5->SetData(ID_RIBBON_SOURCE_CODE_6_5);
00846 }
00847
00848 LRESULT CMainFrame::OnRibbonCustomize (WPARAM /*wp*/, LPARAM /*lp*/)
00849 {
00850   ShowOptions (0);
00851   return 1;
00852 }
00853
00854 void CMainFrame::OnToolsOptions()
00855 {
00856   ShowOptions (0);
00857 }
00858
00859 void CMainFrame::ShowOptions (int nPage)
00860 {
00861   // Create "Customize" page:
00862   std::auto_ptr<CMFCRibbonCustomizePropertyPage> apPageCustomize(new CMFCRibbonCustomizePropertyPage(&m_wndRibbonBar));
00863
00864   // Add "popular" items:
00865   CList<UINT, UINT> lstPopular;
00866
00867   lstPopular.AddTail (ID_FILE_NEW);
00868   lstPopular.AddTail (ID_FILE_OPEN);
00869   lstPopular.AddTail (ID_FILE_SAVE);
00870   lstPopular.AddTail (ID_FILE_PRINT_PREVIEW);
00871   lstPopular.AddTail (ID_FILE_PRINT_DIRECT);
00872   lstPopular.AddTail (ID_EDIT_UNDO);
00873
00874   apPageCustomize->AddCustomCategory (_T("Popular Commands"), lstPopular);
00875
00876   // Add hidden commands:
00877   CList<UINT,UINT> lstHidden;
00878   m_wndRibbonBar.GetItemIDsList (lstHidden, TRUE);
00879
00880   apPageCustomize->AddCustomCategory (_T("Commands not in the Ribbon"), lstHidden);
00881
00882   // Add all commands:
00883   CList<UINT,UINT> lstAll;
00884   m_wndRibbonBar.GetItemIDsList (lstAll);
00885
00886   apPageCustomize->AddCustomCategory (_T("All Commands"), lstAll);
00887
00888   // Create property sheet:
00889   std::tr1::shared_ptr<CMFCPropertySheet> spPropSheet(new CMFCPropertySheet(_T("Options"), this, nPage));
00890   spPropSheet->m_psh.dwFlags |= PSH_NOAPPLYNOW;
00891
00892   spPropSheet->SetLook (CMFCPropertySheet::PropSheetLook_List, 124 /* List width */);
00893   spPropSheet->AddPage (apPageCustomize.release());
00894
00895   // TODO: add your option pages here:
00896   // COptionsPage1 pageOptions1;
00897   // spPropSheet->AddPage (&pageOptions1);
00898   //
00899   // COptionsPage1 pageOptions2;
00900   // spPropSheet->AddPage (&pageOptions2);
00901
00902   spPropSheet->DoModal();
00903 }
00904
00905 void CMainFrame::OnDummy(UINT /*id*/)
00906 {
00907 }
00908
00909 void CMainFrame::OnRibbonBtn7()
00910 {
00911   m_bCheckBox1 = !m_bCheckBox1;
00912 }
00913
00914 void CMainFrame::OnUpdateRibbonBtn7(CCmdUI* pCmdUI)
00915 {
00916   pCmdUI->SetCheck (m_bCheckBox1);
00917 }
00918
00919 void CMainFrame::OnRibbonBtn8()
00920 {
00921   m_bCheckBox2 = !m_bCheckBox2;
00922 }
00923
00924 void CMainFrame::OnUpdateRibbonBtn8(CCmdUI* pCmdUI)
00925 {
00926   pCmdUI->SetCheck (m_bCheckBox2);
00927 }
00928
00929 void CMainFrame::OnRibbonBtn9()
00930 {
00931   m_bCheckBox3 = !m_bCheckBox3;
00932 }
00933
00934 void CMainFrame::OnUpdateRibbonBtn9(CCmdUI* pCmdUI)
00935 {
00936   pCmdUI->SetCheck (m_bCheckBox3);
00937 }
00938
00939 void CMainFrame::OnLink (UINT nID)
00940 {
00941   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
00942   m_wndRibbonBar.GetElementsByID (nID, ar);
00943
00944   if (ar.GetSize () >= 1)
00945   {
00946     CMFCRibbonLinkCtrl* pLink = DYNAMIC_DOWNCAST (CMFCRibbonLinkCtrl, ar[0]);
00947     if (pLink != NULL)
00948     {
00949       if (!pLink->OpenLink ())
00950       {
00951         AfxMessageBox (_T("Link clicked."));
00952       }
00953     }
00954   }
00955 }
00956
00957 int CMainFrame::GetSliderPos (UINT nID)
00958 {
00959   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
00960   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar2;
00961   m_wndRibbonBar.GetElementsByID (ID_RIBBON_OBTN_5, ar);
00962   m_wndRibbonBar.GetElementsByID (ID_RIBBON_OBTN_6, ar2);
00963
00964   ar.Append (ar2);
00965
00966   int nPos1 = -1;
00967   int nPos2 = -1;
00968
00969   for (int k = 0; k < 2; k++)
00970   {
00971     for (int i = 0; i < ar.GetSize (); i++)
00972     {
00973       CMFCRibbonSlider* pSlider = DYNAMIC_DOWNCAST (CMFCRibbonSlider, ar[i]);
00974       if (pSlider != NULL)
00975       {
00976         if (k == 0)
00977         {
00978           if (pSlider->GetID () != nID)
00979           {
00980             nPos2 = pSlider->GetPos ();
00981             nPos1 = nPos2;
00982             break;
00983           }
00984         }
00985         else
00986         {
00987           if (pSlider->GetID () == nID)
00988           {
00989             if (pSlider->GetPos () != nPos2)
00990             {
00991               nPos1 = pSlider->GetPos ();
00992             }
00993           }
00994         }
00995       }
00996     }
00997   }
00998
00999   return nPos1;
01000 }
01001
01002 void CMainFrame::SetSliderPos (int nPos, UINT nID)
01003 {
01004   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
01005   m_wndRibbonBar.GetElementsByID (nID, ar);
01006
01007   for (int i = 0; i < ar.GetSize (); i++)
01008   {
01009     CMFCRibbonSlider* pSlider = DYNAMIC_DOWNCAST (CMFCRibbonSlider, ar[i]);
01010     if (pSlider != NULL)
01011     {
01012       if (pSlider->GetPos () != nPos)
01013       {
01014         pSlider->SetPos (nPos);
01015       }
01016     }
01017   }
01018 }
01019
01020 void CMainFrame::SetProgressPos (int nPos, UINT nID)
01021 {
01022   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> ar;
01023   m_wndRibbonBar.GetElementsByID (nID, ar);
01024
01025   for (int i = 0; i < ar.GetSize (); i++)
01026   {
01027     CMFCRibbonProgressBar* pProgress = DYNAMIC_DOWNCAST (CMFCRibbonProgressBar, ar[i]);
01028     if (pProgress != NULL)
01029     {
01030       if (pProgress->GetPos () != nPos)
01031       {
01032         pProgress->SetPos (nPos);
01033       }
01034     }
01035   }
01036 }
01037
01038 void CMainFrame::OnRibbonObtn2()
01039 {
01040   OnLink (ID_RIBBON_OBTN_2);
01041 }
01042
01043 void CMainFrame::OnRibbonObtn3()
01044 {
01045   OnLink (ID_RIBBON_OBTN_3);
01046 }
01047
01048 void CMainFrame::OnRibbonObtn4()
01049 {
01050   OnLink (ID_RIBBON_OBTN_4);
01051 }
01052
01053 void CMainFrame::OnRibbonObtn8()
01054 {
01055   m_nProgressValue1 = 0;
01056   SetTimer (IdShowProgress1Timer, 10, NULL);
01057 }
01058
01059 void CMainFrame::OnUpdateRibbonObtn8(CCmdUI* pCmdUI)
01060 {
01061   pCmdUI->Enable (m_nProgressValue1 == -1);
01062 }
01063
01064 void CMainFrame::OnRibbonObtn10()
01065 {
01066   m_nProgressValue2 = 0;
01067   SetTimer (IdShowProgress2Timer, 10, NULL);
01068 }
01069
01070 void CMainFrame::OnUpdateRibbonObtn10(CCmdUI* pCmdUI)
01071 {
01072   pCmdUI->Enable (m_nProgressValue2 == -1);
01073 }
01074
01075 void CMainFrame::OnTimer(UINT_PTR nIDEvent)
01076 {
01077   if (nIDEvent == IdShowProgress1Timer)
01078   {
01079     m_nProgressValue1++;
01080
01081     if (m_nProgressValue1 > 100)
01082     {
01083       m_nProgressValue1 = -1;
01084       KillTimer (nIDEvent);
01085       SetProgressPos (0, ID_RIBBON_OBTN_7);
01086     }
01087     else
01088     {
01089       SetProgressPos (m_nProgressValue1, ID_RIBBON_OBTN_7);
01090     }
01091
01092     CMFCPopupMenu::UpdateAllShadows ();
01093   }
01094   else if (nIDEvent == IdShowProgress2Timer)
01095   {
01096     m_nProgressValue2++;
01097
01098     if (m_nProgressValue2 > 100)
01099     {
01100       m_nProgressValue2 = -1;
01101       KillTimer (nIDEvent);
01102       SetProgressPos (0, ID_RIBBON_OBTN_9);
01103     }
01104     else
01105     {
01106       SetProgressPos (m_nProgressValue2, ID_RIBBON_OBTN_9);
01107     }
01108
01109     CMFCPopupMenu::UpdateAllShadows ();
01110   }
01111 }
01112
01113 LRESULT CMainFrame::OnChangeRibbonCategory(WPARAM,LPARAM)
01114 {
01115   if (!m_wndOutput.IsAutoHideMode ())
01116   {
01117     m_wndOutput.SetRedraw (FALSE);
01118   }
01119
01120   m_wndOutput.ClearTabs ();
01121
01122   CMFCRibbonCategory* pCategory = m_wndRibbonBar.GetActiveCategory ();
01123   if (pCategory != NULL)
01124   {
01125     ASSERT_VALID (pCategory);
01126
01127     for (int i = 0; i < pCategory->GetPanelCount (); i++)
01128     {
01129       CMFCRibbonPanel* pPanel = pCategory->GetPanel (i);
01130       ASSERT_VALID (pPanel);
01131
01132       m_wndOutput.AddTab (pPanel->GetName (), (UINT)pPanel->GetData ());
01133     }
01134   }
01135
01136   if (!m_wndOutput.IsAutoHideMode ())
01137   {
01138     m_wndOutput.SetRedraw ();
01139     m_wndOutput.RedrawWindow (NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
01140   }
01141
01142   return 0;
01143 }
01144
01145 void CMainFrame::OnFilePrint ()
01146 {
01147   if (IsPrintPreview ())
01148   {
01149     PostMessage (WM_COMMAND, AFX_ID_PREVIEW_PRINT);
01150   }
01151 }
01152
01153 void CMainFrame::OnFilePrintPreview()
01154 {
01155   if (IsPrintPreview ())
01156   {
01157     PostMessage (WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
01158   }
01159 }
01160
01161 void CMainFrame::OnUpdateFilePrintPreview(CCmdUI* pCmdUI)
01162 {
01163   pCmdUI->SetCheck (IsPrintPreview ());
01164 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/MainFrm.h Source File

  • general
  • spiro

MainFrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_MAINFRM_H__4417CF8A_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
00015 #define AFX_MAINFRM_H__4417CF8A_AFA9_11D1_AB61_D9B80632F018__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 class CMainFrame : public CFrameWnd
00022 {
00023 protected: // create from serialization only
00024   CMainFrame();
00025   DECLARE_DYNCREATE(CMainFrame)
00026
00027 // Attributes
00028 public:
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CMainFrame)
00036   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 public:
00041   virtual ~CMainFrame();
00042 #ifdef _DEBUG
00043   virtual void AssertValid() const;
00044   virtual void Dump(CDumpContext& dc) const;
00045 #endif
00046
00047 public:  // control bar embedded members
00048   CStatusBar  m_wndStatusBar;
00049   CToolBar    m_wndToolBar;
00050   CToolBar  m_wndToolBarSpiro;
00051
00052 // Generated message map functions
00053 protected:
00054   //{{AFX_MSG(CMainFrame)
00055   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00056   //}}AFX_MSG
00057   DECLARE_MESSAGE_MAP()
00058 };
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061
00062 //{{AFX_INSERT_LOCATION}}
00063 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00064
00065 #endif // !defined(AFX_MAINFRM_H__4417CF8A_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVariantAssoc Member List

This is the complete list of members for CVariantAssoc, including all inherited members.
CVariantAssoc() | CVariantAssoc |
GetKey() | CVariantAssoc | [protected]
GetKey() | CVariantAssoc |
GetValue() | CVariantAssoc | [protected]
GetValue() | CVariantAssoc |
m_varKey | CVariantAssoc |
m_varValue | CVariantAssoc |
OnFinalRelease() | CVariantAssoc | [virtual]
SetKey(const VARIANT &) | CVariantAssoc |
SetValue(const VARIANT &) | CVariantAssoc |
~CVariantAssoc() | CVariantAssoc | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page6.cpp Source File

  • vc2008fp
  • NewControls

Page6.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "NewControls.h"
00012 #include "Page6.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 #define SHCNF_ACCEPT_INTERRUPTS 0x0001
00021 #define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
00022
00023 UINT UWM_CHANGE_SYSTEM_ICON = ::RegisterWindowMessage(_T("UWM_CHANGE_SYSTEM_ICON"));
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CPage6 property page
00027
00028 IMPLEMENT_DYNCREATE(CPage6, CMFCPropertyPage)
00029
00030 CPage6::CPage6() : CMFCPropertyPage(CPage6::IDD)
00031 {
00032   m_strSelectedFolder = _T("c:\\");
00033   m_ulChangeIconNotifyID = 0;
00034 }
00035
00036 CPage6::~CPage6()
00037 {
00038 }
00039
00040 void CPage6::DoDataExchange(CDataExchange* pDX)
00041 {
00042   CMFCPropertyPage::DoDataExchange(pDX);
00043   DDX_Control(pDX, IDC_LIST1, m_wndShellList);
00044   DDX_Control(pDX, IDC_TREE1, m_wbdShellTree);
00045   DDX_Text(pDX, IDC_SELECTED_FOLDER, m_strSelectedFolder);
00046 }
00047
00048 BEGIN_MESSAGE_MAP(CPage6, CMFCPropertyPage)
00049   ON_WM_DESTROY()
00050   ON_BN_CLICKED(IDC_SELECT_FOLDER, OnSelectFolder)
00051   ON_REGISTERED_MESSAGE(UWM_CHANGE_SYSTEM_ICON, OnChangeSystemIcon)
00052 END_MESSAGE_MAP()
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // CPage6 message handlers
00056
00057 void CPage6::OnSelectFolder()
00058 {
00059   if (theApp.GetShellManager()->BrowseForFolder(m_strSelectedFolder, this, m_strSelectedFolder))
00060   {
00061     UpdateData(FALSE);
00062   }
00063 }
00064
00065 BOOL CPage6::OnInitDialog()
00066 {
00067   CMFCPropertyPage::OnInitDialog();
00068
00069   m_wbdShellTree.Expand(m_wbdShellTree.GetRootItem(), TVE_EXPAND);
00070   m_wbdShellTree.SetRelatedList(&m_wndShellList);
00071
00072   LPITEMIDLIST ppidl;
00073   if (SHGetSpecialFolderLocation(GetSafeHwnd(),CSIDL_BITBUCKET, &ppidl) != NOERROR)
00074   {
00075     return 0;
00076   }
00077
00078   SHChangeNotifyEntry scnIDL;
00079   scnIDL.pidl = ppidl;
00080   scnIDL.fRecursive = TRUE;
00081
00082   m_ulChangeIconNotifyID = SHChangeNotifyRegister(m_hWnd, SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS, SHCNE_ALLEVENTS,  UWM_CHANGE_SYSTEM_ICON, 1, &scnIDL);
00083
00084   return TRUE;  // return TRUE unless you set the focus to a control
00085 }
00086
00087 LRESULT CPage6::OnChangeSystemIcon(WPARAM wParam, LPARAM lParam)
00088 {
00089   UNREFERENCED_PARAMETER(wParam);
00090   if ((lParam == SHCNE_CREATE) || (lParam == SHCNE_DELETE))
00091   {
00092     if (m_wndShellList.IsDesktop())
00093     {
00094       int nSortColumn = m_wndShellList.GetHeaderCtrl().GetSortColumn();
00095       int nSortState = m_wndShellList.GetHeaderCtrl().GetColumnState(nSortColumn);
00096       m_wndShellList.Refresh();
00097       m_wbdShellTree.Refresh();
00098       m_wndShellList.Sort(nSortColumn, nSortState == 1 ? TRUE : FALSE);
00099     }
00100   }
00101   return TRUE;
00102 }
00103
00104 void CPage6::OnDestroy()
00105 {
00106   if (m_ulChangeIconNotifyID != 0)
00107   {
00108     SHChangeNotifyDeregister(m_ulChangeIconNotifyID);
00109   }
00110   CMFCPropertyPage::OnDestroy();
00111 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutlookMultiViewsApp Member List

This is the complete list of members for COutlookMultiViewsApp, including all inherited members.
COutlookMultiViewsApp() | COutlookMultiViewsApp |
ExitInstance() | COutlookMultiViewsApp | [virtual]
InitInstance() | COutlookMultiViewsApp | [virtual]
OnAppAbout() | COutlookMultiViewsApp |
PreLoadState() | COutlookMultiViewsApp | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/AddressCombo.cpp Source File

  • internet
  • HTMLEdit

AddressCombo.cpp

Go to the documentation of this file.
00001 // AddressCombo.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014 #include "AddressCombo.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CAddressCombo
00024
00025 CAddressCombo::CAddressCombo()
00026 {
00027 }
00028
00029 CAddressCombo::~CAddressCombo()
00030 {
00031 }
00032
00033
00034 BEGIN_MESSAGE_MAP(CAddressCombo, CComboBox)
00035   //{{AFX_MSG_MAP(CAddressCombo)
00036   ON_WM_CREATE()
00037   //}}AFX_MSG_MAP
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CAddressCombo message handlers
00042 #define BUFF_LEN 512
00043 void CAddressCombo::FillWithExplorerHistory()
00044 {
00045   HKEY hkUserURL;
00046   DWORD dwIndex = 0, dwType;
00047   TCHAR buffName[BUFF_LEN];
00048   BYTE buffData[BUFF_LEN];
00049   DWORD dwNameSize,dwDataSize;
00050   DWORD dwErr = ERROR_SUCCESS;
00051   if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Microsoft\\Internet Explorer\\TypedURLs"),0,KEY_QUERY_VALUE,&hkUserURL))
00052   {
00053     //enumerate this key's values
00054     while(ERROR_SUCCESS == dwErr)
00055     {
00056       dwNameSize = BUFF_LEN;
00057       dwDataSize = BUFF_LEN;
00058       dwErr = RegEnumValue(hkUserURL,dwIndex++,buffName,&dwNameSize,NULL,
00059                 &dwType,buffData,&dwDataSize);
00060       if(dwErr == ERROR_SUCCESS)
00061       {
00062         AddString((TCHAR*)buffData);
00063       }
00064     }
00065     RegCloseKey(hkUserURL);
00066   }
00067   else
00068     TRACE(_T("Couldn't open registry key\n"));
00069
00070 }
00071 int CAddressCombo::OnCreate(LPCREATESTRUCT lpCreateStruct)
00072 {
00073   if (CComboBox::OnCreate(lpCreateStruct) == -1)
00074     return -1;
00075     //try for courier, if that fails, go for the ANSI fixed font
00076   if(!m_font.CreateFont(-MulDiv(10, GetDeviceCaps(GetDC()->m_hDC, LOGPIXELSY), 72)
00077       ,0,0,0,FW_DONTCARE,0,0,0,ANSI_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS
00078       ,DEFAULT_QUALITY,DEFAULT_PITCH,_T("TAHOMA")))
00079   {
00080     m_font.CreateStockObject(ANSI_FIXED_FONT);
00081   }
00082   SetFont(&m_font);
00083   FillWithExplorerHistory();
00084
00085   return 0;
00086 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mdi.cpp Source File

  • general
  • mdidocvw

mdi.cpp

Go to the documentation of this file.
00001 // MDI.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "MDI.h"
00015
00016 #include "MainFrm.h"
00017 #include "HelloFrm.h"
00018 #include "HelloDoc.h"
00019 #include "HelloVw.h"
00020
00021 //Added for Bounce document
00022 #include "BncFrm.h"
00023 #include "BncDoc.h"
00024 #include "BncVw.h"
00025
00026 #ifdef _DEBUG
00027 #define new DEBUG_NEW
00028 #undef THIS_FILE
00029 static char THIS_FILE[] = __FILE__;
00030 #endif
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CMDIApp
00034
00035 BEGIN_MESSAGE_MAP(CMDIApp, CWinApp)
00036   //{{AFX_MSG_MAP(CMDIApp)
00037   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00038   ON_COMMAND(ID_FILE_NEWHELLO, OnNewHello)
00039   ON_COMMAND(ID_FILE_NEWBOUNCE, OnNewBounce)
00040   //}}AFX_MSG_MAP
00041   // Standard file based document commands
00042   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00043   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00044 END_MESSAGE_MAP()
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMDIApp construction
00048
00049 CMDIApp::CMDIApp()
00050 {
00051 }
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // The one and only CMDIApp object
00055
00056 CMDIApp theApp;
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CMDIApp initialization
00060
00061 BOOL CMDIApp::InitInstance()
00062 {
00063   // Register the application's document templates.  Document templates
00064   // serve as the connection between documents, frame windows and views.
00065
00066   CMultiDocTemplate* pDocTemplate;
00067   pDocTemplate = new CMultiDocTemplate(
00068     IDR_HELLOTYPE,
00069     RUNTIME_CLASS(CHelloDoc),
00070     RUNTIME_CLASS(CHelloFrame), // custom MDI child frame
00071     RUNTIME_CLASS(CHelloView));
00072   AddDocTemplate(pDocTemplate);
00073
00074 // Add Bounce template to list
00075
00076   CMultiDocTemplate* pBounceTemplate;
00077   pBounceTemplate = new CMultiDocTemplate(
00078     IDR_BOUNCETYPE,
00079     RUNTIME_CLASS(CBounceDoc),
00080     RUNTIME_CLASS(CBounceFrame), // custom MDI child frame
00081     RUNTIME_CLASS(CBounceView));
00082   AddDocTemplate(pBounceTemplate);
00083
00084   // create main MDI Frame window
00085   CMainFrame* pMainFrame = new CMainFrame;
00086   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00087     return FALSE;
00088   m_pMainWnd = pMainFrame;
00089
00090   // The main window has been initialized, so show and update it.
00091   pMainFrame->ShowWindow(m_nCmdShow);
00092   pMainFrame->UpdateWindow();
00093
00094   return TRUE;
00095 }
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CAboutDlg dialog used for App About
00099
00100 class CAboutDlg : public CDialog
00101 {
00102 public:
00103   CAboutDlg();
00104
00105 // Dialog Data
00106   //{{AFX_DATA(CAboutDlg)
00107   enum { IDD = IDD_ABOUTBOX };
00108   //}}AFX_DATA
00109
00110   // ClassWizard generated virtual function overrides
00111   //{{AFX_VIRTUAL(CAboutDlg)
00112   protected:
00113   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00114   //}}AFX_VIRTUAL
00115
00116 // Implementation
00117 protected:
00118   //{{AFX_MSG(CAboutDlg)
00119     // No message handlers
00120   //}}AFX_MSG
00121   DECLARE_MESSAGE_MAP()
00122 };
00123
00124 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00125 {
00126   //{{AFX_DATA_INIT(CAboutDlg)
00127   //}}AFX_DATA_INIT
00128 }
00129
00130 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00131 {
00132   CDialog::DoDataExchange(pDX);
00133   //{{AFX_DATA_MAP(CAboutDlg)
00134   //}}AFX_DATA_MAP
00135 }
00136
00137 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00138   //{{AFX_MSG_MAP(CAboutDlg)
00139     // No message handlers
00140   //}}AFX_MSG_MAP
00141 END_MESSAGE_MAP()
00142
00143 // App command to run the dialog
00144 void CMDIApp::OnAppAbout()
00145 {
00146   CAboutDlg aboutDlg;
00147   aboutDlg.DoModal();
00148 }
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // other globals
00152
00153 // Color array maps colors to top-level Color menu
00154
00155 COLORREF NEAR colorArray[] =
00156 {
00157   RGB (0, 0, 0),
00158   RGB (255, 0, 0),
00159   RGB (0, 255, 0),
00160   RGB (0, 0, 255),
00161   RGB (255, 255, 255)
00162 };
00163 /////////////////////////////////////////////////////////////////////////////
00164 // CMDIApp commands
00165
00166 // The following two command handlers provides an
00167 // alternative way to open documents by hiding the fact
00168 // that the application has multiple templates. The
00169 // default method uses a dialog with a listing of
00170 // possible types to choose from.
00171
00172 void CMDIApp::OnNewHello()
00173 {
00174
00175 // Searches template list for a document type
00176 // containing the "Hello" string
00177
00178   POSITION curTemplatePos = GetFirstDocTemplatePosition();
00179
00180   while(curTemplatePos != NULL)
00181   {
00182     CDocTemplate* curTemplate =
00183       GetNextDocTemplate(curTemplatePos);
00184     CString str;
00185     curTemplate->GetDocString(str, CDocTemplate::docName);
00186     if(str == _T("Hello"))
00187     {
00188       curTemplate->OpenDocumentFile(NULL);
00189       return;
00190     }
00191   }
00192   AfxMessageBox(IDS_NOHELLOTEMPLATE);
00193 }
00194
00195 void CMDIApp::OnNewBounce()
00196 {
00197 // Searches template list for a document type
00198 // containing the "Bounce" string
00199
00200   POSITION curTemplatePos = GetFirstDocTemplatePosition();
00201
00202   while(curTemplatePos != NULL)
00203   {
00204     CDocTemplate* curTemplate =
00205       GetNextDocTemplate(curTemplatePos);
00206     CString str;
00207     curTemplate->GetDocString(str, CDocTemplate::docName);
00208     if(str == _T("Bounce"))
00209     {
00210       curTemplate->OpenDocumentFile(NULL);
00211       return;
00212     }
00213   }
00214   AfxMessageBox(IDS_NOBOUNCETEMPLATE);
00215 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHandleSize Member List

This is the complete list of members for CHandleSize, including all inherited members.
CHandleSize(CWnd *pParent=NULL) | CHandleSize |
DoDataExchange(CDataExchange *pDX) | CHandleSize | [protected, virtual]
IDD enum value | CHandleSize |
m_nHandleSize | CHandleSize |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CComboRulerItem Member List

This is the complete list of members for CComboRulerItem, including all inherited members.
CComboRulerItem(UINT nBitmapID1, UINT nBitmapID2, CRulerItem &item) | CComboRulerItem |
CComboRulerItem(UINT nBitmapID1, UINT nBitmapID2, CRulerItem &item) | CComboRulerItem |
CRulerItem(UINT nBitmapID=0) | CRulerItem |
CRulerItem(UINT nBitmapID=0) | CRulerItem |
Draw(CDC &dc) | CComboRulerItem | [virtual]
Draw(CDC &dc) | CComboRulerItem | [virtual]
DrawFocusLine() | CRulerItem |
DrawFocusLine() | CRulerItem |
GetHitRectPix() | CRulerItem |
GetHitRectPix() | CRulerItem |
GetHorzPosPix() | CRulerItem | [inline]
GetHorzPosPix() | CRulerItem |
GetHorzPosTwips() | CRulerItem | [inline]
GetHorzPosTwips() | CRulerItem | [inline]
GetMax() | CComboRulerItem |
GetMax() | CComboRulerItem |
GetMin() | CComboRulerItem |
GetMin() | CComboRulerItem |
GetVertPosPix() | CRulerItem | [inline]
GetVertPosPix() | CRulerItem | [inline]
HitTestPix(CPoint pt) | CComboRulerItem | [virtual]
HitTestPix(CPoint pt) | CComboRulerItem | [virtual]
Invalidate() | CRulerItem |
Invalidate() | CRulerItem |
LoadMaskedBitmap(LPCTSTR lpszResourceName) | CRulerItem |
LoadMaskedBitmap(LPCTSTR lpszResourceName) | CRulerItem |
m_bHitPrimary | CComboRulerItem | [protected]
m_bTrack | CRulerItem | [protected]
m_hbm | CRulerItem |
m_hbmMask | CRulerItem |
m_link | CComboRulerItem | [protected]
m_nAlignment | CRulerItem | [protected]
m_nMax | CRulerItem | [protected]
m_nMin | CRulerItem | [protected]
m_nXPosTwips | CRulerItem | [protected]
m_nYPosPix | CRulerItem | [protected]
m_pDC | CRulerItem | [protected]
m_pRuler | CRulerItem | [protected]
m_rcTrack | CRulerItem | [protected]
m_secondary | CComboRulerItem | [protected]
m_size | CRulerItem |
SetAlignment(int nAlign) | CComboRulerItem | [virtual]
SetAlignment(int nAlign) | CComboRulerItem | [virtual]
SetBounds(int nMin, int nMax) | CComboRulerItem | [virtual]
SetBounds(int nMin, int nMax) | CComboRulerItem | [virtual]
SetHorzPosTwips(int nXPos) | CComboRulerItem | [virtual]
SetHorzPosTwips(int nXPos) | CComboRulerItem | [virtual]
SetRuler(CRulerBar *pRuler) | CComboRulerItem | [virtual]
SetRuler(CRulerBar *pRuler) | CComboRulerItem | [virtual]
SetTrack(BOOL b) | CRulerItem |
SetTrack(BOOL b) | CRulerItem |
SetVertPos(int nYPos) | CComboRulerItem | [virtual]
SetVertPos(int nYPos) | CComboRulerItem | [virtual]
TrackHorzPosTwips(int nXPos, BOOL bOnRuler=TRUE) | CComboRulerItem | [virtual]
TrackHorzPosTwips(int nXPos, BOOL bOnRuler=TRUE) | CComboRulerItem | [virtual]
~CRulerItem() | CRulerItem |
~CRulerItem() | CRulerItem |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutputList1 Member List

This is the complete list of members for COutputList1, including all inherited members.
COutputList1() | COutputList1 |
OnContextMenu(CWnd *pWnd, CPoint point) | COutputList1 | [protected]
OnEditClear() | COutputList1 | [protected]
OnEditCopy() | COutputList1 | [protected]
OnOutputGotoError() | COutputList1 | [protected]
OnViewOutput() | COutputList1 | [protected]
OnWindowPosChanging(WINDOWPOS FAR *lpwndpos) | COutputList1 | [protected]
~COutputList1() | COutputList1 | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/GetURL.cpp Source File

  • internet
  • HTMLEdit

GetURL.cpp

Go to the documentation of this file.
00001 // GetURL.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014 #include "GetURL.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CGetURL dialog
00024
00025
00026 CGetURL::CGetURL(CWnd* pParent /*=NULL*/)
00027   : CDialog(CGetURL::IDD, pParent)
00028 {
00029   //{{AFX_DATA_INIT(CGetURL)
00030   m_URL = _T("");
00031   //}}AFX_DATA_INIT
00032 }
00033
00034
00035 void CGetURL::DoDataExchange(CDataExchange* pDX)
00036 {
00037   CDialog::DoDataExchange(pDX);
00038   //{{AFX_DATA_MAP(CGetURL)
00039
00040   //}}AFX_DATA_MAP
00041   if(::IsWindow(m_AddrCombo.m_hWnd))
00042     DDX_Text(pDX, IDC_ADDRCOMBO, m_URL);
00043 }
00044
00045
00046 BEGIN_MESSAGE_MAP(CGetURL, CDialog)
00047   //{{AFX_MSG_MAP(CGetURL)
00048   //}}AFX_MSG_MAP
00049   ON_CONTROL(CBN_CLOSEUP,IDC_ADDRCOMBO,OnCloseup)
00050   ON_CONTROL(BN_CLICKED,IDC_BTNGO,OnGo)
00051   ON_CONTROL(BN_CLICKED,IDC_BTN_SEARCH, OnSearch)
00052 END_MESSAGE_MAP()
00053
00054 BEGIN_EVENTSINK_MAP(CGetURL, CDialog)
00055   ON_EVENT(CGetURL, IDC_EXPLORER, 0x00000103, OnDocumentComplete, VTS_DISPATCH VTS_VARIANT)
00056 END_EVENTSINK_MAP()
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CGetURL message handlers
00059 void CGetURL::OnDocumentComplete(LPDISPATCH /*pDisp*/, LPVARIANT pURL)
00060 {
00061   CString szURL(COLE2T(pURL->pvarVal->bstrVal));
00062   if(::IsWindow(m_AddrCombo.m_hWnd))
00063   {
00064     m_AddrCombo.SetWindowText(szURL);
00065     m_szCurAddr = szURL;
00066   }
00067
00068 }
00069 void CGetURL::OnOK()
00070 {
00071   UpdateData();
00072   CDialog::OnOK();
00073 }
00074 void CGetURL::OnSearch()
00075 {
00076   if(m_spBrowser)
00077     m_spBrowser->Navigate(L"http://www.yahoo.com",NULL,NULL,NULL,NULL);
00078 }
00079 BOOL CGetURL::OnInitDialog()
00080 {
00081   CDialog::OnInitDialog();
00082   IUnknown *pUnk;
00083
00084   CWnd *pWnd = GetDlgItem(IDC_EXPLORER);
00085   pUnk = NULL;
00086   if(pWnd)
00087     m_spBrowser = pWnd->GetControlUnknown();
00088
00089   pWnd = NULL;
00090   CRect rcItem;
00091   pWnd = GetDlgItem(IDC_PHSTATIC);
00092   if(pWnd)
00093   {
00094     pWnd->GetClientRect(rcItem);
00095     pWnd->ClientToScreen(rcItem);
00096     pWnd->DestroyWindow();
00097     ScreenToClient(rcItem);
00098     rcItem.bottom += 150;
00099     if(m_AddrCombo.Create(WS_VSCROLL|WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_AUTOHSCROLL,rcItem,this,IDC_ADDRCOMBO))
00100     {
00101       m_AddrCombo.SetCurSel(0);
00102       m_AddrCombo.GetWindowText(m_szCurAddr);
00103       if(m_spBrowser && m_szCurAddr.GetLength())
00104         m_spBrowser->Navigate(m_szCurAddr.AllocSysString(),NULL,NULL,NULL,NULL);
00105     }
00106   }
00107   return TRUE;
00108 }
00109
00110 void CGetURL::OnCloseup()
00111 {
00112   int nSel = m_AddrCombo.GetCurSel();
00113   if(CB_ERR != nSel)
00114   {
00115     m_AddrCombo.GetLBText(nSel,m_szCurAddr);
00116     if(m_spBrowser)
00117       m_spBrowser->Navigate(m_szCurAddr.AllocSysString(),NULL,NULL,NULL,NULL);
00118
00119   }
00120 }
00121
00122 void CGetURL::OnGo()
00123 {
00124   m_AddrCombo.GetWindowText(m_szCurAddr);
00125   if(m_spBrowser)
00126     m_spBrowser->Navigate(m_szCurAddr.AllocSysString(),NULL,NULL,NULL,NULL);
00127
00128 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ScrMngr.H Source File

  • ole
  • TstCon

ScrMngr.H

Go to the documentation of this file.
00001 // File: ScrMngr.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CTestContainer98Doc;
00011 class CScriptManager;
00012
00013 class CScriptManager :
00014    public CObject
00015 {
00016    DECLARE_DYNAMIC( CScriptManager );
00017
00018 public:
00019    CScriptManager( CTestContainer98Doc* pDoc );
00020    ~CScriptManager();
00021
00022    HRESULT AddNamedItem( LPCTSTR pszItemName, IDispatch* pDispatch );
00023    HRESULT AddNamedItems( IActiveScript* pScript );
00024    CScript* FindMacro( LPCTSTR pszMacroName );
00025    POSITION GetFirstScriptPosition() const;
00026    HRESULT GetItemDispatch( LPCTSTR pszItemName, IUnknown** ppDispatch );
00027    HRESULT GetItemTypeInfo( LPCTSTR pszItemName, ITypeInfo** ppTypeInfo );
00028    CScript* GetNextScript( POSITION& posScript );
00029    int GetNumScripts() const;
00030    HRESULT LoadScript( LPCTSTR pszFileName, LPCTSTR pszScriptName,
00031     CScript** ppScript = NULL );
00032
00033 protected:
00034    CTestContainer98Doc* m_pDoc;
00035    CTypedPtrList< CObList, CScript* > m_lpScripts;
00036    CTypedPtrMap< CMapStringToPtr, CString, IDispatch* > m_mapNamedItems;
00037 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MSNVisualManager.cpp Source File

  • vc2008fp
  • DesktopAlertDemo

MSNVisualManager.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DesktopAlertDemo.h"
00013 #include "MSNVisualManager.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char THIS_FILE[]=__FILE__;
00018 #define new DEBUG_NEW
00019 #endif
00020
00021 IMPLEMENT_DYNCREATE(CMSNVisualManager, CMFCVisualManagerWindows)
00022
00023 const COLORREF clrFillDark  = RGB (220, 228, 247);
00024 const COLORREF clrFillLight = RGB (255, 255, 255);
00025
00026 //////////////////////////////////////////////////////////////////////
00027 // Construction/Destruction
00028 //////////////////////////////////////////////////////////////////////
00029
00030 CMSNVisualManager::CMSNVisualManager()
00031 {
00032 }
00033 //**********************************************************************************
00034 CMSNVisualManager::~CMSNVisualManager()
00035 {
00036 }
00037 //**********************************************************************************
00038 void CMSNVisualManager::OnFillPopupWindowBackground (CDC* pDC, CRect rect)
00039 {
00040   if (afxGlobalData.IsHighContrastMode () || afxGlobalData.m_nBitsPerPixel <= 8)
00041   {
00042     CMFCVisualManagerWindows::OnFillPopupWindowBackground (pDC, rect);
00043     return;
00044   }
00045
00046   ASSERT_VALID (pDC);
00047
00048   CDrawingManager dm (*pDC);
00049
00050   int nStep = 0;
00051   int nPartHeight = 30;
00052
00053   for (int y = rect.top; y < rect.bottom; y += nPartHeight)
00054   {
00055     CRect rectFill = rect;
00056
00057     rectFill.top = y;
00058     rectFill.bottom = y + nPartHeight;
00059
00060     if ((nStep % 2) != 0)
00061     {
00062       dm.FillGradient (rectFill, clrFillDark, clrFillLight, TRUE);
00063     }
00064     else
00065     {
00066       dm.FillGradient (rectFill, clrFillLight, clrFillDark, TRUE);
00067     }
00068
00069     nStep++;
00070   }
00071
00072   rect.DeflateRect (1, 1);
00073   pDC->Draw3dRect (rect, RGB (116, 141, 181), RGB (185, 200, 241));
00074 }
00075 //**********************************************************************************
00076 void CMSNVisualManager::OnDrawPopupWindowBorder (CDC* pDC, CRect rect)
00077 {
00078   if (afxGlobalData.IsHighContrastMode () || afxGlobalData.m_nBitsPerPixel <= 8)
00079   {
00080     CMFCVisualManagerWindows::OnDrawPopupWindowBorder (pDC, rect);
00081     return;
00082   }
00083
00084   ASSERT_VALID (pDC);
00085
00086   pDC->Draw3dRect (rect, RGB (166, 180, 207), RGB (68, 87, 145));
00087   rect.DeflateRect (1, 1);
00088   pDC->Draw3dRect (rect, RGB (255, 255, 255), RGB (209, 221, 245));
00089 }
00090 //**********************************************************************************
00091 COLORREF CMSNVisualManager::OnDrawPopupWindowCaption (CDC* pDC, CRect rectCaption, CMFCDesktopAlertWnd* pPopupWnd)
00092 {
00093   if (afxGlobalData.IsHighContrastMode () || afxGlobalData.m_nBitsPerPixel <= 8)
00094   {
00095     return CMFCVisualManagerWindows::OnDrawPopupWindowCaption (pDC, rectCaption, pPopupWnd);
00096   }
00097
00098   ASSERT_VALID (pDC);
00099
00100   CDrawingManager dm (*pDC);
00101
00102   CRect rectFill = rectCaption;
00103   rectFill.bottom = rectFill.CenterPoint ().y;
00104
00105   dm.FillGradient (rectFill, clrFillLight, clrFillDark, TRUE);
00106
00107   rectFill = rectCaption;
00108   rectFill.top = rectFill.CenterPoint ().y;
00109
00110   dm.FillGradient (rectFill, clrFillDark, clrFillLight, TRUE);
00111
00112   return RGB (37, 50, 118);
00113 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MyMenuBar.h Source File

  • vc2008fp
  • DynamicMenu

MyMenuBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMyMenuBar : public CMFCMenuBar
00014 {
00015 public:
00016   CMyMenuBar();
00017   virtual ~CMyMenuBar();
00018
00019   void AddSubMenu ();
00020
00021 protected:
00022   virtual BOOL RestoreOriginalstate ();
00023 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkspaceBar.cpp Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkspaceBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "WorkSpaceToolBar.h"
00013 #include "WorkspaceBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CWorkspaceBar
00023
00024 BEGIN_MESSAGE_MAP(CWorkspaceBar, CDockablePane)
00025   ON_WM_CREATE()
00026   ON_WM_SIZE()
00027   ON_COMMAND(ID_COMMAND_1, OnCommand1)
00028   ON_COMMAND(ID_COMMAND_2, OnCommand2)
00029   ON_COMMAND(ID_COMMAND_3, OnCommand3)
00030   ON_UPDATE_COMMAND_UI(ID_COMMAND_3, OnUpdateCommand3)
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CWorkspaceBar construction/destruction
00035
00036 CWorkspaceBar::CWorkspaceBar()
00037 {
00038   // TODO: add one-time construction code here
00039
00040 }
00041
00042 CWorkspaceBar::~CWorkspaceBar()
00043 {
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CWorkspaceBar message handlers
00048
00049 int CWorkspaceBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00050 {
00051   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00052     return -1;
00053
00054   // Create toolbar:
00055   if (!m_wndToolBar.Create (this, AFX_DEFAULT_TOOLBAR_STYLE, AFX_IDW_TOOLBAR + 1) ||
00056     !m_wndToolBar.LoadToolBar(IDR_WORKSPACE_TOOLBAR, 0, 0, TRUE /* Is locked */))
00057   {
00058     TRACE0("Failed to create toolbar\n");
00059     return -1; // fail to create
00060   }
00061
00062   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
00063     CBRS_TOOLTIPS | CBRS_FLYBY);
00064
00065   m_wndToolBar.SetPaneStyle (
00066     m_wndToolBar.GetPaneStyle () &
00067       ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00068
00069   m_wndToolBar.SetOwner (this);
00070
00071   // All commands will be routed via this control , not via the parent frame:
00072   m_wndToolBar.SetRouteCommandsViaFrame (FALSE);
00073
00074
00075   CRect rectDummy;
00076   rectDummy.SetRectEmpty ();
00077
00078   // Create tabs window:
00079   if (!m_wndTabs.Create (CMFCTabCtrl::STYLE_3D, rectDummy, this, 1))
00080   {
00081     TRACE0("Failed to create workspace tab window\n");
00082     return -1;      // fail to create
00083   }
00084
00085   m_wndTabs.SetImageList (IDB_WORKSPACE, 16, RGB (255, 0, 255));
00086
00087   // Create tree windows.
00088   // TODO: create your own tab windows here:
00089   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
00090                 TVS_LINESATROOT | TVS_HASBUTTONS;
00091
00092   if (!m_wndTree1.Create (dwViewStyle, rectDummy, &m_wndTabs, 2) ||
00093     !m_wndTree2.Create (dwViewStyle, rectDummy, &m_wndTabs, 3))
00094   {
00095     TRACE0("Failed to create workspace view\n");
00096     return -1;      // fail to create
00097   }
00098
00099   // Setup trees content:
00100   HTREEITEM hRoot1 = m_wndTree1.InsertItem (_T("Root 1"));
00101   m_wndTree1.InsertItem (_T("Item 1"), hRoot1);
00102   m_wndTree1.InsertItem (_T("Item 2"), hRoot1);
00103
00104   HTREEITEM hRoot2 = m_wndTree2.InsertItem (_T("Root 2"));
00105   m_wndTree2.InsertItem (_T("Item 1"), hRoot2);
00106   m_wndTree2.InsertItem (_T("Item 2"), hRoot2);
00107
00108   // Attach tree windows to tab:
00109   m_wndTabs.AddTab (&m_wndTree1, _T("First View"), 0 /* Image number */);
00110   m_wndTabs.AddTab (&m_wndTree2, _T("Second View"), 1 /* Image number */);
00111
00112   return 0;
00113 }
00114
00115 void CWorkspaceBar::OnSize(UINT nType, int cx, int cy)
00116 {
00117   CDockablePane::OnSize(nType, cx, cy);
00118   AdjustLayout ();
00119 }
00120
00121 void CWorkspaceBar::OnCommand1()
00122 {
00123   MessageBox (_T("One!"));
00124 }
00125
00126 void CWorkspaceBar::OnCommand2()
00127 {
00128   MessageBox (_T("Two!"));
00129 }
00130
00131 static BOOL bIsThree = TRUE;
00132
00133 void CWorkspaceBar::OnCommand3()
00134 {
00135   MessageBox (_T("Three!"));
00136   bIsThree = !bIsThree;
00137 }
00138
00139 void CWorkspaceBar::OnUpdateCommand3(CCmdUI* pCmdUI)
00140 {
00141   pCmdUI->SetCheck (bIsThree);
00142 }
00143
00144 void CWorkspaceBar::AdjustLayout ()
00145 {
00146   CRect rectClient;
00147   GetClientRect (rectClient);
00148
00149   int cyTlb = m_wndToolBar.CalcFixedLayout (FALSE, TRUE).cy;
00150
00151   m_wndToolBar.SetWindowPos (NULL, 0, 0,
00152                 rectClient.Width (), cyTlb,
00153                 SWP_NOACTIVATE | SWP_NOZORDER);
00154   m_wndTabs.SetWindowPos (NULL, 0, cyTlb, rectClient.Width (), rectClient.Height () - cyTlb,
00155               SWP_NOACTIVATE | SWP_NOZORDER);
00156 }
00157
00158 void CWorkspaceToolBar::AdjustLayout ()
00159 {
00160   CMFCToolBar::AdjustLayout ();
00161
00162   ((CWorkspaceBar*) GetParent ())->AdjustLayout ();
00163 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/AppLookDlg.h Source File

  • vc2008fp
  • VisualStudioDemo

AppLookDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CAppLookDlg dialog
00014
00015 class CAppLookDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CAppLookDlg(BOOL bStartup, CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   enum { IDD = IDD_APP_LOOK };
00023   CComboBox m_wndStyle;
00024   CButton m_wndRoundedTabs;
00025   CButton m_wndDockTabColors;
00026   CButton m_wndOneNoteTabs;
00027   CButton m_wndOK;
00028   CButton m_wndCancel;
00029   BOOL m_bShowAtStartup;
00030   BOOL m_bOneNoteTabs;
00031   BOOL m_bDockTabColors;
00032   BOOL m_bRoundedTabs;
00033   BOOL m_bCustomTooltips;
00034   int m_nAppLook;
00035   int m_nStyle;
00036   BOOL m_bActiveTabCloseButton;
00037
00038 // Overrides
00039 protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041
00042 // Implementation
00043 protected:
00044   virtual BOOL OnInitDialog();
00045   virtual void OnOK();
00046   afx_msg void OnApply();
00047   afx_msg void OnAppLook();
00048
00049   DECLARE_MESSAGE_MAP()
00050
00051   const BOOL m_bStartup;
00052
00053   void SetLook();
00054 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawcli.h Source File

  • ole
  • drawcli

drawcli.h

Go to the documentation of this file.
00001 // drawcli.h : main header file for the DRAWCLI application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017 #include <afxtempl.h>       // drawcli uses collection class templates
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDrawApp:
00021 // See drawcli.cpp for the implementation of this class
00022 //
00023
00024 class CDrawApp : public CWinApp
00025 {
00026 public:
00027   CDrawApp();
00028
00029 // Overrides
00030   virtual BOOL InitInstance();
00031
00032 // Implementation
00033 protected:
00034   //{{AFX_MSG(CDrawApp)
00035   afx_msg void OnAppAbout();
00036     // NOTE - the ClassWizard will add and remove member functions here.
00037     //    DO NOT EDIT what you see in these blocks of generated code !
00038   //}}AFX_MSG
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypeLibViewer Member List

This is the complete list of members for CTypeLibViewer, including all inherited members.
CInterfaceViewer() | CInterfaceViewer |
CTypeLibViewer() | CTypeLibViewer |
OnFinalRelease() | CTypeLibViewer | [virtual]
OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CTypeLibViewer | [virtual]
View(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CInterfaceViewer |
~CInterfaceViewer() | CInterfaceViewer | [virtual]
~CTypeLibViewer() | CTypeLibViewer | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/dwarryvw.cpp Source File

  • advanced
  • collect

dwarryvw.cpp

Go to the documentation of this file.
00001 // dwarryvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "dwarryvw.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDWordArrayView
00024
00025 IMPLEMENT_DYNCREATE(CDWordArrayView, CFormView)
00026
00027 CDWordArrayView::CDWordArrayView()
00028   : CFormView(CDWordArrayView::IDD)
00029 {
00030   //{{AFX_DATA_INIT(CDWordArrayView)
00031   m_dw = 0;
00032   //}}AFX_DATA_INIT
00033 }
00034
00035 CDWordArrayView::~CDWordArrayView()
00036 {
00037 }
00038
00039 void CDWordArrayView::OnInitialUpdate()
00040 {
00041   CFormView::OnInitialUpdate();
00042
00043   // Copy all of the DWORDs from the document's CDWordArray
00044   // to the listbox.
00045   m_ctlList.ResetContent();
00046   CDWordArray& dwArray = GetDocument()->m_dwArray;
00047   for (int nIndex = 0; nIndex < dwArray.GetSize(); nIndex++)
00048   {
00049     DWORD dw = dwArray[nIndex];
00050     CString str;
00051     str.Format(_T("%d"),dw);
00052     int nSel = 0;
00053     nSel = m_ctlList.AddString(str);
00054   }
00055 }
00056
00057 void CDWordArrayView::DoDataExchange(CDataExchange* pDX)
00058 {
00059   CFormView::DoDataExchange(pDX);
00060   //{{AFX_DATA_MAP(CDWordArrayView)
00061   DDX_Control(pDX, IDC_LIST, m_ctlList);
00062   DDX_Text(pDX, IDC_DWORD, m_dw);
00063   //}}AFX_DATA_MAP
00064 }
00065
00066
00067 BEGIN_MESSAGE_MAP(CDWordArrayView, CFormView)
00068   //{{AFX_MSG_MAP(CDWordArrayView)
00069   ON_BN_CLICKED(IDC_ADD, OnAdd)
00070   ON_BN_CLICKED(IDC_UPDATE, OnUpdateButton)
00071   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00072   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00073   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00074   //}}AFX_MSG_MAP
00075 END_MESSAGE_MAP()
00076
00077
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CDWordArrayView diagnostics
00081
00082 #ifdef _DEBUG
00083 void CDWordArrayView::AssertValid() const
00084 {
00085   CFormView::AssertValid();
00086 }
00087
00088 void CDWordArrayView::Dump(CDumpContext& dc) const
00089 {
00090   CFormView::Dump(dc);
00091 }
00092
00093 CCollectDoc* CDWordArrayView::GetDocument() // non-debug version is inline
00094 {
00095   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00096 }
00097 #endif //_DEBUG
00098
00099
00100 /////////////////////////////////////////////////////////////////////////////
00101 // CDWordArrayView message handlers
00102
00103 void CDWordArrayView::OnAdd()
00104 {
00105   if (UpdateData() != TRUE)
00106     return;
00107
00108   // Add new DWORD to the CDWordArray
00109   int nIndex = (int)GetDocument()->m_dwArray.Add(m_dw);
00110
00111   // Add new DWORD to the listbox.
00112   CString str;
00113   str.Format(_T("%d"),m_dw);
00114   int nSel = m_ctlList.AddString(str);
00115
00116   // The index of the new DWORD in the array should be the
00117   // same as the index of the new DWORD in the listbox.
00118   ASSERT(nIndex == nSel);
00119 }
00120
00121 void CDWordArrayView::OnUpdateButton()
00122 {
00123   if (UpdateData() != TRUE)
00124     return;
00125
00126   int nSel = m_ctlList.GetCurSel();
00127   if (nSel == LB_ERR)
00128   {
00129     AfxMessageBox(IDS_SELECT_DWORD_TO_UPDATE);
00130     return;
00131   }
00132
00133   // Replace the DWORD in the CDWordArray.
00134   GetDocument()->m_dwArray[nSel] = m_dw;
00135
00136   // Update the old DWORD in the listbox by removing
00137   // the old entry and adding a new entry.
00138   m_ctlList.DeleteString(nSel);
00139   CString str;
00140   str.Format(_T("%d"),m_dw);
00141   m_ctlList.InsertString(nSel, str);
00142 }
00143
00144 void CDWordArrayView::OnRemove()
00145 {
00146   if (UpdateData() != TRUE)
00147     return;
00148
00149   int nSel = m_ctlList.GetCurSel();
00150   if (nSel == LB_ERR)
00151   {
00152     AfxMessageBox(IDS_SELECT_DWORD_TO_REMOVE);
00153     return;
00154   }
00155
00156   // Remove the DWORD from the CDWordArray.
00157   GetDocument()->m_dwArray.RemoveAt(nSel);
00158
00159   // Remove the DWORD from the listbox.
00160   m_ctlList.DeleteString(nSel);
00161 }
00162
00163 void CDWordArrayView::OnRemoveAll()
00164 {
00165   // Remove all of the DWORDs from the CDWordArray.
00166   GetDocument()->m_dwArray.RemoveAll();
00167
00168   // Remove all of the DWORDs from the listbox.
00169   m_ctlList.ResetContent();
00170 }
00171
00172 void CDWordArrayView::OnSelChangeList()
00173 {
00174   // Update the edit control to reflect the new selection
00175   // in the listbox.
00176   m_dw = GetDocument()->m_dwArray[m_ctlList.GetCurSel()];
00177   UpdateData(FALSE);
00178 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Log.H Source File

  • ole
  • TstCon

Log.H

Go to the documentation of this file.
00001 // File: Log.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CTestContainer98Item;
00011
00012 class CLog :
00013    public CObject
00014 {
00015    DECLARE_DYNAMIC( CLog );
00016
00017 public:
00018    CLog();
00019    ~CLog();
00020
00021    CLog& operator<<( COleVariant& var );
00022    CLog& operator<<( int n );
00023    virtual CLog& operator<<( LPCTSTR pszString ) = NULL;
00024 };
00025
00026 class CNullLog :
00027    public CLog
00028 {
00029    DECLARE_DYNAMIC( CNullLog );
00030
00031 public:
00032    CNullLog();
00033    ~CNullLog();
00034
00035    CLog& operator<<( LPCTSTR pszString );
00036 };
00037
00038 class CDebugLog : public CLog
00039 {
00040    DECLARE_DYNAMIC( CDebugLog );
00041
00042 public:
00043    CDebugLog();
00044    ~CDebugLog();
00045
00046    CLog& operator<<( LPCTSTR pszString );
00047
00048 protected:
00049    BOOL m_tStartOfLine;
00050 };
00051
00052 class CFileLog :
00053    public CLog
00054 {
00055    DECLARE_DYNAMIC( CFileLog );
00056
00057 public:
00058    CFileLog();
00059    ~CFileLog();
00060
00061    CLog& operator<<( LPCTSTR pszString );
00062
00063 public:
00064    BOOL Create( LPCTSTR pszFileName );
00065    CString GetFileName() const;
00066
00067 protected:
00068    CStdioFile m_file;
00069 };
00070
00071 class COutputWindowLog : public CLog
00072 {
00073    DECLARE_DYNAMIC( COutputWindowLog );
00074
00075 public:
00076    COutputWindowLog( CEdit* pEditBox );
00077    ~COutputWindowLog();
00078
00079    CLog& operator<<( LPCTSTR pszString );
00080
00081 protected:
00082    CEdit* m_pEditBox;
00083 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRectThread Member List

This is the complete list of members for CRectThread, including all inherited members.
CGDIThread(CWnd *pWnd, HDC hDC) | CGDIThread |
CRectThread(CWnd *pWnd, HDC hDC, CPoint ptPos, CPoint ptVel, CSize Size, COLORREF color) | CRectThread |
Delete() | CGDIThread | [virtual]
InitInstance() | CRectThread | [virtual]
KillThread() | CGDIThread |
m_brush | CRectThread |
m_csGDILock | CGDIThread | [static]
m_dc | CGDIThread |
m_hAnotherDead | CGDIThread | [static]
m_hBrush | CRectThread |
m_hDC | CGDIThread |
m_hEventDead | CGDIThread |
m_hEventKill | CGDIThread |
m_ptVelocity | CRectThread |
m_rectBorder | CGDIThread |
m_rectPosition | CRectThread |
SingleStep() | CRectThread | [virtual]
UpdateBorder() | CGDIThread |
~CGDIThread() | CGDIThread | [virtual]
~CRectThread() | CRectThread | [inline, protected, virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/stdafx.cpp Source File

  • controls
  • time

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomToolTipCtrl Member List

This is the complete list of members for CCustomToolTipCtrl, including all inherited members.
CCustomToolTipCtrl() | CCustomToolTipCtrl |
GetIconSize() | CCustomToolTipCtrl | [inline, virtual]
m_nCurrID | CCustomToolTipCtrl |
OnDrawIcon(CDC *pDC, CRect rectImage) | CCustomToolTipCtrl | [virtual]
OnShow(NMHDR *pNMHDR, LRESULT *pResult) | CCustomToolTipCtrl | [protected]
~CCustomToolTipCtrl() | CCustomToolTipCtrl | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailFrame.h Source File

  • vc2008fp
  • OutlookDemo

MailFrame.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "MailBar.h"
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CMailFrame frame
00016
00017 class CMailFrame : public CFrameWndEx
00018 {
00019   DECLARE_DYNCREATE(CMailFrame)
00020
00021 public:
00022   CMailFrame();
00023   virtual ~CMailFrame();
00024
00025 // Attributes
00026 protected:  // control bar embedded members
00027   CMFCMenuBar m_wndMenuBar;
00028   CMFCToolBar m_wndToolBar;
00029   CMailBar m_wndMailBar;
00030   CMFCStatusBar m_wndStatusBar;
00031   CWnd* m_pMainWnd;
00032
00033   static CObList m_lstMailFrames;
00034
00035 // Operations
00036 public:
00037   static void OnChangeLook();
00038
00039 // Overrides
00040 public:
00041   virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
00042
00043 // Implementation
00044 protected:
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
00047   afx_msg void OnViewCustomize();
00048   afx_msg void OnClose();
00049   afx_msg void OnMailClose();
00050   afx_msg void OnEnable( BOOL bEnable );
00051   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00052
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMDialog.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMDialog.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // MSMDialog.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMDialog.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMSMDialog dialog
00024
00025
00026 IMPLEMENT_DYNAMIC(CMSMDialog, CDialogEx)
00027
00028 CMSMDialog::CMSMDialog()
00029   : CDialogEx ()
00030 {
00031   CommonConstruct ();
00032 }
00033
00034 CMSMDialog::CMSMDialog(UINT nIDTemplate, CWnd* pParentWnd /*=NULL*/)
00035   : CDialogEx (nIDTemplate, pParentWnd)
00036 {
00037   CommonConstruct ();
00038 }
00039
00040 CMSMDialog::CMSMDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd /*=NULL*/)
00041   : CDialogEx (lpszTemplateName, pParentWnd)
00042 {
00043   CommonConstruct ();
00044 }
00045
00046 void CMSMDialog::CommonConstruct ()
00047 {
00048   SetBackgroundColor (RGB (239, 247, 253));
00049 }
00050
00051
00052 BEGIN_MESSAGE_MAP(CMSMDialog, CDialogEx)
00053 END_MESSAGE_MAP()
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CMSMDialog message handlers
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/propset.h Source File

  • vc2008fp
  • DrawClient

propset.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 typedef struct tagSECTIONHEADER
00013 {
00014   DWORD       cbSection ;
00015   DWORD       cProperties ;  // Number of props.
00016 } SECTIONHEADER, *LPSECTIONHEADER ;
00017
00018 typedef struct tagPROPERTYIDOFFSET
00019 {
00020   DWORD       propertyID;
00021   DWORD       dwOffset;
00022 } PROPERTYIDOFFSET, *LPPROPERTYIDOFFSET;
00023
00024 typedef struct tagPROPHEADER
00025 {
00026   WORD        wByteOrder ;    // Always 0xFFFE
00027   WORD        wFormat ;       // Always 0
00028   DWORD       dwOSVer ;       // System version
00029   CLSID       clsID ;         // Application CLSID
00030   DWORD       cSections ;     // Number of sections(must be at least 1)
00031 } PROPHEADER, *LPPROPHEADER ;
00032
00033 typedef struct tagFORMATIDOFFSET
00034 {
00035   GUID        formatID;
00036   DWORD       dwOffset;
00037 } FORMATIDOFFSET, *LPFORMATIDOFFSET;
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CProperty
00041
00042 class CProperty : public CObject
00043 {
00044   friend class CPropertySet ;
00045   friend class CPropertySection ;
00046
00047 public:
00048 // Construction
00049   CProperty( void ) ;
00050   CProperty( DWORD dwID, const LPVOID pValue, DWORD dwType ) ;
00051
00052 // Attributes
00053   BOOL    Set( DWORD dwID, const LPVOID pValue, DWORD dwType ) ;
00054   BOOL    Set( const LPVOID pValue, DWORD dwType ) ;
00055   BOOL    Set( const LPVOID pValue ) ;
00056   LPVOID  Get( DWORD* pcb ) ;     // Returns pointer to actual value
00057   LPVOID  Get( void ) ;           // Returns pointer to actual value
00058   DWORD   GetType( void ) ;       // Returns property type
00059   void    SetType( DWORD dwType ) ;
00060   DWORD   GetID( void ) ;
00061   void    SetID( DWORD dwPropID ) ;
00062
00063   LPVOID  GetRawValue( void ) ;   // Returns pointer internal value(may
00064   // include size information)
00065
00066 // Operations
00067   BOOL    WriteToStream( IStream* pIStream ) ;
00068   BOOL    ReadFromStream( IStream* pIStream ) ;
00069
00070 private:
00071   DWORD       m_dwPropID ;
00072   DWORD       m_dwType ;
00073   LPVOID      m_pValue ;
00074
00075   LPVOID  AllocValue(ULONG cb);
00076   void    FreeValue();
00077
00078 public:
00079   ~CProperty() ;
00080 } ;
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CPropertySection
00084
00085 class CPropertySection : public CObject
00086 {
00087   friend class CPropertySet ;
00088   friend class CProperty ;
00089
00090 public:
00091 // Construction
00092   CPropertySection( void ) ;
00093   CPropertySection( CLSID FormatID ) ;
00094
00095 // Attributes
00096   CLSID   GetFormatID( void ) ;
00097   void    SetFormatID( CLSID FormatID ) ;
00098
00099   BOOL    Set( DWORD dwPropID, LPVOID pValue, DWORD dwType ) ;
00100   BOOL    Set( DWORD dwPropID, LPVOID pValue ) ;
00101   LPVOID  Get( DWORD dwPropID, DWORD* pcb ) ;
00102   LPVOID  Get( DWORD dwPropID ) ;
00103   void    Remove( DWORD dwPropID ) ;
00104   void    RemoveAll() ;
00105
00106   CProperty* GetProperty( DWORD dwPropID ) ;
00107   void AddProperty( CProperty* pProp ) ;
00108
00109   DWORD   GetSize( void ) ;
00110   DWORD   GetCount( void ) ;
00111   CObList* GetList( void ) ;
00112
00113   BOOL    GetID( LPCTSTR pszName, DWORD* pdwPropID ) ;
00114   BOOL    SetName( DWORD dwPropID, LPCTSTR pszName ) ;
00115
00116   BOOL    SetSectionName( LPCTSTR pszName );
00117   LPCTSTR GetSectionName( void );
00118
00119 // Operations
00120   BOOL    WriteToStream( IStream* pIStream ) ;
00121   BOOL    ReadFromStream( IStream* pIStream, LARGE_INTEGER liPropSet ) ;
00122   BOOL    WriteNameDictToStream( IStream* pIStream ) ;
00123   BOOL    ReadNameDictFromStream( IStream* pIStream ) ;
00124
00125 private:
00126 // Implementation
00127   CLSID           m_FormatID ;
00128   SECTIONHEADER   m_SH ;
00129   // List of properties(CProperty)
00130   CObList         m_PropList ;
00131   // Dictionary of property names
00132   CMapStringToPtr m_NameDict ;
00133   CString         m_strSectionName;
00134
00135 public:
00136   ~CPropertySection();
00137 } ;
00138
00139 /////////////////////////////////////////////////////////////////////////////
00140 // CPropertySet
00141
00142 class CPropertySet : public CObject
00143 {
00144   friend class CPropertySection ;
00145   friend class CProperty ;
00146
00147 public:
00148 // Construction
00149   CPropertySet( void ) ;
00150   CPropertySet( CLSID clsID )  ;
00151
00152 // Attributes
00153   BOOL    Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType ) ;
00154   BOOL    Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue ) ;
00155   LPVOID  Get( CLSID FormatID, DWORD dwPropID, DWORD* pcb ) ;
00156   LPVOID  Get( CLSID FormatID, DWORD dwPropID ) ;
00157   void    Remove( CLSID FormatID, DWORD dwPropID ) ;
00158   void    Remove( CLSID FormatID ) ;
00159   void    RemoveAll( ) ;
00160
00161   CProperty* GetProperty( CLSID FormatID, DWORD dwPropID ) ;
00162   void AddProperty( CLSID FormatID, CProperty* pProp ) ;
00163   CPropertySection* GetSection( CLSID FormatID ) ;
00164   CPropertySection* AddSection( CLSID FormatID ) ;
00165   void AddSection( CPropertySection* psect ) ;
00166
00167   WORD    GetByteOrder( void ) ;
00168   WORD    GetFormatVersion( void ) ;
00169   void    SetFormatVersion( WORD wFmtVersion ) ;
00170   DWORD   GetOSVersion( void ) ;
00171   void    SetOSVersion( DWORD dwOSVer ) ;
00172   CLSID   GetClassID( void ) ;
00173   void    SetClassID( CLSID clsid ) ;
00174   DWORD   GetCount( void ) ;
00175   CObList* GetList( void ) ;
00176
00177 // Operations
00178   BOOL    WriteToStream( IStream* pIStream ) ;
00179   BOOL    ReadFromStream( IStream* pIStream ) ;
00180
00181 // Implementation
00182 private:
00183   PROPHEADER      m_PH ;
00184   CObList         m_SectionList ;
00185
00186 public:
00187   ~CPropertySet();
00188 } ;
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circ.cpp Source File

  • controls
  • circ

circ.cpp

Go to the documentation of this file.
00001 // circ.cpp : Implementation of CCircApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "circ.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020
00021 CCircApp NEAR theApp;
00022
00023 const GUID CDECL BASED_CODE _tlid =
00024     { 0x9dbafcd2, 0x592f, 0x101b, { 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b } };
00025 const WORD _wVerMajor = 1;
00026 const WORD _wVerMinor = 0;
00027
00028
00029 ////////////////////////////////////////////////////////////////////////////
00030 // CCircApp::InitInstance - DLL initialization
00031
00032 BOOL CCircApp::InitInstance()
00033 {
00034   BOOL bInit = COleControlModule::InitInstance();
00035
00036   if (bInit)
00037   {
00038     // TODO: Add your own module initialization code here.
00039   }
00040
00041   return bInit;
00042 }
00043
00044
00045 ////////////////////////////////////////////////////////////////////////////
00046 // CCircApp::ExitInstance - DLL termination
00047
00048 int CCircApp::ExitInstance()
00049 {
00050   // TODO: Add your own module termination code here.
00051
00052   return COleControlModule::ExitInstance();
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // DllRegisterServer - Adds entries to the system registry
00058
00059 STDAPI DllRegisterServer(void)
00060 {
00061   AFX_MANAGE_STATE(_afxModuleAddrThis);
00062
00063   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00064     return ResultFromScode(SELFREG_E_TYPELIB);
00065
00066   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00067     return ResultFromScode(SELFREG_E_CLASS);
00068
00069   return NOERROR;
00070 }
00071
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // DllUnregisterServer - Removes entries from the system registry
00075
00076 STDAPI DllUnregisterServer(void)
00077 {
00078   AFX_MANAGE_STATE(_afxModuleAddrThis);
00079
00080   if (!AfxOleUnregisterTypeLib(_tlid))
00081     return ResultFromScode(SELFREG_E_TYPELIB);
00082
00083   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00084     return ResultFromScode(SELFREG_E_CLASS);
00085
00086   return NOERROR;
00087 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testres1.h Source File

  • advanced
  • dllhusk

testres1.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 //{{NO_DEPENDENCIES}}
00011 // App Studio generated include file.
00012 // Used by TESTDLL1.RC
00013
00014 #define IDM_BLACK                       0x9000
00015 #define IDM_RED                         0x9001
00016 #define IDM_GREEN                       0x9002
00017 #define IDM_BLUE                        0x9003
00018 #define IDM_WHITE                       0x9004
00019 #define IDM_CUSTOM                      0x9005
00020
00021 // Next default values for new objects
00022 //
00023 #ifdef APSTUDIO_INVOKED
00024 #ifndef APSTUDIO_READONLY_SYMBOLS
00025
00026 #define _APS_NEXT_RESOURCE_VALUE        4096
00027 #define _APS_NEXT_COMMAND_VALUE         36870
00028 #define _APS_NEXT_CONTROL_VALUE         101
00029 #define _APS_NEXT_SYMED_VALUE           4096
00030 #endif
00031 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDibView Member List

This is the complete list of members for CDibView, including all inherited members.
CDibView() | CDibView | [protected]
GetDocument() | CDibView | [inline]
OnActivateView(BOOL bActivate, CView *pActivateView, CView *pDeactiveView) | CDibView | [virtual]
OnDoRealize(WPARAM wParam, LPARAM lParam) | CDibView | [protected]
OnDraw(CDC *pDC) | CDibView | [virtual]
OnEditCopy() | CDibView | [protected]
OnEditPaste() | CDibView | [protected]
OnInitialUpdate() | CDibView | [virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CDibView | [protected, virtual]
OnUpdateEditCopy(CCmdUI *pCmdUI) | CDibView | [protected]
OnUpdateEditPaste(CCmdUI *pCmdUI) | CDibView | [protected]
~CDibView() | CDibView | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieDoc.h Source File

  • internet
  • MFCIE

mfcieDoc.h

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // mfcieDoc.h : interface of the CMfcieDoc class
00011 //
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_MFCIEDOC_H__47FF4083_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
00015 #define AFX_MFCIEDOC_H__47FF4083_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021
00022 class CMfcieDoc : public CDocument
00023 {
00024 protected: // create from serialization only
00025   CMfcieDoc();
00026   DECLARE_DYNCREATE(CMfcieDoc)
00027
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CMfcieDoc)
00037   public:
00038   virtual BOOL OnNewDocument();
00039   virtual void Serialize(CArchive& ar);
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043 public:
00044   virtual ~CMfcieDoc();
00045 #ifdef _DEBUG
00046   virtual void AssertValid() const;
00047   virtual void Dump(CDumpContext& dc) const;
00048 #endif
00049
00050 protected:
00051
00052 // Generated message map functions
00053 protected:
00054   //{{AFX_MSG(CMfcieDoc)
00055     // NOTE - the ClassWizard will add and remove member functions here.
00056     //    DO NOT EDIT what you see in these blocks of generated code !
00057   //}}AFX_MSG
00058   DECLARE_MESSAGE_MAP()
00059 };
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062
00063 //{{AFX_INSERT_LOCATION}}
00064 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00065
00066 #endif // !defined(AFX_MFCIEDOC_H__47FF4083_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/viewex.h Source File

  • general
  • viewex

viewex.h

Go to the documentation of this file.
00001 // viewex.h : main header file for the VIEWEX application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(__AFXWIN_H__) || !defined(__AFXEXT_H__)
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 #include "maindoc.h"        // main document data
00019 #include "simpvw.h"         // simple read-only view
00020 #include "inputvw.h"        // editable view
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CViewExApp:
00024 // See viewex.cpp for the implementation of this class
00025 //
00026
00027 class CViewExApp : public CWinApp
00028 {
00029 public:
00030   CViewExApp();
00031
00032 // Overrides
00033   virtual BOOL InitInstance();
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CViewExApp)
00038   afx_msg void OnAppAbout();
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonTooltipCtrl Member List

This is the complete list of members for CRibbonTooltipCtrl, including all inherited members.
CRibbonTooltipCtrl() | CRibbonTooltipCtrl |
GetIconSize() | CRibbonTooltipCtrl | [virtual]
m_nID | CRibbonTooltipCtrl | [protected]
m_pParentMenuBar | CRibbonTooltipCtrl | [protected]
m_pParentRibbon | CRibbonTooltipCtrl | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CRibbonTooltipCtrl | [protected]
OnDrawIcon(CDC *pDC, CRect rectImage) | CRibbonTooltipCtrl | [virtual]
OnShow(NMHDR *pNMHDR, LRESULT *pResult) | CRibbonTooltipCtrl | [protected]
~CRibbonTooltipCtrl() | CRibbonTooltipCtrl | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomFileDialog Member List

This is the complete list of members for CCustomFileDialog, including all inherited members.
CCustomFileDialog(BOOL bOpenFileDialog, BOOL bVistaStyle, BOOL bEventPopups, CString &strLog) | CCustomFileDialog |
LogEvent(LPCWSTR eventMsg) | CCustomFileDialog | [private]
m_bEventPopups | CCustomFileDialog | [private]
m_strLog | CCustomFileDialog | [private]
OnCancel() | CCustomFileDialog | [protected, virtual]
OnFileNameChange() | CCustomFileDialog | [protected, virtual]
OnFileNameOK() | CCustomFileDialog | [protected, virtual]
OnFolderChange() | CCustomFileDialog | [protected, virtual]
OnInitDialog() | CCustomFileDialog | [protected, virtual]
OnInitDone() | CCustomFileDialog | [protected, virtual]
OnLBSelChangedNotify(UINT nIDBox, UINT iCurSel, UINT nCode) | CCustomFileDialog | [protected, virtual]
OnOK() | CCustomFileDialog | [protected, virtual]
OnSetFont(CFont *pFont) | CCustomFileDialog | [protected, virtual]
OnShareViolation(LPCTSTR lpszPathName) | CCustomFileDialog | [protected, virtual]
OnTypeChange() | CCustomFileDialog | [protected, virtual]
~CCustomFileDialog() | CCustomFileDialog | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/mainfrm.cpp Source File

  • general
  • ctrlbars

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrlbars.h"
00014
00015 #include "mainfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00026   //{{AFX_MSG_MAP(CMainFrame)
00027   ON_WM_CREATE()
00028   ON_COMMAND(ID_VIEW_DLGBARTOP, OnViewDlgbarTop)
00029   ON_UPDATE_COMMAND_UI(ID_VIEW_DLGBARTOP, OnUpdateViewDlgbartop)
00030   ON_COMMAND(ID_VIEW_SHORT, OnViewShort)
00031   ON_COMMAND(ID_VIEW_LONG, OnViewLong)
00032   ON_COMMAND(ID_TOGGLE_INSERT, OnToggleInsert)
00033   ON_UPDATE_COMMAND_UI(ID_INDICATOR_OVR, OnUpdateInsert)
00034   ON_COMMAND_EX(IDW_STYLES, OnViewBar)
00035   ON_UPDATE_COMMAND_UI(IDW_STYLES, OnUpdateBarMenu)
00036   ON_COMMAND(IDM_VIEWPALETTE, OnViewPalette)
00037   ON_UPDATE_COMMAND_UI(IDM_VIEWPALETTE, OnUpdatePaletteMenu)
00038   ON_COMMAND(IDM_PALETTE_2COLUMN, OnPalette2column)
00039   ON_COMMAND(IDM_PALETTE_3COLUMN, OnPalette3column)
00040   ON_UPDATE_COMMAND_UI(IDM_PALETTE_3COLUMN, OnUpdatePalette3column)
00041   ON_UPDATE_COMMAND_UI(IDM_PALETTE_2COLUMN, OnUpdatePalette2column)
00042   ON_CBN_SELCHANGE(IDC_PALETTE, OnSelChangePalette)
00043   //}}AFX_MSG_MAP
00044   ON_COMMAND_RANGE(ID_STYLE_LEFT, ID_STYLE_JUSTIFIED, OnChangeStyle)
00045   ON_UPDATE_COMMAND_UI_RANGE(ID_STYLE_LEFT, ID_STYLE_JUSTIFIED, OnUpdateStyle)
00046   ON_COMMAND_RANGE(ID_PALETTEERASE, ID_PALETTEOVAL, OnPalette)
00047   ON_UPDATE_COMMAND_UI_RANGE(ID_PALETTEERASE, ID_PALETTEOVAL, OnUpdatePalette)
00048 END_MESSAGE_MAP()
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // arrays of IDs used to initialize control bars
00052
00053 static UINT BASED_CODE styles[] =
00054 {
00055   // same order as in the bitmap 'styles.bmp'
00056   ID_SEPARATOR,           // for combo box (placeholder)
00057   ID_SEPARATOR,
00058   ID_STYLE_LEFT,
00059   ID_STYLE_CENTERED,
00060   ID_STYLE_RIGHT,
00061   ID_STYLE_JUSTIFIED,
00062 };
00063
00064 static UINT BASED_CODE palette[] =
00065 {
00066   // same order as in the bitmap 'palette.bmp'
00067   ID_PALETTEERASE,
00068   ID_PALETTEPEN,
00069   ID_PALETTESELECT,
00070   ID_PALETTEBRUSH,
00071   ID_PALETTESPRAY,
00072   ID_PALETTEPAINT,
00073   ID_PALETTELINE,
00074   ID_PALETTEEYEDROP,
00075   ID_PALETTEMAG,
00076   ID_PALETTERECT,
00077   ID_PALETTEROUND,
00078   ID_PALETTEOVAL
00079 };
00080
00081 static UINT BASED_CODE indicators[] =
00082 {
00083   ID_SEPARATOR,           // status line indicator
00084   ID_INDICATOR_OVR,
00085   ID_INDICATOR_CAPS,
00086   ID_INDICATOR_NUM
00087 };
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CMainFrame construction/destruction
00091
00092 CMainFrame::CMainFrame()
00093 {
00094   m_bInsert = FALSE;      // default to over-strke mode
00095   m_bDialogTop = FALSE;
00096   m_nPaletteCol = 3;
00097 }
00098
00099 CMainFrame::~CMainFrame()
00100 {
00101 }
00102
00103 // We override PreCreateWindow to specify a different window class (WNDCLASS),
00104 //   one with a different background and without the CS_VREDRAW/CS_HREDRAW
00105 //   style so all the frame window's control bars will not be repainted
00106 //   when the window is resized.
00107 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00108 {
00109   cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,
00110     AfxGetApp()->LoadStandardCursor(IDC_ARROW), (HBRUSH)(COLOR_WINDOW+1),
00111     AfxGetApp()->LoadIcon(IDR_MAINFRAME));
00112
00113   return TRUE;
00114 }
00115
00116 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00117 {
00118   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00119     return -1;
00120
00121   EnableDocking(CBRS_ALIGN_ANY);
00122
00123   if (!CreateToolBar())
00124     return -1;
00125   if (!CreateStyleBar())
00126     return -1;
00127   if (!CreatePaletteBar())
00128     return -1;
00129   if (!CreateStatusBar())
00130     return -1;
00131
00132   if (!m_wndDlgBar.Create(this, IDD_VIEWSELECT,
00133     CBRS_LEFT|CBRS_TOOLTIPS|CBRS_FLYBY, IDD_VIEWSELECT))
00134   {
00135     TRACE0("Failed to create DlgBar\n");
00136     return -1;      // fail to create
00137   }
00138
00139   return 0;
00140 }
00141
00142 BOOL CMainFrame::CreateToolBar()
00143 {
00144   if (!m_wndToolBar.Create(this,
00145       CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|WS_VISIBLE) ||
00146     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME))
00147   {
00148     TRACE0("Failed to create toolbar\n");
00149     return FALSE;       // fail to create
00150   }
00151
00152   OnViewShort();
00153   return TRUE;
00154 }
00155
00156 BOOL CMainFrame::CreatePaletteBar()
00157 {
00158   if (!m_wndPaletteBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_FIXED |
00159     CBRS_TOP | CBRS_TOOLTIPS, ID_PALETTEBAR) ||
00160     !m_wndPaletteBar.LoadBitmap(IDB_PALETTE) ||
00161     !m_wndPaletteBar.SetButtons(palette,
00162       sizeof(palette)/sizeof(UINT)))
00163   {
00164     TRACE0("Failed to create toolbar\n");
00165     return FALSE;       // fail to create
00166   }
00167
00168   m_wndPaletteBar.SetWindowText(_T("Palette"));
00169   m_wndPaletteBar.EnableDocking(0);
00170
00171   // Create the Palette.  We are using hardcoded numbers for ease here
00172   // normally the location would be read in from an ini file.
00173   CPoint pt(GetSystemMetrics(SM_CXSCREEN) - 100,
00174     GetSystemMetrics(SM_CYSCREEN) / 3);
00175
00176   m_wndPaletteBar.SetColumns(3);
00177   FloatControlBar(&m_wndPaletteBar, pt);
00178
00179   return TRUE;
00180 }
00181
00182 BOOL CMainFrame::CreateStyleBar()
00183 {
00184   const int nDropHeight = 100;
00185
00186   if (!m_wndStyleBar.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|
00187       CBRS_TOOLTIPS|CBRS_FLYBY, IDW_STYLES) ||
00188     !m_wndStyleBar.LoadBitmap(IDB_STYLES) ||
00189     !m_wndStyleBar.SetButtons(styles, sizeof(styles)/sizeof(UINT)))
00190   {
00191     TRACE0("Failed to create stylebar\n");
00192     return FALSE;       // fail to create
00193   }
00194
00195   // Create the combo box
00196   m_wndStyleBar.SetButtonInfo(0, IDW_COMBO, TBBS_SEPARATOR, 100);
00197
00198   // Design guide advises 12 pixel gap between combos and buttons
00199   m_wndStyleBar.SetButtonInfo(1, ID_SEPARATOR, TBBS_SEPARATOR, 12);
00200   CRect rect;
00201   m_wndStyleBar.GetItemRect(0, &rect);
00202   rect.top = 3;
00203   rect.bottom = rect.top + nDropHeight;
00204   if (!m_wndStyleBar.m_comboBox.Create(
00205       CBS_DROPDOWNLIST|WS_VISIBLE|WS_TABSTOP,
00206       rect, &m_wndStyleBar, IDW_COMBO))
00207   {
00208     TRACE0("Failed to create combo-box\n");
00209     return FALSE;
00210   }
00211
00212   //  Fill the combo box
00213   CString szStyle;
00214   if (szStyle.LoadString(IDS_LEFT))
00215     m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);
00216   if (szStyle.LoadString(IDS_CENTERED))
00217     m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);
00218   if (szStyle.LoadString(IDS_RIGHT))
00219     m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);
00220   if (szStyle.LoadString(IDS_JUSTIFIED))
00221     m_wndStyleBar.m_comboBox.AddString((LPCTSTR)szStyle);
00222
00223   //  Create a font for the combobox
00224   LOGFONT logFont;
00225   memset(&logFont, 0, sizeof(logFont));
00226
00227   if (!::GetSystemMetrics(SM_DBCSENABLED))
00228   {
00229     // Since design guide says toolbars are fixed height so is the font.
00230     logFont.lfHeight = -12;
00231     logFont.lfWeight = FW_BOLD;
00232     logFont.lfPitchAndFamily = VARIABLE_PITCH | FF_SWISS;
00233     CString strDefaultFont;
00234     strDefaultFont.LoadString(IDS_DEFAULT_FONT);
00235     _tcscpy_s(logFont.lfFaceName, LF_FACESIZE, strDefaultFont);
00236     if (!m_wndStyleBar.m_font.CreateFontIndirect(&logFont))
00237       TRACE0("Could Not create font for combo\n");
00238     else
00239       m_wndStyleBar.m_comboBox.SetFont(&m_wndStyleBar.m_font);
00240   }
00241   else
00242   {
00243     m_wndStyleBar.m_font.Attach(::GetStockObject(SYSTEM_FONT));
00244     m_wndStyleBar.m_comboBox.SetFont(&m_wndStyleBar.m_font);
00245   }
00246
00247   return TRUE;
00248 }
00249
00250 BOOL CMainFrame::CreateStatusBar()
00251 {
00252   if (!m_wndStatusBar.Create(this) ||
00253     !m_wndStatusBar.SetIndicators(indicators,
00254       sizeof(indicators)/sizeof(UINT)))
00255   {
00256     TRACE0("Failed to create status bar\n");
00257     return FALSE;       // fail to create
00258   }
00259
00260   UINT nID, nStyle;
00261   int cxWidth;
00262
00263   m_wndStatusBar.GetPaneInfo( 0, nID, nStyle, cxWidth);
00264   m_wndStatusBar.SetPaneInfo( 0, nID, SBPS_STRETCH|SBPS_NORMAL, cxWidth);
00265   return TRUE;
00266 }
00267
00268 /////////////////////////////////////////////////////////////////////////////
00269 // CMainFrame diagnostics
00270
00271 #ifdef _DEBUG
00272 void CMainFrame::AssertValid() const
00273 {
00274   CFrameWnd::AssertValid();
00275 }
00276
00277 void CMainFrame::Dump(CDumpContext& dc) const
00278 {
00279   CFrameWnd::Dump(dc);
00280 }
00281
00282 #endif //_DEBUG
00283
00284 /////////////////////////////////////////////////////////////////////////////
00285 // CMainFrame message handlers
00286
00287 void CMainFrame::OnViewShort()
00288 {
00289   // Set the toolbar to show only partial commmand list
00290   m_wndToolBar.SetButtons(NULL, 7);
00291   m_wndToolBar.SetButtonInfo(0, ID_VIEW_LONG,TBBS_BUTTON, 10);
00292   m_wndToolBar.SetButtonInfo(1, ID_SEPARATOR,TBBS_SEPARATOR, 6);
00293   m_wndToolBar.SetButtonInfo(2, ID_FILE_OPEN,TBBS_BUTTON, 1);
00294   m_wndToolBar.SetButtonInfo(3, ID_FILE_NEW,TBBS_BUTTON, 0);
00295   m_wndToolBar.SetButtonInfo(4, ID_FILE_SAVE,TBBS_BUTTON, 2);
00296   m_wndToolBar.SetButtonInfo(5, ID_SEPARATOR,TBBS_SEPARATOR, 6);
00297   m_wndToolBar.SetButtonInfo(6, ID_APP_ABOUT,TBBS_BUTTON, 7);
00298
00299   // invalidate the call update handlers before painting
00300   m_wndToolBar.Invalidate();
00301   AfxGetApp()->OnIdle(-1);
00302 }
00303
00304 void CMainFrame::OnViewLong()
00305 {
00306   // Set the toolbar to show all commmands
00307   m_wndToolBar.SetButtons(NULL, 13);
00308   m_wndToolBar.SetButtonInfo(0, ID_VIEW_SHORT,TBBS_BUTTON, 9);
00309   m_wndToolBar.SetButtonInfo(1, ID_SEPARATOR,TBBS_SEPARATOR, 6);
00310   m_wndToolBar.SetButtonInfo(2, ID_FILE_OPEN,TBBS_BUTTON, 1);
00311   m_wndToolBar.SetButtonInfo(3, ID_FILE_NEW,TBBS_BUTTON, 0);
00312   m_wndToolBar.SetButtonInfo(4, ID_FILE_SAVE,TBBS_BUTTON, 2);
00313   m_wndToolBar.SetButtonInfo(5, ID_SEPARATOR,TBBS_SEPARATOR, 6);
00314   m_wndToolBar.SetButtonInfo(6, ID_APP_ABOUT,TBBS_BUTTON, 7);
00315   m_wndToolBar.SetButtonInfo(7, ID_SEPARATOR,TBBS_SEPARATOR, 6);
00316   m_wndToolBar.SetButtonInfo(8, ID_EDIT_CUT,TBBS_BUTTON, 3);
00317   m_wndToolBar.SetButtonInfo(9, ID_EDIT_COPY,TBBS_BUTTON, 4);
00318   m_wndToolBar.SetButtonInfo(10, ID_EDIT_PASTE,TBBS_BUTTON, 5);
00319   m_wndToolBar.SetButtonInfo(11, ID_FILE_PRINT,TBBS_BUTTON, 6);
00320   m_wndToolBar.SetButtonInfo(12, ID_CONTEXT_HELP,TBBS_BUTTON, 8);
00321
00322   // invalidate then call update handlers before painting
00323   m_wndToolBar.Invalidate();
00324   AfxGetApp()->OnIdle(-1);
00325 }
00326
00327 void CMainFrame::OnViewDlgbarTop()
00328 {
00329   if (m_bDialogTop)
00330     m_wndDlgBar.SetWindowPos(&m_wndStatusBar, 0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);
00331   else
00332     m_wndDlgBar.SetWindowPos(&wndTop, 0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);
00333
00334   RecalcLayout();
00335   m_bDialogTop = !m_bDialogTop;
00336 }
00337
00338 void CMainFrame::OnUpdateViewDlgbartop(CCmdUI* pCmdUI)
00339 {
00340   pCmdUI->SetCheck(m_bDialogTop);
00341 }
00342
00343 BOOL CMainFrame::OnViewBar(UINT nID)
00344 {
00345   CWnd* pBar;
00346   if ((pBar = GetDlgItem(nID)) == NULL)
00347     return FALSE;   // not for us
00348   // toggle visible state
00349   pBar->ShowWindow((pBar->IsWindowVisible()) == 0);
00350   RecalcLayout();
00351   return TRUE;
00352 }
00353
00354 void CMainFrame::OnUpdateBarMenu(CCmdUI* pCmdUI)
00355 {
00356   CWnd* pBar;
00357   if ((pBar = GetDlgItem(pCmdUI->m_nID)) == NULL)
00358   {
00359     pCmdUI->ContinueRouting();
00360     return; // not for us
00361   }
00362   pCmdUI->SetCheck((pBar->IsWindowVisible()) != 0);
00363 }
00364
00365 void CMainFrame::OnViewPalette()
00366 {
00367   BOOL bVisible = ((m_wndPaletteBar.IsWindowVisible()) != 0);
00368
00369   ShowControlBar(&m_wndPaletteBar, !bVisible, FALSE);
00370   RecalcLayout();
00371 }
00372
00373 void CMainFrame::OnUpdatePaletteMenu(CCmdUI* pCmdUI)
00374 {
00375   BOOL bVisible = ((m_wndPaletteBar.IsWindowVisible()) != 0);
00376   pCmdUI->SetCheck(bVisible);
00377 }
00378
00379 void CMainFrame::OnChangeStyle(UINT nID)
00380 {
00381   m_wndStyleBar.m_comboBox.SetCurSel((int)(nID-ID_STYLE_BASE));
00382 }
00383
00384 void CMainFrame::OnUpdateStyle(CCmdUI* pCmdUI)
00385 {
00386   UINT nIndex = m_wndStyleBar.m_comboBox.GetCurSel();
00387   pCmdUI->SetCheck((UINT)(ID_STYLE_BASE+nIndex) == pCmdUI->m_nID);
00388 }
00389
00390 void CMainFrame::OnUpdateInsert(CCmdUI* pCmdUI)
00391 {
00392   pCmdUI->Enable(!m_bInsert);
00393 }
00394
00395 void CMainFrame::OnToggleInsert()
00396 {
00397   m_bInsert = !m_bInsert;
00398 }
00399
00400 void CMainFrame::OnUpdatePalette(CCmdUI* pCmdUI)
00401 {
00402   CComboBox* pCBox = (CComboBox*)m_wndDlgBar.GetDlgItem(IDC_PALETTE);
00403   UINT nIndex = pCBox->GetCurSel();
00404   pCmdUI->SetCheck((UINT)(ID_PALETTE_BASE + nIndex) == pCmdUI->m_nID);
00405 }
00406
00407 void CMainFrame::OnPalette(UINT nID)
00408 {
00409   CComboBox* pCBox = (CComboBox*)m_wndDlgBar.GetDlgItem(IDC_PALETTE);
00410   pCBox->SetCurSel((int)(nID - ID_PALETTE_BASE));
00411   OnSelChangePalette();
00412 }
00413
00414 void CMainFrame::OnSelChangePalette()
00415 {
00416   CString strText;
00417   CString strItem;
00418   CComboBox* pCBox = (CComboBox*)m_wndDlgBar.GetDlgItem(IDC_PALETTE);
00419   int nIndex = pCBox->GetCurSel();
00420   if (nIndex == CB_ERR)
00421     return;
00422   pCBox->GetLBText(nIndex, strItem);
00423   AfxFormatString1(strText, IDS_SELECTED_PROMPT, (LPCTSTR)strItem);
00424   SetMessageText(strText);
00425 }
00426
00427 void CMainFrame::OnPalette2column()
00428 {
00429   m_nPaletteCol = 2;
00430   m_wndPaletteBar.SetColumns(m_nPaletteCol);
00431 }
00432
00433 void CMainFrame::OnPalette3column()
00434 {
00435   m_nPaletteCol = 3;
00436   m_wndPaletteBar.SetColumns(m_nPaletteCol);
00437 }
00438
00439 void CMainFrame::OnUpdatePalette2column(CCmdUI* pCmdUI)
00440 {
00441   pCmdUI->SetCheck(m_nPaletteCol == 2);
00442 }
00443
00444 void CMainFrame::OnUpdatePalette3column(CCmdUI* pCmdUI)
00445 {
00446   pCmdUI->SetCheck(m_nPaletteCol == 3);
00447 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/stdafx.cpp Source File

  • controls
  • localize

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeView.h Source File

  • vc2008fp
  • SetPaneSize

SetPaneSizeView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CSetPaneSizeView : public CFormView
00014 {
00015 protected: // create from serialization only
00016   CSetPaneSizeView();
00017   DECLARE_DYNCREATE(CSetPaneSizeView)
00018
00019 public:
00020   enum { IDD = IDD_SetPaneSize_FORM };
00021   UINT  m_nSizePercent;
00022   UINT  m_nContainerSize;
00023   UINT  m_nHeightInPixels;
00024   UINT  m_nWidthInPixels;
00025
00026 // Attributes
00027 public:
00028   CSetPaneSizeDoc* GetDocument();
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034   public:
00035   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00036   protected:
00037   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00038   virtual void OnInitialUpdate(); // called first time after construct
00039   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00040   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00041   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00042   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00043
00044 // Implementation
00045 public:
00046   virtual ~CSetPaneSizeView();
00047 #ifdef _DEBUG
00048   virtual void AssertValid() const;
00049   virtual void Dump(CDumpContext& dc) const;
00050 #endif
00051
00052 protected:
00053   afx_msg void OnButtonSetDlgBarSize();
00054   afx_msg void OnButtonSetContainerSize();
00055   afx_msg void OnBtnSetHeightInPixels();
00056   afx_msg void OnBtnSetWidthInPixels();
00057   afx_msg void OnContextMenu(CWnd*, CPoint point);
00058   afx_msg void OnFilePrintPreview();
00059
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 #ifndef _DEBUG  // debug version in SetPaneSizeView.cpp
00064 inline CSetPaneSizeDoc* CSetPaneSizeView::GetDocument()
00065    { return (CSetPaneSizeDoc*)m_pDocument; }
00066 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMoneyDemoView Member List

This is the complete list of members for CMSMoneyDemoView, including all inherited members.
CMSMoneyDemoView() | CMSMoneyDemoView | [protected]
GetDocument() | CMSMoneyDemoView | [inline]
m_Image | CMSMoneyDemoView | [protected]
m_sizeImage | CMSMoneyDemoView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CMSMoneyDemoView | [protected, virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMSMoneyDemoView | [protected]
OnDraw(CDC *pDC) | CMSMoneyDemoView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CMSMoneyDemoView | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CMSMoneyDemoView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CMSMoneyDemoView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CMSMoneyDemoView | [virtual]
~CMSMoneyDemoView() | CMSMoneyDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushppg.h Source File

  • controls
  • push

pushppg.h

Go to the documentation of this file.
00001 // pushppg.h : Declaration of the CPushPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 ////////////////////////////////////////////////////////////////////////////
00014 // CPushPropPage : See pushppg.cpp for implementation.
00015
00016 class CPushPropPage : public COlePropertyPage
00017 {
00018   DECLARE_DYNCREATE(CPushPropPage)
00019   DECLARE_OLECREATE_EX(CPushPropPage)
00020
00021 // Constructor
00022 public:
00023   CPushPropPage();
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CPushPropPage)
00027   enum { IDD = IDD_PROPPAGE_PUSH };
00028   BOOL    m_Border;
00029   CString m_Caption;
00030   BOOL    m_Enabled;
00031   //}}AFX_DATA
00032
00033 // Implementation
00034 protected:
00035   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00036
00037 // Message maps
00038 protected:
00039   //{{AFX_MSG(CPushPropPage)
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042
00043 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/MainFrm.cpp Source File

  • vc2008fp
  • RollupPane

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RollupPane.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030   ON_WM_CREATE()
00031   ON_COMMAND(ID_VIEW_INFOBAR, OnViewInfobar)
00032   ON_UPDATE_COMMAND_UI(ID_VIEW_INFOBAR, OnUpdateViewInfobar)
00033   //}}AFX_MSG_MAP
00034   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00035   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00036   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_3, OnAppLook)
00037   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_3, OnUpdateAppLook)
00038 END_MESSAGE_MAP()
00039
00040 static UINT indicators[] =
00041 {
00042   ID_SEPARATOR,           // status line indicator
00043   ID_INDICATOR_CAPS,
00044   ID_INDICATOR_NUM,
00045   ID_INDICATOR_SCRL,
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CMainFrame construction/destruction
00050
00051 CMainFrame::CMainFrame()
00052 {
00053   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_2003);
00054
00055   // TODO: add member initialization code here
00056
00057 }
00058
00059 CMainFrame::~CMainFrame()
00060 {
00061 }
00062
00063 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00064 {
00065   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00066     return -1;
00067
00068   OnAppLook (m_nAppLook);
00069
00070   CMFCToolBar::EnableQuickCustomization ();
00071
00072
00073   // TODO: Define your own basic commands. Be sure, that each pulldown
00074   // menu have at least one basic command.
00075
00076   CList<UINT, UINT> lstBasicCommands;
00077
00078   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00079   lstBasicCommands.AddTail (ID_FILE_NEW);
00080   lstBasicCommands.AddTail (ID_FILE_OPEN);
00081   lstBasicCommands.AddTail (ID_FILE_SAVE);
00082   lstBasicCommands.AddTail (ID_FILE_PRINT);
00083   lstBasicCommands.AddTail (ID_APP_EXIT);
00084   lstBasicCommands.AddTail (ID_EDIT_CUT);
00085   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00086   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00087   lstBasicCommands.AddTail (ID_APP_ABOUT);
00088   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00089   lstBasicCommands.AddTail (ID_VIEW_INFOBAR);
00090   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00091   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2000);
00092   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_XP);
00093   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2003);
00094   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_VS2005);
00095   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007);
00096   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_1);
00097   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_2);
00098   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_2007_3);
00099   lstBasicCommands.AddTail (ID_VIEW_APPLOOK_WIN_XP);
00100
00101   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00102
00103   if (!m_wndMenuBar.Create (this))
00104   {
00105     TRACE0("Failed to create menubar\n");
00106     return -1;      // fail to create
00107   }
00108
00109   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00110
00111   // Detect color depth. 256 color toolbars can be used in the
00112   // high or true color modes only (bits per pixel is > 8):
00113   CClientDC dc (this);
00114   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00115
00116   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00117
00118   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00119     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00120     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00121   {
00122     TRACE0("Failed to create toolbar\n");
00123     return -1;      // fail to create
00124   }
00125   if (!m_wndStatusBar.Create(this) ||
00126     !m_wndStatusBar.SetIndicators(indicators,
00127       sizeof(indicators)/sizeof(UINT)))
00128   {
00129     TRACE0("Failed to create status bar\n");
00130     return -1;      // fail to create
00131   }
00132
00133   //--------------------------------
00134   // Create Information Bar:
00135   //--------------------------------
00136   if (!m_wndInfoBar.Create (_T("Rollup Pane"), this, CRect (0, 0, 100, 100),
00137     TRUE ,
00138     ID_VIEW_INFOBAR,
00139     WS_CHILD | WS_VISIBLE,
00140     AFX_CBRS_REGULAR_TABS,
00141     AFX_CBRS_CLOSE | AFX_CBRS_FLOAT | AFX_CBRS_AUTO_ROLLUP))
00142   {
00143     TRACE0("Failed to create infor bar bar\n");
00144     return -1;      // fail to create
00145   }
00146
00147   m_wndToolBar.SetWindowText (_T("Standard"));
00148   // TODO: Delete these three lines if you don't want the toolbar to
00149   //  be dockable
00150   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00151   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00152   m_wndInfoBar.EnableDocking (0);
00153   EnableDocking(CBRS_ALIGN_ANY);
00154   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00155   DockPane(&m_wndMenuBar);
00156   DockPane(&m_wndToolBar);
00157
00158   m_wndInfoBar.FloatPane (CRect (300, 200, 400, 300));
00159
00160
00161   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00162
00163   // Enable conttol bar context menu (list of bars + customize command):
00164   EnablePaneMenu (
00165     TRUE,       // Enable
00166     ID_VIEW_CUSTOMIZE,  // Customize command ID
00167     _T("Customize..."), // Customize command text
00168     ID_VIEW_TOOLBARS);  // Menu items with this ID will be replaced by
00169               // toolbars menu
00170
00171   return 0;
00172 }
00173
00174 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00175 {
00176   if( !CFrameWnd::PreCreateWindow(cs) )
00177     return FALSE;
00178   // TODO: Modify the Window class or styles here by modifying
00179   //  the CREATESTRUCT cs
00180
00181   return TRUE;
00182 }
00183
00184 /////////////////////////////////////////////////////////////////////////////
00185 // CMainFrame diagnostics
00186
00187 #ifdef _DEBUG
00188 void CMainFrame::AssertValid() const
00189 {
00190   CFrameWnd::AssertValid();
00191 }
00192
00193 void CMainFrame::Dump(CDumpContext& dc) const
00194 {
00195   CFrameWnd::Dump(dc);
00196 }
00197
00198 #endif //_DEBUG
00199
00200 /////////////////////////////////////////////////////////////////////////////
00201 // CMainFrame message handlers
00202
00203
00204 void CMainFrame::OnViewCustomize()
00205 {
00206   //------------------------------------
00207   // Create a customize toolbars dialog:
00208   //------------------------------------
00209   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00210     TRUE /* Automatic menus scaning */
00211     );
00212
00213   pDlgCust->Create ();
00214 }
00215
00216 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00217 {
00218   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00219   //
00220   // UINT uiToolBarId = (UINT) wp;
00221   // if (uiToolBarId == IDR_MAINFRAME)
00222   // {
00223   //    do something with m_wndToolBar
00224   // }
00225
00226   return 0;
00227 }
00228
00229 void CMainFrame::OnAppLook(UINT id)
00230 {
00231   CDockingManager::SetDockingMode (DT_STANDARD);
00232
00233   m_nAppLook = id;
00234
00235   CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;
00236
00237   switch (m_nAppLook)
00238   {
00239   case ID_VIEW_APPLOOK_2000:
00240     // enable Office 2000 look:
00241     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00242     break;
00243
00244   case ID_VIEW_APPLOOK_XP:
00245     // enable Office XP look:
00246     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00247     break;
00248
00249   case ID_VIEW_APPLOOK_WIN_XP:
00250     // enable Windows XP look (in other OS Office XP look will be used):
00251     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00252     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00253     break;
00254
00255   case ID_VIEW_APPLOOK_2003:
00256     // enable Office 2003 look:
00257     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00258     CDockingManager::SetDockingMode (DT_SMART);
00259     break;
00260
00261   case ID_VIEW_APPLOOK_VS2005:
00262     // enable VS 2005 look:
00263     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00264     CDockingManager::SetDockingMode (DT_SMART);
00265     break;
00266
00267   case ID_VIEW_APPLOOK_2007:
00268   case ID_VIEW_APPLOOK_2007_1:
00269   case ID_VIEW_APPLOOK_2007_2:
00270   case ID_VIEW_APPLOOK_2007_3:
00271     // enable Office 2007 look:
00272
00273     switch (m_nAppLook)
00274     {
00275     case ID_VIEW_APPLOOK_2007:
00276       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00277       break;
00278
00279     case ID_VIEW_APPLOOK_2007_1:
00280       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00281       break;
00282
00283     case ID_VIEW_APPLOOK_2007_2:
00284       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00285       break;
00286
00287     case ID_VIEW_APPLOOK_2007_3:
00288       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00289       break;
00290     }
00291
00292     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00293     CDockingManager::SetDockingMode (DT_SMART);
00294     break;
00295
00296   default:
00297     ASSERT (FALSE);
00298   }
00299
00300   CDockingManager* pDockManager = GetDockingManager ();
00301   if (pDockManager != NULL)
00302   {
00303     ASSERT_VALID (pDockManager);
00304     pDockManager->AdjustPaneFrames ();
00305   }
00306
00307   CTabbedPane::ResetTabs ();
00308
00309   RecalcLayout ();
00310   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00311
00312   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00313 }
00314
00315 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00316 {
00317   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00318 }
00319
00320
00321 void CMainFrame::OnViewInfobar()
00322 {
00323   BOOL bAutoHideMode = m_wndInfoBar.IsAutoHideMode ();
00324   BOOL bTabbed = m_wndInfoBar.IsTabbed ();
00325
00326   ShowPane (&m_wndInfoBar,
00327           !m_wndInfoBar.IsVisible (),
00328           FALSE, bAutoHideMode || !bTabbed);
00329   RecalcLayout ();
00330 }
00331
00332 void CMainFrame::OnUpdateViewInfobar(CCmdUI* pCmdUI)
00333 {
00334   pCmdUI->SetCheck (m_wndInfoBar.IsVisible ());
00335 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionsPage1 Member List

This is the complete list of members for COptionsPage1, including all inherited members.
COptionsPage1() | COptionsPage1 |
DoDataExchange(CDataExchange *pDX) | COptionsPage1 | [protected, virtual]
IDD enum value | COptionsPage1 |
~COptionsPage1() | COptionsPage1 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PropBag.Cpp Source File

  • ole
  • TstCon

PropBag.Cpp

Go to the documentation of this file.
00001 // File: PropBag.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 IMPLEMENT_DYNAMIC( CPropertyBagItem, CObject );
00020
00021 CPropertyBagItem::CPropertyBagItem( LPCOLESTR pszName, VARIANT* pvarValue )
00022 {
00023    m_strName = pszName;
00024    m_varValue = pvarValue;
00025 }
00026
00027
00028 CPropertyBag::CPropertyBag() :
00029    m_nRefCount( 0 )
00030 {
00031 }
00032
00033 CPropertyBag::~CPropertyBag()
00034 {
00035    CPropertyBagItem* pItem;
00036
00037    while( !m_lpItems.IsEmpty() )
00038    {
00039     pItem = m_lpItems.RemoveHead();
00040     delete pItem;
00041    }
00042 }
00043
00044 POSITION CPropertyBag::GetFirstItemPosition() const
00045 {
00046    return( m_lpItems.GetHeadPosition() );
00047 }
00048
00049 CPropertyBagItem* CPropertyBag::GetNextItem( POSITION& posItem ) const
00050 {
00051    return( m_lpItems.GetNext( posItem ) );
00052 }
00053
00054 STDMETHODIMP_( ULONG ) CPropertyBag::AddRef()
00055 {
00056    m_nRefCount++;
00057
00058    return( m_nRefCount );
00059 }
00060
00061 STDMETHODIMP_( ULONG ) CPropertyBag::Release()
00062 {
00063    m_nRefCount--;
00064
00065    if( m_nRefCount == 0 )
00066    {
00067     delete this;
00068     return( 0 );
00069    }
00070    else
00071    {
00072     return( m_nRefCount );
00073    }
00074 }
00075
00076 STDMETHODIMP CPropertyBag::QueryInterface( REFIID iid, void** ppInterface )
00077 {
00078    ENSURE( ppInterface != NULL );
00079    *ppInterface = NULL;
00080
00081    if( iid == IID_IUnknown )
00082    {
00083     *ppInterface = (IUnknown*)this;
00084    }
00085    else if( iid == IID_IPropertyBag )
00086    {
00087     *ppInterface = (IPropertyBag*)this;
00088    }
00089
00090    if( *ppInterface != NULL )
00091    {
00092     AddRef();
00093     return( S_OK );
00094    }
00095    else
00096    {
00097     return( E_NOINTERFACE );
00098    }
00099 }
00100
00101 STDMETHODIMP CPropertyBag::Read( LPCOLESTR pszPropName, VARIANT* pvarValue,
00102    IErrorLog* pErrorLog )
00103 {
00104    POSITION posItem;
00105    CPropertyBagItem* pItem;
00106    HRESULT hResult;
00107    EXCEPINFO error;
00108
00109    if( pszPropName == NULL )
00110    {
00111     return( E_POINTER );
00112    }
00113    if( pvarValue == NULL )
00114    {
00115     return( E_POINTER );
00116    }
00117
00118    memset( &error, 0, sizeof( error ) );
00119
00120    COLE2CT strPropName( pszPropName );
00121
00122    posItem = m_lpItems.GetHeadPosition();
00123    while( posItem != NULL )
00124    {
00125     pItem = m_lpItems.GetNext( posItem );
00126     if( pItem->m_strName == strPropName )
00127     {
00128      // We found the property.
00129      if( pvarValue->vt == VT_EMPTY )
00130      {
00131       hResult = VariantCopy( pvarValue, &pItem->m_varValue );
00132       if( FAILED( hResult ) )
00133       {
00134          if( pErrorLog != NULL )
00135          {
00136           error.scode = hResult;
00137           pErrorLog->AddError( pszPropName, &error );
00138          }
00139          return( E_FAIL );
00140       }
00141      }
00142      else
00143      {
00144       hResult = VariantChangeType( pvarValue, &pItem->m_varValue, 0,
00145          pvarValue->vt );
00146       if( FAILED( hResult ) )
00147       {
00148          if( pErrorLog != NULL )
00149          {
00150           error.scode = hResult;
00151           pErrorLog->AddError( pszPropName, &error );
00152          }
00153          return( E_FAIL );
00154       }
00155      }
00156      return( S_OK );
00157     }
00158    }
00159
00160    return( E_INVALIDARG );
00161 }
00162
00163 STDMETHODIMP CPropertyBag::Write( LPCOLESTR pszPropName, VARIANT* pvarValue )
00164 {
00165
00166    CPropertyBagItem* pItem;
00167
00168    if( (pszPropName == NULL) || (pvarValue == NULL) )
00169    {
00170     return( E_POINTER );
00171    }
00172
00173    pItem = new CPropertyBagItem( pszPropName, pvarValue );
00174    if( pItem == NULL )
00175    {
00176     return( E_OUTOFMEMORY );
00177    }
00178
00179    m_lpItems.AddTail( pItem );
00180
00181    return( S_OK );
00182 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/stdafx.h Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef STRICT
00008 #define STRICT
00009 #endif
00010
00011 #include "targetver.h"
00012
00013 #define _ATL_APARTMENT_THREADED
00014 #define _ATL_NO_AUTOMATIC_NAMESPACE
00015
00016 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00017
00018 #define SHARED_HANDLERS // this definition allows using of shared stuff from the DrawClint application
00019
00020 #include <afxwin.h>
00021 #ifndef _AFX_NO_OLE_SUPPORT
00022 #include <afxole.h>
00023 #include <afxdisp.h>        // MFC Automation classes
00024 #endif // _AFX_NO_OLE_SUPPORT
00025
00026 #include "resource.h"
00027 #include <atlbase.h>
00028 #include <atlcom.h>
00029 #include <atlctl.h>
00030
00031 using namespace ATL;
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/multconv.h Source File

  • vc2008fp
  • WordPad

multconv.h

Go to the documentation of this file.
00001 //
00002 // convert.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #ifdef CONVERTERS
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CConverter
00018
00019 typedef int (CALLBACK *LPFNOUT)(int cch, int nPercentComplete);
00020 typedef int (CALLBACK *LPFNIN)(int flags, int nPercentComplete);
00021 typedef BOOL (FAR PASCAL *PINITCONVERTER)(HWND hWnd, LPCSTR lpszModuleName);
00022 typedef BOOL (FAR PASCAL *PISFORMATCORRECT)(HANDLE ghszFile, HANDLE ghszClass);
00023 typedef int (FAR PASCAL *PFOREIGNTORTF)(HANDLE ghszFile, LPVOID lpv, HANDLE ghBuff,
00024   HANDLE ghszClass, HANDLE ghszSubset, LPFNOUT lpfnOut);
00025 typedef int (FAR PASCAL *PRTFTOFOREIGN)(HANDLE ghszFile, LPVOID lpv, HANDLE ghBuff,
00026   HANDLE ghszClass, LPFNIN lpfnIn);
00027
00028 #endif
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CTrackFile
00032 class CTrackFile : public CFile
00033 {
00034 public:
00035 //Construction
00036   CTrackFile(CFrameWnd* pWnd);
00037   ~CTrackFile();
00038
00039 //Attributes
00040   int m_nLastPercent;
00041   ULONGLONG m_dwLength;
00042   CFrameWnd* m_pFrameWnd;
00043   CString m_strComplete;
00044   CString m_strWait;
00045   CString m_strSaving;
00046 //Operations
00047   void OutputPercent(int nPercentComplete = 0);
00048   void OutputString(LPCTSTR lpsz);
00049   virtual UINT Read(void FAR* lpBuf, UINT nCount);
00050   virtual void Write(const void FAR* lpBuf, UINT nCount);
00051 };
00052
00053 class COEMFile : public CTrackFile
00054 {
00055 public:
00056   COEMFile(CFrameWnd* pWnd);
00057   virtual UINT Read(void FAR* lpBuf, UINT nCount);
00058   virtual void Write(const void FAR* lpBuf, UINT nCount);
00059 };
00060
00061 #ifdef CONVERTERS
00062
00063 class CConverter : public CTrackFile
00064 {
00065 public:
00066   CConverter(LPCSTR pszLibName, CFrameWnd* pWnd = NULL);
00067 protected:
00068   CConverter(CFrameWnd* pWnd = NULL);
00069
00070 public:
00071 //Attributes
00072   int m_nPercent;
00073   BOOL m_bDone;
00074   BOOL m_bConvErr;
00075
00076   virtual ULONGLONG GetPosition() const
00077   {
00078     return 0;
00079   }
00080
00081   virtual ULONGLONG GetLength() const
00082   {
00083     ASSERT_VALID(this);
00084     return 1;
00085   }
00086
00087 // Operations
00088   BOOL IsFormatCorrect(LPCTSTR pszFileName);
00089   BOOL DoConversion();
00090   virtual BOOL Open(LPCTSTR lpszFileName, UINT nOpenFlags,
00091     CFileException* pError = NULL);
00092   void WaitForConverter();
00093   void WaitForBuffer();
00094
00095 // Overridables
00096   virtual LONG Seek(LONG lOff, UINT nFrom);
00097
00098   virtual UINT Read(void* lpBuf, UINT nCount);
00099   virtual void Write(const void* lpBuf, UINT nCount);
00100
00101   virtual void Abort();
00102   virtual void Flush();
00103   virtual void Close();
00104
00105 // Unsupported
00106   virtual CFile* Duplicate() const;
00107   virtual void LockRange(DWORD dwPos, DWORD dwCount);
00108   virtual void UnlockRange(DWORD dwPos, DWORD dwCount);
00109   virtual void SetLength(DWORD dwNewLen);
00110
00111 //Implementation
00112 public:
00113   ~CConverter();
00114
00115 protected:
00116   int m_nBytesAvail;
00117   int m_nBytesWritten;
00118   BYTE* m_pBuf;
00119   HANDLE m_hEventFile;
00120   HANDLE m_hEventConv;
00121   BOOL m_bForeignToRtf;
00122   HGLOBAL m_hBuff;
00123   HGLOBAL m_hFileName;
00124   void LoadFunctions();
00125   HINSTANCE m_hLibCnv;
00126   PINITCONVERTER m_pInitConverter;
00127   PISFORMATCORRECT m_pIsFormatCorrect;
00128   PFOREIGNTORTF m_pForeignToRtf;
00129   PRTFTOFOREIGN m_pRtfToForeign;
00130   int CALLBACK WriteOut(int cch, int nPercentComplete);
00131   int CALLBACK ReadIn(int nPercentComplete);
00132   static HGLOBAL StringToHGLOBAL(LPCSTR pstr);
00133   static int CALLBACK WriteOutStatic(int cch, int nPercentComplete);
00134   static int CALLBACK ReadInStatic(int flags, int nPercentComplete);
00135   static UINT ConverterThread(LPVOID pParam);
00136   static CConverter *m_pThis;
00137 };
00138
00139 #endif
00140
00141 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribble.h Source File

  • general
  • Scribble

scribble.h

Go to the documentation of this file.
00001 // Scribble.h : main header file for the SCRIBBLE application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CScribbleApp:
00020 // See Scribble.cpp for the implementation of this class
00021 //
00022
00023 class CScribbleApp : public CWinApp
00024 {
00025 public:
00026   CScribbleApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CScribbleApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036   COleTemplateServer m_server;
00037     // Server object for document creation
00038
00039   //{{AFX_MSG(CScribbleApp)
00040   afx_msg void OnAppAbout();
00041     // NOTE - the ClassWizard will add and remove member functions here.
00042     //    DO NOT EDIT what you see in these blocks of generated code !
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/push.cpp Source File

  • controls
  • push

push.cpp

Go to the documentation of this file.
00001 // push.cpp : Implementation of CPushApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "push.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020
00021 CPushApp NEAR theApp;
00022
00023 const GUID CDECL BASED_CODE _tlid =
00024     { 0x75303866, 0xb925, 0x101a, { 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f } };
00025 const WORD _wVerMajor = 1;
00026 const WORD _wVerMinor = 0;
00027
00028
00029 ////////////////////////////////////////////////////////////////////////////
00030 // CPushApp::InitInstance - DLL initialization
00031
00032 BOOL CPushApp::InitInstance()
00033 {
00034   BOOL bInit = COleControlModule::InitInstance();
00035
00036   if (bInit)
00037   {
00038     // TODO: Add your own module initialization code here.
00039   }
00040
00041   return bInit;
00042 }
00043
00044
00045 ////////////////////////////////////////////////////////////////////////////
00046 // CPushApp::ExitInstance - DLL termination
00047
00048 int CPushApp::ExitInstance()
00049 {
00050   // TODO: Add your own module termination code here.
00051
00052   return COleControlModule::ExitInstance();
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // DllRegisterServer - Adds entries to the system registry
00058
00059 STDAPI DllRegisterServer(void)
00060 {
00061   AFX_MANAGE_STATE(_afxModuleAddrThis);
00062
00063   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00064     return ResultFromScode(SELFREG_E_TYPELIB);
00065
00066   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00067     return ResultFromScode(SELFREG_E_CLASS);
00068
00069   return NOERROR;
00070 }
00071
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // DllUnregisterServer - Removes entries from the system registry
00075
00076 STDAPI DllUnregisterServer(void)
00077 {
00078   AFX_MANAGE_STATE(_afxModuleAddrThis);
00079
00080   if (!AfxOleUnregisterTypeLib(_tlid))
00081     return ResultFromScode(SELFREG_E_TYPELIB);
00082
00083   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00084     return ResultFromScode(SELFREG_E_CLASS);
00085
00086   return NOERROR;
00087 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recaldoc.cpp Source File

  • advanced
  • mtrecalc

recaldoc.cpp

Go to the documentation of this file.
00001 // recaldoc.cpp : implementation of the CRecalcDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtrecalc.h"
00014 #include "calcthrd.h"
00015 #include "recaldoc.h"
00016 #include "slowcalc.h"
00017 #include "speeddlg.h"
00018 #include "recalcvw.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CRecalcDoc
00027
00028 IMPLEMENT_DYNCREATE(CRecalcDoc, CDocument)
00029
00030 BEGIN_MESSAGE_MAP(CRecalcDoc, CDocument)
00031   ON_COMMAND_RANGE(ID_SINGLE_THREAD, ID_UI_THREAD, OnDemoThread)
00032   ON_UPDATE_COMMAND_UI_RANGE(ID_SINGLE_THREAD, ID_UI_THREAD, OnUpdateDemoThread)
00033   //{{AFX_MSG_MAP(CRecalcDoc)
00034   ON_COMMAND(ID_RECALC_SPEED, OnRecalcSpeed)
00035   ON_COMMAND(ID_KILL_WORKER_THREAD, OnKillWorkerThread)
00036   ON_UPDATE_COMMAND_UI(ID_KILL_WORKER_THREAD, OnUpdateKillWorkerThread)
00037   //}}AFX_MSG_MAP
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CRecalcDoc construction/destruction
00042
00043 CRecalcDoc::CRecalcDoc()
00044 {
00045   m_nInt1 = m_nInt2 = m_nSum = 0;
00046   m_bRecalcNeeded = m_bRecalcInProgress = FALSE;
00047   m_nRecalcSpeedSeconds = 5;
00048
00049   m_nCurrentDemoCommand = ID_SINGLE_THREAD;
00050
00051   m_hEventStartRecalc = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset
00052   m_hEventRecalcDone = CreateEvent(NULL, TRUE, TRUE, NULL); // manual reset, initially set
00053   m_hEventKillRecalcThread = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset
00054   m_hEventRecalcThreadKilled = CreateEvent(NULL, FALSE, FALSE, NULL); // auto reset, initially reset
00055
00056   m_recalcThreadInfo.m_hEventStartRecalc = m_hEventStartRecalc;
00057   m_recalcThreadInfo.m_hEventRecalcDone = m_hEventRecalcDone;
00058   m_recalcThreadInfo.m_hEventKillRecalcThread = m_hEventKillRecalcThread;
00059   m_recalcThreadInfo.m_hEventRecalcThreadKilled = m_hEventRecalcThreadKilled;
00060
00061   m_pRecalcWorkerThread = NULL;
00062 }
00063
00064 CRecalcDoc::~CRecalcDoc()
00065 {
00066   // In this application, the document owns the worker thread.
00067   // The document's destructor is responsible for killing the active worker
00068   // thread.
00069
00070   // It's a good idea to wait for the worker thread to notify via a
00071   // "thread killed" event that it has killed itself. Otherwise, in the case
00072   // where the app is terminating, is possible (even if unlikely) that it
00073   // will detect a memory leak of the CWinThread object before the
00074   // CWinThread object has had a chance to auto-delete itself.
00075
00076   DWORD dwExitCode;
00077   if (m_pRecalcWorkerThread != NULL &&
00078     GetExitCodeThread(m_pRecalcWorkerThread->m_hThread, &dwExitCode) &&
00079     dwExitCode == STILL_ACTIVE)
00080   {
00081     // Kill the worker thread by setting the "kill thread" event.
00082     // See comment in OnKillWorkerThread for explanation of the sequence
00083     // of the "kill thread" and "start recalc" events.
00084     SetEvent(m_hEventKillRecalcThread);
00085     SetEvent(m_hEventStartRecalc);
00086     WaitForSingleObject(m_hEventRecalcThreadKilled, INFINITE);
00087   }
00088 }
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CRecalcDoc overrides
00092
00093
00094 BOOL CRecalcDoc::OnNewDocument()
00095 {
00096   if (!CDocument::OnNewDocument())
00097     return FALSE;
00098
00099   return TRUE;
00100 }
00101
00102 BOOL CRecalcDoc::OnSaveDocument(LPCTSTR lpszPathName)
00103 {
00104   if (m_bRecalcInProgress)
00105   {
00106     if (AfxMessageBox(IDS_CONTINUE_RECALC_BEFORE_SAVE, MB_YESNO) == IDYES)
00107     {
00108       BeginWaitCursor();
00109       WaitForSingleObject(m_hEventRecalcDone, INFINITE);
00110       RecalcDone();
00111       EndWaitCursor();
00112     }
00113     else
00114     {
00115       AfxMessageBox(IDS_FILE_NOT_SAVED);
00116       return FALSE;
00117     }
00118   }
00119   else if (m_bRecalcNeeded) // recalc needed but not in progress
00120   {
00121     if (AfxMessageBox(IDS_NEED_RECALC_BEFORE_SAVE, MB_YESNO) == IDYES)
00122     {
00123       BeginWaitCursor();
00124
00125       // Update the document from data in the view and start recalculation.
00126       POSITION pos = GetFirstViewPosition();
00127       ASSERT(pos != NULL);
00128       CView* pView = GetNextView(pos);
00129       pView->SendMessage(WM_USER_RECALC_NOW, 0, 0);
00130
00131       WaitForSingleObject(m_hEventRecalcDone, INFINITE);
00132       RecalcDone();
00133       EndWaitCursor();
00134     }
00135     else
00136     {
00137       AfxMessageBox(IDS_FILE_NOT_SAVED);
00138       return FALSE;
00139     }
00140   }
00141   return CDocument::OnSaveDocument(lpszPathName);
00142 }
00143
00144
00145 /////////////////////////////////////////////////////////////////////////////
00146 // CRecalcDoc serialization
00147
00148 void CRecalcDoc::Serialize(CArchive& ar)
00149 {
00150   if (ar.IsStoring())
00151   {
00152     ar << (WORD)m_nInt1;
00153     ar << (WORD)m_nInt2;
00154     ar << (WORD)m_nSum;
00155   }
00156   else
00157   {
00158     WORD w;
00159     ar >> w;
00160     m_nInt1 = w;
00161     ar >> w;
00162     m_nInt2 = w;
00163     ar >> w;
00164     m_nSum = w;
00165   }
00166 }
00167
00168 /////////////////////////////////////////////////////////////////////////////
00169 // CRecalcDoc diagnostics
00170
00171 #ifdef _DEBUG
00172 void CRecalcDoc::AssertValid() const
00173 {
00174   CDocument::AssertValid();
00175 }
00176
00177 void CRecalcDoc::Dump(CDumpContext& dc) const
00178 {
00179   CDocument::Dump(dc);
00180 }
00181 #endif //_DEBUG
00182
00183
00184 /////////////////////////////////////////////////////////////////////////////
00185 // CRecalcDoc operations and implementation
00186
00187 void CRecalcDoc::UpdateInt1AndInt2(int n1, int n2, BOOL bForceRecalc)
00188 {
00189   if (!bForceRecalc && m_nInt1 == n1 && m_nInt2 == n2)
00190     return;  // recalculation not needed
00191
00192   SetModifiedFlag();
00193   m_nInt1 = n1;
00194   m_nInt2 = n2;
00195
00196   m_bRecalcNeeded = m_bRecalcInProgress = TRUE;
00197   // Synchronize the int1 and int2 fields in the other views,
00198   // and show "recalculating..." in the sum field.
00199   UpdateAllViews(NULL);
00200
00201   switch (m_nCurrentDemoCommand)
00202   {
00203     case ID_SINGLE_THREAD:
00204       RecalcInSingleThread();
00205       break;
00206
00207     case ID_WORKER_THREAD:
00208       RecalcInSecondThread();
00209       break;
00210     default:
00211       ASSERT(FALSE);
00212   }
00213 }
00214
00215
00216 void CRecalcDoc::RecalcInSingleThread()
00217 {
00218   SlowAdd(m_nInt1, m_nInt2, m_nSum, NULL, m_nRecalcSpeedSeconds, AfxGetMainWnd()->m_hWnd);
00219
00220   m_bRecalcNeeded = m_bRecalcInProgress = FALSE;
00221
00222   // Update the "sum" field.
00223   UpdateAllViews(NULL, UPDATE_HINT_SUM);
00224
00225 }
00226
00227 void CRecalcDoc::RecalcInSecondThread()
00228 {
00229   if (m_pRecalcWorkerThread == NULL)
00230   {
00231     // Begin the worker thread.  It is ok to fill in the CThreadInfo
00232     // structure after the thread has started, because the thread
00233     // waits for the "start recalc" event before referring to the structure.
00234     m_pRecalcWorkerThread =
00235       AfxBeginThread(RecalcThreadProc, &m_recalcThreadInfo);
00236   }
00237
00238   m_recalcThreadInfo.m_nInt1 = m_nInt1;
00239   m_recalcThreadInfo.m_nInt2 = m_nInt2;
00240   POSITION pos = GetFirstViewPosition();
00241   ASSERT(pos != NULL);
00242   CView* pView = GetNextView(pos);
00243   ENSURE(pView != NULL);
00244   m_recalcThreadInfo.m_hwndNotifyRecalcDone = pView->m_hWnd;
00245   m_recalcThreadInfo.m_hwndNotifyProgress = AfxGetMainWnd()->m_hWnd;
00246   m_recalcThreadInfo.m_nRecalcSpeedSeconds = m_nRecalcSpeedSeconds;
00247
00248   // The events are initially set or reset in the CreateEvent call;
00249   // but they may be left in an improperly initialized state if
00250   // a worker thread has been previously started and then prematurely
00251   // killed.  Set/reset the events to the proper initial state.
00252   // Set the "start recalc" event last, since it is the event the
00253   // triggers the starting of the worker thread recalculation.
00254   SetEvent(m_hEventRecalcDone);
00255   ResetEvent(m_hEventKillRecalcThread);
00256   ResetEvent(m_hEventRecalcThreadKilled);
00257   SetEvent(m_hEventStartRecalc);
00258   // RecalcDone() will be called by the view when the thread sends a
00259   // WM_USER_RECALC_DONE message.
00260 }
00261
00262 void CRecalcDoc::RecalcDone()
00263 {   // Called by the view when the worker thread sends a WM_USER_RECALC_DONE message.
00264
00265   m_nSum = m_recalcThreadInfo.m_nSum;
00266   m_bRecalcNeeded = m_bRecalcInProgress = FALSE;
00267   UpdateAllViews(NULL, UPDATE_HINT_SUM);
00268 }
00269
00270
00271 /////////////////////////////////////////////////////////////////////////////
00272 // CRecalcDoc commands
00273
00274 void CRecalcDoc::OnDemoThread(UINT nCmdID)
00275 {
00276   m_nCurrentDemoCommand = nCmdID;
00277 }
00278
00279 void CRecalcDoc::OnUpdateDemoThread(CCmdUI* pCmdUI)
00280 {
00281   pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrentDemoCommand);
00282 }
00283
00284 void CRecalcDoc::OnRecalcSpeed()
00285 {
00286   CSpeedDlg dlg;
00287   dlg.m_nRecalcSpeedSeconds = m_nRecalcSpeedSeconds;
00288   if (dlg.DoModal() == IDOK)
00289     m_nRecalcSpeedSeconds = dlg.m_nRecalcSpeedSeconds;
00290 }
00291
00292 void CRecalcDoc::OnKillWorkerThread()
00293 {
00294   // The worker thread periodically checks for the "kill recalc" event
00295   // during its execution of a recalculation.  When the worker thread
00296   // is not currently recalculating, it is waiting for a "start recalc"
00297   // event.  Therefore, in order to kill the thread that might be waiting
00298   // for the "start recalc" event, it is necessary to first set the
00299   // "start recalc" event.
00300   SetEvent(m_hEventKillRecalcThread);
00301   SetEvent(m_hEventStartRecalc);
00302
00303   WaitForSingleObject(m_hEventRecalcThreadKilled, INFINITE);
00304
00305   m_pRecalcWorkerThread = NULL;
00306   m_bRecalcInProgress = FALSE; // but m_bRecalcNeeded is still TRUE
00307   UpdateAllViews(NULL, UPDATE_HINT_SUM);
00308 }
00309
00310 void CRecalcDoc::OnUpdateKillWorkerThread(CCmdUI* pCmdUI)
00311 {
00312   pCmdUI->Enable(m_nCurrentDemoCommand == ID_WORKER_THREAD
00313       && m_pRecalcWorkerThread != NULL);
00314 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLineWeightDlg Member List

This is the complete list of members for CLineWeightDlg, including all inherited members.
CLineWeightDlg(CWnd *pParent=NULL) | CLineWeightDlg |
DoDataExchange(CDataExchange *pDX) | CLineWeightDlg | [protected, virtual]
IDD enum value | CLineWeightDlg |
m_penSize | CLineWeightDlg |
m_SpinCtrl | CLineWeightDlg |
OnInitDialog() | CLineWeightDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.h Source File

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViewsDoc.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 class COutlookMultiViewsDoc : public CDocument
00004 {
00005 protected: // create from serialization only
00006   COutlookMultiViewsDoc();
00007   DECLARE_DYNCREATE(COutlookMultiViewsDoc)
00008
00009 // Attributes
00010 public:
00011
00012 // Operations
00013 public:
00014
00015 // Overrides
00016   public:
00017   virtual BOOL OnNewDocument();
00018   virtual void Serialize(CArchive& ar);
00019
00020 // Implementation
00021 public:
00022   virtual ~COutlookMultiViewsDoc();
00023 #ifdef _DEBUG
00024   virtual void AssertValid() const;
00025   virtual void Dump(CDumpContext& dc) const;
00026 #endif
00027
00028 protected:
00029   DECLARE_MESSAGE_MAP()
00030 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/MonthCal.h Source File

  • general
  • CmnCtrl1

MonthCal.h

Go to the documentation of this file.
00001 // MonthCalPage.h : header file for the CMNCTRL1 application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 #if !defined(AFX_MONTHCALPAGE_H__39010223_ECB6_11D0_8FEA_00A0C9034892__INCLUDED_)
00015 #define AFX_MONTHCALPAGE_H__39010223_ECB6_11D0_8FEA_00A0C9034892__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CMonthCalPage dialog
00023
00024 class CMonthCalPage : public CPropertyPage
00025 {
00026   DECLARE_DYNCREATE(CMonthCalPage)
00027
00028 // Construction
00029 public:
00030   void HandleSelChange(NMHDR *pHdr, LRESULT *pRes);
00031   void HandleSelect(NMHDR *pHdr, LRESULT *pRes);
00032   void GetDayState(NMHDR *pHdr, LRESULT *pRes);
00033   CMonthCalPage();
00034   ~CMonthCalPage();
00035   CMonthCalCtrl m_MonthCal;
00036 // Dialog Data
00037   //{{AFX_DATA(CMonthCalPage)
00038   enum { IDD = IDD_MONTHCAL };
00039   CEdit   m_edMaxSel;
00040   CListBox    m_NotifyList;
00041   UINT    m_nMaxSelCount;
00042   CString m_pszRange;
00043   CString m_pszSelection;
00044   BOOL    m_bDayState;
00045   BOOL    m_bNoToday;
00046   BOOL    m_bNoTodayCircle;
00047   BOOL    m_bWeekNumbers;
00048   BOOL    m_bMultiSelect;
00049   //}}AFX_DATA
00050
00051
00052 // Overrides
00053   // ClassWizard generate virtual function overrides
00054   //{{AFX_VIRTUAL(CMonthCalPage)
00055   protected:
00056   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00057   //}}AFX_VIRTUAL
00058
00059 // Implementation
00060 protected:
00061   // Generated message map functions
00062   //{{AFX_MSG(CMonthCalPage)
00063   virtual BOOL OnInitDialog();
00064   afx_msg void OnCknotoday();
00065   afx_msg void OnCknotodaycircle();
00066   afx_msg void OnCkweeknumbers();
00067   afx_msg void OnCmultiselect();
00068   afx_msg void OnChangeEdselrange();
00069   afx_msg void OnCkdaystate();
00070   //}}AFX_MSG
00071   DECLARE_MESSAGE_MAP()
00072
00073 };
00074
00075 //{{AFX_INSERT_LOCATION}}
00076 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00077
00078 #endif // !defined(AFX_MONTHCALPAGE_H__39010223_ECB6_11D0_8FEA_00A0C9034892__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemo.h Source File

  • vc2008fp
  • MDITabsDemo

MDITabsDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 class CMDITabOptions
00020 {
00021 public:
00022   CMDITabOptions();
00023
00024   enum MDITabsType
00025   {
00026     None,
00027     MDITabsStandard,
00028     MDITabbedGroups
00029   };
00030
00031
00032   MDITabsType     m_nMDITabsType;
00033   BOOL        m_bTabsOnTop;
00034   BOOL        m_bActiveTabCloseButton;
00035   CMFCTabCtrl::Style  m_nTabsStyle;
00036   BOOL        m_bTabsAutoColor;
00037   BOOL        m_bMDITabsIcons;
00038   BOOL        m_bMDITabsDocMenu;
00039   BOOL        m_bDragMDITabs;
00040   BOOL        m_bMDITabsContextMenu;
00041   int         m_nMDITabsBorderSize;
00042   BOOL        m_bDisableMDIChildRedraw;
00043   BOOL        m_bFlatFrame;
00044   BOOL        m_bCustomTooltips;
00045
00046   void Load ();
00047   void Save ();
00048
00049   BOOL IsMDITabsDisabled () const {return m_nMDITabsType == CMDITabOptions::None;}
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CMDITabsDemoApp:
00054 // See MDITabsDemo.cpp for the implementation of this class
00055 //
00056
00057 class CMDITabsDemoApp : public CWinAppEx
00058 {
00059 public:
00060   CMDITabsDemoApp();
00061
00062   virtual void PreLoadState ();
00063
00064   void UpdateMDITabs (BOOL bResetMDIChild);
00065
00066   CMDITabOptions  m_Options;
00067
00068 // Overrides
00069   public:
00070   virtual BOOL InitInstance();
00071   virtual int ExitInstance();
00072
00073 // Implementation
00074   afx_msg void OnAppAbout();
00075
00076   DECLARE_MESSAGE_MAP()
00077 };
00078
00079
00080 extern CMDITabsDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/WorkspaceBar.cpp Source File

  • vc2008fp
  • MDITabsDemo

WorkspaceBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MDITabsDemo.h"
00013 #include "WorkspaceBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 #pragma warning(disable: 4800)  // 'LPCVARIANT' : forcing value to bool 'true' or 'false' (performance warning)
00022
00023 const int nBorderSize = 1;
00024
00025 static TCHAR* lpszMDITabsStyles [] =
00026 {
00027   _T("None"),
00028   _T("MDI Tabs (Standard)"),
00029   _T("MDI Tabbed Groups"),
00030   NULL
00031 };
00032
00033
00034 static TCHAR* lpszStyles [] =
00035 {
00036   _T("3D Tabs"),
00037   _T("OneNote"),
00038   _T("Visual Studio 2005"),
00039   NULL
00040 };
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CWorkspaceBar
00044
00045 BEGIN_MESSAGE_MAP(CWorkspaceBar, CDockablePane)
00046   ON_WM_CREATE()
00047   ON_WM_SIZE()
00048   ON_WM_PAINT()
00049   ON_REGISTERED_MESSAGE(AFX_WM_PROPERTY_CHANGED, OnPropertyChanged)
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CWorkspaceBar construction/destruction
00054
00055 CWorkspaceBar::CWorkspaceBar()
00056 {
00057   // TODO: add one-time construction code here
00058
00059 }
00060
00061 CWorkspaceBar::~CWorkspaceBar()
00062 {
00063 }
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CWorkspaceBar message handlers
00067
00068 int CWorkspaceBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00069 {
00070   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00071     return -1;
00072
00073   CRect rectDummy;
00074   rectDummy.SetRectEmpty ();
00075
00076   if (!m_wndPropList.Create (WS_VISIBLE | WS_CHILD, rectDummy, this, 1))
00077   {
00078     TRACE0("Failed to create Properies Grid \n");
00079     return -1;      // fail to create
00080   }
00081
00082   m_wndPropList.EnableHeaderCtrl (FALSE);
00083   m_wndPropList.EnableDescriptionArea ();
00084   m_wndPropList.SetVSDotNetLook ();
00085
00086   CMFCPropertyGridProperty* pMDITabsProp = new CMFCPropertyGridProperty (_T("Enable MDI Tabs"),
00087     lpszMDITabsStyles [1],
00088     _T("Enable or disable either the standard MDI Tabs feature, or MDI Tabbed Groups feature"),
00089     idShowMDITabs);
00090
00091   pMDITabsProp->AddOption (_T ("None"));
00092   pMDITabsProp->AddOption (_T ("MDI Tabs (Standard)"));
00093   pMDITabsProp->AddOption (_T ("MDI Tabbed Groups"));
00094
00095   int i = 0;
00096   for (i = 0; lpszMDITabsStyles [i] != NULL; i++)
00097   {
00098     pMDITabsProp->AddOption (lpszMDITabsStyles [i]);
00099   }
00100
00101   switch (theApp.m_Options.m_nMDITabsType)
00102   {
00103   case CMDITabOptions::None:
00104     pMDITabsProp->SetValue (lpszMDITabsStyles [0]);
00105     break;
00106
00107   case CMDITabOptions::MDITabsStandard:
00108     pMDITabsProp->SetValue (lpszMDITabsStyles [1]);
00109     break;
00110
00111   case CMDITabOptions::MDITabbedGroups:
00112     pMDITabsProp->SetValue (lpszMDITabsStyles [2]);
00113     break;
00114   }
00115
00116   pMDITabsProp->AllowEdit (FALSE);
00117
00118   m_wndPropList.AddProperty (pMDITabsProp);
00119
00120   COleVariant varTabsOnTop((short)(theApp.m_Options.m_bTabsOnTop == TRUE), VT_BOOL);
00121   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tabs on top"), varTabsOnTop,
00122     _T("Show MDI tabs on top"), idTabsOnTop));
00123
00124   COleVariant varActiveTabCloseButton((short)(theApp.m_Options.m_bActiveTabCloseButton == TRUE), VT_BOOL);
00125   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Active tab \"Close\" button"), varActiveTabCloseButton,
00126     _T("Show \"Close\" button on the active tab right side"), idActiveTabCloseButton));
00127
00128   CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty (_T("MDI Tabs style"), _T(""),
00129     _T("One of: VS.NET, OneNote or Visual Studio 2005"), idTabsStyle);
00130
00131   for (i = 0; lpszStyles [i] != NULL; i++)
00132   {
00133     pProp->AddOption (lpszStyles [i]);
00134   }
00135
00136   switch (theApp.m_Options.m_nTabsStyle)
00137   {
00138   case CMFCTabCtrl::STYLE_3D_SCROLLED:
00139     pProp->SetValue (lpszStyles [0]);
00140     break;
00141
00142   case CMFCTabCtrl::STYLE_3D_ONENOTE:
00143     pProp->SetValue (lpszStyles [1]);
00144     break;
00145
00146   case CMFCTabCtrl::STYLE_3D_VS2005:
00147     pProp->SetValue (lpszStyles [2]);
00148     break;
00149   }
00150
00151   pProp->AllowEdit (FALSE);
00152   m_wndPropList.AddProperty (pProp);
00153
00154   COleVariant varTabsAutoColor((short)(theApp.m_Options.m_bTabsAutoColor == TRUE), VT_BOOL);
00155   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tabs auto-color"), varTabsAutoColor,
00156     _T("Set MDI tabs automatic color"), idTabsAutoColor));
00157
00158   COleVariant varMDITabsIcons((short)(theApp.m_Options.m_bMDITabsIcons == TRUE), VT_BOOL);
00159   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tab icons"), varMDITabsIcons,
00160     _T("Show document icons on MDI tabs"), idMDITabsIcons));
00161
00162   COleVariant varMDITabsDocMenu((short)(theApp.m_Options.m_bMDITabsDocMenu == TRUE), VT_BOOL);
00163   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Tabs document menu"), varMDITabsDocMenu,
00164     _T("Show menu with a list of opened documents"), idMDITabsDocMenu));
00165
00166   COleVariant varDragMDITabs((short)(theApp.m_Options.m_bDragMDITabs == TRUE), VT_BOOL);
00167   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Drag tabs"), varDragMDITabs,
00168     _T("Enable MDI tabs order changing"), idDragMDITabs));
00169
00170   COleVariant varMDITabsContextMenu((short)(theApp.m_Options.m_bMDITabsContextMenu == TRUE), VT_BOOL);
00171   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Context Menu"), varMDITabsContextMenu,
00172     _T("Enable MDI tabs context menu"), idMDITabsContextMenu));
00173
00174   CMFCPropertyGridProperty* pBorderProp = new CMFCPropertyGridProperty (_T("Border Size"),
00175     (COleVariant) ((short) theApp.m_Options.m_nMDITabsBorderSize),
00176     _T("Set MDI border"), idMDITabsBorderSize);
00177   pBorderProp->EnableSpinControl (TRUE, 0, 10);
00178   pBorderProp->AllowEdit(FALSE);
00179
00180   m_wndPropList.AddProperty (pBorderProp);
00181
00182   COleVariant varDisableMDIChildRedraw((short)(theApp.m_Options.m_bDisableMDIChildRedraw == TRUE), VT_BOOL);
00183   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("No optimize MDI child redraw"), varDisableMDIChildRedraw,
00184     _T("Disable MDI Child redraw optimization"), idDisableMDIChildRedraw));
00185
00186   COleVariant varFlatFrame((short)(theApp.m_Options.m_bFlatFrame == TRUE), VT_BOOL);
00187   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Flat Frame"), varFlatFrame,
00188     _T("Enable or disable 3D frame around MDI client area"), idFlatFrame));
00189
00190   COleVariant varCustomTooltips((short)(theApp.m_Options.m_bCustomTooltips == TRUE), VT_BOOL);
00191   m_wndPropList.AddProperty (new CMFCPropertyGridProperty (_T("Custom Tooltips"), varCustomTooltips,
00192     _T("Enable MDI tabs custom tooltips"), idCustomTooltips));
00193
00194   SetPropState ();
00195   return 0;
00196 }
00197
00198 void CWorkspaceBar::OnSize(UINT nType, int cx, int cy)
00199 {
00200   CDockablePane::OnSize(nType, cx, cy);
00201
00202   // Tab control should cover a whole client area:
00203   m_wndPropList.SetWindowPos (NULL, nBorderSize, nBorderSize,
00204     cx - 2 * nBorderSize, cy - 2 * nBorderSize,
00205     SWP_NOACTIVATE | SWP_NOZORDER);
00206 }
00207
00208 void CWorkspaceBar::OnPaint()
00209 {
00210   CPaintDC dc(this); // device context for painting
00211
00212   CRect rectTree;
00213   m_wndPropList.GetWindowRect (rectTree);
00214   ScreenToClient (rectTree);
00215
00216   rectTree.InflateRect (nBorderSize, nBorderSize);
00217   dc.Draw3dRect (rectTree,  ::GetSysColor (COLOR_3DSHADOW),
00218                 ::GetSysColor (COLOR_3DSHADOW));
00219 }
00220
00221 LRESULT CWorkspaceBar::OnPropertyChanged (WPARAM,LPARAM lParam)
00222 {
00223   CMFCPropertyGridProperty* pProp = (CMFCPropertyGridProperty*) lParam;
00224
00225   BOOL bResetMDIChild = FALSE;
00226
00227   switch ((int) pProp->GetData ())
00228   {
00229   case idShowMDITabs:
00230     {
00231       CString strShowMdiTabOption = (LPCTSTR) (_bstr_t)pProp->GetValue ();
00232       bResetMDIChild = TRUE;
00233
00234       for (int i = 0; lpszMDITabsStyles [i] != NULL; i++)
00235       {
00236         if (strShowMdiTabOption == lpszMDITabsStyles [i])
00237         {
00238           switch (i)
00239           {
00240           case 0:
00241             theApp.m_Options.m_nMDITabsType = CMDITabOptions::None;
00242             break;
00243
00244           case 1:
00245             theApp.m_Options.m_nMDITabsType = CMDITabOptions::MDITabsStandard;
00246             break;
00247
00248           case 2:
00249             theApp.m_Options.m_nMDITabsType = CMDITabOptions::MDITabbedGroups;
00250             break;
00251           }
00252           break;
00253         }
00254       }
00255
00256       SetPropState ();
00257     }
00258     break;
00259
00260   case idTabsOnTop:
00261     theApp.m_Options.m_bTabsOnTop = pProp->GetValue().boolVal == VARIANT_TRUE;
00262     break;
00263
00264   case idActiveTabCloseButton:
00265     theApp.m_Options.m_bActiveTabCloseButton = pProp->GetValue().boolVal == VARIANT_TRUE;
00266     break;
00267
00268   case idTabsStyle:
00269     {
00270       CString strStyle = (LPCTSTR) (_bstr_t)pProp->GetValue ();
00271
00272       for (int i = 0; lpszStyles [i] != NULL; i++)
00273       {
00274         if (strStyle == lpszStyles [i])
00275         {
00276           switch (i)
00277           {
00278           case 0:
00279             theApp.m_Options.m_nTabsStyle = CMFCTabCtrl::STYLE_3D_SCROLLED;
00280             break;
00281
00282           case 1:
00283             theApp.m_Options.m_nTabsStyle = CMFCTabCtrl::STYLE_3D_ONENOTE;
00284             break;
00285
00286           case 2:
00287             theApp.m_Options.m_nTabsStyle = CMFCTabCtrl::STYLE_3D_VS2005;
00288             break;
00289           }
00290           break;
00291         }
00292       }
00293     }
00294     break;
00295
00296   case idTabsAutoColor:
00297     theApp.m_Options.m_bTabsAutoColor = pProp->GetValue().boolVal == VARIANT_TRUE;
00298     break;
00299
00300   case idMDITabsIcons:
00301     theApp.m_Options.m_bMDITabsIcons = pProp->GetValue().boolVal == VARIANT_TRUE;
00302     break;
00303
00304   case idMDITabsDocMenu:
00305     theApp.m_Options.m_bMDITabsDocMenu = pProp->GetValue().boolVal == VARIANT_TRUE;
00306     break;
00307
00308   case idDragMDITabs:
00309     theApp.m_Options.m_bDragMDITabs = pProp->GetValue().boolVal == VARIANT_TRUE;
00310     break;
00311
00312   case idMDITabsContextMenu:
00313     theApp.m_Options.m_bMDITabsContextMenu = pProp->GetValue().boolVal == VARIANT_TRUE;
00314     break;
00315
00316   case idMDITabsBorderSize:
00317     {
00318       int nBorder = pProp->GetValue ().iVal;
00319       theApp.m_Options.m_nMDITabsBorderSize = min (10, max (0, nBorder));
00320     }
00321     break;
00322
00323   case idDisableMDIChildRedraw:
00324     theApp.m_Options.m_bDisableMDIChildRedraw = pProp->GetValue().boolVal == VARIANT_TRUE;
00325     break;
00326
00327   case idFlatFrame:
00328     theApp.m_Options.m_bFlatFrame = pProp->GetValue().boolVal == VARIANT_TRUE;
00329     break;
00330
00331   case idCustomTooltips:
00332     theApp.m_Options.m_bCustomTooltips = pProp->GetValue().boolVal == VARIANT_TRUE;
00333     break;
00334   }
00335
00336   theApp.UpdateMDITabs (bResetMDIChild);
00337   return 0;
00338 }
00339
00340 void CWorkspaceBar::SetPropState ()
00341 {
00342   for (int i = 0; i < m_wndPropList.GetPropertyCount (); i++)
00343   {
00344     CMFCPropertyGridProperty* pProp = m_wndPropList.GetProperty (i);
00345     ASSERT_VALID (pProp);
00346
00347     if ((int) pProp->GetData () != idShowMDITabs)
00348     {
00349       pProp->Enable (theApp.m_Options.m_nMDITabsType != CMDITabOptions::None);
00350     }
00351   }
00352
00353   if (m_wndPropList.GetSafeHwnd () != NULL)
00354   {
00355     m_wndPropList.RedrawWindow ();
00356   }
00357 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/stdafx.cpp Source File

  • controls
  • spindial

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CToolbarDateTimePickerDoc Member List

This is the complete list of members for CToolbarDateTimePickerDoc, including all inherited members.
CToolbarDateTimePickerDoc() | CToolbarDateTimePickerDoc | [protected]
OnNewDocument() | CToolbarDateTimePickerDoc | [virtual]
Serialize(CArchive &ar) | CToolbarDateTimePickerDoc | [virtual]
~CToolbarDateTimePickerDoc() | CToolbarDateTimePickerDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ComCatDg.Cpp Source File

  • ole
  • TstCon

ComCatDg.Cpp

Go to the documentation of this file.
00001 // ComponentCategoriesDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CComponentCategoriesDlg dialog
00022
00023
00024 CComponentCategoriesDlg::CComponentCategoriesDlg( UINT idCaption,
00025    CWnd* pParent ) :
00026    CDialog( CComponentCategoriesDlg::IDD, pParent ),
00027    m_idCaption( idCaption )
00028 {
00029   //{{AFX_DATA_INIT(CComponentCategoriesDlg)
00030     // NOTE: the ClassWizard will add member initialization here
00031   //}}AFX_DATA_INIT
00032 }
00033
00034
00035 void CComponentCategoriesDlg::DoDataExchange(CDataExchange* pDX)
00036 {
00037    int iItem;
00038    int iCategory;
00039    POSITION posSelectedCategory;
00040    CATID catid;
00041
00042   CDialog::DoDataExchange(pDX);
00043   //{{AFX_DATA_MAP(CComponentCategoriesDlg)
00044   DDX_Control(pDX, IDC_CATEGORIES, m_lbCategories);
00045   //}}AFX_DATA_MAP
00046
00047    if( pDX->m_bSaveAndValidate )
00048    {
00049     m_lSelectedCategories.RemoveAll();
00050     for( iItem = 0; iItem < m_lbCategories.GetCount(); iItem++ )
00051     {
00052      if( m_lbCategories.GetCheck( iItem ) )
00053      {
00054       iCategory = (int)m_lbCategories.GetItemData( iItem );
00055       m_lSelectedCategories.AddTail( m_aAvailableCategories[iCategory] );
00056      }
00057     }
00058    }
00059    else
00060    {
00061     posSelectedCategory = m_lSelectedCategories.GetHeadPosition();
00062     while( posSelectedCategory != NULL )
00063     {
00064      catid = m_lSelectedCategories.GetNext( posSelectedCategory );
00065      iCategory = 0;
00066      while( (iCategory < m_aAvailableCategories.GetSize()) && !IsEqualGUID(
00067       m_aAvailableCategories[iCategory], catid ) )
00068      {
00069       iCategory++;
00070      }
00071      if( iCategory < m_aAvailableCategories.GetSize() )
00072      {
00073       // We found the category
00074       iItem = 0;
00075       while( int( m_lbCategories.GetItemData( iItem ) ) != iCategory )
00076       {
00077          iItem++;
00078          ASSERT( iItem < m_lbCategories.GetCount() );
00079       }
00080       m_lbCategories.SetCheck( iItem, 1 );
00081      }
00082     }
00083    }
00084 }
00085
00086
00087 BEGIN_MESSAGE_MAP(CComponentCategoriesDlg, CDialog)
00088   //{{AFX_MSG_MAP(CComponentCategoriesDlg)
00089   ON_BN_CLICKED(IDC_SELECTALL, OnSelectAll)
00090   ON_WM_HELPINFO()
00091   ON_WM_CONTEXTMENU()
00092   //}}AFX_MSG_MAP
00093 END_MESSAGE_MAP()
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CComponentCategoriesDlg message handlers
00097
00098 BOOL CComponentCategoriesDlg::OnInitDialog()
00099 {
00100    IEnumCATEGORYINFOPtr pEnum;
00101    HRESULT hResult;
00102    BOOL tDone;
00103    CATEGORYINFO info;
00104    CString strCategory;
00105    CString strCaption;
00106    int iItem;
00107    int iCategory;
00108
00109   CDialog::OnInitDialog();
00110
00111    LOAD_STRING_FROM_RESOURCE( strCaption, m_idCaption );
00112    SetWindowText( strCaption );
00113
00114    hResult = m_pCatInfo.CreateInstance( CLSID_StdComponentCategoriesMgr, NULL,
00115     CLSCTX_INPROC_SERVER );
00116    if( FAILED( hResult ) )
00117    {
00118     TRACE( "Failed to create category manager.\n" );
00119     return( TRUE );
00120    }
00121
00122    LOAD_STRING_FROM_RESOURCE( strCaption, m_idCaption );
00123    SetWindowText( strCaption );
00124
00125    hResult = m_pCatInfo->EnumCategories( GetUserDefaultLCID(), &pEnum );
00126    if( FAILED( hResult ) )
00127    {
00128     TRACE( "Failed to enumerate categories.\n" );
00129     return( TRUE );
00130    }
00131
00132    tDone = FALSE;
00133    while( !tDone )
00134    {
00135     hResult = pEnum->Next( 1, &info, NULL );
00136     if( hResult == S_OK )
00137     {
00138      strCategory = info.szDescription;
00139      iItem = m_lbCategories.AddString( strCategory );
00140      iCategory = (int)m_aAvailableCategories.Add( info.catid );
00141      m_lbCategories.SetItemData( iItem, iCategory );
00142     }
00143     else
00144     {
00145      tDone = TRUE;
00146     }
00147    }
00148
00149    UpdateData( FALSE );
00150
00151   return( TRUE );
00152 }
00153
00154 void CComponentCategoriesDlg::OnSelectAll()
00155 {
00156    m_lbCategories.SelItemRange( TRUE, 0, m_lbCategories.GetCount() );
00157 }
00158
00159 static DWORD rgmapCHID[] =
00160 {
00161    IDC_CATEGORIES, HIDC_CATEGORIES,
00162    IDC_SELECTALL, HIDC_SELECTALL,
00163    0, 0
00164 };
00165
00166 BOOL CComponentCategoriesDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00167 {
00168   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00169   strPath += _T("::/popups.txt");
00170
00171   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00172 }
00173
00174 void CComponentCategoriesDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00175 {
00176   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00177   strPath += _T("::/popups.txt");
00178
00179   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00180 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuView.h Source File

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenuView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class COwnerDrawMenuView : public CView
00014 {
00015 protected: // create from serialization only
00016   COwnerDrawMenuView();
00017   DECLARE_DYNCREATE(COwnerDrawMenuView)
00018
00019 // Attributes
00020 public:
00021   COwnerDrawMenuDoc* GetDocument();
00022
00023 protected:
00024   UINT m_uiLineStyleCmd;
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   public:
00031   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00032   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00033   protected:
00034   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00035   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00036   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00037
00038 // Implementation
00039 public:
00040   virtual ~COwnerDrawMenuView();
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:
00047   afx_msg void OnMoreLines();
00048   afx_msg void OnContextMenu(CWnd*, CPoint point);
00049   afx_msg void OnFilePrintPreview();
00050   afx_msg void OnLineStyle(UINT uiCmd);
00051   afx_msg void OnUpdateLineStyle(CCmdUI* pCmdUI);
00052
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
00056 #ifndef _DEBUG  // debug version in OwnerDrawMenuView.cpp
00057 inline COwnerDrawMenuDoc* COwnerDrawMenuView::GetDocument()
00058    { return (COwnerDrawMenuDoc*)m_pDocument; }
00059 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPage6 Member List

This is the complete list of members for CPage6, including all inherited members.
CPage6() | CPage6 |
DoDataExchange(CDataExchange *pDX) | CPage6 | [protected, virtual]
IDD enum value | CPage6 |
m_strSelectedFolder | CPage6 |
m_ulChangeIconNotifyID | CPage6 | [protected]
m_wbdShellTree | CPage6 |
m_wndShellList | CPage6 |
OnChangeSystemIcon(WPARAM wParam, LPARAM lParam) | CPage6 | [protected]
OnDestroy() | CPage6 |
OnInitDialog() | CPage6 | [protected, virtual]
OnSelectFolder() | CPage6 | [protected]
~CPage6() | CPage6 |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPasswordProp Member List

This is the complete list of members for CPasswordProp, including all inherited members.
CPasswordProp(const CString &strName, const CString &strPassword, LPCTSTR lpszDescr=NULL, DWORD dwData=0) | CPasswordProp |
CreateInPlaceEdit(CRect rectEdit, BOOL &bDefaultFormat) | CPasswordProp | [protected, virtual]
FormatProperty() | CPasswordProp | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/NewControls.cpp Source File

  • vc2008fp
  • NewControls

NewControls.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include <locale.h>
00012 #include "NewControls.h"
00013 #include "NewControlsPropSheet.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00022   //{{AFX_MSG_MAP(CAboutDlg)
00023     // No message handlers
00024   //}}AFX_MSG_MAP
00025 END_MESSAGE_MAP()
00026
00027 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00028 {
00029   //{{AFX_DATA_INIT(CAboutDlg)
00030   //}}AFX_DATA_INIT
00031 }
00032
00033 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00034 {
00035   CDialog::DoDataExchange(pDX);
00036   //{{AFX_DATA_MAP(CAboutDlg)
00037   //}}AFX_DATA_MAP
00038 }
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CNewControlsApp
00042
00043 BEGIN_MESSAGE_MAP(CNewControlsApp, CWinAppEx)
00044   ON_COMMAND(ID_HELP, CWinAppEx::OnHelp)
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CNewControlsApp construction
00049
00050 CNewControlsApp::CNewControlsApp()
00051 {
00052 }
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // The one and only CNewControlsApp object
00056
00057 CNewControlsApp theApp;
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CNewControlsApp initialization
00061
00062 BOOL CNewControlsApp::InitInstance()
00063 {
00064   AfxEnableControlContainer();
00065   AfxOleInit();
00066
00067   // Standard initialization
00068   // If you are not using these features and wish to reduce the size
00069   //  of your final executable, you should remove from the following
00070   //  the specific initialization routines you do not need.
00071
00072   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00073   SetRegistryBase(_T("Settings"));
00074
00075   InitCommonControls();
00076   InitContextMenuManager();
00077   InitShellManager();
00078
00079   CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
00080   CMFCButton::EnableWindowsTheming();
00081
00082   NewControlsPropSheet *pPropSheet = new NewControlsPropSheet;
00083   m_pMainWnd = pPropSheet;
00084   pPropSheet->DoModal();
00085
00086   delete pPropSheet;
00087
00088   // Since the dialog has been closed, return FALSE so that we exit the
00089   //  application, rather than start the application's message pump.
00090   return FALSE;
00091 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/ListHdr.cpp Source File

  • general
  • ListHdr

ListHdr.cpp

Go to the documentation of this file.
00001 // ListHdr.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ListHdr.h"
00014 #include "LHdrDlg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CListHdrApp
00024
00025 BEGIN_MESSAGE_MAP(CListHdrApp, CWinApp)
00026   //{{AFX_MSG_MAP(CListHdrApp)
00027   //}}AFX_MSG
00028   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CListHdrApp construction
00033
00034 CListHdrApp::CListHdrApp()
00035 {
00036 }
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // The one and only CListHdrApp object
00040
00041 CListHdrApp theApp;
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CListHdrApp initialization
00045
00046 BOOL CListHdrApp::InitInstance()
00047 {
00048   AfxEnableControlContainer();
00049
00050   // Standard initialization
00051   CListHdrDlg dlg;
00052   m_pMainWnd = &dlg;
00053
00054   // Bring up modal dialog
00055   dlg.DoModal();
00056
00057   // Since the dialog has been closed, return FALSE so that we exit the
00058   //  application, rather than start the application's message pump.
00059   return FALSE;
00060 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/Slider.cpp Source File

  • vc2008fp
  • Slider

Slider.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Slider.h"
00013
00014 #include "MainFrm.h"
00015 #include "SliderDoc.h"
00016 #include "SliderView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CSliderApp
00026
00027 BEGIN_MESSAGE_MAP(CSliderApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CSliderApp construction
00038
00039 CSliderApp::CSliderApp()
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CSliderApp object
00047
00048 CSliderApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CSliderApp initialization
00052
00053 BOOL CSliderApp::InitInstance()
00054 {
00055   // Initialize OLE libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   AfxEnableControlContainer();
00063
00064   // Standard initialization
00065   // If you are not using these features and wish to reduce the size
00066   //  of your final executable, you should remove from the following
00067   //  the specific initialization routines you do not need.
00068
00069   // Change the registry key under which our settings are stored.
00070   // TODO: You should modify this string to be something appropriate
00071   // such as the name of your company or organization.
00072   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   SetRegistryBase (_T("Settings"));
00077
00078   // Initialize all Managers for usage. They are automatically constructed
00079   // if not yet present
00080   // Register the application's document templates.  Document templates
00081   //  serve as the connection between documents, frame windows and views.
00082
00083   CSingleDocTemplate* pDocTemplate;
00084   pDocTemplate = new CSingleDocTemplate(
00085     IDR_MAINFRAME,
00086     RUNTIME_CLASS(CSliderDoc),
00087     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00088     RUNTIME_CLASS(CSliderView));
00089   AddDocTemplate(pDocTemplate);
00090
00091   // Parse command line for standard shell commands, DDE, file open
00092   CCommandLineInfo cmdInfo;
00093   ParseCommandLine(cmdInfo);
00094
00095   // Dispatch commands specified on the command line
00096   if (!ProcessShellCommand(cmdInfo))
00097     return FALSE;
00098
00099   // The one and only window has been initialized, so show and update it.
00100   m_pMainWnd->ShowWindow(SW_SHOW);
00101   m_pMainWnd->UpdateWindow();
00102
00103   return TRUE;
00104 }
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CSliderApp message handlers
00108
00109 int CSliderApp::ExitInstance()
00110 {
00111   return CWinAppEx::ExitInstance();
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CAboutDlg dialog used for App About
00116
00117 class CAboutDlg : public CDialog
00118 {
00119 public:
00120   CAboutDlg();
00121
00122 // Dialog Data
00123   //{{AFX_DATA(CAboutDlg)
00124   enum { IDD = IDD_ABOUTBOX };
00125   //}}AFX_DATA
00126
00127   // ClassWizard generated virtual function overrides
00128   //{{AFX_VIRTUAL(CAboutDlg)
00129   protected:
00130   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00131   //}}AFX_VIRTUAL
00132
00133 // Implementation
00134 protected:
00135   //{{AFX_MSG(CAboutDlg)
00136     // No message handlers
00137   //}}AFX_MSG
00138   DECLARE_MESSAGE_MAP()
00139 };
00140
00141 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00142 {
00143   //{{AFX_DATA_INIT(CAboutDlg)
00144   //}}AFX_DATA_INIT
00145 }
00146
00147 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00148 {
00149   CDialog::DoDataExchange(pDX);
00150   //{{AFX_DATA_MAP(CAboutDlg)
00151   //}}AFX_DATA_MAP
00152 }
00153
00154 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00155   //{{AFX_MSG_MAP(CAboutDlg)
00156     // No message handlers
00157   //}}AFX_MSG_MAP
00158 END_MESSAGE_MAP()
00159
00160 // App command to run the dialog
00161 void CSliderApp::OnAppAbout()
00162 {
00163   CAboutDlg aboutDlg;
00164   aboutDlg.DoModal();
00165 }
00166
00167 /////////////////////////////////////////////////////////////////////////////
00168 // CSliderApp message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/time.h Source File

  • controls
  • time

time.h

Go to the documentation of this file.
00001 // time.h : main header file for TIME.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #if !defined( __AFXCTL_H__ )
00014   #error include 'afxctl.h' before including this file
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTimeApp : See time.cpp for implementation.
00021
00022 class CTimeApp : public COleControlModule
00023 {
00024 public:
00025   BOOL InitInstance();
00026   int ExitInstance();
00027 };
00028
00029 extern const GUID CDECL _tlid;
00030 extern const WORD _wVerMajor;
00031 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagVS_VERSION Member List

This is the complete list of members for tagVS_VERSION, including all inherited members.
szSig | tagVS_VERSION
vffInfo | tagVS_VERSION
wTotLen | tagVS_VERSION
wValLen | tagVS_VERSION
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/inputvw.h Source File

  • general
  • viewex

inputvw.h

Go to the documentation of this file.
00001 // inputvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CInputView form view
00014
00015 class CInputView : public CFormView
00016 {
00017   DECLARE_DYNCREATE(CInputView)
00018 protected:
00019   CInputView();           // protected constructor used by dynamic creation
00020
00021 // Form Data
00022 public:
00023   //{{AFX_DATA(CInputView)
00024   enum { IDD = IDD_INPUTFORM };
00025   CString m_strData;
00026   int     m_iColor;
00027   //}}AFX_DATA
00028
00029 // Attributes
00030 public:
00031   CMainDoc* GetDocument()
00032       {
00033         ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
00034         return (CMainDoc*) m_pDocument;
00035       }
00036
00037 // Operations
00038 public:
00039
00040 // Implementation
00041 protected:
00042   virtual ~CInputView();
00043   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00044   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00045
00046   // Generated message map functions
00047   //{{AFX_MSG(CInputView)
00048   afx_msg void OnDataChange();
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMMXUnsigned16Saturated Member List

This is the complete list of members for CMMXUnsigned16Saturated, including all inherited members.
AndNot(const CMMXUnsigned16Saturated &m) | CMMXUnsigned16Saturated | [inline]
Clear() | CMMXUnsigned16Saturated | [inline]
CMMXUnsigned16Saturated() | CMMXUnsigned16Saturated | [inline]
CMMXUnsigned16Saturated(DWORD dw) | CMMXUnsigned16Saturated | [inline]
CMMXUnsigned16Saturated(__m64 m64) | CMMXUnsigned16Saturated | [inline]
CMMXUnsigned16Saturated(ULONGLONG qw) | CMMXUnsigned16Saturated | [inline]
m_m64 | CMMXUnsigned16Saturated |
operator __m64() const | CMMXUnsigned16Saturated | [inline]
operator ULONGLONG() const | CMMXUnsigned16Saturated | [inline]
operator&=(const CMMXUnsigned16Saturated &m) | CMMXUnsigned16Saturated | [inline]
operator+=(const CMMXUnsigned16Saturated &m) | CMMXUnsigned16Saturated | [inline]
operator-=(const CMMXUnsigned16Saturated &m) | CMMXUnsigned16Saturated | [inline]
operator<<=(int nBits) | CMMXUnsigned16Saturated | [inline]
operator=(DWORD dw) | CMMXUnsigned16Saturated | [inline]
operator=(const CMMXUnsigned16Saturated &m) | CMMXUnsigned16Saturated | [inline]
operator=(ULONGLONG qw) | CMMXUnsigned16Saturated | [inline]
operator>>=(int nBits) | CMMXUnsigned16Saturated | [inline]
operator|=(const CMMXUnsigned16Saturated &m) | CMMXUnsigned16Saturated | [inline]
PackBytes() const | CMMXUnsigned16Saturated | [inline]
PackBytes(const CMMXUnsigned16Saturated &mUpper) const | CMMXUnsigned16Saturated | [inline]
UnpackBytes(CMMXUnsigned16Saturated &mmLeft) | CMMXUnsigned16Saturated | [inline]
UnpackBytesHi(DWORD dw) | CMMXUnsigned16Saturated | [inline]
UnpackBytesLo(DWORD dw) | CMMXUnsigned16Saturated | [inline]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPreviewPane Member List

This is the complete list of members for CPreviewPane, including all inherited members.
CPreviewPane() | CPreviewPane | [protected]
OnDraw(CDC *pDC) | CPreviewPane | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CPreviewPane | [protected]
~CPreviewPane() | CPreviewPane | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistctl.h Source File

  • controls
  • xlist

xlistctl.h

Go to the documentation of this file.
00001 // xlistctl.h : Declaration of the CXlistCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 ///////////////////////////////////////////////////////////////////////////
00015 // CItemData : See xlistctl.cpp for implementation.
00016
00017 class CItemData : public CObject
00018 {
00019 public:
00020
00021 // Constructor/destructor
00022
00023   CItemData(const TCHAR *pstrText, LPFONTDISP lpFontDisp, LPPICTUREDISP lpPicDisp);
00024   ~CItemData();
00025
00026  // Implementation
00027
00028   OLE_COLOR *GetBackColor();
00029   void SetBackColor(OLE_COLOR *newValue);
00030   OLE_COLOR *GetForeColor();
00031   void SetForeColor(OLE_COLOR *newValue);
00032   void GetText(LPTSTR buffer, short szBuffer);
00033   void SetText(const TCHAR *newValue);
00034   CFontHolder *GetFont();
00035   void SetFont(LPFONTDISP newValue);
00036   CPictureHolder *GetPicture();
00037   void SetPicture(LPPICTUREDISP newValue);
00038
00039 protected:
00040   OLE_COLOR *pBack;
00041   OLE_COLOR *pFore;
00042   CString *pText;
00043   CFontHolder *pFontHolder;
00044   CPictureHolder *pPicHolder;
00045 };
00046
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CXlistCtrl : See xlistctl.cpp for implementation.
00050
00051 class CXlistCtrl : public COleControl
00052 {
00053   DECLARE_DYNCREATE(CXlistCtrl)
00054
00055 // Constructor
00056 public:
00057   CXlistCtrl();
00058
00059 // Overrides
00060
00061   // Drawing function
00062   virtual void OnDraw(
00063         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00064
00065   // Persistence
00066   virtual void DoPropExchange(CPropExchange* pPX);
00067
00068   // Reset control state
00069   virtual void OnResetState();
00070
00071   // Notification of extended object available
00072   virtual void OnSetClientSite();
00073
00074 // Implementation
00075 public:
00076   virtual BOOL PreTranslateMessage(MSG* pMsg);
00077 protected:
00078   ~CXlistCtrl();
00079
00080   DECLARE_OLECREATE_EX(CXlistCtrl)    // Class factory and guid
00081   DECLARE_OLETYPELIB(CXlistCtrl)      // GetTypeInfo
00082   DECLARE_PROPPAGEIDS(CXlistCtrl)     // Property page IDs
00083   DECLARE_OLECTLTYPE(CXlistCtrl)      // Type name and misc status
00084
00085   // Subclassed control support
00086   BOOL PreCreateWindow(CREATESTRUCT& cs);
00087   BOOL IsSubclassedControl();
00088   LRESULT OnOcmCommand(WPARAM wParam, LPARAM lParam);
00089
00090   virtual void OnAmbientPropertyChange(DISPID dispid);
00091
00092   LRESULT OnOcmDrawItem(WPARAM wParam, LPARAM lParam);
00093   LRESULT OnOcmMeasureItem(WPARAM wParam, LPARAM lParam);
00094
00095   virtual void AddItem(short nIndex, LPCTSTR lpstrText, LPFONTDISP lpFontDisp,
00096     LPPICTUREDISP lpPicDisp);
00097
00098   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00099   virtual void SelectItemBackColor(CItemData *pItemData, LPRECT rect, CDC *pdc);
00100   virtual void DrawItemPicture(CItemData *pItemData, LPRECT rect, CDC *pdc);
00101   virtual void DrawItemText(CItemData *pItemData, LPRECT rect, CDC *pdc);
00102   virtual void SelectItemForeColor(CItemData *pItemData, CDC *pdc);
00103   virtual CFont* SelectItemFont(CItemData *pItemData, CDC *pdc,
00104     CFontHolder& fontHolder);
00105
00106   virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMI);
00107   virtual int GetItemTextHeight(CItemData *pItemData);
00108   virtual int GetItemPictureHeight(CItemData *pItemData);
00109
00110   virtual void UpdateItems();
00111   virtual void UpdateDefHeight();
00112
00113 // Message maps
00114   //{{AFX_MSG(CXlistCtrl)
00115   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00116   //}}AFX_MSG
00117   DECLARE_MESSAGE_MAP()
00118
00119 // Dispatch maps
00120   //{{AFX_DISPATCH(CXlistCtrl)
00121   BOOL m_invertFlag;
00122   afx_msg void OnInvertFlagChanged();
00123   afx_msg void RemoveItem(short nIndex);
00124   afx_msg void Clear();
00125   afx_msg void AddTextFontItem(short nIndex, LPCTSTR lpstrText, LPFONTDISP font);
00126   afx_msg void AddTextItem(short nIndex, LPCTSTR lpstrText);
00127   afx_msg void AddPicItem(short nIndex, LPPICTUREDISP pic);
00128   afx_msg OLE_COLOR GetItemBackColor(short nIndex);
00129   afx_msg void SetItemBackColor(short nIndex, OLE_COLOR newValue);
00130   afx_msg OLE_COLOR GetItemForeColor(short nIndex);
00131   afx_msg void SetItemForeColor(short nIndex, OLE_COLOR newValue);
00132   afx_msg BSTR GetItemText(short nIndex);
00133   afx_msg void SetItemText(short nIndex, LPCTSTR lpszNewValue);
00134   afx_msg LPFONTDISP GetItemFont(short nIndex);
00135   afx_msg void SetItemFont(short nIndex, LPFONTDISP newValue);
00136   afx_msg LPPICTUREDISP GetItemPicture(short nIndex);
00137   afx_msg void SetItemPicture(short nIndex, LPPICTUREDISP newValue);
00138   //}}AFX_DISPATCH
00139   DECLARE_DISPATCH_MAP()
00140
00141   afx_msg void AboutBox();
00142
00143 // Event maps
00144   //{{AFX_EVENT(CXlistCtrl)
00145   //}}AFX_EVENT
00146   DECLARE_EVENT_MAP()
00147
00148 // Dispatch and event IDs
00149 public:
00150   enum {
00151   //{{AFX_DISP_ID(CXlistCtrl)
00152   dispidInvertFlag = 1L,
00153   dispidItemBackColor = 7L,
00154   dispidItemForeColor = 8L,
00155   dispidItemText = 9L,
00156   dispidItemFont = 10L,
00157   dispidItemPicture = 11L,
00158   dispidRemoveItem = 2L,
00159   dispidClear = 3L,
00160   dispidAddTextFontItem = 4L,
00161   dispidAddTextItem = 5L,
00162   dispidAddPicItem = 6L,
00163   //}}AFX_DISP_ID
00164   };
00165
00166 // Data members
00167 protected:
00168   CObArray m_itemData;
00169   short m_itemDefHeight;
00170 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWordPadDoc Member List

This is the complete list of members for CWordPadDoc, including all inherited members.
CreateClientItem(REOBJECT *preo) const | CWordPadDoc | [virtual]
CreateClientItem(REOBJECT *preo) const | CWordPadDoc | [virtual]
CWordPadDoc() | CWordPadDoc | [protected]
CWordPadDoc() | CWordPadDoc | [protected]
DoSave(LPCTSTR pszPathName, BOOL bReplace=TRUE) | CWordPadDoc | [virtual]
DoSave(LPCTSTR pszPathName, BOOL bReplace=TRUE) | CWordPadDoc | [virtual]
ForceDelayed(CFrameWnd *pFrameWnd) | CWordPadDoc |
ForceDelayed(CFrameWnd *pFrameWnd) | CWordPadDoc |
GetClassID() | CWordPadDoc |
GetClassID() | CWordPadDoc |
GetFile(LPCTSTR pszPathName, UINT nOpenFlags, CFileException *pException) | CWordPadDoc | [virtual]
GetFile(LPCTSTR pszPathName, UINT nOpenFlags, CFileException *pException) | CWordPadDoc | [virtual]
GetSection() | CWordPadDoc |
GetSection() | CWordPadDoc |
GetView() | CWordPadDoc |
GetView() | CWordPadDoc |
m_nDocType | CWordPadDoc |
m_nNewDocType | CWordPadDoc |
MapType(int nType) | CWordPadDoc |
MapType(int nType) | CWordPadDoc |
OnCloseDocument() | CWordPadDoc | [virtual]
OnCloseDocument() | CWordPadDoc | [virtual]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CWordPadDoc | [virtual]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CWordPadDoc | [virtual]
OnDeactivateUI(BOOL bUndoable) | CWordPadDoc | [virtual]
OnDeactivateUI(BOOL bUndoable) | CWordPadDoc | [virtual]
OnFileSendMail() | CWordPadDoc | [protected]
OnFileSendMail() | CWordPadDoc | [protected]
OnGetEmbeddedItem() | CWordPadDoc | [protected, virtual]
OnGetEmbeddedItem() | CWordPadDoc | [protected, virtual]
OnNewDocument() | CWordPadDoc | [virtual]
OnNewDocument() | CWordPadDoc | [virtual]
OnOpenDocument(LPCTSTR lpszPathName) | CWordPadDoc | [virtual]
OnOpenDocument(LPCTSTR lpszPathName) | CWordPadDoc | [virtual]
OnUpdateIfEmbedded(CCmdUI *pCmdUI) | CWordPadDoc | [protected]
OnUpdateIfEmbedded(CCmdUI *pCmdUI) | CWordPadDoc | [protected]
OnUpdateObjectVerbMenu(CCmdUI *pCmdUI) | CWordPadDoc | [protected]
OnUpdateOleVerbPopup(CCmdUI *pCmdUI) | CWordPadDoc | [protected]
OnUpdateOleVerbPopup(CCmdUI *pCmdUI) | CWordPadDoc | [protected]
OnViewOptions() | CWordPadDoc | [protected]
OnViewOptions() | CWordPadDoc | [protected]
PreCloseFrame(CFrameWnd *pFrameArg) | CWordPadDoc | [virtual]
PreCloseFrame(CFrameWnd *pFrameArg) | CWordPadDoc | [virtual]
ReportSaveLoadException(LPCTSTR lpszPathName, CException *e, BOOL bSaving, UINT nIDPDefault) | CWordPadDoc | [virtual]
ReportSaveLoadException(LPCTSTR lpszPathName, CException *e, BOOL bSaving, UINT nIDPDefault) | CWordPadDoc | [virtual]
RestoreState(int nType) | CWordPadDoc |
RestoreState(int nType) | CWordPadDoc |
SaveState(int nType) | CWordPadDoc |
SaveState(int nType) | CWordPadDoc |
Serialize(CArchive &ar) | CWordPadDoc | [virtual]
Serialize(CArchive &ar) | CWordPadDoc | [virtual]
SetDocType(int nDocType, BOOL bNoOptionChange=FALSE) | CWordPadDoc |
SetDocType(int nDocType, BOOL bNoOptionChange=FALSE) | CWordPadDoc |
SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU=TRUE) | CWordPadDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBrightLeader Member List

This is the complete list of members for CBrightLeader, including all inherited members.
Bounce(long &value, const int lower, const int upper, int &vel) | CRoamer | [inline]
CBrightLeader() | CBrightLeader |
CLeader() | CLeader |
DeltaRandom(int i) | CRoamer | [inline, static]
dx | CRoamer |
dy | CRoamer |
GetInitialLlamaColor() | CBrightLeader | [virtual]
GetLlamaAcc() const | CLeader | [inline]
GetLlamaColor(COLORREF oldColor) | CBrightLeader | [virtual]
GetLlamaVel() const | CLeader | [inline]
HSB(BYTE H, BYTE S, BYTE B) | CLeader | [protected, static]
Import(const CLeader *pRHS) | CLeader |
m_nColorCounter | CBrightLeader | [private]
m_nLlamaAcc | CLeader | [protected]
m_nLlamaVel | CLeader | [protected]
m_nMyAcc | CLeader | [protected]
m_nMyVel | CLeader | [protected]
m_sColorTable | CBrightLeader | [private, static]
p1 | CRoamer |
p2 | CRoamer |
SetSwarm(CSwarm *pSwarm) | CLeader | [virtual]
Tick() | CBrightLeader | [virtual]
~CRoamer() | CRoamer | [inline, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CColorView Member List

This is the complete list of members for CColorView, including all inherited members.
CColorView() | CColorView | [protected]
GetDocument() | CColorView | [inline]
OnActivateView(BOOL bActivate, CView *pActivateView, CView *pDeactiveView) | CColorView | [virtual]
OnDraw(CDC *pDC) | CColorView | [virtual]
OnMouseActivate(CWnd *pDesktopWnd, UINT nHitTest, UINT message) | CColorView | [protected]
~CColorView() | CColorView | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSliderApp Member List

This is the complete list of members for CSliderApp, including all inherited members.
CSliderApp() | CSliderApp |
ExitInstance() | CSliderApp | [virtual]
InitInstance() | CSliderApp | [virtual]
OnAppAbout() | CSliderApp |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propsht.h Source File

  • general
  • propdlg

propsht.h

Go to the documentation of this file.
00001 // propsht.h : interface of the CModalShapePropSheet class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CModalShapePropSheet : public CPropertySheet
00013 {
00014 public:
00015   DECLARE_DYNAMIC(CModalShapePropSheet)
00016   CModalShapePropSheet(CWnd* pWndParent = NULL);
00017
00018 // Attributes
00019   CStylePage m_stylePage;
00020   CColorPage m_colorPage;
00021   CShapePreviewWnd m_wndPreview;
00022
00023 // Operations
00024   void SetSheetPropsFromShape(CShape* pShape);
00025   void SetShapePropsFromSheet(CShape* pShape);
00026   void UpdateShapePreview();
00027
00028 // Overrides
00029   virtual BOOL OnInitDialog();
00030
00031 // Message Handlers
00032 protected:
00033   //{{AFX_MSG(CModalShapePropSheet)
00034   afx_msg void OnApplyNow();
00035   //}}AFX_MSG
00036   DECLARE_MESSAGE_MAP()
00037 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mainfrm.h Source File

  • general
  • mdi

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CMDIFrameWnd
00013 {
00014   DECLARE_DYNAMIC(CMainFrame)
00015 public:
00016   CMainFrame();
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Implementation
00025 public:
00026   virtual ~CMainFrame();
00027
00028 // Generated message map functions
00029 protected:
00030   //{{AFX_MSG(CMainFrame)
00031   afx_msg void OnBounce();
00032   afx_msg void OnHello();
00033   //}}AFX_MSG
00034   DECLARE_MESSAGE_MAP()
00035 };
00036
00037 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/mainfrm.h Source File

  • general
  • tracker

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 class CMainFrame : public CMDIFrameWnd
00015 {
00016   DECLARE_DYNAMIC(CMainFrame)
00017 public:
00018   CMainFrame();
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Implementation
00027 public:
00028   virtual ~CMainFrame();
00029 #ifdef _DEBUG
00030   virtual void AssertValid() const;
00031   virtual void Dump(CDumpContext& dc) const;
00032 #endif
00033
00034
00035 protected:  // control bar embedded members
00036   CStatusBar  m_wndStatusBar;
00037   CToolBar    m_wndToolBar;
00038
00039 // Generated message map functions
00040 protected:
00041   //{{AFX_MSG(CMainFrame)
00042   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00043     // NOTE - the ClassWizard will add and remove member functions here.
00044     //    DO NOT EDIT what you see in these blocks of generated code !
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/stdafx.h Source File

  • vc2008fp
  • MSMoneyDemo

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>             // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036 #ifndef _AFX_NO_RIBBON_SUPPORT
00037 #include <afxcontrolbars.h>      // MFC support for ribbons and control bars
00038 #endif // _AFX_NO_RIBBON_SUPPORT
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #ifdef _UNICODE
00049 #if defined _M_IX86
00050 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00051 #elif defined _M_X64
00052 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00053 #else
00054 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00055 #endif
00056 #endif
00057
00058
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImagePpg.h Source File

  • controls
  • IMAGE

ImagePpg.h

Go to the documentation of this file.
00001 // ImagePpg.h : Declaration of the CImagePropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 ////////////////////////////////////////////////////////////////////////////
00013 // CImagePropPage : See ImagePpg.cpp for implementation.
00014
00015 class CImagePropPage : public COlePropertyPage
00016 {
00017   DECLARE_DYNCREATE(CImagePropPage)
00018   DECLARE_OLECREATE_EX(CImagePropPage)
00019
00020 // Constructor
00021 public:
00022   CImagePropPage();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CImagePropPage)
00026   enum { IDD = IDD_PROPPAGE_IMAGE };
00027   CString m_strImagePath;
00028   BOOL    m_bAutoSize;
00029   //}}AFX_DATA
00030
00031 // Implementation
00032 protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034
00035 // Message maps
00036 protected:
00037   //{{AFX_MSG(CImagePropPage)
00038     // NOTE - ClassWizard will add and remove member functions here.
00039     //    DO NOT EDIT what you see in these blocks of generated code !
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042
00043 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeless.cpp Source File

  • general
  • modeless

modeless.cpp

Go to the documentation of this file.
00001 // modeless.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "modeless.h"
00015 #include "adderdlg.h"
00016 #include "modeldlg.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CModelessApp
00025
00026 BEGIN_MESSAGE_MAP(CModelessApp, CWinApp)
00027   //{{AFX_MSG_MAP(CModelessApp)
00028     // NOTE - the ClassWizard will add and remove mapping macros here.
00029     //    DO NOT EDIT what you see in these blocks of generated code!
00030   //}}AFX_MSG
00031   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CModelessApp construction
00036
00037 CModelessApp::CModelessApp()
00038 {
00039   // TODO: add construction code here,
00040   // Place all significant initialization in InitInstance
00041 }
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // The one and only CModelessApp object
00045
00046 CModelessApp theApp;
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CModelessApp initialization
00050
00051 BOOL CModelessApp::InitInstance()
00052 {
00053   // Standard initialization
00054   // If you are not using these features and wish to reduce the size
00055   //  of your final executable, you should remove from the following
00056   //  the specific initialization routines you do not need.
00057
00058   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00059
00060   CMainDlg dlg;
00061   m_pMainWnd = &dlg;
00062   int nResponse = (int)dlg.DoModal();
00063   if (nResponse == IDOK)
00064   {
00065     // TODO: Place code here to handle when the dialog is
00066     //  dismissed with OK
00067   }
00068   else if (nResponse == IDCANCEL)
00069   {
00070     // TODO: Place code here to handle when the dialog is
00071     //  dismissed with Cancel
00072   }
00073
00074   // Since the dialog has been closed, return FALSE so that we exit the
00075   //  application, rather than start the application's message pump.
00076   return FALSE;
00077 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/stdafx.h Source File

  • ole
  • oleview
  • iviewers

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and Microsoft
00008 // QuickHelp and/or WinHelp documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <afxwin.h>         // MFC core and standard components
00013 #include <afxext.h>         // MFC extensions
00014 #include <afxole.h>
00015 #include <afxcmn.h>
00016 #include <afxpriv.h>
00017 #include <atlbase.h>
00018 #include <atlwin.h>
00019 #include "windowsx.h"
00020
00021 #pragma warning( disable: 4706 4100 )
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolpage.cpp Source File

  • general
  • CmnCtrl1

toolpage.cpp

Go to the documentation of this file.
00001 // ToolPage.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl1.h"
00015 #include "toolbar1.h"
00016 #include "toolbar2.h"
00017 #include "ToolPage.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CToolBarCtrlPage property page
00027
00028 IMPLEMENT_DYNCREATE(CToolBarCtrlPage, CPropertyPage)
00029
00030 CToolBarCtrlPage::CToolBarCtrlPage() : CPropertyPage(CToolBarCtrlPage::IDD)
00031 {
00032   //{{AFX_DATA_INIT(CToolBarCtrlPage)
00033   m_bAltDrag = FALSE;
00034   //}}AFX_DATA_INIT
00035   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00036 }
00037
00038 CToolBarCtrlPage::~CToolBarCtrlPage()
00039 {
00040 }
00041
00042 void CToolBarCtrlPage::DoDataExchange(CDataExchange* pDX)
00043 {
00044   CPropertyPage::DoDataExchange(pDX);
00045   //{{AFX_DATA_MAP(CToolBarCtrlPage)
00046   DDX_Check(pDX, IDC_ALTDRAG, m_bAltDrag);
00047   //}}AFX_DATA_MAP
00048 }
00049
00050
00051 BEGIN_MESSAGE_MAP(CToolBarCtrlPage, CPropertyPage)
00052   //{{AFX_MSG_MAP(CToolBarCtrlPage)
00053   ON_BN_CLICKED(IDC_ALTDRAG, OnAltdrag)
00054   //}}AFX_MSG_MAP
00055 END_MESSAGE_MAP()
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 #pragma warning(disable : 4706)
00059 BOOL CToolBarCtrlPage::OnInitDialog()
00060 {
00061
00062   CPropertyPage::OnInitDialog();
00063
00064
00065   m_StandardBar.Create(WS_BORDER | WS_VISIBLE | WS_CHILD
00066       | CCS_TOP | CCS_ADJUSTABLE | TBSTYLE_TOOLTIPS,
00067     CRect(0,0,0,0),this, IDR_STANDARDBAR);
00068
00069   m_PaletteBar.Create(WS_BORDER | WS_VISIBLE | WS_CHILD
00070       | CCS_BOTTOM | TBSTYLE_WRAPABLE | TBSTYLE_TOOLTIPS,
00071     CRect(0,0,0,0),this, IDR_PALETTEBAR);
00072
00073   m_StandardBar.AutoSize();
00074   m_PaletteBar.AutoSize();
00075
00076   m_ToolTip.Create(this);
00077
00078   CString cstrToolTip;
00079   CWnd *pWnd = 0;
00080   CRect rect;
00081
00082   // Setup the tooltip control for tooltips with the static controls
00083   for (int nIndex = ID_TOOLBARSTYLE; nIndex <= ID_TBSTYLETOOLTIPS2; nIndex++)
00084   {
00085     cstrToolTip.LoadString(nIndex);
00086
00087     ENSURE(pWnd = GetDlgItem(nIndex));
00088
00089     pWnd->GetWindowRect(&rect);
00090     ScreenToClient(&rect);
00091
00092     m_ToolTip.AddTool(this, (LPCTSTR)cstrToolTip, &rect, nIndex);
00093   }
00094
00095   m_ToolTip.Activate(TRUE);
00096
00097   return TRUE;  // return TRUE unless you set the focus to a control
00098           // EXCEPTION: OCX Property Pages should return FALSE
00099 }
00100 #pragma warning(default : 4706)
00101
00102 void CToolBarCtrlPage::ChangeCtrlStyle(long lStyle, BOOL bSetStyle)
00103 {
00104   long    lStyleOld;
00105   CRect   rect;
00106
00107   m_StandardBar.GetWindowRect(&rect);
00108   lStyleOld = GetWindowLong( m_StandardBar.GetSafeHwnd(), GWL_STYLE );
00109   if ( bSetStyle )
00110     lStyleOld |= lStyle;
00111   else
00112     lStyleOld &= ~lStyle;
00113
00114   SetWindowLong( m_StandardBar.GetSafeHwnd(), GWL_STYLE, lStyleOld );
00115   m_StandardBar.InvalidateRect(&rect);
00116 }
00117
00118 void CToolBarCtrlPage::OnAltdrag()
00119 {
00120   UpdateData();
00121   ChangeCtrlStyle(TBSTYLE_ALTDRAG, m_bAltDrag);
00122 }
00123
00124
00125 LRESULT CToolBarCtrlPage::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
00126 {
00127   // We need to pass these messages to the tooltip for it to determine
00128   // the position of the mouse
00129
00130   switch (message)
00131   {
00132   case WM_LBUTTONDOWN:
00133   case WM_RBUTTONDOWN:
00134   case WM_MBUTTONDOWN:
00135   case WM_LBUTTONUP:
00136   case WM_MBUTTONUP:
00137   case WM_RBUTTONUP:
00138   case WM_MOUSEMOVE:
00139     {
00140       MSG msg;
00141       msg.hwnd = m_hWnd;
00142       msg.message = message;
00143       msg.wParam = wParam;
00144       msg.lParam = lParam;
00145
00146       m_ToolTip.RelayEvent(&msg);
00147     }
00148   }
00149
00150   return CPropertyPage::WindowProc(message,wParam,lParam);
00151 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutlookDemoView Member List

This is the complete list of members for COutlookDemoView, including all inherited members.
COutlookDemoView() | COutlookDemoView | [protected]
GetDocument() | COutlookDemoView | [inline]
m_ImagesHeader | COutlookDemoView | [protected]
m_ImagesList | COutlookDemoView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | COutlookDemoView | [protected, virtual]
OnContextMenu(CWnd *, CPoint point) | COutlookDemoView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | COutlookDemoView | [protected]
OnDraw(CDC *pDC) | COutlookDemoView | [virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | COutlookDemoView | [protected, virtual]
OnFilePrintPreview() | COutlookDemoView | [protected]
OnInitialUpdate() | COutlookDemoView | [protected, virtual]
OnPreparePrinting(CPrintInfo *pInfo) | COutlookDemoView | [protected, virtual]
OnUpdateViewPreviewPane(CCmdUI *pCmdUI) | COutlookDemoView | [protected]
OnViewPreviewPane() | COutlookDemoView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | COutlookDemoView | [virtual]
~COutlookDemoView() | COutlookDemoView | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MainFrm.cpp Source File

  • vc2008fp
  • DynamicMenu

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DynamicMenu.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   ON_WM_CREATE()
00030   ON_WM_CLOSE()
00031   ON_COMMAND(ID_DYNAMIC_ITEM_1, OnDynamicItem1)
00032   ON_COMMAND(ID_DYNAMIC_ITEM_2, OnDynamicItem2)
00033   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00034   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00035   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00036   ON_REGISTERED_MESSAGE(AFX_WM_RESETMENU, OnResetMenu)
00037   ON_COMMAND(IDS_EDIT_MYITEM_1, OnEditMyItem1)
00038   ON_COMMAND(IDS_EDIT_MYITEM_2, OnEditMyItem2)
00039 END_MESSAGE_MAP()
00040
00041 static UINT indicators[] =
00042 {
00043   ID_SEPARATOR,           // status line indicator
00044   ID_INDICATOR_CAPS,
00045   ID_INDICATOR_NUM,
00046   ID_INDICATOR_SCRL,
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CMainFrame construction/destruction
00051
00052 CMainFrame::CMainFrame()
00053 {
00054   // TODO: add member initialization code here
00055
00056 }
00057
00058 CMainFrame::~CMainFrame()
00059 {
00060 }
00061
00062 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00063 {
00064   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00065     return -1;
00066
00067   CMFCToolBar::EnableQuickCustomization ();
00068
00069   // enable Office XP look:
00070   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00071
00072   if (!m_wndMenuBar.Create (this))
00073   {
00074     TRACE0("Failed to create menubar\n");
00075     return -1;      // fail to create
00076   }
00077
00078   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00079
00080   //------------- Example --------------------//
00081   // do not allow modification of the dummy item in customize mode
00082   CList<UINT, UINT> lstProtectedCmds;
00083   lstProtectedCmds.AddTail (ID_DYNAMIC_COMMANDS);
00084   CMFCToolBarButton::SetProtectedCommands (lstProtectedCmds);
00085   //-----------------------------------------//
00086
00087   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00088     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00089     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00090   {
00091     TRACE0("Failed to create toolbar\n");
00092     return -1;      // fail to create
00093   }
00094   if (!m_wndStatusBar.Create(this) ||
00095     !m_wndStatusBar.SetIndicators(indicators,
00096       sizeof(indicators)/sizeof(UINT)))
00097   {
00098     TRACE0("Failed to create status bar\n");
00099     return -1;      // fail to create
00100   }
00101
00102   BOOL bValidString;
00103   CString strMainToolbarTitle;
00104   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00105   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00106   // TODO: Delete these three lines if you don't want the toolbar to
00107   //  be dockable
00108   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00109   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00110   EnableDocking(CBRS_ALIGN_ANY);
00111   DockPane(&m_wndMenuBar);
00112   DockPane(&m_wndToolBar);
00113
00114   return 0;
00115 }
00116
00117 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00118 {
00119   if( !CFrameWnd::PreCreateWindow(cs) )
00120     return FALSE;
00121   // TODO: Modify the Window class or styles here by modifying
00122   //  the CREATESTRUCT cs
00123
00124   return TRUE;
00125 }
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CMainFrame diagnostics
00129
00130 #ifdef _DEBUG
00131 void CMainFrame::AssertValid() const
00132 {
00133   CFrameWnd::AssertValid();
00134 }
00135
00136 void CMainFrame::Dump(CDumpContext& dc) const
00137 {
00138   CFrameWnd::Dump(dc);
00139 }
00140
00141 #endif //_DEBUG
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CMainFrame message handlers
00145
00146
00147 void CMainFrame::OnViewCustomize()
00148 {
00149   //------------------------------------
00150   // Create a customize toolbars dialog:
00151   //------------------------------------
00152   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00153     TRUE /* Automatic menus scaning */);
00154
00155   pDlgCust->Create ();
00156 }
00157
00158 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00159 {
00160   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00161
00162   CMenu menu;
00163   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00164
00165   CMenu* pPopup = menu.GetSubMenu(0);
00166   ASSERT(pPopup != NULL);
00167
00168   if (pPopup)
00169   {
00170     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00171     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00172   }
00173
00174   return 0;
00175 }
00176
00177 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00178 {
00179   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00180   //
00181   // UINT uiToolBarId = (UINT) wp;
00182   // if (uiToolBarId == IDR_MAINFRAME)
00183   // {
00184   //    do something with m_wndToolBar
00185   // }
00186
00187   return 0;
00188 }
00189
00190 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00191 {
00192   //---------------------------------------------------------
00193   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00194   //---------------------------------------------------------
00195   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00196
00197   if (pMenuPopup == NULL)
00198   {
00199     return TRUE;
00200   }
00201
00202   if (pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00203   {
00204     if (CMFCToolBar::IsCustomizeMode ())
00205     {
00206       //----------------------------------------------------
00207       // Don't show toolbars list in the cuztomization mode!
00208       //----------------------------------------------------
00209       return FALSE;
00210     }
00211
00212     pMenuPopup->RemoveAllItems ();
00213
00214     CMenu menu;
00215     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00216
00217     CMenu* pPopup = menu.GetSubMenu(0);
00218     ASSERT(pPopup != NULL);
00219
00220     if (pPopup)
00221     {
00222       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00223     }
00224   }
00225
00226   //------------- Example --------------------//
00227
00228   // we need to find {Dynamic Command} menu item (it's a dummy item)
00229   // that should be replaced to our dynamic menu items
00230   // in customize mode we should leave the menu as is
00231   int iIndex = -1;
00232   if (!CMFCToolBar::IsCustomizeMode () &&
00233     (iIndex = pMenuPopup->GetMenuBar ()->CommandToIndex (ID_DYNAMIC_COMMANDS)) >= 0)
00234   {
00235     // remove the {Dynamic Command} item in noncustomize mode
00236     pMenuPopup->RemoveItem (iIndex);
00237
00238     pMenuPopup->InsertSeparator (iIndex); // insert the separator at the end
00239     // IDS_EDIT_MYITEM_1 and IDS_EDIT_MYITEM_1 should be defined in the string table
00240     // for status text and tooltip
00241     pMenuPopup->InsertItem (
00242       CMFCToolBarMenuButton (IDS_EDIT_MYITEM_1, NULL, -1, _T("&MyItem 1")), iIndex + 1);
00243     pMenuPopup->InsertItem (
00244       CMFCToolBarMenuButton (IDS_EDIT_MYITEM_2, NULL, -1, _T("MyItem &2")), iIndex + 2);
00245
00246     // don't forget to add message handlers (ON_COMMAND) to the message map
00247   }
00248
00249   //-------------------------------------------//
00250
00251   return TRUE;
00252 }
00253
00254 //------------- Example --------------------//
00255 void CMainFrame::OnEditMyItem1 ()
00256 {
00257   AfxMessageBox (_T ("MyItem 1 is selected"));
00258 }
00259
00260 void CMainFrame::OnEditMyItem2 ()
00261 {
00262   AfxMessageBox (_T ("MyItem 2 is selected"));
00263 }
00264
00265 void CMainFrame::OnDynamicItem1()
00266 {
00267   AfxMessageBox (_T ("DynamicItem 1 is selected"));
00268 }
00269
00270 void CMainFrame::OnDynamicItem2()
00271 {
00272   AfxMessageBox (_T ("DynamicItem 2 is selected"));
00273 }
00274
00275 BOOL CMainFrame::OnDrawMenuImage (  CDC* pDC,
00276                   const CMFCToolBarMenuButton* pMenuButton,
00277                   const CRect& rectImage)
00278 {
00279   ASSERT_VALID (pDC);
00280   ASSERT_VALID (pMenuButton);
00281
00282   if (pMenuButton->m_nID == ID_DYNAMIC_ITEM_2)
00283   {
00284     CBrush br (RGB (0, 0, 255));
00285
00286     CRect rect = rectImage;
00287     rect.DeflateRect (2, 2);
00288
00289     pDC->FillRect (rect, &br);
00290     return TRUE;
00291   }
00292
00293   return FALSE;
00294 }
00295
00296 LRESULT CMainFrame::OnResetMenu(WPARAM,LPARAM)
00297 {
00298   m_wndMenuBar.AddSubMenu ();
00299   return 0;
00300 }
00301
00302 //-------------------------------------------//
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/PagerCtrlPage.cpp Source File

  • controls
  • cmnctrl

PagerCtrlPage.cpp

Go to the documentation of this file.
00001 // PagerCtrlPage.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005
00006 #include "CmnCtrl3.h"
00007 #include "PagerCtrlPage.h"
00008
00009 static const struct
00010 {
00011   COLORREF      color;
00012   LPCTSTR lpszDisplay;
00013 } colors[] =
00014 {
00015   {RGB(127,127,127),  _T("Gray")},
00016   {RGB(255,255,255),  _T("White")},
00017   {RGB(0,0,0),  _T("Black")},
00018 };
00019
00020 // CPagerCtrlPage dialog
00021
00022 IMPLEMENT_DYNAMIC(CPagerCtrlPage, CPropertyPage)
00023
00024 CPagerCtrlPage::CPagerCtrlPage()
00025   : CPropertyPage(CPagerCtrlPage::IDD)
00026 {
00027 }
00028
00029 CPagerCtrlPage::~CPagerCtrlPage()
00030 {
00031 }
00032
00033 void CPagerCtrlPage::DoDataExchange(CDataExchange* pDX)
00034 {
00035   CPropertyPage::DoDataExchange(pDX);
00036   DDX_Text(pDX, IDC_BUTTON_SIZE, m_nSize);
00037   DDX_Control(pDX, IDC_SLIDER_BORDER, m_sliderBorderSize);
00038   DDX_Control(pDX, IDC_STATIC_BORDERSIZE, m_staticBorderSize);
00039   DDX_Control(pDX, IDC_BACK_COLOR, m_comboColor);
00040 }
00041
00042 BOOL CPagerCtrlPage::OnInitDialog()
00043 {
00044   CPropertyPage::OnInitDialog();
00045
00046   // Init the pager control and the embedded toolbar control
00047   CRect clientRect;
00048   this->GetClientRect(&clientRect);
00049   BOOL nRet;
00050   nRet = m_pagerctrl.Create(WS_VISIBLE | WS_CHILD | PGS_HORZ,
00051           CRect(32, 32, clientRect.right - 32, 102),
00052           this,
00053           IDC_PAGER_CTRL);
00054
00055   m_toolbar.CreateEx(&m_pagerctrl);
00056   m_toolbar.LoadToolBar(IDR_TOOLBAR1);
00057
00058   m_pagerctrl.SetChild(m_toolbar.m_hWnd);
00059
00060   // Init the controls that display/set the border size
00061   m_sliderBorderSize.SetRange(0, 32);
00062   int nBorderSize = m_pagerctrl.GetBorder();
00063   m_sliderBorderSize.SetPos(nBorderSize);
00064
00065   CString strSize;
00066   strSize.Format(_T("%d"), nBorderSize);
00067   m_staticBorderSize.SetWindowText(strSize);
00068
00069   // Init the controls that display/set the button size
00070   m_pagerctrl.SetButtonSize(32);
00071   m_nSize = m_pagerctrl.GetButtonSize();
00072
00073   // Init the control that display/set the color
00074   for (int i = 0; i < _countof(colors); i++)
00075     m_comboColor.AddString(colors[i].lpszDisplay);
00076   m_comboColor.SetCurSel(0);
00077   m_pagerctrl.SetBkColor(colors[0].color);
00078
00079   UpdateData(FALSE);
00080   return TRUE;
00081 }
00082
00083 BEGIN_MESSAGE_MAP(CPagerCtrlPage, CPropertyPage)
00084   ON_CBN_SELCHANGE(IDC_BACK_COLOR, &CPagerCtrlPage::OnCbnSelchangeBackColor)
00085   ON_BN_CLICKED(IDC_SET_BUTTON_SIZE, &CPagerCtrlPage::OnBnClickedSetButtonSize)
00086   ON_NOTIFY(PGN_CALCSIZE, IDC_PAGER_CTRL, OnCalcSize)
00087   ON_WM_HSCROLL()
00088 END_MESSAGE_MAP()
00089
00090 void CPagerCtrlPage::OnCbnSelchangeBackColor()
00091 {
00092   m_pagerctrl.SetBkColor(colors[m_comboColor.GetCurSel()].color);
00093 }
00094
00095 void CPagerCtrlPage::OnBnClickedSetButtonSize()
00096 {
00097   UpdateData(TRUE);
00098   m_pagerctrl.SetButtonSize(m_nSize);
00099 }
00100
00101 void CPagerCtrlPage::OnCalcSize(NMHDR * pNotifyStruct, LRESULT * result)
00102 {
00103   LPNMPGCALCSIZE pNMPGCALCSIZE = (LPNMPGCALCSIZE)pNotifyStruct;
00104
00105   if (pNMPGCALCSIZE->dwFlag == PGF_CALCWIDTH)
00106   {
00107     SIZE size;
00108     m_toolbar.SendMessage(TB_GETMAXSIZE, 0, (LPARAM)&size);
00109     pNMPGCALCSIZE->iWidth = size.cx;
00110   }
00111 }
00112
00113 void CPagerCtrlPage::OnHScroll(UINT /*nSBCode*/, UINT /*nPos*/, CScrollBar* /*pScrollBar*/)
00114 {
00115   int nBorderSize = m_sliderBorderSize.GetPos();
00116   CString strSize;
00117   strSize.Format(_T("%d"), nBorderSize);
00118   m_staticBorderSize.SetWindowText(strSize);
00119
00120   m_pagerctrl.SetBorder(nBorderSize);
00121 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSchedulerDlg Member List

This is the complete list of members for CSchedulerDlg, including all inherited members.
AdjustHour(int iHour) | CSchedulerDlg |
CheckDates() | CSchedulerDlg |
CSchedulerDlg(CWnd *pParent=NULL) | CSchedulerDlg |
DateSchedules() | CSchedulerDlg | [inline]
DoDataExchange(CDataExchange *pDX) | CSchedulerDlg | [protected, virtual]
ExitScheduler(void) | CSchedulerDlg |
GetStartTimeFormatted(CString szStartTime) | CSchedulerDlg |
IDD enum value | CSchedulerDlg |
IDH enum value | CSchedulerDlg |
m_currDay | CSchedulerDlg |
m_currMonth | CSchedulerDlg |
m_currYear | CSchedulerDlg |
m_day | CSchedulerDlg |
m_hAccel | CSchedulerDlg | [protected]
m_hIcon | CSchedulerDlg | [protected]
m_iLastDivID | CSchedulerDlg |
m_month | CSchedulerDlg |
m_scheduler_array | CSchedulerDlg |
m_scheduler_filepath | CSchedulerDlg |
m_szDivClass | CSchedulerDlg |
m_year | CSchedulerDlg |
OnButtonClearAll(IHTMLElement *pElement) | CSchedulerDlg |
OnClickCalendar() | CSchedulerDlg |
OnClickNewElements(IHTMLElement *pElement) | CSchedulerDlg |
OnClickTime(IHTMLElement *pElement) | CSchedulerDlg |
OnClickTimeDesc(IHTMLElement *pElement) | CSchedulerDlg |
OnDeleteScheduleDisplay(CMyScheduler &scheduler) | CSchedulerDlg |
OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl) | CSchedulerDlg |
OnHelpAbout(void) | CSchedulerDlg |
OnInitDialog() | CSchedulerDlg | [protected, virtual]
OnModifyScheduleDisplay(CMyScheduler &scheduler, const CEntryInfoDlg &InfoDlg) | CSchedulerDlg |
OnMouseOutButtons(IHTMLElement *pElement) | CSchedulerDlg |
OnMouseOutNewElements(IHTMLElement *pElement) | CSchedulerDlg |
OnMouseOutTime(IHTMLElement *pElement) | CSchedulerDlg |
OnMouseOverButtons(IHTMLElement *pElement) | CSchedulerDlg |
OnMouseOverNewElements(IHTMLElement *pElement) | CSchedulerDlg |
OnMouseOverTime(IHTMLElement *pElement) | CSchedulerDlg |
OnMouseOverTimeDesc(IHTMLElement *pElement) | CSchedulerDlg |
OnPaint() | CSchedulerDlg | [protected]
OnQueryDragIcon() | CSchedulerDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CSchedulerDlg | [protected]
OnUpdateScheduleDisplay(const CEntryInfoDlg &InfoDlg) | CSchedulerDlg |
OpenScheduler(void) | CSchedulerDlg |
RemoveInfoFromTable() | CSchedulerDlg |
SetDefaultProperties() | CSchedulerDlg |
SetTimeFormat(int iHour, int iMinutes) | CSchedulerDlg |
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/mainfrm.cpp Source File

  • vc2008fp
  • DrawClient

mainfrm.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014
00015 #include "mainfrm.h"
00016 #include "drawdoc.h"
00017 #include "drawvw.h"
00018
00019 #include "RibbonListButton.h"
00020
00021 #include <memory>
00022
00023 #ifdef _DEBUG
00024 #undef THIS_FILE
00025 static char BASED_CODE THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 static int g_nSelectedObjectGroupIndex = 0;
00029 static int g_nMaxLineWeight = 20;
00030
00031 static const CMainFrame::XStyle c_Styles[] =
00032 {
00033   {RGB( 64,  64,  64), RGB(  0,   0,   0)},
00034   {RGB( 85, 140, 205), RGB( 61,  97, 140)},
00035   {RGB(207,  86,  82), RGB(143,  61,  59)},
00036   {RGB(168, 203,  96), RGB(116, 141,  66)},
00037   {RGB(145, 113, 184), RGB( 97,  77, 121)},
00038   {RGB( 77, 179, 206), RGB( 56, 129, 149)},
00039   {RGB(249, 151,  70), RGB(212, 107,  22)},
00040   {RGB(  0,   0,   0), (COLORREF)-1},
00041   {RGB( 78, 128, 188), (COLORREF)-1},
00042   {RGB(191,  79,  76), (COLORREF)-1},
00043   {RGB(154, 186,  88), (COLORREF)-1},
00044   {RGB(127,  99, 161), (COLORREF)-1},
00045   {RGB( 74, 171, 197), (COLORREF)-1},
00046   {RGB(246, 149,  69), (COLORREF)-1},
00047   {(COLORREF)-1, RGB(  0,   0,   0)},
00048   {(COLORREF)-1, RGB( 78, 128, 188)},
00049   {(COLORREF)-1, RGB(191,  79,  76)},
00050   {(COLORREF)-1, RGB(154, 186,  88)},
00051   {(COLORREF)-1, RGB(127,  99, 161)},
00052   {(COLORREF)-1, RGB( 74, 171, 197)},
00053   {(COLORREF)-1, RGB(246, 149,  69)},
00054 };
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CMainFrame
00058
00059 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWndEx)
00060
00061 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWndEx)
00062   //{{AFX_MSG_MAP(CMainFrame)
00063   ON_WM_CREATE()
00064   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2007, ID_VIEW_APPLOOK_SCENIC, OnAppLook)
00065   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2007, ID_VIEW_APPLOOK_SCENIC, OnUpdateAppLook)
00066   ON_COMMAND(ID_WINDOW_MANAGER, OnWindowManager)
00067   ON_COMMAND(ID_MDI_MOVE_TO_NEXT_GROUP, OnMdiMoveToNextGroup)
00068   ON_COMMAND(ID_MDI_MOVE_TO_PREV_GROUP, OnMdiMoveToPrevGroup)
00069   ON_COMMAND(ID_MDI_NEW_HORZ_TAB_GROUP, OnMdiNewHorzTabGroup)
00070   ON_COMMAND(ID_MDI_NEW_VERT_GROUP, OnMdiNewVertGroup)
00071   ON_COMMAND(ID_MDI_CANCEL, OnMdiCancel)
00072   ON_REGISTERED_MESSAGE(AFX_WM_ON_RIBBON_CUSTOMIZE, OnRibbonCustomize)
00073   ON_REGISTERED_MESSAGE(AFX_WM_ON_HIGHLIGHT_RIBBON_LIST_ITEM, OnHighlightRibbonListItem)
00074   ON_COMMAND(ID_WINDOWS_MENU,OnDummy)
00075   ON_COMMAND(ID_TOOLS_OPTIONS, OnToolsOptions)
00076   //}}AFX_MSG_MAP
00077 END_MESSAGE_MAP()
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CMainFrame construction/destruction
00081
00082 CMainFrame::CMainFrame()
00083 {
00084   m_nAppLook = theApp.GetInt(_T("ApplicationLook"), ID_VIEW_APPLOOK_SCENIC);
00085 }
00086
00087 CMainFrame::~CMainFrame()
00088 {
00089 }
00090
00091 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00092 {
00093   if (CMDIFrameWndEx::OnCreate(lpCreateStruct) == -1)
00094     return -1;
00095
00096   OnAppLook(m_nAppLook);
00097
00098   if (!CreateRibbonBar())
00099   {
00100     TRACE0("Failed to create ribbon bar\n");
00101     return -1;      // fail to create
00102   }
00103
00104   if (!CreateStatusBar())
00105   {
00106     TRACE0("Failed to create status bar\n");
00107     return -1;      // fail to create
00108   }
00109
00110   // Enable windows manager:
00111   EnableWindowsDialog(ID_WINDOW_MANAGER, _T("&Windows..."), TRUE);
00112
00113   return 0;
00114 }
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // CMainFrame diagnostics
00118
00119 #ifdef _DEBUG
00120 void CMainFrame::AssertValid() const
00121 {
00122   CMDIFrameWndEx::AssertValid();
00123 }
00124
00125 void CMainFrame::Dump(CDumpContext& dc) const
00126 {
00127   CMDIFrameWndEx::Dump(dc);
00128 }
00129
00130 #endif //_DEBUG
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CMainFrame message handlers and overrides
00134
00135 void CMainFrame::OnAppLook(UINT id)
00136 {
00137   CDockingManager::SetDockingMode(DT_SMART);
00138
00139   m_nAppLook = id;
00140
00141   CTabbedPane::m_StyleTabWnd = CMFCTabCtrl::STYLE_3D;
00142
00143   switch (m_nAppLook)
00144   {
00145   case ID_VIEW_APPLOOK_2007:
00146   case ID_VIEW_APPLOOK_2007_1:
00147   case ID_VIEW_APPLOOK_2007_2:
00148   case ID_VIEW_APPLOOK_2007_3:
00149     // enable Office 2007 look:
00150     switch (m_nAppLook)
00151     {
00152     case ID_VIEW_APPLOOK_2007:
00153       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00154       break;
00155
00156     case ID_VIEW_APPLOOK_2007_1:
00157       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00158       break;
00159
00160     case ID_VIEW_APPLOOK_2007_2:
00161       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);
00162       break;
00163
00164     case ID_VIEW_APPLOOK_2007_3:
00165       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);
00166       break;
00167     }
00168
00169     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));
00170     m_wndRibbonBar.SetWindows7Look(FALSE);
00171     break;
00172
00173   case ID_VIEW_APPLOOK_SCENIC:
00174     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7));
00175     m_wndRibbonBar.SetWindows7Look(TRUE);
00176     break;
00177   }
00178
00179   CMDITabInfo mdiTabParams;
00180
00181   mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_VS2005;
00182   mdiTabParams.m_bAutoColor = TRUE;
00183   mdiTabParams.m_bDocumentMenu = TRUE;
00184   mdiTabParams.m_bActiveTabCloseButton = TRUE;
00185
00186   EnableMDITabbedGroups(TRUE, mdiTabParams);
00187
00188   CDockingManager* pDockManager = GetDockingManager();
00189   if (pDockManager != NULL)
00190   {
00191     ASSERT_VALID(pDockManager);
00192     pDockManager->AdjustPaneFrames();
00193   }
00194
00195   CTabbedPane::ResetTabs();
00196
00197   RecalcLayout();
00198   RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00199
00200   theApp.WriteInt(_T("ApplicationLook"), m_nAppLook);
00201 }
00202
00203 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00204 {
00205   pCmdUI->SetRadio(m_nAppLook == pCmdUI->m_nID);
00206 }
00207
00208 void CMainFrame::OnWindowManager()
00209 {
00210   ShowWindowsDialog();
00211 }
00212
00213 LRESULT CMainFrame::OnRibbonCustomize(WPARAM /*wp*/, LPARAM /*lp*/)
00214 {
00215   ShowOptions(0);
00216   return 1;
00217 }
00218
00219 void CMainFrame::OnToolsOptions()
00220 {
00221   ShowOptions(0);
00222 }
00223
00224 BOOL CMainFrame::OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop)
00225 {
00226   CMenu menu;
00227   VERIFY(menu.LoadMenu(bDrop ? IDR_POPUP_DROP_MDITABS : IDR_POPUP_MDITABS));
00228
00229   CMenu* pPopup = menu.GetSubMenu(0);
00230   ASSERT(pPopup != NULL);
00231
00232   if (!pPopup)
00233   {
00234     return FALSE;
00235   }
00236
00237   if ((dwAllowedItems & AFX_MDI_CREATE_HORZ_GROUP) == 0)
00238   {
00239     pPopup->DeleteMenu(ID_MDI_NEW_HORZ_TAB_GROUP, MF_BYCOMMAND);
00240   }
00241
00242   if ((dwAllowedItems & AFX_MDI_CREATE_VERT_GROUP) == 0)
00243   {
00244     pPopup->DeleteMenu(ID_MDI_NEW_VERT_GROUP, MF_BYCOMMAND);
00245   }
00246
00247   if ((dwAllowedItems & AFX_MDI_CAN_MOVE_NEXT) == 0)
00248   {
00249     pPopup->DeleteMenu(ID_MDI_MOVE_TO_NEXT_GROUP, MF_BYCOMMAND);
00250   }
00251
00252   if ((dwAllowedItems & AFX_MDI_CAN_MOVE_PREV) == 0)
00253   {
00254     pPopup->DeleteMenu(ID_MDI_MOVE_TO_PREV_GROUP, MF_BYCOMMAND);
00255   }
00256
00257   CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00258   pPopupMenu->SetAutoDestroy(FALSE);
00259   pPopupMenu->Create(this, point.x, point.y, pPopup->GetSafeHmenu());
00260
00261   return TRUE;
00262 }
00263
00264 void CMainFrame::OnMdiMoveToNextGroup()
00265 {
00266   MDITabMoveToNextGroup();
00267 }
00268
00269 void CMainFrame::OnMdiMoveToPrevGroup()
00270 {
00271   MDITabMoveToNextGroup(FALSE);
00272 }
00273
00274 void CMainFrame::OnMdiNewHorzTabGroup()
00275 {
00276   MDITabNewGroup(FALSE);
00277 }
00278
00279 void CMainFrame::OnMdiNewVertGroup()
00280 {
00281   MDITabNewGroup();
00282 }
00283
00284 void CMainFrame::OnMdiCancel()
00285 {
00286   // TODO: Add your command handler code here
00287
00288 }
00289 BOOL CMainFrame::OnShowPopupMenu(CMFCPopupMenu* pMenuPopup)
00290 {
00291   BOOL bRes = CMDIFrameWndEx::OnShowPopupMenu(pMenuPopup);
00292
00293   if (pMenuPopup != NULL && !pMenuPopup->IsCustomizePane())
00294   {
00295     AdjustObjectSubmenu(pMenuPopup);
00296   }
00297
00298   return bRes;
00299 }
00300
00301 /////////////////////////////////////////////////////////////////////////////
00302 // CMainFrame helpers
00303 BOOL CMainFrame::CreateRibbonBar()
00304 {
00305   if (!m_wndRibbonBar.Create(this))
00306   {
00307     return FALSE;
00308   }
00309
00310   // Load panel images:
00311   m_PanelImages.SetImageSize(CSize(16, 16));
00312   m_PanelImages.Load(IDB_RIBBON_ICONS);
00313
00314   // Init main button:
00315   InitMainButton();
00316
00317   InitHomeCategory();
00318   InitViewCategory();
00319   InitTabButtons();
00320
00321   AddContextTab_Format();
00322
00323   // Init QAT state
00324   // Add quick access toolbar commands:
00325   CMFCRibbonQuickAccessToolBarDefaultState qatState;
00326
00327   qatState.AddCommand(ID_FILE_NEW, FALSE);
00328   qatState.AddCommand(ID_FILE_OPEN, FALSE);
00329   qatState.AddCommand(ID_FILE_SAVE);
00330   qatState.AddCommand(ID_FILE_PRINT_DIRECT);
00331   qatState.AddCommand(ID_FILE_PRINT_PREVIEW, FALSE);
00332   qatState.AddCommand(ID_EDIT_UNDO);
00333
00334   // Set the state
00335   m_wndRibbonBar.SetQuickAccessDefaultState(qatState);
00336
00337   return TRUE;
00338 }
00339
00340 BOOL CMainFrame::CreateStatusBar()
00341 {
00342   if (!m_wndStatusBar.Create(this))
00343   {
00344     return FALSE;
00345   }
00346
00347   m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE_OBJECTCOUNT, _T("Object Count: None"), TRUE), _T("Object Count: None"));
00348   m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT, _T("Selected Count: None"), TRUE), _T("Selected Count: None"));
00349
00350   CMFCToolBarImages images;
00351   images.SetImageSize(CSize(14, 14));
00352
00353   std::auto_ptr<CMFCRibbonButtonsGroup> apSBGroup1(new CMFCRibbonButtonsGroup);
00354   if (images.Load(IDB_STATUSBAR_1))
00355   {
00356     apSBGroup1->SetImages(&images, NULL, NULL);
00357   }
00358   apSBGroup1->AddButton(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, _T(""), 0));
00359   apSBGroup1->AddButton(new CMFCRibbonButton(ID_FILE_SUMMARYINFO, _T(""), 1));
00360   m_wndStatusBar.AddExtendedElement(apSBGroup1.release(), _T("View Shortcuts"));
00361
00362   std::auto_ptr<CMFCRibbonButtonsGroup> apSBGroup2(new CMFCRibbonButtonsGroup);
00363   if (images.Load(IDB_STATUSBAR_2))
00364   {
00365     apSBGroup2->SetImages(&images, NULL, NULL);
00366   }
00367   apSBGroup2->AddButton(new CMFCRibbonButton(ID_VIEW_GRID, _T(""), 0));
00368   apSBGroup2->AddButton(new CMFCRibbonButton(ID_VIEW_SHOWOBJECTS, _T(""), 1));
00369   m_wndStatusBar.AddExtendedElement(apSBGroup2.release(), _T("View Shortcuts"));
00370
00371   return TRUE;
00372 }
00373
00374 void CMainFrame::InitMainButton()
00375 {
00376   m_MainButton.SetImage(IDB_RIBBON_MAIN);
00377   m_MainButton.SetToolTipText(_T("File"));
00378   m_MainButton.SetText(_T("\nf"));
00379
00380   m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize(45, 45));
00381
00382   CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(_T("File"), IDB_RIBBON_FILESMALL, IDB_RIBBON_FILELARGE);
00383   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_NEW, _T("&New"), 0, 0));
00384   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_OPEN, _T("&Open..."), 1, 1));
00385
00386   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE, _T("&Save"), 2, 2));
00387   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));
00388
00389   std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton(ID_FILE_PRINT, _T("&Print"), 4, 4));
00390
00391   apBtnPrint->AddSubItem(new CMFCRibbonLabel(_T("Preview and print the document")));
00392   apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 7, 7, TRUE));
00393   apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 6, 6, TRUE));
00394
00395   apBtnPrint->SetKeys(_T("p"), _T("w"));
00396   pMainPanel->Add(apBtnPrint.release());
00397
00398   pMainPanel->AddSeparator();
00399   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SEND_MAIL, _T("Sen&d..."), 8, 8));
00400   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SUMMARYINFO, _T("Summary &Info..."), 9, 9));
00401
00402   pMainPanel->AddSeparator();
00403   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_CLOSE, _T("&Close"), 5, 5));
00404
00405   pMainPanel->AddRecentFilesList(_T("Recent Documents"));
00406   pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_TOOLS_OPTIONS, _T("Opt&ions"), 10));
00407   pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, _T("E&xit"), 11));
00408 }
00409
00410 void CMainFrame::InitHomeCategory()
00411 {
00412   CreateDocumentColors();
00413
00414   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Home"), IDB_RIBBON_HOMESMALL, IDB_RIBBON_HOMELARGE);
00415
00416   // Create "Clipboard" panel:
00417   CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel(_T("Clipboard\nzc"), m_PanelImages.ExtractIcon(0));
00418
00419   CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, _T("Paste\nv"), 0, 0);
00420   pPanelClipboard->Add(pBtnPaste);
00421
00422   pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, _T("Cut\nx"), 1));
00423   pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, _T("Copy\nc"), 2));
00424   pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CLEAR, _T("Delete\nt"), 3));
00425
00426   // Create "Operations" panel
00427   CMFCRibbonPanel* pPanelOperations = pCategory->AddPanel(_T("Operations\nzo"), m_PanelImages.ExtractIcon(1));
00428
00429   CMFCRibbonColorButton* pBtnPaperColor = new CMFCRibbonColorButton(ID_VIEW_PAPERCOLOR, _T("Paper Color\ng"), TRUE, 13, 1);
00430   pBtnPaperColor->SetAlwaysLargeImage();
00431   pBtnPaperColor->SetDefaultCommand(FALSE);
00432   pBtnPaperColor->EnableAutomaticButton(_T("&Automatic"), RGB(255, 255, 255));
00433   pBtnPaperColor->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00434   pBtnPaperColor->SetColumns(10);
00435   pBtnPaperColor->SetColorBoxSize(CSize(17, 17));
00436   pBtnPaperColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00437   pBtnPaperColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
00438   pBtnPaperColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00439
00440   pPanelOperations->Add(pBtnPaperColor);
00441
00442   pPanelOperations->Add(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, _T("Select All\na"), 4));
00443   pPanelOperations->Add(new CMFCRibbonButton(ID_OLE_INSERT_NEW, _T("New Object...\no"), 5));
00444   pPanelOperations->Add(new CMFCRibbonButton(ID_OLE_EDIT_LINKS, _T("Links...\ni"), 6));
00445
00446   // Create "Draw" panel
00447   CMFCRibbonPanel* pPanelDraw = pCategory->AddPanel(_T("Draw\nzd"), m_PanelImages.ExtractIcon(2));
00448
00449   pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_SELECT, _T("Select\ns"), 7));
00450   pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_LINE, _T("Line\nl"), 8));
00451   pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_RECT, _T("Rectangle\nr"), 9));
00452   pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_ROUNDRECT, _T("Round Rectangle\nn"), 10));
00453   pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_ELLIPSE, _T("Ellipse\ne"), 11));
00454   pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_POLYGON, _T("Polygon\ny"), 12));
00455
00456   // Create "Arrange" panel
00457   CMFCRibbonPanel* pPanelArrange = pCategory->AddPanel(_T("Arrange\nzj"), m_PanelImages.ExtractIcon(3));
00458
00459   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOFRONT, _T("Move to Front\nmf"), 15, 3));
00460   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEFORWARD, _T("Move Forward\nmw"), 17, 5));
00461   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEBACK, _T("Move Backward\nmd"), 18, 6));
00462   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOBACK, _T("Move to Back\nmb"), 16, 4));
00463
00464   // Add not-in-ribbon commands
00465   CMFCRibbonButton* pUndo = new CMFCRibbonButton(ID_EDIT_UNDO, _T("Undo"), 20);
00466   pCategory->AddHidden(pUndo);
00467 }
00468
00469 void CMainFrame::InitViewCategory()
00470 {
00471   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&View"), IDB_RIBBON_VIEWSMALL, IDB_RIBBON_VIEWLARGE);
00472
00473   // Create "Show/Hide" panel:
00474   CMFCRibbonPanel* pPanelShow = pCategory->AddPanel(_T("Show/Hide\nzs"), m_PanelImages.ExtractIcon(4));
00475
00476   pPanelShow->Add(new CMFCRibbonCheckBox(ID_VIEW_GRID, _T("Grid Lines\ng")));
00477   pPanelShow->Add(new CMFCRibbonCheckBox(ID_VIEW_SHOWOBJECTS, _T("Show Objects\ns")));
00478
00479   // Create "Window" panel:
00480   CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel(_T("Window\nzw"), m_PanelImages.ExtractIcon(5));
00481
00482   pPanelWindow->Add(new CMFCRibbonButton(ID_WINDOW_NEW, _T("New Window\nn"), 0, 0));
00483
00484   CMFCRibbonButton* pBtnWindows = new CMFCRibbonButton(ID_WINDOWS_MENU, _T("Switch Windows\ns"), 1, 1);
00485   pBtnWindows->SetMenu(IDR_WINDOWS_MENU, TRUE);
00486   pBtnWindows->SetDefaultCommand(FALSE);
00487   pPanelWindow->Add(pBtnWindows);
00488
00489 #ifdef ENABLE_RIBBON_LAUNCH_BUTTON
00490   // Add the launch button at the bottom of the panel:
00491   pPanelWindow->EnableLaunchButton(ID_WINDOW_MANAGER, 1, _T("W"));
00492 #endif // ENABLE_RIBBON_LAUNCH_BUTTON
00493 }
00494
00495 void CMainFrame::InitTabButtons()
00496 {
00497   // Add "Style" button to the right of tabs:
00498   CMFCRibbonButton* pStyleButton = new CMFCRibbonButton((UINT) -1, _T("Style\ns"));
00499   pStyleButton->SetMenu(IDR_THEME_MENU, TRUE /* Right align */);
00500
00501   m_wndRibbonBar.AddToTabs(pStyleButton);
00502
00503   // Add "About" button to the right of tabs:
00504   m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon(6)));
00505
00506 }
00507
00508 void CMainFrame::AddContextTab_Format()
00509 {
00510   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Format"), _T("Drawing tools"), ID_FORMAT_CONTEXT_TAB, AFX_CategoryColor_Orange, IDB_RIBBON_FORMATSMALL, IDB_RIBBON_FORMATLARGE);
00511   pCategory->SetKeys(_T("jd"));
00512
00513   // Create "Styles" panel
00514   CMFCRibbonPanel* pPanelStyles = pCategory->AddPanel(_T("Styles\nzs"), m_PanelImages.ExtractIcon(8));
00515
00516   CMFCRibbonGallery* pBtnStyles = new CMFCRibbonGallery(ID_OBJECT_STYLES, _T("Styles\nk"), 0, 0, IDB_STYLES, 40);
00517   pBtnStyles->SetIconsInRow(7);
00518   pBtnStyles->EnableMenuResize(TRUE, TRUE);
00519   pPanelStyles->Add(pBtnStyles);
00520
00521   std::auto_ptr<CMFCRibbonColorButton> apBtnFillColor(new CMFCRibbonColorButton(ID_OBJECT_FILLCOLOR, _T("Fill Color\nsf"), FALSE, 1, -1));
00522   apBtnFillColor->SetDefaultCommand(FALSE);
00523   apBtnFillColor->EnableAutomaticButton(_T("&Automatic"), RGB(128, 128, 128));
00524   apBtnFillColor->EnableOtherButton(_T("&More Fill Colors..."), _T("More Fill Colors"));
00525   apBtnFillColor->SetColumns(10);
00526   apBtnFillColor->SetColorBoxSize(CSize(17, 17));
00527   apBtnFillColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00528   apBtnFillColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
00529   apBtnFillColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00530   apBtnFillColor->AddSubItem(new CMFCRibbonButton(ID_OBJECT_NOFILL, _T("&No Fill\nn"), 2));
00531   apBtnFillColor->SetColor((COLORREF)-1);
00532   pPanelStyles->Add(apBtnFillColor.release());
00533
00534   std::auto_ptr<CMFCRibbonColorButton> apBtnLineColor(new CMFCRibbonColorButton(ID_OBJECT_LINECOLOR, _T("Line Color\nso"), FALSE, 3, -1));
00535   apBtnLineColor->SetDefaultCommand(FALSE);
00536   apBtnLineColor->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00537   apBtnLineColor->EnableOtherButton(_T("&More Line Colors..."), _T("More Line Colors"));
00538   apBtnLineColor->SetColumns(10);
00539   apBtnLineColor->SetColorBoxSize(CSize(17, 17));
00540   apBtnLineColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00541   apBtnLineColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
00542   apBtnLineColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00543   apBtnLineColor->AddSubItem(new CMFCRibbonButton(ID_OBJECT_NOLINE, _T("&No Line\nn"), 2));
00544   apBtnLineColor->SetColor((COLORREF)-1);
00545   pPanelStyles->Add(apBtnLineColor.release());
00546
00547   CStringArray sa;
00548   sa.Add(_T("1 pt"));
00549   sa.Add(_T("2 pt"));
00550   sa.Add(_T("3 pt"));
00551   sa.Add(_T("4 pt"));
00552   sa.Add(_T("5 pt"));
00553   sa.Add(_T("6 pt"));
00554   sa.Add(_T("7 pt"));
00555
00556   std::auto_ptr<CRibbonListButton> apBtnLineWeight(new CRibbonListButton(ID_OBJECT_LINEWEIGHT, _T("Line Weight\nsw"), 4, -1, IDB_LINEWEIGHT, 96, sa));
00557   apBtnLineWeight->AddSubItem(new CMFCRibbonButton(ID_OBJECT_LINEWEIGHT_MORE, _T("More &Lines..."), 5, -1));
00558   apBtnLineWeight->EnableMenuResize(TRUE, TRUE); // Vertical only
00559   pPanelStyles->Add(apBtnLineWeight.release());
00560
00561 #ifdef ENABLE_RIBBON_LAUNCH_BUTTON
00562   pPanelStyles->EnableLaunchButton(ID_OBJECT_PROPERTIES, 6, _T("fa"));
00563 #endif // ENABLE_RIBBON_LAUNCH_BUTTON
00564
00565   // Create "Arrange" panel
00566   CMFCRibbonPanel* pPanelArrange = pCategory->AddPanel(_T("Arrange\nzj"), m_PanelImages.ExtractIcon(3));
00567
00568   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOFRONT, _T("Move to Front\nmf"), 7, 1));
00569   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEFORWARD, _T("Move Forward\nmw"), 9, 3));
00570   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEBACK, _T("Move Backward\nmd"), 10, 4));
00571   pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOBACK, _T("Move to Back\nmb"), 8, 2));
00572 }
00573
00574 void CMainFrame::AdjustObjectSubmenu(CMFCPopupMenu* pMenuPopup)
00575 {
00576   ASSERT(pMenuPopup != NULL);
00577
00578   if (pMenuPopup == NULL || pMenuPopup->GetParentPopupMenu() != NULL)
00579   {
00580     return;
00581   }
00582
00583   CMFCPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar();
00584   ASSERT(pMenuBar != NULL);
00585   if (!pMenuBar)
00586   {
00587     return;
00588   }
00589
00590   int iIndex = pMenuBar->CommandToIndex(ID_OLE_VERB_FIRST);
00591   if (iIndex < 0)
00592   {
00593     return;
00594   }
00595
00596   CFrameWnd* pFrame = GetActiveFrame();
00597
00598   if (pFrame == NULL)
00599   {
00600     return;
00601   }
00602
00603   CDrawDoc* pDoc = (CDrawDoc*)pFrame->GetActiveDocument();
00604   ASSERT_VALID(pDoc);
00605
00606   // check for single selection
00607   COleClientItem* pItem = pDoc->GetPrimarySelectedItem(pFrame->GetActiveView());
00608   if (pItem == NULL || pItem->GetType() == OT_STATIC)
00609   {
00610     // no selection, or is 'static' item
00611     return;
00612   }
00613
00614   // only include Convert... if there is a handler for ID_OLE_EDIT_CONVERT
00615   UINT nConvertID = ID_OLE_EDIT_CONVERT;
00616   AFX_CMDHANDLERINFO info;
00617   if (!pDoc->OnCmdMsg(ID_OLE_EDIT_CONVERT, CN_COMMAND, NULL, &info))
00618     nConvertID = 0;
00619
00620   HMENU hMenu = pMenuBar->ExportToMenu();
00621   ASSERT(hMenu != NULL);
00622   if (hMenu == NULL)
00623   {
00624     return;
00625   }
00626
00627   // update the menu
00628   AfxOleSetEditMenu(pItem, CMenu::FromHandle(hMenu), iIndex, ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, nConvertID);
00629
00630   pMenuBar->ImportFromMenu(hMenu);
00631   ::DestroyMenu(hMenu);
00632 }
00633
00634 void CMainFrame::ShowOptions(int nPage)
00635 {
00636   // Create "Customize" page:
00637   std::auto_ptr<CMFCRibbonCustomizePropertyPage> apPageCustomize(new CMFCRibbonCustomizePropertyPage(&m_wndRibbonBar));
00638
00639   // Add "popular" items:
00640   CList<UINT, UINT> lstPopular;
00641
00642   lstPopular.AddTail(ID_FILE_NEW);
00643   lstPopular.AddTail(ID_FILE_OPEN);
00644   lstPopular.AddTail(ID_FILE_SAVE);
00645   lstPopular.AddTail(ID_FILE_PRINT_PREVIEW);
00646   lstPopular.AddTail(ID_FILE_PRINT_DIRECT);
00647   lstPopular.AddTail(ID_EDIT_UNDO);
00648
00649   apPageCustomize->AddCustomCategory(_T("Popular Commands"), lstPopular);
00650
00651   // Add hidden commands:
00652   CList<UINT,UINT> lstHidden;
00653   m_wndRibbonBar.GetItemIDsList(lstHidden, TRUE);
00654   apPageCustomize->AddCustomCategory(_T("Commands not in the Ribbon"), lstHidden);
00655
00656   // Add all commands:
00657   CList<UINT,UINT> lstAll;
00658   m_wndRibbonBar.GetItemIDsList(lstAll);
00659   apPageCustomize->AddCustomCategory(_T("All Commands"), lstAll);
00660
00661   // Create property sheet:
00662   std::tr1::shared_ptr<CMFCPropertySheet> spPropSheet(new CMFCPropertySheet(_T("Options"), this, nPage));
00663   spPropSheet->m_psh.dwFlags |= PSH_NOAPPLYNOW;
00664   spPropSheet->SetLook(CMFCPropertySheet::PropSheetLook_List, 124 /* List width */);
00665   spPropSheet->AddPage(apPageCustomize.release());
00666   spPropSheet->DoModal();
00667 }
00668
00669 void CMainFrame::UpdateUI(CDrawView* pCurrView)
00670 {
00671   // Update Status Bar
00672   CDrawDoc* pCurrDoc = pCurrView->GetDocument();
00673   UpdateStatusBarCountPane(ID_STATUSBAR_PANE_OBJECTCOUNT, _T("Object Count"), (int) pCurrDoc->GetObjects()->GetCount());
00674   UpdateStatusBarCountPane(ID_STATUSBAR_PANE_SELECTEDOBJECTCOUNT, _T("Selected Count"), (int) pCurrView->m_selection.GetCount());
00675
00676   m_wndStatusBar.Invalidate();
00677   m_wndStatusBar.UpdateWindow();
00678 }
00679
00680 void CMainFrame::UpdateContextTab(CDrawView* pCurrView)
00681 {
00682   bool bEnable = pCurrView->m_selection.GetCount() > 0;
00683
00684   SetRibbonContextCategory(bEnable ? ID_FORMAT_CONTEXT_TAB : 0);
00685
00686   if (bEnable)
00687   {
00688     UpdateContextTabFromObject(pCurrView->m_selection);
00689   }
00690 }
00691
00692 void CMainFrame::UpdateStatusBarCountPane(int nID, CString strText, int nCount)
00693 {
00694   CMFCRibbonBaseElement* pPane = m_wndStatusBar.FindByID(nID);
00695   if (pPane != NULL)
00696   {
00697     if (nCount == 0)
00698     {
00699       strText += _T(": None");
00700     }
00701     else
00702     {
00703       CString strFormatted;
00704       strFormatted.Format(_T(": %d"), nCount);
00705
00706       strText += strFormatted;
00707     }
00708     pPane->SetText(strText);
00709   }
00710
00711 }
00712
00713 void CMainFrame::UpdateContextTabFromObject(CDrawObjList& list)
00714 {
00715   int count = (int) list.GetCount();
00716   if (count == 0)
00717   {
00718     return;
00719   }
00720
00721   COLORREF clrFill = (COLORREF)-1;
00722   COLORREF clrLine = (COLORREF)-1;
00723   int nLineWeight  = -1;
00724   if (count == 1)
00725   {
00726     CDrawObj* pObj = list.GetHead();
00727     if (pObj->CanChangeFillColor() && pObj->IsEnableFill())
00728     {
00729       clrFill = pObj->GetFillColor();
00730     }
00731     if (pObj->CanChangeLineColor() && pObj->IsEnableLine())
00732     {
00733       clrLine = pObj->GetLineColor();
00734     }
00735     if (pObj->CanChangeLineWeight() && pObj->IsEnableLine())
00736     {
00737       nLineWeight = pObj->GetLineWeight() - 1;
00738     }
00739   }
00740
00741   {
00742     CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
00743     m_wndRibbonBar.GetElementsByID(ID_OBJECT_FILLCOLOR, arButtons);
00744
00745     if (arButtons.GetSize() > 0)
00746     {
00747       for (int i = 0; i < arButtons.GetSize(); i++)
00748       {
00749         CMFCRibbonColorButton* pButton = DYNAMIC_DOWNCAST
00750           (CMFCRibbonColorButton, arButtons[i]
00751         );
00752         pButton->SetColor(clrFill);
00753       }
00754     }
00755   }
00756
00757   {
00758     CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
00759     m_wndRibbonBar.GetElementsByID(ID_OBJECT_LINECOLOR, arButtons);
00760
00761     if (arButtons.GetSize() > 0)
00762     {
00763       for (int i = 0; i < arButtons.GetSize(); i++)
00764       {
00765         CMFCRibbonColorButton* pButton = DYNAMIC_DOWNCAST
00766           (CMFCRibbonColorButton, arButtons[i]
00767         );
00768         pButton->SetColor(clrLine);
00769       }
00770     }
00771   }
00772
00773   {
00774     CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
00775     m_wndRibbonBar.GetElementsByID(ID_OBJECT_LINEWEIGHT, arButtons);
00776
00777     if (arButtons.GetSize() > 0)
00778     {
00779       for (int i = 0; i < arButtons.GetSize(); i++)
00780       {
00781         CRibbonListButton* pButton = DYNAMIC_DOWNCAST
00782           (CRibbonListButton, arButtons[i]
00783         );
00784         pButton->SelectItem(nLineWeight);
00785       }
00786     }
00787   }
00788
00789   m_wndRibbonBar.RedrawWindow();
00790 }
00791
00792 void CMainFrame::CreateDocumentColors()
00793 {
00794   typedef struct
00795   {
00796     COLORREF color;
00797     TCHAR* szName;
00798   }
00799   ColorTableEntry;
00800
00801   int i = 0;
00802   int nNumColours = 0;
00803
00804   static ColorTableEntry colorsMain [] =
00805   {
00806     { RGB(255, 255, 255), _T("White, Background 1") },
00807     { RGB(0, 0, 0), _T("Black, Text 1") },
00808     { RGB(238, 236, 225), _T("Tan, Background 2") },
00809     { RGB(31, 73, 125), _T("Dark Blue, Text 2") },
00810     { RGB(79, 129, 189), _T("Blue, Accent 1") },
00811     { RGB(192, 80, 77), _T("Red, Accent 2") },
00812     { RGB(155, 187, 89), _T("Olive Green, Accent 3") },
00813     { RGB(128, 100, 162), _T("Purple, Accent 4") },
00814     { RGB(75, 172, 198), _T("Aqua, Accent 5") },
00815     { RGB(245, 150, 70), _T("Orange, Accent 6") }
00816   };
00817
00818   static ColorTableEntry colorsAdditional [] =
00819   {
00820     { RGB(242, 242, 242), _T("White, Background 1, Darker 5%") },
00821     { RGB(127, 127, 127), _T("Black, Text 1, Lighter 50%") },
00822     { RGB(214, 212, 202), _T("Tan, Background 2, Darker 10%") },
00823     { RGB(210, 218, 229), _T("Dark Blue, Text 2, Lighter 80%") },
00824     { RGB(217, 228, 240), _T("Blue, Accent 1, Lighter 80%") },
00825     { RGB(244, 219, 218), _T("Red, Accent 2, Lighter 80%") },
00826     { RGB(234, 241, 221), _T("Olive Green, Accent 3, Lighter 80%")},
00827     { RGB(229, 223, 235), _T("Purple, Accent 4, Lighter 80%") },
00828     { RGB(216, 237, 242), _T("Aqua, Accent 5, Lighter 80%") },
00829     { RGB(255, 234, 218), _T("Orange, Accent 6, Lighter 80%") },
00830     { RGB(215, 215, 215), _T("White, Background 1, Darker 15%") },
00831     { RGB(89, 89, 89), _T("Black, Text 1, Lighter 35%") },
00832     { RGB(177, 176, 167), _T("Tan, Background 2, Darker 25%") },
00833     { RGB(161, 180, 201), _T("Dark Blue, Text 2, Lighter 60%") },
00834     { RGB(179, 202, 226), _T("Blue, Accent 1, Lighter 60%") },
00835     { RGB(233, 184, 182), _T("Red, Accent 2, Lighter 60%") },
00836     { RGB(213, 226, 188), _T("Olive Green, Accent 3, Lighter 60%")},
00837     { RGB(203, 191, 215), _T("Purple, Accent 4, Lighter 60%") },
00838     { RGB(176, 220, 231), _T("Aqua, Accent 5, Lighter 60%") },
00839     { RGB(255, 212, 181), _T("Orange, Accent 6, Lighter 60%") },
00840     { RGB(190, 190, 190), _T("White, Background 1, Darker 25%") },
00841     { RGB(65, 65, 65), _T("Black, Text 1, Lighter 25%") },
00842     { RGB(118, 117, 112), _T("Tan, Background 2, Darker 35%") },
00843     { RGB(115, 143, 175), _T("Dark Blue, Text 2, Lighter 40%") },
00844     { RGB(143, 177, 213), _T("Blue, Accent 1, Lighter 40%") },
00845     { RGB(222, 149, 147), _T("Red, Accent 2, Lighter 40%") },
00846     { RGB(192, 213, 155), _T("Olive Green, Accent 3, Lighter 40%")},
00847     { RGB(177, 160, 197), _T("Purple, Accent 4, Lighter 40%") },
00848     { RGB(137, 203, 218), _T("Aqua, Accent 5, Lighter 40%") },
00849     { RGB(255, 191, 145), _T("Orange, Accent 6, Lighter 40%") },
00850     { RGB(163, 163, 163), _T("White, Background 1, Darker 35%") },
00851     { RGB(42, 42, 42), _T("Black, Text 1, Lighter 15%") },
00852     { RGB(61, 61, 59), _T("Tan, Background 2, Darker 50%") },
00853     { RGB(20, 57, 92), _T("Dark Blue, Text 2, Darker 25%") },
00854     { RGB(54, 96, 139), _T("Blue, Accent 1, Darker 25%") },
00855     { RGB(149, 63, 60), _T("Red, Accent 2, Darker 25%") },
00856     { RGB(114, 139, 71), _T("Olive Green, Accent 3, Darker 25%") },
00857     { RGB(97, 76, 119), _T("Purple, Accent 4, Darker 25%") },
00858     { RGB(41, 128, 146), _T("Aqua, Accent 5, Darker 25%") },
00859     { RGB(190, 112, 59), _T("Orange, Accent 6, Darker 25%") },
00860     { RGB(126, 126, 126), _T("White, Background 1, Darker 50%") },
00861     { RGB(20, 20, 20), _T("Black, Text 1, Lighter 5%") },
00862     { RGB(29, 29, 28), _T("Tan, Background 2, Darker 90%") },
00863     { RGB(17, 40, 64), _T("Dark Blue, Text 2, Darker 50%") },
00864     { RGB(38, 66, 94), _T("Blue, Accent 1, Darker 50%") },
00865     { RGB(100, 44, 43), _T("Red, Accent 2, Darker 50%") },
00866     { RGB(77, 93, 49), _T("Olive Green, Accent 3, Darker 50%") },
00867     { RGB(67, 53, 81), _T("Purple, Accent 4, Darker 50%") },
00868     { RGB(31, 86, 99), _T("Aqua, Accent 5, Darker 50%") },
00869     { RGB(126, 77, 42), _T("Orange, Accent 6, Darker 50%") },
00870   };
00871
00872   static ColorTableEntry colorsStandard [] =
00873   {
00874     { RGB(200, 15, 18), _T("Dark Red") },
00875     { RGB(255, 20, 24), _T("Red") },
00876     { RGB(255, 191, 40), _T("Orange") },
00877     { RGB(255, 255, 49), _T("Yellow") },
00878     { RGB(138, 207, 87), _T("Light Green") },
00879     { RGB(0, 175, 84), _T("Green") },
00880     { RGB(0, 174, 238), _T("Light Blue") },
00881     { RGB(0, 111, 189), _T("Blue") },
00882     { RGB(0, 36, 95), _T("Black") },
00883     { RGB(114, 50, 157), _T("Purple") },
00884   };
00885
00886   m_lstMainColors.RemoveAll();
00887   nNumColours = sizeof(colorsMain) / sizeof(ColorTableEntry);
00888
00889   for (i = 0; i < nNumColours; i++)
00890   {
00891     m_lstMainColors.AddTail(colorsMain [i].color);
00892     CMFCRibbonColorButton::SetColorName(colorsMain [i].color, colorsMain [i].szName);
00893   };
00894
00895   m_lstAdditionalColors.RemoveAll();
00896   nNumColours = sizeof(colorsAdditional) / sizeof(ColorTableEntry);
00897
00898   for (i = 0; i < nNumColours; i++)
00899   {
00900     m_lstAdditionalColors.AddTail(colorsAdditional [i].color);
00901     CMFCRibbonColorButton::SetColorName(colorsAdditional [i].color, colorsAdditional [i].szName);
00902   };
00903
00904   m_lstStandardColors.RemoveAll();
00905   nNumColours = sizeof(colorsStandard) / sizeof(ColorTableEntry);
00906
00907   for (i = 0; i < nNumColours; i++)
00908   {
00909     m_lstStandardColors.AddTail(colorsStandard [i].color);
00910     CMFCRibbonColorButton::SetColorName(colorsStandard [i].color, colorsStandard [i].szName);
00911   };
00912 }
00913
00914 COLORREF CMainFrame::GetColorFromColorButton(int nButtonID)
00915 {
00916   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
00917
00918   m_wndRibbonBar.GetElementsByID(nButtonID, arButtons);
00919
00920   if (arButtons.GetSize() == 0)
00921   {
00922     return(COLORREF) -1;
00923   }
00924
00925   CMFCRibbonColorButton* pColorButton = (CMFCRibbonColorButton*)arButtons.GetAt(0);
00926
00927   COLORREF clr = pColorButton->GetColor();
00928   if (clr == (COLORREF)-1)
00929   {
00930     clr = pColorButton->GetAutomaticColor();
00931   }
00932
00933   return clr;
00934 }
00935
00936 int CMainFrame::GetWeightFromLineWeight(int nButtonID)
00937 {
00938   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
00939
00940   m_wndRibbonBar.GetElementsByID(nButtonID, arButtons);
00941
00942   if (arButtons.GetSize() == 0)
00943   {
00944     return -1;
00945   }
00946
00947   int weight = -1;
00948   CMFCRibbonGallery* pBtn = DYNAMIC_DOWNCAST(CMFCRibbonGallery, arButtons.GetAt(0));
00949   if (pBtn != NULL && pBtn->GetSelectedItem() != -1)
00950   {
00951     weight = pBtn->GetSelectedItem() + 1;
00952   }
00953
00954   return weight;
00955 }
00956
00957 BOOL CMainFrame::GetStyleFromStyles(XStyle& style)
00958 {
00959   CArray<CMFCRibbonBaseElement*, CMFCRibbonBaseElement*> arButtons;
00960
00961   m_wndRibbonBar.GetElementsByID(ID_OBJECT_STYLES, arButtons);
00962
00963   if (arButtons.GetSize() == 0)
00964   {
00965     return FALSE;
00966   }
00967
00968   BOOL bRes = FALSE;
00969
00970   CMFCRibbonGallery* pBtn = DYNAMIC_DOWNCAST(CMFCRibbonGallery, arButtons.GetAt(0));
00971   if (pBtn != NULL && pBtn->GetSelectedItem() != -1)
00972   {
00973     style = c_Styles[pBtn->GetSelectedItem()];
00974     bRes = TRUE;
00975   }
00976
00977   return bRes;
00978 }
00979
00980 void CMainFrame::OnDummy()
00981 {
00982 }
00983
00984 LRESULT CMainFrame::OnHighlightRibbonListItem(WPARAM wp, LPARAM lp)
00985 {
00986   int nIndex = (int) wp;
00987
00988   CMFCRibbonBaseElement* pElem = (CMFCRibbonBaseElement*) lp;
00989   ASSERT_VALID(pElem);
00990
00991   const UINT uiCommand = pElem->GetID();
00992
00993   CFrameWnd* pFrame = GetActiveFrame();
00994   if (pFrame == NULL)
00995   {
00996     return 0;
00997   }
00998
00999   CDrawDoc* pDoc = (CDrawDoc*)pFrame->GetActiveDocument();
01000   if (pDoc == NULL)
01001   {
01002     return 0;
01003   }
01004
01005   ASSERT_VALID(pDoc);
01006
01007   CDrawView* pView = DYNAMIC_DOWNCAST(CDrawView, pFrame->GetActiveView());
01008   if (pView == NULL)
01009   {
01010     return 0;
01011   }
01012
01013   if (uiCommand != ID_VIEW_PAPERCOLOR)
01014   {
01015     if (nIndex != -1)
01016     {
01017       pView->StorePreviewState();
01018     }
01019     else
01020     {
01021       pView->RestorePreviewState();
01022     }
01023   }
01024
01025   switch (uiCommand)
01026   {
01027   case ID_VIEW_PAPERCOLOR:
01028   case ID_OBJECT_FILLCOLOR:
01029   case ID_OBJECT_LINECOLOR:
01030     {
01031       COLORREF color = ((CMFCRibbonColorButton*) pElem)->GetHighlightedColor();
01032
01033       if (uiCommand == ID_VIEW_PAPERCOLOR)
01034       {
01035         pDoc->SetPreviewColor(color);
01036       }
01037       else if (nIndex != -1)
01038       {
01039         if (uiCommand == ID_OBJECT_FILLCOLOR)
01040         {
01041           pView->PreviewFillColor(color);
01042         }
01043         else
01044         {
01045           pView->PreviewLineColor(color);
01046         }
01047       }
01048
01049       CMFCPopupMenu::UpdateAllShadows();
01050     }
01051     break;
01052
01053   case ID_OBJECT_LINEWEIGHT:
01054     if (nIndex != -1)
01055     {
01056       pView->PreviewLineWeight(nIndex + 1);
01057       CMFCPopupMenu::UpdateAllShadows();
01058     }
01059     break;
01060
01061   case ID_OBJECT_STYLES:
01062     if (nIndex != -1)
01063     {
01064       pView->PreviewStyle(c_Styles[nIndex].clrFill, c_Styles[nIndex].clrLine);
01065       CMFCPopupMenu::UpdateAllShadows();
01066     }
01067     break;
01068   }
01069
01070   return 0;
01071 }
01072
01073 void CMainFrame::SetRibbonContextCategory(UINT uiCategoryID)
01074 {
01075   if (uiCategoryID != 0)
01076   {
01077     CMFCRibbonCategory* pActivaTab = m_wndRibbonBar.GetActiveCategory();
01078     if (pActivaTab != NULL && pActivaTab->GetContextID() == uiCategoryID)
01079     {
01080       return;
01081     }
01082   }
01083
01084   BOOL bRecalc = m_wndRibbonBar.HideAllContextCategories();
01085
01086   if (uiCategoryID != 0)
01087   {
01088     m_wndRibbonBar.ShowContextCategories(uiCategoryID);
01089     bRecalc = TRUE;
01090   }
01091
01092   if (bRecalc)
01093   {
01094     m_wndRibbonBar.RecalcLayout();
01095     m_wndRibbonBar.RedrawWindow();
01096
01097     SendMessage(WM_NCPAINT, 0, 0);
01098   }
01099 }
01100
01101 void CMainFrame::ActivateRibbonContextCategory(UINT uiCategoryID)
01102 {
01103   if (m_wndRibbonBar.GetHideFlags() == 0)
01104   {
01105     m_wndRibbonBar.ActivateContextCategory(uiCategoryID);
01106   }
01107 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFigCommand Member List

This is the complete list of members for CFigCommand, including all inherited members.
CFigCommand() | CFigCommand | [inline]
m_co | CFigCommand |
m_dAnchorData | CFigCommand |
m_dWheelData | CFigCommand |
m_nPenWidth | CFigCommand |
m_point | CFigCommand |
m_ptWheelPos | CFigCommand |
m_type | CFigCommand |
Serialize(CArchive &ar) | CFigCommand | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDialogItem Member List

This is the complete list of members for CDialogItem, including all inherited members.
BUTTON enum value | CDialogItem |
CDialogItem(enum controltype cType) | CDialogItem |
CDialogItem() | CDialogItem | [inline]
controltype enum name | CDialogItem |
EDITCONTROL enum value | CDialogItem |
Initialize(enum controltype cType, UINT nID, CRect *prect=NULL, LPCTSTR pszCaption=NULL) | CDialogItem |
m_controltype | CDialogItem |
m_dlgItemTemplate | CDialogItem |
m_strCaption | CDialogItem |
STATICTEXT enum value | CDialogItem |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/resource.h Source File

  • general
  • DBVList

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DBVList.rc
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDD_ABOUTBOX                    100
00015 #define IDD_DBVLIST_FORM                101
00016 #define IDP_FAILED_OPEN_DATABASE        103
00017 #define IDR_MAINFRAME                   128
00018 #define IDR_DBVLISTYPE                  129
00019 #define IDC_DIV                         1000
00020 #define IDC_FETCH                       1005
00021
00022 // Next default values for new objects
00023 //
00024 #ifdef APSTUDIO_INVOKED
00025 #ifndef APSTUDIO_READONLY_SYMBOLS
00026 #define _APS_NEXT_RESOURCE_VALUE        131
00027 #define _APS_NEXT_COMMAND_VALUE         32771
00028 #define _APS_NEXT_CONTROL_VALUE         1006
00029 #define _APS_NEXT_SYMED_VALUE           101
00030 #endif
00031 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTestContainer98Item Member List

This is the complete list of members for CTestContainer98Item, including all inherited members.
ActsLikeButton() const | CTestContainer98Item |
AdjustRect(LPRECT prect) | CTestContainer98Item | [protected]
CanInPlaceActivate() | CTestContainer98Item | [protected]
CanWindowlessActivate() | CTestContainer98Item | [protected]
CleanupParams() | CTestContainer98Item | [protected]
CommitItem(BOOL bSuccess) | CTestContainer98Item |
ContextSensitiveHelp(BOOL tEnterMode) | CTestContainer98Item | [protected]
CopyParams(DISPPARAMS *pdpParams) | CTestContainer98Item | [protected]
CopyToClipboard(CArchive &ar, IStorage *pStorage) | CTestContainer98Item |
Create(REFCLSID clsid, LPCTSTR pszName=NULL) | CTestContainer98Item |
CreateFromClipboard(CArchive &ar, IStorage *pStorage) | CTestContainer98Item |
CreateOrLoad(REFCLSID clsid, LPCTSTR pszName, REFIID iidPersistanceMedium, IUnknown *pPeristanceMedium) | CTestContainer98Item |
CTestContainer98Item(CTestContainer98Doc *pContainer=NULL) | CTestContainer98Item |
DeactivateAndUndo() | CTestContainer98Item | [protected]
DiscardUndoState() | CTestContainer98Item | [protected]
DisplayAsDefault(BOOL tDefault) | CTestContainer98Item |
Draw(CDC *pDC, LPCRECT prectBounds, DVASPECT nDrawAspect=DVASPECT(-1)) | CTestContainer98Item |
DrawBackToFront(CDC *pDC, LPCRECT prectBounds) | CTestContainer98Item |
DrawFrontToBack(CDC *pDC, LPCRECT prectBounds) | CTestContainer98Item |
END_INTERFACE_PART(OleInPlaceSiteWindowless) | CTestContainer98Item | [protected]
FinishCreate(HRESULT hr) | CTestContainer98Item | [protected]
FreezeEvents(BOOL tFreeze) | CTestContainer98Item |
GetActivationPolicy() const | CTestContainer98Item |
GetActiveView() | CTestContainer98Item | [inline]
GetBindHost() | CTestContainer98Item | [protected]
GetCapture() | CTestContainer98Item | [protected]
GetControlInfo() | CTestContainer98Item | [protected]
GetDC(LPCRECT prect, DWORD dwFlags, HDC *phDC) | CTestContainer98Item | [protected]
GetDisplayName() | CTestContainer98Item |
GetDocument() | CTestContainer98Item | [inline]
GetEventInfo() | CTestContainer98Item |
GetExtendedControl(IDispatch **ppExtendedControl) | CTestContainer98Item | [protected]
GetFocus() | CTestContainer98Item | [protected]
GetIDsOfNames(REFIID iid, LPOLESTR *ppszNames, UINT nNames, LCID lcid, DISPID *pDispIDs) | CTestContainer98Item | [protected]
GetIDsOfNames(REFIID iid, LPOLESTR *ppszNames, UINT nNames, LCID lcid, DISPID *pDispIDs) | CTestContainer98Item | [protected]
GetInterfaceHook(const void *pv) | CTestContainer98Item |
GetMethodInfo() | CTestContainer98Item |
GetPropertyPageCLSIDs(CArray< CLSID, CLSID & > &aclsidPages) | CTestContainer98Item |
GetTypeInfo(UINT iTypeInfo, LCID lcid, ITypeInfo **ppTypeInfo) | CTestContainer98Item | [protected]
GetTypeInfo(UINT iTypeInfo, LCID lcid, ITypeInfo **ppTypeInfo) | CTestContainer98Item | [protected]
GetTypeInfoCount(UINT *pnInfoCount) | CTestContainer98Item | [protected]
GetTypeInfoCount(UINT *pnInfoCount) | CTestContainer98Item | [protected]
GetWindow(HWND *phWnd) | CTestContainer98Item | [protected]
GetWindowContext(IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT prectPos, LPRECT prectClip, LPOLEINPLACEFRAMEINFO pFrameInfo) | CTestContainer98Item | [protected]
HasUIActiveState() const | CTestContainer98Item |
HitTest(CPoint point) | CTestContainer98Item |
InitControlInfo() | CTestContainer98Item | [protected]
InvalidateItem() | CTestContainer98Item |
InvalidateRect(LPCRECT prect, BOOL tErase) | CTestContainer98Item | [protected]
InvalidateRgn(HRGN hRgn, BOOL tErase) | CTestContainer98Item | [protected]
Invoke(DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError) | CTestContainer98Item | [protected]
Invoke(DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdpParams, VARIANT *pvarResult, EXCEPINFO *pExceptionInfo, UINT *piArgError) | CTestContainer98Item | [protected]
InvokeMethods() | CTestContainer98Item |
IsInPlaceActive() const | CTestContainer98Item |
IsInsideOut() const | CTestContainer98Item |
IsInvisibleAtRuntime() const | CTestContainer98Item |
IsUIActive() const | CTestContainer98Item |
IsWindowless() const | CTestContainer98Item |
lindex | CTestContainer98Item | [protected]
LockInPlaceActive(BOOL tLock) | CTestContainer98Item | [protected]
m_dispidEvent | CTestContainer98Item |
m_dpLastParams | CTestContainer98Item |
m_dwAspectPass2 | CTestContainer98Item |
m_dwEventCookie | CTestContainer98Item |
m_dwMiscStatus | CTestContainer98Item |
m_dwPropertyCookie | CTestContainer98Item |
m_dwViewStatus | CTestContainer98Item |
m_infoControl | CTestContainer98Item | [protected]
m_infoEvents | CTestContainer98Item |
m_infoMethods | CTestContainer98Item |
m_pBindHost | CTestContainer98Item | [protected]
m_pCtlDispatch | CTestContainer98Item |
m_pDC | CTestContainer98Item | [protected]
m_pDropTarget | CTestContainer98Item |
m_pEventCP | CTestContainer98Item |
m_pExtendedControl | CTestContainer98Item |
m_pOleControl | CTestContainer98Item |
m_pOleInPlaceObjectWindowless | CTestContainer98Item |
m_pPointerInactive | CTestContainer98Item |
m_pPropertyCP | CTestContainer98Item |
m_pViewObjectEx | CTestContainer98Item |
m_rect | CTestContainer98Item |
m_strDisplayName | CTestContainer98Item | [protected]
m_tDisplayAsDefault | CTestContainer98Item |
m_tExtendedControl | CTestContainer98Item |
m_tInsideOut | CTestContainer98Item | [protected]
m_tracker | CTestContainer98Item | [protected]
m_tWindowless | CTestContainer98Item |
Move(const CRect &rect) | CTestContainer98Item |
OnActivate() | CTestContainer98Item | [virtual]
OnActivateUI() | CTestContainer98Item |
OnAmbientPropertyChange(DISPID dispid) | CTestContainer98Item |
OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam) | CTestContainer98Item | [virtual]
OnChanged(DISPID dispid) | CTestContainer98Item | [protected]
OnChangeItemPosition(const CRect &rectPos) | CTestContainer98Item | [protected, virtual]
OnControlInfoChanged() | CTestContainer98Item | [protected]
OnDeactivate() | CTestContainer98Item |
OnDeactivate(BOOL tNoRedraw) | CTestContainer98Item |
OnDeactivateUI(BOOL bUndoable) | CTestContainer98Item | [protected, virtual]
OnDefWindowMessage(UINT nMessage, WPARAM wParam, LPARAM lParam, LRESULT *plResult) | CTestContainer98Item | [protected]
OnDeselect() | CTestContainer98Item |
OnEvent(DISPID dispid, DISPPARAMS *pdpParams) | CTestContainer98Item | [virtual]
OnFocus(BOOL tGotFocus) | CTestContainer98Item | [protected]
OnFocus(BOOL tGotFocus) | CTestContainer98Item | [protected]
OnGetClipboardData(BOOL tIncludeLink, LPPOINT pptOffset, LPSIZE pSize) | CTestContainer98Item |
OnGetClipRect(CRect &rPosition) | CTestContainer98Item | [protected, virtual]
OnGetItemPosition(CRect &rPosition) | CTestContainer98Item | [protected, virtual]
OnInPlaceActivate() | CTestContainer98Item | [protected]
OnInPlaceActivateEx(BOOL *ptNoRedraw, DWORD dwFlags) | CTestContainer98Item | [protected]
OnInPlaceDeactivate() | CTestContainer98Item | [protected]
OnInPlaceDeactivateEx(BOOL tNoRedraw) | CTestContainer98Item | [protected]
OnPointerInactiveMove(CPoint point, DWORD dwKeyState) | CTestContainer98Item |
OnPointerInactiveSetCursor(CPoint point, DWORD dwMouseMessage, BOOL *ptHandled) | CTestContainer98Item |
OnPosRectChange(LPCRECT prectPos) | CTestContainer98Item | [protected]
OnRequestEdit(DISPID dispid) | CTestContainer98Item | [protected]
OnSelect() | CTestContainer98Item |
OnUIActivate() | CTestContainer98Item | [protected]
OnUIDeactivate(BOOL tUndoable) | CTestContainer98Item | [protected]
OnWindowlessDragEnter(COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect) | CTestContainer98Item |
OnWindowlessDragLeave() | CTestContainer98Item |
OnWindowlessDragOver(DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect) | CTestContainer98Item |
OnWindowlessDrop(COleDataObject *pDataObject, DWORD dwKeyState, CPoint point, DWORD *pdwDropEffect) | CTestContainer98Item |
OnWindowMessage(const MSG *pMessage) | CTestContainer98Item |
Prepare() | CTestContainer98Item |
pStgMedium | CTestContainer98Item | [protected]
QueryService(REFGUID guidService, REFIID iid, void **ppService) | CTestContainer98Item | [protected]
QuickActivate() | CTestContainer98Item |
ReadItem(CArchive &ar) | CTestContainer98Item |
Release(OLECLOSE dwCloseOption=OLECLOSE_NOSAVE) | CTestContainer98Item | [protected]
ReleaseDC(HDC hDC) | CTestContainer98Item | [protected]
RequestUIActivate() | CTestContainer98Item | [protected]
SaveToPropertyBag(IPropertyBag *pPropertyBag) | CTestContainer98Item |
SaveToStorage(IStorage *pStorage) | CTestContainer98Item |
SaveToStream(IStream *pStream) | CTestContainer98Item |
Scroll(SIZE sizeExtent) | CTestContainer98Item | [protected]
ScrollRect(int dx, int dy, LPCRECT prectScroll, LPCRECT prectClip) | CTestContainer98Item | [protected]
Serialize(CArchive &ar) | CTestContainer98Item | [protected, virtual]
SetCapture(BOOL tCapture) | CTestContainer98Item | [protected]
SetFocus(BOOL tFocus) | CTestContainer98Item | [protected]
SetLoggingOptions() | CTestContainer98Item |
ShouldActivateWhenVisible() | CTestContainer98Item |
ShowPropertyFrame() | CTestContainer98Item | [protected]
STDMETHOD_(void, OnClose)() | CTestContainer98Item | [protected]
STDMETHOD_(void, OnDataChange)(FORMATETC *pFormatEtc | CTestContainer98Item | [protected]
STDMETHOD_(void, OnRename)(IMoniker *pMoniker) | CTestContainer98Item | [protected]
STDMETHOD_(void, OnSave)() | CTestContainer98Item | [protected]
STDMETHOD_(void, OnViewChange)(DWORD dwAspect | CTestContainer98Item | [protected]
STDMETHOD_(void, OnViewStatusChange)(DWORD dwViewStatus) | CTestContainer98Item | [protected]
SupportsIPointerInactive() const | CTestContainer98Item |
TransformCoords(POINTL *pptHiMetric, POINTF *pptContainer, DWORD dwFlags) | CTestContainer98Item | [protected]
TranslateAccelerator(LPMSG pMessage, DWORD dwModifiers) | CTestContainer98Item | [protected]
UpdateFromServerExtent() | CTestContainer98Item |
UpdateStatusBar() | CTestContainer98Item |
WriteItem(CArchive &ar) | CTestContainer98Item |
~CTestContainer98Item() | CTestContainer98Item |
Generated on Sat Nov 23 2024 17:01:10 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/time.cpp Source File

  • controls
  • time

time.cpp

Go to the documentation of this file.
00001 // time.cpp : Implementation of CTimeApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "time.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021
00022 CTimeApp NEAR theApp;
00023
00024 const GUID CDECL BASED_CODE _tlid =
00025     { 0xdcf07690, 0xba7a, 0x101a, { 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f } };
00026 const WORD _wVerMajor = 1;
00027 const WORD _wVerMinor = 0;
00028
00029
00030 ////////////////////////////////////////////////////////////////////////////
00031 // CTimeApp::InitInstance - DLL initialization
00032
00033 BOOL CTimeApp::InitInstance()
00034 {
00035   BOOL bInit = COleControlModule::InitInstance();
00036
00037   if (bInit)
00038   {
00039     // TODO: Add your own module initialization code here.
00040   }
00041
00042   return bInit;
00043 }
00044
00045
00046 ////////////////////////////////////////////////////////////////////////////
00047 // CTimeApp::ExitInstance - DLL termination
00048
00049 int CTimeApp::ExitInstance()
00050 {
00051   // TODO: Add your own module termination code here.
00052
00053   return COleControlModule::ExitInstance();
00054 }
00055
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // DllRegisterServer - Adds entries to the system registry
00059
00060 STDAPI DllRegisterServer(void)
00061 {
00062   AFX_MANAGE_STATE(_afxModuleAddrThis);
00063
00064   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00065     return ResultFromScode(SELFREG_E_TYPELIB);
00066
00067   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00068     return ResultFromScode(SELFREG_E_CLASS);
00069
00070   return NOERROR;
00071 }
00072
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // DllUnregisterServer - Removes entries from the system registry
00076
00077 STDAPI DllUnregisterServer(void)
00078 {
00079   AFX_MANAGE_STATE(_afxModuleAddrThis);
00080
00081   if (!AfxOleUnregisterTypeLib(_tlid))
00082     return ResultFromScode(SELFREG_E_TYPELIB);
00083
00084   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00085     return ResultFromScode(SELFREG_E_CLASS);
00086
00087   return NOERROR;
00088 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMDIApp Member List

This is the complete list of members for CMDIApp, including all inherited members.
CMDIApp() | CMDIApp |
InitInstance() | CMDIApp | [virtual]
OnAppAbout() | CMDIApp |
OnNewBounce() | CMDIApp |
OnNewHello() | CMDIApp |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVList.cpp Source File

  • general
  • DBVList

DBVList.cpp

Go to the documentation of this file.
00001 // DBVList.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "DBVList.h"
00014
00015 #include "MainFrm.h"
00016 #include "DBVListSet.h"
00017 #include "DBVListDoc.h"
00018 #include "DBVListView.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CDBVListApp
00028
00029 BEGIN_MESSAGE_MAP(CDBVListApp, CWinApp)
00030   //{{AFX_MSG_MAP(CDBVListApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CDBVListApp construction
00037
00038 CDBVListApp::CDBVListApp()
00039 {
00040 }
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // The one and only CDBVListApp object
00044
00045 CDBVListApp theApp;
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CDBVListApp initialization
00049
00050 BOOL CDBVListApp::InitInstance()
00051 {
00052   AfxEnableControlContainer();
00053
00054   // Standard initialization
00055
00056   // Change the registry key under which our settings are stored.
00057   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00058
00059   LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)
00060
00061   // Register document templates
00062
00063   CSingleDocTemplate* pDocTemplate;
00064   pDocTemplate = new CSingleDocTemplate(
00065     IDR_MAINFRAME,
00066     RUNTIME_CLASS(CDBVListDoc),
00067     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00068     RUNTIME_CLASS(CDBVListView));
00069   AddDocTemplate(pDocTemplate);
00070
00071   // Parse command line for standard shell commands, DDE, file open
00072   CCommandLineInfo cmdInfo;
00073   ParseCommandLine(cmdInfo);
00074
00075   // Dispatch commands specified on the command line
00076   if (!ProcessShellCommand(cmdInfo))
00077     return FALSE;
00078   m_pMainWnd->ShowWindow(SW_SHOW);
00079   m_pMainWnd->UpdateWindow();
00080
00081   return TRUE;
00082 }
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // CAboutDlg dialog used for App About
00086
00087 class CAboutDlg : public CDialog
00088 {
00089 public:
00090   CAboutDlg();
00091
00092 // Dialog Data
00093   //{{AFX_DATA(CAboutDlg)
00094   enum { IDD = IDD_ABOUTBOX };
00095   //}}AFX_DATA
00096
00097   // ClassWizard generated virtual function overrides
00098   //{{AFX_VIRTUAL(CAboutDlg)
00099   protected:
00100   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00101   //}}AFX_VIRTUAL
00102
00103 // Implementation
00104 protected:
00105   //{{AFX_MSG(CAboutDlg)
00106     // No message handlers
00107   //}}AFX_MSG
00108   DECLARE_MESSAGE_MAP()
00109 };
00110
00111 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00112 {
00113   //{{AFX_DATA_INIT(CAboutDlg)
00114   //}}AFX_DATA_INIT
00115 }
00116
00117 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00118 {
00119   CDialog::DoDataExchange(pDX);
00120   //{{AFX_DATA_MAP(CAboutDlg)
00121   //}}AFX_DATA_MAP
00122 }
00123
00124 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00125   //{{AFX_MSG_MAP(CAboutDlg)
00126     // No message handlers
00127   //}}AFX_MSG_MAP
00128 END_MESSAGE_MAP()
00129
00130 // App command to run the dialog
00131 void CDBVListApp::OnAppAbout()
00132 {
00133   CAboutDlg aboutDlg;
00134   aboutDlg.DoModal();
00135 }
00136
00137 /////////////////////////////////////////////////////////////////////////////
00138 // CDBVListApp commands
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/shadow.cpp Source File

  • ole
  • oleview

shadow.cpp

Go to the documentation of this file.
00001
00002 // This is a part of the Microsoft Foundation Classes C++ library.
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 /************************************************************************
00012  *      Module:  shadow.c
00013  *
00014  ***********************************************************************/
00015
00016 #include "stdafx.h"
00017 #include "shadow.h"
00018 VOID NEAR PASCAL Draw3DLine1( HDC hDC, UINT x, UINT y, UINT nLen, UINT wFlags ) ;
00019 VOID NEAR PASCAL DrawFrame( HDC hDC, LPRECT lprc ) ;
00020
00021 #define SHADOWWIDTH  1
00022
00023 /****************************************************************
00024  *  VOID WINAPI tdDraw3DCrease( HDC hDC, LPRECT lprc, UINT uiFlags )
00025  *
00026  *  Description:
00027  *
00028  *
00029  *
00030  *  Comments:
00031  *
00032  ****************************************************************/
00033 VOID WINAPI tdDraw3DCrease( HDC hDC, LPRECT lpRect, UINT uiFlags )
00034 {
00035    RECT       rc ;
00036    COLORREF   rgbOld ;
00037
00038    rc = *lpRect ;
00039
00040    if (uiFlags & DRAW3D_OUT)
00041     OffsetRect( &rc, 1, 1 ) ;
00042
00043    rgbOld = SetBkColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ;
00044
00045    DrawFrame( hDC, &rc ) ;
00046
00047    if (uiFlags & DRAW3D_OUT)
00048     OffsetRect( &rc, -1, -1 ) ;
00049    else
00050     OffsetRect( &rc, 1, 1 ) ;
00051
00052
00053    SetBkColor( hDC, tdGetHighlightColor( rgbOld ) ) ;
00054
00055    DrawFrame( hDC, &rc ) ;
00056
00057    SetBkColor( hDC, rgbOld ) ;
00058
00059 } /* tdDraw3DCrease()  */
00060
00061 /** VOID WINAPI tdDraw3DRect( HDC, LPRECT, UINT, UINT )
00062  *
00063  *  DESCRIPTION:
00064  *      Draws a 3D rectangle that is shaded.  wFlags can be used to
00065  *      control how the rectangle looks.
00066  *
00067  *  ARGUMENTS:
00068  *      HDC hDC             :   Handle to the device context that will be
00069  *                              used to display the rectangle.
00070  *
00071  *      RECT rect           :   A rectangle describing the dimensions of
00072  *                              the rectangle in device coordinates.
00073  *
00074  *      UINT wShadowWidth   :   Width of the shadow in device coordinates.
00075  *
00076  *      UINT wFlags         :   The following flags may be passed to describe
00077  *                              the style of the rectangle:
00078  *
00079  *                              DRAW3D_IN   :   The shadow is drawn such that
00080  *                              the box appears to be sunk in to the screen.
00081  *                              This is default if 0 is passed.
00082  *
00083  *                              DRAW3D_OUT  :   The shadow is drawn such that
00084  *                              the box appears to be sticking out of the
00085  *                              screen.
00086  *
00087  *  RETURN (VOID WINAPI):
00088  *      The 3D looking rectangle will have been drawn into the DC.
00089  *
00090  *  NOTES:
00091  *
00092  ** cjp */
00093
00094 VOID WINAPI tdDraw3DRect( HDC hDC, LPRECT lpRect,
00095                  UINT uiShadowWidth, UINT uiFlags )
00096 {
00097    /* sanity check--don't work if you don't have to! */
00098    if ( !uiShadowWidth || !RectVisible( hDC, lpRect ) )
00099      return ;
00100
00101    if (uiFlags & DRAW3D_CREASE)
00102    {
00103     tdDraw3DCrease( hDC, lpRect, uiFlags ) ;
00104     return ;
00105    }
00106
00107    /* if width is 1 use lines instead of polygons */
00108    if (uiShadowWidth == 1)
00109    {
00110     /* draw the top line */
00111     Draw3DLine1( hDC, lpRect->left, lpRect->top,
00112            lpRect->right - lpRect->left,
00113            DRAW3D_TOPLINE | uiFlags ) ;
00114
00115     /* right line */
00116     Draw3DLine1( hDC, lpRect->right, lpRect->top,
00117            lpRect->bottom - lpRect->top,
00118            DRAW3D_RIGHTLINE | uiFlags ) ;
00119
00120     /* bottom line */
00121     Draw3DLine1( hDC, lpRect->left, lpRect->bottom,
00122            lpRect->right - lpRect->left,
00123            DRAW3D_BOTTOMLINE | uiFlags ) ;
00124
00125     /* left line */
00126     Draw3DLine1( hDC, lpRect->left, lpRect->top,
00127            lpRect->bottom - lpRect->top,
00128            DRAW3D_LEFTLINE | uiFlags ) ;
00129    }
00130    else
00131    {
00132     /* draw the top line */
00133     tdDraw3DLine( hDC, lpRect->left, lpRect->top,
00134            lpRect->right - lpRect->left,
00135            uiShadowWidth, DRAW3D_TOPLINE | uiFlags ) ;
00136
00137     /* right line */
00138     tdDraw3DLine( hDC, lpRect->right, lpRect->top,
00139            lpRect->bottom - lpRect->top,
00140            uiShadowWidth, DRAW3D_RIGHTLINE | uiFlags ) ;
00141
00142     /* bottom line */
00143     tdDraw3DLine( hDC, lpRect->left, lpRect->bottom,
00144            lpRect->right - lpRect->left,
00145            uiShadowWidth, DRAW3D_BOTTOMLINE | uiFlags ) ;
00146
00147     /* left line */
00148     tdDraw3DLine( hDC, lpRect->left, lpRect->top,
00149            lpRect->bottom - lpRect->top,
00150            uiShadowWidth, DRAW3D_LEFTLINE | uiFlags ) ;
00151    }
00152 } /* Draw3DRect() */
00153
00154
00155 /** VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT nLen,
00156  *
00157  *  DESCRIPTION:
00158  *      Draws a 3D line that can be used to make a 3D box.
00159  *
00160  *  ARGUMENTS:
00161  *      HDC hDC             :   Handle to the device context that will be
00162  *                              used to display the 3D line.
00163  *
00164  *      UINT x, y           :   Coordinates of the beginning of the line.
00165  *                              These coordinates are in device UINTs and
00166  *                              represent the _outside_ most point. Horiz-
00167  *                              ontal lines are drawn from left to right and
00168  *                              vertical lines are drawn from top to bottom.
00169  *
00170  *      UINT uiShadowWidth   :   Width of the shadow in device coordinates.
00171  *
00172  *      UINT  uiFlags        :   The following flags may be passed to
00173  *                              describe the style of the 3D line:
00174  *
00175  *                              DRAW3D_IN   :   The shadow is drawn such that
00176  *                              the box appears to be sunk in to the screen.
00177  *                              This is default if 0 is passed.
00178  *
00179  *                              DRAW3D_OUT  :   The shadow is drawn such that
00180  *                              the box appears to be sticking out of the
00181  *                              screen.
00182  *
00183  *                              DRAW3D_TOPLINE, _BOTTOMLINE, _LEFTLINE, and
00184  *                              _RIGHTLINE  :   Specifies that a "top",
00185  *                              "Bottom", "Left", or"Right" line is to be
00186  *                              drawn.
00187  *
00188  *  RETURN (VOID WINAPI):
00189  *      The line will have been drawn into the DC.
00190  *
00191  *  NOTES:
00192  *
00193  ** cjp */
00194
00195 VOID WINAPI tdDraw3DLine( HDC hDC, UINT x, UINT y, UINT uiLen,
00196                  UINT uiShadowWidth, UINT uiFlags )
00197 {
00198    HBRUSH  hBrush ;
00199    BOOL    fDark ;
00200    POINT   Point[ 4 ] ;         /* define a polgon with 4 points    */
00201
00202    /* if width is zero, don't do nothin'! */
00203    if ( !uiShadowWidth )
00204      return ;
00205
00206    /* if width is 1 use lines instead of polygons */
00207    if (uiShadowWidth == 1)
00208    {
00209     Draw3DLine1( hDC, x, y, uiLen, uiFlags ) ;
00210     return ;
00211    }
00212
00213    /* define shape of polygon--origin is always the same */
00214    Point[0].x = x ;
00215    Point[0].y = y ;
00216
00217    /*  To do this we'll simply draw a polygon with four sides, using
00218   *  the appropriate brush.  I dare you to ask me why this isn't a
00219   *  switch/case!
00220   */
00221    if ( uiFlags & DRAW3D_TOPLINE )
00222    {
00223      /* across to right */
00224      Point[1].x = x + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
00225      Point[1].y = y ;
00226
00227      /* down/left */
00228      Point[2].x = x + uiLen - uiShadowWidth ;
00229      Point[2].y = y + uiShadowWidth ;
00230
00231      /* accross to left */
00232      Point[3].x = x + uiShadowWidth ;
00233      Point[3].y = y + uiShadowWidth ;
00234
00235      /* select 'dark' brush if 'in'--'light' for 'out' */
00236      fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00237    }
00238
00239    /* possibly the bottom? */
00240    else if ( uiFlags & DRAW3D_BOTTOMLINE )
00241    {
00242      /* across to right */
00243      Point[1].x = x + uiLen ;
00244      Point[1].y = y ;
00245
00246      /* up/left */
00247      Point[2].x = x + uiLen - uiShadowWidth ;
00248      Point[2].y = y - uiShadowWidth ;
00249
00250      /* accross to left */
00251      Point[3].x = x + uiShadowWidth ;
00252      Point[3].y = y - uiShadowWidth ;
00253
00254      /* select 'light' brush if 'in' */
00255      fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00256    }
00257
00258    /* ok, it's gotta be left? */
00259    else if ( uiFlags & DRAW3D_LEFTLINE )
00260    {
00261      /* down */
00262      Point[1].x = x ;
00263      Point[1].y = y + uiLen - (uiShadowWidth == 1 ? 1 : 0) ;
00264
00265      /* up/right */
00266      Point[2].x = x + uiShadowWidth ;
00267      Point[2].y = y + uiLen - uiShadowWidth ;
00268
00269      /* down */
00270      Point[3].x = x + uiShadowWidth ;
00271      Point[3].y = y + uiShadowWidth ;
00272
00273      /* select 'dark' brush if 'in'--'light' for 'out' */
00274      fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00275    }
00276
00277    /* well maybe it's for the right side? */
00278    else if ( uiFlags & DRAW3D_RIGHTLINE )
00279    {
00280      /* down */
00281      Point[1].x = x ;
00282      Point[1].y = y + uiLen ;
00283
00284      /* up/left */
00285      Point[2].x = x - uiShadowWidth ;
00286      Point[2].y = y + uiLen - uiShadowWidth ;
00287
00288      /* up */
00289      Point[3].x = x - uiShadowWidth ;
00290      Point[3].y = y + uiShadowWidth ;
00291
00292      /* select 'light' brush if 'in' */
00293      fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00294    }
00295    else
00296     return ;
00297
00298    /* select NULL_PEN for no borders */
00299    SelectObject( hDC, GetStockObject( NULL_PEN ) ) ;
00300
00301    /* select the appropriate color for the fill */
00302    hBrush = CreateSolidBrush( GetNearestColor( hDC, fDark ?
00303                 tdGetShadowColor( GetBkColor( hDC ) ) :
00304                 tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;
00305
00306    hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;
00307
00308    /* finally, draw the dern thing */
00309    Polygon( hDC, (LPPOINT)Point, 4 ) ;
00310
00311    /* restore what we killed */
00312    hBrush = (HBRUSH)SelectObject( hDC, hBrush ) ;
00313
00314    DeleteObject( hBrush ) ;
00315
00316 } /*tdDraw3DLine() */
00317
00318
00319
00320 /****************************************************************
00321  *  COLORREF WINAPI tdGetHighLightColor( COLORREF rgb )
00322  *
00323  *  Description:
00324  *
00325  *    This function returns the highlight color that corresponds
00326  *    to the given rgb value.  If there is no "high intensity"
00327  *    color that matches, white is used (or yellow if the color
00328  *    is white).
00329  *
00330  *  Comments:
00331  *
00332  ****************************************************************/
00333 COLORREF WINAPI tdGetHighlightColor( COLORREF rgb )
00334 {
00335    BYTE  cRed, cGreen, cBlue ;
00336
00337   #if _MFC_VER >= 0x0300
00338     if (rgb == GetSysColor( COLOR_BTNFACE ))
00339       return GetSysColor( COLOR_BTNHIGHLIGHT ) ;
00340   #endif
00341
00342    if (rgb == RGBLTRED     ||
00343      rgb == RGBLTGREEN   ||
00344      rgb == RGBLTBLUE    ||
00345      rgb == RGBLTMAGENTA ||
00346      rgb == RGBLTCYAN    ||
00347      rgb == RGBLTGRAY    ||
00348      rgb == RGBYELLOW)
00349     return RGBWHITE ;
00350
00351    if (rgb == RGBWHITE)
00352     return RGBLTGRAY ;
00353
00354    if (rgb == RGBBLACK || rgb == RGBGRAY)
00355     return RGBLTGRAY ;
00356
00357    cRed = (BYTE)(rgb & 0x000000FF) ;
00358
00359    cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;
00360
00361    cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;
00362
00363    if (cRed == 128)
00364     cRed += 64 ;
00365
00366    if (cGreen == 128)
00367     cGreen += 64 ;
00368
00369    if (cBlue == 128)
00370     cBlue += 64 ;
00371
00372    return RGB( cRed, cGreen, cBlue ) ;
00373
00374 } /* tdGetHighlightColor()  */
00375
00376
00377 /****************************************************************
00378  *  COLORREF WINAPI tdGetShadowColor( COLORREF rgb )
00379  *
00380  *  Description:
00381  *
00382  *    Returns an appropriate shadow color for the given rgb.
00383  *
00384  *  Comments:
00385  *
00386  ****************************************************************/
00387 COLORREF WINAPI tdGetShadowColor( COLORREF rgb )
00388 {
00389   if (rgb == GetSysColor( COLOR_BTNFACE ))
00390     return GetSysColor( COLOR_BTNSHADOW ) ;
00391
00392    BYTE  cRed, cGreen, cBlue ;
00393
00394    if (rgb == RGBBLACK)
00395     return RGBGRAY ;
00396
00397    if (rgb == RGBRED     ||
00398      rgb == RGBGREEN   ||
00399      rgb == RGBBLUE    ||
00400      rgb == RGBBROWN   ||
00401      rgb == RGBMAGENTA ||
00402      rgb == RGBCYAN    ||
00403      rgb == RGBWHITE   ||
00404      rgb == RGBGRAY)
00405     return RGBBLACK ;
00406
00407    if (rgb == RGBLTGRAY)
00408     return RGBGRAY ;
00409
00410    cRed = (BYTE)(rgb & 0x000000FF) ;
00411
00412    cGreen = (BYTE)((rgb & 0x0000FF00) >> 8) ;
00413
00414    cBlue = (BYTE)((rgb & 0x00FF0000) >> 16) ;
00415
00416    if (cRed > 128)
00417     cRed -= 64 ;
00418
00419    if (cGreen > 128)
00420     cGreen -= 64 ;
00421
00422    if (cBlue > 128)
00423     cBlue -= 64 ;
00424
00425    return RGB( cRed, cGreen, cBlue ) ;
00426 } /* tdGetShadowColor()  */
00427
00428
00429 /*
00430  *====================================================================
00431  *  Internal functions
00432  *====================================================================
00433  */
00434
00435 /****************************************************************
00436  *  VOID NEAR PASCAL
00437  *   Draw3DLine1( HDC hDC, UINT x, UINT y, UINT uiLen, UINT uiFlags )
00438  *
00439  *  Description:
00440  *
00441  *    Does the same thing astdDraw3DLine but for single width lines.
00442  *
00443  *  Comments:
00444  *
00445  ****************************************************************/
00446 VOID NEAR PASCAL
00447    Draw3DLine1( HDC hDC, UINT x, UINT y, UINT uiLen, UINT uiFlags )
00448 {
00449    BOOL    fDark ;
00450    RECT    rc ;
00451    COLORREF   rgbOld ;
00452
00453    if ( uiFlags & DRAW3D_TOPLINE )
00454    {
00455     rc.left = x ;
00456     rc.right = rc.left + uiLen - 1 ;
00457     rc.top = y ;
00458     rc.bottom = y + 1 ;
00459
00460     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00461    }
00462
00463    /* possibly the bottom? */
00464    else if ( uiFlags & DRAW3D_BOTTOMLINE )
00465    {
00466     rc.left = x ;
00467     rc.right = rc.left + uiLen - 1 ;
00468     rc.top = y - 1 ;
00469     rc.bottom = y ;
00470
00471     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00472    }
00473
00474    /* ok, it's gotta be left? */
00475    else if ( uiFlags & DRAW3D_LEFTLINE )
00476    {
00477     rc.left = x ;
00478     rc.right = x + 1 ;
00479     rc.top = y ;
00480     rc.bottom = y + uiLen ;
00481
00482     fDark = ( uiFlags & DRAW3D_IN ) ? TRUE : FALSE ;
00483    }
00484
00485    /* well maybe it's for the right side? */
00486    else if ( uiFlags & DRAW3D_RIGHTLINE )
00487    {
00488     rc.left = x - 1 ;
00489     rc.right = x ;
00490     rc.top = y ;
00491     rc.bottom = y + uiLen ;
00492
00493     fDark = ( uiFlags & DRAW3D_IN ) ? FALSE : TRUE ;
00494    }
00495
00496    /* bad drugs? */
00497    else return ;
00498
00499    /* select the appropriate color for the fill */
00500    if ( fDark )
00501     rgbOld = SetBkColor( hDC,
00502          GetNearestColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ) ;
00503    else
00504     rgbOld = SetBkColor( hDC,
00505          GetNearestColor( hDC, tdGetHighlightColor( GetBkColor( hDC ) ) ) ) ;
00506
00507    /* finally, draw the dern thing */
00508
00509    ExtTextOut( hDC, x, y, ETO_OPAQUE, &rc, NULL, 0, NULL ) ;
00510
00511    SetBkColor( hDC, rgbOld ) ;
00512
00513 } /* Draw3DLine1()  */
00514
00515 VOID NEAR PASCAL DrawFrame( HDC hDC, LPRECT lprc )
00516 {
00517    RECT    rc1 ;
00518
00519    /* perform CopyRect w/o bloody windows style overhead */
00520    rc1 = *lprc ;
00521
00522    /* top */
00523    rc1.top = lprc->top ;
00524    rc1.left = lprc->left ;
00525    rc1.bottom = lprc->top + 1 ;
00526    rc1.right = lprc->right ;
00527
00528    /* blast it out */
00529    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00530
00531    /* right */
00532    rc1.left = lprc->right - 1 ;
00533    rc1.bottom = lprc->bottom ;
00534
00535    /* blast this part now */
00536    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00537
00538    /* left */
00539    rc1.left = lprc->left ;
00540    rc1.right = lprc->left + 1 ;
00541
00542    /* and another part */
00543    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00544
00545    /* bottom */
00546    rc1.right = lprc->right ;
00547    rc1.top = lprc->bottom - 1 ;
00548
00549    /* finish it off */
00550    ExtTextOut( hDC, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL ) ;
00551
00552 } /* DrawFaceFrame() */
00553
00554
00555 /************************************************************************
00556  * End of File: shadow.c
00557  ***********************************************************************/
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/toolbar1.cpp Source File

  • general
  • CmnCtrl1

toolbar1.cpp

Go to the documentation of this file.
00001 // ToolBar1.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "afxpriv.h"
00015 #include "CmnCtrl1.h"
00016 #include "Toolbar1.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CStandardBar
00026
00027 CStandardBar::CStandardBar() : m_pTBButtons(NULL)
00028 {
00029
00030 }
00031
00032 CStandardBar::~CStandardBar()
00033 {
00034   delete []m_pTBButtons;
00035 }
00036
00037
00038 BEGIN_MESSAGE_MAP(CStandardBar, CToolBarCtrl)
00039   //{{AFX_MSG_MAP(CStandardBar)
00040   ON_NOTIFY_RANGE( TTN_NEEDTEXTA, 0, 0xFFFF, OnNeedTextA)
00041   ON_NOTIFY_RANGE( TTN_NEEDTEXTW, 0, 0xFFFF, OnNeedTextW)
00042   //}}AFX_MSG_MAP
00043 END_MESSAGE_MAP()
00044
00045
00046 BOOL CStandardBar::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID )
00047 {
00048   BOOL bRet = CToolBarCtrl::Create(dwStyle, rect, pParentWnd, nID);
00049
00050   m_nButtonCount = ID_CONTEXTHELP - ID_NEW + 1;
00051
00052   VERIFY(AddBitmap(m_nButtonCount,IDR_STANDARDBAR) != -1);
00053
00054   m_pTBButtons = new TBBUTTON[m_nButtonCount];
00055
00056   int nIndex;
00057   for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
00058   {
00059     CString string;
00060     string.LoadString(nIndex + ID_NEW);
00061
00062     // Add second '\0'
00063     int nStringLength = string.GetLength() + 1;
00064     TCHAR * pString = string.GetBufferSetLength(nStringLength);
00065     pString[nStringLength] = 0;
00066
00067     VERIFY((m_pTBButtons[nIndex].iString = AddStrings(pString)) != -1);
00068
00069     string.ReleaseBuffer();
00070
00071
00072     m_pTBButtons[nIndex].fsState = TBSTATE_ENABLED;
00073     m_pTBButtons[nIndex].fsStyle = TBSTYLE_BUTTON;
00074     m_pTBButtons[nIndex].dwData = 0;
00075     m_pTBButtons[nIndex].iBitmap = nIndex;
00076     m_pTBButtons[nIndex].idCommand = nIndex + ID_NEW;
00077
00078   }
00079
00080   TBBUTTON sepButton;
00081   sepButton.idCommand = 0;
00082   sepButton.fsStyle = TBSTYLE_SEP;
00083   sepButton.fsState = TBSTATE_ENABLED;
00084   sepButton.iString = 0;
00085   sepButton.iBitmap = 0;
00086   sepButton.dwData = 0;
00087
00088   for (nIndex = 0; nIndex < m_nButtonCount; nIndex++)
00089   {
00090     VERIFY(AddButtons(1,&m_pTBButtons[nIndex]));
00091     if (!((nIndex +1) % 3))
00092     {
00093       VERIFY(AddButtons(1,&sepButton));
00094     }
00095   }
00096
00097
00098   return bRet;
00099 }
00100
00101
00102 /////////////////////////////////////////////////////////////////////////////
00103 // CStandardBar message handlers
00104
00105 // MFC routes the notifications sent to the parent of the control to
00106 // the control before the parent can process the notification.
00107 // The control object can handle the notification or ignore it.
00108 // If the notification is handled then return TRUE. Otherwise MFC
00109 // will route it to the parent of the control.
00110
00111 BOOL CStandardBar::OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult)
00112 {
00113   if (message == WM_NOTIFY)
00114   {
00115     NMHDR *pNMHDR = (NMHDR *) lParam;
00116     switch (pNMHDR->code)
00117     {
00118     case TBN_BEGINADJUST :
00119       return BeginAdjust(wParam,  lParam,  pLResult);
00120
00121     case TBN_BEGINDRAG:
00122       return BeginDrag(wParam,  lParam,  pLResult);
00123
00124     case TBN_CUSTHELP:
00125       return CustomizeHelp(wParam,  lParam,  pLResult);
00126
00127     case TBN_ENDADJUST:
00128       return EndAdjust(wParam,  lParam,  pLResult);
00129
00130     case TBN_ENDDRAG:
00131       return EndDrag(wParam,  lParam,  pLResult);
00132
00133     case TBN_GETBUTTONINFO:
00134       return GetButtonInfo(wParam,  lParam,  pLResult);
00135
00136     case TBN_QUERYDELETE:
00137       return QueryDelete(wParam,  lParam,  pLResult);
00138
00139     case TBN_QUERYINSERT:
00140       return QueryInsert(wParam,  lParam,  pLResult);
00141
00142     case TBN_RESET:
00143       return Reset(wParam, lParam,  pLResult);
00144
00145     case TBN_TOOLBARCHANGE:
00146       return ToolBarChange(wParam, lParam, pLResult);
00147     }
00148   }
00149
00150   return CToolBarCtrl::OnChildNotify(message, wParam, lParam, pLResult);
00151 }
00152
00153 BOOL CStandardBar::BeginAdjust(WPARAM /*wParam*/, LPARAM /*lParam*/, LRESULT* /*pLResult*/)
00154 {
00155   TRACE(_T("TBN_BEGINADJUST\n"));
00156
00157   // the customize dialog box is about to be displayed
00158
00159   // save toolbar state before customization using the dialog
00160   // Use this information to restore the state if reset button is pressed
00161   SaveState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Standard Tool Bar"));
00162
00163   return TRUE;
00164 }
00165
00166 BOOL CStandardBar::BeginDrag(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00167 {
00168   TRACE(_T("TBN_BEGINDRAG\n"));
00169
00170   // we are not implementing custon drag and drop
00171   * pLResult = FALSE;
00172   return FALSE;
00173 }
00174
00175 BOOL CStandardBar::CustomizeHelp(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* /*pLResult*/)
00176 {
00177   TRACE(_T("TBN_CUSTHELP\n"));
00178
00179   // Sample displays a message box but a valid help topic
00180   // can be displayed for the customize dialog for this toolbar
00181   AfxMessageBox(_T("Help not implemented!"));
00182
00183   return TRUE;
00184 }
00185
00186 BOOL CStandardBar::EndAdjust(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* /*pLResult*/)
00187 {
00188   TRACE(_T("TBN_ENDADJUST\n"));
00189
00190   // the customize dialog box has been closed
00191
00192   return TRUE;
00193 }
00194
00195 BOOL CStandardBar::EndDrag(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00196 {
00197   TRACE(_T("TBN_ENDDRAG\n"));
00198
00199   // Code to handle custom drag and drop. This message indicates that
00200   // the item is being dropped
00201   * pLResult = FALSE;
00202   return TRUE;
00203 }
00204
00205 BOOL CStandardBar::GetButtonInfo(WPARAM /*wParam*/, LPARAM  lParam, LRESULT* pLResult)
00206 {
00207   // This notification message has to be handled correctly if
00208   // all operations in the custom dialogbox has to function correctly
00209   // We have to supply information for the button specified by pTBN->tbButton
00210   //
00211   // This notification is sent in the following cases
00212   //
00213   // After TBN_BEGINADJUST the control sends these notifications until
00214   // * pLResult is TRUE. We have to supply valid values when this value is
00215   // set to TRUE. Here the control is collecting information for all
00216   // the buttons that have to be displayed in the dialog box
00217   //
00218   // The control sends this notification to get information about
00219   // a button if the user is trying to add it to the toolbar or
00220   // rearranging the buttons on the toolbar from within the dialog
00221
00222   TRACE(_T("TBN_GETBUTTONINFO\n"));
00223
00224   TBNOTIFY *pTBN = (TBNOTIFY *) lParam;
00225
00226   if (pTBN->iItem >= m_nButtonCount || pTBN->iItem < 0)
00227   {
00228     * pLResult = FALSE;
00229   }
00230   else
00231   {
00232     CString buffer;
00233     buffer.LoadString(pTBN->iItem + ID_NEW);
00234
00235     // set the string for the button
00236     // truncate the string if its length is greater than the buffer
00237     // supplied by the toolbar
00238     _tcsncpy_s(pTBN->pszText, pTBN->cchText, buffer, _TRUNCATE);
00239     pTBN->pszText[pTBN->cchText - 1] = '\0';
00240
00241     // set the button info
00242     pTBN->tbButton = m_pTBButtons[pTBN->iItem];
00243
00244     // valid values are structure
00245     *pLResult = TRUE;
00246   }
00247
00248   return TRUE;
00249 }
00250
00251 BOOL CStandardBar::QueryDelete(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00252 {
00253   TRACE(_T("TBN_QUERYDELETE\n"));
00254
00255   // in this sample any button can be deleted
00256   // if a particular button cannot be deleted set *pResult to FALSE for that item
00257   *pLResult = TRUE;
00258   return TRUE;
00259 }
00260
00261 BOOL CStandardBar::QueryInsert(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00262 {
00263   TRACE(_T("TBN_QUERYINSERT\n"));
00264
00265   // in this sample buttons can be inserted at any location on the
00266   // toolbar
00267   *pLResult = TRUE;
00268   return TRUE;
00269 }
00270
00271 BOOL CStandardBar::Reset(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* pLResult)
00272 {
00273   TRACE(_T("TBN_RESET\n"));
00274
00275   // User has pressed the reset button
00276   // restore the state of the toolbar to the state it was before customization
00277   RestoreState(HKEY_CURRENT_USER,_T("Software\\Microsoft\\VC70\\Samples\\CtrlDemo"),_T("Standard Tool Bar"));
00278
00279   *pLResult = TRUE;
00280   return TRUE;
00281 }
00282
00283 BOOL CStandardBar::ToolBarChange(WPARAM /*wParam*/, LPARAM  /*lParam*/, LRESULT* /*pLResult*/)
00284 {
00285   TRACE(_T("TBN_TOOLBARCHANGE\n"));
00286
00287   // the toolbar has changed
00288   return TRUE;
00289 }
00290
00291
00292 // Helper function for tooltips
00293
00294 CString CStandardBar::NeedText(UINT nID, NMHDR * pNotifyStruct, LRESULT* /*lResult*/)
00295 {
00296   LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct ;
00297   ASSERT(nID == lpTTT->hdr.idFrom);
00298
00299   CString toolTipText;
00300   toolTipText.LoadString(nID);
00301
00302   // szText length is 80
00303   int nLength = (toolTipText.GetLength() > 79) ? 79 : toolTipText.GetLength();
00304
00305   toolTipText = toolTipText.Left(nLength);
00306
00307   return toolTipText;
00308 }
00309
00310
00311 void CStandardBar::OnNeedTextW( UINT /*nID*/, NMHDR * pNotifyStruct, LRESULT* lResult )
00312 {
00313   size_t numchars;
00314
00315   if (pNotifyStruct->idFrom >= ID_NEW && pNotifyStruct->idFrom <= ID_CONTEXTHELP)
00316   {
00317     CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
00318     LPTOOLTIPTEXTW lpTTT = (LPTOOLTIPTEXTW)pNotifyStruct;
00319 #ifndef _UNICODE
00320     mbstowcs_s(&numchars, lpTTT->szText, TTT_BUF_SIZE, (LPCSTR)toolTipText, toolTipText.GetLength());
00321 #else
00322     _tcsncpy_s(lpTTT->szText, TTT_BUF_SIZE, toolTipText, toolTipText.GetLength());
00323 #endif
00324   }
00325 }
00326
00327 void CStandardBar::OnNeedTextA( UINT /*nID*/, NMHDR * pNotifyStruct, LRESULT * lResult )
00328 {
00329   if (pNotifyStruct->idFrom >= ID_NEW && pNotifyStruct->idFrom <= ID_CONTEXTHELP)
00330   {
00331     CString toolTipText = NeedText((UINT)pNotifyStruct->idFrom, pNotifyStruct, lResult);
00332     LPTOOLTIPTEXT lpTTT = (LPTOOLTIPTEXT)pNotifyStruct;
00333     _tcscpy_s(lpTTT->szText, TTT_BUF_SIZE, (LPCTSTR)toolTipText);
00334   }
00335 }
00336
00337
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/linkitem.h Source File

  • ole
  • superpad

linkitem.h

Go to the documentation of this file.
00001 // linkitem.h : interface of the CEmbeddedItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __LINKITEM_H__
00014 #define __LINKITEM_H__
00015
00016 class CPadDoc;
00017 class CPadView;
00018
00019 class CPadLinkItem : public CEmbeddedItem
00020 {
00021   DECLARE_DYNAMIC(CPadLinkItem)
00022
00023 // Constructors
00024 public:
00025   CPadLinkItem(CPadDoc* pContainerDoc, LPCTSTR pszItemName);
00026   CPadLinkItem(CPadDoc* pContainerDoc, int nFrom, int nTo);
00027
00028 protected:
00029   virtual void OnShow();
00030 };
00031
00032 #endif  // __LINKITEM_H__
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpiroApp Member List

This is the complete list of members for CSpiroApp, including all inherited members.
CSpiroApp() | CSpiroApp |
InitInstance() | CSpiroApp | [virtual]
m_cursorRing | CSpiroApp |
m_cursorWheel | CSpiroApp |
m_imageList | CSpiroApp |
OnAppAbout() | CSpiroApp |
SetLandscape() | CSpiroApp |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/childfrm.h Source File

  • general
  • snapvw

childfrm.h

Go to the documentation of this file.
00001 // ChildFrm.h : interface of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 class CChildFrame : public CMDIChildWnd
00015 {
00016   DECLARE_DYNCREATE(CChildFrame)
00017 public:
00018   CChildFrame();
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CChildFrame)
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   //}}AFX_VIRTUAL
00031
00032 // Implementation
00033 public:
00034   virtual ~CChildFrame();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 // Generated message map functions
00041 protected:
00042   //{{AFX_MSG(CChildFrame)
00043     // NOTE - the ClassWizard will add and remove member functions here.
00044     //    DO NOT EDIT what you see in these blocks of generated code!
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/ChildFrm.h Source File

  • vc2008fp
  • MDITabsDemo

ChildFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CChildFrame : public CMDIChildWndEx
00014 {
00015   DECLARE_DYNCREATE(CChildFrame)
00016 public:
00017   CChildFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00027   virtual void ActivateFrame(int nCmdShow);
00028
00029 // Implementation
00030 public:
00031   virtual ~CChildFrame();
00032 #ifdef _DEBUG
00033   virtual void AssertValid() const;
00034   virtual void Dump(CDumpContext& dc) const;
00035 #endif
00036
00037 protected:
00038   DECLARE_MESSAGE_MAP()
00039 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/StdAfx.cpp Source File

  • vc2008fp
  • ToolTipDemo

StdAfx.cpp

Go to the documentation of this file.
00001 //*******************************************************************************
00002 // COPYRIGHT NOTES
00003 // ---------------
00004 // This is a sample for BCGControlBar Library for Visual Studio
00005 // Copyright (C) 1998-2007 BCGSoft Ltd.
00006 // All rights reserved.
00007 //
00008 // This source code can be used, distributed or modified
00009 // only under terms and conditions
00010 // of the accompanying license agreement.
00011 //*******************************************************************************
00012 //
00013 // DO NOT REMOVE --- BEGIN EXTERNALLY DEVELOPED SOURCE CODE ID --- DO NOT REMOVE
00014 // $TAG BIZDEV
00015 // $DealPointID: 468154
00016 // $AgreementType: Inbound License
00017 // $External Origin: BCGSoft CO Ltd.
00018 // $ENDTAG DO NOT REMOVE --- END EXTERNALLY DEVELOPED SOURCE CODE ID --- DO NOT REMOVE
00019 //
00020 //*******************************************************************************
00021 //
00022 // stdafx.cpp : source file that includes just the standard includes
00023 //  TooltipDemo.pch will be the pre-compiled header
00024 //  stdafx.obj will contain the pre-compiled type information
00025
00026 #include "stdafx.h"
00027
00028
00029
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSetPaneSizeDoc Member List

This is the complete list of members for CSetPaneSizeDoc, including all inherited members.
CSetPaneSizeDoc() | CSetPaneSizeDoc | [protected]
OnNewDocument() | CSetPaneSizeDoc | [virtual]
Serialize(CArchive &ar) | CSetPaneSizeDoc | [virtual]
~CSetPaneSizeDoc() | CSetPaneSizeDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OptionsPages.h Source File

  • vc2008fp
  • VisualStudioDemo

OptionsPages.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "resource.h"
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // COptionsPage1 dialog
00016
00017 class COptionsPage1 : public CMFCPropertyPage
00018 {
00019   DECLARE_DYNCREATE(COptionsPage1)
00020
00021 // Construction
00022 public:
00023   COptionsPage1();
00024   ~COptionsPage1();
00025
00026   enum { IDD = IDD_OPTIONSPAGE1 };
00027
00028 // Overrides
00029 protected:
00030   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00031
00032 // Implementation
00033 protected:
00034   DECLARE_MESSAGE_MAP()
00035 };
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // COptionsPage12 dialog
00039
00040 class COptionsPage12 : public CMFCPropertyPage
00041 {
00042   DECLARE_DYNCREATE(COptionsPage12)
00043
00044 // Construction
00045 public:
00046   COptionsPage12();
00047   ~COptionsPage12();
00048
00049   enum { IDD = IDD_OPTIONSPAGE2 };
00050
00051 // Overrides
00052 protected:
00053   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00054
00055 // Implementation
00056 protected:
00057   DECLARE_MESSAGE_MAP()
00058 };
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // COptionsPage21 dialog
00062
00063 class COptionsPage21 : public CMFCPropertyPage
00064 {
00065   DECLARE_DYNCREATE(COptionsPage21)
00066
00067 // Construction
00068 public:
00069   COptionsPage21();
00070   ~COptionsPage21();
00071
00072   enum { IDD = IDD_OPTIONSPAGE3 };
00073
00074 // Overrides
00075 protected:
00076   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00077
00078 // Implementation
00079 protected:
00080   DECLARE_MESSAGE_MAP()
00081 };
00082
00083 /////////////////////////////////////////////////////////////////////////////
00084 // COptionsPage22 dialog
00085
00086 class COptionsPage22 : public CMFCPropertyPage
00087 {
00088   DECLARE_DYNCREATE(COptionsPage22)
00089
00090 // Construction
00091 public:
00092   COptionsPage22();
00093   ~COptionsPage22();
00094
00095   enum { IDD = IDD_OPTIONSPAGE4 };
00096
00097 // Overrides
00098 protected:
00099   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00100
00101 // Implementation
00102 protected:
00103   DECLARE_MESSAGE_MAP()
00104 };
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // COptionsPage31 dialog
00108
00109 class COptionsPage31 : public CMFCPropertyPage
00110 {
00111   DECLARE_DYNCREATE(COptionsPage31)
00112
00113 // Construction
00114 public:
00115   COptionsPage31();
00116   ~COptionsPage31();
00117
00118   enum { IDD = IDD_OPTIONSPAGE5 };
00119
00120 // Overrides
00121 protected:
00122   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00123
00124 // Implementation
00125 protected:
00126   DECLARE_MESSAGE_MAP()
00127 };
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // COptionsPage32 dialog
00131
00132 class COptionsPage32 : public CMFCPropertyPage
00133 {
00134   DECLARE_DYNCREATE(COptionsPage32)
00135
00136 // Construction
00137 public:
00138   COptionsPage32();
00139   ~COptionsPage32();
00140
00141   enum { IDD = IDD_OPTIONSPAGE6 };
00142
00143 // Overrides
00144 protected:
00145   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00146
00147 // Implementation
00148 protected:
00149   DECLARE_MESSAGE_MAP()
00150 };
00151
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagSTROKEINFO Member List

This is the complete list of members for tagSTROKEINFO, including all inherited members.
cbPnts | tagSTROKEINFO
cPnt | tagSTROKEINFO
dwTick | tagSTROKEINFO
wPdk | tagSTROKEINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CContainerInfoDlg Member List

This is the complete list of members for CContainerInfoDlg, including all inherited members.
CContainerInfoDlg(CWnd *pParent, CTestContainer98Doc *pDoc) | CContainerInfoDlg |
DoDataExchange(CDataExchange *pDX) | CContainerInfoDlg | [protected, virtual]
IDD enum value | CContainerInfoDlg |
m_listObjects | CContainerInfoDlg |
m_pDoc | CContainerInfoDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CContainerInfoDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CContainerInfoDlg | [protected]
OnInitDialog() | CContainerInfoDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/locresde.cpp Source File

  • controls
  • localize

locresde.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma warning(disable: 4201)
00011 #pragma warning(disable: 4514)
00012
00013 #include <windows.h>
00014
00015 int CALLBACK LibMain(HINSTANCE, WORD, WORD, LPSTR)
00016 {
00017   return 1;
00018 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/StdAfx.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

StdAfx.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // stdafx.cpp : source file that includes just the standard includes
00013 //  MSOffice2007Demo.pch will be the pre-compiled header
00014 //  stdafx.obj will contain the pre-compiled type information
00015
00016 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Resource.H Source File

  • ole
  • TstCon

Resource.H

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by TstCon.rc
00004 //
00005 #define IDC_FILENAME_BROWSE             3
00006 #define IDR_TC98TYPE_CNTR_IP            6
00007 #define IDD_ABOUTBOX                    100
00008 #define IDP_OLE_INIT_FAILED             100
00009 #define IDS_SCRIPT_FILES                101
00010 #define IDP_FAILED_TO_CREATE            102
00011 #define IDC_OUTPUTWINDOW                102
00012 #define IDC_MACROBAR                    103
00013 #define IDS_STREAM_FILES                103
00014 #define IDS_STORAGE_FILES               104
00015 #define IDR_MAINFRAME                   128
00016 #define IDR_TC98TYPE                    129
00017 #define IDR_CONTAINER_CONTEXT           130
00018 #define IDR_CONTROL_CONTEXT             131
00019 #define IDD_METHOD                      134
00020 #define IDD_AMBIENTPROPERTIES           135
00021 #define IDD_CONTAINEROPTIONS_FEATURES   136
00022 #define IDD_CONTAINEROPTIONS_INTERFACES 137
00023 #define IDD_CONTAINERINFO               138
00024 #define IDD_PROPERTYBAG                 140
00025 #define IDD_REGISTERCONTROLS            142
00026 #define IDD_MACROBAR                    143
00027 #define IDD_LOGGING                     145
00028 #define IDD_OUTPUTWINDOW                146
00029 #define IDD_TABORDER                    147
00030 #define IDD_CONTROLLOGGING_EVENTS       149
00031 #define IDD_CONTROLLOGGING_PROPERTYCHANGES 150
00032 #define IDD_CONTROLLOGGING_PROPERTYEDITREQUESTS 151
00033 #define IDD_INSERTCONTROL               152
00034 #define IDD_CATEGORIES                  153
00035 #define IDD_NEWAMBIENTPROPERTY          154
00036 #define IDD_OBJECTSAFETY                155
00037 #define IDD_COMPONENTCATEGORIES         156
00038 #define IDD_CONTAINEROPTIONS_SERVICES   157
00039 #define IDD_MACRO                       159
00040 #define IDR_OUTPUTLOGEDIT_CONTEXT       168
00041 #define ID_CLOSE                        1001
00042 #define ID_CLEAR                        1002
00043 #define IDC_ALLOWEDIT_ALWAYS            1003
00044 #define IDC_ALLOWEDIT_NEVER             1004
00045 #define IDC_ALLOWEDIT_PROMPT            1005
00046 #define IDC_METHODNAME                  1008
00047 #define IDC_PARAMVALUE                  1011
00048 #define IDC_PARAMTYPE                   1012
00049 #define IDC_SETVALUE                    1013
00050 #define IDC_PARAMS                      1014
00051 #define IDC_INVOKE                      1015
00052 #define IDC_RETURNVALUE                 1016
00053 #define IDC_EXCEPTIONSOURCE             1017
00054 #define IDC_EXCEPTIONDESC               1018
00055 #define IDC_EXCEPTIONHELP               1019
00056 #define IDC_CHOOSECOLOR                 1020
00057 #define IDC_CHOOSEFONT                  1021
00058 #define IDC_PROPNAME                    1022
00059 #define IDC_ENABLED                     1023
00060 #define IDC_PROPVALUE                   1024
00061 #define IDC_PROPTYPE                    1027
00062 #define IDC_ALLOWWINDOWLESS             1028
00063 #define IDC_IOLEINPLACESITEEX           1029
00064 #define IDC_TWOPASSDRAWING              1029
00065 #define IDC_IOLEINPLACESITEWINDOWLESS   1030
00066 #define IDC_OBJECTS                     1030
00067 #define IDC_IGNOREACTIVATEWHENVISIBLE   1030
00068 #define IDC_EVENTS                      1031
00069 #define IDC_USEIPOINTERINACTIVE         1031
00070 #define IDC_IADVISESINKEX               1031
00071 #define IDC_PROPERTIES                  1032
00072 #define IDC_USEQUICKACTIVATION          1032
00073 #define IDC_REGISTEREDCONTROLS          1034
00074 #define IDC_UNREGISTER                  1035
00075 #define IDC_REGISTER                    1036
00076 #define IDC_REREGISTER                  1037
00077 #define IDC_TRACELEVEL                  1038
00078 #define IDC_MACRO                       1038
00079 #define IDC_LOGTODEBUG                  1039
00080 #define IDC_LOGTOFILE                   1040
00081 #define IDC_FILENAME                    1041
00082 #define IDC_LOGTONULL                   1042
00083 #define IDC_LOGTOOUTPUT                 1043
00084 #define IDC_TABORDER                    1043
00085 #define IDC_CLEAROUTPUTWINDOW           1047
00086 #define IDC_ALWAYS                      1048
00087 #define IDC_NEVER                       1049
00088 #define IDC_PROMPT                      1050
00089 #define IDC_SELECTALL                   1051
00090 #define IDC_CONTROLS                    1053
00091 #define IDC_AVAILABLECATEGORIES         1055
00092 #define IDC_IMPLEMENTEDCATEGORIES       1056
00093 #define IDC_REMOVE                      1057
00094 #define IDC_REQUIREDCATEGORIES          1057
00095 #define IDC_ADD                         1058
00096 #define IDC_IGNOREREQUIREDCATEGORIES    1058
00097 #define IDC_NEWPROPERTY                 1059
00098 #define IDC_DISPID                      1060
00099 #define IDC_REMOVEALL                   1063
00100 #define IDC_CATEGORIES                  1064
00101 #define IDC_SBINDHOST                   1065
00102 #define IDC_MACROS                      1066
00103 #define IDC_OPENFILE                    1067
00104 #define IDC_STATIC_PROPERTYVALUE        1069
00105 #define IDC_STATIC_PARAMETERVALUE       1070
00106 #define IDC_CHOOSEFONT_AMBIENT          1072
00107 #define IDC_CHOOSECOLOR_AMBIENT         1073
00108 #define IDC_DISPID_NEW                  1074
00109 #define IDC_PROPERTIES_CHANGES          1075
00110 #define IDC_PROPERTIES_EDITREQUESTS     1076
00111 #define IDC_SELECTALL_EDITREQUESTS      1077
00112 #define IDC_PROPNAME_NEW                1078
00113 #define IDC_SETVALUE_AMBIENT            1079
00114 #define IDC_SERVERPATH                  1083
00115 #define IDC_DATE                        1084
00116 #define IDC_PROPVALUECOMBO_AMBIENT      1086
00117 #define IDC_DATE_AMBIENT                1087
00118 #define IDC_PARAMVALUECOMBO             1089
00119 #define IDC_OUTPUT                      1300
00120 #define ID_CANCEL_EDIT_CNTR             32768
00121 #define ID_EDIT_DELETE                  32771
00122 #define ID_VIEW_NOTIFICATIONLOG         32774
00123 #define ID_VIEW_EVENTLOG                32775
00124 #define ID_OPTIONS_FREEZEEVENTS         32776
00125 #define ID_EDIT_INSERTCONTROL           32777
00126 #define ID_OPTIONS_USERMODE             32778
00127 #define ID_OPTIONS_DESIGNMODE           32779
00128 #define ID_EDIT_INVOKEMETHODS           32780
00129 #define ID_EDIT_AMBIENTPROPERTIES       32781
00130 #define ID_EDIT_EMBEDDEDOBJECTFUNCTIONS_ACTIVATE 32782
00131 #define ID_EDIT_EMBEDDEDOBJECT_ACTIVATE 32783
00132 #define ID_OPTIONS_CONTAINERPROPERTIES  32784
00133 #define ID_OPTIONS_CONTAINEROPTIONS     32785
00134 #define ID_VIEW_CONTAINERINFO           32786
00135 #define ID_OBJECT_SAVETOSTREAM          32787
00136 #define ID_CONTROL_SAVETOSTREAM         32788
00137 #define ID_EDIT_LOADOBJECTFROMSTREAM    32789
00138 #define ID_EDIT_INSERTFROMSTREAM        32790
00139 #define ID_FILE_SAVETOSTREAM            32792
00140 #define ID_FILE_LOADFROMSTREAM          32793
00141 #define ID_CONTROL_EVENTLOGGING         32795
00142 #define ID_CONTROL_SAVETOPROPERTYBAG    32797
00143 #define ID_OPTIONS_TRACELEVEL_NONE      32801
00144 #define ID_OPTIONS_TRACELEVEL_NORMAL    32803
00145 #define ID_OPTIONS_TRACELEVEL_VERBOSE   32805
00146 #define ID_FILE_REGISTERCONTROLS        32806
00147 #define ID_TWOPASSDRAWING               32809
00148 #define ID_SLOWDRAWING                  32811
00149 #define ID_OPTIONS_SLOWDRAWING          32812
00150 #define ID_OPTIONS_TWOPASSDRAWING       32813
00151 #define ID_OPTIONS_LOGGING              32814
00152 #define ID_CONTROL_INVOKEMETHODS        32815
00153 #define ID_CONTAINER_OPTIONS            32816
00154 #define ID_CONTAINER_AMBIENTPROPERTIES  32817
00155 #define ID_CONTAINER_INFO               32818
00156 #define ID_EDIT_DELETEALL               32819
00157 #define ID_CONTAINER_TABORDER           32821
00158 #define IDC_CONTROL_LOGGING             32822
00159 #define ID_CONTROL_LOGGING              32823
00160 #define ID_CONTROL_SAVETOSUBSTORAGE     32824
00161 #define ID_EDIT_INSERTCONTROLFROMSUBSTORAGE 32825
00162 #define ID_VIEW_OUTPUT_WINDOW           32826
00163 #define ID_CONTROL_ACTIVATE             32832
00164 #define ID_CONTROL_DEACTIVATE           32833
00165 #define ID_CONTROL_UIACTIVATE           32834
00166 #define ID_CONTROL_UIDEACTIVATE         32835
00167 #define ID_EDIT_BRINGTOFRONT            32836
00168 #define ID_EDIT_SENDTOBACK              32837
00169 #define ID_EDIT_MULTISELPROPERTIES      32838
00170 #define ID_TOOLS_RUNSCRIPT              32839
00171 #define ID_EDIT_SELECTALL               32841
00172 #define ID_TOOLS_OLEVIEW                32846
00173 #define ID_TOOLS_REGEDIT                32847
00174 #define ID_EDIT_PROPERTIES              32848
00175 #define ID_CONTROL_SAVETOSTORAGE        32850
00176 #define ID_EDIT_INSERTCONTROLFROMSTORAGE 32851
00177 #define ID_TOOLS_MACROS                 32853
00178 #define ID_CONTROL_DRAWMETAFILE         32855
00179 #define ID_RUNMACRO                     32856
00180 #define ID_OUTPUTLOGEDIT_CLEAR          32857
00181 #define ID_OUTPUTLOGEDIT_COPY           32858
00182 #define ID_OUTPUTLOGEDIT_HIDE           32859
00183 #define ID_VIEW_MACROBAR                32860
00184 #define IDS_BOUNDPROP_CHANGED           61446
00185 #define IDS_BOUNDPROP_REQUESTEDIT       61447
00186 #define IDS_AMODENAME_USERMODE          61448
00187 #define IDS_APROPNAME_USERMODE          61448
00188 #define IDS_AMODENAME_UIDEAD            61449
00189 #define IDS_APROPNAME_UIDEAD            61449
00190 #define IDS_AMODENAME_SHOWHATCHING      61450
00191 #define IDS_APROPNAME_SHOWHATCHING      61450
00192 #define IDS_AMODENAME_SHOWGRABHANDLES   61451
00193 #define IDS_APROPNAME_SHOWGRABHANDLES   61451
00194 #define IDS_APROPNAME_TEXTALIGN         61452
00195 #define IDS_APROPNAME_BACKCOLOR         61453
00196 #define IDS_APROPNAME_FORECOLOR         61454
00197 #define IDS_APROPNAME_FONT              61455
00198 #define IDS_APROPNAME_DISPLAYNAME       61456
00199 #define IDS_APROPNAME_SCALEUNITS        61457
00200 #define IDS_APROPNAME_MESSAGEREFLECT    61458
00201 #define IDS_APROPNAME_LOCALEID          61459
00202 #define IDS_VTBOOL                      61460
00203 #define IDS_APROPNAME_SUPPORTSMNEMONICS 61460
00204 #define IDS_VTI2                        61461
00205 #define IDS_UNREGISTERSERVERFAILED      61461
00206 #define IDS_VTI4                        61462
00207 #define IDS_CONTAINERINFOOBJECTHEADER   61462
00208 #define IDS_VTFONT                      61463
00209 #define IDS_CONTAINERINFOSTATEHEADER    61463
00210 #define IDS_VTBSTR                      61464
00211 #define IDS_ACTIVESTATE                 61464
00212 #define IDS_VTCOLOR                     61465
00213 #define IDS_UIACTIVESTATE               61465
00214 #define IDS_LOADEDSTATE                 61466
00215 #define IDS_OPENSTATE                   61467
00216 #define IDS_EMPTYSTATE                  61468
00217 #define IDS_LOGEVENTFORMAT              61469
00218 #define IDS_UNKNOWNDISPIDFORMAT         61470
00219 #define IDS_LOGPROPERTYCHANGEFORMAT     61471
00220 #define IDS_LOGPROPERTYREQUESTEDITFORMAT 61472
00221 #define IDS_PARAMETER                   61473
00222 #define IDS_VALUE                       61474
00223 #define IDS_TYPE                        61475
00224 #define IDS_UNABLETOREPRESENT           61476
00225 #define IDS_PROPERTYVALUE               61477
00226 #define IDS_PROPERTY                    61478
00227 #define IDS_PROGID                      61479
00228 #define IDS_PATH                        61480
00229 #define IDS_CONTROLLOGGINGOPTIONS       61481
00230 #define IDS_CONTAINEROPTIONS            61482
00231 #define IDS_PROPERTYEDITREQUESTFORMAT   61483
00232 #define IDS_PROPERTYEDITALLOWED         61484
00233 #define IDS_PROPERTYEDITDENIED          61485
00234 #define IDS_SAVETOSTREAMFAILED          61486
00235 #define IDS_ERRORWRITINGTOFILE          61487
00236 #define IDS_ERRORREADINGFROMFILE        61488
00237 #define IDS_SAVETOPROPERTYBAGFAILED     61489
00238 #define IDS_IMPLEMENTEDCATEGORIES       61490
00239 #define IDS_REQUIREDCATEGORIES          61491
00240 #define IDS_CONTROLHASNOMETHODS         61492
00241 #define IDS_NEWPROPERTY                 61493
00242 #define IDS_CREATEFAILED                61494
00243 #define IDS_CONTAINERINFOWINDOWHEADER   61495
00244 #define IDS_WINDOWED                    61496
00245 #define IDS_WINDOWLESS                  61497
00246 #define IDS_NOCOMMONPROPERTIES          61498
00247 #define IDS_MULTIPLESELECTION           61499
00248 #define IDS_DISPATCHEXCEPTION           61500
00249 #define IDS_SCRIPTERRORFORMAT           61501
00250 #define IDS_SAVETOSTORAGEFAILED         61502
00251 #define IDS_NODFVIEW                    61503
00252 #define IDS_NOOLEVIEW                   61504
00253 #define IDS_OPENSTORAGEFAILED           61505
00254 #define IDS_LOADCONTROLFAILED           61506
00255 #define IDS_COPYFAILED                  61507
00256 #define IDS_METAFILEWINDOWTITLE         61508
00257 #define IDS_NOSCRIPTING                 61509
00258 #define IDS_ERRORLOADINGSCRIPT          61510
00259 #define IDS_OUTPUTWINDOWTITLE           61511
00260 #define IDS_UNSPECIFIEDSOURCE           61512
00261 #define IDS_UNSPECIFIEDEXCEPTION        61513
00262 #define IDS_SERVERNOTFOUND              61514
00263 #define IDS_NOPROPERTYPAGES             61515
00264 #define IDS_FALSE                       61516
00265 #define IDS_TRUE                        61517
00266
00267 // Next default values for new objects
00268 //
00269 #ifdef APSTUDIO_INVOKED
00270 #ifndef APSTUDIO_READONLY_SYMBOLS
00271 #define _APS_3D_CONTROLS                     1
00272 #define _APS_NEXT_RESOURCE_VALUE        172
00273 #define _APS_NEXT_COMMAND_VALUE         32862
00274 #define _APS_NEXT_CONTROL_VALUE         1090
00275 #define _APS_NEXT_SYMED_VALUE           104
00276 #endif
00277 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpCtl.cpp Source File

  • controls
  • testhelp

ThelpCtl.cpp

Go to the documentation of this file.
00001 // ThelpCtl.cpp : Implementation of the CTesthelpCtrl OLE control class.
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "testhelp.h"
00014 #include "ThelpCtl.h"
00015 #include "ThelpPpg.h"
00016 #include <msstkppg.h>
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 // This help id is also defined and used in the
00026 // testhelp.hpj help project file.  It references
00027 // a topic in the testhelp.hlp help file.
00028
00029 IMPLEMENT_DYNCREATE(CTesthelpCtrl, COleControl)
00030
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // Message map
00034
00035 BEGIN_MESSAGE_MAP(CTesthelpCtrl, COleControl)
00036     //{{AFX_MSG_MAP(CTesthelpCtrl)
00037     ON_WM_CREATE()
00038     ON_WM_LBUTTONDOWN()
00039     ON_WM_LBUTTONUP()
00040     ON_WM_MOUSEMOVE()
00041     //}}AFX_MSG_MAP
00042
00043     ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00044
00045     ON_MESSAGE(WM_HELP, OnHelpCommand)  //We'll respond to the WM_HELP message
00046 END_MESSAGE_MAP()
00047
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // Dispatch map
00051
00052 BEGIN_DISPATCH_MAP(CTesthelpCtrl, COleControl)
00053       //{{AFX_DISPATCH_MAP(CTesthelpCtrl)
00054       DISP_PROPERTY_NOTIFY(CTesthelpCtrl, "Name1", m_szName1, OnName1Changed, VT_BSTR)
00055       DISP_PROPERTY_NOTIFY(CTesthelpCtrl, "Name2", m_szName2, OnName2Changed, VT_BSTR)
00056       DISP_PROPERTY_NOTIFY(CTesthelpCtrl, "Name3", m_szName3, OnName3Changed, VT_BSTR)
00057       DISP_PROPERTY_NOTIFY(CTesthelpCtrl, "UseMyHelp", m_bUseMyHelp, OnUseMyHelpChanged, VT_BOOL)
00058       DISP_PROPERTY_NOTIFY(CTesthelpCtrl, "ShowToolTip", m_bShowToolTip, OnShowToolTipChanged, VT_BOOL)
00059       DISP_PROPERTY_NOTIFY(CTesthelpCtrl, "ToolTipText", m_szToolTipText, OnToolTipTextChanged, VT_BSTR)
00060       DISP_PROPERTY_NOTIFY(CTesthelpCtrl, "UsePopupHelp", m_nUsePopupHelp, OnUsePopupHelpChanged, VT_I2)
00061       DISP_STOCKPROP_FONT()
00062       DISP_STOCKPROP_BACKCOLOR()
00063       DISP_STOCKPROP_FORECOLOR()
00064       DISP_STOCKPROP_BORDERSTYLE()
00065   //}}AFX_DISPATCH_MAP
00066       DISP_FUNCTION_ID(CTesthelpCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00067 END_DISPATCH_MAP()
00068
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // Event map
00072
00073 BEGIN_EVENT_MAP(CTesthelpCtrl, COleControl)
00074       //{{AFX_EVENT_MAP(CTesthelpCtrl)
00075       // NOTE - ClassWizard will add and remove event map entries
00076       //    DO NOT EDIT what you see in these blocks of generated code !
00077       //}}AFX_EVENT_MAP
00078 END_EVENT_MAP()
00079
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // Property pages
00083
00084 // TODO: Add more property pages as needed.  Remember to increase the count!
00085 BEGIN_PROPPAGEIDS(CTesthelpCtrl, 3)
00086       PROPPAGEID(CTesthelpPropPage::guid)
00087       // added stock property pages
00088       PROPPAGEID(CLSID_StockColorPage);
00089       PROPPAGEID(CLSID_StockFontPage);
00090
00091 END_PROPPAGEIDS(CTesthelpCtrl)
00092
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // Initialize class factory and guid
00096
00097 IMPLEMENT_OLECREATE_EX(CTesthelpCtrl, "TESTHELP.TesthelpCtrl.1",
00098   0x31a2b283, 0x8c11, 0x11cf, 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50)
00099
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // Type library ID and version
00103
00104 IMPLEMENT_OLETYPELIB(CTesthelpCtrl, _tlid, _wVerMajor, _wVerMinor)
00105
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // Interface IDs
00109
00110 const IID BASED_CODE IID_DTesthelp =
00111     { 0x31a2b281, 0x8c11, 0x11cf, { 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50 } };
00112 const IID BASED_CODE IID_DTesthelpEvents =
00113     { 0x31a2b282, 0x8c11, 0x11cf, { 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50 } };
00114
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // Control type information
00118
00119 static const DWORD BASED_CODE _dwTesthelpOleMisc =
00120   OLEMISC_ACTIVATEWHENVISIBLE |
00121   OLEMISC_SETCLIENTSITEFIRST |
00122   OLEMISC_INSIDEOUT |
00123   OLEMISC_CANTLINKINSIDE |
00124   OLEMISC_RECOMPOSEONRESIZE;
00125
00126 IMPLEMENT_OLECTLTYPE(CTesthelpCtrl, IDS_TESTHELP, _dwTesthelpOleMisc)
00127
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CTesthelpCtrl::CTesthelpCtrlFactory::UpdateRegistry -
00131 // Adds or removes system registry entries for CTesthelpCtrl
00132
00133 BOOL CTesthelpCtrl::CTesthelpCtrlFactory::UpdateRegistry(BOOL bRegister)
00134 {
00135   // TODO: Verify that your control follows apartment-model threading rules.
00136   // Refer to MFC TechNote 64 for more information.
00137   // If your control does not conform to the apartment-model rules, then
00138   // you must modify the code below, changing the 6th parameter from
00139   // afxRegApartmentThreading to 0.
00140
00141   if (bRegister)
00142     return AfxOleRegisterControlClass(
00143       AfxGetInstanceHandle(),
00144       m_clsid,
00145       m_lpszProgID,
00146       IDS_TESTHELP,
00147       IDB_TESTHELP,
00148       afxRegApartmentThreading,
00149       _dwTesthelpOleMisc,
00150       _tlid,
00151       _wVerMajor,
00152       _wVerMinor);
00153   else
00154     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00155 }
00156
00157
00158 /////////////////////////////////////////////////////////////////////////////
00159 // CTesthelpCtrl::CTesthelpCtrl - Constructor
00160
00161 CTesthelpCtrl::CTesthelpCtrl()
00162 {
00163   InitializeIIDs(&IID_DTesthelp, &IID_DTesthelpEvents);
00164 }
00165
00166
00167 /////////////////////////////////////////////////////////////////////////////
00168 // CTesthelpCtrl::~CTesthelpCtrl - Destructor
00169
00170 CTesthelpCtrl::~CTesthelpCtrl()
00171 {
00172       // TODO: Cleanup your control's instance data here.
00173 }
00174
00175
00176 /////////////////////////////////////////////////////////////////////////////
00177 // CTesthelpCtrl::OnDraw - Drawing function
00178
00179 void CTesthelpCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& /*rcInvalid*/)
00180 {
00181   // Drawing code, mostly plagiarized from the Circ MFC sample.
00182   // The only thing done here is setting the border and drawing text
00183   // specified by our name properties in the control's client area.
00184     if(!GetBorderStyle())   //Control will always have a border.
00185           SetBorderStyle(TRUE);
00186
00187     // Set up variables to use for drawing text background.
00188     // Use our current BackColor for the background color.
00189     CBrush* pOldBrush;
00190     CBrush bkBrush(TranslateColor(GetBackColor()));
00191     CPen* pOldPen;
00192     CRect rc = rcBounds;
00193     CFont* pOldFont;
00194
00195     // Set up background mode and text color.  Use the
00196     // current ForeColor for the text color.
00197     pdc->SetTextColor(TranslateColor(GetForeColor()));
00198     pdc->SetBkMode(TRANSPARENT);
00199
00200     // Fill our window with the current BackColor
00201     pdc->FillRect(rcBounds, &bkBrush);
00202
00203     // Save off the existing brush and pen so they
00204     // can be restored when we're done.
00205     pOldBrush = pdc->SelectObject(&bkBrush);
00206     pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
00207
00208     // Save off the current font so we can restore it and
00209     // select our current stock font into this DC
00210     pOldFont = SelectStockFont(pdc);
00211
00212     // Draw the text on our window
00213     pdc->ExtTextOut(rc.left+10, rc.top +2,
00214       ETO_CLIPPED, rc, m_szName1, m_szName1.GetLength(), NULL);
00215     pdc->ExtTextOut(rc.left+10, rc.top +22,
00216       ETO_CLIPPED, rc, m_szName2, m_szName2.GetLength(), NULL);
00217     pdc->ExtTextOut(rc.left+10, rc.top +42,
00218       ETO_CLIPPED, rc, m_szName3, m_szName3.GetLength(), NULL);
00219
00220     // Restore our DC to it's original state.
00221     pdc->SelectObject(pOldFont);
00222     pdc->SelectObject(pOldPen);
00223     pdc->SelectObject(pOldBrush);
00224
00225 }
00226
00227
00228 /////////////////////////////////////////////////////////////////////////////
00229 // CTesthelpCtrl::DoPropExchange - Persistence support
00230
00231 void CTesthelpCtrl::DoPropExchange(CPropExchange* pPX)
00232 {
00233       ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00234       COleControl::DoPropExchange(pPX);
00235       // custom DDX
00236       PX_String(pPX, _T("Name1"), m_szName1);
00237       PX_String(pPX, _T("Name2"), m_szName2);
00238       PX_String(pPX, _T("Name3"), m_szName3);
00239       PX_Bool(pPX, _T("UseMyHelp"),m_bUseMyHelp, TRUE);
00240       PX_Bool(pPX, _T("ShowToolTip"), m_bShowToolTip,FALSE);
00241       PX_Short(pPX, _T("UsePopupHelp"), m_nUsePopupHelp,0);
00242       PX_String(pPX, _T("ToolTipText"),m_szToolTipText,"");
00243
00244 }
00245
00246
00247 /////////////////////////////////////////////////////////////////////////////
00248 // CTesthelpCtrl::OnResetState - Reset control to default state
00249
00250 void CTesthelpCtrl::OnResetState()
00251 {
00252       COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00253
00254 }
00255
00256
00257 /////////////////////////////////////////////////////////////////////////////
00258 // CTesthelpCtrl::AboutBox - Display an "About" box to the user
00259
00260 void CTesthelpCtrl::AboutBox()
00261 {
00262       CDialog dlgAbout(IDD_ABOUTBOX_TESTHELP);
00263       dlgAbout.DoModal();
00264 }
00265
00266
00267 /////////////////////////////////////////////////////////////////////////////
00268 // CTesthelpCtrl message handlers
00269
00270 void CTesthelpCtrl::OnName1Changed()
00271 {
00272
00273       SetModifiedFlag();
00274       InvalidateControl();
00275 }
00276
00277 void CTesthelpCtrl::OnName2Changed()
00278 {
00279
00280       SetModifiedFlag();
00281       InvalidateControl();
00282 }
00283
00284 void CTesthelpCtrl::OnName3Changed()
00285 {
00286       SetModifiedFlag();
00287       InvalidateControl();
00288 }
00289
00290 LRESULT CTesthelpCtrl::OnHelpCommand(UINT_PTR /*wParam*/, LONG_PTR lParam)
00291 {
00292       LPHELPINFO hi;
00293
00294       // If the control is in a running application
00295       // we'll just show context help.
00296       hi = (LPHELPINFO)lParam;
00297       if( (AmbientUserMode()||IsWindow(m_hWnd)) && m_bUseMyHelp )
00298       {
00299           if(m_nUsePopupHelp==0)
00300           {
00301             CString strPath = AfxGetApp()->m_pszHelpFilePath;
00302             strPath += _T("::/popups.txt");
00303
00304             HH_POPUP popup;
00305             ZeroMemory(&popup, sizeof(popup));
00306             popup.cbStruct = sizeof(HH_POPUP);
00307             popup.idString = IDH_WHATISTHISTHING;
00308             popup.clrBackground = (COLORREF)-1; //Default
00309             popup.clrForeground = (COLORREF)-1; //Default
00310             RECT rDefault = {-1,-1,-1,-1}; //Default
00311             popup.rcMargins = rDefault;
00312             popup.pt = hi->MousePos;
00313
00314             ::HtmlHelp((HWND)hi->hItemHandle, strPath, HH_DISPLAY_TEXT_POPUP, (DWORD_PTR)&popup);
00315             return TRUE;
00316           }
00317           else
00318           {
00319             AfxGetApp()->HtmlHelp(NULL, HH_DISPLAY_TOC);
00320             return TRUE;
00321           }
00322
00323
00324       }
00325
00326       return (LONG)Default();
00327 }
00328
00329 void CTesthelpCtrl::OnUseMyHelpChanged()
00330 {
00331       // TODO: Add notification handler code
00332
00333       SetModifiedFlag();
00334 }
00335
00336
00337 void CTesthelpCtrl::RelayEvent(UINT message, WPARAM wParam, LPARAM lParam)
00338 {
00339       // This function will create a MSG structure, fill it in a pass it to
00340       // the ToolTip control, m_ttip.  Note that we ensure the point is in window
00341       // coordinates (relative to the control's window).
00342       if(NULL != m_ttip.m_hWnd)
00343       {
00344           MSG msg;
00345           msg.hwnd = m_hWnd;
00346           msg.message = message;
00347           msg.wParam = wParam;
00348           msg.lParam = lParam;
00349           msg.time = 0;
00350           msg.pt.x = LOWORD(lParam);
00351           msg.pt.y = HIWORD(lParam);
00352
00353           m_ttip.RelayEvent(&msg);
00354       }
00355
00356 }
00357
00358 int CTesthelpCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
00359 {
00360       if (COleControl::OnCreate(lpCreateStruct) == -1)
00361           return -1;
00362       // The following code will create a the ToolTip control
00363       // once the ocx's window is created.
00364       if(!m_ttip.Create(this))
00365        TRACE(_T("Unable to Create ToolTip"));
00366       else
00367        if(!m_ttip.AddTool(this, LPCTSTR(m_szToolTipText)))
00368          TRACE(_T("Unable to add tip for the control window"));
00369        else
00370          m_ttip.Activate(m_bShowToolTip);
00371
00372
00373       return 0;
00374 }
00375
00376 void CTesthelpCtrl::OnLButtonDown(UINT nFlags, CPoint point)
00377 {
00378       // pass this message to the ToolTip control
00379       RelayEvent(WM_LBUTTONDOWN, (WPARAM)nFlags,
00380           MAKELPARAM(LOWORD(point.x), LOWORD(point.y)));
00381       COleControl::OnLButtonDown(nFlags, point);
00382 }
00383
00384 void CTesthelpCtrl::OnLButtonUp(UINT nFlags, CPoint point)
00385 {
00386       // pass this message to the ToolTip control
00387       RelayEvent(WM_LBUTTONUP, (WPARAM)nFlags,
00388           MAKELPARAM(LOWORD(point.x), LOWORD(point.y)));
00389
00390       COleControl::OnLButtonUp(nFlags, point);
00391 }
00392
00393 void CTesthelpCtrl::OnMouseMove(UINT nFlags, CPoint point)
00394 {
00395       // pass this message to the ToolTip control
00396       RelayEvent(WM_MOUSEMOVE, (WPARAM)nFlags,
00397           MAKELPARAM(LOWORD(point.x), LOWORD(point.y)));
00398
00399       COleControl::OnMouseMove(nFlags, point);
00400 }
00401
00402 void CTesthelpCtrl::OnShowToolTipChanged()
00403 {
00404       // Activate or DeActivate the ToolTip
00405       if(m_ttip.m_hWnd && AmbientUserMode())
00406       {
00407         m_ttip.Activate(m_bShowToolTip);
00408         SetModifiedFlag();
00409       }
00410 }
00411
00412 void CTesthelpCtrl::OnToolTipTextChanged()
00413 {
00414       // Change the ToolTip's text
00415       if(m_ttip.m_hWnd && AmbientUserMode())
00416       {
00417         m_ttip.UpdateTipText((LPCTSTR)m_szToolTipText,this);
00418         SetModifiedFlag();
00419       }
00420
00421 }
00422
00423
00424 void CTesthelpCtrl::OnUsePopupHelpChanged()
00425 {
00426   // TODO: Add notification handler code
00427
00428   SetModifiedFlag();
00429 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFormatParaDlg Member List

This is the complete list of members for CFormatParaDlg, including all inherited members.
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CFormatParaDlg(PARAFORMAT2 &pf, CWnd *pParent=NULL) | CFormatParaDlg |
CFormatParaDlg(WPD_PARAFORMAT &pf, CWnd *pParent=NULL) | CFormatParaDlg |
DoDataExchange(CDataExchange *pDX) | CFormatParaDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CFormatParaDlg | [protected, virtual]
GetHelpIDs() | CFormatParaDlg | [inline, protected, virtual]
GetHelpIDs() | CFormatParaDlg | [inline, protected, virtual]
IDD enum value | CFormatParaDlg |
m_bPageBreak | CFormatParaDlg |
m_nAfter | CFormatParaDlg |
m_nAlignment | CFormatParaDlg |
m_nBefore | CFormatParaDlg |
m_nFirst | CFormatParaDlg |
m_nHelpIDs | CFormatParaDlg | [protected, static]
m_nLeft | CFormatParaDlg |
m_nRight | CFormatParaDlg |
m_nWordWrap | CFormatParaDlg |
m_pf | CFormatParaDlg |
m_pf | CFormatParaDlg |
OnDeltaposSpinAfter(NMHDR *pNMHDR, LRESULT *pResult) | CFormatParaDlg | [protected]
OnDeltaposSpinBefore(NMHDR *pNMHDR, LRESULT *pResult) | CFormatParaDlg | [protected]
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnInitDialog() | CFormatParaDlg | [protected, virtual]
OnInitDialog() | CFormatParaDlg | [protected, virtual]
OnOK() | CFormatParaDlg | [protected, virtual]
OnOK() | CFormatParaDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/maindoc.h Source File

  • general
  • viewex

maindoc.h

Go to the documentation of this file.
00001 // maindoc.h : interface of the CMainDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   CMainDoc();
00016   DECLARE_SERIAL(CMainDoc)
00017
00018 // Attributes
00019 public:
00020   // an example of document specific data
00021   CString m_strData;          // string text
00022   COLORREF m_colorData;       // color for the string text
00023
00024 // Implementation
00025 public:
00026   virtual ~CMainDoc();
00027   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00028 protected:
00029   virtual BOOL    OnNewDocument();
00030
00031 // Generated message map functions
00032 protected:
00033   //{{AFX_MSG(CMainDoc)
00034   afx_msg void OnChangeData();
00035   //}}AFX_MSG
00036   DECLARE_MESSAGE_MAP()
00037 };
00038
00039 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/PropSheetDemo.cpp Source File

  • vc2008fp
  • PropSheetDemo

PropSheetDemo.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "PropSheetDemo.h"
00003 #include "PropSheetDemoDlg.h"
00004
00005 #ifdef _DEBUG
00006 #define new DEBUG_NEW
00007 #undef THIS_FILE
00008 static char THIS_FILE[] = __FILE__;
00009 #endif
00010
00011 /////////////////////////////////////////////////////////////////////////////
00012 // CPropSheetDemoApp
00013
00014 BEGIN_MESSAGE_MAP(CPropSheetDemoApp, CWinAppEx)
00015   ON_COMMAND(ID_HELP, CWinAppEx::OnHelp)
00016 END_MESSAGE_MAP()
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CPropSheetDemoApp construction
00020
00021 CPropSheetDemoApp::CPropSheetDemoApp()
00022 {
00023   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00024 }
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // The one and only CPropSheetDemoApp object
00028
00029 CPropSheetDemoApp theApp;
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CPropSheetDemoApp initialization
00033
00034 BOOL CPropSheetDemoApp::InitInstance()
00035 {
00036   AfxEnableControlContainer();
00037
00038   // Standard initialization
00039   // If you are not using these features and wish to reduce the size
00040   //  of your final executable, you should remove from the following
00041   //  the specific initialization routines you do not need.
00042
00043   CPropSheetDemoDlg dlg;
00044   m_pMainWnd = &dlg;
00045   int nResponse = (int) dlg.DoModal();
00046   if (nResponse == IDOK)
00047   {
00048     // TODO: Place code here to handle when the dialog is
00049     //  dismissed with OK
00050   }
00051   else if (nResponse == IDCANCEL)
00052   {
00053     // TODO: Place code here to handle when the dialog is
00054     //  dismissed with Cancel
00055   }
00056
00057   // Since the dialog has been closed, return FALSE so that we exit the
00058   //  application, rather than start the application's message pump.
00059   return FALSE;
00060 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRebarTestApp Member List

This is the complete list of members for CRebarTestApp, including all inherited members.
CRebarTestApp() | CRebarTestApp |
ExitInstance() | CRebarTestApp | [virtual]
InitInstance() | CRebarTestApp | [virtual]
OnAppAbout() | CRebarTestApp |
PreLoadState() | CRebarTestApp | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoView.cpp Source File

  • vc2008fp
  • StatusBarDemo

StatusBarDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StatusBarDemo.h"
00013
00014 #include "StatusBarDemoDoc.h"
00015 #include "StatusBarDemoView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 #define ID_PROGRESS_TIMER 1
00024 #define PROGRESS_MAX    50
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CStatusBarDemoView
00028
00029 IMPLEMENT_DYNCREATE(CStatusBarDemoView, CFormView)
00030
00031 BEGIN_MESSAGE_MAP(CStatusBarDemoView, CFormView)
00032   ON_BN_CLICKED(IDC_START_PROGRESS, OnStartProgress)
00033   ON_BN_CLICKED(IDC_START_ANIMATION, OnStartAnimation)
00034   ON_BN_CLICKED(IDC_ICON1, OnIcon)
00035   ON_BN_CLICKED(IDC_ICON2, OnIcon)
00036   ON_BN_CLICKED(IDC_BACK_COLOR, OnBackColor)
00037   ON_BN_CLICKED(IDC_TEXT_COLOR, OnTextColor)
00038   ON_WM_TIMER()
00039   ON_WM_CONTEXTMENU()
00040   // Standard printing commands
00041   ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
00042   ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
00043   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00044   ON_COMMAND(ID_INDICATOR_LABEL, OnIndicatorLabel)
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CStatusBarDemoView construction/destruction
00049
00050 CStatusBarDemoView::CStatusBarDemoView()
00051   : CFormView(CStatusBarDemoView::IDD)
00052 {
00053   m_nIcon = 0;
00054
00055   m_nProgressCurr = 0;
00056   m_bInProgress = FALSE;
00057   m_bInAnimation = FALSE;
00058 }
00059
00060 CStatusBarDemoView::~CStatusBarDemoView()
00061 {
00062 }
00063
00064 void CStatusBarDemoView::DoDataExchange(CDataExchange* pDX)
00065 {
00066   CFormView::DoDataExchange(pDX);
00067   DDX_Control(pDX, IDC_TEXT_COLOR, m_wndTextColor);
00068   DDX_Control(pDX, IDC_BACK_COLOR, m_wndBackColor);
00069   DDX_Control(pDX, IDC_START_ANIMATION, m_wndStartAnimation);
00070   DDX_Control(pDX, IDC_START_PROGRESS, m_wndStartProgress);
00071   DDX_Radio(pDX, IDC_ICON1, m_nIcon);
00072 }
00073
00074 BOOL CStatusBarDemoView::PreCreateWindow(CREATESTRUCT& cs)
00075 {
00076   // TODO: Modify the Window class or styles here by modifying
00077   //  the CREATESTRUCT cs
00078
00079   return CFormView::PreCreateWindow(cs);
00080 }
00081
00082 void CStatusBarDemoView::OnInitialUpdate()
00083 {
00084   // There is only one view ever, so it only needs to do the initial
00085   // update once--otherwise the application is  resized needlessly.
00086   static BOOL bUpdatedOnce = FALSE;
00087   if (bUpdatedOnce)
00088     return;
00089   bUpdatedOnce = TRUE;
00090
00091   CFormView::OnInitialUpdate();
00092
00093   m_wndTextColor.EnableAutomaticButton (_T("Default"), afxGlobalData.clrBtnText);
00094   m_wndTextColor.EnableOtherButton (_T("Other..."));
00095   m_wndTextColor.SetColor ((COLORREF)-1);
00096
00097   m_wndBackColor.EnableAutomaticButton (_T("Default"), afxGlobalData.clrBtnFace);
00098   m_wndBackColor.EnableOtherButton (_T("Other..."));
00099   m_wndBackColor.SetColor ((COLORREF)-1);
00100
00101   if (m_imlStatusAnimation.GetSafeHandle () == NULL)
00102   {
00103     m_imlStatusAnimation.Create (IDB_ANIMATION, 16, 0, RGB (255, 0, 255));
00104   }
00105
00106   if (m_bmpIcon1.GetSafeHandle () == NULL)
00107   {
00108     m_bmpIcon1.LoadBitmap (IDB_ICON1);
00109   }
00110
00111   if (m_bmpIcon2.GetSafeHandle () == NULL)
00112   {
00113     m_bmpIcon2.LoadBitmap (IDB_ICON2);
00114   }
00115
00116   GetStatusBar ().SetPaneIcon (nStatusIcon, m_bmpIcon1);
00117   GetStatusBar ().SetTipText (nStatusIcon, _T("This is a tooltip"));
00118 }
00119
00120 /////////////////////////////////////////////////////////////////////////////
00121 // CStatusBarDemoView printing
00122
00123 void CStatusBarDemoView::OnFilePrintPreview()
00124 {
00125   AFXPrintPreview (this);
00126 }
00127
00128 BOOL CStatusBarDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00129 {
00130   // default preparation
00131   return DoPreparePrinting(pInfo);
00132 }
00133
00134 void CStatusBarDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00135 {
00136   // TODO: add extra initialization before printing
00137 }
00138
00139 void CStatusBarDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00140 {
00141   // TODO: add cleanup after printing
00142 }
00143
00144 void CStatusBarDemoView::OnPrint(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00145 {
00146   // TODO: add customized printing code here
00147 }
00148
00149 /////////////////////////////////////////////////////////////////////////////
00150 // CStatusBarDemoView diagnostics
00151
00152 #ifdef _DEBUG
00153 void CStatusBarDemoView::AssertValid() const
00154 {
00155   CFormView::AssertValid();
00156 }
00157
00158 void CStatusBarDemoView::Dump(CDumpContext& dc) const
00159 {
00160   CFormView::Dump(dc);
00161 }
00162
00163 CStatusBarDemoDoc* CStatusBarDemoView::GetDocument() // non-debug version is inline
00164 {
00165   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CStatusBarDemoDoc)));
00166   return (CStatusBarDemoDoc*)m_pDocument;
00167 }
00168 #endif //_DEBUG
00169
00170 /////////////////////////////////////////////////////////////////////////////
00171 // CStatusBarDemoView message handlers
00172
00173 void CStatusBarDemoView::OnContextMenu(CWnd*, CPoint point)
00174 {
00175   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00176 }
00177
00178 void CStatusBarDemoView::OnStartProgress()
00179 {
00180   if (m_bInProgress)
00181   {
00182     KillTimer (ID_PROGRESS_TIMER);
00183     m_wndStartProgress.SetWindowText (_T("Start Progress"));
00184     GetStatusBar ().EnablePaneProgressBar (nStatusProgress, -1);
00185
00186     m_bInProgress = FALSE;
00187
00188     return;
00189   }
00190
00191   GetStatusBar ().EnablePaneProgressBar (nStatusProgress, PROGRESS_MAX);
00192
00193   m_nProgressCurr = 0;
00194   m_bInProgress = TRUE;
00195
00196   SetTimer (ID_PROGRESS_TIMER, 200, NULL);
00197   m_wndStartProgress.SetWindowText (_T("Stop Progress"));
00198 }
00199
00200 void CStatusBarDemoView::OnStartAnimation()
00201 {
00202   if (m_bInAnimation)
00203   {
00204     m_wndStartAnimation.SetWindowText (_T("Start Animation"));
00205     GetStatusBar ().SetPaneAnimation (nStatusAnimation, NULL);
00206     m_bInAnimation = FALSE;
00207     return;
00208   }
00209
00210   GetStatusBar ().SetPaneAnimation (nStatusAnimation, m_imlStatusAnimation);
00211   GetStatusBar ().SetPaneText (nStatusAnimation, _T(""));
00212   GetStatusBar ().SetPaneWidth (nStatusAnimation, 16);
00213
00214   m_wndStartAnimation.SetWindowText (_T("Stop Animation"));
00215   m_bInAnimation = TRUE;
00216 }
00217
00218 void CStatusBarDemoView::OnIcon()
00219 {
00220   UpdateData ();
00221   GetStatusBar ().SetPaneIcon (nStatusIcon, m_nIcon == 0 ? m_bmpIcon1 : m_bmpIcon2);
00222 }
00223
00224 void CStatusBarDemoView::OnBackColor()
00225 {
00226   GetStatusBar ().SetPaneBackgroundColor (nStatusLabel, m_wndBackColor.GetColor ());
00227 }
00228
00229 void CStatusBarDemoView::OnTextColor()
00230 {
00231   GetStatusBar ().SetPaneTextColor (nStatusLabel, m_wndTextColor.GetColor ());
00232 }
00233
00234 void CStatusBarDemoView::OnIndicatorLabel()
00235 {
00236   MessageBox (_T("Status bar pane double-click..."));
00237 }
00238
00239 void CStatusBarDemoView::OnTimer(UINT_PTR nIDEvent)
00240 {
00241   if (nIDEvent == ID_PROGRESS_TIMER)
00242   {
00243     m_nProgressCurr += 5;
00244
00245     if (m_nProgressCurr > PROGRESS_MAX)
00246     {
00247       m_nProgressCurr = 0;
00248     }
00249
00250     GetStatusBar ().SetPaneProgress (nStatusProgress, m_nProgressCurr);
00251   }
00252
00253   CFormView::OnTimer(nIDEvent);
00254 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/PEdReqPg.Cpp Source File

  • ole
  • TstCon

PEdReqPg.Cpp

Go to the documentation of this file.
00001 // PropertyEditRequestsPage.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 CPropertyEditRequestsPage::CPropertyInfo::CPropertyInfo() :
00021    m_tLogged( TRUE ),
00022    m_iResponse( REQUESTEDIT_ALWAYS )
00023 {
00024 }
00025
00026 CPropertyEditRequestsPage::CPropertyInfo::CPropertyInfo( LPCTSTR pszName,
00027    BOOL tLogged, int iResponse ) :
00028    m_strName( pszName ),
00029    m_tLogged( tLogged ),
00030    m_iResponse( iResponse )
00031 {
00032 }
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CPropertyEditRequestsPage dialog
00036
00037 IMPLEMENT_DYNCREATE( CPropertyEditRequestsPage, CPropertyPage )
00038
00039 CPropertyEditRequestsPage::CPropertyEditRequestsPage() :
00040    CPropertyPage( CPropertyEditRequestsPage::IDD )
00041 {
00042    m_psp.dwFlags &= ~PSP_HASHELP;
00043
00044   //{{AFX_DATA_INIT(CPropertyEditRequestsPage)
00045   m_iAllowEdit = -1;
00046   //}}AFX_DATA_INIT
00047 }
00048
00049
00050 void CPropertyEditRequestsPage::DoDataExchange( CDataExchange* pDX )
00051 {
00052    int iProperty;
00053    int iItem;
00054
00055   CDialog::DoDataExchange(pDX);
00056   //{{AFX_DATA_MAP(CPropertyEditRequestsPage)
00057   DDX_Control(pDX, IDC_PROPERTIES_EDITREQUESTS, m_lbProperties);
00058   DDX_Radio(pDX, IDC_ALWAYS, m_iAllowEdit);
00059   //}}AFX_DATA_MAP
00060
00061    if( m_lbProperties.GetCount() > 0 )
00062    {
00063     for( iItem = 0; iItem < m_lbProperties.GetCount(); iItem++ )
00064     {
00065      iProperty = (int)m_lbProperties.GetItemData( iItem );
00066      if( pDX->m_bSaveAndValidate )
00067      {
00068       m_aProperties[iProperty].m_tLogged = m_lbProperties.GetCheck(
00069          iItem );
00070      }
00071      else
00072      {
00073       m_lbProperties.SetCheck( iItem, m_aProperties[
00074          iProperty].m_tLogged != FALSE );
00075      }
00076     }
00077    }
00078 }
00079
00080
00081 BEGIN_MESSAGE_MAP(CPropertyEditRequestsPage, CDialog)
00082   //{{AFX_MSG_MAP(CPropertyEditRequestsPage)
00083   ON_LBN_SELCHANGE(IDC_PROPERTIES_EDITREQUESTS, OnPropertiesSelChange)
00084   ON_BN_CLICKED(IDC_ALWAYS, OnAlways)
00085   ON_BN_CLICKED(IDC_NEVER, OnNever)
00086   ON_BN_CLICKED(IDC_PROMPT, OnPrompt)
00087   ON_BN_CLICKED(IDC_SELECTALL_EDITREQUESTS, OnSelectAll)
00088   ON_WM_HELPINFO()
00089   ON_WM_CONTEXTMENU()
00090   //}}AFX_MSG_MAP
00091 END_MESSAGE_MAP()
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CPropertyEditRequestsPage message handlers
00095
00096 BOOL CPropertyEditRequestsPage::OnInitDialog()
00097 {
00098    int iProperty;
00099    int iItem;
00100
00101   CDialog::OnInitDialog();
00102
00103    for( iProperty = 0; iProperty < m_aProperties.GetSize(); iProperty++ )
00104    {
00105     iItem = m_lbProperties.AddString( m_aProperties[iProperty].m_strName );
00106     m_lbProperties.SetItemData( iItem, iProperty );
00107    }
00108
00109    UpdateData( FALSE );
00110
00111    OnPropertiesSelChange();
00112
00113   return( TRUE );
00114 }
00115
00116 void CPropertyEditRequestsPage::OnPropertiesSelChange()
00117 {
00118    int iResponse;
00119    CWnd* pAlways;
00120    CWnd* pNever;
00121    CWnd* pPrompt;
00122
00123    pAlways = GetDlgItem( IDC_ALWAYS );
00124    pNever = GetDlgItem( IDC_NEVER );
00125    pPrompt = GetDlgItem( IDC_PROMPT );
00126
00127    if( m_lbProperties.GetSelCount() == 0 )
00128    {
00129     // Nothing is selected, so disable the radio buttons.
00130     pAlways->EnableWindow( FALSE );
00131     pNever->EnableWindow( FALSE );
00132     pPrompt->EnableWindow( FALSE );
00133    }
00134    else
00135    {
00136     pAlways->EnableWindow( TRUE );
00137     pNever->EnableWindow( TRUE );
00138     pPrompt->EnableWindow( TRUE );
00139    }
00140
00141    iResponse = GetSelectionResponse();
00142
00143    pAlways->SendMessage( BM_SETCHECK, 0, 0 );
00144    pNever->SendMessage( BM_SETCHECK, 0, 0 );
00145    pPrompt->SendMessage( BM_SETCHECK, 0, 0 );
00146
00147    switch( iResponse )
00148    {
00149    case REQUESTEDIT_ALWAYS:
00150     pAlways->SendMessage( BM_SETCHECK, 1, 0 );
00151     break;
00152
00153    case REQUESTEDIT_NEVER:
00154     pNever->SendMessage( BM_SETCHECK, 1, 0 );
00155     break;
00156
00157    case REQUESTEDIT_PROMPT:
00158     pPrompt->SendMessage( BM_SETCHECK, 1, 0 );
00159     break;
00160    }
00161 }
00162
00163 int CPropertyEditRequestsPage::GetSelectionResponse()
00164 {
00165    int iProperty;
00166    int iSelectedItem;
00167    int* piSelectedItems;
00168    int iResponse;
00169    int nSelectedItems;
00170    int nItemsInBuffer;
00171    int iMultiResponse;
00172
00173    nSelectedItems = m_lbProperties.GetSelCount();
00174    if( nSelectedItems == 0 )
00175    {
00176     iMultiResponse = -1;
00177    }
00178    else
00179    {
00180     if (nSelectedItems < 0 || nSelectedItems > (INT_MAX / sizeof(int)))
00181     {
00182     iMultiResponse = -1;
00183     }
00184     else
00185     {
00186     piSelectedItems = (int*)_malloca( nSelectedItems*sizeof( int ) );
00187     nItemsInBuffer = m_lbProperties.GetSelItems( nSelectedItems,
00188       piSelectedItems );
00189     ASSERT( nItemsInBuffer == nSelectedItems );
00190     iProperty = (int)m_lbProperties.GetItemData( piSelectedItems[0] );
00191     iMultiResponse = m_aProperties[iProperty].m_iResponse;
00192     for( iSelectedItem = 1; iSelectedItem < nSelectedItems; iSelectedItem++ )
00193     {
00194       iProperty = (int)m_lbProperties.GetItemData( piSelectedItems[
00195         iSelectedItem] );
00196       iResponse = m_aProperties[iProperty].m_iResponse;
00197       if( iResponse != iMultiResponse )
00198       {
00199         iMultiResponse = -1;
00200       }
00201     }
00202     _freea(piSelectedItems);
00203     }
00204    }
00205
00206    return( iMultiResponse );
00207 }
00208
00209 void CPropertyEditRequestsPage::SetSelectionResponse( int iResponse )
00210 {
00211    int iSelectedItem;
00212    int* piSelectedItems;
00213    int nSelectedItems;
00214    int nItemsInBuffer;
00215
00216    ASSERT( iResponse != -1 );
00217
00218    nSelectedItems = m_lbProperties.GetSelCount();
00219    if ((nSelectedItems > 0) && (nSelectedItems < (INT_MAX / sizeof(int))))
00220    {
00221     piSelectedItems = (int*)_malloca( nSelectedItems*sizeof( int ) );
00222     nItemsInBuffer = m_lbProperties.GetSelItems( nSelectedItems,
00223      piSelectedItems );
00224     ASSERT( nItemsInBuffer == nSelectedItems );
00225     for( iSelectedItem = 0; iSelectedItem < nSelectedItems; iSelectedItem++ )
00226     {
00227      m_aProperties[piSelectedItems[iSelectedItem]].m_iResponse = iResponse;
00228     }
00229     _freea(piSelectedItems);
00230    }
00231
00232 }
00233
00234 void CPropertyEditRequestsPage::OnAlways()
00235 {
00236    SetSelectionResponse( REQUESTEDIT_ALWAYS );
00237 }
00238
00239 void CPropertyEditRequestsPage::OnNever()
00240 {
00241    SetSelectionResponse( REQUESTEDIT_NEVER );
00242 }
00243
00244 void CPropertyEditRequestsPage::OnPrompt()
00245 {
00246    SetSelectionResponse( REQUESTEDIT_PROMPT );
00247 }
00248
00249 void CPropertyEditRequestsPage::OnSelectAll()
00250 {
00251    int nItems;
00252
00253    nItems = m_lbProperties.GetCount();
00254    m_lbProperties.SelItemRange( TRUE, 0, nItems-1 );
00255
00256    OnPropertiesSelChange();
00257 }
00258
00259
00260 static DWORD rgmapCHID[] =
00261 {
00262    IDC_PROPERTIES_EDITREQUESTS, HIDC_PROPERTIES_EDITREQUESTS,
00263    IDC_PROMPT, HIDC_PROMPT,
00264    IDC_ALWAYS, HIDC_ALWAYS,
00265    IDC_NEVER, HIDC_NEVER,
00266    IDC_SELECTALL_EDITREQUESTS, HIDC_SELECTALL_EDITREQUESTS,
00267    0, 0
00268 };
00269
00270 BOOL CPropertyEditRequestsPage::OnHelpInfo( HELPINFO* pHelpInfo )
00271 {
00272   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00273   strPath += _T("::/popups.txt");
00274
00275   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00276 }
00277
00278 void CPropertyEditRequestsPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00279 {
00280   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00281   strPath += _T("::/popups.txt");
00282
00283   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00284 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/Resource.h Source File

  • vc2008fp
  • IEDemo

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by IEDemo.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define ID_INDICATOR_ICON               102
00008 #define ID_INDICATOR_PROGRESS           103
00009 #define IDP_SOCKETS_INIT_FAILED         104
00010 #define IDR_MAINFRAME                   128
00011 #define IDR_IEDTYPE           129
00012 #define IDR_MAINFRAME2                  129
00013 #define IDR_POPUP_TOOLBAR               131
00014 #define IDR_FONT_POPUP                  132
00015 #define IDR_MFCAVI                      132
00016 #define IDR_FAVORITES_POPUP             133
00017 #define IDR_HISTORY_POPUP               134
00018 #define IDB_MENU_IMAGES                 134
00019 #define IDR_TOOLBAR_IMAGE_COLLECTION    138
00020 #define IDB_IMAGE_COLLECTION            140
00021 #define IDB_STATUS_READY                141
00022 #define IDB_STATUS_ANIMATION            142
00023 #define IDB_COLDTOOLBAR                 261
00024 #define IDB_HOTTOOLBAR                  262
00025 #define IDB_IMAGE_COLLECTION_SMALL      263
00026 #define IDB_MENU_IMAGES_16              264
00027 #define IDS_WEB_TUTORIAL                736
00028 #define IDS_ONLINE_SUPPORT              737
00029 #define IDS_FREE_STUFF                  738
00030 #define IDS_INTERNET_START_PAGE         743
00031 #define IDS_BEST_OF_THE_WEB             745
00032 #define IDS_MICROSOFT_HOME_PAGE         747
00033 #define IDS_BACK                        748
00034 #define IDS_FORWARD                     749
00035 #define IDS_STOP                        750
00036 #define IDS_REFRESH                     751
00037 #define IDS_HOME                        752
00038 #define IDS_SEARCH                      753
00039 #define IDS_FAVORITES                   754
00040 #define IDS_PRINT                       755
00041 #define IDS_FONT                        756
00042 #define IDS_ADDRESS                     757
00043 #define IDS_LINKS                       758
00044 #define IDD_ABOUTBOX                    999
00045 #define IDC_MAIL                        1000
00046 #define IDC_URL                         1001
00047 #define IDC_VERSION                     1002
00048 #define IDC_TREE1                       1003
00049 #define IDS_FILETYPES                   1201
00050 #define ID_VIEW_ADDRESS_BAR             32722
00051 #define ID_VIEW_CUSTOMIZE               32770
00052 #define ID_VIEW_STOP                    32778
00053 #define ID_VIEW_REFRESH                 32779
00054 #define ID_LINK_1                       32781
00055 #define ID_VIEW_FONTS_LARGEST           32782
00056 #define ID_VIEW_FONTS_LARGE             32783
00057 #define ID_VIEW_FONTS_MEDIUM            32784
00058 #define ID_VIEW_FONTS_SMALL             32785
00059 #define ID_VIEW_FONTS_SMALLEST          32786
00060 #define ID_GO_BACK                      32787
00061 #define ID_GO_FORWARD                   32788
00062 #define ID_GO_START_PAGE                32789
00063 #define ID_GO_SEARCH_THE_WEB            32790
00064 #define ID_GO_BEST_OF_THE_WEB           32791
00065 #define ID_FAVORITES_DROPDOWN           32792
00066 #define ID_FONT_DROPDOWN                32793
00067 #define ID_HELP_WEB_TUTORIAL            32798
00068 #define ID_HELP_ONLINE_SUPPORT          32800
00069 #define ID_FAVORITS_DUMMY               32819
00070 #define ID_HISTORY_DUMMY                32820
00071 #define ID_VIEW_LINKS_BAR               32821
00072 #define ID_VIEW_TEXTLABELS              32823
00073 #define ID_VIEW_EXPLORERBAR             32825
00074 #define ID_LINK_MSDN          32826
00075 #define ID_LINK_MICROSOFT               32827
00076 #define ID_LINK_VISUALCPP               32828
00077
00078 // Next default values for new objects
00079 //
00080 #ifdef APSTUDIO_INVOKED
00081 #ifndef APSTUDIO_READONLY_SYMBOLS
00082 #define _APS_3D_CONTROLS                     1
00083 #define _APS_NEXT_RESOURCE_VALUE        144
00084 #define _APS_NEXT_COMMAND_VALUE         32830
00085 #define _APS_NEXT_CONTROL_VALUE         1004
00086 #define _APS_NEXT_SYMED_VALUE           102
00087 #endif
00088 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/splash.cpp Source File

  • vc2008fp
  • WordPad

splash.cpp

Go to the documentation of this file.
00001 //
00002 // splash.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CSplashWnd dialog
00024
00025 BOOL CSplashWnd::Create(CWnd* pParent)
00026 {
00027   //{{AFX_DATA_INIT(CSplashWnd)
00028     // NOTE: the ClassWizard will add member initialization here
00029   //}}AFX_DATA_INIT
00030
00031   if (!CDialog::Create(CSplashWnd::IDD, pParent))
00032   {
00033     TRACE0("Warning: creation of CSplashWnd dialog failed\n");
00034     return FALSE;
00035   }
00036
00037   return TRUE;
00038 }
00039
00040 BOOL CSplashWnd::OnInitDialog()
00041 {
00042   CDialog::OnInitDialog();
00043   CenterWindow();
00044
00045   // initialize the big icon control
00046   m_icon.SubclassDlgItem(IDC_BIGICON, this);
00047   m_icon.SizeToContent();
00048
00049   return TRUE;  // return TRUE  unless you set the focus to a control
00050 }
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CSplashWnd message handlers
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CBigIcon
00057
00058 BEGIN_MESSAGE_MAP(CBigIcon, CButton)
00059   //{{AFX_MSG_MAP(CBigIcon)
00060   ON_WM_DRAWITEM()
00061   ON_WM_ERASEBKGND()
00062   //}}AFX_MSG_MAP
00063 END_MESSAGE_MAP()
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CBigIcon message handlers
00067
00068 #define CY_SHADOW   4
00069 #define CX_SHADOW   4
00070
00071 void CBigIcon::SizeToContent()
00072 {
00073   m_bitmap.LoadBitmap(IDB_BITMAP48);
00074   BITMAP bm;
00075   m_bitmap.GetObject(sizeof(bm), &bm);
00076   m_sizeBitmap = CSize(bm.bmWidth, bm.bmHeight);
00077   // get system icon size
00078
00079   // a big icon should be twice the size of an icon + shadows
00080   SetWindowPos(NULL, 0, 0, bm.bmWidth + CX_SHADOW + 4, bm.bmHeight + CY_SHADOW + 4,
00081     SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
00082 }
00083
00084 void CBigIcon::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00085 {
00086   CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
00087   ASSERT(pDC != NULL);
00088   if (pDC != NULL)
00089   {
00090     CRect rect;
00091     GetClientRect(rect);
00092     int cxClient = rect.Width();
00093     int cyClient = rect.Height();
00094
00095     // draw border around icon
00096     CPen pen;
00097     pen.CreateStockObject(BLACK_PEN);
00098     CPen* pPenOld = pDC->SelectObject(&pen);
00099     pDC->Rectangle(0, 0, cxClient-CX_SHADOW, cyClient-CY_SHADOW);
00100     if (pPenOld)
00101       pDC->SelectObject(pPenOld);
00102
00103     // draw shadows around icon
00104     CBrush br;
00105     br.CreateStockObject(DKGRAY_BRUSH);
00106     rect.SetRect(cxClient-CX_SHADOW, CY_SHADOW, cxClient, cyClient);
00107     pDC->FillRect(rect, &br);
00108     rect.SetRect(CX_SHADOW, cyClient-CY_SHADOW, cxClient, cyClient);
00109     pDC->FillRect(rect, &br);
00110
00111     // draw the bitmap contents
00112     CDC dcMem;
00113     if (!dcMem.CreateCompatibleDC(pDC))
00114       return;
00115     CBitmap* pBitmapOld = dcMem.SelectObject(&m_bitmap);
00116     if (pBitmapOld == NULL)
00117       return;
00118
00119     pDC->BitBlt(2, 2, m_sizeBitmap.cx, m_sizeBitmap.cy, &dcMem, 0, 0, SRCCOPY);
00120
00121     dcMem.SelectObject(pBitmapOld);
00122   }
00123 }
00124
00125 BOOL CBigIcon::OnEraseBkgnd(CDC*)
00126 {
00127   return TRUE;    // we don't do any erasing...
00128 }
00129
00130 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/stdafx.cpp Source File

  • vc2008fp
  • DrawClient

stdafx.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // stdafx.cpp : source file that includes just the standard includes
00013 //  stdafx.pch will be the pre-compiled header
00014 //  stdafx.obj will contain the pre-compiled type information
00015
00016 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/mainfrm.h Source File

  • advanced
  • dllhusk

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXEXT_H__
00013 #include <afxext.h>         // for access to CToolBar and CStatusBar
00014 #endif
00015
00016 class CMainFrame : public CMDIFrameWnd
00017 {
00018   DECLARE_DYNAMIC(CMainFrame)
00019 public:
00020   CMainFrame();
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Implementation
00029 public:
00030   virtual ~CMainFrame();
00031 #ifdef _DEBUG
00032   virtual void AssertValid() const;
00033   virtual void Dump(CDumpContext& dc) const;
00034 #endif
00035
00036
00037 protected:  // control bar embedded members
00038   CStatusBar  m_wndStatusBar;
00039   CToolBar    m_wndToolBar;
00040
00041 // Generated message map functions
00042 protected:
00043   //{{AFX_MSG(CMainFrame)
00044   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00045   afx_msg void OnNcRButtonDown(UINT nHitTest, CPoint point);
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMdiApp Member List

This is the complete list of members for CMdiApp, including all inherited members.
CMdiApp() | CMdiApp |
CMdiApp() | CMdiApp |
ExitInstance() | CMdiApp | [virtual]
InitInstance() | CMdiApp | [virtual]
InitInstance() | CMdiApp | [virtual]
OnAppAbout() | CMdiApp |
OnAppAbout() | CMdiApp |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/stdafx.h Source File

  • general
  • tracker

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013 //
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>      // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions (including VB)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCImageApp Member List

This is the complete list of members for CCImageApp, including all inherited members.
CCImageApp() | CCImageApp |
InitInstance() | CCImageApp | [virtual]
OnAppAbout() | CCImageApp |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/stdafx.cpp Source File

  • ole
  • acdual

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  AutoClik.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/licensed/licensed.cpp Source File

  • controls
  • licensed

licensed.cpp

Go to the documentation of this file.
00001 // licensed.cpp : Implementation of CLicensedApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "licensed.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020
00021 CLicensedApp NEAR theApp;
00022
00023 const GUID CDECL BASED_CODE _tlid =
00024     { 0x973b27a6, 0xf232, 0x101a, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00025 const WORD _wVerMajor = 1;
00026 const WORD _wVerMinor = 0;
00027
00028
00029 ////////////////////////////////////////////////////////////////////////////
00030 // CLicensedApp::InitInstance - DLL initialization
00031
00032 BOOL CLicensedApp::InitInstance()
00033 {
00034   BOOL bInit = COleControlModule::InitInstance();
00035
00036   if (bInit)
00037   {
00038     // TODO: Add your own module initialization code here.
00039   }
00040
00041   return bInit;
00042 }
00043
00044
00045 ////////////////////////////////////////////////////////////////////////////
00046 // CLicensedApp::ExitInstance - DLL termination
00047
00048 int CLicensedApp::ExitInstance()
00049 {
00050   // TODO: Add your own module termination code here.
00051
00052   return COleControlModule::ExitInstance();
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // DllRegisterServer - Adds entries to the system registry
00058
00059 STDAPI DllRegisterServer(void)
00060 {
00061   AFX_MANAGE_STATE(_afxModuleAddrThis);
00062
00063   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00064     return ResultFromScode(SELFREG_E_TYPELIB);
00065
00066   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00067     return ResultFromScode(SELFREG_E_CLASS);
00068
00069   return NOERROR;
00070 }
00071
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // DllUnregisterServer - Removes entries from the system registry
00075
00076 STDAPI DllUnregisterServer(void)
00077 {
00078   AFX_MANAGE_STATE(_afxModuleAddrThis);
00079
00080   if (!AfxOleUnregisterTypeLib(_tlid))
00081     return ResultFromScode(SELFREG_E_TYPELIB);
00082
00083   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00084     return ResultFromScode(SELFREG_E_CLASS);
00085
00086   return NOERROR;
00087 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/resource.h Source File

  • general
  • CmnCtrl1

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by CmnCtrl1.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDC_DATETIME                    101
00009 #define IDD_CMNCTRL1_DIALOG             102
00010 #define IDC_MONTHCAL                    102
00011 #define IDC_EDIT1                       104
00012 #define IDC_ANIMATE                     105
00013 #define IDD_DATETIME                    106
00014 #define IDD_MONTHCAL                    107
00015 #define IDR_MAINFRAME                   128
00016 #define IDR_STANDARDBAR                 129
00017 #define IDD_TOOLBARCTRL                 131
00018 #define IDD_TREECTRL                    134
00019 #define IDD_ANIMCTRL                    137
00020 #define IDB_BMTREEFIRST                 138
00021 #define IDB_BMTREEDOG                   139
00022 #define IDB_BMTREEDOGSELECTED           140
00023 #define IDB_BMTREEBIRD                  141
00024 #define IDB_BMTREEBIRDSELECTED          142
00025 #define IDB_BMTREEFISH                  143
00026 #define IDB_BMTREEFISHSELECTED          144
00027 #define IDB_BMTREELAST                  145
00028 #define IDR_PALETTEBAR                  148
00029 #define IDC_CKUPDOWN                    1000
00030 #define IDC_CKSHOWNONE                  1001
00031 #define IDC_CKAPPCANPARSE               1002
00032 #define IDC_CKTIMEFORMAT                1003
00033 #define IDC_CKSHORTDATEFORMAT           1004
00034 #define IDC_CKLONGDATEFORMAT            1005
00035 #define IDC_LBNOTIFY                    1006
00036 #define IDC_DTFRAME                     1007
00037 #define IDC_MCFRAME                     1008
00038 #define IDC_CKDAYSTATE                  1009
00039 #define IDC_CMULTISELECT                1010
00040 #define IDC_CKNOTODAY                   1011
00041 #define IDC_CKNOTODAYCIRCLE             1012
00042 #define IDC_CKWEEKNUMBERS               1013
00043 #define IDC_NOTIFYLIST                  1014
00044 #define IDC_TREEVIEW1                   1015
00045 #define IDC_EDSELRANGE                  1015
00046 #define IDC_TVEDITLABELS                1016
00047 #define IDC_STRSELECTION                1016
00048 #define IDC_TVHASBUTTONS                1017
00049 #define IDC_ALTDRAG                     1017
00050 #define IDC_STRRANGE                    1017
00051 #define IDC_TVHASLINES                  1018
00052 #define IDC_TVLINESATROOT               1019
00053 #define IDC_TVDISABLEDDRAGDROP          1020
00054 #define IDC_TVSHOWSELALWAYS             1021
00055 #define IDC_TREESTATUS                  1022
00056 #define IDC_TVSSINGELEXPAND             1023
00057 #define IDC_BROWSE                      1025
00058 #define IDC_CENTER                      1026
00059 #define IDC_TRANSPARENT                 1027
00060 #define IDC_AUTOPLAY                    1028
00061 #define IDC_PLAY                        1029
00062 #define IDC_STOP                        1030
00063 #define IDC_ANIMFRAME                   1031
00064 #define IDC_ANIMSTATUS                  1033
00065 #define ID_NEW                          2000
00066 #define ID_OPEN                         2001
00067 #define ID_SAVE                         2002
00068 #define ID_CUT                          2003
00069 #define ID_COPY                         2004
00070 #define ID_PASTE                        2005
00071 #define ID_PRINT                        2006
00072 #define ID_ABOUT                        2007
00073 #define ID_CONTEXTHELP                  2008
00074 #define ID_ERASE                        2009
00075 #define ID_PENCIL                       2010
00076 #define ID_SELECT                       2011
00077 #define ID_BRUSH                        2012
00078 #define ID_AIRBRUSH                     2013
00079 #define ID_FILL                         2014
00080 #define ID_LINE                         2015
00081 #define ID_SELECTCOLOR                  2016
00082 #define ID_MAGNIFY                      2017
00083 #define ID_RECTANGLE                    2018
00084 #define ID_ROUNDRECTANGLE               2019
00085 #define ID_ELLIPSE                      2020
00086 #define ID_TOOLBARSTYLE                 3000
00087 #define ID_CCSTOP                       3001
00088 #define ID_CCSBOTTOM                    3002
00089 #define ID_CCSADJUSTABLE                3003
00090 #define ID_TBSTYLETOOLTIPS              3004
00091 #define ID_TBSTYLEWRAPABLE              3005
00092 #define ID_BUTTONSTYLE                  3006
00093 #define ID_TBSTYLEBUTTON                3007
00094 #define ID_TBSTYLECHECKGROUP            3008
00095 #define ID_BUTTONSTYLE2                 3009
00096 #define ID_TOOLBARSTYLE2                3010
00097 #define ID_TBSTYLETOOLTIPS2             3011
00098
00099 // Next default values for new objects
00100 //
00101 #ifdef APSTUDIO_INVOKED
00102 #ifndef APSTUDIO_READONLY_SYMBOLS
00103 #define _APS_NEXT_RESOURCE_VALUE        129
00104 #define _APS_NEXT_COMMAND_VALUE         32771
00105 #define _APS_NEXT_CONTROL_VALUE         1018
00106 #define _APS_NEXT_SYMED_VALUE           103
00107 #endif
00108 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/resource.h Source File

  • ole
  • oleview
  • iviewers

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by iviewers.RC
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_CANT_RUN_STANDALONE         100
00007 #define IDP_OLE_INIT_FAILED             101
00008 #define IDC_FORMATETC                   102
00009 #define IDS_REGISTRYKEY                 102
00010 #define IDD_IDATAOBJDLG                 103
00011 #define IDS_REG_TYPELIB                 103
00012 #define IDS_REG_WNDPOS                  104
00013 #define IDS_REG_GROUPBYKIND             105
00014 #define IDR_MAINFRAME                   128
00015 #define IDR_TYPELIBWND                  128
00016 #define IDD_DISPATCH                    130
00017 #define IDD_TYPELIB                     131
00018 #define IDB_IMAGELIST                   200
00019 #define IDC_VIEWTYPEINFO                1000
00020 #define IDC_TYPEINFOCOUNT               1002
00021 #define IDC_GETDATA                     1003
00022 #define IDC_DOGETDATA                   1021
00023 #define IDC_SETUPADVISE                 1022
00024 #define IDC_ADVISEDATA                  1023
00025 #define IDC_UPDATEDISPLAY               1024
00026 #define IDC_PRIMEFIRST                  1025
00027 #define IDC_CLEAROUTPUT                 1027
00028 #define ID_VIEW_GROUPBYTYPEKIND         32771
00029
00030 // Next default values for new objects
00031 //
00032 #ifdef APSTUDIO_INVOKED
00033 #ifndef APSTUDIO_READONLY_SYMBOLS
00034 #define _APS_NEXT_RESOURCE_VALUE        133
00035 #define _APS_NEXT_COMMAND_VALUE         32773
00036 #define _APS_NEXT_CONTROL_VALUE         1004
00037 #define _APS_NEXT_SYMED_VALUE           101
00038 #endif
00039 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/RegCtlDg.H Source File

  • ole
  • TstCon

RegCtlDg.H

Go to the documentation of this file.
00001 // File: RegCtlDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_REGISTERCONTROLSDLG_H__6E565AF4_D854_11D0_8E11_00C04FB68D60__INCLUDED_)
00011 #define AFX_REGISTERCONTROLSDLG_H__6E565AF4_D854_11D0_8E11_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // RegisterControlsDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CRegisterControlsDlg dialog
00021
00022 class CRegisterControlsDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CRegisterControlsDlg(CWnd* pParent = NULL);   // standard constructor
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CRegisterControlsDlg)
00030   enum { IDD = IDD_REGISTERCONTROLS };
00031   CButton m_butReregister;
00032   CButton m_butUnregister;
00033   CListCtrl   m_lvRegisteredControls;
00034   //}}AFX_DATA
00035
00036
00037 // Overrides
00038   // ClassWizard generated virtual function overrides
00039   //{{AFX_VIRTUAL(CRegisterControlsDlg)
00040   protected:
00041   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045 protected:
00046    void RefreshRegisteredControls();
00047    void UpdateButtons();
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CRegisterControlsDlg)
00051   virtual BOOL OnInitDialog();
00052   afx_msg void OnUnregister();
00053   afx_msg void OnRegisteredControlsItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
00054   afx_msg void OnReregister();
00055   afx_msg void OnRegister();
00056   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00057   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00058   //}}AFX_MSG
00059   DECLARE_MESSAGE_MAP()
00060 };
00061
00062 //{{AFX_INSERT_LOCATION}}
00063 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00064
00065 #endif // !defined(AFX_REGISTERCONTROLSDLG_H__6E565AF4_D854_11D0_8E11_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawView::XPreviewStateItem Member List

This is the complete list of members for CDrawView::XPreviewStateItem, including all inherited members.
m_bBrush | CDrawView::XPreviewStateItem |
m_bPen | CDrawView::XPreviewStateItem |
m_logbrush | CDrawView::XPreviewStateItem |
m_logpen | CDrawView::XPreviewStateItem |
Restore(CDrawObj &rObj) const | CDrawView::XPreviewStateItem |
Store(const CDrawObj &rObj) | CDrawView::XPreviewStateItem |
XPreviewStateItem(const CDrawObj &rObj) | CDrawView::XPreviewStateItem | [inline]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/stdafx.cpp Source File

  • ole
  • ipdrive

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autodriv.cpp Source File

  • ole
  • autoclik
  • autodriv

autodriv.cpp

Go to the documentation of this file.
00001 // autodriv.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "autodriv.h"
00014 #include "autoclik.h"
00015 #include "autoddlg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CAutoDrivApp
00024
00025 BEGIN_MESSAGE_MAP(CAutoDrivApp, CWinApp)
00026   //{{AFX_MSG_MAP(CAutoDrivApp)
00027     // NOTE - the ClassWizard will add and remove mapping macros here.
00028     //    DO NOT EDIT what you see in these blocks of generated code!
00029   //}}AFX_MSG
00030   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CAutoDrivApp construction
00035
00036 CAutoDrivApp::CAutoDrivApp()
00037 {
00038   // TODO: add construction code here,
00039   // Place all significant initialization in InitInstance
00040 }
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // The one and only CAutoDrivApp object
00044
00045 CAutoDrivApp theApp;
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CAutoDrivApp initialization
00049
00050 BOOL CAutoDrivApp::InitInstance()
00051 {
00052   // Initialize OLE libraries
00053   if (!AfxOleInit())
00054   {
00055     AfxMessageBox(IDP_OLE_INIT_FAILED);
00056     return FALSE;
00057   }
00058
00059   // Standard initialization
00060   // If you are not using these features and wish to reduce the size
00061   //  of your final executable, you should remove from the following
00062   //  the specific initialization routines you do not need.
00063
00064   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00065
00066   CAutoDrivDlg dlg;
00067   m_pMainWnd = &dlg;
00068   int nResponse = (int)dlg.DoModal();
00069   if (nResponse == IDOK)
00070   {
00071     // TODO: Place code here to handle when the dialog is
00072     //  dismissed with OK
00073   }
00074   else if (nResponse == IDCANCEL)
00075   {
00076     // TODO: Place code here to handle when the dialog is
00077     //  dismissed with Cancel
00078   }
00079
00080   // Since the dialog has been closed, return FALSE so that we exit the
00081   //  application, rather than start the application's message pump.
00082   return FALSE;
00083 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/FolderBar.h Source File

  • vc2008fp
  • Explorer

FolderBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CFolderBar window
00015
00016 class CFolderBar : public CDockablePane
00017 {
00018 // Construction
00019 public:
00020   CFolderBar();
00021
00022 // Attributes
00023 public:
00024   CMFCShellTreeCtrl m_wndShellTree;
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030
00031 // Implementation
00032 public:
00033   virtual ~CFolderBar();
00034
00035 protected:
00036   ULONG m_ulRecycleBin;
00037
00038   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00039   afx_msg void OnSize(UINT nType, int cx, int cy);
00040   afx_msg void OnSetFocus(CWnd* pOldWnd);
00041   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00042   afx_msg LRESULT OnNotifyRecycleBin(WPARAM wParam, LPARAM lParam);
00043
00044   DECLARE_MESSAGE_MAP()
00045 public:
00046   afx_msg void OnDestroy();
00047 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localctl.h Source File

  • controls
  • localize

localctl.h

Go to the documentation of this file.
00001 // localctl.h : Declaration of the CLocalizeCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CLocalizeCtrl : See localctl.cpp for implementation.
00014
00015 class CLocalizeCtrl : public COleControl
00016 {
00017   DECLARE_DYNCREATE(CLocalizeCtrl)
00018
00019 // Constructor
00020 public:
00021   CLocalizeCtrl();
00022
00023 // Overrides
00024
00025   // Drawing function
00026   virtual void OnDraw(
00027         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00028
00029   // Persistence
00030   virtual void DoPropExchange(CPropExchange* pPX);
00031
00032   // Reset control state
00033   virtual void OnResetState();
00034
00035   virtual void OnAmbientPropertyChange(DISPID dispid);
00036
00037 // Implementation
00038 protected:
00039   ~CLocalizeCtrl();
00040
00041   DECLARE_OLECREATE_EX(CLocalizeCtrl) // Class factory and guid
00042   DECLARE_OLETYPELIB(CLocalizeCtrl)       // GetTypeInfo
00043   DECLARE_PROPPAGEIDS(CLocalizeCtrl)      // Property page IDs
00044   DECLARE_OLECTLTYPE(CLocalizeCtrl)       // Type name and misc status
00045
00046 // Message maps
00047   //{{AFX_MSG(CLocalizeCtrl)
00048   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00049   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00050   afx_msg void OnCancelMode();
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053
00054 // Dispatch maps
00055   //{{AFX_DISPATCH(CLocalizeCtrl)
00056   BOOL m_invert;
00057   afx_msg void OnInvertChanged();
00058   //}}AFX_DISPATCH
00059   DECLARE_DISPATCH_MAP()
00060
00061   afx_msg void AboutBox();
00062
00063 // Event maps
00064   //{{AFX_EVENT(CLocalizeCtrl)
00065   void FireClick()
00066     {FireEvent(DISPID_CLICK,EVENT_PARAM(VTS_NONE));}
00067   //}}AFX_EVENT
00068   DECLARE_EVENT_MAP()
00069
00070 // Dispatch and event IDs
00071 public:
00072   enum {
00073   //{{AFX_DISP_ID(CLocalizeCtrl)
00074   dispidInvert = 1L,
00075   //}}AFX_DISP_ID
00076   };
00077
00078 protected:
00079   BOOL m_inverted;
00080
00081   virtual void LoadCaption();
00082   virtual HINSTANCE GetResourceHandle(LCID lcid);
00083 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTips.cpp Source File

  • vc2008fp
  • DlgToolTips

DlgToolTips.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DlgToolTips.h"
00013 #include "DlgToolTipsDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CDlgToolTipsApp
00023
00024 BEGIN_MESSAGE_MAP(CDlgToolTipsApp, CWinAppEx)
00025   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00026 END_MESSAGE_MAP()
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CDlgToolTipsApp construction
00030
00031 CDlgToolTipsApp::CDlgToolTipsApp() : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00032 {
00033   // TODO: add construction code here,
00034   // Place all significant initialization in InitInstance
00035 }
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // The one and only CDlgToolTipsApp object
00039
00040 CDlgToolTipsApp theApp;
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CDlgToolTipsApp initialization
00044
00045 BOOL CDlgToolTipsApp::InitInstance()
00046 {
00047   AfxEnableControlContainer();
00048
00049   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00050
00051   // Standard initialization
00052   // If you are not using these features and wish to reduce the size
00053   //  of your final executable, you should remove from the following
00054   //  the specific initialization routines you do not need.
00055
00056   CDlgToolTipsDlg dlg;
00057   m_pMainWnd = &dlg;
00058
00059   dlg.DoModal();
00060
00061   // Since the dialog has been closed, return FALSE so that we exit the
00062   //  application, rather than start the application's message pump.
00063   return FALSE;
00064 }
00065
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/StdAfx.cpp Source File

  • internet
  • HTMLEdit

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  HTMLEdit.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015
00016
00017
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/OutWndVw.Cpp Source File

  • ole
  • TstCon

OutWndVw.Cpp

Go to the documentation of this file.
00001 // OutputWindowView.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // COutputWindowView
00022
00023 IMPLEMENT_DYNCREATE( COutputWindowView, CEditView )
00024
00025 COutputWindowView::COutputWindowView()
00026 {
00027 }
00028
00029 COutputWindowView::~COutputWindowView()
00030 {
00031 }
00032
00033
00034 BEGIN_MESSAGE_MAP(COutputWindowView, CEditView)
00035   //{{AFX_MSG_MAP(COutputWindowView)
00036   ON_WM_CREATE()
00037   ON_WM_CONTEXTMENU()
00038   //}}AFX_MSG_MAP
00039    ON_COMMAND( ID_OUTPUTLOGEDIT_CLEAR, OnClear )
00040    ON_COMMAND( ID_OUTPUTLOGEDIT_COPY, OnCopy )
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // COutputWindowView drawing
00045
00046 void COutputWindowView::OnDraw( CDC* /* pDC */ )
00047 {
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // COutputWindowView diagnostics
00052
00053 #ifdef _DEBUG
00054 void COutputWindowView::AssertValid() const
00055 {
00056   CEditView::AssertValid();
00057 }
00058
00059 void COutputWindowView::Dump(CDumpContext& dc) const
00060 {
00061   CEditView::Dump(dc);
00062 }
00063 #endif //_DEBUG
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // COutputWindowView message handlers
00067
00068 int COutputWindowView::OnCreate( LPCREATESTRUCT pCreateStruct )
00069 {
00070   if( CEditView::OnCreate( pCreateStruct ) == -1 )
00071    {
00072     return( -1 );
00073    }
00074
00075    m_font.CreatePointFont( 100, _T( "Courier" ) );
00076    SetFont( &m_font );
00077
00078    SendMessage( EM_SETREADONLY, TRUE, 0 );
00079
00080   return( 0 );
00081 }
00082
00083 void COutputWindowView::OnContextMenu( CWnd* pWnd, CPoint point )
00084 {
00085    CMenu menu;
00086    CMenu* pPopupMenu;
00087    int iStart;
00088    int iEnd;
00089
00090    if( pWnd->m_hWnd != m_hWnd )
00091    {
00092     return;
00093    }
00094
00095    menu.LoadMenu( IDR_OUTPUTLOGEDIT_CONTEXT );
00096    pPopupMenu = menu.GetSubMenu( 0 );
00097    GetEditCtrl().GetSel( iStart, iEnd );
00098    if( iEnd == iStart )
00099    {
00100     pPopupMenu->EnableMenuItem( ID_OUTPUTLOGEDIT_COPY, MF_GRAYED );
00101    }
00102    pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y,
00103     this, NULL );
00104    menu.DestroyMenu();
00105 }
00106
00107 void COutputWindowView::OnClear()
00108 {
00109    DeleteContents();
00110 }
00111
00112 void COutputWindowView::OnCopy()
00113 {
00114    GetEditCtrl().Copy();
00115 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassViewBar.cpp Source File

  • vc2008fp
  • VisualStudioDemo

ClassViewBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "MainFrm.h"
00013 #include "ClassViewBar.h"
00014
00015 class CClassViewMenuButton : public CMFCToolBarMenuButton
00016 {
00017   friend class CClassViewBar;
00018
00019   DECLARE_SERIAL(CClassViewMenuButton)
00020
00021 public:
00022   CClassViewMenuButton(HMENU hMenu = NULL) : CMFCToolBarMenuButton((UINT)-1, hMenu, -1)
00023   {
00024   }
00025
00026   virtual void OnDraw(CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages, BOOL bHorz = TRUE,
00027     BOOL bCustomizeMode = FALSE, BOOL bHighlight = FALSE, BOOL bDrawBorder = TRUE, BOOL bGrayDisabledButtons = TRUE)
00028   {
00029     pImages = CMFCToolBar::GetImages();
00030
00031     CAfxDrawState ds;
00032     pImages->PrepareDrawImage(ds);
00033
00034     CMFCToolBarMenuButton::OnDraw(pDC, rect, pImages, bHorz, bCustomizeMode, bHighlight, bDrawBorder, bGrayDisabledButtons);
00035
00036     pImages->EndDrawImage(ds);
00037   }
00038 };
00039
00040 IMPLEMENT_SERIAL(CClassViewMenuButton, CMFCToolBarMenuButton, 1)
00041
00042 //////////////////////////////////////////////////////////////////////
00043 // Construction/Destruction
00044 //////////////////////////////////////////////////////////////////////
00045
00046 CClassViewBar::CClassViewBar()
00047 {
00048   m_nCurrSort = ID_SORTING_GROUPBYTYPE;
00049 }
00050
00051 CClassViewBar::~CClassViewBar()
00052 {
00053 }
00054
00055 BEGIN_MESSAGE_MAP(CClassViewBar, CDockablePane)
00056   ON_WM_CREATE()
00057   ON_WM_SIZE()
00058   ON_WM_CONTEXTMENU()
00059   ON_COMMAND(ID_CLASS_ADD_MEMEBER_FUNCTION, OnClassAddMemeberFunction)
00060   ON_COMMAND(ID_CLASS_ADD_MEMEBER_VARIABLE, OnClassAddMemeberVariable)
00061   ON_COMMAND(ID_CLASS_DEFINITION, OnClassDefinition)
00062   ON_COMMAND(ID_CLASS_PROPERTIES, OnClassProperties)
00063   ON_COMMAND(ID_NEW_FOLDER, OnNewFolder)
00064   ON_WM_PAINT()
00065   ON_WM_SETFOCUS()
00066   ON_COMMAND_RANGE(ID_SORTING_GROUPBYTYPE, ID_SORTING_SORTBYACCESS, OnSort)
00067   ON_UPDATE_COMMAND_UI_RANGE(ID_SORTING_GROUPBYTYPE, ID_SORTING_SORTBYACCESS, OnUpdateSort)
00068 END_MESSAGE_MAP()
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CClassViewBar message handlers
00072
00073 int CClassViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00074 {
00075   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00076     return -1;
00077
00078   CRect rectDummy;
00079   rectDummy.SetRectEmpty();
00080
00081   // Create views:
00082   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
00083
00084   if (!m_wndClassView.Create(dwViewStyle, rectDummy, this, 2))
00085   {
00086     TRACE0("Failed to create Class View\n");
00087     return -1;      // fail to create
00088   }
00089
00090   // Load images:
00091   m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_SORT);
00092   m_wndToolBar.LoadToolBar(IDR_SORT, 0, 0, TRUE /* Is locked */);
00093
00094   OnChangeVisualStyle();
00095
00096   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00097   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00098
00099   m_wndToolBar.SetOwner(this);
00100
00101   // All commands will be routed via this control , not via the parent frame:
00102   m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
00103
00104   CMenu menuSort;
00105   menuSort.LoadMenu(IDR_POPUP_SORT);
00106
00107   m_wndToolBar.ReplaceButton(ID_SORT_MENU, CClassViewMenuButton(menuSort.GetSubMenu(0)->GetSafeHmenu()));
00108
00109   CClassViewMenuButton* pButton =  DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0));
00110
00111   if (pButton != NULL)
00112   {
00113     pButton->m_bText = FALSE;
00114     pButton->m_bImage = TRUE;
00115     pButton->SetImage(GetCmdMgr()->GetCmdImage(m_nCurrSort));
00116     pButton->SetMessageWnd(this);
00117   }
00118
00119   // Fill view context(dummy code, don't seek here something magic :-)):
00120   FillClassView();
00121
00122   return 0;
00123 }
00124
00125 void CClassViewBar::OnSize(UINT nType, int cx, int cy)
00126 {
00127   CDockablePane::OnSize(nType, cx, cy);
00128   AdjustLayout();
00129 }
00130
00131 void CClassViewBar::FillClassView()
00132 {
00133   HTREEITEM hRoot = m_wndClassView.InsertItem(_T("Hello classes"), 0, 0);
00134   m_wndClassView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);
00135
00136   HTREEITEM hClass = m_wndClassView.InsertItem(_T("CAboutDlg"), 1, 1, hRoot);
00137   m_wndClassView.InsertItem(_T("CAboutDlg()"), 3, 3, hClass);
00138   m_wndClassView.InsertItem(_T("DoDataExchange(CDataExchange* pDX)"), 4, 4, hClass);
00139
00140   m_wndClassView.Expand(hRoot, TVE_EXPAND);
00141
00142   hClass = m_wndClassView.InsertItem(_T("CHelloApp"), 1, 1, hRoot);
00143   m_wndClassView.InsertItem(_T("CHelloApp()"), 3, 3, hClass);
00144   m_wndClassView.InsertItem(_T("InitInstance()"), 3, 3, hClass);
00145   m_wndClassView.InsertItem(_T("OnAppAbout()"), 3, 3, hClass);
00146
00147   hClass = m_wndClassView.InsertItem(_T("CHelloDoc"), 1, 1, hRoot);
00148   m_wndClassView.InsertItem(_T("AssertValid()"), 3, 3, hClass);
00149   m_wndClassView.InsertItem(_T("CHelloDoc()"), 4, 4, hClass);
00150   m_wndClassView.InsertItem(_T("~CHelloDoc()"), 3, 3, hClass);
00151   m_wndClassView.InsertItem(_T("Dump(CDumpContext& dc)"), 3, 3, hClass);
00152   m_wndClassView.InsertItem(_T("OnNewDocument()"), 3, 3, hClass);
00153   m_wndClassView.InsertItem(_T("Serialize()"), 3, 3, hClass);
00154
00155   hClass = m_wndClassView.InsertItem(_T("CHelloView"), 1, 1, hRoot);
00156   m_wndClassView.InsertItem(_T("AssertValid()"), 3, 3, hClass);
00157   m_wndClassView.InsertItem(_T("CHelloView()"), 4, 4, hClass);
00158   m_wndClassView.InsertItem(_T("~CHelloView()"), 3, 3, hClass);
00159   m_wndClassView.InsertItem(_T("Dump(CDumpContext& dc)"), 3, 3, hClass);
00160   m_wndClassView.InsertItem(_T("GetDocument()"), 3, 3, hClass);
00161   m_wndClassView.InsertItem(_T("OnDraw(CDC* pDC)"), 3, 3, hClass);
00162   m_wndClassView.Expand(hClass, TVE_EXPAND);
00163
00164   hClass = m_wndClassView.InsertItem(_T("CMainFrame"), 1, 1, hRoot);
00165   m_wndClassView.InsertItem(_T("AssertValid()"), 3, 3, hClass);
00166   m_wndClassView.InsertItem(_T("CMainFrame()"), 3, 3, hClass);
00167   m_wndClassView.InsertItem(_T("~CMainFrame()"), 3, 3, hClass);
00168   m_wndClassView.InsertItem(_T("Dump(CDumpContext& dc)"), 3, 3, hClass);
00169   m_wndClassView.InsertItem(_T("OnCreate(LPCREATESTRUCT lpCreateStruct)"), 4, 4, hClass);
00170   m_wndClassView.InsertItem(_T("PreCreateWindow(CREATESTRUCT& cs)"), 3, 3, hClass);
00171   m_wndClassView.InsertItem(_T("m_wndMenuBar"), 6, 6, hClass);
00172   m_wndClassView.InsertItem(_T("m_wndToolBar"), 6, 6, hClass);
00173   m_wndClassView.InsertItem(_T("m_wndStatusBar"), 6, 6, hClass);
00174
00175   hClass = m_wndClassView.InsertItem(_T("Globals"), 2, 2, hRoot);
00176   m_wndClassView.InsertItem(_T("theApp"), 5, 5, hClass);
00177   m_wndClassView.Expand(hClass, TVE_EXPAND);
00178 }
00179
00180 void CClassViewBar::OnContextMenu(CWnd* pWnd, CPoint point)
00181 {
00182   CTreeCtrl* pWndTree = (CTreeCtrl*)&m_wndClassView;
00183   ASSERT_VALID(pWndTree);
00184
00185   if (pWnd != pWndTree)
00186   {
00187     CDockablePane::OnContextMenu(pWnd, point);
00188     return;
00189   }
00190
00191   if (point != CPoint(-1, -1))
00192   {
00193     // Select clicked item:
00194     CPoint ptTree = point;
00195     pWndTree->ScreenToClient(&ptTree);
00196
00197     UINT flags = 0;
00198     HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
00199     if (hTreeItem != NULL)
00200     {
00201       pWndTree->SelectItem(hTreeItem);
00202     }
00203   }
00204
00205   pWndTree->SetFocus();
00206   CMenu menu;
00207   menu.LoadMenu(IDR_POPUP_SORT);
00208
00209   CMenu* pSumMenu = menu.GetSubMenu(0);
00210
00211   if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
00212   {
00213     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00214
00215     if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
00216       return;
00217
00218     ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
00219     UpdateDialogControls(this, FALSE);
00220   }
00221 }
00222
00223 void CClassViewBar::AdjustLayout()
00224 {
00225   if (GetSafeHwnd() == NULL)
00226   {
00227     return;
00228   }
00229
00230   CRect rectClient;
00231   GetClientRect(rectClient);
00232
00233   int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;
00234
00235   m_wndToolBar.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
00236   m_wndClassView.SetWindowPos(NULL, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
00237 }
00238
00239 BOOL CClassViewBar::PreTranslateMessage(MSG* pMsg)
00240 {
00241   return CDockablePane::PreTranslateMessage(pMsg);
00242 }
00243
00244 void CClassViewBar::OnSort(UINT id)
00245 {
00246   if (m_nCurrSort == id)
00247   {
00248     return;
00249   }
00250
00251   m_nCurrSort = id;
00252
00253   CClassViewMenuButton* pButton =  DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0));
00254
00255   if (pButton != NULL)
00256   {
00257     pButton->SetImage(GetCmdMgr()->GetCmdImage(id));
00258     m_wndToolBar.Invalidate();
00259     m_wndToolBar.UpdateWindow();
00260   }
00261 }
00262
00263 void CClassViewBar::OnUpdateSort(CCmdUI* pCmdUI)
00264 {
00265   pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrSort);
00266 }
00267
00268 void CClassViewBar::OnClassAddMemeberFunction()
00269 {
00270   AfxMessageBox(_T("Add member function..."));
00271 }
00272
00273 void CClassViewBar::OnClassAddMemeberVariable()
00274 {
00275   // TODO: Add your command handler code here
00276 }
00277
00278 void CClassViewBar::OnClassDefinition()
00279 {
00280   // TODO: Add your command handler code here
00281 }
00282
00283 void CClassViewBar::OnClassProperties()
00284 {
00285   // TODO: Add your command handler code here
00286 }
00287
00288 void CClassViewBar::OnNewFolder()
00289 {
00290   AfxMessageBox(_T("New Folder..."));
00291 }
00292
00293 void CClassViewBar::OnPaint()
00294 {
00295   CPaintDC dc(this); // device context for painting
00296
00297   CRect rectTree;
00298   m_wndClassView.GetWindowRect(rectTree);
00299   ScreenToClient(rectTree);
00300
00301   rectTree.InflateRect(1, 1);
00302   dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
00303 }
00304
00305 void CClassViewBar::OnSetFocus(CWnd* pOldWnd)
00306 {
00307   CDockablePane::OnSetFocus(pOldWnd);
00308
00309   m_wndClassView.SetFocus();
00310 }
00311
00312 void CClassViewBar::OnChangeVisualStyle()
00313 {
00314   m_ClassViewImages.DeleteImageList();
00315
00316   UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_CLASS_VIEW_24 : IDB_CLASS_VIEW;
00317
00318   CBitmap bmp;
00319   if (!bmp.LoadBitmap(uiBmpId))
00320   {
00321     TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
00322     ASSERT(FALSE);
00323     return;
00324   }
00325
00326   BITMAP bmpObj;
00327   bmp.GetBitmap(&bmpObj);
00328
00329   UINT nFlags = ILC_MASK;
00330
00331   nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;
00332
00333   m_ClassViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
00334   m_ClassViewImages.Add(&bmp, RGB(255, 0, 0));
00335
00336   m_wndClassView.SetImageList(&m_ClassViewImages, TVSIL_NORMAL);
00337
00338   m_wndToolBar.CleanUpLockedImages();
00339   m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_SORT24 : IDR_SORT, 0, 0, TRUE /* Locked */);
00340 }
00341
00342
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStroke Member List

This is the complete list of members for CStroke, including all inherited members.
CStroke(UINT nPenWidth) | CStroke |
CStroke() | CStroke | [protected]
DrawStroke(CDC *pDC) | CStroke |
FinishStroke() | CStroke |
GetBoundingRect() | CStroke | [inline]
m_nPenWidth | CStroke | [protected]
m_pointArray | CStroke |
m_rectBounding | CStroke |
Serialize(CArchive &ar) | CStroke | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDisplayIC Member List

This is the complete list of members for CDisplayIC, including all inherited members.
CDisplayIC() | CDisplayIC | [inline]
CDisplayIC() | CDisplayIC | [inline]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View4.h Source File

  • vc2008fp
  • TabbedView

View4.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CView4 view
00015
00016 class CView4 : public CScrollView
00017 {
00018 protected:
00019   CView4();           // protected constructor used by dynamic creation
00020   DECLARE_DYNCREATE(CView4)
00021
00022 // Attributes
00023 public:
00024   CMFCTabCtrl* GetParentTab () const
00025   {
00026     return DYNAMIC_DOWNCAST (CMFCTabCtrl, GetParent ());
00027   }
00028
00029 // Operations
00030 public:
00031
00032 // Overrides
00033   public:
00034   virtual CScrollBar* GetScrollBarCtrl(int nBar) const;
00035   protected:
00036   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00037   virtual void OnInitialUpdate();     // first time after construct
00038
00039 // Implementation
00040 protected:
00041   virtual ~CView4();
00042 #ifdef _DEBUG
00043   virtual void AssertValid() const;
00044   virtual void Dump(CDumpContext& dc) const;
00045 #endif
00046
00047   afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00048   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00049   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00050
00051   DECLARE_MESSAGE_MAP()
00052 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMToolBar.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMToolBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MSMToolBar.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMToolBar.h"
00015
00016 #include "MSMVisualManager.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 CMFCToolBarImages CMSMToolBar::m_PressedImages;
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMSMToolBar
00028
00029 IMPLEMENT_DYNCREATE(CMSMToolBar, CMFCToolBar)
00030
00031 CMSMToolBar::CMSMToolBar()
00032 {
00033 }
00034
00035
00036 CMSMToolBar::~CMSMToolBar()
00037 {
00038 }
00039
00040 BOOL CMSMToolBar::LoadToolBar(UINT uiResID, UINT uiColdResID, UINT uiMenuResID,
00041                 BOOL bLocked,
00042                 UINT uiDisabledResID, UINT uiMenuDisabledResID,
00043                 UINT uiHotResID, UINT uiPressedResID)
00044 {
00045   if (!CMFCToolBar::LoadToolBar (uiResID, uiColdResID, uiMenuResID, bLocked,
00046     uiDisabledResID, uiMenuDisabledResID, uiHotResID))
00047   {
00048     return FALSE;
00049   }
00050
00051   if (uiPressedResID != 0)
00052   {
00053     m_PressedImages.SetImageSize (m_sizeImage);
00054
00055     if (!m_PressedImages.Load (uiPressedResID, AfxGetResourceHandle (), TRUE))
00056     {
00057       return FALSE;
00058     }
00059
00060     ASSERT (m_Images.GetCount () == m_PressedImages.GetCount ());
00061   }
00062
00063   return TRUE;
00064 }
00065
00066 BEGIN_MESSAGE_MAP(CMSMToolBar, CMFCToolBar)
00067   ON_WM_CREATE()
00068   ON_WM_SYSCOLORCHANGE()
00069 END_MESSAGE_MAP()
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CMSMToolBar message handlers
00073
00074 int CMSMToolBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00075 {
00076   if (CMFCToolBar::OnCreate(lpCreateStruct) == -1)
00077     return -1;
00078
00079   SetPaneStyle((GetPaneStyle () &
00080     ~(CBRS_GRIPPER | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT))
00081     | CBRS_SIZE_DYNAMIC);
00082   SetBorders ();
00083
00084   SetGrayDisabledButtons (FALSE);
00085
00086   return 0;
00087 }
00088
00089 BOOL CMSMToolBar::DrawButton(CDC* pDC, CMFCToolBarButton* pButton,
00090               CMFCToolBarImages* pImages,
00091               BOOL bHighlighted, BOOL bDrawDisabledImages)
00092 {
00093   ASSERT_VALID (pDC);
00094   ASSERT_VALID (pButton);
00095
00096   CMFCToolBarImages* pNewImages = pImages;
00097
00098   CAfxDrawState ds;
00099
00100   if (!m_bMenuMode && (pButton->m_nStyle & (TBBS_PRESSED)) &&
00101     m_PressedImages.GetCount () > 0)
00102   {
00103     pNewImages = &m_PressedImages;
00104
00105     pNewImages->SetTransparentColor (afxGlobalData.clrBtnFace);
00106
00107     pNewImages->PrepareDrawImage (ds, GetImageSize (), FALSE);
00108   }
00109
00110   if (!CMFCToolBar::DrawButton (pDC, pButton, pNewImages, bHighlighted,
00111       bDrawDisabledImages))
00112   {
00113     return FALSE;
00114   }
00115
00116   if (pNewImages != pImages)
00117   {
00118     pNewImages->EndDrawImage (ds);
00119   }
00120
00121   return TRUE;
00122 }
00123
00124
00125 void CMSMToolBar::OnSysColorChange ()
00126 {
00127   CMFCToolBar::OnSysColorChange ();
00128
00129   m_PressedImages.OnSysColorChange ();
00130 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/resource.h Source File

  • advanced
  • mtgdi

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by mtgdi.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define IDS_CAPTION_FORMAT              129
00008 #define IDS_CAPTION_NOTHREADS           130
00009 #define ID_THREAD_NEWBALL               32771
00010 #define ID_THREAD_KILLTHREADS           32772
00011 #define ID_THREAD_NEWRECTANGLE          32773
00012 #define ID_THREAD_NEWLINE               32774
00013 #define ID_THREAD_10NEWBALLS            32775
00014 #define ID_THREAD_25NEWBALLS            32776
00015 #define ID_THREAD_10NEWRECTANGLES       32777
00016 #define ID_THREAD_25NEWRECTANGLES       32778
00017 #define ID_THREAD_10NEWLINES            32779
00018 #define ID_THREAD_25NEWLINES            32780
00019 #define ID_THREAD_KILLTHREADSSLOW       32782
00020
00021 // Next default values for new objects
00022 //
00023 #ifdef APSTUDIO_INVOKED
00024 #ifndef APSTUDIO_READONLY_SYMBOLS
00025 #define _APS_NEXT_RESOURCE_VALUE        130
00026 #define _APS_NEXT_COMMAND_VALUE         32783
00027 #define _APS_NEXT_CONTROL_VALUE         1000
00028 #define _APS_NEXT_SYMED_VALUE           101
00029 #endif
00030 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/stdafx.h Source File

  • general
  • modeless

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (c) Microsoft Corporation.  All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>      // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoDoc.cpp Source File

  • vc2008fp
  • StatusBarDemo

StatusBarDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StatusBarDemo.h"
00013
00014 #include "StatusBarDemoDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CStatusBarDemoDoc
00024
00025 IMPLEMENT_DYNCREATE(CStatusBarDemoDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CStatusBarDemoDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CStatusBarDemoDoc construction/destruction
00032
00033 CStatusBarDemoDoc::CStatusBarDemoDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CStatusBarDemoDoc::~CStatusBarDemoDoc()
00040 {
00041 }
00042
00043 BOOL CStatusBarDemoDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CStatusBarDemoDoc serialization
00058
00059 void CStatusBarDemoDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CStatusBarDemoDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CStatusBarDemoDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CStatusBarDemoDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CStatusBarDemoDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonListFontButton::XItem Member List

This is the complete list of members for CRibbonListFontButton::XItem, including all inherited members.
m_Caption | CRibbonListFontButton::XItem |
m_Font | CRibbonListFontButton::XItem |
m_Height | CRibbonListFontButton::XItem |
operator=(const XItem &rItem) | CRibbonListFontButton::XItem | [inline]
XItem() | CRibbonListFontButton::XItem | [inline]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSliderButton Member List

This is the complete list of members for CSliderButton, including all inherited members.
CanBeStretched() const | CSliderButton | [inline, virtual]
CopyFrom(const CMFCToolBarButton &src) | CSliderButton | [virtual]
CSliderButton() | CSliderButton |
CSliderButton(UINT uiId, int iImage=-1, DWORD dwStyle=0, int iWidth=0) | CSliderButton |
GetHwnd() | CSliderButton | [inline, virtual]
GetPos(UINT uiCmd) | CSliderButton | [static]
HaveHotBorder() const | CSliderButton | [inline, virtual]
m_dwStyle | CSliderButton |
m_iWidth | CSliderButton |
m_nMax | CSliderButton |
m_nMin | CSliderButton |
m_nValue | CSliderButton |
m_wndSlider | CSliderButton |
OnCalculateSize(CDC *pDC, const CSize &sizeDefault, BOOL bHorz) | CSliderButton | [virtual]
OnChangeParentWnd(CWnd *pWndParent) | CSliderButton | [virtual]
OnDraw(CDC *, const CRect &, CMFCToolBarImages *, BOOL=TRUE, BOOL=FALSE, BOOL=FALSE, BOOL=TRUE, BOOL=TRUE) | CSliderButton | [inline, virtual]
OnMove() | CSliderButton | [virtual]
OnShow(BOOL bShow) | CSliderButton | [virtual]
OnSize(int iSize) | CSliderButton | [virtual]
Serialize(CArchive &ar) | CSliderButton | [virtual]
SetRange(int iMin, int iMax) | CSliderButton |
SetValue(int iValue, BOOL bNotify=TRUE) | CSliderButton |
~CSliderButton() | CSliderButton | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svrview.h Source File

  • ole
  • hiersvr

svrview.h

Go to the documentation of this file.
00001 // svrview.h : interface of the CServerView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "svritem.h"
00013
00014 class CServerView : public CScrollView
00015 {
00016 protected: // create from serialization only
00017   CServerView();
00018   DECLARE_DYNCREATE(CServerView)
00019
00020 // Attributes
00021 public:
00022   CServerDoc* GetDocument()
00023   {
00024     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CServerDoc)));
00025     ASSERT_VALID(m_pDocument);
00026     return (CServerDoc*)m_pDocument;
00027   }
00028   void SetSelection(CServerNode* pNewSel, CDC* pDC);
00029   void SetSelection(CServerNode* pNewSel);
00030
00031 // Operations
00032 public:
00033   void SetScrollInfo();
00034   BOOL SetZoomFactor(CSize zoomNum, CSize zoomDenom);
00035   void UpdateServerView();
00036   CSize CalcActualViewSize(CDC *pDC);
00037   CSize CalcActualItemSize(CServerNode* pItem, CDC *pDC);
00038   CSize CalcScaledViewSize();
00039   CSize CalcScaledItemSize(CServerNode* pItem);
00040   BOOL DoPasteItem(COleDataObject* pDataObject);
00041   void DoPasteNative(COleDataObject* pDataObject);
00042   void DoPasteText(COleDataObject* pDataObject);
00043   void DoImportText(CArchive &ar);
00044   void ScrollToItem(CServerNode* pItem, BOOL bScrollUp);
00045   void Locate(int cnt, BOOL bScrollUp);
00046   void InvalidateItem(CServerNode* pItem, CDC* pDC);
00047   void InvalidateItem(CServerNode* pItem);
00048   void ToggleSelectedItem();
00049
00050 // Implementation
00051 public:
00052   virtual ~CServerView();
00053   virtual void OnDraw(CDC* pDC);
00054   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00055   virtual void OnInitialUpdate();
00056   virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
00057 #ifdef _DEBUG
00058   virtual void AssertValid() const;
00059   virtual void Dump(CDumpContext& dc) const;
00060 #endif
00061
00062
00063 protected:
00064   // drag/drop stuff
00065   COleDropTarget m_dropTarget;
00066   DROPEFFECT m_prevDropEffect;
00067
00068   // current selection - store the node and the last drawn rect
00069   CServerNode* m_pSelectedNode;
00070   static CServerNode* NEAR m_pDragNode;
00071
00072   // upper left of drawing
00073   CPoint m_ptStart;
00074
00075   // zoom factor
00076   CSize m_zoomNum;
00077   CSize m_zoomDenom;
00078
00079   // implementation helpers
00080   void SelectAtPoint(CPoint point, CPoint& pointHit);
00081   void DoBranch(CServerNode *pItem, BOOL bHide);
00082
00083   virtual BOOL OnDrop(COleDataObject* pDataObject,
00084     DROPEFFECT dropEffect, CPoint point);
00085   virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject,
00086     DWORD grfKeyState, CPoint point);
00087   virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject,
00088     DWORD grfKeyState, CPoint point);
00089   virtual void OnDragLeave();
00090
00091 // Generated message map functions
00092 protected:
00093   //{{AFX_MSG(CServerView)
00094   afx_msg void OnChangeName();
00095   afx_msg void OnAddNode();
00096   afx_msg void OnUpdateHasSel(CCmdUI* pCmdUI);
00097   afx_msg void OnEditCopy();
00098   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00099   afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00100   afx_msg void OnImportText();
00101   afx_msg void OnViewZoomCustom();
00102   afx_msg void OnEditCut();
00103   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00104   afx_msg void OnEditPaste();
00105   afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
00106   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00107   afx_msg void OnEditClear();
00108   afx_msg void OnTreeCollapsebranch();
00109   afx_msg void OnTreeExpandall();
00110   afx_msg void OnTreeExpandbranch();
00111   afx_msg void OnTreeExpandonelevel();
00112   afx_msg void OnUpdateTreeCollapsebranch(CCmdUI* pCmdUI);
00113   afx_msg void OnUpdateTreeExpandonelevel(CCmdUI* pCmdUI);
00114   afx_msg void OnUpdateTreeExpandall(CCmdUI* pCmdUI);
00115   afx_msg void OnUpdateTreeExpandbranch(CCmdUI* pCmdUI);
00116   afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00117   afx_msg void OnSize(UINT nType, int cx, int cy);
00118   //}}AFX_MSG
00119
00120   // special message handling
00121   afx_msg void OnZoom(UINT nID);
00122   afx_msg void OnUpdateZoom(CCmdUI* pCmdUI);
00123
00124   DECLARE_MESSAGE_MAP()
00125   friend class CServerViewDC;
00126 };
00127
00128 class CServerDC : public CClientDC
00129 {
00130   CFont font;
00131   CFont *pOldFont;
00132
00133 public:
00134   CServerDC(CServerView *pView);
00135   ~CServerDC();
00136 };
00137
00138 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testdll2.h Source File

  • advanced
  • dllhusk

testdll2.h

Go to the documentation of this file.
00001 // TESTDLL2.H - Public API exported from 'TESTDLL2.DLL'
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 // Note: This sample uses AFX_EXT_CLASS to export an entire class.
00013 // This avoids creating a .DEF file with all the decorated names for
00014 // the class.  Creating a .DEF file is more efficient since the names
00015 // can be exported by ordinal.  To use that method of exporting, much
00016 // like MFC does itself, uncomment the following two lines and add
00017 // the appropriate lines to your .DEF file.
00018
00019 //#undef AFX_DATA
00020 //#define AFX_DATA AFX_EXT_DATA
00021
00022 // Initialize the DLL, register the classes etc
00023 extern "C" AFX_EXT_API void WINAPI InitTestDLL2();
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // This DLL exports a general purpose MDIChildWnd that can be used for
00027 //   a list output (stores data in a listbox)
00028 // All the public interfaces are exported in TESTDLL2.DEF
00029
00030 class AFX_EXT_CLASS CListOutputFrame : public CMDIChildWnd
00031 {
00032 private:
00033   using CMDIChildWnd::Create;
00034
00035   DECLARE_DYNAMIC(CListOutputFrame)
00036
00037 // Constructors
00038 public:
00039   // NOTE: always export explicit constructors and destructor to be safe
00040   CListOutputFrame();
00041   ~CListOutputFrame();
00042   BOOL Create(LPCTSTR lpszWindowName,
00043     DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW,
00044     const RECT& rect = rectDefault,
00045     CMDIFrameWnd* pParentWnd = NULL);
00046
00047 // Operations
00048   void Clear();       // clears list
00049   void AddString(LPCTSTR lpszItem);        // adds to end of list
00050   void SetBackpointer(CListOutputFrame** ppThis);
00051
00052 // Implementation
00053 protected:
00054   CMenu       m_menu;         // menu to give to the the MDI Frame
00055   CDialogBar  m_dlgBar;
00056   CListBox    m_listBox;
00057   CListOutputFrame** m_ppThis;  // backpointer to clear when frame destroyed
00058   HGLOBAL GetTextData();
00059
00060   //{{AFX_MSG(CListOutputFrame)
00061   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00062   afx_msg void OnEditClear();
00063   afx_msg void OnEditCopy();
00064   afx_msg void OnEditCut();
00065   //}}AFX_MSG
00066   DECLARE_MESSAGE_MAP()
00067 };
00068
00069 // inlines do not need to be exported
00070 inline void CListOutputFrame::SetBackpointer(CListOutputFrame** ppThis)
00071   { m_ppThis = ppThis; }
00072
00073 #undef AFX_DATA
00074 #define AFX_DATA
00075
00076 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribitm.cpp Source File

  • general
  • Scribble

scribitm.cpp

Go to the documentation of this file.
00001 // ScribItm.cpp : implementation of the CScribbleItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014
00015 #include "ScribDoc.h"
00016 #include "ScribItm.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CScribbleItem implementation
00025
00026 IMPLEMENT_DYNAMIC(CScribbleItem, COleServerItem)
00027
00028 CScribbleItem::CScribbleItem(CScribbleDoc* pContainerDoc)
00029   : COleServerItem(pContainerDoc, TRUE)
00030 {
00031   // TODO: add one-time construction code here
00032   //  (eg, adding additional clipboard formats to the item's data source)
00033 }
00034
00035 CScribbleItem::~CScribbleItem()
00036 {
00037   // TODO: add cleanup code here
00038 }
00039
00040 void CScribbleItem::Serialize(CArchive& ar)
00041 {
00042   // CScribbleItem::Serialize will be called by the framework if
00043   //  the item is copied to the clipboard.  This can happen automatically
00044   //  through the OLE callback OnGetClipboardData.  A good default for
00045   //  the embedded item is simply to delegate to the document's Serialize
00046   //  function.  If you support links, then you will want to serialize
00047   //  just a portion of the document.
00048
00049   if (!IsLinkedItem())
00050   {
00051     CScribbleDoc* pDoc = GetDocument();
00052     ASSERT_VALID(pDoc);
00053     pDoc->Serialize(ar);
00054   }
00055 }
00056
00057 BOOL CScribbleItem::OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize)
00058 {
00059   // Most applications, like this one, only handle drawing the content
00060   //  aspect of the item.  If you wish to support other aspects, such
00061   //  as DVASPECT_THUMBNAIL (by overriding OnDrawEx), then this
00062   //  implementation of OnGetExtent should be modified to handle the
00063   //  additional aspect(s).
00064
00065   if (dwDrawAspect != DVASPECT_CONTENT)
00066     return COleServerItem::OnGetExtent(dwDrawAspect, rSize);
00067
00068   // CScribbleItem::OnGetExtent is called to get the extent in
00069   //  HIMETRIC units of the entire item.  The default implementation
00070   //  here simply returns a hard-coded number of units.
00071
00072   CScribbleDoc* pDoc = GetDocument();
00073   ASSERT_VALID(pDoc);
00074
00075   rSize = pDoc->GetDocSize();
00076   CClientDC dc(NULL);
00077
00078         // use a mapping mode based on logical units
00079   //  (we can't use MM_LOENGLISH because MM_LOENGLISH uses physical inches)
00080   dc.SetMapMode(MM_ANISOTROPIC);
00081   dc.SetViewportExt(dc.GetDeviceCaps(LOGPIXELSX), dc.GetDeviceCaps(LOGPIXELSY));
00082   dc.SetWindowExt(100, -100);
00083   dc.LPtoHIMETRIC(&rSize);
00084
00085   return TRUE;
00086 }
00087
00088 BOOL CScribbleItem::OnDraw(CDC* pDC, CSize& /* rSize */)
00089 {
00090   CScribbleDoc* pDoc = GetDocument();
00091   ASSERT_VALID(pDoc);
00092
00093   pDC->SetMapMode(MM_ANISOTROPIC);
00094   CSize sizeDoc = pDoc->GetDocSize();
00095   sizeDoc.cy = -sizeDoc.cy;
00096   pDC->SetWindowOrg(0,0);
00097   pDC->SetWindowExt(sizeDoc);
00098
00099   CTypedPtrList<CObList,CStroke*>& strokeList = pDoc->m_strokeList;
00100   POSITION pos = strokeList.GetHeadPosition();
00101   while (pos != NULL)
00102   {
00103     strokeList.GetNext(pos)->DrawStroke(pDC);
00104   }
00105
00106   return TRUE;
00107 }
00108
00109 /////////////////////////////////////////////////////////////////////////////
00110 // CScribbleItem diagnostics
00111
00112 #ifdef _DEBUG
00113 void CScribbleItem::AssertValid() const
00114 {
00115   COleServerItem::AssertValid();
00116 }
00117
00118 void CScribbleItem::Dump(CDumpContext& dc) const
00119 {
00120   COleServerItem::Dump(dc);
00121 }
00122 #endif
00123
00124 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/autoclik.cpp Source File

  • ole
  • acdual

autoclik.cpp

Go to the documentation of this file.
00001 // AutoClik.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "MainFrm.h"
00016 #include "ChildFrm.h"
00017 #include "AClikDoc.h"
00018 #include "AClikVw.h"
00019 #include "Autoclik_i.c"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CAutoClickApp
00029
00030 BEGIN_MESSAGE_MAP(CAutoClickApp, CWinApp)
00031   //{{AFX_MSG_MAP(CAutoClickApp)
00032   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00033     // NOTE - the ClassWizard will add and remove mapping macros here.
00034     //    DO NOT EDIT what you see in these blocks of generated code!
00035   //}}AFX_MSG_MAP
00036   // Standard file based document commands
00037   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00038   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00039   // Standard print setup command
00040   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CAutoClickApp construction
00045
00046 CAutoClickApp::CAutoClickApp()
00047 {
00048   // TODO: add construction code here,
00049   // Place all significant initialization in InitInstance
00050 }
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // The one and only CAutoClickApp object
00054
00055 CAutoClickApp theApp;
00056
00057
00058 // DUAL_SUPPORT_START
00059 // Original Code:
00060 //    // This identifier was generated to be statistically unique for your app.
00061 //    // You may change it if you prefer to choose a specific identifier.
00062 //
00063 //    // {47D53E03-CC33-11CE-8F35-00DD01109044}
00064 //    static const CLSID clsid =
00065 //    { 0x47d53e03, 0xcc33, 0x11ce, { 0x8f, 0x35, 0x0, 0xdd, 0x1, 0x10, 0x90, 0x44 } };
00066
00067 // See ACDual.H for the definition of CLSID_Document
00068 // DUAL_SUPPORT_END
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CAutoClickApp initialization
00072
00073 BOOL CAutoClickApp::InitInstance()
00074 {
00075   // Initialize OLE libraries
00076   if (!AfxOleInit())
00077   {
00078     AfxMessageBox(IDP_OLE_INIT_FAILED);
00079     return FALSE;
00080   }
00081
00082   // Standard initialization
00083   // If you are not using these features and wish to reduce the size
00084   //  of your final executable, you should remove from the following
00085   //  the specific initialization routines you do not need.
00086
00087   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00088
00089   // Register the application's document templates.  Document templates
00090   //  serve as the connection between documents, frame windows and views.
00091
00092   CMultiDocTemplate* pDocTemplate;
00093   pDocTemplate = new CMultiDocTemplate(
00094     IDR_ACLICKTYPE,
00095     RUNTIME_CLASS(CAutoClickDoc),
00096     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00097     RUNTIME_CLASS(CAutoClickView));
00098   AddDocTemplate(pDocTemplate);
00099
00100   // Connect the COleTemplateServer to the document template.
00101   //  The COleTemplateServer creates new documents on behalf
00102   //  of requesting OLE containers by using information
00103   //  specified in the document template.
00104
00105   // DUAL_SUPPORT_START
00106   // Original Code:
00107   //     m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
00108   m_server.ConnectTemplate(CLSID_Document, pDocTemplate, FALSE);
00109   // DUAL_SUPPORT_END
00110
00111   // Register all OLE server factories as running.  This enables the
00112   //  OLE libraries to create objects from other applications.
00113   COleTemplateServer::RegisterAll();
00114     // Note: MDI applications register all server objects without regard
00115     //  to the /Embedding or /Automation on the command line.
00116
00117   // create main MDI Frame window
00118   CMainFrame* pMainFrame = new CMainFrame;
00119   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00120     return FALSE;
00121   m_pMainWnd = pMainFrame;
00122
00123   // Enable drag/drop open
00124   m_pMainWnd->DragAcceptFiles();
00125
00126   // Enable DDE Execute open
00127   EnableShellOpen();
00128   RegisterShellFileTypes(TRUE);
00129
00130   // Parse command line for standard shell commands, DDE, file open
00131   CCommandLineInfo cmdInfo;
00132   ParseCommandLine(cmdInfo);
00133
00134   // Check to see if launched as OLE server
00135   if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
00136   {
00137     // Application was run with /Embedding or /Automation.  Don't show the
00138     //  main window in this case.
00139     return TRUE;
00140   }
00141
00142   // When a server application is launched stand-alone, it is a good idea
00143   //  to update the system registry in case it has been damaged.
00144   m_server.UpdateRegistry(OAT_DISPATCH_OBJECT);
00145   COleObjectFactory::UpdateRegistryAll();
00146
00147   // DUAL_SUPPORT_START
00148   //    make sure the type library is registerd. Otherwise dual interface won't work!
00149   AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_ACDual, _T("AutoClik.TLB"));
00150   // DUAL_SUPPORT_END
00151
00152   // Dispatch commands specified on the command line
00153   if (!ProcessShellCommand(cmdInfo))
00154     return FALSE;
00155
00156   // The main window has been initialized, so show and update it.
00157   pMainFrame->ShowWindow(m_nCmdShow);
00158   pMainFrame->UpdateWindow();
00159
00160   return TRUE;
00161 }
00162
00163 /////////////////////////////////////////////////////////////////////////////
00164 // CAboutDlg dialog used for App About
00165
00166 class CAboutDlg : public CDialog
00167 {
00168 public:
00169   CAboutDlg();
00170
00171 // Dialog Data
00172   //{{AFX_DATA(CAboutDlg)
00173   enum { IDD = IDD_ABOUTBOX };
00174   //}}AFX_DATA
00175
00176   // ClassWizard generated virtual function overrides
00177   //{{AFX_VIRTUAL(CAboutDlg)
00178   protected:
00179   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00180   //}}AFX_VIRTUAL
00181
00182 // Implementation
00183 protected:
00184   //{{AFX_MSG(CAboutDlg)
00185     // No message handlers
00186   //}}AFX_MSG
00187   DECLARE_MESSAGE_MAP()
00188 };
00189
00190 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00191 {
00192   //{{AFX_DATA_INIT(CAboutDlg)
00193   //}}AFX_DATA_INIT
00194 }
00195
00196 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00197 {
00198   CDialog::DoDataExchange(pDX);
00199   //{{AFX_DATA_MAP(CAboutDlg)
00200   //}}AFX_DATA_MAP
00201 }
00202
00203 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00204   //{{AFX_MSG_MAP(CAboutDlg)
00205     // No message handlers
00206   //}}AFX_MSG_MAP
00207 END_MESSAGE_MAP()
00208
00209 // App command to run the dialog
00210 void CAutoClickApp::OnAppAbout()
00211 {
00212   CAboutDlg aboutDlg;
00213   aboutDlg.DoModal();
00214 }
00215
00216 /////////////////////////////////////////////////////////////////////////////
00217 // CAutoClickApp commands
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSnapApp Member List

This is the complete list of members for CSnapApp, including all inherited members.
CSnapApp() | CSnapApp |
InitInstance() | CSnapApp | [virtual]
OnAppAbout() | CSnapApp |
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynamicMenuApp Member List

This is the complete list of members for CDynamicMenuApp, including all inherited members.
CDynamicMenuApp() | CDynamicMenuApp |
ExitInstance() | CDynamicMenuApp | [virtual]
InitInstance() | CDynamicMenuApp | [virtual]
OnAppAbout() | CDynamicMenuApp |
PreLoadState() | CDynamicMenuApp | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/StdAfx.cpp Source File

  • vc2008fp
  • CustomPages

StdAfx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  CustomPages.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005
00006 #include "stdafx.h"
00007
00008
00009
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/palette.cpp Source File

  • general
  • ctrlbars

palette.cpp

Go to the documentation of this file.
00001 // palette.cpp : implementation of the Floating tool palette class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrlbars.h"
00014
00015 #include "palette.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CPaletteBar
00024
00025 BEGIN_MESSAGE_MAP(CPaletteBar, CToolBar)
00026   //{{AFX_MSG_MAP(CPaletteBar)
00027   //}}AFX_MSG_MAP
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CPaletteBar construction/destruction
00032
00033 CPaletteBar::CPaletteBar()
00034 {
00035   m_nColumns = 2;
00036   m_cxLeftBorder = 5;
00037   m_cyTopBorder = 5;
00038   m_cxRightBorder = 5;
00039   m_cyBottomBorder = 5;
00040 }
00041
00042 CPaletteBar::~CPaletteBar()
00043 {
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CPaletteBar diagnostics
00048
00049 #ifdef _DEBUG
00050 void CPaletteBar::AssertValid() const
00051 {
00052   CToolBar::AssertValid();
00053 }
00054
00055 void CPaletteBar::Dump(CDumpContext& dc) const
00056 {
00057   CToolBar::Dump(dc);
00058 }
00059
00060 #endif //_DEBUG
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CPaletteBar message handlers
00064
00065 void CPaletteBar::SetColumns(UINT nColumns)
00066 {
00067   m_nColumns = nColumns;
00068   int nCount = GetToolBarCtrl().GetButtonCount();
00069
00070   for (int i = 0; i < nCount; i++)
00071   {
00072     UINT nStyle = GetButtonStyle(i);
00073     BOOL bWrap = (((i + 1) % nColumns) == 0);
00074     if (bWrap)
00075       nStyle |= TBBS_WRAPPED;
00076     else
00077       nStyle &= ~TBBS_WRAPPED;
00078     SetButtonStyle(i, nStyle);
00079   }
00080
00081   Invalidate();
00082   GetParentFrame()->RecalcLayout();
00083 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMVisualManager Member List

This is the complete list of members for CMSMVisualManager, including all inherited members.
CMSMVisualManager() | CMSMVisualManager |
GetMSMCaptionButtonsSize() const | CMSMVisualManager | [inline]
GetToolbarButtonTextColor(CMFCToolBarButton *pButton, CMFCVisualManager::AFX_BUTTON_STATE state) | CMSMVisualManager | [protected, virtual]
LoadMSMCaptionButtonsIcons(LPCTSTR lpszID) | CMSMVisualManager |
m_brLinksBarBack | CMSMVisualManager | [private]
m_brLinksBarButtonHighlighted | CMSMVisualManager | [private]
m_brMenuBarButtonHighlighted | CMSMVisualManager | [private]
m_CaptionButtonIconst | CMSMVisualManager | [private]
m_CaptionButtonSize | CMSMVisualManager | [private]
m_clrCategorieBarButtonBorder | CMSMVisualManager | [private]
m_clrCategorieBarButtonBorderM | CMSMVisualManager | [private]
m_clrCategorieBarButtonF | CMSMVisualManager | [private]
m_clrCategorieBarButtonL | CMSMVisualManager | [private]
m_clrCategorieBarButtonLine | CMSMVisualManager | [private]
m_clrCategorieBarButtonTextHighlighted | CMSMVisualManager | [private]
m_clrCategorieBarButtonTextPressed | CMSMVisualManager | [private]
m_clrCategorieBarButtonTextRegular | CMSMVisualManager | [private]
m_clrComboBoxBorder | CMSMVisualManager | [private]
m_clrComboBoxBtnHighlightedBorder | CMSMVisualManager | [private]
m_clrComboBoxBtnHighlightedF | CMSMVisualManager | [private]
m_clrComboBoxBtnHighlightedL | CMSMVisualManager | [private]
m_clrComboBoxBtnPressedBorder | CMSMVisualManager | [private]
m_clrComboBoxBtnPressedF | CMSMVisualManager | [private]
m_clrComboBoxBtnPressedL | CMSMVisualManager | [private]
m_clrComboBoxBtnRegularBorder | CMSMVisualManager | [private]
m_clrComboBoxBtnRegularF | CMSMVisualManager | [private]
m_clrComboBoxBtnRegularL | CMSMVisualManager | [private]
m_clrLinksBarButtonBorderHighlighted | CMSMVisualManager | [private]
m_clrMenuBarButtonBorderHighlighted | CMSMVisualManager | [private]
m_clrMenuBarButtonTextHighlighted | CMSMVisualManager | [private]
m_clrMenuBarButtonTextPressed | CMSMVisualManager | [private]
m_clrMenuBarButtonTextRegular | CMSMVisualManager | [private]
m_clrToolBarButtonTextHighlighted | CMSMVisualManager | [private]
m_clrToolBarButtonTextPressed | CMSMVisualManager | [private]
m_clrToolBarButtonTextRegular | CMSMVisualManager | [private]
m_clrToolBarSeparatorF | CMSMVisualManager | [private]
m_clrToolBarSeparatorM | CMSMVisualManager | [private]
m_clrToolBarSeparatorS | CMSMVisualManager | [private]
m_MemoryBitmap | CMSMVisualManager | [private]
m_MemoryDC | CMSMVisualManager | [private]
m_MemoryFilled | CMSMVisualManager | [private]
m_MemorySize | CMSMVisualManager | [private]
m_MSMFrameBitmap | CMSMVisualManager | [private]
m_MSMViewBitmap | CMSMVisualManager | [private]
MSMDrawCaptionButton(CDC *pDC, CRect rect, AFX_BUTTON_STATE state, UINT id) | CMSMVisualManager | [virtual]
OnDrawButtonBorder(CDC *pDC, CMFCToolBarButton *pButton, CRect rect, AFX_BUTTON_STATE state) | CMSMVisualManager | [protected, virtual]
OnDrawComboBorder(CDC *pDC, CRect rect, BOOL bDisabled, BOOL bIsDropped, BOOL bIsHighlighted, CMFCToolBarComboBoxButton *pButton) | CMSMVisualManager | [protected, virtual]
OnDrawComboDropButton(CDC *pDC, CRect rect, BOOL bDisabled, BOOL bIsDropped, BOOL bIsHighlighted, CMFCToolBarComboBoxButton *pButton) | CMSMVisualManager | [protected, virtual]
OnDrawMenuBorder(CDC *pDC, CMFCPopupMenu *pMenu, CRect rect) | CMSMVisualManager | [protected, virtual]
OnDrawSeparator(CDC *pDC, CBasePane *pBar, CRect rect, BOOL bHorz) | CMSMVisualManager | [protected, virtual]
OnDrawTask(CDC *pDC, CMFCTasksPaneTask *pTask, CImageList *pIcons, BOOL bIsHighlighted=FALSE, BOOL bIsSelected=FALSE) | CMSMVisualManager | [protected, virtual]
OnDrawTasksGroupAreaBorder(CDC *, CRect, BOOL=FALSE, BOOL=FALSE) | CMSMVisualManager | [inline, protected, virtual]
OnFillBarBackground(CDC *pDC, CBasePane *pBar, CRect rectClient, CRect rectClip, BOOL bNCArea=FALSE) | CMSMVisualManager | [protected, virtual]
OnFillHighlightedArea(CDC *pDC, CRect rect, CBrush *pBrush, CMFCToolBarButton *pButton) | CMSMVisualManager | [protected, virtual]
OnFillTasksGroupInterior(CDC *, CRect, BOOL=FALSE) | CMSMVisualManager | [inline, protected, virtual]
OnFillTasksPaneBackground(CDC *pDC, CRect rectWorkArea) | CMSMVisualManager | [protected, virtual]
OnHighlightMenuItem(CDC *pDC, CMFCToolBarMenuButton *pButton, CRect rect, COLORREF &clrText) | CMSMVisualManager | [protected, virtual]
OnUpdateSystemColors() | CMSMVisualManager | [protected, virtual]
SetupMemoryBitmapSize(CDC *pDC, const CSize &size) | CMSMVisualManager |
~CMSMVisualManager() | CMSMVisualManager | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localize.odl Source File

  • controls
  • localize

localize.odl

Go to the documentation of this file.
00001 // localize.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (localize.tlb) that will become a resource in
00005 // localize.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(879D6FE3-5470-101B-B57B-00608CC96AFA), version(1.0),
00019   helpstring("Localize OLE Custom Control module"), control ]
00020 library LocalizeLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CLocalizeCtrl
00026
00027   [ uuid(035E3E52-6745-101B-B57B-00608CC96AFA),
00028     helpstring("Dispatch interface for Localize Control"), hidden ]
00029   dispinterface _DLocalize
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CLocalizeCtrl)
00035       [id(1)] boolean Invert;
00036       [id(DISPID_CAPTION), bindable, requestedit] BSTR Caption;
00037       //}}AFX_ODL_PROP
00038
00039     methods:
00040       // NOTE - ClassWizard will maintain method information here.
00041       //    Use extreme caution when editing this section.
00042       //{{AFX_ODL_METHOD(CLocalizeCtrl)
00043       //}}AFX_ODL_METHOD
00044
00045       [id(DISPID_ABOUTBOX)] void AboutBox();
00046   };
00047
00048   //  Event dispatch interface for CLocalizeCtrl
00049
00050   [ uuid(035E3E53-6745-101B-B57B-00608CC96AFA),
00051     helpstring("Event interface for Localize Control") ]
00052   dispinterface _DLocalizeEvents
00053   {
00054     properties:
00055       //  Event interface has no properties
00056
00057     methods:
00058       // NOTE - ClassWizard will maintain event information here.
00059       //    Use extreme caution when editing this section.
00060       //{{AFX_ODL_EVENT(CLocalizeCtrl)
00061       [id(DISPID_CLICK)] void Click();
00062       //}}AFX_ODL_EVENT
00063   };
00064
00065   //  Class information for CLocalizeCtrl
00066
00067   [ uuid(879D6FE0-5470-101B-B57B-00608CC96AFA),
00068     helpstring("Localize Control"), control ]
00069   coclass Localize
00070   {
00071     [default] dispinterface _DLocalize;
00072     [default, source] dispinterface _DLocalizeEvents;
00073   };
00074
00075
00076   //{{AFX_APPEND_ODL}}
00077 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCmnCtrl3Dlg Member List

This is the complete list of members for CCmnCtrl3Dlg, including all inherited members.
CCmnCtrl3Dlg(CWnd *pParent=NULL) | CCmnCtrl3Dlg |
DoDataExchange(CDataExchange *pDX) | CCmnCtrl3Dlg | [protected, virtual]
IDD enum value | CCmnCtrl3Dlg |
m_hIcon | CCmnCtrl3Dlg | [protected]
OnInitDialog() | CCmnCtrl3Dlg | [protected, virtual]
OnPaint() | CCmnCtrl3Dlg | [protected]
OnQueryDragIcon() | CCmnCtrl3Dlg | [protected]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/splitter.cpp Source File

  • general
  • viewex

splitter.cpp

Go to the documentation of this file.
00001 // splitter.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "viewex.h"
00014 #include "splitter.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSplitterFrame
00023
00024 // Create a splitter window which splits an output text view and an input view
00025 //                           |
00026 //    TEXT VIEW (CTextView)  | INPUT VIEW (CInputView)
00027 //                           |
00028
00029 IMPLEMENT_DYNCREATE(CSplitterFrame, CMDIChildWnd)
00030
00031 CSplitterFrame::CSplitterFrame()
00032 {
00033 }
00034
00035 CSplitterFrame::~CSplitterFrame()
00036 {
00037 }
00038
00039
00040 BOOL CSplitterFrame::OnCreateClient(LPCREATESTRUCT,
00041    CCreateContext* pContext)
00042 {
00043   // create a splitter with 1 row, 2 columns
00044   if (!m_wndSplitter.CreateStatic(this, 1, 2))
00045   {
00046     TRACE0("Failed to CreateStaticSplitter\n");
00047     return FALSE;
00048   }
00049
00050   // add the first splitter pane - the default view in column 0
00051   if (!m_wndSplitter.CreateView(0, 0,
00052     pContext->m_pNewViewClass, CSize(130, 50), pContext))
00053   {
00054     TRACE0("Failed to create first pane\n");
00055     return FALSE;
00056   }
00057
00058   // add the second splitter pane - an input view in column 1
00059   if (!m_wndSplitter.CreateView(0, 1,
00060     RUNTIME_CLASS(CInputView), CSize(0, 0), pContext))
00061   {
00062     TRACE0("Failed to create second pane\n");
00063     return FALSE;
00064   }
00065
00066   // activate the input view
00067   SetActiveView((CView*)m_wndSplitter.GetPane(0,1));
00068
00069   return TRUE;
00070 }
00071
00072 BEGIN_MESSAGE_MAP(CSplitterFrame, CMDIChildWnd)
00073   //{{AFX_MSG_MAP(CSplitterFrame)
00074   //}}AFX_MSG_MAP
00075 END_MESSAGE_MAP()
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // C3WaySplitterFrame - just like CSplitterFrame except the input view is
00079 //   the first pane, and there are two output views
00080
00081 //                             |  Text View (CTextView)
00082 //    INPUT VIEW (CInputView)  |------------------------
00083 //                             |  Color View (CColorView)
00084
00085 IMPLEMENT_DYNCREATE(C3WaySplitterFrame, CMDIChildWnd)
00086
00087 C3WaySplitterFrame::C3WaySplitterFrame()
00088 {
00089 }
00090
00091 C3WaySplitterFrame::~C3WaySplitterFrame()
00092 {
00093 }
00094
00095
00096 BOOL C3WaySplitterFrame::OnCreateClient(LPCREATESTRUCT lpcs,
00097    CCreateContext* pContext)
00098 {
00099   // create a splitter with 1 row, 2 columns
00100   if (!m_wndSplitter.CreateStatic(this, 1, 2))
00101   {
00102     TRACE0("Failed to CreateStaticSplitter\n");
00103     return FALSE;
00104   }
00105
00106   // add the first splitter pane - the default view in column 0
00107   if (!m_wndSplitter.CreateView(0, 0,
00108     pContext->m_pNewViewClass, CSize(200, 50), pContext))
00109   {
00110     TRACE0("Failed to create first pane\n");
00111     return FALSE;
00112   }
00113
00114   // add the second splitter pane - which is a nested splitter with 2 rows
00115   if (!m_wndSplitter2.CreateStatic(
00116     &m_wndSplitter,     // our parent window is the first splitter
00117     2, 1,               // the new splitter is 2 rows, 1 column
00118     WS_CHILD | WS_VISIBLE | WS_BORDER,  // style, WS_BORDER is needed
00119     m_wndSplitter.IdFromRowCol(0, 1)
00120       // new splitter is in the first row, 2nd column of first splitter
00121      ))
00122   {
00123     TRACE0("Failed to create nested splitter\n");
00124     return FALSE;
00125   }
00126
00127   // now create the two views inside the nested splitter
00128   int cyText = max(lpcs->cy - 70, 20);    // height of text pane
00129
00130   if (!m_wndSplitter2.CreateView(0, 0,
00131     RUNTIME_CLASS(CTextView), CSize(0, cyText), pContext))
00132   {
00133     TRACE0("Failed to create second pane\n");
00134     return FALSE;
00135   }
00136   if (!m_wndSplitter2.CreateView(1, 0,
00137     RUNTIME_CLASS(CColorView), CSize(0, 0), pContext))
00138   {
00139     TRACE0("Failed to create third pane\n");
00140     return FALSE;
00141   }
00142
00143   // it all worked, we now have two splitter windows which contain
00144   //  three different views
00145   return TRUE;
00146 }
00147
00148 BEGIN_MESSAGE_MAP(C3WaySplitterFrame, CMDIChildWnd)
00149   //{{AFX_MSG_MAP(C3WaySplitterFrame)
00150   //}}AFX_MSG_MAP
00151 END_MESSAGE_MAP()
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 //
00155
00156 IMPLEMENT_DYNAMIC(CViewExSplitWnd, CSplitterWnd)
00157
00158 CViewExSplitWnd::CViewExSplitWnd()
00159 {
00160 }
00161
00162 CViewExSplitWnd::~CViewExSplitWnd()
00163 {
00164 }
00165
00166 CWnd* CViewExSplitWnd::GetActivePane(int* /*pRow*/, int* /*pCol*/)
00167 {
00168   ASSERT_VALID(this);
00169
00170   // attempt to use active view of frame window
00171   CWnd* pView = NULL;
00172   CFrameWnd* pFrameWnd = GetParentFrame();
00173   ASSERT_VALID(pFrameWnd);
00174   pView = pFrameWnd->GetActiveView();
00175
00176   // failing that, use the current focus
00177   if (pView == NULL)
00178     pView = GetFocus();
00179
00180   return pView;
00181 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/CalendarBar.cpp Source File

  • vc2008fp
  • OutlookDemo

CalendarBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "CalendarBar.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 const int nBorderSize = 10;
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CCalendarBar
00024
00025 CCalendarBar::CCalendarBar()
00026 {
00027   m_nMyCalendarsY = 0;
00028 }
00029
00030 CCalendarBar::~CCalendarBar()
00031 {
00032 }
00033
00034 BEGIN_MESSAGE_MAP(CCalendarBar, CWnd)
00035   ON_WM_CREATE()
00036   ON_WM_ERASEBKGND()
00037   ON_WM_SIZE()
00038   ON_WM_PAINT()
00039   ON_WM_SETTINGCHANGE()
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CCalendarBar message handlers
00044
00045 int CCalendarBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00046 {
00047   if (CWnd::OnCreate(lpCreateStruct) == -1)
00048     return -1;
00049
00050   CRect rectDummy(0, 0, 0, 0);
00051   m_wndCalendar.Create(WS_CHILD | WS_VISIBLE, rectDummy, this, 1);
00052
00053   CBitmap bmp;
00054   bmp.LoadBitmap(IDB_PAGES_SMALL_HC);
00055
00056   m_Images.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 0);
00057   m_Images.Add(&bmp, RGB(255, 0, 255));
00058
00059   return 0;
00060 }
00061
00062 BOOL CCalendarBar::OnEraseBkgnd(CDC* /*pDC*/)
00063 {
00064   return TRUE;
00065 }
00066
00067 void CCalendarBar::OnSize(UINT nType, int cx, int cy)
00068 {
00069   CWnd::OnSize(nType, cx, cy);
00070
00071   int nMyCalendarsHeight = 70;
00072
00073   if (m_wndCalendar.GetSafeHwnd() != NULL)
00074   {
00075     m_wndCalendar.SetWindowPos(NULL, nBorderSize, nBorderSize, cx - 2 * nBorderSize, cy - 2 * nBorderSize - nMyCalendarsHeight - 10, SWP_NOZORDER | SWP_NOACTIVATE);
00076   }
00077
00078   m_nMyCalendarsY = cy - nMyCalendarsHeight;
00079 }
00080
00081 BOOL CCalendarBar::Create(const RECT& rect, CWnd* pParentWnd, UINT nID)
00082 {
00083   return CWnd::Create(NULL, _T(""), WS_CHILD | WS_VISIBLE, rect, pParentWnd, nID);
00084 }
00085
00086 void CCalendarBar::OnPaint()
00087 {
00088   CPaintDC dc(this); // device context for painting
00089
00090   CRect rectClient;
00091   GetClientRect(rectClient);
00092
00093   dc.FillRect(rectClient, &afxGlobalData.brWindow);
00094
00095   if (rectClient.bottom - m_nMyCalendarsY > 0)
00096   {
00097     CRect rectMyCalendarsCaption = rectClient;
00098     rectMyCalendarsCaption.top = m_nMyCalendarsY;
00099     rectMyCalendarsCaption.bottom = rectMyCalendarsCaption.top + afxGlobalData.GetTextHeight(TRUE) * 3 / 2;
00100
00101     COLORREF clrText = CMFCVisualManager::GetInstance()->OnDrawPaneCaption(&dc, NULL, FALSE, rectMyCalendarsCaption, CRect(0, 0, 0, 0));
00102
00103     CPen* pOldPen = dc.SelectObject(&afxGlobalData.penBarShadow);
00104
00105     dc.MoveTo(rectMyCalendarsCaption.left - 1, rectMyCalendarsCaption.top);
00106     dc.LineTo(rectMyCalendarsCaption.right, rectMyCalendarsCaption.top);
00107
00108     dc.SelectStockObject(BLACK_PEN);
00109
00110     dc.MoveTo(rectMyCalendarsCaption.left - 1, rectMyCalendarsCaption.bottom);
00111     dc.LineTo(rectMyCalendarsCaption.right, rectMyCalendarsCaption.bottom);
00112
00113     dc.SelectObject(pOldPen);
00114
00115     CRect rectText = rectMyCalendarsCaption;
00116     rectText.DeflateRect(10, 0);
00117
00118     dc.SetBkMode(TRANSPARENT);
00119     dc.SetTextColor(clrText);
00120
00121     CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);
00122
00123     CString str = _T("My Calendars");
00124     dc.DrawText(str, rectText, DT_VCENTER | DT_LEFT | DT_SINGLELINE);
00125
00126     CRect rectCalendar = rectClient;
00127     rectCalendar.top = rectMyCalendarsCaption.bottom + 5;
00128     rectCalendar.bottom = rectCalendar.top + afxGlobalData.GetTextHeight(TRUE) * 3 / 2 - 5;
00129
00130     dc.FillSolidRect(rectCalendar, RGB(255, 255, 213));
00131
00132     rectCalendar.DeflateRect(20, 0);
00133     m_Images.Draw(&dc, 3, rectCalendar.TopLeft(), 0);
00134
00135     rectCalendar.left += 20;
00136
00137     str = _T("Calendar");
00138
00139     dc.SetTextColor(afxGlobalData.clrHotLinkNormalText);
00140     dc.DrawText(str, rectCalendar, DT_VCENTER | DT_LEFT | DT_SINGLELINE);
00141
00142     dc.SelectObject(pOldFont);
00143   }
00144 }
00145
00146
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStatusBarDemoDoc Member List

This is the complete list of members for CStatusBarDemoDoc, including all inherited members.
CStatusBarDemoDoc() | CStatusBarDemoDoc | [protected]
OnNewDocument() | CStatusBarDemoDoc | [virtual]
Serialize(CArchive &ar) | CStatusBarDemoDoc | [virtual]
~CStatusBarDemoDoc() | CStatusBarDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSelectTool Member List

This is the complete list of members for CSelectTool, including all inherited members.
c_down | CDrawTool | [static]
c_drawShape | CDrawTool | [static]
c_last | CDrawTool | [static]
c_nDownFlags | CDrawTool | [static]
c_tools | CDrawTool | [static]
CDrawTool(DrawShape nDrawShape) | CDrawTool |
CDrawTool(DrawShape nDrawShape) | CDrawTool |
CSelectTool() | CSelectTool |
CSelectTool() | CSelectTool |
FindTool(DrawShape drawShape) | CDrawTool | [static]
FindTool(DrawShape drawShape) | CDrawTool | [static]
m_drawShape | CDrawTool |
OnCancel() | CDrawTool | [virtual]
OnCancel() | CDrawTool | [virtual]
OnEditProperties(CDrawView *pView) | CSelectTool | [virtual]
OnEditProperties(CDrawView *pView) | CSelectTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CSelectTool | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Surface.h Source File

  • general
  • MMXSwarm

Surface.h

Go to the documentation of this file.
00001 // Surface.h : Defines the interface of a DIB surface for swarm
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013
00014 #include <AtlImage.h>
00015
00016 template<class T> T ABS(T x) { return(x < 0 ? -x : x); }
00017
00018 class CSurface
00019 {
00020 public:
00021   CSurface() :
00022     m_pSrcWnd(NULL), m_hDestDC(NULL),
00023     m_wndHeight(0), m_wndWidth(0), m_nBitDepth(0), m_nByteDepth(0)
00024   { }
00025
00026   virtual ~CSurface()
00027   { Destroy(); }
00028
00029   void Create(CWnd *pWnd, int nBitDepth); // this is stored internally
00030   void Destroy();
00031
00032   void Import(const CImage &image);
00033
00034     void ClearBits();
00035     void StripeBits();
00036     void RandomBits();
00037     void ShiftBits();
00038     void BlitBits();
00039     virtual void BlurBits(); // this is where the MMX action is
00040
00041     void Line(const CPoint &p1, const CPoint &p2, COLORREF c);
00042     void RandomLine(COLORREF c);
00043
00044   // These methods compensate for m_kDelta
00045     void PointColor(int x, int y, COLORREF c);
00046     COLORREF PointColor(int x, int y) const;
00047   BYTE *GetPixelAddress(int x, int y) const
00048   { return((BYTE*)m_image.GetPixelAddress(x, y+m_kDeltaY)); }
00049
00050   bool IsNull() const
00051   { return(m_image.IsNull()); }
00052   int GetVisibleWidth() const
00053   { return(m_wndWidth); }
00054   int GetVisibleHeight() const
00055   { return(m_wndHeight); }
00056   int GetPitch() const
00057   { return(m_image.GetPitch()); }
00058   int GetBitDepth() const
00059   { return(m_nBitDepth); }
00060   int GetByteDepth() const
00061   { return(m_nByteDepth); }
00062
00063   CImage *GetImage()
00064   { return(&m_image); }
00065
00066 // Implementation
00067 protected:
00068   virtual void AdjustWidth(int * /*pWidth */) {}
00069   virtual void OnCreated() {}
00070
00071   static const int m_kDeltaX = 1;
00072   static const int m_kDeltaY = 1;
00073 private:
00074   CWnd *m_pSrcWnd;
00075     HDC m_hDestDC;
00076   CImage m_image;
00077   int m_nByteDepth;
00078   int m_nBitDepth;
00079   int m_wndWidth;
00080   int m_wndHeight;
00081 };
00082
00083 inline void CSurface::PointColor(int x, int y, COLORREF c)
00084 {
00085   // m_image.SetPixel() call ::SetPixel() which is too slow
00086   // since it has to work with all DCs.
00087
00088   BYTE *p = (BYTE*)m_image.GetPixelAddress(x, y+m_kDeltaY);
00089   if (m_nBitDepth == 16) {
00090     *(WORD *)p = (WORD)(((c&0xf80000) >> 19) | ((c&0xf800) >> 6) | ((c&0xf8) << 7));
00091   }
00092   else {
00093       *p++ = GetBValue(c);
00094       *p++ = GetGValue(c);
00095       *p = GetRValue(c);
00096   }
00097 }
00098
00099 // Somewhat poor form - for performance reasons these
00100 // come back with R and B exchanged.
00101 inline COLORREF CSurface::PointColor(int x, int y) const
00102 {
00103   // m_image.GetPixel() calls ::GetPixel() which is too slow
00104   // since it has to work for all types of DCs.
00105   if (m_nBitDepth == 16) {
00106       COLORREF c = (COLORREF)*(WORD*)m_image.GetPixelAddress(x, y+m_kDeltaY);
00107       return((c&0x7c00) << 9 | (c&0x3e0) << 6 | (c&0x1f) << 3);
00108   }
00109   else {
00110     return(*(COLORREF*)(m_image.GetPixelAddress(x, y+m_kDeltaY)));
00111   }
00112 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewers.cpp Source File

  • ole
  • oleview
  • iviewers

iviewers.cpp

Go to the documentation of this file.
00001 // iviewers.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and Microsoft
00008 // QuickHelp and/or WinHelp documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "iviewers.h"
00014
00015 #include "typelib.h"
00016 #include "iview.h"
00017 #include "util.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CIViewersApp:
00026 // See iviewers.cpp for the implementation of this class
00027 //
00028
00029 class CIViewersApp : public CWinApp
00030 {
00031 public:
00032   CIViewersApp();
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CIViewersApp)
00037   public:
00038   virtual BOOL InitInstance();
00039   virtual int ExitInstance();
00040   //}}AFX_VIRTUAL
00041
00042   //{{AFX_MSG(CIViewersApp)
00043   afx_msg void OnAppAbout();
00044     // NOTE - the ClassWizard will add and remove member functions here.
00045     //    DO NOT EDIT what you see in these blocks of generated code !
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CIViewersApp
00053
00054 BEGIN_MESSAGE_MAP(CIViewersApp, CWinApp)
00055   //{{AFX_MSG_MAP(CIViewersApp)
00056     // NOTE - the ClassWizard will add and remove mapping macros here.
00057     //    DO NOT EDIT what you see in these blocks of generated code!
00058   //}}AFX_MSG_MAP
00059 END_MESSAGE_MAP()
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CIViewersApp construction
00063
00064 CIViewersApp::CIViewersApp()
00065 {
00066   // TODO: add construction code here,
00067   // Place all significant initialization in InitInstance
00068 }
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // The one and only CIViewersApp object
00072
00073 CIViewersApp NEAR theApp;
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CIViewersApp initialization
00077
00078 BOOL CIViewersApp::InitInstance()
00079 {
00080   SetRegistryKey( IDS_REGISTRYKEY );
00081 #if (!defined(_USRDLL) && !defined(_AFXDLL))
00082 //  COleObjectFactory::UpdateRegistryAll();
00083
00084   // Initialize OLE libraries
00085   if (!AfxOleInit())
00086   {
00087     AfxMessageBox(IDP_OLE_INIT_FAILED);
00088     return FALSE;
00089   }
00090
00091   m_pMainWnd = (CFrameWnd*)new CTypeLibWnd ;
00092   ASSERT(m_pMainWnd) ;
00093
00094   if (m_lpCmdLine && *m_lpCmdLine)
00095   {
00096     HRESULT hr = LoadTypeLib( m_lpCmdLine, &((CTypeLibWnd*)m_pMainWnd)->m_ptlb ) ;
00097     if (FAILED(hr))
00098     {
00099       CString str ;
00100       str.Format( _T("LoadTypeLib(%s) failed"), m_lpCmdLine ) ;
00101       ErrorMessage( str, hr ) ;
00102       return FALSE ;
00103     }
00104   }
00105   else
00106   {
00107     static TCHAR szFilter[] = _T("TypeLib Files (*.tlb;*.olb;*.dll;*.ocx;*.exe)|*.tlb;*.olb;*.dll;*.ocx;*.exe|AllFiles(*.*)|*.*|") ;
00108
00109     CFileDialog dlg( TRUE, _T("*.tlb"), NULL,
00110             OFN_FILEMUSTEXIST | OFN_HIDEREADONLY |
00111             OFN_PATHMUSTEXIST
00112             , szFilter, NULL )  ;
00113
00114     if (IDOK != dlg.DoModal())
00115       return FALSE ;
00116
00117     HRESULT hr = LoadTypeLib( dlg.GetPathName(), &((CTypeLibWnd*)m_pMainWnd)->m_ptlb ) ;
00118     if (FAILED(hr))
00119     {
00120       CString str ;
00121       str.Format( _T("LoadTypeLib(%s) failed"), dlg.GetPathName() ) ;
00122       ErrorMessage( str, hr ) ;
00123       return FALSE ;
00124     }
00125
00126   }
00127
00128   if (((CTypeLibWnd*)m_pMainWnd)->LoadFrame(IDR_TYPELIBWND, WS_OVERLAPPEDWINDOW, NULL, NULL) == FALSE)
00129   {
00130     TRACE(_T("LoadFrame failed\n") );
00131     if (((CTypeLibWnd*)m_pMainWnd)->m_ptlb)
00132       ((CTypeLibWnd*)m_pMainWnd)->m_ptlb->Release() ;
00133     return FALSE ;
00134   }
00135   ASSERT(m_pMainWnd) ;
00136
00137   ((CTypeLibWnd*)m_pMainWnd)->RestorePosition() ;
00138   ((CTypeLibWnd*)m_pMainWnd)->UpdateWindow() ;
00139
00140 #endif
00141
00142   // Register all OLE server (factories) as running.  This enables the
00143   //  OLE libraries to create objects from other applications.
00144   COleObjectFactory::RegisterAll();
00145
00146   return TRUE;
00147 }
00148
00149 int CIViewersApp::ExitInstance()
00150 {
00151   return CWinApp::ExitInstance();
00152 }
00153
00154 /////////////////////////////////////////////////////////////////////////////
00155 // Special entry points required for iviewers servers
00156
00157 #if (defined(_USRDLL) || defined(_AFXDLL))
00158 extern "C"{
00159 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
00160 {
00161   return AfxDllGetClassObject(rclsid, riid, ppv);
00162 }
00163
00164 STDAPI DllCanUnloadNow(void)
00165 {
00166   return AfxDllCanUnloadNow();
00167 }
00168
00169 // by exporting DllRegisterServer, you can use regsvr.exe
00170 STDAPI DllRegisterServer(void)
00171 {
00172   HRESULT hr ;
00173   COleObjectFactory::UpdateRegistryAll();
00174   hr = DllRegisterInterfaceViewer( CLSID_ITypeLibViewer, IID_ITypeLib );
00175   if (FAILED(hr))
00176     return hr ;
00177   hr = DllRegisterInterfaceViewer( CLSID_IDispatchViewer, IID_IDispatch );
00178   if (FAILED(hr))
00179     return hr ;
00180   return DllRegisterInterfaceViewer( CLSID_IDataObjectViewer, IID_IDataObject );
00181 }
00182 #endif //_USRDLL
00183
00184 STDAPI DllRegisterInterfaceViewer( REFCLSID rclsid, REFIID riid )
00185 {
00186   HRESULT hr = S_OK ;
00187   HKEY hk = NULL ;
00188
00189   LPOLESTR lpszOleIID = NULL;
00190   LPOLESTR lpszOleCLSID = NULL;
00191   IMalloc* pmal = NULL ;
00192
00193   if (FAILED(hr = ::CoGetMalloc(MEMCTX_TASK, &pmal)))
00194     return hr;
00195   ASSERT(pmal != NULL);
00196
00197   TRY
00198   {
00199     LONG cb ;
00200     TCHAR szKey[1024];
00201     TCHAR szValue[1024];
00202
00203     // \Interface\{iid} exists?
00204     if (FAILED(hr = StringFromCLSID(riid, &lpszOleIID)))
00205       AfxThrowMemoryException() ;
00206
00207     COLE2T lpszIID(lpszOleIID);
00208     _stprintf_s( szKey, 1024, _T("Interface\\%s"), lpszIID );
00209     cb = sizeof(szValue);
00210     if ((hr = ::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szValue, &cb)) != ERROR_SUCCESS)
00211       AfxThrowMemoryException() ;
00212
00213     // Create \Interface\{iid}\Ole2ViewIViewerCLSID
00214     _stprintf_s( szKey, 1024, _T("Interface\\%s\\Ole2ViewIViewerCLSID"), lpszIID);
00215     if ((hr = ::RegCreateKey(HKEY_CLASSES_ROOT, szKey, &hk)) != ERROR_SUCCESS)
00216       AfxThrowMemoryException() ;
00217
00218     // Set = {clsid}
00219     if (FAILED(hr = ::StringFromCLSID(rclsid, &lpszOleCLSID)))
00220       AfxThrowMemoryException() ;
00221
00222     COLE2T lpszCLSID(lpszOleCLSID);
00223     ENSURE (lpszCLSID);
00224     cb = lstrlen(lpszCLSID);
00225     if ((hr = ::RegSetValue(hk, NULL, REG_SZ, lpszCLSID, cb)) != ERROR_SUCCESS)
00226       AfxThrowMemoryException() ;
00227   }
00228   CATCH(CException, pException)
00229   {
00230   }
00231   END_CATCH
00232
00233   if (hk)
00234     RegCloseKey( hk ) ;
00235
00236   if (lpszOleIID && pmal)
00237     pmal->Free(lpszOleIID) ;
00238
00239   if (lpszOleCLSID && pmal)
00240     pmal->Free(lpszOleCLSID) ;
00241
00242   if (pmal)
00243     pmal->Release() ;
00244
00245   return hr ;
00246 }
00247
00248 }; // extern "C"
00249
00250 /////////////////////////////////////////////////////////////////////////////
00251 // CIViewersApp commands
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CUnit Member List

This is the complete list of members for CUnit, including all inherited members.
CUnit() | CUnit | [inline]
CUnit(int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv, int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev) | CUnit |
CUnit() | CUnit | [inline]
CUnit(int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv, int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev) | CUnit |
m_bSpaceAbbrev | CUnit |
m_nAbbrevID | CUnit |
m_nLargeDiv | CUnit |
m_nMediumDiv | CUnit |
m_nMinMove | CUnit |
m_nSmallDiv | CUnit |
m_nTPU | CUnit |
m_strAbbrev | CUnit |
operator=(const CUnit &unit) | CUnit |
operator=(const CUnit &unit) | CUnit |
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FileViewBar.h Source File

  • vc2008fp
  • VisualStudioDemo

FileViewBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "ClassTreeWnd.h"
00013
00014 class CFileViewToolBar : public CMFCToolBar
00015 {
00016   virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
00017   {
00018     CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
00019   }
00020
00021   virtual BOOL AllowShowOnList() const { return FALSE; }
00022 };
00023
00024 class CFileViewBar : public CDockablePane
00025 {
00026 // Construction
00027 public:
00028   CFileViewBar();
00029
00030   void AdjustLayout();
00031   void OnChangeVisualStyle();
00032
00033 // Attributes
00034 protected:
00035
00036   CClassTreeWnd m_wndFileView;
00037   CImageList m_FileViewImages;
00038   CFileViewToolBar m_wndToolBar;
00039
00040 protected:
00041   void FillFileView();
00042
00043 // Implementation
00044 public:
00045   virtual ~CFileViewBar();
00046
00047 protected:
00048   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00049   afx_msg void OnSize(UINT nType, int cx, int cy);
00050   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00051   afx_msg void OnProperties();
00052   afx_msg void OnSolutionOpen();
00053   afx_msg void OnSolutionOpenWith();
00054   afx_msg void OnDummyCompile();
00055   afx_msg void OnEditCut();
00056   afx_msg void OnEditCopy();
00057   afx_msg void OnEditClear();
00058   afx_msg void OnPaint();
00059   afx_msg void OnSetFocus(CWnd* pOldWnd);
00060
00061   DECLARE_MESSAGE_MAP()
00062 };
00063
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/AddressCombo.h Source File

  • internet
  • HTMLEdit

AddressCombo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #if !defined(AFX_ADDRESSCOMBO_H__45AEB6CD_F0C3_11D1_AD85_0060083E86DF__INCLUDED_)
00011 #define AFX_ADDRESSCOMBO_H__45AEB6CD_F0C3_11D1_AD85_0060083E86DF__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // AddressCombo.h : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CAddressCombo window
00021
00022 class CAddressCombo : public CComboBox
00023 {
00024 // Construction
00025 public:
00026   CAddressCombo();
00027   void FillWithExplorerHistory();
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CAddressCombo)
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 public:
00041   CFont m_font;
00042   virtual ~CAddressCombo();
00043
00044   // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(CAddressCombo)
00047   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00048   //}}AFX_MSG
00049
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054
00055 //{{AFX_INSERT_LOCATION}}
00056 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00057
00058 #endif // !defined(AFX_ADDRESSCOMBO_H__45AEB6CD_F0C3_11D1_AD85_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPushCtrl Member List

This is the complete list of members for CPushCtrl, including all inherited members.
AboutBox() | CPushCtrl | [protected]
CPushCtrl() | CPushCtrl |
DECLARE_OLECREATE_EX(CPushCtrl) DECLARE_OLETYPELIB(CPushCtrl) DECLARE_PROPPAGEIDS(CPushCtrl) DECLARE_OLECTLTYPE(CPushCtrl) BOOL PreCreateWindow(CREATESTRUCT &cs) | CPushCtrl | [protected]
DoPropExchange(CPropExchange *pPX) | CPushCtrl | [virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CPushCtrl | [protected, virtual]
eventidCustomClick enum value | CPushCtrl |
FireCustomClick(LPCTSTR lpstrCaption, short cchCaption) | CPushCtrl | [inline, protected]
IsSubclassedControl() | CPushCtrl | [protected]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CPushCtrl | [virtual]
OnEraseBkgnd(CDC *pDC) | CPushCtrl | [protected]
OnOcmCommand(WPARAM wParam, LPARAM lParam) | CPushCtrl | [protected]
OnOcmDrawItem(WPARAM wParam, LPARAM lParam) | CPushCtrl | [protected]
OnResetState() | CPushCtrl | [virtual]
~CPushCtrl() | CPushCtrl | [protected]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Script.Cpp Source File

  • ole
  • TstCon

Script.Cpp

Go to the documentation of this file.
00001 // Script.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CScript
00022
00023 IMPLEMENT_DYNAMIC( CScript, CCmdTarget )
00024
00025 CScript::CScript( CScriptManager* pManager ) :
00026    m_pManager( pManager )
00027 {
00028    ASSERT( m_pManager != NULL );
00029 }
00030
00031 CScript::~CScript()
00032 {
00033    Unload();
00034 }
00035
00036 HRESULT CScript::AddNamedItem( LPCTSTR pszItemName )
00037 {
00038
00039    HRESULT hResult;
00040
00041    CT2COLE pszItemNameO( pszItemName );
00042
00043    hResult = m_pActiveScript->AddNamedItem( pszItemNameO,
00044     SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE );
00045    if( FAILED( hResult ) )
00046    {
00047     return( hResult );
00048    }
00049
00050    return( S_OK );
00051 }
00052
00053 BOOL CScript::FindMacro( LPCTSTR pszMacroName )
00054 {
00055    DISPID dispid;
00056
00057    ASSERT( pszMacroName != NULL );
00058
00059    return( m_mapMacros.Lookup( pszMacroName, dispid ) );
00060 }
00061
00062 POSITION CScript::GetFirstMacroPosition()
00063 {
00064    return( m_mapMacros.GetStartPosition() );
00065 }
00066
00067 CString CScript::GetName()
00068 {
00069    return( m_strScriptName );
00070 }
00071
00072 CString CScript::GetNextMacroName( POSITION& posMacro )
00073 {
00074    CString strMacro;
00075    DISPID dispid;
00076
00077    m_mapMacros.GetNextAssoc( posMacro, strMacro, dispid );
00078
00079    return( strMacro );
00080 }
00081
00082 HRESULT CScript::LoadScript( LPCTSTR pszFileName, LPCTSTR pszScriptName )
00083 {
00084    ITypeInfoPtr pTypeInfo;
00085    HRESULT hResult;
00086    CLSID clsid;
00087    CFile file;
00088    ULONGLONG nFileSize;
00089    BSTR bstrScript;
00090    BOOL tSuccess;
00091    int iMethod;
00092    UINT nNames;
00093    BSTR bstrName;
00094    CString strName;
00095    CString strExtension;
00096    int iChar;
00097
00098    ENSURE( pszFileName != NULL );
00099    ENSURE( pszScriptName != NULL );
00100    ENSURE( m_pActiveScript == NULL );
00101
00102    iChar = lstrlen( pszFileName )-1;
00103    while( (iChar >= 0) && (pszFileName[iChar] != _T( '.' )) )
00104    {
00105     iChar--;
00106    }
00107
00108    if( (iChar >= 0) && (_tcsicmp( &pszFileName[iChar], _T( ".js" ) ) == 0) )
00109    {
00110     hResult = CLSIDFromProgID( L"JScript", &clsid );
00111     if( FAILED( hResult ) )
00112     {
00113      return( hResult );
00114     }
00115    }
00116    else
00117    {
00118     hResult = CLSIDFromProgID( L"VBScript", &clsid );
00119     if( FAILED( hResult ) )
00120     {
00121      return( hResult );
00122     }
00123    }
00124
00125    hResult = m_pActiveScript.CreateInstance( clsid, NULL,
00126     CLSCTX_INPROC_SERVER );
00127    if( FAILED( hResult ) )
00128    {
00129     return( hResult );
00130    }
00131
00132    m_pActiveScriptParse = m_pActiveScript;
00133    if( m_pActiveScriptParse == NULL )
00134    {
00135     return( E_NOINTERFACE );
00136    }
00137
00138    hResult = m_pActiveScript->SetScriptSite( &m_xActiveScriptSite );
00139    if( FAILED( hResult ) )
00140    {
00141     return( hResult );
00142    }
00143
00144    hResult = m_pActiveScriptParse->InitNew();
00145    if( FAILED( hResult ) )
00146    {
00147     return( hResult );
00148    }
00149
00150    CFileException error;
00151    tSuccess = file.Open( pszFileName, CFile::modeRead|CFile::shareDenyWrite,
00152     &error );
00153    if( !tSuccess )
00154    {
00155     return( HRESULT_FROM_WIN32( error.m_lOsError ) );
00156    }
00157
00158    nFileSize = file.GetLength();
00159    if( nFileSize > INT_MAX )
00160    {
00161       return( E_OUTOFMEMORY );
00162    }
00163
00164    nFileSize = file.Read( m_strScriptText.GetBuffer( ULONG( nFileSize ) ), ULONG( nFileSize ) );
00165    file.Close();
00166    m_strScriptText.ReleaseBuffer( ULONG( nFileSize ) );
00167    bstrScript = m_strScriptText.AllocSysString();
00168
00169    hResult = m_pActiveScriptParse->ParseScriptText( bstrScript, NULL, NULL,
00170     NULL, DWORD( this ), 0, SCRIPTTEXT_ISVISIBLE, NULL, NULL );
00171    SysFreeString( bstrScript );
00172    if( FAILED( hResult ) )
00173    {
00174     return( hResult );
00175    }
00176
00177    hResult = m_pManager->AddNamedItems( m_pActiveScript );
00178    if( FAILED( hResult ) )
00179    {
00180     return( hResult );
00181    }
00182
00183    hResult = m_pActiveScript->SetScriptState( SCRIPTSTATE_CONNECTED );
00184    if( FAILED( hResult ) )
00185    {
00186     return( hResult );
00187    }
00188
00189    hResult = m_pActiveScript->GetScriptDispatch( NULL, &m_pDispatch );
00190    if( FAILED( hResult ) )
00191    {
00192     return( hResult );
00193    }
00194
00195    hResult = m_pDispatch->GetTypeInfo( 0, GetUserDefaultLCID(), &pTypeInfo );
00196    if( FAILED( hResult ) )
00197    {
00198     return( hResult );
00199    }
00200
00201    CSmartTypeAttr pTypeAttr( pTypeInfo );
00202    CSmartFuncDesc pFuncDesc( pTypeInfo );
00203
00204    hResult = pTypeInfo->GetTypeAttr( &pTypeAttr );
00205    if( FAILED( hResult ) )
00206    {
00207     return( hResult );
00208    }
00209
00210    for( iMethod = 0; iMethod < pTypeAttr->cFuncs; iMethod++ )
00211    {
00212     hResult = pTypeInfo->GetFuncDesc( iMethod, &pFuncDesc );
00213     if( FAILED( hResult ) )
00214     {
00215      return( hResult );
00216     }
00217
00218     if( (pFuncDesc->funckind == FUNC_DISPATCH) && (pFuncDesc->invkind ==
00219      INVOKE_FUNC) && (pFuncDesc->cParams == 0) )
00220     {
00221      bstrName = NULL;
00222      hResult = pTypeInfo->GetNames( pFuncDesc->memid, &bstrName, 1,
00223       &nNames );
00224      if( FAILED( hResult ) )
00225      {
00226       return( hResult );
00227      }
00228      ASSERT( nNames == 1 );
00229
00230      strName = bstrName;
00231      SysFreeString( bstrName );
00232      bstrName = NULL;
00233
00234      // Macros can't contain underscores, since those denote event handlers
00235      if( strName.Find( _T( '_' ) ) == -1 )
00236      {
00237       m_mapMacros.SetAt( strName, pFuncDesc->memid );
00238      }
00239     }
00240
00241     pFuncDesc.Release();
00242    }
00243
00244    m_strScriptName = pszScriptName;
00245
00246    return( S_OK );
00247 }
00248
00249 HRESULT CScript::RunMacro( LPCTSTR pszMacroName )
00250 {
00251    DISPID dispid;
00252    COleDispatchDriver driver;
00253    BOOL tFound;
00254
00255    ASSERT( pszMacroName != NULL );
00256
00257    tFound = m_mapMacros.Lookup( pszMacroName, dispid );
00258    if( !tFound )
00259    {
00260     return( DISP_E_MEMBERNOTFOUND );
00261    }
00262
00263    driver.AttachDispatch( m_pDispatch, FALSE );
00264    try
00265    {
00266     driver.InvokeHelper( dispid, DISPATCH_METHOD, VT_EMPTY, NULL, VTS_NONE );
00267    }
00268    catch( COleDispatchException* pException )
00269    {
00270     CString strMessage;
00271
00272     AfxFormatString1( strMessage, IDS_DISPATCHEXCEPTION,
00273      pException->m_strDescription );
00274     AfxMessageBox( strMessage );
00275     pException->Delete();
00276    }
00277    catch( COleException* pException )
00278    {
00279     pException->Delete();
00280    }
00281
00282    return( S_OK );
00283 }
00284
00285 void CScript::Unload()
00286 {
00287    if( m_pDispatch != NULL )
00288    {
00289     m_pDispatch.Release();
00290    }
00291    if( m_pActiveScript != NULL )
00292    {
00293     m_pActiveScript->SetScriptState( SCRIPTSTATE_DISCONNECTED );
00294     m_pActiveScript->Close();
00295     m_pActiveScript.Release();
00296    }
00297    if( m_pActiveScriptParse != NULL )
00298    {
00299     m_pActiveScriptParse.Release();
00300    }
00301 }
00302
00303
00304 BEGIN_INTERFACE_MAP( CScript, CCmdTarget )
00305    INTERFACE_PART( CScript, IID_IActiveScriptSite, ActiveScriptSite )
00306    INTERFACE_PART( CScript, IID_IActiveScriptSiteWindow, ActiveScriptSiteWindow )
00307 END_INTERFACE_MAP()
00308
00309 BEGIN_MESSAGE_MAP(CScript, CCmdTarget)
00310   //{{AFX_MSG_MAP(CScript)
00311     // NOTE - the ClassWizard will add and remove mapping macros here.
00312   //}}AFX_MSG_MAP
00313 END_MESSAGE_MAP()
00314
00315 /////////////////////////////////////////////////////////////////////////////
00316 // CScript message handlers
00317
00318
00319 ///////////////////////////////////////////////////////////////////////////////
00320 // IActiveScriptSite
00321 ///////////////////////////////////////////////////////////////////////////////
00322
00323 STDMETHODIMP_( ULONG ) CScript::XActiveScriptSite::AddRef()
00324 {
00325    METHOD_PROLOGUE_( CScript, ActiveScriptSite )
00326
00327    TRACE( "XActiveScriptSite::AddRef()\n" );
00328
00329    return( pThis->ExternalAddRef() );
00330 }
00331
00332 STDMETHODIMP_( ULONG ) CScript::XActiveScriptSite::Release()
00333 {
00334    METHOD_PROLOGUE_( CScript, ActiveScriptSite )
00335
00336    TRACE( "XActiveScriptSite::Release()\n" );
00337
00338    return( pThis->ExternalRelease() );
00339 }
00340
00341 STDMETHODIMP CScript::XActiveScriptSite::QueryInterface( REFIID iid,
00342    void** ppInterface )
00343 {
00344    METHOD_PROLOGUE_( CScript, ActiveScriptSite )
00345
00346    return( pThis->ExternalQueryInterface( &iid, ppInterface ) );
00347 }
00348
00349 STDMETHODIMP CScript::XActiveScriptSite::GetDocVersionString(
00350    BSTR* pbstrVersion )
00351 {
00352    (void)pbstrVersion;
00353
00354    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00355
00356    return( E_NOTIMPL );
00357 }
00358
00359 STDMETHODIMP CScript::XActiveScriptSite::GetItemInfo( LPCOLESTR pszName,
00360    DWORD dwReturnMask, IUnknown** ppItem, ITypeInfo** ppTypeInfo )
00361 {
00362
00363    HRESULT hResult;
00364
00365    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00366
00367    if( ppItem != NULL )
00368    {
00369     *ppItem = NULL;
00370    }
00371    if( ppTypeInfo != NULL )
00372    {
00373     *ppTypeInfo = NULL;
00374    }
00375
00376    if( dwReturnMask&SCRIPTINFO_IUNKNOWN )
00377    {
00378     if( ppItem == NULL )
00379     {
00380      return( E_POINTER );
00381     }
00382    }
00383    if( dwReturnMask&SCRIPTINFO_ITYPEINFO )
00384    {
00385     if( ppTypeInfo == NULL )
00386     {
00387      return( E_POINTER );
00388     }
00389    }
00390
00391    COLE2CT pszNameT( pszName );
00392    TRACE( "XActiveScriptSite::GetItemInfo( %s )\n", pszNameT );
00393
00394    if( dwReturnMask&SCRIPTINFO_IUNKNOWN )
00395    {
00396     hResult = pThis->m_pManager->GetItemDispatch( pszNameT, ppItem );
00397     if( FAILED( hResult ) )
00398     {
00399      return( hResult );
00400     }
00401    }
00402    if( dwReturnMask&SCRIPTINFO_ITYPEINFO )
00403    {
00404     pThis->m_pManager->GetItemTypeInfo( pszNameT, ppTypeInfo );
00405    }
00406
00407    return( S_OK );
00408 }
00409
00410 STDMETHODIMP CScript::XActiveScriptSite::GetLCID( LCID* plcid )
00411 {
00412    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00413
00414    if( plcid == NULL )
00415    {
00416     return( E_POINTER );
00417    }
00418
00419    *plcid = GetUserDefaultLCID();
00420
00421    return( S_OK );
00422 }
00423
00424 STDMETHODIMP CScript::XActiveScriptSite::OnEnterScript()
00425 {
00426    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00427
00428    return( S_OK );
00429 }
00430
00431 STDMETHODIMP CScript::XActiveScriptSite::OnLeaveScript()
00432 {
00433    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00434
00435    return( S_OK );
00436 }
00437
00438 STDMETHODIMP CScript::XActiveScriptSite::OnScriptError(
00439    IActiveScriptError* pError )
00440 {
00441
00442    HRESULT hResult;
00443    CExcepInfo excep;
00444    CString strMessage;
00445    int nResult;
00446    DWORD dwContext;
00447    ULONG iLine;
00448    LONG iChar;
00449    BSTR bstrSourceLineText;
00450
00451    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00452
00453    TRACE( "XActiveScriptSite::OnScriptError()\n" );
00454
00455    ENSURE( pError != NULL );
00456
00457    hResult = pError->GetSourcePosition( &dwContext, &iLine, &iChar );
00458    if( SUCCEEDED( hResult ) )
00459    {
00460     TRACE( "Error at line %u, character %d\n", iLine, iChar );
00461    }
00462    bstrSourceLineText = NULL;
00463    hResult = pError->GetSourceLineText( &bstrSourceLineText );
00464    if( SUCCEEDED( hResult ) )
00465    {
00466     TRACE( "Source Text: %s\n", COLE2CT( bstrSourceLineText ) );
00467     SysFreeString( bstrSourceLineText );
00468     bstrSourceLineText = NULL;
00469    }
00470    hResult = pError->GetExceptionInfo( &excep );
00471    if( SUCCEEDED( hResult ) )
00472    {
00473     AfxFormatString2( strMessage, IDS_SCRIPTERRORFORMAT, COLE2CT(
00474      excep.bstrSource ), COLE2CT( excep.bstrDescription ) );
00475     nResult = AfxMessageBox( strMessage, MB_YESNO );
00476     if( nResult == IDYES )
00477     {
00478      return( S_OK );
00479     }
00480     else
00481     {
00482      return( E_FAIL );
00483     }
00484    }
00485
00486    return( E_FAIL );
00487 }
00488
00489 STDMETHODIMP CScript::XActiveScriptSite::OnScriptTerminate(
00490    const VARIANT* pvarResult, const EXCEPINFO* pExcepInfo )
00491 {
00492    (void)pvarResult;
00493    (void)pExcepInfo;
00494
00495    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00496
00497    TRACE( "XActiveScriptSite::OnScriptTerminate()\n" );
00498
00499    return( S_OK );
00500 }
00501
00502 STDMETHODIMP CScript::XActiveScriptSite::OnStateChange(
00503    SCRIPTSTATE eState )
00504 {
00505    METHOD_PROLOGUE( CScript, ActiveScriptSite )
00506
00507    TRACE( "XActiveScriptSite::OnStateChange()\n" );
00508
00509    switch( eState )
00510    {
00511    case SCRIPTSTATE_UNINITIALIZED:
00512     TRACE( "\tSCRIPTSTATE_UNINITIALIZED\n" );
00513     break;
00514
00515    case SCRIPTSTATE_INITIALIZED:
00516     TRACE( "\tSCRIPTSTATE_INITIALIZED\n" );
00517     break;
00518
00519    case SCRIPTSTATE_STARTED:
00520     TRACE( "\tSCRIPTSTATE_STARTED\n" );
00521     break;
00522
00523    case SCRIPTSTATE_CONNECTED:
00524     TRACE( "\tSCRIPTSTATE_CONNECTED\n" );
00525     break;
00526
00527    case SCRIPTSTATE_DISCONNECTED:
00528     TRACE( "\tSCRIPTSTATE_DISCONNECTED\n" );
00529     break;
00530
00531    case SCRIPTSTATE_CLOSED:
00532     TRACE( "\tSCRIPTSTATE_CLOSED\n" );
00533     break;
00534
00535    default:
00536     TRACE( "\tUnknown SCRIPTSTATE value\n" );
00537     ASSERT( FALSE );
00538     break;
00539    }
00540
00541    return( S_OK );
00542 }
00543
00544
00545 ///////////////////////////////////////////////////////////////////////////////
00546 // IActiveScriptSiteWindow
00547 ///////////////////////////////////////////////////////////////////////////////
00548
00549 STDMETHODIMP_( ULONG ) CScript::XActiveScriptSiteWindow::AddRef()
00550 {
00551    METHOD_PROLOGUE_( CScript, ActiveScriptSiteWindow )
00552
00553    TRACE( "XActiveScriptSiteWindow::AddRef()\n" );
00554
00555    return( pThis->ExternalAddRef() );
00556 }
00557
00558 STDMETHODIMP_( ULONG ) CScript::XActiveScriptSiteWindow::Release()
00559 {
00560    METHOD_PROLOGUE_( CScript, ActiveScriptSiteWindow )
00561
00562    TRACE( "XActiveScriptSiteWindow::Release()\n" );
00563
00564    return( pThis->ExternalRelease() );
00565 }
00566
00567 STDMETHODIMP CScript::XActiveScriptSiteWindow::QueryInterface(
00568    REFIID iid, void** ppInterface )
00569 {
00570    METHOD_PROLOGUE_( CScript, ActiveScriptSiteWindow )
00571
00572    return( pThis->ExternalQueryInterface( &iid, ppInterface ) );
00573 }
00574
00575 STDMETHODIMP CScript::XActiveScriptSiteWindow::EnableModeless(
00576    BOOL tEnable )
00577 {
00578    (void)tEnable;
00579
00580    METHOD_PROLOGUE( CScript, ActiveScriptSiteWindow )
00581
00582    return( E_NOTIMPL );
00583 }
00584
00585 STDMETHODIMP CScript::XActiveScriptSiteWindow::GetWindow(
00586    HWND* phWindow )
00587 {
00588    METHOD_PROLOGUE( CScript, ActiveScriptSiteWindow )
00589
00590    if( phWindow == NULL )
00591    {
00592     return( E_POINTER );
00593    }
00594
00595    *phWindow = AfxGetMainWnd()->GetSafeHwnd();
00596
00597    return( S_OK );
00598 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMetaFileWnd Member List

This is the complete list of members for CMetaFileWnd, including all inherited members.
CMetaFileWnd() | CMetaFileWnd |
m_hMetaFile | CMetaFileWnd | [protected]
m_pOleObject | CMetaFileWnd | [protected]
m_pViewObject | CMetaFileWnd | [protected]
m_size | CMetaFileWnd | [protected]
OnPaint() | CMetaFileWnd | [protected]
SetObject(IUnknown *pObject) | CMetaFileWnd |
~CMetaFileWnd() | CMetaFileWnd | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/strings.cpp Source File

  • ole
  • wordpad

strings.cpp

Go to the documentation of this file.
00001 // strings.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "strings.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 const TCHAR szWordPadClass[] = _T("WordPadClass");
00021 const TCHAR szLayout1[] = _T("Layout2");
00022 const TCHAR szLayout2[] = _T("LayoutAux2");
00023 const TCHAR szRegKey[] = _T("Microsoft\\Windows\\CurrentVersion\\Applets");
00024
00025 const TCHAR szTextSection[] = _T("Text");
00026 const TCHAR szRTFSection[] = _T("RTF");
00027 const TCHAR szWordSection[] = _T("Word6");
00028 const TCHAR szWriteSection[] =_T("Write");
00029 const TCHAR szIPSection[] = _T("IP");
00030 const TCHAR szWrap[] = _T("Wrap");
00031 const TCHAR szPageMargin[] = _T("PageMargin");
00032
00033 const TCHAR szSection[] = _T("Options");
00034 const TCHAR szWordSel[] = _T("WordSel");
00035 const TCHAR szUnits[] = _T("Units");
00036 const TCHAR szFrameRect[] = _T("FrameRect");
00037 const TCHAR szMaximized[] = _T("Maximized");
00038
00039 const TCHAR szSumInfo[] = _T("\005SummaryInformation");
00040
00041 const char szWordConverter[] = "MSWRD632.WPC";
00042 const char szWriteConverter[] = "WRITE32.WPC";
00043
00044 const TCHAR szContents[] = _T("Contents");
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPages.h Source File

  • vc2008fp
  • CustomPages

CustomPages.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CCustomPagesApp:
00021 // See CustomPages.cpp for the implementation of this class
00022 //
00023
00024 class CCustomPagesApp : public CWinAppEx
00025 {
00026 public:
00027   CCustomPagesApp();
00028
00029   virtual void PreLoadState ();
00030
00031
00032 // Overrides
00033   public:
00034   virtual BOOL InitInstance();
00035   virtual int ExitInstance();
00036
00037 // Implementation
00038   afx_msg void OnAppAbout();
00039
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043
00044 extern CCustomPagesApp theApp;
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/button.cpp Source File

  • controls
  • button

button.cpp

Go to the documentation of this file.
00001 // button.cpp : Implementation of CButtonApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "button.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020
00021 CButtonApp NEAR theApp;
00022
00023 const GUID CDECL BASED_CODE _tlid =
00024     { 0x4a8c9992, 0x7713, 0x101b, { 0xa5, 0xa1, 0x4, 0x2, 0x1c, 0x0, 0x94, 0x2 } };
00025 const WORD _wVerMajor = 1;
00026 const WORD _wVerMinor = 0;
00027
00028
00029 ////////////////////////////////////////////////////////////////////////////
00030 // CButtonApp::InitInstance - DLL initialization
00031
00032 BOOL CButtonApp::InitInstance()
00033 {
00034   BOOL bInit = COleControlModule::InitInstance();
00035
00036   if (bInit)
00037   {
00038   }
00039
00040   return bInit;
00041 }
00042
00043
00044 ////////////////////////////////////////////////////////////////////////////
00045 // CButtonApp::ExitInstance - DLL termination
00046
00047 int CButtonApp::ExitInstance()
00048 {
00049   return COleControlModule::ExitInstance();
00050 }
00051
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // DllRegisterServer - Adds entries to the system registry
00055
00056 STDAPI DllRegisterServer(void)
00057 {
00058   AFX_MANAGE_STATE(_afxModuleAddrThis);
00059
00060   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00061     return ResultFromScode(SELFREG_E_TYPELIB);
00062
00063   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00064     return ResultFromScode(SELFREG_E_CLASS);
00065
00066   return NOERROR;
00067 }
00068
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // DllUnregisterServer - Removes entries from the system registry
00072
00073 STDAPI DllUnregisterServer(void)
00074 {
00075   AFX_MANAGE_STATE(_afxModuleAddrThis);
00076
00077   if (!AfxOleUnregisterTypeLib(_tlid))
00078     return ResultFromScode(SELFREG_E_TYPELIB);
00079
00080   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00081     return ResultFromScode(SELFREG_E_CLASS);
00082
00083   return NOERROR;
00084 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/PropertiesViewBar.h Source File

  • vc2008fp
  • DrawClient

PropertiesViewBar.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CPropertiesToolBar : public CMFCToolBar
00015 {
00016 public:
00017   virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
00018   {
00019     CMFCToolBar::OnUpdateCmdUI ((CFrameWnd*) GetOwner (), bDisableIfNoHndler);
00020   }
00021
00022   virtual BOOL AllowShowOnList () const   { return FALSE; }
00023 };
00024
00025 class CPropertiesViewBar : public CDockablePane
00026 {
00027 public:
00028   CPropertiesViewBar(void);
00029
00030   void AdjustLayout ();
00031
00032 // Attributes
00033 public:
00034   void SetVSDotNetLook (BOOL bSet)
00035   {
00036     m_wndPropList.SetVSDotNetLook (bSet);
00037     m_wndPropList.SetGroupNameFullWidth (bSet);
00038   }
00039
00040   CMFCPropertyGridCtrl* GetPropList () {return &m_wndPropList;}
00041
00042 protected:
00043   CPropertiesToolBar  m_wndToolBar;
00044   CMFCPropertyGridCtrl    m_wndPropList;
00045
00046 // Attributes
00047 protected:
00048
00049 // Implementation
00050 public:
00051   virtual ~CPropertiesViewBar();
00052
00053 protected:
00054   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00055   afx_msg void OnSize(UINT nType, int cx, int cy);
00056   afx_msg void OnSetFocus(CWnd* pOldWnd);
00057   afx_msg void OnPropListTreeMode ();
00058   afx_msg void OnPropListAlphabetMode ();
00059   afx_msg void OnUpdatePropListTreeMode (CCmdUI* pCmdUI);
00060   afx_msg void OnUpdatePropListAlphabetMode (CCmdUI* pCmdUI);
00061
00062   DECLARE_MESSAGE_MAP()
00063 };
00064
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/targetver.h Source File

  • vc2008fp
  • RollupPane

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroCB.H Source File

  • ole
  • TstCon

MacroCB.H

Go to the documentation of this file.
00001 // File: MacroCB.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_MACROCOMBOBOX_H__4E83BE2F_3F5E_11D1_8E47_00C04FB68D60__INCLUDED_)
00011 #define AFX_MACROCOMBOBOX_H__4E83BE2F_3F5E_11D1_8E47_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // MacroComboBox.H : header file
00017 //
00018
00019 #define MCBN_RETURN WM_APP
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CMacroComboBox window
00023
00024 class CMacroComboBox : public CComboBox
00025 {
00026 // Construction
00027 public:
00028   CMacroComboBox();
00029
00030 // Attributes
00031 public:
00032
00033 // Operations
00034 public:
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CMacroComboBox)
00039   public:
00040   virtual BOOL PreTranslateMessage(MSG* pMsg);
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 public:
00045   virtual ~CMacroComboBox();
00046
00047 protected:
00048    void AddMRUEntry( LPCTSTR pszMacroName );
00049
00050   // Generated message map functions
00051 protected:
00052   //{{AFX_MSG(CMacroComboBox)
00053   //}}AFX_MSG
00054
00055   DECLARE_MESSAGE_MAP()
00056 };
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059
00060 //{{AFX_INSERT_LOCATION}}
00061 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00062
00063 #endif // !defined(AFX_MACROCOMBOBOX_H__4E83BE2F_3F5E_11D1_8E47_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpdoc.h Source File

  • ole
  • wordpad

wordpdoc.h

Go to the documentation of this file.
00001 // wordpdoc.h : interface of the CWordPadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CFormatBar;
00013 class CWordPadSrvrItem;
00014 class CWordPadView;
00015
00016 class CWordPadDoc : public CRichEditDoc
00017 {
00018 private:
00019   using CRichEditDoc::GetView;
00020
00021 protected: // create from serialization only
00022   CWordPadDoc();
00023   DECLARE_DYNCREATE(CWordPadDoc)
00024
00025 // Attributes
00026 public:
00027   int m_nDocType;
00028   int m_nNewDocType;
00029   void SetDocType(int nDocType, BOOL bNoOptionChange = FALSE);
00030   CWordPadView* GetView();
00031   CLSID GetClassID();
00032   LPCTSTR GetSection();
00033
00034 // Operations
00035 public:
00036   void SaveState(int nType);
00037   void RestoreState(int nType);
00038   virtual CFile* GetFile(LPCTSTR pszPathName, UINT nOpenFlags,
00039     CFileException* pException);
00040   virtual BOOL DoSave(LPCTSTR pszPathName, BOOL bReplace = TRUE);
00041   int MapType(int nType);
00042   void ForceDelayed(CFrameWnd* pFrameWnd);
00043
00044 // Overrides
00045   virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo) const;
00046   virtual void OnDeactivateUI(BOOL bUndoable);
00047   virtual void Serialize(CArchive& ar);
00048   // ClassWizard generated virtual function overrides
00049   //{{AFX_VIRTUAL(CWordPadDoc)
00050   public:
00051   virtual BOOL OnNewDocument();
00052   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00053   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00054   virtual void OnCloseDocument();
00055   virtual void ReportSaveLoadException(LPCTSTR lpszPathName, CException* e, BOOL bSaving, UINT nIDPDefault);
00056   protected:
00057   virtual COleServerItem* OnGetEmbeddedItem();
00058   //}}AFX_VIRTUAL
00059
00060 // Implementation
00061 public:
00062   virtual void PreCloseFrame(CFrameWnd* pFrameArg);
00063 #ifdef _DEBUG
00064   virtual void AssertValid() const;
00065   virtual void Dump(CDumpContext& dc) const;
00066 #endif
00067
00068 // Generated message map functions
00069 protected:
00070   //{{AFX_MSG(CWordPadDoc)
00071   afx_msg void OnViewOptions();
00072   afx_msg void OnUpdateOleVerbPopup(CCmdUI* pCmdUI);
00073   afx_msg void OnFileSendMail();
00074   afx_msg void OnUpdateIfEmbedded(CCmdUI* pCmdUI);
00075   //}}AFX_MSG
00076   DECLARE_MESSAGE_MAP()
00077 };
00078
00079 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/paredit.h Source File

  • general
  • ctrltest

paredit.h

Go to the documentation of this file.
00001 // paredit.h: C++ derived edit control for numbers/letters etc
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CParsedEdit is a specialized CEdit control that only allows characters
00015 //  of a given type.
00016 // This class is used in 3 different ways in the samples
00017
00018 class CParsedEdit : public CEdit
00019 {
00020 private:
00021   using CEdit::Create;
00022
00023 protected:
00024   WORD    m_wParseStyle;      // C++ member data
00025
00026 public:
00027 // Construction
00028   CParsedEdit();
00029
00030   // explicit construction (see DERTEST.CPP)
00031   BOOL Create(DWORD dwStyle /* includes PES_ style*/, const RECT& rect,
00032     CWnd* pParentWnd, UINT nID);
00033
00034   // subclassed construction (see SUBTEST.CPP)
00035   BOOL SubclassEdit(UINT nID, CWnd* pParent, WORD wParseStyle);
00036
00037   // for WNDCLASS Registered window
00038   static BOOL RegisterControlClass();
00039
00040 // Overridables
00041   virtual void OnBadInput();
00042
00043 // Implementation
00044 protected:
00045   //{{AFX_MSG(CParsedEdit)
00046   afx_msg void OnChar(UINT, UINT, UINT); // for character validation
00047   afx_msg void OnVScroll(UINT, UINT, CScrollBar*); // for spin buttons
00048   //}}AFX_MSG
00049
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////
00054 // Parsed edit control sub-styles
00055
00056 #define PES_NUMBERS         0x0001
00057 #define PES_LETTERS         0x0002
00058 #define PES_OTHERCHARS      0x0004
00059 #define PES_ALL             0xFFFF
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // Extra control notifications
00063
00064 // above the range for normal EN_ messages
00065 #define PEN_ILLEGALCHAR     0x8000
00066       // sent to parent when illegal character hit
00067       // return 0 if you want parsed edit to beep
00068
00069 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagOEMPENINFO Member List

This is the complete list of members for tagOEMPENINFO, including all inherited members.
wDistinct | tagOEMPENINFO
wPdt | tagOEMPENINFO
wValueMax | tagOEMPENINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface32.cpp Source File

  • general
  • MMXSwarm

SSE2Surface32.cpp

Go to the documentation of this file.
00001 // SSE2Surface32.cpp : implementation of the CSSE2Surface32Intrinsic
00002 // class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012 //
00013 #include "stdafx.h"
00014 #include "SSE2Surface.h"
00015 #include "SSE2Wrapper.h"
00016
00017 typedef CSSE2Unsigned16Saturated CSSE2;
00018
00019 // Optimized for a 4-pixel processing 32 bit buffer
00020 void CSSE2Surface32Intrinsic::AdjustWidth(int *pWidth)
00021 {
00022   ASSERT(pWidth != NULL);
00023   ASSERT(m_kDeltaX <= 3);
00024
00025   *pWidth = (*pWidth + 3-m_kDeltaX) & ~3; // round up by 4
00026 }
00027
00028 void CSSE2Surface32Intrinsic::OnCreated()
00029 {
00030   ASSERT(GetBitDepth() == 32);
00031   ASSERT((GetPitch() & 0xF) == 0);
00032   ASSERT(GetVisibleWidth() && GetVisibleHeight());
00033   ASSERT(sizeof(RGBQUAD) == 4);
00034
00035   int width = GetVisibleWidth();
00036     m_qwpl  = GetPitch()/8; // qwords Per Line
00037     m_width = (width+3)/4; // 4 pixels at a time
00038 }
00039
00040 void CSSE2Surface32Intrinsic::BlurBits()
00041 {
00042     int height = GetVisibleHeight();
00043     ULONGLONG *pCur  = (ULONGLONG *)GetPixelAddress(0,0);
00044   ASSERT((DWORD_PTR(pCur) & 0xF) == 0);
00045
00046   CSSE2 cFader;
00047   CSSE2 cRight, cLeft;
00048   CSSE2 cUp, cDown, cCur;
00049   CSSE2 cResult;
00050
00051   cFader.UnpackBytesLo( 0x0101010101010101u );
00052   cLeft.Clear();
00053
00054   do {
00055     int width = m_width;
00056     ASSERT((DWORD_PTR(pCur) & 0xF) == 0);
00057     do {
00058       RGBQUAD *pdwCur = (RGBQUAD*)pCur;
00059       ULONGLONG *pNext = (ULONGLONG*)(pdwCur+1);
00060
00061       // Load pixels and do the mmx unpack
00062       cCur.UnpackBytesLo( *pCur );
00063       cRight.UnpackBytesLo( *pNext );
00064       cUp.UnpackBytesLo( pCur[-m_qwpl] );
00065       cDown.UnpackBytesLo( pCur[m_qwpl] );
00066
00067       // Actual math. Don't step on current, or right.
00068       // Sum the 4 around and double the middle
00069
00070       // Do current pixel in this line
00071       cResult = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;
00072
00073       // Do next pixel
00074       cLeft = cRight;     // Slide left!
00075       cCur.UnpackBytesLo( pCur[1] );
00076       cRight.UnpackBytesLo( pNext[1] );
00077       cUp.UnpackBytesLo( pCur[-m_qwpl+1] );
00078       cDown.UnpackBytesLo( pCur[m_qwpl+1] );
00079       cCur = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;
00080
00081 #if defined(TRIPPY)
00082       cCur += cFader; // increase the fade to white
00083       cResult += cFader; // increase the fade to white
00084 #elif defined (FAST_FADE)
00085           cCur -= cFader; // increase the fade to black
00086           cResult -= cFader; // increase the fade to black
00087 #endif
00088       cLeft = cRight;     // Slide left!
00089
00090       cResult.PackBytes(pCur, cCur);
00091       pCur += 2;
00092     } while (--width > 0);
00093   } while (--height > 0);
00094 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonGadgetsView Member List

This is the complete list of members for CRibbonGadgetsView, including all inherited members.
CRibbonGadgetsView() | CRibbonGadgetsView | [protected]
GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE *) | CRibbonGadgetsView | [protected, virtual]
GetDocument() | CRibbonGadgetsView | [inline]
OnContextMenu(CWnd *pWnd, CPoint point) | CRibbonGadgetsView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CRibbonGadgetsView | [protected]
OnDestroy() | CRibbonGadgetsView | [protected]
OnDraw(CDC *pDC) | CRibbonGadgetsView | [protected, virtual]
OnFilePrintPreview() | CRibbonGadgetsView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CRibbonGadgetsView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CRibbonGadgetsView | [virtual]
~CRibbonGadgetsView() | CRibbonGadgetsView | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/FavoritesManager.cpp Source File

  • vc2008fp
  • IEDemo

FavoritesManager.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include <wininet.h>
00013 #include "IEDemo.h"
00014 #include "FavoritesManager.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[]=__FILE__;
00019 #define new DEBUG_NEW
00020 #endif
00021
00022 CMap<CString, LPCTSTR, int, int> CFavorit::m_URLIcons;
00023 CMap<UINT, UINT, int, int> CFavorit::m_IDIcons;
00024 UINT CFavorit::m_uiNextCommand = FIRST_FAVORITE_COMMAND;
00025 int CFavorit::m_iFolderIcon = -1;
00026 int CFavorit::m_iInternetShortcutIcon = -1;
00027
00028 CFavorit::CFavorit (LPCTSTR lpszName, int iIcon, LPCTSTR lpszURL, UINT uiCommand)
00029 {
00030   m_strName = lpszName;
00031   m_iIcon = iIcon;
00032
00033   if (lpszURL != NULL)
00034   {
00035     m_strURL = lpszURL;
00036   }
00037
00038   m_uiCommand = uiCommand;
00039
00040   if (uiCommand != 0)
00041   {
00042     m_IDIcons.SetAt (uiCommand, iIcon);
00043   }
00044 }
00045 //*************************************************************************************
00046 CFavorit::CFavorit ()
00047 {
00048   m_uiCommand = 0;
00049   m_iIcon = -1;
00050 }
00051 //*************************************************************************************
00052 CFavorit::~CFavorit()
00053 {
00054   CleanUp ();
00055 }
00056 //*************************************************************************************
00057 void CFavorit::CleanUp ()
00058 {
00059   m_uiCommand = 0;
00060   m_iIcon = -1;
00061
00062   while (!m_lstSubItems.IsEmpty ())
00063   {
00064     delete m_lstSubItems.RemoveHead ();
00065   }
00066 }
00067 //*************************************************************************************
00068 const CFavorit* CFavorit::FindByID (UINT uiCommandID) const
00069 {
00070   if (m_uiCommand == uiCommandID)
00071   {
00072     return this;
00073   }
00074
00075   for (POSITION pos = m_lstSubItems.GetHeadPosition (); pos != NULL;)
00076   {
00077     CFavorit* pFavorit = (CFavorit*) m_lstSubItems.GetNext (pos);
00078     ASSERT_VALID (pFavorit);
00079
00080     const CFavorit* pFavoritFound = pFavorit->FindByID (uiCommandID);
00081     if (pFavoritFound != NULL)
00082     {
00083       return pFavoritFound;
00084     }
00085   }
00086
00087   return NULL;
00088 }
00089 //*************************************************************************************
00090 BOOL CFavorit::Build (CString strPath)
00091 {
00092   // make sure there's a trailing backslash
00093   if (strPath.GetLength () == 0 ||
00094     strPath [strPath.GetLength () - 1] != _T('\\'))
00095   {
00096     strPath += _T('\\');
00097   }
00098
00099   // Prepare file mask:
00100   CString strFileMask = strPath;
00101   strFileMask += _T("*.*");
00102
00103   // Start find all files in specific directory:
00104   WIN32_FIND_DATA fd;
00105   HANDLE hFile = FindFirstFile (strFileMask, &fd);
00106   if (hFile == INVALID_HANDLE_VALUE)
00107   {
00108     return FALSE;
00109   }
00110
00111   do
00112   {
00113     CString strName = fd.cFileName;
00114     if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
00115     {
00116       if (strName != _T(".") && strName != _T(".."))
00117       {
00118         CFavorit* pSubFavorit = new CFavorit (strName, m_iFolderIcon, NULL);
00119         ASSERT_VALID (pSubFavorit);
00120
00121         pSubFavorit->Build (strPath + strName);
00122
00123         // Add to end of folders:
00124         BOOL bAdded = FALSE;
00125         for (POSITION pos = m_lstSubItems.GetTailPosition (); pos != NULL;)
00126         {
00127           POSITION posSave = pos;
00128
00129           CFavorit* pListFavorit = (CFavorit*) m_lstSubItems.GetPrev (pos);
00130           ASSERT_VALID (pListFavorit);
00131
00132           if (pListFavorit->m_uiCommand == 0)
00133           {
00134             m_lstSubItems.InsertAfter (posSave, pSubFavorit);
00135             bAdded = TRUE;
00136             break;
00137           }
00138         }
00139
00140         if (!bAdded)
00141         {
00142           m_lstSubItems.AddTail (pSubFavorit);
00143         }
00144       }
00145     }
00146     else if (strName.Right (4).CompareNoCase (_T(".url")) == 0)
00147     {
00148       CString strFilePath = strPath + strName;
00149
00150       // an .URL file is formatted just like an .INI file, so we can
00151       // use GetPrivateProfileString() to get the information we want
00152       TCHAR szURL [INTERNET_MAX_PATH_LENGTH + 1];
00153       ::GetPrivateProfileString (_T("InternetShortcut"), _T("URL"),
00154             _T(""), szURL, INTERNET_MAX_PATH_LENGTH,
00155             strFilePath);
00156
00157       // Obtain URL icon:
00158       TCHAR ext[_MAX_EXT];
00159       _tsplitpath_s (szURL, NULL, 0, NULL, 0, NULL, 0, ext, _MAX_EXT);
00160
00161       int iIcon = 0;
00162       if (!m_URLIcons.Lookup (ext, iIcon))
00163       {
00164         // Retrieve icon file
00165         SHFILEINFO sfi;
00166         if (::SHGetFileInfo (strFilePath, 0, &sfi, sizeof(SHFILEINFO),
00167           SHGFI_SMALLICON | SHGFI_SYSICONINDEX) &&
00168           sfi.iIcon >= 0)
00169         {
00170           m_URLIcons.SetAt (ext, sfi.iIcon);
00171           iIcon = sfi.iIcon;
00172
00173           if (m_iInternetShortcutIcon == -1)
00174           {
00175             m_iInternetShortcutIcon = sfi.iIcon;
00176           }
00177         }
00178       }
00179
00180       strName = strName.Left (strName.GetLength () - 4);
00181
00182       m_lstSubItems.AddTail (new CFavorit (
00183         strName, iIcon, szURL, m_uiNextCommand ++));
00184     }
00185   }
00186   while (FindNextFile (hFile, &fd));
00187   FindClose (hFile);
00188
00189   return TRUE;
00190 }
00191 //*************************************************************************************
00192 BOOL CFavorit::CreateMenu (CMenu& menu)
00193 {
00194   ASSERT (menu.GetSafeHmenu () == NULL);
00195   ASSERT (m_uiCommand == 0);
00196
00197   if (!menu.CreatePopupMenu ())
00198   {
00199     ASSERT (FALSE);
00200     return FALSE;
00201   }
00202
00203   for (POSITION pos = m_lstSubItems.GetHeadPosition (); pos != NULL;)
00204   {
00205     CFavorit* pFavorit = (CFavorit*) m_lstSubItems.GetNext (pos);
00206     ASSERT_VALID (pFavorit);
00207
00208     if (pFavorit->m_uiCommand != 0)
00209     {
00210       menu.InsertMenu ((UINT)-1, MF_BYPOSITION | MF_STRING, pFavorit->m_uiCommand,
00211         pFavorit->m_strName);
00212     }
00213     else
00214     {
00215       CMenu subMenu;
00216       if (pFavorit->CreateMenu (subMenu))
00217       {
00218         menu.InsertMenu ((UINT) -1, MF_BYPOSITION | MF_POPUP | MF_STRING,
00219           (UINT_PTR) subMenu.Detach (), pFavorit->m_strName);
00220       }
00221     }
00222   }
00223
00224   return TRUE;
00225 }
00226 //************************************************************************************
00227 void CFavorit::FillTree (CTreeCtrl& wndTree, HTREEITEM htreeItemParent)
00228 {
00229   for (POSITION pos = m_lstSubItems.GetHeadPosition (); pos != NULL;)
00230   {
00231     CFavorit* pFavorit = (CFavorit*) m_lstSubItems.GetNext (pos);
00232     ASSERT_VALID (pFavorit);
00233
00234     HTREEITEM hTreeItem = wndTree.InsertItem (pFavorit->m_strName,
00235       pFavorit->m_iIcon, pFavorit->m_iIcon, htreeItemParent);
00236     wndTree.SetItemData (hTreeItem, (DWORD_PTR) pFavorit);
00237
00238     pFavorit->FillTree (wndTree, hTreeItem);
00239   }
00240 }
00241
00242 //////////////////////////////////////////////////////////////////////
00243 // Construction/Destruction
00244 //////////////////////////////////////////////////////////////////////
00245
00246 CFavoritesManager::CFavoritesManager()
00247 {
00248   m_himSystem = NULL;
00249   m_SysImageSize = CSize (0, 0);
00250 }
00251 //*************************************************************************************
00252 CFavoritesManager::~CFavoritesManager()
00253 {
00254 }
00255 //************************************************************************************
00256 BOOL CFavoritesManager::Load ()
00257 {
00258   HKEY  hKey;
00259
00260   // find out from the registry where the favorites are located.
00261   if(RegOpenKey (HKEY_CURRENT_USER,
00262     _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"),
00263     &hKey) != ERROR_SUCCESS)
00264   {
00265     TRACE0("Favorites folder not found\n");
00266     return FALSE;
00267   }
00268
00269   TCHAR sz [MAX_PATH];
00270   DWORD dwSize = sizeof(sz);
00271
00272   RegQueryValueEx(hKey, _T("Favorites"), NULL, NULL, (LPBYTE)sz, &dwSize);
00273
00274   TCHAR szPath [MAX_PATH];
00275   ExpandEnvironmentStrings(sz, szPath, MAX_PATH);
00276
00277   RegCloseKey(hKey);
00278
00279   SHFILEINFO sfi;
00280   m_himSystem = (HIMAGELIST)SHGetFileInfo( szPath,
00281                                        0,
00282                                        &sfi,
00283                                        sizeof(SHFILEINFO),
00284                                        SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
00285   if (m_himSystem != NULL)
00286   {
00287     int cx, cy;
00288
00289     ::ImageList_GetIconSize (m_himSystem, &cx, &cy);
00290     m_SysImageSize = CSize (cx, cy);
00291
00292     CFavorit::m_iFolderIcon = sfi.iIcon;
00293   }
00294
00295   m_Root.Build (szPath);
00296   return TRUE;
00297 }
00298 //*************************************************************************************
00299 BOOL CFavoritesManager::CreateMenu (CMenu& menu)
00300 {
00301   return m_Root.CreateMenu (menu);
00302 }
00303 //*************************************************************************************
00304 void CFavoritesManager::FillTree (CTreeCtrl& wndTree)
00305 {
00306   ASSERT (wndTree.GetSafeHwnd () != NULL);
00307
00308   wndTree.DeleteAllItems ();
00309   wndTree.SetImageList (CImageList::FromHandle (m_himSystem), TVSIL_NORMAL);
00310   m_Root.FillTree (wndTree, NULL);
00311 }
00312 //*************************************************************************************
00313 int CFavoritesManager::GetIDIcon (UINT uiCommandID) const
00314 {
00315   int iIcon = -1;
00316   CFavorit::m_IDIcons.Lookup (uiCommandID, iIcon);
00317
00318   return iIcon;
00319 }
00320 //************************************************************************************
00321 CString CFavoritesManager::GetURLofID (UINT uiCommandID) const
00322 {
00323   if (uiCommandID == 0)
00324   {
00325     ASSERT (FALSE);
00326     return _T("");
00327   }
00328
00329   const CFavorit* pFavorit = m_Root.FindByID (uiCommandID);
00330   if (pFavorit == NULL)
00331   {
00332     ASSERT (FALSE);
00333     return _T("");
00334   }
00335
00336   return pFavorit->m_strURL;
00337 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBasePiece Member List

This is the complete list of members for CBasePiece, including all inherited members.
AdvanceTrace(CPoint &ptContact, double &dAngle, double &dAngleExtra, bool bMove=true)=0 | CBasePiece | [pure virtual]
CBasePiece(COLORREF co, bool bIsWheel=false) | CBasePiece |
Draw(CDC *pDC, long nZoomNumer, long nZoomDenom) const =0 | CBasePiece | [pure virtual]
GetBoundingRect(CSpiroRect *prect, long nZoomNumer, long nZoomDenom) const =0 | CBasePiece | [pure virtual]
GetContactPosition(CPoint poing, long nZoomNumer, long nZoomDenom, CPoint &ptContact, double &dAngle)=0 | CBasePiece | [pure virtual]
GetCycleError() const =0 | CBasePiece | [pure virtual]
GetDevPieceRgn(CDC *pDC, CRgn *pRgn, long nZoomNumer, long nZoomDenom, bool bInflate) const =0 | CBasePiece | [pure virtual]
GetFigData() const =0 | CBasePiece | [pure virtual]
GetLogPieceRgn(CRgn *pRgn, long nZoomNumer, long nZoomDenom) const =0 | CBasePiece | [pure virtual]
GetPenLocation(CPoint *pPoint) const =0 | CBasePiece | [pure virtual]
GetPenRect(CRect *pRect) const =0 | CBasePiece | [pure virtual]
GetPerimeter() const =0 | CBasePiece | [pure virtual]
HitTest(CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom) const =0 | CBasePiece | [pure virtual]
IsWheel() const | CBasePiece | [inline, virtual]
m_bIsWheel | CBasePiece |
m_co | CBasePiece |
m_icoCurrent | CBasePiece |
m_nColorCount | CBasePiece |
m_ptPos | CBasePiece |
m_rgCo | CBasePiece |
MovePiece(CSpiroView *pView, CPoint point, double dWheelData, long nZoomNumer, long nZoomDenom)=0 | CBasePiece | [pure virtual]
ReverseWheelDirection() const =0 | CBasePiece | [pure virtual]
SetAngleDelta(long nDistance, bool bReverse)=0 | CBasePiece | [pure virtual]
SetFigData(double dData)=0 | CBasePiece | [pure virtual]
SetPenLocation(CSpiroView *pView, CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom)=0 | CBasePiece | [pure virtual]
SetPosition(CPoint pt)=0 | CBasePiece | [pure virtual]
SetPosition(CPoint pt, double dAngle)=0 | CBasePiece | [pure virtual]
SetWheelMode(bool bWheel=true)=0 | CBasePiece | [pure virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/tabstop.cpp Source File

  • ole
  • superpad

tabstop.cpp

Go to the documentation of this file.
00001 // tabstop.cpp : implementation of the CPadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "superpad.h"
00014 #include "tabstop.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSetTabStops dialog
00023
00024 IMPLEMENT_DYNAMIC(CSetTabStops, CDialog)
00025
00026 CSetTabStops::CSetTabStops(CWnd* pParent /* = NULL */)
00027   : CDialog(CSetTabStops::IDD, pParent)
00028 {
00029   //{{AFX_DATA_INIT(CSetTabStops)
00030   //}}AFX_DATA_INIT
00031 }
00032
00033 void CSetTabStops::DoDataExchange(CDataExchange* pDX)
00034 {
00035   CDialog::DoDataExchange(pDX);
00036   //{{AFX_DATA_MAP(CSetTabStops)
00037   DDX_Text(pDX, IDC_EDIT_TABS, m_nTabStops);
00038   DDV_MinMaxUInt(pDX, m_nTabStops, 1, 16);
00039   //}}AFX_DATA_MAP
00040 }
00041
00042 BEGIN_MESSAGE_MAP(CSetTabStops, CDialog)
00043   //{{AFX_MSG_MAP(CSetTabStops)
00044   //}}AFX_MSG_MAP
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CSetTabStops message handlers
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/cntritem.cpp Source File

  • controls
  • contain

cntritem.cpp

Go to the documentation of this file.
00001 // CntrItem.cpp : implementation of the CContainerItem class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Contain.h"
00013
00014 #include "ContrDoc.h"
00015 #include "CntrItem.h"
00016 #include "ContrVw.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CContainerItem implementation
00026
00027 IMPLEMENT_SERIAL(CContainerItem, COleClientItem, 0)
00028
00029 CContainerItem::CContainerItem(CContainerDoc* pContainer)
00030   : COleClientItem(pContainer)
00031 {
00032   // TODO: add one-time construction code here
00033   m_rect.SetRect(10, 10, 50, 50);
00034 }
00035
00036 CContainerItem::~CContainerItem()
00037 {
00038   // TODO: add cleanup code here
00039
00040 }
00041
00042 void CContainerItem::InvalidateItem()
00043 {
00044   GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_ITEM, this);
00045 }
00046
00047 void CContainerItem::UpdateFromServerExtent()
00048 {
00049   CSize size;
00050   if (GetCachedExtent(&size))
00051   {
00052     // OLE returns the extent in HIMETRIC units -- we need pixels
00053     CClientDC dc(NULL);
00054     dc.HIMETRICtoDP(&size);
00055
00056     // Only invalidate if it has actually changed, and also
00057     // only if it is not in-place active.  When in-place active, the
00058     // container item size should sync with the "window size" of the
00059     // object.  Only when not in-place active should the container
00060     // item size should sync with the natural size of the object.
00061
00062     if ((size != m_rect.Size()) && !IsInPlaceActive())
00063     {
00064       // invalidate old, update, invalidate new
00065       InvalidateItem();
00066       m_rect.bottom = m_rect.top + size.cy;
00067       m_rect.right = m_rect.left + size.cx;
00068       InvalidateItem();
00069
00070       // mark document as modified
00071       GetDocument()->SetModifiedFlag();
00072     }
00073   }
00074 }
00075
00076 void CContainerItem::OnChange(OLE_NOTIFICATION nCode, DWORD dwParam)
00077 {
00078   ASSERT_VALID(this);
00079
00080   COleClientItem::OnChange(nCode, dwParam);
00081
00082   // When an item is being edited (either in-place or fully open)
00083   //  it sends OnChange notifications for changes in the state of the
00084   //  item or visual appearance of its content.
00085   switch (nCode)
00086   {
00087   case OLE_CHANGED:
00088     InvalidateItem();
00089     UpdateFromServerExtent();
00090     break;
00091   case OLE_CHANGED_STATE:
00092   case OLE_CHANGED_ASPECT:
00093     InvalidateItem();
00094     break;
00095   }
00096
00097 }
00098
00099 BOOL CContainerItem::OnChangeItemPosition(const CRect& rectPos)
00100 {
00101   ASSERT_VALID(this);
00102
00103   // During in-place activation CContainerItem::OnChangeItemPosition
00104   //  is called by the server to change the position of the in-place
00105   //  window.  Usually, this is a result of the data in the server
00106   //  document changing such that the extent has changed or as a result
00107   //  of in-place resizing.
00108   //
00109   // The default here is to call the base class, which will call
00110   //  COleClientItem::SetItemRects to move the item
00111   //  to the new position.
00112
00113   if (!COleClientItem::OnChangeItemPosition(rectPos))
00114     return FALSE;
00115   InvalidateItem();
00116   m_rect = rectPos;
00117   InvalidateItem();
00118
00119   // mark document as dirty
00120   GetDocument()->SetModifiedFlag();
00121
00122   return TRUE;
00123 }
00124
00125 void CContainerItem::OnGetItemPosition(CRect& rPosition)
00126 {
00127   ASSERT_VALID(this);
00128   // return rect relative to client area of view
00129   rPosition = m_rect;
00130 }
00131
00132 void CContainerItem::OnActivate()
00133 {
00134   // allow only one inplace active item per frame
00135   CView* pView = GetActiveView();
00136   ASSERT_VALID(pView);
00137   COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
00138   if (pItem != NULL && pItem != this)
00139     pItem->Close();
00140
00141   COleClientItem::OnActivate();
00142 }
00143
00144 void CContainerItem::OnDeactivateUI(BOOL bUndoable)
00145 {
00146   COleClientItem::OnDeactivateUI(bUndoable);
00147
00148   // hide the object if it is not an outside-in object
00149   DWORD dwMisc = 0;
00150   m_lpObject->GetMiscStatus(GetDrawAspect(), &dwMisc);
00151   if (dwMisc & OLEMISC_INSIDEOUT)
00152     DoVerb(OLEIVERB_HIDE, NULL);
00153 }
00154
00155 void CContainerItem::Serialize(CArchive& ar)
00156 {
00157   ASSERT_VALID(this);
00158
00159   // Call base class first to read in COleClientItem data.
00160   // Since this sets up the m_pDocument pointer returned from
00161   //  CContainerItem::GetDocument, it is a good idea to call
00162   //  the base class Serialize first.
00163   COleClientItem::Serialize(ar);
00164
00165   // now store/retrieve data specific to CContainerItem
00166   if (ar.IsStoring())
00167   {
00168     // TODO: add storing code here
00169     ar << m_rect;
00170   }
00171   else
00172   {
00173     // TODO: add loading code here
00174     ar >> m_rect;
00175   }
00176 }
00177
00178 /////////////////////////////////////////////////////////////////////////////
00179 // CContainerItem diagnostics
00180
00181 #ifdef _DEBUG
00182 void CContainerItem::AssertValid() const
00183 {
00184   COleClientItem::AssertValid();
00185 }
00186
00187 void CContainerItem::Dump(CDumpContext& dc) const
00188 {
00189   COleClientItem::Dump(dc);
00190 }
00191 #endif
00192
00193 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/MyToolTipCtrl.cpp Source File

  • vc2008fp
  • ToolTipDemo

MyToolTipCtrl.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TooltipDemo.h"
00013 #include "MyToolTipCtrl.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CMyToolTipCtrl
00023
00024 IMPLEMENT_DYNCREATE(CMyToolTipCtrl, CMFCToolTipCtrl)
00025
00026 CMyToolTipCtrl::CMyToolTipCtrl()
00027 {
00028   m_hIcon = (HICON) ::LoadImage (
00029       AfxGetResourceHandle (),
00030       MAKEINTRESOURCE (IDI_ICON1),
00031       IMAGE_ICON,
00032       afxGlobalData.m_sizeSmallIcon.cx,
00033       afxGlobalData.m_sizeSmallIcon.cy,
00034       LR_SHARED);
00035 }
00036
00037 CMyToolTipCtrl::~CMyToolTipCtrl()
00038 {
00039 }
00040
00041
00042 BEGIN_MESSAGE_MAP(CMyToolTipCtrl, CMFCToolTipCtrl)
00043   ON_WM_CREATE()
00044 END_MESSAGE_MAP()
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMyToolTipCtrl message handlers
00048
00049 int CMyToolTipCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
00050 {
00051   if (CMFCToolTipCtrl::OnCreate(lpCreateStruct) == -1)
00052     return -1;
00053
00054   // Override default parameters:
00055   m_Params.m_bRoundedCorners = TRUE;
00056
00057   return 0;
00058 }
00059
00060 CSize CMyToolTipCtrl::GetIconSize ()
00061 {
00062   if (m_pHotButton == NULL)
00063   {
00064     return CSize (0, 0);
00065   }
00066
00067   ASSERT_VALID (m_pHotButton);
00068
00069   if (m_pHotButton->m_nID == 0 ||
00070     m_pHotButton->m_nID == (UINT)-1)
00071   {
00072     return CSize (0, 0);
00073   }
00074
00075   return afxGlobalData.m_sizeSmallIcon;
00076 }
00077
00078 void CMyToolTipCtrl::SetDescription (const CString strDesrciption)
00079 {
00080   CMFCToolTipCtrl::SetDescription (strDesrciption);
00081
00082   if (m_pHotButton == NULL)
00083   {
00084     return;
00085   }
00086
00087   ASSERT_VALID (m_pHotButton);
00088
00089   if (m_pHotButton->m_nID == 0 ||
00090     m_pHotButton->m_nID == (UINT)-1)
00091   {
00092     return;
00093   }
00094
00095   m_strDescription.Format (
00096     _T("This is a custom description text for toolbar/menu button with ID = %d.."),
00097     m_pHotButton->m_nID);
00098 }
00099
00100 void CMyToolTipCtrl::OnFillBackground (CDC* pDC, CRect rect, COLORREF& clrText, COLORREF& clrLine)
00101 {
00102   ASSERT_VALID (pDC);
00103
00104   CDrawingManager dm (*pDC);
00105
00106   dm.FillGradient2 (rect,
00107     RGB (104, 165, 225), RGB (37, 92, 222), 45);
00108
00109   clrLine = RGB (113, 166, 246);
00110   clrText = RGB (255, 255, 255);
00111 }
00112
00113 BOOL CMyToolTipCtrl::OnDrawIcon (CDC* pDC, CRect rectImage)
00114 {
00115   if (m_pHotButton == NULL)
00116   {
00117     return FALSE;
00118   }
00119
00120   ASSERT_VALID (m_pHotButton);
00121
00122   if (m_pHotButton->m_nID == 0 ||
00123     m_pHotButton->m_nID == (UINT)-1)
00124   {
00125     return FALSE;
00126   }
00127
00128   ASSERT_VALID (pDC);
00129
00130   ::DrawIconEx (pDC->GetSafeHdc (),
00131     rectImage.left, rectImage.top, m_hIcon,
00132     0, 0, 0, NULL, DI_NORMAL);
00133
00134   return TRUE;
00135 }
00136
00137 void CMyToolTipCtrl::OnDrawSeparator (CDC* pDC, int x1, int x2, int y)
00138 {
00139   ASSERT_VALID (pDC);
00140
00141   CDrawingManager dm (*pDC);
00142   CRect rect (x1, y, x2, y + 1);
00143
00144   dm.FillGradient (rect,
00145     RGB (255, 201, 109), RGB (255, 247, 225), FALSE);
00146 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CItemData Member List

This is the complete list of members for CItemData, including all inherited members.
CItemData(const TCHAR *pstrText, LPFONTDISP lpFontDisp, LPPICTUREDISP lpPicDisp) | CItemData |
GetBackColor() | CItemData |
GetFont() | CItemData |
GetForeColor() | CItemData |
GetPicture() | CItemData |
GetText(LPTSTR buffer, short szBuffer) | CItemData |
pBack | CItemData | [protected]
pFontHolder | CItemData | [protected]
pFore | CItemData | [protected]
pPicHolder | CItemData | [protected]
pText | CItemData | [protected]
SetBackColor(OLE_COLOR *newValue) | CItemData |
SetFont(LPFONTDISP newValue) | CItemData |
SetForeColor(OLE_COLOR *newValue) | CItemData |
SetPicture(LPPICTUREDISP newValue) | CItemData |
SetText(const TCHAR *newValue) | CItemData |
~CItemData() | CItemData |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/push.h Source File

  • controls
  • push

push.h

Go to the documentation of this file.
00001 // push.h : main header file for PUSH.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #if !defined( __AFXCTL_H__ )
00014   #error include 'afxctl.h' before including this file
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CPushApp : See push.cpp for implementation.
00021
00022 class CPushApp : public COleControlModule
00023 {
00024 public:
00025   BOOL InitInstance();
00026   int ExitInstance();
00027 };
00028
00029 extern const GUID CDECL _tlid;
00030 extern const WORD _wVerMajor;
00031 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CClassTreeWnd Member List

This is the complete list of members for CClassTreeWnd, including all inherited members.
CClassTreeWnd() | CClassTreeWnd |
OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult) | CClassTreeWnd | [protected, virtual]
~CClassTreeWnd() | CClassTreeWnd | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawCliSearchHandler.h Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawCliSearchHandler.h

Go to the documentation of this file.
00001 // DrawCliSearchHandler.h : Declaration of the CDrawCliSearchHandler
00002
00003 #pragma once
00004 #include "resource.h"       // main symbols
00005
00006 #include <atlhandler.h>
00007 #include <atlhandlerimpl.h>
00008 #include "..\drawdoc.h"
00009
00010 #include "DrawClientHandlers_i.h"
00011
00012
00013 #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
00014 #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
00015 #endif
00016
00017
00018
00019 // CDrawCliSearchHandler
00020
00021 class ATL_NO_VTABLE CDrawCliSearchHandler :
00022   public CComObjectRootEx<CComSingleThreadModel>,
00023   public CComCoClass<CDrawCliSearchHandler, &CLSID_DrawCliSearchHandler>,
00024   public CSearchFilterImpl
00025 {
00026 public:
00027   CDrawCliSearchHandler()
00028   {
00029   }
00030
00031 DECLARE_REGISTRY_RESOURCEID(IDR_DRAWCLISEARCHHANDLER)
00032
00033 DECLARE_NOT_AGGREGATABLE(CDrawCliSearchHandler)
00034
00035 BEGIN_COM_MAP(CDrawCliSearchHandler)
00036   COM_INTERFACE_ENTRY(IPersistStream)
00037   COM_INTERFACE_ENTRY(IPersistFile)
00038   COM_INTERFACE_ENTRY(IFilter)
00039 END_COM_MAP()
00040
00041
00042
00043   DECLARE_PROTECT_FINAL_CONSTRUCT()
00044
00045   HRESULT FinalConstruct()
00046   {
00047     return S_OK;
00048   }
00049
00050   void FinalRelease()
00051   {
00052     CSearchFilterImpl::FinalRelease ();
00053   }
00054
00055 public:
00056   // IPersistStream implementation
00057   IFACEMETHODIMP GetClassID(CLSID* pClassID)
00058   {
00059     *pClassID = CLSID_DrawCliSearchHandler;
00060     return S_OK;
00061   };
00062
00063   DECLARE_DOCUMENT(CDrawDoc)
00064 };
00065
00066 OBJECT_ENTRY_AUTO(__uuidof(DrawCliSearchHandler), CDrawCliSearchHandler)
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibview.h Source File

  • general
  • diblook

dibview.h

Go to the documentation of this file.
00001 // dibview.h : interface of the CDibView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CDibView : public CScrollView
00013 {
00014 protected: // create from serialization only
00015   CDibView();
00016   DECLARE_DYNCREATE(CDibView)
00017
00018 // Attributes
00019 public:
00020   CDibDoc* GetDocument()
00021     {
00022       ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDibDoc)));
00023       return (CDibDoc*) m_pDocument;
00024     }
00025
00026 // Operations
00027 public:
00028
00029 // Implementation
00030 public:
00031   virtual ~CDibView();
00032   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00033
00034   virtual void OnInitialUpdate();
00035   virtual void OnActivateView(BOOL bActivate, CView* pActivateView,
00036           CView* pDeactiveView);
00037
00038   // Printing support
00039 protected:
00040   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CDibView)
00045   afx_msg void OnEditCopy();
00046   afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
00047   afx_msg void OnEditPaste();
00048   afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
00049   afx_msg LRESULT OnDoRealize(WPARAM wParam, LPARAM lParam);  // user message
00050   //}}AFX_MSG
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
00054 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmdoc.cpp Source File

  • general
  • dynamenu

dmdoc.cpp

Go to the documentation of this file.
00001 // dmdoc.cpp
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: implementation of the CDynaMenuDoc class
00013 //
00014 // Functions:
00015 //      Most of this file was generated by AppWizard.  The functions
00016 //      which contain code specific to this sample are:
00017 //
00018 //      CDynaMenuDoc::CDynaMenuDoc()         -- document constructor
00019 //      CDynaMenuDoc::DoSelectColor()        -- handle text color commands
00020 //      CDynaMenuDoc::DoUpdateSelectColor()  -- update text color UI objects
00021 //      CDynaMenuDoc::GetMessageString()     -- get status msg for color cmds
00022 //      CDynaMenuDoc::OnCmdMsg()             -- perform command routing
00023 //      CDynaMenuDoc::OnColorOptions()       -- display color options dialog
00024
00025 #include "stdafx.h"
00026 #include "dynamenu.h"
00027 #include "dmdoc.h"
00028 #include "coloropt.h"  // for CColorOptDlg
00029 #include "mdichild.h"  // for CDynaMDIChildWnd
00030
00031 #ifdef _DEBUG
00032 #undef THIS_FILE
00033 static char BASED_CODE THIS_FILE[] = __FILE__;
00034 #endif
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // This table defines the possible text colors which will be displayed in
00038 // the color options dialog.  The colors selected in the options dialog
00039 // for a document will appear on the Color submenu when that document is
00040 // active.
00041 //
00042 DynaMenuDef CDynaMenuDoc::m_aColorDef[NUM_TEXTCOLOR] =
00043 {
00044   { IDS_BLACK,    ID_COLOR1, RGB(0,   0, 0) },
00045   { IDS_RED,      ID_COLOR2, RGB(128, 0, 0) },
00046   { IDS_PURPLE,   ID_COLOR3, RGB(128, 0, 128) },
00047   { IDS_BLUE,     ID_COLOR4, RGB(0, 0, 128) },
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CDynaMenuDoc
00052
00053 IMPLEMENT_DYNCREATE(CDynaMenuDoc, CDocument)
00054
00055 BEGIN_MESSAGE_MAP(CDynaMenuDoc, CDocument)
00056   //{{AFX_MSG_MAP(CDynaMenuDoc)
00057   ON_COMMAND(ID_COLOR_OPTIONS, OnColorOptions)
00058   //}}AFX_MSG_MAP
00059 END_MESSAGE_MAP()
00060
00061 #define new DEBUG_NEW
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CDynaMenuDoc construction/destruction
00065
00066 CDynaMenuDoc::CDynaMenuDoc()
00067 {
00068   // Initialize document data.  Start out by allowing all possible
00069   // text colors and default to using the first one.
00070   m_iColor = 0;
00071   for (int i = 0; i < NUM_TEXTCOLOR; i++)
00072      m_abAllowColor[i] = TRUE;
00073 }
00074
00075 CDynaMenuDoc::~CDynaMenuDoc()
00076 {
00077 }
00078
00079 BOOL CDynaMenuDoc::OnNewDocument()
00080 {
00081   if (!CDocument::OnNewDocument())
00082     return FALSE;
00083
00084   // TODO: add reinitialization code here
00085   // (SDI documents will reuse this document)
00086
00087   return TRUE;
00088 }
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CDynaMenuDoc serialization
00092
00093 void CDynaMenuDoc::Serialize(CArchive& ar)
00094 {
00095   if (ar.IsStoring())
00096   {
00097     // TODO: add storing code here
00098   }
00099   else
00100   {
00101     // TODO: add loading code here
00102   }
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CDynaMenuDoc diagnostics
00107
00108 #ifdef _DEBUG
00109 void CDynaMenuDoc::AssertValid() const
00110 {
00111   CDocument::AssertValid();
00112 }
00113
00114 void CDynaMenuDoc::Dump(CDumpContext& dc) const
00115 {
00116   CDocument::Dump(dc);
00117 }
00118 #endif //_DEBUG
00119
00120 /////////////////////////////////////////////////////////////////////////////
00121 // CDynaMenuDoc implementation
00122
00123 //***********************************************************************
00124 // Function: CDynaMenuDoc::OnCmdMsg()
00125 //
00126 // Purpose:
00127 //    OnCmdMsg() is called by the framework to route and dispatch
00128 //    command messages and to handle the update of command
00129 //    user-interface objects.
00130 //
00131 //    Here we extend the standard command routing to intercept command
00132 //    messages with variable command IDs.  In this sample, the
00133 //    currently defined text color options are stored in
00134 //    CDynaMenuDoc::m_aColorDef.  Each element of this array contains
00135 //    the command ID associated with that color.  When a command ID
00136 //    is passed to this function, we search m_aColorDef for a matching
00137 //    command ID.  If one is found, we process the message.  Otherwise,
00138 //    we route the command to the standard OnCmdMsg processing.
00139 //
00140 // Parameters:
00141 //    nID           -- contains the command ID
00142 //    nCode         -- identifies the command notification code
00143 //    pExtra        -- used according to the value of nCode
00144 //    pHandlerInfo  -- if not NULL, filled in with pTarget and pmf
00145 //                     members of CMDHANDLERINFO structure, instead
00146 //                     of dispatching the command.  Typically NULL.
00147 //
00148 // Returns:
00149 //    nonzero if message handled, otherwise 0.
00150 //
00151 // Comments:
00152 //    See the documentation for CCmdTarget::OnCmdMsg() for further
00153 //    information.  Command routing is also discussed in tech note #21.
00154 //
00155 //***********************************************************************
00156 BOOL CDynaMenuDoc::OnCmdMsg(UINT nID, int nCode, void* pExtra,
00157               AFX_CMDHANDLERINFO* pHandlerInfo)
00158 {
00159   // If pHandlerInfo is NULL, then handle the message
00160   if (pHandlerInfo == NULL)
00161   {
00162     // Filter the commands sent to a text color menu option
00163     for (int i = NUM_TEXTCOLOR-1; i >= 0; i--)
00164     {
00165       if (nID == m_aColorDef[i].m_nID)
00166       {
00167         if (nCode == CN_COMMAND)
00168         {
00169           // Handle WM_COMMAND message
00170           DoSelectColor(i);
00171         }
00172         else if (nCode == CN_UPDATE_COMMAND_UI)
00173         {
00174           // Update UI element state
00175           DoUpdateSelectColor(i, (CCmdUI*)pExtra);
00176         }
00177         return TRUE;
00178       }
00179     }
00180   }
00181
00182   // If we didn't process the command, call the base class
00183   // version of OnCmdMsg so the message-map can handle the message
00184   return CDocument::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00185 }
00186
00187 //***********************************************************************
00188 // Function: CDynaMenuDoc::DoSelectColor()
00189 //
00190 // Purpose:
00191 //    DoSelectColor processes text color command messages for
00192 //    CDynaMenuDoc::OnCmdMsg(). It updates the document member variable
00193 //    m_iColor and calls UpdateAllViews() to redraw the document's
00194 //    views.
00195 //
00196 // Parameters:
00197 //    iColor -- index into CDynaMenuDoc::m_aColorDef for new
00198 //              color selection
00199 //
00200 // Returns:
00201 //    none.
00202 //
00203 // Comments:
00204 //    In the debug version, an assert is generated if the index is
00205 //    out of bounds or if the specified color is not currently
00206 //    enabled for the document.
00207 //
00208 //***********************************************************************
00209 void CDynaMenuDoc::DoSelectColor(int iColor)
00210 {
00211   ENSURE(iColor >= 0 && iColor < NUM_TEXTCOLOR);
00212   ASSERT(m_abAllowColor[iColor] == TRUE);
00213
00214   m_iColor = iColor;
00215   UpdateAllViews(NULL);
00216 }
00217
00218 //***********************************************************************
00219 // Function: CDynaMenuDoc::DoUpdateSelectColor()
00220 //
00221 // Purpose:
00222 //    DoUpdateSelectColor handled the updates to user-interface objects
00223 //    associated with text color command messages for
00224 //    CDynaMenuDoc::OnCmdMsg(). If the item is associated with the
00225 //    currently selected text color for the document, the item is checked.
00226 //
00227 // Parameters:
00228 //    iColor -- index into CDynaMenuDoc::m_aColorDef for new
00229 //              color selection
00230 //
00231 // Returns:
00232 //    none.
00233 //
00234 // Comments:
00235 //    In the debug version, an assert is generated if the index is
00236 //    out of bounds or if the item is disabled for the document.
00237 //
00238 //***********************************************************************
00239 void CDynaMenuDoc::DoUpdateSelectColor(int iColor, CCmdUI* pCmdUI)
00240 {
00241   ENSURE(iColor >= 0 && iColor < NUM_TEXTCOLOR);
00242   ASSERT(m_abAllowColor[iColor] == TRUE);
00243
00244   pCmdUI->SetCheck(m_iColor == iColor);
00245   pCmdUI->Enable(TRUE);
00246 }
00247
00248 //***********************************************************************
00249 // Function: CDynaMenuDoc::GetMessageString()
00250 //
00251 // Purpose:
00252 //    GetMessageString formats and returns a string containing the
00253 //    message text to display in a status bar for any of the color
00254 //    selection commands.
00255 //
00256 // Parameters:
00257 //    nID        -- command ID to get message for
00258 //    strMessage -- buffer to fill with message
00259 //
00260 // Returns:
00261 //    TRUE if nID is a color selection command ID, otherwise FALSE.
00262 //
00263 // Comments:
00264 //    If the function returns FALSE, strMessage is not changed
00265 //
00266 //***********************************************************************
00267 BOOL CDynaMenuDoc::GetMessageString(UINT nID, CString& strMessage)
00268 {
00269   for (int i = 0; i < NUM_TEXTCOLOR; i++)
00270   {
00271     if (m_aColorDef[i].m_nID == nID)
00272     {
00273       CString strColor;
00274       strColor.LoadString(m_aColorDef[i].m_nString);
00275       AfxFormatString1(strMessage, IDS_COLORHELPFMT, strColor);
00276       return TRUE;
00277     }
00278   }
00279   return FALSE;
00280 }
00281
00282
00283 /////////////////////////////////////////////////////////////////////////////
00284 // CDynaMenuDoc commands
00285
00286 //***********************************************************************
00287 // Function: CDynaMenuDoc::OnColorOptions()
00288 //
00289 // Purpose:
00290 //    OnColorOptions displays a dialog which allows the user to pick
00291 //    the text colors which should be displayed on the Color submenu
00292 //    when the document is active.
00293 //
00294 // Parameters:
00295 //    none.
00296 //
00297 // Returns:
00298 //    none.
00299 //
00300 // Comments:
00301 //    none.
00302 //
00303 //***********************************************************************
00304 void CDynaMenuDoc::OnColorOptions()
00305 {
00306   CColorOptDlg dlg(this);
00307   if (dlg.DoModal())
00308   {
00309     // find the MDI frame window associated with this document
00310     POSITION pos = GetFirstViewPosition();
00311     CView* pview = GetNextView(pos);
00312     ENSURE(pview != NULL);
00313
00314     CDynaMDIChildWnd* pwnd = (CDynaMDIChildWnd*)pview->GetParentFrame();
00315     ASSERT_KINDOF(CDynaMDIChildWnd, pwnd);
00316
00317     // force an update of the Color submenu
00318     pwnd->RefreshColorMenu();
00319   }
00320 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/targetver.h Source File

  • vc2008fp
  • DynamicMenu

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoBar.cpp Source File

  • vc2008fp
  • VisualStudioDemo

UndoBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "UndoBar.h"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 IMPLEMENT_SERIAL(CUndoBar, CMFCPopupMenuBar, 1)
00020
00021 const int ID_LIST = 1;
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CUndoBar
00025
00026 #pragma warning(disable: 4355)
00027 CUndoBar::CUndoBar() : m_wndList(*this), m_nLabelHeight(0)
00028 #pragma warning(default: 4355)
00029 {
00030   m_rectLabel.SetRectEmpty();
00031 }
00032
00033 CUndoBar::~CUndoBar()
00034 {
00035 }
00036
00037 BEGIN_MESSAGE_MAP(CUndoBar, CMFCPopupMenuBar)
00038   ON_WM_SIZE()
00039   ON_WM_CREATE()
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CUndoBar message handlers
00044
00045 void CUndoBar::OnFillBackground(CDC* pDC)
00046 {
00047   ASSERT_VALID(pDC);
00048
00049   CRect rectClient;
00050   GetClientRect(rectClient);
00051
00052   ::FillRect(pDC->GetSafeHdc(), &rectClient, ::GetSysColorBrush(COLOR_3DFACE));
00053
00054   // Draw label:
00055   pDC->Draw3dRect(m_rectLabel, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DHILIGHT));
00056
00057   CFont* pOldFont = pDC->SelectObject((CFont*) &CMFCMenuBar::GetMenuFont());
00058   pDC->SetBkMode(TRANSPARENT);
00059   pDC->SetTextColor(::GetSysColor(COLOR_BTNTEXT));
00060
00061   CRect rectText = m_rectLabel;
00062   rectText.DeflateRect(1, 1);
00063   pDC->DrawText(m_strLabel, rectText, DT_CENTER | DT_VCENTER);
00064
00065   pDC->SelectObject(pOldFont);
00066 }
00067
00068 CSize CUndoBar::CalcSize(BOOL /*bVertDock*/)
00069 {
00070   return CSize(160, 115);
00071 }
00072
00073 CUndoButton* CUndoBar::GetParentButton() const
00074 {
00075   // Get parent button:
00076   CUndoButton* pUndoButton = NULL;
00077
00078   CUndoMenu* pParentMenu = DYNAMIC_DOWNCAST(CUndoMenu, GetParent());
00079   if (pParentMenu != NULL)
00080   {
00081     pUndoButton = DYNAMIC_DOWNCAST(CUndoButton, pParentMenu->GetParentButton());
00082   }
00083
00084   return pUndoButton;
00085 }
00086
00087 void CUndoBar::OnSize(UINT nType, int cx, int cy)
00088 {
00089   const int nMargin = 5;
00090
00091   CMFCPopupMenuBar::OnSize(nType, cx, cy);
00092
00093   CRect rectClient;
00094   GetClientRect(rectClient);
00095
00096   rectClient.DeflateRect(nMargin, nMargin);
00097
00098   m_rectLabel = rectClient;
00099   m_rectLabel.top = m_rectLabel.bottom - m_nLabelHeight;
00100
00101   CRect rectList = rectClient;
00102   rectList.bottom = m_rectLabel.top - nMargin;
00103
00104   m_wndList.MoveWindow(rectList);
00105 }
00106
00107 int CUndoBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00108 {
00109   if (CMFCPopupMenuBar::OnCreate(lpCreateStruct) == -1)
00110     return -1;
00111
00112   CFont* pMenuFont = (CFont*) &CMFCMenuBar::GetMenuFont();
00113
00114   // Set label height:
00115   CClientDC dc(this);
00116   CFont* pOldFont = dc.SelectObject(pMenuFont);
00117
00118   TEXTMETRIC tm;
00119   dc.GetTextMetrics(&tm);
00120
00121   m_nLabelHeight = tm.tmHeight + 2;
00122
00123   dc.SelectObject(pOldFont);
00124
00125   CRect rectDummy(0, 0, 0, 0);
00126   m_wndList.Create(WS_VISIBLE | WS_CHILD | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | WS_VSCROLL | LBS_MULTIPLESEL, rectDummy, this, ID_LIST);
00127   m_wndList.ModifyStyleEx(0, WS_EX_CLIENTEDGE);
00128
00129   m_wndList.SetFont(pMenuFont);
00130
00131   CUndoButton* pUndoButton = GetParentButton();
00132   ASSERT_VALID(pUndoButton);
00133
00134   for (POSITION pos = pUndoButton->m_lstActions.GetHeadPosition(); pos != NULL;)
00135   {
00136     m_wndList.AddString(pUndoButton->m_lstActions.GetNext(pos));
00137   }
00138
00139   return 0;
00140 }
00141
00142 void CUndoBar::DoUndo()
00143 {
00144   CUndoButton* pUndoButton = GetParentButton();
00145   ASSERT_VALID(pUndoButton);
00146
00147   pUndoButton->m_nSelNum = m_wndList.GetSelCount() + 1;
00148
00149   CMDIChildWnd* pChildFrame = ((CMDIFrameWndEx*)GetTopLevelFrame())->MDIGetActive();
00150   if (pChildFrame)
00151   {
00152     CEditView* pView = DYNAMIC_DOWNCAST(CEditView, pChildFrame->GetActiveView());
00153     if (pView != NULL)
00154     {
00155       //pView->OnEditUndo(); TODO
00156     }
00157     else
00158     {
00159       ASSERT(FALSE);
00160     }
00161   }
00162   else
00163   {
00164     ASSERT(FALSE);
00165   }
00166
00167   GetParent()->PostMessage(WM_CLOSE);
00168 }
00169
00170 void CUndoBar::SetLabel(const CString& strLabel)
00171 {
00172   m_strLabel = strLabel;
00173
00174   if (GetSafeHwnd() != NULL)
00175   {
00176     InvalidateRect(m_rectLabel);
00177     UpdateWindow();
00178   }
00179 }
00180
00181 //////////////////////////////////////////////////////////////////////////////
00182 // CUndoButton
00183
00184 IMPLEMENT_SERIAL(CUndoButton, CMFCToolBarMenuButton, 1)
00185
00186 CMFCPopupMenu* CUndoButton::CreatePopupMenu()
00187 {
00188   if (CMFCToolBar::IsCustomizeMode() ||(m_nStyle & TBBS_DISABLED))
00189   {
00190     return NULL;
00191   }
00192
00193   CUndoMenu* pPopupMenu = new CUndoMenu;
00194
00195   ResetSelNum();
00196
00197 #if 0
00198   CMDIChildWnd* pChildFrame = ((CMDIFrameWndEx*)::AfxGetMainWnd())->MDIGetActive();
00199   if (pChildFrame)
00200   {
00201     CVisualStudioDemoView* pView = (CVisualStudioDemoView*)pChildFrame->GetActiveView();
00202
00203     if (pView && pView->IsKindOf(RUNTIME_CLASS(CVisualStudioDemoView)))
00204     {
00205       CDWordArray dwaUAT;
00206
00207       // Setup undo actions:
00208       switch (m_nID)
00209       {
00210       case ID_EDIT_UNDO:
00211         pView->GetUndoActions(m_lstActions);
00212
00213         break;
00214       case ID_EDIT_REDO:
00215         pView->GetRedoActions(m_lstActions);
00216
00217         break;
00218       default:
00219         break;
00220       }
00221     }
00222     else
00223     {
00224       ASSERT(FALSE);
00225       m_lstActions.RemoveAll();
00226     }
00227   }
00228   else
00229   {
00230     ASSERT(FALSE);
00231     m_lstActions.RemoveAll();
00232   }
00233 #endif
00234
00235   return pPopupMenu;
00236 }
00237
00238 //////////////////////////////////////////////////////////////////////////////
00239 // CUndoMenu
00240
00241 IMPLEMENT_SERIAL(CUndoMenu, CMFCPopupMenu, 1)
00242
00243 BEGIN_MESSAGE_MAP(CUndoMenu, CMFCPopupMenu)
00244   ON_WM_CREATE()
00245 END_MESSAGE_MAP()
00246
00247 int CUndoMenu::OnCreate(LPCREATESTRUCT lpCreateStruct)
00248 {
00249   if (CMiniFrameWnd::OnCreate(lpCreateStruct) == -1)
00250     return -1;
00251
00252   DWORD toolbarStyle = AFX_DEFAULT_TOOLBAR_STYLE;
00253   if (m_AnimationType != NO_ANIMATION && !CMFCToolBar::IsCustomizeMode())
00254   {
00255     toolbarStyle &= ~WS_VISIBLE;
00256   }
00257
00258   if (!m_wndUndoBar.Create(this, toolbarStyle | CBRS_TOOLTIPS | CBRS_FLYBY, 1))
00259   {
00260     TRACE(_T("Can't create popup menu bar\n"));
00261     return -1;
00262   }
00263
00264   CWnd* pWndParent = GetParent();
00265   ASSERT_VALID(pWndParent);
00266
00267   m_wndUndoBar.SetOwner(pWndParent);
00268   m_wndUndoBar.SetPaneStyle(m_wndUndoBar.GetPaneStyle() | CBRS_TOOLTIPS);
00269
00270   ActivatePopupMenu(GetTopLevelFrame(), this);
00271   RecalcLayout();
00272
00273   return 0;
00274 }
00275
00276
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/enumvar.cpp Source File

  • ole
  • inproc

enumvar.cpp

Go to the documentation of this file.
00001 // enumvar.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "inproc.h"
00014 #include "enumvar.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CEnumVariant
00023
00024 IMPLEMENT_DYNCREATE(CEnumVariant, CCmdTarget)
00025
00026 CEnumVariant::CEnumVariant()
00027 {
00028   m_nIndex = 0;
00029   m_nCount = 0;
00030   m_pContents = NULL;
00031
00032   m_pClonedFrom = NULL;
00033
00034   // To keep the application running as long as an OLE automation
00035   //  object is active, the constructor calls AfxOleLockApp.
00036
00037   AfxOleLockApp();
00038 }
00039
00040 CEnumVariant::~CEnumVariant()
00041 {
00042   if (m_pClonedFrom != NULL)
00043   {
00044     m_pClonedFrom->ExternalRelease();
00045   }
00046   else
00047   {
00048     for (int i = 0; i < m_nCount; ++i)
00049       VariantClear(&m_pContents[i]);
00050     delete[] m_pContents;
00051   }
00052
00053   // To terminate the application when all objects created with
00054   //  with OLE automation, the destructor calls AfxOleUnlockApp.
00055
00056   AfxOleUnlockApp();
00057 }
00058
00059 void CEnumVariant::OnFinalRelease()
00060 {
00061   // When the last reference for an automation object is released
00062   //  OnFinalRelease is called.  This implementation deletes the
00063   //  object.  Add additional cleanup required for your object before
00064   //  deleting it from memory.
00065
00066   delete this;
00067 }
00068
00069 void CEnumVariant::SetContents(VARIANT* pContents, int nCount, int nIndex)
00070 {
00071   ASSERT(nIndex < nCount);
00072   ASSERT(nCount == 0 || pContents != NULL);
00073   ASSERT(pContents == NULL ||
00074     AfxIsValidAddress(pContents, sizeof(VARIANT)*nCount, FALSE));
00075
00076   m_nCount = nCount;
00077   m_pContents = pContents;
00078   m_nIndex = nIndex;
00079 }
00080
00081 BEGIN_MESSAGE_MAP(CEnumVariant, CCmdTarget)
00082   //{{AFX_MSG_MAP(CEnumVariant)
00083     // NOTE - the ClassWizard will add and remove mapping macros here.
00084   //}}AFX_MSG_MAP
00085 END_MESSAGE_MAP()
00086
00087 /////////////////////////////////////////////////////////////////////////////
00088 // CEnumVariant interfaces
00089
00090 static void CopyVariantArray(VARIANT* pDest, VARIANT* pSrc, int nCount)
00091 {
00092   int i;
00093   for (i = 0; i < nCount; ++i)
00094     VariantInit(&pDest[i]);
00095   for (i = 0; i < nCount; ++i)
00096   {
00097     SCODE sc = GetScode(VariantCopy(&pDest[i], &pSrc[i]));
00098     if (sc != NOERROR)
00099     {
00100       while (--i >= 0)
00101         VariantClear(&pDest[i]);
00102       AfxThrowMemoryException();
00103     }
00104   }
00105 }
00106
00107 BEGIN_INTERFACE_MAP(CEnumVariant, CCmdTarget)
00108   INTERFACE_PART(CEnumVariant, IID_IEnumVARIANT, EnumVARIANT)
00109 END_INTERFACE_MAP()
00110
00111 STDMETHODIMP_(ULONG) CEnumVariant::XEnumVARIANT::AddRef()
00112 {
00113   METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
00114   return pThis->ExternalAddRef();
00115 }
00116
00117 STDMETHODIMP_(ULONG) CEnumVariant::XEnumVARIANT::Release()
00118 {
00119   METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
00120   return pThis->ExternalRelease();
00121 }
00122
00123 STDMETHODIMP CEnumVariant::XEnumVARIANT::QueryInterface(REFIID iid, void** ppvObj)
00124 {
00125   METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
00126   return (HRESULT)pThis->ExternalQueryInterface(&iid, ppvObj) ;
00127 }
00128
00129 STDMETHODIMP CEnumVariant::XEnumVARIANT::Next(ULONG celt, VARIANT* rgvar, ULONG* pceltFetched)
00130 {
00131   METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
00132
00133   ASSERT(celt > 0);
00134   ASSERT(celt == 1 || pceltFetched != NULL);
00135
00136   if (pceltFetched != NULL)
00137     *pceltFetched = 0;
00138
00139   int nFetched = min(pThis->m_nCount - pThis->m_nIndex, (int)celt);
00140
00141   TRY
00142   {
00143     CopyVariantArray(rgvar, pThis->m_pContents + pThis->m_nIndex, nFetched);
00144   }
00145   CATCH_ALL(e)
00146   {
00147     return E_OUTOFMEMORY;
00148   }
00149   END_CATCH_ALL
00150
00151   pThis->m_nIndex += nFetched;
00152   if (pceltFetched != NULL)
00153     *pceltFetched = nFetched;
00154
00155   return nFetched == (int)celt ? NOERROR : S_FALSE;
00156 }
00157
00158 STDMETHODIMP CEnumVariant::XEnumVARIANT::Skip(unsigned long celt)
00159 {
00160   METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
00161
00162   int nSkip = (int)celt;
00163   if (nSkip + pThis->m_nIndex > pThis->m_nCount)
00164     nSkip = pThis->m_nCount - pThis->m_nIndex;
00165   pThis->m_nIndex += nSkip;
00166
00167   return nSkip == (int)celt ? NOERROR : S_FALSE;
00168 }
00169
00170 STDMETHODIMP CEnumVariant::XEnumVARIANT::Reset()
00171 {
00172   METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
00173
00174   pThis->m_nIndex = 0;
00175
00176   return NOERROR;
00177 }
00178
00179 STDMETHODIMP CEnumVariant::XEnumVARIANT::Clone(IEnumVARIANT** ppenum)
00180 {
00181   METHOD_PROLOGUE(CEnumVariant, EnumVARIANT)
00182
00183   CEnumVariant* pClone;
00184   TRY
00185   {
00186     #pragma warning (suppress: 6014)
00187     pClone = new CEnumVariant;
00188     pClone->SetContents(pThis->m_pContents, pThis->m_nCount, pThis->m_nIndex);
00189
00190     pClone->m_pClonedFrom = pThis;
00191     pThis->ExternalAddRef();
00192   }
00193   CATCH_ALL(e)
00194   {
00195     return E_OUTOFMEMORY;
00196   }
00197   END_CATCH_ALL
00198   *ppenum = &pClone->m_xEnumVARIANT;
00199
00200   return NOERROR;
00201 }
00202
00203 /////////////////////////////////////////////////////////////////////////////
00204 // CEnumVariant message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/rectdlg.h Source File

  • ole
  • drawcli

rectdlg.h

Go to the documentation of this file.
00001 // rectdlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CRectDlg dialog
00015
00016 class CRectDlg : public CPropertyPage
00017 {
00018 // Construction
00019 public:
00020   CRectDlg(CWnd* pParent = NULL); // standard constructor
00021
00022 // Dialog Data
00023   //{{AFX_DATA(CRectDlg)
00024   enum { IDD = IDD_PROP_RECT };
00025   CSpinButtonCtrl m_SpinCtrl;
00026   BOOL    m_bNoFill;
00027   UINT    m_penSize;
00028   //}}AFX_DATA
00029
00030 // Implementation
00031 protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033
00034   // Generated message map functions
00035   //{{AFX_MSG(CRectDlg)
00036   virtual BOOL OnInitDialog();
00037   //}}AFX_MSG
00038   DECLARE_MESSAGE_MAP()
00039 };
00040
00041 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/OutputBar.cpp Source File

  • vc2008fp
  • RibbonGadgets

OutputBar.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "ribbongadgets.h"
00014 #include "OutputBar.h"
00015
00016 #include "../src/mfc/AfxImpl.h"
00017
00018 #include <memory>
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // COutputBar
00028
00029 COutputBar::COutputBar()
00030 {
00031 }
00032
00033 COutputBar::~COutputBar()
00034 {
00035 }
00036
00037
00038 BEGIN_MESSAGE_MAP(COutputBar, CDockablePane)
00039   ON_WM_CREATE()
00040   ON_WM_SIZE()
00041   ON_WM_DESTROY()
00042   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00043   ON_COMMAND(ID_FILE_SAVE_AS, OnFileSaveAs)
00044   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00045 END_MESSAGE_MAP()
00046
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // COutputBar message handlers
00050
00051 int COutputBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00052 {
00053   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00054     return -1;
00055
00056   // Create tabs window:
00057   if (!m_wndTabs.Create (CMFCTabCtrl::STYLE_FLAT, CRect (0, 0, 0, 0), this, 1))
00058   {
00059     TRACE0("Failed to create output tab window\n");
00060     return -1;      // fail to create
00061   }
00062
00063   // Create toolbar:
00064   m_wndTabs.SetFlatFrame (FALSE, FALSE);
00065   m_wndTabs.AutoDestroyWindow (FALSE);
00066
00067   m_wndToolBar.Create (this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_CODE);
00068   m_wndToolBar.LoadToolBar (IDR_CODE, 0, 0, TRUE /* Is locked */);
00069
00070   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() |
00071     CBRS_TOOLTIPS | CBRS_FLYBY);
00072
00073   m_wndToolBar.SetPaneStyle (
00074     m_wndToolBar.GetPaneStyle () &
00075       ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00076
00077   m_wndToolBar.SetOwner (this);
00078
00079   // All commands will be routed via this control , not via the parent frame:
00080   m_wndToolBar.SetRouteCommandsViaFrame (FALSE);
00081
00082   m_Font.CreateFont
00083     (
00084       -12, 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET,
00085       OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
00086       DEFAULT_PITCH, _T("Courier")
00087     );
00088
00089   return 0;
00090 }
00091
00092 void COutputBar::OnSize(UINT nType, int cx, int cy)
00093 {
00094   CDockablePane::OnSize(nType, cx, cy);
00095
00096   CRect rectClient,rectCombo;
00097   GetClientRect (rectClient);
00098
00099   int cyTlb = m_wndToolBar.CalcFixedLayout (FALSE, TRUE).cy;
00100
00101   m_wndToolBar.SetWindowPos (NULL,
00102                  rectClient.left,
00103                  rectClient.top,
00104                  rectClient.Width (),
00105                  cyTlb,
00106                  SWP_NOACTIVATE | SWP_NOZORDER);
00107
00108   m_wndTabs.SetWindowPos (NULL, rectClient.left, rectClient.top + cyTlb,
00109     rectClient.Width (), rectClient.Height () - cyTlb,
00110     SWP_NOACTIVATE | SWP_NOZORDER);
00111 }
00112
00113 void COutputBar::ClearTabs ()
00114 {
00115   for (int i = 0; i < m_wndTabs.GetTabsNum (); i++)
00116   {
00117     CWnd* pWnd = m_wndTabs.GetTabWnd (i);
00118     pWnd->DestroyWindow ();
00119     delete pWnd;
00120   }
00121
00122   m_wndTabs.RemoveAllTabs ();
00123 }
00124
00125 void COutputBar::AddTab (LPCTSTR lpszName, UINT nID)
00126 {
00127   std::auto_ptr<CEdit> apWndEdit(new CEdit ());
00128
00129   apWndEdit->Create (WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
00130     ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL,
00131     CRect (0, 0, 0, 0), &m_wndTabs, 1);
00132   apWndEdit->SetReadOnly ();
00133   apWndEdit->SetFont (m_Font.GetSafeHandle () == NULL ? &afxGlobalData.fontRegular : &m_Font);
00134
00135   if (nID != 0)
00136   {
00137     LPCTSTR lpszResourceName = MAKEINTRESOURCE (nID);
00138     ASSERT(lpszResourceName != NULL);
00139
00140     HINSTANCE hInst = AfxFindResourceHandle (lpszResourceName, _T("CODE"));
00141     HRSRC hRsrc = ::FindResource (hInst, lpszResourceName, _T("CODE"));
00142
00143     if (hRsrc == NULL)
00144     {
00145       ASSERT(FALSE);
00146     }
00147     else
00148     {
00149       DWORD dwSize = SizeofResource (hInst, hRsrc);
00150       HGLOBAL hGlobal = NULL;
00151       if (dwSize != NULL)
00152       {
00153         hGlobal = LoadResource (hInst, hRsrc);
00154       }
00155
00156       if (hGlobal == NULL)
00157       {
00158         ASSERT(FALSE);
00159       }
00160       else
00161       {
00162         TCHAR* lpszText = new TCHAR[dwSize + 1];
00163         LPCSTR lpszResourceText = (LPCSTR)LockResource(hGlobal);
00164 #ifdef UNICODE
00165         MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, lpszResourceText, dwSize, lpszText, dwSize);
00166 #else
00167         memcpy (lpszText, lpszResourceText, dwSize);
00168 #endif
00169         lpszText[dwSize] = 0;
00170
00171         if (lpszText == NULL)
00172         {
00173           ASSERT(FALSE);
00174         }
00175         else
00176         {
00177           apWndEdit->SetWindowText(lpszText);
00178           delete[] lpszText;
00179         }
00180
00181         UnlockResource(hGlobal);
00182         FreeResource(hGlobal);
00183       }
00184     }
00185   }
00186
00187   m_wndTabs.AddTab (apWndEdit.release(), lpszName, (UINT)-1, FALSE);
00188 }
00189
00190 void COutputBar::OnDestroy()
00191 {
00192   ClearTabs ();
00193   CDockablePane::OnDestroy();
00194 }
00195
00196 void COutputBar::OnEditCopy()
00197 {
00198   CEdit* pWndEdit = (CEdit*) m_wndTabs.GetActiveWnd ();
00199   ASSERT_VALID (pWndEdit);
00200
00201   pWndEdit->Copy ();
00202 }
00203
00204 void ErrorReport (LPCTSTR lpszPathName, CException* e)
00205 {
00206   UINT nIDP = 0;
00207   UINT nHelpContext = 0;
00208   CString prompt;
00209
00210   if (e->IsKindOf(RUNTIME_CLASS(CFileException)))
00211   {
00212     TRACE(traceAppMsg, 0, "Reporting file I/O exception on save with lOsError = $%lX.\n",
00213       ((CFileException*)e)->m_lOsError);
00214
00215     CFileException* pFileException = (CFileException*)e;
00216     if (pFileException->m_strFileName.IsEmpty())
00217     {
00218       pFileException->m_strFileName = lpszPathName;
00219     }
00220
00221     LPTSTR lpszMessage = prompt.GetBuffer(255);
00222     ASSERT(lpszMessage != NULL);
00223     if (!e->GetErrorMessage(lpszMessage, 256, &nHelpContext))
00224     {
00225       switch (((CFileException*)e)->m_cause)
00226       {
00227         case CFileException::fileNotFound:
00228         case CFileException::badPath:
00229           nIDP = AFX_IDP_FAILED_INVALID_PATH;
00230           break;
00231         case CFileException::diskFull:
00232           nIDP = AFX_IDP_FAILED_DISK_FULL;
00233           break;
00234         case CFileException::accessDenied:
00235           nIDP = AFX_IDP_FAILED_ACCESS_WRITE;
00236           break;
00237
00238         case CFileException::badSeek:
00239         case CFileException::genericException:
00240         case CFileException::tooManyOpenFiles:
00241         case CFileException::invalidFile:
00242         case CFileException::hardIO:
00243         case CFileException::directoryFull:
00244           break;
00245
00246         default:
00247           break;
00248       }
00249     }
00250     prompt.ReleaseBuffer();
00251   }
00252
00253   if (prompt.IsEmpty())
00254   {
00255     TCHAR szTitle[_MAX_PATH];
00256     AfxGetFileTitle(lpszPathName, szTitle, _countof(szTitle));
00257
00258     if (nIDP != 0)
00259     {
00260       AfxFormatString1(prompt, nIDP, szTitle);
00261     }
00262     else
00263     {
00264       prompt.Format (_T("Failed to save file: %s."), szTitle);
00265     }
00266   }
00267
00268   AfxMessageBox(prompt, MB_ICONEXCLAMATION, nHelpContext);
00269 }
00270
00271 void COutputBar::OnFileSaveAs()
00272 {
00273   CEdit* pWndEdit = (CEdit*) m_wndTabs.GetActiveWnd ();
00274   ASSERT_VALID (pWndEdit);
00275
00276   CString strText;
00277   pWndEdit->GetWindowText (strText);
00278   if (strText.IsEmpty ())
00279   {
00280     return;
00281   }
00282
00283   CFileDialog dlgFile(FALSE, _T("txt"), _T("Code.txt"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("Text Documents (*.txt)|*.txt||"));
00284   if (dlgFile.DoModal() != IDOK)
00285   {
00286     return;
00287   }
00288
00289   CString strPathName (dlgFile.GetPathName ());
00290
00291   CFileException fe;
00292   CFile file;
00293   if (file.Open(strPathName, CFile::modeCreate |
00294           CFile::modeWrite | CFile::shareExclusive, &fe))
00295   {
00296     TRY
00297     {
00298       CWaitCursor wait;
00299       file.Write((LPCTSTR)strText, strText.GetLength () * sizeof(TCHAR));
00300       file.Close ();
00301     }
00302     CATCH_ALL(e)
00303     {
00304       file.Abort ();
00305       ErrorReport (strPathName, e);
00306       do { e->Delete(); } while (0);
00307     }
00308     END_CATCH_ALL
00309   }
00310   else
00311   {
00312     ErrorReport (strPathName, &fe);
00313   }
00314 }
00315
00316 void COutputBar::OnFilePrint()
00317 {
00318   CEdit* pWndEdit = (CEdit*) m_wndTabs.GetActiveWnd ();
00319   ASSERT_VALID (pWndEdit);
00320
00321   CString strText;
00322   pWndEdit->GetWindowText (strText);
00323   if (strText.IsEmpty ())
00324   {
00325     return;
00326   }
00327
00328     CDC dc;
00329     CPrintDialog printDlg(FALSE);
00330
00331     if (printDlg.DoModal() == IDCANCEL)
00332   {
00333         return;
00334   }
00335
00336     dc.Attach(printDlg.GetPrinterDC());
00337     dc.m_bPrinting = TRUE;
00338
00339     DOCINFO di;
00340     ::ZeroMemory (&di, sizeof (DOCINFO));
00341     di.cbSize = sizeof (DOCINFO);
00342     di.lpszDocName = _T("code");
00343
00344     BOOL bPrintingOK = dc.StartDoc(&di);
00345
00346   if (bPrintingOK)
00347   {
00348     CFont* pFont = pWndEdit->GetFont ();
00349     ASSERT_VALID (pFont);
00350
00351     LOGFONT lf;
00352     pFont->GetLogFont (&lf);
00353     lf.lfHeight = -::MulDiv (abs(lf.lfHeight), dc.GetDeviceCaps(LOGPIXELSY), 72);
00354
00355     CFont font;
00356     if (font.CreateFontIndirect (&lf))
00357     {
00358       CFont* pOldFont = (CFont*)dc.SelectObject (&font);
00359
00360       CRect rect (0, 0,dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
00361       dc.DrawText (strText, rect, DT_WORDBREAK | DT_EXPANDTABS | DT_NOPREFIX);
00362
00363       if (pOldFont != NULL)
00364       {
00365         dc.SelectObject (pOldFont);
00366       }
00367
00368       dc.EndDoc();
00369     }
00370     else
00371     {
00372       bPrintingOK = FALSE;
00373     }
00374   }
00375
00376   if (!bPrintingOK)
00377   {
00378     dc.AbortDoc();
00379   }
00380
00381     dc.DeleteDC();
00382 }
00383
00384
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIViewersApp Member List

This is the complete list of members for CIViewersApp, including all inherited members.
CIViewersApp() | CIViewersApp |
ExitInstance() | CIViewersApp | [virtual]
InitInstance() | CIViewersApp | [virtual]
OnAppAbout() | CIViewersApp |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/optionsh.h Source File

  • ole
  • wordpad

optionsh.h

Go to the documentation of this file.
00001 // optionsh.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // COptionSheet
00014
00015 class COptionSheet : public CCSPropertySheet
00016 {
00017 // Construction
00018 public:
00019   COptionSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00020
00021 // Attributes
00022 public:
00023   CUnitsPage units;
00024   CDocOptPage pageText;
00025   CDocOptPage pageRTF;
00026   CDocOptPage pageWord;
00027   CDocOptPage pageWrite;
00028   CEmbeddedOptPage pageEmbedded;
00029
00030 // Operations
00031 public:
00032   INT_PTR DoModal();
00033   void SetPageButtons(CDocOptPage& page, CDockState& ds);
00034   void SetState(CDocOptPage& page, CDockState& ds);
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(COptionSheet)
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 public:
00043
00044   // Generated message map functions
00045 protected:
00046   //{{AFX_MSG(COptionSheet)
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ChildView.h Source File

  • advanced
  • DllScreenCap
  • ScreenCap

ChildView.h

Go to the documentation of this file.
00001 // ChildView.h : interface of the CChildView class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #pragma once
00012 #include <AtlImage.h>
00013
00014 // CChildView window
00015
00016 class CChildView : public CWnd
00017 {
00018 // Construction
00019 public:
00020   CChildView();
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027   void SetImage(const CString &strPath);
00028
00029 // Overrides
00030   protected:
00031   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00032
00033 // Implementation
00034 public:
00035   virtual ~CChildView();
00036
00037   // Generated message map functions
00038 protected:
00039   afx_msg void OnPaint();
00040   DECLARE_MESSAGE_MAP()
00041
00042 // Data
00043 private:
00044   CImage  m_image;
00045 public:
00046   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00047 };
00048
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemoView.h Source File

  • vc2008fp
  • StatusBarDemo

StatusBarDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "MainFrm.h"
00014
00015 class CStatusBarDemoView : public CFormView
00016 {
00017 protected: // create from serialization only
00018   CStatusBarDemoView();
00019   DECLARE_DYNCREATE(CStatusBarDemoView)
00020
00021 public:
00022   enum { IDD = IDD_STATUSBARDEMO_FORM };
00023   CMFCColorButton m_wndTextColor;
00024   CMFCColorButton m_wndBackColor;
00025   CButton     m_wndStartAnimation;
00026   CButton     m_wndStartProgress;
00027   int       m_nIcon;
00028
00029 // Attributes
00030 public:
00031   CStatusBarDemoDoc* GetDocument();
00032
00033 // Operations
00034 public:
00035
00036 // Overrides
00037   public:
00038   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   virtual void OnInitialUpdate(); // called first time after construct
00042   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00043   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00044   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00045   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00046
00047 // Implementation
00048 public:
00049   virtual ~CStatusBarDemoView();
00050 #ifdef _DEBUG
00051   virtual void AssertValid() const;
00052   virtual void Dump(CDumpContext& dc) const;
00053 #endif
00054
00055 protected:
00056   afx_msg void OnStartProgress();
00057   afx_msg void OnStartAnimation();
00058   afx_msg void OnIcon();
00059   afx_msg void OnBackColor();
00060   afx_msg void OnTextColor();
00061   afx_msg void OnTimer(UINT_PTR nIDEvent);
00062   afx_msg void OnContextMenu(CWnd*, CPoint point);
00063   afx_msg void OnFilePrintPreview();
00064   afx_msg void OnIndicatorLabel();
00065
00066   DECLARE_MESSAGE_MAP()
00067
00068   CMFCStatusBar& GetStatusBar () const
00069   {
00070     return ((CMainFrame*) AfxGetMainWnd ())->GetStatusBar ();
00071   }
00072
00073   int     m_nProgressCurr;
00074   BOOL    m_bInProgress;
00075
00076   CImageList  m_imlStatusAnimation;
00077   BOOL    m_bInAnimation;
00078
00079   CBitmap   m_bmpIcon1;
00080   CBitmap   m_bmpIcon2;
00081 };
00082
00083 #ifndef _DEBUG  // debug version in StatusBarDemoView.cpp
00084 inline CStatusBarDemoDoc* CStatusBarDemoView::GetDocument()
00085    { return (CStatusBarDemoDoc*)m_pDocument; }
00086 #endif
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/tabstop.h Source File

  • ole
  • superpad

tabstop.h

Go to the documentation of this file.
00001 // tabstop.h : tab setting dialog
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CSetTabStops dialog
00015
00016 class CSetTabStops : public CDialog
00017 {
00018   DECLARE_DYNAMIC(CSetTabStops)
00019 // Construction
00020 public:
00021   CSetTabStops(CWnd* pParent = NULL); // standard constructor
00022
00023 // Dialog Data
00024   //{{AFX_DATA(CSetTabStops)
00025   enum { IDD = IDD_SET_TABSTOPS };
00026   UINT    m_nTabStops;
00027   //}}AFX_DATA
00028
00029 // Implementation
00030 protected:
00031   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00032
00033   //{{AFX_MSG(CSetTabStops)
00034   //}}AFX_MSG
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
00038 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/res/otherids.h Source File

  • general
  • ctrltest
  • res

otherids.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // Read-only resource IDs uses by RES\CTRLTEST.RC2
00006
00007 #define IDC_ALC_FIRST                   1100
00008 #define IDC_BUTTON1                     2201
00009 #define IDC_BUTTON2                     2202
00010 #define IDC_BUTTON3                     2203
00011 #define IDC_BUTTON4                     2204
00012 #define IDC_CONFIGURE                   1000
00013 #define IDC_LEFTHANDED                  1001
00014 #define IDD_PENEDIT_CONFIGURE           502
00015 #define IDD_PENEDIT_FEATURES            503
00016 #define IDD_SPIN_EDIT                   504
00017 #define IDD_WNDCLASS_EDIT               507
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/resource.h Source File

  • ole
  • hiersvr

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by HIERSVR.RC
00004 //
00005 #define IDR_MAINFRAME                   1
00006 #define IDR_HIERSVRTYPE                 2
00007 #define IDD_ABOUTBOX                    100
00008 #define IDP_AFXOLEINIT_FAILED           100
00009 #define IDD_CHANGE_NAME                 101
00010 #define IDD_ADD_NODE                    102
00011 #define IDR_POPUPS                      103
00012 #define IDR_HIERSVRTYPE_SRVR_EMB        105
00013 #define IDD_CUSTZOOM                    106
00014 #define IDR_HIERSVRTYPE_SRVR_IP         107
00015 #define IDC_EDIT1                       1000
00016 #define IDC_EDIT2                       1001
00017 #define IDC_COMBO1                      1002
00018 #define ID_CHANGE_NAME                  32768
00019 #define ID_ADD_NODE                     32769
00020 #define ID_IMPORT_TEXT                  32770
00021 #define ID_VIEW_ZOOM25                  32771
00022 #define ID_VIEW_ZOOM50                  32772
00023 #define ID_VIEW_ZOOM75                  32773
00024 #define ID_VIEW_ZOOM100                 32774
00025 #define ID_VIEW_ZOOM125                 32775
00026 #define ID_VIEW_ZOOM150                 32776
00027 #define ID_VIEW_ZOOM175                 32777
00028 #define ID_VIEW_ZOOM200                 32778
00029 #define ID_VIEW_ZOOM250                 32779
00030 #define ID_VIEW_ZOOM300                 32780
00031 #define ID_VIEW_ZOOMCUSTOM              32781
00032 #define ID_TREE_EXPANDONELEVEL          32783
00033 #define ID_TREE_EXPANDBRANCH            32784
00034 #define ID_TREE_EXPANDALL               32785
00035 #define ID_TREE_COLLAPSEBRANCH          32786
00036 #define ID_OPTIONS_FONT                 32787
00037 #define ID_CANCEL_INPLACE               32788
00038
00039 // Next default values for new objects
00040 //
00041 #ifdef APSTUDIO_INVOKED
00042 #ifndef APSTUDIO_READONLY_SYMBOLS
00043
00044 #define _APS_NEXT_RESOURCE_VALUE        108
00045 #define _APS_NEXT_COMMAND_VALUE         32789
00046 #define _APS_NEXT_CONTROL_VALUE         1004
00047 #define _APS_NEXT_SYMED_VALUE           200
00048 #endif
00049 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/listdlg.cpp Source File

  • vc2008fp
  • WordPad

listdlg.cpp

Go to the documentation of this file.
00001 //
00002 // listdlg.cpp : Defines the class behaviors for the application.
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "resource.h"
00016 #include "listdlg.h"
00017
00018 #pragma warning(disable:4793)
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 BEGIN_MESSAGE_MAP(CListDlg, CDialog)
00026   //{{AFX_MSG_MAP(CListDlg)
00027   ON_LBN_DBLCLK(IDC_LISTDIALOG_LIST, OnOK)
00028   //}}AFX_MSG_MAP
00029 END_MESSAGE_MAP()
00030
00031 CListDlg::CListDlg(UINT idStrDlgTitle, UINT idStrListTitle,
00032   const CStringList& listItems, int nDefSel) : CDialog(CListDlg::IDD),
00033   m_listItems(listItems)
00034 {
00035   VERIFY(m_strDlgTitle.LoadString(idStrDlgTitle));
00036   VERIFY(m_strListTitle.LoadString(idStrListTitle));
00037   m_nSelection = nDefSel;
00038 }
00039
00040 BOOL CListDlg::OnInitDialog()
00041 {
00042   SetWindowText(m_strDlgTitle);
00043 // fix this
00044   SetDlgItemText(IDC_STATIC_HEADING, m_strListTitle);
00045   CListBox* pListBox = (CListBox*)GetDlgItem(IDC_LISTDIALOG_LIST);
00046   ASSERT(pListBox != NULL);
00047   if (pListBox != NULL)
00048   {
00049     // fill with document templates in list
00050     POSITION pos = m_listItems.GetHeadPosition();
00051     while (pos != NULL)
00052     {
00053       if ( pListBox->AddString(m_listItems.GetNext(pos)) == -1)
00054         return FALSE;
00055     }
00056     pListBox->SetCurSel(m_nSelection);
00057   }
00058
00059   return CDialog::OnInitDialog();
00060 }
00061
00062 void CListDlg::OnOK()
00063 {
00064   CListBox* pListBox = (CListBox*)GetDlgItem(IDC_LISTDIALOG_LIST);
00065   ASSERT(pListBox != NULL);
00066   if (pListBox != NULL)
00067   {
00068     m_nSelection = pListBox->GetCurSel();
00069   }
00070
00071   CDialog::OnOK();
00072 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/ResourcePage.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

ResourcePage.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "ResourcePage.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CResourcePage property page
00024
00025 IMPLEMENT_DYNCREATE(CResourcePage, CMFCPropertyPage)
00026
00027 CResourcePage::CResourcePage() : CMFCPropertyPage(CResourcePage::IDD)
00028 {
00029 }
00030
00031 CResourcePage::~CResourcePage()
00032 {
00033 }
00034
00035 void CResourcePage::DoDataExchange(CDataExchange* pDX)
00036 {
00037   CMFCPropertyPage::DoDataExchange(pDX);
00038 }
00039
00040 BEGIN_MESSAGE_MAP(CResourcePage, CMFCPropertyPage)
00041   //{{AFX_MSG_MAP(CResourcePage)
00042   ON_BN_CLICKED(IDC_HOME, OnHome)
00043   ON_BN_CLICKED(IDC_CONTACT, OnContact)
00044   ON_BN_CLICKED(IDC_PRODUCT, OnProduct)
00045   ON_BN_CLICKED(IDC_SUPPORT, OnSupport)
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CResourcePage message handlers
00051
00052 void CResourcePage::OnHome()
00053 {
00054   ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
00055 }
00056
00057 void CResourcePage::OnContact()
00058 {
00059   ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
00060 }
00061
00062 void CResourcePage::OnProduct()
00063 {
00064   ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
00065 }
00066
00067 void CResourcePage::OnSupport()
00068 {
00069   ::ShellExecute(NULL, NULL, _T("http://www.microsoft.com"), NULL, NULL, NULL);
00070 }
00071
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/stdafx.cpp Source File

  • utility
  • guidgen

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapvw.cpp Source File

  • general
  • snapvw

snapvw.cpp

Go to the documentation of this file.
00001 // SnapVw.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "SnapVw.h"
00014
00015 #include "MainFrm.h"
00016 #include "ChildFrm.h"
00017 #include "SnapDoc.h"
00018 #include "SnapView.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CSnapApp
00028
00029 BEGIN_MESSAGE_MAP(CSnapApp, CWinApp)
00030   //{{AFX_MSG_MAP(CSnapApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032     // NOTE - the ClassWizard will add and remove mapping macros here.
00033     //    DO NOT EDIT what you see in these blocks of generated code!
00034   //}}AFX_MSG_MAP
00035   // Standard file based document commands
00036   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00037   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00038   // Standard print setup command
00039   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CSnapApp construction
00044
00045 CSnapApp::CSnapApp()
00046 {
00047   // TODO: add construction code here,
00048   // Place all significant initialization in InitInstance
00049 }
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // The one and only CSnapApp object
00053
00054 CSnapApp theApp;
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CSnapApp initialization
00058
00059 BOOL CSnapApp::InitInstance()
00060 {
00061   // Register the application's document templates.  Document templates
00062   // serve as the connection between documents, frame windows and views.
00063
00064   CMultiDocTemplate* pDocTemplate;
00065   pDocTemplate = new CMultiDocTemplate(
00066     IDR_SNAPTYPE,
00067     RUNTIME_CLASS(CSnapDoc),
00068     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00069     RUNTIME_CLASS(CSnapView));
00070   AddDocTemplate(pDocTemplate);
00071
00072   // create main MDI Frame window
00073   CMainFrame* pMainFrame = new CMainFrame;
00074   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00075   {
00076     // free the memory
00077     delete pMainFrame;
00078     return FALSE;
00079   }
00080   m_pMainWnd = pMainFrame;
00081
00082   // Parse command line for standard shell commands, DDE, file open
00083   CCommandLineInfo cmdInfo;
00084   ParseCommandLine(cmdInfo);
00085
00086   // Dispatch commands specified on the command line
00087   if (!ProcessShellCommand(cmdInfo))
00088     return FALSE;
00089
00090   // The main window has been initialized, so show and update it.
00091   pMainFrame->ShowWindow(m_nCmdShow);
00092   pMainFrame->UpdateWindow();
00093
00094   return TRUE;
00095 }
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CAboutDlg dialog used for App About
00099
00100 class CAboutDlg : public CDialog
00101 {
00102 public:
00103   CAboutDlg();
00104
00105 // Dialog Data
00106   //{{AFX_DATA(CAboutDlg)
00107   enum { IDD = IDD_ABOUTBOX };
00108   //}}AFX_DATA
00109
00110   // ClassWizard generated virtual function overrides
00111   //{{AFX_VIRTUAL(CAboutDlg)
00112   protected:
00113   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00114   //}}AFX_VIRTUAL
00115
00116 // Implementation
00117 protected:
00118   //{{AFX_MSG(CAboutDlg)
00119     // No message handlers
00120   //}}AFX_MSG
00121   DECLARE_MESSAGE_MAP()
00122 };
00123
00124 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00125 {
00126   //{{AFX_DATA_INIT(CAboutDlg)
00127   //}}AFX_DATA_INIT
00128 }
00129
00130 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00131 {
00132   CDialog::DoDataExchange(pDX);
00133   //{{AFX_DATA_MAP(CAboutDlg)
00134   //}}AFX_DATA_MAP
00135 }
00136
00137 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00138   //{{AFX_MSG_MAP(CAboutDlg)
00139     // No message handlers
00140   //}}AFX_MSG_MAP
00141 END_MESSAGE_MAP()
00142
00143 // App command to run the dialog
00144 void CSnapApp::OnAppAbout()
00145 {
00146   CAboutDlg aboutDlg;
00147   aboutDlg.DoModal();
00148 }
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CSnapApp commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/LineWeightDlg.h Source File

  • vc2008fp
  • DrawClient

LineWeightDlg.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CLineWeightDlg : public CDialog
00015 {
00016 // Construction
00017 public:
00018   CLineWeightDlg(CWnd* pParent = NULL);   // standard constructor
00019
00020 // Dialog Data
00021   //{{AFX_DATA(CLineWeightDlg)
00022   enum { IDD = IDD_LINEWEIGHT };
00023   CSpinButtonCtrl m_SpinCtrl;
00024   UINT    m_penSize;
00025   //}}AFX_DATA
00026
00027 // Overrides
00028 protected:
00029   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00030   virtual BOOL OnInitDialog();
00031
00032 // Implementation
00033 protected:
00034   //{{AFX_MSG(CLineWeightDlg)
00035   //}}AFX_MSG
00036
00037   DECLARE_MESSAGE_MAP()
00038 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/stylepge.h Source File

  • general
  • propdlg

stylepge.h

Go to the documentation of this file.
00001 // stylepge.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CStylePage dialog
00014
00015 class CStylePage : public CPropertyPage
00016 {
00017 // Construction
00018 public:
00019   CStylePage();
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CStylePage)
00023   enum { IDD = IDD_STYLE };
00024   int     m_nShapeStyle;
00025   //}}AFX_DATA
00026
00027
00028 // Overrides
00029   // ClassWizard generate virtual function overrides
00030   //{{AFX_VIRTUAL(CStylePage)
00031   protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 protected:
00037   void OnStyleClicked(UINT nCmdID);
00038   // Generated message map functions
00039   //{{AFX_MSG(CStylePage)
00040     // NOTE: the ClassWizard will add member functions here
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMDITabsDemoDoc Member List

This is the complete list of members for CMDITabsDemoDoc, including all inherited members.
CMDITabsDemoDoc() | CMDITabsDemoDoc | [protected]
OnNewDocument() | CMDITabsDemoDoc | [virtual]
Serialize(CArchive &ar) | CMDITabsDemoDoc | [virtual]
~CMDITabsDemoDoc() | CMDITabsDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/stdafx.cpp Source File

  • controls
  • button

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/resource.h Source File

  • vc2008fp
  • OutlookMultiViews

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by OUTLOOKMULTIVIEWS.RC
00004 //
00005 #define IDP_OLE_INIT_FAILED     100
00006 #define IDR_MAINFRAME       128
00007 #define IDR_OUTLOOTYPE        129
00008 #define IDR_CONTEXT_MENU      130
00009 #define IDR_POPUP_TOOLBAR     131
00010
00011 #define IDB_SHORTCUTS        148
00012 #define IDB_CAPTION         150
00013 #define IDB_TOOLBAR256        151
00014 #define IDD_ABOUTBOX                999
00015 #define IDC_COMPANY_URL             1041
00016 #define ID_VIEW_TOOLBARS      32771
00017 #define ID_VIEW_CUSTOMIZE     32770
00018 #define ID_VIEW_CAPTIONBAR      32816
00019 #define ID_VIEW_OUTLOOKBAR      32817
00020 #define ID_SHORTCUT_1       32818
00021 #define ID_SHORTCUT_2       32819
00022 #define ID_SHORTCUT_3       32820
00023 #define ID_SHORTCUT_4       32821
00024 #define ID_SHORTCUTS_PANE_1     32824
00025 #define ID_SHORTCUTS_PANE_2     32825
00026 #define ID_SHORTCUTS_TREE     32826
00027
00028 #define ID_VIEW_APPLOOK_2000    32833
00029 #define ID_VIEW_APPLOOK_XP      32834
00030 #define ID_VIEW_APPLOOK_2003    32835
00031 #define ID_VIEW_APPLOOK_WIN_XP    32836
00032 #define ID_VIEW_APPLOOK_VS2005    32837
00033 #define ID_VIEW_APPLOOK_2007_1      32838
00034 #define ID_VIEW_APPLOOK_2007_2      32839
00035 #define ID_VIEW_APPLOOK_2007_3      32840
00036 #define ID_VIEW_APPLOOK_2007_4      32841
00037
00038 // Next default values for new objects
00039 //
00040 #ifdef APSTUDIO_INVOKED
00041 #ifndef APSTUDIO_READONLY_SYMBOLS
00042 #define _APS_3D_CONTROLS      1
00043 #define _APS_NEXT_RESOURCE_VALUE  154
00044 #define _APS_NEXT_CONTROL_VALUE   1042
00045 #define _APS_NEXT_SYMED_VALUE   108
00046 #define _APS_NEXT_COMMAND_VALUE   32843
00047 #endif
00048 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertiesViewBar Member List

This is the complete list of members for CPropertiesViewBar, including all inherited members.
AdjustLayout() | CPropertiesViewBar |
AdjustLayout() | CPropertiesViewBar |
CPropertiesViewBar(void) | CPropertiesViewBar |
CPropertiesViewBar() | CPropertiesViewBar |
GetPropList() | CPropertiesViewBar | [inline]
InitPropList() | CPropertiesViewBar | [protected]
m_fntPropList | CPropertiesViewBar | [protected]
m_wndObjectCombo | CPropertiesViewBar | [protected]
m_wndPropList | CPropertiesViewBar | [protected]
m_wndToolBar | CPropertiesViewBar | [protected]
OnChangeVisualStyle() | CPropertiesViewBar |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CPropertiesViewBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CPropertiesViewBar | [protected]
OnExpand() | CPropertiesViewBar | [protected]
OnProperies1() | CPropertiesViewBar | [protected]
OnProperies2() | CPropertiesViewBar | [protected]
OnPropListAlphabetMode() | CPropertiesViewBar | [protected]
OnPropListTreeMode() | CPropertiesViewBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CPropertiesViewBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CPropertiesViewBar | [protected]
OnSettingChange(UINT uFlags, LPCTSTR lpszSection) | CPropertiesViewBar | [protected]
OnSize(UINT nType, int cx, int cy) | CPropertiesViewBar | [protected]
OnSize(UINT nType, int cx, int cy) | CPropertiesViewBar | [protected]
OnSortingprop() | CPropertiesViewBar | [protected]
OnUpdateExpand(CCmdUI *pCmdUI) | CPropertiesViewBar | [protected]
OnUpdateProperies1(CCmdUI *pCmdUI) | CPropertiesViewBar | [protected]
OnUpdateProperies2(CCmdUI *pCmdUI) | CPropertiesViewBar | [protected]
OnUpdatePropListAlphabetMode(CCmdUI *pCmdUI) | CPropertiesViewBar | [protected]
OnUpdatePropListTreeMode(CCmdUI *pCmdUI) | CPropertiesViewBar | [protected]
OnUpdateSortingprop(CCmdUI *pCmdUI) | CPropertiesViewBar | [protected]
SetPropListFont() | CPropertiesViewBar | [protected]
SetVSDotNetLook(BOOL bSet) | CPropertiesViewBar | [inline]
SetVSDotNetLook(BOOL bSet) | CPropertiesViewBar | [inline]
~CPropertiesViewBar() | CPropertiesViewBar | [virtual]
~CPropertiesViewBar() | CPropertiesViewBar | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloVw.cpp Source File

  • general
  • mdidocvw

HelloVw.cpp

Go to the documentation of this file.
00001 // HelloVw.cpp : implementation of the CHelloView class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "MDI.h"
00015
00016 #include "HelloDoc.h"
00017 #include "HelloVw.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CHelloView
00027
00028 IMPLEMENT_DYNCREATE(CHelloView, CView)
00029
00030 BEGIN_MESSAGE_MAP(CHelloView, CView)
00031   //{{AFX_MSG_MAP(CHelloView)
00032   ON_UPDATE_COMMAND_UI(ID_BLUE, OnUpdateBlue)
00033   ON_UPDATE_COMMAND_UI(ID_GREEN, OnUpdateGreen)
00034   ON_UPDATE_COMMAND_UI(ID_RED, OnUpdateRed)
00035   ON_UPDATE_COMMAND_UI(ID_WHITE, OnUpdateWhite)
00036   ON_UPDATE_COMMAND_UI(ID_BLACK, OnUpdateBlack)
00037   ON_COMMAND(ID_CUSTOM, OnCustom)
00038   ON_UPDATE_COMMAND_UI(ID_CUSTOM, OnUpdateCustom)
00039   ON_COMMAND(ID_BLACK, OnColor)
00040   ON_COMMAND(ID_BLUE, OnColor)
00041   ON_COMMAND(ID_GREEN, OnColor)
00042   ON_COMMAND(ID_RED, OnColor)
00043   ON_COMMAND(ID_WHITE, OnColor)
00044   //}}AFX_MSG_MAP
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CHelloView construction/destruction
00049
00050 CHelloView::CHelloView()
00051 {
00052 }
00053
00054 CHelloView::~CHelloView()
00055 {
00056 }
00057
00058 BOOL CHelloView::PreCreateWindow(CREATESTRUCT& cs)
00059 {
00060   return CView::PreCreateWindow(cs);
00061 }
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CHelloView drawing
00065
00066 void CHelloView::OnDraw(CDC* pDC)
00067 {
00068   CHelloDoc* pDoc = GetDocument();
00069   ASSERT_VALID(pDoc);
00070
00071   CRect rect;
00072   COLORREF clr = pDoc->m_clrText;
00073   CString tmpStr = pDoc->m_str;
00074
00075   pDC->SetTextColor(clr);
00076   pDC->SetBkColor(::GetSysColor(COLOR_WINDOW));
00077   GetClientRect(rect);
00078   pDC->DrawText(tmpStr, -1, rect,
00079     DT_SINGLELINE | DT_CENTER | DT_VCENTER);
00080 }
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CHelloView diagnostics
00084
00085 #ifdef _DEBUG
00086 void CHelloView::AssertValid() const
00087 {
00088   CView::AssertValid();
00089 }
00090
00091 void CHelloView::Dump(CDumpContext& dc) const
00092 {
00093   CView::Dump(dc);
00094 }
00095
00096 CHelloDoc* CHelloView::GetDocument() // non-debug version is inline
00097 {
00098   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CHelloDoc)));
00099   return (CHelloDoc*)m_pDocument;
00100 }
00101 #endif //_DEBUG
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // CHelloView message handlers
00105
00106 // Update handlers for each color
00107 void CHelloView::OnUpdateBlue(CCmdUI* pCmdUI)
00108 {
00109   CHelloDoc* pDoc = GetDocument();
00110   ASSERT_VALID(pDoc);
00111
00112   pCmdUI->SetCheck(pDoc->m_bBlue);
00113 }
00114
00115 void CHelloView::OnUpdateGreen(CCmdUI* pCmdUI)
00116 {
00117   CHelloDoc* pDoc = GetDocument();
00118   ASSERT_VALID(pDoc);
00119
00120   pCmdUI->SetCheck(pDoc->m_bGreen);
00121 }
00122
00123 void CHelloView::OnUpdateRed(CCmdUI* pCmdUI)
00124 {
00125   CHelloDoc* pDoc = GetDocument();
00126   ASSERT_VALID(pDoc);
00127
00128   pCmdUI->SetCheck(pDoc->m_bRed);
00129 }
00130
00131 void CHelloView::OnUpdateWhite(CCmdUI* pCmdUI)
00132 {
00133   CHelloDoc* pDoc = GetDocument();
00134   ASSERT_VALID(pDoc);
00135
00136   pCmdUI->SetCheck(pDoc->m_bWhite);
00137 }
00138
00139 void CHelloView::OnUpdateBlack(CCmdUI* pCmdUI)
00140 {
00141   CHelloDoc* pDoc = GetDocument();
00142   ASSERT_VALID(pDoc);
00143
00144   pCmdUI->SetCheck(pDoc->m_bBlack);
00145 }
00146
00147 void CHelloView::MixColors()
00148 {
00149   CHelloDoc* pDoc = GetDocument();
00150   ASSERT_VALID(pDoc);
00151
00152   COLORREF tmpClr;
00153   int r, g, b;
00154   BOOL bSetColor;
00155
00156   // Determine which colors are currently chosen.
00157
00158   bSetColor = pDoc->m_bRed || pDoc->m_bGreen || pDoc->m_bBlue
00159     || pDoc->m_bWhite || pDoc->m_bBlack;
00160
00161   // If the current color is custom, ignore mix request.
00162
00163   if(!bSetColor && pDoc->m_bCustom)
00164     return;
00165
00166   // Set color value to black and then add the necessary colors.
00167
00168   r = g = b = 0;
00169
00170   if(pDoc->m_bRed)
00171    r = 255;
00172   if(pDoc->m_bGreen)
00173    g = 255;
00174   if(pDoc->m_bBlue)
00175    b = 255;
00176   tmpClr = RGB(r, g, b);
00177
00178 // NOTE: Because a simple algorithm is used to mix colors
00179 // if the current selection contains black or white, the
00180 // result will be black or white; respectively. This is due
00181 // to the additive method for mixing the colors.
00182
00183   if(pDoc->m_bBlack)
00184    tmpClr = RGB(0, 0, 0);
00185
00186   if(pDoc->m_bWhite)
00187    tmpClr = RGB(255, 255, 255);
00188
00189   // Once the color has been determined, update document
00190   // data, and force repaint of all views.
00191
00192   if(!bSetColor)
00193     pDoc->m_bBlack = TRUE;
00194   pDoc->m_clrText = tmpClr;
00195   pDoc->m_bCustom = FALSE;
00196   pDoc->UpdateAllViews(NULL);
00197 }
00198
00199 void CHelloView::OnCustom()
00200 {
00201   CHelloDoc* pDoc = GetDocument();
00202   ASSERT_VALID(pDoc);
00203
00204   CColorDialog dlgColor(pDoc->m_clrText);
00205   if (dlgColor.DoModal() == IDOK)
00206   {
00207     pDoc->m_clrText = dlgColor.GetColor();
00208     pDoc->ClearAllColors();
00209     pDoc->m_bCustom = TRUE;
00210     pDoc->UpdateAllViews(NULL);
00211   }
00212 }
00213
00214 void CHelloView::OnUpdateCustom(CCmdUI* pCmdUI)
00215 {
00216   CHelloDoc* pDoc = GetDocument();
00217   ASSERT_VALID(pDoc);
00218
00219   pCmdUI->SetCheck(pDoc->m_bCustom);
00220 }
00221
00222 void CHelloView::OnColor()
00223 {
00224   CHelloDoc* pDoc = GetDocument();
00225   ASSERT_VALID(pDoc);
00226
00227   UINT m_nIDColor;
00228
00229   m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
00230
00231 // Determines the color being modified
00232 // and then updates the color state
00233
00234   switch(m_nIDColor)
00235   {
00236    case ID_BLACK:
00237     pDoc->ClearAllColors();
00238     pDoc->m_bBlack = !(pDoc->m_bBlack);
00239     break;
00240    case ID_WHITE:
00241     pDoc->ClearAllColors();
00242     pDoc->m_bWhite = !(pDoc->m_bWhite);
00243     break;
00244    case ID_RED:
00245     pDoc->m_bRed = !(pDoc->m_bRed);
00246     pDoc->m_bBlack = FALSE;
00247     pDoc->m_bWhite = FALSE;
00248     break;
00249    case ID_GREEN:
00250     pDoc->m_bGreen = !(pDoc->m_bGreen);
00251     pDoc->m_bBlack = FALSE;
00252     pDoc->m_bWhite = FALSE;
00253     break;
00254    case ID_BLUE:
00255     pDoc->m_bBlue = !(pDoc->m_bBlue);
00256     pDoc->m_bBlack = FALSE;
00257     pDoc->m_bWhite = FALSE;
00258     break;
00259    default:
00260      AfxMessageBox(IDS_UNKCOLOR);
00261      return;
00262   }
00263   MixColors();
00264 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/autoclik.h Source File

  • ole
  • acdual

autoclik.h

Go to the documentation of this file.
00001 // AutoClik.h : main header file for the AUTOCLIK application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CAutoClickApp:
00020 // See AutoClik.cpp for the implementation of this class
00021 //
00022
00023 class CAutoClickApp : public CWinApp
00024 {
00025 public:
00026   CAutoClickApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CAutoClickApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036   COleTemplateServer m_server;
00037     // Server object for document creation
00038
00039   //{{AFX_MSG(CAutoClickApp)
00040   afx_msg void OnAppAbout();
00041     // NOTE - the ClassWizard will add and remove member functions here.
00042     //    DO NOT EDIT what you see in these blocks of generated code !
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/resource.h Source File

  • controls
  • spindial

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by SPINDIAL.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_SPINDIAL                    1
00015 #define IDB_SPINDIAL                    1
00016 #define IDS_SPINDIAL_PPG                2
00017 #define IDI_ABOUTDLL                    10
00018 #define IDD_ABOUTBOX_SPINDIAL           100
00019 #define IDS_SPINDIAL_PPG_CAPTION        101
00020 #define IDD_PROPPAGE_SPINDIAL           101
00021 #define IDC_POSITIONEDIT                201
00022
00023 // Next default values for new objects
00024 //
00025 #ifdef APSTUDIO_INVOKED
00026 #ifndef APSTUDIO_READONLY_SYMBOLS
00027
00028 #define _APS_NEXT_RESOURCE_VALUE        201
00029 #define _APS_NEXT_COMMAND_VALUE         32768
00030 #define _APS_NEXT_CONTROL_VALUE         202
00031 #define _APS_NEXT_SYMED_VALUE           101
00032 #endif
00033 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/pal.h Source File

  • controls
  • pal

pal.h

Go to the documentation of this file.
00001 // pal.h : main header file for PAL.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined( __AFXCTL_H__ )
00013   #error include 'afxctl.h' before including this file
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CPalApp : See pal.cpp for implementation.
00020
00021 class CPalApp : public COleControlModule
00022 {
00023 public:
00024   BOOL InitInstance();
00025   int ExitInstance();
00026 };
00027
00028 extern const GUID CDECL _tlid;
00029 extern const WORD _wVerMajor;
00030 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapeobj.h Source File

  • general
  • propdlg

shapeobj.h

Go to the documentation of this file.
00001 // shapeobj.h : interface of the CShape class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 enum SHAPE_STYLE
00013 {
00014   rectangle,
00015   rounded_rectangle,
00016   ellipse,
00017 };
00018
00019 enum SHAPE_COLOR_ENUM
00020 {
00021   black,
00022   red,
00023   green,
00024   blue,
00025 };
00026
00027 struct SHAPE_COLOR
00028 {
00029   SHAPE_COLOR_ENUM e;
00030   operator COLORREF() const;
00031   const SHAPE_COLOR& operator = (COLORREF colorref);
00032   operator int() const;
00033   const SHAPE_COLOR& operator = (int n);
00034 };
00035
00036 class CShape : public CObject
00037 {
00038 public:
00039   CShape();
00040   CShape(SHAPE_COLOR_ENUM colorenum, SHAPE_STYLE shapestyle, CRect& rect);
00041   DECLARE_SERIAL(CShape)
00042
00043   SHAPE_COLOR m_shapecolor;
00044   SHAPE_STYLE m_shapestyle;
00045   CRect       m_rect;
00046
00047   void Draw(CDC* pDC, BOOL bSelected);
00048   virtual void Serialize(CArchive& ar);
00049 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CScribbleApp Member List

This is the complete list of members for CScribbleApp, including all inherited members.
CScribbleApp() | CScribbleApp |
InitInstance() | CScribbleApp | [virtual]
m_server | CScribbleApp |
OnAppAbout() | CScribbleApp |
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iadvsink.h Source File

  • ole
  • oleview
  • iviewers

iadvsink.h

Go to the documentation of this file.
00001 // iadvsink.h
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef _IADVSINK_H_
00013 #define _IADVSINK_H_
00014
00015 //#if defined(WIN32) && !defined(_UNICODE)
00016 //    #define CImpIAdviseSink CImpIAdviseSinkA
00017 //    #define CIDataObjectDlg CIDataObjectDlgA
00018 //#endif
00019
00020 class FAR CImpIAdviseSink : public IAdviseSink
00021 {
00022 protected:
00023   ULONG               m_cRef;      //Interface reference count.
00024   CIDataObjectDlg FAR* m_pIDOD ;       //Back pointer to the application
00025
00026 public:
00027   CImpIAdviseSink(CIDataObjectDlg FAR*);
00028   ~CImpIAdviseSink(void);
00029
00030   STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
00031   STDMETHODIMP_(ULONG) AddRef(void);
00032   STDMETHODIMP_(ULONG) Release(void);
00033
00034   //We only implement OnDataChange for now.
00035   STDMETHODIMP_(void)  OnDataChange(LPFORMATETC, LPSTGMEDIUM);
00036   STDMETHODIMP_(void)  OnViewChange(DWORD, LONG);
00037   STDMETHODIMP_(void)  OnRename(LPMONIKER);
00038   STDMETHODIMP_(void)  OnSave(void);
00039   STDMETHODIMP_(void)  OnClose(void);
00040 };
00041
00042 #endif //_IADVSINK_H_
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSNVisualManager Member List

This is the complete list of members for CMSNVisualManager, including all inherited members.
CMSNVisualManager() | CMSNVisualManager |
OnDrawPopupWindowBorder(CDC *pDC, CRect rect) | CMSNVisualManager | [virtual]
OnDrawPopupWindowCaption(CDC *pDC, CRect rectCaption, CMFCDesktopAlertWnd *pPopupWnd) | CMSNVisualManager | [virtual]
OnFillPopupWindowBackground(CDC *pDC, CRect rect) | CMSNVisualManager | [virtual]
~CMSNVisualManager() | CMSNVisualManager | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Aboutdlg.cpp Source File

  • general
  • dlgcbr32

Aboutdlg.cpp

Go to the documentation of this file.
00001 // Aboutdlg.cpp : Defines the class behaviors for the about dialog.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #include "resource.h"
00015 #include "aboutdlg.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CAboutDlg dialog
00025
00026
00027 CAboutDlg::CAboutDlg(CWnd* pParent /*=NULL*/)
00028   : CDialog(CAboutDlg::IDD, pParent)
00029 {
00030   //{{AFX_DATA_INIT(CAboutDlg)
00031   //}}AFX_DATA_INIT
00032 }
00033
00034
00035 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00036 {
00037   CDialog::DoDataExchange(pDX);
00038   //{{AFX_DATA_MAP(CAboutDlg)
00039   //}}AFX_DATA_MAP
00040 }
00041
00042 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00043   //{{AFX_MSG_MAP(CAboutDlg)
00044     // NOTE - the ClassWizard will add and remove mapping macros here.
00045     //    DO NOT EDIT what you see in these blocks of generated code!
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/regsvr/regsvr.cpp Source File

  • controls
  • regsvr

regsvr.cpp

Go to the documentation of this file.
00001 // regsvr.cpp : Program to invoke OLE self-registration on a DLL.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <windows.h>
00013 #include <ole2.h>
00014 #include <tchar.h>
00015 #include <malloc.h>
00016 #include <stdio.h>
00017 #include "resource.h"
00018
00019 #define FAIL_ARGS   1
00020 #define FAIL_OLE    2
00021 #define FAIL_LOAD   3
00022 #define FAIL_ENTRY  4
00023 #define FAIL_REG    5
00024
00025 const TCHAR _szAppName[] = _T("RegSvr32");
00026 const char _szDllRegSvr[] = "DllRegisterServer";
00027 const char _szDllUnregSvr[] = "DllUnregisterServer";
00028 HINSTANCE _hInstance;
00029
00030 BOOL _bSilent;
00031 BOOL _bConsole;
00032
00033 #define SafePutts(string) ((stdout >= 0) ? _putts(string) : 0)
00034
00035 void
00036 FormatString2(
00037   LPTSTR lpszOut,
00038   int nOutSize,
00039   LPCTSTR lpszFormat,
00040   LPCTSTR lpsz1,
00041   LPCTSTR lpsz2
00042   )
00043 {
00044   LPCTSTR pchSrc = lpszFormat;
00045   LPTSTR pchDest = lpszOut;
00046   while (*pchSrc != '\0') {
00047     if (pchSrc[0] == '%' && (pchSrc[1] >= '1' && pchSrc[1] <= '2')) {
00048       _tcscpy_s(pchDest, nOutSize, (LPCTSTR)(pchSrc[1] == '1' ? lpsz1 : lpsz2));
00049       pchDest += lstrlen(pchDest);
00050       pchSrc += 2;
00051     } else {
00052       if (_istlead(*pchSrc))
00053         *pchDest++ = *pchSrc++; // copy first of 2 bytes
00054       *pchDest++ = *pchSrc++;
00055     }
00056   }
00057   *pchDest = '\0';
00058 }
00059
00060 #define MAX_STRING 1024
00061
00062 void
00063 DisplayMessage(
00064   UINT ids,
00065   LPCTSTR pszArg1 = NULL,
00066   LPCTSTR pszArg2 = NULL,
00067   BOOL bUsage = FALSE,
00068   BOOL bInfo = FALSE
00069   )
00070 {
00071   if (_bSilent && !_bConsole)
00072     return;
00073
00074   TCHAR szFmt[MAX_STRING];
00075   LoadString(_hInstance, ids, szFmt, MAX_STRING);
00076
00077   TCHAR szText[MAX_STRING];
00078   FormatString2(szText, MAX_STRING, szFmt, pszArg1, pszArg2);
00079   if (bUsage) {
00080     int cch = (int)_tcslen(szText);
00081     LoadString(_hInstance, IDS_USAGE, szText + cch, MAX_STRING - cch);
00082   }
00083
00084   if (! _bSilent)
00085     MessageBox(NULL, szText, _szAppName,
00086       MB_TASKMODAL | (bInfo ? MB_ICONINFORMATION : MB_ICONEXCLAMATION));
00087
00088   if (_bConsole) {
00089     TCHAR szMessage[MAX_STRING];
00090     FormatString2(szMessage, MAX_STRING, _T("%1: %2\n"), _szAppName, szText);
00091     SafePutts(szMessage);
00092   }
00093 }
00094
00095 inline void
00096 Usage(
00097   UINT ids,
00098   LPCTSTR pszArg1 = NULL,
00099   LPCTSTR pszArg2 = NULL
00100   )
00101 {
00102   DisplayMessage(ids, pszArg1, pszArg2, TRUE);
00103 }
00104
00105 inline void
00106 Info(
00107   UINT ids,
00108   LPCTSTR pszArg1 = NULL,
00109   LPCTSTR pszArg2 = NULL
00110   )
00111 {
00112   DisplayMessage(ids, pszArg1, pszArg2, FALSE, TRUE);
00113 }
00114
00115 #ifdef _UNICODE
00116 int wmain(int argc, WCHAR *argv[])
00117 #else // !_UNICODE
00118 int main(int argc, char *argv[])
00119 #endif
00120 {
00121   int iReturn = 0;
00122   HRESULT (STDAPICALLTYPE * lpDllEntryPoint)(void);
00123
00124   BOOL bVisualC = FALSE;
00125   BOOL bUnregister = FALSE;
00126   LPCSTR pszDllEntryPoint = _szDllRegSvr;
00127   LPTSTR ptszDllEntryPoint = NULL;
00128   LPCTSTR pszDllName = NULL;
00129   LPCTSTR pszTok;
00130   size_t EntryPointSize = 0;
00131
00132   _hInstance = ::GetModuleHandle(NULL);
00133
00134   // Parse command line arguments.
00135   int iTok;
00136   for (iTok = 1; iTok < argc; iTok++) {
00137     pszTok = argv[iTok];
00138
00139     if ((pszTok[0] == '-') || (pszTok[0] == '/')) {
00140       switch (pszTok[1]) {
00141         case 'v':
00142         case 'V':
00143           bVisualC = TRUE;
00144           break;
00145
00146         case 's':
00147         case 'S':
00148           _bSilent = TRUE;
00149           break;
00150
00151         case 'u':
00152         case 'U':
00153           bUnregister = TRUE;
00154           pszDllEntryPoint = _szDllUnregSvr;
00155           break;
00156
00157         case 'c':
00158         case 'C':
00159           _bConsole = TRUE;
00160           break;
00161
00162         default:
00163           Usage(IDS_UNRECOGNIZEDFLAG, pszTok);
00164           return FAIL_ARGS;
00165       }
00166     } else {
00167       if (pszDllName == NULL) {
00168         pszDllName = pszTok;
00169         break;
00170       } else {
00171         Usage(IDS_EXTRAARGUMENT, pszTok);
00172         return FAIL_ARGS;
00173       }
00174     }
00175   }
00176
00177   if (pszDllEntryPoint != NULL) {
00178     EntryPointSize = (1 + strlen(pszDllEntryPoint)) * (sizeof(TCHAR));
00179     ptszDllEntryPoint = (TCHAR *)_malloca(EntryPointSize); // _malloca may allocate memory on the heap, so we need to call _freea to clean the heap if used
00180 #ifdef _UNICODE
00181     swprintf_s(ptszDllEntryPoint, EntryPointSize, _T("%hs"), pszDllEntryPoint);
00182 #else // !_UNICODE
00183     strcpy_s(ptszDllEntryPoint, EntryPointSize, pszDllEntryPoint);
00184 #endif
00185   }
00186
00187   if (pszDllName == NULL) {
00188     if (bVisualC)
00189       DisplayMessage(IDS_NOPROJECT);
00190     else
00191       Usage(IDS_NODLLNAME);
00192     _freea(ptszDllEntryPoint);
00193     return FAIL_ARGS;
00194   }
00195
00196   // Initialize OLE.
00197   if (FAILED(OleInitialize(NULL))) {
00198     DisplayMessage(IDS_OLEINITFAILED);
00199     _freea(ptszDllEntryPoint);
00200     return FAIL_OLE;
00201   }
00202
00203   SetErrorMode(SEM_FAILCRITICALERRORS);       // Make sure LoadLib fails.
00204   for (; iTok < argc; iTok++) {
00205     pszDllName = argv[iTok];
00206
00207     // Load the library.
00208     HINSTANCE hLib = LoadLibraryEx(pszDllName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
00209
00210     if (hLib < (HINSTANCE)HINSTANCE_ERROR) {
00211       TCHAR szError[12];
00212       _stprintf_s(szError, 12, _T("0x%08lx"), GetLastError());
00213       DisplayMessage(IDS_LOADLIBFAILED, pszDllName, szError);
00214       iReturn = FAIL_LOAD;
00215       goto CleanupOle;
00216     }
00217
00218     // Find the entry point.
00219     (FARPROC&)lpDllEntryPoint = GetProcAddress(hLib, pszDllEntryPoint);
00220
00221     if (lpDllEntryPoint == NULL) {
00222       TCHAR szExt[_MAX_EXT];
00223       _tsplitpath_s(pszDllName, NULL, 0, NULL, 0, NULL, 0, szExt, _MAX_EXT);
00224
00225       if ((_tcsicmp(szExt, _T(".dll")) != 0) && (_tcsicmp(szExt, _T(".ocx")) != 0))
00226         DisplayMessage(IDS_NOTDLLOROCX, pszDllName, ptszDllEntryPoint);
00227       else
00228         DisplayMessage(IDS_NOENTRYPOINT, pszDllName, ptszDllEntryPoint);
00229
00230       iReturn = FAIL_ENTRY;
00231       goto CleanupLibrary;
00232     }
00233
00234     // Call the entry point.
00235     if (FAILED((*lpDllEntryPoint)())) {
00236       DisplayMessage(IDS_CALLFAILED, ptszDllEntryPoint, pszDllName);
00237       iReturn = FAIL_REG;
00238       goto CleanupLibrary;
00239     }
00240
00241     Info(IDS_CALLSUCCEEDED, ptszDllEntryPoint, pszDllName);
00242
00243 CleanupLibrary:
00244     FreeLibrary(hLib);
00245   }
00246
00247 CleanupOle:
00248   OleUninitialize();
00249   _freea(ptszDllEntryPoint);
00250   return iReturn;
00251 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TypeAttr.H Source File

  • ole
  • TstCon

TypeAttr.H

Go to the documentation of this file.
00001 // File: TypeAttr.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CSmartTypeAttr
00011 {
00012 public:
00013    CSmartTypeAttr( ITypeInfo* pTypeInfo );
00014    ~CSmartTypeAttr();
00015
00016 public:
00017    TYPEATTR* operator->();
00018    TYPEATTR** operator&();
00019
00020 public:
00021    void Release();
00022
00023 protected:
00024    TYPEATTR* m_pTypeAttr;
00025    ITypeInfoPtr m_pTypeInfo;
00026 };
00027
00028 class CSmartVarDesc
00029 {
00030 public:
00031    CSmartVarDesc( ITypeInfo* pTypeInfo );
00032    ~CSmartVarDesc();
00033
00034 public:
00035    VARDESC* operator->();
00036    VARDESC** operator&();
00037
00038    operator const VARDESC*() const;
00039
00040 public:
00041    void Release();
00042
00043 protected:
00044    VARDESC* m_pVarDesc;
00045    ITypeInfoPtr m_pTypeInfo;
00046 };
00047
00048 class CSmartFuncDesc
00049 {
00050 public:
00051    CSmartFuncDesc( ITypeInfo* pTypeInfo );
00052    ~CSmartFuncDesc();
00053
00054 public:
00055    FUNCDESC* operator->();
00056    FUNCDESC** operator&();
00057
00058    operator const FUNCDESC*() const;
00059
00060 public:
00061    void Release();
00062
00063 protected:
00064    FUNCDESC* m_pFuncDesc;
00065    ITypeInfoPtr m_pTypeInfo;
00066 };
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabbedViewApp Member List

This is the complete list of members for CTabbedViewApp, including all inherited members.
CTabbedViewApp() | CTabbedViewApp |
ExitInstance() | CTabbedViewApp | [virtual]
InitInstance() | CTabbedViewApp | [virtual]
OnAppAbout() | CTabbedViewApp |
PreLoadState() | CTabbedViewApp | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/DHtmlExploreDlg.h Source File

  • internet
  • DHtmlExplore

DHtmlExploreDlg.h

Go to the documentation of this file.
00001 // DHtmlExploreDlg.h : header file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CDHtmlExploreDlg dialog
00015
00016 class CDHtmlExploreDlg : public CDHtmlDialog
00017 {
00018 // Construction
00019 public:
00020   CDHtmlExploreDlg(CWnd* pParent = NULL); // standard constructor
00021
00022 // Dialog Data
00023   //{{AFX_DATA(CDHtmlExploreDlg)
00024   enum { IDD = IDD_DHTMLEXPLORE_DIALOG };
00025     // NOTE: the ClassWizard will add data members here
00026   //}}AFX_DATA
00027
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CDHtmlExploreDlg)
00030   protected:
00031   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00032   //}}AFX_VIRTUAL
00033
00034   void RefreshDir();
00035   CString m_strCurrDir;
00036   void OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl);
00037
00038   HRESULT OnBrowse(IHTMLElement *phtmlElement);
00039   HRESULT OnMouseOverElement(IHTMLElement *phtmlElement);
00040   HRESULT OnMouseOutElement(IHTMLElement *phtmlElement);
00041   HRESULT OnClickFolder(IHTMLElement *phtmlElement);
00042   HRESULT OnClickFile(IHTMLElement *phtmlElement);
00043   HRESULT STDMETHODCALLTYPE ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved);
00044
00045   CComPtr<IHTMLElement> m_spCurrElement;
00046   CString m_strCtxFileName;
00047
00048 // Implementation
00049 protected:
00050   HICON m_hIcon;
00051
00052   // Generated message map functions
00053   //{{AFX_MSG(CDHtmlExploreDlg)
00054   virtual BOOL OnInitDialog();
00055   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00056   afx_msg void OnPaint();
00057   afx_msg HCURSOR OnQueryDragIcon();
00058   afx_msg void OnContextBrowse();
00059   afx_msg void OnContextExit();
00060   afx_msg void OnContextProperties();
00061   //}}AFX_MSG
00062   DECLARE_MESSAGE_MAP()
00063   DECLARE_DHTML_EVENT_MAP()
00064 };
00065
00066 //{{AFX_INSERT_LOCATION}}
00067 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/MacroDB.H Source File

  • ole
  • TstCon

MacroDB.H

Go to the documentation of this file.
00001 // File: MacroDB.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CMacroDialogBar :
00011    public CDialogBar
00012 {
00013    DECLARE_DYNAMIC( CMacroDialogBar )
00014
00015 public:
00016    BOOL Create( CWnd* pParent, UINT nStyle, UINT nID );
00017
00018 protected:
00019    CSize CalcFixedLayout( BOOL tStretch, BOOL tHorz );
00020
00021 protected:
00022    CMacroComboBox m_cboxMacroName;
00023
00024 protected:
00025   DECLARE_MESSAGE_MAP()
00026 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 // MSMoneyDemoDoc.h : interface of the CMSMoneyDemoDoc class
00010 //
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 #pragma once
00014
00015 #define FIRST_HISTORY_COMMAND 0x1000
00016 #define HISTORY_LEN 10
00017
00018 class CMSMoneyDemoDoc : public CDocument
00019 {
00020 protected: // create from serialization only
00021   CMSMoneyDemoDoc();
00022   DECLARE_DYNCREATE(CMSMoneyDemoDoc)
00023
00024 // Attributes
00025 public:
00026 // Operations
00027 public:
00028   BOOL IsBackAvailable () const
00029   {
00030     return TRUE;
00031   }
00032
00033   BOOL IsFrwdAvailable ()
00034   {
00035     return TRUE;
00036   }
00037
00038 // Overrides
00039 public:
00040   virtual BOOL OnNewDocument();
00041   virtual void Serialize(CArchive& ar);
00042
00043 // Implementation
00044 public:
00045   virtual ~CMSMoneyDemoDoc();
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050
00051 protected:
00052   afx_msg void OnGoBack();
00053   afx_msg void OnUpdateGoBack(CCmdUI* pCmdUI);
00054   afx_msg void OnGoForward();
00055   afx_msg void OnUpdateGoForward(CCmdUI* pCmdUI);
00056   afx_msg void OnGoAddress();
00057   afx_msg void OnUpdateGoAddress(CCmdUI* pCmdUI);
00058   afx_msg void OnViewStop();
00059   afx_msg void OnUpdateViewStop(CCmdUI* pCmdUI);
00060   afx_msg void OnViewRefresh();
00061   afx_msg void OnUpdateViewRefresh(CCmdUI* pCmdUI);
00062
00063   DECLARE_MESSAGE_MAP()
00064 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/enterdlg.h Source File

  • general
  • viewex

enterdlg.h

Go to the documentation of this file.
00001 // enterdlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CEnterDlg dialog
00014
00015 class CEnterDlg : public CDialog
00016 {
00017   DECLARE_DYNAMIC(CEnterDlg)
00018 // Construction
00019 public:
00020   CEnterDlg(CWnd* pParent = NULL);    // standard constructor
00021
00022 // Dialog Data
00023   //{{AFX_DATA(CEnterDlg)
00024   enum { IDD = IDD_CHANGEDATA };
00025   CString m_strInput;
00026   //}}AFX_DATA
00027
00028 // Implementation
00029 protected:
00030   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00031
00032   // Generated message map functions
00033   //{{AFX_MSG(CEnterDlg)
00034   //}}AFX_MSG
00035   DECLARE_MESSAGE_MAP()
00036 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatta.cpp Source File

  • vc2008fp
  • WordPad

formatta.cpp

Go to the documentation of this file.
00001 //
00002 // formatta.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "formatta.h"
00017 #include "ddxm.h"
00018 #include "helpids.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 const DWORD CFormatTabDlg::m_nHelpIDs[] =
00026 {
00027   IDC_BUTTON_SET, IDH_WORDPAD_TABSET,
00028   IDC_BUTTON_CLEAR, IDH_WORDPAD_TABCLEAR,
00029   IDC_BUTTON_CLEARALL, IDH_WORDPAD_TAB_CLEARALL,
00030   IDC_COMBO1, IDH_WORDPAD_TABSTOPS,
00031   IDC_BOX, IDH_COMM_GROUPBOX,
00032   0, 0
00033 };
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CFormatTabDlg dialog
00037
00038 CFormatTabDlg::CFormatTabDlg(WPD_PARAFORMAT& pf, CWnd* pParent /*=NULL*/)
00039   : CCSDialog(CFormatTabDlg::IDD, pParent)
00040 {
00041   m_pf = pf;
00042   m_tabarray = new LONG[MAX_TAB_STOPS];
00043   m_nCount = 0;
00044   if (m_pf.dwMask & PFM_TABSTOPS)
00045   {
00046     m_nCount = m_pf.cTabCount;
00047     ASSERT(m_pf.cTabCount <= MAX_TAB_STOPS);
00048     for (int i=0;i<m_pf.cTabCount;i++)
00049       m_tabarray[i] = m_pf.rgxTabs[i];
00050   }
00051
00052   //{{AFX_DATA_INIT(CFormatTabDlg)
00053   //}}AFX_DATA_INIT
00054 }
00055
00056 CFormatTabDlg::~CFormatTabDlg()
00057 {
00058   delete [] m_tabarray;
00059 }
00060
00061 void CFormatTabDlg::DoDataExchange(CDataExchange* pDX)
00062 {
00063   CCSDialog::DoDataExchange(pDX);
00064   //{{AFX_DATA_MAP(CFormatTabDlg)
00065   DDX_Control(pDX, IDC_BUTTON_CLEARALL, m_buttonClearAll);
00066   DDX_Control(pDX, IDC_BUTTON_SET, m_buttonSet);
00067   DDX_Control(pDX, IDC_BUTTON_CLEAR, m_buttonClear);
00068   DDX_Control(pDX, IDC_COMBO1, m_comboBox);
00069   //}}AFX_DATA_MAP
00070   if (!pDX->m_bSaveAndValidate)
00071     UpdateListBox();
00072 }
00073
00074 BEGIN_MESSAGE_MAP(CFormatTabDlg, CCSDialog)
00075   //{{AFX_MSG_MAP(CFormatTabDlg)
00076   ON_BN_CLICKED(IDC_BUTTON_CLEAR, OnClickedClear)
00077   ON_BN_CLICKED(IDC_BUTTON_CLEARALL, OnClickedClearAll)
00078   ON_BN_CLICKED(IDC_BUTTON_SET, OnClickedSet)
00079   ON_CBN_EDITCHANGE(IDC_COMBO1, OnEditChange)
00080   ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchange)
00081   //}}AFX_MSG_MAP
00082 END_MESSAGE_MAP()
00083
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CFormatTabDlg message handlers
00087
00088 void CFormatTabDlg::OnClickedClear()
00089 {
00090   int nTab;
00091   int nSel = m_comboBox.GetCurSel();
00092   if (nSel == CB_ERR)
00093   {
00094     CDataExchange dx(this, TRUE);
00095     DDX_Twips(&dx, IDC_COMBO1, nTab);
00096     DDV_MinMaxTwips(&dx, nTab, 0, 31680);
00097     if (nTab != DDXM_BLANK)
00098     {
00099         if (RemoveTabFromArray(nTab))
00100           UpdateListBox();
00101     }
00102   }
00103   else
00104   {
00105     ASSERT(nSel < m_nCount);
00106     RemoveTabFromArrayByIndex(nSel);
00107     UpdateListBox();
00108   }
00109   UpdateButtons();
00110   SetEditFocus();
00111 }
00112
00113 void CFormatTabDlg::OnClickedClearAll()
00114 {
00115   m_nCount = 0;
00116   m_comboBox.ResetContent();
00117   UpdateButtons();
00118   SetEditFocus();
00119 }
00120
00121 void CFormatTabDlg::OnClickedSet()
00122 {
00123   Set();
00124   UpdateButtons();
00125   SetEditFocus();
00126 }
00127
00128 BOOL CFormatTabDlg::Set()
00129 {
00130   int nTab;
00131   CDataExchange dx(this, TRUE);
00132   DDX_Twips(&dx, IDC_COMBO1, nTab);
00133   DDV_MinMaxTwips(&dx, nTab, 0, 31680);
00134   if (nTab != DDXM_BLANK)
00135   {
00136     if (m_nCount == MAX_TAB_STOPS)
00137     {
00138       AfxMessageBox(IDS_NOMORETABS);
00139       m_comboBox.Clear();
00140       return FALSE;
00141     }
00142     if (AddTabToArray(nTab))
00143       UpdateListBox();
00144     return TRUE;
00145   }
00146   return FALSE;
00147 }
00148
00149 void CFormatTabDlg::SetEditFocus()
00150 {
00151   m_comboBox.SetFocus();
00152   m_comboBox.SetEditSel(0,-1);
00153 }
00154
00155 BOOL CFormatTabDlg::RemoveTabFromArray(LONG lTab)
00156 {
00157   int i;
00158   for (i=0;i<m_nCount;i++)
00159   {
00160     if (m_tabarray[i] == lTab)
00161     {
00162       RemoveTabFromArrayByIndex(i);
00163       return TRUE;
00164     }
00165   }
00166   return FALSE;
00167 }
00168
00169 void CFormatTabDlg::RemoveTabFromArrayByIndex(int nIndex)
00170 {
00171   memmove(&m_tabarray[nIndex], &m_tabarray[nIndex+1],
00172     (m_nCount-nIndex-1)*sizeof(LONG));
00173   m_nCount--;
00174 }
00175
00176 BOOL CFormatTabDlg::AddTabToArray(LONG lTab)
00177 {
00178   int i;
00179   BOOL bInsert = FALSE;
00180   LONG lTemp;
00181   for (i=0;i<m_nCount;i++)
00182   {
00183     if (!bInsert && lTab < m_tabarray[i])
00184       bInsert = TRUE;
00185     else if (lTab == m_tabarray[i]) // we don't want repeats
00186       return FALSE;
00187     if (bInsert)
00188     {
00189       lTemp = m_tabarray[i];
00190       m_tabarray[i] = lTab;
00191       lTab = lTemp;
00192     }
00193   }
00194   m_tabarray[m_nCount++] = lTab;
00195   return TRUE;
00196 }
00197
00198 void CFormatTabDlg::UpdateListBox()
00199 {
00200   int i;
00201   TCHAR szT[64];
00202   ASSERT(m_nCount >= 0);
00203   m_comboBox.ResetContent();
00204   for (i=0;i<m_nCount;i++)
00205   {
00206     theApp.PrintTwips(szT, m_tabarray[i], 2);
00207     m_comboBox.AddString(szT);
00208   }
00209 }
00210
00211 void CFormatTabDlg::OnOK()
00212 {
00213   if (m_buttonSet.IsWindowEnabled())
00214   {
00215     if (!Set())
00216       return;
00217   }
00218   CCSDialog::OnOK();
00219   m_pf.cTabCount = (SHORT) m_nCount;
00220   for (int i=0;i<m_nCount;i++)
00221     m_pf.rgxTabs[i] = m_tabarray[i];
00222   m_pf.dwMask = PFM_TABSTOPS;
00223 }
00224
00225 void CFormatTabDlg::OnEditChange()
00226 {
00227   UpdateButtons();
00228 }
00229
00230 void CFormatTabDlg::UpdateButton(CButton& button, BOOL b)
00231 {
00232   if (b != button.IsWindowEnabled())
00233     button.EnableWindow(b);
00234 }
00235
00236 void CFormatTabDlg::UpdateButtons()
00237 {
00238   UpdateButton(m_buttonClearAll, m_nCount > 0);
00239   BOOL bHasText = (m_comboBox.GetWindowTextLength() > 0);
00240   UpdateButton(m_buttonSet, bHasText);
00241   UpdateButton(m_buttonClear, bHasText);
00242   WORD wID = LOWORD(GetDefID());
00243   if (bHasText && wID != IDC_BUTTON_SET)
00244     SetDefID(IDC_BUTTON_SET);
00245   else if (!bHasText && wID != IDOK)
00246     SetDefID(IDOK);
00247 }
00248
00249 BOOL CFormatTabDlg::OnInitDialog()
00250 {
00251   CCSDialog::OnInitDialog();
00252   UpdateButtons();
00253   return TRUE;  // return TRUE unless you set the focus to a control
00254           // EXCEPTION: OCX Property Pages should return FALSE
00255 }
00256
00257 void CFormatTabDlg::OnSelchange()
00258 {
00259   UpdateButton(m_buttonClearAll, m_nCount > 0);
00260   // force these since if the edit control is empty and
00261   // an item in the box is clicked on, the edit control will
00262   // not be filled in first
00263   UpdateButton(m_buttonSet, TRUE);
00264   UpdateButton(m_buttonClear, TRUE);
00265   WORD wID = LOWORD(GetDefID());
00266   if (wID != IDC_BUTTON_SET)
00267     SetDefID(IDC_BUTTON_SET);
00268 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/Explorer.cpp Source File

  • vc2008fp
  • Explorer

Explorer.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Explorer.h"
00013
00014 #include "MainFrm.h"
00015 #include "ExplorerDoc.h"
00016 #include "ExplorerView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CExplorerApp
00026
00027 BEGIN_MESSAGE_MAP(CExplorerApp, CWinAppEx)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CExplorerApp construction
00038
00039 CExplorerApp::CExplorerApp() : CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CExplorerApp object
00047
00048 CExplorerApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CExplorerApp initialization
00052
00053 BOOL CExplorerApp::InitInstance()
00054 {
00055   // Initialize OLE libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   CoInitialize (NULL);
00063
00064   AfxEnableControlContainer();
00065
00066   // Standard initialization
00067   // If you are not using these features and wish to reduce the size
00068   //  of your final executable, you should remove from the following
00069   //  the specific initialization routines you do not need.
00070
00071   // Change the registry key under which our settings are stored.
00072   // TODO: You should modify this string to be something appropriate
00073   // such as the name of your company or organization.
00074   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00075
00076   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00077
00078   SetRegistryBase (_T("Settings"));
00079
00080   // Initialize all Managers for usage. They are automatically constructed
00081   // if not yet present
00082   InitContextMenuManager();
00083   InitKeyboardManager();
00084   InitShellManager();
00085
00086   // Enable user-defined tools. If you want allow more than 10 tools,
00087   // add tools entry to resources (ID_USER_TOOL11, ID_USER_TOOL12,...)
00088   EnableUserTools (ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10);
00089
00090   // Register the application's document templates.  Document templates
00091   //  serve as the connection between documents, frame windows and views.
00092
00093   CSingleDocTemplate* pDocTemplate;
00094   pDocTemplate = new CSingleDocTemplate(
00095     IDR_MAINFRAME,
00096     RUNTIME_CLASS(CExplorerDoc),
00097     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00098     RUNTIME_CLASS(CExplorerView));
00099   AddDocTemplate(pDocTemplate);
00100
00101   // Parse command line for standard shell commands, DDE, file open
00102   CCommandLineInfo cmdInfo;
00103   ParseCommandLine(cmdInfo);
00104
00105   // Dispatch commands specified on the command line
00106   if (!ProcessShellCommand(cmdInfo))
00107     return FALSE;
00108
00109   // The one and only window has been initialized, so show and update it.
00110   m_pMainWnd->ShowWindow(SW_SHOW);
00111   m_pMainWnd->UpdateWindow();
00112
00113   return TRUE;
00114 }
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // CExplorerApp message handlers
00118
00119 int CExplorerApp::ExitInstance()
00120 {
00121   CoUninitialize ();
00122   return CWinAppEx::ExitInstance();
00123 }
00124
00125 void CExplorerApp::PreLoadState ()
00126 {
00127   // TODO: add another context menus here
00128 }
00129
00130
00131 /////////////////////////////////////////////////////////////////////////////
00132 // CAboutDlg dialog used for App About
00133
00134 class CAboutDlg : public CDialog
00135 {
00136 public:
00137   CAboutDlg();
00138
00139 // Dialog Data
00140   //{{AFX_DATA(CAboutDlg)
00141   enum { IDD = IDD_ABOUTBOX };
00142   //}}AFX_DATA
00143
00144   // ClassWizard generated virtual function overrides
00145   //{{AFX_VIRTUAL(CAboutDlg)
00146   protected:
00147   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00148   //}}AFX_VIRTUAL
00149
00150 // Implementation
00151 protected:
00152   //{{AFX_MSG(CAboutDlg)
00153     // No message handlers
00154   //}}AFX_MSG
00155   DECLARE_MESSAGE_MAP()
00156 };
00157
00158 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00159 {
00160   //{{AFX_DATA_INIT(CAboutDlg)
00161   //}}AFX_DATA_INIT
00162 }
00163
00164 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00165 {
00166   CDialog::DoDataExchange(pDX);
00167   //{{AFX_DATA_MAP(CAboutDlg)
00168   //}}AFX_DATA_MAP
00169 }
00170
00171 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00172   //{{AFX_MSG_MAP(CAboutDlg)
00173     // No message handlers
00174   //}}AFX_MSG_MAP
00175 END_MESSAGE_MAP()
00176
00177 // App command to run the dialog
00178 void CExplorerApp::OnAppAbout()
00179 {
00180   CAboutDlg aboutDlg;
00181   aboutDlg.DoModal();
00182 }
00183
00184 /////////////////////////////////////////////////////////////////////////////
00185 // CExplorerApp message handlers
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNetAddrVerifierDlg Member List

This is the complete list of members for CNetAddrVerifierDlg, including all inherited members.
AddressKind enum name | CNetAddrVerifierDlg |
AllKinds enum value | CNetAddrVerifierDlg |
CNetAddrVerifierDlg(CWnd *pParent=NULL) | CNetAddrVerifierDlg |
ConstructAddrMask(AddressKind kind) | CNetAddrVerifierDlg |
DoDataExchange(CDataExchange *pDX) | CNetAddrVerifierDlg | [protected, virtual]
Enum() | CNetAddrVerifierDlg |
IDD enum value | CNetAddrVerifierDlg |
IPv4 enum value | CNetAddrVerifierDlg |
Ipv4AddrToString(IN_ADDR &addr) | CNetAddrVerifierDlg |
IPv6 enum value | CNetAddrVerifierDlg |
Ipv6AddrToString(IN6_ADDR &addr) | CNetAddrVerifierDlg |
m_fVista | CNetAddrVerifierDlg |
m_hIcon | CNetAddrVerifierDlg | [protected]
m_listCtrl | CNetAddrVerifierDlg |
m_pButton | CNetAddrVerifierDlg |
m_pEdit | CNetAddrVerifierDlg |
m_pNetAddr | CNetAddrVerifierDlg |
m_pValidateBtn | CNetAddrVerifierDlg |
m_strParsedAddr | CNetAddrVerifierDlg |
Named enum value | CNetAddrVerifierDlg |
NoKind enum value | CNetAddrVerifierDlg |
OnBnClickedButton1() | CNetAddrVerifierDlg |
OnInitDialog() | CNetAddrVerifierDlg | [protected, virtual]
OnPaint() | CNetAddrVerifierDlg | [protected]
OnQueryDragIcon() | CNetAddrVerifierDlg | [protected]
OnVerifyAll() | CNetAddrVerifierDlg |
OnVerifyIPv4() | CNetAddrVerifierDlg |
OnVerifyIPv6() | CNetAddrVerifierDlg |
OnVerifyNamed() | CNetAddrVerifierDlg |
Revalidate() | CNetAddrVerifierDlg |
Verify(AddressKind kind) | CNetAddrVerifierDlg |
~CNetAddrVerifierDlg() | CNetAddrVerifierDlg |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/EvLogPg.H Source File

  • ole
  • TstCon

EvLogPg.H

Go to the documentation of this file.
00001 // File: EvLogPg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_EVENTLOGGINGPAGE_H__CAC42500_E29A_11D0_8E15_00C04FB68D60__INCLUDED_)
00011 #define AFX_EVENTLOGGINGPAGE_H__CAC42500_E29A_11D0_8E15_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // EventLoggingPage.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CEventLoggingPage dialog
00021
00022 class CEventLoggingPage : public CPropertyPage
00023 {
00024   DECLARE_DYNCREATE(CEventLoggingPage)
00025
00026 // Construction
00027 public:
00028   CEventLoggingPage();
00029   ~CEventLoggingPage();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CEventLoggingPage)
00033   enum { IDD = IDD_CONTROLLOGGING_EVENTS };
00034   CCheckListBox   m_lbEvents;
00035   //}}AFX_DATA
00036
00037    CStringArray m_astrEventNames;
00038    CUIntArray m_atLogFlags;
00039
00040 // Overrides
00041   // ClassWizard generate virtual function overrides
00042   //{{AFX_VIRTUAL(CEventLoggingPage)
00043   protected:
00044   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00045   //}}AFX_VIRTUAL
00046
00047 // Implementation
00048 protected:
00049   // Generated message map functions
00050   //{{AFX_MSG(CEventLoggingPage)
00051   virtual BOOL OnInitDialog();
00052   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00053   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00054   //}}AFX_MSG
00055   DECLARE_MESSAGE_MAP()
00056
00057 };
00058
00059 //{{AFX_INSERT_LOCATION}}
00060 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00061
00062 #endif // !defined(AFX_EVENTLOGGINGPAGE_H__CAC42500_E29A_11D0_8E15_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TabOrdDg.Cpp Source File

  • ole
  • TstCon

TabOrdDg.Cpp

Go to the documentation of this file.
00001 // TabOrderDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CTabOrderDlg dialog
00022
00023
00024 CTabOrderDlg::CTabOrderDlg( CWnd* pParent ) :
00025    CDialog( CTabOrderDlg::IDD, pParent )
00026 {
00027   //{{AFX_DATA_INIT(CTabOrderDlg)
00028     // NOTE: the ClassWizard will add member initialization here
00029   //}}AFX_DATA_INIT
00030 }
00031
00032 void CTabOrderDlg::DoDataExchange( CDataExchange* pDX )
00033 {
00034    int nItems;
00035    int iItem;
00036    CTestContainer98Item* pItem;
00037    CString strItemName;
00038    POSITION posItem;
00039
00040   CDialog::DoDataExchange( pDX );
00041   //{{AFX_DATA_MAP(CTabOrderDlg)
00042   DDX_Control(pDX, IDC_TABORDER, m_lboxTabOrder);
00043   //}}AFX_DATA_MAP
00044
00045    if( pDX->m_bSaveAndValidate )
00046    {
00047     m_lpTabOrder.RemoveAll();
00048     nItems = m_lboxTabOrder.GetCount();
00049     for( iItem = 0; iItem < nItems; iItem++ )
00050     {
00051      pItem = (CTestContainer98Item*)m_lboxTabOrder.GetItemDataPtr( iItem );
00052      ASSERT( pItem != NULL );
00053      m_lpTabOrder.AddTail( pItem );
00054     }
00055    }
00056    else
00057    {
00058     m_lboxTabOrder.ResetContent();
00059     posItem = m_lpTabOrder.GetHeadPosition();
00060     while( posItem != NULL )
00061     {
00062      pItem = m_lpTabOrder.GetNext( posItem );
00063      ENSURE( pItem != NULL );
00064      strItemName = pItem->GetDisplayName();
00065      iItem = m_lboxTabOrder.AddString( strItemName );
00066      m_lboxTabOrder.SetItemDataPtr( iItem, pItem );
00067     }
00068    }
00069 }
00070
00071
00072 BEGIN_MESSAGE_MAP( CTabOrderDlg, CDialog )
00073   //{{AFX_MSG_MAP(CTabOrderDlg)
00074   ON_WM_HELPINFO()
00075   ON_WM_CONTEXTMENU()
00076   //}}AFX_MSG_MAP
00077 END_MESSAGE_MAP()
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CTabOrderDlg message handlers
00081
00082 BOOL CTabOrderDlg::OnInitDialog()
00083 {
00084   CDialog::OnInitDialog();
00085
00086    return( TRUE );
00087 }
00088
00089
00090 static DWORD rgmapCHID[] =
00091 {
00092    IDC_TABORDER, HIDC_TABORDER,
00093    0, 0
00094 };
00095
00096 BOOL CTabOrderDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00097 {
00098   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00099   strPath += _T("::/popups.txt");
00100
00101   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00102 }
00103
00104 void CTabOrderDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00105 {
00106   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00107   strPath += _T("::/popups.txt");
00108
00109   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00110 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTimePropPage Member List

This is the complete list of members for CTimePropPage, including all inherited members.
CTimePropPage() | CTimePropPage |
DoDataExchange(CDataExchange *pDX) | CTimePropPage | [protected, virtual]
IDD enum value | CTimePropPage |
m_Enabled | CTimePropPage |
m_Interval | CTimePropPage |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/shapesvw.h Source File

  • general
  • propdlg

shapesvw.h

Go to the documentation of this file.
00001 // shapesvw.h : interface of the CShapesView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CShapesView : public CView
00013 {
00014 protected: // create from serialization only
00015   CShapesView();
00016   DECLARE_DYNCREATE(CShapesView)
00017
00018 // Attributes
00019 public:
00020   CShapesDoc* GetDocument();
00021   CShape* m_pShapeSelected;
00022 protected:
00023   CModalShapePropSheet* m_pModalShapePropSheet;
00024
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   // ClassWizard generate virtual function overrides
00031   //{{AFX_VIRTUAL(CShapesView)
00032   public:
00033   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00034   protected:
00035   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00036   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00037   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 public:
00042   CModelessShapePropSheet* GetModelessShapePropSheet();
00043
00044   virtual ~CShapesView();
00045 #ifdef _DEBUG
00046   virtual void AssertValid() const;
00047   virtual void Dump(CDumpContext& dc) const;
00048 #endif
00049
00050 // Generated message map functions
00051 protected:
00052   //{{AFX_MSG(CShapesView)
00053   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00054   afx_msg void OnSimplePropertySheet();
00055   afx_msg void OnUpdateSimplePropertySheet(CCmdUI* pCmdUI);
00056   afx_msg void OnPropertySheetWithPreview();
00057   afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00058   afx_msg void OnUpdatePropertySheetWithPreview(CCmdUI* pCmdUI);
00059   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00060   //}}AFX_MSG
00061    afx_msg LRESULT OnChangeObjectProps(WPARAM wParam, LPARAM lParam);
00062   DECLARE_MESSAGE_MAP()
00063 };
00064
00065 #ifndef _DEBUG  // debug version in shapesvw.cpp
00066 inline CShapesDoc* CShapesView::GetDocument()
00067    { return (CShapesDoc*)m_pDocument; }
00068 #endif
00069
00070 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDBVListView Member List

This is the complete list of members for CDBVListView, including all inherited members.
CDBVListView() | CDBVListView | [protected]
DoDataExchange(CDataExchange *pDX) | CDBVListView | [protected, virtual]
GetDocument() | CDBVListView | [inline]
IDD enum value | CDBVListView |
m_pSet | CDBVListView |
m_strDiv | CDBVListView |
OnFetch() | CDBVListView | [protected]
OnGetRecordset() | CDBVListView | [virtual]
OnInitialUpdate() | CDBVListView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CDBVListView | [virtual]
~CDBVListView() | CDBVListView | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFoldersTree Member List

This is the complete list of members for CFoldersTree, including all inherited members.
CFoldersTree(const CObList &lstWorkspaces, CImageList &images) | CFoldersTree |
m_images | CFoldersTree | [protected]
m_Items | CFoldersTree | [protected]
m_lstWorkspaces | CFoldersTree | [protected]
m_wndFolders | CFoldersTree | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CFoldersTree | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CFoldersTree | [protected, virtual]
SelectWorkspace(CWorkspaceObj *pWS) | CFoldersTree |
~CFoldersTree() | CFoldersTree | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsView.h Source File

  • vc2008fp
  • RibbonGadgets

RibbonGadgetsView.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CRibbonGadgetsView : public CView
00015 {
00016 protected: // create from serialization only
00017   CRibbonGadgetsView();
00018   DECLARE_DYNCREATE(CRibbonGadgetsView)
00019
00020 // Attributes
00021 public:
00022   CRibbonGadgetsDoc* GetDocument();
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   public:
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual HMENU GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE* );
00033   virtual void OnDraw(CDC* pDC);
00034
00035 // Implementation
00036 public:
00037   virtual ~CRibbonGadgetsView();
00038
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043
00044 protected:
00045   afx_msg void OnFilePrintPreview();
00046   afx_msg void OnDestroy();
00047   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00048   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00049
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 #ifndef _DEBUG  // debug version in RibbonGadgetsView.cpp
00054 inline CRibbonGadgetsDoc* CRibbonGadgetsView::GetDocument()
00055    { return (CRibbonGadgetsDoc*)m_pDocument; }
00056 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/push/pushctl.cpp Source File

  • controls
  • push

pushctl.cpp

Go to the documentation of this file.
00001 // pushctl.cpp : Implementation of the CPushCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "push.h"
00015 #include "pushctl.h"
00016 #include "pushppg.h"
00017
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 IMPLEMENT_DYNCREATE(CPushCtrl, COleControl)
00026
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // Message map
00030
00031 BEGIN_MESSAGE_MAP(CPushCtrl, COleControl)
00032   //{{AFX_MSG_MAP(CPushCtrl)
00033   ON_MESSAGE(OCM_COMMAND, OnOcmCommand)
00034   ON_MESSAGE(OCM_DRAWITEM, OnOcmDrawItem)
00035   ON_WM_ERASEBKGND()
00036   //}}AFX_MSG_MAP
00037   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00038 END_MESSAGE_MAP()
00039
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // Dispatch map
00043
00044 BEGIN_DISPATCH_MAP(CPushCtrl, COleControl)
00045   //{{AFX_DISPATCH_MAP(CPushCtrl)
00046   DISP_STOCKPROP_BORDERSTYLE()
00047   DISP_STOCKPROP_CAPTION()
00048   DISP_STOCKPROP_ENABLED()
00049   //}}AFX_DISPATCH_MAP
00050   DISP_FUNCTION_ID(CPushCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00051 END_DISPATCH_MAP()
00052
00053
00054 /////////////////////////////////////////////////////////////////////////////
00055 // Event map
00056
00057 BEGIN_EVENT_MAP(CPushCtrl, COleControl)
00058   //{{AFX_EVENT_MAP(CPushCtrl)
00059   EVENT_CUSTOM("CustomClick", FireCustomClick, VTS_BSTR  VTS_I2)
00060   //}}AFX_EVENT_MAP
00061 END_EVENT_MAP()
00062
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // Property pages
00066
00067 // TODO: Add more property pages as needed.  Remember to increase the count!
00068 BEGIN_PROPPAGEIDS(CPushCtrl, 1)
00069   PROPPAGEID(CPushPropPage::guid)
00070 END_PROPPAGEIDS(CPushCtrl)
00071
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // Initialize class factory and guid
00075
00076 IMPLEMENT_OLECREATE_EX(CPushCtrl, "PUSH.PushCtrl.1",
00077   0x75303863, 0xb925, 0x101a, 0xb5, 0x7a, 0x0, 0x0, 0xc0, 0xc3, 0xed, 0x5f)
00078
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // Type library ID and version
00082
00083 IMPLEMENT_OLETYPELIB(CPushCtrl, _tlid, _wVerMajor, _wVerMinor)
00084
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // Interface IDs
00088
00089 const IID BASED_CODE IID_DPush =
00090     { 0x37446b86, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00091 const IID BASED_CODE IID_DPushEvents =
00092     { 0x37446b87, 0x5870, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00093
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // Control type information
00097
00098 static const DWORD BASED_CODE _dwPushOleMisc =
00099   OLEMISC_ACTIVATEWHENVISIBLE |
00100   OLEMISC_SETCLIENTSITEFIRST |
00101   OLEMISC_INSIDEOUT |
00102   OLEMISC_CANTLINKINSIDE |
00103   OLEMISC_RECOMPOSEONRESIZE;
00104
00105 IMPLEMENT_OLECTLTYPE(CPushCtrl, IDS_PUSH, _dwPushOleMisc)
00106
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CPushCtrl::CPushCtrlFactory::UpdateRegistry -
00110 // Adds or removes system registry entries for CPushCtrl
00111
00112 BOOL CPushCtrl::CPushCtrlFactory::UpdateRegistry(BOOL bRegister)
00113 {
00114   if (bRegister)
00115     return AfxOleRegisterControlClass(
00116       AfxGetInstanceHandle(),
00117       m_clsid,
00118       m_lpszProgID,
00119       IDS_PUSH,
00120       IDB_PUSH,
00121       FALSE,                      //  Not insertable
00122       _dwPushOleMisc,
00123       _tlid,
00124       _wVerMajor,
00125       _wVerMinor);
00126   else
00127     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00128 }
00129
00130
00131 /////////////////////////////////////////////////////////////////////////////
00132 // CPushCtrl::CPushCtrl - Constructor
00133
00134 CPushCtrl::CPushCtrl()
00135 {
00136   InitializeIIDs(&IID_DPush, &IID_DPushEvents);
00137
00138   SetInitialSize(28, 28);
00139 }
00140
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CPushCtrl::~CPushCtrl - Destructor
00144
00145 CPushCtrl::~CPushCtrl()
00146 {
00147 }
00148
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CPushCtrl::OnDraw - Drawing function
00152
00153 void CPushCtrl::OnDraw(
00154       CDC* pdc, const CRect& rcBounds, const CRect&)
00155 {
00156   DoSuperclassPaint(pdc, rcBounds);
00157 }
00158
00159
00160 /////////////////////////////////////////////////////////////////////////////
00161 // CPushCtrl::DoPropExchange - Persistence support
00162
00163 void CPushCtrl::DoPropExchange(CPropExchange* pPX)
00164 {
00165   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00166   COleControl::DoPropExchange(pPX);
00167 }
00168
00169
00170 /////////////////////////////////////////////////////////////////////////////
00171 // CPushCtrl::OnResetState - Reset control to default state
00172
00173 void CPushCtrl::OnResetState()
00174 {
00175   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00176 }
00177
00178
00179 /////////////////////////////////////////////////////////////////////////////
00180 // CPushCtrl::AboutBox - Display an "About" box to the user
00181
00182 void CPushCtrl::AboutBox()
00183 {
00184   CDialog dlgAbout(IDD_ABOUTBOX_PUSH);
00185   dlgAbout.DoModal();
00186 }
00187
00188
00189 /////////////////////////////////////////////////////////////////////////////
00190 // CPushCtrl::PreCreateWindow - Modify parameters for CreateWindowEx
00191
00192 BOOL CPushCtrl::PreCreateWindow(CREATESTRUCT& cs)
00193 {
00194   cs.lpszClass = _T("BUTTON");
00195   cs.style |= BS_PUSHBUTTON | BS_OWNERDRAW;
00196   return COleControl::PreCreateWindow(cs);
00197 }
00198
00199
00200 /////////////////////////////////////////////////////////////////////////////
00201 // CPushCtrl::IsSubclassedControl - This is a subclassed control
00202
00203 BOOL CPushCtrl::IsSubclassedControl()
00204 {
00205   return TRUE;
00206 }
00207
00208
00209 /////////////////////////////////////////////////////////////////////////////
00210 // CPushCtrl::OnOcmCommand - Handle command messages
00211
00212 LRESULT CPushCtrl::OnOcmCommand(WPARAM wParam, LPARAM lParam)
00213 {
00214 #ifdef _WIN32
00215   lParam;
00216   WORD wNotifyCode = HIWORD(wParam);
00217 #else
00218   wParam;
00219   WORD wNotifyCode = HIWORD(lParam);
00220 #endif
00221
00222   switch (wNotifyCode)
00223   {
00224   case BN_CLICKED:
00225
00226     // Fire custom click event, sending caption
00227     CString strCaption = InternalGetText();
00228     FireCustomClick(strCaption, (short) strCaption.GetLength());
00229
00230     break;
00231   }
00232
00233   return 0;
00234 }
00235
00236
00237 /////////////////////////////////////////////////////////////////////////////
00238 // CPushCtrl::OnEraseBkgnd - Simply return TRUE so background is not erased.
00239
00240 BOOL CPushCtrl::OnEraseBkgnd(CDC*)
00241 {
00242   return TRUE;
00243 }
00244
00245
00246 ////////////////////////////////////////////////////////////////////////////
00247 // CPushCtrl::OnOcmDrawItem - Draw an item.
00248
00249 LRESULT CPushCtrl::OnOcmDrawItem(WPARAM, LPARAM lParam)
00250 {
00251   DrawItem((LPDRAWITEMSTRUCT)lParam);
00252
00253   return 1;
00254 }
00255
00256
00257 /////////////////////////////////////////////////////////////////////////////
00258 // CPushCtrl::DrawItem - Draw an item.
00259
00260 void CPushCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00261 {
00262   CDC *pdc;
00263   int bmpId;
00264   CBitmap bitmap;
00265   BITMAP  bmp;
00266   CPictureHolder picHolder;
00267   CRect rcSrcBounds;
00268
00269   CPen* pOldPen;
00270   RECT    rect;
00271   SHORT   inflate;
00272
00273   pdc = CDC::FromHandle(lpDrawItemStruct->hDC);
00274
00275   switch (lpDrawItemStruct->itemAction)
00276   {
00277     case ODA_DRAWENTIRE:
00278     case ODA_SELECT:
00279       // Load "up" or "down" bitmap depending on selection state
00280       bmpId = (lpDrawItemStruct->itemState & ODS_SELECTED) ? IDB_DOWNBITMAP
00281         : IDB_UPBITMAP;
00282       bitmap.LoadBitmap(bmpId);
00283       bitmap.GetObject(sizeof(BITMAP), &bmp);
00284       rcSrcBounds.right = bmp.bmWidth;
00285       rcSrcBounds.bottom = bmp.bmHeight;
00286
00287       // Create picture and render
00288       picHolder.CreateFromBitmap((HBITMAP)bitmap.m_hObject, NULL, FALSE);
00289       picHolder.Render(pdc, lpDrawItemStruct->rcItem, rcSrcBounds);
00290
00291       break;
00292
00293     case ODA_FOCUS:
00294       // Just draw focus rect
00295       pOldPen = (CPen*)pdc->SelectStockObject(BLACK_PEN);
00296       if (lpDrawItemStruct->itemState & ODS_FOCUS)
00297       {
00298         CopyRect((LPRECT)&rect, (LPRECT)&lpDrawItemStruct->rcItem);
00299         inflate = (SHORT)min(3,min(rect.right  - rect.left + 1,
00300           rect.bottom - rect.top  + 1) / 5);
00301         InflateRect(&rect, -inflate, -inflate);
00302         pdc->DrawFocusRect(&rect);
00303       }
00304       pdc->SelectObject(pOldPen);
00305       break;
00306   }
00307 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDriverView Member List

This is the complete list of members for CDriverView, including all inherited members.
CDriverView() | CDriverView | [protected]
DoDataExchange(CDataExchange *pDX) | CDriverView | [protected, virtual]
GetDocument() | CDriverView | [inline]
GetFromVariant() | CDriverView | [protected]
GetToVariant() | CDriverView | [protected]
IDD enum value | CDriverView |
m_bInitialized | CDriverView | [protected]
m_ctrlType | CDriverView |
m_ctrlValue | CDriverView |
m_strCurrentCount | CDriverView | [protected]
m_strLastType | CDriverView | [protected]
m_strLastValue | CDriverView | [protected]
m_toType | CDriverView |
m_toValue | CDriverView |
OnAdd() | CDriverView | [protected]
OnButton1() | CDriverView | [protected]
OnButton2() | CDriverView | [protected]
OnInitialUpdate() | CDriverView | [virtual]
OnLookup() | CDriverView | [protected]
OnRemove() | CDriverView | [protected]
UpdateCurrentCount() | CDriverView | [protected]
UpdateCurrentVariant(VARIANT &va) | CDriverView | [protected]
UpdateToNothing() | CDriverView | [protected]
~CDriverView() | CDriverView | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/mainfrm.cpp Source File

  • ole
  • wordpad

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #include "wordpad.h"
00015 #include "mainfrm.h"
00016 #include "wordpdoc.h"
00017 #include "wordpvw.h"
00018 #include "strings.h"
00019 #include "colorlis.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMainFrame
00028
00029 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00030
00031 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00032   //{{AFX_MSG_MAP(CMainFrame)
00033   ON_WM_CREATE()
00034   ON_WM_SYSCOLORCHANGE()
00035   ON_WM_SIZE()
00036   ON_WM_MOVE()
00037   ON_COMMAND(ID_HELP, OnHelpFinder)
00038   ON_WM_DROPFILES()
00039   ON_COMMAND(ID_CHAR_COLOR, OnCharColor)
00040   ON_COMMAND(ID_PEN_TOGGLE, OnPenToggle)
00041   ON_WM_FONTCHANGE()
00042   ON_WM_QUERYNEWPALETTE()
00043   ON_WM_PALETTECHANGED()
00044   ON_WM_DEVMODECHANGE()
00045   ON_COMMAND(ID_HELP_INDEX, OnHelpFinder)
00046   //}}AFX_MSG_MAP
00047   // Global help commands
00048 //  ON_COMMAND(ID_CONTEXT_HELP, CFrameWnd::OnContextHelp)
00049   ON_COMMAND(ID_DEFAULT_HELP, OnHelpFinder)
00050   ON_UPDATE_COMMAND_UI(ID_VIEW_FORMATBAR, OnUpdateControlBarMenu)
00051   ON_UPDATE_COMMAND_UI(ID_VIEW_RULER, OnUpdateControlBarMenu)
00052   ON_MESSAGE(WPM_BARSTATE, OnBarState)
00053   ON_REGISTERED_MESSAGE(CWordPadApp::m_nOpenMsg, OnOpenMsg)
00054   ON_COMMAND_EX(ID_VIEW_STATUS_BAR, OnBarCheck)
00055   ON_COMMAND_EX(ID_VIEW_TOOLBAR, OnBarCheck)
00056   ON_COMMAND_EX(ID_VIEW_FORMATBAR, OnBarCheck)
00057   ON_COMMAND_EX(ID_VIEW_RULER, OnBarCheck)
00058 END_MESSAGE_MAP()
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // arrays of IDs used to initialize control bars
00062
00063 // toolbar buttons - IDs are command buttons
00064 static UINT BASED_CODE toolbar[] =
00065 {
00066   // same order as in the bitmap 'toolbar.bmp'
00067   // (int nBitmap, int nCommand, BYTE byteState, BYTE byteStyle, DWORD dw, int nString)
00068   ID_FILE_NEW,
00069   ID_FILE_OPEN,
00070   ID_FILE_SAVE,
00071 ID_SEPARATOR,
00072   ID_FILE_PRINT_DIRECT,
00073   ID_FILE_PRINT_PREVIEW,
00074 ID_SEPARATOR,
00075   ID_EDIT_FIND,
00076 ID_SEPARATOR,
00077   ID_EDIT_CUT,
00078   ID_EDIT_COPY,
00079   ID_EDIT_PASTE,
00080   ID_EDIT_UNDO,
00081 ID_SEPARATOR,
00082   ID_INSERT_DATE_TIME,
00083 ID_SEPARATOR,
00084   ID_PEN_TOGGLE,
00085   ID_PEN_PERIOD,
00086   ID_PEN_SPACE,
00087   ID_PEN_BACKSPACE,
00088   ID_PEN_NEWLINE,
00089   ID_PEN_LENS
00090 };
00091
00092 #define NUM_PEN_ITEMS 7
00093 #define NUM_PEN_TOGGLE 5
00094
00095 static UINT BASED_CODE format[] =
00096 {
00097   // same order as in the bitmap 'format.bmp'
00098     ID_SEPARATOR, // font name combo box
00099     ID_SEPARATOR,
00100     ID_SEPARATOR, // font size combo box
00101     ID_SEPARATOR,
00102   ID_CHAR_BOLD,
00103   ID_CHAR_ITALIC,
00104   ID_CHAR_UNDERLINE,
00105   ID_CHAR_COLOR,
00106     ID_SEPARATOR,
00107   ID_PARA_LEFT,
00108   ID_PARA_CENTER,
00109   ID_PARA_RIGHT,
00110     ID_SEPARATOR,
00111   ID_INSERT_BULLET,
00112 };
00113
00114 static UINT BASED_CODE indicators[] =
00115 {
00116   ID_SEPARATOR,           // status line indicator
00117   ID_INDICATOR_CAPS,
00118   ID_INDICATOR_NUM,
00119 };
00120
00121 /////////////////////////////////////////////////////////////////////////////
00122 // CMainFrame construction/destruction
00123
00124 CMainFrame::CMainFrame()
00125 {
00126   m_hIconDoc = theApp.LoadIcon(IDI_ICON_DOC);
00127   m_hIconText = theApp.LoadIcon(IDI_ICON_TEXT);
00128   m_hIconWrite = theApp.LoadIcon(IDI_ICON_WRITE);
00129 }
00130
00131 CMainFrame::~CMainFrame()
00132 {
00133 }
00134
00135 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00136 {
00137   WNDCLASS wndcls;
00138
00139   BOOL bRes = CFrameWnd::PreCreateWindow(cs);
00140   HINSTANCE hInst = AfxGetInstanceHandle();
00141
00142   // see if the class already exists
00143   if (!::GetClassInfo(hInst, szWordPadClass, &wndcls))
00144   {
00145     // get default stuff
00146     ::GetClassInfo(hInst, cs.lpszClass, &wndcls);
00147     wndcls.style &= ~(CS_HREDRAW|CS_VREDRAW);
00148     // register a new class
00149     wndcls.lpszClassName = szWordPadClass;
00150     wndcls.hIcon = ::LoadIcon(hInst, MAKEINTRESOURCE(IDR_MAINFRAME));
00151     ASSERT(wndcls.hIcon != NULL);
00152     if (!AfxRegisterClass(&wndcls))
00153       AfxThrowResourceException();
00154   }
00155   cs.lpszClass = szWordPadClass;
00156   CRect rect = theApp.m_rectInitialFrame;
00157   if (rect.Width() > 0 && rect.Height() > 0)
00158   {
00159     // make sure window will be visible
00160     CDisplayIC dc;
00161     CRect rectDisplay(0, 0, dc.GetDeviceCaps(HORZRES),
00162       dc.GetDeviceCaps(VERTRES));
00163     if (rectDisplay.PtInRect(rect.TopLeft()) &&
00164       rectDisplay.PtInRect(rect.BottomRight()))
00165     {
00166       cs.x = rect.left;
00167       cs.y = rect.top;
00168       cs.cx = rect.Width();
00169       cs.cy = rect.Height();
00170     }
00171   }
00172   return bRes;
00173 }
00174
00175 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00176 {
00177   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00178     return -1;
00179
00180   if (!CreateToolBar())
00181     return -1;
00182
00183   if (!CreateFormatBar())
00184     return -1;
00185
00186   if (!CreateStatusBar())
00187     return -1;
00188
00189   EnableDocking(CBRS_ALIGN_ANY);
00190
00191   if (!CreateRulerBar())
00192     return -1;
00193
00194   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00195   m_wndFormatBar.EnableDocking(CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM);
00196   DockControlBar(&m_wndToolBar);
00197   DockControlBar(&m_wndFormatBar);
00198
00199   CWnd* pView = GetDlgItem(AFX_IDW_PANE_FIRST);
00200   if (pView != NULL)
00201   {
00202     pView->SetWindowPos(&wndBottom, 0, 0, 0, 0,
00203       SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
00204   }
00205
00206   return 0;
00207 }
00208
00209 BOOL CMainFrame::CreateToolBar()
00210 {
00211   int nPen = GetSystemMetrics(SM_PENWINDOWS) ? NUM_PEN_TOGGLE :
00212     NUM_PEN_ITEMS;
00213   UINT nID = theApp.m_bLargeIcons ? IDR_MAINFRAME1_BIG :
00214     IDR_MAINFRAME1;
00215   if (!m_wndToolBar.Create(this,
00216     WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC)||
00217     !m_wndToolBar.LoadBitmap(nID) ||
00218     !m_wndToolBar.SetButtons(toolbar, sizeof(toolbar)/sizeof(UINT) - nPen))
00219   {
00220     TRACE0("Failed to create toolbar\n");
00221     return FALSE;      // fail to create
00222   }
00223   if (theApp.m_bLargeIcons)
00224     m_wndToolBar.SetSizes(CSize(31,30), CSize(24,24));
00225   else
00226     m_wndToolBar.SetSizes(CSize(23,22), CSize(16,16));
00227   CString str;
00228   str.LoadString(IDS_TITLE_TOOLBAR);
00229   m_wndToolBar.SetWindowText(str);
00230   return TRUE;
00231 }
00232
00233 BOOL CMainFrame::CreateFormatBar()
00234 {
00235   UINT nID = theApp.m_bLargeIcons ? IDB_FORMATBAR_BIG : IDB_FORMATBAR;
00236   if (!m_wndFormatBar.Create(this,
00237     WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC,
00238     ID_VIEW_FORMATBAR) ||
00239     !m_wndFormatBar.LoadBitmap(nID) ||
00240     !m_wndFormatBar.SetButtons(format, sizeof(format)/sizeof(UINT)))
00241   {
00242     TRACE0("Failed to create FormatBar\n");
00243     return FALSE;      // fail to create
00244   }
00245
00246   if (theApp.m_bLargeIcons)
00247     m_wndFormatBar.SetSizes(CSize(31,30), CSize(24,24));
00248   else
00249     m_wndFormatBar.SetSizes(CSize(23,22), CSize(16,16));
00250   CString str;
00251   str.LoadString(IDS_TITLE_FORMATBAR);
00252   m_wndFormatBar.SetWindowText(str);
00253   m_wndFormatBar.PositionCombos();
00254   return TRUE;
00255 }
00256
00257 BOOL CMainFrame::CreateRulerBar()
00258 {
00259   if (!m_wndRulerBar.Create(this,
00260     WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_HIDE_INPLACE, ID_VIEW_RULER))
00261   {
00262     TRACE0("Failed to create ruler\n");
00263     return FALSE;      // fail to create
00264   }
00265   return TRUE;
00266 }
00267
00268 BOOL CMainFrame::CreateStatusBar()
00269 {
00270   if (!m_wndStatusBar.Create(this) ||
00271     !m_wndStatusBar.SetIndicators(indicators,
00272       sizeof(indicators)/sizeof(UINT)))
00273   {
00274     TRACE0("Failed to create status bar\n");
00275     return FALSE;      // fail to create
00276   }
00277   return TRUE;
00278 }
00279
00280 /////////////////////////////////////////////////////////////////////////////
00281 // CMainFrame Operations
00282
00283 HICON CMainFrame::GetIcon(int nDocType)
00284 {
00285   switch (nDocType)
00286   {
00287     case RD_WINWORD6:
00288     case RD_WORDPAD:
00289     case RD_EMBEDDED:
00290     case RD_RICHTEXT:
00291       return m_hIconDoc;
00292     case RD_TEXT:
00293     case RD_OEMTEXT:
00294       return m_hIconText;
00295     case RD_WRITE:
00296       return m_hIconWrite;
00297   }
00298   return m_hIconDoc;
00299 }
00300
00301 /////////////////////////////////////////////////////////////////////////////
00302 // CMainFrame diagnostics
00303
00304 #ifdef _DEBUG
00305 void CMainFrame::AssertValid() const
00306 {
00307   CFrameWnd::AssertValid();
00308 }
00309
00310 void CMainFrame::Dump(CDumpContext& dc) const
00311 {
00312   CFrameWnd::Dump(dc);
00313 }
00314
00315 #endif //_DEBUG
00316
00317 /////////////////////////////////////////////////////////////////////////////
00318 // CMainFrame message handlers
00319
00320 void CMainFrame::OnFontChange()
00321 {
00322   m_wndFormatBar.SendMessage(CWordPadApp::m_nPrinterChangedMsg);
00323 }
00324
00325 void CMainFrame::OnDevModeChange(LPTSTR lpDeviceName)
00326 {
00327   theApp.NotifyPrinterChanged();
00328   CFrameWnd::OnDevModeChange(lpDeviceName); //sends message to descendants
00329 }
00330
00331 void CMainFrame::OnSysColorChange()
00332 {
00333   CFrameWnd::OnSysColorChange();
00334   m_wndRulerBar.SendMessage(WM_SYSCOLORCHANGE);
00335 }
00336
00337 void CMainFrame::ActivateFrame(int nCmdShow)
00338 {
00339   CFrameWnd::ActivateFrame(nCmdShow);
00340   // make sure and display the toolbar, ruler, etc while loading a document.
00341   OnIdleUpdateCmdUI();
00342   UpdateWindow();
00343 }
00344
00345 void CMainFrame::OnSize(UINT nType, int cx, int cy)
00346 {
00347   CFrameWnd::OnSize(nType, cx, cy);
00348   theApp.m_bMaximized = (nType == SIZE_MAXIMIZED);
00349   if (nType == SIZE_RESTORED)
00350     GetWindowRect(theApp.m_rectInitialFrame);
00351 }
00352
00353 LONG_PTR CMainFrame::OnBarState(UINT_PTR wParam, LONG_PTR lParam)
00354 {
00355   if (lParam == -1)
00356     return 0L;
00357   ASSERT(lParam != RD_EMBEDDED);
00358   if (wParam == 0)
00359   {
00360     CDockState& ds = theApp.GetDockState(lParam);
00361     ds.Clear(); // empty out the dock state
00362     GetDockState(ds);
00363   }
00364   else
00365   {
00366     if (IsTextType(lParam))
00367     {
00368       // in text mode hide the ruler and format bar so that it is the default
00369       CControlBar* pBar = GetControlBar(ID_VIEW_FORMATBAR);
00370       if (pBar != NULL)
00371         pBar->ShowWindow(SW_HIDE);
00372       pBar = GetControlBar(ID_VIEW_RULER);
00373       if (pBar != NULL)
00374         pBar->ShowWindow(SW_HIDE);
00375     }
00376     HICON hIcon = GetIcon((int)lParam);
00377     SendMessage(WM_SETICON, TRUE, (LPARAM)hIcon);
00378     SetDockState(theApp.GetDockState(lParam));
00379   }
00380   return 0L;
00381 }
00382
00383 void CMainFrame::OnMove(int x, int y)
00384 {
00385   CFrameWnd::OnMove(x, y);
00386   WINDOWPLACEMENT wp;
00387   wp.length = sizeof(wp);
00388   GetWindowPlacement(&wp);
00389   theApp.m_rectInitialFrame = wp.rcNormalPosition;
00390   CView* pView = GetActiveView();
00391   if (pView != NULL)
00392     pView->SendMessage(WM_MOVE);
00393 }
00394
00395 LONG_PTR CMainFrame::OnOpenMsg(UINT_PTR, LONG_PTR lParam)
00396 {
00397   TCHAR szAtomName[256];
00398   szAtomName[0] = NULL;
00399   GlobalGetAtomName((ATOM)lParam, szAtomName, 256);
00400   CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
00401   if (szAtomName[0] != NULL && pDoc != NULL)
00402   {
00403     if (lstrcmpi(szAtomName, pDoc->GetPathName()) == 0)
00404       return TRUE;
00405   }
00406   return FALSE;
00407 }
00408
00409 void CMainFrame::OnHelpFinder()
00410 {
00411   theApp.WinHelp(0, HELP_FINDER);
00412 }
00413
00414 void CMainFrame::OnDropFiles(HDROP hDropInfo)
00415 {
00416   TCHAR szFileName[_MAX_PATH];
00417   ::DragQueryFile(hDropInfo, 0, szFileName, _MAX_PATH);
00418   ::DragFinish(hDropInfo);
00419   theApp.OpenDocumentFile(szFileName);
00420 }
00421
00422 void CMainFrame::OnCharColor()
00423 {
00424   CColorMenu colorMenu;
00425   CRect rc;
00426   int index = m_wndFormatBar.CommandToIndex(ID_CHAR_COLOR);
00427   m_wndFormatBar.GetItemRect(index, &rc);
00428   m_wndFormatBar.ClientToScreen(rc);
00429   colorMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,rc.left,rc.bottom, this);
00430 }
00431
00432 void CMainFrame::OnPenToggle()
00433 {
00434   static int nPen = 0;
00435   m_wndToolBar.SetButtons(toolbar, sizeof(toolbar)/sizeof(UINT) - nPen);
00436   nPen = (nPen == 0) ? NUM_PEN_TOGGLE : 0;
00437   m_wndToolBar.Invalidate();
00438   m_wndToolBar.GetParentFrame()->RecalcLayout();
00439 }
00440
00441 BOOL CMainFrame::OnQueryNewPalette()
00442 {
00443   CView* pView = GetActiveView();
00444   if (pView != NULL)
00445     return (BOOL)pView->SendMessage(WM_QUERYNEWPALETTE);
00446   return FALSE;
00447 }
00448
00449 void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd)
00450 {
00451   CView* pView = GetActiveView();
00452   if (pView != NULL)
00453     pView->SendMessage(WM_PALETTECHANGED, (WPARAM)pFocusWnd->GetSafeHwnd());
00454 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/threads.h Source File

  • advanced
  • mutexes

threads.h

Go to the documentation of this file.
00001 // threads.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // This sample application is derived from the Mutex application
00013 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00014 // (Microsoft Press).  See the book for more information about Win32
00015 // programming topics, including thread synchronization.
00016
00017 class CMutexesDlg;
00018
00019 class CExampleThread : public CWinThread
00020 {
00021   DECLARE_DYNCREATE(CExampleThread)
00022 protected:
00023   CExampleThread();
00024
00025 public:
00026   CMutexesDlg* m_pOwner;
00027   BOOL m_bDone;
00028   void SetOwner(CMutexesDlg* pOwner) { m_pOwner = pOwner; };
00029 };
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CCounterThread thread
00033
00034 class CCounterThread : public CExampleThread
00035 {
00036   DECLARE_DYNCREATE(CCounterThread)
00037 protected:
00038   CCounterThread();           // protected constructor used by dynamic creation
00039
00040 // Attributes
00041 public:
00042
00043 // Operations
00044 public:
00045
00046 // Overrides
00047   // ClassWizard generated virtual function overrides
00048   //{{AFX_VIRTUAL(CCounterThread)
00049   public:
00050   virtual BOOL InitInstance();
00051   virtual int Run();
00052   //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 public:
00056   virtual ~CCounterThread();
00057
00058   // Generated message map functions
00059   //{{AFX_MSG(CCounterThread)
00060     // NOTE - the ClassWizard will add and remove member functions here.
00061   //}}AFX_MSG
00062
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CDisplayThread thread
00071
00072 class CDisplayThread : public CExampleThread
00073 {
00074   DECLARE_DYNCREATE(CDisplayThread)
00075 protected:
00076   CDisplayThread();           // protected constructor used by dynamic creation
00077
00078 // Attributes
00079 public:
00080
00081 // Operations
00082 public:
00083
00084 // Overrides
00085   // ClassWizard generated virtual function overrides
00086   //{{AFX_VIRTUAL(CDisplayThread)
00087   public:
00088   virtual BOOL InitInstance();
00089   virtual int Run();
00090   //}}AFX_VIRTUAL
00091
00092 // Implementation
00093 public:
00094   virtual ~CDisplayThread();
00095
00096   // Generated message map functions
00097   //{{AFX_MSG(CDisplayThread)
00098     // NOTE - the ClassWizard will add and remove member functions here.
00099   //}}AFX_MSG
00100
00101   DECLARE_MESSAGE_MAP()
00102 };
00103
00104 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWheel Member List

This is the complete list of members for CWheel, including all inherited members.
AdvanceTrace(CPoint &ptContact, double &dAngle, double &dAngleExtra, bool bMove=true) | CWheel | [virtual]
CBasePiece(COLORREF co, bool bIsWheel=false) | CBasePiece |
CWheel(long nRadius, COLORREF co, COLORREF coPattern) | CWheel |
Draw(CDC *pDC, long nZoomNumer, long nZoomDenom) const | CWheel | [virtual]
GetBoundingRect(CSpiroRect *prect, long nZoomNumer, long nZoomDenom) const | CWheel | [virtual]
GetContactPosition(CPoint point, long nZoomNumer, long nZoomDenom, CPoint &ptContact, double &dAngle) | CWheel | [virtual]
GetCycleError() const | CWheel | [virtual]
GetDevPieceRgn(CDC *pDC, CRgn *pRgn, long nZoomNumer, long nZoomDenom, bool bInflate) const | CWheel | [virtual]
GetFigData() const | CWheel | [virtual]
GetLogPieceRgn(CRgn *pRgn, long nZoomNumer, long nZoomDenom) const | CWheel | [virtual]
GetPenLocation(CPoint *pPoint) const | CWheel | [virtual]
GetPenRect(CRect *prect) const | CWheel | [virtual]
GetPerimeter() const | CWheel | [virtual]
HitTest(CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom) const | CWheel | [virtual]
IsWheel() const | CBasePiece | [inline, virtual]
m_angleCurrent | CWheel |
m_angleDelta | CWheel |
m_anglePen | CWheel |
m_bIsWheel | CBasePiece |
m_co | CBasePiece |
m_coPattern | CWheel |
m_dAngleCorrection | CWheel |
m_icoCurrent | CBasePiece |
m_nColorCount | CBasePiece |
m_nPenRadius | CWheel |
m_nRadius | CWheel |
m_ptPos | CBasePiece |
m_rgCo | CBasePiece |
m_rgco | CWheel | [static]
m_rgcoPattern | CWheel | [static]
m_rgnRads | CWheel | [static]
MovePiece(CSpiroView *pView, CPoint point, double dWheelData, long nZoomNumer, long nZoomDenom) | CWheel | [virtual]
ReverseWheelDirection() const | CWheel | [virtual]
SetAngleDelta(long nDistance, bool bReverse) | CWheel | [virtual]
SetFigData(double dData) | CWheel | [virtual]
SetPenLocation(CSpiroView *pView, CDC *pDC, CPoint point, long nZoomNumer, long nZoomDenom) | CWheel | [virtual]
SetPosition(CPoint pt) | CWheel | [virtual]
SetPosition(CPoint pt, double dAngle) | CWheel | [virtual]
SetWheelMode(bool bWheel=true) | CWheel | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/targetver.h Source File

  • vc2008fp
  • RibbonGadgets

targetver.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include <winsdkver.h>
00015
00016 #ifndef _WIN32_WINNT
00017 // Modify the following define to target a prior platform. Refer to MSDN
00018 // for the latest info on corresponding values for different platforms.
00019 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00020 #endif
00021
00022 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderButton.h Source File

  • vc2008fp
  • Slider

SliderButton.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CCustomSliderCtrl window
00015
00016 class CSliderButton;
00017
00018 class CCustomSliderCtrl : public CSliderCtrl
00019 {
00020 // Construction
00021 public:
00022   CCustomSliderCtrl(CSliderButton& btnSlider);
00023
00024 // Attributes
00025 public:
00026   CSliderButton& m_btnSlider;
00027
00028 // Operations
00029 public:
00030 // Overrides
00031
00032 // Implementation
00033 public:
00034   virtual ~CCustomSliderCtrl();
00035
00036 protected:
00037   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00038   afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00039   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00040
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 class CSliderButton : public CMFCToolBarButton
00046 {
00047   DECLARE_SERIAL(CSliderButton)
00048
00049 public:
00050   CSliderButton();
00051   CSliderButton (UINT uiId,
00052       int iImage = -1,
00053       DWORD dwStyle = 0,
00054       int iWidth = 0);
00055
00056   virtual ~CSliderButton();
00057
00058   void SetRange (int iMin, int iMax);
00059   void SetValue (int iValue, BOOL bNotify = TRUE);
00060
00061   static int GetPos (UINT uiCmd);
00062
00063 // Overrides:
00064   virtual void Serialize(CArchive& ar);
00065   virtual void CopyFrom (const CMFCToolBarButton& src);
00066   virtual SIZE OnCalculateSize (CDC* pDC, const CSize& sizeDefault, BOOL bHorz);
00067   virtual void OnShow (BOOL bShow);
00068   virtual void OnChangeParentWnd (CWnd* pWndParent);
00069   virtual void OnMove ();
00070   virtual void OnSize (int iSize);
00071   virtual HWND GetHwnd ()
00072   {
00073     return m_wndSlider.GetSafeHwnd ();
00074   }
00075
00076   virtual BOOL CanBeStretched () const
00077   {
00078     return TRUE;
00079   }
00080
00081   virtual BOOL HaveHotBorder () const
00082   {
00083     return FALSE;
00084   }
00085
00086   virtual void OnDraw (CDC* /*pDC*/, const CRect& /*rect*/, CMFCToolBarImages* /*pImages*/,
00087             BOOL /*bHorz*/ = TRUE, BOOL /*bCustomizeMode*/ = FALSE,
00088             BOOL /*bHighlight*/ = FALSE,
00089             BOOL /*bDrawBorder*/ = TRUE,
00090             BOOL /*bGrayDisabledButtons*/ = TRUE) {}
00091 // Attributes:
00092 public:
00093   CCustomSliderCtrl m_wndSlider;
00094   int       m_iWidth;
00095   DWORD     m_dwStyle;
00096   int       m_nMin;
00097   int       m_nMax;
00098   int       m_nValue;
00099 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/maindoc.cpp Source File

  • general
  • viewex

maindoc.cpp

Go to the documentation of this file.
00001 // maindoc.cpp : implementation of the CMainDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "viewex.h"
00014
00015 #include "enterdlg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainDoc
00024
00025 IMPLEMENT_SERIAL(CMainDoc, CDocument, 0 /* schema number*/ )
00026
00027 BEGIN_MESSAGE_MAP(CMainDoc, CDocument)
00028   //{{AFX_MSG_MAP(CMainDoc)
00029   ON_COMMAND(IDM_CHANGEDATA, OnChangeData)
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CMainDoc construction/destruction
00035
00036 CMainDoc::CMainDoc()
00037 {
00038 }
00039
00040 CMainDoc::~CMainDoc()
00041 {
00042 }
00043
00044 BOOL CMainDoc::OnNewDocument()
00045 {
00046   if (!CDocument::OnNewDocument())
00047     return FALSE;
00048   m_strData = "Sample Data String";
00049   m_colorData = RGB(0, 0, 0);
00050   return TRUE;
00051 }
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CMainDoc serialization
00055
00056 void CMainDoc::Serialize(CArchive&)
00057 {
00058   ASSERT(FALSE);      // this example program does not store data
00059 }
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CMainDoc commands
00063
00064 void CMainDoc::OnChangeData()
00065 {
00066   CEnterDlg dlg;
00067   dlg.m_strInput = m_strData;
00068   if (dlg.DoModal() != IDOK)
00069     return;
00070   m_strData = dlg.m_strInput;
00071   // if this document stored data then we would call SetModifiedFlag here
00072   UpdateAllViews(NULL);   // general update
00073 }
00074
00075 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/InfoBar.cpp Source File

  • vc2008fp
  • RollupPane

InfoBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RollupPane.h"
00013 #include "InfoBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CInfoBar
00023
00024 CInfoBar::CInfoBar()
00025 {
00026 }
00027
00028 CInfoBar::~CInfoBar()
00029 {
00030 }
00031
00032
00033 BEGIN_MESSAGE_MAP(CInfoBar, CDockablePane)
00034   //{{AFX_MSG_MAP(CInfoBar)
00035   ON_WM_PAINT()
00036   //}}AFX_MSG_MAP
00037 END_MESSAGE_MAP()
00038
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CInfoBar message handlers
00042
00043 void CInfoBar::OnPaint()
00044 {
00045   CPaintDC dc(this); // device context for painting
00046
00047   CRect rectClient;
00048   GetClientRect (rectClient);
00049
00050   dc.FillSolidRect (rectClient, ::GetSysColor (COLOR_3DHILIGHT));
00051   dc.Draw3dRect (rectClient, ::GetSysColor (COLOR_3DSHADOW),
00052     ::GetSysColor (COLOR_3DLIGHT));
00053
00054   dc.SetBkMode (TRANSPARENT);
00055   dc.SetTextColor (::GetSysColor (COLOR_BTNTEXT));
00056   CFont* pOldFont = (CFont*) dc.SelectStockObject (DEFAULT_GUI_FONT);
00057
00058   CString str = _T("Information...");
00059   dc.TextOut (10, 10, str);
00060
00061   dc.SelectObject (pOldFont);
00062 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCDoc.Cpp Source File

  • ole
  • TstCon

TCDoc.Cpp

Go to the documentation of this file.
00001 // CTestContainer98Doc.cpp : implementation of the CTestContainer98Doc class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CTestContainer98Doc
00022
00023 IMPLEMENT_DYNCREATE( CTestContainer98Doc, COleDocument )
00024
00025 BEGIN_MESSAGE_MAP(CTestContainer98Doc, COleDocument)
00026   //{{AFX_MSG_MAP(CTestContainer98Doc)
00027   ON_COMMAND(ID_OPTIONS_FREEZEEVENTS, OnOptionsFreezeEvents)
00028   ON_UPDATE_COMMAND_UI(ID_OPTIONS_FREEZEEVENTS, OnUpdateOptionsFreezeEvents)
00029   ON_COMMAND(ID_OPTIONS_SLOWDRAWING, OnOptionsSlowDrawing)
00030   ON_UPDATE_COMMAND_UI(ID_OPTIONS_SLOWDRAWING, OnUpdateOptionsSlowDrawing)
00031   ON_COMMAND(ID_OPTIONS_TWOPASSDRAWING, OnOptionsTwoPassDrawing)
00032   ON_UPDATE_COMMAND_UI(ID_OPTIONS_TWOPASSDRAWING, OnUpdateOptionsTwoPassDrawing)
00033   ON_COMMAND(ID_OPTIONS_LOGGING, OnOptionsLogging)
00034   ON_COMMAND(ID_CONTAINER_OPTIONS, OnContainerOptions)
00035   ON_COMMAND(ID_CONTAINER_AMBIENTPROPERTIES, OnContainerAmbientProperties)
00036   ON_COMMAND(ID_CONTAINER_INFO, OnContainerInfo)
00037   ON_COMMAND(ID_EDIT_DELETEALL, OnEditDeleteAll)
00038   ON_UPDATE_COMMAND_UI(ID_EDIT_DELETEALL, OnUpdateEditDeleteAll)
00039   ON_COMMAND(ID_CONTAINER_TABORDER, OnContainerTabOrder)
00040   ON_COMMAND(ID_TOOLS_MACROS, OnToolsMacros)
00041   ON_COMMAND(ID_RUNMACRO, OnRunMacro)
00042   //}}AFX_MSG_MAP
00043   // Enable default OLE container implementation
00044   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, COleDocument::OnUpdatePasteMenu)
00045   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE_LINK, COleDocument::OnUpdatePasteLinkMenu)
00046   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_CONVERT, COleDocument::OnUpdateObjectVerbMenu)
00047   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, COleDocument::OnUpdateEditLinksMenu)
00048   ON_COMMAND(ID_OLE_EDIT_LINKS, COleDocument::OnEditLinks)
00049    ON_UPDATE_COMMAND_UI_RANGE( ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, COleDocument::OnUpdateObjectVerbMenu )
00050 END_MESSAGE_MAP()
00051
00052 BEGIN_CONNECTION_MAP( CTestContainer98Doc, COleDocument )
00053    CONNECTION_PART( CTestContainer98Doc, __uuidof( ITestContainer98Events ), TC98CP )
00054 END_CONNECTION_MAP()
00055
00056 BEGIN_DISPATCH_MAP( CTestContainer98Doc, COleDocument )
00057   //{{AFX_DISPATCH_MAP(CTestContainer98Doc)
00058   DISP_PROPERTY_EX(CTestContainer98Doc, "PrimarySelection", GetPrimarySelection, SetPrimarySelection, VT_DISPATCH)
00059   DISP_FUNCTION(CTestContainer98Doc, "FindControl", FindControl, VT_DISPATCH, VTS_BSTR)
00060   DISP_FUNCTION(CTestContainer98Doc, "Log", Log, VT_EMPTY, VTS_BSTR)
00061   DISP_FUNCTION(CTestContainer98Doc, "InsertControl", InsertControl, VT_DISPATCH, VTS_BSTR VTS_BSTR)
00062   //}}AFX_DISPATCH_MAP
00063 END_DISPATCH_MAP()
00064
00065 BEGIN_INTERFACE_MAP( CTestContainer98Doc, COleDocument )
00066   INTERFACE_PART( CTestContainer98Doc, __uuidof( ITestContainer98 ), Dispatch )
00067    INTERFACE_PART( CTestContainer98Doc, IID_IConnectionPointContainer, ConnPtContainer )
00068 END_INTERFACE_MAP()
00069
00070 const IID LIBID_TestContainer98 = {0x198184FB,0xB837,0x11D0,{0x8D,0xF1,0x00,0xC0,0x4F,0xB6,0x8D,0x60}};
00071
00072 IMPLEMENT_OLETYPELIB( CTestContainer98Doc, LIBID_TestContainer98, 1, 0 )
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CTestContainer98Doc construction/destruction
00076
00077 CTestContainer98Doc::CTestContainer98Doc() :
00078    m_pFontHolder( NULL ),
00079    m_tUserMode( FALSE ),
00080    m_tFreezeEvents( FALSE ),
00081    m_tAllowWindowless( TRUE ),
00082    m_tTwoPassDrawing( TRUE ),
00083    m_tSlowDrawing( FALSE ),
00084    m_tHonorIgnoreActivateWhenVisible( TRUE ),
00085    m_tUseIPointerInactive( TRUE ),
00086    m_tUseQuickActivation( TRUE ),
00087    m_tIOleInPlaceSiteWindowless( TRUE ),
00088    m_tIOleInPlaceSiteEx( TRUE ),
00089    m_tIAdviseSinkEx( TRUE ),
00090    m_tSBindHost( TRUE ),
00091    m_pLog( NULL ),
00092    m_pScriptManager( NULL )
00093 {
00094    m_descFont.lpstrName = NULL;
00095
00096   // Use OLE compound files
00097   EnableCompoundFile();
00098
00099    EnableConnections();
00100
00101   EnableAutomation();
00102
00103   AfxOleLockApp();
00104 }
00105
00106 CTestContainer98Doc::~CTestContainer98Doc()
00107 {
00108    Cleanup();
00109
00110   AfxOleUnlockApp();
00111 }
00112
00113 void CTestContainer98Doc::Cleanup()
00114 {
00115    int iProp;
00116
00117    if( m_pScriptManager != NULL )
00118    {
00119     delete m_pScriptManager;
00120     m_pScriptManager = NULL;
00121    }
00122
00123    delete m_pLog;
00124    m_pLog = NULL;
00125
00126    for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
00127    {
00128     delete m_apAmbientProperties[iProp];
00129    }
00130    m_apAmbientProperties.SetSize( 0 );
00131
00132    delete m_pFontHolder;
00133    m_pFontHolder = NULL;
00134
00135    delete[] m_descFont.lpstrName;
00136    m_descFont.lpstrName = NULL;
00137 }
00138
00139 void CTestContainer98Doc::CreateUniqueItemName( CTestContainer98Item* pItem,
00140    LPCTSTR pszBaseName, CString& strUniqueName )
00141 {
00142    POSITION posItem;
00143    CTestContainer98Item* pSearchItem;
00144    ULONG nTag;
00145    BOOL tCollisionFound;
00146
00147    ASSERT( pszBaseName != NULL );
00148
00149    // Assume the name is already unique
00150    strUniqueName = pszBaseName;
00151
00152    nTag = 1;
00153    do
00154    {
00155     tCollisionFound = FALSE;
00156     posItem = GetStartPosition();
00157     while( (posItem != NULL) && !tCollisionFound )
00158     {
00159      pSearchItem = (CTestContainer98Item*)GetNextItem( posItem );
00160      if( pSearchItem != pItem )
00161      {
00162       if( strUniqueName == pSearchItem->GetDisplayName() )
00163       {
00164          // This name is already in use.
00165          tCollisionFound = TRUE;
00166          strUniqueName.Format( "%s%u", pszBaseName, nTag );
00167          nTag++;
00168       }
00169      }
00170     }
00171    } while( tCollisionFound );
00172 }
00173
00174 BOOL CTestContainer98Doc::Initialize()
00175 {
00176
00177    CLSID clsid;
00178    HRESULT hResult;
00179    CMainFrame* pMainFrame;
00180    CTestContainer98App* pApp;
00181    CFileLog* pFileLog;
00182    BOOL tSuccess;
00183
00184    pApp = (CTestContainer98App*)AfxGetApp();
00185
00186    m_tUserMode = pApp->m_options.m_tUserMode;
00187    m_tFreezeEvents = FALSE;
00188    m_tAllowWindowless = pApp->m_options.m_tAllowWindowless;
00189    m_tTwoPassDrawing = pApp->m_options.m_tTwoPassDrawing;
00190    m_tSlowDrawing = FALSE;
00191    m_tHonorIgnoreActivateWhenVisible =
00192     pApp->m_options.m_tHonorIgnoreActivateWhenVisible;
00193    m_tUseIPointerInactive = pApp->m_options.m_tUseIPointerInactive;
00194    m_tUseQuickActivation = pApp->m_options.m_tQuickActivation;
00195    m_tIOleInPlaceSiteWindowless = pApp->m_options.m_tIOleInPlaceSiteWindowless;
00196    m_tIOleInPlaceSiteEx = pApp->m_options.m_tIOleInPlaceSiteEx;
00197    m_tIAdviseSinkEx = pApp->m_options.m_tIAdviseSinkEx;
00198    m_tSBindHost = pApp->m_options.m_tSBindHost;
00199    m_pLog = NULL;
00200
00201    pMainFrame = DYNAMIC_DOWNCAST( CMainFrame, AfxGetMainWnd() );
00202
00203    switch( pApp->m_options.m_iLogType )
00204    {
00205    case TCLOG_NULL:
00206     m_pLog = new CNullLog;
00207     break;
00208
00209    case TCLOG_OUTPUTWINDOW:
00210     m_pLog = new COutputWindowLog( GetOutputEditControl() );
00211     break;
00212
00213    case TCLOG_DEBUG:
00214     m_pLog = new CDebugLog;
00215     break;
00216
00217    case TCLOG_FILE:
00218     pFileLog = new CFileLog;
00219     tSuccess = pFileLog->Create( pApp->m_options.m_strLogFileName );
00220     if( !tSuccess )
00221     {
00222      delete pFileLog;
00223     }
00224     m_pLog = pFileLog;
00225     break;
00226
00227    default:
00228     ASSERT( FALSE );
00229     break;
00230    }
00231    if( m_pLog == NULL )
00232    {
00233     return( FALSE );
00234    }
00235
00236    hResult = InitDefaultAmbientProperties();
00237    if( FAILED( hResult ) )
00238    {
00239     return( FALSE );
00240    }
00241
00242    if( !pApp->m_options.m_strProgID.IsEmpty() )
00243    {
00244     try
00245     {
00246      hResult = CLSIDFromProgID( CT2COLE( pApp->m_options.m_strProgID ), &clsid );
00247      if( FAILED( hResult ) )
00248      {
00249       AfxThrowOleException( hResult );
00250      }
00251      AddControl( clsid, NULL );
00252     }
00253     catch( CException* pException )
00254     {
00255      pException->Delete();
00256      TCTrace( TRACELEVEL_NORMAL, "Failed to load control.\n" );
00257     }
00258     pApp->m_options.m_strProgID.Empty();
00259    }
00260
00261   return( TRUE );
00262 }
00263
00264 BOOL CTestContainer98Doc::OnNewDocument()
00265 {
00266   if( !COleDocument::OnNewDocument() )
00267    {
00268     return( FALSE );
00269    }
00270
00271    return( Initialize() );
00272 }
00273
00274
00275 /////////////////////////////////////////////////////////////////////////////
00276 // CTestContainer98Doc serialization
00277
00278 void CTestContainer98Doc::Serialize( CArchive& ar )
00279 {
00280    POSITION posScript;
00281    CScript* pScript;
00282    int nScripts;
00283    int iScript;
00284    CString strScriptName;
00285    CString strScriptPath;
00286    CScriptManager* pScriptManager;
00287    CString strErrorMessage;
00288    HRESULT hResult;
00289    int iProp;
00290    CAmbientProperty* pUserMode;
00291
00292    if( ar.IsLoading() )
00293    {
00294     Initialize();
00295
00296     for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
00297     {
00298      delete m_apAmbientProperties[iProp];
00299     }
00300     m_apAmbientProperties.SetSize( 0 );
00301
00302     m_apAmbientProperties.Serialize( ar );
00303
00304     pUserMode = FindAmbientProperty( DISPID_AMBIENT_USERMODE );
00305     if( pUserMode != NULL )
00306     {
00307      if( pUserMode->GetValue().vt == VT_BOOL )
00308      {
00309       m_tUserMode = pUserMode->GetValue().boolVal;
00310      }
00311     }
00312    }
00313    else
00314    {
00315     m_apAmbientProperties.Serialize( ar );
00316    }
00317
00318   // Calling the base class COleDocument enables serialization
00319   //  of the container document's COleClientItem objects.
00320   COleDocument::Serialize( ar );
00321
00322    if( ar.IsStoring() )
00323    {
00324     pScriptManager = GetScriptManager( FALSE );
00325     if( pScriptManager != NULL )
00326     {
00327      ar<<pScriptManager->GetNumScripts();
00328
00329      posScript = pScriptManager->GetFirstScriptPosition();
00330      while( posScript != NULL )
00331      {
00332       pScript = pScriptManager->GetNextScript( posScript );
00333       ar<<pScript->GetName();
00334      }
00335     }
00336     else
00337     {
00338      ar<<int( 0 );
00339     }
00340    }
00341    else
00342    {
00343     ar>>nScripts;
00344     if( nScripts > 0 )
00345     {
00346      pScriptManager = GetScriptManager();
00347      if( pScriptManager != NULL )
00348      {
00349       for( iScript = 0; iScript < nScripts; iScript++ )
00350       {
00351          ar>>strScriptName;
00352          strScriptPath = m_strDirectory+strScriptName+_T( ".dsm" );
00353          hResult = pScriptManager->LoadScript( strScriptPath,
00354           strScriptName );
00355          if( FAILED( hResult ) )
00356          {
00357           _com_error error( hResult );
00358
00359           AfxFormatString2( strErrorMessage, IDS_ERRORLOADINGSCRIPT,
00360            strScriptName, error.ErrorMessage() );
00361           AfxMessageBox( strErrorMessage );
00362          }
00363       }
00364      }
00365     }
00366    }
00367 }
00368
00369 /////////////////////////////////////////////////////////////////////////////
00370 // CTestContainer98Doc diagnostics
00371
00372 #ifdef _DEBUG
00373 void CTestContainer98Doc::AssertValid() const
00374 {
00375   COleDocument::AssertValid();
00376 }
00377
00378 void CTestContainer98Doc::Dump( CDumpContext& dc ) const
00379 {
00380   COleDocument::Dump(dc);
00381 }
00382 #endif //_DEBUG
00383
00384 /////////////////////////////////////////////////////////////////////////////
00385 // CTestContainer98Doc commands
00386
00387 void CTestContainer98Doc::BringToFront( CDocItem* pItem )
00388 {
00389    POSITION posItem;
00390
00391    ASSERT( pItem != NULL );
00392
00393    posItem = m_docItemList.Find( pItem );
00394    ASSERT( posItem != NULL );
00395
00396    m_docItemList.RemoveAt( posItem );
00397    m_docItemList.AddHead( pItem );
00398 }
00399
00400 void CTestContainer98Doc::SendToBack( CDocItem* pItem )
00401 {
00402    POSITION posItem;
00403
00404    ASSERT( pItem != NULL );
00405
00406    posItem = m_docItemList.Find( pItem );
00407    ASSERT( posItem != NULL );
00408
00409    m_docItemList.RemoveAt( posItem );
00410    m_docItemList.AddTail( pItem );
00411 }
00412
00413 HRESULT CTestContainer98Doc::InitDefaultAmbientProperties()
00414 {
00415    CString strName;
00416    LPCOLESTR pszFaceName;
00417    CAmbientProperty* pProp;
00418    VARIANT_BOOL tUserMode;
00419
00420    if( m_tUserMode )
00421    {
00422     tUserMode = VAR_TRUE;
00423    }
00424    else
00425    {
00426     tUserMode = VAR_FALSE;
00427    }
00428
00429    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_USERMODE);
00430    pProp = new CAmbientProperty( DISPID_AMBIENT_USERMODE, strName, COleVariant(
00431     tUserMode, VT_BOOL ), VTI_BOOL, TRUE );
00432    m_apAmbientProperties.Add( pProp );
00433
00434    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_UIDEAD);
00435    pProp = new CAmbientProperty( DISPID_AMBIENT_UIDEAD, strName, COleVariant(
00436     VARIANT_FALSE, VT_BOOL ), VTI_BOOL, TRUE );
00437    m_apAmbientProperties.Add( pProp );
00438
00439    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SHOWHATCHING);
00440    pProp = new CAmbientProperty( DISPID_AMBIENT_SHOWHATCHING, strName,
00441     COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ), VTI_BOOL, TRUE );
00442    m_apAmbientProperties.Add( pProp );
00443
00444    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SHOWGRABHANDLES);
00445    pProp = new CAmbientProperty( DISPID_AMBIENT_SHOWGRABHANDLES, strName,
00446     COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ), VTI_BOOL, TRUE );
00447    m_apAmbientProperties.Add( pProp );
00448
00449    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_TEXTALIGN);
00450    pProp = new CAmbientProperty( DISPID_AMBIENT_TEXTALIGN, strName,
00451     COleVariant( short( 0 ), VT_I2 ), VTI_I2, TRUE );
00452    m_apAmbientProperties.Add( pProp );
00453
00454    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_BACKCOLOR);
00455    pProp = new CAmbientProperty( DISPID_AMBIENT_BACKCOLOR, strName,
00456     COleVariant( long( GetSysColor( COLOR_WINDOW ) ), VT_I4 ), VTI_COLOR,
00457     TRUE );
00458    m_apAmbientProperties.Add( pProp );
00459
00460    delete m_pFontHolder;
00461    m_pFontHolder = new CFontHolder( NULL );
00462    if( m_pFontHolder == NULL )
00463    {
00464     AfxThrowMemoryException();
00465    }
00466    m_descFont.cbSizeofstruct = sizeof( m_descFont );
00467    pszFaceName = L"MS Sans Serif";
00468    delete[] m_descFont.lpstrName;
00469    size_t len = wcslen( pszFaceName )+1;
00470    m_descFont.lpstrName = new OLECHAR[len];
00471    if( m_descFont.lpstrName == NULL )
00472    {
00473     AfxThrowMemoryException();
00474    }
00475    ATL_CRT_ERRORCHECK(wcscpy_s(m_descFont.lpstrName, len, pszFaceName));
00476    m_descFont.cySize.Lo = 80000L;
00477    m_descFont.cySize.Hi = 0;
00478    m_descFont.sWeight = FW_BOLD;
00479    m_descFont.sCharset = 0;
00480    m_descFont.fItalic = FALSE;
00481    m_descFont.fUnderline = FALSE;
00482    m_descFont.fStrikethrough = FALSE;
00483    m_pFontHolder->InitializeFont( &m_descFont );
00484
00485    COleVariant varFont;
00486    varFont.vt = VT_DISPATCH;
00487    varFont.pdispVal = m_pFontHolder->GetFontDispatch();
00488
00489    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_FONT);
00490    pProp = new CAmbientProperty( DISPID_AMBIENT_FONT, strName, varFont,
00491     VTI_FONT, TRUE );
00492    m_apAmbientProperties.Add( pProp );
00493
00494    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_FORECOLOR);
00495    pProp = new CAmbientProperty( DISPID_AMBIENT_FORECOLOR, strName,
00496     COleVariant( long( GetSysColor( COLOR_WINDOWTEXT ) ), VT_I4 ), VTI_COLOR,
00497     TRUE );
00498    m_apAmbientProperties.Add( pProp );
00499
00500    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SCALEUNITS);
00501    pProp = new CAmbientProperty( DISPID_AMBIENT_SCALEUNITS, strName,
00502     COleVariant( _T( "" ), VT_BSTR ), VTI_BSTR, TRUE );
00503    m_apAmbientProperties.Add( pProp );
00504
00505    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_DISPLAYNAME);
00506    pProp = new CAmbientProperty( DISPID_AMBIENT_DISPLAYNAME, strName,
00507     COleVariant( _T( "" ), VT_BSTR ), VTI_BSTR, TRUE );
00508    m_apAmbientProperties.Add( pProp );
00509
00510    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_LOCALEID);
00511    pProp = new CAmbientProperty( DISPID_AMBIENT_LOCALEID, strName, COleVariant(
00512     long( GetUserDefaultLCID() ), VT_I4 ), VTI_I4, TRUE );
00513    m_apAmbientProperties.Add( pProp );
00514
00515    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_MESSAGEREFLECT);
00516    pProp = new CAmbientProperty( DISPID_AMBIENT_MESSAGEREFLECT, strName,
00517     COleVariant( VARIANT_FALSE, VT_BOOL ), VTI_BOOL, TRUE );
00518    m_apAmbientProperties.Add( pProp );
00519
00520    LOAD_STRING_FROM_RESOURCE(strName, IDS_APROPNAME_SUPPORTSMNEMONICS);
00521    pProp = new CAmbientProperty( DISPID_AMBIENT_SUPPORTSMNEMONICS, strName,
00522     COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ), VTI_BOOL, TRUE );
00523    m_apAmbientProperties.Add( pProp );
00524
00525    return( S_OK );
00526 }
00527
00528 BOOL CTestContainer98Doc::CanWindowlessActivate() const
00529 {
00530    return( m_tAllowWindowless );
00531 }
00532
00533 BOOL CTestContainer98Doc::UseIPointerInactive() const
00534 {
00535    return( m_tUseIPointerInactive );
00536 }
00537
00538 BOOL CTestContainer98Doc::UseQuickActivation() const
00539 {
00540    return( m_tUseQuickActivation );
00541 }
00542
00543 BOOL CTestContainer98Doc::UseSlowDrawing() const
00544 {
00545    return( m_tSlowDrawing );
00546 }
00547
00548 BOOL CTestContainer98Doc::UseTwoPassDrawing() const
00549 {
00550    return( m_tTwoPassDrawing );
00551 }
00552
00553 BOOL CTestContainer98Doc::HonorIgnoreActivateWhenVisible() const
00554 {
00555    return( m_tHonorIgnoreActivateWhenVisible );
00556 }
00557
00558 int CTestContainer98Doc::AddAmbientProperty( DISPID dispid, LPCTSTR pszName,
00559    const VARIANT& var, int vti )
00560 {
00561    CAmbientProperty* pProp;
00562    int iProp;
00563
00564    pProp = new CAmbientProperty( dispid, pszName, var, vti );
00565    if( pProp == NULL )
00566    {
00567     AfxThrowMemoryException();
00568    }
00569
00570    iProp = (int)m_apAmbientProperties.Add( pProp );
00571
00572    return( iProp );
00573 }
00574
00575 CAmbientProperty* CTestContainer98Doc::FindAmbientProperty( DISPID dispid )
00576 {
00577    int iProp;
00578
00579    for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
00580    {
00581     if( m_apAmbientProperties[iProp]->GetID() == dispid )
00582     {
00583      return( m_apAmbientProperties[iProp] );
00584     }
00585    }
00586
00587    // We didn't find the property.
00588    return( NULL );
00589 }
00590
00591 CAmbientProperty* CTestContainer98Doc::FindAmbientProperty( LPCOLESTR pszName )
00592 {
00593
00594    int iProp;
00595
00596    COLE2CT pszNameT( pszName );
00597    for( iProp = 0; iProp < m_apAmbientProperties.GetSize(); iProp++ )
00598    {
00599     if( m_apAmbientProperties[iProp]->GetName() == pszNameT )
00600     {
00601      return( m_apAmbientProperties[iProp] );
00602     }
00603    }
00604
00605    // We didn't find the property.
00606    return( NULL );
00607 }
00608
00609 CAmbientProperty* CTestContainer98Doc::GetAmbientProperty( int iProp )
00610 {
00611    return( m_apAmbientProperties[iProp] );
00612 }
00613
00614 int CTestContainer98Doc::GetNumAmbientProperties() const
00615 {
00616    return( (int)m_apAmbientProperties.GetSize() );
00617 }
00618
00619 POSITION CTestContainer98Doc::FindItem( CDocItem* pItem ) const
00620 {
00621    return( m_docItemList.Find( pItem ) );
00622 }
00623
00624 POSITION CTestContainer98Doc::GetTailPosition() const
00625 {
00626    return( m_docItemList.GetTailPosition() );
00627 }
00628
00629 CDocItem* CTestContainer98Doc::GetPrevItem( POSITION& pos ) const
00630 {
00631    return( (CDocItem*)m_docItemList.GetPrev( pos ) );
00632 }
00633
00634 CTestContainer98Item* CTestContainer98Doc::GetNextTabItem(
00635    CTestContainer98Item* pItem ) const
00636 {
00637    POSITION posItem;
00638
00639    if( pItem == NULL )
00640    {
00641     if( m_lpTabOrder.IsEmpty() )
00642     {
00643      return( NULL );
00644     }
00645
00646     return( m_lpTabOrder.GetHead() );
00647    }
00648
00649    posItem = m_lpTabOrder.Find( pItem );
00650    ASSERT( posItem != NULL );
00651    m_lpTabOrder.GetNext( posItem );
00652    if( posItem == NULL )
00653    {
00654     // Wrap around to the beginning of the list.
00655     return( m_lpTabOrder.GetHead() );
00656    }
00657
00658    return( m_lpTabOrder.GetAt( posItem ) );
00659 }
00660
00661 void CTestContainer98Doc::SetItemTabOrder( CTestContainer98Item* pItem,
00662    int iTabOrder )
00663 {
00664    POSITION posItem;
00665
00666    ASSERT( pItem != NULL );
00667
00668    posItem = FindItem( pItem );
00669    ASSERT( posItem != NULL );
00670
00671    posItem = m_lpTabOrder.Find( pItem );
00672    ASSERT( posItem != NULL );
00673
00674    m_lpTabOrder.RemoveAt( posItem );
00675    posItem = m_lpTabOrder.FindIndex( iTabOrder );
00676    if( posItem == NULL )
00677    {
00678     // We went off the end of the list.
00679     m_lpTabOrder.AddTail( pItem );
00680    }
00681    else
00682    {
00683     m_lpTabOrder.InsertBefore( posItem, pItem );
00684    }
00685 }
00686
00687 BOOL CTestContainer98Doc::GetUserMode() const
00688 {
00689    return( m_tUserMode );
00690 }
00691
00692 void CTestContainer98Doc::SetUserMode( BOOL tUserMode )
00693 {
00694    CAmbientProperty* pProp;
00695
00696    if( (m_tUserMode && tUserMode) || (!m_tUserMode && !tUserMode) )
00697    {
00698     // No change
00699     return;
00700    }
00701
00702    m_tUserMode = tUserMode;
00703    pProp = FindAmbientProperty( DISPID_AMBIENT_USERMODE );
00704    ENSURE( pProp != NULL );
00705
00706    if( m_tUserMode )
00707    {
00708     pProp->SetValue( COleVariant( VARIANT_BOOL( -1 ), VT_BOOL ) );
00709    }
00710    else
00711    {
00712     pProp->SetValue( COleVariant( VARIANT_FALSE, VT_BOOL ) );
00713    }
00714
00715    if( pProp->IsEnabled() )
00716    {
00717     BroadcastAmbientPropertyChange( pProp->GetID() );
00718    }
00719 }
00720
00721 void CTestContainer98Doc::BroadcastAmbientPropertyChange( DISPID dispid )
00722 {
00723    POSITION posItem;
00724    CTestContainer98Item* pItem;
00725
00726    TCTrace( TRACELEVEL_NORMAL,
00727     "Broadcasting ambient property change.  DISPID=%d\n", dispid );
00728
00729    posItem = GetStartPosition();
00730    while( posItem != NULL )
00731    {
00732     pItem = (CTestContainer98Item*)GetNextItem( posItem );
00733     pItem->OnAmbientPropertyChange( dispid );
00734    }
00735
00736    if( (dispid == DISPID_AMBIENT_USERMODE) || (dispid == DISPID_UNKNOWN) )
00737    {
00738     // Invalidate the view, since some objects need to be rendered
00739     // differently in design mode vs. user mode.
00740     UpdateAllViews( NULL );
00741    }
00742 }
00743
00744 BOOL CTestContainer98Doc::SupportsInterface( REFIID iid )
00745 {
00746    if( iid == IID_IOleInPlaceSiteEx )
00747    {
00748     return( m_tIOleInPlaceSiteEx || m_tIOleInPlaceSiteWindowless );
00749    }
00750    else if( iid == IID_IOleInPlaceSiteWindowless )
00751    {
00752     return( m_tIOleInPlaceSiteWindowless );
00753    }
00754    else if( iid == IID_IAdviseSinkEx )
00755    {
00756     return( m_tIAdviseSinkEx );
00757    }
00758
00759    return( FALSE );
00760 }
00761
00762 BOOL CTestContainer98Doc::SupportsService( REFGUID sid )
00763 {
00764    if( sid == SID_SBindHost )
00765    {
00766     return( m_tSBindHost );
00767    }
00768
00769    return( FALSE );
00770 }
00771
00772 void CTestContainer98Doc::PreCloseFrame( CFrameWnd* pFrame )
00773 {
00774    POSITION posItem;
00775    CTestContainer98Item* pItem;
00776
00777    posItem = GetStartPosition();
00778    while( posItem != NULL )
00779    {
00780     pItem = (CTestContainer98Item*)GetNextItem( posItem );
00781     if( pItem != NULL )
00782     {
00783      if( pItem->IsInPlaceActive() )
00784      {
00785       pItem->Deactivate();
00786      }
00787     }
00788    }
00789
00790    COleDocument::PreCloseFrame( pFrame );
00791 }
00792
00793 BOOL CTestContainer98Doc::CanCloseFrame( CFrameWnd* pFrame )
00794 {
00795    return( COleDocument::CanCloseFrame( pFrame ) );
00796 }
00797
00798 BOOL CTestContainer98Doc::OnSaveDocument( LPCTSTR pszPathName )
00799 {
00800    return( COleDocument::OnSaveDocument( pszPathName ) );
00801 }
00802
00803 void CTestContainer98Doc::AddItem( CDocItem* pItem )
00804 {
00805   COleDocument::AddItem( pItem );
00806
00807    m_lpTabOrder.AddTail( (CTestContainer98Item*)pItem );
00808 }
00809
00810 CLog* CTestContainer98Doc::GetLog() const
00811 {
00812    return( m_pLog );
00813 }
00814
00815 void CTestContainer98Doc::DeleteContents()
00816 {
00817    Cleanup();
00818
00819   COleDocument::DeleteContents();
00820 }
00821
00822 void CTestContainer98Doc::OnOptionsFreezeEvents()
00823 {
00824    POSITION posItem;
00825    CTestContainer98Item* pItem;
00826
00827    m_tFreezeEvents = !m_tFreezeEvents;
00828
00829    posItem = GetStartPosition();
00830    while( posItem != NULL )
00831    {
00832     // Set the item's FreezeEvents status.
00833     pItem = (CTestContainer98Item*)GetNextItem( posItem );
00834     pItem->FreezeEvents( m_tFreezeEvents );
00835    }
00836 }
00837
00838 void CTestContainer98Doc::OnUpdateOptionsFreezeEvents( CCmdUI* pCmdUI )
00839 {
00840    if( m_tFreezeEvents )
00841    {
00842     pCmdUI->SetCheck( 1 );
00843    }
00844    else
00845    {
00846     pCmdUI->SetCheck( 0 );
00847    }
00848 }
00849
00850 void CTestContainer98Doc::OnOptionsSlowDrawing()
00851 {
00852    m_tSlowDrawing = !m_tSlowDrawing;
00853 }
00854
00855 void CTestContainer98Doc::OnUpdateOptionsSlowDrawing( CCmdUI* pCmdUI )
00856 {
00857    pCmdUI->SetCheck( m_tSlowDrawing == TRUE );
00858 }
00859
00860 void CTestContainer98Doc::OnOptionsTwoPassDrawing()
00861 {
00862    m_tTwoPassDrawing = !m_tTwoPassDrawing;
00863 }
00864
00865 void CTestContainer98Doc::OnUpdateOptionsTwoPassDrawing( CCmdUI* pCmdUI )
00866 {
00867    pCmdUI->SetCheck( m_tTwoPassDrawing == TRUE );
00868 }
00869
00870 void CTestContainer98Doc::OnOptionsLogging()
00871 {
00872    CLoggingDlg dlg;
00873    CFileLog* pFileLog;
00874    int nResult;
00875    int iOldLogType;
00876    BOOL tSuccess;
00877
00878    if( m_pLog->IsKindOf( RUNTIME_CLASS( CNullLog ) ) )
00879    {
00880     dlg.m_iLogType = TCLOG_NULL;
00881    }
00882    else if( m_pLog->IsKindOf( RUNTIME_CLASS( COutputWindowLog ) ) )
00883    {
00884     dlg.m_iLogType = TCLOG_OUTPUTWINDOW;
00885    }
00886    else if( m_pLog->IsKindOf( RUNTIME_CLASS( CDebugLog ) ) )
00887    {
00888     dlg.m_iLogType = TCLOG_DEBUG;
00889    }
00890    else if( m_pLog->IsKindOf( RUNTIME_CLASS( CFileLog ) ) )
00891    {
00892     pFileLog = DYNAMIC_DOWNCAST( CFileLog, m_pLog );
00893     dlg.m_iLogType = TCLOG_FILE;
00894     dlg.m_strFileName = pFileLog->GetFileName();
00895    }
00896    iOldLogType = dlg.m_iLogType;
00897
00898    nResult = (int)dlg.DoModal();
00899    if( nResult != IDOK )
00900    {
00901     return;
00902    }
00903
00904    switch( dlg.m_iLogType )
00905    {
00906    case TCLOG_NULL:
00907     if( iOldLogType != TCLOG_NULL )
00908     {
00909      delete m_pLog;
00910      m_pLog = new CNullLog;
00911     }
00912     break;
00913
00914    case TCLOG_OUTPUTWINDOW:
00915     if( iOldLogType != TCLOG_OUTPUTWINDOW )
00916     {
00917      CMainFrame* pMainFrame;
00918
00919      delete m_pLog;
00920      pMainFrame = STATIC_DOWNCAST( CMainFrame, AfxGetMainWnd() );
00921      m_pLog = new COutputWindowLog( GetOutputEditControl() );
00922     }
00923     break;
00924
00925    case TCLOG_DEBUG:
00926     if( iOldLogType != TCLOG_DEBUG )
00927     {
00928      delete m_pLog;
00929      m_pLog = new CDebugLog;
00930     }
00931     break;
00932
00933    case TCLOG_FILE:
00934     if( (iOldLogType != TCLOG_FILE) || ((iOldLogType == TCLOG_FILE) &&
00935      ((DYNAMIC_DOWNCAST( CFileLog, m_pLog ))->GetFileName() !=
00936      dlg.m_strFileName)) )
00937     {
00938      delete m_pLog;
00939      m_pLog = new CFileLog;
00940      pFileLog = DYNAMIC_DOWNCAST( CFileLog, m_pLog );
00941      tSuccess = pFileLog->Create( dlg.m_strFileName );
00942      if( !tSuccess )
00943      {
00944       TRACE( "Failed to create log file.\n" );
00945      }
00946     }
00947     break;
00948    }
00949 }
00950
00951 void CTestContainer98Doc::OnContainerOptions()
00952 {
00953    int nResult;
00954    CFeaturesPage pageFeatures;
00955    CInterfacesPage pageInterfaces;
00956    CServicesPage pageServices;
00957    CPropertySheet sheet( IDS_CONTAINEROPTIONS );
00958
00959    pageFeatures.m_tAllowWindowless = m_tAllowWindowless;
00960    pageFeatures.m_tTwoPassDrawing = m_tTwoPassDrawing;
00961    pageFeatures.m_tHonorIgnoreActivateWhenVisible =
00962     m_tHonorIgnoreActivateWhenVisible;
00963    pageFeatures.m_tUseIPointerInactive = m_tUseIPointerInactive;
00964    pageFeatures.m_tUseQuickActivation = m_tUseQuickActivation;
00965    sheet.AddPage( &pageFeatures );
00966
00967    pageInterfaces.m_tIOleInPlaceSiteEx = m_tIOleInPlaceSiteEx;
00968    pageInterfaces.m_tIOleInPlaceSiteWindowless = m_tIOleInPlaceSiteWindowless;
00969    pageInterfaces.m_tIAdviseSinkEx = m_tIAdviseSinkEx;
00970    sheet.AddPage( &pageInterfaces );
00971
00972    pageServices.m_tSBindHost = m_tSBindHost;
00973    sheet.AddPage( &pageServices );
00974
00975    sheet.m_psh.dwFlags &= ~PSH_HASHELP;
00976    sheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00977    nResult = (int)sheet.DoModal();
00978    if( nResult != IDOK )
00979    {
00980     return;
00981    }
00982
00983    m_tAllowWindowless = pageFeatures.m_tAllowWindowless;
00984    m_tTwoPassDrawing = pageFeatures.m_tTwoPassDrawing;
00985    m_tHonorIgnoreActivateWhenVisible =
00986     pageFeatures.m_tHonorIgnoreActivateWhenVisible;
00987    m_tUseIPointerInactive = pageFeatures.m_tUseIPointerInactive;
00988    m_tUseQuickActivation = pageFeatures.m_tUseQuickActivation;
00989
00990    m_tIOleInPlaceSiteEx = pageInterfaces.m_tIOleInPlaceSiteEx;
00991    m_tIOleInPlaceSiteWindowless = pageInterfaces.m_tIOleInPlaceSiteWindowless;
00992    m_tIAdviseSinkEx = pageInterfaces.m_tIAdviseSinkEx;
00993
00994    m_tSBindHost = pageServices.m_tSBindHost;
00995 }
00996
00997 void CTestContainer98Doc::OnContainerAmbientProperties()
00998 {
00999    DISPID dispidChanged;
01000    BOOL tChanged;
01001    CAmbientProperty* pProperty;
01002
01003    CAmbientPropertiesDlg dlg( NULL, this );
01004
01005    dlg.DoModal();
01006
01007    // Check for changes.
01008    tChanged = dlg.GetChangedPropertyID( &dispidChanged );
01009    if( tChanged )
01010    {
01011     if( (dispidChanged == DISPID_AMBIENT_USERMODE) || (dispidChanged ==
01012      DISPID_UNKNOWN) )
01013     {
01014      // Update our cached version of the UserMode property.
01015      pProperty = FindAmbientProperty( DISPID_AMBIENT_USERMODE );
01016      ENSURE( pProperty != NULL );
01017      ENSURE( pProperty->GetValue().vt == VT_BOOL );
01018      m_tUserMode = pProperty->GetValue().bVal;
01019     }
01020     BroadcastAmbientPropertyChange( dispidChanged );
01021    }
01022 }
01023
01024 void CTestContainer98Doc::OnContainerInfo()
01025 {
01026    CContainerInfoDlg dlg( NULL, this );
01027
01028    dlg.DoModal();
01029 }
01030
01031 void CTestContainer98Doc::OnEditDeleteAll()
01032 {
01033    CTestContainer98Item* pItem;
01034    POSITION posItem;
01035    POSITION posView;
01036    CTestContainer98View* pView;
01037
01038    posView = GetFirstViewPosition();
01039    ASSERT( posView != NULL );
01040    pView = DYNAMIC_DOWNCAST( CTestContainer98View, GetNextView( posView ) );
01041    pView->ClearSelection();
01042
01043    do
01044    {
01045     posItem = GetStartPosition();
01046     if( posItem != NULL )
01047     {
01048      pItem = (CTestContainer98Item*)GetNextItem( posItem );
01049      ENSURE( pItem != NULL );
01050      pItem->Delete();
01051     }
01052    } while( posItem != NULL );
01053
01054    UpdateAllViews( NULL );
01055 }
01056
01057 void CTestContainer98Doc::OnUpdateEditDeleteAll( CCmdUI* pCmdUI )
01058 {
01059    POSITION posItem;
01060
01061    posItem = GetStartPosition();
01062    pCmdUI->Enable( posItem != NULL );
01063 }
01064
01065 void CTestContainer98Doc::RemoveItem( CDocItem* pItem )
01066 {
01067    POSITION posItem;
01068
01069    posItem = m_lpTabOrder.Find( DYNAMIC_DOWNCAST( CTestContainer98Item,
01070     pItem ) );
01071    ASSERT( posItem != NULL );
01072    m_lpTabOrder.RemoveAt( posItem );
01073
01074   COleDocument::RemoveItem( pItem );
01075 }
01076
01077 void CTestContainer98Doc::OnContainerTabOrder()
01078 {
01079    POSITION posItem;
01080    CTabOrderDlg dlg;
01081    int nResult;
01082    CTestContainer98Item* pItem;
01083
01084    posItem = m_lpTabOrder.GetHeadPosition();
01085    while( posItem != NULL )
01086    {
01087     pItem = m_lpTabOrder.GetNext( posItem );
01088     ASSERT( pItem != NULL );
01089     dlg.m_lpTabOrder.AddTail( pItem );
01090    }
01091
01092    nResult = (int)dlg.DoModal();
01093    if( nResult != IDOK )
01094    {
01095     return;
01096    }
01097
01098    m_lpTabOrder.RemoveAll();
01099    posItem = dlg.m_lpTabOrder.GetHeadPosition();
01100    while( posItem != NULL )
01101    {
01102     pItem = dlg.m_lpTabOrder.GetNext( posItem );
01103     m_lpTabOrder.AddTail( pItem );
01104    }
01105 }
01106
01107 CEdit* CTestContainer98Doc::GetOutputEditControl()
01108 {
01109    POSITION posView;
01110    CView* pView;
01111
01112    posView = GetFirstViewPosition();
01113    ASSERT( posView != NULL );
01114
01115    while( posView != NULL )
01116    {
01117     pView = GetNextView( posView );
01118     ENSURE( pView != NULL );
01119     if( pView->IsKindOf( RUNTIME_CLASS( CEditView ) ) )
01120     {
01121      return( &(STATIC_DOWNCAST( CEditView, pView )->GetEditCtrl()) );
01122     }
01123    }
01124
01125    return( NULL );
01126 }
01127
01128 CTestContainer98View* CTestContainer98Doc::GetView() const
01129 {
01130    POSITION posView;
01131    CView* pView;
01132
01133    posView = GetFirstViewPosition();
01134    ASSERT( posView != NULL );
01135
01136    while( posView != NULL )
01137    {
01138     pView = GetNextView( posView );
01139     ENSURE( pView != NULL );
01140     if( pView->IsKindOf( RUNTIME_CLASS( CTestContainer98View ) ) )
01141     {
01142      return( STATIC_DOWNCAST( CTestContainer98View, pView ) );
01143     }
01144    }
01145
01146    ASSERT( FALSE );
01147
01148    return( NULL );
01149 }
01150
01151 CTestContainer98Item* CTestContainer98Doc::AddControl( REFCLSID clsid,
01152    LPCTSTR pszName, REFIID iidPersistanceMedium, IUnknown* pPersistanceMedium )
01153 {
01154    CTestContainer98Item* pItem;
01155
01156    pItem = NULL;
01157    try
01158    {
01159     pItem = new CTestContainer98Item( this );
01160     ASSERT_VALID( pItem );
01161
01162     if( !pItem->CreateOrLoad( clsid, pszName, iidPersistanceMedium,
01163      pPersistanceMedium ) )
01164     {
01165      AfxThrowOleException( E_FAIL );
01166     }
01167     ASSERT_VALID( pItem );
01168
01169     pItem->InvalidateItem();
01170    }
01171    catch( ... )
01172    {
01173     ENSURE( pItem != NULL );
01174     pItem->Delete();
01175
01176     throw;
01177    }
01178    ASSERT( pItem != NULL );
01179
01180    return( pItem );
01181 }
01182
01183 LPDISPATCH CTestContainer98Doc::InsertControl( LPCTSTR pszProgID,
01184    LPCTSTR pszName )
01185 {
01186
01187    CLSID clsid;
01188    HRESULT hResult;
01189    CTestContainer98Item* pItem;
01190    IDispatch* pDispatch;
01191    CScriptManager* pScriptManager;
01192
01193    TRACE( "InsertControl: %s\n", pszProgID );
01194
01195    hResult = CLSIDFromProgID( CT2COLE( pszProgID ), &clsid );
01196    if( FAILED( hResult ) )
01197    {
01198     TRACE( "CLSIDFromProgID failed\n" );
01199     return( NULL );
01200    }
01201
01202    pItem = NULL;
01203    try
01204    {
01205     pItem = AddControl( clsid, pszName );
01206     ASSERT_VALID( pItem );
01207
01208     pItem->InvalidateItem();
01209    }
01210    catch( COleException* pException )
01211    {
01212     ASSERT( pItem == NULL );
01213
01214     hResult = pException->m_sc;
01215     pException->Delete();
01216
01217     return( NULL );
01218    }
01219    catch( CException* pException )
01220    {
01221     ASSERT( pItem == NULL );
01222
01223     pException->Delete();
01224
01225     return( NULL );
01226    }
01227    ASSERT( pItem != NULL );
01228
01229    pDispatch = NULL;
01230    hResult = pItem->m_lpObject->QueryInterface( IID_IDispatch,
01231     (void**)&pDispatch );
01232    if( FAILED( hResult ) )
01233    {
01234     pItem->Delete();
01235     return( NULL );
01236    }
01237    ASSERT( pDispatch != NULL );
01238
01239    pScriptManager = GetScriptManager( FALSE );
01240    if( pScriptManager != NULL )
01241    {
01242     pScriptManager->AddNamedItem( pszName, pDispatch );
01243    }
01244
01245    FireOnNewControl( pDispatch );
01246
01247    return( pDispatch );
01248 }
01249
01250 LPDISPATCH CTestContainer98Doc::GetPrimarySelection()
01251 {
01252    IDispatch* pDispatch;
01253    POSITION posView;
01254    CTestContainer98View* pView;
01255    HRESULT hResult;
01256
01257    posView = GetFirstViewPosition();
01258    ASSERT( posView != NULL );
01259    pView = (CTestContainer98View*)GetNextView( posView );
01260    ASSERT( posView == NULL );
01261
01262    if( pView->m_pSelection == NULL )
01263    {
01264     return( NULL );
01265    }
01266
01267    pDispatch = NULL;
01268    hResult = pView->m_pSelection->m_lpObject->QueryInterface( IID_IDispatch,
01269     (void**)&pDispatch );
01270    if( FAILED( hResult ) )
01271    {
01272     return( NULL );
01273    }
01274
01275    return( pDispatch );
01276 }
01277
01278 void CTestContainer98Doc::SetPrimarySelection( LPDISPATCH pNewSelection )
01279 {
01280    IUnknownPtr punkItem;
01281    IUnknownPtr punkNewSelection;
01282    POSITION posItem;
01283    CTestContainer98Item* pItem;
01284
01285    if( pNewSelection == NULL )
01286    {
01287     GetView()->ClearSelection();
01288    }
01289    else
01290    {
01291     punkNewSelection = pNewSelection;
01292     ASSERT( punkNewSelection != NULL );
01293
01294     posItem = GetStartPosition();
01295     while( posItem != NULL )
01296     {
01297      pItem = (CTestContainer98Item*)GetNextItem( posItem );
01298      punkItem = pItem->m_lpObject;
01299      ASSERT( punkItem != NULL );
01300
01301      if( punkItem == punkNewSelection )
01302      {
01303       GetView()->SetSelection( pItem );
01304       return;
01305      }
01306     }
01307    }
01308 }
01309
01310 LPDISPATCH CTestContainer98Doc::FindControl( LPCTSTR pszName )
01311 {
01312    POSITION posItem;
01313    CTestContainer98Item* pItem;
01314    IDispatch* pDispatch;
01315    HRESULT hResult;
01316
01317    posItem = GetStartPosition();
01318    while( posItem != NULL )
01319    {
01320     pItem = (CTestContainer98Item*)GetNextItem( posItem );
01321     if( pItem->GetDisplayName() == pszName )
01322     {
01323      hResult = pItem->m_lpObject->QueryInterface( IID_IDispatch,
01324       (void**)&pDispatch );
01325      if( FAILED( hResult ) )
01326      {
01327       return( NULL );
01328      }
01329
01330      return( pDispatch );
01331     }
01332    }
01333
01334   return( NULL );
01335 }
01336
01337 void CTestContainer98Doc::OnToolsMacros()
01338 {
01339    CMacroDlg dlg;
01340    int nResult;
01341    HRESULT hResult;
01342    CScriptManager* pScriptManager;
01343
01344    pScriptManager = GetScriptManager();
01345    if( pScriptManager == NULL )
01346    {
01347     return;
01348    }
01349
01350    dlg.m_pScriptManager = m_pScriptManager;
01351
01352    nResult = (int)dlg.DoModal();
01353    if( nResult != IDOK )
01354    {
01355     return;
01356    }
01357
01358    hResult = dlg.m_pScript->RunMacro( dlg.m_strMacroName );
01359    if( FAILED( hResult ) )
01360    {
01361     TRACE( "Script failed\n" );
01362     return;
01363    }
01364 }
01365
01366 HRESULT CTestContainer98Doc::InitScriptManager()
01367 {
01368    POSITION posItem;
01369    CTestContainer98Item* pItem;
01370    IDispatchPtr pDispatch;
01371
01372    m_pScriptManager = new CScriptManager( this );
01373    if( m_pScriptManager == NULL )
01374    {
01375     return( E_OUTOFMEMORY );
01376    }
01377
01378    posItem = GetStartPosition();
01379    while( posItem != NULL )
01380    {
01381     pItem = (CTestContainer98Item*)GetNextItem( posItem );
01382     pDispatch = pItem->m_lpObject;
01383     if( pDispatch == NULL )
01384     {
01385      return( E_NOINTERFACE );
01386     }
01387     m_pScriptManager->AddNamedItem( pItem->GetDisplayName(), pDispatch );
01388    }
01389
01390    return( S_OK );
01391 }
01392
01393 void CTestContainer98Doc::Log( LPCTSTR pszMessage )
01394 {
01395    CLog* pLog;
01396
01397    pLog = GetLog();
01398    (*pLog)<<pszMessage;
01399 }
01400
01401 void CTestContainer98Doc::FireOnNewControl( IDispatch* pControl )
01402 {
01403    int iSink;
01404    IDispatch* pSink;
01405    COleDispatchDriver driver;
01406
01407    const CPtrArray* pConnections = m_xTC98CP.GetConnections();
01408    ENSURE( pConnections != NULL );
01409
01410    for( iSink = 0; iSink < pConnections->GetSize(); iSink++ )
01411    {
01412     pSink = (IDispatch*)(pConnections->GetAt( iSink ));
01413     ASSERT( pSink != NULL );
01414
01415     driver.AttachDispatch( pSink, FALSE );
01416
01417     try
01418     {
01419      driver.InvokeHelper( 1, DISPATCH_METHOD, VT_EMPTY, NULL, LPBYTE(
01420       VTS_DISPATCH ), pControl );
01421     }
01422     catch( CException* pException )
01423     {
01424      pException->Delete();
01425     }
01426    }
01427 }
01428
01429 BOOL CTestContainer98Doc::GetDispatchIID( IID* piid )
01430 {
01431    ENSURE( piid != NULL );
01432
01433    *piid = __uuidof( ITestContainer98 );
01434
01435    return( TRUE );
01436 }
01437
01438
01439 BOOL CTestContainer98Doc::OnOpenDocument( LPCTSTR pszPathName )
01440 {
01441    int iChar;
01442
01443    ENSURE( pszPathName != NULL );
01444
01445    iChar = lstrlen( pszPathName )-1;
01446    while( (iChar >= 0) && (pszPathName[iChar] != _T( '\\' )) )
01447    {
01448     iChar--;
01449    }
01450
01451    m_strDirectory = CString( pszPathName ).Left( iChar+1 );
01452
01453   if( !COleDocument::OnOpenDocument( pszPathName ) )
01454    {
01455     return( FALSE );
01456    }
01457
01458   return( TRUE );
01459 }
01460
01461 CScriptManager* CTestContainer98Doc::GetScriptManager( BOOL tCreate )
01462 {
01463    HRESULT hResult;
01464
01465    if( m_pScriptManager == NULL )
01466    {
01467     if( tCreate )
01468     {
01469      hResult = InitScriptManager();
01470      if( FAILED( hResult ) )
01471      {
01472       AfxMessageBox( IDS_NOSCRIPTING );
01473      }
01474      else
01475      {
01476       ASSERT( m_pScriptManager != NULL );
01477      }
01478     }
01479    }
01480
01481    return( m_pScriptManager );
01482 }
01483
01484 void CTestContainer98Doc::OnRunMacro()
01485 {
01486    CScript* pScript;
01487    CString strMacroName;
01488    CMainFrame* pMainFrame;
01489    CComboBox* pComboBox;
01490    HRESULT hResult;
01491    CScriptManager* pScriptManager;
01492
01493    pScriptManager = GetScriptManager();
01494    if( pScriptManager == NULL )
01495    {
01496     return;
01497    }
01498
01499    pMainFrame = STATIC_DOWNCAST( CMainFrame, AfxGetMainWnd() );
01500    pComboBox = STATIC_DOWNCAST( CComboBox,
01501     pMainFrame->m_wndMacroBar.GetDlgItem( IDC_MACRO ) );
01502
01503    pComboBox->GetLBText( 0, strMacroName );
01504    TRACE( "Macro: %s\n", LPCTSTR( strMacroName ) );
01505    pScript = pScriptManager->FindMacro( strMacroName );
01506    if( pScript != NULL )
01507    {
01508     hResult = pScript->RunMacro( strMacroName );
01509     if( FAILED( hResult ) )
01510     {
01511     }
01512    }
01513 }
01514
01515 void CTestContainer98Doc::RunAutomationScript(LPCTSTR szScriptFile)
01516 {
01517   TRY
01518   {
01519     CScript * pScript = NULL;
01520     HRESULT hr = S_OK;
01521     if(NULL == m_pScriptManager)
01522       InitScriptManager();
01523
01524     hr = m_pScriptManager->LoadScript(szScriptFile, "RunTest");
01525     ASSERT(SUCCEEDED(hr));
01526     pScript = m_pScriptManager->FindMacro("RunTest");
01527     ENSURE(pScript);
01528     hr = pScript->RunMacro("RunTest");
01529     ASSERT(SUCCEEDED(hr));
01530   }
01531   CATCH(COleException, e)
01532   {
01533     char szErr[MAX_PATH];
01534     e->GetErrorMessage(szErr, MAX_PATH);
01535     AfxMessageBox(szErr);
01536   }
01537   END_CATCH
01538
01539   AfxGetMainWnd()->PostMessage(WM_CLOSE);
01540 }
01541
01542 BOOL CTestContainer98Doc::SaveModified()
01543 {
01544   // TODO: Add your specialized code here and/or call the base class
01545
01546   return TRUE;
01547 }
01548
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/propsht.cpp Source File

  • general
  • CmnCtrl2

propsht.cpp

Go to the documentation of this file.
00001 // AllControlsSheet.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl2.h"
00015 #include "propsht.h"
00016 #include "progctrl.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 class CAboutDlg : public CDialog
00025 {
00026 public:
00027   CAboutDlg();
00028
00029 // Dialog Data
00030   //{{AFX_DATA(CAboutDlg)
00031   enum { IDD = IDD_ABOUTBOX };
00032   //}}AFX_DATA
00033
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CAboutDlg)
00036   protected:
00037   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 protected:
00042   //{{AFX_MSG(CAboutDlg)
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00048 {
00049   //{{AFX_DATA_INIT(CAboutDlg)
00050   //}}AFX_DATA_INIT
00051 }
00052
00053 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00054 {
00055   CDialog::DoDataExchange(pDX);
00056   //{{AFX_DATA_MAP(CAboutDlg)
00057   //}}AFX_DATA_MAP
00058 }
00059
00060 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00061   //{{AFX_MSG_MAP(CAboutDlg)
00062     // No message handlers
00063   //}}AFX_MSG_MAP
00064 END_MESSAGE_MAP()
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CAllControlsSheet
00068
00069 IMPLEMENT_DYNAMIC(CAllControlsSheet, CPropertySheet)
00070
00071 CAllControlsSheet::CAllControlsSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00072   :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00073 {
00074   AddControlPages();
00075
00076   // TODO :: Add the pages for the rest of the controls here.
00077 }
00078
00079 CAllControlsSheet::CAllControlsSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00080   :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00081 {
00082   AddControlPages();
00083 }
00084
00085 CAllControlsSheet::~CAllControlsSheet()
00086 {
00087 }
00088
00089 void CAllControlsSheet::AddControlPages()
00090 {
00091   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00092   m_psh.dwFlags |= PSP_USEHICON;
00093   m_psh.dwFlags &= ~PSH_HASHELP;  // Lose the Help button
00094   m_psh.hIcon = m_hIcon;
00095
00096   AddPage(&m_progctrlpage);
00097   AddPage(&m_sliderctrlpage);
00098   AddPage(&m_spinctrlpage);
00099 }
00100
00101 BEGIN_MESSAGE_MAP(CAllControlsSheet, CPropertySheet)
00102   //{{AFX_MSG_MAP(CAllControlsSheet)
00103   ON_WM_QUERYDRAGICON()
00104   ON_WM_SYSCOMMAND()
00105   //}}AFX_MSG_MAP
00106 END_MESSAGE_MAP()
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CAllControlsSheet message handlers
00110
00111 BOOL CAllControlsSheet::OnInitDialog()
00112 {
00113   // Add "About..." menu item to system menu.
00114
00115   // IDM_ABOUTBOX must be in the system command range.
00116   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00117   ASSERT(IDM_ABOUTBOX < 0xF000);
00118
00119   CMenu* pSysMenu = GetSystemMenu(FALSE);
00120   if (pSysMenu != NULL)
00121   {
00122     CString strAboutMenu;
00123     strAboutMenu.LoadString(IDS_ABOUTBOX);
00124     if (!strAboutMenu.IsEmpty())
00125     {
00126       pSysMenu->AppendMenu(MF_SEPARATOR);
00127       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00128     }
00129   }
00130
00131   SetIcon(m_hIcon, TRUE);
00132   SetIcon(m_hIcon, FALSE);
00133   return CPropertySheet::OnInitDialog();
00134 }
00135 HCURSOR CAllControlsSheet::OnQueryDragIcon()
00136 {
00137   return (HCURSOR) m_hIcon;
00138 }
00139
00140 BOOL CAllControlsSheet::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00141 {
00142   //removing the default DS_CONTEXT_HELP style
00143 //  dwStyle= WS_SYSMENU | WS_POPUP | WS_CAPTION | DS_MODALFRAME | WS_VISIBLE;
00144   return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
00145 }
00146
00147 void CAllControlsSheet::OnSysCommand(UINT nID, LPARAM lParam)
00148 {
00149   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00150   {
00151     CAboutDlg dlgAbout;
00152     dlgAbout.DoModal();
00153   }
00154   else
00155   {
00156     CPropertySheet::OnSysCommand(nID, lParam);
00157   }
00158 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrltest/ctrltest.cpp Source File

  • general
  • ctrltest

ctrltest.cpp

Go to the documentation of this file.
00001 // ctrltest.cpp : Dialogs and Controls test applet
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ctrltest.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // Main Window
00017
00018 // The OnTest routines are in the source files containing the particular
00019 // dialog that they are working with.  For example OnTestDerivedEdit is
00020 // in file dertest.cpp
00021
00022 BEGIN_MESSAGE_MAP(CTestWindow, CFrameWnd)
00023   //{{AFX_MSG_MAP(CTestWindow)
00024   ON_COMMAND(IDM_TEST_DERIVED_EDIT, OnTestDerivedEdit)
00025   ON_COMMAND(IDM_TEST_WNDCLASS_EDIT, OnTestWndClassEdit)
00026   ON_COMMAND(IDM_TEST_SUB_EDIT, OnTestSubclassedEdit)
00027   ON_COMMAND(IDM_TEST_BITMAP_BUTTON1, OnTestBitmapButton1)
00028   ON_COMMAND(IDM_TEST_BITMAP_BUTTON2, OnTestBitmapButton2)
00029   ON_COMMAND(IDM_TEST_BITMAP_BUTTON3, OnTestBitmapButton3)
00030   ON_COMMAND(IDM_TEST_CUSTOM_LIST, OnTestCustomList)
00031   ON_COMMAND(IDM_TEST_SPIN_EDIT, OnTestSpinEdit)
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 void CTestWindow::SetupMenus()
00036 {
00037   if ((GetSystemMetrics(SM_PENWINDOWS)) == NULL)
00038   {
00039     CMenu* pMenu = GetMenu();
00040     ENSURE(pMenu != NULL);
00041     pMenu->EnableMenuItem(IDM_TEST_PENEDIT_CODE, MF_DISABLED|MF_GRAYED);
00042     pMenu->EnableMenuItem(IDM_TEST_PENEDIT_TEMPLATE, MF_DISABLED|MF_GRAYED);
00043     pMenu->EnableMenuItem(IDM_TEST_PENEDIT_FEATURES, MF_DISABLED|MF_GRAYED);
00044   }
00045   // do not test for spin control until the user tries it
00046   // if the custom control DLL is not present, the test spin
00047   //  control menu item will be disabled in 'OnTestSpinEdit'.
00048
00049   // custom menu tests
00050   AttachCustomMenu();
00051 }
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // Application class
00055
00056 class CTestApp : public CWinApp
00057 {
00058 public:
00059   CTestApp();
00060
00061   virtual BOOL InitInstance();
00062   //{{AFX_MSG(CTestApp)
00063   afx_msg void OnAppAbout();
00064   //}}AFX_MSG
00065   DECLARE_MESSAGE_MAP();
00066 };
00067
00068 CTestApp::CTestApp()
00069 {
00070   // Place all significant initialization in InitInstance
00071 }
00072
00073
00074 BEGIN_MESSAGE_MAP(CTestApp, CWinApp)
00075   //{{AFX_MSG_MAP(CTestApp)
00076   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00077   //}}AFX_MSG_MAP
00078 END_MESSAGE_MAP()
00079
00080 CTestApp NEAR theTestApp;
00081
00082 BOOL CTestApp::InitInstance()
00083 {
00084   CTestWindow* pMainWnd = new CTestWindow;
00085   if (!pMainWnd->Create(NULL, _T("Control Test App"),
00086     WS_OVERLAPPEDWINDOW, CFrameWnd::rectDefault, NULL,
00087     MAKEINTRESOURCE(AFX_IDI_STD_FRAME)/*menu*/))
00088   {
00089     delete pMainWnd;
00090     return FALSE;
00091   }
00092
00093   pMainWnd->m_bAutoMenuEnable = FALSE;    // do manual menu enabling
00094   pMainWnd->SetupMenus();
00095   pMainWnd->ShowWindow(m_nCmdShow);
00096   m_pMainWnd = pMainWnd;      // store in CWinApp member
00097   return TRUE;
00098 }
00099
00100 void CTestApp::OnAppAbout()
00101 {
00102   CDialog(_T("ABOUTBOX")).DoModal();
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/targetver.h Source File

  • vc2008fp
  • TabbedView

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/mainfrm.cpp Source File

  • advanced
  • dllhusk

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "dllhusk.h"
00014
00015 #include "mainfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00028   //{{AFX_MSG_MAP(CMainFrame)
00029   ON_WM_CREATE()
00030   ON_WM_NCRBUTTONDOWN()
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // arrays of IDs used to initialize control bars
00036
00037 // toolbar buttons - IDs are command buttons
00038 static UINT BASED_CODE buttons[] =
00039 {
00040   // same order as in the bitmap 'toolbar.bmp'
00041   ID_FILE_NEW,
00042   ID_FILE_OPEN,
00043   ID_FILE_SAVE,
00044     ID_SEPARATOR,
00045   ID_EDIT_CUT,
00046   ID_EDIT_COPY,
00047   ID_EDIT_PASTE,
00048     ID_SEPARATOR,
00049   ID_FILE_PRINT,
00050   ID_APP_ABOUT,
00051 };
00052
00053 static UINT BASED_CODE indicators[] =
00054 {
00055   ID_SEPARATOR,           // status line indicator
00056   ID_INDICATOR_CAPS,
00057   ID_INDICATOR_NUM,
00058   ID_INDICATOR_SCRL,
00059 };
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CMainFrame construction/destruction
00063
00064 CMainFrame::CMainFrame()
00065 {
00066 }
00067
00068 CMainFrame::~CMainFrame()
00069 {
00070 }
00071
00072 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00073 {
00074   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00075     return -1;
00076
00077   if (!m_wndToolBar.Create(this) ||
00078     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00079     !m_wndToolBar.SetButtons(buttons,
00080       sizeof(buttons)/sizeof(UINT)))
00081   {
00082     TRACE0("Failed to create toolbar\n");
00083     return -1;      // fail to create
00084   }
00085
00086   if (!m_wndStatusBar.Create(this) ||
00087     !m_wndStatusBar.SetIndicators(indicators,
00088       sizeof(indicators)/sizeof(UINT)))
00089   {
00090     TRACE0("Failed to create status bar\n");
00091     return -1;      // fail to create
00092   }
00093
00094   return 0;
00095 }
00096
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CMainFrame diagnostics
00100
00101 #ifdef _DEBUG
00102 void CMainFrame::AssertValid() const
00103 {
00104   CMDIFrameWnd::AssertValid();
00105 }
00106
00107 void CMainFrame::Dump(CDumpContext& dc) const
00108 {
00109   CMDIFrameWnd::Dump(dc);
00110 }
00111
00112 #endif //_DEBUG
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CMainFrame commands
00116
00117 void CMainFrame::OnNcRButtonDown(UINT, CPoint point)
00118 {
00119   &point; // not used in retail build
00120 #ifdef _DEBUG
00121   // for debugging we support a right-mouse activated debug menu
00122   CMenu menubar;
00123   if (menubar.LoadMenu(IDR_POPUPMENUS))
00124   {
00125     // debug menu is the first popup
00126     CMenu* pPopup = menubar.GetSubMenu(0);
00127     ENSURE(pPopup != NULL);
00128
00129     // route commands through this main frame
00130     pPopup->TrackPopupMenu(TPM_RIGHTBUTTON, point.x, point.y, this);
00131   }
00132 #endif
00133 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertyBagItem Member List

This is the complete list of members for CPropertyBagItem, including all inherited members.
CPropertyBagItem(LPCOLESTR pszName, VARIANT *pvarValue) | CPropertyBagItem |
DECLARE_DYNAMIC(CPropertyBagItem) | CPropertyBagItem | [private]
m_strName | CPropertyBagItem |
m_varValue | CPropertyBagItem |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/typelib.h Source File

  • ole
  • oleview
  • iviewers

typelib.h

Go to the documentation of this file.
00001 // typelib.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef ___TYPELIB_H__
00014 #define ___TYPELIB_H__
00015
00016 #include "iviewer.h"
00017
00018 const int UPDF_NOTREEVIEW       = 0x0001 ;
00019 const int UPDF_NOLISTVIEW       = 0x0002 ;
00020 const int UPDF_NOODLVIEW        = 0x0004 ;
00021
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CTypeLibViewer command target
00025 class CTypeLibViewer : public CInterfaceViewer
00026 {
00027 public:
00028   DECLARE_DYNCREATE(CTypeLibViewer)
00029   CTypeLibViewer();           // protected constructor used by dynamic creation
00030   virtual ~CTypeLibViewer();
00031
00032 // Attributes
00033 public:
00034
00035 // Operations
00036 public:
00037
00038 // Overrides
00039   // ClassWizard generated virtual function overrides
00040   //{{AFX_VIRTUAL(CTypeLibViewer)
00041   public:
00042   virtual void OnFinalRelease();
00043   //}}AFX_VIRTUAL
00044   virtual HRESULT OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk);
00045
00046 // Implementation
00047 protected:
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CTypeLibViewer)
00051     // NOTE - the ClassWizard will add and remove member functions here.
00052   //}}AFX_MSG
00053
00054   DECLARE_MESSAGE_MAP()
00055   DECLARE_OLECREATE(CTypeLibViewer)
00056 };
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CTypeLibWnd frame
00060 class CTypeLibTreeView ;
00061 class CTypeLibListView ;
00062 class CTypeLibODLView ;
00063 class CTreeItem ;
00064 class CTypeLibWnd : public CFrameWnd
00065 {
00066 public:
00067   DECLARE_DYNCREATE(CTypeLibWnd)
00068   CTypeLibWnd(CWnd* pParent = NULL);   // standard constructor
00069   virtual ~CTypeLibWnd();
00070
00071
00072 // Attributes
00073 public:
00074   ITypeLib*       m_ptlb ;
00075
00076   CSplitterWnd    m_wndSplitter ;
00077   CTypeLibTreeView*   m_pTreeView ;
00078   #ifdef _LIST_VIEW
00079   CTypeLibListView*   m_pListView ;
00080   #else
00081   CTypeLibODLView*    m_pODLView ;
00082   #endif
00083
00084   CTreeItem*      m_pSelectedItem ;
00085
00086   CStatusBar      m_wndStatusBar ;
00087   CToolBar        m_wndToolBar ;
00088
00089   BOOL            m_fGroupByKind ;
00090 // Operations
00091 public:
00092   void RestorePosition();
00093   void UpdateAllViews( CView* pSender, LPARAM lHint = 0L, CObject* pHint = NULL ) ;
00094
00095 // Overrides
00096   // ClassWizard generated virtual function overrides
00097   //{{AFX_VIRTUAL(CTypeLibWnd)
00098   protected:
00099   virtual void PostNcDestroy();
00100   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00101   //}}AFX_VIRTUAL
00102   virtual BOOL OnCreateClient( LPCREATESTRUCT lpcs, CCreateContext* pcc ) ;
00103
00104 // Implementation
00105 protected:
00106
00107   // Generated message map functions
00108   //{{AFX_MSG(CTypeLibWnd)
00109   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00110   afx_msg void OnDestroy();
00111   afx_msg void OnSize(UINT nType, int cx, int cy);
00112   afx_msg void OnClose();
00113   afx_msg void OnAppAbout();
00114   afx_msg void OnFileClose();
00115   afx_msg void OnViewGroupKind();
00116   afx_msg void OnUpdateViewGroupByKind(CCmdUI* pCmdUI);
00117   //}}AFX_MSG
00118   DECLARE_MESSAGE_MAP()
00119 };
00120
00121 /////////////////////////////////////////////////////////////////////////////
00122 #endif // ___TYPELIB_H__
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFileDlgWatcherApp Member List

This is the complete list of members for CFileDlgWatcherApp, including all inherited members.
CFileDlgWatcherApp() | CFileDlgWatcherApp |
InitInstance() | CFileDlgWatcherApp | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/StdAfx.cpp Source File

  • vc2008fp
  • MenuSubSet

StdAfx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  MenuSubSet.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005
00006 #include "stdafx.h"
00007
00008
00009
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/enterdlg.cpp Source File

  • general
  • viewex

enterdlg.cpp

Go to the documentation of this file.
00001 // enterdlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "viewex.h"
00014 #include "enterdlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CEnterDlg dialog
00023
00024 IMPLEMENT_DYNAMIC(CEnterDlg, CDialog)
00025
00026 CEnterDlg::CEnterDlg(CWnd* pParent /*=NULL*/)
00027   : CDialog(CEnterDlg::IDD, pParent)
00028 {
00029   //{{AFX_DATA_INIT(CEnterDlg)
00030   m_strInput = "";
00031   //}}AFX_DATA_INIT
00032 }
00033
00034 void CEnterDlg::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CEnterDlg)
00038   DDX_Text(pDX, IDC_EDIT1, m_strInput);
00039   //}}AFX_DATA_MAP
00040 }
00041
00042 BEGIN_MESSAGE_MAP(CEnterDlg, CDialog)
00043   //{{AFX_MSG_MAP(CEnterDlg)
00044   //}}AFX_MSG_MAP
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CEnterDlg message handlers
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007DemoDoc.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007DemoDoc.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014
00015 #include "MSOffice2007DemoDoc.h"
00016 #include "CntrItem.h"
00017 #include "MainFrm.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMSOffice2007DemoDoc
00027
00028 IMPLEMENT_DYNCREATE(CMSOffice2007DemoDoc, CRichEditDoc)
00029
00030 BEGIN_MESSAGE_MAP(CMSOffice2007DemoDoc, CRichEditDoc)
00031   //{{AFX_MSG_MAP(CMSOffice2007DemoDoc)
00032   // Enable default OLE container implementation
00033   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, CRichEditDoc::OnUpdateEditLinksMenu)
00034   ON_COMMAND(ID_OLE_EDIT_LINKS, CRichEditDoc::OnEditLinks)
00035   ON_UPDATE_COMMAND_UI_RANGE(ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, CRichEditDoc::OnUpdateObjectVerbMenu)
00036   ON_COMMAND(ID_FILE_CLOSE, OnClose)
00037   //}}AFX_MSG_MAP
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CMSOffice2007DemoDoc construction/destruction
00042
00043 CMSOffice2007DemoDoc::CMSOffice2007DemoDoc()
00044 {
00045 }
00046
00047 CMSOffice2007DemoDoc::~CMSOffice2007DemoDoc()
00048 {
00049 }
00050
00051 BOOL CMSOffice2007DemoDoc::OnNewDocument()
00052 {
00053   if (!CRichEditDoc::OnNewDocument())
00054     return FALSE;
00055
00056   return TRUE;
00057 }
00058
00059 void CMSOffice2007DemoDoc::SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU)
00060 {
00061   CRichEditDoc::SetPathName(lpszPathName, bAddToMRU);
00062 }
00063
00064 CRichEditCntrItem* CMSOffice2007DemoDoc::CreateClientItem(REOBJECT* preo) const
00065 {
00066   // cast away constness of this
00067   return new CMSOffice2007DemoCntrItem(preo, (CMSOffice2007DemoDoc*) this);
00068 }
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CMSOffice2007DemoDoc serialization
00072
00073 void CMSOffice2007DemoDoc::Serialize(CArchive& ar)
00074 {
00075   if (ar.IsStoring())
00076   {
00077     // TODO: add storing code here
00078   }
00079   else
00080   {
00081     // TODO: add loading code here
00082   }
00083
00084   // Calling the base class CRichEditDoc enables serialization
00085   //  of the container document's COleClientItem objects.
00086   // TODO: set CRichEditDoc::m_bRTF = FALSE if you are serializing as text
00087   CRichEditDoc::Serialize(ar);
00088 }
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CMSOffice2007DemoDoc diagnostics
00092
00093 #ifdef _DEBUG
00094 void CMSOffice2007DemoDoc::AssertValid() const
00095 {
00096   CRichEditDoc::AssertValid();
00097 }
00098
00099 void CMSOffice2007DemoDoc::Dump(CDumpContext& dc) const
00100 {
00101   CRichEditDoc::Dump(dc);
00102 }
00103 #endif //_DEBUG
00104
00105 void CMSOffice2007DemoDoc::OnClose()
00106 {
00107 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/Page4.h Source File

  • vc2008fp
  • NewControls

Page4.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPage4 dialog
00014
00015 class CPage4 : public CMFCPropertyPage
00016 {
00017   DECLARE_DYNCREATE(CPage4)
00018
00019 // Construction
00020 public:
00021   CPage4();
00022   ~CPage4();
00023
00024 // Dialog Data
00025   enum { IDD = IDD_PAGE4 };
00026   CMFCMaskedEdit m_wndMaskEdit5;
00027   CMFCMaskedEdit m_wndMaskEdit4;
00028   CMFCMaskedEdit m_wndMaskEdit3;
00029   CMFCMaskedEdit m_wndMaskEdit2;
00030   CMFCMaskedEdit m_wndMaskEdit1;
00031   CString m_strValue1;
00032   CString m_strValue2;
00033   CString m_strValue3;
00034   CString m_strValue4;
00035   CString m_strValue5;
00036
00037 // Overrides
00038 protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040
00041 // Implementation
00042 protected:
00043   virtual BOOL OnInitDialog();
00044   afx_msg void OnButtonGet();
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/mainfrm.cpp Source File

  • ole
  • oleview

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "OleView.h"
00015 #include "mainfrm.h"
00016 #include "shadow.h"
00017 #include "obj_vw.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainFrame
00027 // Create a splitter window which splits an output text view and an input view
00028 //                               |
00029 //    OBJECT VIEW (CObjTreeView)  | INTERFACE VIEW (CRegistryView)
00030 //                               |
00031
00032 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00033
00034 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00035   //{{AFX_MSG_MAP(CMainFrame)
00036   ON_WM_CREATE()
00037   ON_WM_DESTROY()
00038   ON_COMMAND(ID_FILE_RUNREGEDIT, OnFileRunREGEDIT)
00039   ON_COMMAND(ID_VIEW_REFRESH, OnViewRefresh)
00040   ON_UPDATE_COMMAND_UI(ID_VIEW_REFRESH, OnUpdateViewRefresh)
00041   ON_WM_SYSCOLORCHANGE()
00042   ON_COMMAND(ID_OBJECT_DELETE, OnObjectDelete)
00043   ON_UPDATE_COMMAND_UI(ID_OBJECT_DELETE, OnUpdateObjectDelete)
00044   ON_COMMAND(ID_OBJECT_VERIFY, OnObjectVerify)
00045   ON_UPDATE_COMMAND_UI(ID_OBJECT_VERIFY, OnUpdateObjectVerify)
00046   ON_COMMAND(ID_FILE_VIEWTYPELIB, OnFileViewTypeLib)
00047   ON_COMMAND(ID_IFACES_USEINPROCSERVER, OnUseInProcServer)
00048   ON_UPDATE_COMMAND_UI(ID_IFACES_USEINPROCSERVER, OnUpdateUseInProcServer)
00049   ON_COMMAND(ID_IFACES_USEINPROCHANDLER, OnUseInProcHandler)
00050   ON_UPDATE_COMMAND_UI(ID_IFACES_USEINPROCHANDLER, OnUpdateUseInProcHandler)
00051   ON_COMMAND(ID_IFACES_USELOCALSERVER, OnUseLocalServer)
00052   ON_UPDATE_COMMAND_UI(ID_IFACES_USELOCALSERVER, OnUpdateUseLocalServer)
00053   //}}AFX_MSG_MAP
00054 END_MESSAGE_MAP()
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // arrays of IDs used to initialize control bars
00058
00059 // toolbar buttons - IDs are command buttons
00060 static UINT BASED_CODE buttons[] =
00061 {
00062   // same order as in the bitmap 'toolbar.bmp'
00063   ID_FILE_BINDTOAFILE,
00064   ID_FILE_VIEWTYPELIB,
00065   ID_SEPARATOR,
00066   ID_FILE_RUNREGEDIT,
00067   ID_SEPARATOR,
00068   ID_OBJECT_DELETE,
00069   ID_OBJECT_VERIFY,
00070   ID_SEPARATOR,
00071   ID_IFACES_USEINPROCSERVER,
00072   ID_IFACES_USEINPROCHANDLER,
00073   ID_IFACES_USELOCALSERVER,
00074   ID_SEPARATOR,
00075   ID_APP_ABOUT
00076 };
00077
00078 static UINT BASED_CODE indicators[] =
00079 {
00080     ID_SEPARATOR,             // status line indicator
00081 //    ID_INDICATOR_CAPS,
00082 //    ID_INDICATOR_NUM,
00083 //    ID_INDICATOR_SCRL,
00084 };
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CMainFrame construction/destruction
00088
00089 CMainFrame::CMainFrame()
00090 {
00091   m_pObjTreeView = NULL ;
00092   m_pObjectView = NULL ;
00093 }
00094
00095 CMainFrame::~CMainFrame()
00096 {
00097 }
00098
00099 BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle,
00100         CWnd* pParentWnd, CCreateContext* pContext)
00101 {
00102   // Turn off auto update of title bar
00103   dwDefaultStyle &= ~((DWORD)FWS_ADDTOTITLE) ;
00104   BOOL f = CFrameWnd::LoadFrame(nIDResource, dwDefaultStyle,
00105         pParentWnd, pContext);
00106
00107   return f ;
00108 }
00109 /////////////////////////////////////////////////////////////////////////////
00110 // CMainFrame message handlers
00111
00112 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00113 {
00114   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00115     return -1;
00116
00117   if (!m_wndToolBar.Create(this) ||
00118     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00119     !m_wndToolBar.SetButtons(buttons, sizeof(buttons)/sizeof(UINT)))
00120   {
00121     TRACE(_T("Failed to create toolbar\n"));
00122     return -1;      // fail to create
00123   }
00124
00125 //    m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00126 //    EnableDocking(CBRS_ALIGN_ANY);
00127 //    DockControlBar(&m_wndToolBar);
00128
00129   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00130     CBRS_TOOLTIPS | CBRS_FLYBY);
00131
00132   if (!m_wndStatusBar.Create(this) ||
00133     !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)) )
00134   {
00135     TRACE(_T("Failed to create status bar\n"));
00136     return -1;      // fail to create
00137   }
00138
00139   UINT nID, nStyle ;
00140   int cxWidth ;
00141   m_wndStatusBar.GetPaneInfo( 0, nID, nStyle, cxWidth ) ;
00142   m_wndStatusBar.SetPaneInfo( 0, ID_SEPARATOR, nStyle | SBPS_POPOUT, cxWidth ) ;
00143
00144   // When CStatusBar is created, a font is created and stored
00145   // internally in AFX.  But AFX will clean that font up during
00146   // shutdown, so we don't need to delete it.
00147   m_wndStatusBar.SetFont( theApp.m_pFont ) ;
00148
00149   DragAcceptFiles( TRUE ) ;
00150
00151   return 0;
00152 }
00153
00154 void CMainFrame::OnDestroy()
00155 {
00156   SavePosition() ;
00157   CFrameWnd::OnDestroy();
00158 }
00159
00160 BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
00161    CCreateContext* pContext)
00162 {
00163   // create a splitter with 1 row, 2 columns
00164   if (!m_wndSplitter.CreateStatic(this, 1, 2))
00165   {
00166     TRACE(_T("Failed to CreateStaticSplitter\n"));
00167     return FALSE;
00168   }
00169
00170   // add the first splitter pane - the default view in column 0
00171   if (!m_wndSplitter.CreateView(0, 0,
00172     pContext->m_pNewViewClass, CSize(240, 0), pContext))
00173   {
00174     TRACE(_T("Failed to create first pane\n"));
00175     return FALSE;
00176   }
00177
00178   if (!m_wndSplitter.CreateView(0, 1,
00179     RUNTIME_CLASS(CRegistryView), CSize(0, 0), pContext))
00180   {
00181     TRACE(_T("Failed to create second pane\n"));
00182     return FALSE;
00183   }
00184
00185   m_pObjTreeView = (CObjTreeView*)m_wndSplitter.GetPane(0, 0) ;
00186   m_pObjectView = (CRegistryView*)m_wndSplitter.GetPane(0,1) ;
00187
00188   // activate the input view
00189   SetActiveView((CView*)m_wndSplitter.GetPane(0, 0));
00190   m_wndSplitter.SetColumnInfo( 0, 240, 0 ) ;
00191
00192   return TRUE;
00193 }
00194
00195 /////////////////////////////////////////////////////////////////////////////
00196 // CMainFrame diagnostics
00197
00198 #ifdef _DEBUG
00199 void CMainFrame::AssertValid() const
00200 {
00201   CFrameWnd::AssertValid();
00202 }
00203
00204 void CMainFrame::Dump(CDumpContext& dc) const
00205 {
00206   CFrameWnd::Dump(dc);
00207 }
00208
00209 #endif //_DEBUG
00210
00211
00212 BOOL CMainFrame::SavePosition()
00213 {
00214   CString szSection ;
00215   CString szKey ;
00216
00217   #pragma warning(suppress: 6031)
00218   szSection.LoadString( IDS_INI_CONFIG ) ;
00219   ASSERT(szSection != "");
00220   #pragma warning(suppress: 6031)
00221   szKey.LoadString( IDS_INI_WNDPOS ) ;
00222   ASSERT(szKey != "");
00223
00224   WINDOWPLACEMENT wp;
00225   CString szValue ;
00226
00227   wp.length = sizeof( WINDOWPLACEMENT );
00228   GetWindowPlacement( &wp );
00229
00230   int nWidth, n ;
00231   m_wndSplitter.GetColumnInfo( 0, nWidth, n ) ;
00232
00233   LPTSTR p = szValue.GetBuffer( 255 ) ;
00234   _stprintf_s( p, 255, _T("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d"),
00235     wp.showCmd, wp.ptMinPosition.x, wp.ptMinPosition.y,
00236     wp.ptMaxPosition.x, wp.ptMaxPosition.y,
00237     wp.rcNormalPosition.left, wp.rcNormalPosition.top,
00238     wp.rcNormalPosition.right, wp.rcNormalPosition.bottom,
00239     nWidth,
00240     (m_wndToolBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE,
00241     (m_wndStatusBar.GetStyle() & WS_VISIBLE) ? TRUE : FALSE);
00242
00243   szValue.ReleaseBuffer() ;
00244   theApp.WriteProfileString( szSection, szKey, szValue );
00245   return TRUE ;
00246 }
00247
00248 BOOL CMainFrame::RestorePosition(int nCmdShow)
00249 {
00250   CString sz ;
00251   CString szSection ;
00252   CString szKey ;
00253   BOOL fToolBar = TRUE ;
00254   BOOL fStatusBar = TRUE ;
00255   int  nWidth ;
00256
00257   #pragma warning(suppress: 6031)
00258   szSection.LoadString( IDS_INI_CONFIG ) ;
00259   ASSERT(szSection != "");
00260   #pragma warning(suppress: 6031)
00261   szKey.LoadString( IDS_INI_WNDPOS ) ;
00262   ASSERT(szKey != "");
00263
00264   WINDOWPLACEMENT wp;
00265   int     nConv;
00266
00267   wp.length = sizeof( WINDOWPLACEMENT );
00268   wp.flags = 0 ;
00269
00270   TRY
00271   {
00272     sz = theApp.GetProfileString(szSection, szKey, _T("") ) ;
00273     if (sz.IsEmpty())
00274       AfxThrowMemoryException();
00275
00276     LPTSTR   lp = (LPTSTR)sz.GetBuffer( 255 );
00277
00278     wp.showCmd = (WORD)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00279     if (!nConv)
00280       AfxThrowMemoryException();
00281
00282     wp.ptMinPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00283     if (!nConv)
00284       AfxThrowMemoryException();
00285
00286     wp.ptMinPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00287     if (!nConv)
00288       AfxThrowMemoryException();
00289
00290     wp.ptMaxPosition.x = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00291     if (!nConv)
00292       AfxThrowMemoryException();
00293
00294     wp.ptMaxPosition.y = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00295     if (!nConv)
00296       AfxThrowMemoryException();
00297
00298     wp.rcNormalPosition.left = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00299     if (!nConv)
00300       AfxThrowMemoryException();
00301
00302     wp.rcNormalPosition.top = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00303     if (!nConv)
00304       AfxThrowMemoryException();
00305
00306     wp.rcNormalPosition.right = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00307     if (!nConv)
00308       AfxThrowMemoryException();
00309
00310     wp.rcNormalPosition.bottom = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00311     if (!nConv)
00312       AfxThrowMemoryException();
00313
00314     nWidth = (int)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00315     if (!nConv)
00316       AfxThrowMemoryException();
00317
00318     fToolBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00319     if (!nConv)
00320       AfxThrowMemoryException();
00321
00322     fStatusBar = (BOOL)ParseOffNumber( (LPTSTR FAR *)&lp, &nConv );
00323     if (!nConv)
00324       AfxThrowMemoryException();
00325
00326     // Always strip off minimize.
00327     //
00328     if (wp.showCmd == SW_SHOWMINIMIZED)
00329       wp.showCmd = SW_SHOWNORMAL ;
00330
00331     if (nCmdShow != SW_SHOWNORMAL)
00332       wp.showCmd = nCmdShow ;
00333
00334     m_wndSplitter.SetColumnInfo( 0, nWidth, 0 ) ;
00335   }
00336   CATCH(CException, pException)
00337   {
00338     fToolBar = TRUE ;
00339     fStatusBar = TRUE ;
00340     ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
00341     ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
00342     ShowWindow( SW_SHOWNORMAL );
00343     return FALSE ;
00344   }
00345   END_CATCH
00346   ShowControlBar( &m_wndToolBar, fToolBar, TRUE ) ;
00347   ShowControlBar( &m_wndStatusBar, fStatusBar, TRUE ) ;
00348   return (BOOL)SetWindowPlacement( &wp ) ;
00349 }
00350
00351 void CMainFrame::OnFileRunREGEDIT()
00352 {
00353   STARTUPINFO si;
00354   PROCESS_INFORMATION pi;
00355   ZeroMemory( &si, sizeof(si) );
00356   si.cb = sizeof(si);
00357   ZeroMemory( &pi, sizeof(pi) );
00358
00359   BOOL bFoundRegedit = FALSE;
00360   TCHAR szSysDirStr[ _MAX_PATH ];
00361   TCHAR szRegeditPath[ _MAX_PATH + _MAX_FNAME + 1];
00362   GetSystemDirectory(szSysDirStr, _MAX_PATH); //Get system path
00363
00364   //Search for regedit executable on system path
00365   memset (szRegeditPath, 0, sizeof (szRegeditPath));
00366   bFoundRegedit = SearchPath(szSysDirStr, _T("REGEDT32.EXE"), NULL, _MAX_PATH + _MAX_FNAME, szRegeditPath, NULL);
00367   if (!bFoundRegedit)
00368     bFoundRegedit = SearchPath(szSysDirStr, _T("REGEDIT.EXE"), NULL, _MAX_PATH + _MAX_FNAME, szRegeditPath, NULL);
00369
00370   if (bFoundRegedit) {
00371     #pragma warning(suppress: 6054) // unexpected prefast warning
00372     CreateProcess( szRegeditPath, //path to regedit exe
00373       NULL, // pointer to command line string
00374       NULL, // Process handle not inheritable.
00375       NULL, // Thread handle not inheritable.
00376       FALSE,  // Set handle inheritance to FALSE.
00377       0,    // No creation flags.
00378       NULL, // Use parent's environment block.
00379       NULL, // Use parent's starting directory.
00380       &si,  // Pointer to STARTUPINFO structure.
00381       &pi   // Pointer to PROCESS_INFORMATION structure.
00382     );
00383
00384
00385     CloseHandle( pi.hProcess );
00386     CloseHandle( pi.hThread );
00387   }
00388 }
00389
00390 void CMainFrame::OnViewRefresh()
00391 {
00392   COle2ViewDoc*   pDoc = (COle2ViewDoc*)GetActiveDocument() ;
00393   pDoc->UpdateAllViews( NULL, UPD_NORELOAD ) ;
00394 }
00395
00396 void CMainFrame::OnUpdateViewRefresh(CCmdUI* /*pCmdUI*/)
00397 {
00398 }
00399
00400 void CMainFrame::OnSysColorChange()
00401 {
00402 //    Ctl3dColorChange() ;
00403   theApp.LoadBitmaps( TRUE ) ;
00404   CFrameWnd::OnSysColorChange();
00405 }
00406
00407 void CMainFrame::OnObjectDelete()
00408 {
00409   m_pObjTreeView->OnObjectDelete() ;
00410 }
00411
00412 void CMainFrame::OnUpdateObjectDelete(CCmdUI* pCmdUI)
00413 {
00414   pCmdUI->Enable( m_pObjTreeView->IsValidSel() ) ;
00415 }
00416
00417 void CMainFrame::OnObjectVerify()
00418 {
00419   m_pObjTreeView->OnObjectVerify() ;
00420
00421 }
00422
00423 void CMainFrame::OnUpdateObjectVerify(CCmdUI* pCmdUI)
00424 {
00425   pCmdUI->Enable( m_pObjTreeView->IsValidSel() ) ;
00426 }
00427
00428 void CMainFrame::OnFileViewTypeLib()
00429 {
00430   static TCHAR szFilter[] = _T("TypeLib Files (*.tlb;*.olb;*.dll;*.ocx;*.exe)|*.tlb;*.olb;*.dll;*.ocx;*.exe|AllFiles(*.*)|*.*|") ;
00431
00432   CFileDialog dlg(TRUE, _T("*.tlb"), NULL,
00433           OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST,
00434           szFilter, this);
00435   if (IDOK != dlg.DoModal())
00436     return ;
00437
00438   // Call LoadTypeLib
00439   LPTYPELIB lpTypeLib;
00440   HRESULT hr = ::LoadTypeLib(CT2COLE(dlg.GetPathName()), &lpTypeLib);
00441   if (FAILED(hr))
00442   {
00443     CString szErrorMsg;
00444     szErrorMsg.Format(_T("LoadTypeLib( %s ) failed."),(LPCTSTR)dlg.GetPathName());
00445     ErrorMessage( szErrorMsg, hr );
00446     return ;
00447   }
00448   // call the interface wiewer
00449   ENSURE(lpTypeLib != NULL);
00450   ViewInterface( GetSafeHwnd(), IID_ITypeLib, (IUnknown*)lpTypeLib);
00451   VERIFY(0 == lpTypeLib->Release()) ;
00452 }
00453
00454 void WINAPI ViewInterface( HWND hwnd, REFIID riid, IUnknown *punk )
00455 {
00456   IInterfaceViewer* piv = NULL ;
00457   SCODE sc ;
00458
00459   // Look in the registry for the "Ole2ViewIViewer=" key for this iid
00460   //
00461   TCHAR szKey[128] ;
00462   TCHAR szValue[80] ;
00463   TCHAR szInterface[80] ;
00464
00465   // get the string from CLSID in TCHAR format
00466   LPOLESTR lpszOleIID = NULL;
00467   ::StringFromCLSID(riid, &lpszOleIID);
00468   ASSERT(lpszOleIID != NULL);
00469
00470   COLE2T lpszIID(lpszOleIID);
00471   ENSURE(lpszIID != NULL);
00472   IMalloc* pmal = NULL ;
00473   ::CoGetMalloc( MEMCTX_TASK, &pmal ) ;
00474   pmal->Free( lpszOleIID ) ;
00475   pmal->Release() ;
00476
00477   _stprintf_s(szKey, 128, _T("Interface\\%s"), lpszIID) ;
00478
00479   LONG cb = sizeof(szValue);
00480   if (::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szInterface, &cb) != ERROR_SUCCESS)
00481   {
00482     _tcscpy_s( szInterface, 80, "<no name>" ) ;
00483   }
00484
00485   _stprintf_s(szKey, 128, _T("Interface\\%s\\Ole2ViewIViewerCLSID"), lpszIID );
00486
00487   cb = sizeof(szValue) ;
00488   if (::RegQueryValue(HKEY_CLASSES_ROOT, szKey, szValue, &cb) != ERROR_SUCCESS)
00489   {
00490     CString str;
00491     str.Format(_T("There is no interface viewer for %s installed."), szInterface);
00492     ErrorMessage( str, E_FAIL ) ;
00493     return ;
00494   }
00495
00496   CLSID clsid ;
00497   sc = ::CLSIDFromString( CT2OLE(szValue), &clsid ) ;
00498   if (FAILED(sc))
00499   {
00500     CString str;
00501     str.Format(_T("Could not convert the CLSID of the %s interface viewer."), szInterface);
00502     ErrorMessage( str, sc ) ;
00503     return ;
00504   }
00505
00506   sc = ::CoCreateInstance( clsid, NULL, CLSCTX_SERVER, IID_IInterfaceViewer, (void**)&piv ) ;
00507   if (SUCCEEDED(sc))
00508   {
00509     IUnknown* ptemp = NULL ;
00510     HRESULT hr = punk->QueryInterface( riid, (void**)&ptemp ) ;
00511     if (SUCCEEDED(hr))
00512     {
00513       piv->View( hwnd, riid, ptemp ) ;
00514       piv->Release() ;
00515       ptemp->Release() ;
00516     }
00517   }
00518   else
00519   {
00520     CString str;
00521     str.Format(_T("The %s interface viewer failed to load."), szInterface);
00522     ErrorMessage( str, sc ) ;
00523   }
00524 }
00525
00526 void CMainFrame::OnUseInProcServer()
00527 {
00528   m_pObjTreeView->OnUseInProcServer();
00529 }
00530
00531 void CMainFrame::OnUpdateUseInProcServer(CCmdUI* pCmdUI)
00532 {
00533   m_pObjTreeView->OnUpdateUseInProcServer( pCmdUI );
00534 }
00535
00536 void CMainFrame::OnUseInProcHandler()
00537 {
00538    m_pObjTreeView->OnUseInProcHandler();
00539 }
00540
00541 void CMainFrame::OnUpdateUseInProcHandler(CCmdUI* pCmdUI)
00542 {
00543   m_pObjTreeView->OnUpdateUseInProcHandler( pCmdUI ) ;
00544 }
00545
00546 void CMainFrame::OnUseLocalServer()
00547 {
00548   m_pObjTreeView->OnUseLocalServer() ;
00549 }
00550
00551 void CMainFrame::OnUpdateUseLocalServer(CCmdUI* pCmdUI)
00552 {
00553   m_pObjTreeView->OnUpdateUseLocalServer( pCmdUI ) ;
00554 }
00555
00556 void CMainFrame::OnFileBind()
00557 {
00558   m_pObjTreeView->OnFileBind() ;
00559 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoDoc.h Source File

  • vc2008fp
  • MDITabsDemo

MDITabsDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMDITabsDemoDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CMDITabsDemoDoc();
00017   DECLARE_DYNCREATE(CMDITabsDemoDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CMDITabsDemoDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropSheetDemoDlg Member List

This is the complete list of members for CPropSheetDemoDlg, including all inherited members.
CPropSheetDemoDlg(CWnd *pParent=NULL) | CPropSheetDemoDlg |
DoDataExchange(CDataExchange *pDX) | CPropSheetDemoDlg | [protected, virtual]
IDD enum value | CPropSheetDemoDlg |
m_bHeader | CPropSheetDemoDlg |
m_hIcon | CPropSheetDemoDlg | [protected]
OnInitDialog() | CPropSheetDemoDlg | [protected, virtual]
OnPaint() | CPropSheetDemoDlg | [protected]
OnPropSheet1() | CPropSheetDemoDlg | [protected]
OnPropSheet2() | CPropSheetDemoDlg | [protected]
OnPropSheet3() | CPropSheetDemoDlg | [protected]
OnPropSheet4() | CPropSheetDemoDlg | [protected]
OnPropSheet5() | CPropSheetDemoDlg | [protected]
OnQueryDragIcon() | CPropSheetDemoDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CPropSheetDemoDlg | [protected]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinctl.h Source File

  • controls
  • spindial

spinctl.h

Go to the documentation of this file.
00001 // spinctl.h : Declaration of the CSpindialCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CSpindialCtrl : See spinctl.cpp for implementation.
00015
00016 class CSpindialCtrl : public COleControl
00017 {
00018   DECLARE_DYNCREATE(CSpindialCtrl)
00019
00020 // Constructor
00021 public:
00022   CSpindialCtrl();
00023
00024 // Overrides
00025
00026   // Drawing function
00027   virtual void OnDraw(
00028         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00029
00030   // Persistence
00031   virtual void DoPropExchange(CPropExchange* pPX);
00032
00033   // Reset control state
00034   virtual void OnResetState();
00035
00036 // Implementation
00037 protected:
00038   ~CSpindialCtrl();
00039
00040   DECLARE_OLECREATE_EX(CSpindialCtrl) // Class factory and guid
00041   DECLARE_OLETYPELIB(CSpindialCtrl)       // GetTypeInfo
00042   DECLARE_PROPPAGEIDS(CSpindialCtrl)      // Property page IDs
00043   DECLARE_OLECTLTYPE(CSpindialCtrl)       // Type name and misc status
00044
00045 // Message maps
00046   //{{AFX_MSG(CSpindialCtrl)
00047       afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00048     //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050
00051 // Dispatch maps
00052   //{{AFX_DISPATCH(CSpindialCtrl)
00053   afx_msg short GetNeedlePosition();
00054   afx_msg void SetNeedlePosition(short nNewValue);
00055   //}}AFX_DISPATCH
00056   DECLARE_DISPATCH_MAP()
00057
00058   afx_msg void AboutBox();
00059
00060 // Event maps
00061   //{{AFX_EVENT(CSpindialCtrl)
00062   void FireSpinPositive()
00063     {FireEvent(eventidSpinPositive,EVENT_PARAM(VTS_NONE));}
00064   //}}AFX_EVENT
00065   DECLARE_EVENT_MAP()
00066
00067 // Dispatch and event IDs
00068 public:
00069   enum {
00070   //{{AFX_DISP_ID(CSpindialCtrl)
00071   dispidNeedlePosition = 1L,
00072   eventidSpinPositive = 1L,
00073   //}}AFX_DISP_ID
00074   };
00075
00076   virtual void SpinNeedlePosition();
00077
00078 protected:
00079   short   m_needlePosition;
00080 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/resource.h Source File

  • general
  • SimpleImage

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by CImage.rc
00004 //
00005 #define IDD_INFODLG                     9
00006 #define IDD_ABOUTBOX                    100
00007 #define IDP_OLE_INIT_FAILED             100
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_CImageTYPE                  129
00010 #define ID_FILE_OPENIMAGE               130
00011 #define ID_TOOLS_MAKEBW                 131
00012 #define ID_FILE_IMAGEINFO               132
00013 #define ID_FILE_SAVEIMAGE               133
00014 #define IDD_DIALOG1                     134
00015 #define IDR_SIZE_TOOLBAR                135
00016 #define IDC_IMAGESIZE                   1002
00017 #define IDC_PITCH                       1004
00018 #define IDC_DIBSECTION                  1005
00019 #define IDC_INDEXED                     1006
00020 #define IDC_BITDEPTH                    1007
00021 #define ID_SIZE_BASE                    2001
00022 #define ID_SIZE_HALF                    2001
00023 #define ID_SIZE_ORIGINAL                2002
00024 #define ID_SIZE_DOUBLE                  2003
00025 #define ID_SIZE_FILL                    2004
00026 #define ID_SIZE_FULLSCREEN              2005
00027
00028 // Next default values for new objects
00029 //
00030 #ifdef APSTUDIO_INVOKED
00031 #ifndef APSTUDIO_READONLY_SYMBOLS
00032 #define _APS_NEXT_RESOURCE_VALUE        141
00033 #define _APS_NEXT_COMMAND_VALUE         32777
00034 #define _APS_NEXT_CONTROL_VALUE         1008
00035 #define _APS_NEXT_SYMED_VALUE           101
00036 #endif
00037 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/targetver.h Source File

  • vc2008fp
  • Explorer

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSchedulerApp Member List

This is the complete list of members for CSchedulerApp, including all inherited members.
CSchedulerApp() | CSchedulerApp |
InitInstance() | CSchedulerApp | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertySet Member List

This is the complete list of members for CPropertySet, including all inherited members.
AddProperty(CLSID FormatID, CProperty *pProp) | CPropertySet |
AddProperty(CLSID FormatID, CProperty *pProp) | CPropertySet |
AddSection(CLSID FormatID) | CPropertySet |
AddSection(CPropertySection *psect) | CPropertySet |
AddSection(CLSID FormatID) | CPropertySet |
AddSection(CPropertySection *psect) | CPropertySet |
CProperty class | CPropertySet | [friend]
CPropertySection class | CPropertySet | [friend]
CPropertySet(void) | CPropertySet |
CPropertySet(CLSID clsID) | CPropertySet |
CPropertySet(void) | CPropertySet |
CPropertySet(CLSID clsID) | CPropertySet |
Get(CLSID FormatID, DWORD dwPropID, DWORD *pcb) | CPropertySet |
Get(CLSID FormatID, DWORD dwPropID) | CPropertySet |
Get(CLSID FormatID, DWORD dwPropID, DWORD *pcb) | CPropertySet |
Get(CLSID FormatID, DWORD dwPropID) | CPropertySet |
GetByteOrder(void) | CPropertySet |
GetByteOrder(void) | CPropertySet |
GetClassID(void) | CPropertySet |
GetClassID(void) | CPropertySet |
GetCount(void) | CPropertySet |
GetCount(void) | CPropertySet |
GetFormatVersion(void) | CPropertySet |
GetFormatVersion(void) | CPropertySet |
GetList(void) | CPropertySet |
GetList(void) | CPropertySet |
GetOSVersion(void) | CPropertySet |
GetOSVersion(void) | CPropertySet |
GetProperty(CLSID FormatID, DWORD dwPropID) | CPropertySet |
GetProperty(CLSID FormatID, DWORD dwPropID) | CPropertySet |
GetSection(CLSID FormatID) | CPropertySet |
GetSection(CLSID FormatID) | CPropertySet |
m_PH | CPropertySet | [private]
m_SectionList | CPropertySet | [private]
ReadFromStream(IStream *pIStream) | CPropertySet |
ReadFromStream(IStream *pIStream) | CPropertySet |
Remove(CLSID FormatID, DWORD dwPropID) | CPropertySet |
Remove(CLSID FormatID) | CPropertySet |
Remove(CLSID FormatID, DWORD dwPropID) | CPropertySet |
Remove(CLSID FormatID) | CPropertySet |
RemoveAll() | CPropertySet |
RemoveAll() | CPropertySet |
Set(CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType) | CPropertySet |
Set(CLSID FormatID, DWORD dwPropID, LPVOID pValue) | CPropertySet |
Set(CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType) | CPropertySet |
Set(CLSID FormatID, DWORD dwPropID, LPVOID pValue) | CPropertySet |
SetClassID(CLSID clsid) | CPropertySet |
SetClassID(CLSID clsid) | CPropertySet |
SetFormatVersion(WORD wFmtVersion) | CPropertySet |
SetFormatVersion(WORD wFmtVersion) | CPropertySet |
SetOSVersion(DWORD dwOSVer) | CPropertySet |
SetOSVersion(DWORD dwOSVer) | CPropertySet |
WriteToStream(IStream *pIStream) | CPropertySet |
WriteToStream(IStream *pIStream) | CPropertySet |
~CPropertySet() | CPropertySet |
~CPropertySet() | CPropertySet |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPane.h Source File

  • vc2008fp
  • TasksPane

TasksPane.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTasksPaneApp:
00021 // See TasksPane.cpp for the implementation of this class
00022 //
00023
00024 class CTasksPaneApp : public CWinAppEx
00025 {
00026 public:
00027   CTasksPaneApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern CTasksPaneApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/MainFrm.cpp Source File

  • vc2008fp
  • Slider

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Slider.h"
00013 #include "SliderButton.h"
00014
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
00027
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
00030   ON_WM_CREATE()
00031   ON_WM_CLOSE()
00032   ON_COMMAND(ID_SLIDER, OnSlider)
00033   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00034   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00035   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00036 END_MESSAGE_MAP()
00037
00038 static UINT indicators[] =
00039 {
00040   ID_SEPARATOR,           // status line indicator
00041   ID_INDICATOR_CAPS,
00042   ID_INDICATOR_NUM,
00043   ID_INDICATOR_SCRL,
00044 };
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMainFrame construction/destruction
00048
00049 CMainFrame::CMainFrame()
00050 {
00051   // TODO: add member initialization code here
00052
00053 }
00054
00055 CMainFrame::~CMainFrame()
00056 {
00057 }
00058
00059 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00060 {
00061   if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
00062     return -1;
00063
00064   CMFCToolBar::EnableQuickCustomization ();
00065
00066   // enable Office XP look:
00067   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00068
00069   // TODO: Define your own basic commands. Be sure, that each pulldown
00070   // menu have at least one basic command.
00071
00072   CList<UINT, UINT> lstBasicCommands;
00073
00074   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00075   lstBasicCommands.AddTail (ID_FILE_NEW);
00076   lstBasicCommands.AddTail (ID_FILE_OPEN);
00077   lstBasicCommands.AddTail (ID_FILE_SAVE);
00078   lstBasicCommands.AddTail (ID_FILE_PRINT);
00079   lstBasicCommands.AddTail (ID_APP_EXIT);
00080   lstBasicCommands.AddTail (ID_EDIT_CUT);
00081   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00082   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00083   lstBasicCommands.AddTail (ID_APP_ABOUT);
00084   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00085   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00086
00087   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00088
00089   if (!m_wndMenuBar.Create (this))
00090   {
00091     TRACE0("Failed to create menubar\n");
00092     return -1;      // fail to create
00093   }
00094
00095   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00096
00097   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00098     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00099     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00100   {
00101     TRACE0("Failed to create toolbar\n");
00102     return -1;      // fail to create
00103   }
00104   if (!m_wndStatusBar.Create(this) ||
00105     !m_wndStatusBar.SetIndicators(indicators,
00106       sizeof(indicators)/sizeof(UINT)))
00107   {
00108     TRACE0("Failed to create status bar\n");
00109     return -1;      // fail to create
00110   }
00111
00112   BOOL bValidString;
00113   CString strMainToolbarTitle;
00114   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00115   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00116   // TODO: Delete these three lines if you don't want the toolbar to
00117   //  be dockable
00118   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00119   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00120   EnableDocking(CBRS_ALIGN_ANY);
00121   DockPane(&m_wndMenuBar);
00122   DockPane(&m_wndToolBar);
00123
00124   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00125   return 0;
00126 }
00127
00128 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00129 {
00130   if( !CFrameWndEx::PreCreateWindow(cs) )
00131     return FALSE;
00132   // TODO: Modify the Window class or styles here by modifying
00133   //  the CREATESTRUCT cs
00134
00135   return TRUE;
00136 }
00137
00138 /////////////////////////////////////////////////////////////////////////////
00139 // CMainFrame diagnostics
00140
00141 #ifdef _DEBUG
00142 void CMainFrame::AssertValid() const
00143 {
00144   CFrameWndEx::AssertValid();
00145 }
00146
00147 void CMainFrame::Dump(CDumpContext& dc) const
00148 {
00149   CFrameWndEx::Dump(dc);
00150 }
00151
00152 #endif //_DEBUG
00153
00154 /////////////////////////////////////////////////////////////////////////////
00155 // CMainFrame message handlers
00156
00157
00158 void CMainFrame::OnViewCustomize()
00159 {
00160   //------------------------------------
00161   // Create a customize toolbars dialog:
00162   //------------------------------------
00163   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00164     TRUE /* Automatic menus scaning */);
00165
00166   CSliderButton btnSlider (ID_SLIDER);
00167   btnSlider.SetRange (0, 100);
00168
00169   pDlgCust->AddButton (_T("Edit"), btnSlider);
00170   pDlgCust->Create ();
00171 }
00172
00173 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00174 {
00175   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00176
00177   CMenu menu;
00178   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00179
00180   CMenu* pPopup = menu.GetSubMenu(0);
00181   ASSERT(pPopup != NULL);
00182
00183   if (pPopup)
00184   {
00185     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00186     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00187   }
00188
00189   return 0;
00190 }
00191
00192 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
00193 {
00194   UINT uiToolBarId = (UINT) wp;
00195   if (uiToolBarId == IDR_MAINFRAME)
00196   {
00197     CSliderButton btnSlider (ID_SLIDER);
00198     btnSlider.SetRange (0, 100);
00199
00200     m_wndToolBar.ReplaceButton (ID_SLIDER, btnSlider);
00201   }
00202
00203   return 0;
00204 }
00205
00206 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00207 {
00208   //---------------------------------------------------------
00209   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00210   //---------------------------------------------------------
00211   CFrameWndEx::OnShowPopupMenu (pMenuPopup);
00212
00213   if (pMenuPopup != NULL &&
00214     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00215   {
00216     if (CMFCToolBar::IsCustomizeMode ())
00217     {
00218       //----------------------------------------------------
00219       // Don't show toolbars list in the cuztomization mode!
00220       //----------------------------------------------------
00221       return FALSE;
00222     }
00223
00224     pMenuPopup->RemoveAllItems ();
00225
00226     CMenu menu;
00227     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00228
00229     CMenu* pPopup = menu.GetSubMenu(0);
00230     ASSERT(pPopup != NULL);
00231
00232     if (pPopup)
00233     {
00234       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00235     }
00236   }
00237
00238   return TRUE;
00239 }
00240
00241 void CMainFrame::OnSlider()
00242 {
00243   if (GetAsyncKeyState (VK_LBUTTON) == 0)
00244   {
00245     CString str;
00246     str.Format (_T("Moved to: %d"), CSliderButton::GetPos (ID_SLIDER));
00247
00248     AfxMessageBox (str);
00249   }
00250 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mfcdual.cpp Source File

  • ole
  • acdual

mfcdual.cpp

Go to the documentation of this file.
00001 // mfcdual.cpp: Helpful functions for adding dual interface support to
00002 //              MFC applications
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "AutoClik.h"
00015
00016 #include <afxpriv.h>
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // DualHandleException
00026
00027 HRESULT DualHandleException(REFIID riidSource, const CException* pAnyException)
00028 {
00029   USES_CONVERSION;
00030
00031   ASSERT_VALID(pAnyException);
00032
00033   TRACE0("DualHandleException called\n");
00034
00035   // Set ErrInfo object so that VTLB binding container
00036   // applications can get rich error information.
00037   ICreateErrorInfo* pcerrinfo;
00038   HRESULT hr = CreateErrorInfo(&pcerrinfo);
00039   if (SUCCEEDED(hr))
00040   {
00041     TCHAR   szDescription[256];
00042     LPCTSTR pszDescription = szDescription;
00043     GUID    guid = GUID_NULL;
00044     DWORD   dwHelpContext = 0;
00045     BSTR    bstrHelpFile = NULL;
00046     BSTR    bstrSource = NULL;
00047     if (pAnyException->IsKindOf(RUNTIME_CLASS(COleDispatchException)))
00048     {
00049       // specific IDispatch style exception
00050       COleDispatchException* e = (COleDispatchException*)pAnyException;
00051
00052       guid = riidSource;
00053       hr = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF,
00054                 (e->m_wCode + 0x200));
00055
00056       pszDescription = e->m_strDescription;
00057       dwHelpContext = e->m_dwHelpContext;
00058
00059       // propagate source and help file if present
00060       // call ::SysAllocString directly so no further exceptions are thrown
00061       if (!e->m_strHelpFile.IsEmpty())
00062         bstrHelpFile = ::SysAllocString(CT2COLE(e->m_strHelpFile));
00063       if (!e->m_strSource.IsEmpty())
00064         bstrSource = ::SysAllocString(CT2COLE(e->m_strSource));
00065
00066     }
00067     else if (pAnyException->IsKindOf(RUNTIME_CLASS(CMemoryException)))
00068     {
00069       // failed memory allocation
00070       AfxLoadString(AFX_IDP_FAILED_MEMORY_ALLOC, szDescription);
00071       hr = E_OUTOFMEMORY;
00072     }
00073     else
00074     {
00075       // other unknown/uncommon error
00076       AfxLoadString(AFX_IDP_INTERNAL_FAILURE, szDescription);
00077       hr = E_UNEXPECTED;
00078     }
00079
00080     if (bstrHelpFile == NULL && dwHelpContext != 0)
00081       bstrHelpFile = ::SysAllocString(CT2COLE(AfxGetApp()->m_pszHelpFilePath));
00082
00083     if (bstrSource == NULL)
00084       bstrSource = ::SysAllocString(CT2COLE(AfxGetAppName()));
00085
00086     // Set up ErrInfo object
00087     pcerrinfo->SetGUID(guid);
00088     pcerrinfo->SetDescription(::SysAllocString(CT2COLE(pszDescription)));
00089     pcerrinfo->SetHelpContext(dwHelpContext);
00090     pcerrinfo->SetHelpFile(bstrHelpFile);
00091     pcerrinfo->SetSource(bstrSource);
00092
00093     TRACE("\tSource = %ws\n", bstrSource);
00094     TRACE("\tDescription = %s\n", pszDescription);
00095     TRACE("\tHelpContext = %lx\n", dwHelpContext);
00096     TRACE("\tHelpFile = %ws\n", bstrHelpFile);
00097
00098     // Set the ErrInfo object for the current thread
00099     IErrorInfo* perrinfo;
00100     if (SUCCEEDED(pcerrinfo->QueryInterface(IID_IErrorInfo, (LPVOID*)&perrinfo)))
00101     {
00102       SetErrorInfo(0, perrinfo);
00103       perrinfo->Release();
00104     }
00105
00106     pcerrinfo->Release();
00107   }
00108
00109   TRACE("DualHandleException returning HRESULT %lx\n", hr);
00110
00111   return hr;
00112 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/guidgdlg.h Source File

  • utility
  • guidgen

guidgdlg.h

Go to the documentation of this file.
00001 // guidgdlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CGuidGenDlg dialog
00014
00015 class CGuidGenDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CGuidGenDlg(CWnd* pParent = NULL);  // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CGuidGenDlg)
00023   enum { IDD = IDD_GUIDGEN_DIALOG };
00024   int     m_nGuidType;
00025   //}}AFX_DATA
00026
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CGuidGenDlg)
00029   protected:
00030   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00031   //}}AFX_VIRTUAL
00032
00033 // Implementation
00034 protected:
00035   HICON m_hIcon;
00036
00037   GUID m_guid;    // generated GUID
00038   void GetFormattedGuid(CString& rString);
00039
00040   // Generated message map functions
00041   //{{AFX_MSG(CGuidGenDlg)
00042   virtual BOOL OnInitDialog();
00043   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00044   afx_msg void OnPaint();
00045   afx_msg HCURSOR OnQueryDragIcon();
00046   virtual void OnOK();
00047   afx_msg void OnNewguid();
00048   //}}AFX_MSG
00049   afx_msg void OnChangedSel(UINT nID);
00050   DECLARE_MESSAGE_MAP()
00051 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/resource.h Source File

  • vc2008fp
  • Slider

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by Slider.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_SLIDERTYPE                  129
00009 #define IDR_POPUP_TOOLBAR               131
00010 #define IDD_ABOUTBOX                    999
00011 #define ID_VIEW_CUSTOMIZE               32770
00012 #define ID_VIEW_TOOLBARS                32771
00013 #define ID_SLIDER                       32822
00014
00015 // Next default values for new objects
00016 //
00017 #ifdef APSTUDIO_INVOKED
00018 #ifndef APSTUDIO_READONLY_SYMBOLS
00019 #define _APS_3D_CONTROLS                     1
00020 #define _APS_NEXT_RESOURCE_VALUE        151
00021 #define _APS_NEXT_COMMAND_VALUE         32823
00022 #define _APS_NEXT_CONTROL_VALUE         1041
00023 #define _APS_NEXT_SYMED_VALUE           107
00024 #endif
00025 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/stdafx.h Source File

  • controls
  • circ

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTipsDlg.cpp Source File

  • vc2008fp
  • DlgToolTips

DlgToolTipsDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DlgToolTips.h"
00013 #include "DlgToolTipsDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CDlgToolTipsDlg dialog
00023
00024 CDlgToolTipsDlg::CDlgToolTipsDlg(CWnd* pParent /*=NULL*/)
00025   : CDialogEx(CDlgToolTipsDlg::IDD, pParent)
00026 {
00027   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00028   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00029 }
00030
00031 void CDlgToolTipsDlg::DoDataExchange(CDataExchange* pDX)
00032 {
00033   CDialogEx::DoDataExchange(pDX);
00034 }
00035
00036 BEGIN_MESSAGE_MAP(CDlgToolTipsDlg, CDialogEx)
00037   ON_WM_SYSCOMMAND()
00038   ON_WM_PAINT()
00039   ON_WM_QUERYDRAGICON()
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CDlgToolTipsDlg message handlers
00044
00045 BOOL CDlgToolTipsDlg::OnInitDialog()
00046 {
00047   CDialogEx::OnInitDialog();
00048
00049   // Add "About..." menu item to system menu.
00050
00051   // IDM_ABOUTBOX must be in the system command range.
00052   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00053   ASSERT(IDM_ABOUTBOX < 0xF000);
00054
00055   CMenu* pSysMenu = GetSystemMenu(FALSE);
00056   if (pSysMenu != NULL)
00057   {
00058     BOOL bValidString;
00059     CString strAboutMenu;
00060     bValidString = strAboutMenu.LoadString(IDS_ABOUTBOX);
00061     if (!strAboutMenu.IsEmpty())
00062     {
00063       pSysMenu->AppendMenu(MF_SEPARATOR);
00064       pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00065     }
00066   }
00067
00068   // Set the icon for this dialog.  The framework does this automatically
00069   //  when the application's main window is not a dialog
00070   SetIcon(m_hIcon, TRUE);     // Set big icon
00071   SetIcon(m_hIcon, FALSE);    // Set small icon
00072
00073   // Create the ToolTip control.
00074   m_ToolTip.Create(this);
00075   m_ToolTip.Activate(TRUE);
00076
00077   CMFCToolTipInfo params;
00078   params.m_bVislManagerTheme = TRUE;
00079
00080   m_ToolTip.SetParams (&params);
00081
00082   // TODO: Use one of the following forms to add controls:
00083   m_ToolTip.AddTool (GetDlgItem(IDOK), _T("This is the OK button!"));
00084   m_ToolTip.AddTool (GetDlgItem(IDCANCEL), _T("This is the Cancel button!"));
00085
00086   return TRUE;  // return TRUE  unless you set the focus to a control
00087 }
00088
00089 void CDlgToolTipsDlg::OnSysCommand(UINT nID, LPARAM lParam)
00090 {
00091   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00092   {
00093
00094   }
00095   else
00096   {
00097     CDialogEx::OnSysCommand(nID, lParam);
00098   }
00099 }
00100
00101 // If you add a minimize button to your dialog, you will need the code below
00102 //  to draw the icon.  For MFC applications using the document/view model,
00103 //  this is automatically done for you by the framework.
00104
00105 void CDlgToolTipsDlg::OnPaint()
00106 {
00107   if (IsIconic())
00108   {
00109     CPaintDC dc(this); // device context for painting
00110
00111     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00112
00113     // Center icon in client rectangle
00114     int cxIcon = GetSystemMetrics(SM_CXICON);
00115     int cyIcon = GetSystemMetrics(SM_CYICON);
00116     CRect rect;
00117     GetClientRect(&rect);
00118     int x = (rect.Width() - cxIcon + 1) / 2;
00119     int y = (rect.Height() - cyIcon + 1) / 2;
00120
00121     // Draw the icon
00122     dc.DrawIcon(x, y, m_hIcon);
00123   }
00124   else
00125   {
00126     CDialogEx::OnPaint();
00127   }
00128 }
00129
00130 // The system calls this to obtain the cursor to display while the user drags
00131 //  the minimized window.
00132 HCURSOR CDlgToolTipsDlg::OnQueryDragIcon()
00133 {
00134   return (HCURSOR) m_hIcon;
00135 }
00136
00137 BOOL CDlgToolTipsDlg::PreTranslateMessage(MSG* pMsg)
00138 {
00139     switch (pMsg->message)
00140   {
00141   case WM_KEYDOWN:
00142   case WM_SYSKEYDOWN:
00143   case WM_LBUTTONDOWN:
00144   case WM_RBUTTONDOWN:
00145   case WM_MBUTTONDOWN:
00146   case WM_LBUTTONUP:
00147   case WM_RBUTTONUP:
00148   case WM_MBUTTONUP:
00149   case WM_MOUSEMOVE:
00150     m_ToolTip.RelayEvent(pMsg);
00151     break;
00152   }
00153
00154   return CDialogEx::PreTranslateMessage(pMsg);
00155 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/MainFrm.cpp Source File

  • general
  • DBVList

MainFrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "DBVList.h"
00014 #include "DBVListSet.h"
00015 #include "DBVListDoc.h"
00016 #include "DBVListView.h"
00017
00018 #include "MainFrm.h"
00019 #include "EmpView.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CMainFrame
00029
00030 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00031
00032 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00033   //{{AFX_MSG_MAP(CMainFrame)
00034   ON_WM_CREATE()
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 static UINT indicators[] =
00039 {
00040   ID_SEPARATOR,           // status line indicator
00041   ID_INDICATOR_CAPS,
00042   ID_INDICATOR_NUM,
00043   ID_INDICATOR_SCRL,
00044 };
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CMainFrame construction/destruction
00048
00049 CMainFrame::CMainFrame()
00050 {
00051 }
00052
00053 CMainFrame::~CMainFrame()
00054 {
00055 }
00056
00057 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00058 {
00059   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00060     return -1;
00061
00062   if (!m_wndToolBar.Create(this) ||
00063     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00064   {
00065     TRACE0("Failed to create toolbar\n");
00066     return -1;      // fail to create
00067   }
00068
00069   if (!m_wndStatusBar.Create(this) ||
00070     !m_wndStatusBar.SetIndicators(indicators,
00071       sizeof(indicators)/sizeof(UINT)))
00072   {
00073     TRACE0("Failed to create status bar\n");
00074     return -1;      // fail to create
00075   }
00076
00077   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00078     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00079
00080   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00081   EnableDocking(CBRS_ALIGN_ANY);
00082   DockControlBar(&m_wndToolBar);
00083
00084   return 0;
00085 }
00086
00087 BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/,
00088   CCreateContext* pContext)
00089 {
00090     if (!m_wndSplitter.CreateStatic(this,2,1))
00091     {
00092       TRACE0("Failed to create split bar ");
00093       return FALSE;    // failed to create
00094     }
00095     if(!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CDBVListView),CSize(10,200),pContext))
00096     {
00097       TRACE0("Failed to create CDBVListView ");
00098       return FALSE;    // failed to create
00099     }
00100     if(!m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CEmpView),CSize(10,100),pContext))
00101     {
00102       TRACE0("Failed to create CEmpView ");
00103       return FALSE;    // failed to create
00104     }
00105
00106     return TRUE;
00107 }
00108
00109 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00110 {
00111   return CFrameWnd::PreCreateWindow(cs);
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CMainFrame diagnostics
00116
00117 #ifdef _DEBUG
00118 void CMainFrame::AssertValid() const
00119 {
00120   CFrameWnd::AssertValid();
00121 }
00122
00123 void CMainFrame::Dump(CDumpContext& dc) const
00124 {
00125   CFrameWnd::Dump(dc);
00126 }
00127
00128 #endif //_DEBUG
00129
00130 /////////////////////////////////////////////////////////////////////////////
00131 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCheckBoxProp Member List

This is the complete list of members for CCheckBoxProp, including all inherited members.
CCheckBoxProp(const CString &strName, BOOL bCheck, LPCTSTR lpszDescr=NULL, DWORD dwData=0) | CCheckBoxProp |
HasButton() const | CCheckBoxProp | [inline, protected, virtual]
m_rectCheck | CCheckBoxProp | [protected]
OnClickName(CPoint point) | CCheckBoxProp | [protected, virtual]
OnDblClk(CPoint point) | CCheckBoxProp | [protected, virtual]
OnDrawButton(CDC *, CRect) | CCheckBoxProp | [inline, protected, virtual]
OnDrawCheckBox(CDC *pDC, CRect rectCheck, BOOL bChecked) | CCheckBoxProp | [protected, virtual]
OnDrawName(CDC *pDC, CRect rect) | CCheckBoxProp | [protected, virtual]
OnDrawValue(CDC *, CRect) | CCheckBoxProp | [inline, protected, virtual]
OnEdit(LPPOINT) | CCheckBoxProp | [inline, protected, virtual]
PushChar(UINT nChar) | CCheckBoxProp | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/EnterInfoDlg.h Source File

  • internet
  • Scheduler

EnterInfoDlg.h

Go to the documentation of this file.
00001 // File: EnterInfoDlg.h
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #ifndef __ENTERINFODLG_H_
00011 #define __ENTERINFODLG_H_
00012
00013 #include "Scheduler.h"
00014
00015 #pragma once
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CEnterInfoDlg dialog
00019
00020 class CEntryInfoDlg : public CDHtmlDialog
00021 {
00022   DECLARE_DYNCREATE(CEntryInfoDlg)
00023
00024 public:
00025   CEntryInfoDlg(CWnd* pParent = NULL);   // standard constructor
00026   virtual ~CEntryInfoDlg();
00027   void OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl);
00028   void ResetVariables();
00029   void SetDefaultSettings();
00030   void GetHourMinute(CString szTime, CString &szHour, CString &szMinute, int &iHour);
00031   BOOL CheckStartEndTime();
00032   BOOL CheckValidTitle();
00033   BOOL CheckValidDescription();
00034   const CEntryInfoDlg& operator=(const CEntryInfoDlg& InfoDlg);
00035
00036 //Member variables
00037   BOOL m_fUpdateScheduleDisplay;
00038   BOOL m_fDeleteSchedule;
00039   BOOL m_fModifySchedule;
00040   BOOL m_fClearSchedule;
00041   BOOL m_fCancelSchedule;
00042   BOOL m_fVisibleButtons;
00043   BOOL m_fVisibleDefaultButtons;
00044   CString m_szStartTime;
00045   CString m_szEndTime;
00046   CString m_szTitle;
00047   CString m_szDescription;
00048   CString m_szStartTimeHour;
00049   CString m_szStartTimeMinute;
00050   CString m_szEndTimeHour;
00051   CString m_szEndTimeMinute;
00052   int m_iStartHour;
00053   int m_iEndHour;
00054
00055 // Message Handlers
00056   HRESULT OnMouseOverButtons(IHTMLElement* pElement);
00057   HRESULT OnMouseOutButtons(IHTMLElement* pElement);
00058   HRESULT OnButtonSave(IHTMLElement *pElement);
00059   HRESULT OnButtonCancel(IHTMLElement *pElement);
00060   HRESULT OnButtonClear(IHTMLElement *pElement);
00061   HRESULT OnButtonModify(IHTMLElement *pElement);
00062   HRESULT OnButtonDelete(IHTMLElement *pElement);
00063
00064 // Dialog Data
00065   enum { IDD = IDD_ENTRYINFO_DLG, IDH = IDR_HTML_ENTRYINFO_DLG };
00066
00067 protected:
00068   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00069   virtual BOOL OnInitDialog();
00070
00071   DECLARE_MESSAGE_MAP()
00072   DECLARE_DHTML_EVENT_MAP()
00073 };
00074
00075 #endif
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/AProp.H Source File

  • ole
  • TstCon

AProp.H

Go to the documentation of this file.
00001 // File: AProp.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 class CAmbientProperty :
00011    public CObject
00012 {
00013    DECLARE_SERIAL( CAmbientProperty );
00014
00015 public:
00016    CAmbientProperty();
00017    CAmbientProperty( DISPID dispid, LPCTSTR pszName, const VARIANT& var,
00018     int vti, BOOL tStock = FALSE );
00019
00020    CAmbientProperty& operator=( const CAmbientProperty& prop );
00021
00022    void Enable( BOOL tEnabled );
00023    DISPID GetID() const;
00024    CString GetName() const;
00025    const COleVariant& GetValue() const;
00026    int GetVTI() const;
00027    BOOL IsEnabled() const;
00028    BOOL IsStock() const;
00029    void SetValue( const VARIANT& varValue, int vti = -1 );
00030
00031    void Serialize( CArchive& ar );
00032
00033 protected:
00034    DISPID m_dispid;
00035    CString m_strName;
00036    COleVariant m_varValue;
00037    int m_vti;
00038    BOOL m_tEnabled;
00039    BOOL m_tStock;
00040 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/MainFrm.cpp Source File

  • internet
  • MFCIE

MainFrm.cpp

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MainFrm.cpp : implementation of the CMainFrame class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "mfcie.h"
00015 #include <wininet.h>
00016
00017 #include "MainFrm.h"
00018 #include "mfcieDoc.h"
00019 #include "mfcieVw.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CMainFrame
00029
00030 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00031
00032 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00033   //{{AFX_MSG_MAP(CMainFrame)
00034   ON_WM_CREATE()
00035   //}}AFX_MSG_MAP
00036   ON_CBN_SELENDOK(AFX_IDW_TOOLBAR + 1,OnNewAddress)
00037   ON_COMMAND_RANGE(0xe00, 0xfff, OnFavorite)
00038   ON_COMMAND(IDOK, OnNewAddressEnter)
00039   ON_NOTIFY(TBN_DROPDOWN, AFX_IDW_TOOLBAR, OnDropDown)
00040   ON_COMMAND(ID_FAVORITES_DROPDOWN, DoNothing)
00041   ON_COMMAND(ID_FONT_DROPDOWN, DoNothing)
00042 END_MESSAGE_MAP()
00043
00044 static UINT indicators[] =
00045 {
00046   ID_SEPARATOR,           // status line indicator
00047   ID_INDICATOR_CAPS,
00048   ID_INDICATOR_NUM,
00049   ID_INDICATOR_SCRL,
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CMainFrame construction/destruction
00054
00055 CMainFrame::CMainFrame()
00056 {
00057 }
00058
00059 CMainFrame::~CMainFrame()
00060 {
00061 }
00062
00063 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00064 {
00065   CImageList img;
00066   CString str;
00067
00068   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00069     return -1;
00070
00071   if (!m_wndReBar.Create(this))
00072   {
00073     TRACE0("Failed to create rebar\n");
00074     return -1;      // fail to create
00075   }
00076
00077   if (!m_wndToolBar.CreateEx(this))
00078   {
00079     TRACE0("Failed to create toolbar\n");
00080     return -1;      // fail to create
00081   }
00082   // set up toolbar properties
00083   m_wndToolBar.GetToolBarCtrl().SetButtonWidth(50, 150);
00084   m_wndToolBar.GetToolBarCtrl().SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS);
00085
00086   img.Create(IDB_HOTTOOLBAR, 22, 0, RGB(255, 0, 255));
00087   m_wndToolBar.GetToolBarCtrl().SetHotImageList(&img);
00088   img.Detach();
00089   img.Create(IDB_COLDTOOLBAR, 22, 0, RGB(255, 0, 255));
00090   m_wndToolBar.GetToolBarCtrl().SetImageList(&img);
00091   img.Detach();
00092   m_wndToolBar.ModifyStyle(0, TBSTYLE_FLAT | TBSTYLE_TRANSPARENT);
00093   m_wndToolBar.SetButtons(NULL, 9);
00094
00095   // set up each toolbar button
00096   m_wndToolBar.SetButtonInfo(0, ID_GO_BACK, TBSTYLE_BUTTON, 0);
00097   str.LoadString(IDS_BACK);
00098   m_wndToolBar.SetButtonText(0, str);
00099   m_wndToolBar.SetButtonInfo(1, ID_GO_FORWARD, TBSTYLE_BUTTON, 1);
00100   str.LoadString(IDS_FORWARD);
00101   m_wndToolBar.SetButtonText(1, str);
00102   m_wndToolBar.SetButtonInfo(2, ID_VIEW_STOP, TBSTYLE_BUTTON, 2);
00103   str.LoadString(IDS_STOP);
00104   m_wndToolBar.SetButtonText(2, str);
00105   m_wndToolBar.SetButtonInfo(3, ID_VIEW_REFRESH, TBSTYLE_BUTTON, 3);
00106   str.LoadString(IDS_REFRESH);
00107   m_wndToolBar.SetButtonText(3, str);
00108   m_wndToolBar.SetButtonInfo(4, ID_GO_START_PAGE, TBSTYLE_BUTTON, 4);
00109   str.LoadString(IDS_HOME);
00110   m_wndToolBar.SetButtonText(4, str);
00111   m_wndToolBar.SetButtonInfo(5, ID_GO_SEARCH_THE_WEB, TBSTYLE_BUTTON, 5);
00112   str.LoadString(IDS_SEARCH);
00113   m_wndToolBar.SetButtonText(5, str);
00114   m_wndToolBar.SetButtonInfo(6, ID_FAVORITES_DROPDOWN, TBSTYLE_BUTTON | TBSTYLE_DROPDOWN, 6);
00115   str.LoadString(IDS_FAVORITES);
00116   m_wndToolBar.SetButtonText(6, str);
00117   m_wndToolBar.SetButtonInfo(7, ID_FILE_PRINT, TBSTYLE_BUTTON, 7);
00118   str.LoadString(IDS_PRINT);
00119   m_wndToolBar.SetButtonText(7, str);
00120   m_wndToolBar.SetButtonInfo(8, ID_FONT_DROPDOWN, TBSTYLE_BUTTON | TBSTYLE_DROPDOWN, 8);
00121   str.LoadString(IDS_FONT);
00122   m_wndToolBar.SetButtonText(8, str);
00123
00124   CRect rectToolBar;
00125
00126   // set up toolbar button sizes
00127   m_wndToolBar.GetItemRect(0, &rectToolBar);
00128   m_wndToolBar.SetSizes(rectToolBar.Size(), CSize(30,20));
00129
00130   // create a combo box for the address bar
00131   if (!m_wndAddress.Create(CBS_DROPDOWN | WS_CHILD, CRect(0, 0, 200, 120), this, AFX_IDW_TOOLBAR + 1))
00132   {
00133     TRACE0("Failed to create combobox\n");
00134     return -1;      // fail to create
00135   }
00136
00137   // create the animation control
00138   m_wndAnimate.Create(WS_CHILD | WS_VISIBLE, CRect(0, 0, 10, 10), this, AFX_IDW_TOOLBAR + 2);
00139   m_wndAnimate.Open(IDR_MFCAVI);
00140
00141   // add the toolbar, animation, and address bar to the rebar
00142   m_wndReBar.AddBar(&m_wndToolBar,NULL, NULL, RBBS_GRIPPERALWAYS|RBBS_FIXEDBMP|RBBS_USECHEVRON);
00143   m_wndReBar.AddBar(&m_wndAnimate, NULL, NULL, RBBS_FIXEDSIZE | RBBS_FIXEDBMP);
00144   str.LoadString(IDS_ADDRESS);
00145   m_wndReBar.AddBar(&m_wndAddress, str, NULL, RBBS_FIXEDBMP | RBBS_BREAK);
00146
00147   // set up min/max sizes and ideal sizes for pieces of the rebar
00148   REBARBANDINFO rbbi;
00149
00150   rbbi.cbSize = sizeof(rbbi);
00151   rbbi.fMask = RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_SIZE;
00152   rbbi.cxMinChild = rectToolBar.Width();
00153   rbbi.cyMinChild = rectToolBar.Height();
00154   rbbi.cx = rbbi.cxIdeal = rectToolBar.Width() * 9;
00155   m_wndReBar.GetReBarCtrl().SetBandInfo(0, &rbbi);
00156   rbbi.cxMinChild = 0;
00157
00158   CRect rectAddress;
00159
00160   rbbi.fMask = RBBIM_CHILDSIZE | RBBIM_IDEALSIZE;
00161   m_wndAddress.GetEditCtrl()->GetWindowRect(&rectAddress);
00162   rbbi.cyMinChild = rectAddress.Height() + 10;
00163   rbbi.cxIdeal = 200;
00164   m_wndReBar.GetReBarCtrl().SetBandInfo(2, &rbbi);
00165
00166   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00167     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_FIXED);
00168
00169   if (!m_wndStatusBar.Create(this) ||
00170     !m_wndStatusBar.SetIndicators(indicators,
00171       sizeof(indicators)/sizeof(UINT)))
00172   {
00173     TRACE0("Failed to create status bar\n");
00174     return -1;      // fail to create
00175   }
00176
00177 // set up Favorites menu
00178   TCHAR           sz[MAX_PATH];
00179   TCHAR           szPath[MAX_PATH];
00180   HKEY            hKey;
00181   DWORD           dwSize;
00182   CMenu*          pMenu;
00183   LONG    lRet;
00184
00185   // first get rid of bogus submenu items.
00186   pMenu = GetMenu()->GetSubMenu(3);
00187   while(pMenu->DeleteMenu(0, MF_BYPOSITION));
00188
00189   // find out from the registry where the favorites are located.
00190   if(RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"), 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
00191   {
00192     TRACE0("Favorites folder not found\n");
00193     return 0;
00194   }
00195
00196   // Guarantee NULL-termination
00197   sz[sizeof(sz)-1] = '\0';
00198   dwSize = sizeof(sz);
00199   lRet = RegQueryValueEx(hKey, _T("Favorites"), NULL, NULL, (LPBYTE)sz, &dwSize);
00200   RegCloseKey(hKey);
00201   if (lRet != ERROR_SUCCESS || sz[sizeof(sz)-1] != '\0')
00202   {
00203     TRACE0("Favorites folder not found\n");
00204     return 0;
00205   }
00206
00207   ExpandEnvironmentStrings(sz, szPath, sizeof(szPath));
00208   BuildFavoritesMenu(szPath, 0, pMenu);
00209   return 0;
00210 }
00211
00212 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00213 {
00214   cs.lpszClass = AfxRegisterWndClass(0);
00215   return CFrameWnd::PreCreateWindow(cs);
00216 }
00217
00218 /////////////////////////////////////////////////////////////////////////////
00219 // CMainFrame diagnostics
00220
00221 #ifdef _DEBUG
00222 void CMainFrame::AssertValid() const
00223 {
00224   CFrameWnd::AssertValid();
00225 }
00226
00227 void CMainFrame::Dump(CDumpContext& dc) const
00228 {
00229   CFrameWnd::Dump(dc);
00230 }
00231
00232 #endif //_DEBUG
00233
00234 /////////////////////////////////////////////////////////////////////////////
00235 // CMainFrame message handlers
00236
00237 int CMainFrame::BuildFavoritesMenu(LPCTSTR pszPath, int nStartPos, CMenu* pMenu)
00238 {
00239   CString         strPath(pszPath);
00240   CString         strPath2;
00241   CString         str;
00242   WIN32_FIND_DATA wfd;
00243   HANDLE          h;
00244   int             nPos = 0;
00245   int             nEndPos = 0;
00246   int             nNewEndPos = 0;
00247   int             nLastDir = 0;
00248   TCHAR           buf[INTERNET_MAX_PATH_LENGTH];
00249   CStringArray    astrFavorites;
00250   CStringArray    astrDirs;
00251   CMenu*          pSubMenu;
00252
00253   // make sure there's a trailing backslash
00254   if(strPath[strPath.GetLength() - 1] != _T('\\'))
00255     strPath += _T('\\');
00256   strPath2 = strPath;
00257   strPath += "*.*";
00258
00259   // now scan the directory, first for .URL files and then for subdirectories
00260   // that may also contain .URL files
00261   h = FindFirstFile(strPath, &wfd);
00262   if(h != INVALID_HANDLE_VALUE)
00263   {
00264     nEndPos = nStartPos;
00265     do
00266     {
00267       if((wfd.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM))==0)
00268       {
00269         str = wfd.cFileName;
00270         if(str.Right(4) == _T(".url"))
00271         {
00272           // an .URL file is formatted just like an .INI file, so we can
00273           // use GetPrivateProfileString() to get the information we want
00274           DWORD dwSize;
00275           dwSize = ::GetPrivateProfileString(_T("InternetShortcut"), _T("URL"),
00276                      _T(""), buf, INTERNET_MAX_PATH_LENGTH,
00277                      strPath2 + str);
00278           if (dwSize < INTERNET_MAX_PATH_LENGTH &&
00279               buf[dwSize] == '\0')
00280           {
00281             str = str.Left(str.GetLength() - 4);
00282
00283             // scan through the array and perform an insertion sort
00284             // to make sure the menu ends up in alphabetic order
00285             for(nPos = nStartPos ; nPos < nEndPos ; ++nPos)
00286             {
00287               if(str.CompareNoCase(astrFavorites[nPos]) < 0)
00288                 break;
00289             }
00290             astrFavorites.InsertAt(nPos, str);
00291             m_astrFavoriteURLs.InsertAt(nPos, buf);
00292             ++nEndPos;
00293           }
00294         }
00295       }
00296     } while(FindNextFile(h, &wfd));
00297     FindClose(h);
00298     // Now add these items to the menu
00299     for(nPos = nStartPos ; nPos < nEndPos ; ++nPos)
00300     {
00301       pMenu->AppendMenu(MF_STRING | MF_ENABLED, 0xe00 + nPos, astrFavorites[nPos]);
00302     }
00303
00304
00305     // now that we've got all the .URL files, check the subdirectories for more
00306     nLastDir = 0;
00307     h = FindFirstFile(strPath, &wfd);
00308     ASSERT(h != INVALID_HANDLE_VALUE);
00309     do
00310     {
00311       if(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
00312       {
00313         // ignore the current and parent directory entries
00314         if(lstrcmp(wfd.cFileName, _T(".")) == 0 || lstrcmp(wfd.cFileName, _T("..")) == 0)
00315           continue;
00316
00317         for(nPos = 0 ; nPos < nLastDir ; ++nPos)
00318         {
00319           if(astrDirs[nPos].CompareNoCase(wfd.cFileName) > 0)
00320             break;
00321         }
00322         pSubMenu = new CMenu;
00323         pSubMenu->CreatePopupMenu();
00324
00325         // call this function recursively.
00326         nNewEndPos = BuildFavoritesMenu(strPath2 + wfd.cFileName, nEndPos, pSubMenu);
00327         if(nNewEndPos != nEndPos)
00328         {
00329           // only intert a submenu if there are in fact .URL files in the subdirectory
00330           nEndPos = nNewEndPos;
00331           pMenu->InsertMenu(nPos, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)pSubMenu->m_hMenu, wfd.cFileName);
00332           pSubMenu->Detach();
00333           astrDirs.InsertAt(nPos, wfd.cFileName);
00334           ++nLastDir;
00335         }
00336         delete pSubMenu;
00337       }
00338     } while(FindNextFile(h, &wfd));
00339     FindClose(h);
00340   }
00341   return nEndPos;
00342 }
00343
00344 void CMainFrame::OnFavorite(UINT nID)
00345 {
00346   ((CMfcieView*)GetActiveView())->Navigate2(m_astrFavoriteURLs[nID-0xe00], 0, NULL);
00347 }
00348
00349 void CMainFrame::SetAddress(LPCTSTR lpszUrl)
00350 {
00351   // This is called when the browser has completely loaded the new location,
00352   // so make sure the text in the address bar is up to date and stop the
00353   // animation.
00354   m_wndAddress.SetWindowText(lpszUrl);
00355   m_wndAnimate.Stop();
00356   m_wndAnimate.Seek(0);
00357 }
00358
00359 void CMainFrame::StartAnimation()
00360 {
00361   // Start the animation.  This is called when the browser begins to
00362   // navigate to a new location
00363 #pragma warning(disable : 4245)
00364   m_wndAnimate.Play(0, -1, -1);
00365 #pragma warning(default : 4245)
00366 }
00367
00368 void CMainFrame::OnNewAddress()
00369 {
00370   // gets called when an item in the Address combo box is selected
00371   // just navigate to the newly selected location.
00372   CString str;
00373
00374   m_wndAddress.GetLBText(m_wndAddress.GetCurSel(), str);
00375   ((CMfcieView*)GetActiveView())->Navigate2(str, 0, NULL);
00376 }
00377
00378 void CMainFrame::OnNewAddressEnter()
00379 {
00380   // gets called when an item is entered manually into the edit box portion
00381   // of the Address combo box.
00382   // navigate to the newly selected location and also add this address to the
00383   // list of addresses in the combo box.
00384   CString str;
00385
00386   m_wndAddress.GetEditCtrl()->GetWindowText(str);
00387   ((CMfcieView*)GetActiveView())->Navigate2(str, 0, NULL);
00388
00389   COMBOBOXEXITEM item;
00390
00391   item.mask = CBEIF_TEXT;
00392   item.iItem = -1;
00393   item.pszText = (LPTSTR)(LPCTSTR)str;
00394   m_wndAddress.InsertItem(&item);
00395 }
00396
00397 void CMainFrame::DoNothing()
00398 {
00399   // this is here only so that the toolbar buttons for the dropdown menus
00400   // will have a callback, and thus will not be disabled.
00401 }
00402
00403 void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult)
00404 {
00405   // this function handles the dropdown menus from the toolbar
00406   NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct;
00407   CRect rect;
00408
00409   // translate the current toolbar item rectangle into screen coordinates
00410   // so that we'll know where to pop up the menu
00411   m_wndToolBar.GetToolBarCtrl().GetRect(pNMToolBar->iItem, &rect);
00412   rect.top = rect.bottom;
00413   ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft());
00414   if(pNMToolBar->iItem == ID_FONT_DROPDOWN)
00415   {
00416     CMenu menu;
00417     CMenu* pPopup;
00418
00419     // the font popup is stored in a resource
00420     menu.LoadMenu(IDR_FONT_POPUP);
00421     pPopup = menu.GetSubMenu(0);
00422     pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, rect.top + 1, AfxGetMainWnd());
00423   }
00424   else if(pNMToolBar->iItem == ID_FAVORITES_DROPDOWN)
00425   {
00426     CMenu* pPopup;
00427
00428     // for the favorties popup, just steal the menu from the main window
00429     pPopup = GetMenu()->GetSubMenu(3);
00430     pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, rect.top + 1, AfxGetMainWnd());
00431   }
00432   *pResult = TBDDRET_DEFAULT;
00433 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNotepadApp Member List

This is the complete list of members for CNotepadApp, including all inherited members.
CNotepadApp() | CNotepadApp |
InitInstance() | CNotepadApp | [virtual]
OnAppAbout() | CNotepadApp |
OnIdle(LONG lCount) | CNotepadApp | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/targetver.h Source File

  • vc2008fp
  • CustomPages

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
00012
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/buttondi.cpp Source File

  • ole
  • wordpad

buttondi.cpp

Go to the documentation of this file.
00001 // buttondi.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "resource.h"
00014 #include "buttondi.h"
00015 #include "strings.h"
00016 #include "wordpad.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 #ifndef DS_CONTEXTHELP
00024 #define DS_CONTEXTHELP 0x2000L
00025 #endif
00026
00027 static const int nFontSize = 10;
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CButtonDialog dialog
00031
00032 INT_PTR CButtonDialog::DisplayMessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption,
00033   LPCTSTR lpszButtons, WORD wStyle, int nDef, int nCancel,
00034   DWORD* pHelpIDs, CWnd* pParentWnd)
00035 {
00036   CButtonDialog dlg(lpszText, lpszCaption, lpszButtons, wStyle, pHelpIDs,
00037     pParentWnd);
00038   dlg.SetDefault(nDef);
00039   dlg.SetCancel(nCancel);
00040   return dlg.DoModal();
00041 }
00042
00043 CButtonDialog::CButtonDialog(LPCTSTR lpszText, LPCTSTR lpszCaption,
00044   LPCTSTR lpszButtons, WORD wStyle, DWORD* pHelpIDs ,
00045   CWnd* pParentWnd) : CCSDialog()
00046 {
00047
00048   ASSERT(lpszText != NULL);
00049   ASSERT(lpszCaption != NULL);
00050   if (HIWORD(lpszText) == NULL)
00051     VERIFY(m_strText.LoadString(LOWORD((DWORD)(DWORD_PTR)lpszText)));
00052   else
00053     m_strText = lpszText;
00054   if (HIWORD(lpszCaption) == NULL)
00055     VERIFY(m_strCaption.LoadString(LOWORD((DWORD)(DWORD_PTR)lpszCaption)));
00056   else
00057     m_strCaption = lpszCaption;
00058   if (lpszButtons != NULL)
00059     AddButtons(lpszButtons);
00060
00061   m_pParentWnd = pParentWnd;
00062   m_nDefButton = 0;
00063   m_nCancel = -1;
00064   m_pButtons = NULL;
00065   m_wStyle = wStyle;
00066   m_nBaseID = nFontSize; // don't use IDOK, IDCANCEL, etc
00067   m_hDlgTmp = NULL;
00068
00069   LOGFONT lf;
00070   memcpy_s(&lf, sizeof(LOGFONT), &theApp.m_lf, sizeof(LOGFONT));
00071   lf.lfHeight = -nFontSize;
00072   lf.lfWidth = 0;
00073   lf.lfWeight = FW_NORMAL;
00074   VERIFY(m_font.CreateFontIndirect(&lf));
00075
00076 //  m_font.CreateFont(-nFontSize, 0, 0, 0, FW_NORMAL, FALSE, FALSE,
00077 //      FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
00078 //      DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, szFontName);
00079   m_pHelpIDs = pHelpIDs;
00080 }
00081
00082 CButtonDialog::~CButtonDialog()
00083 {
00084   delete [] m_pButtons;
00085   if (m_hDlgTmp != NULL)
00086     GlobalFree(m_hDlgTmp);
00087 }
00088
00089 BEGIN_MESSAGE_MAP(CButtonDialog, CCSDialog)
00090   //{{AFX_MSG_MAP(CButtonDialog)
00091   ON_WM_CREATE()
00092   //}}AFX_MSG_MAP
00093 END_MESSAGE_MAP()
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CButtonDialog message handlers
00097
00098 int CButtonDialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
00099 {
00100   if (m_pHelpIDs != NULL)
00101   {
00102     for (int i=0;i<m_strArray.GetSize();i++)
00103       m_pHelpIDs[i*2] = i+m_nBaseID;
00104   }
00105   if (CCSDialog::OnCreate(lpCreateStruct) == -1)
00106     return -1;
00107
00108   SetWindowText(m_strCaption);
00109   m_pButtons = new CButton[m_strArray.GetSize()];
00110
00111   CRect rect(0, 0, 10, 10);
00112   if (!m_staticIcon.Create(NULL,
00113     SS_ICON | WS_GROUP | WS_CHILD | WS_VISIBLE, rect, this))
00114   {
00115     return -1;
00116   }
00117   m_staticIcon.SetIcon(::LoadIcon(NULL, GetIconID(m_wStyle)));
00118
00119   if (!m_staticText.Create(m_strText, SS_LEFT | SS_NOPREFIX | WS_GROUP |
00120     WS_CHILD | WS_VISIBLE, rect, this))
00121   {
00122     return -1;
00123   }
00124   m_staticText.SetFont(&m_font);
00125
00126   for (int i=0;i<m_strArray.GetSize();i++)
00127   {
00128     if (!m_pButtons[i].Create(m_strArray[i], WS_TABSTOP | WS_CHILD |
00129       WS_VISIBLE | ((i == 0) ? WS_GROUP : 0) |
00130       ((i == m_nDefButton) ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON),
00131       rect, this, i+m_nBaseID))
00132     {
00133       return -1;
00134     }
00135     m_pButtons[i].SetFont(&m_font);
00136   }
00137   PositionControls();
00138   return 0;
00139 }
00140
00141 BOOL CButtonDialog::OnInitDialog()
00142 {
00143   CCSDialog::OnInitDialog();
00144   if (m_pHelpIDs == NULL) // no context help
00145     ModifyStyleEx(WS_EX_CONTEXTHELP, 0); //remove
00146
00147   m_pButtons[m_nDefButton].SetFocus();
00148   return FALSE;  // return TRUE  unless you set the focus to a control
00149 }
00150
00151 /////////////////////////////////////////////////////////////////////////////
00152 // CButtonDialog operations
00153
00154 void CButtonDialog::AddButtons(LPCTSTR lpszButton)
00155 {
00156   CString str, strButtons;
00157   int i=0;
00158   if (HIWORD(lpszButton) == NULL)
00159     strButtons.LoadString(LOWORD((DWORD)(DWORD_PTR)lpszButton));
00160   else
00161     strButtons = lpszButton;
00162   while (AfxExtractSubString(str, strButtons, i++, '\n'))
00163     AddButton(str);
00164 }
00165
00166 #ifndef DS_3DLOOK
00167 #define DS_3DLOOK 0x4
00168 #endif
00169
00170 void CButtonDialog::FillInHeader(LPDLGTEMPLATE lpDlgTmp)
00171 {
00172   USES_CONVERSION;
00173   lpDlgTmp->style = DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE |
00174     WS_CAPTION | WS_SYSMENU;
00175   if (theApp.m_bWin4)
00176     lpDlgTmp->style |= DS_CONTEXTHELP;
00177   lpDlgTmp->dwExtendedStyle = 0;
00178   lpDlgTmp->cdit = 0;
00179   lpDlgTmp->x = 0;
00180   lpDlgTmp->y = 0;
00181   lpDlgTmp->cx = 100;
00182   lpDlgTmp->cy = 100;
00183
00184   LPWSTR lpStr = (LPWSTR)(lpDlgTmp + 1); /* Move ptr to the variable fields */
00185
00186   *lpStr++ = 0;  /* No Menu resource for Message Box */
00187   *lpStr++ = 0;  /* No Class name for MessageBox */
00188
00189   int nLen = m_strCaption.GetLength();
00190   wcscpy_s(lpStr, sizeof(DLGTEMPLATE), CT2CW(m_strCaption));
00191
00192   lpStr += nLen+1;
00193   WORD* pWord = (WORD*)lpStr;
00194   *pWord = 10; // 10 pt font
00195   pWord++;
00196   lpStr = (LPWSTR) pWord;
00197
00198   wcscpy_s(lpStr, sizeof(DLGTEMPLATE),CT2W(theApp.m_lf.lfFaceName));
00199 }
00200
00201 /////////////////////////////////////////////////////////////////////////////
00202 // CButtonDialog overridables
00203
00204 BOOL CButtonDialog::OnCommand(WPARAM wParam, LPARAM /*lParam*/)
00205 {
00206   if (wParam == IDCANCEL && m_nCancel != -1)
00207   {
00208     EndDialog(m_nCancel);
00209     return TRUE;
00210   }
00211   if (::GetDlgItem(m_hWnd, (int)wParam)==NULL)
00212     return FALSE;
00213   EndDialog((int)wParam-m_nBaseID);
00214   return TRUE;
00215 }
00216
00217 INT_PTR CButtonDialog::DoModal()
00218 {
00219   ASSERT(m_strArray.GetSize() != 0);
00220   if (m_strArray.GetSize() == 0)
00221     return (m_nCancel != -1) ? m_nCancel : 0;
00222
00223   // compute size of header
00224   // Fixed portions of DLG template header = sizeof(DLGTEMPLATE);
00225   // One null byte for menu name and one for class name = 2
00226   // Caption text plus NULL = m_strCaption.GetLength()+1
00227   int nSize = sizeof(DLGTEMPLATE);
00228   nSize += (2 + m_strCaption.GetLength()+1+lstrlen(theApp.m_lf.lfFaceName)+1)*2 +sizeof(WORD);
00229   m_hDlgTmp = GlobalAlloc(GPTR, nSize);
00230   if (m_hDlgTmp == NULL)
00231     return IDCANCEL;
00232   LPDLGTEMPLATE lpDlgTmp = (LPDLGTEMPLATE)GlobalLock(m_hDlgTmp);
00233   FillInHeader(lpDlgTmp);
00234   GlobalUnlock(m_hDlgTmp);
00235   InitModalIndirect(m_hDlgTmp);
00236
00237   return CCSDialog::DoModal();
00238 }
00239
00240 /////////////////////////////////////////////////////////////////////////////
00241 // CButtonDialog implementation
00242
00243 void CButtonDialog::PositionControls()
00244 {
00245   CSize sizeBase = GetBaseUnits();
00246   int nButtonHeight = (sizeBase.cy*14)/8;
00247   int nHeight = 0;
00248   int nSep,nLeftMargin,nRightMargin,nTopMargin,nBottomMargin;
00249   int nButtonAdj;
00250   int nWidth = 0;
00251   CRect rectText;
00252
00253   // a) 5/8 screen Width
00254   // b) Caption
00255   // c) nLeftMargin ICON nSep TEXT nRightMargin
00256   // d) nLeftMargin Button1 nSep Button2 ... nRightMargin
00257   // client width is max(b,d, min(c,a))
00258
00259   CSize sizeIcon(GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON));
00260   nSep = sizeIcon.cx/2;
00261   nLeftMargin = nSep;
00262   nRightMargin = nSep;
00263   nTopMargin = nSep;
00264   nBottomMargin = nSep;
00265
00266   CClientDC dc(this);
00267   CFont* pOldFont = dc.SelectObject(&m_font);
00268
00269   nButtonAdj = dc.GetTextExtent(_T("XXX"),3).cx; // padding on buttons
00270
00271   int nScreenWidth58 = dc.GetDeviceCaps(HORZRES)*5/8;
00272   int nCaptionWidth = dc.GetTextExtent(m_strCaption, m_strCaption.
00273     GetLength()).cx;
00274   CSize sizeText = dc.GetTextExtent(m_strText,m_strText.GetLength());
00275   int nTextIconWidth = nLeftMargin+sizeIcon.cx+nSep+sizeText.cx+nRightMargin;
00276   INT_PTR nButtons = m_strArray.GetSize();
00277   int nButtonsWidth = (int)(nLeftMargin+nRightMargin+(nButtons-1)*nSep);
00278   INT_PTR i;
00279   for (i=0;i<nButtons;i++)
00280   {
00281     nButtonsWidth +=
00282       dc.GetTextExtent(m_strArray[i],m_strArray[i].GetLength()).cx+
00283       nButtonAdj*2;
00284   }
00285
00286   nWidth = min(nTextIconWidth,nScreenWidth58);
00287   nWidth = max(nWidth, nCaptionWidth);
00288   nWidth = max(nWidth, nButtonsWidth);
00289
00290   m_staticIcon.SetWindowPos(NULL, nLeftMargin, nTopMargin, sizeIcon.cx,
00291     sizeIcon.cy, SWP_NOZORDER);
00292
00293   if (sizeText.cx > nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep)
00294   {
00295     sizeText.cx = nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep;
00296 //      int nTextWidth = nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep;
00297 //      rectText.SetRect(0, 0, nTextWidth, 32767);
00298     rectText.SetRect(0, 0, sizeText.cx, 32767);
00299     /* Ask DrawText for the right cy */
00300     sizeText.cy = dc.DrawText(m_strText, m_strText.GetLength(), &rectText,
00301       DT_CALCRECT | DT_WORDBREAK | DT_EXPANDTABS | DT_NOPREFIX);
00302   }
00303
00304   m_staticText.SetWindowPos(NULL, nSep+sizeIcon.cx+nSep, nTopMargin,
00305     sizeText.cx, sizeText.cy, SWP_NOZORDER);
00306
00307   sizeText.cy = max(sizeText.cy, sizeIcon.cy); // at least icon height
00308   nHeight = nTopMargin + sizeText.cy + nSep + nButtonHeight + nBottomMargin;
00309
00310   CRect rect;
00311   rect.left = (nWidth - (nButtonsWidth - nLeftMargin - nRightMargin))/2;
00312   rect.top = nTopMargin + sizeText.cy + nSep;
00313   rect.bottom = rect.top + nButtonHeight;
00314
00315   for (i=0;i<m_strArray.GetSize();i++)
00316   {
00317     rect.right = rect.left + dc.GetTextExtent(m_strArray[i],m_strArray[i].GetLength()).cx +
00318       2*nButtonAdj;
00319     m_pButtons[i].MoveWindow(&rect);
00320     rect.left = rect.right + nSep;
00321   }
00322
00323   rect.SetRect(0,0,nWidth,nHeight);
00324   CalcWindowRect(&rect);
00325   SetWindowPos(NULL, (dc.GetDeviceCaps(HORZRES)-rect.Width())/2,
00326     (dc.GetDeviceCaps(VERTRES)-rect.Height())/2, rect.Width(), rect.Height(),
00327     SWP_NOZORDER|SWP_NOACTIVATE);
00328   if(m_nCancel == -1) // no cancel button
00329   {
00330 //      CMenu* pMenu = GetSystemMenu(FALSE);
00331 //      if (pMenu != NULL)
00332 //          pMenu->DeleteMenu(SC_CLOSE, MF_BYCOMMAND);
00333   }
00334   dc.SelectObject(pOldFont);
00335 }
00336
00337 CSize CButtonDialog::GetBaseUnits()
00338 {
00339   CDisplayIC dc;
00340   CFont* pFont = dc.SelectObject(&m_font);
00341   TEXTMETRIC tm;
00342   VERIFY(dc.GetTextMetrics(&tm));
00343   dc.SelectObject(pFont);
00344   return CSize(tm.tmAveCharWidth, tm.tmHeight);
00345 }
00346
00347 LPCTSTR CButtonDialog::GetIconID(WORD wFlags)
00348 {
00349   LPCTSTR lpszIcon = NULL;
00350   wFlags &= MB_ICONMASK;
00351   if (wFlags == MB_ICONHAND)
00352     lpszIcon = IDI_HAND;
00353   else if (wFlags == MB_ICONQUESTION)
00354     lpszIcon = IDI_QUESTION;
00355   else if (wFlags == MB_ICONEXCLAMATION)
00356     lpszIcon = IDI_EXCLAMATION;
00357   else if (wFlags == MB_ICONASTERISK)
00358     lpszIcon = IDI_ASTERISK;
00359   return lpszIcon;
00360 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/padframe.cpp Source File

  • ole
  • superpad

padframe.cpp

Go to the documentation of this file.
00001 // padframe.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "superpad.h"
00014 #include "padframe.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CPadFrame
00023
00024 IMPLEMENT_DYNCREATE(CPadFrame, CMDIChildWnd)
00025
00026 int CPadFrame::m_nDefCmdShow = SW_SHOWMAXIMIZED;
00027 int CPadFrame::m_nDefCmdShowOld = SW_SHOWMAXIMIZED;
00028
00029 static TCHAR BASED_CODE szSec[] = _T("Settings");
00030 static TCHAR BASED_CODE szShowCmd[] = _T("ShowCmd");
00031
00032 void CPadFrame::ActivateFrame(int nCmdShow)
00033 {
00034   if (nCmdShow == -1)
00035     nCmdShow = m_nDefCmdShow;   // use our default
00036   CMDIChildWnd::ActivateFrame(nCmdShow);
00037 }
00038
00039 void CPadFrame::Initialize()
00040 {
00041   m_nDefCmdShow = AfxGetApp()->GetProfileInt(szSec, szShowCmd, m_nDefCmdShow);
00042   m_nDefCmdShowOld = m_nDefCmdShow;
00043 }
00044
00045 void CPadFrame::Terminate()
00046 {
00047   if (m_nDefCmdShow != m_nDefCmdShowOld)
00048   {
00049     AfxGetApp()->WriteProfileInt(szSec, szShowCmd, m_nDefCmdShow);
00050     m_nDefCmdShowOld = m_nDefCmdShow;
00051   }
00052 }
00053
00054 BEGIN_MESSAGE_MAP(CPadFrame, CMDIChildWnd)
00055   //{{AFX_MSG_MAP(CPadFrame)
00056   ON_WM_SIZE()
00057   //}}AFX_MSG_MAP
00058 END_MESSAGE_MAP()
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CPadFrame message handlers
00062
00063 void CPadFrame::OnSize(UINT nType, int cx, int cy)
00064 {
00065   CMDIChildWnd::OnSize(nType, cx, cy);
00066   if (!IsWindowVisible())
00067     return;
00068
00069   switch (nType)
00070   {
00071   case SIZE_MAXIMIZED:
00072     m_nDefCmdShow = SW_SHOWMAXIMIZED;
00073     break;
00074   case SIZE_RESTORED:
00075     m_nDefCmdShow = SW_SHOWNORMAL;
00076     break;
00077   }
00078 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoView.cpp Source File

  • vc2008fp
  • PaletteDemo

PaletteDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "PaletteDemo.h"
00013
00014 #include "PaletteDemoDoc.h"
00015 #include "PaletteDemoView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const CString strInfo =
00024   _T("This sample illustrates how to create a multi-column\r\n")
00025   _T("toolbar with an owner-draw information area.\r\n\r\n")
00026   _T("To change the number of columns, click the \"2\", \"3\" or \"4\" buttons.");
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CPaletteDemoView
00030
00031 IMPLEMENT_DYNCREATE(CPaletteDemoView, CView)
00032
00033 BEGIN_MESSAGE_MAP(CPaletteDemoView, CView)
00034   // Standard printing commands
00035   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00036   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00037   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CPaletteDemoView construction/destruction
00042
00043 CPaletteDemoView::CPaletteDemoView()
00044 {
00045   // TODO: add construction code here
00046
00047 }
00048
00049 CPaletteDemoView::~CPaletteDemoView()
00050 {
00051 }
00052
00053 BOOL CPaletteDemoView::PreCreateWindow(CREATESTRUCT& cs)
00054 {
00055   // TODO: Modify the Window class or styles here by modifying
00056   //  the CREATESTRUCT cs
00057
00058   return CView::PreCreateWindow(cs);
00059 }
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // CPaletteDemoView drawing
00063
00064 void CPaletteDemoView::OnDraw(CDC* pDC)
00065 {
00066 //  CPaletteDemoDoc* pDoc = GetDocument();
00067 //  ASSERT_VALID(pDoc);
00068
00069   const int iOffset = 20;
00070
00071   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00072   ASSERT (pFontOld != NULL);
00073
00074   CRect rectClient;
00075   GetClientRect (&rectClient);
00076
00077   CRect rectText = rectClient;
00078   rectText.DeflateRect (iOffset, iOffset);
00079   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00080
00081   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00082               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00083
00084   CRect rectFrame = rectText;
00085   rectFrame.InflateRect (iOffset, iOffset);
00086
00087   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00088
00089   rectFrame.DeflateRect (1, 1);
00090   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00091           ::GetSysColor (COLOR_3DLIGHT));
00092
00093   rectFrame.DeflateRect (2, 2);
00094   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00095           ::GetSysColor (COLOR_3DLIGHT));
00096
00097   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00098   pDC->SetBkMode (TRANSPARENT);
00099
00100   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00101
00102   pDC->SelectObject (pFontOld);
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CPaletteDemoView printing
00107
00108 void CPaletteDemoView::OnFilePrintPreview()
00109 {
00110   AFXPrintPreview (this);
00111 }
00112
00113 BOOL CPaletteDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00114 {
00115   // default preparation
00116   return DoPreparePrinting(pInfo);
00117 }
00118
00119 void CPaletteDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00120 {
00121   // TODO: add extra initialization before printing
00122 }
00123
00124 void CPaletteDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00125 {
00126   // TODO: add cleanup after printing
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CPaletteDemoView diagnostics
00131
00132 #ifdef _DEBUG
00133 void CPaletteDemoView::AssertValid() const
00134 {
00135   CView::AssertValid();
00136 }
00137
00138 void CPaletteDemoView::Dump(CDumpContext& dc) const
00139 {
00140   CView::Dump(dc);
00141 }
00142
00143 CPaletteDemoDoc* CPaletteDemoView::GetDocument() // non-debug version is inline
00144 {
00145   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPaletteDemoDoc)));
00146   return (CPaletteDemoDoc*)m_pDocument;
00147 }
00148 #endif //_DEBUG
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CPaletteDemoView message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneDoc.cpp Source File

  • vc2008fp
  • TasksPane

TasksPaneDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TasksPane.h"
00013
00014 #include "TasksPaneDoc.h"
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CTasksPaneDoc
00025
00026 IMPLEMENT_DYNCREATE(CTasksPaneDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CTasksPaneDoc, CDocument)
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CTasksPaneDoc construction/destruction
00033
00034 CTasksPaneDoc::CTasksPaneDoc()
00035 {
00036   // TODO: add one-time construction code here
00037
00038 }
00039
00040 CTasksPaneDoc::~CTasksPaneDoc()
00041 {
00042 }
00043
00044 BOOL CTasksPaneDoc::OnNewDocument()
00045 {
00046   if (!CDocument::OnNewDocument())
00047     return FALSE;
00048
00049   // TODO: add reinitialization code here
00050   // (SDI documents will reuse this document)
00051
00052   return TRUE;
00053 }
00054
00055 void CTasksPaneDoc::SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU)
00056 {
00057   CDocument::SetPathName(lpszPathName, bAddToMRU);
00058
00059   ((CMainFrame*) AfxGetMainWnd ())->UpdateMRUFilesList ();
00060 }
00061
00062
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CTasksPaneDoc serialization
00066
00067 void CTasksPaneDoc::Serialize(CArchive& ar)
00068 {
00069   if (ar.IsStoring())
00070   {
00071     // TODO: add storing code here
00072   }
00073   else
00074   {
00075     // TODO: add loading code here
00076   }
00077 }
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CTasksPaneDoc diagnostics
00081
00082 #ifdef _DEBUG
00083 void CTasksPaneDoc::AssertValid() const
00084 {
00085   CDocument::AssertValid();
00086 }
00087
00088 void CTasksPaneDoc::Dump(CDumpContext& dc) const
00089 {
00090   CDocument::Dump(dc);
00091 }
00092 #endif //_DEBUG
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // CTasksPaneDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRecalcThreadInfo Member List

This is the complete list of members for CRecalcThreadInfo, including all inherited members.
m_hEventKillRecalcThread | CRecalcThreadInfo
m_hEventRecalcDone | CRecalcThreadInfo
m_hEventRecalcThreadKilled | CRecalcThreadInfo
m_hEventStartRecalc | CRecalcThreadInfo
m_hwndNotifyProgress | CRecalcThreadInfo
m_hwndNotifyRecalcDone | CRecalcThreadInfo
m_nInt1 | CRecalcThreadInfo
m_nInt2 | CRecalcThreadInfo
m_nRecalcSpeedSeconds | CRecalcThreadInfo
m_nSum | CRecalcThreadInfo
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/NewAPDg.Cpp Source File

  • ole
  • TstCon

NewAPDg.Cpp

Go to the documentation of this file.
00001 // NewAmbientPropertyDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CNewAmbientPropertyDlg dialog
00022
00023
00024 CNewAmbientPropertyDlg::CNewAmbientPropertyDlg( CWnd* pParent ) :
00025    CDialog( CNewAmbientPropertyDlg::IDD, pParent )
00026 {
00027   //{{AFX_DATA_INIT(CNewAmbientPropertyDlg)
00028   m_dispid = 0;
00029   m_strName = _T("");
00030   //}}AFX_DATA_INIT
00031 }
00032
00033
00034 void CNewAmbientPropertyDlg::DoDataExchange( CDataExchange* pDX )
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   //{{AFX_DATA_MAP(CNewAmbientPropertyDlg)
00038   DDX_Control(pDX, IDC_PROPNAME_NEW, m_editName);
00039   DDX_Text(pDX, IDC_DISPID_NEW, m_dispid);
00040   DDX_Text(pDX, IDC_PROPNAME_NEW, m_strName);
00041   //}}AFX_DATA_MAP
00042 }
00043
00044
00045 BEGIN_MESSAGE_MAP(CNewAmbientPropertyDlg, CDialog)
00046   //{{AFX_MSG_MAP(CNewAmbientPropertyDlg)
00047   ON_WM_HELPINFO()
00048   ON_WM_CONTEXTMENU()
00049   //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CNewAmbientPropertyDlg message handlers
00054
00055 BOOL CNewAmbientPropertyDlg::OnInitDialog()
00056 {
00057   CDialog::OnInitDialog();
00058
00059    m_editName.SetFocus();
00060    m_editName.SetSel( 0, -1 );
00061
00062   return( FALSE );
00063 }
00064
00065
00066 static DWORD rgmapCHID[] =
00067 {
00068    IDC_PROPNAME_NEW, HIDC_PROPNAME_NEW,
00069    IDC_DISPID_NEW, HIDC_DISPID_NEW,
00070    0, 0
00071 };
00072
00073 BOOL CNewAmbientPropertyDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00074 {
00075   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00076   strPath += _T("::/popups.txt");
00077
00078   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00079 }
00080
00081 void CNewAmbientPropertyDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00082 {
00083   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00084   strPath += _T("::/popups.txt");
00085
00086   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00087 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCProps.cpp Source File

  • ole
  • TstCon
  • TCProps

TCProps.cpp

Go to the documentation of this file.
00001 // TCProps.cpp : Implementation of DLL Exports.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include <initguid.h>
00012 #include "TCProps.h"
00013
00014 #include "TCProps_i.c"
00015 #include "TCExtPg.H"
00016
00017 class CTCPropsModule : public CAtlDllModuleT< CTCPropsModule >
00018 {
00019 public :
00020   DECLARE_LIBID(LIBID_TCPropsLib)
00021 };
00022
00023 CTCPropsModule _AtlModule;
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // DLL Entry Point
00027 extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
00028 {
00029   hInstance;
00030     return _AtlModule.DllMain(dwReason, lpReserved);
00031 }
00032
00033
00034 // Used to determine whether the DLL can be unloaded by OLE
00035 STDAPI DllCanUnloadNow(void)
00036 {
00037     return _AtlModule.DllCanUnloadNow();
00038 }
00039
00040
00041 // Returns a class factory to create an object of the requested type
00042 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
00043 {
00044     return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
00045 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdivw.h Source File

  • advanced
  • mtgdi

mtgdivw.h

Go to the documentation of this file.
00001 // mtgdivw.h : interface of the CThreadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "threads.h"
00013
00014 class CThreadView : public CView
00015 {
00016 protected: // create from serialization only
00017   CThreadView();
00018   DECLARE_DYNCREATE(CThreadView)
00019
00020 // Attributes
00021 public:
00022   CClientDC *m_pDC;
00023   CTypedPtrList<CObList,CGDIThread*>     m_threadList;
00024   CThreadDoc* GetDocument();
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CThreadView)
00032   public:
00033   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 public:
00038   void StartThread(int ThreadID);
00039   void UpdateTitle(int nThreads = -1);
00040   virtual ~CThreadView();
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:
00047
00048 // Generated message map functions
00049 protected:
00050   //{{AFX_MSG(CThreadView)
00051   afx_msg void OnNewball();
00052   afx_msg void OnKillThreads();
00053   afx_msg void OnDestroy();
00054   afx_msg void OnNewline();
00055   afx_msg void OnNewrectangle();
00056   afx_msg void On10newballs();
00057   afx_msg void On10newlines();
00058   afx_msg void On10newrectangles();
00059   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00060   afx_msg void OnSize(UINT nType, int cx, int cy);
00061   afx_msg void On25newballs();
00062   afx_msg void On25newlines();
00063   afx_msg void On25newrectangles();
00064   afx_msg void OnThreadKillThreadsSlow();
00065   //}}AFX_MSG
00066   DECLARE_MESSAGE_MAP()
00067 };
00068
00069 #ifndef _DEBUG  // debug version in mtgdivw.cpp
00070 inline CThreadDoc* CThreadView::GetDocument()
00071    { return (CThreadDoc*)m_pDocument; }
00072 #endif
00073
00074 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/MainFrm.h Source File

  • vc2008fp
  • SetPaneSize

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "WorkspaceBar.h"
00014
00015 #define CFrameWnd CFrameWndEx
00016
00017 class CMainFrame : public CFrameWnd
00018 {
00019
00020 protected: // create from serialization only
00021   CMainFrame();
00022   DECLARE_DYNCREATE(CMainFrame)
00023
00024 // Attributes
00025 public:
00026
00027 // Operations
00028 public:
00029   void SetDlgBarSizeInContainer (UINT nSize);
00030   void SetContainerSize (UINT nSize);
00031   void SetDlgBarHeightInPixels (UINT nHeight);
00032   void SetDlgBarWidthInPixels (UINT nWidth);
00033 // Overrides
00034   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00035
00036 // Implementation
00037 public:
00038   virtual ~CMainFrame();
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043
00044 protected:  // control bar embedded members
00045   CMFCMenuBar   m_wndMenuBar;
00046   CMFCStatusBar   m_wndStatusBar;
00047   CMFCToolBar   m_wndToolBar;
00048   CWorkspaceBar   m_wndWorkSpace;
00049   CPaneDialog   m_wndDlgBar;
00050
00051 protected:
00052   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00053   afx_msg void OnViewCustomize();
00054   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00055   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00056   afx_msg void OnViewWorkspace();
00057   afx_msg void OnUpdateViewWorkspace(CCmdUI* pCmdUI);
00058   afx_msg void OnViewDialogBar();
00059   afx_msg void OnUpdateViewDialogBar(CCmdUI* pCmdUI);
00060
00061   DECLARE_MESSAGE_MAP()
00062
00063   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00064
00065 private:
00066   BOOL FindInternalDivider (CDockablePane* pBar,
00067                CPaneContainer*& pContainer,
00068                CPaneDivider*& pDivider, BOOL& bLeftSlider,
00069                BOOL& bAloneInContainer);
00070 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenuDoc.cpp Source File

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenuDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "OwnerDrawMenu.h"
00013
00014 #include "OwnerDrawMenuDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // COwnerDrawMenuDoc
00024
00025 IMPLEMENT_DYNCREATE(COwnerDrawMenuDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(COwnerDrawMenuDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // COwnerDrawMenuDoc construction/destruction
00032
00033 COwnerDrawMenuDoc::COwnerDrawMenuDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 COwnerDrawMenuDoc::~COwnerDrawMenuDoc()
00040 {
00041 }
00042
00043 BOOL COwnerDrawMenuDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // COwnerDrawMenuDoc serialization
00058
00059 void COwnerDrawMenuDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // COwnerDrawMenuDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void COwnerDrawMenuDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void COwnerDrawMenuDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // COwnerDrawMenuDoc commands
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/mainfrm.h Source File

  • general
  • diblook

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXEXT_H__
00013 #include <afxext.h>         // for access to CToolBar and CStatusBar
00014 #endif
00015
00016 class CMainFrame : public CMDIFrameWnd
00017 {
00018   DECLARE_DYNAMIC(CMainFrame)
00019 public:
00020   CMainFrame();
00021
00022 // Implementation
00023 public:
00024   virtual ~CMainFrame();
00025
00026 protected:  // control bar embedded members
00027   CStatusBar  m_wndStatusBar;
00028   CToolBar    m_wndToolBar;
00029
00030 // Generated message map functions
00031 protected:
00032   //{{AFX_MSG(CMainFrame)
00033   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00034   afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00035   afx_msg BOOL OnQueryNewPalette();
00036   //}}AFX_MSG
00037   DECLARE_MESSAGE_MAP()
00038 };
00039
00040 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/stdafx.h Source File

  • advanced
  • DllScreenCap
  • ScreenCap

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #pragma once
00013
00014 #ifndef VC_EXTRALEAN
00015 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00016 #endif
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 #include <afxwin.h>         // MFC core and standard components
00021 #include <afxext.h>         // MFC extensions
00022
00023 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00024 #ifndef _AFX_NO_AFXCMN_SUPPORT
00025 #include <afxcmn.h>     // MFC support for Windows Common Controls
00026 #endif // _AFX_NO_AFXCMN_SUPPORT
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spindial.h Source File

  • controls
  • spindial

spindial.h

Go to the documentation of this file.
00001 // spindial.h : main header file for SPINDIAL.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #if !defined( __AFXCTL_H__ )
00014   #error include 'afxctl.h' before including this file
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CSpindialApp : See spindial.cpp for implementation.
00021
00022 class CSpindialApp : public COleControlModule
00023 {
00024 public:
00025   BOOL InitInstance();
00026   int ExitInstance();
00027 };
00028
00029 extern const GUID CDECL _tlid;
00030 extern const WORD _wVerMajor;
00031 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/autoddlg.h Source File

  • ole
  • acdual
  • acdualdriv

autoddlg.h

Go to the documentation of this file.
00001 // autoddlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CAutoDrivDlg dialog
00014
00015 class CAutoDrivDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CAutoDrivDlg(CWnd* pParent = NULL); // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CAutoDrivDlg)
00023   enum { IDD = IDD_AUTODRIV_DIALOG };
00024   CString m_szText;
00025   int     m_x;
00026   int     m_y;
00027   BOOL    m_bUseDispatch;
00028   //}}AFX_DATA
00029
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CAutoDrivDlg)
00032   protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 protected:
00038   HICON m_hIcon;
00039   CAutoClik m_autoClikObject;
00040   IDualAClick* m_pDualAutoClikObject;
00041
00042   // Generated message map functions
00043   //{{AFX_MSG(CAutoDrivDlg)
00044   virtual BOOL OnInitDialog();
00045   afx_msg void OnPaint();
00046   afx_msg HCURSOR OnQueryDragIcon();
00047   afx_msg void OnClose();
00048   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00049   afx_msg void OnAnimateXY();
00050   afx_msg void OnAnimatePos();
00051   afx_msg void OnSetAll();
00052   afx_msg void OnSetPosition();
00053   afx_msg void OnSetText();
00054   afx_msg void OnSetX();
00055   afx_msg void OnSetY();
00056   afx_msg void OnRefresh();
00057   afx_msg void OnGetAll();
00058   afx_msg void OnGetPosition();
00059   afx_msg void OnUseDispatch();
00060   //}}AFX_MSG
00061   DECLARE_MESSAGE_MAP()
00062 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollection.cpp Source File

  • vc2008fp
  • StateCollection

StateCollection.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StateCollection.h"
00013
00014 #include "MainFrm.h"
00015 #include "StateCollectionDoc.h"
00016 #include "StateCollectionView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CStateCollectionApp
00026
00027 BEGIN_MESSAGE_MAP(CStateCollectionApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CStateCollectionApp construction
00038
00039 CStateCollectionApp::CStateCollectionApp()
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CStateCollectionApp object
00047
00048 CStateCollectionApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CStateCollectionApp initialization
00052
00053 BOOL CStateCollectionApp::InitInstance()
00054 {
00055   // Initialize OLE libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   AfxEnableControlContainer();
00063
00064   // Standard initialization
00065   // If you are not using these features and wish to reduce the size
00066   //  of your final executable, you should remove from the following
00067   //  the specific initialization routines you do not need.
00068
00069   // Change the registry key under which our settings are stored.
00070   // TODO: You should modify this string to be something appropriate
00071   // such as the name of your company or organization.
00072   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   SetRegistryBase (_T("Settings"));
00077
00078   // Initialize all Managers for usage. They are automatically constructed
00079   // if not yet present
00080   InitMouseManager();
00081   InitContextMenuManager();
00082   InitKeyboardManager();
00083
00084   // Enable user-defined tools. If you want allow more than 10 tools,
00085   // add tools entry to resources (ID_USER_TOOL11, ID_USER_TOOL12,...)
00086   EnableUserTools (ID_TOOLS_ENTRY, ID_USER_TOOL1, ID_USER_TOOL10);
00087
00088   // Register the application's document templates.  Document templates
00089   //  serve as the connection between documents, frame windows and views.
00090
00091   CSingleDocTemplate* pDocTemplate;
00092   pDocTemplate = new CSingleDocTemplate(
00093     IDR_MAINFRAME,
00094     RUNTIME_CLASS(CStateCollectionDoc),
00095     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00096     RUNTIME_CLASS(CStateCollectionView));
00097   AddDocTemplate(pDocTemplate);
00098
00099   // Parse command line for standard shell commands, DDE, file open
00100   CCommandLineInfo cmdInfo;
00101   ParseCommandLine(cmdInfo);
00102
00103   // Dispatch commands specified on the command line
00104   if (!ProcessShellCommand(cmdInfo))
00105     return FALSE;
00106
00107   LoadCustomState ();
00108
00109   // The one and only window has been initialized, so show and update it.
00110   m_pMainWnd->ShowWindow(SW_SHOW);
00111   m_pMainWnd->UpdateWindow();
00112
00113   return TRUE;
00114 }
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // CStateCollectionApp message handlers
00118
00119 int CStateCollectionApp::ExitInstance()
00120 {
00121   return CWinAppEx::ExitInstance();
00122 }
00123
00124 void CStateCollectionApp::PreLoadState ()
00125 {
00126
00127   GetMouseManager()->AddView (IDR_MAINFRAME, _T("My view"), IDR_MAINFRAME);
00128
00129   // TODO: add another views and windows were mouse double click
00130   // customization is required
00131
00132   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00133
00134   // TODO: add another context menus here
00135 }
00136
00137
00138 /////////////////////////////////////////////////////////////////////////////
00139 // CAboutDlg dialog used for App About
00140
00141 class CAboutDlg : public CDialog
00142 {
00143 public:
00144   CAboutDlg();
00145
00146 // Dialog Data
00147   //{{AFX_DATA(CAboutDlg)
00148   enum { IDD = IDD_ABOUTBOX };
00149   //}}AFX_DATA
00150
00151   // ClassWizard generated virtual function overrides
00152   //{{AFX_VIRTUAL(CAboutDlg)
00153   protected:
00154   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00155   //}}AFX_VIRTUAL
00156
00157 // Implementation
00158 protected:
00159   //{{AFX_MSG(CAboutDlg)
00160     // No message handlers
00161   //}}AFX_MSG
00162   DECLARE_MESSAGE_MAP()
00163 };
00164
00165 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00166 {
00167   //{{AFX_DATA_INIT(CAboutDlg)
00168   //}}AFX_DATA_INIT
00169 }
00170
00171 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00172 {
00173   CDialog::DoDataExchange(pDX);
00174   //{{AFX_DATA_MAP(CAboutDlg)
00175   //}}AFX_DATA_MAP
00176 }
00177
00178 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00179   //{{AFX_MSG_MAP(CAboutDlg)
00180     // No message handlers
00181   //}}AFX_MSG_MAP
00182 END_MESSAGE_MAP()
00183
00184 // App command to run the dialog
00185 void CStateCollectionApp::OnAppAbout()
00186 {
00187   CAboutDlg aboutDlg;
00188   aboutDlg.DoModal();
00189 }
00190
00191 /////////////////////////////////////////////////////////////////////////////
00192 // CStateCollectionApp message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/Scheduler.cpp Source File

  • internet
  • Scheduler

Scheduler.cpp

Go to the documentation of this file.
00001 // Scheduler.cpp : Defines the class behaviors for the application.
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Scheduler.h"
00013 #include "SchedulerDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSchedulerApp
00023
00024 BEGIN_MESSAGE_MAP(CSchedulerApp, CWinApp)
00025   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00026 END_MESSAGE_MAP()
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CSchedulerApp construction
00030
00031 CSchedulerApp::CSchedulerApp()
00032 {
00033   EnableHtmlHelp();
00034   // TODO: add construction code here,
00035   // Place all significant initialization in InitInstance
00036 }
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // The one and only CSchedulerApp object
00040
00041 CSchedulerApp theApp;
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CSchedulerApp initialization
00045
00046 BOOL CSchedulerApp::InitInstance()
00047 {
00048   AfxEnableControlContainer();
00049
00050
00051   CSchedulerDlg dlg;
00052   m_pMainWnd = &dlg;
00053
00054   int nResponse = (int)dlg.DoModal();
00055   if (nResponse == IDOK)
00056   {
00057     // TODO: Place code here to handle when the dialog is
00058     //  dismissed with OK
00059   }
00060   else if (nResponse == IDCANCEL)
00061   {
00062     // TODO: Place code here to handle when the dialog is
00063     //  dismissed with Cancel
00064   }
00065
00066   // Since the dialog has been closed, return FALSE so that we exit the
00067   //  application, rather than start the application's message pump.
00068   dlg.ExitScheduler();
00069   return FALSE;
00070 }
00071
00072 template <> void AFXAPI SerializeElements <CMyScheduler> ( CArchive& ar, CMyScheduler* pSchedule, INT_PTR nCount )
00073 {
00074     for ( int i = 0; i < nCount; i++, pSchedule++ )
00075     {
00076         // Serialize each CMyScheduler object
00077         pSchedule->Serialize( ar );
00078     }
00079 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/UndoBar.h Source File

  • vc2008fp
  • VisualStudioDemo

UndoBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "UndoListBox.h"
00013
00014 class CUndoButton;
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CUndoBar window
00018
00019 class CUndoBar : public CMFCPopupMenuBar
00020 {
00021   DECLARE_SERIAL(CUndoBar)
00022
00023 // Construction
00024 public:
00025   CUndoBar();
00026
00027 // Attributes
00028 protected:
00029   CUndoListBox m_wndList;
00030   CRect m_rectLabel;
00031   int m_nLabelHeight;
00032   CString m_strLabel;
00033
00034 // Operations
00035 public:
00036   void DoUndo();
00037   void SetLabel(const CString& strLabel);
00038
00039 // Overrides
00040   virtual void OnFillBackground(CDC* pDC);
00041   virtual CSize CalcSize(BOOL bVertDock);
00042
00043 // Implementation
00044 public:
00045   virtual ~CUndoBar();
00046
00047 protected:
00048   afx_msg void OnSize(UINT nType, int cx, int cy);
00049   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00050
00051   DECLARE_MESSAGE_MAP()
00052
00053   CUndoButton* GetParentButton() const;
00054 };
00055
00056 //////////////////////////////////////////////////////////////////////////////
00057 // CUndoMenu
00058
00059 class CUndoMenu : public CMFCPopupMenu
00060 {
00061   DECLARE_SERIAL(CUndoMenu)
00062
00063   virtual CMFCPopupMenuBar* GetMenuBar()
00064   {
00065     return &m_wndUndoBar;
00066   }
00067
00068   CUndoBar m_wndUndoBar;
00069
00070 protected:
00071   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00072
00073   DECLARE_MESSAGE_MAP()
00074 };
00075
00076 //////////////////////////////////////////////////////////////////////////////
00077 // CUndoButton
00078
00079 class CUndoButton : public CMFCToolBarMenuButton
00080 {
00081   friend class CUndoBar;
00082
00083   DECLARE_SERIAL(CUndoButton)
00084
00085 public:
00086   CUndoButton()
00087   {
00088   }
00089
00090   CUndoButton(UINT uiCmdID, LPCTSTR lpszText) : CMFCToolBarMenuButton(uiCmdID, NULL, GetCmdMgr()->GetCmdImage(uiCmdID, FALSE), lpszText)
00091   {
00092     m_nSelNum = 0;
00093   }
00094
00095   CStringList m_lstActions;
00096   int m_nSelNum;
00097
00098   int GetSelNum()
00099   {
00100     return m_nSelNum;
00101   }
00102
00103   void ResetSelNum()
00104   {
00105     m_nSelNum = 0;
00106   }
00107
00108 protected:
00109   virtual CMFCPopupMenu* CreatePopupMenu();
00110
00111   virtual BOOL IsEmptyMenuAllowed() const
00112   {
00113     return TRUE;
00114   }
00115
00116   virtual void OnChangeParentWnd(CWnd* pWndParent)
00117   {
00118     CMFCToolBarMenuButton::OnChangeParentWnd(pWndParent);
00119     m_bDrawDownArrow = TRUE;
00120   }
00121
00122   virtual BOOL IsExclusive() const
00123   {
00124     return TRUE;
00125   }
00126 };
00127
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/SplitButtonCtrlPage.cpp Source File

  • controls
  • cmnctrl

SplitButtonCtrlPage.cpp

Go to the documentation of this file.
00001 // SplitButtonCtrlPage.cpp : implementation file
00002 //
00003
00004 #include "stdafx.h"
00005
00006 #include "CmnCtrl3.h"
00007 #include "SplitButtonCtrlPage.h"
00008
00009 static const struct
00010 {
00011   UINT    nStyle;
00012   LPCTSTR lpszDisplay;
00013 } styles[] =
00014 {
00015   {BCSS_NOSPLIT,    _T("BCSS_NOSPLIT")},
00016   {BCSS_STRETCH,    _T("BCSS_STRETCH")},
00017   {BCSS_ALIGNLEFT,  _T("BCSS_ALIGNLEFT")},
00018   {BCSS_IMAGE,    _T("BCSS_IMAGE")},
00019 };
00020
00021 // CSplitButton dialog
00022
00023 IMPLEMENT_DYNAMIC(CSplitButtonCtrlPage, CPropertyPage)
00024
00025 CSplitButtonCtrlPage::CSplitButtonCtrlPage()
00026   : CPropertyPage(CSplitButtonCtrlPage::IDD)
00027 {
00028 }
00029
00030 CSplitButtonCtrlPage::~CSplitButtonCtrlPage()
00031 {
00032 }
00033
00034 void CSplitButtonCtrlPage::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CPropertyPage::DoDataExchange(pDX);
00037   DDX_Control(pDX, IDC_SPLIT_BUTTON, m_splitButton);
00038   DDX_Text(pDX, IDC_X_SIZE, m_xSize);
00039   DDX_Text(pDX, IDC_Y_SIZE, m_ySize);
00040   DDX_Control(pDX, IDC_LIST_STYLE, m_listSplitStyle);
00041   DDX_Control(pDX, IDC_CHECK_STATE, m_checkState);
00042 }
00043
00044 BOOL CSplitButtonCtrlPage::OnInitDialog()
00045 {
00046   CPropertyPage::OnInitDialog();
00047
00048   // Init UI
00049   m_image.Create(IDB_BITMAP1, 16, 1, RGB(255, 255, 255));
00050   OnBnClickedSetMenu1();
00051
00052   SIZE size;
00053   BOOL ret = m_splitButton.GetSplitSize(&size);
00054   m_xSize = size.cx;
00055   m_ySize = size.cy;
00056   UpdateData(FALSE);
00057
00058   // Fill in all the Split Button styles
00059   for (int i = 0; i < _countof(styles); i++)
00060     m_listSplitStyle.AddString(styles[i].lpszDisplay);
00061
00062   m_splitButton.SetSplitStyle(styles[1].nStyle);  // BCSS_STRETCH
00063   m_listSplitStyle.SetSel(1);
00064
00065   return TRUE;
00066 }
00067
00068 BEGIN_MESSAGE_MAP(CSplitButtonCtrlPage, CPropertyPage)
00069   ON_BN_CLICKED(IDC_SET_MENU1, &CSplitButtonCtrlPage::OnBnClickedSetMenu1)
00070   ON_BN_CLICKED(IDC_SET_MENU2, &CSplitButtonCtrlPage::OnBnClickedSetMenu2)
00071   ON_BN_CLICKED(IDC_SET_SIZE, &CSplitButtonCtrlPage::OnBnClickedSetSize)
00072   ON_LBN_SELCHANGE(IDC_LIST_STYLE, &CSplitButtonCtrlPage::OnLbnSelchangeListStyle)
00073   ON_BN_CLICKED(IDC_SPLIT_BUTTON, &CSplitButtonCtrlPage::OnBnClickedSplitButton)
00074   ON_BN_CLICKED(IDC_CHECK_STATE, &CSplitButtonCtrlPage::OnBnClickedCheckState)
00075 END_MESSAGE_MAP()
00076
00077 // CSplitButton message handlers
00078
00079 void CSplitButtonCtrlPage::OnBnClickedSetMenu1()
00080 {
00081   m_splitButton.SetDropDownMenu(IDR_SPLIT_DROPDOWN_MENU, 0);
00082   m_splitButton.SetWindowText(_T("using MENU 1"));
00083 }
00084
00085 void CSplitButtonCtrlPage::OnBnClickedSetMenu2()
00086 {
00087   m_splitButton.SetDropDownMenu(IDR_SPLIT_DROPDOWN_MENU, 1);
00088   m_splitButton.SetWindowText(_T("using MENU 2"));
00089 }
00090
00091 void CSplitButtonCtrlPage::OnBnClickedSetSize()
00092 {
00093   UpdateData(TRUE);
00094
00095   SIZE size;
00096   size.cx = m_xSize;
00097   size.cy = m_ySize;
00098   m_splitButton.SetSplitSize(&size);
00099   m_splitButton.RedrawWindow();
00100
00101   m_splitButton.GetSplitSize(&size);
00102   m_xSize = size.cx;
00103   m_ySize = size.cy;
00104
00105   UpdateData(FALSE);
00106 }
00107
00108 void CSplitButtonCtrlPage::OnLbnSelchangeListStyle()
00109 {
00110   // Get selected styles
00111   int nCount = m_listSplitStyle.GetSelCount();
00112   int *selectedItems = new int[nCount];
00113   m_listSplitStyle.GetSelItems(nCount, selectedItems);
00114
00115   UINT nStyle = 0;
00116   for (int i = 0; i < nCount; i++)
00117     nStyle |= styles[selectedItems[i]].nStyle;
00118
00119   delete[] selectedItems;
00120
00121   // Some UI adjustments
00122   if (nStyle & BCSS_NOSPLIT)
00123     m_splitButton.SetSplitImageList(NULL);
00124   else if (nStyle & BCSS_IMAGE)
00125     m_splitButton.SetSplitImageList(&m_image);
00126   else
00127     m_splitButton.SetSplitGlyph('6');     // The default glyph
00128
00129   m_splitButton.SetSplitStyle(nStyle);
00130   m_splitButton.RedrawWindow();
00131
00132   // The split size could be reset
00133   SIZE size;
00134   m_splitButton.GetSplitSize(&size);
00135   m_xSize = size.cx;
00136   m_ySize = size.cy;
00137   UpdateData(FALSE);
00138 }
00139
00140 void CSplitButtonCtrlPage::OnBnClickedSplitButton()
00141 {
00142   CString text;
00143   m_splitButton.GetWindowText(text);
00144   ::MessageBox(m_hWnd, CString(_T("You are ")) + text, _T("Thank you"), 0);
00145 }
00146
00147 void CSplitButtonCtrlPage::OnBnClickedCheckState()
00148 {
00149   m_splitButton.SetDropDownState(m_checkState.GetCheck() == BST_CHECKED);
00150 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/strings.cpp Source File

  • vc2008fp
  • WordPad

strings.cpp

Go to the documentation of this file.
00001 //
00002 // strings.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "strings.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 const TCHAR szWordPadClass[] = _T("WordPadClass");
00023 const TCHAR szLayout1[] = _T("Layout2");
00024 const TCHAR szLayout2[] = _T("LayoutAux2");
00025 const TCHAR szRegKey[] = _T("Microsoft\\MFC\\Samples");
00026
00027 const TCHAR szTextSection[] = _T("Text");
00028 const TCHAR szRTFSection[] = _T("RTF");
00029 const TCHAR szWordSection[] = _T("Word6");
00030 const TCHAR szWriteSection[] =_T("Write");
00031 const TCHAR szIPSection[] = _T("IP");
00032 const TCHAR szWrap[] = _T("Wrap");
00033 const TCHAR szPageMargin[] = _T("PageMargin");
00034
00035 const TCHAR szSection[] = _T("Options");
00036 const TCHAR szWordSel[] = _T("WordSel");
00037 const TCHAR szUnits[] = _T("Units");
00038 const TCHAR szFrameRect[] = _T("FrameRect");
00039 const TCHAR szMaximized[] = _T("Maximized");
00040
00041 const TCHAR szSumInfo[] = _T("\005SummaryInformation");
00042
00043 const char szWordConverter[] = "MSWD6_32.WPC";
00044 const char szWriteConverter[] = "WRITE32.WPC";
00045
00046 const TCHAR szContents[] = _T("Contents");
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/MainFrm.h Source File

  • vc2008fp
  • MenuSubSet

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CMDIFrameWnd CMDIFrameWndEx
00014
00015 // -EXAMPLE-
00016
00017 class CMyMenuBar : public CMFCMenuBar
00018 {
00019   virtual void CreateFromMenu (HMENU hMenu, BOOL bDefaultMenu = FALSE,
00020             BOOL bForceUpdate = FALSE);
00021 };
00022
00023 // ---
00024
00025 class CMainFrame : public CMDIFrameWnd
00026 {
00027   DECLARE_DYNAMIC(CMainFrame)
00028 public:
00029   CMainFrame();
00030
00031 // Attributes
00032 public:
00033
00034 // Operations
00035 public:
00036
00037 // Overrides
00038   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00039
00040   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00041
00042 // Implementation
00043 public:
00044   virtual ~CMainFrame();
00045 #ifdef _DEBUG
00046   virtual void AssertValid() const;
00047   virtual void Dump(CDumpContext& dc) const;
00048 #endif
00049
00050 protected:  // control bar embedded members
00051   CMyMenuBar    m_wndMenuBar;
00052   CMFCStatusBar m_wndStatusBar;
00053   CMFCToolBar m_wndToolBar;
00054
00055 protected:
00056   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00057   afx_msg void OnViewCustomize();
00058   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00059   afx_msg void OnWindowManager();
00060   afx_msg void OnAppLook(UINT id);
00061   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00062
00063   DECLARE_MESSAGE_MAP()
00064
00065   virtual CMDIChildWndEx* CreateDocumentWindow (LPCTSTR lpcszDocName, CObject* /*pObj*/);
00066
00067   UINT  m_nAppLook;
00068 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHuskApp Member List

This is the complete list of members for CHuskApp, including all inherited members.
CHuskApp() | CHuskApp |
CreateListOutput() | CHuskApp |
InitInstance() | CHuskApp | [virtual]
m_pListOut | CHuskApp |
OnAppAbout() | CHuskApp |
OnDumpClasses() | CHuskApp |
OnDumpDLLs() | CHuskApp |
OnDumpDocTemplates() | CHuskApp |
OnDumpObjects() | CHuskApp |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/propdlg.cpp Source File

  • general
  • propdlg

propdlg.cpp

Go to the documentation of this file.
00001 // propdlg.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014
00015 #include "shapeobj.h"
00016 #include "colorpge.h"
00017 #include "stylepge.h"
00018 #include "preview.h"
00019 #include "propsht.h"
00020 #include "propsht2.h"
00021 #include "minifrm.h"
00022 #include "mainfrm.h"
00023 #include "shapedoc.h"
00024 #include "shapesvw.h"
00025
00026 #ifdef _DEBUG
00027 #undef THIS_FILE
00028 static char BASED_CODE THIS_FILE[] = __FILE__;
00029 #endif
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CPropDlgApp
00033
00034 BEGIN_MESSAGE_MAP(CPropDlgApp, CWinApp)
00035   //{{AFX_MSG_MAP(CPropDlgApp)
00036   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00037   //}}AFX_MSG_MAP
00038   // Standard file based document commands
00039   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00040   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00041   // Standard print setup command
00042   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CPropDlgApp construction
00047
00048 CPropDlgApp::CPropDlgApp()
00049 {
00050 }
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // The one and only CPropDlgApp object
00054
00055 CPropDlgApp theApp;
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CPropDlgApp initialization
00059
00060 BOOL CPropDlgApp::InitInstance()
00061 {
00062   // It is very important to have consistent gray dialogs in this
00063   //  application.  If CTL3D32.DLL cannot be loaded, then non-3d
00064   //  gray dialogs are used instead.
00065
00066   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00067
00068   // Register document templates
00069
00070   CMultiDocTemplate* pDocTemplate;
00071   pDocTemplate = new CMultiDocTemplate(
00072     IDR_SHAPESTYPE,
00073     RUNTIME_CLASS(CShapesDoc),
00074     RUNTIME_CLASS(CMDIChildWnd),          // standard MDI child frame
00075     RUNTIME_CLASS(CShapesView));
00076   AddDocTemplate(pDocTemplate);
00077
00078   // create main MDI Frame window
00079   CMainFrame* pMainFrame = new CMainFrame;
00080   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00081   {
00082     // free the memory
00083     delete pMainFrame;
00084     return FALSE;
00085   }
00086   m_pMainWnd = pMainFrame;
00087
00088   // enable file manager drag/drop and DDE Execute open
00089   EnableShellOpen();
00090   RegisterShellFileTypes(TRUE);
00091
00092   // Parse command line for standard shell commands, DDE, file open
00093   CCommandLineInfo cmdInfo;
00094   ParseCommandLine(cmdInfo);
00095
00096   // Dispatch commands specified on the command line
00097   if (!ProcessShellCommand(cmdInfo))
00098     return FALSE;
00099
00100   m_pMainWnd->DragAcceptFiles();
00101   pMainFrame->ShowWindow(m_nCmdShow);
00102   pMainFrame->UpdateWindow();
00103
00104   return TRUE;
00105 }
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // CAboutDlg dialog used for App About
00109
00110 class CAboutDlg : public CDialog
00111 {
00112 public:
00113   CAboutDlg();
00114
00115 // Dialog Data
00116   //{{AFX_DATA(CAboutDlg)
00117   enum { IDD = IDD_ABOUTBOX };
00118   //}}AFX_DATA
00119
00120 // Implementation
00121 protected:
00122   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00123   //{{AFX_MSG(CAboutDlg)
00124     // No message handlers
00125   //}}AFX_MSG
00126   DECLARE_MESSAGE_MAP()
00127 };
00128
00129 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00130 {
00131   //{{AFX_DATA_INIT(CAboutDlg)
00132   //}}AFX_DATA_INIT
00133 }
00134
00135 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00136 {
00137   CDialog::DoDataExchange(pDX);
00138   //{{AFX_DATA_MAP(CAboutDlg)
00139   //}}AFX_DATA_MAP
00140 }
00141
00142 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00143   //{{AFX_MSG_MAP(CAboutDlg)
00144     // No message handlers
00145   //}}AFX_MSG_MAP
00146 END_MESSAGE_MAP()
00147
00148 // App command to run the dialog
00149 void CPropDlgApp::OnAppAbout()
00150 {
00151   CAboutDlg aboutDlg;
00152   aboutDlg.DoModal();
00153 }
00154
00155 /////////////////////////////////////////////////////////////////////////////
00156 // CPropDlgApp commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/filenewd.h Source File

  • ole
  • wordpad

filenewd.h

Go to the documentation of this file.
00001 // filenewd.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CFileNewDialog dialog
00014
00015 class CFileNewDialog : public CCSDialog
00016 {
00017 // Construction
00018 public:
00019   CFileNewDialog(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CFileNewDialog)
00023   enum { IDD = IDD_FILENEWDIALOG };
00024   CListBox    m_listbox;
00025   int     m_nSel;
00026   //}}AFX_DATA
00027
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CFileNewDialog)
00032   protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 protected:
00038   static const DWORD m_nHelpIDs[];
00039   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00040
00041   // Generated message map functions
00042   //{{AFX_MSG(CFileNewDialog)
00043   virtual BOOL OnInitDialog();
00044   afx_msg void OnDblclkDatedialogList();
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCtrlbarsApp Member List

This is the complete list of members for CCtrlbarsApp, including all inherited members.
CCtrlbarsApp() | CCtrlbarsApp |
InitInstance() | CCtrlbarsApp | [virtual]
OnAppAbout() | CCtrlbarsApp |
OnIdle(LONG lCount) | CCtrlbarsApp | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSwarm.cpp Source File

  • general
  • MMXSwarm

MMXSwarm.cpp

Go to the documentation of this file.
00001 // MMXSwarm.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #include "stdafx.h"
00013 #include "MMXSwarm.h"
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMMXSwarmApp
00024
00025 BEGIN_MESSAGE_MAP(CMMXSwarmApp, CWinApp)
00026   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00027 END_MESSAGE_MAP()
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CMMXSwarmApp construction
00031
00032 CMMXSwarmApp::CMMXSwarmApp()
00033 {
00034   // TODO: add construction code here,
00035   // Place all significant initialization in InitInstance
00036 }
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // The one and only CMMXSwarmApp object
00040
00041 CMMXSwarmApp theApp;
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CMMXSwarmApp initialization
00045
00046 BOOL CMMXSwarmApp::InitInstance()
00047 {
00048   // Standard initialization
00049   // If you are not using these features and wish to reduce the size
00050   //  of your final executable, you should remove from the following
00051   //  the specific initialization routines you do not need
00052   // Change the registry key under which our settings are stored
00053   // TODO: You should modify this string to be something appropriate
00054   // such as the name of your company or organization
00055   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00056
00057   // To create the main window, this code creates a new frame window
00058   // object and then sets it as the application's main window object
00059
00060   CMainFrame* pFrame = new CMainFrame;
00061
00062   m_pMainWnd = pFrame;
00063   m_pView = pFrame->GetView();
00064
00065   // create and load the frame with its resources
00066
00067   pFrame->LoadFrame(IDR_MAINFRAME,
00068     WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
00069     NULL);
00070
00071   // The one and only window has been initialized, so show and update it
00072   pFrame->ShowWindow(SW_SHOW);
00073   pFrame->UpdateWindow();
00074   SeedRandom();
00075
00076   // call DragAcceptFiles only if there's a suffix
00077   //  In an SDI app, this should occur after ProcessShellCommand
00078
00079   return TRUE;
00080 }
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CAboutDlg dialog used for App About
00084
00085 class CAboutDlg : public CDialog
00086 {
00087 public:
00088   CAboutDlg();
00089
00090 // Dialog Data
00091   enum { IDD = IDD_ABOUTBOX };
00092
00093   protected:
00094   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00095
00096 // Implementation
00097 protected:
00098   DECLARE_MESSAGE_MAP()
00099 };
00100
00101 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00102 {
00103 }
00104
00105 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00106 {
00107   CDialog::DoDataExchange(pDX);
00108 }
00109
00110 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00111 END_MESSAGE_MAP()
00112
00113 /////////////////////////////////////////////////////////////////////////////
00114 // CMMXSwarmApp message handlers
00115
00116 // App command to run the dialog
00117 void CMMXSwarmApp::OnAppAbout()
00118 {
00119   CAboutDlg aboutDlg;
00120   aboutDlg.DoModal();
00121 }
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // CMMXSwarmApp message handlers
00125
00126 BOOL CMMXSwarmApp::OnIdle(LONG lCount)
00127 {
00128   // Add your specialized code here and/or call the base class
00129   BOOL bRet = CWinApp::OnIdle(lCount);
00130   return(m_pView->OnIdle(lCount) || bRet);
00131 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDataObjectViewer Member List

This is the complete list of members for CDataObjectViewer, including all inherited members.
CDataObjectViewer() | CDataObjectViewer | [protected]
CInterfaceViewer() | CInterfaceViewer |
OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CDataObjectViewer | [virtual]
View(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CInterfaceViewer |
~CDataObjectViewer() | CDataObjectViewer | [protected, virtual]
~CInterfaceViewer() | CInterfaceViewer | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MainFrm.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

MainFrm.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "OptionsPage.h"
00015 #include "ResourcePage.h"
00016 #include "MainFrm.h"
00017 #include "keys.h"
00018 #include "RibbonTableButton.h"
00019
00020 #include <memory>
00021
00022 #ifdef _DEBUG
00023 #define new DEBUG_NEW
00024 #undef THIS_FILE
00025 static char THIS_FILE[] = __FILE__;
00026 #endif
00027
00028 #pragma warning(disable:4100)
00029
00030 const int IdStartProgressTimer = 1;
00031 const int IdShowProgressTimer = 2;
00032
00033 const DWORD idTabDeveloper = 101;
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CMainFrame
00037
00038 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
00039
00040 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
00041   //{{AFX_MSG_MAP(CMainFrame)
00042   ON_WM_CREATE()
00043   ON_WM_GETMINMAXINFO()
00044   ON_WM_PAINT()
00045   ON_WM_ERASEBKGND()
00046   ON_WM_SIZING()
00047   ON_WM_SIZE()
00048   ON_WM_TIMER()
00049   ON_COMMAND(ID_WRITE_CLIPBOARD, OnWriteClipboard)
00050   ON_UPDATE_COMMAND_UI(ID_WRITE_CLIPBOARD, OnUpdateWriteClipboard)
00051   ON_COMMAND(ID_VIEW_RTL, OnViewRtl)
00052   ON_UPDATE_COMMAND_UI(ID_VIEW_RTL, OnUpdateViewRtl)
00053   ON_COMMAND(ID_STATUSBAR_ZOOM_SLIDER, OnZoomSlider)
00054   ON_COMMAND(ID_STATUSBAR_ZOOM, OnZoom)
00055   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2003, ID_VIEW_APPLOOK_WIN7, OnAppLook)
00056   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2003, ID_VIEW_APPLOOK_WIN7, OnUpdateAppLook)
00057   ON_COMMAND(ID_STATUSBAR_REFRESH, OnRefresh)
00058   ON_UPDATE_COMMAND_UI(ID_STATUSBAR_REFRESH, OnUpdateRefresh)
00059   ON_COMMAND(ID_STATUSBAR_SPELL, OnSpell)
00060   ON_COMMAND(ID_TOOLS_OPTIONS, OnToolsOptions)
00061   ON_REGISTERED_MESSAGE(AFX_WM_ON_RIBBON_CUSTOMIZE, OnRibbonCustomize)
00062   ON_COMMAND(ID_STATUSBAR_LINK, OnLink)
00063   ON_REGISTERED_MESSAGE(AFX_WM_ON_HIGHLIGHT_RIBBON_LIST_ITEM, OnHighlightRibbonListItem)
00064   ON_COMMAND(ID_VIEW_MESSAGEBAR, OnViewMessageBar)
00065   ON_UPDATE_COMMAND_UI(ID_VIEW_MESSAGEBAR, OnUpdateViewMessageBar)
00066   ON_REGISTERED_MESSAGE(AFX_WM_ON_BEFORE_SHOW_RIBBON_ITEM_MENU, OnShowRibbonItemMenu)
00067   ON_COMMAND_RANGE(ID_PAGELAYOUT_EFFECTS_ACADEMIC, ID_PAGELAYOUT_THEMES_MORETHEMES, OnDummy)
00068   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00069   ON_COMMAND(ID_FILE_PRINT_DIRECT, OnFilePrint)
00070   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00071   ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, OnUpdateFilePrintPreview)
00072   //}}AFX_MSG_MAP
00073 END_MESSAGE_MAP()
00074
00075 //////////////////////////////////////////////////////////////////////////
00076 // CMFCRibbonNumEditCtrl
00077 class CMFCRibbonNumEditCtrl : public CMFCRibbonRichEditCtrl
00078 {
00079 protected:
00080   int m_nValidNum;
00081
00082   DECLARE_MESSAGE_MAP()
00083
00084 public:
00085   CMFCRibbonNumEditCtrl::CMFCRibbonNumEditCtrl(CMFCRibbonEdit& edit) : CMFCRibbonRichEditCtrl(edit)
00086   {
00087     m_nValidNum = 0;
00088   }
00089
00090   virtual void OnKillFocus(CWnd* pNewWnd)
00091   {
00092     CMFCRibbonRichEditCtrl::OnKillFocus(pNewWnd);
00093     int nTempVal = _ttoi(m_strOldText);
00094     if (nTempVal != 0)
00095     {
00096       m_nValidNum = nTempVal;
00097     }
00098     else
00099     {
00100       m_strOldText.Empty();
00101       m_nValidNum = 0;
00102     }
00103
00104     CString strText;
00105     strText.Format(_T("%d"), m_nValidNum);
00106     m_edit.SetEditText(strText);
00107   }
00108 };
00109
00110 BEGIN_MESSAGE_MAP(CMFCRibbonNumEditCtrl, CMFCRibbonRichEditCtrl)
00111   ON_WM_KILLFOCUS()
00112 END_MESSAGE_MAP()
00113
00114 //////////////////////////////////////////////////////////////////////////
00115 // CMFCRibbonNumEdit
00116 class CMFCRibbonNumEdit : public CMFCRibbonEdit
00117 {
00118 public:
00119   CMFCRibbonNumEdit::CMFCRibbonNumEdit(UINT uiID, int nWidth, LPCTSTR lpszLabel, int nImage = -1)
00120     : CMFCRibbonEdit(uiID, nWidth, lpszLabel, nImage)
00121   {
00122   }
00123
00124   virtual ~CMFCRibbonNumEdit() {}
00125
00126   virtual CMFCRibbonRichEditCtrl* CreateEdit(CWnd* pWndParent, DWORD dwEditStyle)
00127   {
00128     ASSERT_VALID(this);
00129     ASSERT_VALID(pWndParent);
00130
00131     CMFCRibbonNumEditCtrl* pWndEdit = new CMFCRibbonNumEditCtrl(*this);
00132
00133     if (!pWndEdit->Create(dwEditStyle, CRect(0, 0, 0, 0), pWndParent, m_nID))
00134     {
00135       delete pWndEdit;
00136       return NULL;
00137     }
00138
00139     if (m_bHasSpinButtons)
00140     {
00141       CreateSpinButton(pWndEdit, pWndParent);
00142     }
00143
00144     return pWndEdit;
00145   }
00146 };
00147
00148 /////////////////////////////////////////////////////////////////////////////
00149 // CMainFrame construction/destruction
00150
00151 CMainFrame::CMainFrame()
00152 {
00153   m_rectFill.SetRectEmpty();
00154   m_rectSizing.SetRectEmpty();
00155
00156   m_nProgressValue = -1;
00157   m_bInfiniteProgressMode = TRUE;
00158
00159   CreateDocumentColors();
00160   CreateStyleList();
00161   CreateThemeList();
00162   CreateFontsList();
00163
00164   CMFCPopupMenu::SetAnimationType(CMFCPopupMenu::SYSTEM_DEFAULT_ANIMATION);
00165 }
00166
00167 CMainFrame::~CMainFrame()
00168 {
00169   for (POSITION pos = m_TooltipImages.GetStartPosition(); pos != NULL;)
00170   {
00171     CMFCToolBarImages* pBmp = NULL;
00172     UINT uiID;
00173
00174     m_TooltipImages.GetNextAssoc(pos, uiID, pBmp);
00175     delete pBmp;
00176   }
00177 }
00178
00179 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00180 {
00181   if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
00182     return -1;
00183
00184   // Load background patterns:
00185   m_Pat[0].Create(CMFCControlRendererInfo(IDB_VIEWPAT_1, RGB(255, 0, 255), CRect(0, 0, 8, 8), CRect(0, 0, 0, 0)));
00186   m_Pat[1].Create(CMFCControlRendererInfo(IDB_VIEWPAT_2, RGB(255, 255, 255), CRect(0, 0, 499, 157), CRect(0, 0, 0, 0), CRect(480, 0, 0, 0), CRect(480, 0, 499, 157)));
00187   m_Pat[2].Create(CMFCControlRendererInfo(IDB_VIEWPAT_3, RGB(255, 255, 255), CRect(0, 0, 499, 157), CRect(0, 0, 0, 0), CRect(480, 0, 0, 0), CRect(480, 0, 499, 157)));
00188   m_Pat[3].Create(CMFCControlRendererInfo(IDB_VIEWPAT_4, RGB(255, 255, 255), CRect(0, 0, 499, 157), CRect(0, 0, 0, 0), CRect(480, 0, 0, 0), CRect(480, 0, 499, 157)));
00189
00190   if (!CreateRibbonBar())
00191   {
00192     TRACE0("Failed to create ribbon bar\n");
00193     return -1;      // fail to create
00194   };
00195
00196   if (!CreateStatusBar())
00197   {
00198     TRACE0("Failed to create status bar\n");
00199     return -1;      // fail to create
00200   }
00201
00202   if (!CreateMessageBar())
00203   {
00204     TRACE0("Failed to create message bar\n");
00205   }
00206
00207   // Create task pane:
00208   CRect rectDummy(0, 0, 200, 400);
00209
00210   if (!m_wndTaskPane.Create(_T("Clipboard"), this, rectDummy, TRUE, ID_VIEW_TASK_PANE, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | AFX_CBRS_CLOSE | AFX_CBRS_FLOAT))
00211   {
00212     TRACE0("Failed to create task pane\n");
00213     return -1;
00214   }
00215
00216   m_wndTaskPane.EnableDocking(CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT);
00217   DockPane(&m_wndTaskPane);
00218
00219   EnableDocking(CBRS_ALIGN_ANY);
00220
00221   OnChangeLayout();
00222
00223   // Show progress bar after the short delay:
00224   SetTimer(IdStartProgressTimer, 500, NULL);
00225
00226   // Start animation:
00227   CMFCRibbonStatusBarPane* pPane = DYNAMIC_DOWNCAST(CMFCRibbonStatusBarPane, m_wndStatusBar.FindElement(ID_STATUSBAR_SPELL));
00228
00229   if (pPane != NULL)
00230   {
00231     pPane->StartAnimation(500 /* Frame delay*/, 5000 /* Duration */);
00232   }
00233
00234   return 0;
00235 }
00236
00237 void CMainFrame::SetKeys()
00238 {
00239   m_MainButton.SetKeys(_T("f"));
00240
00241   for (int i = 0; keys [i].uiCmd != 0; i++)
00242   {
00243     CString str = keys [i].lpszKey;
00244
00245     int nAmpIndex = str.Find(_T('&'));
00246
00247     if (nAmpIndex >= 0)
00248     {
00249       CString str1 = str.Left(nAmpIndex);
00250       CString str2 = str.Mid(nAmpIndex + 1);
00251
00252       m_wndRibbonBar.SetElementKeys(keys [i].uiCmd, str1, str2);
00253     }
00254     else
00255     {
00256       m_wndRibbonBar.SetElementKeys(keys [i].uiCmd, str);
00257     }
00258   }
00259 }
00260
00261 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00262 {
00263   if ( !CFrameWndEx::PreCreateWindow(cs) )
00264     return FALSE;
00265
00266   cs.style |= WS_CLIPCHILDREN;
00267   return TRUE;
00268 }
00269
00270 /////////////////////////////////////////////////////////////////////////////
00271 // CMainFrame diagnostics
00272
00273 #ifdef _DEBUG
00274 void CMainFrame::AssertValid() const
00275 {
00276   CFrameWndEx::AssertValid();
00277 }
00278
00279 void CMainFrame::Dump(CDumpContext& dc) const
00280 {
00281   CFrameWndEx::Dump(dc);
00282 }
00283
00284 #endif //_DEBUG
00285
00286 /////////////////////////////////////////////////////////////////////////////
00287 // CMainFrame message handlers
00288
00289 void CMainFrame::OnAppLook(UINT id)
00290 {
00291   CWaitCursor wait;
00292
00293   theApp.m_nAppLook = id;
00294
00295   switch (theApp.m_nAppLook)
00296   {
00297   case ID_VIEW_APPLOOK_2003:
00298     m_wndRibbonBar.SetWindows7Look(FALSE);
00299     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
00300     break;
00301
00302   case ID_VIEW_APPLOOK_WIN7:
00303     m_wndRibbonBar.SetWindows7Look(TRUE);
00304     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7));
00305         break;
00306
00307   default:
00308     switch (theApp.m_nAppLook)
00309     {
00310     case ID_VIEW_APPLOOK_2007_1:
00311       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00312       break;
00313
00314     case ID_VIEW_APPLOOK_2007_2:
00315       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00316       break;
00317
00318     case ID_VIEW_APPLOOK_2007_3:
00319       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);
00320       break;
00321
00322     case ID_VIEW_APPLOOK_2007_4:
00323       CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);
00324       break;
00325     }
00326     m_wndRibbonBar.SetWindows7Look(FALSE);
00327     CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));
00328   }
00329
00330   if (m_MemBitmap.GetSafeHandle() != NULL)
00331   {
00332     m_MemBitmap.DeleteObject();
00333   }
00334
00335   RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME | RDW_ERASE);
00336
00337   theApp.WriteInt(_T("ApplicationLook"), theApp.m_nAppLook);
00338 }
00339
00340 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00341 {
00342   pCmdUI->SetRadio(theApp.m_nAppLook == pCmdUI->m_nID);
00343 }
00344
00345 BOOL CMainFrame::CreateRibbonBar()
00346 {
00347   if (!m_wndRibbonBar.Create(this))
00348   {
00349     return -1;      // fail to create
00350   }
00351
00352   // Load panel images:
00353   m_PanelImages.SetImageSize(CSize(16, 16));
00354   if (!m_PanelImages.Load(IDB_BUTTONS))
00355   {
00356     TRACE0("Failed to load panel images\n");
00357     return -1;
00358   }
00359
00360   // Add main button:
00361   AddMainCategory();
00362
00363   // Add tabs:
00364   AddTab_Home();
00365   AddTab_Insert();
00366   AddTab_PageLayout();
00367   AddTab_References();
00368   AddTab_Mailings();
00369   AddTab_Review();
00370   AddTab_View();
00371
00372   if (theApp.m_bShowDevTab)
00373   {
00374     AddTab_Developer();
00375   }
00376
00377   // Add context tabs:
00378   AddContextTab_Picture();
00379   AddContextTab_Chart();
00380   AddContextTab_Table();
00381
00382   // Add quick access toolbar commands:
00383   CMFCRibbonQuickAccessToolBarDefaultState qatState;
00384
00385   qatState.AddCommand(ID_FILE_NEW, FALSE);
00386   qatState.AddCommand(ID_FILE_OPEN, FALSE);
00387   qatState.AddCommand(ID_FILE_SAVE);
00388   qatState.AddCommand(ID_FILE_SEND_EMAIL, FALSE);
00389   qatState.AddCommand(ID_FILE_PRINT_DIRECT);
00390   qatState.AddCommand(ID_FILE_PRINT_PREVIEW, FALSE);
00391   qatState.AddCommand(ID_EDIT_UNDO);
00392   qatState.AddCommand(ID_TABLE_DRAWTABLE, FALSE);
00393
00394   m_wndRibbonBar.SetQuickAccessDefaultState(qatState);
00395
00396   // Add elements to the right side of tabs:
00397   CMFCRibbonButton* pVisualStyleButton = new CMFCRibbonButton(ID_SET_STYLE, _T("Style"), -1, -1);
00398
00399   pVisualStyleButton->SetMenu(IDR_THEME_MENU, FALSE /* No default command */, TRUE /* Right align */);
00400
00401   pVisualStyleButton->SetToolTipText(_T("Modify Visual Style"));
00402   pVisualStyleButton->SetDescription(_T("Choose one of the following looks:\r\nMS Office 2003 or MS Office 2007"));
00403   m_wndRibbonBar.AddToTabs(pVisualStyleButton);
00404
00405   m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_ABOUT, _T(""), m_PanelImages.ExtractIcon(0)));
00406
00407   m_wndRibbonBar.EnableToolTips(theApp.m_bShowToolTips, theApp.m_bShowToolTipDescr);
00408   m_wndRibbonBar.EnableKeyTips(theApp.m_bShowKeyTips);
00409
00410   SetKeys();
00411
00412   return TRUE;
00413 }
00414
00415 void CMainFrame::AddMainCategory()
00416 {
00417   m_MainButton.SetImage(IDB_MAIN);
00418   m_MainButton.SetToolTipText(_T("Main Button"));
00419   m_MainButton.SetDescription(_T("Click here to see everything you can do with your document, including saving, printing or sharing it with others"));
00420   m_MainButton.SetID(ID_MAIN_BUTTON);
00421
00422   m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize(45, 45));
00423
00424   CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(_T("Main Menu"), IDB_FILESMALL, IDB_FILELARGE);
00425
00426   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_NEW, _T("&New"), 0, 0));
00427   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_OPEN, _T("&Open"), 1, 1));
00428
00429   pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE, _T("&Save"), 2, 2));
00430
00431   std::auto_ptr<CMFCRibbonButton> apBtnSaveAs(new CMFCRibbonButton(ID_FILE_SAVE_AS, _T("Save &As"), 3, 3));
00432   apBtnSaveAs->AddSubItem(new CMFCRibbonLabel(_T("Save a copy of the document")));
00433   apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_DOCUMENT, _T("&Word Document"), 9, 9, TRUE));
00434   apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_TEMPLATE, _T("Word &Template"), 10, 10, TRUE));
00435   apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_DOCUMENT_OLD, _T("Word &97-2003 Document"), 11, 11, TRUE));
00436   apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_ADDINS, _T("&Find add-ins for other file formats"), 12, 12, TRUE));
00437   apBtnSaveAs->AddSubItem(new CMFCRibbonButton(ID_FILE_SAVE_AS_OTHER, _T("&Other Formats"), 3, 3, TRUE));
00438   pMainPanel->Add(apBtnSaveAs.release());
00439
00440   pMainPanel->Add(new CMFCRibbonSeparator(TRUE));
00441
00442   std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton(ID_FILE_PRINT, _T("&Print"), 4, 4));
00443   apBtnPrint->AddSubItem(new CMFCRibbonLabel(_T("Preview and print the document")));
00444   apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT, _T("&Print"), 4, 4, TRUE));
00445   apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 13, 13, TRUE));
00446   apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 14, 14, TRUE));
00447   pMainPanel->Add(apBtnPrint.release());
00448
00449   std::auto_ptr<CMFCRibbonButton> apBtnPrepare(new CMFCRibbonButton(ID_FILE_PREPARE, _T("Pr&epare"), 5, 5));
00450   apBtnPrepare->AddSubItem(new CMFCRibbonLabel(_T("Prepare the document for distribution")));
00451   apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_PROPERTIES, _T("&Properties"), 15, 15, TRUE));
00452   apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_INSPECT, _T("&Inspect Document"), 16, 16, TRUE));
00453   apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_ENCRYPT, _T("&Encrypt Document"), 17, 17, TRUE));
00454   apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_ADD_SIGNATURE, _T("Add a Digital &Signature"), 18, 18, TRUE));
00455   apBtnPrepare->AddSubItem(new CMFCRibbonButton(ID_FILE_PREPARE_MARK_AS_FINAL, _T("Mark as &Final"), 19, 19, TRUE));
00456   apBtnPrepare->SetDefaultCommand(FALSE);
00457   pMainPanel->Add(apBtnPrepare.release());
00458
00459   std::auto_ptr<CMFCRibbonButton> apBtnSend(new CMFCRibbonButton(ID_FILE_SEND, _T("Sen&d"), 6, 6));
00460   apBtnSend->AddSubItem(new CMFCRibbonLabel(_T("Send a copy of the document to other people")));
00461   apBtnSend->AddSubItem(new CMFCRibbonButton(ID_FILE_SEND_EMAIL, _T("&E-mail"), 21, 21, TRUE));
00462   apBtnSend->AddSubItem(new CMFCRibbonButton(ID_FILE_SEND_FAX, _T("Internet Fa&x"), 22, 22, TRUE));
00463   apBtnSend->SetDefaultCommand(FALSE);
00464   pMainPanel->Add(apBtnSend.release());
00465
00466   std::auto_ptr<CMFCRibbonButton> apBtnPublish(new CMFCRibbonButton(ID_FILE_PUBLISH, _T("P&ublish"), 7, 7));
00467   apBtnPublish->AddSubItem(new CMFCRibbonLabel(_T("Distribute the document to other people")));
00468   apBtnPublish->AddSubItem(new CMFCRibbonButton(ID_FILE_PUBLISH_BLOG, _T("&Blog"), 23, 23, TRUE));
00469   apBtnPublish->AddSubItem(new CMFCRibbonButton(ID_FILE_PUBLISH_DOCMANAGE_SERVER, _T("&Document Management Server"), 24, 24, TRUE));
00470   apBtnPublish->AddSubItem(new CMFCRibbonButton(ID_FILE_PUBLISH_CREATE_DOCWORKSPACE, _T("&Create Document Workspace"), 25, 25, TRUE));
00471   apBtnPublish->SetDefaultCommand(FALSE);
00472   pMainPanel->Add(apBtnPublish.release());
00473
00474   pMainPanel->AddRecentFilesList(_T("Recent Documents"));
00475
00476   pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_TOOLS_OPTIONS, _T("Opt&ions"), 26));
00477   pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, _T("E&xit"), 27));
00478 }
00479
00480 void CMainFrame::AddTab_Home()
00481 {
00482   // Create a new category(tab):
00483   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Home\nh"), IDB_WRITE, IDB_WRITELARGE);
00484
00485   // Create "Clipboard" panel:
00486   CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel(_T("Clipboard"), m_PanelImages.ExtractIcon(1));
00487   pPanelClipboard->SetKeys(_T("zc"));
00488
00489   CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, _T("Paste"), 0, 0);
00490   pBtnPaste->SetMenu(IDR_WRITE_PASTE_MENU, TRUE);
00491   pPanelClipboard->Add(pBtnPaste);
00492
00493   pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, _T("Cut"), 1));
00494   pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, _T("Copy"), 2));
00495   pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPYFORMAT, _T("Format Painter"), 3));
00496
00497 #ifdef ENABLE_RIBBON_LAUNCH_BUTTON
00498   // Add the launch button at the bottom of the panel:
00499   pPanelClipboard->EnableLaunchButton(ID_WRITE_CLIPBOARD, 0);
00500 #endif // ENABLE_RIBBON_LAUNCH_BUTTON
00501
00502   // Create "Font" panel:
00503   CMFCRibbonPanel* pPanelFont = pCategory->AddPanel(_T("Font"), m_PanelImages.ExtractIcon(2));
00504   pPanelFont->SetKeys(_T("zf"));
00505
00506   // Create a new group with 2 elements: font name and font size:
00507   std::auto_ptr<CMFCRibbonButtonsGroup> apFontGroup(new CMFCRibbonButtonsGroup);
00508
00509   CMFCRibbonFontComboBox::m_bDrawUsingFont = TRUE;
00510
00511   CMFCRibbonFontComboBox* pFontCombo = new CMFCRibbonFontComboBox(ID_FONT_FONT);
00512   pFontCombo->SetWidth(55, TRUE); // Width in "floaty" mode
00513   pFontCombo->SelectItem(10);
00514   apFontGroup->AddButton(pFontCombo);
00515
00516   CMFCRibbonComboBox* pFontSizeCombo = new CMFCRibbonComboBox(ID_FONT_FONTSIZE, FALSE, 39);
00517   pFontSizeCombo->AddItem(_T("8"));
00518   pFontSizeCombo->AddItem(_T("9"));
00519   pFontSizeCombo->AddItem(_T("10"));
00520   pFontSizeCombo->AddItem(_T("11"));
00521   pFontSizeCombo->AddItem(_T("12"));
00522   pFontSizeCombo->AddItem(_T("14"));
00523   pFontSizeCombo->AddItem(_T("16"));
00524   pFontSizeCombo->AddItem(_T("18"));
00525   pFontSizeCombo->AddItem(_T("20"));
00526   pFontSizeCombo->AddItem(_T("22"));
00527   pFontSizeCombo->AddItem(_T("24"));
00528   pFontSizeCombo->AddItem(_T("26"));
00529   pFontSizeCombo->AddItem(_T("28"));
00530   pFontSizeCombo->AddItem(_T("36"));
00531   pFontSizeCombo->AddItem(_T("48"));
00532   pFontSizeCombo->AddItem(_T("72"));
00533   pFontSizeCombo->SetWidth(20, TRUE); // Width in "floaty" mode
00534   pFontSizeCombo->SelectItem(3);
00535   apFontGroup->AddButton(pFontSizeCombo);
00536
00537   pPanelFont->Add(apFontGroup.release());
00538
00539   // Add toolbar(all toolbar buttons will be automatically
00540   // converted to ribbon elements:
00541   pPanelFont->AddToolBar(IDR_FONT);
00542
00543   // Add menu to ID_FONT_UNDERLINE element:
00544   pPanelFont->SetElementMenu(ID_FONT_UNDERLINE, IDR_DUMMY_MENU, TRUE);
00545
00546   // Add menu to ID_FONT_CHANGECASE element:
00547   pPanelFont->SetElementMenu(ID_FONT_CHANGECASE, IDR_WRITE_FONTCASE_MENU);
00548
00549   // Replace ID_FONT_COLOR and ID_FONT_TEXTHIGHLIGHT elements
00550   // by color pickers:
00551   CMFCRibbonColorButton* pFontColorBtn = new CMFCRibbonColorButton();
00552   pFontColorBtn->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
00553   pFontColorBtn->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
00554   pFontColorBtn->SetColumns(10);
00555   pFontColorBtn->SetColor(RGB(255, 0, 0));
00556   pFontColorBtn->SetColorBoxSize(CSize(17, 17));
00557
00558   pFontColorBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00559   pFontColorBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE /* Contiguous Columns*/);
00560   pFontColorBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00561
00562   pPanelFont->ReplaceByID(ID_FONT_COLOR, pFontColorBtn);
00563
00564   CMFCRibbonColorButton* pFontColorHighlightBtn = new CMFCRibbonColorButton();
00565   pFontColorHighlightBtn->SetColor(RGB(255, 255, 255));
00566   pFontColorHighlightBtn->EnableAutomaticButton(_T("&No Color"), RGB(240, 240, 240), TRUE, NULL, FALSE /* Bottom */, TRUE /* Draw border */);
00567
00568   pPanelFont->ReplaceByID(ID_FONT_TEXTHIGHLIGHT, pFontColorHighlightBtn);
00569
00570   pFontColorHighlightBtn->SetColorBoxSize(CSize(26, 26));
00571   pFontColorHighlightBtn->AddSubItem(new CMFCRibbonButton(ID_STOP_HIGHLIGHTING, _T("&Stop Highlighting")));
00572
00573 #ifdef ENABLE_RIBBON_LAUNCH_BUTTON
00574   // Add the launch button at the bottom of the panel:
00575   pPanelFont->EnableLaunchButton(ID_WRITE_FONT);
00576 #endif // ENABLE_RIBBON_LAUNCH_BUTTON
00577
00578   // Create "Paragraph" panel:
00579   CMFCRibbonPanel* pPanelParagraph = pCategory->AddPanel(_T("Paragraph"), m_PanelImages.ExtractIcon(3));
00580   pPanelParagraph->SetKeys(_T("zp"));
00581
00582   pPanelParagraph->AddToolBar(IDR_PARAGRAPH);
00583
00584   // Attach palette to "Bullets" button:
00585   CMFCRibbonGallery* pPaletteBullet = new CMFCRibbonGallery(ID_PARA_BULLETS, _T(""), -1, -1);
00586
00587   pPanelParagraph->ReplaceByID(ID_PARA_BULLETS, pPaletteBullet);
00588   InitBulletPalette(pPaletteBullet);
00589   pPaletteBullet->EnableMenuResize();
00590
00591   // Attach palette to "Numbering" button:
00592   CMFCRibbonGallery* pPaletteNum = new CMFCRibbonGallery(ID_PARA_NUMBERING, _T(""), -1, -1);
00593
00594   pPanelParagraph->ReplaceByID(ID_PARA_NUMBERING, pPaletteNum);
00595   InitNumberingPalette(pPaletteNum);
00596   pPaletteNum->EnableMenuResize();
00597
00598   // Attach palette to "Multilevel" button:
00599   CMFCRibbonGallery* pPaletteMulti = new CMFCRibbonGallery(ID_PARA_MULTILEVEL, _T(""), -1, -1);
00600
00601   pPanelParagraph->ReplaceByID(ID_PARA_MULTILEVEL, pPaletteMulti);
00602   InitMultilevelPalette(pPaletteMulti);
00603   pPaletteMulti->EnableMenuResize();
00604   pPaletteMulti->SetDefaultCommand(FALSE);
00605
00606   pPanelParagraph->SetElementMenu(ID_PARA_LINESPACING, IDR_PARA_LINESPACING_MENU);
00607
00608   CMFCRibbonColorButton* pParaColorBtn = new CMFCRibbonColorButton();
00609   pParaColorBtn->EnableOtherButton(_T("&More Colors..."), _T("More Shading Colors"));
00610   pParaColorBtn->SetColor(RGB(255, 255, 255));
00611
00612   pParaColorBtn->SetColumns(10);
00613   pParaColorBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00614   pParaColorBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE /* Contiguous Columns*/);
00615   pParaColorBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00616   pParaColorBtn->SetColorBoxSize(CSize(17, 17));
00617   pParaColorBtn->EnableAutomaticButton(_T("&No Color"), RGB(240, 240, 240), TRUE, NULL, FALSE /* Bottom */, TRUE);
00618
00619   pPanelParagraph->ReplaceByID(ID_PARA_SHADING, pParaColorBtn);
00620
00621 #ifdef ENABLE_RIBBON_LAUNCH_BUTTON
00622   pPanelParagraph->EnableLaunchButton(ID_WRITE_PARAGRAPH);
00623 #endif // ENABLE_RIBBON_LAUNCH_BUTTON
00624
00625   // Add menu to ID_PARA_BORDER element:
00626   pPanelParagraph->SetElementMenu(ID_PARA_BORDER, IDR_WRITE_BORDERS_MENU, TRUE);
00627
00628   // Create "Styles" panel:
00629   CMFCRibbonPanel* pPanelStyle = pCategory->AddPanel(_T("Styles"), m_PanelImages.ExtractIcon(4));
00630   pPanelStyle->SetKeys(_T("zs"));
00631
00632   std::auto_ptr<CMFCRibbonGallery> apStyleBtn(new CMFCRibbonGallery(ID_WRITE_QUICKSTYLES, _T("Quick Styles"), 9, 1, IDB_STYLES, 64));
00633   apStyleBtn->AddSubItem(new CMFCRibbonButton(ID_WRITE_SAVESTYLE, _T("Save Selection as a New &Quick Style..."), -1, -1));
00634   apStyleBtn->AddSubItem(new CMFCRibbonButton(ID_WRITE_CLEARFORMATTING, _T("&Clear Formatting"), 8, -1));
00635   apStyleBtn->AddSubItem(new CMFCRibbonButton(ID_WRITE_APPLYSTYLES, _T("&Apply Styles"), 9, -1));
00636   for (int i = 0; i < m_arStyles.GetSize(); i++)
00637   {
00638     apStyleBtn->SetItemToolTip(i, m_arStyles [i]);
00639   }
00640
00641   apStyleBtn->EnableMenuResize();
00642   pPanelStyle->Add(apStyleBtn.release());
00643
00644   std::auto_ptr<CMFCRibbonButton> apStyleChangeBtn(new CMFCRibbonButton(ID_WRITE_CHANGESTYLES, _T("Change Styles"), 9, 2));
00645
00646   std::auto_ptr<CRibbonListButton> apStyleSetPalette(new CRibbonListButton(ID_STYLECHANGE_STYLESET, _T("St&yle Set"), 32, -1));
00647   apStyleSetPalette->AddGroup(_T(""), 0, 0, m_arStyleSets);
00648   apStyleSetPalette->AddSubItem(new CMFCRibbonButton(0, _T("&Reset to Quick Styles from Template")));
00649   apStyleSetPalette->EnableMenuResize(TRUE, TRUE); // Vertical only
00650   apStyleSetPalette->EnableMenuSideBar();
00651
00652   apStyleChangeBtn->AddSubItem(apStyleSetPalette.release());
00653
00654   std::auto_ptr<CRibbonListButton> apColorsPalette(new CRibbonListButton(ID_STYLECHANGE_COLORS, _T("&Colors"), 33, -1));
00655   apColorsPalette->AddGroup(_T("Built-In"), IDB_THEME_COLORS, 103, m_arColorThemes);
00656   apColorsPalette->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS, _T("&Create New Theme Colors...")));
00657   apColorsPalette->EnableMenuResize(TRUE, TRUE); // Vertical only
00658
00659   apStyleChangeBtn->AddSubItem(apColorsPalette.release());
00660
00661   std::auto_ptr<CRibbonListFontButton> apFontsPalette(new CRibbonListFontButton(ID_STYLECHANGE_FONTS, _T("&Fonts"), 34, -1));
00662   apFontsPalette->AddGroup(_T("Built-In"), IDB_THEME_FONTS, 43, m_arFonts);
00663   apFontsPalette->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS, _T("&Create New Theme Fonts...")));
00664   apFontsPalette->EnableMenuResize(TRUE, TRUE); // Vertical only
00665
00666   apStyleChangeBtn->AddSubItem(apFontsPalette.release());
00667
00668   apStyleChangeBtn->SetAlwaysLargeImage();
00669   apStyleChangeBtn->SetDefaultCommand(FALSE);
00670
00671   pPanelStyle->Add(apStyleChangeBtn.release());
00672
00673 #ifdef ENABLE_RIBBON_LAUNCH_BUTTON
00674   pPanelStyle->EnableLaunchButton(ID_WRITE_STYLE);
00675 #endif // ENABLE_RIBBON_LAUNCH_BUTTON
00676
00677   // Create "Editing" panel:
00678   CMFCRibbonPanel* pPanelEdit = pCategory->AddPanel(_T("Editing"), m_PanelImages.ExtractIcon(5));
00679   pPanelEdit->SetKeys(_T("zn"));
00680
00681   CMFCRibbonButton* pFindBtn = new CMFCRibbonButton(ID_EDIT_FIND, _T("Find"), 4);
00682   pFindBtn->SetMenu(IDR_WRITE_FIND_MENU);
00683   pFindBtn->SetDefaultCommand(ID_EDIT_FIND);
00684   pPanelEdit->Add(pFindBtn);
00685
00686   pPanelEdit->Add(new CMFCRibbonButton(ID_EDIT_REPLACE, _T("Replace"), 5));
00687
00688   CMFCRibbonButton* pFindSelectBtn = new CMFCRibbonButton(ID_WRITE_SELECT, _T("Select"), 7);
00689   pFindSelectBtn->SetMenu(IDR_WRITE_SELECT_MENU);
00690   pPanelEdit->Add(pFindSelectBtn);
00691
00692   // Add some hidden elements:
00693   pCategory->AddHidden(new CMFCRibbonUndoButton(ID_EDIT_UNDO, _T("Undo"), 10));
00694
00695   pCategory->AddHidden(new CMFCRibbonUndoButton(ID_EDIT_FIND, _T("Find"), 4));
00696   pCategory->AddHidden(new CMFCRibbonUndoButton(ID_EDIT_GOTO, _T("Go To"), 6));
00697
00698   pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_PASTE_SPECIAL, _T("Paste Special"), 11));
00699   pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_PASTE_HYPERLINK, _T("Paste as Hyperlink"), 12));
00700
00701   pCategory->AddHidden(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("Change List Level"), 13));
00702
00703   pCategory->AddHidden(new CMFCRibbonButton(ID_PARA_LINESPACINGBEFORE, _T("Add Space Before Paragraph"), 14));
00704   pCategory->AddHidden(new CMFCRibbonButton(ID_PARA_LINESPACINGAFTER, _T("Remove Space After Paragraph"), 15));
00705
00706   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_BOTTOMBORDER, _T("&Bottom Border"), 16));
00707   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_TOPBORDER, _T("To&p Border"), 17));
00708   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_LEFTBORDER, _T("&Left Border"), 18));
00709   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_RIGHTBORDER, _T("&Right Border"), 19));
00710   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_NOBORDER, _T("&No Border"), 20));
00711   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_ALLBORDERS, _T("&All Borders"), 21));
00712   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_OUTSIDEBORDERS, _T("Out&side Borders"), 22));
00713   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_INSIDEBORDERS, _T("&Inside Borders"), 23));
00714   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_INSIDEHORIZONTALBORDER, _T("Inside &Horizontal Border"), 24));
00715   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_INSIDEVERTICALBORDER, _T("Inside &Vertical Border"), 25));
00716   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_DIAGONALDOWNBORDER, _T("Diagonal Do&wn Border"), 26));
00717   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_DIAGONALUPBORDER, _T("Diagonal &Up Border"), 27));
00718   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_HORIZONTALLINE, _T("Hori&zontal Line"), 28));
00719   pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_DRAWTABLE, _T("&Draw Table"), 29));
00720   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_VIEWGRIDLINES, _T("View &Gridlines"), 30));
00721   pCategory->AddHidden(new CMFCRibbonButton(ID_BORDERS_BORDERSANDSHADING, _T("B&orders and Shading..."), 31));
00722
00723   pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, _T("Select All"), 35));
00724   pCategory->AddHidden(new CMFCRibbonButton(ID_EDIT_SELECTOBJECTS, _T("Select Objects"), 7));
00725
00726   // Pane collapsing fine tuning:
00727   CArray<int, int> arCollapseOrder;
00728
00729   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
00730   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelClipboard));
00731   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
00732   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
00733   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelEdit));
00734   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
00735   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelFont));
00736   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
00737   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelStyle));
00738   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
00739   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelFont));
00740
00741   pCategory->SetCollapseOrder(arCollapseOrder);
00742 }
00743
00744 void CMainFrame::AddTab_Insert()
00745 {
00746   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Insert\nn"), IDB_INSERT, IDB_INSERTLARGE);
00747
00748   CMFCRibbonPanel* pPanelPages = pCategory->AddPanel(_T("Pages"), m_PanelImages.ExtractIcon(6));
00749
00750   pPanelPages->SetKeys(_T("zp"));
00751
00752   CMFCRibbonButton* pInsertCoverPageBtn = new CMFCRibbonButton(ID_INSERT_COVERPAGE, _T("Cover Page"), 0, 0);
00753   pInsertCoverPageBtn->SetMenu(IDR_INSERT_COVERPAGE_MENU);
00754   pPanelPages->Add(pInsertCoverPageBtn);
00755
00756   pPanelPages->Add(new CMFCRibbonButton(ID_INSERT_BLACKPAGE, _T("Blank Page"), 1, 1));
00757   pPanelPages->Add(new CMFCRibbonButton(ID_INSERT_PAGEBREAK, _T("Page Break"), 2, 2));
00758
00759   CMFCRibbonPanel* pPanelInsertTable = pCategory->AddPanel(_T("Tables"), m_PanelImages.ExtractIcon(7));
00760   pPanelInsertTable->SetKeys(_T("zt"));
00761
00762   CRibbonTableButton* pTableMenuBtn = new CRibbonTableButton(ID_INSERT_TABLE, _T("Table"), 3, 3);
00763   pTableMenuBtn->SetMenu(IDR_INSERT_TABLE_MENU);
00764   pTableMenuBtn->SetPaletteID(ID_FROM_PALETTE_TABLE);
00765   pTableMenuBtn->SetButtonMode();
00766   pPanelInsertTable->Add(pTableMenuBtn);
00767
00768   CMFCRibbonPanel* pPanelIllustrations = pCategory->AddPanel(_T("Illustrations"), m_PanelImages.ExtractIcon(8));
00769   pPanelIllustrations->SetKeys(_T("zi"));
00770
00771   CMFCRibbonButton* pInsertPictureBtn = new CMFCRibbonButton(ID_INSERT_PICTURE, _T("Picture"), 4, 4);
00772   pPanelIllustrations->Add(pInsertPictureBtn);
00773   pPanelIllustrations->Add(new CMFCRibbonButton(ID_INSERT_CLIPART, _T("Clip Art"), 5, 5));
00774
00775   std::auto_ptr<CMFCRibbonGallery> apInsertShapesBtn(new CMFCRibbonGallery(ID_INSERT_SHAPES, _T("Shapes"), 6, 6));
00776   apInsertShapesBtn->SetButtonMode();
00777   apInsertShapesBtn->SetIconsInRow(12);
00778
00779   apInsertShapesBtn->AddGroup(_T("Recently Used Shapes"), IDB_SHAPE1, 20);
00780   apInsertShapesBtn->AddGroup(_T("Lines"), IDB_SHAPE2, 20);
00781   apInsertShapesBtn->AddGroup(_T("Basic Shapes"), IDB_SHAPE3, 20);
00782   apInsertShapesBtn->AddGroup(_T("Block Arrows"), IDB_SHAPE4, 20);
00783   apInsertShapesBtn->AddGroup(_T("Flowchart"), IDB_SHAPE5, 20);
00784   apInsertShapesBtn->AddGroup(_T("Callouts"), IDB_SHAPE6, 20);
00785   apInsertShapesBtn->AddGroup(_T("Stars and Banners"), IDB_SHAPE7, 20);
00786
00787   apInsertShapesBtn->AddSubItem(new CMFCRibbonButton(ID_INSERT_SHAPESNEW, _T("&New Drawing Canvas"), 29, -1));
00788
00789   pPanelIllustrations->Add(apInsertShapesBtn.release());
00790   pPanelIllustrations->Add(new CMFCRibbonButton(ID_INSERT_SMARTART, _T("SmartArt"), 7, 7));
00791   pPanelIllustrations->Add(new CMFCRibbonButton(ID_INSERT_CHART, _T("Chart"), 8, 8));
00792
00793   CMFCRibbonPanel* pPanelLinks = pCategory->AddPanel(_T("Links"), m_PanelImages.ExtractIcon(9));
00794   pPanelLinks->SetKeys(_T("zl"));
00795
00796   pPanelLinks->Add(new CMFCRibbonButton(ID_INSERT_HYPERLINK, _T("Hyperlink"), 9, 9));
00797   pPanelLinks->Add(new CMFCRibbonButton(ID_INSERT_BOOKMARK, _T("Bookmark"), 10, 10));
00798   pPanelLinks->Add(new CMFCRibbonButton(ID_INSERT_REFERENCE, _T("Cross-reference"), 11, 11));
00799
00800   CMFCRibbonPanel* pPanelHeaderFooter = pCategory->AddPanel(_T("Header & Footer"), m_PanelImages.ExtractIcon(10));
00801   pPanelHeaderFooter->SetKeys(_T("zh"));
00802
00803   CMFCRibbonButton* pInsertHeaderBtn = new CMFCRibbonButton(ID_INSERT_HEADER, _T("Header"), 12, 12);
00804   pInsertHeaderBtn->SetMenu(IDR_INSERT_HEADER_MENU);
00805   pPanelHeaderFooter->Add(pInsertHeaderBtn);
00806
00807   CMFCRibbonButton* pInsertFooterBtn = new CMFCRibbonButton(ID_INSERT_FOOTER, _T("Footer"), 13, 13);
00808   pInsertFooterBtn->SetMenu(IDR_INSERT_FOOTER_MENU);
00809   pPanelHeaderFooter->Add(pInsertFooterBtn);
00810
00811   CMFCRibbonButton* pInsertPageNumbersBtn = new CMFCRibbonButton(ID_INSERT_PAGENUMBER, _T("Page Number"), 14, 14);
00812   pInsertPageNumbersBtn->SetMenu(IDR_INSERT_PAGENUMBERS_MENU);
00813   pPanelHeaderFooter->Add(pInsertPageNumbersBtn);
00814
00815   CMFCRibbonPanel* pPanelText = pCategory->AddPanel(_T("Text"), m_PanelImages.ExtractIcon(11));
00816   pPanelText->SetKeys(_T("zt"));
00817
00818   CMFCRibbonButton* pTextBoxBtn = new CMFCRibbonButton(ID_INSERT_TEXTBOX, _T("Text Box"), 15, 15);
00819   pTextBoxBtn->SetMenu(IDR_INSERT_TEXTBOX_MENU);
00820   pPanelText->Add(pTextBoxBtn);
00821
00822   pPanelText->Add(new CMFCRibbonButton(ID_INSERT_QUICKPARTS, _T("Quick Parts"), 16, 16));
00823   pPanelText->Add(new CMFCRibbonButton(ID_INSERT_WORDART, _T("WordArt"), 17, 17));
00824   pPanelText->Add(new CMFCRibbonButton(ID_INSERT_DROPCAP, _T("Drop Cap"), 18, 18));
00825   pPanelText->Add(new CMFCRibbonButton(ID_INSERT_SIGNATURELINE, _T("Signature Line"), 19));
00826   pPanelText->Add(new CMFCRibbonButton(ID_INSERT_DATETIME, _T("Date && Time"), 20));
00827   pPanelText->Add(new CMFCRibbonButton(ID_INSERT_OBJECT, _T("Object"), 21));
00828
00829   pPanelText->SetElementMenu(ID_INSERT_QUICKPARTS, IDR_DUMMY_MENU);
00830   pPanelText->SetElementMenu(ID_INSERT_WORDART, IDR_DUMMY_MENU);
00831   pPanelText->SetElementMenu(ID_INSERT_DROPCAP, IDR_DUMMY_MENU);
00832   pPanelText->SetElementMenu(ID_INSERT_SIGNATURELINE, IDR_DUMMY_MENU, TRUE);
00833   pPanelText->SetElementMenu(ID_INSERT_OBJECT, IDR_DUMMY_MENU, TRUE);
00834
00835   CMFCRibbonPanel* pPanelSymbols = pCategory->AddPanel(_T("Symbols"), m_PanelImages.ExtractIcon(12));
00836   pPanelSymbols->SetKeys(_T("zs"));
00837
00838   pPanelSymbols->Add(new CMFCRibbonButton(ID_INSERT_EQUATION, _T("Equation"), 22, 19));
00839   pPanelSymbols->Add(new CMFCRibbonButton(ID_INSERT_SYMBOL, _T("Symbol"), 23, 20));
00840
00841   // pPanelSymbols->SetElementMenu(ID_INSERT_EQUATION, IDR_DUMMY_MENU, TRUE);
00842   pPanelSymbols->SetElementMenu(ID_INSERT_SYMBOL, IDR_DUMMY_MENU);
00843
00844   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVECURRENTCOVERPAGE, _T("Remove Current Cover Page"), 24));
00845   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVETOCOVERPAGEGALLERY, _T("Save Selection to Cover Page Gallery"), 25));
00846
00847   pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_TABLE, _T("Insert Table"), 3));
00848   pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_DRAWTABLE, _T("Draw Table"), 26));
00849   pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_CONVERTTOTABLE, _T("Convert to Table"), 27));
00850   pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_EXCELSPREADSHEET, _T("Excel Spreadsheet"), 28));
00851   pCategory->AddHidden(new CMFCRibbonButton(ID_TABLE_QUICKTABLES, _T("Quick Tables"), 3));
00852
00853   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_EDITHEADER, _T("Edit Header"), 12));
00854   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVEHEADER, _T("Remove Header"), 30));
00855   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVESELECTIONTOHEADERGALLERY, _T("Save Selection to Header Gallery"), 31));
00856
00857   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_EDITFOOTER, _T("Edit Footer"), 13));
00858   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVEFOOTER, _T("Remove Footer"), 32));
00859   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVESELECTIONTOFOOTERGALLERY, _T("Save Selection to Footer Gallery"), 33));
00860
00861   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_TOPOFPAGE, _T("Top of Page"), 34));
00862   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_BOTTOMOFPAGE, _T("Bottom of Page"), 35));
00863   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_PAGEMARGINS, _T("Page Margins"), 36));
00864   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_CURRENTPOSITION, _T("Current Position"), 14));
00865   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_FORMATPAGENUMBERS, _T("Format Page Numbers"), 37));
00866   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_REMOVEPAGENUMBERS, _T("Remove Page Numbers"), 38));
00867
00868   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_DRAWTEXTBOX, _T("Draw Text Box"), 15));
00869   pCategory->AddHidden(new CMFCRibbonButton(ID_INSERT_SAVESELECTIONTOTEXTBOXGALLERY, _T("Save Selection to Text Box Gallery"), 39));
00870
00871   // Pane collapsing fine tuning:
00872   CArray<int, int> arCollapseOrder;
00873
00874   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelLinks));
00875   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelSymbols));
00876   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPages));
00877   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelText));
00878   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelHeaderFooter));
00879   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelIllustrations));
00880   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelText));
00881   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelLinks));
00882   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPages));
00883   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelSymbols));
00884   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelIllustrations));
00885   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelText)); // Setting -1 to the next index
00886   arCollapseOrder.Add(-1); // means force panel collapse
00887   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelHeaderFooter));
00888   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelIllustrations));
00889
00890   pCategory->SetCollapseOrder(arCollapseOrder);
00891 }
00892
00893 void CMainFrame::AddTab_PageLayout()
00894 {
00895   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Page Layout\np"), IDB_PAGELAYOUT, IDB_PAGELAYOUTLARGE);
00896
00897   CMFCRibbonPanel* pPanelThemes = pCategory->AddPanel(_T("Themes\nzt"), m_PanelImages.ExtractIcon(13));
00898
00899   std::auto_ptr<CRibbonListButton> apListBtn1(new CRibbonListButton(ID_PAGELAYOUT_THEMES, _T("Themes\nth"), 23, 0, FALSE));
00900   apListBtn1->AddGroup(_T("Built-In"), IDB_THEME_THEMES, 64, m_arThemes);
00901   apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_RESETFROMTEMPLATE, _T("&Reset to Theme from Template")));
00902   apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_MORETHEMES, _T("More Themes on Microsoft &Office Online...")));
00903   apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_BROWSEFORTHEMES, _T("&Browse for Themes..."), 24));
00904   apListBtn1->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_THEMES_SAVECURRENTTHEME, _T("&Save Current Theme..."), 25));
00905   apListBtn1->SetIconsInRow(4);
00906   apListBtn1->EnableMenuResize();
00907   pPanelThemes->Add(apListBtn1.release());
00908
00909   std::auto_ptr<CRibbonListButton> apListBtn2(new CRibbonListButton(ID_PAGELAYOUT_COLORS, _T("Colors\ntc"), 0, -1));
00910   apListBtn2->AddGroup(_T("Built-In"), IDB_THEME_COLORS, 103, m_arColorThemes);
00911   apListBtn2->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_COLORS_CREATENEWTHEMECOLORS, _T("&Create New Theme Colors...")));
00912   apListBtn2->EnableMenuResize(TRUE, TRUE); // Vertical only
00913   pPanelThemes->Add(apListBtn2.release());
00914
00915   std::auto_ptr<CRibbonListFontButton> apFontsBtn(new CRibbonListFontButton(ID_PAGELAYOUT_FONTS, _T("Fonts\ntf"), 1, -1));
00916   apFontsBtn->AddGroup(_T("Built-In"), IDB_THEME_FONTS, 43, m_arFonts);
00917   apFontsBtn->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_FONTS_CREATENEWTHEMEFONTS, _T("&Create New Theme Fonts...")));
00918   apFontsBtn->EnableMenuResize(TRUE, TRUE); // Vertical only
00919   pPanelThemes->Add(apFontsBtn.release());
00920
00921   std::auto_ptr<CRibbonListButton> apListBtn3(new CRibbonListButton(ID_PAGELAYOUT_EFFECTS, _T("Effects\nte"), 2, -1, FALSE));
00922   apListBtn3->AddGroup(_T("Built-In"), IDB_THEME_EFFECTS, 64, m_arThemes);
00923   apListBtn3->SetIconsInRow(4);
00924   apListBtn3->EnableMenuResize();
00925   pPanelThemes->Add(apListBtn3.release());
00926
00927   CMFCRibbonPanel* pPanelPageSetup = pCategory->AddPanel(_T("Page Setup\nzs"), m_PanelImages.ExtractIcon(14));
00928
00929   CMFCRibbonButton* pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_MARGINS, _T("Margins\nm"), 3, 1);
00930   pBtn->SetMenu(IDR_PAGELAYOUT_MARGINS);
00931   pPanelPageSetup->Add(pBtn);
00932
00933   pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_ORIENTATION, _T("Orientation\no"), 4, 2);
00934   pBtn->SetMenu(IDR_PAGELAYOUT_ORIENTATION);
00935   pPanelPageSetup->Add(pBtn);
00936
00937   pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_SIZE, _T("Size\nsz"), 5, 3));
00938   pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_SIZE, IDR_DUMMY_MENU);
00939
00940   pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_COLUMNS, _T("Columns\nj"), 6, 4);
00941   pBtn->SetMenu(IDR_PAGELAYOUT_COLUMNS);
00942   pPanelPageSetup->Add(pBtn);
00943
00944   pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_BREAKS, _T("Breaks\nb"), 7, -1));
00945   pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_LINENUMBERS, _T("Line Numbers\nln"), 8, -1));
00946   pPanelPageSetup->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGESETUP_HYPHENATION, _T("Hyphenation\nh"), 9, -1));
00947
00948   pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_BREAKS, IDR_DUMMY_MENU);
00949   pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_LINENUMBERS, IDR_DUMMY_MENU);
00950   pPanelPageSetup->SetElementMenu(ID_PAGELAYOUT_PAGESETUP_HYPHENATION, IDR_DUMMY_MENU);
00951
00952 #ifdef ENABLE_RIBBON_LAUNCH_BUTTON
00953   pPanelPageSetup->EnableLaunchButton(ID_PARA_PAGESETUP, -1, _T("sp"));
00954 #endif // ENABLE_RIBBON_LAUNCH_BUTTON
00955
00956   CMFCRibbonPanel* pPanelPageBackground = pCategory->AddPanel(_T("Page Background\nzb"), m_PanelImages.ExtractIcon(15));
00957
00958   pPanelPageBackground->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK, _T("Watermark\npw"), 10, 5));
00959
00960   CMFCRibbonColorButton* pPageBackBtn = new CMFCRibbonColorButton(ID_PAGELAYOUT_PAGEBACKGROUND_PAGECOLOR, _T("Page Color\npc"), TRUE, 11, 6);
00961
00962   pPageBackBtn->EnableOtherButton(_T("&More Colors..."), _T("More Shading Colors"));
00963   pPageBackBtn->SetColor(RGB(240, 240, 240));
00964   pPageBackBtn->SetDefaultCommand(FALSE);
00965   pPageBackBtn->SetColumns(10);
00966   pPageBackBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
00967   pPageBackBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE /* Contiguous Columns*/);
00968   pPageBackBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
00969   pPageBackBtn->SetColorBoxSize(CSize(17, 17));
00970   pPageBackBtn->EnableAutomaticButton(_T("&No Color"), RGB(255, 255, 255), TRUE, NULL, FALSE /* Bottom */);
00971
00972   pPanelPageBackground->Add(pPageBackBtn);
00973
00974   pPanelPageBackground->Add(new CMFCRibbonButton(ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS, _T("Page Borders\npb"), 12, 7));
00975   pPanelPageBackground->SetElementMenu(ID_PAGELAYOUT_PAGEBACKGROUND_WATERMARK, IDR_DUMMY_MENU);
00976
00977   CMFCRibbonPanel* pPanelParagraph = pCategory->AddPanel(_T("Paragraph\nzg"), m_PanelImages.ExtractIcon(16));
00978
00979   pPanelParagraph->Add(new CMFCRibbonLabel(_T("Indent")));
00980
00981   CMFCRibbonNumEdit* pEditIndentLeft = new CMFCRibbonNumEdit(ID_PAGELAYOUT_INDENT_LEFT, 72, _T("Left:\nil"), 13);
00982   pEditIndentLeft->EnableSpinButtons(0, 1000);
00983   pEditIndentLeft->SetEditText(_T("0"));
00984   pPanelParagraph->Add(pEditIndentLeft);
00985
00986   CMFCRibbonNumEdit* pEditIndentRight = new CMFCRibbonNumEdit(ID_PAGELAYOUT_INDENT_RIGHT, 72, _T("Right:\nir"), 14);
00987   pEditIndentRight->EnableSpinButtons(0, 1000);
00988   pEditIndentRight->SetEditText(_T("0"));
00989   pPanelParagraph->Add(pEditIndentRight);
00990
00991   pPanelParagraph->AddSeparator();
00992
00993   pPanelParagraph->Add(new CMFCRibbonLabel(_T("Spacing")));
00994
00995   CMFCRibbonNumEdit* pEditSpaceBefore = new CMFCRibbonNumEdit(ID_PAGELAYOUT_SPACE_BEFORE, 72, _T("Before:\nsb"), 15);
00996   pEditSpaceBefore->EnableSpinButtons(0, 100);
00997   pEditSpaceBefore->SetEditText(_T("0"));
00998   pPanelParagraph->Add(pEditSpaceBefore);
00999
01000   CMFCRibbonNumEdit* pEditSpaceAfter = new CMFCRibbonNumEdit(ID_PAGELAYOUT_SPACE_AFTER, 72, _T("After:\nsa"), 16);
01001   pEditSpaceAfter->EnableSpinButtons(0, 100);
01002   pEditSpaceAfter->SetEditText(_T("0"));
01003   pPanelParagraph->Add(pEditSpaceAfter);
01004
01005   pPanelParagraph->SetJustifyColumns();
01006
01007   CMFCRibbonPanel* pPanelArrange = AddPanelArrange(pCategory, 17, 17, 8);
01008
01009   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_COLUMNS_MORECOLUMNS, _T("More Columns"), 6));
01010
01011   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_BRINGFORWARD, _T("Bring Forward"), 26));
01012   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_BRINGINFRONTOFTEXT, _T("Bring in Front of Text"), 27));
01013   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_SENDBACKWARD, _T("Send Backward"), 28));
01014   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_SENDBEHINDTEXT, _T("Send Behind Text"), 29));
01015
01016   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_INLINEWITHTEXT, _T("In Line With Text"), 30));
01017   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_SQUARE, _T("Square"), 31));
01018   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_TIGHT, _T("Tight"), 32));
01019   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_BEHINDTEXT, _T("Behind Text"), 33));
01020   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_INFRONTOFTEXT, _T("In Front of Text"), 34));
01021   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_TOPANDBOTTOM, _T("Top and Bottom"), 35));
01022   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_THROUGH, _T("Through"), 36));
01023   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING_EDITWRAPPOINTS, _T("Edit Wrap Points"), 37));
01024   pCategory->AddHidden(new CMFCRibbonButton(ID_PAGELAYOUT_MORELAYOUTOPTIONS, _T("More Layout Options"), 38));
01025
01026   // Pane collapsing fine tuning:
01027   CArray<int, int> arCollapseOrder;
01028
01029   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelArrange));
01030   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelThemes));
01031   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageBackground));
01032   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageSetup));
01033   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
01034   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelArrange));
01035   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageSetup));
01036   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelArrange)); // Setting -1 to the next index
01037   arCollapseOrder.Add(-1); // means force panel collapse
01038   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelParagraph));
01039   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelThemes));
01040   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageBackground));
01041   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelPageSetup));
01042   arCollapseOrder.Add(-1);
01043
01044   pCategory->SetCollapseOrder(arCollapseOrder);
01045 }
01046
01047 void CMainFrame::AddTab_References()
01048 {
01049   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("References\ns"), IDB_REFERENCES, IDB_REFERENCESLARGE);
01050
01051   CMFCRibbonPanel* pPanelRef_TC = pCategory->AddPanel(_T("Table of Contents\nzc"), m_PanelImages.ExtractIcon(18));
01052
01053   CMFCRibbonButton* pBtn = new CMFCRibbonButton(ID_TABLE_OF_CONTENTS, _T("Table of Contents\nt"), 12, 0);
01054   pBtn->SetMenu(IDR_DUMMY_MENU);
01055   pPanelRef_TC->Add(pBtn);
01056
01057   pBtn = new CMFCRibbonButton(ID_REFERENCES_ADDTEXT, _T("Add Text\na"), 0, -1);
01058   pBtn->SetMenu(IDR_REFERENCES_ADDTEXT);
01059   pPanelRef_TC->Add(pBtn);
01060
01061   pPanelRef_TC->Add(new CMFCRibbonButton(ID_REFERENCES_TC_UPDATETABLE, _T("Update Table\nu"), 1, -1));
01062
01063   CMFCRibbonPanel* pPanelRef_Footnotes = pCategory->AddPanel(_T("Footnotes\nzf"), m_PanelImages.ExtractIcon(19));
01064
01065   pPanelRef_Footnotes->Add(new CMFCRibbonButton(ID_REFERENCES_FOOTNOTES_INSERTFOOTNOTE, _T("Insert Footnote\nf"), 13, 1));
01066   pPanelRef_Footnotes->Add(new CMFCRibbonButton(ID_REFERENCES_FOOTNOTES_INSERTENDNOTE, _T("Insert Endnote\ne"), 2, -1));
01067
01068   pBtn = new CMFCRibbonButton(ID_REFERENCES_FOOTNOTE_NEXT, _T("Next Footnote\no"), 3, -1);
01069   pBtn->SetMenu(IDR_REFERENCES_NEXTFOOTNOTE, TRUE);
01070   pPanelRef_Footnotes->Add(pBtn);
01071
01072   pPanelRef_Footnotes->Add(new CMFCRibbonButton(ID_REFERENCES_FOOTNOTES_SHOWNOTES, _T("Show Notes\nh"), 4, -1));
01073
01074   CMFCRibbonPanel* pPanelRef_CB = pCategory->AddPanel(_T("Citations & Bibliography\nzb"), m_PanelImages.ExtractIcon(20));
01075
01076   pBtn = new CMFCRibbonButton(ID_INSERT_CITATION, _T("Insert Citation\nc"), 14, 2);
01077   pBtn->SetMenu(IDR_REFERENCES_INSERTCITATION);
01078   pPanelRef_CB->Add(pBtn);
01079
01080   pPanelRef_CB->Add(new CMFCRibbonButton(ID_REFERENCES_CB_MANAGESOURCES, _T("Manage Sources\nm"), 5, -1));
01081
01082   // Add "Style" combo:
01083   CMFCRibbonComboBox* pStyleCombo = new CMFCRibbonComboBox(ID_REFERENCES_STYLE, TRUE, 45, _T("Style: \nl"), 6);
01084
01085   pStyleCombo->AddItem(_T("APA"));
01086   pStyleCombo->AddItem(_T("Style 1"));
01087   pStyleCombo->AddItem(_T("Style 2"));
01088   pStyleCombo->AddItem(_T("Style 3"));
01089   pStyleCombo->AddItem(_T("Style 4"));
01090   pStyleCombo->SelectItem(0);
01091   pStyleCombo->EnableDropDownListResize(FALSE);
01092
01093   pPanelRef_CB->Add(pStyleCombo);
01094
01095   pPanelRef_CB->Add(new CMFCRibbonButton(ID_REFERENCES_CB_INSERTBIBLIOGRAPHY, _T("Bibliography\nb"), 7, -1));
01096   pPanelRef_CB->SetElementMenu(ID_REFERENCES_CB_INSERTBIBLIOGRAPHY, IDR_DUMMY_MENU);
01097
01098   CMFCRibbonPanel* pPanelRef_Captions = pCategory->AddPanel(_T("Captions\nzp"), m_PanelImages.ExtractIcon(21));
01099
01100   pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_INSERTCAPTION, _T("Insert Caption\np"), 15, 3));
01101   pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_INSERTTOF, _T("Insert Table of Figures\ng"), 8, -1));
01102   pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_UPDATETABLE, _T("Update Table\nv"), 1, -1));
01103   pPanelRef_Captions->Add(new CMFCRibbonButton(ID_REFERENCES_CAPTIONS_CROSSREFERENCE, _T("Cross-reference\nrf"), 9, -1));
01104
01105   CMFCRibbonPanel* pPanelRef_Index = pCategory->AddPanel(_T("Index\nzi"), m_PanelImages.ExtractIcon(22));
01106
01107   pPanelRef_Index->Add(new CMFCRibbonButton(ID_REFERENCES_INDEX_MARKENTRY, _T("Mark Entry\nn"), 16, 4));
01108   pPanelRef_Index->Add(new CMFCRibbonButton(ID_REFERENCES_INDEX_INSERTINDEX, _T("Insert Index\nx"), 10, -1));
01109   pPanelRef_Index->Add(new CMFCRibbonButton(ID_REFERENCES_INDEX_UPDATEINDEX, _T("Update Index\nd"), 1, -1));
01110
01111   CMFCRibbonPanel* pPanelRef_TA = pCategory->AddPanel(_T("Table of Authorities\nza"), m_PanelImages.ExtractIcon(23));
01112
01113   pPanelRef_TA->Add(new CMFCRibbonButton(ID_REFERENCES_TA_MARKCITATION, _T("Mark Citation\ni"), 17, 5));
01114   pPanelRef_TA->Add(new CMFCRibbonButton(ID_REFERENCES_TA_INSERTTOA, _T("Insert Table of Authorities\nrt"), 11, -1));
01115   pPanelRef_TA->Add(new CMFCRibbonButton(ID_REFERENCES_TA_UPDATETABLE, _T("Update Table\nru"), 1, -1));
01116 }
01117
01118 void CMainFrame::AddTab_Mailings()
01119 {
01120   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Mailings\nm"), IDB_MAILINGS, IDB_MAILINGSLARGE);
01121
01122   CMFCRibbonPanel* pPanelCreate = pCategory->AddPanel(_T("Create\nzc"), m_PanelImages.ExtractIcon(24));
01123
01124   pPanelCreate->Add(new CMFCRibbonButton(ID_MAILINGS_CREATE, _T("Envelopes\ne"), 0, 0));
01125   pPanelCreate->Add(new CMFCRibbonButton(ID_MAILINGS_CREATELABELS, _T("Labels\nl"), 1, 1));
01126
01127   CMFCRibbonPanel* pPanelStartMerge = pCategory->AddPanel(_T("Start Mail Merge\nzs"), m_PanelImages.ExtractIcon(25));
01128
01129   CMFCRibbonButton* pMailMergeMenuBtn = new CMFCRibbonButton(ID_MAILINGS_STARTMAILMERGE, _T("Start Mail Merge\ns"), 2, 2);
01130   pMailMergeMenuBtn->SetMenu(IDR_MAIL_MERGE_MENU);
01131   pPanelStartMerge->Add(pMailMergeMenuBtn);
01132
01133   CMFCRibbonButton* pSelectRecipientMenuBtn = new CMFCRibbonButton(ID_MAILINGS_SELECTRECIPIENTS, _T("Select Recipients\nr"), 3, 3);
01134   pSelectRecipientMenuBtn->SetMenu(IDR_MAIL_RECIPIENTS_MENU);
01135   pPanelStartMerge->Add(pSelectRecipientMenuBtn);
01136
01137   pPanelStartMerge->Add(new CMFCRibbonButton(ID_MAILINGS_EDITRECIPIENTLIST, _T("Edit Recipient List\nd"), 4, 4));
01138
01139   CMFCRibbonPanel* pPanelWriteFields = pCategory->AddPanel(_T("Write & Insert Fields\nzw"), m_PanelImages.ExtractIcon(26));
01140
01141   pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_HIGHLIGHT, _T("Highlight Merge Fields\nh"), 5, 5));
01142   pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_ADDRESSBLOCK, _T("Address Block\na"), 6, 6));
01143   pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_GREETINGLINE, _T("Greeting Line\ng"), 7, 7));
01144   pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_INSERTMERGEDFIELD, _T("Insert Merge Field\ni"), 8, 8));
01145   pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_RULES, _T("Rules\nu"), 9));
01146   pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_MATCHFIELDS, _T("Match Fields\nt"), 10));
01147   pPanelWriteFields->Add(new CMFCRibbonButton(ID_MAILINGS_UPDATELABELS, _T("Update Labels\nb"), 11));
01148
01149   pPanelWriteFields->SetElementMenu(ID_MAILINGS_INSERTMERGEDFIELD, IDR_DUMMY_MENU, TRUE);
01150
01151   CMFCRibbonPanel* pPanelReview = pCategory->AddPanel(_T("Preview Results\nzp"), m_PanelImages.ExtractIcon(27));
01152
01153   pPanelReview->Add(new CMFCRibbonButton(ID_MAILINGS_VIEWMERGEDDATA, _T("Preview Results\np"), 12, 9));
01154   pPanelReview->AddSeparator();
01155
01156   std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsListRecords(new CMFCRibbonButtonsGroup);
01157
01158   apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_FIRSTRECORD, _T("\nq"), 16));
01159   apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_PREVIOUSRECORD, _T("\nm"), 17));
01160
01161   CMFCRibbonEdit* pEdit = new CMFCRibbonEdit(ID_MAILINGS_GOTORECORD, 40);
01162   pEdit->SetKeys(_T("w"));
01163   apButtonsListRecords->AddButton(pEdit);
01164
01165   apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_NEXTRECORD, _T("\nx"), 18));
01166   apButtonsListRecords->AddButton(new CMFCRibbonButton(ID_MAILINGS_LASTRECORD, _T("\nv"), 19));
01167
01168   pPanelReview->Add(apButtonsListRecords.release());
01169
01170   pPanelReview->Add(new CMFCRibbonButton(ID_MAILINGS_FINDRECIPIENT, _T("Find Recipient\nj"), 13));
01171   pPanelReview->Add(new CMFCRibbonButton(ID_MAILINGS_AUTOCHECHERRORS, _T("Auto Check for Errors\nk"), 14));
01172
01173   CMFCRibbonPanel* pPanelFinish = pCategory->AddPanel(_T("Finish\nzf"), m_PanelImages.ExtractIcon(28));
01174   pPanelFinish->Add(new CMFCRibbonButton(ID_MAILINGS_FINISH, _T("Finish && Merge\nf"), 15, 10));
01175
01176   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_TYPENEWLIST, _T("Type New List..."), 27));
01177   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_USEEXISTINGLIST, _T("Use Existing List..."), 28));
01178   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_SELECTFROMCONTACTS, _T("Select from Contacts..."), 29));
01179
01180   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_LETTERS, _T("Letters"), 20));
01181   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_EMAILMESSAGES, _T("E-mail Messages"), 21));
01182   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_ENVELOPES, _T("Envelops..."), 22));
01183   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_LABELS, _T("Labels..."), 23));
01184   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_DIRECTORY, _T("Directory"), 24));
01185   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_NORMALDOCUMENT, _T("Normal Document"), 25));
01186   pCategory->AddHidden(new CMFCRibbonButton(ID_MAILINGS_STEPBYSTEPMAILMERGEWIZARD, _T("Step by Step Mail Merge Wizard..."), 26));
01187 }
01188
01189 void CMainFrame::AddTab_Review()
01190 {
01191   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Review\nr"), IDB_REVIEW, IDB_REVIEWLARGE);
01192
01193   CMFCRibbonPanel* pPanelProofing = pCategory->AddPanel(_T("Proofing\nzp"), m_PanelImages.ExtractIcon(29));
01194
01195   pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_SPELLINGGRAMMAR, _T("Spelling && Grammar\ns"), 0, 0));
01196   pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_RESEARCH, _T("Research\nr"), 1, 1));
01197   pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_THESAURUS, _T("Thesaurus\ne"), 2, 2));
01198   pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_TRANSLATE, _T("Translate\nl"), 3, 3));
01199   pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP, _T("Translation ScreenTip\npt"), 4, -1));
01200   pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_SETLANGUAGE, _T("Set Language\nu"), 5, -1));
01201   pPanelProofing->Add(new CMFCRibbonButton(ID_REVIEW_PROOFING_WORDCOUNT, _T("Word Count\nw"), 6, -1));
01202
01203   pPanelProofing->SetElementMenu(ID_REVIEW_PROOFING_TRANSLATIONSCREENTIP, IDR_DUMMY_MENU);
01204
01205   CMFCRibbonPanel* pPanelComments = pCategory->AddPanel(_T("Comments\nzc"), m_PanelImages.ExtractIcon(30));
01206
01207   pPanelComments->Add(new CMFCRibbonButton(ID_REVIEW_COMMENTS_NEWCOMMENT, _T("New Comment\nc"), 7, 4));
01208
01209   CMFCRibbonButton* pDeleteBtn = new CMFCRibbonButton(ID_REVIEW_COMMENTS_DELETE, _T("Delete\nd"), 8, 5);
01210   pDeleteBtn->SetMenu(IDR_REVIEW_COMMENTS_DELETE, TRUE);
01211   pPanelComments->Add(pDeleteBtn);
01212
01213   pPanelComments->Add(new CMFCRibbonButton(ID_REVIEW_COMMENTS_PREVIOUS, _T("Previous\nzv"), 9, 6));
01214   pPanelComments->Add(new CMFCRibbonButton(ID_REVIEW_COMMENTS_NEXT, _T("Next\nzn"), 10, 7));
01215
01216   CMFCRibbonPanel* pPanelTracking = pCategory->AddPanel(_T("Tracking\nzt"), m_PanelImages.ExtractIcon(31));
01217
01218   CMFCRibbonButton* pTCButton = new CMFCRibbonButton(ID_REVIEW_TRACKING_TRACKCHANGES, _T("Track Changes\ng"), 11, 8);
01219   pTCButton->SetMenu(IDR_REVIEW_TRACKING_TRACKCHANGES, TRUE);
01220   pTCButton->SetAlwaysLargeImage();
01221   pPanelTracking->Add(pTCButton);
01222
01223   CMFCRibbonButton* pBalloonsBtn = new CMFCRibbonButton(ID_REVIEW_TRACKING_BALLOONS, _T("Balloons\ntb"), 12, 9);
01224   pBalloonsBtn->SetMenu(IDR_REVIEW_TRACKING_BALLOONS);
01225   pBalloonsBtn->SetAlwaysLargeImage();
01226   pPanelTracking->Add(pBalloonsBtn);
01227
01228   CMFCRibbonComboBox* pDisplayCombo = new CMFCRibbonComboBox(ID_REVIEW_TRACKING_DISPLAYFORREVIEW, FALSE, 149, NULL, 13);
01229   pDisplayCombo->EnableDropDownListResize(FALSE);
01230   pDisplayCombo->AddItem(_T("Final Showing Markup"));
01231   pDisplayCombo->AddItem(_T("Final"));
01232   pDisplayCombo->AddItem(_T("Original Showing Markup"));
01233   pDisplayCombo->AddItem(_T("Original"));
01234   pDisplayCombo->SelectItem(0);
01235   pDisplayCombo->SetKeys(_T("td"));
01236   pPanelTracking->Add(pDisplayCombo);
01237
01238   CMFCRibbonButton* pShowBtn = new CMFCRibbonButton(ID_REVIEW_TRACKING_SHOW_MARKUP, _T("Show Markup\ntm"), 14, -1);
01239   pShowBtn->SetMenu(IDR_REVIEW_TRACKING_SHOW);
01240   pPanelTracking->Add(pShowBtn);
01241
01242   CMFCRibbonButton* pPaneBtn = new CMFCRibbonButton(ID_REVIEW_TRACKING_REVIEWINGPANE, _T("Reviewing Pane\ntp"), 15, -1);
01243   pPaneBtn->SetMenu(IDR_REVIEW_TRACKING_REVIEWINGPANE, TRUE);
01244   pPanelTracking->Add(pPaneBtn);
01245
01246   CMFCRibbonPanel* pPanelChanges = pCategory->AddPanel(_T("Changes\nzh"), m_PanelImages.ExtractIcon(32));
01247
01248   pPanelChanges->SetCenterColumnVert();
01249
01250   CMFCRibbonButton* pAcceptBtn = new CMFCRibbonButton(ID_REVIEW_CHANGES_ACCEPT, _T("Accept\na"), 16, 10);
01251   pAcceptBtn->SetMenu(IDR_REVIEW_CHANGES_ACCEPT, TRUE);
01252   pPanelChanges->Add(pAcceptBtn);
01253
01254   CMFCRibbonButton* pRejectBtn = new CMFCRibbonButton(ID_REVIEW_CHANGES_REJECT, _T("Reject\nj"), 17, 11);
01255   pRejectBtn->SetMenu(IDR_REVIEW_CHANGES_REJECT, TRUE);
01256   pPanelChanges->Add(pRejectBtn);
01257
01258   pPanelChanges->Add(new CMFCRibbonButton(ID_REVIEW_CHANGES_PREVIOUS, _T("Previous\nf"), 18, -1));
01259   pPanelChanges->Add(new CMFCRibbonButton(ID_REVIEW_CHANGES_NEXT, _T("Next\nh"), 19, -1));
01260
01261   CMFCRibbonPanel* pPanelCompare = pCategory->AddPanel(_T("Compare\nzm"), m_PanelImages.ExtractIcon(33));
01262
01263   CMFCRibbonButton* pCompareBtn = new CMFCRibbonButton(ID_REVIEW_COMPARE_COMPARE, _T("Compare\nm"), 20, 12);
01264   pCompareBtn->SetMenu(IDR_REVIEW_COMPARE_COMPARE_COMPARE);
01265   pPanelCompare->Add(pCompareBtn);
01266
01267   CMFCRibbonButton* pShowSrcBtn = new CMFCRibbonButton(ID_REVIEW_COMPARE_SHOWSOURCE, _T("Show Source Documents\no"), 21, 13);
01268   pShowSrcBtn->SetMenu(IDR_REVIEW_COMPARE_SHOWSOURCE);
01269   pPanelCompare->Add(pShowSrcBtn);
01270
01271   CMFCRibbonPanel* pPanelProtect = pCategory->AddPanel(_T("Protect\nzr"), m_PanelImages.ExtractIcon(34));
01272
01273   pPanelProtect->Add(new CMFCRibbonButton(ID_REVIEW_PROTECT, _T("Protect Document\npr"), 22, 14));
01274
01275   pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_TRACKING_REVIEWINGPANE_VERTICAL, _T("Reviewing Pane Vertical\nrv"), 15));
01276   pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_TRACKING_REVIEWINGPANE_HORIZONTAL, _T("Reviewing Pane Horizontal\nrh"), 23));
01277   pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_CHANGES_ACCEPT_CHANGE, _T("Accept Change\nac"), 16));
01278   pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_CHANGES_REJECT_CHANGE, _T("Reject Change\nrc"), 17));
01279
01280   pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_COMPARE_COMPARE_COMPARE, _T("Compare\ncp"), 24));
01281   pCategory->AddHidden(new CMFCRibbonButton(ID_REVIEW_COMPARE_COMPARE_COMBINE, _T("Combine\ncb"), 25));
01282 }
01283
01284 void CMainFrame::AddTab_View()
01285 {
01286   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("View\nw"), IDB_VIEW, IDB_VIEWLARGE);
01287
01288   CMFCRibbonPanel* pPanelDocViews = pCategory->AddPanel(_T("Document Views\nzv"), m_PanelImages.ExtractIcon(35));
01289
01290   pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_PRINTLAYOUT, _T("Print Layout\np"), 7, 0));
01291   pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_FULLSCREEN, _T("Full Screen Reading\nf"), 4, 1));
01292   pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_WEBLAYOUT, _T("Web Layout\nl"), 12, 2));
01293   pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_OUTLINE, _T("Outline\nu"), 6, 3));
01294   pPanelDocViews->Add(new CMFCRibbonButton(ID_VIEW_DRAFT, _T("Draft\ne"), 3, 4));
01295
01296   CMFCRibbonPanel* pPanelShowHide = pCategory->AddPanel(_T("Show/Hide\nzs"), m_PanelImages.ExtractIcon(36));
01297
01298   pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_RULER, _T("Ruler\nr")));
01299   pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_GRIDLINES, _T("Gridlines\ng")));
01300   pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_MESSAGEBAR, _T("Message Bar\nd")));
01301   pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_DOCUMENTMAP, _T("Document Map\nvm")));
01302   pPanelShowHide->Add(new CMFCRibbonCheckBox(ID_VIEW_TRUMBNAILS, _T("Thumbnails\nh")));
01303
01304   CMFCRibbonPanel* pPanelZoom = pCategory->AddPanel(_T("Zoom\nzz"), m_PanelImages.ExtractIcon(37));
01305
01306   pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM, _T("Zoom\nq"), 13, 5));
01307   pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_100, _T("100%\nj"), 2, 10));
01308   pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_ONE_PAGE, _T("One Page\n1"), 14));
01309   pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_TWO_PAGES, _T("Two Pages\n2"), 15));
01310   pPanelZoom->Add(new CMFCRibbonButton(ID_VIEW_ZOOM_PAGE_WIDTH, _T("Page Width\ni"), 16));
01311
01312   CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel(_T("Window\nzw"), m_PanelImages.ExtractIcon(38));
01313
01314   pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_NEWWINDOW, _T("New Window\nn"), 5, 6));
01315   pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_ARRANGEALL, _T("Arrange All\na"), 0, 7));
01316   pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_SPLIT, _T("Split\ns"), 9, 8));
01317   pPanelWindow->AddSeparator();
01318   pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_COMPARE, _T("View Side by Side\nb"), 11));
01319   pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_SYNCSCROLLING, _T("Synchronous Scrolling\nvs"), 10));
01320   pPanelWindow->Add(new CMFCRibbonButton(ID_VIEW_RESETWINDOW, _T("Reset Window Position\nt"), 8));
01321   pPanelWindow->AddSeparator();
01322
01323   CMFCRibbonButton* pWindowsBtn = new CMFCRibbonButton(ID_VIEW_SWITCHWINDOW, _T("Switch Windows\nw"), 1, 9);
01324   pWindowsBtn->SetAlwaysLargeImage();
01325   pWindowsBtn->SetMenu(IDR_DUMMY_MENU);
01326   pPanelWindow->Add(pWindowsBtn);
01327
01328   CMFCRibbonPanel* pPanelMacros = pCategory->AddPanel(_T("Macros\nzm"), m_PanelImages.ExtractIcon(39));
01329   pPanelMacros->Add(new CMFCRibbonButton(ID_VIEW_MACROS, _T("Macros\nm"), -1, 11));
01330
01331   // Pane collapsing fine tuning:
01332   CArray<int, int> arCollapseOrder;
01333
01334   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelWindow));
01335   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelDocViews));
01336   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelWindow));
01337   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelZoom));
01338   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelShowHide));
01339   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelZoom));
01340   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelWindow));
01341   arCollapseOrder.Add(-1); // Force PanelWindow collapse
01342   arCollapseOrder.Add(pCategory->GetPanelIndex(pPanelDocViews));
01343   arCollapseOrder.Add(-1); // Force PanelDocViews collapse
01344
01345   pCategory->SetCollapseOrder(arCollapseOrder);
01346 }
01347
01348 void CMainFrame::AddTab_Developer()
01349 {
01350   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("Developer\nl"), 0, 0);
01351
01352   pCategory->SetData(idTabDeveloper);
01353 }
01354
01355 void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
01356 {
01357   CFrameWndEx::OnGetMinMaxInfo(lpMMI);
01358
01359   ASSERT(lpMMI != NULL);
01360
01361   lpMMI->ptMinTrackSize.y = GetSystemMetrics(SM_CXFIXEDFRAME) * 3 + GetSystemMetrics(SM_CYCAPTION);
01362
01363   lpMMI->ptMinTrackSize.x = GetSystemMetrics(SM_CYCAPTION) * 2 + GetSystemMetrics(SM_CXFIXEDFRAME) * 2 + GetSystemMetrics(SM_CXSIZE) * 3;
01364 }
01365
01366 CMFCToolBarImages* CMainFrame::GetTooltipImage(UINT uiID)
01367 {
01368   if (!theApp.m_bShowToolTipDescr)
01369   {
01370     return NULL;
01371   }
01372
01373   UINT uiResID = 0;
01374
01375   switch (uiID)
01376   {
01377   case ID_MAIN_BUTTON:
01378     uiResID = IDB_TOOLTIP_MAIN;
01379     break;
01380
01381   case ID_WRITE_CLIPBOARD:
01382     uiResID = IDB_TOOLTIP_CLIPBOARD;
01383     break;
01384
01385   case ID_WRITE_FONT:
01386     uiResID = IDB_TOOLTIP_FONTDLG;
01387     break;
01388
01389   case ID_WRITE_PARAGRAPH:
01390     uiResID = IDB_TOOLTIP_PARAGRAPH;
01391     break;
01392   }
01393
01394   if (uiResID == 0)
01395   {
01396     return NULL;
01397   }
01398
01399   CMFCToolBarImages* pBmp = NULL;
01400
01401   if (!m_TooltipImages.Lookup(uiID, pBmp))
01402   {
01403     pBmp = new CMFCToolBarImages;
01404     pBmp->Load(uiResID);
01405     pBmp->SetSingleImage();
01406
01407     m_TooltipImages.SetAt(uiID, pBmp);
01408   }
01409
01410   return pBmp;
01411 }
01412
01413 void CMainFrame::AdjustClientArea()
01414 {
01415   if (m_pPrintPreviewFrame != NULL)
01416   {
01417     CFrameWndEx::AdjustClientArea();
01418     return;
01419   }
01420
01421   CWnd* pChildWnd = GetDlgItem(AFX_IDW_PANE_FIRST);
01422   if (pChildWnd != NULL)
01423   {
01424     CRect rectClientAreaBounds = m_dockManager.GetClientAreaBounds();
01425
01426     rectClientAreaBounds.left += m_rectBorder.left;
01427     rectClientAreaBounds.top  += m_rectBorder.top;
01428     rectClientAreaBounds.right -= m_rectBorder.right;
01429     rectClientAreaBounds.bottom -= m_rectBorder.bottom;
01430
01431     if (rectClientAreaBounds.Width() > 100 && rectClientAreaBounds.Height() > 100)
01432     {
01433       m_rectFill = rectClientAreaBounds;
01434       rectClientAreaBounds.DeflateRect(40, 20, 40, 20);
01435     }
01436     else
01437     {
01438       m_rectFill.SetRectEmpty();
01439     }
01440
01441     pChildWnd->CalcWindowRect(rectClientAreaBounds);
01442
01443     if (!pChildWnd->IsKindOf(RUNTIME_CLASS(CSplitterWnd)))
01444     {
01445       pChildWnd->ModifyStyle(0, WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
01446
01447       if (!m_rectFill.IsRectEmpty())
01448       {
01449         pChildWnd->ModifyStyleEx(WS_EX_CLIENTEDGE, 0);
01450         pChildWnd->ModifyStyle(0, WS_BORDER);
01451       }
01452     }
01453     else
01454     {
01455       pChildWnd->ModifyStyle(0, WS_CLIPSIBLINGS);
01456     }
01457
01458     pChildWnd->SetWindowPos(&wndBottom, rectClientAreaBounds.left, rectClientAreaBounds.top, rectClientAreaBounds.Width(), rectClientAreaBounds.Height(), SWP_NOACTIVATE);
01459   }
01460
01461   if (!m_rectFill.IsRectEmpty())
01462   {
01463     RedrawWindow(m_rectFill);
01464   }
01465 }
01466
01467 void CMainFrame::OnPaint()
01468 {
01469   if (m_rectFill.IsRectEmpty())
01470   {
01471     Default();
01472     return;
01473   }
01474
01475   CPaintDC dc(this); // device context for painting
01476
01477   CRect rectChild;
01478   rectChild.SetRectEmpty();
01479
01480   CWnd* pChildWnd = GetDlgItem(AFX_IDW_PANE_FIRST);
01481   if (pChildWnd != NULL)
01482   {
01483     pChildWnd->GetWindowRect(rectChild);
01484     ScreenToClient(rectChild);
01485   }
01486
01487   CRect rectScreen;
01488
01489   MONITORINFO mi;
01490   mi.cbSize = sizeof(MONITORINFO);
01491   if (GetMonitorInfo(MonitorFromPoint(CPoint(0, 0), MONITOR_DEFAULTTONEAREST), &mi))
01492   {
01493     rectScreen = mi.rcWork;
01494   }
01495   else
01496   {
01497     ::SystemParametersInfo(SPI_GETWORKAREA, 0, &rectScreen, 0);
01498   }
01499
01500   if (m_MemBitmap.GetSafeHandle() != NULL)
01501   {
01502     BITMAP bmp;
01503     m_MemBitmap.GetBitmap(&bmp);
01504
01505     if (bmp.bmWidth != rectScreen.Width() || bmp.bmHeight != rectScreen.Height())
01506     {
01507       m_MemBitmap.DeleteObject();
01508     }
01509   }
01510
01511   if (m_MemBitmap.GetSafeHandle() == NULL)
01512   {
01513     CDC dcMem;
01514     dcMem.CreateCompatibleDC(&dc);
01515
01516     m_MemBitmap.CreateCompatibleBitmap(&dc, rectScreen.Width(), rectScreen.Height());
01517
01518     CBitmap* pBmpOld = dcMem.SelectObject(&m_MemBitmap);
01519
01520     CDrawingManager dm(dcMem);
01521
01522     rectScreen.OffsetRect(-rectScreen.TopLeft());
01523
01524     switch (theApp.m_nAppLook)
01525     {
01526     case ID_VIEW_APPLOOK_2003:
01527       ::FillRect(dcMem.GetSafeHdc(), rectScreen, ::GetSysColorBrush(COLOR_APPWORKSPACE));
01528       break;
01529
01530     case ID_VIEW_APPLOOK_WIN7:
01531       dm.FillGradient(rectScreen, RGB (197, 207, 223), RGB (219, 228, 241), TRUE);
01532       break;
01533
01534     case ID_VIEW_APPLOOK_2007_3:
01535       dm.FillGradient(rectScreen, RGB(114, 125, 152), RGB(178, 185, 202), TRUE);
01536       break;
01537
01538     default:
01539       {
01540         const BOOL bLuna     = theApp.m_nAppLook == ID_VIEW_APPLOOK_2007_1;
01541         const BOOL bObsidian = theApp.m_nAppLook == ID_VIEW_APPLOOK_2007_2;
01542
01543         CMFCControlRenderer& pat = bLuna ? m_Pat[1] : bObsidian ? m_Pat[2] : m_Pat[3];
01544
01545         COLORREF clrF = bLuna ? RGB(136, 170, 214) : bObsidian ? RGB( 71,  71,  71) : RGB(164, 170, 186);
01546         COLORREF clrM = bLuna ? RGB( 86, 125, 176) : bObsidian ? RGB( 56,  56,  56) : RGB(156, 160, 167);
01547         COLORREF clrL = bLuna ? RGB(101, 145, 205) : bObsidian ? RGB( 11,  11,  11) : RGB(204, 207, 216);
01548
01549         const CSize szPat = pat.GetParams().m_rectImage.Size();
01550
01551         CRect rectPat = rectScreen;
01552
01553         rectPat.bottom = rectPat.top + szPat.cy;
01554
01555         CRect rectGradient = rectScreen;
01556         rectGradient.top += szPat.cy;
01557
01558         if (rectGradient.Height() < 50 ||
01559           (rectGradient.Height() - 120) < 50)
01560         {
01561           rectGradient.bottom = rectGradient.top + 50;
01562         }
01563         else
01564         {
01565           rectGradient.bottom -= 120;
01566         }
01567
01568         dm.FillGradient(rectGradient, clrM, clrF, TRUE);
01569
01570         if (rectGradient.bottom < rectScreen.bottom)
01571         {
01572           rectGradient.top    = rectGradient.bottom;
01573           rectGradient.bottom = rectScreen.bottom;
01574
01575           dm.FillGradient(rectGradient, clrL, clrM, TRUE);
01576         }
01577
01578         pat.Draw(&dcMem, rectPat, 0);
01579       }
01580     }
01581
01582     dcMem.SelectObject(pBmpOld);
01583   }
01584
01585   CRect rectFill = m_rectFill;
01586
01587   if (!m_rectSizing.IsRectEmpty())
01588   {
01589     dc.FillRect(m_rectSizing, &afxGlobalData.brBarFace);
01590     rectFill.right += m_rectSizing.Width();
01591   }
01592
01593   dc.DrawState(rectFill.TopLeft(), rectFill.Size(), &m_MemBitmap, DSS_NORMAL);
01594 }
01595
01596 BOOL CMainFrame::OnEraseBkgnd(CDC* pDC)
01597 {
01598   return TRUE;
01599 }
01600
01601 void CMainFrame::OnSizing(UINT fwSide, LPRECT pRect)
01602 {
01603   CRect rectOld;
01604   GetWindowRect(rectOld);
01605
01606   CRect rectNew = pRect;
01607
01608   if (rectNew.right > rectOld.right)
01609   {
01610     m_rectSizing = rectNew;
01611     m_rectSizing.left = rectOld.right;
01612
01613     ScreenToClient(m_rectSizing);
01614   }
01615   else
01616   {
01617     m_rectSizing.SetRectEmpty();
01618   }
01619
01620   CFrameWndEx::OnSizing(fwSide, pRect);
01621 }
01622
01623 void CMainFrame::OnSize(UINT nType, int cx, int cy)
01624 {
01625   CFrameWndEx::OnSize(nType, cx, cy);
01626
01627   if (nType == SIZE_MAXIMIZED || nType == SIZE_RESTORED)
01628   {
01629     RedrawWindow(NULL, NULL, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW);
01630   }
01631 }
01632
01633 void CMainFrame::CreateDocumentColors()
01634 {
01635   typedef struct
01636   {
01637     COLORREF color;
01638     TCHAR* szName;
01639   }
01640   ColorTableEntry;
01641
01642   int i = 0;
01643   int nNumColours = 0;
01644
01645   static ColorTableEntry colorsMain [] =
01646   {
01647     { RGB (255, 255, 255),  _T("White, Background 1") },
01648     { RGB (0, 0, 0),      _T("Black, Text 1")     },
01649     { RGB (238, 236, 225),  _T("Tan, Background 2")   },
01650     { RGB (31, 73, 125),    _T("Dark Blue, Text 2")   },
01651     { RGB (79, 129, 189),   _T("Blue, Accent 1")    },
01652     { RGB (192, 80, 77),    _T("Red, Accent 2")     },
01653     { RGB (155, 187, 89),   _T("Olive Green, Accent 3") },
01654     { RGB (128, 100, 162),  _T("Purple, Accent 4")    },
01655     { RGB (75, 172, 198),   _T("Aqua, Accent 5")    },
01656     { RGB (245, 150, 70),   _T("Orange, Accent 6")    }
01657   };
01658
01659   static ColorTableEntry colorsAdditional [] =
01660   {
01661     { RGB (242, 242, 242),  _T("White, Background 1, Darker 5%")  },
01662     { RGB (127, 127, 127),  _T("Black, Text 1, Lighter 50%")    },
01663     { RGB (214, 212, 202),  _T("Tan, Background 2, Darker 10%")   },
01664     { RGB (210, 218, 229),  _T("Dark Blue, Text 2, Lighter 80%")  },
01665     { RGB (217, 228, 240),  _T("Blue, Accent 1, Lighter 80%")   },
01666     { RGB (244, 219, 218),  _T("Red, Accent 2, Lighter 80%")    },
01667     { RGB (234, 241, 221),  _T("Olive Green, Accent 3, Lighter 80%")},
01668     { RGB (229, 223, 235),  _T("Purple, Accent 4, Lighter 80%")   },
01669     { RGB (216, 237, 242),  _T("Aqua, Accent 5, Lighter 80%")   },
01670     { RGB (255, 234, 218),  _T("Orange, Accent 6, Lighter 80%")   },
01671
01672     { RGB (215, 215, 215),  _T("White, Background 1, Darker 15%") },
01673     { RGB (89, 89, 89),   _T("Black, Text 1, Lighter 35%")    },
01674     { RGB (177, 176, 167),  _T("Tan, Background 2, Darker 25%")   },
01675     { RGB (161, 180, 201),  _T("Dark Blue, Text 2, Lighter 60%")  },
01676     { RGB (179, 202, 226),  _T("Blue, Accent 1, Lighter 60%")   },
01677     { RGB (233, 184, 182),  _T("Red, Accent 2, Lighter 60%")    },
01678     { RGB (213, 226, 188),  _T("Olive Green, Accent 3, Lighter 60%")},
01679     { RGB (203, 191, 215),  _T("Purple, Accent 4, Lighter 60%")   },
01680     { RGB (176, 220, 231),  _T("Aqua, Accent 5, Lighter 60%")   },
01681     { RGB (255, 212, 181),  _T("Orange, Accent 6, Lighter 60%")   },
01682
01683     { RGB (190, 190, 190),  _T("White, Background 1, Darker 25%") },
01684     { RGB (65, 65, 65),   _T("Black, Text 1, Lighter 25%")    },
01685     { RGB (118, 117, 112),  _T("Tan, Background 2, Darker 35%")   },
01686     { RGB (115, 143, 175),  _T("Dark Blue, Text 2, Lighter 40%")  },
01687     { RGB (143, 177, 213),  _T("Blue, Accent 1, Lighter 40%")   },
01688     { RGB (222, 149, 147),  _T("Red, Accent 2, Lighter 40%")    },
01689     { RGB (192, 213, 155),  _T("Olive Green, Accent 3, Lighter 40%")},
01690     { RGB (177, 160, 197),  _T("Purple, Accent 4, Lighter 40%")   },
01691     { RGB (137, 203, 218),  _T("Aqua, Accent 5, Lighter 40%")   },
01692     { RGB (255, 191, 145),  _T("Orange, Accent 6, Lighter 40%")   },
01693
01694     { RGB (163, 163, 163),  _T("White, Background 1, Darker 35%") },
01695     { RGB (42, 42, 42),   _T("Black, Text 1, Lighter 15%")    },
01696     { RGB (61, 61, 59),   _T("Tan, Background 2, Darker 50%")   },
01697     { RGB (20, 57, 92),   _T("Dark Blue, Text 2, Darker 25%")   },
01698     { RGB (54, 96, 139),    _T("Blue, Accent 1, Darker 25%")    },
01699     { RGB (149, 63, 60),    _T("Red, Accent 2, Darker 25%")     },
01700     { RGB (114, 139, 71),   _T("Olive Green, Accent 3, Darker 25%") },
01701     { RGB (97, 76, 119),    _T("Purple, Accent 4, Darker 25%")    },
01702     { RGB (41, 128, 146),   _T("Aqua, Accent 5, Darker 25%")    },
01703     { RGB (190, 112, 59),   _T("Orange, Accent 6, Darker 25%")    },
01704
01705     { RGB (126, 126, 126),  _T("White, Background 1, Darker 50%") },
01706     { RGB (20, 20, 20),   _T("Black, Text 1, Lighter 5%")     },
01707     { RGB (29, 29, 28),   _T("Tan, Background 2, Darker 90%")   },
01708     { RGB (17, 40, 64),   _T("Dark Blue, Text 2, Darker 50%")   },
01709     { RGB (38, 66, 94),   _T("Blue, Accent 1, Darker 50%")    },
01710     { RGB (100, 44, 43),    _T("Red, Accent 2, Darker 50%")     },
01711     { RGB (77, 93, 49),   _T("Olive Green, Accent 3, Darker 50%") },
01712     { RGB (67, 53, 81),   _T("Purple, Accent 4, Darker 50%")    },
01713     { RGB (31, 86, 99),   _T("Aqua, Accent 5, Darker 50%")    },
01714     { RGB (126, 77, 42),    _T("Orange, Accent 6, Darker 50%")    },
01715   };
01716
01717   static ColorTableEntry colorsStandard [] =
01718   {
01719     { RGB (200, 15, 18),    _T("Dark Red")    },
01720     { RGB (255, 20, 24),    _T("Red")     },
01721     { RGB (255, 191, 40),   _T("Orange")    },
01722     { RGB (255, 255, 49),   _T("Yellow")    },
01723     { RGB (138, 207, 87),   _T("Light Green") },
01724     { RGB (0, 175, 84),   _T("Green")     },
01725     { RGB (0, 174, 238),    _T("Light Blue")  },
01726     { RGB (0, 111, 189),    _T("Blue")      },
01727     { RGB (0, 36, 95),    _T("Black")     },
01728     { RGB (114, 50, 157),   _T("Purple")    },
01729   };
01730
01731   m_lstMainColors.RemoveAll();
01732   nNumColours = sizeof(colorsMain) / sizeof(ColorTableEntry);
01733
01734   for (i = 0; i < nNumColours; i++)
01735   {
01736     m_lstMainColors.AddTail(colorsMain [i].color);
01737     CMFCRibbonColorButton::SetColorName(colorsMain [i].color, colorsMain [i].szName);
01738   };
01739
01740   m_lstAdditionalColors.RemoveAll();
01741   nNumColours = sizeof(colorsAdditional) / sizeof(ColorTableEntry);
01742
01743   for (i = 0; i < nNumColours; i++)
01744   {
01745     m_lstAdditionalColors.AddTail(colorsAdditional [i].color);
01746     CMFCRibbonColorButton::SetColorName(colorsAdditional [i].color, colorsAdditional [i].szName);
01747   };
01748
01749   m_lstStandardColors.RemoveAll();
01750   nNumColours = sizeof(colorsStandard) / sizeof(ColorTableEntry);
01751
01752   for (i = 0; i < nNumColours; i++)
01753   {
01754     m_lstStandardColors.AddTail(colorsStandard [i].color);
01755     CMFCRibbonColorButton::SetColorName(colorsStandard [i].color, colorsStandard [i].szName);
01756   };
01757 }
01758
01759 void CMainFrame::CreateStyleList()
01760 {
01761   m_arStyles.RemoveAll();
01762   m_arStyleSets.RemoveAll();
01763
01764   m_arStyles.Add( _T("¶ Normal"));
01765   m_arStyles.Add( _T("¶ No Spacing"));
01766   m_arStyles.Add( _T("Heading 1"));
01767   m_arStyles.Add( _T("Heading 2"));
01768   m_arStyles.Add( _T("Heading 3"));
01769   m_arStyles.Add( _T("Title"));
01770   m_arStyles.Add( _T("Subtitle"));
01771   m_arStyles.Add( _T("Subtle Emphasis"));
01772   m_arStyles.Add( _T("Emphasis"));
01773   m_arStyles.Add( _T("Intense Emphasis"));
01774   m_arStyles.Add( _T("Strong"));
01775   m_arStyles.Add( _T("Quote"));
01776   m_arStyles.Add( _T("Intense Quote"));
01777   m_arStyles.Add( _T("Subtle Reference"));
01778   m_arStyles.Add( _T("Intense Reference"));
01779   m_arStyles.Add( _T("Book Title"));
01780   m_arStyles.Add( _T("¶ List Paragraph"));
01781   m_arStyles.Add( _T("¶ Caption"));
01782
01783   m_arStyleSets.Add(_T("Default(Black and White)"));
01784   m_arStyleSets.Add(_T("Elegant"));
01785   m_arStyleSets.Add(_T("Fancy"));
01786   m_arStyleSets.Add(_T("Formal"));
01787   m_arStyleSets.Add(_T("Manuscript"));
01788   m_arStyleSets.Add(_T("Modern"));
01789   m_arStyleSets.Add(_T("Simple"));
01790   m_arStyleSets.Add(_T("Traditional"));
01791 };
01792
01793 void CMainFrame::CreateThemeList()
01794 {
01795   m_arThemes.RemoveAll();
01796   m_arColorThemes.RemoveAll();
01797
01798   m_arThemes.Add(_T("Office"));
01799   m_arThemes.Add(_T("Apex"));
01800   m_arThemes.Add(_T("Aspect"));
01801   m_arThemes.Add(_T("Civic"));
01802   m_arThemes.Add(_T("Concource"));
01803   m_arThemes.Add(_T("Equite"));
01804   m_arThemes.Add(_T("Flow"));
01805   m_arThemes.Add(_T("Foundry"));
01806   m_arThemes.Add(_T("Median"));
01807   m_arThemes.Add(_T("Metro"));
01808   m_arThemes.Add(_T("Module"));
01809   m_arThemes.Add(_T("Opulent"));
01810   m_arThemes.Add(_T("Oriel"));
01811   m_arThemes.Add(_T("Origin"));
01812   m_arThemes.Add(_T("Paper"));
01813   m_arThemes.Add(_T("Solstice"));
01814   m_arThemes.Add(_T("Technic"));
01815   m_arThemes.Add(_T("Trek"));
01816   m_arThemes.Add(_T("Urban"));
01817   m_arThemes.Add(_T("Verve"));
01818
01819   m_arColorThemes.Copy(m_arThemes);
01820   m_arColorThemes.InsertAt(1, _T("Grayscale"));
01821 }
01822
01823 void CMainFrame::CreateFontsList()
01824 {
01825   m_arFonts.RemoveAll();
01826
01827   {
01828     CRibbonListFontButton::XItem item;
01829
01830     item.m_Caption = _T("Office Classic");
01831     _tcscpy_s(item.m_Font[0].lfFaceName, _countof(item.m_Font[0].lfFaceName), _T("Arial"));
01832     _tcscpy_s(item.m_Font[1].lfFaceName, _countof(item.m_Font[1].lfFaceName), _T("Times New Roman"));
01833
01834     m_arFonts.Add(item);
01835   }
01836
01837   {
01838     CRibbonListFontButton::XItem item;
01839
01840     item.m_Caption = _T("Office Classic 2");
01841     _tcscpy_s(item.m_Font[0].lfFaceName, _countof(item.m_Font[0].lfFaceName), _T("Arial"));
01842     _tcscpy_s(item.m_Font[1].lfFaceName, _countof(item.m_Font[1].lfFaceName), _T("Arial"));
01843
01844     m_arFonts.Add(item);
01845   }
01846
01847   {
01848     CRibbonListFontButton::XItem item;
01849
01850     item.m_Caption = _T("Aspect");
01851     _tcscpy_s(item.m_Font[0].lfFaceName, _countof(item.m_Font[0].lfFaceName), _T("Verdana"));
01852     _tcscpy_s(item.m_Font[1].lfFaceName, _countof(item.m_Font[1].lfFaceName), _T("Verdana"));
01853
01854     m_arFonts.Add(item);
01855   }
01856 }
01857
01858 void CMainFrame::ActivateRibbonContextCategory(UINT uiCategoryID)
01859 {
01860   if (m_wndRibbonBar.GetHideFlags() == 0)
01861   {
01862     m_wndRibbonBar.ActivateContextCategory(uiCategoryID);
01863   }
01864 }
01865
01866 void CMainFrame::SetRibbonContextCategory(UINT uiCategoryID)
01867 {
01868   BOOL bRecalc = m_wndRibbonBar.HideAllContextCategories();
01869
01870   if (uiCategoryID != 0)
01871   {
01872     m_wndRibbonBar.ShowContextCategories(uiCategoryID);
01873     bRecalc = TRUE;
01874   }
01875
01876   if (bRecalc)
01877   {
01878     m_wndRibbonBar.RecalcLayout();
01879     m_wndRibbonBar.RedrawWindow();
01880
01881     SendMessage(WM_NCPAINT, 0, 0);
01882   }
01883 }
01884
01885 CMFCRibbonPanel* CMainFrame::AddPanelArrange(CMFCRibbonCategory* pCategory, UINT imageP, UINT imageS, UINT imageL)
01886 {
01887   ASSERT_VALID(pCategory);
01888
01889   CMFCRibbonPanel* pPanelPL_Arrange = pCategory->AddPanel(_T("Arrange\nza"), m_PanelImages.ExtractIcon(imageP));
01890
01891   CMFCRibbonGallery* pPositionBtn = new CMFCRibbonGallery(ID_PAGELAYOUT_ARRANGE_POSITION, _T("Position\npo"), -1, imageL);
01892   InitPositionPalette(pPositionBtn);
01893   pPositionBtn->EnableMenuResize();
01894   pPositionBtn->SetButtonMode();
01895   pPanelPL_Arrange->Add(pPositionBtn);
01896
01897   CMFCRibbonButton* pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_BRINGTOFRONT, _T("Bring to Front\naf"), imageS, imageL > 0 ? imageL + 1 : -1);
01898   pBtn->SetMenu(IDR_PAGELAYOUT_BRINGTOFRONT, TRUE);
01899   pPanelPL_Arrange->Add(pBtn);
01900
01901   pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_SENDTOBACK, _T("Send to Back\nab"), imageS + 2, imageL > 0 ? imageL + 2 : -1);
01902   pBtn->SetMenu(IDR_PAGELAYOUT_SENDTOBACK, TRUE);
01903   pPanelPL_Arrange->Add(pBtn);
01904
01905   pBtn = new CMFCRibbonButton(ID_PAGELAYOUT_TEXTWRAPPING, _T("Text Wrapping\ntw"), imageS + 4, imageL > 0 ? imageL + 3 : -1);
01906   pBtn->SetMenu(IDR_PAGELAYOUT_TEXTWRAPPING, FALSE);
01907   pPanelPL_Arrange->Add(pBtn);
01908
01909   pPanelPL_Arrange->Add(new CMFCRibbonButton(ID_PAGELAYOUT_ARRANGE_ALIGN, _T("Align\naa"), imageS + 1, imageL > 0 ? imageL + 4 : -1));
01910   pPanelPL_Arrange->Add(new CMFCRibbonButton(ID_PAGELAYOUT_ARRANGE_GROUP, _T("Group\nag"), imageS + 3, imageL > 0 ? imageL + 5 : -1));
01911   pPanelPL_Arrange->Add(new CMFCRibbonButton(ID_PAGELAYOUT_ARRANGE_ROTATE, _T("Rotate\nay"), imageS + 5, imageL > 0 ? imageL + 6 : -1));
01912
01913   return pPanelPL_Arrange;
01914 }
01915
01916 void CMainFrame::AddContextTab_Picture()
01917 {
01918   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Format"), _T("Picture tools"), IDB_PICTURE, AFX_CategoryColor_Red, IDB_PICTURE_FORMAT, IDB_PICTURE_FORMATLARGE);
01919
01920   pCategory->SetKeys(_T("jp"));
01921
01922   CMFCRibbonPanel* pPanelTools = pCategory->AddPanel(_T("Picture Tools"), m_PanelImages.ExtractIcon(20));
01923
01924   pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_BRIGHTNESS, _T("Brightness\nb"), 0, -1));
01925   pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_CONTRAST, _T("Contrast\nn"), 1, -1));
01926   pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_RECOLOR, _T("Recolor\ne"), 2, -1));
01927   pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_COMPRESS, _T("Compress Pictures\nm"), 3, -1));
01928   pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_CHANGE, _T("Change Picture\ng"), 4, -1));
01929   pPanelTools->Add(new CMFCRibbonButton(ID_PICTURE_FORMAT_TOOLS_RESET, _T("Reset Picture\no"), 5, -1));
01930
01931   AddPanelArrange(pCategory, 19, 6, 0);
01932 }
01933
01934 void CMainFrame::AddContextTab_Chart()
01935 {
01936   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Design"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_DESIGN, IDB_CHART_DESIGNLARGE);
01937   pCategory->SetKeys(_T("jc"));
01938
01939   CMFCRibbonPanel* pPanelDesign_Type = pCategory->AddPanel(_T("Type"), m_PanelImages.ExtractIcon(20));
01940
01941   pPanelDesign_Type->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Change Chart Type\nc"), -1, 0));
01942   pPanelDesign_Type->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_SAVETEMPLATE, _T("Save Template\nt"), -1, 1));
01943
01944   CMFCRibbonPanel* pPanelDesign_Data = pCategory->AddPanel(_T("Data"), m_PanelImages.ExtractIcon(20));
01945
01946   pPanelDesign_Data->Add(new CMFCRibbonButton(ID_CHART_DESIGN_DATA_SWITCH, _T("Switch Row/Column\nw"), -1, 2));
01947   pPanelDesign_Data->Add(new CMFCRibbonButton(ID_CHART_DESIGN_DATA_EDIT, _T("Edit Data Source\ne"), -1, 3));
01948   pPanelDesign_Data->Add(new CMFCRibbonButton(ID_CHART_DESIGN_DATA_SHOW, _T("Show Data\nd"), -1, 4));
01949
01950   CMFCRibbonCategory* pCategory2 = m_wndRibbonBar.AddContextCategory(_T("Layout"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_LAYOUT, IDB_CHART_LAYOUTLARGE);
01951   pCategory2->SetKeys(_T("ja"));
01952
01953   CMFCRibbonPanel* pPanelLayout_Shapes = pCategory2->AddPanel(_T("Shapes"), m_PanelImages.ExtractIcon(20));
01954
01955   pPanelLayout_Shapes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_SHAPES_PICTURE, _T("Picture\np"), 0, 0));
01956   pPanelLayout_Shapes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_SHAPES_SHAPES, _T("Shapes\nsh"), 1, 1));
01957   pPanelLayout_Shapes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_SHAPES_TEXTBOX, _T("Draw Text Box\nx"), 2, 2));
01958
01959   CMFCRibbonPanel* pPanelLayout_Labels = pCategory2->AddPanel(_T("Labels"), m_PanelImages.ExtractIcon(20));
01960
01961   pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_TITLE, _T("Chart Title\nt"), -1, 3));
01962   pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_AXIS, _T("Axis Titles\ni"), -1, 4));
01963   pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_LEGEND, _T("Legend\nl"), 3, 5));
01964   pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_DATALABELS, _T("Data Labels\nb"), 4, 6));
01965   pPanelLayout_Labels->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_LABELS_DATATABLE, _T("Data Table\nd"), 5, 7));
01966
01967   CMFCRibbonPanel* pPanelLayout_Axes = pCategory2->AddPanel(_T("Axes"), m_PanelImages.ExtractIcon(20));
01968
01969   pPanelLayout_Axes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_AXES_AXES, _T("Axes\na"), -1, 8));
01970   pPanelLayout_Axes->Add(new CMFCRibbonButton(ID_CHART_LAYOUT_AXES_GRIDLINES, _T("Gridlines\ng"), -1, 9));
01971   pPanelLayout_Axes->SetKeys(_T("zx"));
01972
01973   CMFCRibbonCategory* pCategory3 = m_wndRibbonBar.AddContextCategory(_T("Format"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_FORMAT, IDB_CHART_FORMATLARGE);
01974   pCategory3->SetKeys(_T("jo"));
01975
01976   CMFCRibbonPanel* pPanelFormat_Sel = pCategory3->AddPanel(_T("Current Selection"), m_PanelImages.ExtractIcon(20));
01977
01978   pPanelFormat_Sel->Add(new CMFCRibbonButton(ID_CHART_FORMAT_CURSEL_FORMAT, _T("Format Selection\nm"), 0, -1));
01979   pPanelFormat_Sel->Add(new CMFCRibbonButton(ID_CHART_FORMAT_CURSEL_RESET, _T("Reset to Match Style\nv"), 1, -1));
01980
01981   CMFCRibbonPanel* pPanelFormat_Shape = pCategory3->AddPanel(_T("Shape Styles"), m_PanelImages.ExtractIcon(20));
01982
01983   pPanelFormat_Shape->Add(new CMFCRibbonButton(ID_CHART_FORMAT_SHAPES_FILL, _T("Shape Fill\nsf"), 2, -1));
01984   pPanelFormat_Shape->Add(new CMFCRibbonButton(ID_CHART_FORMAT_SHAPES_OUTLINE, _T("Shape Outline\nso"), 3, -1));
01985   pPanelFormat_Shape->Add(new CMFCRibbonButton(ID_CHART_FORMAT_SHAPES_EFFECTS, _T("Shape Effects\nse"), 4, -1));
01986   pPanelFormat_Shape->SetKeys(_T("zy"));
01987
01988   AddPanelArrange(pCategory3, 19, 5, 0);
01989 }
01990
01991 void CMainFrame::AddContextTab_Table()
01992 {
01993   CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Design"), _T("Table tools"), IDB_TABLE, AFX_CategoryColor_Yellow, IDB_INSERT, IDB_INSERTLARGE);
01994   pCategory->SetKeys(_T("jt"));
01995
01996   CMFCRibbonPanel* pPanelTableStyleOptions = pCategory->AddPanel(_T("Table Style Options"), m_PanelImages.ExtractIcon(20));
01997   pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_HEADERROW, _T("Header Row\nhr")));
01998   pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_TOTALROW, _T("Total Row\ntr")));
01999   pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_BANDEDROWS, _T("Banded Rows\nbr")));
02000   pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_FIRSTCOLUMN, _T("First Column\nfc")));
02001   pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_LASTCOLUMN, _T("Last Column\nlc")));
02002   pPanelTableStyleOptions->Add(new CMFCRibbonCheckBox(ID_TABLE_BANDEDCOLUMNS, _T("Banded Columns\nbc")));
02003
02004   pCategory->AddPanel(_T("Table Styles"), m_PanelImages.ExtractIcon(20));
02005   pCategory->AddPanel(_T("Draw Borders"), m_PanelImages.ExtractIcon(20));
02006
02007   CMFCRibbonCategory* pCategory2 = m_wndRibbonBar.AddContextCategory(_T("Layout"), _T("Table tools"), IDB_TABLE, AFX_CategoryColor_Yellow, IDB_INSERT, IDB_INSERTLARGE);
02008   pCategory2->SetKeys(_T("jl"));
02009
02010   pCategory2->AddPanel(_T("Table"), m_PanelImages.ExtractIcon(20));
02011   pCategory2->AddPanel(_T("Rows & Columns"), m_PanelImages.ExtractIcon(20));
02012   pCategory2->AddPanel(_T("Merge"), m_PanelImages.ExtractIcon(20));
02013   pCategory2->AddPanel(_T("Cell Size"), m_PanelImages.ExtractIcon(20));
02014   pCategory2->AddPanel(_T("Alignment"), m_PanelImages.ExtractIcon(20));
02015   pCategory2->AddPanel(_T("Data"), m_PanelImages.ExtractIcon(20));
02016 }
02017
02018 BOOL CMainFrame::CreateStatusBar()
02019 {
02020   if (!m_wndStatusBar.Create(this))
02021   {
02022     TRACE0("Failed to create status bar\n");
02023     return FALSE;
02024   }
02025
02026   m_wndStatusBar.AddElement(new CMFCRibbonLinkCtrl(ID_STATUSBAR_LINK, _T("www.microsoft.com"), _T("http://www.microsoft.com")), _T("Link to website"));
02027
02028   m_wndStatusBar.AddSeparator();
02029
02030   m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PAGE, _T("Page 1")), _T("Formatted Page Number"));
02031
02032   m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_LINE, _T("Line 1")), _T("Line Number"));
02033
02034   m_wndStatusBar.AddSeparator();
02035
02036   HICON hIconSpell = (HICON) ::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_SPELL), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_SHARED);
02037
02038   m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_SPELL, _T(""), (UINT) IDB_SPELL, 16, RGB(212, 212, 212), hIconSpell), _T("Spelling and Grammar Check"));
02039
02040   m_wndStatusBar.AddSeparator();
02041
02042   HICON hIconRefresh = (HICON) ::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_REFRESH), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_SHARED);
02043
02044   m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_REFRESH, _T("Refresh"), FALSE, hIconRefresh), _T("Refresh"));
02045
02046   std::auto_ptr<CMFCRibbonButtonsGroup> apSBGroup(new CMFCRibbonButtonsGroup);
02047
02048   CMFCToolBarImages images1;
02049   images1.SetImageSize(CSize(14, 14));
02050   images1.Load(IDB_LAYOUT);
02051
02052   apSBGroup->SetImages(&images1, NULL, NULL);
02053   apSBGroup->SetID(ID_GROUP_SHORTCUTS);
02054
02055   apSBGroup->AddButton(new CMFCRibbonButton(ID_STATUSBAR_PRINTLAYOUT, _T(""), 0));
02056   apSBGroup->AddButton(new CMFCRibbonButton(ID_STATUSBAR_FULL_SCREEN_READING, _T(""), 1));
02057   apSBGroup->AddButton(new CMFCRibbonButton(ID_STATUSBAR_WEBLAYOUT, _T(""), 2));
02058   apSBGroup->AddButton(new CMFCRibbonButton(ID_STATUSBAR_MASTER_DOCUMENT_TOOLS, _T(""), 3));
02059   apSBGroup->AddButton(new CMFCRibbonButton(ID_STATUSBAR_DRAFT, _T(""), 4));
02060
02061   m_wndStatusBar.AddExtendedElement(apSBGroup.release(), _T("View Shortcuts"));
02062
02063   m_wndStatusBar.AddExtendedElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_ZOOM, _T("100%"), FALSE, NULL, _T("1000%")), _T("Zoom"));
02064
02065   CMFCRibbonSlider* pSlider = new CMFCRibbonSlider(ID_STATUSBAR_ZOOM_SLIDER);
02066   pSlider->SetZoomButtons();
02067   pSlider->SetRange(0, 200);
02068   pSlider->SetPos(100);
02069
02070   m_wndStatusBar.AddExtendedElement(pSlider, _T("Zoom Slider"));
02071
02072   return TRUE;
02073 }
02074
02075 BOOL CMainFrame::CreateMessageBar()
02076 {
02077   if (!m_wndMessageBar.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, this, ID_VIEW_MESSAGEBAR, -1, TRUE))
02078   {
02079     TRACE0("Failed to create caption bar\n");
02080     return FALSE;
02081   }
02082
02083   m_wndMessageBar.SetButton(_T("Options..."), ID_TOOLS_OPTIONS, CMFCCaptionBar::ALIGN_LEFT, FALSE);
02084   m_wndMessageBar.SetButtonToolTip(_T("Click here to see more options"));
02085
02086   m_wndMessageBar.SetText(_T("Welcome to the MFC MSOffice2007 demonstration!"), CMFCCaptionBar::ALIGN_LEFT);
02087
02088   m_wndMessageBar.SetBitmap(IDB_INFO, RGB(255, 255, 255), FALSE, CMFCCaptionBar::ALIGN_LEFT);
02089   m_wndMessageBar.SetImageToolTip(_T("Important"), _T("Please take a look at MSOffice2007Demo source code to learn how to create advanced user interface in minutes."));
02090
02091   return TRUE;
02092 }
02093
02094 void CMainFrame::OnTimer(UINT_PTR nIDEvent)
02095 {
02096   if (nIDEvent == IdStartProgressTimer)
02097   {
02098     ShowProgress();
02099     KillTimer(IdStartProgressTimer);
02100   }
02101
02102   if (nIDEvent == IdShowProgressTimer)
02103   {
02104     m_nProgressValue++;
02105
02106     if (m_nProgressValue > 100)
02107     {
02108       ShowProgress(FALSE);
02109     }
02110     else
02111     {
02112       CMFCRibbonProgressBar* pProgress = DYNAMIC_DOWNCAST(CMFCRibbonProgressBar, m_wndStatusBar.FindElement(ID_STATUSBAR_PROGRESS));
02113       ASSERT_VALID(pProgress);
02114
02115       pProgress->SetPos(m_nProgressValue, TRUE);
02116     }
02117   }
02118 }
02119
02120 void CMainFrame::ShowProgress(BOOL bShow)
02121 {
02122   if (bShow)
02123   {
02124     int cxFree = m_wndStatusBar.GetSpace();
02125     if (cxFree < 20)
02126     {
02127       // Not enough space for progress bar
02128       return;
02129     }
02130
02131     int cxProgress = min(cxFree, 150);
02132
02133     CMFCRibbonProgressBar* pProgressBar = new CMFCRibbonProgressBar(ID_STATUSBAR_PROGRESS, cxProgress);
02134
02135     pProgressBar->SetInfiniteMode(m_bInfiniteProgressMode);
02136
02137     m_wndStatusBar.AddDynamicElement(pProgressBar);
02138
02139     m_nProgressValue = 0;
02140
02141     SetTimer(IdShowProgressTimer, 10, NULL);
02142   }
02143   else
02144   {
02145     KillTimer(IdShowProgressTimer);
02146     m_wndStatusBar.RemoveElement(ID_STATUSBAR_PROGRESS);
02147     m_nProgressValue = -1;
02148   }
02149
02150   m_wndStatusBar.RecalcLayout();
02151   m_wndStatusBar.RedrawWindow();
02152
02153   CMFCPopupMenu::UpdateAllShadows();
02154 }
02155
02156 void CMainFrame::OnZoomSlider()
02157 {
02158   CMFCRibbonSlider* pSlider = DYNAMIC_DOWNCAST(CMFCRibbonSlider, m_wndStatusBar.FindElement(ID_STATUSBAR_ZOOM_SLIDER));
02159   ASSERT_VALID(pSlider);
02160
02161   int nPos = pSlider->GetPos();
02162
02163   CMFCRibbonStatusBarPane* pZoom = DYNAMIC_DOWNCAST(CMFCRibbonStatusBarPane, m_wndStatusBar.FindElement(ID_STATUSBAR_ZOOM));
02164   ASSERT_VALID(pZoom);
02165
02166   CString strZoom;
02167   strZoom.Format(_T("%d%%"), nPos);
02168
02169   pZoom->SetText(strZoom);
02170   pZoom->Redraw();
02171 }
02172
02173 void CMainFrame::OnZoom()
02174 {
02175   MessageBox(_T("Zoom dialog box..."));
02176 }
02177
02178 void CMainFrame::OnRefresh()
02179 {
02180   m_bInfiniteProgressMode = FALSE;
02181   ShowProgress();
02182 }
02183
02184 void CMainFrame::OnUpdateRefresh(CCmdUI* pCmdUI)
02185 {
02186   pCmdUI->Enable(m_nProgressValue < 0);
02187 }
02188
02189 void CMainFrame::OnSpell()
02190 {
02191   CMFCRibbonStatusBarPane* pPane = DYNAMIC_DOWNCAST(CMFCRibbonStatusBarPane, m_wndStatusBar.FindElement(ID_STATUSBAR_SPELL));
02192
02193   if (pPane == NULL)
02194   {
02195     return;
02196   }
02197
02198   if (pPane->IsAnimation())
02199   {
02200     pPane->StopAnimation();
02201   }
02202   else
02203   {
02204     pPane->StartAnimation( 500 /* 1/2 sec, Frame delay */, 10000 /* 10 sec, animation duration */);
02205   }
02206 }
02207
02208 BOOL CMainFrame::OnShowPopupMenu(CMFCPopupMenu* pMenuPopup)
02209 {
02210   CFrameWndEx::OnShowPopupMenu(pMenuPopup);
02211
02212   if (pMenuPopup == NULL)
02213   {
02214     return TRUE;
02215   }
02216
02217   CMFCPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar();
02218   ASSERT_VALID(pMenuBar);
02219
02220   int nBulletIndex = pMenuBar->CommandToIndex(ID_PARA_BULLETS);
02221
02222   if (nBulletIndex >= 0)
02223   {
02224     CMFCToolBarButton* pExButton = pMenuBar->GetButton(nBulletIndex);
02225     ASSERT_VALID(pExButton);
02226
02227     CMFCRibbonGalleryMenuButton paletteBullet(pExButton->m_nID, pExButton->GetImage(), pExButton->m_strText);
02228
02229     InitBulletPalette(&paletteBullet.GetPalette());
02230
02231     pMenuBar->ReplaceButton(ID_PARA_BULLETS, paletteBullet);
02232   }
02233
02234   int nNumIndex = pMenuBar->CommandToIndex(ID_PARA_NUMBERING);
02235
02236   if (nNumIndex >= 0)
02237   {
02238     CMFCToolBarButton* pExButton = pMenuBar->GetButton(nNumIndex);
02239     ASSERT_VALID(pExButton);
02240
02241     CMFCRibbonGalleryMenuButton paletteNum(pExButton->m_nID, pExButton->GetImage(), pExButton->m_strText);
02242
02243     InitNumberingPalette(&paletteNum.GetPalette());
02244
02245     pMenuBar->ReplaceButton(ID_PARA_NUMBERING, paletteNum);
02246   }
02247
02248   return TRUE;
02249 }
02250
02251 void CMainFrame::InitBulletPalette(CMFCRibbonGallery* pPalette)
02252 {
02253   ASSERT_VALID(pPalette);
02254
02255   pPalette->SetPaletteID(ID_FROM_PALETTE_BULLET);
02256
02257   pPalette->AddGroup(_T("Bullets"), IDB_BULLETS, 40);
02258
02259   pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("&Change List Level")));
02260
02261   pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWBULLET, _T("&Define New Bullet...")));
02262
02263   pPalette->SetIconsInRow(6);
02264 }
02265
02266 void CMainFrame::InitNumberingPalette(CMFCRibbonGallery* pPalette)
02267 {
02268   ASSERT_VALID(pPalette);
02269
02270   pPalette->SetPaletteID(ID_FROM_PALETTE_NUMBER);
02271
02272   pPalette->AddGroup(_T("Numbering Library"), IDB_NUM, 76);
02273
02274   pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("&Change List Level")));
02275
02276   pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWNUMBERFORMAT, _T("&Define New Number Format...")));
02277
02278   pPalette->SetIconsInRow(3);
02279 }
02280
02281 void CMainFrame::InitMultilevelPalette(CMFCRibbonGallery* pPalette)
02282 {
02283   ASSERT_VALID(pPalette);
02284
02285   pPalette->SetPaletteID(ID_FROM_PALETTE_MULTILEVEL);
02286
02287   pPalette->AddGroup(_T("List Library"), IDB_MULTI, 76);
02288
02289   pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_CHANGE_LIST_LEVEL, _T("&Change List Level")));
02290
02291   pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWMULTILEVELLIST, _T("&Define New Multilevel List")));
02292
02293   pPalette->AddSubItem(new CMFCRibbonButton(ID_PARA_DEFINENEWLISTSTYLE, _T("Define New List &Style...")));
02294
02295   pPalette->SetIconsInRow(3);
02296 }
02297
02298 void CMainFrame::InitPositionPalette(CMFCRibbonGallery* pPalette)
02299 {
02300   ASSERT_VALID(pPalette);
02301
02302   pPalette->SetPaletteID(ID_FROM_PALETTE_POSITION);
02303
02304   pPalette->AddGroup(_T("In Line with"), IDB_POSITION_1, 37);
02305   pPalette->AddGroup(_T("With Text Wrapping"), IDB_POSITION_2, 37);
02306
02307   pPalette->AddSubItem(new CMFCRibbonButton(ID_PAGELAYOUT_MORELAYOUTOPTIONS, _T("&More &Layout Options")));
02308
02309   pPalette->SetIconsInRow(3);
02310 }
02311
02312 void CMainFrame::OnToolsOptions()
02313 {
02314   ShowOptions(0);
02315 }
02316
02317 LRESULT CMainFrame::OnRibbonCustomize(WPARAM wp, LPARAM lp)
02318 {
02319   ShowOptions(1);
02320   return 1;
02321 }
02322
02323 void CMainFrame::ShowOptions(int nPage)
02324 {
02325   CResourcePage *pPageRes = NULL;
02326
02327   // Add "popular" items:
02328   CList<UINT, UINT> lstPopular;
02329
02330   lstPopular.AddTail(ID_FILE_NEW);
02331   lstPopular.AddTail(ID_FILE_OPEN);
02332   lstPopular.AddTail(ID_FILE_SAVE);
02333   lstPopular.AddTail(ID_FILE_PRINT_PREVIEW);
02334   lstPopular.AddTail(ID_FILE_PRINT_DIRECT);
02335   lstPopular.AddTail(ID_FILE_SEND_EMAIL);
02336
02337   lstPopular.AddTail(ID_EDIT_UNDO);
02338
02339   lstPopular.AddTail(ID_PAGELAYOUT_PAGEBACKGROUND_PAGEBORDERS);
02340   lstPopular.AddTail(ID_PAGELAYOUT_PAGESETUP_BREAKS);
02341
02342   lstPopular.AddTail(ID_TABLE_DRAWTABLE);
02343   lstPopular.AddTail(ID_INSERT_HYPERLINK);
02344   lstPopular.AddTail(ID_INSERT_PICTURE);
02345
02346   // Create "Customize" page:
02347   std::auto_ptr<CMFCRibbonCustomizePropertyPage> apPageCustomize(new CMFCRibbonCustomizePropertyPage(&m_wndRibbonBar));
02348   apPageCustomize->AddCustomCategory(_T("Popular Commands"), lstPopular);
02349
02350   // Add hidden commands:
02351   CList<UINT,UINT> lstHidden;
02352   m_wndRibbonBar.GetItemIDsList(lstHidden, TRUE);
02353
02354   apPageCustomize->AddCustomCategory(_T("Commands not in the Ribbon"), lstHidden);
02355
02356   // Add all commands:
02357   CList<UINT,UINT> lstAll;
02358   m_wndRibbonBar.GetItemIDsList(lstAll);
02359
02360   apPageCustomize->AddCustomCategory(_T("All Commands"), lstAll);
02361
02362   // Create "Options" and "Resources" pages:
02363   std::auto_ptr<CDemoOptionsPage> apPageOptions(new CDemoOptionsPage);
02364   std::auto_ptr<CResourcePage> apPageRes(new CResourcePage);
02365
02366   // Create property sheet:
02367   std::tr1::shared_ptr<CDemoOptionsPropSheet> spPropSheet(new CDemoOptionsPropSheet(this, nPage));
02368   spPropSheet->EnablePageHeader(max(60, afxGlobalData.GetTextHeight() * 3));
02369
02370   spPropSheet->m_psh.dwFlags |= PSH_NOAPPLYNOW;
02371
02372   spPropSheet->SetLook(CMFCPropertySheet::PropSheetLook_List, 124);
02373
02374   spPropSheet->AddPage(apPageOptions.release());
02375   spPropSheet->AddPage(apPageCustomize.release());
02376   spPropSheet->AddPage(apPageRes.release());
02377
02378   if (spPropSheet->DoModal() == IDOK)
02379   {
02380     // Show or hide "Developer" tab:
02381     int nTabDevIndex = m_wndRibbonBar.FindCategoryIndexByData(idTabDeveloper);
02382
02383     if (theApp.m_bShowDevTab)
02384     {
02385       if (nTabDevIndex < 0)
02386       {
02387         AddTab_Developer();
02388       }
02389     }
02390     else
02391     {
02392       if (nTabDevIndex >= 0)
02393       {
02394         m_wndRibbonBar.RemoveCategory(nTabDevIndex );
02395       }
02396     }
02397
02398     // Change application theme and tooltips:
02399     OnAppLook(theApp.m_nAppLook);
02400
02401     m_wndRibbonBar.EnableToolTips(theApp.m_bShowToolTips, theApp.m_bShowToolTipDescr);
02402     m_wndRibbonBar.EnableKeyTips(theApp.m_bShowKeyTips);
02403   }
02404
02405 }
02406
02407 void CMainFrame::OnWriteClipboard()
02408 {
02409   m_wndTaskPane.ShowPane(!m_wndTaskPane.IsVisible(), FALSE, TRUE);
02410 }
02411
02412 void CMainFrame::OnUpdateWriteClipboard(CCmdUI* pCmdUI)
02413 {
02414   pCmdUI->Enable(m_pPrintPreviewFrame == NULL);
02415 }
02416
02417 void CMainFrame::OnViewRtl()
02418 {
02419   theApp.m_bIsRTL = !theApp.m_bIsRTL;
02420   OnChangeLayout();
02421 }
02422
02423 void CMainFrame::OnUpdateViewRtl(CCmdUI* pCmdUI)
02424 {
02425   pCmdUI->SetCheck(theApp.m_bIsRTL);
02426 }
02427
02428 void CMainFrame::OnChangeLayout(CWnd* pWnd/* = NULL*/, BOOL bNoLoopOverPopup/* = FALSE*/)
02429 {
02430   BOOL bTopLevel = FALSE;
02431
02432   if (pWnd == NULL)
02433   {
02434     pWnd = this;
02435     bTopLevel = TRUE;
02436   }
02437
02438   if (pWnd->IsKindOf(RUNTIME_CLASS(CRichEditView)) || pWnd->IsKindOf(RUNTIME_CLASS(CRichEditCtrl)))
02439   {
02440     return;
02441   }
02442
02443   if (theApp.m_bIsRTL)
02444   {
02445     pWnd->ModifyStyleEx(0, WS_EX_LAYOUTRTL);
02446   }
02447   else
02448   {
02449     pWnd->ModifyStyleEx(WS_EX_LAYOUTRTL, 0);
02450   }
02451
02452   CWnd* pWndChild = pWnd->GetWindow(GW_CHILD);
02453   while (pWndChild != NULL)
02454   {
02455     OnChangeLayout(pWndChild, TRUE);
02456     pWndChild = pWndChild->GetNextWindow();
02457   }
02458
02459   if (!bNoLoopOverPopup)
02460   {
02461     CWnd* pWndPopup = pWnd->GetWindow(GW_HWNDFIRST);
02462     while (pWndPopup != NULL)
02463     {
02464       if (pWndPopup->IsKindOf(RUNTIME_CLASS(CPaneFrameWnd)))
02465       {
02466         OnChangeLayout(pWndPopup, TRUE);
02467         pWndPopup->RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
02468       }
02469       pWndPopup = pWndPopup->GetNextWindow();
02470     }
02471   }
02472
02473   if (bTopLevel)
02474   {
02475     CMFCToolBarImages::EnableRTL(theApp.m_bIsRTL);
02476
02477     CMFCToolBar::GetImages()->Mirror();
02478     CMenuImages::CleanUp();
02479
02480     OnAppLook(theApp.m_nAppLook);
02481   }
02482 }
02483
02484 void CMainFrame::OnLink()
02485 {
02486   CMFCRibbonLinkCtrl* pLink = (CMFCRibbonLinkCtrl*) m_wndStatusBar.FindByID(ID_STATUSBAR_LINK);
02487
02488   if (pLink != NULL)
02489   {
02490     pLink->OpenLink();
02491   }
02492 }
02493
02494 LRESULT CMainFrame::OnHighlightRibbonListItem(WPARAM wp, LPARAM lp)
02495 {
02496   int nIndex = (int) wp;
02497
02498   CMFCRibbonBaseElement* pElem = (CMFCRibbonBaseElement*) lp;
02499   ASSERT_VALID(pElem);
02500
02501   UINT uiCommand = pElem->GetID();
02502
02503   if (nIndex < 0)
02504   {
02505     m_wndStatusBar.SetInformation(NULL);
02506     return 0;
02507   }
02508
02509   CString strInfo;
02510
02511   switch (uiCommand)
02512   {
02513   case ID_WRITE_QUICKSTYLES:
02514     strInfo.Format(_T("Modify document style. Index: %d"), nIndex);
02515     break;
02516
02517   case ID_FONT_FONT:
02518     {
02519       CMFCRibbonFontComboBox* pFontCombo = (CMFCRibbonFontComboBox*) pElem;
02520       strInfo.Format(_T("Changing selection font: %s"), pFontCombo->GetItem(nIndex));
02521     }
02522     break;
02523
02524   case ID_FONT_COLOR:
02525     {
02526       CMFCRibbonColorButton* pColorButton = (CMFCRibbonColorButton*) pElem;
02527       COLORREF color = pColorButton->GetHighlightedColor();
02528
02529       strInfo.Format(_T("Changing selection color: %02X,%02X,%02X"), GetRValue(color), GetGValue(color), GetBValue(color));
02530     }
02531     break;
02532
02533   case ID_INSERT_TABLE:
02534     {
02535       strInfo.Format(_T("Insert Table: %d x %d"), CRibbonTableButton::GetColumns(), CRibbonTableButton::GetRows());
02536     }
02537     break;
02538
02539   case ID_PAGELAYOUT_THEMES:
02540     {
02541       strInfo.Format(_T("Changing theme: %d"), nIndex);
02542     }
02543     break;
02544
02545   default:
02546     return 0;
02547   }
02548
02549   m_wndStatusBar.SetInformation(strInfo);
02550   return 0;
02551 }
02552
02553 void CMainFrame::OnViewMessageBar()
02554 {
02555   ShowPane(&m_wndMessageBar, !(m_wndMessageBar.IsVisible()), FALSE, TRUE);
02556   RecalcLayout();
02557 }
02558
02559 void CMainFrame::OnUpdateViewMessageBar(CCmdUI* pCmdUI)
02560 {
02561   pCmdUI->SetCheck(m_wndMessageBar.IsVisible());
02562 }
02563
02564 LRESULT CMainFrame::OnShowRibbonItemMenu(WPARAM /*wp*/, LPARAM lp)
02565 {
02566   CMFCRibbonBaseElement* pElem = (CMFCRibbonBaseElement*) lp;
02567   ASSERT_VALID(pElem);
02568
02569   switch (pElem->GetID())
02570   {
02571   case ID_EDIT_UNDO:
02572     // Fill Undo items list:
02573     {
02574       CMFCRibbonUndoButton* pUndo = DYNAMIC_DOWNCAST(CMFCRibbonUndoButton, pElem);
02575       ASSERT_VALID(pUndo);
02576
02577       pUndo->CleanUpUndoList();
02578
02579       pUndo->AddUndoAction(_T("Undo Item 1"));
02580       pUndo->AddUndoAction(_T("Undo Item 2"));
02581       pUndo->AddUndoAction(_T("Undo Item 3"));
02582       pUndo->AddUndoAction(_T("Undo Item 4"));
02583       pUndo->AddUndoAction(_T("Undo Item 5"));
02584     }
02585     break;
02586
02587   case ID_PARA_BULLETS:
02588     // Rebuild "Recently used bullets" group:
02589     {
02590       CMFCRibbonGallery* pPaletteButton = DYNAMIC_DOWNCAST(CMFCRibbonGallery, pElem);
02591       ASSERT_VALID(pPaletteButton);
02592
02593       pPaletteButton->Clear();
02594
02595       // Load all bullets:
02596       CMFCToolBarImages imagesAll;
02597       imagesAll.SetImageSize(CSize(40, 40));
02598       imagesAll.Load(IDB_BULLETS);
02599
02600       // Create "Recently used bullets" group:
02601       CMFCToolBarImages imagesRU;
02602       imagesRU.SetImageSize(imagesAll.GetImageSize());
02603
02604       imagesRU.AddIcon(imagesAll.ExtractIcon(1));
02605       imagesRU.AddIcon(imagesAll.ExtractIcon(7));
02606
02607       pPaletteButton->AddGroup(_T("Recently Used Bullets"), imagesRU);
02608
02609       // Add all bullets group:
02610       pPaletteButton->AddGroup(_T("Bullets"), imagesAll);
02611     }
02612     break;
02613
02614   case ID_FONT_COLOR:
02615   case ID_PARA_SHADING:
02616     // Set document text colors:
02617     {
02618       CMFCRibbonColorButton* pColorBtn = DYNAMIC_DOWNCAST(CMFCRibbonColorButton, pElem);
02619       ASSERT_VALID(pColorBtn);
02620
02621       CList<COLORREF,COLORREF> lstColors;
02622
02623       lstColors.AddTail(RGB(108, 154, 233));
02624       lstColors.AddTail(RGB(18, 159, 126));
02625       lstColors.AddTail(RGB(223, 149, 1));
02626       lstColors.AddTail(RGB(192, 255, 0));
02627
02628       pColorBtn->SetDocumentColors(_T("Recent Colors"), lstColors);
02629     }
02630     break;
02631   }
02632
02633   return 0;
02634 }
02635
02636 void CMainFrame::OnDummy(UINT id)
02637 {
02638 }
02639
02640 void CMainFrame::OnFilePrint()
02641 {
02642   if (IsPrintPreview())
02643   {
02644     PostMessage(WM_COMMAND, AFX_ID_PREVIEW_PRINT);
02645   }
02646 }
02647
02648 void CMainFrame::OnFilePrintPreview()
02649 {
02650   if (IsPrintPreview())
02651   {
02652     PostMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);      // Force Print Preview Close
02653   }
02654 }
02655
02656 void CMainFrame::OnUpdateFilePrintPreview(CCmdUI* pCmdUI)
02657 {
02658   pCmdUI->SetCheck(IsPrintPreview());
02659 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/palppg.h Source File

  • controls
  • pal

palppg.h

Go to the documentation of this file.
00001 // palppg.h : Declaration of the CPalPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 ////////////////////////////////////////////////////////////////////////////
00014 // CPalPropPage : See palppg.cpp for implementation.
00015
00016 class CPalPropPage : public COlePropertyPage
00017 {
00018   DECLARE_DYNCREATE(CPalPropPage)
00019   DECLARE_OLECREATE_EX(CPalPropPage)
00020
00021 // Constructor
00022 public:
00023   CPalPropPage();
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CPalPropPage)
00027   enum { IDD = IDD_PROPPAGE_PAL };
00028   int     m_Length;
00029   //}}AFX_DATA
00030
00031 // Implementation
00032 protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034
00035 // Message maps
00036 protected:
00037   //{{AFX_MSG(CPalPropPage)
00038     //}}AFX_MSG
00039   DECLARE_MESSAGE_MAP()
00040
00041 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/progctrl.cpp Source File

  • general
  • CmnCtrl2

progctrl.cpp

Go to the documentation of this file.
00001 // ProgCtrl.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl2.h"
00015 #include "ProgCtrl.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CProgCtrlPage property page
00024
00025 IMPLEMENT_DYNCREATE(CProgCtrlPage, CPropertyPage)
00026
00027 #ifdef _DEBUG
00028 #define new DEBUG_NEW
00029 #endif
00030
00031 CProgCtrlPage::CProgCtrlPage() : CPropertyPage(CProgCtrlPage::IDD)
00032 {
00033   //{{AFX_DATA_INIT(CProgCtrlPage)
00034   m_iDelta = 0;
00035   m_uiStep = 10;
00036   m_uiRangeFrom = 0;
00037   m_uiPos = 0;
00038   m_uiRangeTo = 175;
00039   m_bVertical = FALSE;
00040   m_bSmooth = FALSE;
00041   //}}AFX_DATA_INIT
00042   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00043
00044 }
00045
00046 CProgCtrlPage::~CProgCtrlPage()
00047 {
00048 }
00049
00050 void CProgCtrlPage::DoDataExchange(CDataExchange* pDX)
00051 {
00052   CPropertyPage::DoDataExchange(pDX);
00053   //{{AFX_DATA_MAP(CProgCtrlPage)
00054   DDX_Text(pDX, IDC_PROGRESS_DELTA, m_iDelta);
00055   DDX_Text(pDX, IDC_PROGRESS_STEP, m_uiStep);
00056   DDV_MinMaxUInt(pDX, m_uiStep, 0, 65535);
00057   DDX_Text(pDX, IDC_PROGRESS_FROM, m_uiRangeFrom);
00058   DDV_MinMaxUInt(pDX, m_uiRangeFrom, 0, 65535);
00059   DDX_Text(pDX, IDC_PROGRESS_POS, m_uiPos);
00060   DDV_MinMaxUInt(pDX, m_uiPos, 0, 65535);
00061   DDX_Text(pDX, IDC_PROGRESS_TO, m_uiRangeTo);
00062   DDV_MinMaxUInt(pDX, m_uiRangeTo, 0, 65535);
00063   DDX_Check(pDX, IDC_VERTICAL, m_bVertical);
00064   DDX_Check(pDX, IDC_SMOOTH, m_bSmooth);
00065   //}}AFX_DATA_MAP
00066 }
00067
00068 BOOL CProgCtrlPage::OnInitDialog()
00069 {
00070   CPropertyPage::OnInitDialog();
00071
00072   // Initially create progress control in horizontal position
00073   CWnd* pWnd =
00074     GetDlgItem( IDC_PROG_HORZPOS );
00075   CRect rect;
00076   pWnd->GetWindowRect( &rect );
00077   ScreenToClient( &rect );
00078
00079   // Initialise controls
00080   m_Progress.Create( WS_VISIBLE | WS_CHILD, rect, this, IDC_PROGRESS );
00081   m_Progress.SetRange( static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo) );
00082
00083   return TRUE;
00084 }
00085
00086 BEGIN_MESSAGE_MAP(CProgCtrlPage, CPropertyPage)
00087   //{{AFX_MSG_MAP(CProgCtrlPage)
00088   ON_BN_CLICKED(IDC_PROGRESS_STEPIT, OnProgressStepit)
00089   ON_BN_CLICKED(IDC_SETPOS, OnSetpos)
00090   ON_BN_CLICKED(IDC_PROGRESS_SETDELTA, OnProgressSetdelta)
00091   ON_EN_KILLFOCUS(IDC_PROGRESS_FROM, OnFrom)
00092   ON_EN_KILLFOCUS(IDC_PROGRESS_TO, OnTo)
00093   ON_EN_KILLFOCUS(IDC_PROGRESS_STEP, OnStep)
00094   ON_BN_CLICKED(IDC_SMOOTH, OnStyleChange)
00095   ON_BN_CLICKED(IDC_VERTICAL, OnStyleChange)
00096   //}}AFX_MSG_MAP
00097 END_MESSAGE_MAP()
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // CProgCtrlPage message handlers
00101
00102 void CProgCtrlPage::OnProgressStepit()
00103 {
00104   m_Progress.StepIt();
00105 }
00106
00107 void CProgCtrlPage::OnSetpos()
00108 {
00109   UpdateData();
00110   m_Progress.SetPos( m_uiPos );
00111 }
00112
00113 void CProgCtrlPage::OnProgressSetdelta()
00114 {
00115   UpdateData();
00116   m_Progress.OffsetPos( m_iDelta );
00117 }
00118
00119 void CProgCtrlPage::OnFrom()
00120 {
00121   UpdateData();
00122   m_Progress.SetRange( static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo) );
00123 }
00124
00125 void CProgCtrlPage::OnTo()
00126 {
00127   UpdateData();
00128   m_Progress.SetRange( static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo) );
00129 }
00130
00131 void CProgCtrlPage::OnStep()
00132 {
00133   UpdateData();
00134   m_Progress.SetStep( m_uiStep );
00135 }
00136
00137 void CProgCtrlPage::OnStyleChange()
00138 {
00139   UpdateData();
00140
00141   m_Progress.DestroyWindow();
00142
00143   // Determine orientation
00144   CWnd* pWnd =
00145     GetDlgItem( (0==m_bVertical)?IDC_PROG_HORZPOS:IDC_PROG_VERTPOS );
00146   CRect rect;
00147   pWnd->GetWindowRect( &rect );
00148   ScreenToClient( &rect );
00149
00150   DWORD dwStyle= 0;
00151   if( m_bSmooth)
00152     dwStyle= PBS_SMOOTH;
00153   if(0 == m_bVertical)
00154     m_Progress.Create( WS_VISIBLE | WS_CHILD |
00155       dwStyle, rect, this, IDC_PROGRESS );
00156   else
00157     m_Progress.Create( WS_VISIBLE | WS_CHILD |
00158       PBS_VERTICAL | dwStyle, rect, this, IDC_PROGRESS );
00159   m_Progress.SetRange(static_cast<short>(m_uiRangeFrom), static_cast<short>(m_uiRangeTo));
00160 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/coloropt.h Source File

  • general
  • dynamenu

coloropt.h

Go to the documentation of this file.
00001 // coloropt.h
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: interface of the CColorOptDlg class
00013 //
00014 // Functions:
00015 //   Most of this file was generated by AppWizard.  The functions
00016 //   which contain code specific to this sample are:
00017 //
00018 //      CColorOptDlg::CColorOptDlg()         -- dialog constructor
00019 //      CColorOptDlg::DoDataExchange()       -- connect data to controls
00020 //      CColorOptDlg::OnInitDialog()         -- initialize dialog
00021 //
00022 //   These functions are implemented in coloropt.cpp.
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CColorOptDlg dialog
00026
00027 class CDynaMenuDoc;  // defined in dmdoc.h
00028
00029 class CColorOptDlg : public CDialog
00030 {
00031 // Construction
00032 public:
00033   CColorOptDlg(CDynaMenuDoc* pDoc, CWnd* pParent = NULL);
00034
00035 // Dialog Data
00036   //{{AFX_DATA(CColorOptDlg)
00037   enum { IDD = IDD_CHANGECOLOR };
00038     // NOTE: the ClassWizard will add data members here
00039   //}}AFX_DATA
00040
00041 // Implementation
00042 protected:
00043   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00044   virtual BOOL OnInitDialog();
00045
00046   CDynaMenuDoc* m_pDoc;  // document we want to update
00047
00048   // Generated message map functions
00049   //{{AFX_MSG(CColorOptDlg)
00050     // NOTE: the ClassWizard will add member functions here
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053 };
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/key.cpp Source File

  • vc2008fp
  • WordPad

key.cpp

Go to the documentation of this file.
00001 //
00002 // key.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "key.h"
00016 #include <winreg.h>
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CKey
00025
00026 void CKey::Close()
00027 {
00028   if (m_hKey != NULL)
00029   {
00030     LONG lRes = RegCloseKey(m_hKey);
00031     if (lRes != ERROR_SUCCESS)
00032     {
00033       ASSERT(FALSE);
00034     }
00035     m_hKey = NULL;
00036   }
00037 }
00038
00039 BOOL CKey::Create(HKEY hKey, LPCTSTR lpszKeyName)
00040 {
00041   ASSERT(hKey != NULL);
00042   if (hKey == NULL)
00043     return FALSE;
00044
00045   return (RegCreateKey(hKey, lpszKeyName, &m_hKey) == ERROR_SUCCESS);
00046 }
00047
00048 BOOL CKey::Open(HKEY hKey, LPCTSTR lpszKeyName)
00049 {
00050   ASSERT(hKey != NULL);
00051   if (hKey == NULL)
00052     return FALSE;
00053
00054   return (RegOpenKey(hKey, lpszKeyName, &m_hKey) == ERROR_SUCCESS);
00055 }
00056
00057 BOOL CKey::SetStringValue(LPCTSTR lpszValue, LPCTSTR lpszValueName)
00058 {
00059   ASSERT(m_hKey != NULL);
00060   if (m_hKey == NULL)
00061     return FALSE;
00062
00063   return (RegSetValueEx(m_hKey, lpszValueName, NULL, REG_SZ, (BYTE * const)lpszValue, (lstrlen(lpszValue)+1)*sizeof(TCHAR)) == ERROR_SUCCESS);
00064 }
00065
00066 BOOL CKey::GetStringValue(CString& str, LPCTSTR lpszValueName)
00067 {
00068   ASSERT(m_hKey != NULL);
00069   if (m_hKey == NULL)
00070     return FALSE;
00071
00072   str.Empty();
00073   DWORD dw = 0;
00074   DWORD dwType = 0;
00075   LONG lRes = RegQueryValueEx(m_hKey, (LPTSTR)lpszValueName, NULL, &dwType, NULL, &dw);
00076   if (lRes == ERROR_SUCCESS)
00077   {
00078     ASSERT(dwType == REG_SZ);
00079     LPTSTR lpsz = str.GetBufferSetLength(dw);
00080     lRes = RegQueryValueEx(m_hKey, (LPTSTR)lpszValueName, NULL, &dwType, (BYTE*)lpsz, &dw);
00081     ASSERT(lRes == ERROR_SUCCESS);
00082     str.ReleaseBuffer();
00083     return TRUE;
00084   }
00085   return FALSE;
00086 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIEDemoApp Member List

This is the complete list of members for CIEDemoApp, including all inherited members.
CIEDemoApp() | CIEDemoApp |
ExitInstance() | CIEDemoApp | [virtual]
InitInstance() | CIEDemoApp | [virtual]
m_Favorites | CIEDemoApp |
OnAppAbout() | CIEDemoApp |
PreLoadState() | CIEDemoApp | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPadView Member List

This is the complete list of members for CPadView, including all inherited members.
CPadView() | CPadView | [private]
GetDocument() | CPadView | [inline]
Initialize() | CPadView | [static]
IsUpdatePending() | CPadView | [inline]
IsWordWrap() const | CPadView |
LockBuffer() const | CPadView | [inline]
m_bDefWordWrap | CPadView | [protected, static]
m_bDefWordWrapOld | CPadView | [protected, static]
m_font | CPadView | [protected]
m_fontPrint | CPadView | [protected]
m_lfDefFont | CPadView | [protected, static]
m_lfDefFontOld | CPadView | [protected, static]
m_lfDefPrintFont | CPadView | [protected, static]
m_lfDefPrintFontOld | CPadView | [protected, static]
m_nDefTabStops | CPadView | [protected, static]
m_nDefTabStopsOld | CPadView | [protected, static]
m_nPreviewPage | CPadView | [protected]
m_timeFooter | CPadView | [protected]
m_timeHeader | CPadView | [protected]
m_uTimerID | CPadView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CPadView | [virtual]
OnChooseFont() | CPadView | [protected]
OnChoosePrintFont() | CPadView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CPadView | [protected]
OnEditChange() | CPadView | [protected]
OnEditCopy() | CPadView | [protected]
OnEditCut() | CPadView | [protected]
OnMirrorDisplayFont() | CPadView | [protected]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CPadView | [virtual]
OnRButtonDown(UINT nFlags, CPoint point) | CPadView | [protected]
OnScrollTo(CDC *pDC, CPrintInfo *pInfo, POINT point) | CPadView | [virtual]
OnSetTabStops() | CPadView | [protected]
OnSize(UINT nType, int cx, int cy) | CPadView | [protected]
OnTimer(UINT_PTR nIDEvent) | CPadView | [protected]
OnUpdateChoosePrintFont(CCmdUI *pCmdUI) | CPadView | [protected]
OnUpdateMirrorDisplayFont(CCmdUI *pCmdUI) | CPadView | [protected]
OnUpdateWordWrap(CCmdUI *pCmdUI) | CPadView | [protected]
OnWordWrap() | CPadView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CPadView | [private]
SetWordWrap(BOOL bWordWrap) | CPadView |
Terminate() | CPadView | [static]
UnlockBuffer() const | CPadView | [inline]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSwarm Member List

This is the complete list of members for CSwarm, including all inherited members.
CSwarm() | CSwarm |
Destroy() | CSwarm | [private]
GetAge() const | CSwarm | [inline]
GetBorder() const | CSwarm | [inline]
GetHeight() const | CSwarm | [inline]
GetLeader() | CSwarm | [private]
GetLeaderCount() const | CSwarm | [inline]
GetLlamaCount() const | CSwarm | [inline]
GetSurface() const | CSwarm | [inline]
GetWidth() const | CSwarm | [inline]
Initialize(CSurface *pSurface, int nLeaders, int nLlamas, const CSize &size) | CSwarm |
m_LeaderArr | CSwarm | [private]
m_LlamaArr | CSwarm | [private]
m_nAge | CSwarm | [private]
m_nBorder | CSwarm | [private]
m_nHeight | CSwarm | [private]
m_nWidth | CSwarm | [private]
m_pSurf | CSwarm | [private]
Tick() | CSwarm |
~CSwarm() | CSwarm |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/image.h Source File

  • controls
  • IMAGE

image.h

Go to the documentation of this file.
00001 // image.h : main header file for IMAGE.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined( __AFXCTL_H__ )
00013   #error include 'afxctl.h' before including this file
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CImageApp : See image.cpp for implementation.
00020
00021 class CImageApp : public COleControlModule
00022 {
00023 public:
00024   BOOL InitInstance();
00025   int ExitInstance();
00026 };
00027
00028 extern const GUID CDECL _tlid;
00029 extern const WORD _wVerMajor;
00030 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/locresfr.cpp Source File

  • controls
  • localize

locresfr.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma warning(disable: 4201)
00011 #pragma warning(disable: 4514)
00012
00013 #include <windows.h>
00014
00015 int CALLBACK LibMain(HINSTANCE, WORD, WORD, LPSTR)
00016 {
00017   return 1;
00018 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mtrecalc.h Source File

  • advanced
  • mtrecalc

mtrecalc.h

Go to the documentation of this file.
00001 // mtrecalc.h : main header file for the MTRECALC application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 #define WM_USER_RECALC_IN_PROGRESS (WM_USER + 1)
00019 #define WM_USER_RECALC_DONE (WM_USER + 2)
00020 #define WM_USER_RECALC_NOW (WM_USER + 3)
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CRecalcApp:
00024 // See mtrecalc.cpp for the implementation of this class
00025 //
00026
00027 class CRecalcApp : public CWinApp
00028 {
00029 public:
00030   CRecalcApp();
00031
00032 // Overrides
00033   // ClassWizard generate virtual function overrides
00034   //{{AFX_VIRTUAL(CRecalcApp)
00035   public:
00036   virtual BOOL InitInstance();
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040
00041   //{{AFX_MSG(CRecalcApp)
00042   afx_msg void OnAppAbout();
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoDoc.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MSMoneyDemoDoc.cpp : implementation of the CMSMoneyDemoDoc class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMoneyDemo.h"
00015
00016 #include "MSMoneyDemoDoc.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CMSMoneyDemoDoc
00026
00027 IMPLEMENT_DYNCREATE(CMSMoneyDemoDoc, CDocument)
00028
00029 BEGIN_MESSAGE_MAP(CMSMoneyDemoDoc, CDocument)
00030   ON_COMMAND(ID_GO_BACK, OnGoBack)
00031   ON_UPDATE_COMMAND_UI(ID_GO_BACK, OnUpdateGoBack)
00032   ON_COMMAND(ID_GO_FORWARD, OnGoForward)
00033   ON_UPDATE_COMMAND_UI(ID_GO_FORWARD, OnUpdateGoForward)
00034   ON_COMMAND(ID_GO_ADDRESS, OnGoAddress)
00035   ON_UPDATE_COMMAND_UI(ID_GO_ADDRESS, OnUpdateGoAddress)
00036   ON_COMMAND(ID_VIEW_STOP, OnViewStop)
00037   ON_UPDATE_COMMAND_UI(ID_VIEW_STOP, OnUpdateViewStop)
00038   ON_COMMAND(ID_VIEW_REFRESH, OnViewRefresh)
00039   ON_UPDATE_COMMAND_UI(ID_VIEW_REFRESH, OnUpdateViewRefresh)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CMSMoneyDemoDoc construction/destruction
00044
00045 CMSMoneyDemoDoc::CMSMoneyDemoDoc()
00046 {
00047 }
00048
00049 CMSMoneyDemoDoc::~CMSMoneyDemoDoc()
00050 {
00051 }
00052
00053 BOOL CMSMoneyDemoDoc::OnNewDocument()
00054 {
00055   if (!CDocument::OnNewDocument())
00056     return FALSE;
00057
00058   // TODO: add reinitialization code here
00059   // (SDI documents will reuse this document)
00060
00061   return TRUE;
00062 }
00063
00064
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CMSMoneyDemoDoc serialization
00068
00069 void CMSMoneyDemoDoc::Serialize(CArchive& ar)
00070 {
00071   if (ar.IsStoring())
00072   {
00073     // TODO: add storing code here
00074   }
00075   else
00076   {
00077     // TODO: add loading code here
00078   }
00079 }
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CMSMoneyDemoDoc diagnostics
00083
00084 #ifdef _DEBUG
00085 void CMSMoneyDemoDoc::AssertValid() const
00086 {
00087   CDocument::AssertValid();
00088 }
00089
00090 void CMSMoneyDemoDoc::Dump(CDumpContext& dc) const
00091 {
00092   CDocument::Dump(dc);
00093 }
00094 #endif //_DEBUG
00095
00096 /////////////////////////////////////////////////////////////////////////////
00097 // CMSMoneyDemoDoc commands
00098
00099 void CMSMoneyDemoDoc::OnGoBack()
00100 {
00101 }
00102
00103 void CMSMoneyDemoDoc::OnUpdateGoBack(CCmdUI* pCmdUI)
00104 {
00105   pCmdUI->Enable (IsBackAvailable ());
00106 }
00107
00108 void CMSMoneyDemoDoc::OnGoForward()
00109 {
00110 }
00111
00112 void CMSMoneyDemoDoc::OnUpdateGoForward(CCmdUI* pCmdUI)
00113 {
00114   pCmdUI->Enable (IsFrwdAvailable ());
00115 }
00116
00117 void CMSMoneyDemoDoc::OnGoAddress()
00118 {
00119 }
00120
00121 void CMSMoneyDemoDoc::OnUpdateGoAddress(CCmdUI* pCmdUI)
00122 {
00123   pCmdUI->Enable (TRUE);
00124 }
00125
00126 void CMSMoneyDemoDoc::OnViewStop()
00127 {
00128 }
00129
00130 void CMSMoneyDemoDoc::OnUpdateViewStop(CCmdUI* pCmdUI)
00131 {
00132   pCmdUI->Enable (TRUE);
00133 }
00134
00135 void CMSMoneyDemoDoc::OnViewRefresh()
00136 {
00137 }
00138
00139 void CMSMoneyDemoDoc::OnUpdateViewRefresh(CCmdUI* pCmdUI)
00140 {
00141   pCmdUI->Enable (TRUE);
00142 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MailBar.h Source File

  • vc2008fp
  • OutlookDemo

MailBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CMailBar dialog
00014
00015 class CMailBar : public CPaneDialog
00016 {
00017 // Construction
00018 public:
00019   CMailBar();   // standard constructor
00020
00021 // Dialog Data
00022   enum { IDD = IDD_MAILBAR };
00023
00024 // Overrides
00025 protected:
00026   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00027
00028   virtual BOOL AllowShowOnPaneMenu() const
00029   {
00030     return FALSE;
00031   }
00032
00033 // Implementation
00034 protected:
00035   afx_msg void OnSize(UINT nType, int cx, int cy);
00036   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00037   afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
00038
00039   DECLARE_MESSAGE_MAP()
00040
00041   void AdjustWidth(int cx, UINT uiCtrlID);
00042 };
00043
00044
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/stdafx.cpp Source File

  • general
  • viewex

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : pre-compiled header and types file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistdoc.cpp Source File

  • general
  • rowlist

rlistdoc.cpp

Go to the documentation of this file.
00001 // RListDoc.cpp : implementation of the CRowListDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "RowList.h"
00014
00015 #include "RListDoc.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CRowListDoc
00025
00026 IMPLEMENT_DYNCREATE(CRowListDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CRowListDoc, CDocument)
00029   //{{AFX_MSG_MAP(CRowListDoc)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CRowListDoc construction/destruction
00037
00038 CRowListDoc::CRowListDoc()
00039 {
00040   // TODO: add one-time construction code here
00041
00042 }
00043
00044 CRowListDoc::~CRowListDoc()
00045 {
00046 }
00047
00048 BOOL CRowListDoc::OnNewDocument()
00049 {
00050   if (!CDocument::OnNewDocument())
00051     return FALSE;
00052
00053   // TODO: add reinitialization code here
00054   // (SDI documents will reuse this document)
00055
00056   return TRUE;
00057 }
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CRowListDoc serialization
00061
00062 void CRowListDoc::Serialize(CArchive& ar)
00063 {
00064   if (ar.IsStoring())
00065   {
00066     // TODO: add storing code here
00067   }
00068   else
00069   {
00070     // TODO: add loading code here
00071   }
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CRowListDoc diagnostics
00076
00077 #ifdef _DEBUG
00078 void CRowListDoc::AssertValid() const
00079 {
00080   CDocument::AssertValid();
00081 }
00082
00083 void CRowListDoc::Dump(CDumpContext& dc) const
00084 {
00085   CDocument::Dump(dc);
00086 }
00087 #endif //_DEBUG
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CRowListDoc commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/Explorer.h Source File

  • vc2008fp
  • Explorer

Explorer.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CExplorerApp:
00021 // See Explorer.cpp for the implementation of this class
00022 //
00023
00024 class CExplorerApp : public CWinAppEx
00025 {
00026 public:
00027   CExplorerApp();
00028
00029   // Override from CWorkspace
00030   virtual void PreLoadState ();
00031
00032
00033 // Overrides
00034   public:
00035   virtual BOOL InitInstance();
00036   virtual int ExitInstance();
00037
00038 // Implementation
00039   afx_msg void OnAppAbout();
00040
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044
00045 extern CExplorerApp theApp;
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/hello.cpp Source File

  • general
  • mdi

hello.cpp

Go to the documentation of this file.
00001 // hello.cpp : Defines the class behaviors for the Hello child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "hello.h"
00015 #include "mdi.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CHelloWnd Member Functions
00019
00020 BEGIN_MESSAGE_MAP(CHelloWnd, CMDIChildWnd)
00021   //{{AFX_MSG_MAP(CHelloWnd)
00022   ON_WM_PAINT()
00023   ON_COMMAND(IDM_BLACK, OnColor)
00024   ON_COMMAND(IDM_CUSTOM, OnCustomColor)
00025   ON_COMMAND(IDM_RED, OnColor)
00026   ON_COMMAND(IDM_GREEN, OnColor)
00027   ON_COMMAND(IDM_BLUE, OnColor)
00028   ON_COMMAND(IDM_WHITE, OnColor)
00029   ON_UPDATE_COMMAND_UI(IDM_BLACK, OnUpdateColor)
00030   ON_UPDATE_COMMAND_UI(IDM_BLUE, OnUpdateColor)
00031   ON_UPDATE_COMMAND_UI(IDM_GREEN, OnUpdateColor)
00032   ON_UPDATE_COMMAND_UI(IDM_RED, OnUpdateColor)
00033   ON_UPDATE_COMMAND_UI(IDM_WHITE, OnUpdateColor)
00034   ON_UPDATE_COMMAND_UI(IDM_CUSTOM, OnUpdateColor)
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 CMenu NEAR CHelloWnd::menu;     // menu for all HELLO windows
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CHelloWnd construction
00042
00043 BOOL CHelloWnd::Create(LPCTSTR szTitle, LONG style /* = 0 */,
00044   const RECT& rect /* = rectDefault */,
00045   CMDIFrameWnd* parent /* = NULL */)
00046 {
00047   // Setup the shared menu
00048   if (menu.m_hMenu == NULL)
00049     menu.LoadMenu(IDR_HELLO);
00050   m_hMenuShared = menu.m_hMenu;
00051
00052   // Register a custom WndClass and create a window.
00053   // This must be done because CHelloWnd has a custom icon.
00054
00055   LPCTSTR lpszHelloClass =
00056       AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
00057       LoadCursor(NULL, IDC_ARROW),
00058       (HBRUSH) (COLOR_WINDOW+1),
00059       LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_HELLO)));
00060
00061   return CMDIChildWnd::Create(lpszHelloClass, szTitle, style, rect, parent);
00062 }
00063
00064 CHelloWnd::CHelloWnd()
00065 {
00066   m_nIDColor = IDM_BLACK;
00067   m_clrText = RGB(0, 0, 0);
00068 }
00069
00070 // OnPaint:
00071 // Draw a string in the center of the client area.
00072 //
00073 void CHelloWnd::OnPaint()
00074 {
00075   CPaintDC dc(this);
00076   CRect rect;
00077
00078   dc.SetTextColor(m_clrText);
00079   dc.SetBkColor(::GetSysColor(COLOR_WINDOW));
00080   GetClientRect(rect);
00081   dc.DrawText(_T("Hello, World!"), -1, rect,
00082     DT_SINGLELINE | DT_CENTER | DT_VCENTER);
00083 }
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CHelloWnd command
00087
00088 void CHelloWnd::OnUpdateColor(CCmdUI* pCmdUI)
00089 {
00090   pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
00091 }
00092
00093 void CHelloWnd::OnColor()
00094 {
00095   m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
00096   m_clrText = colorArray[m_nIDColor - IDM_BLACK];
00097
00098   // Force the client area text to be repainted in the new color
00099   Invalidate();
00100 }
00101
00102 void CHelloWnd::OnCustomColor()
00103 {
00104   CColorDialog dlgColor(m_clrText);
00105   if (dlgColor.DoModal() == IDOK)
00106   {
00107     m_clrText = dlgColor.GetColor();
00108     m_nIDColor = IDM_CUSTOM;
00109     Invalidate();
00110   }
00111 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/netaddr/NetAddrVerifier.h Source File

  • controls
  • netaddr

NetAddrVerifier.h

Go to the documentation of this file.
00001 // NetAddrVerifier.h : main header file for the PROJECT_NAME application
00002 //
00003
00004 #pragma once
00005
00006 #ifndef __AFXWIN_H__
00007   #error "include 'stdafx.h' before including this file for PCH"
00008 #endif
00009
00010 #include "resource.h"   // main symbols
00011
00012
00013 // CNetAddrVerifierApp:
00014 // See NetAddrVerifier.cpp for the implementation of this class
00015 //
00016
00017 class CNetAddrVerifierApp : public CWinApp
00018 {
00019 public:
00020   CNetAddrVerifierApp();
00021
00022 // Overrides
00023   public:
00024   virtual BOOL InitInstance();
00025
00026 // Implementation
00027
00028   DECLARE_MESSAGE_MAP()
00029   afx_msg void OnVerifyIPv4();
00030 };
00031
00032 extern CNetAddrVerifierApp theApp;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAboutDlg Member List

This is the complete list of members for CAboutDlg, including all inherited members.
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg | [inline]
CAboutDlg(CWnd *pParent=NULL) | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg | [inline]
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
CAboutDlg() | CAboutDlg |
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
IDD enum value | CAboutDlg |
m_AppName | CAboutDlg |
m_Cancel | CAboutDlg |
m_Copyright | CAboutDlg |
m_Group | CAboutDlg |
m_WrittenBy | CAboutDlg |
OnInitDialog() | CAboutDlg | [protected, virtual]
OnInitDialog() | CAboutDlg | [protected, virtual]
OnInitDialog() | CAboutDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagINTERVAL Member List

This is the complete list of members for tagINTERVAL, including all inherited members.
atBegin | tagINTERVAL
atEnd | tagINTERVAL
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpdoc.h Source File

  • vc2008fp
  • WordPad

wordpdoc.h

Go to the documentation of this file.
00001 //
00002 // wordpdoc.h : interface of the CWordPadDoc class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 class CFormatBar;
00015 class CWordPadSrvrItem;
00016 class CWordPadView;
00017
00018 class CWordPadDoc : public CRichEditDoc
00019 {
00020 protected: // create from serialization only
00021   CWordPadDoc();
00022   DECLARE_DYNCREATE(CWordPadDoc)
00023
00024 // Attributes
00025 public:
00026   int m_nDocType;
00027   int m_nNewDocType;
00028   void SetDocType(int nDocType, BOOL bNoOptionChange = FALSE);
00029   CWordPadView* GetView();
00030   CLSID GetClassID();
00031   LPCTSTR GetSection();
00032
00033 // Operations
00034 public:
00035   void SaveState(int nType);
00036   void RestoreState(int nType);
00037   virtual CFile* GetFile(LPCTSTR pszPathName, UINT nOpenFlags,
00038     CFileException* pException);
00039   virtual BOOL DoSave(LPCTSTR pszPathName, BOOL bReplace = TRUE);
00040   int MapType(int nType);
00041   void ForceDelayed(CFrameWnd* pFrameWnd);
00042
00043 // Overrides
00044   virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo) const;
00045   virtual void OnDeactivateUI(BOOL bUndoable);
00046   virtual void Serialize(CArchive& ar);
00047
00048   // ClassWizard generated virtual function overrides
00049   //{{AFX_VIRTUAL(CWordPadDoc)
00050   public:
00051   virtual BOOL OnNewDocument();
00052   virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
00053   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00054   virtual void OnCloseDocument();
00055   virtual void ReportSaveLoadException(LPCTSTR lpszPathName, CException* e, BOOL bSaving, UINT nIDPDefault);
00056   virtual void SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE);
00057   protected:
00058   virtual COleServerItem* OnGetEmbeddedItem();
00059   //}}AFX_VIRTUAL
00060
00061 // Implementation
00062 public:
00063   virtual void PreCloseFrame(CFrameWnd* pFrameArg);
00064 #ifdef _DEBUG
00065   virtual void AssertValid() const;
00066   virtual void Dump(CDumpContext& dc) const;
00067 #endif
00068
00069 // Generated message map functions
00070 protected:
00071   //{{AFX_MSG(CWordPadDoc)
00072   afx_msg void OnViewOptions();
00073   afx_msg void OnUpdateOleVerbPopup(CCmdUI* pCmdUI);
00074   afx_msg void OnFileSendMail();
00075   afx_msg void OnUpdateIfEmbedded(CCmdUI* pCmdUI);
00076   //}}AFX_MSG
00077   afx_msg void OnUpdateObjectVerbMenu(CCmdUI* pCmdUI);
00078   DECLARE_MESSAGE_MAP()
00079 };
00080
00081 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiroDoc.cpp Source File

  • general
  • spiro

spiroDoc.cpp

Go to the documentation of this file.
00001 // spiroDoc.cpp : implementation of the CSpiroDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "spiro.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 extern CSpiroView* g_pView;
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CFigure and CFigCommand
00025
00026 void CFigCommand::Serialize(CArchive& ar)
00027 {
00028   if (ar.IsStoring())
00029   {
00030     ar << m_type;
00031     ar << m_point.x;
00032     ar << m_point.y;
00033     ar << m_ptWheelPos.x;
00034     ar << m_ptWheelPos.y;
00035     ar << m_nPenWidth;
00036   }
00037   else
00038   {
00039     DWORD dw;
00040
00041     ar >> dw; m_type = (TRACE_COMMAND)dw;
00042     ar >> m_point.x;
00043     ar >> m_point.y;
00044     ar >> m_ptWheelPos.x;
00045     ar >> m_ptWheelPos.y;
00046     ar >> m_nPenWidth;
00047   }
00048 }
00049
00050 CFigure::CFigure() : m_rectBound(9000, 0, 0, 9000)
00051 {
00052   m_nTotalTraces = 0;
00053   m_nTotalDrawn = 0;
00054   m_arrCommands.SetSize(0, 2000);
00055   m_nTracesPerColor = 0;
00056   m_nTracesThisColor = 0;
00057 }
00058
00059 CFigure::CFigure(CFigure* pFig)
00060 {
00061   ENSURE(pFig != NULL);
00062   m_nTotalTraces = pFig->m_nTotalTraces;
00063   m_nTotalDrawn = pFig->m_nTotalDrawn;
00064   m_nTracesPerColor = pFig->m_nTracesPerColor;
00065   m_nTracesThisColor = pFig->m_nTracesThisColor;
00066   m_rectBound = pFig->m_rectBound;
00067   INT_PTR nSize = pFig->m_arrCommands.GetSize();
00068   m_arrCommands.SetSize(nSize);
00069   CFigCommand figCommand;
00070
00071   for (int i = 0; i < nSize; i++)
00072   {
00073     figCommand = pFig->m_arrCommands.GetAt(i);
00074     m_arrCommands.SetAt(i, figCommand);
00075   }
00076 }
00077
00078 CFigure::~CFigure()
00079 {
00080   m_arrCommands.RemoveAll();
00081 }
00082
00083 void CFigure::AddCommand(TRACE_COMMAND com, int nWidth)
00084 {
00085   ENSURE(com == SET_PEN_WIDTH);
00086   ENSURE(nWidth > 0);
00087   CFigCommand figcom;
00088   figcom.m_type = com;
00089   figcom.m_nPenWidth = nWidth;
00090   m_arrCommands.SetAtGrow(m_nTotalTraces, figcom);
00091   ASSERT(m_arrCommands.GetUpperBound() == m_nTotalTraces);
00092   m_nTotalTraces++;
00093 }
00094
00095 void CFigure::AddCommand(TRACE_COMMAND com, COLORREF co)
00096 {
00097   ASSERT(com == CHANGE_COLOR);
00098   CFigCommand figcom;
00099   figcom.m_type = com;
00100   figcom.m_co = co;
00101   m_arrCommands.SetAtGrow(m_nTotalTraces, figcom);
00102   ASSERT(m_arrCommands.GetUpperBound() == m_nTotalTraces);
00103   m_nTotalTraces++;
00104 }
00105
00106
00107 void CFigure::AddCommand(TRACE_COMMAND com, CPoint point,
00108              CPoint ptWheelPos, double dWheelData, double dAnchorData)
00109 {
00110   ASSERT(com == MOVE_TO || com == LINE_TO);
00111   CFigCommand figcom;
00112   figcom.m_type = com;
00113   figcom.m_point = point;
00114   figcom.m_ptWheelPos = ptWheelPos;
00115   figcom.m_dWheelData = dWheelData;
00116   figcom.m_dAnchorData = dAnchorData;
00117   m_arrCommands.SetAtGrow(m_nTotalTraces, figcom);
00118   ASSERT(m_arrCommands.GetUpperBound() == m_nTotalTraces);
00119   m_nTotalTraces++;
00120
00121   // finally check if the new point grows the bounding rectangle
00122   m_rectBound.left = min(point.x - 2, m_rectBound.left);
00123   m_rectBound.right = max(point.x + 2, m_rectBound.right);
00124   m_rectBound.top = max(point.y + 2, m_rectBound.top);
00125   m_rectBound.bottom = min(point.y - 2, m_rectBound.bottom);
00126 }
00127
00128 void CFigure::Clean()
00129 {
00130   m_rectBound = CRect(1200, 0, 0, 18000);
00131   m_nTotalTraces = 0;
00132   m_arrCommands.RemoveAll();
00133   m_arrCommands.SetSize(0, 2000);
00134 }
00135
00136 // Draw gets the DC, the zoom information and the region occupied by the wheel component when
00137 // animation is active.  The points under the wheel do not need to be drawn.
00138 void CFigure::Draw(CDC* pDC, long nZoomNumer, long nZoomDenom
00139                   , CRgn* /*prgnWheel*/, CSpiroRect* prectClip) const
00140 {
00141   ENSURE(pDC != NULL);
00142   ENSURE(pDC->GetMapMode() == MM_SPIRO);
00143
00144   if (m_nTotalDrawn == 0)
00145     return;
00146
00147   int     nPenWidth = -1;
00148   COLORREF  coPen = 0;
00149
00150   bool  bPrinting = pDC->IsPrinting() != 0;
00151
00152   // Check if the figure is totally off the clip rectangle and return if this is the case
00153   if (!bPrinting)
00154   {
00155     CSpiroRect rectFig(m_rectBound);
00156     rectFig.Scale(nZoomNumer, nZoomDenom);  // scale the figure to compare against scaled clip rectangle
00157     if (!rectFig.IntersectRect(prectClip))
00158       return;
00159   }
00160
00161   CPen* pPenNew = NULL;
00162   CPen* pPenOld = NULL;
00163
00164   int nFirst = 0;
00165   int nLast = m_nTotalDrawn;
00166
00167   ENSURE(g_pView != NULL && g_pView->IsKindOf(RUNTIME_CLASS(CSpiroView)));
00168
00169   long  cyExtent = g_pView->GetDocument()->m_sizeExtent.cy;
00170
00171   ENSURE(cyExtent > 0);
00172
00173   pPenNew = new CPen(PS_SOLID, g_pView->m_nCurrentPenWidth, g_pView->m_coCurrentPen);
00174   pPenOld = pDC->SelectObject(pPenNew);
00175
00176   bool bLastTrace = nLast == m_arrCommands.GetUpperBound();
00177   CPoint* prgPoint = new CPoint[m_nTotalDrawn];
00178
00179   CPoint    ptLast(-5000, -5000);
00180   CPoint    ptTest;
00181
00182   int   nTotalPoints = 0;
00183   CFigCommand figCommand;
00184   for (int i = nFirst; i <= m_nTotalDrawn; i++)
00185   {
00186     figCommand = m_arrCommands.GetAt(i);
00187     switch (figCommand.m_type)
00188     {
00189     case SET_PEN_WIDTH:
00190     case CHANGE_COLOR:
00191       if (nTotalPoints != 0)  // flush the accumulated lines
00192       {
00193         ENSURE(nTotalPoints > 1);
00194         pDC->Polyline(prgPoint, nTotalPoints);
00195         nTotalPoints = 0;
00196       }
00197
00198       if (figCommand.m_type == SET_PEN_WIDTH)
00199         nPenWidth = figCommand.m_nPenWidth;
00200       else
00201         coPen = figCommand.m_co;
00202
00203       ENSURE(pPenNew != NULL);
00204       ENSURE(pPenOld != NULL);
00205       VERIFY(pDC->SelectObject(pPenOld) == pPenNew);
00206       VERIFY(pPenNew->DeleteObject());
00207       pPenNew->CreatePen(PS_SOLID, nPenWidth,  coPen);
00208
00209       pDC->SelectObject(pPenNew);
00210
00211       break;
00212
00213     case MOVE_TO:
00214       if (bPrinting)
00215         pDC->MoveTo(figCommand.m_point.x, figCommand.m_point.y);
00216       else
00217       {
00218         // flush the GDI line drawing command if there is any
00219         if (nTotalPoints != 0)  // 1 point is just a MoveTo.  Don't use it.
00220         {
00221           ENSURE(nTotalPoints > 1);
00222           pDC->Polyline(prgPoint, nTotalPoints);
00223           nTotalPoints = 0;
00224         }
00225
00226         ptLast.x = figCommand.m_point.x * nZoomNumer / nZoomDenom;
00227         ptLast.y = figCommand.m_point.y * nZoomNumer / nZoomDenom;
00228       }
00229       break;
00230
00231     case LINE_TO:
00232       if (bPrinting)
00233       {
00234         prgPoint[nTotalPoints].x = figCommand.m_point.x;
00235         prgPoint[nTotalPoints++].y = figCommand.m_point.y;
00236       }
00237       else
00238       {
00239         ptTest.x = figCommand.m_point.x * nZoomNumer / nZoomDenom;
00240         ptTest.y = figCommand.m_point.y * nZoomNumer / nZoomDenom;
00241
00242         if (prectClip->LineInRect(ptLast, ptTest))  // line is visible and not under wheel
00243           //      && (prgnWheel == NULL ||
00244           //        !prgnWheel->PtInRegion(ptLast) || !prgnWheel->PtInRegion(ptTest)))
00245         {
00246           ENSURE(ptLast.x != -5000 && ptLast.y != 5000);  // there should be a MOVE_TO before
00247           if (nTotalPoints == 0)  // need to insert ptLast
00248             prgPoint[nTotalPoints++] = ptLast;
00249
00250           prgPoint[nTotalPoints++] = ptTest;
00251         }
00252         else   // if not visible, add point and flush
00253         {
00254           if (nTotalPoints != 0)
00255           {
00256             ENSURE(nTotalPoints > 1);
00257             pDC->Polyline(prgPoint, nTotalPoints);
00258             nTotalPoints = 0;
00259           }
00260         }
00261
00262         ptLast = ptTest;
00263       }
00264     }
00265   }
00266
00267   if (bLastTrace)   // connect to the first point to close the picture
00268   {
00269     INT_PTR nLastItem = m_arrCommands.GetUpperBound();
00270     int nPasses = 0;
00271
00272     for (int i = 0; i <= nLastItem && nPasses < 2; i++)
00273     {
00274       figCommand = m_arrCommands.GetAt(i);
00275       if (figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO)
00276       {
00277         if (bPrinting)
00278         {
00279           prgPoint[nTotalPoints].x = figCommand.m_point.x;
00280           prgPoint[nTotalPoints++].y = figCommand.m_point.y;
00281         }
00282         else
00283         {
00284           if (nTotalPoints == 0)
00285             prgPoint[nTotalPoints++] = ptLast;
00286
00287           prgPoint[nTotalPoints].x = figCommand.m_point.x * nZoomNumer / nZoomDenom;
00288           prgPoint[nTotalPoints++].y = figCommand.m_point.y * nZoomNumer / nZoomDenom;
00289         }
00290
00291         // draws 2 segments at the end to avoid leaving the last pixel undrawn
00292         nPasses++;
00293       }
00294     }
00295
00296     if (this == g_pView->GetDocument()->m_pFigureCurrent)
00297       g_pView->m_bDrawingDone = true;
00298   }
00299
00300   if (nTotalPoints != 0)  // flush the accumulated lines
00301   {
00302     ENSURE(nTotalPoints >= 1);
00303     pDC->Polyline(prgPoint, nTotalPoints);
00304     nTotalPoints = 0;
00305   }
00306
00307   ENSURE(pPenOld != NULL)   ;
00308   pDC->SelectObject(pPenOld);
00309   delete pPenNew;
00310
00311   CSpiroDoc* pDoc = g_pView->GetDocument();
00312   ENSURE(pDoc != NULL);
00313   delete[] prgPoint;
00314 }
00315
00316 void CFigure::GetBoundingRect(CRect* pRect) const
00317 {
00318   ENSURE(pRect != NULL);
00319   *pRect = m_rectBound;
00320 }
00321
00322 void CFigure::Serialize(CArchive& ar)
00323 {
00324   DWORD     dw;
00325   CFigCommand   figCommand;
00326
00327   if (ar.IsStoring())
00328   {
00329     dw = m_nTotalDrawn; ar << dw;
00330     dw = m_nTotalTraces; ar << dw;
00331     dw = m_rectBound.left; ar << dw;
00332     dw = m_rectBound.right; ar << dw;
00333     dw = m_rectBound.top; ar << dw;
00334     dw = m_rectBound.bottom; ar << dw;
00335     dw = (DWORD)(m_arrCommands.GetUpperBound() + 1);
00336     ar << dw;
00337     for (int i = 0; i < (int)dw; i++)
00338     {
00339       figCommand = m_arrCommands.GetAt(i);
00340       figCommand.Serialize(ar);
00341     }
00342   }
00343   else
00344   {
00345     ar >> dw; m_nTotalDrawn = dw;
00346     ar >> dw; m_nTotalTraces = dw;
00347     ar >> dw; m_rectBound.left = dw;
00348     ar >> dw; m_rectBound.right = dw;
00349     ar >> dw; m_rectBound.top = dw;
00350     ar >> dw; m_rectBound.bottom = dw;
00351     ar >> dw;
00352     for (int i = 0; i < (int)dw; i++)
00353     {
00354       figCommand.Serialize(ar);
00355       m_arrCommands.SetAtGrow(i, figCommand);
00356     }
00357   }
00358 }
00359
00360 bool CFigure::MoveFigure(CPoint ptCorner, CSpiroDoc* pDoc)
00361 {
00362   pDoc->SetModifiedFlag();
00363
00364   // does the user want to remove the picture from the drawing?
00365   if (ptCorner.x > pDoc->m_sizeExtent.cx || ptCorner.y < 0)
00366   {
00367     delete this;
00368     return false;  // figure was deleted
00369   }
00370
00371   CSize sizeOffset(ptCorner.x - m_rectBound.left + 2, ptCorner.y - m_rectBound.top + 2);
00372   m_rectBound.OffsetRect(sizeOffset);  //LO_ENGLISH METRICS USED
00373
00374   CFigCommand figCommand;
00375   INT_PTR iLast = m_arrCommands.GetUpperBound();
00376   for (int i = 0; i <= iLast; i++)
00377   {
00378     figCommand = m_arrCommands.GetAt(i);
00379     if (figCommand.m_type != LINE_TO && figCommand.m_type != MOVE_TO)
00380       continue;
00381
00382     figCommand.m_point.Offset(sizeOffset);
00383     m_arrCommands.SetAt(i, figCommand);
00384   }
00385
00386   iLast = pDoc->m_arrPFigures.GetUpperBound() + 1;
00387   pDoc->m_arrPFigures.SetAtGrow(iLast, this);
00388   return true;
00389 }
00390
00391 /////////////////////////////////////////////////////////////////////////////
00392 // CSpiroDoc
00393
00394 IMPLEMENT_DYNCREATE(CSpiroDoc, CDocument)
00395
00396 BEGIN_MESSAGE_MAP(CSpiroDoc, CDocument)
00397   //{{AFX_MSG_MAP(CSpiroDoc)
00398     // NOTE - the ClassWizard will add and remove mapping macros here.
00399     //    DO NOT EDIT what you see in these blocks of generated code!
00400   //}}AFX_MSG_MAP
00401 END_MESSAGE_MAP()
00402
00403 /////////////////////////////////////////////////////////////////////////////
00404 // CSpiroDoc construction/destruction
00405
00406 CSpiroDoc::CSpiroDoc() : m_sizeExtent(1100, 1700)
00407 {
00408   m_bThickPen = false;
00409   m_pFigureCurrent = new CFigure();
00410 }
00411
00412 CSpiroDoc::~CSpiroDoc()
00413 {
00414   delete m_pFigureCurrent;
00415   INT_PTR nLast = m_arrPFigures.GetUpperBound();
00416   CFigure* pFig;
00417
00418   for (int i = 0; i <= nLast; i++)
00419   {
00420     pFig = (CFigure*)m_arrPFigures.GetAt(i);
00421     ENSURE(pFig != NULL);
00422     delete pFig;
00423   }
00424
00425   m_arrPFigures.RemoveAll();
00426 }
00427
00428 BOOL CSpiroDoc::OnNewDocument()
00429 {
00430   if (!CDocument::OnNewDocument())
00431     return FALSE;
00432
00433   m_bThickPen = false;
00434   if (m_pFigureCurrent == NULL)
00435     m_pFigureCurrent = new CFigure();
00436   else
00437     m_pFigureCurrent->Clean();
00438
00439   return TRUE;
00440 }
00441
00442
00443
00444 /////////////////////////////////////////////////////////////////////////////
00445 // CSpiroDoc serialization
00446
00447 void CSpiroDoc::Serialize(CArchive& ar)
00448 {
00449   DWORD dw;
00450
00451   if (ar.IsStoring())
00452   {
00453     dw = m_sizeExtent.cx;
00454     ar << dw; // store the extent
00455     dw = m_sizeExtent.cy;
00456     ar << dw;
00457     dw = (DWORD)(m_arrPFigures.GetUpperBound() + 1);
00458     ar << dw;  // number of fixed figures
00459     for (int i = 0; i < (int)dw; i++)
00460     {
00461       CFigure* pFig = (CFigure*)m_arrPFigures.GetAt(i);
00462       ENSURE(pFig != NULL);
00463       pFig->Serialize(ar);
00464     }
00465
00466     m_pFigureCurrent->Serialize(ar);
00467   }
00468   else
00469   {
00470     ar >> dw;
00471     m_sizeExtent.cx = dw;
00472     ar >> dw;
00473     m_sizeExtent.cy = dw;
00474     ar >> dw;  // count of figures
00475     CFigure* pFig;
00476
00477     for (int i = 0; i < (int)dw; i ++)
00478     {
00479       pFig = new CFigure();
00480       pFig->Serialize(ar);
00481       m_arrPFigures.SetAtGrow(i, pFig);
00482     }
00483
00484     m_pFigureCurrent = new CFigure();
00485     m_pFigureCurrent->Serialize(ar);
00486   }
00487 }
00488
00489 /////////////////////////////////////////////////////////////////////////////
00490 // CSpiroDoc diagnostics
00491
00492 #ifdef _DEBUG
00493 void CSpiroDoc::AssertValid() const
00494 {
00495   CDocument::AssertValid();
00496 }
00497
00498 void CSpiroDoc::Dump(CDumpContext& dc) const
00499 {
00500   CDocument::Dump(dc);
00501 }
00502 #endif //_DEBUG
00503
00504 /////////////////////////////////////////////////////////////////////////////
00505 // CSpiroDoc commands
00506
00507 // this function is called when the figure is made permanent and is transfered
00508 // to the array of figures inside the document.
00509 void CSpiroDoc::TransferCurrentFigure()
00510 {
00511   ENSURE(m_pFigureCurrent != NULL);
00512   if (m_pFigureCurrent->m_nTotalDrawn == 0)  // the figure is empty
00513   {
00514     m_pFigureCurrent->Clean();
00515     return;
00516   }
00517
00518   ENSURE(g_pView != NULL);
00519   // if there is an anchor, set the angle of the anchor
00520   if (g_pView->m_pAnchor != NULL)
00521   {
00522     CFigCommand figCommand;
00523
00524     int i;
00525     for (i = m_pFigureCurrent->m_nTotalDrawn - 1; i >= 0; i--)
00526     {
00527       figCommand = m_pFigureCurrent->m_arrCommands.GetAt(i);
00528       if (figCommand.m_type == MOVE_TO || figCommand.m_type == LINE_TO)
00529       {
00530         g_pView->m_pAnchor->SetFigData(figCommand.m_dAnchorData);
00531         break;
00532       }
00533     }
00534
00535     ENSURE(i != -1);
00536   }
00537
00538   INT_PTR nIndex = m_arrPFigures.GetUpperBound() + 1;
00539   ENSURE(m_pFigureCurrent != NULL);
00540   m_arrPFigures.SetAtGrow(nIndex, m_pFigureCurrent);
00541   m_pFigureCurrent = new CFigure();
00542   g_pView->m_bDrawingDone = false;
00543 }
00544
00545 void CSpiroDoc::DeleteContents()
00546 {
00547   INT_PTR nLast = m_arrPFigures.GetUpperBound();
00548   CFigure* pFig;
00549
00550   POSITION pos = GetFirstViewPosition();
00551   CSpiroView* pView;
00552
00553   if (pos != NULL)  // on shut down the view has been destroyed already
00554   {
00555     pView = (CSpiroView*)GetNextView(pos);
00556     ENSURE(pView != NULL && pView->IsKindOf(RUNTIME_CLASS(CSpiroView)));
00557     delete pView->m_pAnchor;
00558     delete pView->m_pWheel;
00559     pView->m_pAnchor = NULL;
00560     pView->m_pWheel = NULL;
00561   }
00562
00563   for (int i = 0; i <= nLast; i++)
00564   {
00565     pFig = (CFigure*)m_arrPFigures.GetAt(i);
00566     delete pFig;
00567   }
00568
00569   m_arrPFigures.RemoveAll();
00570   delete m_pFigureCurrent;
00571   m_pFigureCurrent = NULL;
00572
00573   CDocument::DeleteContents();
00574 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoView.h Source File

  • vc2008fp
  • OutlookDemo

OutlookDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class COutlookDemoView : public CListView
00013 {
00014 protected: // create from serialization only
00015   COutlookDemoView();
00016   DECLARE_DYNCREATE(COutlookDemoView)
00017
00018 // Attributes
00019 public:
00020   COutlookDemoDoc* GetDocument();
00021
00022 protected:
00023   CImageList m_ImagesHeader;
00024   CImageList m_ImagesList;
00025
00026 // Overrides
00027 public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030
00031 protected:
00032   virtual void OnInitialUpdate(); // called first time after construct
00033   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00034   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00035   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00036
00037 // Implementation
00038 public:
00039   virtual ~COutlookDemoView();
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045 protected:
00046   afx_msg void OnViewPreviewPane();
00047   afx_msg void OnUpdateViewPreviewPane(CCmdUI* pCmdUI);
00048   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00049   afx_msg void OnContextMenu(CWnd*, CPoint point);
00050   afx_msg void OnFilePrintPreview();
00051
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 #ifndef _DEBUG  // debug version in OutlookDemoView.cpp
00056 inline COutlookDemoDoc* COutlookDemoView::GetDocument() { return(COutlookDemoDoc*)m_pDocument; }
00057 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/intlstvw.h Source File

  • advanced
  • collect

intlstvw.h

Go to the documentation of this file.
00001 // intlstvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CIntListView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CIntListView : public CFormView
00020 {
00021 public:
00022   CIntListView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CIntListView)
00024
00025 // Attributes
00026 public:
00027   CCollectDoc* GetDocument();
00028
00029 // Overrides
00030 public:
00031   void OnInitialUpdate();
00032
00033 // Form Data
00034 public:
00035   //{{AFX_DATA(CIntListView)
00036   enum { IDD = IDD_INT_LIST };
00037   CListBox    m_ctlList;
00038   int     m_int;
00039   //}}AFX_DATA
00040
00041 // Attributes
00042 public:
00043
00044 // Operations
00045 public:
00046
00047 // Overrides
00048   // ClassWizard generate virtual function overrides
00049   //{{AFX_VIRTUAL(CIntListView)
00050   protected:
00051   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052   //}}AFX_VIRTUAL
00053
00054
00055 // Implementation
00056 protected:
00057   BOOL FindInt(int& nSel, POSITION& pos);
00058   void AddIntToListBox(int n, int nSel = -1);
00059
00060   virtual ~CIntListView();
00061 #ifdef _DEBUG
00062   virtual void AssertValid() const;
00063   virtual void Dump(CDumpContext& dc) const;
00064 #endif
00065
00066   // Generated message map functions
00067   //{{AFX_MSG(CIntListView)
00068   afx_msg void OnAdd();
00069   afx_msg void OnUpdateButton();
00070   afx_msg void OnRemove();
00071   afx_msg void OnRemoveAll();
00072   afx_msg void OnSelChangeList();
00073   afx_msg void OnInsertBefore();
00074   //}}AFX_MSG
00075   DECLARE_MESSAGE_MAP()
00076 };
00077
00078 #ifndef _DEBUG
00079 inline CCollectDoc* CIntListView::GetDocument()
00080    { return (CCollectDoc*)m_pDocument; }
00081 #endif
00082
00083 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHTMLEditApp Member List

This is the complete list of members for CHTMLEditApp, including all inherited members.
CHTMLEditApp() | CHTMLEditApp |
InitInstance() | CHTMLEditApp | [virtual]
OnAppAbout() | CHTMLEditApp |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/ChildFrm.h Source File

  • vc2008fp
  • TabbedView

ChildFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CMDIChildWnd CMDIChildWndEx
00014
00015 class CChildFrame : public CMDIChildWnd
00016 {
00017   DECLARE_DYNCREATE(CChildFrame)
00018 public:
00019   CChildFrame();
00020
00021 // Attributes
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029
00030 // Implementation
00031 public:
00032   virtual ~CChildFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/EmpView.h Source File

  • general
  • DBVList

EmpView.h

Go to the documentation of this file.
00001 // EmpView.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_EMPVIEW_H__1FF640C9_B507_11D0_BE98_00C04FC99F83__INCLUDED_)
00013 #define AFX_EMPVIEW_H__1FF640C9_B507_11D0_BE98_00C04FC99F83__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CEmpView view
00021
00022 class CEmpView : public CListView
00023 {
00024 protected:
00025   CEmpView();           // protected constructor used by dynamic creation
00026   DECLARE_DYNCREATE(CEmpView)
00027
00028 // Attributes
00029 public:
00030   CDBVListDoc* GetDocument();
00031
00032 // Operations
00033 public:
00034   void UpdateFilter(CString strCurQuery);
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CEmpView)
00039   public:
00040   virtual void OnInitialUpdate();
00041   virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
00042   protected:
00043   //}}AFX_VIRTUAL
00044   void PrepareCache(int iFrom, int iTo);
00045   void GetDispInfo(LVITEM* pItem);
00046   int FindItem(int iStart, LVFINDINFO* plvfi);
00047
00048 // Implementation
00049 protected:
00050   virtual ~CEmpView();
00051 #ifdef _DEBUG
00052   virtual void AssertValid() const;
00053   virtual void Dump(CDumpContext& dc) const;
00054 #endif
00055
00056   // Generated message map functions
00057 protected:
00058   //{{AFX_MSG(CEmpView)
00059     // NOTE - the ClassWizard will add and remove member functions here.
00060   //}}AFX_MSG
00061   afx_msg void OnColumnClick(UINT id, NMHDR* pNotifyStruct, LRESULT* pResult);
00062
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
00066 #ifndef _DEBUG  // debug version in DBVListView.cpp
00067 inline CDBVListDoc* CEmpView::GetDocument()
00068    { return (CDBVListDoc*)m_pDocument; }
00069 #endif
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072
00073 //{{AFX_INSERT_LOCATION}}
00074 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00075
00076 #endif // !defined(AFX_EMPVIEW_H__1FF640C9_B507_11D0_BE98_00C04FC99F83__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/guid.cpp Source File

  • ole
  • oleview
  • iviewers

guid.cpp

Go to the documentation of this file.
00001 // guid.cpp
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include <initguid.h>
00015 #include "iviewers.h"
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calctype.cpp Source File

  • ole
  • calcdriv

calctype.cpp

Go to the documentation of this file.
00001 // Machine generated IDispatch driver class(es) created with ClassWizard.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "calctype.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CRemoteCalcDlg properties
00017
00018 long CRemoteCalcDlg::GetAccum()
00019 {
00020   long result;
00021   GetProperty(0x1, VT_I4, (void*)&result);
00022   return result;
00023 }
00024
00025 void CRemoteCalcDlg::SetAccum(long propVal)
00026 {
00027   SetProperty(0x1, VT_I4, propVal);
00028 }
00029
00030 long CRemoteCalcDlg::GetOperand()
00031 {
00032   long result;
00033   GetProperty(0x2, VT_I4, (void*)&result);
00034   return result;
00035 }
00036
00037 void CRemoteCalcDlg::SetOperand(long propVal)
00038 {
00039   SetProperty(0x2, VT_I4, propVal);
00040 }
00041
00042 short CRemoteCalcDlg::GetOperation()
00043 {
00044   short result;
00045   GetProperty(0x3, VT_I2, (void*)&result);
00046   return result;
00047 }
00048
00049 void CRemoteCalcDlg::SetOperation(short propVal)
00050 {
00051   SetProperty(0x3, VT_I2, propVal);
00052 }
00053
00054 BOOL CRemoteCalcDlg::GetVisible()
00055 {
00056   BOOL result;
00057   GetProperty(0x4, VT_BOOL, (void*)&result);
00058   return result;
00059 }
00060
00061 void CRemoteCalcDlg::SetVisible(BOOL propVal)
00062 {
00063   SetProperty(0x4, VT_BOOL, propVal);
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CRemoteCalcDlg operations
00068
00069 BOOL CRemoteCalcDlg::Evaluate()
00070 {
00071   BOOL result;
00072   InvokeHelper(0x5, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
00073   return result;
00074 }
00075
00076 void CRemoteCalcDlg::Clear()
00077 {
00078   InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00079 }
00080
00081 void CRemoteCalcDlg::Display()
00082 {
00083   InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00084 }
00085
00086 void CRemoteCalcDlg::Close()
00087 {
00088   InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00089 }
00090
00091 BOOL CRemoteCalcDlg::Button(LPCTSTR szButton)
00092 {
00093   BOOL result;
00094   static BYTE BASED_CODE parms[] =
00095     VTS_BSTR;
00096   InvokeHelper(0x9, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
00097     szButton);
00098   return result;
00099 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/StdAfx.Cpp Source File

  • ole
  • TstCon

StdAfx.Cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  TestContainer98.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/OutputView.cpp Source File

  • vc2008fp
  • VisualStudioDemo

OutputView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "MainFrm.h"
00013 #include "OutputView.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // COutputBar
00023
00024 COutputViewBar::COutputViewBar()
00025 {
00026 }
00027
00028 COutputViewBar::~COutputViewBar()
00029 {
00030 }
00031
00032 BEGIN_MESSAGE_MAP(COutputViewBar, CDockablePane)
00033   ON_WM_CREATE()
00034   ON_WM_SIZE()
00035   ON_WM_PAINT()
00036   ON_WM_SETFOCUS()
00037 END_MESSAGE_MAP()
00038
00039 int COutputViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00040 {
00041   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00042     return -1;
00043
00044   CRect rectClient(0, 0, lpCreateStruct->cx, lpCreateStruct->cy);
00045
00046   // Create output pane:
00047   const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
00048
00049   if (!m_wndOutput.Create(dwStyle, rectClient, this, 1))
00050   {
00051     TRACE0("Failed to create output window\n");
00052     return -1;      // fail to create
00053   }
00054
00055   UpdateFonts();
00056
00057   // Fill view context(dummy code, don't seek here something magic :-)):
00058   FillDebugWindow();
00059   return 0;
00060 }
00061
00062 void COutputViewBar::OnSize(UINT nType, int cx, int cy)
00063 {
00064   CDockablePane::OnSize(nType, cx, cy);
00065
00066   CRect rc;
00067   GetClientRect(rc);
00068
00069   m_wndOutput.SetWindowPos(NULL, rc.left + 1, rc.top + 1, rc.Width() - 2, rc.Height() - 2, SWP_NOACTIVATE | SWP_NOZORDER );
00070
00071   AdjusrHorzScroll(m_wndOutput);
00072 }
00073
00074 void COutputViewBar::AdjusrHorzScroll(CListBox& wndListBox)
00075 {
00076   CClientDC dc(this);
00077   CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);
00078
00079   int cxExtentMax = 0;
00080
00081   for (int i = 0; i < wndListBox.GetCount(); i ++)
00082   {
00083     CString strItem;
00084     wndListBox.GetText(i, strItem);
00085
00086     cxExtentMax = max(cxExtentMax, dc.GetTextExtent(strItem).cx);
00087   }
00088
00089   wndListBox.SetHorizontalExtent(cxExtentMax);
00090   dc.SelectObject(pOldFont);
00091 }
00092
00093 void COutputViewBar::FillDebugWindow()
00094 {
00095   m_wndOutput.AddString(_T("The program has started successfully."));
00096   m_wndOutput.AddString(_T("Enjoy using it!"));
00097 }
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // COutputList1
00101
00102 COutputList::COutputList()
00103 {
00104 }
00105
00106 COutputList::~COutputList()
00107 {
00108 }
00109
00110 BEGIN_MESSAGE_MAP(COutputList, CListBox)
00111   ON_WM_CONTEXTMENU()
00112   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00113   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00114   ON_COMMAND(ID_OUTPUT_GOTO_ERROR, OnOutputGotoError)
00115   ON_COMMAND(ID_VIEW_OUTPUT, OnViewOutput)
00116   ON_WM_WINDOWPOSCHANGING()
00117 END_MESSAGE_MAP()
00118 /////////////////////////////////////////////////////////////////////////////
00119 // COutputList message handlers
00120
00121 void COutputList::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
00122 {
00123   CMenu menu;
00124   menu.LoadMenu(IDR_POPUP_OUTPUT);
00125
00126   CMenu* pSumMenu = menu.GetSubMenu(0);
00127
00128   if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
00129   {
00130     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00131
00132     if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
00133       return;
00134
00135     ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
00136     UpdateDialogControls(this, FALSE);
00137   }
00138
00139   SetFocus();
00140 }
00141
00142 void COutputList::OnEditCopy()
00143 {
00144   MessageBox(_T("Copy output"));
00145 }
00146
00147 void COutputList::OnEditClear()
00148 {
00149   MessageBox(_T("Clear output"));
00150 }
00151
00152 void COutputList::OnOutputGotoError()
00153 {
00154   // TODO: Add your command handler code here
00155 }
00156
00157 void COutputList::OnViewOutput()
00158 {
00159   CDockablePane* pParentBar = DYNAMIC_DOWNCAST(CDockablePane, GetOwner());
00160   CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, GetTopLevelFrame());
00161
00162   if (pMainFrame != NULL && pParentBar != NULL)
00163   {
00164     pMainFrame->SetFocus();
00165     pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE);
00166     pMainFrame->RecalcLayout();
00167
00168   }
00169 }
00170
00171 void COutputViewBar::OnPaint()
00172 {
00173   CPaintDC dc(this); // device context for painting
00174
00175   CRect rectTree;
00176   m_wndOutput.GetWindowRect(rectTree);
00177   ScreenToClient(rectTree);
00178
00179   rectTree.InflateRect(1, 1);
00180   dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
00181 }
00182
00183 void COutputViewBar::OnSetFocus(CWnd* pOldWnd)
00184 {
00185   CDockablePane::OnSetFocus(pOldWnd);
00186   m_wndOutput.SetFocus();
00187 }
00188
00189 void COutputViewBar::UpdateFonts()
00190 {
00191   m_wndOutput.SetFont(&afxGlobalData.fontRegular);
00192 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAutoClickApp Member List

This is the complete list of members for CAutoClickApp, including all inherited members.
CAutoClickApp() | CAutoClickApp |
CAutoClickApp() | CAutoClickApp |
InitInstance() | CAutoClickApp | [virtual]
InitInstance() | CAutoClickApp | [virtual]
m_server | CAutoClickApp |
OnAppAbout() | CAutoClickApp |
OnAppAbout() | CAutoClickApp |
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/ipdrive/ipremote.cpp Source File

  • ole
  • ipdrive

ipremote.cpp

Go to the documentation of this file.
00001 // Machine generated IDispatch wrapper class(es) created with ClassWizard
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ipremote.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CVariantMap properties
00017
00018 CString CVariantMap::GetStr1()
00019 {
00020   CString result;
00021   GetProperty(0x1, VT_BSTR, (void*)&result);
00022   return result;
00023 }
00024
00025 void CVariantMap::SetStr1(LPCTSTR propVal)
00026 {
00027   SetProperty(0x1, VT_BSTR, propVal);
00028 }
00029
00030 CString CVariantMap::GetStr2()
00031 {
00032   CString result;
00033   GetProperty(0x3, VT_BSTR, (void*)&result);
00034   return result;
00035 }
00036
00037 void CVariantMap::SetStr2(LPCTSTR propVal)
00038 {
00039   SetProperty(0x3, VT_BSTR, propVal);
00040 }
00041
00042 long CVariantMap::GetI1()
00043 {
00044   long result;
00045   GetProperty(0x2, VT_I4, (void*)&result);
00046   return result;
00047 }
00048
00049 void CVariantMap::SetI1(long propVal)
00050 {
00051   SetProperty(0x2, VT_I4, propVal);
00052 }
00053
00054 long CVariantMap::GetI2()
00055 {
00056   long result;
00057   GetProperty(0x4, VT_I4, (void*)&result);
00058   return result;
00059 }
00060
00061 void CVariantMap::SetI2(long propVal)
00062 {
00063   SetProperty(0x4, VT_I4, propVal);
00064 }
00065
00066 long CVariantMap::GetCount()
00067 {
00068   long result;
00069   GetProperty(0x5, VT_I4, (void*)&result);
00070   return result;
00071 }
00072
00073 void CVariantMap::SetCount(long propVal)
00074 {
00075   SetProperty(0x5, VT_I4, propVal);
00076 }
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // CVariantMap operations
00080
00081 void CVariantMap::SetAt(const VARIANT& from, const VARIANT& to)
00082 {
00083   static BYTE BASED_CODE parms[] =
00084     VTS_VARIANT VTS_VARIANT;
00085   InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
00086      &from, &to);
00087 }
00088
00089 void CVariantMap::RemoveAll()
00090 {
00091   InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00092 }
00093
00094 void CVariantMap::RemoveKey(const VARIANT& key)
00095 {
00096   static BYTE BASED_CODE parms[] =
00097     VTS_VARIANT;
00098   InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
00099      &key);
00100 }
00101
00102 BOOL CVariantMap::IsEmpty()
00103 {
00104   BOOL result;
00105   InvokeHelper(0x9, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
00106   return result;
00107 }
00108
00109 VARIANT CVariantMap::GetItem(const VARIANT& from)
00110 {
00111   VARIANT result;
00112   static BYTE BASED_CODE parms[] =
00113     VTS_VARIANT;
00114   InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms,
00115     &from);
00116   return result;
00117 }
00118
00119 LPUNKNOWN CVariantMap::Get_NewEnum()
00120 {
00121   LPUNKNOWN result;
00122   InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
00123   return result;
00124 }
00125
00126 /////////////////////////////////////////////////////////////////////////////
00127 // CStringCollect properties
00128
00129 long CStringCollect::GetCount()
00130 {
00131   long result;
00132   GetProperty(0x1, VT_I4, (void*)&result);
00133   return result;
00134 }
00135
00136 void CStringCollect::SetCount(long propVal)
00137 {
00138   SetProperty(0x1, VT_I4, propVal);
00139 }
00140
00141 /////////////////////////////////////////////////////////////////////////////
00142 // CStringCollect operations
00143
00144 CString CStringCollect::GetItem(long nIndex)
00145 {
00146   CString result;
00147   static BYTE BASED_CODE parms[] =
00148     VTS_I4;
00149   InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, parms,
00150     nIndex);
00151   return result;
00152 }
00153
00154 void CStringCollect::SetItem(long nIndex, LPCTSTR lpszNewValue)
00155 {
00156   static BYTE BASED_CODE parms[] =
00157     VTS_I4 VTS_BSTR;
00158   InvokeHelper(0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
00159      nIndex, lpszNewValue);
00160 }
00161
00162 long CStringCollect::Add(LPCTSTR newValue)
00163 {
00164   long result;
00165   static BYTE BASED_CODE parms[] =
00166     VTS_BSTR;
00167   InvokeHelper(0x2, DISPATCH_METHOD, VT_I4, (void*)&result, parms,
00168     newValue);
00169   return result;
00170 }
00171
00172 long CStringCollect::Find(LPCTSTR findValue)
00173 {
00174   long result;
00175   static BYTE BASED_CODE parms[] =
00176     VTS_BSTR;
00177   InvokeHelper(0x3, DISPATCH_METHOD, VT_I4, (void*)&result, parms,
00178     findValue);
00179   return result;
00180 }
00181
00182 long CStringCollect::Remove(const VARIANT& removeValue)
00183 {
00184   long result;
00185   static BYTE BASED_CODE parms[] =
00186     VTS_VARIANT;
00187   InvokeHelper(0x4, DISPATCH_METHOD, VT_I4, (void*)&result, parms,
00188     &removeValue);
00189   return result;
00190 }
00191
00192 void CStringCollect::RemoveAll()
00193 {
00194   InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
00195 }
00196
00197 LPUNKNOWN CStringCollect::Get_NewEnum()
00198 {
00199   LPUNKNOWN result;
00200   InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
00201   return result;
00202 }
00203
00204 /////////////////////////////////////////////////////////////////////////////
00205 // CVariantAssoc properties
00206
00207 VARIANT CVariantAssoc::GetKey()
00208 {
00209   VARIANT result;
00210   GetProperty(0x1, VT_VARIANT, (void*)&result);
00211   return result;
00212 }
00213
00214 void CVariantAssoc::SetKey(const VARIANT& propVal)
00215 {
00216   SetProperty(0x1, VT_VARIANT, &propVal);
00217 }
00218
00219 VARIANT CVariantAssoc::GetValue()
00220 {
00221   VARIANT result;
00222   GetProperty(0x2, VT_VARIANT, (void*)&result);
00223   return result;
00224 }
00225
00226 void CVariantAssoc::SetValue(const VARIANT& propVal)
00227 {
00228   SetProperty(0x2, VT_VARIANT, &propVal);
00229 }
00230
00231 /////////////////////////////////////////////////////////////////////////////
00232 // CVariantAssoc operations
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/WorkspaceObj.h Source File

  • vc2008fp
  • OutlookDemo

WorkspaceObj.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CWorkspaceObj : public CObject
00013 {
00014 public:
00015   CWorkspaceObj(const CString& strName, const UINT uiCmd, const int iIconIndex, const UINT uiDefaultNewAction);
00016   virtual ~CWorkspaceObj();
00017
00018   const CString m_strName;
00019   const UINT m_uiCmd;
00020   const int m_iIconIndex;
00021   const UINT m_uiDefaultNewAction;
00022 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDesktopAlertDemoDlg Member List

This is the complete list of members for CDesktopAlertDemoDlg, including all inherited members.
CDesktopAlertDemoDlg(CWnd *pParent=NULL) | CDesktopAlertDemoDlg |
DoDataExchange(CDataExchange *pDX) | CDesktopAlertDemoDlg | [protected, virtual]
EnableControls(BOOL bEnable=TRUE) | CDesktopAlertDemoDlg | [protected]
EnableSourceControls() | CDesktopAlertDemoDlg | [protected]
IDD enum value | CDesktopAlertDemoDlg |
m_bAutoClose | CDesktopAlertDemoDlg |
m_bSmallCaption | CDesktopAlertDemoDlg |
m_hIcon | CDesktopAlertDemoDlg | [protected]
m_Icons | CDesktopAlertDemoDlg | [protected]
m_IconsSmall | CDesktopAlertDemoDlg | [protected]
m_menuPopup | CDesktopAlertDemoDlg | [protected]
m_nAnimation | CDesktopAlertDemoDlg |
m_nAnimationSpeed | CDesktopAlertDemoDlg |
m_nAutoCloseTime | CDesktopAlertDemoDlg |
m_nIcon | CDesktopAlertDemoDlg |
m_nPopupSource | CDesktopAlertDemoDlg |
m_nTransparency | CDesktopAlertDemoDlg |
m_nVisualMngr | CDesktopAlertDemoDlg |
m_ptPopup | CDesktopAlertDemoDlg | [protected]
m_strAnimSpeed | CDesktopAlertDemoDlg |
m_strAutoClose | CDesktopAlertDemoDlg |
m_strLink | CDesktopAlertDemoDlg |
m_strText | CDesktopAlertDemoDlg |
m_strTransparency | CDesktopAlertDemoDlg |
m_wndANimationSpeed | CDesktopAlertDemoDlg |
m_wndAutoCloseTime | CDesktopAlertDemoDlg |
m_wndIcons | CDesktopAlertDemoDlg |
m_wndLabel1 | CDesktopAlertDemoDlg |
m_wndLabel2 | CDesktopAlertDemoDlg |
m_wndLabel3 | CDesktopAlertDemoDlg |
m_wndLink | CDesktopAlertDemoDlg |
m_wndText | CDesktopAlertDemoDlg |
m_wndTransparency | CDesktopAlertDemoDlg |
OnAutoClose() | CDesktopAlertDemoDlg | [protected]
OnClosePopup(WPARAM, LPARAM) | CDesktopAlertDemoDlg | [protected]
OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) | CDesktopAlertDemoDlg | [protected]
OnInitDialog() | CDesktopAlertDemoDlg | [protected, virtual]
OnPaint() | CDesktopAlertDemoDlg | [protected]
OnPopupSource() | CDesktopAlertDemoDlg | [protected]
OnQueryDragIcon() | CDesktopAlertDemoDlg | [protected]
OnSelchangeAnimation() | CDesktopAlertDemoDlg | [protected]
OnSelchangeVisualMngr() | CDesktopAlertDemoDlg | [protected]
OnShow() | CDesktopAlertDemoDlg | [protected]
OnSmallCaption() | CDesktopAlertDemoDlg | [protected]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/buttondi.h Source File

  • vc2008fp
  • WordPad

buttondi.h

Go to the documentation of this file.
00001 // buttondi.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (C) 1992-1998 Microsoft Corporation
00005 // All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CButtonDialog dialog
00015
00016 class CButtonDialog : public CCSDialog
00017 {
00018 // Construction
00019 public:
00020   CButtonDialog(LPCTSTR lpszText, LPCTSTR lpszCaption, LPCTSTR lpszButtons,
00021     WORD wStyle, DWORD* pHelpIDs = NULL, CWnd* pParentWnd = NULL);
00022   ~CButtonDialog();
00023
00024 // Attributes
00025   CFont m_font;
00026 // Operations
00027   static int DisplayMessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption,
00028     LPCTSTR lpszButtons, WORD wStyle, int nDef = 0, int nCancel = -1,
00029     DWORD* pHelpIDs = NULL, CWnd* pParentWnd = NULL);
00030
00031   void AddButton(CString& strButton) { m_strArray.Add(strButton);}
00032   void AddButtons(LPCTSTR lpszButton);
00033   void SetCancel(int nCancel)
00034     { ASSERT(nCancel < m_strArray.GetSize()); m_nCancel = nCancel;}
00035   void SetDefault(int nDef)
00036     { ASSERT(nDef < m_strArray.GetSize()); m_nDefButton = nDef;}
00037   void FillInHeader(LPDLGTEMPLATE lpDlgTmp);
00038
00039 // Overridables
00040   virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00041   virtual INT_PTR DoModal();
00042
00043 // Implementation
00044 protected:
00045   virtual const DWORD* GetHelpIDs() {return m_pHelpIDs;}
00046   DWORD* m_pHelpIDs;
00047   int m_nDefButton;
00048   int m_nCancel;
00049   HGLOBAL m_hDlgTmp;
00050   UINT m_nBaseID;
00051   WORD m_wStyle;
00052   CButton* m_pButtons;
00053   CStatic m_staticIcon;
00054   CStatic m_staticText;
00055   CString m_strCaption;
00056   CString m_strText;
00057   CStringArray m_strArray;
00058   CSize GetBaseUnits();
00059   LPCTSTR GetIconID(WORD wFlags);
00060   void PositionControls();
00061
00062   // Generated message map functions
00063   //{{AFX_MSG(CButtonDialog)
00064   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00065   virtual BOOL OnInitDialog();
00066   //}}AFX_MSG
00067   DECLARE_MESSAGE_MAP()
00068 };
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MainFrm.cpp Source File

  • general
  • MMXSwarm

MainFrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #include "stdafx.h"
00013 #include "MMXSwarm.h"
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024 IMPLEMENT_DYNAMIC(CMainFrame, CFrameWnd)
00025 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00026   ON_WM_CREATE()
00027   ON_WM_SETFOCUS()
00028   ON_WM_SIZING()
00029 END_MESSAGE_MAP()
00030
00031 static UINT indicators[] =
00032 {
00033   ID_SEPARATOR,           // status line indicator
00034
00035   ID_INDICATOR_RESOLUTION,
00036   ID_INDICATOR_FPS,
00037   ID_INDICATOR_PAUSE_BLIT,
00038   ID_INDICATOR_PAUSE_BLUR,
00039   ID_INDICATOR_PAUSE_SWARM,
00040 };
00041
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CMainFrame construction/destruction
00045
00046 CMainFrame::CMainFrame()
00047 {
00048   // TODO: add member initialization code here
00049 }
00050
00051 CMainFrame::~CMainFrame()
00052 {
00053
00054 }
00055
00056 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00057 {
00058   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00059     return -1;
00060
00061   // create a view to occupy the client area of the frame
00062   if (!m_wndView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
00063     CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
00064   {
00065     TRACE0("Failed to create view window\n");
00066     return -1;
00067   }
00068
00069   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00070     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00071
00072     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00073   {
00074     TRACE0("Failed to create toolbar\n");
00075     return -1;      // fail to create
00076   }
00077
00078
00079   if (!m_wndStatusBar.Create(this) ||
00080     !m_wndStatusBar.SetIndicators(indicators,
00081       sizeof(indicators)/sizeof(UINT)))
00082   {
00083     TRACE0("Failed to create status bar\n");
00084     return -1;      // fail to create
00085   }
00086   // Cut stretchy pane min width in 1/2 (to 1/8 of window)
00087   UINT nId, nStyle;
00088   int cxWidth;
00089   m_wndStatusBar.GetPaneInfo(0, nId, nStyle, cxWidth);
00090   ASSERT(nId == 0);
00091   cxWidth /= 2;
00092   m_wndStatusBar.SetPaneInfo(0, nId, nStyle, cxWidth);
00093
00094   // TODO: Delete these three lines if you don't want the toolbar to be dockable
00095   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00096   EnableDocking(CBRS_ALIGN_ANY);
00097   DockControlBar(&m_wndToolBar);
00098
00099   // Recalc the layout and update our initial size.
00100   RecalcLayout(TRUE);
00101
00102   CRect frameRect;
00103   CRect viewRect;
00104   GetWindowRect(&frameRect);
00105   GetView()->GetClientRect(&viewRect);
00106   int dx;
00107   int dy;
00108
00109 #ifdef _DEBUG
00110   dx = 320 - viewRect.Width();
00111   dy = 240 - viewRect.Height();
00112 #else
00113   dx = 640 - viewRect.Width();
00114   dy = 480 - viewRect.Height();
00115 #endif
00116
00117   SetWindowPos(NULL, 0, 0,
00118     frameRect.Width()+dx, frameRect.Height()+dy,
00119     SWP_NOMOVE|SWP_NOZORDER);
00120
00121   return 0;
00122 }
00123
00124 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00125 {
00126   if( !CFrameWnd::PreCreateWindow(cs) )
00127     return FALSE;
00128
00129   cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
00130   cs.lpszClass = AfxRegisterWndClass(0);
00131   return TRUE;
00132 }
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CMainFrame diagnostics
00136
00137 #ifdef _DEBUG
00138 void CMainFrame::AssertValid() const
00139 {
00140   CFrameWnd::AssertValid();
00141 }
00142
00143 void CMainFrame::Dump(CDumpContext& dc) const
00144 {
00145   CFrameWnd::Dump(dc);
00146 }
00147
00148 #endif //_DEBUG
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CMainFrame message handlers
00152
00153
00154 void CMainFrame::OnSetFocus(CWnd* /*pOldWnd*/)
00155 {
00156   // forward focus to the view window
00157   m_wndView.SetFocus();
00158 }
00159
00160 BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00161 {
00162   // let the view have first crack at the command
00163   if (m_wndView.OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
00164     return TRUE;
00165
00166   // otherwise, do default handling
00167   return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00168 }
00169
00170 void CMainFrame::OnSizing(UINT fwSide, LPRECT pRect)
00171 {
00172   CFrameWnd::OnSizing(fwSide, pRect);
00173
00174   // These shouldbe computed based on the
00175   // client window size - not the frame size.
00176   CRect rect(pRect);
00177     CRect viewRect;
00178     CRect frameRect;
00179
00180   m_wndView.GetClientRect(viewRect);
00181     GetWindowRect(frameRect);
00182     int cx = frameRect.Width() - viewRect.Width();
00183     int cy = frameRect.Height() - viewRect.Height();
00184   const int kMinWidth = 96 + cx;
00185   const int kMinHeight = 64 + cy;
00186
00187   if (rect.Width() < kMinWidth) {
00188     switch(fwSide) {
00189     case WMSZ_BOTTOMRIGHT:
00190     case WMSZ_RIGHT:
00191     case WMSZ_TOPRIGHT:
00192       pRect->right = rect.left + kMinWidth;
00193       break;
00194     default:
00195       pRect->left = rect.right - kMinWidth;
00196       break;
00197     }
00198   }
00199   if (rect.Height() < kMinHeight) {
00200     switch(fwSide) {
00201     case WMSZ_BOTTOM:
00202     case WMSZ_BOTTOMLEFT:
00203     case WMSZ_BOTTOMRIGHT:
00204       pRect->bottom = rect.top + kMinHeight;
00205       break;
00206     default:
00207       pRect->top = rect.bottom - kMinHeight;
00208       break;
00209     }
00210   }
00211 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/stdafx.h Source File

  • advanced
  • mutexes

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013 //
00014 // This sample application is derived from the Mutex application
00015 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00016 // (Microsoft Press).  See the book for more information about Win32
00017 // programming topics, including thread synchronization.
00018
00019 #define VC_EXTRALEAN
00020
00021 #include <afxwin.h>      // MFC core and standard components
00022 #include <afxext.h>         // MFC extensions
00023
00024 #ifndef _AFX_NO_AFXCMN_SUPPORT
00025 #include <afxcmn.h>         // MFC support for Windows 95 Common Controls
00026 #endif // _AFX_NO_AFXCMN_SUPPORT
00027
00028 #include <afxmt.h>
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/docktool.h Source File

  • general
  • docktool

docktool.h

Go to the documentation of this file.
00001 // docktool.h : main header file for the DOCKTOOL application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDockApp:
00021 // See docktool.cpp for the implementation of this class
00022 //
00023
00024 class CDockApp : public CWinApp
00025 {
00026 public:
00027   CDockApp();
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CDockApp)
00032   public:
00033   virtual BOOL InitInstance();
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037
00038   //{{AFX_MSG(CDockApp)
00039   afx_msg void OnAppAbout();
00040     // NOTE - the ClassWizard will add and remove member functions here.
00041     //    DO NOT EDIT what you see in these blocks of generated code !
00042   //}}AFX_MSG
00043   DECLARE_MESSAGE_MAP()
00044 };
00045
00046
00047 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTCSplitter Member List

This is the complete list of members for CTCSplitter, including all inherited members.
CTCSplitter() | CTCSplitter |
OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor) | CTCSplitter |
~CTCSplitter() | CTCSplitter | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/VariantUse/VariantUse.cpp Source File

  • general
  • VariantUse

VariantUse.cpp

Go to the documentation of this file.
00001 // VariantUse.cpp : Defines the class behaviors for the application.
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "VariantUse.h"
00013 #include "VariantUseDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CVarUseApp
00023
00024 BEGIN_MESSAGE_MAP(CVarUseApp, CWinApp)
00025   //{{AFX_MSG_MAP(CVarUseApp)
00026     // NOTE - the ClassWizard will add and remove mapping macros here.
00027     //    DO NOT EDIT what you see in these blocks of generated code!
00028   //}}AFX_MSG
00029   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CVarUseApp construction
00034
00035 CVarUseApp::CVarUseApp()
00036 {
00037   // TODO: add construction code here,
00038   // Place all significant initialization in InitInstance
00039 }
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // The one and only CVarUseApp object
00043
00044 CVarUseApp theApp;
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CVarUseApp initialization
00048
00049 BOOL CVarUseApp::InitInstance()
00050 {
00051   AfxEnableControlContainer();
00052
00053   // Standard initialization
00054   // If you are not using these features and wish to reduce the size
00055   //  of your final executable, you should remove from the following
00056   //  the specific initialization routines you do not need.
00057
00058   CVarUseDlg dlg;
00059   m_pMainWnd = &dlg;
00060   int nResponse = (int)dlg.DoModal();
00061   if (nResponse == IDOK)
00062   {
00063     // TODO: Place code here to handle when the dialog is
00064     //  dismissed with OK
00065   }
00066   else if (nResponse == IDCANCEL)
00067   {
00068     // TODO: Place code here to handle when the dialog is
00069     //  dismissed with Cancel
00070   }
00071
00072   // Since the dialog has been closed, return FALSE so that we exit the
00073   //  application, rather than start the application's message pump.
00074   return FALSE;
00075 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autoclik.cpp Source File

  • ole
  • autoclik

autoclik.cpp

Go to the documentation of this file.
00001 // AutoClik.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "AutoClik.h"
00014
00015 #include "MainFrm.h"
00016 #include "ChildFrm.h"
00017 #include "AClikDoc.h"
00018 #include "AClikVw.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CAutoClickApp
00028
00029 BEGIN_MESSAGE_MAP(CAutoClickApp, CWinApp)
00030   //{{AFX_MSG_MAP(CAutoClickApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032     // NOTE - the ClassWizard will add and remove mapping macros here.
00033     //    DO NOT EDIT what you see in these blocks of generated code!
00034   //}}AFX_MSG_MAP
00035   // Standard file based document commands
00036   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00037   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00038   // Standard print setup command
00039   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00040 END_MESSAGE_MAP()
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CAutoClickApp construction
00044
00045 CAutoClickApp::CAutoClickApp()
00046 {
00047   // TODO: add construction code here,
00048   // Place all significant initialization in InitInstance
00049 }
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // The one and only CAutoClickApp object
00053
00054 CAutoClickApp theApp;
00055
00056 // This identifier was generated to be statistically unique for your app.
00057 // You may change it if you prefer to choose a specific identifier.
00058
00059 // {47D53E03-CC33-11CE-8F35-00DD01109044}
00060 static const CLSID clsid =
00061 { 0x47d53e03, 0xcc33, 0x11ce, { 0x8f, 0x35, 0x0, 0xdd, 0x1, 0x10, 0x90, 0x44 } };
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CAutoClickApp initialization
00065
00066 BOOL CAutoClickApp::InitInstance()
00067 {
00068   // Initialize OLE libraries
00069   if (!AfxOleInit())
00070   {
00071     AfxMessageBox(IDP_OLE_INIT_FAILED);
00072     return FALSE;
00073   }
00074
00075   // Standard initialization
00076   // If you are not using these features and wish to reduce the size
00077   //  of your final executable, you should remove from the following
00078   //  the specific initialization routines you do not need.
00079
00080   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00081
00082   // Register the application's document templates.  Document templates
00083   //  serve as the connection between documents, frame windows and views.
00084
00085   CMultiDocTemplate* pDocTemplate;
00086   pDocTemplate = new CMultiDocTemplate(
00087     IDR_ACLICKTYPE,
00088     RUNTIME_CLASS(CAutoClickDoc),
00089     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00090     RUNTIME_CLASS(CAutoClickView));
00091   AddDocTemplate(pDocTemplate);
00092
00093   // Connect the COleTemplateServer to the document template.
00094   //  The COleTemplateServer creates new documents on behalf
00095   //  of requesting OLE containers by using information
00096   //  specified in the document template.
00097   m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
00098
00099   // Register all OLE server factories as running.  This enables the
00100   //  OLE libraries to create objects from other applications.
00101   COleTemplateServer::RegisterAll();
00102     // Note: MDI applications register all server objects without regard
00103     //  to the /Embedding or /Automation on the command line.
00104
00105   // create main MDI Frame window
00106   CMainFrame* pMainFrame = new CMainFrame;
00107   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00108   {
00109     delete pMainFrame;
00110     return FALSE;
00111   }
00112   m_pMainWnd = pMainFrame;
00113
00114   // Enable drag/drop open
00115   m_pMainWnd->DragAcceptFiles();
00116
00117   // Enable DDE Execute open
00118   EnableShellOpen();
00119   RegisterShellFileTypes(TRUE);
00120
00121   // Parse command line for standard shell commands, DDE, file open
00122   CCommandLineInfo cmdInfo;
00123   ParseCommandLine(cmdInfo);
00124
00125   // Check to see if launched as OLE server
00126   if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
00127   {
00128     // Application was run with /Embedding or /Automation.  Don't show the
00129     //  main window in this case.
00130     return TRUE;
00131   }
00132
00133   // When a server application is launched stand-alone, it is a good idea
00134   //  to update the system registry in case it has been damaged.
00135   m_server.UpdateRegistry(OAT_DISPATCH_OBJECT);
00136   COleObjectFactory::UpdateRegistryAll();
00137
00138   // Dispatch commands specified on the command line
00139   if (!ProcessShellCommand(cmdInfo))
00140     return FALSE;
00141
00142   // The main window has been initialized, so show and update it.
00143   pMainFrame->ShowWindow(m_nCmdShow);
00144   pMainFrame->UpdateWindow();
00145
00146   return TRUE;
00147 }
00148
00149 /////////////////////////////////////////////////////////////////////////////
00150 // CAboutDlg dialog used for App About
00151
00152 class CAboutDlg : public CDialog
00153 {
00154 public:
00155   CAboutDlg();
00156
00157 // Dialog Data
00158   //{{AFX_DATA(CAboutDlg)
00159   enum { IDD = IDD_ABOUTBOX };
00160   //}}AFX_DATA
00161
00162   // ClassWizard generated virtual function overrides
00163   //{{AFX_VIRTUAL(CAboutDlg)
00164   protected:
00165   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00166   //}}AFX_VIRTUAL
00167
00168 // Implementation
00169 protected:
00170   //{{AFX_MSG(CAboutDlg)
00171     // No message handlers
00172   //}}AFX_MSG
00173   DECLARE_MESSAGE_MAP()
00174 };
00175
00176 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00177 {
00178   //{{AFX_DATA_INIT(CAboutDlg)
00179   //}}AFX_DATA_INIT
00180 }
00181
00182 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00183 {
00184   CDialog::DoDataExchange(pDX);
00185   //{{AFX_DATA_MAP(CAboutDlg)
00186   //}}AFX_DATA_MAP
00187 }
00188
00189 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00190   //{{AFX_MSG_MAP(CAboutDlg)
00191     // No message handlers
00192   //}}AFX_MSG_MAP
00193 END_MESSAGE_MAP()
00194
00195 // App command to run the dialog
00196 void CAutoClickApp::OnAppAbout()
00197 {
00198   CAboutDlg aboutDlg;
00199   aboutDlg.DoModal();
00200 }
00201
00202 /////////////////////////////////////////////////////////////////////////////
00203 // CAutoClickApp commands
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SHAPE_COLOR Member List

This is the complete list of members for SHAPE_COLOR, including all inherited members.
e | SHAPE_COLOR
operator COLORREF() const | SHAPE_COLOR
operator int() const | SHAPE_COLOR
operator=(COLORREF colorref) | SHAPE_COLOR
operator=(int n) | SHAPE_COLOR
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustListDlg Member List

This is the complete list of members for CCustListDlg, including all inherited members.
CCustListDlg() | CCustListDlg | [inline]
DECLARE_MESSAGE_MAP() | CCustListDlg |
IDD enum value | CCustListDlg |
m_colors | CCustListDlg | [protected]
OnInitDialog() | CCustListDlg |
OnOK() | CCustListDlg | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/resource.h Source File

  • general
  • tracker

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by TRACKER.RC
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDR_TRACKETYPE                  3
00007 #define IDD_ABOUTBOX                    100
00008 #define IDC_EDIT1                       101
00009 #define IDD_HANDLE_SIZE                 101
00010 #define IDD_MIN_SIZE                    102
00011 #define IDC_EDIT2                       102
00012 #define ID_EDIT_SOLIDLINE               32768
00013 #define ID_EDIT_DOTTEDLINE              32769
00014 #define ID_EDIT_HATCHEDBORDER           32770
00015 #define ID_EDIT_RESIZEINSIDE            32771
00016 #define ID_EDIT_RESIZEOUTSIDE           32772
00017 #define ID_EDIT_HATCHEDINSIDE           32773
00018 #define ID_EDIT_ALLOWINVERT             32774
00019 #define ID_VIEW_SETHANDLESIZE           32775
00020 #define ID_VIEW_SETMINIMUMSIZE          32776
00021
00022 // Next default values for new objects
00023 //
00024 #ifdef APSTUDIO_INVOKED
00025 #ifndef APSTUDIO_READONLY_SYMBOLS
00026
00027 #define _APS_NEXT_RESOURCE_VALUE        103
00028 #define _APS_NEXT_COMMAND_VALUE         32777
00029 #define _APS_NEXT_CONTROL_VALUE         103
00030 #define _APS_NEXT_SYMED_VALUE           101
00031 #endif
00032 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/StdAfx.cpp Source File

  • vc2008fp
  • PropSheetDemo

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  PropSheetDemo.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedView.cpp Source File

  • vc2008fp
  • TabbedView

TabbedView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TabbedView.h"
00013
00014 #include "MainFrm.h"
00015 #include "ChildFrm.h"
00016 #include "TabbedViewDoc.h"
00017 #include "TabbedViewView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CTabbedViewApp
00027
00028 BEGIN_MESSAGE_MAP(CTabbedViewApp, CWinApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   // Standard file based document commands
00031   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00032   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00033   // Standard print setup command
00034   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CTabbedViewApp construction
00039
00040 CTabbedViewApp::CTabbedViewApp()
00041 {
00042   // TODO: add construction code here,
00043   // Place all significant initialization in InitInstance
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CTabbedViewApp object
00048
00049 CTabbedViewApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CTabbedViewApp initialization
00053
00054 BOOL CTabbedViewApp::InitInstance()
00055 {
00056   // Initialize OLE libraries
00057   if (!AfxOleInit())
00058   {
00059     AfxMessageBox(IDP_OLE_INIT_FAILED);
00060     return FALSE;
00061   }
00062
00063   AfxEnableControlContainer();
00064
00065   // Standard initialization
00066   // If you are not using these features and wish to reduce the size
00067   //  of your final executable, you should remove from the following
00068   //  the specific initialization routines you do not need.
00069
00070   // Change the registry key under which our settings are stored.
00071   // TODO: You should modify this string to be something appropriate
00072   // such as the name of your company or organization.
00073   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00074
00075   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00076
00077   SetRegistryBase (_T("Settings"));
00078
00079   // Initialize all Managers for usage. They are automatically constructed
00080   // if not yet present
00081   InitContextMenuManager();
00082   InitKeyboardManager();
00083
00084   // Register the application's document templates.  Document templates
00085   //  serve as the connection between documents, frame windows and views.
00086
00087   CMultiDocTemplate* pDocTemplate;
00088   pDocTemplate = new CMultiDocTemplate(
00089     IDR_TABBEDTYPE,
00090     RUNTIME_CLASS(CTabbedViewDoc),
00091     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00092     RUNTIME_CLASS(CTabbedViewView));
00093   AddDocTemplate(pDocTemplate);
00094
00095   // create main MDI Frame window
00096   CMainFrame* pMainFrame = new CMainFrame;
00097   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00098     return FALSE;
00099   m_pMainWnd = pMainFrame;
00100
00101   // Parse command line for standard shell commands, DDE, file open
00102   CCommandLineInfo cmdInfo;
00103   ParseCommandLine(cmdInfo);
00104
00105   // Dispatch commands specified on the command line
00106   if (!ProcessShellCommand(cmdInfo))
00107     return FALSE;
00108
00109   LoadCustomState ();
00110
00111   // The main window has been initialized, so show and update it.
00112   pMainFrame->ShowWindow(m_nCmdShow);
00113   pMainFrame->UpdateWindow();
00114
00115   return TRUE;
00116 }
00117
00118 /////////////////////////////////////////////////////////////////////////////
00119 // CTabbedViewApp message handlers
00120
00121 int CTabbedViewApp::ExitInstance()
00122 {
00123
00124
00125   return CWinAppEx::ExitInstance();
00126 }
00127
00128 void CTabbedViewApp::PreLoadState ()
00129 {
00130
00131   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00132
00133   // TODO: add another context menus here
00134 }
00135
00136
00137 /////////////////////////////////////////////////////////////////////////////
00138 // CAboutDlg dialog used for App About
00139
00140 class CAboutDlg : public CDialog
00141 {
00142 public:
00143   CAboutDlg();
00144
00145 // Dialog Data
00146   //{{AFX_DATA(CAboutDlg)
00147   enum { IDD = IDD_ABOUTBOX };
00148   //}}AFX_DATA
00149
00150   // ClassWizard generated virtual function overrides
00151   //{{AFX_VIRTUAL(CAboutDlg)
00152   protected:
00153   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00154   //}}AFX_VIRTUAL
00155
00156 // Implementation
00157 protected:
00158   //{{AFX_MSG(CAboutDlg)
00159     // No message handlers
00160   //}}AFX_MSG
00161   DECLARE_MESSAGE_MAP()
00162 };
00163
00164 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00165 {
00166   //{{AFX_DATA_INIT(CAboutDlg)
00167   //}}AFX_DATA_INIT
00168 }
00169
00170 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00171 {
00172   CDialog::DoDataExchange(pDX);
00173   //{{AFX_DATA_MAP(CAboutDlg)
00174   //}}AFX_DATA_MAP
00175 }
00176
00177 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00178   //{{AFX_MSG_MAP(CAboutDlg)
00179     // No message handlers
00180   //}}AFX_MSG_MAP
00181 END_MESSAGE_MAP()
00182
00183 // App command to run the dialog
00184 void CTabbedViewApp::OnAppAbout()
00185 {
00186   CAboutDlg aboutDlg;
00187   aboutDlg.DoModal();
00188 }
00189
00190 /////////////////////////////////////////////////////////////////////////////
00191 // CTabbedViewApp message handlers
00192
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/guidgen/stdafx.h Source File

  • utility
  • guidgen

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include <afxwin.h>         // MFC core and standard components
00013 #include <afxdisp.h>        // MFC core OLE components
00014
00015 #if defined(_M_AMD64)
00016 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00017 #else
00018 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00019 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/targetver.h Source File

  • vc2008fp
  • TrayMenu

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInProcApp Member List

This is the complete list of members for CInProcApp, including all inherited members.
CInProcApp() | CInProcApp |
InitInstance() | CInProcApp | [virtual]
OnAppAbout() | CInProcApp |
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Modeless.h Source File

  • general
  • dlgcbr32

Modeless.h

Go to the documentation of this file.
00001 // Modeless.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013
00014 /*****************************************************************************
00015   Purpose:
00016   Interface for CModelessDialog, a reusable class for creating modeless
00017   dialogs.
00018
00019   Functions:
00020   CModelessDialog::CModelessDialog()      -- constructor
00021   CModelessDialog::~CModelessDialog()     -- destructor
00022   CModelessDialog::OnCancel()             -- WM_COMMAND IDCANCEL handler
00023   CModelessDialog::OnOK()                 -- WM_COMMAND IDOK handler
00024   CModelessDialog::PostNcDestroy()        -- called after WM_NCDESTROY
00025
00026   Development Team:
00027   Mary Kirtland
00028   Ported to 32-bit by:
00029   Mike Hedley
00030   Created by Microsoft Product Support Services, Premier ISV Support
00031   Copyright (c) Microsoft Corporation.  All rights reserved.
00032 \****************************************************************************/
00033
00034 #ifndef __MODELESS_H__
00035 #define __MODELESS_H__
00036
00037 class CModelessDialog : public CDialog
00038 {
00039   DECLARE_DYNAMIC(CModelessDialog)
00040
00041 // Construction
00042 public:
00043   CModelessDialog();
00044
00045 // Overrides
00046   // ClassWizard generated virtual function overrides
00047   //{{AFX_VIRTUAL(CModelessDialog)
00048   public:
00049   virtual void OnCancel();
00050   virtual void OnOK();
00051   virtual void PostNcDestroy();
00052   //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 public:
00056   virtual ~CModelessDialog();
00057
00058 protected:
00059   // Generated message map functions
00060   //{{AFX_MSG(CModelessDialog)
00061   //}}AFX_MSG
00062   DECLARE_MESSAGE_MAP()
00063 };
00064
00065 #endif //__MODELESS_H__
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBMTest2Dlg Member List

This is the complete list of members for CBMTest2Dlg, including all inherited members.
buttons | CBMTest2Dlg | [protected]
CBMTest2Dlg() | CBMTest2Dlg | [inline]
IDD enum value | CBMTest2Dlg |
OnInitDialog() | CBMTest2Dlg |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MainFrm.cpp Source File

  • vc2008fp
  • MDITabsDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MDITabsDemo.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 #define UM_RECALCLAYOUT (WM_USER + 101)
00023
00024 class CToolbarLabel : public CMFCToolBarButton
00025 {
00026   DECLARE_SERIAL(CToolbarLabel)
00027
00028 public:
00029   CToolbarLabel (UINT nID = 0, LPCTSTR lpszText = NULL);
00030
00031   virtual void OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00032              BOOL bHorz = TRUE, BOOL bCustomizeMode = FALSE,
00033              BOOL bHighlight = FALSE,
00034              BOOL bDrawBorder = TRUE,
00035              BOOL bGrayDisabledButtons = TRUE);
00036 };
00037
00038 IMPLEMENT_SERIAL(CToolbarLabel, CMFCToolBarButton, 1)
00039
00040 //////////////////////////////////////////////////////////////////////
00041 // Construction/Destruction
00042 //////////////////////////////////////////////////////////////////////
00043
00044 CToolbarLabel::CToolbarLabel (UINT nID, LPCTSTR lpszText)
00045 {
00046   if (lpszText != NULL)
00047   {
00048     m_strText = lpszText;
00049   }
00050
00051   m_bText = TRUE;
00052   m_nID = nID;
00053   m_iImage = -1;
00054 }
00055
00056 void CToolbarLabel::OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00057                 BOOL bHorz, BOOL /*bCustomizeMode*/, BOOL /*bHighlight*/,
00058                 BOOL /*bDrawBorder*/, BOOL /*bGrayDisabledButtons*/)
00059 {
00060   UINT nStyle = m_nStyle;
00061   m_nStyle &= ~TBBS_DISABLED;
00062
00063   CMFCToolBarButton::OnDraw (pDC, rect, pImages, bHorz, FALSE,
00064                 FALSE, FALSE, FALSE);
00065
00066   m_nStyle = nStyle;
00067 }
00068
00069 /////////////////////////////////////////////////////////////////////////////
00070 // CMainFrame
00071
00072 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00073
00074
00075 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00076   ON_WM_CREATE()
00077   ON_COMMAND(ID_VIEW_THEME_TOOLBAR, OnViewThemeToolbar)
00078   ON_UPDATE_COMMAND_UI(ID_VIEW_THEME_TOOLBAR, OnUpdateViewThemeToolbar)
00079   ON_COMMAND(ID_MDI_TABBED, OnMdiTabbed)
00080   ON_UPDATE_COMMAND_UI(ID_MDI_TABBED, OnUpdateMdiTabbed)
00081   ON_COMMAND(ID_WINDOW_MANAGER, OnWindowManager)
00082   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00083   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00084   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00085   ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace)
00086   ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, OnUpdateViewWorkspace)
00087   ON_COMMAND_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnAppLook)
00088   ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_2000, ID_VIEW_APPLOOK_2007_4, OnUpdateAppLook)
00089   ON_REGISTERED_MESSAGE(AFX_WM_ON_GET_TAB_TOOLTIP, OnGetTabToolTip)
00090   ON_MESSAGE(UM_RECALCLAYOUT, OnPostRecalcLayout)
00091   ON_WM_SYSCOLORCHANGE()
00092 END_MESSAGE_MAP()
00093
00094 static UINT indicators[] =
00095 {
00096   ID_SEPARATOR,           // status line indicator
00097   ID_INDICATOR_CAPS,
00098   ID_INDICATOR_NUM,
00099   ID_INDICATOR_SCRL,
00100 };
00101
00102 /////////////////////////////////////////////////////////////////////////////
00103 // CMainFrame construction/destruction
00104
00105 CMainFrame::CMainFrame()
00106 {
00107   m_nAppLook = theApp.GetInt (_T("ApplicationLook"), ID_VIEW_APPLOOK_2003);
00108 }
00109
00110 CMainFrame::~CMainFrame()
00111 {
00112 }
00113
00114 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00115 {
00116   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00117     return -1;
00118
00119   OnAppLook (m_nAppLook);
00120
00121   CMFCToolBar::EnableQuickCustomization ();
00122
00123   UpdateMDITabs (FALSE);
00124
00125   if (!m_wndMenuBar.Create (this))
00126   {
00127     TRACE0("Failed to create menubar\n");
00128     return -1;      // fail to create
00129   }
00130
00131   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00132
00133   // Prevent the menu bar from taking the focus on activation
00134   CMFCPopupMenu::SetForceMenuFocus(FALSE);
00135
00136   // Detect color depth. 256 color toolbars can be used in the
00137   // high or true color modes only (bits per pixel is > 8):
00138   CClientDC dc (this);
00139   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00140
00141   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00142
00143   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00144     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00145     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00146   {
00147     TRACE0("Failed to create toolbar\n");
00148     return -1;      // fail to create
00149   }
00150
00151   if (!m_wndToolBarTheme.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP
00152     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, ID_VIEW_THEME_TOOLBAR) ||
00153     !m_wndToolBarTheme.LoadToolBar (IDR_THEME, 0, 0, TRUE /* Locked */))
00154   {
00155     TRACE0("Failed to create toolbar\n");
00156     return -1;      // fail to create
00157   }
00158
00159   if (!m_wndStatusBar.Create(this) ||
00160     !m_wndStatusBar.SetIndicators(indicators,
00161       sizeof(indicators)/sizeof(UINT)))
00162   {
00163     TRACE0("Failed to create status bar\n");
00164     return -1;      // fail to create
00165   }
00166
00167   CImageList imagesWorkspace;
00168   imagesWorkspace.Create (IDB_WORKSPACE, 16, 0, RGB (255, 0, 255));
00169
00170   if (!m_wndWorkSpace.Create (_T("MDI Tabs Options"), this, CRect (0, 0, 300, 300),
00171     TRUE, ID_VIEW_WORKSPACE,
00172     WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
00173   {
00174     TRACE0("Failed to create Workspace bar\n");
00175     return FALSE;      // fail to create
00176   }
00177
00178   m_wndWorkSpace.SetIcon (imagesWorkspace.ExtractIcon (0), FALSE);
00179
00180   m_wndToolBar.SetWindowText (_T("Standard"));
00181   m_wndToolBarTheme.SetWindowText (_T("Visual Style"));
00182
00183   // TODO: Delete these three lines if you don't want the toolbar to
00184   //  be dockable
00185   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00186   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00187   m_wndToolBarTheme.EnableDocking(CBRS_ALIGN_ANY);
00188
00189   m_wndWorkSpace.EnableDocking(CBRS_ALIGN_ANY);
00190   EnableDocking(CBRS_ALIGN_ANY);
00191   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00192   DockPane(&m_wndMenuBar);
00193   DockPane(&m_wndToolBar);
00194   DockPane(&m_wndToolBarTheme);
00195   DockPane (&m_wndWorkSpace);
00196
00197   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00198   m_wndToolBarTheme.EnableCustomizeButton (TRUE, -1, _T(""));
00199
00200   // Enable windows manager:
00201   EnableWindowsDialog (ID_WINDOW_MANAGER, IDS_WINDOWS_MANAGER, TRUE);
00202   return 0;
00203 }
00204
00205 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00206 {
00207   if( !CMDIFrameWnd::PreCreateWindow(cs) )
00208     return FALSE;
00209   // TODO: Modify the Window class or styles here by modifying
00210   //  the CREATESTRUCT cs
00211
00212   return TRUE;
00213 }
00214
00215 /////////////////////////////////////////////////////////////////////////////
00216 // CMainFrame diagnostics
00217
00218 #ifdef _DEBUG
00219 void CMainFrame::AssertValid() const
00220 {
00221   CMDIFrameWnd::AssertValid();
00222 }
00223
00224 void CMainFrame::Dump(CDumpContext& dc) const
00225 {
00226   CMDIFrameWnd::Dump(dc);
00227 }
00228
00229 #endif //_DEBUG
00230
00231 /////////////////////////////////////////////////////////////////////////////
00232 // CMainFrame message handlers
00233
00234
00235 void CMainFrame::OnViewCustomize()
00236 {
00237   //------------------------------------
00238   // Create a customize toolbars dialog:
00239   //------------------------------------
00240   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00241     TRUE /* Automatic menus scaning */
00242     );
00243
00244   pDlgCust->Create ();
00245 }
00246
00247 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00248 {
00249   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00250
00251   CMenu menu;
00252   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00253
00254   CMenu* pPopup = menu.GetSubMenu(0);
00255   ASSERT(pPopup != NULL);
00256
00257   if (pPopup)
00258   {
00259     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00260     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00261   }
00262
00263   return 0;
00264 }
00265
00266 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM wp,LPARAM)
00267 {
00268   UINT uiToolBarId = (UINT) wp;
00269
00270   if (uiToolBarId == IDR_THEME)
00271   {
00272     CMenu menu2007;
00273     menu2007.LoadMenu (IDR_POPUP_STYLE_20007);
00274
00275     UINT uiCmd2007 = ID_VIEW_APPLOOK_2007_1;
00276
00277     if (m_nAppLook >= ID_VIEW_APPLOOK_2007_1 &&
00278       m_nAppLook <= ID_VIEW_APPLOOK_2007_4)
00279     {
00280       uiCmd2007 = m_nAppLook;
00281     }
00282
00283     CMFCToolBarMenuButton menuButton (uiCmd2007, menu2007.Detach (), -1);
00284
00285     for (UINT uiCmd = ID_VIEW_APPLOOK_2007_1; uiCmd <= ID_VIEW_APPLOOK_2007_4; uiCmd++)
00286     {
00287       if (m_wndToolBarTheme.ReplaceButton (ID_VIEW_APPLOOK_2007_1, menuButton) > 0)
00288       {
00289         break;
00290       }
00291     }
00292
00293     for (int i = 0; i < m_wndToolBarTheme.GetCount (); i++)
00294     {
00295       m_wndToolBarTheme.SetToolBarBtnText (i, NULL, TRUE, FALSE);
00296     }
00297
00298     m_wndToolBarTheme.ReplaceButton (ID_LABEL,
00299       CToolbarLabel (ID_LABEL, _T("Visual style: ")));
00300   }
00301
00302   return 0;
00303 }
00304
00305 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00306 {
00307   //---------------------------------------------------------
00308   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00309   //---------------------------------------------------------
00310   CMDIFrameWnd::OnShowPopupMenu (pMenuPopup);
00311
00312   if (pMenuPopup != NULL &&
00313     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00314   {
00315     if (CMFCToolBar::IsCustomizeMode ())
00316     {
00317       //----------------------------------------------------
00318       // Don't show toolbars list in the cuztomization mode!
00319       //----------------------------------------------------
00320       return FALSE;
00321     }
00322
00323     pMenuPopup->RemoveAllItems ();
00324
00325     CMenu menu;
00326     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00327
00328     CMenu* pPopup = menu.GetSubMenu(0);
00329     ASSERT(pPopup != NULL);
00330
00331     if (pPopup)
00332     {
00333       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00334     }
00335   }
00336
00337   return TRUE;
00338 }
00339
00340 void CMainFrame::OnViewWorkspace()
00341 {
00342   ShowPane (&m_wndWorkSpace,
00343           !(m_wndWorkSpace.IsVisible ()),
00344           FALSE, TRUE);
00345   RecalcLayout ();
00346 }
00347
00348 void CMainFrame::OnUpdateViewWorkspace(CCmdUI* pCmdUI)
00349 {
00350   pCmdUI->SetCheck (m_wndWorkSpace.IsVisible ());
00351 }
00352
00353 void CMainFrame::OnWindowManager()
00354 {
00355   ShowWindowsDialog ();
00356 }
00357
00358 void CMainFrame::OnAppLook(UINT id)
00359 {
00360   m_nAppLook = id;
00361
00362   switch (m_nAppLook)
00363   {
00364   case ID_VIEW_APPLOOK_2000:
00365     // enable Office 2000 look:
00366     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
00367     break;
00368
00369   case ID_VIEW_APPLOOK_XP:
00370     // enable Office XP look:
00371     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00372     break;
00373
00374   case ID_VIEW_APPLOOK_WIN_XP:
00375     // enable Windows XP look (in other OS Office XP look will be used):
00376     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerWindows));
00377     CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
00378     break;
00379
00380   case ID_VIEW_APPLOOK_2003:
00381     // enable Office 2003 look:
00382     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00383     break;
00384
00385   case ID_VIEW_APPLOOK_VS2005:
00386     // enable VS 2005 look:
00387     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00388     break;
00389
00390   case ID_VIEW_APPLOOK_2007_1:
00391     // enable Office 2007 look:
00392     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00393     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00394     CDockingManager::SetDockingMode (DT_SMART);
00395     SetupOffice2007Button ();
00396     break;
00397
00398   case ID_VIEW_APPLOOK_2007_2:
00399     // enable Office 2007 look:
00400     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00401     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00402     CDockingManager::SetDockingMode (DT_SMART);
00403     SetupOffice2007Button ();
00404     break;
00405
00406   case ID_VIEW_APPLOOK_2007_3:
00407     // enable Office 2007 look:
00408     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00409     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00410     CDockingManager::SetDockingMode (DT_SMART);
00411     SetupOffice2007Button ();
00412     break;
00413
00414   case ID_VIEW_APPLOOK_2007_4:
00415     // enable Office 2007 look:
00416     CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00417     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00418     CDockingManager::SetDockingMode (DT_SMART);
00419     SetupOffice2007Button ();
00420     break;
00421
00422   default:
00423     ASSERT (FALSE);
00424   }
00425
00426   CDockingManager* pDockManager = GetDockingManager ();
00427   if (pDockManager != NULL)
00428   {
00429     ASSERT_VALID (pDockManager);
00430     pDockManager->AdjustPaneFrames ();
00431   }
00432
00433   CDockingManager::SetDockingMode (DT_SMART);
00434
00435   if (!IsMDITabbedGroup())
00436   {
00437     HWND hwndT = ::GetWindow(m_hWndMDIClient, GW_CHILD);
00438     while (hwndT != NULL)
00439     {
00440       CMDIChildWndEx* pFrame = DYNAMIC_DOWNCAST(CMDIChildWndEx, CWnd::FromHandle(hwndT));
00441       if (pFrame != NULL)
00442       {
00443         ASSERT_VALID(pFrame);
00444         if (!pFrame->IsZoomed() && !pFrame->IsIconic())
00445         {
00446           CRect rectFrame;
00447           // Force a resize to happen on all the "restored" MDI child windows
00448           pFrame->GetWindowRect(rectFrame);
00449           pFrame->SetWindowPos(NULL, -1, -1, rectFrame.Width() + 1, rectFrame.Height(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
00450           pFrame->SetWindowPos(NULL, -1, -1, rectFrame.Width(), rectFrame.Height(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
00451         }
00452       }
00453       hwndT = ::GetWindow(hwndT, GW_HWNDNEXT);
00454     }
00455   }
00456
00457   RecalcLayout ();
00458   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00459
00460   theApp.WriteInt (_T("ApplicationLook"), m_nAppLook);
00461 }
00462
00463 void CMainFrame::OnUpdateAppLook(CCmdUI* pCmdUI)
00464 {
00465   pCmdUI->SetRadio (m_nAppLook == pCmdUI->m_nID);
00466 }
00467
00468 void CMainFrame::UpdateMDITabs (BOOL bResetMDIChild)
00469 {
00470   CMDITabInfo params;
00471   HWND hwndActive = NULL;
00472
00473   switch (theApp.m_Options.m_nMDITabsType)
00474   {
00475   case CMDITabOptions::None:
00476     {
00477       BOOL bCascadeMDIChild = FALSE;
00478
00479       if (IsMDITabbedGroup ())
00480       {
00481         EnableMDITabbedGroups (FALSE, params);
00482         bCascadeMDIChild = TRUE;
00483       }
00484       else if (AreMDITabs ())
00485       {
00486         EnableMDITabs (FALSE);
00487         bCascadeMDIChild = TRUE;
00488       }
00489
00490       if (bCascadeMDIChild)
00491       {
00492         hwndActive = (HWND) m_wndClientArea.SendMessage (WM_MDIGETACTIVE);
00493         m_wndClientArea.SendMessage (WM_MDICASCADE);
00494         ::BringWindowToTop (hwndActive);
00495       }
00496     }
00497     break;
00498
00499   case CMDITabOptions::MDITabsStandard:
00500     hwndActive = (HWND) m_wndClientArea.SendMessage (WM_MDIGETACTIVE);
00501     m_wndClientArea.PostMessage (WM_MDIMAXIMIZE, LPARAM(hwndActive), 0L);
00502     ::BringWindowToTop (hwndActive);
00503
00504     EnableMDITabs (TRUE,theApp.m_Options.m_bMDITabsIcons, theApp.m_Options.m_bTabsOnTop ? CMFCTabCtrl::LOCATION_TOP : CMFCTabCtrl::LOCATION_BOTTOM, TRUE, theApp.m_Options.m_nTabsStyle);
00505
00506     GetMDITabs().EnableAutoColor (theApp.m_Options.m_bTabsAutoColor);
00507     GetMDITabs().EnableTabDocumentsMenu (theApp.m_Options.m_bMDITabsDocMenu);
00508     GetMDITabs().EnableTabSwap (theApp.m_Options.m_bDragMDITabs);
00509     GetMDITabs().SetTabBorderSize (theApp.m_Options.m_nMDITabsBorderSize);
00510     GetMDITabs().SetFlatFrame (theApp.m_Options.m_bFlatFrame);
00511     GetMDITabs().EnableCustomToolTips (theApp.m_Options.m_bCustomTooltips);
00512     GetMDITabs().EnableCustomToolTips (theApp.m_Options.m_bCustomTooltips);
00513     GetMDITabs().EnableActiveTabCloseButton (theApp.m_Options.m_bActiveTabCloseButton);
00514     break;
00515
00516   case CMDITabOptions::MDITabbedGroups:
00517     hwndActive = (HWND) m_wndClientArea.SendMessage (WM_MDIGETACTIVE);
00518     m_wndClientArea.PostMessage (WM_MDIMAXIMIZE, LPARAM(hwndActive), 0L);
00519     ::BringWindowToTop (hwndActive);
00520
00521     params.m_tabLocation = theApp.m_Options.m_bTabsOnTop ? CMFCTabCtrl::LOCATION_TOP : CMFCTabCtrl::LOCATION_BOTTOM;
00522     params.m_style = theApp.m_Options.m_nTabsStyle;
00523     params.m_bTabCloseButton = !theApp.m_Options.m_bActiveTabCloseButton;
00524     params.m_bActiveTabCloseButton = theApp.m_Options.m_bActiveTabCloseButton;
00525     params.m_bAutoColor = theApp.m_Options.m_bTabsAutoColor;
00526     params.m_bDocumentMenu = theApp.m_Options.m_bMDITabsDocMenu;
00527     params.m_bEnableTabSwap = theApp.m_Options.m_bDragMDITabs;
00528     params.m_nTabBorderSize = theApp.m_Options.m_nMDITabsBorderSize;
00529     params.m_bTabIcons = theApp.m_Options.m_bMDITabsIcons;
00530     params.m_bFlatFrame = theApp.m_Options.m_bFlatFrame;
00531     params.m_bTabCustomTooltips = theApp.m_Options.m_bCustomTooltips;
00532
00533     EnableMDITabbedGroups (TRUE, params);
00534     break;
00535   }
00536
00537   // Some "Windows..." commands are non-relevant when all MDI child windows are always maximized:
00538   CList<UINT, UINT> lstCommands;
00539
00540   if (theApp.m_Options.IsMDITabsDisabled())
00541   {
00542     lstCommands.AddTail (ID_WINDOW_CASCADE);
00543     lstCommands.AddTail (ID_WINDOW_TILE_HORZ);
00544     lstCommands.AddTail (ID_WINDOW_ARRANGE);
00545   }
00546
00547   CMFCToolBar::SetNonPermittedCommands (lstCommands);
00548
00549   if (bResetMDIChild)
00550   {
00551     // Adjust MDI child windows:
00552     BOOL bMaximize = !theApp.m_Options.IsMDITabsDisabled();
00553
00554     HWND hwndT = ::GetWindow(m_hWndMDIClient, GW_CHILD);
00555     while (hwndT != NULL)
00556     {
00557       CMDIChildWndEx* pFrame = DYNAMIC_DOWNCAST(CMDIChildWndEx, CWnd::FromHandle(hwndT));
00558       if (pFrame != NULL)
00559       {
00560         ASSERT_VALID (pFrame);
00561         if (bMaximize)
00562         {
00563           pFrame->ModifyStyle(WS_SYSMENU, 0);
00564         }
00565         else
00566         {
00567           pFrame->ModifyStyle(0, WS_SYSMENU);
00568           pFrame->ShowWindow(SW_RESTORE);
00569
00570           // Force a resize to happen on all the "restored" MDI child windows
00571           CRect rectFrame;
00572           pFrame->GetWindowRect(rectFrame);
00573           pFrame->SetWindowPos(NULL, -1, -1, rectFrame.Width() + 1, rectFrame.Height(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
00574           pFrame->SetWindowPos(NULL, -1, -1, rectFrame.Width(), rectFrame.Height(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
00575
00576           pFrame->SendMessage(AFX_WM_CHANGEVISUALMANAGER);
00577         }
00578       }
00579
00580       hwndT = ::GetWindow(hwndT, GW_HWNDNEXT);
00581     }
00582     if (bMaximize)
00583     {
00584       m_wndMenuBar.SetMaximizeMode (FALSE);
00585     }
00586   }
00587
00588   if (m_wndWorkSpace.IsAutoHideMode ())
00589   {
00590     m_wndWorkSpace.BringWindowToTop ();
00591     CPaneDivider* pSlider = m_wndWorkSpace.GetDefaultPaneDivider ();
00592     if (pSlider != NULL)
00593     {
00594       pSlider->BringWindowToTop ();
00595     }
00596   }
00597
00598   CMDIFrameWndEx::m_bDisableSetRedraw = theApp.m_Options.m_bDisableMDIChildRedraw;
00599
00600     PostMessage(UM_RECALCLAYOUT);
00601 }
00602
00603 LRESULT CMainFrame::OnPostRecalcLayout(WPARAM, LPARAM)
00604 {
00605   RecalcLayout ();
00606   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00607
00608     return 0;
00609 }
00610
00611 void CMainFrame::OnViewThemeToolbar()
00612 {
00613   ShowPane (&m_wndToolBarTheme,
00614           !(m_wndToolBarTheme.IsVisible ()),
00615           FALSE, TRUE);
00616   RecalcLayout ();
00617 }
00618
00619 void CMainFrame::OnUpdateViewThemeToolbar(CCmdUI* pCmdUI)
00620 {
00621   pCmdUI->SetCheck (m_wndToolBarTheme.IsVisible ());
00622 }
00623
00624 CMDIChildWndEx* CMainFrame::CreateDocumentWindow (LPCTSTR lpcszDocName)
00625 {
00626   if (lpcszDocName != NULL && lpcszDocName [0] != '\0')
00627   {
00628     CDocument* pDoc = AfxGetApp()->OpenDocumentFile (lpcszDocName);
00629
00630     if (pDoc != NULL)
00631     {
00632       POSITION pos = pDoc->GetFirstViewPosition();
00633
00634       if (pos != NULL)
00635       {
00636         CView* pView = pDoc->GetNextView (pos);
00637         return DYNAMIC_DOWNCAST (CMDIChildWndEx, pView->GetParent ());
00638       }
00639     }
00640   }
00641   return NULL;
00642 }
00643
00644 BOOL CMainFrame::OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop)
00645 {
00646   if (bDrop || !theApp.m_Options.m_bMDITabsContextMenu)
00647   {
00648     return FALSE;
00649   }
00650
00651   CMenu menu;
00652   VERIFY(menu.LoadMenu (IDR_POPUP_MDITABS));
00653
00654   CMenu* pPopup = menu.GetSubMenu(0);
00655   ASSERT(pPopup != NULL);
00656
00657   if (pPopup)
00658   {
00659     if ((dwAllowedItems & AFX_MDI_CAN_BE_DOCKED) == 0)
00660     {
00661       pPopup->DeleteMenu (ID_MDI_TABBED, MF_BYCOMMAND);
00662     }
00663
00664     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00665     if (pPopupMenu)
00666     {
00667       pPopupMenu->SetAutoDestroy (FALSE);
00668       pPopupMenu->Create (this, point.x, point.y, pPopup->GetSafeHmenu ());
00669     }
00670   }
00671
00672   return TRUE;
00673 }
00674
00675 LRESULT CMainFrame::OnGetTabToolTip(WPARAM /*wp*/, LPARAM lp)
00676 {
00677   CMFCTabToolTipInfo* pInfo = (CMFCTabToolTipInfo*) lp;
00678   ASSERT (pInfo != NULL);
00679
00680   if (pInfo)
00681   {
00682     ASSERT_VALID (pInfo->m_pTabWnd);
00683     if (!pInfo->m_pTabWnd->IsMDITab ())
00684     {
00685       return 0;
00686     }
00687     pInfo->m_strText.Format (_T("Tab #%d Custom Tooltip"), pInfo->m_nTabIndex + 1);
00688   }
00689
00690   return 0;
00691 }
00692
00693 void CMainFrame::SetupOffice2007Button ()
00694 {
00695   CMFCToolBarButton* pOffice2007 = NULL;
00696   int nIndex = -1;
00697
00698   for (UINT uiCmd = ID_VIEW_APPLOOK_2007_1; uiCmd <= ID_VIEW_APPLOOK_2007_4; uiCmd++)
00699   {
00700     nIndex = m_wndToolBarTheme.CommandToIndex (uiCmd);
00701
00702     CMFCToolBarButton* pButton = m_wndToolBarTheme.GetButton (nIndex);
00703     if (pButton != NULL)
00704     {
00705       pOffice2007 = pButton;
00706       break;
00707     }
00708   }
00709
00710   if (pOffice2007 == NULL)
00711   {
00712     return;
00713   }
00714
00715   ASSERT_VALID (pOffice2007);
00716
00717   pOffice2007->m_nID = m_nAppLook;
00718   m_wndToolBarTheme.SetToolBarBtnText (nIndex, NULL, TRUE, FALSE);
00719   m_wndToolBarTheme.AdjustSizeImmediate ();
00720 }
00721
00722 void CMainFrame::OnMdiTabbed()
00723 {
00724   CMDIChildWndEx* pMDIChild = DYNAMIC_DOWNCAST(CMDIChildWndEx, MDIGetActive ());
00725   if (pMDIChild == NULL)
00726   {
00727     ASSERT (FALSE);
00728     return;
00729   }
00730
00731   TabbedDocumentToControlBar (pMDIChild);
00732 }
00733
00734 void CMainFrame::OnUpdateMdiTabbed(CCmdUI* pCmdUI)
00735 {
00736   pCmdUI->SetCheck ();
00737 }
00738
00739 void CMainFrame::OnSysColorChange()
00740 {
00741   CMDIFrameWnd::OnSysColorChange();
00742
00743   if (theApp.m_Options.m_nMDITabsType == CMDITabOptions::None)
00744   {
00745     UpdateMDITabs(TRUE);
00746   }
00747 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typtrmap.h Source File

  • advanced
  • collect

typtrmap.h

Go to the documentation of this file.
00001 // typtrmap.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CTypedPtrMapView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CTypedPtrMapView : public CFormView
00020 {
00021 public:
00022   CTypedPtrMapView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CTypedPtrMapView)
00024
00025 // Form Data
00026 public:
00027   //{{AFX_DATA(CTypedPtrMapView)
00028   enum { IDD = IDD_TYPED_PTR_MAP };
00029   CListBox    m_ctlList;
00030   CString m_strKey;
00031   int     m_int;
00032   float   m_float;
00033   CString m_str;
00034   //}}AFX_DATA
00035
00036 // Attributes
00037 public:
00038   CCollectDoc* GetDocument();
00039
00040 // Overrides
00041 public:
00042   void OnInitialUpdate();
00043
00044 // Overrides
00045   // ClassWizard generate virtual function overrides
00046   //{{AFX_VIRTUAL(CTypedPtrMapView)
00047   protected:
00048   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00049   //}}AFX_VIRTUAL
00050
00051 // Implementation
00052 protected:
00053   static CString FormatListBoxEntry(CString& strKey, CMyObject* pMyObject);
00054   int FindKeyInListBox(CString& strKey);
00055   void AddMapEntryToListBox(CString& strKey, CMyObject* pMyObject);
00056   CMyObject* ConstructMyObjectFromView();
00057   void UpdateViewFromMyObject(CMyObject* pMyObject);
00058
00059   virtual ~CTypedPtrMapView();
00060 #ifdef _DEBUG
00061   virtual void AssertValid() const;
00062   virtual void Dump(CDumpContext& dc) const;
00063 #endif
00064
00065   // Generated message map functions
00066   //{{AFX_MSG(CTypedPtrMapView)
00067   afx_msg void OnAddOrUpdate();
00068   afx_msg void OnFind();
00069   afx_msg void OnRemove();
00070   afx_msg void OnRemoveAll();
00071   afx_msg void OnSelChangeList();
00072   //}}AFX_MSG
00073   DECLARE_MESSAGE_MAP()
00074 };
00075
00076 #ifndef _DEBUG
00077 inline CCollectDoc* CTypedPtrMapView::GetDocument()
00078    { return (CCollectDoc*)m_pDocument; }
00079 #endif
00080
00081 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdidoc.h Source File

  • advanced
  • mtgdi

mtgdidoc.h

Go to the documentation of this file.
00001 // mtgdidoc.h : interface of the CThreadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CThreadDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   CThreadDoc();
00016   DECLARE_DYNCREATE(CThreadDoc)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CThreadDoc)
00027   public:
00028   virtual BOOL OnNewDocument();
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CThreadDoc();
00034   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CThreadDoc)
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046     //    DO NOT EDIT what you see in these blocks of generated code !
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFigure Member List

This is the complete list of members for CFigure, including all inherited members.
AddCommand(TRACE_COMMAND com, int nWidth) | CFigure
AddCommand(TRACE_COMMAND com, COLORREF co) | CFigure
AddCommand(TRACE_COMMAND com, CPoint point, CPoint ptWheelPos, double dWheelData, double dAnchorData) | CFigure
CFigure() | CFigure
CFigure(CFigure *pFigure) | CFigure
Clean() | CFigure
Draw(CDC *pDC, long nZoomNumer, long nZoomDenom, CRgn *prgnWheel, CSpiroRect *prectClip) const | CFigure
GetBoundingRect(CRect *lpRect) const | CFigure
m_arrCommands | CFigure
m_nTotalDrawn | CFigure
m_nTotalTraces | CFigure
m_nTracesPerColor | CFigure
m_nTracesThisColor | CFigure
m_rectBound | CFigure
MoveFigure(CPoint ptCorner, CSpiroDoc *pDoc) | CFigure
Serialize(CArchive &ar) | CFigure
~CFigure() | CFigure
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/MainFrm.h Source File

  • vc2008fp
  • OutlookMultiViews

MainFrm.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #define CFrameWnd CFrameWndEx
00004 #define NUMVIEWS 4
00005
00006 class CMainFrame : public CFrameWnd
00007 {
00008
00009 protected: // create from serialization only
00010   CMainFrame();
00011   DECLARE_DYNCREATE(CMainFrame)
00012
00013 // Attributes
00014 public:
00015
00016 // Operations
00017 public:
00018   void InitViews ();
00019
00020 // Overrides
00021   public:
00022   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00023
00024 // Implementation
00025 public:
00026   virtual ~CMainFrame();
00027 #ifdef _DEBUG
00028   virtual void AssertValid() const;
00029   virtual void Dump(CDumpContext& dc) const;
00030 #endif
00031
00032 protected:  // control bar embedded members
00033   CMFCMenuBar     m_wndMenuBar;
00034   CMFCStatusBar m_wndStatusBar;
00035   CMFCToolBar   m_wndToolBar;
00036   CMFCOutlookBar      m_wndShortcutsBar;
00037   CMFCOutlookBarPane    m_wndShortcutsPane1;
00038   CMFCCaptionBar      m_wndCaptionBar;
00039   CBitmap       m_bmpCaption;
00040
00041 protected:
00042   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00043   afx_msg void OnViewCustomize();
00044   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00045   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00046   afx_msg void OnViewOutlookBar();
00047   afx_msg void OnUpdateViewOutlookBar(CCmdUI* pCmdUI);
00048   afx_msg void OnOutlookBarShortcut(UINT id);
00049   afx_msg void OnUpdateOutlookBarShortcut(CCmdUI* pCmdUI);
00050   afx_msg void OnViewCaptionBar();
00051   afx_msg void OnUpdateViewCaptionBar(CCmdUI* pCmdUI);
00052   afx_msg void OnAppLook(UINT id);
00053   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00054
00055   DECLARE_MESSAGE_MAP()
00056
00057   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00058
00059   BOOL CreateShortcutsBar ();
00060
00061   UINT  m_nAppLook;
00062
00063     // Array of views attached to single document
00064     CView * m_pViews[NUMVIEWS];
00065     // Index to current view
00066     UINT m_nCurView;
00067 };
00068
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/util.h Source File

  • ole
  • oleview

util.h

Go to the documentation of this file.
00001 // util.h
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef _UTIL_H_
00013 #define _UTIL_H_
00014
00015 /// Utilities
00016 #define RCF_NORMAL      0x0000
00017 #define RCF_ITALIC      0x0001
00018 #define RCF_UNDERLINE   0x0002
00019 #define RCF_STRIKEOUT   0x0004
00020 #define RCF_BOLD        0x0008
00021 #define RCF_NODEFAULT   0x0010
00022 #define RCF_TRUETYPEONLY 0x0011
00023
00024 void ErrorMessage( const CString& str, HRESULT hr ) ;
00025
00026 CFont *ReallyCreateFont( HDC hDC, LPTSTR lpszFace, LPTSTR lpszStyle, UINT nPointSize, UINT uiFlags ) ;
00027
00028 LPTSTR FAR PASCAL PointerToNthField(LPTSTR lpszString, int nField, TCHAR chDelimiter) ;
00029
00030 LONG WINAPI ParseOffNumber( LPTSTR FAR *lplp, LPINT lpConv ) ;
00031
00032 void WINAPI DlgCenter( HWND hwndCenter, HWND hwndWithin, BOOL fClient ) ;
00033 void bmColorTranslateDC( CDC* pdcMem, BITMAP *pBM, COLORREF rgbOld,  COLORREF rgbNew ) ;
00034 void bmColorTranslate( CBitmap* pbmSrc, COLORREF rgbNew ) ;
00035 CBitmap* bmLoadAndTranslate( UINT id, COLORREF rgb );
00036 void DrawListBoxBitmap( CDC* pdc, CBitmap *pbmt, int x,  int y ) ;
00037 int WINAPI GetTextMetricsCorrectly( HDC hDC, LPTEXTMETRIC lpTM ) ;
00038
00039 typedef struct FAR tagCOLUMNSTRUCT
00040 {
00041    int   nLeft ;       // starting x position of the column
00042    int   nRight ;      // ending x position of the column
00043    UINT  uiFlags ;      // format flags
00044
00045 } COLUMNSTRUCT, *PCOLUMNSTRUCT, FAR *LPCOLUMNSTRUCT ;
00046
00047 void WINAPI ColumnTextOut( CDC* pDC, int nX, int nY, CString* pStr,
00048               int cColumns, LPCOLUMNSTRUCT rgColumns ) ;
00049 LPTSTR HRtoString( HRESULT hr ) ;
00050 LPTSTR VTtoString( VARTYPE vt ) ;
00051
00052 VOID WINAPI StripFilespec( LPTSTR lpszPath ) ;
00053 VOID WINAPI AddBackslash( LPTSTR lpszPath, int nSize ) ;
00054
00055 #endif
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CObjTreeView Member List

This is the complete list of members for CObjTreeView, including all inherited members.
CallInterfaceViewer(CObjectData *pObjectData, HTREEITEM hItem) | CObjTreeView |
CMainFrame class | CObjTreeView | [friend]
CObjTreeView() | CObjTreeView | [protected]
DeleteTreeContents() | CObjTreeView |
DeleteTreeItems(HTREEITEM htree) | CObjTreeView |
ExpandClassification(NM_TREEVIEW *pNMTreeView) | CObjTreeView |
ExpandInterfaces(NM_TREEVIEW *pNMTreeView) | CObjTreeView |
ExpandObject(NM_TREEVIEW *pNMTreeView) | CObjTreeView |
ExpandTypeLibs(NM_TREEVIEW *pNMTreeView) | CObjTreeView |
GetDocument() | CObjTreeView | [inline]
IsValidSel() | CObjTreeView |
m_hControls | CObjTreeView |
m_hInsertable | CObjTreeView |
m_hInterfaces | CObjTreeView |
m_hInternal | CObjTreeView |
m_hObjects | CObjTreeView |
m_hOLE1 | CObjTreeView |
m_hTypeLibs | CObjTreeView |
m_hUnclassified | CObjTreeView |
OnCommandHelp(WPARAM, LPARAM lParam) | CObjTreeView | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CObjTreeView | [protected]
OnDestroy() | CObjTreeView | [protected]
OnDraw(CDC *pdc) | CObjTreeView | [virtual]
OnFileBind() | CObjTreeView | [protected]
OnInitialUpdate() | CObjTreeView | [virtual]
OnLButtonDblClk(UINT nFlags, CPoint point) | CObjTreeView | [protected]
OnObjectDelete() | CObjTreeView | [protected]
OnObjectVerify() | CObjTreeView | [protected]
OnTreeDeleteItem(NMHDR *pNMHDR, LRESULT *pResult) | CObjTreeView | [protected]
OnTreeItemExpanded(NMHDR *pNMHDR, LRESULT *pResult) | CObjTreeView | [protected]
OnTreeItemExpanding(NMHDR *pNMHDR, LRESULT *pResult) | CObjTreeView | [protected]
OnTreeReturn(NMHDR *pNMHDR, LRESULT *pResult) | CObjTreeView | [protected]
OnTreeSelchanged(NMHDR *pNMHDR, LRESULT *pResult) | CObjTreeView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CObjTreeView | [virtual]
OnUpdateUseInProcHandler(CCmdUI *pCmdUI) | CObjTreeView | [protected]
OnUpdateUseInProcServer(CCmdUI *pCmdUI) | CObjTreeView | [protected]
OnUpdateUseLocalServer(CCmdUI *pCmdUI) | CObjTreeView | [protected]
OnUseInProcHandler() | CObjTreeView | [protected]
OnUseInProcServer() | CObjTreeView | [protected]
OnUseLocalServer() | CObjTreeView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CObjTreeView | [virtual]
~CObjTreeView() | CObjTreeView | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spindial.odl Source File

  • controls
  • spindial

spindial.odl

Go to the documentation of this file.
00001 // spindial.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (spindial.tlb) that will become a resource in
00005 // spindial.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(06889608-B8D0-101A-91F1-00608CEAD5B3), version(1.0),
00019   helpstring("Spindial OLE Custom Control module"), control ]
00020 library SpindialLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CSpindialCtrl
00026
00027   [ uuid(37446B89-5870-101B-B57B-00608CC96AFA),
00028     helpstring("Dispatch interface for Spindial Control"), hidden ]
00029   dispinterface _DSpindial
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CSpindialCtrl)
00035       [id(1)] short NeedlePosition;
00036       //}}AFX_ODL_PROP
00037
00038     methods:
00039       // NOTE - ClassWizard will maintain method information here.
00040       //    Use extreme caution when editing this section.
00041       //{{AFX_ODL_METHOD(CSpindialCtrl)
00042       //}}AFX_ODL_METHOD
00043
00044       [id(DISPID_ABOUTBOX)] void AboutBox();
00045   };
00046
00047   //  Event dispatch interface for CSpindialCtrl
00048
00049   [ uuid(37446B8A-5870-101B-B57B-00608CC96AFA),
00050     helpstring("Event interface for Spindial Control") ]
00051   dispinterface _DSpindialEvents
00052   {
00053     properties:
00054       //  Event interface has no properties
00055
00056     methods:
00057       // NOTE - ClassWizard will maintain event information here.
00058       //    Use extreme caution when editing this section.
00059       //{{AFX_ODL_EVENT(CSpindialCtrl)
00060       [id(1)] void SpinPositive();
00061       //}}AFX_ODL_EVENT
00062   };
00063
00064   //  Class information for CSpindialCtrl
00065
00066   [ uuid(06889605-B8D0-101A-91F1-00608CEAD5B3),
00067     helpstring("Spindial Control"), control ]
00068   coclass Spindial
00069   {
00070     [default] dispinterface _DSpindial;
00071     [default, source] dispinterface _DSpindialEvents;
00072   };
00073
00074   //{{AFX_APPEND_ODL}}
00075 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMLinksBar Member List

This is the complete list of members for CMSMLinksBar, including all inherited members.
CMSMLinksBar() | CMSMLinksBar |
CMSMToolBar() | CMSMToolBar |
DrawButton(CDC *pDC, CMFCToolBarButton *pButton, CMFCToolBarImages *pImages, BOOL bHighlighted, BOOL bDrawDisabledImages) | CMSMToolBar | [protected, virtual]
GetCurrentCommand() const | CMSMLinksBar | [inline]
GetRowHeight() const | CMSMLinksBar | [inline, virtual]
LoadToolBar(UINT uiResID, UINT uiColdResID=0, UINT uiMenuResID=0, BOOL bLocked=FALSE, UINT uiDisabledResID=0, UINT uiMenuDisabledResID=0, UINT uiHotResID=0, UINT uiPressedResID=0) | CMSMToolBar | [virtual]
m_CurrentCommand | CMSMLinksBar | [private]
m_PressedImages | CMSMToolBar | [protected, static]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMSMToolBar | [protected]
OnSysColorChange() | CMSMToolBar | [protected]
SetCurrentCommand(UINT nCommand) | CMSMLinksBar | [inline]
~CMSMLinksBar() | CMSMLinksBar | [virtual]
~CMSMToolBar() | CMSMToolBar | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/pal.odl Source File

  • controls
  • pal

pal.odl

Go to the documentation of this file.
00001 // pal.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (pal.tlb) that will become a resource in
00005 // pal.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(5733F771-BE58-101A-B57A-0000C0C3ED5F), version(1.0),
00019   helpstring("Pal OLE Custom Control module"), control ]
00020 library PalLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CPalCtrl
00026
00027   [ uuid(37446B83-5870-101B-B57B-00608CC96AFA),
00028     helpstring("Dispatch interface for Pal Control"), hidden ]
00029   dispinterface _DPal
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CPalCtrl)
00035       [id(1)] short Length;
00036       [id(2)] IPictureDisp* Picture;
00037       //}}AFX_ODL_PROP
00038
00039     methods:
00040       // NOTE - ClassWizard will maintain method information here.
00041       //    Use extreme caution when editing this section.
00042       //{{AFX_ODL_METHOD(CPalCtrl)
00043       [id(3), propget] OLE_COLOR Entry(short nIndex);
00044       [id(3), propput] void Entry(short nIndex, OLE_COLOR newValue);
00045       //}}AFX_ODL_METHOD
00046
00047       [id(DISPID_ABOUTBOX)] void AboutBox();
00048   };
00049
00050   //  Event dispatch interface for CPalCtrl
00051
00052   [ uuid(37446B84-5870-101B-B57B-00608CC96AFA),
00053     helpstring("Event interface for Pal Control") ]
00054   dispinterface _DPalEvents
00055   {
00056     properties:
00057       //  Event interface has no properties
00058
00059     methods:
00060       // NOTE - ClassWizard will maintain event information here.
00061       //    Use extreme caution when editing this section.
00062       //{{AFX_ODL_EVENT(CPalCtrl)
00063       //}}AFX_ODL_EVENT
00064   };
00065
00066   //  Class information for CPalCtrl
00067
00068   [ uuid(5733F76E-BE58-101A-B57A-0000C0C3ED5F),
00069     helpstring("Pal Control"), control ]
00070   coclass Pal
00071   {
00072     [default] dispinterface _DPal;
00073     [default, source] dispinterface _DPalEvents;
00074   };
00075
00076   //{{AFX_APPEND_ODL}}
00077 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/stdafx.cpp Source File

  • vc2008fp
  • WordPad

stdafx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  wordpad.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005 //
00006 // This is a part of the Microsoft Foundation Classes C++ library.
00007 // Copyright (C) 1992-1998 Microsoft Corporation
00008 // All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and related
00012 // electronic documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/resource.h Source File

  • vc2008fp
  • RibbonMDI

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by RibbonMDIDemo.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDS_WINDOWS_MANAGER             107
00008 #define IDB_WRITE                       116
00009 #define IDB_WRITELARGE                  117
00010 #define IDR_MAINFRAME                   128
00011 #define IDR_RIBBONTYPE                  129
00012 #define IDR_CONTEXT_MENU                130
00013 #define IDR_POPUP_TOOLBAR               131
00014 #define IDR_POPUP_MDITABS               132
00015 #define IDR_POPUP_DROP_MDITABS          133
00016 #define IDB_WORKSPACE                   147
00017 #define IDB_TOOLBAR256                  151
00018 #define IDR_PASTE_MENU                  151
00019 #define IDR_WINDOWS_MENU                152
00020 #define IDB_MAIN                        154
00021 #define IDB_BUTTONS                     156
00022 #define IDB_FILELARGE                   169
00023 #define IDB_FILESMALL                   170
00024 #define IDC_COMPANY_URL                 1041
00025 #define ID_VIEW_CUSTOMIZE               32770
00026 #define ID_VIEW_TOOLBARS                32771
00027 #define ID_VIEW_WORKSPACE2              32792
00028 #define ID_VIEW_WORKSPACE               32803
00029 #define ID_VIEW_OUTPUT                  32804
00030 #define ID_WINDOW_MANAGER               32823
00031 #define ID_VIEW_APPLOOK_2000            32833
00032 #define ID_VIEW_APPLOOK_XP              32834
00033 #define ID_VIEW_APPLOOK_2003            32835
00034 #define ID_VIEW_APPLOOK_WIN_XP          32836
00035 #define ID_VIEW_APPLOOK_VS2005          32837
00036 #define ID_VIEW_APPLOOK_2007            32838
00037 #define ID_MDI_NEW_VERT_GROUP           32839
00038 #define ID_MDI_NEW_HORZ_TAB_GROUP       32840
00039 #define ID_MDI_MOVE_TO_PREV_GROUP       32841
00040 #define ID_MDI_CANCEL                   32842
00041 #define ID_MDI_MOVE_TO_NEXT_GROUP       32843
00042 #define ID_WRITE_PASTEASHYPERLINK       33015
00043
00044 // Next default values for new objects
00045 //
00046 #ifdef APSTUDIO_INVOKED
00047 #ifndef APSTUDIO_READONLY_SYMBOLS
00048 #define _APS_3D_CONTROLS                     1
00049 #define _APS_NEXT_RESOURCE_VALUE        157
00050 #define _APS_NEXT_COMMAND_VALUE         32844
00051 #define _APS_NEXT_CONTROL_VALUE         1042
00052 #define _APS_NEXT_SYMED_VALUE           108
00053 #endif
00054 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRibbonMDIDemoDoc Member List

This is the complete list of members for CRibbonMDIDemoDoc, including all inherited members.
CRibbonMDIDemoDoc() | CRibbonMDIDemoDoc | [protected]
OnFileClose() | CRibbonMDIDemoDoc | [protected]
OnNewDocument() | CRibbonMDIDemoDoc | [virtual]
Serialize(CArchive &ar) | CRibbonMDIDemoDoc | [virtual]
~CRibbonMDIDemoDoc() | CRibbonMDIDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/stdafx.h Source File

  • general
  • ctrlbars

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013 //
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>         // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions
00019 #include <afxcmn.h>         // MFC common controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/dllhusk.h Source File

  • advanced
  • dllhusk

dllhusk.h

Go to the documentation of this file.
00001 // dllhusk.h : main header file for the DLLHUSK application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CHuskApp:
00020 // See dllhusk.cpp for the implementation of this class
00021 //
00022
00023 class CListOutputFrame;     // from TESTDLL2
00024
00025 class CHuskApp : public CWinApp
00026 {
00027 public:
00028   CHuskApp();
00029
00030 // Attributes
00031   CListOutputFrame* m_pListOut;
00032
00033 // Overrides
00034   virtual BOOL InitInstance();
00035
00036 // Implementation
00037   BOOL CreateListOutput();
00038
00039   //{{AFX_MSG(CHuskApp)
00040   afx_msg void OnAppAbout();
00041   afx_msg void OnDumpClasses();           // debug only
00042   afx_msg void OnDumpDocTemplates();      // debug only
00043   afx_msg void OnDumpObjects();           // debug only
00044   afx_msg void OnDumpDLLs();
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapssvw.h Source File

  • advanced
  • collect

mapssvw.h

Go to the documentation of this file.
00001 // mapssvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CMapStringToStringView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CMapStringToStringView : public CFormView
00020 {
00021 public:
00022   CMapStringToStringView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CMapStringToStringView)
00024
00025 // Form Data
00026 public:
00027   //{{AFX_DATA(CMapStringToStringView)
00028   enum { IDD = IDD_MAP_STRING_TO_STRING };
00029   CListBox    m_ctlList;
00030   CString m_strKey;
00031   CString m_strValue;
00032   //}}AFX_DATA
00033
00034 // Attributes
00035 public:
00036   CCollectDoc* GetDocument();
00037
00038 // Overrides
00039 public:
00040   void OnInitialUpdate();
00041
00042 // Overrides
00043   // ClassWizard generate virtual function overrides
00044   //{{AFX_VIRTUAL(CMapStringToStringView)
00045   protected:
00046   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00047   //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 protected:
00051   int FindKeyInListBox(CString& strKey);
00052   void AddMapEntryToListBox(CString& strKey, CString& strValue);
00053
00054   virtual ~CMapStringToStringView();
00055 #ifdef _DEBUG
00056   virtual void AssertValid() const;
00057   virtual void Dump(CDumpContext& dc) const;
00058 #endif
00059
00060   // Generated message map functions
00061   //{{AFX_MSG(CMapStringToStringView)
00062   afx_msg void OnAddOrUpdate();
00063   afx_msg void OnFind();
00064   afx_msg void OnRemove();
00065   afx_msg void OnRemoveAll();
00066   afx_msg void OnSelChangeList();
00067   //}}AFX_MSG
00068   DECLARE_MESSAGE_MAP()
00069 };
00070
00071 #ifndef _DEBUG
00072 inline CCollectDoc* CMapStringToStringView::GetDocument()
00073    { return (CCollectDoc*)m_pDocument; }
00074 #endif
00075
00076 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/PropertiesViewBar.cpp Source File

  • vc2008fp
  • VisualStudioDemo

PropertiesViewBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "MainFrm.h"
00013 #include "PropertiesViewBar.h"
00014
00015 #include <memory>
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char THIS_FILE[]=__FILE__;
00020 #define new DEBUG_NEW
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CResourceViewBar
00025
00026 CPropertiesViewBar::CPropertiesViewBar()
00027 {
00028 }
00029
00030 CPropertiesViewBar::~CPropertiesViewBar()
00031 {
00032 }
00033
00034 BEGIN_MESSAGE_MAP(CPropertiesViewBar, CDockablePane)
00035   ON_WM_CREATE()
00036   ON_WM_SIZE()
00037   ON_COMMAND(ID_SORTINGPROP, OnSortingprop)
00038   ON_UPDATE_COMMAND_UI(ID_SORTINGPROP, OnUpdateSortingprop)
00039   ON_COMMAND(ID_PROPERIES1, OnProperies1)
00040   ON_UPDATE_COMMAND_UI(ID_PROPERIES1, OnUpdateProperies1)
00041   ON_COMMAND(ID_PROPERIES2, OnProperies2)
00042   ON_UPDATE_COMMAND_UI(ID_PROPERIES2, OnUpdateProperies2)
00043   ON_COMMAND(ID_EXPAND, OnExpand)
00044   ON_UPDATE_COMMAND_UI(ID_EXPAND, OnUpdateExpand)
00045   ON_WM_SETFOCUS()
00046   ON_WM_SETTINGCHANGE()
00047 END_MESSAGE_MAP()
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CResourceViewBar message handlers
00051
00052 void CPropertiesViewBar::AdjustLayout()
00053 {
00054   if (GetSafeHwnd() == NULL)
00055   {
00056     return;
00057   }
00058
00059   CRect rectClient,rectCombo;
00060   GetClientRect(rectClient);
00061
00062   m_wndObjectCombo.GetWindowRect(&rectCombo);
00063
00064   int cyCmb = rectCombo.Size().cy;
00065   int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;
00066
00067   m_wndObjectCombo.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), 200, SWP_NOACTIVATE | SWP_NOZORDER);
00068   m_wndToolBar.SetWindowPos(NULL, rectClient.left, rectClient.top + cyCmb, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
00069   m_wndPropList.SetWindowPos(NULL, rectClient.left, rectClient.top + cyCmb + cyTlb, rectClient.Width(), rectClient.Height() -(cyCmb+cyTlb), SWP_NOACTIVATE | SWP_NOZORDER);
00070 }
00071
00072 int CPropertiesViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00073 {
00074   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00075     return -1;
00076
00077   CRect rectDummy;
00078   rectDummy.SetRectEmpty();
00079
00080   // Create combo:
00081   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST
00082     | WS_BORDER | CBS_SORT | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
00083
00084   if (!m_wndObjectCombo.Create(dwViewStyle, rectDummy, this, 1))
00085   {
00086     TRACE0("Failed to create Properies Combo \n");
00087     return -1;      // fail to create
00088   }
00089
00090   m_wndObjectCombo.AddString(_T("IDD_ABOUTBOX(Dialog)"));
00091   m_wndObjectCombo.SetCurSel(0);
00092
00093   if (!m_wndPropList.Create(WS_VISIBLE | WS_CHILD, rectDummy, this, 2))
00094   {
00095     TRACE0("Failed to create Properies Grid \n");
00096     return -1;      // fail to create
00097   }
00098
00099   InitPropList();
00100
00101   m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_PROPERTIES);
00102   m_wndToolBar.LoadToolBar(IDR_PROPERTIES, 0, 0, TRUE /* Is locked */);
00103
00104   OnChangeVisualStyle();
00105
00106   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00107   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00108   m_wndToolBar.SetOwner(this);
00109
00110   // All commands will be routed via this control , not via the parent frame:
00111   m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
00112
00113   AdjustLayout();
00114   return 0;
00115 }
00116
00117 void CPropertiesViewBar::OnSize(UINT nType, int cx, int cy)
00118 {
00119   CDockablePane::OnSize(nType, cx, cy);
00120   AdjustLayout();
00121 }
00122
00123 void CPropertiesViewBar::OnSortingprop()
00124 {
00125   m_wndPropList.SetAlphabeticMode();
00126 }
00127
00128 void CPropertiesViewBar::OnUpdateSortingprop(CCmdUI* pCmdUI)
00129 {
00130   pCmdUI->SetCheck(m_wndPropList.IsAlphabeticMode());
00131 }
00132
00133 void CPropertiesViewBar::OnExpand()
00134 {
00135   m_wndPropList.SetAlphabeticMode(FALSE);
00136 }
00137
00138 void CPropertiesViewBar::OnUpdateExpand(CCmdUI* pCmdUI)
00139 {
00140   pCmdUI->SetCheck(!m_wndPropList.IsAlphabeticMode());
00141 }
00142
00143 void CPropertiesViewBar::OnProperies1()
00144 {
00145   // TODO: Add your command handler code here
00146 }
00147
00148 void CPropertiesViewBar::OnUpdateProperies1(CCmdUI* /*pCmdUI*/)
00149 {
00150   // TODO: Add your command update UI handler code here
00151 }
00152
00153 void CPropertiesViewBar::OnProperies2()
00154 {
00155   // TODO: Add your command handler code here
00156 }
00157
00158 void CPropertiesViewBar::OnUpdateProperies2(CCmdUI* /*pCmdUI*/)
00159 {
00160   // TODO: Add your command update UI handler code here
00161 }
00162
00163 void CPropertiesViewBar::InitPropList()
00164 {
00165   SetPropListFont();
00166
00167   m_wndPropList.EnableHeaderCtrl(FALSE);
00168   m_wndPropList.EnableDescriptionArea();
00169   m_wndPropList.SetVSDotNetLook();
00170   m_wndPropList.MarkModifiedProperties();
00171
00172   std::auto_ptr<CMFCPropertyGridProperty> apGroup1(new CMFCPropertyGridProperty(_T("Appearance")));
00173
00174   apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("3D Look"), (_variant_t) false, _T("Specifies the dialog's font will be nonbold and controls will have a 3D border")));
00175
00176   CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("Border"), _T("Dialog Frame"), _T("One of: None, Thin, Resizable, or Dialog Frame"));
00177   pProp->AddOption(_T("None"));
00178   pProp->AddOption(_T("Thin"));
00179   pProp->AddOption(_T("Resizable"));
00180   pProp->AddOption(_T("Dialog Frame"));
00181   pProp->AllowEdit(FALSE);
00182
00183   apGroup1->AddSubItem(pProp);
00184   apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("Caption"), (_variant_t) _T("About"), _T("Specifies the text that will be displayed in the dialog's title bar")));
00185
00186   m_wndPropList.AddProperty(apGroup1.release());
00187
00188   std::auto_ptr<CMFCPropertyGridProperty> apSize(new CMFCPropertyGridProperty(_T("Window Size"), 0, TRUE));
00189
00190   pProp = new CMFCPropertyGridProperty(_T("Height"), (_variant_t) 250l, _T("Specifies the dialog's height"));
00191   pProp->EnableSpinControl(TRUE, 0, 1000);
00192   apSize->AddSubItem(pProp);
00193
00194   pProp = new CMFCPropertyGridProperty( _T("Width"), (_variant_t) 150l, _T("Specifies the dialog's width"));
00195   pProp->EnableSpinControl(TRUE, 1, 500);
00196   apSize->AddSubItem(pProp);
00197
00198   m_wndPropList.AddProperty(apSize.release());
00199
00200   std::auto_ptr<CMFCPropertyGridProperty> apGroup2(new CMFCPropertyGridProperty(_T("Font")));
00201
00202   LOGFONT lf;
00203   CFont* font = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
00204   font->GetLogFont(&lf);
00205
00206   lstrcpy(lf.lfFaceName, _T("Arial"));
00207
00208   apGroup2->AddSubItem(new CMFCPropertyGridFontProperty(_T("Font"), lf, CF_EFFECTS | CF_SCREENFONTS, _T("Specifies the default font for the dialog")));
00209   apGroup2->AddSubItem(new CMFCPropertyGridProperty(_T("Use System Font"), (_variant_t) true, _T("Specifies that the dialog uses MS Shell Dlg font")));
00210
00211   m_wndPropList.AddProperty(apGroup2.release());
00212
00213   std::auto_ptr<CMFCPropertyGridProperty> apGroup3(new CMFCPropertyGridProperty(_T("Misc")));
00214   pProp = new CMFCPropertyGridProperty(_T("(Name)"), _T("IDD_ABOUT_BOX(dialog)"));
00215   pProp->Enable(FALSE);
00216   apGroup3->AddSubItem(pProp);
00217
00218   CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("Window Color"), RGB(210, 192, 254), NULL, _T("Specifies the default dialog color"));
00219   pColorProp->EnableOtherButton(_T("Other..."));
00220   pColorProp->EnableAutomaticButton(_T("Default"), ::GetSysColor(COLOR_3DFACE));
00221   apGroup3->AddSubItem(pColorProp);
00222
00223   static TCHAR BASED_CODE szFilter[] = _T("Icon Files(*.ico)|*.ico|All Files(*.*)|*.*||");
00224   apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Icon"), TRUE, _T(""), _T("ico"), 0, szFilter, _T("Specifies the dialog icon")));
00225
00226   apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Folder"), _T("c:\\")));
00227
00228   m_wndPropList.AddProperty(apGroup3.release());
00229
00230   std::auto_ptr<CMFCPropertyGridProperty> apGroup4(new CMFCPropertyGridProperty(_T("Hierarchy")));
00231
00232   CMFCPropertyGridProperty* pGroup41 = new CMFCPropertyGridProperty(_T("First sub-level"));
00233   apGroup4->AddSubItem(pGroup41);
00234
00235   CMFCPropertyGridProperty* pGroup411 = new CMFCPropertyGridProperty(_T("Second sub-level"));
00236   pGroup41->AddSubItem(pGroup411);
00237
00238   pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 1"), (_variant_t) _T("Value 1"), _T("This is a description")));
00239   pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 2"), (_variant_t) _T("Value 2"), _T("This is a description")));
00240   pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 3"), (_variant_t) _T("Value 3"), _T("This is a description")));
00241
00242   apGroup4->Expand(FALSE);
00243   m_wndPropList.AddProperty(apGroup4.release());
00244 }
00245
00246 void CPropertiesViewBar::OnSetFocus(CWnd* pOldWnd)
00247 {
00248   CDockablePane::OnSetFocus(pOldWnd);
00249
00250   m_wndPropList.SetFocus();
00251
00252 }
00253
00254 void CPropertiesViewBar::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
00255 {
00256   CDockablePane::OnSettingChange(uFlags, lpszSection);
00257   SetPropListFont();
00258 }
00259
00260 void CPropertiesViewBar::SetPropListFont()
00261 {
00262   ::DeleteObject (m_fntPropList.Detach ());
00263
00264   LOGFONT lf;
00265   afxGlobalData.fontRegular.GetLogFont (&lf);
00266
00267   NONCLIENTMETRICS info;
00268   info.cbSize = sizeof(info);
00269
00270   afxGlobalData.GetNonClientMetrics (info);
00271
00272   lf.lfHeight = info.lfMenuFont.lfHeight;
00273   lf.lfWeight = info.lfMenuFont.lfWeight;
00274   lf.lfItalic = info.lfMenuFont.lfItalic;
00275
00276   m_fntPropList.CreateFontIndirect (&lf);
00277
00278   m_wndPropList.SetFont(&m_fntPropList);
00279   m_wndObjectCombo.SetFont(&m_fntPropList);
00280 }
00281
00282 void CPropertiesViewBar::OnChangeVisualStyle()
00283 {
00284   m_wndToolBar.CleanUpLockedImages();
00285   m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_PROP24 : IDR_PROPERTIES, 0, 0, TRUE /* Locked */);
00286 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDisplayThread Member List

This is the complete list of members for CDisplayThread, including all inherited members.
CDisplayThread() | CDisplayThread | [protected]
CExampleThread() | CExampleThread | [protected]
InitInstance() | CDisplayThread | [virtual]
m_bDone | CExampleThread |
m_pOwner | CExampleThread |
Run() | CDisplayThread | [virtual]
SetOwner(CMutexesDlg *pOwner) | CExampleThread | [inline]
~CDisplayThread() | CDisplayThread | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatba.h Source File

  • ole
  • wordpad

formatba.h

Go to the documentation of this file.
00001 // formatba.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __FORMATBA_H__
00013 #define __FORMATBA_H__
00014
00015 class CWordPadView;
00016
00017 /*
00018 typedef struct tagNMHDR
00019 {
00020   HWND  hwndFrom;
00021   UINT  idFrom;
00022   UINT  code;         // NM_ code
00023 }   NMHDR;
00024 */
00025
00026 struct CHARHDR : public tagNMHDR
00027 {
00028   CHARFORMAT2 cf;
00029   CHARHDR() {cf.cbSize = sizeof(CHARFORMAT2);}
00030 };
00031
00032 #define FN_SETFORMAT    0x1000
00033 #define FN_GETFORMAT    0x1001
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CLocalComboBox
00037
00038 class CLocalComboBox : public CComboBox
00039 {
00040 public:
00041
00042 //Attributes
00043   CPtrArray m_arrayFontDesc;
00044   static int m_nFontHeight;
00045   int m_nLimitText;
00046   BOOL HasFocus()
00047   {
00048     HWND hWnd = ::GetFocus();
00049     return (hWnd == m_hWnd || ::IsChild(m_hWnd, hWnd));
00050   }
00051   void GetTheText(CString& str);
00052   void SetTheText(LPCTSTR lpszText,BOOL bMatchExact = FALSE);
00053
00054 //Operations
00055   BOOL LimitText(int nMaxChars);
00056
00057 // Implementation
00058 public:
00059   virtual BOOL PreTranslateMessage(MSG* pMsg);
00060
00061   // Generated message map functions
00062   //{{AFX_MSG(CLocalComboBox)
00063   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00064   //}}AFX_MSG
00065   DECLARE_MESSAGE_MAP()
00066 };
00067
00068 class CFontComboBox : public CLocalComboBox
00069 {
00070 public:
00071   CFontComboBox();
00072
00073 //Attributes
00074   CBitmap m_bmFontType;
00075
00076 //Operations
00077   void EnumFontFamiliesEx(CDC& dc, BYTE nCharSet = DEFAULT_CHARSET);
00078   void AddFont(ENUMLOGFONT* pelf, DWORD dwType, LPCTSTR lpszScript = NULL);
00079   void MatchFont(LPCTSTR lpszName, BYTE nCharSet);
00080   void EmptyContents();
00081
00082   static BOOL CALLBACK AFX_EXPORT EnumFamScreenCallBack(
00083     ENUMLOGFONT* pelf, NEWTEXTMETRICEX* /*lpntm*/, int FontType,
00084     LPVOID pThis);
00085   static BOOL CALLBACK AFX_EXPORT EnumFamPrinterCallBack(
00086     ENUMLOGFONT* pelf, NEWTEXTMETRICEX* /*lpntm*/, int FontType,
00087     LPVOID pThis);
00088   static BOOL CALLBACK AFX_EXPORT EnumFamScreenCallBackEx(
00089     ENUMLOGFONTEX* pelf, NEWTEXTMETRICEX* /*lpntm*/, int FontType,
00090     LPVOID pThis);
00091   static BOOL CALLBACK AFX_EXPORT EnumFamPrinterCallBackEx(
00092     ENUMLOGFONTEX* pelf, NEWTEXTMETRICEX* /*lpntm*/, int FontType,
00093     LPVOID pThis);
00094
00095 //Overridables
00096   virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
00097   virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
00098   virtual int CompareItem(LPCOMPAREITEMSTRUCT lpCIS);
00099   // Generated message map functions
00100   //{{AFX_MSG(CFontComboBox)
00101   afx_msg void OnDestroy();
00102   //}}AFX_MSG
00103   DECLARE_MESSAGE_MAP()
00104 };
00105
00106 class CSizeComboBox : public CLocalComboBox
00107 {
00108 public:
00109   CSizeComboBox();
00110
00111 //Attributes
00112   int m_nLogVert;
00113   int m_nTwipsLast;
00114 public:
00115   void EnumFontSizes(CDC& dc, LPCTSTR pFontName);
00116   static BOOL FAR PASCAL EnumSizeCallBack(LOGFONT FAR* lplf,
00117     LPNEWTEXTMETRIC lpntm,int FontType, LPVOID lpv);
00118   void TwipsToPointString(LPTSTR lpszBuf, int nTwips);
00119   void SetTwipSize(int nSize);
00120   int GetTwipSize();
00121   void InsertSize(int nSize);
00122 };
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // CFormatBar dialog
00126 class CFormatBar : public CToolBar
00127 {
00128 // Construction
00129 public:
00130   CFormatBar();
00131
00132 // Operations
00133 public:
00134   void PositionCombos();
00135   void SyncToView();
00136
00137 // Attributes
00138 public:
00139   CDC m_dcPrinter;
00140   CSize m_szBaseUnits;
00141   CFontComboBox m_comboFontName;
00142   CSizeComboBox m_comboFontSize;
00143
00144 // Implementation
00145 public:
00146   void NotifyOwner(UINT nCode);
00147
00148 protected:
00149   virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00150   void SetCharFormat(CCharFormat& cf);
00151
00152   // Generated message map functions
00153   //{{AFX_MSG(CFormatBar)
00154   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00155   afx_msg void OnDestroy();
00156   //}}AFX_MSG
00157   afx_msg void OnFontNameKillFocus();
00158   afx_msg void OnFontSizeKillFocus();
00159   afx_msg void OnFontSizeDropDown();
00160   afx_msg void OnComboCloseUp();
00161   afx_msg void OnComboSetFocus();
00162   afx_msg LONG_PTR OnPrinterChanged(UINT_PTR, LONG_PTR); //handles registered message
00163   DECLARE_MESSAGE_MAP()
00164 };
00165
00166 #endif
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawtool.h Source File

  • vc2008fp
  • DrawClient

drawtool.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013 #include "drawobj.h"
00014
00015 class CDrawView;
00016
00017 enum DrawShape
00018 {
00019   selection, line, rect, roundRect, ellipse, poly
00020 };
00021
00022 class CDrawTool
00023 {
00024 // Constructors
00025 public:
00026   CDrawTool(DrawShape nDrawShape);
00027
00028 // Overridables
00029   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00030   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00031   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00032   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00033   virtual void OnEditProperties(CDrawView* pView);
00034   virtual void OnCancel();
00035
00036 // Attributes
00037   DrawShape m_drawShape;
00038
00039   static CDrawTool* FindTool(DrawShape drawShape);
00040   static CPtrList c_tools;
00041   static CPoint c_down;
00042   static UINT c_nDownFlags;
00043   static CPoint c_last;
00044   static DrawShape c_drawShape;
00045 };
00046
00047 class CSelectTool : public CDrawTool
00048 {
00049 // Constructors
00050 public:
00051   CSelectTool();
00052
00053 // Implementation
00054   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00055   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00056   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00057   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00058   virtual void OnEditProperties(CDrawView* pView);
00059 };
00060
00061 class CRectTool : public CDrawTool
00062 {
00063 // Constructors
00064 public:
00065   CRectTool(DrawShape drawShape);
00066
00067 // Implementation
00068   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00069   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00070   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00071   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00072 };
00073
00074 class CPolyTool : public CDrawTool
00075 {
00076 // Constructors
00077 public:
00078   CPolyTool();
00079
00080 // Implementation
00081   virtual void OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point);
00082   virtual void OnLButtonDblClk(CDrawView* pView, UINT nFlags, const CPoint& point);
00083   virtual void OnLButtonUp(CDrawView* pView, UINT nFlags, const CPoint& point);
00084   virtual void OnMouseMove(CDrawView* pView, UINT nFlags, const CPoint& point);
00085   virtual void OnCancel();
00086 private:
00087   CDrawPoly* m_pDrawObj;
00088 };
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagSYG Member List

This is the complete list of members for tagSYG, including all inherited members.
cHotSpot | tagSYG
cSyc | tagSYG
cSye | tagSYG
lpsyc | tagSYG
lpsye | tagSYG
lRecogVal | tagSYG
nFirstBox | tagSYG
rgpntHotSpots | tagSYG
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/summpage.cpp Source File

  • vc2008fp
  • DrawClient

summpage.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014 #include "summpage.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSummPage property page
00023
00024 IMPLEMENT_DYNCREATE(CSummPage, CPropertyPage)
00025
00026 CSummPage::CSummPage() : CPropertyPage(CSummPage::IDD)
00027 {
00028   //{{AFX_DATA_INIT(CSummPage)
00029   m_strAuthor = _T("");
00030   m_strKeywd = _T("");
00031   m_strSubj = _T("");
00032   m_strCmt = _T("");
00033   m_strTempl = _T("");
00034   m_strTitle = _T("");
00035   m_strAppname = _T("");
00036   //}}AFX_DATA_INIT
00037 }
00038
00039 CSummPage::~CSummPage()
00040 {
00041 }
00042
00043 void CSummPage::DoDataExchange(CDataExchange* pDX)
00044 {
00045   CPropertyPage::DoDataExchange(pDX);
00046   //{{AFX_DATA_MAP(CSummPage)
00047   DDX_Text(pDX, IDC_AUTHOR, m_strAuthor);
00048   DDX_Text(pDX, IDC_KEYWORDS, m_strKeywd);
00049   DDX_Text(pDX, IDC_SUBJECT, m_strSubj);
00050   DDX_Text(pDX, IDC_COMMENTS, m_strCmt);
00051   DDX_Text(pDX, IDC_TEMPLATE, m_strTempl);
00052   DDX_Text(pDX, IDC_TITLE, m_strTitle);
00053   DDX_Text(pDX, IDC_APPNAME, m_strAppname);
00054   //}}AFX_DATA_MAP
00055 }
00056
00057 BEGIN_MESSAGE_MAP(CSummPage, CPropertyPage)
00058   //{{AFX_MSG_MAP(CSummPage)
00059   //}}AFX_MSG_MAP
00060 END_MESSAGE_MAP()
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/stdafx.h Source File

  • ole
  • acdual

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00015
00016 #include <afxwin.h>         // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions
00018 #include <afxdisp.h>        // MFC OLE automation classes
00019 #ifndef _AFX_NO_AFXCMN_SUPPORT
00020 #include <afxcmn.h>         // MFC support for Windows 95 Common Controls
00021 #endif // _AFX_NO_AFXCMN_SUPPORT
00022
00023 // DUAL_SUPPORT_START
00024 //   add our dual interface definitions
00025 #include "acdual.h"
00026
00027 //   pick up the definition of AfxOleRegisterTypeLib
00028 #include <afxctl.h>
00029
00030 //   include our macros to simplify dual interface support
00031 #include "mfcdual.h"
00032 // DUAL_SUPPORT_END
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFileViewToolBar Member List

This is the complete list of members for CFileViewToolBar, including all inherited members.
AllowShowOnList() const | CFileViewToolBar | [inline, private, virtual]
OnUpdateCmdUI(CFrameWnd *, BOOL bDisableIfNoHndler) | CFileViewToolBar | [inline, private, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/VarUtils.Cpp Source File

  • ole
  • TstCon

VarUtils.Cpp

Go to the documentation of this file.
00001 // File: VarUtils.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 class INVOKEKIND_ENTRY
00020 {
00021 public:
00022    LPCTSTR pszName;
00023    INVOKEKIND invokekind;
00024 };
00025
00026 static INVOKEKIND_ENTRY g_aInvokeKinds[] =
00027 {
00028    { _T( "Method" ), INVOKE_FUNC },
00029    { _T( "PropGet" ), INVOKE_PROPERTYGET },
00030    { _T( "PropPut" ), INVOKE_PROPERTYPUT },
00031    { _T( "PropPutRef" ), INVOKE_PROPERTYPUTREF }
00032 };
00033
00034 const int NUM_INVOKEKINDS = sizeof( g_aInvokeKinds )/sizeof(
00035    g_aInvokeKinds[0] );
00036
00037 LPCTSTR InvokeKindToString( INVOKEKIND invokekind )
00038 {
00039    int iInvokeKind;
00040
00041    for( iInvokeKind = 0; iInvokeKind < NUM_INVOKEKINDS; iInvokeKind++ )
00042    {
00043     if( g_aInvokeKinds[iInvokeKind].invokekind == invokekind )
00044     {
00045      return( g_aInvokeKinds[iInvokeKind].pszName );
00046     }
00047    }
00048
00049    return( NULL );
00050 }
00051
00052 class VARTYPE_ENTRY
00053 {
00054 public:
00055    LPCTSTR pszName;
00056    VARTYPE vt;
00057 };
00058
00059 static VARTYPE_ENTRY g_aVarTypes[] =
00060 {
00061    { _T( "VT_EMPTY" ), VT_EMPTY },
00062    { _T( "VT_BOOL" ), VT_BOOL },
00063    { _T( "VT_UI1" ), VT_UI1 },
00064    { _T( "VT_UI2" ), VT_UI2 },
00065    { _T( "VT_UI4" ), VT_UI4 },
00066    { _T( "VT_UI8" ), VT_UI8 },
00067    { _T( "VT_I1" ), VT_I1 },
00068    { _T( "VT_I2" ), VT_I2 },
00069    { _T( "VT_I4" ), VT_I4 },
00070    { _T( "VT_I8" ), VT_I8 },
00071    { _T( "VT_R4" ), VT_R4 },
00072    { _T( "VT_R8" ), VT_R8 },
00073    { _T( "VT_BSTR" ), VT_BSTR },
00074    { _T( "VT_CY" ), VT_CY },
00075    { _T( "VT_DATE" ), VT_DATE },
00076    { _T( "VT_ERROR" ), VT_ERROR },
00077    { _T( "VT_COLOR" ), VT_COLOR },
00078    { _T( "VT_FONT" ), VT_FONT },
00079    { _T( "VT_UNKNOWN" ), VT_UNKNOWN }
00080 };
00081
00082 LPCTSTR VTIToString( int iType )
00083 {
00084    return( g_aVarTypes[iType].pszName );
00085 }
00086
00087 VARTYPE VTIToVT( int iType )
00088 {
00089    return( g_aVarTypes[iType].vt );
00090 }
00091
00092 LPCTSTR VTToString( VARTYPE vt )
00093 {
00094    int iType;
00095
00096    for( iType = 0; iType < NUM_VARTYPES; iType++ )
00097    {
00098     if( g_aVarTypes[iType].vt == vt )
00099     {
00100      return( g_aVarTypes[iType].pszName );
00101     }
00102    }
00103
00104    return( NULL );
00105 }
00106
00107 int VTToVTI( VARTYPE vt )
00108 {
00109    int iType;
00110
00111    for( iType = 0; iType < NUM_VARTYPES; iType++ )
00112    {
00113     if( g_aVarTypes[iType].vt == vt )
00114     {
00115      return( iType );
00116     }
00117    }
00118
00119    return( -1 );
00120 }
00121
00122 CString VariantToString( const VARIANT& var )
00123 {
00124
00125    CString strResult;
00126    COleVariant varString;
00127    BOOL tHandled;
00128
00129    tHandled = FALSE;
00130    switch( var.vt )
00131    {
00132    case VT_BOOL:
00133     if( var.boolVal == VARIANT_FALSE )
00134     {
00135      strResult = _T( "FALSE" );
00136     }
00137     else
00138     {
00139      strResult = _T( "TRUE" );
00140     }
00141     tHandled = TRUE;
00142     break;
00143    }
00144
00145    if( !tHandled )
00146    {
00147     varString = var;
00148     TRY
00149     {
00150      varString.ChangeType( VT_BSTR );
00151     }
00152     CATCH( COleException, e )
00153     {
00154      TRACE( "ChangeType() failed.\n" );
00155     }
00156     END_CATCH
00157
00158     strResult = varString.bstrVal;
00159    }
00160
00161    return( strResult );
00162 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDesktopAlertDemoApp Member List

This is the complete list of members for CDesktopAlertDemoApp, including all inherited members.
CDesktopAlertDemoApp() | CDesktopAlertDemoApp |
InitInstance() | CDesktopAlertDemoApp | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/View4.cpp Source File

  • vc2008fp
  • TabbedView

View4.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "tabbedview.h"
00013 #include "View4.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CView4
00023
00024 IMPLEMENT_DYNCREATE(CView4, CScrollView)
00025
00026 CView4::CView4()
00027 {
00028 }
00029
00030 CView4::~CView4()
00031 {
00032 }
00033
00034
00035 BEGIN_MESSAGE_MAP(CView4, CScrollView)
00036   ON_WM_WINDOWPOSCHANGING()
00037   ON_WM_HSCROLL()
00038   ON_WM_ERASEBKGND()
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CView4 drawing
00043
00044 void CView4::OnInitialUpdate()
00045 {
00046   CScrollView::OnInitialUpdate();
00047
00048   CSize sizeTotal;
00049   // TODO: calculate the total size of this view
00050   sizeTotal.cx = sizeTotal.cy = 1000;
00051   SetScrollSizes(MM_TEXT, sizeTotal);
00052 }
00053
00054 void CView4::OnDraw(CDC* pDC)
00055 {
00056   CRect rectClient;
00057   GetClientRect (&rectClient);
00058
00059   pDC->DPtoLP (&rectClient);
00060   pDC->FillSolidRect (rectClient, ::GetSysColor (COLOR_WINDOW));
00061
00062   CString str (_T("This is a scroll view"));
00063   pDC->TextOut (130, 30, str);
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CView4 diagnostics
00068
00069 #ifdef _DEBUG
00070 void CView4::AssertValid() const
00071 {
00072   CScrollView::AssertValid();
00073 }
00074
00075 void CView4::Dump(CDumpContext& dc) const
00076 {
00077   CScrollView::Dump(dc);
00078 }
00079 #endif //_DEBUG
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CView4 message handlers
00083
00084 void CView4::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
00085 {
00086   CScrollView::OnWindowPosChanging(lpwndpos);
00087
00088   // Hide horizontal scrollbar:
00089   ShowScrollBar (SB_HORZ, FALSE);
00090   ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME);
00091 }
00092
00093 CScrollBar* CView4::GetScrollBarCtrl(int nBar) const
00094 {
00095   if (nBar == SB_HORZ)
00096   {
00097     return GetParentTab ()->GetScrollBar ();
00098   }
00099
00100   return CScrollView::GetScrollBarCtrl(nBar);
00101 }
00102
00103 void CView4::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* /*pScrollBar*/)
00104 {
00105   CScrollView::OnHScroll(nSBCode, nPos, GetParentTab ()->GetScrollBar ());
00106 }
00107
00108 BOOL CView4::OnEraseBkgnd(CDC* /*pDC*/)
00109 {
00110   return TRUE;
00111 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/DesktopAlertDemoDlg.h Source File

  • vc2008fp
  • DesktopAlertDemo

DesktopAlertDemoDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "IconComboBox.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CDesktopAlertDemoDlg dialog
00017
00018 class CDesktopAlertDemoDlg : public CDialogEx
00019 {
00020 // Construction
00021 public:
00022   CDesktopAlertDemoDlg(CWnd* pParent = NULL); // standard constructor
00023
00024 // Dialog Data
00025   enum { IDD = IDD_ALERT_DIALOG };
00026   CSliderCtrl m_wndAutoCloseTime;
00027   CEdit m_wndText;
00028   CEdit m_wndLink;
00029   CStatic m_wndLabel3;
00030   CStatic m_wndLabel2;
00031   CStatic m_wndLabel1;
00032   CIconComboBox m_wndIcons;
00033   CSliderCtrl m_wndTransparency;
00034   CSliderCtrl m_wndANimationSpeed;
00035   int   m_nVisualMngr;
00036   int   m_nAnimation;
00037   int   m_nAnimationSpeed;
00038   CString m_strAnimSpeed;
00039   int   m_nTransparency;
00040   CString m_strTransparency;
00041   BOOL  m_bSmallCaption;
00042   int   m_nPopupSource;
00043   int   m_nIcon;
00044   CString m_strLink;
00045   CString m_strText;
00046   int   m_nAutoCloseTime;
00047   CString m_strAutoClose;
00048   BOOL  m_bAutoClose;
00049
00050   // ClassWizard generated virtual function overrides
00051   protected:
00052   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00053
00054 // Implementation
00055 protected:
00056   HICON       m_hIcon;
00057   CMenu       m_menuPopup;
00058   CPoint        m_ptPopup;
00059   CMFCToolBarImages m_Icons;
00060   CMFCToolBarImages m_IconsSmall;
00061
00062   virtual BOOL OnInitDialog();
00063
00064   afx_msg void OnPaint();
00065   afx_msg HCURSOR OnQueryDragIcon();
00066   afx_msg void OnShow();
00067   afx_msg void OnSelchangeVisualMngr();
00068   afx_msg void OnSelchangeAnimation();
00069   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00070   afx_msg void OnSmallCaption();
00071   afx_msg void OnPopupSource();
00072   afx_msg void OnAutoClose();
00073   afx_msg LRESULT OnClosePopup(WPARAM,LPARAM);
00074
00075   DECLARE_MESSAGE_MAP()
00076
00077   void EnableControls (BOOL bEnable = TRUE);
00078   void EnableSourceControls ();
00079 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/resource.h Source File

  • advanced
  • cube

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by cube.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define ID_FILE_PLAY                    32772
00008
00009 // Next default values for new objects
00010 //
00011 #ifdef APSTUDIO_INVOKED
00012 #ifndef APSTUDIO_READONLY_SYMBOLS
00013 #define _APS_3D_CONTROLS                     1
00014 #define _APS_NEXT_RESOURCE_VALUE        130
00015 #define _APS_NEXT_COMMAND_VALUE         32773
00016 #define _APS_NEXT_CONTROL_VALUE         1000
00017 #define _APS_NEXT_SYMED_VALUE           101
00018 #endif
00019 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/stdafx.h Source File

  • general
  • docktool

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>         // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions
00018 #include <afxcmn.h>         // MFC common controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpvw.h Source File

  • vc2008fp
  • WordPad

wordpvw.h

Go to the documentation of this file.
00001 //
00002 // wordpvw.h : interface of the CWordPadView class
00003 //
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (C) 1992-1998 Microsoft Corporation
00007 // All rights reserved.
00008 //
00009 // This source code is only intended as a supplement to the
00010 // Microsoft Foundation Classes Reference and related
00011 // electronic documentation provided with the library.
00012 // See these sources for detailed information regarding the
00013 // Microsoft Foundation Classes product.
00014
00015 class CWordPadView : public CRichEditView
00016 {
00017 protected: // create from serialization only
00018   CWordPadView();
00019   DECLARE_DYNCREATE(CWordPadView)
00020
00021 // Attributes
00022 public:
00023   UINT_PTR m_uTimerID;
00024   BOOL m_bDelayUpdateItems;
00025   BOOL m_bInPrint;
00026   CParaFormat m_defParaFormat;
00027   CCharFormat m_defCharFormat;
00028   CCharFormat m_defTextCharFormat;
00029
00030   CWordPadDoc* GetDocument();
00031   BOOL IsFormatText();
00032
00033   virtual HMENU GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj,
00034     CHARRANGE* lpchrg);
00035
00036 // Operations
00037 public:
00038   BOOL PasteNative(LPDATAOBJECT lpdataobj);
00039   void SetDefaultFont(BOOL bText);
00040   void SetUpdateTimer();
00041   void GetDefaultFont(CCharFormat& cf, UINT nFontNameID);
00042   void DrawMargins(CDC* pDC);
00043   BOOL SelectPalette();
00044   BOOL ShowContextMenu (CPoint pt);
00045   void SetTextColor (COLORREF color);
00046
00047   void GetDocumentColors (CList<COLORREF,COLORREF>& lstColors);
00048
00049 // Overrides
00050   // ClassWizard generated virtual function overrides
00051   //{{AFX_VIRTUAL(CWordPadView)
00052   protected:
00053   virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder);
00054   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00055   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00056   //}}AFX_VIRTUAL
00057   BOOL OnPreparePrinting(CPrintInfo* pInfo);
00058   virtual HRESULT GetClipboardData(CHARRANGE* lpchrg, DWORD reco,
00059     LPDATAOBJECT lpRichDataObj, LPDATAOBJECT* lplpdataobj);
00060   virtual HRESULT QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD,
00061     BOOL, HGLOBAL);
00062 public:
00063   virtual void WrapChanged();
00064
00065 // Implementation
00066 public:
00067 #ifdef _DEBUG
00068   virtual void AssertValid() const;
00069   virtual void Dump(CDumpContext& dc) const;
00070 #endif
00071
00072 protected:
00073   BOOL  m_bOnBar;
00074   UINT  m_nBorderType;
00075
00076   // OLE Container support
00077
00078   virtual void DeleteContents();
00079   virtual void OnTextNotFound(LPCTSTR);
00080
00081 // Generated message map functions
00082 protected:
00083   afx_msg void OnCancelEditSrvr();
00084   //{{AFX_MSG(CWordPadView)
00085   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00086   afx_msg void OnPageSetup();
00087   afx_msg void OnInsertDateTime();
00088   afx_msg void OnFormatParagraph();
00089   afx_msg void OnFormatTabs();
00090   afx_msg void OnTimer(UINT_PTR nIDEvent);
00091   afx_msg void OnDestroy();
00092   afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00093   afx_msg void OnPenBackspace();
00094   afx_msg void OnPenNewline();
00095   afx_msg void OnPenPeriod();
00096   afx_msg void OnPenSpace();
00097   afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00098   afx_msg void OnFilePrint();
00099 #ifdef CORRECT_WRITING
00100   afx_msg void OnPenLens();
00101 #endif
00102   afx_msg void OnPenTab();
00103   afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00104   afx_msg BOOL OnQueryNewPalette();
00105   afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
00106   afx_msg void OnSize(UINT nType, int cx, int cy);
00107   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00108   afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00109   afx_msg void OnCharColor();
00110   afx_msg void OnFilePrintPreview();
00111   afx_msg void OnFontname();
00112   afx_msg void OnFontsize();
00113   //}}AFX_MSG
00114   afx_msg void OnEditChange();
00115   afx_msg int OnMouseActivate(CWnd* pWnd, UINT nHitTest, UINT message);
00116   afx_msg LONG OnPrinterChangedMsg(UINT, LONG);
00117   afx_msg void OnBarSetFocus(UINT, NMHDR*, LRESULT*);
00118   afx_msg void OnBarKillFocus(UINT, NMHDR*, LRESULT*);
00119   afx_msg void OnBarReturn(UINT, NMHDR*, LRESULT* );
00120   afx_msg void OnBorderType (UINT id);
00121   afx_msg void OnUpdateBorderType (CCmdUI* pCmdUI);
00122   DECLARE_MESSAGE_MAP()
00123 };
00124
00125 #ifndef _DEBUG  // debug version in wordpvw.cpp
00126 inline CWordPadDoc* CWordPadView::GetDocument()
00127    { return (CWordPadDoc*)m_pDocument; }
00128 #endif
00129
00130 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar2.h Source File

  • vc2008fp
  • RibbonMDI

WorkspaceBar2.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CWorkspaceBar2 : public CDockablePane
00015 {
00016 public:
00017   CWorkspaceBar2();
00018
00019 // Attributes
00020 protected:
00021   CTreeCtrl m_wndTree;
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027
00028 // Implementation
00029 public:
00030   virtual ~CWorkspaceBar2();
00031
00032 protected:
00033   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00034   afx_msg void OnSize(UINT nType, int cx, int cy);
00035   afx_msg void OnPaint();
00036
00037   DECLARE_MESSAGE_MAP()
00038 };
00039
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgets.cpp Source File

  • vc2008fp
  • RibbonGadgets

RibbonGadgets.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonGadgets.h"
00014
00015 #include "MainFrm.h"
00016 #include "RibbonGadgetsDoc.h"
00017 #include "RibbonGadgetsView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CRibbonGadgetsApp
00027
00028 BEGIN_MESSAGE_MAP(CRibbonGadgetsApp, CWinAppEx)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   // Standard file based document commands
00031   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00032   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00033   // Standard print setup command
00034   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CRibbonGadgetsApp construction
00039
00040 CRibbonGadgetsApp::CRibbonGadgetsApp()
00041 {
00042   // TODO: add construction code here,
00043   // Place all significant initialization in InitInstance
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CRibbonGadgetsApp object
00048
00049 CRibbonGadgetsApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CRibbonGadgetsApp initialization
00053
00054 BOOL CRibbonGadgetsApp::InitInstance()
00055 {
00056   // Initialize OLE libraries
00057   if (!AfxOleInit())
00058   {
00059     AfxMessageBox(IDP_OLE_INIT_FAILED);
00060     return FALSE;
00061   }
00062
00063   AfxEnableControlContainer();
00064
00065   // Standard initialization
00066   // If you are not using these features and wish to reduce the size
00067   //  of your final executable, you should remove from the following
00068   //  the specific initialization routines you do not need.
00069
00070   // Change the registry key under which our settings are stored.
00071   // TODO: You should modify this string to be something appropriate
00072   // such as the name of your company or organization.
00073   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00074
00075   LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)
00076
00077   SetRegistryBase (_T("Settings"));
00078
00079   // Initialize all Managers for usage. They are automatically constructed
00080   // if not yet present
00081   InitContextMenuManager();
00082   InitKeyboardManager();
00083
00084   // TODO: Remove this if you don't want extended tooltips:
00085   InitTooltipManager();
00086
00087   CMFCToolTipInfo params;
00088   params.m_bVislManagerTheme = TRUE;
00089
00090   theApp.GetTooltipManager ()->SetTooltipParams (
00091     AFX_TOOLTIP_TYPE_ALL,
00092     RUNTIME_CLASS(CMFCToolTipCtrl),
00093     &params);
00094
00095   // Register the application's document templates.  Document templates
00096   //  serve as the connection between documents, frame windows and views.
00097
00098   CSingleDocTemplate* pDocTemplate;
00099   pDocTemplate = new CSingleDocTemplate(
00100     IDR_MAINFRAME,
00101     RUNTIME_CLASS(CRibbonGadgetsDoc),
00102     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00103     RUNTIME_CLASS(CRibbonGadgetsView));
00104   AddDocTemplate(pDocTemplate);
00105
00106   // Parse command line for standard shell commands, DDE, file open
00107   CCommandLineInfo cmdInfo;
00108   ParseCommandLine(cmdInfo);
00109
00110   cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;
00111
00112   // Dispatch commands specified on the command line
00113   if (!ProcessShellCommand(cmdInfo))
00114     return FALSE;
00115
00116   // The one and only window has been initialized, so show and update it.
00117   m_pMainWnd->ShowWindow(SW_SHOW);
00118   m_pMainWnd->UpdateWindow();
00119
00120   return TRUE;
00121 }
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // CAboutDlg dialog used for App About
00125
00126 class CAboutDlg : public CDialog
00127 {
00128 public:
00129   CAboutDlg();
00130
00131 // Dialog Data
00132   //{{AFX_DATA(CAboutDlg)
00133   enum { IDD = IDD_ABOUTBOX };
00134   //}}AFX_DATA
00135
00136   // ClassWizard generated virtual function overrides
00137   //{{AFX_VIRTUAL(CAboutDlg)
00138   protected:
00139   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00140   //}}AFX_VIRTUAL
00141
00142 // Implementation
00143 protected:
00144   //{{AFX_MSG(CAboutDlg)
00145     // No message handlers
00146   //}}AFX_MSG
00147   DECLARE_MESSAGE_MAP()
00148 };
00149
00150 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00151 {
00152   //{{AFX_DATA_INIT(CAboutDlg)
00153   //}}AFX_DATA_INIT
00154 }
00155
00156 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00157 {
00158   CDialog::DoDataExchange(pDX);
00159   //{{AFX_DATA_MAP(CAboutDlg)
00160   //}}AFX_DATA_MAP
00161 }
00162
00163 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00164   //{{AFX_MSG_MAP(CAboutDlg)
00165     // No message handlers
00166   //}}AFX_MSG_MAP
00167 END_MESSAGE_MAP()
00168
00169 // App command to run the dialog
00170 void CRibbonGadgetsApp::OnAppAbout()
00171 {
00172   CAboutDlg aboutDlg;
00173   aboutDlg.DoModal();
00174 }
00175
00176 /////////////////////////////////////////////////////////////////////////////
00177 // CRibbonGadgetsApp message handlers
00178
00179 int CRibbonGadgetsApp::ExitInstance()
00180 {
00181   return CWinAppEx::ExitInstance();
00182 }
00183
00184 void CRibbonGadgetsApp::PreLoadState ()
00185 {
00186   GetContextMenuManager()->AddMenu (_T("Edit menu"), IDR_EDIT_MENU);
00187 }
00188
00189
00190 /////////////////////////////////////////////////////////////////////////////
00191 // CRibbonGadgetsApp message handlers
00192
00193
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTasksPaneApp Member List

This is the complete list of members for CTasksPaneApp, including all inherited members.
CTasksPaneApp() | CTasksPaneApp |
ExitInstance() | CTasksPaneApp | [virtual]
InitInstance() | CTasksPaneApp | [virtual]
OnAppAbout() | CTasksPaneApp |
PreLoadState() | CTasksPaneApp | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/CmnCtrl3.h Source File

  • controls
  • cmnctrl

CmnCtrl3.h

Go to the documentation of this file.
00001 // CmnCtrl3.h : main header file for the CmnCtrl3 application
00002 //
00003
00004 #pragma once
00005
00006 #ifndef __AFXWIN_H__
00007   #error "include 'stdafx.h' before including this file for PCH"
00008 #endif
00009
00010 #include "resource.h"   // main symbols
00011
00012
00013 // CCmnCtrl3App:
00014 // See CmnCtrl3.cpp for the implementation of this class
00015 //
00016
00017 class CCmnCtrl3App : public CWinApp
00018 {
00019 public:
00020   CCmnCtrl3App();
00021
00022 // Overrides
00023   public:
00024   virtual BOOL InitInstance();
00025
00026 // Implementation
00027
00028   DECLARE_MESSAGE_MAP()
00029 };
00030
00031 extern CCmnCtrl3App theApp;
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/spinctrl.cpp Source File

  • general
  • CmnCtrl2

spinctrl.cpp

Go to the documentation of this file.
00001 // SpinCtrl.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "CmnCtrl2.h"
00015 #include "SpinCtrl.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CSpinCtrlPage property page
00024
00025 IMPLEMENT_DYNCREATE(CSpinCtrlPage, CPropertyPage)
00026
00027 #ifdef _DEBUG
00028 #define new DEBUG_NEW
00029 #endif
00030
00031 CSpinCtrlPage::CSpinCtrlPage() : CPropertyPage(CSpinCtrlPage::IDD)
00032 {
00033   //{{AFX_DATA_INIT(CSpinCtrlPage)
00034   m_iAlignment = 0;
00035   m_bArrowkeys = FALSE;
00036   m_bAutobuddy = FALSE;
00037   m_uiRangeFrom = 0;
00038   m_bNothousands = FALSE;
00039   m_iOrientation = 0;
00040   m_bSetbuddyint = FALSE;
00041   m_uiRangeTo = 100;
00042   m_bWrap = FALSE;
00043   //}}AFX_DATA_INIT
00044   m_psp.dwFlags &= ~PSP_HASHELP;  // Lose the Help button
00045 }
00046
00047 CSpinCtrlPage::~CSpinCtrlPage()
00048 {
00049 }
00050
00051 void CSpinCtrlPage::DoDataExchange(CDataExchange* pDX)
00052 {
00053   CPropertyPage::DoDataExchange(pDX);
00054   //{{AFX_DATA_MAP(CSpinCtrlPage)
00055   DDX_CBIndex(pDX, IDC_SPIN_ALIGNMENT, m_iAlignment);
00056   DDX_Check(pDX, IDC_SPIN_ARROWKEYS, m_bArrowkeys);
00057   DDX_Check(pDX, IDC_SPIN_AUTOBUDDY, m_bAutobuddy);
00058   DDX_Text(pDX, IDC_SPIN_FROM, m_uiRangeFrom);
00059   DDV_MinMaxUInt(pDX, m_uiRangeFrom, 0, 65535);
00060   DDX_Check(pDX, IDC_SPIN_NOTHOUSANDS, m_bNothousands);
00061   DDX_CBIndex(pDX, IDC_SPIN_ORIENTATION, m_iOrientation);
00062   DDX_Check(pDX, IDC_SPIN_SETBUDDYINT, m_bSetbuddyint);
00063   DDX_Text(pDX, IDC_SPIN_TO, m_uiRangeTo);
00064   DDV_MinMaxUInt(pDX, m_uiRangeTo, 0, 65535);
00065   DDX_Check(pDX, IDC_SPIN_WRAP, m_bWrap);
00066   //}}AFX_DATA_MAP
00067 }
00068
00069 BOOL CSpinCtrlPage::OnInitDialog()
00070 {
00071   CPropertyPage::OnInitDialog();
00072
00073   CWnd* pEdit = GetDlgItem( IDC_SPIN_EDIT );
00074   pEdit->GetWindowRect( &m_EditRect );
00075   ScreenToClient( &m_EditRect );
00076
00077   CreateSpinCtrl();
00078   SetModified(TRUE);  // allow the APPLY button to become active
00079
00080   return TRUE;
00081 }
00082
00083 void CSpinCtrlPage::CreateSpinCtrl()
00084 {
00085 DWORD dwStyles=0;
00086
00087   // Build styles mask
00088   if ( 1 == m_iAlignment )
00089     dwStyles |= UDS_ALIGNLEFT;      // Control is placed to the left of buddy, if set
00090                     // (default = unattached)
00091   else if ( 2 == m_iAlignment )
00092     dwStyles |= UDS_ALIGNRIGHT;     // Control is placed to the right of buddy, if set
00093                     // (default = unattached)
00094   if ( m_bArrowkeys )
00095     dwStyles |= UDS_ARROWKEYS;      // Up/Down arrow keys inc/decrement, if set
00096
00097   if ( m_bAutobuddy )
00098     dwStyles |= UDS_AUTOBUDDY;      // Previous (in Z-order) edit used as buddy, if set
00099
00100   if ( m_bNothousands )
00101     dwStyles |= UDS_NOTHOUSANDS;    // No thousands seperator used, if set
00102
00103   if ( 1 == m_iOrientation )
00104     dwStyles |= UDS_HORZ;           // Control is horizontal, if set (default = vert)
00105
00106   if ( m_bSetbuddyint )
00107     dwStyles |= UDS_SETBUDDYINT;    // Control updates buddy edit with position, if set
00108
00109   if ( m_bWrap )
00110     dwStyles |= UDS_WRAP;           // Position wraps when range exceeded, if set
00111
00112   // Get edit control and change Z-order (created controls go at bottom of Z-order)
00113   CWnd* pEdit = GetDlgItem( IDC_SPIN_EDIT );
00114   pEdit->SetWindowPos( &wndBottom, m_EditRect.left, m_EditRect.top,
00115              m_EditRect.Width(), m_EditRect.Height(), SWP_SHOWWINDOW );
00116
00117   // Create spin (up-down) control
00118   CWnd* pWnd = GetDlgItem( IDC_SPIN_POS );
00119   CRect rect;
00120   pWnd->GetWindowRect( &rect );
00121   ScreenToClient( &rect );
00122
00123   m_Spin.Create( WS_VISIBLE|WS_CHILD|dwStyles, rect, this, IDC_SPIN );
00124   m_Spin.SetRange( (short)m_uiRangeFrom, (short)m_uiRangeTo );  // Sends UDM_SETRANGE
00125
00126   // Prime edit control with initial value
00127   TCHAR buf[32];
00128   int pos = m_Spin.GetPos();                      // Sends UDM_GETPOS
00129   _stprintf_s( buf, 32, _T("%d"), pos );
00130   pWnd = m_Spin.GetBuddy();                       // Sends UDM_GETBUDDY
00131   if (pWnd != NULL && HIWORD(pos) != 1)           // Check for error in high word
00132     pWnd->SetWindowText( buf );
00133 }
00134
00135 BEGIN_MESSAGE_MAP(CSpinCtrlPage, CPropertyPage)
00136   //{{AFX_MSG_MAP(CSpinCtrlPage)
00137   ON_BN_CLICKED(IDC_SPIN_ARROWKEYS, OnAnyChange)
00138   ON_BN_CLICKED(IDC_SPIN_AUTOBUDDY, OnAnyChange)
00139   ON_BN_CLICKED(IDC_SPIN_NOTHOUSANDS, OnAnyChange)
00140   ON_CBN_SELCHANGE(IDC_SPIN_ORIENTATION, OnAnyChange)
00141   ON_BN_CLICKED(IDC_SPIN_SETBUDDYINT, OnAnyChange)
00142   ON_EN_CHANGE(IDC_SPIN_TO, OnAnyChange)
00143   ON_BN_CLICKED(IDC_SPIN_WRAP, OnAnyChange)
00144   ON_EN_CHANGE(IDC_SPIN_EDIT, OnAnyChange)
00145   ON_EN_CHANGE(IDC_SPIN_FROM, OnAnyChange)
00146   ON_CBN_SELCHANGE(IDC_SPIN_ALIGNMENT, OnAnyChange)
00147   //}}AFX_MSG_MAP
00148 END_MESSAGE_MAP()
00149
00150 /////////////////////////////////////////////////////////////////////////////
00151 // CSpinCtrlPage message handlers
00152
00153 BOOL CSpinCtrlPage::OnApply()
00154 {
00155   UpdateData();
00156   m_Spin.DestroyWindow();
00157
00158   CreateSpinCtrl();
00159   return TRUE;
00160 }
00161
00162 void CSpinCtrlPage::OnAnyChange()
00163 {
00164   SetModified(TRUE);
00165 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPage2 Member List

This is the complete list of members for CPage2, including all inherited members.
CPage2() | CPage2 |
DoDataExchange(CDataExchange *pDX) | CPage2 | [protected, virtual]
IDD enum value | CPage2 |
m_Color | CPage2 | [protected]
m_ColorPicker | CPage2 |
m_palColorPicker | CPage2 | [protected]
m_palSys | CPage2 | [protected]
m_strRGB | CPage2 |
m_strRGBColorBar | CPage2 |
m_strRGBColorBar2 | CPage2 |
m_strRGBColorDialog | CPage2 |
m_strRGBColorPalette | CPage2 |
m_wndColorBar | CPage2 | [protected]
m_wndColorBar2 | CPage2 | [protected]
m_wndColorBarFrame | CPage2 |
m_wndColorBarFrame2 | CPage2 |
m_wndColorPalette | CPage2 |
m_wndLum | CPage2 |
OnColorBar() | CPage2 | [protected]
OnColorBar2() | CPage2 | [protected]
OnColorDlg() | CPage2 | [protected]
OnColorPalette() | CPage2 | [protected]
OnColorPicker() | CPage2 | [protected]
OnInitDialog() | CPage2 | [protected, virtual]
OnLum() | CPage2 | [protected]
~CPage2() | CPage2 |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTasksPaneDoc Member List

This is the complete list of members for CTasksPaneDoc, including all inherited members.
CTasksPaneDoc() | CTasksPaneDoc | [protected]
OnNewDocument() | CTasksPaneDoc | [virtual]
Serialize(CArchive &ar) | CTasksPaneDoc | [virtual]
SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU=TRUE) | CTasksPaneDoc | [virtual]
~CTasksPaneDoc() | CTasksPaneDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTwoButtonsProp Member List

This is the complete list of members for CTwoButtonsProp, including all inherited members.
AdjustButtonRect() | CTwoButtonsProp | [protected, virtual]
CTwoButtonsProp(const CString &strName, const COleVariant &varValue) | CTwoButtonsProp |
HasButton() const | CTwoButtonsProp | [inline, protected, virtual]
m_images | CTwoButtonsProp | [protected]
OnClickButton(CPoint point) | CTwoButtonsProp | [protected, virtual]
OnDrawButton(CDC *pDC, CRect rectButton) | CTwoButtonsProp | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/StdAfx.H Source File

  • ole
  • TstCon

StdAfx.H

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Classes Reference and related electronic
00009 // documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft C++ Libraries products.
00012
00013 #if !defined(AFX_STDAFX_H__19818502_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
00014 #define AFX_STDAFX_H__19818502_B837_11D0_8DF1_00C04FB68D60__INCLUDED_
00015
00016 #if _MSC_VER >= 1000
00017 #pragma once
00018 #endif // _MSC_VER >= 1000
00019
00020 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00021
00022 #include "targetver.h"
00023
00024 #include <afxwin.h>         // MFC core and standard components
00025 #include <afxext.h>         // MFC extensions
00026 #include <afxole.h>         // MFC OLE classes
00027 #include <afxodlgs.h>       // MFC OLE dialog classes
00028 #include <afxdisp.h>        // MFC OLE automation classes
00029 #ifndef _AFX_NO_AFXCMN_SUPPORT
00030 #include <afxcmn.h>         // MFC support for Windows Common Controls
00031 #endif // _AFX_NO_AFXCMN_SUPPORT
00032 #include <afxdtctl.h>
00033 #include <afxctl.h>
00034 #include <afxtempl.h>
00035 #include <afxconv.h>
00036 #include <comcat.h>
00037 #include <windowsx.h>
00038 #include <activscp.h>
00039 #include <objsafe.h>
00040 #include <shlwapi.h>
00041 #include <atlbase.h>
00042
00043 #undef SubclassWindow  // Conflicts with CWnd::SubclassWindow
00044
00045 #pragma warning( disable: 4310 )  // Cast truncates constant value
00046 #pragma warning( disable: 4244 )  // Conversion: possible loss of data
00047 #pragma warning( disable: 4099 )  // class/struct confusion
00048 #pragma warning( disable: 4311 )  // pointer truncation
00049
00050 #include <comdef.h>
00051
00052 #pragma warning( default: 4310 )  // Cast truncates constant value
00053 #pragma warning( default: 4244 )  // Conversion: possible loss of data
00054 #pragma warning( default: 4099 )  // class/struct confusion
00055
00056 #include "hlp/popups.h"
00057
00058 //{{AFX_INSERT_LOCATION}}
00059 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00060
00061 #endif // !defined(AFX_STDAFX_H__19818502_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatba.cpp Source File

  • ole
  • wordpad

formatba.cpp

Go to the documentation of this file.
00001 // formatba.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #include "wordpad.h"
00015 #include "wordpdoc.h"
00016 #include "wordpvw.h"
00017 #include "formatba.h"
00018 #include "strings.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 // reserve lobyte for charset
00026 #define PRINTER_FONT 0x0100
00027 #define TT_FONT 0x0200
00028 #define DEVICE_FONT 0x0400
00029
00030 #define BMW 16
00031 #define BMH 15
00032
00033 static int nFontSizes[] =
00034   {8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72};
00035 int CLocalComboBox::m_nFontHeight = 0;
00036
00037 class CFontDesc
00038 {
00039 public:
00040   CFontDesc(LPCTSTR lpszName, LPCTSTR lpszScript, BYTE nCharSet,
00041     BYTE nPitchAndFamily, DWORD dwFlags);
00042   CString m_strName;
00043   CString m_strScript;
00044   BYTE m_nCharSet;
00045   BYTE m_nPitchAndFamily;
00046   DWORD m_dwFlags;
00047 };
00048
00049 CFontDesc::CFontDesc(LPCTSTR lpszName, LPCTSTR lpszScript, BYTE nCharSet,
00050   BYTE nPitchAndFamily, DWORD dwFlags)
00051 {
00052   m_strName = lpszName;
00053   m_strScript = lpszScript;
00054   m_nCharSet = nCharSet;
00055   m_nPitchAndFamily = nPitchAndFamily;
00056   m_dwFlags = dwFlags;
00057 }
00058
00059 BEGIN_MESSAGE_MAP(CFormatBar, CToolBar)
00060   //{{AFX_MSG_MAP(CFormatBar)
00061   ON_WM_CREATE()
00062   ON_WM_DESTROY()
00063   //}}AFX_MSG_MAP
00064   ON_CBN_DROPDOWN(IDC_FONTSIZE, OnFontSizeDropDown)
00065   ON_CBN_KILLFOCUS(IDC_FONTNAME, OnFontNameKillFocus)
00066   ON_CBN_KILLFOCUS(IDC_FONTSIZE, OnFontSizeKillFocus)
00067   ON_CBN_SETFOCUS(IDC_FONTNAME, OnComboSetFocus)
00068   ON_CBN_SETFOCUS(IDC_FONTSIZE, OnComboSetFocus)
00069   ON_CBN_CLOSEUP(IDC_FONTNAME, OnComboCloseUp)
00070   ON_CBN_CLOSEUP(IDC_FONTSIZE, OnComboCloseUp)
00071   ON_REGISTERED_MESSAGE(CWordPadApp::m_nPrinterChangedMsg, OnPrinterChanged)
00072   // Global help commands
00073 END_MESSAGE_MAP()
00074
00075 static CSize GetBaseUnits(CFont* pFont)
00076 {
00077   ENSURE(pFont != NULL);
00078   ASSERT(pFont->GetSafeHandle() != NULL);
00079   pFont = theApp.m_dcScreen.SelectObject(pFont);
00080   TEXTMETRIC tm;
00081   VERIFY(theApp.m_dcScreen.GetTextMetrics(&tm));
00082
00083   theApp.m_dcScreen.SelectObject(pFont);
00084 //  return CSize(tm.tmAveCharWidth, tm.tmHeight+tm.tmDescent);
00085   return CSize(tm.tmAveCharWidth, tm.tmHeight);
00086 }
00087
00088 CFormatBar::CFormatBar()
00089 {
00090   CFont fnt;
00091   fnt.Attach(GetStockObject(theApp.m_nDefFont));
00092   m_szBaseUnits = GetBaseUnits(&fnt);
00093   CLocalComboBox::m_nFontHeight = m_szBaseUnits.cy;
00094 }
00095
00096 void CFormatBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
00097 {
00098   CToolBar::OnUpdateCmdUI(pTarget, bDisableIfNoHndler);
00099   // don't update combo boxes if either one has the focus
00100   if (!m_comboFontName.HasFocus() && !m_comboFontSize.HasFocus())
00101     SyncToView();
00102 }
00103
00104 void CFormatBar::SyncToView()
00105 {
00106   USES_CONVERSION;
00107   // get the current font from the view and update
00108   CHARHDR fh;
00109   CHARFORMAT& cf = fh.cf;
00110   fh.hwndFrom = m_hWnd;
00111   fh.idFrom = GetDlgCtrlID();
00112   fh.code = FN_GETFORMAT;
00113   VERIFY(GetOwner()->SendMessage(WM_NOTIFY, fh.idFrom, (LPARAM)&fh));
00114
00115   // the selection must be same font and charset to display correctly
00116   if ((cf.dwMask & (CFM_FACE|CFM_CHARSET)) == (CFM_FACE|CFM_CHARSET))
00117     m_comboFontName.MatchFont(cf.szFaceName, cf.bCharSet);
00118   else
00119     m_comboFontName.SetTheText(_T(""));
00120
00121   // SetTwipSize only updates if different
00122   // -1 means selection is not a single point size
00123   m_comboFontSize.SetTwipSize( (cf.dwMask & CFM_SIZE) ? cf.yHeight : -1);
00124 }
00125
00126 void CFormatBar::OnFontSizeDropDown()
00127 {
00128   CString str;
00129   m_comboFontName.GetTheText(str);
00130   LPCTSTR lpszName = NULL;
00131   BOOL bPrinterFont = FALSE;
00132   int nIndex = m_comboFontName.FindStringExact(-1, str);
00133   if (nIndex != CB_ERR)
00134   {
00135     CFontDesc* pDesc = (CFontDesc*)m_comboFontName.GetItemData(nIndex);
00136     ENSURE(pDesc != NULL);
00137     bPrinterFont = pDesc->m_dwFlags & PRINTER_FONT;
00138     lpszName = pDesc->m_strName;
00139   }
00140
00141   int nSize = m_comboFontSize.GetTwipSize();
00142   if (nSize == -2) // error
00143   {
00144     AfxMessageBox(IDS_INVALID_NUMBER, MB_OK|MB_ICONINFORMATION);
00145     nSize = m_comboFontSize.m_nTwipsLast;
00146   }
00147   else if ((nSize >= 0 && nSize < 20) || nSize > 32760)
00148   {
00149     AfxMessageBox(IDS_INVALID_FONTSIZE, MB_OK|MB_ICONINFORMATION);
00150     nSize = m_comboFontSize.m_nTwipsLast;
00151   }
00152
00153   if (bPrinterFont)
00154     m_comboFontSize.EnumFontSizes(m_dcPrinter, lpszName);
00155   else
00156     m_comboFontSize.EnumFontSizes(theApp.m_dcScreen, lpszName);
00157   m_comboFontSize.SetTwipSize(nSize);
00158 }
00159
00160 void CFormatBar::OnComboCloseUp()
00161 {
00162   NotifyOwner(NM_RETURN);
00163 }
00164
00165 void CFormatBar::OnComboSetFocus()
00166 {
00167   NotifyOwner(NM_SETFOCUS);
00168 }
00169
00170 void CFormatBar::OnFontNameKillFocus()
00171 {
00172   USES_CONVERSION;
00173   // get the current font from the view and update
00174   NotifyOwner(NM_KILLFOCUS);
00175
00176   CCharFormat cf;
00177   cf.szFaceName[0] = NULL;
00178
00179   // this will retrieve the font entered in the edit control
00180   // it tries to match the font to something already present in the combo box
00181   // this effectively ignores case of a font the user enters
00182   // if a user enters arial, this will cause it to become Arial
00183   CString str;
00184   m_comboFontName.GetTheText(str);    // returns "arial"
00185   m_comboFontName.SetTheText(str);                    // selects "Arial"
00186   m_comboFontName.GetTheText(str);    // returns "Arial"
00187
00188   // if font name box is not empty
00189   if (str[0] != NULL)
00190   {
00191     cf.dwMask = CFM_FACE | CFM_CHARSET;
00192     int nIndex = m_comboFontName.FindStringExact(-1, str);
00193     if (nIndex != CB_ERR)
00194     {
00195       CFontDesc* pDesc = (CFontDesc*)m_comboFontName.GetItemData(nIndex);
00196       ENSURE(pDesc != NULL);
00197       ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);
00198       _tcsncpy_s(cf.szFaceName, LF_FACESIZE, pDesc->m_strName, _TRUNCATE);
00199       cf.bCharSet = pDesc->m_nCharSet;
00200       cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;
00201     }
00202     else // unknown font
00203     {
00204       ASSERT(str.GetLength() < LF_FACESIZE);
00205       _tcsncpy_s(cf.szFaceName, LF_FACESIZE, str, _TRUNCATE);
00206       cf.bCharSet = DEFAULT_CHARSET;
00207       cf.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
00208     }
00209     SetCharFormat(cf);
00210   }
00211 }
00212
00213 void CFormatBar::OnFontSizeKillFocus()
00214 {
00215   NotifyOwner(NM_KILLFOCUS);
00216   int nSize = m_comboFontSize.GetTwipSize();
00217   if (nSize == -2)
00218   {
00219     AfxMessageBox(IDS_INVALID_NUMBER, MB_OK|MB_ICONINFORMATION);
00220     nSize = m_comboFontSize.m_nTwipsLast;
00221   }
00222   else if ((nSize >= 0 && nSize < 20) || nSize > 32760)
00223   {
00224     AfxMessageBox(IDS_INVALID_FONTSIZE, MB_OK|MB_ICONINFORMATION);
00225     nSize = m_comboFontSize.m_nTwipsLast;
00226   }
00227   else if (nSize > 0)
00228   {
00229     CCharFormat cf;
00230     cf.dwMask = CFM_SIZE;
00231     cf.yHeight = nSize;
00232     SetCharFormat(cf);
00233   }
00234 }
00235
00236 LONG_PTR CFormatBar::OnPrinterChanged(UINT_PTR, LONG_PTR)
00237 {
00238   theApp.CreatePrinterDC(m_dcPrinter);
00239   m_comboFontName.EnumFontFamiliesEx(m_dcPrinter);
00240   return 0;
00241 }
00242
00243 int CFormatBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00244 {
00245   if (CToolBar::OnCreate(lpCreateStruct) == -1)
00246     return -1;
00247
00248   theApp.m_listPrinterNotify.AddTail(m_hWnd);
00249
00250   CRect rect(0,0, (3*LF_FACESIZE*m_szBaseUnits.cx)/2, 200);
00251   if (!m_comboFontName.Create(WS_TABSTOP|WS_VISIBLE|WS_TABSTOP|
00252     WS_VSCROLL|CBS_DROPDOWN|CBS_SORT|CBS_AUTOHSCROLL|CBS_HASSTRINGS|
00253     CBS_OWNERDRAWFIXED, rect, this, IDC_FONTNAME))
00254   {
00255     TRACE0("Failed to create fontname combo-box\n");
00256     return -1;
00257   }
00258   m_comboFontName.LimitText(LF_FACESIZE);
00259
00260   rect.SetRect(0, 0, 10*m_szBaseUnits.cx, 200);
00261   if (!m_comboFontSize.Create(WS_TABSTOP|WS_VISIBLE|WS_TABSTOP|
00262     WS_VSCROLL|CBS_DROPDOWN, rect, this, IDC_FONTSIZE))
00263   {
00264     TRACE0("Failed to create fontsize combo-box\n");
00265     return -1;
00266   }
00267
00268   m_comboFontSize.LimitText(4);
00269   m_comboFontName.EnumFontFamiliesEx(m_dcPrinter);
00270
00271   return 0;
00272 }
00273
00274 void CFormatBar::OnDestroy()
00275 {
00276   CToolBar::OnDestroy();
00277   POSITION pos = theApp.m_listPrinterNotify.Find(m_hWnd);
00278   ASSERT(pos != NULL);
00279   theApp.m_listPrinterNotify.RemoveAt(pos);
00280 }
00281
00282 void CFormatBar::PositionCombos()
00283 {
00284   CRect rect;
00285   // make font name box same size as font size box
00286   // this is necessary since font name box is owner draw
00287   m_comboFontName.SetItemHeight(-1, m_comboFontSize.GetItemHeight(-1));
00288
00289   m_comboFontName.GetWindowRect(&rect);
00290   int nHeight = rect.Height();
00291
00292   m_comboFontName.GetWindowRect(&rect);
00293   SetButtonInfo(0, IDC_FONTNAME, TBBS_SEPARATOR, rect.Width());
00294   GetItemRect(0, &rect); // FontName ComboBox
00295   m_comboFontName.SetWindowPos(NULL, rect.left,
00296     ((rect.Height() - nHeight) / 2) + rect.top, 0, 0,
00297     SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE);
00298
00299   m_comboFontSize.GetWindowRect(&rect);
00300   SetButtonInfo(2, IDC_FONTSIZE, TBBS_SEPARATOR, rect.Width());
00301   GetItemRect(2, &rect); // FontSize ComboBox
00302   m_comboFontSize.SetWindowPos(NULL, rect.left,
00303     ((rect.Height() - nHeight) / 2) + rect.top, 0, 0,
00304     SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE);
00305 }
00306
00307 /////////////////////////////////////////////////////////////////////////////
00308 // CFontComboBox
00309
00310 BEGIN_MESSAGE_MAP(CFontComboBox, CLocalComboBox)
00311   //{{AFX_MSG_MAP(CFontComboBox)
00312   ON_WM_DESTROY()
00313   //}}AFX_MSG_MAP
00314   // Global help commands
00315 END_MESSAGE_MAP()
00316
00317 CFontComboBox::CFontComboBox()
00318 {
00319   VERIFY(m_bmFontType.LoadBitmap(IDB_FONTTYPE));
00320 }
00321
00322 void CFontComboBox::OnDestroy()
00323 {
00324   // destroy all the CFontDesc's
00325   EmptyContents();
00326   CLocalComboBox::OnDestroy();
00327 }
00328
00329 void CFontComboBox::EmptyContents()
00330 {
00331   // destroy all the CFontDesc's
00332   int nCount = GetCount();
00333   for (int i=0;i<nCount;i++)
00334     delete (CFontDesc*)GetItemData(i);
00335 }
00336
00337 void CFontComboBox::EnumFontFamiliesEx(CDC& dc, BYTE nCharSet)
00338 {
00339   CMapStringToPtr map;
00340   CString str;
00341   GetTheText(str);
00342
00343   EmptyContents();
00344   ResetContent();
00345   LOGFONT lf;
00346   memset(&lf, 0, sizeof(LOGFONT));
00347   lf.lfCharSet = nCharSet;
00348
00349   if (dc.m_hDC != NULL)
00350   {
00351     if (theApp.m_bWin4)
00352     {
00353 			::EnumFontFamiliesEx(dc.m_hDC, &lf,
00354         (FONTENUMPROC) EnumFamPrinterCallBackEx, (LPARAM) this, NULL);
00355     }
00356     else
00357     {
00358       ::EnumFontFamilies(dc.m_hDC, NULL,
00359         (FONTENUMPROC) EnumFamPrinterCallBack, (LPARAM) this);
00360     }
00361   }
00362   else
00363   {
00364     HDC hDC = theApp.m_dcScreen.m_hDC;
00365     ASSERT(hDC != NULL);
00366     if (theApp.m_bWin4)
00367     {
00368 			::EnumFontFamiliesEx(hDC, &lf,
00369         (FONTENUMPROC) EnumFamScreenCallBackEx, (LPARAM) this, NULL);
00370     }
00371     else
00372     {
00373       ::EnumFontFamilies(hDC, NULL,
00374         (FONTENUMPROC) EnumFamScreenCallBack, (LPARAM) this);
00375     }
00376   }
00377   // now walk through the fonts and remove (charset) from fonts with only one
00378
00379   INT_PTR nCount = m_arrayFontDesc.GetSize();
00380   // walk through fonts adding names to string map
00381   // first time add value 0, after that add value 1
00382   INT_PTR i;
00383   for (i = 0; i<nCount;i++)
00384   {
00385     CFontDesc* pDesc = (CFontDesc*)m_arrayFontDesc[i];
00386     void* pv = NULL;
00387     if (map.Lookup(pDesc->m_strName, pv)) // found it
00388     {
00389       if (pv == NULL) // only one entry so far
00390       {
00391         map.RemoveKey(pDesc->m_strName);
00392         map.SetAt(pDesc->m_strName, (void*)1);
00393       }
00394     }
00395     else // not found
00396       map.SetAt(pDesc->m_strName, (void*)0);
00397   }
00398
00399   for (i = 0; i<nCount;i++)
00400   {
00401     CFontDesc* pDesc = (CFontDesc*)m_arrayFontDesc[i];
00402     CString myStr = pDesc->m_strName;
00403     void* pv = NULL;
00404     VERIFY(map.Lookup(myStr, pv));
00405     if (pv != NULL && !pDesc->m_strScript.IsEmpty())
00406     {
00407       myStr += " (";
00408       myStr += pDesc->m_strScript;
00409       myStr += ")";
00410     }
00411
00412     int nIndex = AddString(myStr);
00413     ASSERT(nIndex >=0);
00414     if (nIndex >=0) //no error
00415       SetItemData(nIndex, (DWORD_PTR)pDesc);
00416   }
00417
00418   SetTheText(str);
00419   m_arrayFontDesc.RemoveAll();
00420 }
00421
00422 void CFontComboBox::AddFont(ENUMLOGFONT* pelf, DWORD dwType, LPCTSTR lpszScript)
00423 {
00424   LOGFONT& lf = pelf->elfLogFont;
00425   if (lf.lfCharSet == MAC_CHARSET) // don't put in MAC fonts, commdlg doesn't either
00426     return;
00427   // Don't display vertical font for FE platform
00428   if ((GetSystemMetrics(SM_DBCSENABLED)) && (lf.lfFaceName[0] == '@'))
00429     return;
00430   // don't put in non-printer raster fonts
00431   CFontDesc* pDesc = new CFontDesc(lf.lfFaceName, lpszScript,
00432     lf.lfCharSet, lf.lfPitchAndFamily, dwType);
00433   m_arrayFontDesc.Add(pDesc);
00434 }
00435
00436 BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamScreenCallBack(ENUMLOGFONT* pelf,
00437   NEWTEXTMETRICEX* /*lpntm*/, int FontType, LPVOID pThis)
00438 {
00439   // don't put in non-printer raster fonts
00440   if (FontType & RASTER_FONTTYPE)
00441     return 1;
00442   DWORD dwData = (FontType & TRUETYPE_FONTTYPE) ? TT_FONT : 0;
00443   ((CFontComboBox *)pThis)->AddFont(pelf, dwData);
00444   return 1;
00445 }
00446
00447 BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamPrinterCallBack(ENUMLOGFONT* pelf,
00448   NEWTEXTMETRICEX* /*lpntm*/, int FontType, LPVOID pThis)
00449 {
00450   DWORD dwData = PRINTER_FONT;
00451   if (FontType & TRUETYPE_FONTTYPE)
00452     dwData |= TT_FONT;
00453   else if (FontType & DEVICE_FONTTYPE)
00454     dwData |= DEVICE_FONT;
00455   ((CFontComboBox *)pThis)->AddFont(pelf, dwData);
00456   return 1;
00457 }
00458
00459 BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamScreenCallBackEx(ENUMLOGFONTEX* pelf,
00460   NEWTEXTMETRICEX* /*lpntm*/, int FontType, LPVOID pThis)
00461 {
00462   // don't put in non-printer raster fonts
00463   if (FontType & RASTER_FONTTYPE)
00464     return 1;
00465   DWORD dwData = (FontType & TRUETYPE_FONTTYPE) ? TT_FONT : 0;
00466   ((CFontComboBox *)pThis)->AddFont((ENUMLOGFONT*)pelf, dwData, CString(pelf->elfScript));
00467   return 1;
00468 }
00469
00470 BOOL CALLBACK AFX_EXPORT CFontComboBox::EnumFamPrinterCallBackEx(ENUMLOGFONTEX* pelf,
00471   NEWTEXTMETRICEX* /*lpntm*/, int FontType, LPVOID pThis)
00472 {
00473   DWORD dwData = PRINTER_FONT;
00474   if (FontType & TRUETYPE_FONTTYPE)
00475     dwData |= TT_FONT;
00476   else if (FontType & DEVICE_FONTTYPE)
00477     dwData |= DEVICE_FONT;
00478   ((CFontComboBox *)pThis)->AddFont((ENUMLOGFONT*)pelf, dwData, CString(pelf->elfScript));
00479   return 1;
00480 }
00481
00482 void CFontComboBox::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00483 {
00484   ASSERT(lpDIS->CtlType == ODT_COMBOBOX);
00485   int id = (int)(WORD)lpDIS->itemID;
00486
00487   CDC *pDC = CDC::FromHandle(lpDIS->hDC);
00488   CRect rc(lpDIS->rcItem);
00489   if (lpDIS->itemState & ODS_FOCUS)
00490     pDC->DrawFocusRect(rc);
00491   int nIndexDC = pDC->SaveDC();
00492
00493   CBrush brushFill;
00494   if (lpDIS->itemState & ODS_SELECTED)
00495   {
00496     brushFill.CreateSolidBrush(::GetSysColor(COLOR_HIGHLIGHT));
00497     pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));
00498   }
00499   else
00500     brushFill.CreateSolidBrush(pDC->GetBkColor());
00501   pDC->SetBkMode(TRANSPARENT);
00502   pDC->FillRect(rc, &brushFill);
00503
00504   CFontDesc* pDesc= (CFontDesc*)lpDIS->itemData;
00505   ENSURE(pDesc != NULL);
00506   DWORD dwData = pDesc->m_dwFlags;
00507   if (dwData & (TT_FONT|DEVICE_FONT)) // truetype or device flag set by SetItemData
00508   {
00509     CDC dc;
00510     dc.CreateCompatibleDC(pDC);
00511     CBitmap* pBitmap = dc.SelectObject(&m_bmFontType);
00512     if (dwData & TT_FONT)
00513       pDC->BitBlt(rc.left, rc.top, BMW, BMH, &dc, BMW, 0, SRCAND);
00514     else // DEVICE_FONT
00515       pDC->BitBlt(rc.left, rc.top, BMW, BMH, &dc, 0, 0, SRCAND);
00516     dc.SelectObject(pBitmap);
00517   }
00518
00519   rc.left += BMW + 6;
00520   CString strText;
00521   GetLBText(id, strText);
00522   pDC->TextOut(rc.left,rc.top,strText,strText.GetLength());
00523
00524   pDC->RestoreDC(nIndexDC);
00525 }
00526
00527 void CFontComboBox::MeasureItem(LPMEASUREITEMSTRUCT lpMIS)
00528 {
00529   ASSERT(lpMIS->CtlType == ODT_COMBOBOX);
00530   ASSERT(m_nFontHeight > 0);
00531   CRect rc;
00532
00533   GetWindowRect(&rc);
00534   lpMIS->itemWidth = rc.Width();
00535   lpMIS->itemHeight = max(BMH, m_nFontHeight);
00536 }
00537
00538 int CFontComboBox::CompareItem(LPCOMPAREITEMSTRUCT lpCIS)
00539 {
00540   ASSERT(lpCIS->CtlType == ODT_COMBOBOX);
00541   int id1 = (int)(WORD)lpCIS->itemID1;
00542   int id2 = (int)(WORD)lpCIS->itemID2;
00543   CString str1,str2;
00544   if (id1 == -1)
00545     return -1;
00546   if (id2 == -1)
00547     return 1;
00548   GetLBText(id1, str1);
00549   GetLBText(id2, str2);
00550   return str1.Collate(str2);
00551 }
00552
00553 // find a font with the face name and charset
00554 void CFontComboBox::MatchFont(LPCTSTR lpszName, BYTE nCharSet)
00555 {
00556   int nFirstIndex = FindString(-1, lpszName);
00557   if (nFirstIndex != CB_ERR)
00558   {
00559     int nIndex = nFirstIndex;
00560     do
00561     {
00562       CFontDesc* pDesc = (CFontDesc*)GetItemData(nIndex);
00563       ENSURE(pDesc != NULL);
00564       // check the actual font name to avoid matching Courier western
00565       // to Courier New western
00566       if ((nCharSet == DEFAULT_CHARSET || pDesc->m_nCharSet == nCharSet) &&
00567         lstrcmp(lpszName, pDesc->m_strName)==0)
00568       {
00569         //got a match
00570         if (GetCurSel() != nIndex)
00571           SetCurSel(nIndex);
00572         return;
00573       }
00574       nIndex = FindString(nIndex, lpszName);
00575     } while (nIndex != nFirstIndex);
00576     // loop until found or back to first item again
00577   }
00578   //enter font name
00579   SetTheText(lpszName, TRUE);
00580 }
00581
00582 /////////////////////////////////////////////////////////////////////////////
00583 // CSizeComboBox
00584
00585 CSizeComboBox::CSizeComboBox()
00586 {
00587   m_nTwipsLast = 0;
00588 }
00589
00590 void CSizeComboBox::EnumFontSizes(CDC& dc, LPCTSTR pFontName)
00591 {
00592   ResetContent();
00593   if (pFontName == NULL)
00594     return;
00595   if (pFontName[0] == NULL)
00596     return;
00597
00598   ASSERT(dc.m_hDC != NULL);
00599   m_nLogVert = dc.GetDeviceCaps(LOGPIXELSY);
00600
00601   ::EnumFontFamilies(dc.m_hDC, pFontName,
00602     (FONTENUMPROC) EnumSizeCallBack, (LPARAM) this);
00603 }
00604
00605 void CSizeComboBox::TwipsToPointString(LPTSTR lpszBuf, int nTwips)
00606 {
00607   ENSURE(lpszBuf != NULL);
00608   lpszBuf[0] = NULL;
00609   if (nTwips >= 0)
00610   {
00611     // round to nearest half point
00612     nTwips = (nTwips+5)/10;
00613     if ((nTwips%2) == 0)
00614       _stprintf_s(lpszBuf, 10, _T("%ld"), nTwips/2);
00615     else
00616       _stprintf_s(lpszBuf, 10, _T("%.1f"), (float)nTwips/2.F);
00617   }
00618 }
00619
00620 void CSizeComboBox::SetTwipSize(int nTwips)
00621 {
00622   if (nTwips != GetTwipSize())
00623   {
00624     TCHAR buf[10];
00625     TwipsToPointString(buf, nTwips);
00626     SetTheText(buf, TRUE);
00627   }
00628   m_nTwipsLast = nTwips;
00629 }
00630
00631 int CSizeComboBox::GetTwipSize()
00632 {
00633   // return values
00634   // -2 -- error
00635   // -1 -- edit box empty
00636   // >=0 -- font size in twips
00637   CString str;
00638   GetTheText(str);
00639   LPCTSTR lpszText = str;
00640
00641   while (*lpszText == ' ' || *lpszText == '\t')
00642     lpszText++;
00643
00644   if (lpszText[0] == NULL)
00645     return -1; // no text in control
00646
00647   double d = _tcstod(lpszText, (LPTSTR*)&lpszText);
00648   while (*lpszText == ' ' || *lpszText == '\t')
00649     lpszText++;
00650
00651   if (*lpszText != NULL)
00652     return -2;   // not terminated properly
00653
00654   return (d<0.) ? 0 : (int)(d*20.);
00655 }
00656
00657 BOOL CALLBACK AFX_EXPORT CSizeComboBox::EnumSizeCallBack(LOGFONT FAR* /*lplf*/,
00658     LPNEWTEXTMETRIC lpntm, int FontType, LPVOID lpv)
00659 {
00660   CSizeComboBox* pThis = (CSizeComboBox*)lpv;
00661   ENSURE(pThis != NULL);
00662   TCHAR buf[10];
00663   if (
00664     (FontType & TRUETYPE_FONTTYPE) ||
00665     !( (FontType & TRUETYPE_FONTTYPE) || (FontType & RASTER_FONTTYPE) )
00666     ) // if truetype or vector font
00667   {
00668     // this occurs when there is a truetype and nontruetype version of a font
00669     if (pThis->GetCount() != 0)
00670       pThis->ResetContent();
00671
00672     for (int i = 0; i < 16; i++)
00673     {
00674       _stprintf_s(buf, 10, _T("%d"), nFontSizes[i]);
00675       pThis->AddString(buf);
00676     }
00677     return FALSE; // don't call me again
00678   }
00679   // calc character height in pixels
00680   pThis->InsertSize(MulDiv(lpntm->tmHeight-lpntm->tmInternalLeading,
00681     1440, pThis->m_nLogVert));
00682   return TRUE; // call me again
00683 }
00684
00685 void CSizeComboBox::InsertSize(int nSize)
00686 {
00687   ASSERT(nSize > 0);
00688   DWORD dwSize = (DWORD)nSize;
00689   TCHAR buf[10];
00690   TwipsToPointString(buf, nSize);
00691   if (FindStringExact(-1, buf) == CB_ERR)
00692   {
00693     int nIndex = -1;
00694     int nPos = 0;
00695     DWORD_PTR dw;
00696     while ((dw = GetItemData(nPos)) != CB_ERR)
00697     {
00698       if (dw > dwSize)
00699       {
00700         nIndex = nPos;
00701         break;
00702       }
00703       nPos++;
00704     }
00705     nIndex = InsertString(nIndex, buf);
00706     ASSERT(nIndex != CB_ERR);
00707     if (nIndex != CB_ERR)
00708       SetItemData(nIndex, dwSize);
00709   }
00710 }
00711
00712 /////////////////////////////////////////////////////////////////////////////
00713 // CLocalComboBox
00714
00715 BEGIN_MESSAGE_MAP(CLocalComboBox, CComboBox)
00716   //{{AFX_MSG_MAP(CLocalComboBox)
00717   ON_WM_CREATE()
00718   //}}AFX_MSG_MAP
00719   // Global help commands
00720 END_MESSAGE_MAP()
00721
00722 void CLocalComboBox::GetTheText(CString& str)
00723 {
00724   int nIndex = GetCurSel();
00725   if (nIndex == CB_ERR)
00726     GetWindowText(str);
00727   else
00728     GetLBText(nIndex, str);
00729 }
00730
00731 void CLocalComboBox::SetTheText(LPCTSTR lpszText,BOOL bMatchExact)
00732 {
00733   int idx = (bMatchExact) ? FindStringExact(-1,lpszText) :
00734     FindString(-1, lpszText);
00735   SetCurSel( (idx==CB_ERR) ? -1 : idx);
00736   if (idx == CB_ERR)
00737     SetWindowText(lpszText);
00738 }
00739
00740 BOOL CLocalComboBox::LimitText(int nMaxChars)
00741 {
00742   BOOL b = CComboBox::LimitText(nMaxChars);
00743   if (b)
00744     m_nLimitText = nMaxChars;
00745   return b;
00746 }
00747
00748 int CLocalComboBox::OnCreate(LPCREATESTRUCT lpCreateStruct)
00749 {
00750   if (CComboBox::OnCreate(lpCreateStruct) == -1)
00751     return -1;
00752   SendMessage(WM_SETFONT, (WPARAM)GetStockObject(theApp.m_nDefFont));
00753   return 0;
00754 }
00755
00756 BOOL CLocalComboBox::PreTranslateMessage(MSG* pMsg)
00757 {
00758   if (pMsg->message == WM_KEYDOWN)
00759   {
00760     CFormatBar* pBar = (CFormatBar*)GetParent();
00761     switch (pMsg->wParam)
00762     {
00763     case VK_ESCAPE:
00764       pBar->SyncToView();
00765       pBar->NotifyOwner(NM_RETURN);
00766       return TRUE;
00767     case VK_RETURN:
00768       pBar->NotifyOwner(NM_RETURN);
00769       return TRUE;
00770     case VK_TAB:
00771       pBar->GetNextDlgTabItem(this)->SetFocus();
00772       return TRUE;
00773     case VK_UP:
00774     case VK_DOWN:
00775       if ((GetKeyState(VK_MENU) >= 0) && (GetKeyState(VK_CONTROL) >=0) &&
00776         !GetDroppedState())
00777       {
00778         ShowDropDown();
00779         return TRUE;
00780       }
00781     }
00782   }
00783   return CComboBox::PreTranslateMessage(pMsg);
00784 }
00785
00786 void CFormatBar::NotifyOwner(UINT nCode)
00787 {
00788   NMHDR nm;
00789   nm.hwndFrom = m_hWnd;
00790   nm.idFrom = GetDlgCtrlID();
00791   nm.code = nCode;
00792   GetOwner()->SendMessage(WM_NOTIFY, nm.idFrom, (LPARAM)&nm);
00793 }
00794
00795 void CFormatBar::SetCharFormat(CCharFormat& cf)
00796 {
00797   CHARHDR fnm;
00798   fnm.hwndFrom = m_hWnd;
00799   fnm.idFrom = GetDlgCtrlID();
00800   fnm.code = FN_SETFORMAT;
00801   fnm.cf = cf;
00802   VERIFY(GetOwner()->SendMessage(WM_NOTIFY, fnm.idFrom, (LPARAM)&fnm));
00803 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMfcieApp Member List

This is the complete list of members for CMfcieApp, including all inherited members.
CMfcieApp() | CMfcieApp |
InitInstance() | CMfcieApp | [virtual]
OnAppAbout() | CMfcieApp |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStringCollect Member List

This is the complete list of members for CStringCollect, including all inherited members.
Add(LPCTSTR newValue) | CStringCollect | [protected]
Add(LPCTSTR newValue) | CStringCollect |
CheckIndex(long nIndex) | CStringCollect |
CStringCollect() | CStringCollect | [protected]
Find(LPCTSTR findValue) | CStringCollect | [protected]
Find(LPCTSTR findValue) | CStringCollect |
Get_NewEnum() | CStringCollect |
GetCount() | CStringCollect | [protected]
GetCount() | CStringCollect |
GetItem(long nIndex) | CStringCollect | [protected]
GetItem(long nIndex) | CStringCollect |
GetNewEnum() | CStringCollect | [protected]
m_strArray | CStringCollect |
OnFinalRelease() | CStringCollect | [virtual]
Remove(const VARIANT FAR &removeValue) | CStringCollect | [protected]
Remove(const VARIANT &removeValue) | CStringCollect |
RemoveAll() | CStringCollect | [protected]
RemoveAll() | CStringCollect |
SetCount(long) | CStringCollect |
SetItem(long nIndex, LPCTSTR lpszNewValue) | CStringCollect | [protected]
SetItem(long nIndex, LPCTSTR lpszNewValue) | CStringCollect |
~CStringCollect() | CStringCollect | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LicensedLib::_DLicensed Member List

This is the complete list of members for LicensedLib::_DLicensed, including all inherited members.
AboutBox() LicensedLib::_DLicensed
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/mlistctl.h Source File

  • general
  • ListHdr

mlistctl.h

Go to the documentation of this file.
00001 // MyListCtrl.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CMyListCtrl window
00015 #ifndef INC_MYLISTCTRL_H
00016 #define INC_MYLISTCTRL_H
00017
00018
00019 class CMyListCtrl : public CListCtrl
00020 {
00021 // Construction
00022 public:
00023   CMyListCtrl();
00024
00025 // Attributes
00026 public:
00027
00028   BOOL            m_bDragging;
00029   int             m_iItemDrag;
00030   int             m_iItemDrop;
00031   CPoint          m_ptHotSpot;
00032   CPoint          m_ptOrigin;
00033   CSize           m_sizeDelta;
00034   DWORD     m_oldDNDStyle;
00035   CImageList      *m_pimageListDrag;
00036
00037 // Operations
00038 public:
00039
00040 // Overrides
00041   // ClassWizard generated virtual function overrides
00042   //{{AFX_VIRTUAL(CMyListCtrl)
00043   public:
00044   //}}AFX_VIRTUAL
00045
00046 // Implementation
00047 public:
00048   virtual ~CMyListCtrl();
00049   void    OnButtonUp(CPoint point);
00050
00051   // Generated message map functions
00052 protected:
00053   //{{AFX_MSG(CMyListCtrl)
00054   afx_msg void OnBeginDrag(LPNMHDR pnmhdr, LRESULT *pResult);
00055   afx_msg void OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pResult);
00056   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00057   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00058   afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00059   //}}AFX_MSG
00060
00061   DECLARE_MESSAGE_MAP()
00062 };
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 #endif
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/drawobj.h Source File

  • vc2008fp
  • DrawClient

drawobj.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014
00015 #ifdef SHARED_HANDLERS
00016 #define CDrawView CView
00017 #else
00018 class CDrawView;
00019 #endif
00020 class CDrawDoc;
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDrawObj - base class for all 'drawable objects'
00024
00025 class CDrawObj : public CObject
00026 {
00027 protected:
00028   DECLARE_SERIAL(CDrawObj);
00029   CDrawObj();
00030
00031 // Constructors
00032 public:
00033   CDrawObj(const CRect& position);
00034
00035 // Attributes
00036   CRect m_position;
00037   CDrawDoc* m_pDocument;
00038
00039   virtual int GetHandleCount();
00040   virtual CPoint GetHandle(int nHandle);
00041   CRect GetHandleRect(int nHandleID, CDrawView* pView);
00042   virtual HCURSOR GetHandleCursor(int nHandle);
00043   virtual void SetLineColor(COLORREF color, BOOL bPreview = FALSE);
00044   virtual void SetFillColor(COLORREF color, BOOL bPreview = FALSE);
00045
00046 // Operations
00047   virtual void Draw(CDC* pDC);
00048   virtual void MoveTo(const CPoint& position);
00049
00050   enum TrackerState { normal, selected, active };
00051   virtual void DrawTracker(CDC* pDC, TrackerState state);
00052   virtual void MoveTo(const CRect& positon, CDrawView* pView = NULL);
00053   virtual int HitTest(CPoint point, CDrawView* pView, BOOL bSelected);
00054   virtual BOOL Intersects(const CRect& rect);
00055   virtual void MoveHandleTo(int nHandle, CPoint point, CDrawView* pView = NULL);
00056   virtual void OnOpen(CDrawView* pView);
00057   virtual void OnEditProperties();
00058   virtual CDrawObj* Clone(CDrawDoc* pDoc = NULL);
00059   virtual void Remove();
00060   void Invalidate();
00061
00062   COLORREF GetLineColor() const
00063   {
00064     return m_logpen.lopnColor;
00065   }
00066
00067   int GetLineWeight() const
00068   {
00069     return m_logpen.lopnWidth.x;
00070   }
00071
00072   void SetLineWeight(int nWidth, BOOL bPreview = FALSE);
00073
00074   COLORREF GetFillColor() const
00075   {
00076     return m_logbrush.lbColor;
00077   }
00078
00079   BOOL IsEnableFill() const
00080   {
00081     return m_bBrush;
00082   }
00083
00084   void EnableFill(BOOL bEnable, BOOL bPreview = FALSE);
00085
00086   BOOL IsEnableLine() const
00087   {
00088     return m_bPen;
00089   }
00090
00091   void EnableLine(BOOL bEnable, BOOL bPreview = FALSE);
00092
00093   virtual BOOL CanChangeFillColor() const
00094   {
00095     return TRUE;
00096   }
00097
00098   virtual BOOL CanChangeLineColor() const
00099   {
00100     return TRUE;
00101   }
00102
00103   virtual BOOL CanChangeLineWeight() const
00104   {
00105     return TRUE;
00106   }
00107
00108 // Implementation
00109 public:
00110   virtual ~CDrawObj();
00111   virtual void Serialize(CArchive& ar);
00112 #ifdef _DEBUG
00113   void AssertValid();
00114 #endif
00115
00116 // implementation data
00117 protected:
00118   BOOL m_bPen;
00119   LOGPEN m_logpen;
00120   BOOL m_bBrush;
00121   LOGBRUSH m_logbrush;
00122 };
00123
00124 // special 'list' class for this application(requires afxtempl.h)
00125 typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList;
00126
00127 ////////////////////////////////////////////////////////////////////////
00128 // specialized draw objects
00129
00130 class CDrawRect : public CDrawObj
00131 {
00132 protected:
00133   DECLARE_SERIAL(CDrawRect);
00134   CDrawRect();
00135
00136 public:
00137   CDrawRect(const CRect& position);
00138
00139 // Implementation
00140 public:
00141   virtual void Serialize(CArchive& ar);
00142   virtual void Draw(CDC* pDC);
00143   virtual int GetHandleCount();
00144   virtual CPoint GetHandle(int nHandle);
00145   virtual HCURSOR GetHandleCursor(int nHandle);
00146   virtual void MoveHandleTo(int nHandle, CPoint point, CDrawView* pView = NULL);
00147   virtual BOOL Intersects(const CRect& rect);
00148   virtual CDrawObj* Clone(CDrawDoc* pDoc);
00149
00150   virtual BOOL CanChangeFillColor() const
00151   {
00152     return m_nShape != line;
00153   }
00154
00155   enum Shape { rectangle, roundRectangle, ellipse, line };
00156   Shape GetShape() const
00157   {
00158     return m_nShape;
00159   }
00160 protected:
00161
00162   Shape m_nShape;
00163   CPoint m_roundness; // for roundRect corners
00164
00165   friend class CRectTool;
00166 };
00167
00168 /////////////////////////////////////////////////////////////////////////////
00169
00170 class CDrawPoly;
00171
00172 class CDrawPoly : public CDrawObj
00173 {
00174 protected:
00175   DECLARE_SERIAL(CDrawPoly);
00176   CDrawPoly();
00177
00178 public:
00179   CDrawPoly(const CRect& position);
00180
00181 // Operations
00182   void AddPoint(const CPoint& point, CDrawView* pView = NULL);
00183   BOOL RecalcBounds(CDrawView* pView = NULL);
00184
00185 // Implementation
00186 public:
00187   virtual ~CDrawPoly();
00188   virtual void Serialize(CArchive& ar);
00189   virtual void Draw(CDC* pDC);
00190   virtual void MoveTo (const CPoint& position);
00191   virtual void MoveTo(const CRect& position, CDrawView* pView = NULL);
00192   virtual int GetHandleCount();
00193   virtual CPoint GetHandle(int nHandle);
00194   virtual HCURSOR GetHandleCursor(int nHandle);
00195   virtual void MoveHandleTo(int nHandle, CPoint point, CDrawView* pView = NULL);
00196   virtual BOOL Intersects(const CRect& rect);
00197   virtual CDrawObj* Clone(CDrawDoc* pDoc);
00198
00199 protected:
00200   int m_nPoints;
00201   int m_nAllocPoints;
00202   CPoint* m_points;
00203   CDrawPoly* m_pDrawObj;
00204
00205   friend class CPolyTool;
00206 };
00207
00208 class CDrawItem;    // COleClientItem derived class
00209
00210 class CDrawOleObj : public CDrawObj
00211 {
00212 protected:
00213   DECLARE_SERIAL(CDrawOleObj);
00214   CDrawOleObj();
00215
00216 public:
00217   CDrawOleObj(const CRect& position);
00218
00219 // Implementation
00220 public:
00221   virtual void Serialize(CArchive& ar);
00222   virtual void Draw(CDC* pDC);
00223   virtual CDrawObj* Clone(CDrawDoc* pDoc);
00224   virtual void OnOpen(CDrawView* pView);
00225   virtual void MoveTo(const CRect& positon, CDrawView* pView = NULL);
00226   virtual void OnEditProperties();
00227   virtual void Remove();
00228   virtual ~CDrawOleObj();
00229
00230   virtual BOOL CanChangeFillColor() const
00231   {
00232     return FALSE;
00233   }
00234   virtual BOOL CanChangeLineColor() const
00235   {
00236     return FALSE;
00237   }
00238   virtual BOOL CanChangeLineWeight() const
00239   {
00240     return FALSE;
00241   }
00242
00243   static BOOL c_bShowItems;
00244
00245   CDrawItem* m_pClientItem;
00246   CSize m_extent; // current extent is tracked separate from scaled position
00247 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/StdAfx.h Source File

  • controls
  • testhelp

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //      or project specific include files that are used frequently,
00003 //      but are changed infrequently
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00015
00016 #include <afxctl.h>         // MFC support for OLE Controls
00017 #include <afxcmn.h>
00018 // Delete the two includes below if you do not wish to use the MFC
00019 //  database classes
00020 #ifndef _UNICODE
00021 #include <afxdb.h>          // MFC database classes
00022
00023 #endif //_UNICODE
00024
00025 #pragma warning (push)
00026 #pragma warning (disable : 4005)
00027 #include "hlp\HTMLDefines.h"
00028 #include "hlp\popups.h"
00029 #pragma warning (pop)
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localize.h Source File

  • controls
  • localize

localize.h

Go to the documentation of this file.
00001 // localize.h : main header file for LOCALIZE.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined( __AFXCTL_H__ )
00013   #error include 'afxctl.h' before including this file
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CLocalizeApp : See localize.cpp for implementation.
00020
00021 class CLocalizeApp : public COleControlModule
00022 {
00023 public:
00024   BOOL InitInstance();
00025   int ExitInstance();
00026 };
00027
00028 extern const GUID CDECL _tlid;
00029 extern const WORD _wVerMajor;
00030 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FindComboBox.h Source File

  • vc2008fp
  • VisualStudioDemo

FindComboBox.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CFindComboButton : public CMFCToolBarComboBoxButton
00013 {
00014   DECLARE_SERIAL(CFindComboButton)
00015
00016 // Construction
00017 public:
00018   CFindComboButton() : CMFCToolBarComboBoxButton(ID_EDIT_FIND_COMBO, GetCmdMgr()->GetCmdImage(ID_EDIT_FIND), CBS_DROPDOWN)
00019   {
00020   }
00021
00022 // Attributes:
00023 public:
00024   static BOOL HasFocus()
00025   {
00026     return m_bHasFocus;
00027   }
00028
00029 protected:
00030   static BOOL m_bHasFocus;
00031
00032 // Overrides
00033 protected:
00034   virtual BOOL NotifyCommand(int iNotifyCode);
00035 };
00036
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/palette.cpp Source File

  • general
  • docktool

palette.cpp

Go to the documentation of this file.
00001 // palette.cpp : implementation of the Floating tool palette class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "palette.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CPaletteBar
00022
00023 BEGIN_MESSAGE_MAP(CPaletteBar, CToolBar)
00024   //{{AFX_MSG_MAP(CPaletteBar)
00025   //}}AFX_MSG_MAP
00026 END_MESSAGE_MAP()
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CPaletteBar construction/destruction
00030
00031 CPaletteBar::CPaletteBar()
00032 {
00033   m_nColumns = 2;
00034   m_cxLeftBorder = 5;
00035   m_cxRightBorder = 5;
00036   m_cyTopBorder = 5;
00037   m_cyBottomBorder = 5;
00038 }
00039
00040 CPaletteBar::~CPaletteBar()
00041 {
00042 }
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CPaletteBar diagnostics
00046
00047 #ifdef _DEBUG
00048 void CPaletteBar::AssertValid() const
00049 {
00050   CToolBar::AssertValid();
00051 }
00052
00053 void CPaletteBar::Dump(CDumpContext& dc) const
00054 {
00055   CToolBar::Dump(dc);
00056 }
00057
00058 #endif //_DEBUG
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CPaletteBar message handlers
00062
00063 void CPaletteBar::SetColumns(UINT nColumns)
00064 {
00065   m_nColumns = nColumns;
00066   int nCount = GetToolBarCtrl().GetButtonCount();
00067
00068   for(int i = 0; i < nCount; i++)
00069   {
00070     UINT nStyle = GetButtonStyle(i);
00071     BOOL bWrap = (((i + 1) % nColumns) == 0);
00072     if (bWrap)
00073       nStyle |= TBBS_WRAPPED;
00074     else
00075       nStyle &= ~TBBS_WRAPPED;
00076
00077     SetButtonStyle(i, nStyle);
00078   }
00079
00080   Invalidate();
00081   GetParentFrame()->RecalcLayout();
00082 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsDoc.cpp Source File

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViewsDoc.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "OutlookMultiViews.h"
00003
00004 #include "OutlookMultiViewsDoc.h"
00005
00006 #ifdef _DEBUG
00007 #define new DEBUG_NEW
00008 #undef THIS_FILE
00009 static char THIS_FILE[] = __FILE__;
00010 #endif
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // COutlookMultiViewsDoc
00014
00015 IMPLEMENT_DYNCREATE(COutlookMultiViewsDoc, CDocument)
00016
00017 BEGIN_MESSAGE_MAP(COutlookMultiViewsDoc, CDocument)
00018 END_MESSAGE_MAP()
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // COutlookMultiViewsDoc construction/destruction
00022
00023 COutlookMultiViewsDoc::COutlookMultiViewsDoc()
00024 {
00025   // TODO: add one-time construction code here
00026
00027 }
00028
00029 COutlookMultiViewsDoc::~COutlookMultiViewsDoc()
00030 {
00031 }
00032
00033 BOOL COutlookMultiViewsDoc::OnNewDocument()
00034 {
00035   if (!CDocument::OnNewDocument())
00036     return FALSE;
00037
00038   // TODO: add reinitialization code here
00039   // (SDI documents will reuse this document)
00040
00041   return TRUE;
00042 }
00043
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // COutlookMultiViewsDoc serialization
00048
00049 void COutlookMultiViewsDoc::Serialize(CArchive& ar)
00050 {
00051   if (ar.IsStoring())
00052   {
00053     // TODO: add storing code here
00054   }
00055   else
00056   {
00057     // TODO: add loading code here
00058   }
00059 }
00060
00061 /////////////////////////////////////////////////////////////////////////////
00062 // COutlookMultiViewsDoc diagnostics
00063
00064 #ifdef _DEBUG
00065 void COutlookMultiViewsDoc::AssertValid() const
00066 {
00067   CDocument::AssertValid();
00068 }
00069
00070 void COutlookMultiViewsDoc::Dump(CDumpContext& dc) const
00071 {
00072   CDocument::Dump(dc);
00073 }
00074 #endif //_DEBUG
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077 // COutlookMultiViewsDoc commands
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/typaryvw.h Source File

  • advanced
  • collect

typaryvw.h

Go to the documentation of this file.
00001 // typaryvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CTypedPtrArrayView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CTypedPtrArrayView : public CFormView
00020 {
00021 public:
00022   CTypedPtrArrayView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CTypedPtrArrayView)
00024
00025 // Attributes
00026 public:
00027   CCollectDoc* GetDocument();
00028
00029 // Overrides
00030 public:
00031   void OnInitialUpdate();
00032
00033 // Form Data
00034 public:
00035   //{{AFX_DATA(CTypedPtrArrayView)
00036   enum { IDD = IDD_TYPED_PTR_ARRAY };
00037   CListBox    m_ctlList;
00038   int     m_int;
00039   float   m_float;
00040   CString m_str;
00041   //}}AFX_DATA
00042
00043 // Implementation
00044 protected:
00045   void AddMyObjectToListBox(CMyObject* pMyObject, int nSel = -1);
00046
00047 // Overrides
00048   // ClassWizard generate virtual function overrides
00049   //{{AFX_VIRTUAL(CTypedPtrArrayView)
00050   protected:
00051   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052   //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 protected:
00056   virtual ~CTypedPtrArrayView();
00057 #ifdef _DEBUG
00058   virtual void AssertValid() const;
00059   virtual void Dump(CDumpContext& dc) const;
00060 #endif
00061
00062   // Generated message map functions
00063   //{{AFX_MSG(CTypedPtrArrayView)
00064   afx_msg void OnAdd();
00065   afx_msg void OnUpdateButton();
00066   afx_msg void OnRemove();
00067   afx_msg void OnRemoveAll();
00068   afx_msg void OnSelChangeList();
00069   //}}AFX_MSG
00070   DECLARE_MESSAGE_MAP()
00071 };
00072
00073 #ifndef _DEBUG
00074 inline CCollectDoc* CTypedPtrArrayView::GetDocument()
00075    { return (CCollectDoc*)m_pDocument; }
00076 #endif
00077
00078 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/FindComboBox.cpp Source File

  • vc2008fp
  • VisualStudioDemo

FindComboBox.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "FindComboBox.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CFindComboButton
00022
00023 IMPLEMENT_SERIAL(CFindComboButton, CMFCToolBarComboBoxButton, 1)
00024
00025 BOOL CFindComboButton::m_bHasFocus = FALSE;
00026
00027 BOOL CFindComboButton::NotifyCommand(int iNotifyCode)
00028 {
00029   BOOL bRes = CMFCToolBarComboBoxButton::NotifyCommand(iNotifyCode);
00030
00031   switch (iNotifyCode)
00032   {
00033   case CBN_KILLFOCUS:
00034     m_bHasFocus = FALSE;
00035     bRes = TRUE;
00036     break;
00037
00038   case CBN_SETFOCUS:
00039     m_bHasFocus = TRUE;
00040     bRes = TRUE;
00041     break;
00042   }
00043
00044   return bRes;
00045 }
00046
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/RibbonListButton.h Source File

  • vc2008fp
  • MSOffice2007Demo

RibbonListButton.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CRibbonListButton : public CMFCRibbonGallery
00015 {
00016   DECLARE_DYNCREATE(CRibbonListButton)
00017
00018 // Construction:
00019 public:
00020   CRibbonListButton();
00021   CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, BOOL bRightAlignedText = TRUE);
00022   CRibbonListButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID,
00023     int cxPaletteImage, const CStringArray& arLabels, BOOL bRightAlignedText = TRUE);
00024   virtual ~CRibbonListButton();
00025
00026 public:
00027   void AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const CStringArray& arLabels);
00028   virtual void Clear();
00029   void SetRightAlignedText(BOOL bSet = TRUE);
00030
00031 protected:
00032   virtual CSize GetIconSize() const;
00033   virtual void OnDrawPaletteIcon(CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* pIcon, COLORREF clrText);
00034   virtual void CopyFrom(const CMFCRibbonBaseElement& src);
00035   virtual void OnShowPopupMenu();
00036
00037   virtual BOOL IsItemMenuLook() const
00038   {
00039     return m_bRightAlignedText;
00040   }
00041
00042   void RecalcTextSizes(CDC* pDC);
00043   void UpdateToolTips();
00044
00045 protected:
00046   CMFCToolBarImages m_listImages;
00047   CStringArray m_arLabels;
00048   CSize m_sizeMargins;
00049   BOOL m_bRightAlignedText;
00050   CSize m_sizeMaxText;
00051 };
00052
00053 class CRibbonListFontButton : public CMFCRibbonGallery
00054 {
00055   DECLARE_DYNCREATE(CRibbonListFontButton)
00056
00057 public:
00058   struct XItem
00059   {
00060     CString m_Caption;
00061     LOGFONT m_Font[2];
00062     int     m_Height;
00063
00064     XItem()
00065     {
00066       ZeroMemory(&m_Font[0], sizeof(LOGFONT));
00067       ZeroMemory(&m_Font[1], sizeof(LOGFONT));
00068
00069       m_Font[0].lfHeight         = -14;
00070       m_Font[0].lfWeight         = FW_BOLD;
00071       m_Font[0].lfCharSet        = DEFAULT_CHARSET;
00072       m_Font[0].lfOutPrecision   = OUT_DEFAULT_PRECIS;
00073       m_Font[0].lfClipPrecision  = CLIP_DEFAULT_PRECIS;
00074       m_Font[0].lfQuality        = DEFAULT_QUALITY;
00075       m_Font[0].lfPitchAndFamily = DEFAULT_PITCH;
00076
00077       m_Font[1].lfHeight         = -12;
00078       m_Font[1].lfWeight         = FW_NORMAL;
00079       m_Font[1].lfCharSet        = DEFAULT_CHARSET;
00080       m_Font[1].lfOutPrecision   = OUT_DEFAULT_PRECIS;
00081       m_Font[1].lfClipPrecision  = CLIP_DEFAULT_PRECIS;
00082       m_Font[1].lfQuality        = DEFAULT_QUALITY;
00083       m_Font[1].lfPitchAndFamily = DEFAULT_PITCH;
00084
00085       m_Height = 0;
00086     }
00087
00088     XItem& operator = (const XItem& rItem)
00089     {
00090       m_Caption = rItem.m_Caption;
00091       memcpy(&m_Font[0], &rItem.m_Font[0], sizeof(LOGFONT));
00092       memcpy(&m_Font[1], &rItem.m_Font[1], sizeof(LOGFONT));
00093       m_Height = rItem.m_Height;
00094
00095       return *this;
00096     }
00097   };
00098
00099   typedef CArray<XItem, XItem&> XItems;
00100
00101 // Construction:
00102 public:
00103   CRibbonListFontButton();
00104   CRibbonListFontButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex);
00105   CRibbonListFontButton(UINT nID, LPCTSTR lpszText, int nSmallImageIndex, int nLargeImageIndex, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems& arItems);
00106   virtual ~CRibbonListFontButton();
00107
00108 public:
00109   void AddGroup(LPCTSTR lpszGroupName, UINT uiImagesPaletteResID, int cxPaletteImage, const XItems& arItems);
00110   virtual void Clear();
00111
00112 protected:
00113   virtual CSize GetIconSize() const;
00114   virtual void OnDrawPaletteIcon(CDC* pDC, CRect rectIcon, int nIconIndex, CMFCRibbonGalleryIcon* pIcon, COLORREF clrText);
00115   virtual void CopyFrom(const CMFCRibbonBaseElement& src);
00116   virtual void OnShowPopupMenu();
00117
00118   void RecalcTextSizes(CDC* pDC);
00119   void UpdateToolTips();
00120
00121 protected:
00122   CMFCToolBarImages m_listImages;
00123   XItems m_arItems;
00124   CSize m_sizeMargins;
00125   CSize m_sizeMaxText;
00126 };
00127
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/stdafx.h Source File

  • vc2008fp
  • OutlookDemo

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024 #include <afxcview.h>
00025 #include <afxadv.h>
00026
00027 #ifndef _AFX_NO_OLE_SUPPORT
00028 #include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
00029 #endif
00030 #ifndef _AFX_NO_AFXCMN_SUPPORT
00031 #include <afxcmn.h>         // MFC support for Windows Common Controls
00032 #endif // _AFX_NO_AFXCMN_SUPPORT
00033
00034 #include <afxcontrolbars.h> // MFC support for ribbons and control bars
00035
00036 #if defined _M_IX86
00037 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00038 #elif defined _M_X64
00039 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00040 #else
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdi.cpp Source File

  • advanced
  • mtgdi

mtgdi.cpp

Go to the documentation of this file.
00001 // mtgdi.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtgdi.h"
00014
00015 #include "mainfrm.h"
00016 #include "mtgdidoc.h"
00017 #include "mtgdivw.h"
00018 #include "threads.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 BEGIN_MESSAGE_MAP(CThreadApp, CWinApp)
00026   //{{AFX_MSG_MAP(CThreadApp)
00027   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00028     // NOTE - the ClassWizard will add and remove mapping macros here.
00029     //    DO NOT EDIT what you see in these blocks of generated code!
00030   //}}AFX_MSG_MAP
00031   // Standard file based document commands
00032   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00033   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00034 END_MESSAGE_MAP()
00035
00036 CThreadApp::CThreadApp()
00037 {
00038 }
00039
00040 CThreadApp theApp;
00041
00042 BOOL CThreadApp::InitInstance()
00043 {
00044   // Initialize static members of CGDIThread
00045   InitializeCriticalSection(&CGDIThread::m_csGDILock);
00046
00047   // Register the application's document templates.  Document templates
00048   //  serve as the connection between documents, frame windows and views.
00049   CSingleDocTemplate* pDocTemplate;
00050   pDocTemplate = new CSingleDocTemplate(
00051     IDR_MAINFRAME,
00052     RUNTIME_CLASS(CThreadDoc),
00053     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00054     RUNTIME_CLASS(CThreadView));
00055   AddDocTemplate(pDocTemplate);
00056
00057   // create a new (empty) document
00058   OnFileNew();
00059
00060   if (m_lpCmdLine[0] != '\0')
00061   {
00062     // TODO: add command line processing here
00063   }
00064
00065   return TRUE;
00066 }
00067
00068 int CThreadApp::ExitInstance()
00069 {
00070   DeleteCriticalSection(&CGDIThread::m_csGDILock);
00071   CloseHandle(CGDIThread::m_hAnotherDead);
00072
00073   return CWinApp::ExitInstance();
00074 }
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077 // CAboutDlg dialog used for App About
00078
00079 class CAboutDlg : public CDialog
00080 {
00081 public:
00082   CAboutDlg();
00083
00084 // Dialog Data
00085   //{{AFX_DATA(CAboutDlg)
00086   enum { IDD = IDD_ABOUTBOX };
00087   //}}AFX_DATA
00088
00089 // Implementation
00090 protected:
00091   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00092   //{{AFX_MSG(CAboutDlg)
00093     // No message handlers
00094   //}}AFX_MSG
00095   DECLARE_MESSAGE_MAP()
00096 };
00097
00098 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00099 {
00100   //{{AFX_DATA_INIT(CAboutDlg)
00101   //}}AFX_DATA_INIT
00102 }
00103
00104 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00105 {
00106   CDialog::DoDataExchange(pDX);
00107   //{{AFX_DATA_MAP(CAboutDlg)
00108   //}}AFX_DATA_MAP
00109 }
00110
00111 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00112   //{{AFX_MSG_MAP(CAboutDlg)
00113     // No message handlers
00114   //}}AFX_MSG_MAP
00115 END_MESSAGE_MAP()
00116
00117 // App command to run the dialog
00118 void CThreadApp::OnAppAbout()
00119 {
00120   CAboutDlg().DoModal();
00121 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlblist.cpp Source File

  • ole
  • oleview
  • iviewers

tlblist.cpp

Go to the documentation of this file.
00001 // tlblist.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "iview.h"
00015 #include "util.h"
00016 #include "iviewers.h"
00017 #include "iviewer.h"
00018 #include "typelib.h"
00019 #include "tlblist.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 #define ID_LISTVIEW 43
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CTypeLibListView
00029
00030 IMPLEMENT_DYNCREATE(CTypeLibListView, CView)
00031
00032 CTypeLibListView::CTypeLibListView()
00033 {
00034 }
00035
00036 CTypeLibListView::~CTypeLibListView()
00037 {
00038 }
00039
00040
00041 BEGIN_MESSAGE_MAP(CTypeLibListView, CView)
00042   //{{AFX_MSG_MAP(CTypeLibListView)
00043   ON_WM_CREATE()
00044   ON_WM_DESTROY()
00045   ON_WM_SIZE()
00046   //}}AFX_MSG_MAP
00047 END_MESSAGE_MAP()
00048
00049
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CTypeLibListView diagnostics
00053
00054 #ifdef _DEBUG
00055 void CTypeLibListView::AssertValid() const
00056 {
00057   CView::AssertValid();
00058 }
00059
00060 void CTypeLibListView::Dump(CDumpContext& dc) const
00061 {
00062   CView::Dump(dc);
00063 }
00064 #endif //_DEBUG
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CTypeLibListView message handlers
00068
00069 int CTypeLibListView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00070 {
00071   if (CView::OnCreate(lpCreateStruct) == -1)
00072     return -1;
00073
00074   RECT rect ;
00075   rect.top = lpCreateStruct->y ;
00076   rect.left = lpCreateStruct->x ;
00077   rect.bottom = lpCreateStruct->cy ;
00078   rect.right = lpCreateStruct->cx ;
00079
00080   if (!m_list.Create( WS_CHILD | WS_VISIBLE |
00081                 WS_BORDER |
00082                 LVS_REPORT |
00083 //                                LVS_BUTTON |
00084                 LVS_SINGLESEL |
00085                 LVS_NOSORTHEADER,
00086                 rect, this, ID_LISTVIEW ))
00087   {
00088     TRACE( _T("List control failed to create!") ) ;
00089     return -1 ;
00090   }
00091
00092   return 0;
00093 }
00094
00095 void CTypeLibListView::OnDestroy()
00096 {
00097   CView::OnDestroy();
00098   m_list.DeleteAllItems() ;
00099 }
00100
00101 void CTypeLibListView::OnDraw(CDC* pDC)
00102 {
00103   // TODO: Add your specialized code here and/or call the base class
00104
00105 }
00106
00107 void CTypeLibListView::OnSize(UINT nType, int cx, int cy)
00108 {
00109   CView::OnSize(nType, cx, cy);
00110
00111   m_list.SetWindowPos( NULL, -1, -1, cx+2, cy+2, SWP_NOZORDER ) ;
00112
00113 }
00114
00115 void CTypeLibListView::OnInitialUpdate()
00116 {
00117   TRACE(_T("OnInitialUpdate\n")) ;
00118   CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
00119   ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));
00120
00121
00122   CView::OnInitialUpdate();
00123 }
00124
00125 void CTypeLibListView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
00126 {
00127 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CShellTreeCtrl Member List

This is the complete list of members for CShellTreeCtrl, including all inherited members.
OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult) CShellTreeCtrl [inline, private, virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ResourceView.cpp Source File

  • vc2008fp
  • VisualStudioDemo

ResourceView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "MainFrm.h"
00013 #include "ResourceView.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CResourceViewBar
00023
00024 CResourceViewBar::CResourceViewBar()
00025 {
00026 }
00027
00028 CResourceViewBar::~CResourceViewBar()
00029 {
00030 }
00031
00032 BEGIN_MESSAGE_MAP(CResourceViewBar, CDockablePane)
00033   ON_WM_CREATE()
00034   ON_WM_SIZE()
00035   ON_WM_CONTEXTMENU()
00036   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00037   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00038   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00039   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00040   ON_WM_PAINT()
00041   ON_WM_SETFOCUS()
00042 END_MESSAGE_MAP()
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CResourceViewBar message handlers
00046
00047 int CResourceViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00048 {
00049   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00050     return -1;
00051
00052   CRect rectDummy;
00053   rectDummy.SetRectEmpty();
00054
00055   // Create view:
00056   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;
00057
00058   if (!m_wndResourceView.Create(dwViewStyle, rectDummy, this, 3))
00059   {
00060     TRACE0("Failed to create workspace view\n");
00061     return -1;      // fail to create
00062   }
00063
00064   // Load view images:
00065   m_ResourceViewImages.Create(IDB_RESOURCE_VIEW, 16, 0, RGB(255, 0, 255));
00066   m_wndResourceView.SetImageList(&m_ResourceViewImages, TVSIL_NORMAL);
00067
00068   // Fill view context(dummy code, don't seek here something magic :-)):
00069   FillResourceView();
00070
00071   OnChangeVisualStyle();
00072   return 0;
00073 }
00074
00075 void CResourceViewBar::OnSize(UINT nType, int cx, int cy)
00076 {
00077   CDockablePane::OnSize(nType, cx, cy);
00078
00079   if (CanAdjustLayout())
00080   {
00081     m_wndResourceView.SetWindowPos(NULL, 1, 1, cx - 2, cy - 2, SWP_NOACTIVATE | SWP_NOZORDER);
00082   }
00083 }
00084
00085 void CResourceViewBar::FillResourceView()
00086 {
00087   HTREEITEM hRoot = m_wndResourceView.InsertItem(_T("Hello resources"), 0, 0);
00088   m_wndResourceView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);
00089
00090   HTREEITEM hFolder = m_wndResourceView.InsertItem(_T("Accelerator"), 0, 0, hRoot);
00091   m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 1, 1, hFolder);
00092
00093   m_wndResourceView.Expand(hRoot, TVE_EXPAND);
00094
00095   hFolder = m_wndResourceView.InsertItem(_T("Dialog"), 0, 0, hRoot);
00096   m_wndResourceView.InsertItem(_T("IDD_ABOUTBOX"), 3, 3, hFolder);
00097
00098   hFolder = m_wndResourceView.InsertItem(_T("Icon"), 0, 0, hRoot);
00099   m_wndResourceView.InsertItem(_T("IDR_HELLO"), 4, 4, hFolder);
00100   m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 4, 4, hFolder);
00101
00102   m_wndResourceView.Expand(hFolder, TVE_EXPAND);
00103
00104   hFolder = m_wndResourceView.InsertItem(_T("Menu"), 0, 0, hRoot);
00105   m_wndResourceView.InsertItem(_T("IDR_CONTEXT_MENU"), 5, 5, hFolder);
00106   m_wndResourceView.InsertItem(_T("IDR_HELLO"), 5, 5, hFolder);
00107   m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 5, 5, hFolder);
00108   m_wndResourceView.InsertItem(_T("IDR_POPUP_TOOLBAR"), 5, 5, hFolder);
00109
00110   m_wndResourceView.Expand(hFolder, TVE_EXPAND);
00111
00112   hFolder = m_wndResourceView.InsertItem(_T("String Table"), 0, 0, hRoot);
00113   m_wndResourceView.InsertItem(_T("String Table"), 6, 6, hFolder);
00114
00115   hFolder = m_wndResourceView.InsertItem(_T("Toolbar"), 0, 0, hRoot);
00116   m_wndResourceView.InsertItem(_T("IDR_MAINFRAME"), 7, 7, hFolder);
00117
00118   hFolder = m_wndResourceView.InsertItem(_T("Version"), 0, 0, hRoot);
00119   m_wndResourceView.InsertItem(_T("VS_VERSION_INFO"), 8, 8, hFolder);
00120 }
00121
00122 void CResourceViewBar::OnContextMenu(CWnd* pWnd, CPoint point)
00123 {
00124   CTreeCtrl* pWndTree = (CTreeCtrl*) &m_wndResourceView;
00125   ASSERT_VALID(pWndTree);
00126
00127   if (pWnd != pWndTree)
00128   {
00129     CDockablePane::OnContextMenu(pWnd, point);
00130     return;
00131   }
00132
00133   if (point != CPoint(-1, -1))
00134   {
00135     // Select clicked item:
00136     CPoint ptTree = point;
00137     pWndTree->ScreenToClient(&ptTree);
00138
00139     UINT flags = 0;
00140     HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
00141     if (hTreeItem != NULL)
00142     {
00143       pWndTree->SelectItem(hTreeItem);
00144     }
00145   }
00146
00147   pWndTree->SetFocus();
00148   theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_RESOURCE, point.x, point.y, this, TRUE);
00149 }
00150
00151 void CResourceViewBar::OnEditCut()
00152 {
00153   // TODO: Add your command handler code here
00154
00155 }
00156
00157 void CResourceViewBar::OnEditCopy()
00158 {
00159   // TODO: Add your command handler code here
00160
00161 }
00162
00163 void CResourceViewBar::OnEditPaste()
00164 {
00165   // TODO: Add your command handler code here
00166
00167 }
00168
00169 void CResourceViewBar::OnEditClear()
00170 {
00171   // TODO: Add your command handler code here
00172
00173 }
00174
00175 void CResourceViewBar::OnPaint()
00176 {
00177   CPaintDC dc(this); // device context for painting
00178
00179   CRect rectTree;
00180   m_wndResourceView.GetWindowRect(rectTree);
00181   ScreenToClient(rectTree);
00182
00183   rectTree.InflateRect(1, 1);
00184   dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
00185 }
00186
00187 void CResourceViewBar::OnSetFocus(CWnd* pOldWnd)
00188 {
00189   CDockablePane::OnSetFocus(pOldWnd);
00190   m_wndResourceView.SetFocus();
00191 }
00192
00193 void CResourceViewBar::OnChangeVisualStyle()
00194 {
00195   m_ResourceViewImages.DeleteImageList();
00196
00197   UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_RESOURCE_VIEW24 : IDB_RESOURCE_VIEW;
00198
00199   CBitmap bmp;
00200   if (!bmp.LoadBitmap(uiBmpId))
00201   {
00202     TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
00203     ASSERT(FALSE);
00204     return;
00205   }
00206
00207   BITMAP bmpObj;
00208   bmp.GetBitmap(&bmpObj);
00209
00210   UINT nFlags = ILC_MASK;
00211
00212   nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;
00213
00214   m_ResourceViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
00215   m_ResourceViewImages.Add(&bmp, RGB(255, 0, 255));
00216
00217   m_wndResourceView.SetImageList(&m_ResourceViewImages, TVSIL_NORMAL);
00218 }
00219
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPushPropPage Member List

This is the complete list of members for CPushPropPage, including all inherited members.
CPushPropPage() | CPushPropPage |
DoDataExchange(CDataExchange *pDX) | CPushPropPage | [protected, virtual]
IDD enum value | CPushPropPage |
m_Border | CPushPropPage |
m_Caption | CPushPropPage |
m_Enabled | CPushPropPage |
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/cubeview.cpp Source File

  • advanced
  • cube

cubeview.cpp

Go to the documentation of this file.
00001 // cubeview.cpp : implementation of the CCubeView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "cube.h"
00014
00015 #include "cubedoc.h"
00016 #include "cubeview.h"
00017
00018 #include "gl/gl.h"
00019 #include "gl/glu.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 unsigned char threeto8[8] =
00027 {
00028   0, 0111>>1, 0222>>1, 0333>>1, 0444>>1, 0555>>1, 0666>>1, 0377
00029 };
00030
00031 unsigned char twoto8[4] =
00032 {
00033   0, 0x55, 0xaa, 0xff
00034 };
00035
00036 unsigned char oneto8[2] =
00037 {
00038   0, 255
00039 };
00040
00041 static int defaultOverride[13] =
00042 {
00043   0, 3, 24, 27, 64, 67, 88, 173, 181, 236, 247, 164, 91
00044 };
00045
00046 static PALETTEENTRY defaultPalEntry[20] =
00047 {
00048   { 0,   0,   0,    0 },
00049   { 0x80,0,   0,    0 },
00050   { 0,   0x80,0,    0 },
00051   { 0x80,0x80,0,    0 },
00052   { 0,   0,   0x80, 0 },
00053   { 0x80,0,   0x80, 0 },
00054   { 0,   0x80,0x80, 0 },
00055   { 0xC0,0xC0,0xC0, 0 },
00056
00057   { 192, 220, 192,  0 },
00058   { 166, 202, 240,  0 },
00059   { 255, 251, 240,  0 },
00060   { 160, 160, 164,  0 },
00061
00062   { 0x80,0x80,0x80, 0 },
00063   { 0xFF,0,   0,    0 },
00064   { 0,   0xFF,0,    0 },
00065   { 0xFF,0xFF,0,    0 },
00066   { 0,   0,   0xFF, 0 },
00067   { 0xFF,0,   0xFF, 0 },
00068   { 0,   0xFF,0xFF, 0 },
00069   { 0xFF,0xFF,0xFF, 0 }
00070 };
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CCubeView
00074
00075 IMPLEMENT_DYNCREATE(CCubeView, CView)
00076
00077 BEGIN_MESSAGE_MAP(CCubeView, CView)
00078   //{{AFX_MSG_MAP(CCubeView)
00079   ON_COMMAND(ID_FILE_PLAY, OnFilePlay)
00080   ON_UPDATE_COMMAND_UI(ID_FILE_PLAY, OnUpdateFilePlay)
00081   ON_WM_CREATE()
00082   ON_WM_DESTROY()
00083   ON_WM_SIZE()
00084   ON_WM_TIMER()
00085   ON_WM_ERASEBKGND()
00086   //}}AFX_MSG_MAP
00087 END_MESSAGE_MAP()
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CCubeView construction/destruction
00091
00092 CCubeView::CCubeView()
00093 {
00094   m_pDC = NULL;
00095   m_pOldPalette = NULL;
00096   m_play = FALSE;
00097 }
00098
00099 CCubeView::~CCubeView()
00100 {
00101 }
00102
00103 /////////////////////////////////////////////////////////////////////////////
00104 // CCubeView drawing
00105
00106 void CCubeView::OnDraw(CDC* /*pDC*/)
00107 {
00108   CCubeDoc* pDoc = GetDocument();
00109   ASSERT_VALID(pDoc);
00110
00111   DrawScene();
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CCubeView diagnostics
00116
00117 #ifdef _DEBUG
00118 void CCubeView::AssertValid() const
00119 {
00120   CView::AssertValid();
00121 }
00122
00123 void CCubeView::Dump(CDumpContext& dc) const
00124 {
00125   CView::Dump(dc);
00126 }
00127
00128 CCubeDoc* CCubeView::GetDocument() // non-debug version is inline
00129 {
00130   return STATIC_DOWNCAST(CCubeDoc, m_pDocument);
00131 }
00132 #endif //_DEBUG
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CCubeView message handlers
00136
00137 void CCubeView::OnFilePlay()
00138 {
00139   m_play = m_play ? FALSE : TRUE;
00140   if (m_play)
00141     SetTimer(1, 15, NULL);
00142   else
00143     KillTimer(1);
00144 }
00145
00146 void CCubeView::OnUpdateFilePlay(CCmdUI* pCmdUI)
00147 {
00148   pCmdUI->SetCheck(m_play);
00149 }
00150
00151 BOOL CCubeView::PreCreateWindow(CREATESTRUCT& cs)
00152 {
00153   // An OpenGL window must be created with the following flags and must not
00154   // include CS_PARENTDC for the class style. Refer to SetPixelFormat
00155   // documentation in the "Comments" section for further information.
00156   cs.style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
00157
00158   return CView::PreCreateWindow(cs);
00159 }
00160
00161 int CCubeView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00162 {
00163   if (CView::OnCreate(lpCreateStruct) == -1)
00164     return -1;
00165
00166   Init(); // initialize OpenGL
00167
00168   return 0;
00169 }
00170
00171 void CCubeView::OnDestroy()
00172 {
00173   HGLRC   hrc;
00174
00175   KillTimer(1);
00176
00177   hrc = ::wglGetCurrentContext();
00178
00179   ::wglMakeCurrent(NULL,  NULL);
00180
00181   if (hrc)
00182     ::wglDeleteContext(hrc);
00183
00184   if (m_pOldPalette)
00185     m_pDC->SelectPalette(m_pOldPalette, FALSE);
00186
00187   if (m_pDC)
00188     delete m_pDC;
00189
00190   CView::OnDestroy();
00191 }
00192
00193 void CCubeView::OnSize(UINT nType, int cx, int cy)
00194 {
00195   CView::OnSize(nType, cx, cy);
00196
00197   if(cy > 0)
00198   {
00199     glViewport(0, 0, cx, cy);
00200
00201     if((m_oldRect.right > cx) || (m_oldRect.bottom > cy))
00202       RedrawWindow();
00203
00204     m_oldRect.right = cx;
00205     m_oldRect.bottom = cy;
00206
00207     glMatrixMode(GL_PROJECTION);
00208     glLoadIdentity();
00209     gluPerspective(45.0f, (GLdouble)cx/cy, 3.0f, 7.0f);
00210     glMatrixMode(GL_MODELVIEW);
00211   }
00212 }
00213
00214 void CCubeView::OnTimer(UINT_PTR nIDEvent)
00215 {
00216   DrawScene();
00217
00218   CView::OnTimer(nIDEvent);
00219
00220   // Eat spurious WM_TIMER messages
00221   MSG msg;
00222   while(::PeekMessage(&msg, m_hWnd, WM_TIMER, WM_TIMER, PM_REMOVE));
00223 }
00224
00225 /////////////////////////////////////////////////////////////////////////////
00226 // GL helper functions
00227
00228 void CCubeView::Init()
00229 {
00230   PIXELFORMATDESCRIPTOR pfd;
00231   int         n;
00232   HGLRC       hrc;
00233   GLfloat     fMaxObjSize, fAspect;
00234   GLfloat     fNearPlane, fFarPlane;
00235
00236   m_pDC = new CClientDC(this);
00237
00238   ASSERT(m_pDC != NULL);
00239
00240   if (!bSetupPixelFormat())
00241     return;
00242
00243   n = ::GetPixelFormat(m_pDC->GetSafeHdc());
00244   ::DescribePixelFormat(m_pDC->GetSafeHdc(), n, sizeof(pfd), &pfd);
00245
00246   CreateRGBPalette();
00247
00248   hrc = wglCreateContext(m_pDC->GetSafeHdc());
00249   wglMakeCurrent(m_pDC->GetSafeHdc(), hrc);
00250
00251   GetClientRect(&m_oldRect);
00252   glClearDepth(1.0f);
00253   glEnable(GL_DEPTH_TEST);
00254
00255   if (m_oldRect.bottom)
00256     fAspect = (GLfloat)m_oldRect.right/m_oldRect.bottom;
00257   else    // don't divide by zero, not that we should ever run into that...
00258     fAspect = 1.0f;
00259   fNearPlane = 3.0f;
00260   fFarPlane = 7.0f;
00261   fMaxObjSize = 3.0f;
00262   m_fRadius = fNearPlane + fMaxObjSize / 2.0f;
00263
00264   glMatrixMode(GL_PROJECTION);
00265   glLoadIdentity();
00266   gluPerspective(45.0f, fAspect, fNearPlane, fFarPlane);
00267   glMatrixMode(GL_MODELVIEW);
00268 }
00269
00270 BOOL CCubeView::bSetupPixelFormat()
00271 {
00272   static PIXELFORMATDESCRIPTOR pfd =
00273   {
00274     sizeof(PIXELFORMATDESCRIPTOR),  // size of this pfd
00275     1,                              // version number
00276     PFD_DRAW_TO_WINDOW |            // support window
00277       PFD_SUPPORT_OPENGL |          // support OpenGL
00278       PFD_DOUBLEBUFFER,             // double buffered
00279     PFD_TYPE_RGBA,                  // RGBA type
00280     24,                             // 24-bit color depth
00281     0, 0, 0, 0, 0, 0,               // color bits ignored
00282     0,                              // no alpha buffer
00283     0,                              // shift bit ignored
00284     0,                              // no accumulation buffer
00285     0, 0, 0, 0,                     // accum bits ignored
00286     32,                             // 32-bit z-buffer
00287     0,                              // no stencil buffer
00288     0,                              // no auxiliary buffer
00289     PFD_MAIN_PLANE,                 // main layer
00290     0,                              // reserved
00291     0, 0, 0                         // layer masks ignored
00292   };
00293   int pixelformat;
00294
00295   if ( (pixelformat = ChoosePixelFormat(m_pDC->GetSafeHdc(), &pfd)) == 0 )
00296   {
00297     MessageBox("ChoosePixelFormat failed");
00298     return FALSE;
00299   }
00300
00301   if (SetPixelFormat(m_pDC->GetSafeHdc(), pixelformat, &pfd) == FALSE)
00302   {
00303     MessageBox("SetPixelFormat failed");
00304     return FALSE;
00305   }
00306
00307   return TRUE;
00308 }
00309
00310 unsigned char CCubeView::ComponentFromIndex(int i, UINT nbits, UINT shift)
00311 {
00312   unsigned char val;
00313
00314   val = (unsigned char) (i >> shift);
00315   switch (nbits)
00316   {
00317
00318   case 1:
00319     val &= 0x1;
00320     return oneto8[val];
00321   case 2:
00322     val &= 0x3;
00323     return twoto8[val];
00324   case 3:
00325     val &= 0x7;
00326     return threeto8[val];
00327
00328   default:
00329     return 0;
00330   }
00331 }
00332
00333 #pragma warning(disable : 4244)
00334 void CCubeView::CreateRGBPalette()
00335 {
00336   PIXELFORMATDESCRIPTOR pfd;
00337   LOGPALETTE *pPal;
00338   int n, i;
00339
00340   n = ::GetPixelFormat(m_pDC->GetSafeHdc());
00341   ::DescribePixelFormat(m_pDC->GetSafeHdc(), n, sizeof(pfd), &pfd);
00342
00343   if (pfd.dwFlags & PFD_NEED_PALETTE)
00344   {
00345     n = 1 << pfd.cColorBits;
00346     pPal = (PLOGPALETTE) new char[sizeof(LOGPALETTE) + n * sizeof(PALETTEENTRY)];
00347
00348     ASSERT(pPal != NULL);
00349
00350     pPal->palVersion = 0x300;
00351     pPal->palNumEntries = n;
00352     for (i=0; i<n; i++)
00353     {
00354       pPal->palPalEntry[i].peRed =
00355           ComponentFromIndex(i, pfd.cRedBits, pfd.cRedShift);
00356       pPal->palPalEntry[i].peGreen =
00357           ComponentFromIndex(i, pfd.cGreenBits, pfd.cGreenShift);
00358       pPal->palPalEntry[i].peBlue =
00359           ComponentFromIndex(i, pfd.cBlueBits, pfd.cBlueShift);
00360       pPal->palPalEntry[i].peFlags = 0;
00361     }
00362
00363     /* fix up the palette to include the default GDI palette */
00364     if ((pfd.cColorBits == 8)                           &&
00365       (pfd.cRedBits   == 3) && (pfd.cRedShift   == 0) &&
00366       (pfd.cGreenBits == 3) && (pfd.cGreenShift == 3) &&
00367       (pfd.cBlueBits  == 2) && (pfd.cBlueShift  == 6)
00368        )
00369     {
00370       for (i = 1 ; i <= 12 ; i++)
00371         pPal->palPalEntry[defaultOverride[i]] = defaultPalEntry[i];
00372     }
00373
00374     m_cPalette.CreatePalette(pPal);
00375     delete [] pPal;
00376
00377     m_pOldPalette = m_pDC->SelectPalette(&m_cPalette, FALSE);
00378     m_pDC->RealizePalette();
00379   }
00380 }
00381 #pragma warning(default : 4244)
00382
00383 void CCubeView::DrawScene(void)
00384 {
00385   static BOOL     bBusy = FALSE;
00386   static GLfloat  wAngleY = 10.0f;
00387   static GLfloat  wAngleX = 1.0f;
00388   static GLfloat  wAngleZ = 5.0f;
00389
00390   if(bBusy)
00391     return;
00392   bBusy = TRUE;
00393
00394   glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
00395   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00396
00397   glPushMatrix();
00398
00399     glTranslatef(0.0f, 0.0f, -m_fRadius);
00400     glRotatef(wAngleX, 1.0f, 0.0f, 0.0f);
00401     glRotatef(wAngleY, 0.0f, 1.0f, 0.0f);
00402     glRotatef(wAngleZ, 0.0f, 0.0f, 1.0f);
00403
00404     wAngleX += 1.0f;
00405     wAngleY += 10.0f;
00406     wAngleZ += 5.0f;
00407
00408
00409     glBegin(GL_QUAD_STRIP);
00410       glColor3f(1.0f, 0.0f, 1.0f);
00411       glVertex3f(-0.5f, 0.5f, 0.5f);
00412
00413       glColor3f(1.0f, 0.0f, 0.0f);
00414       glVertex3f(-0.5f, -0.5f, 0.5f);
00415
00416       glColor3f(1.0f, 1.0f, 1.0f);
00417       glVertex3f(0.5f, 0.5f, 0.5f);
00418
00419       glColor3f(1.0f, 1.0f, 0.0f);
00420       glVertex3f(0.5f, -0.5f, 0.5f);
00421
00422       glColor3f(0.0f, 1.0f, 1.0f);
00423       glVertex3f(0.5f, 0.5f, -0.5f);
00424
00425       glColor3f(0.0f, 1.0f, 0.0f);
00426       glVertex3f(0.5f, -0.5f, -0.5f);
00427
00428       glColor3f(0.0f, 0.0f, 1.0f);
00429       glVertex3f(-0.5f, 0.5f, -0.5f);
00430
00431       glColor3f(0.0f, 0.0f, 0.0f);
00432       glVertex3f(-0.5f, -0.5f,  -0.5f);
00433
00434       glColor3f(1.0f, 0.0f, 1.0f);
00435       glVertex3f(-0.5f, 0.5f, 0.5f);
00436
00437       glColor3f(1.0f, 0.0f, 0.0f);
00438       glVertex3f(-0.5f, -0.5f, 0.5f);
00439
00440     glEnd();
00441
00442     glBegin(GL_QUADS);
00443       glColor3f(1.0f, 0.0f, 1.0f);
00444       glVertex3f(-0.5f, 0.5f, 0.5f);
00445
00446       glColor3f(1.0f, 1.0f, 1.0f);
00447       glVertex3f(0.5f, 0.5f, 0.5f);
00448
00449       glColor3f(0.0f, 1.0f, 1.0f);
00450       glVertex3f(0.5f, 0.5f, -0.5f);
00451
00452       glColor3f(0.0f, 0.0f, 1.0f);
00453       glVertex3f(-0.5f, 0.5f, -0.5f);
00454     glEnd();
00455
00456     glBegin(GL_QUADS);
00457       glColor3f(1.0f, 0.0f, 0.0f);
00458       glVertex3f(-0.5f, -0.5f, 0.5f);
00459
00460       glColor3f(1.0f, 1.0f, 0.0f);
00461       glVertex3f(0.5f, -0.5f, 0.5f);
00462
00463       glColor3f(0.0f, 1.0f, 0.0f);
00464       glVertex3f(0.5f, -0.5f, -0.5f);
00465
00466       glColor3f(0.0f, 0.0f, 0.0f);
00467       glVertex3f(-0.5f, -0.5f,  -0.5f);
00468     glEnd();
00469
00470   glPopMatrix();
00471
00472   glFinish();
00473   SwapBuffers(wglGetCurrentDC());
00474
00475   bBusy = FALSE;
00476 }
00477
00478 BOOL CCubeView::OnEraseBkgnd(CDC* /*pDC*/)
00479 {
00480   return TRUE;
00481 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/WorkspaceBar.cpp Source File

  • vc2008fp
  • RibbonMDI

WorkspaceBar.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014 #include "WorkspaceBar.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 const int nBorderSize = 1;
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CWorkspaceBar
00026
00027 BEGIN_MESSAGE_MAP(CWorkspaceBar, CDockablePane)
00028   ON_WM_CREATE()
00029   ON_WM_SIZE()
00030   ON_WM_PAINT()
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CWorkspaceBar construction/destruction
00035
00036 CWorkspaceBar::CWorkspaceBar()
00037 {
00038   // TODO: add one-time construction code here
00039
00040 }
00041
00042 CWorkspaceBar::~CWorkspaceBar()
00043 {
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CWorkspaceBar message handlers
00048
00049 int CWorkspaceBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00050 {
00051   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00052     return -1;
00053
00054   CRect rectDummy;
00055   rectDummy.SetRectEmpty ();
00056
00057   // Create tree windows.
00058   // TODO: create your own tab windows here:
00059   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
00060                 TVS_LINESATROOT | TVS_HASBUTTONS;
00061
00062   if (!m_wndTree.Create (dwViewStyle, rectDummy, this, 1))
00063   {
00064     TRACE0("Failed to create workspace view\n");
00065     return -1;      // fail to create
00066   }
00067
00068   // Setup trees content:
00069   HTREEITEM hRoot1 = m_wndTree.InsertItem (_T("Root 1"));
00070   m_wndTree.InsertItem (_T("Item 1"), hRoot1);
00071   m_wndTree.InsertItem (_T("Item 2"), hRoot1);
00072
00073   return 0;
00074 }
00075
00076 void CWorkspaceBar::OnSize(UINT nType, int cx, int cy)
00077 {
00078   CDockablePane::OnSize(nType, cx, cy);
00079
00080   // Tab control should cover a whole client area:
00081   m_wndTree.SetWindowPos (NULL, nBorderSize, nBorderSize,
00082     cx - 2 * nBorderSize, cy - 2 * nBorderSize,
00083     SWP_NOACTIVATE | SWP_NOZORDER);
00084 }
00085
00086 void CWorkspaceBar::OnPaint()
00087 {
00088   CPaintDC dc(this); // device context for painting
00089
00090   CRect rectTree;
00091   m_wndTree.GetWindowRect (rectTree);
00092   ScreenToClient (rectTree);
00093
00094   rectTree.InflateRect (nBorderSize, nBorderSize);
00095   dc.Draw3dRect (rectTree,  ::GetSysColor (COLOR_3DSHADOW),
00096                 ::GetSysColor (COLOR_3DSHADOW));
00097 }
00098
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/PaletteDemoDoc.h Source File

  • vc2008fp
  • PaletteDemo

PaletteDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CPaletteDemoDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CPaletteDemoDoc();
00017   DECLARE_DYNCREATE(CPaletteDemoDoc)
00018
00019 // Attributes
00020 public:
00021   UINT  m_uiCurrTool;
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual BOOL OnNewDocument();
00029   virtual void Serialize(CArchive& ar);
00030
00031 // Implementation
00032 public:
00033   virtual ~CPaletteDemoDoc();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:
00040   afx_msg void OnPaletteTool(UINT uiCmd);
00041   afx_msg void OnUpdatePaletteTool(CCmdUI* pCmdUI);
00042
00043   DECLARE_MESSAGE_MAP()
00044 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/OutputBar.cpp Source File

  • vc2008fp
  • RibbonMDI

OutputBar.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014 #include "OutputBar.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 const int nBorderSize = 1;
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // COutputBar
00026
00027 BEGIN_MESSAGE_MAP(COutputBar, CDockablePane)
00028   ON_WM_CREATE()
00029   ON_WM_SIZE()
00030 END_MESSAGE_MAP()
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // COutputBar construction/destruction
00034
00035 COutputBar::COutputBar()
00036 {
00037   // TODO: add one-time construction code here
00038
00039 }
00040
00041 COutputBar::~COutputBar()
00042 {
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // COutputBar message handlers
00047
00048 int COutputBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00049 {
00050   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00051     return -1;
00052
00053   CRect rectDummy;
00054   rectDummy.SetRectEmpty ();
00055
00056   // Create tabs window:
00057   if (!m_wndTabs.Create (CMFCTabCtrl::STYLE_FLAT, rectDummy, this, 1))
00058   {
00059     TRACE0("Failed to create output tab window\n");
00060     return -1;      // fail to create
00061   }
00062   m_wndTabs.SetFlatFrame (FALSE, FALSE);
00063
00064   // Create list windows.
00065   // TODO: create your own window here:
00066   const DWORD dwViewStyle =
00067     LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
00068
00069   if (!m_wndList1.Create (dwViewStyle, rectDummy, &m_wndTabs, 2) ||
00070     !m_wndList2.Create (dwViewStyle, rectDummy, &m_wndTabs, 3) ||
00071     !m_wndList3.Create (dwViewStyle, rectDummy, &m_wndTabs, 4))
00072   {
00073     TRACE0("Failed to create output view\n");
00074     return -1;      // fail to create
00075   }
00076
00077   // Attach list windows to tab:
00078   m_wndTabs.AddTab (&m_wndList1, _T("Output 1"), (UINT)-1);
00079   m_wndTabs.AddTab (&m_wndList2, _T("Output 2"), (UINT)-1);
00080   m_wndTabs.AddTab (&m_wndList3, _T("Output 3"), (UINT)-1);
00081
00082   return 0;
00083 }
00084
00085 void COutputBar::OnSize(UINT nType, int cx, int cy)
00086 {
00087   CDockablePane::OnSize(nType, cx, cy);
00088
00089   // Tab control should cover a whole client area:
00090   m_wndTabs.SetWindowPos (NULL, -1, -1, cx, cy,
00091     SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
00092 }
00093
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpad.cpp Source File

  • vc2008fp
  • WordPad

wordpad.cpp

Go to the documentation of this file.
00001 //
00002 // wordpad.cpp : Defines the class behaviors for the application.
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015
00016 #include "wordpad.h"
00017 #include "mainfrm.h"
00018 #include "ipframe.h"
00019 #include "wordpdoc.h"
00020 #include "wordpvw.h"
00021 #include "strings.h"
00022 #include "key.h"
00023 #include "filenewd.h"
00024 #include <locale.h>
00025 #include <winnls.h>
00026 #include <winreg.h>
00027
00028 #include "AppLookDlg.h"
00029
00030 extern BOOL AFXAPI AfxFullPath(LPTSTR lpszPathOut, LPCTSTR lpszFileIn);
00031 static BOOL RegisterHelper(LPCTSTR* rglpszRegister, LPCTSTR* rglpszSymbols,
00032   BOOL bReplace);
00033
00034 #ifdef _DEBUG
00035 #undef THIS_FILE
00036 static char BASED_CODE THIS_FILE[] = __FILE__;
00037 #endif
00038
00039 CLIPFORMAT cfEmbeddedObject;
00040 CLIPFORMAT cfRTF;
00041 CLIPFORMAT cfRTO;
00042
00043 int CWordPadApp::m_nOpenMsg = RegisterWindowMessage(_T("WordPadOpenMessage"));
00044 int CWordPadApp::m_nPrinterChangedMsg = RegisterWindowMessage(_T("WordPadPrinterChanged"));
00045
00046 const int CWordPadApp::m_nPrimaryNumUnits = 4;
00047 const int CWordPadApp::m_nNumUnits = 7;
00048
00049 CUnit CWordPadApp::m_units[7] =
00050 {
00051 //  TPU,    SmallDiv,   MedDiv, LargeDiv,   MinMove,    szAbbrev,           bSpace
00052 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH1_ABBREV,   FALSE),//inches
00053 CUnit(568,  142,        284,    568,        142,        IDS_CM_ABBREV,      TRUE),//centimeters
00054 CUnit(20,   120,        720,    720,        100,        IDS_POINT_ABBREV,   TRUE),//points
00055 CUnit(240,  240,        1440,   1440,       120,        IDS_PICA_ABBREV,    TRUE),//picas
00056 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH2_ABBREV,   FALSE),//in
00057 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH3_ABBREV,   FALSE),//inch
00058 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH4_ABBREV,   FALSE)//inches
00059 };
00060
00061 static UINT DoRegistry(LPVOID lpv)
00062 {
00063   ASSERT(lpv != NULL);
00064   if (lpv != NULL)
00065   {
00066     ((CWordPadApp*)lpv)->UpdateRegistry();
00067   }
00068   return 0;
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CWordPadApp
00073
00074 BEGIN_MESSAGE_MAP(CWordPadApp, CWinAppEx)
00075   //{{AFX_MSG_MAP(CWordPadApp)
00076   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00077   ON_COMMAND(ID_FILE_NEW, OnFileNew)
00078   ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
00079   ON_COMMAND(ID_VIEW_APP_LOOK, OnViewAppLook)
00080   //}}AFX_MSG_MAP
00081 END_MESSAGE_MAP()
00082
00083 void CWordPadCommandLineInfo::ParseParam(const char* pszParam,BOOL bFlag,BOOL bLast)
00084 {
00085   if (bFlag)
00086   {
00087     if (lstrcmpA(pszParam, "t") == 0)
00088     {
00089       m_bForceTextMode = TRUE;
00090       return;
00091     }
00092   }
00093   CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
00094 }
00095
00096 /////////////////////////////////////////////////////////////////////////////
00097 // CWordPadApp construction
00098
00099 CWordPadApp::CWordPadApp() :
00100   CWinAppEx (TRUE),
00101   m_optionsText(0), m_optionsRTF(1),
00102   m_optionsWord(2), m_optionsWrite(2), m_optionsIP(2), m_optionsNull(0)
00103 {
00104   _tsetlocale(LC_ALL, _T(""));
00105
00106   m_nFilterIndex = 1;
00107   DWORD dwVersion = ::GetVersion();
00108   m_bWin4 = (BYTE)dwVersion >= 4;
00109 #ifndef _UNICODE
00110   m_bWin31 = (dwVersion > 0x80000000 && !m_bWin4);
00111 #endif
00112   m_nDefFont = (m_bWin4) ? DEFAULT_GUI_FONT : ANSI_VAR_FONT;
00113   m_dcScreen.Attach(::GetDC(NULL));
00114   m_bForceOEM = FALSE;
00115   m_bHiColorIcons = FALSE;
00116 }
00117
00118 CWordPadApp::~CWordPadApp()
00119 {
00120   if (m_dcScreen.m_hDC != NULL)
00121     ::ReleaseDC(NULL, m_dcScreen.Detach());
00122 }
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // The one and only CWordPadApp object
00126
00127 CWordPadApp theApp;
00128
00129 // Register the application's document templates.  Document templates
00130 //  serve as the connection between documents, frame windows and views.
00131 static CSingleDocTemplate DocTemplate(
00132     IDR_MAINFRAME,
00133     RUNTIME_CLASS(CWordPadDoc),
00134     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00135     RUNTIME_CLASS(CWordPadView));
00136
00137 // This identifier was generated to be statistically unique for your app.
00138 // You may change it if you prefer to choose a specific identifier.
00139 static const CLSID BASED_CODE clsid =
00140 { 0x73FDDC80L, 0xAEA9, 0x101A, { 0x98, 0xA7, 0x00, 0xAA, 0x00, 0x37, 0x49, 0x59} };
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CWordPadApp initialization
00144
00145 BOOL CWordPadApp::InitInstance()
00146 {
00147   ParseCommandLine(cmdInfo);
00148
00149   if (::FindWindow(szWordPadClass, NULL) && IsDocOpen(cmdInfo.m_strFileName))
00150     return FALSE;
00151
00152   SetRegistryKey(szRegKey);
00153   LoadOptions();
00154
00155   Enable3dControls();
00156   CSplashWnd splash;
00157   BOOL bSplash = cmdInfo.m_bShowSplash;
00158   if (!cmdInfo.m_bRunEmbedded)
00159   {
00160     switch (m_nCmdShow)
00161     {
00162       case SW_HIDE:
00163       case SW_SHOWMINIMIZED:
00164       case SW_MINIMIZE:
00165       case SW_SHOWMINNOACTIVE:
00166         bSplash = FALSE;
00167         break;
00168       case SW_RESTORE:
00169       case SW_SHOW:
00170       case SW_SHOWDEFAULT:
00171       case SW_SHOWNA:
00172       case SW_SHOWNOACTIVATE:
00173       case SW_SHOWNORMAL:
00174       case SW_SHOWMAXIMIZED:
00175         if (m_bMaximized)
00176           m_nCmdShow = SW_SHOWMAXIMIZED;
00177         break;
00178     }
00179   }
00180   else
00181   {
00182     //Excel 4 will start OLE servers minimized
00183     m_nCmdShow = SW_SHOWNORMAL;
00184   }
00185   int nCmdShow = m_nCmdShow;
00186
00187   if (bSplash)
00188   {
00189     // only show splash if not embedded
00190     splash.Create(NULL);
00191     splash.ShowWindow(SW_SHOW);
00192     splash.UpdateWindow();
00193   }
00194
00195   LoadAbbrevStrings();
00196
00197 #ifdef CREATE_DEV_NAMES
00198   m_hDevNames = CreateDevNames();
00199 #else
00200   m_hDevNames = NULL;
00201 #endif
00202   NotifyPrinterChanged((m_hDevNames == NULL));
00203
00204   free((void*)m_pszHelpFilePath);
00205   m_pszHelpFilePath = _T("WORDPAD.HLP");
00206
00207   // Initialize OLE libraries
00208   if (!AfxOleInit())
00209   {
00210     AfxMessageBox(IDP_OLE_INIT_FAILED);
00211     return FALSE;
00212   }
00213   RegisterFormats();
00214
00215   // Initialize RichEdit control
00216   if (LoadLibrary(_T("RICHED32.DLL")) == NULL)
00217   {
00218     AfxMessageBox(IDS_RICHED_LOAD_FAIL, MB_OK|MB_ICONEXCLAMATION);
00219     return FALSE;
00220   }
00221
00222   // Standard initialization
00223   // If you are not using these features and wish to reduce the size
00224   //  of your final executable, you should remove from the following
00225   //  the specific initialization routines you do not need.
00226
00227   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00228
00229   // Initialize all Managers for usage. They are automatically constructed
00230   // if not yet present
00231   SetRegistryBase (_T("SettingsPro"));
00232
00233   InitContextMenuManager();
00234   InitKeyboardManager();
00235
00236   InitTooltipManager();
00237
00238   CMFCToolTipInfo params;
00239   params.m_bVislManagerTheme = TRUE;
00240
00241   theApp.GetTooltipManager ()->SetTooltipParams (
00242     0xFFFF,
00243     RUNTIME_CLASS (CMFCToolTipCtrl),
00244     &params);
00245
00246   EnableTearOffMenus (NULL, ID_FREE_TEAROFF1, ID_FREE_TEAROFF2);
00247
00248   // Register the application's document templates.  Document templates
00249   //  serve as the connection between documents, frame windows and views.
00250
00251   DocTemplate.SetContainerInfo(IDR_CNTR_INPLACE);
00252   DocTemplate.SetServerInfo(
00253     IDR_SRVR_EMBEDDED, IDR_SRVR_INPLACE,
00254     RUNTIME_CLASS(CInPlaceFrame));
00255
00256   // Connect the COleTemplateServer to the document template.
00257   //  The COleTemplateServer creates new documents on behalf
00258   //  of requesting OLE containers by using information
00259   //  specified in the document template.
00260   m_server.ConnectTemplate(clsid, &DocTemplate, TRUE);
00261     // Note: SDI applications register server objects only if /Embedding
00262     //   or /Automation is present on the command line.
00263
00264   // Check to see if launched as OLE server
00265   if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
00266   {
00267     // Register all OLE server (factories) as running.  This enables the
00268     //  OLE libraries to create objects from other applications.
00269     COleTemplateServer::RegisterAll();
00270     AfxOleSetUserCtrl(FALSE);
00271
00272     // Application was run with /Embedding or /Automation.  Don't show the
00273     //  main window in this case.
00274     return TRUE;
00275   }
00276
00277   // make sure the main window is showing
00278   m_bPromptForType = FALSE;
00279   OnFileNew();
00280   m_bPromptForType = TRUE;
00281   // destroy splash window
00282   if (cmdInfo.m_bShowSplash)
00283     splash.DestroyWindow();
00284   m_nCmdShow = -1;
00285   if (m_pMainWnd == NULL) // i.e. OnFileNew failed
00286     return FALSE;
00287
00288   if (!cmdInfo.m_strFileName.IsEmpty())   // open an existing document
00289     m_nCmdShow = nCmdShow;
00290
00291   // Dispatch commands specified on the command line
00292   if (cmdInfo.m_nShellCommand != CCommandLineInfo::FileNew &&
00293     !ProcessShellCommand(cmdInfo))
00294   {
00295     return FALSE;
00296   }
00297
00298   LoadCustomState ();
00299
00300   // Enable File Manager drag/drop open
00301   m_pMainWnd->DragAcceptFiles();
00302
00303   // When a server application is launched stand-alone, it is a good idea
00304   //  to update the system registry in case it has been damaged.
00305   // do registry stuff in separate thread
00306 #ifndef _UNICODE
00307   if (m_bWin31) // no threads on Win32s
00308     UpdateRegistry();
00309   else
00310 #endif
00311     AfxBeginThread(DoRegistry, this, THREAD_PRIORITY_IDLE);
00312
00313   if (afxGlobalData.m_nBitsPerPixel < 16)
00314   {
00315     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00316   }
00317
00318   // Set application general look:
00319   CAppLookDlg dlg (TRUE);
00320   dlg.DoModal ();
00321
00322   return TRUE;
00323 }
00324
00325 BOOL CWordPadApp::IsDocOpen(LPCTSTR lpszFileName)
00326 {
00327   if (lpszFileName[0] == NULL)
00328     return FALSE;
00329   TCHAR szPath[_MAX_PATH];
00330   AfxFullPath(szPath, lpszFileName);
00331   ATOM atom = GlobalAddAtom(szPath);
00332   ASSERT(atom != NULL);
00333   if (atom == NULL)
00334     return FALSE;
00335   EnumWindows(StaticEnumProc, (LPARAM)&atom);
00336   if (atom == NULL)
00337     return TRUE;
00338   DeleteAtom(atom);
00339   return FALSE;
00340 }
00341
00342 BOOL CALLBACK CWordPadApp::StaticEnumProc(HWND hWnd, LPARAM lParam)
00343 {
00344   TCHAR szClassName[30];
00345   GetClassName(hWnd, szClassName, 30);
00346   if (lstrcmp(szClassName, szWordPadClass) != 0)
00347     return TRUE;
00348
00349   ATOM* pAtom = (ATOM*)lParam;
00350   ASSERT(pAtom != NULL);
00351   DWORD_PTR dw = NULL;
00352   ::SendMessageTimeout(hWnd, m_nOpenMsg, NULL, (LPARAM)*pAtom,
00353     SMTO_ABORTIFHUNG, 500, &dw);
00354   if (dw)
00355   {
00356     ::SetForegroundWindow(hWnd);
00357     DeleteAtom(*pAtom);
00358     *pAtom = NULL;
00359     return FALSE;
00360   }
00361   return TRUE;
00362 }
00363
00364 void CWordPadApp::RegisterFormats()
00365 {
00366   cfEmbeddedObject = (CLIPFORMAT)::RegisterClipboardFormat(_T("Embedded Object"));
00367   cfRTF = (CLIPFORMAT)::RegisterClipboardFormat(CF_RTF);
00368   cfRTO = (CLIPFORMAT)::RegisterClipboardFormat(CF_RETEXTOBJ);
00369 }
00370
00371 CDocOptions& CWordPadApp::GetDocOptions(int nDocType)
00372 {
00373   switch (nDocType)
00374   {
00375     case RD_WINWORD6:
00376     case RD_WORDPAD:
00377       return m_optionsWord;
00378     case RD_RICHTEXT:
00379       return m_optionsRTF;
00380     case RD_TEXT:
00381     case RD_OEMTEXT:
00382       return m_optionsText;
00383     case RD_WRITE:
00384       return m_optionsWrite;
00385     case RD_EMBEDDED:
00386       return m_optionsIP;
00387   }
00388   ASSERT(FALSE);
00389   return m_optionsNull;
00390 }
00391
00392 CDockState& CWordPadApp::GetDockState(int nDocType, BOOL bPrimary)
00393 {
00394   return GetDocOptions(nDocType).GetDockState(bPrimary);
00395 }
00396
00397 void CWordPadApp::SaveOptions()
00398 {
00399   WriteProfileInt(szSection, szWordSel, m_bWordSel);
00400   WriteProfileInt(szSection, szUnits, GetUnits());
00401   WriteProfileInt(szSection, szMaximized, m_bMaximized);
00402   WriteProfileBinary(szSection, szFrameRect, (BYTE*)&m_rectInitialFrame,
00403     sizeof(CRect));
00404   WriteProfileBinary(szSection, szPageMargin, (BYTE*)&m_rectPageMargin,
00405     sizeof(CRect));
00406   m_optionsText.SaveOptions(szTextSection);
00407   m_optionsRTF.SaveOptions(szRTFSection);
00408   m_optionsWord.SaveOptions(szWordSection);
00409   m_optionsWrite.SaveOptions(szWriteSection);
00410   m_optionsIP.SaveOptions(szIPSection);
00411 }
00412
00413 void CWordPadApp::LoadOptions()
00414 {
00415   BYTE* pb = NULL;
00416   UINT nLen = 0;
00417
00418   HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
00419   if (hFont == NULL)
00420     hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
00421   VERIFY(::GetObject(hFont, sizeof(LOGFONT), &m_lf));
00422
00423   m_bWordSel = GetProfileInt(szSection, szWordSel, TRUE);
00424   TCHAR buf[2];
00425   buf[0] = NULL;
00426   GetLocaleInfo(GetUserDefaultLCID(), LOCALE_IMEASURE, buf, 2);
00427   int nDefUnits = buf[0] == '1' ? 0 : 1;
00428   SetUnits(GetProfileInt(szSection, szUnits, nDefUnits));
00429   m_bMaximized = GetProfileInt(szSection, szMaximized, (int)FALSE);
00430
00431   if (GetProfileBinary(szSection, szFrameRect, &pb, &nLen))
00432   {
00433     ASSERT(nLen == sizeof(CRect));
00434     memcpy(&m_rectInitialFrame, pb, sizeof(CRect));
00435     delete pb;
00436   }
00437   else
00438     m_rectInitialFrame.SetRect(0,0,0,0);
00439
00440   CRect rectScreen(0, 0, GetSystemMetrics(SM_CXSCREEN),
00441     GetSystemMetrics(SM_CYSCREEN));
00442   CRect rectInt;
00443   rectInt.IntersectRect(&rectScreen, &m_rectInitialFrame);
00444   if (rectInt.Width() < 10 || rectInt.Height() < 10)
00445     m_rectInitialFrame.SetRect(0, 0, 0, 0);
00446
00447   if (GetProfileBinary(szSection, szPageMargin, &pb, &nLen))
00448   {
00449     ASSERT(nLen == sizeof(CRect));
00450     memcpy(&m_rectPageMargin, pb, sizeof(CRect));
00451     delete pb;
00452   }
00453   else
00454     m_rectPageMargin.SetRect(1800, 1440, 1800, 1440);
00455
00456   m_optionsText.LoadOptions(szTextSection);
00457   m_optionsRTF.LoadOptions(szRTFSection);
00458   m_optionsWord.LoadOptions(szWordSection);
00459   m_optionsWrite.LoadOptions(szWriteSection);
00460   m_optionsIP.LoadOptions(szIPSection);
00461 }
00462
00463 void CWordPadApp::LoadAbbrevStrings()
00464 {
00465   for (int i=0;i<m_nNumUnits;i++)
00466   {
00467     BOOL bValidString;
00468     bValidString = m_units[i].m_strAbbrev.LoadString(m_units[i].m_nAbbrevID);
00469     ASSERT(bValidString);
00470   }
00471 }
00472
00473 BOOL CWordPadApp::ParseMeasurement(LPTSTR buf, int& lVal)
00474 {
00475   TCHAR* pch;
00476   if (buf[0] == NULL)
00477     return FALSE;
00478   float f = (float)_tcstod(buf,&pch);
00479
00480   // eat white space, if any
00481   while (isspace(*pch))
00482     pch++;
00483
00484   if (pch[0] == NULL) // default
00485   {
00486     lVal = (f < 0.f) ? (int)(f*GetTPU()-0.5f) : (int)(f*GetTPU()+0.5f);
00487     return TRUE;
00488   }
00489   for (int i=0;i<m_nNumUnits;i++)
00490   {
00491     if (lstrcmpi(pch, GetAbbrev(i)) == 0)
00492     {
00493       lVal = (f < 0.f) ? (int)(f*GetTPU(i)-0.5f) : (int)(f*GetTPU(i)+0.5f);
00494       return TRUE;
00495     }
00496   }
00497   return FALSE;
00498 }
00499
00500 void CWordPadApp::PrintTwips(TCHAR* buf, int nValue, int nDec)
00501 {
00502   ASSERT(nDec == 2);
00503   int div = GetTPU();
00504   int lval = nValue;
00505   BOOL bNeg = FALSE;
00506
00507   int* pVal = new int[nDec+1];
00508
00509   if (lval < 0)
00510   {
00511     bNeg = TRUE;
00512     lval = -lval;
00513   }
00514
00515   int i = 0;
00516
00517   for (i=0;i<=nDec;i++)
00518   {
00519     pVal[i] = lval/div; //integer number
00520     lval -= pVal[i]*div;
00521     lval *= 10;
00522   }
00523   i--;
00524   if (lval >= div/2)
00525     pVal[i]++;
00526
00527   while ((pVal[i] == 10) && (i != 0))
00528   {
00529     pVal[i] = 0;
00530     pVal[--i]++;
00531   }
00532
00533   while (nDec && pVal[nDec] == 0)
00534     nDec--;
00535
00536   _stprintf(buf, _T("%.*f"), nDec, (float)nValue/(float)div);
00537
00538   if (m_units[m_nUnits].m_bSpaceAbbrev)
00539     lstrcat(buf, _T(" "));
00540   lstrcat(buf, GetAbbrev());
00541   delete []pVal;
00542 }
00543
00544 /////////////////////////////////////////////////////////////////////////////
00545 // CWordPadApp commands
00546
00547 void CWordPadApp::OnAppAbout()
00548 {
00549   BOOL bValidString;
00550
00551   CString strTitle;
00552   bValidString = strTitle.LoadString(AFX_IDS_APP_TITLE);
00553   ASSERT(bValidString);
00554
00555   CString strInfo;
00556   bValidString = strInfo.LoadString (IDS_ABOUT_INFO);
00557   ASSERT(bValidString);
00558
00559   ShellAbout(m_pMainWnd->GetSafeHwnd(), strTitle, strInfo, LoadIcon(IDR_MAINFRAME));
00560 }
00561
00562 int CWordPadApp::ExitInstance()
00563 {
00564   m_pszHelpFilePath = NULL;
00565
00566   HMODULE h = GetModuleHandle(_T("RICHED32.DLL"));
00567   if (h != NULL)
00568   {
00569     FreeLibrary(h);
00570   }
00571
00572   SaveOptions();
00573
00574   return CWinAppEx::ExitInstance();
00575 }
00576
00577 void CWordPadApp::OnFileNew()
00578 {
00579   int nDocType = -1;
00580   if (!m_bPromptForType)
00581   {
00582     if (cmdInfo.m_bForceTextMode)
00583       nDocType = RD_TEXT;
00584     else if (!cmdInfo.m_strFileName.IsEmpty())
00585     {
00586       CFileException fe;
00587       nDocType = GetDocTypeFromName(cmdInfo.m_strFileName, fe);
00588     }
00589     if (nDocType == -1)
00590       nDocType = RD_DEFAULT;
00591   }
00592   else
00593   {
00594     CFileNewDialog dlg;
00595     if (dlg.DoModal() == IDCANCEL)
00596       return;
00597
00598     nDocType = (dlg.m_nSel == 0) ? RD_DEFAULT:  //Word 6
00599           (dlg.m_nSel == 1) ? RD_RICHTEXT :   //RTF
00600           RD_TEXT ;                   //text
00601
00602     if (nDocType != RD_TEXT)
00603       cmdInfo.m_bForceTextMode = FALSE;
00604   }
00605   m_nNewDocType = nDocType;
00606   DocTemplate.OpenDocumentFile(NULL);
00607     // if returns NULL, the user has already been alerted
00608 }
00609
00610 // prompt for file name - used for open and save as
00611 // static function called from app
00612 BOOL CWordPadApp::PromptForFileName(CString& fileName, UINT nIDSTitle,
00613   DWORD dwFlags, BOOL bOpenFileDialog, int* pType)
00614 {
00615   ScanForConverters();
00616   CFileDialog dlgFile(bOpenFileDialog);
00617   CString title;
00618
00619   VERIFY(title.LoadString(nIDSTitle));
00620
00621   dlgFile.m_ofn.Flags |= dwFlags;
00622 //  dlgFile.m_ofn.Flags &= ~OFN_SHOWHELP;
00623
00624   int nIndex = m_nFilterIndex;
00625   if (!bOpenFileDialog)
00626   {
00627     int nDocType = (pType != NULL) ? *pType : RD_DEFAULT;
00628     nIndex = GetIndexFromType(nDocType, bOpenFileDialog);
00629     if (nIndex == -1)
00630       nIndex = GetIndexFromType(RD_DEFAULT, bOpenFileDialog);
00631     if (nIndex == -1)
00632       nIndex = GetIndexFromType(RD_NATIVE, bOpenFileDialog);
00633     ASSERT(nIndex != -1);
00634     nIndex++;
00635   }
00636   dlgFile.m_ofn.nFilterIndex = nIndex;
00637   // strDefExt is necessary to hold onto the memory from GetExtFromType
00638   CString strDefExt = GetExtFromType(GetTypeFromIndex(nIndex-1, bOpenFileDialog));
00639   dlgFile.m_ofn.lpstrDefExt = strDefExt;
00640
00641
00642   CString strFilter = GetFileTypes(bOpenFileDialog);
00643   dlgFile.m_ofn.lpstrFilter = strFilter;
00644   dlgFile.m_ofn.lpstrTitle = title;
00645   dlgFile.m_ofn.lpstrFile = fileName.GetBuffer(_MAX_PATH);
00646
00647   BOOL bRet = (dlgFile.DoModal() == IDOK) ? TRUE : FALSE;
00648   fileName.ReleaseBuffer();
00649   if (bRet)
00650   {
00651     if (bOpenFileDialog)
00652       m_nFilterIndex = dlgFile.m_ofn.nFilterIndex;
00653     if (pType != NULL)
00654     {
00655       int nIndex2 = (int)dlgFile.m_ofn.nFilterIndex - 1;
00656       ASSERT(nIndex2 >= 0);
00657       *pType = GetTypeFromIndex(nIndex2, bOpenFileDialog);
00658     }
00659   }
00660
00661   return bRet;
00662 }
00663
00664 void CWordPadApp::OnFileOpen()
00665 {
00666   // prompt the user (with all document templates)
00667   CString newName;
00668   int nType = RD_DEFAULT;
00669   if (!PromptForFileName(newName, AFX_IDS_OPENFILE,
00670     OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, &nType))
00671     return; // open cancelled
00672
00673   if (nType == RD_OEMTEXT)
00674     m_bForceOEM = TRUE;
00675   OpenDocumentFile(newName);
00676   m_bForceOEM = FALSE;
00677   // if returns NULL, the user has already been alerted
00678 }
00679
00680 BOOL CWordPadApp::OnDDECommand(LPTSTR /*lpszCommand*/)
00681 {
00682   return FALSE;
00683 }
00684
00685 /////////////////////////////////////////////////////////////////////////////
00686 // DDE and ShellExecute support
00687
00688 //HKEY_CLASSES_ROOT\.RTF = rtffile
00689 //HKEY_CLASSES_ROOT\rtffile =
00690 //HKEY_CLASSES_ROOT\rtffile\CLSID = {73FDDC80-AEA9-101A-98A7-00AA00374959}
00691 //HKEY_CLASSES_ROOT\rtffile\protocol\StdFileEditing\server = WORDPAD.EXE
00692 //HKEY_CLASSES_ROOT\rtffile\protocol\StdFileEditing\verb\0 = &Edit
00693 //HKEY_CLASSES_ROOT\rtffile\shell\open\command = WORDPAD.EXE %1
00694 //HKEY_CLASSES_ROOT\rtffile\shell\print\command = WORDPAD.EXE /p %1
00695
00696 #define REGENTRY(key, value) _T(key) _T("\0\0") _T(value)
00697 #define REGENTRYX(key, valuename, value) _T(key) _T("\0") _T(valuename) _T("\0") _T(value)
00698
00699 static const TCHAR sz00[] = REGENTRY("%2", "%5");
00700 static const TCHAR sz01[] = REGENTRY("%2\\CLSID", "%1");
00701 static const TCHAR sz02[] = REGENTRY("%2\\Insertable", "");
00702 static const TCHAR sz03[] = REGENTRY("%2\\protocol\\StdFileEditing\\verb\\0", "&Edit");
00703 static const TCHAR sz04[] = REGENTRY("%2\\protocol\\StdFileEditing\\server", "%3");
00704 static const TCHAR sz05[] = REGENTRY("CLSID\\%1", "%5");
00705 static const TCHAR sz06[] = REGENTRY("CLSID\\%1\\ProgID", "%2");
00706 static const TCHAR sz07[] = REGENTRY("CLSID\\%1\\InprocHandler32", "ole32.dll");
00707 static const TCHAR sz08[] = REGENTRY("CLSID\\%1\\LocalServer32", "%3");
00708 static const TCHAR sz09[] = REGENTRY("CLSID\\%1\\Verb\\0", "&Edit,0,2");
00709 static const TCHAR sz10[] = REGENTRY("CLSID\\%1\\Verb\\1", "&Open,0,2");
00710 static const TCHAR sz11[] = REGENTRY("CLSID\\%1\\Insertable", "");
00711 static const TCHAR sz12[] = REGENTRY("CLSID\\%1\\AuxUserType\\2", "%4");
00712 static const TCHAR sz13[] = REGENTRY("CLSID\\%1\\AuxUserType\\3", "%6");
00713 static const TCHAR sz14[] = REGENTRY("CLSID\\%1\\DefaultIcon", "%3,1");
00714 static const TCHAR sz15[] = REGENTRY("CLSID\\%1\\MiscStatus", "0");
00715 static const TCHAR sz16[] = REGENTRY("%2\\shell\\open\\command", "%3 \"%%1\"");
00716 static const TCHAR sz17[] = REGENTRY("%2\\shell\\print\\command", "%3 /p \"%%1\"");
00717 static const TCHAR sz18[] = REGENTRY("%7", "%2");
00718 static const TCHAR sz19[] = REGENTRY("%2", ""); // like sz00 only no long type name
00719 static const TCHAR sz20[] = REGENTRY("%2\\shell\\printto\\command", "%3 /pt \"%%1\" \"%%2\" \"%%3\" \"%%4\"");
00720 static const TCHAR sz21[] = REGENTRY("%2\\DefaultIcon", "%3,%8");
00721 static const TCHAR sz22[] = REGENTRYX("%7\\ShellNew", "NullFile", "true");
00722 static const TCHAR sz23[] = REGENTRYX("%7\\ShellNew", "Data", "{\\rtf1}");
00723
00724 // %1 - class ID
00725 // %2 - class name              WordPad.Document.1
00726 // %3 - SFN executable path     C:\PROGRA~1\ACCESS~1\WORDPAD.EXE
00727 // %4 - short type name         Document
00728 // %5 - long type name          Microsoft WordPad Document
00729 // %6 - long application name   Microsoft WordPad
00730 // %7 = extension               .rtf
00731 // %8 = default icon            0,1,2,3
00732 #define NUM_REG_ARGS 8
00733
00734 static const LPCTSTR rglpszWordPadRegister[] =
00735 {sz00, sz02, sz03, sz05, sz09, sz10, sz11, sz15, NULL};
00736
00737 static const LPCTSTR rglpszWordPadOverwrite[] =
00738 {sz01, sz04, sz06, sz07, sz08, sz12, sz13, sz14, sz16, sz17, sz20, NULL};
00739
00740 //static const LPCTSTR rglpszExtRegister[] =
00741 //{sz00, sz18, NULL};
00742
00743 //static const LPCTSTR rglpszExtOverwrite[] =
00744 //{sz01, sz16, sz17, sz21, NULL};
00745
00746 static const LPCTSTR rglpszWriExtRegister[] =
00747 {sz18, NULL};
00748 static const LPCTSTR rglpszWriRegister[] =
00749 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00750
00751 static const LPCTSTR rglpszRtfExtRegister[] =
00752 {sz18, sz23, NULL};
00753 static const LPCTSTR rglpszRtfRegister[] =
00754 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00755
00756 static const LPCTSTR rglpszTxtExtRegister[] =
00757 {sz18, sz22, NULL};
00758 static const LPCTSTR rglpszTxtRegister[] =
00759 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00760
00761 static const LPCTSTR rglpszDocExtRegister[] =
00762 {sz18, sz22, NULL};
00763 static const LPCTSTR rglpszDocRegister[] =
00764 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00765
00766 static void RegisterExt(LPCTSTR lpszExt, LPCTSTR lpszProgID, UINT nIDTypeName,
00767   LPCTSTR* rglpszSymbols, LPCTSTR* rglpszExtRegister,
00768   LPCTSTR* rglpszRegister, int nIcon)
00769 {
00770   // don't overwrite anything with the extensions
00771   CString strWhole;
00772   VERIFY(strWhole.LoadString(nIDTypeName));
00773   CString str;
00774   AfxExtractSubString(str, strWhole, DOCTYPE_PROGID);
00775
00776   rglpszSymbols[1] = lpszProgID;
00777   rglpszSymbols[4] = str;
00778   rglpszSymbols[6] = lpszExt;
00779   TCHAR buf[10];
00780   wsprintf(buf, _T("%d"), nIcon);
00781   rglpszSymbols[7] = buf;
00782   // check for .ext and progid
00783   CKey key;
00784   if (!key.Open(HKEY_CLASSES_ROOT, lpszExt)) // .ext doesn't exist
00785     RegisterHelper(rglpszExtRegister, rglpszSymbols, TRUE);
00786   key.Close();
00787   if (!key.Open(HKEY_CLASSES_ROOT, lpszProgID)) // ProgID doesn't exist (i.e. txtfile)
00788     RegisterHelper(rglpszRegister, rglpszSymbols, TRUE);
00789 }
00790
00791 void CWordPadApp::UpdateRegistry()
00792 {
00793   USES_CONVERSION;
00794   LPOLESTR lpszClassID = NULL;
00795   CDocTemplate* pDocTemplate = &DocTemplate;
00796
00797   // get registration info from doc template string
00798   CString strServerName;
00799   CString strLocalServerName;
00800   CString strLocalShortName;
00801
00802   if (!pDocTemplate->GetDocString(strServerName,
00803      CDocTemplate::regFileTypeId) || strServerName.IsEmpty())
00804   {
00805     TRACE0("Error: not enough information in DocTemplate to register OLE server.\n");
00806     return;
00807   }
00808   if (!pDocTemplate->GetDocString(strLocalServerName,
00809      CDocTemplate::regFileTypeName))
00810     strLocalServerName = strServerName;     // use non-localized name
00811   if (!pDocTemplate->GetDocString(strLocalShortName,
00812     CDocTemplate::fileNewName))
00813     strLocalShortName = strLocalServerName; // use long name
00814
00815   ASSERT(strServerName.Find(' ') == -1);  // no spaces allowed
00816
00817   ::StringFromCLSID(clsid, &lpszClassID);
00818   ASSERT (lpszClassID != NULL);
00819
00820   // get path name to server
00821   TCHAR szLongPathName[_MAX_PATH];
00822   TCHAR szShortPathName[_MAX_PATH];
00823   ::GetModuleFileName(AfxGetInstanceHandle(), szLongPathName, _MAX_PATH);
00824   ::GetShortPathName(szLongPathName, szShortPathName, _MAX_PATH);
00825
00826   LPCTSTR rglpszSymbols[NUM_REG_ARGS];
00827   rglpszSymbols[0] = OLE2CT(lpszClassID);
00828   rglpszSymbols[1] = strServerName;
00829   rglpszSymbols[2] = szShortPathName;
00830   rglpszSymbols[3] = strLocalShortName;
00831   rglpszSymbols[4] = strLocalServerName;
00832   rglpszSymbols[5] = m_pszAppName;    // will usually be long, readable name
00833   rglpszSymbols[6] = NULL;
00834
00835   if (RegisterHelper((LPCTSTR*)rglpszWordPadRegister, rglpszSymbols, FALSE))
00836     RegisterHelper((LPCTSTR*)rglpszWordPadOverwrite, rglpszSymbols, TRUE);
00837
00838 //  RegisterExt(_T(".txt"), _T("txtfile"), IDS_TEXT_DOC, rglpszSymbols,
00839 //      (LPCTSTR*)rglpszTxtExtRegister, (LPCTSTR*)rglpszTxtRegister, 3);
00840   RegisterExt(_T(".rtf"), _T("rtffile"), IDS_RICHTEXT_DOC, rglpszSymbols,
00841     (LPCTSTR*)rglpszRtfExtRegister, (LPCTSTR*)rglpszRtfRegister, 1);
00842   RegisterExt(_T(".wri"), _T("wrifile"), IDS_WRITE_DOC, rglpszSymbols,
00843     (LPCTSTR*)rglpszWriExtRegister, (LPCTSTR*)rglpszWriRegister, 2);
00844   RegisterExt(_T(".doc"), _T("WordPad.Document.1"), IDS_WINWORD6_DOC, rglpszSymbols,
00845     (LPCTSTR*)rglpszDocExtRegister, (LPCTSTR*)rglpszDocRegister, 1);
00846
00847   // free memory for class ID
00848   ASSERT(lpszClassID != NULL);
00849   CoTaskMemFree(lpszClassID);
00850 }
00851
00852 BOOL RegisterHelper(LPCTSTR* rglpszRegister, LPCTSTR* rglpszSymbols,
00853   BOOL bReplace)
00854 {
00855   ASSERT(rglpszRegister != NULL);
00856   ASSERT(rglpszSymbols != NULL);
00857   if (rglpszRegister == NULL || rglpszSymbols == NULL)
00858     return FALSE;
00859
00860   CString strKey;
00861   CString strValueName;
00862   CString strValue;
00863
00864   // keeping a key open makes this go a bit faster
00865   CKey keyTemp;
00866   VERIFY(keyTemp.Create(HKEY_CLASSES_ROOT, _T("CLSID")));
00867
00868   BOOL bResult = TRUE;
00869   while (*rglpszRegister != NULL)
00870   {
00871     LPCTSTR lpszKey = *rglpszRegister++;
00872     if (*lpszKey == '\0')
00873       continue;
00874
00875     LPCTSTR lpszValueName = lpszKey + lstrlen(lpszKey) + 1;
00876     LPCTSTR lpszValue = lpszValueName + lstrlen(lpszValueName) + 1;
00877
00878     strKey.ReleaseBuffer(
00879       FormatMessage(FORMAT_MESSAGE_FROM_STRING |
00880       FORMAT_MESSAGE_ARGUMENT_ARRAY, lpszKey, NULL,   NULL,
00881       strKey.GetBuffer(256), 256, (va_list*) rglpszSymbols));
00882     strValueName = lpszValueName;
00883     strValue.ReleaseBuffer(
00884       FormatMessage(FORMAT_MESSAGE_FROM_STRING |
00885       FORMAT_MESSAGE_ARGUMENT_ARRAY, lpszValue, NULL, NULL,
00886       strValue.GetBuffer(256), 256, (va_list*) rglpszSymbols));
00887
00888     if (strKey.IsEmpty())
00889     {
00890       TRACE1("Warning: skipping empty key '%s'.\n", lpszKey);
00891       continue;
00892     }
00893
00894     CKey key;
00895     if (key.Create(HKEY_CLASSES_ROOT, strKey))
00896     {
00897       if (!bReplace)
00898       {
00899         CString str;
00900         if (key.GetStringValue(str, strValueName) && !str.IsEmpty())
00901           continue;
00902       }
00903
00904       if (!key.SetStringValue(strValue, strValueName))
00905       {
00906         TRACE2("Error: failed setting key '%s' to value '%s'.\n",
00907           (LPCTSTR)strKey, (LPCTSTR)strValue);
00908         bResult = FALSE;
00909         break;
00910       }
00911     }
00912   }
00913
00914   return bResult;
00915 }
00916
00917 void CWordPadApp::WinHelp(DWORD dwData, UINT nCmd)
00918 {
00919   if (nCmd == HELP_INDEX)
00920     nCmd = HELP_FINDER;
00921   CWinApp::WinHelp(dwData, nCmd);
00922 }
00923
00924 BOOL CWordPadApp::PreTranslateMessage(MSG* pMsg)
00925 {
00926   if (pMsg->message == WM_PAINT)
00927     return FALSE;
00928   // CWinApp::PreTranslateMessage does nothing but call base
00929   return CWinThread::PreTranslateMessage(pMsg);
00930 }
00931
00932 void CWordPadApp::NotifyPrinterChanged(BOOL bUpdatePrinterSelection)
00933 {
00934   if (bUpdatePrinterSelection)
00935     UpdatePrinterSelection(FALSE);
00936   POSITION pos = m_listPrinterNotify.GetHeadPosition();
00937   while (pos != NULL)
00938   {
00939     HWND hWnd = m_listPrinterNotify.GetNext(pos);
00940     ::SendMessage(hWnd, m_nPrinterChangedMsg, 0, 0);
00941   }
00942 }
00943
00944 BOOL CWordPadApp::IsIdleMessage(MSG* pMsg)
00945 {
00946   if (pMsg->message == WM_MOUSEMOVE || pMsg->message == WM_NCMOUSEMOVE)
00947     return FALSE;
00948   return CWinApp::IsIdleMessage(pMsg);
00949 }
00950
00951 #ifdef CREATE_DEV_NAMES
00952 HGLOBAL CWordPadApp::CreateDevNames()
00953 {
00954   HGLOBAL hDev = NULL;
00955   if (!cmdInfo.m_strDriverName.IsEmpty() && !cmdInfo.m_strPrinterName.IsEmpty() && !cmdInfo.m_strPortName.IsEmpty())
00956   {
00957     hDev = GlobalAlloc(GPTR, 4 * sizeof(WORD) + ((cmdInfo.m_strDriverName.GetLength() + 1 + cmdInfo.m_strPrinterName.GetLength() + 1 + cmdInfo.m_strPortName.GetLength() + 1) * sizeof(TCHAR)));
00958     if (hDev != NULL)
00959     {
00960       LPDEVNAMES lpDev = (LPDEVNAMES)GlobalLock(hDev);
00961       if (lpDev != NULL)
00962       {
00963         lpDev->wDriverOffset = sizeof(WORD)*4;
00964         lstrcpy((TCHAR*)lpDev + lpDev->wDriverOffset, cmdInfo.m_strDriverName);
00965
00966         lpDev->wDeviceOffset = (WORD)(lpDev->wDriverOffset + ((cmdInfo.m_strDriverName.GetLength() + 1) * sizeof(TCHAR)));
00967         lstrcpy((TCHAR*)lpDev + lpDev->wDeviceOffset, cmdInfo.m_strPrinterName);
00968
00969         lpDev->wOutputOffset = (WORD)(lpDev->wDeviceOffset + ((cmdInfo.m_strPrinterName.GetLength()+1) * sizeof(TCHAR)));
00970         lstrcpy((TCHAR*)lpDev + lpDev->wOutputOffset, cmdInfo.m_strPortName);
00971
00972         lpDev->wDefault = 0;
00973       }
00974     }
00975   }
00976   return hDev;
00977 }
00978 #endif
00979
00980 /////////////////////////////////////////////////////////////////////////////
00981 // Customization load methods
00982
00983 void CWordPadApp::PreLoadState ()
00984 {
00985   GetContextMenuManager()->AddMenu (_T("Context menu"), IDR_TEXT_POPUP);
00986 }
00987
00988 void CWordPadApp::OnViewAppLook()
00989 {
00990   CAppLookDlg dlg (FALSE);
00991   dlg.DoModal ();
00992 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVector Member List

This is the complete list of members for CVector, including all inherited members.
CVector(long nRad, double dAngle) | CVector |
CVector(long x=0, long y=0) | CVector |
CVector(CPoint pt) | CVector |
CVector(CVector &vecClone) | CVector |
GetAngle() const | CVector |
GetLength() const | CVector |
m_dX | CVector |
m_dY | CVector |
operator CPoint() const | CVector |
operator+(CVector vector2) const | CVector |
operator+(CPoint pt) const | CVector |
operator+=(CPoint pt) | CVector |
operator-(CVector vector2) const | CVector |
operator-(CPoint pt) const | CVector |
operator-=(CPoint pt) | CVector | [inline]
operator=(CVector &vector2) | CVector |
operator=(CPoint pt) | CVector |
Scale(long nNumer, long nDenom) | CVector |
SetValueLengthAngle(long nRadius, double dAngle) | CVector |
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/targetver.h Source File

  • vc2008fp
  • RibbonMDI

targetver.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include <winsdkver.h>
00015
00016 #ifndef _WIN32_WINNT
00017 // Modify the following define to target a prior platform. Refer to MSDN
00018 // for the latest info on corresponding values for different platforms.
00019 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00020 #endif
00021
00022 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPadLinkItem Member List

This is the complete list of members for CPadLinkItem, including all inherited members.
CEmbeddedItem(CPadDoc *pContainerDoc) | CEmbeddedItem |
CEmbeddedItem(CWordPadDoc *pContainerDoc, int nBeg=0, int nEnd=-1) | CEmbeddedItem |
CEmbeddedItem(CWordPadDoc *pContainerDoc, int nBeg=0, int nEnd=-1) | CEmbeddedItem |
CPadLinkItem(CPadDoc *pContainerDoc, LPCTSTR pszItemName) | CPadLinkItem |
CPadLinkItem(CPadDoc *pContainerDoc, int nFrom, int nTo) | CPadLinkItem |
GetDocument() const | CEmbeddedItem | [inline]
GetDocument() const | CEmbeddedItem | [inline]
GetDocument() const | CEmbeddedItem | [inline]
GetView() const | CEmbeddedItem |
GetView() const | CEmbeddedItem |
GetView() const | CEmbeddedItem |
m_lpRichDataObj | CEmbeddedItem |
m_nBeg | CEmbeddedItem |
m_nBeg | CEmbeddedItem |
m_nEnd | CEmbeddedItem |
m_nEnd | CEmbeddedItem |
OnDraw(CDC *pDC, CSize &rSize) | CEmbeddedItem | [virtual]
OnDraw(CDC *pDC, CSize &rSize) | CEmbeddedItem | [virtual]
OnDraw(CDC *pDC, CSize &rSize) | CEmbeddedItem | [virtual]
OnDrawEx(CDC *pDC, CSize &rSize, BOOL bOutput) | CEmbeddedItem |
OnDrawEx(CDC *pDC, CSize &rSize, BOOL bOutput) | CEmbeddedItem |
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CEmbeddedItem | [virtual]
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CEmbeddedItem | [virtual]
OnGetExtent(DVASPECT dwDrawAspect, CSize &rSize) | CEmbeddedItem | [virtual]
OnRenderFileData(LPFORMATETC lpFormatEtc, CFile *pFile) | CEmbeddedItem | [protected, virtual]
OnShow() | CPadLinkItem | [protected, virtual]
SaveToFile(CFile *pFile) | CEmbeddedItem | [protected]
Serialize(CArchive &ar) | CEmbeddedItem | [protected, virtual]
Serialize(CArchive &ar) | CEmbeddedItem | [protected, virtual]
Serialize(CArchive &ar) | CEmbeddedItem | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/Swarm.h Source File

  • general
  • MMXSwarm

Swarm.h

Go to the documentation of this file.
00001 // Swarm.h : Defines the interfaces for the swarm motion classes.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013 #include "Surface.h"
00014
00015 class CLeader;
00016 class CLlama;
00017
00018 typedef CAtlArray<CLlama *>  CLlamaArray;
00019 typedef CAtlArray<CLeader *> CLeaderArray;
00020
00021 class CSwarm
00022 {
00023 public:
00024   CSwarm();
00025   ~CSwarm();
00026
00027   void Initialize(CSurface *pSurface, int nLeaders, int nLlamas, const CSize &size);
00028   void Tick();
00029
00030   // Properties
00031   int GetHeight() const   { return(m_nHeight); }
00032   int GetWidth() const    { return(m_nWidth); }
00033   int GetBorder() const   { return(m_nBorder); }
00034   int GetAge() const      { return(m_nAge); }
00035
00036   size_t GetLlamaCount() const  { return(m_LlamaArr.GetCount()); }
00037   size_t GetLeaderCount() const { return(m_LeaderArr.GetCount()); }
00038   CSurface *GetSurface() const  { return(m_pSurf); }
00039
00040 private:
00041   // Implementation
00042   void Destroy();
00043   CLeader *GetLeader();
00044
00045   // Data
00046   int m_nHeight;
00047   int m_nWidth;
00048   int m_nBorder; // How close the the edge can leaders go.
00049   int m_nAge;    // How old is the swarm.
00050   CLeaderArray m_LeaderArr;
00051   CLlamaArray  m_LlamaArr;
00052   CSurface *m_pSurf;
00053 };
00054
00055 struct CRoamer
00056 {
00057   virtual ~CRoamer() { } // Virtual destructors for derived classes
00058   void Bounce(long &value, const int lower, const int upper, int &vel);
00059   static int DeltaRandom(int i) { return(Random(i) - i/2); }
00060   CPoint p1;  // front
00061   CPoint p2;  // back
00062   int dx, dy; // velocity
00063 };
00064
00065 class CLlama : public CRoamer
00066 {
00067 public:
00068   void Init(CSwarm *pSwarm);
00069   void Kick();
00070   void Tick(CSwarm *pSwarm, const CLeaderArray &Leaders);
00071
00072 private:
00073   COLORREF m_color;
00074   size_t   m_idxLeader; // index of the current leader
00075 };
00076
00077 class CLeader : public CRoamer
00078 {
00079 public:
00080   CLeader();
00081   virtual void SetSwarm(CSwarm *pSwarm);
00082
00083   virtual void Tick();
00084   virtual COLORREF GetLlamaColor(COLORREF oldColor) = 0;
00085   virtual COLORREF GetInitialLlamaColor() = 0;
00086
00087   int GetLlamaAcc() const { return(m_nLlamaAcc); }
00088   int GetLlamaVel() const { return(m_nLlamaVel); }
00089
00090   void Import(const CLeader *pRHS);
00091 protected:
00092   static COLORREF HSB(BYTE H, BYTE S, BYTE B);
00093   int m_nMyAcc;
00094   int m_nMyVel;
00095   int m_nLlamaAcc;
00096   int m_nLlamaVel;
00097
00098 private:
00099   CSwarm *m_pSwarm;
00100 };
00101
00102 // Cycle all bright hues
00103 class CBrightLeader : public CLeader
00104 {
00105 public:
00106   CBrightLeader();
00107   virtual void Tick();
00108   virtual COLORREF GetLlamaColor(COLORREF oldColor);
00109   virtual COLORREF GetInitialLlamaColor();
00110 private:
00111   static COLORREF m_sColorTable[256];
00112   int m_nColorCounter;
00113 };
00114
00115 // Cycle through one hue
00116 class CHueLeader : public CLeader
00117 {
00118 public:
00119   CHueLeader();
00120   virtual void Tick();
00121   virtual COLORREF GetLlamaColor(COLORREF oldColor);
00122   virtual COLORREF GetInitialLlamaColor();
00123 private:
00124   COLORREF m_ColorTable[256];
00125   int m_nColorCounter;
00126 };
00127
00128 ///////////////////////////////////////////////////////////////////////
00129 inline void CRoamer::Bounce(long &value, const int lower, const int upper, int &vel)
00130 {
00131     if (value < lower) {
00132         vel *= -1;
00133         value = lower;
00134     }
00135     else if (value >= upper) {
00136         vel *= -1;
00137         value = upper-1;
00138     }
00139 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CComboBoxExProp Member List

This is the complete list of members for CComboBoxExProp, including all inherited members.
AddOption(LPCTSTR lpszOption, int nIcon=-1, int nIndent=0) | CComboBoxExProp |
CComboBoxExProp(const CString &strName, const CString &strValue, LPCTSTR lpszDescr=NULL, DWORD dwData=0, CImageList *pImageList=NULL) | CComboBoxExProp |
CreateCombo(CWnd *pWndParent, CRect rect) | CComboBoxExProp | [protected, virtual]
m_lstIcons | CComboBoxExProp | [protected]
m_lstIndents | CComboBoxExProp | [protected]
m_pImageList | CComboBoxExProp | [protected]
OnEdit(LPPOINT lptClick) | CComboBoxExProp | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypeLibODLView Member List

This is the complete list of members for CTypeLibODLView, including all inherited members.
CTypeLibODLView() | CTypeLibODLView | [protected]
CTypeLibWnd class | CTypeLibODLView | [friend]
DeCompileCoClass(IStream *pstm, ITypeInfo *pti, UINT uiIndent=0) | CTypeLibODLView |
DeCompileConst(IStream *pstm, ITypeInfo *pti, MEMBERID memid, UINT uiIndent=0, BOOL fConst=TRUE) | CTypeLibODLView |
DeCompileDispinterface(IStream *pstm, ITypeInfo *pti, UINT uiIndent=0) | CTypeLibODLView |
DeCompileFunc(IStream *pstm, ITypeInfo *pti, MEMBERID memid, UINT uiIndent=0) | CTypeLibODLView |
DeCompileInterface(IStream *pstm, ITypeInfo *pti, UINT uiIndent=0) | CTypeLibODLView |
DeCompileModule(IStream *pstm, ITypeInfo *pti, UINT uiIndent=0) | CTypeLibODLView |
DeCompileTypedef(IStream *pstm, ITypeInfo *pti, UINT uiIndent=0) | CTypeLibODLView |
DeCompileTypeLib(IStream *pstm, ITypeLib *ptlb, UINT uiIndent=0) | CTypeLibODLView |
DeCompileVar(IStream *pstm, ITypeInfo *pti, MEMBERID memid, UINT uiIndent=0) | CTypeLibODLView |
DumpConst(IStream *pstm, ITypeInfo *pti, TYPEATTR *pattr, MEMBERID memid, UINT uiIndent=0, BOOL fConst=TRUE) | CTypeLibODLView |
DumpFunc(IStream *pstm, ITypeInfo *pti, TYPEATTR *pattr, MEMBERID memid, UINT uiIndent=0) | CTypeLibODLView |
DumpVar(IStream *pstm, ITypeInfo *pti, TYPEATTR *pattr, MEMBERID memid, UINT uiIndent=0) | CTypeLibODLView |
m_Font | CTypeLibODLView |
OnDestroy() | CTypeLibODLView | [protected]
OnDraw(CDC *pDC) | CTypeLibODLView | [protected, virtual]
OnInitialUpdate() | CTypeLibODLView | [virtual]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CTypeLibODLView | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CTypeLibODLView | [protected, virtual]
~CTypeLibODLView() | CTypeLibODLView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSOffice2007DemoApp Member List

This is the complete list of members for CMSOffice2007DemoApp, including all inherited members.
CMSOffice2007DemoApp() | CMSOffice2007DemoApp |
ExitInstance() | CMSOffice2007DemoApp | [virtual]
InitInstance() | CMSOffice2007DemoApp | [virtual]
m_bIsRTL | CMSOffice2007DemoApp |
m_bShowDevTab | CMSOffice2007DemoApp |
m_bShowFloaty | CMSOffice2007DemoApp |
m_bShowKeyTips | CMSOffice2007DemoApp |
m_bShowToolTipDescr | CMSOffice2007DemoApp |
m_bShowToolTips | CMSOffice2007DemoApp |
m_nAppLook | CMSOffice2007DemoApp |
OnAppAbout() | CMSOffice2007DemoApp |
OnFileNew() | CMSOffice2007DemoApp |
OnFileOpen() | CMSOffice2007DemoApp |
OnOpenRecentFile(UINT nID) | CMSOffice2007DemoApp |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/searchbx.cpp Source File

  • general
  • docktool

searchbx.cpp

Go to the documentation of this file.
00001 // searchbx.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "docktool.h"
00014 #include "searchbx.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSearchBox
00023
00024 CSearchBox::CSearchBox()
00025 {
00026 }
00027
00028 CSearchBox::~CSearchBox()
00029 {
00030 }
00031
00032 BEGIN_MESSAGE_MAP(CSearchBox, CComboBox)
00033   //{{AFX_MSG_MAP(CSearchBox)
00034     // NOTE - the ClassWizard will add and remove mapping macros here.
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CSearchBox message handlers
00040
00041 BOOL CSearchBox::PreTranslateMessage(MSG* pMsg)
00042 {
00043   if ((pMsg->message != WM_KEYDOWN) || (pMsg->wParam != VK_RETURN))
00044     return CComboBox::PreTranslateMessage(pMsg);
00045
00046   // when the enter key is hit in the ComboBox we want to add the string
00047   // to the top of the list and hilight it.  We also want to limit the
00048   // list to the last 15 entries.
00049   if ((pMsg->lParam & 0x40000000) == 0)   // Not a repeat.
00050   {
00051     CString strText;
00052     GetWindowText(strText);
00053     InsertString(0, strText);
00054     SetCurSel(0);
00055     if (GetCount() > 15)
00056       DeleteString(GetCount()-1);
00057   }
00058   return TRUE;
00059 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapview.cpp Source File

  • general
  • snapvw

snapview.cpp

Go to the documentation of this file.
00001 // SnapView.cpp : implementation of the CSnapView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "SnapVw.h"
00014
00015 #include "SnapDoc.h"
00016 #include "SnapView.h"
00017 #include "BkfstPg.h"
00018 #include "LunchPg.h"
00019 #include "DinnerPg.h"
00020 #include "SnapPs.h"
00021
00022
00023 #ifdef _DEBUG
00024 #define new DEBUG_NEW
00025 #undef THIS_FILE
00026 static char THIS_FILE[] = __FILE__;
00027 #endif
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CSnapView
00031
00032 IMPLEMENT_DYNCREATE(CSnapView, CFormView)
00033
00034 BEGIN_MESSAGE_MAP(CSnapView, CFormView)
00035   //{{AFX_MSG_MAP(CSnapView)
00036   ON_WM_SIZE()
00037   //}}AFX_MSG_MAP
00038   // Standard printing commands
00039   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00040   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00041   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00042   ON_WM_ERASEBKGND()
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CSnapView construction/destruction
00047
00048 CSnapView::CSnapView() : CFormView((LPCTSTR)NULL)
00049 {
00050   //{{AFX_DATA_INIT(CSnapView)
00051     // NOTE: the ClassWizard will add member initialization here
00052   //}}AFX_DATA_INIT
00053   // TODO: add construction code here
00054
00055   m_bSizedBefore = FALSE;
00056   m_pPropSheet = NULL;
00057   m_pPageBkfst = NULL;
00058   m_pPageLunch = NULL;
00059   m_pPageDinner = NULL;
00060
00061   m_hWndFocus = NULL;
00062 }
00063
00064 CSnapView::~CSnapView()
00065 {
00066   // explicitly delete sheet and pages
00067   delete m_pPropSheet;
00068   delete m_pPageBkfst;
00069   delete m_pPageLunch;
00070   delete m_pPageDinner;
00071 }
00072
00073 void CSnapView::DoDataExchange(CDataExchange* pDX)
00074 {
00075   CFormView::DoDataExchange(pDX);
00076   //{{AFX_DATA_MAP(CSnapView)
00077     // NOTE: the ClassWizard will add DDX and DDV calls here
00078   //}}AFX_DATA_MAP
00079 }
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CSnapView printing
00083
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CSnapView diagnostics
00087
00088 #ifdef _DEBUG
00089 void CSnapView::AssertValid() const
00090 {
00091   CFormView::AssertValid();
00092 }
00093
00094 void CSnapView::Dump(CDumpContext& dc) const
00095 {
00096   CFormView::Dump(dc);
00097 }
00098
00099 CSnapDoc* CSnapView::GetDocument() // non-debug version is inline
00100 {
00101   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSnapDoc)));
00102   return (CSnapDoc*) m_pDocument;
00103 }
00104 #endif //_DEBUG
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CSnapView message handlers
00108
00109 void CSnapView::OnSize(UINT nType, int cx, int cy)
00110 {
00111   if (nType != SIZE_MINIMIZED && cx != 0 && cy != 0 && m_pPropSheet != NULL)
00112   {
00113     if (m_bSizedBefore == FALSE)
00114     {
00115       m_bSizedBefore = TRUE;
00116
00117       // get the size of the property sheet
00118       CRect rectSized;
00119       m_pPropSheet->GetWindowRect(rectSized);
00120
00121       // calculate the size of the frame
00122       CFrameWnd* pFrame = GetParentFrame();
00123       if (pFrame != NULL)
00124       {
00125         pFrame->CalcWindowRect(rectSized);
00126         CWnd* pParent = pFrame->GetParent();
00127
00128         if (pParent != NULL)
00129           pParent->ScreenToClient(rectSized);
00130
00131         // resize and reposition the frame
00132         pFrame->MoveWindow(rectSized);
00133       }
00134     }
00135   }
00136 }
00137
00138 BOOL CSnapView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
00139   DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00140 {
00141   ENSURE(pParentWnd != NULL);
00142   ASSERT_KINDOF(CFrameWnd, pParentWnd);
00143
00144   if (!CWnd::Create(lpszClassName, lpszWindowName, dwStyle | WS_CLIPCHILDREN,
00145     rect, pParentWnd, nID, pContext))
00146   {
00147     return FALSE;
00148   }
00149
00150   // add your pages here!
00151
00152   m_pPageBkfst = new CBkfstPage;
00153   m_pPageLunch = new CLunchPage;
00154   m_pPageDinner = new CDinnerPage;
00155
00156   // create the window object
00157
00158   m_pPropSheet = new CSnapPropertySheet;
00159   m_pPropSheet->AddPage(m_pPageBkfst);
00160   m_pPropSheet->AddPage(m_pPageLunch);
00161   m_pPropSheet->AddPage(m_pPageDinner);
00162
00163   // create a modeless property page
00164   if (!m_pPropSheet->Create(this,
00165       DS_CONTEXTHELP | DS_SETFONT | WS_CHILD | WS_VISIBLE))
00166   {
00167     DestroyWindow();
00168     return FALSE;
00169   }
00170
00171   m_pPropSheet->SetWindowPos(NULL, 0, 0, 0, 0,
00172       SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE);
00173
00174   // we use the style from the template - but make sure that
00175   // the WS_BORDER bit is correct.
00176   // the WS_BORDER bit will be whatever is in dwRequestedStyle
00177
00178   m_pPropSheet->ModifyStyle(WS_BORDER|WS_CAPTION,
00179     dwStyle & (WS_BORDER|WS_CAPTION));
00180
00181   // Force the size requested.
00182   // Fake a call to OnSize()--it would have been called automatically
00183   // if this were using the base class implementation of Create().
00184
00185   CFrameWnd* pParentFrame = GetParentFrame();
00186   CRect rectSize;
00187   m_pPropSheet->GetWindowRect(rectSize);
00188   pParentFrame->CalcWindowRect(rectSize);
00189   OnSize(SIZE_RESTORED, rectSize.Width(), rectSize.Height());
00190
00191   return TRUE;
00192 }
00193
00194 BOOL CSnapView::OnEraseBkgnd(CDC* pDC)
00195 {
00196   CBrush* pOldBrush;
00197
00198   CBrush backBrush;
00199   backBrush.CreateSolidBrush(::GetSysColor(COLOR_3DLIGHT));
00200   backBrush.UnrealizeObject();
00201
00202   CRect rectClient;
00203   GetClientRect(rectClient);
00204
00205   pOldBrush = pDC->SelectObject(&backBrush);
00206   pDC->Rectangle(rectClient);
00207
00208   pDC->SelectObject(pOldBrush);
00209   return TRUE;
00210 }
00211
00212 void CSnapView::OnDraw(CDC* /*pDC*/)
00213 {
00214   // we don't draw because the child window will do it all
00215 }
00216
00217 void CSnapView::OnInitialUpdate()
00218 {
00219   CFormView::OnInitialUpdate();
00220
00221   SetScaleToFitSize(CSize(1, 1));
00222 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionsPage31 Member List

This is the complete list of members for COptionsPage31, including all inherited members.
COptionsPage31() | COptionsPage31 |
DoDataExchange(CDataExchange *pDX) | COptionsPage31 | [protected, virtual]
IDD enum value | COptionsPage31 |
~COptionsPage31() | COptionsPage31 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/strlstvw.cpp Source File

  • advanced
  • collect

strlstvw.cpp

Go to the documentation of this file.
00001 // strlstvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "strlstvw.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CStringListView
00024
00025 IMPLEMENT_DYNCREATE(CStringListView, CFormView)
00026
00027 CStringListView::CStringListView()
00028   : CFormView(CStringListView::IDD)
00029 {
00030   //{{AFX_DATA_INIT(CStringListView)
00031   m_strElement = "";
00032   //}}AFX_DATA_INIT
00033 }
00034
00035 CStringListView::~CStringListView()
00036 {
00037 }
00038
00039 void CStringListView::OnInitialUpdate()
00040 {
00041   CFormView::OnInitialUpdate();
00042
00043   // Copy all of the strings from the document's CStringList
00044   // to the listbox.
00045   m_ctlList.ResetContent();
00046   CStringList& stringList = GetDocument()->m_stringList;
00047   POSITION pos = stringList.GetHeadPosition();
00048   while (pos != NULL)
00049   {
00050     CString str = stringList.GetNext(pos);
00051     m_ctlList.AddString(str);
00052   }
00053 }
00054
00055 void CStringListView::DoDataExchange(CDataExchange* pDX)
00056 {
00057   CFormView::DoDataExchange(pDX);
00058   //{{AFX_DATA_MAP(CStringListView)
00059   DDX_Control(pDX, IDC_LIST, m_ctlList);
00060   DDX_Text(pDX, IDC_ELEMENT, m_strElement);
00061   //}}AFX_DATA_MAP
00062 }
00063
00064
00065 BEGIN_MESSAGE_MAP(CStringListView, CFormView)
00066   //{{AFX_MSG_MAP(CStringListView)
00067   ON_BN_CLICKED(IDC_ADD, OnAdd)
00068   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00069   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00070   ON_BN_CLICKED(IDC_UPDATE, OnUpdateElement)
00071   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00072   ON_BN_CLICKED(IDC_INSERT_BEFORE, OnInsertBefore)
00073   //}}AFX_MSG_MAP
00074 END_MESSAGE_MAP()
00075
00076
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // CStringListView diagnostics
00080
00081 #ifdef _DEBUG
00082 void CStringListView::AssertValid() const
00083 {
00084   CFormView::AssertValid();
00085 }
00086
00087 void CStringListView::Dump(CDumpContext& dc) const
00088 {
00089   CFormView::Dump(dc);
00090 }
00091
00092 CCollectDoc* CStringListView::GetDocument() // non-debug version is inline
00093 {
00094   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00095 }
00096 #endif //_DEBUG
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CStringListView internal implementation
00100
00101 BOOL CStringListView::FindString(int& nSel, POSITION& pos)
00102 {
00103   nSel = m_ctlList.GetCurSel();
00104   if (nSel == LB_ERR)
00105   {
00106     AfxMessageBox(IDS_SELECT_STRING_FIRST);
00107     return FALSE;
00108   }
00109
00110   // The currently selected string in the listbox is the string
00111   // to be updated or removed .
00112   CString strOld;
00113   m_ctlList.GetText(nSel, strOld);
00114
00115   // Find the string to be updated or replaced in the CStringList.
00116   CStringList& stringList = GetDocument()->m_stringList;
00117   pos = stringList.Find(strOld);
00118
00119   // If the string is in the listbox, it should also be in the
00120   // CStringList.
00121   ASSERT(pos != NULL);
00122
00123   return TRUE;
00124 }
00125
00126 /////////////////////////////////////////////////////////////////////////////
00127 // CStringListView message handlers
00128
00129 void CStringListView::OnAdd()
00130 {
00131   if (UpdateData() != TRUE)
00132     return;
00133
00134   // Add new string to the CStringList
00135   GetDocument()->m_stringList.AddTail(m_strElement);
00136
00137   // Add new string to the listbox.
00138   m_ctlList.AddString(m_strElement);
00139 }
00140
00141 void CStringListView::OnInsertBefore()
00142 {
00143   if (UpdateData() != TRUE)
00144     return;
00145
00146   int nSel;
00147   POSITION pos;
00148   // Find the string in both the CStringList and in the listbox.
00149   if (FindString(nSel, pos) != TRUE)
00150     return;
00151
00152   // Insert in front of the string found in the CStringList
00153   GetDocument()->m_stringList.InsertBefore(pos, m_strElement);
00154
00155   // Insert new string in the listbox
00156   m_ctlList.InsertString(nSel, m_strElement);
00157 }
00158
00159 void CStringListView::OnUpdateElement()
00160 {
00161   if (UpdateData() != TRUE)
00162     return;
00163
00164   int nSel;
00165   POSITION pos;
00166   // Find the string in both the CStringList and in the listbox.
00167   if (FindString(nSel, pos) != TRUE)
00168     return;
00169
00170   // Replace the value of the string in the CStringList.
00171   GetDocument()->m_stringList.SetAt(pos, m_strElement);
00172
00173   // Replace the value of the string in the listbox by
00174   // removing the old string and adding the new string.
00175   m_ctlList.DeleteString(nSel);
00176   m_ctlList.InsertString(nSel, m_strElement);
00177 }
00178
00179 void CStringListView::OnRemove()
00180 {
00181   int nSel;
00182   POSITION pos;
00183   // FInd the string in both the CStringList and in the listbox.
00184   if (FindString(nSel, pos) != TRUE)
00185     return;
00186
00187   // Remove the string from the CStringList.
00188   GetDocument()->m_stringList.RemoveAt(pos);
00189
00190   // Remove the string from the listbox.
00191   m_ctlList.DeleteString(nSel);
00192 }
00193
00194 void CStringListView::OnRemoveAll()
00195 {
00196   // Remove all of the strings from the CStringList.
00197   GetDocument()->m_stringList.RemoveAll();
00198
00199   // Remove all of the strings from the listbox.
00200   m_ctlList.ResetContent();
00201 }
00202
00203
00204 void CStringListView::OnSelChangeList()
00205 {
00206   // Update the edit control to reflect the new selection
00207   // in the listbox.
00208   m_ctlList.GetText(m_ctlList.GetCurSel(), m_strElement);
00209   UpdateData(FALSE);
00210 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/StdAfx.cpp Source File

  • vc2008fp
  • SetPaneSize

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  SetPaneSize.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
00008
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/slidctrl.h Source File

  • general
  • CmnCtrl2

slidctrl.h

Go to the documentation of this file.
00001 // SlidCtrl.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CSliderCtrlPage dialog
00015 #ifndef INC_SLIDCTRL_H
00016 #define INC_SLIDCTRL_H
00017
00018 class CSliderCtrlPage : public CPropertyPage
00019 {
00020   DECLARE_DYNCREATE(CSliderCtrlPage)
00021
00022 // Construction
00023 public:
00024   CSliderCtrlPage();
00025   ~CSliderCtrlPage();
00026
00027 // Dialog Data
00028   //{{AFX_DATA(CSliderCtrlPage)
00029   enum { IDD = IDD_SLIDERCTRL };
00030   CStatic m_Notifications;
00031   BOOL    m_bAutoticks;
00032   BOOL    m_bEnablesel;
00033   BOOL    m_bFixed;
00034   UINT    m_uiLine;
00035   BOOL    m_bNothumb;
00036   BOOL    m_bNoticks;
00037   int     m_iOrientation;
00038   UINT    m_uiPage;
00039   int     m_iTickpos;
00040   UINT    m_uiRangeFrom;
00041   UINT    m_uiRangeTo;
00042   UINT    m_uiSelRangeFrom;
00043   UINT    m_uiSelRangeTo;
00044   UINT    m_uiTickFreq;
00045   //}}AFX_DATA
00046
00047   CSliderCtrl m_Slider;
00048
00049 // Overrides
00050   // ClassWizard generate virtual function overrides
00051   //{{AFX_VIRTUAL(CSliderCtrlPage)
00052   protected:
00053   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00054   virtual BOOL OnInitDialog();
00055   //}}AFX_VIRTUAL
00056
00057 // Implementation
00058 protected:
00059   void ChangeCtrlStyle(long lStyle,BOOL bSetBit=TRUE);
00060
00061   // Generated message map functions
00062   //{{AFX_MSG(CSliderCtrlPage)
00063   afx_msg void OnAutoticks();
00064   afx_msg void OnTickfreq();
00065   afx_msg void OnNoticks();
00066   afx_msg void OnNothumb();
00067   afx_msg void OnFixed();
00068   afx_msg void OnEnablesel();
00069   afx_msg void OnLine();
00070   afx_msg void OnPage();
00071   afx_msg void OnRangefrom();
00072   afx_msg void OnRangeto();
00073   afx_msg void OnOrientation();
00074   afx_msg void OnPoint();
00075   afx_msg void OnSelrangefrom();
00076   afx_msg void OnSelrangeto();
00077 //  afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00078   //}}AFX_MSG
00079   DECLARE_MESSAGE_MAP()
00080
00081 };
00082
00083 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CResourcePage Member List

This is the complete list of members for CResourcePage, including all inherited members.
CResourcePage() | CResourcePage |
DoDataExchange(CDataExchange *pDX) | CResourcePage | [protected, virtual]
IDD enum value | CResourcePage |
OnContact() | CResourcePage | [protected]
OnHome() | CResourcePage | [protected]
OnProduct() | CResourcePage | [protected]
OnSupport() | CResourcePage | [protected]
~CResourcePage() | CResourcePage |
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTaskPane Member List

This is the complete list of members for CTaskPane, including all inherited members.
CreateEditControl() | CTaskPane | [protected]
CreateTreeControl() | CTaskPane | [protected]
CreateTreeWindow() | CTaskPane | [protected]
CTaskPane() | CTaskPane |
CTaskPane() | CTaskPane |
CTaskPane() | CTaskPane |
CTasksPaneView class | CTaskPane | [friend]
m_Font | CTaskPane | [protected]
m_nDocumentsGroup | CTaskPane | [protected]
m_nUserColorGroup | CTaskPane |
m_nUserColorTask | CTaskPane |
m_wndEdit | CTaskPane | [protected]
m_wndTree | CTaskPane | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTaskPane | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTaskPane | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTaskPane | [protected]
UpdateIcons() | CTaskPane |
UpdateMRUFilesList() | CTaskPane |
UpdateMRUFilesList() | CTaskPane |
UpdateToolbar() | CTaskPane |
~CTaskPane() | CTaskPane | [virtual]
~CTaskPane() | CTaskPane | [virtual]
~CTaskPane() | CTaskPane | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/cmnctrl/SplitButtonCtrlPage.h Source File

  • controls
  • cmnctrl

SplitButtonCtrlPage.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include "commctrl.h"
00004 #include "afxwin.h"
00005
00006 // CSplitButton dialog
00007
00008 class CSplitButtonCtrlPage : public CPropertyPage
00009 {
00010   DECLARE_DYNAMIC(CSplitButtonCtrlPage)
00011
00012 public:
00013   CSplitButtonCtrlPage();
00014   virtual ~CSplitButtonCtrlPage();
00015
00016 // Dialog Data
00017   enum { IDD = IDD_SPLIT_BUTTON };
00018
00019 protected:
00020   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00021
00022 public:
00023   virtual BOOL OnInitDialog();
00024   DECLARE_MESSAGE_MAP()
00025
00026   afx_msg void OnBnClickedSetMenu1();
00027   afx_msg void OnBnClickedSetMenu2();
00028   afx_msg void OnBnClickedSetSize();
00029   afx_msg void OnLbnSelchangeListStyle();
00030   afx_msg void OnBnClickedSplitButton();
00031   afx_msg void OnBnClickedCheckState();
00032
00033 private:
00034   CSplitButton m_splitButton;
00035   CListBox m_listSplitStyle;
00036   CImageList m_image;
00037   CButton m_checkState;
00038   UINT m_xSize;
00039   UINT m_ySize;
00040 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/mainfrm.h Source File

  • general
  • docktool

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "palette.h"
00013 #include "editbar.h"
00014
00015 class CMainFrame : public CFrameWnd
00016 {
00017 protected: // create from serialization only
00018   CMainFrame();
00019   DECLARE_DYNCREATE(CMainFrame)
00020
00021 // Attributes
00022 public:
00023   BOOL m_bColor;
00024   BOOL m_bToolTips;
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CMainFrame)
00032   public:
00033   virtual BOOL PreTranslateMessage(MSG* pMsg);
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 public:
00038   virtual ~CMainFrame();
00039   void DockControlBarLeftOf(CToolBar* Bar,CToolBar* LeftOf);
00040
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:  // control bar embedded members
00047   CStatusBar  m_wndStatusBar;
00048   CToolBar    m_wndMainBar;
00049   CToolBar    m_wndResourceBar;
00050   CToolBar    m_wndDebugBar;
00051   CEditBar    m_wndEditBar;
00052   CToolBar    m_wndBrowseBar;
00053   CPaletteBar m_wndPaletteBar;
00054
00055 // Generated message map functions
00056 protected:
00057   //{{AFX_MSG(CMainFrame)
00058   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00059   afx_msg void OnToolsToolbar();
00060   afx_msg void OnMenuSelection();
00061   afx_msg void OnClose();
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
00066 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBarButton.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMCategoryBarButton.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // LinkButton.cpp: implementation of the CMSMCategoryBarButton class.
00011 //
00012 //////////////////////////////////////////////////////////////////////
00013
00014 #include "stdafx.h"
00015 #include "MSMCategoryBarButton.h"
00016 #include "MSMVisualManager.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char THIS_FILE[]=__FILE__;
00021 #define new DEBUG_NEW
00022 #endif
00023
00024 static const int nTextMargin = 3;
00025 static const int nSeparatorWidth = 8;
00026 static const CString strDummyAmpSeq = _T("\001\001");
00027
00028 IMPLEMENT_SERIAL(CMSMCategoryBarButton, CMFCToolBarButton, 1)
00029
00030 //////////////////////////////////////////////////////////////////////
00031 // Construction/Destruction
00032 //////////////////////////////////////////////////////////////////////
00033
00034 CMSMCategoryBarButton::CMSMCategoryBarButton ()
00035 {
00036   Initialize ();
00037 }
00038
00039 //***************************************************************************************
00040 CMSMCategoryBarButton::CMSMCategoryBarButton (LPCTSTR lpszLabel, UINT nID)
00041 {
00042   m_strText = lpszLabel;
00043   m_nID     = nID;
00044
00045   Initialize ();
00046 }
00047
00048 CMSMCategoryBarButton::~CMSMCategoryBarButton ()
00049 {
00050
00051 }
00052
00053 void CMSMCategoryBarButton::Initialize ()
00054 {
00055   m_bText = TRUE;
00056 }
00057
00058 void CMSMCategoryBarButton::OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00059                 BOOL bHorz, BOOL bCustomizeMode, BOOL bHighlight,
00060                 BOOL bDrawBorder, BOOL /*bGrayDisabledButtons*/)
00061 {
00062   ASSERT_VALID (pDC);
00063   ASSERT_VALID (this);
00064
00065   m_bHorz = bHorz;
00066
00067   //----------------------
00068   // Fill button interior:
00069   //----------------------
00070   FillInterior (pDC, rect, bHighlight);
00071
00072   BOOL bHot = bHighlight;
00073   CSize sizeImage = (pImages == NULL) ? CSize (0, 0) : pImages->GetImageSize (TRUE);
00074
00075   CRect rectInternal = rect;
00076
00077   CFont* pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));
00078
00079   //--------------------
00080   // Draw button's text:
00081   //--------------------
00082   CMFCVisualManager::AFX_BUTTON_STATE state = CMFCVisualManager::ButtonsIsRegular;
00083
00084   if (bHighlight)
00085   {
00086     state = CMFCVisualManager::ButtonsIsHighlighted;
00087   }
00088   else if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
00089   {
00090     //-----------------------
00091     // Pressed in or checked:
00092     //-----------------------
00093     state = CMFCVisualManager::ButtonsIsPressed;
00094   }
00095
00096   COLORREF clrText = CMFCVisualManager::GetInstance ()->GetToolbarButtonTextColor (
00097     this, state);
00098
00099   pDC->SetTextColor (clrText);
00100   CString strText = m_strText;
00101   CRect rectText = rectInternal;
00102   UINT uiTextFormat = 0;
00103
00104   rectText.top += 7;
00105   uiTextFormat = DT_SINGLELINE;
00106
00107   if (bHorz)
00108   {
00109     pDC->DrawText (strText, &rectText, uiTextFormat | DT_CENTER);
00110   }
00111
00112   pDC->SelectObject (pOldFont);
00113
00114   //--------------------
00115   // Draw button border:
00116   //--------------------
00117   if (!bCustomizeMode && HaveHotBorder () && bDrawBorder)
00118   {
00119     if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
00120     {
00121       //-----------------------
00122       // Pressed in or checked:
00123       //-----------------------
00124       CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
00125         this, rect, CMFCVisualManager::ButtonsIsPressed);
00126     }
00127     else if (bHot && !(m_nStyle & TBBS_DISABLED) &&
00128       !(m_nStyle & (TBBS_CHECKED | TBBS_INDETERMINATE)))
00129     {
00130       CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
00131         this, rect, CMFCVisualManager::ButtonsIsHighlighted);
00132     }
00133   }
00134 }
00135
00136 SIZE CMSMCategoryBarButton::OnCalculateSize (
00137                 CDC* pDC,
00138                 const CSize& sizeDefault,
00139                 BOOL bHorz)
00140 {
00141   ASSERT_VALID (pDC);
00142
00143   CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
00144     CMFCVisualManager::GetInstance ());
00145
00146   if (pManager == NULL)
00147   {
00148     return CMFCToolBarButton::OnCalculateSize (pDC, sizeDefault, bHorz);
00149   }
00150
00151   if(!IsVisible())
00152   {
00153     return CSize(0,0);
00154   }
00155
00156   CSize size = sizeDefault;
00157
00158   if ((m_nStyle & TBBS_SEPARATOR) == 0)
00159   {
00160     if (!IsDrawImage () || GetImage () < 0)
00161     {
00162       CSize sizeExtra = m_bExtraSize ?
00163         CMFCVisualManager::GetInstance ()->GetButtonExtraBorder () : CSize (0, 0);
00164
00165       if (bHorz)
00166       {
00167         size.cx = sizeExtra.cx;
00168       }
00169       else
00170       {
00171         size.cy = sizeExtra.cy;
00172       }
00173     }
00174
00175     m_sizeText = CSize (0, 0);
00176
00177     if (!m_strText.IsEmpty () && IsDrawText ())
00178     {
00179       CFont* pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));
00180
00181       CRect rectText (0, 0,
00182         sizeDefault.cx * 3, sizeDefault.cy);
00183
00184       UINT uiTextFormat = DT_CENTER | DT_CALCRECT;
00185       if (m_bWrapText)
00186       {
00187         uiTextFormat |= DT_WORDBREAK;
00188       }
00189
00190       pDC->DrawText ( m_strText, rectText, uiTextFormat);
00191       m_sizeText = rectText.Size ();
00192       m_sizeText.cx += 2 * nTextMargin;
00193
00194       size.cx = max (size.cx, m_sizeText.cx) + 6 * nTextMargin;
00195       size.cy = m_sizeText.cy + 11;
00196
00197       pDC->SelectObject (pOldFont);
00198     }
00199   }
00200
00201   return size;
00202 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEndWizardDialog Member List

This is the complete list of members for CEndWizardDialog, including all inherited members.
CEndWizardDialog() | CEndWizardDialog | [inline]
m_prev | CEndWizardDialog | [private]
SetDialog(CTaskDialog *prev) | CEndWizardDialog | [inline]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/ipframe.h Source File

  • ole
  • hiersvr

ipframe.h

Go to the documentation of this file.
00001 // ipframe.h : interface of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __AFXEXT_H__
00014 #include <afxext.h>         // for access to CToolBar and CStatusBar
00015 #endif
00016
00017 class CInPlaceFrame : public COleIPFrameWnd
00018 {
00019 protected:
00020   using COleIPFrameWnd::OnCreateControlBars;
00021
00022   DECLARE_DYNCREATE(CInPlaceFrame)
00023 public:
00024   CInPlaceFrame();
00025
00026 // Implementation
00027 public:
00028   virtual ~CInPlaceFrame();
00029 #ifdef _DEBUG
00030   virtual void AssertValid() const;
00031   virtual void Dump(CDumpContext& dc) const;
00032 #endif
00033   virtual BOOL OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* pWndDoc);
00034
00035 protected:
00036   // control bar embedded members
00037   CToolBar    m_wndToolBar;
00038   COleResizeBar   m_wndResizeBar;
00039   // for enabling drag/drop to our window
00040   COleDropTarget m_dropTarget;
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CInPlaceFrame)
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   afx_msg void OnUpdateContextHelp(CCmdUI* pCmdUI);
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCollectApp Member List

This is the complete list of members for CCollectApp, including all inherited members.
CCollectApp() | CCollectApp |
InitInstance() | CCollectApp | [virtual]
OnAppAbout() | CCollectApp |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/doctype.h Source File

  • vc2008fp
  • WordPad

doctype.h

Go to the documentation of this file.
00001 //
00002 // doctype.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define RD_WINWORD2 0
00015 #define RD_WINWORD6 1
00016 #define RD_WORDPAD 2
00017 #define RD_WRITE 3
00018 #define RD_RICHTEXT 4
00019 #define RD_TEXT 5
00020 #define RD_OEMTEXT 6
00021 #define RD_ALL 7
00022 #define RD_EXE 8
00023 #define RD_EMBEDDED 9
00024 #define NUM_DOC_TYPES 10
00025
00026 #define RD_DEFAULT RD_WORDPAD
00027 #define RD_NATIVE RD_RICHTEXT
00028
00029 typedef BOOL (*PISFORMATFUNC)(LPCSTR pszConverter, LPCSTR pszPathName);
00030 inline BOOL IsTextType(int nType) {return ((nType==RD_TEXT) || (nType==RD_OEMTEXT));}
00031
00032 struct DocType
00033 {
00034 public:
00035   int nID;
00036   int idStr;
00037   BOOL bRead;
00038   BOOL bWrite;
00039   BOOL bDup;
00040   LPCSTR pszConverterName;
00041   CString GetString(int nID);
00042 };
00043
00044 #define DOCTYPE_DOCTYPE 0
00045 #define DOCTYPE_DESC 1
00046 #define DOCTYPE_EXT 2
00047 #define DOCTYPE_PROGID 3
00048
00049 #define DECLARE_DOCTYPE(name, b1, b2, b3, p) \
00050 {RD_##name, IDS_##name##_DOC, b1, b2, b3, p}
00051 #define DECLARE_DOCTYPE_SYN(actname, name, b1, b2, b3, p) \
00052 {RD_##actname, IDS_##name##_DOC, b1, b2, b3, p}
00053 #define DECLARE_DOCTYPE_NULL(name, b1, b2, b3, p) \
00054 {RD_##name, NULL, b1, b2, b3, p}
00055
00056 extern DocType doctypes[NUM_DOC_TYPES];
00057 extern int GetDocTypeFromName(LPCTSTR pszPathName, CFileException& fe);
00058 extern void ScanForConverters();
00059 extern BOOL IsDLLInPath(LPCSTR lpszName);
00060 int GetIndexFromType(int nType, BOOL bOpen);
00061 int GetTypeFromIndex(int nType, BOOL bOpen);
00062 CString GetExtFromType(int nDocType);
00063 CString GetFileTypes(BOOL bOpen);
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRemoteCalcDlg Member List

This is the complete list of members for CRemoteCalcDlg, including all inherited members.
Button(LPCTSTR szButton) | CRemoteCalcDlg
Clear() | CRemoteCalcDlg
Close() | CRemoteCalcDlg
Display() | CRemoteCalcDlg
Evaluate() | CRemoteCalcDlg
GetAccum() | CRemoteCalcDlg
GetOperand() | CRemoteCalcDlg
GetOperation() | CRemoteCalcDlg
GetVisible() | CRemoteCalcDlg
SetAccum(long) | CRemoteCalcDlg
SetOperand(long) | CRemoteCalcDlg
SetOperation(short) | CRemoteCalcDlg
SetVisible(BOOL) | CRemoteCalcDlg
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHierSvrDocTemplate Member List

This is the complete list of members for CHierSvrDocTemplate, including all inherited members.
CHierSvrDocTemplate() | CHierSvrDocTemplate
MatchDocType(LPCTSTR lpszPathName, CDocument *&rpDocMatch) | CHierSvrDocTemplate
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localize.cpp Source File

  • controls
  • localize

localize.cpp

Go to the documentation of this file.
00001 // localize.cpp : Implementation of CLocalizeApp and DLL registration.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "localize.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char BASED_CODE THIS_FILE[] = __FILE__;
00018 #endif
00019
00020
00021 CLocalizeApp NEAR theApp;
00022
00023 const GUID CDECL BASED_CODE _tlid =
00024     { 0x879d6fe3, 0x5470, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00025 const WORD _wVerMajor = 1;
00026 const WORD _wVerMinor = 0;
00027
00028
00029 ////////////////////////////////////////////////////////////////////////////
00030 // CLocalizeApp::InitInstance - DLL initialization
00031
00032 BOOL CLocalizeApp::InitInstance()
00033 {
00034   BOOL bInit = COleControlModule::InitInstance();
00035
00036   if (bInit)
00037   {
00038     // TODO: Add your own module initialization code here.
00039   }
00040
00041   return bInit;
00042 }
00043
00044
00045 ////////////////////////////////////////////////////////////////////////////
00046 // CLocalizeApp::ExitInstance - DLL termination
00047
00048 int CLocalizeApp::ExitInstance()
00049 {
00050   // TODO: Add your own module termination code here.
00051
00052   return COleControlModule::ExitInstance();
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // DllRegisterServer - Adds entries to the system registry
00058
00059 STDAPI DllRegisterServer(void)
00060 {
00061   AFX_MANAGE_STATE(_afxModuleAddrThis);
00062
00063   if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
00064     return ResultFromScode(SELFREG_E_TYPELIB);
00065
00066   AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid, _T("localifr.tlb"));
00067   AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid, _T("localide.tlb"));
00068
00069   if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
00070     return ResultFromScode(SELFREG_E_CLASS);
00071
00072   return NOERROR;
00073 }
00074
00075
00076 /////////////////////////////////////////////////////////////////////////////
00077 // DllUnregisterServer - Removes entries from the system registry
00078
00079 STDAPI DllUnregisterServer(void)
00080 {
00081   AFX_MANAGE_STATE(_afxModuleAddrThis);
00082
00083   if (!AfxOleUnregisterTypeLib(_tlid))
00084     return ResultFromScode(SELFREG_E_TYPELIB);
00085
00086   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
00087     return ResultFromScode(SELFREG_E_CLASS);
00088
00089   return NOERROR;
00090 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoView.h Source File

  • vc2008fp
  • ToolTipDemo

TooltipDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTooltipDemoView : public CFormView
00014 {
00015 protected: // create from serialization only
00016   CTooltipDemoView();
00017   DECLARE_DYNCREATE(CTooltipDemoView)
00018
00019 public:
00020   enum { IDD = IDD_TOOLTIPDEMO_FORM };
00021   int   m_nTTType;
00022   BOOL  m_bBoldLabel;
00023   BOOL  m_bCustomColors;
00024   BOOL  m_bDrawDescription;
00025   BOOL  m_bDrawIcon;
00026   BOOL  m_bRoundedCorners;
00027   BOOL  m_bDrawSeparator;
00028   BOOL  m_bTTInPopupMenus;
00029
00030 // Attributes
00031 public:
00032   CTooltipDemoDoc* GetDocument();
00033
00034 // Operations
00035 public:
00036   public:
00037   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00038   protected:
00039   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00040   virtual void OnInitialUpdate(); // called first time after construct
00041   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00042   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00043   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00044   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00045
00046 // Implementation
00047 public:
00048   virtual ~CTooltipDemoView();
00049 #ifdef _DEBUG
00050   virtual void AssertValid() const;
00051   virtual void Dump(CDumpContext& dc) const;
00052 #endif
00053
00054 protected:
00055   afx_msg void OnApplyParams();
00056   afx_msg void OnContextMenu(CWnd*, CPoint point);
00057   afx_msg void OnFilePrintPreview();
00058
00059   DECLARE_MESSAGE_MAP()
00060
00061   void EnableControls ();
00062 };
00063
00064 #ifndef _DEBUG  // debug version in TooltipDemoView.cpp
00065 inline CTooltipDemoDoc* CTooltipDemoView::GetDocument()
00066    { return (CTooltipDemoDoc*)m_pDocument; }
00067 #endif
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/colledoc.h Source File

  • advanced
  • collect

colledoc.h

Go to the documentation of this file.
00001 // colledoc.h : interface of the CCollectDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMyStruct
00013 {
00014 // Attributes
00015 public:
00016   int m_int;
00017   float m_float;
00018   CString m_str;
00019
00020 // Operations
00021 public:
00022   void FormatMyStruct(CString& str);
00023 };
00024
00025 // Note: in order for the specialization to be accepted by the compiler
00026 //  the prototype for SerializeElements (or any other specialization)
00027 //  must be visible when the template is expanded.  It is best to place
00028 //  these declarations in the header file to avoid any unexpected
00029 //  results.
00030
00031 #if _MSC_VER > 1020
00032 template <> void AFXAPI SerializeElements<CMyStruct*>(CArchive& ar, CMyStruct** ppElements, INT_PTR nCount);
00033 #else
00034 void SerializeElements(CArchive& ar, CMyStruct** ppElements, int nCount);
00035 #endif
00036
00037 class CMyObject : public CObject
00038 {
00039 public:
00040   CMyObject();
00041   DECLARE_SERIAL(CMyObject)
00042
00043 // Attributes
00044 public:
00045   int m_int;
00046   float m_float;
00047   CString m_str;
00048
00049 // Operations
00050 public:
00051   void FormatMyObject(CString& str);
00052
00053 // Implementation
00054 public:
00055   virtual ~CMyObject();
00056   virtual void Serialize(CArchive& ar);
00057 };
00058
00059 typedef CTypedPtrList<CPtrList, CMyStruct*> CMyStructList;
00060 typedef CTypedPtrArray<CObArray,CMyObject*> CMyObjectArray;
00061 typedef CTypedPtrMap<CMapStringToOb,CString,CMyObject*> CMapStringToMyObject;
00062 typedef CMap<DWORD,DWORD,CMyStruct*,CMyStruct*&> CMapDWordToMyStruct;
00063
00064
00065 class CCollectDoc : public CDocument
00066 {
00067 protected: // create from serialization only
00068   CCollectDoc();
00069   DECLARE_DYNCREATE(CCollectDoc)
00070
00071 // Attributes
00072 public:
00073   CStringList m_stringList;
00074   CMyStructList m_mystructList;
00075   CList<int,int> m_intList;
00076   CDWordArray m_dwArray;
00077   CMyObjectArray m_myobArray;
00078   CArray<CPoint,CPoint> m_ptArray;
00079   CMapStringToString m_mapStringToString;
00080   CMapStringToMyObject m_mapStringToMyObject;
00081   CMapDWordToMyStruct m_mapDWordToMyStruct;
00082
00083
00084 // Operations
00085
00086 // Overrides
00087   virtual void DeleteContents();
00088   // ClassWizard generate virtual function overrides
00089   //{{AFX_VIRTUAL(CCollectDoc)
00090   protected:
00091   virtual BOOL OnNewDocument();
00092   //}}AFX_VIRTUAL
00093
00094 // Implementation
00095 public:
00096   virtual ~CCollectDoc();
00097   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00098 #ifdef _DEBUG
00099   virtual void AssertValid() const;
00100   virtual void Dump(CDumpContext& dc) const;
00101 #endif
00102
00103 protected:
00104
00105 // Generated message map functions
00106 protected:
00107   //{{AFX_MSG(CCollectDoc)
00108   //}}AFX_MSG
00109   DECLARE_MESSAGE_MAP()
00110 };
00111
00112 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ScrMngr.Cpp Source File

  • ole
  • TstCon

ScrMngr.Cpp

Go to the documentation of this file.
00001 // File: ScrMngr.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019
00020 IMPLEMENT_DYNAMIC( CScriptManager, CObject );
00021
00022 CScriptManager::CScriptManager( CTestContainer98Doc* pDoc ) :
00023    m_pDoc( pDoc )
00024 {
00025    ASSERT( m_pDoc != NULL );
00026 }
00027
00028 CScriptManager::~CScriptManager()
00029 {
00030    CScript* pScript;
00031    IDispatch* pDispatch;
00032    POSITION posNamedItem;
00033    CString strItemName;
00034
00035    while( !m_lpScripts.IsEmpty() )
00036    {
00037     pScript = m_lpScripts.RemoveHead();
00038     delete pScript;
00039    }
00040
00041    posNamedItem = m_mapNamedItems.GetStartPosition();
00042    while( posNamedItem != NULL )
00043    {
00044     m_mapNamedItems.GetNextAssoc( posNamedItem, strItemName, pDispatch );
00045     pDispatch->Release();
00046    }
00047 }
00048
00049 HRESULT CScriptManager::AddNamedItem( LPCTSTR pszItemName,
00050    IDispatch* pDispatch )
00051 {
00052
00053    POSITION posScript;
00054    CScript* pScript;
00055    HRESULT hResult;
00056
00057    m_mapNamedItems.SetAt( pszItemName, pDispatch );
00058    pDispatch->AddRef();
00059
00060    CT2COLE pszItemNameO( pszItemName );
00061    posScript = GetFirstScriptPosition();
00062    while( posScript != NULL )
00063    {
00064     pScript = GetNextScript( posScript );
00065     ENSURE( pScript != NULL );
00066     hResult = pScript->AddNamedItem( pszItemName );
00067     if( FAILED( hResult ) )
00068     {
00069      return( hResult );
00070     }
00071    }
00072
00073    return( S_OK );
00074 }
00075
00076 HRESULT CScriptManager::AddNamedItems( IActiveScript* pScript )
00077 {
00078    HRESULT hResult;
00079    POSITION posNamedItem;
00080    IDispatch* pDispatch;
00081    CString strItemName;
00082    BSTR bstrItemName;
00083
00084    ENSURE( pScript != NULL );
00085
00086    hResult = pScript->AddNamedItem( L"TCForm", SCRIPTITEM_ISVISIBLE|
00087     SCRIPTITEM_ISSOURCE );
00088    if( FAILED( hResult ) )
00089    {
00090     return( hResult );
00091    }
00092
00093    posNamedItem = m_mapNamedItems.GetStartPosition();
00094    while( posNamedItem != NULL )
00095    {
00096     m_mapNamedItems.GetNextAssoc( posNamedItem, strItemName, pDispatch );
00097     bstrItemName = strItemName.AllocSysString();
00098     hResult = pScript->AddNamedItem( bstrItemName, SCRIPTITEM_ISVISIBLE|
00099      SCRIPTITEM_ISSOURCE );
00100     SysFreeString( bstrItemName );
00101     if( FAILED( hResult ) )
00102     {
00103      return( hResult );
00104     }
00105    }
00106
00107    return( S_OK );
00108 }
00109
00110 CScript* CScriptManager::FindMacro( LPCTSTR pszMacroName )
00111 {
00112    POSITION posScript;
00113    CScript* pScript;
00114
00115    ASSERT( pszMacroName != NULL );
00116
00117    posScript = GetFirstScriptPosition();
00118    while( posScript != NULL )
00119    {
00120     pScript = GetNextScript( posScript );
00121     if( pScript->FindMacro( pszMacroName ) )
00122     {
00123      return( pScript );
00124     }
00125    }
00126
00127    return( NULL );
00128 }
00129
00130 POSITION CScriptManager::GetFirstScriptPosition() const
00131 {
00132    return( m_lpScripts.GetHeadPosition() );
00133 }
00134
00135 HRESULT CScriptManager::GetItemDispatch( LPCTSTR pszItemName,
00136    IUnknown** ppDispatch )
00137 {
00138    IDispatch* pDispatch;
00139    BOOL tFound;
00140
00141    ENSURE( pszItemName != NULL );
00142    ENSURE( ppDispatch != NULL );
00143
00144    *ppDispatch = NULL;
00145
00146    if( strcmp( pszItemName, "TCForm" ) == 0 )
00147    {
00148     *ppDispatch = m_pDoc->GetIDispatch( TRUE );
00149     return( S_OK );
00150    }
00151    else
00152    {
00153     tFound = m_mapNamedItems.Lookup( pszItemName, pDispatch );
00154     if( tFound )
00155     {
00156      *ppDispatch = pDispatch;
00157      (*ppDispatch)->AddRef();
00158      return( S_OK );
00159     }
00160    }
00161
00162    return( TYPE_E_ELEMENTNOTFOUND );
00163 }
00164
00165 HRESULT CScriptManager::GetItemTypeInfo( LPCTSTR pszItemName,
00166    ITypeInfo** ppTypeInfo )
00167 {
00168    IProvideClassInfoPtr pProvideClassInfo;
00169    IDispatch* pDispatch;
00170    HRESULT hResult;
00171    BOOL tFound;
00172
00173    ENSURE( pszItemName != NULL );
00174    ENSURE( ppTypeInfo != NULL );
00175
00176    *ppTypeInfo = NULL;
00177
00178    if( strcmp( pszItemName, "TCForm" ) == 0 )
00179    {
00180     hResult = m_pDoc->GetTypeInfoOfGuid( GetUserDefaultLCID(),
00181      __uuidof( Document ), ppTypeInfo );
00182     if( SUCCEEDED( hResult ) )
00183     {
00184      return( S_OK );
00185     }
00186    }
00187    else
00188    {
00189     tFound = m_mapNamedItems.Lookup( pszItemName, pDispatch );
00190     if( tFound )
00191     {
00192      pProvideClassInfo = pDispatch;
00193      if( pProvideClassInfo != NULL )
00194      {
00195       hResult = pProvideClassInfo->GetClassInfo( ppTypeInfo );
00196       if( SUCCEEDED( hResult ) )
00197       {
00198          return( S_OK );
00199       }
00200      }
00201     }
00202    }
00203
00204    return( TYPE_E_ELEMENTNOTFOUND );
00205 }
00206
00207 CScript* CScriptManager::GetNextScript( POSITION& posScript )
00208 {
00209    return( m_lpScripts.GetNext( posScript ) );
00210 }
00211
00212 int CScriptManager::GetNumScripts() const
00213 {
00214    return( (int)m_lpScripts.GetCount() );
00215 }
00216
00217 HRESULT CScriptManager::LoadScript( LPCTSTR pszFileName,
00218    LPCTSTR pszScriptName, CScript** ppScript )
00219 {
00220    CScript* pScript;
00221    HRESULT hResult;
00222    POSITION posScript;
00223
00224    ASSERT( pszFileName != NULL );
00225    ASSERT( pszScriptName != NULL );
00226
00227    if( ppScript != NULL )
00228    {
00229     *ppScript = NULL;
00230    }
00231
00232    pScript = new CScript( this );
00233    if( pScript == NULL )
00234    {
00235     return( E_OUTOFMEMORY );
00236    }
00237
00238    posScript = m_lpScripts.AddHead( pScript );
00239
00240    hResult = pScript->LoadScript( pszFileName, pszScriptName );
00241    if( FAILED( hResult ) )
00242    {
00243     m_lpScripts.RemoveAt( posScript );
00244     delete pScript;
00245     return( hResult );
00246    }
00247
00248    if( ppScript != NULL )
00249    {
00250     *ppScript = pScript;
00251    }
00252
00253    return( S_OK );
00254 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStartView Member List

This is the complete list of members for CStartView, including all inherited members.
CStartView() | CStartView | [protected]
m_Image | CStartView |
OnDisableUpdate(CCmdUI *pCmdUI) | CStartView | [protected]
OnDraw(CDC *pDC) | CStartView | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CStartView | [protected]
OnInitialUpdate() | CStartView | [virtual]
~CStartView() | CStartView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/mainfrm.h Source File

  • advanced
  • cube

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CFrameWnd
00013 {
00014 protected: // create from serialization only
00015   CMainFrame();
00016   DECLARE_DYNCREATE(CMainFrame)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CMainFrame)
00027   protected:
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CToolBar    m_wndToolBar;
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CMainFrame)
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00047   afx_msg BOOL OnQueryNewPalette();
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/ChildFrm.cpp Source File

  • vc2008fp
  • RibbonMDI

ChildFrm.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonMDIDemo.h"
00014
00015 #include "ChildFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CChildFrame
00025
00026 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWndEx)
00027
00028 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWndEx)
00029   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00030   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00031   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00032   ON_COMMAND(ID_EDIT_PASTE_SPECIAL, OnEditPasteSpecial)
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CChildFrame construction/destruction
00037
00038 CChildFrame::CChildFrame()
00039 {
00040   // TODO: add member initialization code here
00041
00042 }
00043
00044 CChildFrame::~CChildFrame()
00045 {
00046 }
00047
00048 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00049 {
00050   // TODO: Modify the Window class or styles here by modifying
00051   //  the CREATESTRUCT cs
00052
00053   if( !CMDIChildWndEx::PreCreateWindow(cs) )
00054     return FALSE;
00055
00056   cs.style &= ~WS_SYSMENU;
00057
00058   return TRUE;
00059 }
00060
00061 void CChildFrame::ActivateFrame(int nCmdShow)
00062 {
00063   // TODO: Modify this function to change how the frame is activated.
00064
00065   nCmdShow = SW_SHOWMAXIMIZED;
00066   CMDIChildWndEx::ActivateFrame(nCmdShow);
00067 }
00068
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CChildFrame diagnostics
00072
00073 #ifdef _DEBUG
00074 void CChildFrame::AssertValid() const
00075 {
00076   CMDIChildWndEx::AssertValid();
00077 }
00078
00079 void CChildFrame::Dump(CDumpContext& dc) const
00080 {
00081   CMDIChildWndEx::Dump(dc);
00082 }
00083
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CChildFrame message handlers
00088
00089 void CChildFrame::OnEditCopy()
00090 {
00091   // TODO: Add your command handler code here
00092
00093 }
00094
00095 void CChildFrame::OnEditCut()
00096 {
00097   // TODO: Add your command handler code here
00098
00099 }
00100
00101 void CChildFrame::OnEditPaste()
00102 {
00103   // TODO: Add your command handler code here
00104
00105 }
00106
00107 void CChildFrame::OnEditPasteSpecial()
00108 {
00109   // TODO: Add your command handler code here
00110
00111 }
00112
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mdichild.h Source File

  • general
  • dynamenu

mdichild.h

Go to the documentation of this file.
00001 // mdichild.h
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: interface of the CDynaMDIChildWnd class
00013 //
00014 // Functions:
00015 //   Most of this file was generated by AppWizard.  The functions
00016 //   which contain code specific to this sample are:
00017 //
00018 //      CDynaMDIChildWnd::OnMDIActivate()    -- handle activation/deactivation
00019 //      CDynaMDIChildWnd::RefreshColorMenu() -- update Color submenu contents
00020 //
00021 //   These functions are implemented in mdichild.cpp.
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CDynaMDIChildWnd frame
00025
00026 class CDynaMDIChildWnd : public CMDIChildWnd
00027 {
00028   DECLARE_DYNCREATE(CDynaMDIChildWnd)
00029 protected:
00030   CDynaMDIChildWnd();         // protected constructor used by dynamic creation
00031
00032 // Attributes
00033 public:
00034
00035 // Operations
00036 public:
00037   void RefreshColorMenu();
00038
00039 // Implementation
00040 protected:
00041   virtual ~CDynaMDIChildWnd();
00042
00043   // Generated message map functions
00044   //{{AFX_MSG(CDynaMDIChildWnd)
00045   afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMapInfo Member List

This is the complete list of members for CMapInfo, including all inherited members.
dwAddTo | CMapInfo
pszPrefixFrom | CMapInfo
pszPrefixTo | CMapInfo
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/stdafx.cpp Source File

  • general
  • tracker

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/docopt.h Source File

  • ole
  • wordpad

docopt.h

Go to the documentation of this file.
00001 // docopt.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CDocOptPage dialog
00014
00015 class CDocOptPage : public CCSPropertyPage
00016 {
00017 // Construction
00018 public:
00019   CDocOptPage();
00020   CDocOptPage(UINT nIDCaption);
00021   ~CDocOptPage();
00022
00023 // Dialog Data
00024   //{{AFX_DATA(CDocOptPage)
00025   enum { IDD = IDD_OPTIONS_WRAP };
00026   int     m_nWordWrap;
00027   BOOL    m_bFormatBar;
00028   BOOL    m_bRulerBar;
00029   BOOL    m_bStatusBar;
00030   BOOL    m_bToolBar;
00031   //}}AFX_DATA
00032
00033
00034 // Overrides
00035   static const DWORD m_nHelpIDs[];
00036   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00037   // ClassWizard generate virtual function overrides
00038   //{{AFX_VIRTUAL(CDocOptPage)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 protected:
00045   // Generated message map functions
00046   //{{AFX_MSG(CDocOptPage)
00047     // NOTE: the ClassWizard will add member functions here
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050
00051 };
00052
00053 class CEmbeddedOptPage : public CDocOptPage
00054 {
00055 // Construction
00056 public:
00057   CEmbeddedOptPage();
00058 // Overrides
00059   BOOL OnInitDialog();
00060 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/AppLookDlg.cpp Source File

  • vc2008fp
  • WordPad

AppLookDlg.cpp

Go to the documentation of this file.
00001 //
00002 // AppLookDlg.cpp : implementation file
00003 //
00004
00005 #include "stdafx.h"
00006 #include "wordpad.h"
00007 #include "AppLookDlg.h"
00008 #include "mainfrm.h"
00009
00010 #ifdef _DEBUG
00011 #define new DEBUG_NEW
00012 #undef THIS_FILE
00013 static char THIS_FILE[] = __FILE__;
00014 #endif
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CAppLookDlg dialog
00018
00019 CAppLookDlg::CAppLookDlg(BOOL bStartup, CWnd* pParent /*=NULL*/)
00020   : CDialog(CAppLookDlg::IDD, pParent),
00021   m_bStartup (bStartup)
00022 {
00023   //{{AFX_DATA_INIT(CAppLookDlg)
00024   m_nAppLook = 1;
00025   m_bShowAtStartup = FALSE;
00026   m_nStyle2007 = 0;
00027   //}}AFX_DATA_INIT
00028
00029   m_nAppLook = theApp.GetInt (_T("AppLook"), 1);
00030   m_bShowAtStartup = theApp.GetInt (_T("ShowAppLookAtStartup"), TRUE);
00031   m_nStyle2007 = theApp.GetInt (_T("Style2007"), 0);
00032
00033   theApp.m_bHiColorIcons = m_nAppLook == 1 || m_nAppLook == 2;
00034 }
00035
00036
00037 void CAppLookDlg::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CDialog::DoDataExchange(pDX);
00040   //{{AFX_DATA_MAP(CAppLookDlg)
00041   DDX_Control(pDX, IDC_STYLE2007, m_wndStyle2007);
00042   DDX_Control(pDX, IDOK, m_wndOK);
00043   DDX_Control(pDX, IDCANCEL, m_wndCancel);
00044   DDX_Radio(pDX, IDC_APP_LOOK1, m_nAppLook);
00045   DDX_Check(pDX, IDC_SHOW_AT_STARTUP, m_bShowAtStartup);
00046   DDX_CBIndex(pDX, IDC_STYLE2007, m_nStyle2007);
00047   //}}AFX_DATA_MAP
00048 }
00049
00050
00051 BEGIN_MESSAGE_MAP(CAppLookDlg, CDialog)
00052   //{{AFX_MSG_MAP(CAppLookDlg)
00053   ON_BN_CLICKED(IDC_APPLY, OnApply)
00054   ON_BN_CLICKED(IDC_APP_LOOK1, OnAppLook)
00055   ON_BN_CLICKED(IDC_APP_LOOK2, OnAppLook)
00056   ON_BN_CLICKED(IDC_APP_LOOK3, OnAppLook)
00057   //}}AFX_MSG_MAP
00058 END_MESSAGE_MAP()
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CAppLookDlg message handlers
00062
00063 BOOL CAppLookDlg::OnInitDialog()
00064 {
00065   CDialog::OnInitDialog();
00066
00067   if (m_bStartup)
00068   {
00069     SetLook ();
00070
00071     if (!m_bShowAtStartup)
00072     {
00073       EndDialog (IDCANCEL);
00074       return TRUE;
00075     }
00076
00077     CRect rectBtn;
00078
00079     // Hide "Cancel" button:
00080     m_wndCancel.GetWindowRect (rectBtn);
00081     ScreenToClient (rectBtn);
00082
00083     m_wndOK.MoveWindow (rectBtn);
00084
00085     m_wndCancel.ShowWindow (SW_HIDE);
00086   }
00087
00088   m_wndStyle2007.EnableWindow (m_nAppLook == 2);
00089
00090   return TRUE;  // return TRUE unless you set the focus to a control
00091                 // EXCEPTION: OCX Property Pages should return FALSE
00092 }
00093
00094 void CAppLookDlg::OnOK()
00095 {
00096   CDialog::OnOK();
00097   SetLook ();
00098 }
00099
00100 void CAppLookDlg::OnApply()
00101 {
00102   SetLook ();
00103
00104   if (!m_bStartup)
00105   {
00106     m_wndCancel.SetWindowText (_T("Close"));
00107   }
00108 }
00109
00110 void CAppLookDlg::SetLook ()
00111 {
00112   UpdateData ();
00113
00114   switch (m_nAppLook)
00115   {
00116   case 0:
00117     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00118     break;
00119
00120   case 1:
00121     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00122     break;
00123
00124   case 2:
00125     switch (m_nStyle2007)
00126     {
00127     case 0:
00128       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_LunaBlue);
00129       break;
00130
00131     case 1:
00132       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
00133       break;
00134
00135     case 2:
00136       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Aqua);
00137       break;
00138
00139     case 3:
00140       CMFCVisualManagerOffice2007::SetStyle (CMFCVisualManagerOffice2007::Office2007_Silver);
00141       break;
00142     }
00143
00144     CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2007));
00145     break;
00146   }
00147
00148   theApp.WriteInt (_T("AppLook"), m_nAppLook);
00149   theApp.WriteInt (_T("Style2007"), m_nStyle2007);
00150   theApp.WriteInt (_T("ShowAppLookAtStartup"), m_bShowAtStartup);
00151
00152   theApp.m_bHiColorIcons = m_nAppLook == 1 || m_nAppLook == 2;
00153
00154   CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd ());
00155   if (pMainFrame != NULL)
00156   {
00157     pMainFrame->OnChangeLook ();
00158   }
00159 }
00160
00161 void CAppLookDlg::OnAppLook()
00162 {
00163   UpdateData ();
00164
00165   m_wndStyle2007.EnableWindow (m_nAppLook == 2);
00166 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/mutexdlg.cpp Source File

  • advanced
  • mutexes

mutexdlg.cpp

Go to the documentation of this file.
00001 // mutexesDlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // This sample application is derived from the Mutex application
00013 // distributed with Jeffrey Richter's "Advanced Windows" programming book
00014 // (Microsoft Press).  See the book for more information about Win32
00015 // programming topics, including thread synchronization.
00016
00017 #include "stdafx.h"
00018 #include "mutexes.h"
00019 #include "mutexdlg.h"
00020 #include "threads.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 #define MAX_DIGITS 6000
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CAboutDlg dialog used for App About
00030
00031 class CAboutDlg : public CDialog
00032 {
00033 public:
00034   CAboutDlg();
00035
00036 // Dialog Data
00037   //{{AFX_DATA(CAboutDlg)
00038   enum { IDD = IDD_ABOUTBOX };
00039   //}}AFX_DATA
00040
00041 // Implementation
00042 protected:
00043   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00044   //{{AFX_MSG(CAboutDlg)
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00050 {
00051   //{{AFX_DATA_INIT(CAboutDlg)
00052   //}}AFX_DATA_INIT
00053 }
00054
00055 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00056 {
00057   CDialog::DoDataExchange(pDX);
00058   //{{AFX_DATA_MAP(CAboutDlg)
00059   //}}AFX_DATA_MAP
00060 }
00061
00062 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00063   //{{AFX_MSG_MAP(CAboutDlg)
00064     // No message handlers
00065   //}}AFX_MSG_MAP
00066 END_MESSAGE_MAP()
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CMutexesDlg dialog
00070
00071 CMutexesDlg::CMutexesDlg(CWnd* pParent /*=NULL*/)
00072   : CDialog(CMutexesDlg::IDD, pParent),
00073    m_mutex(FALSE, NULL)
00074 {
00075   //{{AFX_DATA_INIT(CMutexesDlg)
00076     // NOTE: the ClassWizard will add member initialization here
00077   //}}AFX_DATA_INIT
00078   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00079   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00080
00081   m_pCounterThread = NULL;
00082   m_pDisplayThread = NULL;
00083   //Preallocate and lock large buffer to avoid MT problems:
00084   //CString is used without locking and reallocs by CounterThread, when
00085   //DisplayThread tries to access the freed buffer.
00086   m_strNumber.Preallocate(MAX_DIGITS);
00087   m_strNumber.LockBuffer();
00088   m_strNumber="0";
00089
00090 }
00091 CMutexesDlg::~CMutexesDlg()
00092 {
00093   m_strNumber.UnlockBuffer();
00094 }
00095 void CMutexesDlg::DoDataExchange(CDataExchange* pDX)
00096 {
00097   CDialog::DoDataExchange(pDX);
00098   //{{AFX_DATA_MAP(CMutexesDlg)
00099     // NOTE: the ClassWizard will add DDX and DDV calls here
00100   //}}AFX_DATA_MAP
00101 }
00102
00103 BEGIN_MESSAGE_MAP(CMutexesDlg, CDialog)
00104   //{{AFX_MSG_MAP(CMutexesDlg)
00105   ON_WM_SYSCOMMAND()
00106   ON_WM_PAINT()
00107   ON_WM_QUERYDRAGICON()
00108   ON_CBN_SELCHANGE(IDC_PRIORITYCLASS, OnPriorityClassChange)
00109   ON_CBN_SELCHANGE(IDC_CNTRTHRDPRIORITY, OnPriorityChangeCntr)
00110   ON_CBN_SELCHANGE(IDC_DSPYTHRDPRIORITY, OnPriorityChangeDisp)
00111   ON_WM_CLOSE()
00112   ON_BN_CLICKED(IDC_PAUSE, OnPause)
00113   //}}AFX_MSG_MAP
00114 END_MESSAGE_MAP()
00115
00116
00117 /////////////////////////////////////////////////////////////////////////////
00118 // CMutexesDlg message handlers
00119
00120 BOOL CMutexesDlg::OnInitDialog()
00121 {
00122   CDialog::OnInitDialog();
00123
00124   // Add "About..." menu item to system menu.
00125
00126   // IDM_ABOUTBOX must be in the system command range.
00127   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00128   ASSERT(IDM_ABOUTBOX < 0xF000);
00129
00130   CMenu* pSysMenu = GetSystemMenu(FALSE);
00131   CString strAboutMenu;
00132   strAboutMenu.LoadString(IDS_ABOUTBOX);
00133   if (!strAboutMenu.IsEmpty())
00134   {
00135     pSysMenu->AppendMenu(MF_SEPARATOR);
00136     pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00137   }
00138
00139   // Fill the Process Priority Class combo box and select
00140   // Normal.
00141
00142   CComboBox* pBox;
00143   pBox = (CComboBox*) GetDlgItem(IDC_PRIORITYCLASS);
00144
00145   ASSERT(pBox != NULL);
00146   if (pBox != NULL)
00147   {
00148     pBox->AddString(_T("Idle"));
00149     pBox->AddString(_T("Normal"));
00150     pBox->AddString(_T("High"));
00151     pBox->AddString(_T("Realtime"));
00152     pBox->SetCurSel(1); // Normal
00153   }
00154
00155   // Fill the Display Thread Priority
00156   // combo box and select Normal.
00157
00158   pBox = (CComboBox*) GetDlgItem(IDC_DSPYTHRDPRIORITY);
00159   ASSERT(pBox != NULL);
00160   if (pBox != NULL)
00161   {
00162     pBox->AddString(_T("Idle"));
00163     pBox->AddString(_T("Lowest"));
00164     pBox->AddString(_T("Below normal"));
00165     pBox->AddString(_T("Normal"));
00166     pBox->AddString(_T("Above normal"));
00167     pBox->AddString(_T("Highest"));
00168     pBox->AddString(_T("Timecritical"));
00169     pBox->SetCurSel(3);  // Normal
00170   }
00171
00172   // Fill the Counter Thread Priority
00173   // combo box and select Normal.
00174
00175   pBox = (CComboBox*) GetDlgItem(IDC_CNTRTHRDPRIORITY);
00176   ASSERT(pBox != NULL);
00177   if (pBox != NULL)
00178   {
00179     pBox->AddString(_T("Idle"));
00180     pBox->AddString(_T("Lowest"));
00181     pBox->AddString(_T("Below normal"));
00182     pBox->AddString(_T("Normal"));
00183     pBox->AddString(_T("Above normal"));
00184     pBox->AddString(_T("Highest"));
00185     pBox->AddString(_T("Timecritical"));
00186     pBox->SetCurSel(3);  // Normal
00187   }
00188
00189   // initialize the threads and let them start running!
00190
00191   m_pDisplayThread = (CDisplayThread*)
00192     AfxBeginThread(RUNTIME_CLASS(CDisplayThread), THREAD_PRIORITY_NORMAL,
00193       0, CREATE_SUSPENDED);
00194   m_pDisplayThread->SetOwner(this);
00195   m_pDisplayThread->ResumeThread();
00196
00197   m_pCounterThread = (CCounterThread*)
00198     AfxBeginThread(RUNTIME_CLASS(CCounterThread), THREAD_PRIORITY_NORMAL,
00199       0, CREATE_SUSPENDED);
00200   m_pCounterThread->SetOwner(this);
00201   m_pCounterThread->ResumeThread();
00202
00203   return TRUE;  // return TRUE  unless you set the focus to a control
00204 }
00205
00206 void CMutexesDlg::OnSysCommand(UINT nID, LPARAM lParam)
00207 {
00208   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00209   {
00210     CAboutDlg dlgAbout;
00211     dlgAbout.DoModal();
00212   }
00213   else
00214   {
00215     CDialog::OnSysCommand(nID, lParam);
00216   }
00217 }
00218
00219 // If you add a minimize button to your dialog, you will need the code below
00220 //  to draw the icon.  For MFC applications using the document/view model,
00221 //  this is automatically done for you by the framework.
00222
00223 void CMutexesDlg::OnPaint()
00224 {
00225   if (IsIconic())
00226   {
00227     CPaintDC dc(this); // device context for painting
00228
00229     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00230
00231     // Center icon in client rectangle
00232     int cxIcon = GetSystemMetrics(SM_CXICON);
00233     int cyIcon = GetSystemMetrics(SM_CYICON);
00234     CRect rect;
00235     GetClientRect(&rect);
00236     int x = (rect.Width() - cxIcon + 1) / 2;
00237     int y = (rect.Height() - cyIcon + 1) / 2;
00238
00239     // Draw the icon
00240     dc.DrawIcon(x, y, m_hIcon);
00241   }
00242   else
00243   {
00244     CDialog::OnPaint();
00245   }
00246 }
00247
00248 // The system calls this to obtain the cursor to display while the user drags
00249 //  the minimized window.
00250 HCURSOR CMutexesDlg::OnQueryDragIcon()
00251 {
00252   return (HCURSOR) m_hIcon;
00253 }
00254
00255 void CMutexesDlg::AddToListBox(LPCTSTR szBuffer)
00256 {
00257   CListBox* pBox = (CListBox*) GetDlgItem(IDC_DATABOX);
00258   ASSERT(pBox != NULL);
00259
00260   if (pBox != NULL)
00261   {
00262     int x = pBox->AddString(szBuffer);
00263     pBox->SetCurSel(x);
00264
00265     if (pBox->GetCount() > 100)
00266       pBox->DeleteString(0);
00267   }
00268 }
00269
00270 void CMutexesDlg::OnClose()
00271 {
00272   int nCount = 0;
00273   DWORD   dwStatus;
00274
00275   CButton* pCheck = (CButton*) GetDlgItem(IDC_PAUSE);
00276   BOOL bPaused = ((pCheck->GetState() & 0x003) != 0);
00277
00278   if (bPaused == TRUE)
00279   {
00280     pCheck->SetCheck(0);
00281     m_pCounterThread->ResumeThread();
00282     m_pDisplayThread->ResumeThread();
00283   }
00284
00285   if (m_pCounterThread != NULL)
00286   {
00287     VERIFY(::GetExitCodeThread(m_pCounterThread->m_hThread, &dwStatus));
00288     if (dwStatus == STILL_ACTIVE)
00289     {
00290       nCount++;
00291       m_pCounterThread->m_bDone = TRUE;
00292     }
00293     else
00294     {
00295       delete m_pCounterThread;
00296       m_pCounterThread = NULL;
00297     }
00298   }
00299
00300   if (m_pDisplayThread != NULL)
00301   {
00302     VERIFY(::GetExitCodeThread(m_pDisplayThread->m_hThread, &dwStatus));
00303     if (dwStatus == STILL_ACTIVE)
00304     {
00305       nCount++;
00306       m_pDisplayThread->m_bDone = TRUE;
00307     }
00308     else
00309     {
00310       delete m_pDisplayThread;
00311       m_pDisplayThread = NULL;
00312     }
00313   }
00314
00315   if (nCount == 0)
00316     CDialog::OnClose();
00317   else
00318     PostMessage(WM_CLOSE, 0, 0);
00319 }
00320
00321 void CMutexesDlg::OnPriorityClassChange()
00322 {
00323   DWORD dw;
00324   CComboBox* pBox = (CComboBox*) GetDlgItem(IDC_PRIORITYCLASS);
00325   int nCurSel = pBox->GetCurSel();
00326
00327   switch (nCurSel)
00328   {
00329   case 0:
00330     dw = IDLE_PRIORITY_CLASS;
00331     break;
00332
00333   case 1:
00334   default:
00335     dw = NORMAL_PRIORITY_CLASS;
00336     break;
00337
00338   case 2:
00339     dw = HIGH_PRIORITY_CLASS;
00340     break;
00341
00342   case 3:
00343     dw = REALTIME_PRIORITY_CLASS;
00344     break;
00345   }
00346
00347   SetPriorityClass(GetCurrentProcess(), dw);
00348 }
00349
00350 void CMutexesDlg::OnPriorityChangeDisp()
00351 {
00352   OnPriorityChange(IDC_DSPYTHRDPRIORITY);
00353 }
00354
00355 void CMutexesDlg::OnPriorityChangeCntr()
00356 {
00357   OnPriorityChange(IDC_CNTRTHRDPRIORITY);
00358 }
00359
00360 void CMutexesDlg::OnPriorityChange(UINT nID)
00361 {
00362   ASSERT(nID == IDC_CNTRTHRDPRIORITY || nID == IDC_DSPYTHRDPRIORITY);
00363
00364   DWORD dw;
00365   CComboBox* pBox = (CComboBox*) GetDlgItem(nID);
00366   int nCurSel = pBox->GetCurSel();
00367
00368   switch (nCurSel)
00369   {
00370   case 0:
00371     dw = (DWORD) THREAD_PRIORITY_IDLE;
00372     break;
00373
00374   case 1:
00375     dw = (DWORD) THREAD_PRIORITY_LOWEST;
00376     break;
00377
00378   case 2:
00379     dw = (DWORD) THREAD_PRIORITY_BELOW_NORMAL;
00380     break;
00381
00382   case 3:
00383   default:
00384     dw = (DWORD) THREAD_PRIORITY_NORMAL;
00385     break;
00386
00387   case 4:
00388     dw = (DWORD) THREAD_PRIORITY_ABOVE_NORMAL;
00389     break;
00390
00391   case 5:
00392     dw = (DWORD) THREAD_PRIORITY_HIGHEST;
00393     break;
00394
00395   case 6:
00396     dw = (DWORD) THREAD_PRIORITY_TIME_CRITICAL;
00397     break;
00398   }
00399
00400   if (nID == IDC_CNTRTHRDPRIORITY)
00401     m_pCounterThread->SetThreadPriority(dw);
00402   else
00403     m_pDisplayThread->SetThreadPriority(dw);
00404 }
00405
00406 void CMutexesDlg::OnPause()
00407 {
00408   CButton* pCheck = (CButton*) GetDlgItem(IDC_PAUSE);
00409   BOOL bPaused = ((pCheck->GetState() & 0x003) != 0);
00410
00411   if (bPaused)
00412   {
00413     m_pCounterThread->SuspendThread();
00414     m_pDisplayThread->SuspendThread();
00415   }
00416   else
00417   {
00418     m_pCounterThread->ResumeThread();
00419     m_pDisplayThread->ResumeThread();
00420   }
00421 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLinkButton Member List

This is the complete list of members for CLinkButton, including all inherited members.
CLinkButton() | CLinkButton |
CLinkButton(LPCTSTR lpszLabel, LPCTSTR lpszURL) | CLinkButton |
CopyFrom(const CMFCToolBarButton &src) | CLinkButton | [protected, virtual]
GetURL() const | CLinkButton | [inline]
Initialize() | CLinkButton | [protected]
IsEditable() const | CLinkButton | [inline, protected, virtual]
m_strURL | CLinkButton | [protected]
Serialize(CArchive &ar) | CLinkButton | [protected, virtual]
~CLinkButton() | CLinkButton | [virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagTARGET Member List

This is the complete list of members for tagTARGET, including all inherited members.
dwData | tagTARGET
dwFlags | tagTARGET
htrgTarget | tagTARGET
idTarget | tagTARGET
rectBound | tagTARGET
rectBoundInk | tagTARGET
rectBoundLastInk | tagTARGET
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/resource.h Source File

  • advanced
  • mtmdi

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by mtmdi.rc
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4 3
00007 #define IDI_HELLO                       4
00008 #define IDM_BOUNCE                      10
00009 #define IDM_HELLO                       11
00010 #define IDM_BLACK                       20
00011 #define IDM_RED                         21
00012 #define IDM_GREEN                       22
00013 #define IDM_BLUE                        23
00014 #define IDM_WHITE                       24
00015 #define IDM_CUSTOM                      25
00016 #define IDM_FAST                        30
00017 #define IDM_SLOW                        31
00018 #define IDD_ABOUTBOX                    100
00019 #define IDR_BOUNCE                      101
00020 #define IDR_HELLO                       102
00021
00022 // Next default values for new objects
00023 //
00024 #ifdef APSTUDIO_INVOKED
00025 #ifndef APSTUDIO_READONLY_SYMBOLS
00026 #define _APS_NEXT_RESOURCE_VALUE        103
00027 #define _APS_NEXT_COMMAND_VALUE         57666
00028 #define _APS_NEXT_CONTROL_VALUE         1000
00029 #define _APS_NEXT_SYMED_VALUE           101
00030 #endif
00031 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatta.h Source File

  • vc2008fp
  • WordPad

formatta.h

Go to the documentation of this file.
00001 //
00002 // formatta.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CFormatTabDlg dialog
00016
00017 class CFormatTabDlg : public CCSDialog
00018 {
00019 // Construction
00020 public:
00021   CFormatTabDlg(WPD_PARAFORMAT& pf, CWnd* pParent = NULL);    // standard constructor
00022   ~CFormatTabDlg();
00023   WPD_PARAFORMAT m_pf;
00024   LONG* m_tabarray;
00025   int m_nCount;
00026
00027 // Dialog Data
00028   //{{AFX_DATA(CFormatTabDlg)
00029   enum { IDD = IDD_FORMAT_TAB };
00030   CButton m_buttonClearAll;
00031   CButton m_buttonSet;
00032   CButton m_buttonClear;
00033   CComboBox   m_comboBox;
00034   //}}AFX_DATA
00035
00036 // Implementation
00037 protected:
00038   static const DWORD m_nHelpIDs[];
00039   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00040   void UpdateButton(CButton& button, BOOL b);
00041   void UpdateButtons();
00042   BOOL Set();
00043   BOOL AddTabToArray(LONG lTab);
00044   BOOL RemoveTabFromArray(LONG lTab);
00045   void RemoveTabFromArrayByIndex(int nIndex);
00046   void UpdateListBox();
00047   void SetEditFocus();
00048   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00049   virtual void OnOK();
00050
00051   // Generated message map functions
00052   //{{AFX_MSG(CFormatTabDlg)
00053   afx_msg void OnClickedClear();
00054   afx_msg void OnClickedClearAll();
00055   afx_msg void OnClickedSet();
00056   afx_msg void OnEditChange();
00057   virtual BOOL OnInitDialog();
00058   afx_msg void OnSelchange();
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/cntritem.h Source File

  • controls
  • contain

cntritem.h

Go to the documentation of this file.
00001 // CntrItem.h : interface of the CContainerItem class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 class CContainerDoc;
00012 class CContainerView;
00013
00014 class CContainerItem : public COleClientItem
00015 {
00016   DECLARE_SERIAL(CContainerItem)
00017
00018 // Constructors
00019 public:
00020   CContainerItem(CContainerDoc* pContainer = NULL);
00021     // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
00022     //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00023     //  zero arguments.  Normally, OLE items are constructed with a
00024     //  non-NULL document pointer.
00025
00026 // Attributes
00027 public:
00028   CRect m_rect;   // position within the document
00029   CContainerDoc* GetDocument()
00030     { return (CContainerDoc*)COleClientItem::GetDocument(); }
00031   CContainerView* GetActiveView()
00032     { return (CContainerView*)COleClientItem::GetActiveView(); }
00033
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CContainerItem)
00036   public:
00037   virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
00038   protected:
00039   virtual void OnGetItemPosition(CRect& rPosition);
00040   virtual void OnActivate();
00041   virtual void OnDeactivateUI(BOOL bUndoable);
00042   virtual BOOL OnChangeItemPosition(const CRect& rectPos);
00043   //}}AFX_VIRTUAL
00044 // Operations
00045 public:
00046   void InvalidateItem();
00047   void UpdateFromServerExtent();
00048
00049 // Implementation
00050 public:
00051   ~CContainerItem();
00052 #ifdef _DEBUG
00053   virtual void AssertValid() const;
00054   virtual void Dump(CDumpContext& dc) const;
00055 #endif
00056   virtual void Serialize(CArchive& ar);
00057 };
00058
00059 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInfoDlg Member List

This is the complete list of members for CInfoDlg, including all inherited members.
CInfoDlg(CImage &image) | CInfoDlg |
IDD enum value | CInfoDlg |
m_pImage | CInfoDlg | [private]
OnInitDialog() | CInfoDlg | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/StdAfx.h Source File

  • vc2008fp
  • ToolbarDateTimePicker

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 #if !defined(AFX_STDAFX_H__9A2D8C2E_AB38_4923_9131_FF96FC525213__INCLUDED_)
00007 #define AFX_STDAFX_H__9A2D8C2E_AB38_4923_9131_FF96FC525213__INCLUDED_
00008
00009 #if _MSC_VER > 1000
00010 #pragma once
00011 #endif // _MSC_VER > 1000
00012
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014
00015 #include "targetver.h"
00016
00017 #include <afxwin.h>         // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions
00019 #include <afxadv.h>
00020 #include <afxdisp.h>        // MFC Automation classes
00021 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00022 #ifndef _AFX_NO_AFXCMN_SUPPORT
00023 #include <afxcmn.h>     // MFC support for Windows Common Controls
00024 #endif // _AFX_NO_AFXCMN_SUPPORT
00025
00026
00027 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00028
00029 #if defined _M_IX86
00030 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00031 #elif defined _M_X64
00032 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00033 #else
00034 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00035 #endif
00036
00037 //{{AFX_INSERT_LOCATION}}
00038 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00039
00040 #endif // !defined(AFX_STDAFX_H__9A2D8C2E_AB38_4923_9131_FF96FC525213__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawdoc.cpp Source File

  • ole
  • drawcli

drawdoc.cpp

Go to the documentation of this file.
00001 // drawdoc.cpp : implementation of the CDrawDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "drawcli.h"
00014
00015 #include "drawdoc.h"
00016 #include "drawvw.h"
00017 #include "drawobj.h"
00018 #include "cntritem.h"
00019 #include "summpage.h"
00020 #include "statpage.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CDrawDoc
00029
00030 IMPLEMENT_DYNCREATE(CDrawDoc, COleDocument)
00031
00032 BEGIN_MESSAGE_MAP(CDrawDoc, COleDocument)
00033   //{{AFX_MSG_MAP(CDrawDoc)
00034   ON_COMMAND(ID_VIEW_PAPERCOLOR, OnViewPaperColor)
00035   ON_COMMAND(ID_FILE_SUMMARYINFO, OnFileSummaryInfo)
00036   //}}AFX_MSG_MAP
00037   // Enable default OLE container implementation
00038   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, COleDocument::OnUpdatePasteMenu)
00039   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE_LINK, COleDocument::OnUpdatePasteLinkMenu)
00040   ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, COleDocument::OnUpdateEditLinksMenu)
00041   ON_COMMAND(ID_OLE_EDIT_LINKS, COleDocument::OnEditLinks)
00042   ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, COleDocument::OnUpdateObjectVerbMenu)
00043     // MAPI support
00044   ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00045   ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00046 END_MESSAGE_MAP()
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CDrawDoc construction/destruction
00050
00051 CDrawDoc::CDrawDoc()
00052 {
00053   EnableCompoundFile();
00054
00055   m_nMapMode = MM_ANISOTROPIC;
00056   m_paperColor = RGB(255, 255, 255);
00057   m_pSummInfo = NULL;
00058   ComputePageSize();
00059 }
00060
00061 CDrawDoc::~CDrawDoc()
00062 {
00063   POSITION pos = m_objects.GetHeadPosition();
00064   while (pos != NULL)
00065     delete m_objects.GetNext(pos);
00066   delete m_pSummInfo;
00067 }
00068
00069 BOOL CDrawDoc::OnNewDocument()
00070 {
00071   if (!COleDocument::OnNewDocument())
00072     return FALSE;
00073
00074   // reinitialization code
00075   // (SDI documents will reuse this document)
00076   if(m_pSummInfo != NULL)
00077     delete m_pSummInfo;
00078   m_pSummInfo = new CSummInfo;
00079   // Title, Subject, Author, Keywords default to empty string
00080   // Comments, Template, SavedBy default to empty string
00081   // LastSave, LastPrint, EditTime, RevNum default to 0
00082   m_pSummInfo->StartEditTimeCount();
00083   m_pSummInfo->RecordCreateDate();
00084   m_pSummInfo->SetNumPages(1);
00085   // NumWords, NumChars default to 0
00086   m_pSummInfo->SetAppname( _T("DrawCli") );
00087   // Security defaults to 0
00088   return TRUE;
00089 }
00090
00091 BOOL CDrawDoc::OnOpenDocument(LPCTSTR lpszPathName)
00092 {
00093   if( m_pSummInfo != NULL)
00094     delete m_pSummInfo;
00095   m_pSummInfo = new CSummInfo;
00096   m_pSummInfo->StartEditTimeCount();
00097   return COleDocument::OnOpenDocument(lpszPathName);
00098 }
00099
00100 BOOL CDrawDoc::OnSaveDocument(LPCTSTR lpszPathName)
00101 {
00102   m_pSummInfo->RecordSaveDate();
00103   m_pSummInfo->IncrRevNum();
00104   m_pSummInfo->SetLastAuthor(m_pSummInfo->GetAuthor());
00105   m_pSummInfo->AddCountToEditTime();
00106   m_pSummInfo->StartEditTimeCount();
00107   return COleDocument::OnSaveDocument(lpszPathName);
00108 }
00109
00110 /////////////////////////////////////////////////////////////////////////////
00111 // CDrawDoc serialization
00112
00113 void CDrawDoc::Serialize(CArchive& ar)
00114 {
00115   if (ar.IsStoring())
00116   {
00117     ar << m_paperColor;
00118     m_objects.Serialize(ar);
00119     m_pSummInfo->WriteToStorage(m_lpRootStg);
00120   }
00121   else
00122   {
00123     ar >> m_paperColor;
00124     m_objects.Serialize(ar);
00125     m_pSummInfo->ReadFromStorage(m_lpRootStg);
00126   }
00127
00128   // By calling the base class COleDocument, we enable serialization
00129   //  of the container document's COleClientItem objects automatically.
00130   COleDocument::Serialize(ar);
00131 }
00132
00133
00134 /////////////////////////////////////////////////////////////////////////////
00135 // CDrawDoc implementation
00136
00137 void CDrawDoc::Draw(CDC* pDC, CDrawView* pView)
00138 {
00139   POSITION pos = m_objects.GetHeadPosition();
00140   while (pos != NULL)
00141   {
00142     CDrawObj* pObj = m_objects.GetNext(pos);
00143     pObj->Draw(pDC);
00144     if (pView->m_bActive && !pDC->IsPrinting() && pView->IsSelected(pObj))
00145       pObj->DrawTracker(pDC, CDrawObj::selected);
00146   }
00147 }
00148
00149 void CDrawDoc::Add(CDrawObj* pObj)
00150 {
00151   m_objects.AddTail(pObj);
00152   pObj->m_pDocument = this;
00153   SetModifiedFlag();
00154 }
00155
00156 void CDrawDoc::Remove(CDrawObj* pObj)
00157 {
00158   // Find and remove from document
00159   POSITION pos = m_objects.Find(pObj);
00160   if (pos != NULL)
00161     m_objects.RemoveAt(pos);
00162   // set document modified flag
00163   SetModifiedFlag();
00164
00165   // call remove for each view so that the view can remove from m_selection
00166   pos = GetFirstViewPosition();
00167   while (pos != NULL)
00168     ((CDrawView*)GetNextView(pos))->Remove(pObj);
00169 }
00170
00171 // point is in logical coordinates
00172 CDrawObj* CDrawDoc::ObjectAt(const CPoint& point)
00173 {
00174   CRect rect(point, CSize(1, 1));
00175   POSITION pos = m_objects.GetTailPosition();
00176   while (pos != NULL)
00177   {
00178     CDrawObj* pObj = m_objects.GetPrev(pos);
00179     if (pObj->Intersects(rect))
00180       return pObj;
00181   }
00182
00183   return NULL;
00184 }
00185
00186 void CDrawDoc::ComputePageSize()
00187 {
00188   CSize new_size(850, 1100);  // 8.5" x 11" default
00189
00190   CPrintDialog dlg(FALSE);
00191   if (AfxGetApp()->GetPrinterDeviceDefaults(&dlg.m_pd))
00192   {
00193     // GetPrinterDC returns a HDC so attach it
00194     CDC dc;
00195     HDC hDC= dlg.CreatePrinterDC();
00196     ASSERT(hDC != NULL);
00197     dc.Attach(hDC);
00198
00199     // Get the size of the page in loenglish
00200     new_size.cx = MulDiv(dc.GetDeviceCaps(HORZSIZE), 1000, 254);
00201     new_size.cy = MulDiv(dc.GetDeviceCaps(VERTSIZE), 1000, 254);
00202   }
00203
00204   // if size changed then iterate over views and reset
00205   if (new_size != m_size)
00206   {
00207     m_size = new_size;
00208     POSITION pos = GetFirstViewPosition();
00209     while (pos != NULL)
00210       ((CDrawView*)GetNextView(pos))->SetPageSize(m_size);
00211   }
00212 }
00213
00214 void CDrawDoc::OnViewPaperColor()
00215 {
00216   CColorDialog dlg;
00217   if (dlg.DoModal() != IDOK)
00218     return;
00219
00220   m_paperColor = dlg.GetColor();
00221   SetModifiedFlag();
00222   UpdateAllViews(NULL);
00223 }
00224
00225 /////////////////////////////////////////////////////////////////////////////
00226 // CDrawDoc diagnostics
00227
00228 #ifdef _DEBUG
00229 void CDrawDoc::AssertValid() const
00230 {
00231   COleDocument::AssertValid();
00232 }
00233
00234 void CDrawDoc::Dump(CDumpContext& dc) const
00235 {
00236   COleDocument::Dump(dc);
00237 }
00238 #endif //_DEBUG
00239
00240 /////////////////////////////////////////////////////////////////////////////
00241 // CDrawDoc commands
00242
00243 void CDrawDoc::OnFileSummaryInfo()
00244 {
00245   ASSERT_VALID(this);
00246
00247   CPropertySheet sheet( _T("Document Properties") );
00248   CSummPage summ;
00249   CStatPage stat;
00250   sheet.AddPage( &summ );
00251   sheet.AddPage( &stat );
00252
00253   summ.m_strAppname = m_pSummInfo->GetAppname();
00254   summ.m_strTitle   = m_pSummInfo->GetTitle();
00255   summ.m_strSubj    = m_pSummInfo->GetSubject();
00256   summ.m_strAuthor  = m_pSummInfo->GetAuthor();
00257   summ.m_strKeywd   = m_pSummInfo->GetKeywords();
00258   summ.m_strCmt     = m_pSummInfo->GetComments();
00259   summ.m_strTempl   = m_pSummInfo->GetTemplate();
00260
00261   stat.m_strSavedBy    = m_pSummInfo->GetLastAuthor();
00262   stat.m_strRevNum     = m_pSummInfo->GetRevNum();
00263   stat.m_strEditTime   = m_pSummInfo->GetEditTime();
00264   stat.m_strLastPrint  = m_pSummInfo->GetLastPrintDate();
00265   stat.m_strCreateDate = m_pSummInfo->GetCreateDate();
00266   stat.m_strLastSave   = m_pSummInfo->GetLastSaveDate();
00267   stat.m_strNumPages   = m_pSummInfo->GetNumPages();
00268   stat.m_strNumWords   = m_pSummInfo->GetNumWords();
00269   stat.m_strNumChars   = m_pSummInfo->GetNumChars();
00270   stat.m_strSecurity   = m_pSummInfo->GetSecurity();
00271
00272   if (sheet.DoModal() != IDOK)
00273     return;
00274
00275   m_pSummInfo->SetAuthor(summ.m_strAuthor);
00276   m_pSummInfo->SetKeywords(summ.m_strKeywd);
00277   m_pSummInfo->SetSubject(summ.m_strSubj);
00278   m_pSummInfo->SetComments(summ.m_strCmt);
00279   m_pSummInfo->SetTemplate(summ.m_strTempl);
00280   m_pSummInfo->SetTitle(summ.m_strTitle);
00281
00282   SetModifiedFlag();
00283 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/WorkspaceBar.cpp Source File

  • vc2008fp
  • StateCollection

WorkspaceBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StateCollection.h"
00013 #include "WorkspaceBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CWorkspaceBar
00023
00024 BEGIN_MESSAGE_MAP(CWorkspaceBar, CDockablePane)
00025   ON_WM_CREATE()
00026   ON_WM_SIZE()
00027 END_MESSAGE_MAP()
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // CWorkspaceBar construction/destruction
00031
00032 CWorkspaceBar::CWorkspaceBar()
00033 {
00034   // TODO: add one-time construction code here
00035
00036 }
00037
00038 CWorkspaceBar::~CWorkspaceBar()
00039 {
00040 }
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CWorkspaceBar message handlers
00044
00045 int CWorkspaceBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00046 {
00047   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00048     return -1;
00049
00050   CRect rectDummy;
00051   rectDummy.SetRectEmpty ();
00052
00053   // Create tabs window:
00054   if (!m_wndTabs.Create (CMFCTabCtrl::STYLE_3D, rectDummy, this, 1))
00055   {
00056     TRACE0("Failed to create workspace tab window\n");
00057     return -1;      // fail to create
00058   }
00059
00060   m_wndTabs.SetImageList (IDB_WORKSPACE, 16, RGB (255, 0, 255));
00061
00062   // Create tree windows.
00063   // TODO: create your own tab windows here:
00064   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
00065                 TVS_LINESATROOT | TVS_HASBUTTONS;
00066
00067   if (!m_wndTree1.Create (dwViewStyle, rectDummy, &m_wndTabs, 2) ||
00068     !m_wndTree2.Create (dwViewStyle, rectDummy, &m_wndTabs, 3))
00069   {
00070     TRACE0("Failed to create workspace view\n");
00071     return -1;      // fail to create
00072   }
00073
00074   // Setup trees content:
00075   HTREEITEM hRoot1 = m_wndTree1.InsertItem (_T("Root 1"));
00076   m_wndTree1.InsertItem (_T("Item 1"), hRoot1);
00077   m_wndTree1.InsertItem (_T("Item 2"), hRoot1);
00078
00079   HTREEITEM hRoot2 = m_wndTree2.InsertItem (_T("Root 2"));
00080   m_wndTree2.InsertItem (_T("Item 1"), hRoot2);
00081   m_wndTree2.InsertItem (_T("Item 2"), hRoot2);
00082
00083   // Attach tree windows to tab:
00084   m_wndTabs.AddTab (&m_wndTree1, _T("First View"), 0 /* Image number */);
00085   m_wndTabs.AddTab (&m_wndTree2, _T("Second View"), 1 /* Image number */);
00086
00087   return 0;
00088 }
00089
00090 void CWorkspaceBar::OnSize(UINT nType, int cx, int cy)
00091 {
00092   CDockablePane::OnSize(nType, cx, cy);
00093
00094   // Tab control should cover a whole client area:
00095   m_wndTabs.SetWindowPos (NULL, -1, -1, cx, cy,
00096     SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
00097 }
00098
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/childfrm.h Source File

  • controls
  • contain

childfrm.h

Go to the documentation of this file.
00001 // ChildFrm.h : interface of the CChildFrame class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 class CChildFrame : public CMDIChildWnd
00013 {
00014   DECLARE_DYNCREATE(CChildFrame)
00015 public:
00016   CChildFrame();
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CChildFrame)
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028   //}}AFX_VIRTUAL
00029
00030 // Implementation
00031 public:
00032   virtual ~CChildFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 // Generated message map functions
00039 protected:
00040   //{{AFX_MSG(CChildFrame)
00041     // NOTE - the ClassWizard will add and remove member functions here.
00042     //    DO NOT EDIT what you see in these blocks of generated code!
00043   //}}AFX_MSG
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/MainFrm.h Source File

  • vc2008fp
  • StatusBarDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CFrameWnd CFrameWndEx
00014
00015 //-----------------
00016 // Statusbar panes:
00017 //-----------------
00018 const int nStatusIcon = 0;
00019 const int nStatusInfo = 1;
00020 const int nStatusProgress = 2;
00021 const int nStatusLabel = 3;
00022 const int nStatusAnimation = 4;
00023
00024 class CMainFrame : public CFrameWnd
00025 {
00026
00027 protected: // create from serialization only
00028   CMainFrame();
00029   DECLARE_DYNCREATE(CMainFrame)
00030
00031 // Attributes
00032 public:
00033   CMFCStatusBar& GetStatusBar ()
00034   {
00035     return m_wndStatusBar;
00036   }
00037
00038 // Operations
00039 public:
00040
00041 // Overrides
00042   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00043
00044 // Implementation
00045 public:
00046   virtual ~CMainFrame();
00047 #ifdef _DEBUG
00048   virtual void AssertValid() const;
00049   virtual void Dump(CDumpContext& dc) const;
00050 #endif
00051
00052 protected:  // control bar embedded members
00053   CMFCMenuBar   m_wndMenuBar;
00054   CMFCStatusBar   m_wndStatusBar;
00055   CMFCToolBar   m_wndToolBar;
00056
00057 protected:
00058   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00059   afx_msg void OnViewCustomize();
00060   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00061   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00062
00063   DECLARE_MESSAGE_MAP()
00064
00065   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00066 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/ipframe.cpp Source File

  • ole
  • superpad

ipframe.cpp

Go to the documentation of this file.
00001 // ipframe.cpp : implementation of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "superpad.h"
00015 #include "ipframe.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CInPlaceFrame
00024
00025 IMPLEMENT_DYNCREATE(CInPlaceFrame, COleIPFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CInPlaceFrame, COleIPFrameWnd)
00028   //{{AFX_MSG_MAP(CInPlaceFrame)
00029   ON_WM_CREATE()
00030   //}}AFX_MSG_MAP
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // arrays of IDs used to initialize control bars
00035
00036 // toolbar buttons - IDs are command buttons
00037 static UINT BASED_CODE buttons[] =
00038 {
00039   // same order as in the bitmap 'toolbar.bmp'
00040   ID_EDIT_CUT,
00041   ID_EDIT_COPY,
00042   ID_EDIT_PASTE,
00043     ID_SEPARATOR,
00044   ID_APP_ABOUT,
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CInPlaceFrame construction/destruction
00049
00050 CInPlaceFrame::CInPlaceFrame()
00051 {
00052 }
00053
00054 CInPlaceFrame::~CInPlaceFrame()
00055 {
00056 }
00057
00058 int CInPlaceFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00059 {
00060   if (COleIPFrameWnd::OnCreate(lpCreateStruct) == -1)
00061     return -1;
00062
00063   if (!m_wndResizeBar.Create(this))
00064   {
00065     TRACE0("Failed to create resize bar\n");
00066     return -1;      // fail to create
00067   }
00068   return 0;
00069 }
00070
00071 // OnCreateControlBars is called by the framework to create control
00072 //  bars on the client applications windows.
00073 BOOL CInPlaceFrame::OnCreateControlBars(CWnd* pWndFrame, CWnd* /*pWndDoc*/)
00074 {
00075   // create toolbar on client's frame window
00076   if (!m_wndToolBar.Create(pWndFrame) ||
00077     !m_wndToolBar.LoadBitmap(IDR_TEXTTYPE_INPLACE) ||
00078     !m_wndToolBar.SetButtons(buttons,
00079       sizeof(buttons)/sizeof(UINT)))
00080   {
00081     TRACE0("Failed to create toolbar\n");
00082     return FALSE;
00083   }
00084
00085   // set owner to this window, so messages are delivered to correct app
00086   m_wndToolBar.SetOwner(this);
00087   return TRUE;
00088 }
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CInPlaceFrame diagnostics
00092
00093 #ifdef _DEBUG
00094 void CInPlaceFrame::AssertValid() const
00095 {
00096   COleIPFrameWnd::AssertValid();
00097 }
00098
00099 void CInPlaceFrame::Dump(CDumpContext& dc) const
00100 {
00101   COleIPFrameWnd::Dump(dc);
00102 }
00103
00104 #endif //_DEBUG
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CInPlaceFrame commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawvw.h Source File

  • ole
  • drawcli

drawvw.h

Go to the documentation of this file.
00001 // drawvw.h : interface of the CDrawView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 // Hints for UpdateAllViews/OnUpdate
00014 #define HINT_UPDATE_WINDOW      0
00015 #define HINT_UPDATE_DRAWOBJ     1
00016 #define HINT_UPDATE_SELECTION   2
00017 #define HINT_DELETE_SELECTION   3
00018 #define HINT_UPDATE_OLE_ITEMS   4
00019
00020 class CDrawObj;
00021
00022 class CDrawView : public CScrollView
00023 {
00024 protected: // create from serialization only
00025   CDrawView();
00026   DECLARE_DYNCREATE(CDrawView)
00027
00028 // Attributes
00029 public:
00030   CDrawDoc* GetDocument()
00031     { return (CDrawDoc*)m_pDocument; }
00032   void SetPageSize(CSize size);
00033   CRect GetInitialPosition();
00034
00035 // Operations
00036 public:
00037   void DocToClient(CRect& rect);
00038   void DocToClient(CPoint& point);
00039   void ClientToDoc(CPoint& point);
00040   void ClientToDoc(CRect& rect);
00041   void Select(CDrawObj* pObj, BOOL bAdd = FALSE);
00042   void SelectWithinRect(CRect rect, BOOL bAdd = FALSE);
00043   void Deselect(CDrawObj* pObj);
00044   void CloneSelection();
00045   void UpdateActiveItem();
00046   void InvalObj(CDrawObj* pObj);
00047   void Remove(CDrawObj* pObj);
00048   void PasteNative(COleDataObject& dataObject);
00049   void PasteEmbedded(COleDataObject& dataObject, CPoint point );
00050
00051 // Implementation
00052 protected:
00053   // added for drop-target functionality
00054   COleDropTarget m_dropTarget;        // for drop target functionality
00055   CPoint m_dragPoint;                 // current position
00056   CSize m_dragSize;                   // size of dragged object
00057   CSize m_dragOffset;                 // offset between pt and drag object corner
00058   DROPEFFECT m_prevDropEffect;
00059   BOOL m_bDragDataAcceptable;
00060
00061   BOOL GetObjectInfo(COleDataObject* pDataObject,
00062     CSize* pSize, CSize* pOffset);
00063   // end of drop-target additions
00064
00065 public:
00066   virtual ~CDrawView();
00067 #ifdef _DEBUG
00068   virtual void AssertValid() const;
00069   virtual void Dump(CDumpContext& dc) const;
00070 #endif
00071
00072   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);  // overriden to record time/date
00073   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00074   virtual void OnActivateView(BOOL bActivate, CView* pActiveView, CView* pDeactiveView);
00075   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00076   virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo);
00077   virtual BOOL OnScrollBy(CSize sizeScroll, BOOL bDoScroll);
00078   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00079   void DrawGrid(CDC* pDC);
00080
00081   // added for drop-target functionality
00082   virtual BOOL OnDrop(COleDataObject* pDataObject,
00083     DROPEFFECT dropEffect, CPoint point);
00084   virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject,
00085     DWORD grfKeyState, CPoint point);
00086   virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject,
00087     DWORD grfKeyState, CPoint point);
00088   virtual void OnDragLeave();
00089   static CLIPFORMAT m_cfObjectDescriptor;
00090   // end of drop-target additions
00091
00092   static CLIPFORMAT m_cfDraw; // custom clipboard format
00093
00094   CDrawObjList m_selection;
00095   BOOL m_bGrid;
00096   COLORREF m_gridColor;
00097   BOOL m_bActive; // is the view active?
00098
00099 protected:
00100   virtual void OnInitialUpdate(); // called first time after construct
00101
00102   // Printing support
00103   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00104   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00105   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00106
00107   // OLE Container support
00108 public:
00109   virtual BOOL IsSelected(const CObject* pDocItem) const;
00110
00111 // Generated message map functions
00112 protected:
00113   //{{AFX_MSG(CDrawView)
00114   afx_msg void OnInsertObject();
00115   afx_msg void OnCancelEdit();
00116   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00117   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00118   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00119   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00120   afx_msg void OnDrawSelect();
00121   afx_msg void OnDrawRoundRect();
00122   afx_msg void OnDrawRect();
00123   afx_msg void OnDrawLine();
00124   afx_msg void OnDrawEllipse();
00125   afx_msg void OnUpdateDrawEllipse(CCmdUI* pCmdUI);
00126   afx_msg void OnUpdateDrawLine(CCmdUI* pCmdUI);
00127   afx_msg void OnUpdateDrawRect(CCmdUI* pCmdUI);
00128   afx_msg void OnUpdateDrawRoundRect(CCmdUI* pCmdUI);
00129   afx_msg void OnUpdateDrawSelect(CCmdUI* pCmdUI);
00130   afx_msg void OnUpdateSingleSelect(CCmdUI* pCmdUI);
00131   afx_msg void OnEditSelectAll();
00132   afx_msg void OnEditClear();
00133   afx_msg void OnUpdateAnySelect(CCmdUI* pCmdUI);
00134   afx_msg void OnDrawPolygon();
00135   afx_msg void OnUpdateDrawPolygon(CCmdUI* pCmdUI);
00136   afx_msg void OnSize(UINT nType, int cx, int cy);
00137   afx_msg void OnViewGrid();
00138   afx_msg void OnUpdateViewGrid(CCmdUI* pCmdUI);
00139   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00140   afx_msg void OnObjectFillColor();
00141   afx_msg void OnObjectLineColor();
00142   afx_msg void OnObjectMoveBack();
00143   afx_msg void OnObjectMoveForward();
00144   afx_msg void OnObjectMoveToBack();
00145   afx_msg void OnObjectMoveToFront();
00146   afx_msg void OnEditCopy();
00147   afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
00148   afx_msg void OnEditCut();
00149   afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI);
00150   afx_msg void OnEditPaste();
00151   afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
00152   afx_msg void OnFilePrint();
00153   afx_msg void OnSetFocus(CWnd* pOldWnd);
00154   afx_msg void OnViewShowObjects();
00155   afx_msg void OnUpdateViewShowObjects(CCmdUI* pCmdUI);
00156   afx_msg void OnEditProperties();
00157   afx_msg void OnUpdateEditProperties(CCmdUI* pCmdUI);
00158   afx_msg void OnDestroy();
00159   afx_msg void OnUpdateEditSelectAll(CCmdUI* pCmdUI);
00160   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00161   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00162   //}}AFX_MSG
00163   DECLARE_MESSAGE_MAP()
00164 };
00165
00166 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TrayMenu/TrayMenuDlg.h Source File

  • vc2008fp
  • TrayMenu

TrayMenuDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CTrayMenuDlg dialog
00015
00016 #define CDialog CDialogEx
00017
00018 class CTrayMenuDlg : public CDialog
00019 {
00020 // Construction
00021 public:
00022   CTrayMenuDlg(CWnd* pParent = NULL); // standard constructor
00023   virtual ~CTrayMenuDlg();
00024
00025 // Dialog Data
00026   enum { IDD = IDD_TRAYMENU_DIALOG };
00027
00028   protected:
00029   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00030
00031 // Implementation
00032 protected:
00033   HICON m_hIcon;
00034
00035   virtual BOOL OnInitDialog();
00036   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00037   afx_msg void OnPaint();
00038   afx_msg HCURSOR OnQueryDragIcon();
00039   afx_msg void OnAppAbout();
00040   afx_msg void OnAppExit();
00041   afx_msg void OnAppOpen();
00042   afx_msg void OnItem1();
00043   afx_msg void OnItem2();
00044   afx_msg void OnItem3();
00045   afx_msg void OnItem4();
00046   afx_msg void OnUpdateItem4(CCmdUI* pCmdUI);
00047   afx_msg LRESULT OnTrayNotify(WPARAM wp, LPARAM lp);
00048
00049   DECLARE_MESSAGE_MAP()
00050
00051   NOTIFYICONDATA  m_nid;      // struct for Shell_NotifyIcon args
00052
00053   void OnTrayContextMenu ();
00054 };
00055
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenu.h Source File

  • vc2008fp
  • DynamicMenu

DynamicMenu.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDynamicMenuApp:
00021 // See DynamicMenu.cpp for the implementation of this class
00022 //
00023
00024 class CDynamicMenuApp : public CWinAppEx
00025 {
00026 public:
00027   CDynamicMenuApp();
00028
00029   virtual void PreLoadState ();
00030
00031
00032 // Overrides
00033   public:
00034   virtual BOOL InitInstance();
00035   virtual int ExitInstance();
00036
00037 // Implementation
00038   afx_msg void OnAppAbout();
00039
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043
00044 extern CDynamicMenuApp theApp;
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/resource.h Source File

  • general
  • CmnCtrl2

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by CmnCtrl2.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDS_ABOUTBOX                    101
00008 #define IDD_CMNCTRL2_DIALOG             102
00009 #define IDC_SPIN_EDIT                   103
00010 #define IDC_SLIDER                      104
00011 #define IDC_SPIN                        105
00012 #define IDC_PROGRESS                    106
00013 #define IDR_MAINFRAME                   128
00014 #define IDD_SLIDERCTRL                  132
00015 #define IDD_PROGCTRL                    135
00016 #define IDD_SPINCTRL                    136
00017 #define IDC_VERTICAL                    1004
00018 #define IDC_SMOOTH                      1005
00019 #define IDC_PROG_VERTPOS                1006
00020 #define IDC_SPIN_ORIENTATION            1015
00021 #define IDC_SPIN_ARROWKEYS              1016
00022 #define IDC_SPIN_AUTOBUDDY              1017
00023 #define IDC_SPIN_SETBUDDYINT            1018
00024 #define IDC_SPIN_TO                     1020
00025 #define IDC_SPIN_FROM                   1021
00026 #define IDC_SPIN_ALIGNMENT              1022
00027 #define IDC_SPIN_WRAP                   1023
00028 #define IDC_SPIN_NOTHOUSANDS            1024
00029 #define IDC_SLIDER_POINT                1033
00030 #define IDC_SLIDER_NOTICKS              1034
00031 #define IDC_SLIDER_AUTOTICKS            1035
00032 #define IDC_SLIDER_FIXED                1036
00033 #define IDC_SLIDER_RANGEFROM            1038
00034 #define IDC_SLIDER_RANGETO              1039
00035 #define IDC_SLIDER_SELRANGEFROM         1041
00036 #define IDC_SLIDER_SELRANGETO           1042
00037 #define IDC_SLIDER_ENABLESEL            1044
00038 #define IDC_SLIDER_NOTHUMB              1046
00039 #define IDC_SLIDER_LINE                 1048
00040 #define IDC_SLIDER_PAGE                 1050
00041 #define IDC_PROGRESS_STEP               1057
00042 #define IDC_PROGRESS_STEPIT             1059
00043 #define IDC_SPIN_POS                    1070
00044 #define IDC_SLIDER_TICKFREQ             1072
00045 #define IDC_PROGRESS_POS                1073
00046 #define IDC_PROGRESS_DELTA              1074
00047 #define IDC_PROGRESS_SETDELTA           1075
00048 #define IDC_SETPOS                      1076
00049 #define IDC_PROGRESS_FROM               1078
00050 #define IDC_PROGRESS_TO                 1079
00051 #define IDC_SLIDER_ORIENTATION          1080
00052 #define IDC_SLIDER_HORZPOS              1081
00053 #define IDC_SLIDER_VERTPOS              1082
00054 #define IDC_PROG_HORZPOS                1083
00055 #define IDC_NOTIFICATIONS               1084
00056
00057 // Next default values for new objects
00058 //
00059 #ifdef APSTUDIO_INVOKED
00060 #ifndef APSTUDIO_READONLY_SYMBOLS
00061 #define _APS_NEXT_RESOURCE_VALUE        130
00062 #define _APS_NEXT_COMMAND_VALUE         32771
00063 #define _APS_NEXT_CONTROL_VALUE         1007
00064 #define _APS_NEXT_SYMED_VALUE           101
00065 #endif
00066 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/FolderListPopupWnd.h Source File

  • vc2008fp
  • OutlookDemo

FolderListPopupWnd.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "FoldersTree.h"
00013
00014 class CWorkspaceObj;
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CFolderListPopupWnd window
00018
00019 class CFolderListPopupWnd : public CWnd
00020 {
00021 // Construction
00022 public:
00023   CFolderListPopupWnd(const CObList& lstWorkspaces, CImageList& images, CWorkspaceObj* pSelWorkSpace);
00024
00025 // Attributes
00026 protected:
00027   static CString m_strClassName;
00028   CFoldersTree m_wndFolders;
00029   CWorkspaceObj* m_pSelWorkSpace;
00030
00031   CMFCButton m_btnPin;
00032
00033   CRect m_rectCaption;
00034   CString m_strCaption;
00035
00036   BOOL m_bNotify;
00037
00038 // Operations
00039 public:
00040   void CloseMe(BOOL bKeep = FALSE);
00041
00042 // Overrides
00043 public:
00044   virtual BOOL Create(const RECT& rect);
00045   virtual BOOL PreTranslateMessage(MSG* pMsg);
00046
00047 // Implementation
00048 public:
00049   virtual ~CFolderListPopupWnd();
00050
00051 protected:
00052   afx_msg void OnSize(UINT nType, int cx, int cy);
00053   afx_msg void OnPaint();
00054   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00055   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00056   afx_msg void OnCancelMode();
00057   afx_msg void OnNcDestroy();
00058   afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
00059   afx_msg void OnActivateApp(BOOL bActive, DWORD dwThreadID);
00060   afx_msg void OnSelectTree(NMHDR* pNMHDR, LRESULT* pResult);
00061   afx_msg void OnKeepVisible();
00062
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMoneyDemoDoc Member List

This is the complete list of members for CMSMoneyDemoDoc, including all inherited members.
CMSMoneyDemoDoc() | CMSMoneyDemoDoc | [protected]
IsBackAvailable() const | CMSMoneyDemoDoc | [inline]
IsFrwdAvailable() | CMSMoneyDemoDoc | [inline]
OnGoAddress() | CMSMoneyDemoDoc | [protected]
OnGoBack() | CMSMoneyDemoDoc | [protected]
OnGoForward() | CMSMoneyDemoDoc | [protected]
OnNewDocument() | CMSMoneyDemoDoc | [virtual]
OnUpdateGoAddress(CCmdUI *pCmdUI) | CMSMoneyDemoDoc | [protected]
OnUpdateGoBack(CCmdUI *pCmdUI) | CMSMoneyDemoDoc | [protected]
OnUpdateGoForward(CCmdUI *pCmdUI) | CMSMoneyDemoDoc | [protected]
OnUpdateViewRefresh(CCmdUI *pCmdUI) | CMSMoneyDemoDoc | [protected]
OnUpdateViewStop(CCmdUI *pCmdUI) | CMSMoneyDemoDoc | [protected]
OnViewRefresh() | CMSMoneyDemoDoc | [protected]
OnViewStop() | CMSMoneyDemoDoc | [protected]
Serialize(CArchive &ar) | CMSMoneyDemoDoc | [virtual]
~CMSMoneyDemoDoc() | CMSMoneyDemoDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/MyAlertDlg.h Source File

  • vc2008fp
  • DesktopAlertDemo

MyAlertDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CMyPopupDlg dialog
00015
00016 class CMyPopupDlg : public CMFCDesktopAlertDialog
00017 {
00018   DECLARE_DYNCREATE(CMyPopupDlg)
00019
00020 // Construction
00021 public:
00022   CMyPopupDlg();
00023
00024 // Dialog Data
00025   enum { IDD = IDD_DIALOG1 };
00026   CStatic m_wndFrom;
00027   CMFCDesktopAlertWndButton m_btnFlag;
00028   CMFCDesktopAlertWndButton m_btnDelete;
00029   CMFCLinkCtrl  m_btnRL;
00030
00031
00032 // Overrides
00033   protected:
00034   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00035
00036 // Implementation
00037 protected:
00038   virtual BOOL OnInitDialog();
00039
00040   afx_msg void OnDelete();
00041   afx_msg void OnFlag();
00042   afx_msg void OnButton1();
00043
00044   DECLARE_MESSAGE_MAP()
00045
00046   CFont m_fontBold;
00047 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/diblook.h Source File

  • general
  • diblook

diblook.h

Go to the documentation of this file.
00001 // diblook.h : main header file for the DIBLOOK application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"           // main symbols
00017
00018 #define WM_DOREALIZE   (WM_USER + 0)
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CDibLookApp:
00022 // See diblook.cpp for the implementation of this class
00023 //
00024
00025 class CDibLookApp : public CWinApp
00026 {
00027 public:
00028   CDibLookApp();
00029
00030 // Overrides
00031   virtual BOOL InitInstance();
00032
00033 // Implementation
00034
00035   //{{AFX_MSG(CDibLookApp)
00036   afx_msg void OnAppAbout();
00037   //}}AFX_MSG
00038   DECLARE_MESSAGE_MAP()
00039 };
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/splitfrm.h Source File

  • vc2008fp
  • DrawClient

splitfrm.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CSplitFrame frame with splitter
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CSplitFrame : public CMDIChildWndEx
00020 {
00021   DECLARE_DYNCREATE(CSplitFrame)
00022
00023 protected:
00024   CSplitFrame();          // protected constructor used by dynamic creation
00025
00026 // Attributes
00027 protected:
00028   CSplitterWndEx    m_wndSplitter;
00029 public:
00030
00031 // Implementation
00032 public:
00033   virtual ~CSplitFrame();
00034   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00035
00036   //{{AFX_MSG(CSplitFrame)
00037   afx_msg void OnFilePrint();
00038   afx_msg void OnFilePrintPreview();
00039   afx_msg void OnUpdateFilePrintPreview(CCmdUI* pCmdUI);
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMMXSurface16Intrinsic Member List

This is the complete list of members for CMMXSurface16Intrinsic, including all inherited members.
AdjustWidth(int *pWidth) | CMMXSurface16Intrinsic | [virtual]
BlitBits() | CSurface |
BlurBits() | CMMXSurface16Intrinsic | [virtual]
ClearBits() | CSurface |
Create(CWnd *pWnd, int nBitDepth) | CSurface |
CSurface() | CSurface | [inline]
Destroy() | CSurface |
GetBitDepth() const | CSurface | [inline]
GetByteDepth() const | CSurface | [inline]
GetImage() | CSurface | [inline]
GetPitch() const | CSurface | [inline]
GetPixelAddress(int x, int y) const | CSurface | [inline]
GetVisibleHeight() const | CSurface | [inline]
GetVisibleWidth() const | CSurface | [inline]
Import(const CImage &image) | CSurface |
IsNull() const | CSurface | [inline]
Line(const CPoint &p1, const CPoint &p2, COLORREF c) | CSurface |
m_kDeltaX | CSurface | [protected, static]
m_kDeltaY | CSurface | [protected, static]
m_qwpl | CMMXSurface16Intrinsic | [private]
m_width | CMMXSurface16Intrinsic | [private]
OnCreated() | CMMXSurface16Intrinsic | [protected, virtual]
PointColor(int x, int y, COLORREF c) | CSurface | [inline]
PointColor(int x, int y) const | CSurface | [inline]
RandomBits() | CSurface |
RandomLine(COLORREF c) | CSurface |
ShiftBits() | CSurface |
StripeBits() | CSurface |
~CSurface() | CSurface | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/multconv.cpp Source File

  • vc2008fp
  • WordPad

multconv.cpp

Go to the documentation of this file.
00001 //
00002 // convert.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "multconv.h"
00017 #include "mswd6_32.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 #ifdef CONVERTERS
00025 CConverter* CConverter::m_pThis = NULL;
00026 #endif
00027
00028 #define BUFFSIZE 4096
00029
00030 CTrackFile::CTrackFile(CFrameWnd* pWnd) : CFile()
00031 {
00032   m_nLastPercent = -1;
00033   m_dwLength = 0;
00034   m_pFrameWnd = pWnd;
00035   VERIFY(m_strComplete.LoadString(IDS_COMPLETE));
00036   VERIFY(m_strWait.LoadString(IDS_PLEASE_WAIT));
00037   VERIFY(m_strSaving.LoadString(IDS_SAVING));
00038 //  OutputPercent(0);
00039 }
00040
00041 CTrackFile::~CTrackFile()
00042 {
00043   OutputPercent(100);
00044   if (m_pFrameWnd != NULL)
00045     m_pFrameWnd->SetMessageText(AFX_IDS_IDLEMESSAGE);
00046 }
00047
00048 UINT CTrackFile::Read(void FAR* lpBuf, UINT nCount)
00049 {
00050   UINT n = CFile::Read(lpBuf, nCount);
00051   if (m_dwLength != 0)
00052     OutputPercent((int)((GetPosition()*100)/m_dwLength));
00053   return n;
00054 }
00055
00056 void CTrackFile::Write(const void FAR* lpBuf, UINT nCount)
00057 {
00058   CFile::Write(lpBuf, nCount);
00059   OutputString(m_strSaving);
00060 //  if (m_dwLength != 0)
00061 //      OutputPercent((int)((GetPosition()*100)/m_dwLength));
00062 }
00063
00064 void CTrackFile::OutputString(LPCTSTR lpsz)
00065 {
00066   if (m_pFrameWnd != NULL)
00067   {
00068     m_pFrameWnd->SetMessageText(lpsz);
00069     CWnd* pBarWnd = m_pFrameWnd->GetMessageBar();
00070     if (pBarWnd != NULL)
00071       pBarWnd->UpdateWindow();
00072   }
00073 }
00074
00075 void CTrackFile::OutputPercent(int nPercentComplete)
00076 {
00077   if (m_pFrameWnd != NULL && m_nLastPercent != nPercentComplete)
00078   {
00079     m_nLastPercent = nPercentComplete;
00080     TCHAR buf[64];
00081     int n = nPercentComplete;
00082     wsprintf(buf, (n==100) ? m_strWait : m_strComplete, n);
00083     OutputString(buf);
00084   }
00085 }
00086
00087 COEMFile::COEMFile(CFrameWnd* pWnd) : CTrackFile(pWnd)
00088 {
00089 }
00090
00091 UINT COEMFile::Read(void FAR* lpBuf, UINT nCount)
00092 {
00093   UINT n = CTrackFile::Read(lpBuf, nCount);
00094   OemToCharBuffA((const char*)lpBuf, (char*)lpBuf, n);
00095   return n;
00096 }
00097
00098 void COEMFile::Write(const void FAR* lpBuf, UINT nCount)
00099 {
00100   CharToOemBuffA((const char*)lpBuf, (char*)lpBuf, nCount);
00101   CTrackFile::Write(lpBuf, nCount);
00102 }
00103
00104 #ifdef CONVERTERS
00105
00106 HGLOBAL CConverter::StringToHGLOBAL(LPCSTR pstr)
00107 {
00108   HGLOBAL hMem = NULL;
00109   if (pstr != NULL)
00110   {
00111     hMem = GlobalAlloc(GHND, (lstrlenA(pstr)*2)+1);
00112     if (hMem != NULL)
00113     {
00114       char* p = (char*) GlobalLock(hMem);
00115       ASSERT(p != NULL);
00116       if (p != NULL)
00117         lstrcpyA(p, pstr);
00118       GlobalUnlock(hMem);
00119     }
00120   }
00121   return hMem;
00122 }
00123
00124 CConverter::CConverter(LPCSTR pszLibName, CFrameWnd* pWnd) : CTrackFile(pWnd)
00125 {
00126   USES_CONVERSION;
00127   m_hBuff = NULL;
00128   m_pBuf = NULL;
00129   m_nBytesAvail = 0;
00130   m_nBytesWritten = 0;
00131   m_nPercent = 0;
00132   m_hEventFile = NULL;
00133   m_hEventConv = NULL;
00134   m_bDone = TRUE;
00135   m_bConvErr = FALSE;
00136   m_hFileName = NULL;
00137   OFSTRUCT ofs;
00138   if (OpenFile(pszLibName, &ofs, OF_EXIST) == HFILE_ERROR)
00139   {
00140     m_hLibCnv = NULL;
00141     return;
00142   }
00143   m_hLibCnv = LoadLibraryA(pszLibName);
00144   if (m_hLibCnv < (HINSTANCE)HINSTANCE_ERROR)
00145     m_hLibCnv = NULL;
00146   else
00147   {
00148     LoadFunctions();
00149     ASSERT(m_pInitConverter != NULL);
00150     if (m_pInitConverter != NULL)
00151     {
00152       CString str = AfxGetAppName();
00153       str.MakeUpper();
00154       VERIFY(m_pInitConverter(AfxGetMainWnd()->GetSafeHwnd(), T2CA(str)));
00155     }
00156   }
00157 }
00158
00159 CConverter::CConverter(CFrameWnd* pWnd) : CTrackFile(pWnd)
00160 {
00161   m_pInitConverter = NULL;
00162   m_pIsFormatCorrect = NULL;
00163   m_pForeignToRtf = NULL;
00164   m_pRtfToForeign = NULL;
00165   m_bConvErr = FALSE;
00166   m_hFileName = NULL;
00167 }
00168
00169 CConverter::~CConverter()
00170 {
00171   if (!m_bDone) // converter thread hasn't exited
00172   {
00173     WaitForConverter();
00174     m_nBytesAvail = 0;
00175     VERIFY(ResetEvent(m_hEventFile));
00176     m_nBytesAvail = 0;
00177     SetEvent(m_hEventConv);
00178     WaitForConverter();// wait for DoConversion exit
00179     VERIFY(ResetEvent(m_hEventFile));
00180   }
00181
00182   if (m_hEventFile != NULL)
00183     VERIFY(CloseHandle(m_hEventFile));
00184   if (m_hEventConv != NULL)
00185     VERIFY(CloseHandle(m_hEventConv));
00186   if (m_hLibCnv != NULL)
00187     FreeLibrary(m_hLibCnv);
00188   if (m_hFileName != NULL)
00189     GlobalFree(m_hFileName);
00190 }
00191
00192 void CConverter::WaitForConverter()
00193 {
00194   // while event not signalled -- process messages
00195   while (MsgWaitForMultipleObjects(1, &m_hEventFile, FALSE, INFINITE,
00196     QS_SENDMESSAGE) != WAIT_OBJECT_0)
00197   {
00198     MSG msg;
00199     PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE);
00200   }
00201 }
00202
00203 void CConverter::WaitForBuffer()
00204 {
00205   // while event not signalled -- process messages
00206   while (MsgWaitForMultipleObjects(1, &m_hEventConv, FALSE, INFINITE,
00207     QS_SENDMESSAGE) != WAIT_OBJECT_0)
00208   {
00209     MSG msg;
00210     PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE);
00211   }
00212 }
00213
00214 UINT CConverter::ConverterThread(LPVOID)
00215 {
00216   ASSERT(m_pThis != NULL);
00217   if (m_pThis != NULL)
00218   {
00219     HRESULT hRes = OleInitialize(NULL);
00220     if (hRes != S_OK && hRes != S_FALSE)
00221     {
00222       ASSERT(FALSE);
00223     }
00224     m_pThis->DoConversion();
00225     OleUninitialize();
00226   }
00227   return 0;
00228 }
00229
00230 BOOL CConverter::IsFormatCorrect(LPCTSTR pszFileName)
00231 {
00232   USES_CONVERSION;
00233   int nRet;
00234   if (m_hLibCnv == NULL || m_pIsFormatCorrect == NULL)
00235     return FALSE;
00236
00237   char buf[_MAX_PATH];
00238   strcpy(buf, T2CA(pszFileName));
00239
00240   CharToOemA(buf, buf);
00241
00242   HGLOBAL hFileName = StringToHGLOBAL(buf);
00243   HGLOBAL hDesc = GlobalAlloc(GHND, 256);
00244   ASSERT(hDesc != NULL);
00245   nRet = m_pIsFormatCorrect(hFileName, hDesc);
00246   GlobalFree(hDesc);
00247   GlobalFree(hFileName);
00248   return (nRet == 1) ? TRUE : FALSE;
00249 }
00250
00251 // static callback function
00252 int CALLBACK CConverter::WriteOutStatic(int cch, int nPercentComplete)
00253 {
00254   ASSERT(m_pThis != NULL);
00255   if (m_pThis != NULL)
00256   {
00257     return m_pThis->WriteOut(cch, nPercentComplete);
00258   }
00259
00260   return 0;
00261 }
00262
00263 int CALLBACK CConverter::WriteOut(int cch, int nPercentComplete)
00264 {
00265   ASSERT(m_hBuff != NULL);
00266   m_nPercent = nPercentComplete;
00267   if (m_hBuff == NULL)
00268     return -9;
00269   if (cch != 0)
00270   {
00271     WaitForBuffer();
00272     VERIFY(ResetEvent(m_hEventConv));
00273     m_nBytesAvail = cch;
00274     SetEvent(m_hEventFile);
00275     WaitForBuffer();
00276   }
00277   return 0; //everything OK
00278 }
00279
00280 int CALLBACK CConverter::ReadInStatic(int /*flags*/, int nPercentComplete)
00281 {
00282   ASSERT(m_pThis != NULL);
00283   if (m_pThis != NULL)
00284   {
00285     return m_pThis->ReadIn(nPercentComplete);
00286   }
00287
00288   return 0;
00289 }
00290
00291 int CALLBACK CConverter::ReadIn(int /*nPercentComplete*/)
00292 {
00293   ASSERT(m_hBuff != NULL);
00294   if (m_hBuff == NULL)
00295     return -8;
00296
00297   SetEvent(m_hEventFile);
00298   WaitForBuffer();
00299   VERIFY(ResetEvent(m_hEventConv));
00300
00301   return m_nBytesAvail;
00302 }
00303
00304 BOOL CConverter::DoConversion()
00305 {
00306   USES_CONVERSION;
00307   m_nLastPercent = -1;
00308 //  m_dwLength = 0; // prevent Read/Write from displaying
00309   m_nPercent = 0;
00310
00311   ASSERT(m_hBuff != NULL);
00312   ASSERT(m_pThis != NULL);
00313   HGLOBAL hDesc = StringToHGLOBAL("");
00314   HGLOBAL hSubset = StringToHGLOBAL("");
00315
00316   int nRet;
00317   if (m_bForeignToRtf)
00318   {
00319     ASSERT(m_pForeignToRtf != NULL);
00320     ASSERT(m_hFileName != NULL);
00321     nRet = m_pForeignToRtf(m_hFileName, NULL, m_hBuff, hDesc, hSubset,
00322       (LPFNOUT)WriteOutStatic);
00323     // wait for next CConverter::Read to come through
00324     WaitForBuffer();
00325     VERIFY(ResetEvent(m_hEventConv));
00326   }
00327   else
00328   {
00329     ASSERT(m_pRtfToForeign != NULL);
00330     ASSERT(m_hFileName != NULL);
00331     nRet = m_pRtfToForeign(m_hFileName, NULL, m_hBuff, hDesc,
00332       (LPFNIN)ReadInStatic);
00333     // don't need to wait for m_hEventConv
00334   }
00335
00336   GlobalFree(hDesc);
00337   GlobalFree(hSubset);
00338   if (m_pBuf != NULL)
00339     GlobalUnlock(m_hBuff);
00340   GlobalFree(m_hBuff);
00341
00342   if (nRet != 0)
00343     m_bConvErr = TRUE;
00344
00345   m_bDone = TRUE;
00346   m_nPercent = 100;
00347   m_nLastPercent = -1;
00348
00349   SetEvent(m_hEventFile);
00350
00351   return (nRet == 0);
00352 }
00353
00354 void CConverter::LoadFunctions()
00355 {
00356   m_pInitConverter = (PINITCONVERTER)GetProcAddress(m_hLibCnv, "InitConverter32");
00357   m_pIsFormatCorrect = (PISFORMATCORRECT)GetProcAddress(m_hLibCnv, "IsFormatCorrect32");
00358   m_pForeignToRtf = (PFOREIGNTORTF)GetProcAddress(m_hLibCnv, "ForeignToRtf32");
00359   m_pRtfToForeign = (PRTFTOFOREIGN)GetProcAddress(m_hLibCnv, "RtfToForeign32");
00360 }
00361
00362 ///////////////////////////////////////////////////////////////////////////////
00363
00364 BOOL CConverter::Open(LPCTSTR pszFileName, UINT nOpenFlags,
00365   CFileException* pException)
00366 {
00367   USES_CONVERSION;
00368   // we convert to oem and back because of the following case
00369   // test(c).txt becomes testc.txt in OEM and stays testc.txt to Ansi
00370   char buf[_MAX_PATH];
00371   strcpy(buf, T2CA(pszFileName));
00372   CharToOemA(buf, buf);
00373   OemToCharA(buf, buf);
00374
00375   LPTSTR lpszFileNameT = A2T(buf);
00376
00377   // let's make sure we could do what is wanted directly even though we aren't
00378   m_bCloseOnDelete = FALSE;
00379   m_hFile = hFileNull;
00380
00381   BOOL bOpen = CFile::Open(lpszFileNameT, nOpenFlags, pException);
00382   CFile::Close();
00383   if (!bOpen)
00384     return FALSE;
00385
00386   m_bForeignToRtf = !(nOpenFlags & (CFile::modeReadWrite | CFile::modeWrite));
00387
00388   // check for reading empty file
00389   if (m_bForeignToRtf)
00390   {
00391     CFileStatus stat;
00392     if (CFile::GetStatus(lpszFileNameT, stat) && stat.m_size == 0)
00393       return TRUE;
00394   }
00395
00396   //set security attributes to inherit handle
00397   SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
00398   //create the events
00399   m_hEventFile = CreateEvent(&sa, TRUE, FALSE, NULL);
00400   m_hEventConv = CreateEvent(&sa, TRUE, FALSE, NULL);
00401   //create the converter thread and create the events
00402
00403   CharToOemA(buf, buf);
00404   ASSERT(m_hFileName == NULL);
00405   m_hFileName = StringToHGLOBAL(buf);
00406
00407   m_pThis = this;
00408   m_bDone = FALSE;
00409   m_hBuff = GlobalAlloc(GHND, BUFFSIZE);
00410   ASSERT(m_hBuff != NULL);
00411
00412   AfxBeginThread(ConverterThread, this, THREAD_PRIORITY_NORMAL, 0, 0, &sa);
00413
00414   return TRUE;
00415 }
00416
00417 // m_hEventConv -- the main thread signals this event when ready for more data
00418 // m_hEventFile -- the converter signals this event when data is ready
00419
00420 UINT CConverter::Read(void FAR* lpBuf, UINT nCount)
00421 {
00422   ASSERT(m_bForeignToRtf);
00423   if (m_bDone)
00424     return 0;
00425   // if converter is done
00426   int cch = nCount;
00427   BYTE* pBuf = (BYTE*)lpBuf;
00428   while (cch != 0)
00429   {
00430     if (m_nBytesAvail == 0)
00431     {
00432       if (m_pBuf != NULL)
00433         GlobalUnlock(m_hBuff);
00434       m_pBuf = NULL;
00435       SetEvent(m_hEventConv);
00436       WaitForConverter();
00437       VERIFY(ResetEvent(m_hEventFile));
00438       if (m_bConvErr)
00439         AfxThrowFileException(CFileException::genericException);
00440       if (m_bDone)
00441         return nCount - cch;
00442       m_pBuf = (BYTE*)GlobalLock(m_hBuff);
00443       ASSERT(m_pBuf != NULL);
00444     }
00445     int nBytes = min(cch, m_nBytesAvail);
00446     memcpy(pBuf, m_pBuf, nBytes);
00447     pBuf += nBytes;
00448     m_pBuf += nBytes;
00449     m_nBytesAvail -= nBytes;
00450     cch -= nBytes;
00451     OutputPercent(m_nPercent);
00452   }
00453   return nCount - cch;
00454 }
00455
00456 void CConverter::Write(const void FAR* lpBuf, UINT nCount)
00457 {
00458   ASSERT(!m_bForeignToRtf);
00459
00460   m_nBytesWritten += nCount;
00461   while (nCount != 0)
00462   {
00463     WaitForConverter();
00464     VERIFY(ResetEvent(m_hEventFile));
00465     if (m_bConvErr)
00466       AfxThrowFileException(CFileException::genericException);
00467     m_nBytesAvail = min(nCount, BUFFSIZE);
00468     nCount -= m_nBytesAvail;
00469     BYTE* pBuf = (BYTE*)GlobalLock(m_hBuff);
00470     ASSERT(pBuf != NULL);
00471     memcpy(pBuf, lpBuf, m_nBytesAvail);
00472     GlobalUnlock(m_hBuff);
00473     SetEvent(m_hEventConv);
00474   }
00475   OutputString(m_strSaving);
00476 }
00477
00478 LONG CConverter::Seek(LONG lOff, UINT nFrom)
00479 {
00480   if (lOff != 0 && nFrom != current)
00481     AfxThrowNotSupportedException();
00482   return 0;
00483 }
00484
00485 void CConverter::Flush()
00486 {
00487 }
00488
00489 void CConverter::Close()
00490 {
00491 }
00492
00493 void CConverter::Abort()
00494 {
00495 }
00496
00497 CFile* CConverter::Duplicate() const
00498 {
00499   AfxThrowNotSupportedException();
00500   return NULL;
00501 }
00502
00503 void CConverter::LockRange(DWORD, DWORD)
00504 {
00505   AfxThrowNotSupportedException();
00506 }
00507
00508 void CConverter::UnlockRange(DWORD, DWORD)
00509 {
00510   AfxThrowNotSupportedException();
00511 }
00512
00513 void CConverter::SetLength(DWORD)
00514 {
00515   AfxThrowNotSupportedException();
00516 }
00517
00518 #endif
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/ResourcePage.h Source File

  • vc2008fp
  • MSOffice2007Demo

ResourcePage.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CResourcePage dialog
00016
00017 class CResourcePage : public CMFCPropertyPage
00018 {
00019   DECLARE_DYNCREATE(CResourcePage)
00020
00021 // Construction
00022 public:
00023   CResourcePage();
00024   ~CResourcePage();
00025
00026 // Dialog Data
00027   //{{AFX_DATA(CResourcePage)
00028   enum { IDD = IDD_RES_PAGE };
00029   //}}AFX_DATA
00030
00031 // Overrides
00032 protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034
00035 // Implementation
00036 protected:
00037   //{{AFX_MSG(CResourcePage)
00038   afx_msg void OnHome();
00039   afx_msg void OnContact();
00040   afx_msg void OnProduct();
00041   afx_msg void OnSupport();
00042   //}}AFX_MSG
00043
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/WatchBar.cpp Source File

  • vc2008fp
  • VisualStudioDemo

WatchBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "WatchBar.h"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 #define ID_LIST_1 1
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CWatchBar
00024
00025 CWatchBar::CWatchBar()
00026 {
00027 }
00028
00029 CWatchBar::~CWatchBar()
00030 {
00031 }
00032
00033 BEGIN_MESSAGE_MAP(CWatchBar, CDockablePane)
00034   ON_WM_CREATE()
00035   ON_WM_SIZE()
00036   ON_WM_PAINT()
00037   ON_WM_SETFOCUS()
00038 END_MESSAGE_MAP()
00039
00040 /////////////////////////////////////////////////////////////////////////////
00041 // CWatchBar message handlers
00042
00043 int CWatchBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00044 {
00045   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00046     return -1;
00047
00048   m_Font.CreateStockObject(DEFAULT_GUI_FONT);
00049
00050   CRect rectDummy;
00051   rectDummy.SetRectEmpty();
00052
00053   // Create output pane:
00054   const DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_VSCROLL | LVS_REPORT;
00055
00056   m_wndWatch.Create(dwStyle, rectDummy, this, ID_LIST_1);
00057   m_wndWatch.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
00058   m_wndWatch.InsertColumn(0, _T("Variable"), LVCFMT_LEFT, 100);
00059   m_wndWatch.InsertColumn(1, _T("Value"), LVCFMT_LEFT, 100);
00060
00061   m_wndWatch.InsertItem(0, _T("m_nCount"));
00062   m_wndWatch.SetItemText(0, 1, _T("100"));
00063
00064   m_wndWatch.SetFont(&m_Font);
00065
00066   return 0;
00067 }
00068
00069 void CWatchBar::OnSize(UINT nType, int cx, int cy)
00070 {
00071   CDockablePane::OnSize(nType, cx, cy);
00072
00073   if (CanAdjustLayout())
00074   {
00075     CRect rc;
00076     GetClientRect(rc);
00077
00078     m_wndWatch.SetWindowPos(NULL, rc.left + 1, rc.top + 1, rc.Width() - 2, rc.Height() - 2, SWP_NOACTIVATE | SWP_NOZORDER);
00079   }
00080 }
00081
00082 void CWatchBar::OnPaint()
00083 {
00084   CPaintDC dc(this); // device context for painting
00085
00086   CRect rectTree;
00087   m_wndWatch.GetWindowRect(rectTree);
00088   ScreenToClient(rectTree);
00089
00090   rectTree.InflateRect(1, 1);
00091   dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
00092 }
00093
00094 void CWatchBar::OnSetFocus(CWnd* pOldWnd)
00095 {
00096   CDockablePane::OnSetFocus(pOldWnd);
00097   m_wndWatch.SetFocus();
00098 }
00099
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/MainFrm.h Source File

  • vc2008fp
  • OutlookDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #define CFrameWnd CFrameWndEx
00013
00014 #include "FolderListBar.h"
00015 #include "CalendarBar.h"
00016
00017 class CWorkspaceObj;
00018
00019 class CMyOutlookBar : public CMFCOutlookBar
00020 {
00021   virtual BOOL AllowShowOnPaneMenu() const;
00022   virtual void GetPaneName(CString& strName) const
00023   {
00024     strName = _T("Outlook Bar");
00025   }
00026   virtual BOOL OnShowControlBarMenu(CPoint point)
00027   {
00028     return TRUE;
00029   }
00030 };
00031
00032 class CShellTreeCtrl : public CMFCShellTreeCtrl
00033 {
00034   virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
00035   {
00036     BOOL bRes = CMFCShellTreeCtrl::OnNotify(wParam, lParam, pResult);
00037
00038     NMHDR* pNMHDR = (NMHDR*)lParam;
00039     ASSERT (pNMHDR != NULL);
00040
00041     if (pNMHDR && pNMHDR->code == TTN_SHOW && GetToolTips () != NULL)
00042     {
00043       GetToolTips ()->SetWindowPos (&wndTop, -1, -1, -1, -1,
00044       SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE);
00045     }
00046
00047     return bRes;
00048   }
00049 };
00050
00051 class CMainFrame : public CFrameWnd
00052 {
00053 protected: // create from serialization only
00054   CMainFrame();
00055   DECLARE_DYNCREATE(CMainFrame)
00056
00057 // Attributes
00058 public:
00059   BOOL IsOutlookBar2003() const
00060   {
00061     return m_bOutlookBar2003;
00062   }
00063
00064 // Operations
00065 public:
00066   void SetWorkSpace(CWorkspaceObj* pWorkSpace);
00067   void OnCloseFoldersPopup(BOOL bKeep);
00068   virtual void AdjustDockingLayout(HDWP hdwp = NULL);
00069
00070   void OnChangeLook(BOOL bOutlookBar2003);
00071
00072 // Overrides
00073 public:
00074   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00075   virtual void RecalcLayout(BOOL bNotify = TRUE);
00076   virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
00077
00078 protected:
00079   virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00080
00081 // Implementation
00082 public:
00083   virtual ~CMainFrame();
00084 #ifdef _DEBUG
00085   virtual void AssertValid() const;
00086   virtual void Dump(CDumpContext& dc) const;
00087 #endif
00088
00089 protected:  // control bar embedded members
00090   CMFCMenuBar m_wndMenuBar;
00091   CMFCStatusBar m_wndStatusBar;
00092
00093   CImageList m_imlStatusAnimation;
00094
00095   CMFCToolBar m_wndToolBar;
00096   CMFCToolBar m_wndToolBarAdvanced;
00097   CMFCToolBar m_wndToolBarWeb;
00098
00099   CMyOutlookBar m_wndBarOutlook;
00100   CMyOutlookBar m_wndBarOutlook2003;
00101
00102   // Outlook bar panes:
00103   CMFCOutlookBarPane m_wndOutlookPane1;
00104   CMFCOutlookBarPane m_wndOutlookPane2;
00105   CShellTreeCtrl m_wndTree;
00106   CCalendarBar m_wndCalendar;
00107
00108   // Outlook bar-2003 panes:
00109   CMFCOutlookBarPane m_wndOutlookPane12003;
00110   CMFCOutlookBarPane m_wndOutlookPane22003;
00111   CShellTreeCtrl m_wndTree2003;
00112   CCalendarBar m_wndCalendar2003;
00113
00114   UINT m_uiHilightedPage;
00115
00116   CMFCCaptionBar m_wndCaption;
00117
00118   CFolderListBar m_wndFolderList;
00119
00120   CSplitterWndEx m_wndSplitter;
00121
00122   CMFCToolBarImages m_UserImages;
00123   CImageList m_ImagesSmall;
00124
00125   CObList m_lstWorkspaces; // List of CWorkspaceObj
00126   CWorkspaceObj* m_pCurrWorkSpace;
00127
00128   BOOL m_bOutlookBar2003;
00129
00130 protected:
00131   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00132   afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
00133   afx_msg void OnOutlookAddPage();
00134   afx_msg void OnOutlookAnimation();
00135   afx_msg void OnOutlookDeletePage();
00136   afx_msg void OnOutlookRenamePage();
00137   afx_msg void OnOutlookShowTextLabels();
00138   afx_msg void OnUpdateOutlookRenamePage(CCmdUI* pCmdUI);
00139   afx_msg void OnUpdateOutlookDeletePage(CCmdUI* pCmdUI);
00140   afx_msg void OnUpdateOutlookAnimation(CCmdUI* pCmdUI);
00141   afx_msg void OnUpdateOutlookShowTextLabels(CCmdUI* pCmdUI);
00142   afx_msg void OnResetPage();
00143   afx_msg void OnUpdateResetPage(CCmdUI* pCmdUI);
00144   afx_msg void OnClose();
00145   afx_msg void OnUpdateOutlookAddPage(CCmdUI* pCmdUI);
00146   afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
00147   afx_msg void OnEnable( BOOL bEnable );
00148   afx_msg void OnViewCaptionbar();
00149   afx_msg void OnUpdateViewCaptionbar(CCmdUI* pCmdUI);
00150   afx_msg void OnViewFolderList();
00151   afx_msg void OnUpdateViewFolderList(CCmdUI* pCmdUI);
00152   afx_msg void OnViewOutlookbar();
00153   afx_msg void OnUpdateViewOutlookbar(CCmdUI* pCmdUI);
00154   afx_msg void OnViewCustomize();
00155   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00156   afx_msg LRESULT OnToolbarCreateNew(WPARAM,LPARAM);
00157   afx_msg void OnUpdateIndicatorSendReceive(CCmdUI* pCmdUI);
00158   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00159   afx_msg void OnViewWorkSpace(UINT ud);
00160   afx_msg void OnViewMyComputer();
00161   afx_msg void OnViewFoldersPopup();
00162
00163   DECLARE_MESSAGE_MAP()
00164
00165   BOOL CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID, CMFCOutlookBarPane& pane1, CMFCOutlookBarPane& pane2, CShellTreeCtrl& tree, CCalendarBar& calendar, int nInitialWidth);
00166   BOOL CreateCaptionBar();
00167
00168   void SetBasicCommands();
00169
00170   void AddWorkSpace(const CString& strName, const int iIconIndex, const UINT uiCmd, CMFCOutlookBarPane& pane, const UINT uiNewCmdID, CImageList& images);
00171   int FindFocusedOutlookWnd(CMFCOutlookBarTabCtrl** ppOutlookWnd);
00172   CMFCOutlookBarTabCtrl* FindOutlookParent(CWnd* pWnd);
00173   CMFCOutlookBarTabCtrl* m_pCurrOutlookWnd;
00174
00175   CMFCOutlookBarPane* m_pCurrOutlookPage;
00176 };
00177
00178
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/docktool.cpp Source File

  • general
  • docktool

docktool.cpp

Go to the documentation of this file.
00001 // docktool.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "docktool.h"
00014
00015 #include "mainfrm.h"
00016 #include "dockdoc.h"
00017 #include "dockvw.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CDockApp
00026
00027 BEGIN_MESSAGE_MAP(CDockApp, CWinApp)
00028   //{{AFX_MSG_MAP(CDockApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code!
00032   //}}AFX_MSG_MAP
00033   // Standard file based document commands
00034   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00035   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CDockApp construction
00040
00041 CDockApp::CDockApp()
00042 {
00043   // TODO: add construction code here,
00044   // Place all significant initialization in InitInstance
00045 }
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // The one and only CDockApp object
00049
00050 CDockApp theApp;
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CDockApp initialization
00054
00055 BOOL CDockApp::InitInstance()
00056 {
00057   // Standard initialization
00058   // If you are not using these features and wish to reduce the size
00059   //  of your final executable, you should remove from the following
00060   //  the specific initialization routines you do not need.
00061
00062   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00063
00064   // Register the application's document templates.  Document templates
00065   //  serve as the connection between documents, frame windows and views.
00066
00067   CSingleDocTemplate* pDocTemplate;
00068   pDocTemplate = new CSingleDocTemplate(
00069     IDR_MAINFRAME,
00070     RUNTIME_CLASS(CDockDoc),
00071     RUNTIME_CLASS(CMainFrame),          // standard MDI child frame
00072     RUNTIME_CLASS(CDockView));
00073   AddDocTemplate(pDocTemplate);
00074
00075   // create a new (empty) document
00076   OnFileNew();
00077
00078   return TRUE;
00079 }
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CAboutDlg dialog used for App About
00083
00084 class CAboutDlg : public CDialog
00085 {
00086 public:
00087   CAboutDlg();
00088
00089 // Dialog Data
00090   //{{AFX_DATA(CAboutDlg)
00091   enum { IDD = IDD_ABOUTBOX };
00092   //}}AFX_DATA
00093
00094 // Implementation
00095 protected:
00096   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00097   //{{AFX_MSG(CAboutDlg)
00098     // No message handlers
00099   //}}AFX_MSG
00100   DECLARE_MESSAGE_MAP()
00101 };
00102
00103 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00104 {
00105   //{{AFX_DATA_INIT(CAboutDlg)
00106   //}}AFX_DATA_INIT
00107 }
00108
00109 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00110 {
00111   CDialog::DoDataExchange(pDX);
00112   //{{AFX_DATA_MAP(CAboutDlg)
00113   //}}AFX_DATA_MAP
00114 }
00115
00116 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00117   //{{AFX_MSG_MAP(CAboutDlg)
00118     // No message handlers
00119   //}}AFX_MSG_MAP
00120 END_MESSAGE_MAP()
00121
00122 // App command to run the dialog
00123 void CDockApp::OnAppAbout()
00124 {
00125   CAboutDlg aboutDlg;
00126   aboutDlg.DoModal();
00127 }
00128
00129 /////////////////////////////////////////////////////////////////////////////
00130 // CDockApp commands
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/StdAfx.h Source File

  • vc2008fp
  • PaletteDemo

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClient.h Source File

  • vc2008fp
  • DrawClient

DrawClient.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #ifndef __AFXWIN_H__
00013 #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017 #include <afxtempl.h>       // drawcli uses collection class templates
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDrawApp:
00021 // See drawcli.cpp for the implementation of this class
00022 //
00023
00024 class CDrawApp : public CWinAppEx
00025 {
00026 public:
00027   CDrawApp();
00028
00029   // Overrides
00030   virtual BOOL InitInstance();
00031   virtual int ExitInstance();
00032
00033   COleTemplateServer m_server;
00034
00035   // Implementation
00036 protected:
00037   //{{AFX_MSG(CDrawApp)
00038   afx_msg void OnAppAbout();
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043 extern CDrawApp theApp;
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/stdafx.h Source File

  • general
  • multipad

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TypeAttr.Cpp Source File

  • ole
  • TstCon

TypeAttr.Cpp

Go to the documentation of this file.
00001 // File: TypeAttr.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 CSmartTypeAttr::CSmartTypeAttr( ITypeInfo* pTypeInfo ) :
00020    m_pTypeAttr( NULL ),
00021    m_pTypeInfo( pTypeInfo )
00022 {
00023 }
00024
00025 CSmartTypeAttr::~CSmartTypeAttr()
00026 {
00027    Release();
00028 }
00029
00030 TYPEATTR* CSmartTypeAttr::operator->()
00031 {
00032    ASSERT( m_pTypeAttr != NULL );
00033
00034    return( m_pTypeAttr );
00035 }
00036
00037 TYPEATTR** CSmartTypeAttr::operator&()
00038 {
00039    ASSERT( m_pTypeAttr == NULL );
00040
00041    return( &m_pTypeAttr );
00042 }
00043
00044 void CSmartTypeAttr::Release()
00045 {
00046    if( m_pTypeAttr != NULL )
00047    {
00048     ASSERT( m_pTypeInfo != NULL );
00049     m_pTypeInfo->ReleaseTypeAttr( m_pTypeAttr );
00050     m_pTypeAttr = NULL;
00051    }
00052 }
00053
00054 CSmartVarDesc::CSmartVarDesc( ITypeInfo* pTypeInfo ) :
00055    m_pVarDesc( NULL ),
00056    m_pTypeInfo( pTypeInfo )
00057 {
00058 }
00059
00060 CSmartVarDesc::~CSmartVarDesc()
00061 {
00062    Release();
00063 }
00064
00065 VARDESC* CSmartVarDesc::operator->()
00066 {
00067    ASSERT( m_pVarDesc != NULL );
00068
00069    return( m_pVarDesc );
00070 }
00071
00072 VARDESC** CSmartVarDesc::operator&()
00073 {
00074    ASSERT( m_pVarDesc == NULL );
00075
00076    return( &m_pVarDesc );
00077 }
00078
00079 CSmartVarDesc::operator const VARDESC*() const
00080 {
00081    return( m_pVarDesc );
00082 }
00083
00084 void CSmartVarDesc::Release()
00085 {
00086    if( m_pVarDesc != NULL )
00087    {
00088     ASSERT( m_pTypeInfo != NULL );
00089     m_pTypeInfo->ReleaseVarDesc( m_pVarDesc );
00090     m_pVarDesc = NULL;
00091    }
00092 }
00093
00094 CSmartFuncDesc::CSmartFuncDesc( ITypeInfo* pTypeInfo ) :
00095    m_pFuncDesc( NULL ),
00096    m_pTypeInfo( pTypeInfo )
00097 {
00098 }
00099
00100 CSmartFuncDesc::~CSmartFuncDesc()
00101 {
00102    Release();
00103 }
00104
00105 FUNCDESC* CSmartFuncDesc::operator->()
00106 {
00107    ASSERT( m_pFuncDesc != NULL );
00108
00109    return( m_pFuncDesc );
00110 }
00111
00112 FUNCDESC** CSmartFuncDesc::operator&()
00113 {
00114    ASSERT( m_pFuncDesc == NULL );
00115
00116    return( &m_pFuncDesc );
00117 }
00118
00119 CSmartFuncDesc::operator const FUNCDESC*() const
00120 {
00121    return( m_pFuncDesc );
00122 }
00123
00124 void CSmartFuncDesc::Release()
00125 {
00126    if( m_pFuncDesc != NULL )
00127    {
00128     ASSERT( m_pTypeInfo != NULL );
00129     m_pTypeInfo->ReleaseFuncDesc( m_pFuncDesc );
00130     m_pFuncDesc = NULL;
00131    }
00132 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInsertTableDlg Member List

This is the complete list of members for CInsertTableDlg, including all inherited members.
CInsertTableDlg(CWnd *pParent=NULL) | CInsertTableDlg |
DoDataExchange(CDataExchange *pDX) | CInsertTableDlg | [protected, virtual]
IDD enum value | CInsertTableDlg |
m_Caption | CInsertTableDlg |
m_CellAttribs | CInsertTableDlg |
m_NumCols | CInsertTableDlg |
m_NumRows | CInsertTableDlg |
m_TableAttribs | CInsertTableDlg |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/dibview.cpp Source File

  • general
  • diblook

dibview.cpp

Go to the documentation of this file.
00001 // dibview.cpp : implementation of the CDibView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "diblook.h"
00014
00015 #include "dibdoc.h"
00016 #include "dibview.h"
00017 #include "dibapi.h"
00018 #include "mainfrm.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CDibView
00027
00028 IMPLEMENT_DYNCREATE(CDibView, CScrollView)
00029
00030 BEGIN_MESSAGE_MAP(CDibView, CScrollView)
00031   //{{AFX_MSG_MAP(CDibView)
00032   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00033   ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy)
00034   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00035   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste)
00036   ON_MESSAGE(WM_DOREALIZE, OnDoRealize)
00037   //}}AFX_MSG_MAP
00038
00039   // Standard printing commands
00040   ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
00041   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
00042 END_MESSAGE_MAP()
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CDibView construction/destruction
00046
00047 CDibView::CDibView()
00048 {
00049 }
00050
00051 CDibView::~CDibView()
00052 {
00053 }
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CDibView drawing
00057
00058 void CDibView::OnDraw(CDC* pDC)
00059 {
00060   CDibDoc* pDoc = GetDocument();
00061
00062   HDIB hDIB = pDoc->GetHDIB();
00063   if (hDIB != NULL)
00064   {
00065     LPSTR lpDIB = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
00066     int cxDIB = (int) ::DIBWidth(lpDIB);         // Size of DIB - x
00067     int cyDIB = (int) ::DIBHeight(lpDIB);        // Size of DIB - y
00068     ::GlobalUnlock((HGLOBAL) hDIB);
00069     CRect rcDIB;
00070     rcDIB.top = rcDIB.left = 0;
00071     rcDIB.right = cxDIB;
00072     rcDIB.bottom = cyDIB;
00073     CRect rcDest;
00074     if (pDC->IsPrinting())   // printer DC
00075     {
00076       // get size of printer page (in pixels)
00077       int cxPage = pDC->GetDeviceCaps(HORZRES);
00078       // int cyPage = pDC->GetDeviceCaps(VERTRES);
00079       // get printer pixels per inch
00080       int cxInch = pDC->GetDeviceCaps(LOGPIXELSX);
00081       int cyInch = pDC->GetDeviceCaps(LOGPIXELSY);
00082
00083       //
00084       // Best Fit case -- create a rectangle which preserves
00085       // the DIB's aspect ratio, and fills the page horizontally.
00086       //
00087       // The formula in the "->bottom" field below calculates the Y
00088       // position of the printed bitmap, based on the size of the
00089       // bitmap, the width of the page, and the relative size of
00090       // a printed pixel (cyInch / cxInch).
00091       //
00092       rcDest.top = rcDest.left = 0;
00093       rcDest.bottom = (int)(((double)cyDIB * cxPage * cyInch)
00094           / ((double)cxDIB * cxInch));
00095       rcDest.right = cxPage;
00096     }
00097     else   // not printer DC
00098     {
00099       rcDest = rcDIB;
00100     }
00101 		::PaintDIB(pDC->m_hDC, &rcDest, pDoc->GetHDIB(),
00102       &rcDIB, pDoc->GetDocPalette());
00103   }
00104 }
00105
00106 /////////////////////////////////////////////////////////////////////////////
00107 // CDibView printing
00108
00109 BOOL CDibView::OnPreparePrinting(CPrintInfo* pInfo)
00110 {
00111   // default preparation
00112   return DoPreparePrinting(pInfo);
00113 }
00114
00115 /////////////////////////////////////////////////////////////////////////////
00116 // CDibView commands
00117
00118
00119 LRESULT CDibView::OnDoRealize(WPARAM wParam, LPARAM)
00120 {
00121   ASSERT(wParam != NULL);
00122   CDibDoc* pDoc = GetDocument();
00123   if (pDoc->GetHDIB() == NULL)
00124     return 0L;  // must be a new document
00125
00126   CPalette* pPal = pDoc->GetDocPalette();
00127   if (pPal != NULL)
00128   {
00129     CMainFrame* pAppFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
00130     ASSERT_KINDOF(CMainFrame, pAppFrame);
00131
00132     CClientDC appDC(pAppFrame);
00133     // All views but one should be a background palette.
00134     // wParam contains a handle to the active view, so the SelectPalette
00135     // bForceBackground flag is FALSE only if wParam == m_hWnd (this view)
00136     CPalette* oldPalette = appDC.SelectPalette(pPal, ((HWND)wParam) != m_hWnd);
00137
00138     if (oldPalette != NULL)
00139     {
00140       UINT nColorsChanged = appDC.RealizePalette();
00141       if (nColorsChanged > 0)
00142         pDoc->UpdateAllViews(NULL);
00143       appDC.SelectPalette(oldPalette, TRUE);
00144     }
00145     else
00146     {
00147       TRACE0("\tSelectPalette failed in CDibView::OnPaletteChanged\n");
00148     }
00149   }
00150
00151   return 0L;
00152 }
00153
00154 void CDibView::OnInitialUpdate()
00155 {
00156   CScrollView::OnInitialUpdate();
00157   ASSERT(GetDocument() != NULL);
00158
00159   SetScrollSizes(MM_TEXT, GetDocument()->GetDocSize());
00160 }
00161
00162
00163 void CDibView::OnActivateView(BOOL bActivate, CView* pActivateView,
00164           CView* pDeactiveView)
00165 {
00166   CScrollView::OnActivateView(bActivate, pActivateView, pDeactiveView);
00167
00168   if (bActivate)
00169   {
00170     ASSERT(pActivateView == this);
00171     OnDoRealize((WPARAM)m_hWnd, 0);   // same as SendMessage(WM_DOREALIZE);
00172   }
00173 }
00174
00175 void CDibView::OnEditCopy()
00176 {
00177   CDibDoc* pDoc = GetDocument();
00178   // Clean clipboard of contents, and copy the DIB.
00179
00180   if (OpenClipboard())
00181   {
00182     BeginWaitCursor();
00183     EmptyClipboard();
00184     SetClipboardData (CF_DIB, CopyHandle((HANDLE) pDoc->GetHDIB()) );
00185     CloseClipboard();
00186     EndWaitCursor();
00187   }
00188 }
00189
00190
00191
00192 void CDibView::OnUpdateEditCopy(CCmdUI* pCmdUI)
00193 {
00194   pCmdUI->Enable(GetDocument()->GetHDIB() != NULL);
00195 }
00196
00197
00198 void CDibView::OnEditPaste()
00199 {
00200   HDIB hNewDIB = NULL;
00201
00202   if (OpenClipboard())
00203   {
00204     BeginWaitCursor();
00205
00206     hNewDIB = (HDIB) CopyHandle(::GetClipboardData(CF_DIB));
00207
00208     CloseClipboard();
00209
00210     if (hNewDIB != NULL)
00211     {
00212       CDibDoc* pDoc = GetDocument();
00213       pDoc->ReplaceHDIB(hNewDIB); // and free the old DIB
00214       pDoc->InitDIBData();    // set up new size & palette
00215       pDoc->SetModifiedFlag(TRUE);
00216
00217       SetScrollSizes(MM_TEXT, pDoc->GetDocSize());
00218       OnDoRealize((WPARAM)m_hWnd,0);  // realize the new palette
00219       pDoc->UpdateAllViews(NULL);
00220     }
00221     EndWaitCursor();
00222   }
00223 }
00224
00225
00226 void CDibView::OnUpdateEditPaste(CCmdUI* pCmdUI)
00227 {
00228   pCmdUI->Enable(::IsClipboardFormatAvailable(CF_DIB));
00229 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/listvwex.cpp Source File

  • general
  • rowlist

listvwex.cpp

Go to the documentation of this file.
00001 // ListVwEx.cpp : implementation of the CListViewEx class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "ListVwEx.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CListViewEx
00023
00024 IMPLEMENT_DYNCREATE(CListViewEx, CListView)
00025
00026 BEGIN_MESSAGE_MAP(CListViewEx, CListView)
00027   //{{AFX_MSG_MAP(CListViewEx)
00028   ON_WM_SIZE()
00029   ON_WM_PAINT()
00030   ON_WM_SETFOCUS()
00031   ON_WM_KILLFOCUS()
00032   //}}AFX_MSG_MAP
00033   ON_MESSAGE(LVM_SETIMAGELIST, OnSetImageList)
00034   ON_MESSAGE(LVM_SETTEXTCOLOR, OnSetTextColor)
00035   ON_MESSAGE(LVM_SETTEXTBKCOLOR, OnSetTextBkColor)
00036   ON_MESSAGE(LVM_SETBKCOLOR, OnSetBkColor)
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CListViewEx construction/destruction
00041
00042 CListViewEx::CListViewEx()
00043 {
00044   m_bFullRowSel = FALSE;
00045   m_bClientWidthSel = TRUE;
00046
00047   m_cxClient = 0;
00048   m_cxStateImageOffset = 0;
00049
00050   m_clrText = ::GetSysColor(COLOR_WINDOWTEXT);
00051   m_clrTextBk = ::GetSysColor(COLOR_WINDOW);
00052   m_clrBkgnd = ::GetSysColor(COLOR_WINDOW);
00053 }
00054
00055 CListViewEx::~CListViewEx()
00056 {
00057 }
00058
00059 BOOL CListViewEx::PreCreateWindow(CREATESTRUCT& cs)
00060 {
00061   // default is report view and full row selection
00062   cs.style &= ~LVS_TYPEMASK;
00063   cs.style |= LVS_REPORT | LVS_OWNERDRAWFIXED;
00064   m_bFullRowSel = TRUE;
00065
00066   return(CListView::PreCreateWindow(cs));
00067 }
00068
00069 BOOL CListViewEx::SetFullRowSel(BOOL bFullRowSel)
00070 {
00071   // no painting during change
00072   LockWindowUpdate();
00073
00074   m_bFullRowSel = bFullRowSel;
00075
00076   BOOL bRet;
00077
00078   if (m_bFullRowSel)
00079     bRet = ModifyStyle(0L, LVS_OWNERDRAWFIXED);
00080   else
00081     bRet = ModifyStyle(LVS_OWNERDRAWFIXED, 0L);
00082
00083   // repaint window if we are not changing view type
00084   if (bRet && (GetStyle() & LVS_TYPEMASK) == LVS_REPORT)
00085     Invalidate();
00086
00087   // repaint changes
00088   UnlockWindowUpdate();
00089
00090   return(bRet);
00091 }
00092
00093 BOOL CListViewEx::GetFullRowSel()
00094 {
00095   return(m_bFullRowSel);
00096 }
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CListViewEx drawing
00100
00101 // offsets for first and other columns
00102 #define OFFSET_FIRST    2
00103 #define OFFSET_OTHER    6
00104
00105 void CListViewEx::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00106 {
00107   CListCtrl& ListCtrl=GetListCtrl();
00108   CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
00109   CRect rcItem(lpDrawItemStruct->rcItem);
00110   UINT uiFlags = ILD_TRANSPARENT;
00111   CImageList* pImageList;
00112   int nItem = lpDrawItemStruct->itemID;
00113   BOOL bFocus = (GetFocus() == this);
00114   COLORREF clrTextSave = 0;
00115   COLORREF clrBkSave = 0;
00116   COLORREF clrImage = m_clrBkgnd;
00117   static _TCHAR szBuff[MAX_PATH];
00118   LPCTSTR pszText;
00119
00120 // get item data
00121
00122   LV_ITEM lvi;
00123   lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
00124   lvi.iItem = nItem;
00125   lvi.iSubItem = 0;
00126   lvi.pszText = szBuff;
00127   lvi.cchTextMax = sizeof(szBuff);
00128   lvi.stateMask = 0xFFFF;     // get all state flags
00129   ListCtrl.GetItem(&lvi);
00130
00131   BOOL bSelected = (bFocus || (GetStyle() & LVS_SHOWSELALWAYS)) && lvi.state & LVIS_SELECTED;
00132   bSelected = bSelected || (lvi.state & LVIS_DROPHILITED);
00133
00134 // set colors if item is selected
00135
00136   CRect rcAllLabels;
00137   ListCtrl.GetItemRect(nItem, rcAllLabels, LVIR_BOUNDS);
00138
00139   CRect rcLabel;
00140   ListCtrl.GetItemRect(nItem, rcLabel, LVIR_LABEL);
00141
00142   rcAllLabels.left = rcLabel.left;
00143   if (m_bClientWidthSel && rcAllLabels.right<m_cxClient)
00144     rcAllLabels.right = m_cxClient;
00145
00146   if (bSelected)
00147   {
00148     clrTextSave = pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));
00149     clrBkSave = pDC->SetBkColor(::GetSysColor(COLOR_HIGHLIGHT));
00150
00151     CBrush cbr(::GetSysColor(COLOR_HIGHLIGHT));
00152     pDC->FillRect(rcAllLabels, &cbr);
00153   }
00154   else
00155   {
00156     CBrush cbr(m_clrTextBk);
00157     pDC->FillRect(rcAllLabels, &cbr);
00158   }
00159
00160 // set color and mask for the icon
00161
00162   if (lvi.state & LVIS_CUT)
00163   {
00164     clrImage = m_clrBkgnd;
00165     uiFlags |= ILD_BLEND50;
00166   }
00167   else if (bSelected)
00168   {
00169     clrImage = ::GetSysColor(COLOR_HIGHLIGHT);
00170     uiFlags |= ILD_BLEND50;
00171   }
00172
00173 // draw state icon
00174
00175   UINT nStateImageMask = lvi.state & LVIS_STATEIMAGEMASK;
00176   if (nStateImageMask)
00177   {
00178     int nImage = (nStateImageMask>>12) - 1;
00179     pImageList = ListCtrl.GetImageList(LVSIL_STATE);
00180     if (pImageList)
00181     {
00182       pImageList->Draw(pDC, nImage,
00183         CPoint(rcItem.left, rcItem.top), ILD_TRANSPARENT);
00184     }
00185   }
00186
00187 // draw normal and overlay icon
00188
00189   CRect rcIcon;
00190   ListCtrl.GetItemRect(nItem, rcIcon, LVIR_ICON);
00191
00192   pImageList = ListCtrl.GetImageList(LVSIL_SMALL);
00193   if (pImageList)
00194   {
00195     UINT nOvlImageMask=lvi.state & LVIS_OVERLAYMASK;
00196     if (rcItem.left<rcItem.right-1)
00197     {
00198       ImageList_DrawEx(pImageList->m_hImageList, lvi.iImage,
00199           pDC->m_hDC,rcIcon.left,rcIcon.top, 16, 16,
00200           m_clrBkgnd, clrImage, uiFlags | nOvlImageMask);
00201     }
00202   }
00203
00204 // draw item label
00205
00206   ListCtrl.GetItemRect(nItem, rcItem, LVIR_LABEL);
00207   rcItem.right -= m_cxStateImageOffset;
00208
00209   pszText = MakeShortString(pDC, szBuff,
00210         rcItem.right-rcItem.left, 2*OFFSET_FIRST);
00211
00212   rcLabel = rcItem;
00213   rcLabel.left += OFFSET_FIRST;
00214   rcLabel.right -= OFFSET_FIRST;
00215
00216   pDC->DrawText(pszText,-1,rcLabel,DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER);
00217
00218 // draw labels for extra columns
00219
00220   LV_COLUMN lvc;
00221   lvc.mask = LVCF_FMT | LVCF_WIDTH;
00222
00223   for(int nColumn = 1; ListCtrl.GetColumn(nColumn, &lvc); nColumn++)
00224   {
00225     rcItem.left = rcItem.right;
00226     rcItem.right += lvc.cx;
00227
00228     int nRetLen = ListCtrl.GetItemText(nItem, nColumn,
00229             szBuff, sizeof(szBuff));
00230     if (nRetLen == 0)
00231       continue;
00232
00233     pszText = MakeShortString(pDC, szBuff,
00234       rcItem.right - rcItem.left, 2*OFFSET_OTHER);
00235
00236     UINT nJustify = DT_LEFT;
00237
00238     if(pszText == szBuff)
00239     {
00240       switch(lvc.fmt & LVCFMT_JUSTIFYMASK)
00241       {
00242       case LVCFMT_RIGHT:
00243         nJustify = DT_RIGHT;
00244         break;
00245       case LVCFMT_CENTER:
00246         nJustify = DT_CENTER;
00247         break;
00248       default:
00249         break;
00250       }
00251     }
00252
00253     rcLabel = rcItem;
00254     rcLabel.left += OFFSET_OTHER;
00255     rcLabel.right -= OFFSET_OTHER;
00256
00257     pDC->DrawText(pszText, -1, rcLabel,
00258       nJustify | DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER);
00259   }
00260
00261 // draw focus rectangle if item has focus
00262
00263   if (lvi.state & LVIS_FOCUSED && bFocus)
00264     pDC->DrawFocusRect(rcAllLabels);
00265
00266 // set original colors if item was selected
00267
00268   if (bSelected)
00269   {
00270     pDC->SetTextColor(clrTextSave);
00271     pDC->SetBkColor(clrBkSave);
00272   }
00273 }
00274
00275 LPCTSTR CListViewEx::MakeShortString(CDC* pDC, LPCTSTR lpszLong, int nColumnLen, int nOffset)
00276 {
00277   static const _TCHAR szThreeDots[] = _T("...");
00278
00279   int nStringLen = lstrlen(lpszLong);
00280
00281   if(nStringLen == 0 ||
00282     (pDC->GetTextExtent(lpszLong, nStringLen).cx + nOffset) <= nColumnLen)
00283   {
00284     return(lpszLong);
00285   }
00286
00287   static _TCHAR szShort[MAX_PATH];
00288
00289   _tcsncpy_s(szShort,MAX_PATH,lpszLong,_TRUNCATE);
00290   int nAddLen = pDC->GetTextExtent(szThreeDots,sizeof(szThreeDots)).cx;
00291
00292   for(int i = nStringLen-1; i > 0; i--)
00293   {
00294     szShort[i] = 0;
00295     if((pDC->GetTextExtent(szShort, i).cx + nOffset + nAddLen)
00296       <= nColumnLen)
00297     {
00298       break;
00299     }
00300   }
00301
00302   _tcscat_s(szShort, MAX_PATH, szThreeDots);
00303   return(szShort);
00304 }
00305
00306 void CListViewEx::RepaintSelectedItems()
00307 {
00308   CListCtrl& ListCtrl = GetListCtrl();
00309   CRect rcItem, rcLabel;
00310
00311 // invalidate focused item so it can repaint properly
00312
00313   int nItem = ListCtrl.GetNextItem(-1, LVNI_FOCUSED);
00314
00315   if(nItem != -1)
00316   {
00317     ListCtrl.GetItemRect(nItem, rcItem, LVIR_BOUNDS);
00318     ListCtrl.GetItemRect(nItem, rcLabel, LVIR_LABEL);
00319     rcItem.left = rcLabel.left;
00320
00321     InvalidateRect(rcItem, FALSE);
00322   }
00323
00324 // if selected items should not be preserved, invalidate them
00325
00326   if(!(GetStyle() & LVS_SHOWSELALWAYS))
00327   {
00328     for(nItem = ListCtrl.GetNextItem(-1, LVNI_SELECTED);
00329       nItem != -1; nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED))
00330     {
00331       ListCtrl.GetItemRect(nItem, rcItem, LVIR_BOUNDS);
00332       ListCtrl.GetItemRect(nItem, rcLabel, LVIR_LABEL);
00333       rcItem.left = rcLabel.left;
00334
00335       InvalidateRect(rcItem, FALSE);
00336     }
00337   }
00338
00339 // update changes
00340
00341   UpdateWindow();
00342 }
00343
00344 /////////////////////////////////////////////////////////////////////////////
00345 // CListViewEx diagnostics
00346
00347 #ifdef _DEBUG
00348
00349 void CListViewEx::Dump(CDumpContext& dc) const
00350 {
00351   CListView::Dump(dc);
00352
00353   dc << "m_bFullRowSel = " << (UINT)m_bFullRowSel;
00354   dc << "\n";
00355   dc << "m_cxStateImageOffset = " << m_cxStateImageOffset;
00356   dc << "\n";
00357 }
00358
00359 #endif //_DEBUG
00360
00361 /////////////////////////////////////////////////////////////////////////////
00362 // CListViewEx message handlers
00363
00364 LRESULT CListViewEx::OnSetImageList(WPARAM wParam, LPARAM lParam)
00365 {
00366   // if we're running Windows 4, there's no need to offset the
00367   // item text location
00368
00369   OSVERSIONINFO info;
00370   info.dwOSVersionInfoSize = sizeof(info);
00371   VERIFY(::GetVersionEx(&info));
00372
00373   if( (int) wParam == LVSIL_STATE && info.dwMajorVersion < 4)
00374   {
00375     int cx, cy;
00376
00377     if(::ImageList_GetIconSize((HIMAGELIST)lParam, &cx, &cy))
00378       m_cxStateImageOffset = cx;
00379     else
00380       m_cxStateImageOffset = 0;
00381   }
00382
00383   return(Default());
00384 }
00385
00386 LRESULT CListViewEx::OnSetTextColor(WPARAM /*wParam*/, LPARAM lParam)
00387 {
00388   m_clrText = (COLORREF)lParam;
00389   return(Default());
00390 }
00391
00392 LRESULT CListViewEx::OnSetTextBkColor(WPARAM /*wParam*/, LPARAM lParam)
00393 {
00394   m_clrTextBk = (COLORREF)lParam;
00395   return(Default());
00396 }
00397
00398 LRESULT CListViewEx::OnSetBkColor(WPARAM /*wParam*/, LPARAM lParam)
00399 {
00400   m_clrBkgnd = (COLORREF)lParam;
00401   return(Default());
00402 }
00403
00404 void CListViewEx::OnSize(UINT nType, int cx, int cy)
00405 {
00406   m_cxClient = cx;
00407   CListView::OnSize(nType, cx, cy);
00408 }
00409
00410 void CListViewEx::OnPaint()
00411 {
00412   // in full row select mode, we need to extend the clipping region
00413   // so we can paint a selection all the way to the right
00414   if (m_bClientWidthSel &&
00415     (GetStyle() & LVS_TYPEMASK) == LVS_REPORT &&
00416     GetFullRowSel())
00417   {
00418     CRect rcAllLabels;
00419     GetListCtrl().GetItemRect(0, rcAllLabels, LVIR_BOUNDS);
00420
00421     if(rcAllLabels.right < m_cxClient)
00422     {
00423       // need to call BeginPaint (in CPaintDC c-tor)
00424       // to get correct clipping rect
00425       CPaintDC dc(this);
00426
00427       CRect rcClip;
00428       dc.GetClipBox(rcClip);
00429
00430       rcClip.left = min(rcAllLabels.right-1, rcClip.left);
00431       rcClip.right = m_cxClient;
00432
00433       InvalidateRect(rcClip, FALSE);
00434       // EndPaint will be called in CPaintDC d-tor
00435     }
00436   }
00437
00438   CListView::OnPaint();
00439 }
00440
00441 void CListViewEx::OnSetFocus(CWnd* pOldWnd)
00442 {
00443   CListView::OnSetFocus(pOldWnd);
00444
00445   // check if we are getting focus from label edit box
00446   if(pOldWnd!=NULL && pOldWnd->GetParent()==this)
00447     return;
00448
00449   // repaint items that should change appearance
00450   if(m_bFullRowSel && (GetStyle() & LVS_TYPEMASK)==LVS_REPORT)
00451     RepaintSelectedItems();
00452 }
00453
00454 void CListViewEx::OnKillFocus(CWnd* pNewWnd)
00455 {
00456   CListView::OnKillFocus(pNewWnd);
00457
00458   // check if we are losing focus to label edit box
00459   if(pNewWnd != NULL && pNewWnd->GetParent() == this)
00460     return;
00461
00462   // repaint items that should change appearance
00463   if(m_bFullRowSel && (GetStyle() & LVS_TYPEMASK) == LVS_REPORT)
00464     RepaintSelectedItems();
00465 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COwnerDrawMenuApp Member List

This is the complete list of members for COwnerDrawMenuApp, including all inherited members.
COwnerDrawMenuApp() | COwnerDrawMenuApp |
ExitInstance() | COwnerDrawMenuApp | [virtual]
InitInstance() | COwnerDrawMenuApp | [virtual]
OnAppAbout() | COwnerDrawMenuApp |
PreLoadState() | COwnerDrawMenuApp | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/stdafx.h Source File

  • vc2008fp
  • DrawClient

stdafx.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // stdafx.h : include file for standard system include files,
00013 // or project specific include files that are used frequently,
00014 // but are changed infrequently
00015
00016 #pragma once
00017
00018 #ifndef _SECURE_ATL
00019 #define _SECURE_ATL 1
00020 #endif
00021
00022 #ifndef VC_EXTRALEAN
00023 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
00024 #endif
00025
00026 #include "targetver.h"
00027
00028 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
00029
00030 // turns off MFC's hiding of some common and often safely ignored warning messages
00031 #define _AFX_ALL_WARNINGS
00032
00033 #include <afxwin.h>         // MFC core and standard components
00034 #include <afxext.h>         // MFC extensions
00035
00036 #include <afxole.h>         // MFC OLE classes
00037 #include <afxodlgs.h>       // MFC OLE dialog classes
00038
00039 #include <afxdisp.h>        // MFC Automation classes
00040
00041 #ifndef _AFX_NO_OLE_SUPPORT
00042 #include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
00043 #endif
00044 #ifndef _AFX_NO_AFXCMN_SUPPORT
00045 #include <afxcmn.h>         // MFC support for Windows Common Controls
00046 #endif // _AFX_NO_AFXCMN_SUPPORT
00047
00048 #pragma warning(disable : 4189)
00049 #include <afxrich.h>        // MFC rich edit classes
00050 #pragma warning(default : 4189)
00051
00052 #include <afxcontrolbars.h> // MFC ribbon and control bar classes
00053
00054 #if defined _M_IX86
00055 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00056 #elif defined _M_X64
00057 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00058 #else
00059 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00060 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/StdAfx.h Source File

  • controls
  • IMAGE

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //      or project specific include files that are used frequently,
00003 //      but are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00015
00016 #include <afxctl.h>         // MFC support for OLE Controls
00017
00018 // Delete the two includes below if you do not wish to use the MFC
00019 //  database classes
00020 #ifndef _UNICODE
00021 #include <afxdb.h>          // MFC database classes
00022 #endif //_UNICODE
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHueLeader Member List

This is the complete list of members for CHueLeader, including all inherited members.
Bounce(long &value, const int lower, const int upper, int &vel) | CRoamer | [inline]
CHueLeader() | CHueLeader |
CLeader() | CLeader |
DeltaRandom(int i) | CRoamer | [inline, static]
dx | CRoamer |
dy | CRoamer |
GetInitialLlamaColor() | CHueLeader | [virtual]
GetLlamaAcc() const | CLeader | [inline]
GetLlamaColor(COLORREF oldColor) | CHueLeader | [virtual]
GetLlamaVel() const | CLeader | [inline]
HSB(BYTE H, BYTE S, BYTE B) | CLeader | [protected, static]
Import(const CLeader *pRHS) | CLeader |
m_ColorTable | CHueLeader | [private]
m_nColorCounter | CHueLeader | [private]
m_nLlamaAcc | CLeader | [protected]
m_nLlamaVel | CLeader | [protected]
m_nMyAcc | CLeader | [protected]
m_nMyVel | CLeader | [protected]
p1 | CRoamer |
p2 | CRoamer |
SetSwarm(CSwarm *pSwarm) | CLeader | [virtual]
Tick() | CHueLeader | [virtual]
~CRoamer() | CRoamer | [inline, virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/resource.h Source File

  • general
  • mdidocvw

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by MDI.rc
00004 //
00005 #define IDM_BOUNCE                      10
00006 #define IDM_HELLO                       11
00007 #define ID_BLACK                        20
00008 #define IDM_BLACK                       20
00009 #define ID_RED                          21
00010 #define IDM_RED                         21
00011 #define ID_GREEN                        22
00012 #define IDM_GREEN                       22
00013 #define ID_BLUE                         23
00014 #define IDM_BLUE                        23
00015 #define ID_WHITE                        24
00016 #define IDM_WHITE                       24
00017 #define ID_CUSTOM                       25
00018 #define IDM_CUSTOM                      25
00019 #define IDM_FAST                        30
00020 #define IDM_SLOW                        31
00021 #define IDD_ABOUTBOX                    100
00022 #define IDR_MAINFRAME                   128
00023 #define IDR_HELLOTYPE                   129
00024 #define IDS_TIMER                       130
00025 #define IDR_BOUNCETYPE                  31234
00026 #define ID_FILE_NEWHELLO                32771
00027 #define ID_FILE_NEWBOUNCE               32772
00028 #define ID_SPEED_SLOW                   32778
00029 #define ID_SPEED_FAST                   32779
00030 #define IDS_NOHELLOTEMPLATE             32780
00031 #define ID_FAST                         32781
00032 #define IDS_NOBOUNCETEMPLATE            32781
00033 #define IDS_STANDARD                    32782
00034 #define ID_MIX                          32783
00035 #define IDS_UNKCOLOR                    32784
00036
00037 // Next default values for new objects
00038 //
00039 #ifdef APSTUDIO_INVOKED
00040 #ifndef APSTUDIO_READONLY_SYMBOLS
00041 #define _APS_NEXT_RESOURCE_VALUE        131
00042 #define _APS_NEXT_COMMAND_VALUE         32785
00043 #define _APS_NEXT_CONTROL_VALUE         1000
00044 #define _APS_NEXT_SYMED_VALUE           101
00045 #endif
00046 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomPagesApp Member List

This is the complete list of members for CCustomPagesApp, including all inherited members.
CCustomPagesApp() | CCustomPagesApp |
ExitInstance() | CCustomPagesApp | [virtual]
InitInstance() | CCustomPagesApp | [virtual]
OnAppAbout() | CCustomPagesApp |
PreLoadState() | CCustomPagesApp | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMailView Member List

This is the complete list of members for CMailView, including all inherited members.
CMailView() | CMailView | [protected]
m_nPriority | CMailView |
OnInitialUpdate() | CMailView | [virtual]
OnMailAttachment() | CMailView | [protected]
OnMailCc() | CMailView | [protected]
OnMailCheckNames() | CMailView | [protected]
OnMailCopyToFolder() | CMailView | [protected]
OnMailDelete() | CMailView | [protected]
OnMailFlag() | CMailView | [protected]
OnMailFontsize() | CMailView | [protected]
OnMailHightPriority() | CMailView | [protected]
OnMailItem() | CMailView | [protected]
OnMailLowPriority() | CMailView | [protected]
OnMailMoveToFolder() | CMailView | [protected]
OnMailOptions() | CMailView | [protected]
OnMailProperties() | CMailView | [protected]
OnMailSave() | CMailView | [protected]
OnMailSaveAttachments() | CMailView | [protected]
OnMailSaveStationery() | CMailView | [protected]
OnMailSend() | CMailView | [protected]
OnMailSignature() | CMailView | [protected]
OnMailSpell() | CMailView | [protected]
OnMailTo() | CMailView | [protected]
OnUpdateMailHightPriority(CCmdUI *pCmdUI) | CMailView | [protected]
OnUpdateMailLowPriority(CCmdUI *pCmdUI) | CMailView | [protected]
~CMailView() | CMailView | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/inproc.h Source File

  • ole
  • inproc

inproc.h

Go to the documentation of this file.
00001 // inproc.h : main header file for the INPROC application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CInProcApp:
00020 // See inproc.cpp for the implementation of this class
00021 //
00022
00023 class CInProcApp : public CWinApp
00024 {
00025 public:
00026   CInProcApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CInProcApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035   //{{AFX_MSG(CInProcApp)
00036   afx_msg void OnAppAbout();
00037     // NOTE - the ClassWizard will add and remove member functions here.
00038     //    DO NOT EDIT what you see in these blocks of generated code !
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043 typedef CMap<COleVariant, const VARIANT&, COleVariant, const VARIANT&>
00044   CMapVariantToVariant;
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMethodInfo Member List

This is the complete list of members for CMethodInfo, including all inherited members.
CMethodInfo() | CMethodInfo |
EnableEditRequestLogging(BOOL tEnable) | CMethodInfo |
EnableLogging(BOOL tEnable) | CMethodInfo |
GetID() const | CMethodInfo |
GetInvokeKind() const | CMethodInfo |
GetName() const | CMethodInfo |
GetNumParams() const | CMethodInfo |
GetParam(int iParam) const | CMethodInfo |
GetRequestEditResponse() const | CMethodInfo |
Init(ITypeInfo *pTypeInfo, const FUNCDESC *pFuncDesc) | CMethodInfo |
InitPropertyGet(ITypeInfo *pTypeInfo, const VARDESC *pVarDesc) | CMethodInfo |
InitPropertyPut(ITypeInfo *pTypeInfo, const VARDESC *pVarDesc) | CMethodInfo |
IsBindable() const | CMethodInfo |
IsLogged() const | CMethodInfo |
LogEditRequests() const | CMethodInfo |
LogEvent(CLog &log, DISPPARAMS *pdpParams) | CMethodInfo |
m_apParamInfo | CMethodInfo |
m_dispid | CMethodInfo |
m_eRequestEditResponse | CMethodInfo |
m_invkind | CMethodInfo |
m_strName | CMethodInfo |
m_tBindable | CMethodInfo |
m_tLog | CMethodInfo |
m_tLogEditRequests | CMethodInfo |
m_tRequestEdit | CMethodInfo |
operator<<(CLog &log, CMethodInfo *pMethodInfo) | CMethodInfo | [friend]
RequestsEdit() const | CMethodInfo |
SetRequestEditResponse(int eResponse) | CMethodInfo |
~CMethodInfo() | CMethodInfo |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/keys.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

keys.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "keys.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char THIS_FILE[]=__FILE__;
00019 #define new DEBUG_NEW
00020 #endif
00021
00022 MSOfficeDemoKey keys [] =
00023 {
00024   //-------------
00025   // Tab buttons:
00026   //-------------
00027
00028   {    ID_APP_ABOUT, _T("a")    },
00029   {    ID_SET_STYLE, _T("t")    },
00030
00031   //-----------
00032   // Main menu:
00033   //-----------
00034
00035   {    ID_FILE_PRINT, _T("p&w")    },
00036
00037   //-------------
00038   // "Home" keys:
00039   //-------------
00040
00041   // 1. Clipboard:
00042   {    ID_EDIT_PASTE, _T("v")    },
00043   {    ID_EDIT_COPY, _T("c")    },
00044   {    ID_EDIT_CUT, _T("x")    },
00045   {    ID_EDIT_COPYFORMAT, _T("fp")    },
00046   {    ID_WRITE_CLIPBOARD, _T("fo")    },
00047
00048   // 2. Font:
00049   {    ID_FONT_FONT, _T("ff")    },
00050   {    ID_FONT_FONTSIZE, _T("fs")    },
00051
00052   {    ID_FONT_GROWFONT, _T("fg")    },
00053   {    ID_FONT_SHRINK, _T("fk")    },
00054
00055   {    ID_FONT_CLEARFORMAT, _T("e")    },
00056
00057   {    ID_FONT_BOLD, _T("1")    },
00058   {    ID_FONT_ITALIC, _T("2")    },
00059   {    ID_FONT_UNDERLINE, _T("3")    },
00060   {    ID_FONT_STRIKETHROUGH, _T("4")    },
00061   {    ID_FONT_SUBSCRIPT, _T("5")    },
00062   {    ID_FONT_SUPERSCRIPT, _T("6")    },
00063   {    ID_FONT_CHANGECASE, _T("7")    },
00064
00065   {    ID_FONT_TEXTHIGHLIGHT, _T("i")    },
00066   {    ID_FONT_COLOR, _T("fc")    },
00067
00068   {    ID_WRITE_FONT, _T("fn")    },
00069
00070   // 3. Paragraph:
00071   {    ID_PARA_BULLETS, _T("u")    },
00072   {    ID_PARA_NUMBERING, _T("n")    },
00073   {    ID_PARA_MULTILEVEL, _T("m")    },
00074
00075   {    ID_PARA_DECREASEINDENT, _T("ao")    },
00076   {    ID_PARA_INCREASEINDENT, _T("ai")    },
00077
00078   {    ID_PARA_SORT, _T("so")    },
00079
00080   {    ID_PARA_ENDLINEMARK, _T("8")    },
00081
00082   {    ID_PARA_ALIGNLEFT, _T("al")    },
00083   {    ID_PARA_CENTER, _T("ac")    },
00084   {    ID_PARA_ALIGNRIGHT, _T("ar")    },
00085   {    ID_PARA_JUSTIFY, _T("aj")    },
00086
00087   {    ID_PARA_LINESPACING, _T("k")    },
00088
00089   {    ID_PARA_SHADING, _T("h")    },
00090
00091   {    ID_PARA_BORDER, _T("b")    },
00092
00093   {    ID_WRITE_PARAGRAPH, _T("pg")    },
00094
00095   // 4. Styles:
00096   {    ID_WRITE_QUICKSTYLES, _T("l")    },
00097   {    ID_WRITE_CHANGESTYLES, _T("g")    },
00098   {    ID_WRITE_STYLE, _T("fy")    },
00099
00100   // 5. Editing:
00101   {    ID_EDIT_FIND, _T("fd")    },
00102   {    ID_EDIT_REPLACE, _T("r")    },
00103   {    ID_WRITE_SELECT, _T("sl")    },
00104
00105   //---------------
00106   // "Insert" keys:
00107   //---------------
00108
00109   // 1. Pages:
00110   {    ID_INSERT_COVERPAGE,   _T("v")   },
00111   {    ID_INSERT_BLACKPAGE,   _T("np")  },
00112   {    ID_INSERT_PAGEBREAK,   _T("b")   },
00113   {    ID_INSERT_PAGEBREAK,   _T("b")   },
00114
00115
00116   // 2. Table:
00117   {    ID_INSERT_TABLE,     _T("t")   },
00118
00119   // 3. Illustrations:
00120   {    ID_INSERT_PICTURE,     _T("p")   },
00121   {    ID_INSERT_CLIPART,     _T("f")   },
00122   {    ID_INSERT_SHAPES,      _T("sh")  },
00123   {    ID_INSERT_SMARTART,    _T("m")   },
00124   {    ID_INSERT_CHART,     _T("c")   },
00125
00126   // 4. Links:
00127   {    ID_INSERT_HYPERLINK,   _T("i")   },
00128   {    ID_INSERT_BOOKMARK,    _T("k")   },
00129   {    ID_INSERT_REFERENCE,   _T("rf")  },
00130
00131   // 4. Header & Footer:
00132   {    ID_INSERT_HEADER,      _T("h")   },
00133   {    ID_INSERT_FOOTER,      _T("o")   },
00134   {    ID_INSERT_PAGENUMBER,    _T("nu")  },
00135
00136   // 5. Text:
00137   {    ID_INSERT_TEXTBOX,     _T("x")   },
00138   {    ID_INSERT_QUICKPARTS,    _T("q")   },
00139   {    ID_INSERT_WORDART,     _T("w")   },
00140   {    ID_INSERT_DROPCAP,     _T("rc")  },
00141   {    ID_INSERT_SIGNATURELINE, _T("g")   },
00142   {    ID_INSERT_DATETIME,    _T("d")   },
00143   {    ID_INSERT_OBJECT,      _T("j")   },
00144
00145   // 6. Symbols:
00146   {    ID_INSERT_EQUATION,    _T("e")   },
00147   {    ID_INSERT_SYMBOL,      _T("u")   },
00148
00149   {    0, NULL    },
00150 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CExplorerBar Member List

This is the complete list of members for CExplorerBar, including all inherited members.
CExplorerBar() | CExplorerBar |
m_wndFavorites | CExplorerBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CExplorerBar | [protected]
OnSelectTree(NMHDR *pNMHDR, LRESULT *pResult) | CExplorerBar | [protected]
~CExplorerBar() | CExplorerBar | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPage3 Member List

This is the complete list of members for CPage3, including all inherited members.
CPage3() | CPage3 |
DoDataExchange(CDataExchange *pDX) | CPage3 | [protected, virtual]
IDD enum value | CPage3 |
m_bDeviceFont | CPage3 |
m_bDrawUsingFont | CPage3 |
m_bmpImage | CPage3 | [protected]
m_bRaster | CPage3 |
m_btnImageEdit | CPage3 |
m_btnLink | CPage3 |
m_bTrueType | CPage3 |
m_nCurFontCharSet | CPage3 |
m_rectImage | CPage3 | [protected]
m_strCurFontName | CPage3 |
m_wndCustomEdit | CPage3 |
m_wndEditListBox | CPage3 |
m_wndFileEdit | CPage3 |
m_wndFolderEdit | CPage3 |
m_wndFont | CPage3 |
m_wndImageArea | CPage3 |
OnDrawUsingFont() | CPage3 | [protected]
OnEditImage() | CPage3 | [protected]
OnFontType() | CPage3 | [protected]
OnInitDialog() | CPage3 | [protected, virtual]
OnPaint() | CPage3 | [protected]
OnSelchangeFont() | CPage3 | [protected]
~CPage3() | CPage3 |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/optionsh.cpp Source File

  • vc2008fp
  • WordPad

optionsh.cpp

Go to the documentation of this file.
00001 //
00002 // optionsh.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "unitspag.h"
00017 #include "docopt.h"
00018 #include "optionsh.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // COptionSheet
00027
00028 COptionSheet::COptionSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00029   : CCSPropertySheet(nIDCaption, pParentWnd, iSelectPage),
00030   pageText(IDS_TEXT_OPTIONS), pageRTF(IDS_RTF_OPTIONS),
00031   pageWord(IDS_WORD6_OPTIONS), pageWrite(IDS_WRITE_OPTIONS),
00032   pageEmbedded()
00033 {
00034   units.m_nUnits = theApp.GetUnits();
00035   units.m_bWordSel = theApp.m_bWordSel;
00036   pageText.m_nWordWrap = theApp.GetDocOptions(RD_TEXT).m_nWordWrap;
00037   pageRTF.m_nWordWrap = theApp.GetDocOptions(RD_RICHTEXT).m_nWordWrap;
00038   pageWord.m_nWordWrap = theApp.GetDocOptions(RD_WINWORD6).m_nWordWrap;
00039   pageWrite.m_nWordWrap = theApp.GetDocOptions(RD_WRITE).m_nWordWrap;
00040   pageEmbedded.m_nWordWrap = theApp.GetDocOptions(RD_EMBEDDED).m_nWordWrap;
00041   SetPageButtons(pageText, theApp.GetDockState(RD_TEXT));
00042   SetPageButtons(pageRTF, theApp.GetDockState(RD_RICHTEXT));
00043   SetPageButtons(pageWord, theApp.GetDockState(RD_WINWORD6));
00044   SetPageButtons(pageWrite, theApp.GetDockState(RD_WRITE));
00045   SetPageButtons(pageEmbedded, theApp.GetDockState(RD_EMBEDDED));
00046   SetPageButtons(pageEmbedded, theApp.GetDockState(RD_EMBEDDED, FALSE));
00047   AddPage(&units);
00048   AddPage(&pageText);
00049   AddPage(&pageRTF);
00050   AddPage(&pageWord);
00051   AddPage(&pageWrite);
00052   AddPage(&pageEmbedded);
00053 }
00054
00055 void COptionSheet::SetPageButtons(CDocOptPage& page, CDockState& ds)
00056 {
00057   if (ds.m_arrBarInfo.GetSize() == 0)
00058   {
00059     page.m_bFormatBar = page.m_bRulerBar = TRUE;
00060     page.m_bToolBar = page.m_bStatusBar = TRUE;
00061   }
00062   else
00063   {
00064     for (int i = 0;i < ds.m_arrBarInfo.GetSize(); i++)
00065     {
00066       CControlBarInfo* pInfo = (CControlBarInfo*)ds.m_arrBarInfo[i];
00067       ASSERT(pInfo != NULL);
00068       if (pInfo)
00069       {
00070         switch (pInfo->m_nBarID)
00071         {
00072         case ID_VIEW_FORMATBAR:
00073           page.m_bFormatBar = page.m_bFormatBar || pInfo->m_bVisible;
00074           break;
00075         case ID_VIEW_RULER:
00076           page.m_bRulerBar = page.m_bRulerBar || pInfo->m_bVisible;
00077           break;
00078         case ID_VIEW_TOOLBAR:
00079           page.m_bToolBar = page.m_bToolBar || pInfo->m_bVisible;
00080           break;
00081         case ID_VIEW_STATUS_BAR:
00082           page.m_bStatusBar = page.m_bStatusBar || pInfo->m_bVisible;
00083           break;
00084         }
00085       }
00086     }
00087   }
00088 }
00089
00090 void COptionSheet::SetState(CDocOptPage& page, CDockState& ds)
00091 {
00092   for (int i = 0;i < ds.m_arrBarInfo.GetSize(); i++)
00093   {
00094     CControlBarInfo* pInfo = (CControlBarInfo*)ds.m_arrBarInfo[i];
00095     ASSERT(pInfo != NULL);
00096     if (pInfo)
00097     {
00098       switch (pInfo->m_nBarID)
00099       {
00100       case ID_VIEW_FORMATBAR:
00101         pInfo->m_bVisible = page.m_bFormatBar;
00102         break;
00103       case ID_VIEW_RULER:
00104         pInfo->m_bVisible = page.m_bRulerBar;
00105         break;
00106       case ID_VIEW_TOOLBAR:
00107         pInfo->m_bVisible = page.m_bToolBar;
00108         break;
00109       case ID_VIEW_STATUS_BAR:
00110         pInfo->m_bVisible = page.m_bStatusBar;
00111         break;
00112       }
00113     }
00114   }
00115 }
00116
00117 BEGIN_MESSAGE_MAP(COptionSheet, CCSPropertySheet)
00118   //{{AFX_MSG_MAP(COptionSheet)
00119   ON_WM_CREATE()
00120   //}}AFX_MSG_MAP
00121 END_MESSAGE_MAP()
00122
00123
00124 /////////////////////////////////////////////////////////////////////////////
00125 // COptionSheet message handlers
00126
00127 INT_PTR COptionSheet::DoModal()
00128 {
00129   INT_PTR nRes = CCSPropertySheet::DoModal();
00130   if (nRes == IDOK)
00131   {
00132     SetState(pageText, theApp.GetDockState(RD_TEXT));
00133     SetState(pageRTF, theApp.GetDockState(RD_RICHTEXT));
00134     SetState(pageWord, theApp.GetDockState(RD_WINWORD6));
00135     SetState(pageWrite, theApp.GetDockState(RD_WRITE));
00136     SetState(pageEmbedded, theApp.GetDockState(RD_EMBEDDED));
00137     SetState(pageEmbedded, theApp.GetDockState(RD_EMBEDDED, FALSE));
00138     theApp.SetUnits(units.m_nUnits);
00139     theApp.m_bWordSel = units.m_bWordSel;
00140     theApp.GetDocOptions(RD_TEXT).m_nWordWrap = pageText.m_nWordWrap;
00141     theApp.GetDocOptions(RD_RICHTEXT).m_nWordWrap = pageRTF.m_nWordWrap;
00142     theApp.GetDocOptions(RD_WINWORD6).m_nWordWrap = pageWord.m_nWordWrap;
00143     theApp.GetDocOptions(RD_WRITE).m_nWordWrap = pageWrite.m_nWordWrap;
00144     theApp.GetDocOptions(RD_EMBEDDED).m_nWordWrap = pageEmbedded.m_nWordWrap;
00145   }
00146   return nRes;
00147 }
00148
00149 /////////////////////////////////////////////////////////////////////////////
00150 // COptionSheet message handlers
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/OutWndVw.H Source File

  • ole
  • TstCon

OutWndVw.H

Go to the documentation of this file.
00001 // File: OutWndVw.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_OUTPUTWINDOWVIEW_H__5808BFDF_5166_11D1_8E54_00C04FB68D60__INCLUDED_)
00011 #define AFX_OUTPUTWINDOWVIEW_H__5808BFDF_5166_11D1_8E54_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // OutputWindowView.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // COutputWindowView view
00021
00022 class COutputWindowView : public CEditView
00023 {
00024 protected:
00025   COutputWindowView();           // protected constructor used by dynamic creation
00026   DECLARE_DYNCREATE(COutputWindowView)
00027
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(COutputWindowView)
00037   protected:
00038   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 protected:
00043   virtual ~COutputWindowView();
00044 #ifdef _DEBUG
00045   virtual void AssertValid() const;
00046   virtual void Dump(CDumpContext& dc) const;
00047 #endif
00048
00049 protected:
00050    CFont m_font;
00051
00052   // Generated message map functions
00053 protected:
00054   //{{AFX_MSG(COutputWindowView)
00055   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00056   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00057   //}}AFX_MSG
00058
00059    afx_msg void OnClear();
00060    afx_msg void OnCopy();
00061
00062   DECLARE_MESSAGE_MAP()
00063 };
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066
00067 //{{AFX_INSERT_LOCATION}}
00068 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00069
00070 #endif // !defined(AFX_OUTPUTWINDOWVIEW_H__5808BFDF_5166_11D1_8E54_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/myfile.cpp Source File

  • general
  • diblook

myfile.cpp

Go to the documentation of this file.
00001 //  myfile.cpp
00002 //
00003 //  Source file for Device-Independent Bitmap (DIB) API.  Provides
00004 //  the following functions:
00005 //
00006 //  SaveDIB()           - Saves the specified dib in a file
00007 //  ReadDIBFile()       - Loads a DIB from a file
00008 //
00009 //
00010 // This is a part of the Microsoft Foundation Classes C++ library.
00011 // Copyright (c) Microsoft Corporation.  All rights reserved.
00012 //
00013 // This source code is only intended as a supplement to the
00014 // Microsoft Foundation Classes Reference and related
00015 // electronic documentation provided with the library.
00016 // See these sources for detailed information regarding the
00017 // Microsoft Foundation Classes product.
00018
00019 #include "stdafx.h"
00020 #include <math.h>
00021 #include <io.h>
00022 #include <direct.h>
00023 #include "dibapi.h"
00024
00025 /*
00026  * Dib Header Marker - used in writing DIBs to files
00027  */
00028 #define DIB_HEADER_MARKER   ((WORD) ('M' << 8) | 'B')
00029
00030
00031 /*************************************************************************
00032  *
00033  * SaveDIB()
00034  *
00035  * Saves the specified DIB into the specified CFile.  The CFile
00036  * is opened and closed by the caller.
00037  *
00038  * Parameters:
00039  *
00040  * HDIB hDib - Handle to the dib to save
00041  *
00042  * CFile& file - open CFile used to save DIB
00043  *
00044  * Return value: TRUE if successful, else FALSE or CFileException
00045  *
00046  *************************************************************************/
00047
00048
00049 BOOL WINAPI SaveDIB(HDIB hDib, CFile& file)
00050 {
00051   BITMAPFILEHEADER bmfHdr; // Header for Bitmap file
00052   LPBITMAPINFOHEADER lpBI;   // Pointer to DIB info structure
00053   UINT nDIBSize;
00054
00055   if (hDib == NULL)
00056     return FALSE;
00057
00058   /*
00059    * Get a pointer to the DIB memory, the first of which contains
00060    * a BITMAPINFO structure
00061    */
00062   lpBI = (LPBITMAPINFOHEADER) ::GlobalLock((HGLOBAL) hDib);
00063   if (lpBI == NULL)
00064     return FALSE;
00065
00066   if (!IS_WIN30_DIB(lpBI))
00067   {
00068     ::GlobalUnlock((HGLOBAL) hDib);
00069     return FALSE;       // It's an other-style DIB (save not supported)
00070   }
00071
00072   /*
00073    * Fill in the fields of the file header
00074    */
00075
00076   /* Fill in file type (first 2 bytes must be "BM" for a bitmap) */
00077   bmfHdr.bfType = DIB_HEADER_MARKER;  // "BM"
00078
00079   // Calculating the size of the DIB is a bit tricky (if we want to
00080   // do it right).  The easiest way to do this is to call GlobalSize()
00081   // on our global handle, but since the size of our global memory may have
00082   // been padded a few bytes, we may end up writing out a few too
00083   // many bytes to the file (which may cause problems with some apps).
00084   //
00085   // So, instead let's calculate the size manually (if we can)
00086   //
00087   // First, find size of header plus size of color table.  Since the
00088   // first DWORD in both BITMAPINFOHEADER and BITMAPCOREHEADER conains
00089   // the size of the structure, let's use this.
00090
00091   nDIBSize = *(LPDWORD)lpBI + ::PaletteSize((LPSTR)lpBI);  // Partial Calculation
00092
00093   // Now calculate the size of the image
00094
00095   if ((lpBI->biCompression == BI_RLE8) || (lpBI->biCompression == BI_RLE4))
00096   {
00097     // It's an RLE bitmap, we can't calculate size, so trust the
00098     // biSizeImage field
00099
00100     nDIBSize += lpBI->biSizeImage;
00101   }
00102   else
00103   {
00104     DWORD dwBmBitsSize;  // Size of Bitmap Bits only
00105
00106     // It's not RLE, so size is Width (DWORD aligned) * Height
00107
00108     dwBmBitsSize = WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount)) * lpBI->biHeight;
00109
00110     nDIBSize += dwBmBitsSize;
00111
00112     // Now, since we have calculated the correct size, why don't we
00113     // fill in the biSizeImage field (this will fix any .BMP files which
00114     // have this field incorrect).
00115
00116     lpBI->biSizeImage = dwBmBitsSize;
00117   }
00118
00119
00120   // Calculate the file size by adding the DIB size to sizeof(BITMAPFILEHEADER)
00121
00122   bmfHdr.bfSize = nDIBSize + sizeof(BITMAPFILEHEADER);
00123   bmfHdr.bfReserved1 = 0;
00124   bmfHdr.bfReserved2 = 0;
00125
00126   /*
00127    * Now, calculate the offset the actual bitmap bits will be in
00128    * the file -- It's the Bitmap file header plus the DIB header,
00129    * plus the size of the color table.
00130    */
00131   bmfHdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + lpBI->biSize
00132                         + PaletteSize((LPSTR)lpBI);
00133   TRY
00134   {
00135     // Write the file header
00136     file.Write((LPSTR)&bmfHdr, sizeof(BITMAPFILEHEADER));
00137     //
00138     // Write the DIB header and the bits
00139     //
00140     file.Write(lpBI, nDIBSize);
00141   }
00142   CATCH (CFileException, e)
00143   {
00144     ::GlobalUnlock((HGLOBAL) hDib);
00145     THROW_LAST();
00146   }
00147   END_CATCH
00148
00149   ::GlobalUnlock((HGLOBAL) hDib);
00150   return TRUE;
00151 }
00152
00153
00154 /*************************************************************************
00155
00156   Function:  ReadDIBFile (CFile&)
00157
00158    Purpose:  Reads in the specified DIB file into a global chunk of
00159        memory.
00160
00161    Returns:  A handle to a dib (hDIB) if successful.
00162        NULL if an error occurs.
00163
00164   Comments:  BITMAPFILEHEADER is stripped off of the DIB.  Everything
00165        from the end of the BITMAPFILEHEADER structure on is
00166        returned in the global memory handle.
00167
00168 *************************************************************************/
00169
00170
00171 HDIB WINAPI ReadDIBFile(CFile& file)
00172 {
00173   BITMAPFILEHEADER bmfHeader;
00174   UINT nBitsSize;
00175   HDIB hDIB;
00176   LPSTR pDIB;
00177
00178   /*
00179    * get length of DIB in bytes for use when reading
00180    */
00181
00182   nBitsSize = (UINT)file.GetLength();
00183
00184   /*
00185    * Go read the DIB file header and check if it's valid.
00186    */
00187   if (file.Read((LPSTR)&bmfHeader, sizeof(bmfHeader)) != sizeof(bmfHeader))
00188     return NULL;
00189
00190   if (bmfHeader.bfType != DIB_HEADER_MARKER)
00191     return NULL;
00192
00193   /*
00194    * Allocate memory for DIB
00195    */
00196   hDIB = (HDIB) ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, (DWORD)nBitsSize);
00197   if (hDIB == 0)
00198   {
00199     return NULL;
00200   }
00201   pDIB = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
00202
00203   /*
00204    * Go read the bits.
00205    */
00206   if (file.Read(pDIB, nBitsSize - sizeof(BITMAPFILEHEADER)) !=
00207     nBitsSize - sizeof(BITMAPFILEHEADER) )
00208   {
00209     ::GlobalUnlock((HGLOBAL) hDIB);
00210     ::GlobalFree((HGLOBAL) hDIB);
00211     return NULL;
00212   }
00213   ::GlobalUnlock((HGLOBAL) hDIB);
00214   return hDIB;
00215 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/Resource.h Source File

  • vc2008fp
  • RollupPane

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by RollupPane.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_RollupControlBaTYPE         129
00009 #define IDR_CONTEXT_MENU                130
00010 #define IDR_POPUP_TOOLBAR               131
00011 #define IDB_TOOLBAR256                  151
00012 #define IDS_WRONG_DISPLAY_SETTINGS      152
00013 #define IDD_ABOUTBOX                    999
00014 #define ID_VIEW_CUSTOMIZE               32770
00015 #define ID_VIEW_TOOLBARS                32771
00016 #define ID_VIEW_USER_TOOLBAR1           32793
00017 #define ID_VIEW_USER_TOOLBAR2           32794
00018 #define ID_VIEW_USER_TOOLBAR3           32795
00019 #define ID_VIEW_USER_TOOLBAR4           32796
00020 #define ID_VIEW_USER_TOOLBAR5           32797
00021 #define ID_VIEW_USER_TOOLBAR6           32798
00022 #define ID_VIEW_USER_TOOLBAR7           32799
00023 #define ID_VIEW_USER_TOOLBAR8           32800
00024 #define ID_VIEW_USER_TOOLBAR9           32801
00025 #define ID_VIEW_USER_TOOLBAR10          32802
00026 #define ID_VIEW_APPLOOK_2000            32826
00027 #define ID_VIEW_APPLOOK_XP              32827
00028 #define ID_VIEW_APPLOOK_2003            32828
00029 #define ID_VIEW_APPLOOK_WIN_XP          32829
00030 #define ID_VIEW_APPLOOK_VS2005          32830
00031 #define ID_VIEW_APPLOOK_2007            32831
00032 #define ID_VIEW_APPLOOK_2007_1          32832
00033 #define ID_VIEW_APPLOOK_2007_2          32833
00034 #define ID_VIEW_APPLOOK_2007_3          32834
00035 #define ID_VIEW_INFOBAR                 32835
00036
00037 // Next default values for new objects
00038 //
00039 #ifdef APSTUDIO_INVOKED
00040 #ifndef APSTUDIO_READONLY_SYMBOLS
00041 #define _APS_NEXT_RESOURCE_VALUE        160
00042 #define _APS_NEXT_COMMAND_VALUE         32850
00043 #define _APS_NEXT_CONTROL_VALUE         1042
00044 #define _APS_NEXT_SYMED_VALUE           108
00045 #endif
00046 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMMXSurface32Intrinsic Member List

This is the complete list of members for CMMXSurface32Intrinsic, including all inherited members.
AdjustWidth(int *pWidth) | CMMXSurface32Intrinsic | [virtual]
BlitBits() | CSurface |
BlurBits() | CMMXSurface32Intrinsic | [virtual]
ClearBits() | CSurface |
Create(CWnd *pWnd, int nBitDepth) | CSurface |
CSurface() | CSurface | [inline]
Destroy() | CSurface |
GetBitDepth() const | CSurface | [inline]
GetByteDepth() const | CSurface | [inline]
GetImage() | CSurface | [inline]
GetPitch() const | CSurface | [inline]
GetPixelAddress(int x, int y) const | CSurface | [inline]
GetVisibleHeight() const | CSurface | [inline]
GetVisibleWidth() const | CSurface | [inline]
Import(const CImage &image) | CSurface |
IsNull() const | CSurface | [inline]
Line(const CPoint &p1, const CPoint &p2, COLORREF c) | CSurface |
m_dwpl | CMMXSurface32Intrinsic | [private]
m_kDeltaX | CSurface | [protected, static]
m_kDeltaY | CSurface | [protected, static]
m_width | CMMXSurface32Intrinsic | [private]
OnCreated() | CMMXSurface32Intrinsic | [protected, virtual]
PointColor(int x, int y, COLORREF c) | CSurface | [inline]
PointColor(int x, int y) const | CSurface | [inline]
RandomBits() | CSurface |
RandomLine(COLORREF c) | CSurface |
ShiftBits() | CSurface |
StripeBits() | CSurface |
~CSurface() | CSurface | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/ChildView.h Source File

  • general
  • SimpleImage

ChildView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // ChildView.h : interface of the CChildView class
00011 //
00012
00013
00014 #pragma once
00015 #include <afxstr.h>
00016 #include <atlimage.h>
00017 #include <comdef.h>
00018
00019
00020 enum SizesEnum
00021 {
00022   SIZE_HALF,
00023   SIZE_ORIGINAL,
00024   SIZE_DOUBLE,
00025   SIZE_FILL,
00026   SIZE_NONE
00027 };
00028
00029 // CChildView window
00030
00031 class CChildView : public CWnd
00032 {
00033 // Construction
00034 public:
00035   CChildView();
00036
00037 // Attributes
00038 public:
00039
00040 // Operations
00041 public:
00042
00043 // Overrides
00044   protected:
00045   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00046
00047 // Implementation
00048 public:
00049   virtual ~CChildView();
00050
00051   // Generated message map functions
00052
00053 private:
00054   CImage imgOriginal;
00055   int m_nFilterLoad;
00056   SizesEnum m_nImageSize;
00057
00058 protected:
00059   afx_msg void OnPaint();
00060   DECLARE_MESSAGE_MAP()
00061 public:
00062   void OnFileOpenimage(void);
00063   void OnFileSaveImage(void);
00064   void OnToolsMakeBW(void);
00065   void OnImageInfo(void);
00066   void OnUpdateSizeHalf(CCmdUI* pCmdUI);
00067   void OnUpdateSizeOriginal(CCmdUI* pCmdUI);
00068   void OnUpdateSizeDouble(CCmdUI* pCmdUI);
00069   void OnUpdateSizeFill(CCmdUI* pCmdUI);
00070   void OnChangeSize(UINT nID);
00071   void OnUpdateImage(CCmdUI* pCmdUI);
00072 };
00073
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/mainfrm.cpp Source File

  • controls
  • contain

mainfrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Contain.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00026
00027 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00028   //{{AFX_MSG_MAP(CMainFrame)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code !
00031   ON_WM_CREATE()
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 static UINT indicators[] =
00036 {
00037   ID_SEPARATOR,           // status line indicator
00038   ID_INDICATOR_CAPS,
00039   ID_INDICATOR_NUM,
00040   ID_INDICATOR_SCRL,
00041 };
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CMainFrame construction/destruction
00045
00046 CMainFrame::CMainFrame()
00047 {
00048   // TODO: add member initialization code here
00049
00050 }
00051
00052 CMainFrame::~CMainFrame()
00053 {
00054 }
00055
00056 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00057 {
00058   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00059     return -1;
00060
00061   if (!m_wndToolBar.Create(this) ||
00062     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00063   {
00064     TRACE0("Failed to create toolbar\n");
00065     return -1;      // fail to create
00066   }
00067
00068   if (!m_wndStatusBar.Create(this) ||
00069     !m_wndStatusBar.SetIndicators(indicators,
00070       sizeof(indicators)/sizeof(UINT)))
00071   {
00072     TRACE0("Failed to create status bar\n");
00073     return -1;      // fail to create
00074   }
00075
00076   // TODO: Remove this if you don't want tool tips
00077   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00078     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00079
00080   // TODO: Delete these three lines if you don't want the toolbar to
00081   //  be dockable
00082   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00083   EnableDocking(CBRS_ALIGN_ANY);
00084   DockControlBar(&m_wndToolBar);
00085
00086
00087   return 0;
00088 }
00089
00090 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00091 {
00092   // TODO: Modify the Window class or styles here by modifying
00093   //  the CREATESTRUCT cs
00094
00095   return CMDIFrameWnd::PreCreateWindow(cs);
00096 }
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CMainFrame diagnostics
00100
00101 #ifdef _DEBUG
00102 void CMainFrame::AssertValid() const
00103 {
00104   CMDIFrameWnd::AssertValid();
00105 }
00106
00107 void CMainFrame::Dump(CDumpContext& dc) const
00108 {
00109   CMDIFrameWnd::Dump(dc);
00110 }
00111
00112 #endif //_DEBUG
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.cpp Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBarDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "WorkSpaceToolBar.h"
00013
00014 #include "WorkSpaceToolBarDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CWorkSpaceToolBarDoc
00024
00025 IMPLEMENT_DYNCREATE(CWorkSpaceToolBarDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CWorkSpaceToolBarDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CWorkSpaceToolBarDoc construction/destruction
00032
00033 CWorkSpaceToolBarDoc::CWorkSpaceToolBarDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CWorkSpaceToolBarDoc::~CWorkSpaceToolBarDoc()
00040 {
00041 }
00042
00043 BOOL CWorkSpaceToolBarDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CWorkSpaceToolBarDoc serialization
00058
00059 void CWorkSpaceToolBarDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CWorkSpaceToolBarDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CWorkSpaceToolBarDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CWorkSpaceToolBarDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CWorkSpaceToolBarDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSizeComboBox Member List

This is the complete list of members for CSizeComboBox, including all inherited members.
CSizeComboBox() | CSizeComboBox |
EnumFontSizes(CDC &dc, LPCTSTR pFontName) | CSizeComboBox |
EnumSizeCallBack(LOGFONT FAR *lplf, LPNEWTEXTMETRIC lpntm, int FontType, LPVOID lpv) | CSizeComboBox | [static]
GetTheText(CString &str) | CLocalComboBox |
GetTwipSize() | CSizeComboBox |
HasFocus() | CLocalComboBox | [inline]
InsertSize(int nSize) | CSizeComboBox |
LimitText(int nMaxChars) | CLocalComboBox |
m_arrayFontDesc | CLocalComboBox |
m_nFontHeight | CLocalComboBox | [static]
m_nLimitText | CLocalComboBox |
m_nLogVert | CSizeComboBox |
m_nTwipsLast | CSizeComboBox |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CLocalComboBox |
PreTranslateMessage(MSG *pMsg) | CLocalComboBox | [virtual]
SetTheText(LPCTSTR lpszText, BOOL bMatchExact=FALSE) | CLocalComboBox |
SetTwipSize(int nSize) | CSizeComboBox |
TwipsToPointString(LPTSTR lpszBuf, int nTwips) | CSizeComboBox |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CModelessMain Member List

This is the complete list of members for CModelessMain, including all inherited members.
CModelessDialog() | CModelessDialog |
CModelessMain() | CModelessMain |
Create(LPCTSTR lpszTemplateName, const UINT FAR *lpaIDStatus, int cIDStatus, const UINT FAR *lpaIDToolbar, int cIDToolbar, UINT nIDBitmap) | CModelessMain |
Create(UINT nIDTemplate, const UINT FAR *lpaIDStatus, int cIDStatus, const UINT FAR *lpaIDToolbar, int cIDToolbar, UINT nIDBitmap) | CModelessMain |
GetStatusBar() | CModelessMain | [inline]
GetToolBar() | CModelessMain | [inline]
m_cIDStatusBar | CModelessMain | [protected]
m_cIDToolBar | CModelessMain | [protected]
m_hIcon | CModelessMain | [protected]
m_lpaIDStatusBar | CModelessMain | [protected]
m_lpaIDToolBar | CModelessMain | [protected]
m_nIDBitmap | CModelessMain | [protected]
m_nIDLastMessage | CModelessMain | [protected]
m_nIDTracking | CModelessMain | [protected]
m_statusBar | CModelessMain | [protected]
m_toolBar | CModelessMain | [protected]
OnCancel() | CModelessDialog | [virtual]
OnClose() | CModelessMain | [protected]
OnEnterIdle(UINT nWhy, CWnd *pWho) | CModelessMain | [protected]
OnEraseBkgnd(CDC *pDC) | CModelessMain | [protected]
OnInitDialog() | CModelessMain | [virtual]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CModelessMain | [protected]
OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu) | CModelessMain | [protected]
OnOK() | CModelessDialog | [virtual]
OnPaint() | CModelessMain | [protected]
OnPopMessageString(WPARAM wParam, LPARAM lParam) | CModelessMain | [protected]
OnQueryDragIcon() | CModelessMain | [protected]
OnSetMessageString(WPARAM wParam, LPARAM lParam=0L) | CModelessMain | [protected]
OnStatusBarCheck() | CModelessMain | [protected]
OnToolBarCheck() | CModelessMain | [protected]
OnToolTipText(UINT, NMHDR *pNMHDR, LRESULT *pResult) | CModelessMain | [protected]
OnUpdateKeyIndicator(CCmdUI *pCmdUI) | CModelessMain | [protected]
OnUpdateStatusBarMenu(CCmdUI *pCmdUI) | CModelessMain | [protected]
OnUpdateToolBarMenu(CCmdUI *pCmdUI) | CModelessMain | [protected]
PostNcDestroy() | CModelessDialog | [virtual]
~CModelessDialog() | CModelessDialog | [virtual]
~CModelessMain() | CModelessMain | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ruler.h Source File

  • vc2008fp
  • WordPad

ruler.h

Go to the documentation of this file.
00001 //
00002 // riched.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #ifndef __RULER_H__
00015 #define __RULER_H__
00016
00017 class CWordPadView;
00018 class CWordPadDoc;
00019 class CRulerBar;
00020
00021 // ruler items include left margin, right margin, indent, and tabs
00022
00023 // horz positions in twips -- necessary to avoid rounding errors
00024 // vertical position in pixels
00025 class CRulerItem
00026 {
00027 public:
00028   CRulerItem(UINT nBitmapID = 0);
00029   ~CRulerItem();
00030   virtual BOOL HitTestPix(CPoint pt) { return GetHitRectPix().PtInRect(pt); }
00031   virtual void Draw(CDC& dc);
00032   virtual void SetHorzPosTwips(int nXPos);
00033   virtual void TrackHorzPosTwips(int nXPos, BOOL bOnRuler = TRUE);
00034   virtual void SetVertPos(int nYPos) { m_nYPosPix = nYPos; }
00035   virtual void SetAlignment(int nAlign) {m_nAlignment = nAlign;}
00036   virtual void SetRuler(CRulerBar* pRuler) {m_pRuler = pRuler;}
00037   virtual void SetBounds(int nMin, int nMax) { m_nMin = nMin; m_nMax = nMax; }
00038   int GetMin() { return m_nMin;}
00039   int GetMax() { return m_nMax;}
00040   void Invalidate();
00041   int GetVertPosPix() { return m_nYPosPix;}
00042   int GetHorzPosTwips() { return m_nXPosTwips;}
00043   int GetHorzPosPix();
00044   CRect GetHitRectPix();
00045   void DrawFocusLine();
00046   void SetTrack(BOOL b);
00047
00048   HBITMAP m_hbm;
00049   HBITMAP m_hbmMask;
00050   CSize m_size;   // size of item in pixels
00051
00052 // Operations
00053   BOOL LoadMaskedBitmap(LPCTSTR lpszResourceName);
00054
00055 protected:
00056   int m_nYPosPix;
00057   int m_nXPosTwips;
00058   int m_nAlignment;
00059   BOOL m_bTrack;
00060   CRulerBar* m_pRuler;
00061   CRect m_rcTrack;
00062   CDC* m_pDC; // dc used for drawing tracking line
00063   int m_nMin, m_nMax;
00064 };
00065
00066 class CComboRulerItem : public CRulerItem
00067 {
00068 public:
00069   CComboRulerItem(UINT nBitmapID1, UINT nBitmapID2, CRulerItem& item);
00070   virtual BOOL HitTestPix(CPoint pt);
00071   virtual void Draw(CDC& dc);
00072   virtual void SetHorzPosTwips(int nXPos);
00073   virtual void TrackHorzPosTwips(int nXPos, BOOL bOnRuler = TRUE);
00074   virtual void SetVertPos(int nYPos);
00075   virtual void SetAlignment(int nAlign);
00076   virtual void SetRuler(CRulerBar* pRuler);
00077   virtual void SetBounds(int nMin, int nMax);
00078   int GetMin();
00079   int GetMax();
00080 protected:
00081   CRulerItem m_secondary;
00082   CRulerItem& m_link;
00083   BOOL m_bHitPrimary;
00084 };
00085
00086 class CTabRulerItem : public CRulerItem
00087 {
00088 public:
00089   CTabRulerItem() { SetAlignment(TA_LEFT); }
00090   virtual void Draw(CDC& dc) {if (GetHorzPosTwips() != 0) CRulerItem::Draw(dc);}
00091   virtual void TrackHorzPosTwips(int nXPos, BOOL bOnRuler = TRUE);
00092   virtual BOOL HitTestPix(CPoint pt) { return (GetHorzPosTwips() != 0) ? CRulerItem::HitTestPix(pt) : FALSE;}
00093 };
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CRulerBar
00097
00098 class CRulerBar : public CPane
00099 {
00100 // Construction
00101 public:
00102   CRulerBar(BOOL b3DExt = TRUE);
00103   ~CRulerBar();
00104
00105 // Operations
00106 public:
00107   virtual BOOL Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID);
00108 protected:
00109   void Update(const WPD_PARAFORMAT& pf);
00110   void Update(CSize sizePaper, const CRect& rectMargins);
00111
00112 // Attributes
00113 public:
00114   BOOL m_bDeferInProgress;
00115   BOOL m_bDraw3DExt;
00116   CUnit m_unit;
00117   CRulerItem* m_pSelItem;
00118   CFont fnt;
00119   CSize GetBaseUnits();
00120   CComboRulerItem m_leftmargin;
00121   CRulerItem m_indent;
00122   CRulerItem m_rightmargin;
00123   CRulerItem m_tabItem;
00124   CTabRulerItem m_pTabItems[MAX_TAB_STOPS];
00125   CSize m_sizePaper;
00126   CRect m_rectMargin;
00127   int PrintWidth() {return m_sizePaper.cx - m_rectMargin.left -
00128     m_rectMargin.right;}
00129   int m_nTabs;
00130   int m_logx;
00131   int m_nLinePos;
00132   int m_nScroll; // in pixels
00133
00134   CPen penFocusLine;
00135   CPen penBtnHighLight;
00136   CPen penBtnShadow;
00137   CPen penWindowFrame;
00138   CPen penBtnText;
00139   CPen penBtnFace;
00140   CPen penWindowText;
00141   CPen penWindow;
00142   CBrush brushWindow;
00143   CBrush brushBtnFace;
00144
00145 // Implementation
00146 public:
00147   virtual void DoPaint(CDC* pDC);
00148   virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
00149   void ClientToRuler(CPoint& pt) {pt.Offset(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}
00150   void ClientToRuler(CRect& rect) {rect.OffsetRect(-m_cxLeftBorder+m_nScroll, -m_cyTopBorder);}
00151   void RulerToClient(CPoint& pt) {pt.Offset(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}
00152   void RulerToClient(CRect& rect) {rect.OffsetRect(m_cxLeftBorder-m_nScroll, m_cyTopBorder);}
00153
00154   int XTwipsToClient(int nT) {return MulDiv(nT, m_logx, 1440) + m_cxLeftBorder - m_nScroll;}
00155   int XClientToTwips(int nC) {return MulDiv(nC - m_cxLeftBorder + m_nScroll, 1440, m_logx);}
00156
00157   int XTwipsToRuler(int nT) {return MulDiv(nT, m_logx, 1440);}
00158   int XRulerToTwips(int nR) {return MulDiv(nR, 1440, m_logx);}
00159
00160   int XRulerToClient(int nR) {return nR + m_cxLeftBorder - m_nScroll;}
00161   int XClientToRuler(int nC) {return nC - m_cxLeftBorder + m_nScroll;}
00162
00163   void CreateGDIObjects();
00164
00165 protected:
00166   virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00167   void DrawFace(CDC& dc);
00168   void DrawTickMarks(CDC& dC);
00169   void DrawNumbers(CDC& dc, int nInc, int nTPU);
00170   void DrawDiv(CDC& dc, int nInc, int nLargeDiv, int nLength);
00171   void DrawTabs(CDC& dc);
00172   void FillInParaFormat(WPD_PARAFORMAT& pf);
00173   void SortTabs();
00174   void SetMarginBounds();
00175   CRulerItem* GetFreeTab();
00176   CView* GetView()
00177   {
00178     ASSERT(GetParent() != NULL);
00179     return ((CFrameWnd*)GetParent())->GetActiveView();
00180   }
00181   CDocument* GetDocument() { return GetView()->GetDocument(); }
00182
00183   CTabRulerItem* GetHitTabPix(CPoint pt);
00184
00185   // Generated message map functions
00186   //{{AFX_MSG(CRulerBar)
00187   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00188   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00189   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00190   afx_msg void OnSysColorChange();
00191   afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
00192   afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
00193   afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00194   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00195   //}}AFX_MSG
00196   afx_msg LRESULT OnSizeParent(WPARAM wParam, LPARAM lParam);
00197   DECLARE_MESSAGE_MAP()
00198
00199   friend class CRulerItem;
00200 };
00201
00202 inline int CRulerItem::GetHorzPosPix()
00203   { return m_pRuler->XTwipsToRuler(m_nXPosTwips); }
00204
00205 #endif
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderDoc.h Source File

  • vc2008fp
  • Slider

SliderDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CSliderDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CSliderDoc();
00017   DECLARE_DYNCREATE(CSliderDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CSliderDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWorkspaceBar2 Member List

This is the complete list of members for CWorkspaceBar2, including all inherited members.
CWorkspaceBar2() | CWorkspaceBar2 |
m_wndTree | CWorkspaceBar2 | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CWorkspaceBar2 | [protected]
OnPaint() | CWorkspaceBar2 | [protected]
OnSize(UINT nType, int cx, int cy) | CWorkspaceBar2 | [protected]
~CWorkspaceBar2() | CWorkspaceBar2 | [virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MSOffice2007Demo.h Source File

  • vc2008fp
  • MSOffice2007Demo

MSOffice2007Demo.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #ifndef __AFXWIN_H__
00015 #error include 'stdafx.h' before including this file for PCH
00016 #endif
00017
00018 #include "resource.h"       // main symbols
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CMSOffice2007DemoApp:
00022 // See MSOffice2007Demo.cpp for the implementation of this class
00023 //
00024
00025 class CMSOffice2007DemoApp : public CWinAppEx
00026 {
00027 public:
00028   CMSOffice2007DemoApp();
00029
00030   BOOL m_bShowFloaty;
00031   UINT m_nAppLook;
00032   BOOL m_bShowDevTab;
00033   BOOL m_bShowToolTips;
00034   BOOL m_bShowToolTipDescr;
00035   BOOL m_bShowKeyTips;
00036   BOOL m_bIsRTL;
00037
00038 // Overrides
00039 public:
00040   virtual BOOL InitInstance();
00041   virtual int ExitInstance();
00042
00043 // Implementation
00044   //{{AFX_MSG(CMSOffice2007DemoApp)
00045   afx_msg void OnAppAbout();
00046   afx_msg void OnFileNew();
00047   afx_msg void OnFileOpen();
00048   afx_msg BOOL OnOpenRecentFile(UINT nID);
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 extern CMSOffice2007DemoApp theApp;
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/button/button.odl Source File

  • controls
  • button

button.odl

Go to the documentation of this file.
00001 // button.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (button.tlb) that will become a resource in
00005 // button.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(4A8C9992-7713-101B-A5A1-04021C009402), version(1.0),
00019   helpstring("Button OLE Custom Control module"), control ]
00020 library ButtonLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CButtonCtrl
00026
00027   [ uuid(4A8C9990-7713-101B-A5A1-04021C009402),
00028     helpstring("Dispatch interface for Button Control"), hidden ]
00029   dispinterface _DButton
00030   {
00031     properties:
00032       //{{AFX_ODL_PROP(CButtonCtrl)
00033       [id(DISPID_BORDERSTYLE), bindable, requestedit] short BorderStyle;
00034       [id(DISPID_CAPTION), bindable, requestedit] BSTR Caption;
00035       [id(DISPID_ENABLED), bindable, requestedit] boolean Enabled;
00036       [id(DISPID_FONT), bindable] IFontDisp* Font;
00037       //}}AFX_ODL_PROP
00038
00039     methods:
00040       //{{AFX_ODL_METHOD(CButtonCtrl)
00041       //}}AFX_ODL_METHOD
00042
00043       [id(DISPID_ABOUTBOX)] void AboutBox();
00044   };
00045
00046   //  Event dispatch interface for CButtonCtrl
00047
00048   [ uuid(4A8C9991-7713-101B-A5A1-04021C009402),
00049     helpstring("Event interface for Button Control") ]
00050   dispinterface _DButtonEvents
00051   {
00052     properties:
00053       //  Event interface has no properties
00054
00055     methods:
00056       //{{AFX_ODL_EVENT(CButtonCtrl)
00057       [id(DISPID_CLICK)] void Click();
00058       //}}AFX_ODL_EVENT
00059   };
00060
00061   //  Class information for CButtonCtrl
00062
00063   [ uuid(4A8C998F-7713-101B-A5A1-04021C009402),
00064     helpstring("Button Control"), control ]
00065   coclass Button
00066   {
00067     [default] dispinterface _DButton;
00068     [default, source] dispinterface _DButtonEvents;
00069   };
00070
00071
00072   //{{AFX_APPEND_ODL}}
00073 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/bounce.cpp Source File

  • general
  • mdi

bounce.cpp

Go to the documentation of this file.
00001 // bounce.cpp : Defines the class behaviors for the Bounce child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "mdi.h"
00015 #include "bounce.h"
00016
00017 #define ABS(x) ((x) < 0? -(x) : (x) > 0? (x) : 0)
00018
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CBounceWnd
00022
00023 BEGIN_MESSAGE_MAP(CBounceWnd, CMDIChildWnd)
00024   //{{AFX_MSG_MAP(CBounceWnd)
00025   ON_WM_CREATE()
00026   ON_WM_SIZE()
00027   ON_WM_TIMER()
00028   ON_COMMAND(IDM_BLACK, OnColor)
00029   ON_COMMAND(IDM_CUSTOM, OnCustomColor)
00030   ON_COMMAND(IDM_RED, OnColor)
00031   ON_COMMAND(IDM_GREEN, OnColor)
00032   ON_COMMAND(IDM_BLUE, OnColor)
00033   ON_COMMAND(IDM_WHITE, OnColor)
00034   ON_UPDATE_COMMAND_UI(IDM_SLOW, OnUpdateSlow)
00035   ON_COMMAND(IDM_SLOW, OnSlow)
00036   ON_UPDATE_COMMAND_UI(IDM_RED, OnUpdateColor)
00037   ON_UPDATE_COMMAND_UI(IDM_WHITE, OnUpdateColor)
00038   ON_UPDATE_COMMAND_UI(IDM_GREEN, OnUpdateColor)
00039   ON_COMMAND(IDM_FAST, OnFast)
00040   ON_UPDATE_COMMAND_UI(IDM_FAST, OnUpdateFast)
00041   ON_UPDATE_COMMAND_UI(IDM_CUSTOM, OnUpdateColor)
00042   ON_UPDATE_COMMAND_UI(IDM_BLUE, OnUpdateColor)
00043   ON_UPDATE_COMMAND_UI(IDM_BLACK, OnUpdateColor)
00044   //}}AFX_MSG_MAP
00045 END_MESSAGE_MAP()
00046
00047 CMenu NEAR CBounceWnd::menu;        // menu for all BOUNCE windows
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CBounceWnd creation
00051
00052 BOOL CBounceWnd::Create(LPCTSTR szTitle, LONG style /* = 0 */,
00053   const RECT& rect /* = rectDefault */,
00054   CMDIFrameWnd* parent /* = NULL */)
00055 {
00056   // Setup the shared menu
00057   if (menu.m_hMenu == NULL)
00058     menu.LoadMenu(IDR_BOUNCE);
00059   m_hMenuShared = menu.m_hMenu;
00060
00061   // Register a custom WndClass and create a window.
00062   // This must be done because CBounceWnd has a custom cursor, and
00063   //  no icon.
00064   LPCTSTR lpszBounceClass =
00065     AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
00066       LoadCursor(NULL, IDC_UPARROW),
00067       (HBRUSH)(COLOR_WINDOW+1),
00068       NULL);
00069
00070   return CMDIChildWnd::Create(lpszBounceClass, szTitle, style, rect, parent);
00071 }
00072
00073 CBounceWnd::CBounceWnd()
00074 {
00075   m_nIDColor = IDM_BLACK;
00076   m_clrBall = RGB(0,0,0);
00077   m_bFastSpeed = FALSE;
00078 }
00079
00080
00081 // Set up the ball parameters and start a timer.
00082 int CBounceWnd::OnCreate(LPCREATESTRUCT /* p */)
00083 {
00084   if (!SetTimer(1, 100 /*start slow*/, NULL))
00085   {
00086     MessageBox(_T("Not enough timers available for this window."),
00087         _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);
00088
00089     // signal creation failure...
00090     return -1;
00091   }
00092
00093   CDC* pDC = GetDC();
00094   m_ptPixel.x = pDC->GetDeviceCaps(ASPECTX);
00095   m_ptPixel.y = pDC->GetDeviceCaps(ASPECTY);
00096   ReleaseDC(pDC);
00097
00098   // Note that we could call MakeNewBall here (which should be called
00099   // whenever the ball's speed, color or size has been changed), but the
00100   // OnSize member function is always called after the OnCreate. Since
00101   // the OnSize member has to call MakeNewBall anyway, we don't here.
00102
00103   return 0;
00104 }
00105
00106 // MakeNewBall:
00107 // Whenever a parameter changes which would affect the speed or appearance
00108 // of the ball, call this to regenerate the ball bitmap.
00109 //
00110 void CBounceWnd::MakeNewBall()
00111 {
00112   m_sizeTotal.cx = (m_sizeRadius.cx + ABS(m_sizeMove.cx)) << 1;
00113   m_sizeTotal.cy = (m_sizeRadius.cy + ABS(m_sizeMove.cy)) << 1;
00114
00115   if (m_bmBall.m_hObject != NULL)
00116     m_bmBall.DeleteObject();        // get rid of old bitmap
00117
00118   CClientDC dc(this);
00119   CDC dcMem;
00120   dcMem.CreateCompatibleDC(&dc);
00121
00122   m_bmBall.CreateCompatibleBitmap(&dc, m_sizeTotal.cx, m_sizeTotal.cy);
00123   ASSERT(m_bmBall.m_hObject != NULL);
00124
00125   CBitmap* pOldBitmap = dcMem.SelectObject(&m_bmBall);
00126
00127   // draw a rectangle in the background (window) color
00128   CRect rect(0, 0, m_sizeTotal.cx, m_sizeTotal.cy);
00129   CBrush brBackground(::GetSysColor(COLOR_WINDOW));
00130   dcMem.FillRect(rect, &brBackground);
00131
00132   CBrush brCross(HS_DIAGCROSS, 0L);
00133   CBrush* pOldBrush = dcMem.SelectObject(&brCross);
00134
00135   dcMem.SetBkColor(m_clrBall);
00136   dcMem.Ellipse(ABS(m_sizeMove.cx), ABS(m_sizeMove.cy),
00137     m_sizeTotal.cx - ABS(m_sizeMove.cx),
00138     m_sizeTotal.cy - ABS(m_sizeMove.cy));
00139
00140   dcMem.SelectObject(pOldBrush);
00141   dcMem.SelectObject(pOldBitmap);
00142   dcMem.DeleteDC();
00143 }
00144
00145 // The ball's size and displacement change according to the window size.
00146 void CBounceWnd::OnSize(UINT nType, int cx, int cy)
00147 {
00148   LONG lScale;
00149
00150   m_ptCenter.x = cx >> 1;
00151   m_ptCenter.y = cy >> 1;
00152   m_ptCenter.x += cx >> 3; // make the ball a little off-center
00153
00154   lScale = min((LONG)cx * m_ptPixel.x,
00155     (LONG)cy * m_ptPixel.y) >> 4;
00156   m_sizeRadius.cx = (int)(lScale / m_ptPixel.x);
00157   m_sizeRadius.cy = (int)(lScale / m_ptPixel.y);
00158   m_sizeMove.cx = max(1, m_sizeRadius.cy >> 2);
00159   m_sizeMove.cy = max(1, m_sizeRadius.cy >> 2);
00160
00161   MakeNewBall();
00162
00163   CMDIChildWnd::OnSize(nType, cx, cy);
00164 }
00165
00166 /////////////////////////////////////////////////////////////////////////////
00167 // CBounceWnd commands
00168
00169 void CBounceWnd::OnUpdateColor(CCmdUI* pCmdUI)
00170 {
00171   pCmdUI->SetCheck(pCmdUI->m_nID == m_nIDColor);
00172 }
00173
00174 void CBounceWnd::OnColor()
00175 {
00176   m_nIDColor = LOWORD(GetCurrentMessage()->wParam);
00177   m_clrBall = colorArray[m_nIDColor - IDM_BLACK];
00178
00179   // Force the client area text to be repainted in the new color
00180   MakeNewBall();
00181   Invalidate();
00182 }
00183
00184 void CBounceWnd::OnCustomColor()
00185 {
00186   CColorDialog dlgColor(m_clrBall);
00187   if (dlgColor.DoModal() == IDOK)
00188   {
00189     m_clrBall = dlgColor.GetColor();
00190     m_nIDColor = IDM_CUSTOM;
00191     MakeNewBall();
00192     Invalidate();
00193   }
00194 }
00195
00196 // Change the ball's speed
00197 void CBounceWnd::ChangeSpeed()
00198 {
00199   // re-create the timer
00200   KillTimer(1);
00201   if (!SetTimer(1, m_bFastSpeed ? 0 : 100, NULL))
00202   {
00203     MessageBox(_T("Not enough timers available for this window."),
00204         _T("MDI:Bounce"), MB_ICONEXCLAMATION | MB_OK);
00205     DestroyWindow();
00206   }
00207 }
00208
00209 // Animate the ball.
00210 void CBounceWnd::OnTimer(UINT_PTR /* wParam */)
00211 {
00212   if (m_bmBall.m_hObject == NULL)
00213     return;     // no bitmap for the ball
00214
00215   CRect rcClient;
00216   GetClientRect(rcClient);
00217
00218   CClientDC dc(this);
00219   CBitmap* pbmOld = NULL;
00220
00221   CDC dcMem;
00222   dcMem.CreateCompatibleDC(&dc);
00223   pbmOld = dcMem.SelectObject(&m_bmBall);
00224
00225   dc.BitBlt(m_ptCenter.x - m_sizeTotal.cx / 2,
00226       m_ptCenter.y - m_sizeTotal.cy / 2,
00227       m_sizeTotal.cx, m_sizeTotal.cy,
00228       &dcMem, 0, 0, SRCCOPY);
00229
00230   m_ptCenter += m_sizeMove;
00231
00232   if ((m_ptCenter.x + m_sizeRadius.cx >= rcClient.right) ||
00233     (m_ptCenter.x - m_sizeRadius.cx <= 0))
00234   {
00235     m_sizeMove.cx = -m_sizeMove.cx;
00236   }
00237
00238   if ((m_ptCenter.y + m_sizeRadius.cy >= rcClient.bottom) ||
00239     (m_ptCenter.y - m_sizeRadius.cy <= 0))
00240   {
00241     m_sizeMove.cy = -m_sizeMove.cy;
00242   }
00243
00244   dcMem.SelectObject(pbmOld);
00245   dcMem.DeleteDC();
00246 }
00247
00248 void CBounceWnd::OnUpdateSlow(CCmdUI* pCmdUI)
00249 {
00250   pCmdUI->SetCheck(!m_bFastSpeed);
00251 }
00252
00253 void CBounceWnd::OnSlow()
00254 {
00255   m_bFastSpeed = FALSE;
00256   ChangeSpeed();
00257 }
00258
00259 void CBounceWnd::OnUpdateFast(CCmdUI* pCmdUI)
00260 {
00261   pCmdUI->SetCheck(m_bFastSpeed);
00262 }
00263
00264 void CBounceWnd::OnFast()
00265 {
00266   m_bFastSpeed = TRUE;
00267   ChangeSpeed();
00268 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/FolderBar.cpp Source File

  • vc2008fp
  • Explorer

FolderBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "explorer.h"
00013 #include "FolderBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 const int idTree = 1;
00022
00023 #define SHCNF_ACCEPT_INTERRUPTS 0x0001
00024 #define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
00025
00026 UINT UWM_NOTIFY_RECYCLE_BIN = ::RegisterWindowMessage(_T("UWM_NOTIFY_RECYCLE_BIN"));
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CFolderBar
00030
00031 CFolderBar::CFolderBar()
00032 {
00033   m_ulRecycleBin = 0;
00034 }
00035
00036 CFolderBar::~CFolderBar()
00037 {
00038 }
00039
00040
00041 BEGIN_MESSAGE_MAP(CFolderBar, CDockablePane)
00042   ON_WM_CREATE()
00043   ON_WM_SIZE()
00044   ON_WM_SETFOCUS()
00045   ON_WM_ERASEBKGND()
00046   ON_REGISTERED_MESSAGE(UWM_NOTIFY_RECYCLE_BIN, OnNotifyRecycleBin)
00047   ON_WM_DESTROY()
00048 END_MESSAGE_MAP()
00049
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CFolderBar message handlers
00053
00054 int CFolderBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00055 {
00056   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00057     return -1;
00058
00059   CRect rectDummy (0, 0, 0, 0);
00060   const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
00061                 TVS_LINESATROOT | TVS_HASBUTTONS;
00062
00063   m_wndShellTree.Create(dwViewStyle, rectDummy, this, idTree);
00064
00065   LPITEMIDLIST ppidl;
00066   if (SHGetSpecialFolderLocation(GetSafeHwnd(),CSIDL_BITBUCKET, &ppidl) != NOERROR)
00067   {
00068     return 0;
00069   }
00070
00071   SHChangeNotifyEntry scnIDL;
00072   scnIDL.pidl = ppidl;
00073   scnIDL.fRecursive = TRUE;
00074
00075   m_ulRecycleBin = SHChangeNotifyRegister(m_hWnd, SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS, SHCNE_ALLEVENTS,  UWM_NOTIFY_RECYCLE_BIN, 1, &scnIDL);
00076   return 0;
00077 }
00078
00079 void CFolderBar::OnSize(UINT nType, int cx, int cy)
00080 {
00081   CDockablePane::OnSize(nType, cx, cy);
00082
00083   m_wndShellTree.SetWindowPos (NULL, 0, 0,
00084     cx, cy,
00085     SWP_NOACTIVATE | SWP_NOZORDER);
00086 }
00087
00088 void CFolderBar::OnSetFocus(CWnd* pOldWnd)
00089 {
00090   CDockablePane::OnSetFocus(pOldWnd);
00091   m_wndShellTree.SetFocus ();
00092 }
00093
00094 BOOL CFolderBar::OnEraseBkgnd(CDC* /*pDC*/)
00095 {
00096   return TRUE;
00097 }
00098 LRESULT CFolderBar::OnNotifyRecycleBin(WPARAM wParam, LPARAM lParam)
00099 {
00100   UNREFERENCED_PARAMETER(wParam);
00101   if (lParam == SHCNE_UPDATEIMAGE)
00102   {
00103     m_wndShellTree.Refresh();
00104   }
00105
00106   if (lParam == SHCNE_FREESPACE)
00107   {
00108     LPITEMIDLIST ppidl;
00109     if (SHGetSpecialFolderLocation(GetSafeHwnd(), CSIDL_BITBUCKET, &ppidl) != NOERROR)
00110     {
00111       return TRUE;
00112     }
00113
00114     m_wndShellTree.SelectPath(ppidl);
00115
00116     CMFCShellListCtrl* pList = m_wndShellTree.GetRelatedList();
00117     ASSERT_VALID(pList);
00118
00119     pList->Refresh();
00120   }
00121
00122   return TRUE;
00123 }
00124 void CFolderBar::OnDestroy()
00125 {
00126   CDockablePane::OnDestroy();
00127
00128   if (m_ulRecycleBin != 0)
00129   {
00130     SHChangeNotifyDeregister(m_ulRecycleBin);
00131   }
00132 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSplitFrame Member List

This is the complete list of members for CSplitFrame, including all inherited members.
CSplitFrame() | CSplitFrame | [protected]
CSplitFrame() | CSplitFrame | [protected]
CSplitFrame() | CSplitFrame | [protected]
m_wndSplitter | CSplitFrame | [protected]
m_wndSplitter | CSplitFrame | [protected]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CSplitFrame | [virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CSplitFrame | [virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CSplitFrame | [virtual]
OnFilePrint() | CSplitFrame |
OnFilePrintPreview() | CSplitFrame |
OnUpdateFilePrintPreview(CCmdUI *pCmdUI) | CSplitFrame |
~CSplitFrame() | CSplitFrame | [virtual]
~CSplitFrame() | CSplitFrame | [virtual]
~CSplitFrame() | CSplitFrame | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/key.h Source File

  • vc2008fp
  • WordPad

key.h

Go to the documentation of this file.
00001 //
00002 // key.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CKey
00016
00017 class CKey
00018 {
00019 public:
00020   CKey() {m_hKey = NULL;}
00021   ~CKey() {Close();}
00022
00023 // Attributes
00024 public:
00025   HKEY m_hKey;
00026   BOOL SetStringValue(LPCTSTR lpszValue, LPCTSTR lpszValueName = NULL);
00027   BOOL GetStringValue(CString& str, LPCTSTR lpszValueName = NULL);
00028
00029 // Operations
00030 public:
00031   BOOL Create(HKEY hKey, LPCTSTR lpszKeyName);
00032   BOOL Open(HKEY hKey, LPCTSTR lpszKeyName);
00033   void Close();
00034
00035 // Overrides
00036
00037 // Implementation
00038 protected:
00039 };
00040
00041 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMLinksBarButton Member List

This is the complete list of members for CMSMLinksBarButton, including all inherited members.
CMSMLinksBarButton() | CMSMLinksBarButton |
CMSMLinksBarButton(LPCTSTR lpszLabel, UINT nID) | CMSMLinksBarButton |
Initialize() | CMSMLinksBarButton | [protected]
IsEditable() const | CMSMLinksBarButton | [inline, protected, virtual]
OnCalculateSize(CDC *pDC, const CSize &sizeDefault, BOOL bHorz) | CMSMLinksBarButton | [protected, virtual]
OnDraw(CDC *pDC, const CRect &rect, CMFCToolBarImages *pImages, BOOL bHorz=TRUE, BOOL bCustomizeMode=FALSE, BOOL bHighlight=FALSE, BOOL bDrawBorder=TRUE, BOOL bGrayDisabledButtons=TRUE) | CMSMLinksBarButton | [virtual]
~CMSMLinksBarButton() | CMSMLinksBarButton | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypeLibWnd Member List

This is the complete list of members for CTypeLibWnd, including all inherited members.
CTypeLibWnd(CWnd *pParent=NULL) | CTypeLibWnd |
m_fGroupByKind | CTypeLibWnd |
m_pODLView | CTypeLibWnd |
m_pSelectedItem | CTypeLibWnd |
m_ptlb | CTypeLibWnd |
m_pTreeView | CTypeLibWnd |
m_wndSplitter | CTypeLibWnd |
m_wndStatusBar | CTypeLibWnd |
m_wndToolBar | CTypeLibWnd |
OnAppAbout() | CTypeLibWnd | [protected]
OnClose() | CTypeLibWnd | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTypeLibWnd | [protected]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pcc) | CTypeLibWnd | [protected, virtual]
OnDestroy() | CTypeLibWnd | [protected]
OnFileClose() | CTypeLibWnd | [protected]
OnSize(UINT nType, int cx, int cy) | CTypeLibWnd | [protected]
OnUpdateViewGroupByKind(CCmdUI *pCmdUI) | CTypeLibWnd | [protected]
OnViewGroupKind() | CTypeLibWnd | [protected]
PostNcDestroy() | CTypeLibWnd | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CTypeLibWnd | [protected, virtual]
RestorePosition() | CTypeLibWnd |
UpdateAllViews(CView *pSender, LPARAM lHint=0L, CObject *pHint=NULL) | CTypeLibWnd |
~CTypeLibWnd() | CTypeLibWnd | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/propdlg/mainfrm.cpp Source File

  • general
  • propdlg

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "propdlg.h"
00014 #include "colorpge.h"
00015 #include "stylepge.h"
00016 #include "shapeobj.h"
00017 #include "preview.h"
00018 #include "propsht.h"
00019 #include "propsht2.h"
00020 #include "minifrm.h"
00021 #include "resource.h"
00022 #include "mainfrm.h"
00023 #include "shapedoc.h"
00024 #include "shapesvw.h"
00025
00026 #ifdef _DEBUG
00027 #undef THIS_FILE
00028 static char BASED_CODE THIS_FILE[] = __FILE__;
00029 #endif
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CMainFrame
00033
00034 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00035
00036 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00037   //{{AFX_MSG_MAP(CMainFrame)
00038   ON_WM_CREATE()
00039   ON_COMMAND(ID_MINI_FRAME_PROPERTY_SHEET, OnMiniFramePropertySheet)
00040   ON_UPDATE_COMMAND_UI(ID_MINI_FRAME_PROPERTY_SHEET, OnUpdateMiniFramePropertySheet)
00041   //}}AFX_MSG_MAP
00042 END_MESSAGE_MAP()
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // arrays of IDs used to initialize control bars
00046
00047 // toolbar buttons - IDs are command buttons
00048 static UINT BASED_CODE buttons[] =
00049 {
00050   // same order as in the bitmap 'toolbar.bmp'
00051   ID_FILE_NEW,
00052   ID_FILE_OPEN,
00053   ID_FILE_SAVE,
00054     ID_SEPARATOR,
00055   ID_EDIT_CUT,
00056   ID_EDIT_COPY,
00057   ID_EDIT_PASTE,
00058     ID_SEPARATOR,
00059   ID_FILE_PRINT,
00060   ID_APP_ABOUT,
00061 };
00062
00063 static UINT BASED_CODE indicators[] =
00064 {
00065   ID_SEPARATOR,           // status line indicator
00066   ID_INDICATOR_CAPS,
00067   ID_INDICATOR_NUM,
00068   ID_INDICATOR_SCRL,
00069 };
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CMainFrame construction/destruction
00073
00074 CMainFrame::CMainFrame()
00075 {
00076   m_pShapePropFrame = NULL;
00077 }
00078
00079 CMainFrame::~CMainFrame()
00080 {
00081 }
00082
00083 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00084 {
00085   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00086     return -1;
00087
00088   if (!m_wndToolBar.Create(this) ||
00089     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00090     !m_wndToolBar.SetButtons(buttons,
00091       sizeof(buttons)/sizeof(UINT)))
00092   {
00093     TRACE0("Failed to create toolbar\n");
00094     return -1;      // fail to create
00095   }
00096
00097   if (!m_wndStatusBar.Create(this) ||
00098     !m_wndStatusBar.SetIndicators(indicators,
00099       sizeof(indicators)/sizeof(UINT)))
00100   {
00101     TRACE0("Failed to create status bar\n");
00102     return -1;      // fail to create
00103   }
00104
00105   return 0;
00106 }
00107
00108 /////////////////////////////////////////////////////////////////////////////
00109 // CMainFrame diagnostics
00110
00111 #ifdef _DEBUG
00112 void CMainFrame::AssertValid() const
00113 {
00114   CMDIFrameWnd::AssertValid();
00115 }
00116
00117 void CMainFrame::Dump(CDumpContext& dc) const
00118 {
00119   CMDIFrameWnd::Dump(dc);
00120 }
00121 #endif //_DEBUG
00122
00123 /////////////////////////////////////////////////////////////////////////////
00124 // CMainFrame message handlers
00125
00126 void CMainFrame::OnMiniFramePropertySheet()
00127 {
00128   // If mini frame does not already exist, create a new one.
00129   // Otherwise, unhide it
00130
00131   if (m_pShapePropFrame == NULL)
00132   {
00133     m_pShapePropFrame = new CShapePropSheetFrame;
00134     CRect rect(0, 0, 0, 0);
00135     CString strTitle;
00136     strTitle.LoadString(IDS_OBJECT_PROPERTIES);
00137     if (!m_pShapePropFrame->Create(NULL, strTitle,
00138       WS_POPUP | WS_CAPTION | WS_SYSMENU, rect, this))
00139     {
00140       m_pShapePropFrame = NULL;
00141       return;
00142     }
00143     m_pShapePropFrame->CenterWindow();
00144   }
00145
00146   // Before unhiding the modeless property sheet, update its
00147   // settings to reflect the currently selected shape.
00148   CShapesView* pView =
00149     STATIC_DOWNCAST(CShapesView, MDIGetActive()->GetActiveView());
00150   ASSERT_VALID(pView);
00151   if (pView->m_pShapeSelected != NULL)
00152   {
00153      m_pShapePropFrame->m_pModelessShapePropSheet->
00154        SetSheetPropsFromShape(pView->m_pShapeSelected);
00155   }
00156
00157   if (m_pShapePropFrame != NULL && !m_pShapePropFrame->IsWindowVisible())
00158     m_pShapePropFrame->ShowWindow(SW_SHOW);
00159 }
00160
00161 void CMainFrame::OnUpdateMiniFramePropertySheet(CCmdUI* pCmdUI)
00162 {
00163   pCmdUI->Enable(m_pShapePropFrame == NULL
00164     || !m_pShapePropFrame->IsWindowVisible());
00165 }
00166
00167 void CMainFrame::HideModelessPropSheet()
00168 {
00169   if (m_pShapePropFrame != NULL)
00170     m_pShapePropFrame->ShowWindow(SW_HIDE);
00171 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/spinctrl.h Source File

  • general
  • CmnCtrl2

spinctrl.h

Go to the documentation of this file.
00001 // SpinCtrl.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CSpinCtrlPage dialog
00015 #ifndef INC_SPINCTRL_H
00016 #define INC_SPINCTRL_H
00017
00018 class CSpinCtrlPage : public CPropertyPage
00019 {
00020   DECLARE_DYNCREATE(CSpinCtrlPage)
00021
00022 // Construction
00023 public:
00024   CSpinCtrlPage();
00025   ~CSpinCtrlPage();
00026
00027 // Dialog Data
00028   //{{AFX_DATA(CSpinCtrlPage)
00029   enum { IDD = IDD_SPINCTRL };
00030   int     m_iAlignment;
00031   BOOL    m_bArrowkeys;
00032   BOOL    m_bAutobuddy;
00033   UINT    m_uiRangeFrom;
00034   BOOL    m_bNothousands;
00035   int     m_iOrientation;
00036   BOOL    m_bSetbuddyint;
00037   UINT    m_uiRangeTo;
00038   BOOL    m_bWrap;
00039   //}}AFX_DATA
00040
00041   CSpinButtonCtrl m_Spin;
00042   CRect           m_EditRect;
00043
00044 // Overrides
00045   // ClassWizard generate virtual function overrides
00046   //{{AFX_VIRTUAL(CSpinCtrlPage)
00047   protected:
00048   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00049   virtual BOOL OnInitDialog();
00050   virtual BOOL OnApply();
00051   //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 protected:
00055   void CreateSpinCtrl();
00056
00057   // Generated message map functions
00058   //{{AFX_MSG(CSpinCtrlPage)
00059   afx_msg void OnAnyChange();
00060   //}}AFX_MSG
00061   DECLARE_MESSAGE_MAP()
00062
00063 };
00064
00065 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CServerDoc Member List

This is the complete list of members for CServerDoc, including all inherited members.
CalcBounding(CDC *pDC, CServerNode *pItemStart, CPoint ptStart, CSize &sizeMax) | CServerDoc |
CServerDoc() | CServerDoc | [protected]
DeleteContents() | CServerDoc | [virtual]
DrawTree(CDC *pDC, CPoint ptStart, CServerNode *pItemSel, CServerNode *pRoot=NULL) | CServerDoc |
m_cfPrivate | CServerDoc | [static]
m_crText | CServerDoc |
m_logfont | CServerDoc |
m_pRoot | CServerDoc |
OnCancelInplace() | CServerDoc | [protected]
OnGetEmbeddedItem() | CServerDoc | [virtual]
OnGetLinkedItem(LPCTSTR lpszItemName) | CServerDoc | [virtual]
OnNewDocument() | CServerDoc | [protected, virtual]
OnOptionsFont() | CServerDoc | [protected]
OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect) | CServerDoc | [virtual]
SelectDocFont(CDC *pDC, CFont &font) | CServerDoc |
Serialize(CArchive &ar) | CServerDoc | [virtual]
SerializeFontInfo(CArchive &ar) | CServerDoc |
~CServerDoc() | CServerDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMainFrame::XStyle Member List

This is the complete list of members for CMainFrame::XStyle, including all inherited members.
clrFill | CMainFrame::XStyle
clrLine | CMainFrame::XStyle
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/cube/stdafx.h Source File

  • advanced
  • cube

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #define VC_EXTRALEAN
00013
00014 #include <afxwin.h>      // MFC core and standard components
00015 #include <afxext.h>         // MFC extensions
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBarButton.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMLinksBarButton.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CMSMLinksBarButton : public CMFCToolBarButton
00013 {
00014   DECLARE_SERIAL(CMSMLinksBarButton)
00015
00016 public:
00017   CMSMLinksBarButton ();
00018   CMSMLinksBarButton (LPCTSTR lpszLabel, UINT nID);
00019
00020   virtual ~CMSMLinksBarButton ();
00021
00022   virtual void OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00023            BOOL bHorz = TRUE, BOOL bCustomizeMode = FALSE,
00024            BOOL bHighlight = FALSE,
00025            BOOL bDrawBorder = TRUE,
00026            BOOL bGrayDisabledButtons = TRUE);
00027
00028 protected:
00029   void Initialize ();
00030
00031   virtual BOOL IsEditable () const
00032          {
00033            return FALSE;
00034          }
00035
00036   virtual SIZE OnCalculateSize (
00037            CDC* pDC,
00038            const CSize& sizeDefault,
00039            BOOL bHorz);
00040 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBar.h Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CWorkSpaceToolBarApp:
00021 // See WorkSpaceToolBar.cpp for the implementation of this class
00022 //
00023
00024 class CWorkSpaceToolBarApp : public CWinAppEx
00025 {
00026 public:
00027   CWorkSpaceToolBarApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern CWorkSpaceToolBarApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesView.cpp Source File

  • vc2008fp
  • CustomPages

CustomPagesView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "CustomPages.h"
00013
00014 #include "CustomPagesDoc.h"
00015 #include "CustomPagesView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 static const CString strInfo =
00024   _T("This sample illustrates how to add a custom property page to the customization dialog. \r\n\r\n")
00025   _T("The following features are available:\r\n")
00026   _T("* Insert custom property page 'My Customization Page' into the customization dialog.\r\n\r\n")
00027   _T("This example was created using Application Wizard\r\n")
00028   _T("Using resource editor create a new dialog form\r\n")
00029   _T("Using class wizard create a new (CMyCustomizationPage) class for this form and derive it from CPropertyPage\r\n")
00030   _T("CMyCustomizationPage must be enabled to be created dynamically (DECLARE_DYNCREATE)\r\n")
00031   _T("See CMainFrame::OnViewCustomize() for details.");
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CCustomPagesView
00035
00036 IMPLEMENT_DYNCREATE(CCustomPagesView, CView)
00037
00038 BEGIN_MESSAGE_MAP(CCustomPagesView, CView)
00039   ON_WM_CONTEXTMENU()
00040   // Standard printing commands
00041   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00042   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00043   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00044 END_MESSAGE_MAP()
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CCustomPagesView construction/destruction
00048
00049 CCustomPagesView::CCustomPagesView()
00050 {
00051   // TODO: add construction code here
00052
00053 }
00054
00055 CCustomPagesView::~CCustomPagesView()
00056 {
00057 }
00058
00059 BOOL CCustomPagesView::PreCreateWindow(CREATESTRUCT& cs)
00060 {
00061   // TODO: Modify the Window class or styles here by modifying
00062   //  the CREATESTRUCT cs
00063
00064   return CView::PreCreateWindow(cs);
00065 }
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CCustomPagesView drawing
00069
00070 void CCustomPagesView::OnDraw(CDC* pDC)
00071 {
00072 //  CCustomPagesDoc* pDoc = GetDocument();
00073 //  ASSERT_VALID(pDoc);
00074
00075   const int iOffset = 20;
00076
00077   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00078   ASSERT (pFontOld != NULL);
00079
00080   CRect rectClient;
00081   GetClientRect (&rectClient);
00082
00083   CRect rectText = rectClient;
00084   rectText.DeflateRect (iOffset, iOffset);
00085   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00086
00087   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00088               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00089
00090   CRect rectFrame = rectText;
00091   rectFrame.InflateRect (iOffset, iOffset);
00092
00093   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00094
00095   rectFrame.DeflateRect (1, 1);
00096   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00097           ::GetSysColor (COLOR_3DLIGHT));
00098
00099   rectFrame.DeflateRect (2, 2);
00100   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00101           ::GetSysColor (COLOR_3DLIGHT));
00102
00103   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00104   pDC->SetBkMode (TRANSPARENT);
00105
00106   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00107
00108   pDC->SelectObject (pFontOld);
00109
00110 }
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CCustomPagesView printing
00114
00115 void CCustomPagesView::OnFilePrintPreview()
00116 {
00117   AFXPrintPreview (this);
00118 }
00119
00120 BOOL CCustomPagesView::OnPreparePrinting(CPrintInfo* pInfo)
00121 {
00122   // default preparation
00123   return DoPreparePrinting(pInfo);
00124 }
00125
00126 void CCustomPagesView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00127 {
00128   // TODO: add extra initialization before printing
00129 }
00130
00131 void CCustomPagesView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00132 {
00133   // TODO: add cleanup after printing
00134 }
00135
00136 /////////////////////////////////////////////////////////////////////////////
00137 // CCustomPagesView diagnostics
00138
00139 #ifdef _DEBUG
00140 void CCustomPagesView::AssertValid() const
00141 {
00142   CView::AssertValid();
00143 }
00144
00145 void CCustomPagesView::Dump(CDumpContext& dc) const
00146 {
00147   CView::Dump(dc);
00148 }
00149
00150 CCustomPagesDoc* CCustomPagesView::GetDocument() // non-debug version is inline
00151 {
00152   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCustomPagesDoc)));
00153   return (CCustomPagesDoc*)m_pDocument;
00154 }
00155 #endif //_DEBUG
00156
00157 /////////////////////////////////////////////////////////////////////////////
00158 // CCustomPagesView message handlers
00159
00160 void CCustomPagesView::OnContextMenu(CWnd*, CPoint point)
00161 {
00162   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00163 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/IFacesPg.Cpp Source File

  • ole
  • TstCon

IFacesPg.Cpp

Go to the documentation of this file.
00001 // CInterfacesPage.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CInterfacesPage property page
00022
00023 IMPLEMENT_DYNCREATE(CInterfacesPage, CPropertyPage)
00024
00025 CInterfacesPage::CInterfacesPage() : CPropertyPage(CInterfacesPage::IDD)
00026 {
00027    m_psp.dwFlags &= ~PSP_HASHELP;
00028
00029   //{{AFX_DATA_INIT(CInterfacesPage)
00030   m_tIOleInPlaceSiteWindowless = FALSE;
00031   m_tIOleInPlaceSiteEx = FALSE;
00032   m_tIAdviseSinkEx = FALSE;
00033   //}}AFX_DATA_INIT
00034 }
00035
00036 CInterfacesPage::~CInterfacesPage()
00037 {
00038 }
00039
00040 void CInterfacesPage::DoDataExchange(CDataExchange* pDX)
00041 {
00042   CPropertyPage::DoDataExchange(pDX);
00043   //{{AFX_DATA_MAP(CInterfacesPage)
00044   DDX_Check(pDX, IDC_IOLEINPLACESITEWINDOWLESS, m_tIOleInPlaceSiteWindowless);
00045   DDX_Check(pDX, IDC_IOLEINPLACESITEEX, m_tIOleInPlaceSiteEx);
00046   DDX_Check(pDX, IDC_IADVISESINKEX, m_tIAdviseSinkEx);
00047   //}}AFX_DATA_MAP
00048 }
00049
00050
00051 BEGIN_MESSAGE_MAP(CInterfacesPage, CPropertyPage)
00052   //{{AFX_MSG_MAP(CInterfacesPage)
00053   ON_WM_HELPINFO()
00054   ON_WM_CONTEXTMENU()
00055   //}}AFX_MSG_MAP
00056 END_MESSAGE_MAP()
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CInterfacesPage message handlers
00060
00061
00062 static DWORD rgmapCHID[] =
00063 {
00064    IDC_IOLEINPLACESITEEX, HIDC_IOLEINPLACESITEEX,
00065    IDC_IOLEINPLACESITEWINDOWLESS, HIDC_IOLEINPLACESITEWINDOWLESS,
00066    IDC_IADVISESINKEX, HIDC_IADVISESINKEX,
00067    0, 0
00068 };
00069
00070 BOOL CInterfacesPage::OnHelpInfo( HELPINFO* pHelpInfo )
00071 {
00072   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00073   strPath += _T("::/popups.txt");
00074
00075   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00076 }
00077
00078 void CInterfacesPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00079 {
00080   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00081   strPath += _T("::/popups.txt");
00082
00083   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00084 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/MainFrm.h Source File

  • vc2008fp
  • DynamicMenu

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 //------------- Example --------------------//
00014 // here is the overriden version of of CMFCMenuBar that will dynamically modify
00015 // the top level menu bar
00016 #include "MyMenuBar.h"
00017 //-----------------------------------------//
00018
00019 #define CFrameWnd CFrameWndEx
00020
00021 class CMainFrame : public CFrameWnd
00022 {
00023
00024 protected: // create from serialization only
00025   CMainFrame();
00026   DECLARE_DYNCREATE(CMainFrame)
00027
00028 // Attributes
00029 public:
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00036
00037 // Implementation
00038 public:
00039   virtual ~CMainFrame();
00040 #ifdef _DEBUG
00041   virtual void AssertValid() const;
00042   virtual void Dump(CDumpContext& dc) const;
00043 #endif
00044
00045 protected:  // control bar embedded members
00046   //------------- Example --------------------//
00047   CMyMenuBar    m_wndMenuBar;
00048   //------------------------------------------//
00049   CMFCStatusBar   m_wndStatusBar;
00050   CMFCToolBar   m_wndToolBar;
00051
00052 protected:
00053   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00054   afx_msg void OnDynamicItem1();
00055   afx_msg void OnDynamicItem2();
00056   afx_msg void OnViewCustomize();
00057   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00058   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00059   afx_msg LRESULT OnResetMenu(WPARAM,LPARAM);
00060   afx_msg void OnEditMyItem1 ();
00061   afx_msg void OnEditMyItem2 ();
00062
00063   DECLARE_MESSAGE_MAP()
00064
00065   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00066   //------------- Example --------------------//
00067   virtual BOOL OnDrawMenuImage (  CDC* pDC,
00068                   const CMFCToolBarMenuButton* pMenuButton,
00069                   const CRect& rectImage);
00070   //------------------------------------------//
00071 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/resource.h Source File

  • general
  • dynamenu

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by dynamenu.rc
00004 //
00005 #define IDR_MAINFRAME                   128
00006 #define IDR_DYMENUTYPE                  129
00007 #define IDS_COLORHELPFMT                4
00008 #define IDD_ABOUTBOX                    100
00009 #define IDS_BLACK                       100
00010 #define IDS_RED                         101
00011 #define IDD_CHANGECOLOR                 102
00012 #define IDS_PURPLE                      102
00013 #define IDS_BLUE                        103
00014 #define IDC_COLOR1                      1000
00015 #define IDC_COLOR2                      1001
00016 #define IDC_COLOR3                      1002
00017 #define IDC_COLOR4                      1003
00018 #define ID_COLOR_OPTIONS                32771
00019 #define ID_COLOR1                       32772
00020 #define ID_COLOR2                       32773
00021 #define ID_COLOR3                       32774
00022 #define ID_COLOR4                       32775
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028 #define _APS_NEXT_RESOURCE_VALUE        102
00029 #define _APS_NEXT_COMMAND_VALUE         32776
00030 #define _APS_NEXT_CONTROL_VALUE         1000
00031 #define _APS_NEXT_SYMED_VALUE           101
00032 #endif
00033 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTreeItem Member List

This is the complete list of members for CTreeItem, including all inherited members.
CTreeItem(CTreeCtrl *pTree=NULL) | CTreeItem |
Expand(HTREEITEM hitem) | CTreeItem | [virtual]
ExpandFuncs(HTREEITEM hitem) | CTreeItem | [virtual]
ExpandImplTypes(HTREEITEM hitem) | CTreeItem | [virtual]
ExpandTypeInfo(HTREEITEM hitem) | CTreeItem | [virtual]
ExpandTypeLib(HTREEITEM hitem) | CTreeItem | [virtual]
ExpandVars(HTREEITEM hitem) | CTreeItem | [virtual]
GetName(CString &szReturn, BOOL fIDLStyle=FALSE) | CTreeItem |
GetTypeInfo() | CTreeItem | [inline, virtual]
GetTypeKind() | CTreeItem |
GetTypeLib() | CTreeItem | [inline, virtual]
ITEM_TYPE enum name | CTreeItem |
m_pTree | CTreeItem |
m_punk | CTreeItem |
m_Type | CTreeItem |
m_uiMemid | CTreeItem |
SetTypeInfo(ITypeInfo *punk) | CTreeItem | [inline, virtual]
SetTypeLib(ITypeLib *punk) | CTreeItem | [inline, virtual]
typeAlias enum value | CTreeItem |
typeAliases enum value | CTreeItem |
typeCoClass enum value | CTreeItem |
typeCoClasses enum value | CTreeItem |
typeConstant enum value | CTreeItem |
typeConstants enum value | CTreeItem |
typeConstants2 enum value | CTreeItem |
TYPEDESCtoString(TYPEDESC *lptdesc) | CTreeItem |
typeDispinterface enum value | CTreeItem |
typeDispinterfaces enum value | CTreeItem |
typeEnum enum value | CTreeItem |
typeEnums enum value | CTreeItem |
typeImplTypes enum value | CTreeItem |
typeImplTypes2 enum value | CTreeItem |
typeInterface enum value | CTreeItem |
typeInterfaces enum value | CTreeItem |
TypeKindToItemType(TYPEKIND tkind) | CTreeItem |
typeMethod enum value | CTreeItem |
typeMethods enum value | CTreeItem |
typeMethods2 enum value | CTreeItem |
typeModule enum value | CTreeItem |
typeModules enum value | CTreeItem |
typeProperties enum value | CTreeItem |
typeProperties2 enum value | CTreeItem |
typeProperty enum value | CTreeItem |
typeRecord enum value | CTreeItem |
typeRecords enum value | CTreeItem |
typeTypeInfo enum value | CTreeItem |
typeTypeInfo2 enum value | CTreeItem |
typeTypeLib enum value | CTreeItem |
typeTypeLib2 enum value | CTreeItem |
typeUnion enum value | CTreeItem |
typeUnions enum value | CTreeItem |
typeUnknown enum value | CTreeItem |
typeUnknown2 enum value | CTreeItem |
~CTreeItem() | CTreeItem | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/MainFrm.cpp Source File

  • vc2008fp
  • OwnerDrawMenu

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "OwnerDrawMenu.h"
00013 #include "LineStyleMenuItem.h"
00014
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00027
00028
00029 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00030   ON_WM_CREATE()
00031   ON_WM_CLOSE()
00032   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00033   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00034   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00035 END_MESSAGE_MAP()
00036
00037 static UINT indicators[] =
00038 {
00039   ID_SEPARATOR,           // status line indicator
00040   ID_INDICATOR_CAPS,
00041   ID_INDICATOR_NUM,
00042   ID_INDICATOR_SCRL,
00043 };
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CMainFrame construction/destruction
00047
00048 CMainFrame::CMainFrame()
00049 {
00050   // TODO: add member initialization code here
00051
00052 }
00053
00054 CMainFrame::~CMainFrame()
00055 {
00056 }
00057
00058 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00059 {
00060   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00061     return -1;
00062
00063   CMFCToolBar::EnableQuickCustomization ();
00064   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00065
00066   if (!m_wndMenuBar.Create (this))
00067   {
00068     TRACE0("Failed to create menubar\n");
00069     return -1;      // fail to create
00070   }
00071
00072   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00073
00074   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00075     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00076     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00077   {
00078     TRACE0("Failed to create toolbar\n");
00079     return -1;      // fail to create
00080   }
00081   if (!m_wndStatusBar.Create(this) ||
00082     !m_wndStatusBar.SetIndicators(indicators,
00083       sizeof(indicators)/sizeof(UINT)))
00084   {
00085     TRACE0("Failed to create status bar\n");
00086     return -1;      // fail to create
00087   }
00088
00089   BOOL bValidString;
00090   CString strMainToolbarTitle;
00091   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00092   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00093   // TODO: Delete these three lines if you don't want the toolbar to
00094   //  be dockable
00095   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00096   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00097   EnableDocking(CBRS_ALIGN_ANY);
00098   DockPane(&m_wndMenuBar);
00099   DockPane(&m_wndToolBar);
00100
00101   //----------------------------------------------------------
00102   // Line styles will be protected (unable to customize them):
00103   //----------------------------------------------------------
00104   CList<UINT, UINT> lstLineStyles;
00105   for (UINT uiLineStyleCmd = ID_LINE_STYLE_1; uiLineStyleCmd <= ID_LINE_STYLE_10;
00106     uiLineStyleCmd++)
00107   {
00108     lstLineStyles.AddTail (uiLineStyleCmd);
00109   }
00110
00111   CMFCToolBarButton::SetProtectedCommands (lstLineStyles);
00112   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00113
00114   return 0;
00115 }
00116
00117 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00118 {
00119   if( !CFrameWnd::PreCreateWindow(cs) )
00120     return FALSE;
00121   // TODO: Modify the Window class or styles here by modifying
00122   //  the CREATESTRUCT cs
00123
00124   return TRUE;
00125 }
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CMainFrame diagnostics
00129
00130 #ifdef _DEBUG
00131 void CMainFrame::AssertValid() const
00132 {
00133   CFrameWnd::AssertValid();
00134 }
00135
00136 void CMainFrame::Dump(CDumpContext& dc) const
00137 {
00138   CFrameWnd::Dump(dc);
00139 }
00140
00141 #endif //_DEBUG
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CMainFrame message handlers
00145
00146
00147 void CMainFrame::OnViewCustomize()
00148 {
00149   //------------------------------------
00150   // Create a customize toolbars dialog:
00151   //------------------------------------
00152   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00153     TRUE /* Automatic menus scaning */);
00154
00155   pDlgCust->Create ();
00156 }
00157
00158 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00159 {
00160   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00161
00162   CMenu menu;
00163   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00164
00165   CMenu* pPopup = menu.GetSubMenu(0);
00166   ASSERT(pPopup != NULL);
00167
00168   if (pPopup)
00169   {
00170     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00171     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00172   }
00173
00174   return 0;
00175 }
00176
00177 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
00178 {
00179   UINT uiToolBarId = (UINT) wp;
00180   if (uiToolBarId == IDR_MAINFRAME)
00181   {
00182     //--------------------------------------------------------
00183     // Replace the regular toolbar button 'ID_LINE_STYLE_MENU'
00184     // by menu button:
00185     //--------------------------------------------------------
00186     CMenu menuLineStyles;
00187     menuLineStyles.LoadMenu (IDR_LINE_STYLE_POPUP);
00188
00189     m_wndToolBar.ReplaceButton (ID_LINE_STYLE_MENU,
00190       CMFCToolBarMenuButton (
00191         (UINT)-1, // No default command
00192         menuLineStyles.GetSafeHmenu (),
00193         GetCmdMgr ()->GetCmdImage (ID_LINE_STYLE_MENU, FALSE),
00194         _T("&Line Style")));
00195   }
00196
00197   return 0;
00198 }
00199
00200 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00201 {
00202     CFrameWnd::OnShowPopupMenu (pMenuPopup);
00203
00204   if (pMenuPopup == NULL || pMenuPopup->GetMenuBar () == NULL)
00205   {
00206     return TRUE;
00207   }
00208
00209   //---------------------------------------------------------
00210   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00211   //---------------------------------------------------------
00212   if (pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00213   {
00214     if (CMFCToolBar::IsCustomizeMode ())
00215     {
00216       //----------------------------------------------------
00217       // Don't show toolbars list in the cuztomization mode!
00218       //----------------------------------------------------
00219       return FALSE;
00220     }
00221
00222     pMenuPopup->RemoveAllItems ();
00223
00224     CMenu menu;
00225     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00226
00227     CMenu* pPopup = menu.GetSubMenu(0);
00228     ASSERT(pPopup != NULL);
00229
00230     if (pPopup)
00231     {
00232       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00233     }
00234   }
00235
00236   //-------------------------------------------------------------------
00237   // Replace all "line style" menu items by CLineStyleMenuItem objects:
00238   //-------------------------------------------------------------------
00239   for (UINT uiLineStyleCmd = ID_LINE_STYLE_1;
00240     uiLineStyleCmd <= ID_LINE_STYLE_10;
00241     uiLineStyleCmd++)
00242   {
00243     int iIndex = pMenuPopup->GetMenuBar ()->CommandToIndex (uiLineStyleCmd);
00244     if (iIndex >= 0)
00245     {
00246       pMenuPopup->GetMenuBar ()->m_bDisableSideBarInXPMode = TRUE;
00247       //----------------------------
00248       // Obtain item text and style:
00249       //----------------------------
00250       CString strText = pMenuPopup->GetMenuBar ()->GetButtonText (iIndex);
00251       UINT uiStyle  = pMenuPopup->GetMenuBar ()->GetButtonStyle (iIndex);
00252
00253       //------------------
00254       // Calc. line width:
00255       //------------------
00256       int nWidth = uiLineStyleCmd - ID_LINE_STYLE_1 + 1;
00257
00258       //-------------------
00259       // Replace menu item:
00260       //-------------------
00261       pMenuPopup->GetMenuBar ()->ReplaceButton (uiLineStyleCmd,
00262         CLineStyleMenuItem (nWidth,
00263                   uiLineStyleCmd,
00264                   strText,
00265                   uiStyle & TBBS_CHECKED));
00266     }
00267   }
00268
00269   return TRUE;
00270 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutputList Member List

This is the complete list of members for COutputList, including all inherited members.
COutputList() | COutputList |
OnContextMenu(CWnd *pWnd, CPoint point) | COutputList | [protected]
OnEditClear() | COutputList | [protected]
OnEditCopy() | COutputList | [protected]
OnOutputGotoError() | COutputList | [protected]
OnViewOutput() | COutputList | [protected]
~COutputList() | COutputList | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collect.h Source File

  • advanced
  • collect

collect.h

Go to the documentation of this file.
00001 // collect.h : main header file for the COLLECT application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CCollectApp:
00020 // See collect.cpp for the implementation of this class
00021 //
00022
00023 class CCollectApp : public CWinApp
00024 {
00025 public:
00026   CCollectApp();
00027
00028 // Overrides
00029   // ClassWizard generate virtual function overrides
00030   //{{AFX_VIRTUAL(CCollectApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CCollectApp)
00038   afx_msg void OnAppAbout();
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMMXSurface24Intrinsic Member List

This is the complete list of members for CMMXSurface24Intrinsic, including all inherited members.
AdjustWidth(int *) | CSurface | [inline, protected, virtual]
BlitBits() | CSurface |
BlurBits() | CMMXSurface24Intrinsic | [virtual]
ClearBits() | CSurface |
Create(CWnd *pWnd, int nBitDepth) | CSurface |
CSurface() | CSurface | [inline]
Destroy() | CSurface |
GetBitDepth() const | CSurface | [inline]
GetByteDepth() const | CSurface | [inline]
GetImage() | CSurface | [inline]
GetPitch() const | CSurface | [inline]
GetPixelAddress(int x, int y) const | CSurface | [inline]
GetVisibleHeight() const | CSurface | [inline]
GetVisibleWidth() const | CSurface | [inline]
Import(const CImage &image) | CSurface |
IsNull() const | CSurface | [inline]
Line(const CPoint &p1, const CPoint &p2, COLORREF c) | CSurface |
m_delta | CMMXSurface24Intrinsic | [private]
m_dwpl | CMMXSurface24Intrinsic | [private]
m_kDeltaX | CSurface | [protected, static]
m_kDeltaY | CSurface | [protected, static]
m_width | CMMXSurface24Intrinsic | [private]
OnCreated() | CMMXSurface24Intrinsic | [protected, virtual]
PointColor(int x, int y, COLORREF c) | CSurface | [inline]
PointColor(int x, int y) const | CSurface | [inline]
RandomBits() | CSurface |
RandomLine(COLORREF c) | CSurface |
ShiftBits() | CSurface |
StripeBits() | CSurface |
~CSurface() | CSurface | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/stdafx.cpp Source File

  • advanced
  • mtrecalc

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  mtrecalc.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/autodriv/autoddlg.h Source File

  • ole
  • autoclik
  • autodriv

autoddlg.h

Go to the documentation of this file.
00001 // autoddlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CAutoDrivDlg dialog
00014
00015 class CAutoDrivDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CAutoDrivDlg(CWnd* pParent = NULL); // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CAutoDrivDlg)
00023   enum { IDD = IDD_AUTODRIV_DIALOG };
00024   CString m_szText;
00025   int     m_x;
00026   int     m_y;
00027   //}}AFX_DATA
00028
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CAutoDrivDlg)
00031   protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 protected:
00037   HICON m_hIcon;
00038   CAutoClik m_autoClikObject;
00039
00040   // Generated message map functions
00041   //{{AFX_MSG(CAutoDrivDlg)
00042   virtual BOOL OnInitDialog();
00043   afx_msg void OnPaint();
00044   afx_msg HCURSOR OnQueryDragIcon();
00045   afx_msg void OnClose();
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047   afx_msg void OnAnimateXY();
00048   afx_msg void OnAnimatePos();
00049   afx_msg void OnSetAll();
00050   afx_msg void OnSetPosition();
00051   afx_msg void OnSetText();
00052   afx_msg void OnSetX();
00053   afx_msg void OnSetY();
00054   afx_msg void OnRefresh();
00055   afx_msg void OnGetAll();
00056   afx_msg void OnGetPosition();
00057   //}}AFX_MSG
00058   DECLARE_MESSAGE_MAP()
00059 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMenuSubSetDoc Member List

This is the complete list of members for CMenuSubSetDoc, including all inherited members.
CMenuSubSetDoc() | CMenuSubSetDoc | [protected]
OnNewDocument() | CMenuSubSetDoc | [virtual]
Serialize(CArchive &ar) | CMenuSubSetDoc | [virtual]
~CMenuSubSetDoc() | CMenuSubSetDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyTreeCtrl Member List

This is the complete list of members for CMyTreeCtrl, including all inherited members.
CMyTreeCtrl() | CMyTreeCtrl |
IsChildNodeOf(HTREEITEM hitemChild, HTREEITEM hitemSuspectedParent) | CMyTreeCtrl |
m_bDragging | CMyTreeCtrl |
m_hitemDrag | CMyTreeCtrl |
m_hitemDrop | CMyTreeCtrl |
m_pimagelist | CMyTreeCtrl |
OnBeginDrag(LPNMHDR pnmhdr, LRESULT *pLResult) | CMyTreeCtrl | [protected]
OnButtonUp(void) | CMyTreeCtrl |
OnButtonUp(CPoint point) | CMyTreeCtrl | [protected]
OnDestroy() | CMyTreeCtrl | [protected]
OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pLResult) | CMyTreeCtrl | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CMyTreeCtrl | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CMyTreeCtrl | [protected]
OnRButtonUp(UINT nFlags, CPoint point) | CMyTreeCtrl | [protected]
SetNewStyle(long lStyleMask, BOOL bSetBits) | CMyTreeCtrl |
TransferItem(HTREEITEM hitem, HTREEITEM hNewParent) | CMyTreeCtrl |
~CMyTreeCtrl() | CMyTreeCtrl | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/speeddlg.h Source File

  • advanced
  • mtrecalc

speeddlg.h

Go to the documentation of this file.
00001 // speedlg.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CSpeedDlg dialog
00014
00015 class CSpeedDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CSpeedDlg(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CSpeedDlg)
00023   enum { IDD = IDD_SPEED };
00024   int     m_nRecalcSpeedSeconds;
00025   //}}AFX_DATA
00026
00027
00028 // Overrides
00029   // ClassWizard generate virtual function overrides
00030   //{{AFX_VIRTUAL(CSpeedDlg)
00031   protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 protected:
00037
00038   // Generated message map functions
00039   //{{AFX_MSG(CSpeedDlg)
00040     // NOTE: the ClassWizard will add member functions here
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/InsertTbl.cpp Source File

  • internet
  • HTMLEdit

InsertTbl.cpp

Go to the documentation of this file.
00001 // InsertTbl.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "HTMLEdit.h"
00014 #include "InsertTbl.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CInsertTableDlg dialog
00024
00025
00026 CInsertTableDlg::CInsertTableDlg(CWnd* pParent /*=NULL*/)
00027   : CDialog(CInsertTableDlg::IDD, pParent)
00028 {
00029   //{{AFX_DATA_INIT(CInsertTableDlg)
00030   m_Caption = _T("");
00031   m_CellAttribs = _T("");
00032   m_NumCols = 1;
00033   m_NumRows = 1;
00034   m_TableAttribs = _T("border=1 cellPadding=1 cellSpacing=1 width=75%");
00035   //}}AFX_DATA_INIT
00036 }
00037
00038
00039 void CInsertTableDlg::DoDataExchange(CDataExchange* pDX)
00040 {
00041   CDialog::DoDataExchange(pDX);
00042   //{{AFX_DATA_MAP(CInsertTableDlg)
00043   DDX_Text(pDX, IDC_EDIT_CAPTION, m_Caption);
00044   DDX_Text(pDX, IDC_EDIT_CELLATTRIBS, m_CellAttribs);
00045   DDX_Text(pDX, IDC_EDIT_NUMCOLS, m_NumCols);
00046   DDV_MinMaxUInt(pDX, m_NumCols, 0, 50000);
00047   DDX_Text(pDX, IDC_EDIT_NUMROWS, m_NumRows);
00048   DDV_MinMaxUInt(pDX, m_NumRows, 1, 50000);
00049   DDX_Text(pDX, IDC_EDIT_TABLEATTRIBS, m_TableAttribs);
00050   //}}AFX_DATA_MAP
00051 }
00052
00053
00054 BEGIN_MESSAGE_MAP(CInsertTableDlg, CDialog)
00055   //{{AFX_MSG_MAP(CInsertTableDlg)
00056   //}}AFX_MSG_MAP
00057 END_MESSAGE_MAP()
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CInsertTableDlg message handlers
00061
00062
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStateCollectionDoc Member List

This is the complete list of members for CStateCollectionDoc, including all inherited members.
CStateCollectionDoc() | CStateCollectionDoc | [protected]
OnNewDocument() | CStateCollectionDoc | [virtual]
Serialize(CArchive &ar) | CStateCollectionDoc | [virtual]
~CStateCollectionDoc() | CStateCollectionDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/recaldoc.h Source File

  • advanced
  • mtrecalc

recaldoc.h

Go to the documentation of this file.
00001 // recaldoc.h : interface of the CRecalcDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CRecalcDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   CRecalcDoc();
00016   DECLARE_DYNCREATE(CRecalcDoc)
00017
00018 // Attributes
00019 public:
00020   int m_nInt1;
00021   int m_nInt2;
00022   int m_nSum;
00023   BOOL m_bRecalcInProgress;
00024   BOOL m_bRecalcNeeded;
00025   int m_nRecalcSpeedSeconds;
00026
00027   UINT m_nCurrentDemoCommand;
00028   CWinThread* m_pRecalcWorkerThread;
00029   CRecalcThreadInfo m_recalcThreadInfo;
00030   HANDLE m_hEventStartRecalc;
00031   HANDLE m_hEventRecalcDone;
00032   HANDLE m_hEventKillRecalcThread;
00033   HANDLE m_hEventRecalcThreadKilled;
00034
00035 // Operations
00036 public:
00037   void UpdateInt1AndInt2(int n1, int n2, BOOL bForceRecalc);
00038   void RecalcDone();
00039
00040 // Overrides
00041   // ClassWizard generate virtual function overrides
00042   //{{AFX_VIRTUAL(CRecalcDoc)
00043   public:
00044   virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
00045   protected:
00046   virtual BOOL OnNewDocument();
00047   //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 public:
00051   void RecalcInSingleThread();
00052   void RecalcInSecondThread();
00053
00054   virtual ~CRecalcDoc();
00055   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00056 #ifdef _DEBUG
00057   virtual void AssertValid() const;
00058   virtual void Dump(CDumpContext& dc) const;
00059 #endif
00060
00061 protected:
00062
00063 // Generated message map functions
00064 protected:
00065   void OnDemoThread(UINT nCmdID);
00066   void OnUpdateDemoThread(CCmdUI* pCmdUI);
00067   //{{AFX_MSG(CRecalcDoc)
00068   afx_msg void OnRecalcSpeed();
00069   afx_msg void OnKillWorkerThread();
00070   afx_msg void OnUpdateKillWorkerThread(CCmdUI* pCmdUI);
00071   //}}AFX_MSG
00072   DECLARE_MESSAGE_MAP()
00073 };
00074
00075 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/editbar.cpp Source File

  • general
  • docktool

editbar.cpp

Go to the documentation of this file.
00001 // editbar.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "docktool.h"
00014 #include "editbar.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 #define COMBOBOX_INDEX 5
00022 #define COMBOBOX_WIDTH 150
00023 #define COMBOBOX_HEIGHT 150
00024 #define COMBOBOX_BITMAP 4
00025
00026 static UINT BASED_CODE EditButtons[] =
00027 {
00028   // same order as in the bitmap 'toolbar.bmp'
00029   ID_EDIT_BM_TOGGLE,
00030   ID_EDIT_BM_NEXT,
00031   ID_EDIT_BM_PREV,
00032   ID_EDIT_BM_CLEARALL,
00033     ID_SEPARATOR,
00034   ID_EDIT_FIND,
00035     ID_SEPARATOR,
00036   ID_EDIT_FINDINFILES,
00037     ID_SEPARATOR,
00038   ID_EDIT_INDENT,
00039   ID_EDIT_UNINDENT,
00040     ID_SEPARATOR,
00041   ID_WINDOW_NEW,
00042   ID_WINDOW_SPLIT,
00043   ID_WINDOW_CASCADE,
00044   ID_WINDOW_TILE_HORZ,
00045   ID_WINDOW_TILE_VERT,
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CEditBar
00050
00051 CEditBar::CEditBar()
00052 {
00053   m_bColor = TRUE;
00054 }
00055
00056 CEditBar::~CEditBar()
00057 {
00058 }
00059
00060 BOOL CEditBar::Init(CWnd* pParentWnd, BOOL bColor, BOOL bToolTips)
00061 {
00062   m_bColor = bColor;
00063   m_bVertical = FALSE;
00064
00065   // start out with no borders
00066   DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_SIZE_DYNAMIC;
00067   if (bToolTips)
00068     dwStyle |= (CBRS_TOOLTIPS | CBRS_FLYBY);
00069   if (!Create(pParentWnd, dwStyle, IDW_EDIT_BAR))
00070   {
00071     return FALSE;
00072   }
00073
00074   if (!SetColor(m_bColor))
00075     return FALSE;
00076
00077   if(!SetButtons(EditButtons, sizeof(EditButtons)/sizeof(UINT)))
00078     return FALSE;
00079
00080   CRect rect(-COMBOBOX_WIDTH, -COMBOBOX_HEIGHT, 0, 0);
00081   // The ID of the ComboBox is important for two reasons.  One, so you
00082   // can receive notifications from the control.  And also for ToolTips.
00083   // During HitTesting if the ToolBar sees that the mouse is one a child
00084   // control, the toolbar will lookup the controls ID and search for a
00085   // string in the string table with the same ID to use for ToolTips
00086   // and StatusBar info.
00087   if (!m_SearchBox.Create(WS_CHILD | CBS_DROPDOWN |
00088     CBS_AUTOHSCROLL | WS_VSCROLL | CBS_HASSTRINGS, rect, this,
00089     IDC_EDITBAR_SEARCHBOX))
00090   {
00091     return FALSE;
00092   }
00093
00094   HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
00095   if (hFont == NULL)
00096     hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
00097
00098   m_SearchBox.SendMessage(WM_SETFONT, (WPARAM)hFont);
00099
00100   if(!SetHorizontal())
00101     return FALSE;
00102
00103   return TRUE;
00104 }
00105
00106 BOOL CEditBar::SetHorizontal()
00107 {
00108   m_bVertical = FALSE;
00109
00110   SetBarStyle((GetBarStyle() & ~CBRS_ALIGN_ANY) | CBRS_ALIGN_TOP);
00111
00112   SetButtonInfo(COMBOBOX_INDEX, IDC_EDITBAR_SEARCHBOX, TBBS_SEPARATOR, COMBOBOX_WIDTH);
00113
00114   if (m_SearchBox.m_hWnd != NULL)
00115   {
00116     CRect rect;
00117     GetItemRect(COMBOBOX_INDEX, rect);
00118
00119     m_SearchBox.SetWindowPos(NULL, rect.left, rect.top, 0, 0, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOCOPYBITS);
00120     m_SearchBox.ShowWindow(SW_SHOW);
00121   }
00122
00123   return TRUE;
00124 }
00125
00126 BOOL CEditBar::SetVertical()
00127 {
00128   m_bVertical = TRUE;
00129
00130   SetButtonInfo(COMBOBOX_INDEX, ID_EDIT_FIND, TBBS_BUTTON, COMBOBOX_BITMAP);
00131
00132   if (m_SearchBox.m_hWnd != NULL)
00133     m_SearchBox.ShowWindow(SW_HIDE);
00134
00135   return TRUE;
00136 }
00137
00138 BOOL CEditBar::SetColor(BOOL bColor)
00139 {
00140   m_bColor=bColor;
00141
00142   if (m_bColor)
00143     return LoadBitmap(IDR_COLOR_EDITBAR);
00144   else
00145     return LoadBitmap(IDR_MONO_EDITBAR);
00146 }
00147
00148 CSize CEditBar::CalcDynamicLayout(int nLength, DWORD dwMode)
00149 {
00150   // if we're committing set the buttons appropriately
00151   if (dwMode & LM_COMMIT)
00152   {
00153     if (dwMode & LM_VERTDOCK)
00154     {
00155       if (!m_bVertical)
00156         SetVertical();
00157     }
00158     else
00159     {
00160       if (m_bVertical)
00161         SetHorizontal();
00162     }
00163
00164     return CToolBar::CalcDynamicLayout(nLength, dwMode);
00165   }
00166   else
00167   {
00168     BOOL bOld = m_bVertical;
00169     BOOL bSwitch = (dwMode & LM_HORZ) ? bOld : !bOld;
00170
00171     if (bSwitch)
00172     {
00173       if (bOld)
00174         SetHorizontal();
00175       else
00176         SetVertical();
00177     }
00178
00179
00180     CSize sizeResult = CToolBar::CalcDynamicLayout(nLength, dwMode);
00181
00182     if (bSwitch)
00183     {
00184       if (bOld)
00185         SetHorizontal();
00186       else
00187         SetVertical();
00188     }
00189
00190     return sizeResult;
00191   }
00192 }
00193
00194 //CSize CEditBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
00195 //{
00196 //      if (!bHorz && (m_dwStyle & CBRS_SIZE_DYNAMIC) && !(m_dwStyle & CBRS_FLOATING))
00197 //  {
00198 //      CSize size;
00199 //
00200 //      size = CControlBar::CalcFixedLayout(bStretch, bHorz);
00201 //
00202 //      CRect rect;
00203 //      rect.SetRectEmpty();
00204 //
00205 //      CalcInsideRect(rect, bHorz);
00206 //
00207 //      size.cx = m_sizeVert.cx + (m_rectInsideVert.Width() - rect.Width());
00208 //      size.cy = m_sizeVert.cy + (m_rectInsideVert.Height() - rect.Height());
00209 //      return size;
00210 //  }
00211 //  else
00212 //  {
00213 //      if (m_bVertical)
00214 //          SetHorizontal();
00215 //
00216 //      return CToolBar::CalcFixedLayout(bStretch, bHorz);
00217 //  }
00218 //}
00219
00220 BEGIN_MESSAGE_MAP(CEditBar, CToolBar)
00221   //{{AFX_MSG_MAP(CEditBar)
00222   //}}AFX_MSG_MAP
00223 END_MESSAGE_MAP()
00224
00225
00226 /////////////////////////////////////////////////////////////////////////////
00227 // CEditBar message handlers
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/acdualdriv/initiids.cpp Source File

  • ole
  • acdual
  • acdualdriv

initiids.cpp

Go to the documentation of this file.
00001 // initIIDs.c: defines IIDs for dual interfaces
00002 //   ** This must not be built with precompiled header **
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include <stdafx.h>
00014 #include <initguid.h>
00015 #include "..\ACDual.h"
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagCTLINITIEDIT Member List

This is the complete list of members for tagCTLINITIEDIT, including all inherited members.
cbSize | tagCTLINITIEDIT
dwApp | tagCTLINITIEDIT
dwReserved | tagCTLINITIEDIT
hgdiobj | tagCTLINITIEDIT
hpenGrid | tagCTLINITIEDIT
hpndt | tagCTLINITIEDIT
hwnd | tagCTLINITIEDIT
id | tagCTLINITIEDIT
ieb | tagCTLINITIEDIT
iedo | tagCTLINITIEDIT
iei | tagCTLINITIEDIT
ien | tagCTLINITIEDIT
ierec | tagCTLINITIEDIT
ies | tagCTLINITIEDIT
iesec | tagCTLINITIEDIT
pdts | tagCTLINITIEDIT
ptOrgGrid | tagCTLINITIEDIT
wHGrid | tagCTLINITIEDIT
wVGrid | tagCTLINITIEDIT
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMethodDlg Member List

This is the complete list of members for CMethodDlg, including all inherited members.
CMethodDlg(CWnd *pParent, IDispatch *pDispatch, CInterfaceInfo *pInterfaceInfo) | CMethodDlg |
DisplayExceptionInfo() | CMethodDlg | [protected]
DisplayParamValueInList(int iParam) | CMethodDlg | [protected]
DisplayParamValues(int iType) | CMethodDlg | [protected]
DoDataExchange(CDataExchange *pDX) | CMethodDlg | [protected, virtual]
GetParam(int iParam) | CMethodDlg | [protected]
IDD enum value | CMethodDlg |
m_apParams | CMethodDlg | [protected]
m_cboxMethodName | CMethodDlg |
m_cboxParamType | CMethodDlg |
m_cboxParamValue | CMethodDlg |
m_date | CMethodDlg |
m_editExceptionDesc | CMethodDlg |
m_editExceptionSource | CMethodDlg |
m_editParamValue | CMethodDlg |
m_editReturnValue | CMethodDlg |
m_excepInfo | CMethodDlg | [protected]
m_iCurrentParam | CMethodDlg | [protected]
m_listParams | CMethodDlg |
m_pDispatch | CMethodDlg | [protected]
m_pInterfaceInfo | CMethodDlg | [protected]
m_piParamTypes | CMethodDlg | [protected]
m_pMethodInfo | CMethodDlg | [protected]
m_pParamInfo | CMethodDlg | [protected]
m_pvarCurrentParam | CMethodDlg | [protected]
m_pvarParams | CMethodDlg | [protected]
m_staticParameterValue | CMethodDlg |
m_tException | CMethodDlg | [protected]
m_varResult | CMethodDlg | [protected]
OnChooseColor() | CMethodDlg | [protected]
OnChooseFont() | CMethodDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CMethodDlg | [protected]
OnExceptionHelp() | CMethodDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CMethodDlg | [protected]
OnInitDialog() | CMethodDlg | [protected, virtual]
OnInvoke() | CMethodDlg | [protected]
OnMethodNameSelChange() | CMethodDlg | [protected]
OnParamsItemChanged(NMHDR *pNMHDR, LRESULT *pResult) | CMethodDlg | [protected]
OnParamTypeSelChange() | CMethodDlg | [protected]
OnParamValueChange() | CMethodDlg | [protected]
OnParamValueSetFocus() | CMethodDlg | [protected]
OnSetValue() | CMethodDlg | [protected]
~CMethodDlg() | CMethodDlg |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListView.cpp Source File

  • general
  • DBVList

DBVListView.cpp

Go to the documentation of this file.
00001 // DBVListView.cpp : implementation of the CDBVListView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "DBVList.h"
00014
00015 #include "DBVListSet.h"
00016 #include "DBVListDoc.h"
00017 #include "DBVListView.h"
00018 #include "MainFrm.h"
00019 #include "EmpView.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CDBVListView
00029
00030 IMPLEMENT_DYNCREATE(CDBVListView, CFormView)
00031
00032 BEGIN_MESSAGE_MAP(CDBVListView, CFormView)
00033   //{{AFX_MSG_MAP(CDBVListView)
00034   ON_BN_CLICKED(IDC_FETCH, OnFetch)
00035   //}}AFX_MSG_MAP
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CDBVListView construction/destruction
00040
00041 CDBVListView::CDBVListView()
00042   : CFormView(CDBVListView::IDD)
00043 {
00044   //{{AFX_DATA_INIT(CDBVListView)
00045   m_pSet = NULL;
00046   m_strDiv = _T("");
00047   //}}AFX_DATA_INIT
00048 }
00049
00050 CDBVListView::~CDBVListView()
00051 {
00052 }
00053
00054 void CDBVListView::DoDataExchange(CDataExchange* pDX)
00055 {
00056   CFormView::DoDataExchange(pDX);
00057   //{{AFX_DATA_MAP(CDBVListView)
00058   DDX_CBString(pDX, IDC_DIV, m_strDiv);
00059   //}}AFX_DATA_MAP
00060 }
00061
00062 BOOL CDBVListView::PreCreateWindow(CREATESTRUCT& cs)
00063 {
00064   return CFormView::PreCreateWindow(cs);
00065 }
00066
00067 void CDBVListView::OnInitialUpdate()
00068 {
00069   m_pSet = &GetDocument()->m_dBVListSet;
00070   CFormView::OnInitialUpdate();
00071 }
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CDBVListView diagnostics
00075
00076 #ifdef _DEBUG
00077 void CDBVListView::AssertValid() const
00078 {
00079   CFormView::AssertValid();
00080 }
00081
00082 void CDBVListView::Dump(CDumpContext& dc) const
00083 {
00084   CFormView::Dump(dc);
00085 }
00086
00087 CDBVListDoc* CDBVListView::GetDocument() // non-debug version is inline
00088 {
00089   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDBVListDoc)));
00090   return (CDBVListDoc*)m_pDocument;
00091 }
00092 #endif //_DEBUG
00093
00094 /////////////////////////////////////////////////////////////////////////////
00095 // CDBVListView database support
00096 CDaoRecordset* CDBVListView::OnGetRecordset()
00097 {
00098   return m_pSet;
00099 }
00100
00101
00102 /////////////////////////////////////////////////////////////////////////////
00103 // CDBVListView message handlers
00104
00105 void CDBVListView::OnFetch()
00106 {
00107   CMainFrame* pFrame=static_cast<CMainFrame*>(AfxGetMainWnd());
00108   CEmpView* pView=static_cast<CEmpView*>(pFrame->m_wndSplitter.GetPane(1,0));
00109
00110   // set the filter for viewing the database to the currently selected division
00111   UpdateData(TRUE);
00112   pView->UpdateFilter(m_strDiv);
00113 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtmdi/mainfrm.h Source File

  • advanced
  • mtmdi

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CMDIFrameWnd
00013 {
00014   DECLARE_DYNAMIC(CMainFrame)
00015 public:
00016   CMainFrame();
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CMainFrame)
00027   public:
00028   virtual BOOL DestroyWindow();
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034
00035 // Generated message map functions
00036 protected:
00037   //{{AFX_MSG(CMainFrame)
00038   afx_msg void OnBounce();
00039   afx_msg void OnHello();
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oclient/stdafx.h Source File

  • ole
  • oclient

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013 //
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>
00018 #include <afxext.h>
00019 #include <afxole.h>
00020 #include <afxodlgs.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/MainFrm.h Source File

  • vc2008fp
  • MSOffice2007Demo

MainFrm.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include "TaskPane.h"
00015 #include "RibbonListButton.h"
00016
00017 class CMainFrame : public CFrameWndEx
00018 {
00019 protected: // create from serialization only
00020   CMainFrame();
00021   DECLARE_DYNCREATE(CMainFrame)
00022
00023 // Attributes
00024 public:
00025   CMFCRibbonBar* GetRibbonBar()
00026   {
00027     return &m_wndRibbonBar;
00028   }
00029
00030 // Operations
00031 public:
00032   CMFCToolBarImages* GetTooltipImage(UINT uiID);
00033
00034   void SetRibbonContextCategory(UINT uiCategoryID);
00035   void ActivateRibbonContextCategory(UINT uiCategoryID);
00036
00037   void OnChangeLayout(CWnd* pWnd = NULL, BOOL bNoLoopOverPopup = FALSE);
00038
00039 protected:
00040   void AddMainCategory();
00041
00042   void AddTab_Home();
00043   void AddTab_Insert();
00044   void AddTab_PageLayout();
00045   void AddTab_References();
00046   void AddTab_Mailings();
00047   void AddTab_Review();
00048   void AddTab_View();
00049   void AddTab_Developer();
00050
00051   void AddContextTab_Picture();
00052   void AddContextTab_Chart();
00053   void AddContextTab_Table();
00054
00055   CMFCRibbonPanel* AddPanelArrange(CMFCRibbonCategory* pCategory, UINT imageP, UINT imageS, UINT imageL);
00056
00057   void InitBulletPalette(CMFCRibbonGallery* pPalette);
00058   void InitNumberingPalette(CMFCRibbonGallery* pPalette);
00059   void InitMultilevelPalette(CMFCRibbonGallery* pPalette);
00060   void InitPositionPalette(CMFCRibbonGallery* pPalette);
00061
00062   void SetKeys();
00063
00064 // Overrides
00065 public:
00066   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00067
00068   virtual void AdjustClientArea();
00069   virtual BOOL OnShowPopupMenu(CMFCPopupMenu* pMenuPopup);
00070
00071 // Implementation
00072 public:
00073   virtual ~CMainFrame();
00074 #ifdef _DEBUG
00075   virtual void AssertValid() const;
00076   virtual void Dump(CDumpContext& dc) const;
00077 #endif
00078
00079 protected:  // control bar embedded members
00080   CMFCRibbonBar m_wndRibbonBar; // Ribbon control bar
00081   CMFCRibbonApplicationButton m_MainButton; // Ribbon main button
00082   CTaskPane m_wndTaskPane;
00083   CMFCRibbonStatusBar m_wndStatusBar;
00084   CMFCCaptionBar m_wndMessageBar;
00085
00086   CMFCToolBarImages m_PanelImages; // Ribbon panel images (appear when pane is collapsed)
00087
00088   CMap<UINT,UINT,CMFCToolBarImages*,CMFCToolBarImages*> m_TooltipImages;
00089
00090   void CreateDocumentColors();
00091   void CreateStyleList();
00092   void CreateThemeList();
00093   void CreateFontsList();
00094
00095   void ShowProgress(BOOL bShow = TRUE);
00096
00097 protected:
00098   //{{AFX_MSG(CMainFrame)
00099   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00100   afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
00101   afx_msg void OnPaint();
00102   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00103   afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
00104   afx_msg void OnSize(UINT nType, int cx, int cy);
00105   afx_msg void OnTimer(UINT_PTR nIDEvent);
00106   afx_msg void OnWriteClipboard();
00107   afx_msg void OnUpdateWriteClipboard(CCmdUI* pCmdUI);
00108   afx_msg void OnViewRtl();
00109   afx_msg void OnUpdateViewRtl(CCmdUI* pCmdUI);
00110   afx_msg void OnRefresh();
00111   afx_msg void OnSpell();
00112   afx_msg void OnUpdateRefresh(CCmdUI* pCmdUI);
00113   afx_msg void OnAppLook(UINT id);
00114   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00115   afx_msg void OnToolsOptions();
00116   afx_msg LRESULT OnRibbonCustomize(WPARAM wp, LPARAM lp);
00117   afx_msg void OnLink();
00118   afx_msg LRESULT OnHighlightRibbonListItem(WPARAM wp, LPARAM lp);
00119   afx_msg void OnViewMessageBar();
00120   afx_msg void OnUpdateViewMessageBar(CCmdUI* pCmdUI);
00121   afx_msg LRESULT OnShowRibbonItemMenu(WPARAM wp, LPARAM lp);
00122   afx_msg void OnDummy(UINT id);
00123   afx_msg void OnZoomSlider();
00124   afx_msg void OnZoom();
00125   afx_msg void OnFilePrint();
00126   afx_msg void OnFilePrintPreview();
00127   afx_msg void OnUpdateFilePrintPreview(CCmdUI* pCmdUI);
00128   //}}AFX_MSG
00129
00130   DECLARE_MESSAGE_MAP()
00131
00132   BOOL CreateRibbonBar();
00133   BOOL CreateStatusBar();
00134   BOOL CreateMessageBar();
00135
00136   void ShowOptions(int nPage);
00137
00138   CMFCControlRenderer m_Pat[4];
00139
00140   CRect m_rectFill;
00141   CBitmap m_MemBitmap;
00142   CRect m_rectSizing;
00143
00144   int m_nProgressValue;
00145   BOOL m_bInfiniteProgressMode;
00146
00147   // Document colors for demo:
00148   CList<COLORREF,COLORREF> m_lstMainColors;
00149   CList<COLORREF,COLORREF> m_lstAdditionalColors;
00150   CList<COLORREF,COLORREF> m_lstStandardColors;
00151
00152   // Theme names for demo:
00153   CStringArray m_arStyles;
00154   CStringArray m_arThemes;
00155   CStringArray m_arColorThemes;
00156   CStringArray m_arStyleSets;
00157   CRibbonListFontButton::XItems m_arFonts;
00158 };
00159
00160
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollection.h Source File

  • vc2008fp
  • StateCollection

StateCollection.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CStateCollectionApp:
00021 // See StateCollection.cpp for the implementation of this class
00022 //
00023
00024 class CStateCollectionApp : public CWinAppEx
00025 {
00026 public:
00027   CStateCollectionApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern CStateCollectionApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCView.H Source File

  • ole
  • TstCon

TCView.H

Go to the documentation of this file.
00001 // CTestContainer98View.h : interface of the CTestContainer98View class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #if !defined(AFX_CTESTCONTAINER98VIEW_H__1981850A_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
00013 #define AFX_CTESTCONTAINER98VIEW_H__1981850A_B837_11D0_8DF1_00C04FB68D60__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 class CTestContainer98Item;
00020
00021 const DWORD HITTYPE_NONE = 0;
00022 const DWORD HITTYPE_OBJECT = 1;
00023 const DWORD HITTYPE_BORDER = 2;
00024
00025 class CTestContainer98View : public CView
00026 {
00027    DECLARE_DYNCREATE(CTestContainer98View)
00028
00029 protected: // create from serialization only
00030    CTestContainer98View();
00031
00032 // Attributes
00033 public:
00034    CTestContainer98Doc* GetDocument();
00035    CTestContainer98Item* m_pSelection;
00036
00037 // Operations
00038 public:
00039    void ClearSelection();
00040
00041 // Overrides
00042    // ClassWizard generated virtual function overrides
00043    //{{AFX_VIRTUAL(CTestContainer98View)
00044   public:
00045    virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00046    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00047    virtual BOOL PreTranslateMessage(MSG* pMsg);
00048    virtual BOOL OnDrop(COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
00049   virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
00050   virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
00051   virtual void OnDragLeave();
00052   protected:
00053    virtual void OnInitialUpdate(); // called first time after construct
00054    virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
00055    virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00056   //}}AFX_VIRTUAL
00057
00058 // Implementation
00059 public:
00060    void OnFocus( CTestContainer98Item* pItem, BOOL tGotFocus );
00061    BOOL HandlePointerInactiveDragOver( CPoint point );
00062    BOOL HandlePointerInactiveMove( CPoint point, DWORD dwKeyState );
00063    BOOL HandlePointerInactiveSetCursor( DWORD dwMouseMessage );
00064    BOOL HandleWindowlessDragEnter( COleDataObject* pDataObject,
00065     DWORD dwKeyState, CPoint point, DWORD* pdwDropEffect );
00066    void HandleWindowlessDragLeave();
00067    BOOL HandleWindowlessDragOver( COleDataObject* pDataObject,
00068     DWORD dwKeyState, CPoint point, DWORD* pdwDropEffect );
00069    BOOL HandleWindowlessDrop( COleDataObject* pDataObject, DWORD dwKeyState,
00070     CPoint point, DWORD* pdwDropEffect );
00071    BOOL HandleWindowlessKeyboardMessage();
00072    BOOL HandleWindowlessMouseMessage( CPoint point );
00073    HRESULT OnWindowlessDefWindowMessage( UINT nMessage, WPARAM wParam,
00074     LPARAM lParam, LRESULT* plResult );
00075    HRESULT OnWindowlessReleaseCapture( CTestContainer98Item* pItem );
00076    HRESULT OnWindowlessReleaseFocus();
00077    HRESULT OnWindowlessSetCapture( CTestContainer98Item* pItem );
00078    HRESULT OnWindowlessSetFocus( CTestContainer98Item* pItem );
00079    CTestContainer98Item* GetItemWithCapture() const;
00080    CTestContainer98Item* GetItemWithFocus() const;
00081    void SetupSelectionTracker( CRectTracker* pTracker );
00082    void SetupTracker( CTestContainer98Item* pItem, CRectTracker* pTracker );
00083    void SetMultiSelect( CTestContainer98Item* pItem, BOOL tSelect );
00084    void SetSelection( CTestContainer98Item* pItem );
00085    void ToggleMultiSelect( CTestContainer98Item* pItem );
00086    CTestContainer98Item* HitTestItems( CPoint point, DWORD* pdwHitType );
00087    virtual ~CTestContainer98View();
00088 #ifdef _DEBUG
00089    virtual void AssertValid() const;
00090    virtual void Dump(CDumpContext& dc) const;
00091 #endif
00092
00093 protected:
00094    // m_pSelection holds the selection to the current CTestContainer98Item.
00095    // For many applications, such a member variable isn't adequate to
00096    //  represent a selection, such as a multiple selection or a selection
00097    //  of objects that are not CTestContainer98Item objects.  This selection
00098    //  mechanism is provided just to help you get started.
00099
00100    COleDropTarget m_dropTarget;
00101    CTestContainer98Item* m_pItemWithCapture;
00102    CTestContainer98Item* m_pItemWithFocus;
00103    CPoint m_ptLastMousePosition;
00104    CTestContainer98Item* m_pItemToDeactivateOnLeave;
00105    CTestContainer98Item* m_pInactiveDropTarget;
00106    CTestContainer98Item* m_pWindowlessDropTarget;
00107    DWORD m_dwLastDropKeyState;
00108    CTypedPtrList< CObList, CTestContainer98Item* > m_lpSelectedItems;
00109
00110    static CLIPFORMAT s_cfObjectDescriptor;
00111
00112 // Generated message map functions
00113 protected:
00114    //{{AFX_MSG(CTestContainer98View)
00115    afx_msg void OnDestroy();
00116    afx_msg void OnSetFocus(CWnd* pOldWnd);
00117    afx_msg void OnSize(UINT nType, int cx, int cy);
00118    afx_msg void OnInsertObject();
00119    afx_msg void OnCancelEditCntr();
00120    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00121    afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00122    afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00123    afx_msg void OnEditClear();
00124    afx_msg void OnUpdateEditClear(CCmdUI* pCmdUI);
00125    afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00126    afx_msg void OnOptionsDesignMode();
00127    afx_msg void OnUpdateOptionsDesignMode(CCmdUI* pCmdUI);
00128   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00129   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00130   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00131   afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
00132   afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00133   afx_msg void OnCaptureChanged(CWnd *pWnd);
00134   afx_msg void OnKillFocus(CWnd* pNewWnd);
00135   afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00136   afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
00137   afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
00138   afx_msg void OnCancelMode();
00139   afx_msg void OnControlSaveToStream();
00140   afx_msg void OnEditInsertFromStream();
00141   afx_msg void OnControlSaveToPropertyBag();
00142   afx_msg void OnUpdateControlSaveToPropertyBag(CCmdUI* pCmdUI);
00143   afx_msg void OnUpdateControlSaveToStream(CCmdUI* pCmdUI);
00144   afx_msg void OnControlInvokeMethods();
00145   afx_msg void OnUpdateControlInvokeMethods(CCmdUI* pCmdUI);
00146   afx_msg void OnControlLogging();
00147   afx_msg void OnUpdateControlLogging(CCmdUI* pCmdUI);
00148   afx_msg void OnControlActivate();
00149   afx_msg void OnControlDeactivate();
00150   afx_msg void OnControlUIActivate();
00151   afx_msg void OnControlUIDeactivate();
00152   afx_msg void OnUpdateControlUIDeactivate(CCmdUI* pCmdUI);
00153   afx_msg void OnUpdateControlUIActivate(CCmdUI* pCmdUI);
00154   afx_msg void OnUpdateControlActivate(CCmdUI* pCmdUI);
00155   afx_msg void OnUpdateControlDeactivate(CCmdUI* pCmdUI);
00156   afx_msg void OnEditBringToFront();
00157   afx_msg void OnUpdateEditBringToFront(CCmdUI* pCmdUI);
00158   afx_msg void OnEditSendToBack();
00159   afx_msg void OnUpdateEditSendToBack(CCmdUI* pCmdUI);
00160   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00161   afx_msg void OnEditProperties();
00162   afx_msg void OnUpdateEditProperties(CCmdUI* pCmdUI);
00163   afx_msg void OnEditSelectAll();
00164   afx_msg void OnEditCopy();
00165   afx_msg void OnEditPaste();
00166   afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
00167   afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
00168   afx_msg void OnEditCut();
00169   afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI);
00170   afx_msg void OnControlSaveToStorage();
00171   afx_msg void OnUpdateControlSaveToStorage(CCmdUI* pCmdUI);
00172   afx_msg void OnEditInsertControlFromStorage();
00173   afx_msg void OnUpdateEditSelectAll(CCmdUI* pCmdUI);
00174   afx_msg void OnControlDrawMetaFile();
00175   afx_msg void OnUpdateControlDrawMetaFile(CCmdUI* pCmdUI);
00176   //}}AFX_MSG
00177    DECLARE_MESSAGE_MAP()
00178 };
00179
00180 #ifndef _DEBUG  // debug version in CTestContainer98View.cpp
00181 inline CTestContainer98Doc* CTestContainer98View::GetDocument()
00182    { return (CTestContainer98Doc*)m_pDocument; }
00183 #endif
00184
00185 /////////////////////////////////////////////////////////////////////////////
00186
00187 //{{AFX_INSERT_LOCATION}}
00188 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00189
00190 #endif // !defined(AFX_CTESTCONTAINER98VIEW_H__1981850A_B837_11D0_8DF1_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBoundedNumberPairProp Member List

This is the complete list of members for CBoundedNumberPairProp, including all inherited members.
CBoundedNumberPairProp(const CString &strGroupName, int nMinValue1, int nMaxValue1, int nMinValue2, int nMaxValue2, DWORD_PTR dwData=0, BOOL bIsValueList=FALSE) | CBoundedNumberPairProp |
m_nMaxValue1 | CBoundedNumberPairProp | [private]
m_nMaxValue2 | CBoundedNumberPairProp | [private]
m_nMinValue1 | CBoundedNumberPairProp | [private]
m_nMinValue2 | CBoundedNumberPairProp | [private]
OnUpdateValue() | CBoundedNumberPairProp | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CEditBar Member List

This is the complete list of members for CEditBar, including all inherited members.
CalcDynamicLayout(int nLength, DWORD dwMode) | CEditBar | [virtual]
CEditBar() | CEditBar |
Init(CWnd *pParentWnd, BOOL bColor, BOOL bToolTips) | CEditBar |
m_bColor | CEditBar |
m_bVertical | CEditBar |
m_SearchBox | CEditBar |
SetColor(BOOL bColor) | CEditBar |
SetHorizontal() | CEditBar |
SetVertical() | CEditBar |
~CEditBar() | CEditBar | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/stdafx.h Source File

  • general
  • SimpleImage

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010
00011 // stdafx.h : include file for standard system include files,
00012 // or project specific include files that are used frequently,
00013 // but are changed infrequently
00014
00015 #pragma once
00016
00017 #ifndef VC_EXTRALEAN
00018 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00019 #endif
00020
00021 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00022
00023 #include <winerror.h>
00024 #include <afxwin.h>         // MFC core and standard components
00025 #include <afxext.h>         // MFC extensions
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00029 #ifndef _AFX_NO_AFXCMN_SUPPORT
00030 #include <afxcmn.h>     // MFC support for Windows Common Controls
00031 #endif // _AFX_NO_AFXCMN_SUPPORT
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMoneyDemoView.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMoneyDemoView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MSMoneyDemoView.h : interface of the CMSMoneyDemoView class
00011 //
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #pragma once
00015
00016 class CMSMoneyDemoView : public CView
00017 {
00018 protected: // create from serialization only
00019   CMSMoneyDemoView();
00020   DECLARE_DYNCREATE(CMSMoneyDemoView)
00021
00022 // Attributes
00023 public:
00024   CMSMoneyDemoDoc* GetDocument();
00025
00026 protected:
00027   CBitmap m_Image;
00028   CSize m_sizeImage;
00029
00030 // Operations
00031 public:
00032
00033 // Overrides
00034 public:
00035   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00036   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00037 protected:
00038   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00039   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00040   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00041
00042 // Implementation
00043 public:
00044   virtual ~CMSMoneyDemoView();
00045 #ifdef _DEBUG
00046   virtual void AssertValid() const;
00047   virtual void Dump(CDumpContext& dc) const;
00048 #endif
00049
00050 protected:
00051   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00052   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00053
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 #ifndef _DEBUG  // debug version in MSMoneyDemoView.cpp
00058 inline CMSMoneyDemoDoc* CMSMoneyDemoView::GetDocument()
00059 {
00060   return (CMSMoneyDemoDoc*)m_pDocument;
00061 }
00062 #endif
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyPropertyPage1 Member List

This is the complete list of members for CMyPropertyPage1, including all inherited members.
CMyPropertyPage1() | CMyPropertyPage1 |
DoDataExchange(CDataExchange *pDX) | CMyPropertyPage1 | [protected, virtual]
IDD enum value | CMyPropertyPage1 |
~CMyPropertyPage1() | CMyPropertyPage1 |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.idl Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawClientHandlers.idl

Go to the documentation of this file.
00001 // DrawClientHandlers.idl : IDL source for DrawClientHandlers
00002 //
00003
00004 // This file will be processed by the MIDL tool to
00005 // produce the type library (DrawClientHandlers.tlb) and marshalling code.
00006
00007 import "oaidl.idl";
00008 import "ocidl.idl";
00009
00010 [
00011   object,
00012   uuid(7B4AF31B-0224-4785-9E23-5791AA8C0945),
00013   helpstring("IDrawCliLiveIconsHandler Interface"),
00014   pointer_default(unique)
00015 ]
00016 interface IDrawCliLiveIconsHandler : IUnknown{
00017 };
00018 [
00019   object,
00020   uuid(C9246001-38E2-4F29-8C24-6A691F11886C),
00021   helpstring("IDrawCliSearchHandler Interface"),
00022   pointer_default(unique)
00023 ]
00024 interface IDrawCliSearchHandler : IUnknown{
00025 };
00026 [
00027   uuid(D69D49B1-7CA7-42A7-B85D-617CAE52F42B),
00028   version(1.0),
00029   helpstring("DrawClientHandlers 1.0 Type Library")
00030 ]
00031 library DrawClientHandlersLib
00032 {
00033   importlib("stdole2.tlb");
00034   [
00035     uuid(094F19D5-C63E-404B-939F-24913DCCF64E),
00036     helpstring("DrawCliLiveIconsHandler Class")
00037   ]
00038   coclass DrawCliLiveIconsHandler
00039   {
00040     [default] interface IThumbnailProvider;
00041   };
00042   [
00043     uuid(883FE140-50F4-497E-A7B6-6C7FF0885D6F),
00044     helpstring("DrawCliSearchHandler Class")
00045   ]
00046   coclass DrawCliSearchHandler
00047   {
00048     [default] interface IFilter;
00049     interface IPersistFile;
00050     interface IPersistStream;
00051   };
00052 };
00053 import "thumbcache.idl";
00054 import "filter.idl";
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyPropertyPage2 Member List

This is the complete list of members for CMyPropertyPage2, including all inherited members.
CMyPropertyPage2() | CMyPropertyPage2 |
DoDataExchange(CDataExchange *pDX) | CMyPropertyPage2 | [protected, virtual]
IDD enum value | CMyPropertyPage2 |
~CMyPropertyPage2() | CMyPropertyPage2 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/viewex/resource.h Source File

  • general
  • viewex

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by VIEWEX.RC
00004 //
00005 #define IDR_MAINFRAME                   128
00006 #define IDR_TEXTTYPE                    129
00007 #define IDR_COLORTYPE                   4
00008 #define IDR_INPUTTYPE                   5
00009 #define IDR_SPLIT2TYPE                  6
00010 #define IDR_SPLIT3TYPE                  7
00011 #define IDC_EDIT1                       100
00012 #define IDC_RADIO1                      201
00013 #define IDC_RADIO2                      202
00014 #define IDC_RADIO3                      203
00015 #define IDM_CHANGEDATA                  1001
00016 #define IDC_GROUPBOX1                   1005
00017 #define IDD_ABOUTBOX                    2000
00018 #define IDD_INPUTFORM                   2001
00019 #define IDD_CHANGEDATA                  2002
00020
00021 // Next default values for new objects
00022 //
00023 #ifdef APSTUDIO_INVOKED
00024 #ifndef APSTUDIO_READONLY_SYMBOLS
00025
00026 #define _APS_NEXT_RESOURCE_VALUE        102
00027 #define _APS_NEXT_COMMAND_VALUE         32769
00028 #define _APS_NEXT_CONTROL_VALUE         1023
00029 #define _APS_NEXT_SYMED_VALUE           102
00030 #endif
00031 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/stdafx.h Source File

  • internet
  • Scheduler

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #pragma once
00013
00014 #pragma warning( disable : 4244 )
00015
00016 #ifndef VC_EXTRALEAN
00017 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00018 #endif
00019
00020 #include <afxwin.h>         // MFC core and standard components
00021 #include <afxext.h>         // MFC extensions
00022 #include <afxdisp.h>        // MFC Automation classes
00023
00024 // Include database headers.  For a DLL or app which just includes database
00025 // headers (no database view), conditionally include DAO and ODBC.
00026 // If an actual view is used, always & only include the corresponding header.
00027 // First, actual view is used:
00028
00029
00030 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00031 #ifndef _AFX_NO_AFXCMN_SUPPORT
00032 #include <afxcmn.h>     // MFC support for Windows Common Controls
00033 #endif // _AFX_NO_AFXCMN_SUPPORT
00034
00035 #include <afxdhtml.h>        // HTML Dialogs
00036 #include <afx.h>
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/DrawClientHandlers.cpp Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

DrawClientHandlers.cpp

Go to the documentation of this file.
00001 // DrawClientHandlers.cpp : Implementation of DLL Exports.
00002
00003
00004 #include "stdafx.h"
00005 #include "resource.h"
00006 #include "DrawClientHandlers_i.h"
00007 #include "dllmain.h"
00008
00009 // Used to determine whether the DLL can be unloaded by OLE
00010 STDAPI DllCanUnloadNow(void)
00011 {
00012     AFX_MANAGE_STATE(AfxGetStaticModuleState());
00013     return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE;
00014 }
00015
00016
00017 // Returns a class factory to create an object of the requested type
00018 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
00019 {
00020     return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
00021 }
00022
00023
00024 // DllRegisterServer - Adds entries to the system registry
00025 STDAPI DllRegisterServer(void)
00026 {
00027     // registers object, typelib and all interfaces in typelib
00028     HRESULT hr = _AtlModule.DllRegisterServer();
00029   return hr;
00030 }
00031
00032
00033 // DllUnregisterServer - Removes entries from the system registry
00034 STDAPI DllUnregisterServer(void)
00035 {
00036   HRESULT hr = _AtlModule.DllUnregisterServer();
00037   return hr;
00038 }
00039
00040 // DllInstall - Adds/Removes entries to the system registry per user
00041 //              per machine.
00042 STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine)
00043 {
00044     HRESULT hr = E_FAIL;
00045     static const wchar_t szUserSwitch[] = _T("user");
00046
00047     if (pszCmdLine != NULL)
00048     {
00049       if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)
00050       {
00051         AtlSetPerUserRegistration(true);
00052       }
00053     }
00054
00055     if (bInstall)
00056     {
00057       hr = DllRegisterServer();
00058       if (FAILED(hr))
00059       {
00060         DllUnregisterServer();
00061       }
00062     }
00063     else
00064     {
00065       hr = DllUnregisterServer();
00066     }
00067
00068     return hr;
00069 }
00070
00071
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatba.cpp Source File

  • vc2008fp
  • WordPad

formatba.cpp

Go to the documentation of this file.
00001 //
00002 // formatba.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015
00016 #include "wordpad.h"
00017 #include "wordpdoc.h"
00018 #include "wordpvw.h"
00019 #include "formatba.h"
00020 #include "strings.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 static CSize GetBaseUnits(CFont* pFont)
00028 {
00029   ASSERT(pFont != NULL);
00030   if (pFont != NULL)
00031   {
00032     ASSERT(pFont->GetSafeHandle() != NULL);
00033     pFont = theApp.m_dcScreen.SelectObject(pFont);
00034     TEXTMETRIC tm;
00035     VERIFY(theApp.m_dcScreen.GetTextMetrics(&tm));
00036
00037     theApp.m_dcScreen.SelectObject(pFont);
00038     return CSize(tm.tmAveCharWidth, tm.tmHeight);
00039   }
00040
00041   return CSize(0,0);
00042 }
00043
00044 IMPLEMENT_SERIAL(CFormatBar, CMFCToolBar, 1)
00045
00046 CFormatBar::CFormatBar()
00047 {
00048   CFont fnt;
00049   fnt.Attach(GetStockObject(theApp.m_nDefFont));
00050   m_szBaseUnits = GetBaseUnits(&fnt);
00051   CMFCToolBarFontComboBox::m_nFontHeight = m_szBaseUnits.cy;
00052   m_nNumColours = 0;
00053 }
00054
00055 BEGIN_MESSAGE_MAP(CFormatBar, CMFCToolBar)
00056   //{{AFX_MSG_MAP(CFormatBar)
00057   //}}AFX_MSG_MAP
00058   // Global help commands
00059 END_MESSAGE_MAP()
00060
00061 void CFormatBar::OnReset ()
00062 {
00063   // Insert font name combo:
00064   CMFCToolBarFontComboBox* pFontButton = CreateFontComboButton ();
00065   ASSERT_VALID (pFontButton);
00066
00067   int iIndex = CommandToIndex (IDC_FONTNAME);
00068   RemoveButton (iIndex);
00069
00070   if (iIndex > GetCount ())
00071   {
00072     iIndex = GetCount ();
00073   }
00074
00075   InsertButton (*pFontButton, iIndex);
00076   delete pFontButton;
00077
00078   // Insert font size combo:
00079   CMFCToolBarFontSizeComboBox comboButtonFontSize (IDC_FONTSIZE,
00080     GetCmdMgr ()->GetCmdImage  (IDC_FONTSIZE, FALSE),
00081     WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWN,
00082     10*m_szBaseUnits.cx + 10);
00083
00084   iIndex = CommandToIndex (IDC_FONTSIZE);
00085   RemoveButton (iIndex);
00086
00087   if (iIndex > GetCount ())
00088   {
00089     iIndex = GetCount ();
00090   }
00091
00092   InsertButton (comboButtonFontSize, iIndex);
00093
00094   // Insert the color menu button:
00095   CMFCColorMenuButton* pColorButton = CreateColorButton ();
00096   ReplaceButton (ID_CHAR_COLOR, *pColorButton);
00097   delete pColorButton;
00098
00099   // Insert border type button:
00100   CMFCToolBarMenuButton* pBorderTypeButton = CreateBorderTypeButton ();
00101   ReplaceButton (ID_BORDER_1, *pBorderTypeButton);
00102   delete pBorderTypeButton;
00103 }
00104 //***************************************************************************************
00105 void CFormatBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
00106 {
00107   USES_CONVERSION;
00108
00109   CMFCToolBar::OnUpdateCmdUI(pTarget, bDisableIfNoHndler);
00110
00111   CWordPadView* pView = (CWordPadView*) GetTopLevelFrame ()->GetActiveView ();
00112   ASSERT_VALID (pView);
00113
00114   if (pView->GetSafeHwnd () != ::GetFocus ())
00115   {
00116     return;
00117   }
00118
00119   CString strFontName;
00120
00121   // get the current font from the view and update
00122   WPD_CHARFORMAT cf = pView->GetCharFormatSelection ();
00123
00124   CObList listButtons;
00125   if (CMFCToolBar::GetCommandButtons (IDC_FONTNAME, listButtons) > 0)
00126   {
00127     for (POSITION posCombo = listButtons.GetHeadPosition (); posCombo != NULL;)
00128     {
00129       CMFCToolBarFontComboBox* pCombo =
00130         DYNAMIC_DOWNCAST (CMFCToolBarFontComboBox, listButtons.GetNext (posCombo));
00131
00132       if (pCombo != NULL && !pCombo->HasFocus ())
00133       {
00134         if ((cf.dwMask & (CFM_FACE|CFM_CHARSET)) == (CFM_FACE|CFM_CHARSET))
00135         {
00136           strFontName = cf.szFaceName;
00137           pCombo->SetFont (strFontName, DEFAULT_CHARSET, TRUE);
00138         }
00139         else
00140         {
00141           pCombo->SetText(_T(""));
00142         }
00143       }
00144     }
00145   }
00146
00147   if (CMFCToolBar::GetCommandButtons (IDC_FONTSIZE, listButtons) > 0)
00148   {
00149     for (POSITION posCombo = listButtons.GetHeadPosition (); posCombo != NULL;)
00150     {
00151       CMFCToolBarFontSizeComboBox* pCombo =
00152         DYNAMIC_DOWNCAST (CMFCToolBarFontSizeComboBox, listButtons.GetNext (posCombo));
00153
00154       if (pCombo != NULL && !pCombo->HasFocus ())
00155       {
00156         if (!strFontName.IsEmpty () && pCombo->GetCount () == 0)
00157         {
00158           pCombo->RebuildFontSizes (strFontName);
00159         }
00160
00161         pCombo->SetTwipSize( (cf.dwMask & CFM_SIZE) ? cf.yHeight : -1);
00162       }
00163     }
00164   }
00165
00166   pView->SetFocus ();
00167 }
00168 //***************************************************************************************
00169 CMFCToolBarFontComboBox* CFormatBar::CreateFontComboButton ()
00170 {
00171   return new CMFCToolBarFontComboBox (IDC_FONTNAME,
00172     GetCmdMgr ()->GetCmdImage  (IDC_FONTNAME, FALSE),
00173     TRUETYPE_FONTTYPE | DEVICE_FONTTYPE,
00174     DEFAULT_CHARSET,
00175     WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWN |
00176     CBS_AUTOHSCROLL | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED,
00177     (3*LF_FACESIZE*m_szBaseUnits.cx)/2);
00178 }
00179
00180 // To hold the colours and their names
00181 typedef struct {
00182     COLORREF crColour;
00183     TCHAR    *szName;
00184 } ColourTableEntry;
00185
00186 #define MAX_COLOURS      100
00187
00188 static ColourTableEntry crColours[] =
00189 {
00190     { RGB(0x00, 0x00, 0x00),    _T("Black")             },
00191     { RGB(0xA5, 0x2A, 0x00),    _T("Brown")             },
00192     { RGB(0x00, 0x40, 0x40),    _T("Dark Olive Green")  },
00193     { RGB(0x00, 0x55, 0x00),    _T("Dark Green")        },
00194     { RGB(0x00, 0x00, 0x5E),    _T("Dark Teal")         },
00195     { RGB(0x00, 0x00, 0x8B),    _T("Dark Blue")         },
00196     { RGB(0x4B, 0x00, 0x82),    _T("Indigo")            },
00197     { RGB(0x28, 0x28, 0x28),    _T("Gray-80%")          },
00198
00199     { RGB(0x8B, 0x00, 0x00),    _T("Dark Red")          },
00200     { RGB(0xFF, 0x68, 0x20),    _T("Orange")            },
00201     { RGB(0x8B, 0x8B, 0x00),    _T("Dark Yellow")       },
00202     { RGB(0x00, 0x93, 0x00),    _T("Green")             },
00203     { RGB(0x38, 0x8E, 0x8E),    _T("Teal")              },
00204     { RGB(0x00, 0x00, 0xFF),    _T("Blue")              },
00205     { RGB(0x7B, 0x7B, 0xC0),    _T("Blue-Gray")         },
00206     { RGB(0x66, 0x66, 0x66),    _T("Gray-50%")          },
00207
00208     { RGB(0xFF, 0x00, 0x00),    _T("Red")               },
00209     { RGB(0xFF, 0xAD, 0x5B),    _T("Light Orange")      },
00210     { RGB(0x32, 0xCD, 0x32),    _T("Lime")              },
00211     { RGB(0x3C, 0xB3, 0x71),    _T("Sea Green")         },
00212     { RGB(51, 204, 204),    _T("Aqua")              },
00213     { RGB(0x7D, 0x9E, 0xC0),    _T("Light Blue")        },
00214     { RGB(0x80, 0x00, 0x80),    _T("Violet")            },
00215     { RGB(0x7F, 0x7F, 0x7F),    _T("Gray-40%")          },
00216
00217     { RGB(0xFF, 0xC0, 0xCB),    _T("Pink")              },
00218     { RGB(0xFF, 0xD7, 0x00),    _T("Gold")              },
00219     { RGB(0xFF, 0xFF, 0x00),    _T("Yellow")            },
00220     { RGB(0x00, 0xFF, 0x00),    _T("Bright Green")      },
00221     { RGB(0x00, 0xFF, 0xFF),    _T("Turquoise")         },
00222     { RGB(0, 204, 255),     _T("Sky Blue")          },
00223     { RGB(234, 128, 102),   _T("Plum")              },
00224     { RGB(0xC0, 0xC0, 0xC0),    _T("Gray-25%")          },
00225
00226     { RGB(0xFF, 0xE4, 0xE1),    _T("Rose")              },
00227     { RGB(255, 254, 153),   _T("Tan")               },
00228     { RGB(0xFF, 0xFF, 0xE0),    _T("Light Yellow")      },
00229     { RGB(204, 255, 204),   _T("Light Green ")      },
00230     { RGB(204, 255, 255),   _T("Light Turquoise") },
00231     { RGB(153, 204, 255),   _T("Pale Blue")         },
00232     { RGB(204, 153, 255),   _T("Lavender")          },
00233     { RGB(0xFF, 0xFF, 0xFF),    _T("White")             }
00234 };
00235
00236 CMFCColorMenuButton* CFormatBar::CreateColorButton ()
00237 {
00238   if (m_palColorPicker.GetSafeHandle () == NULL)
00239   {
00240     m_nNumColours = sizeof (crColours)/sizeof(ColourTableEntry);
00241     ASSERT(m_nNumColours <= MAX_COLOURS);
00242     if (m_nNumColours > MAX_COLOURS)
00243       m_nNumColours = MAX_COLOURS;
00244
00245     // Create the palette
00246     struct
00247     {
00248       LOGPALETTE    LogPalette;
00249       PALETTEENTRY  PalEntry[MAX_COLOURS];
00250     }pal;
00251
00252     LOGPALETTE* pLogPalette = (LOGPALETTE*) &pal;
00253     pLogPalette->palVersion    = 0x300;
00254     pLogPalette->palNumEntries = (WORD) m_nNumColours;
00255
00256     for (int i = 0; i < m_nNumColours; i++)
00257     {
00258       pLogPalette->palPalEntry[i].peRed   = GetRValue(crColours[i].crColour);
00259       pLogPalette->palPalEntry[i].peGreen = GetGValue(crColours[i].crColour);
00260       pLogPalette->palPalEntry[i].peBlue  = GetBValue(crColours[i].crColour);
00261       pLogPalette->palPalEntry[i].peFlags = 0;
00262     }
00263
00264     m_palColorPicker.CreatePalette (pLogPalette);
00265   }
00266
00267   CMFCColorMenuButton* pColorButton = new
00268     CMFCColorMenuButton (ID_CHAR_COLOR, _T("Text Color..."), &m_palColorPicker);
00269
00270   pColorButton->EnableAutomaticButton (_T("Automatic"), RGB (0, 0, 0));
00271   pColorButton->EnableOtherButton (_T("More Colors..."));
00272   pColorButton->EnableDocumentColors (_T("Document's Colors"));
00273   pColorButton->SetColumnsNumber (8);
00274   pColorButton->EnableTearOff (ID_COLOR_TEAROFF, 5, 2);
00275
00276   // Initialize color names:
00277   for (int i = 0; i < m_nNumColours; i++)
00278   {
00279     CMFCColorMenuButton::SetColorName (crColours[i].crColour, crColours[i].szName);
00280   }
00281
00282   return pColorButton;
00283 }
00284
00285 CMFCToolBarMenuButton* CFormatBar::CreateBorderTypeButton ()
00286 {
00287   CMenu menu;
00288   VERIFY(menu.LoadMenu (IDR_BORDER_PALETTE));
00289
00290   CMFCToolBarMenuButton* pBorderType = NULL;
00291   CMenu* pPopup = menu.GetSubMenu(0);
00292   ASSERT(pPopup != NULL);
00293   if (pPopup != NULL)
00294   {
00295     pBorderType = new CMFCToolBarMenuButton (ID_BORDER_1, pPopup->GetSafeHmenu (), GetCmdMgr ()->GetCmdImage  (ID_BORDER_1, FALSE), _T("Borders"));
00296     pBorderType->SetMenuPaletteMode (TRUE, 2 /* Rows number */);
00297     pBorderType->SetTearOff (ID_BORDER_TEAROFF);
00298   }
00299
00300   return pBorderType;
00301 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/MainFrm.cpp Source File

  • vc2008fp
  • PaletteDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "PaletteDemo.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
00029   ON_WM_CREATE()
00030   ON_COMMAND(ID_VIEW_TOOLS_PALETTE, OnViewToolsPalette)
00031   ON_UPDATE_COMMAND_UI(ID_VIEW_TOOLS_PALETTE, OnUpdateViewToolsPalette)
00032   ON_COMMAND(ID_TWO_COLUMNS, OnTwoColumns)
00033   ON_UPDATE_COMMAND_UI(ID_TWO_COLUMNS, OnUpdateTwoColumns)
00034   ON_COMMAND(ID_THREE_COLUMNS, OnThreeColumns)
00035   ON_UPDATE_COMMAND_UI(ID_THREE_COLUMNS, OnUpdateThreeColumns)
00036   ON_COMMAND(ID_FOUR_COLUMNS, OnFourColumns)
00037   ON_UPDATE_COMMAND_UI(ID_FOUR_COLUMNS, OnUpdateFourColumns)
00038   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00039   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00040 END_MESSAGE_MAP()
00041
00042 static UINT indicators[] =
00043 {
00044   ID_SEPARATOR,           // status line indicator
00045   ID_INDICATOR_CAPS,
00046   ID_INDICATOR_NUM,
00047   ID_INDICATOR_SCRL,
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CMainFrame construction/destruction
00052
00053 CMainFrame::CMainFrame()
00054 {
00055 }
00056
00057 CMainFrame::~CMainFrame()
00058 {
00059 }
00060
00061 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00062 {
00063   if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
00064     return -1;
00065
00066   // enable Office XP look:
00067   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00068
00069   if (!m_wndMenuBar.Create (this))
00070   {
00071     TRACE0("Failed to create menubar\n");
00072     return -1;      // fail to create
00073   }
00074
00075   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00076
00077   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00078     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00079     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00080   {
00081     TRACE0("Failed to create toolbar\n");
00082     return -1;      // fail to create
00083   }
00084
00085   if (!m_wndPalette.Create(this,
00086     WS_CHILD | WS_VISIBLE | CBRS_LEFT | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_HIDE_INPLACE | CBRS_SIZE_DYNAMIC |
00087     CBRS_GRIPPER | CBRS_BORDER_3D,
00088     ID_VIEW_TOOLS_PALETTE) ||
00089     !m_wndPalette.LoadToolBar (IDR_PALETTE, 0, 0, TRUE /* Locked */))
00090   {
00091     TRACE0("Failed to create build toolbar\n");
00092     return FALSE;      // fail to create
00093   }
00094
00095   if (!m_wndStatusBar.Create(this) ||
00096     !m_wndStatusBar.SetIndicators(indicators,
00097       sizeof(indicators)/sizeof(UINT)))
00098   {
00099     TRACE0("Failed to create status bar\n");
00100     return -1;      // fail to create
00101   }
00102
00103   BOOL bValidString;
00104   CString strMainToolbarTitle;
00105   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00106   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00107
00108   CString strPaletteTitle;
00109   bValidString = strPaletteTitle.LoadString (IDS_PALETTE);
00110   m_wndPalette.SetWindowText (strPaletteTitle);
00111
00112   m_wndMenuBar.EnableDocking (CBRS_ALIGN_ANY);
00113   m_wndToolBar.EnableDocking (CBRS_ALIGN_ANY);
00114   m_wndPalette.EnableDocking (CBRS_ALIGN_LEFT | CBRS_ALIGN_RIGHT);
00115
00116   EnableDocking(CBRS_ALIGN_ANY);
00117
00118   DockPane (&m_wndMenuBar);
00119   DockPane (&m_wndToolBar);
00120   DockPane (&m_wndPalette);
00121
00122   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00123   return 0;
00124 }
00125
00126 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00127 {
00128   if( !CFrameWndEx::PreCreateWindow(cs) )
00129     return FALSE;
00130   // TODO: Modify the Window class or styles here by modifying
00131   //  the CREATESTRUCT cs
00132
00133   return TRUE;
00134 }
00135
00136 /////////////////////////////////////////////////////////////////////////////
00137 // CMainFrame diagnostics
00138
00139 #ifdef _DEBUG
00140 void CMainFrame::AssertValid() const
00141 {
00142   CFrameWndEx::AssertValid();
00143 }
00144
00145 void CMainFrame::Dump(CDumpContext& dc) const
00146 {
00147   CFrameWndEx::Dump(dc);
00148 }
00149
00150 #endif //_DEBUG
00151
00152 /////////////////////////////////////////////////////////////////////////////
00153 // CMainFrame message handlers
00154
00155
00156
00157 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00158 {
00159   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00160
00161   CMenu menu;
00162   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00163
00164   CMenu* pPopup = menu.GetSubMenu(0);
00165   ASSERT(pPopup != NULL);
00166
00167   if (pPopup)
00168   {
00169     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00170     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00171   }
00172
00173   return 0;
00174 }
00175
00176 void CMainFrame::OnViewCustomize()
00177 {
00178   //------------------------------------
00179   // Create a customize toolbars dialog:
00180   //------------------------------------
00181   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00182     TRUE /* Automatic menus scaning */);
00183
00184   pDlgCust->Create ();
00185 }
00186
00187 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00188 {
00189   //---------------------------------------------------------
00190   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00191   //---------------------------------------------------------
00192   CFrameWndEx::OnShowPopupMenu (pMenuPopup);
00193
00194   if (pMenuPopup != NULL &&
00195     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00196   {
00197     if (CMFCToolBar::IsCustomizeMode ())
00198     {
00199       //----------------------------------------------------
00200       // Don't show toolbars list in the cuztomization mode!
00201       //----------------------------------------------------
00202       return FALSE;
00203     }
00204
00205     pMenuPopup->RemoveAllItems ();
00206
00207     CMenu menu;
00208     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00209
00210     CMenu* pPopup = menu.GetSubMenu(0);
00211     ASSERT(pPopup != NULL);
00212
00213     if (pPopup)
00214     {
00215       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00216     }
00217   }
00218
00219   return TRUE;
00220 }
00221
00222 void CMainFrame::OnViewToolsPalette()
00223 {
00224   ShowPane (&m_wndPalette,
00225           !(m_wndPalette.GetStyle () & WS_VISIBLE),
00226           FALSE, TRUE);
00227 }
00228
00229 void CMainFrame::OnUpdateViewToolsPalette(CCmdUI* pCmdUI)
00230 {
00231   pCmdUI->SetCheck (m_wndPalette.GetStyle () & WS_VISIBLE);
00232 }
00233
00234 void CMainFrame::OnTwoColumns()
00235 {
00236   m_wndPalette.SetColumns (2);
00237 }
00238
00239 void CMainFrame::OnUpdateTwoColumns(CCmdUI* pCmdUI)
00240 {
00241   pCmdUI->SetRadio (m_wndPalette.GetColumns () == 2);
00242 }
00243
00244 void CMainFrame::OnThreeColumns()
00245 {
00246   m_wndPalette.SetColumns (3);
00247 }
00248
00249 void CMainFrame::OnUpdateThreeColumns(CCmdUI* pCmdUI)
00250 {
00251   pCmdUI->SetRadio (m_wndPalette.GetColumns () == 3);
00252 }
00253
00254 void CMainFrame::OnFourColumns()
00255 {
00256   m_wndPalette.SetColumns (4);
00257 }
00258
00259 void CMainFrame::OnUpdateFourColumns(CCmdUI* pCmdUI)
00260 {
00261   pCmdUI->SetRadio (m_wndPalette.GetColumns () == 4);
00262 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/StatusBarDemo.h Source File

  • vc2008fp
  • StatusBarDemo

StatusBarDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CStatusBarDemoApp:
00021 // See StatusBarDemo.cpp for the implementation of this class
00022 //
00023
00024 class CStatusBarDemoApp : public CWinAppEx
00025 {
00026 public:
00027   CStatusBarDemoApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern CStatusBarDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/ListHdr.h Source File

  • general
  • ListHdr

ListHdr.h

Go to the documentation of this file.
00001 // ListHdr.h : main header file for the ListHdr application
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #if !defined(AFX_ListHdr_H__31281826_D350_11D0_8286_00C04FD73634__INCLUDED_)
00012 #define AFX_ListHdr_H__31281826_D350_11D0_8286_00C04FD73634__INCLUDED_
00013
00014 #if _MSC_VER >= 1000
00015 #pragma once
00016 #endif // _MSC_VER >= 1000
00017
00018 #ifndef __AFXWIN_H__
00019   #error include 'stdafx.h' before including this file for PCH
00020 #endif
00021
00022 #include "resource.h"       // main symbols
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CListHdrApp:
00026 // See ListHdr.cpp for the implementation of this class
00027 //
00028
00029 class CListHdrApp : public CWinApp
00030 {
00031 public:
00032   CListHdrApp();
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CListHdrApp)
00037   public:
00038   virtual BOOL InitInstance();
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042
00043   //{{AFX_MSG(CListHdrApp)
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050
00051 //{{AFX_INSERT_LOCATION}}
00052 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00053
00054 #endif // !defined(AFX_ListHdr_H__31281826_D350_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHelloView Member List

This is the complete list of members for CHelloView, including all inherited members.
CHelloView() | CHelloView |
CHelloView() | CHelloView | [protected]
GetDocument() | CHelloView | [inline]
m_clrText | CHelloView | [protected]
m_nIDColor | CHelloView | [protected]
MixColors() | CHelloView |
OnColor() | CHelloView | [protected]
OnColor() | CHelloView | [protected]
OnCustom() | CHelloView | [protected]
OnCustomColor() | CHelloView | [protected]
OnDraw(CDC *pDC) | CHelloView | [protected, virtual]
OnDraw(CDC *pDC) | CHelloView | [virtual]
OnUpdateBlack(CCmdUI *pCmdUI) | CHelloView | [protected]
OnUpdateBlue(CCmdUI *pCmdUI) | CHelloView | [protected]
OnUpdateColor(CCmdUI *pCmdUI) | CHelloView | [protected]
OnUpdateCustom(CCmdUI *pCmdUI) | CHelloView | [protected]
OnUpdateGreen(CCmdUI *pCmdUI) | CHelloView | [protected]
OnUpdateRed(CCmdUI *pCmdUI) | CHelloView | [protected]
OnUpdateWhite(CCmdUI *pCmdUI) | CHelloView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CHelloView | [virtual]
~CHelloView() | CHelloView | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/testhelp/ThelpPpg.cpp Source File

  • controls
  • testhelp

ThelpPpg.cpp

Go to the documentation of this file.
00001 // ThelpPpg.cpp : Implementation of the CTesthelpPropPage property page class.
00002
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "testhelp.h"
00014 #include "ThelpPpg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 IMPLEMENT_DYNCREATE(CTesthelpPropPage, COlePropertyPage)
00024
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // Message map
00028
00029 BEGIN_MESSAGE_MAP(CTesthelpPropPage, COlePropertyPage)
00030    //{{AFX_MSG_MAP(CTesthelpPropPage)
00031   ON_BN_CLICKED(IDC_USETOOLTIP, OnUsetooltipClicked)
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035
00036
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // Initialize class factory and guid
00040
00041 IMPLEMENT_OLECREATE_EX(CTesthelpPropPage, "TESTHELP.TesthelpPropPage.1",
00042   0x31a2b284, 0x8c11, 0x11cf, 0xb3, 0x7f, 0, 0xaa, 0, 0xb9, 0x2b, 0x50)
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CTesthelpPropPage::CTesthelpPropPageFactory::UpdateRegistry -
00047 // Adds or removes system registry entries for CTesthelpPropPage
00048
00049 BOOL CTesthelpPropPage::CTesthelpPropPageFactory::UpdateRegistry(BOOL bRegister)
00050 {
00051   if (bRegister)
00052     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00053       m_clsid, IDS_TESTHELP_PPG);
00054   else
00055     return AfxOleUnregisterClass(m_clsid, NULL);
00056 }
00057
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CTesthelpPropPage::CTesthelpPropPage - Constructor
00061
00062 CTesthelpPropPage::CTesthelpPropPage() :
00063    COlePropertyPage(IDD, IDS_TESTHELP_PPG_CAPTION)
00064 {
00065    //{{AFX_DATA_INIT(CTesthelpPropPage)
00066    m_szName1 = _T("");
00067    m_szName2 = _T("");
00068    m_szName3 = _T("");
00069    m_bUseMine = FALSE;
00070    m_szTipCaption = _T("");
00071    m_bUseToolTip = FALSE;
00072   m_nUsePopupHelp = -1;
00073   //}}AFX_DATA_INIT
00074
00075 // Calling SetHelpInfo will set up the proper variables of COlePropertyPage
00076 // so that when someone connects to our IPropertyPage and calls
00077 // IPropertyPage::GetPageInfo the correct help information will be supplied.
00078 SetHelpInfo(_T("Names to appear in the control"),
00079          _T("TESTHELP.CHM"),
00080          0);
00081
00082 }
00083
00084
00085 /////////////////////////////////////////////////////////////////////////////
00086 // CTesthelpPropPage::DoDataExchange - Moves data between page and properties
00087
00088 void CTesthelpPropPage::DoDataExchange(CDataExchange* pDX)
00089 {
00090    //{{AFX_DATA_MAP(CTesthelpPropPage)
00091    DDX_Control(pDX, IDC_TIPCAPTION, m_CtrlTipCaption);
00092   DDP_Text(pDX, IDC_NAME1, m_szName1, _T("Name1") );
00093   DDX_Text(pDX, IDC_NAME1, m_szName1);
00094   DDP_Text(pDX, IDC_NAME2, m_szName2, _T("Name2") );
00095   DDX_Text(pDX, IDC_NAME2, m_szName2);
00096   DDP_Text(pDX, IDC_NAME3, m_szName3, _T("Name3") );
00097   DDX_Text(pDX, IDC_NAME3, m_szName3);
00098   DDP_Check(pDX, IDC_USEMINE, m_bUseMine, _T("UseMyHelp") );
00099   DDX_Check(pDX, IDC_USEMINE, m_bUseMine);
00100   DDP_Text(pDX, IDC_TIPCAPTION, m_szTipCaption, _T("ToolTipText") );
00101   DDX_Text(pDX, IDC_TIPCAPTION, m_szTipCaption);
00102   DDP_Check(pDX, IDC_USETOOLTIP, m_bUseToolTip, _T("ShowToolTip") );
00103   DDX_Check(pDX, IDC_USETOOLTIP, m_bUseToolTip);
00104   DDP_Radio(pDX, IDC_POPUPHELP, m_nUsePopupHelp, _T("UsePopupHelp") );
00105   DDX_Radio(pDX, IDC_POPUPHELP, m_nUsePopupHelp);
00106   //}}AFX_DATA_MAP
00107    DDP_PostProcessing(pDX);
00108 }
00109
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CTesthelpPropPage message handlers
00114
00115 BOOL CTesthelpPropPage::OnInitDialog()
00116 {
00117    COlePropertyPage::OnInitDialog();
00118
00119    // enable or disable the ToolTip caption edit control
00120    m_CtrlTipCaption.EnableWindow(m_bUseToolTip);
00121
00122    return FALSE;  // return TRUE unless you set the focus to a control
00123            // EXCEPTION: OCX Property Pages should return FALSE
00124 }
00125
00126 BOOL CTesthelpPropPage::OnHelp(LPCTSTR)
00127 {
00128   // OnHelp is called by IPropertyPage::Help.  When someone requests
00129   // it, we supply help by calling CWinApp::HtmlHelp
00130   AfxGetApp()->HtmlHelp((DWORD_PTR)(_T("IDH_PROPERTIES.htm")), HH_DISPLAY_TOPIC);
00131
00132   return TRUE;
00133 }
00134
00135
00136
00137
00138 void CTesthelpPropPage::OnUsetooltipClicked()
00139 {
00140    //Enable or disable the ToolTip caption window.
00141    UpdateData(TRUE);
00142    m_CtrlTipCaption.EnableWindow(m_bUseToolTip);
00143
00144 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagFORMATIDOFFSET Member List

This is the complete list of members for tagFORMATIDOFFSET, including all inherited members.
dwOffset | tagFORMATIDOFFSET
formatID | tagFORMATIDOFFSET
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDispatchViewer Member List

This is the complete list of members for CDispatchViewer, including all inherited members.
CDispatchViewer() | CDispatchViewer | [protected]
CInterfaceViewer() | CInterfaceViewer |
OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CDispatchViewer | [virtual]
View(HWND hwndParent, REFIID riid, LPUNKNOWN punk) | CInterfaceViewer |
~CDispatchViewer() | CDispatchViewer | [protected, virtual]
~CInterfaceViewer() | CInterfaceViewer | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFileLog Member List

This is the complete list of members for CFileLog, including all inherited members.
CFileLog() | CFileLog |
CLog() | CLog |
Create(LPCTSTR pszFileName) | CFileLog |
DECLARE_DYNAMIC(CFileLog) | CFileLog | [private]
GetFileName() const | CFileLog |
m_file | CFileLog | [protected]
operator<<(LPCTSTR pszString) | CFileLog | [virtual]
CLog::operator<<(COleVariant &var) | CLog |
CLog::operator<<(int n) | CLog |
~CFileLog() | CFileLog |
~CLog() | CLog |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpad.h Source File

  • ole
  • wordpad

wordpad.h

Go to the documentation of this file.
00001 // wordpad.h : main header file for the WORDPAD application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017 #include "splash.h"
00018 #include "options.h"
00019 #include "afxtempl.h"
00020
00021 #define WPM_BARSTATE WM_USER
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CWordPadApp:
00025 // See wordpad.cpp for the implementation of this class
00026 //
00027
00028 class CWordPadCommandLineInfo : public CCommandLineInfo
00029 {
00030 public:
00031   CWordPadCommandLineInfo() {m_bForceTextMode = FALSE;}
00032   BOOL m_bForceTextMode;
00033   virtual void ParseParam(const char* pszParam,BOOL bFlag,BOOL bLast);
00034 };
00035
00036 class CWordPadApp : public CWinApp
00037 {
00038 public:
00039   CWordPadApp();
00040   ~CWordPadApp();
00041
00042 //Attributes
00043   CWordPadCommandLineInfo cmdInfo;
00044   CDC m_dcScreen;
00045   LOGFONT m_lf;
00046   int m_nDefFont;
00047   static int m_nOpenMsg;
00048   static int m_nPrinterChangedMsg;
00049   CRect m_rectPageMargin;
00050   CRect m_rectInitialFrame;
00051   BOOL m_bMaximized;
00052   BOOL m_bPromptForType;
00053   BOOL m_bWin4;
00054 #ifndef _UNICODE
00055   BOOL m_bWin31;
00056 #endif
00057   BOOL m_bLargeIcons;
00058   BOOL m_bForceTextMode;
00059   BOOL m_bWordSel;
00060   BOOL m_bForceOEM;
00061   int m_nFilterIndex;
00062   int m_nNewDocType;
00063   CDocOptions m_optionsText;
00064   CDocOptions m_optionsRTF;
00065   CDocOptions m_optionsWord; //wrap to ruler
00066   CDocOptions m_optionsWrite; //wrap to ruler
00067   CDocOptions m_optionsIP;    //wrap to ruler
00068   CDocOptions m_optionsNull;
00069   CList<HWND, HWND> m_listPrinterNotify;
00070
00071   BOOL IsDocOpen(LPCTSTR lpszFileName);
00072
00073 // Get
00074   int GetUnits() {return m_nUnits;}
00075   int GetTPU() { return GetTPU(m_nUnits);}
00076   int GetTPU(int n) { return m_units[n].m_nTPU;}
00077   LPCTSTR GetAbbrev() { return m_units[m_nUnits].m_strAbbrev;}
00078   LPCTSTR GetAbbrev(int n) { return m_units[n].m_strAbbrev;}
00079   const CUnit& GetUnit() {return m_units[m_nUnits];}
00080   CDockState& GetDockState(LONG_PTR nDocType, BOOL bPrimary = TRUE);
00081   CDocOptions& GetDocOptions(LONG_PTR nDocType);
00082
00083 // Set
00084   void SetUnits(int n)
00085   { ASSERT(n>=0 && n <m_nPrimaryNumUnits); m_nUnits = n; }
00086
00087 // Operations
00088   void RegisterFormats();
00089   static BOOL CALLBACK StaticEnumProc(HWND hWnd, LPARAM lParam);
00090   void UpdateRegistry();
00091   void NotifyPrinterChanged(BOOL bUpdatePrinterSelection = FALSE);
00092   BOOL PromptForFileName(CString& fileName, UINT nIDSTitle, DWORD dwFlags,
00093     BOOL bOpenFileDialog, int* pType = NULL);
00094
00095   BOOL ParseMeasurement(TCHAR* buf, int& lVal);
00096   void PrintTwips(TCHAR* buf, int nSize, int nValue, int nDecimal);
00097   void SaveOptions();
00098   void LoadOptions();
00099   void LoadAbbrevStrings();
00100   HGLOBAL CreateDevNames();
00101
00102 // Overrides
00103   BOOL IsIdleMessage(MSG* pMsg);
00104   // ClassWizard generated virtual function overrides
00105   //{{AFX_VIRTUAL(CWordPadApp)
00106   public:
00107   virtual BOOL InitInstance();
00108   virtual int ExitInstance();
00109   virtual BOOL OnDDECommand(LPTSTR lpszCommand);
00110   virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);
00111   virtual BOOL PreTranslateMessage(MSG* pMsg);
00112   //}}AFX_VIRTUAL
00113
00114 // Implementation
00115   COleTemplateServer m_server;
00116     // Server object for document creation
00117
00118   //{{AFX_MSG(CWordPadApp)
00119   afx_msg void OnAppAbout();
00120   afx_msg void OnFileNew();
00121   afx_msg void OnFileOpen();
00122   //}}AFX_MSG
00123   DECLARE_MESSAGE_MAP()
00124 private:
00125   int m_nUnits;
00126   static const int m_nPrimaryNumUnits;
00127   static const int m_nNumUnits;
00128   static CUnit m_units[7];
00129 };
00130
00131 /////////////////////////////////////////////////////////////////////////////
00132
00133 extern CWordPadApp theApp;
00134 //inline CWordPadApp* GetWordPadApp() {return (CWordPadApp*)AfxGetApp();}
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSummInfo Member List

This is the complete list of members for CSummInfo, including all inherited members.
AddCountToEditTime() | CSummInfo |
AddCountToEditTime() | CSummInfo |
CSummInfo() | CSummInfo |
CSummInfo() | CSummInfo |
GetAppname() | CSummInfo |
GetAppname() | CSummInfo |
GetAuthor() | CSummInfo |
GetAuthor() | CSummInfo |
GetComments() | CSummInfo |
GetComments() | CSummInfo |
GetCreateDate() | CSummInfo |
GetCreateDate() | CSummInfo |
GetEditTime() | CSummInfo |
GetEditTime() | CSummInfo |
GetKeywords() | CSummInfo |
GetKeywords() | CSummInfo |
GetLastAuthor() | CSummInfo |
GetLastAuthor() | CSummInfo |
GetLastPrintDate() | CSummInfo |
GetLastPrintDate() | CSummInfo |
GetLastSaveDate() | CSummInfo |
GetLastSaveDate() | CSummInfo |
GetNumChars() | CSummInfo |
GetNumChars() | CSummInfo |
GetNumPages() | CSummInfo |
GetNumPages() | CSummInfo |
GetNumWords() | CSummInfo |
GetNumWords() | CSummInfo |
GetRevNum() | CSummInfo |
GetRevNum() | CSummInfo |
GetSecurity() | CSummInfo |
GetSecurity() | CSummInfo |
GetSubject() | CSummInfo |
GetSubject() | CSummInfo |
GetTemplate() | CSummInfo |
GetTemplate() | CSummInfo |
GetTitle() | CSummInfo |
GetTitle() | CSummInfo |
IncrRevNum() | CSummInfo |
IncrRevNum() | CSummInfo |
m_propSet | CSummInfo | [protected]
m_pSection | CSummInfo | [protected]
ReadFromStorage(LPSTORAGE lpRootStg) | CSummInfo |
ReadFromStorage(LPSTORAGE lpRootStg) | CSummInfo |
RecordCreateDate() | CSummInfo |
RecordCreateDate() | CSummInfo |
RecordPrintDate() | CSummInfo |
RecordPrintDate() | CSummInfo |
RecordSaveDate() | CSummInfo |
RecordSaveDate() | CSummInfo |
SetAppname(LPCTSTR szAppname) | CSummInfo |
SetAppname(LPCTSTR szAppname) | CSummInfo |
SetAuthor(LPCTSTR szAuthor) | CSummInfo |
SetAuthor(LPCTSTR szAuthor) | CSummInfo |
SetComments(LPCTSTR szComments) | CSummInfo |
SetComments(LPCTSTR szComments) | CSummInfo |
SetKeywords(LPCTSTR szKeywords) | CSummInfo |
SetKeywords(LPCTSTR szKeywords) | CSummInfo |
SetLastAuthor(LPCTSTR szLastAuthor) | CSummInfo |
SetLastAuthor(LPCTSTR szLastAuthor) | CSummInfo |
SetNumChars(ULONG nChars) | CSummInfo |
SetNumChars(ULONG nChars) | CSummInfo |
SetNumPages(ULONG nPages) | CSummInfo |
SetNumPages(ULONG nPages) | CSummInfo |
SetNumWords(ULONG nWords) | CSummInfo |
SetNumWords(ULONG nWords) | CSummInfo |
SetSecurity(ULONG nLevel) | CSummInfo |
SetSecurity(ULONG nLevel) | CSummInfo |
SetSubject(LPCTSTR szSubject) | CSummInfo |
SetSubject(LPCTSTR szSubject) | CSummInfo |
SetTemplate(LPCTSTR szTemplate) | CSummInfo |
SetTemplate(LPCTSTR szTemplate) | CSummInfo |
SetTitle(LPCTSTR szTitle) | CSummInfo |
SetTitle(LPCTSTR szTitle) | CSummInfo |
startEdit | CSummInfo | [protected]
StartEditTimeCount() | CSummInfo |
StartEditTimeCount() | CSummInfo |
WriteToStorage(LPSTORAGE lpRootStg) | CSummInfo |
WriteToStorage(LPSTORAGE lpRootStg) | CSummInfo |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoDoc.cpp Source File

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemoDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012
00013 #include "VisualStudioDemoDoc.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #endif
00018
00019 // CVisualStudioDemoDoc
00020
00021 IMPLEMENT_DYNCREATE(CVisualStudioDemoDoc, CDocument)
00022
00023 BEGIN_MESSAGE_MAP(CVisualStudioDemoDoc, CDocument)
00024   //{{AFX_MSG_MAP(CVisualStudioDemoDoc)
00025   ON_COMMAND(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, OnDummySelectActiveConfiguration)
00026   ON_COMMAND(ID_DUMMY_BUILD, &CVisualStudioDemoDoc::OnDummyBuild)
00027   ON_COMMAND(ID_DUMMY_COMPILE, &CVisualStudioDemoDoc::OnDummyCompile)
00028   ON_COMMAND(ID_DUMMY_EXECUTE, &CVisualStudioDemoDoc::OnDummyExecute)
00029   ON_COMMAND(ID_DUMMY_GO, &CVisualStudioDemoDoc::OnDummyGo)
00030   ON_COMMAND(ID_DUMMY_REBUILD_ALL, &CVisualStudioDemoDoc::OnDummyRebuildAll)
00031   ON_COMMAND(ID_DUMMY_REMOVE_ALL_BREAKPOINTS, &CVisualStudioDemoDoc::OnDummyRemoveAllBreakpoints)
00032   ON_COMMAND(ID_DUMMY_CLEAN, &CVisualStudioDemoDoc::OnDummyClean)
00033   ON_COMMAND(ID_NEW_DIALOG, OnNewDialog)
00034   ON_COMMAND(ID_NEW_ACCELERATOR, OnNewAccelerator)
00035   ON_COMMAND(ID_NEW_BITMAP, OnNewBitmap)
00036   ON_COMMAND(ID_NEW_CURSOR, OnNewCursor)
00037   ON_COMMAND(ID_NEW_ICON, OnNewIcon)
00038   ON_COMMAND(ID_NEW_MENU, OnNewMenu)
00039   ON_COMMAND(ID_NEW_STRING_TABLE, OnNewStringTable)
00040   ON_COMMAND(ID_NEW_TOOLBAR, OnNewToolbar)
00041   ON_COMMAND(ID_NEW_VERSION, OnNewVersion)
00042   ON_CBN_SELENDOK(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, OnDummySelectActiveConfiguration)
00043   //}}AFX_MSG_MAP
00044 END_MESSAGE_MAP()
00045
00046 // CVisualStudioDemoDoc construction/destruction
00047
00048 CVisualStudioDemoDoc::CVisualStudioDemoDoc()
00049 {
00050   // TODO: add one-time construction code here
00051 }
00052
00053 CVisualStudioDemoDoc::~CVisualStudioDemoDoc()
00054 {
00055 }
00056
00057 BOOL CVisualStudioDemoDoc::OnNewDocument()
00058 {
00059   if (!CDocument::OnNewDocument())
00060     return FALSE;
00061
00062   // TODO: add reinitialization code here
00063   //(SDI documents will reuse this document)
00064   return TRUE;
00065 }
00066
00067 void CVisualStudioDemoDoc::OnDummySelectActiveConfiguration()
00068 {
00069   CMFCToolBarComboBoxButton* pSrcCombo = NULL;
00070
00071   CObList listButtons;
00072   if (CMFCToolBar::GetCommandButtons(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, listButtons) > 0)
00073   {
00074     for (POSITION posCombo = listButtons.GetHeadPosition();
00075       pSrcCombo == NULL && posCombo != NULL;)
00076     {
00077       CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));
00078
00079       if (pCombo != NULL && CMFCToolBar::IsLastCommandFromButton(pCombo))
00080       {
00081         pSrcCombo = pCombo;
00082       }
00083     }
00084   }
00085
00086   if (pSrcCombo != NULL)
00087   {
00088     ASSERT_VALID(pSrcCombo);
00089
00090     LPCTSTR lpszSelItem = pSrcCombo->GetItem();
00091     CString strSelItem = (lpszSelItem == NULL) ? _T("") : lpszSelItem;
00092
00093     AfxMessageBox(strSelItem);
00094   }
00095   else
00096   {
00097     AfxMessageBox(_T("Show \"Set Active Configuration\" dialog...."));
00098   }
00099 }
00100
00101 // CVisualStudioDemoDoc serialization
00102
00103 void CVisualStudioDemoDoc::Serialize(CArchive& ar)
00104 {
00105   // CEditView contains an edit control which handles all serialization
00106   reinterpret_cast<CEditView*>(m_viewList.GetHead())->SerializeRaw(ar);
00107 }
00108
00109 // CVisualStudioDemoDoc diagnostics
00110
00111 #ifdef _DEBUG
00112 void CVisualStudioDemoDoc::AssertValid() const
00113 {
00114   CDocument::AssertValid();
00115 }
00116
00117 void CVisualStudioDemoDoc::Dump(CDumpContext& dc) const
00118 {
00119   CDocument::Dump(dc);
00120 }
00121 #endif //_DEBUG
00122
00123 // CVisualStudioDemoDoc commands
00124
00125 void CVisualStudioDemoDoc::OnDummyBuild()
00126 {
00127   // TODO: Add your command handler code here
00128 }
00129
00130 void CVisualStudioDemoDoc::OnDummyCompile()
00131 {
00132   // TODO: Add your command handler code here
00133 }
00134
00135 void CVisualStudioDemoDoc::OnDummyExecute()
00136 {
00137   // TODO: Add your command handler code here
00138 }
00139
00140 void CVisualStudioDemoDoc::OnDummyGo()
00141 {
00142   // TODO: Add your command handler code here
00143 }
00144
00145 void CVisualStudioDemoDoc::OnDummyRebuildAll()
00146 {
00147   // TODO: Add your command handler code here
00148 }
00149
00150 void CVisualStudioDemoDoc::OnDummyRemoveAllBreakpoints()
00151 {
00152   // TODO: Add your command handler code here
00153 }
00154
00155 void CVisualStudioDemoDoc::OnDummyClean()
00156 {
00157   // TODO: Add your command handler code here
00158 }
00159 void CVisualStudioDemoDoc::OnNewDialog()
00160 {
00161   AfxMessageBox(_T("New Dialog"));
00162 }
00163
00164 void CVisualStudioDemoDoc::OnNewAccelerator()
00165 {
00166   AfxMessageBox(_T("New Accelerator"));
00167 }
00168
00169 void CVisualStudioDemoDoc::OnNewBitmap()
00170 {
00171   AfxMessageBox(_T("New Bitmap"));
00172 }
00173
00174 void CVisualStudioDemoDoc::OnNewCursor()
00175 {
00176   AfxMessageBox(_T("New Cursor"));
00177 }
00178
00179 void CVisualStudioDemoDoc::OnNewIcon()
00180 {
00181   AfxMessageBox(_T("New Icon"));
00182 }
00183
00184 void CVisualStudioDemoDoc::OnNewMenu()
00185 {
00186   AfxMessageBox(_T("New Menu"));
00187 }
00188
00189 void CVisualStudioDemoDoc::OnNewStringTable()
00190 {
00191   AfxMessageBox(_T("New StringTable"));
00192 }
00193
00194 void CVisualStudioDemoDoc::OnNewToolbar()
00195 {
00196   AfxMessageBox(_T("New Toolbar"));
00197 }
00198
00199 void CVisualStudioDemoDoc::OnNewVersion()
00200 {
00201   AfxMessageBox(_T("New Version"));
00202 }
00203
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/DrawClientHandlers/dllmain.h Source File

  • vc2008fp
  • DrawClient
  • DrawClientHandlers

dllmain.h

Go to the documentation of this file.
00001 // dllmain.h : Declaration of module class.
00002
00003 class CDrawClientHandlersModule : public CAtlDllModuleT< CDrawClientHandlersModule >
00004 {
00005 public :
00006   DECLARE_LIBID(LIBID_DrawClientHandlersLib)
00007   DECLARE_REGISTRY_APPID_RESOURCEID(IDR_DRAWCLIENTHANDLERS, "{7D291C91-3924-4EAA-A9B1-CEF35C627498}")
00008 };
00009
00010 extern class CDrawClientHandlersModule _AtlModule;
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CWordPadCntrItem Member List

This is the complete list of members for CWordPadCntrItem, including all inherited members.
CWordPadCntrItem(REOBJECT *preo=NULL, CWordPadDoc *pContainer=NULL) | CWordPadCntrItem |
CWordPadCntrItem(REOBJECT *preo=NULL, CWordPadDoc *pContainer=NULL) | CWordPadCntrItem |
GetActiveView() | CWordPadCntrItem | [inline]
GetActiveView() | CWordPadCntrItem | [inline]
GetDocument() | CWordPadCntrItem | [inline]
GetDocument() | CWordPadCntrItem | [inline]
OnShowPanes(CFrameWnd *pFrameWnd, BOOL bShow) | CWordPadCntrItem | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/hello/stdafx.cpp Source File

  • general
  • hello

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : pre-compiled header and types file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/formatta.h Source File

  • ole
  • wordpad

formatta.h

Go to the documentation of this file.
00001 // formatta.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CFormatTabDlg dialog
00014
00015 class CFormatTabDlg : public CCSDialog
00016 {
00017 // Construction
00018 public:
00019   CFormatTabDlg(PARAFORMAT2& pf, CWnd* pParent = NULL);    // standard constructor
00020   ~CFormatTabDlg();
00021   PARAFORMAT2 m_pf;
00022   LONG* m_tabarray;
00023   int m_nCount;
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CFormatTabDlg)
00027   enum { IDD = IDD_FORMAT_TAB };
00028   CButton m_buttonClearAll;
00029   CButton m_buttonSet;
00030   CButton m_buttonClear;
00031   CComboBox   m_comboBox;
00032   //}}AFX_DATA
00033
00034 // Implementation
00035 protected:
00036   static const DWORD m_nHelpIDs[];
00037   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00038   void UpdateButton(CButton& button, BOOL b);
00039   void UpdateButtons();
00040   BOOL Set();
00041   BOOL AddTabToArray(LONG lTab);
00042   BOOL RemoveTabFromArray(LONG lTab);
00043   void RemoveTabFromArrayByIndex(int nIndex);
00044   void UpdateListBox();
00045   void SetEditFocus();
00046   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00047   virtual void OnOK();
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CFormatTabDlg)
00051   afx_msg void OnClickedClear();
00052   afx_msg void OnClickedClearAll();
00053   afx_msg void OnClickedSet();
00054   afx_msg void OnEditChange();
00055   virtual BOOL OnInitDialog();
00056   afx_msg void OnSelchange();
00057   //}}AFX_MSG
00058   DECLARE_MESSAGE_MAP()
00059 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/MainFrm.h Source File

  • vc2008fp
  • Explorer

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "FolderBar.h"
00014
00015 #define CFrameWnd CFrameWndEx
00016
00017 class CAddressBox : public CComboBoxEx
00018 {
00019   virtual HRESULT get_accName(VARIANT /*varChild*/, BSTR *pszName)
00020   {
00021     CString strText = _T("Address");
00022     *pszName = strText.AllocSysString();
00023
00024     return S_OK;
00025   }
00026 };
00027
00028 class CMainFrame : public CFrameWnd
00029 {
00030
00031 protected: // create from serialization only
00032   CMainFrame();
00033   DECLARE_DYNCREATE(CMainFrame)
00034
00035 // Attributes
00036 public:
00037   CMFCShellTreeCtrl& GetFolders ();
00038
00039 // Operations
00040 public:
00041   void SetCurrFolder (LPCTSTR lpszPath);
00042   void ActivateByTab();
00043
00044 // Overrides
00045   public:
00046   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00047   virtual BOOL PreTranslateMessage(MSG* pMsg);
00048
00049 // Implementation
00050 public:
00051   virtual ~CMainFrame();
00052
00053 #ifdef _DEBUG
00054   virtual void AssertValid() const;
00055   virtual void Dump(CDumpContext& dc) const;
00056 #endif
00057
00058 protected:  // control bar embedded members
00059   CMFCMenuBar   m_wndMenuBar;
00060   CMFCStatusBar m_wndStatusBar;
00061   CMFCToolBar   m_wndToolBar;
00062   CMFCReBar   m_wndReBar;
00063   CFolderBar    m_wndFoldersBar;
00064   CAddressBox   m_wndAddress;
00065
00066 protected:
00067   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00068   afx_msg void OnViewCustomize();
00069   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00070   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00071   afx_msg void OnViewFolders();
00072   afx_msg void OnUpdateViewFolders(CCmdUI* pCmdUI);
00073   afx_msg void OnNewAddressEnter();
00074   afx_msg void OnNewAddress();
00075
00076   DECLARE_MESSAGE_MAP()
00077
00078   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00079 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CExampleThread Member List

This is the complete list of members for CExampleThread, including all inherited members.
CExampleThread() | CExampleThread | [protected]
m_bDone | CExampleThread |
m_pOwner | CExampleThread |
SetOwner(CMutexesDlg *pOwner) | CExampleThread | [inline]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRectTool Member List

This is the complete list of members for CRectTool, including all inherited members.
c_down | CDrawTool | [static]
c_drawShape | CDrawTool | [static]
c_last | CDrawTool | [static]
c_nDownFlags | CDrawTool | [static]
c_tools | CDrawTool | [static]
CDrawTool(DrawShape nDrawShape) | CDrawTool |
CDrawTool(DrawShape nDrawShape) | CDrawTool |
CRectTool(DrawShape drawShape) | CRectTool |
CRectTool(DrawShape drawShape) | CRectTool |
FindTool(DrawShape drawShape) | CDrawTool | [static]
FindTool(DrawShape drawShape) | CDrawTool | [static]
m_drawShape | CDrawTool |
OnCancel() | CDrawTool | [virtual]
OnCancel() | CDrawTool | [virtual]
OnEditProperties(CDrawView *pView) | CDrawTool | [virtual]
OnEditProperties(CDrawView *pView) | CDrawTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
OnLButtonDblClk(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
OnLButtonDown(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
OnLButtonUp(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
OnMouseMove(CDrawView *pView, UINT nFlags, const CPoint &point) | CRectTool | [virtual]
Generated on Sat Nov 23 2024 17:01:06 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PropSheetDemo/MyPropertyPage1.cpp Source File

  • vc2008fp
  • PropSheetDemo

MyPropertyPage1.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "resource.h"
00003 #include "MyPropertyPage1.h"
00004
00005 #ifdef _DEBUG
00006 #undef THIS_FILE
00007 static char BASED_CODE THIS_FILE[] = __FILE__;
00008 #endif
00009
00010 IMPLEMENT_DYNCREATE(CMyPropertyPage1, CMFCPropertyPage)
00011 IMPLEMENT_DYNCREATE(CMyPropertyPage2, CMFCPropertyPage)
00012 IMPLEMENT_DYNCREATE(CMyPropertyPage3, CMFCPropertyPage)
00013 IMPLEMENT_DYNCREATE(CMyPropertyPage4, CMFCPropertyPage)
00014
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CMyPropertyPage1 property page
00018
00019 CMyPropertyPage1::CMyPropertyPage1() : CMFCPropertyPage(CMyPropertyPage1::IDD)
00020 {
00021 }
00022
00023 CMyPropertyPage1::~CMyPropertyPage1()
00024 {
00025 }
00026
00027 void CMyPropertyPage1::DoDataExchange(CDataExchange* pDX)
00028 {
00029   CMFCPropertyPage::DoDataExchange(pDX);
00030 }
00031
00032
00033 BEGIN_MESSAGE_MAP(CMyPropertyPage1, CMFCPropertyPage)
00034 END_MESSAGE_MAP()
00035
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CMyPropertyPage2 property page
00039
00040 CMyPropertyPage2::CMyPropertyPage2() : CMFCPropertyPage(CMyPropertyPage2::IDD)
00041 {
00042 }
00043
00044 CMyPropertyPage2::~CMyPropertyPage2()
00045 {
00046 }
00047
00048 void CMyPropertyPage2::DoDataExchange(CDataExchange* pDX)
00049 {
00050   CMFCPropertyPage::DoDataExchange(pDX);
00051 }
00052
00053
00054 BEGIN_MESSAGE_MAP(CMyPropertyPage2, CMFCPropertyPage)
00055 END_MESSAGE_MAP()
00056
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // CMyPropertyPage3 property page
00060
00061 CMyPropertyPage3::CMyPropertyPage3() : CMFCPropertyPage(CMyPropertyPage3::IDD)
00062 {
00063 }
00064
00065 CMyPropertyPage3::~CMyPropertyPage3()
00066 {
00067 }
00068
00069 void CMyPropertyPage3::DoDataExchange(CDataExchange* pDX)
00070 {
00071   CMFCPropertyPage::DoDataExchange(pDX);
00072 }
00073
00074
00075 BEGIN_MESSAGE_MAP(CMyPropertyPage3, CMFCPropertyPage)
00076 END_MESSAGE_MAP()
00077
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CMyPropertyPage4 property page
00081
00082 CMyPropertyPage4::CMyPropertyPage4() : CMFCPropertyPage(CMyPropertyPage4::IDD)
00083 {
00084 }
00085
00086 CMyPropertyPage4::~CMyPropertyPage4()
00087 {
00088 }
00089
00090 void CMyPropertyPage4::DoDataExchange(CDataExchange* pDX)
00091 {
00092   CMFCPropertyPage::DoDataExchange(pDX);
00093 }
00094
00095
00096 BEGIN_MESSAGE_MAP(CMyPropertyPage4, CMFCPropertyPage)
00097 END_MESSAGE_MAP()
00098
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MainFrm.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // MainFrm.cpp : implementation of the CMainFrame class
00011 //
00012
00013 #include "stdafx.h"
00014 #include "MSMoneyDemo.h"
00015 #include "MSMoneyDemoDoc.h"
00016 #include "MSMoneyDemoView.h"
00017
00018 #include "MainFrm.h"
00019
00020 #include "MSMVisualManager.h"
00021
00022 #include "MSMLinksBarButton.h"
00023
00024 #ifdef _DEBUG
00025 #define new DEBUG_NEW
00026 #undef THIS_FILE
00027 static char THIS_FILE[] = __FILE__;
00028 #endif
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CMainFrame
00032
00033 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00034
00035
00036 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00037   ON_WM_CREATE()
00038   ON_WM_CLOSE()
00039   ON_WM_ACTIVATE()
00040   ON_WM_SIZE()
00041   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00042   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00043   ON_UPDATE_COMMAND_UI(ID_GO_ADDRESS_EDIT, OnUpdateGoAddressEdit)
00044   ON_UPDATE_COMMAND_UI(ID_BACKWARD_1, OnUpdateBackward1)
00045   ON_UPDATE_COMMAND_UI(ID_BACKWARD_2, OnUpdateBackward2)
00046   ON_UPDATE_COMMAND_UI(ID_FORWARD_1, OnUpdateForward1)
00047   ON_UPDATE_COMMAND_UI(ID_FORWARD_2, OnUpdateForward2)
00048   ON_UPDATE_COMMAND_UI(ID_TOOLBAR_CUSTOMIZE, OnUpdateCustomize)
00049   ON_COMMAND_RANGE(ID_CATEGORIE_1, ID_CATEGORIE_8, OnCategorie)
00050   ON_UPDATE_COMMAND_UI_RANGE(ID_CATEGORIE_1, ID_CATEGORIE_8, OnUpdateCategorie)
00051   ON_COMMAND_RANGE(ID_LINKS_HOME_1, ID_LINKS_TAXES_5, OnLinks)
00052   ON_UPDATE_COMMAND_UI_RANGE(ID_LINKS_HOME_1, ID_LINKS_TAXES_5, OnUpdateLinks)
00053   ON_WM_GETMINMAXINFO()
00054   ON_COMMAND(ID_APP_HELP_MICROSOFT, OnHelpMicrosoft)
00055   ON_COMMAND(ID_HELP_MICROSOFT, OnHelpMicrosoft)
00056   ON_WM_SETTINGCHANGE()
00057 END_MESSAGE_MAP()
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CMainFrame construction/destruction
00061
00062 CMainFrame::CMainFrame()
00063 {
00064   m_bMainToolbarMenu = FALSE;
00065   m_nCategorie       = (UINT)-1;
00066 }
00067
00068 CMainFrame::~CMainFrame()
00069 {
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CMainFrame diagnostics
00074
00075 #ifdef _DEBUG
00076 void CMainFrame::AssertValid() const
00077 {
00078   CFrameWnd::AssertValid();
00079 }
00080
00081 void CMainFrame::Dump(CDumpContext& dc) const
00082 {
00083   CFrameWnd::Dump(dc);
00084 }
00085
00086 #endif //_DEBUG
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CMainFrame message handlers
00090
00091
00092 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00093 {
00094   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00095     return -1;
00096
00097   ModifyStyle (WS_CAPTION | FWS_ADDTOTITLE, 0);
00098   ModifyStyleEx (WS_EX_CLIENTEDGE, 0);
00099
00100   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMSMVisualManager));
00101
00102   //---------------------------------
00103   // Set toolbar and menu image size:
00104   //---------------------------------
00105   CMFCToolBarButton::m_bWrapText = FALSE;
00106   CMFCToolBar::SetMenuSizes (CSize (22, 22), CSize (16, 16));
00107
00108   CMFCToolBarComboBoxButton::SetFlatMode ();
00109   CMFCToolBarComboBoxButton::SetCenterVert ();
00110
00111   if (!m_wndCaptionBar.Create(this, IDR_MAINFRAME))
00112   {
00113     TRACE0("Failed to create captionbar\n");
00114     return -1;
00115   }
00116
00117   if (afxGlobalData.fontRegular.GetSafeHandle () != NULL)
00118   {
00119     LOGFONT lf;
00120     ZeroMemory (&lf, sizeof (LOGFONT));
00121     afxGlobalData.fontRegular.GetLogFont (&lf);
00122
00123     m_wndCaptionBar.SetCaptionFont (lf);
00124   }
00125
00126   if (!m_wndMenuBar.Create (this, AFX_DEFAULT_TOOLBAR_STYLE))
00127   {
00128     TRACE0("Failed to create menubar\n");
00129     return -1;      // fail to create
00130   }
00131
00132   EnableDocking(CBRS_ALIGN_ANY);
00133
00134   DockPane(&m_wndMenuBar);
00135
00136   CClientDC dc (this);
00137   m_bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 16;
00138
00139   UINT uiToolbarHotID  = m_bIsHighColor ? IDB_HOTTOOLBAR : 0;
00140   UINT uiToolbarColdID = m_bIsHighColor ? IDB_COLDTOOLBAR : 0;
00141   UINT uiToolbarDisID  = m_bIsHighColor ? IDB_DISABLEDTOOLBAR : 0;
00142   UINT uiToolbarPresID = m_bIsHighColor ? IDB_PRESSEDTOOLBAR : 0;
00143   UINT uiMenuID        = m_bIsHighColor ? IDB_MENU_IMAGES : IDB_MENU_IMAGES_16;
00144
00145   if (!m_wndToolBar.CreateEx (this, TBSTYLE_FLAT,
00146                             CBRS_SIZE_FIXED | AFX_DEFAULT_TOOLBAR_STYLE) ||
00147     !m_wndToolBar.LoadToolBar (IDR_MAINFRAME, uiToolbarColdID, uiMenuID,
00148       FALSE /* Not locked */, uiToolbarDisID, 0, uiToolbarHotID, uiToolbarPresID))
00149   {
00150     TRACE0("Failed to create toolbar\n");
00151     return -1;      // fail to create
00152   }
00153
00154   m_wndToolBar.InsertButton
00155     (CMFCToolBarComboBoxButton (ID_GO_ADDRESS_EDIT, 0), 3);
00156
00157   DockPane (&m_wndToolBar);
00158
00159   if (!m_wndCategoryBar.CreateEx (this, TBSTYLE_FLAT,
00160                           CBRS_SIZE_FIXED | AFX_DEFAULT_TOOLBAR_STYLE,
00161                 CRect (1, 1, 1, 1), AFX_IDW_TOOLBAR + 3))
00162   {
00163     TRACE0("Failed to create categoriebar\n");
00164     return -1;      // fail to create
00165   }
00166
00167   DockPane (&m_wndCategoryBar);
00168
00169   for (long i = 0; i < 8; i++)
00170   {
00171     if (!m_wndLinksBars[i].CreateEx (this, TBSTYLE_FLAT,
00172                   CBRS_SIZE_FIXED | AFX_DEFAULT_TOOLBAR_STYLE,
00173                   CRect (1, 1, 1, 1), AFX_IDW_TOOLBAR + 4 + i))
00174     {
00175       TRACE0("Failed to create linksbar\n");
00176       return -1;      // fail to create
00177     }
00178
00179     DockPane (&m_wndLinksBars[i]);
00180     ShowPane (&m_wndLinksBars[i], FALSE, FALSE, FALSE);
00181   }
00182
00183   m_wndLinksBars[0].InsertButton (CMSMLinksBarButton (_T("My Money"), ID_LINKS_HOME_1));
00184   m_wndLinksBars[0].InsertButton (CMSMLinksBarButton (_T("MSN Money News"), ID_LINKS_HOME_2));
00185   m_wndLinksBars[0].SetCurrentCommand (ID_LINKS_HOME_1);
00186
00187   m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Account List"), ID_LINKS_BANKING_1));
00188   m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Account Tools"), ID_LINKS_BANKING_2));
00189   m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Mortgages && Loans"), ID_LINKS_BANKING_3));
00190   m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Bank Services"), ID_LINKS_BANKING_4));
00191   m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Credit Center"), ID_LINKS_BANKING_5));
00192   m_wndLinksBars[1].SetCurrentCommand (ID_LINKS_BANKING_1);
00193
00194   m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("Bills Summary"), ID_LINKS_BILLS_1));
00195   m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("Bill Calendar"), ID_LINKS_BILLS_2));
00196   m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("Transfer Money"), ID_LINKS_BILLS_3));
00197   m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("MSN Bill Pay Online"), ID_LINKS_BILLS_4));
00198   m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("History"), ID_LINKS_BILLS_5));
00199   m_wndLinksBars[2].SetCurrentCommand (ID_LINKS_BILLS_1);
00200
00201   m_wndLinksBars[3].InsertButton (CMSMLinksBarButton (_T("Reports Home"), ID_LINKS_REPORTS_1));
00202   m_wndLinksBars[3].InsertButton (CMSMLinksBarButton (_T("Favorite Reports"), ID_LINKS_REPORTS_2));
00203   m_wndLinksBars[3].InsertButton (CMSMLinksBarButton (_T("Monthly Reports"), ID_LINKS_REPORTS_3));
00204   m_wndLinksBars[3].SetCurrentCommand (ID_LINKS_REPORTS_1);
00205
00206   m_wndLinksBars[4].InsertButton (CMSMLinksBarButton (_T("Budget Summary"), ID_LINKS_BUDGET_1));
00207   m_wndLinksBars[4].InsertButton (CMSMLinksBarButton (_T("Budget vs. Spending"), ID_LINKS_BUDGET_2));
00208   m_wndLinksBars[4].SetCurrentCommand (ID_LINKS_BUDGET_1);
00209
00210   m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Investing Home"), ID_LINKS_INVESTING_1));
00211   m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Investing Tools"), ID_LINKS_INVESTING_2));
00212   m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Market News"), ID_LINKS_INVESTING_3));
00213   m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Stocks"), ID_LINKS_INVESTING_4));
00214   m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Funds"), ID_LINKS_INVESTING_5));
00215   m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Insight"), ID_LINKS_INVESTING_6));
00216   m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Brokers"), ID_LINKS_INVESTING_7));
00217   m_wndLinksBars[5].SetCurrentCommand (ID_LINKS_INVESTING_1);
00218
00219   m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Planning Home"), ID_LINKS_PLANNING_1));
00220   m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Planning Tools"), ID_LINKS_PLANNING_2));
00221   m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Retirement"), ID_LINKS_PLANNING_3));
00222   m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Savings"), ID_LINKS_PLANNING_4));
00223   m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Insurance"), ID_LINKS_PLANNING_5));
00224   m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Family && College"), ID_LINKS_PLANNING_6));
00225   m_wndLinksBars[6].SetCurrentCommand (ID_LINKS_PLANNING_1);
00226
00227   m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Taxes Home"), ID_LINKS_TAXES_1));
00228   m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Tax Tools"), ID_LINKS_TAXES_2));
00229   m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Prepare Online"), ID_LINKS_TAXES_3));
00230   m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Planning"), ID_LINKS_TAXES_4));
00231   m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Products && Services"), ID_LINKS_TAXES_5));
00232   m_wndLinksBars[7].SetCurrentCommand (ID_LINKS_TAXES_1);
00233
00234   //-----------------------
00235   // Set up Favorites menu:
00236   //-----------------------
00237
00238   int nCategorie = theApp.GetProfileInt (_T(""), _T("Categorie"), 0);
00239
00240   OnCategorie (ID_CATEGORIE_1 + nCategorie);
00241
00242   m_wndTaskPane.Create (_T(""), this, CRect (0, 0, 140, 200),
00243     FALSE, IDR_MAINFRAME + 1,
00244     WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT, 0, 0);
00245
00246   DockPane(&m_wndTaskPane);
00247
00248   return 0;
00249 }
00250
00251
00252 void CMainFrame::OnClose()
00253 {
00254   theApp.WriteProfileInt (_T(""), _T("Categorie"), m_nCategorie);
00255
00256   CFrameWnd::OnClose();
00257 }
00258
00259
00260 void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
00261 {
00262   CFrameWnd::OnActivate(nState, pWndOther, bMinimized);
00263
00264   if (m_wndCaptionBar.GetSafeHwnd () != NULL)
00265   {
00266     m_wndCaptionBar.SetParentActive (nState != WA_INACTIVE);
00267   }
00268 }
00269
00270 void CMainFrame::OnSize(UINT nType, int cx, int cy)
00271 {
00272   SetupMemoryBitmapSize (CSize (cx, cy));
00273
00274   if (m_wndCaptionBar.GetSafeHwnd () != NULL)
00275   {
00276     m_wndCaptionBar.SetParentMaximize (nType == SIZE_MAXIMIZED);
00277   }
00278
00279   CFrameWnd::OnSize(nType, cx, cy);
00280 }
00281
00282 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM /*wp*/,LPARAM /*lp*/)
00283 {
00284   return 0;
00285 }
00286
00287 LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
00288 {
00289   UINT uiToolBarId = (UINT) wp;
00290   if (uiToolBarId == IDR_MAINFRAME)
00291   {
00292     // Replace "Back" and "Forward" buttons by the menu buttons
00293     // with the history lists:
00294
00295     CMenu menuBackward;
00296     menuBackward.LoadMenu (IDR_BACKWARD_MENU);
00297
00298     m_wndToolBar.ReplaceButton (ID_GO_BACK,
00299       CMFCToolBarMenuButton (ID_GO_BACK, menuBackward,
00300             GetCmdMgr ()->GetCmdImage (ID_GO_BACK), NULL));
00301
00302     CMenu menuForward;
00303     menuForward.LoadMenu (IDR_FORWARD_MENU);
00304
00305     m_wndToolBar.ReplaceButton (ID_GO_FORWARD,
00306       CMFCToolBarMenuButton (ID_GO_FORWARD, menuForward,
00307             GetCmdMgr ()->GetCmdImage (ID_GO_FORWARD), NULL));
00308   }
00309
00310   return 0;
00311 }
00312
00313 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00314 {
00315   CFrameWndEx::OnShowPopupMenu (pMenuPopup);
00316
00317   if (pMenuPopup == NULL)
00318   {
00319     return TRUE;
00320   }
00321
00322   CMFCToolBarMenuButton* pParentButton = pMenuPopup->GetParentButton ();
00323   if (pParentButton == NULL)
00324   {
00325     return TRUE;
00326   }
00327
00328   switch (pParentButton->m_nID)
00329   {
00330   case ID_GO_BACK:
00331   case ID_GO_FORWARD:
00332     {
00333       if (CMFCToolBar::IsCustomizeMode ())
00334       {
00335         return FALSE;
00336       }
00337     }
00338   }
00339
00340   return TRUE;
00341 }
00342
00343 void CMainFrame::OnUpdateGoAddressEdit(CCmdUI* pCmdUI)
00344 {
00345   pCmdUI->Enable (TRUE);
00346 }
00347
00348 void CMainFrame::OnCategorie(UINT nID)
00349 {
00350   if (m_nCategorie != -1)
00351   {
00352     ShowPane (&m_wndLinksBars[m_nCategorie], FALSE, TRUE, FALSE);
00353   }
00354
00355   m_nCategorie = nID - ID_CATEGORIE_1;
00356
00357   ShowPane (&m_wndLinksBars[m_nCategorie], TRUE, FALSE, FALSE);
00358 }
00359
00360 void CMainFrame::OnUpdateCategorie(CCmdUI* pCmdUI)
00361 {
00362   pCmdUI->Enable (TRUE);
00363   pCmdUI->SetCheck (pCmdUI->m_nID == (m_nCategorie + ID_CATEGORIE_1));
00364 }
00365
00366 CMSMLinksBar* CMainFrame::GetLinksBar (UINT nID)
00367 {
00368   CMSMLinksBar* pBar = NULL;
00369
00370   if(ID_LINKS_HOME_1 <= nID && nID <= ID_LINKS_HOME_2)
00371   {
00372     pBar = &m_wndLinksBars [0];
00373   }
00374   else if(ID_LINKS_BANKING_1 <= nID && nID <= ID_LINKS_BANKING_5)
00375   {
00376     pBar = &m_wndLinksBars [1];
00377   }
00378   else if(ID_LINKS_BILLS_1 <= nID && nID <= ID_LINKS_BILLS_5)
00379   {
00380     pBar = &m_wndLinksBars [2];
00381   }
00382   else if(ID_LINKS_REPORTS_1 <= nID && nID <= ID_LINKS_REPORTS_3)
00383   {
00384     pBar = &m_wndLinksBars [3];
00385   }
00386   else if(ID_LINKS_BUDGET_1 <= nID && nID <= ID_LINKS_BUDGET_2)
00387   {
00388     pBar = &m_wndLinksBars [4];
00389   }
00390   else if(ID_LINKS_INVESTING_1 <= nID && nID <= ID_LINKS_INVESTING_7)
00391   {
00392     pBar = &m_wndLinksBars [5];
00393   }
00394   else if(ID_LINKS_PLANNING_1 <= nID && nID <= ID_LINKS_PLANNING_6)
00395   {
00396     pBar = &m_wndLinksBars [6];
00397   }
00398   else if(ID_LINKS_TAXES_1 <= nID && nID <= ID_LINKS_TAXES_5)
00399   {
00400     pBar = &m_wndLinksBars [7];
00401   }
00402   else
00403   {
00404     ASSERT (FALSE);
00405   }
00406
00407   return pBar;
00408 }
00409
00410 void CMainFrame::OnLinks(UINT nID)
00411 {
00412   CMSMLinksBar* pBar = GetLinksBar (nID);
00413
00414   if (pBar != NULL)
00415   {
00416     pBar->SetCurrentCommand (nID);
00417   }
00418 }
00419
00420 void CMainFrame::OnUpdateLinks(CCmdUI* pCmdUI)
00421 {
00422   CMSMLinksBar* pBar = GetLinksBar (pCmdUI->m_nID);
00423
00424   if (pBar != NULL)
00425   {
00426     pCmdUI->SetCheck (pCmdUI->m_nID == pBar->GetCurrentCommand ());
00427   }
00428
00429   pCmdUI->Enable (TRUE);
00430 }
00431
00432 void CMainFrame::OnUpdateBackward1(CCmdUI* pCmdUI)
00433 {
00434   pCmdUI->Enable (TRUE);
00435 }
00436
00437 void CMainFrame::OnUpdateBackward2(CCmdUI* pCmdUI)
00438 {
00439   pCmdUI->Enable (TRUE);
00440 }
00441
00442 void CMainFrame::OnUpdateForward1(CCmdUI* pCmdUI)
00443 {
00444   pCmdUI->Enable (TRUE);
00445 }
00446
00447 void CMainFrame::OnUpdateForward2(CCmdUI* pCmdUI)
00448 {
00449   pCmdUI->Enable (TRUE);
00450 }
00451
00452 void CMainFrame::OnUpdateCustomize(CCmdUI* pCmdUI)
00453 {
00454   pCmdUI->Enable (TRUE);
00455 }
00456
00457 void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
00458 {
00459   CFrameWnd::OnGetMinMaxInfo(lpMMI);
00460
00461   if(m_wndCategoryBar.GetSafeHwnd () != NULL)
00462   {
00463     CRect rtRect (CPoint (0, 0), m_wndCategoryBar.CalcSize (FALSE));
00464
00465     rtRect.bottom = 200;
00466
00467     CalcWindowRect (rtRect, CWnd::adjustBorder);
00468
00469     lpMMI->ptMinTrackSize.x = rtRect.Width ();
00470     lpMMI->ptMinTrackSize.y = rtRect.Height ();
00471   }
00472 }
00473
00474 void CMainFrame::OnHelpMicrosoft()
00475 {
00476   ::ShellExecute (NULL, NULL, _T("http://msdn2.microsoft.com/en-us/visualc/default.aspx"), NULL, NULL, NULL);
00477 }
00478
00479 void CMainFrame::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
00480 {
00481   CFrameWnd::OnSettingChange(uFlags, lpszSection);
00482
00483   if (m_wndCaptionBar.GetSafeHwnd () != NULL &&
00484     afxGlobalData.fontRegular.GetSafeHandle () != NULL)
00485   {
00486     LOGFONT lf;
00487     ZeroMemory (&lf, sizeof (LOGFONT));
00488     afxGlobalData.fontRegular.GetLogFont (&lf);
00489
00490     m_wndCaptionBar.SetCaptionFont (lf);
00491   }
00492
00493   CRect rt;
00494   GetClientRect (rt);
00495
00496   SetupMemoryBitmapSize (rt.Size ());
00497 }
00498
00499 void CMainFrame::SetupMemoryBitmapSize (const CSize& sz)
00500 {
00501   CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
00502     CMFCVisualManager::GetInstance ());
00503
00504   if (pManager != NULL)
00505   {
00506     CRect rtRes (0, 0, sz.cx, 0);
00507
00508     CRect rt;
00509
00510     CPane* bars[4] =
00511       {&m_wndCaptionBar, &m_wndMenuBar, &m_wndToolBar, &m_wndCategoryBar};
00512
00513     for (long i = 0; i < 4; i++)
00514     {
00515       CPane* pBar = bars [i];
00516
00517       if (pBar != NULL && pBar->GetSafeHwnd () != NULL)
00518       {
00519         pBar->GetWindowRect (rt);
00520         rtRes.bottom += rt.Height ();
00521       }
00522     }
00523
00524     CDC* pDC = GetDC ();
00525
00526     pManager->SetupMemoryBitmapSize (pDC, rtRes.Size ());
00527
00528     ReleaseDC (pDC);
00529   }
00530 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/options.h Source File

  • vc2008fp
  • WordPad

options.h

Go to the documentation of this file.
00001 //
00002 // options.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 class CUnit
00015 {
00016 public:
00017   int m_nTPU;
00018   int m_nSmallDiv;    // small divisions - small line displayed
00019   int m_nMediumDiv;   // medium divisions - large line displayed
00020   int m_nLargeDiv;    // large divisions - numbers displayed
00021   int m_nMinMove;     // minimum tracking movements
00022   UINT m_nAbbrevID;
00023   BOOL m_bSpaceAbbrev; // put space before abbreviation
00024   CString m_strAbbrev;// cm, pt, pi, ", in, inch, inches
00025
00026   CUnit() {}
00027   CUnit(int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv,
00028     int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev);
00029   const CUnit& operator=(const CUnit& unit);
00030 };
00031
00032 class CDocOptions
00033 {
00034 public:
00035   CDocOptions(int nDefWrap) {m_nDefWrap = nDefWrap;}
00036   CDockState m_ds1;
00037   CDockState m_ds2;
00038   int m_nWordWrap;
00039   int m_nDefWrap;
00040   void SaveOptions(LPCTSTR lpsz);
00041   void LoadOptions(LPCTSTR lpsz);
00042   void SaveDockState(CDockState& ds, LPCTSTR lpszProfileName,
00043     LPCTSTR lpszLayout);
00044   void LoadDockState(CDockState& ds, LPCTSTR lpszProfileName,
00045     LPCTSTR lpszLayout);
00046   CDockState& GetDockState(BOOL bPrimary) {return (bPrimary) ? m_ds1 : m_ds2;}
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonMDI/RibbonMDIDemoDoc.h Source File

  • vc2008fp
  • RibbonMDI

RibbonMDIDemoDoc.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 class CRibbonMDIDemoDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CRibbonMDIDemoDoc();
00018   DECLARE_DYNCREATE(CRibbonMDIDemoDoc)
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual BOOL OnNewDocument();
00029   virtual void Serialize(CArchive& ar);
00030
00031 // Implementation
00032 public:
00033   virtual ~CRibbonMDIDemoDoc();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:
00040   afx_msg void OnFileClose();
00041
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVList.h Source File

  • general
  • DBVList

DBVList.h

Go to the documentation of this file.
00001 // DBVList.h : main header file for the DBVLIST application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_DBVLIST_H__13CCB743_ED59_11D0_8286_00C04FD73634__INCLUDED_)
00013 #define AFX_DBVLIST_H__13CCB743_ED59_11D0_8286_00C04FD73634__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 #ifndef __AFXWIN_H__
00020   #error include 'stdafx.h' before including this file for PCH
00021 #endif
00022
00023 #include "resource.h"       // main symbols
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CDBVListApp:
00027 // See DBVList.cpp for the implementation of this class
00028 //
00029
00030 class CDBVListApp : public CWinApp
00031 {
00032 public:
00033   CDBVListApp();
00034
00035 // Overrides
00036   // ClassWizard generated virtual function overrides
00037   //{{AFX_VIRTUAL(CDBVListApp)
00038   public:
00039   virtual BOOL InitInstance();
00040   //}}AFX_VIRTUAL
00041
00042 // Implementation
00043
00044   //{{AFX_MSG(CDBVListApp)
00045   afx_msg void OnAppAbout();
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052
00053 //{{AFX_INSERT_LOCATION}}
00054 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00055
00056 #endif // !defined(AFX_DBVLIST_H__13CCB743_ED59_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface24.cpp Source File

  • general
  • MMXSwarm

SSE2Surface24.cpp

Go to the documentation of this file.
00001 // SSE2Surface24.cpp : implementation of the CSSE2Surface24Intrinsic
00002 // class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012 //
00013 #include "stdafx.h"
00014 #include "SSE2Surface.h"
00015 #include "SSE2Wrapper.h"
00016
00017 typedef CSSE2Unsigned16Saturated CSSE2;
00018
00019 // Optimized for a 4-pixel processing 24 bit buffer
00020 void CSSE2Surface24Intrinsic::AdjustWidth(int *pWidth)
00021 {
00022   ASSERT(pWidth != NULL);
00023   ASSERT(m_kDeltaX <= 15);
00024
00025   // need to align/round-up to 256-bits/32-bytes
00026   // since we process 32 bit chunks.
00027
00028   // Also need to make sure the pitch is 16 byte aligned.
00029   // so that each line starts on an aligned boundary.
00030
00031   // Since a pixel is 3 bytes wide, this unfortunately means
00032   // making it 48 byte aligned, or 48/3 pixels, or round up to
00033   // the nearest 16.
00034   *pWidth = (*pWidth+15-m_kDeltaX)& ~0xF;
00035 }
00036
00037 void CSSE2Surface24Intrinsic::OnCreated()
00038 {
00039   ASSERT(GetBitDepth() == 24);
00040   ASSERT((GetPitch() & 0xF) == 0);
00041   ASSERT(GetVisibleWidth() && GetVisibleHeight());
00042   ASSERT(sizeof(RGBTRIPLE) == 3);
00043
00044   int width = GetVisibleWidth();
00045     m_qwpl  = GetPitch()/8; // qwords Per Line
00046     m_width = (width*3+15)/16;// (+7/8) // m_qwpl/2 without processing off-screen bits;
00047   m_delta = m_qwpl - m_width*2;
00048 }
00049
00050 void CSSE2Surface24Intrinsic::BlurBits()
00051 {
00052     int height = GetVisibleHeight();
00053     ULONGLONG *pCur  = (ULONGLONG*)GetPixelAddress(0,0);
00054
00055   CSSE2 cFader;
00056   CSSE2 cRight, cLeft;
00057   CSSE2 cUp, cDown, cCur;
00058   CSSE2 cResult;
00059
00060   cFader.UnpackBytesLo( 0x0101010101010101u );
00061   cLeft.Clear();
00062
00063   do {
00064     int width = m_width;
00065     do {
00066       BYTE *bpCur = (BYTE *)pCur;
00067       // Load pixels and do the mmx unpack
00068       cCur.UnpackBytesLo( pCur[0] );
00069       // treating non-aligned data as dwords isn't generally a good idea
00070       cRight.UnpackBytesLo( *(ULONGLONG *)(bpCur+3) );
00071       cUp.UnpackBytesLo( pCur[-m_qwpl] );
00072       cDown.UnpackBytesLo( pCur[m_qwpl] );
00073
00074       // Sum the 4 around and double the middle
00075       // Do current pixel in this line
00076       cResult = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;
00077
00078       cLeft.UnpackBytesLo( *(ULONGLONG *)(bpCur+5) );
00079       pCur++;
00080       bpCur = (BYTE *)pCur;
00081       cCur.UnpackBytesLo( pCur[0] );
00082       cRight.UnpackBytesLo( *(ULONGLONG *)(bpCur+3) );
00083       cUp.UnpackBytesLo( pCur[-m_qwpl] );
00084       cDown.UnpackBytesLo( pCur[m_qwpl] );
00085       cCur = (cDown+cUp+cLeft+cRight+(cCur<<2))>>3;
00086
00087 #if defined(TRIPPY)
00088       cCur += cFader; // increase the fade to white
00089       cResult += cFader; // increase the fade to white
00090 #elif defined (FAST_FADE)
00091       cCur -= cFader; // increase the fade to white
00092       cResult -= cFader; // increase the fade to white
00093 #endif
00094       // Reset the left before we write anything out.
00095       // treating non-aligned data as dwords isn't generally a good idea
00096       cLeft.UnpackBytesLo( *(ULONGLONG *)(bpCur+5) );
00097       cResult.PackBytes(pCur-1, cCur);
00098       pCur++;
00099     } while (--width > 0);
00100     pCur += m_delta;
00101   } while (--height > 0);
00102 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapps.cpp Source File

  • general
  • snapvw

snapps.cpp

Go to the documentation of this file.
00001 // SnapPs.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "SnapVw.h"
00013 #include "SnapPs.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CSnapPropertySheet
00023
00024 IMPLEMENT_DYNAMIC(CSnapPropertySheet, CPropertySheet)
00025
00026 CSnapPropertySheet::CSnapPropertySheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00027   :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00028 {
00029 }
00030
00031 CSnapPropertySheet::CSnapPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00032   :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00033 {
00034 }
00035
00036 CSnapPropertySheet::~CSnapPropertySheet()
00037 {
00038 }
00039
00040
00041 BEGIN_MESSAGE_MAP(CSnapPropertySheet, CPropertySheet)
00042   //{{AFX_MSG_MAP(CSnapPropertySheet)
00043     // NOTE - the ClassWizard will add and remove mapping macros here.
00044   //}}AFX_MSG_MAP
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CSnapPropertySheet message handlers
00049
00050 BOOL CSnapPropertySheet::PreTranslateMessage(MSG* pMsg)
00051 {
00052   // since CPropertySheet::PreTranslateMessage will eat frame window
00053   // accelerators, we call all frame windows' PreTranslateMessage first.
00054   CFrameWnd* pFrameWnd = GetParentFrame();   // start with first parent frame
00055   while (pFrameWnd != NULL)
00056   {
00057     // allow owner & frames to translate before IsDialogMessage does
00058     if (pFrameWnd->PreTranslateMessage(pMsg))
00059       return TRUE;
00060
00061     // try parent frames until there are no parent frames
00062     pFrameWnd = pFrameWnd->GetParentFrame();
00063   }
00064
00065   // otherwise, just let the sheet translate the message
00066   return CPropertySheet::PreTranslateMessage(pMsg);
00067 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMapStringToStringView Member List

This is the complete list of members for CMapStringToStringView, including all inherited members.
AddMapEntryToListBox(CString &strKey, CString &strValue) | CMapStringToStringView | [protected]
CMapStringToStringView() | CMapStringToStringView |
DoDataExchange(CDataExchange *pDX) | CMapStringToStringView | [protected, virtual]
FindKeyInListBox(CString &strKey) | CMapStringToStringView | [protected]
GetDocument() | CMapStringToStringView | [inline]
IDD enum value | CMapStringToStringView |
m_ctlList | CMapStringToStringView |
m_strKey | CMapStringToStringView |
m_strValue | CMapStringToStringView |
OnAddOrUpdate() | CMapStringToStringView | [protected]
OnFind() | CMapStringToStringView | [protected]
OnInitialUpdate() | CMapStringToStringView |
OnRemove() | CMapStringToStringView | [protected]
OnRemoveAll() | CMapStringToStringView | [protected]
OnSelChangeList() | CMapStringToStringView | [protected]
~CMapStringToStringView() | CMapStringToStringView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/MainFrm.cpp Source File

  • vc2008fp
  • SetPaneSize

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "SetPaneSize.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   ON_WM_CREATE()
00030   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00031   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00032   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00033   ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace)
00034   ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, OnUpdateViewWorkspace)
00035   ON_COMMAND(ID_VIEW_DLGBAR, OnViewDialogBar)
00036   ON_UPDATE_COMMAND_UI(ID_VIEW_DLGBAR, OnUpdateViewDialogBar)
00037 END_MESSAGE_MAP()
00038
00039 static UINT indicators[] =
00040 {
00041   ID_SEPARATOR,           // status line indicator
00042   ID_INDICATOR_CAPS,
00043   ID_INDICATOR_NUM,
00044   ID_INDICATOR_SCRL,
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CMainFrame construction/destruction
00049
00050 CMainFrame::CMainFrame()
00051 {
00052   // TODO: add member initialization code here
00053
00054 }
00055
00056 CMainFrame::~CMainFrame()
00057 {
00058 }
00059
00060 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00061 {
00062   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00063     return -1;
00064
00065   // enable Office XP look:
00066   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerVS2005));
00067
00068   CMFCToolBar::EnableQuickCustomization ();
00069
00070   // TODO: Define your own basic commands. Be sure, that each pulldown
00071   // menu have at least one basic command.
00072
00073   CList<UINT, UINT> lstBasicCommands;
00074
00075   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00076   lstBasicCommands.AddTail (ID_FILE_NEW);
00077   lstBasicCommands.AddTail (ID_FILE_OPEN);
00078   lstBasicCommands.AddTail (ID_FILE_SAVE);
00079   lstBasicCommands.AddTail (ID_FILE_PRINT);
00080   lstBasicCommands.AddTail (ID_APP_EXIT);
00081   lstBasicCommands.AddTail (ID_EDIT_CUT);
00082   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00083   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00084   lstBasicCommands.AddTail (ID_APP_ABOUT);
00085   lstBasicCommands.AddTail (ID_VIEW_TOOLBAR);
00086   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00087
00088   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00089
00090   if (!m_wndMenuBar.Create (this))
00091   {
00092     TRACE0("Failed to create menubar\n");
00093     return -1;      // fail to create
00094   }
00095
00096   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00097
00098   // Detect color depth. 256 color toolbars can be used in the
00099   // high or true color modes only (bits per pixel is > 8):
00100   CClientDC dc (this);
00101   BOOL bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 8;
00102
00103   UINT uiToolbarHotID = bIsHighColor ? IDB_TOOLBAR256 : 0;
00104
00105   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00106     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00107     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, 0, 0, FALSE, 0, 0, uiToolbarHotID))
00108   {
00109     TRACE0("Failed to create toolbar\n");
00110     return -1;      // fail to create
00111   }
00112   if (!m_wndStatusBar.Create(this) ||
00113     !m_wndStatusBar.SetIndicators(indicators,
00114       sizeof(indicators)/sizeof(UINT)))
00115   {
00116     TRACE0("Failed to create status bar\n");
00117     return -1;      // fail to create
00118   }
00119
00120   CImageList imagesWorkspace;
00121   imagesWorkspace.Create (IDB_WORKSPACE, 16, 0, RGB (255, 0, 255));
00122
00123   if (!m_wndWorkSpace.Create (_T("View  1"), this, CRect (0, 0, 200, 200),
00124     TRUE, ID_VIEW_WORKSPACE,
00125     WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
00126   {
00127     TRACE0("Failed to create Workspace bar\n");
00128     return FALSE;      // fail to create
00129   }
00130
00131   m_wndWorkSpace.SetIcon (imagesWorkspace.ExtractIcon (0), FALSE);
00132
00133   if (!m_wndDlgBar.Create (_T("DialogBar"), this, TRUE,
00134                MAKEINTRESOURCE (IDD_DLG_BAR),
00135                WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI,
00136                ID_VIEW_DLGBAR))
00137   {
00138     TRACE0("Failed to create Dialog Bar\n");
00139     return FALSE;      // fail to create
00140   }
00141
00142   m_wndDlgBar.SetIcon (imagesWorkspace.ExtractIcon (1), FALSE);
00143
00144   BOOL bValidString;
00145   CString strMainToolbarTitle;
00146   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00147   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00148   // TODO: Delete these three lines if you don't want the toolbar to
00149   //  be dockable
00150   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00151   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00152   m_wndWorkSpace.EnableDocking(CBRS_ALIGN_ANY);
00153   m_wndDlgBar.EnableDocking(CBRS_ALIGN_ANY);
00154   EnableDocking(CBRS_ALIGN_ANY);
00155   EnableAutoHidePanes(CBRS_ALIGN_ANY);
00156   DockPane(&m_wndMenuBar);
00157   DockPane(&m_wndToolBar);
00158   DockPane (&m_wndWorkSpace);
00159   m_wndDlgBar.DockToWindow (&m_wndWorkSpace, CBRS_ALIGN_BOTTOM);
00160
00161   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00162   return 0;
00163 }
00164
00165 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00166 {
00167   if( !CFrameWnd::PreCreateWindow(cs) )
00168     return FALSE;
00169   // TODO: Modify the Window class or styles here by modifying
00170   //  the CREATESTRUCT cs
00171
00172   return TRUE;
00173 }
00174
00175 /////////////////////////////////////////////////////////////////////////////
00176 // CMainFrame diagnostics
00177
00178 #ifdef _DEBUG
00179 void CMainFrame::AssertValid() const
00180 {
00181   CFrameWnd::AssertValid();
00182 }
00183
00184 void CMainFrame::Dump(CDumpContext& dc) const
00185 {
00186   CFrameWnd::Dump(dc);
00187 }
00188
00189 #endif //_DEBUG
00190
00191 /////////////////////////////////////////////////////////////////////////////
00192 // CMainFrame message handlers
00193
00194
00195 void CMainFrame::OnViewCustomize()
00196 {
00197   //------------------------------------
00198   // Create a customize toolbars dialog:
00199   //------------------------------------
00200   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00201     TRUE /* Automatic menus scaning */
00202     );
00203
00204   pDlgCust->Create ();
00205 }
00206
00207 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00208 {
00209   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00210
00211   CMenu menu;
00212   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00213
00214   CMenu* pPopup = menu.GetSubMenu(0);
00215   ASSERT(pPopup != NULL);
00216
00217   if (pPopup)
00218   {
00219     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00220     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00221   }
00222
00223   return 0;
00224 }
00225
00226 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00227 {
00228   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00229   //
00230   // UINT uiToolBarId = (UINT) wp;
00231   // if (uiToolBarId == IDR_MAINFRAME)
00232   // {
00233   //    do something with m_wndToolBar
00234   // }
00235
00236   return 0;
00237 }
00238
00239 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00240 {
00241   //---------------------------------------------------------
00242   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00243   //---------------------------------------------------------
00244   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00245
00246   if (pMenuPopup != NULL &&
00247     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00248   {
00249     if (CMFCToolBar::IsCustomizeMode ())
00250     {
00251       //----------------------------------------------------
00252       // Don't show toolbars list in the cuztomization mode!
00253       //----------------------------------------------------
00254       return FALSE;
00255     }
00256
00257     pMenuPopup->RemoveAllItems ();
00258
00259     CMenu menu;
00260     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00261
00262     CMenu* pPopup = menu.GetSubMenu(0);
00263     ASSERT(pPopup != NULL);
00264
00265     if (pPopup)
00266     {
00267       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00268     }
00269   }
00270
00271   return TRUE;
00272 }
00273
00274 void CMainFrame::OnViewWorkspace()
00275 {
00276   ShowPane (&m_wndWorkSpace,
00277           !(m_wndWorkSpace.IsVisible ()),
00278           FALSE, TRUE);
00279   RecalcLayout ();
00280 }
00281
00282 void CMainFrame::OnUpdateViewWorkspace(CCmdUI* pCmdUI)
00283 {
00284   pCmdUI->SetCheck (m_wndWorkSpace.IsVisible ());
00285 }
00286
00287 void CMainFrame::OnViewDialogBar()
00288 {
00289   ShowPane (&m_wndDlgBar,
00290           !(m_wndDlgBar.IsVisible ()),
00291           FALSE, TRUE);
00292   RecalcLayout ();
00293 }
00294
00295 void CMainFrame::OnUpdateViewDialogBar(CCmdUI* pCmdUI)
00296 {
00297   pCmdUI->SetCheck (m_wndDlgBar.IsVisible ());
00298 }
00299
00300 BOOL CMainFrame::FindInternalDivider (CDockablePane* pBar,
00301                    CPaneContainer*& pContainer,
00302                    CPaneDivider*& pDivider,
00303                    BOOL& bLeftBar,
00304                    BOOL& bAloneInContainer)
00305 {
00306   pContainer = NULL;
00307   pDivider = NULL;
00308   bLeftBar = FALSE;
00309   bAloneInContainer = FALSE;
00310
00311   CPaneDivider* pDefaultPaneDivider = pBar->GetDefaultPaneDivider ();
00312   CMultiPaneFrameWnd* pParentMiniFrame =
00313     DYNAMIC_DOWNCAST (CMultiPaneFrameWnd, pBar->GetParentMiniFrame ()) ;
00314
00315   CPaneContainer* pStartContainer = NULL;
00316
00317   if (pParentMiniFrame != NULL)
00318   {
00319     CPaneContainerManager& manager = pParentMiniFrame->GetPaneContainerManager ();
00320     pStartContainer = manager.FindPaneContainer (pBar, bLeftBar);
00321   }
00322   else if (pDefaultPaneDivider != NULL)
00323   {
00324     pStartContainer = pDefaultPaneDivider->FindPaneContainer (pBar, bLeftBar);
00325   }
00326   else
00327   {
00328     return FALSE;
00329   }
00330
00331   if (pStartContainer != NULL)
00332   {
00333     pContainer = pStartContainer;
00334
00335     while (pContainer != NULL)
00336     {
00337       if (!pContainer->IsRightPartEmpty (TRUE) &&
00338         !pContainer->IsLeftPartEmpty (TRUE))
00339       {
00340         break;
00341       }
00342       pContainer = pContainer->GetParentPaneContainer ();
00343     }
00344
00345     if (pContainer == NULL)
00346     {
00347       bAloneInContainer = TRUE;
00348       return FALSE;
00349     }
00350     else
00351     {
00352       pDivider = (CPaneDivider*) pContainer->GetPaneDivider ();
00353
00354       bLeftBar = (pContainer->IsLeftPane (pBar) ||
00355             pContainer->GetLeftPaneContainer () != NULL &&
00356             ((CPaneContainer*)pContainer->GetLeftPaneContainer ())->
00357             FindSubPaneContainer (pBar, CPaneContainer::BC_FIND_BY_LEFT_BAR) != NULL);
00358       return TRUE;
00359     }
00360   }
00361   return FALSE;
00362 }
00363
00364 void CMainFrame::SetDlgBarSizeInContainer (UINT nSize)
00365 {
00366   BOOL bLeftBar = FALSE;
00367   BOOL bAloneInContainer = FALSE;
00368   CPaneContainer* pContainer = NULL;
00369   CPaneDivider* pDivider = NULL;
00370
00371   BOOL bResult = FindInternalDivider (&m_wndDlgBar, pContainer, pDivider, bLeftBar, bAloneInContainer);
00372
00373   if (bAloneInContainer)
00374   {
00375     MessageBox (_T ("DialogBar is docked alone in container."));
00376     return;
00377   }
00378   if (!bResult || pContainer == NULL || pDivider == NULL)
00379   {
00380     AfxMessageBox (_T ("The DialogBar is not docked."));
00381     return;
00382   }
00383
00384
00385   CRect rectContainer;
00386   pContainer->GetWindowRect (rectContainer, FALSE);
00387
00388   CRect rectDlgBar;
00389   m_wndDlgBar.GetWindowRect (rectDlgBar);
00390
00391   CPoint ptOffset (0, 0);
00392   if (pDivider->IsHorizontal ())
00393   {
00394     ptOffset.y = rectDlgBar.Height () - rectContainer.Height () * nSize / 100;
00395     if (bLeftBar)
00396     {
00397       ptOffset.y = -ptOffset.y;
00398     }
00399   }
00400   else
00401   {
00402     ptOffset.x = rectDlgBar.Width () - rectContainer.Width () * nSize / 100;
00403     if (bLeftBar)
00404     {
00405       ptOffset.x = -ptOffset.x;
00406     }
00407   }
00408
00409   pDivider->Move (ptOffset);
00410 }
00411 void CMainFrame::SetDlgBarHeightInPixels (UINT nHeight)
00412 {
00413   BOOL bLeftBar = FALSE;
00414   BOOL bAloneInContainer = FALSE;
00415   CPaneContainer* pContainer = NULL;
00416   CPaneDivider* pDivider = NULL;
00417
00418   BOOL bResult = FindInternalDivider (&m_wndDlgBar, pContainer, pDivider, bLeftBar, bAloneInContainer);
00419
00420   if (bAloneInContainer)
00421   {
00422     MessageBox (_T ("DialogBar is docked alone in container."));
00423     return;
00424   }
00425   if (!bResult || pContainer == NULL || pDivider == NULL)
00426   {
00427     AfxMessageBox (_T ("The DialogBar is not docked."));
00428     return;
00429   }
00430
00431   if (!pDivider->IsHorizontal ())
00432   {
00433     MessageBox (_T ("Internal pane divider is vertical, can change width only."));
00434     return;
00435   }
00436
00437   CPaneContainer* pRootContainer = m_wndDlgBar.GetDefaultPaneDivider ()->FindPaneContainer (&m_wndDlgBar, bLeftBar);
00438
00439   while (pRootContainer->GetParentPaneContainer () != NULL)
00440   {
00441     pRootContainer = pRootContainer->GetParentPaneContainer ();
00442   }
00443
00444   CRect rectContainer;
00445   pRootContainer->GetWindowRect (rectContainer, FALSE);
00446
00447   if ((UINT)rectContainer.Height () - 4 < nHeight)
00448   {
00449     CString strFormat = _T ("Required height exceeds allowed height in the current container.\nAllowed height is %u pixels.");
00450     CString strMessage;
00451     strMessage.Format (strFormat, rectContainer.Height () - 4);
00452     MessageBox (strMessage);
00453     return;
00454   }
00455
00456
00457   CRect rectDlgBar;
00458   m_wndDlgBar.GetWindowRect (rectDlgBar);
00459
00460   CPoint ptOffset (0, 0);
00461   ptOffset.y = rectDlgBar.Height () - nHeight;
00462   if (bLeftBar)
00463   {
00464     ptOffset.y = -ptOffset.y;
00465   }
00466   pDivider->Move (ptOffset);
00467 }
00468
00469 void CMainFrame::SetDlgBarWidthInPixels (UINT nWidth)
00470 {
00471
00472   BOOL bLeftBar = FALSE;
00473   BOOL bAloneInContainer = FALSE;
00474   CPaneContainer* pContainer = NULL;
00475   CPaneDivider* pDivider = NULL;
00476
00477   BOOL bResult = FindInternalDivider (&m_wndDlgBar, pContainer, pDivider, bLeftBar, bAloneInContainer);
00478
00479   if (bAloneInContainer)
00480   {
00481     MessageBox (_T ("DialogBar is docked alone in container."));
00482     return;
00483   }
00484   if (!bResult || pContainer == NULL || pDivider == NULL)
00485   {
00486     AfxMessageBox (_T ("The DialogBar is not docked."));
00487     return;
00488   }
00489
00490   if (pDivider->IsHorizontal ())
00491   {
00492     MessageBox (_T ("Internal pane divider is horizontal, can change height only."));
00493     return;
00494   }
00495
00496   CPaneContainer* pRootContainer = m_wndDlgBar.GetDefaultPaneDivider ()->FindPaneContainer (&m_wndDlgBar, bLeftBar);
00497
00498   while (pRootContainer->GetParentPaneContainer () != NULL)
00499   {
00500     pRootContainer = pRootContainer->GetParentPaneContainer ();
00501   }
00502
00503   CRect rectContainer;
00504   pRootContainer->GetWindowRect (rectContainer, FALSE);
00505
00506   if ((UINT) rectContainer.Width () - 4 < nWidth)
00507   {
00508     CString strFormat = _T ("Required width exceeds allowed width in the current container.\nAllowed width is %u pixels.");
00509     CString strMessage;
00510     strMessage.Format (strFormat, rectContainer.Width () - 4);
00511     MessageBox (strMessage);
00512     return;
00513   }
00514
00515   CRect rectDlgBar;
00516   m_wndDlgBar.GetWindowRect (rectDlgBar);
00517
00518   CPoint ptOffset (0, 0);
00519   ptOffset.x = rectDlgBar.Width () - nWidth;
00520   if (bLeftBar)
00521   {
00522     ptOffset.x = -ptOffset.x;
00523   }
00524   pDivider->Move (ptOffset);
00525 }
00526 void CMainFrame::SetContainerSize (UINT nSize)
00527 {
00528   CPaneDivider* pDefaultPaneDivider = m_wndDlgBar.GetDefaultPaneDivider ();
00529   if (pDefaultPaneDivider == NULL)
00530   {
00531     AfxMessageBox (_T ("The DialogBar is not docked."));
00532     return;
00533   }
00534
00535   BOOL bLeftBar = FALSE;
00536   CPaneContainer* pContainer = pDefaultPaneDivider->FindPaneContainer (&m_wndDlgBar, bLeftBar);
00537
00538   while (pContainer->GetParentPaneContainer () != NULL)
00539   {
00540     pContainer = pContainer->GetParentPaneContainer ();
00541   }
00542
00543   CRect rectContainer;
00544   pContainer->GetWindowRect (rectContainer, FALSE);
00545
00546   DWORD dwDividerStyle = pDefaultPaneDivider->GetCurrentAlignment ();
00547   CPoint ptOffset (0, 0);
00548   switch (dwDividerStyle)
00549   {
00550   case CBRS_ALIGN_TOP:
00551     ptOffset.y = nSize - rectContainer.Height ();
00552     break;
00553   case CBRS_ALIGN_BOTTOM:
00554     ptOffset.y = rectContainer.Height () - nSize;
00555     break;
00556   case CBRS_ALIGN_LEFT:
00557     ptOffset.x = nSize - rectContainer.Width ();
00558     break;
00559   case CBRS_ALIGN_RIGHT:
00560     ptOffset.x = rectContainer.Width () - nSize;
00561     break;
00562   }
00563   pDefaultPaneDivider->Move (ptOffset);
00564 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpiroView Member List

This is the complete list of members for CSpiroView, including all inherited members.
CreateFigure() | CSpiroView | [protected]
CSpiroView() | CSpiroView | [protected]
GetDocument() | CSpiroView | [inline]
GetWheelDistanceForFigure() const | CSpiroView | [protected]
m_bDrawingActive | CSpiroView |
m_bDrawingDone | CSpiroView |
m_bDroppingAnchor | CSpiroView |
m_bDroppingWheel | CSpiroView |
m_bMovingPencil | CSpiroView |
m_bStartDrag | CSpiroView |
m_coCurrentPen | CSpiroView |
m_dDataAnchorFirst | CSpiroView |
m_dDataWheelFirst | CSpiroView |
m_IDTimer | CSpiroView |
m_iPieceDropped | CSpiroView |
m_nCurrentPenWidth | CSpiroView |
m_nTracesPerTick | CSpiroView |
m_nZoomDenom | CSpiroView |
m_nZoomNumer | CSpiroView |
m_pAnchor | CSpiroView |
m_pBitmap | CSpiroView |
m_pBitmapDragFigure | CSpiroView | [protected]
m_pbitmapOld | CSpiroView |
m_pDCMem | CSpiroView |
m_pFigureDrag | CSpiroView | [protected]
m_pILDragFigure | CSpiroView | [protected]
m_ptHotSpotDragFigure | CSpiroView | [protected]
m_ptWheelPosFirst | CSpiroView |
m_pWheel | CSpiroView |
m_sizeBitmap | CSpiroView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CSpiroView | [protected, virtual]
OnBlack() | CSpiroView | [protected]
OnBlue() | CSpiroView | [protected]
OnCallTimerTick() | CSpiroView | [protected]
OnDraw(CDC *pDC) | CSpiroView | [virtual]
OnDrawPattern() | CSpiroView | [protected]
OnDropPiece(int *rgID, int nCount) | CSpiroView | [protected]
OnDropRing() | CSpiroView | [protected]
OnDropWheel() | CSpiroView | [protected]
OnEndDrawing() | CSpiroView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CSpiroView | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CSpiroView | [protected]
OnFast() | CSpiroView | [protected]
OnGreen() | CSpiroView | [protected]
OnInitialUpdate() | CSpiroView | [virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CSpiroView | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CSpiroView | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CSpiroView | [protected]
OnPauseDrawing() | CSpiroView | [protected]
OnPenWidth() | CSpiroView | [protected]
OnPrepareDC(CDC *pDC, CPrintInfo *pInfo=NULL) | CSpiroView | [virtual]
OnPreparePrinting(CPrintInfo *pInfo) | CSpiroView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CSpiroView | [protected, virtual]
OnPurple() | CSpiroView | [protected]
OnRed() | CSpiroView | [protected]
OnRemovePiece(CBasePiece **ppPiece) | CSpiroView | [protected]
OnRemoveRing() | CSpiroView | [protected]
OnRemoveWheel() | CSpiroView | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CSpiroView | [protected]
OnSlow() | CSpiroView | [protected]
OnTraceWidth() | CSpiroView | [protected]
OnUpdateAnyRing(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateAnyWheel(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateColor(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateDraw(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateDrawPattern(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateFast(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdatePause(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdatePauseDrawing(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdatePenWidth(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateRemoveRing(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateRemoveWheel(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateSlow(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateTimerTick(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateTraceWidth(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateZoomIn(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnUpdateZoomOut(CCmdUI *pCmdUI) | CSpiroView | [protected]
OnYellow() | CSpiroView | [protected]
OnZoomIn() | CSpiroView | [protected]
OnZoomOut() | CSpiroView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CSpiroView | [virtual]
PressButton(UINT id) | CSpiroView | [protected]
TimerCallBack(HWND hWnd, UINT nMsg, UINT_PTR nIDEvent, DWORD dwTimer) | CSpiroView | [static]
ZoomChange(int nChange) | CSpiroView | [protected]
~CSpiroView() | CSpiroView | [virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/StdAfx.cpp Source File

  • ole
  • MFCBind

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  MFCBind.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/DHtmlExplore/StdAfx.cpp Source File

  • internet
  • DHtmlExplore

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  DHtmlExplore.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
00013
00014
00015
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcie.cpp Source File

  • internet
  • MFCIE

mfcie.cpp

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // mfcie.cpp : Defines the class behaviors for the application.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "mfcie.h"
00015
00016 #include "MainFrm.h"
00017 #include "mfcieDoc.h"
00018 #include "mfcieVw.h"
00019
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CMfcieApp
00028
00029 BEGIN_MESSAGE_MAP(CMfcieApp, CWinApp)
00030   //{{AFX_MSG_MAP(CMfcieApp)
00031   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00032     // NOTE - the ClassWizard will add and remove mapping macros here.
00033     //    DO NOT EDIT what you see in these blocks of generated code!
00034   //}}AFX_MSG_MAP
00035 END_MESSAGE_MAP()
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CMfcieApp construction
00039
00040 CMfcieApp::CMfcieApp()
00041 {
00042 }
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // The one and only CMfcieApp object
00046
00047 CMfcieApp theApp;
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 // CMfcieApp initialization
00051
00052 BOOL CMfcieApp::InitInstance()
00053 {
00054   if (!AfxSocketInit())
00055   {
00056     AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
00057     return FALSE;
00058   }
00059
00060   AfxEnableControlContainer();
00061
00062   // Change the registry key under which our settings are stored.
00063   // You should modify this string to be something appropriate
00064   // such as the name of your company or organization.
00065   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00066
00067   LoadStdProfileSettings(0);  // Load standard INI file options (including MRU)
00068
00069   // Register the application's document templates.  Document templates
00070   //  serve as the connection between documents, frame windows and views.
00071
00072   CSingleDocTemplate* pDocTemplate;
00073   pDocTemplate = new CSingleDocTemplate(
00074     IDR_MAINFRAME,
00075     RUNTIME_CLASS(CMfcieDoc),
00076     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00077     RUNTIME_CLASS(CMfcieView));
00078   AddDocTemplate(pDocTemplate);
00079
00080   // Parse command line for standard shell commands, DDE, file open
00081   CCommandLineInfo cmdInfo;
00082   ParseCommandLine(cmdInfo);
00083
00084   if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileOpen)
00085   {
00086     cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;
00087   }
00088
00089   // Dispatch commands specified on the command line
00090   if (!ProcessShellCommand(cmdInfo))
00091     return FALSE;
00092
00093   // The one and only window has been initialized, so show and update it.
00094   m_pMainWnd->ShowWindow(SW_SHOW);
00095   m_pMainWnd->UpdateWindow();
00096
00097   return TRUE;
00098 }
00099
00100 /////////////////////////////////////////////////////////////////////////////
00101 // CAboutDlg dialog used for App About
00102
00103 class CAboutDlg : public CDialog
00104 {
00105 public:
00106   CAboutDlg();
00107
00108 // Dialog Data
00109   //{{AFX_DATA(CAboutDlg)
00110   enum { IDD = IDD_ABOUTBOX };
00111   //}}AFX_DATA
00112
00113   // ClassWizard generated virtual function overrides
00114   //{{AFX_VIRTUAL(CAboutDlg)
00115   protected:
00116   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00117   //}}AFX_VIRTUAL
00118
00119 // Implementation
00120 protected:
00121   //{{AFX_MSG(CAboutDlg)
00122     // No message handlers
00123   //}}AFX_MSG
00124   DECLARE_MESSAGE_MAP()
00125 };
00126
00127 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00128 {
00129   //{{AFX_DATA_INIT(CAboutDlg)
00130   //}}AFX_DATA_INIT
00131 }
00132
00133 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00134 {
00135   CDialog::DoDataExchange(pDX);
00136   //{{AFX_DATA_MAP(CAboutDlg)
00137   //}}AFX_DATA_MAP
00138 }
00139
00140 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00141   //{{AFX_MSG_MAP(CAboutDlg)
00142     // No message handlers
00143   //}}AFX_MSG_MAP
00144 END_MESSAGE_MAP()
00145
00146 // App command to run the dialog
00147 void CMfcieApp::OnAppAbout()
00148 {
00149   CAboutDlg aboutDlg;
00150   aboutDlg.DoModal();
00151 }
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 // CMfcieApp commands
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyPopupDlg Member List

This is the complete list of members for CMyPopupDlg, including all inherited members.
CMyPopupDlg() | CMyPopupDlg |
DoDataExchange(CDataExchange *pDX) | CMyPopupDlg | [protected, virtual]
IDD enum value | CMyPopupDlg |
m_btnDelete | CMyPopupDlg |
m_btnFlag | CMyPopupDlg |
m_btnRL | CMyPopupDlg |
m_fontBold | CMyPopupDlg | [protected]
m_wndFrom | CMyPopupDlg |
OnButton1() | CMyPopupDlg | [protected]
OnDelete() | CMyPopupDlg | [protected]
OnFlag() | CMyPopupDlg | [protected]
OnInitDialog() | CMyPopupDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/stdafx.h Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently, but
00003 // are changed infrequently
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #pragma once
00013
00014 #ifndef VC_EXTRALEAN
00015 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00016 #endif
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 #include <afxwin.h>         // MFC core and standard components
00021 #include <afxext.h>         // MFC extensions
00022
00023 #ifndef _AFX_NO_OLE_SUPPORT
00024 #include <afxole.h>         // MFC OLE classes
00025 #include <afxodlgs.h>       // MFC OLE dialog classes
00026 #include <afxdisp.h>        // MFC Automation classes
00027 #endif // _AFX_NO_OLE_SUPPORT
00028
00029 #ifndef _AFX_NO_DB_SUPPORT
00030 #include <afxdb.h>      // MFC ODBC database classes
00031 #endif // _AFX_NO_DB_SUPPORT
00032
00033 #ifndef _AFX_NO_DAO_SUPPORT
00034 #include <afxdao.h>     // MFC DAO database classes
00035 #endif // _AFX_NO_DAO_SUPPORT
00036
00037 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00038 #ifndef _AFX_NO_AFXCMN_SUPPORT
00039 #include <afxcmn.h>     // MFC support for Windows Common Controls
00040 #endif // _AFX_NO_AFXCMN_SUPPORT
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/InfoDlg.cpp Source File

  • general
  • SimpleImage

InfoDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010
00011 #include "stdafx.h"
00012 #include "InfoDlg.h"
00013 #include <windows.h>
00014 #include <stdlib.h>
00015 #include <stdio.h>
00016
00017 CInfoDlg::CInfoDlg(CImage &image) : CDialog(CInfoDlg::IDD)
00018 {
00019   m_pImage = &image;
00020 }
00021
00022 // override the CDialog::OnInitDialog method
00023 BOOL CInfoDlg::OnInitDialog()
00024 {
00025   CDialog::OnInitDialog();
00026
00027   CStatic* pInfo;
00028   char buffer[12];
00029
00030   // display original size
00031   int width, height;
00032   pInfo = (CStatic*) GetDlgItem(IDC_IMAGESIZE);
00033   width = m_pImage->GetWidth();
00034   height = m_pImage->GetHeight();
00035   sprintf_s(buffer, 12, "%i x %i",m_pImage->GetWidth(),m_pImage->GetHeight());
00036   pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);
00037
00038   // display bit depth
00039   pInfo = (CStatic*) GetDlgItem(IDC_BITDEPTH);
00040   sprintf_s(buffer, 12, "%i-bit",m_pImage->GetBPP());
00041   pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);
00042
00043   // display DIB section info
00044   pInfo = (CStatic*) GetDlgItem(IDC_DIBSECTION);
00045   if (m_pImage->IsDIBSection()) {
00046     sprintf_s(buffer, 12, "Yes");
00047   } else {
00048     sprintf_s(buffer, 12, "No");
00049   }
00050   pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);
00051
00052   // display indexed info
00053   pInfo = (CStatic*) GetDlgItem(IDC_INDEXED);
00054   if (m_pImage->IsIndexed()) {
00055     sprintf_s(buffer, 12, "Yes");
00056   } else {
00057     sprintf_s(buffer, 12, "No");
00058   }
00059   pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);
00060
00061   // display pitch
00062   pInfo = (CStatic*) GetDlgItem(IDC_PITCH);
00063   sprintf_s(buffer, 12, "%i bytes",m_pImage->GetPitch());
00064   pInfo->SendMessage(WM_SETTEXT,0,(LPARAM)buffer);
00065
00066   return TRUE;
00067
00068 }
00069
00070
00071 BEGIN_MESSAGE_MAP(CInfoDlg,CDialog)
00072 END_MESSAGE_MAP()
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/EmpView.cpp Source File

  • general
  • DBVList

EmpView.cpp

Go to the documentation of this file.
00001 // EmpView.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "DBVList.h"
00014 #include "DBVListSet.h"
00015 #include "DBVListDoc.h"
00016
00017 #include "EmpView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CEmpView
00027
00028 IMPLEMENT_DYNCREATE(CEmpView, CListView)
00029
00030 CEmpView::CEmpView()
00031 {
00032   m_dwDefaultStyle |= ( LVS_REPORT | LVS_OWNERDATA );
00033 }
00034
00035 CEmpView::~CEmpView()
00036 {
00037 }
00038
00039
00040 BEGIN_MESSAGE_MAP(CEmpView, CListView)
00041   //{{AFX_MSG_MAP(CEmpView)
00042     // NOTE - the ClassWizard will add and remove mapping macros here.
00043   //}}AFX_MSG_MAP
00044   ON_NOTIFY_RANGE(LVN_COLUMNCLICK,0,0xffff,OnColumnClick)
00045 END_MESSAGE_MAP()
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CEmpView diagnostics
00049
00050 #ifdef _DEBUG
00051 void CEmpView::AssertValid() const
00052 {
00053   CListView::AssertValid();
00054 }
00055
00056 void CEmpView::Dump(CDumpContext& dc) const
00057 {
00058   CListView::Dump(dc);
00059 }
00060
00061 CDBVListDoc* CEmpView::GetDocument() // non-debug version is inline
00062 {
00063   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDBVListDoc)));
00064   return (CDBVListDoc*)m_pDocument;
00065 }
00066 #endif //_DEBUG
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CEmpView message handlers
00070
00071 void CEmpView::PrepareCache(int /*iFrom*/, int /*iTo*/)
00072 {
00073 }
00074
00075 void CEmpView::GetDispInfo(LVITEM* pItem)
00076 {
00077   CDBVListSet* pSet = &GetDocument()->m_dBVListSet;
00078
00079   // called when the listview needs to display data
00080   if(pItem->mask & LVIF_TEXT)
00081   {
00082     // first, move to the appropriate row in the database
00083     pSet->MoveFirst();
00084     pSet->Move(pItem->iItem);
00085
00086     if(!pSet->IsEOF())
00087     {
00088       // then display the appropriate column
00089       switch(pItem->iSubItem)
00090       {
00091       case 0:
00092         _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Email);
00093         break;
00094       case 1:
00095         _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Name);
00096         break;
00097       case 2:
00098         _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Phone);
00099         break;
00100       case 3:
00101         _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Location);
00102         break;
00103       case 4:
00104         _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Title);
00105         break;
00106       case 5:
00107         _tcscpy_s(pItem->pszText, pItem->cchTextMax, (LPCTSTR)pSet->m_Department);
00108         break;
00109       }
00110     }
00111   }
00112 }
00113
00114 int CEmpView::FindItem(int /*iStart*/, LVFINDINFO* /*plvfi*/)
00115 {
00116   return -1;
00117 }
00118
00119 void CEmpView::UpdateFilter(CString strCurQuery)
00120 {
00121   // convenience function to set the SQL filter for the query
00122
00123   CDBVListSet* pSet = &GetDocument()->m_dBVListSet;
00124
00125   pSet->SetFilter(strCurQuery);
00126
00127   // set the item count to the new record count
00128   int nRecordCount = 0;
00129   if (pSet->IsOpen())
00130   {
00131     nRecordCount=pSet->GetRecordCount();
00132   }
00133   GetListCtrl().SetItemCountEx(nRecordCount);
00134
00135   // Invalidate the listview so it will redraw itself
00136   Invalidate();
00137 }
00138
00139 void CEmpView::OnInitialUpdate()
00140 {
00141   //initialise columns in the listview
00142
00143   CListView::OnInitialUpdate();
00144
00145   LV_COLUMN lvc;
00146
00147   lvc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH;
00148
00149   lvc.iSubItem = 0;
00150   lvc.pszText = _T("Email");
00151   lvc.cx = 75;
00152   GetListCtrl().InsertColumn(0,&lvc);
00153   lvc.iSubItem = 1;
00154   lvc.pszText = _T("Name (First, Last)");
00155   lvc.cx = 125;
00156   GetListCtrl().InsertColumn(1,&lvc);
00157   lvc.iSubItem = 2;
00158   lvc.pszText = _T("Phone");
00159   lvc.cx = 75;
00160   GetListCtrl().InsertColumn(2,&lvc);
00161   lvc.iSubItem = 3;
00162   lvc.pszText = _T("Location");
00163   lvc.cx = 75;
00164   GetListCtrl().InsertColumn(3,&lvc);
00165   lvc.iSubItem = 4;
00166   lvc.pszText = _T("Title");
00167   lvc.cx = 150;
00168   GetListCtrl().InsertColumn(4,&lvc);
00169   lvc.iSubItem = 5;
00170   lvc.pszText = _T("Dept");
00171   lvc.cx = 150;
00172   GetListCtrl().InsertColumn(5,&lvc);
00173 }
00174
00175 void CEmpView::OnColumnClick(UINT /*id*/, NMHDR* pNotifyStruct, LRESULT* /*pResult*/)
00176 {
00177   // when a column is clicked on, sort by that column
00178
00179   CDBVListSet* pSet = &GetDocument()->m_dBVListSet;
00180
00181   switch(reinterpret_cast<NMLISTVIEW*>(pNotifyStruct)->iSubItem)
00182   {
00183   case 0:
00184     pSet->SetSort(_T("[Email]"));
00185     break;
00186   case 1:
00187     pSet->SetSort(_T("[Name]"));
00188     break;
00189   case 2:
00190     pSet->SetSort(_T("[Phone]"));
00191     break;
00192   case 3:
00193     pSet->SetSort(_T("[Location]"));
00194     break;
00195   case 4:
00196     pSet->SetSort(_T("[Title]"));
00197     break;
00198   case 5:
00199     pSet->SetSort(_T("[Department]"));
00200     break;
00201   case 6:
00202     pSet->SetSort(_T("[Division]"));
00203     break;
00204   }
00205   Invalidate();
00206 }
00207
00208 BOOL CEmpView::OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
00209 {
00210   if(message == WM_NOTIFY)
00211   {
00212     NMHDR* phdr = (NMHDR*)lParam;
00213
00214     // these 3 notifications are only sent by virtual listviews
00215     switch(phdr->code)
00216     {
00217     case LVN_GETDISPINFO:
00218       {
00219         NMLVDISPINFO* pLvdi;
00220
00221         pLvdi = (NMLVDISPINFO*)lParam;
00222         GetDispInfo(&pLvdi->item);
00223       }
00224       if(pResult != NULL)
00225       {
00226         *pResult = 0;
00227       }
00228       break;
00229     case LVN_ODCACHEHINT:
00230       {
00231         NMLVCACHEHINT* pHint = (NMLVCACHEHINT*)lParam;
00232
00233         PrepareCache(pHint->iFrom, pHint->iTo);
00234       }
00235       if(pResult != NULL)
00236       {
00237         *pResult = 0;
00238       }
00239       break;
00240     case LVN_ODFINDITEM:
00241       {
00242         NMLVFINDITEM* pFindItem = (NMLVFINDITEM*)lParam;
00243         int i = FindItem(pFindItem->iStart, &pFindItem->lvfi);
00244         if(pResult != NULL)
00245         {
00246           *pResult = i;
00247         }
00248       }
00249       break;
00250     default:
00251       return CListView::OnChildNotify(message, wParam, lParam, pResult);
00252     }
00253   }
00254   else
00255     return CListView::OnChildNotify(message, wParam, lParam, pResult);
00256
00257   return TRUE;
00258 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDataObjectDlg Member List

This is the complete list of members for CDataObjectDlg, including all inherited members.
CDataObjectDlg(CWnd *pParent=NULL) | CDataObjectDlg |
DoDataExchange(CDataExchange *pDX) | CDataObjectDlg | [protected, virtual]
IDD enum value | CDataObjectDlg |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribble.cpp Source File

  • general
  • Scribble

scribble.cpp

Go to the documentation of this file.
00001 // Scribble.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "Scribble.h"
00014
00015 #include "MainFrm.h"
00016 #include "ChildFrm.h"
00017 #include "IpFrame.h"
00018 #include "ScribDoc.h"
00019 #include "ScribVw.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CScribbleApp
00029
00030 BEGIN_MESSAGE_MAP(CScribbleApp, CWinApp)
00031   //{{AFX_MSG_MAP(CScribbleApp)
00032   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00033     // NOTE - the ClassWizard will add and remove mapping macros here.
00034     //    DO NOT EDIT what you see in these blocks of generated code!
00035   //}}AFX_MSG_MAP
00036   // Standard file based document commands
00037   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00038   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00039   // Standard print setup command
00040   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00041 END_MESSAGE_MAP()
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // CScribbleApp construction
00045
00046 CScribbleApp::CScribbleApp()
00047 {
00048   // TODO: add construction code here,
00049   // Place all significant initialization in InitInstance
00050   EnableHtmlHelp();
00051 }
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // The one and only CScribbleApp object
00055
00056 CScribbleApp theApp;
00057
00058 // This identifier was generated to be statistically unique for your app.
00059 // You may change it if you prefer to choose a specific identifier.
00060
00061 // {7559FD90-9B93-11CE-B0F0-00AA006C28B3}
00062 static const CLSID clsid =
00063 { 0x7559fd90, 0x9b93, 0x11ce, { 0xb0, 0xf0, 0x0, 0xaa, 0x0, 0x6c, 0x28, 0xb3 } };
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CScribbleApp initialization
00067
00068 BOOL CScribbleApp::InitInstance()
00069 {
00070   // Initialize OLE libraries
00071   if (!AfxOleInit())
00072   {
00073     AfxMessageBox(IDP_OLE_INIT_FAILED);
00074     return FALSE;
00075   }
00076
00077   // Standard initialization
00078   // If you are not using these features and wish to reduce the size
00079   //  of your final executable, you should remove from the following
00080   //  the specific initialization routines you do not need.
00081
00082   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00083
00084
00085   // Register the application's document templates.  Document templates
00086   //  serve as the connection between documents, frame windows and views.
00087
00088   CMultiDocTemplate* pDocTemplate;
00089   pDocTemplate = new CMultiDocTemplate(
00090     IDR_SCRIBBTYPE,
00091     RUNTIME_CLASS(CScribbleDoc),
00092     RUNTIME_CLASS(CChildFrame), // custom MDI child frame
00093     RUNTIME_CLASS(CScribbleView));
00094
00095   pDocTemplate->SetServerInfo(
00096     IDR_SCRIBBTYPE_SRVR_EMB, IDR_SCRIBBTYPE_SRVR_IP,
00097     RUNTIME_CLASS(CInPlaceFrame));
00098
00099   AddDocTemplate(pDocTemplate);
00100   // Connect the COleTemplateServer to the document template.
00101   //  The COleTemplateServer creates new documents on behalf
00102   //  of requesting OLE containers by using information
00103   //  specified in the document template.
00104   m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
00105
00106   // Register all OLE server factories as running.  This enables the
00107   //  OLE libraries to create objects from other applications.
00108   COleTemplateServer::RegisterAll();
00109     // Note: MDI applications register all server objects without regard
00110     //  to the /Embedding or /Automation on the command line.
00111
00112
00113   // create main MDI Frame window
00114   CMainFrame* pMainFrame = new CMainFrame;
00115   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00116   {
00117     delete pMainFrame;
00118     return FALSE;
00119   }
00120   m_pMainWnd = pMainFrame;
00121
00122   // Enable drag/drop open.  We don't call this in Win32, since a
00123   //  document file extension wasn't chosen while running AppWizard.
00124   m_pMainWnd->DragAcceptFiles();
00125   // Parse command line for standard shell commands, DDE, file open
00126   CCommandLineInfo cmdInfo;
00127   ParseCommandLine(cmdInfo);
00128
00129   // Check to see if launched as OLE server
00130   if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
00131   {
00132     // Application was run with /Embedding or /Automation.  Don't show the
00133     //  main window in this case.
00134     return TRUE;
00135   }
00136
00137   // When a server application is launched stand-alone, it is a good idea
00138   //  to update the system registry in case it has been damaged.
00139   m_server.UpdateRegistry(OAT_INPLACE_SERVER);
00140
00141   // Dispatch commands specified on the command line
00142   if (!ProcessShellCommand(cmdInfo))
00143     return FALSE;
00144
00145
00146   // The main window has been initialized, so show and update it.
00147   pMainFrame->ShowWindow(m_nCmdShow);
00148   pMainFrame->UpdateWindow();
00149
00150   return TRUE;
00151 }
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 // CAboutDlg dialog used for App About
00155
00156 class CAboutDlg : public CDialog
00157 {
00158 public:
00159   CAboutDlg();
00160
00161 // Dialog Data
00162   //{{AFX_DATA(CAboutDlg)
00163   enum { IDD = IDD_ABOUTBOX };
00164   //}}AFX_DATA
00165
00166   // ClassWizard generated virtual function overrides
00167   //{{AFX_VIRTUAL(CAboutDlg)
00168   protected:
00169   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00170   //}}AFX_VIRTUAL
00171
00172 // Implementation
00173 protected:
00174   //{{AFX_MSG(CAboutDlg)
00175     // No message handlers
00176   //}}AFX_MSG
00177   DECLARE_MESSAGE_MAP()
00178 };
00179
00180 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00181 {
00182   //{{AFX_DATA_INIT(CAboutDlg)
00183   //}}AFX_DATA_INIT
00184 }
00185
00186 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00187 {
00188   CDialog::DoDataExchange(pDX);
00189   //{{AFX_DATA_MAP(CAboutDlg)
00190   //}}AFX_DATA_MAP
00191 }
00192
00193 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00194   //{{AFX_MSG_MAP(CAboutDlg)
00195     // No message handlers
00196   //}}AFX_MSG_MAP
00197 END_MESSAGE_MAP()
00198
00199 // App command to run the dialog
00200 void CScribbleApp::OnAppAbout()
00201 {
00202   CAboutDlg aboutDlg;
00203   aboutDlg.DoModal();
00204 }
00205
00206 /////////////////////////////////////////////////////////////////////////////
00207 // CScribbleApp commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/stdafx.cpp Source File

  • controls
  • contain

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  contain.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
00013
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBoundedNumberSubProp Member List

This is the complete list of members for CBoundedNumberSubProp, including all inherited members.
CBoundedNumberSubProp(const CString &strName, const COleVariant &varValue, int nMinValue, int nMaxValue, LPCTSTR lpszDescr=NULL) | CBoundedNumberSubProp |
m_nMaxValue | CBoundedNumberSubProp | [private]
m_nMinValue | CBoundedNumberSubProp | [private]
OnUpdateValue() | CBoundedNumberSubProp | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/StdAfx.cpp Source File

  • controls
  • IMAGE

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  stdafx.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagRECTL Member List

This is the complete list of members for tagRECTL, including all inherited members.
bottom | tagRECTL
left | tagRECTL
right | tagRECTL
top | tagRECTL
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTestView.cpp Source File

  • vc2008fp
  • RebarTest

RebarTestView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RebarTest.h"
00013
00014 #include "RebarTestDoc.h"
00015 #include "RebarTestView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #endif
00020
00021
00022 // CRebarTestView
00023
00024 IMPLEMENT_DYNCREATE(CRebarTestView, CView)
00025
00026 BEGIN_MESSAGE_MAP(CRebarTestView, CView)
00027   // Standard printing commands
00028   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00029   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00030   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00031 END_MESSAGE_MAP()
00032
00033 // CRebarTestView construction/destruction
00034
00035 CRebarTestView::CRebarTestView()
00036 {
00037   // TODO: add construction code here
00038
00039 }
00040
00041 CRebarTestView::~CRebarTestView()
00042 {
00043 }
00044
00045 BOOL CRebarTestView::PreCreateWindow(CREATESTRUCT& cs)
00046 {
00047   // TODO: Modify the Window class or styles here by modifying
00048   //  the CREATESTRUCT cs
00049
00050   return CView::PreCreateWindow(cs);
00051 }
00052
00053 // CRebarTestView drawing
00054
00055 void CRebarTestView::OnDraw(CDC* /*pDC*/)
00056 {
00057   CRebarTestDoc* pDoc;
00058   pDoc = GetDocument();
00059   ASSERT_VALID(pDoc);
00060
00061   // TODO: add draw code for native data here
00062 }
00063
00064
00065 // CRebarTestView printing
00066
00067 void CRebarTestView::OnFilePrintPreview()
00068 {
00069   AFXPrintPreview (this);
00070 }
00071
00072 BOOL CRebarTestView::OnPreparePrinting(CPrintInfo* pInfo)
00073 {
00074   // default preparation
00075   return DoPreparePrinting(pInfo);
00076 }
00077
00078 void CRebarTestView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00079 {
00080   // TODO: add extra initialization before printing
00081 }
00082
00083 void CRebarTestView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00084 {
00085   // TODO: add cleanup after printing
00086 }
00087
00088
00089 // CRebarTestView diagnostics
00090
00091 #ifdef _DEBUG
00092 void CRebarTestView::AssertValid() const
00093 {
00094   CView::AssertValid();
00095 }
00096
00097 void CRebarTestView::Dump(CDumpContext& dc) const
00098 {
00099   CView::Dump(dc);
00100 }
00101
00102 CRebarTestDoc* CRebarTestView::GetDocument() const // non-debug version is inline
00103 {
00104   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRebarTestDoc)));
00105   return (CRebarTestDoc*)m_pDocument;
00106 }
00107 #endif //_DEBUG
00108
00109
00110 // CRebarTestView message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynaMDIChildWnd Member List

This is the complete list of members for CDynaMDIChildWnd, including all inherited members.
CDynaMDIChildWnd() | CDynaMDIChildWnd | [protected]
OnMDIActivate(BOOL bActivate, CWnd *pActivateWnd, CWnd *pDeactivateWnd) | CDynaMDIChildWnd | [protected]
RefreshColorMenu() | CDynaMDIChildWnd |
~CDynaMDIChildWnd() | CDynaMDIChildWnd | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbodl.h Source File

  • ole
  • oleview
  • iviewers

tlbodl.h

Go to the documentation of this file.
00001 // tlbodl.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CTypeLibODLView view
00015
00016 class CTypeLibODLView : public CEditView
00017 {
00018 friend class CTypeLibWnd ;
00019 protected:
00020   CTypeLibODLView();           // protected constructor used by dynamic creation
00021   DECLARE_DYNCREATE(CTypeLibODLView)
00022
00023 // Attributes
00024 public:
00025   CFont   m_Font ;
00026
00027 // Operations
00028 public:
00029   HRESULT  DeCompileTypeLib( IStream* pstm, ITypeLib* ptlb, UINT uiIndent  = 0 ) ;
00030   HRESULT  DeCompileTypedef( IStream* pstm, ITypeInfo* pti, UINT uiIndent  = 0 ) ;
00031   HRESULT  DeCompileModule( IStream* pstm, ITypeInfo* pti, UINT uiIndent  = 0 ) ;
00032   HRESULT  DeCompileInterface( IStream* pstm, ITypeInfo* pti, UINT uiIndent  = 0 ) ;
00033   HRESULT  DeCompileDispinterface( IStream* pstm, ITypeInfo* pti, UINT uiIndent  = 0 ) ;
00034   HRESULT  DeCompileCoClass( IStream* pstm, ITypeInfo* pti, UINT uiIndent  = 0 ) ;
00035   HRESULT  DeCompileFunc( IStream* pstm, ITypeInfo* pti, MEMBERID memid, UINT uiIndent  = 0 ) ;
00036   HRESULT  DumpFunc( IStream* pstm, ITypeInfo* pti, TYPEATTR* pattr, MEMBERID memid, UINT uiIndent  = 0 ) ;
00037   HRESULT  DeCompileVar( IStream* pstm, ITypeInfo* pti, MEMBERID memid, UINT uiIndent  = 0 ) ;
00038   HRESULT  DumpVar( IStream* pstm, ITypeInfo* pti, TYPEATTR* pattr, MEMBERID memid, UINT uiIndent  = 0 ) ;
00039   HRESULT  DeCompileConst( IStream* pstm, ITypeInfo* pti, MEMBERID memid, UINT uiIndent  = 0, BOOL fConst = TRUE  ) ;
00040   HRESULT  DumpConst( IStream* pstm, ITypeInfo* pti, TYPEATTR* pattr, MEMBERID memid, UINT uiIndent = 0, BOOL fConst = TRUE ) ;
00041 // Overrides
00042 public:
00043   // ClassWizard generated virtual function overrides
00044   //{{AFX_VIRTUAL(CTypeLibODLView)
00045   public:
00046   virtual void OnInitialUpdate();
00047   protected:
00048   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00049   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00050   virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
00051   //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 protected:
00055   virtual ~CTypeLibODLView();
00056 #ifdef _DEBUG
00057   virtual void AssertValid() const;
00058   virtual void Dump(CDumpContext& dc) const;
00059 #endif
00060
00061   // Generated message map functions
00062 protected:
00063   //{{AFX_MSG(CTypeLibODLView)
00064   afx_msg void OnDestroy();
00065   //}}AFX_MSG
00066   DECLARE_MESSAGE_MAP()
00067 };
00068
00069 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/resource.h Source File

  • ole
  • superpad

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by superpad.rc
00004 //
00005 #define IDR_MAINFRAME                   1
00006 #define IDR_TEXTTYPE                    2
00007 #define IDR_TEXTTYPE_INPLACE            3
00008 #define IDR_TEXTTYPE_EMBEDDED           4
00009 #define IDP_OLE_INIT_FAILED             100
00010 #define IDD_PAGE_SETUP                  101
00011 #define IDC_PHYSICAL_MEM                101
00012 #define ID_MIRROR_DISPLAY_FONT          104
00013 #define IDD_SPLASH                      105
00014 #define IDC_DISK_SPACE                  107
00015 #define IDD_ABOUTBOX                    512
00016 #define IDC_HEADER                      1002
00017 #define IDC_FOOTER                      1003
00018 #define ID_CHOOSE_FONT                  1004
00019 #define IDC_EDIT_TABS                   1004
00020 #define IDC_HEADER_FILE                 1004
00021 #define ID_SET_TABSTOPS                 1005
00022 #define IDC_HEADER_SYSTEM               1005
00023 #define ID_WORD_WRAP                    1006
00024 #define IDC_FOOTER_FILE                 1006
00025 #define IDC_FOOTER_SYSTEM               1007
00026 #define IDS_DISK_SPACE_UNAVAIL          1008
00027 #define IDC_BIGICON                     1008
00028 #define IDS_DISK_SPACE                  1009
00029 #define IDD_SET_TABSTOPS                1010
00030 #define IDS_MATH_COPR_NOTPRESENT        1010
00031 #define IDS_MATH_COPR_PRESENT           1011
00032 #define IDS_PHYSICAL_MEM                1012
00033 #define IDP_ERR_GET_PRINTER_DC          4000
00034 #define IDP_ERR_GET_DEVICE_DEFAULTS     4001
00035 #define ID_PAGE_SETUP                   32769
00036 #define ID_CHOOSE_PRINT_FONT            32770
00037 #define ID_VIEW_UPDATENOW               32771
00038 #define ID_CANCEL_INPLACE               32772
00039
00040 // Next default values for new objects
00041 //
00042 #ifdef APSTUDIO_INVOKED
00043 #ifndef APSTUDIO_READONLY_SYMBOLS
00044 #define _APS_NEXT_RESOURCE_VALUE        102
00045 #define _APS_NEXT_COMMAND_VALUE         32772
00046 #define _APS_NEXT_CONTROL_VALUE         1006
00047 #define _APS_NEXT_SYMED_VALUE           106
00048 #endif
00049 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyBrowseEdit Member List

This is the complete list of members for CMyBrowseEdit, including all inherited members.
OnBrowse() CMyBrowseEdit [inline, private, virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LocalizeLib::_DLocalize Member List

This is the complete list of members for LocalizeLib::_DLocalize, including all inherited members.
AboutBox() | LocalizeLib::_DLocalize
AboutBoxInFrench() | LocalizeLib::_DLocalize
AboutBoxInGerman() | LocalizeLib::_DLocalize
id | LocalizeLib::_DLocalize
id | LocalizeLib::_DLocalize
id | LocalizeLib::_DLocalize
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/mainfrm.h Source File

  • general
  • mdidocvw

mainfrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014
00015 class CMainFrame : public CMDIFrameWnd
00016 {
00017   DECLARE_DYNAMIC(CMainFrame)
00018 public:
00019   CMainFrame();
00020
00021 // Attributes
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CMainFrame)
00030   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00031   //}}AFX_VIRTUAL
00032
00033 // Implementation
00034 public:
00035   virtual ~CMainFrame();
00036 #ifdef _DEBUG
00037   virtual void AssertValid() const;
00038   virtual void Dump(CDumpContext& dc) const;
00039 #endif
00040
00041 protected:  // control bar embedded members
00042   CStatusBar  m_wndStatusBar;
00043   CToolBar    m_wndToolBar;
00044
00045 // Generated message map functions
00046 protected:
00047   //{{AFX_MSG(CMainFrame)
00048   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSize.cpp Source File

  • vc2008fp
  • SetPaneSize

SetPaneSize.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "SetPaneSize.h"
00013
00014 #include "MainFrm.h"
00015 #include "SetPaneSizeDoc.h"
00016 #include "SetPaneSizeView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CSetPaneSizeApp
00026
00027 BEGIN_MESSAGE_MAP(CSetPaneSizeApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CSetPaneSizeApp construction
00038
00039 CSetPaneSizeApp::CSetPaneSizeApp() :
00040   CWinAppEx (TRUE /* m_bResourceSmartUpdate */)
00041 {
00042   // TODO: add construction code here,
00043   // Place all significant initialization in InitInstance
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CSetPaneSizeApp object
00048
00049 CSetPaneSizeApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CSetPaneSizeApp initialization
00053
00054 BOOL CSetPaneSizeApp::InitInstance()
00055 {
00056   // Initialize OLE libraries
00057   if (!AfxOleInit())
00058   {
00059     AfxMessageBox(IDP_OLE_INIT_FAILED);
00060     return FALSE;
00061   }
00062
00063   AfxEnableControlContainer();
00064
00065   // Standard initialization
00066   // If you are not using these features and wish to reduce the size
00067   //  of your final executable, you should remove from the following
00068   //  the specific initialization routines you do not need.
00069
00070   // Change the registry key under which our settings are stored.
00071   // TODO: You should modify this string to be something appropriate
00072   // such as the name of your company or organization.
00073   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00074
00075   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00076
00077   SetRegistryBase (_T("Settings"));
00078
00079   // Initialize all Managers for usage. They are automatically constructed
00080   // if not yet present
00081   InitContextMenuManager();
00082   InitKeyboardManager();
00083
00084   // Register the application's document templates.  Document templates
00085   //  serve as the connection between documents, frame windows and views.
00086
00087   CSingleDocTemplate* pDocTemplate;
00088   pDocTemplate = new CSingleDocTemplate(
00089     IDR_MAINFRAME,
00090     RUNTIME_CLASS(CSetPaneSizeDoc),
00091     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00092     RUNTIME_CLASS(CSetPaneSizeView));
00093   AddDocTemplate(pDocTemplate);
00094
00095   // Parse command line for standard shell commands, DDE, file open
00096   CCommandLineInfo cmdInfo;
00097   ParseCommandLine(cmdInfo);
00098
00099   // Dispatch commands specified on the command line
00100   if (!ProcessShellCommand(cmdInfo))
00101     return FALSE;
00102
00103   // The one and only window has been initialized, so show and update it.
00104   m_pMainWnd->ShowWindow(SW_SHOW);
00105   m_pMainWnd->UpdateWindow();
00106
00107   return TRUE;
00108 }
00109
00110 /////////////////////////////////////////////////////////////////////////////
00111 // CSetPaneSizeApp message handlers
00112
00113 int CSetPaneSizeApp::ExitInstance()
00114 {
00115   return CWinAppEx::ExitInstance();
00116 }
00117
00118 void CSetPaneSizeApp::PreLoadState ()
00119 {
00120
00121   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00122
00123   // TODO: add another context menus here
00124 }
00125
00126
00127 /////////////////////////////////////////////////////////////////////////////
00128 // CAboutDlg dialog used for App About
00129
00130 class CAboutDlg : public CDialog
00131 {
00132 public:
00133   CAboutDlg();
00134
00135 // Dialog Data
00136   //{{AFX_DATA(CAboutDlg)
00137   enum { IDD = IDD_ABOUTBOX };
00138   //}}AFX_DATA
00139
00140   // ClassWizard generated virtual function overrides
00141   //{{AFX_VIRTUAL(CAboutDlg)
00142   protected:
00143   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00144   //}}AFX_VIRTUAL
00145
00146 // Implementation
00147 protected:
00148   //{{AFX_MSG(CAboutDlg)
00149     // No message handlers
00150   //}}AFX_MSG
00151   DECLARE_MESSAGE_MAP()
00152 };
00153
00154 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00155 {
00156   //{{AFX_DATA_INIT(CAboutDlg)
00157   //}}AFX_DATA_INIT
00158 }
00159
00160 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00161 {
00162   CDialog::DoDataExchange(pDX);
00163   //{{AFX_DATA_MAP(CAboutDlg)
00164   //}}AFX_DATA_MAP
00165 }
00166
00167 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00168   //{{AFX_MSG_MAP(CAboutDlg)
00169     // No message handlers
00170   //}}AFX_MSG_MAP
00171 END_MESSAGE_MAP()
00172
00173 // App command to run the dialog
00174 void CSetPaneSizeApp::OnAppAbout()
00175 {
00176   CAboutDlg aboutDlg;
00177   aboutDlg.DoModal();
00178 }
00179
00180 /////////////////////////////////////////////////////////////////////////////
00181 // CSetPaneSizeApp message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/resource.h Source File

  • ole
  • oleview

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by oleview.rc
00004 //
00005 #define IDR_MAINFRAME                   2
00006 #define IDS_INIFILE                     3
00007 #define IDS_IDATAOBJECT                 3
00008 #define IDS_INI_SHOWCFI                 3
00009 #define IDS_INI_CONFIG                  4
00010 #define IDS_INI_WNDPOS                  5
00011 #define IDS_INI_SHOWCLASSIDS            6
00012 #define IDS_INI_SHOWALLINTERFACES       7
00013 #define IDS_INI_CLSCTX                  8
00014 #define IDS_INI_SHOWINTERNAL            9
00015 #define IDS_NOINFO                      10
00016 #define IDS_BADCOMMANDLINE              10
00017 #define IDS_IDISPATCH                   11
00018 #define IDS_INI_SHOWOLE1OBJECTS         11
00019 #define IDS_ITYPEINFO                   12
00020 #define IDS_INI_SHOWNOTINSERTABLE       12
00021 #define IDS_INI_SHOWCONTAINERS          13
00022 #define IDS_INI_SHOWCONTROLS            14
00023 #define IDS_INI_SHOWTYPELIBS            15
00024 #define IDS_INI_SHOWINSERTABLE          16
00025 #define IDS_REGISTRYKEY                 17
00026 #define IDS_IVIEWERSNOTFOUND1           18
00027 #define IDS_IVIEWERSNOTFOUND2           19
00028 #define IDS_IVIEWERSNOTFOUND3           20
00029 #define IDS_IVIEWERSNOTFOUND4           21
00030 #define IDS_AUTOREGFAILED               22
00031 #define IDD_ABOUTBOX                    100
00032 #define IDC_VERSION                     101
00033 #define ID_OBJECTVIEW                   101
00034 #define ID_IFACEVIEW                    102
00035 #define IDC_IFACE_PROPS                 102
00036 #define ID_TREEVIEW                     103
00037 #define IDD_IFACEDIALOG                 103
00038 #define IDC_INTERFACE                   103
00039 #define IDC_INTERFACE_ID                104
00040 #define IDC_APPNAME                     104
00041 #define IDC_COPYRIGHT                   105
00042 #define IDC_ALLRIGHTSRESERVED           106
00043 #define IDC_WRITTENBY                   107
00044 #define IDC_GROUP                       108
00045 #define IDI_OLE2                        109
00046 #define IDC_LIST1LBL                    109
00047 #define IDI_OLE2_1                      110
00048 #define IDC_OLE2LIB_LBL                 110
00049 #define IDI_NOICON                      111
00050 #define IDC_OLE2LIB                     111
00051 #define IDI_MAGNIFY                     112
00052 #define IDC_LIST1                       112
00053 #define IDI_AUTOMATION                  112
00054 #define IDC_RUNTIME_LBL                 113
00055 #define IDI_DRAGDROP                    113
00056 #define IDC_RUNTIMEVER                  114
00057 #define IDR_MAINFRAME_U                 114
00058 #define IDI_INTERFACE                   114
00059 #define IDR_MAINFRAME_A                 115
00060 #define IDC_INFO                        117
00061 #define IDD_VERSIONINFO                 118
00062 #define IDC_OBJECTNAME                  118
00063 #define IDC_OBJECTCLSID                 119
00064 #define IDR_VERSION1                    120
00065 #define IDD_REGVIEW                     122
00066 #define IDC_SELFREG                     123
00067 #define IDC_UNREGISTER                  124
00068 #define IDI_ICON1                       124
00069 #define IDC_TREEVIEW                    125
00070 #define IDC_OBJICON                     126
00071 #define IDB_IMAGELIST                   200
00072 #define IDB_QUESTION                    201
00073 #define IDB_OBJECT                      202
00074 #define IDB_OBJECT_INSERTABLE           203
00075 #define IDB_OBJECT_CONTROL              204
00076 #define IDB_AUTOMATION                  205
00077 #define IDB_CONTAINER                   206
00078 #define IDB_OBJECT_INSERTABLE10         207
00079 #define IDB_QUESTION32                  208
00080 #define IDB_OBJECT32                    209
00081 #define IDB_OBJECT_INSERTABLE32         210
00082 #define IDB_OBJECT_CONTROL32            211
00083 #define IDB_CONTAINER32                 212
00084 #define IDB_OBJECT_INSERTABLE1032       213
00085 #define IDB_OBJECTFOLDER                214
00086 #define IDB_TYPELIBFOLDER               215
00087 #define IDB_IFACEFOLDER                 216
00088 #define IDB_INTERFACE                   217
00089 #define ctlFirst                        0x0400
00090 #define psh1                            0x0400
00091 #define psh2                            0x0401
00092 #define psh3                            0x0402
00093 #define psh4                            0x0403
00094 #define psh5                            0x0404
00095 #define psh6                            0x0405
00096 #define psh7                            0x0406
00097 #define psh8                            0x0407
00098 #define psh9                            0x0408
00099 #define psh10                           0x0409
00100 #define psh11                           0x040a
00101 #define psh12                           0x040b
00102 #define psh13                           0x040c
00103 #define psh14                           0x040d
00104 #define psh15                           0x040e
00105 #define psh16                           0x040f
00106 #define chx1                            0x0410
00107 #define chx2                            0x0411
00108 #define chx3                            0x0412
00109 #define chx4                            0x0413
00110 #define chx5                            0x0414
00111 #define chx6                            0x0415
00112 #define chx7                            0x0416
00113 #define chx8                            0x0417
00114 #define chx9                            0x0418
00115 #define chx10                           0x0419
00116 #define chx11                           0x041a
00117 #define chx12                           0x041b
00118 #define chx13                           0x041c
00119 #define chx14                           0x041d
00120 #define chx15                           0x041e
00121 #define chx16                           0x041f
00122 #define rad1                            0x0420
00123 #define rad2                            0x0421
00124 #define rad3                            0x0422
00125 #define rad4                            0x0423
00126 #define rad5                            0x0424
00127 #define rad6                            0x0425
00128 #define rad7                            0x0426
00129 #define rad8                            0x0427
00130 #define rad9                            0x0428
00131 #define rad10                           0x0429
00132 #define rad11                           0x042a
00133 #define rad12                           0x042b
00134 #define rad13                           0x042c
00135 #define rad14                           0x042d
00136 #define rad15                           0x042e
00137 #define rad16                           0x042f
00138 #define grp1                            0x0430
00139 #define grp2                            0x0431
00140 #define grp3                            0x0432
00141 #define grp4                            0x0433
00142 #define frm1                            0x0434
00143 #define frm2                            0x0435
00144 #define frm3                            0x0436
00145 #define frm4                            0x0437
00146 #define rct1                            0x0438
00147 #define rct2                            0x0439
00148 #define rct3                            0x043a
00149 #define rct4                            0x043b
00150 #define ico1                            0x043c
00151 #define ico2                            0x043d
00152 #define ico3                            0x043e
00153 #define ico4                            0x043f
00154 #define stc1                            0x0440
00155 #define stc2                            0x0441
00156 #define stc3                            0x0442
00157 #define stc4                            0x0443
00158 #define stc5                            0x0444
00159 #define stc6                            0x0445
00160 #define stc7                            0x0446
00161 #define stc8                            0x0447
00162 #define stc9                            0x0448
00163 #define stc10                           0x0449
00164 #define stc11                           0x044a
00165 #define stc12                           0x044b
00166 #define stc13                           0x044c
00167 #define stc14                           0x044d
00168 #define stc15                           0x044e
00169 #define stc16                           0x044f
00170 #define stc17                           0x0450
00171 #define stc18                           0x0451
00172 #define stc19                           0x0452
00173 #define stc20                           0x0453
00174 #define stc21                           0x0454
00175 #define stc22                           0x0455
00176 #define stc23                           0x0456
00177 #define stc24                           0x0457
00178 #define stc25                           0x0458
00179 #define stc26                           0x0459
00180 #define stc27                           0x045a
00181 #define stc28                           0x045b
00182 #define stc29                           0x045c
00183 #define stc30                           0x045d
00184 #define stc31                           0x045e
00185 #define stc32                           0x045f
00186 #define lst1                            0x0460
00187 #define lst2                            0x0461
00188 #define lst3                            0x0462
00189 #define lst4                            0x0463
00190 #define lst5                            0x0464
00191 #define lst6                            0x0465
00192 #define lst7                            0x0466
00193 #define lst8                            0x0467
00194 #define lst9                            0x0468
00195 #define lst10                           0x0469
00196 #define lst11                           0x046a
00197 #define lst12                           0x046b
00198 #define lst13                           0x046c
00199 #define lst14                           0x046d
00200 #define lst15                           0x046e
00201 #define lst16                           0x046f
00202 #define cmb1                            0x0470
00203 #define cmb2                            0x0471
00204 #define cmb3                            0x0472
00205 #define cmb4                            0x0473
00206 #define cmb5                            0x0474
00207 #define cmb6                            0x0475
00208 #define cmb7                            0x0476
00209 #define cmb8                            0x0477
00210 #define cmb9                            0x0478
00211 #define cmb10                           0x0479
00212 #define cmb11                           0x047a
00213 #define cmb12                           0x047b
00214 #define cmb13                           0x047c
00215 #define cmb14                           0x047d
00216 #define cmb15                           0x047e
00217 #define cmb16                           0x047f
00218 #define edt1                            0x0480
00219 #define edt2                            0x0481
00220 #define edt3                            0x0482
00221 #define edt4                            0x0483
00222 #define edt5                            0x0484
00223 #define edt6                            0x0485
00224 #define edt7                            0x0486
00225 #define edt8                            0x0487
00226 #define edt9                            0x0488
00227 #define edt10                           0x0489
00228 #define edt11                           0x048a
00229 #define edt12                           0x048b
00230 #define edt13                           0x048c
00231 #define edt14                           0x048d
00232 #define edt15                           0x048e
00233 #define edt16                           0x048f
00234 #define scr1                            0x0490
00235 #define scr2                            0x0491
00236 #define scr3                            0x0492
00237 #define scr4                            0x0493
00238 #define scr5                            0x0494
00239 #define scr6                            0x0495
00240 #define scr7                            0x0496
00241 #define scr8                            0x0497
00242 #define ctlLast                         0x04ff
00243 #define FILEOPENORD                     1536
00244 #define MULTIFILEOPENORD                1537
00245 #define PRINTDLGORD                     1538
00246 #define PRNSETUPDLGORD                  1539
00247 #define FINDDLGORD                      1540
00248 #define REPLACEDLGORD                   1541
00249 #define FONTDLGORD                      1542
00250 #define FORMATDLGORD31                  1543
00251 #define FORMATDLGORD30                  1544
00252 #define ID_VIEW_CLASSIDS                32768
00253 #define ID_VIEW_SHOWALLINTERFACES       32769
00254 #define ID_FILE_SHOWVERSION             32770
00255 #define ID_FILE_RUNREGEDIT              32771
00256 #define ID_IFACEVIEW_IFACEVIEWER        32772
00257 #define ID_VIEW_REFRESH                 32773
00258 #define ID_IFACEVIEW_GETINTERFACES      32774
00259 #define ID_INTERFACES_USECLSCTXINPROCSERVER 32775
00260 #define ID_INTERFACES_USECLSCTXINPROCHANDLER 32776
00261 #define ID_IFACES_USEINPROCSERVER       32777
00262 #define ID_IFACES_USEINPROCHANDLER      32778
00263 #define ID_IFACES_USELOCALSERVER        32779
00264 #define ID_OBJECTS_SHOWINTERNAL         32780
00265 #define ID_FILE_VIEWTYPELIB             32781
00266 #define ID_INTERFACES_SHOWCLASSFACTORYOBJECTINTERFACES 32782
00267 #define ID_INTERFACES_SHOWCFI           32783
00268 #define ID_FILE_BINDTOAFILE             32784
00269 #define ID_VIEW_TEST                    32785
00270 #define ID_OBJECTS_SHOWOLE10OBJECTS     32786
00271 #define ID_OBJECTS_SHOWNOTINSERTABLEOBJECTS 32787
00272 #define ID_OBJECTS_SHOWCONTAINERS       32788
00273 #define ID_OBJECTS_SHOWCONTROLS         32789
00274 #define ID_OBJECTS_SHOWTYPELIBS         32790
00275 #define ID_OBJECT_VERIFY                32792
00276 #define ID_OBJECT_DELETE                32793
00277 #define ID_OBJECTS_SHOWINSERTABLE       32794
00278 #define ID_INDICATOR_CF                 0xE706
00279 #define ID_INDICATOR_UNK                0xE707
00280
00281 // Next default values for new objects
00282 //
00283 #ifdef APSTUDIO_INVOKED
00284 #ifndef APSTUDIO_READONLY_SYMBOLS
00285 #define _APS_NEXT_RESOURCE_VALUE        125
00286 #define _APS_NEXT_COMMAND_VALUE         32799
00287 #define _APS_NEXT_CONTROL_VALUE         127
00288 #define _APS_NEXT_SYMED_VALUE           105
00289 #endif
00290 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/diblook/stdafx.h Source File

  • general
  • diblook

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013 //
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>         // MFC core and standard components
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloDoc.cpp Source File

  • general
  • mdidocvw

HelloDoc.cpp

Go to the documentation of this file.
00001 // HelloDoc.cpp : implementation of the CHelloDoc class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "MDI.h"
00015
00016 #include "HelloDoc.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CHelloDoc
00026
00027 IMPLEMENT_DYNCREATE(CHelloDoc, CDocument)
00028
00029 BEGIN_MESSAGE_MAP(CHelloDoc, CDocument)
00030   //{{AFX_MSG_MAP(CHelloDoc)
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CHelloDoc construction/destruction
00036
00037 CHelloDoc::CHelloDoc()
00038 {
00039 }
00040
00041 CHelloDoc::~CHelloDoc()
00042 {
00043 }
00044
00045 BOOL CHelloDoc::OnNewDocument()
00046 {
00047   if (!CDocument::OnNewDocument())
00048     return FALSE;
00049
00050 // initialization of document's data
00051
00052   m_clrText = RGB(0, 0, 255);
00053   m_str = _T("Hello, world!");
00054
00055 // initialization of button states for each color
00056
00057   m_bBlue = 1;
00058   m_bBlack = 0;
00059   m_bGreen = 0;
00060   m_bRed = 0;
00061   m_bWhite = 0;
00062   m_bCustom = 0;
00063
00064   return TRUE;
00065 }
00066
00067 /////////////////////////////////////////////////////////////////////////////
00068 // CHelloDoc serialization
00069
00070 void CHelloDoc::Serialize(CArchive& ar)
00071 {
00072   if (ar.IsStoring())
00073   {
00074   }
00075   else
00076   {
00077   }
00078 }
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CHelloDoc diagnostics
00082
00083 #ifdef _DEBUG
00084 void CHelloDoc::AssertValid() const
00085 {
00086   CDocument::AssertValid();
00087 }
00088
00089 void CHelloDoc::Dump(CDumpContext& dc) const
00090 {
00091   CDocument::Dump(dc);
00092 }
00093 #endif //_DEBUG
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CHelloDoc commands
00097
00098 void CHelloDoc::SetStrColor(COLORREF clr)
00099 {
00100   m_clrText = clr;
00101   UpdateAllViews(NULL);
00102 }
00103
00104 void CHelloDoc::SetCustomStrColor(COLORREF clr)
00105 {
00106   m_clrText = clr;
00107   UpdateAllViews(NULL);
00108 }
00109
00110 void CHelloDoc::ClearAllColors()
00111 {
00112   m_bBlack = m_bBlue = m_bRed = 0;
00113   m_bWhite = m_bGreen = 0;
00114 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDlgToolBar Member List

This is the complete list of members for CDlgToolBar, including all inherited members.
CDlgToolBar() | CDlgToolBar |
OnIdleUpdateCmdUI(WPARAM wParam, LPARAM) | CDlgToolBar | [protected]
~CDlgToolBar() | CDlgToolBar | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLocalizeApp Member List

This is the complete list of members for CLocalizeApp, including all inherited members.
ExitInstance() | CLocalizeApp
InitInstance() | CLocalizeApp
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/StdAfx.cpp Source File

  • vc2008fp
  • DlgToolTips

StdAfx.cpp

Go to the documentation of this file.
00001 //
00002 // stdafx.cpp : source file that includes just the standard includes
00003 //  DlgToolTips.pch will be the pre-compiled header
00004 //  stdafx.obj will contain the pre-compiled type information
00005
00006 #include "stdafx.h"
00007
00008
00009
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/colorlis.h Source File

  • ole
  • wordpad

colorlis.h

Go to the documentation of this file.
00001 // colorlis.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CColorMenu window
00014
00015 class CColorMenu : public CMenu
00016 {
00017 // Construction
00018 public:
00019   CColorMenu();
00020
00021 // Attributes
00022 public:
00023   static int BASED_CODE indexMap[17];
00024   static COLORREF GetColor(UINT id);
00025
00026 // Operations
00027 public:
00028
00029 // Implementation
00030 public:
00031   virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
00032   virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
00033
00034 };
00035
00036 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFindComboButton Member List

This is the complete list of members for CFindComboButton, including all inherited members.
CFindComboButton() | CFindComboButton | [inline]
HasFocus() | CFindComboButton | [inline, static]
m_bHasFocus | CFindComboButton | [protected, static]
NotifyCommand(int iNotifyCode) | CFindComboButton | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/doc.h Source File

  • ole
  • oleview

doc.h

Go to the documentation of this file.
00001 // doc.h : interface of the COle2ViewDoc class
00002 //
00003 /////////////////////////////////////////////////////////////////////////////
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #ifndef _DOC_H_
00015 #define _DOC_H_
00016
00017
00018 class COle2ViewDoc : public CDocument
00019 {
00020 friend class CObjTreeView ;
00021 friend class CRegistryView ;
00022 friend class CMainFrame ;
00023
00024 protected: // create from serialization only
00025   COle2ViewDoc();
00026   DECLARE_DYNCREATE(COle2ViewDoc)
00027
00028 public:
00029   CString         m_szObjectCur ;
00030   CLSID           m_clsidCur ;
00031   BOOL            m_fTypeLib ;
00032   BOOL            m_fInterface ;
00033
00034   DWORD           m_dwClsCtx ;
00035
00036 // Attributes
00037 public:
00038
00039
00040 // Operations
00041 public:
00042
00043 // Implementation
00044 public:
00045   virtual ~COle2ViewDoc();
00046 #ifdef _DEBUG
00047   virtual void AssertValid() const;
00048   virtual void Dump(CDumpContext& dc) const;
00049 #endif
00050 protected:
00051   virtual BOOL    OnNewDocument();
00052   virtual void    OnCloseDocument() ;
00053
00054 // Generated message map functions
00055 protected:
00056   //{{AFX_MSG(COle2ViewDoc)
00057     // NOTE - the ClassWizard will add and remove member functions here.
00058     //    DO NOT EDIT what you see in these blocks of generated code !
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 #endif // _DOC_H_
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CNextWizardDialog Member List

This is the complete list of members for CNextWizardDialog, including all inherited members.
CNextWizardDialog() | CNextWizardDialog | [inline]
m_next | CNextWizardDialog | [private]
m_prev | CNextWizardDialog | [private]
OnCommandControlClick(int iButtonId) | CNextWizardDialog | [inline, protected]
SetDialog(CTaskDialog *next, CTaskDialog *prev) | CNextWizardDialog | [inline]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeldlg.h Source File

  • general
  • modeless

modeldlg.h

Go to the documentation of this file.
00001 // modeldlg.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CMainDlg dialog
00015
00016 class CMainDlg : public CDialog
00017 {
00018 // Construction
00019 public:
00020   CMainDlg(CWnd* pParent = NULL); // standard constructor
00021
00022   void BoxDone();
00023
00024 // Dialog Data
00025   //{{AFX_DATA(CMainDlg)
00026   enum { IDD = IDD_MAIN_DIALOG };
00027     // NOTE: the ClassWizard will add data members here
00028   //}}AFX_DATA
00029
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CMainDlg)
00032   protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034   //}}AFX_VIRTUAL
00035
00036 // Implementation
00037 protected:
00038   HICON m_hIcon;
00039   CAdderDialog* m_pModeless;
00040
00041   // Generated message map functions
00042   //{{AFX_MSG(CMainDlg)
00043   virtual BOOL OnInitDialog();
00044   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00045   afx_msg void OnPaint();
00046   afx_msg HCURSOR OnQueryDragIcon();
00047   virtual void OnOK();
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTCCommandLineInfo Member List

This is the complete list of members for CTCCommandLineInfo, including all inherited members.
CTCCommandLineInfo(CTCOptions *pOptions) | CTCCommandLineInfo |
m_pOptions | CTCCommandLineInfo | [protected]
m_tExpectingDSMFile | CTCCommandLineInfo | [protected]
m_tExpectingLogFileName | CTCCommandLineInfo | [protected]
m_tExpectingProgID | CTCCommandLineInfo | [protected]
ParseInterfaceFlag(LPCTSTR pszParam) | CTCCommandLineInfo |
ParseOptionFlag(LPCTSTR pszParam) | CTCCommandLineInfo |
ParseParam(LPCTSTR pszParam, BOOL tFlag, BOOL tLast) | CTCCommandLineInfo |
ParseServiceFlag(LPCTSTR pszParam) | CTCCommandLineInfo |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPCMINFO Member List

This is the complete list of members for tagPCMINFO, including all inherited members.
cbSize | tagPCMINFO
dwPcm | tagPCMINFO
dwTimeout | tagPCMINFO
hrgnBound | tagPCMINFO
hrgnExclude | tagPCMINFO
rectBound | tagPCMINFO
rectExclude | tagPCMINFO
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/CntrItem.h Source File

  • ole
  • MFCBind

CntrItem.h

Go to the documentation of this file.
00001 // CntrItem.h : interface of the CMFCBindCntrItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_CNTRITEM_H__C3B1822C_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
00013 #define AFX_CNTRITEM_H__C3B1822C_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_
00014
00015 #if _MSC_VER > 1000
00016 #pragma once
00017 #endif // _MSC_VER > 1000
00018
00019 class CMFCBindDoc;
00020 class CMFCBindView;
00021
00022 class CMFCBindCntrItem : public COleDocObjectItem
00023 {
00024   DECLARE_SERIAL(CMFCBindCntrItem)
00025
00026 // Constructors
00027 public:
00028   CMFCBindCntrItem(CMFCBindDoc* pContainer = NULL);
00029     // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
00030     //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00031     //  zero arguments.  Normally, OLE items are constructed with a
00032     //  non-NULL document pointer.
00033
00034 // Attributes
00035 public:
00036   CMFCBindDoc* GetDocument()
00037     { return (CMFCBindDoc*)COleDocObjectItem::GetDocument(); }
00038   CMFCBindView* GetActiveView()
00039     { return (CMFCBindView*)COleDocObjectItem::GetActiveView(); }
00040
00041   // ClassWizard generated virtual function overrides
00042   //{{AFX_VIRTUAL(CMFCBindCntrItem)
00043   public:
00044   virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
00045   virtual void OnActivate();
00046   protected:
00047   virtual void OnGetItemPosition(CRect& rPosition);
00048   virtual void OnDeactivateUI(BOOL bUndoable);
00049   virtual BOOL OnChangeItemPosition(const CRect& rectPos);
00050   //}}AFX_VIRTUAL
00051
00052 // Implementation
00053 public:
00054   void LoadFromMoniker(LPUNKNOWN pUnk, OLECHAR* swzName);
00055   BOOL FinishCreate(SCODE sc);
00056   void ProcessNewObject();
00057
00058   static int m_nDocID;
00059
00060   ~CMFCBindCntrItem();
00061 #ifdef _DEBUG
00062   virtual void AssertValid() const;
00063   virtual void Dump(CDumpContext& dc) const;
00064 #endif
00065   virtual void Serialize(CArchive& ar);
00066 };
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069
00070 //{{AFX_INSERT_LOCATION}}
00071 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00072
00073 #endif // !defined(AFX_CNTRITEM_H__C3B1822C_2457_11D1_A4EC_00C04FD91A9F__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Aboutdlg.h Source File

  • general
  • dlgcbr32

Aboutdlg.h

Go to the documentation of this file.
00001 // AboutDlg.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013
00014
00015
00016 /*****************************************************************************
00017   ABOUTDLG.H
00018
00019   Purpose:
00020   Interface for CAboutDlg, which displays the application About Box.
00021
00022   Functions:
00023   CAboutDlg::CAboutDlg()          -- constructor
00024   CAboutDlg::DoDataExchange()     -- dialog data exchange/validation
00025   CAboutDlg::OnInitDialog()       -- initialize dialog
00026
00027   Development Team:
00028   Mary Kirtland
00029   Ported to 32-bit by:
00030   Mike Hedley
00031   Created by Microsoft Product Support Services, Premier ISV Support
00032   Copyright (c) Microsoft Corporation.  All rights reserved.
00033 \****************************************************************************/
00034
00035 #ifndef __ABOUTDLG_H__
00036 #define __ABOUTDLG_H__
00037
00038 class CAboutDlg : public CDialog
00039 {
00040 // Construction
00041 public:
00042   CAboutDlg(CWnd* pParent = NULL);    // standard constructor
00043
00044 // Dialog Data
00045   //{{AFX_DATA(CAboutDlg)
00046   enum { IDD = IDD_ABOUT };
00047   //}}AFX_DATA
00048
00049   // ClassWizard generated virtual function overrides
00050   //{{AFX_VIRTUAL(CAboutDlg)
00051   protected:
00052   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00053   //}}AFX_VIRTUAL
00054
00055 // Implementation
00056 protected:
00057   // Generated message map functions
00058   //{{AFX_MSG(CAboutDlg)
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
00063 #endif //__ABOUTDLG_H__
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/StdAfx.h Source File

  • general
  • spiro

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //  are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #if !defined(AFX_STDAFX_H__4417CF88_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
00015 #define AFX_STDAFX_H__4417CF88_AFA9_11D1_AB61_D9B80632F018__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025 #ifndef _AFX_NO_AFXCMN_SUPPORT
00026 #include <afxcmn.h>     // MFC support for Windows Common Controls
00027 #endif // _AFX_NO_AFXCMN_SUPPORT
00028
00029 #define   MM_SPIRO    MM_LOENGLISH
00030 #define   CYCLE_ERROR   5  // tolerance(error) in distance to consider a pattern done
00031 #define   TRACES_PER_TICK_SLOW  8
00032 #define   TRACES_PER_TICK_FAST  16
00033
00034 #include <afxtempl.h>
00035
00036 #ifndef elementsof
00037 #define elementsof(rgX) ((int)(sizeof(rgX) / sizeof(rgX[0])))
00038 #endif
00039
00040
00041 #define PENMARKERSIZE 5
00042
00043
00044 #include "piece.h"
00045 #include "spirodoc.h"
00046 #include "spiroview.h"
00047
00048 #include <winspool.h>
00049 #include <math.h>
00050
00051 #pragma warning(disable: 4172)
00052
00053 //{{AFX_INSERT_LOCATION}}
00054 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00055
00056
00057 // custom definitions for the spirograph application
00058 #endif // !defined(AFX_STDAFX_H__4417CF88_AFA9_11D1_AB61_D9B80632F018__INCLUDED_)
00059
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTypeLibListView Member List

This is the complete list of members for CTypeLibListView, including all inherited members.
CTypeLibListView() | CTypeLibListView | [protected]
CTypeLibWnd class | CTypeLibListView | [friend]
m_list | CTypeLibListView |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CTypeLibListView | [protected]
OnDestroy() | CTypeLibListView | [protected]
OnDraw(CDC *pDC) | CTypeLibListView | [protected, virtual]
OnInitialUpdate() | CTypeLibListView | [virtual]
OnSize(UINT nType, int cx, int cy) | CTypeLibListView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CTypeLibListView | [protected, virtual]
~CTypeLibListView() | CTypeLibListView | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/stdafx.h Source File

  • advanced
  • collect

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions (including VB)
00018 #include <afxtempl.h>
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistppg.cpp Source File

  • controls
  • xlist

xlistppg.cpp

Go to the documentation of this file.
00001 // xlistppg.cpp : Implementation of the CXlistPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "xlist.h"
00015 #include "xlistppg.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022
00023 IMPLEMENT_DYNCREATE(CXlistPropPage, COlePropertyPage)
00024
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // Message map
00028
00029 BEGIN_MESSAGE_MAP(CXlistPropPage, COlePropertyPage)
00030   //{{AFX_MSG_MAP(CXlistPropPage)
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // Initialize class factory and guid
00037
00038 IMPLEMENT_OLECREATE_EX(CXlistPropPage, "XLIST.XlistPropPage.1",
00039   0x37446b9d, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00040
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // CXlistPropPage::CXlistPropPageFactory::UpdateRegistry -
00044 // Adds or removes system registry entries for CXlistPropPage
00045
00046 BOOL CXlistPropPage::CXlistPropPageFactory::UpdateRegistry(BOOL bRegister)
00047 {
00048   if (bRegister)
00049     return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
00050       m_clsid, IDS_XLIST_PPG);
00051   else
00052     return AfxOleUnregisterClass(m_clsid, NULL);
00053 }
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CXlistPropPage::CXlistPropPage - Constructor
00058
00059 CXlistPropPage::CXlistPropPage() :
00060   COlePropertyPage(IDD, IDS_XLIST_PPG_CAPTION)
00061 {
00062   //{{AFX_DATA_INIT(CXlistPropPage)
00063   m_InvertFlag = FALSE;
00064   //}}AFX_DATA_INIT
00065 }
00066
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // CXlistPropPage::DoDataExchange - Moves data between page and properties
00070
00071 void CXlistPropPage::DoDataExchange(CDataExchange* pDX)
00072 {
00073   //{{AFX_DATA_MAP(CXlistPropPage)
00074   DDP_Check(pDX, IDC_INVERTCHECK, m_InvertFlag, _T("InvertFlag"));
00075   DDX_Check(pDX, IDC_INVERTCHECK, m_InvertFlag);
00076   //}}AFX_DATA_MAP
00077   DDP_PostProcessing(pDX);
00078 }
00079
00080
00081 /////////////////////////////////////////////////////////////////////////////
00082 // CXlistPropPage message handlers
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/filenewd.cpp Source File

  • vc2008fp
  • WordPad

filenewd.cpp

Go to the documentation of this file.
00001 //
00002 // filenewd.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "filenewd.h"
00017 #include "helpids.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 DWORD const CFileNewDialog::m_nHelpIDs[] =
00025 {
00026   IDC_DATEDIALOG_LIST, IDH_WORDPAD_FILENEW_DOC,
00027   0, 0
00028 };
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CFileNewDialog dialog
00032
00033 CFileNewDialog::CFileNewDialog(CWnd* pParent /*=NULL*/)
00034   : CCSDialog(CFileNewDialog::IDD, pParent)
00035 {
00036   //{{AFX_DATA_INIT(CFileNewDialog)
00037   m_nSel = -1;
00038   //}}AFX_DATA_INIT
00039 }
00040
00041
00042 void CFileNewDialog::DoDataExchange(CDataExchange* pDX)
00043 {
00044   CCSDialog::DoDataExchange(pDX);
00045   //{{AFX_DATA_MAP(CFileNewDialog)
00046   DDX_Control(pDX, IDC_DATEDIALOG_LIST, m_listbox);
00047   DDX_LBIndex(pDX, IDC_DATEDIALOG_LIST, m_nSel);
00048   //}}AFX_DATA_MAP
00049 }
00050
00051
00052 BEGIN_MESSAGE_MAP(CFileNewDialog, CCSDialog)
00053   //{{AFX_MSG_MAP(CFileNewDialog)
00054   ON_LBN_DBLCLK(IDC_DATEDIALOG_LIST, OnDblclkDatedialogList)
00055   //}}AFX_MSG_MAP
00056 END_MESSAGE_MAP()
00057
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CFileNewDialog message handlers
00061
00062 BOOL CFileNewDialog::OnInitDialog()
00063 {
00064   CCSDialog::OnInitDialog();
00065
00066   CString str;
00067   VERIFY(str.LoadString(IDS_WORD6_DOCUMENT));
00068   m_listbox.AddString(str);
00069   VERIFY(str.LoadString(IDS_RTF_DOCUMENT));
00070   m_listbox.AddString(str);
00071   VERIFY(str.LoadString(IDS_TEXT_DOCUMENT));
00072   m_listbox.AddString(str);
00073   m_listbox.SetCurSel(0);
00074
00075   return TRUE;  // return TRUE unless you set the focus to a control
00076           // EXCEPTION: OCX Property Pages should return FALSE
00077 }
00078
00079 void CFileNewDialog::OnDblclkDatedialogList()
00080 {
00081   OnOK();
00082 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/CustomPagesView.h Source File

  • vc2008fp
  • CustomPages

CustomPagesView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CCustomPagesView : public CView
00014 {
00015 protected: // create from serialization only
00016   CCustomPagesView();
00017   DECLARE_DYNCREATE(CCustomPagesView)
00018
00019 // Attributes
00020 public:
00021   CCustomPagesDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030   protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CCustomPagesView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044   afx_msg void OnContextMenu(CWnd*, CPoint point);
00045   afx_msg void OnFilePrintPreview();
00046
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 #ifndef _DEBUG  // debug version in CustomPagesView.cpp
00051 inline CCustomPagesDoc* CCustomPagesView::GetDocument()
00052    { return (CCustomPagesDoc*)m_pDocument; }
00053 #endif
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/StdAfx.cpp Source File

  • general
  • CmnCtrl2

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  CmnCtrl2.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ListHdr/StdAfx.cpp Source File

  • general
  • ListHdr

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  ListHdr.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMutexesApp Member List

This is the complete list of members for CMutexesApp, including all inherited members.
CMutexesApp() | CMutexesApp |
InitInstance() | CMutexesApp | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/slowcalc.cpp Source File

  • advanced
  • mtrecalc

slowcalc.cpp

Go to the documentation of this file.
00001 // slowcalc.cpp : implementation of the recalc engine, which is reused by
00002 //                both demonstrations of recalculating: single thread,
00003 //                and worker thread.
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "calcthrd.h"
00016 #include "recaldoc.h"
00017 #include "slowcalc.h"
00018 #include "mtrecalc.h"
00019
00020
00021 BOOL SlowAdd(int nInt1, int nInt2, int& nResult, CRecalcThreadInfo* pInfo, int nSeconds,
00022   HWND hwndNotifyProgress)
00023 {
00024   CWnd* pWndNotifyProgress = CWnd::FromHandle(hwndNotifyProgress);
00025
00026   BOOL bRestartCalculation = TRUE;
00027   while (bRestartCalculation)
00028   {
00029     bRestartCalculation = FALSE;
00030     // Do the calculation 5% at a time, allowing for interruption to
00031     // restart calculation.
00032     for (int nCount = 1; nCount < 20; nCount++)
00033     {
00034       if (pInfo != NULL
00035         && WaitForSingleObject(pInfo->m_hEventKillRecalcThread, 0)  == WAIT_OBJECT_0)
00036       {
00037         if (hwndNotifyProgress != NULL)
00038         {
00039           // Reset progress indication to 0 (recalculation not begun)
00040           pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS);
00041         }
00042         return FALSE; // Terminate this recalculation
00043       }
00044
00045       if (pInfo != NULL
00046         &&WaitForSingleObject(pInfo->m_hEventStartRecalc, 0) == WAIT_OBJECT_0)
00047       {
00048         // Get new source data for the calculation.
00049         nInt1 = pInfo->m_nInt1;
00050         nInt2 = pInfo->m_nInt2;
00051         bRestartCalculation = TRUE;
00052         continue;
00053       }
00054
00055       // Notify window about each 5% of progress
00056       if (hwndNotifyProgress != NULL)
00057       {
00058         // If calculating in a single thread, send rather than post the
00059         // "in progress" message, so that the progress is reflected
00060         // immediately in the status bar.  Otherwise, the posted "in
00061         // progress" messages won't be handled until after the recalculation
00062         // has totally completed.
00063         //
00064         // If calculating in a separate thread, however, then post rather
00065         // than send the "in progress" message.  Otherwise, in the case where
00066         // the main thread tries to kill the worker thread, there may be
00067         // a deadlock where the main thread is doing a WaitForSingleObject
00068         // on the "kill done" event while the worker thread is waiting for
00069         // the main thread to handle the sent message.
00070         if (pInfo == NULL)
00071         {
00072           pWndNotifyProgress->SendMessage(WM_USER_RECALC_IN_PROGRESS, nCount*5);
00073         }
00074         else
00075         {
00076           pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS, nCount*5);
00077         }
00078       }
00079       // Sleep 1/20th of total recalc time, which is 50 milliseconds
00080       // per each of total number of seconds (nSeconds) of recalc time.
00081       Sleep(nSeconds * 50);
00082
00083     }
00084
00085     if (hwndNotifyProgress != NULL)
00086     {
00087       // See comment above regarding post versus send message.
00088       if (pInfo == NULL)
00089         pWndNotifyProgress->SendMessage(WM_USER_RECALC_IN_PROGRESS, 100);
00090       else
00091         pWndNotifyProgress->PostMessage(WM_USER_RECALC_IN_PROGRESS, 100);
00092
00093     }
00094   }
00095
00096   nResult = nInt1 + nInt2;
00097   return TRUE;
00098 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/srvritem.cpp Source File

  • vc2008fp
  • WordPad

srvritem.cpp

Go to the documentation of this file.
00001 //
00002 // srvritem.cpp : implementation of the CWordPadSrvrItem class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "wordpdoc.h"
00017 #include "wordpvw.h"
00018 #include "srvritem.h"
00019 #include <limits.h>
00020
00021 IMPLEMENT_DYNAMIC(CEmbeddedItem, COleServerItem)
00022
00023 extern CLIPFORMAT cfRTF;
00024
00025 CEmbeddedItem::CEmbeddedItem(CWordPadDoc* pContainerDoc, int nBeg, int nEnd)
00026   : COleServerItem(pContainerDoc, TRUE)
00027 {
00028   ASSERT(pContainerDoc != NULL);
00029   ASSERT_VALID(pContainerDoc);
00030   m_nBeg = nBeg;
00031   m_nEnd = nEnd;
00032 }
00033
00034 CWordPadView* CEmbeddedItem::GetView() const
00035 {
00036   CDocument* pDoc = GetDocument();
00037   ASSERT_VALID(pDoc);
00038   POSITION pos = pDoc->GetFirstViewPosition();
00039   if (pos == NULL)
00040     return NULL;
00041
00042   CWordPadView* pView = (CWordPadView*)pDoc->GetNextView(pos);
00043   ASSERT_VALID(pView);
00044   ASSERT(pView->IsKindOf(RUNTIME_CLASS(CWordPadView)));
00045   return pView;
00046 }
00047
00048 void CEmbeddedItem::Serialize(CArchive& ar)
00049 {
00050   if (m_lpRichDataObj != NULL)
00051   {
00052     ASSERT(ar.IsStoring());
00053     FORMATETC etc = {NULL, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
00054     etc.cfFormat = (CLIPFORMAT)cfRTF;
00055     STGMEDIUM stg;
00056     if (SUCCEEDED(m_lpRichDataObj->GetData(&etc, &stg)))
00057     {
00058       LPBYTE p = (LPBYTE)GlobalLock(stg.hGlobal);
00059       if (p != NULL)
00060       {
00061         ar.Write(p, (UINT)GlobalSize(stg.hGlobal));
00062         GlobalUnlock(stg.hGlobal);
00063       }
00064       ASSERT(stg.tymed == TYMED_HGLOBAL);
00065       ReleaseStgMedium(&stg);
00066     }
00067   }
00068   else
00069     GetDocument()->Serialize(ar);
00070 }
00071
00072 BOOL CEmbeddedItem::OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize)
00073 {
00074   if (dwDrawAspect != DVASPECT_CONTENT)
00075     return COleServerItem::OnGetExtent(dwDrawAspect, rSize);
00076
00077   CClientDC dc(NULL);
00078   return OnDrawEx(&dc, rSize, FALSE);
00079 }
00080
00081 BOOL CEmbeddedItem::OnDraw(CDC* pDC, CSize& rSize)
00082 {
00083   return OnDrawEx(pDC, rSize, TRUE);
00084 }
00085
00086 BOOL CEmbeddedItem::OnDrawEx(CDC* pDC, CSize& rSize, BOOL bOutput)
00087 {
00088   CDisplayIC dc;
00089   CWordPadView* pView = GetView();
00090   if (pView == NULL)
00091     return FALSE;
00092   ASSERT_VALID(pView);
00093
00094   int nWrap = pView->m_nWordWrap;
00095
00096   CRect rect;//rect in twips
00097   rect.left = rect.top = 0;
00098   rect.bottom = 32767; // bottomless
00099
00100   rect.right = 32767;
00101   if (nWrap == 0) // no word wrap
00102     rect.right = 32767;
00103   else if (nWrap == 1) // wrap to window
00104   {
00105     CRect rectClient;
00106     pView->GetClientRect(&rectClient);
00107     rect.right = rectClient.right - HORZ_TEXTOFFSET;
00108     rect.right = MulDiv(rect.right, 1440, dc.GetDeviceCaps(LOGPIXELSX));
00109   }
00110   else if (nWrap == 2) // wrap to ruler
00111     rect.right = pView->GetPrintWidth();
00112
00113   // first just determine the correct extents of the text
00114   pDC->SetBkMode(TRANSPARENT);
00115
00116   if (pView->PrintInsideRect(pDC, rect, m_nBeg, m_nEnd, FALSE) == 0)
00117   {
00118     // default to 12pts high and 4" wide if no text
00119     rect.bottom = rect.top+12*20+1; // 12 pts high
00120     rect.right = rect.left+ 4*1440;
00121   }
00122   rect.bottom+=3*(1440/dc.GetDeviceCaps(LOGPIXELSX)); // three pixels
00123
00124   // then, really output the text
00125   CRect rectOut = rect; // don't pass rect because it will get clobbered
00126   if (bOutput)
00127     pView->PrintInsideRect(pDC, rectOut, m_nBeg, m_nEnd, TRUE);
00128   ASSERT(rectOut.right == rect.right);
00129
00130   // adjust for border (rect.left is already adjusted)
00131   if (pView->GetStyle() & WS_HSCROLL)
00132     ++rect.bottom;  // account for border on scroll bar!
00133
00134   // return HIMETRIC size
00135   rSize = rect.Size();
00136   rSize.cx = MulDiv(rSize.cx, 2540, 1440); // convert twips to HIMETRIC
00137   rSize.cy = MulDiv(rSize.cy, 2540, 1440); // convert twips to HIMETRIC
00138   return TRUE;
00139 }
00140
00141 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/MyScheduler.cpp Source File

  • internet
  • Scheduler

MyScheduler.cpp

Go to the documentation of this file.
00001 // MyScheduler.cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Scheduler.h"
00013 #include "MyScheduler.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CMyScheduler
00023
00024 /*********************************************************************************************
00025 Constructur: Initializes all the member variables
00026 *********************************************************************************************/
00027 CMyScheduler::CMyScheduler()
00028 {
00029   m_iMonth = 0;
00030   m_iDay = 0;
00031   m_iYear = 0;
00032   m_iStartHour = 0;
00033   m_iEndHour = 0;
00034   m_iStartMinutes = 0;
00035   m_iEndMinutes = 0;
00036   m_szTitle = _T("");
00037   m_szDescription = _T("");
00038   m_iId = 0;
00039 }
00040
00041 CMyScheduler::~CMyScheduler()
00042 {
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CMyScheduler member functions
00047
00048 IMPLEMENT_SERIAL(CMyScheduler,CObject,1)
00049
00050 /*********************************************************************************************
00051 Sequentially loads and stores all the member variables to the archive
00052 *********************************************************************************************/
00053 void CMyScheduler::Serialize( CArchive& ar )
00054 {
00055   CObject::Serialize( ar );
00056
00057   if ( ar.IsStoring() )
00058    {
00059     ar << m_szTitle << m_iMonth << m_iDay << m_iYear << m_iStartHour << m_iStartMinutes << m_iEndHour << m_iEndMinutes << m_szDescription << m_iId;
00060    }
00061    else
00062    {
00063     ar >> m_szTitle >> m_iMonth >> m_iDay >> m_iYear >> m_iStartHour >> m_iStartMinutes >> m_iEndHour >> m_iEndMinutes >> m_szDescription >> m_iId;
00064    }
00065 }
00066
00067
00068 /*********************************************************************************************
00069 The overloaded assignment operator for the CMyScheduler object
00070 *********************************************************************************************/
00071 const CMyScheduler& CMyScheduler::operator= (const CMyScheduler& scheduler)
00072 {
00073   if (this != &scheduler)
00074   {
00075     m_iMonth = scheduler.m_iMonth;
00076     m_iDay = scheduler.m_iDay;
00077     m_iYear = scheduler.m_iYear;
00078     m_iStartHour = scheduler.m_iStartHour;
00079     m_iEndHour = scheduler.m_iEndHour;
00080     m_iStartMinutes = scheduler.m_iStartMinutes;
00081     m_iEndMinutes = scheduler.m_iEndMinutes;
00082     m_szTitle = scheduler.m_szTitle;
00083     m_szDescription = scheduler.m_szDescription;
00084     m_iId = scheduler.m_iId;
00085   }
00086   return *this;
00087 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/finddlg.cpp Source File

  • general
  • npp

finddlg.cpp

Go to the documentation of this file.
00001 // finddlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include <stddef.h>
00015 #include "np.h"
00016 #include "combobar.h"
00017 #include "mainfrm.h"
00018 #include "npdoc.h"
00019 #include "npview.h"
00020 #include "finddlg.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CFindDlg dialog
00029
00030
00031 CFindDlg::CFindDlg(CWnd* pParent /*=NULL*/)
00032   : CDialog(CFindDlg::IDD, pParent)
00033 {
00034   //{{AFX_DATA_INIT(CFindDlg)
00035   m_bMatchCase = FALSE;
00036   m_szText = _T("");
00037   m_nDirection = 1; // down by default
00038   //}}AFX_DATA_INIT
00039 }
00040
00041
00042 void CFindDlg::DoDataExchange(CDataExchange* pDX)
00043 {
00044   CDialog::DoDataExchange(pDX);
00045   //{{AFX_DATA_MAP(CFindDlg)
00046   DDX_Check(pDX, IDC_CHECK1, m_bMatchCase);
00047   DDX_CBString(pDX, IDC_COMBO1, m_szText);
00048   DDX_Radio(pDX, IDC_RADIO1, m_nDirection);
00049   //}}AFX_DATA_MAP
00050 }
00051
00052
00053 BEGIN_MESSAGE_MAP(CFindDlg, CDialog)
00054   //{{AFX_MSG_MAP(CFindDlg)
00055   ON_BN_CLICKED(ID_EDIT_FIND_NEXT, OnEditFindNext)
00056   //}}AFX_MSG_MAP
00057 END_MESSAGE_MAP()
00058
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CFindDlg message handlers
00062
00063 void CFindDlg::OnEditFindNext()
00064 {
00065   // the user selected to search. see if there is a search pattern in the edit control
00066   // using the default data exchange.
00067   // if no search string is present, keep the dialog box up.
00068   UpdateData(TRUE);
00069
00070   if (!m_szText.GetLength())
00071   {
00072     MessageBeep(MB_ICONEXCLAMATION);
00073     GotoDlgCtrl(GetDlgItem(IDC_COMBO1));
00074     return ;
00075   }
00076
00077   EndDialog(TRUE);
00078   GetApplicationView()->m_searchHistory.AddString(m_szText);
00079 }
00080
00081 #pragma warning (disable : 4189)
00082 BOOL CFindDlg::OnInitDialog()
00083 {
00084   CDialog::OnInitDialog();
00085
00086   CWnd* pWnd = GetDlgItem(IDC_COMBO1);
00087   GetApplicationView()->m_searchHistory.FillCombobox();
00088
00089   return TRUE;  // return TRUE unless you set the focus to a control
00090           // EXCEPTION: OCX Property Pages should return FALSE
00091 }
00092 #pragma warning (default: 4189)
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/calcdlg.cpp Source File

  • ole
  • mfccalc

calcdlg.cpp

Go to the documentation of this file.
00001 // calcdlg.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mfccalc.h"
00014 #include "calcdlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CAboutDlg dialog used for App About
00023
00024 class CAboutDlg : public CDialog
00025 {
00026 public:
00027   CAboutDlg();
00028
00029 // Dialog Data
00030   //{{AFX_DATA(CAboutDlg)
00031   enum { IDD = IDD_ABOUTBOX };
00032   //}}AFX_DATA
00033
00034 // Implementation
00035 protected:
00036   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00037   //{{AFX_MSG(CAboutDlg)
00038   virtual BOOL OnInitDialog();
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041 };
00042
00043 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00044 {
00045   //{{AFX_DATA_INIT(CAboutDlg)
00046   //}}AFX_DATA_INIT
00047 }
00048
00049 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00050 {
00051   CDialog::DoDataExchange(pDX);
00052   //{{AFX_DATA_MAP(CAboutDlg)
00053   //}}AFX_DATA_MAP
00054 }
00055
00056 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00057   //{{AFX_MSG_MAP(CAboutDlg)
00058     // No message handlers
00059   //}}AFX_MSG_MAP
00060 END_MESSAGE_MAP()
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CAboutDlg message handlers
00064
00065 BOOL CAboutDlg::OnInitDialog()
00066 {
00067   CDialog::OnInitDialog();
00068
00069   // TODO: Add extra initialization here
00070
00071   return TRUE;
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CCalcDlg dialog
00076
00077 IMPLEMENT_DYNCREATE(CCalcDlg, CDialog)
00078
00079 BEGIN_DISPATCH_MAP(CCalcDlg, CDialog)
00080   //{{AFX_DISPATCH_MAP(CCalcDlg)
00081   DISP_PROPERTY_EX(CCalcDlg, "Accum", GetAccum, SetAccum, VT_I4)
00082   DISP_PROPERTY_EX(CCalcDlg, "Operand", GetOperand, SetOperand, VT_I4)
00083   DISP_PROPERTY_EX(CCalcDlg, "Operation", GetOperation, SetOperation, VT_I2)
00084   DISP_PROPERTY_EX(CCalcDlg, "Visible", GetVisible, SetVisible, VT_BOOL)
00085   DISP_FUNCTION(CCalcDlg, "Evaluate", Evaluate, VT_BOOL, VTS_NONE)
00086   DISP_FUNCTION(CCalcDlg, "Clear", Clear, VT_EMPTY, VTS_NONE)
00087   DISP_FUNCTION(CCalcDlg, "Display", Display, VT_EMPTY, VTS_NONE)
00088   DISP_FUNCTION(CCalcDlg, "Close", Close, VT_EMPTY, VTS_NONE)
00089   DISP_FUNCTION(CCalcDlg, "Button", Button, VT_BOOL, VTS_BSTR)
00090   //}}AFX_DISPATCH_MAP
00091 END_DISPATCH_MAP()
00092
00093 #ifndef IMPLEMENT_OLECREATE_SINGLE
00094 // MFC will provide this macro in the future.  For now, we define it.
00095 #define IMPLEMENT_OLECREATE_SINGLE(class_name, external_name, \
00096   l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
00097   AFX_DATADEF COleObjectFactory class_name::factory(class_name::guid, \
00098     RUNTIME_CLASS(class_name), TRUE, _T(external_name)); \
00099   const AFX_DATADEF GUID class_name::guid = \
00100     { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } };
00101 #endif
00102
00103 // {62C4DD10-F45E-11cd-8C3D-00AA004BB3B7}
00104 IMPLEMENT_OLECREATE_SINGLE(CCalcDlg, "mfccalc.calculator",
00105   0x62c4dd10, 0xf45e, 0x11cd, 0x8c, 0x3d, 0x0, 0xaa, 0x0, 0x4b, 0xb3, 0xb7);
00106
00107 CCalcDlg::CCalcDlg(CWnd* pParent /*=NULL*/)
00108   : CDialog(CCalcDlg::IDD, pParent)
00109 {
00110   m_bAutoDelete = TRUE;       // default to auto-delete
00111   m_dwRegister = 0;               // not registered as active by default
00112
00113   //{{AFX_DATA_INIT(CCalcDlg)
00114     // NOTE: the ClassWizard will add member initialization here
00115   //}}AFX_DATA_INIT
00116
00117   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00118   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00119
00120   // Note that LoadAccelerator does not require DestroyAcceleratorTable
00121   m_hAccel = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDD));
00122
00123   // clear the contents of the calculator and reset state
00124   OnClickedClear();
00125
00126   // enable this object for OLE automation
00127   EnableAutomation();
00128 }
00129
00130 CCalcDlg::~CCalcDlg()
00131 {
00132   if (m_dwRegister != 0)
00133     RevokeActiveObject(m_dwRegister, NULL);
00134 }
00135
00136 void CCalcDlg::DoDataExchange(CDataExchange* pDX)
00137 {
00138   CDialog::DoDataExchange(pDX);
00139   //{{AFX_DATA_MAP(CCalcDlg)
00140     // NOTE: the ClassWizard will add DDX and DDV calls here
00141   //}}AFX_DATA_MAP
00142 }
00143
00144 /////////////////////////////////////////////////////////////////////////////
00145 // CCalcDlg implementation
00146
00147 void CCalcDlg::PerformOperation()
00148 {
00149   if (m_errorState != ErrNone)
00150     return;
00151
00152   if (m_bOperandAvail)
00153   {
00154     if (m_operator == OpNone)
00155       m_accum = m_operand;
00156     else if (m_operator == OpMultiply)
00157       m_accum *= m_operand;
00158     else if (m_operator == OpDivide)
00159     {
00160       if (m_operand == 0)
00161         m_errorState = ErrDivideByZero;
00162       else
00163         m_accum /= m_operand;
00164     }
00165     else if (m_operator == OpAdd)
00166       m_accum += m_operand;
00167     else if (m_operator == OpSubtract)
00168       m_accum -= m_operand;
00169   }
00170
00171   m_bOperandAvail = FALSE;
00172   UpdateDisplay();
00173 }
00174
00175 void CCalcDlg::ClickedNumber(long l)
00176 {
00177   if (m_errorState != ErrNone)
00178     return;
00179
00180   if (!m_bOperandAvail)
00181     m_operand = 0L;
00182
00183   SetOperand(m_operand*10+l);
00184   UpdateDisplay();
00185 }
00186
00187 void CCalcDlg::UpdateDisplay()
00188 {
00189   if (GetSafeHwnd() == NULL)
00190     return;
00191
00192   CString str;
00193   if (m_errorState != ErrNone)
00194     str.LoadString(IDS_ERROR);
00195   else
00196   {
00197     long lVal = (m_bOperandAvail) ? m_operand : m_accum;
00198     str.Format(_T("%ld"), lVal);
00199   }
00200   GetDlgItem(IDE_ACCUM)->SetWindowText(str);
00201   GetDlgItem(IDC_INVISIBLE_FOCUS)->SetFocus();
00202 }
00203
00204 BEGIN_MESSAGE_MAP(CCalcDlg, CDialog)
00205   //{{AFX_MSG_MAP(CCalcDlg)
00206   ON_WM_SYSCOMMAND()
00207   ON_WM_PAINT()
00208   ON_WM_QUERYDRAGICON()
00209   ON_COMMAND_RANGE(IDB_0, IDB_9, OnClickedNumber)
00210   ON_BN_CLICKED(IDB_CLEAR, OnClickedClear)
00211   ON_BN_CLICKED(IDB_DIVIDE, OnClickedDivide)
00212   ON_BN_CLICKED(IDB_EQUAL, OnClickedEqual)
00213   ON_BN_CLICKED(IDB_MINUS, OnClickedMinus)
00214   ON_BN_CLICKED(IDB_PLUS, OnClickedPlus)
00215   ON_BN_CLICKED(IDB_TIMES, OnClickedTimes)
00216   ON_EN_SETFOCUS(IDE_ACCUM, OnSetFocusAccum)
00217   //}}AFX_MSG_MAP
00218 END_MESSAGE_MAP()
00219
00220 /////////////////////////////////////////////////////////////////////////////
00221 // CCalcDlg message handlers
00222
00223 BOOL CCalcDlg::OnInitDialog()
00224 {
00225   CDialog::OnInitDialog();
00226
00227   // Add "About..." menu item to system menu.
00228
00229   // IDM_ABOUTBOX must be in the system command range.
00230   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00231   ASSERT(IDM_ABOUTBOX < 0xF000);
00232
00233   CMenu* pSysMenu = GetSystemMenu(FALSE);
00234   CString strAboutMenu;
00235   strAboutMenu.LoadString(IDS_ABOUTBOX);
00236   if (!strAboutMenu.IsEmpty())
00237   {
00238     pSysMenu->AppendMenu(MF_SEPARATOR);
00239     pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00240   }
00241
00242   pSysMenu->RemoveMenu(SC_MAXIMIZE, MF_BYCOMMAND);
00243   pSysMenu->RemoveMenu(SC_SIZE, MF_BYCOMMAND);
00244
00245   // want focus to stay on the dialog itself (until a button is clicked)
00246   SetFocus();
00247   return FALSE;
00248 }
00249
00250 void CCalcDlg::OnSysCommand(UINT nID, LPARAM lParam)
00251 {
00252   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00253   {
00254     CAboutDlg dlgAbout;
00255     dlgAbout.DoModal();
00256   }
00257   else
00258   {
00259     CDialog::OnSysCommand(nID, lParam);
00260   }
00261 }
00262
00263 // If you add a minimize button to your dialog, you will need the code below
00264 //  to draw the icon.  For MFC applications using the document/view model,
00265 //  this is automatically done for you by the framework.
00266
00267 void CCalcDlg::OnPaint()
00268 {
00269   if (!IsIconic())
00270   {
00271     CDialog::OnPaint();
00272     return;
00273   }
00274
00275   CPaintDC dc(this); // device context for painting
00276
00277   SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00278
00279   // Center icon in client rectangle
00280   int cxIcon = GetSystemMetrics(SM_CXICON);
00281   int cyIcon = GetSystemMetrics(SM_CYICON);
00282   CRect rect;
00283   GetClientRect(&rect);
00284   int x = (rect.Width() - cxIcon + 1) / 2;
00285   int y = (rect.Height() - cyIcon + 1) / 2;
00286
00287   // Draw the icon
00288   dc.DrawIcon(x, y, m_hIcon);
00289 }
00290
00291 // The system calls this to obtain the cursor to display while the user drags
00292 //  the minimized window.
00293 HCURSOR CCalcDlg::OnQueryDragIcon()
00294 {
00295   return (HCURSOR)m_hIcon;
00296 }
00297
00298 void CCalcDlg::OnClickedNumber(UINT nID)
00299 {
00300   ASSERT(nID >= IDB_0 && nID <= IDB_9);
00301   ClickedNumber(nID - IDB_0);
00302 }
00303
00304 void CCalcDlg::OnClickedClear()
00305 {
00306   m_operator = OpNone;
00307   m_operand = 0L;
00308   m_accum = 0L;
00309   m_bOperandAvail = FALSE;
00310   m_errorState = ErrNone;
00311   UpdateDisplay();
00312 }
00313
00314 void CCalcDlg::OnClickedDivide()
00315 {
00316   PerformOperation();
00317   m_operator = OpDivide;
00318 }
00319
00320 void CCalcDlg::OnClickedEqual()
00321 {
00322   PerformOperation();
00323   m_operator = OpNone;
00324 }
00325
00326 void CCalcDlg::OnClickedMinus()
00327 {
00328   PerformOperation();
00329   m_operator = OpSubtract;
00330 }
00331
00332 void CCalcDlg::OnClickedPlus()
00333 {
00334   PerformOperation();
00335   m_operator = OpAdd;
00336 }
00337
00338 void CCalcDlg::OnClickedTimes()
00339 {
00340   PerformOperation();
00341   m_operator = OpMultiply;
00342 }
00343
00344 BOOL CCalcDlg::PreTranslateMessage(MSG* pMsg)
00345 {
00346   if (m_hAccel != NULL && TranslateAccelerator(m_hWnd, m_hAccel, pMsg))
00347     return TRUE;
00348
00349   return CDialog::PreTranslateMessage(pMsg);
00350 }
00351
00352 void CCalcDlg::PostNcDestroy()
00353 {
00354   if (m_bAutoDelete)
00355     delete this;
00356 }
00357
00358 void CCalcDlg::OnCancel()
00359 {
00360   DestroyWindow();
00361 }
00362
00363 void CCalcDlg::OnOK()
00364 {
00365 }
00366
00367 void CCalcDlg::OnSetFocusAccum()
00368 {
00369   GetDlgItem(IDC_INVISIBLE_FOCUS)->SetFocus();
00370 }
00371
00372 /////////////////////////////////////////////////////////////////////////////
00373 // CCalcDlg automation
00374
00375 BOOL CCalcDlg::RegisterActive()
00376 {
00377   // attempt to register as the active object for the CCalcDlg CLSID
00378   return RegisterActiveObject(GetInterface(&IID_IUnknown),
00379     CCalcDlg::guid, NULL, &m_dwRegister) == NOERROR;
00380 }
00381
00382 long CCalcDlg::GetAccum()
00383 {
00384   return m_accum;
00385 }
00386
00387 void CCalcDlg::SetAccum(long nNewValue)
00388 {
00389   m_accum = nNewValue;
00390 }
00391
00392 long CCalcDlg::GetOperand()
00393 {
00394   return m_operand;
00395 }
00396
00397 void CCalcDlg::SetOperand(long nNewValue)
00398 {
00399   m_operand = nNewValue;
00400   m_bOperandAvail = TRUE;
00401 }
00402
00403 short CCalcDlg::GetOperation()
00404 {
00405 #pragma warning(disable:4244)
00406   return m_operator;
00407 #pragma warning(default:4244)
00408 }
00409
00410 void CCalcDlg::SetOperation(short nNewValue)
00411 {
00412   m_operator = (Operator)nNewValue;
00413 }
00414
00415 BOOL CCalcDlg::GetVisible()
00416 {
00417   return m_hWnd != NULL && (GetStyle() & WS_VISIBLE) != 0;
00418 }
00419
00420 void CCalcDlg::SetVisible(BOOL bNewValue)
00421 {
00422   if (bNewValue == GetVisible())
00423     return;
00424
00425   if (bNewValue)
00426   {
00427     // create it if necessary
00428     if (m_hWnd == NULL && !Create(CCalcDlg::IDD))
00429       return;
00430
00431     // set up as the active window for the application
00432     if (AfxGetThread()->m_pMainWnd == NULL)
00433       AfxGetThread()->m_pMainWnd = this;
00434
00435     // show it
00436     ShowWindow(SW_SHOWNORMAL);
00437   }
00438   else
00439   {
00440     if (m_hWnd != NULL)
00441       ShowWindow(SW_HIDE);
00442   }
00443 }
00444
00445 BOOL CCalcDlg::Evaluate()
00446 {
00447   OnClickedEqual();
00448   return m_errorState == ErrNone;
00449 }
00450
00451 void CCalcDlg::Clear()
00452 {
00453   OnClickedClear();
00454 }
00455
00456 void CCalcDlg::Display()
00457 {
00458   UpdateDisplay();
00459 }
00460
00461 void CCalcDlg::Close()
00462 {
00463   if (m_hWnd == NULL)
00464   {
00465     AfxPostQuitMessage(0);
00466     return;
00467   }
00468
00469   BOOL bAutoDelete = m_bAutoDelete;
00470   m_bAutoDelete = FALSE;
00471   DestroyWindow();
00472   m_bAutoDelete = bAutoDelete;
00473 }
00474
00475 BOOL CCalcDlg::Button(LPCTSTR szButton)
00476 {
00477   switch (szButton[0])
00478   {
00479   case 'c':
00480   case 'C':
00481     OnClickedClear();
00482     break;
00483
00484   case '/':
00485     OnClickedDivide();
00486     break;
00487   case '+':
00488     OnClickedPlus();
00489     break;
00490   case '-':
00491     OnClickedMinus();
00492     break;
00493   case '*':
00494     OnClickedTimes();
00495     break;
00496   case '=':
00497     OnClickedEqual();
00498     break;
00499
00500   default:
00501     if (szButton[0] >= '0' && szButton[0] <= '9')
00502       ClickedNumber(szButton[0] - '0');
00503     else
00504       return FALSE;
00505     break;
00506   }
00507   return TRUE;
00508 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/resource.h Source File

  • vc2008fp
  • DlgToolTips

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DlgToolTips.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDS_ABOUTBOX                    101
00007 #define IDD_DLGTOOLTIPS_DIALOG          102
00008 #define IDR_MAINFRAME                   128
00009 #define IDB_CANCEL                      129
00010 #define IDB_OK                          130
00011
00012 // Next default values for new objects
00013 //
00014 #ifdef APSTUDIO_INVOKED
00015 #ifndef APSTUDIO_READONLY_SYMBOLS
00016 #define _APS_NEXT_RESOURCE_VALUE        131
00017 #define _APS_NEXT_COMMAND_VALUE         32771
00018 #define _APS_NEXT_CONTROL_VALUE         1000
00019 #define _APS_NEXT_SYMED_VALUE           101
00020 #endif
00021 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMoneyDemoApp Member List

This is the complete list of members for CMSMoneyDemoApp, including all inherited members.
CMSMoneyDemoApp() | CMSMoneyDemoApp |
InitInstance() | CMSMoneyDemoApp | [virtual]
OnAppAbout() | CMSMoneyDemoApp |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/timeppg.h Source File

  • controls
  • time

timeppg.h

Go to the documentation of this file.
00001 // timeppg.h : Declaration of the CTimePropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 ////////////////////////////////////////////////////////////////////////////
00014 // CTimePropPage : See timeppg.cpp for implementation.
00015
00016 class CTimePropPage : public COlePropertyPage
00017 {
00018   DECLARE_DYNCREATE(CTimePropPage)
00019   DECLARE_OLECREATE_EX(CTimePropPage)
00020
00021 // Constructor
00022 public:
00023   CTimePropPage();
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CTimePropPage)
00027   enum { IDD = IDD_PROPPAGE_TIME };
00028   BOOL    m_Enabled;
00029   int     m_Interval;
00030   //}}AFX_DATA
00031
00032 // Implementation
00033 protected:
00034   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00035
00036 // Message maps
00037 protected:
00038   //{{AFX_MSG(CTimePropPage)
00039   //}}AFX_MSG
00040   DECLARE_MESSAGE_MAP()
00041
00042 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/StdAfx.h Source File

  • vc2008fp
  • RibbonGadgets

StdAfx.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 // stdafx.h : include file for standard system include files,
00013 // or project specific include files that are used frequently,
00014 // but are changed infrequently
00015
00016 #pragma once
00017
00018 #ifndef _SECURE_ATL
00019 #define _SECURE_ATL 1
00020 #endif
00021
00022 #ifndef VC_EXTRALEAN
00023 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00024 #endif
00025
00026 #include "targetver.h"
00027
00028 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00029
00030 // turns off MFC's hiding of some common and often safely ignored warning messages
00031 #define _AFX_ALL_WARNINGS
00032
00033 #include <afxwin.h>         // MFC core and standard components
00034 #include <afxext.h>         // MFC extensions
00035
00036 #include <afxhtml.h>
00037 #include <afxdisp.h>        // MFC Automation classes
00038
00039
00040
00041 #ifndef _AFX_NO_OLE_SUPPORT
00042 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00043 #endif
00044 #ifndef _AFX_NO_AFXCMN_SUPPORT
00045 #include <afxcmn.h>     // MFC support for Windows Common Controls
00046 #endif // _AFX_NO_AFXCMN_SUPPORT
00047
00048 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00049
00050 #if defined _M_IX86
00051 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00052 #elif defined _M_X64
00053 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00054 #else
00055 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00056 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/StdAfx.h Source File

  • vc2008fp
  • Explorer

StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025 #include <afxhtml.h>
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ChildFrm.h Source File

  • vc2008fp
  • VisualStudioDemo

ChildFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 static CString g_strStartViewName = _T("mslocal://StartPage");
00013
00014 class CChildFrame : public CMDIChildWndEx
00015 {
00016   DECLARE_DYNCREATE(CChildFrame)
00017 public:
00018   CChildFrame();
00019
00020 // Overrides
00021 public:
00022   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00023   virtual void ActivateFrame(int nCmdShow = -1);
00024
00025   virtual BOOL IsReadOnly();
00026   virtual LPCTSTR GetDocumentName(CObject** pObj);
00027
00028 // Implementation
00029 public:
00030   virtual ~CChildFrame();
00031 #ifdef _DEBUG
00032   virtual void AssertValid() const;
00033   virtual void Dump(CDumpContext& dc) const;
00034 #endif
00035
00036 protected:
00037   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/MFCBind/MainFrm.cpp Source File

  • ole
  • MFCBind

MainFrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "MFCBind.h"
00014
00015 #include "MainFrm.h"
00016 #include "BindView.h"
00017 #include "ObjView.h"
00018
00019 #ifdef _DEBUG
00020 #define new DEBUG_NEW
00021 #undef THIS_FILE
00022 static char THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CMainFrame
00027
00028 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00029
00030 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00031   //{{AFX_MSG_MAP(CMainFrame)
00032   ON_WM_CREATE()
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 static UINT indicators[] =
00037 {
00038   ID_SEPARATOR,           // status line indicator
00039   ID_INDICATOR_CAPS,
00040   ID_INDICATOR_NUM,
00041   ID_INDICATOR_SCRL,
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMainFrame construction/destruction
00046
00047 CMainFrame::CMainFrame()
00048 {
00049   // TODO: add member initialization code here
00050
00051 }
00052
00053 CMainFrame::~CMainFrame()
00054 {
00055 }
00056
00057 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00058 {
00059   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00060     return -1;
00061
00062   if (!m_wndToolBar.Create(this) ||
00063     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00064   {
00065     TRACE0("Failed to create toolbar\n");
00066     return -1;      // fail to create
00067   }
00068
00069   if (!m_wndStatusBar.Create(this) ||
00070     !m_wndStatusBar.SetIndicators(indicators,
00071       sizeof(indicators)/sizeof(UINT)))
00072   {
00073     TRACE0("Failed to create status bar\n");
00074     return -1;      // fail to create
00075   }
00076
00077   // TODO: Remove this if you don't want tool tips or a resizeable toolbar
00078   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00079     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00080
00081   // TODO: Delete these three lines if you don't want the toolbar to
00082   //  be dockable
00083   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00084   EnableDocking(CBRS_ALIGN_ANY);
00085   DockControlBar(&m_wndToolBar);
00086
00087   return 0;
00088 }
00089
00090 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00091 {
00092   // TODO: Modify the Window class or styles here by modifying
00093   //  the CREATESTRUCT cs
00094
00095   return CFrameWnd::PreCreateWindow(cs);
00096 }
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CMainFrame diagnostics
00100
00101 #ifdef _DEBUG
00102 void CMainFrame::AssertValid() const
00103 {
00104   CFrameWnd::AssertValid();
00105 }
00106
00107 void CMainFrame::Dump(CDumpContext& dc) const
00108 {
00109   CFrameWnd::Dump(dc);
00110 }
00111
00112 #endif //_DEBUG
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CMainFrame message handlers
00116
00117
00118 BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
00119 {
00120   // Create the splitter window for the main frame window'
00121   // client area.  For the main view, we'll use the same view
00122   // used in the doc-template displayed in the second pane
00123   // of the splitter. We'll use our special object list view
00124   // for the first pane of the splitter.
00125
00126   // make the pane 2.5 times as wide as an icon
00127   // (arbitrary but pleasing)
00128
00129   int nIconPaneWidth = ::GetSystemMetrics(SM_CXICON);
00130   nIconPaneWidth += nIconPaneWidth + (nIconPaneWidth >> 1);
00131
00132   CRect rcClient;
00133   GetClientRect(rcClient);
00134
00135   // Create the splitter and it's views
00136   if (!m_wndSplitter.CreateStatic(this, 1, 2))
00137   {
00138     TRACE0("Failed to create splitter window\n");
00139     return FALSE;
00140   }
00141
00142   ASSERT(RUNTIME_CLASS(CMFCBindView) == pContext->m_pNewViewClass);
00143
00144   if (!m_wndSplitter.CreateView(0, 1, pContext->m_pNewViewClass,
00145       CSize(rcClient.Width() - nIconPaneWidth, 50), pContext))
00146   {
00147     TRACE0("Failed to create main view\n");
00148     return FALSE;
00149   }
00150
00151   if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CObjListView),
00152       CSize(nIconPaneWidth, 0), pContext))
00153   {
00154     TRACE0("Failed to create object list view\n");
00155     return FALSE;
00156   }
00157
00158   // Set the active view
00159   SetActiveView((CView*) m_wndSplitter.GetPane(0, 1));
00160   return TRUE;
00161 }
00162
00163 CObjListView* CMainFrame::GetObjListView()
00164 {
00165   // returns the view that contains the current list of objects
00166   return (CObjListView*) m_wndSplitter.GetPane(0, 0);
00167 }
00168
00169 CMFCBindView* CMainFrame::GetDocView()
00170 {
00171   // returns the view that the ole items are embedded in
00172   return (CMFCBindView*) m_wndSplitter.GetPane(0, 1);
00173 }
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/chicdial.h Source File

  • ole
  • wordpad

chicdial.h

Go to the documentation of this file.
00001 // chicdial.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CCSDialog dialog
00014
00015 class CCSDialog : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CCSDialog();
00020   CCSDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
00021   CCSDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
00022
00023 // Implementation
00024 protected:
00025   virtual const DWORD* GetHelpIDs() = 0;
00026
00027   // Generated message map functions
00028   //{{AFX_MSG(CCSDialog)
00029   virtual BOOL OnInitDialog();
00030   //}}AFX_MSG
00031   afx_msg LONG_PTR OnHelp(UINT_PTR wParam, LONG_PTR lParam);
00032   afx_msg LONG_PTR OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam);
00033   DECLARE_MESSAGE_MAP()
00034 };
00035
00036 class CCSPropertyPage : public CPropertyPage
00037 {
00038 // Construction
00039 public:
00040   CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption = 0);
00041   CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
00042
00043 // Implementation
00044 protected:
00045   virtual const DWORD* GetHelpIDs() = 0;
00046
00047   // Generated message map functions
00048   //{{AFX_MSG(CCSPropertyPage)
00049   //}}AFX_MSG
00050   afx_msg LONG_PTR OnHelp(UINT_PTR wParam, LONG_PTR lParam);
00051   afx_msg LONG_PTR OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam);
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 class CCSPropertySheet : public CPropertySheet
00056 {
00057 // Construction
00058 public:
00059   CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd = NULL,
00060     UINT iSelectPage = 0);
00061   CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd = NULL,
00062     UINT iSelectPage = 0);
00063 // Implementation
00064 protected:
00065   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00066   // Generated message map functions
00067   //{{AFX_MSG(CCSPropertySheet)
00068   //}}AFX_MSG
00069   afx_msg LONG_PTR OnHelp(UINT_PTR wParam, LONG_PTR lParam);
00070   afx_msg LONG_PTR OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam);
00071   DECLARE_MESSAGE_MAP()
00072 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionsPage32 Member List

This is the complete list of members for COptionsPage32, including all inherited members.
COptionsPage32() | COptionsPage32 |
DoDataExchange(CDataExchange *pDX) | COptionsPage32 | [protected, virtual]
IDD enum value | COptionsPage32 |
~COptionsPage32() | COptionsPage32 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSliderCtrlPage Member List

This is the complete list of members for CSliderCtrlPage, including all inherited members.
ChangeCtrlStyle(long lStyle, BOOL bSetBit=TRUE) | CSliderCtrlPage | [protected]
CSliderCtrlPage() | CSliderCtrlPage |
DoDataExchange(CDataExchange *pDX) | CSliderCtrlPage | [protected, virtual]
IDD enum value | CSliderCtrlPage |
m_bAutoticks | CSliderCtrlPage |
m_bEnablesel | CSliderCtrlPage |
m_bFixed | CSliderCtrlPage |
m_bNothumb | CSliderCtrlPage |
m_bNoticks | CSliderCtrlPage |
m_iOrientation | CSliderCtrlPage |
m_iTickpos | CSliderCtrlPage |
m_Notifications | CSliderCtrlPage |
m_Slider | CSliderCtrlPage |
m_uiLine | CSliderCtrlPage |
m_uiPage | CSliderCtrlPage |
m_uiRangeFrom | CSliderCtrlPage |
m_uiRangeTo | CSliderCtrlPage |
m_uiSelRangeFrom | CSliderCtrlPage |
m_uiSelRangeTo | CSliderCtrlPage |
m_uiTickFreq | CSliderCtrlPage |
OnAutoticks() | CSliderCtrlPage | [protected]
OnEnablesel() | CSliderCtrlPage | [protected]
OnFixed() | CSliderCtrlPage | [protected]
OnInitDialog() | CSliderCtrlPage | [protected, virtual]
OnLine() | CSliderCtrlPage | [protected]
OnNothumb() | CSliderCtrlPage | [protected]
OnNoticks() | CSliderCtrlPage | [protected]
OnOrientation() | CSliderCtrlPage | [protected]
OnPage() | CSliderCtrlPage | [protected]
OnPoint() | CSliderCtrlPage | [protected]
OnRangefrom() | CSliderCtrlPage | [protected]
OnRangeto() | CSliderCtrlPage | [protected]
OnSelrangefrom() | CSliderCtrlPage | [protected]
OnSelrangeto() | CSliderCtrlPage | [protected]
OnTickfreq() | CSliderCtrlPage | [protected]
~CSliderCtrlPage() | CSliderCtrlPage |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/DynamicHelpView.cpp Source File

  • vc2008fp
  • VisualStudioDemo

DynamicHelpView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "VisualStudioDemo.h"
00012 #include "MainFrm.h"
00013 #include "DynamicHelpView.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 const int idTree = 1;
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CExplorerBar
00025
00026 CDynamicHelpViewBar::CDynamicHelpViewBar()
00027 {
00028 }
00029
00030 CDynamicHelpViewBar::~CDynamicHelpViewBar()
00031 {
00032 }
00033
00034 BEGIN_MESSAGE_MAP(CDynamicHelpViewBar, CDockablePane)
00035   ON_WM_CREATE()
00036   ON_WM_SIZE()
00037   ON_COMMAND(ID_DHELP1, OnDhelp1)
00038   ON_UPDATE_COMMAND_UI(ID_DHELP1, OnUpdateDhelp1)
00039   ON_COMMAND(ID_DHELP2, OnDhelp2)
00040   ON_UPDATE_COMMAND_UI(ID_DHELP2, OnUpdateDhelp2)
00041   ON_COMMAND(ID_DHELP3, OnDhelp3)
00042   ON_UPDATE_COMMAND_UI(ID_DHELP3, OnUpdateDhelp3)
00043   ON_WM_PAINT()
00044   ON_WM_SETFOCUS()
00045   ON_NOTIFY(TVN_SELCHANGED, idTree, OnSelectTree)
00046 END_MESSAGE_MAP()
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CDynamicHelpView message handlers
00050
00051 int CDynamicHelpViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00052 {
00053   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00054     return -1;
00055
00056   SetWindowText(_T("Articles"));
00057
00058   CRect rectDummy(0, 0, 0, 0);
00059   m_wndArticles.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |TVS_TRACKSELECT | TVS_NOTOOLTIPS | TVS_SINGLEEXPAND, rectDummy, this, idTree);
00060
00061   m_DynamicHelpImages.Create(IDB_DYNAMICHELP, 16, 0, RGB(255, 0, 0));
00062   m_wndArticles.SetImageList(&m_DynamicHelpImages, TVSIL_NORMAL);
00063
00064   m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_DYNAMIC_HELP);
00065   m_wndToolBar.LoadToolBar(IDR_DYNAMIC_HELP, 0, 0, TRUE /* Is locked */);
00066
00067   OnChangeVisualStyle();
00068
00069   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
00070   m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
00071   m_wndToolBar.SetOwner(this);
00072
00073   // All commands will be routed via this control , not via the parent frame:
00074   m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
00075
00076   FillHelp();
00077   AdjustLayout();
00078   return 0;
00079 }
00080
00081 void CDynamicHelpViewBar::OnSize(UINT nType, int cx, int cy)
00082 {
00083   CDockablePane::OnSize(nType, cx, cy);
00084   AdjustLayout();
00085 }
00086
00087 void CDynamicHelpViewBar::OnEraseWorkArea(CDC* /*pDC*/, CRect /*rectWorkArea*/)
00088 {
00089   // Do nothing, favorites tree covers the whole working area
00090 }
00091
00092 void CDynamicHelpViewBar::OnSelectTree(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00093 {
00094   // NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00095
00096   HTREEITEM hTreeItem = m_wndArticles.GetSelectedItem();
00097   if (hTreeItem != NULL)
00098   {
00099   }
00100
00101   *pResult = 0;
00102 }
00103
00104 void CDynamicHelpViewBar::FillHelp()
00105 {
00106   HTREEITEM hTreeItem = m_wndArticles.InsertItem(_T("Samples"), 0, 2, TVI_ROOT);
00107   m_wndArticles.SetItemData(hTreeItem, (DWORD) 1);
00108
00109   hTreeItem = m_wndArticles.InsertItem(_T("Visual Studio Sample"), 5, 5, hTreeItem);
00110   m_wndArticles.SetItemData(hTreeItem, (DWORD) 2);
00111
00112   hTreeItem = m_wndArticles.InsertItem(_T("Getting Started"), 1, 3, TVI_ROOT);
00113   m_wndArticles.SetItemData(hTreeItem, (DWORD) 1);
00114
00115   hTreeItem = m_wndArticles.InsertItem(_T("Customizing Dynamic Help"), 5, 5, hTreeItem);
00116   m_wndArticles.SetItemData(hTreeItem, (DWORD) 2);
00117 }
00118
00119 void CDynamicHelpViewBar::AdjustLayout()
00120 {
00121   if (GetSafeHwnd() == NULL)
00122   {
00123     return;
00124   }
00125
00126   CRect rectClient;
00127   GetClientRect(rectClient);
00128
00129   int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;
00130
00131   m_wndToolBar.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
00132   m_wndArticles.SetWindowPos(NULL, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
00133 }
00134
00135 void CDynamicHelpViewBar::OnDhelp1()
00136 {
00137   // TODO: Add your command handler code here
00138 }
00139
00140 void CDynamicHelpViewBar::OnUpdateDhelp1(CCmdUI* /*pCmdUI*/)
00141 {
00142   // TODO: Add your command update UI handler code here
00143 }
00144
00145 void CDynamicHelpViewBar::OnDhelp2()
00146 {
00147   // TODO: Add your command handler code here
00148 }
00149
00150 void CDynamicHelpViewBar::OnUpdateDhelp2(CCmdUI* /*pCmdUI*/)
00151 {
00152   // TODO: Add your command update UI handler code here
00153 }
00154
00155 void CDynamicHelpViewBar::OnDhelp3()
00156 {
00157   // TODO: Add your command handler code here
00158 }
00159
00160 void CDynamicHelpViewBar::OnUpdateDhelp3(CCmdUI* /*pCmdUI*/)
00161 {
00162   // TODO: Add your command update UI handler code here
00163 }
00164
00165 void CDynamicHelpViewBar::OnPaint()
00166 {
00167   CPaintDC dc(this); // device context for painting
00168
00169   CRect rectTree;
00170   m_wndArticles.GetWindowRect(rectTree);
00171   ScreenToClient(rectTree);
00172
00173   rectTree.InflateRect(1, 1);
00174   dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
00175 }
00176
00177 void CDynamicHelpViewBar::OnSetFocus(CWnd* pOldWnd)
00178 {
00179   CDockablePane::OnSetFocus(pOldWnd);
00180   m_wndArticles.SetFocus();
00181 }
00182
00183 void CDynamicHelpViewBar::OnChangeVisualStyle()
00184 {
00185   m_wndToolBar.CleanUpLockedImages();
00186   m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_HELPTOOLBAR_24 : IDR_DYNAMIC_HELP, 0, 0, TRUE /* Locked */);
00187
00188   m_DynamicHelpImages.DeleteImageList();
00189
00190   UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_DYNAMICHELP24 : IDB_DYNAMICHELP;
00191
00192   CBitmap bmp;
00193   if (!bmp.LoadBitmap(uiBmpId))
00194   {
00195     TRACE(_T("Can't load bitmap: %x\n"), uiBmpId);
00196     ASSERT(FALSE);
00197     return;
00198   }
00199
00200   BITMAP bmpObj;
00201   bmp.GetBitmap(&bmpObj);
00202
00203   UINT nFlags = ILC_MASK;
00204
00205   nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;
00206
00207   m_DynamicHelpImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
00208   m_DynamicHelpImages.Add(&bmp, RGB(255, 255, 255));
00209
00210   m_wndArticles.SetImageList(&m_DynamicHelpImages, TVSIL_NORMAL);
00211 }
00212
00213
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/IMAGE/ImageCtl.h Source File

  • controls
  • IMAGE

ImageCtl.h

Go to the documentation of this file.
00001 // ImageCtl.h : Declaration of the CImageCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CImageCtrl : See ImageCtl.cpp for implementation.
00014
00015 class CImageCtrl : public COleControl
00016 {
00017   DECLARE_DYNCREATE(CImageCtrl)
00018
00019 // Constructor
00020 public:
00021   CImageCtrl();
00022
00023   void AutoSize();
00024   void InformSize();
00025   void InformDlStatus(CBitmapProperty::DLState dlState);
00026
00027   CBitmapProperty m_bitprop;
00028
00029 // Overrides
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CImageCtrl)
00032   public:
00033   virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00034   virtual void DoPropExchange(CPropExchange* pPX);
00035   virtual void OnResetState();
00036   virtual DWORD GetControlFlags();
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 protected:
00041   ~CImageCtrl();
00042
00043   DECLARE_OLECREATE_EX(CImageCtrl)    // Class factory and guid
00044   DECLARE_OLETYPELIB(CImageCtrl)      // GetTypeInfo
00045   DECLARE_PROPPAGEIDS(CImageCtrl)     // Property page IDs
00046   DECLARE_OLECTLTYPE(CImageCtrl)      // Type name and misc status
00047
00048 // Message maps
00049   //{{AFX_MSG(CImageCtrl)
00050     // NOTE - ClassWizard will add and remove member functions here.
00051     //    DO NOT EDIT what you see in these blocks of generated code !
00052   //}}AFX_MSG
00053   DECLARE_MESSAGE_MAP()
00054
00055 // Dispatch maps
00056   //{{AFX_DISPATCH(CImageCtrl)
00057   BOOL m_bAutoSize;
00058   afx_msg void OnAutoSizeChanged();
00059   afx_msg BSTR GetImagePath();
00060   afx_msg void SetImagePath(LPCTSTR lpszNewValue);
00061   //}}AFX_DISPATCH
00062   DECLARE_DISPATCH_MAP()
00063
00064   afx_msg void AboutBox();
00065
00066 // Event maps
00067   //{{AFX_EVENT(CImageCtrl)
00068   //}}AFX_EVENT
00069   DECLARE_EVENT_MAP()
00070
00071 // Dispatch and event IDs
00072 public:
00073   enum {
00074   //{{AFX_DISP_ID(CImageCtrl)
00075   dispidAutoSize = 1L,
00076   dispidImagePath = 2L,
00077   //}}AFX_DISP_ID
00078   };
00079 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/piece.h Source File

  • general
  • spiro

piece.h

Go to the documentation of this file.
00001 // piece.h  : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef INC_PIECE_H
00014 #define INC_PIECE_H
00015
00016 #define PI  3.14159265359
00017
00018 class CSpiroView;  // forward declaration
00019
00020 class CSpiroRect : public CRect
00021 {
00022 public:
00023   CSpiroRect(int l = 0, int t = 0, int r = 0, int b = 0)
00024   {
00025     SetRect(l, t, r, b);
00026   }
00027
00028   CSpiroRect(CRect rect)
00029   {
00030     SetRect(rect.left, rect.top, rect.right, rect.bottom);
00031   }
00032
00033   void Scale(long nNumer, long nDenom)
00034   {
00035     // *= operator is not used to avoid precision errors
00036     SetRect(left * nNumer / nDenom, top * nNumer / nDenom,
00037             right * nNumer / nDenom, bottom * nNumer / nDenom);
00038   }
00039
00040   bool CSpiroRect::LineInRect(CPoint pt1, CPoint pt2) const
00041   {
00042     return !((pt1.x < left && pt2.x < left) ||
00043       (pt1.x > right && pt2.x > right) ||
00044       (pt1.y < bottom && pt2.y < bottom) ||
00045       (pt1.y > top && pt2.y > top));
00046   }
00047
00048   // intersectrect works with MM_SPIRO mapping mode while the windows API uses MM_TEXT mode.
00049   bool CSpiroRect::IntersectRect(CRect* prect) const
00050   {
00051     // invert the top and bottom values and call the windows api
00052     CRect rect1(this);
00053     CRect rect2(prect);
00054     rect1.NormalizeRect();
00055     rect2.NormalizeRect();
00056     return rect1.IntersectRect(&rect1, &rect2) != 0;
00057   }
00058 };
00059
00060 class CVector   // vectors in order to solve angle problems easily
00061 {
00062 public:
00063   double  m_dX;  // the internal representation is x and y
00064   double  m_dY;
00065
00066 public:
00067   CVector(long nRad, double dAngle);
00068   CVector(long x = 0, long y = 0);
00069   CVector(CPoint pt);
00070   CVector(CVector& vecClone);
00071
00072   CVector operator+(CVector vector2) const;
00073   CVector operator-(CVector vector2) const;
00074   CVector operator+(CPoint pt) const;
00075   CVector operator-(CPoint pt) const;
00076   CVector operator+=(CPoint pt);
00077   CVector&  operator=(CVector& vector2);
00078   CVector operator=(CPoint pt);
00079
00080   void SetValueLengthAngle(long nRadius, double dAngle);
00081
00082   CVector CVector::operator-=(CPoint pt)
00083   {
00084     m_dX -= static_cast<double>(pt.x);
00085     m_dY -= static_cast<double>(pt.y);
00086     return *this;
00087   }
00088
00089   operator  CPoint() const;
00090   double    GetAngle() const;
00091   long    GetLength() const;
00092   void    Scale(long nNumer, long nDenom);
00093 };
00094
00095 #define HIT_PEN_LOCATION  1
00096 #define HIT_NOTHING     0
00097
00098 class CBasePiece
00099 {
00100 public:
00101   COLORREF  m_co;
00102   CPoint    m_ptPos;
00103   bool    m_bIsWheel;  // is the piece an anchor or a wheel?
00104   COLORREF  m_rgCo[6];   // colors to be used while drawing current pattern
00105   int     m_nColorCount;  // total colors stored in m_rgCo
00106   int     m_icoCurrent;  // index to the current pen color
00107
00108   // Constructor, destructor
00109   CBasePiece(COLORREF co, bool bIsWheel = false);
00110
00111   // member functions
00112   virtual void Draw(CDC* pDC, long nZoomNumer, long nZoomDenom) const = 0;
00113
00114     // gets bounding rect for the piece.
00115   virtual void GetBoundingRect(CSpiroRect* prect, long nZoomNumer, long nZoomDenom) const = 0;
00116   virtual bool IsWheel() const {return m_bIsWheel;}
00117   virtual void SetPosition(CPoint pt) = 0;
00118
00119   // allow to set position using a contact point as reference.
00120   virtual void SetPosition(CPoint pt, double dAngle) = 0;
00121   virtual void GetContactPosition(CPoint poing, long nZoomNumer, long nZoomDenom,
00122               CPoint& ptContact, double& dAngle) = 0;
00123
00124   // get the region occupied by the piece in device coords
00125   virtual void GetDevPieceRgn(CDC* pDC, CRgn* pRgn,
00126             long nZoomNumer, long nZoomDenom, bool bInflate) const = 0;
00127
00128     // Get the piece region in logical coordinates.
00129   virtual void GetLogPieceRgn(CRgn* pRgn, long nZoomNumer, long nZoomDenom) const = 0;
00130
00131   virtual void GetPenLocation(CPoint* pPoint) const = 0;
00132   virtual void GetPenRect(CRect* pRect) const = 0;
00133   virtual bool SetPenLocation(CSpiroView* pView, CDC* pDC, CPoint point,
00134             long nZoomNumer, long nZoomDenom) = 0;
00135
00136
00137   virtual int HitTest(CDC* pDC, CPoint point, //point in device coords
00138         long nZoomNumer, long nZoomDenom) const = 0;
00139
00140   virtual double GetPerimeter() const = 0;
00141
00142   // calculates change in angle for wheel piece on every trace.
00143   virtual void SetAngleDelta(long nDistance, bool bReverse) = 0;
00144
00145   // advance one trace on the drawing.  deltaX and deltaY indicaate to the
00146   // wheel what the displacement on the anchor was.
00147   virtual void AdvanceTrace(CPoint& ptContact, double& dAngle,
00148                 double& dAngleExtra, bool bMove = true) = 0;
00149
00150   virtual long GetCycleError() const = 0;  // get cycle error for drawing
00151
00152   // pieces having inside areas, like a normal ring, must tell the wheel to
00153   // rotate clockwise when the wheel is used inside the anchor's hole.
00154   virtual bool ReverseWheelDirection() const = 0;
00155   virtual double GetFigData() const = 0;
00156   virtual void SetFigData(double dData) = 0;
00157   virtual void MovePiece(CSpiroView* pView, CPoint point, double dWheelData,
00158             long nZoomNumer, long nZoomDenom) = 0;
00159
00160   virtual void SetWheelMode(bool bWheel = true) = 0;
00161 #ifdef _DEBUG
00162   virtual long GetInternalRadius() const { return 0;}
00163 #endif
00164 };
00165
00166 #define TOTALWHEELS   7
00167 #define STEP_DISTANCE 10
00168
00169 class  CWheel : public CBasePiece
00170 {
00171 public:
00172
00173   // Data Members
00174   static long m_rgnRads[TOTALWHEELS];   // Array with sizes of wheels to be used.
00175   static COLORREF m_rgco[TOTALWHEELS];
00176   static COLORREF m_rgcoPattern[TOTALWHEELS];
00177
00178   long    m_nRadius;  // radius of the wheel
00179   COLORREF  m_coPattern;  // color of the pattern drawn on the wheel
00180   double    m_angleCurrent;  // current angle of rotation of the wheel
00181   double    m_anglePen;   // current angle of pen in the wheel
00182   double    m_dAngleCorrection;  // adjustment to make Figure close perfectly
00183   long    m_nPenRadius; // distance from the center to the pen
00184
00185   double    m_angleDelta;   // this is the change in angle for every trace.
00186
00187   // Constructor, destructor
00188   CWheel(long nRadius, COLORREF co, COLORREF coPattern);
00189
00190   // Member functions
00191
00192   virtual void Draw(CDC* pDC, long nZoomNumer, long nZoomDenom) const;
00193   virtual void GetBoundingRect(CSpiroRect* prect, long nZoomNumer, long nZoomDenom) const;
00194   virtual void SetPosition(CPoint pt);  // pt is the drop location from mouse click
00195
00196   //overload to set position using contact point as reference
00197   virtual void SetPosition(CPoint pt, double dAngle);
00198
00199   virtual void GetDevPieceRgn(CDC* pDC, CRgn* pRgn,
00200             long nZoomNumer, long nZoomDenom, bool bInflate) const;
00201
00202   // Get the piece region in logical coordinates.
00203   virtual void GetLogPieceRgn(CRgn* pRgn, long nZoomNumer, long nZoomDenom) const;
00204
00205   //GetContactPosition is given by an anchor to indicate the point of contact
00206   //with the anchor and the angle at which the wheel should be moving away from
00207   // the anchor.  Used for positioning wheels on an anchor.
00208   virtual void GetContactPosition(CPoint point, long nZoomNumer, long nZoomDenom,
00209                 CPoint& ptContact, double& dAngle);
00210
00211   virtual void GetPenLocation(CPoint* pPoint) const;
00212   virtual void GetPenRect(CRect* prect) const;
00213   virtual bool SetPenLocation(CSpiroView* pView, CDC* pDC, CPoint point,
00214                 long nZoomNumer, long nZoomDenom);
00215
00216   virtual int HitTest(CDC* pDC, CPoint point, long nZoomNumer, long nZoomDenom) const;
00217   virtual double GetPerimeter() const;
00218
00219   // calculates change in angle for wheel piece on every trace.
00220   virtual void SetAngleDelta(long nDistance, bool bReverse);
00221
00222   // advance one trace on the drawing.  deltaX and deltaY indicaate to the
00223   // wheel what the displacement on the anchor was.
00224   virtual void AdvanceTrace(CPoint& ptContact, double& dAngle,
00225                   double& dAngleExtra, bool bMove = true);
00226
00227   virtual long GetCycleError() const;
00228   virtual bool ReverseWheelDirection() const;
00229   virtual double GetFigData() const;
00230   virtual void SetFigData(double dData);
00231   virtual void MovePiece(CSpiroView* pView, CPoint point, double dWheelData,
00232             long nZoomNumer, long nZoomDenom);
00233
00234   virtual void SetWheelMode(bool bWheel = true);
00235 };
00236
00237 #define  TOTALRINGS 4
00238 #define  RINGWIDTH  25   // make every ring .35 inches wide.
00239
00240 class CRing : public CWheel
00241 {
00242 public:
00243   // Data Members
00244   static long m_rgnRads[TOTALRINGS];  // external radius of the ring
00245   static COLORREF m_rgco[TOTALRINGS];  // array of colors for the different rings
00246
00247   long  m_nRadiusInt;
00248   bool  m_bWheelInside;
00249
00250   // Constructor, destructor
00251   CRing(long nRadiusIn, long nRadiusOut,
00252           COLORREF co, COLORREF coPattern = 0);
00253
00254   // Member functions
00255   virtual void Draw(CDC* pDC, long nZoomNumer, long nZoomDenom) const;
00256   void GetInnerRect(CSpiroRect* pRect, long nZoomNumer, long nZoomDenom) const;
00257
00258   // Get the piece rgn in device coordinates
00259   virtual void GetDevPieceRgn(CDC* pDC, CRgn* pRgn,
00260           long nZoomNumer, long nZoomDenom, bool bInflate) const;
00261
00262   // Get the piece region in logical coordinates.
00263   virtual void GetLogPieceRgn(CRgn* pRgn, long nZoomNumer, long nZoomDenom) const;
00264
00265   virtual void GetContactPosition(CPoint point, long nZoomNumer, long nZoomDenom,
00266                       CPoint& ptContact, double& dAngle);
00267
00268   virtual double GetPerimeter() const;
00269
00270   // calculates change in angle for wheel piece on every trace.
00271   virtual void SetAngleDelta(long nDistance, bool bReverse);
00272
00273   // advance one trace on the drawing.  deltaX and deltaY indicaate to the
00274   // wheel what the displacement on the anchor was.
00275   virtual void AdvanceTrace(CPoint& ptContact, double& dAngle,
00276                       double& dAngleExtra, bool bMove = true);
00277
00278   virtual long GetCycleError() const;
00279   virtual bool ReverseWheelDirection() const;
00280
00281 #ifdef _DEBUG
00282   virtual long GetInternalRadius() const {return m_nRadiusInt;}
00283 #endif
00284 };
00285
00286 #endif //INC_PIE_H
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/dialogs.h Source File

  • ole
  • autoclik

dialogs.h

Go to the documentation of this file.
00001 // Dialogs.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CChangeText dialog
00014
00015 class CChangeText : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CChangeText(CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CChangeText)
00023   enum { IDD = IDD_CHANGE_TEXT };
00024   CString m_str;
00025   //}}AFX_DATA
00026
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CChangeText)
00031   protected:
00032   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036 protected:
00037
00038   // Generated message map functions
00039   //{{AFX_MSG(CChangeText)
00040     // NOTE: the ClassWizard will add member functions here
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/dmdoc.h Source File

  • general
  • dynamenu

dmdoc.h

Go to the documentation of this file.
00001 // dmdoc.h
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: interface of the CDynaMenuDoc class
00013 //
00014 // Functions:
00015 //   Most of this file was generated by AppWizard.  The functions
00016 //   which contain code specific to this sample are:
00017 //
00018 //      CDynaMenuDoc::CDynaMenuDoc()         -- document constructor
00019 //      CDynaMenuDoc::DoSelectColor()        -- handle text color commands
00020 //      CDynaMenuDoc::DoUpdateSelectColor()  -- update text color UI objects
00021 //      CDynaMenuDoc::GetMessageString()     -- get status msg for color cmds
00022 //      CDynaMenuDoc::OnCmdMsg()             -- perform command routing
00023 //      CDynaMenuDoc::OnColorOptions()       -- display color options dialog
00024 //
00025 //   These functions are implemented in dmdoc.cpp.
00026
00027 // This is the number of possible text colors.  It should match the
00028 // number of checkboxes which appear in the color options dialog.
00029 const int NUM_TEXTCOLOR = 4;
00030
00031 // This is the maximum length of a color name.
00032 const int MAX_COLORLEN = 20;
00033
00034 // This structure defines the relationship between a color name,
00035 // menu ID, and COLORREF value.  By defining this array, we don't
00036 // depend on the menu IDs being in any particular order, or being
00037 // sequential.
00038 struct DynaMenuDef {
00039    UINT     m_nString;                  // color name (in string table)
00040    UINT     m_nID;                      // menu ID
00041    COLORREF m_crf;                      // color value
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CDynaMenuDoc
00046
00047 class CDynaMenuDoc : public CDocument
00048 {
00049 protected: // create from serialization only
00050   CDynaMenuDoc();
00051   DECLARE_DYNCREATE(CDynaMenuDoc)
00052
00053 // Attributes
00054 public:
00055   int  m_iColor;                      // current text color
00056   BOOL m_abAllowColor[NUM_TEXTCOLOR]; // flags whether colors may be used
00057
00058 // This array defines the possible text colors.  There is a one-to-one
00059 // correspondence with m_abAllowColor. m_iColor is an index into both arrays.
00060    static DynaMenuDef m_aColorDef[NUM_TEXTCOLOR];
00061
00062 // Operations
00063 public:
00064   static BOOL GetMessageString(UINT nID, CString& strMessage);
00065
00066 // Implementation
00067 public:
00068   virtual ~CDynaMenuDoc();
00069   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00070
00071   virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
00072               AFX_CMDHANDLERINFO* pHandlerInfo);
00073
00074 #ifdef _DEBUG
00075   virtual void AssertValid() const;
00076   virtual void Dump(CDumpContext& dc) const;
00077 #endif
00078
00079 protected:
00080   virtual BOOL OnNewDocument();
00081
00082   void DoSelectColor(int iColor);
00083   void DoUpdateSelectColor(int iColor, CCmdUI* pExtra);
00084
00085 // Generated message map functions
00086 protected:
00087   //{{AFX_MSG(CDynaMenuDoc)
00088   afx_msg void OnColorOptions();
00089   //}}AFX_MSG
00090   DECLARE_MESSAGE_MAP()
00091 };
00092
00093 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCmnCtrl3App Member List

This is the complete list of members for CCmnCtrl3App, including all inherited members.
CCmnCtrl3App() | CCmnCtrl3App |
InitInstance() | CCmnCtrl3App | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl2/progctrl.h Source File

  • general
  • CmnCtrl2

progctrl.h

Go to the documentation of this file.
00001 // ProgCtrl.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CProgCtrlPage dialog
00015 #ifndef INC_PROGCTRL_H
00016 #define INC_PROGCTRL_H
00017
00018 class CProgCtrlPage : public CPropertyPage
00019 {
00020   DECLARE_DYNCREATE(CProgCtrlPage)
00021
00022 // Construction
00023 public:
00024   CProgCtrlPage();
00025   ~CProgCtrlPage();
00026
00027 // Dialog Data
00028   //{{AFX_DATA(CProgCtrlPage)
00029   enum { IDD = IDD_PROGCTRL };
00030   int     m_iDelta;
00031   UINT    m_uiStep;
00032   UINT    m_uiRangeFrom;
00033   UINT    m_uiPos;
00034   UINT    m_uiRangeTo;
00035   BOOL    m_bVertical;
00036   BOOL    m_bSmooth;
00037   //}}AFX_DATA
00038   CProgressCtrl   m_Progress;
00039
00040 // Overrides
00041   // ClassWizard generate virtual function overrides
00042   //{{AFX_VIRTUAL(CProgCtrlPage)
00043   protected:
00044   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00045   virtual BOOL OnInitDialog();
00046   //}}AFX_VIRTUAL
00047
00048 // Implementation
00049 protected:
00050
00051   // Generated message map functions
00052   //{{AFX_MSG(CProgCtrlPage)
00053   afx_msg void OnProgressStepit();
00054   afx_msg void OnSetpos();
00055   afx_msg void OnProgressSetdelta();
00056   afx_msg void OnFrom();
00057   afx_msg void OnTo();
00058   afx_msg void OnStep();
00059   afx_msg void OnStyleChange();
00060   //}}AFX_MSG
00061   DECLARE_MESSAGE_MAP()
00062
00063 };
00064
00065 #endif
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/resource.h Source File

  • ole
  • wordpad

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by WordPad.rc
00004 //
00005 #define IDR_SRVR_INPLACE                4
00006 #define IDR_SRVR_EMBEDDED               5
00007 #define IDR_CNTR_INPLACE                6
00008 #define IDP_OLE_INIT_FAILED             100
00009 #define IDP_FAILED_TO_CREATE            102
00010 #define IDS_INVALID_MEASUREMENT         103
00011 #define IDS_PLEASE_WAIT                 104
00012 #define IDS_COMPLETE                    105
00013 #define IDS_SAVE_UNSUPPORTED            106
00014 #define IDS_CLOSE_TEXT                  107
00015 #define IDS_RICHED_LOAD_FAIL            108
00016 #define IDS_DEFAULTFONT                 109
00017 #define IDS_TF_BUTTONS                  110
00018 #define IDC_COMBO_ALIGNMENT             111
00019 #define IDS_DEFAULTTEXTFONT             111
00020 #define IDS_SAVE_FORMAT_TEXT            112
00021 #define IDS_SAVE_FORMAT                 113
00022 #define IDS_SAVING                      113
00023 #define IDS_CLIP_RTF                    114
00024 #define IDS_FORMATTING                  115
00025 #define IDS_LEFT                        116
00026 #define IDS_CENTER                      117
00027 #define IDS_RIGHT                       118
00028 #define IDS_NOWRAP                      119
00029 #define IDS_MEASUREMENT_RANGE           119
00030 #define IDS_WRAPTOWINDOW                120
00031 #define IDS_INVALID_NUMBER              120
00032 #define IDS_WRAPTORULER                 121
00033 #define IDS_INVALID_FONTSIZE            121
00034 #define IDS_INCHES                      122
00035 #define IDS_CENTIMETERS                 123
00036 #define IDS_POINTS                      124
00037 #define IDS_PICAS                       125
00038 #define IDS_WORD6_WARNING               126
00039 #define IDS_WORD6_WARNING_BUTTONS       127
00040 #define IDR_MAINFRAME                   128
00041 #define IDS_TEXT_DOC                    129
00042 #define IDS_RICHTEXT_DOC                130
00043 #define IDB_BITMAP_TT                   130
00044 #define IDS_WRITE_DOC                   131
00045 #define IDB_RULER_BLOCK                 131
00046 #define IDS_ALL_DOC                     132
00047 #define IDB_RULER_BLOCKM                132
00048 #define IDS_WINWORD6_DOC                133
00049 #define IDB_RULER_DOWN                  133
00050 #define IDS_WINWORD2_DOC                134
00051 #define IDB_RULER_DOWNM                 134
00052 #define IDB_RULER_TAB                   135
00053 #define IDS_EXE_DOC                     135
00054 #define IDB_RULER_TABM                  136
00055 #define IDS_FILE_EXISTS                 136
00056 #define IDB_RULER_UP                    137
00057 #define IDS_MAPILOAD_FAILED             137
00058 #define IDS_OEMTEXT_DOC                 137
00059 #define IDB_RULER_UPM                   138
00060 #define IDS_CLIP_TEXT                   138
00061 #define IDB_FORMATBAR                   139
00062 #define IDS_CLIP_FILENAME               139
00063 #define IDR_MAINFRAME1                  140
00064 #define IDB_FORMATBAR_BIG               141
00065 #define IDR_COLOR_MENU                  142
00066 #define IDR_MAINFRAME_BIG               142
00067 #define IDD_FORMAT_PARA                 143
00068 #define IDR_MAINFRAME1_BIG              143
00069 #define IDR_SRVR_INPLACE_BIG            144
00070 #define IDD_FORMAT_TAB                  145
00071 #define IDD_LISTDIALOG                  147
00072 #define IDD_OPTIONS                     148
00073 #define IDS_DT1                         149
00074 #define IDD_PAGE_SETUP_DIALOG           150
00075 #define IDS_DT2                         150
00076 #define IDR_MENU1                       151
00077 #define IDS_DT3                         151
00078 #define IDD_DATEDIALOG                  151
00079 #define IDS_DT4                         152
00080 #define IDR_TEXT_POPUP                  152
00081 #define IDS_DT5                         153
00082 #define IDS_DT6                         154
00083 #define IDI_ICON_DOC                    154
00084 #define IDS_DT7                         155
00085 #define IDI_ICON_WRITE                  155
00086 #define IDS_DT8                         156
00087 #define IDS_DT9                         157
00088 #define IDD_SPLASH                      157
00089 #define IDS_DT10                        158
00090 #define IDD_OPTIONS_UNITS               158
00091 #define IDS_DT11                        159
00092 #define IDD_OPTIONS_WRAP                159
00093 #define IDS_DT12                        160
00094 #define IDD_OPTIONS_MARGINS             160
00095 #define IDD_FILENEWDIALOG               160
00096 #define IDS_DT13                        161
00097 #define IDB_BITMAP48                    162
00098 #define IDB_BITMAP_PRINTER              163
00099 #define IDS_FINISHED_SEARCH             164
00100 #define IDC_FONTNAME                    165
00101 #define IDI_ICON_TEXT                   165
00102 #define IDC_FONTSIZE                    166
00103 #define IDS_TITLE_FORMATBAR             167
00104 #define IDB_PRINTER                     167
00105 #define IDB_FONTTYPE                    167
00106 #define IDS_TITLE_TOOLBAR               168
00107 #define IDS_INCH1_ABBREV                169
00108 #define IDS_INCH2_ABBREV                170
00109 #define IDS_INCH3_ABBREV                171
00110 #define IDS_INCH4_ABBREV                172
00111 #define IDS_CM_ABBREV                   173
00112 #define IDS_POINT_ABBREV                174
00113 #define IDS_PICA_ABBREV                 175
00114 #define IDS_NOMORETABS                  176
00115 #define IDS_MAPI_FAIL                   177
00116 #define IDS_ERRSPACE                    178
00117 #define IDS_CANT_LOAD                   179
00118 #define IDS_TOOMANYFILES                180
00119 #define IDS_DIRFULL                     181
00120 #define IDS_SHAREVIOLATION              182
00121 #define IDS_TEXT_OPTIONS                183
00122 #define IDS_RTF_OPTIONS                 184
00123 #define IDS_WORD6_OPTIONS               185
00124 #define IDS_OPTIONS                     186
00125 #define IDS_WRITE_OPTIONS               187
00126 #define IDS_EMBEDDED_OPTIONS            188
00127 #define IDS_TEXT_DOCUMENT               189
00128 #define IDS_RTF_DOCUMENT                190
00129 #define IDS_WORD6_DOCUMENT              191
00130 #define IDS_WRITEPROTECT                192
00131 #define IDC_EDIT_LEFT                   1000
00132 #define IDC_EDIT_RIGHT                  1001
00133 #define IDC_EDIT_FIRST_LINE             1002
00134 #define IDC_BUTTON_SET                  1005
00135 #define IDC_EDIT_BM                     1005
00136 #define IDC_BUTTON_CLEAR                1006
00137 #define IDC_EDIT_LM                     1006
00138 #define IDC_BUTTON_CLEARALL             1007
00139 #define IDC_EDIT_RM                     1007
00140 #define IDC_STATIC_HEADING              1009
00141 #define IDC_COMBO_WRAP                  1011
00142 #define IDC_COMBO_UNITS                 1012
00143 #define IDC_EDIT_TM                     1016
00144 #define IDC_TEXT_ALIGNMENT              1017
00145 #define IDC_LISTDIALOG_LIST             1018
00146 #define IDC_DATEDIALOG_LIST             1018
00147 #define IDC_COMBO1                      1019
00148 #define IDC_TEXT_WRAP                   1020
00149 #define IDC_TEXT_UNITS                  1021
00150 #define IDC_BOX                         1022
00151 #define IDC_BIGICON                     1023
00152 #define IDC_UNITS_IN                    1024
00153 #define IDC_UNITS_CM                    1025
00154 #define IDC_WRAP_RULER                  1025
00155 #define IDC_UNITS_PT                    1026
00156 #define IDC_WRAP_WINDOW                 1026
00157 #define IDC_UNITS_PI                    1027
00158 #define IDC_WRAP_NONE                   1027
00159 #define IDC_CHECK_TOOLBAR               1028
00160 #define IDC_CHECK_FORMATBAR             1029
00161 #define IDC_WORDSEL                     1029
00162 #define IDC_CHECK_RULERBAR              1030
00163 #define IDC_CHECK_STATUSBAR             1031
00164 #define IDC_BOXT                        1032
00165 #define IDC_CHECK_PAGEBREAK             1033
00166 #define IDC_EDIT_BEFORE                 1035
00167 #define IDC_EDIT_AFTER                  1036
00168 #define IDC_SPIN_BEFORE                 1038
00169 #define IDC_SPIN_AFTER                  1039
00170 #define ID_CANCEL_EDIT_CNTR             32768
00171 #define ID_CANCEL_EDIT_SRVR             32769
00172 #define ID_PAGE_SETUP                   32771
00173 #define ID_VIEW_OPTIONS                 32776
00174 #define ID_INSERT_BULLET                32777
00175 #define ID_INSERT_DATE_TIME             32778
00176 #define ID_FORMAT_PARAGRAPH             32780
00177 #define ID_FORMAT_TABS                  32781
00178 #define ID_COLOR0                       32782
00179 #define ID_COLOR1                       32783
00180 #define ID_COLOR2                       32784
00181 #define ID_COLOR3                       32785
00182 #define ID_COLOR4                       32786
00183 #define ID_COLOR5                       32787
00184 #define ID_COLOR6                       32788
00185 #define ID_COLOR7                       32789
00186 #define ID_COLOR8                       32790
00187 #define ID_COLOR9                       32791
00188 #define ID_COLOR10                      32792
00189 #define ID_COLOR11                      32793
00190 #define ID_COLOR12                      32794
00191 #define ID_COLOR13                      32795
00192 #define ID_COLOR14                      32796
00193 #define ID_COLOR15                      32797
00194 #define ID_COLOR16                      32798
00195 #define ID_CHAR_BOLD                    32799
00196 #define ID_CHAR_ITALIC                  32800
00197 #define ID_CHAR_COLOR                   32801
00198 #define ID_CHAR_UNDERLINE               32802
00199 #define ID_PARA_LEFT                    32803
00200 #define ID_PARA_CENTER                  32804
00201 #define ID_PARA_RIGHT                   32805
00202 #define ID_PEN_PERIOD                   32807
00203 #define ID_PEN_SPACE                    32808
00204 #define ID_PEN_BACKSPACE                32809
00205 #define ID_PEN_NEWLINE                  32810
00206 #define ID_OLE_VERB_POPUP               32811
00207 #define ID_PEN_TOGGLE                   32812
00208 #define ID_PEN_LENS                     32813
00209 #define ID_PEN_TAB                      32814
00210 #define ID_VIEW_FORMATBAR               59396
00211 #define ID_VIEW_RULER                   59397
00212
00213 // Next default values for new objects
00214 //
00215 #ifdef APSTUDIO_INVOKED
00216 #ifndef APSTUDIO_READONLY_SYMBOLS
00217 #define _APS_3D_CONTROLS                     1
00218 #define _APS_NEXT_RESOURCE_VALUE        172
00219 #define _APS_NEXT_COMMAND_VALUE         32816
00220 #define _APS_NEXT_CONTROL_VALUE         1040
00221 #define _APS_NEXT_SYMED_VALUE           103
00222 #endif
00223 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/svritem.h Source File

  • ole
  • hiersvr

svritem.h

Go to the documentation of this file.
00001 // svritem.h : interface of the CServerNode class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef _SVRITEM_H
00013 #define _SVRITEM_H
00014
00015 #define CX_MARGIN   8
00016 #define CY_MARGIN   4
00017
00018 #define CX_INDENT   12
00019 #define CX_BACKDENT 5
00020 #define CY_SEPARATOR 4
00021
00022 class CServerDoc;
00023 class CServerItem;
00024
00025 // in this example a CServerNode represents a node in a graph
00026 class CServerNode : public CObject
00027 {
00028   DECLARE_SERIAL(CServerNode);
00029
00030 // Constructors
00031 public:
00032   CServerNode(CServerDoc* pServerDoc = NULL);
00033   static CServerNode* CreateRootNode(CServerDoc* pDoc);
00034   void InitRootNode();
00035
00036   // create from parent node
00037   CServerNode* CreateChildNode(LPCTSTR lpszDescription);
00038   CServerNode* PromptNewChildNode();  // create with user interface
00039
00040 // Attributes
00041   CString     m_strDescription;       // node description/caption
00042   CString     m_strLinkKey;           // link node if different from caption
00043   CServerItem* m_pServerItem;         // pointer to active item (may be NULL)
00044   CObList     m_listChild;            // list of children
00045   BOOL        m_bHideChildren;
00046   CServerDoc* m_pDocument;            // back pointer to document
00047
00048   enum EShape
00049   {
00050     shapeRect,
00051     shapeRound,
00052     shapeOval,
00053     shapeMax
00054   } m_shape;      // shape to draw
00055
00056   CServerDoc* GetDocument() const // return type-safe container
00057     { return (CServerDoc*)m_pDocument; }
00058   BOOL HasChildren() const
00059     { return m_listChild.GetCount() != 0; }
00060   BOOL IsChild(const CServerNode* pPotentialChild) const;
00061   // for popup context sensitive menus (in IDR_POPUPS)
00062   int GetPopupMenuIndex()
00063     { return 0; }   // 0 for simple menu
00064   CServerNode* GetNext(CServerNode *pItem, BOOL bInit = TRUE);
00065   CServerNode* GetPrev(CServerNode *pItem, BOOL bInit = TRUE);
00066   const CString& GetItemName();
00067   void UpdateItemName();
00068
00069 // Operations
00070   // bounding rect helpers
00071   void CalcNodeSize(CDC* pDC, CSize& sizeNode);
00072
00073   // drawing helpers
00074   BOOL Draw(CDC* pDC, CPoint pt, BOOL bSelected, CSize sizeNode);
00075   BOOL FindAndDelete(CServerNode *pItem);
00076     // find pItem, remove it and all of its children
00077   void DeleteChildNodes();    // remove all child nodes from a given node
00078   CServerNode* FindNode(LPCTSTR pszItemName);
00079
00080   // recursive bounding rect and drawing helpers
00081   void CalcBounding(CDC* pDC, CPoint& ptStart, CSize& sizeMax);
00082   int DrawTree(CDC* pDC, CPoint ptStart, CServerNode* pItemSel);
00083
00084   // simple UI helpers
00085   BOOL PromptChangeNode();
00086
00087   virtual void Serialize(CArchive& ar);        // for native data
00088
00089 // Implementation
00090 public:
00091   ~CServerNode();
00092
00093 protected:
00094   void SaveAsText(CArchive& ar, int nLevel);
00095
00096   friend class CServerItem;   // CServerItem is an extension of a CServerNode
00097 };
00098
00099
00100 // CServerItem represents the OLE glue to a CServerNode.  Such items
00101 //  are only allocated as necessary.
00102
00103 class CServerItem : public COleServerItem
00104 {
00105 // Constructors
00106 public:
00107   CServerItem(CServerDoc* pDoc, CServerNode* pNode);
00108
00109 // Attributes
00110   CServerNode* m_pServerNode;     // back pointer to node (may be NULL)
00111
00112   CServerDoc* GetDocument() const // return type-safe container
00113     { return (CServerDoc*)COleServerItem::GetDocument(); }
00114
00115 // Overridables
00116 protected:
00117   virtual void Serialize(CArchive& ar);   // called for clipboard save
00118
00119   virtual BOOL OnDraw(CDC* pDC, CSize& rSize);
00120   virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize);
00121   virtual void OnOpen();      // select the node when a link is shown
00122
00123   virtual BOOL OnRenderFileData(LPFORMATETC lpFormatEtc, CFile* pFile);
00124   virtual COleDataSource* OnGetClipboardData(BOOL bIncludeLink,
00125     LPPOINT pptOffset, LPSIZE pSize);
00126
00127 // Implementation
00128 public:
00129   ~CServerItem();
00130
00131 protected:
00132   // GetNativeClipboardData called by overrided OnGetClipboardData
00133   void GetNativeClipboardData(COleDataSource *pDataSource);
00134
00135   friend class CServerNode;   // CServerNode is an extension of CServerItem
00136 };
00137
00138 #endif
00139
00140 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/chicdial.h Source File

  • vc2008fp
  • WordPad

chicdial.h

Go to the documentation of this file.
00001 //
00002 // chicdial.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CCSDialog dialog
00016
00017 class CCSDialog : public CDialog
00018 {
00019 // Construction
00020 public:
00021   CCSDialog();
00022   CCSDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
00023   CCSDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
00024
00025 // Implementation
00026 protected:
00027   virtual const DWORD* GetHelpIDs() = 0;
00028
00029   // Generated message map functions
00030   //{{AFX_MSG(CCSDialog)
00031   virtual BOOL OnInitDialog();
00032   //}}AFX_MSG
00033   afx_msg LRESULT OnHelp(WPARAM wParam, LPARAM lParam);
00034   afx_msg LRESULT OnHelpContextMenu(WPARAM wParam, LPARAM lParam);
00035   DECLARE_MESSAGE_MAP()
00036 };
00037
00038 class CCSPropertyPage : public CPropertyPage
00039 {
00040 // Construction
00041 public:
00042   CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption = 0);
00043   CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
00044
00045 // Implementation
00046 protected:
00047   virtual const DWORD* GetHelpIDs() = 0;
00048
00049   // Generated message map functions
00050   //{{AFX_MSG(CCSPropertyPage)
00051   //}}AFX_MSG
00052   afx_msg LRESULT OnHelp(WPARAM wParam, LPARAM lParam);
00053   afx_msg LRESULT OnHelpContextMenu(WPARAM wParam, LPARAM lParam);
00054   DECLARE_MESSAGE_MAP()
00055 };
00056
00057 class CCSPropertySheet : public CPropertySheet
00058 {
00059 // Construction
00060 public:
00061   CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd = NULL,
00062     UINT iSelectPage = 0);
00063   CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd = NULL,
00064     UINT iSelectPage = 0);
00065 // Implementation
00066 protected:
00067   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00068   // Generated message map functions
00069   //{{AFX_MSG(CCSPropertySheet)
00070   //}}AFX_MSG
00071   afx_msg LRESULT OnHelp(WPARAM wParam, LPARAM lParam);
00072   afx_msg LRESULT OnHelpContextMenu(WPARAM wParam, LPARAM lParam);
00073   DECLARE_MESSAGE_MAP()
00074 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/SliderDoc.cpp Source File

  • vc2008fp
  • Slider

SliderDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Slider.h"
00013
00014 #include "SliderDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CSliderDoc
00024
00025 IMPLEMENT_DYNCREATE(CSliderDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CSliderDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CSliderDoc construction/destruction
00032
00033 CSliderDoc::CSliderDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CSliderDoc::~CSliderDoc()
00040 {
00041 }
00042
00043 BOOL CSliderDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CSliderDoc serialization
00058
00059 void CSliderDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CSliderDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CSliderDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CSliderDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CSliderDoc commands
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePicker.h Source File

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePicker.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #if !defined(AFX_TOOLBARDATETIMEPICKER_H__4B2F9451_37DA_46B8_B199_0D4496B694E4__INCLUDED_)
00012 #define AFX_TOOLBARDATETIMEPICKER_H__4B2F9451_37DA_46B8_B199_0D4496B694E4__INCLUDED_
00013
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif // _MSC_VER > 1000
00017
00018 #ifndef __AFXWIN_H__
00019   #error include 'stdafx.h' before including this file for PCH
00020 #endif
00021
00022 #include "resource.h"       // main symbols
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CToolbarDateTimePickerApp:
00026 // See ToolbarDateTimePicker.cpp for the implementation of this class
00027 //
00028
00029 class CToolbarDateTimePickerApp : public CWinAppEx
00030 {
00031 public:
00032   CToolbarDateTimePickerApp();
00033
00034   virtual void PreLoadState ();
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CToolbarDateTimePickerApp)
00039   public:
00040   virtual BOOL InitInstance();
00041   virtual int ExitInstance();
00042   //}}AFX_VIRTUAL
00043
00044 // Implementation
00045   //{{AFX_MSG(CToolbarDateTimePickerApp)
00046   afx_msg void OnAppAbout();
00047     // NOTE - the ClassWizard will add and remove member functions here.
00048     //    DO NOT EDIT what you see in these blocks of generated code !
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053
00054 extern CToolbarDateTimePickerApp theApp;
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057
00058 //{{AFX_INSERT_LOCATION}}
00059 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00060
00061 #endif // !defined(AFX_TOOLBARDATETIMEPICKER_H__4B2F9451_37DA_46B8_B199_0D4496B694E4__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/ptarryvw.cpp Source File

  • advanced
  • collect

ptarryvw.cpp

Go to the documentation of this file.
00001 // ptarryvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "ptarryvw.h"
00016 #include "resource.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CPointArrayView
00025
00026 IMPLEMENT_DYNCREATE(CPointArrayView, CFormView)
00027
00028 CPointArrayView::CPointArrayView()
00029   : CFormView(CPointArrayView::IDD)
00030 {
00031   //{{AFX_DATA_INIT(CPointArrayView)
00032   m_x = 0;
00033   m_y = 0;
00034   //}}AFX_DATA_INIT
00035 }
00036
00037 CPointArrayView::~CPointArrayView()
00038 {
00039 }
00040
00041 void CPointArrayView::OnInitialUpdate()
00042 {
00043   CFormView::OnInitialUpdate();
00044
00045   // Copy all of the points from the document's CArray of CPoints
00046   // to the listbox.
00047   m_ctlList.ResetContent();
00048   CArray<CPoint,CPoint>&ptArray = GetDocument()->m_ptArray;
00049   for (int nIndex = 0; nIndex < ptArray.GetSize(); nIndex++)
00050   {
00051     CPoint pt = ptArray[nIndex];
00052     AddPointToListBox(pt);
00053   }
00054 }
00055
00056
00057 void CPointArrayView::DoDataExchange(CDataExchange* pDX)
00058 {
00059   CFormView::DoDataExchange(pDX);
00060   //{{AFX_DATA_MAP(CPointArrayView)
00061   DDX_Control(pDX, IDC_LIST, m_ctlList);
00062   DDX_Text(pDX, IDC_X, m_x);
00063   DDX_Text(pDX, IDC_Y, m_y);
00064   //}}AFX_DATA_MAP
00065 }
00066
00067
00068 BEGIN_MESSAGE_MAP(CPointArrayView, CFormView)
00069   //{{AFX_MSG_MAP(CPointArrayView)
00070   ON_BN_CLICKED(IDC_ADD, OnAdd)
00071   ON_BN_CLICKED(IDC_UPDATE, OnUpdateButton)
00072   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00073   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00074   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00075   //}}AFX_MSG_MAP
00076 END_MESSAGE_MAP()
00077
00078
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CPointArrayView diagnostics
00082
00083 #ifdef _DEBUG
00084 void CPointArrayView::AssertValid() const
00085 {
00086   CFormView::AssertValid();
00087 }
00088
00089 void CPointArrayView::Dump(CDumpContext& dc) const
00090 {
00091   CFormView::Dump(dc);
00092 }
00093
00094 CCollectDoc* CPointArrayView::GetDocument() // non-debug version is inline
00095 {
00096   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00097 }
00098 #endif //_DEBUG
00099
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CPointArrayView internal implementation
00103
00104 void CPointArrayView::AddPointToListBox(CPoint pt, int nSel)
00105 {
00106   // Add new point to the listbox.
00107   CString str;
00108   str.Format(_T("(%i,%i)"), pt.x, pt.y);
00109   if (nSel == -1)
00110     nSel = m_ctlList.AddString(str);
00111   else
00112     m_ctlList.InsertString(nSel, str);
00113 }
00114
00115
00116 /////////////////////////////////////////////////////////////////////////////
00117 // CPointArrayView message handlers
00118
00119 void CPointArrayView::OnAdd()
00120 {
00121   if (UpdateData() != TRUE)
00122     return;
00123
00124   // Add new point to the CList<int,int>
00125   CPoint pt(m_x, m_y);
00126   GetDocument()->m_ptArray.Add(pt);
00127
00128   AddPointToListBox(pt);
00129 }
00130
00131 void CPointArrayView::OnUpdateButton()
00132 {
00133   if (UpdateData() != TRUE)
00134     return;
00135
00136   int nSel = m_ctlList.GetCurSel();
00137   if (nSel == LB_ERR)
00138   {
00139     AfxMessageBox(IDS_SELECT_POINT_TO_BE_UPDATED);
00140     return;
00141   }
00142
00143   // Replace the point in the CArray of CPoints.
00144   CPoint pt(m_x, m_y);
00145   GetDocument()->m_ptArray[nSel] = pt;
00146
00147   // Update the old point in the listbox by removing
00148   // the old entry and adding a new entry.
00149   m_ctlList.DeleteString(nSel);
00150   AddPointToListBox(pt, nSel);
00151 }
00152
00153 void CPointArrayView::OnRemove()
00154 {
00155   if (UpdateData() != TRUE)
00156     return;
00157
00158   int nSel = m_ctlList.GetCurSel();
00159   if (nSel == LB_ERR)
00160   {
00161     AfxMessageBox(IDS_SELECT_POINT_TO_BE_REMOVED);
00162     return;
00163   }
00164
00165   // Remove the point from the CArray of CPoints..
00166   GetDocument()->m_ptArray.RemoveAt(nSel);
00167
00168   // Remove the point from the listbox.
00169   m_ctlList.DeleteString(nSel);
00170 }
00171
00172 void CPointArrayView::OnRemoveAll()
00173 {
00174   // Remove all of the points from the CArray of CPoints.
00175   GetDocument()->m_ptArray.RemoveAll();
00176
00177   // Remove all of the points from the listbox.
00178   m_ctlList.ResetContent();
00179 }
00180
00181 void CPointArrayView::OnSelChangeList()
00182 {
00183   // Update the edit control to reflect the new selection
00184   // in the listbox.
00185   CPoint pt = GetDocument()->m_ptArray[m_ctlList.GetCurSel()];
00186   m_x = pt.x;
00187   m_y = pt.y;
00188   UpdateData(FALSE);
00189 }
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/stdafx.cpp Source File

  • general
  • mdidocvw

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  MDI.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CFolderListPopupWnd Member List

This is the complete list of members for CFolderListPopupWnd, including all inherited members.
CFolderListPopupWnd(const CObList &lstWorkspaces, CImageList &images, CWorkspaceObj *pSelWorkSpace) | CFolderListPopupWnd |
CloseMe(BOOL bKeep=FALSE) | CFolderListPopupWnd |
Create(const RECT &rect) | CFolderListPopupWnd | [virtual]
m_bNotify | CFolderListPopupWnd | [protected]
m_btnPin | CFolderListPopupWnd | [protected]
m_pSelWorkSpace | CFolderListPopupWnd | [protected]
m_rectCaption | CFolderListPopupWnd | [protected]
m_strCaption | CFolderListPopupWnd | [protected]
m_strClassName | CFolderListPopupWnd | [protected, static]
m_wndFolders | CFolderListPopupWnd | [protected]
OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized) | CFolderListPopupWnd | [protected]
OnActivateApp(BOOL bActive, DWORD dwThreadID) | CFolderListPopupWnd | [protected]
OnCancelMode() | CFolderListPopupWnd | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CFolderListPopupWnd | [protected]
OnEraseBkgnd(CDC *pDC) | CFolderListPopupWnd | [protected]
OnKeepVisible() | CFolderListPopupWnd | [protected]
OnNcDestroy() | CFolderListPopupWnd | [protected]
OnPaint() | CFolderListPopupWnd | [protected]
OnSelectTree(NMHDR *pNMHDR, LRESULT *pResult) | CFolderListPopupWnd | [protected]
OnSize(UINT nType, int cx, int cy) | CFolderListPopupWnd | [protected]
PreTranslateMessage(MSG *pMsg) | CFolderListPopupWnd | [virtual]
~CFolderListPopupWnd() | CFolderListPopupWnd | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WorkSpaceToolBar/WorkSpaceToolBarDoc.h Source File

  • vc2008fp
  • WorkSpaceToolBar

WorkSpaceToolBarDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CWorkSpaceToolBarDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CWorkSpaceToolBarDoc();
00017   DECLARE_DYNCREATE(CWorkSpaceToolBarDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CWorkSpaceToolBarDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/pal/resource.h Source File

  • controls
  • pal

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by PAL.RC
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_PAL                         1
00015 #define IDB_PAL                         1
00016 #define IDS_PAL_PPG                     2
00017 #define IDI_ABOUTDLL                    10
00018 #define IDD_ABOUTBOX_PAL                100
00019 #define IDS_PAL_PPG_CAPTION             101
00020 #define IDD_PROPPAGE_PAL                101
00021 #define IDC_LENGTHEDIT                  201
00022 #define IDS_EXCEP_CANTRESIZEPALETTE     300
00023
00024 // Next default values for new objects
00025 //
00026 #ifdef APSTUDIO_INVOKED
00027 #ifndef APSTUDIO_READONLY_SYMBOLS
00028
00029 #define _APS_NEXT_RESOURCE_VALUE        201
00030 #define _APS_NEXT_COMMAND_VALUE         32768
00031 #define _APS_NEXT_CONTROL_VALUE         202
00032 #define _APS_NEXT_SYMED_VALUE           101
00033 #endif
00034 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTipsDlg.h Source File

  • vc2008fp
  • DlgToolTips

DlgToolTipsDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "CustomToolTipCtrl.h"
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CDlgToolTipsDlg dialog
00017
00018 class CDlgToolTipsDlg : public CDialogEx
00019 {
00020 // Construction
00021 public:
00022   CDlgToolTipsDlg(CWnd* pParent = NULL);  // standard constructor
00023
00024 // Dialog Data
00025   enum { IDD = IDD_DLGTOOLTIPS_DIALOG };
00026
00027   public:
00028   virtual BOOL PreTranslateMessage(MSG* pMsg);
00029   protected:
00030   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00031
00032 // Implementation
00033 protected:
00034   HICON m_hIcon;
00035
00036   virtual BOOL OnInitDialog();
00037
00038   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00039   afx_msg void OnPaint();
00040   afx_msg HCURSOR OnQueryDragIcon();
00041   DECLARE_MESSAGE_MAP()
00042
00043   CCustomToolTipCtrl  m_ToolTip;
00044 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OwnerDrawMenu/OwnerDrawMenu.cpp Source File

  • vc2008fp
  • OwnerDrawMenu

OwnerDrawMenu.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "OwnerDrawMenu.h"
00013
00014 #include "MainFrm.h"
00015 #include "OwnerDrawMenuDoc.h"
00016 #include "OwnerDrawMenuView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // COwnerDrawMenuApp
00026
00027 BEGIN_MESSAGE_MAP(COwnerDrawMenuApp, CWinApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029   // Standard file based document commands
00030   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00031   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00032   // Standard print setup command
00033   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // COwnerDrawMenuApp construction
00038
00039 COwnerDrawMenuApp::COwnerDrawMenuApp()
00040 {
00041   // TODO: add construction code here,
00042   // Place all significant initialization in InitInstance
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only COwnerDrawMenuApp object
00047
00048 COwnerDrawMenuApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // COwnerDrawMenuApp initialization
00052
00053 BOOL COwnerDrawMenuApp::InitInstance()
00054 {
00055   // Initialize OLE libraries
00056   if (!AfxOleInit())
00057   {
00058     AfxMessageBox(IDP_OLE_INIT_FAILED);
00059     return FALSE;
00060   }
00061
00062   AfxEnableControlContainer();
00063
00064   // Standard initialization
00065   // If you are not using these features and wish to reduce the size
00066   //  of your final executable, you should remove from the following
00067   //  the specific initialization routines you do not need.
00068
00069   // Change the registry key under which our settings are stored.
00070   // TODO: You should modify this string to be something appropriate
00071   // such as the name of your company or organization.
00072   SetRegistryKey(_T("Microsoft\\MFC\\Samples"));
00073
00074   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00075
00076   SetRegistryBase (_T("Settings"));
00077
00078   // Initialize all Managers for usage. They are automatically constructed
00079   // if not yet present
00080   InitContextMenuManager();
00081   InitKeyboardManager();
00082
00083   // Register the application's document templates.  Document templates
00084   //  serve as the connection between documents, frame windows and views.
00085
00086   CSingleDocTemplate* pDocTemplate;
00087   pDocTemplate = new CSingleDocTemplate(
00088     IDR_MAINFRAME,
00089     RUNTIME_CLASS(COwnerDrawMenuDoc),
00090     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00091     RUNTIME_CLASS(COwnerDrawMenuView));
00092   AddDocTemplate(pDocTemplate);
00093
00094   // Parse command line for standard shell commands, DDE, file open
00095   CCommandLineInfo cmdInfo;
00096   ParseCommandLine(cmdInfo);
00097
00098   // Dispatch commands specified on the command line
00099   if (!ProcessShellCommand(cmdInfo))
00100     return FALSE;
00101
00102   LoadCustomState ();
00103
00104   // The one and only window has been initialized, so show and update it.
00105   m_pMainWnd->ShowWindow(SW_SHOW);
00106   m_pMainWnd->UpdateWindow();
00107
00108   return TRUE;
00109 }
00110
00111 /////////////////////////////////////////////////////////////////////////////
00112 // CAboutDlg dialog used for App About
00113
00114 class CAboutDlg : public CDialog
00115 {
00116 public:
00117   CAboutDlg();
00118
00119 // Dialog Data
00120   //{{AFX_DATA(CAboutDlg)
00121   enum { IDD = IDD_ABOUTBOX };
00122   //}}AFX_DATA
00123
00124   // ClassWizard generated virtual function overrides
00125   //{{AFX_VIRTUAL(CAboutDlg)
00126   protected:
00127   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00128   //}}AFX_VIRTUAL
00129
00130 // Implementation
00131 protected:
00132   //{{AFX_MSG(CAboutDlg)
00133     // No message handlers
00134   //}}AFX_MSG
00135   DECLARE_MESSAGE_MAP()
00136 };
00137
00138 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00139 {
00140   //{{AFX_DATA_INIT(CAboutDlg)
00141   //}}AFX_DATA_INIT
00142 }
00143
00144 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00145 {
00146   CDialog::DoDataExchange(pDX);
00147   //{{AFX_DATA_MAP(CAboutDlg)
00148   //}}AFX_DATA_MAP
00149 }
00150
00151 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00152   //{{AFX_MSG_MAP(CAboutDlg)
00153     // No message handlers
00154   //}}AFX_MSG_MAP
00155 END_MESSAGE_MAP()
00156
00157 // App command to run the dialog
00158 void COwnerDrawMenuApp::OnAppAbout()
00159 {
00160   CAboutDlg aboutDlg;
00161   aboutDlg.DoModal();
00162 }
00163
00164 /////////////////////////////////////////////////////////////////////////////
00165 // COwnerDrawMenuApp message handlers
00166
00167 int COwnerDrawMenuApp::ExitInstance()
00168 {
00169   return CWinAppEx::ExitInstance();
00170 }
00171
00172 void COwnerDrawMenuApp::PreLoadState ()
00173 {
00174
00175   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00176
00177   // TODO: add another context menus here
00178 }
00179
00180
00181 /////////////////////////////////////////////////////////////////////////////
00182 // COwnerDrawMenuApp message handlers
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMCaptionBarButton Member List

This is the complete list of members for CMSMCaptionBarButton, including all inherited members.
CMSMCaptionBarButton() | CMSMCaptionBarButton |
DECLARE_DYNCREATE(CMSMCaptionBarButton) | CMSMCaptionBarButton | [private]
GetSysCommand() const | CMSMCaptionBarButton |
OnDraw(CDC *pDC, const CRect &rect, UINT uiState) | CMSMCaptionBarButton | [protected, virtual]
SetSysCommand(UINT uiSysCommand) | CMSMCaptionBarButton |
~CMSMCaptionBarButton() | CMSMCaptionBarButton | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/HTMLEdit/GetURL.h Source File

  • internet
  • HTMLEdit

GetURL.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #if !defined(AFX_GETURL_H__2BCEEFB4_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
00011 #define AFX_GETURL_H__2BCEEFB4_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_
00012
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif // _MSC_VER > 1000
00016 // GetURL.h : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CGetURL dialog
00021 #include "addresscombo.h"
00022 class CGetURL : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CGetURL(CWnd* pParent = NULL);   // standard constructor
00027   CString m_URL;
00028 // Dialog Data
00029   //{{AFX_DATA(CGetURL)
00030   enum { IDD = IDD_URLDIALOG };
00031   //}}AFX_DATA
00032
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CGetURL)
00037   protected:
00038   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00039   //}}AFX_VIRTUAL
00040
00041 // Implementation
00042 protected:
00043   void OnSearch();
00044   void OnGo();
00045   void OnCloseup();
00046   CString m_szCurAddr;
00047   CComQIPtr<IWebBrowser2> m_spBrowser;
00048   CAddressCombo m_AddrCombo;
00049   // Generated message map functions
00050   //{{AFX_MSG(CGetURL)
00051   virtual void OnOK();
00052   virtual BOOL OnInitDialog();
00053   //}}AFX_MSG
00054   void OnDocumentComplete(LPDISPATCH pDisp, LPVARIANT pURL);
00055   DECLARE_MESSAGE_MAP()
00056   DECLARE_EVENTSINK_MAP()
00057 };
00058
00059 //{{AFX_INSERT_LOCATION}}
00060 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00061
00062 #endif // !defined(AFX_GETURL_H__2BCEEFB4_CE4C_11D1_AD5B_0060083E86DF__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/options.cpp Source File

  • vc2008fp
  • WordPad

options.cpp

Go to the documentation of this file.
00001 //
00002 // options.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "strings.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CDocOptions
00025
00026 void CDocOptions::SaveDockState(CDockState& ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
00027 {
00028   CMemFile file;
00029   CArchive ar(&file, CArchive::store);
00030   ds.Serialize(ar);
00031   ar.Close();
00032   int nSize = (int) file.GetLength();
00033   ASSERT(nSize < 4096);
00034   BYTE* p = new BYTE[nSize];
00035   file.SeekToBegin();
00036   file.Read(p, nSize);
00037   theApp.WriteProfileBinary(lpszProfileName, lpszLayout, p, nSize);
00038   delete [] p;
00039 }
00040
00041 void CDocOptions::SaveOptions(LPCTSTR lpszProfileName)
00042 {
00043   SaveDockState(m_ds1, lpszProfileName, szLayout1);
00044   SaveDockState(m_ds2, lpszProfileName, szLayout2);
00045   theApp.WriteProfileInt(lpszProfileName, szWrap, m_nWordWrap);
00046 }
00047
00048 void CDocOptions::LoadDockState(CDockState& ds, LPCTSTR lpszProfileName, LPCTSTR lpszLayout)
00049 {
00050   BYTE* p;
00051   UINT nLen = 0;
00052   if (theApp.GetProfileBinary(lpszProfileName, lpszLayout, &p, &nLen))
00053   {
00054     ASSERT(nLen < 4096);
00055     CMemFile file;
00056     file.Write(p, nLen);
00057     file.SeekToBegin();
00058     CArchive ar(&file, CArchive::load);
00059     ds.Serialize(ar);
00060     ar.Close();
00061     delete p;
00062   }
00063 }
00064
00065 void CDocOptions::LoadOptions(LPCTSTR lpszProfileName)
00066 {
00067   LoadDockState(m_ds1, lpszProfileName, szLayout1);
00068   LoadDockState(m_ds2, lpszProfileName, szLayout2);
00069   m_nWordWrap = theApp.GetProfileInt(lpszProfileName, szWrap, m_nDefWrap);
00070 }
00071
00072 /////////////////////////////////////////////////////////////////////////////
00073 // CUnit
00074
00075 const CUnit& CUnit::operator=(const CUnit& unit)
00076 {
00077   m_nTPU = unit.m_nTPU;
00078   m_nSmallDiv = unit.m_nSmallDiv;
00079   m_nMediumDiv = unit.m_nMediumDiv;
00080   m_nLargeDiv = unit.m_nLargeDiv;
00081   m_nMinMove = unit.m_nMinMove;
00082   m_nAbbrevID = unit.m_nAbbrevID;
00083   m_bSpaceAbbrev = unit.m_bSpaceAbbrev;
00084   m_strAbbrev = unit.m_strAbbrev;
00085   return *this;
00086 }
00087
00088 CUnit::CUnit(int nTPU, int nSmallDiv, int nMediumDiv, int nLargeDiv,
00089     int nMinMove, UINT nAbbrevID, BOOL bSpaceAbbrev)
00090 {
00091   m_nTPU = nTPU;
00092   m_nSmallDiv = nSmallDiv;
00093   m_nMediumDiv = nMediumDiv;
00094   m_nLargeDiv = nLargeDiv;
00095   m_nMinMove = nMinMove;
00096   m_nAbbrevID = nAbbrevID;
00097   m_bSpaceAbbrev = bSpaceAbbrev;
00098 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mtrecalc.cpp Source File

  • advanced
  • mtrecalc

mtrecalc.cpp

Go to the documentation of this file.
00001 // mtrecalc.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mtrecalc.h"
00014 #include "mainfrm.h"
00015 #include "calcthrd.h"
00016 #include "recaldoc.h"
00017 #include "recalcvw.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CRecalcApp
00026
00027 BEGIN_MESSAGE_MAP(CRecalcApp, CWinApp)
00028   //{{AFX_MSG_MAP(CRecalcApp)
00029   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00030   //}}AFX_MSG_MAP
00031   // Standard file based document commands
00032   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00033   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00034   // Standard print setup command
00035   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // CRecalcApp construction
00040
00041 CRecalcApp::CRecalcApp()
00042 {
00043 }
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // The one and only CRecalcApp object
00047
00048 CRecalcApp theApp;
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CRecalcApp initialization
00052
00053 BOOL CRecalcApp::InitInstance()
00054 {
00055   // WIN32 multi-threading APIs are not available on non-NT versions
00056   // of Windows less than Windows version 4.0.
00057   if ((::GetVersion() & 0x80000000) && (BYTE(::GetVersion()) < 4))
00058   {
00059     AfxMessageBox(IDS_CANNOT_RUN_ON_16BIT_WINDOWS_LT_4);
00060     return FALSE;
00061   }
00062
00063   // Standard initialization
00064
00065   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00066
00067   // Register document templates
00068
00069   CMultiDocTemplate* pDocTemplate;
00070   pDocTemplate = new CMultiDocTemplate(
00071     IDR_RECALCTYPE,
00072     RUNTIME_CLASS(CRecalcDoc),
00073     RUNTIME_CLASS(CMDIChildWnd),          // standard MDI child frame
00074     RUNTIME_CLASS(CRecalcView));
00075   AddDocTemplate(pDocTemplate);
00076
00077   // create main MDI Frame window
00078   CMainFrame* pMainFrame = new CMainFrame;
00079   if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
00080     delete pMainFrame;
00081     return FALSE;
00082   }
00083   m_pMainWnd = pMainFrame;
00084
00085   // Enable DDE Execute open
00086   EnableShellOpen();
00087   RegisterShellFileTypes(TRUE);
00088
00089   // Parse command line for standard shell commands, DDE, file open
00090   CCommandLineInfo cmdInfo;
00091   ParseCommandLine(cmdInfo);
00092
00093   // Dispatch commands specified on the command line
00094   if (!ProcessShellCommand(cmdInfo))
00095     return FALSE;
00096
00097   // Enable drag/drop open
00098   m_pMainWnd->DragAcceptFiles();
00099   pMainFrame->ShowWindow(m_nCmdShow);
00100   pMainFrame->UpdateWindow();
00101
00102   return TRUE;
00103 }
00104
00105 /////////////////////////////////////////////////////////////////////////////
00106 // CAboutDlg dialog used for App About
00107
00108 class CAboutDlg : public CDialog
00109 {
00110 public:
00111   CAboutDlg();
00112
00113 // Dialog Data
00114   //{{AFX_DATA(CAboutDlg)
00115   enum { IDD = IDD_ABOUTBOX };
00116   //}}AFX_DATA
00117
00118 // Implementation
00119 protected:
00120   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00121   //{{AFX_MSG(CAboutDlg)
00122     // No message handlers
00123   //}}AFX_MSG
00124   DECLARE_MESSAGE_MAP()
00125 };
00126
00127 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00128 {
00129   //{{AFX_DATA_INIT(CAboutDlg)
00130   //}}AFX_DATA_INIT
00131 }
00132
00133 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00134 {
00135   CDialog::DoDataExchange(pDX);
00136   //{{AFX_DATA_MAP(CAboutDlg)
00137   //}}AFX_DATA_MAP
00138 }
00139
00140 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00141   //{{AFX_MSG_MAP(CAboutDlg)
00142     // No message handlers
00143   //}}AFX_MSG_MAP
00144 END_MESSAGE_MAP()
00145
00146 // App command to run the dialog
00147 void CRecalcApp::OnAppAbout()
00148 {
00149   CAboutDlg aboutDlg;
00150   aboutDlg.DoModal();
00151 }
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 // CRecalcApp commands
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/MMXSurface.h Source File

  • general
  • MMXSwarm

MMXSurface.h

Go to the documentation of this file.
00001 // MMXSurface.h : interface of the MMX Specific Surface classes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013 #include "Surface.h"
00014
00015 class CMMXSurface32Intrinsic : public CSurface
00016 {
00017 public:
00018     virtual void AdjustWidth(int *pWidth);
00019     virtual void BlurBits(); // this is where the MMX action is
00020 protected:
00021   virtual void OnCreated();
00022 private:
00023   int m_dwpl;  // dwords per line
00024   int m_width; // number of times to iterate per line
00025 };
00026
00027 class CMMXSurface24Intrinsic : public CSurface
00028 {
00029 public:
00030     virtual void BlurBits(); // this is where the MMX action is
00031 protected:
00032   virtual void OnCreated();
00033 private:
00034   int m_dwpl;  // dwords per line
00035   int m_width; // number of times to iterate per line
00036   int m_delta; // number of pointer units to get from end of line to start of next
00037 };
00038
00039 class CMMXSurface16Intrinsic : public CSurface
00040 {
00041 public:
00042     virtual void AdjustWidth(int *pWidth);
00043     virtual void BlurBits(); // this is where the MMX action is
00044 protected:
00045   virtual void OnCreated();
00046 private:
00047   int m_qwpl;  // qwords per line
00048   int m_width; // number of times to iterate per line
00049 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CTaskDialog/stdafx.h Source File

  • general
  • CTaskDialog

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>                     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #ifdef _UNICODE
00046 #if defined _M_IX86
00047 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00048 #elif defined _M_X64
00049 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00050 #else
00051 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00052 #endif
00053 #endif
00054
00055
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MainFrm.h Source File

  • vc2008fp
  • MDITabsDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "WorkspaceBar.h"
00014
00015 #define CMDIFrameWnd CMDIFrameWndEx
00016
00017 class CMainFrame : public CMDIFrameWnd
00018 {
00019   DECLARE_DYNAMIC(CMainFrame)
00020 public:
00021   CMainFrame();
00022
00023 // Attributes
00024 public:
00025
00026 // Operations
00027 public:
00028   void UpdateMDITabs (BOOL bResetMDIChild);
00029   CMDIChildWndEx* CreateDocumentWindow (LPCTSTR lpcszDocName);
00030
00031 // Overrides
00032   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00033
00034 // Implementation
00035 public:
00036   virtual ~CMainFrame();
00037 #ifdef _DEBUG
00038   virtual void AssertValid() const;
00039   virtual void Dump(CDumpContext& dc) const;
00040 #endif
00041
00042 protected:  // control bar embedded members
00043   CMFCMenuBar m_wndMenuBar;
00044   CMFCStatusBar m_wndStatusBar;
00045   CMFCToolBar m_wndToolBar;
00046   CMFCToolBar m_wndToolBarTheme;
00047   CWorkspaceBar m_wndWorkSpace;
00048
00049 protected:
00050   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00051   afx_msg void OnViewThemeToolbar();
00052   afx_msg void OnUpdateViewThemeToolbar(CCmdUI* pCmdUI);
00053   afx_msg void OnMdiTabbed();
00054   afx_msg void OnUpdateMdiTabbed(CCmdUI* pCmdUI);
00055   afx_msg void OnViewCustomize();
00056   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00057   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00058   afx_msg void OnViewWorkspace();
00059   afx_msg void OnUpdateViewWorkspace(CCmdUI* pCmdUI);
00060   afx_msg void OnWindowManager();
00061   afx_msg void OnAppLook(UINT id);
00062   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00063   afx_msg LRESULT OnGetTabToolTip(WPARAM wp, LPARAM lp);
00064   afx_msg LRESULT OnPostRecalcLayout(WPARAM wp, LPARAM lp);
00065   afx_msg void OnSysColorChange();
00066
00067   DECLARE_MESSAGE_MAP()
00068
00069   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00070   virtual BOOL OnShowMDITabContextMenu (CPoint point, DWORD dwAllowedItems, BOOL bDrop);
00071
00072   UINT  m_nAppLook;
00073
00074   void SetupOffice2007Button ();
00075 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localctl.cpp Source File

  • controls
  • localize

localctl.cpp

Go to the documentation of this file.
00001 // localctl.cpp : Implementation of the CLocalizeCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "localize.h"
00014 #include "localctl.h"
00015 #include "localppg.h"
00016
00017 #ifdef _WIN32
00018   #include <winnt.h>
00019 #else
00020   #include <olenls.h>
00021 #endif
00022
00023
00024 #ifdef _DEBUG
00025 #undef THIS_FILE
00026 static char BASED_CODE THIS_FILE[] = __FILE__;
00027 #endif
00028
00029
00030 IMPLEMENT_DYNCREATE(CLocalizeCtrl, COleControl)
00031
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // Message map
00035
00036 BEGIN_MESSAGE_MAP(CLocalizeCtrl, COleControl)
00037   //{{AFX_MSG_MAP(CLocalizeCtrl)
00038   ON_WM_LBUTTONDOWN()
00039   ON_WM_LBUTTONUP()
00040   ON_WM_CANCELMODE()
00041   //}}AFX_MSG_MAP
00042   ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
00043 END_MESSAGE_MAP()
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // Dispatch map
00048
00049 BEGIN_DISPATCH_MAP(CLocalizeCtrl, COleControl)
00050   //{{AFX_DISPATCH_MAP(CLocalizeCtrl)
00051   DISP_PROPERTY_NOTIFY(CLocalizeCtrl, "Invert", m_invert, OnInvertChanged, VT_BOOL)
00052   DISP_STOCKPROP_CAPTION()
00053   //}}AFX_DISPATCH_MAP
00054   DISP_FUNCTION_ID(CLocalizeCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
00055 END_DISPATCH_MAP()
00056
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // Event map
00060
00061 BEGIN_EVENT_MAP(CLocalizeCtrl, COleControl)
00062   //{{AFX_EVENT_MAP(CLocalizeCtrl)
00063   EVENT_CUSTOM_ID("Click", DISPID_CLICK, FireClick, VTS_NONE)
00064   //}}AFX_EVENT_MAP
00065 END_EVENT_MAP()
00066
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069 // Property pages
00070
00071 // TODO: Add more property pages as needed.  Remember to increase the count!
00072 BEGIN_PROPPAGEIDS(CLocalizeCtrl, 1)
00073   PROPPAGEID(CLocalizePropPage::guid)
00074 END_PROPPAGEIDS(CLocalizeCtrl)
00075
00076
00077 /////////////////////////////////////////////////////////////////////////////
00078 // Initialize class factory and guid
00079
00080 IMPLEMENT_OLECREATE_EX(CLocalizeCtrl, "LOCALIZE.LocalizeCtrl.1",
00081   0x879d6fe0, 0x5470, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
00082
00083
00084 /////////////////////////////////////////////////////////////////////////////
00085 // Type library ID and version
00086
00087 IMPLEMENT_OLETYPELIB(CLocalizeCtrl, _tlid, _wVerMajor, _wVerMinor)
00088
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // Interface IDs
00092
00093 const IID BASED_CODE IID_DLocalize =
00094     { 0x35e3e52, 0x6745, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00095 const IID BASED_CODE IID_DLocalizeEvents =
00096     { 0x35e3e53, 0x6745, 0x101b, { 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa } };
00097
00098
00099 /////////////////////////////////////////////////////////////////////////////
00100 // Control type information
00101
00102 static const DWORD BASED_CODE _dwLocalizeOleMisc =
00103   OLEMISC_ACTIVATEWHENVISIBLE |
00104   OLEMISC_SETCLIENTSITEFIRST |
00105   OLEMISC_INSIDEOUT |
00106   OLEMISC_CANTLINKINSIDE |
00107   OLEMISC_RECOMPOSEONRESIZE;
00108
00109 IMPLEMENT_OLECTLTYPE(CLocalizeCtrl, IDS_LOCALIZE, _dwLocalizeOleMisc)
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CLocalizeCtrl::CLocalizeCtrlFactory::UpdateRegistry -
00114 // Adds or removes system registry entries for CLocalizeCtrl
00115
00116 BOOL CLocalizeCtrl::CLocalizeCtrlFactory::UpdateRegistry(BOOL bRegister)
00117 {
00118   if (bRegister)
00119     return AfxOleRegisterControlClass(
00120       AfxGetInstanceHandle(),
00121       m_clsid,
00122       m_lpszProgID,
00123       IDS_LOCALIZE,
00124       IDB_LOCALIZE,
00125       FALSE,                      //  Not insertable
00126       _dwLocalizeOleMisc,
00127       _tlid,
00128       _wVerMajor,
00129       _wVerMinor);
00130   else
00131     return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
00132 }
00133
00134
00135 /////////////////////////////////////////////////////////////////////////////
00136 // CLocalizeCtrl::CLocalizeCtrl - Constructor
00137
00138 CLocalizeCtrl::CLocalizeCtrl()
00139 {
00140   InitializeIIDs(&IID_DLocalize, &IID_DLocalizeEvents);
00141
00142   // Initialize inverted flag
00143   m_inverted = FALSE;
00144 }
00145
00146
00147 /////////////////////////////////////////////////////////////////////////////
00148 // CLocalizeCtrl::~CLocalizeCtrl - Destructor
00149
00150 CLocalizeCtrl::~CLocalizeCtrl()
00151 {
00152 }
00153
00154
00155 /////////////////////////////////////////////////////////////////////////////
00156 // CLocalizeCtrl::OnDraw - Drawing function
00157
00158 void CLocalizeCtrl::OnDraw(
00159       CDC* pdc, const CRect& rcBounds, const CRect&)
00160 {
00161   CFont *pOldFont;
00162   TEXTMETRIC tm;
00163
00164   // Load localized caption as Caption property
00165   const CString& strCaption = InternalGetText();
00166
00167   // Draw caption
00168   pOldFont = SelectStockFont(pdc);
00169   pdc->SetTextAlign(TA_CENTER | TA_TOP);
00170   GetStockTextMetrics(&tm);
00171
00172   pdc->ExtTextOut((rcBounds.left + rcBounds.right) / 2, (rcBounds.top + rcBounds.bottom - tm.tmHeight) / 2,
00173     ETO_CLIPPED | ETO_OPAQUE, rcBounds, strCaption, strCaption.GetLength(), NULL);
00174   pdc->SelectObject(pOldFont);
00175 }
00176
00177
00178 /////////////////////////////////////////////////////////////////////////////
00179 // CLocalizeCtrl::DoPropExchange - Persistence support
00180
00181 void CLocalizeCtrl::DoPropExchange(CPropExchange* pPX)
00182 {
00183   ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
00184   COleControl::DoPropExchange(pPX);
00185
00186   PX_Bool(pPX, _T("Invert"), m_invert, TRUE);
00187
00188   if (pPX->IsLoading())
00189   {
00190     CFontHolder& stockFont = InternalGetFont();
00191     stockFont.InitializeFont();
00192   }
00193 }
00194
00195
00196 /////////////////////////////////////////////////////////////////////////////
00197 // CLocalizeCtrl::OnResetState - Reset control to default state
00198
00199 void CLocalizeCtrl::OnResetState()
00200 {
00201   COleControl::OnResetState();  // Resets defaults found in DoPropExchange
00202
00203   LoadCaption();
00204 }
00205
00206
00207 /////////////////////////////////////////////////////////////////////////////
00208 // CLocalizeCtrl::AboutBox - Display a localized "About" box to the user
00209
00210 void CLocalizeCtrl::AboutBox()
00211 {
00212   BOOL bError = FALSE;
00213
00214   // Load resource module
00215   HINSTANCE hResHandle = GetResourceHandle(AmbientLocaleID());
00216
00217   if (!hResHandle)
00218     bError = TRUE;
00219
00220   if (!bError)
00221   {
00222     // Load dialog resource from resource module
00223     HINSTANCE hResPrev = AfxGetResourceHandle();
00224     AfxSetResourceHandle(hResHandle);
00225
00226     // Execute dialog
00227     CDialog dlgAbout(IDD_ABOUTBOX_LOCALIZE);
00228     dlgAbout.DoModal();
00229
00230     AfxSetResourceHandle(hResPrev);
00231     FreeLibrary(hResHandle);
00232   }
00233   else
00234   {
00235     // Execute dialog, using resource in control module
00236     CDialog dlgAbout(IDD_ABOUTBOX_LOCALIZE);
00237     dlgAbout.DoModal();
00238   }
00239 }
00240
00241
00242 /////////////////////////////////////////////////////////////////////////////
00243 // CLocalizeCtrl::OnInvertChanged sets the modified flag of the control
00244
00245 void CLocalizeCtrl::OnInvertChanged()
00246 {
00247   SetModifiedFlag();
00248 }
00249
00250
00251 /////////////////////////////////////////////////////////////////////////////
00252 // CLocalizeCtrl::OnLButtonDown inverts the control if the Invert property
00253 // is TRUE
00254
00255 void CLocalizeCtrl::OnLButtonDown(UINT nFlags, CPoint point)
00256 {
00257   CDC* pdc;
00258   CRect cRect;
00259
00260   // If Invert property is set to TRUE
00261   if (m_invert)
00262   {
00263     // Invert the control
00264     pdc = GetDC();
00265     GetClientRect(&cRect);
00266     pdc->InvertRect(&cRect);
00267     ReleaseDC(pdc);
00268
00269     // Capture the mouse
00270     SetCapture();
00271
00272     // Set inverted flag
00273     m_inverted = TRUE;
00274   }
00275
00276   COleControl::OnLButtonDown(nFlags, point);
00277 }
00278
00279
00280 /////////////////////////////////////////////////////////////////////////////
00281 // CLocalizeCtrl::OnLButtonUp fires the Click event.  First releases the
00282 // mouse capture and invalidates the control, if the control was inverted
00283 // and the mouse was captured in OnLButtonDown.
00284
00285 void CLocalizeCtrl::OnLButtonUp(UINT nFlags, CPoint point)
00286 {
00287   // If inverted flag is set
00288   if (m_inverted)
00289   {
00290     // Release the mouse
00291     ReleaseCapture();
00292
00293     // Invalidate to redraw (without inversion)
00294     InvalidateControl();
00295
00296     // Reset inverted flag
00297     m_inverted = FALSE;
00298   }
00299
00300   COleControl::OnLButtonUp(nFlags, point);
00301
00302   // Fire click event
00303   FireClick();
00304 }
00305
00306
00307 /////////////////////////////////////////////////////////////////////////////
00308 // CLocalizeCtrl::OnCancelMode invalidates the control if the control was
00309 // inverted in OnLButtonDown.
00310
00311 void CLocalizeCtrl::OnCancelMode()
00312 {
00313   // If inverted flag is set
00314   if (m_inverted)
00315   {
00316     // Invalidate to redraw (without inversion)
00317     InvalidateControl();
00318
00319     // Reset inverted flag
00320     m_inverted = FALSE;
00321   }
00322
00323   // Default processing will release the mouse, if captured
00324   COleControl::OnCancelMode();
00325 }
00326
00327
00328 /////////////////////////////////////////////////////////////////////////////
00329 // CLocalizeCtrl::OnAmbientPropertyChange - Reload locale-specific caption
00330 // and invalidate if the ambient LocaleID has changed.
00331
00332 void CLocalizeCtrl::OnAmbientPropertyChange(DISPID dispid)
00333 {
00334   if (dispid == DISPID_AMBIENT_LOCALEID)
00335   {
00336     LoadCaption();
00337
00338     InvalidateControl();
00339   }
00340 }
00341
00342
00343 /////////////////////////////////////////////////////////////////////////////
00344 // CLocalizeCtrl::LoadCaption - Load the locale-specific caption of the
00345 // control.
00346
00347 void CLocalizeCtrl::LoadCaption()
00348 {
00349   CString caption;
00350   BOOL bError = FALSE;
00351
00352   // Get the handle of the resource module
00353   HINSTANCE hResHandle = GetResourceHandle(AmbientLocaleID());
00354
00355   if (!hResHandle)
00356     bError = TRUE;
00357
00358   if (!bError)
00359   {
00360     // Load caption from resource module
00361     HINSTANCE hResPrev = AfxGetResourceHandle();
00362     AfxSetResourceHandle(hResHandle);
00363     caption.LoadString(IDS_CAPTION);
00364     AfxSetResourceHandle(hResPrev);
00365     FreeLibrary(hResHandle);
00366   }
00367   else
00368     // Load caption from control module resource
00369     caption.LoadString(IDS_CAPTION);
00370
00371   // Set caption property
00372   SetText(caption);
00373 }
00374
00375
00376 /////////////////////////////////////////////////////////////////////////////
00377 // CLocalizePropPage::GetResourceHandle - Load module which contains
00378 // locale-specific resources
00379
00380 HINSTANCE CLocalizeCtrl::GetResourceHandle(LCID lcid)
00381 {
00382   LPCTSTR lpszResModule = NULL;
00383   HINSTANCE hResHandle = NULL;
00384
00385   // Use lcid to determine module that contains resources
00386   LANGID langID = LANGIDFROMLCID(lcid);
00387   unsigned short priLangID = (unsigned short) PRIMARYLANGID(langID);
00388   switch (priLangID)
00389   {
00390     case LANG_ENGLISH:
00391       break;
00392     case LANG_FRENCH:
00393       #ifdef _WIN32
00394         lpszResModule = (LPCTSTR)_T("lresfr32.dll");
00395       #else
00396         lpszResModule = (LPCTSTR)_T("locresfr.dll");
00397       #endif
00398       break;
00399     case LANG_GERMAN:
00400       #ifdef _WIN32
00401         lpszResModule = (LPCTSTR)_T("lresde32.dll");
00402       #else
00403         lpszResModule = (LPCTSTR)_T("locresde.dll");
00404       #endif
00405       break;
00406     case 0:
00407     default:
00408        break;
00409   }
00410
00411   // Load resource module
00412   if (lpszResModule != NULL)
00413     hResHandle = LoadLibrary(lpszResModule);
00414
00415 #ifndef _WIN32
00416   if (hResHandle <= HINSTANCE_ERROR)
00417     hResHandle = NULL;
00418 #endif
00419
00420   return hResHandle;
00421 }
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/testres2.h Source File

  • advanced
  • dllhusk

testres2.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 //{{NO_DEPENDENCIES}}
00011 // App Studio generated include file.
00012 // Used by TESTDLL2.RC
00013
00014 #define IDD_DIALOGBAR1                  8192
00015 #define IDR_LISTOUTPUT                  8193
00016
00017 // Next default values for new objects
00018 //
00019 #ifdef APSTUDIO_INVOKED
00020 #ifndef APSTUDIO_READONLY_SYMBOLS
00021
00022 #define _APS_NEXT_RESOURCE_VALUE        8194
00023 #define _APS_NEXT_COMMAND_VALUE         40960
00024 #define _APS_NEXT_CONTROL_VALUE         101
00025 #define _APS_NEXT_SYMED_VALUE           8193
00026 #endif
00027 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDinnerPage Member List

This is the complete list of members for CDinnerPage, including all inherited members.
CDinnerPage() | CDinnerPage |
DoDataExchange(CDataExchange *pDX) | CDinnerPage | [protected, virtual]
IDD enum value | CDinnerPage |
OnInitDialog() | CDinnerPage | [protected, virtual]
~CDinnerPage() | CDinnerPage |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/TaskPane.h Source File

  • vc2008fp
  • WordPad

TaskPane.h

Go to the documentation of this file.
00001 //
00002 // TaskPane.h : header file
00003 //
00004
00005 #pragma once
00006
00007 /////////////////////////////////////////////////////////////////////////////
00008 // CTaskPane window
00009
00010 class CTaskPane : public CMFCTasksPane
00011 {
00012 // Construction
00013 public:
00014   CTaskPane();
00015
00016 // Attributes
00017 protected:
00018   int m_nDocumentsGroup;
00019   CFont   m_Font;
00020   CTreeCtrl m_wndTree;
00021   CEdit   m_wndEdit;
00022
00023 // Operations
00024 public:
00025   void UpdateMRUFilesList ();
00026   void UpdateIcons ();
00027
00028 // Overrides
00029 public:
00030   // ClassWizard generated virtual function overrides
00031   //{{AFX_VIRTUAL(CTaskPane)
00032   //}}AFX_VIRTUAL
00033
00034 protected:
00035   BOOL CreateTreeWindow();
00036
00037 // Implementation
00038 public:
00039   virtual ~CTaskPane();
00040
00041   // Generated message map functions
00042 protected:
00043   //{{AFX_MSG(CTaskPane)
00044   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00045   //}}AFX_MSG
00046   DECLARE_MESSAGE_MAP()
00047 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/mdi.cpp Source File

  • general
  • mdi

mdi.cpp

Go to the documentation of this file.
00001 // mdi.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "mdi.h"
00014
00015 #include "mainfrm.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMdiApp
00024
00025 BEGIN_MESSAGE_MAP(CMdiApp, CWinApp)
00026   //{{AFX_MSG_MAP(CMdiApp)
00027   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00028   //}}AFX_MSG_MAP
00029 END_MESSAGE_MAP()
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CMdiApp construction
00033 // Place all significant initialization in InitInstance
00034
00035 CMdiApp::CMdiApp()
00036 {
00037 }
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // The one and only CMdiApp object
00041
00042 CMdiApp NEAR theApp;
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMdiApp initialization
00046
00047 BOOL CMdiApp::InitInstance()
00048 {
00049   // create main MDI Frame window
00050   CMainFrame* pMainFrame = new CMainFrame;
00051   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
00052   {
00053     // free the memory and return
00054     delete pMainFrame;
00055     return FALSE;
00056   }
00057
00058   pMainFrame->ShowWindow(m_nCmdShow);
00059   pMainFrame->UpdateWindow();
00060   m_pMainWnd = pMainFrame;
00061
00062   // load the two static menus
00063   return TRUE;
00064 }
00065
00066 /////////////////////////////////////////////////////////////////////////////
00067 // CMdiApp commands
00068
00069 void CMdiApp::OnAppAbout()
00070 {
00071   CDialog(IDD_ABOUTBOX).DoModal();
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // other globals
00076
00077 // Color array maps to Color menu
00078 COLORREF NEAR colorArray[] =
00079 {
00080   RGB (0, 0, 0),
00081   RGB (255, 0, 0),
00082   RGB (0, 255, 0),
00083   RGB (0, 0, 255),
00084   RGB (255, 255, 255)
00085 };
00086
00087 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/stdafx.cpp Source File

  • general
  • ctrlbars

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  stdafx.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/targetver.h Source File

  • vc2008fp
  • MenuSubSet

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TabOrdDg.H Source File

  • ole
  • TstCon

TabOrdDg.H

Go to the documentation of this file.
00001 // File: TabOrdDg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_TABORDERDLG_H__E042BBA9_E1E9_11D0_8E14_00C04FB68D60__INCLUDED_)
00011 #define AFX_TABORDERDLG_H__E042BBA9_E1E9_11D0_8E14_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // TabOrderDlg.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTabOrderDlg dialog
00021
00022 class CTabOrderDlg : public CDialog
00023 {
00024 // Construction
00025 public:
00026   CTabOrderDlg(CWnd* pParent = NULL);   // standard constructor
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CTabOrderDlg)
00030   enum { IDD = IDD_TABORDER };
00031   CDragListBox    m_lboxTabOrder;
00032   //}}AFX_DATA
00033
00034    CTypedPtrList< CObList, CTestContainer98Item* > m_lpTabOrder;
00035
00036 // Overrides
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CTabOrderDlg)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 protected:
00045
00046   // Generated message map functions
00047   //{{AFX_MSG(CTabOrderDlg)
00048   virtual BOOL OnInitDialog();
00049   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00050   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053 };
00054
00055 //{{AFX_INSERT_LOCATION}}
00056 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00057
00058 #endif // !defined(AFX_TABORDERDLG_H__E042BBA9_E1E9_11D0_8E14_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/NewControls/CustomProperties.h Source File

  • vc2008fp
  • NewControls

CustomProperties.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 class CCheckBoxProp : public CMFCPropertyGridProperty
00013 {
00014 public:
00015   CCheckBoxProp(const CString& strName, BOOL bCheck, LPCTSTR lpszDescr = NULL, DWORD dwData = 0);
00016
00017 protected:
00018   virtual BOOL OnEdit(LPPOINT /*lptClick*/) { return FALSE; }
00019   virtual void OnDrawButton(CDC* /*pDC*/, CRect /*rectButton*/) {}
00020   virtual void OnDrawValue(CDC* /*pDC*/, CRect /*rect*/) {}
00021   virtual BOOL HasButton() const { return FALSE; }
00022
00023   virtual BOOL PushChar(UINT nChar);
00024   virtual void OnDrawCheckBox(CDC * pDC, CRect rectCheck, BOOL bChecked);
00025   virtual void OnDrawName(CDC* pDC, CRect rect);
00026   virtual void OnClickName(CPoint point);
00027   virtual BOOL OnDblClk(CPoint point);
00028
00029 protected:
00030   CRect m_rectCheck;
00031 };
00032
00033 class CPasswordProp : public CMFCPropertyGridProperty
00034 {
00035 public:
00036   CPasswordProp(const CString& strName, const CString& strPassword, LPCTSTR lpszDescr = NULL, DWORD dwData = 0);
00037
00038 protected:
00039   virtual CWnd* CreateInPlaceEdit(CRect rectEdit, BOOL& bDefaultFormat);
00040   virtual CString FormatProperty();
00041 };
00042
00043 class CSliderProp : public CMFCPropertyGridProperty
00044 {
00045 public:
00046   CSliderProp(const CString& strName, long nValue, LPCTSTR lpszDescr = NULL, DWORD dwData = 0);
00047
00048   virtual BOOL OnUpdateValue();
00049
00050 protected:
00051   virtual CWnd* CreateInPlaceEdit(CRect rectEdit, BOOL& bDefaultFormat);
00052   virtual BOOL OnSetCursor() const { return FALSE; /* Use default */ }
00053 };
00054
00055 class CBoundedNumberPairProp : public CMFCPropertyGridProperty
00056 {
00057 public:
00058   CBoundedNumberPairProp(const CString& strGroupName, int nMinValue1, int nMaxValue1, int nMinValue2, int nMaxValue2, DWORD_PTR dwData = 0, BOOL bIsValueList = FALSE);
00059
00060   virtual BOOL OnUpdateValue();
00061
00062 private:
00063   int m_nMinValue1;
00064   int m_nMaxValue1;
00065   int m_nMinValue2;
00066   int m_nMaxValue2;
00067 };
00068
00069 class CBoundedNumberSubProp : public CMFCPropertyGridProperty
00070 {
00071 public:
00072   CBoundedNumberSubProp(const CString& strName, const COleVariant& varValue, int nMinValue, int nMaxValue, LPCTSTR lpszDescr = NULL);
00073
00074   virtual BOOL OnUpdateValue();
00075 private:
00076   int m_nMinValue;
00077   int m_nMaxValue;
00078 };
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CPropSliderCtrl window
00082
00083 class CPropSliderCtrl : public CSliderCtrl
00084 {
00085 // Construction
00086 public:
00087   CPropSliderCtrl(CSliderProp* pProp, COLORREF clrBack);
00088
00089 // Attributes
00090 protected:
00091   CBrush m_brBackground;
00092   COLORREF m_clrBack;
00093   CSliderProp* m_pProp;
00094
00095 // Implementation
00096 public:
00097   virtual ~CPropSliderCtrl();
00098
00099 protected:
00100   //{{AFX_MSG(CPropSliderCtrl)
00101   afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
00102   //}}AFX_MSG
00103   afx_msg void HScroll(UINT nSBCode, UINT nPos);
00104
00105   DECLARE_MESSAGE_MAP()
00106 };
00107
00108 class CIconListProp : public CMFCPropertyGridProperty
00109 {
00110 public:
00111   CIconListProp(const CString& strName, const CImageList& imageListIcons, int nSelectedIcon, CStringList* plstIconNames = NULL, LPCTSTR lpszDescr = NULL, DWORD dwData = 0);
00112
00113 protected:
00114   virtual CWnd* CreateInPlaceEdit(CRect rectEdit, BOOL& bDefaultFormat);
00115   virtual CComboBox* CreateCombo(CWnd* pWndParent, CRect rect);
00116   virtual void OnDrawValue(CDC* pDC, CRect rect);
00117
00118   CMFCToolBarImages m_imageListIcons;
00119   CStringList m_lstIconNames;
00120 };
00121
00122 /////////////////////////////////////////////////////////////////////////////
00123 // CIconCombo window
00124
00125 class CIconCombo : public CComboBox
00126 {
00127 // Construction
00128 public:
00129   CIconCombo(CMFCToolBarImages& imageListIcons, CStringList& lstIconNames);
00130
00131 // Attributes
00132 protected:
00133   CMFCToolBarImages& m_imageListIcons;
00134   CStringList& m_lstIconNames;
00135
00136 // Implementation
00137 public:
00138   virtual ~CIconCombo();
00139
00140 protected:
00141   //{{AFX_MSG(CIconCombo)
00142   afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
00143   afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00144   //}}AFX_MSG
00145
00146   DECLARE_MESSAGE_MAP()
00147 };
00148
00149 class CComboBoxExProp : public CMFCPropertyGridProperty
00150 {
00151 public:
00152   CComboBoxExProp(const CString& strName, const CString& strValue, LPCTSTR lpszDescr = NULL, DWORD dwData = 0, CImageList* pImageList = NULL);
00153
00154   BOOL AddOption(LPCTSTR lpszOption, int nIcon = -1, int nIndent = 0);
00155
00156 protected:
00157   virtual CComboBox* CreateCombo(CWnd* pWndParent, CRect rect);
00158   virtual BOOL OnEdit(LPPOINT lptClick);
00159
00160   CImageList* m_pImageList;
00161   CArray<int, int> m_lstIcons;
00162   CArray<int, int> m_lstIndents;
00163 };
00164
00165 class COwnerDrawDescrProp : public CMFCPropertyGridProperty
00166 {
00167 public:
00168   COwnerDrawDescrProp(const CString& strName, const COleVariant& varValue);
00169
00170 protected:
00171   virtual void OnDrawDescription(CDC* pDC, CRect rect);
00172 };
00173
00174 class CTwoButtonsProp : public CMFCPropertyGridProperty
00175 {
00176 public:
00177   CTwoButtonsProp(const CString& strName, const COleVariant& varValue);
00178
00179 protected:
00180   virtual BOOL HasButton() const { return TRUE; }
00181   virtual void AdjustButtonRect();
00182   virtual void OnClickButton(CPoint point);
00183   virtual void OnDrawButton(CDC* pDC, CRect rectButton);
00184
00185   CImageList m_images;
00186 };
00187
00188 class CCustomDlgProp : public CMFCPropertyGridProperty
00189 {
00190 public:
00191   CCustomDlgProp(const CString& strName, const COleVariant& varValue);
00192
00193 protected:
00194   virtual BOOL HasButton() const { return TRUE; }
00195   virtual void OnClickButton(CPoint point);
00196 };
00197
00198
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/stdafx.h Source File

  • general
  • npp

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013 //
00014
00015 #define VC_EXTRALEAN
00016
00017 #include <afxwin.h>      // MFC core and standard components
00018 #include <afxext.h>         // MFC extensions
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XlistLib::_DXlist Member List

This is the complete list of members for XlistLib::_DXlist, including all inherited members.
AboutBox | XlistLib::_DXlist
AddPicItem | XlistLib::_DXlist
AddTextFontItem | XlistLib::_DXlist
AddTextItem | XlistLib::_DXlist
Clear | XlistLib::_DXlist
id | XlistLib::_DXlist
id | XlistLib::_DXlist
id | XlistLib::_DXlist
ItemBackColor | XlistLib::_DXlist
ItemForeColor | XlistLib::_DXlist
ItemForeColor | XlistLib::_DXlist
ItemText | XlistLib::_DXlist
ItemText | XlistLib::_DXlist
RemoveItem | XlistLib::_DXlist
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/summpage.h Source File

  • ole
  • drawcli

summpage.h

Go to the documentation of this file.
00001 // summpage.h : header file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 /////////////////////////////////////////////////////////////////////////////
00012 // CSummPage dialog
00013
00014 class CSummPage : public CPropertyPage
00015 {
00016     DECLARE_DYNCREATE(CSummPage)
00017
00018 // Construction
00019 public:
00020     CSummPage();
00021     ~CSummPage();
00022
00023 // Dialog Data
00024     //{{AFX_DATA(CSummPage)
00025   enum { IDD = IDD_SUMM_PAGE };
00026   CString m_strAuthor;
00027   CString m_strKeywd;
00028   CString m_strSubj;
00029   CString m_strCmt;
00030   CString m_strTempl;
00031   CString m_strTitle;
00032   CString m_strAppname;
00033   //}}AFX_DATA
00034
00035
00036 // Overrides
00037   // ClassWizard generate virtual function overrides
00038     //{{AFX_VIRTUAL(CSummPage)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 protected:
00045   // Generated message map functions
00046     //{{AFX_MSG(CSummPage)
00047     // NOTE: the ClassWizard will add member functions here
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050
00051 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTextDoc Member List

This is the complete list of members for CTextDoc, including all inherited members.
Serialize(CArchive &ar) CTextDoc [protected]
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCItem.Cpp Source File

  • ole
  • TstCon

TCItem.Cpp

Go to the documentation of this file.
00001 // CTestContainer98Item.cpp : implementation of the CTestContainer98Item class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CTestContainer98Item implementation
00022
00023 IMPLEMENT_SERIAL( CTestContainer98Item, COleClientItem, 0 )
00024
00025 CTestContainer98Item::CTestContainer98Item( CTestContainer98Doc* pContainer ) :
00026    COleClientItem( pContainer ),
00027    m_rect( 10, 10, 210, 210 ),
00028    m_dwEventCookie( 0 ),
00029    m_dwPropertyCookie( 0 ),
00030    m_tInsideOut( FALSE ),
00031    m_pDC( NULL ),
00032    m_tWindowless( FALSE ),
00033    m_tExtendedControl( FALSE ),
00034    m_tDisplayAsDefault( FALSE ),
00035    m_dwAspectPass2( DVASPECT_CONTENT )
00036 {
00037    m_dpLastParams.cArgs = 0;
00038    m_dpLastParams.cNamedArgs = 0;
00039    m_dpLastParams.rgvarg = NULL;
00040    m_dpLastParams.rgdispidNamedArgs = NULL;
00041
00042    m_tracker.m_nHandleSize = MARGIN_PIXELS+1;
00043    m_tracker.m_sizeMin.cx = 8;  // +MARGIN_PIXELS
00044    m_tracker.m_sizeMin.cy = 8;  // +MARGIN_PIXELS
00045    m_tracker.m_nStyle = CRectTracker::solidLine;
00046 }
00047
00048 CTestContainer98Item::~CTestContainer98Item()
00049 {
00050    ASSERT( m_pDC == NULL );
00051
00052    CleanupParams();
00053 }
00054
00055 IUnknown* CTestContainer98Item::GetInterfaceHook( const void* pv )
00056 {
00057    const IID* piid;
00058
00059 #ifdef _DEBUG
00060    // The standard MFC implementation of QueryInterface doesn't switch module
00061    // states, since most objects just use static data to implement QI.  Since
00062    // we're calling GetDocument(), though, we wind up calling ASSERT_VALID on
00063    // a bunch of MFC objects, and that requires the correct module state.
00064    // Because ASSERT_VALID doesn't do anything in release builds, we only need
00065    // to switch module states in debug builds.
00066    AFX_MANAGE_STATE( m_pModuleState );
00067 #endif  // _DEBUG
00068
00069    piid = (const IID*)pv;
00070
00071    if( *piid == m_infoEvents.GetIID() )
00072    {
00073     TCControlTrace( TRACELEVEL_NORMAL, this, "QI for event handler.\n" );
00074     return( &m_xEventHandler );
00075    }
00076    else if( *piid == IID_IOleInPlaceSiteEx )
00077    {
00078     if( GetDocument()->SupportsInterface( IID_IOleInPlaceSiteEx ) )
00079     {
00080      TCControlTrace( TRACELEVEL_NORMAL, this,
00081       "QI for IOleInPlaceSiteEx.\n" );
00082      return( &m_xOleInPlaceSiteWindowless );
00083     }
00084    }
00085    else if( *piid == IID_IOleInPlaceSiteWindowless )
00086    {
00087     if( GetDocument()->SupportsInterface( IID_IOleInPlaceSiteWindowless ) )
00088     {
00089      TCControlTrace( TRACELEVEL_NORMAL, this,
00090       "QI for IOleInPlaceSiteWindowless.\n" );
00091      return( &m_xOleInPlaceSiteWindowless );
00092     }
00093    }
00094    else if( *piid == IID_IAdviseSinkEx )
00095    {
00096     if( GetDocument()->SupportsInterface( IID_IAdviseSinkEx ) )
00097     {
00098      TCControlTrace( TRACELEVEL_NORMAL, this, "QI for IAdviseSinkEx.\n" );
00099      return( &m_xAdviseSinkEx );
00100     }
00101    }
00102
00103    return( NULL );
00104 }
00105
00106 BOOL CTestContainer98Item::CreateFromClipboard( CArchive& ar,
00107    IStorage* pStorage )
00108 {
00109    HRESULT hResult;
00110    CString strName;
00111    CLSID clsid;
00112
00113    ASSERT( !ar.IsStoring() );
00114    ASSERT( pStorage != NULL );
00115
00116    ar>>strName;
00117    ar>>m_rect;
00118
00119    hResult = ReadClassStg( pStorage, &clsid );
00120    if( FAILED( hResult ) )
00121    {
00122     return( FALSE );
00123    }
00124
00125    return( CreateOrLoad( clsid, strName, IID_IStorage, pStorage ) );
00126 }
00127
00128 BOOL CTestContainer98Item::CreateOrLoad( REFCLSID clsid, LPCTSTR pszName,
00129    REFIID iidPersistanceMedium, IUnknown* pPersistanceMedium )
00130 {
00131    HRESULT hResult;
00132    BOOL tSuccess;
00133    BOOL tQuickActivated;
00134    IPersistStreamInitPtr pPersistStreamInit;
00135    IPersistStreamPtr pPersistStream;
00136    IPersistStoragePtr pPersistStorage;
00137    IStreamPtr pStream;
00138    IStoragePtr pStorage;
00139
00140    ASSERT( m_lpObject == NULL );
00141    ASSERT( m_pDocument != NULL );
00142
00143    m_dwItemNumber = GetNewItemNumber();
00144    GetItemStorage();
00145    ASSERT( m_lpStorage != NULL );
00146
00147    m_tExtendedControl = TRUE;
00148    hResult = CExtendedControl::CreateInstance( clsid, this, NULL,
00149     IID_IOleObject, (void**)&m_lpObject );
00150    if( FAILED( hResult ) )
00151    {
00152     m_tExtendedControl = FALSE;
00153     // The control may not like being aggregated on, so just try to create it
00154     // directly and punt the extended control stuff.
00155     hResult = CoCreateInstance( clsid, NULL, CLSCTX_INPROC_SERVER|
00156     CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER, IID_IOleObject,
00157      (void**)&m_lpObject );
00158     if( SUCCEEDED( hResult ) )
00159     {
00160      TCControlTrace( TRACELEVEL_NORMAL, this,
00161       "Could not aggregate on the control, so it won't support extended properties.\n" );
00162     }
00163    }
00164    if( SUCCEEDED( hResult ) )
00165    {
00166     CString strUserType;
00167
00168     if( pszName == NULL )
00169     {
00170      GetUserType( USERCLASSTYPE_SHORT, strUserType );
00171      GetDocument()->CreateUniqueItemName( this, strUserType,
00172       m_strDisplayName );
00173     }
00174     else
00175     {
00176      GetDocument()->CreateUniqueItemName( this, pszName,
00177       m_strDisplayName );
00178     }
00179    }
00180
00181    if( m_tExtendedControl )
00182    {
00183     CString strName;
00184
00185     strName = GetDisplayName();
00186     m_pExtendedControl = m_lpObject;
00187     ASSERT( m_pExtendedControl != NULL );
00188     m_pExtendedControl->Name = _bstr_t( strName );
00189    }
00190
00191    if( SUCCEEDED( hResult ) )
00192    {
00193     hResult = InitControlInfo();
00194    }
00195
00196    tQuickActivated = FALSE;
00197    if( SUCCEEDED( hResult ) )
00198    {
00199     tQuickActivated = QuickActivate();
00200
00201     if( !tQuickActivated )
00202     {
00203      m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &m_dwMiscStatus );
00204      if( m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST )
00205      {
00206       hResult = m_lpObject->SetClientSite( GetClientSite() );
00207       if( FAILED( hResult ) )
00208       {
00209          TCControlTrace( TRACELEVEL_NORMAL, this,
00210           "SetClientSite failed.\n" );
00211       }
00212      }
00213     }
00214    }
00215
00216    // Initialize or load the object's state.
00217    if( SUCCEEDED( hResult ) )
00218    {
00219     if( iidPersistanceMedium == IID_NULL )
00220     {
00221      pPersistStreamInit = m_lpObject;
00222      if( pPersistStreamInit != NULL )
00223      {
00224       hResult = pPersistStreamInit->InitNew();
00225       if( hResult == E_NOTIMPL )
00226       {
00227          // Not implementing InitNew is OK.
00228          hResult = S_OK;
00229       }
00230      }
00231      else
00232      {
00233       pPersistStorage = m_lpObject;
00234       if( pPersistStorage != NULL )
00235       {
00236          hResult = pPersistStorage->InitNew( m_lpStorage );
00237       }
00238       else
00239       {
00240       // Assume the control doesn't care about persistance.
00241          hResult = S_OK;
00242       }
00243      }
00244     }
00245     else if( iidPersistanceMedium == IID_IStream )
00246     {
00247      pStream = pPersistanceMedium;
00248      ASSERT( pStream != NULL );
00249
00250      pPersistStreamInit = m_lpObject;
00251      if( pPersistStreamInit != NULL )
00252      {
00253       hResult = pPersistStreamInit->Load( pStream );
00254      }
00255      else
00256      {
00257       pPersistStream = m_lpObject;
00258       if( pPersistStream != NULL )
00259       {
00260          hResult = pPersistStream->Load( pStream );
00261       }
00262       else
00263       {
00264          hResult = E_NOINTERFACE;
00265       }
00266      }
00267     }
00268     else if( iidPersistanceMedium == IID_IStorage )
00269     {
00270      pStorage = pPersistanceMedium;
00271      ASSERT( pStorage != NULL );
00272
00273      pPersistStorage = m_lpObject;
00274      if( pPersistStorage != NULL )
00275      {
00276       hResult = pStorage->CopyTo( 0, NULL, NULL, m_lpStorage );
00277       if( SUCCEEDED( hResult ) )
00278       {
00279          hResult = pPersistStorage->Load( m_lpStorage );
00280       }
00281      }
00282      else
00283      {
00284       hResult = E_NOINTERFACE;
00285      }
00286     }
00287    }
00288
00289    if( SUCCEEDED( hResult ) )
00290    {
00291     if( !tQuickActivated )
00292     {
00293      if( !(m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST) )
00294      {
00295       hResult = m_lpObject->SetClientSite( GetClientSite() );
00296       if( FAILED( hResult ) )
00297       {
00298          TCControlTrace( TRACELEVEL_NORMAL, this,
00299           "SetClientSite failed.\n" );
00300       }
00301      }
00302     }
00303    }
00304
00305    tSuccess = FinishCreate( hResult );
00306
00307    return( tSuccess );
00308 }
00309
00310 BOOL CTestContainer98Item::Create( REFCLSID clsid, LPCTSTR pszName )
00311 {
00312    return( CreateOrLoad( clsid, pszName, IID_NULL, NULL ) );
00313 }
00314
00315 void CTestContainer98Item::CleanupParams()
00316 {
00317    UINT iArg;
00318    DISPPARAMS* pdpParams;
00319
00320    ASSERT_VALID( this );
00321
00322    pdpParams = &m_dpLastParams;
00323    if( pdpParams->rgvarg != NULL )
00324    {
00325     for( iArg = 0; iArg < pdpParams->cArgs; iArg++ )
00326     {
00327      VariantClear( &pdpParams->rgvarg[iArg] );
00328     }
00329
00330     delete[] (COleVariant*)pdpParams->rgvarg;
00331     pdpParams->rgvarg = NULL;
00332    }
00333
00334    if( pdpParams->rgdispidNamedArgs != NULL )
00335    {
00336     delete[] pdpParams->rgdispidNamedArgs;
00337     pdpParams->rgdispidNamedArgs = NULL;
00338    }
00339 }
00340
00341 void CTestContainer98Item::CopyParams( DISPPARAMS* pdpParams )
00342 {
00343    UINT iArg;
00344
00345    if( pdpParams == NULL )
00346    {
00347     return;  // Can't copy bogus params.
00348    }
00349
00350    if( m_dpLastParams.cArgs > 0 )
00351    {
00352     CleanupParams();
00353    }
00354
00355    // Change state information about incoming.
00356    m_dpLastParams.cArgs = pdpParams->cArgs;
00357    if( pdpParams->cArgs == 0 )
00358    {
00359     m_dpLastParams.rgvarg = NULL;
00360    }
00361    else
00362    {
00363     m_dpLastParams.rgvarg = new COleVariant[pdpParams->cArgs];
00364    }
00365
00366    m_dpLastParams.cNamedArgs = pdpParams->cNamedArgs;
00367    if( pdpParams->cNamedArgs == 0 )
00368    {
00369     m_dpLastParams.rgdispidNamedArgs = NULL;
00370    }
00371    else
00372    {
00373     m_dpLastParams.rgdispidNamedArgs = new DISPID[m_dpLastParams.cNamedArgs];
00374     for( iArg = 0; iArg < m_dpLastParams.cNamedArgs; iArg++ )
00375     {
00376      m_dpLastParams.rgdispidNamedArgs[iArg] =
00377       pdpParams->rgdispidNamedArgs[iArg];
00378     }
00379    }
00380
00381    for( iArg = 0; iArg < m_dpLastParams.cArgs; iArg++ )
00382    {
00383     HRESULT hr = VariantCopy( &m_dpLastParams.rgvarg[iArg], &pdpParams->rgvarg[iArg] );
00384     if(FAILED(hr)) return; //not safe to continue
00385    }
00386 }
00387
00388 class QAAMBIENTENTRY
00389 {
00390 public:
00391    DISPID dispid;
00392    DWORD dwQAFlag;
00393 };
00394
00395 static const QAAMBIENTENTRY g_aQAAmbients[] =
00396 {
00397    { DISPID_AMBIENT_SHOWHATCHING, QACONTAINER_SHOWHATCHING },
00398    { DISPID_AMBIENT_SHOWGRABHANDLES, QACONTAINER_SHOWGRABHANDLES },
00399    { DISPID_AMBIENT_USERMODE, QACONTAINER_USERMODE },
00400    { DISPID_AMBIENT_DISPLAYASDEFAULT, QACONTAINER_DISPLAYASDEFAULT },
00401    { DISPID_AMBIENT_UIDEAD, QACONTAINER_UIDEAD },
00402    { DISPID_AMBIENT_AUTOCLIP, QACONTAINER_AUTOCLIP },
00403    { DISPID_AMBIENT_MESSAGEREFLECT, QACONTAINER_MESSAGEREFLECT },
00404    { DISPID_AMBIENT_SUPPORTSMNEMONICS, QACONTAINER_SUPPORTSMNEMONICS }
00405 };
00406
00407 const int NUM_QAAMBIENTS = sizeof( g_aQAAmbients )/sizeof( g_aQAAmbients[0] );
00408
00409 BOOL CTestContainer98Item::QuickActivate()
00410 {
00411    HRESULT hResult;
00412    IQuickActivatePtr pQuickActivate;
00413    IDispatch* pFontDispatch;
00414    QACONTAINER qaContainer;
00415    QACONTROL qaControl;
00416    CTestContainer98Doc* pDoc;
00417    CAmbientProperty* pProperty;
00418    int iQAAmbient;
00419
00420    pDoc = GetDocument();
00421    if( !pDoc->UseQuickActivation() )
00422    {
00423     // The container doesn't want to use quick activation.
00424     return( FALSE );
00425    }
00426
00427    hResult = m_lpObject->QueryInterface( IID_IQuickActivate,
00428     (void**)&pQuickActivate );
00429    if( FAILED( hResult ) )
00430    {
00431     // The control doesn't support quick activation.
00432     return( FALSE );
00433    }
00434
00435    qaContainer.cbSize = sizeof( qaContainer );
00436    qaContainer.pClientSite = GetClientSite();
00437    qaContainer.pAdviseSink = NULL;
00438    qaContainer.pPropertyNotifySink = &m_xPropertyNotifySink;
00439    qaContainer.pUnkEventSink = &m_xEventHandler;
00440    qaContainer.dwAmbientFlags = 0;
00441
00442    for( iQAAmbient = 0; iQAAmbient < NUM_QAAMBIENTS; iQAAmbient++ )
00443    {
00444     pProperty = pDoc->FindAmbientProperty(
00445      g_aQAAmbients[iQAAmbient].dispid );
00446     if( pProperty != NULL )
00447     {
00448      ASSERT( pProperty->GetValue().vt == VT_BOOL );
00449      if( pProperty->GetValue().bVal )
00450      {
00451       qaContainer.dwAmbientFlags |= g_aQAAmbients[iQAAmbient].dwQAFlag;
00452      }
00453     }
00454    }
00455
00456    qaContainer.colorFore = 0;
00457    pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_FORECOLOR );
00458    if( pProperty != NULL )
00459    {
00460     ASSERT( pProperty->GetValue().vt == VT_COLOR );
00461     qaContainer.colorFore = pProperty->GetValue().lVal;
00462    }
00463
00464    qaContainer.colorBack = 0;
00465    pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_BACKCOLOR );
00466    if( pProperty != NULL )
00467    {
00468     ASSERT( pProperty->GetValue().vt == VT_COLOR );
00469     qaContainer.colorBack = pProperty->GetValue().lVal;
00470    }
00471
00472    qaContainer.pFont = NULL;
00473    pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_FONT );
00474    if( pProperty != NULL )
00475    {
00476     ASSERT( pProperty->GetValue().vt == VT_DISPATCH );
00477     pFontDispatch = pProperty->GetValue().pdispVal;
00478     hResult = pFontDispatch->QueryInterface( IID_IFont,
00479      (void**)&qaContainer.pFont );
00480     ASSERT( SUCCEEDED( hResult ) );
00481    }
00482
00483    qaContainer.pUndoMgr = NULL;
00484
00485    qaContainer.dwAppearance = 0;
00486    pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_APPEARANCE );
00487    if( pProperty != NULL )
00488    {
00489     ASSERT( pProperty->GetValue().vt == VT_I4 );
00490     qaContainer.dwAppearance = pProperty->GetValue().lVal;
00491    }
00492
00493    qaContainer.lcid = 0;
00494    pProperty = pDoc->FindAmbientProperty( DISPID_AMBIENT_LOCALEID );
00495    if( pProperty != NULL )
00496    {
00497     ASSERT( pProperty->GetValue().vt == VT_I4 );
00498     qaContainer.lcid = pProperty->GetValue().lVal;
00499    }
00500
00501    qaContainer.hpal = NULL;
00502    qaContainer.pBindHost = GetBindHost();
00503
00504    memset( &qaControl, 0, sizeof( qaControl ) );
00505    qaControl.cbSize = sizeof( qaControl );
00506
00507    hResult = pQuickActivate->QuickActivate( &qaContainer, &qaControl );
00508    if( FAILED( hResult ) )
00509    {
00510     return( FALSE );
00511    }
00512
00513    m_dwMiscStatus = qaControl.dwMiscStatus;
00514    m_dwViewStatus = qaControl.dwViewStatus;
00515    m_dwEventCookie = qaControl.dwEventCookie;
00516    m_dwPropertyCookie = qaControl.dwPropNotifyCookie;
00517
00518    TCControlTrace( TRACELEVEL_NORMAL, this, "Quick activation successful.\n" );
00519
00520    return( TRUE );
00521 }
00522
00523 BOOL CTestContainer98Item::FinishCreate( HRESULT hr )
00524 {
00525    BOOL tSuccess;
00526    IConnectionPointContainerPtr pCPContainer;
00527    HRESULT hResult;
00528
00529    tSuccess = COleClientItem::FinishCreate( hr );
00530    if( !tSuccess )
00531    {
00532     return( tSuccess );
00533    }
00534
00535    hResult = m_lpObject->QueryInterface( IID_IOleControl,
00536     (void**)&m_pOleControl );
00537    if( FAILED( hResult ) )
00538    {
00539     // That's OK, it might not be a control
00540     TCControlTrace( TRACELEVEL_NORMAL, this,
00541      "Could not get object's IOleControl interface\n" );
00542    }
00543
00544    hResult = m_lpObject->QueryInterface( IID_IConnectionPointContainer,
00545     (void**)&pCPContainer );
00546    if( SUCCEEDED( hResult ) )
00547    {
00548     if( m_dwEventCookie == 0 )
00549     {
00550      hResult = pCPContainer->FindConnectionPoint( m_infoEvents.GetIID(),
00551       &m_pEventCP );
00552      if( SUCCEEDED( hResult ) )
00553      {
00554       m_pEventCP->Advise( &m_xEventHandler, &m_dwEventCookie );
00555      }
00556     }
00557
00558     if( m_dwPropertyCookie == 0 )
00559     {
00560      hResult = pCPContainer->FindConnectionPoint( IID_IPropertyNotifySink,
00561       &m_pPropertyCP );
00562      if( SUCCEEDED( hResult ) )
00563      {
00564       m_pPropertyCP->Advise( &m_xPropertyNotifySink,
00565          &m_dwPropertyCookie );
00566      }
00567     }
00568    }
00569
00570    m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &m_dwMiscStatus );
00571    if( m_dwMiscStatus&OLEMISC_INSIDEOUT )
00572    {
00573     TCControlTrace( TRACELEVEL_VERBOSE, this, "Control is inside-out\n" );
00574     m_tInsideOut = TRUE;
00575    }
00576
00577    hResult = m_lpObject->QueryInterface( IID_IPointerInactive,
00578     (void**)&m_pPointerInactive );
00579    if( SUCCEEDED( hResult ) )
00580    {
00581     TCControlTrace( TRACELEVEL_NORMAL, this,
00582      "Control supports IPointerInactive.\n" );
00583    }
00584
00585    hResult = m_lpObject->QueryInterface( IID_IViewObjectEx,
00586     (void**)&m_pViewObjectEx );
00587    if( SUCCEEDED( hResult ) )
00588    {
00589     TCControlTrace( TRACELEVEL_NORMAL, this,
00590      "Control supports IViewObjectEx.\n" );
00591     m_pViewObjectEx->GetViewStatus( &m_dwViewStatus );
00592    }
00593    else
00594    {
00595     m_dwViewStatus = 0;
00596    }
00597
00598    UpdateFromServerExtent();
00599
00600    // Activate the item if it wants to be active all the time.
00601    if( ShouldActivateWhenVisible() )
00602    {
00603     if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
00604     {
00605      DoVerb( OLEIVERB_HIDE, GetDocument()->GetView() );
00606     }
00607     else
00608     {
00609      DoVerb( OLEIVERB_SHOW, GetDocument()->GetView() );
00610     }
00611    }
00612
00613    return( TRUE );
00614 }
00615
00616 CString CTestContainer98Item::GetDisplayName()
00617 {
00618    CString strName;
00619
00620    if( m_pExtendedControl != NULL )
00621    {
00622     strName = BSTR( m_pExtendedControl->Name );
00623    }
00624    else
00625    {
00626     strName = m_strDisplayName;
00627    }
00628
00629    return( strName );
00630 }
00631
00632 HRESULT CTestContainer98Item::GetControlInfo()
00633 {
00634    HRESULT hResult;
00635
00636    m_infoControl.cb = sizeof( m_infoControl );
00637    m_infoControl.hAccel = NULL;
00638    m_infoControl.cAccel = 0;
00639    m_infoControl.dwFlags = 0;
00640    hResult = m_pOleControl->GetControlInfo( &m_infoControl );
00641    if( FAILED( hResult ) )
00642    {
00643     if( hResult == E_NOTIMPL )
00644     {
00645      TCControlTrace( TRACELEVEL_NORMAL, this,
00646       "IOleControl::GetControlInfo() not implemented\n" );
00647     }
00648     else
00649     {
00650      return( hResult );
00651     }
00652    }
00653
00654    return( S_OK );
00655 }
00656
00657 COleDataSource* CTestContainer98Item::OnGetClipboardData( BOOL tIncludeLink,
00658    LPPOINT pptOffset, LPSIZE pSize )
00659 {
00660    COleDataSource* pSource;
00661    IStreamPtr pStream;
00662    HRESULT hResult;
00663    IPersistStreamInitPtr pPSI;
00664    ULONG nStringLength;
00665    CString strDisplayName;
00666    CLSID clsid;
00667
00668    ASSERT_VALID( this );
00669
00670    pSource = new COleDataSource;
00671    try
00672    {
00673     hResult = CreateStreamOnHGlobal( NULL, TRUE, &pStream );
00674     if( FAILED( hResult ) )
00675     {
00676      AfxThrowOleException( hResult );
00677     }
00678     pPSI = m_lpObject;
00679     if( pPSI == NULL )
00680     {
00681      AfxThrowOleException( E_NOINTERFACE );
00682     }
00683     strDisplayName = GetDisplayName();
00684     nStringLength = strDisplayName.GetLength();
00685     hResult = pStream->Write( &nStringLength, sizeof( ULONG ), NULL );
00686     if( FAILED( hResult ) )
00687     {
00688      AfxThrowOleException( hResult );
00689     }
00690     hResult = pStream->Write( LPCTSTR( strDisplayName ), nStringLength*
00691      sizeof( TCHAR ), NULL );
00692     if( FAILED( hResult ) )
00693     {
00694      AfxThrowOleException( hResult );
00695     }
00696
00697     pPSI->GetClassID( &clsid );
00698     hResult = WriteClassStm( pStream, clsid );
00699     if( FAILED( hResult ) )
00700     {
00701      AfxThrowOleException( hResult );
00702     }
00703     hResult = pPSI->Save( pStream, FALSE );
00704     if( FAILED( hResult ) )
00705     {
00706      AfxThrowOleException( hResult );
00707     }
00708
00709     LARGE_INTEGER nMove;
00710
00711     nMove.QuadPart = 0;
00712     pStream->Seek( nMove, STREAM_SEEK_SET, NULL );
00713
00714     CLIPFORMAT cf = CLIPFORMAT( ::RegisterClipboardFormat( _T(
00715      "TC98 Control" ) ) );
00716     STGMEDIUM stgmedium;
00717
00718     stgmedium.tymed = TYMED_ISTREAM;
00719     stgmedium.pstm = pStream;
00720     stgmedium.pstm->AddRef();
00721     stgmedium.pUnkForRelease = NULL;
00722
00723     pSource->CacheData( cf, &stgmedium );
00724
00725     GetClipboardData( pSource, tIncludeLink, pptOffset, pSize );
00726    }
00727    catch( ... )
00728    {
00729     delete pSource;
00730     throw;
00731    }
00732
00733    ASSERT_VALID( pSource );
00734
00735    return( pSource );
00736 }
00737
00738 BOOL CTestContainer98Item::GetPropertyPageCLSIDs( CArray< CLSID,
00739    CLSID& >& aclsidPages )
00740 {
00741    ISpecifyPropertyPagesPtr pSpecify;
00742    CAUUID pages;
00743    HRESULT hResult;
00744    ULONG iPage;
00745    CLSID clsid;
00746
00747    pSpecify = m_lpObject;
00748    if( pSpecify != NULL )
00749    {
00750     pages.cElems = 0;
00751     pages.pElems = NULL;
00752     hResult = pSpecify->GetPages( &pages );
00753     if( FAILED( hResult ) )
00754     {
00755      TCControlTrace( TRACELEVEL_NORMAL, this,
00756       "ISpecifyPropertyPages::GetPages() failed\n" );
00757      return( FALSE );
00758     }
00759
00760     for( iPage = 0; iPage < pages.cElems; iPage++ )
00761     {
00762      aclsidPages.Add( pages.pElems[iPage] );
00763     }
00764
00765     CoTaskMemFree( pages.pElems );
00766    }
00767
00768    if( m_pExtendedControl != NULL )
00769    {
00770     clsid = __uuidof( TCExtPage );
00771     aclsidPages.Add( clsid );
00772    }
00773
00774    return( TRUE );
00775 }
00776
00777
00778 HRESULT CTestContainer98Item::InitControlInfo()
00779 {
00780    IProvideClassInfoPtr pPCI;
00781    ITypeInfoPtr pClassInfo;
00782    ITypeInfoPtr pTypeInfo;
00783    HRESULT hResult;
00784    UINT iType;
00785    int iFlags;
00786    HREFTYPE hRefType;
00787    BOOL tFoundDefaultSource;
00788    BOOL tFoundDefaultInterface;
00789
00790    hResult = m_lpObject->QueryInterface( IID_IProvideClassInfo,
00791     (void**)&pPCI );
00792    if( FAILED( hResult ) )
00793    {
00794    TCControlTrace( TRACELEVEL_NORMAL, this,
00795     "Control doesn't support IProvideClassInfo" );
00796     return( S_OK );
00797    }
00798
00799    hResult = pPCI->GetClassInfo( &pClassInfo );
00800    if( FAILED( hResult ) )
00801    {
00802     return( hResult );
00803    }
00804
00805    CSmartTypeAttr pTypeAttr( pClassInfo );
00806
00807    hResult = pClassInfo->GetTypeAttr( &pTypeAttr );
00808    if( FAILED( hResult ) )
00809    {
00810     return( hResult );
00811    }
00812    ASSERT( pTypeAttr->typekind == TKIND_COCLASS );
00813
00814    tFoundDefaultSource = FALSE;
00815    tFoundDefaultInterface = FALSE;
00816    for( iType = 0; (iType < pTypeAttr->cImplTypes) && !(tFoundDefaultSource &&
00817     tFoundDefaultInterface); iType++ )
00818    {
00819     hResult = pClassInfo->GetImplTypeFlags( iType, &iFlags );
00820     if( SUCCEEDED( hResult ) )
00821     {
00822      if( (iFlags&IMPLTYPE_MASK) == IMPLTYPE_DEFAULTSOURCE )
00823      {
00824       ASSERT( !tFoundDefaultSource );
00825       tFoundDefaultSource = TRUE;
00826       hResult = pClassInfo->GetRefTypeOfImplType( iType, &hRefType );
00827       if( FAILED( hResult ) )
00828       {
00829          return( hResult );
00830       }
00831       hResult = pClassInfo->GetRefTypeInfo( hRefType, &pTypeInfo );
00832       if( FAILED( hResult ) )
00833       {
00834          return( hResult );
00835       }
00836       TRACE( "Events:\n" );
00837       hResult = m_infoEvents.Init( pTypeInfo );
00838       if( FAILED( hResult ) )
00839       {
00840          return( hResult );
00841       }
00842       pTypeInfo.Release();
00843      }
00844      else if( (iFlags&IMPLTYPE_MASK) == IMPLTYPE_DEFAULTINTERFACE )
00845      {
00846       ASSERT( !tFoundDefaultInterface );
00847       tFoundDefaultInterface = TRUE;
00848       hResult = pClassInfo->GetRefTypeOfImplType( iType, &hRefType );
00849       if( FAILED( hResult ) )
00850       {
00851          return( hResult );
00852       }
00853       hResult = pClassInfo->GetRefTypeInfo( hRefType, &pTypeInfo );
00854       if( FAILED( hResult ) )
00855       {
00856          return( hResult );
00857       }
00858       TRACE( "Methods\n" );
00859       hResult = m_infoMethods.Init( pTypeInfo );
00860       if( FAILED( hResult ) )
00861       {
00862          return( hResult );
00863       }
00864       pTypeInfo.Release();
00865      }
00866     }
00867    }
00868    if( !tFoundDefaultSource )
00869    {
00870     TCControlTrace( TRACELEVEL_NORMAL, this,
00871      "Could not find control's default source\n" );
00872    }
00873    if( !tFoundDefaultInterface )
00874    {
00875     TCControlTrace( TRACELEVEL_NORMAL, this,
00876      "Could not find control's default interface\n" );
00877     return( E_FAIL );
00878    }
00879
00880    return( S_OK );
00881 }
00882
00883 BOOL CTestContainer98Item::IsInvisibleAtRuntime() const
00884 {
00885    return( m_dwMiscStatus&OLEMISC_INVISIBLEATRUNTIME );
00886 }
00887
00888 BOOL CTestContainer98Item::IsWindowless() const
00889 {
00890    return( m_tWindowless );
00891 }
00892
00893 BOOL CTestContainer98Item::SupportsIPointerInactive() const
00894 {
00895    return( m_pPointerInactive != NULL );
00896 }
00897
00898 BOOL CTestContainer98Item::OnWindowlessDragEnter( COleDataObject* pDataObject,
00899    DWORD dwKeyState, CPoint point, DWORD* pdwDropEffect )
00900 {
00901    HRESULT hResult;
00902    POINTL pointl;
00903
00904    TRACE( "OnWindowlessDragEnter()\n" );
00905
00906    ENSURE( pdwDropEffect != NULL );
00907    *pdwDropEffect = DROPEFFECT_NONE;
00908
00909    if( m_pDropTarget == NULL )
00910    {
00911     // We haven't tried to drop on this control yet, or the control doesn't
00912     // support IDropTarget.
00913     hResult = m_pOleInPlaceObjectWindowless->GetDropTarget( &m_pDropTarget );
00914     if( FAILED( hResult ) )
00915     {
00916      // The control doesn't support IDropTarget.
00917      return( FALSE );
00918     }
00919    }
00920
00921    pointl.x = point.x;
00922    pointl.y = point.y;
00923    hResult = m_pDropTarget->DragEnter( pDataObject->m_lpDataObject, dwKeyState,
00924     pointl, pdwDropEffect );
00925    ASSERT( SUCCEEDED( hResult ) );
00926    if( hResult == S_FALSE )
00927    {
00928     // The control doesn't support any of the object's data formats.
00929     return( FALSE );
00930    }
00931
00932    return( TRUE );
00933 }
00934
00935 void CTestContainer98Item::OnWindowlessDragLeave()
00936 {
00937    HRESULT hResult;
00938
00939    TRACE( "OnWindowlessDragLeave()\n" );
00940
00941    ASSERT( m_pDropTarget != NULL );
00942
00943    hResult = m_pDropTarget->DragLeave();
00944    ASSERT( SUCCEEDED( hResult ) );
00945 }
00946
00947 void CTestContainer98Item::OnWindowlessDragOver( DWORD dwKeyState,
00948    CPoint point, DWORD* pdwDropEffect )
00949 {
00950    HRESULT hResult;
00951    POINTL pointl;
00952
00953    ENSURE( pdwDropEffect != NULL );
00954    *pdwDropEffect = DROPEFFECT_NONE;
00955
00956    ASSERT( m_pDropTarget != NULL );
00957
00958    pointl.x = point.x;
00959    pointl.y = point.y;
00960    hResult = m_pDropTarget->DragOver( dwKeyState, pointl, pdwDropEffect );
00961    ASSERT( SUCCEEDED( hResult ) );
00962 }
00963
00964 void CTestContainer98Item::OnWindowlessDrop( COleDataObject* pDataObject,
00965    DWORD dwKeyState, CPoint point, DWORD* pdwDropEffect )
00966 {
00967    HRESULT hResult;
00968    POINTL pointl;
00969
00970    TRACE( "OnWindowlessDrop()\n" );
00971
00972    ASSERT( m_pDropTarget != NULL );
00973
00974    pointl.x = point.x;
00975    pointl.y = point.y;
00976    hResult = m_pDropTarget->Drop( pDataObject->m_lpDataObject, dwKeyState,
00977     pointl, pdwDropEffect );
00978    ASSERT( SUCCEEDED( hResult ) );
00979 }
00980
00981 BOOL CTestContainer98Item::ActsLikeButton() const
00982 {
00983    return( m_dwMiscStatus&OLEMISC_ACTSLIKEBUTTON );
00984 }
00985
00986 DWORD CTestContainer98Item::GetActivationPolicy() const
00987 {
00988    DWORD dwPolicy;
00989    HRESULT hResult;
00990
00991    ASSERT( m_pPointerInactive != NULL );
00992    ASSERT( !IsInPlaceActive() );
00993
00994    hResult = m_pPointerInactive->GetActivationPolicy( &dwPolicy );
00995    if( FAILED( hResult ) )
00996    {
00997     return( 0 );
00998    }
00999
01000    return( dwPolicy );
01001 }
01002
01003 DWORD CTestContainer98Item::OnPointerInactiveMove( CPoint point,
01004    DWORD dwKeyState )
01005 {
01006    DWORD dwPolicy;
01007
01008    ASSERT( m_pPointerInactive != NULL );
01009    ASSERT( !IsInPlaceActive() );
01010
01011    dwPolicy = GetActivationPolicy();
01012
01013    if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
01014    {
01015     return( dwPolicy );
01016    }
01017
01018    m_pPointerInactive->OnInactiveMouseMove( &m_rect, point.x, point.y,
01019     dwKeyState );
01020
01021    return( 0 );
01022 }
01023
01024 DWORD CTestContainer98Item::OnPointerInactiveSetCursor( CPoint point,
01025    DWORD dwMouseMessage, BOOL* ptHandled )
01026 {
01027    HRESULT hResult;
01028    DWORD dwPolicy;
01029
01030    ENSURE( ptHandled != NULL );
01031    *ptHandled = FALSE;
01032
01033    ASSERT( m_pPointerInactive != NULL );
01034    ASSERT( !IsInPlaceActive() );
01035
01036    dwPolicy = GetActivationPolicy();
01037
01038    if( dwPolicy&POINTERINACTIVE_ACTIVATEONENTRY )
01039    {
01040     return( dwPolicy );
01041    }
01042
01043    hResult = m_pPointerInactive->OnInactiveSetCursor( &m_rect, point.x,
01044     point.y, dwMouseMessage, FALSE );
01045    if( hResult == S_OK )
01046    {
01047     *ptHandled = TRUE;
01048    }
01049
01050    return( 0 );
01051 }
01052
01053 void CTestContainer98Item::OnChange( OLE_NOTIFICATION nCode, DWORD dwParam )
01054 {
01055   ASSERT_VALID( this );
01056
01057   COleClientItem::OnChange( nCode, dwParam );
01058
01059   // When an item is being edited (either in-place or fully open), it sends
01060    // OnChange notifications for changes in the state of the item or visual
01061    // appearance of its content.
01062
01063    switch( nCode )
01064    {
01065    case OLE_CHANGED:
01066     InvalidateItem();
01067     // Check for valid m_lpViewObject since controls like Windows Media Player
01068     // call IAdviseSink::OnViewChange before we're done initializing.
01069     if (m_lpViewObject)
01070       UpdateFromServerExtent();
01071     break;
01072
01073    case OLE_CHANGED_STATE:
01074    case OLE_CHANGED_ASPECT:
01075     InvalidateItem();
01076     break;
01077    }
01078 }
01079
01080 BOOL CTestContainer98Item::OnChangeItemPosition( const CRect& rectPos )
01081 {
01082   ASSERT_VALID( this );
01083
01084   // During in-place activation CTestContainer98Item::OnChangeItemPosition
01085   //  is called by the server to change the position of the in-place
01086   //  window.  Usually, this is a result of the data in the server
01087   //  document changing such that the extent has changed or as a result
01088   //  of in-place resizing.
01089   //
01090   // The default here is to call the base class, which will call
01091   //  COleClientItem::SetItemRects to move the item
01092   //  to the new position.
01093
01094   if( !COleClientItem::OnChangeItemPosition( rectPos ) )
01095    {
01096     return( FALSE );
01097    }
01098
01099    InvalidateItem();
01100    m_rect = rectPos;
01101    InvalidateItem();
01102
01103    // Mark document as dirty.
01104    GetDocument()->SetModifiedFlag();
01105
01106   return( TRUE );
01107 }
01108
01109 void CTestContainer98Item::OnGetClipRect( CRect& rectClip )
01110 {
01111    ASSERT_VALID( this );
01112
01113    rectClip = m_rect;
01114 }
01115
01116 void CTestContainer98Item::OnGetItemPosition( CRect& rectPosition )
01117 {
01118   ASSERT_VALID( this );
01119
01120   // During in-place activation, CTestContainer98Item::OnGetItemPosition
01121   //  will be called to determine the location of this item.  The default
01122   //  implementation created from AppWizard simply returns a hard-coded
01123   //  rectangle.  Usually, this rectangle would reflect the current
01124   //  position of the item relative to the view used for activation.
01125   //  You can obtain the view by calling CTestContainer98Item::GetActiveView.
01126
01127    rectPosition = m_rect;
01128 }
01129
01130 void CTestContainer98Item::OnActivate()
01131 {
01132    TCControlTrace( TRACELEVEL_NORMAL, this, "Activating control\n" );
01133
01134    COleClientItem::OnActivate();
01135
01136    UpdateStatusBar();
01137 }
01138
01139 void CTestContainer98Item::OnActivateUI()
01140 {
01141    CTestContainer98Item* pItem;
01142    CTestContainer98Doc* pDoc;
01143    POSITION posItem;
01144
01145    TCControlTrace( TRACELEVEL_NORMAL, this, "UIActivating control\n" );
01146
01147    // Allow only one UIActive item per frame.
01148    pDoc = GetDocument();
01149    posItem = pDoc->GetStartPosition();
01150    while( posItem != NULL )
01151    {
01152     pItem = (CTestContainer98Item*)pDoc->GetNextItem( posItem );
01153     if( pItem->IsUIActive() )
01154     {
01155      ASSERT( pItem != this );
01156      pItem->DeactivateUI();
01157     }
01158    }
01159
01160 //   GetActiveView()->SetSelection( this );
01161
01162    COleClientItem::OnActivateUI();
01163
01164    UpdateStatusBar();
01165 }
01166
01167 void CTestContainer98Item::OnDeactivateUI( BOOL bUndoable )
01168 {
01169    COleClientItem::OnDeactivateUI( bUndoable );
01170
01171    TCControlTrace( TRACELEVEL_NORMAL, this, "UIDeactivating control\n" );
01172
01173    // Also InPlaceDeactivate the object if it doesn't have the
01174    // ACTIVATEWHENVISIBLE flag set.
01175    if( !ShouldActivateWhenVisible() )
01176    {
01177     Close();
01178    }
01179
01180    UpdateStatusBar();
01181 }
01182
01183 BOOL CTestContainer98Item::ShouldActivateWhenVisible()
01184 {
01185    DWORD dwMiscStatus;
01186
01187    dwMiscStatus = 0;
01188    m_lpObject->GetMiscStatus( GetDrawAspect(), &dwMiscStatus );
01189
01190    if( !(dwMiscStatus&OLEMISC_ACTIVATEWHENVISIBLE) )
01191    {
01192     return( FALSE );
01193    }
01194
01195    if( (dwMiscStatus&OLEMISC_IGNOREACTIVATEWHENVISIBLE) &&
01196     (GetDocument()->HonorIgnoreActivateWhenVisible()) )
01197    {
01198     return( FALSE );
01199    }
01200
01201    return( TRUE );
01202 }
01203
01204 void CTestContainer98Item::Release( OLECLOSE dwCloseOption )
01205 {
01206    UINT eState;
01207    IConnectionPointContainerPtr pConnectionPointContainer;
01208    HRESULT hResult;
01209
01210    eState = GetItemState();
01211    if( (eState == activeUIState) || (eState == activeState) || (eState ==
01212     openState) )
01213    {
01214     Close( OLECLOSE_NOSAVE );
01215    }
01216
01217    if( m_pDropTarget != NULL )
01218    {
01219     m_pDropTarget.Release();
01220    }
01221
01222    if( m_pPointerInactive != NULL )
01223    {
01224     m_pPointerInactive.Release();
01225    }
01226
01227    if( m_pOleInPlaceObjectWindowless != NULL )
01228    {
01229     m_pOleInPlaceObjectWindowless.Release();
01230    }
01231
01232    if( m_pViewObjectEx != NULL )
01233    {
01234     m_pViewObjectEx.Release();
01235    }
01236
01237    if( m_pOleControl != NULL )
01238    {
01239     m_pOleControl.Release();
01240    }
01241
01242    if( m_pCtlDispatch != NULL )
01243    {
01244     m_pCtlDispatch.Release();
01245    }
01246
01247    if( m_pExtendedControl != NULL )
01248    {
01249     // Salvage the display name from the extended control before it goes
01250     // away.
01251     m_strDisplayName = BSTR( m_pExtendedControl->Name );
01252     m_pExtendedControl.Release();
01253    }
01254
01255    if( (m_lpObject != NULL) && ((m_dwEventCookie != 0) ||
01256     (m_dwPropertyCookie != 0)) )
01257    {
01258     m_lpObject->QueryInterface( IID_IConnectionPointContainer,
01259      (void**)&pConnectionPointContainer );
01260    }
01261
01262    if( m_dwEventCookie != 0 )
01263    {
01264     if( m_pEventCP == NULL )
01265     {
01266      // We must have quick activated
01267      hResult = pConnectionPointContainer->FindConnectionPoint(
01268       m_infoEvents.GetIID(), &m_pEventCP );
01269      if( FAILED( hResult ) )
01270      {
01271       TCControlTrace( TRACELEVEL_NORMAL, this,
01272          "QuickActivated control connected to event sink, but doesn't support that connection point.\n" );
01273      }
01274     }
01275     if( m_pEventCP != NULL )
01276     {
01277      m_pEventCP->Unadvise( m_dwEventCookie );
01278      m_dwEventCookie = 0;
01279      m_pEventCP.Release();
01280     }
01281    }
01282
01283    if( m_dwPropertyCookie != 0 )
01284    {
01285     if( m_pPropertyCP == NULL )
01286     {
01287      // We must have quick activated
01288      hResult = pConnectionPointContainer->FindConnectionPoint(
01289       IID_IPropertyNotifySink, &m_pPropertyCP );
01290      if( FAILED( hResult ) )
01291      {
01292       TCControlTrace( TRACELEVEL_NORMAL, this,
01293          "QuickActivated control connected to property notify sink, but doesn't support that connection point.\n" );
01294      }
01295     }
01296     if( m_pPropertyCP != NULL )
01297     {
01298      m_pPropertyCP->Unadvise( m_dwPropertyCookie );
01299      m_dwPropertyCookie = 0;
01300      m_pPropertyCP.Release();
01301     }
01302    }
01303
01304    if( pConnectionPointContainer != NULL )
01305    {
01306     pConnectionPointContainer.Release();
01307    }
01308
01309    COleClientItem::Release( dwCloseOption );
01310
01311    CoFreeUnusedLibraries();
01312 }
01313
01314 void CTestContainer98Item::CommitItem( BOOL bSuccess )
01315 {
01316    IPersistStoragePtr pPersistStorage;
01317
01318    if( !m_bNeedCommit )
01319    {
01320     return;
01321    }
01322
01323    if( (m_lpNewStorage != NULL) && !bSuccess )
01324    {
01325     m_lpNewStorage->Release();
01326     m_lpNewStorage = NULL;
01327    }
01328
01329    pPersistStorage = m_lpObject;
01330    // If the object doesn't support IPersistStorage, then we used
01331    // IPersistStreamInit in a stream inside the storage.
01332    if( pPersistStorage != NULL )
01333    {
01334     VERIFY( pPersistStorage->SaveCompleted( m_lpNewStorage ) == S_OK );
01335    }
01336
01337    if( m_lpNewStorage != NULL )
01338    {
01339     m_lpStorage->Release();
01340     m_lpStorage = m_lpNewStorage;
01341     m_lpNewStorage = NULL;
01342    }
01343
01344    m_bNeedCommit = FALSE;
01345 }
01346
01347 void CTestContainer98Item::WriteItem( CArchive& ar )
01348 {
01349    IStoragePtr pStorage;
01350    IStreamPtr pStream;
01351    IPersistStreamInitPtr pPSI;
01352    TCHAR szItemName[64];
01353    HRESULT hResult;
01354    IPersistStoragePtr pPersistStorage;
01355    CTestContainer98Doc* pDoc;
01356    CLSID clsid;
01357
01358    (void)ar;
01359
01360    pDoc = GetDocument();
01361    ENSURE( pDoc );
01362    ENSURE( pDoc->m_lpRootStg != NULL );
01363    ASSERT( pDoc->m_bCompoundFile );
01364    ASSERT( m_lpStorage != NULL );
01365    ASSERT( !ar.m_bForceFlat );
01366
01367    GetItemName( szItemName, _countof(szItemName) );
01368
01369    if( !pDoc->m_bSameAsLoad )
01370    {
01371     hResult = pDoc->m_lpRootStg->CreateStorage( CT2COLE( szItemName ),
01372      STGM_CREATE|STGM_READWRITE|STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE, 0, 0,
01373      &pStorage );
01374     if( FAILED( hResult ) )
01375     {
01376      AfxThrowOleException( hResult );
01377     }
01378     m_lpNewStorage = pStorage;
01379     m_lpNewStorage->AddRef();
01380     m_bNeedCommit = TRUE;
01381    }
01382    else
01383    {
01384     pStorage = m_lpStorage;
01385    }
01386
01387    pPersistStorage = m_lpObject;
01388    if( pPersistStorage != NULL )
01389    {
01390     pPersistStorage->GetClassID( &clsid );
01391     hResult = WriteClassStg( pStorage, clsid );
01392     if( FAILED( hResult ) )
01393     {
01394      AfxThrowOleException( hResult );
01395     }
01396
01397     hResult = pPersistStorage->Save( pStorage, pDoc->m_bSameAsLoad );
01398     if( FAILED( hResult ) )
01399     {
01400      AfxThrowOleException( hResult );
01401     }
01402    }
01403    else
01404    {
01405     pPSI = m_lpObject;
01406     if( pPSI == NULL )
01407     {
01408      AfxThrowOleException( E_NOINTERFACE );
01409     }
01410
01411     // Set the storage's CLSID to CLSID_NULL, so we know that we actually
01412     // used a stream
01413     hResult = WriteClassStg( pStorage, CLSID_NULL );
01414     if( FAILED( hResult ) )
01415     {
01416      AfxThrowOleException( hResult );
01417     }
01418
01419     hResult = pStorage->CreateStream( L"Contents", STGM_CREATE|
01420      STGM_READWRITE|STGM_SHARE_EXCLUSIVE, 0, 0, &pStream );
01421     if( FAILED( hResult ) )
01422     {
01423      AfxThrowOleException( hResult );
01424     }
01425
01426     pPSI->GetClassID( &clsid );
01427     hResult = WriteClassStm( pStream, clsid );
01428     if( FAILED( hResult ) )
01429     {
01430      AfxThrowOleException( hResult );
01431     }
01432
01433     hResult = pPSI->Save( pStream, TRUE );
01434     if( FAILED( hResult ) )
01435     {
01436      AfxThrowOleException( hResult );
01437     }
01438
01439     pStream.Release();
01440    }
01441
01442    m_bNeedCommit = TRUE;
01443    pStorage->Commit( STGC_ONLYIFCURRENT );
01444 }
01445
01446 void CTestContainer98Item::ReadItem( CArchive& ar )
01447 {
01448
01449    BOOL tUsedStream;
01450    IStoragePtr pStorage;
01451    IPersistStreamInitPtr pPSI;
01452    IStreamPtr pStream;
01453   TCHAR szItemName[64];
01454    HRESULT hResult;
01455    BOOL tQuickActivated;
01456    IPersistStoragePtr pPersistStorage;
01457    CLSID clsid;
01458
01459    (void)ar;
01460
01461   CTestContainer98Doc* pDoc = GetDocument();
01462   ENSURE(pDoc);
01463   ENSURE(pDoc->m_lpRootStg != NULL);
01464   ENSURE(pDoc->m_bCompoundFile);
01465   ASSERT(m_lpStorage == NULL);
01466   ASSERT(m_lpLockBytes == NULL);
01467    ASSERT( !ar.m_bForceFlat );
01468
01469   // get item name
01470   GetItemName( szItemName, _countof(szItemName) );
01471
01472   // open storage for this item
01473   hResult = pDoc->m_lpRootStg->OpenStorage( CT2COLE( szItemName ), NULL,
01474     STGM_READWRITE|STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE, 0, 0, &pStorage );
01475   if( hResult != S_OK )
01476   {
01477     TRACE1( "Warning: unable to open child storage %s.\n", szItemName );
01478     // upon failure throw file exception (item will be cleaned up)
01479     AfxThrowOleException( hResult );
01480   }
01481   ASSERT(pStorage != NULL);
01482
01483   // remember the storage
01484   m_lpStorage = pStorage;
01485   ASSERT(m_lpStorage != NULL);
01486    m_lpStorage->AddRef();
01487
01488   // attempt to load the object from the storage
01489
01490    hResult = ReadClassStg( m_lpStorage, &clsid );
01491    if( FAILED( hResult ) )
01492    {
01493     AfxThrowOleException( hResult );
01494    }
01495
01496    tUsedStream = FALSE;
01497    if( clsid == CLSID_NULL )
01498    {
01499     hResult = m_lpStorage->OpenStream( L"Contents", NULL, STGM_READ|
01500      STGM_SHARE_EXCLUSIVE, 0, &pStream );
01501     if( FAILED( hResult ) )
01502     {
01503      AfxThrowOleException( hResult );
01504     }
01505
01506     hResult = ReadClassStm( pStream, &clsid );
01507     if( FAILED( hResult ) )
01508     {
01509      AfxThrowOleException( hResult );
01510     }
01511
01512     tUsedStream = TRUE;
01513    }
01514
01515    m_tExtendedControl = TRUE;
01516    hResult = CExtendedControl::CreateInstance( clsid, this, NULL,
01517     IID_IOleObject, (void**)&m_lpObject );
01518    if( FAILED( hResult ) )
01519    {
01520     m_tExtendedControl = FALSE;
01521     // The control may not like being aggregated on, so just try to create it
01522     // directly and punt the extended control stuff.
01523     hResult = CoCreateInstance( clsid, NULL, CLSCTX_INPROC_SERVER|
01524     CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER, IID_IOleObject,
01525     (void**)&m_lpObject );
01526     if( SUCCEEDED( hResult ) )
01527     {
01528      TCControlTrace( TRACELEVEL_NORMAL, this,
01529       "Could not aggregate on the control, so it won't support extended properties.\n" );
01530     }
01531    }
01532    if( SUCCEEDED( hResult ) )
01533    {
01534     CString strUserType;
01535
01536     GetUserType( USERCLASSTYPE_SHORT, strUserType );
01537     GetDocument()->CreateUniqueItemName( this, strUserType,
01538      m_strDisplayName );
01539    }
01540
01541    if( m_tExtendedControl )
01542    {
01543     m_pExtendedControl = m_lpObject;
01544     ASSERT( m_pExtendedControl != NULL );
01545     m_pExtendedControl->Name = _bstr_t( m_strDisplayName );
01546    }
01547
01548    if( SUCCEEDED( hResult ) )
01549    {
01550     hResult = InitControlInfo();
01551    }
01552
01553    tQuickActivated = FALSE;
01554    if( SUCCEEDED( hResult ) )
01555    {
01556     tQuickActivated = QuickActivate();
01557
01558     if( !tQuickActivated )
01559     {
01560      m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &m_dwMiscStatus );
01561      if( m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST )
01562      {
01563       hResult = m_lpObject->SetClientSite( GetClientSite() );
01564       if( FAILED( hResult ) )
01565       {
01566          TCControlTrace( TRACELEVEL_NORMAL, this,
01567           "SetClientSite failed.\n" );
01568       }
01569      }
01570     }
01571    }
01572
01573    if( SUCCEEDED( hResult ) )
01574    {
01575     pPersistStorage = m_lpObject;
01576     if( pPersistStorage != NULL )
01577     {
01578      hResult = pPersistStorage->Load( m_lpStorage );
01579     }
01580    else
01581    {
01582     if( !tUsedStream )
01583     {
01584        hResult = E_NOINTERFACE;
01585     }
01586     else
01587     {
01588        pPSI = m_lpObject;
01589        if( pPSI == NULL )
01590        {
01591         hResult = E_NOINTERFACE;
01592        }
01593        else
01594        {
01595         hResult = pPSI->Load( pStream );
01596        }
01597     }
01598    }
01599    }
01600
01601    if( SUCCEEDED( hResult ) )
01602    {
01603     if( !tQuickActivated )
01604     {
01605      if( !(m_dwMiscStatus&OLEMISC_SETCLIENTSITEFIRST) )
01606      {
01607       hResult = m_lpObject->SetClientSite( GetClientSite() );
01608       if( FAILED( hResult ) )
01609       {
01610          TCControlTrace( TRACELEVEL_NORMAL, this,
01611           "SetClientSite failed.\n" );
01612       }
01613      }
01614     }
01615    }
01616
01617   CheckGeneral(hResult);
01618 }
01619
01620 void CTestContainer98Item::CopyToClipboard( CArchive& ar, IStorage* pStorage )
01621 {
01622    IPersistStoragePtr pPersistStorage;
01623    CLSID clsid;
01624    HRESULT hResult;
01625
01626    ASSERT_VALID( this );
01627    ASSERT( ar.IsStoring() );
01628
01629    ar<<GetDisplayName();
01630    ar<<m_rect;
01631
01632    pPersistStorage = m_lpObject;
01633    if( pPersistStorage == NULL )
01634    {
01635     AfxThrowOleException( E_NOINTERFACE );
01636    }
01637
01638    pPersistStorage->GetClassID( &clsid );
01639    hResult = WriteClassStg( pStorage, clsid );
01640    if( FAILED( hResult ) )
01641    {
01642     AfxThrowOleException( hResult );
01643    }
01644
01645    hResult = pPersistStorage->Save( pStorage, FALSE );
01646    if( FAILED( hResult ) )
01647    {
01648     AfxThrowOleException( hResult );
01649    }
01650
01651    hResult = pPersistStorage->SaveCompleted( NULL );
01652    if( FAILED( hResult ) )
01653    {
01654     AfxThrowOleException( hResult );
01655    }
01656 }
01657
01658 void CTestContainer98Item::Serialize(CArchive& ar)
01659 {
01660    CString strDisplayName;
01661
01662   ASSERT_VALID( this );
01663
01664    if( ar.IsStoring() )
01665    {
01666     ar<<m_rect;
01667     ar<<GetDisplayName();
01668    }
01669   else
01670   {
01671     ar>>m_rect;
01672     ar>>strDisplayName;
01673    }
01674
01675   COleClientItem::Serialize( ar );
01676
01677   if( !ar.IsStoring() )
01678   {
01679     if( m_pExtendedControl != NULL )
01680     {
01681      m_pExtendedControl->Name = _bstr_t( strDisplayName );
01682     }
01683   }
01684 }
01685
01686 /////////////////////////////////////////////////////////////////////////////
01687 // CTestContainer98Item diagnostics
01688
01689 #ifdef _DEBUG
01690 void CTestContainer98Item::AssertValid() const
01691 {
01692   COleClientItem::AssertValid();
01693 }
01694
01695 void CTestContainer98Item::Dump(CDumpContext& dc) const
01696 {
01697   COleClientItem::Dump(dc);
01698 }
01699 #endif
01700
01701 /////////////////////////////////////////////////////////////////////////////
01702
01703 IBindHost* CTestContainer98Item::GetBindHost()
01704 {
01705    HRESULT hResult;
01706
01707    if( m_pBindHost == NULL )
01708    {
01709     hResult = CTCBindHost::CreateInstance( IID_IBindHost,
01710      (void**)&m_pBindHost );
01711     if( FAILED( hResult ) )
01712     {
01713      return( NULL );
01714     }
01715    }
01716    ASSERT( m_pBindHost != NULL );
01717
01718    return( m_pBindHost );
01719 }
01720
01721 CInterfaceInfo* CTestContainer98Item::GetEventInfo()
01722 {
01723    return( &m_infoEvents );
01724 }
01725
01726 CInterfaceInfo* CTestContainer98Item::GetMethodInfo()
01727 {
01728    return( &m_infoMethods );
01729 }
01730
01731 void CTestContainer98Item::OnEvent( DISPID dispid, DISPPARAMS* pdpParams )
01732 {
01733    CMethodInfo* pEventInfo;
01734    CLog* pLog;
01735
01736    m_dispidEvent = dispid;
01737    CopyParams( pdpParams );
01738
01739    pLog = GetDocument()->GetLog();
01740    if( pLog != NULL )
01741    {
01742     // Find the event.
01743     pEventInfo = m_infoEvents.FindMethod( m_dispidEvent );
01744     if( pEventInfo == NULL )
01745     {
01746      (*pLog)<<GetDisplayName()<<_T( ": Unknown event (DISPID=" )<<dispid<<
01747       _T( ")\n" );
01748     }
01749     else
01750     {
01751      if( pEventInfo->IsLogged() )
01752      {
01753       (*pLog)<<GetDisplayName()<<_T( ": " );
01754       pEventInfo->LogEvent( *pLog, pdpParams );
01755      }
01756     }
01757    }
01758 }
01759
01760 void CTestContainer98Item::UpdateFromServerExtent()
01761 {
01762    CSize size;
01763
01764    if( GetCachedExtent( &size ) )
01765    {
01766     // OLE returns the extent in HIMETRIC units -- we need pixels.
01767     CClientDC dc( NULL );
01768     dc.HIMETRICtoDP( &size );
01769
01770     // Only invalidate if it has actually changed and also only if it is not
01771     // in-place active.
01772     if( (size != m_rect.Size()) && !IsInPlaceActive() )
01773     {
01774      // Invalidate old, update, invalidate new.
01775      InvalidateItem();
01776      m_rect.bottom = m_rect.top+size.cy;
01777      m_rect.right = m_rect.left+size.cx;
01778      InvalidateItem();
01779
01780      // mark document as modified.
01781      GetDocument()->SetModifiedFlag();
01782     }
01783    }
01784 }
01785
01786 void CTestContainer98Item::InvalidateItem()
01787 {
01788    GetDocument()->UpdateAllViews( NULL, HINT_UPDATE_ITEM, this );
01789 }
01790
01791 void CTestContainer98Item::SetLoggingOptions()
01792 {
01793    CMethodInfo* pMethod;
01794    int iMethod;
01795    int iRequestEditProperty;
01796    int iBindableProperty;
01797    int nResult;
01798    CEventLoggingPage pageEventLogging;
01799    CPropertyChangesPage pagePropertyChanges;
01800    CPropertyEditRequestsPage pageEditRequests;
01801    CPropertySheet sheet( IDS_CONTROLLOGGINGOPTIONS );
01802
01803    for( iMethod = 0; iMethod < m_infoEvents.GetNumMethods(); iMethod++ )
01804    {
01805     pMethod = m_infoEvents.GetMethod( iMethod );
01806     pageEventLogging.m_astrEventNames.Add( pMethod->GetName() );
01807     pageEventLogging.m_atLogFlags.Add( pMethod->IsLogged() );
01808    }
01809
01810    for( iMethod = 0; iMethod < m_infoMethods.GetNumMethods(); iMethod++ )
01811    {
01812     pMethod = m_infoMethods.GetMethod( iMethod );
01813     if( pMethod->GetInvokeKind() == INVOKE_PROPERTYGET )
01814     {
01815      if( pMethod->IsBindable() )
01816      {
01817       pagePropertyChanges.m_astrPropertyNames.Add( pMethod->GetName() );
01818       pagePropertyChanges.m_atLogFlags.Add( pMethod->IsLogged() );
01819      }
01820      if( pMethod->RequestsEdit() )
01821      {
01822       CPropertyEditRequestsPage::CPropertyInfo info( pMethod->GetName(),
01823          pMethod->LogEditRequests(), pMethod->GetRequestEditResponse() );
01824
01825       pageEditRequests.m_aProperties.Add( info );
01826      }
01827     }
01828    }
01829
01830    sheet.AddPage( &pageEventLogging );
01831    sheet.AddPage( &pagePropertyChanges );
01832    sheet.AddPage( &pageEditRequests );
01833
01834    sheet.m_psh.dwFlags &= ~PSH_HASHELP;
01835    sheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01836    nResult = (int)sheet.DoModal();
01837    if( nResult != IDOK )
01838    {
01839     return;
01840    }
01841
01842    for( iMethod = 0; iMethod < m_infoEvents.GetNumMethods(); iMethod++ )
01843    {
01844     pMethod = m_infoEvents.GetMethod( iMethod );
01845     pMethod->EnableLogging( pageEventLogging.m_atLogFlags[iMethod] );
01846    }
01847
01848    iBindableProperty = 0;
01849    iRequestEditProperty = 0;
01850    for( iMethod = 0; iMethod < m_infoMethods.GetNumMethods(); iMethod++ )
01851    {
01852     pMethod = m_infoMethods.GetMethod( iMethod );
01853     if( pMethod->GetInvokeKind() == INVOKE_PROPERTYGET )
01854     {
01855      if( pMethod->IsBindable() )
01856      {
01857       pMethod->EnableLogging(
01858          pagePropertyChanges.m_atLogFlags[iBindableProperty] );
01859       iBindableProperty++;
01860      }
01861      if( pMethod->RequestsEdit() )
01862      {
01863       pMethod->EnableEditRequestLogging( pageEditRequests.m_aProperties[
01864          iRequestEditProperty].m_tLogged );
01865       pMethod->SetRequestEditResponse( pageEditRequests.m_aProperties[
01866          iRequestEditProperty].m_iResponse );
01867       iRequestEditProperty++;
01868      }
01869     }
01870    }
01871 }
01872
01873 void CTestContainer98Item::InvokeMethods()
01874 {
01875    HRESULT hResult;
01876    IDispatchPtr pDispatch;
01877
01878    if( GetMethodInfo()->GetNumMethods() == 0 )
01879    {
01880     AfxMessageBox( IDS_CONTROLHASNOMETHODS );
01881     return;
01882    }
01883
01884    hResult = m_lpObject->QueryInterface( IID_IDispatch, (void**)&pDispatch );
01885    if( FAILED( hResult ) )
01886    {
01887     TCControlTrace( TRACELEVEL_NORMAL, this,
01888      "Failed to get object's primary IDispatch interface.\n" );
01889     return;
01890    }
01891
01892    CMethodDlg dlg( NULL, pDispatch, &m_infoMethods );
01893
01894    dlg.DoModal();
01895 }
01896
01897 void CTestContainer98Item::OnFocus( BOOL tGotFocus )
01898 {
01899    if( tGotFocus )
01900    {
01901     TCControlTrace( TRACELEVEL_NORMAL, this, "Control got focus\n" );
01902    }
01903    else
01904    {
01905     TCControlTrace( TRACELEVEL_NORMAL, this, "Control lost focus\n" );
01906    }
01907
01908    GetActiveView()->OnFocus( this, tGotFocus );
01909 }
01910
01911 BEGIN_INTERFACE_MAP( CTestContainer98Item, COleClientItem )
01912    INTERFACE_PART( CTestContainer98Item, IID_IServiceProvider,
01913     ServiceProvider )
01914    INTERFACE_PART( CTestContainer98Item, IID_IPropertyNotifySink,
01915     PropertyNotifySink )
01916    INTERFACE_PART( CTestContainer98Item, IID_IDispatch, AmbientProperties )
01917    INTERFACE_PART( CTestContainer98Item, IID_IOleControlSite, OleControlSite )
01918 //   INTERFACE_PART( CTestContainer98Item, IID_IOleInPlaceSiteEx,
01919 //      OleInPlaceSiteWindowless )
01920 //   INTERFACE_PART( CTestContainer98Item, IID_IOleInPlaceSiteWindowless,
01921 //      OleInPlaceSiteWindowless )
01922 END_INTERFACE_MAP()
01923
01924
01925 ///////////////////////////////////////////////////////////////////////////////
01926 // CTestContainer98Item::XOleControlSite
01927 ///////////////////////////////////////////////////////////////////////////////
01928
01929 STDMETHODIMP_( ULONG ) CTestContainer98Item::XOleControlSite::AddRef()
01930 {
01931    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
01932
01933    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XOleControlSite::AddRef().\n" );
01934
01935    return( pThis->ExternalAddRef() );
01936 }
01937
01938 STDMETHODIMP_( ULONG ) CTestContainer98Item::XOleControlSite::Release()
01939 {
01940    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
01941
01942    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XOleControlSite::Release().\n" );
01943
01944    return( pThis->ExternalRelease() );
01945 }
01946
01947 STDMETHODIMP CTestContainer98Item::XOleControlSite::QueryInterface( REFIID iid,
01948    LPVOID* ppvObj)
01949 {
01950    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
01951
01952    return( pThis->ExternalQueryInterface( &iid, ppvObj ) );
01953 }
01954
01955 STDMETHODIMP CTestContainer98Item::XOleControlSite::GetExtendedControl(
01956    IDispatch** ppExtendedControl )
01957 {
01958    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
01959
01960    if( ppExtendedControl == NULL )
01961    {
01962     return( E_POINTER );
01963    }
01964
01965    *ppExtendedControl = pThis->m_pExtendedControl;
01966    if( *ppExtendedControl == NULL )
01967    {
01968     return( E_NOTIMPL );
01969    }
01970    else
01971    {
01972     (*ppExtendedControl)->AddRef();
01973    }
01974
01975    return( S_OK );
01976 }
01977
01978 STDMETHODIMP CTestContainer98Item::XOleControlSite::LockInPlaceActive(
01979    BOOL tLock )
01980 {
01981    (void)tLock;
01982
01983    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
01984
01985    return( E_NOTIMPL );
01986 }
01987
01988 STDMETHODIMP CTestContainer98Item::XOleControlSite::OnControlInfoChanged()
01989 {
01990    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
01991
01992    return( E_NOTIMPL );
01993 }
01994
01995 STDMETHODIMP CTestContainer98Item::XOleControlSite::OnFocus( BOOL tGotFocus )
01996 {
01997    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
01998
01999    pThis->OnFocus( tGotFocus );
02000
02001    return( S_OK );
02002 }
02003
02004 STDMETHODIMP CTestContainer98Item::XOleControlSite::ShowPropertyFrame()
02005 {
02006
02007    HRESULT hResult;
02008    ISpecifyPropertyPagesPtr pSpecify;
02009    CAUUID pages;
02010    CLSID* pclsidPages;
02011    ULONG nPages;
02012    ULONG iPage;
02013    IUnknown* pControl;
02014    CString strDisplayName;
02015
02016    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
02017
02018    pControl = pThis->m_lpObject;
02019    pSpecify = pControl;
02020    if( pSpecify == NULL )
02021    {
02022     return( E_NOINTERFACE );
02023    }
02024
02025    pages.cElems = 0;
02026    pages.pElems = NULL;
02027    hResult = pSpecify->GetPages( &pages );
02028    if( FAILED( hResult ) )
02029    {
02030     return( hResult );
02031    }
02032
02033    nPages = pages.cElems;
02034    if( pThis->m_pExtendedControl != NULL )
02035    {
02036     nPages++;
02037    }
02038
02039    pclsidPages = (CLSID*)_malloca( nPages*sizeof( CLSID ) );
02040    for( iPage = 0; iPage < pages.cElems; iPage++ )
02041    {
02042     pclsidPages[iPage] = pages.pElems[iPage];
02043    }
02044    if( pThis->m_pExtendedControl != NULL )
02045    {
02046     pclsidPages[nPages-1] = __uuidof( TCExtPage );
02047    }
02048    CoTaskMemFree( pages.pElems );
02049
02050    strDisplayName = pThis->GetDisplayName();
02051    hResult = OleCreatePropertyFrame( AfxGetMainWnd()->m_hWnd, 0, 0,
02052     CT2COLE( strDisplayName ), 1, &pControl, nPages, pclsidPages,
02053     GetUserDefaultLCID(), 0, NULL );
02054
02055    _freea(pclsidPages);
02056
02057    if( FAILED( hResult ) )
02058    {
02059     return( hResult );
02060    }
02061
02062    //WINBUG: OleCreatePropertyFrame doesn't return focus to its parent when it
02063    // closes
02064    pThis->GetDocument()->GetView()->SetFocus();
02065
02066    return( S_OK );
02067 }
02068
02069 STDMETHODIMP CTestContainer98Item::XOleControlSite::TransformCoords(
02070    POINTL* pptHiMetric, POINTF* pptContainer, DWORD dwFlags )
02071 {
02072    (void)pptHiMetric;
02073    (void)pptContainer;
02074    (void)dwFlags;
02075
02076    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
02077
02078    return( E_NOTIMPL );
02079 }
02080
02081 STDMETHODIMP CTestContainer98Item::XOleControlSite::TranslateAccelerator(
02082    LPMSG pMessage, DWORD dwModifiers )
02083 {
02084    (void)pMessage;
02085    (void)dwModifiers;
02086
02087    METHOD_PROLOGUE( CTestContainer98Item, OleControlSite )
02088
02089    return( E_NOTIMPL );
02090 }
02091
02092
02093 ///////////////////////////////////////////////////////////////////////////////
02094 // CTestContainer98Item::XServiceProvider
02095 ///////////////////////////////////////////////////////////////////////////////
02096
02097 STDMETHODIMP_( ULONG ) CTestContainer98Item::XServiceProvider::AddRef()
02098 {
02099    METHOD_PROLOGUE( CTestContainer98Item, ServiceProvider )
02100
02101    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XServiceProvider::AddRef()\n" );
02102
02103    return( pThis->ExternalAddRef() );
02104 }
02105
02106 STDMETHODIMP_( ULONG ) CTestContainer98Item::XServiceProvider::Release()
02107 {
02108    METHOD_PROLOGUE( CTestContainer98Item, ServiceProvider )
02109
02110    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XServiceProvider::Release()\n" );
02111
02112    return( pThis->ExternalRelease() );
02113 }
02114
02115 STDMETHODIMP CTestContainer98Item::XServiceProvider::QueryInterface(
02116    REFIID iid, LPVOID* ppvObj)
02117 {
02118    METHOD_PROLOGUE( CTestContainer98Item, ServiceProvider )
02119
02120    return( pThis->ExternalQueryInterface( &iid, ppvObj ) );
02121 }
02122
02123 STDMETHODIMP CTestContainer98Item::XServiceProvider::QueryService(
02124    REFGUID guidService, REFIID iid, void** ppService )
02125 {
02126    IBindHost* pBindHost;
02127
02128    METHOD_PROLOGUE( CTestContainer98Item, ServiceProvider );
02129
02130    if( ppService == NULL )
02131    {
02132     return( E_POINTER );
02133    }
02134    *ppService = NULL;
02135
02136    if( IsEqualGUID( guidService, SID_SBindHost ) )
02137    {
02138     TCControlTrace( TRACELEVEL_NORMAL, pThis,
02139      "QueryService for SID_SBindHost\n" );
02140     if( !pThis->GetDocument()->SupportsService( guidService ) )
02141     {
02142      return( E_NOINTERFACE );
02143     }
02144     pBindHost = pThis->GetBindHost();
02145     if( pBindHost == NULL )
02146     {
02147      return( E_NOINTERFACE );
02148     }
02149     else
02150     {
02151      return( pBindHost->QueryInterface( iid, ppService ) );
02152     }
02153    }
02154    else
02155    {
02156     TCControlTrace( TRACELEVEL_NORMAL, pThis,
02157      "QueryService for unknown service\n" );
02158     return( E_NOINTERFACE );
02159    }
02160 }
02161
02162 ///////////////////////////////////////////////////////////////////////////////
02163 // CTestContainer98Item::XEventHandler
02164 ///////////////////////////////////////////////////////////////////////////////
02165
02166 STDMETHODIMP_( ULONG ) CTestContainer98Item::XEventHandler::AddRef()
02167 {
02168    METHOD_PROLOGUE( CTestContainer98Item, EventHandler )
02169
02170    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XEventHandler::AddRef()\n" );
02171
02172    return( pThis->ExternalAddRef() );
02173 }
02174
02175 STDMETHODIMP_( ULONG ) CTestContainer98Item::XEventHandler::Release()
02176 {
02177    METHOD_PROLOGUE( CTestContainer98Item, EventHandler )
02178
02179    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XEventHandler::Release()\n" );
02180
02181    return( pThis->ExternalRelease() );
02182 }
02183
02184 STDMETHODIMP CTestContainer98Item::XEventHandler::QueryInterface( REFIID iid,
02185    LPVOID* ppvObj)
02186 {
02187    METHOD_PROLOGUE( CTestContainer98Item, EventHandler )
02188
02189    if( IsEqualIID( iid, IID_IDispatch ) )
02190    {
02191     // QI'ing for IID_IDispatch will get you the default dispinterface on an
02192     // object.  In the case of the control site, that would be the ambient
02193     // properties dispinterface.  Since the control's event sink connection
02194     // point is exposed not as IID_IDispatch, but rather as the IID of the
02195     // control's event dispinterface,
02196     TCControlTrace( TRACELEVEL_NORMAL, pThis,
02197      "Warning: QI for IID_IDispatch on event handler interface.\n"
02198      "\tDid you really mean to QI for your specific event interface?\n" );
02199    }
02200
02201    return( pThis->ExternalQueryInterface( &iid, ppvObj ) );
02202 }
02203
02204 STDMETHODIMP CTestContainer98Item::XEventHandler::GetIDsOfNames( REFIID iid,
02205    LPOLESTR* ppszNames, UINT nNames, LCID lcid, DISPID* pDispIDs )
02206 {
02207    (void)iid;
02208    (void)ppszNames;
02209    (void)nNames;
02210    (void)lcid;
02211    (void)pDispIDs;
02212
02213    METHOD_PROLOGUE( CTestContainer98Item, EventHandler )
02214    ASSERT_VALID( pThis );
02215
02216    return( E_NOTIMPL );
02217 }
02218
02219 STDMETHODIMP CTestContainer98Item::XEventHandler::GetTypeInfo( UINT iTypeInfo,
02220    LCID lcid, ITypeInfo** ppTypeInfo )
02221 {
02222    (void)iTypeInfo;
02223    (void)lcid;
02224    (void)ppTypeInfo;
02225
02226    METHOD_PROLOGUE( CTestContainer98Item, EventHandler )
02227    ASSERT_VALID( pThis );
02228
02229    return( E_NOTIMPL );
02230 }
02231
02232 STDMETHODIMP CTestContainer98Item::XEventHandler::GetTypeInfoCount(
02233    UINT* pnInfoCount )
02234 {
02235    METHOD_PROLOGUE( CTestContainer98Item, EventHandler )
02236    ASSERT_VALID( pThis );
02237
02238    *pnInfoCount = 0;
02239
02240    return( S_OK );
02241 }
02242
02243 STDMETHODIMP CTestContainer98Item::XEventHandler::Invoke( DISPID dispidMember,
02244    REFIID iid, LCID lcid, USHORT wFlags, DISPPARAMS* pdpParams,
02245    VARIANT* pvarResult, EXCEPINFO* pExceptionInfo, UINT* piArgErr )
02246 {
02247    (void)iid;
02248    (void)lcid;
02249    (void)wFlags;
02250    (void)pvarResult;
02251    (void)pExceptionInfo;
02252    (void)piArgErr;
02253
02254    METHOD_PROLOGUE( CTestContainer98Item, EventHandler )
02255    ASSERT_VALID( pThis );
02256
02257    pThis->OnEvent( dispidMember, pdpParams );  // Call the event handler, who
02258     // also cleans up.
02259
02260    return( S_OK );
02261 }
02262
02263
02264 ///////////////////////////////////////////////////////////////////////////////
02265 // CTestContainer98Item::XAmbientProperties
02266 ///////////////////////////////////////////////////////////////////////////////
02267
02268 STDMETHODIMP_( ULONG ) CTestContainer98Item::XAmbientProperties::AddRef()
02269 {
02270    METHOD_PROLOGUE( CTestContainer98Item, AmbientProperties )
02271
02272    TCControlTrace( TRACELEVEL_NORMAL, pThis,
02273     "XAmbientProperties::AddRef().\n" );
02274
02275    return( pThis->ExternalAddRef() );
02276 }
02277
02278 STDMETHODIMP_( ULONG ) CTestContainer98Item::XAmbientProperties::Release()
02279 {
02280    METHOD_PROLOGUE( CTestContainer98Item, AmbientProperties )
02281
02282    TCControlTrace( TRACELEVEL_NORMAL, pThis,
02283     "XAmbientProperties::Release().\n" );
02284
02285    return( pThis->ExternalRelease() );
02286 }
02287
02288 STDMETHODIMP CTestContainer98Item::XAmbientProperties::QueryInterface(
02289    REFIID iid, LPVOID* ppvObj)
02290 {
02291    METHOD_PROLOGUE( CTestContainer98Item, AmbientProperties )
02292
02293    return( pThis->ExternalQueryInterface( &iid, ppvObj ) );
02294 }
02295
02296 STDMETHODIMP CTestContainer98Item::XAmbientProperties::GetIDsOfNames(
02297    REFIID iid, LPOLESTR* ppszNames, UINT nNames, LCID lcid, DISPID* pDispIDs )
02298 {
02299    CTestContainer98Doc* pDoc;
02300    CAmbientProperty* pProp;
02301    UINT iName;
02302    HRESULT hResult;
02303
02304    (void)lcid;
02305
02306    METHOD_PROLOGUE( CTestContainer98Item, AmbientProperties )
02307    ASSERT_VALID( pThis );
02308
02309    if( !IsEqualIID( iid, IID_NULL ) )
02310    {
02311     return( E_INVALIDARG );
02312    }
02313    if( ppszNames == NULL )
02314    {
02315     return( E_INVALIDARG );
02316    }
02317    if( nNames < 1 )
02318    {
02319     return( E_INVALIDARG );
02320    }
02321    if( pDispIDs == NULL )
02322    {
02323     return( E_POINTER );
02324    }
02325
02326    hResult = S_OK;
02327    pDoc = pThis->GetDocument();
02328    pProp = pDoc->FindAmbientProperty( ppszNames[0] );
02329    if( pProp == NULL )
02330    {
02331     pDispIDs[0] = DISPID_UNKNOWN;
02332     hResult = DISP_E_UNKNOWNNAME;
02333    }
02334    ENSURE( pProp != NULL );
02335    pDispIDs[0] = pProp->GetID();
02336
02337    if( nNames > 1 )
02338    {
02339     for( iName = 1; iName < nNames; iName++ )
02340     {
02341      pDispIDs[iName] = DISPID_UNKNOWN;
02342     }
02343     hResult = DISP_E_UNKNOWNNAME;
02344    }
02345
02346    return( hResult );
02347 }
02348
02349 STDMETHODIMP CTestContainer98Item::XAmbientProperties::GetTypeInfo(
02350    UINT iTypeInfo, LCID lcid, ITypeInfo** ppTypeInfo )
02351 {
02352    (void)iTypeInfo;
02353    (void)lcid;
02354    (void)ppTypeInfo;
02355
02356    METHOD_PROLOGUE( CTestContainer98Item, AmbientProperties )
02357    ASSERT_VALID( pThis );
02358
02359    return( E_NOTIMPL );
02360 }
02361
02362 STDMETHODIMP CTestContainer98Item::XAmbientProperties::GetTypeInfoCount(
02363    UINT* pnInfoCount )
02364 {
02365    METHOD_PROLOGUE( CTestContainer98Item, AmbientProperties )
02366    ASSERT_VALID( pThis );
02367
02368    *pnInfoCount = 0;
02369
02370    return( S_OK );
02371 }
02372
02373 STDMETHODIMP CTestContainer98Item::XAmbientProperties::Invoke(
02374    DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags,
02375    DISPPARAMS* pdpParams, VARIANT* pvarResult, EXCEPINFO* pExceptionInfo,
02376    UINT* piArgErr )
02377 {
02378    CTestContainer98Doc* pDoc;
02379    CAmbientProperty* pProp;
02380    HRESULT hResult;
02381    COleVariant varValue;
02382
02383    (void)iid;
02384    (void)lcid;
02385    (void)wFlags;
02386    (void)pdpParams;
02387    (void)pExceptionInfo;
02388    (void)piArgErr;
02389
02390    METHOD_PROLOGUE( CTestContainer98Item, AmbientProperties )
02391    ASSERT_VALID( pThis );
02392
02393    if( dispidMember == DISPID_AMBIENT_DISPLAYASDEFAULT )
02394    {
02395     VariantClear( pvarResult );
02396     pvarResult->vt = VT_BOOL;
02397     if( pThis->m_tDisplayAsDefault )
02398     {
02399      pvarResult->boolVal = VAR_TRUE;
02400     }
02401     else
02402     {
02403      pvarResult->boolVal = VAR_FALSE;
02404     }
02405
02406     return( S_OK );
02407    }
02408
02409    pDoc = pThis->GetDocument();
02410
02411    pProp = pDoc->FindAmbientProperty( dispidMember );
02412    if( pProp == NULL )
02413    {
02414     TCControlTrace( TRACELEVEL_NORMAL, pThis,
02415      "Control asked for unknown ambient property.  DISPID=%d\n",
02416      dispidMember );
02417     return( DISP_E_MEMBERNOTFOUND );
02418    }
02419
02420    if( !pProp->IsEnabled() )
02421    {
02422     TCControlTrace( TRACELEVEL_NORMAL, pThis,
02423      "Control asked for ambient property %s, but the property was disabled.\n",
02424      LPCTSTR( pProp->GetName() ) );
02425     return( DISP_E_MEMBERNOTFOUND );
02426    }
02427
02428    TCControlTrace( TRACELEVEL_NORMAL, pThis,
02429     "Control got ambient property %s.\n", LPCTSTR( pProp->GetName() ) );
02430
02431    varValue = pProp->GetValue();
02432    hResult = VariantCopy( pvarResult, &varValue );
02433    if( FAILED( hResult ) )
02434    {
02435     return( hResult );
02436    }
02437
02438    return( S_OK );
02439 }
02440
02441
02442 ///////////////////////////////////////////////////////////////////////////////
02443 // CTestContainer98Item::XPropertyNotifySink
02444 ///////////////////////////////////////////////////////////////////////////////
02445
02446 STDMETHODIMP_( ULONG ) CTestContainer98Item::XPropertyNotifySink::AddRef()
02447 {
02448    METHOD_PROLOGUE( CTestContainer98Item, PropertyNotifySink )
02449
02450    TCControlTrace( TRACELEVEL_NORMAL, pThis,
02451     "XPropertyNotifySink::AddRef().\n" );
02452
02453    return( pThis->ExternalAddRef() );
02454 }
02455
02456 STDMETHODIMP_( ULONG ) CTestContainer98Item::XPropertyNotifySink::Release()
02457 {
02458    METHOD_PROLOGUE( CTestContainer98Item, PropertyNotifySink )
02459
02460    TCControlTrace( TRACELEVEL_NORMAL, pThis,
02461     "XPropertyNotifySink::Release().\n" );
02462
02463    return( pThis->ExternalRelease() );
02464 }
02465
02466 STDMETHODIMP CTestContainer98Item::XPropertyNotifySink::QueryInterface(
02467    REFIID iid, LPVOID* ppvObj )
02468 {
02469    METHOD_PROLOGUE( CTestContainer98Item, PropertyNotifySink )
02470
02471    return( pThis->ExternalQueryInterface( &iid, ppvObj ) );
02472 }
02473
02474 STDMETHODIMP CTestContainer98Item::XPropertyNotifySink::OnChanged(
02475    DISPID dispid )
02476 {
02477    CMethodInfo* pPropertyInfo;
02478    CLog* pLog;
02479
02480    METHOD_PROLOGUE( CTestContainer98Item, PropertyNotifySink )
02481
02482    pLog = pThis->GetDocument()->GetLog();
02483    if( pLog != NULL )
02484    {
02485     pPropertyInfo = pThis->m_infoMethods.FindPropertyGet( dispid );
02486     if( pPropertyInfo == NULL )
02487     {
02488      (*pLog)<<pThis->GetDisplayName()<<_T(
02489       ": Property Change: Unknown property (DISPID=" )<<dispid<<_T(
02490       ")\n" );
02491     }
02492     else
02493     {
02494      if( pPropertyInfo->IsLogged() )
02495      {
02496       (*pLog)<<pThis->GetDisplayName()<<_T( ": Property Change: " )<<
02497          pPropertyInfo->GetName()<<_T( "\n" );
02498      }
02499     }
02500   }
02501
02502    return( S_OK );
02503 }
02504
02505 STDMETHODIMP CTestContainer98Item::XPropertyNotifySink::OnRequestEdit(
02506    DISPID dispid )
02507 {
02508    CMethodInfo* pPropertyInfo;
02509    CLog* pLog;
02510    CString strFormat;
02511    CString strPrompt;
02512    CString strUserType;
02513    int nResult;
02514    HRESULT hrResponse = S_FALSE;
02515
02516    METHOD_PROLOGUE( CTestContainer98Item, PropertyNotifySink )
02517
02518    pPropertyInfo = pThis->m_infoMethods.FindMethod( dispid );
02519    if( pPropertyInfo == NULL )
02520    {
02521     hrResponse = S_OK;
02522    }
02523    else
02524    {
02525     switch( pPropertyInfo->GetRequestEditResponse() )
02526     {
02527     case REQUESTEDIT_ALWAYS:
02528      hrResponse = S_OK;
02529      break;
02530
02531     case REQUESTEDIT_NEVER:
02532      hrResponse = S_FALSE;
02533      break;
02534
02535     case REQUESTEDIT_PROMPT:
02536      AfxFormatString2( strPrompt, IDS_PROPERTYEDITREQUESTFORMAT,
02537       pPropertyInfo->GetName(), pThis->GetDisplayName() );
02538      nResult = AfxMessageBox( strPrompt, MB_YESNO );
02539      if( nResult == IDYES )
02540      {
02541       hrResponse = S_OK;
02542      }
02543      else
02544      {
02545       hrResponse = S_FALSE;
02546      }
02547      break;
02548
02549     default:
02550      ASSERT( FALSE );
02551      break;
02552     }
02553    }
02554
02555    pLog = pThis->GetDocument()->GetLog();
02556    if( pLog != NULL )
02557    {
02558     if( pPropertyInfo == NULL )
02559     {
02560      (*pLog)<<pThis->GetDisplayName()<<_T(
02561       "Property Edit Request: Unknown property (DISPID=" )<<dispid<<_T(
02562       ")\n" );
02563     }
02564     else
02565     {
02566      if( pPropertyInfo->LogEditRequests() )
02567      {
02568       (*pLog)<<pThis->GetDisplayName()<<_T(
02569          ": Property Edit Request: " )<<pPropertyInfo->GetName()<<_T(
02570          " (" );
02571       if( hrResponse == S_OK )
02572       {
02573          (*pLog)<<_T( "Allowed)\n" );
02574       }
02575       else
02576       {
02577          (*pLog)<<_T( "Denied)\n" );
02578       }
02579      }
02580     }
02581    }
02582
02583    return( hrResponse );
02584 }
02585
02586 void CTestContainer98Item::DisplayAsDefault( BOOL tDefault )
02587 {
02588    BOOL tOldDisplayAsDefault;
02589
02590    ASSERT( ActsLikeButton() );
02591
02592    tOldDisplayAsDefault = m_tDisplayAsDefault;
02593    m_tDisplayAsDefault = tDefault;
02594
02595    if( (tOldDisplayAsDefault && !m_tDisplayAsDefault) ||
02596     (!tOldDisplayAsDefault && m_tDisplayAsDefault) )
02597    {
02598     // The default setting changed.
02599     m_pOleControl->OnAmbientPropertyChange(
02600      DISPID_AMBIENT_DISPLAYASDEFAULT );
02601    }
02602 }
02603
02604 void CTestContainer98Item::FreezeEvents( BOOL tFreeze )
02605 {
02606    if( m_pOleControl != NULL )
02607    {
02608     m_pOleControl->FreezeEvents( tFreeze );
02609    }
02610 }
02611
02612 BOOL CTestContainer98Item::IsInPlaceActive() const
02613 {
02614    UINT eState;
02615
02616    eState = GetItemState();
02617
02618    return( (eState == activeState) || (eState == activeUIState) );
02619 }
02620
02621 BOOL CTestContainer98Item::IsUIActive() const
02622 {
02623    return( GetItemState() == activeUIState );
02624 }
02625
02626 void CTestContainer98Item::OnAmbientPropertyChange( DISPID dispid )
02627 {
02628    m_pOleControl->OnAmbientPropertyChange( dispid );
02629 }
02630
02631 void CTestContainer98Item::OnDeselect()
02632 {
02633    CWnd* pStatusBarWnd;
02634    CWnd* pFrameWnd;
02635    CMainFrame* pFrame;
02636    CStatusBar* pStatusBar;
02637
02638    pFrameWnd = AfxGetMainWnd();
02639    pFrame = STATIC_DOWNCAST( CMainFrame, pFrameWnd );
02640
02641    pStatusBarWnd = pFrame->GetMessageBar();
02642    pStatusBar = STATIC_DOWNCAST( CStatusBar, pStatusBarWnd );
02643
02644    pStatusBar->SetPaneText( 1, _T( "" ) );
02645    pStatusBar->SetPaneText( 2, _T( "" ) );
02646 }
02647
02648 void CTestContainer98Item::UpdateStatusBar()
02649 {
02650    CWnd* pStatusBarWnd;
02651    CWnd* pFrameWnd;
02652    CMainFrame* pFrame;
02653    CStatusBar* pStatusBar;
02654
02655    pFrameWnd = AfxGetMainWnd();
02656    // No Active window yet
02657    if (pFrameWnd != NULL) {
02658      pFrame = STATIC_DOWNCAST( CMainFrame, pFrameWnd );
02659
02660      pStatusBarWnd = pFrame->GetMessageBar();
02661      pStatusBar = STATIC_DOWNCAST( CStatusBar, pStatusBarWnd );
02662
02663      switch( GetItemState() )
02664      {
02665      case activeState:
02666       pStatusBar->SetPaneText( 1, _T( "Active" ) );
02667       if( m_tWindowless )
02668       {
02669        pStatusBar->SetPaneText( 2, _T( "Windowless" ) );
02670       }
02671       else
02672       {
02673        pStatusBar->SetPaneText( 2, _T( "Windowed" ) );
02674       }
02675       break;
02676
02677      case activeUIState:
02678       pStatusBar->SetPaneText( 1, _T( "UIActive" ) );
02679       if( m_tWindowless )
02680       {
02681        pStatusBar->SetPaneText( 2, _T( "Windowless" ) );
02682       }
02683       else
02684       {
02685        pStatusBar->SetPaneText( 2, _T( "Windowed" ) );
02686       }
02687       break;
02688
02689      case openState:
02690       pStatusBar->SetPaneText( 1, _T( "Open" ) );
02691       pStatusBar->SetPaneText( 2, _T( "" ) );
02692       break;
02693
02694      case loadedState:
02695       pStatusBar->SetPaneText( 1, _T( "Loaded" ) );
02696       pStatusBar->SetPaneText( 2, _T( "" ) );
02697       break;
02698
02699      case emptyState:
02700       pStatusBar->SetPaneText( 1, _T( "Empty" ) );
02701       pStatusBar->SetPaneText( 2, _T( "" ) );
02702       break;
02703
02704      default:
02705       ASSERT( FALSE );
02706       break;
02707      }
02708    }
02709
02710 }
02711
02712 void CTestContainer98Item::OnSelect()
02713 {
02714    UpdateStatusBar();
02715 }
02716
02717 BOOL CTestContainer98Item::HasUIActiveState() const
02718 {
02719    DWORD dwMiscStatus;
02720
02721    dwMiscStatus = 0;
02722    m_lpObject->GetMiscStatus( DVASPECT_CONTENT, &dwMiscStatus );
02723
02724    return( !(dwMiscStatus&OLEMISC_NOUIACTIVATE) );
02725 }
02726
02727 BOOL CTestContainer98Item::IsInsideOut() const
02728 {
02729    return( m_tInsideOut );
02730 }
02731
02732 void CTestContainer98Item::Move( const CRect& rect )
02733 {
02734    BOOL tSizeChanged;
02735    CRect rectOld;
02736    CSize size;
02737    BOOL tSuccess;
02738
02739    tSizeChanged = (rect.Size() != m_rect.Size());
02740
02741    InvalidateItem();
02742    rectOld = m_rect;
02743    m_rect = rect;
02744
02745    if( IsInPlaceActive() )
02746    {
02747     SetItemRects();
02748    }
02749
02750    if( tSizeChanged )
02751    {
02752     CClientDC dc( NULL );
02753
02754     tSuccess = TRUE;
02755     size = m_rect.Size();
02756     dc.DPtoHIMETRIC( &size );
02757     TRY
02758     {
02759      SetExtent( size );
02760     }
02761     CATCH( CException, e )
02762     {
02763      tSuccess = FALSE;
02764     }
02765     END_CATCH
02766
02767     if( !tSuccess )
02768     {
02769      m_rect = rectOld;
02770      if( IsInPlaceActive() )
02771      {
02772       SetItemRects();
02773      }
02774     }
02775    }
02776
02777    InvalidateItem();
02778 }
02779
02780 void CTestContainer98Item::Prepare()
02781 {
02782    m_tracker.m_rect = m_rect;
02783    m_tracker.m_rect.InflateRect( MARGIN_PIXELS, MARGIN_PIXELS );
02784
02785    if( m_pView->IsSelected( this ) )
02786    {
02787     m_tracker.m_nStyle |= CRectTracker::resizeInside;
02788    }
02789    else
02790    {
02791     m_tracker.m_nStyle &= ~CRectTracker::resizeInside;
02792    }
02793
02794    if( (GetItemState() == openState) || (GetItemState() == activeUIState) )
02795    {
02796     m_tracker.m_nStyle |= CRectTracker::hatchInside;
02797    }
02798    else
02799    {
02800     m_tracker.m_nStyle &= ~CRectTracker::hatchInside;
02801    }
02802 }
02803
02804 HRESULT CTestContainer98Item::SaveToPropertyBag( IPropertyBag* pPropertyBag )
02805 {
02806    HRESULT hResult;
02807    IPersistPropertyBagPtr pPersistPropertyBag;
02808
02809    ENSURE( pPropertyBag != NULL );
02810    ENSURE( m_lpObject != NULL );
02811
02812    hResult = m_lpObject->QueryInterface( IID_IPersistPropertyBag,
02813     (void**)&pPersistPropertyBag );
02814    if( FAILED( hResult ) )
02815    {
02816     TCControlTrace( TRACELEVEL_NORMAL, this,
02817      "Control does not support IPersistPropertyBag.\n" );
02818     return( hResult );
02819    }
02820
02821    hResult = pPersistPropertyBag->Save( pPropertyBag, TRUE, TRUE );
02822    if( FAILED( hResult ) )
02823    {
02824     return( hResult );
02825    }
02826
02827    return( S_OK );
02828 }
02829
02830 HRESULT CTestContainer98Item::SaveToStorage( IStorage* pStorage )
02831 {
02832    HRESULT hResult;
02833    IPersistStoragePtr pPersistStorage;
02834    CLSID clsid;
02835
02836    ASSERT( pStorage != NULL );
02837    ASSERT( m_lpObject != NULL );
02838
02839    pPersistStorage = m_lpObject;
02840    if( pPersistStorage == NULL )
02841    {
02842     return( E_NOINTERFACE );
02843    }
02844
02845    pPersistStorage->GetClassID( &clsid );
02846    hResult = WriteClassStg( pStorage, clsid );
02847    if( FAILED( hResult ) )
02848    {
02849     return( hResult );
02850    }
02851
02852    hResult = pPersistStorage->Save( pStorage, FALSE );
02853    if( FAILED( hResult ) )
02854    {
02855     return( hResult );
02856    }
02857
02858    pPersistStorage->SaveCompleted( NULL );
02859
02860    return( S_OK );
02861 }
02862
02863 HRESULT CTestContainer98Item::SaveToStream( IStream* pStream )
02864 {
02865    HRESULT hResult;
02866    IPersistStreamPtr pPersistStream;
02867    IPersistStreamInitPtr pPersistStreamInit;
02868    IPersistPtr pPersist;
02869    CLSID clsid;
02870
02871    ENSURE( pStream != NULL );
02872    ENSURE( m_lpObject != NULL );
02873
02874    hResult = m_lpObject->QueryInterface( IID_IPersist, (void**)&pPersist );
02875    if( FAILED( hResult ) )
02876    {
02877     // Some control implementers forget that the IPersist* interfaces are all
02878     // derived from IPersist.  If they forget to allow a QI for IPersist, let
02879     // them know the error of their ways, and just go for IPersistStorage to
02880     // get the IPersist interface.
02881     TCControlTrace( TRACELEVEL_NORMAL, this,
02882      "Object doesn't support IPersist.\n" );
02883     hResult = m_lpObject->QueryInterface( IID_IPersistStorage,
02884      (void**)&pPersist );
02885     if( FAILED( hResult ) )
02886     {
02887      return( hResult );
02888     }
02889    }
02890
02891    pPersist->GetClassID( &clsid );
02892    hResult = WriteClassStm( pStream, clsid );
02893    if( FAILED( hResult ) )
02894    {
02895     return( hResult );
02896    }
02897
02898    hResult = m_lpObject->QueryInterface( IID_IPersistStream,
02899     (void**)&pPersistStream );
02900    if( SUCCEEDED( hResult ) )
02901    {
02902     hResult = pPersistStream->Save( pStream, TRUE );
02903    }
02904    else
02905    {
02906     hResult = m_lpObject->QueryInterface( IID_IPersistStreamInit,
02907      (void**)&pPersistStreamInit );
02908     if( FAILED( hResult ) )
02909     {
02910      return( hResult );
02911     }
02912     hResult = pPersistStreamInit->Save( pStream, TRUE );
02913    }
02914    if( FAILED( hResult ) )
02915    {
02916     return( hResult );
02917    }
02918
02919    return( S_OK );
02920 }
02921
02922 DWORD CTestContainer98Item::HitTest( CPoint point )
02923 {
02924    HRESULT hResult;
02925    IViewObjectExPtr pViewObjectEx;
02926    DWORD dwHitResult;
02927
02928    if( m_lpObject == NULL )
02929    {
02930      return( HITRESULT_OUTSIDE );
02931    }
02932    if( !m_rect.PtInRect( point ) )
02933    {
02934     // Trivially reject the point.
02935     return( HITRESULT_OUTSIDE );
02936    }
02937
02938    hResult = m_lpObject->QueryInterface( IID_IViewObjectEx,
02939     (void**)&pViewObjectEx );
02940    if( SUCCEEDED( hResult ) )
02941    {
02942     hResult = pViewObjectEx->QueryHitPoint( DVASPECT_CONTENT, &m_rect, point,
02943      0, &dwHitResult );
02944     if( SUCCEEDED( hResult ) )
02945     {
02946      return( dwHitResult );
02947     }
02948    }
02949
02950    // If we got here, either the object doesn't support hit testing, or the hit
02951    // test call failed.  Since we would have rejected the point if it didn't
02952    // lie within the object's bounding rect, we know that the point lies within
02953    // the object.
02954
02955    return( HITRESULT_HIT );
02956 }
02957
02958 BOOL CTestContainer98Item::DrawFrontToBack( CDC* pDC, LPCRECT prectBounds )
02959 {
02960    HRESULT hResult;
02961    RECTL rclBounds;
02962    RECTL* prclBounds;
02963    DWORD dwViewStatus;
02964    RECTL rclClip;
02965    CRect rectClip;
02966    CSize size;
02967
02968    if( (m_lpObject == NULL) || (m_lpViewObject == NULL) )
02969    {
02970     return( FALSE );
02971    }
02972
02973    if( IsInPlaceActive() && !m_tWindowless )
02974    {
02975     return( FALSE );
02976    }
02977
02978    if( m_pViewObjectEx == NULL )
02979    {
02980     // The control doesn't understand two-pass drawing, so just draw it on
02981     // pass 2.
02982     return( FALSE );
02983    }
02984
02985    if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
02986    {
02987     // We are invisible.
02988     return( FALSE );
02989    }
02990
02991    // convert RECT lpBounds to RECTL rclBounds
02992    rclBounds.left = prectBounds->left;
02993    rclBounds.top = prectBounds->top;
02994    rclBounds.right = prectBounds->right;
02995    rclBounds.bottom = prectBounds->bottom;
02996
02997    if( m_tWindowless )
02998    {
02999     prclBounds = NULL;
03000    }
03001    else
03002    {
03003     prclBounds = &rclBounds;
03004    }
03005
03006    // Assume that we won't be able to draw the first pass.
03007    m_dwAspectPass2 = DVASPECT_CONTENT;
03008
03009    m_pViewObjectEx->GetViewStatus( &dwViewStatus );
03010    ASSERT( m_dwViewStatus == dwViewStatus );
03011    if( !(m_dwViewStatus&VIEWSTATUS_DVASPECTOPAQUE) )
03012    {
03013     return( FALSE );
03014    }
03015
03016    hResult = m_pViewObjectEx->GetRect( DVASPECT_OPAQUE, &rclClip );
03017    if( FAILED( hResult ) )
03018    {
03019     return( FALSE );
03020    }
03021
03022    hResult = m_lpViewObject->Draw( DVASPECT_OPAQUE, -1, NULL, NULL, NULL,
03023     pDC->m_hDC, prclBounds, NULL, NULL, 0 );
03024    if( SUCCEEDED( hResult ) )
03025    {
03026     // Just draw the transparent part in pass 2.
03027     m_dwAspectPass2 = DVASPECT_TRANSPARENT;
03028    }
03029
03030    size = CSize( rclClip.left, rclClip.top );
03031    pDC->HIMETRICtoDP( &size );
03032    rectClip.left = m_rect.left+size.cx;
03033    rectClip.top = m_rect.top+size.cy;
03034    size = CSize( rclClip.right, rclClip.bottom );
03035    pDC->HIMETRICtoDP( &size );
03036    rectClip.right = m_rect.left+size.cx;
03037    rectClip.bottom = m_rect.top+size.cy;
03038    pDC->ExcludeClipRect( &rectClip );
03039
03040    return( TRUE );
03041 }
03042
03043 BOOL CTestContainer98Item::DrawBackToFront( CDC* pDC, LPCRECT prectBounds )
03044 {
03045    RECTL rclBounds;
03046    RECTL* prclBounds;
03047    DWORD dwViewStatus;
03048
03049    if( (m_lpObject == NULL) || (m_lpViewObject == NULL) )
03050    {
03051     return( FALSE );
03052    }
03053
03054    if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
03055    {
03056     // We are invisible.
03057     return( FALSE );
03058    }
03059
03060    if( IsInPlaceActive() && !m_tWindowless )
03061    {
03062     return( FALSE );
03063    }
03064
03065    // convert RECT lpBounds to RECTL rclBounds
03066    rclBounds.left = prectBounds->left;
03067    rclBounds.top = prectBounds->top;
03068    rclBounds.right = prectBounds->right;
03069    rclBounds.bottom = prectBounds->bottom;
03070
03071    if( m_tWindowless )
03072    {
03073     prclBounds = NULL;
03074    }
03075    else
03076    {
03077     prclBounds = &rclBounds;
03078    }
03079
03080    if( m_pViewObjectEx != NULL )
03081    {
03082     m_pViewObjectEx->GetViewStatus( &dwViewStatus );
03083     ASSERT( dwViewStatus == m_dwViewStatus );
03084    }
03085    else
03086    {
03087     ASSERT( m_dwViewStatus == 0 );
03088    }
03089
03090    if( (m_dwAspectPass2 == DVASPECT_TRANSPARENT)&&(m_dwViewStatus&
03091     VIEWSTATUS_DVASPECTTRANSPARENT) )
03092    {
03093     m_lpViewObject->Draw( DVASPECT_TRANSPARENT, -1, NULL, NULL, NULL,
03094      pDC->m_hDC, prclBounds, NULL, NULL, 0 );
03095    }
03096    else if( m_dwAspectPass2 == DVASPECT_CONTENT )
03097    {
03098     m_lpViewObject->Draw( DVASPECT_CONTENT, -1, NULL, NULL, NULL, pDC->m_hDC,
03099      prclBounds, NULL, NULL, 0 );
03100    }
03101
03102    return( TRUE );
03103 }
03104
03105 BOOL CTestContainer98Item::Draw( CDC* pDC, LPCRECT prectBounds,
03106    DVASPECT nDrawAspect )
03107 {
03108    RECTL rclBounds;
03109    RECTL* prclBounds;
03110    CRect rectClip;
03111    CSize size;
03112
03113    if( (m_lpObject == NULL) || (m_lpViewObject == NULL) )
03114    {
03115     return( FALSE );
03116    }
03117
03118    if( GetDocument()->GetUserMode() && IsInvisibleAtRuntime() )
03119    {
03120     // We are invisible.
03121     return( FALSE );
03122    }
03123
03124    // use current draw aspect if aspect is -1 (default)
03125    if( nDrawAspect == -1 )
03126    {
03127     nDrawAspect = m_nDrawAspect;
03128    }
03129
03130    // convert RECT lpBounds to RECTL rclBounds
03131    rclBounds.left = prectBounds->left;
03132    rclBounds.top = prectBounds->top;
03133    rclBounds.right = prectBounds->right;
03134    rclBounds.bottom = prectBounds->bottom;
03135
03136    if( m_tWindowless )
03137    {
03138     prclBounds = NULL;
03139    }
03140    else
03141    {
03142     prclBounds = &rclBounds;
03143    }
03144
03145    m_lpViewObject->Draw( DVASPECT_CONTENT, -1, NULL, NULL, NULL, pDC->m_hDC,
03146     prclBounds, NULL, NULL, 0 );
03147
03148    return( TRUE );
03149 }
03150
03151 void CTestContainer98Item::OnDeactivate( BOOL tNoRedraw )
03152 {
03153    TCControlTrace( TRACELEVEL_NORMAL, this, "Deactivating control\n" );
03154
03155    if( m_tWindowless )
03156    {
03157     if( GetActiveView()->GetItemWithFocus() == this )
03158     {
03159      GetActiveView()->OnWindowlessReleaseFocus();
03160     }
03161     m_tWindowless = FALSE;
03162     m_pOleInPlaceObjectWindowless.Release();
03163    }
03164
03165    if( !tNoRedraw )
03166    {
03167     InvalidateItem();
03168    }
03169
03170    COleClientItem::OnDeactivate();
03171
03172    UpdateStatusBar();
03173 }
03174
03175 void CTestContainer98Item::OnDeactivate()
03176 {
03177    OnDeactivate( FALSE );
03178 }
03179
03180 STDMETHODIMP_( ULONG ) CTestContainer98Item::XOleInPlaceSiteWindowless::
03181    AddRef()
03182 {
03183    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless )
03184
03185    TCControlTrace( TRACELEVEL_NORMAL, pThis,
03186     "XOleInPlaceSiteWindowless::AddRef().\n" );
03187
03188    return( pThis->ExternalAddRef() );
03189 }
03190
03191 STDMETHODIMP_( ULONG ) CTestContainer98Item::XOleInPlaceSiteWindowless::
03192    Release()
03193 {
03194    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless )
03195
03196    TCControlTrace( TRACELEVEL_NORMAL, pThis,
03197     "XOleInPlaceSiteWindowless::Release().\n" );
03198
03199    return( pThis->ExternalRelease() );
03200 }
03201
03202 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::QueryInterface(
03203    REFIID iid, LPVOID* ppvObj )
03204 {
03205    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless )
03206
03207    return( pThis->ExternalQueryInterface( &iid, ppvObj ) );
03208 }
03209
03210 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03211    ContextSensitiveHelp( BOOL tEnterMode )
03212 {
03213    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03214
03215    return( pThis->m_xOleIPSite.ContextSensitiveHelp( tEnterMode ) );
03216 }
03217
03218 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::GetWindow(
03219    HWND* phWnd )
03220 {
03221    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03222
03223    return( pThis->m_xOleIPSite.GetWindow( phWnd ) );
03224 }
03225
03226 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03227    CanInPlaceActivate()
03228 {
03229    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03230
03231    return( pThis->m_xOleIPSite.CanInPlaceActivate() );
03232 }
03233
03234 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03235    DeactivateAndUndo()
03236 {
03237    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03238
03239    return( pThis->m_xOleIPSite.DeactivateAndUndo() );
03240 }
03241
03242 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03243    DiscardUndoState()
03244 {
03245    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03246
03247    return( pThis->m_xOleIPSite.DiscardUndoState() );
03248 }
03249
03250 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::GetWindowContext(
03251    IOleInPlaceFrame** ppFrame, IOleInPlaceUIWindow** ppDoc, LPRECT prectPos,
03252    LPRECT prectClip, LPOLEINPLACEFRAMEINFO pFrameInfo )
03253 {
03254    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03255
03256    return( pThis->m_xOleIPSite.GetWindowContext( ppFrame, ppDoc, prectPos,
03257     prectClip, pFrameInfo ) );
03258 }
03259
03260 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03261    OnInPlaceActivate()
03262 {
03263    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03264
03265    return( pThis->m_xOleIPSite.OnInPlaceActivate() );
03266 }
03267
03268 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03269    OnInPlaceDeactivate()
03270 {
03271    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03272
03273    return( pThis->m_xOleIPSite.OnInPlaceDeactivate() );
03274 }
03275
03276 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::OnPosRectChange(
03277    LPCRECT prectPos )
03278 {
03279    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03280
03281    return( pThis->m_xOleIPSite.OnPosRectChange( prectPos ) );
03282 }
03283
03284 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless:: OnUIActivate()
03285 {
03286    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03287
03288    return( pThis->m_xOleIPSite.OnUIActivate() );
03289 }
03290
03291 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::OnUIDeactivate(
03292    BOOL tUndoable )
03293 {
03294    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03295
03296    return( pThis->m_xOleIPSite.OnUIDeactivate( tUndoable ) );
03297 }
03298
03299 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::Scroll(
03300    SIZE sizeExtent )
03301 {
03302    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03303
03304    return( pThis->m_xOleIPSite.Scroll( sizeExtent ) );
03305 }
03306
03307 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03308    OnInPlaceActivateEx( BOOL* ptNoRedraw, DWORD dwFlags )
03309 {
03310    HRESULT hResult;
03311
03312    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03313
03314    ASSERT( ptNoRedraw != NULL );
03315
03316    ASSERT( pThis->m_tWindowless == FALSE );
03317
03318    if( dwFlags&ACTIVATE_WINDOWLESS )
03319    {
03320     pThis->m_tWindowless = TRUE;
03321     hResult = pThis->m_lpObject->QueryInterface(
03322      IID_IOleInPlaceObjectWindowless,
03323      (void**)&pThis->m_pOleInPlaceObjectWindowless );
03324     ASSERT( SUCCEEDED( hResult ) );
03325    }
03326
03327    hResult = pThis->m_xOleIPSite.OnInPlaceActivate();
03328    if( FAILED( hResult ) )
03329    {
03330       return( hResult );
03331    }
03332
03333    if( ptNoRedraw != NULL )
03334    {
03335       ASSERT( pThis->GetActiveView() != NULL );
03336     if( pThis->GetActiveView()->GetUpdateRect( NULL ) )
03337     {
03338      *ptNoRedraw = FALSE;
03339     }
03340     else
03341     {
03342      *ptNoRedraw = TRUE;
03343     }
03344    }
03345
03346    return( S_OK );
03347 }
03348
03349 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03350    OnInPlaceDeactivateEx( BOOL tNoRedraw )
03351 {
03352    (void)tNoRedraw;
03353
03354    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03355
03356    pThis->OnDeactivate( tNoRedraw );
03357
03358    return( S_OK );
03359 }
03360
03361 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::RequestUIActivate()
03362 {
03363    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03364
03365    return( S_OK );
03366 }
03367
03368 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::AdjustRect(
03369    LPRECT prect )
03370 {
03371    (void)prect;
03372
03373    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03374
03375    return( E_NOTIMPL );
03376 }
03377
03378 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03379    CanWindowlessActivate()
03380 {
03381    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03382
03383    TCControlTrace( TRACELEVEL_NORMAL, pThis,
03384     "Control wants to be windowless.\n" );
03385    if( pThis->GetDocument()->CanWindowlessActivate() )
03386    {
03387     TCControlTrace( TRACELEVEL_NORMAL, pThis,
03388      "Windowless activation is allowed.\n" );
03389     return( S_OK );
03390    }
03391    else
03392    {
03393     TCControlTrace( TRACELEVEL_NORMAL, pThis,
03394      "You'll create a window and like it.\n" );
03395     return( S_FALSE );
03396    }
03397 }
03398
03399 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::GetCapture()
03400 {
03401    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03402
03403    if( pThis->GetActiveView()->GetItemWithCapture() == pThis )
03404    {
03405     return( S_OK );
03406    }
03407    else
03408    {
03409     return( S_FALSE );
03410    }
03411 }
03412
03413 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::GetDC(
03414    LPCRECT prect, DWORD dwFlags, HDC* phDC )
03415 {
03416    CView* pView;
03417    CRgn rgn;
03418    CRect rect;
03419
03420    (void)dwFlags;
03421
03422    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03423
03424    ENSURE( phDC != NULL );
03425    *phDC = NULL;
03426
03427    if( pThis->m_pDC != NULL )
03428    {
03429     return( E_FAIL );
03430    }
03431
03432    pView = pThis->GetActiveView();
03433    ENSURE( pView != NULL );
03434
03435    pThis->m_pDC = pView->GetDC();
03436    if( pThis->m_pDC == NULL )
03437    {
03438     return( E_FAIL );
03439    }
03440
03441    if( prect == NULL )
03442    {
03443     // The clipping rectangle is the object's extent rectangle.
03444     rect = pThis->m_rect;
03445    }
03446    else
03447    {
03448     // The clipping rectangle is the object's extent rectangle intersected
03449     // with the rectangle requested by the object.
03450     rect.IntersectRect( &pThis->m_rect, prect );
03451    }
03452
03453    rgn.CreateRectRgnIndirect( &rect );
03454    pThis->m_pDC->SelectClipRgn( &rgn, RGN_AND );
03455
03456    *phDC = pThis->m_pDC->GetSafeHdc();
03457
03458    return( S_OK );
03459 }
03460
03461 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::GetFocus()
03462 {
03463    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03464
03465    if( pThis->GetActiveView()->GetItemWithFocus() == pThis )
03466    {
03467     return( S_OK );
03468    }
03469    else
03470    {
03471     return( S_FALSE );
03472    }
03473 }
03474
03475 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::InvalidateRect(
03476    LPCRECT prect, BOOL tErase )
03477 {
03478    CRect rect;
03479
03480    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03481
03482    if( prect == NULL )
03483    {
03484     rect = pThis->m_rect;
03485    }
03486    else
03487    {
03488     // Intersect the given rectangle with the bounds of the object.
03489     rect.IntersectRect( prect, &pThis->m_rect );
03490
03491     if( rect != *prect )
03492     {
03493      TCControlTrace( TRACELEVEL_NORMAL, pThis,
03494       "Object tried to invalidate pixels outside its bounds.\n" );
03495     }
03496    }
03497
03498    if( !rect.IsRectEmpty() )
03499    {
03500     pThis->GetActiveView()->InvalidateRect( &rect, tErase );
03501     pThis->GetActiveView()->UpdateWindow();
03502    }
03503
03504    return( S_OK );
03505 }
03506
03507 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::InvalidateRgn(
03508    HRGN hRgn, BOOL tErase )
03509 {
03510    CRgn rgn;
03511    CRgn* pRgn;
03512    CRect rectRgn;
03513    CRect rect;
03514
03515    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03516
03517    if( hRgn == NULL )
03518    {
03519     // The object wants its full extent invalidated.  It's much easier to do
03520     // this with a rect than a region.
03521     return( InvalidateRect( NULL, tErase ) );
03522    }
03523
03524    pRgn = CRgn::FromHandle( hRgn );
03525    pRgn->GetRgnBox( &rectRgn );
03526    rect.IntersectRect( &rectRgn, &pThis->m_rect );
03527    if( rect != rectRgn )
03528    {
03529     TCControlTrace( TRACELEVEL_NORMAL, pThis,
03530      "Object tried to invalidate pixels outside its bounds.\n" );
03531     return( InvalidateRect( NULL, tErase ) );
03532    }
03533
03534    pThis->GetActiveView()->InvalidateRgn( pRgn, tErase );
03535
03536    return( S_OK );
03537 }
03538
03539 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::
03540    OnDefWindowMessage( UINT nMessage, WPARAM wParam, LPARAM lParam,
03541    LRESULT* plResult )
03542 {
03543    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03544
03545    return( pThis->GetActiveView()->OnWindowlessDefWindowMessage( nMessage,
03546     wParam, lParam, plResult ) );
03547 }
03548
03549 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::ReleaseDC(
03550    HDC hDC )
03551 {
03552    CView* pView;
03553
03554    UNUSED( hDC );
03555
03556    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03557
03558    pView = pThis->GetActiveView();
03559    ENSURE( pView != NULL );
03560
03561    ASSERT( hDC == pThis->m_pDC->GetSafeHdc() );
03562
03563    pView->ReleaseDC( pThis->m_pDC );
03564
03565    pThis->m_pDC = NULL;
03566
03567    return( S_OK );
03568 }
03569
03570 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::ScrollRect(
03571    int dx, int dy, LPCRECT prectScroll, LPCRECT prectClip )
03572 {
03573    (void)dx;
03574    (void)dy;
03575    (void)prectScroll;
03576    (void)prectClip;
03577
03578    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03579
03580    return( E_NOTIMPL );
03581 }
03582
03583 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::SetCapture(
03584    BOOL tCapture )
03585 {
03586    HRESULT hResult;
03587
03588    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03589
03590    if( tCapture )
03591    {
03592     hResult = pThis->GetActiveView()->OnWindowlessSetCapture( pThis );
03593     if( FAILED( hResult ) )
03594     {
03595      return( hResult );
03596     }
03597    }
03598    else
03599    {
03600     hResult = pThis->GetActiveView()->OnWindowlessReleaseCapture( pThis );
03601     if( FAILED( hResult ) )
03602     {
03603      return( hResult );
03604     }
03605    }
03606
03607    return( hResult );
03608 }
03609
03610 STDMETHODIMP CTestContainer98Item::XOleInPlaceSiteWindowless::SetFocus(
03611    BOOL tFocus )
03612 {
03613    HRESULT hResult;
03614
03615    METHOD_PROLOGUE( CTestContainer98Item, OleInPlaceSiteWindowless );
03616
03617    if( tFocus )
03618    {
03619     hResult = pThis->GetActiveView()->OnWindowlessSetFocus( pThis );
03620     if( FAILED( hResult ) )
03621     {
03622      return( hResult );
03623     }
03624    }
03625    else
03626    {
03627     hResult = pThis->GetActiveView()->OnWindowlessReleaseFocus();
03628     if( FAILED( hResult ) )
03629     {
03630      return( hResult );
03631     }
03632    }
03633
03634    return( hResult );
03635 }
03636
03637 STDMETHODIMP_( ULONG ) CTestContainer98Item::XAdviseSinkEx::AddRef()
03638 {
03639    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx )
03640
03641    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XAdviseSinkEx::AddRef().\n" );
03642
03643    return( pThis->ExternalAddRef() );
03644 }
03645
03646 STDMETHODIMP_( ULONG ) CTestContainer98Item::XAdviseSinkEx::Release()
03647 {
03648    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx )
03649
03650    TCControlTrace( TRACELEVEL_NORMAL, pThis, "XAdviseSinkEx::Release().\n" );
03651
03652    return( pThis->ExternalRelease() );
03653 }
03654
03655 STDMETHODIMP CTestContainer98Item::XAdviseSinkEx::QueryInterface( REFIID iid,
03656    LPVOID* ppvObj )
03657 {
03658    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx )
03659
03660    return( pThis->ExternalQueryInterface( &iid, ppvObj ) );
03661 }
03662
03663 void CTestContainer98Item::XAdviseSinkEx::OnClose()
03664 {
03665    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx );
03666
03667    pThis->m_xAdviseSink.OnClose();
03668 }
03669
03670 void CTestContainer98Item::XAdviseSinkEx::OnDataChange( FORMATETC* pFormatEtc,
03671    STGMEDIUM* pStgMedium )
03672 {
03673    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx );
03674
03675    pThis->m_xAdviseSink.OnDataChange( pFormatEtc, pStgMedium );
03676 }
03677
03678 void CTestContainer98Item::XAdviseSinkEx::OnRename( IMoniker* pMoniker )
03679 {
03680    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx );
03681
03682    pThis->m_xAdviseSink.OnRename( pMoniker );
03683 }
03684
03685 void CTestContainer98Item::XAdviseSinkEx::OnSave()
03686 {
03687    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx );
03688
03689    pThis->m_xAdviseSink.OnSave();
03690 }
03691
03692 void CTestContainer98Item::XAdviseSinkEx::OnViewChange( DWORD dwAspect,
03693    LONG lindex )
03694 {
03695    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx );
03696
03697    pThis->m_xAdviseSink.OnViewChange( dwAspect, lindex );
03698 }
03699
03700 void CTestContainer98Item::XAdviseSinkEx::OnViewStatusChange(
03701    DWORD dwViewStatus )
03702 {
03703    METHOD_PROLOGUE( CTestContainer98Item, AdviseSinkEx );
03704
03705    TRACE( "IAdviseSinkEx::OnViewStatusChange()\n" );
03706
03707    ASSERT( pThis->m_pViewObjectEx != NULL );
03708
03709    pThis->m_dwViewStatus = dwViewStatus;
03710 }
03711
03712 BOOL CTestContainer98Item::OnWindowMessage( const MSG* pMessage )
03713 {
03714    LRESULT lResult;
03715    HRESULT hResult;
03716
03717    hResult = m_pOleInPlaceObjectWindowless->OnWindowMessage( pMessage->message,
03718     pMessage->wParam, pMessage->lParam, &lResult );
03719    if( hResult == S_OK )
03720    {
03721     return( TRUE );
03722    }
03723    else
03724    {
03725     return( FALSE );
03726    }
03727 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagINPPARAMS Member List

This is the complete list of members for tagINPPARAMS, including all inherited members.
cbSize | tagINPPARAMS
dwFlags | tagINPPARAMS
hpndt | tagINPPARAMS
target | tagINPPARAMS
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/stdafx.h Source File

  • vc2008fp
  • RebarTest

stdafx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently,
00003 // but are changed infrequently
00004
00005 #pragma once
00006
00007 #ifndef _SECURE_ATL
00008 #define _SECURE_ATL 1
00009 #endif
00010
00011 #ifndef VC_EXTRALEAN
00012 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00013 #endif
00014
00015 #include "targetver.h"
00016
00017 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00018
00019 // turns off MFC's hiding of some common and often safely ignored warning messages
00020 #define _AFX_ALL_WARNINGS
00021
00022 #include <afxwin.h>         // MFC core and standard components
00023 #include <afxext.h>         // MFC extensions
00024
00025
00026 #include <afxdisp.h>        // MFC Automation classes
00027
00028
00029
00030 #ifndef _AFX_NO_OLE_SUPPORT
00031 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00032 #endif
00033 #ifndef _AFX_NO_AFXCMN_SUPPORT
00034 #include <afxcmn.h>     // MFC support for Windows Common Controls
00035 #endif // _AFX_NO_AFXCMN_SUPPORT
00036
00037 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00038
00039 #if defined _M_IX86
00040 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00041 #elif defined _M_X64
00042 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00043 #else
00044 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00045 #endif
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLocalizeCtrl Member List

This is the complete list of members for CLocalizeCtrl, including all inherited members.
AboutBox() | CLocalizeCtrl | [protected]
CLocalizeCtrl() | CLocalizeCtrl |
DECLARE_OLECREATE_EX(CLocalizeCtrl) DECLARE_OLETYPELIB(CLocalizeCtrl) DECLARE_PROPPAGEIDS(CLocalizeCtrl) DECLARE_OLECTLTYPE(CLocalizeCtrl) afx_msg void OnLButtonDown(UINT nFlags | CLocalizeCtrl | [protected]
dispidInvert enum value | CLocalizeCtrl |
DoPropExchange(CPropExchange *pPX) | CLocalizeCtrl | [virtual]
FireClick() | CLocalizeCtrl | [inline, protected]
GetResourceHandle(LCID lcid) | CLocalizeCtrl | [protected, virtual]
LoadCaption() | CLocalizeCtrl | [protected, virtual]
m_invert | CLocalizeCtrl | [protected]
m_inverted | CLocalizeCtrl | [protected]
OnAmbientPropertyChange(DISPID dispid) | CLocalizeCtrl | [virtual]
OnCancelMode() | CLocalizeCtrl | [protected]
OnDraw(CDC *pdc, const CRect &rcBounds, const CRect &rcInvalid) | CLocalizeCtrl | [virtual]
OnInvertChanged() | CLocalizeCtrl | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CLocalizeCtrl | [protected]
OnResetState() | CLocalizeCtrl | [virtual]
point | CLocalizeCtrl | [protected]
~CLocalizeCtrl() | CLocalizeCtrl | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/xlist/xlistppg.h Source File

  • controls
  • xlist

xlistppg.h

Go to the documentation of this file.
00001 // xlistppg.h : Declaration of the CXlistPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 ////////////////////////////////////////////////////////////////////////////
00014 // CXlistPropPage : See xlistppg.cpp for implementation.
00015
00016 class CXlistPropPage : public COlePropertyPage
00017 {
00018   DECLARE_DYNCREATE(CXlistPropPage)
00019   DECLARE_OLECREATE_EX(CXlistPropPage)
00020
00021 // Constructor
00022 public:
00023   CXlistPropPage();
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CXlistPropPage)
00027   enum { IDD = IDD_PROPPAGE_XLIST };
00028   BOOL    m_InvertFlag;
00029   //}}AFX_DATA
00030
00031 // Implementation
00032 protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034
00035 // Message maps
00036 protected:
00037   //{{AFX_MSG(CXlistPropPage)
00038     //}}AFX_MSG
00039   DECLARE_MESSAGE_MAP()
00040
00041 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/SetPaneSize/SetPaneSizeDoc.h Source File

  • vc2008fp
  • SetPaneSize

SetPaneSizeDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CSetPaneSizeDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CSetPaneSizeDoc();
00017   DECLARE_DYNCREATE(CSetPaneSizeDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CSetPaneSizeDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CContainerView Member List

This is the complete list of members for CContainerView, including all inherited members.
CContainerView() | CContainerView | [protected]
GetDocument() | CContainerView | [inline]
HitTestItems(CPoint point) | CContainerView |
IsSelected(const CObject *pDocItem) const | CContainerView | [protected, virtual]
m_pSelection | CContainerView |
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CContainerView | [protected, virtual]
OnCancelEditCntr() | CContainerView | [protected]
OnDraw(CDC *pDC) | CContainerView | [virtual]
OnEditClear() | CContainerView | [protected]
OnEditCopy() | CContainerView | [protected]
OnEditPaste() | CContainerView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CContainerView | [protected, virtual]
OnInitialUpdate() | CContainerView | [protected, virtual]
OnInsertObject() | CContainerView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CContainerView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CContainerView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CContainerView | [protected, virtual]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CContainerView | [protected]
OnSetFocus(CWnd *pOldWnd) | CContainerView | [protected]
OnSize(UINT nType, int cx, int cy) | CContainerView | [protected]
OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint) | CContainerView | [protected, virtual]
OnUpdateEditClear(CCmdUI *pCmdUI) | CContainerView | [protected]
OnUpdateEditCopy(CCmdUI *pCmdUI) | CContainerView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CContainerView | [virtual]
SetSelection(CContainerItem *pItem) | CContainerView |
SetupTracker(CContainerItem *pItem, CRectTracker *pTracker) | CContainerView |
~CContainerView() | CContainerView | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/mswd6_32.h Source File

  • vc2008fp
  • WordPad

mswd6_32.h

Go to the documentation of this file.
00001 //
00002 // This is a part of the Microsoft Foundation Classes C++ library.
00003 // Copyright (C) 1992-1998 Microsoft Corporation
00004 // All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef MSWD6_32_H
00013 #define MSWD6_32_H
00014
00015 typedef unsigned long (pascal *PFN_RTF_CALLBACK)(int, int);
00016
00017 extern "C" int pascal InitConverter32(HANDLE, char *);
00018 extern "C" HANDLE pascal RegisterApp32(unsigned long, void *);
00019 extern "C" int pascal IsFormatCorrect32(HANDLE, HANDLE);
00020 extern "C" int pascal ForeignToRtf32(HANDLE, void *, HANDLE, HANDLE, HANDLE, PFN_RTF_CALLBACK);
00021 extern "C" int pascal RtfToForeign32(HANDLE, LPSTORAGE, HANDLE, HANDLE, PFN_RTF_CALLBACK);
00022
00023 #endif
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomPagesDoc Member List

This is the complete list of members for CCustomPagesDoc, including all inherited members.
CCustomPagesDoc() | CCustomPagesDoc | [protected]
OnNewDocument() | CCustomPagesDoc | [virtual]
Serialize(CArchive &ar) | CCustomPagesDoc | [virtual]
~CCustomPagesDoc() | CCustomPagesDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MenuSubSet/ConfigDlg.cpp Source File

  • vc2008fp
  • MenuSubSet

ConfigDlg.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MenuSubSet.h"
00013 #include "ConfigDlg.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CConfigDlg dialog
00023
00024
00025 CConfigDlg::CConfigDlg(BOOL bIsStartup)
00026   : CDialog(CConfigDlg::IDD, NULL)
00027 {
00028   m_nConfig = 0;
00029
00030   m_bIsStartup = bIsStartup;
00031 }
00032
00033
00034 void CConfigDlg::DoDataExchange(CDataExchange* pDX)
00035 {
00036   CDialog::DoDataExchange(pDX);
00037   DDX_Control(pDX, IDCANCEL, m_btnCancel);
00038   DDX_Radio(pDX, IDC_CONF1, m_nConfig);
00039 }
00040
00041
00042 BEGIN_MESSAGE_MAP(CConfigDlg, CDialog)
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CConfigDlg message handlers
00047
00048 BOOL CConfigDlg::OnInitDialog()
00049 {
00050   CDialog::OnInitDialog();
00051
00052   if (m_bIsStartup)
00053   {
00054     m_btnCancel.EnableWindow (FALSE);
00055     m_btnCancel.ShowWindow (SW_HIDE);
00056   }
00057
00058   return TRUE;  // return TRUE unless you set the focus to a control
00059                 // EXCEPTION: OCX Property Pages should return FALSE
00060 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/calcdriv/calctype.h Source File

  • ole
  • calcdriv

calctype.h

Go to the documentation of this file.
00001 // Machine generated IDispatch driver class(es) created with ClassWizard.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CRemoteCalcDlg wrapper class
00014
00015 class CRemoteCalcDlg : public COleDispatchDriver
00016 {
00017 // Attributes
00018 public:
00019   long GetAccum();
00020   void SetAccum(long);
00021   long GetOperand();
00022   void SetOperand(long);
00023   short GetOperation();
00024   void SetOperation(short);
00025   BOOL GetVisible();
00026   void SetVisible(BOOL);
00027
00028 // Operations
00029 public:
00030   BOOL Evaluate();
00031   void Clear();
00032   void Display();
00033   void Close();
00034   BOOL Button(LPCTSTR szButton);
00035 };
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DesktopAlertDemo/resource.h Source File

  • vc2008fp
  • DesktopAlertDemo

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by DesktopAlertDemo.rc
00004 //
00005 #define IDD_ALERT_DIALOG                102
00006 #define IDR_MAINFRAME                   128
00007 #define IDD_DIALOG1                     129
00008 #define IDI_MAIL                        130
00009 #define IDD_DIALOG2                     130
00010 #define IDB_FLAG                        132
00011 #define IDB_DELETE                      133
00012 #define IDB_LOGO                        134
00013 #define IDR_POPUP                       136
00014 #define IDB_ICONS                       145
00015 #define IDB_ICONS_SMALL                 146
00016 #define IDR_TOOLBAR1                    147
00017 #define IDB_MENUIMAGES                  149
00018 #define IDC_SHOW                        1000
00019 #define IDC_BUTTON1                     1003
00020 #define IDC_VISUAL_MNGR                 1004
00021 #define IDC_ANIMATION                   1005
00022 #define IDC_ANIM_SPEED                  1006
00023 #define IDC_ANIM_SPEED_VAL              1007
00024 #define IDC_TRANSP                      1008
00025 #define IDC_FLAG                        1008
00026 #define IDC_TRANSP_VAL                  1009
00027 #define IDC_DELETE                      1009
00028 #define IDC_FROM                        1010
00029 #define IDC_AUTOCLOSE_TIME              1010
00030 #define IDC_SMALL_CAPTION               1011
00031 #define IDC_OPTIONS                     1012
00032 #define IDC_AUTOCLOSE_VAL               1012
00033 #define IDC_POPUP_SOURCE                1013
00034 #define IDC_POPUP_SOURCE2               1014
00035 #define IDC_ICONS                       1016
00036 #define IDC_ICON_LABEL                  1017
00037 #define IDC_TEXT_LABEL                  1018
00038 #define IDC_TEXT                        1019
00039 #define IDC_URL_LABEL                   1020
00040 #define IDC_LINK                        1021
00041 #define IDC_AUTO_CLOSE                  1022
00042 #define ID_POPUP_OPENITEM               32771
00043 #define ID_POPUP_FLAGITEM               32772
00044 #define ID_POPUP_DELETEITEM             32773
00045 #define ID_POPUP_MARKASREAD             32774
00046 #define ID_POPUP_DISABLENEWDESKTOPALERT 32775
00047 #define ID_POPUP_DESKTOPALERTSETTINGS   32776
00048
00049 // Next default values for new objects
00050 //
00051 #ifdef APSTUDIO_INVOKED
00052 #ifndef APSTUDIO_READONLY_SYMBOLS
00053 #define _APS_NEXT_RESOURCE_VALUE        150
00054 #define _APS_NEXT_COMMAND_VALUE         32779
00055 #define _APS_NEXT_CONTROL_VALUE         1023
00056 #define _APS_NEXT_SYMED_VALUE           101
00057 #endif
00058 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemoView.cpp Source File

  • vc2008fp
  • OutlookDemo

OutlookDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012
00013 #include "OutlookDemoDoc.h"
00014 #include "OutlookDemoView.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // COutlookDemoView
00024
00025 IMPLEMENT_DYNCREATE(COutlookDemoView, CListView)
00026
00027 BEGIN_MESSAGE_MAP(COutlookDemoView, CListView)
00028   ON_COMMAND(ID_VIEW_PREVIEW_PANE, OnViewPreviewPane)
00029   ON_UPDATE_COMMAND_UI(ID_VIEW_PREVIEW_PANE, OnUpdateViewPreviewPane)
00030   ON_WM_CREATE()
00031   ON_WM_CONTEXTMENU()
00032   // Standard printing commands
00033   ON_COMMAND(ID_FILE_PRINT, CListView::OnFilePrint)
00034   ON_COMMAND(ID_FILE_PRINT_DIRECT, CListView::OnFilePrint)
00035   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00036 END_MESSAGE_MAP()
00037
00038 /////////////////////////////////////////////////////////////////////////////
00039 // COutlookDemoView construction/destruction
00040
00041 COutlookDemoView::COutlookDemoView()
00042 {
00043   // TODO: add construction code here
00044 }
00045
00046 COutlookDemoView::~COutlookDemoView()
00047 {
00048 }
00049
00050 BOOL COutlookDemoView::PreCreateWindow(CREATESTRUCT& cs)
00051 {
00052   cs.style |= LVS_REPORT;
00053   return CListView::PreCreateWindow(cs);
00054 }
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // COutlookDemoView drawing
00058
00059 void COutlookDemoView::OnDraw(CDC* /*pDC*/)
00060 {
00061 }
00062
00063 void COutlookDemoView::OnInitialUpdate()
00064 {
00065   CListView::OnInitialUpdate();
00066
00067   CListCtrl& wndList = GetListCtrl();
00068   wndList.DeleteAllItems();
00069
00070   wndList.InsertItem(0, _T("Microsoft"), 1);
00071   wndList.SetItemText(0, 1, _T("Welcome to MFC!"));
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // COutlookDemoView printing
00076
00077 void COutlookDemoView::OnFilePrintPreview()
00078 {
00079   AFXPrintPreview(this);
00080 }
00081
00082 BOOL COutlookDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00083 {
00084   // default preparation
00085   return DoPreparePrinting(pInfo);
00086 }
00087
00088 void COutlookDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00089 {
00090   // TODO: add extra initialization before printing
00091 }
00092
00093 void COutlookDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00094 {
00095   // TODO: add cleanup after printing
00096 }
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // COutlookDemoView diagnostics
00100
00101 #ifdef _DEBUG
00102 void COutlookDemoView::AssertValid() const
00103 {
00104   CListView::AssertValid();
00105 }
00106
00107 void COutlookDemoView::Dump(CDumpContext& dc) const
00108 {
00109   CListView::Dump(dc);
00110 }
00111
00112 COutlookDemoDoc* COutlookDemoView::GetDocument() // non-debug version is inline
00113 {
00114   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COutlookDemoDoc)));
00115   return(COutlookDemoDoc*)m_pDocument;
00116 }
00117 #endif //_DEBUG
00118
00119 /////////////////////////////////////////////////////////////////////////////
00120 // COutlookDemoView message handlers
00121
00122 void COutlookDemoView::OnContextMenu(CWnd*, CPoint point)
00123 {
00124   theApp.ShowPopupMenu(IDR_CONTEXT_MENU, point, this);
00125 }
00126
00127 void COutlookDemoView::OnViewPreviewPane()
00128 {
00129   // TODO: Add your command handler code here
00130
00131 }
00132
00133 void COutlookDemoView::OnUpdateViewPreviewPane(CCmdUI* /*pCmdUI*/)
00134 {
00135   // TODO: Add your command update UI handler code here
00136
00137 }
00138
00139 int COutlookDemoView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00140 {
00141   if (CListView::OnCreate(lpCreateStruct) == -1)
00142     return -1;
00143
00144   const int nImageWidth = 12;
00145
00146   m_ImagesHeader.Create(IDB_HEADER_IMAGES, nImageWidth, 0, RGB(255, 0, 255));
00147
00148   CBitmap bmp;
00149   if (bmp.LoadBitmap(IDB_LIST_IMAGES))
00150   {
00151     m_ImagesList.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 0);
00152     m_ImagesList.Add(&bmp, RGB(255, 0, 255));
00153   }
00154
00155   CListCtrl& wndList = GetListCtrl();
00156   wndList.SetExtendedStyle(LVS_EX_FULLROWSELECT);
00157
00158   wndList.SetImageList(&m_ImagesList, LVSIL_SMALL);
00159
00160   wndList.InsertColumn(0, _T("From"), LVCFMT_LEFT, 100);
00161   wndList.InsertColumn(1, _T("Subject"), LVCFMT_LEFT, 200);
00162
00163   CHeaderCtrl* pHeaderCtrl = (CHeaderCtrl*) wndList.GetDlgItem(0);
00164   ASSERT_VALID(pHeaderCtrl);
00165
00166   pHeaderCtrl->SetImageList(&m_ImagesHeader);
00167
00168   LVCOLUMN lvColumn;
00169   memset(&lvColumn, 0, sizeof(LVCOLUMN));
00170   lvColumn.mask = LVCF_IMAGE | LVCF_WIDTH;
00171   lvColumn.fmt = LVCFMT_COL_HAS_IMAGES;
00172   lvColumn.cx = nImageWidth * 2 + 4;
00173
00174   lvColumn.iImage = 0;
00175   wndList.InsertColumn(2, &lvColumn);
00176
00177   lvColumn.iImage = 1;
00178   wndList.InsertColumn(3, &lvColumn);
00179
00180   lvColumn.iImage = 2;
00181   wndList.InsertColumn(4, &lvColumn);
00182
00183   static int nColumsOrder [] = { 2, 3, 4, 0, 1 };
00184   wndList.SetColumnOrderArray(sizeof(nColumsOrder) / sizeof(int), nColumsOrder);
00185
00186   return 0;
00187 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ddxm.cpp Source File

  • vc2008fp
  • WordPad

ddxm.cpp

Go to the documentation of this file.
00001 //
00002 // ddxm.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "ddxm.h"
00016 #include "wordpad.h"
00017 #include "resource.h"
00018
00019 // this routine prints a floatingpoint number with 2 digits after the decimal
00020 void PASCAL DDX_Twips(CDataExchange* pDX, int nIDC, int& value)
00021 {
00022   HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
00023   TCHAR szT[64];
00024
00025   if (pDX->m_bSaveAndValidate)
00026   {
00027     ::GetWindowText(hWndCtrl, szT, sizeof(szT)/sizeof(TCHAR));
00028     if (szT[0] != NULL) // not empty
00029     {
00030       if (!theApp.ParseMeasurement(szT, value))
00031       {
00032         AfxMessageBox(IDS_INVALID_MEASUREMENT,MB_OK|MB_ICONINFORMATION);
00033         pDX->Fail();            // throws exception
00034       }
00035       theApp.PrintTwips(szT, value, 2);
00036       theApp.ParseMeasurement(szT, value);
00037     }
00038     else // empty
00039       value = INT_MAX;
00040   }
00041   else
00042   {
00043     // convert from twips to default units
00044     if (value != INT_MAX)
00045     {
00046       theApp.PrintTwips(szT, value, 2);
00047       SetWindowText(hWndCtrl, szT);
00048     }
00049   }
00050 }
00051
00052 void PASCAL DDV_MinMaxTwips(CDataExchange* pDX, int value, int minVal, int maxVal)
00053 {
00054   ASSERT(minVal <= maxVal);
00055   if (value < minVal || value > maxVal)
00056   {
00057     // "The measurement must be between %1 and %2."
00058     if (!pDX->m_bSaveAndValidate)
00059     {
00060       TRACE0("Warning: initial dialog data is out of range.\n");
00061       return;     // don't stop now
00062     }
00063     TCHAR szMin[32];
00064     TCHAR szMax[32];
00065     theApp.PrintTwips(szMin, minVal, 2);
00066     theApp.PrintTwips(szMax, maxVal, 2);
00067     CString prompt;
00068     AfxFormatString2(prompt, IDS_MEASUREMENT_RANGE, szMin, szMax);
00069     AfxMessageBox(prompt, MB_ICONEXCLAMATION, AFX_IDS_APP_TITLE);
00070     prompt.Empty(); // exception prep
00071     pDX->Fail();
00072   }
00073 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CView4 Member List

This is the complete list of members for CView4, including all inherited members.
CView4() | CView4 | [protected]
GetParentTab() const | CView4 | [inline]
GetScrollBarCtrl(int nBar) const | CView4 | [virtual]
OnDraw(CDC *pDC) | CView4 | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CView4 | [protected]
OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) | CView4 | [protected]
OnInitialUpdate() | CView4 | [protected, virtual]
OnWindowPosChanging(WINDOWPOS FAR *lpwndpos) | CView4 | [protected]
~CView4() | CView4 | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemo.h Source File

  • vc2008fp
  • ToolTipDemo

TooltipDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTooltipDemoApp:
00021 // See TooltipDemo.cpp for the implementation of this class
00022 //
00023
00024 class CTooltipDemoApp : public CWinAppEx
00025 {
00026 public:
00027   CTooltipDemoApp();
00028
00029   BOOL m_bTTInPopupMenus;
00030
00031   virtual void PreLoadState ();
00032
00033 // Overrides
00034   public:
00035   virtual BOOL InitInstance();
00036   virtual int ExitInstance();
00037
00038 // Implementation
00039   afx_msg void OnAppAbout();
00040
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 extern CTooltipDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/FileDlgWatcher.cpp Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

FileDlgWatcher.cpp

Go to the documentation of this file.
00001 // FileDlgWatcher.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 #include "stdafx.h"
00005 #include "FileDlgWatcher.h"
00006 #include "FileDlgWatcherDlg.h"
00007
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #endif
00011
00012
00013 // CFileDlgWatcherApp
00014
00015 BEGIN_MESSAGE_MAP(CFileDlgWatcherApp, CWinApp)
00016   ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
00017 END_MESSAGE_MAP()
00018
00019
00020 // CFileDlgWatcherApp construction
00021
00022 CFileDlgWatcherApp::CFileDlgWatcherApp()
00023 {
00024   // TODO: add construction code here,
00025   // Place all significant initialization in InitInstance
00026 }
00027
00028
00029 // The one and only CFileDlgWatcherApp object
00030
00031 CFileDlgWatcherApp theApp;
00032
00033
00034 // CFileDlgWatcherApp initialization
00035
00036 BOOL CFileDlgWatcherApp::InitInstance()
00037 {
00038   // InitCommonControlsEx() is required on Windows XP if an application
00039   // manifest specifies use of ComCtl32.dll version 6 or later to enable
00040   // visual styles.  Otherwise, any window creation will fail.
00041   INITCOMMONCONTROLSEX InitCtrls;
00042   InitCtrls.dwSize = sizeof(InitCtrls);
00043   // Set this to include all the common control classes you want to use
00044   // in your application.
00045   InitCtrls.dwICC = ICC_WIN95_CLASSES;
00046   InitCommonControlsEx(&InitCtrls);
00047
00048   CWinApp::InitInstance();
00049
00050   // Standard initialization
00051   // If you are not using these features and wish to reduce the size
00052   // of your final executable, you should remove from the following
00053   // the specific initialization routines you do not need
00054   // Change the registry key under which our settings are stored
00055   // TODO: You should modify this string to be something appropriate
00056   // such as the name of your company or organization
00057   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00058
00059   CFileDlgWatcherDlg dlg;
00060   m_pMainWnd = &dlg;
00061   INT_PTR nResponse = dlg.DoModal();
00062   if (nResponse == IDOK)
00063   {
00064     // TODO: Place code here to handle when the dialog is
00065     //  dismissed with OK
00066   }
00067   else if (nResponse == IDCANCEL)
00068   {
00069     // TODO: Place code here to handle when the dialog is
00070     //  dismissed with Cancel
00071   }
00072
00073   // Since the dialog has been closed, return FALSE so that we exit the
00074   //  application, rather than start the application's message pump.
00075   return FALSE;
00076 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COlePropertiesEx Member List

This is the complete list of members for COlePropertiesEx, including all inherited members.
COlePropertiesEx(COleClientItem *pItem, UINT nScaleMin=10, UINT nScaleMax=500, CWnd *pParentWnd=NULL) | COlePropertiesEx | [inline]
OnApplyScale(COleClientItem *pItem, int nCurrentScale, BOOL bRelativeToOrig) | COlePropertiesEx | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPaletteBar Member List

This is the complete list of members for CPaletteBar, including all inherited members.
BeginAdjust(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
BeginDrag(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
CPaletteBar() | CPaletteBar |
CPaletteBar() | CPaletteBar |
CPaletteBar() | CPaletteBar |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CPaletteBar | [virtual]
CustomizeHelp(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
EndAdjust(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
EndDrag(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
GetButtonInfo(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
GetColumns() | CPaletteBar | [inline]
GetColumns() | CPaletteBar | [inline]
m_nButtonCount | CPaletteBar | [private]
m_nColumns | CPaletteBar | [protected]
m_pTBButtons | CPaletteBar | [private]
NeedText(UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult) | CPaletteBar | [protected]
OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [virtual]
OnNeedTextA(UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult) | CPaletteBar | [protected]
OnNeedTextW(UINT nID, NMHDR *pNotifyStruct, LRESULT *lResult) | CPaletteBar | [protected]
QueryDelete(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
QueryInsert(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
Reset(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
SetColumns(UINT nColumns) | CPaletteBar |
SetColumns(UINT nColumns) | CPaletteBar |
ToolBarChange(WPARAM wParam, LPARAM lParam, LRESULT *pLResult) | CPaletteBar | [protected]
~CPaletteBar() | CPaletteBar | [virtual]
~CPaletteBar() | CPaletteBar | [virtual]
~CPaletteBar() | CPaletteBar | [virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/stdafx.cpp Source File

  • general
  • docktool

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  docktool.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/StdAfx.cpp Source File

  • general
  • CmnCtrl1

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // This is a part of the Microsoft Foundation Classes C++ library.
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 //  CmnCtrl1.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/collevw.h Source File

  • advanced
  • collect

collevw.h

Go to the documentation of this file.
00001 // collevw.h : interface of the CCollectView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CCollectView : public CView
00013 {
00014 protected: // create from serialization only
00015   CCollectView();
00016   DECLARE_DYNCREATE(CCollectView)
00017
00018 // Attributes
00019 public:
00020   CCollectDoc* GetDocument();
00021
00022 protected:
00023   CStringList m_stringList;
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   // ClassWizard generate virtual function overrides
00030   //{{AFX_VIRTUAL(CCollectView)
00031   public:
00032   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00033   protected:
00034   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00035   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00036   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00037   //}}AFX_VIRTUAL
00038
00039 // Implementation
00040 public:
00041   virtual ~CCollectView();
00042 #ifdef _DEBUG
00043   virtual void AssertValid() const;
00044   virtual void Dump(CDumpContext& dc) const;
00045 #endif
00046
00047 protected:
00048
00049 // Generated message map functions
00050 protected:
00051   //{{AFX_MSG(CCollectView)
00052   //}}AFX_MSG
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
00056 #ifndef _DEBUG  // debug version in collevw.cpp
00057 inline CCollectDoc* CCollectView::GetDocument()
00058    { return (CCollectDoc*)m_pDocument; }
00059 #endif
00060
00061 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circ.h Source File

  • controls
  • circ

circ.h

Go to the documentation of this file.
00001 // circ.h : main header file for CIRC.DLL
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined( __AFXCTL_H__ )
00013   #error include 'afxctl.h' before including this file
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CCircApp : See circ.cpp for implementation.
00020
00021 class CCircApp : public COleControlModule
00022 {
00023 public:
00024   BOOL InitInstance();
00025   int ExitInstance();
00026 };
00027
00028 extern const GUID CDECL _tlid;
00029 extern const WORD _wVerMajor;
00030 extern const WORD _wVerMinor;
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/pageset.h Source File

  • ole
  • wordpad

pageset.h

Go to the documentation of this file.
00001 // pageset.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPageSetupDlg dialog
00014
00015 class CPageSetupDlg : public CCSDialog
00016 {
00017 // Construction
00018 public:
00019   CPageSetupDlg(CWnd* pParent = NULL);    // standard constructor
00020
00021 // Dialog Data
00022   //{{AFX_DATA(CPageSetupDlg)
00023   enum { IDD = IDD_PAGE_SETUP_DIALOG };
00024   int     m_nTopMargin;
00025   int     m_nRightMargin;
00026   int     m_nLeftMargin;
00027   int     m_nBottomMargin;
00028   //}}AFX_DATA
00029
00030 // Implementation
00031   static const DWORD m_nHelpIDs[];
00032   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00033 protected:
00034   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00035
00036   // Generated message map functions
00037   //{{AFX_MSG(CPageSetupDlg)
00038   //}}AFX_MSG
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/resource.h Source File

  • vc2008fp
  • TasksPane

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by TasksPane.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDD_TASKSPANE_FORM              101
00007 #define IDS_MAIN_TOOLBAR                101
00008 #define IDS_WRONG_DISPLAY_SETTINGS      102
00009 #define IDR_MAINFRAME                   128
00010 #define IDR_TASKSPTYPE                  129
00011 #define IDR_CONTEXT_MENU                130
00012 #define IDR_POPUP_TOOLBAR               131
00013 #define IDB_TOOLBAR256                  151
00014 #define IDB_TASKS                       153
00015 #define IDB_TASKPANE_TOOLBAR            154
00016 #define IDB_TASKS_HC                    155
00017 #define IDI_NOTE                        157
00018 #define IDD_ABOUTBOX                    999
00019 #define IDC_COMPANY_URL                 1041
00020 #define IDC_CHECK_WRAPTASKS             1046
00021 #define IDC_CHECK_WRAPLABELS            1047
00022 #define IDC_CHECK_NAVTOOLBAR            1048
00023 #define IDC_CHECK_HISTBUTTONS           1049
00024 #define IDC_CHECK_HICOLORIMAGES         1050
00025 #define IDC_RADIO_WIN                   1051
00026 #define IDC_RADIO_OFFICEXP              1052
00027 #define IDC_RADIO_OFFICE2003            1053
00028 #define IDC_RADIO_WINXP                 1054
00029 #define IDC_CHECK_SCROLLBUTTONS         1055
00030 #define IDC_CHECK_ANIMATION             1056
00031 #define IDC_CHECK_MARGINS               1057
00032 #define IDC_CHECK_COLLAPSEGROUPS        1058
00033 #define IDC_EDIT_VMARGIN                1059
00034 #define IDC_EDIT_HMARGIN                1060
00035 #define IDC_EDIT_GROUPSPACING           1061
00036 #define IDC_EDIT_TASKSPACING            1062
00037 #define IDC_EDIT_CAPTIONHEIGHT          1063
00038 #define IDC_EDIT_TASKOFFSET             1064
00039 #define IDC_EDIT_ICONOFFSET             1065
00040 #define IDC_RADIO_VS2005                1066
00041 #define IDC_RADIO_OFFICE2007            1067
00042 #define IDC_SPIN3                       1068
00043 #define IDC_SPIN4                       1069
00044 #define IDC_SPIN5                       1070
00045 #define IDC_SPIN6                       1071
00046 #define IDC_SPIN7                       1072
00047 #define IDC_SPIN8                       1073
00048 #define IDC_SPIN9                       1074
00049 #define IDC_COLOR_TASKTEXT              1075
00050 #define IDC_COLOR_TASKTEXTHOT           1076
00051 #define IDC_COLOR_GROUPTEXT             1077
00052 #define IDC_COLOR_GROUPTEXTHOT          1078
00053 #define IDC_STATIC_MARGINS1             1079
00054 #define IDC_STATIC_MARGINS2             1080
00055 #define IDC_STATIC_MARGINS3             1081
00056 #define IDC_STATIC_MARGINS4             1082
00057 #define IDC_STATIC_MARGINS5             1083
00058 #define IDC_STATIC_MARGINS6             1084
00059 #define IDC_STATIC_MARGINS7             1085
00060 #define IDC_CHECK_CAPTIONICON           1086
00061 #define ID_VIEW_CUSTOMIZE               32770
00062 #define ID_VIEW_TOOLBARS                32771
00063 #define ID_VIEW_TASKPANE                32827
00064 #define ID_TASK1                        32828
00065 #define ID_TASK2                        32829
00066 #define ID_TASK3                        32830
00067 #define ID_TASK4                        32831
00068 #define ID_TASK5                        32832
00069 #define ID_TASK6                        32832
00070 #define ID_TASK7                        32832
00071 #define ID_TASK8                        32832
00072 #define ID_TASK9                        32832
00073 #define ID_VIEW_APPLOOK_2000            32833
00074 #define ID_VIEW_APPLOOK_XP              32834
00075 #define ID_VIEW_APPLOOK_2003            32835
00076 #define ID_VIEW_APPLOOK_WIN_XP          32836
00077 #define ID_VIEW_APPLOOK_VS2005          32837
00078 #define ID_VIEW_APPLOOK_2007            32838
00079
00080 // Next default values for new objects
00081 //
00082 #ifdef APSTUDIO_INVOKED
00083 #ifndef APSTUDIO_READONLY_SYMBOLS
00084 #define _APS_3D_CONTROLS                     1
00085 #define _APS_NEXT_RESOURCE_VALUE        158
00086 #define _APS_NEXT_COMMAND_VALUE         32839
00087 #define _APS_NEXT_CONTROL_VALUE         1087
00088 #define _APS_NEXT_SYMED_VALUE           108
00089 #endif
00090 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/SchedulerDlg.h Source File

  • internet
  • Scheduler

SchedulerDlg.h

Go to the documentation of this file.
00001 // SchedulerDlg.h : header file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #ifndef __SCHEDULERDLG_H_
00012 #define __SCHEDULERDLG_H_
00013
00014 #include "EnterInfoDlg.h"
00015 #include "MyScheduler.h"
00016
00017 #define DISPID_MONTH 0x10
00018 #define DISPID_DAY 0x11
00019 #define DISPID_YEAR 0x0f
00020
00021 #pragma once
00022
00023 #pragma message("*** NOTE: This sample requires the Microsoft Access Calendar control (MSCAL.OCX). ***")
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CSchedulerDlg dialog
00027 class CSchedulerDlg : public CDHtmlDialog
00028 {
00029 // Construction
00030 public:
00031   CSchedulerDlg(CWnd* pParent = NULL);  // standard constructor
00032
00033 // Dialog Data
00034   enum { IDD = IDD_SCHEDULER_DIALOG, IDH = IDR_HTML_SCHEDULER_DIALOG };
00035
00036   CArray <CMyScheduler> m_scheduler_array;
00037   COleVariant m_month;
00038   COleVariant m_day;
00039   COleVariant m_year;
00040   CString m_szDivClass;
00041   TCHAR m_scheduler_filepath[MAX_PATH];
00042   int m_iLastDivID;
00043   short m_currMonth, m_currDay, m_currYear;
00044
00045 // Member functions
00046   void SetDefaultProperties();
00047   void DateSchedules();
00048   void RemoveInfoFromTable();
00049   void OnUpdateScheduleDisplay(const CEntryInfoDlg& InfoDlg);
00050   void OnDeleteScheduleDisplay(CMyScheduler& scheduler);
00051   void OnModifyScheduleDisplay(CMyScheduler& scheduler,const CEntryInfoDlg& InfoDlg);
00052   void OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl);
00053   BOOL CheckDates();
00054   CString AdjustHour(int iHour);
00055   CString SetTimeFormat(int iHour, int iMinutes);
00056   CString GetStartTimeFormatted(CString szStartTime);
00057
00058 // Events
00059   HRESULT OnMouseOverTime(IHTMLElement *pElement);
00060   HRESULT OnMouseOutTime(IHTMLElement *pElement);
00061   HRESULT OnMouseOverButtons(IHTMLElement *pElement);
00062   HRESULT OnMouseOutButtons(IHTMLElement *pElement);
00063   HRESULT OnMouseOverTimeDesc(IHTMLElement *pElement);
00064   HRESULT OnMouseOverNewElements(IHTMLElement *pElement);
00065   HRESULT OnMouseOutNewElements(IHTMLElement *pElement);
00066   HRESULT OnClickNewElements(IHTMLElement *pElement);
00067   HRESULT OnClickTime(IHTMLElement *pElement);
00068   HRESULT OnClickTimeDesc(IHTMLElement *pElement);
00069   HRESULT OnButtonClearAll(IHTMLElement *pElement);
00070   void __stdcall OnClickCalendar(); //This implementation has been modified for a later build
00071
00072 protected:
00073   virtual void DoDataExchange(CDataExchange* pDX);  // DDX/DDV support
00074
00075 // Implementation
00076 protected:
00077   HICON m_hIcon;
00078   HACCEL m_hAccel;
00079
00080   // Generated message map functions
00081   virtual BOOL OnInitDialog();
00082   afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00083   afx_msg void OnPaint();
00084   afx_msg HCURSOR OnQueryDragIcon();
00085
00086   DECLARE_MESSAGE_MAP()
00087   DECLARE_DHTML_EVENT_MAP()
00088 public:
00089 // Commands
00090   void OpenScheduler(void);
00091   void ExitScheduler(void);
00092   void OnHelpAbout(void);
00093 };
00094
00095 #endif
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/bounce.h Source File

  • general
  • mdi

bounce.h

Go to the documentation of this file.
00001 // bounce.h : Declares the class interfaces for the Bounce child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #ifndef __BOUNCE_H__
00014 #define __BOUNCE_H__
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017
00018 class CBounceWnd : public CMDIChildWnd
00019 {
00020 private:
00021   using CMDIChildWnd::Create;
00022
00023 public:
00024   CBounceWnd();
00025   BOOL Create(LPCTSTR szTitle, LONG style = 0,
00026         const RECT& rect = rectDefault,
00027         CMDIFrameWnd* pParent = NULL);
00028
00029 // Implementation
00030 protected:
00031   static CMenu NEAR menu;     // menu for all BOUNCE windows
00032
00033   // bounce window client area and bouncing ball color/size parameters
00034   UINT m_nIDColor;
00035   COLORREF m_clrBall;
00036
00037   BOOL m_bFastSpeed;          // current speed
00038
00039   CPoint m_ptPixel;           // pixel size
00040   CSize m_sizeRadius;         // radius of ball
00041   CSize m_sizeMove;           // move speed
00042   CSize m_sizeTotal;          // total size for ball bitmap
00043   CPoint m_ptCenter;          // current center for the ball
00044
00045   // for replicating bouncing ball
00046   CBitmap m_bmBall;
00047
00048   void MakeNewBall();
00049   void ChangeSpeed();
00050
00051   // message handlers
00052   //{{AFX_MSG(CBounceWnd)
00053   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00054   afx_msg void OnSize(UINT nType, int cx, int cy);
00055   afx_msg void OnTimer(UINT_PTR nIDEvent);
00056   afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
00057   afx_msg void OnColor();
00058   afx_msg void OnCustomColor();
00059   afx_msg void OnUpdateSlow(CCmdUI* pCmdUI);
00060   afx_msg void OnSlow();
00061   afx_msg void OnUpdateFast(CCmdUI* pCmdUI);
00062   afx_msg void OnFast();
00063   //}}AFX_MSG
00064
00065   DECLARE_MESSAGE_MAP()
00066 };
00067
00068 /////////////////////////////////////////////////////////////////////////////
00069
00070 #endif // __BOUNCE_H__
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/AppLookDlg.h Source File

  • vc2008fp
  • OutlookDemo

AppLookDlg.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CAppLookDlg dialog
00014
00015 class CAppLookDlg : public CDialog
00016 {
00017 // Construction
00018 public:
00019   CAppLookDlg(BOOL bStartup, CWnd* pParent = NULL);   // standard constructor
00020
00021 // Dialog Data
00022   enum { IDD = IDD_APP_LOOK };
00023   CComboBox m_wndStyle2007;
00024   CButton m_wndOutlookBar2003;
00025   CButton m_wndOK;
00026   CButton m_wndCancel;
00027   int m_nAppLook;
00028   BOOL m_bShowAtStartup;
00029   BOOL m_bOutlookBar2003;
00030   int m_nStyle2007;
00031
00032 // Overrides
00033 protected:
00034   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00035
00036 // Implementation
00037 protected:
00038   virtual BOOL OnInitDialog();
00039   virtual void OnOK();
00040   afx_msg void OnApply();
00041   afx_msg void OnAppLook();
00042
00043   DECLARE_MESSAGE_MAP()
00044
00045   const BOOL m_bStartup;
00046
00047   void SetLook();
00048 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMSMTasksPane Member List

This is the complete list of members for CMSMTasksPane, including all inherited members.
CMSMTasksPane() | CMSMTasksPane |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMSMTasksPane | [protected]
~CMSMTasksPane() | CMSMTasksPane | [virtual]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/drawcli/drawvw.cpp Source File

  • ole
  • drawcli

drawvw.cpp

Go to the documentation of this file.
00001 // drawvw.cpp : implementation of the CDrawView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include <afxpriv.h>
00015
00016 #include "drawcli.h"
00017
00018 #include "drawdoc.h"
00019 #include "drawobj.h"
00020 #include "cntritem.h"
00021 #include "drawvw.h"
00022
00023 #include "drawobj.h"
00024 #include "drawtool.h"
00025 #include "mainfrm.h"
00026
00027 #ifdef _DEBUG
00028 #undef THIS_FILE
00029 static char BASED_CODE THIS_FILE[] = __FILE__;
00030 #endif
00031
00032 // private clipboard format (list of Draw objects)
00033 CLIPFORMAT CDrawView::m_cfDraw = (CLIPFORMAT)
00034   ::RegisterClipboardFormat(_T("MFC Draw Sample"));
00035 CLIPFORMAT CDrawView::m_cfObjectDescriptor = NULL;
00036
00037 /////////////////////////////////////////////////////////////////////////////
00038 // CDrawView
00039
00040 IMPLEMENT_DYNCREATE(CDrawView, CScrollView)
00041
00042 BEGIN_MESSAGE_MAP(CDrawView, CScrollView)
00043   //{{AFX_MSG_MAP(CDrawView)
00044   ON_COMMAND(ID_OLE_INSERT_NEW, OnInsertObject)
00045   ON_COMMAND(ID_CANCEL_EDIT, OnCancelEdit)
00046   ON_WM_LBUTTONDOWN()
00047   ON_WM_LBUTTONUP()
00048   ON_WM_MOUSEMOVE()
00049   ON_WM_LBUTTONDBLCLK()
00050   ON_COMMAND(ID_DRAW_SELECT, OnDrawSelect)
00051   ON_COMMAND(ID_DRAW_ROUNDRECT, OnDrawRoundRect)
00052   ON_COMMAND(ID_DRAW_RECT, OnDrawRect)
00053   ON_COMMAND(ID_DRAW_LINE, OnDrawLine)
00054   ON_COMMAND(ID_DRAW_ELLIPSE, OnDrawEllipse)
00055   ON_UPDATE_COMMAND_UI(ID_DRAW_ELLIPSE, OnUpdateDrawEllipse)
00056   ON_UPDATE_COMMAND_UI(ID_DRAW_LINE, OnUpdateDrawLine)
00057   ON_UPDATE_COMMAND_UI(ID_DRAW_RECT, OnUpdateDrawRect)
00058   ON_UPDATE_COMMAND_UI(ID_DRAW_ROUNDRECT, OnUpdateDrawRoundRect)
00059   ON_UPDATE_COMMAND_UI(ID_DRAW_SELECT, OnUpdateDrawSelect)
00060   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVEBACK, OnUpdateSingleSelect)
00061   ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll)
00062   ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00063   ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR, OnUpdateAnySelect)
00064   ON_COMMAND(ID_DRAW_POLYGON, OnDrawPolygon)
00065   ON_UPDATE_COMMAND_UI(ID_DRAW_POLYGON, OnUpdateDrawPolygon)
00066   ON_WM_SIZE()
00067   ON_COMMAND(ID_VIEW_GRID, OnViewGrid)
00068   ON_UPDATE_COMMAND_UI(ID_VIEW_GRID, OnUpdateViewGrid)
00069   ON_WM_ERASEBKGND()
00070   ON_COMMAND(ID_OBJECT_FILLCOLOR, OnObjectFillColor)
00071   ON_COMMAND(ID_OBJECT_LINECOLOR, OnObjectLineColor)
00072   ON_COMMAND(ID_OBJECT_MOVEBACK, OnObjectMoveBack)
00073   ON_COMMAND(ID_OBJECT_MOVEFORWARD, OnObjectMoveForward)
00074   ON_COMMAND(ID_OBJECT_MOVETOBACK, OnObjectMoveToBack)
00075   ON_COMMAND(ID_OBJECT_MOVETOFRONT, OnObjectMoveToFront)
00076   ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00077   ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy)
00078   ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00079   ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditCut)
00080   ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00081   ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste)
00082   ON_WM_SETFOCUS()
00083   ON_COMMAND(ID_VIEW_SHOWOBJECTS, OnViewShowObjects)
00084   ON_UPDATE_COMMAND_UI(ID_VIEW_SHOWOBJECTS, OnUpdateViewShowObjects)
00085   ON_COMMAND(ID_EDIT_PROPERTIES, OnEditProperties)
00086   ON_UPDATE_COMMAND_UI(ID_EDIT_PROPERTIES, OnUpdateEditProperties)
00087   ON_WM_DESTROY()
00088   ON_UPDATE_COMMAND_UI(ID_EDIT_SELECT_ALL, OnUpdateEditSelectAll)
00089   ON_WM_CREATE()
00090   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVEFORWARD, OnUpdateSingleSelect)
00091   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVETOBACK, OnUpdateSingleSelect)
00092   ON_UPDATE_COMMAND_UI(ID_OBJECT_MOVETOFRONT, OnUpdateSingleSelect)
00093   ON_WM_CONTEXTMENU()
00094   //}}AFX_MSG_MAP
00095   // Standard printing commands
00096   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00097   ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
00098 END_MESSAGE_MAP()
00099
00100 /////////////////////////////////////////////////////////////////////////////
00101 // CDrawView construction/destruction
00102
00103 CDrawView::CDrawView()
00104 {
00105   m_bGrid = TRUE;
00106   m_gridColor = RGB(0, 0, 128);
00107   m_bActive = FALSE;
00108 // new
00109   if( m_cfObjectDescriptor == NULL )
00110     m_cfObjectDescriptor = (CLIPFORMAT)::RegisterClipboardFormat(_T("Object Descriptor") );
00111   m_prevDropEffect = DROPEFFECT_NONE;
00112 // end new
00113 }
00114
00115 CDrawView::~CDrawView()
00116 {
00117 }
00118
00119 BOOL CDrawView::PreCreateWindow(CREATESTRUCT& cs)
00120 {
00121   ASSERT(cs.style & WS_CHILD);
00122   if (cs.lpszClass == NULL)
00123     cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS);
00124   return TRUE;
00125 }
00126
00127 void CDrawView::OnActivateView(BOOL bActivate, CView* pActiveView,
00128   CView* pDeactiveView)
00129 {
00130   CView::OnActivateView(bActivate, pActiveView, pDeactiveView);
00131
00132   // invalidate selections when active status changes
00133   if (m_bActive != bActivate)
00134   {
00135     if (bActivate)  // if becoming active update as if active
00136       m_bActive = bActivate;
00137     if (!m_selection.IsEmpty())
00138       OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
00139     m_bActive = bActivate;
00140   }
00141 }
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CDrawView drawing
00145
00146 void CDrawView::InvalObj(CDrawObj* pObj)
00147 {
00148   CRect rect = pObj->m_position;
00149   DocToClient(rect);
00150   if (m_bActive && IsSelected(pObj))
00151   {
00152     rect.left -= 4;
00153     rect.top -= 5;
00154     rect.right += 5;
00155     rect.bottom += 4;
00156   }
00157   rect.InflateRect(1, 1); // handles CDrawOleObj objects
00158
00159   InvalidateRect(rect, FALSE);
00160 }
00161
00162 void CDrawView::OnUpdate(CView* , LPARAM lHint, CObject* pHint)
00163 {
00164   switch (lHint)
00165   {
00166   case HINT_UPDATE_WINDOW:    // redraw entire window
00167     Invalidate(FALSE);
00168     break;
00169
00170   case HINT_UPDATE_DRAWOBJ:   // a single object has changed
00171     InvalObj((CDrawObj*)pHint);
00172     break;
00173
00174   case HINT_UPDATE_SELECTION: // an entire selection has changed
00175     {
00176       CDrawObjList* pList = pHint != NULL ?
00177         (CDrawObjList*)pHint : &m_selection;
00178       POSITION pos = pList->GetHeadPosition();
00179       while (pos != NULL)
00180         InvalObj(pList->GetNext(pos));
00181     }
00182     break;
00183
00184   case HINT_DELETE_SELECTION: // an entire selection has been removed
00185     if (pHint != &m_selection)
00186     {
00187       CDrawObjList* pList = (CDrawObjList*)pHint;
00188       POSITION pos = pList->GetHeadPosition();
00189       while (pos != NULL)
00190       {
00191         CDrawObj* pObj = pList->GetNext(pos);
00192         InvalObj(pObj);
00193         Remove(pObj);   // remove it from this view's selection
00194       }
00195     }
00196     break;
00197
00198   case HINT_UPDATE_OLE_ITEMS:
00199     {
00200       CDrawDoc* pDoc = GetDocument();
00201       POSITION pos = pDoc->GetObjects()->GetHeadPosition();
00202       while (pos != NULL)
00203       {
00204         CDrawObj* pObj = pDoc->GetObjects()->GetNext(pos);
00205         if (pObj->IsKindOf(RUNTIME_CLASS(CDrawOleObj)))
00206           InvalObj(pObj);
00207       }
00208     }
00209     break;
00210
00211   default:
00212     ASSERT(FALSE);
00213     break;
00214   }
00215 }
00216
00217 void CDrawView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
00218 {
00219   CScrollView::OnPrepareDC(pDC, pInfo);
00220
00221   // mapping mode is MM_ANISOTROPIC
00222   // these extents setup a mode similar to MM_LOENGLISH
00223   // MM_LOENGLISH is in .01 physical inches
00224   // these extents provide .01 logical inches
00225
00226   pDC->SetMapMode(MM_ANISOTROPIC);
00227   pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX),
00228     pDC->GetDeviceCaps(LOGPIXELSY));
00229   pDC->SetWindowExt(100, -100);
00230
00231   // set the origin of the coordinate system to the center of the page
00232   CPoint ptOrg;
00233   ptOrg.x = GetDocument()->GetSize().cx / 2;
00234   ptOrg.y = GetDocument()->GetSize().cy / 2;
00235
00236   // ptOrg is in logical coordinates
00237   pDC->OffsetWindowOrg(-ptOrg.x,ptOrg.y);
00238 }
00239
00240 BOOL CDrawView::OnScrollBy(CSize sizeScroll, BOOL bDoScroll)
00241 {
00242   // do the scroll
00243   if (!CScrollView::OnScrollBy(sizeScroll, bDoScroll))
00244     return FALSE;
00245
00246   // update the position of any in-place active item
00247   if (bDoScroll)
00248   {
00249     UpdateActiveItem();
00250     UpdateWindow();
00251   }
00252   return TRUE;
00253 }
00254
00255 void CDrawView::OnDraw(CDC* pDC)
00256 {
00257   CDrawDoc* pDoc = GetDocument();
00258   ASSERT_VALID(pDoc);
00259
00260   CDC dc;
00261   CDC* pDrawDC = pDC;
00262   CBitmap bitmap;
00263   CBitmap* pOldBitmap = 0;
00264
00265   // only paint the rect that needs repainting
00266   CRect client;
00267   pDC->GetClipBox(client);
00268   CRect rect = client;
00269   DocToClient(rect);
00270
00271   if (!pDC->IsPrinting())
00272   {
00273     // draw to offscreen bitmap for fast looking repaints
00274     if (dc.CreateCompatibleDC(pDC))
00275     {
00276       if (bitmap.CreateCompatibleBitmap(pDC, rect.Width(), rect.Height()))
00277       {
00278         OnPrepareDC(&dc, NULL);
00279         pDrawDC = &dc;
00280
00281         // offset origin more because bitmap is just piece of the whole drawing
00282         dc.OffsetViewportOrg(-rect.left, -rect.top);
00283         pOldBitmap = dc.SelectObject(&bitmap);
00284         dc.SetBrushOrg(rect.left % 8, rect.top % 8);
00285
00286         // might as well clip to the same rectangle
00287         dc.IntersectClipRect(client);
00288       }
00289     }
00290   }
00291
00292   // paint background
00293   CBrush brush;
00294   if (!brush.CreateSolidBrush(pDoc->GetPaperColor()))
00295     return;
00296
00297   brush.UnrealizeObject();
00298   pDrawDC->FillRect(client, &brush);
00299
00300   if (!pDC->IsPrinting() && m_bGrid)
00301     DrawGrid(pDrawDC);
00302
00303   pDoc->Draw(pDrawDC, this);
00304
00305   if (pDrawDC != pDC)
00306   {
00307     pDC->SetViewportOrg(0, 0);
00308     pDC->SetWindowOrg(0,0);
00309     pDC->SetMapMode(MM_TEXT);
00310     dc.SetViewportOrg(0, 0);
00311     dc.SetWindowOrg(0,0);
00312     dc.SetMapMode(MM_TEXT);
00313     pDC->BitBlt(rect.left, rect.top, rect.Width(), rect.Height(),
00314       &dc, 0, 0, SRCCOPY);
00315     dc.SelectObject(pOldBitmap);
00316   }
00317 }
00318
00319 void CDrawView::Remove(CDrawObj* pObj)
00320 {
00321   POSITION pos = m_selection.Find(pObj);
00322   if (pos != NULL)
00323     m_selection.RemoveAt(pos);
00324 }
00325
00326 void CDrawView::PasteNative(COleDataObject& dataObject)
00327 {
00328   // get file refering to clipboard data
00329   CFile* pFile = dataObject.GetFileData(m_cfDraw);
00330   if (pFile == NULL)
00331     return;
00332
00333   // connect the file to the archive
00334   CArchive ar(pFile, CArchive::load);
00335   TRY
00336   {
00337     ar.m_pDocument = GetDocument(); // set back-pointer in archive
00338
00339     // read the selection
00340     m_selection.Serialize(ar);
00341   }
00342   CATCH_ALL(e)
00343   {
00344     ar.Close();
00345     delete pFile;
00346     THROW_LAST();
00347   }
00348   END_CATCH_ALL
00349
00350   ar.Close();
00351   delete pFile;
00352 }
00353
00354 void CDrawView::PasteEmbedded(COleDataObject& dataObject, CPoint point )
00355 {
00356   BeginWaitCursor();
00357
00358   // paste embedded
00359   CDrawOleObj* pObj = new CDrawOleObj(GetInitialPosition());
00360   ASSERT_VALID(pObj);
00361
00362 #pragma warning(suppress:6014)
00363   CDrawItem* pItem = new CDrawItem(GetDocument(), pObj);
00364   ASSERT_VALID(pItem);
00365   pObj->m_pClientItem = pItem;
00366
00367   TRY
00368   {
00369     if (!pItem->CreateFromData(&dataObject) &&
00370       !pItem->CreateStaticFromData(&dataObject))
00371     {
00372       AfxThrowMemoryException();      // any exception will do
00373     }
00374
00375     // add the object to the document
00376     GetDocument()->Add(pObj);
00377     m_selection.AddTail(pObj);
00378     ClientToDoc( point );
00379     pObj->MoveTo( CRect( point, pObj->m_extent ), this );
00380
00381     // try to get initial presentation data
00382     pItem->UpdateLink();
00383     pItem->UpdateExtent();
00384   }
00385   CATCH_ALL(e)
00386   {
00387     // clean up item
00388     pItem->Delete();
00389     pObj->m_pClientItem = NULL;
00390     GetDocument()->Remove(pObj);
00391     pObj->Remove();
00392
00393     AfxMessageBox(IDP_FAILED_TO_CREATE);
00394   }
00395   END_CATCH_ALL
00396
00397   EndWaitCursor();
00398 }
00399
00400 void CDrawView::DrawGrid(CDC* pDC)
00401 {
00402   CDrawDoc* pDoc = GetDocument();
00403
00404   COLORREF oldBkColor = pDC->SetBkColor(pDoc->GetPaperColor());
00405
00406   CRect rect;
00407   rect.left = -pDoc->GetSize().cx / 2;
00408   rect.top = -pDoc->GetSize().cy / 2;
00409   rect.right = rect.left + pDoc->GetSize().cx;
00410   rect.bottom = rect.top + pDoc->GetSize().cy;
00411
00412   // Center lines
00413   CPen penDash;
00414   penDash.CreatePen(PS_DASH, 1, m_gridColor);
00415   CPen* pOldPen = pDC->SelectObject(&penDash);
00416
00417   pDC->MoveTo(0, rect.top);
00418   pDC->LineTo(0, rect.bottom);
00419   pDC->MoveTo(rect.left, 0);
00420   pDC->LineTo(rect.right, 0);
00421
00422   // Major unit lines
00423   CPen penDot;
00424   penDot.CreatePen(PS_DOT, 1, m_gridColor);
00425   pDC->SelectObject(&penDot);
00426
00427   for (int x = rect.left / 100 * 100; x < rect.right; x += 100)
00428   {
00429     if (x != 0)
00430     {
00431       pDC->MoveTo(x, rect.top);
00432       pDC->LineTo(x, rect.bottom);
00433     }
00434   }
00435
00436   for (int y = rect.top / 100 * 100; y < rect.bottom; y += 100)
00437   {
00438     if (y != 0)
00439     {
00440       pDC->MoveTo(rect.left, y);
00441       pDC->LineTo(rect.right, y);
00442     }
00443   }
00444
00445   // Outlines
00446   CPen penSolid;
00447   penSolid.CreatePen(PS_SOLID, 1, m_gridColor);
00448   pDC->SelectObject(&penSolid);
00449   pDC->MoveTo(rect.left, rect.top);
00450   pDC->LineTo(rect.right, rect.top);
00451   pDC->LineTo(rect.right, rect.bottom);
00452   pDC->LineTo(rect.left, rect.bottom);
00453   pDC->LineTo(rect.left, rect.top);
00454
00455   pDC->SelectObject(pOldPen);
00456   pDC->SetBkColor(oldBkColor);
00457 }
00458
00459 void CDrawView::OnInitialUpdate()
00460 {
00461   CSize size = GetDocument()->GetSize();
00462   CClientDC dc(NULL);
00463   size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
00464   size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
00465   SetScrollSizes(MM_TEXT, size);
00466 }
00467
00468 void CDrawView::SetPageSize(CSize size)
00469 {
00470   CClientDC dc(NULL);
00471   size.cx = MulDiv(size.cx, dc.GetDeviceCaps(LOGPIXELSX), 100);
00472   size.cy = MulDiv(size.cy, dc.GetDeviceCaps(LOGPIXELSY), 100);
00473   SetScrollSizes(MM_TEXT, size);
00474   GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_WINDOW, NULL);
00475 }
00476
00477 /////////////////////////////////////////////////////////////////////////////
00478 // CDrawView printing
00479
00480 BOOL CDrawView::OnPreparePrinting(CPrintInfo* pInfo)
00481 {
00482   // default preparation
00483   return DoPreparePrinting(pInfo);
00484 }
00485
00486 void CDrawView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
00487 {
00488   CScrollView::OnBeginPrinting(pDC,pInfo);
00489
00490   // check page size -- user could have gone into print setup
00491   // from print dialog and changed paper or orientation
00492   GetDocument()->ComputePageSize();
00493 }
00494
00495 void CDrawView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00496 {
00497   // TODO: add cleanup after printing
00498 }
00499
00500 /////////////////////////////////////////////////////////////////////////////
00501 // OLE Client support and commands
00502
00503 BOOL CDrawView::IsSelected(const CObject* pDocItem) const
00504 {
00505   CDrawObj* pDrawObj = (CDrawObj*)pDocItem;
00506   if (pDocItem->IsKindOf(RUNTIME_CLASS(CDrawItem)))
00507     pDrawObj = ((CDrawItem*)pDocItem)->m_pDrawObj;
00508   return m_selection.Find(pDrawObj) != NULL;
00509 }
00510
00511 void CDrawView::OnInsertObject()
00512 {
00513   // Invoke the standard Insert Object dialog box to obtain information
00514   //  for new CDrawItem object.
00515   COleInsertDialog dlg;
00516   if (dlg.DoModal() != IDOK)
00517     return;
00518
00519   BeginWaitCursor();
00520
00521   // First create the C++ object
00522   CDrawOleObj* pObj = new CDrawOleObj(GetInitialPosition());
00523   ASSERT_VALID(pObj);
00524   CDrawItem* pItem = new CDrawItem(GetDocument(), pObj);
00525   ASSERT_VALID(pItem);
00526   pObj->m_pClientItem = pItem;
00527
00528   // Now create the OLE object/item
00529   TRY
00530   {
00531     if (!dlg.CreateItem(pObj->m_pClientItem))
00532       AfxThrowMemoryException();
00533
00534     // add the object to the document
00535     GetDocument()->Add(pObj);
00536
00537     // try to get initial presentation data
00538     pItem->UpdateLink();
00539     pItem->UpdateExtent();
00540
00541     // if insert new object -- initially show the object
00542     if (dlg.GetSelectionType() == COleInsertDialog::createNewItem)
00543       pItem->DoVerb(OLEIVERB_SHOW, this);
00544   }
00545   CATCH_ALL(e)
00546   {
00547     // clean up item
00548     pItem->Delete();
00549     pObj->m_pClientItem = NULL;
00550     GetDocument()->Remove(pObj);
00551     pObj->Remove();
00552
00553     AfxMessageBox(IDP_FAILED_TO_CREATE);
00554   }
00555   END_CATCH_ALL
00556
00557   EndWaitCursor();
00558 }
00559
00560 // The following command handler provides the standard keyboard
00561 //  user interface to cancel an in-place editing session.
00562 void CDrawView::OnCancelEdit()
00563 {
00564   // deactivate any in-place active item on this view!
00565   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00566   if (pActiveItem != NULL)
00567   {
00568     // if we found one, deactivate it
00569     pActiveItem->Close();
00570   }
00571   ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00572
00573   // escape also brings us back into select mode
00574   ReleaseCapture();
00575
00576   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00577   if (pTool != NULL)
00578   {
00579     pTool->OnCancel();
00580   }
00581
00582   CDrawTool::c_drawShape = selection;
00583 }
00584
00585 void CDrawView::OnSetFocus(CWnd* pOldWnd)
00586 {
00587   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00588   if (pActiveItem != NULL &&
00589     pActiveItem->GetItemState() == COleClientItem::activeUIState)
00590   {
00591     // need to set focus to this item if it is in the same view
00592     CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00593     if (pWnd != NULL)
00594     {
00595       pWnd->SetFocus();
00596       return;
00597     }
00598   }
00599
00600   CScrollView::OnSetFocus(pOldWnd);
00601 }
00602
00603 CRect CDrawView::GetInitialPosition()
00604 {
00605   CRect rect(10, 10, 10, 10);
00606   ClientToDoc(rect);
00607   return rect;
00608 }
00609
00610 void CDrawView::ClientToDoc(CPoint& point)
00611 {
00612   CClientDC dc(this);
00613   OnPrepareDC(&dc, NULL);
00614   dc.DPtoLP(&point);
00615 }
00616
00617 void CDrawView::ClientToDoc(CRect& rect)
00618 {
00619   CClientDC dc(this);
00620   OnPrepareDC(&dc, NULL);
00621   dc.DPtoLP(rect);
00622   ASSERT(rect.left <= rect.right);
00623   ASSERT(rect.bottom <= rect.top);
00624 }
00625
00626 void CDrawView::DocToClient(CPoint& point)
00627 {
00628   CClientDC dc(this);
00629   OnPrepareDC(&dc, NULL);
00630   dc.LPtoDP(&point);
00631 }
00632
00633 void CDrawView::DocToClient(CRect& rect)
00634 {
00635   CClientDC dc(this);
00636   OnPrepareDC(&dc, NULL);
00637   dc.LPtoDP(rect);
00638   rect.NormalizeRect();
00639 }
00640
00641 void CDrawView::Select(CDrawObj* pObj, BOOL bAdd)
00642 {
00643   if (!bAdd)
00644   {
00645     OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
00646     m_selection.RemoveAll();
00647   }
00648
00649   if (pObj == NULL || IsSelected(pObj))
00650     return;
00651
00652   m_selection.AddTail(pObj);
00653   InvalObj(pObj);
00654 }
00655
00656 // rect is in device coordinates
00657 void CDrawView::SelectWithinRect(CRect rect, BOOL bAdd)
00658 {
00659   if (!bAdd)
00660     Select(NULL);
00661
00662   ClientToDoc(rect);
00663
00664   CDrawObjList* pObList = GetDocument()->GetObjects();
00665   POSITION posObj = pObList->GetHeadPosition();
00666   while (posObj != NULL)
00667   {
00668     CDrawObj* pObj = pObList->GetNext(posObj);
00669     if (pObj->Intersects(rect))
00670       Select(pObj, TRUE);
00671   }
00672 }
00673
00674 void CDrawView::Deselect(CDrawObj* pObj)
00675 {
00676   POSITION pos = m_selection.Find(pObj);
00677   if (pos != NULL)
00678   {
00679     InvalObj(pObj);
00680     m_selection.RemoveAt(pos);
00681   }
00682 }
00683
00684 void CDrawView::CloneSelection()
00685 {
00686   POSITION pos = m_selection.GetHeadPosition();
00687   while (pos != NULL)
00688   {
00689     CDrawObj* pObj = m_selection.GetNext(pos);
00690     pObj->Clone(pObj->m_pDocument);
00691       // copies object and adds it to the document
00692   }
00693 }
00694
00695 void CDrawView::UpdateActiveItem()
00696 {
00697   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00698   if (pActiveItem != NULL &&
00699     pActiveItem->GetItemState() == COleClientItem::activeUIState)
00700   {
00701     // this will update the item rectangles by calling
00702     //  OnGetPosRect & OnGetClipRect.
00703     pActiveItem->SetItemRects();
00704   }
00705 }
00706
00707 /////////////////////////////////////////////////////////////////////////////
00708 // CDrawView message handlers
00709
00710 void CDrawView::OnLButtonDown(UINT nFlags, CPoint point)
00711 {
00712   if (!m_bActive)
00713     return;
00714   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00715   if (pTool != NULL)
00716   {
00717     pTool->OnLButtonDown(this, nFlags, point);
00718   }
00719 }
00720
00721 void CDrawView::OnLButtonUp(UINT nFlags, CPoint point)
00722 {
00723   if (!m_bActive)
00724     return;
00725   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00726   if (pTool != NULL)
00727     pTool->OnLButtonUp(this, nFlags, point);
00728 }
00729
00730 void CDrawView::OnMouseMove(UINT nFlags, CPoint point)
00731 {
00732   if (!m_bActive)
00733     return;
00734   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00735   if (pTool != NULL)
00736     pTool->OnMouseMove(this, nFlags, point);
00737 }
00738
00739 void CDrawView::OnLButtonDblClk(UINT nFlags, CPoint point)
00740 {
00741   if (!m_bActive)
00742     return;
00743   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00744   if (pTool != NULL)
00745     pTool->OnLButtonDblClk(this, nFlags, point);
00746 }
00747
00748 void CDrawView::OnDestroy()
00749 {
00750   CScrollView::OnDestroy();
00751
00752   // deactivate the inplace active item on this view
00753   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00754   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
00755   {
00756     pActiveItem->Deactivate();
00757     ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00758   }
00759 }
00760
00761 void CDrawView::OnDrawSelect()
00762 {
00763   CDrawTool::c_drawShape = selection;
00764 }
00765
00766 void CDrawView::OnDrawRoundRect()
00767 {
00768   CDrawTool::c_drawShape = roundRect;
00769 }
00770
00771 void CDrawView::OnDrawRect()
00772 {
00773   CDrawTool::c_drawShape = rect;
00774 }
00775
00776 void CDrawView::OnDrawLine()
00777 {
00778   CDrawTool::c_drawShape = line;
00779 }
00780
00781 void CDrawView::OnDrawEllipse()
00782 {
00783   CDrawTool::c_drawShape = ellipse;
00784 }
00785
00786 void CDrawView::OnDrawPolygon()
00787 {
00788   CDrawTool::c_drawShape = poly;
00789 }
00790
00791 void CDrawView::OnUpdateDrawEllipse(CCmdUI* pCmdUI)
00792 {
00793   pCmdUI->SetRadio(CDrawTool::c_drawShape == ellipse);
00794 }
00795
00796 void CDrawView::OnUpdateDrawLine(CCmdUI* pCmdUI)
00797 {
00798   pCmdUI->SetRadio(CDrawTool::c_drawShape == line);
00799 }
00800
00801 void CDrawView::OnUpdateDrawRect(CCmdUI* pCmdUI)
00802 {
00803   pCmdUI->SetRadio(CDrawTool::c_drawShape == rect);
00804 }
00805
00806 void CDrawView::OnUpdateDrawRoundRect(CCmdUI* pCmdUI)
00807 {
00808   pCmdUI->SetRadio(CDrawTool::c_drawShape == roundRect);
00809 }
00810
00811 void CDrawView::OnUpdateDrawSelect(CCmdUI* pCmdUI)
00812 {
00813   pCmdUI->SetRadio(CDrawTool::c_drawShape == selection);
00814 }
00815
00816 void CDrawView::OnUpdateSingleSelect(CCmdUI* pCmdUI)
00817 {
00818   pCmdUI->Enable(m_selection.GetCount() == 1);
00819 }
00820
00821 void CDrawView::OnEditSelectAll()
00822 {
00823   CDrawObjList* pObList = GetDocument()->GetObjects();
00824   POSITION pos = pObList->GetHeadPosition();
00825   while (pos != NULL)
00826     Select(pObList->GetNext(pos), TRUE);
00827 }
00828
00829 void CDrawView::OnUpdateEditSelectAll(CCmdUI* pCmdUI)
00830 {
00831   pCmdUI->Enable(GetDocument()->GetObjects()->GetCount() != 0);
00832 }
00833
00834 void CDrawView::OnEditClear()
00835 {
00836   // update all the views before the selection goes away
00837   GetDocument()->UpdateAllViews(NULL, HINT_DELETE_SELECTION, &m_selection);
00838   OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
00839
00840   // now remove the selection from the document
00841   POSITION pos = m_selection.GetHeadPosition();
00842   while (pos != NULL)
00843   {
00844     CDrawObj* pObj = m_selection.GetNext(pos);
00845     GetDocument()->Remove(pObj);
00846     pObj->Remove();
00847   }
00848   //Cleanup Tool members such as CPolyTool::m_pDrawObj, that should be NULL at this point.
00849   CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
00850   if (pTool != NULL)
00851   {
00852     pTool->OnCancel();
00853   }
00854   m_selection.RemoveAll();
00855 }
00856
00857 void CDrawView::OnUpdateAnySelect(CCmdUI* pCmdUI)
00858 {
00859   pCmdUI->Enable(!m_selection.IsEmpty());
00860 }
00861
00862 void CDrawView::OnUpdateDrawPolygon(CCmdUI* pCmdUI)
00863 {
00864   pCmdUI->SetRadio(CDrawTool::c_drawShape == poly);
00865 }
00866
00867 void CDrawView::OnSize(UINT nType, int cx, int cy)
00868 {
00869   CScrollView::OnSize(nType, cx, cy);
00870   UpdateActiveItem();
00871 }
00872
00873 void CDrawView::OnViewGrid()
00874 {
00875   m_bGrid = !m_bGrid;
00876   Invalidate(FALSE);
00877 }
00878
00879 void CDrawView::OnUpdateViewGrid(CCmdUI* pCmdUI)
00880 {
00881   pCmdUI->SetCheck(m_bGrid);
00882
00883 }
00884
00885 BOOL CDrawView::OnEraseBkgnd(CDC*)
00886 {
00887   return TRUE;
00888 }
00889
00890 void CDrawView::OnObjectFillColor()
00891 {
00892   CColorDialog dlg;
00893   if (dlg.DoModal() != IDOK)
00894     return;
00895
00896   COLORREF color = dlg.GetColor();
00897
00898   POSITION pos = m_selection.GetHeadPosition();
00899   while (pos != NULL)
00900   {
00901     CDrawObj* pObj = m_selection.GetNext(pos);
00902     pObj->SetFillColor(color);
00903   }
00904 }
00905
00906 void CDrawView::OnObjectLineColor()
00907 {
00908   CColorDialog dlg;
00909   if (dlg.DoModal() != IDOK)
00910     return;
00911
00912   COLORREF color = dlg.GetColor();
00913
00914   POSITION pos = m_selection.GetHeadPosition();
00915   while (pos != NULL)
00916   {
00917     CDrawObj* pObj = m_selection.GetNext(pos);
00918     pObj->SetLineColor(color);
00919   }
00920 }
00921
00922 void CDrawView::OnObjectMoveBack()
00923 {
00924   CDrawDoc* pDoc = GetDocument();
00925   CDrawObj* pObj = m_selection.GetHead();
00926   CDrawObjList* pObjects = pDoc->GetObjects();
00927   POSITION pos = pObjects->Find(pObj);
00928   ASSERT(pos != NULL);
00929   if (pos != pObjects->GetHeadPosition())
00930   {
00931     POSITION posPrev = pos;
00932     pObjects->GetPrev(posPrev);
00933     pObjects->RemoveAt(pos);
00934     pObjects->InsertBefore(posPrev, pObj);
00935     InvalObj(pObj);
00936   }
00937 }
00938
00939 void CDrawView::OnObjectMoveForward()
00940 {
00941   CDrawDoc* pDoc = GetDocument();
00942   CDrawObj* pObj = m_selection.GetHead();
00943   CDrawObjList* pObjects = pDoc->GetObjects();
00944   POSITION pos = pObjects->Find(pObj);
00945   ASSERT(pos != NULL);
00946   if (pos != pObjects->GetTailPosition())
00947   {
00948     POSITION posNext = pos;
00949     pObjects->GetNext(posNext);
00950     pObjects->RemoveAt(pos);
00951     pObjects->InsertAfter(posNext, pObj);
00952     InvalObj(pObj);
00953   }
00954 }
00955
00956 void CDrawView::OnObjectMoveToBack()
00957 {
00958   CDrawDoc* pDoc = GetDocument();
00959   CDrawObj* pObj = m_selection.GetHead();
00960   CDrawObjList* pObjects = pDoc->GetObjects();
00961   POSITION pos = pObjects->Find(pObj);
00962   ASSERT(pos != NULL);
00963   pObjects->RemoveAt(pos);
00964   pObjects->AddHead(pObj);
00965   InvalObj(pObj);
00966 }
00967
00968 void CDrawView::OnObjectMoveToFront()
00969 {
00970   CDrawDoc* pDoc = GetDocument();
00971   CDrawObj* pObj = m_selection.GetHead();
00972   CDrawObjList* pObjects = pDoc->GetObjects();
00973   POSITION pos = pObjects->Find(pObj);
00974   ASSERT(pos != NULL);
00975   pObjects->RemoveAt(pos);
00976   pObjects->AddTail(pObj);
00977   InvalObj(pObj);
00978 }
00979
00980 void CDrawView::OnEditCopy()
00981 {
00982   ASSERT_VALID(this);
00983   ASSERT(m_cfDraw != NULL);
00984
00985   // Create a shared file and associate a CArchive with it
00986   CSharedFile file;
00987   CArchive ar(&file, CArchive::store);
00988
00989   // Serialize selected objects to the archive
00990   m_selection.Serialize(ar);
00991   ar.Close();
00992
00993   COleDataSource* pDataSource = NULL;
00994   TRY
00995   {
00996     pDataSource = new COleDataSource;
00997     // put on local format instead of or in addation to
00998     pDataSource->CacheGlobalData(m_cfDraw, file.Detach());
00999
01000     // if only one item and it is a COleClientItem then also
01001     // paste in that format
01002     CDrawObj* pDrawObj = m_selection.GetHead();
01003     if (m_selection.GetCount() == 1 &&
01004       pDrawObj->IsKindOf(RUNTIME_CLASS(CDrawOleObj)))
01005     {
01006       CDrawOleObj* pDrawOle = (CDrawOleObj*)pDrawObj;
01007       pDrawOle->m_pClientItem->GetClipboardData(pDataSource, FALSE);
01008     }
01009
01010     pDataSource->SetClipboard();
01011     delete pDataSource;
01012
01013   }
01014   CATCH_ALL(e)
01015   {
01016     delete pDataSource;
01017     THROW_LAST();
01018   }
01019   END_CATCH_ALL
01020 }
01021
01022 void CDrawView::OnUpdateEditCopy(CCmdUI* pCmdUI)
01023 {
01024   pCmdUI->Enable(!m_selection.IsEmpty());
01025 }
01026
01027 void CDrawView::OnEditCut()
01028 {
01029   OnEditCopy();
01030   OnEditClear();
01031 }
01032
01033 void CDrawView::OnUpdateEditCut(CCmdUI* pCmdUI)
01034 {
01035   pCmdUI->Enable(!m_selection.IsEmpty());
01036 }
01037
01038 void CDrawView::OnEditPaste()
01039 {
01040   COleDataObject dataObject;
01041   dataObject.AttachClipboard();
01042
01043   // invalidate current selection since it will be deselected
01044   OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
01045   m_selection.RemoveAll();
01046   if (dataObject.IsDataAvailable(m_cfDraw))
01047   {
01048     PasteNative(dataObject);
01049
01050     // now add all items in m_selection to document
01051     POSITION pos = m_selection.GetHeadPosition();
01052     while (pos != NULL)
01053       GetDocument()->Add(m_selection.GetNext(pos));
01054   }
01055   else
01056     PasteEmbedded(dataObject, GetInitialPosition().TopLeft() );
01057
01058   GetDocument()->SetModifiedFlag();
01059
01060   // invalidate new pasted stuff
01061   GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_SELECTION, &m_selection);
01062 }
01063
01064 void CDrawView::OnUpdateEditPaste(CCmdUI* pCmdUI)
01065 {
01066   // determine if private or standard OLE formats are on the clipboard
01067   COleDataObject dataObject;
01068   BOOL bEnable = dataObject.AttachClipboard() &&
01069     (dataObject.IsDataAvailable(m_cfDraw) ||
01070      COleClientItem::CanCreateFromData(&dataObject));
01071
01072   // enable command based on availability
01073   pCmdUI->Enable(bEnable);
01074 }
01075
01076 void CDrawView::OnFilePrint()
01077 {
01078   CScrollView::OnFilePrint();
01079   GetDocument()->ComputePageSize();
01080 }
01081
01082 void CDrawView::OnViewShowObjects()
01083 {
01084   CDrawOleObj::c_bShowItems = !CDrawOleObj::c_bShowItems;
01085   GetDocument()->UpdateAllViews(NULL, HINT_UPDATE_OLE_ITEMS, NULL);
01086 }
01087
01088 void CDrawView::OnUpdateViewShowObjects(CCmdUI* pCmdUI)
01089 {
01090   pCmdUI->SetCheck(CDrawOleObj::c_bShowItems);
01091 }
01092
01093 void CDrawView::OnEditProperties()
01094 {
01095   if (m_selection.GetCount() == 1 && CDrawTool::c_drawShape == selection)
01096   {
01097     CDrawTool* pTool = CDrawTool::FindTool(CDrawTool::c_drawShape);
01098     ASSERT(pTool != NULL);
01099     pTool->OnEditProperties(this);
01100   }
01101 }
01102
01103 void CDrawView::OnUpdateEditProperties(CCmdUI* pCmdUI)
01104 {
01105   pCmdUI->Enable(m_selection.GetCount() == 1 &&
01106            CDrawTool::c_drawShape == selection);
01107 }
01108
01109 /////////////////////////////////////////////////////////////////////////////
01110 // CDrawView diagnostics
01111
01112 #ifdef _DEBUG
01113 void CDrawView::AssertValid() const
01114 {
01115   CScrollView::AssertValid();
01116 }
01117
01118 void CDrawView::Dump(CDumpContext& dc) const
01119 {
01120   CScrollView::Dump(dc);
01121 }
01122 #endif //_DEBUG
01123
01124 /////////////////////////////////////////////////////////////////////////////
01125 // new
01126 // support for drag/drop
01127
01128 int CDrawView::OnCreate(LPCREATESTRUCT lpCreateStruct)
01129 {
01130   if (CScrollView::OnCreate(lpCreateStruct) == -1)
01131     return -1;
01132
01133   // register drop target
01134   if( m_dropTarget.Register( this ) )
01135     return 0;
01136   else
01137     return -1;
01138 }
01139
01140 BOOL CDrawView::GetObjectInfo(COleDataObject* pDataObject,
01141   CSize* pSize, CSize* pOffset)
01142 {
01143   ENSURE(pSize != NULL);
01144
01145   // get object descriptor data
01146   HGLOBAL hObjDesc = pDataObject->GetGlobalData(m_cfObjectDescriptor);
01147   if (hObjDesc == NULL)
01148   {
01149     if (pOffset != NULL)
01150       *pOffset = CSize(0, 0); // fill in defaults instead
01151     *pSize = CSize(0, 0);
01152     return FALSE;
01153   }
01154   ASSERT(hObjDesc != NULL);
01155
01156   // otherwise, got CF_OBJECTDESCRIPTOR ok.  Lock it down and extract size.
01157   LPOBJECTDESCRIPTOR pObjDesc = (LPOBJECTDESCRIPTOR)GlobalLock(hObjDesc);
01158   ENSURE(pObjDesc != NULL);
01159   pSize->cx = (int)pObjDesc->sizel.cx;
01160   pSize->cy = (int)pObjDesc->sizel.cy;
01161   if (pOffset != NULL)
01162   {
01163     pOffset->cx = (int)pObjDesc->pointl.x;
01164     pOffset->cy = (int)pObjDesc->pointl.y;
01165   }
01166   GlobalUnlock(hObjDesc);
01167   GlobalFree(hObjDesc);
01168
01169   // successfully retrieved pSize & pOffset info
01170   return TRUE;
01171 }
01172
01173 DROPEFFECT CDrawView::OnDragEnter(COleDataObject* pDataObject,
01174   DWORD grfKeyState, CPoint point)
01175 {
01176   ASSERT(m_prevDropEffect == DROPEFFECT_NONE);
01177   m_bDragDataAcceptable = FALSE;
01178   if (!COleClientItem::CanCreateFromData(pDataObject))
01179     return DROPEFFECT_NONE;
01180
01181   m_bDragDataAcceptable = TRUE;
01182   GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
01183   CClientDC dc(NULL);
01184   dc.HIMETRICtoDP(&m_dragSize);
01185   dc.HIMETRICtoDP(&m_dragOffset);
01186
01187   return OnDragOver(pDataObject, grfKeyState, point);
01188 }
01189
01190 DROPEFFECT CDrawView::OnDragOver(COleDataObject*,
01191   DWORD grfKeyState, CPoint point)
01192 {
01193   if(m_bDragDataAcceptable == FALSE)
01194     return DROPEFFECT_NONE;
01195
01196   point -= m_dragOffset;  // adjust target rect by original cursor offset
01197
01198   // check for point outside logical area -- i.e. in hatched region
01199   // GetTotalSize() returns the size passed to SetScrollSizes
01200   CRect rectScroll(CPoint(0, 0), GetTotalSize());
01201
01202   CRect rectItem(point,m_dragSize);
01203   rectItem.OffsetRect(GetDeviceScrollPosition());
01204
01205   DROPEFFECT de = DROPEFFECT_NONE;
01206   CRect rectTemp;
01207   if (rectTemp.IntersectRect(rectScroll, rectItem))
01208   {
01209     // check for force link
01210     if ((grfKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
01211       de = DROPEFFECT_NONE; // DRAWCLI isn't a linking container
01212     // check for force copy
01213     else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
01214       de = DROPEFFECT_COPY;
01215     // check for force move
01216     else if ((grfKeyState & MK_ALT) == MK_ALT)
01217       de = DROPEFFECT_MOVE;
01218     // default -- recommended action is move
01219     else
01220       de = DROPEFFECT_MOVE;
01221   }
01222
01223   if (point == m_dragPoint)
01224     return de;
01225
01226   // otherwise, cursor has moved -- need to update the drag feedback
01227   CClientDC dc(this);
01228   if (m_prevDropEffect != DROPEFFECT_NONE)
01229   {
01230     // erase previous focus rect
01231     dc.DrawFocusRect(CRect(m_dragPoint, m_dragSize));
01232   }
01233   m_prevDropEffect = de;
01234   if (m_prevDropEffect != DROPEFFECT_NONE)
01235   {
01236     m_dragPoint = point;
01237     dc.DrawFocusRect(CRect(point, m_dragSize));
01238   }
01239   return de;
01240 }
01241
01242 BOOL CDrawView::OnDrop(COleDataObject* pDataObject,
01243   DROPEFFECT /*dropEffect*/, CPoint point)
01244 {
01245   ASSERT_VALID(this);
01246
01247   // clean up focus rect
01248   OnDragLeave();
01249
01250   // offset point as appropriate for dragging
01251   GetObjectInfo(pDataObject, &m_dragSize, &m_dragOffset);
01252   CClientDC dc(NULL);
01253   dc.HIMETRICtoDP(&m_dragSize);
01254   dc.HIMETRICtoDP(&m_dragOffset);
01255   point -= m_dragOffset;
01256
01257   // invalidate current selection since it will be deselected
01258   OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);
01259   m_selection.RemoveAll();
01260   if (m_bDragDataAcceptable)
01261     PasteEmbedded(*pDataObject, point);
01262
01263   // update the document and views
01264   GetDocument()->SetModifiedFlag();
01265   GetDocument()->UpdateAllViews(NULL, 0, NULL);      // including this view
01266
01267   return TRUE;
01268 }
01269
01270 void CDrawView::OnDragLeave()
01271 {
01272   CClientDC dc(this);
01273   if (m_prevDropEffect != DROPEFFECT_NONE)
01274   {
01275     dc.DrawFocusRect(CRect(m_dragPoint,m_dragSize)); // erase previous focus rect
01276     m_prevDropEffect = DROPEFFECT_NONE;
01277   }
01278 }
01279
01280
01281 void CDrawView::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
01282 {
01283   // make sure window is active
01284   GetParentFrame()->ActivateFrame();
01285
01286   CPoint local = point;
01287   ScreenToClient(&local);
01288   ClientToDoc(local);
01289
01290   CDrawObj* pObj;
01291   pObj = GetDocument()->ObjectAt(local);
01292   if(pObj != NULL)
01293   {
01294     if(!IsSelected(pObj))
01295       Select( pObj, FALSE );          // reselect item if appropriate
01296     UpdateWindow();
01297
01298     CMenu menu;
01299     if (menu.LoadMenu(ID_POPUP_MENU))
01300     {
01301       CMenu* pPopup = menu.GetSubMenu(0);
01302       ENSURE(pPopup != NULL);
01303
01304       pPopup->TrackPopupMenu(TPM_RIGHTBUTTON | TPM_LEFTALIGN,
01305                    point.x, point.y,
01306                    AfxGetMainWnd()); // route commands through main window
01307     }
01308   }
01309 }
01310
01311 void CDrawView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
01312 {
01313   if (pInfo->m_bPreview == FALSE)
01314     ((CDrawDoc*)GetDocument())->m_pSummInfo->RecordPrintDate();
01315   OnDraw(pDC);
01316 }
Generated on Sat Nov 23 2024 17:00:25 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/resource.h Source File

  • advanced
  • speakn

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // App Studio generated include file.
00003 // Used by SPEAKN.RC
00004 //
00005 #define IDS_CANNOT_PLAY_SOUND           1
00006 #define IDS_FONT_NAME                   2
00007 #define IDS_TRY_AGAIN                   3
00008 #define IDS_PICTURE_UNAVAILABLE         4
00009 #define IDS_DONE                        5
00010 #define IDI_FACE_NEUTRAL                10
00011 #define IDI_FACE_HAPPY                  11
00012 #define IDI_FACE_HAPPIER                12
00013 #define IDI_FACE_SAD                    13
00014 #define IDD_PENDIALOG                   101
00015 #define IDSOUND_WELCOME                 101
00016 #define IDSOUND_QUESTION                102
00017 #define IDD_NOPENDIALOG                 102
00018 #define IDSOUND_CORRECT                 103
00019 #define IDSOUND_INCORRECT               104
00020 #define IDSOUND_GIVEUP                  105
00021 #define IDSOUND_GOODBYE                 106
00022 #define IDC_PICTURE                     201
00023 #define IDC_STATUS_FACE                 202
00024 #define IDC_PROMPT_TEXT                 203
00025 #define IDC_REPLAY_SOUND                204
00026 #define IDC_GIVE_UP                     205
00027 #define IDC_INPUT_EDIT                  206
00028
00029 // Next default values for new objects
00030 //
00031 #ifdef APSTUDIO_INVOKED
00032 #ifndef APSTUDIO_READONLY_SYMBOLS
00033 #define _APS_NEXT_RESOURCE_VALUE        102
00034 #define _APS_NEXT_COMMAND_VALUE         32769
00035 #define _APS_NEXT_CONTROL_VALUE         1000
00036 #define _APS_NEXT_SYMED_VALUE           102
00037 #endif
00038 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpvw.h Source File

  • ole
  • wordpad

wordpvw.h

Go to the documentation of this file.
00001 // wordpvw.h : interface of the CWordPadView class
00002 //
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 class CWordPadView : public CRichEditView
00014 {
00015 protected: // create from serialization only
00016   CWordPadView();
00017   DECLARE_DYNCREATE(CWordPadView)
00018
00019 // Attributes
00020 public:
00021   UINT_PTR m_uTimerID;
00022   BOOL m_bDelayUpdateItems;
00023   BOOL m_bInPrint;
00024   CParaFormat m_defParaFormat;
00025   CCharFormat m_defCharFormat;
00026   CCharFormat m_defTextCharFormat;
00027
00028   CWordPadDoc* GetDocument();
00029   BOOL IsFormatText();
00030
00031   virtual HMENU GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj,
00032     CHARRANGE* lpchrg);
00033
00034 // Operations
00035 public:
00036   BOOL PasteNative(LPDATAOBJECT lpdataobj);
00037   void SetDefaultFont(BOOL bText);
00038   void SetUpdateTimer();
00039   void GetDefaultFont(CCharFormat& cf, UINT nFontNameID);
00040   void DrawMargins(CDC* pDC);
00041   BOOL SelectPalette();
00042
00043 // Overrides
00044   // ClassWizard generated virtual function overrides
00045   //{{AFX_VIRTUAL(CWordPadView)
00046   protected:
00047   virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder);
00048   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00049   virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00050   //}}AFX_VIRTUAL
00051   BOOL OnPreparePrinting(CPrintInfo* pInfo);
00052   virtual HRESULT GetClipboardData(CHARRANGE* lpchrg, DWORD reco,
00053     LPDATAOBJECT lpRichDataObj, LPDATAOBJECT* lplpdataobj);
00054   virtual HRESULT QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD,
00055     BOOL, HGLOBAL);
00056 public:
00057   virtual void WrapChanged();
00058
00059 // Implementation
00060 public:
00061 #ifdef _DEBUG
00062   virtual void AssertValid() const;
00063   virtual void Dump(CDumpContext& dc) const;
00064 #endif
00065
00066 protected:
00067   BOOL m_bOnBar;
00068
00069   // OLE Container support
00070
00071   virtual void DeleteContents();
00072   virtual void OnTextNotFound(LPCTSTR);
00073
00074 // Generated message map functions
00075 protected:
00076   afx_msg void OnCancelEditSrvr();
00077   //{{AFX_MSG(CWordPadView)
00078   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00079   afx_msg void OnPageSetup();
00080   afx_msg void OnInsertDateTime();
00081   afx_msg void OnFormatParagraph();
00082   afx_msg void OnFormatTabs();
00083   afx_msg void OnTimer(UINT_PTR nIDEvent);
00084   afx_msg void OnDestroy();
00085   afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00086   afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00087   afx_msg void OnFilePrint();
00088   afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00089   afx_msg BOOL OnQueryNewPalette();
00090   afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
00091   afx_msg void OnSize(UINT nType, int cx, int cy);
00092   //}}AFX_MSG
00093   afx_msg void OnEditChange();
00094   afx_msg void OnColorPick(UINT nID);
00095   afx_msg int OnMouseActivate(CWnd* pWnd, UINT nHitTest, UINT message);
00096   afx_msg LONG_PTR OnPrinterChangedMsg(UINT_PTR, LONG_PTR);
00097   afx_msg void OnGetCharFormat(NMHDR* pNMHDR, LRESULT* pRes);
00098   afx_msg void OnSetCharFormat(NMHDR* pNMHDR, LRESULT* pRes);
00099   afx_msg void OnBarSetFocus(NMHDR*, LRESULT*);
00100   afx_msg void OnBarKillFocus(NMHDR*, LRESULT*);
00101   afx_msg void OnBarReturn(NMHDR*, LRESULT* );
00102   DECLARE_MESSAGE_MAP()
00103 };
00104
00105 #ifndef _DEBUG  // debug version in wordpvw.cpp
00106 inline CWordPadDoc* CWordPadView::GetDocument()
00107    { return (CWordPadDoc*)m_pDocument; }
00108 #endif
00109
00110 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyPropertyPage3 Member List

This is the complete list of members for CMyPropertyPage3, including all inherited members.
CMyPropertyPage3() | CMyPropertyPage3 |
DoDataExchange(CDataExchange *pDX) | CMyPropertyPage3 | [protected, virtual]
IDD enum value | CMyPropertyPage3 |
~CMyPropertyPage3() | CMyPropertyPage3 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/targetver.h Source File

  • vc2008fp
  • MSOffice2007Demo

targetver.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include <winsdkver.h>
00015
00016 #ifndef _WIN32_WINNT
00017 // Modify the following define to target a prior platform. Refer to MSDN
00018 // for the latest info on corresponding values for different platforms.
00019 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00020 #endif
00021
00022 #include <sdkddkver.h>
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/history.cpp Source File

  • general
  • npp

history.cpp

Go to the documentation of this file.
00001 // history.cpp : implementation of the CHistoryList class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "np.h"
00015 #include "combobar.h"
00016 #include "mainfrm.h"
00017 #include "npdoc.h"
00018 #include "npview.h"
00019 #include "finddlg.h"
00020 #include <afxcoll.h>
00021
00022 void CHistoryList::FillCombobox()
00023 {
00024   CNotepadView* pView = GetApplicationView();
00025   CWnd* pWnd = pView->m_pFindDialog->GetDlgItem(IDC_COMBO1);
00026   ASSERT_VALID(pWnd);
00027
00028   POSITION pos = GetHeadPosition();
00029   while(pos)
00030     pWnd->SendMessage(CB_ADDSTRING, 0, (LPARAM)((LPCTSTR)GetNext(pos)));
00031 }
00032
00033
00034 BOOL CHistoryList::AddString(CString &s1)
00035 {
00036   CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
00037   CWnd* pWnd = &pFrame->m_wndToolBar.m_toolBarCombo;
00038   ASSERT_VALID(pWnd);
00039
00040   if (!s1.GetLength())
00041     return FALSE;
00042
00043   POSITION pos = Find(s1);
00044   INT_PTR nCount = GetCount();
00045
00046   if (pos == NULL)
00047   {
00048     // if list is full, remove from the end
00049     if (nCount == HISTORY_COUNT)
00050     {
00051       RemoveTail();
00052       pWnd->SendMessage(CB_DELETESTRING, nCount-1);
00053     }
00054
00055     AddHead(s1);
00056     pWnd->SendMessage(CB_INSERTSTRING, 0, (LPARAM)((LPCTSTR)s1));
00057   }
00058   else
00059   {
00060     SwapStrings(pWnd, s1);
00061   }
00062
00063   return TRUE;
00064 }
00065
00066 void CHistoryList::SwapStrings(CWnd* pWnd, CString &s1)
00067 {
00068   // swap internal list items
00069   POSITION pos = GetHeadPosition();
00070   ASSERT(pos != NULL);
00071
00072   CString s2;
00073   INT_PTR nCount = GetCount();
00074   int idx=0;
00075
00076   // Note: combo-box find is not case-sensitive
00077   do
00078   {
00079     s2 = GetNext(pos);
00080   } while(idx < nCount && s1 != s2 && ++idx);
00081
00082
00083   // swap internal list
00084   pos = FindIndex(idx);
00085   ASSERT(pos != NULL);
00086   RemoveAt(pos);
00087   AddHead(s2);
00088
00089   // swap combo box item with combo's edit control
00090   pWnd->SendMessage(CB_DELETESTRING, idx);
00091   pWnd->SendMessage(CB_SETCURSEL, pWnd->SendMessage(CB_INSERTSTRING, 0, (LPARAM)((LPCTSTR)s1)));
00092 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLocalizePropPage Member List

This is the complete list of members for CLocalizePropPage, including all inherited members.
CLocalizePropPage() | CLocalizePropPage |
DoDataExchange(CDataExchange *pDX) | CLocalizePropPage | [protected, virtual]
GetResourceHandle(LCID lcid) | CLocalizePropPage | [protected, virtual]
hResHandle | CLocalizePropPage | [protected]
IDD enum value | CLocalizePropPage |
m_Invert | CLocalizePropPage |
OnFinalRelease() | CLocalizePropPage | [protected, virtual]
OnSetPageSite() | CLocalizePropPage | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/unitspag.h Source File

  • vc2008fp
  • WordPad

unitspag.h

Go to the documentation of this file.
00001 //
00002 // unitspag.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CUnitsPage dialog
00016
00017 class CUnitsPage : public CCSPropertyPage
00018 {
00019 // Construction
00020 public:
00021   CUnitsPage();   // standard constructor
00022
00023 // Dialog Data
00024   //{{AFX_DATA(CUnitsPage)
00025   enum { IDD = IDD_OPTIONS_UNITS };
00026   int     m_nUnits;
00027   BOOL    m_bWordSel;
00028   //}}AFX_DATA
00029
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CUnitsPage)
00034   protected:
00035   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 protected:
00040   static const DWORD m_nHelpIDs[];
00041   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00042
00043   // Generated message map functions
00044   //{{AFX_MSG(CUnitsPage)
00045     // NOTE: the ClassWizard will add member functions here
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAutoDrivDlg Member List

This is the complete list of members for CAutoDrivDlg, including all inherited members.
CAutoDrivDlg(CWnd *pParent=NULL) | CAutoDrivDlg |
CAutoDrivDlg(CWnd *pParent=NULL) | CAutoDrivDlg |
DoDataExchange(CDataExchange *pDX) | CAutoDrivDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAutoDrivDlg | [protected, virtual]
IDD enum value | CAutoDrivDlg |
m_autoClikObject | CAutoDrivDlg | [protected]
m_bUseDispatch | CAutoDrivDlg |
m_hIcon | CAutoDrivDlg | [protected]
m_pDualAutoClikObject | CAutoDrivDlg | [protected]
m_szText | CAutoDrivDlg |
m_x | CAutoDrivDlg |
m_y | CAutoDrivDlg |
OnAnimatePos() | CAutoDrivDlg | [protected]
OnAnimatePos() | CAutoDrivDlg | [protected]
OnAnimateXY() | CAutoDrivDlg | [protected]
OnAnimateXY() | CAutoDrivDlg | [protected]
OnClose() | CAutoDrivDlg | [protected]
OnClose() | CAutoDrivDlg | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CAutoDrivDlg | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CAutoDrivDlg | [protected]
OnGetAll() | CAutoDrivDlg | [protected]
OnGetAll() | CAutoDrivDlg | [protected]
OnGetPosition() | CAutoDrivDlg | [protected]
OnGetPosition() | CAutoDrivDlg | [protected]
OnInitDialog() | CAutoDrivDlg | [protected, virtual]
OnInitDialog() | CAutoDrivDlg | [protected, virtual]
OnPaint() | CAutoDrivDlg | [protected]
OnPaint() | CAutoDrivDlg | [protected]
OnQueryDragIcon() | CAutoDrivDlg | [protected]
OnQueryDragIcon() | CAutoDrivDlg | [protected]
OnRefresh() | CAutoDrivDlg | [protected]
OnRefresh() | CAutoDrivDlg | [protected]
OnSetAll() | CAutoDrivDlg | [protected]
OnSetAll() | CAutoDrivDlg | [protected]
OnSetPosition() | CAutoDrivDlg | [protected]
OnSetPosition() | CAutoDrivDlg | [protected]
OnSetText() | CAutoDrivDlg | [protected]
OnSetText() | CAutoDrivDlg | [protected]
OnSetX() | CAutoDrivDlg | [protected]
OnSetX() | CAutoDrivDlg | [protected]
OnSetY() | CAutoDrivDlg | [protected]
OnSetY() | CAutoDrivDlg | [protected]
OnUseDispatch() | CAutoDrivDlg | [protected]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/dllhusk/stdafx.h Source File

  • advanced
  • dllhusk

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //  or project specific include files that are used frequently, but
00012 //      are changed infrequently
00013
00014 #define VC_EXTRALEAN
00015
00016 #include <afxwin.h>      // MFC core and standard components
00017 #include <afxext.h>         // MFC extensions (including VB)
00018 #ifndef _AFX_NO_OLE_SUPPORT
00019 #include <afxdisp.h>        // MFC/OLE only automation part
00020 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/combobar.cpp Source File

  • general
  • npp

combobar.cpp

Go to the documentation of this file.
00001 // combobar.cpp : implementation of the CComboToolBar and CTBComboBox class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "np.h"
00015 #include "combobar.h"
00016 #include "mainfrm.h"
00017 #include "npdoc.h"
00018 #include "npview.h"
00019 #include "finddlg.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 BEGIN_MESSAGE_MAP(CComboToolBar, CToolBar)
00027   //{{AFX_MSG_MAP(CComboToolBar)
00028   //}}AFX_MSG_MAP
00029   ON_CBN_SETFOCUS(IDW_COMBO, OnSetFocus)
00030 END_MESSAGE_MAP()
00031
00032
00033 void CComboToolBar::OnSetFocus()
00034 {
00035   // combobox is gaining focus, highlight text in edit control
00036   m_toolBarCombo.SetEditSel(0,-1);
00037 }
00038
00039 BOOL CComboToolBar::PreTranslateMessage(MSG* pMsg)
00040 {
00041   // Note: there is only one control in the toolbar that accepts keyboard input,
00042   // this is the combobox.
00043
00044   // user hit ENTER
00045   if (pMsg->wParam == VK_RETURN && GetKeyState(VK_RETURN) < 0)
00046   {
00047     // extract the text, update combobox lists, and do the search
00048     CString s1;
00049     m_toolBarCombo.GetWindowText(s1);
00050
00051     if(s1.GetLength())
00052     {
00053       CNotepadView* pView = GetApplicationView();
00054       m_toolBarCombo.SetEditSel(0, -1);
00055       pView->m_searchHistory.AddString(s1);   // update combobox history list
00056       pView->m_pFindDialog->m_szText = s1;                // update last string
00057       pView->OnViewFindNext(s1);                      // find the string
00058       return TRUE;  // key processed
00059     }
00060     else
00061     {
00062       MessageBeep(MB_ICONEXCLAMATION);
00063       return TRUE;  // key processed
00064     }
00065   }
00066
00067   // user hit ESC
00068   if (pMsg->wParam == VK_ESCAPE && GetKeyState(VK_ESCAPE) < 0)
00069   {
00070     GetApplicationView()->SetFocus();
00071     return TRUE; // key processed
00072   }
00073
00074   // user hit DOWN-ARROW
00075   if (pMsg->wParam == VK_DOWN && GetKeyState(VK_DOWN) < 0 &&
00076     m_toolBarCombo.GetDroppedState() == FALSE)
00077   {
00078     m_toolBarCombo.ShowDropDown();
00079     return TRUE; // key processed
00080   }
00081
00082   return  CToolBar::PreTranslateMessage(pMsg);
00083 }
00084
00085 BEGIN_MESSAGE_MAP(CTBComboBox, CComboBox)
00086   //{{AFX_MSG_MAP(CTBComboBox)
00087   ON_WM_CREATE()
00088   //}}AFX_MSG_MAP
00089 END_MESSAGE_MAP()
00090
00091 int CTBComboBox::OnCreate(LPCREATESTRUCT lpCreateStruct)
00092 {
00093   if (CComboBox::OnCreate(lpCreateStruct) == -1)
00094     return -1;
00095
00096   LOGFONT logFont;
00097   TEXTMETRIC tm;
00098   CClientDC dc(this);
00099
00100   dc.GetTextMetrics(&tm);
00101   ::EnumFontFamilies(dc.m_hDC, _T("MS Sans Serif"),
00102             CTBComboBox::FontEnumProc, (LPARAM)&logFont);
00103
00104   // change the weight and create the font
00105   logFont.lfWeight = FW_BOLD;
00106   if (m_font.CreateFontIndirect(&logFont))
00107     SetFont(&m_font);
00108
00109   return 0;
00110 }
00111
00112 int CALLBACK CTBComboBox::FontEnumProc(const LOGFONT *pLogFont, const TEXTMETRIC* /*pTextMetric*/, DWORD /*type*/, LPARAM pDestLogFont)
00113 {
00114   memcpy_s((BYTE*)pDestLogFont, sizeof(LOGFONT), pLogFont, sizeof(LOGFONT));
00115   return FALSE; // return the first font in the family(i.e. smallest).
00116 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListView.h Source File

  • general
  • DBVList

DBVListView.h

Go to the documentation of this file.
00001 // DBVListView.h : interface of the CDBVListView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_DBVLISTVIEW_H__13CCB74B_ED59_11D0_8286_00C04FD73634__INCLUDED_)
00013 #define AFX_DBVLISTVIEW_H__13CCB74B_ED59_11D0_8286_00C04FD73634__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 class CDBVListSet;
00020
00021 class CDBVListView : public CFormView
00022 {
00023 protected: // create from serialization only
00024   CDBVListView();
00025   DECLARE_DYNCREATE(CDBVListView)
00026
00027 public:
00028   //{{AFX_DATA(CDBVListView)
00029   enum { IDD = IDD_DBVLIST_FORM };
00030   CDBVListSet* m_pSet;
00031   CString m_strDiv;
00032   //}}AFX_DATA
00033
00034 // Attributes
00035 public:
00036   CDBVListDoc* GetDocument();
00037
00038 // Operations
00039 public:
00040
00041 // Overrides
00042   // ClassWizard generated virtual function overrides
00043   //{{AFX_VIRTUAL(CDBVListView)
00044   public:
00045   virtual CDaoRecordset* OnGetRecordset();
00046   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00047   protected:
00048   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00049   virtual void OnInitialUpdate(); // called first time after construct
00050   //}}AFX_VIRTUAL
00051
00052 // Implementation
00053 public:
00054   virtual ~CDBVListView();
00055 #ifdef _DEBUG
00056   virtual void AssertValid() const;
00057   virtual void Dump(CDumpContext& dc) const;
00058 #endif
00059
00060 protected:
00061
00062 // Generated message map functions
00063 protected:
00064   //{{AFX_MSG(CDBVListView)
00065   afx_msg void OnFetch();
00066   //}}AFX_MSG
00067   DECLARE_MESSAGE_MAP()
00068 };
00069
00070 #ifndef _DEBUG  // debug version in DBVListView.cpp
00071 inline CDBVListDoc* CDBVListView::GetDocument()
00072    { return (CDBVListDoc*)m_pDocument; }
00073 #endif
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076
00077 //{{AFX_INSERT_LOCATION}}
00078 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00079
00080 #endif // !defined(AFX_DBVLISTVIEW_H__13CCB74B_ED59_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDlgStatusBar Member List

This is the complete list of members for CDlgStatusBar, including all inherited members.
CDlgStatusBar() | CDlgStatusBar |
OnIdleUpdateCmdUI(WPARAM wParam, LPARAM) | CDlgStatusBar | [protected]
~CDlgStatusBar() | CDlgStatusBar | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Slider/MainFrm.h Source File

  • vc2008fp
  • Slider

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CMainFrame : public CFrameWndEx
00014 {
00015
00016 protected: // create from serialization only
00017   CMainFrame();
00018   DECLARE_DYNCREATE(CMainFrame)
00019
00020 // Attributes
00021 public:
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00028
00029 // Implementation
00030 public:
00031   virtual ~CMainFrame();
00032 #ifdef _DEBUG
00033   virtual void AssertValid() const;
00034   virtual void Dump(CDumpContext& dc) const;
00035 #endif
00036
00037 protected:  // control bar embedded members
00038   CMFCMenuBar m_wndMenuBar;
00039   CMFCStatusBar m_wndStatusBar;
00040   CMFCToolBar m_wndToolBar;
00041
00042 protected:
00043   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00044   afx_msg void OnSlider();
00045   afx_msg void OnViewCustomize();
00046   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00047   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00048
00049   DECLARE_MESSAGE_MAP()
00050
00051   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00052 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAutoClickDoc Member List

This is the complete list of members for CAutoClickDoc, including all inherited members.
CAutoClickDoc() | CAutoClickDoc | [protected]
CAutoClickDoc() | CAutoClickDoc | [protected]
get_Position(THIS_ IDualAutoClickPoint FAR *FAR *retval) | CAutoClickDoc |
get_text(THIS_ BSTR FAR *retval) | CAutoClickDoc |
get_x(THIS_ short FAR *retval) | CAutoClickDoc |
get_y(THIS_ short FAR *retval) | CAutoClickDoc |
GetPosition() | CAutoClickDoc |
GetPosition() | CAutoClickDoc |
GetX() | CAutoClickDoc |
GetX() | CAutoClickDoc |
GetY() | CAutoClickDoc |
GetY() | CAutoClickDoc |
m_pt | CAutoClickDoc |
m_str | CAutoClickDoc |
OnEditChangetext() | CAutoClickDoc | [protected]
OnEditChangetext() | CAutoClickDoc | [protected]
OnNewDocument() | CAutoClickDoc | [virtual]
OnNewDocument() | CAutoClickDoc | [virtual]
put_Position(THIS_ IDualAutoClickPoint FAR *newPosition) | CAutoClickDoc |
put_text(THIS_ BSTR newText) | CAutoClickDoc |
put_x(THIS_ short newX) | CAutoClickDoc |
put_y(THIS_ short newY) | CAutoClickDoc |
putref_Position(THIS_ IDualAutoClickPoint FAR *newPosition) | CAutoClickDoc |
Refresh() | CAutoClickDoc |
Refresh() | CAutoClickDoc |
RefreshWindow(THIS) | CAutoClickDoc |
Serialize(CArchive &ar) | CAutoClickDoc | [virtual]
Serialize(CArchive &ar) | CAutoClickDoc | [virtual]
SetAllProps(short x, short y, LPCTSTR text) | CAutoClickDoc |
SetAllProps(THIS_ short x, short y, BSTR text) | CAutoClickDoc |
SetAllProps(short x, short y, LPCTSTR text) | CAutoClickDoc |
SetPosition(LPDISPATCH newValue) | CAutoClickDoc |
SetPosition(LPDISPATCH newValue) | CAutoClickDoc |
SetX(short nNewValue) | CAutoClickDoc |
SetX(short nNewValue) | CAutoClickDoc |
SetY(short nNewValue) | CAutoClickDoc |
SetY(short nNewValue) | CAutoClickDoc |
ShowWindow() | CAutoClickDoc |
ShowWindow(THIS) | CAutoClickDoc |
ShowWindow() | CAutoClickDoc |
TestError(THIS_ short wCode) | CAutoClickDoc |
TestErrorHandler(short wCode) | CAutoClickDoc |
~CAutoClickDoc() | CAutoClickDoc | [virtual]
~CAutoClickDoc() | CAutoClickDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/RebarTest.h Source File

  • vc2008fp
  • RebarTest

RebarTest.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019
00020 // CRebarTestApp:
00021 // See RebarTest.cpp for the implementation of this class
00022 //
00023
00024 class CRebarTestApp : public CWinAppEx
00025 {
00026 public:
00027   CRebarTestApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032 public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038   DECLARE_MESSAGE_MAP()
00039 };
00040
00041 extern CRebarTestApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mainfrm.h Source File

  • ole
  • acdual

mainfrm.h

Go to the documentation of this file.
00001 // MainFrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CMainFrame : public CMDIFrameWnd
00014 {
00015   DECLARE_DYNAMIC(CMainFrame)
00016 public:
00017   CMainFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CMainFrame)
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CStatusBar  m_wndStatusBar;
00041   CToolBar    m_wndToolBar;
00042
00043 // Generated message map functions
00044 protected:
00045   //{{AFX_MSG(CMainFrame)
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047     // NOTE - the ClassWizard will add and remove member functions here.
00048     //    DO NOT EDIT what you see in these blocks of generated code!
00049   //}}AFX_MSG
00050   DECLARE_MESSAGE_MAP()
00051 };
00052
00053 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/Scribble/scribitm.h Source File

  • general
  • Scribble

scribitm.h

Go to the documentation of this file.
00001 // ScribItm.h : interface of the CScribbleItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CScribbleItem : public COleServerItem
00013 {
00014   DECLARE_DYNAMIC(CScribbleItem)
00015
00016 // Constructors
00017 public:
00018   CScribbleItem(CScribbleDoc* pContainerDoc);
00019
00020 // Attributes
00021   CScribbleDoc* GetDocument() const
00022     { return (CScribbleDoc*)COleServerItem::GetDocument(); }
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CScribbleItem)
00027   public:
00028   virtual BOOL OnDraw(CDC* pDC, CSize& rSize);
00029   virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize);
00030   //}}AFX_VIRTUAL
00031
00032 // Implementation
00033 public:
00034   ~CScribbleItem();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:
00041   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/wordpvw.cpp Source File

  • vc2008fp
  • WordPad

wordpvw.cpp

Go to the documentation of this file.
00001 //
00002 // wordpvw.cpp : implementation of the CWordPadView class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "cntritem.h"
00017 #include "srvritem.h"
00018
00019 #include "wordpdoc.h"
00020 #include "wordpvw.h"
00021 #include "formatta.h"
00022 #include "datedial.h"
00023 #include "formatpa.h"
00024 #include "ruler.h"
00025 #include "strings.h"
00026 #include "pageset.h"
00027 //#include <penwin.h>
00028
00029 extern CLIPFORMAT cfEmbeddedObject;
00030 extern CLIPFORMAT cfRTO;
00031
00032 #ifdef _DEBUG
00033 #undef THIS_FILE
00034 static char BASED_CODE THIS_FILE[] = __FILE__;
00035 #endif
00036
00037 BOOL CCharFormat::operator==(CCharFormat& cf)
00038 {
00039   return
00040   dwMask == cf.dwMask
00041   && dwEffects == cf.dwEffects
00042   && yHeight == cf.yHeight
00043   && yOffset == cf.yOffset
00044   && crTextColor == cf.crTextColor
00045   && bPitchAndFamily == cf.bPitchAndFamily
00046   && (lstrcmp(szFaceName, cf.szFaceName) == 0);
00047 }
00048
00049 BOOL CParaFormat::operator==(WPD_PARAFORMAT& pf)
00050 {
00051   if(
00052     dwMask != pf.dwMask
00053     || wNumbering != pf.wNumbering
00054 #if _MSC_VER < 1500
00055     || wReserved != pf.wReserved
00056 #endif
00057     || dxStartIndent != pf.dxStartIndent
00058     || dxRightIndent != pf.dxRightIndent
00059     || dxOffset != pf.dxOffset
00060     || cTabCount != pf.cTabCount
00061     )
00062   {
00063     return FALSE;
00064   }
00065   for (int i=0;i<pf.cTabCount;i++)
00066   {
00067     if (rgxTabs[i] != pf.rgxTabs[i])
00068       return FALSE;
00069   }
00070   return TRUE;
00071 }
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CWordPadView
00075
00076 IMPLEMENT_DYNCREATE(CWordPadView, CRichEditView)
00077
00078 //WM_SETTINGCHANGE -- default printer might have changed
00079 //WM_FONTCHANGE -- pool of fonts changed
00080 //WM_DEVMODECHANGE -- printer settings changes
00081
00082 BEGIN_MESSAGE_MAP(CWordPadView, CRichEditView)
00083   ON_COMMAND(ID_CANCEL_EDIT_CNTR, OnCancelEditCntr)
00084   ON_COMMAND(ID_CANCEL_EDIT_SRVR, OnCancelEditSrvr)
00085   //{{AFX_MSG_MAP(CWordPadView)
00086   ON_WM_CREATE()
00087   ON_COMMAND(ID_PAGE_SETUP, OnPageSetup)
00088   ON_COMMAND(ID_INSERT_DATE_TIME, OnInsertDateTime)
00089   ON_COMMAND(ID_FORMAT_PARAGRAPH, OnFormatParagraph)
00090   ON_COMMAND(ID_FORMAT_TABS, OnFormatTabs)
00091   ON_WM_TIMER()
00092   ON_WM_DESTROY()
00093   ON_WM_MEASUREITEM()
00094   ON_COMMAND(ID_PEN_BACKSPACE, OnPenBackspace)
00095   ON_COMMAND(ID_PEN_NEWLINE, OnPenNewline)
00096   ON_COMMAND(ID_PEN_PERIOD, OnPenPeriod)
00097   ON_COMMAND(ID_PEN_SPACE, OnPenSpace)
00098   ON_WM_KEYDOWN()
00099   ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00100 #ifdef CORRECT_WRITING
00101   ON_COMMAND(ID_PEN_LENS, OnPenLens)
00102 #endif
00103   ON_COMMAND(ID_PEN_TAB, OnPenTab)
00104   ON_WM_PALETTECHANGED()
00105   ON_WM_QUERYNEWPALETTE()
00106   ON_WM_SETTINGCHANGE()
00107   ON_WM_SIZE()
00108   ON_WM_CONTEXTMENU()
00109   ON_WM_RBUTTONUP()
00110   ON_COMMAND(ID_CHAR_COLOR, OnCharColor)
00111   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00112   ON_COMMAND(IDC_FONTNAME, OnFontname)
00113   ON_COMMAND(IDC_FONTSIZE, OnFontsize)
00114   ON_COMMAND(ID_CHAR_BOLD, OnCharBold)
00115   ON_UPDATE_COMMAND_UI(ID_CHAR_BOLD, OnUpdateCharBold)
00116   ON_COMMAND(ID_CHAR_ITALIC, OnCharItalic)
00117   ON_UPDATE_COMMAND_UI(ID_CHAR_ITALIC, OnUpdateCharItalic)
00118   ON_COMMAND(ID_CHAR_UNDERLINE, OnCharUnderline)
00119   ON_UPDATE_COMMAND_UI(ID_CHAR_UNDERLINE, OnUpdateCharUnderline)
00120   ON_COMMAND(ID_PARA_CENTER, OnParaCenter)
00121   ON_UPDATE_COMMAND_UI(ID_PARA_CENTER, OnUpdateParaCenter)
00122   ON_COMMAND(ID_PARA_LEFT, OnParaLeft)
00123   ON_UPDATE_COMMAND_UI(ID_PARA_LEFT, OnUpdateParaLeft)
00124   ON_COMMAND(ID_PARA_RIGHT, OnParaRight)
00125   ON_UPDATE_COMMAND_UI(ID_PARA_RIGHT, OnUpdateParaRight)
00126   ON_COMMAND(ID_FILE_PRINT_DIRECT, OnFilePrint)
00127   ON_WM_DROPFILES()
00128   //}}AFX_MSG_MAP
00129   // Standard printing commands
00130   ON_COMMAND(ID_INSERT_BULLET, CRichEditView::OnBullet)
00131   ON_UPDATE_COMMAND_UI(ID_INSERT_BULLET, CRichEditView::OnUpdateBullet)
00132   ON_EN_CHANGE(AFX_IDW_PANE_FIRST, OnEditChange)
00133   ON_WM_MOUSEACTIVATE()
00134   ON_NOTIFY_RANGE(NM_SETFOCUS, AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, OnBarSetFocus)
00135   ON_NOTIFY_RANGE(NM_KILLFOCUS, AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, OnBarKillFocus)
00136   ON_NOTIFY_RANGE(NM_RETURN, AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, OnBarReturn)
00137   ON_CBN_SELENDOK(IDC_FONTNAME, OnFontname)
00138   ON_CBN_SELENDOK(IDC_FONTSIZE, OnFontsize)
00139   ON_COMMAND_RANGE(ID_BORDER_1, ID_BORDER_13, OnBorderType)
00140   ON_UPDATE_COMMAND_UI_RANGE(ID_BORDER_1, ID_BORDER_13, OnUpdateBorderType)
00141 END_MESSAGE_MAP()
00142
00143 /////////////////////////////////////////////////////////////////////////////
00144 // CWordPadView construction/destruction
00145
00146 CWordPadView::CWordPadView()
00147 {
00148   m_bSyncCharFormat = m_bSyncParaFormat = TRUE;
00149   m_uTimerID = 0;
00150   m_bDelayUpdateItems = FALSE;
00151   m_bOnBar = FALSE;
00152   m_bInPrint = FALSE;
00153   m_nPasteType = 0;
00154   m_rectMargin = theApp.m_rectPageMargin;
00155   m_nBorderType = ID_BORDER_1;
00156 }
00157
00158 BOOL CWordPadView::PreCreateWindow(CREATESTRUCT& cs)
00159 {
00160   BOOL bRes = CRichEditView::PreCreateWindow(cs);
00161   cs.style |= ES_SELECTIONBAR;
00162   return bRes;
00163 }
00164
00165 /////////////////////////////////////////////////////////////////////////////
00166 // CWordPadView attributes
00167
00168 BOOL CWordPadView::IsFormatText()
00169 {
00170   // this function checks to see if any formatting is not default text
00171   BOOL bRes = FALSE;
00172   CHARRANGE cr;
00173   CCharFormat cf;
00174   CParaFormat pf;
00175   GetRichEditCtrl().GetSel(cr);
00176   GetRichEditCtrl().HideSelection(TRUE, FALSE);
00177   GetRichEditCtrl().SetSel(0,-1);
00178
00179   if (!(GetRichEditCtrl().GetSelectionType() & (SEL_OBJECT|SEL_MULTIOBJECT)))
00180   {
00181     GetRichEditCtrl().GetSelectionCharFormat(cf);
00182     if (cf == m_defTextCharFormat)
00183     {
00184       GetRichEditCtrl().GetParaFormat(pf);
00185       if (pf == m_defParaFormat) //compared using CParaFormat::operator==
00186         bRes = TRUE;
00187     }
00188   }
00189
00190   GetRichEditCtrl().SetSel(cr);
00191   GetRichEditCtrl().HideSelection(FALSE, FALSE);
00192   return bRes;
00193 }
00194
00195 HMENU CWordPadView::GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE* )
00196 {
00197   return NULL;
00198 }
00199
00200 /////////////////////////////////////////////////////////////////////////////
00201 // CWordPadView operations
00202
00203 void CWordPadView::WrapChanged()
00204 {
00205   CWaitCursor wait;
00206   CFrameWnd* pFrameWnd = GetParentFrame();
00207   ASSERT(pFrameWnd != NULL);
00208   if (pFrameWnd)
00209   {
00210     pFrameWnd->SetMessageText(IDS_FORMATTING);
00211     CWnd* pBarWnd = pFrameWnd->GetMessageBar();
00212     if (pBarWnd != NULL)
00213       pBarWnd->UpdateWindow();
00214
00215     CRichEditView::WrapChanged();
00216
00217     pFrameWnd->SetMessageText(AFX_IDS_IDLEMESSAGE);
00218     if (pBarWnd != NULL)
00219       pBarWnd->UpdateWindow();
00220   }
00221 }
00222
00223 void CWordPadView::SetUpdateTimer()
00224 {
00225   if (m_uTimerID != 0) // if outstanding timer kill it
00226     KillTimer(m_uTimerID);
00227   m_uTimerID = SetTimer(1, 1000, NULL); //set a timer for 1000 milliseconds
00228   if (m_uTimerID == 0) // no timer available so force update now
00229     GetDocument()->UpdateAllItems(NULL);
00230   else
00231     m_bDelayUpdateItems = TRUE;
00232 }
00233
00234 void CWordPadView::DeleteContents()
00235 {
00236   ASSERT_VALID(this);
00237   ASSERT(m_hWnd != NULL);
00238   CRichEditView::DeleteContents();
00239   SetDefaultFont(IsTextType(GetDocument()->m_nNewDocType));
00240 }
00241
00242 void CWordPadView::SetDefaultFont(BOOL bText)
00243 {
00244   ASSERT_VALID(this);
00245   ASSERT(m_hWnd != NULL);
00246   m_bSyncCharFormat = m_bSyncParaFormat = TRUE;
00247   WPD_CHARFORMAT* pCharFormat = bText ? &m_defTextCharFormat : &m_defCharFormat;
00248   // set the default character format -- the FALSE makes it the default
00249   GetRichEditCtrl().SetSel(0,-1);
00250   GetRichEditCtrl().SetDefaultCharFormat(*pCharFormat);
00251   GetRichEditCtrl().SetSelectionCharFormat(*pCharFormat);
00252
00253   GetRichEditCtrl().SetParaFormat(m_defParaFormat);
00254
00255   GetRichEditCtrl().SetSel(0,0);
00256   GetRichEditCtrl().EmptyUndoBuffer();
00257   GetRichEditCtrl().SetModify(FALSE);
00258   ASSERT_VALID(this);
00259 }
00260
00261 /////////////////////////////////////////////////////////////////////////////
00262 // CWordPadView drawing
00263
00264 /////////////////////////////////////////////////////////////////////////////
00265 // CWordPadView printing
00266
00267 void CWordPadView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
00268 {
00269   CRichEditView::OnPrint(pDC, pInfo);
00270   if (pInfo != NULL && pInfo->m_bPreview)
00271     DrawMargins(pDC);
00272 }
00273
00274 void CWordPadView::DrawMargins(CDC* pDC)
00275 {
00276   if (pDC->m_hAttribDC != NULL)
00277   {
00278     CRect rect;
00279     rect.left = m_rectMargin.left;
00280     rect.right = m_sizePaper.cx - m_rectMargin.right;
00281     rect.top = m_rectMargin.top;
00282     rect.bottom = m_sizePaper.cy - m_rectMargin.bottom;
00283     //rect in twips
00284     int logx = ::GetDeviceCaps(pDC->m_hDC, LOGPIXELSX);
00285     int logy = ::GetDeviceCaps(pDC->m_hDC, LOGPIXELSY);
00286     rect.left = MulDiv(rect.left, logx, 1440);
00287     rect.right = MulDiv(rect.right, logx, 1440);
00288     rect.top = MulDiv(rect.top, logy, 1440);
00289     rect.bottom = MulDiv(rect.bottom, logy, 1440);
00290     CPen pen(PS_DOT, 0, pDC->GetTextColor());
00291     CPen* ppen = pDC->SelectObject(&pen);
00292     pDC->MoveTo(0, rect.top);
00293     pDC->LineTo(10000, rect.top);
00294     pDC->MoveTo(rect.left, 0);
00295     pDC->LineTo(rect.left, 10000);
00296     pDC->MoveTo(0, rect.bottom);
00297     pDC->LineTo(10000, rect.bottom);
00298     pDC->MoveTo(rect.right, 0);
00299     pDC->LineTo(rect.right, 10000);
00300     pDC->SelectObject(ppen);
00301   }
00302 }
00303
00304 BOOL CWordPadView::OnPreparePrinting(CPrintInfo* pInfo)
00305 {
00306   return DoPreparePrinting(pInfo);
00307 }
00308
00309 /////////////////////////////////////////////////////////////////////////////
00310 // OLE Client support and commands
00311
00312 inline int roundleast(int n)
00313 {
00314   int mod = n%10;
00315   n -= mod;
00316   if (mod >= 5)
00317     n += 10;
00318   else if (mod <= -5)
00319     n -= 10;
00320   return n;
00321 }
00322
00323 static void RoundRect(LPRECT r1)
00324 {
00325   r1->left = roundleast(r1->left);
00326   r1->right = roundleast(r1->right);
00327   r1->top = roundleast(r1->top);
00328   r1->bottom = roundleast(r1->bottom);
00329 }
00330
00331 static void MulDivRect(LPRECT r1, LPRECT r2, int num, int div)
00332 {
00333   r1->left = MulDiv(r2->left, num, div);
00334   r1->top = MulDiv(r2->top, num, div);
00335   r1->right = MulDiv(r2->right, num, div);
00336   r1->bottom = MulDiv(r2->bottom, num, div);
00337 }
00338
00339 void CWordPadView::OnPageSetup()
00340 {
00341   CPageSetupDialog dlg;
00342   PAGESETUPDLG& psd = dlg.m_psd;
00343   BOOL bMetric = theApp.GetUnits() == 1; //centimeters
00344   psd.Flags |= PSD_MARGINS | (bMetric ? PSD_INHUNDREDTHSOFMILLIMETERS :
00345     PSD_INTHOUSANDTHSOFINCHES);
00346   int nUnitsPerInch = bMetric ? 2540 : 1000;
00347   MulDivRect(&psd.rtMargin, m_rectMargin, nUnitsPerInch, 1440);
00348   RoundRect(&psd.rtMargin);
00349   // get the current device from the app
00350   PRINTDLG pd;
00351   pd.hDevNames = NULL;
00352   pd.hDevMode = NULL;
00353   theApp.GetPrinterDeviceDefaults(&pd);
00354   psd.hDevNames = pd.hDevNames;
00355   psd.hDevMode = pd.hDevMode;
00356   if (dlg.DoModal() == IDOK)
00357   {
00358     RoundRect(&psd.rtMargin);
00359     MulDivRect(m_rectMargin, &psd.rtMargin, 1440, nUnitsPerInch);
00360     theApp.m_rectPageMargin = m_rectMargin;
00361     theApp.SelectPrinter(psd.hDevNames, psd.hDevMode);
00362     theApp.NotifyPrinterChanged();
00363   }
00364   // PageSetupDlg failed
00365   if (CommDlgExtendedError() != 0)
00366   {
00367     CPageSetupDlg dlgRetry;
00368     dlgRetry.m_nBottomMargin = m_rectMargin.bottom;
00369     dlgRetry.m_nLeftMargin = m_rectMargin.left;
00370     dlgRetry.m_nRightMargin = m_rectMargin.right;
00371     dlgRetry.m_nTopMargin = m_rectMargin.top;
00372     if (dlgRetry.DoModal() == IDOK)
00373     {
00374       m_rectMargin.SetRect(dlgRetry.m_nLeftMargin, dlgRetry.m_nTopMargin,
00375         dlgRetry.m_nRightMargin, dlgRetry.m_nBottomMargin);
00376       // m_page will be changed at this point
00377       theApp.m_rectPageMargin = m_rectMargin;
00378       theApp.NotifyPrinterChanged();
00379     }
00380   }
00381 }
00382
00383 /////////////////////////////////////////////////////////////////////////////
00384 // OLE Server support
00385
00386 // The following command handler provides the standard keyboard
00387 //  user interface to cancel an in-place editing session.  Here,
00388 //  the server (not the container) causes the deactivation.
00389 void CWordPadView::OnCancelEditSrvr()
00390 {
00391   GetDocument()->OnDeactivateUI(FALSE);
00392 }
00393
00394 /////////////////////////////////////////////////////////////////////////////
00395 // CWordPadView diagnostics
00396
00397 #ifdef _DEBUG
00398 void CWordPadView::AssertValid() const
00399 {
00400   CRichEditView::AssertValid();
00401 }
00402
00403 void CWordPadView::Dump(CDumpContext& dc) const
00404 {
00405   CRichEditView::Dump(dc);
00406 }
00407
00408 CWordPadDoc* CWordPadView::GetDocument() // non-debug version is inline
00409 {
00410   return (CWordPadDoc*)m_pDocument;
00411 }
00412 #endif //_DEBUG
00413
00414 /////////////////////////////////////////////////////////////////////////////
00415 // CWordPadView message helpers
00416
00417 /////////////////////////////////////////////////////////////////////////////
00418 // CWordPadView message handlers
00419
00420 int CWordPadView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00421 {
00422   if (CRichEditView::OnCreate(lpCreateStruct) == -1)
00423     return -1;
00424   theApp.m_listPrinterNotify.AddTail(m_hWnd);
00425
00426   if (theApp.m_bWordSel)
00427     GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_AUTOWORDSELECTION);
00428   else
00429     GetRichEditCtrl().SetOptions(ECOOP_AND, ~(DWORD)ECO_AUTOWORDSELECTION);
00430 //  GetRichEditCtrl().SetOptions(ECOOP_OR, ECO_SELECTIONBAR);
00431
00432   GetDefaultFont(m_defTextCharFormat, IDS_DEFAULTTEXTFONT);
00433   GetDefaultFont(m_defCharFormat, IDS_DEFAULTFONT);
00434
00435   GetRichEditCtrl().GetParaFormat(m_defParaFormat);
00436   m_defParaFormat.cTabCount = 0;
00437
00438   SetTextColor ((COLORREF) -1); // Automatic
00439   return 0;
00440 }
00441
00442 void CWordPadView::GetDefaultFont(CCharFormat& cf, UINT nFontNameID)
00443 {
00444   USES_CONVERSION;
00445   CString strDefFont;
00446   VERIFY(strDefFont.LoadString(nFontNameID));
00447   ASSERT(cf.cbSize == sizeof(WPD_CHARFORMAT));
00448   cf.dwMask = CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT|CFM_SIZE|
00449     CFM_COLOR|CFM_OFFSET|CFM_PROTECTED;
00450   cf.dwEffects = CFE_AUTOCOLOR;
00451   cf.yHeight = 200; //10pt
00452   cf.yOffset = 0;
00453   cf.crTextColor = RGB(0, 0, 0);
00454   cf.bCharSet = 0;
00455   cf.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
00456   ASSERT(strDefFont.GetLength() < LF_FACESIZE);
00457   lstrcpyn(cf.szFaceName, strDefFont, LF_FACESIZE);
00458   cf.dwMask |= CFM_FACE;
00459 }
00460
00461 void CWordPadView::OnInsertDateTime()
00462 {
00463   CDateDialog dlg;
00464   if (dlg.DoModal() == IDOK)
00465     GetRichEditCtrl().ReplaceSel(dlg.m_strSel);;
00466 }
00467
00468 void CWordPadView::OnFormatParagraph()
00469 {
00470   CFormatParaDlg dlg(GetParaFormatSelection());
00471   dlg.m_nWordWrap = m_nWordWrap;
00472   if (dlg.DoModal() == IDOK)
00473     SetParaFormat(dlg.m_pf);
00474 }
00475
00476 void CWordPadView::OnFormatTabs()
00477 {
00478   CFormatTabDlg dlg(GetParaFormatSelection());
00479   if (dlg.DoModal() == IDOK)
00480     SetParaFormat(dlg.m_pf);
00481 }
00482
00483 void CWordPadView::OnTextNotFound(LPCTSTR lpStr)
00484 {
00485   ASSERT_VALID(this);
00486   MessageBeep(0);
00487   AfxMessageBox(IDS_FINISHED_SEARCH,MB_OK|MB_ICONINFORMATION);
00488   CRichEditView::OnTextNotFound(lpStr);
00489 }
00490
00491 void CWordPadView::OnTimer(UINT_PTR nIDEvent)
00492 {
00493   if (m_uTimerID != nIDEvent) // not our timer
00494     CRichEditView::OnTimer(nIDEvent);
00495   else
00496   {
00497     KillTimer(m_uTimerID); // kill one-shot timer
00498     m_uTimerID = 0;
00499     if (m_bDelayUpdateItems)
00500       GetDocument()->UpdateAllItems(NULL);
00501     m_bDelayUpdateItems = FALSE;
00502
00503     // Update document colors:
00504     CFrameWndEx* pFrameEx = (CFrameWndEx*) GetTopLevelFrame ();
00505     CMFCColorBar* pColorBar = DYNAMIC_DOWNCAST (CMFCColorBar,
00506       pFrameEx->GetPane  (ID_COLOR_TEAROFF));
00507
00508     if (pColorBar != NULL)
00509     {
00510       CList<COLORREF,COLORREF> lstDocColors;
00511       GetDocumentColors (lstDocColors);
00512
00513       pColorBar->SetDocumentColors (_T("Document's Colors"), lstDocColors);
00514     }
00515   }
00516 }
00517
00518 void CWordPadView::OnEditChange()
00519 {
00520   SetUpdateTimer();
00521 }
00522
00523 void CWordPadView::OnDestroy()
00524 {
00525   POSITION pos = theApp.m_listPrinterNotify.Find(m_hWnd);
00526   ASSERT(pos != NULL);
00527   theApp.m_listPrinterNotify.RemoveAt(pos);
00528
00529   CRichEditView::OnDestroy();
00530
00531   if (m_uTimerID != 0) // if outstanding timer kill it
00532     OnTimer(m_uTimerID);
00533   ASSERT(m_uTimerID == 0);
00534 }
00535
00536 void CWordPadView::CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType)
00537 {
00538   CRichEditView::CalcWindowRect(lpClientRect, nAdjustType);
00539
00540   if (theApp.m_bWin4 && nAdjustType != 0 && (GetStyle() & WS_VSCROLL))
00541     lpClientRect->right--;
00542
00543   // if the ruler is visible then slide the view up under the ruler to avoid
00544   // showing the top border of the view
00545   if (GetExStyle() & WS_EX_CLIENTEDGE)
00546   {
00547     CFrameWndEx* pFrame = DYNAMIC_DOWNCAST (CFrameWndEx, GetParentFrame());
00548     if (pFrame != NULL)
00549     {
00550       CRulerBar* pBar = (CRulerBar*)pFrame->GetPane(ID_VIEW_RULER);
00551       if (pBar != NULL)
00552       {
00553         BOOL bVis = pBar->IsVisible();
00554         if (pBar->m_bDeferInProgress)
00555           bVis = !bVis;
00556         if (bVis)
00557           lpClientRect->top -= 2;
00558       }
00559     }
00560   }
00561 }
00562
00563 void CWordPadView::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMIS)
00564 {
00565   lpMIS->itemID = (UINT)(WORD)lpMIS->itemID;
00566   CRichEditView::OnMeasureItem(nIDCtl, lpMIS);
00567 }
00568
00569 void CWordPadView::OnPenBackspace()
00570 {
00571   SendMessage(WM_KEYDOWN, VK_BACK, 0);
00572   SendMessage(WM_KEYUP, VK_BACK, 0);
00573 }
00574
00575 void CWordPadView::OnPenNewline()
00576 {
00577   SendMessage(WM_CHAR, '\n', 0);
00578 }
00579
00580 void CWordPadView::OnPenPeriod()
00581 {
00582   SendMessage(WM_CHAR, '.', 0);
00583 }
00584
00585 void CWordPadView::OnPenSpace()
00586 {
00587   SendMessage(WM_CHAR, ' ', 0);
00588 }
00589
00590 void CWordPadView::OnPenTab()
00591 {
00592   SendMessage(WM_CHAR, VK_TAB, 0);
00593 }
00594
00595 void CWordPadView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00596 {
00597   if (nChar == VK_F10 && GetKeyState(VK_SHIFT) < 0)
00598   {
00599     long nStart, nEnd;
00600     GetRichEditCtrl().GetSel(nStart, nEnd);
00601     CPoint pt = GetRichEditCtrl().GetCharPos(nEnd);
00602     SendMessage(WM_CONTEXTMENU, (WPARAM)m_hWnd, MAKELPARAM(pt.x, pt.y));
00603   }
00604
00605   CRichEditView::OnKeyDown(nChar, nRepCnt, nFlags);
00606 }
00607
00608 HRESULT CWordPadView::GetClipboardData(CHARRANGE* lpchrg, DWORD /*reco*/,
00609   LPDATAOBJECT lpRichDataObj, LPDATAOBJECT* lplpdataobj)
00610 {
00611   CHARRANGE& cr = *lpchrg;
00612
00613   if ((cr.cpMax - cr.cpMin == 1) &&
00614     GetRichEditCtrl().GetSelectionType() == SEL_OBJECT)
00615   {
00616     return E_NOTIMPL;
00617   }
00618
00619   BeginWaitCursor();
00620   //create the data source
00621   COleDataSource* pDataSource = new COleDataSource;
00622
00623   // put the formats into the data source
00624   LPENUMFORMATETC lpEnumFormatEtc;
00625   lpRichDataObj->EnumFormatEtc(DATADIR_SET, &lpEnumFormatEtc);
00626   if (lpEnumFormatEtc != NULL)
00627   {
00628     FORMATETC etc;
00629     while (lpEnumFormatEtc->Next(1, &etc, NULL) == S_OK)
00630     {
00631       STGMEDIUM stgMedium;
00632       lpRichDataObj->GetData(&etc, &stgMedium);
00633       pDataSource->CacheData(etc.cfFormat, &stgMedium, &etc);
00634     }
00635     lpEnumFormatEtc->Release();
00636   }
00637
00638   CEmbeddedItem item(GetDocument(), cr.cpMin, cr.cpMax);
00639   item.m_lpRichDataObj = lpRichDataObj;
00640   // get wordpad formats
00641   item.GetClipboardData(pDataSource);
00642
00643   // get the IDataObject from the data source
00644   *lplpdataobj =  (LPDATAOBJECT)pDataSource->GetInterface(&IID_IDataObject);
00645
00646   EndWaitCursor();
00647   return S_OK;
00648 }
00649
00650 HRESULT CWordPadView::QueryAcceptData(LPDATAOBJECT lpdataobj,
00651   CLIPFORMAT* lpcfFormat, DWORD reco, BOOL bReally,
00652   HGLOBAL hMetaPict)
00653 {
00654   if (bReally && *lpcfFormat == 0 && (m_nPasteType == 0))
00655   {
00656     COleDataObject dataobj;
00657     dataobj.Attach(lpdataobj, FALSE);
00658     if (!dataobj.IsDataAvailable(cfRTO)) // native avail, let richedit do as it wants
00659     {
00660       if (dataobj.IsDataAvailable(cfEmbeddedObject))
00661       {
00662         if (PasteNative(lpdataobj))
00663           return S_FALSE;
00664       }
00665     }
00666   }
00667   return CRichEditView::QueryAcceptData(lpdataobj, lpcfFormat, reco, bReally,
00668     hMetaPict);
00669 }
00670
00671 BOOL CWordPadView::PasteNative(LPDATAOBJECT lpdataobj)
00672 {
00673   // check data object for wordpad object
00674   // if true, suck out RTF directly
00675   FORMATETC etc = {NULL, NULL, DVASPECT_CONTENT, -1, TYMED_ISTORAGE};
00676   etc.cfFormat = (CLIPFORMAT)cfEmbeddedObject;
00677   STGMEDIUM stgMedium = {TYMED_ISTORAGE, 0, NULL};
00678
00679   // create an IStorage to transfer the data in
00680   LPLOCKBYTES lpLockBytes;
00681   if (FAILED(::CreateILockBytesOnHGlobal(NULL, TRUE, &lpLockBytes)))
00682     return FALSE;
00683   ASSERT(lpLockBytes != NULL);
00684   if (lpLockBytes == NULL)
00685     return FALSE;
00686
00687   HRESULT hr = ::StgCreateDocfileOnILockBytes(lpLockBytes,
00688     STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE, 0, &stgMedium.pstg);
00689   lpLockBytes->Release(); //storage addref'd
00690   if (FAILED(hr))
00691     return FALSE;
00692
00693   ASSERT(stgMedium.pstg != NULL);
00694   CLSID clsid;
00695   BOOL bRes = FALSE; //let richedit do what it wants
00696   if (SUCCEEDED(lpdataobj->GetDataHere(&etc, &stgMedium)) &&
00697     SUCCEEDED(ReadClassStg(stgMedium.pstg, &clsid)) &&
00698     clsid == GetDocument()->GetClassID())
00699   {
00700     //suck out RTF now
00701     // open Contents stream
00702     COleStreamFile file;
00703     CFileException fe;
00704     if (file.OpenStream(stgMedium.pstg, szContents,
00705       CFile::modeReadWrite|CFile::shareExclusive, &fe))
00706     {
00707
00708       // load it with CArchive (loads from Contents stream)
00709       CArchive loadArchive(&file, CArchive::load |
00710         CArchive::bNoFlushOnDelete);
00711       Stream(loadArchive, TRUE); //stream in selection
00712       hr = S_FALSE; // don't let richedit do anything
00713     }
00714   }
00715   ::ReleaseStgMedium(&stgMedium);
00716   return bRes;
00717 }
00718
00719 // things to fix
00720 // if format==0 we are doing a straight EM_PASTE
00721 //  look for native formats
00722 //      richedit specific -- allow richedit to handle (these will be first)
00723 //      look for RTF, CF_TEXT.  If there paste special as these
00724 //  Do standard OLE scenario
00725
00726 // if pasting a particular format (format != 0)
00727 //  if richedit specific, allow through
00728 //  if RTF, CF_TEXT. paste special
00729 //  if OLE format, do standard OLE scenario
00730
00731
00732 void CWordPadView::OnFilePrint()
00733 {
00734   // don't allow winini changes to occur while printing
00735   m_bInPrint = TRUE;
00736   CRichEditView::OnFilePrint();
00737   // printer may have changed
00738   theApp.NotifyPrinterChanged(); // this will cause a GetDocument()->PrinterChanged();
00739   m_bInPrint = FALSE;
00740 }
00741
00742 int CWordPadView::OnMouseActivate(CWnd* pWnd, UINT nHitTest, UINT message)
00743 {
00744   if (m_bOnBar)
00745   {
00746     SetFocus();
00747     return MA_ACTIVATEANDEAT;
00748   }
00749   else
00750     return CRichEditView::OnMouseActivate(pWnd, nHitTest, message);
00751 }
00752
00753 #ifdef CORRECT_WRITING
00754 typedef BOOL (WINAPI *PCWPROC)(HWND, LPSTR, UINT, LPVOID, DWORD, DWORD);
00755 void CWordPadView::OnPenLens()
00756 {
00757   USES_CONVERSION;
00758   HINSTANCE hLib = LoadLibrary(_T("PENWIN32.DLL"));
00759   if (hLib == NULL)
00760     return;
00761   PCWPROC pCorrectWriting = (PCWPROC)GetProcAddress(hLib, "CorrectWriting");
00762   ASSERT(pCorrectWriting != NULL);
00763   if (pCorrectWriting != NULL)
00764   {
00765     CHARRANGE cr;
00766     GetRichEditCtrl().GetSel(cr);
00767     int nCnt = 2*(cr.cpMax-cr.cpMin);
00768     BOOL bSel = (nCnt != 0);
00769     nCnt = max(1024, nCnt);
00770     char* pBuf = new char[nCnt];
00771     pBuf[0] = NULL;
00772     if (bSel)
00773       GetRichEditCtrl().GetSelText(pBuf);
00774     if (pCorrectWriting(m_hWnd, pBuf, nCnt, 0, bSel ? 0 : CWR_INSERT, 0))
00775       GetRichEditCtrl().ReplaceSel(A2T(pBuf));
00776     delete [] pBuf;
00777   }
00778   FreeLibrary(hLib);
00779 }
00780 #endif
00781
00782 LONG CWordPadView::OnPrinterChangedMsg(UINT, LONG)
00783 {
00784   CDC dc;
00785   AfxGetApp()->CreatePrinterDC(dc);
00786   OnPrinterChanged(dc);
00787   return 0;
00788 }
00789
00790 static void ForwardPaletteChanged(HWND hWndParent, HWND hWndFocus)
00791 {
00792   // this is a quick and dirty hack to send the WM_QUERYNEWPALETTE to a window that is interested
00793   HWND hWnd = NULL;
00794   for (hWnd = ::GetWindow(hWndParent, GW_CHILD); hWnd != NULL; hWnd = ::GetWindow(hWnd, GW_HWNDNEXT))
00795   {
00796     if (hWnd != hWndFocus)
00797     {
00798       ::SendMessage(hWnd, WM_PALETTECHANGED, (WPARAM)hWndFocus, 0L);
00799       ForwardPaletteChanged(hWnd, hWndFocus);
00800     }
00801   }
00802 }
00803
00804 void CWordPadView::OnPaletteChanged(CWnd* pFocusWnd)
00805 {
00806   ForwardPaletteChanged(m_hWnd, pFocusWnd->GetSafeHwnd());
00807   // allow the richedit control to realize its palette
00808   // remove this if if richedit fixes their code so that
00809   // they don't realize their palette into foreground
00810   if (::GetWindow(m_hWnd, GW_CHILD) == NULL)
00811     CRichEditView::OnPaletteChanged(pFocusWnd);
00812 }
00813
00814 static BOOL FindQueryPalette(HWND hWndParent)
00815 {
00816   // this is a quick and dirty hack to send the WM_QUERYNEWPALETTE to a window that is interested
00817   HWND hWnd = NULL;
00818   for (hWnd = ::GetWindow(hWndParent, GW_CHILD); hWnd != NULL; hWnd = ::GetWindow(hWnd, GW_HWNDNEXT))
00819   {
00820     if (::SendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0L))
00821       return TRUE;
00822     else if (FindQueryPalette(hWnd))
00823       return TRUE;
00824   }
00825   return FALSE;
00826 }
00827
00828 BOOL CWordPadView::OnQueryNewPalette()
00829 {
00830   if(FindQueryPalette(m_hWnd))
00831     return TRUE;
00832   return CRichEditView::OnQueryNewPalette();
00833 }
00834
00835 void CWordPadView::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
00836 {
00837   CRichEditView::OnSettingChange(uFlags, lpszSection);
00838   //printer might have changed
00839   if (!m_bInPrint)
00840   {
00841     if (_tcsicmp(lpszSection, _T("windows")) == 0)
00842       theApp.NotifyPrinterChanged(TRUE); // force update to defaults
00843   }
00844 }
00845
00846 void CWordPadView::OnSize(UINT nType, int cx, int cy)
00847 {
00848   CRichEditView::OnSize(nType, cx, cy);
00849   CRect rect(HORZ_TEXTOFFSET, VERT_TEXTOFFSET, cx, cy);
00850   GetRichEditCtrl().SetRect(rect);
00851 }
00852
00853 void CWordPadView::OnBarSetFocus(UINT, NMHDR*, LRESULT*)
00854 {
00855   m_bOnBar = TRUE;
00856 }
00857
00858 void CWordPadView::OnBarKillFocus(UINT, NMHDR*, LRESULT*)
00859 {
00860   m_bOnBar = FALSE;
00861 }
00862
00863 void CWordPadView::OnBarReturn(UINT, NMHDR*, LRESULT* )
00864 {
00865   SetFocus();
00866 }
00867
00868 void CWordPadView::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
00869 {
00870   if (!ShowContextMenu (point))
00871   {
00872     Default ();
00873   }
00874 }
00875
00876 void CWordPadView::OnRButtonUp(UINT nFlags, CPoint point)
00877 {
00878   long nStartChar, nEndChar;
00879   GetRichEditCtrl().GetSel(nStartChar, nEndChar);
00880   if (nEndChar - nStartChar <= 1)
00881   {
00882     SendMessage (WM_LBUTTONDOWN, nFlags, MAKELPARAM (point.x, point.y));
00883     ReleaseCapture ();
00884   }
00885
00886   CPoint ptScreen = point;
00887   ClientToScreen (&ptScreen);
00888
00889   if (!ShowContextMenu (ptScreen))
00890   {
00891     Default ();
00892   }
00893 }
00894
00895 BOOL CWordPadView::ShowContextMenu (CPoint point)
00896 {
00897   if (DYNAMIC_DOWNCAST (CFrameWndEx, GetParentFrame ()) == NULL)
00898   {
00899     // Maybe, server mode, show the regular menu!
00900     return FALSE;
00901   }
00902
00903   CRichEditCntrItem* pItem = GetSelectedItem();
00904   if (pItem == NULL || !pItem->IsInPlaceActive())
00905   {
00906     theApp.ShowPopupMenu (IDR_TEXT_POPUP, point, this);
00907     return TRUE;
00908   }
00909
00910   return FALSE;
00911 }
00912
00913 void CWordPadView::SetTextColor (COLORREF color)
00914 {
00915   CRichEditView::OnColorPick (color == -1 ? ::GetSysColor (COLOR_WINDOWTEXT) : color);
00916 }
00917
00918 void CWordPadView::OnCharColor()
00919 {
00920   COLORREF color = CMFCColorMenuButton::GetColorByCmdID (ID_CHAR_COLOR);
00921   CRichEditView::OnColorPick (color == -1 ? ::GetSysColor (COLOR_WINDOWTEXT) : color);
00922 }
00923
00924 void CWordPadView::OnFilePrintPreview()
00925 {
00926   CRichEditCntrItem* pItem = GetSelectedItem();
00927   if (pItem != NULL && pItem->IsInPlaceActive())
00928   {
00929     pItem->Deactivate ();
00930   }
00931
00932   AFXPrintPreview (this);
00933 }
00934
00935 void CWordPadView::GetDocumentColors (CList<COLORREF,COLORREF>& lstColors)
00936 {
00937   CRichEditCtrl& wndRichEdit = GetRichEditCtrl();
00938
00939   // Save current selection:
00940   CHARRANGE cr;
00941   wndRichEdit.GetSel(cr);
00942
00943   wndRichEdit.HideSelection (TRUE, FALSE);
00944
00945   int nTextLen = min (500, wndRichEdit.GetTextLength ());
00946     // For demonstration purposes only!
00947
00948   for (long iSel = 0; iSel < nTextLen; iSel += 2)
00949   {
00950     wndRichEdit.SetSel (iSel, iSel);
00951     if (!(wndRichEdit.GetSelectionType() & (SEL_OBJECT|SEL_MULTIOBJECT)))
00952     {
00953       CCharFormat cf;
00954       wndRichEdit.GetSelectionCharFormat (cf);
00955
00956       COLORREF color = cf.crTextColor;
00957       if (lstColors.Find (color) == NULL)
00958       {
00959         lstColors.AddTail (color);
00960
00961         if (lstColors.GetCount () == 10)
00962         {
00963           break;
00964         }
00965       }
00966     }
00967   }
00968
00969   // Restore selection:
00970   wndRichEdit.SetSel (cr);
00971   wndRichEdit.HideSelection (FALSE, FALSE);
00972 }
00973
00974 void CWordPadView::OnFontname()
00975 {
00976   USES_CONVERSION;
00977
00978   CMFCToolBarFontComboBox* pSrcCombo =
00979     (CMFCToolBarFontComboBox*) CMFCToolBarComboBoxButton::GetByCmd (IDC_FONTNAME, TRUE);
00980   if (pSrcCombo == NULL)
00981   {
00982     CRichEditView::OnFormatFont ();
00983     return;
00984   }
00985
00986   CCharFormat cf;
00987   cf.szFaceName[0] = NULL;
00988   cf.dwMask = CFM_FACE | CFM_CHARSET;
00989
00990   const CMFCFontInfo* pDesc = pSrcCombo->GetFontDesc ();
00991   ASSERT_VALID (pDesc);
00992   ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);
00993
00994   lstrcpyn(cf.szFaceName, pDesc->m_strName, LF_FACESIZE);
00995
00996   cf.bCharSet = pDesc->m_nCharSet;
00997   cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;
00998
00999   CMFCToolBarFontSizeComboBox* pSizeCombo =
01000     DYNAMIC_DOWNCAST (CMFCToolBarFontSizeComboBox, CMFCToolBarFontSizeComboBox::GetByCmd (IDC_FONTSIZE));
01001   if (pSizeCombo != NULL)
01002   {
01003     int nSize = pSizeCombo->GetTwipSize();
01004     pSizeCombo->RebuildFontSizes (pDesc->m_strName);
01005     pSizeCombo->SetTwipSize (nSize);
01006   }
01007
01008   SetCharFormat (cf);
01009   SetFocus ();
01010 }
01011 //****************************************************************************************
01012 void CWordPadView::OnFontsize()
01013 {
01014   CMFCToolBarFontSizeComboBox* pSrcCombo =
01015     (CMFCToolBarFontSizeComboBox*) CMFCToolBarComboBoxButton::GetByCmd (IDC_FONTSIZE, TRUE);
01016   if (pSrcCombo == NULL)
01017   {
01018     CRichEditView::OnFormatFont ();
01019     return;
01020   }
01021
01022   int nSize = pSrcCombo->GetTwipSize();
01023   if (nSize == -2)
01024   {
01025     AfxMessageBox(IDS_INVALID_NUMBER, MB_OK|MB_ICONINFORMATION);
01026   }
01027   else if ((nSize >= 0 && nSize < 20) || nSize > 32760)
01028   {
01029     AfxMessageBox(IDS_INVALID_FONTSIZE, MB_OK|MB_ICONINFORMATION);
01030   }
01031   else if (nSize > 0)
01032   {
01033     CCharFormat cf;
01034     cf.dwMask = CFM_SIZE;
01035     cf.yHeight = nSize;
01036
01037     SetCharFormat (cf);
01038     SetFocus ();
01039   }
01040 }
01041 //*********************************************************************************
01042 void CWordPadView::OnBorderType (UINT id)
01043 {
01044   m_nBorderType = id;
01045
01046   MessageBox (_T("Add your code here..."));
01047 }
01048 //********************************************************************************
01049 void CWordPadView::OnUpdateBorderType (CCmdUI* pCmdUI)
01050 {
01051   pCmdUI->SetCheck (pCmdUI->m_nID == m_nBorderType);
01052 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/localize/localide.odl Source File

  • controls
  • localize

localide.odl

Go to the documentation of this file.
00001 // localide.odl : German type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the German type library for the Localize sample control
00005 // (localide.tlb).
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(879D6FE3-5470-101B-B57B-00608CC96AFA), version(1.0),
00019   helpstring("Localize OLE Custom Control module"), control,
00020   lcid(0x0407) ]
00021 library LocalizeLib
00022 {
00023   importlib(STDOLE_TLB);
00024   importlib(STDTYPE_TLB);
00025
00026   //  Primary dispatch interface for CLocalizeCtrl
00027
00028   [ uuid(035E3E52-6745-101B-B57B-00608CC96AFA),
00029     helpstring("Dispatch interface for Localize Control"), hidden ]
00030   dispinterface _DLocalize
00031   {
00032     properties:
00033       // NOTE - ClassWizard will maintain property information here.
00034       //    Use extreme caution when editing this section.
00035       //{{AFX_ODL_PROP(CLocalizeCtrl)
00036       [id(1)] boolean InvertInGerman;
00037       [id(DISPID_CAPTION), bindable, requestedit] BSTR CaptionInGerman;
00038       //}}AFX_ODL_PROP
00039
00040     methods:
00041       // NOTE - ClassWizard will maintain method information here.
00042       //    Use extreme caution when editing this section.
00043       //{{AFX_ODL_METHOD(CLocalizeCtrl)
00044       //}}AFX_ODL_METHOD
00045
00046       [id(DISPID_ABOUTBOX)] void AboutBoxInGerman();
00047   };
00048
00049   //  Event dispatch interface for CLocalizeCtrl
00050
00051   [ uuid(035E3E53-6745-101B-B57B-00608CC96AFA),
00052     helpstring("Event interface for Localize Control") ]
00053   dispinterface _DLocalizeEvents
00054   {
00055     properties:
00056       //  Event interface has no properties
00057
00058     methods:
00059       // NOTE - ClassWizard will maintain event information here.
00060       //    Use extreme caution when editing this section.
00061       //{{AFX_ODL_EVENT(CLocalizeCtrl)
00062       [id(DISPID_CLICK)] void ClickInGerman();
00063       //}}AFX_ODL_EVENT
00064   };
00065
00066   //  Class information for CLocalizeCtrl
00067
00068   [ uuid(879D6FE0-5470-101B-B57B-00608CC96AFA),
00069     helpstring("Localize Control (in German)"), control ]
00070   coclass Localize
00071   {
00072     [default] dispinterface _DLocalize;
00073     [default, source] dispinterface _DLocalizeEvents;
00074   };
00075
00076
00077   //{{AFX_APPEND_ODL}}
00078 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyDialogTemplate Member List

This is the complete list of members for CMyDialogTemplate, including all inherited members.
CMyDialogTemplate() | CMyDialogTemplate
DemoIt() | CMyDialogTemplate
m_dlgTempl | CMyDialogTemplate
m_rgDlgItem | CMyDialogTemplate
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/mainfrm.h Source File

  • advanced
  • mtrecalc

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CMainFrame : public CMDIFrameWnd
00013 {
00014   DECLARE_DYNAMIC(CMainFrame)
00015 public:
00016   CMainFrame();
00017
00018 // Attributes
00019 protected:
00020   int m_nPercentDone;
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generate virtual function overrides
00027   //{{AFX_VIRTUAL(CMainFrame)
00028   //}}AFX_VIRTUAL
00029
00030 // Implementation
00031 public:
00032   virtual ~CMainFrame();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:  // control bar embedded members
00039   CStatusBar  m_wndStatusBar;
00040   CToolBar    m_wndToolBar;
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CMainFrame)
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   //}}AFX_MSG
00047   afx_msg void OnUpdatePercentDone(CCmdUI* pCmdUI);
00048   LRESULT OnRecalcInProgress(WPARAM wParam, LPARAM lParam);
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDlgBanner Member List

This is the complete list of members for CDlgBanner, including all inherited members.
CDlgBanner() | CDlgBanner |
OnPaint() | CDlgBanner | [protected]
~CDlgBanner() | CDlgBanner | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TaskPane.h Source File

  • vc2008fp
  • TasksPane

TaskPane.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTaskPane : public CMFCTasksPane
00014 {
00015   friend class CTasksPaneView;
00016
00017 // Construction
00018 public:
00019   CTaskPane();
00020
00021 // Attributes
00022   int m_nUserColorGroup;
00023   int m_nUserColorTask;
00024
00025 protected:
00026   int m_nDocumentsGroup;
00027
00028   CFont   m_Font;
00029   CTreeCtrl m_wndTree;
00030   CEdit   m_wndEdit;
00031
00032 // Operations
00033 public:
00034   void UpdateMRUFilesList ();
00035   void UpdateToolbar ();
00036
00037 // Overrides
00038 public:
00039
00040 protected:
00041   BOOL CreateTreeControl();
00042   BOOL CreateEditControl();
00043
00044 // Implementation
00045 public:
00046   virtual ~CTaskPane();
00047
00048 protected:
00049   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00050
00051   DECLARE_MESSAGE_MAP()
00052 };
00053
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/aclikvw.h Source File

  • ole
  • autoclik

aclikvw.h

Go to the documentation of this file.
00001 // AClikVw.h : interface of the CAutoClickView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CAutoClickView : public CView
00014 {
00015 protected: // create from serialization only
00016   CAutoClickView();
00017   DECLARE_DYNCREATE(CAutoClickView)
00018
00019 // Attributes
00020 public:
00021   CAutoClickDoc* GetDocument();
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   // ClassWizard generated virtual function overrides
00028   //{{AFX_VIRTUAL(CAutoClickView)
00029   public:
00030   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00031   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00032   protected:
00033   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00034   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00035   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 public:
00040   virtual ~CAutoClickView();
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:
00047
00048 // Generated message map functions
00049 protected:
00050   //{{AFX_MSG(CAutoClickView)
00051   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00052   //}}AFX_MSG
00053   DECLARE_MESSAGE_MAP()
00054 };
00055
00056 #ifndef _DEBUG  // debug version in ClikView.cpp
00057 inline CAutoClickDoc* CAutoClickView::GetDocument()
00058    { return (CAutoClickDoc*)m_pDocument; }
00059 #endif
00060
00061 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/StdAfx.h Source File

  • vc2008fp
  • MDITabsDemo

StdAfx.h

Go to the documentation of this file.
00001 //
00002 // stdafx.h : include file for standard system include files,
00003 // or project specific include files that are used frequently,
00004 // but are changed infrequently
00005
00006 #pragma once
00007
00008 #ifndef _SECURE_ATL
00009 #define _SECURE_ATL 1
00010 #endif
00011
00012 #ifndef VC_EXTRALEAN
00013 #define VC_EXTRALEAN    // Exclude rarely-used stuff from Windows headers
00014 #endif
00015
00016 #include "targetver.h"
00017
00018 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // some CString constructors will be explicit
00019
00020 // turns off MFC's hiding of some common and often safely ignored warning messages
00021 #define _AFX_ALL_WARNINGS
00022
00023 #include <afxwin.h>         // MFC core and standard components
00024 #include <afxext.h>         // MFC extensions
00025
00026 #include <afxhtml.h>
00027 #include <afxdisp.h>        // MFC Automation classes
00028
00029
00030
00031 #ifndef _AFX_NO_OLE_SUPPORT
00032 #include <afxdtctl.h>   // MFC support for Internet Explorer 4 Common Controls
00033 #endif
00034 #ifndef _AFX_NO_AFXCMN_SUPPORT
00035 #include <afxcmn.h>     // MFC support for Windows Common Controls
00036 #endif // _AFX_NO_AFXCMN_SUPPORT
00037
00038 #include <afxcontrolbars.h> // MFC support for ribbon and control bars
00039
00040 #if defined _M_IX86
00041 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
00042 #elif defined _M_X64
00043 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
00044 #else
00045 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
00046 #endif
00047
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/OutlookMultiViewsView.h Source File

  • vc2008fp
  • OutlookMultiViews

OutlookMultiViewsView.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 class COutlookMultiViewsView : public CView
00004 {
00005 protected: // create from serialization only
00006   COutlookMultiViewsView();
00007   DECLARE_DYNCREATE(COutlookMultiViewsView)
00008
00009 // Attributes
00010 public:
00011   COutlookMultiViewsDoc* GetDocument();
00012
00013 // Operations
00014 public:
00015
00016 // Overrides
00017   public:
00018   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00019   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00020   protected:
00021   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00022   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00023   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00024
00025 // Implementation
00026 public:
00027   virtual ~COutlookMultiViewsView();
00028 #ifdef _DEBUG
00029   virtual void AssertValid() const;
00030   virtual void Dump(CDumpContext& dc) const;
00031 #endif
00032
00033 protected:
00034   afx_msg void OnContextMenu(CWnd*, CPoint point);
00035   afx_msg void OnFilePrintPreview();
00036
00037   DECLARE_MESSAGE_MAP()
00038 };
00039
00040 #ifndef _DEBUG  // debug version in OutlookMultiViewsView.cpp
00041 inline COutlookMultiViewsDoc* COutlookMultiViewsView::GetDocument()
00042    { return (COutlookMultiViewsDoc*)m_pDocument; }
00043 #endif
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

INVOKEKIND_ENTRY Member List

This is the complete list of members for INVOKEKIND_ENTRY, including all inherited members.
invokekind | INVOKEKIND_ENTRY
pszName | INVOKEKIND_ENTRY
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/Log.Cpp Source File

  • ole
  • TstCon

Log.Cpp

Go to the documentation of this file.
00001 // File: Log.Cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TestCon.H"
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019
00020 IMPLEMENT_DYNAMIC( CLog, CObject );
00021
00022 CLog::CLog()
00023 {
00024 }
00025
00026 CLog::~CLog()
00027 {
00028 }
00029
00030 CLog& CLog::operator<<( COleVariant& var )
00031 {
00032    COleVariant varString;
00033    CString str;
00034
00035    try
00036    {
00037     varString.ChangeType( VT_BSTR, var );
00038     str = varString.bstrVal;
00039    }
00040    catch( CException* pException )
00041    {
00042     str = _T( "??????" );
00043
00044    pException->Delete();
00045    }
00046
00047    (*this)<<str;
00048
00049    return( *this );
00050 }
00051
00052 CLog& CLog::operator<<( int n )
00053 {
00054    CString str;
00055
00056    str.Format( _T( "%d" ), n );
00057
00058    (*this)<<str;
00059
00060    return( *this );
00061 }
00062
00063
00064 IMPLEMENT_DYNAMIC( CNullLog, CLog );
00065
00066 CNullLog::CNullLog()
00067 {
00068 }
00069
00070 CNullLog::~CNullLog()
00071 {
00072 }
00073
00074 CLog& CNullLog::operator<<( LPCTSTR /* pszString */ )
00075 {
00076    return( *this );
00077 }
00078
00079
00080 IMPLEMENT_DYNAMIC( CDebugLog, CLog );
00081
00082 CDebugLog::CDebugLog() :
00083    m_tStartOfLine( TRUE )
00084 {
00085 }
00086
00087 CDebugLog::~CDebugLog()
00088 {
00089 }
00090
00091 CLog& CDebugLog::operator<<( LPCTSTR pszString )
00092 {
00093    CString strSpan;
00094    CString strString( pszString );
00095
00096    while( strString.GetLength() > 0 )
00097    {
00098     if( m_tStartOfLine )
00099     {
00100      OutputDebugString( _T( "TstCon Log: " ) );
00101      m_tStartOfLine = FALSE;
00102     }
00103     strSpan = strString.SpanExcluding( _T( "\n" ) );
00104     OutputDebugString( strSpan );
00105     if( strString.GetLength() == strSpan.GetLength() )
00106     {
00107      strString.Empty();
00108     }
00109     else
00110     {
00111      ASSERT( strString[strSpan.GetLength()] == _T( '\n' ) );
00112      OutputDebugString( _T( "\n" ) );
00113      m_tStartOfLine = TRUE;
00114      strString = strString.Mid( strSpan.GetLength()+1 );
00115     }
00116    }
00117
00118    return( *this );
00119 }
00120
00121
00122 IMPLEMENT_DYNAMIC( CFileLog, CLog );
00123
00124 CFileLog::CFileLog()
00125 {
00126 }
00127
00128 CFileLog::~CFileLog()
00129 {
00130 }
00131
00132 CLog& CFileLog::operator<<( LPCTSTR pszString )
00133 {
00134    m_file.WriteString( pszString );
00135
00136    return( *this );
00137 }
00138
00139 BOOL CFileLog::Create( LPCTSTR pszFileName )
00140 {
00141    BOOL tSuccess;
00142
00143    tSuccess = m_file.Open( pszFileName, CFile::modeCreate|CFile::modeWrite|
00144     CFile::shareExclusive|CFile::typeText );
00145    if( !tSuccess )
00146    {
00147     return( FALSE );
00148    }
00149
00150    return( TRUE );
00151 }
00152
00153 CString CFileLog::GetFileName() const
00154 {
00155    return( m_file.GetFileName() );
00156 }
00157
00158
00159 IMPLEMENT_DYNAMIC( COutputWindowLog, CLog );
00160
00161 COutputWindowLog::COutputWindowLog( CEdit* pEditBox ) :
00162    m_pEditBox( pEditBox )
00163 {
00164    ASSERT( m_pEditBox != NULL );
00165 }
00166
00167 COutputWindowLog::~COutputWindowLog()
00168 {
00169 }
00170
00171 CLog& COutputWindowLog::operator<<( LPCTSTR pszString )
00172 {
00173    int iLastChar;
00174    CString strSpan;
00175    CString strString( pszString );
00176
00177    while( strString.GetLength() > 0 )
00178    {
00179     strSpan = strString.SpanExcluding( _T( "\n" ) );
00180     iLastChar = m_pEditBox->GetWindowTextLength();
00181     m_pEditBox->SetSel( iLastChar, iLastChar );
00182     m_pEditBox->ReplaceSel( strSpan );
00183     if( strString.GetLength() == strSpan.GetLength() )
00184     {
00185      strString.Empty();
00186     }
00187     else
00188     {
00189      ASSERT( strString[strSpan.GetLength()] == _T( '\n' ) );
00190      iLastChar = m_pEditBox->GetWindowTextLength();
00191      m_pEditBox->SetSel( iLastChar, iLastChar );
00192      m_pEditBox->ReplaceSel( _T( "\r\n" ) );
00193      strString = strString.Mid( strSpan.GetLength()+1 );
00194     }
00195    }
00196
00197    return( *this );
00198 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropertiesDlg Member List

This is the complete list of members for CPropertiesDlg, including all inherited members.
CPropertiesDlg(CWnd *pParent=NULL) | CPropertiesDlg |
DoDataExchange(CDataExchange *pDX) | CPropertiesDlg | [protected, virtual]
IDD enum value | CPropertiesDlg |
m_dwFileAttributes | CPropertiesDlg |
m_nArchive | CPropertiesDlg |
m_nHidden | CPropertiesDlg |
m_nReadOnly | CPropertiesDlg |
m_nSystem | CPropertiesDlg |
m_strAccessTime | CPropertiesDlg |
m_strCreationTime | CPropertiesDlg |
m_strFileName | CPropertiesDlg |
m_strFileSize | CPropertiesDlg |
m_strModificationTime | CPropertiesDlg |
m_strType | CPropertiesDlg |
OnInitDialog() | CPropertiesDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/mfcieVw.h Source File

  • internet
  • MFCIE

mfcieVw.h

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // mfcieVw.h : interface of the CMfcieView class
00011 //
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 #if !defined(AFX_MFCIEVIEW_H__47FF4085_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
00015 #define AFX_MFCIEVIEW_H__47FF4085_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_
00016
00017 #if _MSC_VER >= 1000
00018 #pragma once
00019 #endif // _MSC_VER >= 1000
00020
00021 class CMfcieView : public CHtmlView
00022 {
00023 protected: // create from serialization only
00024   CMfcieView();
00025   DECLARE_DYNCREATE(CMfcieView)
00026
00027 // Attributes
00028 public:
00029   CMfcieDoc* GetDocument();
00030
00031 // Operations
00032 public:
00033
00034 // Overrides
00035   // ClassWizard generated virtual function overrides
00036   //{{AFX_VIRTUAL(CMfcieView)
00037   public:
00038   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00039   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00040   virtual void OnInitialUpdate();
00041   //}}AFX_VIRTUAL
00042   void OnTitleChange(LPCTSTR lpszText);
00043   void OnDocumentComplete(LPCTSTR lpszUrl);
00044   void OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags,
00045     LPCTSTR lpszTargetFrameName, CByteArray& baPostedData,
00046     LPCTSTR lpszHeaders, BOOL* pbCancel);
00047
00048 // Implementation
00049 public:
00050   virtual ~CMfcieView();
00051 #ifdef _DEBUG
00052   virtual void AssertValid() const;
00053   virtual void Dump(CDumpContext& dc) const;
00054 #endif
00055
00056 protected:
00057
00058 // Generated message map functions
00059 protected:
00060   //{{AFX_MSG(CMfcieView)
00061   afx_msg void OnGoBack();
00062   afx_msg void OnGoForward();
00063   afx_msg void OnGoSearchTheWeb();
00064   afx_msg void OnGoStartPage();
00065   afx_msg void OnViewStop();
00066   afx_msg void OnViewRefresh();
00067   afx_msg void OnHelpWebTutorial();
00068   afx_msg void OnHelpOnlineSupport();
00069   afx_msg void OnHelpMicrosoftOnTheWebFreeStuff();
00070   afx_msg void OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions();
00071   afx_msg void OnHelpMicrosoftOnTheWebGetFasterInternetAccess();
00072   afx_msg void OnHelpMicrosoftOnTheWebMicrosoftHomePage();
00073   afx_msg void OnHelpMicrosoftOnTheWebSearchTheWeb();
00074   afx_msg void OnHelpMicrosoftOnTheWebSendFeedback();
00075   afx_msg void OnHelpMicrosoftOnTheWebInternetStartPage();
00076   afx_msg void OnHelpMicrosoftOnTheWebBestOfTheWeb();
00077   afx_msg void OnViewFontsLargest();
00078   afx_msg void OnViewFontsLarge();
00079   afx_msg void OnViewFontsMedium();
00080   afx_msg void OnViewFontsSmall();
00081   afx_msg void OnViewFontsSmallest();
00082   afx_msg void OnFileOpen();
00083   //}}AFX_MSG
00084   DECLARE_MESSAGE_MAP()
00085 };
00086
00087 #ifndef _DEBUG  // debug version in mfcieView.cpp
00088 inline CMfcieDoc* CMfcieView::GetDocument()
00089    { return (CMfcieDoc*)m_pDocument; }
00090 #endif
00091
00092 /////////////////////////////////////////////////////////////////////////////
00093
00094 //{{AFX_INSERT_LOCATION}}
00095 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00096
00097 #endif // !defined(AFX_MFCIEVIEW_H__47FF4085_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinkButton.cpp Source File

  • vc2008fp
  • IEDemo

LinkButton.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013 #include "LinkButton.h"
00014
00015 #ifdef _DEBUG
00016 #undef THIS_FILE
00017 static char THIS_FILE[]=__FILE__;
00018 #define new DEBUG_NEW
00019 #endif
00020
00021 IMPLEMENT_SERIAL(CLinkButton, CMFCToolBarButton, 1)
00022
00023 //////////////////////////////////////////////////////////////////////
00024 // Construction/Destruction
00025 //////////////////////////////////////////////////////////////////////
00026
00027 CLinkButton::CLinkButton()
00028 {
00029   Initialize ();
00030 }
00031 //***************************************************************************************
00032 CLinkButton::CLinkButton(LPCTSTR lpszLabel, LPCTSTR lpszURL)
00033 {
00034   m_strURL = lpszURL;
00035   m_strText = lpszLabel;
00036
00037   Initialize ();
00038 }
00039 //***************************************************************************************
00040 CLinkButton::~CLinkButton()
00041 {
00042
00043 }
00044 //***************************************************************************************
00045 void CLinkButton::Initialize ()
00046 {
00047   m_nID = ID_LINK_1;
00048   SetImage (GetCmdMgr ()->GetCmdImage (ID_LINK_1));
00049   m_bImage = m_bText = TRUE;
00050 }
00051 //*********************************************************************************
00052 void CLinkButton::CopyFrom (const CMFCToolBarButton& src)
00053 {
00054   CMFCToolBarButton::CopyFrom (src);
00055
00056   const CLinkButton& srcLinkButton = (const CLinkButton&) src;
00057   m_strURL = srcLinkButton.m_strURL;
00058 }
00059 //***************************************************************************************
00060 void CLinkButton::Serialize (CArchive& ar)
00061 {
00062   CMFCToolBarButton::Serialize (ar);
00063
00064   if (ar.IsLoading ())
00065   {
00066     ar >> m_strURL;
00067   }
00068   else
00069   {
00070     ar << m_strURL;
00071   }
00072 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RollupPane/RollupPaneView.h Source File

  • vc2008fp
  • RollupPane

RollupPaneView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CRollupPaneView : public CView
00014 {
00015 protected: // create from serialization only
00016   CRollupPaneView();
00017   DECLARE_DYNCREATE(CRollupPaneView)
00018
00019 // Attributes
00020 public:
00021   CRollupPaneDoc* GetDocument() const;
00022
00023 // Operations
00024 public:
00025
00026 // Overrides
00027   public:
00028   virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00029 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030 protected:
00031   virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00032   virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00033   virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00034
00035 // Implementation
00036 public:
00037   virtual ~CRollupPaneView();
00038 #ifdef _DEBUG
00039   virtual void AssertValid() const;
00040   virtual void Dump(CDumpContext& dc) const;
00041 #endif
00042
00043 protected:
00044
00045 // Generated message map functions
00046 protected:
00047   afx_msg void OnFilePrintPreview();
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 #ifndef _DEBUG  // debug version in RollupPaneView.cpp
00052 inline CRollupPaneDoc* CRollupPaneView::GetDocument() const
00053    { return reinterpret_cast<CRollupPaneDoc*>(m_pDocument); }
00054 #endif
00055
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/CmnCtrl1/CmnCtrl1.h Source File

  • general
  • CmnCtrl1

CmnCtrl1.h

Go to the documentation of this file.
00001 // CmnCtrl1.h : main header file for the CMNCTRL1 application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #if !defined(AFX_CMNCTRL1_H__A14ECE83_E24D_11D0_8286_00C04FD73634__INCLUDED_)
00013 #define AFX_CMNCTRL1_H__A14ECE83_E24D_11D0_8286_00C04FD73634__INCLUDED_
00014
00015 #if _MSC_VER >= 1000
00016 #pragma once
00017 #endif // _MSC_VER >= 1000
00018
00019 #ifndef __AFXWIN_H__
00020   #error include 'stdafx.h' before including this file for PCH
00021 #endif
00022
00023 #include "resource.h"       // main symbols
00024
00025 #define TTT_BUF_SIZE  80  /* szText is a buffer of size 80 (from commctrl.h) */
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CCmnCtrl1App:
00029 // See CmnCtrl1.cpp for the implementation of this class
00030 //
00031 #define CELEMS(rgFoo) (sizeof(rgFoo) / sizeof(rgFoo[0]))
00032
00033 class CCmnCtrl1App : public CWinApp
00034 {
00035 public:
00036   CCmnCtrl1App();
00037
00038 // Overrides
00039   // ClassWizard generated virtual function overrides
00040   //{{AFX_VIRTUAL(CCmnCtrl1App)
00041   public:
00042   virtual BOOL InitInstance();
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046
00047   //{{AFX_MSG(CCmnCtrl1App)
00048   //}}AFX_MSG
00049   DECLARE_MESSAGE_MAP()
00050 };
00051
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054
00055 //{{AFX_INSERT_LOCATION}}
00056 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00057
00058 #endif // !defined(AFX_CMNCTRL1_H__A14ECE83_E24D_11D0_8286_00C04FD73634__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CIconComboBox Member List

This is the complete list of members for CIconComboBox, including all inherited members.
CIconComboBox(CMFCToolBarImages &Icons) | CIconComboBox |
CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct) | CIconComboBox | [virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CIconComboBox | [virtual]
m_Icons | CIconComboBox | [protected]
MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CIconComboBox | [virtual]
~CIconComboBox() | CIconComboBox | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COptionSheet Member List

This is the complete list of members for COptionSheet, including all inherited members.
CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
COptionSheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | COptionSheet |
COptionSheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | COptionSheet |
DoModal() | COptionSheet |
DoModal() | COptionSheet |
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertySheet | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSPropertySheet | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertySheet | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSPropertySheet | [protected]
pageEmbedded | COptionSheet |
pageRTF | COptionSheet |
pageText | COptionSheet |
pageWord | COptionSheet |
pageWrite | COptionSheet |
PreCreateWindow(CREATESTRUCT &cs) | CCSPropertySheet | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CCSPropertySheet | [protected, virtual]
SetPageButtons(CDocOptPage &page, CDockState &ds) | COptionSheet |
SetPageButtons(CDocOptPage &page, CDockState &ds) | COptionSheet |
SetState(CDocOptPage &page, CDockState &ds) | COptionSheet |
SetState(CDocOptPage &page, CDockState &ds) | COptionSheet |
units | COptionSheet |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rowlist.cpp Source File

  • general
  • rowlist

rowlist.cpp

Go to the documentation of this file.
00001 // RowList.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "RowList.h"
00014
00015 #include "MainFrm.h"
00016 #include "RListDoc.h"
00017
00018 #include "ListVwEx.h"   // base class for CRowListView
00019 #include "RListVw.h"
00020
00021 #ifdef _DEBUG
00022 #define new DEBUG_NEW
00023 #undef THIS_FILE
00024 static char THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 /////////////////////////////////////////////////////////////////////////////
00028 // CRowListApp
00029
00030 BEGIN_MESSAGE_MAP(CRowListApp, CWinApp)
00031   //{{AFX_MSG_MAP(CRowListApp)
00032   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00033     // NOTE - the ClassWizard will add and remove mapping macros here.
00034     //    DO NOT EDIT what you see in these blocks of generated code!
00035   //}}AFX_MSG_MAP
00036   // Standard file based document commands
00037   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00038   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00039 END_MESSAGE_MAP()
00040
00041 /////////////////////////////////////////////////////////////////////////////
00042 // CRowListApp construction
00043
00044 CRowListApp::CRowListApp()
00045 {
00046   // TODO: add construction code here,
00047   // Place all significant initialization in InitInstance
00048 }
00049
00050 /////////////////////////////////////////////////////////////////////////////
00051 // The one and only CRowListApp object
00052
00053 CRowListApp theApp;
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CRowListApp initialization
00057
00058 BOOL CRowListApp::InitInstance()
00059 {
00060   // Standard initialization
00061   // If you are not using these features and wish to reduce the size
00062   //  of your final executable, you should remove from the following
00063   //  the specific initialization routines you do not need.
00064
00065   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00066
00067   // Register the application's document templates.  Document templates
00068   //  serve as the connection between documents, frame windows and views.
00069
00070   CSingleDocTemplate* pDocTemplate;
00071   pDocTemplate = new CSingleDocTemplate(
00072     IDR_MAINFRAME,
00073     RUNTIME_CLASS(CRowListDoc),
00074     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00075     RUNTIME_CLASS(CRowListView));
00076   AddDocTemplate(pDocTemplate);
00077
00078   // Parse command line for standard shell commands, DDE, file open
00079   CCommandLineInfo cmdInfo;
00080   ParseCommandLine(cmdInfo);
00081
00082   // Dispatch commands specified on the command line
00083   if (!ProcessShellCommand(cmdInfo))
00084     return FALSE;
00085
00086   return TRUE;
00087 }
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CAboutDlg dialog used for App About
00091
00092 class CAboutDlg : public CDialog
00093 {
00094 public:
00095   CAboutDlg();
00096
00097 // Dialog Data
00098   //{{AFX_DATA(CAboutDlg)
00099   enum { IDD = IDD_ABOUTBOX };
00100   //}}AFX_DATA
00101
00102   // ClassWizard generated virtual function overrides
00103   //{{AFX_VIRTUAL(CAboutDlg)
00104   protected:
00105   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00106   //}}AFX_VIRTUAL
00107
00108 // Implementation
00109 protected:
00110   //{{AFX_MSG(CAboutDlg)
00111     // No message handlers
00112   //}}AFX_MSG
00113   DECLARE_MESSAGE_MAP()
00114 };
00115
00116 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00117 {
00118   //{{AFX_DATA_INIT(CAboutDlg)
00119   //}}AFX_DATA_INIT
00120 }
00121
00122 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00123 {
00124   CDialog::DoDataExchange(pDX);
00125   //{{AFX_DATA_MAP(CAboutDlg)
00126   //}}AFX_DATA_MAP
00127 }
00128
00129 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00130   //{{AFX_MSG_MAP(CAboutDlg)
00131     // No message handlers
00132   //}}AFX_MSG_MAP
00133 END_MESSAGE_MAP()
00134
00135 // App command to run the dialog
00136 void CRowListApp::OnAppAbout()
00137 {
00138   CAboutDlg aboutDlg;
00139   aboutDlg.DoModal();
00140 }
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CRowListApp commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBounceMDIChildWnd Member List

This is the complete list of members for CBounceMDIChildWnd, including all inherited members.
CBounceMDIChildWnd() | CBounceMDIChildWnd |
Create(LPCTSTR szTitle, LONG style=0, const RECT &rect=rectDefault, CMDIFrameWnd *pParent=NULL) | CBounceMDIChildWnd |
DestroyWindow() | CBounceMDIChildWnd | [virtual]
menu | CBounceMDIChildWnd | [protected, static]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CBounceMDIChildWnd | [protected, virtual]
OnPrepareToClose(WPARAM wParam=0, LPARAM lParam=0) | CBounceMDIChildWnd | [protected]
OnSize(UINT nType, int cx, int cy) | CBounceMDIChildWnd | [protected]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/resource.h Source File

  • general
  • npp

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by npp.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDW_COMBO                       103
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_NPTYPE                      129
00009 #define IDD_GOTO                        130
00010 #define IDD_FIND                        131
00011 #define IDC_GOTO_LINE                   1000
00012 #define ID_EDIT_FIND_NEXT               1001
00013 #define IDC_COMBO1                      1002
00014 #define IDC_RADIO1                      1003
00015 #define IDC_RADIO2                      1004
00016 #define IDC_CHECK1                      1005
00017 #define ID_EDIT_GOTO                    2000
00018 #define ID_VIEW_FIND_NEXT               2001
00019 #define ID_EDIT_FIND_COMBO              2002
00020 #define ID_EDIT_WORDWRAP                2003
00021 #define ID_INDICATOR_LINE               2004
00022 #define ID_INDICATOR_CLOCK              2005
00023 #define NPERROR_INVALID_LINENUM         2006
00024 #define NPERROR_NUM_TOO_BIG             2007
00025
00026 // Next default values for new objects
00027 //
00028 #ifdef APSTUDIO_INVOKED
00029 #ifndef APSTUDIO_READONLY_SYMBOLS
00030 #define _APS_3D_CONTROLS                     1
00031 #define _APS_NEXT_RESOURCE_VALUE        132
00032 #define _APS_NEXT_COMMAND_VALUE         2000
00033 #define _APS_NEXT_CONTROL_VALUE         1006
00034 #define _APS_NEXT_SYMED_VALUE           104
00035 #endif
00036 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSetTabStops Member List

This is the complete list of members for CSetTabStops, including all inherited members.
CSetTabStops(CWnd *pParent=NULL) | CSetTabStops |
DoDataExchange(CDataExchange *pDX) | CSetTabStops | [protected, virtual]
IDD enum value | CSetTabStops |
m_nTabStops | CSetTabStops |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/stdafx.cpp Source File

  • ole
  • mfccalc

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/MFCIE/StdAfx.cpp Source File

  • internet
  • MFCIE

StdAfx.cpp

Go to the documentation of this file.
00001 // This is part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // stdafx.cpp : source file that includes just the standard includes
00011 //  mfcie.pch will be the pre-compiled header
00012 //  stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/resource.h Source File

  • vc2008fp
  • ToolTipDemo

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by TooltipDemo.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDD_TOOLTIPDEMO_FORM            101
00008 #define IDS_WRONG_DISPLAY_SETTINGS      102
00009 #define IDR_MAINFRAME                   128
00010 #define IDR_TOOLTITYPE                  129
00011 #define IDR_CONTEXT_MENU                130
00012 #define IDR_POPUP_TOOLBAR               131
00013 #define IDB_TOOLBAR256                  151
00014 #define IDI_ICON1                       154
00015 #define IDC_COMPANY_URL                 1041
00016 #define IDC_TT_TYPE                     1042
00017 #define IDC_TT_TYPE2                    1043
00018 #define IDC_DRAW_ICON                   1044
00019 #define IDC_DRAW_DESCR                  1045
00020 #define IDC_ROUNDED_CORNERS             1046
00021 #define IDC_BOLD_LABEL                  1047
00022 #define IDC_CUSTOM_COLORS               1048
00023 #define IDC_TT_TYPE3                    1049
00024 #define IDC_DRAW_SEPARATOR              1050
00025 #define IDC_SHOW_TOOLTIPS_IN_MENU       1051
00026 #define IDC_TT_TYPE4                    1052
00027 #define IDC_NO_BALLOON                  1053
00028 #define IDC_TT_TYPE5                    1054
00029 #define ID_VIEW_CUSTOMIZE               32770
00030 #define ID_VIEW_TOOLBARS                32771
00031 #define ID_VIEW_USER_TOOLBAR1           32793
00032 #define ID_VIEW_USER_TOOLBAR2           32794
00033 #define ID_VIEW_USER_TOOLBAR3           32795
00034 #define ID_VIEW_USER_TOOLBAR4           32796
00035 #define ID_VIEW_USER_TOOLBAR5           32797
00036 #define ID_VIEW_USER_TOOLBAR6           32798
00037 #define ID_VIEW_USER_TOOLBAR7           32799
00038 #define ID_VIEW_USER_TOOLBAR8           32800
00039 #define ID_VIEW_USER_TOOLBAR9           32801
00040 #define ID_VIEW_USER_TOOLBAR10          32802
00041 #define ID_VIEW_APPLOOK_2000            32833
00042 #define ID_VIEW_APPLOOK_XP              32834
00043 #define ID_VIEW_APPLOOK_2003            32835
00044 #define ID_VIEW_APPLOOK_WIN_XP          32836
00045 #define ID_VIEW_APPLOOK_VS2005          32837
00046 #define ID_VIEW_APPLOOK_2007_1          32838
00047 #define ID_VIEW_APPLOOK_2007_2          32839
00048 #define ID_VIEW_APPLOOK_2007_3          32840
00049 #define ID_VIEW_APPLOOK_2007_4          32841
00050
00051 // Next default values for new objects
00052 //
00053 #ifdef APSTUDIO_INVOKED
00054 #ifndef APSTUDIO_READONLY_SYMBOLS
00055 #define _APS_3D_CONTROLS                     1
00056 #define _APS_NEXT_RESOURCE_VALUE        155
00057 #define _APS_NEXT_COMMAND_VALUE         32843
00058 #define _APS_NEXT_CONTROL_VALUE         1054
00059 #define _APS_NEXT_SYMED_VALUE           108
00060 #endif
00061 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RibbonGadgets/RibbonGadgetsView.cpp Source File

  • vc2008fp
  • RibbonGadgets

RibbonGadgetsView.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "RibbonGadgets.h"
00014
00015 #include "RibbonGadgetsDoc.h"
00016 #include "RibbonGadgetsView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 static const CString strInfo =
00025   _T("This sample illustrates how to create the various Ribbon elements.\r\n")
00026   _T("\"Source Code\" window contains source code for the current ribbon category (tab).\r\n")
00027   _T("Please select a specific tab on the bottom to see the panel source code.\r\n")
00028   _T("You may copy this code into the clipboard, print it or save it in an external file.");
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CRibbonGadgetsView
00032
00033 IMPLEMENT_DYNCREATE(CRibbonGadgetsView, CView)
00034
00035 BEGIN_MESSAGE_MAP(CRibbonGadgetsView, CView)
00036   ON_WM_DESTROY()
00037   ON_WM_CREATE()
00038   ON_WM_CONTEXTMENU()
00039   // Standard printing commands
00040   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00041   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00042   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00043 END_MESSAGE_MAP()
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CRibbonGadgetsView construction/destruction
00047
00048 CRibbonGadgetsView::CRibbonGadgetsView()
00049 {
00050
00051 }
00052
00053 CRibbonGadgetsView::~CRibbonGadgetsView()
00054 {
00055 }
00056
00057 BOOL CRibbonGadgetsView::PreCreateWindow(CREATESTRUCT& cs)
00058 {
00059   // TODO: Modify the Window class or styles here by modifying
00060   //  the CREATESTRUCT cs
00061
00062   return CView::PreCreateWindow(cs);
00063 }
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CRibbonGadgetsView printing
00067
00068 void CRibbonGadgetsView::OnFilePrintPreview()
00069 {
00070   AFXPrintPreview (this);
00071 }
00072
00073 BOOL CRibbonGadgetsView::OnPreparePrinting(CPrintInfo* pInfo)
00074 {
00075   // default preparation
00076   return DoPreparePrinting(pInfo);
00077 }
00078
00079
00080 void CRibbonGadgetsView::OnDestroy()
00081 {
00082    CView::OnDestroy();
00083 }
00084
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CRibbonGadgetsView diagnostics
00088
00089 #ifdef _DEBUG
00090 void CRibbonGadgetsView::AssertValid() const
00091 {
00092   CView::AssertValid();
00093 }
00094
00095 void CRibbonGadgetsView::Dump(CDumpContext& dc) const
00096 {
00097   CView::Dump(dc);
00098 }
00099
00100 CRibbonGadgetsDoc* CRibbonGadgetsView::GetDocument() // non-debug version is inline
00101 {
00102   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRibbonGadgetsDoc)));
00103   return (CRibbonGadgetsDoc*)m_pDocument;
00104 }
00105 #endif //_DEBUG
00106
00107 /////////////////////////////////////////////////////////////////////////////
00108 // CRibbonGadgetsView message handlers
00109
00110 int CRibbonGadgetsView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00111 {
00112   if (CView::OnCreate(lpCreateStruct) == -1)
00113     return -1;
00114
00115   return 0;
00116 }
00117
00118 HMENU CRibbonGadgetsView::GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE* )
00119 {
00120   return NULL;
00121 }
00122
00123 void CRibbonGadgetsView::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
00124 {
00125   theApp.ShowPopupMenu (IDR_EDIT_MENU, point, this);
00126 }
00127
00128 void CRibbonGadgetsView::OnDraw(CDC* pDC)
00129 {
00130   const int iOffset = 20;
00131
00132   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00133   ASSERT (pFontOld != NULL);
00134
00135   CRect rectClient;
00136   GetClientRect (&rectClient);
00137
00138   CRect rectText = rectClient;
00139   rectText.DeflateRect (iOffset, iOffset);
00140   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00141
00142   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00143               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00144
00145   CRect rectFrame = rectText;
00146   rectFrame.InflateRect (iOffset, iOffset);
00147
00148   pDC->FillSolidRect (rectFrame, ::GetSysColor (COLOR_INFOBK));
00149
00150   rectFrame.DeflateRect (1, 1);
00151   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00152           ::GetSysColor (COLOR_3DLIGHT));
00153
00154   rectFrame.DeflateRect (2, 2);
00155   pDC->Draw3dRect (rectFrame, ::GetSysColor (COLOR_3DSHADOW),
00156           ::GetSysColor (COLOR_3DLIGHT));
00157
00158   pDC->SetTextColor (::GetSysColor (COLOR_INFOTEXT));
00159   pDC->SetBkMode (TRANSPARENT);
00160
00161   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00162
00163   pDC->SelectObject (pFontOld);
00164 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyListBox Member List

This is the complete list of members for CMyListBox, including all inherited members.
OnCommandHelp(WPARAM, LPARAM lParam) CMyListBox [protected]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/autoclik/resource.h Source File

  • ole
  • autoclik

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by AutoClik.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDP_OLE_INIT_FAILED             100
00007 #define IDR_MAINFRAME                   128
00008 #define IDR_ACLICKTYPE                  129
00009 #define IDD_CHANGE_TEXT                 130
00010 #define IDC_EDIT1                       1000
00011 #define ID_EDIT_CHANGETEXT              32771
00012
00013 // Next default values for new objects
00014 //
00015 #ifdef APSTUDIO_INVOKED
00016 #ifndef APSTUDIO_READONLY_SYMBOLS
00017 #define _APS_3D_CONTROLS                     1
00018 #define _APS_NEXT_RESOURCE_VALUE        131
00019 #define _APS_NEXT_COMMAND_VALUE         32772
00020 #define _APS_NEXT_CONTROL_VALUE         1001
00021 #define _APS_NEXT_SYMED_VALUE           101
00022 #endif
00023 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/paditem.cpp Source File

  • ole
  • superpad

paditem.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "padview.h"
00012 #include "paddoc.h"
00013 #include "paditem.h"
00014 #include <limits.h>
00015 #include <winnls.h>
00016
00017 IMPLEMENT_DYNAMIC(CEmbeddedItem, COleServerItem)
00018
00019 CEmbeddedItem::CEmbeddedItem(CPadDoc* pContainerDoc)
00020   : COleServerItem(pContainerDoc, TRUE)
00021 {
00022   m_nBeg = 0;
00023   m_nEnd = UINT_MAX;
00024
00025   // support CF_TEXT format
00026   GetDataSource()->DelayRenderFileData(CF_TEXT);
00027 }
00028
00029 BOOL CEmbeddedItem::OnRenderFileData(LPFORMATETC lpFormatEtc, CFile* pFile)
00030 {
00031   ENSURE(lpFormatEtc != NULL);
00032   if (lpFormatEtc->cfFormat != CF_TEXT)
00033     return COleServerItem::OnRenderFileData(lpFormatEtc, pFile);
00034
00035   BOOL bResult = FALSE;
00036   TRY
00037   {
00038     // save contents of this item to the file
00039     SaveToFile(pFile);
00040
00041     // CF_TEXT has NUL termination
00042     char chZero = '\0';
00043     pFile->Write(&chZero, sizeof(char));
00044
00045     bResult = TRUE; // success
00046   }
00047   END_TRY
00048
00049   return bResult;
00050 }
00051
00052 CPadView* CEmbeddedItem::GetView() const
00053 {
00054   CDocument* pDoc = GetDocument();
00055   ASSERT_VALID(pDoc);
00056   POSITION pos = pDoc->GetFirstViewPosition();
00057   if (pos == NULL)
00058     return NULL;
00059
00060   CPadView* pView = (CPadView*)pDoc->GetNextView(pos);
00061   ASSERT_VALID(pView);
00062   ASSERT_KINDOF(CPadView, pView);
00063   return pView;
00064 }
00065
00066 void CEmbeddedItem::SaveToFile(CFile* pFile)
00067 {
00068   CPadView* pView = GetView();
00069   LPCTSTR lpszText = NULL;
00070
00071   TRY
00072   {
00073     // get access to the edit buffer
00074     lpszText = pView->LockBuffer();
00075
00076     // get range (make sure inside of text length)
00077     UINT nEnd = pView->GetWindowTextLength();
00078     UINT nBeg = min(m_nBeg, nEnd);
00079     nEnd = min(m_nEnd, nEnd);
00080 #ifdef _UNICODE
00081     // copy to temp buffer, convert, then write to file
00082     int nLen = WideCharToMultiByte(CP_ACP, 0, lpszText+nBeg, nEnd-nBeg,
00083       NULL, 0, NULL, NULL);
00084     char* pszTemp = new char[nLen];
00085     WideCharToMultiByte(CP_ACP, 0, lpszText+nBeg, nEnd-nBeg,
00086       pszTemp, nLen, NULL, NULL);
00087     pFile->Write(pszTemp, nLen);
00088     delete[] pszTemp;
00089 #else
00090     // write it out to the file
00091     pFile->Write(lpszText+nBeg, (nEnd-nBeg) * sizeof(char));
00092 #endif
00093   }
00094   END_TRY
00095
00096   // release access to edit buffer
00097   if (lpszText != NULL)
00098     pView->UnlockBuffer();
00099 }
00100
00101 void CEmbeddedItem::Serialize(CArchive& ar)
00102 {
00103   if (ar.IsStoring())
00104   {
00105     // save just the portion this item refers to
00106     ar.Flush();
00107     CFile* pFile = ar.GetFile();
00108     SaveToFile(pFile);
00109   }
00110   else
00111   {
00112     // otherwise, read in the entire file
00113     GetDocument()->Serialize(ar);
00114   }
00115 }
00116
00117 BOOL CEmbeddedItem::OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize)
00118 {
00119   if (dwDrawAspect != DVASPECT_CONTENT)
00120     return COleServerItem::OnGetExtent(dwDrawAspect, rSize);
00121
00122   // no drawing will happen if cliprect is NULL
00123   CClientDC dc(NULL);
00124   dc.IntersectClipRect(0, 0, 0, 0);
00125   return OnDraw(&dc, rSize);
00126 }
00127
00128 BOOL CEmbeddedItem::OnDraw(CDC* pDC, CSize& rSize)
00129 {
00130   // get view attached to the item
00131   CPadView* pView = GetView();
00132
00133   // In some situations, OLE1 servers will ask for the presentation data
00134   //  during shutdown, even though it is not necessary (since the picture
00135   //  has not changed).  This will happen when closing a frame window
00136   //  for example.  By this time all the views are gone and there is no
00137   //  way to produce the metafile data, since the actual text is
00138   //  stored by the edit control (the view).  In this case, we simply
00139   //  fail the call.
00140   if (pView == NULL)
00141     return FALSE;
00142
00143   // edit controls have a border around them
00144   CRect rectClient;
00145   CRect margin;
00146
00147   { // Calculate correct ClientRect
00148     pView->GetClientRect(&rectClient);
00149     rectClient.InflateRect(-1,-1);
00150
00151     if (pView->GetStyle() & WS_HSCROLL)
00152       rectClient.bottom++;
00153     if (pView->GetStyle() & WS_VSCROLL)
00154       rectClient.right++;
00155   }
00156
00157   { // Calculate margins
00158     CRect rectEdit;
00159     pView->GetEditCtrl().GetRect(&rectEdit);
00160
00161     if (rectEdit.IsRectEmpty())
00162       rectEdit.SetRect(4,4,4,4);
00163
00164     int HorzMargin = rectEdit.left - rectClient.left;
00165     int VertMargin = rectEdit.top - rectClient.top;
00166
00167     margin.SetRect(HorzMargin,VertMargin,HorzMargin,VertMargin);
00168
00169     if (pView->GetStyle() & WS_HSCROLL)
00170       margin.bottom++;
00171     if (pView->GetStyle() & WS_VSCROLL)
00172       margin.right++;
00173   }
00174
00175   // get the font from the CEditView
00176   CFont* pFont = pView->GetFont();
00177   CFont* pOldFont = NULL;
00178   if (pFont != NULL)
00179     pOldFont = pDC->SelectObject(pFont);
00180
00181   // get formatting rectangle
00182   CRect rect(rectClient);
00183   rect.left += margin.left;
00184   rect.top += margin.top;
00185   rect.right -= margin.right;
00186   rect.bottom = INT_MAX;
00187
00188   pDC->SetBkMode(TRANSPARENT);
00189
00190   // first just determine the correct extents of the text
00191   pDC->SaveDC();
00192   pDC->IntersectClipRect(0, 0, 0, 0); // no drawing with NULL clipping
00193   if (pView->PrintInsideRect(pDC, rect, m_nBeg, m_nEnd) == 0)
00194   {
00195     TEXTMETRIC tm;
00196     pDC->GetTextMetrics(&tm);
00197     rect.bottom = rect.top + tm.tmHeight + tm.tmExternalLeading;
00198   }
00199   pDC->RestoreDC(-1);
00200
00201   // then, really output the text
00202   pDC->SetWindowOrg(rect.left-margin.left,rect.top-margin.top);
00203   pDC->SetWindowExt(margin.left + rect.Width() + margin.right,
00204     margin.top + rect.Height() + margin.bottom);
00205   pView->PrintInsideRect(pDC, rect, m_nBeg, m_nEnd);
00206
00207   // adjust for border (rect.left is already adjusted)
00208   rect.left -= margin.left;
00209   rect.top -= margin.top;
00210   rect.right += margin.right;
00211   rect.bottom += margin.bottom;
00212
00213   // select previous font
00214   if (pOldFont != NULL)
00215     pDC->SelectObject(pOldFont);
00216
00217   // return HIMETRIC size
00218   rSize = rect.Size();
00219   pDC->LPtoHIMETRIC(&rSize);
00220   return TRUE;
00221 }
00222
00223 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/stdafx.cpp Source File

  • vc2008fp
  • IEDemo

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // IEDemo.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyCustomizationPage Member List

This is the complete list of members for CMyCustomizationPage, including all inherited members.
CMyCustomizationPage(CWnd *pParent=NULL) | CMyCustomizationPage |
DoDataExchange(CDataExchange *pDX) | CMyCustomizationPage | [protected, virtual]
IDD enum value | CMyCustomizationPage |
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/StdAfx.cpp Source File

  • ole
  • TstCon
  • TCProps

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  stdafx.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/docktool/searchbx.h Source File

  • general
  • docktool

searchbx.h

Go to the documentation of this file.
00001 // searchbx.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CSearchBox window
00014
00015 class CSearchBox : public CComboBox
00016 {
00017 // Construction
00018 public:
00019   CSearchBox();
00020
00021 // Attributes
00022 public:
00023
00024 // Operations
00025 public:
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CSearchBox)
00030   public:
00031   virtual BOOL PreTranslateMessage(MSG* pMsg);
00032   //}}AFX_VIRTUAL
00033
00034 // Implementation
00035 public:
00036   virtual ~CSearchBox();
00037
00038   // Generated message map functions
00039 protected:
00040   //{{AFX_MSG(CSearchBox)
00041     // NOTE - the ClassWizard will add and remove member functions here.
00042   //}}AFX_MSG
00043
00044   DECLARE_MESSAGE_MAP()
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatpa.h Source File

  • vc2008fp
  • WordPad

formatpa.h

Go to the documentation of this file.
00001 //
00002 // formatpa.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CFormatParaDlg dialog
00016
00017 class CFormatParaDlg : public CCSDialog
00018 {
00019 // Construction
00020 public:
00021   CFormatParaDlg(WPD_PARAFORMAT& pf, CWnd* pParent = NULL);   // standard constructor
00022   WPD_PARAFORMAT m_pf;
00023
00024 // Attributes
00025   int m_nWordWrap;
00026
00027 // Dialog Data
00028   //{{AFX_DATA(CFormatParaDlg)
00029   enum { IDD = IDD_FORMAT_PARA };
00030   int     m_nAlignment;
00031   int     m_nFirst;
00032   int     m_nLeft;
00033   int     m_nRight;
00034   //}}AFX_DATA
00035
00036 // Implementation
00037 protected:
00038   static const DWORD m_nHelpIDs[];
00039   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   virtual void OnOK();
00042
00043   // Generated message map functions
00044   //{{AFX_MSG(CFormatParaDlg)
00045   virtual BOOL OnInitDialog();
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/time/stdafx.h Source File

  • controls
  • time

stdafx.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.h : include file for standard system include files,
00011 //      or project specific include files that are used frequently,
00012 //      but are changed infrequently
00013
00014 #include <afxctl.h>         // MFC support for OLE Custom Controls
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/pageset.h Source File

  • vc2008fp
  • WordPad

pageset.h

Go to the documentation of this file.
00001 //
00002 // pageset.h : header file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CPageSetupDlg dialog
00016
00017 class CPageSetupDlg : public CCSDialog
00018 {
00019 // Construction
00020 public:
00021   CPageSetupDlg(CWnd* pParent = NULL);    // standard constructor
00022
00023 // Dialog Data
00024   //{{AFX_DATA(CPageSetupDlg)
00025   enum { IDD = IDD_PAGE_SETUP_DIALOG };
00026   int     m_nTopMargin;
00027   int     m_nRightMargin;
00028   int     m_nLeftMargin;
00029   int     m_nBottomMargin;
00030   //}}AFX_DATA
00031
00032 // Implementation
00033   static const DWORD m_nHelpIDs[];
00034   virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;}
00035 protected:
00036   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00037
00038   // Generated message map functions
00039   //{{AFX_MSG(CPageSetupDlg)
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpindialLib::_DSpindialEvents Member List

This is the complete list of members for SpindialLib::_DSpindialEvents, including all inherited members.
SpinPositive() SpindialLib::_DSpindialEvents
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/DBVList/DBVListSet.cpp Source File

  • general
  • DBVList

DBVListSet.cpp

Go to the documentation of this file.
00001 // DBVListSet.cpp : implementation of the CDBVListSet class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "DBVList.h"
00014 #include "DBVListSet.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDBVListSet implementation
00024
00025 IMPLEMENT_DYNAMIC(CDBVListSet, CDaoRecordset)
00026
00027 CDBVListSet::CDBVListSet(CDaoDatabase* pdb)
00028   : CDaoRecordset(pdb)
00029 {
00030   //{{AFX_FIELD_INIT(CDBVListSet)
00031   m_Email = _T("");
00032   m_Name = _T("");
00033   m_Phone = _T("");
00034   m_Location = _T("");
00035   m_Title = _T("");
00036   m_Department = _T("");
00037   m_Division = _T("");
00038   m_nFields = 7;
00039   //}}AFX_FIELD_INIT
00040   m_nDefaultType = dbOpenDynaset;
00041 }
00042
00043 CString CDBVListSet::GetDefaultDBName()
00044 {
00045   return _T("employee.mdb");
00046 }
00047
00048
00049 CString CDBVListSet::GetDefaultSQL()
00050 {
00051   return _T("[Employee8]");
00052 }
00053
00054 void CDBVListSet::DoFieldExchange(CDaoFieldExchange* pFX)
00055 {
00056   //{{AFX_FIELD_MAP(CDBVListSet)
00057   pFX->SetFieldType(CDaoFieldExchange::outputColumn);
00058   DFX_Text(pFX, _T("[Email]"), m_Email);
00059   DFX_Text(pFX, _T("[Name]"), m_Name);
00060   DFX_Text(pFX, _T("[Phone]"), m_Phone);
00061   DFX_Text(pFX, _T("[Location]"), m_Location);
00062   DFX_Text(pFX, _T("[Title]"), m_Title);
00063   DFX_Text(pFX, _T("[Department]"), m_Department);
00064   DFX_Text(pFX, _T("[Division]"), m_Division);
00065   //}}AFX_FIELD_MAP
00066 }
00067
00068 void CDBVListSet::SetFilter(CString strCurQuery)
00069 {
00070   // convenience function to set the SQL filter for the query
00071
00072   if (strCurQuery == m_strFilter)
00073     return;
00074
00075   CWaitCursor wait;
00076
00077   m_strFilter.Format(_T("[Division] = '%s'"), (LPCTSTR)strCurQuery);
00078   if (!IsOpen())
00079     Open();
00080   Requery();
00081
00082   // update record counts
00083   while (!IsEOF())
00084     MoveNext();
00085 }
00086
00087
00088 void CDBVListSet::SetSort(LPCTSTR pszSortField)
00089 {
00090   // convenience function to set the SQL sort for the query
00091
00092   m_strSort = pszSortField;
00093   if (IsOpen())
00094   {
00095     CWaitCursor wait;
00096     Requery();
00097   }
00098 }
00099
00100 /////////////////////////////////////////////////////////////////////////////
00101 // CDBVListSet diagnostics
00102
00103 #ifdef _DEBUG
00104 void CDBVListSet::AssertValid() const
00105 {
00106   CDaoRecordset::AssertValid();
00107 }
00108
00109 void CDBVListSet::Dump(CDumpContext& dc) const
00110 {
00111   CDaoRecordset::Dump(dc);
00112 }
00113 #endif //_DEBUG
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: internet/Scheduler/EnterInfoDlg.cpp Source File

  • internet
  • Scheduler

EnterInfoDlg.cpp

Go to the documentation of this file.
00001 // File: EnterInfoDlg.cpp
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 // EnterInfoDlg.cpp : implementation file
00011 //
00012
00013 #include "stdafx.h"
00014 #include "EnterInfoDlg.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CEnterInfoDlg dialog
00024
00025 IMPLEMENT_DYNCREATE(CEntryInfoDlg, CDHtmlDialog)
00026
00027 CEntryInfoDlg::CEntryInfoDlg(CWnd* pParent /*=NULL*/)
00028   : CDHtmlDialog(CEntryInfoDlg::IDD, CEntryInfoDlg::IDH, pParent)
00029 {
00030   SetDefaultSettings();
00031 }
00032
00033 CEntryInfoDlg::~CEntryInfoDlg()
00034 {
00035 }
00036
00037 void CEntryInfoDlg::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CDHtmlDialog::DoDataExchange(pDX);
00040   DDX_DHtml_SelectString (pDX, _T("ListStartTime"), m_szStartTime);
00041   DDX_DHtml_SelectString (pDX, _T("ListEndTime"), m_szEndTime);
00042   DDX_DHtml_ElementValue (pDX, _T("Title"), m_szTitle);
00043   DDX_DHtml_ElementValue (pDX, _T("Description"), m_szDescription);
00044   DDV_MaxChars(pDX, m_szTitle, 30);
00045   DDV_MaxChars(pDX, m_szDescription, 200);
00046 }
00047
00048 BOOL CEntryInfoDlg::OnInitDialog()
00049 {
00050   CDHtmlDialog::OnInitDialog();
00051
00052   m_szEndTime = _T("6:00 pm");
00053   return TRUE;  // return TRUE  unless you set the focus to a control
00054 }
00055
00056 BEGIN_MESSAGE_MAP(CEntryInfoDlg, CDHtmlDialog)
00057 END_MESSAGE_MAP()
00058
00059 BEGIN_DHTML_EVENT_MAP(CEntryInfoDlg)
00060   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, _T("buttons"),  OnMouseOverButtons)
00061   DHTML_EVENT_CLASS(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, _T("buttons"),  OnMouseOutButtons)
00062   DHTML_EVENT_ONCLICK(_T("BSave"), OnButtonSave)
00063   DHTML_EVENT_ONCLICK(_T("BCancel"), OnButtonCancel)
00064   DHTML_EVENT_ONCLICK(_T("BClear"), OnButtonClear)
00065   DHTML_EVENT_ONCLICK(_T("BModify"), OnButtonModify)
00066   DHTML_EVENT_ONCLICK(_T("BDelete"), OnButtonDelete)
00067 END_DHTML_EVENT_MAP()
00068
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CEnterInfoDlg message handlers
00072
00073
00074 /*********************************************************************************************
00075 Called when the user wants to save a schedule. Checks if the information entered is valid.
00076 Valid information: 'Title' field should not be null.  The 'Start' time should be < 'End' time
00077 **********************************************************************************************/
00078 HRESULT CEntryInfoDlg::OnButtonSave(IHTMLElement* /*pElement*/)
00079 {
00080   UpdateData(true);
00081
00082   if (CheckValidTitle() && CheckValidDescription() && CheckStartEndTime())
00083   {
00084     ASSERT(m_szTitle);
00085     ASSERT(m_szDescription.GetLength() <= 200);
00086
00087     m_fUpdateScheduleDisplay = true;
00088     OnOK();
00089   }
00090   else
00091     m_fUpdateScheduleDisplay = false;
00092
00093   return S_OK;
00094 }
00095
00096 /*********************************************************************************************
00097 When the 'Cancel' button is clicked, no changes are made to the Scheduler or the data
00098 structures
00099 **********************************************************************************************/
00100 HRESULT CEntryInfoDlg::OnButtonCancel(IHTMLElement* /*pElement*/)
00101 {
00102   m_fCancelSchedule = true;
00103   OnCancel();
00104   return S_OK;
00105 }
00106
00107 /*********************************************************************************************
00108 When the 'Clear' button is clicked, the dialog is set to its default settings
00109 **********************************************************************************************/
00110 HRESULT CEntryInfoDlg::OnButtonClear(IHTMLElement* /*pElement*/)
00111 {
00112   m_fClearSchedule = true;
00113   m_szTitle.Empty();
00114   m_szDescription.Empty();
00115   UpdateData (false);
00116   return S_OK;
00117 }
00118
00119 /*********************************************************************************************
00120 When the 'Modify' button is clicked, the old meeting information is overwritten by the
00121 modified meeting information if the entered information is valid
00122 Valid Information: 'Title' field should not be null.  The 'Start' time should be < 'End' time
00123 **********************************************************************************************/
00124 HRESULT CEntryInfoDlg::OnButtonModify(IHTMLElement* /*pElement*/)
00125 {
00126   UpdateData(true);
00127
00128   if (CheckValidTitle() && CheckValidDescription() && CheckStartEndTime())
00129   {
00130     ASSERT(m_szTitle);
00131     ASSERT(m_szDescription.GetLength() <= 200);
00132
00133     m_fModifySchedule = true;
00134     OnOK();
00135   }
00136   else
00137     m_fModifySchedule = false;
00138
00139   return S_OK;
00140 }
00141
00142 /*********************************************************************************************
00143 When the 'Delete' button is clicked, the selected meeting is deleted from the scheduler(table)
00144 and the data structure
00145 **********************************************************************************************/
00146 HRESULT CEntryInfoDlg::OnButtonDelete(IHTMLElement* /*pElement*/)
00147 {
00148   m_fDeleteSchedule = true;
00149   OnCancel();
00150   return S_OK;
00151 }
00152
00153 /*********************************************************************************************
00154 When the dialog is completed before being displayed, the colors of the buttons are modified
00155 and only the default buttons 'Save' 'Cancel' and 'Clear' are visible. 'Modify' and 'Delete'
00156 are hidden
00157 **********************************************************************************************/
00158 void CEntryInfoDlg::OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl)
00159 {
00160   CDHtmlDialog::OnDocumentComplete(pDisp, szUrl);
00161
00162   CComPtr<IHTMLElement> pModifyElement;
00163   CComPtr<IHTMLElement> pDeleteElement;
00164   CComPtr<IHTMLElement> pSaveElement;
00165   CComPtr<IHTMLElement> pClearElement;
00166   CComPtr<IHTMLElement> pCancelElement;
00167   CComPtr<IHTMLStyle> pModifyStyle;
00168   CComPtr<IHTMLStyle> pDeleteStyle;
00169   CComPtr<IHTMLStyle> pSaveStyle;
00170   CComPtr<IHTMLStyle> pClearStyle;
00171   CComPtr<IHTMLStyle> pCancelStyle;
00172
00173   HRESULT result;
00174   CComBSTR bstr;
00175   CComBSTR Defaultbstr;
00176   CString szStr;
00177   CString szDefaultstr;
00178   COleVariant varColor;
00179
00180   if (!m_fVisibleButtons)
00181     szStr = _T("hidden");
00182   else
00183     szStr = _T("visible");
00184
00185   if (!m_fVisibleDefaultButtons)
00186     szDefaultstr = _T("hidden");
00187   else
00188     szDefaultstr = _T("visible");
00189
00190   result = GetElement(_T("BModify"), &pModifyElement);
00191   result = GetElement(_T("BDelete"), &pDeleteElement);
00192   result = GetElement(_T("BSave"), &pSaveElement);
00193   result = GetElement(_T("BClear"), &pClearElement);
00194   result = GetElement(_T("BCancel"), &pCancelElement);
00195
00196   ASSERT(pModifyElement);
00197   ASSERT(pDeleteElement);
00198   ASSERT(pSaveElement);
00199   ASSERT(pClearElement);
00200   ASSERT(pCancelElement);
00201
00202   pModifyElement->get_style(&pModifyStyle);
00203   pDeleteElement->get_style(&pDeleteStyle);
00204   pSaveElement->get_style(&pSaveStyle);
00205   pClearElement->get_style(&pClearStyle);
00206   pCancelElement->get_style(&pCancelStyle);
00207
00208   ASSERT(pModifyStyle);
00209   ASSERT(pDeleteStyle);
00210   ASSERT(pSaveStyle);
00211   ASSERT(pClearStyle);
00212   ASSERT(pCancelStyle);
00213
00214   bstr = szStr.AllocSysString();
00215   Defaultbstr = szDefaultstr.AllocSysString();
00216
00217   if (pModifyStyle && pDeleteStyle && pSaveStyle && pClearStyle && pCancelStyle)
00218   {
00219     pModifyStyle->put_visibility(bstr);
00220     pDeleteStyle->put_visibility(bstr);
00221     pSaveStyle->put_visibility(Defaultbstr);
00222     pClearStyle->put_visibility(Defaultbstr);
00223     varColor = YELLOW;
00224     pModifyStyle->put_color(varColor);
00225     pDeleteStyle->put_color(varColor);
00226     pSaveStyle->put_color(varColor);
00227     pClearStyle->put_color(varColor);
00228     pCancelStyle->put_color(varColor);
00229     varColor = BLACK;
00230     pModifyStyle->put_backgroundColor(varColor);
00231     pDeleteStyle->put_backgroundColor(varColor);
00232     pSaveStyle->put_backgroundColor(varColor);
00233     pClearStyle->put_backgroundColor(varColor);
00234     pCancelStyle->put_backgroundColor(varColor);
00235   }
00236 }
00237
00238 /*********************************************************************************************
00239 Enables the text on the 'Save', 'Cancel', 'Clear', 'Modify' and 'Delete' buttons to change
00240 color when the mouse runs over it
00241 *********************************************************************************************/
00242 HRESULT CEntryInfoDlg::OnMouseOverButtons(IHTMLElement* pElement)
00243 {
00244   CComPtr<IHTMLStyle> phtmlStyle;
00245   COleVariant varColor;
00246
00247   pElement->get_style(&phtmlStyle);
00248
00249   ASSERT(phtmlStyle);
00250
00251   if (phtmlStyle)
00252   {
00253     varColor = AQUA;
00254     phtmlStyle->put_color(varColor);
00255     phtmlStyle->put_cursor(L"hand");
00256   }
00257   return NULL;
00258 }
00259
00260 /*********************************************************************************************
00261 Sets the default styles when the mouse is no longer on the 'Save', 'Cancel', 'Clear', 'Modify'
00262 and 'Delete' buttons
00263 *********************************************************************************************/
00264 HRESULT CEntryInfoDlg::OnMouseOutButtons(IHTMLElement* pElement)
00265 {
00266   CComPtr<IHTMLStyle> phtmlStyle;
00267   COleVariant varColor;
00268
00269   pElement->get_style(&phtmlStyle);
00270
00271   ASSERT(phtmlStyle);
00272
00273   if (phtmlStyle)
00274   {
00275     varColor = YELLOW;
00276     phtmlStyle->put_color(varColor);
00277   }
00278   return NULL;
00279 }
00280
00281 /*********************************************************************************************
00282 Sets 'Save', 'Cancel' and 'Clear' buttons to visible and 'Modify' and 'Delete' to hidden
00283 *********************************************************************************************/
00284 void CEntryInfoDlg::SetDefaultSettings()
00285 {
00286   m_fVisibleButtons = false;
00287   m_fVisibleDefaultButtons = true;
00288   m_fUpdateScheduleDisplay = false;
00289   m_fDeleteSchedule = false;
00290   m_fModifySchedule = false;
00291   m_fClearSchedule = false;
00292   m_fCancelSchedule = false;
00293   m_iStartHour = 0;
00294   m_iEndHour = 0;
00295 }
00296
00297 /*********************************************************************************************
00298 Check if the 'Start Time' < 'End Time'
00299 *********************************************************************************************/
00300 BOOL CEntryInfoDlg::CheckStartEndTime()
00301 {
00302   BOOL fRetval = true;
00303
00304   ResetVariables();
00305
00306   //Get the hour and minutes for the start time
00307   GetHourMinute(m_szStartTime, m_szStartTimeHour, m_szStartTimeMinute, m_iStartHour);
00308
00309   //Get the hour and minutes for the end time
00310   GetHourMinute(m_szEndTime, m_szEndTimeHour, m_szEndTimeMinute, m_iEndHour);
00311
00312   CTime startTime(2000, 8, 27, m_iStartHour, atoi(m_szStartTimeMinute), 0);
00313   CTime endTime(2000, 8, 27, m_iEndHour, atoi(m_szEndTimeMinute), 0);
00314
00315   if (startTime >= endTime)
00316   {
00317     AfxMessageBox(IDS_INVALIDTIME);
00318     fRetval = false;
00319   }
00320
00321   return fRetval;
00322 }
00323
00324 /*********************************************************************************************
00325 The overloaded assignment operator for the CEntryInfoDlg object
00326 *********************************************************************************************/
00327 const CEntryInfoDlg& CEntryInfoDlg::operator= (const CEntryInfoDlg& InfoDlg)
00328 {
00329   if (this != &InfoDlg)
00330   {
00331     m_fUpdateScheduleDisplay = InfoDlg.m_fUpdateScheduleDisplay;
00332     m_fDeleteSchedule = InfoDlg.m_fDeleteSchedule;
00333     m_fModifySchedule = InfoDlg.m_fModifySchedule;
00334     m_fClearSchedule = InfoDlg.m_fClearSchedule;
00335     m_fVisibleButtons = InfoDlg.m_fVisibleButtons;
00336     m_fVisibleDefaultButtons = InfoDlg.m_fVisibleDefaultButtons;
00337     m_szStartTime = InfoDlg.m_szStartTime;
00338     m_szEndTime = InfoDlg.m_szEndTime;
00339     m_szTitle = InfoDlg.m_szTitle;
00340     m_szDescription = InfoDlg.m_szDescription;
00341     m_szStartTimeHour = InfoDlg.m_szStartTimeHour;
00342     m_szStartTimeMinute = InfoDlg.m_szStartTimeMinute;
00343     m_szEndTimeHour = InfoDlg.m_szEndTimeHour;
00344     m_szEndTimeMinute = InfoDlg.m_szEndTimeMinute;
00345     m_iStartHour = InfoDlg.m_iStartHour;
00346     m_iEndHour = InfoDlg.m_iEndHour;
00347   }
00348   return *this;
00349 }
00350
00351 /*********************************************************************************************
00352 Checks if the 'Title' is not null
00353 A meeting will not be stored in the scheduler if the 'Title' field is empty
00354 *********************************************************************************************/
00355 BOOL CEntryInfoDlg::CheckValidTitle()
00356 {
00357   BOOL fRetval;
00358   CComPtr<IHTMLControlElement> pTitleControlElement;
00359   HRESULT result;
00360
00361   if (m_szTitle.IsEmpty())
00362   {
00363     AfxMessageBox(IDS_ENTERTITLE);
00364
00365     result = GetElementInterface(_T("Title"), &pTitleControlElement);
00366
00367     ASSERT(pTitleControlElement);
00368
00369     result = pTitleControlElement->focus();
00370
00371     fRetval = false;
00372   }
00373   else
00374     fRetval = true;
00375
00376   return fRetval;
00377 }
00378
00379 /*********************************************************************************************
00380 Checks if the 'Description' field does not contain more than 150 characters
00381 A meeting will not be stored in the scheduler if the 'Title' field is empty
00382 *********************************************************************************************/
00383 BOOL CEntryInfoDlg::CheckValidDescription()
00384 {
00385   BOOL fRetval = true;
00386
00387   if (m_szDescription.GetLength() > 200)
00388     fRetval = false;
00389
00390   return fRetval;
00391 }
00392
00393 /*********************************************************************************************
00394 Set the member variables to "" so that they can be re-used
00395 *********************************************************************************************/
00396 void CEntryInfoDlg::ResetVariables()
00397 {
00398   m_szStartTimeHour.Empty();
00399   m_szStartTimeMinute.Empty();
00400   m_szEndTimeHour.Empty();
00401   m_szEndTimeMinute.Empty();
00402 }
00403
00404 /*********************************************************************************************
00405 Retrieves the 'Hour' and 'Minute' from the time string
00406 e.g. Time string = 8:00 am
00407 Hour = 8, Minute = 00
00408 e.g. Time string = 6:00 pm
00409 Hour = 18 (6 + 12), Minute = 00
00410 *********************************************************************************************/
00411 void CEntryInfoDlg::GetHourMinute(CString szTime, CString &szHour, CString &szMinute, int &iHour)
00412 {
00413   CString szAmpm;
00414   int iTime;
00415
00416   //Retrieving the hour
00417   //eg. 8, if the selected start time is 8:00am or 8:30am
00418   for (iTime =0; szTime.GetAt(iTime) != ':';iTime++)
00419     szHour += szTime.GetAt(iTime);
00420
00421   //Retrieving the minute
00422   //eg. 00 or 30, if the selected start time minute is 8:00am or 8:30am
00423   iTime++; //To exclude ':'
00424   for (iTime; szTime.GetAt(iTime) != ' ';iTime++)
00425     szMinute += szTime.GetAt(iTime);
00426
00427   //Retrieving whether am or pm
00428   szAmpm = szTime.Right(2);
00429
00430   iHour = atoi(szHour);
00431
00432   if (iHour != 12 && !strcmp(szAmpm, _T("pm")))
00433     iHour += 12;
00434 }
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/ctrlbars/mainfrm.h Source File

  • general
  • ctrlbars

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXEXT_H__
00013 #include <afxext.h>         // for access to CToolBar and CStatusBar
00014 #endif
00015
00016 #include "palette.h"        // for access to CPaletteBar
00017
00018
00019 // Instead of using a class here we could have just put these controls
00020 // directly into CMainFrame.  As it is they are sending messages to the
00021 // main frame just like they were part of it instead of part of a control
00022 // bar.
00023 class CStyleBar : public CToolBar
00024 {
00025 public:
00026   CComboBox   m_comboBox;
00027   CFont       m_font;
00028 };
00029
00030 class CMainFrame : public CFrameWnd
00031 {
00032 // Constructor
00033 public:
00034   CMainFrame();
00035
00036 // Attributes
00037 public:
00038   BOOL m_bInsert;     // TRUE => insert mode, FALSE => overstrike mode
00039
00040 // Operations
00041 public:
00042
00043 // Implementation
00044 public:
00045   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00046   virtual ~CMainFrame();
00047 #ifdef _DEBUG
00048   virtual void AssertValid() const;
00049   virtual void Dump(CDumpContext& dc) const;
00050 #endif
00051
00052   BOOL CreateStyleBar();
00053   BOOL CreateToolBar();
00054   BOOL CreatePaletteBar();
00055   BOOL CreateStatusBar();
00056
00057 protected:  // control bar embedded members
00058   CStatusBar  m_wndStatusBar;
00059   CToolBar    m_wndToolBar;
00060   CStyleBar   m_wndStyleBar;
00061   CPaletteBar m_wndPaletteBar;
00062   CDialogBar  m_wndDlgBar;
00063   UINT        m_nPaletteCol;
00064   BOOL        m_bDialogTop;
00065
00066 // Generated message map functions
00067 protected:
00068   //{{AFX_MSG(CMainFrame)
00069   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00070   afx_msg void OnViewDlgbarTop();
00071   afx_msg void OnUpdateViewDlgbartop(CCmdUI* pCmdUI);
00072   afx_msg BOOL OnViewBar(UINT nID);
00073   afx_msg void OnUpdateBarMenu(CCmdUI* pCmdUI);
00074   afx_msg void OnViewShort();
00075   afx_msg void OnViewLong();
00076   afx_msg void OnUpdateInsert(CCmdUI* pCmdUI);
00077   afx_msg void OnToggleInsert();
00078   afx_msg void OnViewPalette();
00079   afx_msg void OnUpdatePaletteMenu(CCmdUI* pCmdUI);
00080   afx_msg void OnSelChangePalette();
00081   afx_msg void OnPalette2column();
00082   afx_msg void OnPalette3column();
00083   afx_msg void OnUpdatePalette3column(CCmdUI* pCmdUI);
00084   afx_msg void OnUpdatePalette2column(CCmdUI* pCmdUI);
00085   //}}AFX_MSG
00086
00087   afx_msg void OnUpdateStyle(CCmdUI* pCmdUI);
00088   afx_msg void OnChangeStyle(UINT nID);
00089   afx_msg void OnPalette(UINT nID);
00090   afx_msg void OnUpdatePalette(CCmdUI* pCmdUI);
00091
00092   DECLARE_MESSAGE_MAP()
00093 };
00094
00095 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/ruler.cpp Source File

  • vc2008fp
  • WordPad

ruler.cpp

Go to the documentation of this file.
00001 //
00002 // ruler.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "ruler.h"
00017 #include "wordpvw.h"
00018 #include "wordpdoc.h"
00019 #include "strings.h"
00020 #include <memory.h>
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 #define HEIGHT 17
00028 #define RULERBARHEIGHT 17
00029
00030 CRulerItem::CRulerItem(UINT nBitmapID)
00031 {
00032   m_nAlignment = TA_CENTER;
00033   m_pDC = NULL;
00034   m_bTrack = FALSE;
00035   m_hbm = NULL;
00036   m_hbmMask = NULL;
00037   if (nBitmapID != 0)
00038   {
00039     m_hbmMask = ::LoadBitmap(
00040       AfxFindResourceHandle(MAKEINTRESOURCE(nBitmapID+1), RT_BITMAP),
00041       MAKEINTRESOURCE(nBitmapID+1));
00042     ASSERT(m_hbmMask != NULL);
00043     VERIFY(LoadMaskedBitmap(MAKEINTRESOURCE(nBitmapID)));
00044     BITMAP bm;
00045     ::GetObject(m_hbm, sizeof(BITMAP), &bm);
00046     m_size = CSize(bm.bmWidth, bm.bmHeight);
00047   }
00048 }
00049
00050 CRulerItem::~CRulerItem()
00051 {
00052   if (m_hbm != NULL)
00053     ::DeleteObject(m_hbm);
00054   if (m_hbmMask != NULL)
00055     ::DeleteObject(m_hbmMask);
00056 }
00057
00058 BOOL CRulerItem::LoadMaskedBitmap(LPCTSTR lpszResourceName)
00059 {
00060   ASSERT(lpszResourceName != NULL);
00061   if (lpszResourceName == NULL)
00062     return FALSE;
00063
00064   if (m_hbm != NULL)
00065     ::DeleteObject(m_hbm);
00066
00067   HINSTANCE hInst = AfxFindResourceHandle(lpszResourceName, RT_BITMAP);
00068   HRSRC hRsrc = ::FindResource(hInst, lpszResourceName, RT_BITMAP);
00069   if (hRsrc == NULL)
00070     return FALSE;
00071
00072   m_hbm = AfxLoadSysColorBitmap(hInst, hRsrc);
00073   return (m_hbm != NULL);
00074 }
00075
00076 void CRulerItem::SetHorzPosTwips(int nXPos)
00077 {
00078   if (GetHorzPosTwips() != nXPos)
00079   {
00080     if (m_bTrack)
00081       DrawFocusLine();
00082     Invalidate();
00083     m_nXPosTwips = nXPos;
00084     Invalidate();
00085     if (m_bTrack)
00086       DrawFocusLine();
00087   }
00088 }
00089
00090 void CRulerItem::TrackHorzPosTwips(int nXPos, BOOL /*bOnRuler*/)
00091 {
00092   int nMin = GetMin();
00093   int nMax = GetMax();
00094   if (nXPos < nMin)
00095     nXPos = nMin;
00096   if (nXPos > nMax)
00097     nXPos = nMax;
00098   SetHorzPosTwips(nXPos);
00099 }
00100
00101 void CRulerItem::DrawFocusLine()
00102 {
00103   if (GetHorzPosTwips() != 0)
00104   {
00105     m_rcTrack.left = m_rcTrack.right = GetHorzPosPix();
00106     ASSERT(m_pDC != NULL);
00107     int nLeft = m_rcTrack.left + 16;
00108     m_pDC->MoveTo(nLeft, m_rcTrack.top);
00109     m_pDC->LineTo(nLeft, m_rcTrack.bottom);
00110   }
00111 }
00112
00113 void CRulerItem::SetTrack(BOOL b)
00114 {
00115   m_bTrack = b;
00116
00117   if (m_pDC != NULL) // just in case we lost focus Capture somewhere
00118   {
00119     DrawFocusLine();
00120     m_pDC->RestoreDC(-1);
00121     delete m_pDC ;
00122     m_pDC = NULL;
00123   }
00124   if (m_bTrack)
00125   {
00126     CWordPadView* pView = (CWordPadView*)m_pRuler->GetView();
00127     ASSERT(pView != NULL);
00128     if (pView != NULL)
00129     {
00130       pView->GetClientRect(&m_rcTrack);
00131       m_pDC = new CWindowDC(pView);
00132       m_pDC->SaveDC();
00133       m_pDC->SelectObject(&m_pRuler->penFocusLine);
00134       m_pDC->SetROP2(R2_XORPEN);
00135       DrawFocusLine();
00136     }
00137   }
00138 }
00139
00140 void CRulerItem::Invalidate()
00141 {
00142   CRect rc = GetHitRectPix();
00143   m_pRuler->RulerToClient(rc.TopLeft());
00144   m_pRuler->RulerToClient(rc.BottomRight());
00145   m_pRuler->InvalidateRect(rc);
00146 }
00147
00148 CRect CRulerItem::GetHitRectPix()
00149 {
00150   int nx = GetHorzPosPix();
00151   return CRect(
00152     CPoint(
00153       (m_nAlignment == TA_CENTER) ? (nx - m_size.cx/2) :
00154       (m_nAlignment == TA_LEFT) ? nx : nx - m_size.cx
00155       , m_nYPosPix
00156       ),
00157     m_size);
00158 }
00159
00160 void CRulerItem::Draw(CDC& dc)
00161 {
00162   CDC dcBitmap;
00163   dcBitmap.CreateCompatibleDC(&dc);
00164   CPoint pt(GetHorzPosPix(), GetVertPosPix());
00165
00166   HGDIOBJ hbm = ::SelectObject(dcBitmap.m_hDC, m_hbmMask);
00167
00168   // do mask part
00169   if (m_nAlignment == TA_CENTER)
00170     dc.BitBlt(pt.x - m_size.cx/2, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
00171   else if (m_nAlignment == TA_LEFT)
00172     dc.BitBlt(pt.x, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
00173   else // TA_RIGHT
00174     dc.BitBlt(pt.x - m_size.cx, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCAND);
00175
00176   // do image part
00177   ::SelectObject(dcBitmap.m_hDC, m_hbm);
00178
00179   if (m_nAlignment == TA_CENTER)
00180     dc.BitBlt(pt.x - m_size.cx/2, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
00181   else if (m_nAlignment == TA_LEFT)
00182     dc.BitBlt(pt.x, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
00183   else // TA_RIGHT
00184     dc.BitBlt(pt.x - m_size.cx, pt.y, m_size.cx, m_size.cy, &dcBitmap, 0, 0, SRCINVERT);
00185
00186   ::SelectObject(dcBitmap.m_hDC, hbm);
00187 }
00188
00189 CComboRulerItem::CComboRulerItem(UINT nBitmapID1, UINT nBitmapID2, CRulerItem& item)
00190   : CRulerItem(nBitmapID1), m_secondary(nBitmapID2) , m_link(item)
00191 {
00192   m_bHitPrimary = TRUE;
00193 }
00194
00195 BOOL CComboRulerItem::HitTestPix(CPoint pt)
00196 {
00197   m_bHitPrimary = FALSE;
00198   if (CRulerItem::GetHitRectPix().PtInRect(pt))
00199     m_bHitPrimary = TRUE;
00200   else
00201     return m_secondary.HitTestPix(pt);
00202   return TRUE;
00203 }
00204
00205 void CComboRulerItem::Draw(CDC& dc)
00206 {
00207   CRulerItem::Draw(dc);
00208   m_secondary.Draw(dc);
00209 }
00210
00211 void CComboRulerItem::SetHorzPosTwips(int nXPos)
00212 {
00213   if (m_bHitPrimary) // only change linked items by delta
00214     m_link.SetHorzPosTwips(m_link.GetHorzPosTwips() + nXPos - GetHorzPosTwips());
00215   CRulerItem::SetHorzPosTwips(nXPos);
00216   m_secondary.SetHorzPosTwips(nXPos);
00217 }
00218
00219 void CComboRulerItem::TrackHorzPosTwips(int nXPos, BOOL /*bOnRuler*/)
00220 {
00221   int nMin = GetMin();
00222   int nMax = GetMax();
00223   if (nXPos < nMin)
00224     nXPos = nMin;
00225   if (nXPos > nMax)
00226     nXPos = nMax;
00227   SetHorzPosTwips(nXPos);
00228 }
00229
00230 void CComboRulerItem::SetVertPos(int nYPos)
00231 {
00232   m_secondary.SetVertPos(nYPos);
00233   nYPos += m_secondary.GetHitRectPix().Height();
00234   CRulerItem::SetVertPos(nYPos);
00235 }
00236
00237 void CComboRulerItem::SetAlignment(int nAlign)
00238 {
00239   CRulerItem::SetAlignment(nAlign);
00240   m_secondary.SetAlignment(nAlign);
00241 }
00242
00243 void CComboRulerItem::SetRuler(CRulerBar* pRuler)
00244 {
00245   m_pRuler = pRuler;
00246   m_secondary.SetRuler(pRuler);
00247 }
00248
00249 void CComboRulerItem::SetBounds(int nMin, int nMax)
00250 {
00251   CRulerItem::SetBounds(nMin, nMax);
00252   m_secondary.SetBounds(nMin, nMax);
00253 }
00254
00255 int CComboRulerItem::GetMin()
00256 {
00257   if (m_bHitPrimary)
00258   {
00259     int nPDist = GetHorzPosTwips() - CRulerItem::GetMin();
00260     int nLDist = m_link.GetHorzPosTwips() - m_link.GetMin();
00261     return GetHorzPosTwips() - min(nPDist, nLDist);
00262   }
00263   else
00264     return CRulerItem::GetMin();
00265 }
00266
00267 int CComboRulerItem::GetMax()
00268 {
00269   if (m_bHitPrimary)
00270   {
00271     int nPDist = CRulerItem::GetMax() - GetHorzPosTwips();
00272     int nLDist = m_link.GetMax() - m_link.GetHorzPosTwips();
00273     int nMinDist = (nPDist < nLDist) ? nPDist : nLDist;
00274     return GetHorzPosTwips() + nMinDist;
00275   }
00276   else
00277     return CRulerItem::GetMax();
00278 }
00279
00280 void CTabRulerItem::TrackHorzPosTwips(int nXPos, BOOL bOnRuler)
00281 {
00282   if (bOnRuler)
00283     CRulerItem::TrackHorzPosTwips(nXPos, bOnRuler);
00284   else
00285     CRulerItem::TrackHorzPosTwips(0, bOnRuler);
00286 }
00287
00288
00289 BEGIN_MESSAGE_MAP(CRulerBar, CPane)
00290   //{{AFX_MSG_MAP(CRulerBar)
00291   ON_WM_LBUTTONDOWN()
00292   ON_WM_LBUTTONUP()
00293   ON_WM_MOUSEMOVE()
00294   ON_WM_SYSCOLORCHANGE()
00295   ON_WM_WINDOWPOSCHANGING()
00296   ON_WM_SHOWWINDOW()
00297   ON_WM_WINDOWPOSCHANGED()
00298   ON_WM_CREATE()
00299   //}}AFX_MSG_MAP
00300   ON_MESSAGE(WM_SIZEPARENT, OnSizeParent)
00301   // Global help commands
00302 END_MESSAGE_MAP()
00303
00304 CRulerBar::CRulerBar(BOOL b3DExt) :
00305   m_leftmargin(IDB_RULER_BLOCK, IDB_RULER_UP, m_indent),
00306   m_indent(IDB_RULER_DOWN),
00307   m_rightmargin(IDB_RULER_UP),
00308   m_tabItem(IDB_RULER_TAB)
00309 {
00310   m_bDeferInProgress = FALSE;
00311   m_leftmargin.SetRuler(this);
00312   m_indent.SetRuler(this);
00313   m_rightmargin.SetRuler(this);
00314
00315   // all of the tab stops share handles
00316   for (int i=0;i<MAX_TAB_STOPS;i++)
00317   {
00318     m_pTabItems[i].m_hbm = m_tabItem.m_hbm;
00319     m_pTabItems[i].m_hbmMask = m_tabItem.m_hbmMask;
00320     m_pTabItems[i].m_size = m_tabItem.m_size;
00321   }
00322
00323   m_unit.m_nTPU = 0;
00324   m_nScroll = 0;
00325
00326   LOGFONT lf;
00327   memcpy(&lf, &theApp.m_lf, sizeof(LOGFONT));
00328   lf.lfHeight = -8;
00329   lf.lfWidth = 0;
00330   VERIFY(fnt.CreateFontIndirect(&lf));
00331
00332   m_nTabs = 0;
00333   m_leftmargin.SetVertPos(9);
00334   m_indent.SetVertPos(-1);
00335   m_rightmargin.SetVertPos(9);
00336
00337   m_cxLeftBorder = 0;
00338   if (!theApp.m_bWin4)
00339     m_bDraw3DExt = FALSE;
00340   else
00341     m_bDraw3DExt = b3DExt;
00342
00343   m_cyTopBorder = 4;
00344   m_cyBottomBorder = 6;
00345
00346   m_pSelItem = NULL;
00347
00348   m_logx = theApp.m_dcScreen.GetDeviceCaps(LOGPIXELSX);
00349 }
00350
00351 CRulerBar::~CRulerBar()
00352 {
00353   // set handles to NULL to avoid deleting twice
00354   for (int i=0;i<MAX_TAB_STOPS;i++)
00355   {
00356     m_pTabItems[i].m_hbm = NULL;
00357     m_pTabItems[i].m_hbmMask = NULL;
00358   }
00359 }
00360
00361 void CRulerBar::CreateGDIObjects()
00362 {
00363   penFocusLine.DeleteObject();
00364   penBtnHighLight.DeleteObject();
00365   penBtnShadow.DeleteObject();
00366   penWindowFrame.DeleteObject();
00367   penBtnText.DeleteObject();
00368   penBtnFace.DeleteObject();
00369   penWindowText.DeleteObject();
00370   penWindow.DeleteObject();
00371   brushWindow.DeleteObject();
00372   brushBtnFace.DeleteObject();
00373
00374   penFocusLine.CreatePen(PS_DOT, 1,GetSysColor(COLOR_WINDOWTEXT));
00375   penBtnHighLight.CreatePen(PS_SOLID, 0, afxGlobalData.clrBarHilite);
00376   penBtnShadow.CreatePen(PS_SOLID, 0, afxGlobalData.clrBarShadow);
00377   penWindowFrame.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWFRAME));
00378   penBtnText.CreatePen(PS_SOLID, 0, afxGlobalData.clrBarText);
00379   penBtnFace.CreatePen(PS_SOLID, 0, afxGlobalData.clrBarFace);
00380   penWindowText.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWTEXT));
00381   penWindow.CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOW));
00382   brushWindow.CreateSolidBrush(GetSysColor(COLOR_WINDOW));
00383   brushBtnFace.CreateSolidBrush(afxGlobalData.clrBarFace);
00384 }
00385
00386 void CRulerBar::OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL /*bDisableIfNoHndler*/)
00387 {
00388   ASSERT_VALID(this);
00389   //Get the page size and see if changed -- from document
00390   //get margins and tabs and see if changed -- from view
00391   if (m_pSelItem == NULL) // only update if not in middle of dragging
00392   {
00393     CWordPadView* pView = (CWordPadView*)GetView();
00394     ASSERT(pView != NULL);
00395     if (pView != NULL)
00396     {
00397       Update(pView->GetPaperSize(), pView->GetMargins());
00398       Update(pView->GetParaFormatSelection());
00399       CRect rect;
00400       pView->GetRichEditCtrl().GetRect(&rect);
00401       CPoint pt = rect.TopLeft();
00402       pView->ClientToScreen(&pt);
00403       ScreenToClient(&pt);
00404       if (m_cxLeftBorder != pt.x)
00405       {
00406         m_cxLeftBorder = pt.x;
00407         Invalidate();
00408       }
00409       int nScroll = pView->GetScrollPos(SB_HORZ);
00410       if (nScroll != m_nScroll)
00411       {
00412         m_nScroll = nScroll;
00413         Invalidate();
00414       }
00415     }
00416   }
00417 }
00418
00419 CSize CRulerBar::GetBaseUnits()
00420 {
00421   ASSERT(fnt.GetSafeHandle() != NULL);
00422   CFont* pFont = theApp.m_dcScreen.SelectObject(&fnt);
00423   TEXTMETRIC tm;
00424   VERIFY(theApp.m_dcScreen.GetTextMetrics(&tm) == TRUE);
00425   theApp.m_dcScreen.SelectObject(pFont);
00426 //  return CSize(tm.tmAveCharWidth, tm.tmHeight+tm.tmDescent);
00427   return CSize(tm.tmAveCharWidth, tm.tmHeight);
00428 }
00429
00430 BOOL CRulerBar::Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID)
00431 {
00432   ASSERT_VALID(pParentWnd);   // must have a parent
00433
00434   dwStyle |= WS_CLIPSIBLINGS;
00435   // force WS_CLIPSIBLINGS (avoids SetWindowPos bugs)
00436   m_dwStyle = (dwStyle & CBRS_ALL);
00437
00438   if (nID == AFX_IDW_TOOLBAR)
00439   {
00440     m_dwStyle |= CBRS_HIDE_INPLACE;
00441   }
00442
00443   dwStyle &= ~CBRS_ALL;
00444
00445   // create the HWND
00446   CRect rect;
00447   rect.SetRectEmpty();
00448   LPCTSTR lpszClass = AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW),
00449     (HBRUSH)(COLOR_BTNFACE+1), NULL);
00450
00451   if (!CWnd::Create(lpszClass, NULL, dwStyle, rect, pParentWnd, nID))
00452     return FALSE;
00453   // NOTE: Parent must resize itself for control bar to be resized
00454
00455   int i;
00456   int nMax = 100;
00457   for (i=0;i<MAX_TAB_STOPS;i++)
00458   {
00459     m_pTabItems[i].SetRuler(this);
00460     m_pTabItems[i].SetVertPos(8);
00461     m_pTabItems[i].SetHorzPosTwips(0);
00462     m_pTabItems[i].SetBounds(0, nMax);
00463   }
00464
00465   // register with parent frames' dock manager!!!
00466   if (pParentWnd->IsKindOf (RUNTIME_CLASS (CFrameWndEx)))
00467   {
00468     ((CFrameWndEx*) pParentWnd)->AddPane (this);
00469   }
00470   else if (pParentWnd->IsKindOf (RUNTIME_CLASS (CMDIFrameWndEx)))
00471   {
00472     ((CMDIFrameWndEx*) pParentWnd)->AddPane (this);
00473   }
00474   else if (pParentWnd->IsKindOf (RUNTIME_CLASS (COleIPFrameWndEx)))
00475   {
00476     ((COleIPFrameWndEx*) pParentWnd)->AddPane (this);
00477   }
00478   else
00479   {
00480     ASSERT (FALSE);
00481   }
00482
00483   SetWindowText (_T("Ruler"));
00484   return TRUE;
00485 }
00486
00487 CSize CRulerBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
00488 {
00489   ASSERT(bHorz);
00490   CSize m_size = CPane::CalcFixedLayout(bStretch, bHorz);
00491   CRect rectSize;
00492   rectSize.SetRectEmpty();
00493   CalcInsideRect(rectSize, bHorz);       // will be negative size
00494   m_size.cy = RULERBARHEIGHT - rectSize.Height();
00495   return m_size;
00496 }
00497
00498 void CRulerBar::Update(const WPD_PARAFORMAT& pf)
00499 {
00500   ASSERT(pf.cTabCount <= MAX_TAB_STOPS);
00501
00502   m_leftmargin.SetHorzPosTwips((int)(pf.dxStartIndent + pf.dxOffset));
00503   m_indent.SetHorzPosTwips((int)pf.dxStartIndent);
00504   m_rightmargin.SetHorzPosTwips(PrintWidth() - (int) pf.dxRightIndent);
00505
00506   int i = 0;
00507   for (i=0;i<pf.cTabCount;i++)
00508     m_pTabItems[i].SetHorzPosTwips((int)pf.rgxTabs[i]);
00509   for ( ;i<MAX_TAB_STOPS; i++)
00510     m_pTabItems[i].SetHorzPosTwips(0);
00511 }
00512
00513 void CRulerBar::Update(CSize sizePaper, const CRect& rectMargins)
00514 {
00515   if ((sizePaper != m_sizePaper) || (rectMargins != m_rectMargin))
00516   {
00517     m_sizePaper = sizePaper;
00518     m_rectMargin = rectMargins;
00519     Invalidate();
00520   }
00521   if (m_unit.m_nTPU != theApp.GetTPU())
00522   {
00523     m_unit = theApp.GetUnit();
00524     Invalidate();
00525   }
00526 }
00527
00528 void CRulerBar::FillInParaFormat(WPD_PARAFORMAT& pf)
00529 {
00530   pf.dwMask = PFM_STARTINDENT | PFM_RIGHTINDENT | PFM_OFFSET | PFM_TABSTOPS;
00531   pf.dxStartIndent = m_indent.GetHorzPosTwips();
00532   pf.dxOffset = m_leftmargin.GetHorzPosTwips() - pf.dxStartIndent;
00533   pf.dxRightIndent = PrintWidth() - m_rightmargin.GetHorzPosTwips();
00534   pf.cTabCount = 0L;
00535   SortTabs();
00536   int i, nPos = 0;
00537   for (i=0;i<MAX_TAB_STOPS;i++)
00538   {
00539     // get rid of zeroes and multiples
00540     // i.e. if we have 0,0,0,1,2,3,4,4,5
00541     // we will get tabs at 1,2,3,4,5
00542     if (nPos != m_pTabItems[i].GetHorzPosTwips())
00543     {
00544       nPos = m_pTabItems[i].GetHorzPosTwips();
00545       pf.rgxTabs[pf.cTabCount++] = nPos;
00546     }
00547   }
00548 }
00549
00550 // simple bubble sort is adequate for small number of tabs
00551 void CRulerBar::SortTabs()
00552 {
00553   int i,j, nPos;
00554   for (i=0;i<MAX_TAB_STOPS - 1;i++)
00555   {
00556     for (j=i+1; j < MAX_TAB_STOPS;j++)
00557     {
00558       if (m_pTabItems[j].GetHorzPosTwips() < m_pTabItems[i].GetHorzPosTwips())
00559       {
00560         nPos = m_pTabItems[j].GetHorzPosTwips();
00561         m_pTabItems[j].SetHorzPosTwips(m_pTabItems[i].GetHorzPosTwips());
00562         m_pTabItems[i].SetHorzPosTwips(nPos);
00563       }
00564     }
00565   }
00566 }
00567
00568 void CRulerBar::DoPaint(CDC* pDC)
00569 {
00570   CPane::DoPaint(pDC); // CControlBar::DoPaint -- draws border
00571   if (m_unit.m_nTPU != 0)
00572   {
00573     pDC->SaveDC();
00574     // offset coordinate system
00575     CPoint pointOffset(0,0);
00576     RulerToClient(pointOffset);
00577     pDC->SetViewportOrg(pointOffset);
00578
00579     DrawFace(*pDC);
00580     DrawTickMarks(*pDC);
00581
00582     DrawTabs(*pDC);
00583     m_leftmargin.Draw(*pDC);
00584     m_indent.Draw(*pDC);
00585     m_rightmargin.Draw(*pDC);
00586
00587     pDC->RestoreDC(-1);
00588   }
00589   // Do not call CControlBar::OnPaint() for painting messages
00590 }
00591
00592 void CRulerBar::DrawTabs(CDC& dc)
00593 {
00594   int i;
00595   int nPos = 0;
00596   for (i=0;i<MAX_TAB_STOPS;i++)
00597   {
00598     if (m_pTabItems[i].GetHorzPosTwips() > nPos)
00599       nPos = (m_pTabItems[i].GetHorzPosTwips());
00600     m_pTabItems[i].Draw(dc);
00601   }
00602   int nPageWidth = PrintWidth();
00603   nPos = nPos - nPos%720 + 720;
00604   dc.SelectObject(&penBtnShadow);
00605   for ( ; nPos < nPageWidth; nPos += 720)
00606   {
00607     int nx = XTwipsToRuler(nPos);
00608     dc.MoveTo(nx, HEIGHT - 1);
00609     dc.LineTo(nx, HEIGHT + 1);
00610   }
00611 }
00612
00613 void CRulerBar::DrawFace(CDC& dc)
00614 {
00615   int nPageWidth = XTwipsToRuler(PrintWidth());
00616   int nPageEdge = XTwipsToRuler(PrintWidth() + m_rectMargin.right);
00617
00618   dc.SaveDC();
00619
00620   dc.SelectObject(&penBtnShadow);
00621   dc.MoveTo(0,0);
00622   dc.LineTo(nPageEdge - 1, 0);
00623   dc.LineTo(nPageEdge - 1, HEIGHT - 2);
00624   dc.LineTo(nPageWidth - 1, HEIGHT - 2);
00625   dc.LineTo(nPageWidth - 1, 1);
00626   dc.LineTo(nPageWidth, 1);
00627   dc.LineTo(nPageWidth, HEIGHT -2);
00628
00629   dc.SelectObject(&penBtnHighLight);
00630   dc.MoveTo(nPageWidth, HEIGHT - 1);
00631   dc.LineTo(nPageEdge, HEIGHT -1);
00632   dc.MoveTo(nPageWidth + 1, HEIGHT - 3);
00633   dc.LineTo(nPageWidth + 1, 1);
00634   dc.LineTo(nPageEdge - 1, 1);
00635
00636   dc.SelectObject(&penWindow);
00637   dc.MoveTo(0, HEIGHT - 1);
00638   dc.LineTo(nPageWidth, HEIGHT -1);
00639
00640   dc.SelectObject(&penBtnFace);
00641   dc.MoveTo(1, HEIGHT - 2);
00642   dc.LineTo(nPageWidth - 1, HEIGHT - 2);
00643
00644   dc.SelectObject(&penWindowFrame);
00645   dc.MoveTo(0, HEIGHT - 2);
00646   dc.LineTo(0, 1);
00647   dc.LineTo(nPageWidth - 1, 1);
00648
00649   dc.FillRect(CRect(1, 2, nPageWidth - 1, HEIGHT-2), &brushWindow);
00650   dc.FillRect(CRect(nPageWidth + 2, 2, nPageEdge - 1, HEIGHT-2), &brushBtnFace);
00651
00652   CRect rcClient;
00653   GetClientRect(&rcClient);
00654   ClientToRuler(rcClient);
00655   rcClient.top = HEIGHT;
00656   rcClient.bottom = HEIGHT + 2;
00657   dc.FillRect(rcClient, &brushBtnFace);
00658
00659   CRect rectFill(rcClient.left, HEIGHT+4, rcClient.right, HEIGHT+9);
00660   dc.FillRect(rectFill, &brushWindow);
00661
00662   if (m_bDraw3DExt)  // draws the 3D extension into the view
00663   {
00664     dc.SelectObject(&penBtnShadow);
00665     dc.MoveTo(rcClient.left, HEIGHT+8);
00666     dc.LineTo(rcClient.left, HEIGHT+2);
00667     dc.LineTo(rcClient.right-1, HEIGHT+2);
00668
00669     dc.SelectObject(&penWindowFrame);
00670     dc.MoveTo(rcClient.left+1, HEIGHT+8);
00671     dc.LineTo(rcClient.left+1, HEIGHT+3);
00672     dc.LineTo(rcClient.right-2, HEIGHT+3);
00673
00674     dc.SelectObject(&penBtnHighLight);
00675     dc.MoveTo(rcClient.right-1, HEIGHT+2);
00676     dc.LineTo(rcClient.right-1, HEIGHT+8);
00677
00678     dc.SelectObject(&penBtnFace);
00679     dc.MoveTo(rcClient.right-2, HEIGHT+3);
00680     dc.LineTo(rcClient.right-2, HEIGHT+8);
00681   }
00682   else
00683   {
00684     dc.SelectObject(&penBtnShadow);
00685     dc.MoveTo(rcClient.left, HEIGHT+2);
00686     dc.LineTo(rcClient.right, HEIGHT+2);
00687
00688     dc.SelectObject(&penWindowFrame);
00689     dc.MoveTo(rcClient.left, HEIGHT+3);
00690     dc.LineTo(rcClient.right, HEIGHT+3);
00691   }
00692
00693   dc.RestoreDC(-1);
00694 }
00695
00696 void CRulerBar::DrawTickMarks(CDC& dc)
00697 {
00698   dc.SaveDC();
00699
00700   dc.SelectObject(&penWindowText);
00701   dc.SelectObject(&fnt);
00702   dc.SetTextColor(GetSysColor(COLOR_WINDOWTEXT));
00703   dc.SetBkMode(TRANSPARENT);
00704
00705   DrawDiv(dc, m_unit.m_nSmallDiv, m_unit.m_nLargeDiv, 2);
00706   DrawDiv(dc, m_unit.m_nMediumDiv, m_unit.m_nLargeDiv, 5);
00707   DrawNumbers(dc, m_unit.m_nLargeDiv, m_unit.m_nTPU);
00708
00709   dc.RestoreDC(-1);
00710 }
00711
00712 void CRulerBar::DrawNumbers(CDC& dc, int nInc, int nTPU)
00713 {
00714   int nPageWidth = PrintWidth();
00715   int nPageEdge = nPageWidth + m_rectMargin.right;
00716   TCHAR buf[10];
00717
00718   int nTwips, nPixel, nLen;
00719
00720   for (nTwips = nInc; nTwips < nPageEdge; nTwips += nInc)
00721   {
00722     if (nTwips == nPageWidth)
00723       continue;
00724     nPixel = XTwipsToRuler(nTwips);
00725     wsprintf(buf, _T("%d"), nTwips/nTPU);
00726     nLen = lstrlen(buf);
00727     CSize sz = dc.GetTextExtent(buf, nLen);
00728     dc.ExtTextOut(nPixel - sz.cx/2, HEIGHT/2 - sz.cy/2, 0, NULL, buf, nLen, NULL);
00729   }
00730 }
00731
00732 void CRulerBar::DrawDiv(CDC& dc, int nInc, int nLargeDiv, int nLength)
00733 {
00734   int nPageWidth = PrintWidth();
00735   int nPageEdge = nPageWidth + m_rectMargin.right;
00736
00737   int nTwips, nPixel;
00738
00739   for (nTwips = nInc; nTwips < nPageEdge; nTwips += nInc)
00740   {
00741     if (nTwips == nPageWidth || nTwips%nLargeDiv == 0)
00742       continue;
00743     nPixel = XTwipsToRuler(nTwips);
00744     dc.MoveTo(nPixel, HEIGHT/2 - nLength/2);
00745     dc.LineTo(nPixel, HEIGHT/2 - nLength/2 + nLength);
00746   }
00747 }
00748
00749 void CRulerBar::OnLButtonDown(UINT nFlags, CPoint point)
00750 {
00751   CPoint pt = point;
00752   ClientToRuler(pt);
00753
00754   m_pSelItem = NULL;
00755   if (m_leftmargin.HitTestPix(pt))
00756     m_pSelItem = &m_leftmargin;
00757   else if (m_indent.HitTestPix(pt))
00758     m_pSelItem = &m_indent;
00759   else if (m_rightmargin.HitTestPix(pt))
00760     m_pSelItem = &m_rightmargin;
00761   else
00762     m_pSelItem = GetHitTabPix(pt);
00763   if (m_pSelItem == NULL)
00764     m_pSelItem = GetFreeTab();
00765   if (m_pSelItem == NULL)
00766     return;
00767   SetCapture();
00768
00769   m_pSelItem->SetTrack(TRUE);
00770   SetMarginBounds();
00771   OnMouseMove(nFlags, point);
00772 }
00773
00774 void CRulerBar::SetMarginBounds()
00775 {
00776   m_leftmargin.SetBounds(0, m_rightmargin.GetHorzPosTwips());
00777   m_indent.SetBounds(0, m_rightmargin.GetHorzPosTwips());
00778
00779   int nMin = (m_leftmargin.GetHorzPosTwips() > m_indent.GetHorzPosTwips()) ?
00780     m_leftmargin.GetHorzPosTwips() : m_indent.GetHorzPosTwips();
00781   int nMax = PrintWidth() + m_rectMargin.right;
00782   m_rightmargin.SetBounds(nMin, nMax);
00783
00784   // tabs can go from zero to the right page edge
00785   for (int i=0;i<MAX_TAB_STOPS;i++)
00786     m_pTabItems[i].SetBounds(0, nMax);
00787 }
00788
00789 CRulerItem* CRulerBar::GetFreeTab()
00790 {
00791   int i;
00792   for (i=0;i<MAX_TAB_STOPS;i++)
00793   {
00794     if (m_pTabItems[i].GetHorzPosTwips() == 0)
00795       return &m_pTabItems[i];
00796   }
00797   return NULL;
00798 }
00799
00800 CTabRulerItem* CRulerBar::GetHitTabPix(CPoint point)
00801 {
00802   int i;
00803   for (i=0;i<MAX_TAB_STOPS;i++)
00804   {
00805     if (m_pTabItems[i].HitTestPix(point))
00806       return &m_pTabItems[i];
00807   }
00808   return NULL;
00809 }
00810
00811 void CRulerBar::OnLButtonUp(UINT nFlags, CPoint point)
00812 {
00813   if (::GetCapture() != m_hWnd)
00814     return;
00815   OnMouseMove(nFlags, point);
00816   m_pSelItem->SetTrack(FALSE);
00817   ReleaseCapture();
00818   CWordPadView* pView = (CWordPadView*)GetView();
00819   ASSERT(pView != NULL);
00820   if (pView != NULL)
00821   {
00822     WPD_PARAFORMAT& pf = pView->GetParaFormatSelection();
00823     FillInParaFormat(pf);
00824     pView->SetParaFormat(pf);
00825   }
00826   m_pSelItem = NULL;
00827 }
00828
00829 void CRulerBar::OnMouseMove(UINT nFlags, CPoint point)
00830 {
00831   CPane::OnMouseMove(nFlags, point);
00832 // use ::GetCapture to avoid creating temporaries
00833   if (::GetCapture() != m_hWnd)
00834     return;
00835   ASSERT(m_pSelItem != NULL);
00836   CRect rc(0,0, XTwipsToRuler(PrintWidth() + m_rectMargin.right), HEIGHT);
00837   RulerToClient(rc);
00838   BOOL bOnRuler = rc.PtInRect(point);
00839
00840 // snap to minimum movement
00841   point.x = XClientToTwips(point.x);
00842   point.x += m_unit.m_nMinMove/2;
00843   point.x -= point.x%m_unit.m_nMinMove;
00844
00845   m_pSelItem->TrackHorzPosTwips(point.x, bOnRuler);
00846   UpdateWindow();
00847 }
00848
00849 void CRulerBar::OnSysColorChange()
00850 {
00851   CPane::OnSysColorChange();
00852   CreateGDIObjects();
00853   Invalidate();
00854 }
00855
00856 void CRulerBar::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
00857 {
00858   CPane::OnWindowPosChanging(lpwndpos);
00859   CRect rect;
00860   GetClientRect(rect);
00861   int minx = min(rect.Width(), lpwndpos->cx);
00862   int maxx = max(rect.Width(), lpwndpos->cx);
00863   rect.SetRect(minx-2, rect.bottom - 6, minx, rect.bottom);
00864   InvalidateRect(rect);
00865   rect.SetRect(maxx-2, rect.bottom - 6, maxx, rect.bottom);
00866   InvalidateRect(rect);
00867 }
00868
00869 void CRulerBar::OnShowWindow(BOOL bShow, UINT nStatus)
00870 {
00871   CPane::OnShowWindow(bShow, nStatus);
00872   m_bDeferInProgress = FALSE;
00873 }
00874
00875 void CRulerBar::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
00876 {
00877   CPane::OnWindowPosChanged(lpwndpos);
00878   m_bDeferInProgress = FALSE;
00879 }
00880
00881 LRESULT CRulerBar::OnSizeParent(WPARAM /*wParam*/, LPARAM /*lParam*/)
00882 {
00883 /*  BOOL bVis = GetStyle() & WS_VISIBLE;
00884   if ((bVis && (m_nStateFlags & delayHide)) ||
00885     (!bVis && (m_nStateFlags & delayShow)))
00886   {
00887     m_bDeferInProgress = TRUE;
00888   }
00889   return CControlBar::OnSizeParent(wParam, lParam);*/
00890   AdjustDockingLayout ();
00891   return 0;
00892 }
00893
00894 int CRulerBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00895 {
00896   if (CPane::OnCreate(lpCreateStruct) == -1)
00897     return -1;
00898
00899   CreateGDIObjects();
00900   return 0;
00901 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circ.odl Source File

  • controls
  • circ

circ.odl

Go to the documentation of this file.
00001 // circ.odl : type library source for OLE Custom Control project.
00002
00003 // This file will be processed by the Make Type Library (mktyplib) tool to
00004 // produce the type library (circ.tlb) that will become a resource in
00005 // circ.ocx.
00006
00007 // This is a part of the Microsoft Foundation Classes C++ library.
00008 // Copyright (c) Microsoft Corporation.  All rights reserved.
00009 //
00010 // This source code is only intended as a supplement to the
00011 // Microsoft Foundation Classes Reference and the
00012 // Books Online documentation provided with the library.
00013 // See these sources for detailed information regarding the
00014 // Microsoft Foundation Classes product.
00015
00016 #include <olectl.h>
00017
00018 [ uuid(9DBAFCD2-592F-101B-85CE-00608CEC297B), version(1.0),
00019   helpstring("Circ OLE Custom Control module"), control ]
00020 library CircLib
00021 {
00022   importlib(STDOLE_TLB);
00023   importlib(STDTYPE_TLB);
00024
00025   //  Primary dispatch interface for CCircCtrl
00026
00027   [ uuid(9DBAFCD0-592F-101B-85CE-00608CEC297B),
00028     helpstring("Dispatch interface for Circ Control"), hidden ]
00029   dispinterface _DCirc
00030   {
00031     properties:
00032       // NOTE - ClassWizard will maintain property information here.
00033       //    Use extreme caution when editing this section.
00034       //{{AFX_ODL_PROP(CCircCtrl)
00035       [id(DISPID_BACKCOLOR), bindable, requestedit] OLE_COLOR BackColor;
00036       [id(1)] boolean CircleShape;
00037       [id(3)] short CircleOffset;
00038       [id(DISPID_CAPTION), bindable, requestedit] BSTR Caption;
00039       [id(DISPID_FONT), bindable] IFontDisp* Font;
00040       [id(DISPID_FORECOLOR), bindable, requestedit] OLE_COLOR ForeColor;
00041       [id(4), bindable] BSTR Note;
00042       [id(2)] OLE_COLOR FlashColor;
00043       //}}AFX_ODL_PROP
00044
00045     methods:
00046       // NOTE - ClassWizard will maintain method information here.
00047       //    Use extreme caution when editing this section.
00048       //{{AFX_ODL_METHOD(CCircCtrl)
00049       //}}AFX_ODL_METHOD
00050
00051       [id(DISPID_ABOUTBOX)] void AboutBox();
00052   };
00053
00054   //  Event dispatch interface for CCircCtrl
00055
00056   [ uuid(9DBAFCD1-592F-101B-85CE-00608CEC297B),
00057     helpstring("Event interface for Circ Control") ]
00058   dispinterface _DCircEvents
00059   {
00060     properties:
00061       //  Event interface has no properties
00062
00063     methods:
00064       // NOTE - ClassWizard will maintain event information here.
00065       //    Use extreme caution when editing this section.
00066       //{{AFX_ODL_EVENT(CCircCtrl)
00067       [id(1)] void ClickIn(OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y);
00068       [id(2)] void ClickOut();
00069       //}}AFX_ODL_EVENT
00070   };
00071
00072   //  Class information for CCircCtrl
00073
00074   [ uuid(9DBAFCCF-592F-101B-85CE-00608CEC297B),
00075     helpstring("Circ Control"), control ]
00076   coclass Circ
00077   {
00078     [default] dispinterface _DCirc;
00079     [default, source] dispinterface _DCircEvents;
00080   };
00081
00082
00083   //{{AFX_APPEND_ODL}}
00084 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCubeView Member List

This is the complete list of members for CCubeView, including all inherited members.
bSetupPixelFormat(void) | CCubeView |
CCubeView() | CCubeView | [protected]
ComponentFromIndex(int i, UINT nbits, UINT shift) | CCubeView |
CreateRGBPalette(void) | CCubeView |
DrawScene(void) | CCubeView |
GetDocument() | CCubeView | [inline]
Init() | CCubeView |
m_cPalette | CCubeView |
m_fRadius | CCubeView |
m_oldRect | CCubeView |
m_pDC | CCubeView |
m_play | CCubeView | [protected]
m_pOldPalette | CCubeView |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCubeView | [protected]
OnDestroy() | CCubeView | [protected]
OnDraw(CDC *pDC) | CCubeView | [virtual]
OnEraseBkgnd(CDC *pDC) | CCubeView | [protected]
OnFilePlay() | CCubeView | [protected]
OnSize(UINT nType, int cx, int cy) | CCubeView | [protected]
OnTimer(UINT_PTR nIDEvent) | CCubeView | [protected]
OnUpdateFilePlay(CCmdUI *pCmdUI) | CCubeView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCubeView | [virtual]
~CCubeView() | CCubeView | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/linkitem.cpp Source File

  • ole
  • superpad

linkitem.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010
00011 #include "stdafx.h"
00012 #include "padview.h"
00013 #include "paddoc.h"
00014 #include "paditem.h"
00015 #include "linkitem.h"
00016 #include <limits.h>
00017
00018 IMPLEMENT_DYNAMIC(CPadLinkItem, CEmbeddedItem)
00019
00020 CPadLinkItem::CPadLinkItem(CPadDoc* pContainerDoc, LPCTSTR pszItemName)
00021   : CEmbeddedItem(pContainerDoc)
00022 {
00023   CString strItemName(pszItemName);
00024   SetItemName(strItemName);
00025   VERIFY( _stscanf_s(strItemName, _T("%d %d"), &m_nBeg, &m_nEnd) == 2 );
00026 }
00027
00028 CPadLinkItem::CPadLinkItem(CPadDoc* pContainerDoc, int nFrom, int nTo)
00029   : CEmbeddedItem(pContainerDoc)
00030 {
00031   m_nBeg = nFrom;
00032   m_nEnd = nTo;
00033   TCHAR buf[30];
00034   _stprintf_s(buf, 30, _T("%d %d"), m_nBeg, m_nEnd);
00035   SetItemName(buf);
00036 }
00037
00038 void CPadLinkItem::OnShow()
00039 {
00040   CPadDoc* pDoc = (CPadDoc*)GetDocument();
00041   ENSURE(pDoc != NULL);
00042   ENSURE_VALID(pDoc);
00043   ASSERT_KINDOF(CPadDoc, pDoc);
00044   pDoc->SetSelection(m_nBeg, m_nEnd);
00045
00046   CEmbeddedItem::OnShow();
00047 }
00048
00049 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/DlgToolTips.h Source File

  • vc2008fp
  • DlgToolTips

DlgToolTips.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"   // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CDlgToolTipsApp:
00021 // See DlgToolTips.cpp for the implementation of this class
00022 //
00023
00024 class CDlgToolTipsApp : public CWinAppEx
00025 {
00026 public:
00027   CDlgToolTipsApp();
00028
00029 // Overrides
00030   public:
00031   virtual BOOL InitInstance();
00032
00033 // Implementation
00034
00035   DECLARE_MESSAGE_MAP()
00036 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/OptionsPage.h Source File

  • vc2008fp
  • MSOffice2007Demo

OptionsPage.h

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #pragma once
00013
00014 #include "DlgBanner.h"
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017 // CDemoOptionsPage dialog
00018
00019 class CDemoOptionsPage : public CMFCPropertyPage
00020 {
00021   DECLARE_DYNCREATE(CDemoOptionsPage)
00022
00023 // Construction
00024 public:
00025   CDemoOptionsPage();
00026   ~CDemoOptionsPage();
00027
00028 // Dialog Data
00029   //{{AFX_DATA(CDemoOptionsPage)
00030   enum { IDD = IDD_POPULAR_PAGE };
00031   CDlgBanner m_wndBanner;
00032   CComboBox m_wndColorScheme;
00033   int m_nColorScheme;
00034   int m_nTooltipStyle;
00035   BOOL m_bShowDevTab;
00036   BOOL m_bShowFloaty;
00037   BOOL m_bShowKeyTips;
00038   //}}AFX_DATA
00039
00040 // Overrides
00041 public:
00042   virtual void OnOK();
00043 protected:
00044   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00045
00046 // Implementation
00047 protected:
00048   //{{AFX_MSG(CDemoOptionsPage)
00049   afx_msg void OnSize(UINT nType, int cx, int cy);
00050   //}}AFX_MSG
00051
00052   DECLARE_MESSAGE_MAP()
00053
00054   virtual BOOL OnInitDialog();
00055 };
00056
00057 class CDemoOptionsPropSheet : public CMFCPropertySheet
00058 {
00059 public:
00060   CDemoOptionsPropSheet(CWnd* pWndParent, UINT nSelectedPage = 0);
00061
00062 public:
00063   virtual BOOL OnInitDialog();
00064
00065 protected:
00066   virtual void OnDrawPageHeader(CDC* pDC, int nPage, CRect rectHeader);
00067
00068   CMFCToolBarImages m_Icons;
00069   CMFCControlRenderer m_Pat[4];
00070 };
00071
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/speakn/speakn.cpp Source File

  • advanced
  • speakn

speakn.cpp

Go to the documentation of this file.
00001 // speakn.cpp : Defines the class behaviors for the SpeakN application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #include "speakn.h"
00015 #include <mmsystem.h>
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // Sound helpers
00019
00020 static void PlaySound(LPCTSTR lpszSound)
00021 {
00022   HRSRC hRes; // resource handle to wave file
00023   HGLOBAL hData;
00024   BOOL bOk = FALSE;
00025   if ((hRes = ::FindResource(AfxGetResourceHandle(), lpszSound,
00026     _T("sound"))) != NULL &&
00027     (hData = ::LoadResource(AfxGetResourceHandle(), hRes)) != NULL)
00028   {
00029     // found the resource, play it
00030     bOk = sndPlaySound((LPCTSTR)::LockResource(hData),
00031       SND_MEMORY|SND_SYNC|SND_NODEFAULT);
00032     FreeResource(hData);
00033   }
00034   if (!bOk)
00035   {
00036     static BOOL bReported = FALSE;
00037     if (!bReported)
00038     {
00039       AfxMessageBox(IDS_CANNOT_PLAY_SOUND);
00040       bReported = TRUE;       // once please
00041     }
00042   }
00043 }
00044
00045 inline static void PlaySound(UINT nIDS)
00046   { PlaySound(MAKEINTRESOURCE(nIDS)); }
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CSpeakNDlg
00050
00051 CSpeakNDlg::CSpeakNDlg(BOOL bNoPen)
00052   : CDialog(bNoPen ? IDD_NOPENDIALOG : CSpeakNDlg::IDD)
00053 {
00054   //{{AFX_DATA_INIT(CSpeakNDlg)
00055     // NOTE: the ClassWizard will add member initialization here
00056   //}}AFX_DATA_INIT
00057
00058   m_bNoPen = bNoPen;
00059   m_lpszNextQuestion = NULL;
00060   m_bNoAnswerCheck = FALSE;
00061 }
00062
00063 BEGIN_MESSAGE_MAP(CSpeakNDlg, CDialog)
00064   //{{AFX_MSG_MAP(CSpeakNDlg)
00065   ON_COMMAND(IDC_REPLAY_SOUND, OnReplaySound)
00066   ON_COMMAND(IDC_GIVE_UP, OnGiveUp)
00067   ON_COMMAND(IDC_PICTURE, OnReplaySound)
00068   ON_EN_CHANGE(IDC_INPUT_EDIT, OnUpdateStatus)
00069   //}}AFX_MSG_MAP
00070 END_MESSAGE_MAP()
00071
00072 BOOL CSpeakNDlg::LoadLesson(LPCTSTR lpLessonName)
00073 {
00074   // load lesson from resource
00075   HRSRC hRes; // resource handle to lesson data
00076   HGLOBAL hData;
00077   if ((hRes = ::FindResource(AfxGetResourceHandle(), lpLessonName,
00078     _T("lesson"))) == NULL ||
00079     (hData = ::LoadResource(AfxGetResourceHandle(), hRes)) == NULL)
00080     return FALSE;
00081   m_lpszNextQuestion = (LPCSTR)::LockResource(hData);
00082   return TRUE;
00083 }
00084
00085 void CSpeakNDlg::DoDataExchange(CDataExchange* pDX)
00086 {
00087   CDialog::DoDataExchange(pDX);
00088   //{{AFX_DATA_MAP(CSpeakNDlg)
00089   DDX_Control(pDX, IDOK, m_buttonNext);
00090   //}}AFX_DATA_MAP
00091 }
00092
00093
00094 BOOL CSpeakNDlg::OnInitDialog()
00095 {
00096   UpdateData(FALSE); // call DoDataExchange to initialize m_buttonNext
00097   m_buttonNext.EnableWindow(FALSE);
00098
00099   ASSERT(m_targetWord.IsEmpty());     // not started yet
00100
00101   // set the font of the prompt text to something bigger
00102   LOGFONT logfont;
00103   memset(&logfont, 0, sizeof(logfont));
00104   logfont.lfHeight = 40;
00105   logfont.lfWeight = FW_BOLD;
00106   CString szFont;
00107   szFont.LoadString(IDS_FONT_NAME);           // TrueType font
00108   _tcscpy_s(logfont.lfFaceName, LF_FACESIZE, szFont);
00109   VERIFY(m_biggerFont.CreateFontIndirect(&logfont));
00110   PromptText().SetFont(&m_biggerFont);
00111   InputEdit().SetFont(&m_biggerFont);
00112
00113   // load the bitmaps for bitmap buttons
00114   VERIFY(m_replayButton.AutoLoad(IDC_REPLAY_SOUND, this));
00115   InputEdit().ShowWindow(FALSE);      // start with input disabled
00116
00117   // load initial picture
00118   VERIFY(m_pictureButton.SubclassDlgItem(IDC_PICTURE, this));
00119   VERIFY(m_pictureButton.LoadBitmaps(_T("intro"), NULL, NULL));
00120
00121   // Make the dialog visible, and update
00122   ShowWindow(TRUE);       // SHOW_OPENWINDOW
00123   UpdateWindow();
00124
00125   PlaySound(IDSOUND_WELCOME);
00126   AdvanceLesson();
00127   return FALSE;       // focus already set
00128 }
00129
00130 void CSpeakNDlg::OnReplaySound()
00131 {
00132   InputEdit().SetFocus();
00133   PlaySound(m_targetRes);
00134 }
00135
00136 void CSpeakNDlg::OnOK()
00137 {
00138   // check results
00139   CString result;
00140   InputEdit().GetWindowText(result);
00141   if (result != m_targetWord)
00142   {
00143     PlaySound(IDSOUND_INCORRECT);
00144     AfxMessageBox(IDS_TRY_AGAIN);
00145     return;
00146   }
00147   PlaySound(IDSOUND_CORRECT);
00148   AdvanceLesson();
00149 }
00150
00151 void CSpeakNDlg::OnGiveUp()
00152 {
00153   PlaySound(IDSOUND_GIVEUP);
00154   SetAnswerText(m_targetWord);        // show answer
00155   OnReplaySound();
00156   AdvanceLesson();
00157 }
00158
00159 void CSpeakNDlg::SetAnswerText(LPCTSTR lpsz)
00160 {
00161   // setting the window text for an edit control will cause EN_CHANGE
00162   //  control notifications, so we lock them out while setting the
00163   //  text programmatically
00164   ASSERT(!m_bNoAnswerCheck);
00165   m_bNoAnswerCheck = TRUE;
00166   InputEdit().SetWindowText(lpsz);
00167   m_bNoAnswerCheck = FALSE;
00168 }
00169
00170 /////////////////////////////////////////////////////////////////////////////
00171 // Advancing to the next lesson
00172
00173 void CSpeakNDlg::AdvanceLesson()
00174 {
00175   if (*m_lpszNextQuestion == '\0')
00176   {
00177     // out of questions
00178     PlaySound(IDSOUND_GOODBYE);
00179     EndDialog(IDOK);
00180     return;
00181   }
00182
00183 // The lesson resource consists of several pairs of words (that the user guesses)
00184 // and bitmap resource names.  The words and resource names are stored in the
00185 // resource as ANSI text.  This text must be converted to UNICODE.
00186
00187 #ifdef _UNICODE
00188   TCHAR szT[20];
00189   int nLen;
00190   nLen = strlen(m_lpszNextQuestion);
00191   mbstowcs(szT, m_lpszNextQuestion, nLen);
00192   szT[nLen] = 0;
00193   m_targetWord = szT;
00194   m_lpszNextQuestion += nLen + 1;
00195
00196   nLen = strlen(m_lpszNextQuestion);
00197   mbstowcs(szT, m_lpszNextQuestion, nLen);
00198   szT[nLen] = 0;
00199   m_targetRes = szT;
00200   m_lpszNextQuestion += nLen + 1;
00201 #else
00202   m_targetWord = m_lpszNextQuestion;
00203   m_lpszNextQuestion += m_targetWord.GetLength() + 1;
00204
00205   m_targetRes = m_lpszNextQuestion;
00206   m_lpszNextQuestion += m_targetRes.GetLength() + 1;
00207 #endif
00208
00209   m_targetWord.MakeUpper();
00210   m_targetRes.MakeUpper();
00211
00212   PlaySound(IDSOUND_QUESTION);
00213
00214   // draw the picture (bitmap with the same name as the target)
00215   if (!m_pictureButton.LoadBitmaps(m_targetRes))
00216   {
00217     AfxMessageBox(IDS_PICTURE_UNAVAILABLE);
00218     VERIFY(m_pictureButton.LoadBitmaps(_T("intro"), NULL, NULL));
00219       // go back to the initial bitmap
00220   }
00221   m_pictureButton.Invalidate(TRUE);
00222
00223   SetAnswerText(_T(""));
00224   InputEdit().ShowWindow(TRUE);
00225
00226   OnUpdateStatus();               // set appropriate face
00227   OnReplaySound();                // ask question
00228
00229   if (*m_lpszNextQuestion == '\0')
00230   {
00231     CString strDone;
00232     strDone.LoadString(IDS_DONE);
00233     m_buttonNext.SetWindowText(strDone);
00234   }
00235 }
00236
00237 /////////////////////////////////////////////////////////////////////////////
00238 // Happy face status indicator
00239
00240 void CSpeakNDlg::OnUpdateStatus()
00241 {
00242   CString result;
00243   InputEdit().GetWindowText(result);
00244
00245   UINT nIDI = IDI_FACE_NEUTRAL;       // default
00246   if (result == m_targetWord)
00247   {
00248     m_buttonNext.EnableWindow();
00249     nIDI = IDI_FACE_HAPPIER;        // exact match
00250   }
00251   else
00252   {
00253     m_buttonNext.EnableWindow(FALSE);
00254     if (result.IsEmpty())
00255       nIDI = IDI_FACE_NEUTRAL;        // not started yet
00256     else
00257     {
00258       nIDI = (_tcsncmp(m_targetWord, result, _tcslen(result)) == 0?
00259         IDI_FACE_HAPPY : IDI_FACE_SAD);
00260     }
00261   }
00262
00263   HICON hNew = ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(nIDI));
00264   ASSERT(hNew != NULL);
00265   ::DestroyIcon(StatusFace().SetIcon(hNew));
00266   UpdateWindow();                 // draw everything now
00267
00268   if (m_bNoAnswerCheck)
00269     return;     // don't update
00270
00271   if (nIDI == IDI_FACE_HAPPIER)
00272   {
00273     // exact match - automatic advance
00274     OnReplaySound();
00275     PlaySound(IDSOUND_CORRECT);
00276   }
00277 }
00278
00279 /////////////////////////////////////////////////////////////////////////////
00280 // CSpeakNApp
00281
00282 BOOL CSpeakNApp::InitInstance()
00283 {
00284   BOOL bNoPen = TRUE;  // no pen-aware controls
00285
00286   // Creates a simple dialog and do it
00287   CSpeakNDlg mainDlg(bNoPen);
00288   if (!mainDlg.LoadLesson(_T("SAMPLE1")))
00289     return FALSE;
00290   m_pMainWnd = &mainDlg;
00291   mainDlg.DoModal();
00292
00293   // that's all, quit app
00294   ::PostQuitMessage(0);
00295   return TRUE;
00296 }
00297
00298 CSpeakNApp NEAR theApp;
00299
00300 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/VisualStudioDemoView.cpp Source File

  • vc2008fp
  • VisualStudioDemo

VisualStudioDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "MainFrm.h"
00012 #include "VisualStudioDemo.h"
00013
00014 #include "VisualStudioDemoDoc.h"
00015 #include "VisualStudioDemoView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #endif
00020
00021 // CVisualStudioDemoView
00022
00023 IMPLEMENT_DYNCREATE(CVisualStudioDemoView, CEditView)
00024
00025 BEGIN_MESSAGE_MAP(CVisualStudioDemoView, CEditView)
00026   // Standard printing commands
00027   ON_COMMAND(ID_FILE_PRINT, &CEditView::OnFilePrint)
00028   ON_COMMAND(ID_FILE_PRINT_DIRECT, &CEditView::OnFilePrint)
00029   ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CVisualStudioDemoView::OnFilePrintPreview)
00030   ON_COMMAND(ID_EDIT_TOGGLEBREAKPOINT, &CVisualStudioDemoView::OnEditTogglebreakpoint)
00031   ON_COMMAND(ID_EDIT_FIND_COMBO, OnFind)
00032 END_MESSAGE_MAP()
00033
00034 // CVisualStudioDemoView construction/destruction
00035
00036 CVisualStudioDemoView::CVisualStudioDemoView()
00037 {
00038   // TODO: add construction code here
00039 }
00040
00041 CVisualStudioDemoView::~CVisualStudioDemoView()
00042 {
00043 }
00044
00045 BOOL CVisualStudioDemoView::PreCreateWindow(CREATESTRUCT& cs)
00046 {
00047   // TODO: Modify the Window class or styles here by modifying
00048   //  the CREATESTRUCT cs
00049
00050   BOOL bPreCreated = CEditView::PreCreateWindow(cs);
00051   cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
00052
00053   return bPreCreated;
00054 }
00055
00056 // CVisualStudioDemoView printing
00057
00058 BOOL CVisualStudioDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00059 {
00060   // default CEditView preparation
00061   return CEditView::OnPreparePrinting(pInfo);
00062 }
00063
00064 void CVisualStudioDemoView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
00065 {
00066   // Default CEditView begin printing
00067   CEditView::OnBeginPrinting(pDC, pInfo);
00068 }
00069
00070 void CVisualStudioDemoView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
00071 {
00072   // Default CEditView end printing
00073   CEditView::OnEndPrinting(pDC, pInfo);
00074 }
00075
00076 void CVisualStudioDemoView::OnFilePrintPreview()
00077 {
00078   AFXPrintPreview(this);
00079 }
00080
00081 // CVisualStudioDemoView diagnostics
00082
00083 #ifdef _DEBUG
00084 void CVisualStudioDemoView::AssertValid() const
00085 {
00086   CEditView::AssertValid();
00087 }
00088
00089 void CVisualStudioDemoView::Dump(CDumpContext& dc) const
00090 {
00091   CEditView::Dump(dc);
00092 }
00093
00094 CVisualStudioDemoDoc* CVisualStudioDemoView::GetDocument() const // non-debug version is inline
00095 {
00096   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVisualStudioDemoDoc)));
00097   return(CVisualStudioDemoDoc*)m_pDocument;
00098 }
00099 #endif //_DEBUG
00100
00101 // CVisualStudioDemoView message handlers
00102
00103 void CVisualStudioDemoView::OnEditTogglebreakpoint()
00104 {
00105   // TODO: Add your command handler code here
00106 }
00107
00108 void CVisualStudioDemoView::OnFind()
00109 {
00110   CString strFindText;
00111   VerifyFindString(((CMainFrame*)AfxGetMainWnd())->GetFindCombo(), strFindText);
00112
00113   if (!strFindText.IsEmpty())
00114   {
00115     FindText(strFindText);
00116   }
00117 }
00118
00119 void CVisualStudioDemoView::VerifyFindString(CMFCToolBarComboBoxButton* pFindCombo, CString& strFindText)
00120 {
00121   if (pFindCombo == NULL)
00122   {
00123     return;
00124   }
00125
00126   BOOL bIsLastCommandFromButton = CMFCToolBar::IsLastCommandFromButton(pFindCombo);
00127
00128   if (bIsLastCommandFromButton)
00129   {
00130     strFindText = pFindCombo->GetText();
00131   }
00132
00133   CComboBox* pCombo = pFindCombo->GetComboBox();
00134
00135   if (!strFindText.IsEmpty())
00136   {
00137     const int nCount = pCombo->GetCount();
00138     int ind = 0;
00139     CString strCmpText;
00140
00141     while (ind < nCount)
00142     {
00143       pCombo->GetLBText(ind, strCmpText);
00144
00145       if (strCmpText.GetLength() == strFindText.GetLength())
00146       {
00147         if (strCmpText == strFindText)
00148           break;
00149       }
00150
00151       ind++;
00152     }
00153
00154     if (ind < nCount)
00155     {
00156       pCombo->DeleteString(ind);
00157     }
00158
00159     pCombo->InsertString(0,strFindText);
00160     pCombo->SetCurSel(0);
00161
00162     if (!bIsLastCommandFromButton)
00163     {
00164       pFindCombo->SetText(strFindText);
00165     }
00166   }
00167 }
00168
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColourTableEntry Member List

This is the complete list of members for ColourTableEntry, including all inherited members.
crColour | ColourTableEntry
szName | ColourTableEntry
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CScript Member List

This is the complete list of members for CScript, including all inherited members.
AddNamedItem(LPCTSTR pszItemName) | CScript |
CScript(CScriptManager *pManager) | CScript |
EnableModeless(BOOL tEnable) | CScript | [protected]
FindMacro(LPCTSTR pszMacroName) | CScript |
GetDocVersionString(BSTR *pbstrVersion) | CScript | [protected]
GetFirstMacroPosition() | CScript |
GetItemInfo(LPCOLESTR pszName, DWORD dwReturnMask, IUnknown **ppItem, ITypeInfo **ppTypeInfo) | CScript | [protected]
GetLCID(LCID *plcid) | CScript | [protected]
GetName() | CScript |
GetNextMacroName(POSITION &posMacro) | CScript |
GetWindow(HWND *phWindow) | CScript | [protected]
LoadScript(LPCTSTR pszFileName, LPCTSTR pszScriptName) | CScript |
m_mapMacros | CScript | [protected]
m_pActiveScript | CScript | [protected]
m_pActiveScriptParse | CScript | [protected]
m_pDispatch | CScript | [protected]
m_pManager | CScript | [protected]
m_strScriptName | CScript | [protected]
m_strScriptText | CScript | [protected]
OnEnterScript() | CScript | [protected]
OnLeaveScript() | CScript | [protected]
OnScriptError(IActiveScriptError *pError) | CScript | [protected]
OnScriptTerminate(const VARIANT *pvarResult, const EXCEPINFO *pExcepInfo) | CScript | [protected]
OnStateChange(SCRIPTSTATE eState) | CScript | [protected]
RunMacro(LPCTSTR pszMacroName) | CScript |
Unload() | CScript |
~CScript() | CScript |
Generated on Sat Nov 23 2024 17:01:07 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/formatpa.cpp Source File

  • vc2008fp
  • WordPad

formatpa.cpp

Go to the documentation of this file.
00001 //
00002 // formatpa.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "wordpad.h"
00016 #include "formatpa.h"
00017 #include "ddxm.h"
00018 #include "helpids.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 const DWORD CFormatParaDlg::m_nHelpIDs[] =
00026 {
00027   IDC_EDIT_LEFT, IDH_WORDPAD_INDENT_LEFT,
00028   IDC_EDIT_RIGHT, IDH_WORDPAD_INDENT_RIGHT,
00029   IDC_EDIT_FIRST_LINE, IDH_WORDPAD_INDENT_FIRST,
00030   IDC_BOX, IDH_COMM_GROUPBOX,
00031   IDC_COMBO_ALIGNMENT, IDH_WORDPAD_ALIGN,
00032   IDC_TEXT_ALIGNMENT, IDH_WORDPAD_ALIGN,
00033   0, 0
00034 };
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CFormatParaDlg dialog
00038
00039 CFormatParaDlg::CFormatParaDlg(WPD_PARAFORMAT& pf, CWnd* pParent /*=NULL*/)
00040   : CCSDialog(CFormatParaDlg::IDD, pParent)
00041 {
00042   m_pf = pf;
00043   if (m_pf.dwMask & PFM_ALIGNMENT)
00044   {
00045     if (m_pf.wAlignment & PFA_LEFT && m_pf.wAlignment & PFA_RIGHT)
00046       m_nAlignment = 2;
00047     else
00048       m_nAlignment = (m_pf.wAlignment & PFA_LEFT) ? 0 : 1;
00049   }
00050   else
00051     m_nAlignment = -1;
00052   //{{AFX_DATA_INIT(CFormatParaDlg)
00053   m_nFirst = 0;
00054   m_nLeft = 0;
00055   m_nRight = 0;
00056   //}}AFX_DATA_INIT
00057 }
00058
00059 void CFormatParaDlg::DoDataExchange(CDataExchange* pDX)
00060 {
00061   CCSDialog::DoDataExchange(pDX);
00062   //{{AFX_DATA_MAP(CFormatParaDlg)
00063   DDX_CBIndex(pDX, IDC_COMBO_ALIGNMENT, m_nAlignment);
00064   DDX_Twips(pDX, IDC_EDIT_FIRST_LINE, m_nFirst);
00065   DDV_MinMaxTwips(pDX, m_nFirst, -31680, 31680);
00066   DDX_Twips(pDX, IDC_EDIT_LEFT, m_nLeft);
00067   DDV_MinMaxTwips(pDX, m_nLeft, -31680, 31680);
00068   DDX_Twips(pDX, IDC_EDIT_RIGHT, m_nRight);
00069   DDV_MinMaxTwips(pDX, m_nRight, -31680, 31680);
00070   //}}AFX_DATA_MAP
00071 }
00072
00073 BEGIN_MESSAGE_MAP(CFormatParaDlg, CCSDialog)
00074   //{{AFX_MSG_MAP(CFormatParaDlg)
00075   //}}AFX_MSG_MAP
00076 END_MESSAGE_MAP()
00077
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CFormatParaDlg message handlers
00081
00082 void CFormatParaDlg::OnOK()
00083 {
00084   CCSDialog::OnOK();
00085   m_pf.dwMask = 0;
00086   if (m_nAlignment >= 0)
00087   {
00088     ASSERT(m_nAlignment < 3);
00089     m_pf.dwMask |= PFM_ALIGNMENT;
00090     m_pf.wAlignment = (WORD)((m_nAlignment == 0) ? PFA_LEFT :
00091       (m_nAlignment == 1) ? PFA_RIGHT : PFA_CENTER);
00092   }
00093   if (m_nRight != DDXM_BLANK)
00094     m_pf.dwMask |= PFM_RIGHTINDENT;
00095   if (m_nLeft != DDXM_BLANK && m_nFirst != DDXM_BLANK)
00096     m_pf.dwMask |= PFM_STARTINDENT;
00097   if (m_nFirst != DDXM_BLANK)
00098     m_pf.dwMask |= PFM_OFFSET;
00099
00100   m_pf.dxRightIndent = m_nRight;
00101   m_pf.dxOffset = -m_nFirst;
00102   m_pf.dxStartIndent = m_nLeft + m_nFirst;
00103 }
00104
00105 BOOL CFormatParaDlg::OnInitDialog()
00106 {
00107   CComboBox* pBox = (CComboBox*)GetDlgItem(IDC_COMBO_ALIGNMENT);
00108   CString str;
00109   BOOL bValidString;
00110
00111   bValidString = str.LoadString(IDS_LEFT);
00112   ASSERT(bValidString);
00113   pBox->AddString(str);
00114
00115   bValidString = str.LoadString(IDS_RIGHT);
00116   ASSERT(bValidString);
00117   pBox->AddString(str);
00118
00119   bValidString = str.LoadString(IDS_CENTER);
00120   ASSERT(bValidString);
00121   pBox->AddString(str);
00122
00123   if (m_nWordWrap == 0)
00124   {
00125     GetDlgItem(IDC_COMBO_ALIGNMENT)->EnableWindow(FALSE);
00126     GetDlgItem(IDC_TEXT_ALIGNMENT)->EnableWindow(FALSE);
00127   }
00128
00129   m_nRight = (m_pf.dwMask & PFM_RIGHTINDENT) ? m_pf.dxRightIndent : DDXM_BLANK;
00130   if (m_pf.dwMask & PFM_OFFSET)
00131   {
00132     m_nFirst = -m_pf.dxOffset;
00133     m_nLeft = (m_pf.dwMask & PFM_STARTINDENT) ?
00134       m_pf.dxStartIndent + m_pf.dxOffset : DDXM_BLANK;
00135   }
00136   else
00137     m_nLeft = m_nFirst = DDXM_BLANK;
00138
00139   CCSDialog::OnInitDialog();
00140   return TRUE;  // return TRUE unless you set the focus to a control
00141           // EXCEPTION: OCX Property Pages should return FALSE
00142 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtrecalc/calcthrd.h Source File

  • advanced
  • mtrecalc

calcthrd.h

Go to the documentation of this file.
00001 // calcthrd.h : interface of the controlling function of the recalc worker thread
00002 //              and of the CRecalcUIThread class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 struct CRecalcThreadInfo
00014 {
00015   int m_nInt1;
00016   int m_nInt2;
00017   int m_nSum;
00018   HWND m_hwndNotifyRecalcDone;
00019   HANDLE m_hEventStartRecalc;
00020   HANDLE m_hEventRecalcDone;
00021   HANDLE m_hEventKillRecalcThread;
00022   HANDLE m_hEventRecalcThreadKilled;
00023   int m_nRecalcSpeedSeconds;
00024   HWND m_hwndNotifyProgress;
00025 };
00026
00027 // Controlling function for the worker thread.
00028 UINT RecalcThreadProc(LPVOID pParam /* CRecalcThreadInfo ptr */);
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/mfcdual.h Source File

  • ole
  • acdual

mfcdual.h

Go to the documentation of this file.
00001 // mfcdual.h: Helpful macros for adding dual interface support to
00002 //            MFC applications
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////
00014 // BEGIN_DUAL_INTERFACE_PART is just like BEGIN_INTERFACE_PART,
00015 // except that it also adds the IDispatch methods to your class
00016 // declaration.
00017 #define BEGIN_DUAL_INTERFACE_PART(localClass, baseClass) \
00018   BEGIN_INTERFACE_PART(localClass, baseClass) \
00019      STDMETHOD(GetTypeInfoCount)(UINT FAR* pctinfo); \
00020      STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo); \
00021      STDMETHOD(GetIDsOfNames)(REFIID riid, OLECHAR FAR* FAR* rgszNames, UINT cNames, LCID lcid, DISPID FAR* rgdispid); \
00022      STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pdispparams, VARIANT FAR* pvarResult, EXCEPINFO FAR* pexcepinfo, UINT FAR* puArgErr); \
00023
00024 /////////////////////////////////////////////////////////////////////
00025 // END_DUAL_INTERFACE_PART is just like END_INTERFACE_PART. It
00026 // is only added for symmetry...
00027 #define END_DUAL_INTERFACE_PART(localClass) \
00028   END_INTERFACE_PART(localClass) \
00029
00030
00031
00032 /////////////////////////////////////////////////////////////////////
00033 // DELEGATE_DUAL_INTERFACE expands to define the standard IDispatch
00034 // methods for a dual interface, delegating back to the default
00035 // MFC implementation
00036 #define DELEGATE_DUAL_INTERFACE(objectClass, dualClass) \
00037   STDMETHODIMP_(ULONG) objectClass::X##dualClass::AddRef() \
00038   { \
00039     METHOD_PROLOGUE(objectClass, dualClass) \
00040     return pThis->ExternalAddRef(); \
00041   } \
00042   STDMETHODIMP_(ULONG) objectClass::X##dualClass::Release() \
00043   { \
00044     METHOD_PROLOGUE(objectClass, dualClass) \
00045     return pThis->ExternalRelease(); \
00046   } \
00047   STDMETHODIMP objectClass::X##dualClass::QueryInterface( \
00048     REFIID iid, LPVOID* ppvObj) \
00049   { \
00050     METHOD_PROLOGUE(objectClass, dualClass) \
00051     return pThis->ExternalQueryInterface(&iid, ppvObj); \
00052   } \
00053   STDMETHODIMP objectClass::X##dualClass::GetTypeInfoCount( \
00054     UINT FAR* pctinfo) \
00055   { \
00056     METHOD_PROLOGUE(objectClass, dualClass) \
00057     LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); \
00058     ENSURE(lpDispatch != NULL); \
00059     return lpDispatch->GetTypeInfoCount(pctinfo); \
00060   } \
00061   STDMETHODIMP objectClass::X##dualClass::GetTypeInfo( \
00062     UINT itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo) \
00063   { \
00064     METHOD_PROLOGUE(objectClass, dualClass) \
00065     LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); \
00066     ENSURE(lpDispatch != NULL); \
00067     return lpDispatch->GetTypeInfo(itinfo, lcid, pptinfo); \
00068   } \
00069   STDMETHODIMP objectClass::X##dualClass::GetIDsOfNames( \
00070     REFIID riid, OLECHAR FAR* FAR* rgszNames, UINT cNames, \
00071     LCID lcid, DISPID FAR* rgdispid) \
00072   { \
00073     METHOD_PROLOGUE(objectClass, dualClass) \
00074     LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); \
00075     ENSURE(lpDispatch != NULL); \
00076     return lpDispatch->GetIDsOfNames(riid, rgszNames, cNames, \
00077                      lcid, rgdispid); \
00078   } \
00079   STDMETHODIMP objectClass::X##dualClass::Invoke( \
00080     DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, \
00081     DISPPARAMS FAR* pdispparams, VARIANT FAR* pvarResult, \
00082     EXCEPINFO FAR* pexcepinfo, UINT FAR* puArgErr) \
00083   { \
00084     METHOD_PROLOGUE(objectClass, dualClass) \
00085     LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); \
00086     ENSURE(lpDispatch != NULL); \
00087     return lpDispatch->Invoke(dispidMember, riid, lcid, \
00088                   wFlags, pdispparams, pvarResult, \
00089                   pexcepinfo, puArgErr); \
00090   } \
00091
00092
00093
00094 /////////////////////////////////////////////////////////////////////
00095 // TRY_DUAL and CATCH_ALL_DUAL are used to provide exception handling
00096 // for your dual interface methods. CATCH_ALL_DUAL takes care of
00097 // returning the appropriate error code.
00098
00099 #define TRY_DUAL(iidSource) \
00100   HRESULT _hr = S_OK; \
00101   REFIID  _riidSource = iidSource; \
00102   TRY \
00103
00104 #define CATCH_ALL_DUAL \
00105   CATCH(COleException, e) \
00106   { \
00107     _hr = e->m_sc; \
00108   } \
00109   AND_CATCH_ALL(e) \
00110   { \
00111     __pragma(warning(push)) \
00112     __pragma(warning(disable:6246)) /*disable _ctlState prefast warning*/ \
00113     AFX_MANAGE_STATE(pThis->m_pModuleState); \
00114     __pragma(warning(pop)) \
00115     _hr = DualHandleException(_riidSource, e); \
00116   } \
00117   END_CATCH_ALL \
00118   return _hr; \
00119
00120 /////////////////////////////////////////////////////////////////////
00121 // DualHandleException is a helper function used to set the system's
00122 // error object, so that container applications that call through
00123 // VTBLs can retrieve rich error information
00124 HRESULT DualHandleException(REFIID riidSource, const CException* pAnyException);
00125
00126 /////////////////////////////////////////////////////////////////////
00127 // DECLARE_DUAL_ERRORINFO expands to declare the ISupportErrorInfo
00128 // support class. It works together with DUAL_ERRORINFO_PART and
00129 // IMPLEMENT_DUAL_ERRORINFO defined below.
00130 #define DECLARE_DUAL_ERRORINFO() \
00131   BEGIN_INTERFACE_PART(SupportErrorInfo, ISupportErrorInfo) \
00132     STDMETHOD(InterfaceSupportsErrorInfo)(THIS_ REFIID riid); \
00133   END_INTERFACE_PART(SupportErrorInfo) \
00134
00135 /////////////////////////////////////////////////////////////////////
00136 // DUAL_ERRORINFO_PART adds the appropriate entry to the interface map
00137 // for ISupportErrorInfo, if you used DECLARE_DUAL_ERRORINFO.
00138 #define DUAL_ERRORINFO_PART(objectClass) \
00139   INTERFACE_PART(objectClass, IID_ISupportErrorInfo, SupportErrorInfo) \
00140
00141 /////////////////////////////////////////////////////////////////////
00142 // IMPLEMENT_DUAL_ERRORINFO expands to an implementation of
00143 // ISupportErrorInfo which matches the declaration in
00144 // DECLARE_DUAL_ERRORINFO.
00145 #define IMPLEMENT_DUAL_ERRORINFO(objectClass, riidSource) \
00146   STDMETHODIMP_(ULONG) objectClass::XSupportErrorInfo::AddRef() \
00147   { \
00148     METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
00149     return pThis->ExternalAddRef(); \
00150   } \
00151   STDMETHODIMP_(ULONG) objectClass::XSupportErrorInfo::Release() \
00152   { \
00153     METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
00154     return pThis->ExternalRelease(); \
00155   } \
00156   STDMETHODIMP objectClass::XSupportErrorInfo::QueryInterface( \
00157     REFIID iid, LPVOID* ppvObj) \
00158   { \
00159     METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
00160     return pThis->ExternalQueryInterface(&iid, ppvObj); \
00161   } \
00162   STDMETHODIMP objectClass::XSupportErrorInfo::InterfaceSupportsErrorInfo( \
00163     REFIID iid) \
00164   { \
00165     METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
00166     return (iid == riidSource) ? S_OK : S_FALSE; \
00167   }
00168
00169
00170
00171 /////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawRect Member List

This is the complete list of members for CDrawRect, including all inherited members.
active enum value | CDrawObj |
CanChangeFillColor() const | CDrawRect | [inline, virtual]
CanChangeLineColor() const | CDrawObj | [inline, virtual]
CanChangeLineWeight() const | CDrawObj | [inline, virtual]
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawObj() | CDrawObj | [protected]
CDrawObj(const CRect &position) | CDrawObj |
CDrawRect() | CDrawRect | [protected]
CDrawRect(const CRect &position) | CDrawRect |
CDrawRect() | CDrawRect | [protected]
CDrawRect(const CRect &position) | CDrawRect |
Clone(CDrawDoc *pDoc) | CDrawRect | [virtual]
Clone(CDrawDoc *pDoc) | CDrawRect | [virtual]
CRectTool class | CDrawRect | [friend]
DECLARE_SERIAL(CDrawRect) | CDrawRect | [protected]
DECLARE_SERIAL(CDrawRect) | CDrawRect | [protected]
CDrawObj::DECLARE_SERIAL(CDrawObj) | CDrawObj | [protected]
Draw(CDC *pDC) | CDrawRect | [virtual]
Draw(CDC *pDC) | CDrawRect | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
DrawTracker(CDC *pDC, TrackerState state) | CDrawObj | [virtual]
ellipse enum value | CDrawRect | [protected]
EnableFill(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
EnableLine(BOOL bEnable, BOOL bPreview=FALSE) | CDrawObj |
GetFillColor() const | CDrawObj | [inline]
GetHandle(int nHandle) | CDrawRect | [virtual]
GetHandle(int nHandle) | CDrawRect | [virtual]
GetHandleCount() | CDrawRect | [virtual]
GetHandleCount() | CDrawRect | [virtual]
GetHandleCursor(int nHandle) | CDrawRect | [virtual]
GetHandleCursor(int nHandle) | CDrawRect | [virtual]
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetHandleRect(int nHandleID, CDrawView *pView) | CDrawObj |
GetLineColor() const | CDrawObj | [inline]
GetLineWeight() const | CDrawObj | [inline]
GetShape() const | CDrawRect | [inline]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
HitTest(CPoint point, CDrawView *pView, BOOL bSelected) | CDrawObj | [virtual]
Intersects(const CRect &rect) | CDrawRect | [virtual]
Intersects(const CRect &rect) | CDrawRect | [virtual]
Invalidate() | CDrawObj |
Invalidate() | CDrawObj |
IsEnableFill() const | CDrawObj | [inline]
IsEnableLine() const | CDrawObj | [inline]
line enum value | CDrawRect | [protected]
m_bBrush | CDrawObj | [protected]
m_bPen | CDrawObj | [protected]
m_logbrush | CDrawObj | [protected]
m_logpen | CDrawObj | [protected]
m_nShape | CDrawRect | [protected]
m_pDocument | CDrawObj |
m_position | CDrawObj |
m_roundness | CDrawRect | [protected]
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawRect | [virtual]
MoveHandleTo(int nHandle, CPoint point, CDrawView *pView=NULL) | CDrawRect | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawObj | [virtual]
MoveTo(const CPoint &position) | CDrawObj | [virtual]
MoveTo(const CRect &positon, CDrawView *pView=NULL) | CDrawObj | [virtual]
normal enum value | CDrawObj |
OnEditProperties() | CDrawObj | [virtual]
OnEditProperties() | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
OnOpen(CDrawView *pView) | CDrawObj | [virtual]
rectangle enum value | CDrawRect | [protected]
Remove() | CDrawObj | [virtual]
Remove() | CDrawObj | [virtual]
roundRectangle enum value | CDrawRect | [protected]
selected enum value | CDrawObj |
Serialize(CArchive &ar) | CDrawRect | [virtual]
Serialize(CArchive &ar) | CDrawRect | [virtual]
SetFillColor(COLORREF color) | CDrawObj | [virtual]
SetFillColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineColor(COLORREF color) | CDrawObj | [virtual]
SetLineColor(COLORREF color, BOOL bPreview=FALSE) | CDrawObj | [virtual]
SetLineWeight(int nWidth, BOOL bPreview=FALSE) | CDrawObj |
Shape enum name | CDrawRect | [protected]
Shape enum name | CDrawRect |
TrackerState enum name | CDrawObj |
TrackerState enum name | CDrawObj |
~CDrawObj() | CDrawObj | [virtual]
~CDrawObj() | CDrawObj | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/MainFrm.h Source File

  • vc2008fp
  • TasksPane

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "TaskPane.h"
00014
00015 #define CFrameWnd CFrameWndEx
00016
00017 class CMainFrame : public CFrameWnd
00018 {
00019   friend class CTasksPaneView;
00020
00021 protected: // create from serialization only
00022   CMainFrame();
00023   DECLARE_DYNCREATE(CMainFrame)
00024
00025 // Attributes
00026 public:
00027
00028 // Operations
00029 public:
00030   void UpdateMRUFilesList ()
00031   {
00032     m_wndTaskPane.UpdateMRUFilesList ();
00033   }
00034
00035 // Overrides
00036   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00037
00038 // Implementation
00039 public:
00040   virtual ~CMainFrame();
00041 #ifdef _DEBUG
00042   virtual void AssertValid() const;
00043   virtual void Dump(CDumpContext& dc) const;
00044 #endif
00045
00046 protected:  // control bar embedded members
00047   CMFCMenuBar     m_wndMenuBar;
00048   CMFCStatusBar m_wndStatusBar;
00049   CMFCToolBar   m_wndToolBar;
00050   CTaskPane     m_wndTaskPane;
00051
00052 protected:
00053   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00054   afx_msg void OnViewCustomize();
00055   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00056   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00057   afx_msg void OnViewTaskpane();
00058   afx_msg void OnUpdateViewTaskpane(CCmdUI* pCmdUI);
00059   afx_msg void OnTask();
00060   afx_msg void OnAppLook(UINT id);
00061   afx_msg void OnUpdateAppLook(CCmdUI* pCmdUI);
00062
00063   DECLARE_MESSAGE_MAP()
00064
00065   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00066   BOOL CreateTaskPane ();
00067
00068   UINT  m_nAppLook;
00069 };
00070
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdidocvw/HelloDoc.h Source File

  • general
  • mdidocvw

HelloDoc.h

Go to the documentation of this file.
00001 // HelloDoc.h : interface of the CHelloDoc class
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014
00015 class CHelloDoc : public CDocument
00016 {
00017 protected: // create from serialization only
00018   CHelloDoc();
00019   DECLARE_DYNCREATE(CHelloDoc)
00020
00021 // Attributes
00022 public:
00023   // hello window color/text parameters
00024   COLORREF m_clrText;
00025   CString m_str;
00026
00027   //state of color buttons
00028   BOOL m_bBlack;
00029   BOOL m_bRed;
00030   BOOL m_bBlue;
00031   BOOL m_bGreen;
00032   BOOL m_bWhite;
00033   BOOL m_bCustom;
00034
00035 // Operations
00036 public:
00037   void ClearAllColors();  //resets all color states to NULL
00038   void SetStrColor(COLORREF clr);
00039   void SetCustomStrColor(COLORREF clr);
00040
00041 // Overrides
00042   // ClassWizard generated virtual function overrides
00043   //{{AFX_VIRTUAL(CHelloDoc)
00044   public:
00045   virtual BOOL OnNewDocument();
00046   virtual void Serialize(CArchive& ar);
00047   //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 public:
00051   virtual ~CHelloDoc();
00052 #ifdef _DEBUG
00053   virtual void AssertValid() const;
00054   virtual void Dump(CDumpContext& dc) const;
00055 #endif
00056
00057 protected:
00058
00059 // Generated message map functions
00060 protected:
00061   //{{AFX_MSG(CHelloDoc)
00062   //}}AFX_MSG
00063   DECLARE_MESSAGE_MAP()
00064 };
00065
00066 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTestApp Member List

This is the complete list of members for CTestApp, including all inherited members.
CTestApp() | CTestApp |
DECLARE_MESSAGE_MAP() | CTestApp |
InitInstance() | CTestApp | [virtual]
OnAppAbout() | CTestApp |
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/doctype.cpp Source File

  • vc2008fp
  • WordPad

doctype.cpp

Go to the documentation of this file.
00001 //
00002 // richdoc.cpp : implementation of the CRichEditDoc class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "resource.h"
00016 #include "strings.h"
00017
00018 #include "multconv.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 static const BYTE byteRTFPrefix[5] = {'{', '\\', 'r', 't', 'f'};
00026 static const BYTE byteWord2Prefix[4] = {0xDB, 0xA5, 0x2D, 0x00};
00027 static const BYTE byteCompFilePrefix[8] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1};
00028 static const BYTE byteWrite1Prefix[2] = {0x31, 0xBE};
00029 static const BYTE byteWrite2Prefix[2] = {0x32, 0xBE};
00030 static const BYTE byteExePrefix[2] = {0x4D, 0x5A};
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033
00034 #ifdef CONVERTERS
00035 static BOOL IsConverterFormat(LPCTSTR pszConverter, LPCTSTR pszPathName);
00036 static BOOL IsWord6(LPCTSTR pszConverter, LPCTSTR pszPathName);
00037 #endif
00038
00039 DocType doctypes[NUM_DOC_TYPES] =
00040 {
00041   DECLARE_DOCTYPE(WINWORD2, FALSE, FALSE, FALSE, NULL),
00042   DECLARE_DOCTYPE(WINWORD6, TRUE, FALSE, TRUE, szWordConverter),
00043   DECLARE_DOCTYPE_SYN(WORDPAD, WINWORD6, TRUE, TRUE, FALSE, szWordConverter),
00044   DECLARE_DOCTYPE(WRITE, TRUE, FALSE, FALSE, szWriteConverter),
00045   DECLARE_DOCTYPE(RICHTEXT, TRUE, TRUE, FALSE, NULL),
00046   DECLARE_DOCTYPE(TEXT, TRUE, TRUE, FALSE, NULL),
00047   DECLARE_DOCTYPE(OEMTEXT, TRUE, TRUE, FALSE, NULL),
00048   DECLARE_DOCTYPE(ALL, TRUE, FALSE, FALSE, NULL),
00049   DECLARE_DOCTYPE(EXE, FALSE, FALSE, FALSE, NULL),
00050   DECLARE_DOCTYPE_NULL(EMBEDDED, FALSE, FALSE, FALSE, NULL)
00051 };
00052
00053 CString DocType::GetString(int nID)
00054 {
00055   ASSERT(idStr != NULL);
00056   CString str;
00057   VERIFY(str.LoadString(idStr));
00058   CString strSub;
00059   AfxExtractSubString(strSub, str, nID);
00060   return strSub;
00061 }
00062
00063 #ifdef CONVERTERS
00064 static BOOL IsConverterFormat(LPCSTR pszConverter, LPCTSTR pszPathName)
00065 {
00066   CConverter conv(pszConverter);
00067   return conv.IsFormatCorrect(pszPathName);
00068 }
00069 #endif
00070
00071 static BOOL IsLeadMatch(CFile& file, const BYTE* pb, UINT nCount)
00072 {
00073   // check for match at beginning of file
00074   BOOL b = FALSE;
00075   BYTE* buf = new BYTE[nCount];
00076
00077   TRY
00078   {
00079     file.SeekToBegin();
00080     memset(buf, 0, nCount);
00081     file.Read(buf, nCount);
00082     if (memcmp(buf, pb, nCount) == 0)
00083       b = TRUE;
00084   }
00085   END_TRY
00086
00087   delete [] buf;
00088   return b;
00089 }
00090
00091 #ifdef CONVERTERS
00092 static BOOL IsWord6(LPCTSTR pszPathName)
00093 {
00094   USES_CONVERSION;
00095   BOOL bRes = FALSE;
00096   // see who created it
00097   LPSTORAGE lpStorage;
00098   SCODE sc = StgOpenStorage(T2COLE(pszPathName), NULL,
00099     STGM_READ|STGM_SHARE_EXCLUSIVE, 0, 0, &lpStorage);
00100   if (sc == NOERROR)
00101   {
00102     LPSTREAM lpStream;
00103     sc = lpStorage->OpenStream(T2COLE(szSumInfo), NULL,
00104       STGM_READ|STGM_SHARE_EXCLUSIVE, NULL, &lpStream);
00105     if (sc == NOERROR)
00106     {
00107       lpStream->Release();
00108       bRes = TRUE;
00109     }
00110     lpStorage->Release();
00111   }
00112   return bRes;
00113 }
00114 #endif
00115
00116 int GetDocTypeFromName(LPCTSTR pszPathName, CFileException& fe)
00117 {
00118   CFile file;
00119   ASSERT(pszPathName != NULL);
00120
00121   if (!file.Open(pszPathName, CFile::modeRead | CFile::shareDenyWrite, &fe))
00122     return -1;
00123
00124   CFileStatus stat;
00125   VERIFY(file.GetStatus(stat));
00126
00127   if (stat.m_size == 0) // file is empty
00128   {
00129     CString ext = CString(pszPathName).Right(4);
00130     if (ext[0] != '.')
00131       return RD_TEXT;
00132     if (_tcsicmp(ext, _T(".doc"))==0)
00133       return RD_WORDPAD;
00134     if (_tcsicmp(ext, _T(".rtf"))==0)
00135       return RD_RICHTEXT;
00136     return RD_TEXT;
00137   }
00138   // RTF
00139   if (IsLeadMatch(file, byteRTFPrefix, sizeof(byteRTFPrefix)))
00140     return RD_RICHTEXT;
00141   // WORD 2
00142   if (IsLeadMatch(file, byteWord2Prefix, sizeof(byteWord2Prefix)))
00143     return RD_WINWORD2;
00144   // EXE
00145   if (IsLeadMatch(file, byteExePrefix, sizeof(byteExePrefix)))
00146     return RD_EXE;
00147   // write file can start with 31BE or 32BE depending on whether it has
00148   // OLE objects in it or not
00149   if (IsLeadMatch(file, byteWrite1Prefix, sizeof(byteWrite1Prefix)) ||
00150     IsLeadMatch(file, byteWrite2Prefix, sizeof(byteWrite2Prefix)))
00151   {
00152     file.Close();
00153 #ifdef CONVERTERS
00154     if (IsConverterFormat(szWriteConverter, pszPathName))
00155       return RD_WRITE;
00156     else
00157 #endif
00158       return RD_TEXT;
00159   }
00160
00161   // test for compound file
00162   if (IsLeadMatch(file, byteCompFilePrefix, sizeof(byteCompFilePrefix)))
00163   {
00164     file.Close();
00165 #ifdef CONVERTERS
00166     if (IsConverterFormat(szWordConverter, pszPathName))
00167     {
00168       if (IsWord6(pszPathName))
00169         return RD_WINWORD6;
00170       else
00171         return RD_WORDPAD;
00172     }
00173 #endif
00174     return RD_TEXT;
00175   }
00176   return RD_TEXT;
00177 }
00178
00179 void ScanForConverters()
00180 {
00181   static BOOL bScanned = FALSE;
00182   if (bScanned)
00183     return;
00184
00185   for (int i=0;i<NUM_DOC_TYPES;i++)
00186   {
00187     LPCSTR lpsz = doctypes[i].pszConverterName;
00188     // if converter specified but can't find it
00189     if (lpsz != NULL && *lpsz != NULL && !IsDLLInPath(lpsz))
00190       doctypes[i].bRead = doctypes[i].bWrite = FALSE;
00191   }
00192   if (GetSystemMetrics(SM_DBCSENABLED))
00193     doctypes[RD_OEMTEXT].bRead = doctypes[RD_OEMTEXT].bWrite = FALSE;
00194   bScanned = TRUE;
00195 }
00196
00197 BOOL IsDLLInPath(LPCSTR lpszName)
00198 {
00199   ASSERT(lpszName != NULL);
00200   if (lpszName != NULL)
00201   {
00202     OFSTRUCT ofs;
00203     return (OpenFile(lpszName, &ofs, OF_EXIST) != HFILE_ERROR);
00204   }
00205
00206   return FALSE;
00207 }
00208
00209 CString GetExtFromType(int nDocType)
00210 {
00211   ScanForConverters();
00212
00213   CString str = doctypes[nDocType].GetString(DOCTYPE_EXT);
00214   if (!str.IsEmpty())
00215   {
00216     ASSERT(str[1] == '.');
00217     return str.Right(str.GetLength()-1);
00218   }
00219   return str;
00220 }
00221
00222 // returns an RD_* from an index into the openfile dialog types
00223 int GetTypeFromIndex(int nIndex, BOOL bOpen)
00224 {
00225   ScanForConverters();
00226
00227   int nCnt = 0;
00228   for (int i=0;i<NUM_DOC_TYPES;i++)
00229   {
00230     if (!doctypes[i].bDup &&
00231       (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
00232     {
00233       if (nCnt == nIndex)
00234         return i;
00235       nCnt++;
00236     }
00237   }
00238   ASSERT(FALSE);
00239   return -1;
00240 }
00241
00242 // returns an index into the openfile dialog types for the RD_* type
00243 int GetIndexFromType(int nType, BOOL bOpen)
00244 {
00245   ScanForConverters();
00246
00247   int nCnt = 0;
00248   for (int i=0;i<NUM_DOC_TYPES;i++)
00249   {
00250     if (!doctypes[i].bDup &&
00251       (bOpen ? doctypes[i].bRead : doctypes[i].bWrite))
00252     {
00253       if (i == nType)
00254         return nCnt;
00255       nCnt++;
00256     }
00257   }
00258   return -1;
00259 }
00260
00261 CString GetFileTypes(BOOL bOpen)
00262 {
00263   ScanForConverters();
00264
00265   CString str;
00266   for (int i=0;i<NUM_DOC_TYPES;i++)
00267   {
00268     if (bOpen && doctypes[i].bRead && !doctypes[i].bDup)
00269     {
00270       str += doctypes[i].GetString(DOCTYPE_DESC);
00271       str += (TCHAR)NULL;
00272       str += doctypes[i].GetString(DOCTYPE_EXT);
00273       str += (TCHAR)NULL;
00274     }
00275     else if (!bOpen && doctypes[i].bWrite && !doctypes[i].bDup)
00276     {
00277       str += doctypes[i].GetString(DOCTYPE_DOCTYPE);
00278       str += (TCHAR)NULL;
00279       str += doctypes[i].GetString(DOCTYPE_EXT);
00280       str += (TCHAR)NULL;
00281     }
00282   }
00283   return str;
00284 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CUnitsPage Member List

This is the complete list of members for CUnitsPage, including all inherited members.
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CCSPropertyPage |
CCSPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CCSPropertyPage |
CUnitsPage() | CUnitsPage |
CUnitsPage() | CUnitsPage |
DoDataExchange(CDataExchange *pDX) | CUnitsPage | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CUnitsPage | [protected, virtual]
GetHelpIDs() | CUnitsPage | [inline, protected, virtual]
GetHelpIDs() | CUnitsPage | [inline, protected, virtual]
IDD enum value | CUnitsPage |
m_bWordSel | CUnitsPage |
m_nHelpIDs | CUnitsPage | [protected, static]
m_nUnits | CUnitsPage |
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertyPage | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSPropertyPage | [protected]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMainDlg Member List

This is the complete list of members for CMainDlg, including all inherited members.
BoxDone() | CMainDlg |
CMainDlg(CWnd *pParent=NULL) | CMainDlg |
DoDataExchange(CDataExchange *pDX) | CMainDlg | [protected, virtual]
IDD enum value | CMainDlg |
m_hIcon | CMainDlg | [protected]
m_pModeless | CMainDlg | [protected]
OnInitDialog() | CMainDlg | [protected, virtual]
OnOK() | CMainDlg | [protected, virtual]
OnPaint() | CMainDlg | [protected]
OnQueryDragIcon() | CMainDlg | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CMainDlg | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/stdafx.cpp Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

stdafx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // DllScreenCap.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Classes Reference and related electronic
00008 // documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft C++ Libraries products.
00011
00012 #include "stdafx.h"
00013
00014
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MDITabsDemo/MDITabsDemoView.cpp Source File

  • vc2008fp
  • MDITabsDemo

MDITabsDemoView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "MDITabsDemo.h"
00013
00014 #include "MDITabsDemoDoc.h"
00015 #include "MDITabsDemoView.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMDITabsDemoView
00025
00026 IMPLEMENT_DYNCREATE(CMDITabsDemoView, CView)
00027
00028 BEGIN_MESSAGE_MAP(CMDITabsDemoView, CView)
00029   ON_WM_CONTEXTMENU()
00030   // Standard printing commands
00031   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00032   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00033   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CMDITabsDemoView construction/destruction
00038
00039 CMDITabsDemoView::CMDITabsDemoView()
00040 {
00041   // TODO: add construction code here
00042
00043 }
00044
00045 CMDITabsDemoView::~CMDITabsDemoView()
00046 {
00047 }
00048
00049 BOOL CMDITabsDemoView::PreCreateWindow(CREATESTRUCT& cs)
00050 {
00051   // TODO: Modify the Window class or styles here by modifying
00052   //  the CREATESTRUCT cs
00053
00054   return CView::PreCreateWindow(cs);
00055 }
00056
00057 /////////////////////////////////////////////////////////////////////////////
00058 // CMDITabsDemoView drawing
00059
00060 void CMDITabsDemoView::OnDraw(CDC* pDC)
00061 {
00062   CMDITabsDemoDoc* pDoc = GetDocument();
00063   ASSERT_VALID(pDoc);
00064
00065   if (pDC->IsPrinting ())
00066   {
00067     return;
00068   }
00069
00070   CString strTitle = pDoc->GetTitle ();
00071
00072   CFont* pOldFont = pDC->SelectObject (&afxGlobalData.fontRegular);
00073   pDC->SetBkMode (TRANSPARENT);
00074
00075   pDC->TextOut (10, 10, strTitle);
00076
00077   pDC->SelectObject (pOldFont);
00078 }
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CMDITabsDemoView printing
00082
00083 void CMDITabsDemoView::OnFilePrintPreview()
00084 {
00085   AFXPrintPreview (this);
00086 }
00087
00088 BOOL CMDITabsDemoView::OnPreparePrinting(CPrintInfo* pInfo)
00089 {
00090   // default preparation
00091   return DoPreparePrinting(pInfo);
00092 }
00093
00094 void CMDITabsDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00095 {
00096   // TODO: add extra initialization before printing
00097 }
00098
00099 void CMDITabsDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00100 {
00101   // TODO: add cleanup after printing
00102 }
00103
00104 /////////////////////////////////////////////////////////////////////////////
00105 // CMDITabsDemoView diagnostics
00106
00107 #ifdef _DEBUG
00108 void CMDITabsDemoView::AssertValid() const
00109 {
00110   CView::AssertValid();
00111 }
00112
00113 void CMDITabsDemoView::Dump(CDumpContext& dc) const
00114 {
00115   CView::Dump(dc);
00116 }
00117
00118 CMDITabsDemoDoc* CMDITabsDemoView::GetDocument() // non-debug version is inline
00119 {
00120   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMDITabsDemoDoc)));
00121   return (CMDITabsDemoDoc*)m_pDocument;
00122 }
00123 #endif //_DEBUG
00124
00125 /////////////////////////////////////////////////////////////////////////////
00126 // CMDITabsDemoView message handlers
00127
00128 void CMDITabsDemoView::OnContextMenu(CWnd*, CPoint point)
00129 {
00130   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00131 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMyPropertyPage4 Member List

This is the complete list of members for CMyPropertyPage4, including all inherited members.
CMyPropertyPage4() | CMyPropertyPage4 |
DoDataExchange(CDataExchange *pDX) | CMyPropertyPage4 | [protected, virtual]
IDD enum value | CMyPropertyPage4 |
~CMyPropertyPage4() | CMyPropertyPage4 |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSpeakNApp Member List

This is the complete list of members for CSpeakNApp, including all inherited members.
InitInstance() CSpeakNApp
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/Resource.h Source File

  • vc2008fp
  • Explorer

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by Explorer.rc
00004 //
00005 #define IDP_OLE_INIT_FAILED             100
00006 #define IDS_MAIN_TOOLBAR                101
00007 #define ID_VIEW_ARRANGE                 127
00008 #define IDR_MAINFRAME                   128
00009 #define IDR_EXPTYPE                  129
00010 #define IDR_CONTEXT_MENU                130
00011 #define IDR_POPUP_TOOLBAR               131
00012 #define IDB_TOOLBAR256                  151
00013 #define IDB_TOOLBARCOLD256              152
00014 #define IDR_HISTORY_POPUP               154
00015 #define IDR_VIEWS_POPUP                 155
00016 #define IDB_MENU256                     155
00017 #define IDB_MENU16                      156
00018 #define IDD_ABOUTBOX                    999
00019 #define IDC_COMPANY_URL                 1041
00020 #define ID_VIEW_CUSTOMIZE               32770
00021 #define ID_VIEW_TOOLBARS                32771
00022 #define ID_TOOLS_ENTRY                  32805
00023 #define ID_USER_TOOL1                   32806
00024 #define ID_USER_TOOL2                   32807
00025 #define ID_USER_TOOL3                   32808
00026 #define ID_USER_TOOL4                   32809
00027 #define ID_USER_TOOL5                   32810
00028 #define ID_USER_TOOL6                   32811
00029 #define ID_USER_TOOL7                   32812
00030 #define ID_USER_TOOL8                   32813
00031 #define ID_USER_TOOL9                   32814
00032 #define ID_USER_TOOL10                  32815
00033 #define ID_VIEW_FOLDERS                 32822
00034 #define ID_FOLDER_UP                    32823
00035 #define ID_GO_BACK                      32824
00036 #define ID_GO_FORWARD                   32825
00037 #define ID_MOVE_TO                      32826
00038 #define ID_COPY_TO                      32827
00039 #define ID_VIEW_VIEWS                   32828
00040 #define ID_COMMAND_HISTORY              32829
00041 #define ID_VIEW_REFRESH                 32830
00042
00043 // Next default values for new objects
00044 //
00045 #ifdef APSTUDIO_INVOKED
00046 #ifndef APSTUDIO_READONLY_SYMBOLS
00047 #define _APS_3D_CONTROLS                     1
00048 #define _APS_NEXT_RESOURCE_VALUE        156
00049 #define _APS_NEXT_COMMAND_VALUE         32831
00050 #define _APS_NEXT_CONTROL_VALUE         1042
00051 #define _APS_NEXT_SYMED_VALUE           107
00052 #endif
00053 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/ipframe.h Source File

  • ole
  • wordpad

ipframe.h

Go to the documentation of this file.
00001 // ipframe.h : interface of the CInPlaceFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CWordPadResizeBar : public COleResizeBar
00013 {
00014 public:
00015   void SetMinSize(CSize size) {m_tracker.m_sizeMin = size;}
00016 };
00017
00018 class CInPlaceFrame : public COleIPFrameWnd
00019 {
00020 private:
00021   using COleIPFrameWnd::OnCreateControlBars;
00022
00023   DECLARE_DYNCREATE(CInPlaceFrame)
00024 public:
00025   CInPlaceFrame();
00026
00027 // Attributes
00028 public:
00029   CToolBar m_wndToolBar;
00030   CFormatBar m_wndFormatBar;
00031   CRulerBar m_wndRulerBar;
00032   CWordPadResizeBar m_wndResizeBar;
00033   COleDropTarget m_dropTarget;
00034
00035 // Operations
00036 public:
00037   virtual void RecalcLayout(BOOL bNotify = TRUE);
00038   virtual void CalcWindowRect(LPRECT lpClientRect,
00039     UINT nAdjustType = adjustBorder);
00040
00041 // Overrides
00042   // ClassWizard generated virtual function overrides
00043   //{{AFX_VIRTUAL(CInPlaceFrame)
00044   public:
00045   virtual BOOL OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* pWndDoc);
00046   virtual void RepositionFrame(LPCRECT lpPosRect, LPCRECT lpClipRect);
00047   //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 public:
00051 #ifdef _DEBUG
00052   virtual void AssertValid() const;
00053   virtual void Dump(CDumpContext& dc) const;
00054 #endif
00055
00056 protected:
00057   BOOL CreateToolBar(CWnd* pWndFrame);
00058   BOOL CreateFormatBar(CWnd* pWndFrame);
00059   BOOL CreateRulerBar(CWnd* pWndFrame);
00060
00061 // Generated message map functions
00062 protected:
00063   //{{AFX_MSG(CInPlaceFrame)
00064   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00065   afx_msg void OnDestroy();
00066   afx_msg void OnHelpFinder();
00067   afx_msg void OnCharColor();
00068   afx_msg void OnPenToggle();
00069   //}}AFX_MSG
00070   LRESULT OnResizeChild(WPARAM wParam, LPARAM lParam);
00071   afx_msg LONG_PTR OnBarState(UINT_PTR wParam, LONG_PTR lParam);
00072   DECLARE_MESSAGE_MAP()
00073 };
00074
00075 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/StateCollectionDoc.cpp Source File

  • vc2008fp
  • StateCollection

StateCollectionDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StateCollection.h"
00013
00014 #include "StateCollectionDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CStateCollectionDoc
00024
00025 IMPLEMENT_DYNCREATE(CStateCollectionDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CStateCollectionDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CStateCollectionDoc construction/destruction
00032
00033 CStateCollectionDoc::CStateCollectionDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CStateCollectionDoc::~CStateCollectionDoc()
00040 {
00041 }
00042
00043 BOOL CStateCollectionDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CStateCollectionDoc serialization
00058
00059 void CStateCollectionDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CStateCollectionDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CStateCollectionDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CStateCollectionDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CStateCollectionDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCSPropertySheet Member List

This is the complete list of members for CCSPropertySheet, including all inherited members.
CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
CCSPropertySheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
CCSPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CCSPropertySheet |
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertySheet | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSPropertySheet | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSPropertySheet | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSPropertySheet | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCSPropertySheet | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs) | CCSPropertySheet | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DICTENTRY Member List

This is the complete list of members for DICTENTRY, including all inherited members.
hdr | DICTENTRY
sz | DICTENTRY
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCustomSliderCtrl Member List

This is the complete list of members for CCustomSliderCtrl, including all inherited members.
CCustomSliderCtrl(CSliderButton &btnSlider) | CCustomSliderCtrl |
m_btnSlider | CCustomSliderCtrl |
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CCustomSliderCtrl | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCustomSliderCtrl | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCustomSliderCtrl | [protected]
~CCustomSliderCtrl() | CCustomSliderCtrl | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLeader Member List

This is the complete list of members for CLeader, including all inherited members.
Bounce(long &value, const int lower, const int upper, int &vel) | CRoamer | [inline]
CLeader() | CLeader |
DeltaRandom(int i) | CRoamer | [inline, static]
dx | CRoamer |
dy | CRoamer |
GetInitialLlamaColor()=0 | CLeader | [pure virtual]
GetLlamaAcc() const | CLeader | [inline]
GetLlamaColor(COLORREF oldColor)=0 | CLeader | [pure virtual]
GetLlamaVel() const | CLeader | [inline]
HSB(BYTE H, BYTE S, BYTE B) | CLeader | [protected, static]
Import(const CLeader *pRHS) | CLeader |
m_nLlamaAcc | CLeader | [protected]
m_nLlamaVel | CLeader | [protected]
m_nMyAcc | CLeader | [protected]
m_nMyVel | CLeader | [protected]
m_pSwarm | CLeader | [private]
p1 | CRoamer |
p2 | CRoamer |
SetSwarm(CSwarm *pSwarm) | CLeader | [virtual]
Tick() | CLeader | [virtual]
~CRoamer() | CRoamer | [inline, virtual]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TestCon.H Source File

  • ole
  • TstCon

TestCon.H

Go to the documentation of this file.
00001 // File: TestCon.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #import "TCProps.tlb"
00011 using namespace TCPropsLib;
00012
00013 _COM_SMARTPTR_TYPEDEF( ICatInformation, __uuidof( ICatInformation ) );
00014 _COM_SMARTPTR_TYPEDEF( IActiveScript, __uuidof( IActiveScript ) );
00015 _COM_SMARTPTR_TYPEDEF( IActiveScriptParse, __uuidof( IActiveScriptParse ) );
00016 _COM_SMARTPTR_TYPEDEF( IEnumCATEGORYINFO, __uuidof( IEnumCATEGORYINFO ) );
00017 _COM_SMARTPTR_TYPEDEF( IEnumGUID, __uuidof( IEnumGUID ) );
00018
00019 #include "TstCon.H"
00020 #include "TstConIF.H"
00021 #include "TCTrace.H"
00022 #include "OutWndVw.H"
00023 #include "TCSplit.H"
00024 #include "Log.H"
00025 #include "MacroCB.H"
00026 #include "MacroDB.H"
00027 #include "AProp.H"
00028 #include "TypeAttr.H"
00029 #include "ExcepInf.H"
00030 #include "VarUtils.H"
00031 #include "PropBag.H"
00032 #include "BindHost.H"
00033 #include "MethInfo.H"
00034 #include "MethodDg.H"
00035 #include "MacroDg.H"
00036 #include "MFileWnd.H"
00037 #include "MainFrm.H"
00038 #include "LogDg.H"
00039 #include "RegCtlDg.H"
00040 #include "ComCatDg.H"
00041 #include "InsCtlDg.H"
00042 #include "ExtCtl.H"
00043 #include "TCItem.H"
00044 #include "Script.H"
00045 #include "ScrMngr.H"
00046 #include "TCDoc.H"
00047 #include "TCView.H"
00048 #include "TabOrdDg.H"
00049 #include "FeatPg.H"
00050 #include "IFacesPg.H"
00051 #include "ServPg.H"
00052 #include "ConInfDg.H"
00053 #include "NewAPDg.H"
00054 #include "APropDg.H"
00055 #include "EvLogPg.H"
00056 #include "PChngPg.H"
00057 #include "PEdReqPg.H"
00058 #include "PBagDg.H"
00059
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/mtgdi.h Source File

  • advanced
  • mtgdi

mtgdi.h

Go to the documentation of this file.
00001 // mtgdi.h : main header file for the MTGDI application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CThreadApp:
00020 // See mtgdi.cpp for the implementation of this class
00021
00022 class CThreadApp : public CWinApp
00023 {
00024 public:
00025   CThreadApp();
00026
00027 // Overrides
00028   // ClassWizard generated virtual function overrides
00029   //{{AFX_VIRTUAL(CThreadApp)
00030   public:
00031   virtual BOOL InitInstance();
00032   virtual int ExitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CThreadApp)
00038   afx_msg void OnAppAbout();
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StatusBarDemo/MainFrm.cpp Source File

  • vc2008fp
  • StatusBarDemo

MainFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StatusBarDemo.h"
00013
00014 #include "MainFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMainFrame
00024
00025 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00026
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00029   ON_WM_CREATE()
00030   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00031   ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
00032   ON_REGISTERED_MESSAGE(AFX_WM_TOOLBARMENU, OnToolbarContextMenu)
00033 END_MESSAGE_MAP()
00034
00035 static UINT indicators[] =
00036 {
00037   ID_INDICATOR_ICON,    // status icon
00038   ID_SEPARATOR,           // status line indicator
00039   ID_INDICATOR_PROGRESS,  // progress bar
00040   ID_INDICATOR_LABEL,   // text label
00041   ID_INDICATOR_ANIMATION, // animation pane
00042   ID_INDICATOR_CAPS,
00043   ID_INDICATOR_NUM,
00044   ID_INDICATOR_SCRL,
00045 };
00046
00047 /////////////////////////////////////////////////////////////////////////////
00048 // CMainFrame construction/destruction
00049
00050 CMainFrame::CMainFrame()
00051 {
00052   // TODO: add member initialization code here
00053
00054 }
00055
00056 CMainFrame::~CMainFrame()
00057 {
00058 }
00059
00060 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00061 {
00062   if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00063     return -1;
00064
00065   // enable Office XP look:
00066   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00067
00068   CMFCToolBar::EnableQuickCustomization ();
00069
00070   if (!m_wndMenuBar.Create (this))
00071   {
00072     TRACE0("Failed to create menubar\n");
00073     return -1;      // fail to create
00074   }
00075
00076   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC);
00077
00078   if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00079     | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00080     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00081   {
00082     TRACE0("Failed to create toolbar\n");
00083     return -1;      // fail to create
00084   }
00085   if (!m_wndStatusBar.Create(this) ||
00086     !m_wndStatusBar.SetIndicators(indicators,
00087       sizeof(indicators)/sizeof(UINT)))
00088   {
00089     TRACE0("Failed to create status bar\n");
00090     return -1;      // fail to create
00091   }
00092
00093   m_wndStatusBar.SetPaneStyle (nStatusIcon, SBPS_NOBORDERS);
00094   m_wndStatusBar.SetPaneStyle (nStatusAnimation, SBPS_NOBORDERS);
00095   m_wndStatusBar.SetPaneStyle (nStatusInfo, SBPS_STRETCH | SBPS_NOBORDERS);
00096   m_wndStatusBar.SetPaneWidth (nStatusProgress, 80);
00097   m_wndStatusBar.EnablePaneDoubleClick ();
00098
00099   BOOL bValidString;
00100   CString strMainToolbarTitle;
00101   bValidString = strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
00102   m_wndToolBar.SetWindowText (strMainToolbarTitle);
00103   // TODO: Delete these three lines if you don't want the toolbar to
00104   //  be dockable
00105   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00106   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00107   EnableDocking(CBRS_ALIGN_ANY);
00108   DockPane(&m_wndMenuBar);
00109   DockPane(&m_wndToolBar);
00110
00111   CMFCButton::EnableWindowsTheming ();
00112   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00113   return 0;
00114 }
00115
00116 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00117 {
00118   if( !CFrameWnd::PreCreateWindow(cs) )
00119     return FALSE;
00120   // TODO: Modify the Window class or styles here by modifying
00121   //  the CREATESTRUCT cs
00122
00123   return TRUE;
00124 }
00125
00126 /////////////////////////////////////////////////////////////////////////////
00127 // CMainFrame diagnostics
00128
00129 #ifdef _DEBUG
00130 void CMainFrame::AssertValid() const
00131 {
00132   CFrameWnd::AssertValid();
00133 }
00134
00135 void CMainFrame::Dump(CDumpContext& dc) const
00136 {
00137   CFrameWnd::Dump(dc);
00138 }
00139
00140 #endif //_DEBUG
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CMainFrame message handlers
00144
00145
00146 void CMainFrame::OnViewCustomize()
00147 {
00148   //------------------------------------
00149   // Create a customize toolbars dialog:
00150   //------------------------------------
00151   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00152     TRUE /* Automatic menus scaning */
00153     );
00154
00155   pDlgCust->Create ();
00156 }
00157
00158 LRESULT CMainFrame::OnToolbarContextMenu(WPARAM,LPARAM lp)
00159 {
00160   CPoint point (AFX_GET_X_LPARAM(lp), AFX_GET_Y_LPARAM(lp));
00161
00162   CMenu menu;
00163   VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00164
00165   CMenu* pPopup = menu.GetSubMenu(0);
00166   ASSERT(pPopup != NULL);
00167
00168   if (pPopup)
00169   {
00170     CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
00171     pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ());
00172   }
00173
00174   return 0;
00175 }
00176
00177 afx_msg LRESULT CMainFrame::OnToolbarReset(WPARAM /*wp*/,LPARAM)
00178 {
00179   // TODO: reset toolbar with id = (UINT) wp to its initial state:
00180   //
00181   // UINT uiToolBarId = (UINT) wp;
00182   // if (uiToolBarId == IDR_MAINFRAME)
00183   // {
00184   //    do something with m_wndToolBar
00185   // }
00186
00187   return 0;
00188 }
00189
00190 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00191 {
00192   //---------------------------------------------------------
00193   // Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
00194   //---------------------------------------------------------
00195   CFrameWnd::OnShowPopupMenu (pMenuPopup);
00196
00197   if (pMenuPopup != NULL &&
00198     pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
00199   {
00200     if (CMFCToolBar::IsCustomizeMode ())
00201     {
00202       //----------------------------------------------------
00203       // Don't show toolbars list in the cuztomization mode!
00204       //----------------------------------------------------
00205       return FALSE;
00206     }
00207
00208     pMenuPopup->RemoveAllItems ();
00209
00210     CMenu menu;
00211     VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));
00212
00213     CMenu* pPopup = menu.GetSubMenu(0);
00214     ASSERT(pPopup != NULL);
00215
00216     if (pPopup)
00217     {
00218       pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
00219     }
00220   }
00221
00222   return TRUE;
00223 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/Explorer/ExplorerDoc.cpp Source File

  • vc2008fp
  • Explorer

ExplorerDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "Explorer.h"
00013
00014 #include "ExplorerDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CExplorerDoc
00024
00025 IMPLEMENT_DYNCREATE(CExplorerDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CExplorerDoc, CDocument)
00028   ON_COMMAND(ID_COMMAND_HISTORY, OnCommandHistory)
00029   ON_COMMAND(ID_GO_BACK, OnGoBack)
00030   ON_COMMAND(ID_GO_FORWARD, OnGoForward)
00031 END_MESSAGE_MAP()
00032
00033 /////////////////////////////////////////////////////////////////////////////
00034 // CExplorerDoc construction/destruction
00035
00036 CExplorerDoc::CExplorerDoc()
00037 {
00038   // TODO: add one-time construction code here
00039
00040 }
00041
00042 CExplorerDoc::~CExplorerDoc()
00043 {
00044 }
00045
00046 BOOL CExplorerDoc::OnNewDocument()
00047 {
00048   if (!CDocument::OnNewDocument())
00049     return FALSE;
00050
00051   // TODO: add reinitialization code here
00052   // (SDI documents will reuse this document)
00053
00054   return TRUE;
00055 }
00056
00057
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CExplorerDoc serialization
00061
00062 void CExplorerDoc::Serialize(CArchive& ar)
00063 {
00064   if (ar.IsStoring())
00065   {
00066     // TODO: add storing code here
00067   }
00068   else
00069   {
00070     // TODO: add loading code here
00071   }
00072 }
00073
00074 /////////////////////////////////////////////////////////////////////////////
00075 // CExplorerDoc diagnostics
00076
00077 #ifdef _DEBUG
00078 void CExplorerDoc::AssertValid() const
00079 {
00080   CDocument::AssertValid();
00081 }
00082
00083 void CExplorerDoc::Dump(CDumpContext& dc) const
00084 {
00085   CDocument::Dump(dc);
00086 }
00087 #endif //_DEBUG
00088
00089 /////////////////////////////////////////////////////////////////////////////
00090 // CExplorerDoc commands
00091
00092 void CExplorerDoc::OnCommandHistory()
00093 {
00094   // TODO: Add your command handler code here
00095
00096 }
00097
00098 void CExplorerDoc::OnGoBack()
00099 {
00100   // TODO: Add your command handler code here
00101
00102 }
00103
00104 void CExplorerDoc::OnGoForward()
00105 {
00106   // TODO: Add your command handler code here
00107
00108 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/history.h Source File

  • general
  • npp

history.h

Go to the documentation of this file.
00001 // history.h : interface of the CHistoryList class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 class CHistoryList : public CStringList
00014 {
00015 // Operations
00016 public:
00017   void FillCombobox();
00018   BOOL AddString(CString &s1);
00019
00020 // Implementation
00021 protected:
00022   void SwapStrings(CWnd* pWnd, CString &s1);
00023 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CToolDlg Member List

This is the complete list of members for CToolDlg, including all inherited members.
CToolDlg(CWnd *pParent=NULL) | CToolDlg |
DoDataExchange(CDataExchange *pDX) | CToolDlg | [protected, virtual]
IDD enum value | CToolDlg |
m_bBrowse | CToolDlg |
m_bDebug | CToolDlg |
m_bEdit | CToolDlg |
m_bMain | CToolDlg |
m_bPalette | CToolDlg |
m_bResource | CToolDlg |
m_nColor | CToolDlg |
m_nColumns | CToolDlg |
m_nToolTips | CToolDlg |
Generated on Sat Nov 23 2024 17:01:11 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/FileDlgWatcher/FileDlgWatcher/resource.h Source File

  • general
  • FileDlgWatcher
  • FileDlgWatcher

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by FileDlgWatcher.rc
00004 //
00005 #define IDD_FILEDLGWATCHER_DIALOG       102
00006 #define IDR_MAINFRAME                   128
00007 #define IDC_CREATE_DLG                  1000
00008 #define IDC_OPEN_FILE_DLG               1003
00009 #define IDC_VISTA_STYLE                 1004
00010 #define IDC_EVENT_POPUPS                1005
00011 #define IDC_LOG                         1006
00012 #define IDC_BUTTON1                     1007
00013 #define IDC_CLEAR_LOG                   1007
00014
00015 // Next default values for new objects
00016 //
00017 #ifdef APSTUDIO_INVOKED
00018 #ifndef APSTUDIO_READONLY_SYMBOLS
00019 #define _APS_NEXT_RESOURCE_VALUE        129
00020 #define _APS_NEXT_COMMAND_VALUE         32771
00021 #define _APS_NEXT_CONTROL_VALUE         1008
00022 #define _APS_NEXT_SYMED_VALUE           101
00023 #endif
00024 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/cntritem.h Source File

  • ole
  • wordpad

cntritem.h

Go to the documentation of this file.
00001 // cntritem.h : interface of the CWordPadCntrItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CWordPadDoc;
00013 class CWordPadView;
00014
00015 class CWordPadCntrItem : public CRichEditCntrItem
00016 {
00017   DECLARE_SERIAL(CWordPadCntrItem)
00018
00019 // Constructors
00020 public:
00021   CWordPadCntrItem(REOBJECT* preo = NULL, CWordPadDoc* pContainer = NULL);
00022     // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
00023     //  IMPLEMENT_SERIALIZE requires the class have a constructor with
00024     //  zero arguments.  Normally, OLE items are constructed with a
00025     //  non-NULL document pointer.
00026
00027 // Attributes
00028 public:
00029   CWordPadDoc* GetDocument()
00030     { return (CWordPadDoc*)COleClientItem::GetDocument(); }
00031   CWordPadView* GetActiveView()
00032     { return (CWordPadView*)COleClientItem::GetActiveView(); }
00033
00034   // ClassWizard generated virtual function overrides
00035   //{{AFX_VIRTUAL(CWordPadCntrItem)
00036   public:
00037   protected:
00038   //}}AFX_VIRTUAL
00039
00040 // Implementation
00041 public:
00042 #ifdef _DEBUG
00043   virtual void AssertValid() const;
00044   virtual void Dump(CDumpContext& dc) const;
00045 #endif
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/contain/childfrm.cpp Source File

  • controls
  • contain

childfrm.cpp

Go to the documentation of this file.
00001 // ChildFrm.cpp : implementation of the CChildFrame class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "Contain.h"
00013
00014 #include "ChildFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CChildFrame
00024
00025 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
00026
00027 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
00028   //{{AFX_MSG_MAP(CChildFrame)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code !
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CChildFrame construction/destruction
00036
00037 CChildFrame::CChildFrame()
00038 {
00039   // TODO: add member initialization code here
00040
00041 }
00042
00043 CChildFrame::~CChildFrame()
00044 {
00045 }
00046
00047 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00048 {
00049   // TODO: Modify the Window class or styles here by modifying
00050   //  the CREATESTRUCT cs
00051
00052   return CMDIChildWnd::PreCreateWindow(cs);
00053 }
00054
00055 /////////////////////////////////////////////////////////////////////////////
00056 // CChildFrame diagnostics
00057
00058 #ifdef _DEBUG
00059 void CChildFrame::AssertValid() const
00060 {
00061   CMDIChildWnd::AssertValid();
00062 }
00063
00064 void CChildFrame::Dump(CDumpContext& dc) const
00065 {
00066   CMDIChildWnd::Dump(dc);
00067 }
00068
00069 #endif //_DEBUG
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CChildFrame message handlers
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/mfccalc/mfccalc.h Source File

  • ole
  • mfccalc

mfccalc.h

Go to the documentation of this file.
00001 // mfccalc.h : main header file for the MFCCALC application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CCalcApp:
00020 // See mfccalc.cpp for the implementation of this class
00021 //
00022
00023 class CCalcApp : public CWinApp
00024 {
00025 public:
00026   CCalcApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CCalcApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CCalcApp)
00038     // NOTE - the ClassWizard will add and remove member functions here.
00039     //    DO NOT EDIT what you see in these blocks of generated code !
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDWordArrayView Member List

This is the complete list of members for CDWordArrayView, including all inherited members.
CDWordArrayView() | CDWordArrayView |
DoDataExchange(CDataExchange *pDX) | CDWordArrayView | [protected, virtual]
GetDocument() | CDWordArrayView | [inline]
IDD enum value | CDWordArrayView |
m_ctlList | CDWordArrayView |
m_dw | CDWordArrayView |
OnAdd() | CDWordArrayView | [protected]
OnInitialUpdate() | CDWordArrayView |
OnRemove() | CDWordArrayView | [protected]
OnRemoveAll() | CDWordArrayView | [protected]
OnSelChangeList() | CDWordArrayView | [protected]
OnUpdateButton() | CDWordArrayView | [protected]
~CDWordArrayView() | CDWordArrayView | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapssvw.cpp Source File

  • advanced
  • collect

mapssvw.cpp

Go to the documentation of this file.
00001 // mapssvw.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "collect.h"
00014 #include "colledoc.h"
00015 #include "mapssvw.h"
00016
00017 #ifdef _DEBUG
00018 #undef THIS_FILE
00019 static char BASED_CODE THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CMapStringToStringView
00024
00025 IMPLEMENT_DYNCREATE(CMapStringToStringView, CFormView)
00026
00027 CMapStringToStringView::CMapStringToStringView()
00028   : CFormView(CMapStringToStringView::IDD)
00029 {
00030   //{{AFX_DATA_INIT(CMapStringToStringView)
00031   m_strKey = "";
00032   m_strValue = "";
00033   //}}AFX_DATA_INIT
00034 }
00035
00036 CMapStringToStringView::~CMapStringToStringView()
00037 {
00038 }
00039
00040 void CMapStringToStringView::OnInitialUpdate()
00041 {
00042   CFormView::OnInitialUpdate();
00043
00044   // Copy all of the assocations from the document's CMapStringToString
00045   // to the listbox.
00046   CString strKey, strValue;
00047   m_ctlList.ResetContent();
00048   CMapStringToString& map = GetDocument()->m_mapStringToString;
00049   POSITION pos = map.GetStartPosition();
00050   while (pos != NULL)
00051   {
00052     map.GetNextAssoc(pos, strKey, strValue);
00053     AddMapEntryToListBox(strKey, strValue);
00054   }
00055 }
00056
00057 void CMapStringToStringView::DoDataExchange(CDataExchange* pDX)
00058 {
00059   CFormView::DoDataExchange(pDX);
00060   //{{AFX_DATA_MAP(CMapStringToStringView)
00061   DDX_Control(pDX, IDC_LIST, m_ctlList);
00062   DDX_Text(pDX, IDC_KEY, m_strKey);
00063   DDX_Text(pDX, IDC_VALUE, m_strValue);
00064   //}}AFX_DATA_MAP
00065 }
00066
00067
00068 BEGIN_MESSAGE_MAP(CMapStringToStringView, CFormView)
00069   //{{AFX_MSG_MAP(CMapStringToStringView)
00070   ON_BN_CLICKED(IDC_ADD_OR_UPDATE, OnAddOrUpdate)
00071   ON_BN_CLICKED(IDC_FIND, OnFind)
00072   ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00073   ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
00074   ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
00075   //}}AFX_MSG_MAP
00076 END_MESSAGE_MAP()
00077
00078
00079
00080 /////////////////////////////////////////////////////////////////////////////
00081 // CMapStringToStringView diagnostics
00082
00083 #ifdef _DEBUG
00084 void CMapStringToStringView::AssertValid() const
00085 {
00086   CFormView::AssertValid();
00087 }
00088
00089 void CMapStringToStringView::Dump(CDumpContext& dc) const
00090 {
00091   CFormView::Dump(dc);
00092 }
00093
00094 CCollectDoc* CMapStringToStringView::GetDocument() // non-debug version is inline
00095 {
00096   return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
00097 }
00098 #endif //_DEBUG
00099
00100 /////////////////////////////////////////////////////////////////////////////
00101 // CMapStringToStringView internal implementation
00102
00103 int CMapStringToStringView::FindKeyInListBox(CString& strKey)
00104 {
00105   CString strValue;
00106   if (GetDocument()->m_mapStringToString.Lookup(strKey, strValue) != TRUE)
00107     return LB_ERR;
00108   CString strListBoxEntry = strKey;
00109   strListBoxEntry += _T(" >> ");
00110   strListBoxEntry += strValue;
00111   return m_ctlList.FindString(-1, strListBoxEntry);
00112 }
00113
00114 void CMapStringToStringView::AddMapEntryToListBox(CString& strKey, CString& strValue)
00115 {
00116   CString str = strKey;
00117   str += _T(" >> ");
00118   str += strValue;
00119   m_ctlList.AddString(str);
00120 }
00121
00122 /////////////////////////////////////////////////////////////////////////////
00123 // CMapStringToStringView message handlers
00124
00125 void CMapStringToStringView::OnAddOrUpdate()
00126 {
00127   if (UpdateData() != TRUE)
00128     return;
00129
00130   // Add or replace entry in the listbox
00131   int nSel = FindKeyInListBox(m_strKey);
00132   if (nSel != LB_ERR)
00133     m_ctlList.DeleteString(nSel);
00134   AddMapEntryToListBox(m_strKey, m_strValue);
00135
00136   // Add or update association in the CMapStringToString
00137   GetDocument()->m_mapStringToString[m_strKey] = m_strValue;
00138 }
00139
00140 void CMapStringToStringView::OnFind()
00141 {
00142   if (UpdateData() != TRUE)
00143     return;
00144
00145   CString strValue;
00146   if (GetDocument()->m_mapStringToString.Lookup(m_strKey, strValue) != TRUE)
00147   {
00148     AfxMessageBox(IDS_KEY_NOT_FOUND);
00149     return;
00150   }
00151
00152   m_strValue = strValue;
00153   UpdateData(FALSE);  // update the value found in the map lookup
00154 }
00155
00156 void CMapStringToStringView::OnRemove()
00157 {
00158   if (UpdateData() != TRUE)
00159     return;
00160
00161   CString strValue;
00162   CMapStringToString& map = GetDocument()->m_mapStringToString;
00163   if (map.Lookup(m_strKey, strValue) != TRUE)
00164   {
00165     AfxMessageBox(IDS_KEY_NOT_FOUND);
00166     return;
00167   }
00168
00169   if (strValue != m_strValue)
00170   {
00171     m_strValue = strValue;
00172     UpdateData(FALSE);
00173     AfxMessageBox(IDS_KEY_NOT_FOUND_CHOOSE_REMOVE_AGAIN);
00174     return;
00175   }
00176
00177   // Remove assocation from the listbox
00178   int nSel = FindKeyInListBox(m_strKey);
00179   ASSERT(nSel != LB_ERR);
00180   m_ctlList.DeleteString(nSel);
00181
00182   // Remove the association from the CMapStringToString
00183   map.RemoveKey(m_strKey);
00184 }
00185
00186 void CMapStringToStringView::OnRemoveAll()
00187 {
00188   GetDocument()->m_mapStringToString.RemoveAll();
00189   m_ctlList.ResetContent();
00190 }
00191
00192 void CMapStringToStringView::OnSelChangeList()
00193 {
00194   // Update the "key" field to reflect the new selection in the listbox.
00195   CString str;
00196   m_ctlList.GetText(m_ctlList.GetCurSel(), str);
00197   m_strKey.Empty();
00198   LPCTSTR lpsz = str;
00199   while (*lpsz != ' ' || *(lpsz+1) != '>' || *(lpsz+2) != '>')
00200   {
00201     m_strKey += *lpsz;
00202     lpsz++;
00203   }
00204   UpdateData(FALSE);
00205
00206   // Now that the key field has been updated to reflect the listbox selection,
00207   // find the string in the map as though the user had hit the Find button.
00208   OnFind();
00209 }
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/CustomPages/MyCustomizationPage.h Source File

  • vc2008fp
  • CustomPages

MyCustomizationPage.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CMyCustomizationPage dialog
00015
00016 class CMyCustomizationPage : public CPropertyPage
00017 {
00018   DECLARE_DYNCREATE (CMyCustomizationPage)
00019 // Construction
00020 public:
00021   CMyCustomizationPage(CWnd* pParent = NULL);   // standard constructor
00022
00023 // Dialog Data
00024   enum { IDD = IDD_CUST_PAGE_DLG };
00025
00026 // Overrides
00027   protected:
00028   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00029
00030 // Implementation
00031 protected:
00032
00033   DECLARE_MESSAGE_MAP()
00034 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/spiro/spiro.cpp Source File

  • general
  • spiro

spiro.cpp

Go to the documentation of this file.
00001 // spiro.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "spiro.h"
00014
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CSpiroApp
00025
00026 BEGIN_MESSAGE_MAP(CSpiroApp, CWinApp)
00027   //{{AFX_MSG_MAP(CSpiroApp)
00028   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code!
00031   //}}AFX_MSG_MAP
00032   // Standard file based document commands
00033   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00034   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00035   // Standard print setup command
00036   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00037 END_MESSAGE_MAP()
00038
00039 /////////////////////////////////////////////////////////////////////////////
00040 // CSpiroApp construction
00041
00042 CSpiroApp::CSpiroApp()
00043 {
00044 }
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // The one and only CSpiroApp object
00048
00049 CSpiroApp theApp;
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CSpiroApp initialization
00053
00054 void CSpiroApp::SetLandscape()
00055 {
00056     // Get default printer settings.
00057     PRINTDLG   pd;
00058
00059     pd.lStructSize = (DWORD) sizeof(PRINTDLG);
00060     if (GetPrinterDeviceDefaults(&pd))
00061     {
00062         // Lock memory handle.
00063         DEVMODE FAR* pDevMode =
00064             (DEVMODE FAR*)::GlobalLock(m_hDevMode);
00065         LPDEVNAMES lpDevNames;
00066         LPTSTR lpszDriverName, lpszDeviceName, lpszPortName;
00067         HANDLE hPrinter;
00068
00069
00070         if (pDevMode)
00071         {
00072             // Change printer settings in here.
00073             pDevMode->dmOrientation = DMORIENT_LANDSCAPE;
00074            // Unlock memory handle.
00075          lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
00076        lpszDriverName = (LPTSTR )lpDevNames + lpDevNames->wDriverOffset;
00077       lpszDeviceName = (LPTSTR )lpDevNames + lpDevNames->wDeviceOffset;
00078       lpszPortName   = (LPTSTR )lpDevNames + lpDevNames->wOutputOffset;
00079
00080       ::OpenPrinter(lpszDeviceName, &hPrinter, NULL);
00081       ::DocumentProperties(NULL,hPrinter,lpszDeviceName,pDevMode,
00082                            pDevMode, DM_IN_BUFFER|DM_OUT_BUFFER);
00083
00084        // Sync the pDevMode.
00085        // See SDK help for DocumentProperties for more info.
00086        ::ClosePrinter(hPrinter);
00087          ::GlobalUnlock(m_hDevNames);
00088        ::GlobalUnlock(m_hDevMode);
00089     }
00090     }
00091 }
00092
00093 BOOL CSpiroApp::InitInstance()
00094 {
00095   // Standard initialization
00096   // If you are not using these features and wish to reduce the size
00097   //  of your final executable, you should remove from the following
00098   //  the specific initialization routines you do not need.
00099
00100   // Change the registry key under which our settings are stored.
00101   // You should modify this string to be something appropriate
00102   // such as the name of your company or organization.
00103   SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00104
00105   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00106   SetLandscape();
00107
00108   // Register the application's document templates.  Document templates
00109   //  serve as the connection between documents, frame windows and views.
00110
00111   CSingleDocTemplate* pDocTemplate;
00112   pDocTemplate = new CSingleDocTemplate(
00113     IDR_MAINFRAME,
00114     RUNTIME_CLASS(CSpiroDoc),
00115     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00116     RUNTIME_CLASS(CSpiroView));
00117   AddDocTemplate(pDocTemplate);
00118
00119   // Enable DDE Execute open
00120   EnableShellOpen();
00121   RegisterShellFileTypes(TRUE);
00122
00123   // Parse command line for standard shell commands, DDE, file open
00124   CCommandLineInfo cmdInfo;
00125   ParseCommandLine(cmdInfo);
00126
00127   // Dispatch commands specified on the command line
00128   if (!ProcessShellCommand(cmdInfo))
00129     return FALSE;
00130
00131   // The one and only window has been initialized, so show and update it.
00132   m_pMainWnd->ShowWindow(SW_SHOW);
00133   m_pMainWnd->UpdateWindow();
00134
00135   // Enable drag/drop open
00136   m_pMainWnd->DragAcceptFiles();
00137
00138   m_cursorRing = LoadCursor(IDC_DROPRING);
00139   m_cursorWheel = LoadCursor(IDC_DROPWHEEL);
00140
00141   m_imageList.Create(IDB_PENCIL, 48, 2, RGB(255, 255, 255));
00142
00143   return TRUE;
00144 }
00145
00146 /////////////////////////////////////////////////////////////////////////////
00147 // CAboutDlg dialog used for App About
00148
00149 class CAboutDlg : public CDialog
00150 {
00151 public:
00152   CAboutDlg();
00153
00154 // Dialog Data
00155   //{{AFX_DATA(CAboutDlg)
00156   enum { IDD = IDD_ABOUTBOX };
00157   //}}AFX_DATA
00158
00159   // ClassWizard generated virtual function overrides
00160   //{{AFX_VIRTUAL(CAboutDlg)
00161   protected:
00162   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00163   //}}AFX_VIRTUAL
00164
00165 // Implementation
00166 protected:
00167   //{{AFX_MSG(CAboutDlg)
00168     // No message handlers
00169   //}}AFX_MSG
00170   DECLARE_MESSAGE_MAP()
00171 };
00172
00173 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00174 {
00175   //{{AFX_DATA_INIT(CAboutDlg)
00176   //}}AFX_DATA_INIT
00177 }
00178
00179 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00180 {
00181   CDialog::DoDataExchange(pDX);
00182   //{{AFX_DATA_MAP(CAboutDlg)
00183   //}}AFX_DATA_MAP
00184 }
00185
00186 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00187   //{{AFX_MSG_MAP(CAboutDlg)
00188     // No message handlers
00189   //}}AFX_MSG_MAP
00190 END_MESSAGE_MAP()
00191
00192 // App command to run the dialog
00193 void CSpiroApp::OnAppAbout()
00194 {
00195   CAboutDlg aboutDlg;
00196   aboutDlg.DoModal();
00197 }
00198
00199 /////////////////////////////////////////////////////////////////////////////
00200 // CSpiroApp commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMultiPadApp Member List

This is the complete list of members for CMultiPadApp, including all inherited members.
InitInstance() | CMultiPadApp | [private]
OnAppAbout() | CMultiPadApp | [private]
Generated on Sat Nov 23 2024 17:01:02 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CVarUseApp Member List

This is the complete list of members for CVarUseApp, including all inherited members.
CVarUseApp() | CVarUseApp |
InitInstance() | CVarUseApp | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/spindial/spinppg.h Source File

  • controls
  • spindial

spinppg.h

Go to the documentation of this file.
00001 // spinppg.h : Declaration of the CSpindialPropPage property page class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 ////////////////////////////////////////////////////////////////////////////
00014 // CSpindialPropPage : See spinppg.cpp for implementation.
00015
00016 class CSpindialPropPage : public COlePropertyPage
00017 {
00018   DECLARE_DYNCREATE(CSpindialPropPage)
00019   DECLARE_OLECREATE_EX(CSpindialPropPage)
00020
00021 // Constructor
00022 public:
00023   CSpindialPropPage();
00024
00025 // Dialog Data
00026   //{{AFX_DATA(CSpindialPropPage)
00027   enum { IDD = IDD_PROPPAGE_SPINDIAL };
00028   int     m_NeedlePosition;
00029   //}}AFX_DATA
00030
00031 // Implementation
00032 protected:
00033   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034
00035 // Message maps
00036 protected:
00037   //{{AFX_MSG(CSpindialPropPage)
00038   //}}AFX_MSG
00039   DECLARE_MESSAGE_MAP()
00040
00041 };
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassViewBar.h Source File

  • vc2008fp
  • VisualStudioDemo

ClassViewBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #include "ClassTreeWnd.h"
00013
00014 class CClassToolBar : public CMFCToolBar
00015 {
00016   virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
00017   {
00018     CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
00019   }
00020
00021   virtual BOOL AllowShowOnList() const { return FALSE; }
00022 };
00023
00024 class CClassViewBar : public CDockablePane
00025 {
00026 public:
00027   CClassViewBar();
00028   virtual ~CClassViewBar();
00029
00030   void AdjustLayout();
00031   void OnChangeVisualStyle();
00032
00033 protected:
00034   CClassToolBar m_wndToolBar;
00035   CClassTreeWnd m_wndClassView;
00036   CImageList m_ClassViewImages;
00037   UINT m_nCurrSort;
00038
00039   void FillClassView();
00040
00041 // Overrides
00042 public:
00043   virtual BOOL PreTranslateMessage(MSG* pMsg);
00044
00045 protected:
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047   afx_msg void OnSize(UINT nType, int cx, int cy);
00048   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00049   afx_msg void OnClassAddMemeberFunction();
00050   afx_msg void OnClassAddMemeberVariable();
00051   afx_msg void OnClassDefinition();
00052   afx_msg void OnClassProperties();
00053   afx_msg void OnNewFolder();
00054   afx_msg void OnPaint();
00055   afx_msg void OnSetFocus(CWnd* pOldWnd);
00056   afx_msg LRESULT OnChangeActiveTab(WPARAM, LPARAM);
00057   afx_msg void OnSort(UINT id);
00058   afx_msg void OnUpdateSort(CCmdUI* pCmdUI);
00059
00060   DECLARE_MESSAGE_MAP()
00061 };
00062
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCSDialog Member List

This is the complete list of members for CCSDialog, including all inherited members.
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog() | CCSDialog |
CCSDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CCSDialog |
CCSDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CCSDialog |
GetHelpIDs()=0 | CCSDialog | [protected, pure virtual]
GetHelpIDs()=0 | CCSDialog | [protected, pure virtual]
OnHelp(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelp(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnHelpContextMenu(UINT_PTR wParam, LONG_PTR lParam) | CCSDialog | [protected]
OnHelpContextMenu(WPARAM wParam, LPARAM lParam) | CCSDialog | [protected]
OnInitDialog() | CCSDialog | [protected, virtual]
OnInitDialog() | CCSDialog | [protected, virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/mainfrm.cpp Source File

  • vc2008fp
  • WordPad

mainfrm.cpp

Go to the documentation of this file.
00001 //
00002 // mainfrm.cpp : implementation of the CMainFrame class
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015
00016 #include "wordpad.h"
00017 #include "mainfrm.h"
00018 #include "wordpdoc.h"
00019 #include "wordpvw.h"
00020 #include "strings.h"
00021
00022 #ifdef _DEBUG
00023 #undef THIS_FILE
00024 static char BASED_CODE THIS_FILE[] = __FILE__;
00025 #endif
00026
00027 const int  iMaxUserToolbars   = 10;
00028
00029 const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
00030 const UINT uiLastUserToolBarId  = uiFirstUserToolBarId + iMaxUserToolbars - 1;
00031
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CMainFrame
00034
00035 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
00036
00037 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
00038   //{{AFX_MSG_MAP(CMainFrame)
00039   ON_WM_CREATE()
00040   ON_WM_SYSCOLORCHANGE()
00041   ON_WM_SIZE()
00042   ON_WM_MOVE()
00043   ON_COMMAND(ID_HELP, OnHelpFinder)
00044   ON_WM_DROPFILES()
00045   ON_WM_FONTCHANGE()
00046   ON_WM_QUERYNEWPALETTE()
00047   ON_WM_PALETTECHANGED()
00048   ON_WM_DEVMODECHANGE()
00049   ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize)
00050   ON_COMMAND(ID_HELP_INDEX, OnHelpFinder)
00051   ON_COMMAND(ID_VIEW_FULL_SCREEN, OnViewFullScreen)
00052   //}}AFX_MSG_MAP
00053   // Global help commands
00054   ON_COMMAND(ID_CONTEXT_HELP, CFrameWndEx::OnContextHelp)
00055   ON_COMMAND(ID_DEFAULT_HELP, OnHelpFinder)
00056   ON_MESSAGE(WPM_BARSTATE, OnBarState)
00057   ON_REGISTERED_MESSAGE(CWordPadApp::m_nOpenMsg, OnOpenMsg)
00058   ON_REGISTERED_MESSAGE(AFX_WM_CUSTOMIZEHELP, OnHelpCustomizeToolbars)
00059   ON_REGISTERED_MESSAGE(AFX_WM_CUSTOMIZETOOLBAR, OnStartCustomize)
00060   ON_REGISTERED_MESSAGE(AFX_WM_CREATETOOLBAR, OnToolbarCreateNew)
00061   ON_REGISTERED_MESSAGE(AFX_WM_GETDOCUMENTCOLORS, OnGetDocumentColors)
00062   ON_COMMAND(ID_DUMMY, OnDummy)
00063   ON_COMMAND(ID_HELP_FIND, OnAskQuestion)
00064 END_MESSAGE_MAP()
00065
00066 static UINT BASED_CODE indicators[] =
00067 {
00068   ID_SEPARATOR,           // status line indicator
00069   ID_INDICATOR_CAPS,
00070   ID_INDICATOR_NUM,
00071 };
00072
00073 /////////////////////////////////////////////////////////////////////////////
00074 // CMainFrame construction/destruction
00075
00076 CMainFrame::CMainFrame()
00077 {
00078   m_hIconDoc = theApp.LoadIcon(IDI_ICON_DOC);
00079   m_hIconText = theApp.LoadIcon(IDI_ICON_TEXT);
00080   m_hIconWrite = theApp.LoadIcon(IDI_ICON_WRITE);
00081 }
00082
00083 CMainFrame::~CMainFrame()
00084 {
00085 }
00086
00087 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00088 {
00089   WNDCLASS wndcls;
00090
00091   BOOL bRes = CFrameWndEx::PreCreateWindow(cs);
00092   HINSTANCE hInst = AfxGetInstanceHandle();
00093
00094   // see if the class already exists
00095   if (!::GetClassInfo(hInst, szWordPadClass, &wndcls))
00096   {
00097     // get default stuff
00098     ::GetClassInfo(hInst, cs.lpszClass, &wndcls);
00099     wndcls.style &= ~(CS_HREDRAW|CS_VREDRAW);
00100     // register a new class
00101     wndcls.lpszClassName = szWordPadClass;
00102     wndcls.hIcon = ::LoadIcon(hInst, MAKEINTRESOURCE(IDR_MAINFRAME));
00103     ASSERT(wndcls.hIcon != NULL);
00104     if (!AfxRegisterClass(&wndcls))
00105       AfxThrowResourceException();
00106   }
00107   cs.lpszClass = szWordPadClass;
00108   CRect rect = theApp.m_rectInitialFrame;
00109   if (rect.Width() > 0 && rect.Height() > 0)
00110   {
00111     // make sure window will be visible
00112     CDisplayIC dc;
00113     CRect rectDisplay(0, 0, dc.GetDeviceCaps(HORZRES),
00114       dc.GetDeviceCaps(VERTRES));
00115     if (rectDisplay.PtInRect(rect.TopLeft()) &&
00116       rectDisplay.PtInRect(rect.BottomRight()))
00117     {
00118       cs.x = rect.left;
00119       cs.y = rect.top;
00120       cs.cx = rect.Width();
00121       cs.cy = rect.Height();
00122     }
00123   }
00124   return bRes;
00125 }
00126
00127 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00128 {
00129   CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
00130   CMFCToolBarComboBoxButton::SetFlatMode ();
00131   CMFCToolBarComboBoxButton::SetCenterVert ();
00132
00133   CMFCFontComboBox::m_bDrawUsingFont = TRUE;
00134
00135   if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
00136     return -1;
00137
00138   if (!CreateMenuBar())
00139     return -1;
00140
00141   if (!CreateToolBar())
00142     return -1;
00143
00144   if (!CreateFormatBar())
00145     return -1;
00146
00147   if (!CreateStatusBar())
00148     return -1;
00149
00150   EnableDocking(CBRS_ALIGN_ANY);
00151
00152   if (!CreateTaskPane())
00153     return -1;
00154
00155   if (!CreateRulerBar())
00156     return -1;
00157
00158   CMFCToolBar::AddToolBarForImageCollection (IDR_TOOLBAR_IMAGES);
00159   CMFCToolBar::AddToolBarForImageCollection (IDR_BORDER_TYPE);
00160
00161   CMFCToolBar::EnableQuickCustomization ();
00162
00163   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00164   m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
00165   m_wndFormatBar.EnableDocking(CBRS_ALIGN_ANY);
00166   m_wndTaskPane.EnableDocking(CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT);
00167
00168   DockPane(&m_wndMenuBar);
00169   DockPane(&m_wndToolBar);
00170   DockPane(&m_wndFormatBar);
00171   DockPane(&m_wndTaskPane);
00172
00173   CWnd* pView = GetDlgItem(AFX_IDW_PANE_FIRST);
00174   if (pView != NULL)
00175   {
00176     pView->SetWindowPos(&wndBottom, 0, 0, 0, 0,
00177       SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
00178   }
00179
00180   //----------------------------------------
00181   // Allow user-defined toolbars operations:
00182   //----------------------------------------
00183   InitUserToolbars (NULL,
00184           uiFirstUserToolBarId,
00185           uiLastUserToolBarId);
00186
00187   //--------------------
00188   // Set basic commands:
00189   //--------------------
00190   CList<UINT, UINT> lstBasicCommands;
00191   lstBasicCommands.AddTail (ID_FILE_NEW);
00192   lstBasicCommands.AddTail (ID_FILE_OPEN);
00193   lstBasicCommands.AddTail (ID_FILE_SAVE);
00194   lstBasicCommands.AddTail (ID_FILE_PRINT);
00195   lstBasicCommands.AddTail (ID_APP_EXIT);
00196   lstBasicCommands.AddTail (ID_EDIT_UNDO);
00197   lstBasicCommands.AddTail (ID_EDIT_CUT);
00198   lstBasicCommands.AddTail (ID_EDIT_COPY);
00199   lstBasicCommands.AddTail (ID_EDIT_PASTE);
00200   lstBasicCommands.AddTail (ID_EDIT_SELECT_ALL);
00201   lstBasicCommands.AddTail (ID_EDIT_FIND);
00202   lstBasicCommands.AddTail (ID_EDIT_REPEAT);
00203   lstBasicCommands.AddTail (ID_EDIT_REPLACE);
00204   lstBasicCommands.AddTail (ID_OLE_EDIT_PROPERTIES);
00205   lstBasicCommands.AddTail (ID_VIEW_OPTIONS);
00206   lstBasicCommands.AddTail (ID_VIEW_CUSTOMIZE);
00207   lstBasicCommands.AddTail (ID_VIEW_APP_LOOK);
00208   lstBasicCommands.AddTail (ID_VIEW_FULL_SCREEN);
00209   lstBasicCommands.AddTail (ID_OLE_INSERT_NEW);
00210   lstBasicCommands.AddTail (ID_FORMAT_FONT);
00211   lstBasicCommands.AddTail (ID_INSERT_BULLET);
00212   lstBasicCommands.AddTail (ID_CHAR_COLOR);
00213   lstBasicCommands.AddTail (ID_HELP_INDEX);
00214   lstBasicCommands.AddTail (ID_APP_ABOUT);
00215   lstBasicCommands.AddTail (ID_PARA_LEFT);
00216   lstBasicCommands.AddTail (ID_VIEW_TOOLBARS);
00217
00218   CMFCToolBar::SetBasicCommands (lstBasicCommands);
00219
00220   //--------------------------------------------------------------------
00221   // Enable conttol bar context menu (list of bars + customize command):
00222   //--------------------------------------------------------------------
00223   EnablePaneMenu (  TRUE, ID_VIEW_CUSTOMIZE,
00224               _T("Customize..."), ID_VIEW_TOOLBARS,
00225               FALSE, TRUE);
00226
00227   EnableFullScreenMode (ID_VIEW_FULL_SCREEN);
00228   EnableFullScreenMainMenu (FALSE);
00229
00230   return 0;
00231 }
00232
00233 BOOL CMainFrame::CreateMenuBar()
00234 {
00235   //----------------------------------------------
00236   // Create menu bar (replaces the standard menu):
00237   //----------------------------------------------
00238   if (!m_wndMenuBar.Create (this/*, WS_CHILD | WS_VISIBLE | CBRS_TOP, uiMenuBarId*/))
00239   {
00240     TRACE0("Failed to create menubar\n");
00241     return FALSE;
00242   }
00243
00244   m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle() |
00245     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC | CBRS_GRIPPER | CBRS_BORDER_3D);
00246
00247   m_wndMenuBar.EnableHelpCombobox (ID_HELP_FIND, _T("Type a question for help"));
00248
00249   CString str;
00250   BOOL bValidString;
00251   bValidString = str.LoadString(IDS_TITLE_MENUBAR);
00252   ASSERT(bValidString);
00253   m_wndMenuBar.SetWindowText(str);
00254   return TRUE;
00255 }
00256
00257 BOOL CMainFrame::CreateToolBar()
00258 {
00259   if (!m_wndToolBar.Create(this,
00260     WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC |
00261       CBRS_GRIPPER | CBRS_BORDER_3D)||
00262       !m_wndToolBar.LoadToolBar (IDR_MAINFRAME))
00263   {
00264     TRACE0("Failed to create toolbar\n");
00265     return FALSE;      // fail to create
00266   }
00267
00268   CString str;
00269   BOOL bValidString;
00270   bValidString = str.LoadString(IDS_TITLE_TOOLBAR);
00271   ASSERT(bValidString);
00272   m_wndToolBar.SetWindowText(str);
00273
00274   m_wndToolBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00275   return TRUE;
00276 }
00277
00278 BOOL CMainFrame::CreateFormatBar()
00279 {
00280   if (!m_wndFormatBar.Create(this,
00281     WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC|
00282     CBRS_GRIPPER | CBRS_BORDER_3D,
00283     ID_VIEW_FORMATBAR) ||
00284     !m_wndFormatBar.LoadToolBar (IDR_FORMATBAR))
00285   {
00286     TRACE0("Failed to create FormatBar\n");
00287     return FALSE;      // fail to create
00288   }
00289
00290   CString str;
00291   BOOL bValidString;
00292   bValidString = str.LoadString(IDS_TITLE_FORMATBAR);
00293   ASSERT(bValidString);
00294   m_wndFormatBar.SetWindowText(str);
00295
00296   m_wndFormatBar.EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00297   return TRUE;
00298 }
00299
00300 BOOL CMainFrame::CreateTaskPane ()
00301 {
00302   CRect rectDummy(0, 0, 200, 400);
00303   if (!m_wndTaskPane.Create(_T("Tasks Pane"), this, rectDummy, TRUE, ID_VIEW_TASK_PANE,
00304     WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT | AFX_CBRS_CLOSE | AFX_CBRS_FLOAT))
00305   {
00306     TRACE0("Failed to create task pane\n");
00307     return FALSE;      // fail to create
00308   }
00309
00310   m_wndTaskPane.EnableDocking (CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT);
00311   DockPane(&m_wndTaskPane);
00312
00313   return TRUE;
00314 }
00315
00316 BOOL CMainFrame::CreateRulerBar()
00317 {
00318   if (!m_wndRulerBar.Create(this,
00319     WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_HIDE_INPLACE, ID_VIEW_RULER))
00320   {
00321     TRACE0("Failed to create ruler\n");
00322     return FALSE;      // fail to create
00323   }
00324   return TRUE;
00325 }
00326
00327 BOOL CMainFrame::CreateStatusBar()
00328 {
00329   if (!m_wndStatusBar.Create(this) ||
00330     !m_wndStatusBar.SetIndicators(indicators,
00331       sizeof(indicators)/sizeof(UINT)))
00332   {
00333     TRACE0("Failed to create status bar\n");
00334     return FALSE;      // fail to create
00335   }
00336   return TRUE;
00337 }
00338
00339 /////////////////////////////////////////////////////////////////////////////
00340 // CMainFrame Operations
00341
00342 HICON CMainFrame::GetIcon(int nDocType)
00343 {
00344   switch (nDocType)
00345   {
00346     case RD_WINWORD6:
00347     case RD_WORDPAD:
00348     case RD_EMBEDDED:
00349     case RD_RICHTEXT:
00350       return m_hIconDoc;
00351     case RD_TEXT:
00352     case RD_OEMTEXT:
00353       return m_hIconText;
00354     case RD_WRITE:
00355       return m_hIconWrite;
00356   }
00357   return m_hIconDoc;
00358 }
00359
00360 /////////////////////////////////////////////////////////////////////////////
00361 // CMainFrame diagnostics
00362
00363 #ifdef _DEBUG
00364 void CMainFrame::AssertValid() const
00365 {
00366   CFrameWndEx::AssertValid();
00367 }
00368
00369 void CMainFrame::Dump(CDumpContext& dc) const
00370 {
00371   CFrameWndEx::Dump(dc);
00372 }
00373
00374 #endif //_DEBUG
00375
00376 /////////////////////////////////////////////////////////////////////////////
00377 // CMainFrame message handlers
00378
00379 void CMainFrame::OnFontChange()
00380 {
00381   m_wndFormatBar.SendMessage(CWordPadApp::m_nPrinterChangedMsg);
00382 }
00383
00384 void CMainFrame::OnDevModeChange(LPTSTR lpDeviceName)
00385 {
00386   theApp.NotifyPrinterChanged();
00387   CFrameWndEx::OnDevModeChange(lpDeviceName); //sends message to descendants
00388 }
00389
00390 void CMainFrame::OnSysColorChange()
00391 {
00392   CFrameWndEx::OnSysColorChange();
00393   OnChangeLook ();
00394 }
00395
00396 void CMainFrame::ActivateFrame(int nCmdShow)
00397 {
00398   CFrameWndEx::ActivateFrame(nCmdShow);
00399   // make sure and display the toolbar, ruler, etc while loading a document.
00400   OnIdleUpdateCmdUI(0, 0);
00401   UpdateWindow();
00402 }
00403
00404 void CMainFrame::OnSize(UINT nType, int cx, int cy)
00405 {
00406   CFrameWndEx::OnSize(nType, cx, cy);
00407   theApp.m_bMaximized = (nType == SIZE_MAXIMIZED);
00408   if (nType == SIZE_RESTORED)
00409     GetWindowRect(theApp.m_rectInitialFrame);
00410 }
00411
00412 LRESULT CMainFrame::OnBarState(WPARAM wParam, LPARAM lParam)
00413 {
00414   if (lParam == -1)
00415     return 0L;
00416   ASSERT(lParam != RD_EMBEDDED);
00417   if (wParam != 0)
00418   {
00419     if (IsTextType((int) lParam))
00420     {
00421       // in text mode hide the ruler and format bar so that it is the default
00422       CBasePane* pBar = GetPane(ID_VIEW_FORMATBAR);
00423       if (pBar != NULL)
00424         pBar->ShowPane(FALSE, FALSE, FALSE);
00425       pBar = GetPane(ID_VIEW_RULER);
00426       if (pBar != NULL)
00427         pBar->ShowPane(FALSE, FALSE, FALSE);
00428     }
00429     HICON hIcon = GetIcon((int)lParam);
00430     SendMessage(WM_SETICON, TRUE, (LPARAM)hIcon);
00431
00432   }
00433   return 0L;
00434 }
00435
00436 void CMainFrame::OnMove(int x, int y)
00437 {
00438   CFrameWndEx::OnMove(x, y);
00439   WINDOWPLACEMENT wp;
00440   wp.length = sizeof(wp);
00441   GetWindowPlacement(&wp);
00442   theApp.m_rectInitialFrame = wp.rcNormalPosition;
00443   CView* pView = GetActiveView();
00444   if (pView != NULL)
00445     pView->SendMessage(WM_MOVE);
00446 }
00447
00448 LRESULT CMainFrame::OnOpenMsg(WPARAM, LPARAM lParam)
00449 {
00450   TCHAR szAtomName[256];
00451   szAtomName[0] = NULL;
00452   GlobalGetAtomName((ATOM)lParam, szAtomName, 256);
00453   CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
00454   if (szAtomName[0] != NULL && pDoc != NULL)
00455   {
00456     if (lstrcmpi(szAtomName, pDoc->GetPathName()) == 0)
00457       return TRUE;
00458   }
00459   return FALSE;
00460 }
00461
00462 void CMainFrame::OnHelpFinder()
00463 {
00464   theApp.WinHelp(0, HELP_FINDER);
00465 }
00466
00467 void CMainFrame::OnDropFiles(HDROP hDropInfo)
00468 {
00469   TCHAR szFileName[_MAX_PATH];
00470   ::DragQueryFile(hDropInfo, 0, szFileName, _MAX_PATH);
00471   ::DragFinish(hDropInfo);
00472   theApp.OpenDocumentFile(szFileName);
00473 }
00474
00475 BOOL CMainFrame::OnQueryNewPalette()
00476 {
00477   CView* pView = GetActiveView();
00478   if (pView != NULL)
00479     return (BOOL) pView->SendMessage(WM_QUERYNEWPALETTE);
00480   return FALSE;
00481 }
00482
00483 void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd)
00484 {
00485   CView* pView = GetActiveView();
00486   if (pView != NULL)
00487     pView->SendMessage(WM_PALETTECHANGED, (WPARAM)pFocusWnd->GetSafeHwnd());
00488 }
00489
00490 void CMainFrame::OnViewCustomize()
00491 {
00492   CWordPadView* pView = DYNAMIC_DOWNCAST (CWordPadView, GetActiveView());
00493   if (pView != NULL && pView->GetInPlaceActiveItem () != NULL)
00494   {
00495     return;
00496   }
00497
00498   //------------------------------------
00499   // Create a customize toolbars dialog:
00500   //------------------------------------
00501   CMFCToolBarsCustomizeDialog* pDlgCust = new CMFCToolBarsCustomizeDialog (this,
00502     TRUE /* Automatic menus scaning */,
00503     AFX_CUSTOMIZE_MENU_SHADOWS | AFX_CUSTOMIZE_TEXT_LABELS |
00504     AFX_CUSTOMIZE_MENU_ANIMATIONS);
00505
00506   pDlgCust->AddToolBar (_T("Format"), IDR_FORMATBAR);
00507
00508   CMFCToolBarFontComboBox* pFontButton = m_wndFormatBar.CreateFontComboButton ();
00509   pDlgCust->ReplaceButton (IDC_FONTNAME, *pFontButton);
00510   delete pFontButton;
00511
00512   CMFCToolBarFontSizeComboBox comboButtonFontSize (IDC_FONTSIZE,
00513     GetCmdMgr ()->GetCmdImage (IDC_FONTSIZE, FALSE),
00514     WS_TABSTOP|WS_VISIBLE|WS_TABSTOP|WS_VSCROLL|CBS_DROPDOWN,
00515     10*m_wndFormatBar.m_szBaseUnits.cx + 10);
00516   pDlgCust->ReplaceButton (IDC_FONTSIZE, comboButtonFontSize);
00517
00518   CMFCColorMenuButton* pColorButton = m_wndFormatBar.CreateColorButton ();
00519   pDlgCust->ReplaceButton (ID_CHAR_COLOR, *pColorButton);
00520   delete pColorButton;
00521
00522   CMFCToolBarMenuButton* pBorderTypeButton = m_wndFormatBar.CreateBorderTypeButton ();
00523   pDlgCust->ReplaceButton (ID_BORDER_1, *pBorderTypeButton);
00524   delete pBorderTypeButton;
00525
00526   pDlgCust->EnableUserDefinedToolbars ();
00527   pDlgCust->Create ();
00528 }
00529
00530 BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
00531 {
00532   BOOL bRes = CFrameWndEx::OnShowPopupMenu (pMenuPopup);
00533
00534   if (pMenuPopup != NULL && !pMenuPopup->IsCustomizePane())
00535   {
00536     AdjustObjectSubmenu (pMenuPopup);
00537     AdjustColorsMenu (pMenuPopup, ID_CHAR_COLOR);
00538   }
00539
00540   return bRes;
00541 }
00542
00543 void CMainFrame::AdjustObjectSubmenu (CMFCPopupMenu* pMenuPopup)
00544 {
00545   ASSERT (pMenuPopup != NULL);
00546   if (pMenuPopup == NULL)
00547   {
00548     return;
00549   }
00550
00551   if (pMenuPopup->GetParentPopupMenu () != NULL)
00552   {
00553     return;
00554   }
00555
00556   CMFCPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar ();
00557   ASSERT (pMenuBar != NULL);
00558   if (pMenuBar == NULL)
00559   {
00560     return;
00561   }
00562
00563   int iIndex = pMenuBar->CommandToIndex (ID_OLE_VERB_POPUP);
00564   if (iIndex < 0)
00565   {
00566     return;
00567   }
00568
00569   CWordPadDoc* pDoc = (CWordPadDoc*)GetActiveDocument();
00570   ASSERT_VALID (pDoc);
00571
00572   // check for single selection
00573   COleClientItem* pItem = pDoc->GetPrimarySelectedItem(GetActiveView());
00574   if (pItem == NULL || pItem->GetType() == OT_STATIC)
00575   {
00576     // no selection, or is 'static' item
00577     return;
00578   }
00579
00580   // only include Convert... if there is a handler for ID_OLE_EDIT_CONVERT
00581   UINT nConvertID = ID_OLE_EDIT_CONVERT;
00582   AFX_CMDHANDLERINFO info;
00583   if (!pDoc->OnCmdMsg(ID_OLE_EDIT_CONVERT, CN_COMMAND, NULL, &info))
00584     nConvertID = 0;
00585
00586   HMENU hMenu = pMenuBar->ExportToMenu ();
00587   ASSERT(hMenu != NULL);
00588   if (hMenu != NULL)
00589   {
00590     // update the menu
00591     AfxOleSetEditMenu(pItem, CMenu::FromHandle (hMenu), iIndex, ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, nConvertID);
00592
00593     pMenuBar->ImportFromMenu (hMenu);
00594     ::DestroyMenu (hMenu);
00595   }
00596 }
00597
00598 void CMainFrame::AdjustColorsMenu (CMFCPopupMenu* pMenuPopup, UINT uiID)
00599 {
00600   CMFCPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar ();
00601   ASSERT (pMenuBar != NULL);
00602   if (pMenuBar == NULL)
00603   {
00604     return;
00605   }
00606
00607   int iIndex = pMenuBar->CommandToIndex (uiID);
00608   if (iIndex < 0)
00609   {
00610     return;
00611   }
00612
00613   if (DYNAMIC_DOWNCAST (CMFCColorMenuButton, pMenuBar->GetButton (iIndex)) != NULL)
00614   {
00615     return;
00616   }
00617
00618   CMFCColorMenuButton* pColorButton = m_wndFormatBar.CreateColorButton ();
00619   pMenuBar->ReplaceButton (ID_CHAR_COLOR, *pColorButton, TRUE);
00620   delete pColorButton;
00621 }
00622 //**********************************************************************************
00623 LRESULT CMainFrame::OnHelpCustomizeToolbars(WPARAM wp, LPARAM /*lp*/)
00624 {
00625   int iPageNum = (int) wp;
00626
00627   // Test!
00628   CString str;
00629   str.Format (_T("Help about page number %d"), iPageNum);
00630
00631   MessageBox (str);
00632
00633   return 0;
00634 }
00635 //***************************************************************************************
00636 LRESULT CMainFrame::OnStartCustomize(WPARAM, LPARAM)
00637 {
00638   CWordPadView* pView = DYNAMIC_DOWNCAST (CWordPadView, GetActiveView());
00639   if (pView == NULL)
00640   {
00641     return 0;
00642   }
00643
00644   pView->GetRichEditCtrl().SetSel (-1, 0);
00645   return 0;
00646 }
00647 //***************************************************************************************
00648 LRESULT CMainFrame::OnToolbarCreateNew(WPARAM wp,LPARAM lp)
00649 {
00650   LRESULT lres = CFrameWndEx::OnToolbarCreateNew (wp,lp);
00651   if (lres == 0)
00652   {
00653     return 0;
00654   }
00655
00656   CMFCToolBar* pUserToolbar = (CMFCToolBar*) lres;
00657   ASSERT_VALID (pUserToolbar);
00658
00659   pUserToolbar->EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00660   pUserToolbar->AdjustLayout ();
00661   return lres;
00662 }
00663 //*******************************************************************************
00664 BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
00665 {
00666   //----------------------------------------------------
00667   // If Font/Size combobox has focus, we should redirect
00668   // clipboard commands to its editbox:
00669   //----------------------------------------------------
00670   if (HIWORD (wParam) == 1) // Command from accelerator
00671   {
00672     if (CMFCToolBarComboBoxButton::GetByCmd (IDC_FONTNAME, TRUE) != NULL ||
00673       CMFCToolBarComboBoxButton::GetByCmd (IDC_FONTSIZE, TRUE) != NULL)
00674     {
00675       // Either font combox or size combo are focused
00676       UINT uiCmd = LOWORD (wParam);
00677       switch (uiCmd)
00678       {
00679       case ID_EDIT_PASTE:
00680         ::SendMessage (::GetFocus (), WM_PASTE, 0, 0);
00681         return TRUE;
00682
00683       case ID_EDIT_COPY:
00684         ::SendMessage (::GetFocus (), WM_COPY, 0, 0);
00685         return TRUE;
00686
00687       case ID_EDIT_CUT:
00688         ::SendMessage (::GetFocus (), WM_CUT, 0, 0);
00689         return TRUE;
00690       }
00691     }
00692   }
00693
00694   return CFrameWndEx::OnCommand(wParam, lParam);
00695 }
00696 //*************************************************************************************
00697 LRESULT CMainFrame::OnGetDocumentColors(WPARAM, LPARAM lp)
00698 {
00699   CList<COLORREF,COLORREF>* pLstDocColors =
00700     (CList<COLORREF,COLORREF>*) lp;
00701   ASSERT_VALID (pLstDocColors);
00702
00703   CWordPadView* pView = DYNAMIC_DOWNCAST (CWordPadView, GetActiveView());
00704   if (pView != NULL)
00705   {
00706     pView->GetDocumentColors (*pLstDocColors);
00707   }
00708
00709   return 0;
00710 }
00711 //*************************************************************************************
00712 BOOL CMainFrame::OnTearOffMenu (CMFCPopupMenu* /*pMenuPopup*/, CPane* pBar)
00713 {
00714   CMFCColorBar* pColorBar = DYNAMIC_DOWNCAST (CMFCColorBar, pBar);
00715   if (pColorBar != NULL)
00716   {
00717     CWordPadView* pView = DYNAMIC_DOWNCAST (CWordPadView, GetActiveView());
00718     if (pView != NULL)
00719     {
00720       CList<COLORREF,COLORREF> lstDocColors;
00721       pView->GetDocumentColors (lstDocColors);
00722
00723       pColorBar->SetDocumentColors (_T("Document's Colors"), lstDocColors);
00724     }
00725   }
00726
00727   return TRUE;
00728 }
00729 //**************************************************************************************
00730 BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
00731 {
00732   if (!CFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
00733   {
00734     return FALSE;
00735   }
00736
00737   //----------------------------------------------------
00738   // Enable customization button fore all user toolbars:
00739   //----------------------------------------------------
00740   for (int i = 0; i < iMaxUserToolbars; i ++)
00741   {
00742     CMFCToolBar* pUserToolbar = GetUserToolBarByIndex (i);
00743     if (pUserToolbar != NULL)
00744     {
00745       pUserToolbar->EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
00746     }
00747   }
00748
00749   return TRUE;
00750 }
00751
00752 void CMainFrame::OnChangeLook ()
00753 {
00754   BOOL bIsLook2003 = CMFCVisualManager::GetInstance ()->IsKindOf (
00755     RUNTIME_CLASS (CMFCVisualManagerOffice2003));
00756
00757   m_wndRulerBar.CreateGDIObjects ();
00758   m_wndRulerBar.RedrawWindow ();
00759
00760   CWindowDC dc (NULL);
00761   int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);
00762
00763   m_wndTaskPane.UpdateIcons ();
00764   m_wndTaskPane.EnableNavigationToolbar (bIsLook2003,
00765     theApp.m_bHiColorIcons && nBitsPerPixel > 16 ? IDB_TASKSPANE_TOOLBAR : 0, CSize (16, 16));
00766   m_wndTaskPane.RecalcLayout (FALSE);
00767
00768   //-----------------------
00769   // Reload toolbar images:
00770   //-----------------------
00771   CMFCToolBar::ResetAllImages ();
00772
00773   m_wndToolBar.LoadBitmap (
00774     theApp.m_bHiColorIcons && nBitsPerPixel > 16 ? IDB_MAINFRAME_HC : IDR_MAINFRAME);
00775
00776   m_wndFormatBar.LoadBitmap (IDR_FORMATBAR);
00777
00778   CMFCToolBar::AddToolBarForImageCollection (IDR_TOOLBAR_IMAGES,
00779     theApp.m_bHiColorIcons && nBitsPerPixel > 16 ? IDR_TOOLBAR_IMAGES_HC : 0);
00780
00781   CMFCToolBar::AddToolBarForImageCollection (IDR_BORDER_TYPE, IDR_BORDER_TYPE);
00782
00783   RecalcLayout ();
00784   RedrawWindow (NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
00785 }
00786
00787 void CMainFrame::OnDummy()
00788 {
00789   AfxMessageBox (ID_DUMMY);
00790 }
00791
00792 void CMainFrame::OnViewFullScreen()
00793 {
00794   ShowFullScreen ();
00795 }
00796
00797 void CMainFrame::OnAskQuestion()
00798 {
00799   CMFCToolBarComboBoxButton* pHelpCombo = m_wndMenuBar.GetHelpCombobox ();
00800   if (pHelpCombo == NULL)
00801   {
00802     return;
00803   }
00804
00805   CString strQuestion = pHelpCombo->GetText ();
00806   strQuestion.TrimLeft ();
00807   strQuestion.TrimRight ();
00808
00809   if (strQuestion.IsEmpty ())
00810   {
00811     return;
00812   }
00813
00814   pHelpCombo->AddItem (strQuestion);
00815
00816   CString str;
00817   str.Format (_T("The question is: %s"), (LPCTSTR)strQuestion);
00818
00819   MessageBox (str);
00820
00821   SetFocus ();
00822 }
Generated on Sat Nov 23 2024 17:00:18 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TasksPane/TasksPaneView.cpp Source File

  • vc2008fp
  • TasksPane

TasksPaneView.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TasksPane.h"
00013
00014 #include "MainFrm.h"
00015 #include "TasksPaneDoc.h"
00016 #include "TasksPaneView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CTasksPaneView
00026
00027 IMPLEMENT_DYNCREATE(CTasksPaneView, CFormView)
00028
00029 BEGIN_MESSAGE_MAP(CTasksPaneView, CFormView)
00030   ON_BN_CLICKED(IDC_RADIO_WIN, OnVisualManager)
00031   ON_BN_CLICKED(IDC_CHECK_WRAPTASKS, OnWraptasks)
00032   ON_BN_CLICKED(IDC_CHECK_WRAPLABELS, OnWraplabels)
00033   ON_BN_CLICKED(IDC_CHECK_NAVTOOLBAR, OnNavtoolbar)
00034   ON_BN_CLICKED(IDC_CHECK_HISTBUTTONS, OnHistbuttons)
00035   ON_BN_CLICKED(IDC_CHECK_HICOLORIMAGES, OnHicolorimages)
00036   ON_WM_DESTROY()
00037   ON_BN_CLICKED(IDC_CHECK_SCROLLBUTTONS, OnScrollbuttons)
00038   ON_BN_CLICKED(IDC_CHECK_ANIMATION, OnAnimation)
00039   ON_BN_CLICKED(IDC_CHECK_COLLAPSEGROUPS, OnCollapsegroups)
00040   ON_BN_CLICKED(IDC_CHECK_MARGINS, OnMargins)
00041   ON_BN_CLICKED(IDC_COLOR_GROUPTEXT, OnColorGrouptext)
00042   ON_BN_CLICKED(IDC_COLOR_GROUPTEXTHOT, OnColorGrouptexthot)
00043   ON_BN_CLICKED(IDC_COLOR_TASKTEXT, OnColorTasktext)
00044   ON_BN_CLICKED(IDC_COLOR_TASKTEXTHOT, OnColorTasktexthot)
00045   ON_EN_CHANGE(IDC_EDIT_HMARGIN, OnChangeMargins)
00046   ON_BN_CLICKED(IDC_CHECK_CAPTIONICON, OnCaptionicon)
00047   ON_BN_CLICKED(IDC_RADIO_OFFICEXP, OnVisualManager)
00048   ON_BN_CLICKED(IDC_RADIO_WINXP, OnVisualManager)
00049   ON_BN_CLICKED(IDC_RADIO_OFFICE2003, OnVisualManager)
00050   ON_EN_CHANGE(IDC_EDIT_VMARGIN, OnChangeMargins)
00051   ON_EN_CHANGE(IDC_EDIT_GROUPSPACING, OnChangeMargins)
00052   ON_EN_CHANGE(IDC_EDIT_TASKSPACING, OnChangeMargins)
00053   ON_EN_CHANGE(IDC_EDIT_CAPTIONHEIGHT, OnChangeMargins)
00054   ON_EN_CHANGE(IDC_EDIT_TASKOFFSET, OnChangeMargins)
00055   ON_EN_CHANGE(IDC_EDIT_ICONOFFSET, OnChangeMargins)
00056   ON_BN_CLICKED(IDC_RADIO_OFFICE2007, OnVisualManager)
00057   ON_BN_CLICKED(IDC_RADIO_VS2005, OnVisualManager)
00058   ON_WM_CONTEXTMENU()
00059   // Standard printing commands
00060   ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
00061   ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
00062   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00063 END_MESSAGE_MAP()
00064
00065 /////////////////////////////////////////////////////////////////////////////
00066 // CTasksPaneView construction/destruction
00067
00068 CTasksPaneView::CTasksPaneView()
00069   : CFormView(CTasksPaneView::IDD)
00070 {
00071   m_nVisualManager = theApp.GetInt (_T("VisualManager"), 2);
00072   m_bWrapTasks = FALSE;
00073   m_bWrapLabels = TRUE;
00074   m_bNavToolbar = TRUE;
00075   m_bMenuButtons = FALSE;
00076   m_bHicolorImages = FALSE;
00077   m_bCollapseGroups = TRUE;
00078   m_bCustomizeMargins = FALSE;
00079   m_bScrollButtons = TRUE;
00080   m_bAnimation = TRUE;
00081   m_nCaptionHeight = 0;
00082   m_nGroupSpacing = 0;
00083   m_nHMargin = 0;
00084   m_nIconOffset = 0;
00085   m_nTaskOffset = 0;
00086   m_nTaskSpacing = 0;
00087   m_nVMargin = 0;
00088   m_bCaptionIcon = FALSE;
00089 }
00090
00091 CTasksPaneView::~CTasksPaneView()
00092 {
00093 }
00094
00095 void CTasksPaneView::DoDataExchange(CDataExchange* pDX)
00096 {
00097   CFormView::DoDataExchange(pDX);
00098
00099   DDX_Control(pDX, IDC_COLOR_TASKTEXTHOT, m_ColorTaskTextHot);
00100   DDX_Control(pDX, IDC_COLOR_TASKTEXT, m_ColorTaskText);
00101   DDX_Control(pDX, IDC_COLOR_GROUPTEXTHOT, m_ColorGroupTextHot);
00102   DDX_Control(pDX, IDC_COLOR_GROUPTEXT, m_ColorGroupText);
00103
00104   DDX_Control(pDX, IDC_SPIN3, m_VMargin);
00105   DDX_Control(pDX, IDC_SPIN4, m_HMargin);
00106   DDX_Control(pDX, IDC_SPIN5, m_GroupSpacing);
00107   DDX_Control(pDX, IDC_SPIN6, m_TaskSpacing);
00108   DDX_Control(pDX, IDC_SPIN7, m_CaptionHeight);
00109   DDX_Control(pDX, IDC_SPIN8, m_TaskOffset);
00110   DDX_Control(pDX, IDC_SPIN9, m_IconOffset);
00111
00112   DDX_Radio(pDX, IDC_RADIO_WIN, m_nVisualManager);
00113   DDX_Check(pDX, IDC_CHECK_WRAPTASKS, m_bWrapTasks);
00114   DDX_Check(pDX, IDC_CHECK_WRAPLABELS, m_bWrapLabels);
00115   DDX_Check(pDX, IDC_CHECK_NAVTOOLBAR, m_bNavToolbar);
00116   DDX_Check(pDX, IDC_CHECK_HISTBUTTONS, m_bMenuButtons);
00117   DDX_Check(pDX, IDC_CHECK_HICOLORIMAGES, m_bHicolorImages);
00118   DDX_Check(pDX, IDC_CHECK_COLLAPSEGROUPS, m_bCollapseGroups);
00119   DDX_Check(pDX, IDC_CHECK_MARGINS, m_bCustomizeMargins);
00120   DDX_Check(pDX, IDC_CHECK_SCROLLBUTTONS, m_bScrollButtons);
00121   DDX_Check(pDX, IDC_CHECK_ANIMATION, m_bAnimation);
00122   DDX_Check(pDX, IDC_CHECK_CAPTIONICON, m_bCaptionIcon);
00123
00124   DDX_Text(pDX, IDC_EDIT_VMARGIN, m_nVMargin);
00125   DDV_MinMaxInt(pDX, m_nVMargin, 0, 25);
00126   DDX_Text(pDX, IDC_EDIT_HMARGIN, m_nHMargin);
00127   DDV_MinMaxInt(pDX, m_nHMargin, 0, 25);
00128   DDX_Text(pDX, IDC_EDIT_GROUPSPACING, m_nGroupSpacing);
00129   DDV_MinMaxInt(pDX, m_nGroupSpacing, 0, 25);
00130   DDX_Text(pDX, IDC_EDIT_TASKSPACING, m_nTaskSpacing);
00131   DDV_MinMaxInt(pDX, m_nTaskSpacing, 0, 25);
00132   DDX_Text(pDX, IDC_EDIT_CAPTIONHEIGHT, m_nCaptionHeight);
00133   DDV_MinMaxInt(pDX, m_nCaptionHeight, 0, 30);
00134   DDX_Text(pDX, IDC_EDIT_TASKOFFSET, m_nTaskOffset);
00135   DDV_MinMaxInt(pDX, m_nTaskOffset, 0, 20);
00136   DDX_Text(pDX, IDC_EDIT_ICONOFFSET, m_nIconOffset);
00137   DDV_MinMaxInt(pDX, m_nIconOffset, 0, 25);
00138 }
00139
00140 BOOL CTasksPaneView::PreCreateWindow(CREATESTRUCT& cs)
00141 {
00142   // TODO: Modify the Window class or styles here by modifying
00143   //  the CREATESTRUCT cs
00144
00145   return CFormView::PreCreateWindow(cs);
00146 }
00147
00148 void CTasksPaneView::OnInitialUpdate()
00149 {
00150   // There is only one view ever, so it only needs to do the initial
00151   // update once--otherwise the application is  resized needlessly.
00152   static BOOL bUpdatedOnce = FALSE;
00153   if (bUpdatedOnce)
00154     return;
00155   bUpdatedOnce = TRUE;
00156
00157   CFormView::OnInitialUpdate();
00158   GetParentFrame()->RecalcLayout();
00159   ResizeParentToFit();
00160
00161   // Create color pickers:
00162   m_ColorTaskTextHot.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
00163   m_ColorTaskTextHot.EnableOtherButton (_T("Other"));
00164   m_ColorTaskTextHot.SetColor ((COLORREF)-1);
00165
00166   m_ColorTaskText.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
00167   m_ColorTaskText.EnableOtherButton (_T("Other"));
00168   m_ColorTaskText.SetColor ((COLORREF)-1);
00169
00170   m_ColorGroupTextHot.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
00171   m_ColorGroupTextHot.EnableOtherButton (_T("Other"));
00172   m_ColorGroupTextHot.SetColor ((COLORREF)-1);
00173
00174   m_ColorGroupText.EnableAutomaticButton (_T("Default"), (COLORREF)-1);
00175   m_ColorGroupText.EnableOtherButton (_T("Other"));
00176   m_ColorGroupText.SetColor ((COLORREF)-1);
00177
00178   OnMargins();
00179   GetDlgItem (IDC_CHECK_HISTBUTTONS)->EnableWindow (m_bNavToolbar);
00180
00181   CWindowDC dc (NULL);
00182   int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);
00183   GetDlgItem (IDC_CHECK_HICOLORIMAGES)->EnableWindow (m_bNavToolbar && (nBitsPerPixel > 16));
00184
00185   m_VMargin.SetRange(0, 25);
00186   m_HMargin.SetRange(0, 25);
00187   m_GroupSpacing.SetRange(0, 25);
00188   m_TaskSpacing.SetRange(0, 25);
00189   m_CaptionHeight.SetRange(0, 30);
00190   m_TaskOffset.SetRange(0, 20);
00191   m_IconOffset.SetRange(0, 25);
00192 }
00193
00194 /////////////////////////////////////////////////////////////////////////////
00195 // CTasksPaneView printing
00196
00197 void CTasksPaneView::OnFilePrintPreview()
00198 {
00199   AFXPrintPreview (this);
00200 }
00201
00202 BOOL CTasksPaneView::OnPreparePrinting(CPrintInfo* pInfo)
00203 {
00204   // default preparation
00205   return DoPreparePrinting(pInfo);
00206 }
00207
00208 void CTasksPaneView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00209 {
00210   // TODO: add extra initialization before printing
00211 }
00212
00213 void CTasksPaneView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00214 {
00215   // TODO: add cleanup after printing
00216 }
00217
00218 void CTasksPaneView::OnPrint(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00219 {
00220   // TODO: add customized printing code here
00221 }
00222
00223 /////////////////////////////////////////////////////////////////////////////
00224 // CTasksPaneView diagnostics
00225
00226 #ifdef _DEBUG
00227 void CTasksPaneView::AssertValid() const
00228 {
00229   CFormView::AssertValid();
00230 }
00231
00232 void CTasksPaneView::Dump(CDumpContext& dc) const
00233 {
00234   CFormView::Dump(dc);
00235 }
00236
00237 CTasksPaneDoc* CTasksPaneView::GetDocument() // non-debug version is inline
00238 {
00239   ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTasksPaneDoc)));
00240   return (CTasksPaneDoc*)m_pDocument;
00241 }
00242 #endif //_DEBUG
00243
00244 /////////////////////////////////////////////////////////////////////////////
00245 // CTasksPaneView message handlers
00246
00247 void CTasksPaneView::OnContextMenu(CWnd*, CPoint point)
00248 {
00249   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00250 }
00251 //******************************************************************************************
00252 void CTasksPaneView::OnDestroy()
00253 {
00254   UpdateData ();
00255
00256   theApp.WriteInt (_T("VisualManager"), m_nVisualManager);
00257
00258   CFormView::OnDestroy();
00259 }
00260 //******************************************************************************************
00261 CTaskPane* CTasksPaneView::GetTasksPane()
00262 {
00263   CMainFrame* pMainFrm = ((CMainFrame*) AfxGetMainWnd ());
00264   ASSERT_VALID (pMainFrm);
00265
00266   return &(pMainFrm->m_wndTaskPane);
00267 }
00268 //******************************************************************************************
00269 void CTasksPaneView::OnVisualManager()
00270 {
00271   UpdateData ();
00272
00273   OnChangeMargins ();
00274
00275   CMainFrame* pMainFrm = ((CMainFrame*) AfxGetMainWnd ());
00276   ASSERT_VALID (pMainFrm);
00277
00278   pMainFrm->OnAppLook (ID_VIEW_APPLOOK_2000 + m_nVisualManager);
00279 }
00280 //******************************************************************************************
00281 void CTasksPaneView::OnWraptasks()
00282 {
00283   UpdateData ();
00284
00285   CTaskPane* pTaskPane = GetTasksPane ();
00286   ASSERT_VALID (pTaskPane);
00287
00288   pTaskPane->EnableWrapTasks (m_bWrapTasks);
00289   pTaskPane->RecalcLayout ();
00290 }
00291 //******************************************************************************************
00292 void CTasksPaneView::OnWraplabels()
00293 {
00294   UpdateData ();
00295
00296   CTaskPane* pTaskPane = GetTasksPane ();
00297   ASSERT_VALID (pTaskPane);
00298
00299   pTaskPane->EnableWrapLabels (m_bWrapLabels);
00300   pTaskPane->RecalcLayout ();
00301 }
00302 //******************************************************************************************
00303 void CTasksPaneView::OnNavtoolbar()
00304 {
00305   UpdateData ();
00306
00307   CTaskPane* pTaskPane = GetTasksPane ();
00308   ASSERT_VALID (pTaskPane);
00309
00310   CWindowDC dc (NULL);
00311   int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);
00312   if (m_bHicolorImages && (nBitsPerPixel > 16))
00313   {
00314     pTaskPane->EnableNavigationToolbar (m_bNavToolbar, IDB_TASKPANE_TOOLBAR, CSize (16, 16));
00315   }
00316   else
00317   {
00318     pTaskPane->EnableNavigationToolbar (m_bNavToolbar);
00319   }
00320
00321   pTaskPane->RecalcLayout ();
00322
00323   GetDlgItem (IDC_CHECK_HISTBUTTONS)->EnableWindow (m_bNavToolbar);
00324   GetDlgItem (IDC_CHECK_HICOLORIMAGES)->EnableWindow (m_bNavToolbar && (nBitsPerPixel > 16));
00325 }
00326 //******************************************************************************************
00327 void CTasksPaneView::OnHistbuttons()
00328 {
00329   UpdateData ();
00330
00331   CTaskPane* pTaskPane = GetTasksPane ();
00332   ASSERT_VALID (pTaskPane);
00333
00334   pTaskPane->EnableHistoryMenuButtons (m_bMenuButtons);
00335   pTaskPane->RecalcLayout ();
00336 }
00337 //******************************************************************************************
00338 void CTasksPaneView::OnHicolorimages()
00339 {
00340   UpdateData ();
00341
00342   CTaskPane* pTaskPane = GetTasksPane ();
00343   ASSERT_VALID (pTaskPane);
00344
00345   CWindowDC dc (NULL);
00346   int nBitsPerPixel = dc.GetDeviceCaps (BITSPIXEL);
00347   if (m_bHicolorImages && (nBitsPerPixel > 16))
00348   {
00349     pTaskPane->EnableNavigationToolbar (TRUE, IDB_TASKPANE_TOOLBAR, CSize (16, 16));
00350   }
00351   else
00352   {
00353     pTaskPane->EnableNavigationToolbar (TRUE);
00354   }
00355
00356   pTaskPane->UpdateToolbar ();
00357 }
00358 //******************************************************************************************
00359 void CTasksPaneView::OnScrollbuttons()
00360 {
00361   UpdateData ();
00362
00363   CTaskPane* pTaskPane = GetTasksPane ();
00364   ASSERT_VALID (pTaskPane);
00365
00366   pTaskPane->EnableScrollButtons (m_bScrollButtons);
00367   pTaskPane->RecalcLayout ();
00368 }
00369 //******************************************************************************************
00370 void CTasksPaneView::OnAnimation()
00371 {
00372   UpdateData ();
00373
00374   CTaskPane* pTaskPane = GetTasksPane ();
00375   ASSERT_VALID (pTaskPane);
00376
00377   pTaskPane->EnableAnimation (m_bAnimation);
00378 }
00379 //******************************************************************************************
00380 void CTasksPaneView::OnCollapsegroups()
00381 {
00382   UpdateData ();
00383
00384   CTaskPane* pTaskPane = GetTasksPane ();
00385   ASSERT_VALID (pTaskPane);
00386
00387   pTaskPane->EnableGroupCollapse (m_bCollapseGroups);
00388   pTaskPane->RecalcLayout ();
00389 }
00390 //******************************************************************************************
00391 void CTasksPaneView::OnColorGrouptext()
00392 {
00393   UpdateData ();
00394
00395   COLORREF clrTextHot = m_ColorGroupTextHot.GetColor ();  // (COLORREF)-1, if default
00396   COLORREF clrText = m_ColorGroupText.GetColor ();    // (COLORREF)-1, if default
00397
00398   CTaskPane* pTaskPane = GetTasksPane ();
00399   ASSERT_VALID (pTaskPane);
00400
00401   pTaskPane->SetGroupTextColor (pTaskPane->m_nUserColorGroup, clrText, clrTextHot);
00402 }
00403 //******************************************************************************************
00404 void CTasksPaneView::OnColorGrouptexthot()
00405 {
00406   UpdateData ();
00407
00408   COLORREF clrTextHot = m_ColorGroupTextHot.GetColor ();  // (COLORREF)-1, if default
00409   COLORREF clrText = m_ColorGroupText.GetColor ();    // (COLORREF)-1, if default
00410
00411   CTaskPane* pTaskPane = GetTasksPane ();
00412   ASSERT_VALID (pTaskPane);
00413
00414   pTaskPane->SetGroupTextColor (pTaskPane->m_nUserColorGroup, clrText, clrTextHot);
00415 }
00416 //******************************************************************************************
00417 void CTasksPaneView::OnColorTasktext()
00418 {
00419   UpdateData ();
00420
00421   COLORREF clrTextHot = m_ColorTaskTextHot.GetColor (); // (COLORREF)-1, if default
00422   COLORREF clrText = m_ColorTaskText.GetColor ();     // (COLORREF)-1, if default
00423
00424   CTaskPane* pTaskPane = GetTasksPane ();
00425   ASSERT_VALID (pTaskPane);
00426
00427   pTaskPane->SetTaskTextColor (pTaskPane->m_nUserColorGroup, pTaskPane->m_nUserColorTask, clrText, clrTextHot);
00428 }
00429 //******************************************************************************************
00430 void CTasksPaneView::OnColorTasktexthot()
00431 {
00432   UpdateData ();
00433
00434   COLORREF clrTextHot = m_ColorTaskTextHot.GetColor (); // (COLORREF)-1, if default
00435   COLORREF clrText = m_ColorTaskText.GetColor ();     // (COLORREF)-1, if default
00436
00437   CTaskPane* pTaskPane = GetTasksPane ();
00438   ASSERT_VALID (pTaskPane);
00439
00440   pTaskPane->SetTaskTextColor (pTaskPane->m_nUserColorGroup, pTaskPane->m_nUserColorTask, clrText, clrTextHot);
00441 }
00442 //******************************************************************************************
00443 void CTasksPaneView::OnMargins()
00444 {
00445   UpdateData ();
00446
00447   GetDlgItem (IDC_EDIT_VMARGIN)->EnableWindow (m_bCustomizeMargins);
00448   GetDlgItem (IDC_EDIT_HMARGIN)->EnableWindow (m_bCustomizeMargins);
00449   GetDlgItem (IDC_EDIT_GROUPSPACING)->EnableWindow (m_bCustomizeMargins);
00450   GetDlgItem (IDC_EDIT_TASKSPACING)->EnableWindow (m_bCustomizeMargins);
00451   GetDlgItem (IDC_EDIT_CAPTIONHEIGHT)->EnableWindow (m_bCustomizeMargins);
00452   GetDlgItem (IDC_EDIT_TASKOFFSET)->EnableWindow (m_bCustomizeMargins);
00453   GetDlgItem (IDC_EDIT_ICONOFFSET)->EnableWindow (m_bCustomizeMargins);
00454
00455   GetDlgItem (IDC_SPIN3)->EnableWindow (m_bCustomizeMargins);
00456   GetDlgItem (IDC_SPIN4)->EnableWindow (m_bCustomizeMargins);
00457   GetDlgItem (IDC_SPIN5)->EnableWindow (m_bCustomizeMargins);
00458   GetDlgItem (IDC_SPIN6)->EnableWindow (m_bCustomizeMargins);
00459   GetDlgItem (IDC_SPIN7)->EnableWindow (m_bCustomizeMargins);
00460   GetDlgItem (IDC_SPIN8)->EnableWindow (m_bCustomizeMargins);
00461   GetDlgItem (IDC_SPIN9)->EnableWindow (m_bCustomizeMargins);
00462
00463   GetDlgItem (IDC_STATIC_MARGINS1)->EnableWindow (m_bCustomizeMargins);
00464   GetDlgItem (IDC_STATIC_MARGINS2)->EnableWindow (m_bCustomizeMargins);
00465   GetDlgItem (IDC_STATIC_MARGINS3)->EnableWindow (m_bCustomizeMargins);
00466   GetDlgItem (IDC_STATIC_MARGINS4)->EnableWindow (m_bCustomizeMargins);
00467   GetDlgItem (IDC_STATIC_MARGINS5)->EnableWindow (m_bCustomizeMargins);
00468   GetDlgItem (IDC_STATIC_MARGINS6)->EnableWindow (m_bCustomizeMargins);
00469   GetDlgItem (IDC_STATIC_MARGINS7)->EnableWindow (m_bCustomizeMargins);
00470
00471   if (m_bCustomizeMargins)
00472   {
00473     // retrieve visual manager's default values
00474     m_nVMargin = CMFCVisualManager::GetInstance ()->GetTasksPaneVertMargin ();
00475     m_nHMargin = CMFCVisualManager::GetInstance ()->GetTasksPaneHorzMargin ();
00476     m_nGroupSpacing = CMFCVisualManager::GetInstance ()->GetTasksPaneGroupVertOffset ();
00477     m_nTaskSpacing = CMFCVisualManager::GetInstance ()->GetTasksPaneIconVertOffset ();
00478     m_nCaptionHeight = CMFCVisualManager::GetInstance ()->GetTasksPaneGroupCaptionHeight();
00479     m_nTaskOffset = CMFCVisualManager::GetInstance ()->GetTasksPaneTaskHorzOffset();
00480     m_nIconOffset = CMFCVisualManager::GetInstance ()->GetTasksPaneIconHorzOffset();
00481
00482     UpdateData (FALSE);
00483   }
00484   else
00485   {
00486     // reset visual manager's default values
00487     OnChangeMargins ();
00488   }
00489 }
00490 //******************************************************************************************
00491 void CTasksPaneView::OnChangeMargins ()
00492 {
00493   if (m_ColorTaskTextHot.GetSafeHwnd () == NULL)
00494   {
00495     return;
00496   }
00497
00498   if (!UpdateData())
00499   {
00500     return;
00501   }
00502
00503   CTaskPane* pTaskPane = GetTasksPane ();
00504   ASSERT_VALID (pTaskPane);
00505
00506   if (m_bCustomizeMargins)
00507   {
00508     pTaskPane->SetVertMargin (m_nVMargin);
00509     pTaskPane->SetHorzMargin (m_nHMargin);
00510     pTaskPane->SetGroupVertOffset (m_nGroupSpacing);
00511     pTaskPane->SetTasksIconVertOffset (m_nTaskSpacing);
00512     pTaskPane->SetGroupCaptionHeight (m_nCaptionHeight);
00513     pTaskPane->SetTasksHorzOffset (m_nTaskOffset);
00514     pTaskPane->SetTasksIconHorzOffset (m_nIconOffset);
00515   }
00516   else
00517   {
00518     // use visual manager's default values
00519     pTaskPane->SetVertMargin (-1);
00520     pTaskPane->SetHorzMargin (-1);
00521     pTaskPane->SetGroupVertOffset (-1);
00522     pTaskPane->SetTasksIconVertOffset (-1);
00523     pTaskPane->SetGroupCaptionHeight (-1);
00524     pTaskPane->SetTasksHorzOffset (-1);
00525     pTaskPane->SetTasksIconHorzOffset (-1);
00526   }
00527
00528   pTaskPane->RecalcLayout ();
00529 }
00530 //******************************************************************************************
00531 void CTasksPaneView::OnCaptionicon()
00532 {
00533   BOOL bOld = m_bCaptionIcon;
00534
00535   UpdateData ();
00536
00537   if (bOld == m_bCaptionIcon)
00538   {
00539     return;
00540   }
00541
00542   CTaskPane* pTaskPane = GetTasksPane ();
00543   ASSERT_VALID (pTaskPane);
00544
00545   // --------------------------------------
00546   // Remove all groups from the first page:
00547   // --------------------------------------
00548   pTaskPane->RemoveAllGroups (0);
00549
00550   // -----------------
00551   // Add groups again:
00552   // -----------------
00553   if (m_bCaptionIcon)
00554   {
00555     HICON hIcon = (HICON)LoadImage(AfxGetInstanceHandle (),
00556                            MAKEINTRESOURCE (IDI_NOTE),
00557                            IMAGE_ICON,
00558                            0,
00559                            0,
00560                            LR_SHARED);
00561     pTaskPane->m_nDocumentsGroup = pTaskPane->AddGroup (0, _T("Open a document"), FALSE, TRUE, hIcon);
00562   }
00563   else
00564   {
00565     pTaskPane->m_nDocumentsGroup = pTaskPane->AddGroup (0, _T("Open a document"), FALSE, TRUE);
00566   }
00567
00568   // Add MRU list:
00569   pTaskPane->AddMRUFilesList (pTaskPane->m_nDocumentsGroup);
00570   pTaskPane->AddTask (pTaskPane->m_nDocumentsGroup, _T("More Documents..."), 0, ID_FILE_OPEN);
00571
00572   int nPage1Gr2 = pTaskPane->AddGroup (0, _T("Custom group"));
00573   pTaskPane->m_nUserColorGroup = nPage1Gr2;
00574
00575   pTaskPane->AddTask (nPage1Gr2, _T("Task 1"), 1, ID_TASK1);
00576   pTaskPane->m_nUserColorTask =
00577     pTaskPane->AddTask (nPage1Gr2, _T("Task 2"), 2, ID_TASK2);
00578   pTaskPane->AddTask (nPage1Gr2, _T("Task 3"), 3, ID_TASK3);
00579   pTaskPane->AddSeparator (nPage1Gr2);
00580   pTaskPane->AddTask (nPage1Gr2, _T("Task 4"), 4, ID_TASK4);
00581   pTaskPane->AddTask (nPage1Gr2, _T("Task 5"), 5, ID_TASK5);
00582   pTaskPane->AddTask (nPage1Gr2, _T("Long task's name to see words wrap feature"), 6, ID_TASK6);
00583
00584   int nPage1Gr3 = pTaskPane->AddGroup (0, _T("Details"), TRUE);
00585   pTaskPane->AddLabel (nPage1Gr3, _T("The Label contains text, which can be displayed in several lines. \n\nText can include line breaking characters \'\\n\' and &underline markers \'&&\'"));
00586
00587   // Set custom colors again:
00588   OnColorGrouptext();
00589   OnColorGrouptexthot();
00590   OnColorTasktext();
00591   OnColorTasktexthot();
00592
00593   pTaskPane->RecalcLayout ();
00594 }
00595
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMFCBindApp Member List

This is the complete list of members for CMFCBindApp, including all inherited members.
CMFCBindApp() | CMFCBindApp |
InitInstance() | CMFCBindApp | [virtual]
OnAppAbout() | CMFCBindApp |
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMLinksBarButton.cpp Source File

  • vc2008fp
  • MSMoneyDemo

MSMLinksBarButton.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009 //
00010 // LinkButton.cpp: implementation of the CMSMLinksBarButton class.
00011 //
00012 //////////////////////////////////////////////////////////////////////
00013
00014 #include "stdafx.h"
00015 #include "MSMLinksBarButton.h"
00016 #include "MSMVisualManager.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char THIS_FILE[]=__FILE__;
00021 #define new DEBUG_NEW
00022 #endif
00023
00024 static const int nTextMargin = 3;
00025
00026 IMPLEMENT_SERIAL(CMSMLinksBarButton, CMFCToolBarButton, 1)
00027
00028 //////////////////////////////////////////////////////////////////////
00029 // Construction/Destruction
00030 //////////////////////////////////////////////////////////////////////
00031
00032 CMSMLinksBarButton::CMSMLinksBarButton ()
00033 {
00034   Initialize ();
00035 }
00036
00037 //***************************************************************************************
00038 CMSMLinksBarButton::CMSMLinksBarButton (LPCTSTR lpszLabel, UINT nID)
00039 {
00040   m_strText = lpszLabel;
00041   m_nID     = nID;
00042
00043   Initialize ();
00044 }
00045 //***************************************************************************************
00046 CMSMLinksBarButton::~CMSMLinksBarButton ()
00047 {
00048
00049 }
00050 //***************************************************************************************
00051 void CMSMLinksBarButton::Initialize ()
00052 {
00053   m_bText = TRUE;
00054 }
00055
00056 void CMSMLinksBarButton::OnDraw (CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages,
00057                 BOOL bHorz, BOOL bCustomizeMode, BOOL bHighlight,
00058                 BOOL bDrawBorder, BOOL /*bGrayDisabledButtons*/)
00059 {
00060   ASSERT_VALID (pDC);
00061   ASSERT_VALID (this);
00062
00063   m_bHorz = bHorz;
00064
00065   //----------------------
00066   // Fill button interior:
00067   //----------------------
00068   BOOL bChecked = (m_nStyle & TBBS_CHECKED) != 0;
00069
00070   if (bChecked)
00071   {
00072     m_nStyle &= ~TBBS_CHECKED;
00073   }
00074
00075   FillInterior (pDC, rect, bHighlight);
00076
00077   if (bChecked)
00078   {
00079     m_nStyle |= TBBS_CHECKED;
00080   }
00081
00082   BOOL bHot = bHighlight;
00083   CSize sizeImage = (pImages == NULL) ? CSize (0, 0) : pImages->GetImageSize (TRUE);
00084
00085   CRect rectInternal = rect;
00086
00087   //--------------------
00088   // Draw button's text:
00089   //--------------------
00090   CMFCVisualManager::AFX_BUTTON_STATE state = CMFCVisualManager::ButtonsIsRegular;
00091
00092   CFont* pOldFont = NULL;
00093
00094   if (bHighlight)
00095   {
00096     state = CMFCVisualManager::ButtonsIsHighlighted;
00097   }
00098   else if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
00099   {
00100     //-----------------------
00101     // Pressed in or checked:
00102     //-----------------------
00103     state = CMFCVisualManager::ButtonsIsPressed;
00104   }
00105
00106   if (m_nStyle & TBBS_CHECKED)
00107   {
00108     pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));
00109   }
00110   else
00111   {
00112     pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontRegular));
00113   }
00114
00115   COLORREF clrText = CMFCVisualManager::GetInstance ()->GetToolbarButtonTextColor (
00116     this, state);
00117
00118   pDC->SetTextColor (clrText);
00119   CString strText = m_strText;
00120   CRect rectText = rectInternal;
00121   UINT uiTextFormat = 0;
00122
00123   uiTextFormat = DT_SINGLELINE;
00124
00125   if (bHorz)
00126   {
00127     pDC->DrawText (strText, &rectText, uiTextFormat | DT_VCENTER | DT_CENTER | DT_END_ELLIPSIS);
00128   }
00129
00130   pDC->SelectObject (pOldFont);
00131
00132   //--------------------
00133   // Draw button border:
00134   //--------------------
00135   if (!bCustomizeMode && HaveHotBorder () && bDrawBorder)
00136   {
00137     if (m_nStyle & (TBBS_PRESSED | TBBS_CHECKED))
00138     {
00139       //-----------------------
00140       // Pressed in or checked:
00141       //-----------------------
00142       if ((m_nStyle & TBBS_PRESSED) || bHighlight)
00143       {
00144         CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
00145           this, rect, CMFCVisualManager::ButtonsIsPressed);
00146       }
00147     }
00148     else if (bHot && !(m_nStyle & TBBS_DISABLED) &&
00149       !(m_nStyle & (TBBS_CHECKED | TBBS_INDETERMINATE)))
00150     {
00151       CMFCVisualManager::GetInstance ()->OnDrawButtonBorder (pDC,
00152         this, rect, CMFCVisualManager::ButtonsIsHighlighted);
00153     }
00154   }
00155 }
00156
00157
00158 SIZE CMSMLinksBarButton::OnCalculateSize (
00159                 CDC* pDC,
00160                 const CSize& sizeDefault,
00161                 BOOL bHorz)
00162 {
00163   ASSERT_VALID (pDC);
00164
00165   CMSMVisualManager* pManager = DYNAMIC_DOWNCAST (CMSMVisualManager,
00166     CMFCVisualManager::GetInstance ());
00167
00168   if (pManager == NULL)
00169   {
00170     return CMFCToolBarButton::OnCalculateSize (pDC, sizeDefault, bHorz);
00171   }
00172
00173   if(!IsVisible())
00174   {
00175     return CSize(0,0);
00176   }
00177
00178   CSize size = sizeDefault;
00179
00180   if ((m_nStyle & TBBS_SEPARATOR) == 0)
00181   {
00182     if (!IsDrawImage () || GetImage () < 0)
00183     {
00184       CSize sizeExtra = m_bExtraSize ?
00185         CMFCVisualManager::GetInstance ()->GetButtonExtraBorder () : CSize (0, 0);
00186
00187       if (bHorz)
00188       {
00189         size.cx = sizeExtra.cx;
00190       }
00191       else
00192       {
00193         size.cy = sizeExtra.cy;
00194       }
00195     }
00196
00197     m_sizeText = CSize (0, 0);
00198
00199     if (!m_strText.IsEmpty () && IsDrawText ())
00200     {
00201       CFont* pOldFont = (CFont*)(pDC->SelectObject (&afxGlobalData.fontBold));
00202
00203       CRect rectText (0, 0,
00204         sizeDefault.cx * 3, sizeDefault.cy);
00205
00206       UINT uiTextFormat = DT_CENTER | DT_CALCRECT;
00207       if (m_bWrapText)
00208       {
00209         uiTextFormat |= DT_WORDBREAK;
00210       }
00211
00212       pDC->DrawText ( m_strText, rectText, uiTextFormat);
00213       m_sizeText = rectText.Size ();
00214       m_sizeText.cx += 2 * nTextMargin;
00215
00216       size.cx = max (size.cx, m_sizeText.cx);
00217       size.cy = m_sizeText.cy + 4 * nTextMargin;
00218
00219       pDC->SelectObject (pOldFont);
00220     }
00221   }
00222
00223   return size;
00224 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAmbientPropertiesDlg Member List

This is the complete list of members for CAmbientPropertiesDlg, including all inherited members.
CAmbientPropertiesDlg(CWnd *pParent, CTestContainer98Doc *pDoc) | CAmbientPropertiesDlg |
DisplayPropValues(int iType) | CAmbientPropertiesDlg | [protected]
DoDataExchange(CDataExchange *pDX) | CAmbientPropertiesDlg | [protected, virtual]
GetChangedPropertyID(DISPID *pdispid) const | CAmbientPropertiesDlg |
IDD enum value | CAmbientPropertiesDlg |
m_butChooseColor | CAmbientPropertiesDlg |
m_butChooseFont | CAmbientPropertiesDlg |
m_butSetValue | CAmbientPropertiesDlg |
m_cboxPropName | CAmbientPropertiesDlg |
m_cboxPropType | CAmbientPropertiesDlg |
m_cboxPropValue | CAmbientPropertiesDlg |
m_checkEnabled | CAmbientPropertiesDlg |
m_date | CAmbientPropertiesDlg |
m_dispidChanged | CAmbientPropertiesDlg | [protected]
m_editDISPID | CAmbientPropertiesDlg |
m_editPropValue | CAmbientPropertiesDlg |
m_pDoc | CAmbientPropertiesDlg | [protected]
m_pProp | CAmbientPropertiesDlg | [protected]
m_staticPropertyValue | CAmbientPropertiesDlg |
m_tChanged | CAmbientPropertiesDlg | [protected]
OnChooseColor() | CAmbientPropertiesDlg | [protected]
OnChooseFont() | CAmbientPropertiesDlg | [protected]
OnContextMenu(CWnd *, CPoint) | CAmbientPropertiesDlg | [protected]
OnEnabled() | CAmbientPropertiesDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CAmbientPropertiesDlg | [protected]
OnInitDialog() | CAmbientPropertiesDlg | [protected, virtual]
OnNewProperty() | CAmbientPropertiesDlg | [protected]
OnPropertyChanged(DISPID id) | CAmbientPropertiesDlg | [protected]
OnPropNameSelChange() | CAmbientPropertiesDlg | [protected]
OnPropTypeSelChange() | CAmbientPropertiesDlg | [protected]
OnPropValueSetFocus() | CAmbientPropertiesDlg | [protected]
OnSetValue() | CAmbientPropertiesDlg | [protected]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COutputBar Member List

This is the complete list of members for COutputBar, including all inherited members.
AddTab(LPCTSTR lpszName, UINT nID) | COutputBar |
AdjusrHorzScroll(CListBox &wndListBox) | COutputBar | [protected]
ClearTabs() | COutputBar |
COutputBar() | COutputBar |
COutputBar() | COutputBar |
COutputBar() | COutputBar |
COutputBar() | COutputBar |
FillBuildWindow() | COutputBar | [protected]
FillDebugWindow() | COutputBar | [protected]
m_Font | COutputBar | [protected]
m_wndList1 | COutputBar | [protected]
m_wndList2 | COutputBar | [protected]
m_wndList3 | COutputBar | [protected]
m_wndOutputBuild | COutputBar | [protected]
m_wndOutputDebug | COutputBar | [protected]
m_wndOutputFind1 | COutputBar | [protected]
m_wndOutputFind2 | COutputBar | [protected]
m_wndOutputSQL | COutputBar | [protected]
m_wndTabs | COutputBar | [protected]
m_wndToolBar | COutputBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | COutputBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | COutputBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | COutputBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | COutputBar | [protected]
OnDestroy() | COutputBar | [protected]
OnEditCopy() | COutputBar | [protected]
OnFilePrint() | COutputBar | [protected]
OnFileSaveAs() | COutputBar | [protected]
OnSize(UINT nType, int cx, int cy) | COutputBar | [protected]
OnSize(UINT nType, int cx, int cy) | COutputBar | [protected]
OnSize(UINT nType, int cx, int cy) | COutputBar | [protected]
OnSize(UINT nType, int cx, int cy) | COutputBar | [protected]
SetFlatTabs(BOOL bFlat=TRUE, BOOL bRepaint=TRUE) | COutputBar | [inline]
~COutputBar() | COutputBar | [virtual]
~COutputBar() | COutputBar | [virtual]
~COutputBar() | COutputBar | [virtual]
~COutputBar() | COutputBar | [virtual]
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/LinksBar.cpp Source File

  • vc2008fp
  • IEDemo

LinksBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "IEDemo.h"
00013 #include "LinksBar.h"
00014 #include "LinkButton.h"
00015 #include "IEDemoDoc.h"
00016 #include "IEDemoView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 IMPLEMENT_SERIAL(CLinksBar, CMFCToolBar, 1)
00025
00026 /////////////////////////////////////////////////////////////////////////////
00027 // CLinksBar
00028
00029 CLinksBar::CLinksBar()
00030 {
00031 }
00032
00033 CLinksBar::~CLinksBar()
00034 {
00035 }
00036
00037
00038 BEGIN_MESSAGE_MAP(CLinksBar, CMFCToolBar)
00039   //{{AFX_MSG_MAP(CLinksBar)
00040   ON_WM_CREATE()
00041   //}}AFX_MSG_MAP
00042 END_MESSAGE_MAP()
00043
00044
00045 /////////////////////////////////////////////////////////////////////////////
00046 // CLinksBar message handlers
00047
00048 int CLinksBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00049 {
00050   if (CMFCToolBar::OnCreate(lpCreateStruct) == -1)
00051     return -1;
00052
00053   RestoreOriginalstate ();
00054   return 0;
00055 }
00056
00057 BOOL CLinksBar::OnSendCommand (const CMFCToolBarButton* pButton)
00058 {
00059   CLinkButton* pLinkButton = DYNAMIC_DOWNCAST (CLinkButton, pButton);
00060   if (pLinkButton == NULL)
00061   {
00062     // Defauult processing
00063     return FALSE;
00064   }
00065
00066   CString strURL = pLinkButton->GetURL ();
00067
00068   ((CIEDemoView*)GetParentFrame ()->GetActiveView())->Navigate2 (strURL, 0, NULL);
00069   return TRUE;
00070 }
00071
00072 BOOL CLinksBar::RestoreOriginalstate ()
00073 {
00074   RemoveAllButtons ();
00075
00076   InsertButton (CLinkButton (_T("MSDN Home"), _T("http://www.msdn.com")));
00077   InsertButton (CLinkButton (_T("Microsoft Home"), _T("http://www.microsoft.com")));
00078   InsertButton (CLinkButton (_T("Visual C++ Developer Center"), _T("http://msdn2.microsoft.com/visualc/")));
00079
00080   EnableCustomizeButton (TRUE, -1, _T(""));
00081
00082   AdjustLayout ();
00083   Invalidate ();
00084
00085   return TRUE;
00086 }
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/key.cpp Source File

  • ole
  • wordpad

key.cpp

Go to the documentation of this file.
00001 // key.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "key.h"
00014 #include <winreg.h>
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CKey
00023
00024 void CKey::Close()
00025 {
00026   if (m_hKey != NULL)
00027   {
00028     LONG lRes = RegCloseKey(m_hKey);
00029     ASSERT(lRes == ERROR_SUCCESS);
00030     m_hKey = NULL;
00031   }
00032 }
00033
00034 BOOL CKey::Create(HKEY hKey, LPCTSTR lpszKeyName)
00035 {
00036   ASSERT(hKey != NULL);
00037   return (RegCreateKey(hKey, lpszKeyName, &m_hKey) == ERROR_SUCCESS);
00038 }
00039
00040 BOOL CKey::Open(HKEY hKey, LPCTSTR lpszKeyName)
00041 {
00042   ASSERT(hKey != NULL);
00043   return (RegOpenKey(hKey, lpszKeyName, &m_hKey) == ERROR_SUCCESS);
00044 }
00045
00046 BOOL CKey::SetStringValue(LPCTSTR lpszValue, LPCTSTR lpszValueName)
00047 {
00048   ASSERT(m_hKey != NULL);
00049   return (RegSetValueEx(m_hKey, lpszValueName, NULL, REG_SZ,
00050     (BYTE * const)lpszValue, (lstrlen(lpszValue)+1)*sizeof(TCHAR)) == ERROR_SUCCESS);
00051 }
00052
00053 BOOL CKey::GetStringValue(CString& str, LPCTSTR lpszValueName)
00054 {
00055   ASSERT(m_hKey != NULL);
00056   str.Empty();
00057   DWORD dw = 0;
00058   DWORD dwType = 0;
00059   LONG lRes = RegQueryValueEx(m_hKey, (LPTSTR)lpszValueName, NULL, &dwType,
00060     NULL, &dw);
00061   if (lRes == ERROR_SUCCESS)
00062   {
00063     ASSERT(dwType == REG_SZ);
00064     LPTSTR lpsz = str.GetBufferSetLength(dw);
00065     lRes = RegQueryValueEx(m_hKey, (LPTSTR)lpszValueName, NULL, &dwType, (BYTE*)lpsz, &dw);
00066     ASSERT(lRes == ERROR_SUCCESS);
00067     str.ReleaseBuffer();
00068     return TRUE;
00069   }
00070   return FALSE;
00071 }
Generated on Sat Nov 23 2024 17:00:30 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COle2ViewApp Member List

This is the complete list of members for COle2ViewApp, including all inherited members.
COle2ViewApp() | COle2ViewApp |
ExitInstance() | COle2ViewApp | [virtual]
FreeBitmaps() | COle2ViewApp |
InitInstance() | COle2ViewApp | [virtual]
LoadBitmaps(BOOL fFree) | COle2ViewApp |
m_cyFont | COle2ViewApp |
m_images | COle2ViewApp |
m_pFont | COle2ViewApp |
m_pFontBold | COle2ViewApp |
m_szStatusText | COle2ViewApp |
OnAppAbout() | COle2ViewApp |
Generated on Sat Nov 23 2024 17:01:03 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/mainfrm.cpp Source File

  • ole
  • superpad

mainfrm.cpp

Go to the documentation of this file.
00001 // mainfrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #include "stdafx.h"
00014 #include "superpad.h"
00015 #include "mainfrm.h"
00016
00017
00018 IMPLEMENT_DYNCREATE(CMainFrame, CMDIFrameWnd)
00019 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00020   //{{AFX_MSG_MAP(CMainFrame)
00021   ON_WM_CREATE()
00022   ON_WM_CLOSE()
00023   //}}AFX_MSG_MAP
00024 END_MESSAGE_MAP()
00025
00026 static UINT BASED_CODE buttons[] =
00027 {
00028   // same order as in the bitmap 'toolbar.bmp'
00029   ID_FILE_NEW, ID_FILE_OPEN, ID_FILE_SAVE, 0,
00030   ID_EDIT_CUT, ID_EDIT_COPY, ID_EDIT_PASTE, 0,
00031   ID_FILE_PRINT, ID_APP_ABOUT,
00032 };
00033
00034 static UINT BASED_CODE indicators[] =
00035 {
00036   0, ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL,
00037 };
00038
00039 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00040 {
00041   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00042     return -1;
00043   if (!m_wndToolBar.Create(this) ||
00044     !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
00045     !m_wndToolBar.SetButtons(buttons, sizeof(buttons)/sizeof(UINT)))
00046   {
00047     return -1;      // fail to create
00048   }
00049   if (!m_wndStatusBar.Create(this) ||
00050     !m_wndStatusBar.SetIndicators(indicators,
00051     sizeof(indicators)/sizeof(UINT)))
00052   {
00053     return -1;      // fail to create
00054   }
00055   return 0;
00056 }
00057
00058 /////////////////////////////////////////////////////////////////////////////
00059 // Helpers for saving/restoring window state
00060
00061 static TCHAR BASED_CODE szSection[] = _T("Settings");
00062 static TCHAR BASED_CODE szWindowPos[] = _T("WindowPos");
00063 static TCHAR szFormat[] = _T("%u,%u,%d,%d,%d,%d,%d,%d,%d,%d");
00064
00065 static BOOL PASCAL NEAR ReadWindowPlacement(LPWINDOWPLACEMENT pwp)
00066 {
00067   CString strBuffer = AfxGetApp()->GetProfileString(szSection, szWindowPos);
00068   if (strBuffer.IsEmpty())
00069     return FALSE;
00070
00071   WINDOWPLACEMENT wp;
00072   int nRead = _stscanf_s(strBuffer, szFormat,
00073     &wp.flags, &wp.showCmd,
00074     &wp.ptMinPosition.x, &wp.ptMinPosition.y,
00075     &wp.ptMaxPosition.x, &wp.ptMaxPosition.y,
00076     &wp.rcNormalPosition.left, &wp.rcNormalPosition.top,
00077     &wp.rcNormalPosition.right, &wp.rcNormalPosition.bottom);
00078
00079   if (nRead != 10)
00080     return FALSE;
00081
00082   wp.length = sizeof wp;
00083   *pwp = wp;
00084   return TRUE;
00085 }
00086
00087 static void PASCAL NEAR WriteWindowPlacement(LPWINDOWPLACEMENT pwp)
00088   // write a window placement to settings section of app's ini file
00089 {
00090   TCHAR szBuffer[sizeof("-32767")*8 + sizeof("65535")*2];
00091
00092   _stprintf_s(szBuffer, sizeof("-32767")*8 + sizeof("65535")*2, szFormat,
00093     pwp->flags, pwp->showCmd,
00094     pwp->ptMinPosition.x, pwp->ptMinPosition.y,
00095     pwp->ptMaxPosition.x, pwp->ptMaxPosition.y,
00096     pwp->rcNormalPosition.left, pwp->rcNormalPosition.top,
00097     pwp->rcNormalPosition.right, pwp->rcNormalPosition.bottom);
00098   AfxGetApp()->WriteProfileString(szSection, szWindowPos, szBuffer);
00099 }
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102
00103 void CMainFrame::InitialShowWindow(UINT nCmdShow)
00104 {
00105   WINDOWPLACEMENT wp;
00106   if (!ReadWindowPlacement(&wp))
00107   {
00108     ShowWindow(nCmdShow);
00109     return;
00110   }
00111   if (nCmdShow != SW_SHOWNORMAL)
00112     wp.showCmd = nCmdShow;
00113   SetWindowPlacement(&wp);
00114   ShowWindow(wp.showCmd);
00115 }
00116
00117 void CMainFrame::OnClose()
00118 {
00119   // before it is destroyed, save the position of the window
00120   WINDOWPLACEMENT wp;
00121   wp.length = sizeof wp;
00122   if (GetWindowPlacement(&wp))
00123   {
00124     wp.flags = 0;
00125     if (IsZoomed())
00126       wp.flags |= WPF_RESTORETOMAXIMIZED;
00127     // and write it to the .INI file
00128     WriteWindowPlacement(&wp);
00129   }
00130
00131   CMDIFrameWnd::OnClose();
00132 }
00133
00134 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ConInfDg.Cpp Source File

  • ole
  • TstCon

ConInfDg.Cpp

Go to the documentation of this file.
00001 // CContainerInfoDlg.Cpp : implementation file
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 /////////////////////////////////////////////////////////////////////////////
00021 // CContainerInfoDlg dialog
00022
00023
00024 CContainerInfoDlg::CContainerInfoDlg( CWnd* pParent,
00025    CTestContainer98Doc* pDoc ) :
00026    CDialog( CContainerInfoDlg::IDD, pParent ),
00027    m_pDoc( pDoc )
00028 {
00029    ASSERT( m_pDoc != NULL );
00030
00031   //{{AFX_DATA_INIT(CContainerInfoDlg)
00032     // NOTE: the ClassWizard will add member initialization here
00033   //}}AFX_DATA_INIT
00034 }
00035
00036
00037 void CContainerInfoDlg::DoDataExchange(CDataExchange* pDX)
00038 {
00039   CDialog::DoDataExchange(pDX);
00040   //{{AFX_DATA_MAP(CContainerInfoDlg)
00041   DDX_Control(pDX, IDC_OBJECTS, m_listObjects);
00042   //}}AFX_DATA_MAP
00043 }
00044
00045
00046 BEGIN_MESSAGE_MAP(CContainerInfoDlg, CDialog)
00047   //{{AFX_MSG_MAP(CContainerInfoDlg)
00048   ON_WM_HELPINFO()
00049   ON_WM_CONTEXTMENU()
00050   //}}AFX_MSG_MAP
00051 END_MESSAGE_MAP()
00052
00053 /////////////////////////////////////////////////////////////////////////////
00054 // CContainerInfoDlg message handlers
00055
00056 BOOL CContainerInfoDlg::OnInitDialog()
00057 {
00058    POSITION posItem;
00059    CTestContainer98Item* pItem;
00060    int iItem;
00061    CString strItemName;
00062    CString strState;
00063    CString strObject;
00064    CString strWindowStatus;
00065    int nAutoWidth;
00066    int nAutoHeaderWidth;
00067
00068   CDialog::OnInitDialog();
00069
00070    LOAD_STRING_FROM_RESOURCE( strObject, IDS_CONTAINERINFOOBJECTHEADER );
00071    m_listObjects.InsertColumn( 0, strObject, LVCFMT_LEFT, 100 );
00072
00073    LOAD_STRING_FROM_RESOURCE( strState, IDS_CONTAINERINFOSTATEHEADER );
00074    m_listObjects.InsertColumn( 1, strState, LVCFMT_LEFT, 100 );
00075
00076    LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_CONTAINERINFOWINDOWHEADER );
00077    m_listObjects.InsertColumn( 2, strWindowStatus, LVCFMT_LEFT, 100 );
00078
00079    iItem = 0;
00080    posItem = m_pDoc->GetStartPosition();
00081    while( posItem != NULL )
00082    {
00083     pItem = (CTestContainer98Item*)m_pDoc->GetNextItem( posItem );
00084     strItemName = pItem->GetDisplayName();
00085     m_listObjects.InsertItem( iItem, strItemName );
00086     m_listObjects.SetItemText( iItem, 0, strItemName );
00087     switch( pItem->GetItemState() )
00088     {
00089     case COleClientItem::activeState:
00090      LOAD_STRING_FROM_RESOURCE( strState, IDS_ACTIVESTATE );
00091      if( pItem->IsWindowless() )
00092      {
00093       LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWLESS );
00094      }
00095      else
00096      {
00097       LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWED );
00098      }
00099      break;
00100
00101     case COleClientItem::activeUIState:
00102      LOAD_STRING_FROM_RESOURCE( strState, IDS_UIACTIVESTATE );
00103      if( pItem->IsWindowless() )
00104      {
00105       LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWLESS );
00106      }
00107      else
00108      {
00109       LOAD_STRING_FROM_RESOURCE( strWindowStatus, IDS_WINDOWED );
00110      }
00111      break;
00112
00113     case COleClientItem::openState:
00114      LOAD_STRING_FROM_RESOURCE( strState, IDS_OPENSTATE );
00115      strWindowStatus.Empty();
00116      break;
00117
00118     case COleClientItem::loadedState:
00119      LOAD_STRING_FROM_RESOURCE( strState, IDS_LOADEDSTATE );
00120      strWindowStatus.Empty();
00121      break;
00122
00123     case COleClientItem::emptyState:
00124      LOAD_STRING_FROM_RESOURCE( strState, IDS_EMPTYSTATE );
00125      strWindowStatus.Empty();
00126      break;
00127
00128     default:
00129      ASSERT( FALSE );
00130      break;
00131     }
00132     m_listObjects.SetItemText( iItem, 1, strState );
00133     m_listObjects.SetItemText( iItem, 2, strWindowStatus );
00134     iItem++;
00135    }
00136
00137    m_listObjects.SetColumnWidth( 0, LVSCW_AUTOSIZE );
00138    nAutoWidth = m_listObjects.GetColumnWidth( 0 );
00139    m_listObjects.SetColumnWidth( 0, LVSCW_AUTOSIZE_USEHEADER );
00140    nAutoHeaderWidth = m_listObjects.GetColumnWidth( 0 );
00141    m_listObjects.SetColumnWidth( 0, max( nAutoWidth, nAutoHeaderWidth ) );
00142
00143    m_listObjects.SetColumnWidth( 1, LVSCW_AUTOSIZE );
00144    nAutoWidth = m_listObjects.GetColumnWidth( 1 );
00145    m_listObjects.SetColumnWidth( 1, LVSCW_AUTOSIZE_USEHEADER );
00146    nAutoHeaderWidth = m_listObjects.GetColumnWidth( 1 );
00147    m_listObjects.SetColumnWidth( 1, max( nAutoWidth, nAutoHeaderWidth ) );
00148
00149    m_listObjects.SetColumnWidth( 2, LVSCW_AUTOSIZE );
00150    nAutoWidth = m_listObjects.GetColumnWidth( 2 );
00151    m_listObjects.SetColumnWidth( 2, LVSCW_AUTOSIZE_USEHEADER );
00152    nAutoHeaderWidth = m_listObjects.GetColumnWidth( 2 );
00153    m_listObjects.SetColumnWidth( 2, max( nAutoWidth, nAutoHeaderWidth ) );
00154
00155   return( TRUE );
00156 }
00157
00158 static DWORD rgmapCHID[] =
00159 {
00160    IDC_OBJECTS, HIDC_OBJECTS,
00161    0, 0
00162 };
00163
00164 BOOL CContainerInfoDlg::OnHelpInfo( HELPINFO* pHelpInfo )
00165 {
00166   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00167   strPath += _T("::/popups.txt");
00168
00169   return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
00170 }
00171
00172 void CContainerInfoDlg::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
00173 {
00174   CString strPath = AfxGetApp()->m_pszHelpFilePath;
00175   strPath += _T("::/popups.txt");
00176
00177   ::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
00178 }
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/CustomToolTipCtrl.h Source File

  • vc2008fp
  • DlgToolTips

CustomToolTipCtrl.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CCustomToolTipCtrl window
00015
00016 class CCustomToolTipCtrl : public CMFCToolTipCtrl
00017 {
00018 // Construction
00019 public:
00020   CCustomToolTipCtrl();
00021
00022 // Attributes
00023 public:
00024   int m_nCurrID;
00025
00026 // Operations
00027 public:
00028
00029 // Overrides
00030
00031   virtual CSize GetIconSize ()
00032   {
00033     return CSize (32, 32);
00034   }
00035
00036   virtual BOOL OnDrawIcon (CDC* pDC, CRect rectImage);
00037
00038 // Implementation
00039 public:
00040   virtual ~CCustomToolTipCtrl();
00041
00042 protected:
00043   afx_msg void OnShow(NMHDR* pNMHDR, LRESULT* pResult);
00044
00045   DECLARE_MESSAGE_MAP()
00046 };
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCmnCtrl1App Member List

This is the complete list of members for CCmnCtrl1App, including all inherited members.
CCmnCtrl1App() | CCmnCtrl1App |
InitInstance() | CCmnCtrl1App | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/iviewer.h Source File

  • ole
  • oleview
  • iviewers

iviewer.h

Go to the documentation of this file.
00001 // iviewer.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #ifndef __IVIEWER_H__
00014 #define __IVIEWER_H__
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CInterfaceViewer command target
00017
00018 class CInterfaceViewer : public CCmdTarget
00019 {
00020 public:
00021   DECLARE_DYNAMIC(CInterfaceViewer)
00022   CInterfaceViewer();           // protected constructor used by dynamic creation
00023   virtual ~CInterfaceViewer();
00024
00025 // Attributes
00026 public:
00027
00028 // Operations
00029 public:
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CInterfaceViewer)
00034   //}}AFX_VIRTUAL
00035   virtual HRESULT OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk);
00036
00037 // Implementation
00038 protected:
00039
00040   // Generated message map functions
00041   //{{AFX_MSG(CInterfaceViewer)
00042     // NOTE - the ClassWizard will add and remove member functions here.
00043   //}}AFX_MSG
00044
00045   // Implemented interfaces
00046   //
00047 public:
00048   DECLARE_MESSAGE_MAP()
00049
00050   // IInterfaceViewer
00051   BEGIN_INTERFACE_PART(InterfaceViewer, IInterfaceViewer)
00052     STDMETHOD(View)(HWND hwndParent, REFIID riid, LPUNKNOWN punk);
00053   END_INTERFACE_PART(InterfaceViewer)
00054   DECLARE_INTERFACE_MAP()
00055
00056 };
00057
00058 #endif // __IVIEWER_H__
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolbarDateTimePicker/ToolbarDateTimePickerDoc.cpp Source File

  • vc2008fp
  • ToolbarDateTimePicker

ToolbarDateTimePickerDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "ToolbarDateTimePicker.h"
00013
00014 #include "ToolbarDateTimePickerDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CToolbarDateTimePickerDoc
00024
00025 IMPLEMENT_DYNCREATE(CToolbarDateTimePickerDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CToolbarDateTimePickerDoc, CDocument)
00028   //{{AFX_MSG_MAP(CToolbarDateTimePickerDoc)
00029     // NOTE - the ClassWizard will add and remove mapping macros here.
00030     //    DO NOT EDIT what you see in these blocks of generated code!
00031   //}}AFX_MSG_MAP
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CToolbarDateTimePickerDoc construction/destruction
00036
00037 CToolbarDateTimePickerDoc::CToolbarDateTimePickerDoc()
00038 {
00039   // TODO: add one-time construction code here
00040
00041 }
00042
00043 CToolbarDateTimePickerDoc::~CToolbarDateTimePickerDoc()
00044 {
00045 }
00046
00047 BOOL CToolbarDateTimePickerDoc::OnNewDocument()
00048 {
00049   if (!CDocument::OnNewDocument())
00050     return FALSE;
00051
00052   // TODO: add reinitialization code here
00053   // (SDI documents will reuse this document)
00054
00055   return TRUE;
00056 }
00057
00058
00059
00060 /////////////////////////////////////////////////////////////////////////////
00061 // CToolbarDateTimePickerDoc serialization
00062
00063 void CToolbarDateTimePickerDoc::Serialize(CArchive& ar)
00064 {
00065   if (ar.IsStoring())
00066   {
00067     // TODO: add storing code here
00068   }
00069   else
00070   {
00071     // TODO: add loading code here
00072   }
00073 }
00074
00075 /////////////////////////////////////////////////////////////////////////////
00076 // CToolbarDateTimePickerDoc diagnostics
00077
00078 #ifdef _DEBUG
00079 void CToolbarDateTimePickerDoc::AssertValid() const
00080 {
00081   CDocument::AssertValid();
00082 }
00083
00084 void CToolbarDateTimePickerDoc::Dump(CDumpContext& dc) const
00085 {
00086   CDocument::Dump(dc);
00087 }
00088 #endif //_DEBUG
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // CToolbarDateTimePickerDoc commands
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/resource.h Source File

  • general
  • rowlist

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by RowList.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define IDR_ROWLISTYPE                  129
00008 #define IDB_STATEICONS                  130
00009 #define IDB_SMALLICONS                  26018
00010 #define IDB_LARGEICONS                  26019
00011 #define ID_VIEW_LARGEICONS              32771
00012 #define ID_VIEW_SMALLICONS              32772
00013 #define ID_VIEW_ROWDETAILS              32775
00014 #define ID_VIEW_STATEICONS              32782
00015 #define ID_VIEW_CLIENTWIDTHSEL          32788
00016 #define ID_VIEW_LISTMODE                32789
00017 #define ID_VIEW_DETAILSMODE             32790
00018
00019 // Next default values for new objects
00020 //
00021 #ifdef APSTUDIO_INVOKED
00022 #ifndef APSTUDIO_READONLY_SYMBOLS
00023 #define _APS_3D_CONTROLS                     1
00024 #define _APS_NEXT_RESOURCE_VALUE        134
00025 #define _APS_NEXT_COMMAND_VALUE         32791
00026 #define _APS_NEXT_CONTROL_VALUE         1000
00027 #define _APS_NEXT_SYMED_VALUE           101
00028 #endif
00029 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dynamenu/mdichild.cpp Source File

  • general
  • dynamenu

mdichild.cpp

Go to the documentation of this file.
00001 // mdichild.cpp
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 // Purpose: implementation of the CDynaMDIChildWnd class
00013 //
00014 // Functions:
00015 //   Most of this file was generated by AppWizard.  The functions
00016 //   which contain code specific to this sample are:
00017 //
00018 //      CDynaMDIChildWnd::OnMDIActivate()    -- handle activation/deactivation
00019 //      CDynaMDIChildWnd::RefreshColorMenu() -- update Color submenu contents
00020
00021 #include "stdafx.h"
00022 #include "dynamenu.h"
00023 #include "mdichild.h"
00024 #include "dmdoc.h"      // for color menu definitions
00025
00026 #ifdef _DEBUG
00027 #undef THIS_FILE
00028 static char BASED_CODE THIS_FILE[] = __FILE__;
00029 #endif
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CDynaMDIChildWnd
00033
00034 IMPLEMENT_DYNCREATE(CDynaMDIChildWnd, CMDIChildWnd)
00035
00036 CDynaMDIChildWnd::CDynaMDIChildWnd()
00037 {
00038 }
00039
00040 CDynaMDIChildWnd::~CDynaMDIChildWnd()
00041 {
00042 }
00043
00044
00045 BEGIN_MESSAGE_MAP(CDynaMDIChildWnd, CMDIChildWnd)
00046   //{{AFX_MSG_MAP(CDynaMDIChildWnd)
00047   ON_WM_MDIACTIVATE()
00048   //}}AFX_MSG_MAP
00049 END_MESSAGE_MAP()
00050
00051
00052 /////////////////////////////////////////////////////////////////////////////
00053 // CDynaMDIChildWnd message handlers
00054
00055
00056 //***********************************************************************
00057 // Function: CDynaMDIChildWnd::OnMDIActivate()
00058 //
00059 // Purpose:
00060 //    OnMDIActivate is called for the MDI child window being
00061 //    deactivated and the child window being activated.
00062 //
00063 //    We override this function so that we can update the Color submenu
00064 //    when a child window is activated.  A call to RefreshColorMenu()
00065 //    performs the actual update.
00066 //
00067 // Parameters:
00068 //    bActivate      -- TRUE if child window being activated, otherwise
00069 //                      FALSE
00070 //    pActivateWnd   -- pointer to MDI child window being activated
00071 //    pDeactivateWnd -- pointer to MDI child window being deactivated
00072 //
00073 // Returns:
00074 //    none
00075 //
00076 // Comments:
00077 //    see the CWnd::OnMDIActivate() docs for further information.
00078 //
00079 //***********************************************************************
00080 void CDynaMDIChildWnd::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd)
00081 {
00082   // call the base class to let standard processing switch to
00083   // the top-level menu associated with this window
00084   CMDIChildWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd);
00085
00086   // do our modifications, if we are being activated
00087   if (bActivate)
00088     RefreshColorMenu();
00089 }
00090
00091 //***********************************************************************
00092 // Function: CDynaMDIChildWnd::RefreshColorMenu()
00093 //
00094 // Purpose:
00095 //    RefreshColorMenu updates the Color submenu so that it only
00096 //    contains the text colors which are enabled for the active document.
00097 //
00098 //    The Color submenu is located by searching for a submenu with
00099 //    ID_COLOR_OPTIONS as its first menu item.
00100 //
00101 // Parameters:
00102 //    none
00103 //
00104 // Returns:
00105 //    none
00106 //
00107 // Comments:
00108 //    none
00109 //
00110 //***********************************************************************
00111 void CDynaMDIChildWnd::RefreshColorMenu()
00112 {
00113   // Get the active document
00114   CDynaMenuDoc* pDoc = (CDynaMenuDoc*)GetActiveDocument();
00115   ASSERT_KINDOF(CDynaMenuDoc, pDoc);
00116
00117   // Locate the color submenu
00118   CMenu* pColorMenu = NULL;
00119   CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00120   int iPos;
00121   for (iPos = pTopMenu->GetMenuItemCount()-1; iPos >= 0; iPos--)
00122   {
00123     CMenu* pMenu = pTopMenu->GetSubMenu(iPos);
00124     if (pMenu && pMenu->GetMenuItemID(0) == ID_COLOR_OPTIONS)
00125     {
00126       pColorMenu = pMenu;
00127       break;
00128     }
00129   }
00130   ENSURE(pColorMenu != NULL);
00131
00132   // Update the color submenu to reflect the text colors available to
00133   // the active document
00134
00135   // First, delete all items but ID_COLOR_OPTIONS at position 0
00136   for (iPos = pColorMenu->GetMenuItemCount()-1; iPos > 0; iPos--)
00137     pColorMenu->DeleteMenu(iPos, MF_BYPOSITION);
00138
00139   // Then, add a separator and an item for each available text color
00140   BOOL bNeedSeparator = TRUE;
00141   for (int i = 0; i < NUM_TEXTCOLOR; i++)
00142   {
00143     if (pDoc->m_abAllowColor[i] == TRUE)
00144     {
00145       if (bNeedSeparator)
00146       {
00147         pColorMenu->AppendMenu(MF_SEPARATOR);
00148         bNeedSeparator = FALSE;
00149       }
00150       CString strColor;
00151       strColor.LoadString(pDoc->m_aColorDef[i].m_nString);
00152       pColorMenu->AppendMenu(MF_STRING,
00153         pDoc->m_aColorDef[i].m_nID, strColor);
00154     }
00155   }
00156 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/snapvw.h Source File

  • general
  • snapvw

snapvw.h

Go to the documentation of this file.
00001 // SnapVw.h : main header file for the SNAP application
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // CSnapApp:
00020 // See Snap.cpp for the implementation of this class
00021 //
00022
00023 class CSnapApp : public CWinApp
00024 {
00025 public:
00026   CSnapApp();
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CSnapApp)
00031   public:
00032   virtual BOOL InitInstance();
00033   //}}AFX_VIRTUAL
00034
00035 // Implementation
00036
00037   //{{AFX_MSG(CSnapApp)
00038   afx_msg void OnAppAbout();
00039     // NOTE - the ClassWizard will add and remove member functions here.
00040     //    DO NOT EDIT what you see in these blocks of generated code !
00041   //}}AFX_MSG
00042   DECLARE_MESSAGE_MAP()
00043 };
00044
00045
00046 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CListHdrDlg Member List

This is the complete list of members for CListHdrDlg, including all inherited members.
ChangeListCtrlStyle(DWORD dwStyle, BOOL bSetBits) | CListHdrDlg | [protected]
CListHdrDlg(CWnd *pParent=NULL) | CListHdrDlg |
DoDataExchange(CDataExchange *pDX) | CListHdrDlg | [protected, virtual]
FillListCtrl() | CListHdrDlg | [protected]
IDD enum value | CListHdrDlg |
m_bAutoArrange | CListHdrDlg |
m_bEditLabels | CListHdrDlg |
m_bHotCursor | CListHdrDlg | [protected]
m_bHoverSelect | CListHdrDlg |
m_bNoColHdr | CListHdrDlg |
m_bNoLabelWrap | CListHdrDlg |
m_bNoSortHdr | CListHdrDlg |
m_bSingleSel | CListHdrDlg |
m_bWorkAreas | CListHdrDlg |
m_hIcon | CListHdrDlg | [protected]
m_hMyHotCursor | CListHdrDlg | [protected]
m_hStdHotCursor | CListHdrDlg | [protected]
m_listctrl | CListHdrDlg |
m_pImageHdrSmall | CListHdrDlg | [protected]
m_pImageList | CListHdrDlg | [protected]
m_pImageListSmall | CListHdrDlg | [protected]
m_strAlignMode | CListHdrDlg |
m_strSortMode | CListHdrDlg |
m_strViewMode | CListHdrDlg |
ModifyHeaderItems() | CListHdrDlg | [protected]
OnAbout() | CListHdrDlg | [protected]
OnAutoArrange() | CListHdrDlg | [protected]
OnChangeAlign() | CListHdrDlg | [protected]
OnChangeSort() | CListHdrDlg | [protected]
OnChangeView() | CListHdrDlg | [protected]
OnEditLabels() | CListHdrDlg | [protected]
OnHover() | CListHdrDlg | [protected]
OnInitDialog() | CListHdrDlg | [protected, virtual]
OnMyHotCur() | CListHdrDlg | [protected]
OnNoColHdr() | CListHdrDlg | [protected]
OnNoLabelWrap() | CListHdrDlg | [protected]
OnNoSortHdr() | CListHdrDlg | [protected]
OnPaint() | CListHdrDlg | [protected]
OnQueryDragIcon() | CListHdrDlg | [protected]
OnSingleSel() | CListHdrDlg | [protected]
OnStdHotCur() | CListHdrDlg | [protected]
OnWorkAreas() | CListHdrDlg | [protected]
RenewListCtrl(DWORD dwStyle, BOOL bSetBits) | CListHdrDlg | [protected]
~CListHdrDlg() | CListHdrDlg |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemo.cpp Source File

  • vc2008fp
  • ToolTipDemo

TooltipDemo.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "TooltipDemo.h"
00013
00014 #include "MainFrm.h"
00015 #include "TooltipDemoDoc.h"
00016 #include "TooltipDemoView.h"
00017
00018 #ifdef _DEBUG
00019 #define new DEBUG_NEW
00020 #undef THIS_FILE
00021 static char THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CAboutDlg dialog used for App About
00026
00027 class CAboutDlg : public CDialog
00028 {
00029 public:
00030   CAboutDlg();
00031
00032 // Dialog Data
00033   //{{AFX_DATA(CAboutDlg)
00034   enum { IDD = IDD_ABOUTBOX };
00035   //}}AFX_DATA
00036
00037   // ClassWizard generated virtual function overrides
00038   //{{AFX_VIRTUAL(CAboutDlg)
00039   protected:
00040   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00041   //}}AFX_VIRTUAL
00042
00043 // Implementation
00044 protected:
00045   //{{AFX_MSG(CAboutDlg)
00046     // No message handlers
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00052 {
00053   //{{AFX_DATA_INIT(CAboutDlg)
00054   //}}AFX_DATA_INIT
00055 }
00056
00057 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00058 {
00059   CDialog::DoDataExchange(pDX);
00060   //{{AFX_DATA_MAP(CAboutDlg)
00061   //}}AFX_DATA_MAP
00062 }
00063
00064 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00065   //{{AFX_MSG_MAP(CAboutDlg)
00066     // No message handlers
00067   //}}AFX_MSG_MAP
00068 END_MESSAGE_MAP()
00069
00070 /////////////////////////////////////////////////////////////////////////////
00071 // CTooltipDemoApp
00072
00073 BEGIN_MESSAGE_MAP(CTooltipDemoApp, CWinAppEx)
00074   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00075   // Standard file based document commands
00076   ON_COMMAND(ID_FILE_NEW, CWinAppEx::OnFileNew)
00077   ON_COMMAND(ID_FILE_OPEN, CWinAppEx::OnFileOpen)
00078   // Standard print setup command
00079   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinAppEx::OnFilePrintSetup)
00080 END_MESSAGE_MAP()
00081
00082 /////////////////////////////////////////////////////////////////////////////
00083 // CTooltipDemoApp construction
00084
00085 CTooltipDemoApp::CTooltipDemoApp()
00086 {
00087   m_bTTInPopupMenus = TRUE;
00088 }
00089
00090 /////////////////////////////////////////////////////////////////////////////
00091 // The one and only CTooltipDemoApp object
00092
00093 CTooltipDemoApp theApp;
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CTooltipDemoApp initialization
00097
00098 BOOL CTooltipDemoApp::InitInstance()
00099 {
00100   // Initialize OLE libraries
00101   if (!AfxOleInit())
00102   {
00103     AfxMessageBox(IDP_OLE_INIT_FAILED);
00104     return FALSE;
00105   }
00106
00107   AfxEnableControlContainer();
00108
00109   // Standard initialization
00110   // If you are not using these features and wish to reduce the size
00111   //  of your final executable, you should remove from the following
00112   //  the specific initialization routines you do not need.
00113
00114   // Change the registry key under which our settings are stored.
00115   // TODO: You should modify this string to be something appropriate
00116   // such as the name of your company or organization.
00117   SetRegistryKey(_T("BCGSoft\\BCGControlBarVS\\Samples"));
00118
00119   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00120
00121   SetRegistryBase (_T("Settings"));
00122
00123   // Initialize all Managers for usage. They are automatically constructed
00124   // if not yet present
00125   InitContextMenuManager();
00126   InitKeyboardManager();
00127   InitTooltipManager ();
00128
00129   // Register the application's document templates.  Document templates
00130   //  serve as the connection between documents, frame windows and views.
00131
00132   CSingleDocTemplate* pDocTemplate;
00133   pDocTemplate = new CSingleDocTemplate(
00134     IDR_MAINFRAME,
00135     RUNTIME_CLASS(CTooltipDemoDoc),
00136     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00137     RUNTIME_CLASS(CTooltipDemoView));
00138   AddDocTemplate(pDocTemplate);
00139
00140   // Parse command line for standard shell commands, DDE, file open
00141   CCommandLineInfo cmdInfo;
00142   ParseCommandLine(cmdInfo);
00143
00144   // Dispatch commands specified on the command line
00145   if (!ProcessShellCommand(cmdInfo))
00146     return FALSE;
00147
00148   // The one and only window has been initialized, so show and update it.
00149   m_pMainWnd->ShowWindow(SW_SHOW);
00150   m_pMainWnd->UpdateWindow();
00151
00152   if(afxGlobalData.m_nBitsPerPixel < 16)
00153   {
00154     AfxMessageBox(IDS_WRONG_DISPLAY_SETTINGS);
00155   }
00156
00157   return TRUE;
00158 }
00159
00160 /////////////////////////////////////////////////////////////////////////////
00161 // CTooltipDemoApp message handlers
00162
00163 int CTooltipDemoApp::ExitInstance()
00164 {
00165   return CWinAppEx::ExitInstance();
00166 }
00167
00168 // App command to run the dialog
00169 void CTooltipDemoApp::OnAppAbout()
00170 {
00171   CAboutDlg aboutDlg;
00172   aboutDlg.DoModal();
00173 }
00174
00175 void CTooltipDemoApp::PreLoadState ()
00176 {
00177   GetContextMenuManager()->AddMenu (_T("My menu"), IDR_CONTEXT_MENU);
00178 }
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/cntritem.cpp Source File

  • ole
  • wordpad

cntritem.cpp

Go to the documentation of this file.
00001 // cntritem.cpp : implementation of the CWordPadCntrItem class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "wordpad.h"
00014
00015 #include "wordpdoc.h"
00016 #include "wordpvw.h"
00017 #include "cntritem.h"
00018
00019 #ifdef _DEBUG
00020 #undef THIS_FILE
00021 static char BASED_CODE THIS_FILE[] = __FILE__;
00022 #endif
00023
00024 /////////////////////////////////////////////////////////////////////////////
00025 // CWordPadCntrItem implementation
00026
00027 IMPLEMENT_SERIAL(CWordPadCntrItem, CRichEditCntrItem, 0)
00028
00029 CWordPadCntrItem::CWordPadCntrItem(REOBJECT *preo, CWordPadDoc* pContainer)
00030   : CRichEditCntrItem(preo, pContainer)
00031 {
00032 }
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CWordPadCntrItem diagnostics
00036
00037 #ifdef _DEBUG
00038 void CWordPadCntrItem::AssertValid() const
00039 {
00040   CRichEditCntrItem::AssertValid();
00041 }
00042
00043 void CWordPadCntrItem::Dump(CDumpContext& dc) const
00044 {
00045   CRichEditCntrItem::Dump(dc);
00046 }
00047 #endif
00048
00049 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBMTest1Dlg Member List

This is the complete list of members for CBMTest1Dlg, including all inherited members.
button1 | CBMTest1Dlg | [protected]
button2 | CBMTest1Dlg | [protected]
CBMTest1Dlg() | CBMTest1Dlg |
IDD enum value | CBMTest1Dlg |
OnInitDialog() | CBMTest1Dlg |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CTabOrderDlg Member List

This is the complete list of members for CTabOrderDlg, including all inherited members.
CTabOrderDlg(CWnd *pParent=NULL) | CTabOrderDlg |
DoDataExchange(CDataExchange *pDX) | CTabOrderDlg | [protected, virtual]
IDD enum value | CTabOrderDlg |
m_lboxTabOrder | CTabOrderDlg |
m_lpTabOrder | CTabOrderDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CTabOrderDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CTabOrderDlg | [protected]
OnInitDialog() | CTabOrderDlg | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CProgressBarTaskDialog Member List

This is the complete list of members for CProgressBarTaskDialog, including all inherited members.
CProgressBarTaskDialog() | CProgressBarTaskDialog | [inline]
OnTimer(long) | CProgressBarTaskDialog | [inline, protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/VisualStudioDemo/ClassTreeWnd.h Source File

  • vc2008fp
  • VisualStudioDemo

ClassTreeWnd.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CClassTreeWnd window
00014
00015 class CClassTreeWnd : public CTreeCtrl
00016 {
00017 // Construction
00018 public:
00019   CClassTreeWnd();
00020
00021 // Overrides
00022 protected:
00023   virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
00024
00025 // Implementation
00026 public:
00027   virtual ~CClassTreeWnd();
00028
00029 protected:
00030   DECLARE_MESSAGE_MAP()
00031 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DynaMenuDef Member List

This is the complete list of members for DynaMenuDef, including all inherited members.
m_crf | DynaMenuDef
m_nID | DynaMenuDef
m_nString | DynaMenuDef
Generated on Sat Nov 23 2024 17:01:13 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/circ/circctl.h Source File

  • controls
  • circ

circctl.h

Go to the documentation of this file.
00001 // circctl.h : Declaration of the CCircCtrl OLE control class.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CCircCtrl : See circctl.cpp for implementation.
00014
00015 class CCircCtrl : public COleControl
00016 {
00017   DECLARE_DYNCREATE(CCircCtrl)
00018
00019 // Constructor
00020 public:
00021   CCircCtrl();
00022
00023 // Overrides
00024
00025   // Drawing function
00026   virtual void OnDraw(
00027         CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
00028
00029   // Persistence
00030   virtual void DoPropExchange(CPropExchange* pPX);
00031
00032   // Reset control state
00033   virtual void OnResetState();
00034
00035   virtual BOOL OnMapPropertyToPage(DISPID dispid, LPCLSID lpclsid,
00036     BOOL* pbPageOptional);
00037
00038 // Implementation
00039 protected:
00040   ~CCircCtrl();
00041   void GetDrawRect(CRect* rc);
00042   short m_circleOffset;
00043   BOOL InBounds(short nOffset);
00044   BOOL InCircle(CPoint& point);
00045   void FlashColor(CDC* pdc);
00046   CString m_note;
00047
00048   DECLARE_OLECREATE_EX(CCircCtrl)    // Class factory and guid
00049   DECLARE_OLETYPELIB(CCircCtrl)      // GetTypeInfo
00050   DECLARE_PROPPAGEIDS(CCircCtrl)     // Property page IDs
00051   DECLARE_OLECTLTYPE(CCircCtrl)      // Type name and misc status
00052
00053 // Message maps
00054   //{{AFX_MSG(CCircCtrl)
00055   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00056   afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00057   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00058   afx_msg void OnSize(UINT nType, int cx, int cy);
00059   //}}AFX_MSG
00060   DECLARE_MESSAGE_MAP()
00061
00062 // Dispatch maps
00063   //{{AFX_DISPATCH(CCircCtrl)
00064   BOOL m_circleShape;
00065   afx_msg void OnCircleShapeChanged();
00066   OLE_COLOR m_flashColor;
00067   afx_msg void OnFlashColorChanged();
00068   afx_msg short GetCircleOffset();
00069   afx_msg void SetCircleOffset(short nNewValue);
00070   afx_msg BSTR GetNote();
00071   afx_msg void SetNote(LPCTSTR lpszNewValue);
00072   //}}AFX_DISPATCH
00073   DECLARE_DISPATCH_MAP()
00074
00075   afx_msg void AboutBox();
00076
00077 // Event maps
00078   //{{AFX_EVENT(CCircCtrl)
00079   void FireClickIn(OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
00080     {FireEvent(eventidClickIn,EVENT_PARAM(VTS_XPOS_PIXELS  VTS_YPOS_PIXELS), x, y);}
00081   void FireClickOut()
00082     {FireEvent(eventidClickOut,EVENT_PARAM(VTS_NONE));}
00083   //}}AFX_EVENT
00084   DECLARE_EVENT_MAP()
00085
00086 // Dispatch and event IDs
00087 public:
00088   enum {
00089   //{{AFX_DISP_ID(CCircCtrl)
00090   dispidCircleShape = 1L,
00091   dispidCircleOffset = 3L,
00092   dispidNote = 4L,
00093   dispidFlashColor = 2L,
00094   eventidClickIn = 1L,
00095   eventidClickOut = 2L,
00096   //}}AFX_DISP_ID
00097   };
00098 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/PreviewPane.h Source File

  • vc2008fp
  • OutlookDemo

PreviewPane.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CPreviewPane view
00014
00015 class CPreviewPane : public CView
00016 {
00017 protected:
00018   CPreviewPane();           // protected constructor used by dynamic creation
00019   DECLARE_DYNCREATE(CPreviewPane)
00020
00021 // Overrides
00022 protected:
00023   virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00024
00025 // Implementation
00026 protected:
00027   virtual ~CPreviewPane();
00028 #ifdef _DEBUG
00029   virtual void AssertValid() const;
00030   virtual void Dump(CDumpContext& dc) const;
00031 #endif
00032
00033 protected:
00034   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00035
00036   DECLARE_MESSAGE_MAP()
00037 };
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CColorMenu Member List

This is the complete list of members for CColorMenu, including all inherited members.
AppendColorMenuItem(UINT nID, COLORREF color) | CColorMenu |
CColorMenu() | CColorMenu |
CColorMenu() | CColorMenu |
DrawItem(LPDRAWITEMSTRUCT lpDIS) | CColorMenu | [virtual]
DrawItem(LPDRAWITEMSTRUCT lpDIS) | CColorMenu | [virtual]
GetColor(UINT id) | CColorMenu | [static]
indexMap | CColorMenu | [static]
MeasureItem(LPMEASUREITEMSTRUCT lpMIS) | CColorMenu | [virtual]
MeasureItem(LPMEASUREITEMSTRUCT lpMIS) | CColorMenu | [virtual]
~CColorMenu() | CColorMenu | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/wordpad.cpp Source File

  • ole
  • wordpad

wordpad.cpp

Go to the documentation of this file.
00001 // wordpad.cpp : Defines the class behaviors for the application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013
00014 #include "wordpad.h"
00015 #include "mainfrm.h"
00016 #include "ipframe.h"
00017 #include "wordpdoc.h"
00018 #include "wordpvw.h"
00019 #include "strings.h"
00020 #include "key.h"
00021 #include "filenewd.h"
00022 #include <locale.h>
00023 #include <winnls.h>
00024 #include <winreg.h>
00025
00026 extern BOOL AFXAPI AfxFullPath(LPTSTR lpszPathOut, LPCTSTR lpszFileIn);
00027 static BOOL RegisterHelper(LPCTSTR* rglpszRegister, LPCTSTR* rglpszSymbols,
00028   BOOL bReplace);
00029
00030 #ifdef _DEBUG
00031 #undef THIS_FILE
00032 static char BASED_CODE THIS_FILE[] = __FILE__;
00033 #endif
00034
00035 CLIPFORMAT cfEmbeddedObject;
00036 CLIPFORMAT cfRTF;
00037 CLIPFORMAT cfRTO;
00038
00039 int CWordPadApp::m_nOpenMsg = RegisterWindowMessage(_T("WordPadOpenMessage"));
00040 int CWordPadApp::m_nPrinterChangedMsg = RegisterWindowMessage(_T("WordPadPrinterChanged"));
00041
00042 const int CWordPadApp::m_nPrimaryNumUnits = 4;
00043 const int CWordPadApp::m_nNumUnits = 7;
00044
00045 CUnit CWordPadApp::m_units[7] =
00046 {
00047 //  TPU,    SmallDiv,   MedDiv, LargeDiv,   MinMove,    szAbbrev,           bSpace
00048 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH1_ABBREV,   FALSE),//inches
00049 CUnit(568,  142,        284,    568,        142,        IDS_CM_ABBREV,      TRUE),//centimeters
00050 CUnit(20,   120,        720,    720,        100,        IDS_POINT_ABBREV,   TRUE),//points
00051 CUnit(240,  240,        1440,   1440,       120,        IDS_PICA_ABBREV,    TRUE),//picas
00052 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH2_ABBREV,   FALSE),//in
00053 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH3_ABBREV,   FALSE),//inch
00054 CUnit(1440, 180,        720,    1440,       90,         IDS_INCH4_ABBREV,   FALSE)//inches
00055 };
00056
00057 static UINT DoRegistry(LPVOID lpv)
00058 {
00059   ENSURE(lpv != NULL);
00060   ((CWordPadApp*)lpv)->UpdateRegistry();
00061   return 0;
00062 }
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CWordPadApp
00066
00067 BEGIN_MESSAGE_MAP(CWordPadApp, CWinApp)
00068   //{{AFX_MSG_MAP(CWordPadApp)
00069   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00070   ON_COMMAND(ID_FILE_NEW, OnFileNew)
00071   ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
00072   //}}AFX_MSG_MAP
00073 END_MESSAGE_MAP()
00074
00075 void CWordPadCommandLineInfo::ParseParam(const char* pszParam,BOOL bFlag,BOOL bLast)
00076 {
00077   if (bFlag)
00078   {
00079     if (lstrcmpA(pszParam, "t") == 0)
00080     {
00081       m_bForceTextMode = TRUE;
00082       return;
00083     }
00084   }
00085   CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
00086 }
00087
00088 /////////////////////////////////////////////////////////////////////////////
00089 // CWordPadApp construction
00090
00091 CWordPadApp::CWordPadApp() : m_optionsText(0), m_optionsRTF(1),
00092   m_optionsWord(2), m_optionsWrite(2), m_optionsIP(2), m_optionsNull(0)  //
00093 {
00094   _tsetlocale(LC_ALL, _T(""));
00095
00096   m_nFilterIndex = 1;
00097   DWORD dwVersion = ::GetVersion();
00098   m_bWin4 = (BYTE)dwVersion >= 4;
00099 #ifndef _UNICODE
00100   m_bWin31 = (dwVersion > 0x80000000 && !m_bWin4);
00101 #endif
00102   m_nDefFont = (m_bWin4) ? DEFAULT_GUI_FONT : ANSI_VAR_FONT;
00103   m_dcScreen.Attach(::GetDC(NULL));
00104   m_bLargeIcons = m_dcScreen.GetDeviceCaps(LOGPIXELSX) >= 120;
00105   m_bForceOEM = FALSE;
00106 }
00107
00108 CWordPadApp::~CWordPadApp()
00109 {
00110   if (m_dcScreen.m_hDC != NULL)
00111     ::ReleaseDC(NULL, m_dcScreen.Detach());
00112 }
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // The one and only CWordPadApp object
00116
00117 CWordPadApp theApp;
00118
00119 // Register the application's document templates.  Document templates
00120 //  serve as the connection between documents, frame windows and views.
00121 static CSingleDocTemplate DocTemplate(
00122     IDR_MAINFRAME,
00123     RUNTIME_CLASS(CWordPadDoc),
00124     RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00125     RUNTIME_CLASS(CWordPadView));
00126
00127 // This identifier was generated to be statistically unique for your app.
00128 // You may change it if you prefer to choose a specific identifier.
00129 static const CLSID BASED_CODE clsid =
00130 { 0x73FDDC80L, 0xAEA9, 0x101A, { 0x98, 0xA7, 0x00, 0xAA, 0x00, 0x37, 0x49, 0x59} };
00131
00132 /////////////////////////////////////////////////////////////////////////////
00133 // CWordPadApp initialization
00134
00135 BOOL CWordPadApp::InitInstance()
00136 {
00137   ParseCommandLine(cmdInfo);
00138
00139   if (::FindWindow(szWordPadClass, NULL) && IsDocOpen(cmdInfo.m_strFileName))
00140     return FALSE;
00141
00142   SetRegistryKey(szRegKey);
00143   LoadOptions();
00144
00145   CSplashWnd splash;
00146   BOOL bSplash = cmdInfo.m_bShowSplash;
00147   if (!cmdInfo.m_bRunEmbedded)
00148   {
00149     switch (m_nCmdShow)
00150     {
00151       case SW_HIDE:
00152       case SW_SHOWMINIMIZED:
00153       case SW_MINIMIZE:
00154       case SW_SHOWMINNOACTIVE:
00155         bSplash = FALSE;
00156         break;
00157       case SW_RESTORE:
00158       case SW_SHOW:
00159       case SW_SHOWDEFAULT:
00160       case SW_SHOWNA:
00161       case SW_SHOWNOACTIVATE:
00162       case SW_SHOWNORMAL:
00163       case SW_SHOWMAXIMIZED:
00164         if (m_bMaximized)
00165           m_nCmdShow = SW_SHOWMAXIMIZED;
00166         break;
00167     }
00168   }
00169   else
00170   {
00171     //Excel 4 will start OLE servers minimized
00172     m_nCmdShow = SW_SHOWNORMAL;
00173   }
00174   int nCmdShow = m_nCmdShow;
00175
00176   if (bSplash)
00177   {
00178     // only show splash if not embedded
00179     splash.Create();
00180     splash.ShowWindow(SW_SHOW);
00181     splash.UpdateWindow();
00182   }
00183
00184   LoadAbbrevStrings();
00185
00186   m_hDevNames = CreateDevNames();
00187   NotifyPrinterChanged((m_hDevNames == NULL));
00188
00189   free((void*)m_pszHelpFilePath);
00190   m_pszHelpFilePath = _T("WORDPAD.HLP");
00191
00192   // Initialize OLE libraries
00193   if (!AfxOleInit())
00194   {
00195     AfxMessageBox(IDP_OLE_INIT_FAILED);
00196     return FALSE;
00197   }
00198   RegisterFormats();
00199
00200   // Initialize RichEdit control
00201   if (!AfxInitRichEdit())
00202   {
00203     AfxMessageBox(IDS_RICHED_LOAD_FAIL, MB_OK|MB_ICONEXCLAMATION);
00204     return FALSE;
00205   }
00206
00207   // Standard initialization
00208   // If you are not using these features and wish to reduce the size
00209   //  of your final executable, you should remove from the following
00210   //  the specific initialization routines you do not need.
00211
00212   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00213
00214   // Register the application's document templates.  Document templates
00215   //  serve as the connection between documents, frame windows and views.
00216
00217   DocTemplate.SetContainerInfo(IDR_CNTR_INPLACE);
00218   DocTemplate.SetServerInfo(
00219     IDR_SRVR_EMBEDDED, IDR_SRVR_INPLACE,
00220     RUNTIME_CLASS(CInPlaceFrame));
00221
00222   // Connect the COleTemplateServer to the document template.
00223   //  The COleTemplateServer creates new documents on behalf
00224   //  of requesting OLE containers by using information
00225   //  specified in the document template.
00226   m_server.ConnectTemplate(clsid, &DocTemplate, TRUE);
00227     // Note: SDI applications register server objects only if /Embedding
00228     //   or /Automation is present on the command line.
00229
00230   // Check to see if launched as OLE server
00231   if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
00232   {
00233     // Register all OLE server (factories) as running.  This enables the
00234     //  OLE libraries to create objects from other applications.
00235     COleTemplateServer::RegisterAll();
00236     AfxOleSetUserCtrl(FALSE);
00237
00238     // Application was run with /Embedding or /Automation.  Don't show the
00239     //  main window in this case.
00240     return TRUE;
00241   }
00242
00243   // make sure the main window is showing
00244   m_bPromptForType = FALSE;
00245   OnFileNew();
00246   m_bPromptForType = TRUE;
00247   // destroy splash window
00248   if (cmdInfo.m_bShowSplash)
00249     splash.DestroyWindow();
00250   m_nCmdShow = -1;
00251   if (m_pMainWnd == NULL) // i.e. OnFileNew failed
00252     return FALSE;
00253
00254   if (!cmdInfo.m_strFileName.IsEmpty())   // open an existing document
00255     m_nCmdShow = nCmdShow;
00256   // Dispatch commands specified on the command line
00257   if (cmdInfo.m_nShellCommand != CCommandLineInfo::FileNew &&
00258     !ProcessShellCommand(cmdInfo))
00259   {
00260     return FALSE;
00261   }
00262
00263   // Enable File Manager drag/drop open
00264   m_pMainWnd->DragAcceptFiles();
00265
00266   // When a server application is launched stand-alone, it is a good idea
00267   //  to update the system registry in case it has been damaged.
00268   // do registry stuff in separate thread
00269 #ifndef _UNICODE
00270   if (m_bWin31) // no threads on Win32s
00271     UpdateRegistry();
00272   else
00273 #endif
00274     AfxBeginThread(DoRegistry, this, THREAD_PRIORITY_IDLE);
00275
00276   return TRUE;
00277 }
00278
00279 BOOL CWordPadApp::IsDocOpen(LPCTSTR lpszFileName)
00280 {
00281   if (lpszFileName[0] == NULL)
00282     return FALSE;
00283   TCHAR szPath[_MAX_PATH];
00284   AfxFullPath(szPath, lpszFileName);
00285   ATOM atom = GlobalAddAtom(szPath);
00286   ASSERT(atom != NULL);
00287   if (atom == NULL)
00288     return FALSE;
00289   EnumWindows(StaticEnumProc, (LPARAM)&atom);
00290   if (atom == NULL)
00291     return TRUE;
00292   DeleteAtom(atom);
00293   return FALSE;
00294 }
00295
00296 BOOL CALLBACK CWordPadApp::StaticEnumProc(HWND hWnd, LPARAM lParam)
00297 {
00298   TCHAR szClassName[30];
00299   GetClassName(hWnd, szClassName, 30);
00300   if (lstrcmp(szClassName, szWordPadClass) != 0)
00301     return TRUE;
00302
00303   ATOM* pAtom = (ATOM*)lParam;
00304   ENSURE(pAtom != NULL);
00305   DWORD_PTR dw = NULL;
00306   ::SendMessageTimeout(hWnd, m_nOpenMsg, NULL, (LPARAM)*pAtom,
00307     SMTO_ABORTIFHUNG, 500, &dw);
00308   if (dw)
00309   {
00310     ::SetForegroundWindow(hWnd);
00311     DeleteAtom(*pAtom);
00312     *pAtom = NULL;
00313     return FALSE;
00314   }
00315   return TRUE;
00316 }
00317
00318 void CWordPadApp::RegisterFormats()
00319 {
00320   cfEmbeddedObject = (CLIPFORMAT)::RegisterClipboardFormat(_T("Embedded Object"));
00321   cfRTF = (CLIPFORMAT)::RegisterClipboardFormat(CF_RTF);
00322   cfRTO = (CLIPFORMAT)::RegisterClipboardFormat(CF_RETEXTOBJ);
00323 }
00324
00325 CDocOptions& CWordPadApp::GetDocOptions(LONG_PTR nDocType)
00326 {
00327   switch (nDocType)
00328   {
00329     case RD_WINWORD6:
00330     case RD_WORDPAD:
00331       return m_optionsWord;
00332     case RD_RICHTEXT:
00333       return m_optionsRTF;
00334     case RD_TEXT:
00335     case RD_OEMTEXT:
00336       return m_optionsText;
00337     case RD_WRITE:
00338       return m_optionsWrite;
00339     case RD_EMBEDDED:
00340       return m_optionsIP;
00341   }
00342   ASSERT(FALSE);
00343   return m_optionsNull;
00344 }
00345
00346 CDockState& CWordPadApp::GetDockState(LONG_PTR nDocType, BOOL bPrimary)
00347 {
00348   return GetDocOptions(nDocType).GetDockState(bPrimary);
00349 }
00350
00351 void CWordPadApp::SaveOptions()
00352 {
00353   WriteProfileInt(szSection, szWordSel, m_bWordSel);
00354   WriteProfileInt(szSection, szUnits, GetUnits());
00355   WriteProfileInt(szSection, szMaximized, m_bMaximized);
00356   WriteProfileBinary(szSection, szFrameRect, (BYTE*)&m_rectInitialFrame,
00357     sizeof(CRect));
00358   WriteProfileBinary(szSection, szPageMargin, (BYTE*)&m_rectPageMargin,
00359     sizeof(CRect));
00360   m_optionsText.SaveOptions(szTextSection);
00361   m_optionsRTF.SaveOptions(szRTFSection);
00362   m_optionsWord.SaveOptions(szWordSection);
00363   m_optionsWrite.SaveOptions(szWriteSection);
00364   m_optionsIP.SaveOptions(szIPSection);
00365 }
00366
00367 void CWordPadApp::LoadOptions()
00368 {
00369   BYTE* pb = NULL;
00370   UINT nLen = 0;
00371
00372   HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
00373   if (hFont == NULL)
00374     hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
00375   VERIFY(GetObject(hFont, sizeof(LOGFONT), &m_lf));
00376
00377   m_bWordSel = GetProfileInt(szSection, szWordSel, TRUE);
00378   TCHAR buf[2];
00379   buf[0] = NULL;
00380   GetLocaleInfo(GetUserDefaultLCID(), LOCALE_IMEASURE, buf, 2);
00381   int nDefUnits = buf[0] == '1' ? 0 : 1;
00382   SetUnits(GetProfileInt(szSection, szUnits, nDefUnits));
00383   m_bMaximized = GetProfileInt(szSection, szMaximized, (int)FALSE);
00384
00385   if (GetProfileBinary(szSection, szFrameRect, &pb, &nLen))
00386   {
00387     ASSERT(nLen == sizeof(CRect));
00388     memcpy_s(&m_rectInitialFrame, nLen, pb, sizeof(CRect));
00389     delete pb;
00390   }
00391   else
00392     m_rectInitialFrame.SetRect(0,0,0,0);
00393
00394   CRect rectScreen(0, 0, GetSystemMetrics(SM_CXSCREEN),
00395     GetSystemMetrics(SM_CYSCREEN));
00396   CRect rectInt;
00397   rectInt.IntersectRect(&rectScreen, &m_rectInitialFrame);
00398   if (rectInt.Width() < 10 || rectInt.Height() < 10)
00399     m_rectInitialFrame.SetRect(0, 0, 0, 0);
00400
00401   if (GetProfileBinary(szSection, szPageMargin, &pb, &nLen))
00402   {
00403     ASSERT(nLen == sizeof(CRect));
00404     memcpy_s(&m_rectPageMargin, nLen, pb, sizeof(CRect));
00405     delete pb;
00406   }
00407   else
00408     m_rectPageMargin.SetRect(1800, 1440, 1800, 1440);
00409
00410   m_optionsText.LoadOptions(szTextSection);
00411   m_optionsRTF.LoadOptions(szRTFSection);
00412   m_optionsWord.LoadOptions(szWordSection);
00413   m_optionsWrite.LoadOptions(szWriteSection);
00414   m_optionsIP.LoadOptions(szIPSection);
00415 }
00416
00417 void CWordPadApp::LoadAbbrevStrings()
00418 {
00419   for (int i=0;i<m_nNumUnits;i++)
00420     m_units[i].m_strAbbrev.LoadString(m_units[i].m_nAbbrevID);
00421 }
00422
00423 BOOL CWordPadApp::ParseMeasurement(LPTSTR buf, int& lVal)
00424 {
00425   TCHAR* pch;
00426   if (buf[0] == NULL)
00427     return FALSE;
00428   float f = (float)_tcstod(buf,&pch);
00429
00430   // eat white space, if any
00431   while (isspace((int)*pch))
00432     pch++;
00433
00434   if (pch[0] == NULL) // default
00435   {
00436     lVal = (f < 0.f) ? (int)(f*GetTPU()-0.5f) : (int)(f*GetTPU()+0.5f);
00437     return TRUE;
00438   }
00439   for (int i=0;i<m_nNumUnits;i++)
00440   {
00441     if (lstrcmpi(pch, GetAbbrev(i)) == 0)
00442     {
00443       lVal = (f < 0.f) ? (int)(f*GetTPU(i)-0.5f) : (int)(f*GetTPU(i)+0.5f);
00444       return TRUE;
00445     }
00446   }
00447   return FALSE;
00448 }
00449
00450 void CWordPadApp::PrintTwips(TCHAR* buf, int nSize, int nValue, int nDec)
00451 {
00452   ASSERT(nDec == 2);
00453   int div = GetTPU();
00454   int lval = nValue;
00455   BOOL bNeg = FALSE;
00456
00457   int* pVal = new int[nDec+1];
00458
00459   if (lval < 0)
00460   {
00461     bNeg = TRUE;
00462     lval = -lval;
00463   }
00464
00465   int i;
00466   for (i=0;i<=nDec;i++)
00467   {
00468     pVal[i] = lval/div; //integer number
00469     lval -= pVal[i]*div;
00470     lval *= 10;
00471   }
00472   i--;
00473   if (lval >= div/2)
00474     pVal[i]++;
00475
00476   while ((pVal[i] == 10) && (i != 0))
00477   {
00478     pVal[i] = 0;
00479     pVal[--i]++;
00480   }
00481
00482   while (nDec && pVal[nDec] == 0)
00483     nDec--;
00484
00485   _stprintf_s(buf, nSize, _T("%.*f"), nDec, (float)nValue/(float)div);
00486
00487   if (m_units[m_nUnits].m_bSpaceAbbrev)
00488     _tcscat_s(buf, nSize, _T(" "));
00489   _tcscat_s(buf, nSize, GetAbbrev());
00490   delete []pVal;
00491 }
00492
00493 /////////////////////////////////////////////////////////////////////////////
00494 // CWordPadApp commands
00495
00496 void CWordPadApp::OnAppAbout()
00497 {
00498   CString strTitle;
00499   VERIFY(strTitle.LoadString(AFX_IDS_APP_TITLE));
00500   ShellAbout(m_pMainWnd->GetSafeHwnd(), strTitle, _T(""), LoadIcon(IDR_MAINFRAME));
00501 }
00502
00503 int CWordPadApp::ExitInstance()
00504 {
00505   m_pszHelpFilePath = NULL;
00506
00507   FreeLibrary(GetModuleHandle(_T("RICHED32.DLL")));
00508   SaveOptions();
00509
00510   return CWinApp::ExitInstance();
00511 }
00512
00513 void CWordPadApp::OnFileNew()
00514 {
00515   int nDocType = -1;
00516   if (!m_bPromptForType)
00517   {
00518     if (cmdInfo.m_bForceTextMode)
00519       nDocType = RD_TEXT;
00520     else if (!cmdInfo.m_strFileName.IsEmpty())
00521     {
00522       CFileException fe;
00523       nDocType = GetDocTypeFromName(cmdInfo.m_strFileName, fe);
00524     }
00525     if (nDocType == -1)
00526       nDocType = RD_DEFAULT;
00527   }
00528   else
00529   {
00530     CFileNewDialog dlg;
00531     if (dlg.DoModal() == IDCANCEL)
00532       return;
00533
00534     nDocType = (dlg.m_nSel == 0) ? RD_DEFAULT:  //Word 6
00535           (dlg.m_nSel == 1) ? RD_RICHTEXT :   //RTF
00536           RD_TEXT ;                   //text
00537
00538     if (nDocType != RD_TEXT)
00539       cmdInfo.m_bForceTextMode = FALSE;
00540   }
00541   m_nNewDocType = nDocType;
00542   DocTemplate.OpenDocumentFile(NULL);
00543     // if returns NULL, the user has already been alerted
00544 }
00545
00546 // prompt for file name - used for open and save as
00547 // static function called from app
00548 BOOL CWordPadApp::PromptForFileName(CString& fileName, UINT nIDSTitle,
00549   DWORD dwFlags, BOOL bOpenFileDialog, int* pType)
00550 {
00551   ScanForConverters();
00552   CFileDialog dlgFile(bOpenFileDialog);
00553   CString title;
00554
00555   VERIFY(title.LoadString(nIDSTitle));
00556
00557   dlgFile.m_ofn.Flags |= dwFlags;
00558 //  dlgFile.m_ofn.Flags &= ~OFN_SHOWHELP;
00559
00560   int nIndex = m_nFilterIndex;
00561   if (!bOpenFileDialog)
00562   {
00563     int nDocType = (pType != NULL) ? *pType : RD_DEFAULT;
00564     nIndex = GetIndexFromType(nDocType, bOpenFileDialog);
00565     if (nIndex == -1)
00566       nIndex = GetIndexFromType(RD_DEFAULT, bOpenFileDialog);
00567     if (nIndex == -1)
00568       nIndex = GetIndexFromType(RD_NATIVE, bOpenFileDialog);
00569     ASSERT(nIndex != -1);
00570     nIndex++;
00571   }
00572   dlgFile.m_ofn.nFilterIndex = nIndex;
00573   // strDefExt is necessary to hold onto the memory from GetExtFromType
00574   CString strDefExt = GetExtFromType(GetTypeFromIndex(nIndex-1, bOpenFileDialog));
00575   dlgFile.m_ofn.lpstrDefExt = strDefExt;
00576
00577
00578   CString strFilter = GetFileTypes(bOpenFileDialog);
00579   dlgFile.m_ofn.lpstrFilter = strFilter;
00580   dlgFile.m_ofn.lpstrTitle = title;
00581   dlgFile.m_ofn.lpstrFile = fileName.GetBuffer(_MAX_PATH);
00582
00583   BOOL bRet = (dlgFile.DoModal() == IDOK) ? TRUE : FALSE;
00584   fileName.ReleaseBuffer();
00585   if (bRet)
00586   {
00587     if (bOpenFileDialog)
00588       m_nFilterIndex = dlgFile.m_ofn.nFilterIndex;
00589     if (pType != NULL)
00590     {
00591       nIndex = (int)dlgFile.m_ofn.nFilterIndex - 1;
00592       ASSERT(nIndex >= 0);
00593       *pType = GetTypeFromIndex(nIndex, bOpenFileDialog);
00594     }
00595   }
00596   return bRet;
00597 }
00598
00599 void CWordPadApp::OnFileOpen()
00600 {
00601   // prompt the user (with all document templates)
00602   CString newName;
00603   int nType = RD_DEFAULT;
00604   if (!PromptForFileName(newName, AFX_IDS_OPENFILE,
00605     OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, &nType))
00606     return; // open cancelled
00607
00608   if (nType == RD_OEMTEXT)
00609     m_bForceOEM = TRUE;
00610   OpenDocumentFile(newName);
00611   m_bForceOEM = FALSE;
00612   // if returns NULL, the user has already been alerted
00613 }
00614
00615 BOOL CWordPadApp::OnDDECommand(LPTSTR /*lpszCommand*/)
00616 {
00617   return FALSE;
00618 }
00619
00620 /////////////////////////////////////////////////////////////////////////////
00621 // DDE and ShellExecute support
00622
00623 //HKEY_CLASSES_ROOT\.RTF = rtffile
00624 //HKEY_CLASSES_ROOT\rtffile =
00625 //HKEY_CLASSES_ROOT\rtffile\CLSID = {73FDDC80-AEA9-101A-98A7-00AA00374959}
00626 //HKEY_CLASSES_ROOT\rtffile\protocol\StdFileEditing\server = WORDPAD.EXE
00627 //HKEY_CLASSES_ROOT\rtffile\protocol\StdFileEditing\verb\0 = &Edit
00628 //HKEY_CLASSES_ROOT\rtffile\shell\open\command = WORDPAD.EXE %1
00629 //HKEY_CLASSES_ROOT\rtffile\shell\print\command = WORDPAD.EXE /p %1
00630
00631 #define REGENTRY(key, value) _T(key) _T("\0\0") _T(value)
00632 #define REGENTRYX(key, valuename, value) _T(key) _T("\0") _T(valuename) _T("\0") _T(value)
00633
00634 static const TCHAR sz00[] = REGENTRY("%2", "%5");
00635 static const TCHAR sz01[] = REGENTRY("%2\\CLSID", "%1");
00636 static const TCHAR sz02[] = REGENTRY("%2\\Insertable", "");
00637 static const TCHAR sz03[] = REGENTRY("%2\\protocol\\StdFileEditing\\verb\\0", "&Edit");
00638 static const TCHAR sz04[] = REGENTRY("%2\\protocol\\StdFileEditing\\server", "%3");
00639 static const TCHAR sz05[] = REGENTRY("CLSID\\%1", "%5");
00640 static const TCHAR sz06[] = REGENTRY("CLSID\\%1\\ProgID", "%2");
00641 static const TCHAR sz07[] = REGENTRY("CLSID\\%1\\InprocHandler32", "ole32.dll");
00642 static const TCHAR sz08[] = REGENTRY("CLSID\\%1\\LocalServer32", "%3");
00643 static const TCHAR sz09[] = REGENTRY("CLSID\\%1\\Verb\\0", "&Edit,0,2");
00644 static const TCHAR sz10[] = REGENTRY("CLSID\\%1\\Verb\\1", "&Open,0,2");
00645 static const TCHAR sz11[] = REGENTRY("CLSID\\%1\\Insertable", "");
00646 static const TCHAR sz12[] = REGENTRY("CLSID\\%1\\AuxUserType\\2", "%4");
00647 static const TCHAR sz13[] = REGENTRY("CLSID\\%1\\AuxUserType\\3", "%6");
00648 static const TCHAR sz14[] = REGENTRY("CLSID\\%1\\DefaultIcon", "%3,1");
00649 static const TCHAR sz15[] = REGENTRY("CLSID\\%1\\MiscStatus", "0");
00650 static const TCHAR sz16[] = REGENTRY("%2\\shell\\open\\command", "%3 \"%%1\"");
00651 static const TCHAR sz17[] = REGENTRY("%2\\shell\\print\\command", "%3 /p \"%%1\"");
00652 static const TCHAR sz18[] = REGENTRY("%7", "%2");
00653 static const TCHAR sz19[] = REGENTRY("%2", ""); // like sz00 only no long type name
00654 static const TCHAR sz20[] = REGENTRY("%2\\shell\\printto\\command", "%3 /pt \"%%1\" \"%%2\" \"%%3\" \"%%4\"");
00655 static const TCHAR sz21[] = REGENTRY("%2\\DefaultIcon", "%3,%8");
00656 static const TCHAR sz22[] = REGENTRYX("%7\\ShellNew", "NullFile", "true");
00657 static const TCHAR sz23[] = REGENTRYX("%7\\ShellNew", "Data", "{\\rtf1}");
00658
00659 // %1 - class ID
00660 // %2 - class name              WordPad.Document.1
00661 // %3 - SFN executable path     C:\PROGRA~1\ACCESS~1\WORDPAD.EXE
00662 // %4 - short type name         Document
00663 // %5 - long type name          Microsoft WordPad Document
00664 // %6 - long application name   Microsoft WordPad
00665 // %7 = extension               .rtf
00666 // %8 = default icon            0,1,2,3
00667 #define NUM_REG_ARGS 8
00668
00669 static const LPCTSTR rglpszWordPadRegister[] =
00670 {sz00, sz02, sz03, sz05, sz09, sz10, sz11, sz15, NULL};
00671
00672 static const LPCTSTR rglpszWordPadOverwrite[] =
00673 {sz01, sz04, sz06, sz07, sz08, sz12, sz13, sz14, sz16, sz17, sz20, NULL};
00674
00675 //static const LPCTSTR rglpszExtRegister[] =
00676 //{sz00, sz18, NULL};
00677
00678 //static const LPCTSTR rglpszExtOverwrite[] =
00679 //{sz01, sz16, sz17, sz21, NULL};
00680
00681 static const LPCTSTR rglpszWriExtRegister[] =
00682 {sz18, NULL};
00683 static const LPCTSTR rglpszWriRegister[] =
00684 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00685
00686 static const LPCTSTR rglpszRtfExtRegister[] =
00687 {sz18, sz23, NULL};
00688 static const LPCTSTR rglpszRtfRegister[] =
00689 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00690
00691 static const LPCTSTR rglpszTxtExtRegister[] =
00692 {sz18, sz22, NULL};
00693 static const LPCTSTR rglpszTxtRegister[] =
00694 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00695
00696 static const LPCTSTR rglpszDocExtRegister[] =
00697 {sz18, sz22, NULL};
00698 static const LPCTSTR rglpszDocRegister[] =
00699 {sz00, sz01, sz16, sz17, sz20, sz21, NULL};
00700
00701 static void RegisterExt(LPCTSTR lpszExt, LPCTSTR lpszProgID, UINT nIDTypeName,
00702   LPCTSTR* rglpszSymbols, LPCTSTR* rglpszExtRegister,
00703   LPCTSTR* rglpszRegister, int nIcon)
00704 {
00705   // don't overwrite anything with the extensions
00706   CString strWhole;
00707   VERIFY(strWhole.LoadString(nIDTypeName));
00708   CString str;
00709   AfxExtractSubString(str, strWhole, DOCTYPE_PROGID);
00710
00711   rglpszSymbols[1] = lpszProgID;
00712   rglpszSymbols[4] = str;
00713   rglpszSymbols[6] = lpszExt;
00714   TCHAR buf[10];
00715   _stprintf_s(buf, 10, _T("%d"), nIcon);
00716   rglpszSymbols[7] = buf;
00717   // check for .ext and progid
00718   CKey key;
00719   if (!key.Open(HKEY_CLASSES_ROOT, lpszExt)) // .ext doesn't exist
00720     RegisterHelper(rglpszExtRegister, rglpszSymbols, TRUE);
00721   key.Close();
00722   if (!key.Open(HKEY_CLASSES_ROOT, lpszProgID)) // ProgID doesn't exist (i.e. txtfile)
00723     RegisterHelper(rglpszRegister, rglpszSymbols, TRUE);
00724 }
00725
00726 void CWordPadApp::UpdateRegistry()
00727 {
00728   USES_CONVERSION;
00729   LPOLESTR lpszClassID = NULL;
00730   CDocTemplate* pDocTemplate = &DocTemplate;
00731
00732   // get registration info from doc template string
00733   CString strServerName;
00734   CString strLocalServerName;
00735   CString strLocalShortName;
00736
00737   if (!pDocTemplate->GetDocString(strServerName,
00738      CDocTemplate::regFileTypeId) || strServerName.IsEmpty())
00739   {
00740     TRACE0("Error: not enough information in DocTemplate to register OLE server.\n");
00741     return;
00742   }
00743   if (!pDocTemplate->GetDocString(strLocalServerName,
00744      CDocTemplate::regFileTypeName))
00745     strLocalServerName = strServerName;     // use non-localized name
00746   if (!pDocTemplate->GetDocString(strLocalShortName,
00747     CDocTemplate::fileNewName))
00748     strLocalShortName = strLocalServerName; // use long name
00749
00750   ASSERT(strServerName.Find(' ') == -1);  // no spaces allowed
00751
00752   ::StringFromCLSID(clsid, &lpszClassID);
00753   ASSERT (lpszClassID != NULL);
00754
00755   // get path name to server
00756   TCHAR szLongPathName[_MAX_PATH];
00757   TCHAR szShortPathName[_MAX_PATH];
00758   ::GetModuleFileName(AfxGetInstanceHandle(), szLongPathName, _MAX_PATH);
00759   ::GetShortPathName(szLongPathName, szShortPathName, _MAX_PATH);
00760
00761   LPCTSTR rglpszSymbols[NUM_REG_ARGS];
00762   rglpszSymbols[0] = COLE2CT(lpszClassID);
00763   rglpszSymbols[1] = strServerName;
00764   rglpszSymbols[2] = szShortPathName;
00765   rglpszSymbols[3] = strLocalShortName;
00766   rglpszSymbols[4] = strLocalServerName;
00767   rglpszSymbols[5] = m_pszAppName;    // will usually be long, readable name
00768   rglpszSymbols[6] = NULL;
00769
00770   if (RegisterHelper((LPCTSTR*)rglpszWordPadRegister, rglpszSymbols, FALSE))
00771     RegisterHelper((LPCTSTR*)rglpszWordPadOverwrite, rglpszSymbols, TRUE);
00772
00773 //  RegisterExt(_T(".txt"), _T("txtfile"), IDS_TEXT_DOC, rglpszSymbols,
00774 //      (LPCTSTR*)rglpszTxtExtRegister, (LPCTSTR*)rglpszTxtRegister, 3);
00775   RegisterExt(_T(".rtf"), _T("rtffile"), IDS_RICHTEXT_DOC, rglpszSymbols,
00776     (LPCTSTR*)rglpszRtfExtRegister, (LPCTSTR*)rglpszRtfRegister, 1);
00777   RegisterExt(_T(".wri"), _T("wrifile"), IDS_WRITE_DOC, rglpszSymbols,
00778     (LPCTSTR*)rglpszWriExtRegister, (LPCTSTR*)rglpszWriRegister, 2);
00779   RegisterExt(_T(".doc"), _T("WordPad.Document.1"), IDS_WINWORD6_DOC, rglpszSymbols,
00780     (LPCTSTR*)rglpszDocExtRegister, (LPCTSTR*)rglpszDocRegister, 1);
00781
00782   // free memory for class ID
00783   ASSERT(lpszClassID != NULL);
00784   CoTaskMemFree(lpszClassID);
00785 }
00786
00787 BOOL RegisterHelper(LPCTSTR* rglpszRegister, LPCTSTR* rglpszSymbols,
00788   BOOL bReplace)
00789 {
00790   ENSURE(rglpszRegister != NULL);
00791   ASSERT(rglpszSymbols != NULL);
00792
00793   CString strKey;
00794   CString strValueName;
00795   CString strValue;
00796
00797   // keeping a key open makes this go a bit faster
00798   CKey keyTemp;
00799   VERIFY(keyTemp.Create(HKEY_CLASSES_ROOT, _T("CLSID")));
00800
00801   BOOL bResult = TRUE;
00802   while (*rglpszRegister != NULL)
00803   {
00804     LPCTSTR lpszKey = *rglpszRegister++;
00805     if (*lpszKey == '\0')
00806       continue;
00807
00808     LPCTSTR lpszValueName = lpszKey + lstrlen(lpszKey) + 1;
00809     LPCTSTR lpszValue = lpszValueName + lstrlen(lpszValueName) + 1;
00810
00811     strKey.ReleaseBuffer(
00812       FormatMessage(FORMAT_MESSAGE_FROM_STRING |
00813       FORMAT_MESSAGE_ARGUMENT_ARRAY, lpszKey, NULL,   NULL,
00814       strKey.GetBuffer(256), 256, (va_list*) rglpszSymbols));
00815     strValueName = lpszValueName;
00816     strValue.ReleaseBuffer(
00817       FormatMessage(FORMAT_MESSAGE_FROM_STRING |
00818       FORMAT_MESSAGE_ARGUMENT_ARRAY, lpszValue, NULL, NULL,
00819       strValue.GetBuffer(256), 256, (va_list*) rglpszSymbols));
00820
00821     if (strKey.IsEmpty())
00822     {
00823       TRACE1("Warning: skipping empty key '%s'.\n", lpszKey);
00824       continue;
00825     }
00826
00827     CKey key;
00828     VERIFY(key.Create(HKEY_CLASSES_ROOT, strKey));
00829     if (!bReplace)
00830     {
00831       CString str;
00832       if (key.GetStringValue(str, strValueName) && !str.IsEmpty())
00833         continue;
00834     }
00835
00836     if (!key.SetStringValue(strValue, strValueName))
00837     {
00838       TRACE2("Error: failed setting key '%s' to value '%s'.\n",
00839         (LPCTSTR)strKey, (LPCTSTR)strValue);
00840       bResult = FALSE;
00841       break;
00842     }
00843   }
00844
00845   return bResult;
00846 }
00847
00848 void CWordPadApp::WinHelp(DWORD dwData, UINT nCmd)
00849 {
00850   if (nCmd == HELP_INDEX)
00851     nCmd = HELP_FINDER;
00852   CWinApp::WinHelp(dwData, nCmd);
00853 }
00854
00855 BOOL CWordPadApp::PreTranslateMessage(MSG* pMsg)
00856 {
00857   if (pMsg->message == WM_PAINT)
00858     return FALSE;
00859   // CWinApp::PreTranslateMessage does nothing but call base
00860   return CWinThread::PreTranslateMessage(pMsg);
00861 }
00862
00863 void CWordPadApp::NotifyPrinterChanged(BOOL bUpdatePrinterSelection)
00864 {
00865   if (bUpdatePrinterSelection)
00866     UpdatePrinterSelection(FALSE);
00867   POSITION pos = m_listPrinterNotify.GetHeadPosition();
00868   while (pos != NULL)
00869   {
00870     HWND hWnd = m_listPrinterNotify.GetNext(pos);
00871     ::SendMessage(hWnd, m_nPrinterChangedMsg, 0, 0);
00872   }
00873 }
00874
00875 BOOL CWordPadApp::IsIdleMessage(MSG* pMsg)
00876 {
00877   if (pMsg->message == WM_MOUSEMOVE || pMsg->message == WM_NCMOUSEMOVE)
00878     return FALSE;
00879   return CWinApp::IsIdleMessage(pMsg);
00880 }
00881
00882 HGLOBAL CWordPadApp::CreateDevNames()
00883 {
00884   HGLOBAL hDev = NULL;
00885   if (!cmdInfo.m_strDriverName.IsEmpty() && !cmdInfo.m_strPrinterName.IsEmpty() &&
00886     !cmdInfo.m_strPortName.IsEmpty())
00887   {
00888     int nAllocSize = 4 * sizeof(WORD) +
00889       cmdInfo.m_strDriverName.GetLength() + 1 +
00890       cmdInfo.m_strPrinterName.GetLength() + 1 +
00891       cmdInfo.m_strPortName.GetLength() + 1;
00892     hDev = GlobalAlloc(GPTR, nAllocSize);
00893     LPDEVNAMES lpDev = (LPDEVNAMES)GlobalLock(hDev);
00894     lpDev->wDriverOffset = sizeof(WORD)*4;
00895     _tcscpy_s((TCHAR*)lpDev + lpDev->wDriverOffset, nAllocSize - lpDev->wDriverOffset, cmdInfo.m_strDriverName);
00896
00897     lpDev->wDeviceOffset = (WORD)(lpDev->wDriverOffset + cmdInfo.m_strDriverName.GetLength()+1);
00898     _tcscpy_s((TCHAR*)lpDev + lpDev->wDriverOffset, nAllocSize - lpDev->wDriverOffset, cmdInfo.m_strPrinterName);
00899
00900     lpDev->wOutputOffset = (WORD)(lpDev->wDeviceOffset + cmdInfo.m_strPrinterName.GetLength()+1);
00901     _tcscpy_s((TCHAR*)lpDev + lpDev->wDriverOffset, nAllocSize - lpDev->wDriverOffset, cmdInfo.m_strPortName);
00902
00903     lpDev->wDefault = 0;
00904   }
00905   return hDev;
00906 }
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DynamicMenu/DynamicMenuDoc.cpp Source File

  • vc2008fp
  • DynamicMenu

DynamicMenuDoc.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "DynamicMenu.h"
00013
00014 #include "DynamicMenuDoc.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #undef THIS_FILE
00019 static char THIS_FILE[] = __FILE__;
00020 #endif
00021
00022 /////////////////////////////////////////////////////////////////////////////
00023 // CDynamicMenuDoc
00024
00025 IMPLEMENT_DYNCREATE(CDynamicMenuDoc, CDocument)
00026
00027 BEGIN_MESSAGE_MAP(CDynamicMenuDoc, CDocument)
00028 END_MESSAGE_MAP()
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CDynamicMenuDoc construction/destruction
00032
00033 CDynamicMenuDoc::CDynamicMenuDoc()
00034 {
00035   // TODO: add one-time construction code here
00036
00037 }
00038
00039 CDynamicMenuDoc::~CDynamicMenuDoc()
00040 {
00041 }
00042
00043 BOOL CDynamicMenuDoc::OnNewDocument()
00044 {
00045   if (!CDocument::OnNewDocument())
00046     return FALSE;
00047
00048   // TODO: add reinitialization code here
00049   // (SDI documents will reuse this document)
00050
00051   return TRUE;
00052 }
00053
00054
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CDynamicMenuDoc serialization
00058
00059 void CDynamicMenuDoc::Serialize(CArchive& ar)
00060 {
00061   if (ar.IsStoring())
00062   {
00063     // TODO: add storing code here
00064   }
00065   else
00066   {
00067     // TODO: add loading code here
00068   }
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CDynamicMenuDoc diagnostics
00073
00074 #ifdef _DEBUG
00075 void CDynamicMenuDoc::AssertValid() const
00076 {
00077   CDocument::AssertValid();
00078 }
00079
00080 void CDynamicMenuDoc::Dump(CDumpContext& dc) const
00081 {
00082   CDocument::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CDynamicMenuDoc commands
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CListDlg Member List

This is the complete list of members for CListDlg, including all inherited members.
CListDlg(UINT idStrDlgTitle, UINT idStrListTitle, const CStringList &listItems, int nDefSel=0) | CListDlg |
CListDlg(UINT idStrDlgTitle, UINT idStrListTitle, const CStringList &listItems, int nDefSel=0) | CListDlg |
IDD enum value | CListDlg |
m_listItems | CListDlg |
m_nSelection | CListDlg |
m_strDlgTitle | CListDlg |
m_strListTitle | CListDlg |
OnInitDialog() | CListDlg | [protected]
OnInitDialog() | CListDlg | [protected]
OnOK() | CListDlg | [protected]
OnOK() | CListDlg | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/RebarTest/ChildFrm.cpp Source File

  • vc2008fp
  • RebarTest

ChildFrm.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "RebarTest.h"
00013
00014 #include "ChildFrm.h"
00015
00016 #ifdef _DEBUG
00017 #define new DEBUG_NEW
00018 #endif
00019
00020
00021 // CChildFrame
00022
00023 IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWndEx)
00024
00025 BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWndEx)
00026 END_MESSAGE_MAP()
00027
00028
00029 // CChildFrame construction/destruction
00030
00031 CChildFrame::CChildFrame()
00032 {
00033   // TODO: add member initialization code here
00034 }
00035
00036 CChildFrame::~CChildFrame()
00037 {
00038 }
00039
00040
00041 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
00042 {
00043   // TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs
00044   if( !CMDIChildWndEx::PreCreateWindow(cs) )
00045     return FALSE;
00046
00047   return TRUE;
00048 }
00049
00050
00051 // CChildFrame diagnostics
00052
00053 #ifdef _DEBUG
00054 void CChildFrame::AssertValid() const
00055 {
00056   CMDIChildWndEx::AssertValid();
00057 }
00058
00059 void CChildFrame::Dump(CDumpContext& dc) const
00060 {
00061   CMDIChildWndEx::Dump(dc);
00062 }
00063
00064 #endif //_DEBUG
00065
00066
00067 // CChildFrame message handlers
00068
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dispatch.h Source File

  • ole
  • oleview
  • iviewers

dispatch.h

Go to the documentation of this file.
00001 // typelib.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /////////////////////////////////////////////////////////////////////////////
00014 // CDispatchViewer command target
00015
00016 class CDispatchViewer : public CInterfaceViewer
00017 {
00018   DECLARE_DYNCREATE(CDispatchViewer)
00019 protected:
00020   CDispatchViewer();           // protected constructor used by dynamic creation
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   // ClassWizard generated virtual function overrides
00030   //{{AFX_VIRTUAL(CDispatchViewer)
00031   public:
00032 //  virtual void OnFinalRelease();
00033   //}}AFX_VIRTUAL
00034   virtual HRESULT OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk);
00035
00036 // Implementation
00037 protected:
00038   virtual ~CDispatchViewer();
00039
00040   // Generated message map functions
00041   //{{AFX_MSG(CDispatchViewer)
00042     // NOTE - the ClassWizard will add and remove member functions here.
00043   //}}AFX_MSG
00044
00045   DECLARE_MESSAGE_MAP()
00046   DECLARE_OLECREATE(CDispatchViewer)
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050 /////////////////////////////////////////////////////////////////////////////
00051 // CDispatchDlg dialog
00052
00053 class CDispatchDlg : public CDialog
00054 {
00055 // Construction
00056 public:
00057   CDispatchDlg(CWnd* pParent = NULL);   // standard constructor
00058
00059 // Dialog Data
00060   //{{AFX_DATA(CDispatchDlg)
00061   enum { IDD = IDD_DISPATCH };
00062   CButton m_btnViewTypeInfo;
00063   UINT    m_uiTypeInfoCount;
00064   //}}AFX_DATA
00065
00066   IDispatch* m_pdisp ;
00067 // Overrides
00068   // ClassWizard generated virtual function overrides
00069   //{{AFX_VIRTUAL(CDispatchDlg)
00070   protected:
00071   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00072   //}}AFX_VIRTUAL
00073
00074 // Implementation
00075 protected:
00076
00077   // Generated message map functions
00078   //{{AFX_MSG(CDispatchDlg)
00079   afx_msg void OnViewTypeInfo();
00080   virtual BOOL OnInitDialog();
00081   //}}AFX_MSG
00082   DECLARE_MESSAGE_MAP()
00083 };
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSOffice2007Demo/OptionsPage.cpp Source File

  • vc2008fp
  • MSOffice2007Demo

OptionsPage.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "MSOffice2007Demo.h"
00014 #include "OptionsPage.h"
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 CDemoOptionsPropSheet::CDemoOptionsPropSheet(CWnd* pWndParent, UINT nSelectedPage) :
00024   CMFCPropertySheet(_T("Options"), pWndParent, nSelectedPage)
00025 {
00026   m_Icons.SetImageSize(CSize(32, 32));
00027   m_Icons.Load(IDB_OPTIONS);
00028
00029   CMFCControlRendererInfo params(_T(""), CLR_DEFAULT, CRect(0, 0, 350, 60), CRect(83, 58, 266, 1), CRect(0, 0, 0, 0), CRect(0, 0, 0, 0), FALSE);
00030
00031   params.m_uiBmpResID = IDB_HEADERPAT_1;
00032   m_Pat[0].Create(params);
00033   params.m_uiBmpResID = IDB_HEADERPAT_2;
00034   m_Pat[1].Create(params);
00035   params.m_uiBmpResID = IDB_HEADERPAT_3;
00036   m_Pat[2].Create(params);
00037   params.m_uiBmpResID = IDB_HEADERPAT_4;
00038   m_Pat[3].Create(params);
00039 }
00040
00041 BOOL CDemoOptionsPropSheet::OnInitDialog()
00042 {
00043   BOOL bRes = CMFCPropertySheet::OnInitDialog();
00044
00045   // Ensure that the Options dialog is fully visible on screen
00046   CRect rectDialog;
00047   GetWindowRect(&rectDialog);
00048
00049   int cxScreen = GetSystemMetrics(SM_CXSCREEN);
00050   int cyScreen = GetSystemMetrics(SM_CYMAXIMIZED) - (GetSystemMetrics(SM_CYSCREEN) - GetSystemMetrics(SM_CYMAXIMIZED));
00051
00052   if ((rectDialog.left < 0) || (rectDialog.top < 0))
00053   {
00054     SetWindowPos(NULL, rectDialog.left < 0 ? 0 : rectDialog.left, rectDialog.top < 0 ? 0 : rectDialog.top, 0, 0, SWP_NOSIZE);
00055   }
00056   else if ((rectDialog.right > cxScreen) || (rectDialog.bottom > cyScreen))
00057   {
00058     SetWindowPos(NULL, rectDialog.right > cxScreen ? cxScreen - rectDialog.Width() : rectDialog.left, rectDialog.bottom > cyScreen ? cyScreen - rectDialog.Height() : rectDialog.top, 0, 0, SWP_NOSIZE);
00059   }
00060
00061   return bRes;
00062 }
00063
00064 void CDemoOptionsPropSheet::OnDrawPageHeader(CDC* pDC, int nPage, CRect rectHeader)
00065 {
00066   CSize sizeIcon = m_Icons.GetImageSize();
00067   CDrawingManager dm(*pDC);
00068
00069   COLORREF clrFill = afxGlobalData.clrBarFace;
00070   CMFCControlRenderer* pRenderer = NULL;
00071
00072   switch (theApp.m_nAppLook)
00073   {
00074   case ID_VIEW_APPLOOK_2007_1:
00075     pRenderer = &m_Pat[1];
00076     break;
00077   case ID_VIEW_APPLOOK_2007_2:
00078     pRenderer = &m_Pat[2];
00079     break;
00080   case ID_VIEW_APPLOOK_2007_3:
00081     pRenderer = &m_Pat[0];
00082     break;
00083   case ID_VIEW_APPLOOK_2007_4:
00084     pRenderer = &m_Pat[3];
00085     break;
00086   }
00087
00088   if (pRenderer != NULL)
00089   {
00090     pRenderer->Draw(pDC, rectHeader);
00091   }
00092   else
00093   {
00094     dm.FillGradient(rectHeader, pDC->GetPixel(rectHeader.left, rectHeader.bottom), clrFill);
00095   }
00096
00097   rectHeader.bottom -= 10;
00098
00099   CRect rectIcon = rectHeader;
00100   rectIcon.left += 20;
00101   rectIcon.right = rectIcon.left + sizeIcon.cx;
00102
00103   m_Icons.DrawEx(pDC, rectIcon, nPage, CMFCToolBarImages::ImageAlignHorzLeft, CMFCToolBarImages::ImageAlignVertCenter);
00104
00105   CString strText;
00106
00107   switch (nPage)
00108   {
00109   case 0:
00110     strText = _T("Change the most popular options");
00111     break;
00112
00113   case 1:
00114     strText = _T("Customize the Quick Access Toolbar and keyboard shortcuts");
00115     break;
00116
00117   case 2:
00118     strText = _T("Contact Microsoft, find online resources and obtain additional information regarding our products and services");
00119     break;
00120   }
00121
00122   CRect rectText = rectHeader;
00123   rectText.left = rectIcon.right + 10;
00124   rectText.right -= 20;
00125
00126   CFont* pOldFont = pDC->SelectObject(&afxGlobalData.fontBold);
00127   pDC->SetBkMode(TRANSPARENT);
00128   pDC->SetTextColor(afxGlobalData.clrBarText);
00129
00130   UINT uiFlags = DT_SINGLELINE | DT_VCENTER;
00131
00132   CRect rectTextCalc = rectText;
00133   pDC->DrawText(strText, rectTextCalc, uiFlags | DT_CALCRECT);
00134
00135   if (rectTextCalc.right > rectText.right)
00136   {
00137     rectText.DeflateRect(0, 10);
00138     uiFlags = DT_WORDBREAK;
00139   }
00140
00141   pDC->DrawText(strText, rectText, uiFlags);
00142
00143   pDC->SelectObject(pOldFont);
00144 }
00145
00146 /////////////////////////////////////////////////////////////////////////////
00147 // CDemoOptionsPage property page
00148
00149 IMPLEMENT_DYNCREATE(CDemoOptionsPage, CMFCPropertyPage)
00150
00151 CDemoOptionsPage::CDemoOptionsPage() : CMFCPropertyPage(CDemoOptionsPage::IDD)
00152 {
00153   //{{AFX_DATA_INIT(CDemoOptionsPage)
00154   m_nColorScheme = theApp.m_nAppLook - ID_VIEW_APPLOOK_2003;
00155   m_nTooltipStyle = -1;
00156   m_bShowDevTab = theApp.m_bShowDevTab;
00157   m_bShowFloaty = theApp.m_bShowFloaty;
00158   m_bShowKeyTips = theApp.m_bShowKeyTips;
00159   //}}AFX_DATA_INIT
00160
00161   if (!theApp.m_bShowToolTips)
00162   {
00163     m_nTooltipStyle = 2;
00164   }
00165   else
00166   {
00167     m_nTooltipStyle = theApp.m_bShowToolTipDescr ? 0 : 1;
00168   }
00169 }
00170
00171 CDemoOptionsPage::~CDemoOptionsPage()
00172 {
00173 }
00174
00175 void CDemoOptionsPage::DoDataExchange(CDataExchange* pDX)
00176 {
00177   CMFCPropertyPage::DoDataExchange(pDX);
00178   //{{AFX_DATA_MAP(CDemoOptionsPage)
00179   DDX_Control(pDX, IDC_BANER, m_wndBanner);
00180   DDX_Control(pDX, IDC_COLOR_SCHEME, m_wndColorScheme);
00181   DDX_CBIndex(pDX, IDC_COLOR_SCHEME, m_nColorScheme);
00182   DDX_CBIndex(pDX, IDC_SCREENTIP_STYLE, m_nTooltipStyle);
00183   DDX_Check(pDX, IDC_SHOW_DEV_TAB, m_bShowDevTab);
00184   DDX_Check(pDX, IDC_SHOW_FLOATY, m_bShowFloaty);
00185   DDX_Check(pDX, IDC_SHOW_KEY_TIPS, m_bShowKeyTips);
00186   //}}AFX_DATA_MAP
00187 }
00188
00189 BEGIN_MESSAGE_MAP(CDemoOptionsPage, CMFCPropertyPage)
00190   //{{AFX_MSG_MAP(CDemoOptionsPage)
00191   ON_WM_SIZE()
00192   //}}AFX_MSG_MAP
00193 END_MESSAGE_MAP()
00194
00195 /////////////////////////////////////////////////////////////////////////////
00196 // CDemoOptionsPage message handlers
00197
00198 void CDemoOptionsPage::OnOK()
00199 {
00200   UpdateData();
00201
00202   theApp.m_bShowFloaty = m_bShowFloaty;
00203   theApp.m_nAppLook = m_nColorScheme + ID_VIEW_APPLOOK_2003;
00204   theApp.m_bShowDevTab = m_bShowDevTab;
00205   theApp.m_bShowKeyTips = m_bShowKeyTips;
00206
00207   switch (m_nTooltipStyle)
00208   {
00209   case 0:
00210     theApp.m_bShowToolTips = TRUE;
00211     theApp.m_bShowToolTipDescr = TRUE;
00212     break;
00213
00214   case 1:
00215     theApp.m_bShowToolTips = TRUE;
00216     theApp.m_bShowToolTipDescr = FALSE;
00217     break;
00218
00219   case 2:
00220     theApp.m_bShowToolTips = FALSE;
00221     theApp.m_bShowToolTipDescr = FALSE;
00222     break;
00223   }
00224
00225   CMFCPropertyPage::OnOK();
00226 }
00227
00228 BOOL CDemoOptionsPage::OnInitDialog()
00229 {
00230   CMFCPropertyPage::OnInitDialog();
00231
00232   if (((CMainFrame*) GetTopLevelFrame())->IsPrintPreview())
00233   {
00234     GetDlgItem(IDC_SHOW_DEV_TAB)->EnableWindow(FALSE);
00235   }
00236
00237   return TRUE;  // return TRUE unless you set the focus to a control
00238 }
00239
00240 void CDemoOptionsPage::OnSize(UINT nType, int cx, int cy)
00241 {
00242   CMFCPropertyPage::OnSize(nType, cx, cy);
00243
00244   if (m_wndBanner.GetSafeHwnd() == NULL)
00245   {
00246     return;
00247   }
00248
00249   CRect rectBanner;
00250   m_wndBanner.GetWindowRect(rectBanner);
00251
00252   CRect rectParent;
00253   GetParent()->GetWindowRect(rectParent);
00254
00255   m_wndBanner.SetWindowPos(NULL, -1, -1, rectParent.right - rectBanner.left - 10, rectBanner.Height(), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
00256 }
00257
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/rowlist/rlistdoc.h Source File

  • general
  • rowlist

rlistdoc.h

Go to the documentation of this file.
00001 // RListDoc.h : interface of the CRowListDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 class CRowListDoc : public CDocument
00013 {
00014 protected: // create from serialization only
00015   CRowListDoc();
00016   DECLARE_DYNCREATE(CRowListDoc)
00017
00018 // Attributes
00019 public:
00020
00021 // Operations
00022 public:
00023
00024 // Overrides
00025   // ClassWizard generated virtual function overrides
00026   //{{AFX_VIRTUAL(CRowListDoc)
00027   public:
00028   virtual BOOL OnNewDocument();
00029   virtual void Serialize(CArchive& ar);
00030   //}}AFX_VIRTUAL
00031
00032 // Implementation
00033 public:
00034   virtual ~CRowListDoc();
00035 #ifdef _DEBUG
00036   virtual void AssertValid() const;
00037   virtual void Dump(CDumpContext& dc) const;
00038 #endif
00039
00040 protected:
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CRowListDoc)
00045     // NOTE - the ClassWizard will add and remove member functions here.
00046     //    DO NOT EDIT what you see in these blocks of generated code !
00047   //}}AFX_MSG
00048   DECLARE_MESSAGE_MAP()
00049 };
00050
00051 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDynaMenuApp Member List

This is the complete list of members for CDynaMenuApp, including all inherited members.
CDynaMenuApp() | CDynaMenuApp |
InitInstance() | CDynaMenuApp | [virtual]
OnAppAbout() | CDynaMenuApp |
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CHistoryObj Member List

This is the complete list of members for CHistoryObj, including all inherited members.
CHistoryObj(const CString &strTitle, const CString &strURL, const UINT uiCommand) | CHistoryObj |
GetCommand() const | CHistoryObj | [inline]
GetTitle() const | CHistoryObj | [inline]
GetURL() const | CHistoryObj | [inline]
m_strTitle | CHistoryObj | [protected]
m_strURL | CHistoryObj | [protected]
m_uiCommand | CHistoryObj | [protected]
~CHistoryObj() | CHistoryObj | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CLog Member List

This is the complete list of members for CLog, including all inherited members.
CLog() | CLog |
DECLARE_DYNAMIC(CLog) | CLog | [private]
operator<<(COleVariant &var) | CLog |
operator<<(int n) | CLog |
operator<<(LPCTSTR pszString) | CLog | [virtual]
~CLog() | CLog |
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

QAAMBIENTENTRY Member List

This is the complete list of members for QAAMBIENTENTRY, including all inherited members.
dispid | QAAMBIENTENTRY
dwQAFlag | QAAMBIENTENTRY
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMenuSubSetApp Member List

This is the complete list of members for CMenuSubSetApp, including all inherited members.
ChooseConfig(BOOL bIsStartup=FALSE) | CMenuSubSetApp |
CMenuSubSetApp() | CMenuSubSetApp |
ExitInstance() | CMenuSubSetApp | [virtual]
InitInstance() | CMenuSubSetApp | [virtual]
m_nCurrConfig | CMenuSubSetApp |
OnAppAbout() | CMenuSubSetApp |
PreLoadState() | CMenuSubSetApp | [virtual]
SaveAllModified() | CMenuSubSetApp | [virtual]
Generated on Sat Nov 23 2024 17:01:01 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DlgToolTips/targetver.h Source File

  • vc2008fp
  • DlgToolTips

targetver.h

Go to the documentation of this file.
00001 #pragma once
00002
00003 #include <winsdkver.h>
00004
00005 #ifndef _WIN32_WINNT
00006 // Modify the following define to target a prior platform. Refer to MSDN
00007 // for the latest info on corresponding values for different platforms.
00008 #define _WIN32_WINNT _WIN32_WINNT_MAXVER
00009 #endif
00010
00011 #include <sdkddkver.h>
00012
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CClassViewBar Member List

This is the complete list of members for CClassViewBar, including all inherited members.
AdjustLayout() | CClassViewBar |
CClassViewBar() | CClassViewBar |
FillClassView() | CClassViewBar | [protected]
m_ClassViewImages | CClassViewBar | [protected]
m_nCurrSort | CClassViewBar | [protected]
m_wndClassView | CClassViewBar | [protected]
m_wndToolBar | CClassViewBar | [protected]
OnChangeActiveTab(WPARAM, LPARAM) | CClassViewBar | [protected]
OnChangeVisualStyle() | CClassViewBar |
OnClassAddMemeberFunction() | CClassViewBar | [protected]
OnClassAddMemeberVariable() | CClassViewBar | [protected]
OnClassDefinition() | CClassViewBar | [protected]
OnClassProperties() | CClassViewBar | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CClassViewBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CClassViewBar | [protected]
OnNewFolder() | CClassViewBar | [protected]
OnPaint() | CClassViewBar | [protected]
OnSetFocus(CWnd *pOldWnd) | CClassViewBar | [protected]
OnSize(UINT nType, int cx, int cy) | CClassViewBar | [protected]
OnSort(UINT id) | CClassViewBar | [protected]
OnUpdateSort(CCmdUI *pCmdUI) | CClassViewBar | [protected]
PreTranslateMessage(MSG *pMsg) | CClassViewBar | [virtual]
~CClassViewBar() | CClassViewBar | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mutexes/resource.h Source File

  • advanced
  • mutexes

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by mutexes.rc
00004 //
00005 #define IDM_ABOUTBOX                    0x0010
00006 #define IDD_ABOUTBOX                    100
00007 #define IDC_PRIORITYCLASS               100
00008 #define IDS_ABOUTBOX                    101
00009 #define IDC_DSPYTHRDPRIORITY            101
00010 #define IDD_MUTEXES_DIALOG              102
00011 #define IDC_CNTRTHRDPRIORITY            102
00012 #define IDC_PAUSE                       103
00013 #define IDC_SYNCHRONIZE                 104
00014 #define IDC_SHOWCNTRTHRD                105
00015 #define IDC_DATABOX                     106
00016 #define IDR_MAINFRAME                   128
00017
00018 // Next default values for new objects
00019 //
00020 #ifdef APSTUDIO_INVOKED
00021 #ifndef APSTUDIO_READONLY_SYMBOLS
00022 #define _APS_NEXT_RESOURCE_VALUE        130
00023 #define _APS_NEXT_COMMAND_VALUE         32771
00024 #define _APS_NEXT_CONTROL_VALUE         1002
00025 #define _APS_NEXT_SYMED_VALUE           101
00026 #endif
00027 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: utility/makehm/resource.h Source File

  • utility
  • makehm

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by makehm.rc
00004 //
00005
00006 // Next default values for new objects
00007 //
00008 #ifdef APSTUDIO_INVOKED
00009 #ifndef APSTUDIO_READONLY_SYMBOLS
00010 #define _APS_NEXT_RESOURCE_VALUE        101
00011 #define _APS_NEXT_COMMAND_VALUE         40001
00012 #define _APS_NEXT_CONTROL_VALUE         1000
00013 #define _APS_NEXT_SYMED_VALUE           101
00014 #endif
00015 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/WorkspaceObj.cpp Source File

  • vc2008fp
  • OutlookDemo

WorkspaceObj.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #include "stdafx.h"
00011 #include "OutlookDemo.h"
00012 #include "WorkspaceObj.h"
00013
00014 #ifdef _DEBUG
00015 #undef THIS_FILE
00016 static char THIS_FILE[]=__FILE__;
00017 #define new DEBUG_NEW
00018 #endif
00019
00020 //////////////////////////////////////////////////////////////////////
00021 // Construction/Destruction
00022 //////////////////////////////////////////////////////////////////////
00023
00024 CWorkspaceObj::CWorkspaceObj(const CString& strName, const UINT uiCmd, const int iIconIndex, const UINT uiDefaultNewAction) :
00025   m_strName(strName), m_uiCmd(uiCmd), m_iIconIndex(iIconIndex), m_uiDefaultNewAction(uiDefaultNewAction)
00026 {
00027 }
00028
00029 CWorkspaceObj::~CWorkspaceObj()
00030 {
00031 }
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/npdoc.cpp Source File

  • general
  • npp

npdoc.cpp

Go to the documentation of this file.
00001 // npdoc.cpp : implementation of the CNotepadDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #include "stdafx.h"
00014 #include "np.h"
00015
00016 #include "npdoc.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CNotepadDoc
00025
00026 IMPLEMENT_DYNCREATE(CNotepadDoc, CDocument)
00027
00028 BEGIN_MESSAGE_MAP(CNotepadDoc, CDocument)
00029   //{{AFX_MSG_MAP(CNotepadDoc)
00030   ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00031   ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00032   //}}AFX_MSG_MAP
00033 END_MESSAGE_MAP()
00034
00035 /////////////////////////////////////////////////////////////////////////////
00036 // CNotepadDoc construction/destruction
00037
00038 CNotepadDoc::CNotepadDoc()
00039 {
00040 }
00041
00042 CNotepadDoc::~CNotepadDoc()
00043 {
00044 }
00045
00046 BOOL CNotepadDoc::OnNewDocument()
00047 {
00048   if (!CDocument::OnNewDocument())
00049     return FALSE;
00050
00051   ((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);
00052
00053   return TRUE;
00054 }
00055
00056 /////////////////////////////////////////////////////////////////////////////
00057 // CNotepadDoc serialization
00058
00059 void CNotepadDoc::Serialize(CArchive& ar)
00060 {
00061   ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
00062 }
00063
00064 /////////////////////////////////////////////////////////////////////////////
00065 // CNotepadDoc diagnostics
00066
00067 #ifdef _DEBUG
00068 void CNotepadDoc::AssertValid() const
00069 {
00070   CDocument::AssertValid();
00071 }
00072
00073 void CNotepadDoc::Dump(CDumpContext& dc) const
00074 {
00075   CDocument::Dump(dc);
00076 }
00077 #endif //_DEBUG
00078
00079 /////////////////////////////////////////////////////////////////////////////
00080 // CNotepadDoc commands
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDebugLog Member List

This is the complete list of members for CDebugLog, including all inherited members.
CDebugLog() | CDebugLog |
CLog() | CLog |
DECLARE_DYNAMIC(CDebugLog) | CDebugLog | [private]
m_tStartOfLine | CDebugLog | [protected]
operator<<(LPCTSTR pszString) | CDebugLog | [virtual]
CLog::operator<<(COleVariant &var) | CLog |
CLog::operator<<(int n) | CLog |
~CDebugLog() | CDebugLog |
~CLog() | CLog |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPaletteDemoApp Member List

This is the complete list of members for CPaletteDemoApp, including all inherited members.
CPaletteDemoApp() | CPaletteDemoApp |
ExitInstance() | CPaletteDemoApp | [virtual]
InitInstance() | CPaletteDemoApp | [virtual]
OnAppAbout() | CPaletteDemoApp |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/mtgdi/threads.h Source File

  • advanced
  • mtgdi

threads.h

Go to the documentation of this file.
00001 // threads.h : declarations for each GDI thread class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __THREADS_H__
00013 #define __THREADS_H__
00014
00015 /////////////////////////////////////////////////////////////////////////////
00016 // CGDIThread thread
00017
00018 class CGDIThread : public CWinThread
00019 {
00020 public:
00021   DECLARE_DYNAMIC(CGDIThread)
00022   CGDIThread(CWnd* pWnd, HDC hDC);
00023
00024 // Attributes
00025 public:
00026   CRect m_rectBorder;
00027   HDC m_hDC;
00028   CDC m_dc;
00029   HANDLE m_hEventKill;
00030   HANDLE m_hEventDead;
00031   static HANDLE m_hAnotherDead;
00032
00033   static CRITICAL_SECTION m_csGDILock;
00034
00035 // Operations
00036 public:
00037   void KillThread();
00038   void UpdateBorder();
00039   virtual void SingleStep() = 0;
00040
00041 // Overrides
00042   // ClassWizard generated virtual function overrides
00043   //{{AFX_VIRTUAL(CGDIThread)
00044   //}}AFX_VIRTUAL
00045
00046 // Implementation
00047 public:
00048   virtual ~CGDIThread();
00049   virtual void Delete();
00050
00051 protected:
00052   virtual BOOL InitInstance();
00053
00054   // Generated message map functions
00055   //{{AFX_MSG(CGDIThread)
00056     // NOTE - the ClassWizard will add and remove member functions here.
00057   //}}AFX_MSG
00058
00059   DECLARE_MESSAGE_MAP()
00060 };
00061
00062 /////////////////////////////////////////////////////////////////////////////
00063 // CBallThread thread
00064
00065 class CBallThread : public CGDIThread
00066 {
00067 public:
00068   DECLARE_DYNAMIC(CBallThread)
00069   CBallThread(CWnd* pWnd, HDC hDC,
00070     CPoint ptPos, CPoint ptVel, CSize Size, COLORREF color);
00071
00072 // Attributes
00073 public:
00074   CRect m_rectPosition;
00075   CPoint m_ptVelocity;
00076   HBRUSH m_hBrush;
00077   CBrush m_brush;
00078
00079 // Operations
00080 public:
00081   virtual BOOL InitInstance();
00082   virtual void SingleStep();
00083
00084 // Overrides
00085   // ClassWizard generated virtual function overrides
00086   //{{AFX_VIRTUAL(CBallThread)
00087   //}}AFX_VIRTUAL
00088
00089 // Implementation
00090 protected:
00091   virtual ~CBallThread() {};
00092
00093   // Generated message map functions
00094   //{{AFX_MSG(CBallThread)
00095     // NOTE - the ClassWizard will add and remove member functions here.
00096   //}}AFX_MSG
00097
00098   DECLARE_MESSAGE_MAP()
00099 };
00100
00101 /////////////////////////////////////////////////////////////////////////////
00102 // CRectThread thread
00103
00104 class CRectThread : public CGDIThread
00105 {
00106 public:
00107   DECLARE_DYNAMIC(CRectThread)
00108   CRectThread(CWnd* pWnd, HDC hDC,
00109     CPoint ptPos, CPoint ptVel, CSize Size, COLORREF color);
00110
00111 // Attributes
00112 public:
00113   CRect m_rectPosition;
00114   CPoint m_ptVelocity;
00115   HBRUSH m_hBrush;
00116   CBrush m_brush;
00117
00118 // Operations
00119 public:
00120   virtual BOOL InitInstance();
00121   virtual void SingleStep();
00122
00123 // Overrides
00124   // ClassWizard generated virtual function overrides
00125   //{{AFX_VIRTUAL(CRectThread)
00126   //}}AFX_VIRTUAL
00127
00128 // Implementation
00129 protected:
00130   virtual ~CRectThread() {};
00131
00132   // Generated message map functions
00133   //{{AFX_MSG(CRectThread)
00134     // NOTE - the ClassWizard will add and remove member functions here.
00135   //}}AFX_MSG
00136
00137   DECLARE_MESSAGE_MAP()
00138 };
00139
00140 /////////////////////////////////////////////////////////////////////////////
00141 // CLineThread thread
00142
00143 class CLineThread : public CGDIThread
00144 {
00145 public:
00146   DECLARE_DYNAMIC(CLineThread)
00147   CLineThread(CWnd* pWnd, HDC hDC,
00148     CPoint ptPos1, CPoint ptVel1, CPoint ptVel2, CSize Size, COLORREF color);
00149
00150 // Attributes
00151 public:
00152   CPoint m_ptPosition1;
00153   CPoint m_ptPosition2;
00154   CPoint m_ptVelocity1;
00155   CPoint m_ptVelocity2;
00156   HPEN m_hPen;
00157   CPen m_pen;
00158
00159 // Operations
00160 public:
00161   virtual BOOL InitInstance();
00162   virtual void SingleStep();
00163
00164 // Overrides
00165   // ClassWizard generated virtual function overrides
00166   //{{AFX_VIRTUAL(CLineThread)
00167   //}}AFX_VIRTUAL
00168
00169 // Implementation
00170 protected:
00171   virtual ~CLineThread() {};
00172
00173   // Generated message map functions
00174   //{{AFX_MSG(CLineThread)
00175     // NOTE - the ClassWizard will add and remove member functions here.
00176   //}}AFX_MSG
00177
00178   DECLARE_MESSAGE_MAP()
00179 };
00180
00181 #endif // __THREADS_H__
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMailBar Member List

This is the complete list of members for CMailBar, including all inherited members.
AdjustWidth(int cx, UINT uiCtrlID) | CMailBar | [protected]
AllowShowOnPaneMenu() const | CMailBar | [inline, protected, virtual]
CMailBar() | CMailBar |
DoDataExchange(CDataExchange *pDX) | CMailBar | [protected, virtual]
IDD enum value | CMailBar |
OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor) | CMailBar | [protected]
OnEraseBkgnd(CDC *pDC) | CMailBar | [protected]
OnSize(UINT nType, int cx, int cy) | CMailBar | [protected]
Generated on Sat Nov 23 2024 17:00:58 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/mdi/hello.h Source File

  • general
  • mdi

hello.h

Go to the documentation of this file.
00001 // hello.h : Declares the class interfaces for the Hello child window.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 #ifndef __HELLO_H__
00014 #define __HELLO_H__
00015
00016 /////////////////////////////////////////////////////////////////////////////
00017
00018 // class CHelloWnd
00019
00020 class CHelloWnd : public CMDIChildWnd
00021 {
00022 private:
00023   using CMDIChildWnd::Create;
00024
00025 public:
00026   CHelloWnd();
00027   BOOL Create(LPCTSTR szTitle, LONG style = 0,
00028         const RECT& rect = rectDefault,
00029         CMDIFrameWnd* pParent = NULL);
00030
00031 // Implementation
00032 protected:
00033   static CMenu NEAR menu;     // menu for all HELLO windows
00034
00035   UINT m_nIDColor;
00036   COLORREF m_clrText;
00037
00038   // message handlers
00039   //{{AFX_MSG(CHelloWnd)
00040   afx_msg void OnPaint();
00041   afx_msg void OnColor();
00042   afx_msg void OnCustomColor();
00043   afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
00044   //}}AFX_MSG
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 /////////////////////////////////////////////////////////////////////////////
00050
00051 #endif // __HELLO_H__
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagSYC Member List

This is the complete list of members for tagSYC, including all inherited members.
fLastSyc | tagSYC
wPntFirst | tagSYC
wPntLast | tagSYC
wStrokeFirst | tagSYC
wStrokeLast | tagSYC
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAppLookDlg Member List

This is the complete list of members for CAppLookDlg, including all inherited members.
CAppLookDlg(BOOL bStartup, CWnd *pParent=NULL) | CAppLookDlg |
CAppLookDlg(BOOL bStartup, CWnd *pParent=NULL) | CAppLookDlg |
CAppLookDlg(BOOL bStartup, CWnd *pParent=NULL) | CAppLookDlg |
DoDataExchange(CDataExchange *pDX) | CAppLookDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAppLookDlg | [protected, virtual]
DoDataExchange(CDataExchange *pDX) | CAppLookDlg | [protected, virtual]
IDD enum value | CAppLookDlg |
m_bActiveTabCloseButton | CAppLookDlg |
m_bCustomTooltips | CAppLookDlg |
m_bDockTabColors | CAppLookDlg |
m_bOneNoteTabs | CAppLookDlg |
m_bOutlookBar2003 | CAppLookDlg |
m_bRoundedTabs | CAppLookDlg |
m_bShowAtStartup | CAppLookDlg |
m_bStartup | CAppLookDlg | [protected]
m_nAppLook | CAppLookDlg |
m_nStyle | CAppLookDlg |
m_nStyle2007 | CAppLookDlg |
m_wndCancel | CAppLookDlg |
m_wndDockTabColors | CAppLookDlg |
m_wndOK | CAppLookDlg |
m_wndOneNoteTabs | CAppLookDlg |
m_wndOutlookBar2003 | CAppLookDlg |
m_wndRoundedTabs | CAppLookDlg |
m_wndStyle | CAppLookDlg |
m_wndStyle2007 | CAppLookDlg |
OnAppLook() | CAppLookDlg | [protected]
OnAppLook() | CAppLookDlg | [protected]
OnAppLook() | CAppLookDlg | [protected]
OnApply() | CAppLookDlg | [protected]
OnApply() | CAppLookDlg | [protected]
OnApply() | CAppLookDlg | [protected]
OnInitDialog() | CAppLookDlg | [protected, virtual]
OnInitDialog() | CAppLookDlg | [protected, virtual]
OnInitDialog() | CAppLookDlg | [protected, virtual]
OnOK() | CAppLookDlg | [protected, virtual]
OnOK() | CAppLookDlg | [protected, virtual]
OnOK() | CAppLookDlg | [protected, virtual]
SetLook() | CAppLookDlg | [protected]
SetLook() | CAppLookDlg | [protected]
SetLook() | CAppLookDlg | [protected]
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/MMXSwarm/SSE2Surface.h Source File

  • general
  • MMXSwarm

SSE2Surface.h

Go to the documentation of this file.
00001 // SSE2Surface.h : interface of the SSE2 Specific Surface classes
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012 #pragma once
00013 #include "Surface.h"
00014
00015 class CSSE2Surface32Intrinsic : public CSurface
00016 {
00017 public:
00018     virtual void AdjustWidth(int *pWidth);
00019     virtual void BlurBits(); // this is where the MMX action is
00020 protected:
00021   virtual void OnCreated();
00022 private:
00023   int m_qwpl;  // qwords per line
00024   int m_width; // number of times to iterate per line
00025 };
00026
00027 class CSSE2Surface24Intrinsic : public CSurface
00028 {
00029 public:
00030     virtual void AdjustWidth(int *pWidth);
00031     virtual void BlurBits(); // this is where the MMX action is
00032 protected:
00033   virtual void OnCreated();
00034 private:
00035   int m_qwpl;  // qwords per line
00036   int m_width; // number of times to iterate per line
00037   int m_delta;
00038 };
00039
00040 class CSSE2Surface16Intrinsic : public CSurface
00041 {
00042 public:
00043     virtual void AdjustWidth(int *pWidth);
00044     virtual void BlurBits(); // this is where the MMX action is
00045 protected:
00046   virtual void OnCreated();
00047 private:
00048   int m_qqwpl;  // qwords per line
00049   int m_width; // number of times to iterate per line
00050 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/StateCollection/OutputBar.cpp Source File

  • vc2008fp
  • StateCollection

OutputBar.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #include "stdafx.h"
00012 #include "StateCollection.h"
00013 #include "OutputBar.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // COutputBar
00023
00024 BEGIN_MESSAGE_MAP(COutputBar, CDockablePane)
00025   ON_WM_CREATE()
00026   ON_WM_SIZE()
00027 END_MESSAGE_MAP()
00028
00029 /////////////////////////////////////////////////////////////////////////////
00030 // COutputBar construction/destruction
00031
00032 COutputBar::COutputBar()
00033 {
00034   // TODO: add one-time construction code here
00035
00036 }
00037
00038 COutputBar::~COutputBar()
00039 {
00040 }
00041
00042 /////////////////////////////////////////////////////////////////////////////
00043 // COutputBar message handlers
00044
00045 int COutputBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00046 {
00047   if (CDockablePane::OnCreate(lpCreateStruct) == -1)
00048     return -1;
00049
00050   CRect rectDummy;
00051   rectDummy.SetRectEmpty ();
00052
00053   // Create tabs window:
00054   if (!m_wndTabs.Create (CMFCTabCtrl::STYLE_FLAT, rectDummy, this, 1))
00055   {
00056     TRACE0("Failed to create output tab window\n");
00057     return -1;      // fail to create
00058   }
00059
00060   // Create tree windows.
00061   // TODO: create your own tab windows here:
00062   const DWORD dwViewStyle =
00063     LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
00064
00065   if (!m_wndList1.Create (dwViewStyle, rectDummy, &m_wndTabs, 2) ||
00066     !m_wndList2.Create (dwViewStyle, rectDummy, &m_wndTabs, 3) ||
00067     !m_wndList3.Create (dwViewStyle, rectDummy, &m_wndTabs, 4))
00068   {
00069     TRACE0("Failed to create output view\n");
00070     return -1;      // fail to create
00071   }
00072
00073   // Attach list windows to tab:
00074   m_wndTabs.AddTab (&m_wndList1, _T("Output 1"), (UINT)-1);
00075   m_wndTabs.AddTab (&m_wndList2, _T("Output 2"), (UINT)-1);
00076   m_wndTabs.AddTab (&m_wndList3, _T("Output 3"), (UINT)-1);
00077
00078   return 0;
00079 }
00080
00081 void COutputBar::OnSize(UINT nType, int cx, int cy)
00082 {
00083   CDockablePane::OnSize(nType, cx, cy);
00084
00085   // Tab control should cover a whole client area:
00086   m_wndTabs.SetWindowPos (NULL, -1, -1, cx, cy,
00087     SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
00088 }
00089
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/Resource.h Source File

  • advanced
  • DllScreenCap
  • ScreenCap

Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by ScreenCap.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDR_MAINFRAME                   128
00007 #define IDR_ScreenCapTYPE               129
00008 #define ID_FILE_CONFIGURESCREENCAPTURE  130
00009 #define ID_FILE_SCREENCAPTURE           131
00010
00011 // Next default values for new objects
00012 //
00013 #ifdef APSTUDIO_INVOKED
00014 #ifndef APSTUDIO_READONLY_SYMBOLS
00015 #define _APS_NEXT_RESOURCE_VALUE        132
00016 #define _APS_NEXT_COMMAND_VALUE         32771
00017 #define _APS_NEXT_CONTROL_VALUE         1000
00018 #define _APS_NEXT_SYMED_VALUE           101
00019 #endif
00020 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDlgtempApp Member List

This is the complete list of members for CDlgtempApp, including all inherited members.
CDlgtempApp() | CDlgtempApp |
InitInstance() | CDlgtempApp | [virtual]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CPropDlgApp Member List

This is the complete list of members for CPropDlgApp, including all inherited members.
CPropDlgApp() | CPropDlgApp |
InitInstance() | CPropDlgApp | [virtual]
OnAppAbout() | CPropDlgApp |
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/hiersvr/mainfrm.h Source File

  • ole
  • hiersvr

mainfrm.h

Go to the documentation of this file.
00001 // mainfrm.h : interface of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013 #ifndef __AFXEXT_H__
00014 #include <afxext.h>         // for access to CToolBar and CStatusBar
00015 #endif
00016
00017 class CMainFrame : public CMDIFrameWnd
00018 {
00019   DECLARE_DYNAMIC(CMainFrame)
00020 public:
00021   CMainFrame();
00022
00023 // Attributes
00024 public:
00025
00026 // Operations
00027 public:
00028
00029 // Implementation
00030 public:
00031   virtual ~CMainFrame();
00032 #ifdef _DEBUG
00033   virtual void AssertValid() const;
00034   virtual void Dump(CDumpContext& dc) const;
00035 #endif
00036
00037 protected:
00038   // control bar embedded members
00039   CStatusBar  m_wndStatusBar;
00040   CToolBar    m_wndToolBar;
00041
00042 // Generated message map functions
00043 protected:
00044   //{{AFX_MSG(CMainFrame)
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046   //}}AFX_MSG
00047   DECLARE_MESSAGE_MAP()
00048 };
00049
00050 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/ServPg.H Source File

  • ole
  • TstCon

ServPg.H

Go to the documentation of this file.
00001 // File: ServPg.H
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #if !defined(AFX_SERVICESPAGE_H__292403FA_0CFF_11D1_8E2F_00C04FB68D60__INCLUDED_)
00011 #define AFX_SERVICESPAGE_H__292403FA_0CFF_11D1_8E2F_00C04FB68D60__INCLUDED_
00012
00013 #if _MSC_VER >= 1000
00014 #pragma once
00015 #endif // _MSC_VER >= 1000
00016 // ServicesPage.H : header file
00017 //
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CServicesPage dialog
00021
00022 class CServicesPage : public CPropertyPage
00023 {
00024   DECLARE_DYNCREATE(CServicesPage)
00025
00026 // Construction
00027 public:
00028   CServicesPage();
00029   ~CServicesPage();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CServicesPage)
00033   enum { IDD = IDD_CONTAINEROPTIONS_SERVICES };
00034   BOOL    m_tSBindHost;
00035   //}}AFX_DATA
00036
00037
00038 // Overrides
00039   // ClassWizard generate virtual function overrides
00040   //{{AFX_VIRTUAL(CServicesPage)
00041   protected:
00042   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00043   //}}AFX_VIRTUAL
00044
00045 // Implementation
00046 protected:
00047   // Generated message map functions
00048   //{{AFX_MSG(CServicesPage)
00049   afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00050   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00051   //}}AFX_MSG
00052   DECLARE_MESSAGE_MAP()
00053
00054 };
00055
00056 //{{AFX_INSERT_LOCATION}}
00057 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00058
00059 #endif // !defined(AFX_SERVICESPAGE_H__292403FA_0CFF_11D1_8E2F_00C04FB68D60__INCLUDED_)
Generated on Sat Nov 23 2024 17:00:28 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CUndoBar Member List

This is the complete list of members for CUndoBar, including all inherited members.
CalcSize(BOOL bVertDock) | CUndoBar | [virtual]
CUndoBar() | CUndoBar |
DoUndo() | CUndoBar |
GetParentButton() const | CUndoBar | [protected]
m_nLabelHeight | CUndoBar | [protected]
m_rectLabel | CUndoBar | [protected]
m_strLabel | CUndoBar | [protected]
m_wndList | CUndoBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CUndoBar | [protected]
OnFillBackground(CDC *pDC) | CUndoBar | [virtual]
OnSize(UINT nType, int cx, int cy) | CUndoBar | [protected]
SetLabel(const CString &strLabel) | CUndoBar |
~CUndoBar() | CUndoBar | [virtual]
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CAutoClik Member List

This is the complete list of members for CAutoClik, including all inherited members.
GetPosition() | CAutoClik
GetPosition() | CAutoClik
GetText() | CAutoClik
GetText() | CAutoClik
GetX() | CAutoClik
GetX() | CAutoClik
GetY() | CAutoClik
GetY() | CAutoClik
RefreshWindow() | CAutoClik
RefreshWindow() | CAutoClik
SetAllProps(short x, short y, LPCTSTR text) | CAutoClik
SetAllProps(short x, short y, LPCTSTR text) | CAutoClik
SetPosition(LPDISPATCH) | CAutoClik
SetPosition(LPDISPATCH) | CAutoClik
SetText(LPCTSTR) | CAutoClik
SetText(LPCTSTR) | CAutoClik
SetX(short) | CAutoClik
SetX(short) | CAutoClik
SetY(short) | CAutoClik
SetY(short) | CAutoClik
ShowWindow() | CAutoClik
ShowWindow() | CAutoClik
Generated on Sat Nov 23 2024 17:00:52 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/inproc/varmap.cpp Source File

  • ole
  • inproc

varmap.cpp

Go to the documentation of this file.
00001 // varmap.cpp : implementation file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "inproc.h"
00014 #include "enumvar.h"
00015 #include "varassoc.h"
00016 #include "varmap.h"
00017
00018 #ifdef _DEBUG
00019 #undef THIS_FILE
00020 static char BASED_CODE THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CVariantMap
00025
00026 IMPLEMENT_DYNCREATE(CVariantMap, CCmdTarget)
00027
00028 CVariantMap::CVariantMap()
00029 {
00030   EnableAutomation();
00031
00032   // To keep the application running as long as an OLE automation
00033   //  object is active, the constructor calls AfxOleLockApp.
00034
00035   AfxOleLockApp();
00036 }
00037
00038 CVariantMap::~CVariantMap()
00039 {
00040   // To terminate the application when all objects created with
00041   //  with OLE automation, the destructor calls AfxOleUnlockApp.
00042
00043   AfxOleUnlockApp();
00044 }
00045
00046 void CVariantMap::OnFinalRelease()
00047 {
00048   // When the last reference for an automation object is released
00049   //  OnFinalRelease is called.  This implementation deletes the
00050   //  object.  Add additional cleanup required for your object before
00051   //  deleting it from memory.
00052
00053   delete this;
00054 }
00055
00056 BEGIN_MESSAGE_MAP(CVariantMap, CCmdTarget)
00057   //{{AFX_MSG_MAP(CVariantMap)
00058     // NOTE - the ClassWizard will add and remove mapping macros here.
00059   //}}AFX_MSG_MAP
00060 END_MESSAGE_MAP()
00061
00062 // {7ACE7860-9A1C-11cd-9A90-00DD01113F12}
00063 IMPLEMENT_OLECREATE(CVariantMap, "mfc.inproc.varmap",
00064   0x7ace7860, 0x9a1c, 0x11cd, 0x9a, 0x90, 0x0, 0xdd, 0x1, 0x11, 0x3f, 0x12);
00065
00066 BEGIN_DISPATCH_MAP(CVariantMap, CCmdTarget)
00067   //{{AFX_DISPATCH_MAP(CVariantMap)
00068   DISP_PROPERTY(CVariantMap, "str1", m_str1, VT_BSTR)
00069   DISP_PROPERTY(CVariantMap, "i1", m_i1, VT_I4)
00070   DISP_PROPERTY_EX(CVariantMap, "str2", GetStr2, SetStr2, VT_BSTR)
00071   DISP_PROPERTY_EX(CVariantMap, "i2", GetI2, SetI2, VT_I4)
00072   DISP_PROPERTY_EX(CVariantMap, "Count", GetCount, SetNotSupported, VT_I4)
00073   DISP_FUNCTION(CVariantMap, "SetAt", SetAt, VT_EMPTY, VTS_VARIANT VTS_VARIANT)
00074   DISP_FUNCTION(CVariantMap, "RemoveAll", RemoveAll, VT_EMPTY, VTS_NONE)
00075   DISP_FUNCTION(CVariantMap, "RemoveKey", RemoveKey, VT_EMPTY, VTS_VARIANT)
00076   DISP_FUNCTION(CVariantMap, "IsEmpty", IsEmpty, VT_BOOL, VTS_NONE)
00077   DISP_PROPERTY_PARAM(CVariantMap, "Item", GetItem, SetNotSupported, VT_VARIANT, VTS_VARIANT)
00078   //}}AFX_DISPATCH_MAP
00079   DISP_PROPERTY_EX_ID(CVariantMap, "_NewEnum", DISPID_NEWENUM, GetNewEnum, SetNotSupported, VT_UNKNOWN)
00080   DISP_DEFVALUE(CVariantMap, "Item")
00081 END_DISPATCH_MAP()
00082
00083 // {747205C0-F9F0-11cd-8C3D-00AA004BB3B7}
00084 static const IID IID_IVariantMap = { 0x747205c0, 0xf9f0, 0x11cd,
00085   { 0x8c, 0x3d, 0x0, 0xaa, 0x0, 0x4b, 0xb3, 0xb7 } };
00086
00087 // Note: we add support for IID_IVariantMap to support typesafe binding
00088 // from VBA.  This IID must match the GUID that is attached to the
00089 // dispinterface in the .ODL file.
00090
00091 BEGIN_INTERFACE_MAP(CVariantMap, CCmdTarget)
00092   INTERFACE_PART(CVariantMap, IID_IVariantMap, Dispatch)
00093 END_INTERFACE_MAP()
00094
00095 /////////////////////////////////////////////////////////////////////////////
00096 // CVariantMap message handlers
00097
00098 LPUNKNOWN CVariantMap::GetNewEnum()
00099 {
00100   #pragma warning (suppress: 6211)
00101   CEnumVariant* pEnum = new CEnumVariant;
00102   int nCount = (int)m_map.GetCount();
00103   #pragma warning (suppress: 6211)
00104   VARIANT* pContents = new VARIANT[nCount];
00105   unsigned int i = 0;
00106
00107   TRY
00108   {
00109     POSITION pos = m_map.GetStartPosition();
00110     while (pos != NULL)
00111     {
00112       ASSERT(i < (unsigned int)nCount);
00113
00114       // get next value from the map and create a CVariantAssoc from it
00115       #pragma warning (suppress: 6014)
00116       CVariantAssoc* pAssoc = new CVariantAssoc;
00117       m_map.GetNextAssoc(pos, pAssoc->m_varKey, pAssoc->m_varValue);
00118
00119       // stuff it into a variant
00120       pContents[i].pdispVal = pAssoc->GetIDispatch(FALSE);
00121       pContents[i].vt = VT_DISPATCH;
00122       ++i;
00123     }
00124   }
00125   CATCH_ALL(e)
00126   {
00127     while (--i >= 0)
00128       VariantClear(&pContents[i]);
00129     delete [] pContents;
00130
00131     THROW_LAST();
00132   }
00133   END_CATCH_ALL
00134   pEnum->SetContents(pContents, nCount);
00135
00136   return pEnum->GetInterface(&IID_IUnknown);
00137 }
00138
00139 void CVariantMap::SetAt(const VARIANT FAR& from, const VARIANT FAR& to)
00140 {
00141   m_map.SetAt(from, to);
00142 }
00143
00144 VARIANT CVariantMap::GetItem(const VARIANT FAR& from)
00145 {
00146   COleVariant varResult;
00147   m_map.Lookup(from, varResult);
00148   return varResult.Detach();
00149 }
00150
00151 void CVariantMap::RemoveAll()
00152 {
00153   m_map.RemoveAll();
00154 }
00155
00156 void CVariantMap::RemoveKey(const VARIANT FAR& key)
00157 {
00158   m_map.RemoveKey(key);
00159 }
00160
00161 long CVariantMap::GetCount()
00162 {
00163   return (long)m_map.GetCount();
00164 }
00165
00166 BOOL CVariantMap::IsEmpty()
00167 {
00168   return m_map.IsEmpty();
00169 }
00170
00171 BSTR CVariantMap::GetStr2()
00172 {
00173   return m_str2.AllocSysString();
00174 }
00175
00176 void CVariantMap::SetStr2(LPCTSTR lpszNewValue)
00177 {
00178   m_str2 = lpszNewValue;
00179 }
00180
00181 long CVariantMap::GetI2()
00182 {
00183   return m_i2;
00184 }
00185
00186 void CVariantMap::SetI2(long nNewValue)
00187 {
00188   m_i2 = nNewValue;
00189 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/StdAfx.cpp Source File

  • vc2008fp
  • OutlookMultiViews

StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  OutlookMultiViews.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookDemo/OutlookDemo.h Source File

  • vc2008fp
  • OutlookDemo

OutlookDemo.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 #ifndef __AFXWIN_H__
00013 #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 #include "resource.h"       // main symbols
00017
00018 /////////////////////////////////////////////////////////////////////////////
00019 // COutlookDemoApp:
00020 // See OutlookDemo.cpp for the implementation of this class
00021 //
00022
00023 class COutlookDemoApp : public CWinAppEx
00024 {
00025 public:
00026   COutlookDemoApp();
00027
00028   virtual void PreLoadState();
00029
00030   enum OUTLOOK_FRAME
00031   {
00032     MainFrame, MailFrame
00033   };
00034
00035   void SetActiveFrame(OUTLOOK_FRAME frame);
00036
00037 // Overrides
00038 public:
00039   virtual BOOL InitInstance();
00040   virtual int ExitInstance();
00041
00042 // Implementation
00043   afx_msg void OnAppAbout();
00044   afx_msg void OnViewAppLook();
00045
00046   DECLARE_MESSAGE_MAP()
00047 };
00048
00049 extern COutlookDemoApp theApp;
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCollectDoc Member List

This is the complete list of members for CCollectDoc, including all inherited members.
CCollectDoc() | CCollectDoc | [protected]
DeleteContents() | CCollectDoc | [virtual]
m_dwArray | CCollectDoc |
m_intList | CCollectDoc |
m_mapDWordToMyStruct | CCollectDoc |
m_mapStringToMyObject | CCollectDoc |
m_mapStringToString | CCollectDoc |
m_myobArray | CCollectDoc |
m_mystructList | CCollectDoc |
m_ptArray | CCollectDoc |
m_stringList | CCollectDoc |
OnNewDocument() | CCollectDoc | [protected, virtual]
Serialize(CArchive &ar) | CCollectDoc | [virtual]
~CCollectDoc() | CCollectDoc | [virtual]
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/DllScreenCap/DllScreenCap.h Source File

  • advanced
  • DllScreenCap
  • DllScreenCap

DllScreenCap.h

Go to the documentation of this file.
00001 // DllScreenCap.h : main header file for the DllScreenCap DLL
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"   // main symbols
00018
00019
00020 // CDllScreenCapApp
00021 // See DllScreenCap.cpp for the implementation of this class
00022 //
00023
00024 class CDllScreenCapApp : public CWinApp
00025 {
00026 public:
00027   CDllScreenCapApp();
00028
00029 // Overrides
00030 public:
00031   virtual BOOL InitInstance();
00032
00033   DECLARE_MESSAGE_MAP()
00034 };
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

COwnerDrawDescrProp Member List

This is the complete list of members for COwnerDrawDescrProp, including all inherited members.
COwnerDrawDescrProp(const CString &strName, const COleVariant &varValue) | COwnerDrawDescrProp |
OnDrawDescription(CDC *pDC, CRect rect) | COwnerDrawDescrProp | [protected, virtual]
Generated on Sat Nov 23 2024 17:01:04 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/modeless/modeldlg.cpp Source File

  • general
  • modeless

modeldlg.cpp

Go to the documentation of this file.
00001 // modeldlg.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "modeless.h"
00015 #include "adderdlg.h"
00016 #include "modeldlg.h"
00017
00018 #ifdef _debug
00019 #undef this_file
00020 static char based_code THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CAboutDlg dialog used for App About
00025
00026 class CAboutDlg : public CDialog
00027 {
00028 public:
00029   CAboutDlg();
00030
00031 // Dialog Data
00032   //{{AFX_DATA(CAboutDlg)
00033   enum { IDD = IDD_ABOUTBOX };
00034   //}}AFX_DATA
00035
00036 // Implementation
00037 protected:
00038   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00039   //{{AFX_MSG(CAboutDlg)
00040   //}}AFX_MSG
00041   DECLARE_MESSAGE_MAP()
00042 };
00043
00044 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00045 {
00046   //{{AFX_DATA_INIT(CAboutDlg)
00047   //}}AFX_DATA_INIT
00048 }
00049
00050 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00051 {
00052   CDialog::DoDataExchange(pDX);
00053   //{{AFX_DATA_MAP(CAboutDlg)
00054   //}}AFX_DATA_MAP
00055 }
00056
00057 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00058   //{{AFX_MSG_MAP(CAboutDlg)
00059     // No message handlers
00060   //}}AFX_MSG_MAP
00061 END_MESSAGE_MAP()
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CMainDlg dialog
00065
00066 CMainDlg::CMainDlg(CWnd* pParent /*=NULL*/)
00067   : CDialog(CMainDlg::IDD, pParent)
00068 {
00069   //{{AFX_DATA_INIT(CMainDlg)
00070     // NOTE: the ClassWizard will add member initialization here
00071   //}}AFX_DATA_INIT
00072   // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
00073   m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00074   m_pModeless = NULL;
00075 }
00076
00077 void CMainDlg::DoDataExchange(CDataExchange* pDX)
00078 {
00079   CDialog::DoDataExchange(pDX);
00080   //{{AFX_DATA_MAP(CMainDlg)
00081     // NOTE: the ClassWizard will add DDX and DDV calls here
00082   //}}AFX_DATA_MAP
00083 }
00084
00085 BEGIN_MESSAGE_MAP(CMainDlg, CDialog)
00086   //{{AFX_MSG_MAP(CMainDlg)
00087   ON_WM_SYSCOMMAND()
00088   ON_WM_PAINT()
00089   ON_WM_QUERYDRAGICON()
00090   //}}AFX_MSG_MAP
00091 END_MESSAGE_MAP()
00092
00093 /////////////////////////////////////////////////////////////////////////////
00094 // CMainDlg message handlers
00095
00096 BOOL CMainDlg::OnInitDialog()
00097 {
00098   CDialog::OnInitDialog(  );
00099
00100   // Add "About..." menu item to system menu.
00101
00102   // IDM_ABOUTBOX must be in the system command range.
00103   ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
00104   ASSERT(IDM_ABOUTBOX < 0xF000);
00105
00106   CMenu* pSysMenu = GetSystemMenu(FALSE);
00107   CString strAboutMenu;
00108   strAboutMenu.LoadString(IDS_ABOUTBOX);
00109   if (!strAboutMenu.IsEmpty())
00110   {
00111     pSysMenu->AppendMenu(MF_SEPARATOR);
00112     pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
00113   }
00114
00115   // TODO: Add extra initialization here
00116
00117   return TRUE;  // return TRUE  unless you set the focus to a control
00118 }
00119
00120 void CMainDlg::OnSysCommand(UINT nID, LPARAM lParam)
00121 {
00122   if ((nID & 0xFFF0) == IDM_ABOUTBOX)
00123   {
00124     CAboutDlg dlgAbout;
00125     dlgAbout.DoModal();
00126   }
00127   else
00128   {
00129     CDialog::OnSysCommand(nID, lParam);
00130   }
00131 }
00132
00133 // If you add a minimize button to your dialog, you will need the code below
00134 //  to draw the icon.  For MFC applications using the document/view model,
00135 //  this is automatically done for you by the framework.
00136
00137 void CMainDlg::OnPaint()
00138 {
00139   if (IsIconic())
00140   {
00141     CPaintDC dc(this); // device context for painting
00142
00143     SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
00144
00145     // Center icon in client rectangle
00146     int cxIcon = GetSystemMetrics(SM_CXICON);
00147     int cyIcon = GetSystemMetrics(SM_CYICON);
00148     CRect rect;
00149     GetClientRect(&rect);
00150     int x = (rect.Width() - cxIcon + 1) / 2;
00151     int y = (rect.Height() - cyIcon + 1) / 2;
00152
00153     // Draw the icon
00154     dc.DrawIcon(x, y, m_hIcon);
00155   }
00156   else
00157   {
00158     CDialog::OnPaint();
00159   }
00160 }
00161
00162 // The system calls this to obtain the cursor to display while the user drags
00163 //  the minimized window.
00164 HCURSOR CMainDlg::OnQueryDragIcon()
00165 {
00166   return (HCURSOR) m_hIcon;
00167 }
00168
00169 void CMainDlg::OnOK()
00170 {
00171   // if our modeless child isn't already up, create it and display it
00172   // otherwise, just set focus to it
00173
00174   if (m_pModeless == NULL)
00175   {
00176     m_pModeless = new CAdderDialog(this);
00177     if (m_pModeless->Create() == TRUE)
00178       GetDlgItem(IDOK)->EnableWindow(FALSE);
00179   }
00180   else
00181     m_pModeless->SetActiveWindow();
00182 }
00183
00184
00185 void CMainDlg::BoxDone()
00186 {
00187   // this function is called by the modeless dialog as it terminates
00188   // just reset our pushbutton to be enabled again.
00189   // I _don't_ delete the MFC CDialog object because the dialog's own
00190   // code will do that.
00191
00192   m_pModeless = NULL;
00193   // don't delete m_pModeless; !
00194   GetDlgItem(IDOK)->EnableWindow();
00195 }
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/PaletteDemo/MainFrm.h Source File

  • vc2008fp
  • PaletteDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #include "ToolsPalette.h"
00014
00015 class CMainFrame : public CFrameWndEx
00016 {
00017
00018 protected: // create from serialization only
00019   CMainFrame();
00020   DECLARE_DYNCREATE(CMainFrame)
00021
00022 // Attributes
00023 public:
00024
00025 // Operations
00026 public:
00027
00028 // Overrides
00029   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00030
00031 // Implementation
00032 public:
00033   virtual ~CMainFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 protected:  // control bar embedded members
00040   CMFCMenuBar m_wndMenuBar;
00041   CMFCStatusBar m_wndStatusBar;
00042   CMFCToolBar m_wndToolBar;
00043   CToolsPalette m_wndPalette;
00044
00045 protected:
00046   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00047   afx_msg void OnViewToolsPalette();
00048   afx_msg void OnUpdateViewToolsPalette(CCmdUI* pCmdUI);
00049   afx_msg void OnTwoColumns();
00050   afx_msg void OnUpdateTwoColumns(CCmdUI* pCmdUI);
00051   afx_msg void OnThreeColumns();
00052   afx_msg void OnUpdateThreeColumns(CCmdUI* pCmdUI);
00053   afx_msg void OnFourColumns();
00054   afx_msg void OnUpdateFourColumns(CCmdUI* pCmdUI);
00055   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00056   afx_msg void OnViewCustomize();
00057
00058   DECLARE_MESSAGE_MAP()
00059
00060   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00061 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/resource.h Source File

  • general
  • snapvw

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by snapvw.rc
00004 //
00005 #define IDD_ABOUTBOX                    100
00006 #define IDD_SNAP_FORM                   101
00007 #define IDD_DINNER                      106
00008 #define IDD_BREAKFAST                   108
00009 #define IDD_LUNCH                       109
00010 #define IDR_MAINFRAME                   128
00011 #define IDR_SNAPTYPE                    129
00012 #define IDC_HOT_TEA                     1001
00013 #define IDC_COFFEE                      1002
00014 #define IDC_ORANGE_JUICE                1003
00015 #define IDC_PRUNE_JUICE                 1004
00016 #define IDC_PRUNE_JUICE2                1005
00017 #define IDC_CONTINENTAL                 1006
00018 #define IDC_AMERICAN                    1007
00019 #define IDC_CONTINENTAL2                1008
00020 #define IDC_FINANCE                     1010
00021 #define IDC_HOCKEY                      1011
00022 #define IDC_SODA                        1012
00023 #define IDC_MILK                        1013
00024 #define IDC_GREASY                      1014
00025 #define IDC_HEALTHY                     1015
00026 #define IDC_NERDY                       1016
00027 #define IDC_TABLOID                     1017
00028 #define IDC_BEER                        1018
00029 #define IDC_ROMANTIC                    1019
00030 #define IDC_NEIGHBOR                    1020
00031 #define IDC_TABLOID2                    1021
00032 #define IDC_COFFEE1                     1022
00033 #define IDC_GREASY2                     1023
00034 #define IDS_CHILDWND_TITLE              131
00035
00036 // Next default values for new objects
00037 //
00038 #ifdef APSTUDIO_INVOKED
00039 #ifndef APSTUDIO_READONLY_SYMBOLS
00040 #define _APS_3D_CONTROLS                     1
00041 #define _APS_NEXT_RESOURCE_VALUE        132
00042 #define _APS_NEXT_COMMAND_VALUE         32771
00043 #define _APS_NEXT_CONTROL_VALUE         1024
00044 #define _APS_NEXT_SYMED_VALUE           101
00045 #endif
00046 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/WordPad/buttondi.cpp Source File

  • vc2008fp
  • WordPad

buttondi.cpp

Go to the documentation of this file.
00001 //
00002 // buttondi.cpp : implementation file
00003 //
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (C) 1992-1998 Microsoft Corporation
00006 // All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and related
00010 // electronic documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #include "stdafx.h"
00015 #include "resource.h"
00016 #include "buttondi.h"
00017 #include "strings.h"
00018 #include "wordpad.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 #ifndef DS_CONTEXTHELP
00026 #define DS_CONTEXTHELP 0x2000L
00027 #endif
00028
00029 static const int nFontSize = 10;
00030
00031 /////////////////////////////////////////////////////////////////////////////
00032 // CButtonDialog dialog
00033
00034 int CButtonDialog::DisplayMessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption,
00035   LPCTSTR lpszButtons, WORD wStyle, int nDef, int nCancel,
00036   DWORD* pHelpIDs, CWnd* pParentWnd)
00037 {
00038   CButtonDialog dlg(lpszText, lpszCaption, lpszButtons, wStyle, pHelpIDs,
00039     pParentWnd);
00040   dlg.SetDefault(nDef);
00041   dlg.SetCancel(nCancel);
00042   return (int) dlg.DoModal();
00043 }
00044
00045 CButtonDialog::CButtonDialog(LPCTSTR lpszText, LPCTSTR lpszCaption,
00046   LPCTSTR lpszButtons, WORD wStyle, DWORD* pHelpIDs ,
00047   CWnd* pParentWnd) : CCSDialog()
00048 {
00049
00050   ASSERT(lpszText != NULL);
00051   ASSERT(lpszCaption != NULL);
00052   if (HIWORD(lpszText) == NULL)
00053     VERIFY(m_strText.LoadString(LOWORD((UINT_PTR)lpszText)));
00054   else
00055     m_strText = lpszText;
00056   if (HIWORD(lpszCaption) == NULL)
00057     VERIFY(m_strCaption.LoadString(LOWORD((UINT_PTR)lpszCaption)));
00058   else
00059     m_strCaption = lpszCaption;
00060   if (lpszButtons != NULL)
00061     AddButtons(lpszButtons);
00062
00063   m_pParentWnd = pParentWnd;
00064   m_nDefButton = 0;
00065   m_nCancel = -1;
00066   m_pButtons = NULL;
00067   m_wStyle = wStyle;
00068   m_nBaseID = nFontSize; // don't use IDOK, IDCANCEL, etc
00069   m_hDlgTmp = NULL;
00070
00071   LOGFONT lf;
00072   memcpy(&lf, &theApp.m_lf, sizeof(LOGFONT));
00073   lf.lfHeight = -nFontSize;
00074   lf.lfWidth = 0;
00075   lf.lfWeight = FW_NORMAL;
00076   VERIFY(m_font.CreateFontIndirect(&lf));
00077
00078 //  m_font.CreateFont(-nFontSize, 0, 0, 0, FW_NORMAL, FALSE, FALSE,
00079 //      FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
00080 //      DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, szFontName);
00081   m_pHelpIDs = pHelpIDs;
00082 }
00083
00084 CButtonDialog::~CButtonDialog()
00085 {
00086   delete [] m_pButtons;
00087   if (m_hDlgTmp != NULL)
00088     GlobalFree(m_hDlgTmp);
00089 }
00090
00091 BEGIN_MESSAGE_MAP(CButtonDialog, CCSDialog)
00092   //{{AFX_MSG_MAP(CButtonDialog)
00093   ON_WM_CREATE()
00094   //}}AFX_MSG_MAP
00095 END_MESSAGE_MAP()
00096
00097 /////////////////////////////////////////////////////////////////////////////
00098 // CButtonDialog message handlers
00099
00100 int CButtonDialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
00101 {
00102   if (m_pHelpIDs != NULL)
00103   {
00104     for (int i=0;i<m_strArray.GetSize();i++)
00105       m_pHelpIDs[i*2] = i+m_nBaseID;
00106   }
00107   if (CCSDialog::OnCreate(lpCreateStruct) == -1)
00108     return -1;
00109
00110   SetWindowText(m_strCaption);
00111   m_pButtons = new CButton[m_strArray.GetSize()];
00112
00113   CRect rect(0, 0, 10, 10);
00114   if (!m_staticIcon.Create(NULL,
00115     SS_ICON | WS_GROUP | WS_CHILD | WS_VISIBLE, rect, this))
00116   {
00117     return -1;
00118   }
00119   m_staticIcon.SetIcon(::LoadIcon(NULL, GetIconID(m_wStyle)));
00120
00121   if (!m_staticText.Create(m_strText, SS_LEFT | SS_NOPREFIX | WS_GROUP |
00122     WS_CHILD | WS_VISIBLE, rect, this))
00123   {
00124     return -1;
00125   }
00126   m_staticText.SetFont(&m_font);
00127
00128   for (int i=0;i<m_strArray.GetSize();i++)
00129   {
00130     if (!m_pButtons[i].Create(m_strArray[i], WS_TABSTOP | WS_CHILD |
00131       WS_VISIBLE | ((i == 0) ? WS_GROUP : 0) |
00132       ((i == m_nDefButton) ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON),
00133       rect, this, i+m_nBaseID))
00134     {
00135       return -1;
00136     }
00137     m_pButtons[i].SetFont(&m_font);
00138   }
00139   PositionControls();
00140   return 0;
00141 }
00142
00143 BOOL CButtonDialog::OnInitDialog()
00144 {
00145   CCSDialog::OnInitDialog();
00146   if (m_pHelpIDs == NULL) // no context help
00147     ModifyStyleEx(WS_EX_CONTEXTHELP, 0); //remove
00148
00149   m_pButtons[m_nDefButton].SetFocus();
00150   return FALSE;  // return TRUE  unless you set the focus to a control
00151 }
00152
00153 /////////////////////////////////////////////////////////////////////////////
00154 // CButtonDialog operations
00155
00156 void CButtonDialog::AddButtons(LPCTSTR lpszButton)
00157 {
00158   CString str, strButtons;
00159   int i=0;
00160   if (HIWORD(lpszButton) == NULL)
00161   {
00162     BOOL bValidString;
00163     bValidString = strButtons.LoadString(LOWORD((UINT_PTR)lpszButton));
00164     ASSERT(bValidString);
00165   }
00166   else
00167   {
00168     strButtons = lpszButton;
00169   }
00170
00171   while (AfxExtractSubString(str, strButtons, i++, '\n'))
00172   {
00173     AddButton(str);
00174   }
00175 }
00176
00177 #ifndef DS_3DLOOK
00178 #define DS_3DLOOK 0x4
00179 #endif
00180
00181 void CButtonDialog::FillInHeader(LPDLGTEMPLATE lpDlgTmp)
00182 {
00183   USES_CONVERSION;
00184   lpDlgTmp->style = DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU;
00185   if (theApp.m_bWin4)
00186     lpDlgTmp->style |= DS_CONTEXTHELP;
00187   lpDlgTmp->dwExtendedStyle = 0;
00188   lpDlgTmp->cdit = 0;
00189   lpDlgTmp->x = 0;
00190   lpDlgTmp->y = 0;
00191   lpDlgTmp->cx = 100;
00192   lpDlgTmp->cy = 100;
00193
00194   LPWSTR lpStr = (LPWSTR)(lpDlgTmp + 1); /* Move ptr to the variable fields */
00195
00196   *lpStr++ = 0;  /* No Menu resource for Message Box */
00197   *lpStr++ = 0;  /* No Class name for MessageBox */
00198
00199   int nLen = m_strCaption.GetLength();
00200   wcscpy(lpStr, T2CW(m_strCaption));
00201
00202   lpStr += nLen+1;
00203   WORD* pWord = (WORD*)lpStr;
00204   *pWord = 10; // 10 pt font
00205   pWord++;
00206   lpStr = (LPWSTR) pWord;
00207
00208   wcscpy(lpStr, T2W(theApp.m_lf.lfFaceName));
00209 }
00210
00211 /////////////////////////////////////////////////////////////////////////////
00212 // CButtonDialog overridables
00213
00214 BOOL CButtonDialog::OnCommand(WPARAM wParam, LPARAM /*lParam*/)
00215 {
00216   if (wParam == IDCANCEL && m_nCancel != -1)
00217   {
00218     EndDialog(m_nCancel);
00219     return TRUE;
00220   }
00221   if (::GetDlgItem(m_hWnd, (int)wParam)==NULL)
00222     return FALSE;
00223   EndDialog((int)wParam-m_nBaseID);
00224   return TRUE;
00225 }
00226
00227 INT_PTR CButtonDialog::DoModal()
00228 {
00229   ASSERT(m_strArray.GetSize() != 0);
00230   if (m_strArray.GetSize() == 0)
00231     return (m_nCancel != -1) ? m_nCancel : 0;
00232
00233   // compute size of header
00234   // Fixed portions of DLG template header = sizeof(DLGTEMPLATE);
00235   // One null byte for menu name and one for class name = 2
00236   // Caption text plus NULL = m_strCaption.GetLength()+1
00237   int nSize = sizeof(DLGTEMPLATE);
00238   nSize += (2 + m_strCaption.GetLength()+1+lstrlen(theApp.m_lf.lfFaceName)+1)*2 +sizeof(WORD);
00239   m_hDlgTmp = GlobalAlloc(GPTR, nSize);
00240   if (m_hDlgTmp == NULL)
00241     return IDCANCEL;
00242   LPDLGTEMPLATE lpDlgTmp = (LPDLGTEMPLATE)GlobalLock(m_hDlgTmp);
00243   FillInHeader(lpDlgTmp);
00244   GlobalUnlock(m_hDlgTmp);
00245   InitModalIndirect(m_hDlgTmp);
00246
00247   return CCSDialog::DoModal();
00248 }
00249
00250 /////////////////////////////////////////////////////////////////////////////
00251 // CButtonDialog implementation
00252
00253 void CButtonDialog::PositionControls()
00254 {
00255   CSize sizeBase = GetBaseUnits();
00256   int nButtonHeight = (sizeBase.cy*14)/8;
00257   int nHeight = 0;
00258   int nSep,nLeftMargin,nRightMargin,nTopMargin,nBottomMargin;
00259   int nButtonAdj;
00260   int nWidth = 0;
00261   int i = 0;
00262   CRect rectText;
00263
00264   // a) 5/8 screen Width
00265   // b) Caption
00266   // c) nLeftMargin ICON nSep TEXT nRightMargin
00267   // d) nLeftMargin Button1 nSep Button2 ... nRightMargin
00268   // client width is max(b,d, min(c,a))
00269
00270   CSize sizeIcon(GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON));
00271   nSep = sizeIcon.cx/2;
00272   nLeftMargin = nSep;
00273   nRightMargin = nSep;
00274   nTopMargin = nSep;
00275   nBottomMargin = nSep;
00276
00277   CClientDC dc(this);
00278   CFont* pOldFont = dc.SelectObject(&m_font);
00279
00280   nButtonAdj = dc.GetTextExtent(_T("XXX"),3).cx; // padding on buttons
00281
00282   int nScreenWidth58 = dc.GetDeviceCaps(HORZRES)*5/8;
00283   int nCaptionWidth = dc.GetTextExtent(m_strCaption, m_strCaption.
00284     GetLength()).cx;
00285   CSize sizeText = dc.GetTextExtent(m_strText,m_strText.GetLength());
00286   int nTextIconWidth = nLeftMargin+sizeIcon.cx+nSep+sizeText.cx+nRightMargin;
00287   int nButtons = (int)m_strArray.GetSize();
00288   int nButtonsWidth = nLeftMargin+nRightMargin+(nButtons-1)*nSep;
00289   for (i=0;i<nButtons;i++)
00290   {
00291     nButtonsWidth +=
00292       dc.GetTextExtent(m_strArray[i],m_strArray[i].GetLength()).cx+
00293       nButtonAdj*2;
00294   }
00295
00296   nWidth = min(nTextIconWidth,nScreenWidth58);
00297   nWidth = max(nWidth, nCaptionWidth);
00298   nWidth = max(nWidth, nButtonsWidth);
00299
00300   m_staticIcon.SetWindowPos(NULL, nLeftMargin, nTopMargin, sizeIcon.cx,
00301     sizeIcon.cy, SWP_NOZORDER);
00302
00303   if (sizeText.cx > nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep)
00304   {
00305     sizeText.cx = nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep;
00306 //      int nTextWidth = nWidth-nLeftMargin-nRightMargin-sizeIcon.cx-nSep;
00307 //      rectText.SetRect(0, 0, nTextWidth, 32767);
00308     rectText.SetRect(0, 0, sizeText.cx, 32767);
00309     /* Ask DrawText for the right cy */
00310     sizeText.cy = dc.DrawText(m_strText, m_strText.GetLength(), &rectText,
00311       DT_CALCRECT | DT_WORDBREAK | DT_EXPANDTABS | DT_NOPREFIX);
00312   }
00313
00314   m_staticText.SetWindowPos(NULL, nSep+sizeIcon.cx+nSep, nTopMargin,
00315     sizeText.cx, sizeText.cy, SWP_NOZORDER);
00316
00317   sizeText.cy = max(sizeText.cy, sizeIcon.cy); // at least icon height
00318   nHeight = nTopMargin + sizeText.cy + nSep + nButtonHeight + nBottomMargin;
00319
00320   CRect rect;
00321   rect.left = (nWidth - (nButtonsWidth - nLeftMargin - nRightMargin))/2;
00322   rect.top = nTopMargin + sizeText.cy + nSep;
00323   rect.bottom = rect.top + nButtonHeight;
00324
00325   for (i=0;i<m_strArray.GetSize();i++)
00326   {
00327     rect.right = rect.left + dc.GetTextExtent(m_strArray[i],m_strArray[i].GetLength()).cx +
00328       2*nButtonAdj;
00329     m_pButtons[i].MoveWindow(&rect);
00330     rect.left = rect.right + nSep;
00331   }
00332
00333   rect.SetRect(0,0,nWidth,nHeight);
00334   CalcWindowRect(&rect);
00335   SetWindowPos(NULL, (dc.GetDeviceCaps(HORZRES)-rect.Width())/2,
00336     (dc.GetDeviceCaps(VERTRES)-rect.Height())/2, rect.Width(), rect.Height(),
00337     SWP_NOZORDER|SWP_NOACTIVATE);
00338   if(m_nCancel == -1) // no cancel button
00339   {
00340 //      CMenu* pMenu = GetSystemMenu(FALSE);
00341 //      if (pMenu != NULL)
00342 //          pMenu->DeleteMenu(SC_CLOSE, MF_BYCOMMAND);
00343   }
00344   dc.SelectObject(pOldFont);
00345 }
00346
00347 CSize CButtonDialog::GetBaseUnits()
00348 {
00349   CDisplayIC dc;
00350   CFont* pFont = dc.SelectObject(&m_font);
00351   TEXTMETRIC tm;
00352   VERIFY(dc.GetTextMetrics(&tm));
00353   dc.SelectObject(pFont);
00354   return CSize(tm.tmAveCharWidth, tm.tmHeight);
00355 }
00356
00357 LPCTSTR CButtonDialog::GetIconID(WORD wFlags)
00358 {
00359   LPCTSTR lpszIcon = NULL;
00360   wFlags &= MB_ICONMASK;
00361   if (wFlags == MB_ICONHAND)
00362     lpszIcon = IDI_HAND;
00363   else if (wFlags == MB_ICONQUESTION)
00364     lpszIcon = IDI_QUESTION;
00365   else if (wFlags == MB_ICONEXCLAMATION)
00366     lpszIcon = IDI_EXCLAMATION;
00367   else if (wFlags == MB_ICONASTERISK)
00368     lpszIcon = IDI_ASTERISK;
00369   return lpszIcon;
00370 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CRebarTestDoc Member List

This is the complete list of members for CRebarTestDoc, including all inherited members.
CRebarTestDoc() | CRebarTestDoc | [protected]
OnNewDocument() | CRebarTestDoc | [virtual]
Serialize(CArchive &ar) | CRebarTestDoc | [virtual]
~CRebarTestDoc() | CRebarTestDoc | [virtual]
Generated on Sat Nov 23 2024 17:01:05 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/childfrm.h Source File

  • ole
  • acdual

childfrm.h

Go to the documentation of this file.
00001 // ChildFrm.h : interface of the CChildFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 /////////////////////////////////////////////////////////////////////////////
00012
00013 class CChildFrame : public CMDIChildWnd
00014 {
00015   DECLARE_DYNCREATE(CChildFrame)
00016 public:
00017   CChildFrame();
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   // ClassWizard generated virtual function overrides
00027   //{{AFX_VIRTUAL(CChildFrame)
00028   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00029   //}}AFX_VIRTUAL
00030
00031 // Implementation
00032 public:
00033   virtual ~CChildFrame();
00034 #ifdef _DEBUG
00035   virtual void AssertValid() const;
00036   virtual void Dump(CDumpContext& dc) const;
00037 #endif
00038
00039 // Generated message map functions
00040 protected:
00041   //{{AFX_MSG(CChildFrame)
00042     // NOTE - the ClassWizard will add and remove member functions here.
00043     //    DO NOT EDIT what you see in these blocks of generated code!
00044   //}}AFX_MSG
00045   DECLARE_MESSAGE_MAP()
00046 };
00047
00048 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/collect/mapdwvw.h Source File

  • advanced
  • collect

mapdwvw.h

Go to the documentation of this file.
00001 // mapdwvw.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013 // CMapDWordToMyStructView form view
00014
00015 #ifndef __AFXEXT_H__
00016 #include <afxext.h>
00017 #endif
00018
00019 class CMapDWordToMyStructView : public CFormView
00020 {
00021 public:
00022   CMapDWordToMyStructView();           // protected constructor used by dynamic creation
00023   DECLARE_DYNCREATE(CMapDWordToMyStructView)
00024
00025 // Form Data
00026 public:
00027   //{{AFX_DATA(CMapDWordToMyStructView)
00028   enum { IDD = IDD_MAP_DWORD_TO_MYSTRUCT };
00029   CListBox    m_ctlList;
00030   int     m_int;
00031   float   m_float;
00032   CString m_str;
00033   DWORD   m_dwKey;
00034   //}}AFX_DATA
00035
00036 // Attributes
00037 public:
00038   CCollectDoc* GetDocument();
00039
00040 // Overrides
00041 public:
00042   void OnInitialUpdate();
00043
00044 // Overrides
00045   // ClassWizard generate virtual function overrides
00046   //{{AFX_VIRTUAL(CMapDWordToMyStructView)
00047   protected:
00048   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00049   //}}AFX_VIRTUAL
00050
00051 // Implementation
00052 protected:
00053   static CString FormatListBoxEntry(DWORD dwKey, CMyStruct* pMyStruct);
00054   int FindKeyInListBox(DWORD dwKey);
00055   void AddMapEntryToListBox(DWORD dwKey, CMyStruct* pMyStruct);
00056   CMyStruct* ConstructMyStructFromView();
00057   void UpdateViewFromMyStruct(CMyStruct* pMyStruct);
00058
00059 protected:
00060   virtual ~CMapDWordToMyStructView();
00061 #ifdef _DEBUG
00062   virtual void AssertValid() const;
00063   virtual void Dump(CDumpContext& dc) const;
00064 #endif
00065
00066   // Generated message map functions
00067   //{{AFX_MSG(CMapDWordToMyStructView)
00068   afx_msg void OnAddOrUpdate();
00069   afx_msg void OnFind();
00070   afx_msg void OnRemove();
00071   afx_msg void OnRemoveAll();
00072   afx_msg void OnSelChangeList();
00073   //}}AFX_MSG
00074   DECLARE_MESSAGE_MAP()
00075 };
00076
00077 #ifndef _DEBUG
00078 inline CCollectDoc* CMapDWordToMyStructView::GetDocument()
00079    { return (CCollectDoc*)m_pDocument; }
00080 #endif
00081
00082 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CCharFormat Member List

This is the complete list of members for CCharFormat, including all inherited members.
CCharFormat() | CCharFormat | [inline]
CCharFormat() | CCharFormat | [inline]
CCharFormat() | CCharFormat | [inline]
operator==(CCharFormat &cf) | CCharFormat |
operator==(CCharFormat &cf) | CCharFormat |
operator==(CCharFormat &cf) | CCharFormat |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CSSE2Surface32Intrinsic Member List

This is the complete list of members for CSSE2Surface32Intrinsic, including all inherited members.
AdjustWidth(int *pWidth) | CSSE2Surface32Intrinsic | [virtual]
BlitBits() | CSurface |
BlurBits() | CSSE2Surface32Intrinsic | [virtual]
ClearBits() | CSurface |
Create(CWnd *pWnd, int nBitDepth) | CSurface |
CSurface() | CSurface | [inline]
Destroy() | CSurface |
GetBitDepth() const | CSurface | [inline]
GetByteDepth() const | CSurface | [inline]
GetImage() | CSurface | [inline]
GetPitch() const | CSurface | [inline]
GetPixelAddress(int x, int y) const | CSurface | [inline]
GetVisibleHeight() const | CSurface | [inline]
GetVisibleWidth() const | CSurface | [inline]
Import(const CImage &image) | CSurface |
IsNull() const | CSurface | [inline]
Line(const CPoint &p1, const CPoint &p2, COLORREF c) | CSurface |
m_kDeltaX | CSurface | [protected, static]
m_kDeltaY | CSurface | [protected, static]
m_qwpl | CSSE2Surface32Intrinsic | [private]
m_width | CSSE2Surface32Intrinsic | [private]
OnCreated() | CSSE2Surface32Intrinsic | [protected, virtual]
PointColor(int x, int y, COLORREF c) | CSurface | [inline]
PointColor(int x, int y) const | CSurface | [inline]
RandomBits() | CSurface |
RandomLine(COLORREF c) | CSurface |
ShiftBits() | CSurface |
StripeBits() | CSurface |
~CSurface() | CSurface | [inline, virtual]
Generated on Sat Nov 23 2024 17:01:08 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: controls/regsvr/resource.h Source File

  • controls
  • regsvr

resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by regsvr.rc
00004 //
00005 // This is a part of the Microsoft Foundation Classes C++ library.
00006 // Copyright (c) Microsoft Corporation.  All rights reserved.
00007 //
00008 // This source code is only intended as a supplement to the
00009 // Microsoft Foundation Classes Reference and the
00010 // Books Online documentation provided with the library.
00011 // See these sources for detailed information regarding the
00012 // Microsoft Foundation Classes product.
00013
00014 #define IDS_USAGE                       1
00015 #define IDS_UNRECOGNIZEDFLAG            2
00016 #define IDS_EXTRAARGUMENT               3
00017 #define IDS_NOPROJECT                   4
00018 #define IDS_NODLLNAME                   5
00019 #define IDS_OLEINITFAILED               6
00020 #define IDS_LOADLIBFAILED               7
00021 #define IDS_NOTDLLOROCX                 8
00022 #define IDS_NOENTRYPOINT                9
00023 #define IDS_CALLFAILED                  10
00024 #define IDS_CALLSUCCEEDED               11
00025
00026 // Next default values for new objects
00027 //
00028 #ifdef APSTUDIO_INVOKED
00029 #ifndef APSTUDIO_READONLY_SYMBOLS
00030 #define _APS_NEXT_RESOURCE_VALUE        101
00031 #define _APS_NEXT_COMMAND_VALUE         40001
00032 #define _APS_NEXT_CONTROL_VALUE         1000
00033 #define _APS_NEXT_SYMED_VALUE           101
00034 #endif
00035 #endif
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/tlbtree.cpp Source File

  • ole
  • oleview
  • iviewers

tlbtree.cpp

Go to the documentation of this file.
00001 // tlbtree.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "iview.h"
00015 #include "util.h"
00016 #include "iviewers.h"
00017 #include "iviewer.h"
00018 #include "typelib.h"
00019 #include "tlbtree.h"
00020
00021 #ifdef _DEBUG
00022 #undef THIS_FILE
00023 static char BASED_CODE THIS_FILE[] = __FILE__;
00024 #endif
00025
00026 #define MAX_NAMES   256
00027
00028 /////////////////////////////////////////////////////////////////////////////
00029 // CTypeLibTreeView
00030 IMPLEMENT_DYNCREATE(CTypeLibTreeView, CView)
00031
00032 CTypeLibTreeView::CTypeLibTreeView( )
00033 {
00034   m_hTypeInfos = NULL ;
00035   m_ptlb = NULL ;
00036 }
00037
00038 CTypeLibTreeView::~CTypeLibTreeView()
00039 {
00040   if (m_ptlb)
00041     m_ptlb->Release() ;
00042 }
00043
00044
00045 BEGIN_MESSAGE_MAP(CTypeLibTreeView, CView)
00046   //{{AFX_MSG_MAP(CTypeLibTreeView)
00047   ON_WM_CREATE()
00048   ON_WM_DESTROY()
00049   ON_WM_SIZE()
00050   //}}AFX_MSG_MAP
00051   ON_NOTIFY(TVN_SELCHANGED, ID_TREEVIEW, OnTreeSelchanged)
00052   ON_NOTIFY(TVN_ITEMEXPANDING, ID_TREEVIEW, OnTreeItemExpanding)
00053   ON_NOTIFY(TVN_ITEMEXPANDED, ID_TREEVIEW, OnTreeItemExpanded)
00054   ON_NOTIFY(NM_RETURN, ID_TREEVIEW, OnTreeItemReturn)
00055   ON_NOTIFY(TVN_DELETEITEM, ID_TREEVIEW, OnTreeDeleteItem)
00056 END_MESSAGE_MAP()
00057
00058
00059 /////////////////////////////////////////////////////////////////////////////
00060 // CTypeLibTreeView drawing
00061
00062
00063 /////////////////////////////////////////////////////////////////////////////
00064 // CTypeLibTreeView diagnostics
00065
00066 #ifdef _DEBUG
00067 void CTypeLibTreeView::AssertValid() const
00068 {
00069   CView::AssertValid();
00070 }
00071
00072 void CTypeLibTreeView::Dump(CDumpContext& dc) const
00073 {
00074   CView::Dump(dc);
00075 }
00076 #endif //_DEBUG
00077
00078 /////////////////////////////////////////////////////////////////////////////
00079 // CTypeLibTreeView message handlers
00080
00081 int CTypeLibTreeView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00082 {
00083   if (CView::OnCreate(lpCreateStruct) == -1)
00084     return -1;
00085
00086   RECT rect ;
00087   rect.top = lpCreateStruct->y ;
00088   rect.left = lpCreateStruct->x ;
00089   rect.bottom = lpCreateStruct->cy ;
00090   rect.right = lpCreateStruct->cx ;
00091
00092   if (!m_tree.Create( WS_CHILD | WS_VISIBLE |
00093                 WS_BORDER |
00094                 TVS_HASLINES |
00095                 TVS_LINESATROOT |
00096                 TVS_SHOWSELALWAYS |
00097                 TVS_HASBUTTONS |
00098                 TVS_DISABLEDRAGDROP,
00099                 rect, this, ID_TREEVIEW ))
00100   {
00101     TRACE( _T("Tree control failed to create!") ) ;
00102     return -1 ;
00103   }
00104
00105   m_images.Create( IDB_IMAGELIST, 16, 64, RGBLTGREEN ) ;
00106   m_tree.SetImageList( &m_images, TVSIL_NORMAL ) ;
00107
00108   return 0;
00109 }
00110
00111 void CTypeLibTreeView::OnDestroy()
00112 {
00113   CView::OnDestroy();
00114   m_tree.DeleteAllItems() ;
00115 }
00116
00117 void CTypeLibTreeView::OnDraw(CDC* pDC)
00118 {
00119   // TODO: Add your specialized code here and/or call the base class
00120
00121 }
00122
00123 void CTypeLibTreeView::OnSize(UINT nType, int cx, int cy)
00124 {
00125   CView::OnSize(nType, cx, cy);
00126   m_tree.SetWindowPos( NULL, -1, -1, cx+2, cy+2, SWP_NOZORDER ) ;
00127 }
00128
00129 void CTypeLibTreeView::OnInitialUpdate()
00130 {
00131   TRACE(_T("OnInitialUpdate\n")) ;
00132   CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
00133   ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));
00134
00135   ASSERT(pFrame->m_ptlb) ;
00136   m_ptlb = pFrame->m_ptlb ;
00137   ENSURE(m_ptlb);
00138   m_ptlb->AddRef() ;
00139
00140   CView::OnInitialUpdate();
00141 }
00142
00143 void CTypeLibTreeView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
00144 {
00145   if (lHint != NULL || (lHint & UPDF_NOTREEVIEW))
00146     return ;
00147
00148   TRACE(_T("OnUpdate\n")) ;
00149   m_tree.SetRedraw( FALSE ) ;
00150   BeginWaitCursor() ;
00151
00152   m_tree.DeleteAllItems() ;
00153   m_hTypeInfos = NULL ;
00154
00155   TV_INSERTSTRUCT tvis ;
00156   tvis.hParent = TVI_ROOT ;
00157   tvis.hInsertAfter = TVI_FIRST ;
00158   tvis.item.mask = TVIF_TEXT | TVIF_CHILDREN | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE ;
00159   tvis.item.iImage = CTreeItem::typeTypeLib ;
00160   tvis.item.iSelectedImage = tvis.item.iImage + 1 ;
00161
00162   HRESULT hr = S_OK ;
00163   CString strError ;
00164   TRY
00165   {
00166     CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
00167     if (pFrame == NULL)
00168     {
00169       strError = _T("Internal Application error.");
00170       AfxThrowMemoryException() ;
00171     }
00172
00173     if (pFrame->m_fGroupByKind)
00174     {
00175       tvis.item.cChildren = 1 ;
00176     }
00177     else
00178     {
00179       tvis.item.cChildren = m_ptlb->GetTypeInfoCount() ;
00180     }
00181
00182     BSTR    bstrName = NULL ;
00183     BSTR    bstrDoc = NULL ;
00184     BSTR    bstrHelp = NULL ;
00185     DWORD   dwHelpID ;
00186     hr = m_ptlb->GetDocumentation( MEMBERID_NIL, &bstrName, &bstrDoc, &dwHelpID, &bstrHelp ) ;
00187     if (FAILED(hr))
00188     {
00189       strError = _T("ITypeLib::GetDocumentation failed.") ;
00190       AfxThrowMemoryException() ;
00191     }
00192
00193     #pragma warning (suppress: 6014)
00194     CTreeItem* pItem = new CTreeItem(&m_tree) ;
00195     if (pFrame->m_fGroupByKind)
00196       pItem->m_Type = CTreeItem::typeTypeLib2 ;
00197     else
00198       pItem->m_Type = CTreeItem::typeTypeLib ;
00199     pItem->SetTypeLib( m_ptlb ) ;
00200     m_ptlb->AddRef() ;
00201     tvis.item.lParam = (LPARAM)pItem ;
00202
00203     COLE2CT lpszName(bstrName);
00204     if (::SysStringLen(bstrDoc) != 0)
00205     {
00206       COLE2CT lpszDoc(bstrDoc);
00207       CString str;
00208       str.Format( _T("%s (%s)"), lpszName, lpszDoc);
00209       tvis.item.pszText = str.GetBuffer(0);
00210       m_hTypeInfos = m_tree.InsertItem( &tvis ) ;
00211       str.ReleaseBuffer(-1) ;
00212     }
00213     else
00214     {
00215       tvis.item.pszText = (LPTSTR)lpszName;
00216       m_hTypeInfos = m_tree.InsertItem( &tvis ) ;
00217     }
00218
00219     ::SysFreeString( bstrName ) ;
00220     ::SysFreeString( bstrDoc ) ;
00221     ::SysFreeString( bstrHelp ) ;
00222   }
00223   CATCH(CException, pException)
00224   {
00225   }
00226   END_CATCH
00227
00228   if (m_hTypeInfos)
00229   {
00230     m_tree.Expand( m_hTypeInfos, TVE_EXPAND ) ;
00231     //m_tree.SelectItem( m_hTypeInfos ) ;
00232   }
00233
00234   m_tree.SetRedraw( TRUE ) ;
00235   EndWaitCursor() ;
00236 }
00237
00238 void CTypeLibTreeView::DeleteTreeItems( HTREEITEM htree )
00239 {
00240   HTREEITEM       hItem, hItemNext ;
00241   ASSERT(htree) ;
00242
00243   hItem = m_tree.GetChildItem( htree ) ;
00244   while( hItem )
00245   {
00246     hItemNext = m_tree.GetNextSiblingItem( hItem ) ;
00247     m_tree.DeleteItem( hItem ) ;
00248     hItem = hItemNext ;
00249   }
00250 }
00251
00252 void CTypeLibTreeView::OnTreeSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
00253 {
00254   NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
00255   *pResult = 0;
00256
00257   CTypeLibWnd* pFrame = (CTypeLibWnd*)GetParent()->GetParent() ;
00258   ASSERT(pFrame->IsKindOf(RUNTIME_CLASS(CTypeLibWnd)));
00259
00260   CTreeItem*  pItem = (CTreeItem*)pnmtv->itemNew.lParam ;
00261   if (pItem == NULL)
00262     return ;
00263   ASSERT(pItem->IsKindOf(RUNTIME_CLASS(CTreeItem)));
00264
00265   pFrame->m_pSelectedItem = pItem ;
00266
00267   pFrame->UpdateAllViews( this, UPDF_NOTREEVIEW, pItem ) ;
00268 }
00269
00270 void CTypeLibTreeView::OnTreeItemExpanding(NMHDR* pNMHDR, LRESULT* pResult)
00271 {
00272   *pResult = 0 ;
00273   NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
00274
00275   if ((pnmtv->action != TVE_EXPAND && pnmtv->itemNew.lParam) ||
00276     (pnmtv->itemNew.state & TVIS_EXPANDEDONCE))
00277     return ;
00278
00279   CTreeItem*  pItem = (CTreeItem*)pnmtv->itemNew.lParam ;
00280   if (pItem == NULL)
00281     return ;
00282   ASSERT(pItem->IsKindOf(RUNTIME_CLASS(CTreeItem)));
00283
00284   BeginWaitCursor() ;
00285   m_tree.SetRedraw( FALSE ) ;
00286
00287   *pResult = !pItem->Expand(  pnmtv->itemNew.hItem ) ;
00288
00289   // No children
00290   if (*pResult == TRUE)
00291   {
00292     TV_ITEM item ;
00293     item.cChildren = 0 ;
00294     item.mask = TVIF_CHILDREN ;
00295     item.hItem = pnmtv->itemNew.hItem ;
00296     m_tree.SetItem( &item ) ;
00297   }
00298
00299   m_tree.SetRedraw( TRUE ) ;
00300   EndWaitCursor() ;
00301 }
00302
00303
00304 void CTypeLibTreeView::OnTreeItemExpanded(NMHDR* pNMHDR, LRESULT* pResult)
00305 {
00306   *pResult = (LRESULT)FALSE ;
00307 }
00308
00309 void CTypeLibTreeView::OnTreeItemReturn(NMHDR* pNMHDR, LRESULT* pResult)
00310 {
00311   *pResult = (LRESULT)TRUE ;
00312   HTREEITEM hTreeItemSel = m_tree.GetSelectedItem() ;
00313
00314   if (hTreeItemSel)
00315     m_tree.Expand( hTreeItemSel, TVE_TOGGLE ) ;
00316 }
00317
00318 inline void CTypeLibTreeView::OnTreeDeleteItem(NMHDR* pNMHDR, LRESULT* pResult)
00319 {
00320   *pResult = (LRESULT)TRUE ;
00321   NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pNMHDR;
00322
00323   if (pnmtv->itemOld.lParam)
00324   {
00325     CTreeItem* pItem = (CTreeItem*)pnmtv->itemOld.lParam ;
00326     ASSERT(pItem->IsKindOf(RUNTIME_CLASS(CTreeItem)));
00327     delete pItem ;
00328     //pnmtv->itemOld.lParam = NULL ;
00329   }
00330
00331 }
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/acdual/clikpnt.h Source File

  • ole
  • acdual

clikpnt.h

Go to the documentation of this file.
00001 // ClikPnt.h : header file
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CAutoClickPoint command target
00016
00017 class CAutoClickPoint : public CCmdTarget
00018 {
00019   DECLARE_DYNCREATE(CAutoClickPoint)
00020
00021   CAutoClickPoint();           // protected constructor used by dynamic creation
00022
00023 // Attributes
00024 public:
00025
00026 // Operations
00027 public:
00028   CPoint GetClickPoint() { return CPoint(m_x, m_y); }
00029   void SetClickPoint(CPoint point) { m_x = (short)point.x; m_y = (short)point.y; }
00030
00031 // Overrides
00032   // ClassWizard generated virtual function overrides
00033   //{{AFX_VIRTUAL(CAutoClickPoint)
00034   public:
00035   virtual void OnFinalRelease();
00036   //}}AFX_VIRTUAL
00037
00038 // Implementation
00039 protected:
00040   virtual ~CAutoClickPoint();
00041
00042   // Generated message map functions
00043   //{{AFX_MSG(CAutoClickPoint)
00044     // NOTE - the ClassWizard will add and remove member functions here.
00045   //}}AFX_MSG
00046
00047 public:
00048   DECLARE_MESSAGE_MAP()
00049   // Generated OLE dispatch map functions
00050   //{{AFX_DISPATCH(CAutoClickPoint)
00051   short m_x;
00052   short m_y;
00053   //}}AFX_DISPATCH
00054   DECLARE_DISPATCH_MAP()
00055   DECLARE_INTERFACE_MAP()
00056
00057   // DUAL_SUPPORT_START
00058   //    add declaration of IDualAutoClickPoint implementation
00059   //    You need one entry here for each entry in the
00060   //    interface statement of the ODL, plus the entries for a
00061   //    dispatch interface. The BEGIN_DUAL_INTERFACE_PART
00062   //    macro in mfcdual.h automatically generates the IDispatch
00063   //    entries for you.
00064   //    Each entry with the "propput" attribute needs a function
00065   //    named "put_<property name>". Each entry with the "propget"
00066   //    attribute needs a function named "get_<property name>".
00067   //    You can pull these function prototypes from the header file
00068   //    generated by MKTYPLIB.
00069   BEGIN_DUAL_INTERFACE_PART(DualAutoClickPoint, IDualAutoClickPoint)
00070     STDMETHOD(put_x)(THIS_ short newX);
00071     STDMETHOD(get_x)(THIS_ short FAR* retval);
00072     STDMETHOD(put_y)(THIS_ short newY);
00073     STDMETHOD(get_y)(THIS_ short FAR* retval);
00074   END_DUAL_INTERFACE_PART(DualAutoClickPoint)
00075
00076   //     add declaration of ISupportErrorInfo implementation
00077   //     to indicate we support the OLE Automation error object
00078   DECLARE_DUAL_ERRORINFO()
00079   // DUAL_SUPPORT_END
00080 };
00081
00082 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDrawApp Member List

This is the complete list of members for CDrawApp, including all inherited members.
CDrawApp() | CDrawApp |
CDrawApp() | CDrawApp |
ExitInstance() | CDrawApp | [virtual]
InitInstance() | CDrawApp | [virtual]
InitInstance() | CDrawApp | [virtual]
m_server | CDrawApp |
OnAppAbout() | CDrawApp | [protected]
OnAppAbout() | CDrawApp | [protected]
Generated on Sat Nov 23 2024 17:00:55 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/npp/combobar.h Source File

  • general
  • npp

combobar.h

Go to the documentation of this file.
00001 // combobar.h : interface of the CTBComboBox and CComboToolBar class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011 //
00012
00013 class CNotepadView; // forward declaration
00014
00015 class CTBComboBox : public CComboBox
00016 {
00017 // Attributes
00018 protected:
00019   CFont m_font;
00020
00021 // Implementation
00022 protected:
00023   static int CALLBACK FontEnumProc(const LOGFONT *pLogFont,
00024                    const TEXTMETRIC *pTextMetric,
00025                    DWORD type, LPARAM pDestLogFont);
00026   // Generated message map functions
00027   //{{AFX_MSG(CTBComboBox)
00028   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00029   //}}AFX_MSG
00030   DECLARE_MESSAGE_MAP()
00031 };
00032
00033 class CComboToolBar : public CToolBar
00034 {
00035 // Attributes
00036 public:
00037   CTBComboBox m_toolBarCombo;
00038
00039 // Implementation
00040 public:
00041   CNotepadView* GetView();
00042   virtual BOOL PreTranslateMessage(MSG* pMsg);
00043
00044 protected:
00045   // Generated message map functions
00046   //{{AFX_MSG(CComboToolBar)
00047   //}}AFX_MSG
00048   afx_msg void OnSelectEndOk();
00049   afx_msg void OnSetFocus();
00050   DECLARE_MESSAGE_MAP()
00051 };
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/TabbedView/TabbedView.h Source File

  • vc2008fp
  • TabbedView

TabbedView.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #ifndef __AFXWIN_H__
00014   #error include 'stdafx.h' before including this file for PCH
00015 #endif
00016
00017 #include "resource.h"       // main symbols
00018
00019 /////////////////////////////////////////////////////////////////////////////
00020 // CTabbedViewApp:
00021 // See TabbedView.cpp for the implementation of this class
00022 //
00023
00024 class CTabbedViewApp : public CWinAppEx
00025 {
00026 public:
00027   CTabbedViewApp();
00028
00029   virtual void PreLoadState ();
00030
00031 // Overrides
00032   public:
00033   virtual BOOL InitInstance();
00034   virtual int ExitInstance();
00035
00036 // Implementation
00037   afx_msg void OnAppAbout();
00038
00039   DECLARE_MESSAGE_MAP()
00040 };
00041
00042
00043 extern CTabbedViewApp theApp;
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/SimpleImage/stdafx.cpp Source File

  • general
  • SimpleImage

stdafx.cpp

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 // stdafx.cpp : source file that includes just the standard includes
00011 // CImage.pch will be the pre-compiled header
00012 // stdafx.obj will contain the pre-compiled type information
00013
00014 #include "stdafx.h"
00015
00016
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/rectdlg.cpp Source File

  • vc2008fp
  • DrawClient

rectdlg.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013 #include "DrawClient.h"
00014 #include "rectdlg.h"
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CRectDlg dialog
00023
00024 CRectDlg::CRectDlg(CWnd* /*pParent = NULL*/) : CPropertyPage(CRectDlg::IDD)
00025 {
00026   //{{AFX_DATA_INIT(CRectDlg)
00027   m_bNoFill = FALSE;
00028   m_penSize = 0;
00029   //}}AFX_DATA_INIT
00030 }
00031
00032 void CRectDlg::DoDataExchange(CDataExchange* pDX)
00033 {
00034   CDialog::DoDataExchange(pDX);
00035   //{{AFX_DATA_MAP(CRectDlg)
00036   DDX_Control(pDX, IDC_SPIN1, m_SpinCtrl);
00037   DDX_Check(pDX, IDC_NOFILL, m_bNoFill);
00038   DDX_Text(pDX, IDC_WEIGHT, m_penSize);
00039   DDV_MinMaxUInt(pDX, m_penSize, 0, 100);
00040   //}}AFX_DATA_MAP
00041 }
00042
00043 BEGIN_MESSAGE_MAP(CRectDlg, CDialog)
00044   //{{AFX_MSG_MAP(CRectDlg)
00045   //}}AFX_MSG_MAP
00046 END_MESSAGE_MAP()
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CRectDlg message handlers
00050
00051 BOOL CRectDlg::OnInitDialog()
00052 {
00053   CDialog::OnInitDialog();
00054
00055   m_SpinCtrl.SetRange(0, 100);
00056   m_SpinCtrl.SetBase(10);
00057   m_SpinCtrl.SetPos(max(m_penSize, 0));
00058   return TRUE;
00059 }
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgtempl/dlgtemp.cpp Source File

  • general
  • dlgtempl

dlgtemp.cpp

Go to the documentation of this file.
00001 // dlgtemp.cpp : Defines the class behaviors for the application.
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "dlgtemp.h"
00015 #include "setupdlg.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CDlgtempApp
00025
00026 BEGIN_MESSAGE_MAP(CDlgtempApp, CWinApp)
00027   //{{AFX_MSG_MAP(CDlgtempApp)
00028     // NOTE - the ClassWizard will add and remove mapping macros here.
00029     //    DO NOT EDIT what you see in these blocks of generated code!
00030   //}}AFX_MSG
00031   ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00032 END_MESSAGE_MAP()
00033
00034 /////////////////////////////////////////////////////////////////////////////
00035 // CDlgtempApp construction
00036
00037 CDlgtempApp::CDlgtempApp()
00038 {
00039   // TODO: add construction code here,
00040   // Place all significant initialization in InitInstance
00041 }
00042
00043 /////////////////////////////////////////////////////////////////////////////
00044 // The one and only CDlgtempApp object
00045
00046 CDlgtempApp theApp;
00047
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CDlgtempApp initialization
00050
00051 BOOL CDlgtempApp::InitInstance()
00052 {
00053   CDlgtempDlg dlg;
00054   m_pMainWnd = &dlg;
00055   int nResponse = (int)dlg.DoModal();
00056   if (nResponse == IDOK)
00057   {
00058     // TODO: Place code here to handle when the dialog is
00059     //  dismissed with OK
00060   }
00061   else if (nResponse == IDCANCEL)
00062   {
00063     // TODO: Place code here to handle when the dialog is
00064     //  dismissed with Cancel
00065   }
00066
00067   // Since the dialog has been closed, return FALSE so that we exit the
00068   //  application, rather than start the application's message pump.
00069   return FALSE;
00070 }
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CStatusBarDemoApp Member List

This is the complete list of members for CStatusBarDemoApp, including all inherited members.
CStatusBarDemoApp() | CStatusBarDemoApp |
ExitInstance() | CStatusBarDemoApp | [virtual]
InitInstance() | CStatusBarDemoApp | [virtual]
OnAppAbout() | CStatusBarDemoApp |
PreLoadState() | CStatusBarDemoApp | [virtual]
Generated on Sat Nov 23 2024 17:01:09 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/OutlookMultiViews/View1.cpp Source File

  • vc2008fp
  • OutlookMultiViews

View1.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "OutlookMultiViews.h"
00003 #include "View1.h"
00004
00005 #ifdef _DEBUG
00006 #define new DEBUG_NEW
00007 #undef THIS_FILE
00008 static char THIS_FILE[] = __FILE__;
00009 #endif
00010
00011 static const CString strInfo =
00012   _T("This sample illustrates how to switch between multiple views on a single document in a SDI application\r\n\r\nView 2");
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CView1
00016
00017 IMPLEMENT_DYNCREATE(CView1, CView)
00018
00019 CView1::CView1()
00020 {
00021 }
00022
00023 CView1::~CView1()
00024 {
00025 }
00026
00027
00028 BEGIN_MESSAGE_MAP(CView1, CView)
00029   ON_WM_CONTEXTMENU()
00030   // Standard printing commands
00031   ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00032   ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
00033   ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
00034 END_MESSAGE_MAP()
00035
00036 /////////////////////////////////////////////////////////////////////////////
00037 // CView1 drawing
00038
00039 void CView1::OnDraw(CDC* pDC)
00040 {
00041   const int iOffset = 20;
00042
00043   CFont* pFontOld = (CFont*) pDC->SelectStockObject (DEFAULT_GUI_FONT);
00044   ASSERT (pFontOld != NULL);
00045
00046   CRect rectClient;
00047   GetClientRect (&rectClient);
00048
00049   CRect rectText = rectClient;
00050   rectText.DeflateRect (iOffset, iOffset);
00051   pDC->DrawText (strInfo, rectText, DT_CALCRECT | DT_WORDBREAK);
00052
00053   rectText.OffsetRect ( (rectClient.Width () - rectText.Width () - 2 * iOffset) / 2,
00054               (rectClient.Height () - rectText.Height () - 2 * iOffset) / 2);
00055
00056   CRect rectFrame = rectText;
00057   rectFrame.InflateRect (iOffset, iOffset);
00058
00059   CDrawingManager dm (*pDC);
00060
00061   dm.FillGradient2 (rectFrame, RGB (232, 213, 232), RGB (204, 161, 202), 35);
00062
00063   pDC->Draw3dRect (rectFrame, RGB (129, 69, 129), RGB (129, 69, 129));
00064
00065   pDC->SetBkMode (TRANSPARENT);
00066   pDC->SetTextColor (0);
00067   pDC->DrawText (strInfo, rectText, DT_WORDBREAK);
00068   pDC->SelectObject (pFontOld);
00069 }
00070
00071 /////////////////////////////////////////////////////////////////////////////
00072 // CView1 diagnostics
00073
00074 #ifdef _DEBUG
00075 void CView1::AssertValid() const
00076 {
00077   CView::AssertValid();
00078 }
00079
00080 void CView1::Dump(CDumpContext& dc) const
00081 {
00082   CView::Dump(dc);
00083 }
00084 #endif //_DEBUG
00085
00086 /////////////////////////////////////////////////////////////////////////////
00087 // CView1 message handlers
00088
00089 void CView1::OnFilePrintPreview()
00090 {
00091   AFXPrintPreview (this);
00092 }
00093
00094 BOOL CView1::OnPreparePrinting(CPrintInfo* pInfo)
00095 {
00096   // default preparation
00097   return DoPreparePrinting(pInfo);
00098 }
00099
00100 void CView1::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00101 {
00102   // TODO: add extra initialization before printing
00103 }
00104
00105 void CView1::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
00106 {
00107   // TODO: add cleanup after printing
00108 }
00109
00110 void CView1::OnContextMenu(CWnd*, CPoint point)
00111 {
00112   theApp.ShowPopupMenu (IDR_CONTEXT_MENU, point, this);
00113 }
00114
Generated on Sat Nov 23 2024 17:00:33 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/multipad/multipad.cpp Source File

  • general
  • multipad

multipad.cpp

Go to the documentation of this file.
00001 // multipad.cpp : Defines the class behaviors for the Multipad application.
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "multipad.h"
00014 #include <locale.h>
00015
00016 CMultiPadApp NEAR theApp;
00017
00018 BEGIN_MESSAGE_MAP(CMultiPadApp, CWinApp)
00019   //{{AFX_MSG_MAP(CMultiPadApp)
00020   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00021   //}}AFX_MSG_MAP
00022   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)     // file commands...
00023   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00024   ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00025 END_MESSAGE_MAP()
00026
00027 BOOL CMultiPadApp::InitInstance()
00028 {
00029   _tsetlocale(LC_ALL, _T(""));
00030
00031   LoadStdProfileSettings();
00032
00033   AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
00034     RUNTIME_CLASS(CPadDoc), RUNTIME_CLASS(CMDIChildWnd),
00035     RUNTIME_CLASS(CEditView)));
00036   m_pMainWnd = new CMainFrame;
00037   ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME);
00038   m_pMainWnd->ShowWindow(m_nCmdShow);
00039
00040   // enable file manager drag/drop and DDE Execute open
00041   m_pMainWnd->DragAcceptFiles();
00042   EnableShellOpen();
00043   RegisterShellFileTypes(TRUE);
00044
00045   // Parse command line for standard shell commands, DDE, file open
00046   CCommandLineInfo cmdInfo;
00047   ParseCommandLine(cmdInfo);
00048
00049   // Dispatch commands specified on the command line
00050   if (!ProcessShellCommand(cmdInfo))
00051     return FALSE;
00052
00053   return TRUE;
00054 }
00055
00056 void CMultiPadApp::OnAppAbout()
00057 {
00058   CDialog(IDD_ABOUTBOX).DoModal();
00059 }
00060
00061 IMPLEMENT_DYNCREATE(CMainFrame, CMDIFrameWnd)
00062 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00063   //{{AFX_MSG_MAP(CMainFrame)
00064   ON_WM_CREATE()
00065   //}}AFX_MSG_MAP
00066 END_MESSAGE_MAP()
00067
00068 static UINT buttons[] =
00069 {
00070   ID_FILE_NEW, ID_FILE_OPEN, ID_FILE_SAVE, ID_SEPARATOR,
00071   ID_EDIT_CUT, ID_EDIT_COPY, ID_EDIT_PASTE, ID_SEPARATOR,
00072   ID_FILE_PRINT, ID_APP_ABOUT
00073 };
00074
00075 static UINT indicators[] =
00076 {
00077   ID_SEPARATOR, ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL
00078 };
00079
00080 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00081 {
00082   ((m_ToolBar.Create(this) &&
00083     m_ToolBar.LoadBitmap(IDR_MAINFRAME) &&
00084     m_ToolBar.SetButtons(buttons, sizeof(buttons)/sizeof(UINT)) &&
00085     m_StatusBar.Create(this) &&
00086     m_StatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
00087     ? 0 : -1);
00088   return CMDIFrameWnd::OnCreate(lpCreateStruct);
00089 }
00090
00091 IMPLEMENT_DYNCREATE(CPadDoc, CDocument)
00092 BEGIN_MESSAGE_MAP(CPadDoc, CDocument)
00093   //{{AFX_MSG_MAP(CPadDoc)
00094   //}}AFX_MSG_MAP
00095 END_MESSAGE_MAP()
00096
00097 void CPadDoc::Serialize(CArchive& ar)
00098 {
00099   ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
00100 }
00101
00102 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:23 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CExplorerApp Member List

This is the complete list of members for CExplorerApp, including all inherited members.
CExplorerApp() | CExplorerApp |
ExitInstance() | CExplorerApp | [virtual]
InitInstance() | CExplorerApp | [virtual]
OnAppAbout() | CExplorerApp |
PreLoadState() | CExplorerApp | [virtual]
Generated on Sat Nov 23 2024 17:00:56 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CViewExApp Member List

This is the complete list of members for CViewExApp, including all inherited members.
CViewExApp() | CViewExApp |
InitInstance() | CViewExApp | [virtual]
OnAppAbout() | CViewExApp |
Generated on Sat Nov 23 2024 17:01:12 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ACDual::IAutoClickPoint Member List

This is the complete list of members for ACDual::IAutoClickPoint, including all inherited members.
id ACDual::IAutoClickPoint
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/wordpad/strings.h Source File

  • ole
  • wordpad

strings.h

Go to the documentation of this file.
00001 // strings.h : defines all extern const strings
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #ifndef __AFXWIN_H__
00013   #error include 'stdafx.h' before including this file for PCH
00014 #endif
00015
00016 extern const TCHAR szWordPadClass[];
00017 extern const TCHAR szLayout1[];
00018 extern const TCHAR szLayout2[];
00019 extern const TCHAR szRegKey[];
00020
00021 extern const TCHAR szTextSection[];
00022 extern const TCHAR szRTFSection[];
00023 extern const TCHAR szWordSection[];
00024 extern const TCHAR szWriteSection[];
00025 extern const TCHAR szIPSection[];
00026 extern const TCHAR szWrap[];
00027 extern const TCHAR szPageMargin[];
00028
00029 extern const TCHAR szSection[];
00030 extern const TCHAR szWordSel[];
00031 extern const TCHAR szUnits[];
00032 extern const TCHAR szFrameRect[];
00033 extern const TCHAR szMaximized[];
00034 extern const TCHAR szDeleteTemp[];
00035
00036 extern const TCHAR szSumInfo[];
00037
00038 extern const char szWordConverter[];
00039 extern const char szWriteConverter[];
00040
00041 extern const TCHAR szContents[];
Generated on Sat Nov 23 2024 17:00:31 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CDHtmlExploreApp Member List

This is the complete list of members for CDHtmlExploreApp, including all inherited members.
CDHtmlExploreApp() | CDHtmlExploreApp |
InitInstance() | CDHtmlExploreApp | [virtual]
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TCProps/TCExtPg.Cpp Source File

  • ole
  • TstCon
  • TCProps

TCExtPg.Cpp

Go to the documentation of this file.
00001 // TCExtPg.Cpp : Implementation of CTCExtPage
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Classes Reference and related electronic
00006 // documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft C++ Libraries products.
00009
00010 #include "StdAfx.H"
00011 #include "TCExtPg.H"
00012 #include "TCProps.H"
00013
00014 /////////////////////////////////////////////////////////////////////////////
00015 // CTCExtPage
00016
00017 LRESULT CTCExtPage::OnInitDialog( UINT /* nMessage */, WPARAM /* wParam */,
00018    LPARAM /* lParam */, BOOL& bHandled )
00019 {
00020
00021    BSTR bstrName;
00022    CComQIPtr< ITCExtendedControl, &IID_ITCExtendedControl > pControl;
00023
00024    pControl = m_ppUnk[0];
00025    _ASSERTE( pControl != NULL );
00026
00027    bstrName = NULL;
00028    pControl->get_Name( &bstrName );
00029    SetDlgItemText( IDC_NAME, COLE2CT( bstrName ) );
00030    SysFreeString( bstrName );
00031
00032    bHandled = TRUE;
00033
00034    return( FALSE );
00035 }
00036
00037 STDMETHODIMP CTCExtPage::Apply()
00038 {
00039    UINT iObject;
00040    BSTR bstrName;
00041
00042    bstrName = NULL;
00043    GetDlgItemText( IDC_NAME, bstrName );
00044
00045   ATLTRACE( _T( "CTCExtPage::Apply\n" ) );
00046   for( iObject = 0; iObject < m_nObjects; iObject++ )
00047   {
00048     CComPtr< ITCExtendedControl > pControl;
00049
00050     m_ppUnk[iObject]->QueryInterface( IID_ITCExtendedControl,
00051     (void**)&pControl );
00052     pControl->put_Name( bstrName );
00053     pControl.Release();
00054    }
00055    SysFreeString( bstrName );
00056
00057   m_bDirty = FALSE;
00058
00059   return( S_OK );
00060 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/snapvw/mainfrm.cpp Source File

  • general
  • snapvw

mainfrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "SnapVw.h"
00014
00015 #include "MainFrm.h"
00016
00017 #ifdef _DEBUG
00018 #define new DEBUG_NEW
00019 #undef THIS_FILE
00020 static char THIS_FILE[] = __FILE__;
00021 #endif
00022
00023 /////////////////////////////////////////////////////////////////////////////
00024 // CMainFrame
00025
00026 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00027
00028 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00029   //{{AFX_MSG_MAP(CMainFrame)
00030     // NOTE - the ClassWizard will add and remove mapping macros here.
00031     //    DO NOT EDIT what you see in these blocks of generated code !
00032   ON_WM_CREATE()
00033   //}}AFX_MSG_MAP
00034 END_MESSAGE_MAP()
00035
00036 static UINT indicators[] =
00037 {
00038   ID_SEPARATOR,           // status line indicator
00039   ID_INDICATOR_CAPS,
00040   ID_INDICATOR_NUM,
00041   ID_INDICATOR_SCRL,
00042 };
00043
00044 /////////////////////////////////////////////////////////////////////////////
00045 // CMainFrame construction/destruction
00046
00047 CMainFrame::CMainFrame()
00048 {
00049   // TODO: add member initialization code here
00050
00051 }
00052
00053 CMainFrame::~CMainFrame()
00054 {
00055 }
00056
00057 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00058 {
00059   if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00060     return -1;
00061
00062   if (!m_wndToolBar.Create(this) ||
00063     !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00064   {
00065     TRACE0("Failed to create toolbar\n");
00066     return -1;      // fail to create
00067   }
00068
00069   if (!m_wndStatusBar.Create(this) ||
00070     !m_wndStatusBar.SetIndicators(indicators,
00071       sizeof(indicators)/sizeof(UINT)))
00072   {
00073     TRACE0("Failed to create status bar\n");
00074     return -1;      // fail to create
00075   }
00076
00077   // TODO: Remove this if you don't want tool tips or a resizeable toolbar
00078   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
00079     CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00080
00081   // TODO: Delete these three lines if you don't want the toolbar to
00082   //  be dockable
00083   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00084   EnableDocking(CBRS_ALIGN_ANY);
00085   DockControlBar(&m_wndToolBar);
00086
00087   return 0;
00088 }
00089
00090 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00091 {
00092   // TODO: Modify the Window class or styles here by modifying
00093   //  the CREATESTRUCT cs
00094
00095   return CMDIFrameWnd::PreCreateWindow(cs);
00096 }
00097
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CMainFrame diagnostics
00100
00101 #ifdef _DEBUG
00102 void CMainFrame::AssertValid() const
00103 {
00104   CMDIFrameWnd::AssertValid();
00105 }
00106
00107 void CMainFrame::Dump(CDumpContext& dc) const
00108 {
00109   CMDIFrameWnd::Dump(dc);
00110 }
00111
00112 #endif //_DEBUG
00113
00114 /////////////////////////////////////////////////////////////////////////////
00115 // CMainFrame message handlers
Generated on Sat Nov 23 2024 17:00:17 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/IEDemo/MainFrm.h Source File

  • vc2008fp
  • IEDemo

MainFrm.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 #define CFrameWnd CFrameWndEx
00014
00015 #include "LinksBar.h"
00016 #include "ExplorerBar.h"
00017
00018 class CMainFrame : public CFrameWnd
00019 {
00020 protected: // create from serialization only
00021   CMainFrame();
00022   DECLARE_DYNCREATE(CMainFrame)
00023
00024 // Attributes
00025 public:
00026   CMenu               m_menuFavotites;
00027
00028 protected:
00029   CBitmap               m_bmpStatus;
00030   CImageList              m_imlStatusAnimation;
00031
00032 // Operations
00033 public:
00034   void SetAddress(LPCTSTR lpszUrl);
00035   void StartAnimation();
00036   BOOL IsFavoritesMenu (const CMFCToolBarMenuButton* pMenuButton);
00037
00038   virtual BOOL OnShowPopupMenu (CMFCPopupMenu* pMenuPopup);
00039   virtual BOOL OnDrawMenuImage (CDC* pDC,
00040                   const CMFCToolBarMenuButton* pMenuButton,
00041                   const CRect& rectImage);
00042
00043   virtual BOOL OnMenuButtonToolHitTest (CMFCToolBarButton* pButton, TOOLINFO* pTI);
00044   virtual BOOL GetToolbarButtonToolTipText (CMFCToolBarButton* pButton, CString& strTTText);
00045
00046   void SetProgress (long nCurr, long nTotal);
00047
00048 // Overrides
00049   // ClassWizard generated virtual function overrides
00050   //{{AFX_VIRTUAL(CMainFrame)
00051   public:
00052   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00053   virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
00054   //}}AFX_VIRTUAL
00055
00056 // Implementation
00057 public:
00058   virtual ~CMainFrame();
00059 #ifdef _DEBUG
00060   virtual void AssertValid() const;
00061   virtual void Dump(CDumpContext& dc) const;
00062 #endif
00063
00064 protected:  // control bar embedded members
00065   CMFCMenuBar m_wndMenuBar;
00066   CMFCStatusBar m_wndStatusBar;
00067   CMFCToolBar   m_wndToolBar;
00068   CLinksBar   m_wndLinksBar;
00069   CMFCReBar   m_wndReBar;
00070
00071   CComboBoxEx   m_wndAddress;
00072   CExplorerBar  m_wndExplorerBar;
00073
00074   BOOL      m_bMainToolbarMenu;
00075   BOOL      m_bIsHighColor;
00076
00077 // Generated message map functions
00078 protected:
00079   //{{AFX_MSG(CMainFrame)
00080   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00081   afx_msg void OnLink1();
00082   afx_msg void OnViewAddressBar();
00083   afx_msg void OnUpdateViewAddressBar(CCmdUI* pCmdUI);
00084   afx_msg void OnViewLinksBar();
00085   afx_msg void OnUpdateViewLinksBar(CCmdUI* pCmdUI);
00086   afx_msg void OnViewTextlabels();
00087   afx_msg void OnUpdateViewTextlabels(CCmdUI* pCmdUI);
00088   afx_msg void OnViewExplorerbar();
00089   afx_msg void OnUpdateViewExplorerbar(CCmdUI* pCmdUI);
00090   //}}AFX_MSG
00091   afx_msg void OnViewCustomize();
00092   afx_msg LRESULT OnToolbarReset(WPARAM,LPARAM);
00093   afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM);
00094   afx_msg LRESULT OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp);
00095   afx_msg void OnNewAddress();
00096   afx_msg void OnNewAddressEnter();
00097   afx_msg void OnFavorite(UINT nID);
00098   afx_msg void OnHistory(UINT nID);
00099   afx_msg void OnLinkMSDN();
00100   afx_msg void OnLinkMicrosoft();
00101   afx_msg void OnLinkVisualCPP();
00102   DECLARE_MESSAGE_MAP()
00103 };
Generated on Sat Nov 23 2024 17:00:19 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/TstCon/TstCon.Cpp Source File

  • ole
  • TstCon

TstCon.Cpp

Go to the documentation of this file.
00001 // TestContainer98.cpp : Defines the class behaviors for the application.
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "StdAfx.H"
00012 #include "TestCon.H"
00013
00014 #ifdef _DEBUG
00015 #define new DEBUG_NEW
00016 #undef THIS_FILE
00017 static char THIS_FILE[] = __FILE__;
00018 #endif
00019
00020 CTCOptions::CTCOptions() :
00021    m_iLogType( TCLOG_OUTPUTWINDOW ),
00022    m_tUserMode( FALSE ),
00023    m_tAllowWindowless( TRUE ),
00024    m_tQuickActivation( TRUE ),
00025    m_tTwoPassDrawing( TRUE ),
00026    m_tUseIPointerInactive( TRUE ),
00027    m_tHonorIgnoreActivateWhenVisible( TRUE ),
00028    m_tIOleInPlaceSiteEx( TRUE ),
00029    m_tIOleInPlaceSiteWindowless( TRUE ),
00030    m_tIAdviseSinkEx( TRUE ),
00031    m_tSBindHost( TRUE )
00032 {
00033   m_strDSMFile = _T("");
00034 }
00035
00036 CTCCommandLineInfo::CTCCommandLineInfo( CTCOptions* pOptions ) :
00037    m_pOptions( pOptions ),
00038    m_tExpectingLogFileName( FALSE ),
00039    m_tExpectingDSMFile(FALSE),
00040    m_tExpectingProgID( FALSE )
00041 {
00042    ASSERT( m_pOptions != NULL );
00043 }
00044
00045 /*
00046    TestContainer98 command line switches:
00047
00048    -C <progid>    ProgID of control to initially load
00049
00050    -D <DSM File> path to .dsm file for running scripts
00051
00052    -Ln            No logging
00053    -Lo            Log to output window
00054    -Ld            Log to debugger
00055    -Lf <filename> Log to file <filename>
00056
00057    -IOleInPlaceSiteEx+  Support IOleInPlaceSiteEx
00058    -IOleInPlaceSiteEx-  Don't support IOleInPlaceSiteEx
00059
00060    -IOleInPlaceSiteWindowless+ Support IOleInPlaceSiteWindowless
00061    -IOleInPlaceSiteWindowless- Don't support IOleInPlaceSiteWindowless
00062
00063    -IAdviseSinkEx+   Support IAdviseSinkEx
00064    -IAdviseSinkEx-   Don't support IAdviseSinkEx
00065
00066    -SBindHost+    Support SBindHost
00067    -SBindHost-    Don't support SBindHost
00068
00069    -OQ+           Use quick activation
00070    -OQ-           Do not use quick activation
00071
00072    -OT+           Use two-pass drawing
00073    -OT-           Do not use two-pass drawing
00074
00075    -OI+           Support inactive controls
00076    -OI-           Do not support inactive controls
00077
00078    -OH+           Honor OLEMISC_IGNOREACTIVATEWHENVISIBLE
00079    -OH-           Don't honor OLEMISC_IGNOREACTIVATEWHENVISIBLE
00080
00081    -OW+           Allow windowless activation
00082    -OW-           Disallow windowless activation
00083
00084    -U+            User mode
00085    -U-            Design mode
00086 */
00087
00088 void CTCCommandLineInfo::ParseServiceFlag( LPCTSTR pszParam )
00089 {
00090    BOOL* ptService;
00091    const TCHAR* pcFlag;
00092
00093    ENSURE( pszParam != NULL );
00094    ASSERT( pszParam[0] == 'S' );
00095
00096    ptService = NULL;
00097    pcFlag = NULL;
00098    if( strncmp( pszParam, _T( "SBindHost" ), strlen( _T( "SBindHost" ) ) ) ==
00099     0 )
00100    {
00101     ptService = &m_pOptions->m_tSBindHost;
00102     pcFlag = &pszParam[strlen( _T( "SBindHost" ) )];
00103    }
00104
00105    if( ptService == NULL )
00106    {
00107     TCTrace( TRACELEVEL_NORMAL, "Unrecognized command line parameter %s\n",
00108      pszParam );
00109    }
00110    else
00111    {
00112     if( *pcFlag == _T( '+' ) )
00113     {
00114      *ptService = TRUE;
00115     }
00116     else if( *pcFlag == _T( '-' ) )
00117     {
00118      *ptService = FALSE;
00119     }
00120     else
00121     {
00122      TCTrace( TRACELEVEL_NORMAL,
00123       "Command line option %s: Expected + or -\n", pszParam );
00124     }
00125    }
00126 }
00127
00128 void CTCCommandLineInfo::ParseInterfaceFlag( LPCTSTR pszParam )
00129 {
00130    ENSURE( pszParam != NULL );
00131    ASSERT( pszParam[0] == 'I' );
00132
00133    if( strncmp( pszParam, _T( "IOleInPlaceSiteEx" ), strlen( _T(
00134     "IOleInPlaceSiteEx" ) ) ) == 0 )
00135    {
00136     switch( pszParam[strlen( _T( "IOleInPlaceSiteEx" ) )] )
00137     {
00138     case _T( '+' ):
00139      m_pOptions->m_tIOleInPlaceSiteEx = TRUE;
00140      break;
00141
00142     case _T( '-' ):
00143      m_pOptions->m_tIOleInPlaceSiteEx = FALSE;
00144      break;
00145
00146     default:
00147      TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
00148      break;
00149     }
00150    }
00151    else if( strncmp( pszParam, _T( "IOleInPlaceSiteWindowless" ), strlen( _T(
00152     "IOleInPlaceSiteWindowless" ) ) ) == 0 )
00153    {
00154     switch( pszParam[strlen( _T( "IOleInPlaceSiteWindowless" ) )] )
00155     {
00156     case _T( '+' ):
00157      m_pOptions->m_tIOleInPlaceSiteWindowless = TRUE;
00158      break;
00159
00160     case _T( '-' ):
00161      m_pOptions->m_tIOleInPlaceSiteWindowless = FALSE;
00162      break;
00163
00164     default:
00165      TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
00166      break;
00167     }
00168    }
00169    else if( strncmp( pszParam, _T( "IAdviseSinkEx" ), strlen( _T(
00170     "IAdviseSinkEx" ) ) ) == 0 )
00171    {
00172     switch( pszParam[strlen( _T( "IAdviseSinkEx" ) )] )
00173     {
00174     case _T( '+' ):
00175      m_pOptions->m_tIAdviseSinkEx = TRUE;
00176      break;
00177
00178     case _T( '-' ):
00179      m_pOptions->m_tIAdviseSinkEx = FALSE;
00180      break;
00181
00182     default:
00183      TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
00184      break;
00185     }
00186    }
00187    else
00188    {
00189     TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
00190    }
00191 }
00192
00193 void CTCCommandLineInfo::ParseOptionFlag( LPCTSTR pszParam )
00194 {
00195    BOOL* ptOption;
00196
00197    ENSURE( pszParam != NULL );
00198    ASSERT( pszParam[0] == 'O' );
00199
00200    ptOption = NULL;
00201    switch( pszParam[1] )
00202    {
00203    case _T( 'Q' ):
00204     ptOption = &m_pOptions->m_tQuickActivation;
00205     break;
00206
00207    case _T( 'T' ):
00208     ptOption = &m_pOptions->m_tTwoPassDrawing;
00209     break;
00210
00211    case _T( 'W' ):
00212     ptOption = &m_pOptions->m_tAllowWindowless;
00213     break;
00214
00215    case _T( 'H' ):
00216     ptOption = &m_pOptions->m_tHonorIgnoreActivateWhenVisible;
00217     break;
00218
00219    case _T( 'I' ):
00220     ptOption = &m_pOptions->m_tUseIPointerInactive;
00221     break;
00222
00223    default:
00224     TCTrace( 1, "Unrecognized command line parameter %s\n", pszParam );
00225     break;
00226    }
00227
00228    if( ptOption != NULL )
00229    {
00230     if( pszParam[2] == _T( '+' ) )
00231     {
00232      *ptOption = TRUE;
00233     }
00234     else if( pszParam[2] == _T( '-' ) )
00235     {
00236      *ptOption = FALSE;
00237     }
00238     else
00239     {
00240      TCTrace( TRACELEVEL_NORMAL,
00241       "Command line option %s: expected + or -\n", pszParam );
00242     }
00243    }
00244 }
00245
00246 void CTCCommandLineInfo::ParseParam( LPCTSTR pszParam, BOOL tFlag, BOOL tLast )
00247 {
00248    BOOL tHandled;
00249
00250    TRACE( "%s\n", pszParam );
00251
00252    tHandled = FALSE;
00253
00254    if( m_tExpectingLogFileName )
00255    {
00256     tHandled = TRUE;
00257     m_tExpectingLogFileName = FALSE;
00258     if( tFlag )
00259     {
00260      TCTrace( TRACELEVEL_NORMAL, "Bogus log filename\n" );
00261     }
00262     else
00263     {
00264      m_pOptions->m_strLogFileName = pszParam;
00265     }
00266    }
00267    else if(m_tExpectingDSMFile)
00268    {
00269     tHandled = TRUE;
00270     m_tExpectingDSMFile = FALSE;
00271     if( tFlag )
00272     {
00273      TCTrace( TRACELEVEL_NORMAL, "Bogus dsm filename\n" );
00274     }
00275     else
00276     {
00277      m_pOptions->m_strDSMFile = pszParam;
00278     }
00279
00280    }
00281    else if( m_tExpectingProgID )
00282    {
00283     tHandled = TRUE;
00284     m_tExpectingProgID = FALSE;
00285     if( tFlag )
00286     {
00287      TCTrace( TRACELEVEL_NORMAL, "Bogus ProgID\n" );
00288     }
00289     else
00290     {
00291      m_pOptions->m_strProgID = pszParam;
00292     }
00293    }
00294    else
00295    {
00296     if( tFlag )
00297     {
00298      tHandled = TRUE;
00299      switch( pszParam[0] )
00300      {
00301      case _T( 'C' ):
00302       if( tLast )
00303       {
00304          TCTrace( TRACELEVEL_NORMAL,
00305           "No ProgID given for /C parameter\n" );
00306       }
00307       else
00308       {
00309          m_tExpectingProgID = TRUE;
00310       }
00311       break;
00312      case _T( 'D' ):
00313       if( tLast )
00314       {
00315          TCTrace( TRACELEVEL_NORMAL,
00316           "No filename given for /C parameter\n" );
00317       }
00318       else
00319       {
00320          m_tExpectingDSMFile = TRUE;
00321       }
00322       break;
00323      case _T( 'I' ):
00324       ParseInterfaceFlag( pszParam );
00325       break;
00326
00327      case _T( 'S' ):
00328       ParseServiceFlag( pszParam );
00329       break;
00330
00331      case _T( 'L' ):
00332       switch( pszParam[1] )
00333       {
00334       case _T( 'n' ):
00335          m_pOptions->m_iLogType = TCLOG_NULL;
00336          break;
00337
00338       case _T( 'o' ):
00339          m_pOptions->m_iLogType = TCLOG_OUTPUTWINDOW;
00340          break;
00341
00342       case _T( 'd' ):
00343          m_pOptions->m_iLogType = TCLOG_DEBUG;
00344          break;
00345
00346       case _T( 'f' ):
00347          if( tLast )
00348          {
00349           TCTrace( 1, "No filename given for /Lf parameter\n" );
00350          }
00351          else
00352          {
00353           m_tExpectingLogFileName = TRUE;
00354          }
00355          break;
00356
00357       default:
00358          TCTrace( 1, "Unrecognized command line parameter %s\n",
00359           pszParam );
00360          break;
00361       }
00362       break;
00363
00364      case _T( 'O' ):
00365       ParseOptionFlag( pszParam );
00366       break;
00367
00368      case _T( 'U' ):
00369       switch( pszParam[1] )
00370       {
00371       case _T( '-' ):
00372          m_pOptions->m_tUserMode = FALSE;
00373          break;
00374
00375       case _T( '+' ):
00376          m_pOptions->m_tUserMode = TRUE;
00377          break;
00378
00379       default:
00380          TCTrace( 1, "Unrecognized command line parameter %s\n",
00381           pszParam );
00382          break;
00383       }
00384       break;
00385
00386      default:
00387       tHandled = FALSE;
00388       break;
00389      }
00390     }
00391    }
00392
00393    if( !tHandled )
00394    {
00395     CCommandLineInfo::ParseParam( pszParam, tFlag, tLast );
00396    }
00397 }
00398
00399 /////////////////////////////////////////////////////////////////////////////
00400 // CTestContainer98App
00401
00402 BEGIN_MESSAGE_MAP(CTestContainer98App, CWinApp)
00403   //{{AFX_MSG_MAP(CTestContainer98App)
00404   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00405   ON_COMMAND(ID_OPTIONS_TRACELEVEL_NONE, OnOptionsTraceLevelNone)
00406   ON_COMMAND(ID_OPTIONS_TRACELEVEL_NORMAL, OnOptionsTraceLevelNormal)
00407   ON_COMMAND(ID_OPTIONS_TRACELEVEL_VERBOSE, OnOptionsTraceLevelVerbose)
00408   ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRACELEVEL_NONE, OnUpdateOptionsTraceLevelNone)
00409   ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRACELEVEL_NORMAL, OnUpdateOptionsTraceLevelNormal)
00410   ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRACELEVEL_VERBOSE, OnUpdateOptionsTraceLevelVerbose)
00411   ON_COMMAND(ID_FILE_REGISTERCONTROLS, OnFileRegisterControls)
00412   //}}AFX_MSG_MAP
00413   // Standard file based document commands
00414   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00415   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00416 END_MESSAGE_MAP()
00417
00418 /////////////////////////////////////////////////////////////////////////////
00419 // CTestContainer98App construction
00420
00421 CTestContainer98App::CTestContainer98App()
00422 {
00423   // TODO: add construction code here,
00424   // Place all significant initialization in InitInstance
00425   EnableHtmlHelp();
00426 }
00427
00428 /////////////////////////////////////////////////////////////////////////////
00429 // The one and only CTestContainer98App object
00430
00431 CTestContainer98App theApp;
00432
00433 // This identifier was generated to be statistically unique for your app.
00434 // You may change it if you prefer to choose a specific identifier.
00435
00436 // {198184FA-B837-11D0-8DF1-00C04FB68D60}
00437 static const CLSID DOCTEMPLATE_CLSID =
00438 { 0x198184fa, 0xb837, 0x11d0, { 0x8d, 0xf1, 0x0, 0xc0, 0x4f, 0xb6, 0x8d, 0x60 } };
00439
00440 /////////////////////////////////////////////////////////////////////////////
00441 // CTestContainer98App initialization
00442
00443 static const LPCTSTR SETTINGS_KEY = _T( "Settings" );
00444
00445 void CTestContainer98App::LoadRegistrySettings()
00446 {
00447    m_options.m_tUserMode = GetProfileInt( SETTINGS_KEY, _T( "UserMode" ),
00448     FALSE );
00449    m_options.m_tAllowWindowless = GetProfileInt( SETTINGS_KEY, _T(
00450     "AllowWindowless" ), TRUE );
00451    m_options.m_tQuickActivation = GetProfileInt( SETTINGS_KEY, _T(
00452     "QuickActivation" ), TRUE );
00453    m_options.m_tTwoPassDrawing = GetProfileInt( SETTINGS_KEY, _T(
00454     "TwoPassDrawing" ), TRUE );
00455    m_options.m_tHonorIgnoreActivateWhenVisible = GetProfileInt( SETTINGS_KEY,
00456     _T( "HonorIgnoreActivateWhenVisible" ), TRUE );
00457    m_options.m_tUseIPointerInactive = GetProfileInt( SETTINGS_KEY, _T(
00458     "UseIPointerInactive" ), TRUE );
00459    m_options.m_tIOleInPlaceSiteEx = GetProfileInt( SETTINGS_KEY, _T(
00460     "IOleInPlaceSiteEx" ), TRUE );
00461    m_options.m_tIOleInPlaceSiteWindowless = GetProfileInt( SETTINGS_KEY, _T(
00462     "IOleInPlaceSiteWindowless" ), TRUE );
00463    m_options.m_tIAdviseSinkEx = GetProfileInt( SETTINGS_KEY, _T(
00464     "IAdviseSinkEx" ), TRUE );
00465    m_options.m_tSBindHost = GetProfileInt( SETTINGS_KEY, _T( "SBindHost" ),
00466     TRUE );
00467 }
00468
00469 void CTestContainer98App::SaveRegistrySettings()
00470 {
00471    WriteProfileInt( SETTINGS_KEY, _T( "UserMode" ), m_options.m_tUserMode );
00472    WriteProfileInt( SETTINGS_KEY, _T( "AllowWindowless" ),
00473     m_options.m_tAllowWindowless );
00474    WriteProfileInt( SETTINGS_KEY, _T( "QuickActivation" ),
00475     m_options.m_tQuickActivation );
00476    WriteProfileInt( SETTINGS_KEY, _T( "TwoPassDrawing" ),
00477     m_options.m_tTwoPassDrawing );
00478    WriteProfileInt( SETTINGS_KEY, _T( "UseIPointerInactive" ),
00479     m_options.m_tUseIPointerInactive );
00480    WriteProfileInt( SETTINGS_KEY, _T( "HonorIgnoreActivateWhenVisible" ),
00481     m_options.m_tHonorIgnoreActivateWhenVisible );
00482    WriteProfileInt( SETTINGS_KEY, _T( "IOleInPlaceSiteEx" ),
00483     m_options.m_tIOleInPlaceSiteEx );
00484    WriteProfileInt( SETTINGS_KEY, _T( "IOleInPlaceSiteWindowless" ),
00485     m_options.m_tIOleInPlaceSiteWindowless );
00486    WriteProfileInt( SETTINGS_KEY, _T( "IAdviseSinkEx" ),
00487     m_options.m_tIAdviseSinkEx );
00488    WriteProfileInt( SETTINGS_KEY, _T( "SBindHost" ), m_options.m_tSBindHost );
00489 }
00490
00491 BOOL CTestContainer98App::InitInstance()
00492 {
00493   // Initialize OLE libraries
00494   if( !AfxOleInit() )
00495   {
00496     AfxMessageBox( IDP_OLE_INIT_FAILED );
00497     return( FALSE );
00498   }
00499
00500   AfxEnableControlContainer();
00501
00502   // Change the registry key under which our settings are stored.
00503   // You should modify this string to be something appropriate
00504   // such as the name of your company or organization.
00505   SetRegistryKey( _T( "Microsoft" ) );
00506
00507   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00508
00509    LoadRegistrySettings();
00510
00511   // Register the application's document templates.  Document templates
00512   //  serve as the connection between documents, frame windows and views.
00513
00514   CSingleDocTemplate* pDocTemplate;
00515   pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(
00516     CTestContainer98Doc ), RUNTIME_CLASS( CMainFrame ), RUNTIME_CLASS(
00517     CTestContainer98View ) );
00518   pDocTemplate->SetContainerInfo( IDR_TC98TYPE_CNTR_IP );
00519   AddDocTemplate( pDocTemplate );
00520
00521   // Connect the COleTemplateServer to the document template.
00522   //  The COleTemplateServer creates new documents on behalf
00523   //  of requesting OLE containers by using information
00524   //  specified in the document template.
00525   m_server.ConnectTemplate( DOCTEMPLATE_CLSID, pDocTemplate, FALSE );
00526     // Note: SDI applications register server objects only if /Embedding
00527     //   or /Automation is present on the command line.
00528
00529   COleTemplateServer::RegisterAll();
00530
00531    // Parse command line for standard shell commands, DDE, file open
00532   CTCCommandLineInfo cmdInfo( &m_options );
00533   ParseCommandLine( cmdInfo );
00534
00535   // Check to see if launched as OLE server
00536   if( cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated )
00537   {
00538     // Application was run with /Embedding or /Automation.  Don't show the
00539     //  main window in this case.
00540     return( TRUE );
00541   }
00542
00543   // When a server application is launched stand-alone, it is a good idea
00544   //  to update the system registry in case it has been damaged.
00545   m_server.UpdateRegistry( OAT_DISPATCH_OBJECT );
00546   COleObjectFactory::UpdateRegistryAll();
00547
00548   // Dispatch commands specified on the command line
00549   if( !ProcessShellCommand( cmdInfo ) )
00550    {
00551     return( FALSE );
00552    }
00553
00554   // The main window has been initialized, so show and update it.
00555   m_pMainWnd->ShowWindow( SW_SHOW );
00556   m_pMainWnd->UpdateWindow();
00557
00558   return( TRUE );
00559 }
00560
00561 /////////////////////////////////////////////////////////////////////////////
00562 // CAboutDlg dialog used for App About
00563
00564 class CAboutDlg : public CDialog
00565 {
00566 public:
00567   CAboutDlg();
00568
00569 // Dialog Data
00570   //{{AFX_DATA(CAboutDlg)
00571   enum { IDD = IDD_ABOUTBOX };
00572   //}}AFX_DATA
00573
00574   // ClassWizard generated virtual function overrides
00575   //{{AFX_VIRTUAL(CAboutDlg)
00576   protected:
00577   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00578   //}}AFX_VIRTUAL
00579
00580 // Implementation
00581 protected:
00582   //{{AFX_MSG(CAboutDlg)
00583     // No message handlers
00584   //}}AFX_MSG
00585   DECLARE_MESSAGE_MAP()
00586 };
00587
00588 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00589 {
00590   //{{AFX_DATA_INIT(CAboutDlg)
00591   //}}AFX_DATA_INIT
00592 }
00593
00594 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00595 {
00596   CDialog::DoDataExchange(pDX);
00597   //{{AFX_DATA_MAP(CAboutDlg)
00598   //}}AFX_DATA_MAP
00599 }
00600
00601 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00602   //{{AFX_MSG_MAP(CAboutDlg)
00603     // No message handlers
00604   //}}AFX_MSG_MAP
00605 END_MESSAGE_MAP()
00606
00607 // App command to run the dialog
00608 void CTestContainer98App::OnAppAbout()
00609 {
00610   CAboutDlg aboutDlg;
00611   aboutDlg.DoModal();
00612 }
00613
00614 /////////////////////////////////////////////////////////////////////////////
00615 // CTestContainer98App commands
00616
00617
00618 void CTestContainer98App::OnOptionsTraceLevelNone()
00619 {
00620    SetTraceLevel( TRACELEVEL_NONE );
00621 }
00622
00623 void CTestContainer98App::OnOptionsTraceLevelNormal()
00624 {
00625    SetTraceLevel( TRACELEVEL_NORMAL );
00626 }
00627
00628 void CTestContainer98App::OnOptionsTraceLevelVerbose()
00629 {
00630    SetTraceLevel( TRACELEVEL_VERBOSE );
00631 }
00632
00633 void CTestContainer98App::OnUpdateOptionsTraceLevelNone( CCmdUI* pCmdUI )
00634 {
00635    pCmdUI->SetRadio( GetTraceLevel() == TRACELEVEL_NONE );
00636 }
00637
00638 void CTestContainer98App::OnUpdateOptionsTraceLevelNormal( CCmdUI* pCmdUI )
00639 {
00640    pCmdUI->SetRadio( GetTraceLevel() == TRACELEVEL_NORMAL );
00641 }
00642
00643 void CTestContainer98App::OnUpdateOptionsTraceLevelVerbose( CCmdUI* pCmdUI )
00644 {
00645    pCmdUI->SetRadio( GetTraceLevel() == TRACELEVEL_VERBOSE );
00646 }
00647
00648 void CTestContainer98App::OnFileRegisterControls()
00649 {
00650    CRegisterControlsDlg dlg;
00651
00652    dlg.DoModal();
00653 }
Generated on Sat Nov 23 2024 17:00:29 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tagPENPACKET Member List

This is the complete list of members for tagPENPACKET, including all inherited members.
rgwOemData | tagPENPACKET
wPDK | tagPENPACKET
wTabletX | tagPENPACKET
wTabletY | tagPENPACKET
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: advanced/DllScreenCap/ScreenCap/ChildView.cpp Source File

  • advanced
  • DllScreenCap
  • ScreenCap

ChildView.cpp

Go to the documentation of this file.
00001 // ChildView.cpp : implementation of the CChildView class
00002 //
00003 // Copyright (c) Microsoft Corporation.  All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Classes Reference and related electronic
00007 // documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft C++ Libraries products.
00010
00011 #include "stdafx.h"
00012 #include "ScreenCap.h"
00013 #include "ChildView.h"
00014
00015 #ifdef _DEBUG
00016 #define new DEBUG_NEW
00017 #undef THIS_FILE
00018 static char THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 // CChildView
00022
00023 CChildView::CChildView()
00024 {
00025 }
00026
00027 CChildView::~CChildView()
00028 {
00029 }
00030
00031
00032 BEGIN_MESSAGE_MAP(CChildView, CWnd)
00033   ON_WM_PAINT()
00034   ON_WM_ERASEBKGND()
00035 END_MESSAGE_MAP()
00036
00037
00038 // CChildView message handlers
00039 BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)
00040 {
00041   if (!CWnd::PreCreateWindow(cs))
00042     return FALSE;
00043
00044   cs.dwExStyle |= WS_EX_CLIENTEDGE;
00045   cs.style &= ~WS_BORDER;
00046   cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS,
00047     ::LoadCursor(NULL, IDC_ARROW), reinterpret_cast<HBRUSH>(COLOR_WINDOW+1), NULL);
00048
00049   return TRUE;
00050 }
00051
00052 void CChildView::SetImage(const CString &strPath)
00053 {
00054   if (!m_image.IsNull())
00055     m_image.Destroy();
00056
00057   HRESULT hr = m_image.Load(strPath);
00058   if (FAILED(hr)) {
00059     TRACE("Image Load Failed: %x\n", hr);
00060   }
00061   Invalidate();
00062 }
00063
00064 void CChildView::OnPaint()
00065 {
00066   CPaintDC dc(this); // device context for painting
00067   // Do not call CWnd::OnPaint() for painting messages
00068   if (m_image.IsNull())
00069     return;
00070   CRect rect;
00071   GetClientRect(rect);
00072   // In a real app you would probably want to maintain aspect ratio.
00073   dc.SetStretchBltMode(HALFTONE);
00074   m_image.StretchBlt(dc, rect);
00075 }
00076
00077 BOOL CChildView::OnEraseBkgnd(CDC* pDC)
00078 {
00079   if (m_image.IsNull())
00080     return(CWnd::OnEraseBkgnd(pDC));
00081   return(TRUE);
00082 }
Generated on Sat Nov 23 2024 17:00:20 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/dlgcbr32/Mdlsmain.h Source File

  • general
  • dlgcbr32

Mdlsmain.h

Go to the documentation of this file.
00001 // MdlsMain.h : header file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 /*****************************************************************************
00014   Purpose:
00015   Interface for CModelessMain, a reusable class for creating modeless
00016   dialogs which act as main application windows.  The dialog contains
00017   a status bar and a tool bar.  It provides support for ID_VIEW_STATUS_BAR
00018   and ID_VIEW_TOOLBAR commands, as well as CAPS, NUM, and SCRL key
00019   indicators.
00020
00021   Functions:
00022   CModelessMain::CModelessMain()          -- constructor
00023   CModelessMain::~CModelessMain()         -- destructor
00024   CModelessMain::Create()                 -- Create dialog window
00025   CModelessMain::GetStatusBar()           -- access status bar
00026   CModelessMain::GetToolBar()             -- access toolbar
00027   CModelessMain::OnClose()                -- handle WM_CLOSE
00028   CModelessMain::OnEnterIdle()            -- handle WM_ENTERIDLE
00029   CModelessMain::OnEraseBkgnd()           -- handle WM_ERASEBKGND
00030   CModelessMain::OnInitDialog()           -- initialize dialog
00031   CModelessMain::OnInitMenuPopup()        -- handle WM_INITMENUPOPUP
00032   CModelessMain::OnMenuSelect()           -- handle WM_MENUSELECT
00033   CModelessMain::OnPaint()                -- handle WM_PAINT
00034   CModelessMain::OnQueryDragIcon()        -- handle WM_QUERYDRAGICON
00035   CModelessMain::OnSetMessageString()     -- handle WM_SETMESSAGESTRING
00036   CModelessMain::OnStatusBarCheck()       -- ID_VIEW_STATUS_BAR handler
00037   CModelessMain::OnToolBarCheck()         -- ID_VIEW_TOOLBAR handler
00038   CModelessMain::OnUpdateKeyIndicator()   -- update key indicator items
00039   CModelessMain::OnUpdateStatusBarMenu()  -- update ID_VIEW_STATUS_BAR items
00040   CModelessMain::OnUpdateToolBarMenu()    -- update ID_VIEW_TOOLBAR items
00041
00042   Development Team:
00043   Mary Kirtland
00044   Ported to 32-bit by:
00045   Mike Hedley
00046   Created by Microsoft Product Support Services, Premier ISV Support
00047   Copyright (c) Microsoft Corporation.  All rights reserved.
00048 \****************************************************************************/
00049
00050 #ifndef __MDLSMAIN_H__
00051 #define __MDLSMAIN_H__
00052
00053 #include "modeless.h"
00054 #include "dlgbars.h"
00055
00056 class CModelessMain : public CModelessDialog
00057 {
00058 private:
00059   using CModelessDialog::Create;
00060
00061   DECLARE_DYNAMIC(CModelessMain)
00062
00063 // Construction
00064 public:
00065   CModelessMain();
00066   BOOL Create(LPCTSTR lpszTemplateName,
00067         const UINT FAR* lpaIDStatus, int cIDStatus,
00068         const UINT FAR* lpaIDToolbar, int cIDToolbar,
00069         UINT nIDBitmap);
00070   BOOL Create(UINT nIDTemplate,
00071         const UINT FAR* lpaIDStatus, int cIDStatus,
00072         const UINT FAR* lpaIDToolbar, int cIDToolbar,
00073         UINT nIDBitmap);
00074
00075 // Attributes
00076 public:
00077   CStatusBar* GetStatusBar() { return &m_statusBar; }
00078   CToolBar*   GetToolBar()   { return &m_toolBar; }
00079
00080 // Implementation
00081 public:
00082   virtual ~CModelessMain();
00083
00084   // Overrides
00085   virtual BOOL OnInitDialog();
00086
00087 protected:
00088   HICON           m_hIcon;
00089
00090   UINT            m_nIDTracking;
00091   UINT            m_nIDLastMessage;
00092
00093   const UINT FAR* m_lpaIDStatusBar;
00094   int             m_cIDStatusBar;
00095   CDlgStatusBar   m_statusBar;
00096
00097   const UINT FAR* m_lpaIDToolBar;
00098   int             m_cIDToolBar;
00099   UINT            m_nIDBitmap;
00100   CDlgToolBar     m_toolBar;
00101
00102   // Generated message map functions
00103   //{{AFX_MSG(CModelessMain)
00104   afx_msg void OnClose();
00105   afx_msg void OnPaint();
00106   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00107   afx_msg HCURSOR OnQueryDragIcon();
00108   afx_msg void OnEnterIdle(UINT nWhy, CWnd* pWho);
00109   afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00110   afx_msg void OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu);
00111   afx_msg LRESULT OnSetMessageString(WPARAM wParam, LPARAM lParam = 0L);
00112   afx_msg void OnStatusBarCheck();
00113   afx_msg void OnToolBarCheck();
00114   afx_msg void OnUpdateStatusBarMenu(CCmdUI* pCmdUI);
00115   afx_msg void OnUpdateToolBarMenu(CCmdUI* pCmdUI);
00116   afx_msg void OnUpdateKeyIndicator(CCmdUI* pCmdUI);
00117   afx_msg LRESULT OnPopMessageString(WPARAM wParam, LPARAM lParam);
00118   afx_msg BOOL OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult);
00119   //}}AFX_MSG
00120   DECLARE_MESSAGE_MAP()
00121 };
00122
00123 #endif //__MDLSMAIN_H__
Generated on Sat Nov 23 2024 17:00:22 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: general/tracker/trackdoc.h Source File

  • general
  • tracker

trackdoc.h

Go to the documentation of this file.
00001 // trackdoc.h : interface of the CTrackerDoc class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 /////////////////////////////////////////////////////////////////////////////
00013
00014 class CTrackerDoc : public CDocument
00015 {
00016 protected: // create from serialization only
00017   CTrackerDoc();
00018   DECLARE_DYNCREATE(CTrackerDoc)
00019
00020 // Attributes
00021 public:
00022   CRectTracker m_tracker;
00023   BOOL m_bAllowInvert;
00024
00025 // Operations
00026 public:
00027
00028 // Implementation
00029 public:
00030   virtual ~CTrackerDoc();
00031   virtual void Serialize(CArchive& ar);   // overridden for document i/o
00032 #ifdef _DEBUG
00033   virtual void AssertValid() const;
00034   virtual void Dump(CDumpContext& dc) const;
00035 #endif
00036 protected:
00037   virtual BOOL    OnNewDocument();
00038
00039 // Generated message map functions
00040 protected:
00041   //{{AFX_MSG(CTrackerDoc)
00042   afx_msg void OnEditDottedline();
00043   afx_msg void OnUpdateEditDottedline(CCmdUI* pCmdUI);
00044   afx_msg void OnEditHatchedborder();
00045   afx_msg void OnUpdateEditHatchedborder(CCmdUI* pCmdUI);
00046   afx_msg void OnUpdateEditHatchedinside(CCmdUI* pCmdUI);
00047   afx_msg void OnEditHatchedinside();
00048   afx_msg void OnEditResizeinside();
00049   afx_msg void OnUpdateEditResizeinside(CCmdUI* pCmdUI);
00050   afx_msg void OnEditResizeoutside();
00051   afx_msg void OnUpdateEditResizeoutside(CCmdUI* pCmdUI);
00052   afx_msg void OnEditSolidline();
00053   afx_msg void OnUpdateEditSolidline(CCmdUI* pCmdUI);
00054   afx_msg void OnEditAllowInvert();
00055   afx_msg void OnUpdateEditAllowInvert(CCmdUI* pCmdUI);
00056   //}}AFX_MSG
00057   DECLARE_MESSAGE_MAP()
00058 };
00059
00060 /////////////////////////////////////////////////////////////////////////////
Generated on Sat Nov 23 2024 17:00:24 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CContainerApp Member List

This is the complete list of members for CContainerApp, including all inherited members.
CContainerApp() | CContainerApp |
InitInstance() | CContainerApp | [virtual]
OnAppAbout() | CContainerApp |
Generated on Sat Nov 23 2024 17:00:54 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/MSMoneyDemo/MSMCategoryBar.h Source File

  • vc2008fp
  • MSMoneyDemo

MSMCategoryBar.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (c) Microsoft Corporation.  All rights reserved.
00003 //
00004 // This source code is only intended as a supplement to the
00005 // Microsoft Foundation Classes Reference and related
00006 // electronic documentation provided with the library.
00007 // See these sources for detailed information regarding the
00008 // Microsoft Foundation Classes product.
00009
00010 #pragma once
00011
00012 // MSMCategoryBar.h : header file
00013 //
00014
00015 #include "MSMToolBar.h"
00016
00017 /////////////////////////////////////////////////////////////////////////////
00018 // CMSMCategoryBar window
00019
00020 class CMSMCategoryBar : public CMSMToolBar
00021 {
00022   DECLARE_DYNCREATE(CMSMCategoryBar)
00023 // Construction
00024 public:
00025   CMSMCategoryBar ();
00026
00027   virtual ~CMSMCategoryBar ();
00028
00029 // Attributes
00030 public:
00031
00032   virtual BOOL RestoreOriginalstate ();
00033
00034 // Operations
00035 public:
00036
00037 // Implementation
00038 public:
00039   virtual int GetRowHeight () const
00040         {
00041           return 1;
00042         }
00043
00044 protected:
00045   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00046
00047   DECLARE_MESSAGE_MAP()
00048 };
Generated on Sat Nov 23 2024 17:00:32 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/oleview/iviewers/dataobj.cpp Source File

  • ole
  • oleview
  • iviewers

dataobj.cpp

Go to the documentation of this file.
00001 // dataobj.cpp : implementation file
00002 //
00003
00004 // This is a part of the Microsoft Foundation Classes C++ library.
00005 // Copyright (c) Microsoft Corporation.  All rights reserved.
00006 //
00007 // This source code is only intended as a supplement to the
00008 // Microsoft Foundation Classes Reference and related
00009 // electronic documentation provided with the library.
00010 // See these sources for detailed information regarding the
00011 // Microsoft Foundation Classes product.
00012
00013 #include "stdafx.h"
00014 #include "iviewers.h"
00015 #include "iview.h"
00016 #include "dataobj.h"
00017 #include "util.h"
00018 #include "idataobj.h"
00019
00020 #ifdef _DEBUG
00021 #undef THIS_FILE
00022 static char BASED_CODE THIS_FILE[] = __FILE__;
00023 #endif
00024
00025 /////////////////////////////////////////////////////////////////////////////
00026 // CDataObjectViewer
00027
00028 IMPLEMENT_DYNCREATE(CDataObjectViewer, CInterfaceViewer)
00029
00030 CDataObjectViewer::CDataObjectViewer()
00031 {
00032 }
00033
00034 CDataObjectViewer::~CDataObjectViewer()
00035 {
00036 }
00037
00038 BEGIN_MESSAGE_MAP(CDataObjectViewer, CInterfaceViewer)
00039   //{{AFX_MSG_MAP(CDataObjectViewer)
00040     // NOTE - the ClassWizard will add and remove mapping macros here.
00041   //}}AFX_MSG_MAP
00042 END_MESSAGE_MAP()
00043
00044 IMPLEMENT_OLECREATE(CDataObjectViewer, "Ole2View.IDataObject.1", 0x28d8aba0, 0x4b78, 0x11ce, 0xb2, 0x7d, 0x0, 0xaa, 0x0, 0x1f, 0x73, 0xc1)
00045
00046 /////////////////////////////////////////////////////////////////////////////
00047 // CDataObjectViewer View imp.
00048
00049 HRESULT CDataObjectViewer::OnView(HWND hwndParent, REFIID riid, LPUNKNOWN punk)
00050 {
00051   SCODE sc = NOERROR ;
00052
00053   ASSERT(hwndParent);
00054   ENSURE(punk);
00055
00056   if (riid != IID_IDataObject)
00057   {
00058     AfxMessageBox( _T("IDataObject interface viewer only supports IID_IDataObject") ) ;
00059     return E_INVALIDARG ;
00060   }
00061
00062   IDataObject* pdataobj = NULL ;
00063   sc = punk->QueryInterface( riid, (void**)&pdataobj ) ;
00064   if (FAILED(sc))
00065   {
00066     AfxMessageBox( _T("Object does not support IDataObject") ) ;
00067     return E_UNEXPECTED ;
00068   }
00069
00070   CIDataObjectDlg* pdlg ;
00071   pdlg = new CIDataObjectDlg( hwndParent, pdataobj, riid, _T("") ) ;
00072
00073   if (pdlg)
00074   {
00075     pdlg->DoModal() ;
00076     delete pdlg ;
00077   }
00078
00079   pdataobj->Release() ;
00080
00081   return sc ;
00082 }
00083 /////////////////////////////////////////////////////////////////////////////
00084 // CDataObjectDlg dialog
00085
00086
00087 CDataObjectDlg::CDataObjectDlg(CWnd* pParent /*=NULL*/)
00088   : CDialog(CDataObjectDlg::IDD, pParent)
00089 {
00090   //{{AFX_DATA_INIT(CDataObjectDlg)
00091     // NOTE: the ClassWizard will add member initialization here
00092   //}}AFX_DATA_INIT
00093 }
00094
00095
00096 void CDataObjectDlg::DoDataExchange(CDataExchange* pDX)
00097 {
00098   CDialog::DoDataExchange(pDX);
00099   //{{AFX_DATA_MAP(CDataObjectDlg)
00100     // NOTE: the ClassWizard will add DDX and DDV calls here
00101   //}}AFX_DATA_MAP
00102 }
00103
00104
00105 BEGIN_MESSAGE_MAP(CDataObjectDlg, CDialog)
00106   //{{AFX_MSG_MAP(CDataObjectDlg)
00107     // NOTE: the ClassWizard will add message map macros here
00108   //}}AFX_MSG_MAP
00109 END_MESSAGE_MAP()
00110
00111
00112 /////////////////////////////////////////////////////////////////////////////
00113 // CDataObjectDlg message handlers
Generated on Sat Nov 23 2024 17:00:26 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/ToolTipDemo/TooltipDemoDoc.h Source File

  • vc2008fp
  • ToolTipDemo

TooltipDemoDoc.h

Go to the documentation of this file.
00001 // This is a part of the Microsoft Foundation Classes C++ library.
00002 // Copyright (C) Microsoft Corporation
00003 // All rights reserved.
00004 //
00005 // This source code is only intended as a supplement to the
00006 // Microsoft Foundation Classes Reference and related
00007 // electronic documentation provided with the library.
00008 // See these sources for detailed information regarding the
00009 // Microsoft Foundation Classes product.
00010
00011 #pragma once
00012
00013 class CTooltipDemoDoc : public CDocument
00014 {
00015 protected: // create from serialization only
00016   CTooltipDemoDoc();
00017   DECLARE_DYNCREATE(CTooltipDemoDoc)
00018
00019 // Attributes
00020 public:
00021
00022 // Operations
00023 public:
00024
00025 // Overrides
00026   public:
00027   virtual BOOL OnNewDocument();
00028   virtual void Serialize(CArchive& ar);
00029
00030 // Implementation
00031 public:
00032   virtual ~CTooltipDemoDoc();
00033 #ifdef _DEBUG
00034   virtual void AssertValid() const;
00035   virtual void Dump(CDumpContext& dc) const;
00036 #endif
00037
00038 protected:
00039   DECLARE_MESSAGE_MAP()
00040 };
Generated on Sat Nov 23 2024 17:00:34 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: vc2008fp/DrawClient/cntritem.cpp Source File

  • vc2008fp
  • DrawClient

cntritem.cpp

Go to the documentation of this file.
00001 // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
00002 // (the "Fluent UI") and is provided only as referential material to supplement the
00003 // Microsoft Foundation Classes Reference and related electronic documentation
00004 // included with the MFC C++ library software.
00005 // License terms to copy, use or distribute the Fluent UI are available separately.
00006 // To learn more about our Fluent UI licensing program, please visit
00007 // http://msdn.microsoft.com/officeui.
00008 //
00009 // Copyright (C) Microsoft Corporation
00010 // All rights reserved.
00011
00012 #include "stdafx.h"
00013
00014 #ifndef SHARED_HANDLERS
00015 #include "DrawClient.h"
00016 #endif
00017
00018 #include "drawdoc.h"
00019 #include "drawobj.h"
00020 #ifndef SHARED_HANDLERS
00021 #include "drawvw.h"
00022 #endif
00023 #include "cntritem.h"
00024
00025 #ifdef _DEBUG
00026 #undef THIS_FILE
00027 static char BASED_CODE THIS_FILE[] = __FILE__;
00028 #endif
00029
00030 /////////////////////////////////////////////////////////////////////////////
00031 // CDrawItem implementation
00032
00033 IMPLEMENT_SERIAL(CDrawItem, COleClientItem, 0)
00034
00035 CDrawItem::CDrawItem(CDrawDoc* pContainer, CDrawOleObj* pDrawObj)
00036 : COleClientItem(pContainer)
00037 {
00038   m_pDrawObj = pDrawObj;
00039 }
00040
00041 CDrawItem::~CDrawItem()
00042 {
00043   if (m_pDrawObj != NULL)
00044     m_pDrawObj->m_pClientItem = NULL;
00045 }
00046
00047 void CDrawItem::OnChange(OLE_NOTIFICATION nCode, DWORD dwParam)
00048 {
00049   ASSERT_VALID(this);
00050
00051   COleClientItem::OnChange(nCode, dwParam);
00052
00053   switch (nCode)
00054   {
00055   case OLE_CHANGED_STATE:
00056   case OLE_CHANGED_ASPECT:
00057     m_pDrawObj->Invalidate();
00058     break;
00059   case OLE_CHANGED:
00060     UpdateExtent(); // extent may have changed
00061     m_pDrawObj->Invalidate();
00062     break;
00063   }
00064 }
00065
00066 BOOL CDrawItem::OnChangeItemPosition(const CRect& rectPos)
00067 {
00068   ASSERT_VALID(this);
00069 #ifndef SHARED_HANDLERS
00070   CDrawView* pView = GetActiveView();
00071   ASSERT_VALID(pView);
00072   CRect rect = rectPos;
00073   pView->ClientToDoc(rect);
00074
00075   if (rect != m_pDrawObj->m_position)
00076   {
00077     // invalidate old rectangle
00078     m_pDrawObj->Invalidate();
00079
00080     // update to new rectangle
00081     m_pDrawObj->m_position = rect;
00082     GetExtent(&m_pDrawObj->m_extent);
00083
00084     // and invalidate new rectangle
00085     m_pDrawObj->Invalidate();
00086
00087     // mark document as dirty
00088     GetDocument()->SetModifiedFlag();
00089   }
00090 #endif
00091   return COleClientItem::OnChangeItemPosition(rectPos);
00092 }
00093
00094 void CDrawItem::OnGetItemPosition(CRect& rPosition)
00095 {
00096   ASSERT_VALID(this);
00097
00098   // update to extent of item if m_position is not initialized
00099   if (m_pDrawObj->m_position.IsRectEmpty())
00100     UpdateExtent();
00101
00102   // copy m_position, which is in document coordinates
00103 #ifndef SHARED_HANDLERS
00104   CDrawView* pView = GetActiveView();
00105   ASSERT_VALID(pView);
00106   rPosition = m_pDrawObj->m_position;
00107   pView->DocToClient(rPosition);
00108 #endif
00109 }
00110
00111 void CDrawItem::Serialize(CArchive& ar)
00112 {
00113   ASSERT_VALID(this);
00114
00115   // Call base class first to read in COleClientItem data.
00116   // Note: this sets up the m_pDocument pointer returned from
00117   //  CDrawItem::GetDocument, therefore it is a good idea
00118   //  to call the base class Serialize first.
00119   COleClientItem::Serialize(ar);
00120
00121   // now store/retrieve data specific to CDrawItem
00122   if (ar.IsStoring())
00123   {
00124     // TODO: add storing code here
00125   }
00126   else
00127   {
00128     // TODO: add loading code here
00129   }
00130 }
00131
00132 BOOL CDrawItem::UpdateExtent()
00133 {
00134   CSize size;
00135   if (!GetExtent(&size) || size == m_pDrawObj->m_extent)
00136     return FALSE;       // blank
00137
00138   // if new object(i.e. m_extent is empty) setup position
00139   if (m_pDrawObj->m_extent == CSize(0, 0))
00140   {
00141     m_pDrawObj->m_position.right = m_pDrawObj->m_position.left + MulDiv(size.cx, 10, 254);
00142     m_pDrawObj->m_position.bottom = m_pDrawObj->m_position.top - MulDiv(size.cy, 10, 254);
00143   }
00144   // else data changed so scale up rect as well
00145   else if (!IsInPlaceActive() && size != m_pDrawObj->m_extent)
00146   {
00147     m_pDrawObj->m_position.right = m_pDrawObj->m_position.left + MulDiv(m_pDrawObj->m_position.Width(), size.cx, m_pDrawObj->m_extent.cx);
00148     m_pDrawObj->m_position.bottom = m_pDrawObj->m_position.top + MulDiv(m_pDrawObj->m_position.Height(), size.cy, m_pDrawObj->m_extent.cy);
00149   }
00150
00151   m_pDrawObj->m_extent = size;
00152   m_pDrawObj->Invalidate();   // redraw to the new size/position
00153   return TRUE;
00154 }
00155
00156 void CDrawItem::OnActivate()
00157 {
00158   // allow only one inplace active item per frame
00159 #ifndef SHARED_HANDLERS
00160   CView* pView = GetActiveView();
00161   ASSERT_VALID(pView);
00162   COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
00163   if (pItem != NULL && pItem != this)
00164     pItem->Close();
00165 #endif
00166
00167   COleClientItem::OnActivate();
00168 }
00169
00170 void CDrawItem::OnDeactivateUI(BOOL bUndoable)
00171 {
00172   COleClientItem::OnDeactivateUI(bUndoable);
00173
00174   // hide the object if it is not an outside-in object
00175   DWORD dwMisc = 0;
00176   m_lpObject->GetMiscStatus(GetDrawAspect(), &dwMisc);
00177   if (dwMisc & OLEMISC_INSIDEOUT)
00178     DoVerb(OLEIVERB_HIDE, NULL);
00179 }
00180
00181 BOOL CDrawItem::OnShowControlBars(CFrameWnd* pFrameWnd, BOOL bShow)
00182 {
00183 #ifndef SHARED_HANDLERS
00184   CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, pFrameWnd);
00185
00186   if (pMainFrame != NULL)
00187   {
00188     ASSERT_VALID(pMainFrame);
00189     BOOL bResult = pMainFrame->OnShowPanes(bShow);
00190     pMainFrame->RecalcLayout();
00191     return bResult;
00192   }
00193 #endif
00194   return FALSE;
00195 }
00196
00197 /////////////////////////////////////////////////////////////////////////////
00198 // CDrawItem diagnostics
00199
00200 #ifdef _DEBUG
00201 void CDrawItem::AssertValid() const
00202 {
00203   COleClientItem::AssertValid();
00204 }
00205
00206 void CDrawItem::Dump(CDumpContext& dc) const
00207 {
00208   COleClientItem::Dump(dc);
00209 }
00210 #endif
00211
00212
Generated on Sat Nov 23 2024 17:00:21 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ButtonLib::_DButtonEvents Member List

This is the complete list of members for ButtonLib::_DButtonEvents, including all inherited members.
Click() ButtonLib::_DButtonEvents
Generated on Sat Nov 23 2024 17:01:14 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: ole/superpad/pageset.cpp Source File

  • ole
  • superpad

pageset.cpp

Go to the documentation of this file.
00001 // pageset.cpp : implementation of the CPadView class
00002 //
00003 // This is a part of the Microsoft Foundation Classes C++ library.
00004 // Copyright (c) Microsoft Corporation.  All rights reserved.
00005 //
00006 // This source code is only intended as a supplement to the
00007 // Microsoft Foundation Classes Reference and related
00008 // electronic documentation provided with the library.
00009 // See these sources for detailed information regarding the
00010 // Microsoft Foundation Classes product.
00011
00012 #include "stdafx.h"
00013 #include "superpad.h"
00014 #include <malloc.h>
00015
00016 #ifdef _DEBUG
00017 #undef THIS_FILE
00018 static char BASED_CODE THIS_FILE[] = __FILE__;
00019 #endif
00020
00021 /////////////////////////////////////////////////////////////////////////////
00022 // CPageSetupDlg dialog
00023
00024 IMPLEMENT_DYNAMIC(CPageSetupDlg, CDialog)
00025
00026 CPageSetupDlg::CPageSetupDlg(CWnd* pParent /*=NULL*/)
00027   : CDialog(CPageSetupDlg::IDD, pParent)
00028 {
00029   //{{AFX_DATA_INIT(CPageSetupDlg)
00030   m_iFooterTime = -1;
00031   m_iHeaderTime = -1;
00032   //}}AFX_DATA_INIT
00033 }
00034
00035 void CPageSetupDlg::DoDataExchange(CDataExchange* pDX)
00036 {
00037   CDialog::DoDataExchange(pDX);
00038   //{{AFX_DATA_MAP(CPageSetupDlg)
00039   DDX_Text(pDX, IDC_FOOTER, m_strFooter);
00040   DDX_Text(pDX, IDC_HEADER, m_strHeader);
00041   DDX_Radio(pDX, IDC_FOOTER_FILE, m_iFooterTime);
00042   DDX_Radio(pDX, IDC_HEADER_FILE, m_iHeaderTime);
00043   //}}AFX_DATA_MAP
00044 }
00045
00046 BEGIN_MESSAGE_MAP(CPageSetupDlg, CDialog)
00047   //{{AFX_MSG_MAP(CPageSetupDlg)
00048   //}}AFX_MSG_MAP
00049 END_MESSAGE_MAP()
00050
00051 /////////////////////////////////////////////////////////////////////////////
00052 // CPageSetup member functions
00053
00054 static void Replace(CString& strModify, LPCTSTR pszWhat, LPCTSTR pszWith)
00055   // replace pszWhat with pwzWith in string strModify
00056 {
00057   int i;
00058   if ((i = strModify.Find(pszWhat)) >= 0)
00059   {
00060     strModify = strModify.Left(i) + pszWith +
00061       strModify.Mid(i+lstrlen(pszWhat));
00062   }
00063 }
00064
00065 void CPageSetupDlg::FormatFilePage(CString& strFormat,
00066   LPCTSTR pszFileName, UINT nPage)
00067 {
00068   TCHAR sz[32];
00069   _stprintf_s(sz, 32, _T("%d"), nPage);
00070   ::Replace(strFormat, _T("&p"), sz);
00071   if (pszFileName == NULL)
00072   {
00073     pszFileName = sz;
00074     sz[0] = 0;
00075   }
00076   ::Replace(strFormat, _T("&f"), pszFileName);
00077 }
00078
00079 void CPageSetupDlg::FormatHeader(CString& strHeader, CTime& time,
00080   LPCTSTR pszFileName, UINT nPage)
00081 {
00082   CString strFormat = m_strHeader;
00083   FormatFilePage(strFormat, pszFileName, nPage);
00084 #ifdef _UNICODE
00085   int nLen = strFormat.GetLength();
00086   char *pszFormat = (char*)_alloca(nLen+1);
00087   wcstombs(pszFormat, strFormat, nLen+1);
00088   strHeader = time.Format(pszFormat);
00089 #else
00090   strHeader = time.Format(strFormat);
00091 #endif
00092 }
00093
00094 void CPageSetupDlg::FormatFooter(CString& strFooter, CTime& time,
00095   LPCTSTR pszFileName, UINT nPage)
00096 {
00097   CString strFormat = m_strFooter;
00098   FormatFilePage(strFormat, pszFileName, nPage);
00099 #ifdef _UNICODE
00100   int nLen = strFormat.GetLength();
00101   char *pszFormat = (char*)_alloca(nLen+1);
00102   wcstombs(pszFormat, strFormat, nLen+1);
00103   strFooter = time.Format(pszFormat);
00104 #else
00105   strFooter = time.Format(strFormat);
00106 #endif
00107 }
00108
00109
00110 static TCHAR BASED_CODE szPageSetup[] = _T("PageSetup");
00111 static TCHAR BASED_CODE szHeader[] = _T("Header");
00112 static TCHAR BASED_CODE szFooter[] = _T("Footer");
00113 static TCHAR BASED_CODE szHeaderTime[] = _T("HeaderTime");
00114 static TCHAR BASED_CODE szFooterTime[] = _T("FooterTime");
00115
00116 void CPageSetupDlg::Initialize()
00117 {
00118   m_strHeader = AfxGetApp()->GetProfileString(szPageSetup, szHeader,
00119     _T("File: &f"));
00120   m_strFooter = AfxGetApp()->GetProfileString(szPageSetup, szFooter,
00121     _T("Page: &p"));
00122   m_iHeaderTime = AfxGetApp()->GetProfileInt(szPageSetup, szHeaderTime, 0);
00123   m_iFooterTime = AfxGetApp()->GetProfileInt(szPageSetup, szFooterTime, 0);
00124   m_strHeaderOld = m_strHeader;
00125   m_strFooterOld = m_strFooter;
00126   m_iHeaderTimeOld = m_iHeaderTime;
00127   m_iFooterTimeOld = m_iFooterTime;
00128 }
00129
00130 void CPageSetupDlg::Terminate()
00131 {
00132   if (m_strHeader != m_strHeaderOld)
00133     AfxGetApp()->WriteProfileString(szPageSetup, szHeader, m_strHeader);
00134   if (m_strFooter != m_strFooterOld)
00135     AfxGetApp()->WriteProfileString(szPageSetup, szFooter, m_strFooter);
00136   if (m_iHeaderTime != m_iHeaderTimeOld)
00137     AfxGetApp()->WriteProfileInt(szPageSetup, szHeaderTime, m_iHeaderTime);
00138   if (m_iFooterTime != m_iFooterTimeOld)
00139     AfxGetApp()->WriteProfileInt(szPageSetup, szFooterTime, m_iFooterTime);
00140 }
00141
00142 /////////////////////////////////////////////////////////////////////////////
00143 // CPageSetupDlg message handlers
Generated on Sat Nov 23 2024 17:00:27 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CInPlaceFrame Member List

This is the complete list of members for CInPlaceFrame, including all inherited members.
CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType=adjustBorder) | CInPlaceFrame | [virtual]
CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType=adjustBorder) | CInPlaceFrame | [virtual]
CInPlaceFrame() | CInPlaceFrame |
CInPlaceFrame() | CInPlaceFrame |
CInPlaceFrame() | CInPlaceFrame |
CInPlaceFrame() | CInPlaceFrame |
CInPlaceFrame() | CInPlaceFrame |
CreateFormatBar(CWnd *pWndFrame) | CInPlaceFrame | [protected]
CreateFormatBar(CWnd *pWndFrame) | CInPlaceFrame | [protected]
CreateMenuBar() | CInPlaceFrame | [protected]
CreateRulerBar(CWnd *pWndFrame) | CInPlaceFrame | [protected]
CreateRulerBar(CWnd *pWndFrame) | CInPlaceFrame | [protected]
CreateToolBar(CWnd *pWndFrame) | CInPlaceFrame | [protected]
CreateToolBar(CWnd *pWndFrame) | CInPlaceFrame | [protected]
m_dropTarget | CInPlaceFrame | [protected]
m_wndFormatBar | CInPlaceFrame |
m_wndMenuBar | CInPlaceFrame |
m_wndResizeBar | CInPlaceFrame | [protected]
m_wndResizeBar | CInPlaceFrame |
m_wndRulerBar | CInPlaceFrame |
m_wndToolBar | CInPlaceFrame | [protected]
m_wndToolBar | CInPlaceFrame |
OnBarState(UINT_PTR wParam, LONG_PTR lParam) | CInPlaceFrame | [protected]
OnBarState(WPARAM wParam, LPARAM lParam) | CInPlaceFrame | [protected]
OnCharColor() | CInPlaceFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CInPlaceFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CInPlaceFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CInPlaceFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CInPlaceFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CInPlaceFrame | [protected]
OnCreateControlBars(CFrameWnd *pWndFrame, CFrameWnd *pWndDoc) | CInPlaceFrame | [virtual]
OnCreateControlBars(CFrameWnd *pWndFrame, CFrameWnd *pWndDoc) | CInPlaceFrame | [virtual]
OnCreateControlBars(CWnd *pWndFrame, CWnd *pWndDoc) | CInPlaceFrame |
OnCreateControlBars(CFrameWnd *pWndFrame, CFrameWnd *pWndDoc) | CInPlaceFrame | [virtual]
OnCreateControlBars(CFrameWnd *pWndFrame, CFrameWnd *pWndDoc) | CInPlaceFrame | [virtual]
OnDestroy() | CInPlaceFrame | [protected]
OnDestroy() | CInPlaceFrame | [protected]
OnHelpFinder() | CInPlaceFrame | [protected]
OnHelpFinder() | CInPlaceFrame | [protected]
OnPenToggle() | CInPlaceFrame | [protected]
OnPenToggle() | CInPlaceFrame | [protected]
OnResizeChild(WPARAM wParam, LPARAM lParam) | CInPlaceFrame | [protected]
OnResizeChild(WPARAM wParam, LPARAM lParam) | CInPlaceFrame | [protected]
OnUpdateContextHelp(CCmdUI *pCmdUI) | CInPlaceFrame | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CInPlaceFrame | [virtual]
RecalcLayout(BOOL bNotify=TRUE) | CInPlaceFrame | [virtual]
RecalcLayout(BOOL bNotify=TRUE) | CInPlaceFrame | [virtual]
RepositionFrame(LPCRECT lpPosRect, LPCRECT lpClipRect) | CInPlaceFrame | [virtual]
RepositionFrame(LPCRECT lpPosRect, LPCRECT lpClipRect) | CInPlaceFrame | [virtual]
~CInPlaceFrame() | CInPlaceFrame | [virtual]
~CInPlaceFrame() | CInPlaceFrame | [virtual]
~CInPlaceFrame() | CInPlaceFrame | [virtual]
Generated on Sat Nov 23 2024 17:00:57 for Windows-MFC-Examples by doxygen 1.7.1


Windows-MFC-Examples: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CBkfstPage Member List

This is the complete list of members for CBkfstPage, including all inherited members.
CBkfstPage() | CBkfstPage |
DoDataExchange(CDataExchange *pDX) | CBkfstPage | [protected, virtual]
IDD enum value | CBkfstPage |
OnInitDialog() | CBkfstPage | [protected, virtual]
~CBkfstPage() | CBkfstPage |
Generated on Sat Nov 23 2024 17:00:53 for Windows-MFC-Examples by doxygen 1.7.1